Built motion from commit c0cdc9d8.|2.6.28
authorsupport <support@xcally.com>
Tue, 17 Jan 2023 15:20:54 +0000 (15:20 +0000)
committersupport <support@xcally.com>
Tue, 17 Jan 2023 15:20:54 +0000 (15:20 +0000)
1217 files changed:
apidoc/api_project.js
apidoc/api_project.json
npm-shrinkwrap.json
package.json
public/index.html
public/scripts/vendor.894ce498.js [moved from public/scripts/vendor.1fe6f84b.js with 62% similarity]
public/styles/vendor.c7054776.css [moved from public/styles/vendor.57a94b79.css with 74% 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/helpers/wildcard-expressions.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/mailInteractionHasTag/index.js
server/api/mailInteractionHasTag/mailInteractionHasTag.controller.js
server/api/mailInteractionHasTag/mailInteractionHasTag.js
server/api/mailInteractionHasTag/mailInteractionHasTag.model.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/files/chat/iframe.ejs
server/migrations/2.6.27.js [new file with mode: 0644]
server/migrations/2.6.28.js [new file with mode: 0644]
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/misc.js
server/utils/safe-template.js
server/utils/update-app-config.js

index bad1669..760aae1 100644 (file)
@@ -1,6 +1,6 @@
 define({
   "name": "xCALLY Motion API",
-  "version": "2.6.26",
+  "version": "2.6.28",
   "description": "Thank you for choosing xCALLY MOTION, one of the first Omni Channel solution integrated with AsteriskTM and the most innovative real time solutions available on the market.",
   "title": "xCALLY MOTION API",
   "header": {
@@ -17,7 +17,7 @@ define({
   "apidoc": "0.3.0",
   "generator": {
     "name": "apidoc",
-    "time": "2022-12-28T14:55:21.972Z",
+    "time": "2023-01-17T15:08:59.349Z",
     "url": "http://apidocjs.com",
     "version": "0.24.0"
   }
index b658c5d..77e428d 100644 (file)
@@ -1,6 +1,6 @@
 {
   "name": "xCALLY Motion API",
-  "version": "2.6.26",
+  "version": "2.6.28",
   "description": "Thank you for choosing xCALLY MOTION, one of the first Omni Channel solution integrated with AsteriskTM and the most innovative real time solutions available on the market.",
   "title": "xCALLY MOTION API",
   "header": {
@@ -17,7 +17,7 @@
   "apidoc": "0.3.0",
   "generator": {
     "name": "apidoc",
-    "time": "2022-12-28T14:55:21.972Z",
+    "time": "2023-01-17T15:08:59.349Z",
     "url": "http://apidocjs.com",
     "version": "0.24.0"
   }
index 56d8b49..1b847b4 100644 (file)
@@ -1,6 +1,6 @@
 {
   "name": "motion",
-  "version": "2.6.26",
+  "version": "2.6.28",
   "dependencies": {
     "@babel/code-frame": {
       "version": "7.18.6",
index c4abd4f..5371a30 100644 (file)
@@ -1,6 +1,6 @@
 {
   "name": "motion",
-  "version": "2.6.26",
+  "version": "2.6.28",
   "description": "xCALLY Motion is the new Realtime asynchronous solution for your multichannel contact center over Asterisk.",
   "main": "server/app.js",
   "engines": {
index 67e225c..972b5d0 100644 (file)
@@ -14,7 +14,7 @@
 
   <link rel="stylesheet" href="assets/plugins/angular-material-form-builder/dist/angular-material-form-builder.min.css">
 
-  <link rel="stylesheet" href="styles/vendor.57a94b79.css">
+  <link rel="stylesheet" href="styles/vendor.c7054776.css">
 
   <link rel="stylesheet" href="styles/app.a5020095.css">
 
@@ -60,7 +60,7 @@
 
   <toasty></toasty>
 
-  <script src="scripts/vendor.1fe6f84b.js"></script>
+  <script src="scripts/vendor.894ce498.js"></script>
 
   <!-- ANGULAR-MATERIAL-FORM-BUILDER -->
   <script src="assets/plugins/angular-material-form-builder/dist/angular-material-form-builder.min.js"></script>
similarity index 62%
rename from public/scripts/vendor.1fe6f84b.js
rename to public/scripts/vendor.894ce498.js
index 4aebdbb..16ac934 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(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
+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.14",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={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:"-"},n=[];if(e.ctrlKey&&n.push("ctrl"),e.altKey&&n.push("alt"),e.shiftKey&&n.push("shift"),n.push(t[e.which]?t[e.which].toLowerCase():e.which),"shift-shift"===(n=n.sort().join("-").toLowerCase())||"ctrl-ctrl"===n||"alt-alt"===n)return null;var r,i,a=this.settings.core.keyboard;for(r in a)if(a.hasOwnProperty(r)&&("-"!==(i=r)&&"+"!==i&&(i=(i=i.replace("--","-MINUS").replace("+-","-MINUS").replace("++","-PLUS").replace("-+","-PLUS")).split(/-|\+/).sort().join("-").replace("MINUS","-").replace("PLUS","+").toLowerCase()),i===n))return a[r];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"),P(e.currentTarget).attr("tabindex","-1")}.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"),P(e.currentTarget).attr("tabindex","0")}.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,a=this.get_node(o,!0);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,o.id!==P.jstree.root?a.children(".jstree-anchor").attr("aria-busy",!0):a.attr("aria-busy",!0),a.addClass("jstree-loading"),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")),o.id!==P.jstree.root?n.children(".jstree-anchor").attr("aria-busy",!1):n.attr("aria-busy",!1),n.removeClass("jstree-loading"),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),r.onerror=function(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}.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","presentation"),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?t.ctrlKey||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):(t.ctrlKey&&(this._data.core.last_clicked=this.get_node(e)),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.is_selected(e)&&1===this._data.core.selected.length||(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").trigger("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.children(".jstree-anchor").attr("aria-selected",!0).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.children(".jstree-anchor").attr("aria-selected",!0).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.children(".jstree-anchor").attr("aria-selected",!1).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.children(".jstree-anchor").attr("aria-selected",!0).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.children(".jstree-anchor").attr("aria-selected",!0).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.children(".jstree-anchor").attr("aria-selected",!0).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.children(".jstree-anchor").attr("aria-selected",!1).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.delete_node=function(e){if(this.settings.checkbox.tie_selection||P.vakata.is_array(e))return c.delete_node(e);var t,n,r,i=!1;if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;for((t=e.children_d.concat([])).push(e.id),n=0,r=t.length;n<r;n++)if(this._model.data[t[n]].state.checked){i=!0;break}return i&&(this._data.checkbox.selected=P.vakata.array_filter(this._data.checkbox.selected,function(e){return-1===P.inArray(e,t)})),c.delete_node.call(this,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.children(".jstree-anchor").attr("aria-selected",!1).removeClass(a?"jstree-clicked":"jstree-checked")):t&&c.length===o.children.length?(o.state[a?"selected":"checked"]=t,s.push(o.id),u.children(".jstree-anchor").attr("aria-selected",!0).addClass(a?"jstree-clicked":"jstree-checked")):(o.state[a?"selected":"checked"]=!1,u.children(".jstree-anchor").attr("aria-selected",!1).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,blank_space_drop:!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&&!A.settings.dnd.blank_space_drop){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 this.ownerDocument&&/^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.toString():e.toString().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||"object"==typeof 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
similarity index 74%
rename from public/styles/vendor.57a94b79.css
rename to public/styles/vendor.c7054776.css
index e898b63..089c1ca 100644 (file)
@@ -4,7 +4,7 @@ table.dataTable{width:100%;margin:0 auto;clear:both;border-collapse:separate;bor
  * (c) 2015 Adam Shaw
  */.fc{direction:ltr;text-align:left}.fc-rtl{text-align:right}body .fc{font-size:1em}.fc-unthemed .fc-divider,.fc-unthemed .fc-popover,.fc-unthemed .fc-row,.fc-unthemed tbody,.fc-unthemed td,.fc-unthemed th,.fc-unthemed thead{border-color:#ddd}.fc-unthemed .fc-popover{background-color:#fff}.fc-unthemed .fc-divider,.fc-unthemed .fc-popover .fc-header{background:#eee}.fc-unthemed .fc-popover .fc-header .fc-close{color:#666}.fc-unthemed .fc-today{background:#fcf8e3}.fc-highlight{background:#bce8f1;opacity:.3}.fc-bgevent{background:#8fdf82;opacity:.3}.fc-nonbusiness{background:#d7d7d7}.fc-icon{display:inline-block;width:1em;height:1em;line-height:1em;font-size:1em;text-align:center;overflow:hidden;font-family:"Courier New",Courier,monospace}.fc-icon:after{position:relative;margin:0 -1em}.fc-icon-left-single-arrow:after{content:"\02039";font-weight:700;font-size:200%;top:-7%;left:3%}.fc-icon-right-single-arrow:after{content:"\0203A";font-weight:700;font-size:200%;top:-7%;left:-3%}.fc-icon-left-double-arrow:after{content:"\000AB";font-size:160%;top:-7%}.fc-icon-right-double-arrow:after{content:"\000BB";font-size:160%;top:-7%}.fc-icon-left-triangle:after{content:"\25C4";font-size:125%;top:3%;left:-2%}.fc-icon-right-triangle:after{content:"\25BA";font-size:125%;top:3%;left:2%}.fc-icon-down-triangle:after{content:"\25BC";font-size:125%;top:2%}.fc-icon-x:after{content:"\000D7";font-size:200%;top:6%}.fc button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;height:2.1em;padding:0 .6em;font-size:1em;white-space:nowrap;cursor:pointer}.fc button::-moz-focus-inner{margin:0;padding:0}.fc-state-default{border:1px solid}.fc-state-default.fc-corner-left{border-top-left-radius:4px;border-bottom-left-radius:4px}.fc-state-default.fc-corner-right{border-top-right-radius:4px;border-bottom-right-radius:4px}.fc button .fc-icon{position:relative;top:-.05em;margin:0 .2em;vertical-align:middle}.fc-state-default{background-color:#f5f5f5;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,.1) rgba(0,0,0,.1) rgba(0,0,0,.25);color:#333;text-shadow:0 1px 1px rgba(255,255,255,.75);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 2px rgba(0,0,0,.05)}.fc-state-active,.fc-state-disabled,.fc-state-down,.fc-state-hover{color:#333;background-color:#e6e6e6}.fc-state-hover{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.fc-state-active,.fc-state-down{background-color:#ccc;background-image:none;box-shadow:inset 0 2px 4px rgba(0,0,0,.15),0 1px 2px rgba(0,0,0,.05)}.fc-state-disabled{cursor:default;background-image:none;opacity:.65;box-shadow:none}.fc-button-group{display:inline-block}.fc .fc-button-group>*{float:left;margin:0 0 0 -1px}.fc .fc-button-group>:first-child{margin-left:0}.fc-popover{position:absolute;box-shadow:0 2px 6px rgba(0,0,0,.15)}.fc-popover .fc-header{padding:2px 4px}.fc-popover .fc-header .fc-title{margin:0 2px}.fc-popover .fc-header .fc-close{cursor:pointer}.fc-ltr .fc-popover .fc-header .fc-title,.fc-rtl .fc-popover .fc-header .fc-close{float:left}.fc-ltr .fc-popover .fc-header .fc-close,.fc-rtl .fc-popover .fc-header .fc-title{float:right}.fc-unthemed .fc-popover{border-width:1px;border-style:solid}.fc-unthemed .fc-popover .fc-header .fc-close{font-size:.9em;margin-top:2px}.fc-popover>.ui-widget-header+.ui-widget-content{border-top:0}.fc-divider{border-style:solid;border-width:1px}hr.fc-divider{height:0;margin:0;padding:0 0 2px;border-width:1px 0}.fc-clear{clear:both}.fc-bg,.fc-bgevent-skeleton,.fc-helper-skeleton,.fc-highlight-skeleton{position:absolute;top:0;left:0;right:0}.fc-bg{bottom:0}.fc-bg table{height:100%}.fc table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0;font-size:1em}.fc th{text-align:center}.fc td,.fc th{border-style:solid;border-width:1px;padding:0;vertical-align:top}.fc td.fc-today{border-style:double}.fc .fc-row{border-style:solid;border-width:0}.fc-row table{border-left:0 hidden transparent;border-right:0 hidden transparent;border-bottom:0 hidden transparent}.fc-row:first-child table{border-top:0 hidden transparent}.fc-row{position:relative}.fc-row .fc-bg{z-index:1}.fc-row .fc-bgevent-skeleton,.fc-row .fc-highlight-skeleton{bottom:0}.fc-row .fc-bgevent-skeleton table,.fc-row .fc-highlight-skeleton table{height:100%}.fc-row .fc-bgevent-skeleton td,.fc-row .fc-highlight-skeleton td{border-color:transparent}.fc-row .fc-bgevent-skeleton{z-index:2}.fc-row .fc-highlight-skeleton{z-index:3}.fc-row .fc-content-skeleton{position:relative;z-index:4;padding-bottom:2px}.fc-row .fc-helper-skeleton{z-index:5}.fc-row .fc-content-skeleton td,.fc-row .fc-helper-skeleton td{background:0 0;border-color:transparent;border-bottom:0}.fc-row .fc-content-skeleton tbody td,.fc-row .fc-helper-skeleton tbody td{border-top:0}.fc-scroller{overflow-y:scroll;overflow-x:hidden}.fc-scroller>*{position:relative;width:100%;overflow:hidden}.fc-event{position:relative;display:block;font-size:.85em;line-height:1.3;border-radius:3px;border:1px solid #3a87ad;background-color:#3a87ad;font-weight:400}.fc-event,.fc-event:hover,.ui-widget .fc-event{color:#fff;text-decoration:none}.fc-event.fc-draggable,.fc-event[href]{cursor:pointer}.fc-not-allowed,.fc-not-allowed .fc-event{cursor:not-allowed}.fc-event .fc-bg{z-index:1;background:#fff;opacity:.25}.fc-event .fc-content{position:relative;z-index:2}.fc-event .fc-resizer{position:absolute;z-index:3}.fc-ltr .fc-h-event.fc-not-start,.fc-rtl .fc-h-event.fc-not-end{margin-left:0;border-left-width:0;padding-left:1px;border-top-left-radius:0;border-bottom-left-radius:0}.fc-ltr .fc-h-event.fc-not-end,.fc-rtl .fc-h-event.fc-not-start{margin-right:0;border-right-width:0;padding-right:1px;border-top-right-radius:0;border-bottom-right-radius:0}.fc-h-event .fc-resizer{top:-1px;bottom:-1px;left:-1px;right:-1px;width:5px}.fc-ltr .fc-h-event .fc-start-resizer,.fc-ltr .fc-h-event .fc-start-resizer:after,.fc-ltr .fc-h-event .fc-start-resizer:before,.fc-rtl .fc-h-event .fc-end-resizer,.fc-rtl .fc-h-event .fc-end-resizer:after,.fc-rtl .fc-h-event .fc-end-resizer:before{right:auto;cursor:w-resize}.fc-ltr .fc-h-event .fc-end-resizer,.fc-ltr .fc-h-event .fc-end-resizer:after,.fc-ltr .fc-h-event .fc-end-resizer:before,.fc-rtl .fc-h-event .fc-start-resizer,.fc-rtl .fc-h-event .fc-start-resizer:after,.fc-rtl .fc-h-event .fc-start-resizer:before{left:auto;cursor:e-resize}.fc-day-grid-event{margin:1px 2px 0;padding:0 1px}.fc-day-grid-event .fc-content{white-space:nowrap;overflow:hidden}.fc-day-grid-event .fc-time{font-weight:700}.fc-day-grid-event .fc-resizer{left:-3px;right:-3px;width:7px}a.fc-more{margin:1px 3px;font-size:.85em;cursor:pointer;text-decoration:none}a.fc-more:hover{text-decoration:underline}.fc-limited{display:none}.fc-day-grid .fc-row{z-index:1}.fc-more-popover{z-index:2;width:220px}.fc-more-popover .fc-event-container{padding:10px}.fc-toolbar{text-align:center;margin-bottom:1em}.fc-toolbar .fc-left{float:left}.fc-toolbar .fc-right{float:right}.fc-toolbar .fc-center{display:inline-block}.fc .fc-toolbar>*>*{float:left;margin-left:.75em}.fc .fc-toolbar>*>:first-child{margin-left:0}.fc-toolbar h2{margin:0}.fc-toolbar button{position:relative}.fc-toolbar .fc-state-hover,.fc-toolbar .ui-state-hover{z-index:2}.fc-toolbar .fc-state-down{z-index:3}.fc-toolbar .fc-state-active,.fc-toolbar .ui-state-active{z-index:4}.fc-toolbar button:focus{z-index:5}.fc-view-container *,.fc-view-container :after,.fc-view-container :before{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.fc-view,.fc-view>table{position:relative;z-index:1}.fc-basicDay-view .fc-content-skeleton,.fc-basicWeek-view .fc-content-skeleton{padding-top:1px;padding-bottom:1em}.fc-basic-view .fc-body .fc-row{min-height:4em}.fc-row.fc-rigid{overflow:hidden}.fc-row.fc-rigid .fc-content-skeleton{position:absolute;top:0;left:0;right:0}.fc-basic-view .fc-day-number,.fc-basic-view .fc-week-number{padding:0 2px}.fc-basic-view td.fc-day-number,.fc-basic-view td.fc-week-number span{padding-top:2px;padding-bottom:2px}.fc-basic-view .fc-week-number{text-align:center}.fc-basic-view .fc-week-number span{display:inline-block;min-width:1.25em}.fc-ltr .fc-basic-view .fc-day-number{text-align:right}.fc-rtl .fc-basic-view .fc-day-number{text-align:left}.fc-day-number.fc-other-month{opacity:.3}.fc-agenda-view .fc-day-grid{position:relative;z-index:2}.fc-agenda-view .fc-day-grid .fc-row{min-height:3em}.fc-agenda-view .fc-day-grid .fc-row .fc-content-skeleton{padding-top:1px;padding-bottom:1em}.fc .fc-axis{vertical-align:middle;padding:0 4px;white-space:nowrap}.fc-ltr .fc-axis{text-align:right}.fc-rtl .fc-axis{text-align:left}.ui-widget td.fc-axis{font-weight:400}.fc-time-grid,.fc-time-grid-container{position:relative;z-index:1}.fc-time-grid{min-height:100%}.fc-time-grid table{border:0 hidden transparent}.fc-time-grid>.fc-bg{z-index:1}.fc-time-grid .fc-slats,.fc-time-grid>hr{position:relative;z-index:2}.fc-time-grid .fc-bgevent-skeleton,.fc-time-grid .fc-content-skeleton{position:absolute;top:0;left:0;right:0}.fc-time-grid .fc-bgevent-skeleton{z-index:3}.fc-time-grid .fc-highlight-skeleton{z-index:4}.fc-time-grid .fc-content-skeleton{z-index:5}.fc-time-grid .fc-helper-skeleton{z-index:6}.fc-time-grid .fc-slats td{height:1.5em;border-bottom:0}.fc-time-grid .fc-slats .fc-minor td{border-top-style:dotted}.fc-time-grid .fc-slats .ui-widget-content{background:0 0}.fc-time-grid .fc-highlight-container{position:relative}.fc-time-grid .fc-highlight{position:absolute;left:0;right:0}.fc-time-grid .fc-bgevent-container,.fc-time-grid .fc-event-container{position:relative}.fc-ltr .fc-time-grid .fc-event-container{margin:0 2.5% 0 2px}.fc-rtl .fc-time-grid .fc-event-container{margin:0 2px 0 2.5%}.fc-time-grid .fc-bgevent,.fc-time-grid .fc-event{position:absolute;z-index:1}.fc-time-grid .fc-bgevent{left:0;right:0}.fc-v-event.fc-not-start{border-top-width:0;padding-top:1px;border-top-left-radius:0;border-top-right-radius:0}.fc-v-event.fc-not-end{border-bottom-width:0;padding-bottom:1px;border-bottom-left-radius:0;border-bottom-right-radius:0}.fc-time-grid-event{overflow:hidden}.fc-time-grid-event .fc-time,.fc-time-grid-event .fc-title{padding:0 1px}.fc-time-grid-event .fc-time{font-size:.85em;white-space:nowrap}.fc-time-grid-event.fc-short .fc-content{white-space:nowrap}.fc-time-grid-event.fc-short .fc-time,.fc-time-grid-event.fc-short .fc-title{display:inline-block;vertical-align:top}.fc-time-grid-event.fc-short .fc-time span{display:none}.fc-time-grid-event.fc-short .fc-time:before{content:attr(data-start)}.fc-time-grid-event.fc-short .fc-time:after{content:"\000A0-\000A0"}.fc-time-grid-event.fc-short .fc-title{font-size:.85em;padding:0}.fc-time-grid-event .fc-resizer{left:0;right:0;bottom:0;height:8px;overflow:hidden;line-height:8px;font-size:11px;font-family:monospace;text-align:center;cursor:s-resize}.fc-time-grid-event .fc-resizer:after{content:"="}.angular-ui-tree-empty{border:1px dashed #bbb;min-height:100px;background-color:#e5e5e5;background-image:-webkit-linear-gradient(45deg,#fff 25%,transparent 25%,transparent 75%,#fff 75%,#fff),-webkit-linear-gradient(45deg,#fff 25%,transparent 25%,transparent 75%,#fff 75%,#fff);background-image:-moz-linear-gradient(45deg,#fff 25%,transparent 25%,transparent 75%,#fff 75%,#fff),-moz-linear-gradient(45deg,#fff 25%,transparent 25%,transparent 75%,#fff 75%,#fff);background-image:linear-gradient(45deg,#fff 25%,transparent 25%,transparent 75%,#fff 75%,#fff),linear-gradient(45deg,#fff 25%,transparent 25%,transparent 75%,#fff 75%,#fff);background-size:60px 60px;background-position:0 0,30px 30px}.angular-ui-tree-nodes{position:relative;margin:0;padding:0;list-style:none}.angular-ui-tree-nodes .angular-ui-tree-nodes{padding-left:20px}.angular-ui-tree-node,.angular-ui-tree-placeholder{position:relative;margin:0;padding:0;min-height:20px;line-height:20px}.angular-ui-tree-hidden{display:none}.angular-ui-tree-placeholder{margin:5px 0;padding:0;min-height:30px}.angular-ui-tree-handle{cursor:move;text-decoration:none;font-weight:700;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;min-height:20px;line-height:20px}.angular-ui-tree-drag{position:absolute;pointer-events:none;z-index:999;opacity:.8}.hljs{display:block;overflow-x:auto;padding:.5em;background:#f0f0f0;-webkit-text-size-adjust:none}.hljs,.hljs-subst,.hljs-tag .hljs-title,.nginx .hljs-title{color:#000}.apache .hljs-cbracket,.apache .hljs-tag,.asciidoc .hljs-header,.bash .hljs-variable,.coffeescript .hljs-attribute,.django .hljs-variable,.erlang_repl .hljs-function_or_atom,.haml .hljs-symbol,.hljs-addition,.hljs-constant,.hljs-flow,.hljs-name,.hljs-parent,.hljs-pragma,.hljs-preprocessor,.hljs-rule .hljs-value,.hljs-stream,.hljs-string,.hljs-tag .hljs-value,.hljs-template_tag,.hljs-title,.markdown .hljs-header,.pf .hljs-variable,.ruby .hljs-symbol,.ruby .hljs-symbol .hljs-string,.smalltalk .hljs-class,.tex .hljs-command,.tex .hljs-special,.tp .hljs-variable{color:#800}.asciidoc .hljs-blockquote,.diff .hljs-header,.hljs-annotation,.hljs-chunk,.hljs-comment,.markdown .hljs-blockquote,.smartquote{color:#888}.asciidoc .hljs-bullet,.asciidoc .hljs-link_url,.go .hljs-constant,.hljs-change,.hljs-date,.hljs-hexcolor,.hljs-literal,.hljs-number,.hljs-regexp,.lasso .hljs-variable,.makefile .hljs-variable,.markdown .hljs-bullet,.markdown .hljs-link_url,.smalltalk .hljs-char,.smalltalk .hljs-symbol{color:#080}.apache .hljs-sqbracket,.asciidoc .hljs-attribute,.asciidoc .hljs-link_label,.clojure .hljs-attribute,.coffeescript .hljs-property,.erlang_repl .hljs-reserved,.haml .hljs-bullet,.hljs-array,.hljs-attr_selector,.hljs-decorator,.hljs-deletion,.hljs-doctype,.hljs-envvar,.hljs-filter .hljs-argument,.hljs-important,.hljs-label,.hljs-localvars,.hljs-phony,.hljs-pi,.hljs-prompt,.hljs-pseudo,.hljs-shebang,.lasso .hljs-attribute,.markdown .hljs-link_label,.nginx .hljs-built_in,.ruby .hljs-string,.tex .hljs-formula,.vhdl .hljs-attribute{color:#88f}.apache .hljs-tag,.asciidoc .hljs-strong,.bash .hljs-variable,.css .hljs-tag,.hljs-built_in,.hljs-doctag,.hljs-id,.hljs-keyword,.hljs-request,.hljs-status,.hljs-title,.hljs-type,.hljs-typename,.hljs-winutils,.markdown .hljs-strong,.pf .hljs-variable,.smalltalk .hljs-class,.tex .hljs-command,.tp .hljs-data,.tp .hljs-io{font-weight:700}.asciidoc .hljs-emphasis,.markdown .hljs-emphasis,.tp .hljs-units{font-style:italic}.nginx .hljs-built_in{font-weight:400}.coffeescript .javascript,.javascript .xml,.lasso .markup,.tex .hljs-formula,.xml .css,.xml .hljs-cdata,.xml .javascript,.xml .vbscript{opacity:.5}.moment-picker{position:relative;display:inline-block}.moment-picker .moment-picker-contents{cursor:pointer}.moment-picker .moment-picker-container{color:#404040;min-width:15em;background:#fff;padding:4px;border:1px solid #f0f3f4;border-radius:4px;position:absolute;top:100%;margin-top:4px;margin-left:-.5em;box-shadow:0 2px 4px rgba(0,0,0,.075);z-index:5}.moment-picker .moment-picker-container:after,.moment-picker .moment-picker-container:before{content:'';display:block;width:0;height:0;border:8px solid transparent;border-top:none;position:absolute;top:-9px;left:15px}.moment-picker .moment-picker-container:before{border-bottom-color:#f0f3f4;border-width:9px}.moment-picker .moment-picker-container:after{border-bottom-color:#fff;margin-top:1px;margin-left:1px}.moment-picker table{border-collapse:collapse;border-spacing:0;width:100%;table-layout:fixed}.moment-picker th{font-weight:700}.moment-picker th:first-child,.moment-picker th:last-child{width:2em}.moment-picker td,.moment-picker th{padding:0;text-align:center;min-width:2em;height:2em;text-shadow:0 1px 0 rgba(255,255,255,.9);cursor:pointer;border-radius:4px}.moment-picker td:hover,.moment-picker th:hover{background:#fafbfb;background-image:-webkit-linear-gradient(#f0f3f4,#fafbfb);background-image:-moz-linear-gradient(#f0f3f4,#fafbfb);background-image:-ms-linear-gradient(#f0f3f4,#fafbfb);background-image:-o-linear-gradient(#f0f3f4,#fafbfb);background-image:linear-gradient(#f0f3f4,#fafbfb)}.moment-picker td.selected{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,.3);border-color:#3ca0dd;background:#45b1e8;background-image:-webkit-linear-gradient(#45b1e8,#3097de);background-image:-moz-linear-gradient(#45b1e8,#3097de);background-image:-ms-linear-gradient(#45b1e8,#3097de);background-image:-o-linear-gradient(#45b1e8,#3097de);background-image:linear-gradient(#45b1e8,#3097de)}.moment-picker td.disabled,.moment-picker td.disabled:hover,.moment-picker th.disabled,.moment-picker th.disabled:hover{color:#abbbc7;background:0 0;cursor:default}.moment-picker .year-view td{height:3.4em}.moment-picker .month-view .moment-picker-specific-views th{background:0 0;cursor:default}.moment-picker .month-view td{width:2.1428571429em}.moment-picker .day-view td,.moment-picker .hour-view td{height:2.3333333333em}.moment-picker .minute-view td{height:1.8em}md-backdrop.md-edit-dialog-backdrop{z-index:80}md-edit-dialog{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;position:fixed;z-index:81;background-color:#f9f9f9;border-radius:2px;cursor:default}md-edit-dialog>.md-content{padding:16px 24px 0}md-edit-dialog>.md-content .md-title{color:rgba(0,0,0,.87);margin-bottom:8px}md-edit-dialog>.md-content md-input-container{margin:0;font-size:13px}md-edit-dialog>.md-content md-input-container input{float:none}md-edit-dialog>.md-content md-input-container .md-errors-spacer{min-height:auto;min-width:auto;color:rgba(0,0,0,.54)}md-edit-dialog>.md-content md-input-container .md-errors-spacer .md-char-counter{padding:5px 2px 5px 0}md-edit-dialog>.md-content md-input-container [ng-message]{padding:5px 0 5px 2px}md-edit-dialog>.md-actions{margin:0 16px 8px}md-edit-dialog>.md-actions .md-button{margin:0;min-width:initial}md-edit-dialog>.md-actions .md-button+.md-button{margin-left:8px}.md-table-pagination{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;-webkit-flex-wrap:wrap-reverse;-ms-flex-wrap:wrap-reverse;flex-wrap:wrap-reverse;box-sizing:border-box;padding:0 24px;font-size:12px;color:rgba(0,0,0,.54);border-top:1px rgba(0,0,0,.12) solid}.md-table-pagination md-select{-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;min-width:64px}.md-table-pagination md-select:not([disabled]):focus .md-select-value{color:rgba(0,0,0,.54)}.md-table-pagination md-select .md-select-value{-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}.md-table-pagination md-select .md-select-value span.md-select-icon{-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center;margin-right:-6px!important}.md-table-pagination md-select .md-select-value span.md-select-icon:after{top:initial;-webkit-transform:scaleY(.5) scaleX(1);transform:scaleY(.5) scaleX(1)}.md-table-pagination>*{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:56px}.md-table-pagination>.buttons:not(:first-child),.md-table-pagination>.limit-select:not(:first-child){margin-left:32px}.md-table-pagination>.buttons{margin-right:-16px}.md-table-pagination>.buttons>.md-button.md-icon-button{margin:0}.md-table-pagination>.buttons>.label+.md-button.md-icon-button{margin-left:20px}md-select.md-table-select{margin:0}md-select.md-table-select>.md-select-value{padding:0;min-width:0;min-height:24px;border-bottom:0!important}md-select.md-table-select>.md-select-value>span{display:block;height:auto;-webkit-transform:none!important;transform:none!important}md-select.md-table-select>.md-select-value>span>.md-text{display:inherit;height:inherit;-webkit-transform:inherit;transform:inherit}md-select.md-table-select>.md-select-value>span.md-select-icon{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:24px;margin:0}md-select.md-table-select>.md-select-value>span.md-select-icon:after{top:initial}.md-select-menu-container.md-pagination-select,.md-select-menu-container.md-table-select{margin-left:-2px;border-radius:2px}.md-select-menu-container.md-pagination-select md-content,.md-select-menu-container.md-pagination-select md-select-menu,.md-select-menu-container.md-table-select md-content,.md-select-menu-container.md-table-select md-select-menu{border-radius:inherit}.md-select-menu-container.md-pagination-select md-content,.md-select-menu-container.md-table-select md-content{padding:0}.md-select-menu-container.md-table-select .md-text{font-size:13px}.md-select-menu-container.md-pagination-select .md-text{font-size:12px}md-toolbar.md-table-toolbar{box-shadow:none}md-toolbar.md-table-toolbar.md-default-theme:not(.md-menu-toolbar).md-default,md-toolbar.md-table-toolbar:not(.md-menu-toolbar).md-default{background-color:#fff;color:rgba(0,0,0,.87)}md-toolbar.md-table-toolbar.md-default-theme:not(.md-menu-toolbar).md-default .md-button,md-toolbar.md-table-toolbar:not(.md-menu-toolbar).md-default .md-button{color:rgba(0,0,0,.87)}@media only screen and (max-width:959px) and (min-width:0) and (orientation:landscape){md-toolbar.md-table-toolbar .md-toolbar-tools{height:64px;max-height:initial}}md-toolbar.md-table-toolbar .md-toolbar-tools{padding:0 24px}md-toolbar.md-table-toolbar .md-toolbar-tools md-icon{color:rgba(0,0,0,.54)}md-toolbar.md-table-toolbar .md-toolbar-tools>.md-button.md-icon-button{margin:0}md-toolbar.md-table-toolbar .md-toolbar-tools>.md-button.md-icon-button:first-child{margin-left:-12px}md-toolbar.md-table-toolbar .md-toolbar-tools>.md-button.md-icon-button:last-child{margin-right:-12px}md-card>md-table-container:first-child,md-card>md-toolbar.md-table-toolbar:first-child{border-top-left-radius:2px;border-top-right-radius:2px}md-card>md-table-container:last-child,md-card>md-toolbar.md-table-toolbar:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}md-table-container{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}table.md-table{width:100%;border-spacing:0;overflow:hidden}table.md-table thead.md-head>tr.md-row{height:56px}table.md-table tbody.md-body>tr.md-row,table.md-table tfoot.md-foot>tr.md-row{height:48px}table.md-table thead.md-head+.md-table-progress md-progress-linear{top:-3px}table.md-table .md-table-progress th{padding:0}table.md-table .md-table-progress th md-progress-linear{height:0;transition:opacity 1s}table.md-table .md-table-progress th md-progress-linear.ng-hide{opacity:0}table.md-table .md-table-progress th md-progress-linear>.md-container{height:3px;top:0;transition:none}table.md-table .md-table-progress th md-progress-linear>.md-container>.md-bar{height:3px}table.md-table th.md-column{color:rgba(0,0,0,.54);font-size:12px;font-weight:700;white-space:nowrap}table.md-table th.md-column.md-sort{cursor:pointer}table.md-table th.md-column md-icon{height:16px;width:16px;font-size:16px!important;line-height:16px!important}table.md-table th.md-column md-icon.md-sort-icon{color:rgba(0,0,0,.26);opacity:0;transition:-webkit-transform .25s,opacity .25s;transition:transform .25s,opacity .25s}table.md-table th.md-column md-icon.md-sort-icon.md-asc{-webkit-transform:rotate(0);transform:rotate(0)}table.md-table th.md-column md-icon.md-sort-icon.md-desc{-webkit-transform:rotate(180deg);transform:rotate(180deg)}table.md-table th.md-column md-icon:not(:first-child){margin-left:8px}table.md-table th.md-column md-icon:not(:last-child){margin-right:8px}table.md-table th.md-column.md-active,table.md-table th.md-column.md-active md-icon{color:rgba(0,0,0,.87)}table.md-table th.md-column.md-active md-icon.md-sort-icon,table.md-table th.md-column:hover md-icon.md-sort-icon{opacity:1}table.md-table tr.md-row[data-ng-repeat].ng-leave,table.md-table tr.md-row[ng-repeat].ng-leave,table.md-table tr.md-row[ng\:repeat].ng-leave,table.md-table tr.md-row[x-ng-repeat].ng-leave{display:none}table.md-table.md-row-select tbody.md-body>tr.md-row{transition:background-color .2s}table.md-table.md-row-select tbody.md-body>tr.md-row:not([disabled]):hover{background-color:#eee!important}table.md-table.md-row-select tbody.md-body>tr.md-row.md-selected{background-color:#f5f5f5}table.md-table.md-row-select td.md-cell:first-child,table.md-table.md-row-select th.md-column:first-child{width:20px;padding:0 0 0 24px}table.md-table.md-row-select td.md-cell:nth-child(2),table.md-table.md-row-select th.md-column:nth-child(2){padding:0 24px}table.md-table.md-row-select td.md-cell:nth-child(n+3):nth-last-child(n+2),table.md-table.md-row-select th.md-column:nth-child(n+3):nth-last-child(n+2){padding:0 56px 0 0}table.md-table:not(.md-row-select) td.md-cell:first-child,table.md-table:not(.md-row-select) th.md-column:first-child{padding:0 24px}table.md-table:not(.md-row-select) td.md-cell:nth-child(n+2):nth-last-child(n+2),table.md-table:not(.md-row-select) th.md-column:nth-child(n+2):nth-last-child(n+2){padding:0 56px 0 0}table.md-table td.md-cell,table.md-table th.md-column{vertical-align:middle;text-align:left}table.md-table td.md-cell>*,table.md-table th.md-column>*{vertical-align:middle}table.md-table td.md-cell:last-child,table.md-table th.md-column:last-child{padding:0 24px 0 0}table.md-table td.md-cell.md-clickable,table.md-table th.md-column.md-clickable{cursor:pointer}table.md-table td.md-cell.md-clickable:focus,table.md-table th.md-column.md-clickable:focus{outline:0}table.md-table td.md-cell.md-numeric,table.md-table th.md-column.md-numeric{text-align:right}table.md-table td.md-cell md-checkbox,table.md-table th.md-column md-checkbox{margin:0;width:20px}table.md-table td.md-cell{color:rgba(0,0,0,.87);font-size:13px;border-top:1px rgba(0,0,0,.12) solid}table.md-table td.md-cell.md-numeric md-select{-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}table.md-table td.md-cell.md-numeric md-select .md-select-value{-webkit-flex:0 0 auto;-ms-flex:0 0 auto;flex:0 0 auto}table.md-table td.md-cell.md-placeholder{color:rgba(0,0,0,.26)}table.md-table td.md-cell md-select>.md-select-value>span.md-select-icon{-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end;color:rgba(0,0,0,.54);width:18px;text-align:right}table.md-table td.md-cell md-select>.md-select-value>span.md-select-icon:after{-webkit-transform:scaleY(.4) scaleX(.8);transform:scaleY(.4) scaleX(.8)}/*!
  * angular-toasty
- */@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url(data:font/ttf;base64,AAEAAAASAQAABAAgR0RFRgUwBPIAAHGoAAAATEdQT1PO9uRJAABx9AAADQ5HU1VClCaeUgAAfwQAAACIT1MvMqCnsaYAAGkIAAAAYGNtYXDigyFaAABqUAAAAzhjdnQgJEEG5QAAcCAAAABMZnBnbWf0XKsAAG2IAAABvGdhc3AACAATAABxnAAAAAxnbHlmCBgu+gAAASwAAGImaGRteAQC+OIAAGloAAAA6GhlYWT4RqsOAABlNAAAADZoaGVhCroGfQAAaOQAAAAkaG10eIFaUZ8AAGVsAAADdmxvY2E6/CGoAABjdAAAAb5tYXhwAw4C+QAAY1QAAAAgbmFtZRBvLKkAAHBsAAABEHBvc3T/bQBkAABxfAAAACBwcmVwdKCP7AAAb0QAAADbAAUAZAAAAygFsAADAAYACQAMAA8AcbIMEBEREjmwDBCwANCwDBCwBtCwDBCwCdCwDBCwDdAAsABFWLACLxuxAhw+WbAARViwAC8bsQAQPlmyBAIAERI5sgUCABESObIHAgAREjmyCAIAERI5sQoM9LIMAgAREjmyDQIAERI5sAIQsQ4M9DAxISERIQMRAQERAQMhATUBIQMo/TwCxDb+7v66AQzkAgP+/gEC/f0FsPqkBQf9fQJ3+xECeP1eAl6IAl4AAgCg//UBewWwAAMADAAvALAARViwAi8bsQIcPlmwAEVYsAsvG7ELED5ZsgYFCitYIdgb9FmyAQYCERI5MDEBIwMzAzQ2MhYUBiImAVunDcLJN2w4OGw3AZsEFfqtLT09Wjs7AAIAiAQSAiMGAAAEAAkAGQCwAy+yAgoDERI5sAIvsAfQsAMQsAjQMDEBAyMTMwUDIxMzARUebwGMAQ4ebwGMBXj+mgHuiP6aAe4AAgB3AAAE0wWwABsAHwCPALAARViwDC8bsQwcPlmwAEVYsBAvG7EQHD5ZsABFWLACLxuxAhA+WbAARViwGi8bsRoQPlmyHQwCERI5fLAdLxiyAAMKK1gh2Bv0WbAE0LAdELAG0LAdELAL0LALL7IIAworWCHYG/RZsAsQsA7QsAsQsBLQsAgQsBTQsB0QsBbQsAAQsBjQsAgQsB7QMDEBIQMjEyM1IRMhNSETMwMhEzMDMxUjAzMVIwMjAyETIQL9/vhQj1DvAQlF/v4BHVKPUgEIUpBSzOdF4ftQkJ4BCEX++AGa/mYBmokBYosBoP5gAaD+YIv+non+ZgIjAWIAAAEAbv8wBBEGnAArAGYAsABFWLAJLxuxCRw+WbAARViwIi8bsSIQPlmyAiIJERI5sAkQsAzQsAkQsBDQsAkQshMBCitYIdgb9FmwAhCyGQEKK1gh2Bv0WbAiELAf0LAiELAm0LAiELIpAQorWCHYG/RZMDEBNCYnJiY1NDY3NTMVFhYVIzQmIyIGFRQWBBYWFRQGBxUjNSYmNTMUFjMyNgNYgZnVw7+nlai7uIZyd36FATGrUcu3lLrTuZKGg5YBd1x+M0HRoaTSFNvcF+zNjaZ7bmZ5Y3eeaqnOE7+/EefGi5Z+AAUAaf/rBYMFxQANABoAJgA0ADgAeACwAEVYsAMvG7EDHD5ZsABFWLAjLxuxIxA+WbADELAK0LAKL7IRBAorWCHYG/RZsAMQshgECitYIdgb9FmwIxCwHdCwHS+wIxCyKgQKK1gh2Bv0WbAdELIxBAorWCHYG/RZsjUjAxESObA1L7I3AyMREjmwNy8wMRM0NjMyFhUVFAYjIiY1FxQWMzI2NTU0JiIGFQE0NiAWFRUUBiAmNRcUFjMyNjU1NCYjIgYVBScBF2mng4Wlp4GCqopYSkdXVpRWAjunAQaop/78qopYSkhWV0lHWf4HaQLHaQSYg6qriEeEp6eLB05lYlVJTmZmUvzRg6moi0eDqaeLBk9lY1VKT2RjVPNCBHJCAAMAZf/sBPMFxAAeACcAMwCFALAARViwCS8bsQkcPlmwAEVYsBwvG7EcED5ZsABFWLAYLxuxGBA+WbIiHAkREjmyKgkcERI5sgMiKhESObIQKiIREjmyEQkcERI5shMcCRESObIZHAkREjmyFhEZERI5sBwQsh8BCitYIdgb9FmyIR8RERI5sAkQsjEBCitYIdgb9FkwMRM0NjcmJjU0NjMyFhUUBgcHATY1MxQHFyMnBgYjIiQFMjcBBwYVFBYDFBc3NjY1NCYjIgZldaVhQsSolsRZb2sBRESne9DeYUrHZ9X+/gHXk3r+nSGnmSJ2dkQyZExSYAGHabB1dpBHpryvhViVUk/+fYKf/6j5c0JF4ktwAakYe4J2jgPlYJBTMFc+Q1lvAAEAZwQhAP0GAAAEABAAsAMvsgIFAxESObACLzAxEwMjEzP9FYEBlQWR/pAB3wABAIX+KgKVBmsAEQAJALAOL7AELzAxEzQSEjcXBgIDBxATFhcHJicChXnwgSaSuwkBjVV1JoV57AJP4gGgAVRGenD+NP7jVf5+/uSqYHFKrgFUAAABACb+KgI3BmsAEQAJALAOL7AELzAxARQCAgcnNhITNTQCAic3FhISAjd18YQnmrsCWJ1iJ4TvdwJF3/5n/qZJcXYB8QEvINIBaQEeUHFJ/qr+ZAABABwCYQNVBbAADgAgALAARViwBC8bsQQcPlmwANAZsAAvGLAJ0BmwCS8YMDEBJTcFAzMDJRcFEwcDAycBSv7SLgEuCZkKASku/s3GfLq0fQPXWpdwAVj+o26YW/7xXgEg/udbAAABAE4AkgQ0BLYACwAaALAJL7AA0LAJELIGAQorWCHYG/RZsAPQMDEBIRUhESMRITUhETMCngGW/mq6/moBlroDDa/+NAHMrwGpAAEAHf7eATQA2wAIABcAsAkvsgQFCitYIdgb9FmwANCwAC8wMRMnNjc1MxUUBoZpXgS1Y/7eSIOLp5FlygAAAQAlAh8CDQK2AAMAEQCwAi+yAQEKK1gh2Bv0WTAxASE1IQIN/hgB6AIflwABAJD/9QF2ANEACQAbALAARViwBy8bsQcQPlmyAgUKK1gh2Bv0WTAxNzQ2MhYVFAYiJpA5cjs7cjlhMEBAMC4+PgABABL/gwMQBbAAAwATALAAL7AARViwAi8bsQIcPlkwMRcjATOxnwJgnn0GLQAAAgBz/+wECgXEAA0AGwA5ALAARViwCi8bsQocPlmwAEVYsAMvG7EDED5ZsAoQshEBCitYIdgb9FmwAxCyGAEKK1gh2Bv0WTAxARACIyICAzUQEjMyEhMnNCYjIgYHERQWMzI2NwQK3uzp4ATe7eveA7mEj46CAomLiYUDAm3+u/7EATUBM/cBQQE4/tP+xg3r19be/tjs4dTkAAEAqgAAAtkFtwAGADkAsABFWLAFLxuxBRw+WbAARViwAC8bsQAQPlmyBAAFERI5sAQvsgMBCitYIdgb9FmyAgMFERI5MDEhIxEFNSUzAtm6/osCEh0E0YmoxwAAAQBdAAAEMwXEABcATQCwAEVYsBAvG7EQHD5ZsABFWLAALxuxABA+WbIXAQorWCHYG/RZsALQsgMQFxESObAQELIJAQorWCHYG/RZsBAQsAzQshUXEBESOTAxISE1ATY2NTQmIyIGFSM0JDMyFhUUAQEhBDP8RgH4cFWKc4qZuQED2cvs/u7+egLbhQIwf59VcpKdjMn41bHX/tf+WQABAF7/7AP5BcQAJgB4ALAARViwDS8bsQ0cPlmwAEVYsBkvG7EZED5ZsgANGRESObAAL7LPAAFdsp8AAXGyLwABXbJfAAFysA0QsgYBCitYIdgb9FmwDRCwCdCwABCyJgEKK1gh2Bv0WbITJgAREjmwGRCwHNCwGRCyHwEKK1gh2Bv0WTAxATM2NjUQIyIGFSM0NjMyFhUUBgcWFhUUBCAkNTMUFjMyNjU0JicjAYaLg5b/eI+5/cPO6ntqeIP/AP5m/v+6ln6GjpyTiwMyAoZyAQCJca3l2sJfsiwmsH/E5t62c4qMg3+IAgACADUAAARQBbAACgAOAEkAsABFWLAJLxuxCRw+WbAARViwBC8bsQQQPlmyAQkEERI5sAEvsgIBCitYIdgb9FmwBtCwARCwC9CyCAYLERI5sg0JBBESOTAxATMVIxEjESE1ATMBIREHA4bKyrr9aQKMxf2BAcUWAemX/q4BUm0D8fw5AsooAAEAmv/sBC0FsAAdAGEAsABFWLABLxuxARw+WbAARViwDS8bsQ0QPlmwARCyBAEKK1gh2Bv0WbIHDQEREjmwBy+yGgEKK1gh2Bv0WbIFBxoREjmwDRCwEdCwDRCyFAEKK1gh2Bv0WbAHELAd0DAxExMhFSEDNjMyEhUUAiMiJiczFhYzMjY1NCYjIgcHzkoC6v2zLGuIx+rz2sH0Ea8RkHaBk5+EeUUxAtoC1qv+cz/++eDh/v3WvX1/sJuSsTUoAAIAhP/sBBwFsQAUACEATgCwAEVYsAAvG7EAHD5ZsABFWLANLxuxDRA+WbAAELIBAQorWCHYG/RZsgcNABESObAHL7IVAQorWCHYG/RZsA0QshwBCitYIdgb9FkwMQEVIwYEBzYzMhIVFAIjIgA1NRAAJQMiBgcVFBYzMjY1NCYDTyLY/wAUc8e+4/XO0f78AVcBU9JfoB+ieX2PkQWxnQT44YT+9NTh/vIBQf1HAZIBqQX9cHJWRLTcuJWWuQABAE0AAAQlBbAABgAyALAARViwBS8bsQUcPlmwAEVYsAEvG7EBED5ZsAUQsgMBCitYIdgb9FmyAAMFERI5MDEBASMBITUhBCX9pcICWfzsA9gFSPq4BRiYAAADAHD/7AQOBcQAFwAhACsAYQCwAEVYsBUvG7EVHD5ZsABFWLAJLxuxCRA+WbInCRUREjmwJy+yzycBXbIaAQorWCHYG/RZsgMaJxESObIPJxoREjmwCRCyHwEKK1gh2Bv0WbAVELIiAQorWCHYG/RZMDEBFAYHFhYVFAYjIiY1NDY3JiY1NDYzMhYDNCYiBhQWMzI2ASIGFRQWMjY0JgPsc2Jyhf/Q0v2BcmFw7MHA7Zeb+peTg4KU/upth4XehYoENG2qMDG8d73g4bx2vjEwqmy42Nj8oXqamPiOjwQah3RviYnejAAAAgBk//8D+AXEABcAJABYALAARViwCy8bsQscPlmwAEVYsBMvG7ETED5ZsgMTCxESObADL7IAAwsREjmwExCyFAEKK1gh2Bv0WbADELIYAQorWCHYG/RZsAsQsh8BCitYIdgb9FkwMQEGBiMiJiY1NDY2MzISERUQAAUjNTM2NiUyNjc1NCYjIgYVFBYDPjqhYH67Zm/MiNj5/rD+rSQn5fb+7l2dJJ55epSPAoBFVHzhiJLqfP69/uk2/lf+eQWcBOf6clRKtuS7mZXBAP//AIb/9QFtBEQAJgAS9gABBwAS//cDcwAQALAARViwDS8bsQ0YPlkwMf//ACn+3gFVBEQAJwAS/98DcwEGABAMAAAQALAARViwAy8bsQMYPlkwMQABAEgAwwN6BEoABgAWALAARViwBS8bsQUYPlmwAtCwAi8wMQEFFQE1ARUBCAJy/M4DMgKE/cQBe5IBesQAAAIAmAGPA9oDzwADAAcAJQCwBy+wA9CwAy+yAAEKK1gh2Bv0WbAHELIEAQorWCHYG/RZMDEBITUhESE1IQPa/L4DQvy+A0IDLqH9wKAAAAEAhgDEA9wESwAGABYAsABFWLACLxuxAhg+WbAF0LAFLzAxAQE1ARUBNQMb/WsDVvyqAooBA77+hpL+hcAAAgBL//UDdgXEABgAIQBRALAARViwEC8bsRAcPlmwAEVYsCAvG7EgED5ZshsFCitYIdgb9FmyABsQERI5sgQQABESObAQELIJAQorWCHYG/RZsBAQsAzQshUAEBESOTAxATY2Nzc2NTQmIyIGFSM2NjMyFhUUBwcGFQM0NjIWFAYiJgFlAjJNg1RuaWZ8uQLjtr3Tom1JwTdsODhsNwGad4pUh19taXdsW6LHy7GvqmxRmP7DLT09Wjs7AAACAGr+OwbWBZcANQBCAGgAsDIvsABFWLAILxuxCBA+WbAD0LIPMggREjmwDy+yBQgPERI5sAgQsjkCCitYIdgb9FmwFdCwMhCyGwIKK1gh2Bv0WbAIELAq0LAqL7IjAgorWCHYG/RZsA8QskACCitYIdgb9FkwMQEGAiMiJwYGIyImNzYSNjMyFhcDBjMyNjcSACEiBAIHBhIEMzI2NxcGBiMiJAITEhIkMzIEEgEGFjMyNjc3EyYjIgYGygzYtbs1NotKjpITD3m/aVGAUDQTk3GMBhP+uf6yyf7ItAsMkAEn0Vq1PCU+zWn6/pizDAzeAXzv+QFkrvvyDlFYPG8kAS44QHWZAfby/uioVVPozaUBA5QrP/3W5+C0AYUBmMf+iPb4/pPBLCNzJzLhAacBGwETAbfv4P5a/pCOmGZfCQH3He4AAAIAHAAABR0FsAAHAAoARgCwAEVYsAQvG7EEHD5ZsABFWLACLxuxAhA+WbAARViwBi8bsQYQPlmyCQQCERI5sAkvsgABCitYIdgb9FmyCgQCERI5MDEBIQMjATMBIwEhAwPN/Z6JxgIsqAItxf1NAe/4AXz+hAWw+lACGgKpAAMAqQAABIgFsAAOABYAHwBVALAARViwAS8bsQEcPlmwAEVYsAAvG7EAED5ZshcAARESObAXL7IPAQorWCHYG/RZsggPFxESObAAELIQAQorWCHYG/RZsAEQsh8BCitYIdgb9FkwMTMRITIWFRQGBxYWFRQGIwERITI2NRAhJSEyNjU0JiMhqQHc7e90ZHaJ/uj+xwE9hpv+4v7AASJ+l4yP/uQFsMTAZp0rIbmAxOACqf30i3oBB5p+bHhtAAABAHf/7ATYBcQAHABFALAARViwCy8bsQscPlmwAEVYsAMvG7EDED5ZsAsQsA/QsAsQshIBCitYIdgb9FmwAxCyGQEKK1gh2Bv0WbADELAc0DAxAQYEIyAAETU0EiQzMgAXIyYmIyICFRUUEjMyNjcE2Bv+4e7+/v7JkQEKr+gBGBfBGaeWuNHGsqCrHAHO5/sBcgE2jMsBNKX+/eWunP7w+43t/uiRtAACAKkAAATGBbAACwAVADkAsABFWLABLxuxARw+WbAARViwAC8bsQAQPlmwARCyDAEKK1gh2Bv0WbAAELINAQorWCHYG/RZMDEzESEyBBIXFRQCBAcDETMyEjU1NAInqQGbvgEknwGf/tnE08re9+nWBbCo/srJXc7+yqYCBRL7iwEU/1X4ARMCAAABAKkAAARGBbAACwBOALAARViwBi8bsQYcPlmwAEVYsAQvG7EEED5ZsgsEBhESObALL7IAAQorWCHYG/RZsAQQsgIBCitYIdgb9FmwBhCyCAEKK1gh2Bv0WTAxASERIRUhESEVIREhA+D9iQLd/GMDk/0tAncCof38nQWwnv4sAAEAqQAABC8FsAAJAEAAsABFWLAELxuxBBw+WbAARViwAi8bsQIQPlmyCQIEERI5sAkvsgABCitYIdgb9FmwBBCyBgEKK1gh2Bv0WTAxASERIxEhFSERIQPM/Z3AA4b9OgJjAoP9fQWwnv4OAAEAev/sBNwFxAAfAGIAsABFWLALLxuxCxw+WbAARViwAy8bsQMQPlmwCxCwD9CwCxCyEQEKK1gh2Bv0WbADELIYAQorWCHYG/RZsh4DCxESObAeL7QPHh8eAl20Px5PHgJdsh0BCitYIdgb9FkwMSUGBCMiJAInNRAAITIEFyMCISICAxUUEjMyNjcRITUhBNxK/vewsv7slwIBMwEW5AEWH8A2/t7BxwHgv2yiNf6vAhC/ammnATTLfwFJAWrp1gEh/vH+/3f1/t8wOQFHnAABAKkAAAUIBbAACwBVALAARViwBi8bsQYcPlmwAEVYsAovG7EKHD5ZsABFWLAALxuxABA+WbAARViwBC8bsQQQPlmwABCwCdCwCS+ynwkBcrIvCQFdsgIBCitYIdgb9FkwMSEjESERIxEzESERMwUIwf0iwMAC3sECof1fBbD9jgJyAAABALcAAAF3BbAAAwAdALAARViwAi8bsQIcPlmwAEVYsAAvG7EAED5ZMDEhIxEzAXfAwAWwAAABADX/7APMBbAADwAuALAARViwAC8bsQAcPlmwAEVYsAUvG7EFED5ZsAnQsAUQsgwBCitYIdgb9FkwMQEzERQGIyImNTMUFjMyNjcDC8H70dnywImCd5MBBbD7+dHs3sh9jJaHAAABAKkAAAUFBbAACwB0ALAARViwBS8bsQUcPlmwAEVYsAcvG7EHHD5ZsABFWLACLxuxAhA+WbAARViwCy8bsQsQPlmyAAIFERI5QBFKAFoAagB6AIoAmgCqALoACF2yOQABXbIGBQIREjlAEzYGRgZWBmYGdgaGBpYGpga2BgldMDEBBxEjETMRATMBASMCG7LAwAKH6P3DAmrmAqW5/hQFsP0wAtD9ffzTAAEAqQAABBwFsAAFACgAsABFWLAELxuxBBw+WbAARViwAi8bsQIQPlmyAAEKK1gh2Bv0WTAxJSEVIREzAWoCsvyNwZ2dBbAAAAEAqQAABlIFsAAOAFkAsABFWLAALxuxABw+WbAARViwAi8bsQIcPlmwAEVYsAQvG7EEED5ZsABFWLAILxuxCBA+WbAARViwDC8bsQwQPlmyAQAEERI5sgcABBESObIKAAQREjkwMQkCMxEjERMBIwETESMRAaEB3AHc+cAS/iKT/iMTwAWw+1wEpPpQAjcCZPtlBJj9n/3JBbAAAAEAqQAABQgFsAAJAEyyAQoLERI5ALAARViwBS8bsQUcPlmwAEVYsAgvG7EIHD5ZsABFWLAALxuxABA+WbAARViwAy8bsQMQPlmyAgUAERI5sgcFABESOTAxISMBESMRMwERMwUIwf0jwcEC378EYvueBbD7mQRnAAIAdv/sBQkFxAARAB8AOQCwAEVYsA0vG7ENHD5ZsABFWLAELxuxBBA+WbANELIVAQorWCHYG/RZsAQQshwBCitYIdgb9FkwMQEUAgQjIiQCJzU0EiQzMgQSFScQAiMiAgcVFBIzMhI3BQmQ/viwrP72kwKSAQusrwELkL/Qu7bRA9O5uswDAqnW/sGoqQE5zmnSAUKrqf6/1QIBAwEV/uv2a/v+4QEP/QAAAgCpAAAEwAWwAAoAEwBNsgoUFRESObAKELAM0ACwAEVYsAMvG7EDHD5ZsABFWLABLxuxARA+WbILAwEREjmwCy+yAAEKK1gh2Bv0WbADELISAQorWCHYG/RZMDEBESMRITIEFRQEIyUhMjY1NCYnIQFpwAIZ7wEP/vf3/qkBWZqkpI/+nAI6/cYFsPTJ1OWdkYmCnAMAAgBt/woFBgXEABUAIgBNsggjJBESObAIELAZ0ACwAEVYsBEvG7ERHD5ZsABFWLAILxuxCBA+WbIDCBEREjmwERCyGQEKK1gh2Bv0WbAIELIgAQorWCHYG/RZMDEBFAIHBQclBiMiJAInNTQSJDMyBBIVJxACIyICBxUUEiASNwUBhnkBBIP+zUhQrP72kwKSAQussAELkMDNvrXRA9EBdMwDAqnT/s9WzHn0EqkBOc5p0gFCq6r+wdUBAQEBF/7r9mv6/uABD/0AAAIAqAAABMkFsAAOABcAYbIFGBkREjmwBRCwFtAAsABFWLAELxuxBBw+WbAARViwAi8bsQIQPlmwAEVYsA0vG7ENED5ZshAEAhESObAQL7IAAQorWCHYG/RZsgsABBESObAEELIWAQorWCHYG/RZMDEBIREjESEyBBUUBgcBFSMBITI2NTQmJyECv/6qwQHi9gEJk4MBVs79bgEnj6mhmP7aAk39swWw4NaIyjL9lgwC6pR8h5ABAAABAFD/7ARyBcQAJgBhsgAnKBESOQCwAEVYsAYvG7EGHD5ZsABFWLAaLxuxGhA+WbAGELAL0LAGELIOAQorWCHYG/RZsiYaBhESObAmELIUAQorWCHYG/RZsBoQsB/QsBoQsiIBCitYIdgb9FkwMQEmJjU0JDMyFhYVIzQmIyIGFRQWBBYWFRQEIyIkJjUzFBYzMjY0JgJW9+EBE9yW64HBqJmOn5cBa81j/uznlv78jcHDo5iilgKJR8+YrOF0zHmEl31vWXtme6RvsdVzyH+EmXzWdQAAAQAxAAAElwWwAAcALgCwAEVYsAYvG7EGHD5ZsABFWLACLxuxAhA+WbAGELIAAQorWCHYG/RZsATQMDEBIREjESE1IQSX/iy//i0EZgUS+u4FEp4AAQCM/+wEqgWwABIAPLIFExQREjkAsABFWLAALxuxABw+WbAARViwCS8bsQkcPlmwAEVYsAUvG7EFED5Zsg4BCitYIdgb9FkwMQERBgAHByIAJxEzERQWMzI2NREEqgH+/9wz7/7kAr6uoaOtBbD8Is7++hACAQLiA+D8Jp6vrp4D2wAAAQAcAAAE/QWwAAYAOLIABwgREjkAsABFWLABLxuxARw+WbAARViwBS8bsQUcPlmwAEVYsAMvG7EDED5ZsgABAxESOTAxJQEzASMBMwKLAaDS/eSq/eXR/wSx+lAFsAAAAQA9AAAG7QWwABIAWQCwAEVYsAMvG7EDHD5ZsABFWLAILxuxCBw+WbAARViwES8bsREcPlmwAEVYsAovG7EKED5ZsABFWLAPLxuxDxA+WbIBAwoREjmyBgMKERI5sg0DChESOTAxARc3ATMBFzcTMwEjAScHASMBMwHjHCkBIKIBGSgf4sH+n6/+1BcX/smv/qDAAcvArQP4/AiwxAPk+lAEJW9v+9sFsAABADkAAATOBbAACwBrALAARViwAS8bsQEcPlmwAEVYsAovG7EKHD5ZsABFWLAELxuxBBA+WbAARViwBy8bsQcQPlmyAAEEERI5QAmGAJYApgC2AARdsgYBBBESOUAJiQaZBqkGuQYEXbIDAAYREjmyCQYAERI5MDEBATMBASMBASMBATMChAFd4v40Adfk/pr+mOMB2P4z4QOCAi79Lv0iAjj9yALeAtIAAAEADwAABLsFsAAIADEAsABFWLABLxuxARw+WbAARViwBy8bsQccPlmwAEVYsAQvG7EEED5ZsgABBBESOTAxAQEzAREjEQEzAmUBfNr+CsD+CtwC1QLb/G/94QIfA5EAAAEAVgAABHoFsAAJAEQAsABFWLAHLxuxBxw+WbAARViwAi8bsQIQPlmyAAEKK1gh2Bv0WbIEAAIREjmwBxCyBQEKK1gh2Bv0WbIJBQcREjkwMSUhFSE1ASE1IRUBOQNB+9wDHvzvA/ednZAEgp6NAAABAJL+yAILBoAABwAiALAEL7AHL7IAAQorWCHYG/RZsAQQsgMBCitYIdgb9FkwMQEjETMVIREhAgu/v/6HAXkF6Pl4mAe4AAABACj/gwM4BbAAAwATALACL7AARViwAC8bsQAcPlkwMRMzASMosAJgsAWw+dMAAQAJ/sgBgwaAAAcAJQCwAi+wAS+wAhCyBQEKK1gh2Bv0WbABELIGAQorWCHYG/RZMDETIREhNTMRIwkBev6GwcEGgPhImAaIAAABAEAC2QMUBbAABgAnsgAHCBESOQCwAEVYsAMvG7EDHD5ZsADQsgEHAxESObABL7AF0DAxAQMjATMBIwGqvqwBK38BKqsEu/4eAtf9KQABAAT/aQOYAAAAAwAbALAARViwAy8bsQMQPlmyAAEKK1gh2Bv0WTAxBSE1IQOY/GwDlJeXAAABADkE2AHaBf4AAwAjALABL7IPAQFdsADQGbAALxiwARCwAtCwAi+0DwIfAgJdMDEBIwEzAdqf/v7fBNgBJgAAAgBt/+wD6gROAB4AKAB5shcpKhESObAXELAg0ACwAEVYsBcvG7EXGD5ZsABFWLAELxuxBBA+WbAARViwAC8bsQAQPlmyAhcEERI5sgsXBBESObALL7AXELIPAQorWCHYG/RZshILFxESObAEELIfAQorWCHYG/RZsAsQsiMBCitYIdgb9FkwMSEmJwYjIiY1NCQzMzU0JiMiBhUjNDY2MzIWFxEUFxUlMjY3NSMgFRQWAygQCoGzoM0BAem0dHFjhrpzxXa71AQm/gtXnCOR/qx0IFKGtYupu1Vhc2RHUZdYu6T+DpVYEI1aSN7HV2IAAgCM/+wEIAYAAA4AGQBkshIaGxESObASELAD0ACwCC+wAEVYsAwvG7EMGD5ZsABFWLADLxuxAxA+WbAARViwBi8bsQYQPlmyBQgDERI5sgoMAxESObAMELISAQorWCHYG/RZsAMQshcBCitYIdgb9FkwMQEUAiMiJwcjETMRNiASESc0JiMiBxEWMzI2BCDkwM1wCaq5cAGK4bmSibdQVbSFlAIR+P7TkX0GAP3Di/7W/v0Fvc6q/iyqzgABAFz/7APsBE4AHQBJshAeHxESOQCwAEVYsBAvG7EQGD5ZsABFWLAILxuxCBA+WbIAAQorWCHYG/RZsAgQsAPQsBAQsBTQsBAQshcBCitYIdgb9FkwMSUyNjczDgIjIgARNTQ2NjMyFhcjJiYjIgYVFRQWAj5jlAivBXbFbt3++3TZlLbxCK8Ij2mNm5qDeFpdqGQBJwEAH572iNquaYfLwCO7ygAAAgBf/+wD8AYAAA8AGgBkshgbHBESObAYELAD0ACwBi+wAEVYsAMvG7EDGD5ZsABFWLAMLxuxDBA+WbAARViwCC8bsQgQPlmyBQMMERI5sgoDDBESObAMELITAQorWCHYG/RZsAMQshgBCitYIdgb9FkwMRM0EjMyFxEzESMnBiMiAjUXFBYzMjcRJiMiBl/sv75vuaoJb8a87bmYhrBRU6yImAIm+QEvggI0+gB0iAE0+Ae40J4B8ZnSAAACAF3/7APzBE4AFQAdAGmyCB4fERI5sAgQsBbQALAARViwCC8bsQgYPlmwAEVYsAAvG7EAED5ZshoIABESObAaL7S/Gs8aAl2yDAEKK1gh2Bv0WbAAELIQAQorWCHYG/RZshMIABESObAIELIWAQorWCHYG/RZMDEFIgA1NTQ2NjMyEhEVIRYWMzI2NxcGASIGByE1JiYCTdz+7HvdgdPq/SMEs4piiDNxiP7ZcJgSAh4IiBQBIfIiof2P/ur+/U2gxVBCWNEDyqOTDo2bAAEAPAAAAsoGFQAVAGOyDxYXERI5ALAARViwCC8bsQgePlmwAEVYsAMvG7EDGD5ZsABFWLARLxuxERg+WbAARViwAC8bsQAQPlmwAxCyAQEKK1gh2Bv0WbAIELINAQorWCHYG/RZsAEQsBPQsBTQMDEzESM1MzU0NjMyFwcmIyIGFRUzFSMR56uruqpAPwovNVpi5+cDq49vrr4RlglpYnKP/FUAAgBg/lYD8gROABkAJACDsiIlJhESObAiELAL0ACwAEVYsAMvG7EDGD5ZsABFWLAGLxuxBhg+WbAARViwCy8bsQsSPlmwAEVYsBcvG7EXED5ZsgUDFxESObIPFwsREjmwCxCyEQEKK1gh2Bv0WbIVAxcREjmwFxCyHQEKK1gh2Bv0WbADELIiAQorWCHYG/RZMDETNBIzMhc3MxEUBiMiJic3FjMyNjU1BiMiAjcUFjMyNxEmIyIGYOrBxm8JqfnSdeA7YHesh5dvwL7rupaHr1JVqoeYAib9ASuMePvg0vJkV2+TmIpdgAEy87fRnwHum9IAAAEAjAAAA98GAAARAEmyChITERI5ALAQL7AARViwAi8bsQIYPlmwAEVYsAUvG7EFED5ZsABFWLAOLxuxDhA+WbIAAgUREjmwAhCyCgEKK1gh2Bv0WTAxATYzIBMRIxEmJiMiBgcRIxEzAUV7xQFXA7kBaW9aiCa5uQO3l/59/TUCzHVwYE78/QYAAAIAjQAAAWgFxAADAAwAPrIGDQ4REjmwBhCwAdAAsABFWLACLxuxAhg+WbAARViwAC8bsQAQPlmwAhCwCtCwCi+yBgUKK1gh2Bv0WTAxISMRMwM0NjIWFAYiJgFVubnIN2w4OGw3BDoBHy0+Plo8PAAC/7/+SwFZBcQADAAWAEmyEBcYERI5sBAQsADQALAARViwDC8bsQwYPlmwAEVYsAMvG7EDEj5ZsggBCitYIdgb9FmwDBCwFdCwFS+yEAUKK1gh2Bv0WTAxAREQISInNRYzMjY1EQM0NjMyFhQGIiYBS/7lPTQgND5BEzc1Njg4bDYEOvtJ/sgSlAhDUwS7AR8sPz5aPDwAAAEAjQAABAwGAAAMAHUAsABFWLAELxuxBB4+WbAARViwCC8bsQgYPlmwAEVYsAIvG7ECED5ZsABFWLALLxuxCxA+WbIACAIREjlAFToASgBaAGoAegCKAJoAqgC6AMoACl2yBggCERI5QBU2BkYGVgZmBnYGhgaWBqYGtgbGBgpdMDEBBxEjETMRNwEzAQEjAbp0ubljAVHh/lsB1tkB9Xn+hAYA/F93AWT+PP2KAAEAnAAAAVUGAAADAB0AsABFWLACLxuxAh4+WbAARViwAC8bsQAQPlkwMSEjETMBVbm5BgAAAAEAiwAABngETgAdAHeyBB4fERI5ALAARViwAy8bsQMYPlmwAEVYsAgvG7EIGD5ZsABFWLAALxuxABg+WbAARViwCy8bsQsQPlmwAEVYsBQvG7EUED5ZsABFWLAbLxuxGxA+WbIBCAsREjmyBQgLERI5sAgQshABCitYIdgb9FmwGNAwMQEXNjMyFzY2MyATESMRNCYjIgYHESMRNCMiBxEjEQE6BXfK41I2rXYBZAa5an1niAu657ZDuQQ6eIyuTmD+h/0rAsp0c3to/TICxeyb/OoEOgABAIwAAAPfBE4AEQBTsgsSExESOQCwAEVYsAMvG7EDGD5ZsABFWLAALxuxABg+WbAARViwBi8bsQYQPlmwAEVYsA8vG7EPED5ZsgEDBhESObADELILAQorWCHYG/RZMDEBFzYzIBMRIxEmJiMiBgcRIxEBOwZ8yAFXA7kBaW9aiCa5BDqInP59/TUCzHVwYE78/QQ6AAACAFv/7AQ0BE4ADwAbAEOyDBwdERI5sAwQsBPQALAARViwBC8bsQQYPlmwAEVYsAwvG7EMED5ZshMBCitYIdgb9FmwBBCyGQEKK1gh2Bv0WTAxEzQ2NjMyABUVFAYGIyIANRcUFjMyNjU0JiMiBlt934/dARF54ZLc/u+6p4yNpqmMiagCJ5/+iv7O/g2e+4wBMvwJtNrdx7Ld2gACAIz+YAQeBE4ADwAaAG6yExscERI5sBMQsAzQALAARViwDC8bsQwYPlmwAEVYsAkvG7EJGD5ZsABFWLAGLxuxBhI+WbAARViwAy8bsQMQPlmyBQwDERI5sgoMAxESObAMELITAQorWCHYG/RZsAMQshgBCitYIdgb9FkwMQEUAiMiJxEjETMXNjMyEhEnNCYjIgcRFjMyNgQe4sHFcbmpCXHJw+O5nIioVFOrhZ0CEff+0n399wXaeIz+2v76BLfUlf37lNMAAAIAX/5gA+8ETgAPABoAa7IYGxwREjmwGBCwA9AAsABFWLADLxuxAxg+WbAARViwBi8bsQYYPlmwAEVYsAgvG7EIEj5ZsABFWLAMLxuxDBA+WbIFAwwREjmyCgMMERI5shMBCitYIdgb9FmwAxCyGAEKK1gh2Bv0WTAxEzQSMzIXNzMRIxEGIyICNRcUFjMyNxEmIyIGX+rFwG8IqrlwusTpuZ2FpVdYooaeAib/ASmBbfomAgR4ATH8CLrUkgISj9UAAQCMAAAClwROAA0ARrIEDg8REjkAsABFWLALLxuxCxg+WbAARViwCC8bsQgYPlmwAEVYsAUvG7EFED5ZsAsQsgIBCitYIdgb9FmyCQsFERI5MDEBJiMiBxEjETMXNjMyFwKXKjG2Qbm0A1unNhwDlAeb/QAEOn2RDgABAF//7AO7BE4AJgBhsgknKBESOQCwAEVYsAkvG7EJGD5ZsABFWLAcLxuxHBA+WbIDHAkREjmwCRCwDdCwCRCyEAEKK1gh2Bv0WbADELIVAQorWCHYG/RZsBwQsCHQsBwQsiQBCitYIdgb9FkwMQE0JiQmJjU0NjMyFhUjNCYjIgYVFBYEFhYVFAYjIiYmNTMWFjMyNgMCcf7npU/hr7jluoFiZXJqARWsU+i5gshxuQWLcml/AR9LUzxUdFCFuL6UTG5YR0NEPlZ5V5GvXKVgXW1VAAEACf/sAlYFQAAVAF+yDhYXERI5ALAARViwAS8bsQEYPlmwAEVYsBMvG7ETGD5ZsABFWLANLxuxDRA+WbABELAA0LAAL7ABELIDAQorWCHYG/RZsA0QsggBCitYIdgb9FmwAxCwEdCwEtAwMQERMxUjERQWMzI3FQYjIiY1ESM1MxEBh8rKNkEgOElFfH7FxQVA/vqP/WFBQQyWFJaKAp+PAQYAAQCI/+wD3AQ6ABAAU7IKERIREjkAsABFWLAGLxuxBhg+WbAARViwDS8bsQ0YPlmwAEVYsAIvG7ECED5ZsABFWLAQLxuxEBA+WbIADQIREjmwAhCyCgEKK1gh2Bv0WTAxJQYjIiYnETMRFDMyNxEzESMDKGzRrbUBucjURrmwa3/JxQLA/UX2ngMT+8YAAAEAIQAAA7oEOgAGADiyAAcIERI5ALAARViwAS8bsQEYPlmwAEVYsAUvG7EFGD5ZsABFWLADLxuxAxA+WbIABQMREjkwMSUBMwEjATMB8QEMvf58jf54vfsDP/vGBDoAAAEAKwAABdMEOgAMAGCyBQ0OERI5ALAARViwAS8bsQEYPlmwAEVYsAgvG7EIGD5ZsABFWLALLxuxCxg+WbAARViwAy8bsQMQPlmwAEVYsAYvG7EGED5ZsgALAxESObIFCwMREjmyCgsDERI5MDElEzMBIwEBIwEzExMzBErQuf7Flv75/wCW/sa41fyV/wM7+8YDNPzMBDr81gMqAAEAKQAAA8oEOgALAFMAsABFWLABLxuxARg+WbAARViwCi8bsQoYPlmwAEVYsAQvG7EEED5ZsABFWLAHLxuxBxA+WbIACgQREjmyBgoEERI5sgMABhESObIJBgAREjkwMQETMwEBIwMDIwEBMwH38Nj+ngFt1vr61wFt/p7WAq8Bi/3p/d0Blf5rAiMCFwABABb+SwOwBDoADwBJsgAQERESOQCwAEVYsAEvG7EBGD5ZsABFWLAOLxuxDhg+WbAARViwBS8bsQUSPlmyAA4FERI5sgkBCitYIdgb9FmwABCwDdAwMQETMwECIycnNRcyNjc3ATMB7vzG/k1l3CNFMl5pIin+fsoBDwMr+x/+8gMNlgRMZW4ELgABAFgAAAOzBDoACQBEALAARViwBy8bsQcYPlmwAEVYsAIvG7ECED5ZsgABCitYIdgb9FmyBAACERI5sAcQsgUBCitYIdgb9FmyCQUHERI5MDElIRUhNQEhNSEVAToCefylAlX9tAM0l5eIAxmZgwAAAQBA/pICngY9ABgAMbITGRoREjkAsA0vsAAvsgcNABESObAHL7IfBwFdsgYDCitYIdgb9FmyEwYHERI5MDEBJiY1NTQjNTI1NTY2NxcGERUUBxYVFRIXAnixs9TUAq+zJtGnpwPO/pIy5bzH85Hy0LfhM3ND/ubK41la5c7+7UIAAAEAr/7yAUQFsAADABMAsAAvsABFWLACLxuxAhw+WTAxASMRMwFElZX+8ga+AAABABP+kgJyBj0AGAAxsgUZGhESOQCwCy+wGC+yEQsYERI5sBEvsh8RAV2yEgMKK1gh2Bv0WbIFEhEREjkwMRc2EzU0NyY1NRAnNxYWFxUUMxUiFRUUBgcTywe1tdEmsbIB1NS1r/tBAQrc51RS6csBGkNzMuG50u+R88q84jIAAAEAgwGSBO8DIgAXAEKyERgZERI5ALAARViwDy8bsQ8WPlmwANCwDxCwFNCwFC+yAwEKK1gh2Bv0WbAPELIIAQorWCHYG/RZsAMQsAvQMDEBFAYjIi4CIyIGFQc0NjMyFhYXFzI2NQTvu4lIgKlKKk5UobiLTIywQB1MXwMJntk1lCRrXgKgzkChCgJ0XwACAIv+mAFmBE0AAwAMADKyBg0OERI5sAYQsADQALACL7AARViwCy8bsQsYPlmyBgUKK1gh2Bv0WbIBAgYREjkwMRMzEyMTFAYiJjQ2MhaqqA3CyTdsODhsNwKs++wFTC0+Plo8PAABAGn/CwP5BSYAIQBSsgAiIxESOQCwAEVYsBQvG7EUGD5ZsABFWLAKLxuxChA+WbAH0LIAAQorWCHYG/RZsAoQsAPQsBQQsBHQsBQQsBjQsBQQshsBCitYIdgb9FkwMSUyNjczBgYHFSM1JgI1NTQSNzUzFRYWFyMmJiMiBhUVFBYCSmSUCK8GxpC5s8jKsbmWwAavCI9pjZubg3lZfska6eoiARzcI9QBHSHi3xfUlmmHy8Aju8oAAQBbAAAEaAXEACEAfLIcIiMREjkAsABFWLAULxuxFBw+WbAARViwBS8bsQUQPlmyHxQFERI5sB8vsl8fAXKyjx8BcbK/HwFdsgABCitYIdgb9FmwBRCyAwEKK1gh2Bv0WbAH0LAI0LAAELAN0LAfELAP0LAUELAY0LAUELIbAQorWCHYG/RZMDEBFxQHIQchNTM2Njc1JyM1MwM0NjMyFhUjNCYjIgYVEyEVAcEIPgLdAfv4TSgyAgiloAn1yL7ev39vaYIJAT8CbtyaW52dCYNgCN2dAQTH7tSxa3yaff78nQAAAgBp/+UFWwTxABsAKgA/sgIrLBESObACELAn0ACwAEVYsAIvG7ECED5ZsBDQsBAvsAIQsh8BCitYIdgb9FmwEBCyJwEKK1gh2Bv0WTAxJQYjIicHJzcmNTQ3JzcXNjMyFzcXBxYVFAcXBwEUFhYyNjY1NCYmIyIGBgRPn9HPn4aCi2hwk4KTnsPEn5WEl25mj4T8YHPE4sRxccVwccRzcISCiIeNnMrOo5eIlnh5mImao8vEn5CIAnt71Hp703t603l41AAAAQAfAAAErQWwABYAawCwAEVYsBYvG7EWHD5ZsABFWLABLxuxARw+WbAARViwDC8bsQwQPlmyDxMDK7IADBYREjm0DxMfEwJdsBMQsAPQsBMQshICCitYIdgb9FmwBtCwDxCwB9CwDxCyDgIKK1gh2Bv0WbAK0DAxAQEzASEVIRUhFSERIxEhNSE1ITUhATMCZgFs2/5eATj+gAGA/oDB/oYBev6GATn+XtwDDgKi/TB9pXz+vgFCfKV9AtAAAAIAk/7yAU0FsAADAAcAGACwAC+wAEVYsAYvG7EGHD5ZsgUBAyswMRMRMxERIxEzk7q6uv7yAxf86QPIAvYAAgBa/hEEeQXEADQARACAsiNFRhESObAjELA10ACwCC+wAEVYsCMvG7EjHD5ZshYIIxESObAWELI/AQorWCHYG/RZsgIWPxESObAIELAO0LAIELIRAQorWCHYG/RZsjAjCBESObAwELI3AQorWCHYG/RZsh03MBESObAjELAn0LAjELIqAQorWCHYG/RZMDEBFAcWFhUUBCMiJicmNTcUFjMyNjU0JicuAjU0NyYmNTQkMzIEFSM0JiMiBhUUFhYEHgIlJicGBhUUFhYEFzY2NTQmBHm6RUj+/ORwyUaLurSciKaO0bbAXbZCRwEL3ugBBLmoi46hOIcBH6lxOv3hWktQSzaFARwsTlSLAa+9VTGIZKjHODlxzQKCl3VgWWk+MG+bb7pYMYhkpsjizX2bc2JFUEFQSGGBqxgbE2VFRlBCUhEUZUVYbQAAAgBmBPAC7wXFAAgAEQAdALAHL7ICBQorWCHYG/RZsAvQsAcQsBDQsBAvMDETNDYyFhQGIiYlNDYyFhQGIiZmN2w4OGw3Aa43bDg4bDcFWy09PVo8PCstPj5aPDwAAAMAW//rBeYFxAAbACoAOQCVsic6OxESObAnELAD0LAnELA20ACwAEVYsC4vG7EuHD5ZsABFWLA2LxuxNhA+WbIDNi4REjmwAy+0DwMfAwJdsgouNhESObAKL7QAChAKAl2yDgoDERI5shECCitYIdgb9FmwAxCyGAIKK1gh2Bv0WbIbAwoREjmwNhCyIAQKK1gh2Bv0WbAuELInBAorWCHYG/RZMDEBFAYjIiY1NTQ2MzIWFSM0JiMiBhUVFBYzMjY1JRQSBCAkEjU0AiQjIgQCBzQSJCAEEhUUAgQjIiQCBF+tnp29v5ugrJJfW15sbF5cXf0BoAETAUABEqCe/u2hoP7sn3O7AUsBgAFKu7T+tcbF/rW2AlWZodO2brDTpJVjVYp7cXiKVGWErP7bpqYBJayqASKnpf7cqsoBWsfH/qbKxf6o0c8BWAAAAgCTArMDDwXEABsAJQBssg4mJxESObAOELAd0ACwAEVYsBUvG7EVHD5ZsgQmFRESObAEL7AA0LICBBUREjmyCwQVERI5sAsvsBUQsg4DCitYIdgb9FmyEQsVERI5sAQQshwDCitYIdgb9FmwCxCyIAQKK1gh2Bv0WTAxASYnBiMiJjU0NjMzNTQjIgYVJzQ2MzIWFREUFyUyNjc1IwYGFRQCagwGTIB3gqesbHxFT6GsiYWaGv6kK1gccFNZAsEiJlZ8Z294NIc2Mwxngo+G/sRhUXsoG44BPzNe//8AZgCXA2QDswAmAJr6/gAHAJoBRP/+AAEAfwF3A74DIAAFABoAsAQvsAHQsAEvsAQQsgIBCitYIdgb9FkwMQEjESE1IQO+uv17Az8BdwEIoQAEAFr/6wXlBcQADgAeADQAPQCpsjY+PxESObA2ELAL0LA2ELAT0LA2ELAj0ACwAEVYsAMvG7EDHD5ZsABFWLALLxuxCxA+WbITBAorWCHYG/RZsAMQshsECitYIdgb9FmyIAsDERI5sCAvsiIDCxESObAiL7QAIhAiAl2yNSAiERI5sDUvsr81AV20ADUQNQJdsh8CCitYIdgb9FmyKB81ERI5sCAQsC/QsC8vsCIQsj0CCitYIdgb9FkwMRM0EiQgBBIVFAIEIyIkAjcUEgQzMiQSNTQCJCMiBAIFESMRITIWFRQHFhcVFBcVIyY0JyYnJzM2NjU0JiMjWrsBSwGAAUq7tP61xsX+tbZzoAEToKEBFJ2d/uyhoP7snwHAjQEUmamAegERkQ4DEHOwnEhYTmSKAtnKAVrHx/6mysX+qNHPAVjHrP7bpqkBIqyrASGnpf7c9f6uA1GDfXtBMpo9ViYQJLkRYASAAkI2ST0AAAEAeAUhA0IFsAADABEAsAEvsgIDCitYIdgb9FkwMQEhNSEDQv02AsoFIY8AAgCCA8ACfAXEAAsAFgAvALAARViwAy8bsQMcPlmwDNCwDC+yCQIKK1gh2Bv0WbADELISAgorWCHYG/RZMDETNDYzMhYVFAYjIiYXMjY1NCYjIgYUFoKVamiTk2hplv82Sko2N0tLBMBonJtpapaWFkc5OktPbEoAAgBhAAAD9QTzAAsADwBGALAJL7AARViwDS8bsQ0QPlmwCRCwANCwCRCyBgEKK1gh2Bv0WbAD0LANELIOAQorWCHYG/RZsgUOBhESObQLBRsFAl0wMQEhFSERIxEhNSERMwEhNSECiQFs/pSn/n8BgacBQfy9A0MDVpf+YgGelwGd+w2YAAABAEICmwKrBbsAFgBUsggXGBESOQCwAEVYsA4vG7EOHD5ZsABFWLAALxuxABQ+WbIWAgorWCHYG/RZsALQsgMOFhESObAOELIIAgorWCHYG/RZsA4QsAvQshQWDhESOTAxASE1ATY1NCYjIgYVIzQ2IBYVFA8CIQKr/akBLG1APEtHnacBCJprVLABjwKbbAEaZkUxPUw5cpR/bmhrT5EAAQA+Ao8CmgW6ACYAibIgJygREjkAsABFWLAOLxuxDhw+WbAARViwGS8bsRkUPlmyABkOERI5sAAvtm8AfwCPAANdsj8AAXG2DwAfAC8AA12yXwABcrAOELIHAgorWCHYG/RZsgoOGRESObAAELImBAorWCHYG/RZshQmABESObIdGQ4REjmwGRCyIAIKK1gh2Bv0WTAxATMyNjU0JiMiBhUjNDYzMhYVFAYHFhUUBiMiJjUzFBYzMjY1NCcjAQlUSkg/RjlLnaN8iZxGQpWqiISmnk9DRkmcWARlPTAtOjMpYnt5aDdbGSmPan1+ay08PDNxAgAAAQB7BNgCHAX+AAMAIwCwAi+yDwIBXbAA0LAAL7QPAB8AAl2wAhCwA9AZsAMvGDAxATMBIwE84P70lQX+/toAAAEAmv5gA+4EOgASAFCyDRMUERI5ALAARViwAC8bsQAYPlmwAEVYsAcvG7EHGD5ZsABFWLAQLxuxEBI+WbAARViwDS8bsQ0QPlmyBAEKK1gh2Bv0WbILBw0REjkwMQERFhYzMjcRMxEjJwYjIicRIxEBUwFndMc+uqcJXaqTUbkEOv2Ho5yYAyD7xnOHSf4rBdoAAQBDAAADQAWwAAoAK7ICCwwREjkAsABFWLAILxuxCBw+WbAARViwAC8bsQAQPlmyAQAIERI5MDEhESMiJDU0JDMhEQKGVOb+9wEK5gENAgj+1tX/+lAAAAEAkwJrAXkDSQAJABayAwoLERI5ALACL7EICitY2BvcWTAxEzQ2MhYVFAYiJpM5cjs7cjkC2TBAQDAvPz8AAQB0/k0BqgAAAA4AQbIFDxAREjkAsABFWLAALxuxABA+WbAARViwBi8bsQYSPlm0EwYjBgJdsgEGABESObEHCitY2BvcWbABELAN0DAxIQcWFRQGIycyNjU0Jic3AR0MmaCPB09XQGIgNBuSYXFrNC8sKgmGAAEAegKiAe8FtwAGAECyAQcIERI5ALAARViwBS8bsQUcPlmwAEVYsAAvG7EAFD5ZsgQABRESObAEL7IDAgorWCHYG/RZsgIDBRESOTAxASMRBzUlMwHvndgBYxICogJZOYB1AAACAHoCsgMnBcQADAAaAECyAxscERI5sAMQsBDQALAARViwAy8bsQMcPlmyChsDERI5sAovshADCitYIdgb9FmwAxCyFwMKK1gh2Bv0WTAxEzQ2MzIWFRUUBiAmNRcUFjMyNjU1NCYjIgYHeryam7y7/sy+o2FUU19hU1FgAgRjnsPBpkqfwsKlBmRyc2VOY3JuYQD//wBmAJgDeAO1ACYAmw0AAAcAmwFqAAD//wBVAAAFkQWtACcAov/bApgAJwCcARgACAEHAKUC1gAAABAAsABFWLAFLxuxBRw+WTAx//8AUAAABckFrQAnAJwA7AAIACcAov/WApgBBwCjAx4AAAAQALAARViwCS8bsQkcPlkwMf//AG8AAAXtBbsAJwCcAZcACAAnAKUDMgAAAQcApAAxApsAEACwAEVYsCEvG7EhHD5ZMDEAAgBE/n8DeARNABgAIgBXsgkjJBESObAJELAc0ACwEC+wAEVYsCEvG7EhGD5ZsgAQIRESObIDEAAREjmwEBCyCQEKK1gh2Bv0WbAQELAM0LIVABAREjmwIRCyGwUKK1gh2Bv0WTAxAQ4DBwcUFjMyNjUzBgYjIiY1NDc3NjUTFAYiJjU0NjIWAkwBKWC4CwJ0bWR9uQLht8TWoG1CwTdsODhsNwKoan92wWMlbXNxW6HMybOtr3FOkgE9LT4+LSw8PAAC//IAAAdXBbAADwASAHcAsABFWLAGLxuxBhw+WbAARViwAC8bsQAQPlmwAEVYsAQvG7EEED5ZshEGABESObARL7ICAQorWCHYG/RZsAYQsggBCitYIdgb9FmyCwAGERI5sAsvsgwBCitYIdgb9FmwABCyDgEKK1gh2Bv0WbISBgAREjkwMSEhAyEDIwEhFSETIRUhEyEBIQMHV/yND/3MzeIDcAO3/U0UAk79uBYCwfqvAcgfAWH+nwWwmP4pl/3tAXgC3QABAFkAzgPdBGMACwA4ALADL7IJDAMREjmwCS+yCgkDERI5sgQDCRESObIBCgQREjmwAxCwBdCyBwQKERI5sAkQsAvQMDETAQE3AQEXAQEHAQFZAUr+uHcBSQFJd/64AUp3/rX+tQFJAVABT3v+sQFPe/6x/rB7AVH+rwAAAwB2/6MFHQXsABcAIAApAGayBCorERI5sAQQsB3QsAQQsCbQALAARViwEC8bsRAcPlmwAEVYsAQvG7EEED5ZshoQBBESObIjEAQREjmwIxCwG9CwEBCyHQEKK1gh2Bv0WbAaELAk0LAEELImAQorWCHYG/RZMDEBFAIEIyInByM3JhE1NBIkMzIXNzMHFhMFFBcBJiMiAgcFNCcBFjMyEjcFCZD++LCrg2GOkL6SAQus1pRnjZ+JAvwsYgI0Zqa20QMDFTj921t5uswDAqnW/sGoUpvnwAFoU9IBQqt9pf+7/tpj9I0DiG/+6/YNtoP8j0ABD/0AAgCmAAAEXQWwAA0AFgBXsgkXGBESObAJELAQ0ACwAEVYsAAvG7EAHD5ZsABFWLALLxuxCxA+WbIBAAsREjmwAS+yEAALERI5sBAvsgkBCitYIdgb9FmwARCyDgEKK1gh2Bv0WTAxAREhMhYWFRQEIyERIxETESEyNjU0JicBYAEXk9x3/vjj/u66ugEVjqCgiAWw/ttpwn7C5/7HBbD+Q/3el3h7lwEAAQCL/+wEagYSACoAabIhKywREjkAsABFWLAFLxuxBR4+WbAARViwEy8bsRMQPlmwAEVYsAAvG7EAED5ZsgoTBRESObIOBRMREjmwExCyGgEKK1gh2Bv0WbIgEwUREjmyIwUTERI5sAUQsigBCitYIdgb9FkwMSEjETQ2MzIWFRQGFRQeAhUUBiMiJic3FhYzMjY1NC4CNTQ2NTQmIyIRAUS5z7q0xYBLvFbLtlG1JisxhzVrcUq9V4toWNoEV9Drs599y0UzX5CITJ+yLBybICxeUjRgk4pRWc9UXmv+2wADAE7/7AZ8BE4AKgA1AD0AxrICPj8REjmwAhCwLtCwAhCwOdAAsABFWLAXLxuxFxg+WbAARViwHS8bsR0YPlmwAEVYsAAvG7EAED5ZsABFWLAFLxuxBRA+WbICHQAREjmyDAUXERI5sAwvtL8MzwwCXbAXELIQAQorWCHYG/RZshMMFxESObIaHQAREjmyOh0AERI5sDovtL86zzoCXbIhAQorWCHYG/RZsAAQsiUBCitYIdgb9FmyKB0AERI5sCvQsAwQsi8BCitYIdgb9FmwEBCwNtAwMQUgJwYGIyImNTQ2MzM1NCYjIgYVJzQ2MzIWFzY2MzISFRUhFhYzMjc3FwYlMjY3NSMGBhUUFgEiBgchNTQmBO7++4hB4o2nvOPd325oaYy48rtzsDI/rmnS6P0oB66VlHkvQJ78CUieMuR1jGoDUHOVEQIahhS0Vl6tl52uVWt7blETj7VTU09X/v/pc7C/TB+IeZZKNu0CblNNXQM0q4sfhJMAAAIAfv/sBC0GLAAdACsAVLIHLC0REjmwBxCwKNAAsABFWLAZLxuxGR4+WbAARViwBy8bsQcQPlmyDxkHERI5sA8vshEZBxESObIiAQorWCHYG/RZsAcQsigBCitYIdgb9FkwMQESERUUBgYjIiYmNTQ2NjMyFyYnByc3Jic3Fhc3FwMnJiYjIgYVFBYzMjY1AzT5ddiGh9x5cM+Bo3kwjdpJwIS3Oe+vvUloAiGLXJGip4B9mQUV/vj+Z12e/ZCB4IaT6YJyw42UY4NbMZ82i4Fk/PM4PUm/p4zE4rgAAAMARwCsBC0EugADAA0AFwBOsgcYGRESObAHELAA0LAHELAR0ACwAi+yAQEKK1gh2Bv0WbACELEMCitY2BvcWbEGCitY2BvcWbABELEQCitY2BvcWbEWCitY2BvcWTAxASE1IQE0NjIWFRQGIiYRNDYyFhUUBiImBC38GgPm/aA5cjs7cjk5cjs7cjkCWLgBOjBAQDAvPj78/jBAQDAuPz8AAAMAW/96BDQEuAAVAB0AJgBjsgQnKBESObAEELAb0LAEELAj0ACwAEVYsAQvG7EEGD5ZsABFWLAPLxuxDxA+WbIjAQorWCHYG/RZsiEjBBESObAhELAY0LAEELIbAQorWCHYG/RZshkbDxESObAZELAg0DAxEzQ2NjMyFzczBxYRFAYGIyInByM3JhMUFwEmIyIGBTQnARYzMjY1W3vhj25eSXxmw3zgkGhWSnxkzblhAVc+SIqoAmZX/qw3QounAief/YsqlM2a/sCe/okjlcuVATfCbwK2INq1tm/9UBnbuQACAJX+YAQnBgAADwAaAGSyGBscERI5sBgQsAzQALAIL7AARViwDC8bsQwYPlmwAEVYsAYvG7EGEj5ZsABFWLADLxuxAxA+WbIFDAMREjmyCgwDERI5sAwQshMBCitYIdgb9FmwAxCyGAEKK1gh2Bv0WTAxARQCIyInESMRMxE2MzISESc0JiMiBxEWMzI2BCfiwcVxublxwsPjuZyIqFRTq4WdAhH3/tJ9/fcHoP3KhP7a/voEt9SV/fuU0wAAAQCbAAABVQQ6AAMAHQCwAEVYsAIvG7ECGD5ZsABFWLAALxuxABA+WTAxISMRMwFVuroEOgAAAgBo/+sHCQXEABcAIwCRsgEkJRESObABELAa0ACwAEVYsAwvG7EMHD5ZsABFWLAOLxuxDhw+WbAARViwAC8bsQAQPlmwAEVYsAMvG7EDED5ZsA4QshABCitYIdgb9FmyEwAOERI5sBMvshQBCitYIdgb9FmwABCyFgEKK1gh2Bv0WbADELIYAQorWCHYG/RZsAwQsh0BCitYIdgb9FkwMSEhBiMiJgInETQSNjMyFyEVIREhFSERIQUyNxEmIyIGBxEUFgcJ/LCycqL+jAGL/qJ8qgNG/S0Cd/2JAt37jHFmbWytwgLDFZYBD6sBNawBEZcUnv4snf38Gw4Ejg/lz/7H0+sAAAMAYf/sBwAETgAgACwANACWsgY1NhESObAGELAm0LAGELAw0ACwAEVYsAQvG7EEGD5ZsABFWLAKLxuxChg+WbAARViwFy8bsRcQPlmwAEVYsB0vG7EdED5ZsgcKFxESObIxChcREjmwMS+yDgEKK1gh2Bv0WbAXELISAQorWCHYG/RZshQKFxESObIaChcREjmwJNCwBBCyKgEKK1gh2Bv0WbAt0DAxEzQ2NjMyFhc2NjMyFhUVIRYWMzI3FwYjIiYnBgYjIgA1FxQWMzI2NTQmIyIGJSIGByE1NCZheduOick9QcRwz+r9Mgekhrx4Son1h80/PseG3P74uaCLiaChioeiBC1jlhYCDokCJ6D+iXVkZnP+63SqxWx+hHBkY3EBMP4Jt9jXzrbZ1tajihp9lgAAAQCpBOQDBgYAAAgANACwBC+wB9CwBy+0DwcfBwJdsgUEBxESORmwBS8YsAHQGbABLxiwBBCwAtCyAwQHERI5MDEBFSMnByM1EzMDBpmWlZn2cATuCqqqDAEQAAACAHkEtAInBlAACQAUACqyAxUWERI5sAMQsA3QALADL7AH0LAHL7I/BwFdsAMQsA3QsAcQsBLQMDEBFAYjIiY0NjIWBRQWMzI2NCYjIgYCJ3xbXHt7uHv+tUMxMERDMTJCBYBXdXasenpWL0RCYkVGAAABAHsE2QM+BegAFwA+ALADL7AI0LAIL7QPCB8IAl2wAxCwC9CwCy+wCBCyDwMKK1gh2Bv0WbADELIUAworWCHYG/RZsA8QsBfQMDEBFAYjIi4CIyIGFSc0NjMyHgIzMjY1Az57XCk8YSscKTp8eV0jOGAzHys5BdxshhQ+DT8xB2uMFDoSRC3//wCiAosEjQMiAEYAn9kATM1AAP//AJACiwXJAyIARgCfhABmZkAAAAEAYAQxAXgGEwAIACGyCAkKERI5ALAARViwAC8bsQAePlmyBQkAERI5sAUvMDEBFwYHFSM1NDYBDmpdA7hhBhNIf5OIdGbIAAEAMAQWAUcGAAAIACGyCAkKERI5ALAARViwBC8bsQQePlmyAAkEERI5sAAvMDETJzY3NTMVBgaZaV0DtwFhBBZIgpCQgmTHAAEAJP7lATsAtQAIAB6yCAkKERI5ALAJL7IEBQorWCHYG/RZsADQsAAvMDETJzY3NTMVFAaNaVsDuWP+5Ul/knZkZcr//wBoBDECuwYTACYAkwgAAAcAkwFDAAD//wA8BBYChgYAACYAlAwAAAcAlAE/AAAAAgAk/tMCZAD2AAgAEQAwsgoSExESObAKELAF0ACwEi+yBAUKK1gh2Bv0WbAA0LAAL7AJ0LAJL7AEELAN0DAxEyc2NzUzFRQGFyc2NzUzFRQGjWlbA7lj3WlbA7ph/tNIiZm5pGzTQEiJmbmka9EAAAEAigIXAiIDywANABayCg4PERI5ALADL7EKCitY2BvcWTAxEzQ2MzIWFRUUBiMiJjWKb1xbcm5eXW8DBFdwbV0lV25vWAABAGwAmQIgA7UABgAQALAFL7ICBwUREjmwAi8wMQEBIwE1ATMBHgECjf7ZASeNAib+cwGEEwGFAAEAWQCYAg4DtQAGABAAsAAvsgMHABESObADLzAxEwEVASMBAecBJ/7ZjgEC/v4Dtf57E/57AY4BjwABADsAbgNqBSIAAwAJALAAL7ACLzAxNycBF6NoAsdobkIEckIA//8ANgKQArsFpQMHAKUAAAKQABMAsABFWLAJLxuxCRw+WbAN0DAxAAABAF//7AQcBcQAIwCHshUkJRESOQCwAEVYsBYvG7EWHD5ZsABFWLAJLxuxCRA+WbIjCRYREjmwIy+yAAIKK1gh2Bv0WbAJELIEAQorWCHYG/RZsAAQsAzQsCMQsA/QsCMQsB/QsB8vtg8fHx8vHwNdsiACCitYIdgb9FmwENCwHxCwE9CwFhCyGwEKK1gh2Bv0WTAxASEWFjMyNxcGIyIAAyM1MzUjNTMSADMyFwcmIyIGByEVIRUhA1H+gAS0pXRmFHh4+P7jBrKysrIKAR3zaocUbW6ksQYBf/6AAYACHcPSIqAeASUBDHyJfQEGAR8foiPLvH2JAAEAqAKLA+sDIgADABsAsABFWLACLxuxAhY+WbIBAQorWCHYG/RZMDEBITUhA+v8vQNDAouXAAIAHwAAA80GFQAVABkAg7IIGhsREjmwCBCwF9AAsABFWLAILxuxCB4+WbAARViwAy8bsQMYPlmwAEVYsBEvG7ERGD5ZsABFWLAYLxuxGBg+WbAARViwAC8bsQAQPlmwAEVYsBYvG7EWED5ZsAMQsgEBCitYIdgb9FmwCBCyDQEKK1gh2Bv0WbABELAT0LAU0DAxMxEjNTM1NDYzMhcHJiMiBhUVMxUjESEjETPKq6vPvXCrH31xd2nd3QJJuroDq49ctco9nDJra16P/FUEOgABADwAAAPpBhUAFgBcALAARViwEi8bsRIePlmwAEVYsAYvG7EGGD5ZsABFWLAJLxuxCRA+WbAARViwFi8bsRYQPlmwEhCyAgEKK1gh2Bv0WbAGELIHAQorWCHYG/RZsAvQsAYQsA7QMDEBJiMiFRUzFSMRIxEjNTM1NjYzMgURIwMwfEzI5+e5q6sBwLFlASu5BWMU0muP/FUDq492rbg9+igAAAEAegAAAe8DFQAGADUAsABFWLAFLxuxBRY+WbAARViwAS8bsQEQPlmyBAUBERI5sAQvsgMCCitYIdgb9FmwAtAwMSEjEQc1JTMB753YAWMSAlk5gHUAAQBCAAACqwMgABYAVLIIFxgREjkAsABFWLAOLxuxDhY+WbAARViwAC8bsQAQPlmyFQIKK1gh2Bv0WbAC0LIUFQ4REjmyAw4UERI5sA4QsggCCitYIdgb9FmwDhCwC9AwMSEhNQE2NTQmIyIGFSM0NiAWFRQPAiECq/2pASxtQDxLR52nAQiaa1SwAY9sARpmRTE9TDlylH9uaGtPkQABAD7/9QKaAyAAJgBxALAARViwDi8bsQ4WPlmwAEVYsBkvG7EZED5ZsgAZDhESOXywAC8YtoAAkACgAANdsA4QsgcCCitYIdgb9FmyCgAHERI5sAAQsiYCCitYIdgb9FmyFCYAERI5sBkQsiACCitYIdgb9FmyHSYgERI5MDEBMzI2NTQmIyIGFSM0NjMyFhUUBgcWFRQGIyImNTMUFjMyNjU0JyMBCVRKSD9GOUudo3yJnEZClaqIhKaeT0NGSZxYAcs9MC06Mylie3loN1sZKY9qfX5rLTw8M3ECAAACADYAAAK7AxUACgAOAEkAsABFWLAJLxuxCRY+WbAARViwBC8bsQQQPlmyAQkEERI5sAEvsgICCitYIdgb9FmwBtCwARCwC9CyCAsGERI5sg0JBBESOTAxATMVIxUjNSEnATMBMxEHAlBra53+iQYBeaH+hN8RASuCqalmAgb+FgEhHP//ACUCHwINArYCBgARAAAAAgAlAAAE5AWwAA8AHQBmALAARViwBS8bsQUcPlmwAEVYsAAvG7EAED5ZsgQABRESObAEL7LPBAFdsi8EAV2ynwQBcbIBAQorWCHYG/RZsBHQsAAQshIBCitYIdgb9FmwBRCyGwEKK1gh2Bv0WbAEELAc0DAxMxEjNTMRITIEEhcVFAIEBxMhETMyEjc1NAInIxEhx6KiAZu+ASSfAZ/+2cRH/ubJ3vcB6dbgARoCmpcCf6j+ysldzv7KpgICmv4DARL5XfgBEwL+HwD//wAcAAAFHQc0AiYAJQAAAQcARAEwATYAFACwAEVYsAQvG7EEHD5ZsQwI9DAx//8AHAAABR0HNAImACUAAAEHAHUBvwE2ABQAsABFWLAFLxuxBRw+WbENCPQwMf//ABwAAAUdBzYCJgAlAAABBwCOAMkBNgAUALAARViwBC8bsQQcPlmxDwb0MDH//wAcAAAFHQciAiYAJQAAAQcAkADFAToAFACwAEVYsAUvG7EFHD5ZsQ4E9DAx//8AHAAABR0G+wImACUAAAEHAGoA+QE2ABcAsABFWLAELxuxBBw+WbERBPSwG9AwMQD//wAcAAAFHQeRAiYAJQAAAQcAjwFQAUEAFwCwAEVYsAQvG7EEHD5ZsQ4G9LAY0DAxAP//AHf+RATYBcQCJgAnAAAABwB5AdL/9///AKkAAARGB0ACJgApAAABBwBEAPsBQgAUALAARViwBi8bsQYcPlmxDQj0MDH//wCpAAAERgdAAiYAKQAAAQcAdQGKAUIAFACwAEVYsAYvG7EGHD5ZsQ4I9DAx//8AqQAABEYHQgImACkAAAEHAI4AlAFCABQAsABFWLAGLxuxBhw+WbEQBvQwMf//AKkAAARGBwcCJgApAAABBwBqAMQBQgAXALAARViwBi8bsQYcPlmxEgT0sBvQMDEA////4AAAAYEHQAImAC0AAAEHAET/pwFCABQAsABFWLACLxuxAhw+WbEFCPQwMf//ALAAAAJRB0ACJgAtAAABBwB1ADUBQgAUALAARViwAy8bsQMcPlmxBgj0MDH////pAAACRgdCAiYALQAAAQcAjv9AAUIAFACwAEVYsAIvG7ECHD5ZsQgG9DAx////1gAAAl8HBwImAC0AAAEHAGr/cAFCABcAsABFWLACLxuxAhw+WbEKBPSwFNAwMQD//wCpAAAFCAciAiYAMgAAAQcAkAD7AToAFACwAEVYsAYvG7EGHD5ZsQ0E9DAx//8Adv/sBQkHNgImADMAAAEHAEQBUgE4ABQAsABFWLANLxuxDRw+WbEhCPQwMf//AHb/7AUJBzYCJgAzAAABBwB1AeEBOAAUALAARViwDS8bsQ0cPlmxIgj0MDH//wB2/+wFCQc4AiYAMwAAAQcAjgDrATgAFACwAEVYsA0vG7ENHD5ZsSIG9DAx//8Adv/sBQkHJAImADMAAAEHAJAA5wE8ABQAsABFWLANLxuxDRw+WbEjBPQwMf//AHb/7AUJBv0CJgAzAAABBwBqARsBOAAXALAARViwDS8bsQ0cPlmxJwT0sDDQMDEA//8AjP/sBKoHNAImADkAAAEHAEQBKwE2ABQAsABFWLAKLxuxChw+WbEUCPQwMf//AIz/7ASqBzQCJgA5AAABBwB1AboBNgAUALAARViwEi8bsRIcPlmxFQj0MDH//wCM/+wEqgc2AiYAOQAAAQcAjgDEATYAFACwAEVYsAovG7EKHD5ZsRcG9DAx//8AjP/sBKoG+wImADkAAAEHAGoA9AE2ABcAsABFWLAKLxuxChw+WbEZBPSwI9AwMQD//wAPAAAEuwc0AiYAPQAAAQcAdQGIATYAFACwAEVYsAEvG7EBHD5ZsQsI9DAx//8Abf/sA+oF/gImAEUAAAEHAEQA1QAAABQAsABFWLAXLxuxFxg+WbEqCfQwMf//AG3/7APqBf4CJgBFAAABBwB1AWQAAAAUALAARViwFy8bsRcYPlmxKwn0MDH//wBt/+wD6gYAAiYARQAAAQYAjm4AABQAsABFWLAXLxuxFxg+WbErAfQwMf//AG3/7APqBewCJgBFAAABBgCQagQAFACwAEVYsBcvG7EXGD5ZsSwB9DAx//8Abf/sA+oFxQImAEUAAAEHAGoAngAAABcAsABFWLAXLxuxFxg+WbEwAfSwOdAwMQD//wBt/+wD6gZbAiYARQAAAQcAjwD1AAsAFwCwAEVYsBcvG7EXGD5ZsSwE9LA20DAxAP//AFz+RAPsBE4CJgBHAAAABwB5AT//9///AF3/7APzBf4CJgBJAAABBwBEAMUAAAAUALAARViwCC8bsQgYPlmxHwn0MDH//wBd/+wD8wX+AiYASQAAAQcAdQFUAAAAFACwAEVYsAgvG7EIGD5ZsSAJ9DAx//8AXf/sA/MGAAImAEkAAAEGAI5eAAAUALAARViwCC8bsQgYPlmxIAH0MDH//wBd/+wD8wXFAiYASQAAAQcAagCOAAAAFwCwAEVYsAgvG7EIGD5ZsSUB9LAu0DAxAP///8YAAAFnBf0CJgCLAAABBgBEjf8AFACwAEVYsAIvG7ECGD5ZsQUJ9DAx//8AlgAAAjcF/QImAIsAAAEGAHUb/wAUALAARViwAy8bsQMYPlmxBgn0MDH////PAAACLAX/AiYAiwAAAQcAjv8m//8AFACwAEVYsAIvG7ECGD5ZsQgB9DAx////vAAAAkUFxAImAIsAAAEHAGr/Vv//ABcAsABFWLACLxuxAhg+WbELAfSwFNAwMQD//wCMAAAD3wXsAiYAUgAAAQYAkGEEABQAsABFWLADLxuxAxg+WbEVAfQwMf//AFv/7AQ0Bf4CJgBTAAABBwBEAM8AAAAUALAARViwBC8bsQQYPlmxHQn0MDH//wBb/+wENAX+AiYAUwAAAQcAdQFeAAAAFACwAEVYsAQvG7EEGD5ZsR4J9DAx//8AW//sBDQGAAImAFMAAAEGAI5oAAAUALAARViwBC8bsQQYPlmxHgH0MDH//wBb/+wENAXsAiYAUwAAAQYAkGQEABQAsABFWLAELxuxBBg+WbEfAfQwMf//AFv/7AQ0BcUCJgBTAAABBwBqAJgAAAAXALAARViwBC8bsQQYPlmxIwH0sCzQMDEA//8AiP/sA9wF/gImAFkAAAEHAEQAxwAAABQAsABFWLAHLxuxBxg+WbESCfQwMf//AIj/7APcBf4CJgBZAAABBwB1AVYAAAAUALAARViwDS8bsQ0YPlmxEwn0MDH//wCI/+wD3AYAAiYAWQAAAQYAjmAAABQAsABFWLAHLxuxBxg+WbEVAfQwMf//AIj/7APcBcUCJgBZAAABBwBqAJAAAAAXALAARViwBy8bsQcYPlmxGAH0sCHQMDEA//8AFv5LA7AF/gImAF0AAAEHAHUBGwAAABQAsABFWLABLxuxARg+WbESCfQwMf//ABb+SwOwBcUCJgBdAAABBgBqVQAAFwCwAEVYsA8vG7EPGD5ZsRcB9LAg0DAxAAAAAAEAAADeAI8AFgBUAAUAAQAAAAAADgAAAgACFAAGAAEAAABhAGEAYQBhAGEAkwC4ATgBqgI6As0C5AMOAzgDawOQA68DxQPmA/0ESgR4BMcFPAV/Bd8GPgZrBt8HRgdbB3AHjwe2B9UIMwjWCRUJdAnICg0KTQqDCusLLQtIC3sL0Av0DEIMfgzTDR4Ngw3fDkoOdA62DuYPOw+QD8AP+BAcEDMQWBB/EJoQuhEyEZAR4xJBEqgS+hN0E7kT8RQ9FJQUrxUaFWUVsxYXFngWtRcfF3EXuBfoGDYYfRjCGPoZOxlSGZIZ2RoMGmga2hs9G5wbuxxgHI8dNR2jHa8dzB6EHpoe1h8ZH2kf5CAEIE0geSCYINMhBSFPIVshdSGPIakiCiJtIqsjJiN6I+okqCUXJWgl2SY4JlMm1idwJ54n1ygbKCUoLyhTKHcomSilKLEo6SkMKSgpRSlYKWwp6CoDKmsqvSroKzcrpivoK+gr8CxWLG0shCybLLIsyyzkLPAtBy0eLTUtTi1lLXwtky2sLcMt2i3xLgguHy44Lk8uZi59LpYurS7ELtsu8S8HLyAvOS9FL1wvcy+JL6IvuC/OL+Uv/jAUMCswQjBYMG4whzCeMLUwyzDkMPsxEwAAAAEAAAACAAAwG1GuXw889QAbCAAAAAAAxPARLgAAAADQ206a+hv91QkwCHMAAAAJAAIAAAAAAAADjABkAAAAAAAAAAAB+wAAAfsAAAIPAKACjwCIBO0AdwR+AG4F3ABpBPkAZQFlAGcCvACFAsgAJgNyABwEiQBOAZIAHQI1ACUCGwCQA0wAEgR+AHMEfgCqBH4AXQR+AF4EfgA1BH4AmgR+AIQEfgBNBH4AcAR+AGQB8ACGAbEAKQQRAEgEZACYBC4AhgPHAEsHLwBqBTgAHAT7AKkFNQB3BT8AqQSMAKkEbACpBXMAegW0AKkCLQC3BGoANQUEAKkETgCpBvwAqQW0AKkFgAB2BQwAqQWAAG0E7QCoBL8AUATGADEFMACMBRcAHAcZAD0FBAA5BM4ADwTKAFYCHwCSA0gAKAIfAAkDWABAA5wABAJ5ADkEWgBtBH0AjAQwAFwEgwBfBD0AXQLHADwEfQBgBGgAjAHxAI0B6f+/BA4AjQHxAJwHAwCLBGoAjASQAFsEfQCMBIwAXwK1AIwEIABfAp0ACQRpAIgD4AAhBgMAKwP3ACkDyQAWA/cAWAK1AEAB8wCvArUAEwVxAIMB8wCLBGAAaQSmAFsFtABpBNgAHwHrAJME6ABaA1gAZgZJAFsDkwCTA8EAZgRuAH8GSgBaA6oAeAL9AIIERgBhAu8AQgLvAD4CggB7BIgAmgPpAEMCFgCTAfsAdALvAHoDowB6A8AAZgXcAFUGNQBQBjkAbwPJAEQHev/yBEQAWQWAAHYEugCmBMIAiwbBAE4EsAB+BJEARwSIAFsEnACVAfoAmwehAGgHRABhA8QAqQKtAHkDxgB7BUAAogY/AJABmQBgAZkAMAGXACQC1ABoAtsAPALBACQCsgCKAmYAbAJmAFkDowA7Au8ANgR+AF8EkgCoBG4AHwSLADwC7wB6Au8AQgLvAD4C7wA2AfsAAAI1ACUFXQAlBTgAHAU4ABwFOAAcBTgAHAU4ABwFOAAcBTUAdwSMAKkEjACpBIwAqQSMAKkCLf/gAi0AsAIt/+kCLf/WBbQAqQWAAHYFgAB2BYAAdgWAAHYFgAB2BTAAjAUwAIwFMACMBTAAjATOAA8EWgBtBFoAbQRaAG0EWgBtBFoAbQRaAG0EMABcBD0AXQQ9AF0EPQBdBD0AXQH6/8YB+gCWAfr/zwH6/7wEagCMBJAAWwSQAFsEkABbBJAAWwSQAFsEaQCIBGkAiARpAIgEaQCIA8kAFgAWAAAAAQAAB2z+DAAACUn6G/5KCTAAAQAAAAAAAAAAAAAAAAAAAN0AAwSFAZAABQAABZoFMwAAAR8FmgUzAAAD0QBmAgAAAAIAAAAAAAAAAADgAAr/UAAhfwAAACEAAAAAR09PRwBAAAD//QYA/gAAZgeaAgAgAAGfAAAAAAQ6BbAAIAAgAAIAAAABAAAA4AkJBAAAAgICAwYFBwYCAwMEBQICAgQFBQUFBQUFBQUFAgIFBQUECAYGBgYFBQYGAgUGBQgGBgYGBgUFBgYIBgUFAgQCBAQDBQUFBQUDBQUCAgUCCAUFBQUDBQMFBAcEBAQDAgMGAgUFBgUCBgQHBAQFBwQDBQMDAwUEAgIDBAQHBwcECAUGBQUIBQUFBQIJCAQDBAYHAgICAwMDAwMDBAMFBQUFAwMDAwICBgYGBgYGBgYFBQUFAgICAgYGBgYGBgYGBgYFBQUFBQUFBQUFBQUCAgICBQUFBQUFBQUFBQQEAAAAAwAAAAMAAAAcAAMAAQAAABwAAwAKAAABYAAEAUQAAAA2ACAABAAWAAAADQB+AKAArACtAL8AxgDPAOYA7wD/ATEBUwLGAtoC3CAUIBogHiAiIDogRCB0IKwiEv//AAAAAAANACAAoAChAK0ArgDAAMcA0ADnAPABMQFSAsYC2gLcIBMgGCAcICIgOSBEIHQgrCIS//8AAf/2/+QABv/C//r/wQAA/+gAAP/iAAD/Wv86/cj9tf204H7ge+B64HfgYeBY4Cnf8t6NAAEAAAAAAAAAAAAAAAAAAAAoAAAAMgAAAFwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAqQCqAKsArACtAK4AgQCoALgAuQC6ALsAvAC9AIIAgwC+AL8AwADBAMIAhACFAMMAxADFAMYAxwDIAIYAhwDSANMA1ADVANYA1wCIAIkA2ADZANoA2wDcAIoA3QAMAAAAAAHYAAAAAAAAACYAAAAAAAAAAAAAAAEAAAANAAAADQAAAAMAAAAgAAAAfgAAAAQAAACgAAAAoAAAAKYAAAChAAAArAAAAGMAAACtAAAArQAAAKcAAACuAAAAvwAAAG8AAADAAAAAxQAAAKkAAADGAAAAxgAAAIEAAADHAAAAzwAAAK8AAADQAAAA0AAAAKgAAADRAAAA1gAAALgAAADXAAAA2AAAAIIAAADZAAAA3QAAAL4AAADeAAAA3wAAAIQAAADgAAAA5QAAAMMAAADmAAAA5gAAAIYAAADnAAAA7wAAAMkAAADwAAAA8AAAAIcAAADxAAAA9gAAANIAAAD3AAAA+AAAAIgAAAD5AAAA/QAAANgAAAD+AAAA/gAAAIoAAAD/AAAA/wAAAN0AAAExAAABMQAAAIsAAAFSAAABUwAAAIwAAALGAAACxgAAAI4AAALaAAAC2gAAAI8AAALcAAAC3AAAAJAAACATAAAgFAAAAJEAACAYAAAgGgAAAJMAACAcAAAgHgAAAJYAACAiAAAgIgAAAJkAACA5AAAgOgAAAJoAACBEAAAgRAAAAJwAACB0AAAgdAAAAJ0AACCsAAAgrAAAAJ4AACISAAAiEgAAAJ+wACxLsAlQWLEBAY5ZuAH/hbCEHbEJA19eLbABLCAgRWlEsAFgLbACLLABKiEtsAMsIEawAyVGUlgjWSCKIIpJZIogRiBoYWSwBCVGIGhhZFJYI2WKWS8gsABTWGkgsABUWCGwQFkbaSCwAFRYIbBAZVlZOi2wBCwgRrAEJUZSWCOKWSBGIGphZLAEJUYgamFkUlgjilkv/S2wBSxLILADJlBYUViwgEQbsEBEWRshISBFsMBQWLDARBshWVktsAYsICBFaUSwAWAgIEV9aRhEsAFgLbAHLLAGKi2wCCxLILADJlNYsEAbsABZioogsAMmU1gjIbCAioobiiNZILADJlNYIyGwwIqKG4ojWSCwAyZTWCMhuAEAioobiiNZILADJlNYIyG4AUCKihuKI1kgsAMmU1iwAyVFuAGAUFgjIbgBgCMhG7ADJUUjISMhWRshWUQtsAksS1NYRUQbISFZLbAKLLAkRS2wCyywJUUtsAwssScBiCCKU1i5QAAEAGO4CACIVFi5ACQD6HBZG7AjU1iwIIi4EABUWLkAJAPocFlZWS2wDSywQIi4IABaWLElAEQbuQAlA+hEWS2wDCuwACsAsgEOAisBsg8BAisBtw86MCUbEAAIKwC3AUg7LiEUAAgrtwJYSDgoFAAIK7cDUkM0JRYACCu3BF5NPCsZAAgrtwU2LCIZDwAIK7cGcV1GMhsACCu3B5F3XDojAAgrtwh+Z1A5GgAIK7cJVEU2JhcACCu3CnZgSzYdAAgrtwuDZE46IwAIK7cM2bKKYzwACCu3DRQRDQkGAAgrtw48MiccEQAIKwCyEAoHK7AAIEV9aRhEsjASAXOysBQBc7JQFAF0soAUAXSycBQBdbIPHAFzsm8cAXUAACoAnQCAAIoAeADUAGQATgBaAIcAYABWADQCPAC8AMQAAAAU/mAAFAKbACADIQALBDoAFASNABAFsAAUBhgAFQGmABEGwAAOAAAAAAAAAAcAWgADAAEECQABAAwAAAADAAEECQACAA4ADAADAAEECQADAAwAAAADAAEECQAEAAwAAAADAAEECQAFACwAGgADAAEECQAGABwARgADAAEECQAOAFQAYgBSAG8AYgBvAHQAbwBSAGUAZwB1AGwAYQByAFYAZQByAHMAaQBvAG4AIAAyAC4AMAAwADEAMQAwADEAOwAgADIAMAAxADQAUgBvAGIAbwB0AG8ALQBSAGUAZwB1AGwAYQByAGgAdAB0AHAAOgAvAC8AdwB3AHcALgBhAHAAYQBjAGgAZQAuAG8AcgBnAC8AbABpAGMAZQBuAHMAZQBzAC8ATABJAEMARQBOAFMARQAtADIALgAwAAMAAAAAAAD/agBkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQACAAgAAv//AA8AAQAAAAwAAAAAAAAAAgAKACUAPgABAEUAXgABAHkAeQADAIEAgQABAIMAgwABAIYAhgABAIkAiQABAIsAjQABAKAAoQACAKgA3QABAAEAAAAKAFQAdAAEREZMVAAaY3lybAAmZ3JlawAybGF0bgA+AAQAAAAA//8AAQAAAAQAAAAA//8AAQABAAQAAAAA//8AAQACAAQAAAAA//8AAQADAARrZXJuABprZXJuABprZXJuABprZXJuABoAAAABAAAAAQAEAAIAAAAEAA4CDgOSBFIAAQCCAAQAAAA8AYgBiAD+AY4BnAG0AaoBBAEKARABtAEWASABQgFUAboBZgH0AWwB9AH0AfQB9AF6AfoB+gGIAYgBiAGIAbQBjgGOAY4BjgGOAY4BnAGqAaoBqgGqAbQBtAG0AbQBtAG6AfQB9AH0AfQB9AH0AfQB9AH0AfQB+gH6AAEAPAAGAAsAEwAlACcAKAApACoALwAwADMANAA4ADoAOwA9AD4ASQBKAEwAUQBSAFMAVgBaAF0AkwCUAJYAlwCoAKkAqgCrAKwArQCuAK8AsACxALIAswC5ALoAuwC8AL0AwgDKAMsAzADNANIA0wDUANUA1gDXANwA3QABABP/IAABAFb/5gABAFv/wQABAFv/pAACAFgADgCB/58ACAAE/9gAVv+1AFv/xwBt/rgAfP8oAIH/TQCG/44Aif+hAAQADQAUAEEAEQBW/+IAYQATAAQADQAPAEEADABW/+sAYQAOAAEAW//lAAMADQAUAEEAEgBhABMAAwBKAA8AWAAyAFsAEQABAFsACwADACP/wwBY/+8AW//fAAMADf/mAEH/9ABh/+8AAgBK/+4AW//qAAEAgf/fAA4ACv/iAA0AFAAO/88AQQASAEr/6gBW/9gAWP/qAGEAEwBt/64AfP/NAIH/oACG/8EAif/AAJn/0wABAJT/sAABAEoADQABABgABAAAAAcAKgAwAEIA/AESASQBPgABAAcABAAMACoANQA2AD8ASgABADj/2AAEADoAFAA7ABIAPQAWAMIAFgAuABD/FgAS/xYAJf9WAC7++AA4ABQARf/eAEf/6wBI/+sASf/rAEv/6wBT/+sAVf/rAFn/6gBa/+gAXf/oAI3/6wCV/xYAmP8WAKn/VgCq/1YAq/9WAKz/VgCt/1YArv9WAMP/3gDE/94Axf/eAMb/3gDH/94AyP/eAMn/6wDK/+sAy//rAMz/6wDN/+sA0//rANT/6wDV/+sA1v/rANf/6wDY/+oA2f/qANr/6gDb/+oA3P/oAN3/6AAFADj/1QA6/+QAO//sAD3/3QDC/90ABAA4/7AAOv/tAD3/0ADC/9AABgAu/+4AOf/uAL7/7gC//+4AwP/uAMH/7gARAAYAEAALABAAR//oAEj/6ABJ/+gAS//oAFX/6ACN/+gAkwAQAJQAEACWABAAlwAQAMn/6ADK/+gAy//oAMz/6ADN/+gAAQAUAAQAAAAFACIAUABqAHwAlgABAAUATwBYAFsAXwCUAAsAR//sAEj/7ABJ/+wAS//sAFX/7ACN/+wAyf/sAMr/7ADL/+wAzP/sAM3/7AAGAFP/7ADT/+wA1P/sANX/7ADW/+wA1//sAAQAEP+EABL/hACV/4QAmP+EAAYALv/sADn/7AC+/+wAv//sAMD/7ADB/+wACgBMACAATwAgAFAAIABT/4AAV/+QANP/gADU/4AA1f+AANb/gADX/4AAAgVQAAQAAAXGBwgAHAAYAAD/zv/1/+//iP/0/7v/f//1AAz/qf+iAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/5QAAAAD/6P/JAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/4wAAAAAAAP/kABIAEQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/5QAAAAD/6v/V/+v/6v+a/+kAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/4wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/5gAAAAAAAP/tAAAAFP/vAAAAAAAAAAAAAAAAAAD/7QAAAAAAAAAAAAAAAAAAAAD/uP/kAAAAAP+dAA8AEP+h/8QAEAAQ/7EAAP8mAAD/nf+z/xj/k//w/4//jP8QAAD/2P/hAAAAAP/lAAAAAP/pAAAAAAAAAAAAAAAAAAD/5gAA/8D/6QAAAAAAAAAAAAD/e/+//8r+sAAA/3H+7f/UAAD/Uf8RABMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwAAAAAAAP/zAAAAAAAAAAAAAAAA/3b/4f68/+b/8wAAAAAAAAAA//UAAP84AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/+oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/9f/zAAAAAP/SAAAAAP/kAAAAAAAA/7UAAP8fAAD/1AAA/9sAAAAA/9IAAAAAAAD/4f/nAAAAAP/rAAAAAP/rAAAADgAAAAAAAAAAAAD/5gAA/9IAAAAAAAAAAAAAAAD/7P/j/6AAAP+/ABEAEf/Z/+IAEgAS/6IADf8tAAD/v//p/8z/2P/w/7f/xv+gAAAAAAAAAAAAAP/hAAAADv/tAAAAAAAA/9UAAP+FAAD/4QAA/8QAAAAA/98AAAAAAAD/5f/mAAAAAP/rAAAAAP/tAAAAAAAAAA0AAAAAAAD/6wAAAAAAAAAAAAAAAAAAAAD/8QAAAAD/vQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/9QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/9QAAAAD/4wAAAAAAAAAA//EAAAAAAAAAAAAAAAAAAP/xAAAAAAAAAAAAAAAAAAD/8wAAAAD/8gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/mAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/8QAAAAD/eAAAAAAAAAAA//AAAAAAAAAAAAAAAAAAAP/rAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//xAAAAAAAAAAAAAAAAAAAAAP+VAAD/8wAAAAAAAAAA//EAAAAAAAAAEgAAAAAAEP/sAAAAAAAAAAAAAAAAAAAAAP+FAAD/7QAAAAAAAAAA/9gAAAAAAAAAAAAAAAAAAP/sAAAAAAAAAAAAAAAAAAAAAAAAAAD/7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/wAAAAAAAAAAAAAAAAAAAAAAAAAAD/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/lf/DAAAAAAAAAAAAAAAA/4gAAAAAAAD/xQAAAAD/7AAA/87/sAAAAAAAAAAAAAD/VgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAEwAGAAYAAAALAAsAAQAQABAAAgASABIAAwAlACkABAAsADQACQA4AD4AEgBFAEcAGQBJAEkAHABMAEwAHQBRAFQAHgBWAFYAIgBaAFoAIwBcAF4AJACKAIoAJwCTAJgAKACoAM0ALgDSANcAVADcAN0AWgACADUABgAGABoACwALABoAEAAQABsAEgASABsAJgAmAAEAJwAnAAQAKAAoAAMAKQApAAUALAAtAAIALgAuAAoALwAvAAcAMAAwAAgAMQAyAAIAMwAzAAMANAA0AAkAOAA4AAYAOQA5AAoAOgA6AAsAOwA7AA4APAA8AAwAPQA9AA0APgA+AA8ARQBFABAARgBGABIARwBHABEASQBJABMATABMABQAUQBSABQAUwBTABUAVABUABIAVgBWABcAWgBaABYAXABcABgAXQBdABYAXgBeABkAigCKABIAkwCUABoAlQCVABsAlgCXABoAmACYABsAqACoAAMArwCvAAQAsACzAAUAtAC4AAIAuQC9AAMAvgDBAAoAwgDCAA0AwwDIABAAyQDJABEAygDNABMA0gDSABQA0wDXABUA3ADdABYAAgA0AAYABgAEAAsACwAEABAAEAAOABEAEQASABIAEgAOACUAJQAMACcAJwACACsAKwACAC4ALgAXADMAMwACADUANQACADcANwAUADgAOAAHADkAOQADADoAOgAKADsAOwAGADwAPAANAD0APQALAD4APgAPAEUARQAVAEcASQAQAEsASwAQAFEAUgATAFMAUwAFAFQAVAATAFUAVQAQAFcAVwAWAFkAWQAIAFoAWgABAFwAXAARAF0AXQABAF4AXgAJAIMAgwACAIwAjAACAI0AjQAQAJEAkgASAJMAlAAEAJUAlQAOAJYAlwAEAJgAmAAOAKcApwASAKkArgAMAK8ArwACALkAvQACAL4AwQADAMIAwgALAMMAyAAVAMkAzQAQANIA0gATANMA1wAFANgA2wAIANwA3QABAAAAAQAAAAoALABIAAFsYXRuAAgACgABVFVSIAASAAD//wABAAAAAP//AAEAAQACbGlnYQAObGlnYQAWAAAAAgAAAAEAAAABAAEAAgAGACAABAAAAAEACAABACwAAQAIAAEABACgAAIATQAEAAAAAQAIAAEAEgABAAgAAQAEAKEAAgBQAAEAAQBK) format('truetype')}#toasty .toast.toasty-theme-default{font-family:Tahoma,Geneva,sans-serif!important;font-size:12px;border-radius:0}#toasty .toast.toasty-theme-default .close-button:after{content:'x';color:#fff;font-size:17px;font-weight:100}#toasty .toast.toasty-theme-default .toast-text{color:#fff}#toasty .toast.toasty-theme-default .toast-text .toast-title{font-size:13px}#toasty .toast.toasty-theme-default .toast-text a,#toasty .toast.toasty-theme-default .toast-text label{color:#fff}#toasty .toast.toasty-theme-default .toast-text a:hover,#toasty .toast.toasty-theme-default .toast-text label:hover{color:#f2f2f2}#toasty .toast.toasty-theme-default.toasty-type-default{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NEEzQTA1RTUzMjJBMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NEEzQTA1RTYzMjJBMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0QTNBMDVFMzMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0QTNBMDVFNDMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pr4ktvwAAADlSURBVHja7NrRDYIwEIDh1jAAozhKN/BWcgJ0A0dgBEbRCbCNkphaTAsPXpv/kkugELgv5eCh2HmeTQtxMI0EEG3RxQPW2mXT+Tz57JXUevd59XkLO1+9HQY+8x1DOKQ0h2TdCYhTjFjSxXWnekQqaAnJafa+AkjP6xcIECBAgAABAgQIECBAgAABAgQIECC7Y2oB8vB5qR0SEJKakW7Dxc7mtejyj8dpXL13Yn0knLy2LiFapiZnoWfUjtgDEW3NsgUiGru+FCJaX18lELWIEohqRC7kWMOXMa7b8ncQECA/4ynAAPBVcVo7OMcUAAAAAElFTkSuQmCC)!important;background-color:#efefef}#toasty .toast.toasty-theme-default.toasty-type-default .close-button:after{color:#000!important}#toasty .toast.toasty-theme-default.toasty-type-default .toast-text{color:#4b4b4b}#toasty .toast.toasty-theme-default.toasty-type-default .toast-text a,#toasty .toast.toasty-theme-default.toasty-type-default .toast-text label{color:#4b4b4b}#toasty .toast.toasty-theme-default.toasty-type-default .toast-text a:hover,#toasty .toast.toasty-theme-default.toasty-type-default .toast-text label:hover{color:#585858}#toasty .toast.toasty-theme-default.toasty-type-info{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NEEzQTA1RTkzMjJBMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NEEzQTA1RUEzMjJBMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0QTNBMDVFNzMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0QTNBMDVFODMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvCIVOQAAALtSURBVHja3Jq9axRBGMZnj+ViAhbaaISLR1AUBBNjEq7zD7gUiqIIgraKVf4Ay9gljYVFiliJEklyJE26dJsPYy5pE/AQtNNC8SMXHJ/BN7C3O/exe+/c7twLP5jmZp7ndnZ25n3HkVKKboiM6JJwmfrpA6fACCiAIXAB5H1/1l/wEeyDMvDANvgGfrYrwGlzavWDcfAQ3IrZxwJ4BTbAl9hKlJEY5MADsCv5Ypf6zMXRFPUHLigCT5oLj8ZwTRk5C57LzoUaq5/byFWwLDsfS+Ayl5EC87sQNTZJQ0OdzVYttYS+oWU1yVDL9D1auiN/EM+BmRSYEKRhhjRFMpIFT0ExRR/vImnKRvkgqh+9Az0p24n8AbfBSitPZAA8YzJRBT+IKkN/PaRtoJkRB9ygbQdHzILTxCxTn+Ok0WlkRO2dJhmnwhE9iSq1uWKStGqNOOR2mHHAM7TijFCbK4ZJq6N72U+A1+Am44C/wHdqnwS9jH0vgvvgd9CIWqM/WXTYUuebHPgcnFqjlp0YM6Q59I4UDAymDkuPiQ0D/Rd0R90hQ0ZeUvsK47Ie0uw3Mmjo8WcNJjoGdVMrb2Agp06bK/I6I66wL9yuy2tlAtsJ2+JIZ6RioZGKzsiBhUYOdEbKFhop64x4FhrxdEa2VAbVIhOSNIeMfAUli4yUSHPIiDrYz1lkZI40h4xI2uTtWGBih7TKel92VZ+YNjCXud+9aRGopbiaQdfILceWewJcpPYlxqPBWvDPqZegUwLmRToTdHfAcqO9lj9W6fGlaTmWpGm12abRH4fghdCkJhOMFdJ0qD34tFBWeAuuJWziA7grYpYVBP3wifhfn0gqtknDfuOJ11rpTZW/SglUq0qcpbdjVGFyqoMmpkwUQ/3l6QmwbtDAOo3hmqyzBy8M7DEa2GvnwkC7VzhUvngMPBLxk9+LtAHcFJTHjZV3YrrmdHyp5rqovVRzXtReqqmI2ks170VKLtWkMh1kdfwTYADvtL/RevtcWAAAAABJRU5ErkJggg==)!important;background-color:#3ebfa8}#toasty .toast.toasty-theme-default.toasty-type-wait{background-image:url(data:image/gif;base64,R0lGODlhIAAgAPcAAAAAACZOTh5eXiJSViZUVCRUViZUVlp+gCJWVjxmaC5cXGKEhlyAgE50dM7Y2MzY2GCEhDRgYjhiZDhkZDhkZkJsbFZ8fDpmZjxmZkZucEhwckpwckpyckpydExydEx0dFB2eFp+flJ4elZ6elZ6fKq8vFh+fmCAgmKGhsbS0maGiJywsGSEhrTExJiurn6amrLCwhhMTCJUVq7AwCJUVBxUVCRSVCJSVCRSViRSUiJSUmyKjChWVj5oajJeYE50djZiYjpkZkRsblh8fkhwcFJ4eFR4elh8fChYWCpUVCpYWCpYWixaWixaXC5aXIagoDRgYCRUVD5oaEBqakRubkBqbEJqbE52diZWVjBcXjZgYihWWDJgYCZWWCRaWi5cXjBeXlB2dlp8fjJeXiRWVgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEFAGUAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAIAAgAAAI/gDLCBxIsEyUAgUG0KCBsACBghAjliEwwEbDiw1xFNAhMWIBjRgbZkGCseNAHg15SGCCMcKBAwkw0uiIgGEBHkYOgCBwscLLCiEfQuRhswCSEC8jNCQAImlIHDMLhvR54AdPoy8PoHwqNaQSpAeUFgDy8sdFAhF6GEg4kADIs0LKIqQ6pefLHgVqChxgNAvGJVl9FGjgtACTpi8/NBRoUYNOClsLZDhgQkGBCBs6YCkgwUTWDiQRGsSa1UIPkkgmhL6YICtMjFcJVAD7MkTMkAh7vBRhGXdDJD0sZOXgu4CBDBlWY+SLUUJTscWL47jhW7nvCUJ6XADiQ8HaAdSD/q6NbmABivPoDyREcBGJhAwWLFjHyAO9fQgfES7pccX1ASDRETBBBhw0IIIFDBDHnmT+HWBBb7jxdFWEBbRWVg8KTBjUCymEUFwZOPAwhQQ8TOiDBcmd9YMDLJ5gUUll+IaFCC/FpEAFUxjgQwssOsDCi4uVocOCdlHGEmEHCBYBDD3u8CINZAwUkg9Z3bbBSxIg5MMMPaoQZFsNzfiSB1fF9RpCCpTA4hMEREVQUVSZsERDuh0AVEMKrODCEgTkEJFbBdQ5wUUTvKQBbAQQgEVHNGgUQQIaUnlAAyHR4KdJZQxAJJ4vgXARQ5i+iZsECUBYQJShQnQVDgMMgMOCA5gGBAAh+QQBBQBcACwAAAAAIAAgAIcAAAAmTk4eXl4iUlYmVFQkVFYmVFZafoAiVlY6ZmYsWlpmhohKcHKetLQyYGCesrI2YmI4YmQ4ZGQ4ZGZAampQdnhCbGxEbG5Ebm5GbnBIcHBIcHJOdHZWenpSeHhQdnZWfHxSeHpUeHpUenpWenxYfHxYenxYfH5Yfn5afn6csrKYrq4YTEwiVFYiVFQcVFQiUlQkUlaMpKYkUlIiUlKKoqSGoKKEnqB6lph4lJZqiowoVlY+aGguXFxMcnQ0YGJAamxOdnYoWFgqVFQqWFgqWFouXF4wXF4wXl4yXmBKcnRKcnIkVFQ8Zmg+aGpCamw8ZmYmVlYuWlw0YGAoVlhMdHQwXFwmVlhOdHQkWlosWlwkVlYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gC5CBxIkAuTAgUGuHCBsACBghAjciEwYEbDiw1jFKAhMWIBjRgbGhGCsePAHQ13RFCA8ceBAwkwuuiIgGGBHSIOVCBw0cJLCyEfQtxhs4AQFC8hNCRQ4eWPkDFmFgzp8wAHnkZfHkAJdWpIIkgPOEAI4SWHiwQcUDCQcCABkGgvmEVYlULPl3ZrChxg9AhGBVqRFODgFKGCpi+rNBRokYHOBFwLYDhwokcBBwx8RCkQ4YRWHyQRGsyqtQMFkkIkhL7IQ+uBJhixErAQ9iUKHiEbtj4QwnLuhkJ4gPj8u4CBDBhWY+SLMULTp8Wjx4DxW/lvCBQSRPhxRMHmAdSD+7KNTsC11hAJEVwUEiEDiA7WMUYxb/sjwiIUPphXGh07hswVjJBBAepJRh8IvuVGwHi/8dSEVhzw0ANWuRmwwAo+UFhSDDtQEMEOFCIBQgbKzdZAAw+cFZJAv0XhwUu49WDBWj3IcGIDHqzIBQ0F3nVACSwRJlYBR9RwYwkNubDFQCE5oFVMBTh2QAQI9WDDjSJgVRCFLr6UIUJyHYCbYTecqAMBUhFUVFUnsITQbkA1pAAOORBBwAwRvVUABS9JcJEELzEQGwEERNGRCxpBkICGTloVkgt4msTFAD021MNLFVzEkKRq5hZBAgkWsCSnEGEVwwADxFCgpAEBACH5BAEFAGQALAAAAAAgACAAhwAAACZOTh5eXiJSViZUVCRUViZUVlp+gCJWVj5oaCxaWmCCgl6Agk50dtji4jRgYqq8vDhiZDhkZDpmZjxmZjxmaERublZ6fD5maEpyckx0dE50dFJ4eFh+flR6elh8fFp+flZ6elh8fm6OjrTExmyMjq6+wHSSkp6ytBhMTCJUViJUVBxUVCRSVCJSVCRSViRSUiJSUiJQUmqKjISenmSGhihWWEBqbDBeXlB2djZiYjhkZkZucFZ8fEpydFJ4eoCcnIigoipUVGKEhCpYWk52djRgYHiUlCRUVIykpEZubpywsD5oakJsbEhwcExydEBqakJqbERsbkpwciZWVi5cXChYWDJgYFB2eFR4eipYWCZWWChWViRaWmaGhi5cXjJeYDBcXiRWVkhwcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AMkIHEiQDJICBQasWIGwAIGCECOSITCgRcOLDV8UiCExYgGNGBviIIKx40AbDW1EUIDxwYEDEzCu6IiAYQEbHg5wIHCxycsbIR9CtGHzZoeXDxoSyIE05IuZBUP6PNCA582XB1A6jRqSyNEDSQvoeNngIoEHTAwkHEgApFkLZBFOBdpwKpMCNQUOuIkDowKsfRs0LaCA6UsNDQVazKBzgtYCcDtUKfAggwYqBSJ8PaCBJEKDV7FeYELShgTPFxNgPUABo1UCTTYf6JAgZEPVBzxMtp0ywQWsGXgXMMDDwmOMezFG4ABWuPOPLngf562DyYQID3AowDwgelC1zgn8rMbqISGCi0Qi8PhwYTpGKuNfdviIkAgTw1h1PNdxw4LlHB7wgBdCcI13wW68WZVgARVg1UACVSgYVAYzUCDhRWS8YMMNEdigIA4f8KAVASRGMMKJCVxYgEC8UcHcASnyQAMQNhAxxIkj3HChQDGch9FUHShAAAQOOFCWAjee2IRVK4gxUEhXYBUTASgUOQRCCiyA45KfEaSgi4fxREASRZ5gFREMnFgWVAQVdYN8LDl0RJFBKOhVewTAEFFbBTDxkgQXeVHkEha5RkVHK2j0wAQSclCkCYU2tIKeJpExgI+pFUlCpAxV2mZQNYyQQKROegqRVS9094KPlQYEACH5BAEFAF0ALAAAAAAgACAAhwAAACZOTh5eXiJSViZUVCRUViZUVlp+gCJWVjxmaCxaWl6Agk50dqi8vDRgYo6mpjhiZDhkZDhkZkJsbFZ6ejpkZjpmZjxmZkZubkhwcEpwckpyckpydExydEx0dE50dFB2eFh+flJ4eFR4eFJ4elh8fFp+flR4elR6elh8foqipBhMTCJUViJUVBxUVCJSVCRSVoagoiRSUiJSUnyYmnyYmHCOjm6MjmqKjChWVkBqajJeYGiIilB2djZiYkRsblZ6fEZucEhwclJ2eChYWCpUVGKEhCpYWCpYWk52djRgYCRUVDZiZD5oaEJqbERubkBqbD5oaiZWVi5cXChWWDJgYCZWWCRaWi5cXjBcXjBeXlZ8fCRWVgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+ALsIHEiwy5ICBQa0aIGwAIGCECN2ITBARsOLDWEUmCExYgGNGBtiIYKx48AcDXNAUIDRwYEDCTC26IiAYYEcJw6AIHBxwssJIR9CzGGzAJEQLx00JAAiaUgYMwuG9HmAAU+jLw+gfCo15BGkB5QW8PGSwUUCDnQYSDiQAMizP8oipKqj58u6NQUOMJoFo4KsOwowcFpAQdOXHhoKtKhBp4StBTAcCDGlgAMNHKQUgAD2AAeSCA1izUpBB0kiEUBfTJAVJsarBCZ0nhwzJMImL0lUtt2QSBMgWTfwLmAgCAbVGPdihNBU7PDhMF7wRs7bh44EEBxkUaB5gPSga5/2E2idlURCBBeJQMhQggJ1jFLIvwzxESESHT3I+3g+VgeGDB2AgEIQBaAXmXxA7MYfbzyxVlYTU1zFm2z78dYFDDnoAEEOEu5QQhDU7ZAVBBIq1gVvUojwUgIENIEDDzkQQUJWEZRYgEAzGGjXZAoQEEMDDQB1xGEwXdUCFwOFJOKKDtEApAgIEUFkBSa21VCKL3VwlQ1ALnCVlC/9UEBUBBVFVQgsIWQEkDdImMMGGkhBgAwRuVWADi9FcNEJQNJgGwFSdNSCRg6weBEGQKoQUgt0mtTFADo2BAGQD1zEkKNlBjXCARBchCSmEF0FwwADwGCgowEBACH5BAEFAGYALAAAAAAgACAAhwAAACZOTh5eXiJSViZUVCRUViZUVlp+gCJWVj5oaC5cXF6AgFyAgFB2duTq6tjg4jZiYjhiZDpiZDhkZDhkZjpkZjpmZjxmZjxmaERublh8fj5maHiWluLo6EpwckpydNri4kxydEx0dE50dE50dk52dlJ4elp+flR6elZ6elZ6fFh+flZ8fHSSknqWmHKQkMjU1IykpIiiotbe4JqwsBhMTCJUViJUVBxUVCRSVCJSVCRSVoCanLDAwiRSUiJSUsbS0myKjChWWEJqbDRgYFB2eEZucEpyclR4emiIiGSGhmKEhihYWCpUVCpYWCpYWixYWixaWi5aXDRgYiRUVEBqakJsbEhwcD5oakBqbERsbkhwciZWVjBcXiZWWChWViRaWi5cXjBeXjJeYCRWVjJgYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AM0IHEjQDJUCBQbcuIGwAIGCECOaITAgR8OLDXcU+CExYgGNGBt2YYKx40AhDYVEiIKRyIEDFjDe6IiAYQEhKA4UIXDRysshIR9CFGLz5omXEBoSaPBySsgdMwuG9HmgAc+bLw+gfCo1pJOjB4gghPCywUUCRKoYSDiQAMizGV6SQEgVaMMhL6sUqClwwM0uGJ9kFVNgRFOEUZi+FNFQoEUPOilsLRBXg4ICRDx84FIggoasH0giNIg1a4oqJIVMEH0xQdYDFzBeJTAE7MsTCUI2dH3AxGXdKROoAA28gAEjGSZj9IsxQpGwxaN/1AFcOXAIVSxEINIlCucB1IP+ro1O4HVWEwkRXGQSwQiLFNYxcjF/+yPCJ1UUZ00aHcKQDB6E0AAKRuyFUFzmqfCbdMDxhEFWDSSgAAEEWKTbEBrwp5sZOwhRRQRCXFWACDPQsCBCLr0UgYiNmQGcE0A44IALBEBQRANCMGFCVhOwWIBAP6h3VgwygpCbEhxwMEEBTjz30gVX3UDGQCE1IKMDL/C0QJJ2MaFfBS221RAUMMjYw1UoJOlBSoplUEBUBNlEgAwyPiBBQyEkiYKIQnzgARcE+BCRWwTwIGMQIlqRJAM+OsRFRzfsQMACLbBYQZJK+HiDoCaZMQACPnaRZBIiMtRpnEFZYYQYIk55KkQKV+0wwAA7CNlpQAAh+QQBBQBcACwAAAAAIAAgAIcAAAAmTk4eXl4iUlYmVFQkVFYmVFZafoAiVlY8ZmgsWlxegIJOdHS0xMSyxMQ2YmI4YmQ4ZGQ6ZGZCbGxWenw6ZmY8ZmZEbm5Gbm5GbnBIcHBIcHJKcHJKcnJKcnRMcnRMdHRQdnZafn5QdnhSeHpYfn5UeHpUenpWenquwMCsvr6qvLyetLScsrIYTEwiVFaMpKYiVFQcVFQiUlQkUlZ+mpokUlIiUlJykJJwjpAoVlhAamoyXmBoiIpOdnY4ZGZEbG5YfH5khoZWfHwoWFgqVFQqWFgqWFosWlpggoJOdHY0YGA0YGIkVFQ+aGpCamw+aGhAamwmVlYuXFwyYGAmVlgoVlYkWlouXF4wXl4kVlYwXF4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gC5CBxIkEuTAgUGxIiBsACBghAjciEwwEbDiw1pFLghMWIBjRgbYiGCseNAHQ11QFCAccmBAwkwxuiIgGEBHSYOjCBwccLLCSEfQtRh86aIlw8aEgjxkklIGjMLhvR5IATPmy8PoHwqNaSRoweWIHzwMsRFAkt2GEg4kADIsxde+kBIdUfPl3ZrChxwMwvGI1l5FGDQFKECpi9BNBRocYNOCVsLxC0xpcASDh6kFIBQIqsHkggNYs1KYQdJHRFAX0yQFSbGqwQmgH0pImZIhE5ekqh8O6UTClk79C5gIMOFyBj5YoQwIuzw5x9n9Ebe+8GOBBCWZFGgeYD0oGuf+BNonZVEQgQXiUDIMIQCdYxSyNP+iPDIDsRZkz63fkHDhxAnZFAAepLJRwFv0PXGE2tlOTEFbLdNUIJ+t3FBgw47QKDDVQVMsEINLF3EQ1YQcLgYF70Z0UIDDQhRwBQTqEUECVlFYGIBAt1AoFI4sJhCUoQdIJgRzb2UwFUxaDFQSBiw2MACPHHwEgQIEYGfBCe21dARLLAIw1VxuYaQDohdUEBUBBWVA4sqiIXbTxfp0AEHUhBgQ0RuFdADiwdwGMFLGtxGgBQdxUDDUkmYOOIBDIQUw50mcTEAAjcqUNZFDEWa5m0QJBAiQkpqCtFVNAwwAA0ERhoQACH5BAEFAGkALAAAAAAgACAAhwAAACZOTh5eXiJSViZUVCRUViZUVlp+gCJWVj5oaC5cXGiIiGCCgk50du7y8tzk5GSEhjZiYjhkZIKenuzw8DpkZjpmZjxmZjxmaEZucFh8ft7m5kpyckxydEx0dE50dFB2eFp+flJ4elR4elR6elZ6elZ6fFh+flh8fH6amoSennyamsDMzhhMTCJUVp6ystri4iJUVBxUVCRSVCJSVCRSVoiioiRSUiJSUqS4uHSSlIagoMDMzGqKiihWWEJqbDJeYGqIilB2djhiZDhkZkpwcEpydFJ4eChYWCpUVCpYWCpYWixaWixaXC5aXDJgYDRgYDRgYkhwcCRUVHqWlnSSkkBqakJsbEpwckhwcj5oakBqbERsbkRubiZWVjBcXiZWWChWViRaWi5cXjJcXDBeXjJeXiRWVjBcXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+ANMIHEgwzZQCBQbEiIGwAIGCECOmITBgRsOLDWsUwCExYgGNGBt+QYKx40AfDX1IYIIRyoEDFjDG6IiAYQEfIw6AIHDxyssfIR9C9GHzZoiXERoSAPEySsgaMwuG9HmgAc+bLw+gfCo1pJKjB54gjPCywUUCT6wYSDiQAMizXMoipAq04Y+XVgrUFDjg5heMS7ICKdCgKUImTF96aCjQIgedFbYWyHBAg4ICTzh08FJAgoasHUgiNIg1awkrJFWKvpgg64ELGK8S+AH2ZYgEIRu2PiDicu6UCUxk5fC7gIEMGSRj7ItRAlMoxaN/pPFb+e8IVixIgPKFCecB1GP+G1By9TcB11lFJESAkMAMID1ybHjwt7gX9LY/Ooywg4WD//9BIF0EP2SgGQgkZKCXQy8ACOADxElXHE9UAMiCCkUQoGF5F/2gQVK/pVGDAjYsQIZFCEmQAgNKYAREVhJwOFoaDtWYkg4TTGCWAj+ohYQIMMooEA7snaVBjikMVtgBgymR2GtXxXDGQCFVkOMEHPD02AESIITEkxUwRlB5PuA4QQ8oxnUAbgj5kBgXBURFUFEmIOlbAbtdcZEPHHDgBQE3RORWASLkKEV5ErwUYWxedBSDRj90wOGLVYUUQ6AmpTEAAjIq8BIIFzGU6Zy5SWDBnQVMOSpEV9UwwAAFNRSZaUAAIfkEAQUAXQAsAAAAACAAIACHAAAAJk5OHl5eIlJWJlRUJFRWJlRWWn6AIlZWPGZoLlpcZoaITnR0vszMvMzMNGBiOGJkOGRkOGRmQmxsVnx8OmZmPGZmRm5wSHBySnBySnJySnJ0THJ0THR0UHZ4WH5+Unh4Unh6VHh6VHp6Vnp6Vnp8WHx+Wn5+sMLCsMDCrsDAmrCwGExMIlRWhqCgIlRUHFRUJFJUIlJUJFJWJFJSIlJSgJqccpCQbo6OboyMKFZWQGpqMl5gUHZ2NmJiOmRmRGxuWHx8SHBwKFhYKlRUKlhYKlhaLFpaLFpcTnR2MmBgNGBgJFRUPmhqQGpsRG5uPmhoQGhqQmpqQmpsJlZWMFxeKFZYJlZYJFpaLlxcMF5eJFZWLlxeAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACP4AuwgcSLALkwIFBrx4gbAAgYIQI3YhMCBGw4sNZxSoITFiAY0YG1YZgrHjQB0NdUA4gvHBgQMJML7oiIBhAR0iDnggcHHCywkhH0LUYbPAkA8vHzQk4CFpyBkzC4b0eaAHT6MvD6B8KjVkEaQHlBbw8bLHRQIPdhhIOJAAyLNAXiZBSHVHz5d2awocYLQKRiNZeRRg4LTAkaYvOzQUaBGDTglbC1w48MHvgwwbqBSAAPbABpIIDWLNSmEHySERQF9MkBUmxqsEJnSmHDMkwiYvQ/i13XBIEwpZNfAuYODCBdUY+WKE0FTs8OEzZPBGztvHjgQQHlQ5onmA9NcEdPZc5U2gddYQCRFcrPLBBQoUCp5TMf/yw0eEPHCsaMCf/4jnY+1wAQYceDDCBQWoV4AN/fWngl0ADsfTAv2tkIMU49kmmw/DdTHDETd8oEAMV/FAwXEY8ZAVBBmG1oVDLVIBwksxVTGBWkOEkFUELQpUg4J3UcYSYQcIVgRiMF31whYDhaQijQhl8BIECA2BZAWLETSejC9xcFVcrlWJGBAFREVQUVR9YERDuB0AVEoaZEAFATRE5FYBO7wUwUURvISBbQRQ0dELGj2QQIZPMhDSC3Wa1MUAQDakwEseXMSQo2faBkEC8TXEJKYQXTXDAAPMoKCjAQEAIfkEAQUAaQAsAAAAACAAIACHAAAAJk5OHl5eIlJWJlRUJFRWJlRWWn6AIlZWPGZoLlpcZoiIYoKETnR2+Pr61NzcZIaGjqao9vj4NGBi8PT08PLyOGJkOGRkOmRmRG5uWHx+OmZmPGZm5urq4ujoSnBySnJ0THJ0THR0TnR0Unh4Wn5+VHh6Vnx8WH5+WHx8hqCglqysdpSUjKamztjYvsrMjKSkgpycGExMIlRWsMDAIlRUHFRUJFJUIlJUJFJWdJKShJ6gJFJSIlJShKCgcI6OKlRUQmpsMl5gUHZ2NmJiSHBwSnJyUnh6VHp6KlhYLFhaLFpaLFpcMmBgNGBgJFRURm5uPmhqRGxuRm5wPmhoQGpqQmxsUHZ4Vnp8JlZWMFxeKFhYKlhaKFZWJFpaLlxcMlxeMF5eQGpsJFZWKFZYJlZYLlxeKFRWKlZYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACP4A0wgcSDDNkwIFBtSogbAAgYIQI6YhMOBGw4sNcxToITFiAY0YG2pJgrHjwC0Ns1hYgnHCgQMJMNboiIBhgSwmDpAgcFHKyyAhH0LcYrPAlhIvJzQkMCRpyBwzC4b0eaABT6MvD2QJ+VFqyCRIDygtQORlg4sEJkQxkHAgAZBoM5hFSBVowyAvoxSoKXBAAQVWrxZQklVIgQZOCyxp+lJEQ4E3CNBw8EBHkqtyNWgpMOEDiK0WNGQFQRKhwb8OUjvoAEMIgS0XSl9MkBUmxqsEVlBQ7YBCDK4Io7w0sRl4gRtgVHhQ/cIiVwNTMqDk6vdilx8uHDAwzv0jjqAEXP53JxIlgYUJWpZsHfA9pIGt3AnUzmoiIYKlSz4sUKFCNtcs871UwkcIaaEBCxEkmCAU4wWRwQchDIHEFHshBIGCCu5gQXfxFUCCgiycsCF3QWhAhHFp5ABWEUo4hJAQGkwxXUNCZGWBYI+lgRCON5HwUkxaBFGFAUnk9NIFPArUw30YUaUBS4gdYFgSPv54VQ1jDBRSjT8i9MFLIybB2AEY5OhWSlWGgFmXCG3BWAYFREVQUXgdoEGLwb0kxUVZgPBBFgTwENFbBQh3wAUXXfDSB1wRkEVHNWg0QQI4cnmWTIKalMYATF6kwEtDXMSQpnNyZUECClyUJakQXZXDAAcD5MCkpgEBACH5BAEFAGIALAAAAAAgACAAhwAAACZOTh5eXiJSViZUVCRUViZUVlp+gCJWVjpmZixaWlyAglyAgEpycsjU1DJgYMbU1DZiYjZiZDhiZDhkZDpkZkBqbFJ4ekRsbkRubkZucEZwcEhwcEpwclB2dlh8flB2eFh8fFh+flJ4eFp+fqi6ul6AgsLQ0JCoqMLO0HCOkJywsLrKyrjGxmKEhHSQkhhMTCJUViJUVBxUVCJSVCRSVqy+vnyYmCRSUiJSUihUVj5oajBaXE50dDRgYkJqbFR4eihYWCpUVCpYWCpYWixYWmyMjDJeYExydEpydCRUVDxmaEBqakJsbDxmZj5oaE50dkx0dCZWVi5cXDRgYChWWDBcXiZWWCRaWixaXFR6ei5cXjBcXDBeXiRWVihWVi5aXFZ8fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AMUIHEhQjJICBQbIkIGwAIGCECOKITAAR8OLDWsUyCExYgGNGBtaCYKx40CSCKVMUIDRx4EDCTDK6IiAYQEpQA6AIHARw0sLIR9CDGKzQBARLyM0JODhpY+QNWYWDOnzgAeeRl8ekBLy49SQQ5AeeIAwwksPFwk82GEg4UACINNWhYKwKtCGP17uKFBT4IACCjAQwApY65ECPZwiVND0ZZSGAnEQQOHAhosqWDMc+DClwIMGSLhO+KAVCcoCBgE7WO2AxQsrBIJQON1widYDSzBiJXDjBGsHJ4wQxrjj5YXOXRvyUNGC9YrkBQxoyED74t+lOkyUcAAEuvePNIL+EpgyvGuEHQkm+LCigOuA8CENcPVO4LbWCwkRXJTdQMSH6hhJYd9LInyE0BAWeLDAggtK8F0EFmQAmgdaaMAXQhswyOAHVnxHXwFLMOiBBVa0Bd0PHyiVnBg1SGHBbIQd8YEG1T2g1QTloSZGclJc8FJuU1hggQFB+PgSBeUJlIN+GFX1AUuJjVXAECBotQRWMngxUEg2vhRTAQ28NAFCQTQGE2QEEdbjS0hgVVVuZDaGQQFSEVSUBS892VBxB8zZkBQNNCAFAThEBFcBfFJwEQUvNdAVAVJ0JINGESQwXJc9hCRDoSaJMQCTF01x1kUMdWpnVxMkgBxCWpoKEVYJNQwwQA1MdhoQACH5BAEFAFcALAAAAAAgACAAhwAAACZOTh5eXiJSViZUVCRUViZUVlp+gCJWVjpmZixaWlyAgEpwcpiurjJgYJSsrDZiYjhiZDhkZDpkZkBqbFB2dkRsbkRubkZubkZucEhwcE50dlJ4eFB2eE52dlJ4elR4elR6elZ6elZ6fFZ8fFh8fFh8flh+flp+fo6mqIykphhMTCJUViJUVBxUVCJSVCRSViRSUiJSUoSeoIKcnniUlnCQkChWVj5oaC5cXEx0dDRgYkJsbGKEhihYWCpUVCpYWCpYWi5cXjBeXjJeYEpydEpyciRUVEJqbDxmaD5oakBqajxmZiZWVixaXDRgYChWWE50dDBcXkxydCRaWiRWViZWWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AK8IHEjwypECBQa0aIGwAIGCECNeITAgRsOLDWEUkCExYgGNGBsK8YGx48AbDW9EUIBxx4EDCTC26IiAYYEbIA5wIHDRwksKIR9CvGGzgI8TLyE0JFDh5Y6QMGYWDOnzQAWeRl8eQAl1akggSA84QAjhZYWLBBwoMZBwIAGQaKtuQFgVaEMeL5UUqClwQAEgSdg2VKB1SIENThEqaPpSR0OBMQjYaDCjgg+sFw6YyFHAAQMdTQpEMKFVB0mEBv82WN0gxQKWPiScvohD64EkGLEW6PGAdYMHJHRjrH3gA+eQSxWgUMG6hvCLBjJcmI3R71IDOmg0wIC8O0YYL5D+G1DwPCQEJQki7BiiIPSA8EEFeydgW+uHhAgu+oiQgYQI6iE1Ud9LJ3yEUBBKMKaVUt4VAAEFF3xWQQgZ7IVQZvWNcFyD8xWQhFYV4JBDeRfxYAKDyF0Bww0URHCDbkOQkAGADmgVQXkCddcEBy/hUEAOFFBggA8faCXBcwLJkB9GVZXAEmJi/cXjS0lg1UIVA4VU40sxFcDASxEg5IOCXRZQkG47NoZVVT6KyZgFBUhFUFEUvGQCSwgRB2dKRTDQBAExRPRWAUq8JMFFErzEAHIENNFRCxpBkIBwW84lU6AmXTHAkhflYNZFDGU6J3IRJLBhAViKChFWMAwwAAwES2YaEAAh+QQBBQBnACwAAAAAIAAgAIcAAAAmTk4eXl4iUlYmVFQkVFYmVFZafoAiVlY8ZmguXFxcgIBMcnTS3NzQ2to2YmI4YmQ4ZGQ6ZGZCbGxWeno6ZmY8ZmZEbm5Gbm5GbnBIcHBKcHJKcnJMcnJKcnRQdnZafn5QdnhSeHhSeHpoiopYfHxUenpYfH5Yfn5oiIqGnqBmiIi+zMyourrO2NiKoqKsvr4YTEwiVFYiVFQcVFQkUlQiUlQkUlYkUlIiUlLK1taOpqaywsLM2NgqVFRAamoyXmBihIZOdnY4YmJEbG5WfHxWenwqWFhggoIsWlosWlwuWlxOdHRMdHQyYGA0YGA0YGI2YGAkVFQ+aGhCamxAamw+aGpOdHYmVlYwXF4oWFgqWFooVlYkWlouXF5mhoZihIQwXl5YenwkVlYoVlgmVlgwXFwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gDPCBxI8IyUAgUGzJiBsACBghAjniEwoEbDiw1vFMghMWIBjRgbZjmCseNALQ2PIJGA8cmBAwkwzuiIgCEBBSwa8CBwccLLCSEfQtTCEGEWFw0alGhI4MNLKCFvzCwYUkVSGDwLaHl5AEvIj1RDRkHaQATCBy8/XCTg5IeBhAMJgLxY40XSFgh9HvjR8yXfmgIHFMACJCtCCA6SMigg5CnCJE5fNmko0GIIEgumeEW4o4EODGw3MPAK4QRXBiQRGtRKojWJIBdIZlmRxTDCBFxhYsxKQMMK1yRWAP1aYMrLEQqIIyRw5EIQ1xRsXzSQ4QLKr4KnJ1hAIoLy7x9t/nxlDr7Agx8JIDzJksTrAPFB334nkJvriIQILh6BkKEEhevEYVHfSyB8hNAWP0TG1QPgnXeBBgx8YEIGBeRXwAUDFpFcecTxhFtaUyggHUYTnMAgcWfcgMUPEHBhGBAlZAAgQkBwBcGIAgUowksxKTCBW0eMwFUE0gmUg4V9HVBCEgUw8RIQBRwRAlcJZDXDGAOFVCOPCG3wEgQIHaEgS6oRZBgWOx7AQFYY6oaQFpFdUMBUBBVVgF4nMImQcQcMhxAWHGyABQE4RCRXAT+85F1DEbykwXhYdDSDRg9UedGWQoQ0Q6EmnTEAkg0pkNZFDHVa51cQJLAhQliaClFWCTcMMMANFnYaEAAh+QQBBQBeACwAAAAAIAAgAIcAAAAmTk4eXl4iUlYmVFQkVFYmVFZafoAiVlY8ZmguXFxsioxKcnSkuLigtrY2YmI4YmQ4ZGQ6ZGZCamxSeHo6ZmY8ZmZEbm5GbnBIcHBIcHJKcHJKcnJQdnZYfHxQdnhWenpYfn5SeHhWenxWfHxYfH5afn6gtLSetLSesrKUqqwYTEwiVFYiVFQcVFQiUlQkUlYkUlIiUlKKpKSIoqKEnqBwjpBujI4oVlg+aGoyXmBOdHY4ZGZCbGxUeHpGbm4qVFQsWlosWlwuWlxMdHRMcnQyYGA0YGA0YGIkVFQ+aGhAampEbG5AamwmVlYwXl4oWFhOdnYqWFpOdHQmVlgoVlYkWlouXF4yXl4kVlZUenoqWFgwXF4wXFwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gC9CBxI0EuSAgUGtGiBsACBghAjeiEwIEbDiw1hFJAhMWIBjRgbPoGCseNAHA1xdHiA8ciBAwkwtuiIgGGBICoazMDY4+WEkA8h4rB580SDBhsaEujwEklIGDMLYiSw4CiNlC8PoHwqNSQXB0cxIHzwssNFAkZyGEg4kABIjDeO1iBQoOeBnw0nvMxRoKbAAQVwPMGoA2yDnzuaIgzC9CWRhgItajjwQcJWAjYaoEiAdgMDJwUghMjKgCRCg4GzHgCRg2QQHwroXkygOuZZhAQmjM4awnbIAjleUlDw+yKOHCNIFy9gAMOFrSEBY4Tw4cCR5dg/vigOffmDHAkg+Bx5EgT0gO1A12InoDorhYQILkKBgMEDiO4hnbR/GeIjQik5NJYVS9g9MMEFGRDRgRZixVfABfuNQFx2y9FFW1k5xIadbgT+5gUMOCwBAQ6yFaCDBxjgp0NWEJQImRfFOUHBSzEpMMESBkAx40sRuFiAQDI4eJFdHgRRQGIH6FCAFNXRKFsLWQwU0oo0IrTBSxAgBIWAErzYVkMyOiYbhDCl1NgFBURFEFF6HRCCkQgFd0APxjGwgRMExBCRW8DxeFEEL2XwGwFOdNSCRg9wdhGVO4TUgp4meTGAkA0pUNZFDEW65m8QJDAhQlFqCpFsMAwwAAwORhoQACH5BAEFAGkALAAAAAAgACAAhwAAACZOTh5eXiJSViZUVCRUViZUVlp+gCJWVjxmaC5cXGCCglx+gE50dN7m5tzk5DhiZDpkZkJsbFZ6fDxmZkhwcHKSkt7k5EpyckpydExydEx0dFJ4eFh+flR4elZ8fFp+flZ6elh8fFh8fnCQkIagoG6OkLLCwoykprrIyqS4uBhMTCJUViJUVBxUVCRSVCJSVCRSVoykpLTExKi6uiRSUiJSUmiKiipUVD5oajRgYFB2djhkZDpmZkRublh6fEpwclJ4elR6emSGhipYWGKEhCpYWixYWixaWixaXC5aXDBaXE52dk50djZiYkhwciRUVDZiZDhkZj5oaERsbkBqakZubkBqbEJqbEZucFB2eCZWVjBcXihYWDRgYiZWWChWViRaWi5cXjJeXjBeXjJeYCRWVihWWDJgYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+ANMIHEgwDZQCBQa0aIGwAIGCECOmITDgRcOLDWMUsCExYgGNGBG+qDCGwMWOA7s03JKDC0YRDhyQMNmwRUcEDAsQuWFhCE2HKGKW+InwIcQuOXWSsGAhQcMXKWJOCBnDZkGMBHYwLUJzScwHR0J+vBryyFILERAyiDnjIgEdOQwkHEgApFsOTBcQIBDUwdCGEg4cyFEAp8ABBbq4vKjgLAQCJ6QiRLJD8IENDQVaxHCAQ4QtRT1YIKGDwAQVNIwUgNDBcgYimQ92sXxgQg7YRiSoLvqCQALaTt0WldDacofgYnMI9qBA7MUuOSZYxuC8gIEsPlSKRYwRAocDOqr+i/8Iw7l28U5yJICggwsS0APKhyQgVzwB2pY9JERwkQiECh9McJ5YW+AnWAcfIWREDpXR5sR4TlThQwUa7CBEFoUh5IOBEzQ3XnUm/SbYDjkoQFRIxD3oXBoxbFEFBGD8NMYHWQxYgA6WPRaSQM5t8d0BTikgQRUGEOGBZRGcKJAN/GEU2AEdIFFAA4KVodOPQNLUghkDhVSGZcFxdgAECBHR4AFpIVTQTz4KpgFNGwLZUBcN+lCAVQQl9WQHuxWg3AESXLQFBhhsQUANEdXlp2BpIsSDYBWIRcAWHbWgkRMJEPXlAQ2E1AKiKKUxQJOMjXgRQ6HmKRYECXiIEJcNqUJEUwwDDBBDk6EGBAAh+QQBBQBZACwAAAAAIAAgAIcAAAAmTk4eXl4iUlYmVFQkVFYmVFZafoAiVlY8ZmgsWlpegIJMcnSuwMA0YGCsvr44YmQ4ZGQ4ZGZCbGxUeno6ZmY8ZmZGbnBIcHBIcHJKcHJKcnJKcnRQdnZYfn5QdnhSeHhSeHpWfHxafn5UeHpYfHxYfH6UqqqQqKgYTEwiVFYiVFQcVFQkUlQiUlQkUlaMpqYkUlIiUlKGoKCCnp5ykJBsjI5sjIwoVlg+aGouXFxOdHY2YmI6ZGZEbm5WenxWenoqVFQqWFowXF5OdHQwXl4yXmBMdHQyYGAkVFQ+aGhEbG5AampAamxCamwmVlYsWlw0YGIoWFhOdnYqWFgmVlgoVlYkWlokVlYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gCzCBxIMEuSAgUGrFiBsACBghAjZiEwoEXDiw1fFJAhMWIBjRgb5tBB4GLHgTga4oCgAKOGBg0WYFzREQHDAjgoHPhQEiGBGjBthHwIEcdNnB4OHODRsMUJmAxCvqBZMOQEpR16KoD5oKXUqiGFJD3gAGEHmCh6OnSQw0DCgQRAXiTgQ+kOh0AbCG149UCOAjYFDsA5BKMCpQeKEIABFaGCDoiPNBRoMcNOCSkRXjjgQUeBDDRmCCkAYewBBqMRGsSJ+ICIHKNxREjt0GGC1gkw9iQwwTTn3CER5lBKwXNwlTlEII563MCFC5lDDsYI4QPZ49gzujgeHTuPHAkg9DgYouBJwu1D3WYn0BoxhYQILgqBcEGEiO4hn7RX6uEjQiE5QNYaU9nxwMQFGDDQAQUXAKbZfiIYlx12Jd2G1UhqBdcbgcFl8QIOTECAg1pFiAAdRg4gBkGGqmVx3BMgKJWbDhMwYYAQOikVAYsCyRAfRn150NIOShlRgBDWydjTClgMFJIRiAGngVIQ/CfgARVMRpBaT+TIQE91HQAcTgL6UABVBB0VpFcFDHfABBfhsIEGTxAQQ0RxtanjRREohUFwBDzR0Qoa8ZBAhlAecNdMd56UxQA/XqQDVhcx5GiawUGQgIQFNHkpRD29MMAAL/zoaEAAIfkEAQUAaQAsAAAAACAAIACHAAAAJk5OHl5eIlJWJlRUJFRWJlRWWn6AIlZWPmZmLFpcaIqKYoSETnR26O7uytbWZIaGNmJiOGJkOGRkOGRmQmxsVnp8OmZmPGZmfpqa5OrqSHBw3ubmSnBySnJyTHJ0THR0TnR0Unh4WH5+VHh6WHx8Wn5+VHp6Vnp6WHx+fJqagJycfJiawMzOlqysjqamnLKyGExMIlRWIlRUHFRUJFJUIlJUsMDAJFJWJFJSIlJSgpyessLCfJiYaoqKKFZWPmhqMl5gUHZ2OmRmRG5uVnx8SnBwUnh6KFZYKFhYKlRUKlhYKlhaLFpaTnZ2NGBgNGBiJFRUbIyMPGZoRGxuQGpqRm5wSHByQGhqQGpsPmhoQmpsUHZ4JlZWMFxeMmBgepaWJlZYJFpaLlxcMF5eLlpcWHp8JFZWKFRWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACP4A0wgcSDBNlAIFBsyYgbAAgYIQI6YhMKBGw4sNcRTQITFiAY0YERKIwITAxY4DfzT8IUEBxikZMnTAOKMjAoYFfpA4IMKkSAsxSYR8CPEHzgJIRhw4EOGilJhAQuKoWTBkhaUNfC6JmQHJRZ84qoZcovTAE4RVYvrwWaBGiRUqBwwkAPIrEawIgWYQivDHCwcOdhC4KXAAUi8YmSw9EITAAqgIE7QA7ICHT4EWO/CkoBLh3RGIpzCA4NUHB8o3ziI0iHTxAQtAkiCdIFskAQI9KGsAw9ahyApll46YElJkBsAPZhZviASIhcUelueE4WLMcsMYJYgwK13kchw2lv577V4gApALEp54UdAlYfihBsgTcL1Y6AAEF5NI2FDCwvjlXdAn3EcIMQGEEPQ11V0EVRCxwQdCnGBFAfgVcBd9FlhHnnQmTbFYA0B40ZtVIyhYXBo4/FCFBD+wFUQJVvyHUBCLSTBiAQIBuN0BxHlRQRUGJLHTUhOMKJAOFV501QEjuNTAUkEUsMSOB2Dg0wxnDBQSjUtdgJBmB0iAUBIIdtlQQWx1seMHPl1IHEJIlElEAVQRdNSSIzDREBBLVXDRDx500AUBOUREVwF8HjDBRRMstUFxBHTR0QwaRXBBb1w2ENIMhaKUxn0hKbCUEBcx5KmdxUlwgUsNZXkqRAlgDTAADhV6GhAAIfkEAQUAYAAsAAAAACAAIACHAAAAJk5OHl5eIlJWJlRUJFRWJlRWWn6AIlZWPGZmLFpaZIaGTnR2uMjINGBitMbGOGJkOGRkOGRmQmxsVnx8OmZmRm5wSHBySnBySnJySnJ0THJ0THR0TnR0UHZ4Wn5+Unh4Unh6VHh6VHp6Vnp6Vnp8WHx+WH5+ssLCora2mrCwkKioGExMIlRWjqamIlRUHFRUJFJUIlJUJFJWJFJSIlJSgJycepaYdJKSbIqMKFZWQGpqMFxeaoqKaIiKUHZ2NmJiOmRmRGxuWHx8SHBwZoaIKFhYKlRUKlhYKlhaTnZ2Ml5gMmBgNGBgJFRUOGJiPmhqQGpsRG5uPmhoQGhqQmpsPGZoJlZWLlxcKFZYMF5eJlZYJFpaLFpcLlxeJFZWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACP4AwQgcSBCMkwIFBrx4gbAAgYIQI4IhMCBGw4sNZxSoITFiAY0YG/IwgrHjQB0NdUBQgNHBgQMJML7oiIBhAR0iDnggcHHCywkhH0LUYbOAkQ8vHTQk4CFpyBkzC4b0eYABT6MvD6C8yHOG1JBIkB5QWgDISwYXY2TogXLAQAIguQo5i5DqjoYGcDRokKNATYEDjPLAqCDrkgIMnBKAoGJvgxVXBVq8oFPC1gIWDpgY7ACDhisEPqBw7GIwQoNYs1LYQdJIBJIYizh+sADjVQITxL78MCVkQx97U+y46tsoFApZMxS/aeMGS9+BMUJoSrY4AeIYZ8goDnt52R0JIPs44KHgSsLtQQ14d5i1fYiECC4agWCBAoXuvq+0z/rhI8IkO/ywHxDrAbGDBRds4MEIFviFUGb7UYDFet7xZEVWDEDBA3ZTmUBgcWDMoMMOEOhA3BIUWIBfAUtkBQGHBQhU3BUgvNQbDxPsYIARIWQVAYcC1RAfRlSZwFJiBxyGRFMvJXDVC18MFFKLTSKEwUsQIGQEkwdU0FBBxNH40gZXzXVAb1oyKUQBURFUVJHPFQDFTxfpkAEGoNEQEVwF7PBSBBdF8NIFvhFwRUcvaOSAkxdRiZZMepoExgBDXoTFSx5cxJCkbvoGQQITNhQlpxBdNcMAA8wwpKQBAQAh+QQBBQBtACwAAAAAIAAgAIcAAAAmTk4eXl4iUlYmVFQkVFYmVFZafoAiVlY8ZmgsWlxcfn5OdHb09vaesrQ2YmKIoqLw8vI4ZGTs8PA6ZGZEbG5Weno6ZmY8ZmZKcHJKcnRMcnRMdHTY4OBOdHS8yspQdnhYfn5SeHhSeHpYfHxafn5UeHpUenpYfH5sjIysvr6KoqTK1tZ6lpaitraEnqDW3t6GoKCSqKgYTEwiVFYiVFQcVFQkUlQiUlQkUlYkUlIiUlJmiIh4lpZykpJghIRsioooVlZAamoyXmBQdnY4YmQ4ZGZGbnBWenxKcnJOcnJegIJmhogoWFgqVFQqWFgqWFosWFosWlpOdnY0YGA0YGIkVFQ+aGpEbm5CamxIcHA+aGhAaGhAamxCbGxqioxIcHImVlYuXFwoVlgyYGAmVlgkWlouXF4wXl5WfHwyXl4kVlYwXF4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gDbCBxIsI2VAgUG1KiBsACBghAjtiEw4EbDiw1zFNghMWIBjRgbnmmCsePAIA2DSFCAkcqBAwkw1uiIgGGBICYOgCBwscLLLCEfQgxis0CTEC8fNCQA4mWVkDlmFgzp8wADnkZfHkB5kWeOqSGfID1ABeGDlwy6XjERJuFAAiC7Vk1boKqQhgYOQIBgoUBNgQOMosEIReuQAgycOhziYy+EFA0FWsygkwLXAkcOhBBTgEoGDWEIHHnhOAVLhAazarUghGQTCSQxgnAc42pXhASyjH0ZImZIhCL2tniA9bfRK0i0ajBewMCPJbFDBsYooWlZ5jwJaMeYA4fx6MYJ/vBY0QLIAg9cniT0HtQAc9wRGsifD+PGAAQXXx8hYQF8yCjzBTjBDSBBIQQRWiX13g08yOCACh+w0IELBOCHWYIvIcHZew5tV4BFuBWQgFYMXCFGcb/pppRxbeQQhBASBFHcECQc4d8QWkmAImptGBeGCC/FJEYWQhjQxAg57ijQDhb2xBtLiR1w2BNNBYlVDWsMFBKOQSJE2QESINRElQdQEBlBxf340gZYVeWbUVVWUIBUBBWVBW9QNHTFS3KmpEEGoekQEVwFCPFSmA1J8FIGvxEQRkc1aPRAAihySddFNQhqUhv3haTASyBgWsCmdf4mQQKnIZQlqRBhlcMABwPkYOGmAQEAIfkEAQUAXQAsAAAAACAAIACHAAAAJk5OHl5eIlJWJlRUJFRWJlRWWn6AIlZWPGZoLFpaXH5+TnR0wtDQNGBiwM7OOGJkOGRkOGRmQmxsVnp8OmZmPGZmRG5uRm5wSHBwSHBySnBySnJySnJ0THJ0THR0UHZ4WH5+Unh6WHx8Wn5+Vnp6WHx+vMzMrsDArL6+ora2mK6uGExMIlRWIlRUHFRUIlJUJFJWjqamJFJSIlJShKCggpyeeJSWcpCQZoaIKFZWQGpqMF5eUHR2NmJiOmRmRGxuVnx8Unh4VHh6KFhYKlRUKlhYKlhaTnR2MmBgNGBgJFRUPmhoRGxsQmpsQGpsPmhqUHZ2JlZWLlxcKFZYMl5gTnZ2JlZYJFpaLFpcLlxeMFxeJFZWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACP4AuwgcSLDLkgIFBrhwgbAAgYIQI3YhMGBGw4sNYxSgITFiAY0YG/IggrHjQB0NdUBQgNHBgQMJMLroiIBhAR1DDoAgcHHCywkhH0LUYbMAkRAvHTQkACJpyBgzC4b0eaAHT6MvD6B8KjWkEaQHlBbw8bLHRQIOdhhIOJAAyLMXXiJBSHVHz5d2awocYJQHRgVZ/TJwWkBB05cfGgq0qEGnhK0F4oaYUsDBhg5SCkAAe6ADSYQGsWalsIMkkQifLybIChPjVQITOB8IETMkQiYvRVC23ZAIEwpZOfAuYADDhdQY+WKE0FTs8OExYPBGbpsABRw5FvRoAoEIRelB1/Q+J/CggfnzKRIiuEgEAoYRFKhjNHK+/omPCI/siML6gI/nBVBwgw0yrKACCjUQsF5k/R1AwW4AEiAhT68VsFpZTExxFW+x/cdbFzHosAMEOmzIwwgYUJdEVhBsqFgXvEkhwksxTTGBWkTM+FIELhYgEA0L3jUbS4MdkEQBRhwG01UucDFQSCvSiNAGL0GAEBFKVvBiWw3J+JIHV8XV2pWHXVBAVAQVRVUILN3200U6cLCBFATMEJFbBeyw40URvJRBdVJ05IJGDiTgYpQMhOSCnSZ1MUCQDU3xEggXMdRomrZBkACEBTh5KURXxTDAADEs2GhAADs=)!important;background-color:#255556}#toasty .toast.toasty-theme-default.toasty-type-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MkQyQUI3Q0EzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MkQyQUI3Q0IzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0QTNBMDVFQjMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0QTNBMDVFQzMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Po9jTrYAAAKTSURBVHja7Jq/SyNBFMfNuSYB0cbCUzmtTvwbbPwb7KPV/Rmnu5tYWR1XX6WFpYL2giBW/igUFCxEuMJeZMXg3Bt4kcmwiftm3kuG5R58mc0G3ptPZnfmzZtUlFIjZbBKWUC+CPqOQA3QLSjDtoH3+U2PiIBqoE2Vb5v4PWtMCYh6HwgTph4yiO5coopZwgnDCVElQJgw1ZBAIgcIEyYKBSRVfpaGAJIoHkuGCZIqXkuHAdIEvTODvKPfgYG0QG9Kxt7QvziIDvKqZO2VCuMCkRE7dQPawZZiGQWGOjtRIf6AZkCT2KZEH1nR2YwCQX2crkDfcpLJY4fHLPEFifBXbDs854c9fG45TBRt7EfkAqJzoNjjhT0CVXL87nn4jHvlZv2y2Nhz5jnH98L0Owo68fQb52XNvql4P3sArVi+F0HXTOlMvR9IjWEkOvYM+mH5XwU9MfmPzZ2mPexcEB3btkB+Mqc1Mfa7C6QhsELvg8aMGL8FYuh+d1VRNgRqG1OgSbyugeYFYmzY5aAFgSAa4iteVw0oTluwQR6FQKrGiEwIxHi0K41roB3mIC+gM9Bf0AxoGTTOHGMdtMtVQBiWfRQuJNcRaeu5jnCv7GbCd++YeDqv7NwwB6DvoGlsDyQgimS/PjA6p1qyfC555loJNfvl2I+c5vxydbzv8ng670fs+hV1h3gJmrX8zOF96g7x03oXtRhH2W+/4Myi349xbLeJo5sVLdoNoopyAfqFbRBVlFLVtcwCQlsIoo3+B1b7bQnVflvqfzU+DBivwx6uE6umJ0RTBXSGmHqMRDBniJ3cLHWACOpU18ylUgJEkOfspfrnQ5GdZtfOLnSQESzM6eLZHaYcd/h5TCJeaf6v9U+AAQAvyHBRYhRQ4wAAAABJRU5ErkJggg==)!important;background-color:#f1432a}#toasty .toast.toasty-theme-default.toasty-type-success{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MkQyQUI3Q0UzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MkQyQUI3Q0YzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRDJBQjdDQzMyMkIxMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoyRDJBQjdDRDMyMkIxMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvQVuMwAAAORSURBVHja7JpNaBNBFMebNsZacih+FFFsrB4qVIw9lByEWNtCC/VSRS14UjSx1V4UvbUKFaFUD178OniPB28KgsYeFBVqRFDQgx9paE1bNVKKta3N+h94hTWZ3ezOTiYh9MEPwmZ39v2TmTdv3oxL07SyUjDXipBsW0NsA37gAx7gpe9nwQKIg7fgM5gjCi6EOboZNIEDoFPneC5jwh6A++Al+AYWVQtxg3pwBPSBaoc/6Di4Q6I+gL8qhGwBx0EvqJHc1afADXAXJGw9yYTYoBVEtfxblN5l2Tc7InrApKbO2LtCMoV4wGUwr6m3OTAAVjsV4iIRS1rhLA36nQo5Rb9KoW0WnDTz1SxqtYB7YF2RTN4/wSEQtRO1asGIVnw2Qr5l+VzO0VYBjoFgEaZUQZqEXVYmxAbwGGxU5Nw8eEqT6y7KGswsCdrAe7Ou5QaDirvLVYqO5fR5ysIzl8hXw6i1FUwrFDEK6jJ86AAzOZ6LA5+REPardCsU8QO0cwZuBfhq4flu8jlrsLO1RJfCgcsSw0ec6+doLZPLusjnrDHiBSlF/8YbgzDqB78stpEin7O6VpMiEWwwt3BEsMH7zGZbAV7X8ivoTmype9Ngdr4A9thsr275g16IT4GQGLjGuc4EnBZor54nxKMgVzoLZjjr/kGwSaDNKp4Qr6CDabCU4x5WVLgOXnC+uwKaBd/t5QkRsRQ4Q10jZnLfKBjmXN8PjvJyJ9umixpDAhNaT0bojHHuY+G0kROlaiRk2EO88Gsnx1oEfRzndoPXGfeGDULtsIRQfpEn5ISNBtj6/aDBWqaRcihmD/VphI52i8mhlTTF8YSYAEETMUxEg0GXei5pcg3whIikKOOg2UBMZR67lGmKUgUiAg2OgX0W608dVEiQYRHyWWoaH7cgZj34KDFn+y+N5y2svgs2nDBIBpfXGLckijBdWMlY6hqNGdalFiQKybnUZewESQcvmQB7de1Vgy8SRSTJx5yVRjcpTjt4GetmvaBTcn2M+XSeNzeVTIHOrGTaSiXTtUVUMj0Mnohs9IQkxn2nReyQ0/2RfofjpSi2Fcpok2WgQNsL0jZ69IQlZax2qi3hfOwhMtoURbMRepdl30S2p2t129MbJEemaVoSR8CYqgMDO+i0Q1iwAqK3CXCbDgy8K8QRjlUkIuDwCMcrEqP8CIdRjakSbLd4qOYT+AN+rxxzKkUh/wQYAIxbfwhIUivlAAAAAElFTkSuQmCC)!important;background-color:#06bc5a}#toasty .toast.toasty-theme-default.toasty-type-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MkQyQUI3RDIzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MkQyQUI3RDMzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRDJBQjdEMDMyMkIxMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoyRDJBQjdEMTMyMkIxMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PhxHKhwAAAN7SURBVHja7JrfS1RBFMf37q7mj6SySMWMMqnQLEsKMg2yH4SC2g+wrKcIg7SX3ouiP6BfEFRPEdRLFFlBIEVQvfcgFrJBLxFBEWG9mHb7Hjgrl+vMzr13Zuyu+IUP7M7Pc+7MnJm5u47ruom5oGRijmjOOJK22PYScBrs5u8vwA3ww0ZnjqU1sgg8Ba2+9NegE4znw9QqBg8FTpDawF0uE3tHBkFLjvz9XCbWU2sZT5/1inIfeHS+xXVELoK6AOXquGwsp9ZGcDhgJExz2U1xc6QEXADLQ9ShsudMbQGmHDkE9kSoR3tMd1wcoSd7CpRFqLsYnA05ktYcOQGac+T/ZmTawm381/BL0ecR2CDI+wyug4/8fQ04A6oFZUfAAZCJbAk5osFVMOmK1SMo3yMpS21c07FFx4m94LvEsFcgLahDaS8ldb6AnVHtibpGaGGfBOWS/PuyqQyeSPIqNYJGZEeO8ClWJnIwJdkIq3LU6+a2Z8WRGtAHSnOUWQcKBOkphSOl3HbNbDjSpzjdkupBoSCd0tYq6rZwH1aj1jaQcdWaAJWC+hWcp1KG+7Ky2OlpHgW1AcrStFohuTkWBKhfy30V2phaHWCAI08QrfK1T58bg27UoB+0m3akhsNtQQjH23xPlCJWU8gT9WDQhZ8M+HT2KcKtSKt97ac4LYw6ue+kCUfqeUqFVa3vrpHmy1dYDXA413KEptIxsDmCAQ2+TTElCQAqUd8HlRcwRVhrA+NudFV72irXaOcX2xIp/JbxsC7UOOZnFzyN7EqNdkrZlrKwr0xpGuwCvZr3nQ7PvtOo2RbZcg88A1NBL1YV4HnIcDkbescv+L4GGRGHb2smnHgDPnk2yFbN9prYttszRkWwcBr4kqOry6DK0y59vmmgXbKtTnVDdAx1NgKKBQ9pAefp6ooqam0Hxw1MqTvgjyB9ivN01e+/SngdoVf9l/iMo6u05HDpGHqzmLW12O+Iw9fMdkPRpVdy1U0ZCOlZtbPNjnexl4BR16xu8ZrI9rGU00xqlG2f3ke6wGMLcf8teM9PjQ6MWy30QaMylJ2vzZY2sB2MTZHtQ9k1UpTIXxV5F/tYHjsy5nXkARjOQyeG2fZpR35yWDyfsPAbuAWNs629bPuM02+a7w+F/DMAnYL/xsT4JJ966WeKCWZSdYzPO83/O2jeEUv6J8AAuUNANq3q2uMAAAAASUVORK5CYII=)!important;background-color:#f97a1f}#toasty .toast.toasty-theme-material{font-family:Roboto,sans-serif!important;font-size:12px;background-color:#323232}#toasty .toast.toasty-theme-material .close-button:after{content:'x';color:#fff;font-size:17px;font-weight:100}#toasty .toast.toasty-theme-material .toast-text{color:#fff}#toasty .toast.toasty-theme-material .toast-text .toast-title{text-transform:uppercase;font-size:13px}#toasty .toast.toasty-theme-material .toast-text a,#toasty .toast.toasty-theme-material .toast-text label{color:#fff}#toasty .toast.toasty-theme-material .toast-text a:hover,#toasty .toast.toasty-theme-material .toast-text label:hover{color:#f2f2f2}#toasty .toast.toasty-theme-material.toasty-type-default{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjdGQ0YwNTUzMjJFMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjdGQ0YwNTYzMjJFMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGN0ZDRjA1MzMyMkUxMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGN0ZDRjA1NDMyMkUxMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvdUzSUAAADVSURBVHja7NixDcIwFIThGFGDoCYzQM100FAyCEzAGHQMQA0iDGDOElWUYKfiPeW3dE2K6L7YjqOEGGPleUwq5wOAVUCtnJRGiX9O8+1SdxUNHZt4pVyVpbGH/VS2yi03A0eD5dNYKIeSGXgpM6NLPi2neQ5g/WAIvEYBAAAAAAAAAAAAAAAAAAAAAABGB2i8Ay7tC57+zD2UtXL3NgNv5axs2uXTmA682V7Zed3E5soPAZgsXwowW74EYLp8DmC+/C+Ai/J9ADfl+05iPuYAjAnwEWAAlI5MOXu7aeEAAAAASUVORK5CYII=)!important}#toasty .toast.toasty-theme-material.toasty-type-info{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QTY3QkFBRDYzMjMwMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QTY3QkFBRDczMjMwMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBNjdCQUFENDMyMzAxMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBNjdCQUFENTMyMzAxMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pqvvb2MAAAJWSURBVHja7JlBSwJBFMfXKA+FJ70EQlCReM46hnSOQAhKugYdsr5BRPQNsgIhb4YFncRzRMeyD2BUEAhe8iR1sND+Q28hlnV31pndnSUf/JmL7Px/82adN29DvV5PC3KMaAGPIYDfMSr6gNm7V30hFqBlaB6ag+LQBP3sA2pAT9AjdAM9QN3npWmh+UMiLzHMM5M5aJMMOwkGdAGdAKLhKQCMxzAcQltQWDCJHegcOgDIu+sAMJ/FcAzFJG9nZn4PEGVXAGB8DEMe2nb5vSywbQmQb2kAMD+O4Qpa8ejPpQqtA+JTGIBW/hpa9fgfsgKtAeJL9BzI+2BeoznzQhnA6m9gKGv+RhZZuHQMAPNRDHUo6jNAC0oAouV0Cx0Jmg8ZNGhEyQt/BuiEfRE8pIymRep2dtjNmJ3Y/TKwI+GElRlh8mSfAaw+g3oboLZxMwN67TSFLHTtMrAowbxu+K9EI07ebLdQWuHyP80DkFIYIMUDkFAYIMFzI5uUNJnsl9jUm1kGIgpnIPIvuhJthf22eQCaCgM0eQDqCgPUeQBqCgPUeABuFQa45QG4p8JJtWiQN2sAqvZKCgKUjJWo1TlwSpcIVaJDnviulHTzKSoEUOzXP7U6iffpQu33faBFXjRHANQFyCmw+rl+HQnbWoj6MQUfzResekK8xdyu9tvm8zoqNLcmBEC9SdZSr3pons2VteuLcpfT1CXOeLSd2BwZns60aVvFLlT7wOH4QkMTJKEzSYddh56VdGp+oAwYshHMj3wGCD2TwfvMquqdeAgwBHAQPwIMAIRS2XfVn5FFAAAAAElFTkSuQmCC)!important}#toasty .toast.toasty-theme-material.toasty-type-wait{background-image:url(data:image/gif;base64,R0lGODlhJgAmAIQAADQyNDxerDRGZDxuzDRShDxy5DxmxDROfDQ+TDx67DRKdDQ2RDxirDRKbDxy3DRWjDx25DxqxDQ2PDRGbDxu1DRSjDROhDQ+VDx69DxitDx27DxqzDIyMgAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJBwAcACwAAAAAJgAmAAAF/iAnjqQIXESwFZpWbIx1AWVtkxKxaVjfJ77ehiC5GTkAiyPIbGIKBNqRhIhgeE5sD8vbXKaiSSHIvZKdhcZUoXX62k3NwTgpb81wnv5+VdcQY0BuZoSDGBBfJABWhYaOPhtFIwSPlU4VIxIUlpw+BQsiFp2jGA9IG6SdFCeCjVmDcHcolrGcDwF8r6RcGZupuYYUY7DEb8ZMLYR2cb+1v8w9w82VL8+cFLjHzM66PRmibs7L2ncVF9zWbzOowNrobqsc4M/oFiKa6YOfIwfk3OJB7I0AYCBfkw1SRgB6VKtWgUQlBIwrFkfDBCNsUsFRMEWMtQIXwSAomMoLmIEWIVggO7OlgIWEJ+9Z2GFIw4YKoGLaOGEhw4oWL75dyHkkBAAh+QQJBwBEACwAAAAAJgAmAIY0MjScQjwsYrxkOjRcWpw8bsw0RmTMRkREXqx8VoRcSmy0Rjx8Ojw0UoQ8ZsQ8cuRMNjR0OjQ0TnzUSkQ0PkycUmw8Xqy0Tlw8euxsWow0SnTETlQ8MjQ0YrRsOjQ8ctw0SmxMXqS8RjyEPjxEVpQ8asQ8duR0PkSsUmTMTkw0NjykQjxkWpQ8btQ0RmyEVnxcTnS0RkR8Pjw0UoxUNjR0Ojw0ToTcSkQ0PlSkUmw8YrS8Tlw8evR0Wow0YrxsPkRMXqw8asw8duzMTlQyMjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/oBEgoOEggAQDAEiBxMTByIrMhAAhZWWhBwyIjecnZ6cIgwcl6REAAwHn6qfBzKUpYQQC6u0nyIQsIIDqasTOzsiGym0EwOwHhOeEzkJIR0dAtECzyEJFcmeEaQD2DcoLNLh4tIdLDmexpUQvCgh4+/vIec3E7iEALMp4PD84wSpIl4JknFjB4J+CMVZuHBDxiAOBy5AS0gxWgcUB0YRYbBjYsWKHXaMMLXA3ceTIWJwgPDipEsBCWj8sPDypIUfCmq6VEBC50kSNH1WtOBRaEIhQnggXcr0AVKnUKMKcdp0alMeWLNq3cq1a1KuD4J0HUu2LNYWHbR+NcuWqw8bjVjXtp0bdwYFuWbxthWCA4DYsnqVcg3cghLcrHITexWMOC4PG4JUtKBLmccDFYMkMJ4bmCvkQQB80O3MVQBmQjhMsA2MNylfSy5ccyYrxAUpDaQBq/1MysWDylsf2M5FwQHtsgJw5AJtw6nurA9snF4+SIWNIGtlIxYwYzr1QgBw2BAQ5DfSaDNweL8UCAAh+QQJBwBGACwAAAAAJgAmAIY0MjScQjwsYrxUWpRkOjS8Rjw8bsw0RmSkQjxEXqzUSkQ8ZsR8VoTMRjw8cuQ0TnxMNjSMSmR8Ojw8XqxsWoyMVnQ0Pky8TlQ8euw0XrR0OjQ0SnSkUmw0UoyUUnQ8MjRkWpQ8ctw0Smw8asTMTlQ8duQ0UoSEPjx0WozETlQ0YrQ0NjxcWpxsOjTERjw8btQ0Rmy0RjxMWpzcSkSEVnzMRkQ0ToRUNjSMTmR8Pjw8YrRsWpSMVnw0PlS8Tlw8evR0Ojy0TlyUVnQ8asw8duw0YrwyMjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/oBGgoOEggAQEgEFNQoKDQUIORAAhZWWhB85BTOcnZ6cBRIfl6RGABINn6qfDTmUpYQQMau0nwUQsIIENbW9nQoEsC0KvsWcGqQExMbGwZUQvMzGCriEALPSzAWjgzm+KUEcHuMcHEEXy7Qngx+pnykeFAkqAvX29xkJIB4pqgrcEjzVoJHgnsGDBhPQIOFp3TVONVDQQ0iRYgYK0Vx8gMDJg46KIAVkQKhCCKcbASmEXFkRhIITAVCwnImQAoIINHMajDBAp08BMkbqFCpyJhEiP44eTaq0qdOnTh00/eHgh9WrWLMizcq1a9IhXsOKDfsiA9etY9NaRariAVa0h1rVhu3QA67ctWqJ9AAANi/eu0Mo2Xjb1W7cq2iRdhC04sXdx1RXDHJr2DBitTasFYGcdKwAyYR6lOD8N6uDHpYOWL68WisMUhtai4VLZAMsGFVJW3XwOpeFzWOR2hWAOhdjGyEqe3VgA7TxQSs6CJj9Q0AH588LrehhQ8ACqVRfCLDRA/ulQAAh+QQJBwBBACwAAAAAJgAmAIY0MjScQjwsYrxkOjRUXqS8Rjw8bsw0RmTUSkS0RjxEXqx8VoQ8cuQ0TnxMNjQ8ZsR8OjzMRjw0PkyUVnRsWpQ8euw8Xqx0OjQ0SnS0SlQ0UozMTkw8MjRkWpS8Tlw8ctw0SmzcSkQ8duQ0UoQ8asSEPjykUmy0TlQ0NjykQjw0YrRsOjRcWpzERjw8btQ0RmzUSkxMXqSEVoQ0ToRUNjR8PjzMRkQ0PlScUmx0Wow8evQ8YrR0OjzMTlQ8duw8asy0TlwyMjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/oBBgoOEggAOEAEFNggIEQUpNQ4AhZWWhBw1BSGcnZ6cBRAcl6RBABARn6qfETWUpYQOCau0nwUOsIIDNrW9nQgDsCsIvsWcF6QDxMbGwZUOvMzGCLiEALPSzAWjgzXZ2SWDHKnfzAjcEOXgptjqxi0cDu7ZNOm0GyY4EwsLFBQdHfzxm4DDxIZlqkqk8ARERgcFAiJKnEiRogIWMoB4SrDJRAcVFUOKDKmig4kQLTIQGMmy5UQWGSC6nMlSgQ8fFW7qwHmzp8+bDHwEDfqzqA8dDHQoXcq0qdOnS49G/QG1qtWqLlQwlXq161YdKhoo5bqz6VGpZM0+1XAjrde3eWNvAKBq1S1cHT8ozfh61+5YHRoEoXBx9y4DFIPEuk3LlWxjpjOsPbjq16oAxIQkJC1slcENSy8qV7Xr4wUpDKLf+sAA68BmzkoZmM4lYfJfuAI+5zI044NXqQxmYN49CMWMH47NuhBO/BKAGzME/CDK4IeAGXJzBQIAIfkECQcALwAsAAAAACYAJgCFNDI0nEI8PF6sZDo0NEZkPG7MxEY8NE58PHLk1EZETDY0fDo8ND5MPGbEPHrstEY8dDo0NEp0zEY8NFKM1E5MPDI0NEpsPHLcNFKEPHbk3EpEhD48PGrEzEpMNDY8pEI8PGK0bDo0NEZsPG7UNE6E1EpEVDY0fD48ND5UPHr0vEY8dDo8zEZEPHbsPGrMMjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABv7Al3BIFAIUi4CKVUpIVJ+TAlCsWomVk0rD7Xq5qkXlSn4BFpKv+is5UctExWNN/6oUcOGAVe93SwNwIQl+hVwQZAOEhoaBVQp8jIYJeEQAc5KMKmNDJ5mZG0MVaZ+MCZwLpaBmmKqGBhUKrpkmqbOMGx+3jA9bu4USpL99CSUlw34tKcvLDs0pLcrR09TV1tIpGczbytve3+DeLS7h5eblIwLc5+zfyiAk4N3Q9PPt2xMo9vf80CgA5JbtMzcwnAsq8cLNK1iv3AQhHkb0YwgOgYchB/qdW0jCUoON7s4dLMIAgcZzCFBYITCQokB5IshEcFnOXouOZQiYPMkMQTHMPAw+8nShMo8REhewvRS3DAGJN0aHeJgQsOYIEhejWgGAggQIFwiiIXABD0XWMkEAACH5BAkHAEAALAAAAAAmACYAhjQyNJxCPDxerGQ6NMRGPGRyzDxuzDRGZMxeZEx25JRmlDxy5NxKRDROfEw2NHw6PKxmhDx67DQ+TDxmxNRGRLRGPHQ6NHRuvDRKdNxaVKRmjDRSjDwyNMxGPDxy3DRKbJxmlDx25ORSRDRShIQ+PER67DxqxDQ2PKRCPDxitGw6NGxyxDxu1DRGbNReXFR23JRqnNxORDROhFQ2NHw+PLxidDx69DQ+VNRKRLxGPHQ6PHxutORaTMxGRDx27DxqzDIyMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+gECCg4SCAA4PATk9OBQdOSg0DgCFlZaEHDQ5DJydnpw5DxyXpEAADx2fqp8dNJSlhA4Vq7SfOQ6wggM9tb2dOAOwKhS+xZwWpAPExsbBlQ68zMYUuIQAs54i0rU5o4M02du02gwkgxyp4swU3g/q2+bX79IEHA7z2zPu+MwkKPzMKmwCWKxDOoK9KMQQwbChNoYMIEp8SDFixYkKeIjQyJAjx40OQ4oMqVGDhx0IeKhcybKly5csM+wo8cNGiRUgXMDcudMFhAslbLAQYKNo0RcXYECokSEDT5UZXNSAAGLHi6BGU8gwasMHV5slXrwosGLFhQtlC4hNUALr16KJG254fUuXrtu6RW8AqIm3r1+jPyhtNTr3r2G4gk6wOFz48IITgxp07dv4sI0R1iZYLlqZbuBCEhZs/rvghqUDnQt7rdy5awtSGFqP9tEA1gHRo7n6eJ1LgubcNn5IyDUIQAMPqwnrJrxAxivig05s4Ktc948NkKFbAnBDRoofPsL7+JEi7nNSgQAAIfkECQcAQwAsAAAAACYAJgCGNDI0nEI8PF6sxEY8ZDo0bHLEPG7MNEZkzF5cVHbcnGKEPHLk3EpENE58TDY0TGa8fDo8THbktGJ8PHrsND5MPGbE1EZE3FpUtEY8dDo0NEp0rGaENFKMPDI0zEY8jGqkPHLcNEpspGKEPHbk5FJENFKEhD48RHrsPGrE5FpMNDY8pEI8PGK0bDo0dG68PG7UNEZs1F5cZHLM3E5ENE6EVDY0VGq8fD48vGJ0PHr0ND5U1EpE3F5UvEY8dDo8zEZEpGaMPHbsPGrMMjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB/6AQ4KDhIIADhABPT87Fh49KzcOAIWVloQdNz0MnJ2enD0QHZekQwAQHp+qnx43lKWEDhirtJ89DrCCBD+1vZ07BLAtFr7FnBmkBMTGxsGVDrzMxha4hACzniTStT2jgzfZ27TaDCaDHanizBbeEOrb5tfv0gMdDvPbNe74zCYr/MwwbAJYzEM6gr0szCDBsKE2hgwgSnxIMWLFiQhSkNDIkCPHjQ5Digyp8YKCFChTqlzJsqVLEQ9iuJxJ06UNAQUu1NxJ0wULGjlkxNjIs2gKHgVycKAQZEKEDUZ5SkiQI4cOAEKqBt2gMypLCUmrCqEEVGuQBB8keE2B4wNVrY9KBal4AVfriQIfNuCIcUGnTh4xcEj44OJE3aoLVAxqkCPI4aoTHJ+IMPnEiSCGH2stYa2C5s+OP4t9NYjCAtGoH4/QYelAaM2OX4sOAoOUBtmpNU/QAOvA6dyaR9TORcEz8LpCWOcy1ABEbLNwXwdZQIP0crklskavG0QIB8XXLQHQQYOFkCDou7PgcDVXIAAh+QQJBwBIACwAAAAAJgAmAIY0MjScQjw8YrTERjxkOjRkWoQ0RmQ8ctzEWmScWmw0TnzcSkRkVoRcctS0YnxMNjR8OjxkcsQ8euw8asTcWlScZpQ8Tnx8brQ0PkzURkS0Rjx0OjQ0SnQ8duzUXlw0Uow8btSsZoQ8MjTMRjw0Smw8duTMXmQ0UoTkUkSEPjxsbsREeuw8bsykZoyEaqw0NjykQjw8ZsRsOjQ0Rmw8cuTEXmykWmw0ToTcTkS8YnRUNjR8Pjw8evQ8aszkWkycapQ8UoQ0PlTUSkS8Rjx0OjzMRkRscsSEbqwyMjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/oBIgoOEggAPEAFDRUIZI0MwOw8AhZWWhCI7QwucnZ6cQxAil6RIABAjn6qfIzuUpYQPGqu0n0MPsIIERbW9nUIEsDIZvsWcG6QExMbGwZUPvMzGGbiEALOeKNK1Q6ODO9nbtNoLKYMiqeLMGd4Q6tvm1+/SAyIP89s67vjMKTD8zDRsAlhsRDqCvTLgQMGwoTaGCyBKfEgxYsWJFHyg0MiQI8eNDkOKDKnRBwIfKFOqXMmypUsTCVzKnCnTBoOMNHPSLGAhh86fLU0AwRABqNGUKoIA6FHhKNAWICjdkODAac4cKz4IenFgRYiNVltiPfBikIIOEn7gdAk2Z4sVlDxuWIvBg4eRGi3b0vRgpG6PV4Mw0Kgr4YgJpx5cwOVBI4glAx3qdlihooUHmWAphFCxmEeHGaQ4RK7LQ8KKBhcqhMiRo0aOED+ONOgsWQEsA4NJl94tQbdv0jRI5EKCga7n45JJ9/7dA8NwQzcO/PY92jONG4CfI3lxowd16j0+lNVeCUCQGwJ6dFjfoYeAD0pzBQIAIfkECQcAFwAsAAAAACYAJgCENDI0nEI8xEY8ZDo01EY8fDo8tEI8TDY0dDo03EpEzEY81EpEhD48vEY8PDI0pEI8bDo01EZEfD48tEY8VDY0dDo8zEZEMjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABfDgJY6kCBxF0FgLYTWPdABlbZOO1CR87/ONguNGvAAKip/yp5DQiqTDZEn9NQ5Q0cBS7fYWAygk4i3zEMQB2WwO1w5ctpmAJQGmcnZjOJLk8wwjDkl/bAR8BYWARniKZgIOB455FImTbAwPl2wGO5tlCoSfXQSjZgumXqKOpWWeqUsKmoWtPLVUBpawSgWSu0oUAK9ltz6txQkKQ7p/yEsFIoNztnKHIwi/PIEjwr8KTyMHzpMEFDYD40ul6wm3BGg3EMTE0EXol+9ZFwcGjgrm+i44KJBOnZCAOJC4M5asF0IbACgwMCDgmIJcFPgUCQEAIfkECQcAVQAsAAAAACYAJgCGNDI0nIY8nEI8lGo81LJEXFY0ZDo07MZExEY81G5MREI0zHZE7IZM/NJM1F5MTDY09LJMfG48/MZMzKpEXFI0PDo0tGJEdDo01EZE5GZMtEY89M5E7HZM9KZM5G5MPDI0lH483L5EdGY85FpM/L5MjHY8fDo87H5MZF409MpMzEY8VE409JJMhHY8/M5M3EpEvEI89K5M7G5MrIJE5GJMNDY0nIo8pEI83LpEZFo0bDo07MpMTEY07IpM/NZMVDY0/LpMhHI8/MpM3K5ERD40dDo81EpE5GpM9M5M7HpM9KpMPDY0lII85MJE5F5M/MJMfD487IJMzEZEvEY87HJMMjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB/6AVYKDhIIAD1ACU1IvCQkLM0ErNYWVloQfUDAvnJ0jnyNUMQQtFZenVQAmKp2tL6CgUS5NJZSohA8arq6woDISPgQrt4IGjLutvaBHwCkitzrIu8qgHC4+DRGnBkbSvNSfLD7Yz5UPx96e4J8k4ykUhQC66cnrI0njPjimgyb03/aA5GMy6AOCf/Xs9cDmI4UCQVAQJlxH49q4AKnmSXxl7xOEcQ2a1HiwUV1HFg1A5vBXkmNHDvl8BBDQ0qU9GinHTZhSc4RNcELyHWDVsqNPJ0/yNcDQ0+iIdvm6FXUKdRzRqaB+sgPpgyfWjkHHHaD5dZ2TnD4msCzp1ENMG4cky4JjEDMHgINylXUAeWBJlbUSnSa9KOgD041GYWLbwKMf2457CQ8CsAnxugwW9xV6cPgf5HEb4FWKhhDcKyops526UBqWSxpJG5S4ZaCzN3AxfGzQRuxHZWnglOgTTazKBxO2J36iAeEACL/FMa1CBivKEBBEol/68MMEDBVMQVkYQOEBsUAAIfkECQcAUAAsAAAAACYAJgCGNDI0nIY8nEI81LJEXFY0lH48ZDo07MZEzIZExEY8REI03J5E3GZM/NJM5FpMTDY0/LZMfG48XFI0/MZM5HpMPDo0dDo01EZE9JpMtEY89M5E7IZMPDI0tJpE3L5EdGY8/L5M7IJMfDo89KpM9JJMZF409MpMzEY8VE405GZM5GJMjHY87HpM3EpE9KJMvEI8NDY0nIo8pEI83LpEZFo0lII8bDo07MpMTEY0zKpE/NZM5F5MVDY0/LpMhHY8/M5MRD40dDo81EpE9J5M9M5M7I5MPDY0vKJE5MJE/MJMfD489JZMzEZE5GpM7H5MvEY8MjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB/6AUIKDhIIAD0oCT0wtOwwIHT4oMIWVloQcSi8tnJ07Dg4hPw0DKxWXqFAAIiedro2gDk4NOjoHPpSphA8Zr6+xoCS1tQMouoIGjL6un8AgOrQ6Jh+6Nsu+zbEsw7UNEagGQte/wKA93NDUlQ/K453loEXo0hKFAL3urvAOKtHcM6cGichHDh6EeTpqDOKQgCCzfcL80TKhQJASh/r2bUMYQBU+jC328fM3rAESGA9AvhOZpBu0bjQGqgwp8iBHATNp7huBUEeOJzlFOhjS80CrmUIx0IrG9EJQkUt66hCHVKSwnkdVCo06jxbQqvuIIjyAEyw8nghzyNRas2eMlItmy03oSQNAQ7bw+nU9YATKWowiN87rCIWDU5BQ0dHSgEMg3nI2X9YibGgT4LwkawEs9OAwQYjzNNSrZM3hvmfcvKGyYLpciJdLV+gy4PkavJbDNHw7xsOybWAYXM4YfaywiNoZQYWIpqFA3+KYWPmKtaFBgxkFgEC/xIGHiBcnnKpgsWBBDQLPUwUCACH5BAkHAFIALAAAAAAmACYAhjQyNJyGPJxCPNSyRFxWNOzGRJR+PGQ6NOyGTMRGPPSyTERCNPzSTMyqRORaTEw2NPzGTHxuPORmTFxSNNRGRDw6NNy+RHQ6NPTCTPSeTLRGPPTOROx6TPSqTDwyNLSaRHRmPPSWTNxORHw6PNy6RGReNPTKTMxGPPy2TFRONPzOTIx2POxuTNxKROS+RPy+TPSmTLxCPDQ2NJyKPKRCPNS2RGRaNOzKTJSCPGw6NOSOTPS2TExGNPzWTOReTFQ2NPzKTIR2PNRKREQ+NHQ6PPSiTPTOTOx+TPSuTDw2NMSiRPSaTHw+PMxGROxyTOTCRPzCTLxGPDIyMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+gFKCg4SCAA9MAlFNLTpPNR9BKTKFlZaEHkwxLZycIg4ZPaIMAysVl6hSACMnna6fEiqiswVBlKmEDxquvJ8ORbPBAym4ggeMvLwODhzBwSYguDnJyb4+sqPZDBGoB0LUycsOKM7BDNGVD8jgruJL5c8ThQC77K/iCAzwsySngyP2wi1zkm0fjkEeEgRUtizWvlEmFghispChAx8QzMELoKpexRa+lkEpWI6BCxkPPrYTR26fPlE2AKrkJM4BklkvSwYQMJOmOBgle+Ts0SBKzxY1Qz2k1apnUpLwGFA4WvOds5w5vzl1tzRY05lVu44yunWZ0q4FeJZ1AFRsA5mVYMV1ENtjRsq1KIbuswFAYdxlLR8yKJBECtyP4jCK5SjFw1SV4hwKnayv8gYe//6y0FuOsaFNiJc1W+qicK7HC8WFuBpsg7xK0yrK5TyK26ULspdlpIxzBa4DqMEtY7Fvg21cP0ALdxACqygSr4s1HhF85cjWBkxLR8gqHIJRJg0M2X7Jw48RMU5MZfHChRIcE26lCgQAIfkECQcAOQAsAAAAACYAJgCFNDI0nIY8nEI8XFY01LJEZDo0jHY87MZEREI0xEY8TDY03L5EXFI0/NJMPDo0fG48dDo01EZEtJpEtEY89M5EPDI0dGY87MJEfDo8ZF403LpElH489MpMVE40zEY85L5E3EpEzKpEvEI8NDY0nIo8pEI8ZFo01LZEbDo07MpMTEY0VDY0/NZMRD40hHY8dDo81EpExKJE9M5MPDY0fD48lII8zEZE5MJEvEY8MjIyAAAAAAAAAAAAAAAAAAAAAAAABv7AnHBIFAIUNAHOBkpdThJXZ1SsWokVmgjE7TZYYFaDYHBczzkAxtNtg77h8MVFRRMVE7cbHg8TOnZCBUx6bRR9fRwWdiiFenyIYA0PZwUwjm6HkXENi1UKhJhem4kMRQB5ooZ9X5BgGmZDGKp7pIg1QxUJtKtivpFfHAhCNLxtroiQAWmpxiCarL9hDR8jCs5d0K22LCaz2M/c02ABAuDhrnyQDSE459DiYAds4PDxDRHvtuphl/Xxfehhs4eMlbt/AOWZQ5gwxLeBCcGQuMYQoAkAuyBGA3bBzENj9riREFIhnzNtnHy1oqBC1sCCkZYNAbAFJMAPM4ooMEkrpE00MBRMVWnEiwK/ZJSuQCi6jpUBOwV4OvIJh0JSOytqToXjSoPQQDkqYJDaq8+BDTnBYlmjBx61DS3UXqmwAoMID/koUPgQowaDtGiCAAAh+QQJBwBTACwAAAAAJgAmAIY0MjScijycQjzUtkRcVjSUfjz0zkRkOjTERjzsilTswkTUVkREQjTMqkTURkRMNjTkZkz82mx8bjxcUjTsxkQ8OjT8zmR0OjT0olzUUkS0RjzcvkTsglQ8MjR0Zjz81kzsmlT8ymR8Ojzssly0mkRkXjSchjz80kzMRjz0umTkYkxUTjTcSkTkckyMdjz0ykz0qlzcTkS8QjzkvkQ0NjSkQjzcukRkWjSUgjz0zkxsOjTsklTkWkRMRjTUskTUSkRUNjT83myEdjzsykxEPjT81mx0Ojz0plzshlQ8NjT0nlx8PjzEokTMRkT0vmTkdkzcUkS8RjzkwkQyMjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/oBTgoOEggAPSwJRGSM5UgMkQis0hZWWhB1LMiycLEdBH6GhJz4uFZeoUwAiKJ2cKhGgorMKQpSphA8arp0gQUEns8I+K7iCB028nSG/osHCHy8euDrKnbDN0MInEqgHP9acHL+y2rMn05UPyeEsSuTm0C8ThQC77Swp8M+jH/yiNk4NEoGPRYwT8OJBwzGoA4KCPCyQexbs37loDAQtKchCBbly8f6ZUHUPX4uP5ipum0HjAUcW4xKqtAjtBkGOSD7STBnKhICXCVBq4/fvRIMoL98lVAiNQiuOSmIFieCv6s5tDpJKBTnUmShwULcyNfe0YNSlY50h5bhDaFpRpBR+cgw68a2oBjcL5kT7NoBLjjGz2f1wA8DDgi2kUt0WUsGpvO08or06K4CgDlnxRazbdaaBHgM5IhScduQgAJvw6ftFWdiMJIUeZA6Hga/XWQboVarWLjBjaNxQXYgs1aJxF7gOzObFjOttA92MAUnN66zVqgB1G5vSQcTyjrHMGSgAezsmVq5gcD0xowAR85c6ABEhAwGUFB8MzGCCY8KtVIEAACH5BAkHAFYALAAAAAAmACYAhjQyNJyKPJxCPNS2RJR+PFxWNPTORGQ6NMxGPOyKVOzCRERCNMRmTPzabMReRPTOZMyqREw2NOyGVHxuPFxSNNxORPzCZORmTDw6NHQ6NOSmXORyTLRGPNy+RPzWTNxKRDwyNHRmPNRGROzKTPzWbHw6PPSqXLSaRJyGPGReNPzSTOySVFRONORaRPzSZIx2PPzKZORuTOx2TLxCPOS+RDQ2NKRCPNy6RJSCPGRaNPTOTGw6NMxGROyOVOzGRExGNPzebNSyRFQ2NIR2PNxSRPzGZORqTEQ+NHQ6POyuXOR2TPzWVDw2NNRKRPTKTHw+PPSuXMSiROReRPzSbLxGPOTCRDIyMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+gFaCg4SCABFPAg4aDzoKAydDLDWFlZaEIE8zHx8SJEANSx6jHipBLxiXqlYAJQicnQ1As6S1HgpDlKuEERywHzGys0C2tkEsu4IHPL8VFsO0xbVOIbs7v5wS0NHSpCoTqgdN2BVF28TdtSrVlRHM2DJL5+m2ThSFAL7YHybn6PSkbqQaVGLfhwou/BVTkQ7HIBCv9hmBJo8bQIZOFgjKUMFgD3//FkpDwYqKQX4g1Y1iKE0FjRoRTn54pjAdw5ukchQ0WEFFypbdVKAQcLKFsHkqAUIwaVAKyJAASfmIuO/C04ulspYScXLiOXlRpY0z6LVm2FpUsVkFUrEiVK24QT0w3ef059lRPogabOF2m82kHiDs3Ffh06yjb6MGiHnSnNm7OQBsMmii7zCgLRWkGoxthd2zAQSB4Crx88rTLBka+DHoyUnLFqOSHCTZIBRQbC+fpcGkUATSv2Q8tsVylIF7la6Rg4H0IrhLGfYlsEwcbqkXuw4AP8gcGkADz3cJmcwpmHdv6G8gT2YFBOePuosZINCbPSZXnHpUJE6DwBH7lwAgRAk2MJCECx4YQEMUOFCgyyqBAAAh+QQJBwBaACwAAAAAJgAmAIY0MjScijycQjzUtkRcVjT0zkSsakRkOjT0tlzESjzUnlRMRjTswkTkVkTMqkRMNjT82mz8wmTkfkx8OjxEPjR8bjz80mTURkT0olzswmQ8OjTcvkT81kyUfjw8MjS0Rjx0Zjx0OjTsjlTsykzkXkR8QjzcTkT0rly0mkRkXjT80kz0umTMRjxUTjTUskT8ymTshlSMdjzcSkTkvkSchjy8Qjz0nlw0NjTcukRkWjT0zkysdkxsOjT0tmTsxkTkWkTUplxUNjT83mz8xmTsglR8PjxEQjSEdjz81mzUSkT0plz0ymT81lSUgjw8NjR0OjzsklT0ykzkYkyERjz0slzEokTMRkRcUjTkwkS8RjwyMjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/oBagoOEggAPJQYKGRY6DAMoRy03hZWWhB5FWRIRQp5CTByiHCouMRqXqVoAEywNJxCfnqO0HAxHlKqEDx8yJJ2ynqG1oy4tuoIHVjINwMFCxLVRILo8MjImVJ+xnrHRtSoVqQdJ1yLPst/g1JUPy8xI6J/q0leFAL3XSt3y9LU4qAZNuCbjBxJu/cCpazLIQwKC5z4xQedvlAoOUYwIKkJQhjN50L5dJEZjVT5fCEHSGjmSmIoZNx50JAIynbqLOEflGEjQRs150VqCoyGgI4Kfs1ZWdJCl4xCkISvS8sGi40Sk/nKyvNAxHih5E6USK3etgQWoYmtVJXg22NWrvlEt0rvYlOALWXCDpR3loyjBo1hFKhXlgOc1n+hS7hUVQCZBmoH35gBQgyAJuHltKgzKAJVhGU9/Lg4gyAPXa1AiyyXFmnWBBYM4Xrv8LO/ekoMoE9wnjKLYGU4KPThNwmvCoLQK2Kt0gGBqlRXDpQpxzQRg33KFqoih6wDXH6Gf+SsgDtmDyiTuil/NGsdyZKuKsPihTW+0Ah2Cw8dUJAER9UlZNEMHFOx3CQBBlLADEEOEUsAMVTRxRS6qBAIAIfkECQcAMgAsAAAAACYAJgCFNDI0nIY81LJEZF407MZEVEo0tJ5EhHY8RD40/NJM3L5EdGo8zKpE9M5EdGY8XFY0xKJEPDo0rJJEbF489MpMlH48TEY07MJEPDY03LpE7MpEXFI0vJ5ETEI05L5ENDY0nIo81LZEZF48VE40jHY8REI0/NZMfG48zK5E9M5MZFo0xKZEtJpEbGI8lII87MpMvKJE5MJEMjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABv5AmXBIFAI6JwkqRmlcQqzD6FOsWokfx6ph6nYTXlNCQIpczzJAKwQOu92XAxVNRLDe4TZeMKILRxl4gngUDnQbBF56eYt4CSdnBTGDlI6GVQiBlV+bJhQbRQB3nWJuYI0mGWZDA22oipykLkMAKG+LuJyvpRQlQhOksJSLAUKjgqivp6YeHwgasK7Cy8EmKi3Vw7ddAS6lwbmmeQwc2d/BBAJ529TSnQkZydqDenqa1buUtubZCeX92QgEMKdsEANs/KqBQMAFXzYVMv6dmxaLVIILZhzkcyRuEAgj6ja5m7jsVAMLQybIk0eqGC0D4Eh5wFAkU0JhXRqAqoJo4km0jV8gXVHRINw6XecSkDjkoWJHQQ2E0ikBAVlSWBl2+kmzoOnIVw0q0NxKBMMJAQ1xivFQAQHZKwAKkDCQoWiCBh4guNgwB00QACH5BAkHAFEALAAAAAAmACYAhjQyNCSOVLSaRCxeRKTKZHySVOS+RCxKPNTSbGxiPCSmXPTSTCxCPIRyPCSeXLy2XExKNCSCVOzKTES2ZCxqROzabNSyRDQ6NCSWXFy6ZCxWPCSuZIx6POTSZHRqPDw+NPTKTNy6RDw2NCSSVCxmRMzSbOzGRCSqZPzSTIx2PCSiXFxSNDxqRPzebNy2RIzCZCxaRPTORDQ2NLyiRCxiRLTObHyaVOTCRCxSPNTWbHRmPCSmZCxGPIR2PCyaXLy6ZFRONEy2ZPTabNS2RDw6NCyWXGy+ZCxWRDSyZJR+POTWbHxuPEQ+NCSSXPzWTDxuTPTOTDIyMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+gFGCg4SCMkA9AkMmUDEmQwIpQDKFlZaERCkWKE6dnp8oQxwfl6VRMg03n52cq54mHJSmhBAWrre3FkCzggkmuMCrIDqzHjGswa6trEulCcfBy8koxJUQv8nZnyC7hDK20Z7SwUMihCmt4+PKwRyDRKqr6sj0uJwmTII92trrTkmnwPGzByyECCDLOM3zt9CJQicrOAycBiyJAIf80okj6HCGi4kgPRnAVq9kRlcxHoLaiJHlwBYwY8qcSbOmTZgdburcSbPDA55Adz4oELRozQIshBjl6WSmEBY8Xixd+uIAgCI5azadKrNDEUo0JlTgunPBBAqCLjjIMNbmVre0MN+2WJBBxYVBNE4EySpTbtEOQTaQIAQgwAYkNWL6jcvYZg0kG5rIGsRAxQkFGRCQRZBBwQYVPCzhOLHBc4YaSnc2FVKj84bSGkrB8Fz6sBECJYSkhqm7BAEjSE6QvkxjlgYVr4cLP4FkQpAgE4IvJ/1aBQxeURgYHr6BtILLwj1TF75hRGjsp2g4qP26vfvu1UkAQO+NAgbxyWlfLk+BAX1LABxAQgQjfPcZBhFQcMBkpQQCACH5BAkHAE8ALAAAAAAmACYAhjQyNCSOVLSaRCxeRNSyRGymXMzKZCxKPGxiPCSmXOzKTOzabCxCPIRyPCSCVExKNEy2ZJTGZOS+RCSeXDyyZPzSTDQ6NCxmRGy+ZCxWPCSuZPTSTPzWTIx6PLzObCSWXNy6RHRqPPTKTDw+NDw2NCSSVNy2RCSqZPTabIx2PCyCVFxSNKzObOzGRCxqRITCZCxaRPTORDQ2NLyiRCxiRNS2RGyqXCxSPHRmPCSmZCxGPIR2PFRONFS6ZJzKZOTCRCSiXDw6NCxWRCyuZPzebJR+PMTSbHxuPEQ+NCSSXPTebCyGVCxqTIzGZPTOTDIyMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+gE+Cg4SCMjw7AjUtTjEtNQIpPDKFlZaEQSkEFRydnp8VNR0jl6VPMg0/n52cq54tHZSmhA8Erre3BDyzgggtuMCrIjizITGswa6trEelCMfBy8kVxJUPv8nZnyK7hDK20Z7SwTUkhCmt4+PKwR2DQaqr6sj0uJwtSII72trrHEWnwPGzBwwECR7LOM3zt5CDQg4rOgycBqyIAIf80okj6HCGiYkgPUnAVq9kRlcxHoLaiJHlQBREYsqcSbPmTA43aXIwIBNnTps6gcbEaaCA0J5Hk8a0ocKDz581n9qUGtODAxoaPCgFSrWmhyEudJzQEAHm1rMcmmg4cQBACQ3KGiA45Xq2KoSxHyhdWAsXgo8FdWku8HGXrwtDE/iOjdvEyAKzUDksMNLk7uKxQCwMwrpY8VgKPTC8aBIhQpMXGHpQUAy3tYYLhAAE4OtaQ4K1Y090zg137O3bJ0rIGsQASG++t1snp127dgIdlm4Ad+46ue7rtqtnKAXDN3K4y5lnB297wKwbxpurH+8aCAxeTxjMTk4/e/i1t0tAh3+KRuL1yrUGxAXD8RcfDSWcsNyCcJXgAgMGWgLAARc4UEICCibwgQMutMVLIAAh+QQJBwBOACwAAAAAJgAmAIY0MjQkjlS0mkQsXkScxmTkvkRsvmQsSjwkplxsYjzU1mwsQjxMqlyEcjxMSjQkmlwkglTsykz00kzUskS8zmw8smQ0OjQsZkQsVjwkrmSMejzs2mwkllx0ajw8PjT0ykzcukQ8NjQkklSsymzsxkSMwmQkqmRUumSMdjxcUjQkolz80kzctkTM0mwsakQsWkT0zkQ0NjS8okQsYkScymTkwkR0vmQsUjwkpmR0Zjzc1mwsRjxMrmSEdjxUTjQknlwkhlTUtkTE0mw8OjQsVkQsrmSUfjz83mx8bjxEPjQkklz81kwsakz0zkwyMjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/oBOgoOEgjE+PQJBJE0wJEECKD4xhZWWhEMoEytLnZ6fK0EaHpelTjENNZ+dnKueJBqUpoQOE663txM+s4IJJLjAqx85sx0wrMGuraxIpQnHwcvJK8SVDr/J2Z8fu4QxttGe0sFBIYQorePjysEag0Oqq+rI9LicJEmCPdra60tGp8DxswcMRAgfyzjN87dwicIlKTQMnAbMiACH/NKJI+hQBouJID0VwFavZEZXMB6C2oiR5UAdR2LKnEmzps2bOhgouMmzp82cIorYaOGzqM0WNhA8gJDBRAahBBRsMGpzQwsCNiogyJAByAyuYLcWqXDCRgkCIyhQaCGErdoRtARK2DjBoMjWrVwRuNjhFG/eDHcBCw6MNzDYwxkOABARFrHjx5AHc6B0oenhwn8Fazas+bALQz8yP/br9zLirSoWDPrqtLHo06MPXyAEIIBr2KUzl94qQtagBSpau86d2zTgHZZumCAOW7doBBhKvejbuTppxwhmzMKgonnkzCqi81pgmzlmzBlEIOdlaEbo6pFVXPDNXtCCGYwtW0/vQnV9SwDscAEEItyFgAhAuHAAfZcEAgAh+QQJBwA8ACwAAAAAJgAmAIU0MjQkhlQsXkS0mkQsSjzcukRsYjwknlzsykwsQjyEcjxMSjT00kwkklQkglQkqmQ0OjQsZkTUskQsVjyMejzkwkR0ajwkplz0ykw8PjQkmlw8NjSMdjxcUjT80kwkllwsakTctkQsWkT0zkQ0NjQkjlQsYkS8okQsUjzkvkR0ZjwkolwsRjyEdjxUTjQkklwkrmQ8OjTUtkQsVkSUfjzsxkR8bjwkpmREPjT81kwsakz0zkwyMjIAAAAAAAAAAAAG/kCecEgUklytgay2G9VkA46LVKxaiTGOxJPrer8eGSVzLfNIisq3y117axSqmbiQuO93iWsuNNTwgGsYKnMWI2yBbm1sNmUGh4GLiR6EVQt/iZlfGHtEJHaRXpKBMhtEHG2jo4qBFEMxamuqiLR4XDU4Qi2amqs5NGegvLaABRsui1yzvss5yjkdFMOTgDQDzryposTOJyHT4F4pmLXl2W4jz2Db2OzDDzDxF/H08/Ty9zD29vj7MCvw7vHTR7BePn4D630omK9hw4QP42lwYBDfQYYVL9ILYMKhRYjzBoa8CIJFwIIQPapESQBAAxgnERoc2e/jPQ1UIsDEuLKneUEQRg449EcUJc94KxIM6Qgvpc+K9kwQAVDiJEN/Gj02kDMkwQqLR7FCRcrCCoqUNCM+nFBGxAOxAo0S3CdgzoSvcZ8iZcsnQQmeNLHOa1CWjxETQp02XAECgOEiCUx8CDyzAQilj62QYBEhQIMLby80CACCANcyQQAAIfkECQcAVAAsAAAAACYAJgCGNDI0JIZUtJpELF5EXKZM1LJEJJ5cLEo8bGI87MZERKJUHJJULEI8nLpMhHI87NJMJKpkTEo0NJpUhLJMJJpczL5MJIJU5L5EPJ5MJJJUNDo0LGZELFY89MpMjHo8bKpM3LpEJKZcdGo8PD40rL5M/NJMJJZUPDY03LZE5M5MVKZMjHY8XFI0jLJMzMZMLGpELFpEtL5MNDY0JI5UvKJELGJEZKpM1LZEJKJcLFI8dGY87MpMTKJUHJZULEY8hHY89NJMJK5kVE40zMJM5MJEPJ5UJJJcPDo0LFZE9M5MlH48dK5MJKZkfG48RD40/NZMJJZcjLZMLGpMtMJMMjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB/6AVIKDhIIyQj8CNwlJSQk3AitCMoWVloRHKwUlT52enyU3HiOXpVQyDkSfnZyrngkelKaEEQWut7cFQrOCCAm4wKsdOrMiSazBrq2sTaUIx8HLySXElRG/ydmfHbuEMrbRntLBNyeEK63j48rBHoNHqqvqyPS4nAlOgj/a2utPSqfA8bMHDMQJIcs4zfO38InCJyw83CqRwkWMBi2WfLBhQ4UKjh+WtGgQw0UKILeUCHD4BMiUCSokmOixYAFNmjVz6rwpQcWEGCgd0kDxJAYBEzZr3ryZtGmPp0lx3iQA9EIFBUx1alW6VatUpQqGYOC69OnSqDa/MoWqEwOEIM9w44aAOzeu3SB178q1OxfH27l59wKmyxcv4cN4TehdzLix3h4W3hYObLiyYcqE6waogfguZsaD9b7wIdkyaMegDwBY4Dkz4sGh68oO0oPSBgilUesWLUiDgSB/9x6O7bowDgaDOOfevZhyDUKrS88Obfkz4NqFGOD4XLi56RA+LOUIXtm6ab4cSsHgPrv15RDPTXHAUd4x5hAweFFhwFq668B1LRCeflQAUEMPnelVVw8vyEJgby+wNtxhDCL3YCUA+LCBBT2EcF0AG6jGSyAAIfkECQcAUgAsAAAAACYAJgCGNDI0JIZUlKJELF5EXKZM1LJEJJ5cLEo8bGI8zMZMTJpMHJJU7MZELJpULEI8hHI8lLZMTEo0JJpUhLJMRJ5M9NJMJIJUJKpkJJJUNDo0LGZEbKpMLFY8jHo8tJpE5MJEJKZcdGo83MpM9M5MPD40tMJMJJZUPDY03LpE9MpMjHY8pLpMXFI0/NJMLGpEdK5MLFpENDY0JI5UlKZMLGJEZKpM1LZEJKJcLFI8dGY81MpMHJZU7MpMNJpULEY8hHY8nLpMVE40JJpcjLZMJK5kJJJcPDo0bK5MLFZElH48vKJEJKZkfG485M5MRD40JJZc/NZMLGpMMjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB/6AUoKDhIIxQT8eNgwjIww2HipBMYWVloRGKgUtUJ2eny02HSSXpVIxDx+fnZyrngwdlKaEEQWut7cFQbOCCAy4wKspObMhI6zBrq2sTKUIx8HLyS3ElRG/ydmfKbuEMbbRntLBNieEKq3jLU06JStAEENAKyU6TeOfHYNGqqs6EAR6mFhAsKDBHT0IQEiwjBMDJ4J+fBIxocfBBTsI7si4EaPHHQ0miPiU5BS4JhsGfrzokeXHGk06oTgRhBOQBhpXctTZUSdBExA4sehQYUPOnTtXtuyItGONCkk8vDhKFWPGnFWTcqyhREBPn0y1fmx6VICCglcNqkW7dm3aHeMUTCC1upHjXKs832q8QKSvXyIg/gb+K5jwYMJEbvANfLhv48GNASOGDNgEYseFJxu+TGSHBb6ZL0eWrNlvABqYS0dmnPkxERc+QJOezbn25AMAFmz2S5l1asqSA++gpOGCbNvIObsQlMEAkcW/o7MGzjuxg0GojyfnHFkDodzagY8OzXh4IQc3qKtOPdmHJRzQq9OWPxsECA6lYBzeH50+YxqzcHDDbqIhtsMAvEjhwAIXjKYeaQsckKAgANAw4IPs7eCCLBMaosEOx4mn4XUdVgKADxpYsINi9u0QgAYHcFhKIAAh+QQJBwBbACwAAAAAJgAmAIY0MjQkhlS0mkQsXkRchkQknlysvkxsYjzkwkQsSjw8ikwcklR8cjz0ykwslkw8nlQsQjxMSjQkmlRcgkRcpkwkqmTExkyMdjwkglTcykwkklSEskw0OjTMrkQsZkQ0nlQsVjz00kwkplx0ajx8ejw8PjRsrkzUykzsykwkllTMtkQ8NjS8wkw0mlSEcjwsmlREnlRcUjTMxkyUfjwsakQsWkT80kw0NjQkjlQsYkQkoly0wkx0ZjzsxkQsUjw8jkwcllT0zkwsllQsRjxUTjQkmlxkqkwkrmSMejzkzkwkklyMskw8OjTUskQsVkQkpmR8bjxEPjR0rkzszkwkllzUtkSEdjxEolTMykwsakz81kwyMjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/oBbgoOEgjdEVgJVPUFBPVUCF0Q3hZWWhEwXTTZanZ6fNlVIJZelWzcuCJ+dnKuePUiUpoQRTa63t01Es4IHPbhJJycyJ0mtqw08syNBrFpTBlIwKUALC9VAKTBSBkmgUKUHzVo2LBTU1tjX6elAFDutNsqVEb9aLFfr19Xs/ED81h7s6NRgF6EbtqYYWfevn76G+/RR8FZlBaELNmS0YOjQn8d+1RzI0IJkEBMEFl6oi7jyozps/1Kw6BFFkJUMDhi25Njwpb59QE7MONUhH0BrP9klBQix2gMVK4gsAckz4kN/DxluIMJAZVWfX322BEJiAtKdWI865OmPgAKI8WF1ihWr70dOpUjz6t3LN++/nnJ7zh0stkKFI4gTi0h8ZDHjxogdK4Y8WUdkypMzP8bMWLKIFIc3S+Y8uvNmxEAwaD59eXLpy44D5DgSWvNr1o5f0xhS+3Zryr4fi0gAYMHpxchtZ859GQglD4Z/s54+nYYgDgVorwYOOXly0zogDJpdWzp104xzECpe4fZ30qIbOy8EwXLr0sFJD7Hko338+Mx1BkIpNfSG3mueNaaeKSDoUF5wrwExAC9bQLCAfwfCd8QCCVAoCAA5WJYfZUDQIIuHhngAhH8BOlaieChWAkACHmAAhAjIARGAB8TxEggAIfkECQcAHQAsAAAAACYAJgCENDI0JIJULFI8JJpcLGJEJKZcLEI8JI5ULFpELGpEJK5kJJZcNDo0LFY8JKJcJKpkLEo8JJJULG5MNDY0JIZUJJ5cLGZEJKZkLEY8LF5ELGpMLFZEJJJcMjIyAAAAAAAABf5gJ46kCGBWEDlX4SyBhQFlbZOMxT288ii+3y+SYNyOnQmhAmw6nz6HZYIsGSK+rDCr/TUjmKqo4dhqz9ygr7CpIi5ps6LQpHu3j8yxAW9651CBfg8NNgYOQH+AT3R1QI1NDmEkEwdcP5CAmZmOQBFUIxaCo5CNmUIJIwxMQpidj6OwWQ5GHRaKTqVQprJPqQAcaq5+uYy7agsTGHeBvMXFnHQQoomL1q+9xk0JAT1/m8a6vVsUC9jZnLHWA4jfza+8znUFPcfX58eQXuL2z+oKiPCliyZLVwEsuK7J++dkQABi9wTRSQerEQUCabQtdDRxl4Rl6GJtFAQBAJaKz3NGavRE5VZCdXYWUUzVYVVBa/HwOapgYATGlwxvNrFAAoClfDiFFvtkpUxEnZ0mTiohANxTlQUK3UDwgCJWmQSqkMlCkeMTB1qrGDh6s6MxMGJGKKkA1JiDBDTiUrIQwa3BAQl66rUxYRqFvl0PUkhQUkwIACH5BAkHAE0ALAAAAAAmACYAhjQyNCR6VBySVCxaRCyCvDRerCxGPCSKhDxy3CSiXCxiRDQ6NCSGVDxqzDR+3DRGZCSaXCxufCSSXDRmtCxqRDQ6TByObDRShCyGnCSqZDx67DROZBySZDR+1Dx27DQ2NCSCVByWVDxerDRCXCSKlDx25CSmXCxmXDQ6RByOVDxuzDx+5DRKdDxmvCxuTDQ+TCSOfDRWhBySXCxeRDSCxCxKPCSOhDxy5CxmRDQ+NDR+5DRGbCSWXCxqTByOdDRSjCyGpCSuZDx69DROfDSCzDQ2PCSCbDxivCSmZByOZDxu1DxmxDQ+VDIyMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+gE2Cg4SCACMxEUZJMkgJPCA4Bh+FlZaERTFKQDICAiECGRlBoxkSFAuXqk1FFzcOPp4hoCGjQbe4CTiUq4RMDUIdnaCenqKkyLYCBr2COyXBn9K0Aia3ttekJgO9LB5COknS45/Wt9bmyQqqO99CB9SytOm49aQZ3JVM0EIEw5/xQtDDZc5WAmaEAAATIiRWwGICCQYZeC0EL0EXGPaTNU1eNXv10F2jMKjIDY0HOtIiFnGiy3P1RiVI1SQjQx0dOa6kaI8eSYUaCRQDOFQaPXMicYmyyIThNxI5V8pKxxMmqRo2GVqgxnVa1ZcxKRTQKKSTzrMfkx51OSrFQiH+DlQS3QlSor0MIU4K8RC3qF9PVK2GJOgu2MpZUufVtSuRXzRiZ+kKXqsUgcYOUYvOGshTpIm3cVkepvaVZ4ixN1OQgwwRKdjBuBgMcdpQNESALXsKduniRWGoXQN+rWuiBoAJQePdnirRtesgFpvMZtgX8SyVw0GSZKVEYyy/rJ8nlRgCYRMWezcexr74dZDthpBrfSjZPUwT0QlV0Cs0OHPdR9VgyQh6OXQbMc4RNwM70OiQwnW2UeQcDr2M0B1m07BEGUH59FIBcv5ENh5MIQjYjCEsKEGABezZFUIAAJxYCABDTECCav+ZE4IL5sk4YwUbnBCAaibglwIONVwDpEogACH5BAkHAEgALAAAAAAmACYAhjQyNCxyjBySVCxaRDR2rDRapCxGPCSCVDxy3CSiXCSKhCxiRDQ6NDR+1DxmvCSaXDRGZCyGnCSSXDQ6TDRShCSKfCSqZCxqRDx67BySZCyGrDxivDx27CSKlDxu1DROfDQ2NByWVDxerDRCXCSGZDx25CSmXCSOhDQ6RDR+5DxqzDRKdCyKnDQ+TDRWjCxuTDSCvBySXCxeRDRerCxKPCSGVDxy5CSKjCxmRDQ+NDR+3DxmxDRGbCyGpCSWXDRSjCSOfCSuZCxqTDx69CyGtDQ2PCSmZDQ+VDIyMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+gEiCg4SCACMuGwQVMUYJPgc4BiCFlZaERS4eQxgdAiECFhZBoxYSFwyXqkhFFDZDsDefn6NBtrcJOJSrhEcqsBxDGgLExKKkyLUCBryCPCWwsDoxn6AhJra12aQmA7wrweFDsqDE17bY2LWlC6o8wdFD0+bW2Lf3t6LelUfQ8UM9qhU7h8/eOhPMCAH4NQQerAzmZhFMhy9fiF2CKPyD1cBaRAH28I2iSOrCoCKvNg6zVo5gEHsh8wVJkAqJxo1DKkRkGfMezHsmF+IckqHcQJA+K+azcPEIsH8pjoaodyskyZAWaNzc2EDizp5KkwW5MOMfPCLFBH6i+POlW3T+QWow3Ih2qleXYeHaCpHSYbBhadNa1UsYncN4HDpQ80g1bEyD/ujebfy4YD4EQ1cGnlrZss+5/9BWswsKbFXLIcpGg8ehbuC1p9/GtlXjw9N4XXc2VgrWxIsWh6NFZWzOdG9bNADsMPvw6KyfPdteRGIbZwXisD0rNclq0+0hnj6W1jsYboiESFY0/NeV9O68t14odLAxBUSP2WVDDzKdEIqU8YTHmGkVIWTJCABKs1N2V/kkgzuRNXRDS/kRlg4OvIzgnYIDwtdNM0hMsAEsKYD3EVt6nQeiISvMpQA9poXwAkYrsrLCDhykIEt+2MiIXo0KTbBCAQHUEIoJIdQHcAENNF4SCAAh+QQJBwBIACwAAAAAJgAmAIY0MjQkglQcklQsWkQ0drw0WqQsRjw8ctwkjnwkolwsYkQ0ftQ0OjQ8Zrw0RmQkipQkmlw8euw0Okwcjlwkklw0UoQshqwkqmQsakQ8Yrw8duw8euQ8btQ0Tnwshpw0gsw0NjQckmQ8Xqw0Qlw8duQkiowkplw0OkQ8asw0SnQ0PkwcjnQ0Vow0grwsbkwsipQkhlQcllQsXkQ0XqwsSjw8cuQkjoQsZkQ0ftw0PjQ8ZsQ0Rmw8evQkllw0UowsgrwkrmQsakw8fuQ0NjwkpmQ0PlQkjnQsipwyMjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/oBIgoOEggAjLBkHCytECT0BNwYghZWWhEMsHDycEUYCFxdAohcUGAyXqUhDFTWcrz8CMaJAtbYJN5SqhEUonBqvPAgCoKSjx0ACBruCOyTBrzjEs7W01aMmA7spwN083R/ExUAm5MikCqk7wNCvD9PWtvKjF9qVRc/tryvT5eW2/2hdMLGMEABf3/TxmBBDlrV/86rF0CWogsKE0mQJKGdN1D+OozAMGuLqIo8FDR0CjGhLVAJUSCya5PEjRkqItT6akyfyIDR2wSxMA2UOpzyQMQAU+XVRg4WUMYzmZBmKhsyZ7xpGnQdRpy0MM0yyK5Fy41SWXYFMQDiTn1aj+mmvjYpR0hvQVyWGxt25MufdduzcypKKszCQfG2nbT2LVt6BmZz4aYTLcqoJtibJyqJW2WutGGFfsQOGY584s0Ur74TRgenFd5ul8p3tQsVffbBVHt19lAYAHZBjifM3m/JEJK1F6xNuM15nWy4EDdlkcsFpr55txSiIJEVCfRqkvVXNWOQgAA1M4lgxnjHc44ROlAwGVPLixv5oWBpRt11ukMRFZI8lzigUi02yEWfCDbuMQB00GXHGWE4DqiJBaNBINhBf/8SgHzPSpfAgJwc695kLFIFoSAoYasAPLf7E4AJ3KhYCgAQpFKADAROYkEAME2BAQ4qXBAIAIfkECQcAMwAsAAAAACYAJgCFNDI0JIJULFpENFqkLEY8JJJcLGJENDo0PGa8PHLcJKJcNEZkNDpMPHrsNFKELGpEPG7UJKpkPGK8PHbsNE58NDY0PF6sNEJcJJpcNDpEPGrMPHbkJKZcNEp0ND5MNFaMLG5MJIZULF5ENF6sLEo8JJZcLGZEND40PGbEPHLkNEZsPHr0NFKMLGpMPG7cJK5kNDY8JKZkND5UMjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABv7AmXBIFAIuH0lisoopSgEToVKsWomwD2TF7UYiL3Ck8DhczzOYI9Vtr8CvuFxhoqKJMg2X2WVOvmGBcAUEd0IqG26KcHBxYhwCdx1+K5SUTXAcL5qOYQZnKnyKbo1ypmERkVUyiaN7XmJynIwchUQAepWubY2cp44ldkIOu6Jdmr2BmrMPQzBsu4uyv3JgCmYzxNGKMYGmnL5xzbhuxqOx4b7LL8Eyr9u6sXHhvxEk2vC8mafg1Q8j0fiI+uNt3rROL0LkyueF2i9fJaBZesftkcGL38zBI+jw26YwrRhyAfQRI70ICUR26ebxoayFIuXxe4gBYB+KAvewjKDOI5+nEBQowmPZ8dcDDxq37bzYTxYJACgY+iFZyuQLDFSC3txKqmDTU83SuFAZQ0wyjwpszeigaxuTqvR8hTWCwO1KZTPlBCuSIWU+oi0/1rJyAZpSQSVNRRABKuQukj2XmbhzYWw0wAU3qbqTwabGP4D2sSNhaAiADpbNAeak4IGw0kIqdEBhjCBJDGVgXwHAoMOAES5SRFCAIcQDEq+vBAEAIfkECQcARwAsAAAAACYAJgCGNDI0LHKkLFpEJJJcNFqkLHKsLEY8JKJcLGa8JIJULGJENDo0JKpkPGrMJJZ0PHLcNEZkJIKUNDpMPHrsNFKEPF6sJKJ0PGa8LGpELHqkJJpcPHbsNE58JIqMNDY0JJJsLGK8NEJcJKZcLG6sNDpEJK5kPG7cJJp8PHbkNEp0ND5MNFaMLG5MLHakLF5EJJZcNF6sLEo8LGq0JIZULGZEND40JKpsPG7UJJKEPHLkNEZsJIKcPHr0NFKMPGK8JKZsPGbELGpMLH6cJI6ENDY8JKZkND5UMjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB/6AR4KDhIIAISs+Dxs8Ix8vCTQGHoWVloREKzc8nJ0gIwwlJQwDGAuXqEdEFDmdrjwIIDijoiUHNJSphEYNnIydvyAgAbShoQMGuoI6KK/OwiBFtbS2AropjNk82sHCOAzG1AwuqDq/zsCwwhGh08YM1pVGzei+nsIjoqEi07bJhAB6bavnCpqMIu1q8Rv1IpcgCgTP3RNmgdZCfaMwDCLSiqCzWMIc9CuxMNSBU0cgenwGbQhJURenaQz4SiI6aCA6JFT4kkFDI/ZWDgQJIgLPmPpiqBRaEBq7nRgXYoDh8ZdEnC3Cvdw6aoZApp2ItqgFddqLjtyCumKEMwC4reIL+cm1ybTtyLsM6IHl1FYrTLglHuydOIwaUoVf92KlNnKhBqrpBqodiHNHzLjTZnCYjO5cZWOHX2JQQXclTnZ3ucYAAGTwBqI62+2bJkIDpc2RJ3cT5rLsVo2qTAzG6aCd3H4H/h1JIVkozoplF9IAiGClZ2EIpEU161AQCcF1hRGLTlI5oRAdq4JEPVshuUvMnPO2+FfE9FQhhHuE9oMxzPe6kAACZ9vE4pY4JbwQgzKDAJDCJjfJ4s4BGHTH4BEOIiDRBp+AA84LGJh3IUASpEAACCbkMIIDGiSAQQwWWhIIACH5BAkHAEcALAAAAAAmACYAhjQyNCSCVCxaRCSSXDRapDxy3CxGPCxqpCx2pCSiXCxiRDxmxDQ6NCSGjDRGZCSShDx67DxmvCSqZDQ6TDRShDxerCxupCxqRCR+dDx27CxmtCSClCSibDxu1CSOjDROfDQ2NCSaXCxivDx25DRCXCSmXDQ6RCSKjDRKdCSafDQ+TDRWjCxuTCxqtCSGVCxeRCSWXDRerDxy5CxKPCx6pCxmRDxqzDQ+NCSGlDRGbDx69CSuZDRSjDxivCxqTCR+fCxmvCx+nDxu3DQ2PCSmZCSedDQ+VDIyMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+gEeCg4SCACQrPQUZOhoHGAE1BiCFlZaEQysdOpydIp80EhIDFwyXp0dDFDKdrY2fIqE7Owk1lKiERjacjJ29sJ8NEjvDAwa4gjkjrszAIhpFs8MlArgojNg62b/OG0TSxC+nOb3Mvq/ORcPExNWVRsvmvJ7OIhvr7AnHhAC72vKt6j3DJw3GLUEUAJajVy8FMVHSLgwawgogMyACN8yaVWJWAlNHElpsJhBBx44bJUjs52qhOYEDN3LcYdDIvJH/MApMAG6dhBkicQaEmWIdSmIXYljstRCmiAcQN3Z04U9oJ531TkiVGaLitpstnQo7irKES6FYu8lEKSqeVU7JYmfK3FHgLcN6wuaerPrWqdats0IoPffvJtO0wB6UleniA1icTmHM5chCxdmRTjkMMzprBoAFVrEh/qQBIkGDRxwTfnwXGAKCKCWmEmIXpsbN0vQNQlEYssCik2vwizCynMDS7E6iJmSiLs4MGTnvKDHDEomKmOupkylB3CVlvl1LODldOCoStC1qX+sOlwkRrLWlbcCO5j5kRwCg2PQS1mtiCVxwEH6GoABENtrA4o0EIZRC4CUATIACAUAIIYMGFkBywQwDXhIIACH5BAkHAEsALAAAAAAmACYAhjQyNCSGVCxaRDRapCSSXCxivCxGPCSiXCxiRDxy3DQ6NCxmnCSShDxqzCxidDRGZCSqZCx2pDRShCxqRDx67DQ6TDxivCSibCxurCSafDxerCSaXDx27CxmrDROfCSGlDQ2NCxeRCxilCSWXDRCXCSmXCxiVDx25DQ6RCSWfDxu3DRKdDRWjCxuTDQ+TDxmvCxqtCSOXDRerCxmvCxKPCxmRDxy5DQ+NDxu1CxmdDRGbCSuZCx+nDRSjCxqTDx69CSidCSedCxmtCSOhDQ2PCxeTCSWZCSmZCSWhDQ+VDxmxDIyMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+gEuCg4SCACQsFgkcP0IdIg5FBiCFlZaERCw4P5ydBZ8FMB8xEwqXp0tEEjadrY2gnxhBBzWUqIRJDZyMnbywsCk7BAa3gjonrsm/oEIZOwcCtyuM1D/VvsufMBc7EAinOrzJvT8z2Z8R3RDRlUnI47ue558MO8/EhAC61vCt87EQuo2wJUhCP3Hy/jEICGHCICKs+iUz9y9CwGemlhiUqOzfpwPddjjU5wrhOI+fhjAcmCQeR34U//FgCIHGxpf+UHa4KFKGRF4IUX6iGWAfzk4x/124OCLiNZetGAkt4MxeCZM4pxqh+e4op6nBQibwmtCjs4AljHqdeuDiBp+r5PhB5Tf1yMUAHuaOEyd0gb1uE1xg5Sj0w5GQNAAoIcsh6bkPKynljTsXm8e29hymUkEWJQaGB/AtWSH3Jcohf2vke8GR778FdiEMLIRibNZ/qHeUEE2IRMSfjmFhUBcCXNd+8zq09XaLBGeJ84KVYHcLRQG91oIXMLJjBO9bAFZsOvlrQYYDPggWGxR+BkIOvz4QaJFxvSUAFVYMKKDChhAhIuSAAA3qXRIIADs=)!important}#toasty .toast.toasty-theme-material.toasty-type-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QTY3QkFBREEzMjMwMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6REZBRTRCMkMzMjMxMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBNjdCQUFEODMyMzAxMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBNjdCQUFEOTMyMzAxMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pu2cWHAAAADmSURBVHja7JlNCsIwEEYTcWsXrvUGBbvqFep59Bz2Il7AXsGd4A103UV7gHQwXQkRGqFJ6PvgC5QUOq+TX0YbY1TKWqnEBQAASwdY/+zNy720F/FRvJk5tl58E5/V8/5yvaSdy2he7qR9iLeBf3IrPgjEe+oQqiMIXo0x1D5zoIpoqFc+AFlEABnLKABB9oH/pL+eDRkAAAAAAAAAAAAWdBYyZAAA7gPcBwBgHyADACQM0EUUZ+cD0EQE0PgAnJQtLoRWO8YyEcBWRArxVdlyz9zqx28XrurM57xCpR4AAAAIqkGAAQAoXCj9X4moZwAAAABJRU5ErkJggg==)!important}#toasty .toast.toasty-theme-material.toasty-type-success{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjdGQ0YwNTEzMjJFMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjdGQ0YwNTIzMjJFMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRDJBQjdENDMyMkIxMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGN0ZDRjA1MDMyMkUxMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pp4tcFEAAAEgSURBVHja7NjPCcIwFAZwK9LexAE8dBS9WQURPLiBNwfwZLuBUyhebHEBXUVwCi/1C7yClCZN2sQUzIOPGsH4I38eopfnea9L1e91rBzIgRzIdA3aTjC+bVQ/4iNr5MwGr+XF6goxzBU5IQfbW8YwKbKgcYxMbIEKzPzrvQR52ADxMLGNLVPCaLllNZgMiWQxJleoEcYUqDHGBKgVRniG0IFDPPbIDt30LTFXQAe4MYa7QoS5I1v2JRj7v8CItmyFhPSaXdlMgNKG4YKwRUeatKiIUEFpJbVihIcaqLgClRYoemY6MbW3TIAaEmamEyN17TmopwmMdB+qQI1MYJQaYwVKO0a5U5dQCY3t/sgnxNQEhpXn/mxwIAf6N9BHgAEA0JpdHXf3fp4AAAAASUVORK5CYII=)!important}#toasty .toast.toasty-theme-material.toasty-type-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6REZBRTRCMkYzMjMxMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6REZBRTRCMzAzMjMxMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpERkFFNEIyRDMyMzExMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpERkFFNEIyRTMyMzExMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Po80HzoAAAIcSURBVHja7Fm7agJBFHWX2NhY2doFDAwBIa3kA5La9H7AdtrZWohNPmP62KQLtgEhBCKks7WysRHc3IEr8bGPOztzZ3dhDxzUndGZs2d29p7VC8OwVmZ4lYBKQN4CpEhqfcLXeWyPl2+j4W8YT04dOMP378A9xyA+o4AA2EEGXINwCWgBxyefx3isNAImwObJ5yYeK4WALnAQcXyAbYUW4AFfY37XxzavyAL6wF5Cew/7FFJAAzgl9Jti38IJGALbhH5t7FsoAWpSI43+I6JYZwJ0lwV1uTkRkPXCTLvgHRRzUqgT8Gmwvy+BD1DQHfJywPTmFHfTc+CAFKo8+LVQ42yAt+DC1rUDaQWad0Fq4efAASlUifyFNX+SgFMkDaSywj24sHLlwCxl8ibhh9kBKVRMfCMWdlQHjngGF+Z8AqSo49LpMAlY4VLacy2hgDj5rNCOn3QHpGjhttnUyAa6DihscVvd2HZgojF5E2jFT5oDUnSxZPBrbnDAEmNpLkAKtRQ+bBRemlgAH0FEaLqE+jlMnlzlJjsgharbf2yFjwxYA+/AhV1WB4YGk6fWQkbxM94BKdp49hsGArJso5fYoQtrXQesPj3getoR7YAUPdx5TB5C2XLg+F21Iy3SBZjHRC5Exk+fISZyITJ+njtgLyZy4Sp++poxMW9cxc9/B2gxsQg4i58+Y0zkwln8rP5mrQRUAioB+eJPgAEAEga0oSjgsNgAAAAASUVORK5CYII=)!important}#toasty .toast.toasty-theme-bootstrap{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif!important;font-size:12px;border-radius:4px;border:1px solid transparent}#toasty .toast.toasty-theme-bootstrap .close-button:after{content:'x';color:#fff;font-size:17px;font-weight:100}#toasty .toast.toasty-theme-bootstrap .toast-text{color:#fff}#toasty .toast.toasty-theme-bootstrap .toast-text .toast-title{font-size:13px}#toasty .toast.toasty-theme-bootstrap .toast-text a,#toasty .toast.toasty-theme-bootstrap .toast-text label{color:#fff}#toasty .toast.toasty-theme-bootstrap .toast-text a:hover,#toasty .toast.toasty-theme-bootstrap .toast-text label:hover{color:#f2f2f2}#toasty .toast.toasty-theme-bootstrap.toasty-type-default{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NEEzQTA1RTUzMjJBMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NEEzQTA1RTYzMjJBMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0QTNBMDVFMzMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0QTNBMDVFNDMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pr4ktvwAAADlSURBVHja7NrRDYIwEIDh1jAAozhKN/BWcgJ0A0dgBEbRCbCNkphaTAsPXpv/kkugELgv5eCh2HmeTQtxMI0EEG3RxQPW2mXT+Tz57JXUevd59XkLO1+9HQY+8x1DOKQ0h2TdCYhTjFjSxXWnekQqaAnJafa+AkjP6xcIECBAgAABAgQIECBAgAABAgQIECC7Y2oB8vB5qR0SEJKakW7Dxc7mtejyj8dpXL13Yn0knLy2LiFapiZnoWfUjtgDEW3NsgUiGru+FCJaX18lELWIEohqRC7kWMOXMa7b8ncQECA/4ynAAPBVcVo7OMcUAAAAAElFTkSuQmCC)!important;background-color:#fff}#toasty .toast.toasty-theme-bootstrap.toasty-type-default .close-button:after{color:#000!important}#toasty .toast.toasty-theme-bootstrap.toasty-type-default .toast-text{color:#4b4b4b}#toasty .toast.toasty-theme-bootstrap.toasty-type-default .toast-text a,#toasty .toast.toasty-theme-bootstrap.toasty-type-default .toast-text label{color:#4b4b4b}#toasty .toast.toasty-theme-bootstrap.toasty-type-default .toast-text a:hover,#toasty .toast.toasty-theme-bootstrap.toasty-type-default .toast-text label:hover{color:#585858}#toasty .toast.toasty-theme-bootstrap.toasty-type-info{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NEEzQTA1RTkzMjJBMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NEEzQTA1RUEzMjJBMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0QTNBMDVFNzMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0QTNBMDVFODMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvCIVOQAAALtSURBVHja3Jq9axRBGMZnj+ViAhbaaISLR1AUBBNjEq7zD7gUiqIIgraKVf4Ay9gljYVFiliJEklyJE26dJsPYy5pE/AQtNNC8SMXHJ/BN7C3O/exe+/c7twLP5jmZp7ndnZ25n3HkVKKboiM6JJwmfrpA6fACCiAIXAB5H1/1l/wEeyDMvDANvgGfrYrwGlzavWDcfAQ3IrZxwJ4BTbAl9hKlJEY5MADsCv5Ypf6zMXRFPUHLigCT5oLj8ZwTRk5C57LzoUaq5/byFWwLDsfS+Ayl5EC87sQNTZJQ0OdzVYttYS+oWU1yVDL9D1auiN/EM+BmRSYEKRhhjRFMpIFT0ExRR/vImnKRvkgqh+9Az0p24n8AbfBSitPZAA8YzJRBT+IKkN/PaRtoJkRB9ygbQdHzILTxCxTn+Ok0WlkRO2dJhmnwhE9iSq1uWKStGqNOOR2mHHAM7TijFCbK4ZJq6N72U+A1+Am44C/wHdqnwS9jH0vgvvgd9CIWqM/WXTYUuebHPgcnFqjlp0YM6Q59I4UDAymDkuPiQ0D/Rd0R90hQ0ZeUvsK47Ie0uw3Mmjo8WcNJjoGdVMrb2Agp06bK/I6I66wL9yuy2tlAtsJ2+JIZ6RioZGKzsiBhUYOdEbKFhop64x4FhrxdEa2VAbVIhOSNIeMfAUli4yUSHPIiDrYz1lkZI40h4xI2uTtWGBih7TKel92VZ+YNjCXud+9aRGopbiaQdfILceWewJcpPYlxqPBWvDPqZegUwLmRToTdHfAcqO9lj9W6fGlaTmWpGm12abRH4fghdCkJhOMFdJ0qD34tFBWeAuuJWziA7grYpYVBP3wifhfn0gqtknDfuOJ11rpTZW/SglUq0qcpbdjVGFyqoMmpkwUQ/3l6QmwbtDAOo3hmqyzBy8M7DEa2GvnwkC7VzhUvngMPBLxk9+LtAHcFJTHjZV3YrrmdHyp5rqovVRzXtReqqmI2ks170VKLtWkMh1kdfwTYADvtL/RevtcWAAAAABJRU5ErkJggg==)!important;background-color:#5bc0de;border-color:#46b8da}#toasty .toast.toasty-theme-bootstrap.toasty-type-wait{background-image:url(data:image/gif;base64,R0lGODlhIAAgAPcAAAAAADhwqCp+vi5yuDR4sjR2sDJ+sjp0sDZ4sjJ4tjR4tFyQwDB0sHKexnyozkKAuGaaxnCgzHyq0Hyo0H6q0ISs0E6KvjB4tjB2tIau0oau1Iaw0oaw1Iiw0jB4tIiw1Iqy1DJ2tjJ2tDJ2sjJ2sFaOwIqy1oyy1DJ0tjJ0sJK01FiOvlqOvlaQwpK21FiQwliQxFqQwFqQwlqSwpK21pS21pS42Ja62pi62Ji62pi82pq82G6gyqTC3nKgyHakzqTE3nimzqbC3Hqmzq7K4nqozoKs0pC01JC21p6+2q7I4LDK4LLM4jJ4uGKWxnqo0EKCvGyeyoKs0FCMwFSOwliOwJy82nSizKrG4I601py+3LLM5LbQ5sDW6DB8ujJ4tDB2uDB2tjp8uLzS5sLW6DJ2ukCAuD6Auj5+vkqGvEqIvqDA3EyIvk6IvlSMwFKOwlaOws7e7mSayLrQ5Mrc6tLg7rjQ5jB4uNzo8qbE3jR4tkKCulSKvDh8tkiGvD5+uE6IvFSOwJy82DR6tjZ4tDZ6tDZ6tjh6tMze7OLs9F6UxGKYyDp8tlKKvGKYxjx8tqzI4Nrm8ujw9oCq0FCKvj5+tubu9u70+F6Uwj6AuFqSxF6SwnKiykqGvkSCuMja6tjk8Pb4/GycyGiayGaayGKWwlySxEiEunCeyG6eyMja7F6UxkSEvEqGul6WxmCUxEKCuMTY6mqcyGqcxk6IumCWxmSWxFSMvlKMvlCKwNTi7k6KvGSYxDp+uESCujJ6tjR8tjR6tDh8uDx+uDh6tjZ+tgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEFAMYAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAIAAgAAAI/gCNCRxIsFiTBAgTJixGsKHDgcASYFBIMcGFBF4ePjRgsWICBYpkiKEYQONABQpn2ACR0E2XLkgoXmhi8tdFhCJ6bNliASGPlycSikAYotBDBTcTTtrpAGGGl1cQEqBxok+CEDQJDgiRwFCahJR2YlEgYs1LGQlGnIgTh0bCkgMRKtAA5AfKETq3yBhh5+UDET7YxmmaEOJFC0ASb2D05crODw9echmxQDAOlAmzJlTgIDEQG3s87SRS4qWVVrHYKjlU0VgZhQpkedbShgYRCgquZHlBhO2YBwlEFCilKAGYAwcViiixJnEOBVaFdoijysIIPi7i4Im0R6EwNSMT/nxJowNIFI8KeMWo0AWPe/eyFP7QoSOLg1El0pTwmPDIe/d0VIWQBwmAQN+BOuTwB38+uaeLFYoQkFAIBCrCwQ0I6hAefwhUMAsCQylEIU4EPOAGBEGcx+BHSTBRgw98FDDCUCEklVAfuLyix4p7SOLjj3RUIAJXm6URxQcmmDDFiqf86CQdItzUxyJGJGmlIwwqgAoLPtCwRB0+5qHQFFYmOcEMfqjhkQg7hJLICjOK8EgV4RVzQS9JGuHEX3tMIIEmFA0igiWhhHJJAwwoBIYAxiDkRxqY9fKDBBJEwYopU+hBhRwv2CJJoaGoQIJCAnkxUUKGREBpEH8sEkEEqA/IIasYgIAC6hKEJODBL3EpRAqlErCiBw+v9tGCrGwkUAkZoGKCEEEcIdQCsD2J8WoUIkAhqysIESJEKHOghEZDTXDlBKUzIMTKq7UkMMgisp6RUAmFhKDAQ/UOskpxCE3xagv9yrrkhGCY1ISNCWjyqpoJnCHrKrCZJFAAEiVkyqtmJNQCDFDomsC4Eg90EBjuQsFKRSTzGrJDByB0QQgw14gQoyYFBAAh+QQBBQDIACwAAAAAIAAgAIcAAAA4cKgqfr4ucrgyfrI0drIyeLY6dLA2eLI0eLRaksQydK42drB2pMyCrtJAgrponMp4ps6IrtKErNBOisCMstQweLYyeLKGrtIweLQydrYydrQwdrQydrIydrBWkMAydLYydLCOstJYkMCOtNaQtthYkMKSttZakMBYksSWuthaksKYutiYvNqavNqcvtxqnMagwNpwnshwoMqqxNxwoMxyoMhyosxyos50osx0pMyAqs6qyOCAqtKsxt6CrNC2zuSCrNKIsNSOtNSWuNamxN6qxt6wyuC60OSKsNSKstQ2erZkmMh0pM5Ihrx6ps6GsNRQjMAwfLoyeLQwdrgwdrZWkMKStthsnMiiwt5uoMqAqtCsyOCmxOCwzOK40OYyeLi80uQ6fLgydro8frhAgLg+frpAgLo+fr5Khr7E2OhMiL5Oir5UjsBWjsDE2OrG2OrG2urI2uponMhunMjU4vBunsi0zOIweLh+qs56qNDA1OjS4O7c5vJ8qNDC1ujg6vQ0eLZEgrpYjLxYjr6gwNw4erZMhrxSjsA2frZCgLg2erRclMRomsg+frY6fLRmmshkmsg4fLY6fLaGrtRSirxSjMCuyuLS4u7o7vZQirxcksR+qtBCgLa80ubM3uzg6vLu9PhcksJwnsZilsRglMBeksDe6PK+1Ob4+vz8/P5GhLxglMJIhLpCgrpelMRkmMZilsZIhrpmmMZMhrpCgrhmmsbM3OxOiLxomsZUjL5Qir5SjL4yerY0fLY2eLRGgrpMiLxUjMBCgrxglsY0erZEgrg0erQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gCRCRxIMBEYAwgTJkxEsKHDgb4McFBI0YAFA1IePiRgsaKBBJtGGKIYQOPABApNkICScNeXLxUoWgBjstdFhBde8OCxBiGMl0ISbkCoYdHDBDcTPtkZAeGPlzMQJqggZIkBDTQJDtBgYImThGx2ZklwwcXLEQY6SIgTJybCkgOl9nhxw2oHnTw+dPDy8sEFGWzjNFAI8eKaF4gdjJyx04Gil5cuoHjD9gTFrAkTRED8goQrQTuLtHmpQhYqtkUWVUQ2RmGCWZxVHKrQ5UmCGUncFGELpIyBDQVYoTBA5cBBhRvatEB8JYFVoRPi7FnToVIFOHUwPVDoVQzCKU6u/ryY49EAqRE7kNRZv76RwhklSkBpAKuNkzblEVZgv/6PhJEGZGCAA/EVWAIJZORnABbrfaICCgUkpIGACvRAgoEleJcfAjvkgsBQCk2IEHCKWBJLDuQpmAALXAwhQyUIdEBUUgktwcYmKOUnCCA88niKGltswFVCgaTRSA8OOECBgq2c0mOPamxw0xKv+JHklYzkl4AMI9BRgQ+f8JiFQhRcmaQOHwjyVUUXqBBKH4PIeMEjHwCYiAViJKnHK349gEMTJiD3SAGnhBJKJjLImBAVAiCDkBNO5CjGDE00AYkgVqyRwBGpqFEKIIaGIoKiCAkkxUQ1QlBpDWQwAgEErYKkoooqtODCR6g+qJZBL3EpREylTQgSCCSvLhHGrERc4IgnoYpS6kAcIdQGsEuK8SoTU9gwKyALGLBIDKEAgRIaDYHBFSOVBmqAIK8q4G0os5aSUBtLaJDAQ4tosIQC7iK0xqtRIOTDrDRcICEVJoFBowFWvLomKduSeq9JyAQgUUINQ2CGVGHIgcUFApJL8UAHUdHVA8Mgt0EVBvA6skMHIGSBBjRrcFOjJgUEACH5BAEFAMAALAAAAAAgACAAhwAAADhwqCp+vi5yuDR4sjZ2sjJ+sjp0sDZ4sjJ4tjR4tFiQwjJ0sDR2sm6cxnqmzkCAumSayG6eynqo0HymzHyozoCq0k6KvoSs0DB4tjB2tISu0oau0oaw1Iiw0jB4tFSOwIiw1Iqu0DJ2tjB2tjJ2tDJ2sjJ2sJK01DJ0tlSOwlaOvlaOwliOwFiQwJK21pK42JS42JS62pa62qDA3GiaxmycxmycyGyeyHSkzGyeyqLC3KLC3qTC3HimzqrG3nim0HqmzH6ozoKs0I601pC21p6+2qbE3K7K4n6qzqrG4LDM4n6q0q7K4LLM4jZ6tmaYxmyezHqozkaEvHKizHyo0E6KwIqy1Jy82mqaxnSkzqbC3KbE3r7U5rbO5LzU6DB8ujJ4tDB2uDJ4uDh8uDJ2ujx+uD5+uD6AuECAuD5+vkqGvL7U6EyIvEqGvlKMwMLW6EqIvkyIvlKOwszc7KjE4GKYyGicyrbO4rjQ5src7NTi7mqcynSizNjm8DB4uLrQ5pq82trm8DZ4tG6eyEaCulaMvDh6tkaGvFSMvjZ+tjp8uEyGvObu9jZ6tD5+tjp6tGCUwoqw0jh8tjp8tlCKvFCIulCMwDp8tNjk8ODq8uju9lqSwnCgzHakzEB+tvT4+liQxMTY6tbk8PD0+kyGuGKWxF6UxF6SwFqQwmCWxl6SwkiEvFqSxEKCuEKAuFCKvkyGumKYxkiEukKCukCCumSYxjJ6tjR8tjR6tkaEumCUxFKMvkSEvDR6tDR4tgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AIEJHEhQ0ZgECBMmVESwocOBuBJoUEgxQYYEYB4+NGCxIkJOIMhQDKBxoAKFLEJYSAhryZINFDOMKXnrIsISM3jwiIOwhsshCUsgHOHooQKbCT3pzIGwgksJCAl42PAkwYiZBAeMSPBkSsI2OrEoKBHDJYgEJjCwYRMiIcmBCHM9kCHhJIEYOkEQUOISQokba9lQUQjx4hoZiCeIvKFTSBqXdUq0+LKWCEWsCRVQQSyjAwRXOmmAcFlklpe1NKpSBFZGYQlTnIms4UAjxxMcGxLtWIskTYISBFYtSEDiwEHXIGAgvqJAdcIkbPK0MVHJAxs6eiAo7CoSoa4rMiL+eEwQacUDJ3TSp4eiUEcIlZ1UvWH1ZjxCDurTA8JwCOGHBFW8J2AIHZhhXwI1pCfKCwucNNR/C/jQwYAhdDceARTUMIhQCo3wH0IKpHHBKRLIcmACCsTAhSQOVFIAhyMgldATbTR4oCt+5KhjFxWUsJVCU9jhwwQTyHFgITom2UUJNj3BiRZERjnceArcsIINHvQgSo5YKBRHlERKAAItiHhUwguN7GGIUCVAEhJCimSwCJE5cAJBGBDoEIUKrlFCQCaNNKKJAyYoRIIAwCDUyxQOknFHFFGoQosKcSjwAyldoCJIoI2IwABhwIAx0Yx2QHrHIq1EEIErpIACSimsbdDB6REIJPDBLXAllEsrkEqgnaoRPOGFqyiU8IgXnHKCEEEcIWQFpFG4kQAZqtoRBiGuCvIpAUY0gsRJajQ0xlYLQHpWArSoGgpXm7iKSkJvPDGCAg85MkIuKvCJUByqXoLQEa72wKFVYpQ0howJqKCqVwns4qofhYJYkkABSJSQwhEYiKIXcNhQwn/hTjzQQSQkkAsEtLhWQsm4iuzQAQhlMMLMMSKEaEkBAQAh+QQBBQDRACwAAAAAIAAgAIcAAAA4cKgqfr4ucrg0eLI0drIyfrI6dLA2eLIyeLY0eLRckMAydK40drByosyAqsxCgrhomsZ0pMyAqtKAqtCCrNBOir6ErNAweLYwdrSErtKGrNCGrtCGsNSIsNIweLSKstQydrYwdrYydrQydrIydrBUjMCKstaMstQydLYydLAwdLBUjsKMtNaOstJWjr6QttZYjsBWkMKWuthYkMBYkMJakL5akMBaksSYutiYutqavNpunsiavNycvNqiwNxyoMpwosymxN54ps6oxOB6qNCoxuB+qNCqxt5+qs6CrNKQtNSSttagwNqkwtqyzOKwzOJ+qtC0zuQ0fLZkmsh+qtJIhLxomsh4pMyArNJSjL5SjsKOtNRuoMqgvtpwoMx6qM6uyuKOtNaUuNigwNyiwt62zuK2zuQwfLoyeLQwdrg6fLa40OQ2frYyeLgydrrC2Oo4fLg6frg8frg+frhAfrg+gLhAgLg+gLpAgLo+fr5MiL5QisBOiL6gwN5QjMBSjMDE2OjO3u5unMhmmshqnMpwoMp2pM4weLjA1ujO3uzQ4O7S4O7e6PKsyOA0eLZEhLxUirxUjsA2erZIhr5UjL48fLY4erQ4erZglsbg6vTY5PDs8vjq8Pbu9PhclMS80ujM3OzS4u7o8Pb4+vxcksRcksJ2pMxsnspqmsRIhrxonMhGgrhmmMRimMhilsJeksJunspkmMhelMRqmsZGhLxglsRKhrrM3uxEgrhEgLZKhrxklsRCgLrI2OhMhrpMhrxOiLpOiLxQir5snMZEgrpCgrpQjL5Sir4yera80uY2eLRkmMY0erY0erQ2erS80uQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gCjCRxIsI2bBAgTJmxDsKHDgVMSZFBIMQGGBGgePjRgsSJCGSziUAygcaAChSw0FElowYiRCRQxuCmZ7CLCETB69NiFkJnLIwlHIAzh7KECmwkd6OyCcIjLKwgVVJgwKUGImQQHhEgwCVJCYDrHKBghxiWLBAQonDmjISHJgQgfSWhR6CQBMTq1ECjj0s6ICGvPBFEI8SKlFogPrUkQQeeQOi7LjHghZa0HilgTPuqCuIWSPBB06tDiEgSrMGt3VKUY7Y3CEbM6d7AyQUeQSREmaPGxlgidBCMILIiRQMSBg6+HnUCsQcHqhEXOPNlFQtiFM3Dg5FEYB5JIhJA0/rTI5DEBrEpYHGVfTz4hlQkThhT6ZKGWhfIIK6zP/uQIJoQfJCABfATCJwd+CTCTHSgoxHDSUAGy4EAVBU7wXXkEYMHLJUIpFEKAUdFhAQ6rfIJgAgrA8AMHtARDQIchIJXQJJSY8AiCECyio46CnDHECFspBAkOQTjgACUIsiLIjjueMYJNk8jQhZFUnlWeAhG8EMEFPyij4wwKUUKlkYTw0YtXFY3ARSOCRCLUCGuYsFgCbWAQh5GosDBHAnNQQYUFJHQIJwGCNNLIJqmQoJAIAkQDHpoJxJGJnzXwYAYMlwgxChsLiGJoIxsompBAaEw04yd+urJGKKSQ8soor5xw8sstgXz6AwIJfJAMXCj5SQUeBHjSqi5PxOrCCJY88SkNCBHEEUJ7+GpFAre0ygkDPMTKSAko5tAIEifp0ZAbW7Hg530J8NCqLyQso0msCySkxSQhKPCQMyE0w8cfCTHRqhNC/RBrEx1apUZJbsiYgBmtPoCQKdoWbG9J0QQgUUJntBovik8oE8EIAYpL8UAHiZDAGhHQQkBQI5i868gOHYAQBiOkEEKMCDVaUkAAIfkEAQUAywAsAAAAACAAIACHAAAAOHCoKn6+LnK4Mn6yNHa0Mni2OnSwNHi0XJLCMnSuNHayNHaweKbOQIC4apzIgqrOeqbOhK7UTIi+hK7Shq7SMni0MniyirLUMHi0Uoy+Mna2MHa2Mna0MHa0MnayMHawjrTUMnS2MnSwMHSwVI7AkLTWVo7AWI6+VpDCkLbYWJDAkrbWWpC+WpDAWpDCXJDAWJLCkrjYWpLClLjWmrzanLzYbJzInLzacqLMoL7aoMDcoMDeosDadqTMqMbgdqTOdqbOfqjMqsbgfqjOfqjQgKjMfKrQrMjgfqrQgKrQrMjisMrgiLDUjLLSmLrYpMLcqsbesszisMriirDStM7kirDUjLTWNnq2ZJjGQoK8apzKgqzSUIq+hrDUMHi2UozAMHa4lLjYbqDKdKLMosDcfKjQmLrapMLets7kuNDmNHy2MHi4utLmMni4Nnq4Mna6MHy6OHy4PH64Pn64PoC4Pn6+SIa8vtLmTIa8Uoq+xtrqUIrAUIzAqMTepsTgZJjIyNrsZJrIytzsaJzKgqzQcqLK1uTwcKDMdKTOxtjq0ODu2OTwNHi2QoK6Toi+OHq2RoS8Nn62PH62Soa85Oz0Nni0Ony2OHi0YJbGZpjGaprGaJrIOnq2Onq0PHy2XpTEYJTCToi84Or06O728Pb6XJLEbJ7KRIK6YpjGaJrGZJbEYpTCwNTmzNzs8PT4+Pr8xNjoSIS67PL2/v7+SIS8bp7KZpjEZJTC/Pz+SoS4TIa6zt7sYpbGaJjESoS6Soa6TIa4QoC0aprEQIC6Uoq8vtTmToq+Mnq2NHq0RoK6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACP4AlwkcSFCSGwMIEyaURLChw4FrDHhQSNHAFwNxHj4kYLEiwhJgsFAMoHEgAoVgjgBJmIcHjwgUv7ApiewiQgtNZMi4gzCVywYJLSDckOwhApsJT+l8gJCMyywIERCJIHLDTIIDNhjAoiXhHZ1XsFio4BKMgQIRliwpkpDkQISNxkgAdLJAThldCtRwSceCJrVLmCaEeDGShMNjIBnIojOHA5dnCmgATIHi1YQIOB2W0ICOA50murikoOyHWjEiKS6Do9DCjM1KIkVQsQVBlghdxKjdQQfhghUlDHA4cJDiBC6HjyBIjbBAgyU/7iwQpWRKGzUOFL7RwtzREQmmPP4aeKHBEJo26NFnUpipQYMcgFJMcDShkXgDSdKjHxJBzk0DY7gnoHuX3LcYelVUUMJJQ2VgABinADFgA/7dh4APoWAilEIbOBgVHZSkkEUMBhqAAAY4FKLJLgt00GBFWNzRhX33ORDIjTfuMYUPFmilkBYpbCFkJAaisgeOOE5hgU1YgCGIkFDysWFFCGiigSZK1JDGjSwoFAmUQmYyQRY+MNgaBofsUYxQFlyigWIGSPKFHEICAsYcBSQACy09fDDlJQvsccghi/jiYkIcCLAMQsQ4kpAss9BCyyKbSOGEJWWMIoULgwx6CAQfKCRQHBMl9AkjkpayiyKllMLKKLaVVKLLL8Z4ioMlBmSAzFsJFYCHpLngsgAprQqDRKxUWDDHEJ6egBBBHCH0hKS0gJpHq5Uo8ECsroSKAA2HQHGSHQ2xoZUUkvZpwA2ttvKBJYzE2kJCXWCxAQIPJbMBJH5EsQBCIbSqg1A4xGrDlBuEURIbX1hwqAFMtCoEQglw+zC+JS0TgEQJSdEqCgkhkYYmFjhIbsYDsSGcAZCsokoBFHFgwK4oO3QAQl8UIMIGG9ikaEkBAQAh+QQBBQDFACwAAAAAIAAgAIcAAAA4cKgqfr4ucrgyfrI0drIyeLY6dLA0eLI0eLRilMAydK5woMx6psxAgrpomsZ0osp+qMx8qM58qtB+qNB+qtCGrtBOir4weLYwdrSIrtIweLSIsNSKsNIwdrYydrQydrIwdrJUjsCKstaMstQydLYydLAwdLCUuNhYjr5YjsBYkMJakMJaksRcksJcksReksJclMSWuNiWutiYutiYutqYvNqavNhwoMqiwtykwt52pMykxN52pM6mxN52ps6qxuCCrNCGrtKOtNaWuNacvtqkwtyqxt6sxuCsyOCCrNKuyOCErtKuyuCwyuCwzOSyzOS4zuI0fLZkmMh8ps5EhLxuoMxyos5+qM6ArNJQir4wfLoyeLQydrZWjsKMtNacvNqgwN6oxuCUuNaevtq+1OgwdriQtti+1OY4fLbA1Og2frY+frYyeLgydro4fLg6fLg8frg+frhAgLhAgLo+fr5IhrxMiLxOiLxKiL5SjL6evtxMiL5OisBOiL7A1uhSjMDE2OjO3u680uRkmsjI2urQ4OxmmsgweLi2zuR6qNB0pM7c6PJ4ps54ptA0eLZIhLpSirxWjsA2erZGhLw6fLZKhrw2eLQ6erSevNg8fLY6fLTg6vJelsbY5vDo8Pbk7PTw9PpilsRglsRglMJ6ps5yosxIhLzQ4O72+Pzy9vpuoMpqnMpomshMhLhEgrpCgLZqmsZkmMRglsZklsRunsponMhMhrpilsZUjsJmmMQyerY0erZKhLpEhLpEgrhonMp0pMw0erRKhrpGhLoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gCLCRxIcE0bAwgTJlxDsKHDgVIMZFBI0QAGA1sePiRgsSJCERcmUQygcWAChRd+MEiYx4aNHhQxtCm562JCJSNGUELowqWpil2EPUxgM2GrnIcQ4nCJC2GCRjtEdplJcEAXA5McJLSTk8mjD0pcXjCQYAcPHo0SkhyY0NaEWY/I4hxx4QMKl3E+iDrLo5VCiBerTBjM6o2BUTlXsXF55oMWvhQoUk2YYMrgCVfkzMnJ4YLLCq/2nB0ikmIxNwo/eLmsqMoODocSzOpxYcjZGnEQFlChx4CHAwcp5lE0uMej0glN8Qhjp8AdCUCgPJGjMGuahA56TFjh0YAKLTj2/kAZP/6FwhYMGLDqlMuOAztxu5ciP15Hj+sGNhg4lL5/evzdjTJeEkHocRJCXejXByH+/dedUwzAcAkXFCVIWRx2ABKDCA8mpMEMEshyRwEfIFhUQpNUwUeHBszxx4svlgEEDgZcpZADuUxBCCFVdPhKGTDCCERHWPUxy45I9vFgArLoIYoEMjTxIgkKVYHkji/YQQoEB6YmhCBlRFLiB5Vogd8aGKSx4ywXwGGAC6GkUgQIJSJUCQJqCCJIIbrUiZAHAhSDkANaIWQHKKmkUsgDSGgwSRGeLJFCIHoKggUIfxWzxUQJVWJIop+4gsYnn5DiCSOM9GJHIpXKcEl+pLuwlVABUSSqigIFcEIqLD6gagEXmvhQKYcGEMQRQigkmkoEIFhCKiMLPIBqIJgmMIQgZJxUR0NtXJVEoplgGgupg4BwCSqoppBQSB4k8JAwXaSRgw4FINQBqTeUSAOqMvjpgRkltYHBB34CQWoDCLEwrZ/ullRMABIllASp6iLkgxOyfKDftg4PdJAHBqQhii5d/mlArB07dABCA5fgsk2BlhQQACH5BAEFANQALAAAAAAgACAAhwAAADhwqCp+vi5yuDR4sjR2sjJ+sjp0sDJ4tjR4tGCUwDB0sHakzIKs0D6AumqcxnikzIau0k6KvIKu0pC01oSs0DJ4tDB2tDB4tFaOvjJ2tjB2tjJ2tDJ2sjB2sjJ0tjJ0sFqQwpC22FqSxJK21F6SwJi41lyUxF6Uwpi62pi82py+3GqcyJ6+2G6eyqDA2nCeyG6gzKDA3HCgyqDC3nCgzKLC3nKgynSizKTE3nSkzHimzqbE3nqmyqjE3nqmznymzn6o0KjG3nyq0KjG4KrG4ICs0qrI4LDK4oyw0pC21pa42Ji62J6+3LjQ5LTM4oiy1LjQ5jR8tmKWxnSkzkSEvGicynimzIaw1FCKvliQwFqSwlySxJK21myeyp6+2m6gynKizrLM4oqw1Ja62LbQ5oqy1LzS5jB4tjB2uDZ+tjB4uD5+tjJ4uMba6jJ2ujB8ujZ6uDp8uDx+uD5+uD6AuD5+vkaEvEiEvEqIvEyIvEqGvlKMwEqIvlSMwEyIvlSOwlSOwFiQxFiQwmaayMja6miayNTi8HikzsLW6NTi7tbi7jZ4skaEuk6KvlaOwDZ6tkqGulCMvjp8tkJ+tlaMvoiw1ODq9DZ6tJa41jh6tjx8tDh8tjx+tmCWxGKYyIaw0mSYxmKYxubu9F6UxNzo8u70+GKUwk6IvrzS6NDg7tjk8Ory+Ojw9vT4+vz8/mqcykiEusDW6GKWxGaYxl6Uxvj6/GycyGCUxGCWxmSWxGKWwmSWwkKCuGSYxECAusrc6lCIvGaYxFiOwFCKvFSKvHqkzL7S5jJ6tjZ4tEiEuDh6tESEukKCukKAuDR6tECCumSayDR6tjR4tgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AKkJHEhQTRsECBMmVEOwocOBUhBcUEgRARoEcB4+NGCxIsIsf+JQDKBxYAKFf2rASohHhIgYFNGsKYnsYsIdEyZUQTjCpYuKGjA9TGAz4aecUxCycEkKYQIcNURqmElwgAYEkBwkrJJzSAILP1z+QZBgxooVOhKSHGiUyghpZHFO6GPBjMs5FlCcXRFKIcSLVagIJiTyRE5DbFxCsZBl7w6KVBMmICWYipc5bHIa0eNyR68UZ7FAqkjtjUILfCrXaObCyJQEJ2rksXRWxByEBADxQbDhwEGKeCrHkCZSoYsVKqoQiMSAxhEiWhPGcVAcwa8YVAB5RPBIwq0UR8L+hw+hEJAVK58EZbnT7A7c7QzEh29yo7gFBFPO6z/PaTtCUuHlEAQfJyGkAQYI7FHLfudV51ECLoSACVAIJiRHFY4MkoV/CTWgxA6zRELAfQgcSJEFmwCxBCMcOhDFizDa8NNVCRHwwBOuvPIKBBz2AuOPNnSEABsvtKLjkV+QWFECUxDjCQQiEPEiFgpBcKSOiyTBCwwFntaAG04Ec58FkziiCUJqoHGHLa+M0kIxC2jRiilMdKDQJAQ44YYbiZzCgUIbCEANQrMIA8J9jZRiiimJ+MJDBcmkoIoQGaSypxvG2JmQQHBMlNAkwCx6SSROXHJJCaocckgsjSBxaRetJ2GADFuSPbEoKwoQsIqplMigagNkvnCpHwgRxBFCFCxqSg8c4GHqISDQouoxdiYwhhspnGRHQ2tc5cOiJiyAAC2mPtEBJIWomkFCeiSgQQIPYaKBJl+8QABCEZhqwn1dqEqCkhqkUdIaaFjwJ0I8mMojAlqoesbBZJUkUAASJZTwJesiJEMRnliA4LYSD7QGbwjI4UkoXSK0AQKzhuzQAQihwcEHGmhgk6AlBQQAIfkEAQUAzgAsAAAAACAAIACHAAAAOHCoKn6+LnK4NHiyNHayMn6yOnSwMni2NHi0XpLAMHSwbp7IdqLKeqjQQIK6ZJrIbp7KeKbQfKjOgqzQToq+hK7UMHi4Mna0hq7SiLDSMni0MHi0iLDUirLUMna2MHa2MHa0MnayMHayMnawWJDAkLTWMnS2MnSwWpLCkrbUXJLCkrbWXJLElLbWlLjWlLjYlLramrrWmrzaaJrEnLzYaJzInLzaaJzKnL7capzIoMDcapzKbJzIbJ7KcqLMoMLeosDcdKLKosLcdKLMosLepMLcsMrggKrOgqzSjLLUkLbYmrrarsrgsMzigKrSgKzQsMrisszissriNnq2ZJjIbJ7MeKbORIS8cKDMfqjOVIy+VpDCWpLElrraaJrIrsjgjrTUmLzarsrivtTouNDkwtboMHy6MHi2Mna6MHa4Nn62Mni4Ony4On64PH64Pn64QIC4Pn66PoC6Pn6+TIi8SIa+Vo6+zNzsSoi+TorATIi+TIrAUIzAUozAVo7AVI7CWJLEVo7Cts7kcKLMuNDmyNrs0ODs2ObwtM7kvNLm1OLw3uryeKTMqMbgdqTMNHq0eKLKRoS6Uoy+XJDAOHq2SIa8PHy2Nnq4Toq8Nni0mLrYOny0OHy2Ony25u72YJbEUoq6PH62QH62YpbCYJTCXpTCdKTO4uz07PL49Pj6cKDKbqDKxNjo0ODu4Or08Pb6ZprISIS6QoK6aJrGRoS8Soa8YpjGYJbGXJTGXJTESoa4YpbEXpTEToa6QoC4ZJbCYpTCXpTGZJjEYJTERIK6Mnq2NHy2NHq2cqLKRoK4RoS4eqTMNHi2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACP4AnQkcSHANGwQIEyZcQ7Chw4HHEIRQSBHBBQRnHj40YLEiwgp5qFAMoHFgAoV5bEBIWKtDBx4UL1woaexiwh8OHGBByMWljYofID1MYDNhr5wtEMZymQJhgiw+RH6YSXDABwRU5CTEkvPUSSIu8yDA0CNGjCwJSQ5MmMsKF6c4HdjBYMFlGwQrzMbApRDixQdWAgsTySVnlTcuk2CoA8Psj5gCEyLrEtgKBDdwcjqw5PLHLBNmn5yk6CwNxQqVcTywISHXZB52KJj18MapnwoIQBw4SLEWj8A4sFK0EWNJMQKWfswoAqR2wqwiEcLBYaWPRwS3bSwpwp3724RcIP5AwMVFD5Y5WJBdR/CjO3cvEaJvQCBMvH3xndYjSME9x5UKoyHwAQcI2JHLfeJhoh8BNpSgCVAEJtQGFnpwgZt+CEzgwSOgyEIABggNSBEGnDDzwoPrweHEiitGkYMOAiqUAA1HpKKKKkLo90AULLKYQ0cIvHEDKjcWOQOIHiUASgUrEOHBDismoVADRd54iAakMBCgQhOQ4YQv82FQSR2VILTGBZLAogojMoSywB2ofPKCCAp1QoAUZJBRSClIIgSCAM4gxAswBYAoySKffKIIKTsgQQALhgSxRSJ5ktEAnQkJdMZECV3SSqKI7CIFIoisYAgeeEgiiSOVKnESB6TGrJVQAk0kiooCBLhC6igzoIrEBm/MUKkfCBHEEUJKJPpJJBhYQioeJPCCahl0JpABGSycREdDF1w1RKIuLIDAMKQegQEVZqC6RUJ1JPBBAg9B8kElM9RAAEIUkKoCiGGgqkSfU5UkEwZ97kBqAzxN2ye8JTkTgEQJBUHqugjNYASfBG7b8EAXgYBAJaaAsmVuCMS6sUMHIIQGBid8MBVCgJYUEAAh+QQBBQDFACwAAAAAIAAgAIcAAAA4cKgqfr4ucrg0eLI0drIyfrI6dLA6erIyeLY0eLRcksIwdLA0drByoMiAqtJAgLpkmshyosyErNCArNBQir6IsNIyeLQydrIweLSIsNSIstSKsNIydrowdrYydrQwdrQwdrIydrBUjsKKstSMstQydLaMtNaOtNRYkMKUuNZYkMRakMBYksRaksJcksCUuNiWuNaWuNiWutqYuNaYutiYvNqavNpmmsaavNxsnMacvNhsnsqmxOBunspuoMpwoMpwoMx0osh6ps6oxN58qM6oxuB8qNCqxt5+qM60zOKIrtKQtNSevtqsyOC2zuQ0fLZelsZyospGhLyErtRSjL5WkMKOtNZqnMhqnsqcvNp4psx6qM6qxuCQtNagwNquyuC60uYweLYydraSttjC2OoyeLgwfLowdrg6fLg8frhAgLg+gLo+fr5KhrxOiLxKiL5UjL6iwt5MiL5QjMBOiL5SjMBSjsBUjsDE2OrQ4O5kmMZimMhqnMqwyuJkmMiwzOJ6psx4ps4weLjA1OjO3uzS4O7e6PI0eLZyoMpGgrhSirxWjsI2erZIhrw2frZ0oMg4erQ4erY8frY6erY6fLbk7PRclMSErtJSirpimMZAfrbY5vDs8vhglsZelMK+1ObI2urY5PDo8Pbk7vba5vL0+Pz4+vxeksJ4pMzA1Obc6PJ0osr2+vxmmshsnshGhLpIhLhglMJelMZIhLpglMRMhrpCgrpilsJilsRmmMS80uTW4u4yerY2eLRGgrqGrtJEgrg0erZEhLo0erQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gCLCRxI8JGZBAgTJnxEsKHDgVASgFBIMYGYBGcePjRgsSJCOI4aUQygcaAChVMiREk45cGDCBTFmCnZ62JCHhIkQEBox+WeimOIPVRgM2GKnCkQanJpBaECHq5EjplJcMCYBMLUJLyVkweiBD9cOkpwAceJEzwSkhyIENGKCHQSZsk55cIRl2kSpDh74pJCiBchRBjcQuSInJfUuBxywQ1fHxSpKhwxWGUaNTkltHzAY42Gs0NEUizWgSKcynwg8JGwApGVCFOKnKWSN4GCCnUSeDhwkOIt1IhEJ4xwYsMtAo58kMlhQ2tCNZ/WYLiQQA2fCHM8JqjgZg+JHODB/o9QqOTUKUuEdmypslN7Ah7hwXvBIvrChUPm85uH5V4v+BkS1HESQmNkcAEHvJii3ylr9KfAHngIl1CBZDHQwCJC0LDLF9T1twUwQCwACwEdUqgQBggIgQIB/alhxIsv9gADDglclZACOCBBSiedSNAfBD3ACCMMHVVXQyk8JqlChxUpsMAbCwBBxQ0vHqGQBEnyGMoEsugwIEVDPGGELR1K4oZoj4gxxSidcBLDIgzEwckhTGCgUCQKdPHEE4B8wqRuAhSD0Ce4FECdIoUccsgTstxQBAElEHJDFU7s+YQDLCYk0BkTJUQJKIoaEgsSeujBAiFllKGIInJYasFJpRn0wtaNRCi6ygIEhFLqJjKkylgaMFhaAUIEcYSQBYoewgoGsJSaBwa1pOqHnQpQ8MQVJ7XRkBlXNaEoEwwkkEupRGDQSBipVpHQmR4o8BAxY0iiggyZJlFqCdRZkKoFTHqARklmXMTkDaU6gFAcqYLBpLslFROARAlpUaq6CMnQxAIXZJCAtg0PdJAHCUiywCdfIgSyrB07dABCYnxgwss2BVpSQAAh+QQBBQDMACwAAAAAIAAgAIcAAAA4cKgqfr4ucrg0eLI0drIyfrI6dLA2eLIyeLY0eLReksIwdLA0drB4ps5EgrhsnsiErtR+qtCIsNJSir4weLYwdrSGrtCMstQweLQydrYwdrYydrQydrIwdrIydrBYkMIydLYydLCOtNaQttZckMCStNRcksSSuNheksCUttRclMSYutiYutqavNqcvNpynsaewNx0osygwNygwN6iwNx2osqoxN50pMx0pM54psysxt6ErtKsyOKwyuCIsNSSttaWuNikwtyoxuC60OS2zuKKstK60uY0fLZkmMZ6ps5IhrxqnMqAqtJYkMBakMJcksKUttZunspyos6iwtyyzOKWutimwt640Oa40OSKstS+1OaMstIwfLoyeLQwdrgyeLjI2uwydro8frhAgLhCgLg+gLpAgLpCgro+fr5QirxKiL5OiL5Oir5Qir5OisBSjsJQisBYkMRYksSkxN5UjsJomshwoMrK3OxqnMhonMpyoszW5PAweLh8qNCwyuKCrNLG2OrQ4O7c6PKErNI0eLZGgrhSjMBakMA6fLZKhrw6fLg2erbk7PRakL44erLG2uo4erTI2upglsZmmshonMg+frY8fLhSjL5kmMhAfrbU4u5glMSCrNCCqtDU4vDW4u5elMTq8PZunsh0oMZyoMhGgrpimMZomsZglsRglMLA1ujQ4Ozg7PTw9vpGhLxklsRIhLjg6vLu9PjC1uj4+vxwnshynshkmMRKhLrs8vj+/v5elMZmmMRQiLpEgrrO3uxWjsAyerY2frY2eLREhLw8fLZEhLo0erQ0erY4erY4fLYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gCZCRxIcBiYBAgTJhxGsKHDgUgSWFBIMUGFBF0ePjRgsSLCJa8YUQygcaAChcVWzEmIxoGDSRQrgCkpjGImJkzMIIzjEiZFDcgenqRYBycchCdcHk2gIEkSkRpmEhyAMNGToWdwUiqUQI/LVwk4JIkQIUlCkgMRKgi0awcxhDeZoOGQw+WiBMHIRgChEOLFJLsCSyKT4A1OOYlc5kiwRC8TilITIigSeFcrNWNwMinm0g6ZJmRliKTITIzCDyoqu+p1gkmdQnAmvcJBVsLdBATYrEmw4cBBhQxI1QosqsDQhJMiACrT4YEdDChQjFE4ZgGZDhw6OBK1iwUHj22W/qSKEL38UoQ+XLkaRISFjRK2jlesVD76D0qjM3Dgo76/q1mGeJRQHdGNIMUax2mg3wWCzOKfK4QJyNQkh4ymkIJhdVCALzCoUMQL30mYgAxNQACCKQSEqMFFCnHwSCkYICDiGDTUWGMMI5ilgUIEwHLFII00IoWIZMRgo40jdJTAGFFsEuSTJEioAAiKgACBBCjU6IBCdzwZJC2dLGCHfAnJ0MMMuXhR1RqjDVOBKa00IogJajCAiSB8YBBiVQTU0EMPQ5SwJ28CMIPQApwU8N0DYfDBxx8LsOAAAT8cYQUFdPzZgxQE9MVMFxMllAgWjuIRixBhhAHCEaw+8IsLrJoCclIGwqSVkAI1OPoJIgWskqomJLBqgxeJYKBpGwgRxBFCPDjKRykcmJLqFh2EwuoNHTClRA8/nJRGQ2Ds2IKjGGTLSapCcMBIFaxSgFAhSzCigQIPIaMBIyQAUQBCSqQ6wXc8sArIhV+UBMZFewaR6pAJHMLqEHvSWxIzAUiUkMJhuIsQCSw8kUAGCXw78UAHbZCAMk8sQKbJtY7s0AEIVcCBBjSzWGhJAQEAIfkEAQUAxgAsAAAAACAAIACHAAAAOHCoKn6+LnK4Mn6yNHayMni2OnSwNniyMnq2XJDAMHSwNHawcqDIfKrQQIC6ZprGdKLMfqrQfqjOhq7QToi8MHi2MHa0hrDShrDUiLDSMHi0Vo6+iLDUirLUMHa2Mna0MnayMHayMnawirLWjLLUMnS2MnSwkLTWVpDAkLbWWJDAkrbWWJDCWpC+WpDAWpDCWJLElLbWWpLClLjWlLjYmLrYmLramLzamrzaaprGoL7abJ7Kbp7Gbp7Ibp7KcJ7GcKDKosLefKjOpMTepsTcsMrifKjQgqzQhq7SjLLWnLzaoMDcqsbgsszkgqzShKzQsMzits7kjrLSkLTUNnq2YJbGcKDMQoK8ZJrIdqTOgKzShK7UTIrAMHy6Mni0WI7AMna2bJ7IeqjQqsbenL7csMrgwNbovNLkNn62MHa4wtboMni4Mna6Ony4PHy4PH64Pn64QIC4PoC6SIa8Pn6+nsDcwNToTIi+UIzAVI7CUozAzt7sZJjGZJjIaJrIttDmytrqzt7uuNDmMHi4eKbQ1uTw3OjyNHi0cqDKRIK6UIi6WI6+OHy2RoS8TorAPn62OHy4Soa8NHi2Nni0Onq0yNzs4uz0zNzsOny22uby6PD2YpbEYpjGYpjI5u727vT4WpLEgKrQToq8XpLCXJLCXJLAdKTOyNrq2ubw9vj8bJzIRoK4ZpjEXJLEapzIToi6SIS6XpTERIK4XpTGXJTEQoK6QIK6ZJbEeqbOVo7AdqTMUIy+UIq+Toq+Uoq8NHy2NHq0NHq2RoS6QoK4OHq2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACP4AjQkcSDANGwMIEyZMQ7Chw4HADFxQSNGABQNeHj4kYLEiQkdYqlAMoHEgIoVYYuhJiOXKlVAULbApmeBiQitZssxBiMclTIphgj1EZDNhnpx5ELZw+QghIiuyRIaZSXBAGANuVnxBGCenJ4SdXGIxAMKKAwdWEpIciLDKGVVFKCHEmQULCB4u3RjIc9bByoQQL3JSRXgNJANdcurJ5JKHATp9+1CkmpCSGcKqNFVwk7OuSytxxpzlIZKisTYKR1DBvAlXiyx5JuUJpejHWS16DSDCQ8fAhwMHFS4AAorwpQInFYZyMOZBCEUQuJAgkRshnFJxQIAI4eKSKhogPP52cSTLwfTzSRM22bTJkBQZDRT4SO6xz/npT6yU3gCCD/v/7CniUUJ7TJfBK70lFAZ/SATyCYCbyDFgW67wQp+CG5AVAgOLAIGCETaEN6EBPxzxRwqKFCBiGEUhBEIlPWCAwIhw4GCjjTd0kNZVCSHCyQ6GHHKIYxPGccONN3bQkQFvoICJkFCWMGIKkqQAwRhK2BiBQjxAKSQaE5DSylYVBUFEDnSQ2QgdpaVhgSKaHBLIFIuE8IslgmggIkKNIJIDEUQIscKevglgDEIKkMJAeIqcIYggTSigQgSIPOGEChWUASgROhAqkBcTJdSIEY+uwQoTZ5zBgROsKqJIDaybTnDSBgmw1eMSj2KyQgGDpAqJB6wm8oUbGGyKB0IEcYSQKI8K0gMIjZ4BSAgwsCpECAZUoQURT0xiQB0NsXFVDY9SgC0pqS4BQhVNsDoKQpOw+QEiDwUTRhUllFAAQrukSgFCErAqgUIfqFESGxftqUKqOiCUh7V70luSMQFIlBALqVaQkAcsrGBAhuBOPNBBHxjQyAozkJlQybWK7NABCFkAggk022RoSQEBACH5BAEFANEALAAAAAAgACAAhwAAADhwqCp+vi5yuDJ+sjR2tDJ4tjp0sDZ4sjJ6tlqSwjh6sjB0sDR2sHimzIKs0kKAuGicynqmzIKu0k6IvISs0ISu0jB4tjB2tIqw0jB4tFSOwDB2tjJ2tDJ2sjB2sjJ2sIqy1Iyw0jJ0tjJ0sIyy0oyy1Iy01o601FiOvI601liOwJC01FiQwJC22FiQwpK21lqQwFqQwpi62pq82py+3GqcxqLA3G6cxm6eynCeyHKgynCizKjG4HKiynKizHSkzH6q0KrG4IKs0KrI4KzG3rjQ5Iau0oqw1Ja62Jq61qjE3K7K4rjQ5oiw0jZ6tmSYxnSkzkKCvH6qzk6KwDB8ujJ4tFSOwjJ2tlaOwpK42GqcyKTC3G6eyICq0qzI3pi82qTC3rDM4rrQ5jJ4uDB2uDp8uMTY6jJ2ujx+uD5+uECAuD6AukCAuj5+vkiGvEqGvEyGvEqIvlSMwEyIvlKOwqjE3sba6miayMzc7LbO5NTi8DB4uHakznyo0HimzsDW6NLi7trm8H6o0ODq9MTY6DR4tESCuk6IvlaOvliOvqLC3Dh6tkaEvFKMwD5+tjx8uDR4tjR6tjZ4tDZ6tDh6tFyUxGaayGSYyDh8tjp8tlKMvuLs9O70+FySxICq0FySwlqSxHqmzmycxm6exmCWxmSayGCUwF6SwrzS5s7e7sLW6N7o8tzo8uzy+Oju9vT4/Pz8/kiEuvb6/GSWxGKUwESAuESEvF6UxmKYxk6IutLg7kKCuM7e7GCUxGaYxuTs9Hyoztrm8lCIulaOwE6KvlCKvDR8tjh8uEaCuFSMvjR6tEKCumCWxESEukSCuDZ+tgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AKMJHEgQGhkDCBMmhEawocOBxwxgUEjRwAUDVR4+JGARYYcOCm9JeUIxgMaBhhJ22JEnlRWEbCJEuELxApmTCS4iZAAsVixUCN/IpEkRC6WHhnR6/OJzCcIrMukgNGRJAUksNwkOwGKA0YqXBmr57DTJgCWZUgx0UBAliqWEJgcifDKm042yIDj51GHlkkxkBqi0jVJHIcSLvjopTqWmgxKfRhjJxGSg0eBSFLMmnFREcadAFIb5nGVLpqU0PNpGIEkxGhqFHkp4JnTqDiw7BeRcaYOnbQ4zU+G8McDhwEHYOF4pFtSgEsiEL6L8aAyhVJAJD4AnTNOisQEPKVr+dWLxnOKbQwr6TFi/nopCLoQIqWLCQoeiLSkrIizFfr0oS6xp0MEd8RVICCuH6JcQFesFAcVwCWEhYBCrsGIgIWsoOJUCFLCmkIQIedCALjiIIAQM5Sm4BRBQbHCIIc9hoZRHC+BQAQIaGmCGCzzyqIIXb3GVkCG+0KDKHntskaMaKvTYoxcd6RjCGUhW6UQBGm4giyNQ/GABjzkotEWVSOohgQJQqFiDFm+A9cQbrEFzATOB7HFGBhR4YAwgdzyQIiOGaFFDDTRskCIHAkSDkAKgNADSIU3ccQcXK4TggyFB9BACBUkMWsMvWCYkUBUTJcSIEJKmkswMTTSxQQ+vRBDBCzMnePoHSRokIFdCBSQh6RmJFCBGq49YEGuYZjzgKRwIEcQRQn5IeocNHUDaBBMevBArDVg+8UMNQURigBsNkcEVCpJWAJICrc7QwRNhxEoBQpE08gQHhjxECRZPHJFBqD+0+glCosTqgEIclHESGReVF0KrvyCEyLbl5XtSNAFIlJAJrc6LkAUmbGCABuNeTNBBHHSVxQtgJZSyriY7dABCFxQwws06JXpSQAAh+QQBBQDIACwAAAAAIAAgAIcAAAA4cKgqfr4ucrg0eLI0drQyfrI6dLA2eLIyeLYyerZakMAwdLA0drBwnsh+qtBAgrpmmsZ6qNCGsNSGrtKIsNRQir4weLYwdrSIrtAweLSKsNKIrtIydrYwdrYydrQydrIwdrIydrBWjr6OtNYydLYydLBWjsCSttZYjr5YjsBWkMJYkMBYkMJYkMRYksSSuNiUuNiUutqWuNagwN5snsxunshuoMqiwtyiwt6kwtyqxuB+qM5+qs6uyuKwzOKMstaQttacvtqiwNqmxN60zOK60ua0zuS+1OYyeLhimMh4ps6ErNBEhLxomshSjMCMstRUjsKcvNpunsqmxNx8qNCOstSevtqoxOCwzOS80ua2zuS+1OgwfLoyeLQwdrg4fLgydro+frhAgLhCgLg+gLrA1ug+fr5KhrxMhrxKhr6evtxKiL5MiL5OisBUjsDK3OxSjsJkmshqnsqCrNCErtLM3OxsnsrS4u4weLh6ps660OZ8ps56qM54ptB2pMzY5vDG2urW5PDa5vB0osxyosymwtzm7vY0eLREgrpWjLyWuNg4erZIhrxUjMA8frjK3Oo2eLQ2erZelMKKsNRkmsY4erRSir46fLY6erQ+fLZaksR0pM5cksJeksA+frbg6vLs8vj0+PrC1ujU5PDc6PLu9PjG2OpmmshsnMRGhLxqnMhGgrpilsRelMRglMBeksJqmsZomsZglsZGhLpMhrpCgrpCgrjU4u5UjL5QjMB2ps5kmMRSjL5OiLpCgrw2frY6fLjc5vA0erY0fLY0erRqnMpsnMYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gCRCRxIEFiSBAgTJgRGsKHDgcQSYFBIMcGFBF0ePjRgEeGHDwqbQJBEMYDGgYgSfnAQaIsXhGXkyFlB8UKSkwouImRQSpSoTggbyYxSsUOxh4h0eiTiEwfCJzLZJFyxYliCDjcJDuiQgNGJhK98HoqUYJNMCAhX1KhBE6HJgQgRHTkkhECCBj1F2fCiRCaYBGzW1nCjEOLFSYcSb/n0YYbPIoxkKklgS/ALilkTIiCS+BCcNL58mkok08WjOWuVkKSILIxCEBk6D/I0KpSOAmyijFGy1snfBIgaNUng4cDB16lAJcZDgBHIhE/WivkAYRMnCRJ+I3zEYnqCDyNw/h2C8pyiqkQrbmBfr0bhFUCAAu3YYCOFk5QVEW5aj71Qi9UafGAGfATCl0h+CbWB3RKuDJdQBwHyYYQgBQIiBoJxnYAGfgpB6FEDtcTCAREkYJhQBDfMYoEtHHaglEeZxPKAXRgGU8GNN04gQQtXKYTIJIsEYocdEZgoxgQ44ihBRwlgMgESQ0ZZh4lPqGKBKzc8cKMTCjkR5ZA+/DFCKwg6IQMQtCQERhO/AXMBBHDYoQUFtYBggRFcPFBeAmAgAoQMMsDwxJ4eCIAMQiosAAJIZGTBBRdrnDDBDYhIQEMdaJAAqAyt7ClQFxMlxAgOjx7BCgo//HAJDTnkQAYEpxNsSkhKGigAV0JeoPCoFiMQsEOqmjzQ6ipdSbApGggRxBFCSzzKhSwfkJEqFgSc0GoMdiEyhQxLIHRGQ0lwRcmjeibQQqoofICIEK0ii1ATknSAyEPFdCAJHUzQeEOqeiD0R6t/dPjFSUlcVN4EqfKCUBvXljfvScgEIFFCCP+QRkIPTPBEAhok8C3EAx3kAZ9vfEXRyLaC7NABCF1QQAcw62ToSQEBACH5BAEFAM8ALAAAAAAgACAAhwAAADhwqCp+vi5yuDR4sjR2sjJ+sjp0sDJ4tjR4tFyQwDJ0rnKizICqzkCAumSayHakzICq0oCq0ICs0E6Kvoas0DB4tjB2tIaw1Iiw0jB4tIqw1DJ2tjB2tjJ2tDJ2sjB2slSMwIqy1Iqy1oyy1DJ0tjJ0sDB0sFaOvoyy1oy01o6y1FaOwpi82liOwFaQwlqQwlqSwpq83GiaxJ6+2mqcxqLA2mqcyGqcymyeyGyeym6eym6gynCgyHCgynCizKjE3HKiynqmzn6qzqjE3qjG4KrG4ISszoau0pi62Jq82qDA3KLC3LLM4rLK4rTM4oSs0ISu0jR8tmaYxnSizH6q0kSEvHSkzoKs0lCKwISu1FSOwlaOwJC01mqaxqDA2micyK7K4KDA3qLC3rLM5LTO5LbO5DB8ujJ4tDB2uLrQ5Dp8tjZ+tjx+tj5+tjJ4uDJ2ujh8uDp8uDx+uD5+uD6AuECAuD5+vsLY6kqGvEqIvlCMwEyIvlKMwMTY6M7e7mSYyGiayGicynSkzMDU6Mzc7NDg7n6q0DB4uHakztLi7qzI4N7o8sDW6JS42DR4tkaCuFSMvFSOwDZ6tkiEvFSMvjx8tk6IvDh6tJy+3Dh6tsze7JK01Dp6tt7q8uzy+F6UxGKYyGiYxtjk8Orw9u70+FqSxL7U6Mzc6tbk8Obu9vj6/FySwl6SwHqmzHikzGqaxGaWwmCUwl6SwkqGukaGvGCWxmSYxEKCukiGvGCWxEKCuMja6kyGumSYxmaYxFCKvk6KvNTi7kiEtkSCuFCMvlKKvjJ6trrS5jZ4skSCujh8tkSEujR6tjR6tAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AJ8JHEiQzRsECBMmZEOwocOBUhBcUEgRgQUEZx4+NGARoQcPCQn0qLGGYgCNAxMk9JCjUROVCGStWvWEooU3KI9dRPgh1adPMBBWmNmkIgdnDxPs9GjjJw0EHoDMXJGwz55mCDjgJDiAA4I1IRK2+ukp2YdCM2sgzPLgQZ+EJwciTBCGURKVJnx+qrGg1ExICHK1faBHIcSLrBgpbuLGA6efYYbN/ETAwWAWFLcmTGZDMSM/eXr9VBVrJq81g009qvgMjsIPFTwrUoBM1ZJkJJqIMtXWVpy5VnAh6HDg4OsZoxQXIoAJJFQPFNrOQeDghQ4GDH4nXMOiDUgPkQr+McpQEaEVB3twYF9fS6ESQ4YIMclQA8UUmOVfrMeOY8skhBp4oAZ8BBryh3DlIZQHdjzEgCBCHAT4yhN/FGgIHQki9EgWueCXUIQeEdDLDFAssUGGCdlygykUOIAfB0t5hMkUQhCA4hoR5KjjFZh5lVACrHRxCh54+ILiHDomeUVHCMgRhRlERikBihRYQYEpYCSS4wMKPRAlkUQE4QIoCT6gAgZWJDQJLv8hwIYFDhBZRgO0fHAJGWYI4RxCcSSAgQoqjJDFnsMJ8AxCXLhQAEgOGGGGGS2EMMENCVzRggR5/AkoKIQKdMZE22Xy6CLEkFBEERS0IIMMdjgQAaCoKuywmgbHyPUjCY+WYQwBY5zahhCrTvFVIrC2hwBBHCFExaNmTOGBA6eKQcAWq6qgUgJgqMAAQnc09IZXSDyqJwIsnCqCB5M4smoeCbHJQQIPOcPBJBI0YCMCN5wKAUIMrOqDQhykgdIbF+0Zwam6IKTHqinsCS9KzwQgUUJYnMouQkJEsAcCGiDQLcQDHdQBAnHsERZFI9cKskMHIGSBBxzEvJOhKAUEACH5BAEFANIALAAAAAAgACAAhwAAADhwqCp+vi5yuDJ+sjR2sjJ4tjp0sDR4sjJ6tmCUwjJ0rjR2sHimzkCAumqcyoKs0nqmzoau0k6KvoSu1Iyy0jB4tjJ4sjB4tDJ2tjJ2tDB2tDJ2sjB2sjJ2sFSMvpC21jJ0tjJ0sFiQwJC22FiQwpK42FqQwFqQwlySwJS21lySwlySxF6Swl6Uwpq82py82G6eyJy82p6+2m6eyqDA3nCgyqLA3HCgzHKiyqjG3nSiynSizHakzHamzoCqzqrE3ICq0KrG3oKszqzG3oKs0KzI4KzI4q7I4Iiuzoyy1pi62KTC3qjG4LTM5LDK4Iiw0rjO4oqw0pC01DZ6tmaYxnim0ESEvISu0nyozoau1FKMvoqy1DB8ujJ4tDB2uDB2tlSOwFaQwpa62Gyeym6gyqTC3H6q0K7K4oaw1Ji62qjE3rbO5LjQ5LjQ5jJ4uDh8uDJ2urrQ5j6AuECAuD5+vkqIvLrS5r7S5kyIvlCMwMba6k6IvlSOwlKMwGicysja7Mrc7Nbk8DB4uHyo0MTY6tDg7t7o8n6q0q7I4jR4tEKCulKKvFaOvjh6tkiGvDZ+tj5+uEyGvDR4tjZ4tOTs9Dx8tjh6tMbY6Dh8tjp8tmCWxpS42GSayKLC3mSYyNLg7tbi7mKWxGCWxFCKvFCKul6UxHyq0ESCuOju9nqozkSEukaCuMTY6M7e7N7q8vD2+kqIvmSWxGiayGSWwl6UxkiEuOjw9vT2+v7+/kyGukqEuvz+/kaEvEqGumKYxmKWxmSYxGaYxGiYxEKAuPb4/ECCumqcyH6ozsDU5liOvlCKvjR8tjR6tDZ6tGaaxkaGvDR6tgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AKUJHEgQ0hsDCBMmhESwocOBzAxsUEjRgAUDXR4+JGCxooECMapoohhA40BFCTUck2MkYQtYsJ5UfGMywUWEHAxVqjQC4RCYRFJqQNjsoaKbCDXA2PnCwAUzMKUgRPBEhyOENAkOyGDA0ZaEKXYKosQBE8wqBjwAyZVLJsKSAxFS0SFIBcoCrnYOW5AKJisOSdjmAqEQ4kUUghILseSlwk4dtmBW8jBMcBQECrMmpCQjsSA8u3TtfCULZjJGuNiCukpRWhyFHH54DnSCzaEXl6AgkSWI7S1UCL1cWWTgy4GDCjUIM5S4UAHWBjRwuJGrmDINc/x0evCAikJNYSz+XXDKaI8gCR4R7FAwYRP391cUjgEEqM2MIsI+iELp0Yue99x1ood3BmCggRP0JQjIHsR5hNAj3P0hRoMIZWAgD2jsoSAgcziI0CQT9EKgQhYmVYAuVQTxAnoeIsRCJyXk4QB/BmSAVHCOyNIDjR7B0cCPQJKhR40KUVGCEmzccccvLVoC5JNkdGQAHGegoeSVWXgI4iJ2lPAJDj9uotAmVyp5gw0frODgJhScQSEVixAIiQUOuHGHEVn4woEkTRzRw1AJUaEIIhRQAMEEFH0hgDQIfdBIAQjR4ckRR4CwRRZVKEIDCQ30EkShFKAAKEICdTFRQo6MQSkTqEhQQw2sE5Bgggl0zGEFqLOghEECcSXkhQSUHkGKBi+8agkPs4oypQ2gxmcAQRwhZEOwomjgwKtqaODHrFoMpcgnFERpQB0NvcFVEJT2MF4Yr0qgARVKzPpIQotMkoEiDzWTARUNRMDfLK/mgBAZs4pb4RcmvXHRqIS86sKDs6ahEL4mSROARAk1XMO8CPEQAaIYjFsxQQd9YQAVevhRkcm8juzQAQhZoEEGNN+0qEkBAQAh+QQBBQDIACwAAAAAIAAgAIcAAAA4cKgqfr4ucrg0eLI0drAyfrI6dLA2eLIyeLY0eLRelMIydK5yoMp8ps4+gLpkmshyosp+qMx8qMx8qtB+qM5+qtCCqtBOiL6GrtIweLYwdrSIrtAweLRSjMCIstSKstQydrYydrQydrIwdrIydrCKstaMstQydLYydLBYjr6UuNhakL5YksRaksJaksRcksBcksKWuNiYutiYvNqcvNpomsakwtxqnMpsnMhunspuoMxwoMp2pMykwt52pM6kxN54pMymxN54ps6oxuCqxt6AqtCEqs6QttagvtqoxN6syOCArNCErtKuyuCuyuKwzOKwzOSyzOI2erZkmMhwoMx6qNBEhLx0osxQir5WjsCOtNZWkMJYkMKavNxmmsiQttiiwt6oxOCyzOS0zOK+1OgwfLoyeLQwdrgwdra+0ubA1ugyeLiUuNY4fLgydro8frg+frg+gLg+fr5GhrxKhrxKhr5SjL6+1OZMiL5MisDA1OZSjsLE2OhQisBUjsLO3u5onMq60ubI2urQ4O640OR0pMwweLjc6PJ4ptA0eLZCgLhQiLpWjL5YkMA4erZIhLo2frY6fLhIhrxOisCQtNaevto2eLQ4erQ8frbM3Oo6fLacvtzg6vLO3uw8fLZglsTW5PDo8Pbs8vhilsJclMRilMJOir5yosxEgrpIgrjG2Or2+Pz0+PpglsZelMRGhLpIhLxmlsJklsJKhLhimMZelMZkmMRglMRAgLhUjMBimMhSirxmmMQyerY0fLY0erREgrhCgro4fLY0erZEhLpAgLpAgroAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gCRCRxIMBKbBAgTJoxEsKHDgb8SbFBIMYGGBGYePjRgsWICBTluSaIYQONABQlF2CAjJCEMUaKKUNTAxqSviwhHDEKESAtCCTBbIhQhIkEIYA8V4Bw6g+eKBCKSwMyAkECRG26M1iQ4IESCRx4SsuBJ6NKIPTBvJShxgxUrmQhLDkSowAcgJCgL7ETUi0EnmKlGHHHL6oRCiBe7AFosBM4ZDjxvqIKJaIQswlJQJtya8JKMxYAK1aHFMxQpmIIYjXKr6VFFZG8UjpAAuo8KJ6FkIMhAhJQnt51SJRT2IAGaAwcVipA1aHEZAphSjrDEapQKEXD8uIIAIWtCSR7g/hQVwasMoAseFTRYYKcU9/dXFCJZswbKjAq37oDS7DHLe+6u6KEIQh0ksAR9CK5RRi4eJXTFex48MCBCIRTYABFlJLgGHA0mlMcV/CVU4VAFQEKKAyug1yFCXNjyxyQP8BfCUgid8QgoEYRYkRtV9NjjDl9QYpRCCmiRwRNjjPHKipLs4KOPX3SUgCRDEJHklT10qEgei9DBRyk49NiCQqBcmWQNOdzRRYMvUPDDIglN8cAUCEWiwQNRjCFEEJCMUEcYQKBC0RQK/EABBVbUQREaAiCDkAe6EIDQA14AAQQIWfxABTE4fIDFFVYcSgEXRSUkkBkTJfQIEpZysogRrTTQkMcHJpggxwOoiAoBSh34MpdCTFjqQxYKrBBrJjrUuuQUOIgaXwIEcYQQDpYCsYAID8QKhgiU1GpBUYqAQkGUCczREBteWWFpA0V5EOu3U2RQKywJGaNICAo8BEwIU2DRg2a1xKoDQl/USi6FaJjEBo0J9BCrCwjR4S2RJgkUgEQJ/RDrJAnpYEgeCRRobsUDHYRGAlNgkEVFJ/tKskMHIKRBCDTPiFCjJgUEACH5BAEFAM0ALAAAAAAgACAAhwAAADhwqCp+vi5yuDR4sjR2sjJ+sjp0sDZ4sjJ4tjR4tGCUwjh6sjJ0rjR2sHikyoKs0ECAumicynymzIiw1E6KvoKu0pC22ISs0DB4tjB2tIiw0jB4tDJ2tjJ2tDJ2sjB2slSOwDJ0tjJ0sFiOvliQwpK01FqQwFiSwpS42FqSwlySwlySxF6Swl6Uwpq62F6UxJq82py82mycxpy+2m6eypy+3J6+2nCeyKDA3G6gyqLA3G6gzHCgynCgzHCizKLC3HKiyqTA2nKiznSiynSkzKTC3KTC3qbC3oCozKbE4KjG4IKq0KrG3oCs0qrG4KrI4KzI4LbO5Iqy1JK21pi62KC+2rTM4rjO5DR8tmiaxnSkzkiEvHqmzoiy1FCKvoSu0laOwFqOvpa62myeyp6+3HyozoCs0LDK4JC01JS21rbQ5o601jB8ujJ4tDB2uDB2tjZ+tpK42LjQ5jJ4uDx8uDJ2urzS6Dx+uD5+uECAuD5+uj6Auj5+vkyIvsba6lCMwFaQwlSOwlKMwFKOwGiayMja6tTi8DB4uHqozn6q0sbY6NTi7tjk8Him0K7I4DR4tnikzHakzEaCuFCKvFaOvjZ6tkqGvFKMvjp8tjx+tuDq9Dh6tDh6tjh8tjx8tmCWxoqw1GaayGSayLDK4uTs9F6UxmKUwnimztzm8O70+Ozy+PL2+sDW6M7e7ubu9vz8/mqcykaEvEiEuEiGvGKWxGKWwvj6/EqGukqIvmKYxmSWwk6IukyGvESCuGaYxE6IvEKCus7e7FSKvGaYxurw9kaEukSCujJ6tjZ4tESEvDR6tjR6tAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AJsJHEgwDp0ECBMmjEOwocOBWRJoUEgxQYYEbR4+NGCxYgIFWmplohhA40AFCT0Qe7Qj4YlNm4xQzEDHJLKLCD20OnQoBMIJMFvm9JCgA7OHCnDmTMEzTQIPL2BCQEjASI5ORWsSHNAhgaUKCUnwNGTpAxaYtRJ8sKJKFZKEJQcihETjzxSUBXYeqjWiEUxfHpK0VUVBIcSLYf4ovqHJDQaeNybBPPRh1+AoKBNqTaiAiuI/pIzh4ulqAcwrlEq1XcSpYjM7Cj9E+nyHRBNXVBBAALLgT9tGvp46mPErwZsDBxV6qNVKsRQCrRNqeKHq1bAGYoSsgnXLmMJMgOr+EPVAScofMx4V4DhlIhWs9++JKJwyZ86TFF1qfXGRuaKHHfC9V4oMIyXAQQJH1KfgHGvo4VFCXbzHChq/EJBQBwfWkIMUC86Bx4MIIUDFAwwQpRCGOREwywKRsIEeiAgNgkIFsuDRXwdKJcRJCzX055ElEgQpJCh+FKWQAiFAoAQUULAAYyZCRglKRwlkUkQOTGYZBIiQcBGBLBWUAEqQgijEQpZMpqDFFyU8WMIWPESQkCV7WIJQHBnksQQUORBhzAdcxGBDDRRZooAPW2wxxCUUvSFAMwh9MYiFCeSRgg02gFFBD6AsI4oTNQSDaKIhmIiQQG1MNCcFmI4RQResF1xwiRMWWIAHHmQkugUMKHGAjFwKmYGpDb0oMEWsmcRSqwpeiaJrMKcOxBFChQy7ggd5xDqFB37U6ghRkKiwxZQJ9NEQHV0VgWkNRFUQKyoeWKJIrbIkFAEkHSjwEDMdWNJDD5nBEGshCOlSqy4nvmESHTkm4EOsbSYgi7dHmiRQABIl9EOs9SIUiw6MHmiuxQMd9IZXfoDVaAK/kuzQAQhl0MHMOCL0qEkBAQAh+QQBBQDMACwAAAAAIAAgAIcAAAA4cKgqfr4ucrgyfrI0drIyeLY6dLA0eLI0eLReksA4erIydLA0drBunsp2pMx8psxAgLpkmshwoMp6qM56qNB+qM6ErtJQirwweLgydrSGrtKIsNQyeLQweLSKsNQydrYwdrYwdrQydrIwdrJYkMCOtNQydLaQtNRYksSSuNhcksKUuNZcksSUuNiUutqWuNaavNpqmsacvNhonMqcvNpqnMievthqnMpsnMhsnsqevtqevtyewNygwNx0osqgwt6iwt50pM6kwt6uyuKAqs6ErtSMstSOtNaautiqxuCwyuKCrNKwzOKyzOKMsta+1OiOstI2erZkmMhsnsx4pMxEhLxwoMx+qs5OisAwfLoweLYydrowdrhWkMJaksSWuthonMh0pMyqxN6YutquyuC60ubA1Og6fLY2frYyeLg4fLg8fLg6frg8frg+frhAfrg+fr5Ihr5MiL7M3OxOiL5Oir5MisBUjMBUjsBSjsJYkMJakMK40ObI2urQ4O54ps5yoszY5vC0zuR+qtB4ptA0eLZGgrhYjrxaksKoxN44erZGhrxQisBKhr5uoMo0erY2eLSYutjc6PI4eLQ4fLY4erTm7vaoxuBglsRSirzU4u7k7vbq8PZilsJQir5clMRelMJglMD0+PpKiLzA1ujS4O7e6vLw9vrG2upyosp2ospGhLpKhrxIhLhomshmmshGhLxIhrpOiLpCgrpmmMZkmMZglsZclMZilMJCgrhilsRimMZelMZAgrpglMTk7PRSjMDe6PJGgrpWjL5UjL5IhrxSjL5EgroyerY0fLY0erQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gCZCRxIMI0aAwgTJkxDsKHDgcoMiFBI0UAGA1oePiRgsaKBBLUyoaEYQOPABAk12MJUI2EJQYJ2UMyQwWSyiwg1mKFDBw/CKjBnpNRgAMSyhwlw5jTB84gBDSxgFkFYwEeMRUVrEhwAwoCUOQmJ8SyVQIMTmJkMMJhx6ZKPhCUHIpQCBsoGlAx20snE4A9MWhogtL20QSHEi3mgKI6BpkMRnjEOwaTDwNNgJSgTak2Y4IhiKEpYueLpZwVMIrMmtT2DlSIzLgpHPPg8qNgQPyakWOCh4ExbU7SeFpDhyUCIAwcVaghlRjGRAq1zwrh0ShMDRDc4jUJlRSGaLGiI/naYtQQKII8JcogysWmUe/cTFF5o0iSIiQeZMKzIXFHDjvfuncIYQh0YwAN9CDZBBBweJfSAe52M4Ql/IHhggA0xEJFgE2w0iFAkKPywAFEKVZhTAYes8MMHVXiYUCNeZGGFGxRaSBElK+SAgItSSODjj7jIUZRCCQRDQQ9BBLGHi2v86CQuHRmwxgRkJGllfA0aEssbVmThxS0+6qHQF1YmiUQtdfjkkR5U0PBGQlK4IQVCaWTwBhBBkOEAKyOwosILNFAkhSE0UEEFDrFQFIIAzCCUxScFIPTGEy+8QMgcOrQgxS0VhEFLoYZm4RozWkwE5wWVIgGHEBxwIEsFo7C60YYEhlKRgiEGeJCMXAo9UKkLpBhgRKtoSACrF171UmsECBHEEUJTVPpCCQa80SoTGjgC6xUkekFFC7jG0VAGXU1QqQ1EzdGqEB8JAWt3CLkBCQgJPLQMCFLgkENmLbQqAUKgwApKiVo9RBNFOLSaB0JWbEukSQIFIFFCOrSKTEIS0CCkheJCPNBFIXglhyMVhbyrxw4dgBC5ILSME6MmBQQAIfkEAQUAywAsAAAAACAAIACHAAAAOHCoKn6+LnK4Mn6yNHayMni2OnSwOHiyNHi0YJTCMHSwNHiyNnawNHawdKLKgKrSQoK6ZprGeKLKgqzQiLDSUIzAMHi2MHa0MHi0irDSMna2MHa2Mna0MnayMHayMnawirLWjLLWMnS2MnSwWJDAjLTWkLTUWJDClLbWWpDCXJDAWJLEWpLEXJLAXJLCXpTClrjWlrjYlrrYlrramLrYmLramLzamrrYcJ7ImrramrzYmrzamrzcnLzaosLecKLMeqbOpsTgfKbOqMTefKjQqMbggKrQrMjghq7SiLDUkrbWlLjYnL7apMLcts7ksMziuNDkhrDShrDUOHq2ZJjGcqLMRoa8aJzIdqTMhK7SVI7AMHy6Mni0MHa4VpDCkLbWcqDKsMrikLbYoMDcsszivtTovtTmMni4krbYwtjqOny4Mna6On64PH64Pn64QoC4RIC4QoK4Pn66PoC6QIC6Pn6+Soi+osLcUIq+TorAVo7CxNjq0ODuZJrIbp7IbJ7KbqDMeqTMcKDMdqTOMHi4utDkeKbOzt7s1OLuvNLk3ujyNHi2RoK4UozAOHy2Soi8VI7CNn62TIi+2OTw4OryNnq2OHq03OjyOny2PHy2YJbGZJjIUoy+YpjI7PL4XpTGXpTEdKLMSIa81uTwSIS6ytzq6PD24uz09vr8+Pr8bp7KSoa6aprGapzITIi8YpbEYJbETIa6ZprIRIK4Toi+UIq8YpjGQoK8ZpjEyNrqVoy8aJrIVIy+Mnq2NHy2NHq2Vo6+RoS6RoK6Soa8RIK6NHq0Nnq0RoS8RIS8Nni0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACP4AlwkcSFASGgMIEyaURLChw4G/DGBQSNHABQNcHj4kYLGigQRVQlGhGEDjwAQJO2z6ISNhsD59eFC8gMakr4sIO5RRo8YRwgcwZ6REuMHYwwQ4c1bgmcRAhxMwgyAs4EPGyA01CQ7YYIDKpIS9eEZJ0AEJzFAGPMRYtMhHwpIDETJK8wQCSg9QeCrwoAtmhA6C2C6ioBDixS1PEjNx02UIzxRxYPLxoEDwD5QJsyZMUCHxkx+NSvE04wImEVmJ2BoaSXEZG4UFwnhG0qmJGSWWgtRYYYitqQhOC0iAZYDDgYMKO7yAkphIgUsKMZxYRCkPiV04MH06VUzhmklrOv4Y6CLLyJMsHhO0cqGhz6f373MohGDEiI8KVl68UoG5Ygcd8L1HSQqsZWCADfUlaIQQb3iU0APvoeIELP1tYKAETAihoBFuOIgQAxrkgIB4ClmYUwGNqLCKFqJ4OBURZ+wwwS4NLCDeBkklREUJvPTnUSOqBBlkKpRo0AFXm1lACA099ICCi6ykIqSQlHSAExWAjNHklq64GEEeWdSgSCVBQqHQF1s2WQEsd1jgoB5+bNJhBx1o8sIaCElygRs39AAGILR4IEwIJlRBkSXAbOLHosApxIEAyyA0SS2YuaGFCSYcMsosKFjSAhCb0OHJon7c0doyXEyUkCVFYKrEG6+BQADBFUBYYcUaa4BCaiQIZeBLXAoBgakIoxhQhKyPgGLrFgZYwgKpcyBEEEcIbYKpCcy6IWsQHVxhKxYkWuDHF4wYYEdDaHAFCKZViHeHrIAYwEggtjZqQBsGbJDAQ8ZsYMksEmCGgqybIISCrU8mtIEXJqGRowGzyOqTAbh8q9C+Ji0TgEQJRQyBvaB4gowBBp6b8UAHcdDsFcVSpPKvJzt0AEIXbGAzjghBalJAADs=)!important;background-color:#337ab7;border-color:#2e6da4}#toasty .toast.toasty-theme-bootstrap.toasty-type-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MkQyQUI3Q0EzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MkQyQUI3Q0IzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0QTNBMDVFQjMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0QTNBMDVFQzMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Po9jTrYAAAKTSURBVHja7Jq/SyNBFMfNuSYB0cbCUzmtTvwbbPwb7KPV/Rmnu5tYWR1XX6WFpYL2giBW/igUFCxEuMJeZMXg3Bt4kcmwiftm3kuG5R58mc0G3ptPZnfmzZtUlFIjZbBKWUC+CPqOQA3QLSjDtoH3+U2PiIBqoE2Vb5v4PWtMCYh6HwgTph4yiO5coopZwgnDCVElQJgw1ZBAIgcIEyYKBSRVfpaGAJIoHkuGCZIqXkuHAdIEvTODvKPfgYG0QG9Kxt7QvziIDvKqZO2VCuMCkRE7dQPawZZiGQWGOjtRIf6AZkCT2KZEH1nR2YwCQX2crkDfcpLJY4fHLPEFifBXbDs854c9fG45TBRt7EfkAqJzoNjjhT0CVXL87nn4jHvlZv2y2Nhz5jnH98L0Owo68fQb52XNvql4P3sArVi+F0HXTOlMvR9IjWEkOvYM+mH5XwU9MfmPzZ2mPexcEB3btkB+Mqc1Mfa7C6QhsELvg8aMGL8FYuh+d1VRNgRqG1OgSbyugeYFYmzY5aAFgSAa4iteVw0oTluwQR6FQKrGiEwIxHi0K41roB3mIC+gM9Bf0AxoGTTOHGMdtMtVQBiWfRQuJNcRaeu5jnCv7GbCd++YeDqv7NwwB6DvoGlsDyQgimS/PjA6p1qyfC555loJNfvl2I+c5vxydbzv8ng670fs+hV1h3gJmrX8zOF96g7x03oXtRhH2W+/4Myi349xbLeJo5sVLdoNoopyAfqFbRBVlFLVtcwCQlsIoo3+B1b7bQnVflvqfzU+DBivwx6uE6umJ0RTBXSGmHqMRDBniJ3cLHWACOpU18ylUgJEkOfspfrnQ5GdZtfOLnSQESzM6eLZHaYcd/h5TCJeaf6v9U+AAQAvyHBRYhRQ4wAAAABJRU5ErkJggg==)!important;background-color:#d9534f;border-color:#d43f3a}#toasty .toast.toasty-theme-bootstrap.toasty-type-success{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MkQyQUI3Q0UzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MkQyQUI3Q0YzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRDJBQjdDQzMyMkIxMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoyRDJBQjdDRDMyMkIxMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvQVuMwAAAORSURBVHja7JpNaBNBFMebNsZacih+FFFsrB4qVIw9lByEWNtCC/VSRS14UjSx1V4UvbUKFaFUD178OniPB28KgsYeFBVqRFDQgx9paE1bNVKKta3N+h94hTWZ3ezOTiYh9MEPwmZ39v2TmTdv3oxL07SyUjDXipBsW0NsA37gAx7gpe9nwQKIg7fgM5gjCi6EOboZNIEDoFPneC5jwh6A++Al+AYWVQtxg3pwBPSBaoc/6Di4Q6I+gL8qhGwBx0EvqJHc1afADXAXJGw9yYTYoBVEtfxblN5l2Tc7InrApKbO2LtCMoV4wGUwr6m3OTAAVjsV4iIRS1rhLA36nQo5Rb9KoW0WnDTz1SxqtYB7YF2RTN4/wSEQtRO1asGIVnw2Qr5l+VzO0VYBjoFgEaZUQZqEXVYmxAbwGGxU5Nw8eEqT6y7KGswsCdrAe7Ou5QaDirvLVYqO5fR5ysIzl8hXw6i1FUwrFDEK6jJ86AAzOZ6LA5+REPardCsU8QO0cwZuBfhq4flu8jlrsLO1RJfCgcsSw0ec6+doLZPLusjnrDHiBSlF/8YbgzDqB78stpEin7O6VpMiEWwwt3BEsMH7zGZbAV7X8ivoTmype9Ngdr4A9thsr275g16IT4GQGLjGuc4EnBZor54nxKMgVzoLZjjr/kGwSaDNKp4Qr6CDabCU4x5WVLgOXnC+uwKaBd/t5QkRsRQ4Q10jZnLfKBjmXN8PjvJyJ9umixpDAhNaT0bojHHuY+G0kROlaiRk2EO88Gsnx1oEfRzndoPXGfeGDULtsIRQfpEn5ISNBtj6/aDBWqaRcihmD/VphI52i8mhlTTF8YSYAEETMUxEg0GXei5pcg3whIikKOOg2UBMZR67lGmKUgUiAg2OgX0W608dVEiQYRHyWWoaH7cgZj34KDFn+y+N5y2svgs2nDBIBpfXGLckijBdWMlY6hqNGdalFiQKybnUZewESQcvmQB7de1Vgy8SRSTJx5yVRjcpTjt4GetmvaBTcn2M+XSeNzeVTIHOrGTaSiXTtUVUMj0Mnohs9IQkxn2nReyQ0/2RfofjpSi2Fcpok2WgQNsL0jZ69IQlZax2qi3hfOwhMtoURbMRepdl30S2p2t129MbJEemaVoSR8CYqgMDO+i0Q1iwAqK3CXCbDgy8K8QRjlUkIuDwCMcrEqP8CIdRjakSbLd4qOYT+AN+rxxzKkUh/wQYAIxbfwhIUivlAAAAAElFTkSuQmCC)!important;background-color:#5cb85c;border-color:#4cae4c}#toasty .toast.toasty-theme-bootstrap.toasty-type-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MkQyQUI3RDIzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MkQyQUI3RDMzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRDJBQjdEMDMyMkIxMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoyRDJBQjdEMTMyMkIxMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PhxHKhwAAAN7SURBVHja7JrfS1RBFMf37q7mj6SySMWMMqnQLEsKMg2yH4SC2g+wrKcIg7SX3ouiP6BfEFRPEdRLFFlBIEVQvfcgFrJBLxFBEWG9mHb7Hjgrl+vMzr13Zuyu+IUP7M7Pc+7MnJm5u47ruom5oGRijmjOOJK22PYScBrs5u8vwA3ww0ZnjqU1sgg8Ba2+9NegE4znw9QqBg8FTpDawF0uE3tHBkFLjvz9XCbWU2sZT5/1inIfeHS+xXVELoK6AOXquGwsp9ZGcDhgJExz2U1xc6QEXADLQ9ShsudMbQGmHDkE9kSoR3tMd1wcoSd7CpRFqLsYnA05ktYcOQGac+T/ZmTawm381/BL0ecR2CDI+wyug4/8fQ04A6oFZUfAAZCJbAk5osFVMOmK1SMo3yMpS21c07FFx4m94LvEsFcgLahDaS8ldb6AnVHtibpGaGGfBOWS/PuyqQyeSPIqNYJGZEeO8ClWJnIwJdkIq3LU6+a2Z8WRGtAHSnOUWQcKBOkphSOl3HbNbDjSpzjdkupBoSCd0tYq6rZwH1aj1jaQcdWaAJWC+hWcp1KG+7Ky2OlpHgW1AcrStFohuTkWBKhfy30V2phaHWCAI08QrfK1T58bg27UoB+0m3akhsNtQQjH23xPlCJWU8gT9WDQhZ8M+HT2KcKtSKt97ac4LYw6ue+kCUfqeUqFVa3vrpHmy1dYDXA413KEptIxsDmCAQ2+TTElCQAqUd8HlRcwRVhrA+NudFV72irXaOcX2xIp/JbxsC7UOOZnFzyN7EqNdkrZlrKwr0xpGuwCvZr3nQ7PvtOo2RbZcg88A1NBL1YV4HnIcDkbescv+L4GGRGHb2smnHgDPnk2yFbN9prYttszRkWwcBr4kqOry6DK0y59vmmgXbKtTnVDdAx1NgKKBQ9pAefp6ooqam0Hxw1MqTvgjyB9ivN01e+/SngdoVf9l/iMo6u05HDpGHqzmLW12O+Iw9fMdkPRpVdy1U0ZCOlZtbPNjnexl4BR16xu8ZrI9rGU00xqlG2f3ke6wGMLcf8teM9PjQ6MWy30QaMylJ2vzZY2sB2MTZHtQ9k1UpTIXxV5F/tYHjsy5nXkARjOQyeG2fZpR35yWDyfsPAbuAWNs629bPuM02+a7w+F/DMAnYL/xsT4JJ966WeKCWZSdYzPO83/O2jeEUv6J8AAuUNANq3q2uMAAAAASUVORK5CYII=)!important;background-color:#f0ad4e;border-color:#eea236}@-webkit-keyframes toasty-shake{0%{-webkit-transform:translate(2px,1px) rotate(0);transform:translate(2px,1px) rotate(0)}10%{-webkit-transform:translate(-1px,-2px) rotate(-1deg);transform:translate(-1px,-2px) rotate(-1deg)}20%{-webkit-transform:translate(-3px,0) rotate(1deg);transform:translate(-3px,0) rotate(1deg)}30%{-webkit-transform:translate(0,2px) rotate(0);transform:translate(0,2px) rotate(0)}40%{-webkit-transform:translate(1px,-1px) rotate(1deg);transform:translate(1px,-1px) rotate(1deg)}50%{-webkit-transform:translate(-1px,2px) rotate(-1deg);transform:translate(-1px,2px) rotate(-1deg)}60%{-webkit-transform:translate(-3px,1px) rotate(0);transform:translate(-3px,1px) rotate(0)}70%{-webkit-transform:translate(2px,1px) rotate(-1deg);transform:translate(2px,1px) rotate(-1deg)}80%{-webkit-transform:translate(-1px,-1px) rotate(1deg);transform:translate(-1px,-1px) rotate(1deg)}90%{-webkit-transform:translate(2px,2px) rotate(0);transform:translate(2px,2px) rotate(0)}100%{-webkit-transform:translate(1px,-2px) rotate(-1deg);transform:translate(1px,-2px) rotate(-1deg)}}@keyframes toasty-shake{0%{-webkit-transform:translate(2px,1px) rotate(0);transform:translate(2px,1px) rotate(0)}10%{-webkit-transform:translate(-1px,-2px) rotate(-1deg);transform:translate(-1px,-2px) rotate(-1deg)}20%{-webkit-transform:translate(-3px,0) rotate(1deg);transform:translate(-3px,0) rotate(1deg)}30%{-webkit-transform:translate(0,2px) rotate(0);transform:translate(0,2px) rotate(0)}40%{-webkit-transform:translate(1px,-1px) rotate(1deg);transform:translate(1px,-1px) rotate(1deg)}50%{-webkit-transform:translate(-1px,2px) rotate(-1deg);transform:translate(-1px,2px) rotate(-1deg)}60%{-webkit-transform:translate(-3px,1px) rotate(0);transform:translate(-3px,1px) rotate(0)}70%{-webkit-transform:translate(2px,1px) rotate(-1deg);transform:translate(2px,1px) rotate(-1deg)}80%{-webkit-transform:translate(-1px,-1px) rotate(1deg);transform:translate(-1px,-1px) rotate(1deg)}90%{-webkit-transform:translate(2px,2px) rotate(0);transform:translate(2px,2px) rotate(0)}100%{-webkit-transform:translate(1px,-2px) rotate(-1deg);transform:translate(1px,-2px) rotate(-1deg)}}#toasty{position:fixed;z-index:999999}#toasty .close-button:focus{outline:0}#toasty.toasty-position-top-left{top:12px;left:12px}#toasty.toasty-position-top-right{top:12px;right:12px}#toasty.toasty-position-bottom-right{bottom:12px;right:12px}#toasty.toasty-position-bottom-left{bottom:12px;left:12px}#toasty.toasty-position-top-center{top:12px;left:50%;-webkit-transform:translate(-50%,0);transform:translate(-50%,0)}#toasty.toasty-position-bottom-center{bottom:12px;left:50%;-webkit-transform:translate(-50%,0);transform:translate(-50%,0)}#toasty .toast{cursor:pointer;margin:0 0 6px;padding:0;width:285px;height:65px;display:table;background-size:24px 24px;background-position:15px center;background-repeat:no-repeat;box-shadow:0 0 5px 0 rgba(0,0,0,.25);opacity:.9;position:relative}#toasty .toast.toasty-shake{-webkit-animation-name:toasty-shake;animation-name:toasty-shake;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-transform-origin:50% 50%;transform-origin:50% 50%;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}#toasty .toast.toasty-shake:hover{-webkit-animation-play-state:paused;animation-play-state:paused}#toasty .toast .close-button{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none;position:absolute;right:10px;top:3px;opacity:.5}#toasty .toast .close-button:focus,#toasty .toast .close-button:hover{text-decoration:none;cursor:pointer;opacity:1}#toasty .toast .toast-text{padding:5px 20px 5px 60px;display:table-cell;vertical-align:middle}#toasty .toast .toast-text .toast-title{font-weight:700}#toasty .toast .toast-text a:hover,#toasty .toast .toast-text label:hover{text-decoration:none}.mdp-animate-next{opacity:0;transform:translate3d(50%,0,1px)}.mdp-animate-next-remove{transition:all .5s cubic-bezier(.35,0,.25,1);opacity:0;transform:translate3d(50%,0,1px)}.mdp-animate-next-remove-active{opacity:1;transform:translate3d(0,0,1px)}.mdp-animate-prev{opacity:0;transform:translate3d(-50%,0,1px)}.mdp-animate-prev-remove{transition:all .3s cubic-bezier(.35,0,.25,1);opacity:0;transform:translate3d(-50%,0,1px)}.mdp-animate-prev-remove-active{opacity:1;transform:translate3d(0,0,1px)}@keyframes mdp-animation-bounce{from{opacity:0;transform:scale(.95)}70%{opacity:1;transform:scale(1.05)}to{transform:scale(1)}}.mdp-animation-zoom.ng-enter{transition:all .3s cubic-bezier(.35,0,.25,1);animation-duration:.3s;animation-name:mdp-animation-bounce}.mdp-datepicker{max-height:initial;min-width:234px}.mdp-datepicker *{outline:0}.mdp-datepicker .md-actions{width:100%;padding:0 5px}.mdp-calendar-week-days{font-size:.75rem;opacity:.6}.mdp-calendar-week-days>*{width:32px;height:32px;line-height:32px;margin:0 5px;padding:0;min-width:0;min-height:0;box-shadow:none!important;background-color:transparent}.mdp-calendar-days{font-size:1rem;max-width:100%}.mdp-calendar-days .md-button,.mdp-calendar-days .mdp-day-placeholder{width:32px;height:32px;margin:0 5px}.mdp-calendar-days .md-button{cursor:pointer;border-radius:50%;font-size:12px;width:32px;height:32px;line-height:32px;padding:0;min-width:0;min-height:0;box-shadow:none!important;background-color:transparent}.mdp-calendar-days .md-button[disabled]:not(.md-accent){background-color:transparent!important}.mdp-calendar-monthyear{font-size:.8125rem;font-weight:700;line-height:32px;min-height:32px}.mdp-datepicker-date,.mdp-datepicker-day,.mdp-datepicker-dow,.mdp-datepicker-month{font-size:1.8rem;opacity:.6}.mdp-datepicker-date:not(.active),.mdp-datepicker-day:not(.active),.mdp-datepicker-dow:not(.active),.mdp-datepicker-month:not(.active){cursor:pointer}.mdp-datepicker-date.active,.mdp-datepicker-date:hover,.mdp-datepicker-day.active,.mdp-datepicker-day:hover,.mdp-datepicker-dow.active,.mdp-datepicker-dow:hover,.mdp-datepicker-month.active,.mdp-datepicker-month:hover{opacity:1}.mdp-datepicker-year{font-size:.9rem;opacity:.6;padding:0;margin:0}.mdp-datepicker-year:not(.active){cursor:pointer}.mdp-datepicker-year.active,.mdp-datepicker-year:hover{opacity:1}.mdp-datepicker-select-year{height:232px}.mdp-datepicker-select-year .repeated-year{text-align:center}.mdp-datepicker-select-year .repeated-year .md-button{width:100%;margin:0;border-radius:0;padding:0;font-size:1rem;line-height:42px}.mdp-datepicker-select-year .repeated-year .md-button.current{font-size:1.8rem;line-height:42px}.mdp-datepicker-select-year .md-virtual-repeat-container,.mdp-datepicker-select-year .md-virtual-repeat-offsetter,.mdp-datepicker-select-year .md-virtual-repeat-scroller{height:100%;width:100%}mdp-date-picker>md-input-container.md-has-icon{padding-left:40px}mdp-date-picker .md-button.md-icon-button{margin:18px 0 0 0}.mdp-datepicker:not(.portrait) .mdp-datepicker-select-year{width:309px}.mdp-datepicker:not(.portrait) .mdp-calendar{margin-right:5px;width:294px;margin-left:10px}.mdp-datepicker:not(.portrait) .mdp-datepicker-date-wrapper{width:150px}.mdp-datepicker:not(.portrait) .mdp-datepicker-dow{width:100%;display:block}.mdp-datepicker:not(.portrait) .mdp-calendar-days>*,.mdp-datepicker:not(.portrait) .mdp-calendar-week-days>*{width:42px}.mdp-datepicker .mdp-datepicker-date-wrapper{padding:16px 35px 16px 16px}.mdp-datepicker md-dialog-content{overflow:hidden;padding:0}.mdp-datepicker md-dialog-content .mdp-calendar{width:294px;overflow-x:hidden}.mdp-datepicker.portrait{max-width:234px}.mdp-datepicker.portrait .mdp-calendar{text-align:center;width:100%}.mdp-datepicker.portrait .mdp-datepicker-select-year{height:252px}.mdp-datepicker.portrait md-dialog-content>*{width:100%}.mdp-datepicker.portrait .md-actions,.mdp-datepicker.portrait .mdp-calendar-days,.mdp-datepicker.portrait .mdp-calendar-week-days{padding:0 5px}.mdp-datepicker.portrait .md-actions{margin-top:20px}.mdp-datepicker.portrait .mdp-calendar-days>*,.mdp-datepicker.portrait .mdp-calendar-week-days>*{width:32px}mdp-calendar{display:block}.mdp-calendar-week-days{width:100%}.mdp-calendar-week-days>*{margin:0}.mdp-calendar-days .md-button,.mdp-calendar-days .mdp-day-placeholder{margin:0}.mdp-clock{width:200px;height:200px;border-radius:50%!important;cursor:pointer;padding:24px;background:#ededed;box-shadow:none!important}.mdp-clock .md-button{box-shadow:none!important;background-color:transparent;display:block;position:absolute;min-height:32px;width:32px;height:32px;font-size:12px;line-height:32px;margin:0;padding:0;transform:translate(-50%,-50%)}.mdp-clock .mdp-clock-container{width:100%;height:100%;position:relative;display:block}.mdp-clock .mdp-pointer{min-height:0;width:1px;height:50%;position:absolute;left:0;right:0;bottom:0;margin:0 auto;transform-origin:top center;z-index:0;pointer-events:none}.mdp-clock .mdp-clock-center{min-height:0;height:6px;width:6px;position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;border-radius:50%}.mdp-clock .md-button.mdp-clock-selected{position:absolute;border-radius:50%;width:8px;height:8px;bottom:-8px;left:0;min-width:0;min-height:0;pointer-events:none}.mdp-timepicker .mdp-clock-switch-container{padding:20px;width:309px}.mdp-timepicker .mdp-timepicker-time{padding:15px}.mdp-timepicker .mdp-timepicker-selected-time{font-size:3rem}.mdp-timepicker:not(.portrait) .mdp-timepicker-time{width:138px}.mdp-timepicker.portrait .mdp-timepicker-selected-time{font-size:4rem;margin-right:1.5rem}mdp-time-picker md-input-container.md-has-icon{padding-left:40px}mdp-time-picker .md-button.md-icon-button{margin:18px 0 0 0}.mdp-timepicker-selected-ampm>span,.mdp-timepicker-selected-time>span{outline:0;opacity:.6}.mdp-timepicker-selected-ampm>span:not(.active),.mdp-timepicker-selected-time>span:not(.active){cursor:pointer}.mdp-timepicker-selected-ampm>span.active,.mdp-timepicker-selected-time>span.active{opacity:1}.mdp-clock-deg0{top:0;left:50%}.mdp-clock-deg30{top:6.69872981%;left:75%}.mdp-clock-deg60{top:25%;left:93.30127019%}.mdp-clock-deg90{top:50%;left:100%}.mdp-clock-deg120{top:75%;left:93.30127019%}.mdp-clock-deg150{top:93.30127019%;left:75%}.mdp-clock-deg180{top:100%;left:50%}.mdp-clock-deg210{top:93.30127019%;left:25%}.mdp-clock-deg240{top:75%;left:6.69872981%}.mdp-clock-deg270{top:50%;left:0}.mdp-clock-deg300{top:25%;left:6.69872981%}.mdp-clock-deg330{top:6.69872981%;left:25%}.mdp-clock-deg360{top:0;left:50%}.jstree-children,.jstree-container-ul,.jstree-node{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:#000;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:active,.jstree-anchor:hover,.jstree-anchor:link,.jstree-anchor:visited{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree-leaf>.jstree-ocl{cursor:default}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-anchor>.jstree-themeicon-hidden,.jstree-no-icons .jstree-themeicon{display:none}.jstree-hidden,.jstree-node.jstree-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-leaf>.jstree-ocl{cursor:pointer}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jstree-contextmenu .jstree-anchor{-webkit-user-select:none;-webkit-touch-callout:none;user-select:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;box-shadow:2px 2px 2px #999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none}.vakata-context li>a{display:block;padding:0 2em 0 2em;text-decoration:none;width:auto;color:#000;white-space:nowrap;line-height:2.4em;text-shadow:1px 1px 0 #fff;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-no-icons{margin-left:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator>a,.vakata-context .vakata-context-separator>a:hover{background:#fff;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;text-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context .vakata-contextmenu-disabled>a>i{filter:grayscale(100%)}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:0 0;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:#fff;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:#fff;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:-5px 0 0 0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-copy,#jstree-dnd .jstree-icon{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px 0 2px}.jstree-default .jstree-icon,.jstree-default .jstree-node{background-repeat:no-repeat;background-color:transparent}.jstree-default .jstree-anchor,.jstree-default .jstree-animated,.jstree-default .jstree-wholerow{transition:background-color .15s,box-shadow .15s}.jstree-default .jstree-hovered{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #ccc}.jstree-default .jstree-context{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #ccc}.jstree-default .jstree-clicked{background:#beebff;border-radius:2px;box-shadow:inset 0 0 1px #999}.jstree-default .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-default .jstree-disabled{background:0 0;color:#666}.jstree-default .jstree-disabled.jstree-hovered{background:0 0;box-shadow:none}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default .jstree-search{font-style:italic;color:#8b0000;font-weight:700}.jstree-default .jstree-no-checkboxes .jstree-checkbox{display:none!important}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked{background:0 0;box-shadow:none}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#e7f4f9}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:0 0}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#e7f4f9}.jstree-default>.jstree-striped{min-width:100%;display:inline-block;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==) left top repeat}.jstree-default>.jstree-wholerow-ul .jstree-clicked,.jstree-default>.jstree-wholerow-ul .jstree-hovered{background:0 0;box-shadow:none;border-radius:0}.jstree-default .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-default .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default .jstree-wholerow-clicked{background:#beebff;background:-webkit-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:linear-gradient(to bottom,#beebff 0,#a8e4ff 100%)}.jstree-default .jstree-node{min-height:24px;line-height:24px;margin-left:24px;min-width:24px}.jstree-default .jstree-anchor{line-height:24px;height:24px}.jstree-default .jstree-icon{width:24px;height:24px;line-height:24px}.jstree-default .jstree-icon:empty{width:24px;height:24px;line-height:24px}.jstree-default.jstree-rtl .jstree-node{margin-right:24px}.jstree-default .jstree-wholerow{height:24px}.jstree-default .jstree-icon,.jstree-default .jstree-node{background-image:url(32px.png)}.jstree-default .jstree-node{background-position:-292px -4px;background-repeat:repeat-y}.jstree-default .jstree-last{background:0 0}.jstree-default .jstree-open>.jstree-ocl{background-position:-132px -4px}.jstree-default .jstree-closed>.jstree-ocl{background-position:-100px -4px}.jstree-default .jstree-leaf>.jstree-ocl{background-position:-68px -4px}.jstree-default .jstree-themeicon{background-position:-260px -4px}.jstree-default>.jstree-no-dots .jstree-leaf>.jstree-ocl,.jstree-default>.jstree-no-dots .jstree-node{background:0 0}.jstree-default>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -4px}.jstree-default>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -4px}.jstree-default .jstree-disabled{background:0 0}.jstree-default .jstree-disabled.jstree-hovered{background:0 0}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-checkbox{background-position:-164px -4px}.jstree-default .jstree-checkbox:hover{background-position:-164px -36px}.jstree-default .jstree-checked>.jstree-checkbox,.jstree-default.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox{background-position:-228px -4px}.jstree-default .jstree-checked>.jstree-checkbox:hover,.jstree-default.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover{background-position:-228px -36px}.jstree-default .jstree-anchor>.jstree-undetermined{background-position:-196px -4px}.jstree-default .jstree-anchor>.jstree-undetermined:hover{background-position:-196px -36px}.jstree-default .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default>.jstree-striped{background-size:auto 48px}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default.jstree-rtl .jstree-last{background:0 0}.jstree-default.jstree-rtl .jstree-open>.jstree-ocl{background-position:-132px -36px}.jstree-default.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-100px -36px}.jstree-default.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-68px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl,.jstree-default.jstree-rtl>.jstree-no-dots .jstree-node{background:0 0}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -36px}.jstree-default .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default .jstree-file{background:url(32px.png) -100px -68px no-repeat}.jstree-default .jstree-folder{background:url(32px.png) -260px -4px no-repeat}.jstree-default>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default{line-height:24px;padding:0 4px}#jstree-dnd.jstree-default .jstree-er,#jstree-dnd.jstree-default .jstree-ok{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default i{background:0 0;width:24px;height:24px;line-height:24px}#jstree-dnd.jstree-default .jstree-ok{background-position:-4px -68px}#jstree-dnd.jstree-default .jstree-er{background-position:-36px -68px}.jstree-default .jstree-ellipsis{overflow:hidden}.jstree-default .jstree-ellipsis .jstree-anchor{width:calc(100% - 29px);text-overflow:ellipsis;overflow:hidden}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-default.jstree-rtl .jstree-last{background:0 0}.jstree-default-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-default-small .jstree-anchor{line-height:18px;height:18px}.jstree-default-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-default-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-default-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-default-small .jstree-wholerow{height:18px}.jstree-default-small .jstree-icon,.jstree-default-small .jstree-node{background-image:url(32px.png)}.jstree-default-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-default-small .jstree-last{background:0 0}.jstree-default-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-default-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-default-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-default-small .jstree-themeicon{background-position:-263px -7px}.jstree-default-small>.jstree-no-dots .jstree-leaf>.jstree-ocl,.jstree-default-small>.jstree-no-dots .jstree-node{background:0 0}.jstree-default-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-default-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-default-small .jstree-disabled{background:0 0}.jstree-default-small .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-small .jstree-checkbox{background-position:-167px -7px}.jstree-default-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-default-small .jstree-checked>.jstree-checkbox,.jstree-default-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox{background-position:-231px -7px}.jstree-default-small .jstree-checked>.jstree-checkbox:hover,.jstree-default-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-default-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-default-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-default-small .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-small>.jstree-striped{background-size:auto 36px}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-default-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-default-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl,.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-node{background:0 0}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-default-small .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-small .jstree-file{background:url(32px.png) -103px -71px no-repeat}.jstree-default-small .jstree-folder{background:url(32px.png) -263px -7px no-repeat}.jstree-default-small>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-small{line-height:18px;padding:0 4px}#jstree-dnd.jstree-default-small .jstree-er,#jstree-dnd.jstree-default-small .jstree-ok{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-small i{background:0 0;width:18px;height:18px;line-height:18px}#jstree-dnd.jstree-default-small .jstree-ok{background-position:-7px -71px}#jstree-dnd.jstree-default-small .jstree-er{background-position:-39px -71px}.jstree-default-small .jstree-ellipsis{overflow:hidden}.jstree-default-small .jstree-ellipsis .jstree-anchor{width:calc(100% - 23px);text-overflow:ellipsis;overflow:hidden}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-default-small.jstree-rtl .jstree-last{background:0 0}.jstree-default-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-default-large .jstree-anchor{line-height:32px;height:32px}.jstree-default-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-default-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-default-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-default-large .jstree-wholerow{height:32px}.jstree-default-large .jstree-icon,.jstree-default-large .jstree-node{background-image:url(32px.png)}.jstree-default-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-default-large .jstree-last{background:0 0}.jstree-default-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-default-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-default-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-default-large .jstree-themeicon{background-position:-256px 0}.jstree-default-large>.jstree-no-dots .jstree-leaf>.jstree-ocl,.jstree-default-large>.jstree-no-dots .jstree-node{background:0 0}.jstree-default-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-default-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-default-large .jstree-disabled{background:0 0}.jstree-default-large .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-large .jstree-checkbox{background-position:-160px 0}.jstree-default-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-default-large .jstree-checked>.jstree-checkbox,.jstree-default-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox{background-position:-224px 0}.jstree-default-large .jstree-checked>.jstree-checkbox:hover,.jstree-default-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-default-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-default-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-default-large .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-large>.jstree-striped{background-size:auto 64px}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-large.jstree-rtl .jstree-last{background:0 0}.jstree-default-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-default-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-default-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl,.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-node{background:0 0}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-default-large .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-large .jstree-file{background:url(32px.png) -96px -64px no-repeat}.jstree-default-large .jstree-folder{background:url(32px.png) -256px 0 no-repeat}.jstree-default-large>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-large{line-height:32px;padding:0 4px}#jstree-dnd.jstree-default-large .jstree-er,#jstree-dnd.jstree-default-large .jstree-ok{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-large i{background:0 0;width:32px;height:32px;line-height:32px}#jstree-dnd.jstree-default-large .jstree-ok{background-position:0 -64px}#jstree-dnd.jstree-default-large .jstree-er{background-position:-32px -64px}.jstree-default-large .jstree-ellipsis{overflow:hidden}.jstree-default-large .jstree-ellipsis .jstree-anchor{width:calc(100% - 37px);text-overflow:ellipsis;overflow:hidden}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-default-large.jstree-rtl .jstree-last{background:0 0}@media (max-width:768px){#jstree-dnd.jstree-dnd-responsive{line-height:40px;font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}#jstree-dnd.jstree-dnd-responsive>i{background:0 0;width:40px;height:40px}#jstree-dnd.jstree-dnd-responsive>.jstree-ok{background-image:url(40px.png);background-position:0 -200px;background-size:120px 240px}#jstree-dnd.jstree-dnd-responsive>.jstree-er{background-image:url(40px.png);background-position:-40px -200px;background-size:120px 240px}#jstree-marker.jstree-dnd-responsive{border-left-width:10px;border-top-width:10px;border-bottom-width:10px;margin-top:-10px}}@media (max-width:768px){.jstree-default-responsive .jstree-icon{background-image:url(40px.png)}.jstree-default-responsive .jstree-leaf>.jstree-ocl,.jstree-default-responsive .jstree-node{background:0 0}.jstree-default-responsive .jstree-node{min-height:40px;line-height:40px;margin-left:40px;min-width:40px;white-space:nowrap}.jstree-default-responsive .jstree-anchor{line-height:40px;height:40px}.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-icon:empty{width:40px;height:40px;line-height:40px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-default-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:40px;background:0 0}.jstree-default-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-default-responsive .jstree-checkbox,.jstree-default-responsive .jstree-ocl,.jstree-default-responsive .jstree-themeicon{background-size:120px 240px}.jstree-default-responsive .jstree-leaf>.jstree-ocl,.jstree-default-responsive.jstree-rtl .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-responsive .jstree-open>.jstree-ocl{background-position:0 0!important}.jstree-default-responsive .jstree-closed>.jstree-ocl{background-position:0 -40px!important}.jstree-default-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-40px 0!important}.jstree-default-responsive .jstree-themeicon{background-position:-40px -40px}.jstree-default-responsive .jstree-checkbox,.jstree-default-responsive .jstree-checkbox:hover{background-position:-40px -80px}.jstree-default-responsive .jstree-checked>.jstree-checkbox,.jstree-default-responsive .jstree-checked>.jstree-checkbox:hover,.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover{background-position:0 -80px}.jstree-default-responsive .jstree-anchor>.jstree-undetermined,.jstree-default-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -120px}.jstree-default-responsive .jstree-anchor{font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}.jstree-default-responsive>.jstree-striped{background:0 0}.jstree-default-responsive .jstree-wholerow{border-top:1px solid rgba(255,255,255,.7);border-bottom:1px solid rgba(64,64,64,.2);background:#ebebeb;height:40px}.jstree-default-responsive .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default-responsive .jstree-wholerow-clicked{background:#beebff}.jstree-default-responsive .jstree-children .jstree-last>.jstree-wholerow{box-shadow:inset 0 -6px 3px -5px #666}.jstree-default-responsive .jstree-children .jstree-open>.jstree-wholerow{box-shadow:inset 0 6px 3px -5px #666;border-top:0}.jstree-default-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-default-responsive .jstree-checkbox,.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-node>.jstree-ocl,.jstree-default-responsive .jstree-themeicon{background-image:url(40px.png);background-size:120px 240px}.jstree-default-responsive .jstree-node{background-position:-80px 0;background-repeat:repeat-y}.jstree-default-responsive .jstree-last{background:0 0}.jstree-default-responsive .jstree-leaf>.jstree-ocl{background-position:-40px -120px}.jstree-default-responsive .jstree-last>.jstree-ocl{background-position:-40px -160px}.jstree-default-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-responsive .jstree-file{background:url(40px.png) 0 -160px no-repeat;background-size:120px 240px}.jstree-default-responsive .jstree-folder{background:url(40px.png) -40px -40px no-repeat;background-size:120px 240px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}}.gridster{position:relative;margin:auto;height:0}.gridster>ul{margin:0;list-style:none;padding:0}.gridster-item{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;list-style:none;z-index:2;position:absolute;display:none}.gridster-loaded{-webkit-transition:height .3s;-moz-transition:height .3s;-o-transition:height .3s;transition:height .3s}.gridster-loaded .gridster-item{display:block;position:absolute;-webkit-transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;-moz-transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;-o-transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;-webkit-transition-delay:50ms;-moz-transition-delay:50ms;-o-transition-delay:50ms;transition-delay:50ms}.gridster-loaded .gridster-preview-holder{display:none;z-index:1;position:absolute;background-color:#ddd;border-color:#fff;opacity:.2}.gridster-loaded .gridster-item.gridster-item-moving,.gridster-loaded .gridster-preview-holder{-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.gridster-mobile{height:auto!important}.gridster-mobile .gridster-item{height:auto;position:static;float:none}.gridster-item.ng-leave.ng-leave-active{opacity:0}.gridster-item.ng-enter{opacity:1}.gridster-item-moving{z-index:3}.gridster-item-resizable-handler{position:absolute;font-size:1px;display:block;z-index:5}.handle-se{cursor:se-resize;width:0;height:0;right:1px;bottom:1px;border-style:solid;border-width:0 0 12px 12px;border-color:transparent}.handle-ne{cursor:ne-resize;width:12px;height:12px;right:1px;top:1px}.handle-nw{cursor:nw-resize;width:12px;height:12px;left:1px;top:1px}.handle-sw{cursor:sw-resize;width:12px;height:12px;left:1px;bottom:1px}.handle-e{cursor:e-resize;width:12px;bottom:0;right:1px;top:0}.handle-s{cursor:s-resize;height:12px;right:0;bottom:1px;left:0}.handle-n{cursor:n-resize;height:12px;right:0;top:1px;left:0}.handle-w{cursor:w-resize;width:12px;left:1px;top:0;bottom:0}.gridster .gridster-item:hover .gridster-box{border:1.5px solid #b3b2b3}.gridster .gridster-item:hover .handle-se{border-color:transparent transparent #ccc}.widget-clock .digital{text-align:center}.widget-clock .time{font-family:Syncopate,sans-serif;font-size:2.5em;margin:0}.widget-clock .square{position:relative;width:100%;height:0;padding-bottom:100%}.widget-clock svg{position:absolute;width:100%;height:100%;left:0}.widget-clock .clock-face{stroke:#333;fill:#fff}.widget-clock .minor{stroke:#999;stroke-width:.5}.widget-clock .major{stroke:#333;stroke-width:1}.widget-clock .hour{stroke:#333}.widget-clock .minute{stroke:#666}.widget-clock .second{stroke:#1076ed}.widget-clock .second-counterweight{stroke:#1076ed;stroke-width:3}.widget-clock.dark .clock-face{fill:#111}.widget-clock.dark .hour{stroke:#666}.widget-clock.dark .minute{stroke:#999}*{box-sizing:border-box}@font-face{font-family:emoticons;src:url(../fonts/emoticons.eot?5zh0vu);src:url(../fonts/emoticons.eot?#iefix5zh0vu) format('embedded-opentype'),url(../fonts/emoticons.woff?5zh0vu) format('woff'),url(../fonts/emoticons.ttf?5zh0vu) format('truetype'),url(../fonts/emoticons.svg?5zh0vu#icomoon) format('svg');font-weight:400;font-style:normal}.ne-code{display:none}.ne-code{font-size:14px;padding:20px;font-family:Consolas,Menlo,Monaco,monospace;padding:1.5em}pre{position:relative;margin-bottom:24px;border-radius:2px;overflow:hidden}code.has-numbering{display:block;padding:12px 30px;overflow-y:auto;font-weight:300;font-family:Consolas,Menlo,Monaco,monospace;font-size:14px;line-height:20px}code.has-numbering{margin-left:36px}.pre-numbering{position:absolute;top:0;left:0;width:35px;padding:1.1em 5px 12px 0;border-right:1px solid #e8e8e8;border-radius:3px 0 0 3px;background-color:#eee;text-align:right;font-family:Consolas,Menlo,Monaco,monospace;font-size:14px;color:#aaa;line-height:20px;margin-top:-4px}.pre-numbering li{list-style-type:none}.ne-pdf iframe{width:420px;height:530px;display:block}.ne-pdf-icon{width:200px;height:150px;float:left;border-right:1px solid #eee}.ne-pdf-icon i{margin:29px 62px;color:#999;font-size:84px}.ne-pdf-view button{font-family:inherit;font-size:14px;background-color:transparent;border:1px solid #ccc;padding:6px 15px;border-radius:2px;color:#333;cursor:pointer;box-shadow:0 1px 1px 0 rgba(0,0,0,.26);outline:0;border-bottom:0;float:right;margin:80px 10px 0 10px;-webkit-transition:all .5s linear;-o-transition:all .5s linear;-moz-transition:all .5s linear;-ms-transition:all .5s linear;-kthtml-transition:all .5s linear;transition:all .5s linear}.ne-pdf-view button:hover{box-shadow:0 2px 2px 0 rgba(0,0,0,.26)}.ne-pdf-view button i{margin-right:6px}.ne-pdf-view button a{color:#333}.ne-pdf-viewer iframe{margin:0 auto}.ne-pdf-viewer{background-color:#3498db;position:relative}.ne-pdf-viewer i{position:absolute;right:10px;top:8px;color:#fff;font-size:25px;cursor:pointer}.ne-audio{background-color:#1d1d1d;border-radius:2px;padding-top:6px}.ne-audio audio{width:100%}.ne-pdf,.ne-video{padding:5px;border:1px solid #e4e4e4;border-radius:2px;margin:20px 0;box-shadow:0 1px 1px 0 rgba(0,0,0,.26);border-bottom:0;overflow:auto;-webkit-transition:all .5s linear;-o-transition:all .5s linear;-moz-transition:all .5s linear;-ms-transition:all .5s linear;-kthtml-transition:all .5s linear;transition:all .5s linear}.ne-embed{width:100%;padding:5px;border:1px solid #e4e4e4;border-radius:2px;margin:20px 0;box-shadow:0 1px 1px 0 rgba(0,0,0,.26);border-bottom:0;padding-bottom:1px}.ne-embed iframe{border:0;background-color:#3498db;background-image:url(../images/loader.svg);background-repeat:no-repeat;background-position:center;width:100%}.ne-plunker{background-color:#fff!important}.ne-video video{width:100%}.ne-video iframe{width:100%;border:0}.ne-video object{width:100%;border:0}.ne-audio iframe{width:100%;border:0}.ne-image:hover,.ne-video:hover{box-shadow:0 2px 2px 0 rgba(0,0,0,.26)}.ne-pdf-preview,.ne-video-preview{overflow:auto}.ne-video-preview img{display:block;width:200px;height:150px;border-radius:2px;background-color:#3498db}.ne-video-thumb{width:200px;float:left;cursor:pointer;color:rgba(255,255,255,.6)}.ne-video-thumb:hover{color:#fff}.ne-video-thumb i{position:absolute;font-size:42px;margin-top:-95px;margin-left:80px;cursor:pointer}.ne-pdf-detail,.ne-video-detail{width:calc(100% - 200px);float:left;padding-left:15px}.ne-pdf-title,.ne-video-title{font-weight:bolder;padding:5px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ne-video-desc{font-size:16px;color:#666;height:90px}.ne-stats{padding-top:7px;overflow:auto}.ne-video-stats span{padding:0 15px;float:right}.ne-video-stats span i{margin-right:10px}.ne-video-player{background-color:#3498db;background-image:url(../images/loader.svg);background-repeat:no-repeat;background-position:center}.ne-video-player iframe{width:100%}.ne-image{width:100%;border-radius:2px;border:1px solid #e4e4e4;min-height:250px;max-height:250px;overflow:hidden;cursor:pointer;padding-bottom:5px;-webkit-transition:all .5s linear;-o-transition:all .5s linear;-moz-transition:all .5s linear;-ms-transition:all .5s linear;-kthtml-transition:all .5s linear;transition:all .5s linear;box-shadow:0 1px 1px 0 rgba(0,0,0,.26);border-bottom:5px solid #fff;margin:10px 0}.ne-image-long{max-height:800px}.ne-image img,.ne-image-long img{width:100%;display:block;min-height:250px}.ne-image-wrapper{margin:5px;margin-bottom:0;background-color:#3498db;background-image:url(../images/loader.svg);background-repeat:no-repeat;background-position:center;height:100%;overflow:hidden}.ne-gist body{margin:0!important}.emoticons-image,.emoticons-image-wrapper{width:100%}.emoticons-image{padding:5px;border-radius:2px;border:1px solid #f2f2f2;display:block;margin:20px 0}.ne-emoticon{font-family:emoticons;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;display:inline-block;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.emoticon{text-indent:-9999px;display:inline-block;height:22px;width:22px;vertical-align:middle}@media all and (-webkit-min-device-pixel-ratio :1),all and (min--moz-device-pixel-ratio :1),all and (-o-min-device-pixel-ratio :1),all and (min-device-pixel-ratio :1),all and (min-resolution :96dpi){.emoticon{background:transparent url(../images/emojis.png) 0 0 no-repeat}}@media all and (-webkit-min-device-pixel-ratio :1.5),all and (-o-min-device-pixel-ratio :3/2),all and (min-device-pixel-ratio :1.5),all and (min-resolution :144dpi){.emoticon{background:transparent url(../images/emojis@2x.png) 0 0 no-repeat;background-size:27776px 22px}}@-moz-document url-prefix(){.emoticon{background:transparent url(../images/emojis.png) 0 0 no-repeat}}.emoticon-bowtie{background-position:-5px 0}.emoticon-smile{background-position:-37px 0}.emoticon-laughing{background-position:-69px 0}.emoticon-blush{background-position:-101px 0}.emoticon-smiley{background-position:-133px 0}.emoticon-relaxed{background-position:-165px 0}.emoticon-smirk{background-position:-197px 0}.emoticon-heart_eyes{background-position:-229px 0}.emoticon-kissing_heart{background-position:-261px 0}.emoticon-kissing_closed_eyes{background-position:-293px 0}.emoticon-flushed{background-position:-325px 0}.emoticon-relieved{background-position:-357px 0}.emoticon-satisfied{background-position:-389px 0}.emoticon-grin{background-position:-421px 0}.emoticon-wink{background-position:-453px 0}.emoticon-stuck_out_tongue_winking_eye{background-position:-485px 0}.emoticon-winky_face{background-position:-485px 0}.emoticon-stuck_out_tongue_closed_eyes{background-position:-517px 0}.emoticon-grinning{background-position:-549px 0}.emoticon-kissing{background-position:-581px 0}.emoticon-kissing_smiling_eyes{background-position:-613px 0}.emoticon-stuck_out_tongue{background-position:-645px 0}.emoticon-sleeping{background-position:-677px 0}.emoticon-worried{background-position:-709px 0}.emoticon-frowning{background-position:-741px 0}.emoticon-anguished{background-position:-773px 0}.emoticon-open_mouth{background-position:-805px 0}.emoticon-wow{background-position:-805px 0}.emoticon-grimacing{background-position:-837px 0}.emoticon-confused{background-position:-869px 0}.emoticon-hushed{background-position:-901px 0}.emoticon-expressionless{background-position:-933px 0}.emoticon-unamused{background-position:-965px 0}.emoticon-sweat_smile{background-position:-997px 0}.emoticon-sweat{background-position:-1029px 0}.emoticon-disappointed_relieved{background-position:-1061px 0}.emoticon-weary{background-position:-1093px 0}.emoticon-pensive{background-position:-1125px 0}.emoticon-disappointed{background-position:-1157px 0}.emoticon-confounded{background-position:-1189px 0}.emoticon-fearful{background-position:-1221px 0}.emoticon-cold_sweat{background-position:-1253px 0}.emoticon-persevere{background-position:-1285px 0}.emoticon-cry{background-position:-1317px 0}.emoticon-sob{background-position:-1349px 0}.emoticon-joy{background-position:-1381px 0}.emoticon-astonished{background-position:-1413px 0}.emoticon-scream{background-position:-1445px 0}.emoticon-neckbeard{background-position:-1477px 0}.emoticon-tired_face{background-position:-1509px 0}.emoticon-angry{background-position:-1541px 0}.emoticon-rage{background-position:-1573px 0}.emoticon-triumph{background-position:-1605px 0}.emoticon-sleepy{background-position:-1637px 0}.emoticon-yum{background-position:-1669px 0}.emoticon-mask{background-position:-1701px 0}.emoticon-sunglasses{background-position:-1733px 0}.emoticon-dizzy_face{background-position:-1765px 0}.emoticon-imp{background-position:-1797px 0}.emoticon-smiling_imp{background-position:-1829px 0}.emoticon-neutral_face{background-position:-1861px 0}.emoticon-no_mouth{background-position:-1893px 0}.emoticon-innocent{background-position:-1925px 0}.emoticon-alien{background-position:-1957px 0}.emoticon-yellow_heart{background-position:-1989px 0}.emoticon-blue_heart{background-position:-2021px 0}.emoticon-purple_heart{background-position:-2053px 0}.emoticon-heart{background-position:-2085px 0}.emoticon-green_heart{background-position:-2117px 0}.emoticon-broken_heart{background-position:-2149px 0}.emoticon-heartbeat{background-position:-2181px 0}.emoticon-heartpulse{background-position:-2213px 0}.emoticon-two_hearts{background-position:-2245px 0}.emoticon-revolving_hearts{background-position:-2277px 0}.emoticon-cupid{background-position:-2309px 0}.emoticon-sparkling_heart{background-position:-2341px 0}.emoticon-sparkles{background-position:-2373px 0}.emoticon-star{background-position:-2405px 0}.emoticon-star2{background-position:-2437px 0}.emoticon-dizzy{background-position:-2469px 0}.emoticon-boom{background-position:-2501px 0}.emoticon-collision{background-position:-2533px 0}.emoticon-anger{background-position:-2565px 0}.emoticon-exclamation{background-position:-2597px 0}.emoticon-question{background-position:-2629px 0}.emoticon-grey_exclamation{background-position:-2661px 0}.emoticon-grey_question{background-position:-2693px 0}.emoticon-zzz{background-position:-2725px 0}.emoticon-dash{background-position:-2757px 0}.emoticon-sweat_drops{background-position:-2789px 0}.emoticon-notes{background-position:-2821px 0}.emoticon-musical_note{background-position:-2853px 0}.emoticon-fire{background-position:-2885px 0}.emoticon-hankey{background-position:-2917px 0}.emoticon-poop{background-position:-2949px 0}.emoticon-shit{background-position:-2981px 0}.emoticon-\+1{background-position:-3013px 0}.emoticon-thumbsup{background-position:-3045px 0}.emoticon-\-1{background-position:-3077px 0}.emoticon-thumbsdown{background-position:-3109px 0}.emoticon-ok_hand{background-position:-3141px 0}.emoticon-punch{background-position:-3173px 0}.emoticon-facepunch{background-position:-3205px 0}.emoticon-fist{background-position:-3237px 0}.emoticon-v{background-position:-3269px 0}.emoticon-wave{background-position:-3301px 0}.emoticon-hand{background-position:-3333px 0}.emoticon-raised_hand{background-position:-3365px 0}.emoticon-open_hands{background-position:-3397px 0}.emoticon-point_up{background-position:-3429px 0}.emoticon-point_down{background-position:-3461px 0}.emoticon-point_left{background-position:-3493px 0}.emoticon-point_right{background-position:-3525px 0}.emoticon-raised_hands{background-position:-3557px 0}.emoticon-pray{background-position:-3589px 0}.emoticon-point_up_2{background-position:-3621px 0}.emoticon-clap{background-position:-3653px 0}.emoticon-muscle{background-position:-3685px 0}.emoticon-metal{background-position:-3717px 0}.emoticon-fu{background-position:-3749px 0}.emoticon-walking{background-position:-3781px 0}.emoticon-runner{background-position:-3813px 0}.emoticon-running{background-position:-3845px 0}.emoticon-couple{background-position:-3877px 0}.emoticon-family{background-position:-3909px 0}.emoticon-two_men_holding_hands{background-position:-3941px 0}.emoticon-two_women_holding_hands{background-position:-3973px 0}.emoticon-dancer{background-position:-4005px 0}.emoticon-dancers{background-position:-4037px 0}.emoticon-ok_woman{background-position:-4069px 0}.emoticon-no_good{background-position:-4101px 0}.emoticon-information_desk_person{background-position:-4133px 0}.emoticon-raising_hand{background-position:-4165px 0}.emoticon-bride_with_veil{background-position:-4197px 0}.emoticon-person_with_pouting_face{background-position:-4229px 0}.emoticon-person_frowning{background-position:-4261px 0}.emoticon-bow{background-position:-4293px 0}.emoticon-couplekiss{background-position:-4325px 0}.emoticon-couple_with_heart{background-position:-4357px 0}.emoticon-massage{background-position:-4389px 0}.emoticon-haircut{background-position:-4421px 0}.emoticon-nail_care{background-position:-4453px 0}.emoticon-boy{background-position:-4485px 0}.emoticon-girl{background-position:-4517px 0}.emoticon-woman{background-position:-4549px 0}.emoticon-man{background-position:-4581px 0}.emoticon-baby{background-position:-4613px 0}.emoticon-older_woman{background-position:-4645px 0}.emoticon-older_man{background-position:-4677px 0}.emoticon-person_with_blond_hair{background-position:-4709px 0}.emoticon-man_with_gua_pi_mao{background-position:-4741px 0}.emoticon-man_with_turban{background-position:-4773px 0}.emoticon-construction_worker{background-position:-4805px 0}.emoticon-cop{background-position:-4837px 0}.emoticon-angel{background-position:-4869px 0}.emoticon-princess{background-position:-4901px 0}.emoticon-emoticon_cat{background-position:-4933px 0}.emoticon-smile_cat{background-position:-4965px 0}.emoticon-heart_eyes_cat{background-position:-4997px 0}.emoticon-kissing_cat{background-position:-5029px 0}.emoticon-smirk_cat{background-position:-5061px 0}.emoticon-scream_cat{background-position:-5093px 0}.emoticon-crying_cat_face{background-position:-5125px 0}.emoticon-joy_cat{background-position:-5157px 0}.emoticon-pouting_cat{background-position:-5189px 0}.emoticon-japanese_ogre{background-position:-5221px 0}.emoticon-japanese_goblin{background-position:-5253px 0}.emoticon-see_no_evil{background-position:-5285px 0}.emoticon-hear_no_evil{background-position:-5317px 0}.emoticon-speak_no_evil{background-position:-5349px 0}.emoticon-guardsman{background-position:-5381px 0}.emoticon-skull{background-position:-5413px 0}.emoticon-feet{background-position:-5445px 0}.emoticon-lips{background-position:-5477px 0}.emoticon-kiss{background-position:-5509px 0}.emoticon-droplet{background-position:-5541px 0}.emoticon-ear{background-position:-5573px 0}.emoticon-eyes{background-position:-5605px 0}.emoticon-nose{background-position:-5637px 0}.emoticon-tongue{background-position:-5669px 0}.emoticon-love_letter{background-position:-5701px 0}.emoticon-bust_in_silhouette{background-position:-5733px 0}.emoticon-busts_in_silhouette{background-position:-5765px 0}.emoticon-speech_balloon{background-position:-5797px 0}.emoticon-thought_balloon{background-position:-5829px 0}.emoticon-feelsgood{background-position:-5861px 0}.emoticon-finnadie{background-position:-5893px 0}.emoticon-goberserk{background-position:-5925px 0}.emoticon-godmode{background-position:-5957px 0}.emoticon-hurtrealbad{background-position:-5989px 0}.emoticon-rage1{background-position:-6021px 0}.emoticon-rage2{background-position:-6053px 0}.emoticon-rage3{background-position:-6085px 0}.emoticon-rage4{background-position:-6117px 0}.emoticon-suspect{background-position:-6149px 0}.emoticon-trollface{background-position:-6181px 0}.emoticon-sunny{background-position:-6213px 0}.emoticon-umbrella{background-position:-6245px 0}.emoticon-cloud{background-position:-6277px 0}.emoticon-snowflake{background-position:-6309px 0}.emoticon-snowman{background-position:-6341px 0}.emoticon-zap{background-position:-6373px 0}.emoticon-cyclone{background-position:-6405px 0}.emoticon-foggy{background-position:-6437px 0}.emoticon-ocean{background-position:-6469px 0}.emoticon-cat{background-position:-6501px 0}.emoticon-dog{background-position:-6533px 0}.emoticon-mouse{background-position:-6565px 0}.emoticon-hamster{background-position:-6597px 0}.emoticon-rabbit{background-position:-6629px 0}.emoticon-wolf{background-position:-6661px 0}.emoticon-frog{background-position:-6693px 0}.emoticon-tiger{background-position:-6725px 0}.emoticon-koala{background-position:-6757px 0}.emoticon-bear{background-position:-6789px 0}.emoticon-pig{background-position:-6821px 0}.emoticon-pig_nose{background-position:-6853px 0}.emoticon-cow{background-position:-6885px 0}.emoticon-boar{background-position:-6917px 0}.emoticon-monkey_face{background-position:-6949px 0}.emoticon-monkey{background-position:-6981px 0}.emoticon-horse{background-position:-7013px 0}.emoticon-racehorse{background-position:-7045px 0}.emoticon-camel{background-position:-7077px 0}.emoticon-sheep{background-position:-7109px 0}.emoticon-elephant{background-position:-7141px 0}.emoticon-panda_face{background-position:-7173px 0}.emoticon-snake{background-position:-7205px 0}.emoticon-bird{background-position:-7237px 0}.emoticon-baby_chick{background-position:-7269px 0}.emoticon-hatched_chick{background-position:-7301px 0}.emoticon-hatching_chick{background-position:-7333px 0}.emoticon-chicken{background-position:-7365px 0}.emoticon-penguin{background-position:-7397px 0}.emoticon-turtle{background-position:-7429px 0}.emoticon-bug{background-position:-7461px 0}.emoticon-honeybee{background-position:-7493px 0}.emoticon-ant{background-position:-7525px 0}.emoticon-beetle{background-position:-7557px 0}.emoticon-snail{background-position:-7589px 0}.emoticon-octopus{background-position:-7621px 0}.emoticon-tropical_fish{background-position:-7653px 0}.emoticon-fish{background-position:-7685px 0}.emoticon-whale{background-position:-7717px 0}.emoticon-whale2{background-position:-7749px 0}.emoticon-dolphin{background-position:-7781px 0}.emoticon-cow2{background-position:-7813px 0}.emoticon-ram{background-position:-7845px 0}.emoticon-rat{background-position:-7877px 0}.emoticon-water_buffalo{background-position:-7909px 0}.emoticon-tiger2{background-position:-7941px 0}.emoticon-rabbit2{background-position:-7973px 0}.emoticon-dragon{background-position:-8005px 0}.emoticon-goat{background-position:-8037px 0}.emoticon-rooster{background-position:-8069px 0}.emoticon-dog2{background-position:-8101px 0}.emoticon-pig2{background-position:-8133px 0}.emoticon-mouse2{background-position:-8165px 0}.emoticon-ox{background-position:-8197px 0}.emoticon-dragon_face{background-position:-8229px 0}.emoticon-blowfish{background-position:-8261px 0}.emoticon-crocodile{background-position:-8293px 0}.emoticon-dromedary_camel{background-position:-8325px 0}.emoticon-leopard{background-position:-8357px 0}.emoticon-cat2{background-position:-8389px 0}.emoticon-poodle{background-position:-8421px 0}.emoticon-paw_prints{background-position:-8453px 0}.emoticon-bouquet{background-position:-8485px 0}.emoticon-cherry_blossom{background-position:-8517px 0}.emoticon-tulip{background-position:-8549px 0}.emoticon-four_leaf_clover{background-position:-8581px 0}.emoticon-rose{background-position:-8613px 0}.emoticon-sunflower{background-position:-8645px 0}.emoticon-hibiscus{background-position:-8677px 0}.emoticon-maple_leaf{background-position:-8709px 0}.emoticon-leaves{background-position:-8741px 0}.emoticon-fallen_leaf{background-position:-8773px 0}.emoticon-herb{background-position:-8805px 0}.emoticon-mushroom{background-position:-8837px 0}.emoticon-cactus{background-position:-8869px 0}.emoticon-palm_tree{background-position:-8901px 0}.emoticon-evergreen_tree{background-position:-8933px 0}.emoticon-deciduous_tree{background-position:-8965px 0}.emoticon-chestnut{background-position:-8997px 0}.emoticon-seedling{background-position:-9029px 0}.emoticon-blossom{background-position:-9061px 0}.emoticon-ear_of_rice{background-position:-9093px 0}.emoticon-shell{background-position:-9125px 0}.emoticon-globe_with_meridians{background-position:-9157px 0}.emoticon-sun_with_face{background-position:-9189px 0}.emoticon-full_moon_with_face{background-position:-9221px 0}.emoticon-new_moon_with_face{background-position:-9253px 0}.emoticon-new_moon{background-position:-9285px 0}.emoticon-waxing_crescent_moon{background-position:-9317px 0}.emoticon-first_quarter_moon{background-position:-9349px 0}.emoticon-waxing_gibbous_moon{background-position:-9381px 0}.emoticon-full_moon{background-position:-9413px 0}.emoticon-waning_gibbous_moon{background-position:-9445px 0}.emoticon-last_quarter_moon{background-position:-9477px 0}.emoticon-waning_crescent_moon{background-position:-9509px 0}.emoticon-last_quarter_moon_with_face{background-position:-9541px 0}.emoticon-first_quarter_moon_with_face{background-position:-9573px 0}.emoticon-moon{background-position:-9605px 0}.emoticon-earth_africa{background-position:-9637px 0}.emoticon-earth_americas{background-position:-9669px 0}.emoticon-earth_asia{background-position:-9701px 0}.emoticon-volcano{background-position:-9733px 0}.emoticon-milky_way{background-position:-9765px 0}.emoticon-partly_sunny{background-position:-9797px 0}.emoticon-octocat{background-position:-9829px 0}.emoticon-squirrel{background-position:-9861px 0}.emoticon-bamboo{background-position:-9893px 0}.emoticon-gift_heart{background-position:-9925px 0}.emoticon-dolls{background-position:-9957px 0}.emoticon-school_satchel{background-position:-9989px 0}.emoticon-mortar_board{background-position:-10021px 0}.emoticon-flags{background-position:-10053px 0}.emoticon-fireworks{background-position:-10085px 0}.emoticon-sparkler{background-position:-10117px 0}.emoticon-wind_chime{background-position:-10149px 0}.emoticon-rice_scene{background-position:-10181px 0}.emoticon-jack_o_lantern{background-position:-10213px 0}.emoticon-ghost{background-position:-10245px 0}.emoticon-santa{background-position:-10277px 0}.emoticon-christmas_tree{background-position:-10309px 0}.emoticon-gift{background-position:-10341px 0}.emoticon-bell{background-position:-10373px 0}.emoticon-no_bell{background-position:-10405px 0}.emoticon-tanabata_tree{background-position:-10437px 0}.emoticon-tada{background-position:-10469px 0}.emoticon-confetti_ball{background-position:-10501px 0}.emoticon-balloon{background-position:-10533px 0}.emoticon-crystal_ball{background-position:-10565px 0}.emoticon-cd{background-position:-10597px 0}.emoticon-dvd{background-position:-10629px 0}.emoticon-floppy_disk{background-position:-10661px 0}.emoticon-camera{background-position:-10693px 0}.emoticon-video_camera{background-position:-10725px 0}.emoticon-movie_camera{background-position:-10757px 0}.emoticon-computer{background-position:-10789px 0}.emoticon-tv{background-position:-10821px 0}.emoticon-iphone{background-position:-10853px 0}.emoticon-phone{background-position:-10885px 0}.emoticon-telephone{background-position:-10917px 0}.emoticon-telephone_receiver{background-position:-10949px 0}.emoticon-pager{background-position:-10981px 0}.emoticon-fax{background-position:-11013px 0}.emoticon-minidisc{background-position:-11045px 0}.emoticon-vhs{background-position:-11077px 0}.emoticon-sound{background-position:-11109px 0}.emoticon-speaker{background-position:-11141px 0}.emoticon-mute{background-position:-11173px 0}.emoticon-loudspeaker{background-position:-11205px 0}.emoticon-mega{background-position:-11237px 0}.emoticon-hourglass{background-position:-11269px 0}.emoticon-hourglass_flowing_sand{background-position:-11301px 0}.emoticon-alarm_clock{background-position:-11333px 0}.emoticon-watch{background-position:-11365px 0}.emoticon-radio{background-position:-11397px 0}.emoticon-satellite{background-position:-11429px 0}.emoticon-loop{background-position:-11461px 0}.emoticon-mag{background-position:-11493px 0}.emoticon-mag_right{background-position:-11525px 0}.emoticon-unlock{background-position:-11557px 0}.emoticon-lock{background-position:-11589px 0}.emoticon-lock_with_ink_pen{background-position:-11621px 0}.emoticon-closed_lock_with_key{background-position:-11653px 0}.emoticon-key{background-position:-11685px 0}.emoticon-bulb{background-position:-11717px 0}.emoticon-flashlight{background-position:-11749px 0}.emoticon-high_brightness{background-position:-11781px 0}.emoticon-low_brightness{background-position:-11813px 0}.emoticon-electric_plug{background-position:-11845px 0}.emoticon-battery{background-position:-11877px 0}.emoticon-calling{background-position:-11909px 0}.emoticon-email{background-position:-11941px 0}.emoticon-mailbox{background-position:-11973px 0}.emoticon-postbox{background-position:-12005px 0}.emoticon-bath{background-position:-12037px 0}.emoticon-bathtub{background-position:-12069px 0}.emoticon-shower{background-position:-12101px 0}.emoticon-toilet{background-position:-12133px 0}.emoticon-wrench{background-position:-12165px 0}.emoticon-nut_and_bolt{background-position:-12197px 0}.emoticon-hammer{background-position:-12229px 0}.emoticon-seat{background-position:-12261px 0}.emoticon-moneybag{background-position:-12293px 0}.emoticon-yen{background-position:-12325px 0}.emoticon-dollar{background-position:-12357px 0}.emoticon-pound{background-position:-12389px 0}.emoticon-euro{background-position:-12421px 0}.emoticon-credit_card{background-position:-12453px 0}.emoticon-money_with_wings{background-position:-12485px 0}.emoticon-e\-mail{background-position:-12517px 0}.emoticon-inbox_tray{background-position:-12549px 0}.emoticon-outbox_tray{background-position:-12581px 0}.emoticon-envelope{background-position:-12613px 0}.emoticon-incoming_envelope{background-position:-12645px 0}.emoticon-postal_horn{background-position:-12677px 0}.emoticon-mailbox_closed{background-position:-12709px 0}.emoticon-mailbox_with_mail{background-position:-12741px 0}.emoticon-mailbox_with_no_mail{background-position:-12773px 0}.emoticon-door{background-position:-12805px 0}.emoticon-smoking{background-position:-12837px 0}.emoticon-bomb{background-position:-12869px 0}.emoticon-gun{background-position:-12901px 0}.emoticon-hocho{background-position:-12933px 0}.emoticon-pill{background-position:-12965px 0}.emoticon-syringe{background-position:-12997px 0}.emoticon-page_facing_up{background-position:-13029px 0}.emoticon-page_with_curl{background-position:-13061px 0}.emoticon-bookmark_tabs{background-position:-13093px 0}.emoticon-bar_chart{background-position:-13125px 0}.emoticon-chart_with_upwards_trend{background-position:-13157px 0}.emoticon-chart_with_downwards_trend{background-position:-13189px 0}.emoticon-scroll{background-position:-13221px 0}.emoticon-clipboard{background-position:-13253px 0}.emoticon-calendar{background-position:-13285px 0}.emoticon-date{background-position:-13317px 0}.emoticon-card_index{background-position:-13349px 0}.emoticon-file_folder{background-position:-13381px 0}.emoticon-open_file_folder{background-position:-13413px 0}.emoticon-scissors{background-position:-13445px 0}.emoticon-pushpin{background-position:-13477px 0}.emoticon-paperclip{background-position:-13509px 0}.emoticon-black_nib{background-position:-13541px 0}.emoticon-pencil2{background-position:-13573px 0}.emoticon-straight_ruler{background-position:-13605px 0}.emoticon-triangular_ruler{background-position:-13637px 0}.emoticon-closed_book{background-position:-13669px 0}.emoticon-green_book{background-position:-13701px 0}.emoticon-blue_book{background-position:-13733px 0}.emoticon-orange_book{background-position:-13765px 0}.emoticon-notebook{background-position:-13797px 0}.emoticon-notebook_with_decorative_cover{background-position:-13829px 0}.emoticon-ledger{background-position:-13861px 0}.emoticon-books{background-position:-13893px 0}.emoticon-bookmark{background-position:-13925px 0}.emoticon-name_badge{background-position:-13957px 0}.emoticon-microscope{background-position:-13989px 0}.emoticon-telescope{background-position:-14021px 0}.emoticon-newspaper{background-position:-14053px 0}.emoticon-football{background-position:-14085px 0}.emoticon-basketball{background-position:-14117px 0}.emoticon-soccer{background-position:-14149px 0}.emoticon-baseball{background-position:-14181px 0}.emoticon-tennis{background-position:-14213px 0}.emoticon-8ball{background-position:-14245px 0}.emoticon-rugby_football{background-position:-14277px 0}.emoticon-bowling{background-position:-14309px 0}.emoticon-golf{background-position:-14341px 0}.emoticon-mountain_bicyclist{background-position:-14373px 0}.emoticon-bicyclist{background-position:-14405px 0}.emoticon-horse_racing{background-position:-14437px 0}.emoticon-snowboarder{background-position:-14469px 0}.emoticon-swimmer{background-position:-14501px 0}.emoticon-surfer{background-position:-14533px 0}.emoticon-ski{background-position:-14565px 0}.emoticon-spades{background-position:-14597px 0}.emoticon-hearts{background-position:-14629px 0}.emoticon-clubs{background-position:-14661px 0}.emoticon-diamonds{background-position:-14693px 0}.emoticon-gem{background-position:-14725px 0}.emoticon-ring{background-position:-14757px 0}.emoticon-trophy{background-position:-14789px 0}.emoticon-musical_score{background-position:-14821px 0}.emoticon-musical_keyboard{background-position:-14853px 0}.emoticon-violin{background-position:-14885px 0}.emoticon-space_invader{background-position:-14917px 0}.emoticon-video_game{background-position:-14949px 0}.emoticon-black_joker{background-position:-14981px 0}.emoticon-flower_playing_cards{background-position:-15013px 0}.emoticon-game_die{background-position:-15045px 0}.emoticon-dart{background-position:-15077px 0}.emoticon-mahjong{background-position:-15109px 0}.emoticon-clapper{background-position:-15141px 0}.emoticon-memo{background-position:-15173px 0}.emoticon-pencil{background-position:-15205px 0}.emoticon-book{background-position:-15237px 0}.emoticon-art{background-position:-15269px 0}.emoticon-microphone{background-position:-15301px 0}.emoticon-headphones{background-position:-15333px 0}.emoticon-trumpet{background-position:-15365px 0}.emoticon-saxophone{background-position:-15397px 0}.emoticon-guitar{background-position:-15429px 0}.emoticon-shoe{background-position:-15461px 0}.emoticon-sandal{background-position:-15493px 0}.emoticon-high_heel{background-position:-15525px 0}.emoticon-lipstick{background-position:-15557px 0}.emoticon-boot{background-position:-15589px 0}.emoticon-shirt{background-position:-15621px 0}.emoticon-tshirt{background-position:-15653px 0}.emoticon-necktie{background-position:-15685px 0}.emoticon-womans_clothes{background-position:-15717px 0}.emoticon-dress{background-position:-15749px 0}.emoticon-running_shirt_with_sash{background-position:-15781px 0}.emoticon-jeans{background-position:-15813px 0}.emoticon-kimono{background-position:-15845px 0}.emoticon-bikini{background-position:-15877px 0}.emoticon-ribbon{background-position:-15909px 0}.emoticon-tophat{background-position:-15941px 0}.emoticon-crown{background-position:-15973px 0}.emoticon-womans_hat{background-position:-16005px 0}.emoticon-mans_shoe{background-position:-16037px 0}.emoticon-closed_umbrella{background-position:-16069px 0}.emoticon-briefcase{background-position:-16101px 0}.emoticon-handbag{background-position:-16133px 0}.emoticon-pouch{background-position:-16165px 0}.emoticon-purse{background-position:-16197px 0}.emoticon-eyeglasses{background-position:-16229px 0}.emoticon-fishing_pole_and_fish{background-position:-16261px 0}.emoticon-coffee{background-position:-16293px 0}.emoticon-tea{background-position:-16325px 0}.emoticon-sake{background-position:-16357px 0}.emoticon-baby_bottle{background-position:-16389px 0}.emoticon-beer{background-position:-16421px 0}.emoticon-beers{background-position:-16453px 0}.emoticon-cocktail{background-position:-16485px 0}.emoticon-tropical_drink{background-position:-16517px 0}.emoticon-wine_glass{background-position:-16549px 0}.emoticon-fork_and_knife{background-position:-16581px 0}.emoticon-pizza{background-position:-16613px 0}.emoticon-hamburger{background-position:-16645px 0}.emoticon-fries{background-position:-16677px 0}.emoticon-poultry_leg{background-position:-16709px 0}.emoticon-meat_on_bone{background-position:-16741px 0}.emoticon-spaghetti{background-position:-16773px 0}.emoticon-curry{background-position:-16805px 0}.emoticon-fried_shrimp{background-position:-16837px 0}.emoticon-bento{background-position:-16869px 0}.emoticon-sushi{background-position:-16901px 0}.emoticon-fish_cake{background-position:-16933px 0}.emoticon-rice_ball{background-position:-16965px 0}.emoticon-rice_cracker{background-position:-16997px 0}.emoticon-rice{background-position:-17029px 0}.emoticon-ramen{background-position:-17061px 0}.emoticon-stew{background-position:-17093px 0}.emoticon-oden{background-position:-17125px 0}.emoticon-dango{background-position:-17157px 0}.emoticon-egg{background-position:-17189px 0}.emoticon-bread{background-position:-17221px 0}.emoticon-doughnut{background-position:-17253px 0}.emoticon-custard{background-position:-17285px 0}.emoticon-icecream{background-position:-17317px 0}.emoticon-ice_cream{background-position:-17349px 0}.emoticon-shaved_ice{background-position:-17381px 0}.emoticon-birthday{background-position:-17413px 0}.emoticon-cake{background-position:-17445px 0}.emoticon-cookie{background-position:-17477px 0}.emoticon-chocolate_bar{background-position:-17509px 0}.emoticon-candy{background-position:-17541px 0}.emoticon-lollipop{background-position:-17573px 0}.emoticon-honey_pot{background-position:-17605px 0}.emoticon-apple{background-position:-17637px 0}.emoticon-green_apple{background-position:-17669px 0}.emoticon-tangerine{background-position:-17701px 0}.emoticon-lemon{background-position:-17733px 0}.emoticon-cherries{background-position:-17765px 0}.emoticon-grapes{background-position:-17797px 0}.emoticon-watermelon{background-position:-17829px 0}.emoticon-strawberry{background-position:-17861px 0}.emoticon-peach{background-position:-17893px 0}.emoticon-melon{background-position:-17925px 0}.emoticon-banana{background-position:-17957px 0}.emoticon-pear{background-position:-17989px 0}.emoticon-pineapple{background-position:-18021px 0}.emoticon-sweet_potato{background-position:-18053px 0}.emoticon-eggplant{background-position:-18085px 0}.emoticon-tomato{background-position:-18117px 0}.emoticon-corn{background-position:-18149px 0}.emoticon-house{background-position:-18181px 0}.emoticon-house_with_garden{background-position:-18213px 0}.emoticon-school{background-position:-18245px 0}.emoticon-office{background-position:-18277px 0}.emoticon-post_office{background-position:-18309px 0}.emoticon-hospital{background-position:-18341px 0}.emoticon-bank{background-position:-18373px 0}.emoticon-convenience_store{background-position:-18405px 0}.emoticon-love_hotel{background-position:-18437px 0}.emoticon-hotel{background-position:-18469px 0}.emoticon-wedding{background-position:-18501px 0}.emoticon-church{background-position:-18533px 0}.emoticon-department_store{background-position:-18565px 0}.emoticon-european_post_office{background-position:-18597px 0}.emoticon-city_sunrise{background-position:-18629px 0}.emoticon-city_sunset{background-position:-18661px 0}.emoticon-japanese_castle{background-position:-18693px 0}.emoticon-european_castle{background-position:-18725px 0}.emoticon-tent{background-position:-18757px 0}.emoticon-factory{background-position:-18789px 0}.emoticon-tokyo_tower{background-position:-18821px 0}.emoticon-japan{background-position:-18853px 0}.emoticon-mount_fuji{background-position:-18885px 0}.emoticon-sunrise_over_mountains{background-position:-18917px 0}.emoticon-sunrise{background-position:-18949px 0}.emoticon-stars{background-position:-18981px 0}.emoticon-themoreyouknow{background-position:-18981px 0}.emoticon-tmyk{background-position:-18981px 0}.emoticon-statue_of_liberty{background-position:-19013px 0}.emoticon-bridge_at_night{background-position:-19045px 0}.emoticon-carousel_horse{background-position:-19077px 0}.emoticon-rainbow{background-position:-19109px 0}.emoticon-ferris_wheel{background-position:-19141px 0}.emoticon-fountain{background-position:-19173px 0}.emoticon-roller_coaster{background-position:-19205px 0}.emoticon-ship{background-position:-19237px 0}.emoticon-speedboat{background-position:-19269px 0}.emoticon-boat{background-position:-19301px 0}.emoticon-sailboat{background-position:-19333px 0}.emoticon-rowboat{background-position:-19365px 0}.emoticon-anchor{background-position:-19397px 0}.emoticon-rocket{background-position:-19429px 0}.emoticon-airplane{background-position:-19461px 0}.emoticon-helicopter{background-position:-19493px 0}.emoticon-steam_locomotive{background-position:-19525px 0}.emoticon-tram{background-position:-19557px 0}.emoticon-mountain_railway{background-position:-19589px 0}.emoticon-bike{background-position:-19621px 0}.emoticon-aerial_tramway{background-position:-19653px 0}.emoticon-suspension_railway{background-position:-19685px 0}.emoticon-mountain_cableway{background-position:-19717px 0}.emoticon-tractor{background-position:-19749px 0}.emoticon-blue_car{background-position:-19781px 0}.emoticon-oncoming_automobile{background-position:-19813px 0}.emoticon-car{background-position:-19845px 0}.emoticon-red_car{background-position:-19877px 0}.emoticon-taxi{background-position:-19909px 0}.emoticon-oncoming_taxi{background-position:-19941px 0}.emoticon-articulated_lorry{background-position:-19973px 0}.emoticon-bus{background-position:-20005px 0}.emoticon-oncoming_bus{background-position:-20037px 0}.emoticon-rotating_light{background-position:-20069px 0}.emoticon-police_car{background-position:-20101px 0}.emoticon-oncoming_police_car{background-position:-20133px 0}.emoticon-fire_engine{background-position:-20165px 0}.emoticon-ambulance{background-position:-20197px 0}.emoticon-minibus{background-position:-20229px 0}.emoticon-truck{background-position:-20261px 0}.emoticon-train{background-position:-20293px 0}.emoticon-station{background-position:-20325px 0}.emoticon-train2{background-position:-20357px 0}.emoticon-bullettrain_front{background-position:-20389px 0}.emoticon-bullettrain_side{background-position:-20421px 0}.emoticon-light_rail{background-position:-20453px 0}.emoticon-monorail{background-position:-20485px 0}.emoticon-railway_car{background-position:-20517px 0}.emoticon-trolleybus{background-position:-20549px 0}.emoticon-ticket{background-position:-20581px 0}.emoticon-fuelpump{background-position:-20613px 0}.emoticon-vertical_traffic_light{background-position:-20645px 0}.emoticon-traffic_light{background-position:-20677px 0}.emoticon-warning{background-position:-20709px 0}.emoticon-construction{background-position:-20741px 0}.emoticon-beginner{background-position:-20773px 0}.emoticon-atm{background-position:-20805px 0}.emoticon-slot_machine{background-position:-20837px 0}.emoticon-busstop{background-position:-20869px 0}.emoticon-barber{background-position:-20901px 0}.emoticon-hotsprings{background-position:-20933px 0}.emoticon-checkered_flag{background-position:-20965px 0}.emoticon-crossed_flags{background-position:-20997px 0}.emoticon-izakaya_lantern{background-position:-21029px 0}.emoticon-moyai{background-position:-21061px 0}.emoticon-circus_tent{background-position:-21093px 0}.emoticon-performing_arts{background-position:-21125px 0}.emoticon-round_pushpin{background-position:-21157px 0}.emoticon-triangular_flag_on_post{background-position:-21189px 0}.emoticon-jp{background-position:-21221px 0}.emoticon-kr{background-position:-21253px 0}.emoticon-cn{background-position:-21285px 0}.emoticon-us{background-position:-21317px 0}.emoticon-fr{background-position:-21349px 0}.emoticon-es{background-position:-21381px 0}.emoticon-it{background-position:-21413px 0}.emoticon-ru{background-position:-21445px 0}.emoticon-gb{background-position:-21477px 0}.emoticon-uk{background-position:-21509px 0}.emoticon-de{background-position:-21541px 0}.emoticon-one{background-position:-21573px 0}.emoticon-two{background-position:-21605px 0}.emoticon-three{background-position:-21637px 0}.emoticon-four{background-position:-21669px 0}.emoticon-five{background-position:-21701px 0}.emoticon-six{background-position:-21733px 0}.emoticon-seven{background-position:-21765px 0}.emoticon-eight{background-position:-21797px 0}.emoticon-nine{background-position:-21829px 0}.emoticon-keycap_ten{background-position:-21861px 0}.emoticon-1234{background-position:-21893px 0}.emoticon-zero{background-position:-21925px 0}.emoticon-hash{background-position:-21957px 0}.emoticon-symbols{background-position:-21989px 0}.emoticon-arrow_backward{background-position:-22021px 0}.emoticon-arrow_down{background-position:-22053px 0}.emoticon-arrow_forward{background-position:-22085px 0}.emoticon-arrow_left{background-position:-22117px 0}.emoticon-capital_abcd{background-position:-22149px 0}.emoticon-abcd{background-position:-22181px 0}.emoticon-abc{background-position:-22213px 0}.emoticon-arrow_lower_left{background-position:-22245px 0}.emoticon-arrow_lower_right{background-position:-22277px 0}.emoticon-arrow_right{background-position:-22309px 0}.emoticon-arrow_up{background-position:-22341px 0}.emoticon-arrow_upper_left{background-position:-22373px 0}.emoticon-arrow_upper_right{background-position:-22405px 0}.emoticon-arrow_double_down{background-position:-22437px 0}.emoticon-arrow_double_up{background-position:-22469px 0}.emoticon-arrow_down_small{background-position:-22501px 0}.emoticon-arrow_heading_down{background-position:-22533px 0}.emoticon-arrow_heading_up{background-position:-22565px 0}.emoticon-leftwards_arrow_with_hook{background-position:-22597px 0}.emoticon-arrow_right_hook{background-position:-22629px 0}.emoticon-left_right_arrow{background-position:-22661px 0}.emoticon-arrow_up_down{background-position:-22693px 0}.emoticon-arrow_up_small{background-position:-22725px 0}.emoticon-arrows_clockwise{background-position:-22757px 0}.emoticon-arrows_counterclockwise{background-position:-22789px 0}.emoticon-rewind{background-position:-22821px 0}.emoticon-fast_forward{background-position:-22853px 0}.emoticon-information_source{background-position:-22885px 0}.emoticon-ok{background-position:-22917px 0}.emoticon-twisted_rightwards_arrows{background-position:-22949px 0}.emoticon-repeat{background-position:-22981px 0}.emoticon-repeat_one{background-position:-23013px 0}.emoticon-new{background-position:-23045px 0}.emoticon-top{background-position:-23077px 0}.emoticon-up{background-position:-23109px 0}.emoticon-cool{background-position:-23141px 0}.emoticon-free{background-position:-23173px 0}.emoticon-ng{background-position:-23205px 0}.emoticon-cinema{background-position:-23237px 0}.emoticon-koko{background-position:-23269px 0}.emoticon-signal_strength{background-position:-23301px 0}.emoticon-u5272{background-position:-23333px 0}.emoticon-u5408{background-position:-23365px 0}.emoticon-u55b6{background-position:-23397px 0}.emoticon-u6307{background-position:-23429px 0}.emoticon-u6708{background-position:-23461px 0}.emoticon-u6709{background-position:-23493px 0}.emoticon-u6e80{background-position:-23525px 0}.emoticon-u7121{background-position:-23557px 0}.emoticon-u7533{background-position:-23589px 0}.emoticon-u7a7a{background-position:-23621px 0}.emoticon-u7981{background-position:-23653px 0}.emoticon-sa{background-position:-23685px 0}.emoticon-restroom{background-position:-23717px 0}.emoticon-mens{background-position:-23749px 0}.emoticon-womens{background-position:-23781px 0}.emoticon-baby_symbol{background-position:-23813px 0}.emoticon-no_smoking{background-position:-23845px 0}.emoticon-parking{background-position:-23877px 0}.emoticon-wheelchair{background-position:-23909px 0}.emoticon-metro{background-position:-23941px 0}.emoticon-baggage_claim{background-position:-23973px 0}.emoticon-accept{background-position:-24005px 0}.emoticon-wc{background-position:-24037px 0}.emoticon-potable_water{background-position:-24069px 0}.emoticon-put_litter_in_its_place{background-position:-24101px 0}.emoticon-secret{background-position:-24133px 0}.emoticon-congratulations{background-position:-24165px 0}.emoticon-m{background-position:-24197px 0}.emoticon-passport_control{background-position:-24229px 0}.emoticon-left_luggage{background-position:-24261px 0}.emoticon-customs{background-position:-24293px 0}.emoticon-ideograph_advantage{background-position:-24325px 0}.emoticon-cl{background-position:-24357px 0}.emoticon-sos{background-position:-24389px 0}.emoticon-id{background-position:-24421px 0}.emoticon-no_entry_sign{background-position:-24453px 0}.emoticon-underage{background-position:-24485px 0}.emoticon-no_mobile_phones{background-position:-24517px 0}.emoticon-do_not_litter{background-position:-24549px 0}.emoticon-non\-potable_water{background-position:-24581px 0}.emoticon-no_bicycles{background-position:-24613px 0}.emoticon-no_pedestrians{background-position:-24645px 0}.emoticon-children_crossing{background-position:-24677px 0}.emoticon-no_entry{background-position:-24709px 0}.emoticon-eight_spoked_asterisk{background-position:-24741px 0}.emoticon-eight_pointed_black_star{background-position:-24773px 0}.emoticon-heart_decoration{background-position:-24805px 0}.emoticon-vs{background-position:-24837px 0}.emoticon-vibration_mode{background-position:-24869px 0}.emoticon-mobile_phone_off{background-position:-24901px 0}.emoticon-chart{background-position:-24933px 0}.emoticon-currency_exchange{background-position:-24965px 0}.emoticon-aries{background-position:-24997px 0}.emoticon-taurus{background-position:-25029px 0}.emoticon-gemini{background-position:-25061px 0}.emoticon-cancer{background-position:-25093px 0}.emoticon-leo{background-position:-25125px 0}.emoticon-virgo{background-position:-25157px 0}.emoticon-libra{background-position:-25189px 0}.emoticon-scorpius{background-position:-25221px 0}.emoticon-sagittarius{background-position:-25253px 0}.emoticon-capricorn{background-position:-25285px 0}.emoticon-aquarius{background-position:-25317px 0}.emoticon-pisces{background-position:-25349px 0}.emoticon-ophiuchus{background-position:-25381px 0}.emoticon-six_pointed_star{background-position:-25413px 0}.emoticon-negative_squared_cross_mark{background-position:-25445px 0}.emoticon-a{background-position:-25477px 0}.emoticon-b{background-position:-25509px 0}.emoticon-ab{background-position:-25541px 0}.emoticon-o2{background-position:-25573px 0}.emoticon-diamond_shape_with_a_dot_inside{background-position:-25605px 0}.emoticon-recycle{background-position:-25637px 0}.emoticon-end{background-position:-25669px 0}.emoticon-on{background-position:-25701px 0}.emoticon-soon{background-position:-25733px 0}.emoticon-clock1{background-position:-25765px 0}.emoticon-clock130{background-position:-25797px 0}.emoticon-clock10{background-position:-25829px 0}.emoticon-clock1030{background-position:-25861px 0}.emoticon-clock11{background-position:-25893px 0}.emoticon-clock1130{background-position:-25925px 0}.emoticon-clock12{background-position:-25957px 0}.emoticon-clock1230{background-position:-25989px 0}.emoticon-clock2{background-position:-26021px 0}.emoticon-clock230{background-position:-26053px 0}.emoticon-clock3{background-position:-26085px 0}.emoticon-clock330{background-position:-26117px 0}.emoticon-clock4{background-position:-26149px 0}.emoticon-clock430{background-position:-26181px 0}.emoticon-clock5{background-position:-26213px 0}.emoticon-clock530{background-position:-26245px 0}.emoticon-clock6{background-position:-26277px 0}.emoticon-clock630{background-position:-26309px 0}.emoticon-clock7{background-position:-26341px 0}.emoticon-clock730{background-position:-26373px 0}.emoticon-clock8{background-position:-26405px 0}.emoticon-clock830{background-position:-26437px 0}.emoticon-clock9{background-position:-26469px 0}.emoticon-clock930{background-position:-26501px 0}.emoticon-heavy_dollar_sign{background-position:-26533px 0}.emoticon-copyright{background-position:-26565px 0}.emoticon-registered{background-position:-26597px 0}.emoticon-tm{background-position:-26629px 0}.emoticon-x{background-position:-26661px 0}.emoticon-heavy_exclamation_mark{background-position:-26693px 0}.emoticon-bangbang{background-position:-26725px 0}.emoticon-interrobang{background-position:-26757px 0}.emoticon-o{background-position:-26789px 0}.emoticon-heavy_multiplication_x{background-position:-26821px 0}.emoticon-heavy_plus_sign{background-position:-26853px 0}.emoticon-heavy_minus_sign{background-position:-26885px 0}.emoticon-heavy_division_sign{background-position:-26917px 0}.emoticon-white_flower{background-position:-26949px 0}.emoticon-100{background-position:-26981px 0}.emoticon-heavy_check_mark{background-position:-27013px 0}.emoticon-ballot_box_with_check{background-position:-27045px 0}.emoticon-radio_button{background-position:-27077px 0}.emoticon-link{background-position:-27109px 0}.emoticon-curly_loop{background-position:-27141px 0}.emoticon-wavy_dash{background-position:-27173px 0}.emoticon-part_alternation_mark{background-position:-27205px 0}.emoticon-trident{background-position:-27237px 0}.emoticon-black_large_square{background-position:-27269px 0}.emoticon-white_large_square{background-position:-27301px 0}.emoticon-white_check_mark{background-position:-27333px 0}.emoticon-black_square{background-position:-27268px 0}.emoticon-white_square{background-position:-27301px 0}.emoticon-black_square_button{background-position:-27365px 0}.emoticon-white_square_button{background-position:-27397px 0}.emoticon-black_circle{background-position:-27429px 0}.emoticon-white_circle{background-position:-27461px 0}.emoticon-red_circle{background-position:-27493px 0}.emoticon-large_blue_circle{background-position:-27525px 0}.emoticon-large_blue_diamond{background-position:-27557px 0}.emoticon-large_orange_diamond{background-position:-27589px 0}.emoticon-small_blue_diamond{background-position:-27621px 0}.emoticon-small_orange_diamond{background-position:-27653px 0}.emoticon-small_red_triangle{background-position:-27685px 0}.emoticon-small_red_triangle_down{background-position:-27717px 0}.emoticon-shipit{background-position:-27749px 0}md-expansion-panel{background:#fff}md-expansion-panel .md-expansion-panel-footer-container,md-expansion-panel .md-expansion-panel-header-container,md-expansion-panel md-expansion-panel-collapsed{background:#fff}md-expansion-panel .md-expansion-panel-footer-container .md-summary,md-expansion-panel .md-expansion-panel-footer-container .md-title,md-expansion-panel .md-expansion-panel-header-container .md-summary,md-expansion-panel .md-expansion-panel-header-container .md-title,md-expansion-panel md-expansion-panel-collapsed .md-summary,md-expansion-panel md-expansion-panel-collapsed .md-title{color:#333}md-expansion-panel md-expansion-panel-footer .md-expansion-panel-footer-container,md-expansion-panel md-expansion-panel-header .md-expansion-panel-header-container{border-color:#ddd}md-expansion-panel .md-expansion-panel-icon svg{fill:#999}md-expansion-panel[disabled] md-expansion-panel-collapsed .md-summary,md-expansion-panel[disabled] md-expansion-panel-collapsed .md-title{color:#ddd}md-expansion-panel[disabled] .md-expansion-panel-icon svg{fill:#ddd}md-expansion-panel:not(.md-open):not([disabled]):focus,md-expansion-panel:not(.md-open):not([disabled]):focus md-expansion-panel-collapsed{background:#eee}.layout-padding>md-expansion-panel-group{padding:0}md-expansion-panel{display:block;position:relative;outline:0;margin-top:0;margin-bottom:0;padding:0;box-shadow:0 -1px 0 #e5e5e5,0 0 2px rgba(0,0,0,.12),0 2px 4px rgba(0,0,0,.24)}md-expansion-panel.md-open{margin-top:16px;margin-bottom:16px}md-expansion-panel.md-open:first-of-type{margin-top:0}md-expansion-panel.md-close{overflow:hidden}md-expansion-panel:not(.md-no-animation).md-open{-webkit-transition:margin-top .12s cubic-bezier(.25,.8,.25,1),margin-bottom .12s cubic-bezier(.25,.8,.25,1);transition:margin-top .12s cubic-bezier(.25,.8,.25,1),margin-bottom .12s cubic-bezier(.25,.8,.25,1)}md-expansion-panel:not(.md-no-animation).md-close{-webkit-transition:margin-top 80ms cubic-bezier(.25,.8,.25,1),margin-bottom 80ms cubic-bezier(.25,.8,.25,1);transition:margin-top 80ms cubic-bezier(.25,.8,.25,1),margin-bottom 80ms cubic-bezier(.25,.8,.25,1)}md-expansion-panel-collapsed .md-title,md-expansion-panel-header .md-title{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:16px;font-weight:600;min-width:80px;max-width:184px;overflow:hidden;text-overflow:ellipsis;text-align:left;white-space:nowrap}md-expansion-panel-collapsed .md-summary,md-expansion-panel-header .md-summary{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:13px;overflow:hidden;text-overflow:ellipsis;text-align:left;white-space:nowrap}md-expansion-panel md-expansion-panel-collapsed{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:48px;line-height:48px;padding:0 24px;opacity:1;z-index:2;box-sizing:border-box}md-expansion-panel md-expansion-panel-collapsed.md-absolute{position:absolute}md-expansion-panel md-expansion-panel-collapsed.md-hide{opacity:0}md-expansion-panel:not(.md-no-animation) md-expansion-panel-collapsed.md-show{-webkit-transition:opacity 30ms linear;transition:opacity 30ms linear}md-expansion-panel:not(.md-no-animation) md-expansion-panel-collapsed.md-hide{-webkit-transition:opacity .1s cubic-bezier(.25,.8,.25,1);transition:opacity .1s cubic-bezier(.25,.8,.25,1)}md-expansion-panel md-expansion-panel-expanded{display:none;min-height:48px}md-expansion-panel md-expansion-panel-expanded.md-hide,md-expansion-panel md-expansion-panel-expanded.md-show{display:block}md-expansion-panel md-expansion-panel-expanded.md-scroll-y{overflow-y:auto}md-expansion-panel md-expansion-panel-expanded.md-overflow{overflow:hidden}md-expansion-panel md-expansion-panel-expanded md-expansion-panel-content{display:block;padding:16px 24px}md-expansion-panel:not(.md-no-animation) md-expansion-panel-expanded.md-show{-webkit-transition:max-height .12s cubic-bezier(.25,.8,.25,1),opacity .12s cubic-bezier(.25,.8,.25,1);transition:max-height .12s cubic-bezier(.25,.8,.25,1),opacity .12s cubic-bezier(.25,.8,.25,1)}md-expansion-panel:not(.md-no-animation) md-expansion-panel-expanded.md-hide{-webkit-transition:max-height 60ms cubic-bezier(.25,.8,.25,1),opacity 60ms cubic-bezier(.25,.8,.25,1);transition:max-height 60ms cubic-bezier(.25,.8,.25,1),opacity 60ms cubic-bezier(.25,.8,.25,1)}md-expansion-panel-header{display:block;position:relative;outline:0}md-expansion-panel-header .md-expansion-panel-header-container{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:48px;line-height:48px;padding:0 24px;box-sizing:border-box;border-bottom:1px solid;-webkit-box-align:center;-ms-flex-align:center;align-items:center}md-expansion-panel-header.md-stick .md-expansion-panel-header-container{position:fixed;z-index:2;-webkit-animation:panelBodyHeaderStickyHoverIn .3s ease-out both;animation:panelBodyHeaderStickyHoverIn .3s ease-out both}md-expansion-panel-header.md-no-stick .md-expansion-panel-header-container{-webkit-animation:panelBodyHeaderStickyHoverOut .3s ease-out both;animation:panelBodyHeaderStickyHoverOut .3s ease-out both}md-expansion-panel-footer{display:block;position:relative}md-expansion-panel-footer.md-hide,md-expansion-panel-footer.md-show{display:block}md-expansion-panel-footer .md-expansion-panel-footer-container{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:48px;line-height:48px;padding:0 24px;border-top:1px solid;box-sizing:border-box}md-expansion-panel-footer.md-stick .md-expansion-panel-footer-container{position:fixed;z-index:2}md-expansion-panel:not(.md-no-animation) .md-expansion-panel-icon{-webkit-transition:-webkit-transform .6s cubic-bezier(.25,.8,.25,1);transition:-webkit-transform .6s cubic-bezier(.25,.8,.25,1);transition:transform .6s cubic-bezier(.25,.8,.25,1);transition:transform .6s cubic-bezier(.25,.8,.25,1),-webkit-transform .6s cubic-bezier(.25,.8,.25,1)}md-expansion-panel .md-expansion-panel-icon{-webkit-transform:rotate(90deg);transform:rotate(90deg)}md-expansion-panel .md-expansion-panel-icon:first-child{margin-right:18px}md-expansion-panel.md-open>md-expansion-panel-expanded>md-expansion-panel-header .md-expansion-panel-header-container .md-expansion-panel-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}md-expansion-panel.md-open>md-expansion-panel.md-open>md-expansion-panel-collapsed .md-expansion-panel-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}@-webkit-keyframes panelBodyHeaderStickyHoverIn{0%{box-shadow:0 0 0 0 transparent}100%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}}@keyframes panelBodyHeaderStickyHoverIn{0%{box-shadow:0 0 0 0 transparent}100%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}}@-webkit-keyframes panelBodyHeaderStickyHoverOut{0%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}100%{box-shadow:0 0 0 0 transparent}}@keyframes panelBodyHeaderStickyHoverOut{0%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}100%{box-shadow:0 0 0 0 transparent}}[md-color-picker] .md-color-picker-input-container,md-color-picker .md-color-picker-input-container{position:relative}[md-color-picker] .md-color-picker-input-container .md-color-picker-input::-ms-clear,md-color-picker .md-color-picker-input-container .md-color-picker-input::-ms-clear{display:none}[md-color-picker] .md-color-picker-input-container .md-color-picker-preview,md-color-picker .md-color-picker-input-container .md-color-picker-preview{content:'';width:24px;height:24px;border:2px solid #fff;border-radius:50%;box-shadow:0 3px 1px -2px rgba(0,0,0,.14),0 2px 2px 0 rgba(0,0,0,.098),0 1px 5px 0 rgba(0,0,0,.084);position:relative;top:22px;overflow:hidden;background-color:#fff;background-image:-webkit-linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd),-webkit-linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd);background-image:linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd),linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd);background-size:8px 8px;background-position:0 0,4px 4px}[md-color-picker] .md-color-picker-input-container .md-color-picker-preview .md-color-picker-result,md-color-picker .md-color-picker-input-container .md-color-picker-preview .md-color-picker-result{width:100%;height:100%}[md-color-picker] .md-color-picker-input-container .md-color-picker-clear,md-color-picker .md-color-picker-input-container .md-color-picker-clear{position:absolute;bottom:42px;right:-16px;color:rgba(0,0,0,.26)}.md-color-picker-container{padding:8px;background:#fff;outline:0;height:397px;width:347px;opacity:1;overflow:hidden;z-index:1000}.md-color-picker-container .md-color-picker-arrow{border:0 solid transparent;border-right-width:30px;border-bottom-width:0;position:absolute;left:0;top:0;-webkit-transition:border-bottom-width cubic-bezier(.25,.8,.25,1) .25s,top cubic-bezier(.25,.8,.25,1) .25s;transition:border-bottom-width cubic-bezier(.25,.8,.25,1) .25s,top cubic-bezier(.25,.8,.25,1) .25s}.md-color-picker-container canvas{width:100%;height:100%}.md-color-picker-container .md-color-picker-preview{-webkit-box-flex:1;-ms-flex:1;flex:1;font-weight:700;font-size:18px;color:#fff;margin:-8px -8px 0;position:relative}.md-color-picker-container .md-color-picker-preview .md-color-picker-result{position:absolute;height:100%;opacity:1;background:red}.md-color-picker-container .md-color-picker-preview .md-color-picker-result>input{position:relative;top:-15px;opacity:0}.md-color-picker-container .md-color-picker-preview .md-color-picker-result>div{position:relative;width:100%}.md-color-picker-container .md-color-picker-preview .md-color-picker-result>div>input{border-width:0;background:0 0;text-align:center;position:absolute;top:-15px;bottom:0;left:0;right:0;color:#eee;outline:0;opacity:0}.md-color-picker-container .md-color-picker-preview .md-color-picker-result>div>input.switch{-webkit-transition:top cubic-bezier(.25,.8,.25,1) .25s,.25s opacity ease-out;transition:top cubic-bezier(.25,.8,.25,1) .25s,.25s opacity ease-out;top:0;opacity:1}.md-color-picker-container .md-color-picker-preview .md-color-picker-tabs .md-tab,.md-color-picker-container .md-color-picker-preview .md-color-picker-tabs md-pagination-wrapper,.md-color-picker-container .md-color-picker-preview .md-color-picker-tabs md-tabs-canvas,.md-color-picker-container .md-color-picker-preview .md-color-picker-tabs md-tabs-wrapper{max-height:28px;height:28px}.md-color-picker-container .md-color-picker-preview .md-color-picker-tabs md-ink-bar{background:rgba(255,255,255,.5)}.md-color-picker-container .md-color-picker-preview .md-color-picker-tabs .md-tab{padding-top:2px;background:rgba(255,255,255,.25);color:#eee;max-width:none!important}.md-color-picker-container .md-color-picker-preview .md-color-picker-tabs .md-tab.md-active{background:0 0}.md-color-picker-container .md-color-picker-preview.dark{color:#333}.md-color-picker-container .md-color-picker-preview.dark .md-color-picker-preview-input{color:#333}.md-color-picker-container .md-color-picker-preview.dark .md-tab{background:rgba(0,0,0,.25);color:#333}.md-color-picker-container .md-color-picker-preview.dark .md-tab.md-active{background:0 0}.md-color-picker-container .md-color-picker-preview.dark md-ink-bar{background:rgba(0,0,0,.5)}.md-color-picker-container .md-color-picker-tabs{margin:0 -8px 0}.md-color-picker-container .md-color-picker-tabs md-tabs[md-align-tabs=bottom]{padding-bottom:0}.md-color-picker-container .md-color-picker-tabs .md-tab,.md-color-picker-container .md-color-picker-tabs md-pagination-wrapper,.md-color-picker-container .md-color-picker-tabs md-tabs-canvas,.md-color-picker-container .md-color-picker-tabs md-tabs-wrapper{max-height:36px;height:36px}.md-color-picker-container .md-color-picker-tabs .md-tab{padding:7px 24px;background:0 0}.md-color-picker-container .md-color-picker-tabs .md-tab:last-of-type{margin-right:-2px}.md-color-picker-container .md-color-picker-tabs md-tabs:not(.md-no-tab-content):not(.md-dynamic-height){min-height:298px}.md-color-picker-container .md-color-picker-tabs md-tabs:not(.md-no-tab-content):not(.md-dynamic-height) md-tabs-content-wrapper{height:255px;margin-bottom:8px}.md-color-picker-container .md-color-picker-tabs md-tabs:not(.md-no-tab-content):not(.md-dynamic-height) md-tabs-content-wrapper md-tab-content{height:255px;padding:0 8px 0}.md-color-picker-container .md-color-picker-tabs md-tabs:not(.md-no-tab-content):not(.md-dynamic-height) md-tabs-content-wrapper md-tab-content [md-tabs-template]{height:100%}.md-color-picker-container .md-color-picker-tabs.md-color-picker-colors{margin:8px -8px -8px}.md-color-picker-container .md-color-picker-tabs.md-color-picker-colors md-ink-bar{top:auto}.md-color-picker-container .md-color-picker-tabs.md-color-picker-colors .md-tab{background:rgba(0,0,0,.075)}.md-color-picker-container .md-color-picker-tabs.md-color-picker-colors .md-tab.md-active{background:#fff}.md-color-picker-container .md-color-picker-colors{overflow:hidden;margin-top:8px}.md-color-picker-container .md-color-picker-colors .md-color-picker-marker{position:absolute;border:2px solid #fff;box-shadow:0 0 2px 0 rgba(0,0,0,.5)}.md-color-picker-container .md-color-picker-colors [md-color-picker-spectrum]{position:relative;cursor:crosshair;overflow:hidden;height:255px;width:255px}.md-color-picker-container .md-color-picker-colors [md-color-picker-spectrum] .md-color-picker-marker{width:12px;height:12px;border-radius:50%;box-shadow:0 0 2px 0 rgba(0,0,0,.5),inset 0 0 2px 0 rgba(0,0,0,.5);top:-5px;left:calc(100% - 5px)}.md-color-picker-container .md-color-picker-colors [md-color-picker-alpha],.md-color-picker-container .md-color-picker-colors [md-color-picker-hue]{position:relative;cursor:crosshair;overflow:hidden;width:30px}.md-color-picker-container .md-color-picker-colors [md-color-picker-alpha].md-color-picker-wide,.md-color-picker-container .md-color-picker-colors [md-color-picker-hue].md-color-picker-wide{width:67px}.md-color-picker-container .md-color-picker-colors [md-color-picker-alpha] .md-color-picker-marker,.md-color-picker-container .md-color-picker-colors [md-color-picker-hue] .md-color-picker-marker{height:5px;width:100%;border-left:0;border-right:0;top:-2px;left:0}.md-color-picker-container .md-color-picker-sliders md-slider.red-slider .md-track-fill{background:#d01515}.md-color-picker-container .md-color-picker-sliders md-slider.red-slider .md-thumb:after{background-color:#d01515;border-color:#d01515}.md-color-picker-container .md-color-picker-sliders md-slider.green-slider .md-track-fill{background:#19d015}.md-color-picker-container .md-color-picker-sliders md-slider.green-slider .md-thumb:after{background-color:#19d015;border-color:#19d015}.md-color-picker-container .md-color-picker-sliders md-slider.blue-slider .md-track-fill{background:#1560d0}.md-color-picker-container .md-color-picker-sliders md-slider.blue-slider .md-thumb:after{background-color:#1560d0;border-color:#1560d0}.md-color-picker-container .md-color-picker-material-palette .md-color-picker-material-title{font-size:22px;line-height:75px;padding:0 15px;color:rgba(0,0,0,.85);text-transform:capitalize}.md-color-picker-container .md-color-picker-material-palette .md-color-picker-material-title.dark{color:rgba(255,255,255,.85)}.md-color-picker-container .md-color-picker-material-palette .md-color-picker-material-title:not(:first-child){margin-top:16px}.md-color-picker-container .md-color-picker-material-palette .md-color-picker-with-label{font-size:12px;line-height:33px;padding:0 5px;color:rgba(0,0,0,.7)}.md-color-picker-container .md-color-picker-material-palette .md-color-picker-with-label.dark{color:rgba(255,255,255,.7)}.md-color-picker-container .md-color-picker-material-palette .md-color-picker-material-colors{position:absolute;-webkit-transition:left cubic-bezier(.25,.8,.25,1) .25s,right cubic-bezier(.25,.8,.25,1) .25s,top cubic-bezier(.25,.8,.25,1) .25s,bottom cubic-bezier(.25,.8,.25,1) .25s;transition:left cubic-bezier(.25,.8,.25,1) .25s,right cubic-bezier(.25,.8,.25,1) .25s,top cubic-bezier(.25,.8,.25,1) .25s,bottom cubic-bezier(.25,.8,.25,1) .25s}.md-color-picker-container .md-color-picker-history>div>div{height:20px;margin:4px;background-color:#fff;background-image:-webkit-linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd),-webkit-linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd);background-image:linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd),linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd);background-size:8px 8px;background-position:0 0,4px 4px}.md-color-picker-container .md-color-picker-history>div>div>div{width:100%;height:100%}.md-color-picker-container .md-color-picker-history button{margin-top:auto;margin-left:auto}.md-color-picker-checkered-bg{background-color:#fff;background-image:-webkit-linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd),-webkit-linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd);background-image:linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd),linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd);background-size:8px 8px;background-position:0 0,4px 4px}.emojione{font-size:inherit;height:3ex;width:3.1ex;min-height:20px;min-width:20px;display:inline-block;margin:-.2ex .15em .2ex;line-height:normal;vertical-align:middle}img.emojione{width:auto}.dropdown-menu.textcomplete-dropdown[data-strategy=emojionearea]{position:absolute;z-index:1000;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-moz-box-shadow:0 6px 12px rgba(0,0,0,.175);-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.textcomplete-dropdown[data-strategy=emojionearea] li.textcomplete-item{font-size:14px;padding:1px 3px;border:0}.dropdown-menu.textcomplete-dropdown[data-strategy=emojionearea] li.textcomplete-item a{text-decoration:none;display:block;height:100%;line-height:1.8em;padding:0 1.54em 0 .615em;color:#4f4f4f}.dropdown-menu.textcomplete-dropdown[data-strategy=emojionearea] li.textcomplete-item.active,.dropdown-menu.textcomplete-dropdown[data-strategy=emojionearea] li.textcomplete-item:hover{background-color:#e4e4e4}.dropdown-menu.textcomplete-dropdown[data-strategy=emojionearea] li.textcomplete-item.active a,.dropdown-menu.textcomplete-dropdown[data-strategy=emojionearea] li.textcomplete-item:hover a{color:#333}.dropdown-menu.textcomplete-dropdown[data-strategy=emojionearea] li.textcomplete-item .emojioneemoji{font-size:inherit;height:2ex;width:2.1ex;min-height:20px;min-width:20px;display:inline-block;margin:0 5px .2ex 0;line-height:normal;vertical-align:middle;max-width:100%;top:0}.emojionearea-text .emojioneemoji,.emojionearea-text [class*=emojione-]{font-size:inherit;height:2ex;width:2.1ex;min-height:20px;min-width:20px;display:inline-block;margin:-.2ex .15em .2ex;line-height:normal;vertical-align:middle;max-width:100%;top:0}.emojionearea,.emojionearea *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.emojionearea.emojionearea-disable{position:relative;background-color:#eee;-moz-user-select:-moz-none;-ms-user-select:none;-webkit-user-select:none;user-select:none}.emojionearea.emojionearea-disable:before{content:"";display:block;top:0;left:0;right:0;bottom:0;z-index:1;opacity:.3;position:absolute;background-color:#eee}.emojionearea,.emojionearea.form-control{display:block;position:relative!important;width:100%;height:auto;padding:0;font-size:14px;background-color:#fff;border:1px solid #ccc;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-transition:border-color .15s ease-in-out,-moz-box-shadow .15s ease-in-out;-o-transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.emojionearea.focused{border-color:#66afe9;outline:0;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.emojionearea .emojionearea-editor{display:block;height:auto;min-height:8em;max-height:15em;overflow:auto;padding:6px 24px 6px 12px;line-height:1.42857143;font-size:inherit;color:#555;background-color:transparent;border:0;cursor:text;margin-right:1px;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.emojionearea .emojionearea-editor:empty:before{content:attr(placeholder);display:block;color:#bbb}.emojionearea .emojionearea-editor:focus{border:0;outline:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.emojionearea .emojionearea-editor .emojioneemoji,.emojionearea .emojionearea-editor [class*=emojione-]{font-size:inherit;height:2ex;width:2.1ex;min-height:20px;min-width:20px;display:inline-block;margin:-.2ex .15em .2ex;line-height:normal;vertical-align:middle;max-width:100%;top:0}.emojionearea.emojionearea-inline{height:34px}.emojionearea.emojionearea-inline>.emojionearea-editor{height:32px;min-height:20px;overflow:hidden;white-space:nowrap;position:absolute;top:0;left:12px;right:24px;padding:6px 0}.emojionearea.emojionearea-inline>.emojionearea-button{top:4px}.emojionearea .emojionearea-button{z-index:5;position:absolute;right:3px;top:3px;width:24px;height:24px;opacity:.6;cursor:pointer;-moz-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.emojionearea .emojionearea-button:hover{opacity:1}.emojionearea .emojionearea-button>div{display:block;width:24px;height:24px;position:absolute;-moz-transition:all .4s ease-in-out;-o-transition:all .4s ease-in-out;-webkit-transition:all .4s ease-in-out;transition:all .4s ease-in-out}.emojionearea .emojionearea-button>div.emojionearea-button-open{background-position:0 -24px;opacity:1}.emojionearea .emojionearea-button>div.emojionearea-button-close{background-position:0 0;-webkit-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}.emojionearea .emojionearea-button.active>div.emojionearea-button-open{-webkit-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);opacity:0}.emojionearea .emojionearea-button.active>div.emojionearea-button-close{-webkit-transform:rotate(0);-o-transform:rotate(0);transform:rotate(0);opacity:1}.emojionearea .emojionearea-picker{background:#fff;position:absolute;-moz-box-shadow:0 1px 5px rgba(0,0,0,.32);-webkit-box-shadow:0 1px 5px rgba(0,0,0,.32);box-shadow:0 1px 5px rgba(0,0,0,.32);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;height:276px;width:316px;top:-15px;right:-15px;z-index:90;-moz-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;opacity:0;-moz-user-select:-moz-none;-ms-user-select:none;-webkit-user-select:none;user-select:none}.emojionearea .emojionearea-picker.hidden{display:none}.emojionearea .emojionearea-picker .emojionearea-wrapper{position:relative;height:276px;width:316px}.emojionearea .emojionearea-picker .emojionearea-wrapper:after{content:"";display:block;position:absolute;background-repeat:no-repeat;z-index:91}.emojionearea .emojionearea-picker .emojionearea-filters{width:100%;position:absolute;z-index:95;background:#f5f7f9;padding:0 0 0 7px;height:40px}.emojionearea .emojionearea-picker .emojionearea-filters .emojionearea-filter{display:block;float:left;height:40px;width:32px;padding:7px 1px 0;cursor:pointer;-webkit-filter:grayscale(1);filter:grayscale(1)}.emojionearea .emojionearea-picker .emojionearea-filters .emojionearea-filter.active{background:#fff}.emojionearea .emojionearea-picker .emojionearea-filters .emojionearea-filter.active,.emojionearea .emojionearea-picker .emojionearea-filters .emojionearea-filter:hover{-webkit-filter:grayscale(0);filter:grayscale(0)}.emojionearea .emojionearea-picker .emojionearea-filters .emojionearea-filter>i{width:24px;height:24px;top:0}.emojionearea .emojionearea-picker .emojionearea-filters .emojionearea-filter>img{width:24px;height:24px;margin:0 3px}.emojionearea .emojionearea-picker .emojionearea-search-panel{height:30px;position:absolute;z-index:95;top:40px;left:0;right:0;padding:5px 0 5px 8px}.emojionearea .emojionearea-picker .emojionearea-search-panel .emojionearea-tones{float:right;margin-right:10px;margin-top:-1px}.emojionearea .emojionearea-picker .emojionearea-tones-panel .emojionearea-tones{position:absolute;top:4px;left:171px}.emojionearea .emojionearea-picker .emojionearea-search{float:left;padding:0;height:20px;width:160px}.emojionearea .emojionearea-picker .emojionearea-search>input{outline:0;width:160px;min-width:160px;height:20px}.emojionearea .emojionearea-picker .emojionearea-tones{padding:0;width:120px;height:20px}.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone{display:inline-block;padding:0;border:0;vertical-align:middle;outline:0;background:0 0;cursor:pointer;position:relative}.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-0,.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-0:after{background-color:#ffcf3e}.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-1,.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-1:after{background-color:#fae3c5}.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-2,.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-2:after{background-color:#e2cfa5}.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-3,.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-3:after{background-color:#daa478}.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-4,.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-4:after{background-color:#a78058}.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-5,.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-5:after{background-color:#5e4d43}.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-bullet>.btn-tone,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-square>.btn-tone{width:20px;height:20px;margin:0;background-color:transparent}.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-bullet>.btn-tone:after,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-square>.btn-tone:after{content:"";position:absolute;display:block;top:4px;left:4px;width:12px;height:12px}.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-bullet>.btn-tone.active:after,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-square>.btn-tone.active:after{top:0;left:0;width:20px;height:20px}.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-checkbox>.btn-tone,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-radio>.btn-tone{width:16px;height:16px;margin:0 2px}.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-checkbox>.btn-tone.active:after,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-radio>.btn-tone.active:after{content:"";position:absolute;display:block;background-color:transparent;border:2px solid #fff;width:8px;height:8px;top:2px;left:2px;box-sizing:initial}.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-category-block:after,.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-category-block:before,.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-category-block>.emojionearea-category:after,.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-category-block>.emojionearea-category:before,.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-category-title:after,.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-category-title:before{content:" ";clear:both;display:block}.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-bullet>.btn-tone,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-bullet>.btn-tone:after,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-radio>.btn-tone,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-radio>.btn-tone:after{-moz-border-radius:100%;-webkit-border-radius:100%;border-radius:100%}.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-checkbox>.btn-tone,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-checkbox>.btn-tone:after,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-square>.btn-tone,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-square>.btn-tone:after{-moz-border-radius:1px;-webkit-border-radius:1px;border-radius:1px}.emojionearea .emojionearea-picker .emojionearea-scroll-area{height:236px;overflow:auto;overflow-x:hidden;width:100%;position:absolute;padding:0 0 5px}.emojionearea .emojionearea-picker .emojionearea-search-panel+.emojionearea-scroll-area{height:206px}.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-emojis-list{z-index:1}.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-category-title{display:block;font-family:Arial,'Helvetica Neue',Helvetica,sans-serif;font-size:13px;font-weight:400;color:#b2b2b2;background:#fff;line-height:20px;margin:0;padding:7px 0 5px 6px}.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-category-block{padding:0 0 0 7px}.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-category-block>.emojionearea-category{padding:0!important}.emojionearea .emojionearea-picker .emojionearea-scroll-area [class*=emojione-]{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;margin:0;width:24px;height:24px;top:0}.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojibtn{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;width:24px;height:24px;float:left;display:block;margin:1px;padding:3px}.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojibtn:hover{-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background-color:#e4e4e4;cursor:pointer}.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojibtn i,.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojibtn img{float:left;display:block;width:24px;height:24px}.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojibtn img.lazy-emoji{opacity:0}.emojionearea .emojionearea-picker.emojionearea-filters-position-top .emojionearea-filters{top:0;-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;border-top-left-radius:5px;-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;border-top-right-radius:5px}.emojionearea .emojionearea-picker.emojionearea-filters-position-top.emojionearea-search-position-top .emojionearea-scroll-area{bottom:0}.emojionearea .emojionearea-picker.emojionearea-filters-position-top.emojionearea-search-position-bottom .emojionearea-scroll-area{top:40px}.emojionearea .emojionearea-picker.emojionearea-filters-position-top.emojionearea-search-position-bottom .emojionearea-search-panel{top:initial;bottom:0}.emojionearea .emojionearea-picker.emojionearea-filters-position-bottom .emojionearea-filters{bottom:0;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;border-bottom-left-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;border-bottom-right-radius:5px}.emojionearea .emojionearea-picker.emojionearea-filters-position-bottom.emojionearea-search-position-bottom .emojionearea-scroll-area{top:0}.emojionearea .emojionearea-picker.emojionearea-filters-position-bottom.emojionearea-search-position-bottom .emojionearea-search-panel,.emojionearea .emojionearea-picker.emojionearea-filters-position-bottom.emojionearea-search-position-top .emojionearea-scroll-area{top:initial;bottom:40px}.emojionearea .emojionearea-picker.emojionearea-filters-position-bottom.emojionearea-search-position-top .emojionearea-search-panel{top:0}.emojionearea .emojionearea-picker.emojionearea-picker-position-top{margin-top:-286px;right:-14px}.emojionearea .emojionearea-picker.emojionearea-picker-position-top .emojionearea-wrapper:after{width:19px;height:10px;background-position:-2px -49px;bottom:-10px;right:20px}.emojionearea .emojionearea-picker.emojionearea-picker-position-top.emojionearea-filters-position-bottom .emojionearea-wrapper:after{background-position:-2px -80px}.emojionearea .emojionearea-picker.emojionearea-picker-position-left,.emojionearea .emojionearea-picker.emojionearea-picker-position-right{margin-right:-326px;top:-8px}.emojionearea .emojionearea-picker.emojionearea-picker-position-left .emojionearea-wrapper:after,.emojionearea .emojionearea-picker.emojionearea-picker-position-right .emojionearea-wrapper:after{width:10px;height:19px;background-position:0 -60px;top:13px;left:-10px}.emojionearea .emojionearea-picker.emojionearea-picker-position-left.emojionearea-filters-position-bottom .emojionearea-wrapper:after,.emojionearea .emojionearea-picker.emojionearea-picker-position-right.emojionearea-filters-position-bottom .emojionearea-wrapper:after{background-position:right -60px}.emojionearea .emojionearea-picker.emojionearea-picker-position-bottom{margin-top:10px;right:-14px;top:47px}.emojionearea .emojionearea-picker.emojionearea-picker-position-bottom .emojionearea-wrapper:after{width:19px;height:10px;background-position:-2px -100px;top:-10px;right:20px}.emojionearea .emojionearea-picker.emojionearea-picker-position-bottom.emojionearea-filters-position-bottom .emojionearea-wrapper:after{background-position:-2px -90px}.emojionearea .emojionearea-button.active+.emojionearea-picker{opacity:1}.emojionearea .emojionearea-button.active+.emojionearea-picker-position-top{margin-top:-269px}.emojionearea .emojionearea-button.active+.emojionearea-picker-position-left,.emojionearea .emojionearea-button.active+.emojionearea-picker-position-right{margin-right:-309px}.emojionearea .emojionearea-button.active+.emojionearea-picker-position-bottom{margin-top:-7px}.emojionearea.emojionearea-standalone{display:inline-block;width:auto;box-shadow:none}.emojionearea.emojionearea-standalone .emojionearea-editor{min-height:33px;position:relative;padding:6px 42px 6px 6px}.emojionearea.emojionearea-standalone .emojionearea-editor::before{content:"";position:absolute;top:4px;left:50%;bottom:4px;border-left:1px solid #e6e6e6}.emojionearea.emojionearea-standalone .emojionearea-editor.has-placeholder .emojioneemoji{opacity:.4}.emojionearea.emojionearea-standalone .emojionearea-button{top:0;right:0;bottom:0;left:0;width:auto;height:auto}.emojionearea.emojionearea-standalone .emojionearea-button>div{right:6px;top:5px}.emojionearea.emojionearea-standalone .emojionearea-picker.emojionearea-picker-position-bottom .emojionearea-wrapper:after,.emojionearea.emojionearea-standalone .emojionearea-picker.emojionearea-picker-position-top .emojionearea-wrapper:after{right:23px}.emojionearea.emojionearea-standalone .emojionearea-picker.emojionearea-picker-position-left .emojionearea-wrapper:after,.emojionearea.emojionearea-standalone .emojionearea-picker.emojionearea-picker-position-right .emojionearea-wrapper:after{top:15px}.emojionearea .emojionearea-button>div,.emojionearea .emojionearea-picker .emojionearea-wrapper:after{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAABuCAYAAADMB4ipAAAHfElEQVRo3u1XS1NT2Rb+9uOcQF4YlAJzLymFUHaLrdxKULvEUNpdTnRqD532f+AHMLMc94gqR1Zbt8rBnUh3YXipPGKwRDoWgXvrYiFUlEdIkPPYZ/dAkwox5yQCVt/bzRrBPnt9e+211/etFeDQDu3ArL+/X37OeqmRWoH7+vpItfWawStF1tfXR+zW9xW5ne0p8loOcAKuCdwpRft60C8a+X5zTvebCqcAvmidf1GGHtqhHdpf1qqKzsrKipyensbi4iKWl5cBAMFgEG1tbYhGo2hpadlbmxseHpaDg4MAgI6ODng8HgBAPp/H/Pw8AODatWvo7e2tvUHrui7v3r2L+fl5XL58GVeuXIHH49m1N5/Py0ePHmF0dBQdHR24desWVFXdtYdXAn/48CHm5+dx8+ZNRKPRigEUDpuenpb3799H4YaOnWh5eVmOj48jFoshGo0STdPkwMCAXF5elqV7BgYGpKZpMhqNklgshrGxMbx580Y6gicSCTDGEIvFAADpdBqpVArJZLK4J5lMIpVKIZ1OAwBisRgYY0gkEs6Rp1IphMNh+Hw+AgCGYQAANE0r7in8Xfjm8/lIOBzGq1evnMHX19fR1NRU/D8UCoFzjnA4XFwLh8PgnCMUChXXmpqakM1mUfVBS62xsZHk83lZWi1nz579ZA0AhBDO4A0NDchkMsWSJIRAURRiVy26rktVVUkmk0EgEHAGP3XqFKamppDP56Vpmrhz5w5u374t/X4/OP+w3TRNZLNZ6LoO0zSRz+dlf38/Ll686Jzz8+fPQwiBeDwOt9tNrl+/jkwmU6yaQpVkMhncuHEDbrebxONxCCEQiUScIw8Gg+TBgwdyZGQEyWRSdnV1kVQqJYeGhrC6ugrGGEKhEHp7e3Hy5EmSTCblvXv30NPTg2AwSA6M/vF4HCMjI7b0/yzh8vv9AIBsNrt34aokuQsLC7skt729varkHtqftUFf++FHsrq0QN3eBvp68Tfvf9Mv12oFCYU7G//e9nVuO7dpNbe2W4M//yQr0p8yRvyBo1Zr++lwLcCt7afD/sBRizJGavrB1dDYYh47Htrq+Kb7jBNwxzfdZ44dD201NLaYVUkU7ozQpuAJBkARwnRZpunN5zaa5hJjiXLH05GeiMd7JEM5zzHGNQBGZvk/Iv0yYVWMvK0zKk1Dl6ahW5RQobjqdjy+wEZn9PKF0n2d0csXPL7AhuKq26GECtPQLdPQZVtn1LlB69p7yRVVSEiDEGJwRd12e4+8PR3piRQidnuPvOWKuk0IMSSkwRVV6Np7WVVbSqvGsgSnlKkAFNPQXdrOtuKqcxtcUTUAhmUJnVJmlleJo3CVHmAaOlPUOmYJkxFKibQsSRkXhr4juKIKO2BHVSwcoLrqCVdUYho6K3YYRRWmoUtdey/tgKtK7rUffiQAsLq08MnbNLe2WwBgB/zHzueFyD8nwlIfbvdx8eU0WV1aKD1cVAMs9+F2j9gUPEEKemEJIe3AnXy4XfkBoNKSZHNthWfX31EA69VKttyHVyIOY1wRwmS6tqNsrr31vXo5k/bUu4gT2cp9lhbm0rzCJpeUUrE0vS63+c7/6uXMbDUWl/ssLczNFrVFddUT09AZpUy1LKvO0DVfPrfR9HxqfNbuEe185l9MFX3o6tIC5YpKFLWOfdQQ93Zu49j0+FDCDtjOp1yaOQCYhs4Y40wI05XfWj8yPT40Ua2ey33mEmMTtp2IUEq0nW3FKeJPGPjRp1Iz2QUuLUu66txG9NLVSK3gBZ+C1lcE54oqKOOCK6rm8QU2unu+u1ANuNynvFsBAG1ubbdMQ5eGviMAFDuP0w3sfMpvQEtb24fOQncU1bXl8R7JnOu+ZNv97XxKJwY6+PNPsrm13drObVqUMlMIU5OWpVHOc96Go5lTnV2fzC/VfAozD7HTCa6olBBa1Imlhbmq2lLuQ5xaW6nCPfnln0Yt7bDUhzhps8cfKH5//uTXmvS81OeLdqI/ZoROzSZrHqG/OvOPzxuhK5VgJTvV2bW3EdqJRABwrvvS/kfoSkoZvXT1YEbociHr7vnuYEfogpBFL109HKH/h0fomnXg3Lff79r7/MmvVbWG7gX4QObzc99+Tz7mHKah05KcW6ahQ9feS6cbMCdgt7eBWJagjCuUAC5tZzuouuo0Spm0hElc9R4cbf4bVl8v1p6WUmCuqEwIs34ruxaeeTy4uJVd67As08UVlVmWoG5vA7FLG3WMmHEupVTyW+vh2cn4DADMTsaTuc21LiGEhzHOnQ6gNtMrJSBMCKHkNt999WLi0S7hejEZH81n174WpukiIMw0dKq66p3Bw50RwhUVXFGJKUy28Xal48VkfKrSlWenhsc23q2cEB9SR7iiItwZIbbgHn8AlDFCCMW7laXjqZnHjkNpaubJzNuVpWZCKChjxOMPVH/QlaW0f/G3ZLqWWl6ce/bvlddp7yFD/w8Z+njoX1+GoZMjgzMAMDkyeLAMnRh+uKveJ0YGD4ahEyODFRk6OfrL/hj67GnckaHPng7vjaGzyYmaGDr77KktQ38H8tqx8Wja+WIAAAAASUVORK5CYII=)!important}.emojionearea.emojionearea-standalone .emojionearea-editor.has-placeholder{background-repeat:no-repeat;background-position:20px 4px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMAQMAAABsu86kAAAABlBMVEUAAAC/v79T5hyIAAAAAXRSTlMAQObYZgAAABNJREFUCNdjYGNgQEb/P4AQqiAASiUEG6Vit44AAAAASUVORK5CYII=)!important}md-date-range{cursor:pointer}md-date-range-picker{display:block;max-width:664px}md-date-range-picker .md-date-range-picker__one-panel{display:block;max-width:340px}.md-date-range-picker [event-key] *{pointer-events:none}.md-date-range-picker{position:relative;background:#fff}.md-date-range-picker__title{text-align:center;font-size:1rem;background:#106cc8;color:#fff;margin:0;padding:16px 0}.md-date-range-picker__month-year{text-align:center;font-size:1rem;background:#eee;margin:0;padding:0 0}.md-date-range-picker__month-year .md-select-icon{display:none}.md-date-range-picker__month-year md-select{margin:10px 0}.md-date-range-picker__templates{background:#eee}.md-date-range-picker__calendar-wrapper{padding:0 0;width:308px;min-width:308px}.md-date-range-picker__week{background:#e0e0e0}.md-date-range-picker__calendar__grid{font-size:13px;color:#222;padding:0;display:inline-block;width:44px;height:44px;line-height:44px;text-align:center;position:relative;outline:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:50%;background:rgba(2550,255,255,0)}.md-date-range-picker__calendar .md-date-range-picker__calendar__grid{cursor:pointer}.md-date-range-picker__calendar__not-in-active-month{color:rgba(0,0,0,.5)}.md-date-range-picker__calendar .md-date-range-picker__calendar__grid:hover:not(.md-date-range-picker__calendar__selected):not(.md-date-range-picker__calendar__disabled){transition:background .3s ease-out;background:rgba(0,0,0,.1)}.md-date-range-picker__calendar__selected{background:#106cc8;color:#fff;border-radius:0}.md-date-range-picker__calendar__selected.md-date-range-picker__calendar__disabled{background:rgba(0,0,0,.2)}.md-date-range-picker__calendar__not-in-active-month.md-date-range-picker__calendar__selected{color:rgba(255,255,255,.2)}.md-date-range-picker__calendar__today{font-weight:700}.md-date-range-picker__calendar .md-date-range-picker__calendar__grid.md-date-range-picker__calendar__disabled{opacity:.3;cursor:not-allowed}.md-date-range-picker__calendar__start{border-top-left-radius:50%;border-bottom-left-radius:50%}.md-date-range-picker__calendar__end{border-top-right-radius:50%;border-bottom-right-radius:50%}.md-date-range-picker__select{z-index:100}.md-date-range-picker__calendar__selection{pointer-events:none}.angucomplete-holder{position:relative}.angucomplete-dropdown{border-color:#ececec;border-width:1px;border-style:solid;border-radius:2px;width:250px;padding:6px;cursor:pointer;z-index:9999;position:absolute;margin-top:-6px;background-color:#fff}.angucomplete-searching{color:#acacac;font-size:14px}.angucomplete-description{font-size:14px}.angucomplete-row{padding:5px;color:#000;margin-bottom:4px;clear:both}.angucomplete-selected-row{background-color:#add8e6;color:#fff}.angucomplete-image-holder{padding-top:2px;float:left;margin-right:10px;margin-left:5px}.angucomplete-image{height:34px;width:34px;border-radius:50%;border-color:#ececec;border-style:solid;border-width:1px}.angucomplete-image-default{background-position:center;background-size:contain;height:34px;width:34px}/*!
+ */@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url(data:font/ttf;base64,AAEAAAASAQAABAAgR0RFRgUwBPIAAHGoAAAATEdQT1PO9uRJAABx9AAADQ5HU1VClCaeUgAAfwQAAACIT1MvMqCnsaYAAGkIAAAAYGNtYXDigyFaAABqUAAAAzhjdnQgJEEG5QAAcCAAAABMZnBnbWf0XKsAAG2IAAABvGdhc3AACAATAABxnAAAAAxnbHlmCBgu+gAAASwAAGImaGRteAQC+OIAAGloAAAA6GhlYWT4RqsOAABlNAAAADZoaGVhCroGfQAAaOQAAAAkaG10eIFaUZ8AAGVsAAADdmxvY2E6/CGoAABjdAAAAb5tYXhwAw4C+QAAY1QAAAAgbmFtZRBvLKkAAHBsAAABEHBvc3T/bQBkAABxfAAAACBwcmVwdKCP7AAAb0QAAADbAAUAZAAAAygFsAADAAYACQAMAA8AcbIMEBEREjmwDBCwANCwDBCwBtCwDBCwCdCwDBCwDdAAsABFWLACLxuxAhw+WbAARViwAC8bsQAQPlmyBAIAERI5sgUCABESObIHAgAREjmyCAIAERI5sQoM9LIMAgAREjmyDQIAERI5sAIQsQ4M9DAxISERIQMRAQERAQMhATUBIQMo/TwCxDb+7v66AQzkAgP+/gEC/f0FsPqkBQf9fQJ3+xECeP1eAl6IAl4AAgCg//UBewWwAAMADAAvALAARViwAi8bsQIcPlmwAEVYsAsvG7ELED5ZsgYFCitYIdgb9FmyAQYCERI5MDEBIwMzAzQ2MhYUBiImAVunDcLJN2w4OGw3AZsEFfqtLT09Wjs7AAIAiAQSAiMGAAAEAAkAGQCwAy+yAgoDERI5sAIvsAfQsAMQsAjQMDEBAyMTMwUDIxMzARUebwGMAQ4ebwGMBXj+mgHuiP6aAe4AAgB3AAAE0wWwABsAHwCPALAARViwDC8bsQwcPlmwAEVYsBAvG7EQHD5ZsABFWLACLxuxAhA+WbAARViwGi8bsRoQPlmyHQwCERI5fLAdLxiyAAMKK1gh2Bv0WbAE0LAdELAG0LAdELAL0LALL7IIAworWCHYG/RZsAsQsA7QsAsQsBLQsAgQsBTQsB0QsBbQsAAQsBjQsAgQsB7QMDEBIQMjEyM1IRMhNSETMwMhEzMDMxUjAzMVIwMjAyETIQL9/vhQj1DvAQlF/v4BHVKPUgEIUpBSzOdF4ftQkJ4BCEX++AGa/mYBmokBYosBoP5gAaD+YIv+non+ZgIjAWIAAAEAbv8wBBEGnAArAGYAsABFWLAJLxuxCRw+WbAARViwIi8bsSIQPlmyAiIJERI5sAkQsAzQsAkQsBDQsAkQshMBCitYIdgb9FmwAhCyGQEKK1gh2Bv0WbAiELAf0LAiELAm0LAiELIpAQorWCHYG/RZMDEBNCYnJiY1NDY3NTMVFhYVIzQmIyIGFRQWBBYWFRQGBxUjNSYmNTMUFjMyNgNYgZnVw7+nlai7uIZyd36FATGrUcu3lLrTuZKGg5YBd1x+M0HRoaTSFNvcF+zNjaZ7bmZ5Y3eeaqnOE7+/EefGi5Z+AAUAaf/rBYMFxQANABoAJgA0ADgAeACwAEVYsAMvG7EDHD5ZsABFWLAjLxuxIxA+WbADELAK0LAKL7IRBAorWCHYG/RZsAMQshgECitYIdgb9FmwIxCwHdCwHS+wIxCyKgQKK1gh2Bv0WbAdELIxBAorWCHYG/RZsjUjAxESObA1L7I3AyMREjmwNy8wMRM0NjMyFhUVFAYjIiY1FxQWMzI2NTU0JiIGFQE0NiAWFRUUBiAmNRcUFjMyNjU1NCYjIgYVBScBF2mng4Wlp4GCqopYSkdXVpRWAjunAQaop/78qopYSkhWV0lHWf4HaQLHaQSYg6qriEeEp6eLB05lYlVJTmZmUvzRg6moi0eDqaeLBk9lY1VKT2RjVPNCBHJCAAMAZf/sBPMFxAAeACcAMwCFALAARViwCS8bsQkcPlmwAEVYsBwvG7EcED5ZsABFWLAYLxuxGBA+WbIiHAkREjmyKgkcERI5sgMiKhESObIQKiIREjmyEQkcERI5shMcCRESObIZHAkREjmyFhEZERI5sBwQsh8BCitYIdgb9FmyIR8RERI5sAkQsjEBCitYIdgb9FkwMRM0NjcmJjU0NjMyFhUUBgcHATY1MxQHFyMnBgYjIiQFMjcBBwYVFBYDFBc3NjY1NCYjIgZldaVhQsSolsRZb2sBRESne9DeYUrHZ9X+/gHXk3r+nSGnmSJ2dkQyZExSYAGHabB1dpBHpryvhViVUk/+fYKf/6j5c0JF4ktwAakYe4J2jgPlYJBTMFc+Q1lvAAEAZwQhAP0GAAAEABAAsAMvsgIFAxESObACLzAxEwMjEzP9FYEBlQWR/pAB3wABAIX+KgKVBmsAEQAJALAOL7AELzAxEzQSEjcXBgIDBxATFhcHJicChXnwgSaSuwkBjVV1JoV57AJP4gGgAVRGenD+NP7jVf5+/uSqYHFKrgFUAAABACb+KgI3BmsAEQAJALAOL7AELzAxARQCAgcnNhITNTQCAic3FhISAjd18YQnmrsCWJ1iJ4TvdwJF3/5n/qZJcXYB8QEvINIBaQEeUHFJ/qr+ZAABABwCYQNVBbAADgAgALAARViwBC8bsQQcPlmwANAZsAAvGLAJ0BmwCS8YMDEBJTcFAzMDJRcFEwcDAycBSv7SLgEuCZkKASku/s3GfLq0fQPXWpdwAVj+o26YW/7xXgEg/udbAAABAE4AkgQ0BLYACwAaALAJL7AA0LAJELIGAQorWCHYG/RZsAPQMDEBIRUhESMRITUhETMCngGW/mq6/moBlroDDa/+NAHMrwGpAAEAHf7eATQA2wAIABcAsAkvsgQFCitYIdgb9FmwANCwAC8wMRMnNjc1MxUUBoZpXgS1Y/7eSIOLp5FlygAAAQAlAh8CDQK2AAMAEQCwAi+yAQEKK1gh2Bv0WTAxASE1IQIN/hgB6AIflwABAJD/9QF2ANEACQAbALAARViwBy8bsQcQPlmyAgUKK1gh2Bv0WTAxNzQ2MhYVFAYiJpA5cjs7cjlhMEBAMC4+PgABABL/gwMQBbAAAwATALAAL7AARViwAi8bsQIcPlkwMRcjATOxnwJgnn0GLQAAAgBz/+wECgXEAA0AGwA5ALAARViwCi8bsQocPlmwAEVYsAMvG7EDED5ZsAoQshEBCitYIdgb9FmwAxCyGAEKK1gh2Bv0WTAxARACIyICAzUQEjMyEhMnNCYjIgYHERQWMzI2NwQK3uzp4ATe7eveA7mEj46CAomLiYUDAm3+u/7EATUBM/cBQQE4/tP+xg3r19be/tjs4dTkAAEAqgAAAtkFtwAGADkAsABFWLAFLxuxBRw+WbAARViwAC8bsQAQPlmyBAAFERI5sAQvsgMBCitYIdgb9FmyAgMFERI5MDEhIxEFNSUzAtm6/osCEh0E0YmoxwAAAQBdAAAEMwXEABcATQCwAEVYsBAvG7EQHD5ZsABFWLAALxuxABA+WbIXAQorWCHYG/RZsALQsgMQFxESObAQELIJAQorWCHYG/RZsBAQsAzQshUXEBESOTAxISE1ATY2NTQmIyIGFSM0JDMyFhUUAQEhBDP8RgH4cFWKc4qZuQED2cvs/u7+egLbhQIwf59VcpKdjMn41bHX/tf+WQABAF7/7AP5BcQAJgB4ALAARViwDS8bsQ0cPlmwAEVYsBkvG7EZED5ZsgANGRESObAAL7LPAAFdsp8AAXGyLwABXbJfAAFysA0QsgYBCitYIdgb9FmwDRCwCdCwABCyJgEKK1gh2Bv0WbITJgAREjmwGRCwHNCwGRCyHwEKK1gh2Bv0WTAxATM2NjUQIyIGFSM0NjMyFhUUBgcWFhUUBCAkNTMUFjMyNjU0JicjAYaLg5b/eI+5/cPO6ntqeIP/AP5m/v+6ln6GjpyTiwMyAoZyAQCJca3l2sJfsiwmsH/E5t62c4qMg3+IAgACADUAAARQBbAACgAOAEkAsABFWLAJLxuxCRw+WbAARViwBC8bsQQQPlmyAQkEERI5sAEvsgIBCitYIdgb9FmwBtCwARCwC9CyCAYLERI5sg0JBBESOTAxATMVIxEjESE1ATMBIREHA4bKyrr9aQKMxf2BAcUWAemX/q4BUm0D8fw5AsooAAEAmv/sBC0FsAAdAGEAsABFWLABLxuxARw+WbAARViwDS8bsQ0QPlmwARCyBAEKK1gh2Bv0WbIHDQEREjmwBy+yGgEKK1gh2Bv0WbIFBxoREjmwDRCwEdCwDRCyFAEKK1gh2Bv0WbAHELAd0DAxExMhFSEDNjMyEhUUAiMiJiczFhYzMjY1NCYjIgcHzkoC6v2zLGuIx+rz2sH0Ea8RkHaBk5+EeUUxAtoC1qv+cz/++eDh/v3WvX1/sJuSsTUoAAIAhP/sBBwFsQAUACEATgCwAEVYsAAvG7EAHD5ZsABFWLANLxuxDRA+WbAAELIBAQorWCHYG/RZsgcNABESObAHL7IVAQorWCHYG/RZsA0QshwBCitYIdgb9FkwMQEVIwYEBzYzMhIVFAIjIgA1NRAAJQMiBgcVFBYzMjY1NCYDTyLY/wAUc8e+4/XO0f78AVcBU9JfoB+ieX2PkQWxnQT44YT+9NTh/vIBQf1HAZIBqQX9cHJWRLTcuJWWuQABAE0AAAQlBbAABgAyALAARViwBS8bsQUcPlmwAEVYsAEvG7EBED5ZsAUQsgMBCitYIdgb9FmyAAMFERI5MDEBASMBITUhBCX9pcICWfzsA9gFSPq4BRiYAAADAHD/7AQOBcQAFwAhACsAYQCwAEVYsBUvG7EVHD5ZsABFWLAJLxuxCRA+WbInCRUREjmwJy+yzycBXbIaAQorWCHYG/RZsgMaJxESObIPJxoREjmwCRCyHwEKK1gh2Bv0WbAVELIiAQorWCHYG/RZMDEBFAYHFhYVFAYjIiY1NDY3JiY1NDYzMhYDNCYiBhQWMzI2ASIGFRQWMjY0JgPsc2Jyhf/Q0v2BcmFw7MHA7Zeb+peTg4KU/upth4XehYoENG2qMDG8d73g4bx2vjEwqmy42Nj8oXqamPiOjwQah3RviYnejAAAAgBk//8D+AXEABcAJABYALAARViwCy8bsQscPlmwAEVYsBMvG7ETED5ZsgMTCxESObADL7IAAwsREjmwExCyFAEKK1gh2Bv0WbADELIYAQorWCHYG/RZsAsQsh8BCitYIdgb9FkwMQEGBiMiJiY1NDY2MzISERUQAAUjNTM2NiUyNjc1NCYjIgYVFBYDPjqhYH67Zm/MiNj5/rD+rSQn5fb+7l2dJJ55epSPAoBFVHzhiJLqfP69/uk2/lf+eQWcBOf6clRKtuS7mZXBAP//AIb/9QFtBEQAJgAS9gABBwAS//cDcwAQALAARViwDS8bsQ0YPlkwMf//ACn+3gFVBEQAJwAS/98DcwEGABAMAAAQALAARViwAy8bsQMYPlkwMQABAEgAwwN6BEoABgAWALAARViwBS8bsQUYPlmwAtCwAi8wMQEFFQE1ARUBCAJy/M4DMgKE/cQBe5IBesQAAAIAmAGPA9oDzwADAAcAJQCwBy+wA9CwAy+yAAEKK1gh2Bv0WbAHELIEAQorWCHYG/RZMDEBITUhESE1IQPa/L4DQvy+A0IDLqH9wKAAAAEAhgDEA9wESwAGABYAsABFWLACLxuxAhg+WbAF0LAFLzAxAQE1ARUBNQMb/WsDVvyqAooBA77+hpL+hcAAAgBL//UDdgXEABgAIQBRALAARViwEC8bsRAcPlmwAEVYsCAvG7EgED5ZshsFCitYIdgb9FmyABsQERI5sgQQABESObAQELIJAQorWCHYG/RZsBAQsAzQshUAEBESOTAxATY2Nzc2NTQmIyIGFSM2NjMyFhUUBwcGFQM0NjIWFAYiJgFlAjJNg1RuaWZ8uQLjtr3Tom1JwTdsODhsNwGad4pUh19taXdsW6LHy7GvqmxRmP7DLT09Wjs7AAACAGr+OwbWBZcANQBCAGgAsDIvsABFWLAILxuxCBA+WbAD0LIPMggREjmwDy+yBQgPERI5sAgQsjkCCitYIdgb9FmwFdCwMhCyGwIKK1gh2Bv0WbAIELAq0LAqL7IjAgorWCHYG/RZsA8QskACCitYIdgb9FkwMQEGAiMiJwYGIyImNzYSNjMyFhcDBjMyNjcSACEiBAIHBhIEMzI2NxcGBiMiJAITEhIkMzIEEgEGFjMyNjc3EyYjIgYGygzYtbs1NotKjpITD3m/aVGAUDQTk3GMBhP+uf6yyf7ItAsMkAEn0Vq1PCU+zWn6/pizDAzeAXzv+QFkrvvyDlFYPG8kAS44QHWZAfby/uioVVPozaUBA5QrP/3W5+C0AYUBmMf+iPb4/pPBLCNzJzLhAacBGwETAbfv4P5a/pCOmGZfCQH3He4AAAIAHAAABR0FsAAHAAoARgCwAEVYsAQvG7EEHD5ZsABFWLACLxuxAhA+WbAARViwBi8bsQYQPlmyCQQCERI5sAkvsgABCitYIdgb9FmyCgQCERI5MDEBIQMjATMBIwEhAwPN/Z6JxgIsqAItxf1NAe/4AXz+hAWw+lACGgKpAAMAqQAABIgFsAAOABYAHwBVALAARViwAS8bsQEcPlmwAEVYsAAvG7EAED5ZshcAARESObAXL7IPAQorWCHYG/RZsggPFxESObAAELIQAQorWCHYG/RZsAEQsh8BCitYIdgb9FkwMTMRITIWFRQGBxYWFRQGIwERITI2NRAhJSEyNjU0JiMhqQHc7e90ZHaJ/uj+xwE9hpv+4v7AASJ+l4yP/uQFsMTAZp0rIbmAxOACqf30i3oBB5p+bHhtAAABAHf/7ATYBcQAHABFALAARViwCy8bsQscPlmwAEVYsAMvG7EDED5ZsAsQsA/QsAsQshIBCitYIdgb9FmwAxCyGQEKK1gh2Bv0WbADELAc0DAxAQYEIyAAETU0EiQzMgAXIyYmIyICFRUUEjMyNjcE2Bv+4e7+/v7JkQEKr+gBGBfBGaeWuNHGsqCrHAHO5/sBcgE2jMsBNKX+/eWunP7w+43t/uiRtAACAKkAAATGBbAACwAVADkAsABFWLABLxuxARw+WbAARViwAC8bsQAQPlmwARCyDAEKK1gh2Bv0WbAAELINAQorWCHYG/RZMDEzESEyBBIXFRQCBAcDETMyEjU1NAInqQGbvgEknwGf/tnE08re9+nWBbCo/srJXc7+yqYCBRL7iwEU/1X4ARMCAAABAKkAAARGBbAACwBOALAARViwBi8bsQYcPlmwAEVYsAQvG7EEED5ZsgsEBhESObALL7IAAQorWCHYG/RZsAQQsgIBCitYIdgb9FmwBhCyCAEKK1gh2Bv0WTAxASERIRUhESEVIREhA+D9iQLd/GMDk/0tAncCof38nQWwnv4sAAEAqQAABC8FsAAJAEAAsABFWLAELxuxBBw+WbAARViwAi8bsQIQPlmyCQIEERI5sAkvsgABCitYIdgb9FmwBBCyBgEKK1gh2Bv0WTAxASERIxEhFSERIQPM/Z3AA4b9OgJjAoP9fQWwnv4OAAEAev/sBNwFxAAfAGIAsABFWLALLxuxCxw+WbAARViwAy8bsQMQPlmwCxCwD9CwCxCyEQEKK1gh2Bv0WbADELIYAQorWCHYG/RZsh4DCxESObAeL7QPHh8eAl20Px5PHgJdsh0BCitYIdgb9FkwMSUGBCMiJAInNRAAITIEFyMCISICAxUUEjMyNjcRITUhBNxK/vewsv7slwIBMwEW5AEWH8A2/t7BxwHgv2yiNf6vAhC/ammnATTLfwFJAWrp1gEh/vH+/3f1/t8wOQFHnAABAKkAAAUIBbAACwBVALAARViwBi8bsQYcPlmwAEVYsAovG7EKHD5ZsABFWLAALxuxABA+WbAARViwBC8bsQQQPlmwABCwCdCwCS+ynwkBcrIvCQFdsgIBCitYIdgb9FkwMSEjESERIxEzESERMwUIwf0iwMAC3sECof1fBbD9jgJyAAABALcAAAF3BbAAAwAdALAARViwAi8bsQIcPlmwAEVYsAAvG7EAED5ZMDEhIxEzAXfAwAWwAAABADX/7APMBbAADwAuALAARViwAC8bsQAcPlmwAEVYsAUvG7EFED5ZsAnQsAUQsgwBCitYIdgb9FkwMQEzERQGIyImNTMUFjMyNjcDC8H70dnywImCd5MBBbD7+dHs3sh9jJaHAAABAKkAAAUFBbAACwB0ALAARViwBS8bsQUcPlmwAEVYsAcvG7EHHD5ZsABFWLACLxuxAhA+WbAARViwCy8bsQsQPlmyAAIFERI5QBFKAFoAagB6AIoAmgCqALoACF2yOQABXbIGBQIREjlAEzYGRgZWBmYGdgaGBpYGpga2BgldMDEBBxEjETMRATMBASMCG7LAwAKH6P3DAmrmAqW5/hQFsP0wAtD9ffzTAAEAqQAABBwFsAAFACgAsABFWLAELxuxBBw+WbAARViwAi8bsQIQPlmyAAEKK1gh2Bv0WTAxJSEVIREzAWoCsvyNwZ2dBbAAAAEAqQAABlIFsAAOAFkAsABFWLAALxuxABw+WbAARViwAi8bsQIcPlmwAEVYsAQvG7EEED5ZsABFWLAILxuxCBA+WbAARViwDC8bsQwQPlmyAQAEERI5sgcABBESObIKAAQREjkwMQkCMxEjERMBIwETESMRAaEB3AHc+cAS/iKT/iMTwAWw+1wEpPpQAjcCZPtlBJj9n/3JBbAAAAEAqQAABQgFsAAJAEyyAQoLERI5ALAARViwBS8bsQUcPlmwAEVYsAgvG7EIHD5ZsABFWLAALxuxABA+WbAARViwAy8bsQMQPlmyAgUAERI5sgcFABESOTAxISMBESMRMwERMwUIwf0jwcEC378EYvueBbD7mQRnAAIAdv/sBQkFxAARAB8AOQCwAEVYsA0vG7ENHD5ZsABFWLAELxuxBBA+WbANELIVAQorWCHYG/RZsAQQshwBCitYIdgb9FkwMQEUAgQjIiQCJzU0EiQzMgQSFScQAiMiAgcVFBIzMhI3BQmQ/viwrP72kwKSAQusrwELkL/Qu7bRA9O5uswDAqnW/sGoqQE5zmnSAUKrqf6/1QIBAwEV/uv2a/v+4QEP/QAAAgCpAAAEwAWwAAoAEwBNsgoUFRESObAKELAM0ACwAEVYsAMvG7EDHD5ZsABFWLABLxuxARA+WbILAwEREjmwCy+yAAEKK1gh2Bv0WbADELISAQorWCHYG/RZMDEBESMRITIEFRQEIyUhMjY1NCYnIQFpwAIZ7wEP/vf3/qkBWZqkpI/+nAI6/cYFsPTJ1OWdkYmCnAMAAgBt/woFBgXEABUAIgBNsggjJBESObAIELAZ0ACwAEVYsBEvG7ERHD5ZsABFWLAILxuxCBA+WbIDCBEREjmwERCyGQEKK1gh2Bv0WbAIELIgAQorWCHYG/RZMDEBFAIHBQclBiMiJAInNTQSJDMyBBIVJxACIyICBxUUEiASNwUBhnkBBIP+zUhQrP72kwKSAQussAELkMDNvrXRA9EBdMwDAqnT/s9WzHn0EqkBOc5p0gFCq6r+wdUBAQEBF/7r9mv6/uABD/0AAAIAqAAABMkFsAAOABcAYbIFGBkREjmwBRCwFtAAsABFWLAELxuxBBw+WbAARViwAi8bsQIQPlmwAEVYsA0vG7ENED5ZshAEAhESObAQL7IAAQorWCHYG/RZsgsABBESObAEELIWAQorWCHYG/RZMDEBIREjESEyBBUUBgcBFSMBITI2NTQmJyECv/6qwQHi9gEJk4MBVs79bgEnj6mhmP7aAk39swWw4NaIyjL9lgwC6pR8h5ABAAABAFD/7ARyBcQAJgBhsgAnKBESOQCwAEVYsAYvG7EGHD5ZsABFWLAaLxuxGhA+WbAGELAL0LAGELIOAQorWCHYG/RZsiYaBhESObAmELIUAQorWCHYG/RZsBoQsB/QsBoQsiIBCitYIdgb9FkwMQEmJjU0JDMyFhYVIzQmIyIGFRQWBBYWFRQEIyIkJjUzFBYzMjY0JgJW9+EBE9yW64HBqJmOn5cBa81j/uznlv78jcHDo5iilgKJR8+YrOF0zHmEl31vWXtme6RvsdVzyH+EmXzWdQAAAQAxAAAElwWwAAcALgCwAEVYsAYvG7EGHD5ZsABFWLACLxuxAhA+WbAGELIAAQorWCHYG/RZsATQMDEBIREjESE1IQSX/iy//i0EZgUS+u4FEp4AAQCM/+wEqgWwABIAPLIFExQREjkAsABFWLAALxuxABw+WbAARViwCS8bsQkcPlmwAEVYsAUvG7EFED5Zsg4BCitYIdgb9FkwMQERBgAHByIAJxEzERQWMzI2NREEqgH+/9wz7/7kAr6uoaOtBbD8Is7++hACAQLiA+D8Jp6vrp4D2wAAAQAcAAAE/QWwAAYAOLIABwgREjkAsABFWLABLxuxARw+WbAARViwBS8bsQUcPlmwAEVYsAMvG7EDED5ZsgABAxESOTAxJQEzASMBMwKLAaDS/eSq/eXR/wSx+lAFsAAAAQA9AAAG7QWwABIAWQCwAEVYsAMvG7EDHD5ZsABFWLAILxuxCBw+WbAARViwES8bsREcPlmwAEVYsAovG7EKED5ZsABFWLAPLxuxDxA+WbIBAwoREjmyBgMKERI5sg0DChESOTAxARc3ATMBFzcTMwEjAScHASMBMwHjHCkBIKIBGSgf4sH+n6/+1BcX/smv/qDAAcvArQP4/AiwxAPk+lAEJW9v+9sFsAABADkAAATOBbAACwBrALAARViwAS8bsQEcPlmwAEVYsAovG7EKHD5ZsABFWLAELxuxBBA+WbAARViwBy8bsQcQPlmyAAEEERI5QAmGAJYApgC2AARdsgYBBBESOUAJiQaZBqkGuQYEXbIDAAYREjmyCQYAERI5MDEBATMBASMBASMBATMChAFd4v40Adfk/pr+mOMB2P4z4QOCAi79Lv0iAjj9yALeAtIAAAEADwAABLsFsAAIADEAsABFWLABLxuxARw+WbAARViwBy8bsQccPlmwAEVYsAQvG7EEED5ZsgABBBESOTAxAQEzAREjEQEzAmUBfNr+CsD+CtwC1QLb/G/94QIfA5EAAAEAVgAABHoFsAAJAEQAsABFWLAHLxuxBxw+WbAARViwAi8bsQIQPlmyAAEKK1gh2Bv0WbIEAAIREjmwBxCyBQEKK1gh2Bv0WbIJBQcREjkwMSUhFSE1ASE1IRUBOQNB+9wDHvzvA/ednZAEgp6NAAABAJL+yAILBoAABwAiALAEL7AHL7IAAQorWCHYG/RZsAQQsgMBCitYIdgb9FkwMQEjETMVIREhAgu/v/6HAXkF6Pl4mAe4AAABACj/gwM4BbAAAwATALACL7AARViwAC8bsQAcPlkwMRMzASMosAJgsAWw+dMAAQAJ/sgBgwaAAAcAJQCwAi+wAS+wAhCyBQEKK1gh2Bv0WbABELIGAQorWCHYG/RZMDETIREhNTMRIwkBev6GwcEGgPhImAaIAAABAEAC2QMUBbAABgAnsgAHCBESOQCwAEVYsAMvG7EDHD5ZsADQsgEHAxESObABL7AF0DAxAQMjATMBIwGqvqwBK38BKqsEu/4eAtf9KQABAAT/aQOYAAAAAwAbALAARViwAy8bsQMQPlmyAAEKK1gh2Bv0WTAxBSE1IQOY/GwDlJeXAAABADkE2AHaBf4AAwAjALABL7IPAQFdsADQGbAALxiwARCwAtCwAi+0DwIfAgJdMDEBIwEzAdqf/v7fBNgBJgAAAgBt/+wD6gROAB4AKAB5shcpKhESObAXELAg0ACwAEVYsBcvG7EXGD5ZsABFWLAELxuxBBA+WbAARViwAC8bsQAQPlmyAhcEERI5sgsXBBESObALL7AXELIPAQorWCHYG/RZshILFxESObAEELIfAQorWCHYG/RZsAsQsiMBCitYIdgb9FkwMSEmJwYjIiY1NCQzMzU0JiMiBhUjNDY2MzIWFxEUFxUlMjY3NSMgFRQWAygQCoGzoM0BAem0dHFjhrpzxXa71AQm/gtXnCOR/qx0IFKGtYupu1Vhc2RHUZdYu6T+DpVYEI1aSN7HV2IAAgCM/+wEIAYAAA4AGQBkshIaGxESObASELAD0ACwCC+wAEVYsAwvG7EMGD5ZsABFWLADLxuxAxA+WbAARViwBi8bsQYQPlmyBQgDERI5sgoMAxESObAMELISAQorWCHYG/RZsAMQshcBCitYIdgb9FkwMQEUAiMiJwcjETMRNiASESc0JiMiBxEWMzI2BCDkwM1wCaq5cAGK4bmSibdQVbSFlAIR+P7TkX0GAP3Di/7W/v0Fvc6q/iyqzgABAFz/7APsBE4AHQBJshAeHxESOQCwAEVYsBAvG7EQGD5ZsABFWLAILxuxCBA+WbIAAQorWCHYG/RZsAgQsAPQsBAQsBTQsBAQshcBCitYIdgb9FkwMSUyNjczDgIjIgARNTQ2NjMyFhcjJiYjIgYVFRQWAj5jlAivBXbFbt3++3TZlLbxCK8Ij2mNm5qDeFpdqGQBJwEAH572iNquaYfLwCO7ygAAAgBf/+wD8AYAAA8AGgBkshgbHBESObAYELAD0ACwBi+wAEVYsAMvG7EDGD5ZsABFWLAMLxuxDBA+WbAARViwCC8bsQgQPlmyBQMMERI5sgoDDBESObAMELITAQorWCHYG/RZsAMQshgBCitYIdgb9FkwMRM0EjMyFxEzESMnBiMiAjUXFBYzMjcRJiMiBl/sv75vuaoJb8a87bmYhrBRU6yImAIm+QEvggI0+gB0iAE0+Ae40J4B8ZnSAAACAF3/7APzBE4AFQAdAGmyCB4fERI5sAgQsBbQALAARViwCC8bsQgYPlmwAEVYsAAvG7EAED5ZshoIABESObAaL7S/Gs8aAl2yDAEKK1gh2Bv0WbAAELIQAQorWCHYG/RZshMIABESObAIELIWAQorWCHYG/RZMDEFIgA1NTQ2NjMyEhEVIRYWMzI2NxcGASIGByE1JiYCTdz+7HvdgdPq/SMEs4piiDNxiP7ZcJgSAh4IiBQBIfIiof2P/ur+/U2gxVBCWNEDyqOTDo2bAAEAPAAAAsoGFQAVAGOyDxYXERI5ALAARViwCC8bsQgePlmwAEVYsAMvG7EDGD5ZsABFWLARLxuxERg+WbAARViwAC8bsQAQPlmwAxCyAQEKK1gh2Bv0WbAIELINAQorWCHYG/RZsAEQsBPQsBTQMDEzESM1MzU0NjMyFwcmIyIGFRUzFSMR56uruqpAPwovNVpi5+cDq49vrr4RlglpYnKP/FUAAgBg/lYD8gROABkAJACDsiIlJhESObAiELAL0ACwAEVYsAMvG7EDGD5ZsABFWLAGLxuxBhg+WbAARViwCy8bsQsSPlmwAEVYsBcvG7EXED5ZsgUDFxESObIPFwsREjmwCxCyEQEKK1gh2Bv0WbIVAxcREjmwFxCyHQEKK1gh2Bv0WbADELIiAQorWCHYG/RZMDETNBIzMhc3MxEUBiMiJic3FjMyNjU1BiMiAjcUFjMyNxEmIyIGYOrBxm8JqfnSdeA7YHesh5dvwL7rupaHr1JVqoeYAib9ASuMePvg0vJkV2+TmIpdgAEy87fRnwHum9IAAAEAjAAAA98GAAARAEmyChITERI5ALAQL7AARViwAi8bsQIYPlmwAEVYsAUvG7EFED5ZsABFWLAOLxuxDhA+WbIAAgUREjmwAhCyCgEKK1gh2Bv0WTAxATYzIBMRIxEmJiMiBgcRIxEzAUV7xQFXA7kBaW9aiCa5uQO3l/59/TUCzHVwYE78/QYAAAIAjQAAAWgFxAADAAwAPrIGDQ4REjmwBhCwAdAAsABFWLACLxuxAhg+WbAARViwAC8bsQAQPlmwAhCwCtCwCi+yBgUKK1gh2Bv0WTAxISMRMwM0NjIWFAYiJgFVubnIN2w4OGw3BDoBHy0+Plo8PAAC/7/+SwFZBcQADAAWAEmyEBcYERI5sBAQsADQALAARViwDC8bsQwYPlmwAEVYsAMvG7EDEj5ZsggBCitYIdgb9FmwDBCwFdCwFS+yEAUKK1gh2Bv0WTAxAREQISInNRYzMjY1EQM0NjMyFhQGIiYBS/7lPTQgND5BEzc1Njg4bDYEOvtJ/sgSlAhDUwS7AR8sPz5aPDwAAAEAjQAABAwGAAAMAHUAsABFWLAELxuxBB4+WbAARViwCC8bsQgYPlmwAEVYsAIvG7ECED5ZsABFWLALLxuxCxA+WbIACAIREjlAFToASgBaAGoAegCKAJoAqgC6AMoACl2yBggCERI5QBU2BkYGVgZmBnYGhgaWBqYGtgbGBgpdMDEBBxEjETMRNwEzAQEjAbp0ubljAVHh/lsB1tkB9Xn+hAYA/F93AWT+PP2KAAEAnAAAAVUGAAADAB0AsABFWLACLxuxAh4+WbAARViwAC8bsQAQPlkwMSEjETMBVbm5BgAAAAEAiwAABngETgAdAHeyBB4fERI5ALAARViwAy8bsQMYPlmwAEVYsAgvG7EIGD5ZsABFWLAALxuxABg+WbAARViwCy8bsQsQPlmwAEVYsBQvG7EUED5ZsABFWLAbLxuxGxA+WbIBCAsREjmyBQgLERI5sAgQshABCitYIdgb9FmwGNAwMQEXNjMyFzY2MyATESMRNCYjIgYHESMRNCMiBxEjEQE6BXfK41I2rXYBZAa5an1niAu657ZDuQQ6eIyuTmD+h/0rAsp0c3to/TICxeyb/OoEOgABAIwAAAPfBE4AEQBTsgsSExESOQCwAEVYsAMvG7EDGD5ZsABFWLAALxuxABg+WbAARViwBi8bsQYQPlmwAEVYsA8vG7EPED5ZsgEDBhESObADELILAQorWCHYG/RZMDEBFzYzIBMRIxEmJiMiBgcRIxEBOwZ8yAFXA7kBaW9aiCa5BDqInP59/TUCzHVwYE78/QQ6AAACAFv/7AQ0BE4ADwAbAEOyDBwdERI5sAwQsBPQALAARViwBC8bsQQYPlmwAEVYsAwvG7EMED5ZshMBCitYIdgb9FmwBBCyGQEKK1gh2Bv0WTAxEzQ2NjMyABUVFAYGIyIANRcUFjMyNjU0JiMiBlt934/dARF54ZLc/u+6p4yNpqmMiagCJ5/+iv7O/g2e+4wBMvwJtNrdx7Ld2gACAIz+YAQeBE4ADwAaAG6yExscERI5sBMQsAzQALAARViwDC8bsQwYPlmwAEVYsAkvG7EJGD5ZsABFWLAGLxuxBhI+WbAARViwAy8bsQMQPlmyBQwDERI5sgoMAxESObAMELITAQorWCHYG/RZsAMQshgBCitYIdgb9FkwMQEUAiMiJxEjETMXNjMyEhEnNCYjIgcRFjMyNgQe4sHFcbmpCXHJw+O5nIioVFOrhZ0CEff+0n399wXaeIz+2v76BLfUlf37lNMAAAIAX/5gA+8ETgAPABoAa7IYGxwREjmwGBCwA9AAsABFWLADLxuxAxg+WbAARViwBi8bsQYYPlmwAEVYsAgvG7EIEj5ZsABFWLAMLxuxDBA+WbIFAwwREjmyCgMMERI5shMBCitYIdgb9FmwAxCyGAEKK1gh2Bv0WTAxEzQSMzIXNzMRIxEGIyICNRcUFjMyNxEmIyIGX+rFwG8IqrlwusTpuZ2FpVdYooaeAib/ASmBbfomAgR4ATH8CLrUkgISj9UAAQCMAAAClwROAA0ARrIEDg8REjkAsABFWLALLxuxCxg+WbAARViwCC8bsQgYPlmwAEVYsAUvG7EFED5ZsAsQsgIBCitYIdgb9FmyCQsFERI5MDEBJiMiBxEjETMXNjMyFwKXKjG2Qbm0A1unNhwDlAeb/QAEOn2RDgABAF//7AO7BE4AJgBhsgknKBESOQCwAEVYsAkvG7EJGD5ZsABFWLAcLxuxHBA+WbIDHAkREjmwCRCwDdCwCRCyEAEKK1gh2Bv0WbADELIVAQorWCHYG/RZsBwQsCHQsBwQsiQBCitYIdgb9FkwMQE0JiQmJjU0NjMyFhUjNCYjIgYVFBYEFhYVFAYjIiYmNTMWFjMyNgMCcf7npU/hr7jluoFiZXJqARWsU+i5gshxuQWLcml/AR9LUzxUdFCFuL6UTG5YR0NEPlZ5V5GvXKVgXW1VAAEACf/sAlYFQAAVAF+yDhYXERI5ALAARViwAS8bsQEYPlmwAEVYsBMvG7ETGD5ZsABFWLANLxuxDRA+WbABELAA0LAAL7ABELIDAQorWCHYG/RZsA0QsggBCitYIdgb9FmwAxCwEdCwEtAwMQERMxUjERQWMzI3FQYjIiY1ESM1MxEBh8rKNkEgOElFfH7FxQVA/vqP/WFBQQyWFJaKAp+PAQYAAQCI/+wD3AQ6ABAAU7IKERIREjkAsABFWLAGLxuxBhg+WbAARViwDS8bsQ0YPlmwAEVYsAIvG7ECED5ZsABFWLAQLxuxEBA+WbIADQIREjmwAhCyCgEKK1gh2Bv0WTAxJQYjIiYnETMRFDMyNxEzESMDKGzRrbUBucjURrmwa3/JxQLA/UX2ngMT+8YAAAEAIQAAA7oEOgAGADiyAAcIERI5ALAARViwAS8bsQEYPlmwAEVYsAUvG7EFGD5ZsABFWLADLxuxAxA+WbIABQMREjkwMSUBMwEjATMB8QEMvf58jf54vfsDP/vGBDoAAAEAKwAABdMEOgAMAGCyBQ0OERI5ALAARViwAS8bsQEYPlmwAEVYsAgvG7EIGD5ZsABFWLALLxuxCxg+WbAARViwAy8bsQMQPlmwAEVYsAYvG7EGED5ZsgALAxESObIFCwMREjmyCgsDERI5MDElEzMBIwEBIwEzExMzBErQuf7Flv75/wCW/sa41fyV/wM7+8YDNPzMBDr81gMqAAEAKQAAA8oEOgALAFMAsABFWLABLxuxARg+WbAARViwCi8bsQoYPlmwAEVYsAQvG7EEED5ZsABFWLAHLxuxBxA+WbIACgQREjmyBgoEERI5sgMABhESObIJBgAREjkwMQETMwEBIwMDIwEBMwH38Nj+ngFt1vr61wFt/p7WAq8Bi/3p/d0Blf5rAiMCFwABABb+SwOwBDoADwBJsgAQERESOQCwAEVYsAEvG7EBGD5ZsABFWLAOLxuxDhg+WbAARViwBS8bsQUSPlmyAA4FERI5sgkBCitYIdgb9FmwABCwDdAwMQETMwECIycnNRcyNjc3ATMB7vzG/k1l3CNFMl5pIin+fsoBDwMr+x/+8gMNlgRMZW4ELgABAFgAAAOzBDoACQBEALAARViwBy8bsQcYPlmwAEVYsAIvG7ECED5ZsgABCitYIdgb9FmyBAACERI5sAcQsgUBCitYIdgb9FmyCQUHERI5MDElIRUhNQEhNSEVAToCefylAlX9tAM0l5eIAxmZgwAAAQBA/pICngY9ABgAMbITGRoREjkAsA0vsAAvsgcNABESObAHL7IfBwFdsgYDCitYIdgb9FmyEwYHERI5MDEBJiY1NTQjNTI1NTY2NxcGERUUBxYVFRIXAnixs9TUAq+zJtGnpwPO/pIy5bzH85Hy0LfhM3ND/ubK41la5c7+7UIAAAEAr/7yAUQFsAADABMAsAAvsABFWLACLxuxAhw+WTAxASMRMwFElZX+8ga+AAABABP+kgJyBj0AGAAxsgUZGhESOQCwCy+wGC+yEQsYERI5sBEvsh8RAV2yEgMKK1gh2Bv0WbIFEhEREjkwMRc2EzU0NyY1NRAnNxYWFxUUMxUiFRUUBgcTywe1tdEmsbIB1NS1r/tBAQrc51RS6csBGkNzMuG50u+R88q84jIAAAEAgwGSBO8DIgAXAEKyERgZERI5ALAARViwDy8bsQ8WPlmwANCwDxCwFNCwFC+yAwEKK1gh2Bv0WbAPELIIAQorWCHYG/RZsAMQsAvQMDEBFAYjIi4CIyIGFQc0NjMyFhYXFzI2NQTvu4lIgKlKKk5UobiLTIywQB1MXwMJntk1lCRrXgKgzkChCgJ0XwACAIv+mAFmBE0AAwAMADKyBg0OERI5sAYQsADQALACL7AARViwCy8bsQsYPlmyBgUKK1gh2Bv0WbIBAgYREjkwMRMzEyMTFAYiJjQ2MhaqqA3CyTdsODhsNwKs++wFTC0+Plo8PAABAGn/CwP5BSYAIQBSsgAiIxESOQCwAEVYsBQvG7EUGD5ZsABFWLAKLxuxChA+WbAH0LIAAQorWCHYG/RZsAoQsAPQsBQQsBHQsBQQsBjQsBQQshsBCitYIdgb9FkwMSUyNjczBgYHFSM1JgI1NTQSNzUzFRYWFyMmJiMiBhUVFBYCSmSUCK8GxpC5s8jKsbmWwAavCI9pjZubg3lZfska6eoiARzcI9QBHSHi3xfUlmmHy8Aju8oAAQBbAAAEaAXEACEAfLIcIiMREjkAsABFWLAULxuxFBw+WbAARViwBS8bsQUQPlmyHxQFERI5sB8vsl8fAXKyjx8BcbK/HwFdsgABCitYIdgb9FmwBRCyAwEKK1gh2Bv0WbAH0LAI0LAAELAN0LAfELAP0LAUELAY0LAUELIbAQorWCHYG/RZMDEBFxQHIQchNTM2Njc1JyM1MwM0NjMyFhUjNCYjIgYVEyEVAcEIPgLdAfv4TSgyAgiloAn1yL7ev39vaYIJAT8CbtyaW52dCYNgCN2dAQTH7tSxa3yaff78nQAAAgBp/+UFWwTxABsAKgA/sgIrLBESObACELAn0ACwAEVYsAIvG7ECED5ZsBDQsBAvsAIQsh8BCitYIdgb9FmwEBCyJwEKK1gh2Bv0WTAxJQYjIicHJzcmNTQ3JzcXNjMyFzcXBxYVFAcXBwEUFhYyNjY1NCYmIyIGBgRPn9HPn4aCi2hwk4KTnsPEn5WEl25mj4T8YHPE4sRxccVwccRzcISCiIeNnMrOo5eIlnh5mImao8vEn5CIAnt71Hp703t603l41AAAAQAfAAAErQWwABYAawCwAEVYsBYvG7EWHD5ZsABFWLABLxuxARw+WbAARViwDC8bsQwQPlmyDxMDK7IADBYREjm0DxMfEwJdsBMQsAPQsBMQshICCitYIdgb9FmwBtCwDxCwB9CwDxCyDgIKK1gh2Bv0WbAK0DAxAQEzASEVIRUhFSERIxEhNSE1ITUhATMCZgFs2/5eATj+gAGA/oDB/oYBev6GATn+XtwDDgKi/TB9pXz+vgFCfKV9AtAAAAIAk/7yAU0FsAADAAcAGACwAC+wAEVYsAYvG7EGHD5ZsgUBAyswMRMRMxERIxEzk7q6uv7yAxf86QPIAvYAAgBa/hEEeQXEADQARACAsiNFRhESObAjELA10ACwCC+wAEVYsCMvG7EjHD5ZshYIIxESObAWELI/AQorWCHYG/RZsgIWPxESObAIELAO0LAIELIRAQorWCHYG/RZsjAjCBESObAwELI3AQorWCHYG/RZsh03MBESObAjELAn0LAjELIqAQorWCHYG/RZMDEBFAcWFhUUBCMiJicmNTcUFjMyNjU0JicuAjU0NyYmNTQkMzIEFSM0JiMiBhUUFhYEHgIlJicGBhUUFhYEFzY2NTQmBHm6RUj+/ORwyUaLurSciKaO0bbAXbZCRwEL3ugBBLmoi46hOIcBH6lxOv3hWktQSzaFARwsTlSLAa+9VTGIZKjHODlxzQKCl3VgWWk+MG+bb7pYMYhkpsjizX2bc2JFUEFQSGGBqxgbE2VFRlBCUhEUZUVYbQAAAgBmBPAC7wXFAAgAEQAdALAHL7ICBQorWCHYG/RZsAvQsAcQsBDQsBAvMDETNDYyFhQGIiYlNDYyFhQGIiZmN2w4OGw3Aa43bDg4bDcFWy09PVo8PCstPj5aPDwAAAMAW//rBeYFxAAbACoAOQCVsic6OxESObAnELAD0LAnELA20ACwAEVYsC4vG7EuHD5ZsABFWLA2LxuxNhA+WbIDNi4REjmwAy+0DwMfAwJdsgouNhESObAKL7QAChAKAl2yDgoDERI5shECCitYIdgb9FmwAxCyGAIKK1gh2Bv0WbIbAwoREjmwNhCyIAQKK1gh2Bv0WbAuELInBAorWCHYG/RZMDEBFAYjIiY1NTQ2MzIWFSM0JiMiBhUVFBYzMjY1JRQSBCAkEjU0AiQjIgQCBzQSJCAEEhUUAgQjIiQCBF+tnp29v5ugrJJfW15sbF5cXf0BoAETAUABEqCe/u2hoP7sn3O7AUsBgAFKu7T+tcbF/rW2AlWZodO2brDTpJVjVYp7cXiKVGWErP7bpqYBJayqASKnpf7cqsoBWsfH/qbKxf6o0c8BWAAAAgCTArMDDwXEABsAJQBssg4mJxESObAOELAd0ACwAEVYsBUvG7EVHD5ZsgQmFRESObAEL7AA0LICBBUREjmyCwQVERI5sAsvsBUQsg4DCitYIdgb9FmyEQsVERI5sAQQshwDCitYIdgb9FmwCxCyIAQKK1gh2Bv0WTAxASYnBiMiJjU0NjMzNTQjIgYVJzQ2MzIWFREUFyUyNjc1IwYGFRQCagwGTIB3gqesbHxFT6GsiYWaGv6kK1gccFNZAsEiJlZ8Z294NIc2Mwxngo+G/sRhUXsoG44BPzNe//8AZgCXA2QDswAmAJr6/gAHAJoBRP/+AAEAfwF3A74DIAAFABoAsAQvsAHQsAEvsAQQsgIBCitYIdgb9FkwMQEjESE1IQO+uv17Az8BdwEIoQAEAFr/6wXlBcQADgAeADQAPQCpsjY+PxESObA2ELAL0LA2ELAT0LA2ELAj0ACwAEVYsAMvG7EDHD5ZsABFWLALLxuxCxA+WbITBAorWCHYG/RZsAMQshsECitYIdgb9FmyIAsDERI5sCAvsiIDCxESObAiL7QAIhAiAl2yNSAiERI5sDUvsr81AV20ADUQNQJdsh8CCitYIdgb9FmyKB81ERI5sCAQsC/QsC8vsCIQsj0CCitYIdgb9FkwMRM0EiQgBBIVFAIEIyIkAjcUEgQzMiQSNTQCJCMiBAIFESMRITIWFRQHFhcVFBcVIyY0JyYnJzM2NjU0JiMjWrsBSwGAAUq7tP61xsX+tbZzoAEToKEBFJ2d/uyhoP7snwHAjQEUmamAegERkQ4DEHOwnEhYTmSKAtnKAVrHx/6mysX+qNHPAVjHrP7bpqkBIqyrASGnpf7c9f6uA1GDfXtBMpo9ViYQJLkRYASAAkI2ST0AAAEAeAUhA0IFsAADABEAsAEvsgIDCitYIdgb9FkwMQEhNSEDQv02AsoFIY8AAgCCA8ACfAXEAAsAFgAvALAARViwAy8bsQMcPlmwDNCwDC+yCQIKK1gh2Bv0WbADELISAgorWCHYG/RZMDETNDYzMhYVFAYjIiYXMjY1NCYjIgYUFoKVamiTk2hplv82Sko2N0tLBMBonJtpapaWFkc5OktPbEoAAgBhAAAD9QTzAAsADwBGALAJL7AARViwDS8bsQ0QPlmwCRCwANCwCRCyBgEKK1gh2Bv0WbAD0LANELIOAQorWCHYG/RZsgUOBhESObQLBRsFAl0wMQEhFSERIxEhNSERMwEhNSECiQFs/pSn/n8BgacBQfy9A0MDVpf+YgGelwGd+w2YAAABAEICmwKrBbsAFgBUsggXGBESOQCwAEVYsA4vG7EOHD5ZsABFWLAALxuxABQ+WbIWAgorWCHYG/RZsALQsgMOFhESObAOELIIAgorWCHYG/RZsA4QsAvQshQWDhESOTAxASE1ATY1NCYjIgYVIzQ2IBYVFA8CIQKr/akBLG1APEtHnacBCJprVLABjwKbbAEaZkUxPUw5cpR/bmhrT5EAAQA+Ao8CmgW6ACYAibIgJygREjkAsABFWLAOLxuxDhw+WbAARViwGS8bsRkUPlmyABkOERI5sAAvtm8AfwCPAANdsj8AAXG2DwAfAC8AA12yXwABcrAOELIHAgorWCHYG/RZsgoOGRESObAAELImBAorWCHYG/RZshQmABESObIdGQ4REjmwGRCyIAIKK1gh2Bv0WTAxATMyNjU0JiMiBhUjNDYzMhYVFAYHFhUUBiMiJjUzFBYzMjY1NCcjAQlUSkg/RjlLnaN8iZxGQpWqiISmnk9DRkmcWARlPTAtOjMpYnt5aDdbGSmPan1+ay08PDNxAgAAAQB7BNgCHAX+AAMAIwCwAi+yDwIBXbAA0LAAL7QPAB8AAl2wAhCwA9AZsAMvGDAxATMBIwE84P70lQX+/toAAAEAmv5gA+4EOgASAFCyDRMUERI5ALAARViwAC8bsQAYPlmwAEVYsAcvG7EHGD5ZsABFWLAQLxuxEBI+WbAARViwDS8bsQ0QPlmyBAEKK1gh2Bv0WbILBw0REjkwMQERFhYzMjcRMxEjJwYjIicRIxEBUwFndMc+uqcJXaqTUbkEOv2Ho5yYAyD7xnOHSf4rBdoAAQBDAAADQAWwAAoAK7ICCwwREjkAsABFWLAILxuxCBw+WbAARViwAC8bsQAQPlmyAQAIERI5MDEhESMiJDU0JDMhEQKGVOb+9wEK5gENAgj+1tX/+lAAAAEAkwJrAXkDSQAJABayAwoLERI5ALACL7EICitY2BvcWTAxEzQ2MhYVFAYiJpM5cjs7cjkC2TBAQDAvPz8AAQB0/k0BqgAAAA4AQbIFDxAREjkAsABFWLAALxuxABA+WbAARViwBi8bsQYSPlm0EwYjBgJdsgEGABESObEHCitY2BvcWbABELAN0DAxIQcWFRQGIycyNjU0Jic3AR0MmaCPB09XQGIgNBuSYXFrNC8sKgmGAAEAegKiAe8FtwAGAECyAQcIERI5ALAARViwBS8bsQUcPlmwAEVYsAAvG7EAFD5ZsgQABRESObAEL7IDAgorWCHYG/RZsgIDBRESOTAxASMRBzUlMwHvndgBYxICogJZOYB1AAACAHoCsgMnBcQADAAaAECyAxscERI5sAMQsBDQALAARViwAy8bsQMcPlmyChsDERI5sAovshADCitYIdgb9FmwAxCyFwMKK1gh2Bv0WTAxEzQ2MzIWFRUUBiAmNRcUFjMyNjU1NCYjIgYHeryam7y7/sy+o2FUU19hU1FgAgRjnsPBpkqfwsKlBmRyc2VOY3JuYQD//wBmAJgDeAO1ACYAmw0AAAcAmwFqAAD//wBVAAAFkQWtACcAov/bApgAJwCcARgACAEHAKUC1gAAABAAsABFWLAFLxuxBRw+WTAx//8AUAAABckFrQAnAJwA7AAIACcAov/WApgBBwCjAx4AAAAQALAARViwCS8bsQkcPlkwMf//AG8AAAXtBbsAJwCcAZcACAAnAKUDMgAAAQcApAAxApsAEACwAEVYsCEvG7EhHD5ZMDEAAgBE/n8DeARNABgAIgBXsgkjJBESObAJELAc0ACwEC+wAEVYsCEvG7EhGD5ZsgAQIRESObIDEAAREjmwEBCyCQEKK1gh2Bv0WbAQELAM0LIVABAREjmwIRCyGwUKK1gh2Bv0WTAxAQ4DBwcUFjMyNjUzBgYjIiY1NDc3NjUTFAYiJjU0NjIWAkwBKWC4CwJ0bWR9uQLht8TWoG1CwTdsODhsNwKoan92wWMlbXNxW6HMybOtr3FOkgE9LT4+LSw8PAAC//IAAAdXBbAADwASAHcAsABFWLAGLxuxBhw+WbAARViwAC8bsQAQPlmwAEVYsAQvG7EEED5ZshEGABESObARL7ICAQorWCHYG/RZsAYQsggBCitYIdgb9FmyCwAGERI5sAsvsgwBCitYIdgb9FmwABCyDgEKK1gh2Bv0WbISBgAREjkwMSEhAyEDIwEhFSETIRUhEyEBIQMHV/yND/3MzeIDcAO3/U0UAk79uBYCwfqvAcgfAWH+nwWwmP4pl/3tAXgC3QABAFkAzgPdBGMACwA4ALADL7IJDAMREjmwCS+yCgkDERI5sgQDCRESObIBCgQREjmwAxCwBdCyBwQKERI5sAkQsAvQMDETAQE3AQEXAQEHAQFZAUr+uHcBSQFJd/64AUp3/rX+tQFJAVABT3v+sQFPe/6x/rB7AVH+rwAAAwB2/6MFHQXsABcAIAApAGayBCorERI5sAQQsB3QsAQQsCbQALAARViwEC8bsRAcPlmwAEVYsAQvG7EEED5ZshoQBBESObIjEAQREjmwIxCwG9CwEBCyHQEKK1gh2Bv0WbAaELAk0LAEELImAQorWCHYG/RZMDEBFAIEIyInByM3JhE1NBIkMzIXNzMHFhMFFBcBJiMiAgcFNCcBFjMyEjcFCZD++LCrg2GOkL6SAQus1pRnjZ+JAvwsYgI0Zqa20QMDFTj921t5uswDAqnW/sGoUpvnwAFoU9IBQqt9pf+7/tpj9I0DiG/+6/YNtoP8j0ABD/0AAgCmAAAEXQWwAA0AFgBXsgkXGBESObAJELAQ0ACwAEVYsAAvG7EAHD5ZsABFWLALLxuxCxA+WbIBAAsREjmwAS+yEAALERI5sBAvsgkBCitYIdgb9FmwARCyDgEKK1gh2Bv0WTAxAREhMhYWFRQEIyERIxETESEyNjU0JicBYAEXk9x3/vjj/u66ugEVjqCgiAWw/ttpwn7C5/7HBbD+Q/3el3h7lwEAAQCL/+wEagYSACoAabIhKywREjkAsABFWLAFLxuxBR4+WbAARViwEy8bsRMQPlmwAEVYsAAvG7EAED5ZsgoTBRESObIOBRMREjmwExCyGgEKK1gh2Bv0WbIgEwUREjmyIwUTERI5sAUQsigBCitYIdgb9FkwMSEjETQ2MzIWFRQGFRQeAhUUBiMiJic3FhYzMjY1NC4CNTQ2NTQmIyIRAUS5z7q0xYBLvFbLtlG1JisxhzVrcUq9V4toWNoEV9Drs599y0UzX5CITJ+yLBybICxeUjRgk4pRWc9UXmv+2wADAE7/7AZ8BE4AKgA1AD0AxrICPj8REjmwAhCwLtCwAhCwOdAAsABFWLAXLxuxFxg+WbAARViwHS8bsR0YPlmwAEVYsAAvG7EAED5ZsABFWLAFLxuxBRA+WbICHQAREjmyDAUXERI5sAwvtL8MzwwCXbAXELIQAQorWCHYG/RZshMMFxESObIaHQAREjmyOh0AERI5sDovtL86zzoCXbIhAQorWCHYG/RZsAAQsiUBCitYIdgb9FmyKB0AERI5sCvQsAwQsi8BCitYIdgb9FmwEBCwNtAwMQUgJwYGIyImNTQ2MzM1NCYjIgYVJzQ2MzIWFzY2MzISFRUhFhYzMjc3FwYlMjY3NSMGBhUUFgEiBgchNTQmBO7++4hB4o2nvOPd325oaYy48rtzsDI/rmnS6P0oB66VlHkvQJ78CUieMuR1jGoDUHOVEQIahhS0Vl6tl52uVWt7blETj7VTU09X/v/pc7C/TB+IeZZKNu0CblNNXQM0q4sfhJMAAAIAfv/sBC0GLAAdACsAVLIHLC0REjmwBxCwKNAAsABFWLAZLxuxGR4+WbAARViwBy8bsQcQPlmyDxkHERI5sA8vshEZBxESObIiAQorWCHYG/RZsAcQsigBCitYIdgb9FkwMQESERUUBgYjIiYmNTQ2NjMyFyYnByc3Jic3Fhc3FwMnJiYjIgYVFBYzMjY1AzT5ddiGh9x5cM+Bo3kwjdpJwIS3Oe+vvUloAiGLXJGip4B9mQUV/vj+Z12e/ZCB4IaT6YJyw42UY4NbMZ82i4Fk/PM4PUm/p4zE4rgAAAMARwCsBC0EugADAA0AFwBOsgcYGRESObAHELAA0LAHELAR0ACwAi+yAQEKK1gh2Bv0WbACELEMCitY2BvcWbEGCitY2BvcWbABELEQCitY2BvcWbEWCitY2BvcWTAxASE1IQE0NjIWFRQGIiYRNDYyFhUUBiImBC38GgPm/aA5cjs7cjk5cjs7cjkCWLgBOjBAQDAvPj78/jBAQDAuPz8AAAMAW/96BDQEuAAVAB0AJgBjsgQnKBESObAEELAb0LAEELAj0ACwAEVYsAQvG7EEGD5ZsABFWLAPLxuxDxA+WbIjAQorWCHYG/RZsiEjBBESObAhELAY0LAEELIbAQorWCHYG/RZshkbDxESObAZELAg0DAxEzQ2NjMyFzczBxYRFAYGIyInByM3JhMUFwEmIyIGBTQnARYzMjY1W3vhj25eSXxmw3zgkGhWSnxkzblhAVc+SIqoAmZX/qw3QounAief/YsqlM2a/sCe/okjlcuVATfCbwK2INq1tm/9UBnbuQACAJX+YAQnBgAADwAaAGSyGBscERI5sBgQsAzQALAIL7AARViwDC8bsQwYPlmwAEVYsAYvG7EGEj5ZsABFWLADLxuxAxA+WbIFDAMREjmyCgwDERI5sAwQshMBCitYIdgb9FmwAxCyGAEKK1gh2Bv0WTAxARQCIyInESMRMxE2MzISESc0JiMiBxEWMzI2BCfiwcVxublxwsPjuZyIqFRTq4WdAhH3/tJ9/fcHoP3KhP7a/voEt9SV/fuU0wAAAQCbAAABVQQ6AAMAHQCwAEVYsAIvG7ECGD5ZsABFWLAALxuxABA+WTAxISMRMwFVuroEOgAAAgBo/+sHCQXEABcAIwCRsgEkJRESObABELAa0ACwAEVYsAwvG7EMHD5ZsABFWLAOLxuxDhw+WbAARViwAC8bsQAQPlmwAEVYsAMvG7EDED5ZsA4QshABCitYIdgb9FmyEwAOERI5sBMvshQBCitYIdgb9FmwABCyFgEKK1gh2Bv0WbADELIYAQorWCHYG/RZsAwQsh0BCitYIdgb9FkwMSEhBiMiJgInETQSNjMyFyEVIREhFSERIQUyNxEmIyIGBxEUFgcJ/LCycqL+jAGL/qJ8qgNG/S0Cd/2JAt37jHFmbWytwgLDFZYBD6sBNawBEZcUnv4snf38Gw4Ejg/lz/7H0+sAAAMAYf/sBwAETgAgACwANACWsgY1NhESObAGELAm0LAGELAw0ACwAEVYsAQvG7EEGD5ZsABFWLAKLxuxChg+WbAARViwFy8bsRcQPlmwAEVYsB0vG7EdED5ZsgcKFxESObIxChcREjmwMS+yDgEKK1gh2Bv0WbAXELISAQorWCHYG/RZshQKFxESObIaChcREjmwJNCwBBCyKgEKK1gh2Bv0WbAt0DAxEzQ2NjMyFhc2NjMyFhUVIRYWMzI3FwYjIiYnBgYjIgA1FxQWMzI2NTQmIyIGJSIGByE1NCZheduOick9QcRwz+r9Mgekhrx4Son1h80/PseG3P74uaCLiaChioeiBC1jlhYCDokCJ6D+iXVkZnP+63SqxWx+hHBkY3EBMP4Jt9jXzrbZ1tajihp9lgAAAQCpBOQDBgYAAAgANACwBC+wB9CwBy+0DwcfBwJdsgUEBxESORmwBS8YsAHQGbABLxiwBBCwAtCyAwQHERI5MDEBFSMnByM1EzMDBpmWlZn2cATuCqqqDAEQAAACAHkEtAInBlAACQAUACqyAxUWERI5sAMQsA3QALADL7AH0LAHL7I/BwFdsAMQsA3QsAcQsBLQMDEBFAYjIiY0NjIWBRQWMzI2NCYjIgYCJ3xbXHt7uHv+tUMxMERDMTJCBYBXdXasenpWL0RCYkVGAAABAHsE2QM+BegAFwA+ALADL7AI0LAIL7QPCB8IAl2wAxCwC9CwCy+wCBCyDwMKK1gh2Bv0WbADELIUAworWCHYG/RZsA8QsBfQMDEBFAYjIi4CIyIGFSc0NjMyHgIzMjY1Az57XCk8YSscKTp8eV0jOGAzHys5BdxshhQ+DT8xB2uMFDoSRC3//wCiAosEjQMiAEYAn9kATM1AAP//AJACiwXJAyIARgCfhABmZkAAAAEAYAQxAXgGEwAIACGyCAkKERI5ALAARViwAC8bsQAePlmyBQkAERI5sAUvMDEBFwYHFSM1NDYBDmpdA7hhBhNIf5OIdGbIAAEAMAQWAUcGAAAIACGyCAkKERI5ALAARViwBC8bsQQePlmyAAkEERI5sAAvMDETJzY3NTMVBgaZaV0DtwFhBBZIgpCQgmTHAAEAJP7lATsAtQAIAB6yCAkKERI5ALAJL7IEBQorWCHYG/RZsADQsAAvMDETJzY3NTMVFAaNaVsDuWP+5Ul/knZkZcr//wBoBDECuwYTACYAkwgAAAcAkwFDAAD//wA8BBYChgYAACYAlAwAAAcAlAE/AAAAAgAk/tMCZAD2AAgAEQAwsgoSExESObAKELAF0ACwEi+yBAUKK1gh2Bv0WbAA0LAAL7AJ0LAJL7AEELAN0DAxEyc2NzUzFRQGFyc2NzUzFRQGjWlbA7lj3WlbA7ph/tNIiZm5pGzTQEiJmbmka9EAAAEAigIXAiIDywANABayCg4PERI5ALADL7EKCitY2BvcWTAxEzQ2MzIWFRUUBiMiJjWKb1xbcm5eXW8DBFdwbV0lV25vWAABAGwAmQIgA7UABgAQALAFL7ICBwUREjmwAi8wMQEBIwE1ATMBHgECjf7ZASeNAib+cwGEEwGFAAEAWQCYAg4DtQAGABAAsAAvsgMHABESObADLzAxEwEVASMBAecBJ/7ZjgEC/v4Dtf57E/57AY4BjwABADsAbgNqBSIAAwAJALAAL7ACLzAxNycBF6NoAsdobkIEckIA//8ANgKQArsFpQMHAKUAAAKQABMAsABFWLAJLxuxCRw+WbAN0DAxAAABAF//7AQcBcQAIwCHshUkJRESOQCwAEVYsBYvG7EWHD5ZsABFWLAJLxuxCRA+WbIjCRYREjmwIy+yAAIKK1gh2Bv0WbAJELIEAQorWCHYG/RZsAAQsAzQsCMQsA/QsCMQsB/QsB8vtg8fHx8vHwNdsiACCitYIdgb9FmwENCwHxCwE9CwFhCyGwEKK1gh2Bv0WTAxASEWFjMyNxcGIyIAAyM1MzUjNTMSADMyFwcmIyIGByEVIRUhA1H+gAS0pXRmFHh4+P7jBrKysrIKAR3zaocUbW6ksQYBf/6AAYACHcPSIqAeASUBDHyJfQEGAR8foiPLvH2JAAEAqAKLA+sDIgADABsAsABFWLACLxuxAhY+WbIBAQorWCHYG/RZMDEBITUhA+v8vQNDAouXAAIAHwAAA80GFQAVABkAg7IIGhsREjmwCBCwF9AAsABFWLAILxuxCB4+WbAARViwAy8bsQMYPlmwAEVYsBEvG7ERGD5ZsABFWLAYLxuxGBg+WbAARViwAC8bsQAQPlmwAEVYsBYvG7EWED5ZsAMQsgEBCitYIdgb9FmwCBCyDQEKK1gh2Bv0WbABELAT0LAU0DAxMxEjNTM1NDYzMhcHJiMiBhUVMxUjESEjETPKq6vPvXCrH31xd2nd3QJJuroDq49ctco9nDJra16P/FUEOgABADwAAAPpBhUAFgBcALAARViwEi8bsRIePlmwAEVYsAYvG7EGGD5ZsABFWLAJLxuxCRA+WbAARViwFi8bsRYQPlmwEhCyAgEKK1gh2Bv0WbAGELIHAQorWCHYG/RZsAvQsAYQsA7QMDEBJiMiFRUzFSMRIxEjNTM1NjYzMgURIwMwfEzI5+e5q6sBwLFlASu5BWMU0muP/FUDq492rbg9+igAAAEAegAAAe8DFQAGADUAsABFWLAFLxuxBRY+WbAARViwAS8bsQEQPlmyBAUBERI5sAQvsgMCCitYIdgb9FmwAtAwMSEjEQc1JTMB753YAWMSAlk5gHUAAQBCAAACqwMgABYAVLIIFxgREjkAsABFWLAOLxuxDhY+WbAARViwAC8bsQAQPlmyFQIKK1gh2Bv0WbAC0LIUFQ4REjmyAw4UERI5sA4QsggCCitYIdgb9FmwDhCwC9AwMSEhNQE2NTQmIyIGFSM0NiAWFRQPAiECq/2pASxtQDxLR52nAQiaa1SwAY9sARpmRTE9TDlylH9uaGtPkQABAD7/9QKaAyAAJgBxALAARViwDi8bsQ4WPlmwAEVYsBkvG7EZED5ZsgAZDhESOXywAC8YtoAAkACgAANdsA4QsgcCCitYIdgb9FmyCgAHERI5sAAQsiYCCitYIdgb9FmyFCYAERI5sBkQsiACCitYIdgb9FmyHSYgERI5MDEBMzI2NTQmIyIGFSM0NjMyFhUUBgcWFRQGIyImNTMUFjMyNjU0JyMBCVRKSD9GOUudo3yJnEZClaqIhKaeT0NGSZxYAcs9MC06Mylie3loN1sZKY9qfX5rLTw8M3ECAAACADYAAAK7AxUACgAOAEkAsABFWLAJLxuxCRY+WbAARViwBC8bsQQQPlmyAQkEERI5sAEvsgICCitYIdgb9FmwBtCwARCwC9CyCAsGERI5sg0JBBESOTAxATMVIxUjNSEnATMBMxEHAlBra53+iQYBeaH+hN8RASuCqalmAgb+FgEhHP//ACUCHwINArYCBgARAAAAAgAlAAAE5AWwAA8AHQBmALAARViwBS8bsQUcPlmwAEVYsAAvG7EAED5ZsgQABRESObAEL7LPBAFdsi8EAV2ynwQBcbIBAQorWCHYG/RZsBHQsAAQshIBCitYIdgb9FmwBRCyGwEKK1gh2Bv0WbAEELAc0DAxMxEjNTMRITIEEhcVFAIEBxMhETMyEjc1NAInIxEhx6KiAZu+ASSfAZ/+2cRH/ubJ3vcB6dbgARoCmpcCf6j+ysldzv7KpgICmv4DARL5XfgBEwL+HwD//wAcAAAFHQc0AiYAJQAAAQcARAEwATYAFACwAEVYsAQvG7EEHD5ZsQwI9DAx//8AHAAABR0HNAImACUAAAEHAHUBvwE2ABQAsABFWLAFLxuxBRw+WbENCPQwMf//ABwAAAUdBzYCJgAlAAABBwCOAMkBNgAUALAARViwBC8bsQQcPlmxDwb0MDH//wAcAAAFHQciAiYAJQAAAQcAkADFAToAFACwAEVYsAUvG7EFHD5ZsQ4E9DAx//8AHAAABR0G+wImACUAAAEHAGoA+QE2ABcAsABFWLAELxuxBBw+WbERBPSwG9AwMQD//wAcAAAFHQeRAiYAJQAAAQcAjwFQAUEAFwCwAEVYsAQvG7EEHD5ZsQ4G9LAY0DAxAP//AHf+RATYBcQCJgAnAAAABwB5AdL/9///AKkAAARGB0ACJgApAAABBwBEAPsBQgAUALAARViwBi8bsQYcPlmxDQj0MDH//wCpAAAERgdAAiYAKQAAAQcAdQGKAUIAFACwAEVYsAYvG7EGHD5ZsQ4I9DAx//8AqQAABEYHQgImACkAAAEHAI4AlAFCABQAsABFWLAGLxuxBhw+WbEQBvQwMf//AKkAAARGBwcCJgApAAABBwBqAMQBQgAXALAARViwBi8bsQYcPlmxEgT0sBvQMDEA////4AAAAYEHQAImAC0AAAEHAET/pwFCABQAsABFWLACLxuxAhw+WbEFCPQwMf//ALAAAAJRB0ACJgAtAAABBwB1ADUBQgAUALAARViwAy8bsQMcPlmxBgj0MDH////pAAACRgdCAiYALQAAAQcAjv9AAUIAFACwAEVYsAIvG7ECHD5ZsQgG9DAx////1gAAAl8HBwImAC0AAAEHAGr/cAFCABcAsABFWLACLxuxAhw+WbEKBPSwFNAwMQD//wCpAAAFCAciAiYAMgAAAQcAkAD7AToAFACwAEVYsAYvG7EGHD5ZsQ0E9DAx//8Adv/sBQkHNgImADMAAAEHAEQBUgE4ABQAsABFWLANLxuxDRw+WbEhCPQwMf//AHb/7AUJBzYCJgAzAAABBwB1AeEBOAAUALAARViwDS8bsQ0cPlmxIgj0MDH//wB2/+wFCQc4AiYAMwAAAQcAjgDrATgAFACwAEVYsA0vG7ENHD5ZsSIG9DAx//8Adv/sBQkHJAImADMAAAEHAJAA5wE8ABQAsABFWLANLxuxDRw+WbEjBPQwMf//AHb/7AUJBv0CJgAzAAABBwBqARsBOAAXALAARViwDS8bsQ0cPlmxJwT0sDDQMDEA//8AjP/sBKoHNAImADkAAAEHAEQBKwE2ABQAsABFWLAKLxuxChw+WbEUCPQwMf//AIz/7ASqBzQCJgA5AAABBwB1AboBNgAUALAARViwEi8bsRIcPlmxFQj0MDH//wCM/+wEqgc2AiYAOQAAAQcAjgDEATYAFACwAEVYsAovG7EKHD5ZsRcG9DAx//8AjP/sBKoG+wImADkAAAEHAGoA9AE2ABcAsABFWLAKLxuxChw+WbEZBPSwI9AwMQD//wAPAAAEuwc0AiYAPQAAAQcAdQGIATYAFACwAEVYsAEvG7EBHD5ZsQsI9DAx//8Abf/sA+oF/gImAEUAAAEHAEQA1QAAABQAsABFWLAXLxuxFxg+WbEqCfQwMf//AG3/7APqBf4CJgBFAAABBwB1AWQAAAAUALAARViwFy8bsRcYPlmxKwn0MDH//wBt/+wD6gYAAiYARQAAAQYAjm4AABQAsABFWLAXLxuxFxg+WbErAfQwMf//AG3/7APqBewCJgBFAAABBgCQagQAFACwAEVYsBcvG7EXGD5ZsSwB9DAx//8Abf/sA+oFxQImAEUAAAEHAGoAngAAABcAsABFWLAXLxuxFxg+WbEwAfSwOdAwMQD//wBt/+wD6gZbAiYARQAAAQcAjwD1AAsAFwCwAEVYsBcvG7EXGD5ZsSwE9LA20DAxAP//AFz+RAPsBE4CJgBHAAAABwB5AT//9///AF3/7APzBf4CJgBJAAABBwBEAMUAAAAUALAARViwCC8bsQgYPlmxHwn0MDH//wBd/+wD8wX+AiYASQAAAQcAdQFUAAAAFACwAEVYsAgvG7EIGD5ZsSAJ9DAx//8AXf/sA/MGAAImAEkAAAEGAI5eAAAUALAARViwCC8bsQgYPlmxIAH0MDH//wBd/+wD8wXFAiYASQAAAQcAagCOAAAAFwCwAEVYsAgvG7EIGD5ZsSUB9LAu0DAxAP///8YAAAFnBf0CJgCLAAABBgBEjf8AFACwAEVYsAIvG7ECGD5ZsQUJ9DAx//8AlgAAAjcF/QImAIsAAAEGAHUb/wAUALAARViwAy8bsQMYPlmxBgn0MDH////PAAACLAX/AiYAiwAAAQcAjv8m//8AFACwAEVYsAIvG7ECGD5ZsQgB9DAx////vAAAAkUFxAImAIsAAAEHAGr/Vv//ABcAsABFWLACLxuxAhg+WbELAfSwFNAwMQD//wCMAAAD3wXsAiYAUgAAAQYAkGEEABQAsABFWLADLxuxAxg+WbEVAfQwMf//AFv/7AQ0Bf4CJgBTAAABBwBEAM8AAAAUALAARViwBC8bsQQYPlmxHQn0MDH//wBb/+wENAX+AiYAUwAAAQcAdQFeAAAAFACwAEVYsAQvG7EEGD5ZsR4J9DAx//8AW//sBDQGAAImAFMAAAEGAI5oAAAUALAARViwBC8bsQQYPlmxHgH0MDH//wBb/+wENAXsAiYAUwAAAQYAkGQEABQAsABFWLAELxuxBBg+WbEfAfQwMf//AFv/7AQ0BcUCJgBTAAABBwBqAJgAAAAXALAARViwBC8bsQQYPlmxIwH0sCzQMDEA//8AiP/sA9wF/gImAFkAAAEHAEQAxwAAABQAsABFWLAHLxuxBxg+WbESCfQwMf//AIj/7APcBf4CJgBZAAABBwB1AVYAAAAUALAARViwDS8bsQ0YPlmxEwn0MDH//wCI/+wD3AYAAiYAWQAAAQYAjmAAABQAsABFWLAHLxuxBxg+WbEVAfQwMf//AIj/7APcBcUCJgBZAAABBwBqAJAAAAAXALAARViwBy8bsQcYPlmxGAH0sCHQMDEA//8AFv5LA7AF/gImAF0AAAEHAHUBGwAAABQAsABFWLABLxuxARg+WbESCfQwMf//ABb+SwOwBcUCJgBdAAABBgBqVQAAFwCwAEVYsA8vG7EPGD5ZsRcB9LAg0DAxAAAAAAEAAADeAI8AFgBUAAUAAQAAAAAADgAAAgACFAAGAAEAAABhAGEAYQBhAGEAkwC4ATgBqgI6As0C5AMOAzgDawOQA68DxQPmA/0ESgR4BMcFPAV/Bd8GPgZrBt8HRgdbB3AHjwe2B9UIMwjWCRUJdAnICg0KTQqDCusLLQtIC3sL0Av0DEIMfgzTDR4Ngw3fDkoOdA62DuYPOw+QD8AP+BAcEDMQWBB/EJoQuhEyEZAR4xJBEqgS+hN0E7kT8RQ9FJQUrxUaFWUVsxYXFngWtRcfF3EXuBfoGDYYfRjCGPoZOxlSGZIZ2RoMGmga2hs9G5wbuxxgHI8dNR2jHa8dzB6EHpoe1h8ZH2kf5CAEIE0geSCYINMhBSFPIVshdSGPIakiCiJtIqsjJiN6I+okqCUXJWgl2SY4JlMm1idwJ54n1ygbKCUoLyhTKHcomSilKLEo6SkMKSgpRSlYKWwp6CoDKmsqvSroKzcrpivoK+gr8CxWLG0shCybLLIsyyzkLPAtBy0eLTUtTi1lLXwtky2sLcMt2i3xLgguHy44Lk8uZi59LpYurS7ELtsu8S8HLyAvOS9FL1wvcy+JL6IvuC/OL+Uv/jAUMCswQjBYMG4whzCeMLUwyzDkMPsxEwAAAAEAAAACAAAwG1GuXw889QAbCAAAAAAAxPARLgAAAADQ206a+hv91QkwCHMAAAAJAAIAAAAAAAADjABkAAAAAAAAAAAB+wAAAfsAAAIPAKACjwCIBO0AdwR+AG4F3ABpBPkAZQFlAGcCvACFAsgAJgNyABwEiQBOAZIAHQI1ACUCGwCQA0wAEgR+AHMEfgCqBH4AXQR+AF4EfgA1BH4AmgR+AIQEfgBNBH4AcAR+AGQB8ACGAbEAKQQRAEgEZACYBC4AhgPHAEsHLwBqBTgAHAT7AKkFNQB3BT8AqQSMAKkEbACpBXMAegW0AKkCLQC3BGoANQUEAKkETgCpBvwAqQW0AKkFgAB2BQwAqQWAAG0E7QCoBL8AUATGADEFMACMBRcAHAcZAD0FBAA5BM4ADwTKAFYCHwCSA0gAKAIfAAkDWABAA5wABAJ5ADkEWgBtBH0AjAQwAFwEgwBfBD0AXQLHADwEfQBgBGgAjAHxAI0B6f+/BA4AjQHxAJwHAwCLBGoAjASQAFsEfQCMBIwAXwK1AIwEIABfAp0ACQRpAIgD4AAhBgMAKwP3ACkDyQAWA/cAWAK1AEAB8wCvArUAEwVxAIMB8wCLBGAAaQSmAFsFtABpBNgAHwHrAJME6ABaA1gAZgZJAFsDkwCTA8EAZgRuAH8GSgBaA6oAeAL9AIIERgBhAu8AQgLvAD4CggB7BIgAmgPpAEMCFgCTAfsAdALvAHoDowB6A8AAZgXcAFUGNQBQBjkAbwPJAEQHev/yBEQAWQWAAHYEugCmBMIAiwbBAE4EsAB+BJEARwSIAFsEnACVAfoAmwehAGgHRABhA8QAqQKtAHkDxgB7BUAAogY/AJABmQBgAZkAMAGXACQC1ABoAtsAPALBACQCsgCKAmYAbAJmAFkDowA7Au8ANgR+AF8EkgCoBG4AHwSLADwC7wB6Au8AQgLvAD4C7wA2AfsAAAI1ACUFXQAlBTgAHAU4ABwFOAAcBTgAHAU4ABwFOAAcBTUAdwSMAKkEjACpBIwAqQSMAKkCLf/gAi0AsAIt/+kCLf/WBbQAqQWAAHYFgAB2BYAAdgWAAHYFgAB2BTAAjAUwAIwFMACMBTAAjATOAA8EWgBtBFoAbQRaAG0EWgBtBFoAbQRaAG0EMABcBD0AXQQ9AF0EPQBdBD0AXQH6/8YB+gCWAfr/zwH6/7wEagCMBJAAWwSQAFsEkABbBJAAWwSQAFsEaQCIBGkAiARpAIgEaQCIA8kAFgAWAAAAAQAAB2z+DAAACUn6G/5KCTAAAQAAAAAAAAAAAAAAAAAAAN0AAwSFAZAABQAABZoFMwAAAR8FmgUzAAAD0QBmAgAAAAIAAAAAAAAAAADgAAr/UAAhfwAAACEAAAAAR09PRwBAAAD//QYA/gAAZgeaAgAgAAGfAAAAAAQ6BbAAIAAgAAIAAAABAAAA4AkJBAAAAgICAwYFBwYCAwMEBQICAgQFBQUFBQUFBQUFAgIFBQUECAYGBgYFBQYGAgUGBQgGBgYGBgUFBgYIBgUFAgQCBAQDBQUFBQUDBQUCAgUCCAUFBQUDBQMFBAcEBAQDAgMGAgUFBgUCBgQHBAQFBwQDBQMDAwUEAgIDBAQHBwcECAUGBQUIBQUFBQIJCAQDBAYHAgICAwMDAwMDBAMFBQUFAwMDAwICBgYGBgYGBgYFBQUFAgICAgYGBgYGBgYGBgYFBQUFBQUFBQUFBQUCAgICBQUFBQUFBQUFBQQEAAAAAwAAAAMAAAAcAAMAAQAAABwAAwAKAAABYAAEAUQAAAA2ACAABAAWAAAADQB+AKAArACtAL8AxgDPAOYA7wD/ATEBUwLGAtoC3CAUIBogHiAiIDogRCB0IKwiEv//AAAAAAANACAAoAChAK0ArgDAAMcA0ADnAPABMQFSAsYC2gLcIBMgGCAcICIgOSBEIHQgrCIS//8AAf/2/+QABv/C//r/wQAA/+gAAP/iAAD/Wv86/cj9tf204H7ge+B64HfgYeBY4Cnf8t6NAAEAAAAAAAAAAAAAAAAAAAAoAAAAMgAAAFwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAqQCqAKsArACtAK4AgQCoALgAuQC6ALsAvAC9AIIAgwC+AL8AwADBAMIAhACFAMMAxADFAMYAxwDIAIYAhwDSANMA1ADVANYA1wCIAIkA2ADZANoA2wDcAIoA3QAMAAAAAAHYAAAAAAAAACYAAAAAAAAAAAAAAAEAAAANAAAADQAAAAMAAAAgAAAAfgAAAAQAAACgAAAAoAAAAKYAAAChAAAArAAAAGMAAACtAAAArQAAAKcAAACuAAAAvwAAAG8AAADAAAAAxQAAAKkAAADGAAAAxgAAAIEAAADHAAAAzwAAAK8AAADQAAAA0AAAAKgAAADRAAAA1gAAALgAAADXAAAA2AAAAIIAAADZAAAA3QAAAL4AAADeAAAA3wAAAIQAAADgAAAA5QAAAMMAAADmAAAA5gAAAIYAAADnAAAA7wAAAMkAAADwAAAA8AAAAIcAAADxAAAA9gAAANIAAAD3AAAA+AAAAIgAAAD5AAAA/QAAANgAAAD+AAAA/gAAAIoAAAD/AAAA/wAAAN0AAAExAAABMQAAAIsAAAFSAAABUwAAAIwAAALGAAACxgAAAI4AAALaAAAC2gAAAI8AAALcAAAC3AAAAJAAACATAAAgFAAAAJEAACAYAAAgGgAAAJMAACAcAAAgHgAAAJYAACAiAAAgIgAAAJkAACA5AAAgOgAAAJoAACBEAAAgRAAAAJwAACB0AAAgdAAAAJ0AACCsAAAgrAAAAJ4AACISAAAiEgAAAJ+wACxLsAlQWLEBAY5ZuAH/hbCEHbEJA19eLbABLCAgRWlEsAFgLbACLLABKiEtsAMsIEawAyVGUlgjWSCKIIpJZIogRiBoYWSwBCVGIGhhZFJYI2WKWS8gsABTWGkgsABUWCGwQFkbaSCwAFRYIbBAZVlZOi2wBCwgRrAEJUZSWCOKWSBGIGphZLAEJUYgamFkUlgjilkv/S2wBSxLILADJlBYUViwgEQbsEBEWRshISBFsMBQWLDARBshWVktsAYsICBFaUSwAWAgIEV9aRhEsAFgLbAHLLAGKi2wCCxLILADJlNYsEAbsABZioogsAMmU1gjIbCAioobiiNZILADJlNYIyGwwIqKG4ojWSCwAyZTWCMhuAEAioobiiNZILADJlNYIyG4AUCKihuKI1kgsAMmU1iwAyVFuAGAUFgjIbgBgCMhG7ADJUUjISMhWRshWUQtsAksS1NYRUQbISFZLbAKLLAkRS2wCyywJUUtsAwssScBiCCKU1i5QAAEAGO4CACIVFi5ACQD6HBZG7AjU1iwIIi4EABUWLkAJAPocFlZWS2wDSywQIi4IABaWLElAEQbuQAlA+hEWS2wDCuwACsAsgEOAisBsg8BAisBtw86MCUbEAAIKwC3AUg7LiEUAAgrtwJYSDgoFAAIK7cDUkM0JRYACCu3BF5NPCsZAAgrtwU2LCIZDwAIK7cGcV1GMhsACCu3B5F3XDojAAgrtwh+Z1A5GgAIK7cJVEU2JhcACCu3CnZgSzYdAAgrtwuDZE46IwAIK7cM2bKKYzwACCu3DRQRDQkGAAgrtw48MiccEQAIKwCyEAoHK7AAIEV9aRhEsjASAXOysBQBc7JQFAF0soAUAXSycBQBdbIPHAFzsm8cAXUAACoAnQCAAIoAeADUAGQATgBaAIcAYABWADQCPAC8AMQAAAAU/mAAFAKbACADIQALBDoAFASNABAFsAAUBhgAFQGmABEGwAAOAAAAAAAAAAcAWgADAAEECQABAAwAAAADAAEECQACAA4ADAADAAEECQADAAwAAAADAAEECQAEAAwAAAADAAEECQAFACwAGgADAAEECQAGABwARgADAAEECQAOAFQAYgBSAG8AYgBvAHQAbwBSAGUAZwB1AGwAYQByAFYAZQByAHMAaQBvAG4AIAAyAC4AMAAwADEAMQAwADEAOwAgADIAMAAxADQAUgBvAGIAbwB0AG8ALQBSAGUAZwB1AGwAYQByAGgAdAB0AHAAOgAvAC8AdwB3AHcALgBhAHAAYQBjAGgAZQAuAG8AcgBnAC8AbABpAGMAZQBuAHMAZQBzAC8ATABJAEMARQBOAFMARQAtADIALgAwAAMAAAAAAAD/agBkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQACAAgAAv//AA8AAQAAAAwAAAAAAAAAAgAKACUAPgABAEUAXgABAHkAeQADAIEAgQABAIMAgwABAIYAhgABAIkAiQABAIsAjQABAKAAoQACAKgA3QABAAEAAAAKAFQAdAAEREZMVAAaY3lybAAmZ3JlawAybGF0bgA+AAQAAAAA//8AAQAAAAQAAAAA//8AAQABAAQAAAAA//8AAQACAAQAAAAA//8AAQADAARrZXJuABprZXJuABprZXJuABprZXJuABoAAAABAAAAAQAEAAIAAAAEAA4CDgOSBFIAAQCCAAQAAAA8AYgBiAD+AY4BnAG0AaoBBAEKARABtAEWASABQgFUAboBZgH0AWwB9AH0AfQB9AF6AfoB+gGIAYgBiAGIAbQBjgGOAY4BjgGOAY4BnAGqAaoBqgGqAbQBtAG0AbQBtAG6AfQB9AH0AfQB9AH0AfQB9AH0AfQB+gH6AAEAPAAGAAsAEwAlACcAKAApACoALwAwADMANAA4ADoAOwA9AD4ASQBKAEwAUQBSAFMAVgBaAF0AkwCUAJYAlwCoAKkAqgCrAKwArQCuAK8AsACxALIAswC5ALoAuwC8AL0AwgDKAMsAzADNANIA0wDUANUA1gDXANwA3QABABP/IAABAFb/5gABAFv/wQABAFv/pAACAFgADgCB/58ACAAE/9gAVv+1AFv/xwBt/rgAfP8oAIH/TQCG/44Aif+hAAQADQAUAEEAEQBW/+IAYQATAAQADQAPAEEADABW/+sAYQAOAAEAW//lAAMADQAUAEEAEgBhABMAAwBKAA8AWAAyAFsAEQABAFsACwADACP/wwBY/+8AW//fAAMADf/mAEH/9ABh/+8AAgBK/+4AW//qAAEAgf/fAA4ACv/iAA0AFAAO/88AQQASAEr/6gBW/9gAWP/qAGEAEwBt/64AfP/NAIH/oACG/8EAif/AAJn/0wABAJT/sAABAEoADQABABgABAAAAAcAKgAwAEIA/AESASQBPgABAAcABAAMACoANQA2AD8ASgABADj/2AAEADoAFAA7ABIAPQAWAMIAFgAuABD/FgAS/xYAJf9WAC7++AA4ABQARf/eAEf/6wBI/+sASf/rAEv/6wBT/+sAVf/rAFn/6gBa/+gAXf/oAI3/6wCV/xYAmP8WAKn/VgCq/1YAq/9WAKz/VgCt/1YArv9WAMP/3gDE/94Axf/eAMb/3gDH/94AyP/eAMn/6wDK/+sAy//rAMz/6wDN/+sA0//rANT/6wDV/+sA1v/rANf/6wDY/+oA2f/qANr/6gDb/+oA3P/oAN3/6AAFADj/1QA6/+QAO//sAD3/3QDC/90ABAA4/7AAOv/tAD3/0ADC/9AABgAu/+4AOf/uAL7/7gC//+4AwP/uAMH/7gARAAYAEAALABAAR//oAEj/6ABJ/+gAS//oAFX/6ACN/+gAkwAQAJQAEACWABAAlwAQAMn/6ADK/+gAy//oAMz/6ADN/+gAAQAUAAQAAAAFACIAUABqAHwAlgABAAUATwBYAFsAXwCUAAsAR//sAEj/7ABJ/+wAS//sAFX/7ACN/+wAyf/sAMr/7ADL/+wAzP/sAM3/7AAGAFP/7ADT/+wA1P/sANX/7ADW/+wA1//sAAQAEP+EABL/hACV/4QAmP+EAAYALv/sADn/7AC+/+wAv//sAMD/7ADB/+wACgBMACAATwAgAFAAIABT/4AAV/+QANP/gADU/4AA1f+AANb/gADX/4AAAgVQAAQAAAXGBwgAHAAYAAD/zv/1/+//iP/0/7v/f//1AAz/qf+iAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/5QAAAAD/6P/JAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/4wAAAAAAAP/kABIAEQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/5QAAAAD/6v/V/+v/6v+a/+kAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/4wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/5gAAAAAAAP/tAAAAFP/vAAAAAAAAAAAAAAAAAAD/7QAAAAAAAAAAAAAAAAAAAAD/uP/kAAAAAP+dAA8AEP+h/8QAEAAQ/7EAAP8mAAD/nf+z/xj/k//w/4//jP8QAAD/2P/hAAAAAP/lAAAAAP/pAAAAAAAAAAAAAAAAAAD/5gAA/8D/6QAAAAAAAAAAAAD/e/+//8r+sAAA/3H+7f/UAAD/Uf8RABMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADwAAAAAAAP/zAAAAAAAAAAAAAAAA/3b/4f68/+b/8wAAAAAAAAAA//UAAP84AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/+oAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/9f/zAAAAAP/SAAAAAP/kAAAAAAAA/7UAAP8fAAD/1AAA/9sAAAAA/9IAAAAAAAD/4f/nAAAAAP/rAAAAAP/rAAAADgAAAAAAAAAAAAD/5gAA/9IAAAAAAAAAAAAAAAD/7P/j/6AAAP+/ABEAEf/Z/+IAEgAS/6IADf8tAAD/v//p/8z/2P/w/7f/xv+gAAAAAAAAAAAAAP/hAAAADv/tAAAAAAAA/9UAAP+FAAD/4QAA/8QAAAAA/98AAAAAAAD/5f/mAAAAAP/rAAAAAP/tAAAAAAAAAA0AAAAAAAD/6wAAAAAAAAAAAAAAAAAAAAD/8QAAAAD/vQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/9QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/9QAAAAD/4wAAAAAAAAAA//EAAAAAAAAAAAAAAAAAAP/xAAAAAAAAAAAAAAAAAAD/8wAAAAD/8gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/mAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/8QAAAAD/eAAAAAAAAAAA//AAAAAAAAAAAAAAAAAAAP/rAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//xAAAAAAAAAAAAAAAAAAAAAP+VAAD/8wAAAAAAAAAA//EAAAAAAAAAEgAAAAAAEP/sAAAAAAAAAAAAAAAAAAAAAP+FAAD/7QAAAAAAAAAA/9gAAAAAAAAAAAAAAAAAAP/sAAAAAAAAAAAAAAAAAAAAAAAAAAD/7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP/wAAAAAAAAAAAAAAAAAAAAAAAAAAD/8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/lf/DAAAAAAAAAAAAAAAA/4gAAAAAAAD/xQAAAAD/7AAA/87/sAAAAAAAAAAAAAD/VgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAEwAGAAYAAAALAAsAAQAQABAAAgASABIAAwAlACkABAAsADQACQA4AD4AEgBFAEcAGQBJAEkAHABMAEwAHQBRAFQAHgBWAFYAIgBaAFoAIwBcAF4AJACKAIoAJwCTAJgAKACoAM0ALgDSANcAVADcAN0AWgACADUABgAGABoACwALABoAEAAQABsAEgASABsAJgAmAAEAJwAnAAQAKAAoAAMAKQApAAUALAAtAAIALgAuAAoALwAvAAcAMAAwAAgAMQAyAAIAMwAzAAMANAA0AAkAOAA4AAYAOQA5AAoAOgA6AAsAOwA7AA4APAA8AAwAPQA9AA0APgA+AA8ARQBFABAARgBGABIARwBHABEASQBJABMATABMABQAUQBSABQAUwBTABUAVABUABIAVgBWABcAWgBaABYAXABcABgAXQBdABYAXgBeABkAigCKABIAkwCUABoAlQCVABsAlgCXABoAmACYABsAqACoAAMArwCvAAQAsACzAAUAtAC4AAIAuQC9AAMAvgDBAAoAwgDCAA0AwwDIABAAyQDJABEAygDNABMA0gDSABQA0wDXABUA3ADdABYAAgA0AAYABgAEAAsACwAEABAAEAAOABEAEQASABIAEgAOACUAJQAMACcAJwACACsAKwACAC4ALgAXADMAMwACADUANQACADcANwAUADgAOAAHADkAOQADADoAOgAKADsAOwAGADwAPAANAD0APQALAD4APgAPAEUARQAVAEcASQAQAEsASwAQAFEAUgATAFMAUwAFAFQAVAATAFUAVQAQAFcAVwAWAFkAWQAIAFoAWgABAFwAXAARAF0AXQABAF4AXgAJAIMAgwACAIwAjAACAI0AjQAQAJEAkgASAJMAlAAEAJUAlQAOAJYAlwAEAJgAmAAOAKcApwASAKkArgAMAK8ArwACALkAvQACAL4AwQADAMIAwgALAMMAyAAVAMkAzQAQANIA0gATANMA1wAFANgA2wAIANwA3QABAAAAAQAAAAoALABIAAFsYXRuAAgACgABVFVSIAASAAD//wABAAAAAP//AAEAAQACbGlnYQAObGlnYQAWAAAAAgAAAAEAAAABAAEAAgAGACAABAAAAAEACAABACwAAQAIAAEABACgAAIATQAEAAAAAQAIAAEAEgABAAgAAQAEAKEAAgBQAAEAAQBK) format('truetype')}#toasty .toast.toasty-theme-default{font-family:Tahoma,Geneva,sans-serif!important;font-size:12px;border-radius:0}#toasty .toast.toasty-theme-default .close-button:after{content:'x';color:#fff;font-size:17px;font-weight:100}#toasty .toast.toasty-theme-default .toast-text{color:#fff}#toasty .toast.toasty-theme-default .toast-text .toast-title{font-size:13px}#toasty .toast.toasty-theme-default .toast-text a,#toasty .toast.toasty-theme-default .toast-text label{color:#fff}#toasty .toast.toasty-theme-default .toast-text a:hover,#toasty .toast.toasty-theme-default .toast-text label:hover{color:#f2f2f2}#toasty .toast.toasty-theme-default.toasty-type-default{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NEEzQTA1RTUzMjJBMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NEEzQTA1RTYzMjJBMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0QTNBMDVFMzMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0QTNBMDVFNDMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pr4ktvwAAADlSURBVHja7NrRDYIwEIDh1jAAozhKN/BWcgJ0A0dgBEbRCbCNkphaTAsPXpv/kkugELgv5eCh2HmeTQtxMI0EEG3RxQPW2mXT+Tz57JXUevd59XkLO1+9HQY+8x1DOKQ0h2TdCYhTjFjSxXWnekQqaAnJafa+AkjP6xcIECBAgAABAgQIECBAgAABAgQIECC7Y2oB8vB5qR0SEJKakW7Dxc7mtejyj8dpXL13Yn0knLy2LiFapiZnoWfUjtgDEW3NsgUiGru+FCJaX18lELWIEohqRC7kWMOXMa7b8ncQECA/4ynAAPBVcVo7OMcUAAAAAElFTkSuQmCC)!important;background-color:#efefef}#toasty .toast.toasty-theme-default.toasty-type-default .close-button:after{color:#000!important}#toasty .toast.toasty-theme-default.toasty-type-default .toast-text{color:#4b4b4b}#toasty .toast.toasty-theme-default.toasty-type-default .toast-text a,#toasty .toast.toasty-theme-default.toasty-type-default .toast-text label{color:#4b4b4b}#toasty .toast.toasty-theme-default.toasty-type-default .toast-text a:hover,#toasty .toast.toasty-theme-default.toasty-type-default .toast-text label:hover{color:#585858}#toasty .toast.toasty-theme-default.toasty-type-info{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NEEzQTA1RTkzMjJBMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NEEzQTA1RUEzMjJBMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0QTNBMDVFNzMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0QTNBMDVFODMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvCIVOQAAALtSURBVHja3Jq9axRBGMZnj+ViAhbaaISLR1AUBBNjEq7zD7gUiqIIgraKVf4Ay9gljYVFiliJEklyJE26dJsPYy5pE/AQtNNC8SMXHJ/BN7C3O/exe+/c7twLP5jmZp7ndnZ25n3HkVKKboiM6JJwmfrpA6fACCiAIXAB5H1/1l/wEeyDMvDANvgGfrYrwGlzavWDcfAQ3IrZxwJ4BTbAl9hKlJEY5MADsCv5Ypf6zMXRFPUHLigCT5oLj8ZwTRk5C57LzoUaq5/byFWwLDsfS+Ayl5EC87sQNTZJQ0OdzVYttYS+oWU1yVDL9D1auiN/EM+BmRSYEKRhhjRFMpIFT0ExRR/vImnKRvkgqh+9Az0p24n8AbfBSitPZAA8YzJRBT+IKkN/PaRtoJkRB9ygbQdHzILTxCxTn+Ok0WlkRO2dJhmnwhE9iSq1uWKStGqNOOR2mHHAM7TijFCbK4ZJq6N72U+A1+Am44C/wHdqnwS9jH0vgvvgd9CIWqM/WXTYUuebHPgcnFqjlp0YM6Q59I4UDAymDkuPiQ0D/Rd0R90hQ0ZeUvsK47Ie0uw3Mmjo8WcNJjoGdVMrb2Agp06bK/I6I66wL9yuy2tlAtsJ2+JIZ6RioZGKzsiBhUYOdEbKFhop64x4FhrxdEa2VAbVIhOSNIeMfAUli4yUSHPIiDrYz1lkZI40h4xI2uTtWGBih7TKel92VZ+YNjCXud+9aRGopbiaQdfILceWewJcpPYlxqPBWvDPqZegUwLmRToTdHfAcqO9lj9W6fGlaTmWpGm12abRH4fghdCkJhOMFdJ0qD34tFBWeAuuJWziA7grYpYVBP3wifhfn0gqtknDfuOJ11rpTZW/SglUq0qcpbdjVGFyqoMmpkwUQ/3l6QmwbtDAOo3hmqyzBy8M7DEa2GvnwkC7VzhUvngMPBLxk9+LtAHcFJTHjZV3YrrmdHyp5rqovVRzXtReqqmI2ks170VKLtWkMh1kdfwTYADvtL/RevtcWAAAAABJRU5ErkJggg==)!important;background-color:#3ebfa8}#toasty .toast.toasty-theme-default.toasty-type-wait{background-image:url(data:image/gif;base64,R0lGODlhIAAgAPcAAAAAACZOTh5eXiJSViZUVCRUViZUVlp+gCJWVjxmaC5cXGKEhlyAgE50dM7Y2MzY2GCEhDRgYjhiZDhkZDhkZkJsbFZ8fDpmZjxmZkZucEhwckpwckpyckpydExydEx0dFB2eFp+flJ4elZ6elZ6fKq8vFh+fmCAgmKGhsbS0maGiJywsGSEhrTExJiurn6amrLCwhhMTCJUVq7AwCJUVBxUVCRSVCJSVCRSViRSUiJSUmyKjChWVj5oajJeYE50djZiYjpkZkRsblh8fkhwcFJ4eFR4elh8fChYWCpUVCpYWCpYWixaWixaXC5aXIagoDRgYCRUVD5oaEBqakRubkBqbEJqbE52diZWVjBcXjZgYihWWDJgYCZWWCRaWi5cXjBeXlB2dlp8fjJeXiRWVgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEFAGUAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAIAAgAAAI/gDLCBxIsEyUAgUG0KCBsACBghAjliEwwEbDiw1xFNAhMWIBjRgbZkGCseNAHg15SGCCMcKBAwkw0uiIgGEBHkYOgCBwscLLCiEfQuRhswCSEC8jNCQAImlIHDMLhvR54AdPoy8PoHwqNaQSpAeUFgDy8sdFAhF6GEg4kADIs0LKIqQ6pefLHgVqChxgNAvGJVl9FGjgtACTpi8/NBRoUYNOClsLZDhgQkGBCBs6YCkgwUTWDiQRGsSa1UIPkkgmhL6YICtMjFcJVAD7MkTMkAh7vBRhGXdDJD0sZOXgu4CBDBlWY+SLUUJTscWL47jhW7nvCUJ6XADiQ8HaAdSD/q6NbmABivPoDyREcBGJhAwWLFjHyAO9fQgfES7pccX1ASDRETBBBhw0IIIFDBDHnmT+HWBBb7jxdFWEBbRWVg8KTBjUCymEUFwZOPAwhQQ8TOiDBcmd9YMDLJ5gUUll+IaFCC/FpEAFUxjgQwssOsDCi4uVocOCdlHGEmEHCBYBDD3u8CINZAwUkg9Z3bbBSxIg5MMMPaoQZFsNzfiSB1fF9RpCCpTA4hMEREVQUVSZsERDuh0AVEMKrODCEgTkEJFbBdQ5wUUTvKQBbAQQgEVHNGgUQQIaUnlAAyHR4KdJZQxAJJ4vgXARQ5i+iZsECUBYQJShQnQVDgMMgMOCA5gGBAAh+QQBBQBcACwAAAAAIAAgAIcAAAAmTk4eXl4iUlYmVFQkVFYmVFZafoAiVlY6ZmYsWlpmhohKcHKetLQyYGCesrI2YmI4YmQ4ZGQ4ZGZAampQdnhCbGxEbG5Ebm5GbnBIcHBIcHJOdHZWenpSeHhQdnZWfHxSeHpUeHpUenpWenxYfHxYenxYfH5Yfn5afn6csrKYrq4YTEwiVFYiVFQcVFQiUlQkUlaMpKYkUlIiUlKKoqSGoKKEnqB6lph4lJZqiowoVlY+aGguXFxMcnQ0YGJAamxOdnYoWFgqVFQqWFgqWFouXF4wXF4wXl4yXmBKcnRKcnIkVFQ8Zmg+aGpCamw8ZmYmVlYuWlw0YGAoVlhMdHQwXFwmVlhOdHQkWlosWlwkVlYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gC5CBxIkAuTAgUGuHCBsACBghAjciEwYEbDiw1jFKAhMWIBjRgbGhGCsePAHQ13RFCA8ceBAwkwuuiIgGGBHSIOVCBw0cJLCyEfQtxhs4AQFC8hNCRQ4eWPkDFmFgzp8wAHnkZfHkAJdWpIIkgPOEAI4SWHiwQcUDCQcCABkGgvmEVYlULPl3ZrChxg9AhGBVqRFODgFKGCpi+rNBRokYHOBFwLYDhwokcBBwx8RCkQ4YRWHyQRGsyqtQMFkkIkhL7IQ+uBJhixErAQ9iUKHiEbtj4QwnLuhkJ4gPj8u4CBDBhWY+SLMULTp8Wjx4DxW/lvCBQSRPhxRMHmAdSD+7KNTsC11hAJEVwUEiEDiA7WMUYxb/sjwiIUPphXGh07hswVjJBBAepJRh8IvuVGwHi/8dSEVhzw0ANWuRmwwAo+UFhSDDtQEMEOFCIBQgbKzdZAAw+cFZJAv0XhwUu49WDBWj3IcGIDHqzIBQ0F3nVACSwRJlYBR9RwYwkNubDFQCE5oFVMBTh2QAQI9WDDjSJgVRCFLr6UIUJyHYCbYTecqAMBUhFUVFUnsITQbkA1pAAOORBBwAwRvVUABS9JcJEELzEQGwEERNGRCxpBkICGTloVkgt4msTFAD021MNLFVzEkKRq5hZBAgkWsCSnEGEVwwADxFCgpAEBACH5BAEFAGQALAAAAAAgACAAhwAAACZOTh5eXiJSViZUVCRUViZUVlp+gCJWVj5oaCxaWmCCgl6Agk50dtji4jRgYqq8vDhiZDhkZDpmZjxmZjxmaERublZ6fD5maEpyckx0dE50dFJ4eFh+flR6elh8fFp+flZ6elh8fm6OjrTExmyMjq6+wHSSkp6ytBhMTCJUViJUVBxUVCRSVCJSVCRSViRSUiJSUiJQUmqKjISenmSGhihWWEBqbDBeXlB2djZiYjhkZkZucFZ8fEpydFJ4eoCcnIigoipUVGKEhCpYWk52djRgYHiUlCRUVIykpEZubpywsD5oakJsbEhwcExydEBqakJqbERsbkpwciZWVi5cXChYWDJgYFB2eFR4eipYWCZWWChWViRaWmaGhi5cXjJeYDBcXiRWVkhwcgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AMkIHEiQDJICBQasWIGwAIGCECOSITCgRcOLDV8UiCExYgGNGBviIIKx40AbDW1EUIDxwYEDEzCu6IiAYQEbHg5wIHCxycsbIR9CtGHzZoeXDxoSyIE05IuZBUP6PNCA582XB1A6jRqSyNEDSQvoeNngIoEHTAwkHEgApFkLZBFOBdpwKpMCNQUOuIkDowKsfRs0LaCA6UsNDQVazKBzgtYCcDtUKfAggwYqBSJ8PaCBJEKDV7FeYELShgTPFxNgPUABo1UCTTYf6JAgZEPVBzxMtp0ywQWsGXgXMMDDwmOMezFG4ABWuPOPLngf562DyYQID3AowDwgelC1zgn8rMbqISGCi0Qi8PhwYTpGKuNfdviIkAgTw1h1PNdxw4LlHB7wgBdCcI13wW68WZVgARVg1UACVSgYVAYzUCDhRWS8YMMNEdigIA4f8KAVASRGMMKJCVxYgEC8UcHcASnyQAMQNhAxxIkj3HChQDGch9FUHShAAAQOOFCWAjee2IRVK4gxUEhXYBUTASgUOQRCCiyA45KfEaSgi4fxREASRZ5gFREMnFgWVAQVdYN8LDl0RJFBKOhVewTAEFFbBTDxkgQXeVHkEha5RkVHK2j0wAQSclCkCYU2tIKeJpExgI+pFUlCpAxV2mZQNYyQQKROegqRVS9094KPlQYEACH5BAEFAF0ALAAAAAAgACAAhwAAACZOTh5eXiJSViZUVCRUViZUVlp+gCJWVjxmaCxaWl6Agk50dqi8vDRgYo6mpjhiZDhkZDhkZkJsbFZ6ejpkZjpmZjxmZkZubkhwcEpwckpyckpydExydEx0dE50dFB2eFh+flJ4eFR4eFJ4elh8fFp+flR4elR6elh8foqipBhMTCJUViJUVBxUVCJSVCRSVoagoiRSUiJSUnyYmnyYmHCOjm6MjmqKjChWVkBqajJeYGiIilB2djZiYkRsblZ6fEZucEhwclJ2eChYWCpUVGKEhCpYWCpYWk52djRgYCRUVDZiZD5oaEJqbERubkBqbD5oaiZWVi5cXChWWDJgYCZWWCRaWi5cXjBcXjBeXlZ8fCRWVgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+ALsIHEiwy5ICBQa0aIGwAIGCECN2ITBARsOLDWEUmCExYgGNGBtiIYKx48AcDXNAUIDRwYEDCTC26IiAYYEcJw6AIHBxwssJIR9CzGGzAJEQLx00JAAiaUgYMwuG9HmAAU+jLw+gfCo15BGkB5QW8PGSwUUCDnQYSDiQAMizP8oipKqj58u6NQUOMJoFo4KsOwowcFpAQdOXHhoKtKhBp4StBTAcCDGlgAMNHKQUgAD2AAeSCA1izUpBB0kiEUBfTJAVJsarBCZ0nhwzJMImL0lUtt2QSBMgWTfwLmAgCAbVGPdihNBU7PDhMF7wRs7bh44EEBxkUaB5gPSga5/2E2idlURCBBeJQMhQggJ1jFLIvwzxESESHT3I+3g+VgeGDB2AgEIQBaAXmXxA7MYfbzyxVlYTU1zFm2z78dYFDDnoAEEOEu5QQhDU7ZAVBBIq1gVvUojwUgIENIEDDzkQQUJWEZRYgEAzGGjXZAoQEEMDDQB1xGEwXdUCFwOFJOKKDtEApAgIEUFkBSa21VCKL3VwlQ1ALnCVlC/9UEBUBBVFVQgsIWQEkDdImMMGGkhBgAwRuVWADi9FcNEJQNJgGwFSdNSCRg6weBEGQKoQUgt0mtTFADo2BAGQD1zEkKNlBjXCARBchCSmEF0FwwADwGCgowEBACH5BAEFAGYALAAAAAAgACAAhwAAACZOTh5eXiJSViZUVCRUViZUVlp+gCJWVj5oaC5cXF6AgFyAgFB2duTq6tjg4jZiYjhiZDpiZDhkZDhkZjpkZjpmZjxmZjxmaERublh8fj5maHiWluLo6EpwckpydNri4kxydEx0dE50dE50dk52dlJ4elp+flR6elZ6elZ6fFh+flZ8fHSSknqWmHKQkMjU1IykpIiiotbe4JqwsBhMTCJUViJUVBxUVCRSVCJSVCRSVoCanLDAwiRSUiJSUsbS0myKjChWWEJqbDRgYFB2eEZucEpyclR4emiIiGSGhmKEhihYWCpUVCpYWCpYWixYWixaWi5aXDRgYiRUVEBqakJsbEhwcD5oakBqbERsbkhwciZWVjBcXiZWWChWViRaWi5cXjBeXjJeYCRWVjJgYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AM0IHEjQDJUCBQbcuIGwAIGCECOaITAgR8OLDXcU+CExYgGNGBt2YYKx40AhDYVEiIKRyIEDFjDe6IiAYQEhKA4UIXDRysshIR9CFGLz5omXEBoSaPBySsgdMwuG9HmgAc+bLw+gfCo1pJOjB4gghPCywUUCRKoYSDiQAMizGV6SQEgVaMMhL6sUqClwwM0uGJ9kFVNgRFOEUZi+FNFQoEUPOilsLRBXg4ICRDx84FIggoasH0giNIg1a4oqJIVMEH0xQdYDFzBeJTAE7MsTCUI2dH3AxGXdKROoAA28gAEjGSZj9IsxQpGwxaN/1AFcOXAIVSxEINIlCucB1IP+ro1O4HVWEwkRXGQSwQiLFNYxcjF/+yPCJ1UUZ00aHcKQDB6E0AAKRuyFUFzmqfCbdMDxhEFWDSSgAAEEWKTbEBrwp5sZOwhRRQRCXFWACDPQsCBCLr0UgYiNmQGcE0A44IALBEBQRANCMGFCVhOwWIBAP6h3VgwygpCbEhxwMEEBTjz30gVX3UDGQCE1IKMDL/C0QJJ2MaFfBS221RAUMMjYw1UoJOlBSoplUEBUBNlEgAwyPiBBQyEkiYKIQnzgARcE+BCRWwTwIGMQIlqRJAM+OsRFRzfsQMACLbBYQZJK+HiDoCaZMQACPnaRZBIiMtRpnEFZYYQYIk55KkQKV+0wwAA7CNlpQAAh+QQBBQBcACwAAAAAIAAgAIcAAAAmTk4eXl4iUlYmVFQkVFYmVFZafoAiVlY8ZmgsWlxegIJOdHS0xMSyxMQ2YmI4YmQ4ZGQ6ZGZCbGxWenw6ZmY8ZmZEbm5Gbm5GbnBIcHBIcHJKcHJKcnJKcnRMcnRMdHRQdnZafn5QdnhSeHpYfn5UeHpUenpWenquwMCsvr6qvLyetLScsrIYTEwiVFaMpKYiVFQcVFQiUlQkUlZ+mpokUlIiUlJykJJwjpAoVlhAamoyXmBoiIpOdnY4ZGZEbG5YfH5khoZWfHwoWFgqVFQqWFgqWFosWlpggoJOdHY0YGA0YGIkVFQ+aGpCamw+aGhAamwmVlYuXFwyYGAmVlgoVlYkWlouXF4wXl4kVlYwXF4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gC5CBxIkEuTAgUGxIiBsACBghAjciEwwEbDiw1pFLghMWIBjRgbYiGCseNAHQ11QFCAccmBAwkwxuiIgGEBHSYOjCBwccLLCSEfQtRh86aIlw8aEgjxkklIGjMLhvR5IATPmy8PoHwqNaSRoweWIHzwMsRFAkt2GEg4kADIsxde+kBIdUfPl3ZrChxwMwvGI1l5FGDQFKECpi9BNBRocYNOCVsLxC0xpcASDh6kFIBQIqsHkggNYs1KYQdJHRFAX0yQFSbGqwQmgH0pImZIhE5ekqh8O6UTClk79C5gIMOFyBj5YoQwIuzw5x9n9Ebe+8GOBBCWZFGgeYD0oGuf+BNonZVEQgQXiUDIMIQCdYxSyNP+iPDIDsRZkz63fkHDhxAnZFAAepLJRwFv0PXGE2tlOTEFbLdNUIJ+t3FBgw47QKDDVQVMsEINLF3EQ1YQcLgYF70Z0UIDDQhRwBQTqEUECVlFYGIBAt1AoFI4sJhCUoQdIJgRzb2UwFUxaDFQSBiw2MACPHHwEgQIEYGfBCe21dARLLAIw1VxuYaQDohdUEBUBBWVA4sqiIXbTxfp0AEHUhBgQ0RuFdADiwdwGMFLGtxGgBQdxUDDUkmYOOIBDIQUw50mcTEAAjcqUNZFDEWa5m0QJBAiQkpqCtFVNAwwAA0ERhoQACH5BAEFAGkALAAAAAAgACAAhwAAACZOTh5eXiJSViZUVCRUViZUVlp+gCJWVj5oaC5cXGiIiGCCgk50du7y8tzk5GSEhjZiYjhkZIKenuzw8DpkZjpmZjxmZjxmaEZucFh8ft7m5kpyckxydEx0dE50dFB2eFp+flJ4elR4elR6elZ6elZ6fFh+flh8fH6amoSennyamsDMzhhMTCJUVp6ystri4iJUVBxUVCRSVCJSVCRSVoiioiRSUiJSUqS4uHSSlIagoMDMzGqKiihWWEJqbDJeYGqIilB2djhiZDhkZkpwcEpydFJ4eChYWCpUVCpYWCpYWixaWixaXC5aXDJgYDRgYDRgYkhwcCRUVHqWlnSSkkBqakJsbEpwckhwcj5oakBqbERsbkRubiZWVjBcXiZWWChWViRaWi5cXjJcXDBeXjJeXiRWVjBcXAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+ANMIHEgwzZQCBQbEiIGwAIGCECOmITBgRsOLDWsUwCExYgGNGBt+QYKx40AfDX1IYIIRyoEDFjDG6IiAYQEfIw6AIHDxyssfIR9C9GHzZoiXERoSAPEySsgaMwuG9HmgAc+bLw+gfCo1pJKjB54gjPCywUUCT6wYSDiQAMizXMoipAq04Y+XVgrUFDjg5heMS7ICKdCgKUImTF96aCjQIgedFbYWyHBAg4ICTzh08FJAgoasHUgiNIg1awkrJFWKvpgg64ELGK8S+AH2ZYgEIRu2PiDicu6UCUxk5fC7gIEMGSRj7ItRAlMoxaN/pPFb+e8IVixIgPKFCecB1GP+G1By9TcB11lFJESAkMAMID1ybHjwt7gX9LY/Ooywg4WD//9BIF0EP2SgGQgkZKCXQy8ACOADxElXHE9UAMiCCkUQoGF5F/2gQVK/pVGDAjYsQIZFCEmQAgNKYAREVhJwOFoaDtWYkg4TTGCWAj+ohYQIMMooEA7snaVBjikMVtgBgymR2GtXxXDGQCFVkOMEHPD02AESIITEkxUwRlB5PuA4QQ8oxnUAbgj5kBgXBURFUFEmIOlbAbtdcZEPHHDgBQE3RORWASLkKEV5ErwUYWxedBSDRj90wOGLVYUUQ6AmpTEAAjIq8BIIFzGU6Zy5SWDBnQVMOSpEV9UwwAAFNRSZaUAAIfkEAQUAXQAsAAAAACAAIACHAAAAJk5OHl5eIlJWJlRUJFRWJlRWWn6AIlZWPGZoLlpcZoaITnR0vszMvMzMNGBiOGJkOGRkOGRmQmxsVnx8OmZmPGZmRm5wSHBySnBySnJySnJ0THJ0THR0UHZ4WH5+Unh4Unh6VHh6VHp6Vnp6Vnp8WHx+Wn5+sMLCsMDCrsDAmrCwGExMIlRWhqCgIlRUHFRUJFJUIlJUJFJWJFJSIlJSgJqccpCQbo6OboyMKFZWQGpqMl5gUHZ2NmJiOmRmRGxuWHx8SHBwKFhYKlRUKlhYKlhaLFpaLFpcTnR2MmBgNGBgJFRUPmhqQGpsRG5uPmhoQGhqQmpqQmpsJlZWMFxeKFZYJlZYJFpaLlxcMF5eJFZWLlxeAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACP4AuwgcSLALkwIFBrx4gbAAgYIQI3YhMCBGw4sNZxSoITFiAY0YG1YZgrHjQB0NdUA4gvHBgQMJML7oiIBhAR0iDnggcHHCywkhH0LUYbPAkA8vHzQk4CFpyBkzC4b0eaAHT6MvD6B8KjVkEaQHlBbw8bLHRQIPdhhIOJAAyLNAXiZBSHVHz5d2awocYLQKRiNZeRRg4LTAkaYvOzQUaBGDTglbC1w48MHvgwwbqBSAAPbABpIIDWLNSmEHySERQF9MkBUmxqsEJnSmHDMkwiYvQ/i13XBIEwpZNfAuYODCBdUY+WKE0FTs8OEzZPBGztvHjgQQHlQ5onmA9NcEdPZc5U2gddYQCRFcrPLBBQoUCp5TMf/yw0eEPHCsaMCf/4jnY+1wAQYceDDCBQWoV4AN/fWngl0ADsfTAv2tkIMU49kmmw/DdTHDETd8oEAMV/FAwXEY8ZAVBBmG1oVDLVIBwksxVTGBWkOEkFUELQpUg4J3UcYSYQcIVgRiMF31whYDhaQijQhl8BIECA2BZAWLETSejC9xcFVcrlWJGBAFREVQUVR9YERDuB0AVEoaZEAFATRE5FYBO7wUwUURvISBbQRQ0dELGj2QQIZPMhDSC3Wa1MUAQDakwEseXMSQo2faBkEC8TXEJKYQXTXDAAPMoKCjAQEAIfkEAQUAaQAsAAAAACAAIACHAAAAJk5OHl5eIlJWJlRUJFRWJlRWWn6AIlZWPGZoLlpcZoiIYoKETnR2+Pr61NzcZIaGjqao9vj4NGBi8PT08PLyOGJkOGRkOmRmRG5uWHx+OmZmPGZm5urq4ujoSnBySnJ0THJ0THR0TnR0Unh4Wn5+VHh6Vnx8WH5+WHx8hqCglqysdpSUjKamztjYvsrMjKSkgpycGExMIlRWsMDAIlRUHFRUJFJUIlJUJFJWdJKShJ6gJFJSIlJShKCgcI6OKlRUQmpsMl5gUHZ2NmJiSHBwSnJyUnh6VHp6KlhYLFhaLFpaLFpcMmBgNGBgJFRURm5uPmhqRGxuRm5wPmhoQGpqQmxsUHZ4Vnp8JlZWMFxeKFhYKlhaKFZWJFpaLlxcMlxeMF5eQGpsJFZWKFZYJlZYLlxeKFRWKlZYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACP4A0wgcSDDNkwIFBtSogbAAgYIQI6YhMOBGw4sNcxToITFiAY0YG2pJgrHjwC0Ns1hYgnHCgQMJMNboiIBhgSwmDpAgcFHKyyAhH0LcYrPAlhIvJzQkMCRpyBwzC4b0eaABT6MvD2QJ+VFqyCRIDygtQORlg4sEJkQxkHAgAZBoM5hFSBVowyAvoxSoKXBAAQVWrxZQklVIgQZOCyxp+lJEQ4E3CNBw8EBHkqtyNWgpMOEDiK0WNGQFQRKhwb8OUjvoAEMIgS0XSl9MkBUmxqsEVlBQ7YBCDK4Io7w0sRl4gRtgVHhQ/cIiVwNTMqDk6vdilx8uHDAwzv0jjqAEXP53JxIlgYUJWpZsHfA9pIGt3AnUzmoiIYKlSz4sUKFCNtcs871UwkcIaaEBCxEkmCAU4wWRwQchDIHEFHshBIGCCu5gQXfxFUCCgiycsCF3QWhAhHFp5ABWEUo4hJAQGkwxXUNCZGWBYI+lgRCON5HwUkxaBFGFAUnk9NIFPArUw30YUaUBS4gdYFgSPv54VQ1jDBRSjT8i9MFLIybB2AEY5OhWSlWGgFmXCG3BWAYFREVQUXgdoEGLwb0kxUVZgPBBFgTwENFbBQh3wAUXXfDSB1wRkEVHNWg0QQI4cnmWTIKalMYATF6kwEtDXMSQpnNyZUECClyUJakQXZXDAAcD5MCkpgEBACH5BAEFAGIALAAAAAAgACAAhwAAACZOTh5eXiJSViZUVCRUViZUVlp+gCJWVjpmZixaWlyAglyAgEpycsjU1DJgYMbU1DZiYjZiZDhiZDhkZDpkZkBqbFJ4ekRsbkRubkZucEZwcEhwcEpwclB2dlh8flB2eFh8fFh+flJ4eFp+fqi6ul6AgsLQ0JCoqMLO0HCOkJywsLrKyrjGxmKEhHSQkhhMTCJUViJUVBxUVCJSVCRSVqy+vnyYmCRSUiJSUihUVj5oajBaXE50dDRgYkJqbFR4eihYWCpUVCpYWCpYWixYWmyMjDJeYExydEpydCRUVDxmaEBqakJsbDxmZj5oaE50dkx0dCZWVi5cXDRgYChWWDBcXiZWWCRaWixaXFR6ei5cXjBcXDBeXiRWVihWVi5aXFZ8fAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AMUIHEhQjJICBQbIkIGwAIGCECOKITAAR8OLDWsUyCExYgGNGBtaCYKx40CSCKVMUIDRx4EDCTDK6IiAYQEpQA6AIHARw0sLIR9CDGKzQBARLyM0JODhpY+QNWYWDOnzgAeeRl8ekBLy49SQQ5AeeIAwwksPFwk82GEg4UACINNWhYKwKtCGP17uKFBT4IACCjAQwApY65ECPZwiVND0ZZSGAnEQQOHAhosqWDMc+DClwIMGSLhO+KAVCcoCBgE7WO2AxQsrBIJQON1widYDSzBiJXDjBGsHJ4wQxrjj5YXOXRvyUNGC9YrkBQxoyED74t+lOkyUcAAEuvePNIL+EpgyvGuEHQkm+LCigOuA8CENcPVO4LbWCwkRXJTdQMSH6hhJYd9LInyE0BAWeLDAggtK8F0EFmQAmgdaaMAXQhswyOAHVnxHXwFLMOiBBVa0Bd0PHyiVnBg1SGHBbIQd8YEG1T2g1QTloSZGclJc8FJuU1hggQFB+PgSBeUJlIN+GFX1AUuJjVXAECBotQRWMngxUEg2vhRTAQ28NAFCQTQGE2QEEdbjS0hgVVVuZDaGQQFSEVSUBS892VBxB8zZkBQNNCAFAThEBFcBfFJwEQUvNdAVAVJ0JINGESQwXJc9hCRDoSaJMQCTF01x1kUMdWpnVxMkgBxCWpoKEVYJNQwwQA1MdhoQACH5BAEFAFcALAAAAAAgACAAhwAAACZOTh5eXiJSViZUVCRUViZUVlp+gCJWVjpmZixaWlyAgEpwcpiurjJgYJSsrDZiYjhiZDhkZDpkZkBqbFB2dkRsbkRubkZubkZucEhwcE50dlJ4eFB2eE52dlJ4elR4elR6elZ6elZ6fFZ8fFh8fFh8flh+flp+fo6mqIykphhMTCJUViJUVBxUVCJSVCRSViRSUiJSUoSeoIKcnniUlnCQkChWVj5oaC5cXEx0dDRgYkJsbGKEhihYWCpUVCpYWCpYWi5cXjBeXjJeYEpydEpyciRUVEJqbDxmaD5oakBqajxmZiZWVixaXDRgYChWWE50dDBcXkxydCRaWiRWViZWWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AK8IHEjwypECBQa0aIGwAIGCECNeITAgRsOLDWEUkCExYgGNGBsK8YGx48AbDW9EUIBxx4EDCTC26IiAYYEbIA5wIHDRwksKIR9CvGGzgI8TLyE0JFDh5Y6QMGYWDOnzQAWeRl8eQAl1akggSA84QAjhZYWLBBwoMZBwIAGQaKtuQFgVaEMeL5UUqClwQAEgSdg2VKB1SIENThEqaPpSR0OBMQjYaDCjgg+sFw6YyFHAAQMdTQpEMKFVB0mEBv82WN0gxQKWPiScvohD64EkGLEW6PGAdYMHJHRjrH3gA+eQSxWgUMG6hvCLBjJcmI3R71IDOmg0wIC8O0YYL5D+G1DwPCQEJQki7BiiIPSA8EEFeydgW+uHhAgu+oiQgYQI6iE1Ud9LJ3yEUBBKMKaVUt4VAAEFF3xWQQgZ7IVQZvWNcFyD8xWQhFYV4JBDeRfxYAKDyF0Bww0URHCDbkOQkAGADmgVQXkCddcEBy/hUEAOFFBggA8faCXBcwLJkB9GVZXAEmJi/cXjS0lg1UIVA4VU40sxFcDASxEg5IOCXRZQkG47NoZVVT6KyZgFBUhFUFEUvGQCSwgRB2dKRTDQBAExRPRWAUq8JMFFErzEAHIENNFRCxpBkIBwW84lU6AmXTHAkhflYNZFDGU6J3IRJLBhAViKChFWMAwwAAwES2YaEAAh+QQBBQBnACwAAAAAIAAgAIcAAAAmTk4eXl4iUlYmVFQkVFYmVFZafoAiVlY8ZmguXFxcgIBMcnTS3NzQ2to2YmI4YmQ4ZGQ6ZGZCbGxWeno6ZmY8ZmZEbm5Gbm5GbnBIcHBKcHJKcnJMcnJKcnRQdnZafn5QdnhSeHhSeHpoiopYfHxUenpYfH5Yfn5oiIqGnqBmiIi+zMyourrO2NiKoqKsvr4YTEwiVFYiVFQcVFQkUlQiUlQkUlYkUlIiUlLK1taOpqaywsLM2NgqVFRAamoyXmBihIZOdnY4YmJEbG5WfHxWenwqWFhggoIsWlosWlwuWlxOdHRMdHQyYGA0YGA0YGI2YGAkVFQ+aGhCamxAamw+aGpOdHYmVlYwXF4oWFgqWFooVlYkWlouXF5mhoZihIQwXl5YenwkVlYoVlgmVlgwXFwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gDPCBxI8IyUAgUGzJiBsACBghAjniEwoEbDiw1vFMghMWIBjRgbZjmCseNALQ2PIJGA8cmBAwkwzuiIgCEBBSwa8CBwccLLCSEfQtTCEGEWFw0alGhI4MNLKCFvzCwYUkVSGDwLaHl5AEvIj1RDRkHaQATCBy8/XCTg5IeBhAMJgLxY40XSFgh9HvjR8yXfmgIHFMACJCtCCA6SMigg5CnCJE5fNmko0GIIEgumeEW4o4EODGw3MPAK4QRXBiQRGtRKojWJIBdIZlmRxTDCBFxhYsxKQMMK1yRWAP1aYMrLEQqIIyRw5EIQ1xRsXzSQ4QLKr4KnJ1hAIoLy7x9t/nxlDr7Agx8JIDzJksTrAPFB334nkJvriIQILh6BkKEEhevEYVHfSyB8hNAWP0TG1QPgnXeBBgx8YEIGBeRXwAUDFpFcecTxhFtaUyggHUYTnMAgcWfcgMUPEHBhGBAlZAAgQkBwBcGIAgUowksxKTCBW0eMwFUE0gmUg4V9HVBCEgUw8RIQBRwRAlcJZDXDGAOFVCOPCG3wEgQIHaEgS6oRZBgWOx7AQFYY6oaQFpFdUMBUBBVVgF4nMImQcQcMhxAWHGyABQE4RCRXAT+85F1DEbykwXhYdDSDRg9UedGWQoQ0Q6EmnTEAkg0pkNZFDHVa51cQJLAhQliaClFWCTcMMMANFnYaEAAh+QQBBQBeACwAAAAAIAAgAIcAAAAmTk4eXl4iUlYmVFQkVFYmVFZafoAiVlY8ZmguXFxsioxKcnSkuLigtrY2YmI4YmQ4ZGQ6ZGZCamxSeHo6ZmY8ZmZEbm5GbnBIcHBIcHJKcHJKcnJQdnZYfHxQdnhWenpYfn5SeHhWenxWfHxYfH5afn6gtLSetLSesrKUqqwYTEwiVFYiVFQcVFQiUlQkUlYkUlIiUlKKpKSIoqKEnqBwjpBujI4oVlg+aGoyXmBOdHY4ZGZCbGxUeHpGbm4qVFQsWlosWlwuWlxMdHRMcnQyYGA0YGA0YGIkVFQ+aGhAampEbG5AamwmVlYwXl4oWFhOdnYqWFpOdHQmVlgoVlYkWlouXF4yXl4kVlZUenoqWFgwXF4wXFwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gC9CBxI0EuSAgUGtGiBsACBghAjeiEwIEbDiw1hFJAhMWIBjRgbPoGCseNAHA1xdHiA8ciBAwkwtuiIgGGBICoazMDY4+WEkA8h4rB580SDBhsaEujwEklIGDMLYiSw4CiNlC8PoHwqNSQXB0cxIHzwssNFAkZyGEg4kABIjDeO1iBQoOeBnw0nvMxRoKbAAQVwPMGoA2yDnzuaIgzC9CWRhgItajjwQcJWAjYaoEiAdgMDJwUghMjKgCRCg4GzHgCRg2QQHwroXkygOuZZhAQmjM4awnbIAjleUlDw+yKOHCNIFy9gAMOFrSEBY4Tw4cCR5dg/vigOffmDHAkg+Bx5EgT0gO1A12InoDorhYQILkKBgMEDiO4hnbR/GeIjQik5NJYVS9g9MMEFGRDRgRZixVfABfuNQFx2y9FFW1k5xIadbgT+5gUMOCwBAQ6yFaCDBxjgp0NWEJQImRfFOUHBSzEpMMESBkAx40sRuFiAQDI4eJFdHgRRQGIH6FCAFNXRKFsLWQwU0oo0IrTBSxAgBIWAErzYVkMyOiYbhDCl1NgFBURFEFF6HRCCkQgFd0APxjGwgRMExBCRW8DxeFEEL2XwGwFOdNSCRg9wdhGVO4TUgp4meTGAkA0pUNZFDEW65m8QJDAhQlFqCpFsMAwwAAwORhoQACH5BAEFAGkALAAAAAAgACAAhwAAACZOTh5eXiJSViZUVCRUViZUVlp+gCJWVjxmaC5cXGCCglx+gE50dN7m5tzk5DhiZDpkZkJsbFZ6fDxmZkhwcHKSkt7k5EpyckpydExydEx0dFJ4eFh+flR4elZ8fFp+flZ6elh8fFh8fnCQkIagoG6OkLLCwoykprrIyqS4uBhMTCJUViJUVBxUVCRSVCJSVCRSVoykpLTExKi6uiRSUiJSUmiKiipUVD5oajRgYFB2djhkZDpmZkRublh6fEpwclJ4elR6emSGhipYWGKEhCpYWixYWixaWixaXC5aXDBaXE52dk50djZiYkhwciRUVDZiZDhkZj5oaERsbkBqakZubkBqbEJqbEZucFB2eCZWVjBcXihYWDRgYiZWWChWViRaWi5cXjJeXjBeXjJeYCRWVihWWDJgYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+ANMIHEgwDZQCBQa0aIGwAIGCECOmITDgRcOLDWMUsCExYgGNGBG+qDCGwMWOA7s03JKDC0YRDhyQMNmwRUcEDAsQuWFhCE2HKGKW+InwIcQuOXWSsGAhQcMXKWJOCBnDZkGMBHYwLUJzScwHR0J+vBryyFILERAyiDnjIgEdOQwkHEgApFsOTBcQIBDUwdCGEg4cyFEAp8ABBbq4vKjgLAQCJ6QiRLJD8IENDQVaxHCAQ4QtRT1YIKGDwAQVNIwUgNDBcgYimQ92sXxgQg7YRiSoLvqCQALaTt0WldDacofgYnMI9qBA7MUuOSZYxuC8gIEsPlSKRYwRAocDOqr+i/8Iw7l28U5yJICggwsS0APKhyQgVzwB2pY9JERwkQiECh9McJ5YW+AnWAcfIWREDpXR5sR4TlThQwUa7CBEFoUh5IOBEzQ3XnUm/SbYDjkoQFRIxD3oXBoxbFEFBGD8NMYHWQxYgA6WPRaSQM5t8d0BTikgQRUGEOGBZRGcKJAN/GEU2AEdIFFAA4KVodOPQNLUghkDhVSGZcFxdgAECBHR4AFpIVTQTz4KpgFNGwLZUBcN+lCAVQQl9WQHuxWg3AESXLQFBhhsQUANEdXlp2BpIsSDYBWIRcAWHbWgkRMJEPXlAQ2E1AKiKKUxQJOMjXgRQ6HmKRYECXiIEJcNqUJEUwwDDBBDk6EGBAAh+QQBBQBZACwAAAAAIAAgAIcAAAAmTk4eXl4iUlYmVFQkVFYmVFZafoAiVlY8ZmgsWlpegIJMcnSuwMA0YGCsvr44YmQ4ZGQ4ZGZCbGxUeno6ZmY8ZmZGbnBIcHBIcHJKcHJKcnJKcnRQdnZYfn5QdnhSeHhSeHpWfHxafn5UeHpYfHxYfH6UqqqQqKgYTEwiVFYiVFQcVFQkUlQiUlQkUlaMpqYkUlIiUlKGoKCCnp5ykJBsjI5sjIwoVlg+aGouXFxOdHY2YmI6ZGZEbm5WenxWenoqVFQqWFowXF5OdHQwXl4yXmBMdHQyYGAkVFQ+aGhEbG5AampAamxCamwmVlYsWlw0YGIoWFhOdnYqWFgmVlgoVlYkWlokVlYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gCzCBxIMEuSAgUGrFiBsACBghAjZiEwoEXDiw1fFJAhMWIBjRgb5tBB4GLHgTga4oCgAKOGBg0WYFzREQHDAjgoHPhQEiGBGjBthHwIEcdNnB4OHODRsMUJmAxCvqBZMOQEpR16KoD5oKXUqiGFJD3gAGEHmCh6OnSQw0DCgQRAXiTgQ+kOh0AbCG149UCOAjYFDsA5BKMCpQeKEIABFaGCDoiPNBRoMcNOCSkRXjjgQUeBDDRmCCkAYewBBqMRGsSJ+ICIHKNxREjt0GGC1gkw9iQwwTTn3CER5lBKwXNwlTlEII563MCFC5lDDsYI4QPZ49gzujgeHTuPHAkg9DgYouBJwu1D3WYn0BoxhYQILgqBcEGEiO4hn7RX6uEjQiE5QNYaU9nxwMQFGDDQAQUXAKbZfiIYlx12Jd2G1UhqBdcbgcFl8QIOTECAg1pFiAAdRg4gBkGGqmVx3BMgKJWbDhMwYYAQOikVAYsCyRAfRn150NIOShlRgBDWydjTClgMFJIRiAGngVIQ/CfgARVMRpBaT+TIQE91HQAcTgL6UABVBB0VpFcFDHfABBfhsIEGTxAQQ0RxtanjRREohUFwBDzR0Qoa8ZBAhlAecNdMd56UxQA/XqQDVhcx5GiawUGQgIQFNHkpRD29MMAAL/zoaEAAIfkEAQUAaQAsAAAAACAAIACHAAAAJk5OHl5eIlJWJlRUJFRWJlRWWn6AIlZWPmZmLFpcaIqKYoSETnR26O7uytbWZIaGNmJiOGJkOGRkOGRmQmxsVnp8OmZmPGZmfpqa5OrqSHBw3ubmSnBySnJyTHJ0THR0TnR0Unh4WH5+VHh6WHx8Wn5+VHp6Vnp6WHx+fJqagJycfJiawMzOlqysjqamnLKyGExMIlRWIlRUHFRUJFJUIlJUsMDAJFJWJFJSIlJSgpyessLCfJiYaoqKKFZWPmhqMl5gUHZ2OmRmRG5uVnx8SnBwUnh6KFZYKFhYKlRUKlhYKlhaLFpaTnZ2NGBgNGBiJFRUbIyMPGZoRGxuQGpqRm5wSHByQGhqQGpsPmhoQmpsUHZ4JlZWMFxeMmBgepaWJlZYJFpaLlxcMF5eLlpcWHp8JFZWKFRWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACP4A0wgcSDBNlAIFBsyYgbAAgYIQI6YhMKBGw4sNcRTQITFiAY0YERKIwITAxY4DfzT8IUEBxikZMnTAOKMjAoYFfpA4IMKkSAsxSYR8CPEHzgJIRhw4EOGilJhAQuKoWTBkhaUNfC6JmQHJRZ84qoZcovTAE4RVYvrwWaBGiRUqBwwkAPIrEawIgWYQivDHCwcOdhC4KXAAUi8YmSw9EITAAqgIE7QA7ICHT4EWO/CkoBLh3RGIpzCA4NUHB8o3ziI0iHTxAQtAkiCdIFskAQI9KGsAw9ahyApll46YElJkBsAPZhZviASIhcUelueE4WLMcsMYJYgwK13kchw2lv577V4gApALEp54UdAlYfihBsgTcL1Y6AAEF5NI2FDCwvjlXdAn3EcIMQGEEPQ11V0EVRCxwQdCnGBFAfgVcBd9FlhHnnQmTbFYA0B40ZtVIyhYXBo4/FCFBD+wFUQJVvyHUBCLSTBiAQIBuN0BxHlRQRUGJLHTUhOMKJAOFV501QEjuNTAUkEUsMSOB2Dg0wxnDBQSjUtdgJBmB0iAUBIIdtlQQWx1seMHPl1IHEJIlElEAVQRdNSSIzDREBBLVXDRDx500AUBOUREVwF8HjDBRRMstUFxBHTR0QwaRXBBb1w2ENIMhaKUxn0hKbCUEBcx5KmdxUlwgUsNZXkqRAlgDTAADhV6GhAAIfkEAQUAYAAsAAAAACAAIACHAAAAJk5OHl5eIlJWJlRUJFRWJlRWWn6AIlZWPGZmLFpaZIaGTnR2uMjINGBitMbGOGJkOGRkOGRmQmxsVnx8OmZmRm5wSHBySnBySnJySnJ0THJ0THR0TnR0UHZ4Wn5+Unh4Unh6VHh6VHp6Vnp6Vnp8WHx+WH5+ssLCora2mrCwkKioGExMIlRWjqamIlRUHFRUJFJUIlJUJFJWJFJSIlJSgJycepaYdJKSbIqMKFZWQGpqMFxeaoqKaIiKUHZ2NmJiOmRmRGxuWHx8SHBwZoaIKFhYKlRUKlhYKlhaTnZ2Ml5gMmBgNGBgJFRUOGJiPmhqQGpsRG5uPmhoQGhqQmpsPGZoJlZWLlxcKFZYMF5eJlZYJFpaLFpcLlxeJFZWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACP4AwQgcSBCMkwIFBrx4gbAAgYIQI4IhMCBGw4sNZxSoITFiAY0YG/IwgrHjQB0NdUBQgNHBgQMJML7oiIBhAR0iDnggcHHCywkhH0LUYbOAkQ8vHTQk4CFpyBkzC4b0eYABT6MvD6C8yHOG1JBIkB5QWgDISwYXY2TogXLAQAIguQo5i5DqjoYGcDRokKNATYEDjPLAqCDrkgIMnBKAoGJvgxVXBVq8oFPC1gIWDpgY7ACDhisEPqBw7GIwQoNYs1LYQdJIBJIYizh+sADjVQITxL78MCVkQx97U+y46tsoFApZMxS/aeMGS9+BMUJoSrY4AeIYZ8goDnt52R0JIPs44KHgSsLtQQ14d5i1fYiECC4agWCBAoXuvq+0z/rhI8IkO/ywHxDrAbGDBRds4MEIFviFUGb7UYDFet7xZEVWDEDBA3ZTmUBgcWDMoMMOEOhA3BIUWIBfAUtkBQGHBQhU3BUgvNQbDxPsYIARIWQVAYcC1RAfRlSZwFJiBxyGRFMvJXDVC18MFFKLTSKEwUsQIGQEkwdU0FBBxNH40gZXzXVAb1oyKUQBURFUVJHPFQDFTxfpkAEGoNEQEVwF7PBSBBdF8NIFvhFwRUcvaOSAkxdRiZZMepoExgBDXoTFSx5cxJCkbvoGQQITNhQlpxBdNcMAA8wwpKQBAQAh+QQBBQBtACwAAAAAIAAgAIcAAAAmTk4eXl4iUlYmVFQkVFYmVFZafoAiVlY8ZmgsWlxcfn5OdHb09vaesrQ2YmKIoqLw8vI4ZGTs8PA6ZGZEbG5Weno6ZmY8ZmZKcHJKcnRMcnRMdHTY4OBOdHS8yspQdnhYfn5SeHhSeHpYfHxafn5UeHpUenpYfH5sjIysvr6KoqTK1tZ6lpaitraEnqDW3t6GoKCSqKgYTEwiVFYiVFQcVFQkUlQiUlQkUlYkUlIiUlJmiIh4lpZykpJghIRsioooVlZAamoyXmBQdnY4YmQ4ZGZGbnBWenxKcnJOcnJegIJmhogoWFgqVFQqWFgqWFosWFosWlpOdnY0YGA0YGIkVFQ+aGpEbm5CamxIcHA+aGhAaGhAamxCbGxqioxIcHImVlYuXFwoVlgyYGAmVlgkWlouXF4wXl5WfHwyXl4kVlYwXF4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gDbCBxIsI2VAgUG1KiBsACBghAjtiEw4EbDiw1zFNghMWIBjRgbnmmCsePAIA2DSFCAkcqBAwkw1uiIgGGBICYOgCBwscLLLCEfQgxis0CTEC8fNCQA4mWVkDlmFgzp8wADnkZfHkB5kWeOqSGfID1ABeGDlwy6XjERJuFAAiC7Vk1boKqQhgYOQIBgoUBNgQOMosEIReuQAgycOhziYy+EFA0FWsygkwLXAkcOhBBTgEoGDWEIHHnhOAVLhAazarUghGQTCSQxgnAc42pXhASyjH0ZImZIhCL2tniA9bfRK0i0ajBewMCPJbFDBsYooWlZ5jwJaMeYA4fx6MYJ/vBY0QLIAg9cniT0HtQAc9wRGsifD+PGAAQXXx8hYQF8yCjzBTjBDSBBIQQRWiX13g08yOCACh+w0IELBOCHWYIvIcHZew5tV4BFuBWQgFYMXCFGcb/pppRxbeQQhBASBFHcECQc4d8QWkmAImptGBeGCC/FJEYWQhjQxAg57ijQDhb2xBtLiR1w2BNNBYlVDWsMFBKOQSJE2QESINRElQdQEBlBxf340gZYVeWbUVVWUIBUBBWVBW9QNHTFS3KmpEEGoekQEVwFCPFSmA1J8FIGvxEQRkc1aPRAAihySddFNQhqUhv3haTASyBgWsCmdf4mQQKnIZQlqRBhlcMABwPkYOGmAQEAIfkEAQUAXQAsAAAAACAAIACHAAAAJk5OHl5eIlJWJlRUJFRWJlRWWn6AIlZWPGZoLFpaXH5+TnR0wtDQNGBiwM7OOGJkOGRkOGRmQmxsVnp8OmZmPGZmRG5uRm5wSHBwSHBySnBySnJySnJ0THJ0THR0UHZ4WH5+Unh6WHx8Wn5+Vnp6WHx+vMzMrsDArL6+ora2mK6uGExMIlRWIlRUHFRUIlJUJFJWjqamJFJSIlJShKCggpyeeJSWcpCQZoaIKFZWQGpqMF5eUHR2NmJiOmRmRGxuVnx8Unh4VHh6KFhYKlRUKlhYKlhaTnR2MmBgNGBgJFRUPmhoRGxsQmpsQGpsPmhqUHZ2JlZWLlxcKFZYMl5gTnZ2JlZYJFpaLFpcLlxeMFxeJFZWAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACP4AuwgcSLDLkgIFBrhwgbAAgYIQI3YhMGBGw4sNYxSgITFiAY0YG/IggrHjQB0NdUBQgNHBgQMJMLroiIBhAR1DDoAgcHHCywkhH0LUYbMAkRAvHTQkACJpyBgzC4b0eaAHT6MvD6B8KjWkEaQHlBbw8bLHRQIOdhhIOJAAyLMXXiJBSHVHz5d2awocYJQHRgVZ/TJwWkBB05cfGgq0qEGnhK0F4oaYUsDBhg5SCkAAe6ADSYQGsWalsIMkkQifLybIChPjVQITOB8IETMkQiYvRVC23ZAIEwpZOfAuYADDhdQY+WKE0FTs8OExYPBGbpsABRw5FvRoAoEIRelB1/Q+J/CggfnzKRIiuEgEAoYRFKhjNHK+/omPCI/siML6gI/nBVBwgw0yrKACCjUQsF5k/R1AwW4AEiAhT68VsFpZTExxFW+x/cdbFzHosAMEOmzIwwgYUJdEVhBsqFgXvEkhwksxTTGBWkTM+FIELhYgEA0L3jUbS4MdkEQBRhwG01UucDFQSCvSiNAGL0GAEBFKVvBiWw3J+JIHV8XV2pWHXVBAVAQVRVUILN3200U6cLCBFATMEJFbBeyw40URvJRBdVJ05IJGDiTgYpQMhOSCnSZ1MUCQDU3xEggXMdRomrZBkACEBTh5KURXxTDAADEs2GhAADs=)!important;background-color:#255556}#toasty .toast.toasty-theme-default.toasty-type-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MkQyQUI3Q0EzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MkQyQUI3Q0IzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0QTNBMDVFQjMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0QTNBMDVFQzMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Po9jTrYAAAKTSURBVHja7Jq/SyNBFMfNuSYB0cbCUzmtTvwbbPwb7KPV/Rmnu5tYWR1XX6WFpYL2giBW/igUFCxEuMJeZMXg3Bt4kcmwiftm3kuG5R58mc0G3ptPZnfmzZtUlFIjZbBKWUC+CPqOQA3QLSjDtoH3+U2PiIBqoE2Vb5v4PWtMCYh6HwgTph4yiO5coopZwgnDCVElQJgw1ZBAIgcIEyYKBSRVfpaGAJIoHkuGCZIqXkuHAdIEvTODvKPfgYG0QG9Kxt7QvziIDvKqZO2VCuMCkRE7dQPawZZiGQWGOjtRIf6AZkCT2KZEH1nR2YwCQX2crkDfcpLJY4fHLPEFifBXbDs854c9fG45TBRt7EfkAqJzoNjjhT0CVXL87nn4jHvlZv2y2Nhz5jnH98L0Owo68fQb52XNvql4P3sArVi+F0HXTOlMvR9IjWEkOvYM+mH5XwU9MfmPzZ2mPexcEB3btkB+Mqc1Mfa7C6QhsELvg8aMGL8FYuh+d1VRNgRqG1OgSbyugeYFYmzY5aAFgSAa4iteVw0oTluwQR6FQKrGiEwIxHi0K41roB3mIC+gM9Bf0AxoGTTOHGMdtMtVQBiWfRQuJNcRaeu5jnCv7GbCd++YeDqv7NwwB6DvoGlsDyQgimS/PjA6p1qyfC555loJNfvl2I+c5vxydbzv8ng670fs+hV1h3gJmrX8zOF96g7x03oXtRhH2W+/4Myi349xbLeJo5sVLdoNoopyAfqFbRBVlFLVtcwCQlsIoo3+B1b7bQnVflvqfzU+DBivwx6uE6umJ0RTBXSGmHqMRDBniJ3cLHWACOpU18ylUgJEkOfspfrnQ5GdZtfOLnSQESzM6eLZHaYcd/h5TCJeaf6v9U+AAQAvyHBRYhRQ4wAAAABJRU5ErkJggg==)!important;background-color:#f1432a}#toasty .toast.toasty-theme-default.toasty-type-success{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MkQyQUI3Q0UzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MkQyQUI3Q0YzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRDJBQjdDQzMyMkIxMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoyRDJBQjdDRDMyMkIxMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvQVuMwAAAORSURBVHja7JpNaBNBFMebNsZacih+FFFsrB4qVIw9lByEWNtCC/VSRS14UjSx1V4UvbUKFaFUD178OniPB28KgsYeFBVqRFDQgx9paE1bNVKKta3N+h94hTWZ3ezOTiYh9MEPwmZ39v2TmTdv3oxL07SyUjDXipBsW0NsA37gAx7gpe9nwQKIg7fgM5gjCi6EOboZNIEDoFPneC5jwh6A++Al+AYWVQtxg3pwBPSBaoc/6Di4Q6I+gL8qhGwBx0EvqJHc1afADXAXJGw9yYTYoBVEtfxblN5l2Tc7InrApKbO2LtCMoV4wGUwr6m3OTAAVjsV4iIRS1rhLA36nQo5Rb9KoW0WnDTz1SxqtYB7YF2RTN4/wSEQtRO1asGIVnw2Qr5l+VzO0VYBjoFgEaZUQZqEXVYmxAbwGGxU5Nw8eEqT6y7KGswsCdrAe7Ou5QaDirvLVYqO5fR5ysIzl8hXw6i1FUwrFDEK6jJ86AAzOZ6LA5+REPardCsU8QO0cwZuBfhq4flu8jlrsLO1RJfCgcsSw0ec6+doLZPLusjnrDHiBSlF/8YbgzDqB78stpEin7O6VpMiEWwwt3BEsMH7zGZbAV7X8ivoTmype9Ngdr4A9thsr275g16IT4GQGLjGuc4EnBZor54nxKMgVzoLZjjr/kGwSaDNKp4Qr6CDabCU4x5WVLgOXnC+uwKaBd/t5QkRsRQ4Q10jZnLfKBjmXN8PjvJyJ9umixpDAhNaT0bojHHuY+G0kROlaiRk2EO88Gsnx1oEfRzndoPXGfeGDULtsIRQfpEn5ISNBtj6/aDBWqaRcihmD/VphI52i8mhlTTF8YSYAEETMUxEg0GXei5pcg3whIikKOOg2UBMZR67lGmKUgUiAg2OgX0W608dVEiQYRHyWWoaH7cgZj34KDFn+y+N5y2svgs2nDBIBpfXGLckijBdWMlY6hqNGdalFiQKybnUZewESQcvmQB7de1Vgy8SRSTJx5yVRjcpTjt4GetmvaBTcn2M+XSeNzeVTIHOrGTaSiXTtUVUMj0Mnohs9IQkxn2nReyQ0/2RfofjpSi2Fcpok2WgQNsL0jZ69IQlZax2qi3hfOwhMtoURbMRepdl30S2p2t129MbJEemaVoSR8CYqgMDO+i0Q1iwAqK3CXCbDgy8K8QRjlUkIuDwCMcrEqP8CIdRjakSbLd4qOYT+AN+rxxzKkUh/wQYAIxbfwhIUivlAAAAAElFTkSuQmCC)!important;background-color:#06bc5a}#toasty .toast.toasty-theme-default.toasty-type-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MkQyQUI3RDIzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MkQyQUI3RDMzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRDJBQjdEMDMyMkIxMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoyRDJBQjdEMTMyMkIxMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PhxHKhwAAAN7SURBVHja7JrfS1RBFMf37q7mj6SySMWMMqnQLEsKMg2yH4SC2g+wrKcIg7SX3ouiP6BfEFRPEdRLFFlBIEVQvfcgFrJBLxFBEWG9mHb7Hjgrl+vMzr13Zuyu+IUP7M7Pc+7MnJm5u47ruom5oGRijmjOOJK22PYScBrs5u8vwA3ww0ZnjqU1sgg8Ba2+9NegE4znw9QqBg8FTpDawF0uE3tHBkFLjvz9XCbWU2sZT5/1inIfeHS+xXVELoK6AOXquGwsp9ZGcDhgJExz2U1xc6QEXADLQ9ShsudMbQGmHDkE9kSoR3tMd1wcoSd7CpRFqLsYnA05ktYcOQGac+T/ZmTawm381/BL0ecR2CDI+wyug4/8fQ04A6oFZUfAAZCJbAk5osFVMOmK1SMo3yMpS21c07FFx4m94LvEsFcgLahDaS8ldb6AnVHtibpGaGGfBOWS/PuyqQyeSPIqNYJGZEeO8ClWJnIwJdkIq3LU6+a2Z8WRGtAHSnOUWQcKBOkphSOl3HbNbDjSpzjdkupBoSCd0tYq6rZwH1aj1jaQcdWaAJWC+hWcp1KG+7Ky2OlpHgW1AcrStFohuTkWBKhfy30V2phaHWCAI08QrfK1T58bg27UoB+0m3akhsNtQQjH23xPlCJWU8gT9WDQhZ8M+HT2KcKtSKt97ac4LYw6ue+kCUfqeUqFVa3vrpHmy1dYDXA413KEptIxsDmCAQ2+TTElCQAqUd8HlRcwRVhrA+NudFV72irXaOcX2xIp/JbxsC7UOOZnFzyN7EqNdkrZlrKwr0xpGuwCvZr3nQ7PvtOo2RbZcg88A1NBL1YV4HnIcDkbescv+L4GGRGHb2smnHgDPnk2yFbN9prYttszRkWwcBr4kqOry6DK0y59vmmgXbKtTnVDdAx1NgKKBQ9pAefp6ooqam0Hxw1MqTvgjyB9ivN01e+/SngdoVf9l/iMo6u05HDpGHqzmLW12O+Iw9fMdkPRpVdy1U0ZCOlZtbPNjnexl4BR16xu8ZrI9rGU00xqlG2f3ke6wGMLcf8teM9PjQ6MWy30QaMylJ2vzZY2sB2MTZHtQ9k1UpTIXxV5F/tYHjsy5nXkARjOQyeG2fZpR35yWDyfsPAbuAWNs629bPuM02+a7w+F/DMAnYL/xsT4JJ966WeKCWZSdYzPO83/O2jeEUv6J8AAuUNANq3q2uMAAAAASUVORK5CYII=)!important;background-color:#f97a1f}#toasty .toast.toasty-theme-material{font-family:Roboto,sans-serif!important;font-size:12px;background-color:#323232}#toasty .toast.toasty-theme-material .close-button:after{content:'x';color:#fff;font-size:17px;font-weight:100}#toasty .toast.toasty-theme-material .toast-text{color:#fff}#toasty .toast.toasty-theme-material .toast-text .toast-title{text-transform:uppercase;font-size:13px}#toasty .toast.toasty-theme-material .toast-text a,#toasty .toast.toasty-theme-material .toast-text label{color:#fff}#toasty .toast.toasty-theme-material .toast-text a:hover,#toasty .toast.toasty-theme-material .toast-text label:hover{color:#f2f2f2}#toasty .toast.toasty-theme-material.toasty-type-default{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjdGQ0YwNTUzMjJFMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjdGQ0YwNTYzMjJFMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGN0ZDRjA1MzMyMkUxMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGN0ZDRjA1NDMyMkUxMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvdUzSUAAADVSURBVHja7NixDcIwFIThGFGDoCYzQM100FAyCEzAGHQMQA0iDGDOElWUYKfiPeW3dE2K6L7YjqOEGGPleUwq5wOAVUCtnJRGiX9O8+1SdxUNHZt4pVyVpbGH/VS2yi03A0eD5dNYKIeSGXgpM6NLPi2neQ5g/WAIvEYBAAAAAAAAAAAAAAAAAAAAAABGB2i8Ay7tC57+zD2UtXL3NgNv5axs2uXTmA682V7Zed3E5soPAZgsXwowW74EYLp8DmC+/C+Ai/J9ADfl+05iPuYAjAnwEWAAlI5MOXu7aeEAAAAASUVORK5CYII=)!important}#toasty .toast.toasty-theme-material.toasty-type-info{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QTY3QkFBRDYzMjMwMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QTY3QkFBRDczMjMwMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBNjdCQUFENDMyMzAxMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBNjdCQUFENTMyMzAxMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pqvvb2MAAAJWSURBVHja7JlBSwJBFMfXKA+FJ70EQlCReM46hnSOQAhKugYdsr5BRPQNsgIhb4YFncRzRMeyD2BUEAhe8iR1sND+Q28hlnV31pndnSUf/JmL7Px/82adN29DvV5PC3KMaAGPIYDfMSr6gNm7V30hFqBlaB6ag+LQBP3sA2pAT9AjdAM9QN3npWmh+UMiLzHMM5M5aJMMOwkGdAGdAKLhKQCMxzAcQltQWDCJHegcOgDIu+sAMJ/FcAzFJG9nZn4PEGVXAGB8DEMe2nb5vSywbQmQb2kAMD+O4Qpa8ejPpQqtA+JTGIBW/hpa9fgfsgKtAeJL9BzI+2BeoznzQhnA6m9gKGv+RhZZuHQMAPNRDHUo6jNAC0oAouV0Cx0Jmg8ZNGhEyQt/BuiEfRE8pIymRep2dtjNmJ3Y/TKwI+GElRlh8mSfAaw+g3oboLZxMwN67TSFLHTtMrAowbxu+K9EI07ebLdQWuHyP80DkFIYIMUDkFAYIMFzI5uUNJnsl9jUm1kGIgpnIPIvuhJthf22eQCaCgM0eQDqCgPUeQBqCgPUeABuFQa45QG4p8JJtWiQN2sAqvZKCgKUjJWo1TlwSpcIVaJDnviulHTzKSoEUOzXP7U6iffpQu33faBFXjRHANQFyCmw+rl+HQnbWoj6MQUfzResekK8xdyu9tvm8zoqNLcmBEC9SdZSr3pons2VteuLcpfT1CXOeLSd2BwZns60aVvFLlT7wOH4QkMTJKEzSYddh56VdGp+oAwYshHMj3wGCD2TwfvMquqdeAgwBHAQPwIMAIRS2XfVn5FFAAAAAElFTkSuQmCC)!important}#toasty .toast.toasty-theme-material.toasty-type-wait{background-image:url(data:image/gif;base64,R0lGODlhJgAmAIQAADQyNDxerDRGZDxuzDRShDxy5DxmxDROfDQ+TDx67DRKdDQ2RDxirDRKbDxy3DRWjDx25DxqxDQ2PDRGbDxu1DRSjDROhDQ+VDx69DxitDx27DxqzDIyMgAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQJBwAcACwAAAAAJgAmAAAF/iAnjqQIXESwFZpWbIx1AWVtkxKxaVjfJ77ehiC5GTkAiyPIbGIKBNqRhIhgeE5sD8vbXKaiSSHIvZKdhcZUoXX62k3NwTgpb81wnv5+VdcQY0BuZoSDGBBfJABWhYaOPhtFIwSPlU4VIxIUlpw+BQsiFp2jGA9IG6SdFCeCjVmDcHcolrGcDwF8r6RcGZupuYYUY7DEb8ZMLYR2cb+1v8w9w82VL8+cFLjHzM66PRmibs7L2ncVF9zWbzOowNrobqsc4M/oFiKa6YOfIwfk3OJB7I0AYCBfkw1SRgB6VKtWgUQlBIwrFkfDBCNsUsFRMEWMtQIXwSAomMoLmIEWIVggO7OlgIWEJ+9Z2GFIw4YKoGLaOGEhw4oWL75dyHkkBAAh+QQJBwBEACwAAAAAJgAmAIY0MjScQjwsYrxkOjRcWpw8bsw0RmTMRkREXqx8VoRcSmy0Rjx8Ojw0UoQ8ZsQ8cuRMNjR0OjQ0TnzUSkQ0PkycUmw8Xqy0Tlw8euxsWow0SnTETlQ8MjQ0YrRsOjQ8ctw0SmxMXqS8RjyEPjxEVpQ8asQ8duR0PkSsUmTMTkw0NjykQjxkWpQ8btQ0RmyEVnxcTnS0RkR8Pjw0UoxUNjR0Ojw0ToTcSkQ0PlSkUmw8YrS8Tlw8evR0Wow0YrxsPkRMXqw8asw8duzMTlQyMjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/oBEgoOEggAQDAEiBxMTByIrMhAAhZWWhBwyIjecnZ6cIgwcl6REAAwHn6qfBzKUpYQQC6u0nyIQsIIDqasTOzsiGym0EwOwHhOeEzkJIR0dAtECzyEJFcmeEaQD2DcoLNLh4tIdLDmexpUQvCgh4+/vIec3E7iEALMp4PD84wSpIl4JknFjB4J+CMVZuHBDxiAOBy5AS0gxWgcUB0YRYbBjYsWKHXaMMLXA3ceTIWJwgPDipEsBCWj8sPDypIUfCmq6VEBC50kSNH1WtOBRaEIhQnggXcr0AVKnUKMKcdp0alMeWLNq3cq1a1KuD4J0HUu2LNYWHbR+NcuWqw8bjVjXtp0bdwYFuWbxthWCA4DYsnqVcg3cghLcrHITexWMOC4PG4JUtKBLmccDFYMkMJ4bmCvkQQB80O3MVQBmQjhMsA2MNylfSy5ccyYrxAUpDaQBq/1MysWDylsf2M5FwQHtsgJw5AJtw6nurA9snF4+SIWNIGtlIxYwYzr1QgBw2BAQ5DfSaDNweL8UCAAh+QQJBwBGACwAAAAAJgAmAIY0MjScQjwsYrxUWpRkOjS8Rjw8bsw0RmSkQjxEXqzUSkQ8ZsR8VoTMRjw8cuQ0TnxMNjSMSmR8Ojw8XqxsWoyMVnQ0Pky8TlQ8euw0XrR0OjQ0SnSkUmw0UoyUUnQ8MjRkWpQ8ctw0Smw8asTMTlQ8duQ0UoSEPjx0WozETlQ0YrQ0NjxcWpxsOjTERjw8btQ0Rmy0RjxMWpzcSkSEVnzMRkQ0ToRUNjSMTmR8Pjw8YrRsWpSMVnw0PlS8Tlw8evR0Ojy0TlyUVnQ8asw8duw0YrwyMjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/oBGgoOEggAQEgEFNQoKDQUIORAAhZWWhB85BTOcnZ6cBRIfl6RGABINn6qfDTmUpYQQMau0nwUQsIIENbW9nQoEsC0KvsWcGqQExMbGwZUQvMzGCriEALPSzAWjgzm+KUEcHuMcHEEXy7Qngx+pnykeFAkqAvX29xkJIB4pqgrcEjzVoJHgnsGDBhPQIOFp3TVONVDQQ0iRYgYK0Vx8gMDJg46KIAVkQKhCCKcbASmEXFkRhIITAVCwnImQAoIINHMajDBAp08BMkbqFCpyJhEiP44eTaq0qdOnTh00/eHgh9WrWLMizcq1a9IhXsOKDfsiA9etY9NaRariAVa0h1rVhu3QA67ctWqJ9AAANi/eu0Mo2Xjb1W7cq2iRdhC04sXdx1RXDHJr2DBitTasFYGcdKwAyYR6lOD8N6uDHpYOWL68WisMUhtai4VLZAMsGFVJW3XwOpeFzWOR2hWAOhdjGyEqe3VgA7TxQSs6CJj9Q0AH588LrehhQ8ACqVRfCLDRA/ulQAAh+QQJBwBBACwAAAAAJgAmAIY0MjScQjwsYrxkOjRUXqS8Rjw8bsw0RmTUSkS0RjxEXqx8VoQ8cuQ0TnxMNjQ8ZsR8OjzMRjw0PkyUVnRsWpQ8euw8Xqx0OjQ0SnS0SlQ0UozMTkw8MjRkWpS8Tlw8ctw0SmzcSkQ8duQ0UoQ8asSEPjykUmy0TlQ0NjykQjw0YrRsOjRcWpzERjw8btQ0RmzUSkxMXqSEVoQ0ToRUNjR8PjzMRkQ0PlScUmx0Wow8evQ8YrR0OjzMTlQ8duw8asy0TlwyMjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/oBBgoOEggAOEAEFNggIEQUpNQ4AhZWWhBw1BSGcnZ6cBRAcl6RBABARn6qfETWUpYQOCau0nwUOsIIDNrW9nQgDsCsIvsWcF6QDxMbGwZUOvMzGCLiEALPSzAWjgzXZ2SWDHKnfzAjcEOXgptjqxi0cDu7ZNOm0GyY4EwsLFBQdHfzxm4DDxIZlqkqk8ARERgcFAiJKnEiRogIWMoB4SrDJRAcVFUOKDKmig4kQLTIQGMmy5UQWGSC6nMlSgQ8fFW7qwHmzp8+bDHwEDfqzqA8dDHQoXcq0qdOnS49G/QG1qtWqLlQwlXq161YdKhoo5bqz6VGpZM0+1XAjrde3eWNvAKBq1S1cHT8ozfh61+5YHRoEoXBx9y4DFIPEuk3LlWxjpjOsPbjq16oAxIQkJC1slcENSy8qV7Xr4wUpDKLf+sAA68BmzkoZmM4lYfJfuAI+5zI044NXqQxmYN49CMWMH47NuhBO/BKAGzME/CDK4IeAGXJzBQIAIfkECQcALwAsAAAAACYAJgCFNDI0nEI8PF6sZDo0NEZkPG7MxEY8NE58PHLk1EZETDY0fDo8ND5MPGbEPHrstEY8dDo0NEp0zEY8NFKM1E5MPDI0NEpsPHLcNFKEPHbk3EpEhD48PGrEzEpMNDY8pEI8PGK0bDo0NEZsPG7UNE6E1EpEVDY0fD48ND5UPHr0vEY8dDo8zEZEPHbsPGrMMjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABv7Al3BIFAIUi4CKVUpIVJ+TAlCsWomVk0rD7Xq5qkXlSn4BFpKv+is5UctExWNN/6oUcOGAVe93SwNwIQl+hVwQZAOEhoaBVQp8jIYJeEQAc5KMKmNDJ5mZG0MVaZ+MCZwLpaBmmKqGBhUKrpkmqbOMGx+3jA9bu4USpL99CSUlw34tKcvLDs0pLcrR09TV1tIpGczbytve3+DeLS7h5eblIwLc5+zfyiAk4N3Q9PPt2xMo9vf80CgA5JbtMzcwnAsq8cLNK1iv3AQhHkb0YwgOgYchB/qdW0jCUoON7s4dLMIAgcZzCFBYITCQokB5IshEcFnOXouOZQiYPMkMQTHMPAw+8nShMo8REhewvRS3DAGJN0aHeJgQsOYIEhejWgGAggQIFwiiIXABD0XWMkEAACH5BAkHAEAALAAAAAAmACYAhjQyNJxCPDxerGQ6NMRGPGRyzDxuzDRGZMxeZEx25JRmlDxy5NxKRDROfEw2NHw6PKxmhDx67DQ+TDxmxNRGRLRGPHQ6NHRuvDRKdNxaVKRmjDRSjDwyNMxGPDxy3DRKbJxmlDx25ORSRDRShIQ+PER67DxqxDQ2PKRCPDxitGw6NGxyxDxu1DRGbNReXFR23JRqnNxORDROhFQ2NHw+PLxidDx69DQ+VNRKRLxGPHQ6PHxutORaTMxGRDx27DxqzDIyMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+gECCg4SCAA4PATk9OBQdOSg0DgCFlZaEHDQ5DJydnpw5DxyXpEAADx2fqp8dNJSlhA4Vq7SfOQ6wggM9tb2dOAOwKhS+xZwWpAPExsbBlQ68zMYUuIQAs54i0rU5o4M02du02gwkgxyp4swU3g/q2+bX79IEHA7z2zPu+MwkKPzMKmwCWKxDOoK9KMQQwbChNoYMIEp8SDFixYkKeIjQyJAjx40OQ4oMqVGDhx0IeKhcybKly5csM+wo8cNGiRUgXMDcudMFhAslbLAQYKNo0RcXYECokSEDT5UZXNSAAGLHi6BGU8gwasMHV5slXrwosGLFhQtlC4hNUALr16KJG254fUuXrtu6RW8AqIm3r1+jPyhtNTr3r2G4gk6wOFz48IITgxp07dv4sI0R1iZYLlqZbuBCEhZs/rvghqUDnQt7rdy5awtSGFqP9tEA1gHRo7n6eJ1LgubcNn5IyDUIQAMPqwnrJrxAxivig05s4Ktc948NkKFbAnBDRoofPsL7+JEi7nNSgQAAIfkECQcAQwAsAAAAACYAJgCGNDI0nEI8PF6sxEY8ZDo0bHLEPG7MNEZkzF5cVHbcnGKEPHLk3EpENE58TDY0TGa8fDo8THbktGJ8PHrsND5MPGbE1EZE3FpUtEY8dDo0NEp0rGaENFKMPDI0zEY8jGqkPHLcNEpspGKEPHbk5FJENFKEhD48RHrsPGrE5FpMNDY8pEI8PGK0bDo0dG68PG7UNEZs1F5cZHLM3E5ENE6EVDY0VGq8fD48vGJ0PHr0ND5U1EpE3F5UvEY8dDo8zEZEpGaMPHbsPGrMMjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB/6AQ4KDhIIADhABPT87Fh49KzcOAIWVloQdNz0MnJ2enD0QHZekQwAQHp+qnx43lKWEDhirtJ89DrCCBD+1vZ07BLAtFr7FnBmkBMTGxsGVDrzMxha4hACzniTStT2jgzfZ27TaDCaDHanizBbeEOrb5tfv0gMdDvPbNe74zCYr/MwwbAJYzEM6gr0szCDBsKE2hgwgSnxIMWLFiQhSkNDIkCPHjQ5Digyp8YKCFChTqlzJsqVLEQ9iuJxJ06UNAQUu1NxJ0wULGjlkxNjIs2gKHgVycKAQZEKEDUZ5SkiQI4cOAEKqBt2gMypLCUmrCqEEVGuQBB8keE2B4wNVrY9KBal4AVfriQIfNuCIcUGnTh4xcEj44OJE3aoLVAxqkCPI4aoTHJ+IMPnEiSCGH2stYa2C5s+OP4t9NYjCAtGoH4/QYelAaM2OX4sOAoOUBtmpNU/QAOvA6dyaR9TORcEz8LpCWOcy1ABEbLNwXwdZQIP0crklskavG0QIB8XXLQHQQYOFkCDou7PgcDVXIAAh+QQJBwBIACwAAAAAJgAmAIY0MjScQjw8YrTERjxkOjRkWoQ0RmQ8ctzEWmScWmw0TnzcSkRkVoRcctS0YnxMNjR8OjxkcsQ8euw8asTcWlScZpQ8Tnx8brQ0PkzURkS0Rjx0OjQ0SnQ8duzUXlw0Uow8btSsZoQ8MjTMRjw0Smw8duTMXmQ0UoTkUkSEPjxsbsREeuw8bsykZoyEaqw0NjykQjw8ZsRsOjQ0Rmw8cuTEXmykWmw0ToTcTkS8YnRUNjR8Pjw8evQ8aszkWkycapQ8UoQ0PlTUSkS8Rjx0OjzMRkRscsSEbqwyMjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/oBIgoOEggAPEAFDRUIZI0MwOw8AhZWWhCI7QwucnZ6cQxAil6RIABAjn6qfIzuUpYQPGqu0n0MPsIIERbW9nUIEsDIZvsWcG6QExMbGwZUPvMzGGbiEALOeKNK1Q6ODO9nbtNoLKYMiqeLMGd4Q6tvm1+/SAyIP89s67vjMKTD8zDRsAlhsRDqCvTLgQMGwoTaGCyBKfEgxYsWJFHyg0MiQI8eNDkOKDKnRBwIfKFOqXMmypUsTCVzKnCnTBoOMNHPSLGAhh86fLU0AwRABqNGUKoIA6FHhKNAWICjdkODAac4cKz4IenFgRYiNVltiPfBikIIOEn7gdAk2Z4sVlDxuWIvBg4eRGi3b0vRgpG6PV4Mw0Kgr4YgJpx5cwOVBI4glAx3qdlihooUHmWAphFCxmEeHGaQ4RK7LQ8KKBhcqhMiRo0aOED+ONOgsWQEsA4NJl94tQbdv0jRI5EKCga7n45JJ9/7dA8NwQzcO/PY92jONG4CfI3lxowd16j0+lNVeCUCQGwJ6dFjfoYeAD0pzBQIAIfkECQcAFwAsAAAAACYAJgCENDI0nEI8xEY8ZDo01EY8fDo8tEI8TDY0dDo03EpEzEY81EpEhD48vEY8PDI0pEI8bDo01EZEfD48tEY8VDY0dDo8zEZEMjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABfDgJY6kCBxF0FgLYTWPdABlbZOO1CR87/ONguNGvAAKip/yp5DQiqTDZEn9NQ5Q0cBS7fYWAygk4i3zEMQB2WwO1w5ctpmAJQGmcnZjOJLk8wwjDkl/bAR8BYWARniKZgIOB455FImTbAwPl2wGO5tlCoSfXQSjZgumXqKOpWWeqUsKmoWtPLVUBpawSgWSu0oUAK9ltz6txQkKQ7p/yEsFIoNztnKHIwi/PIEjwr8KTyMHzpMEFDYD40ul6wm3BGg3EMTE0EXol+9ZFwcGjgrm+i44KJBOnZCAOJC4M5asF0IbACgwMCDgmIJcFPgUCQEAIfkECQcAVQAsAAAAACYAJgCGNDI0nIY8nEI8lGo81LJEXFY0ZDo07MZExEY81G5MREI0zHZE7IZM/NJM1F5MTDY09LJMfG48/MZMzKpEXFI0PDo0tGJEdDo01EZE5GZMtEY89M5E7HZM9KZM5G5MPDI0lH483L5EdGY85FpM/L5MjHY8fDo87H5MZF409MpMzEY8VE409JJMhHY8/M5M3EpEvEI89K5M7G5MrIJE5GJMNDY0nIo8pEI83LpEZFo0bDo07MpMTEY07IpM/NZMVDY0/LpMhHI8/MpM3K5ERD40dDo81EpE5GpM9M5M7HpM9KpMPDY0lII85MJE5F5M/MJMfD487IJMzEZEvEY87HJMMjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB/6AVYKDhIIAD1ACU1IvCQkLM0ErNYWVloQfUDAvnJ0jnyNUMQQtFZenVQAmKp2tL6CgUS5NJZSohA8arq6woDISPgQrt4IGjLutvaBHwCkitzrIu8qgHC4+DRGnBkbSvNSfLD7Yz5UPx96e4J8k4ykUhQC66cnrI0njPjimgyb03/aA5GMy6AOCf/Xs9cDmI4UCQVAQJlxH49q4AKnmSXxl7xOEcQ2a1HiwUV1HFg1A5vBXkmNHDvl8BBDQ0qU9GinHTZhSc4RNcELyHWDVsqNPJ0/yNcDQ0+iIdvm6FXUKdRzRqaB+sgPpgyfWjkHHHaD5dZ2TnD4msCzp1ENMG4cky4JjEDMHgINylXUAeWBJlbUSnSa9KOgD041GYWLbwKMf2457CQ8CsAnxugwW9xV6cPgf5HEb4FWKhhDcKyops526UBqWSxpJG5S4ZaCzN3AxfGzQRuxHZWnglOgTTazKBxO2J36iAeEACL/FMa1CBivKEBBEol/68MMEDBVMQVkYQOEBsUAAIfkECQcAUAAsAAAAACYAJgCGNDI0nIY8nEI81LJEXFY0lH48ZDo07MZEzIZExEY8REI03J5E3GZM/NJM5FpMTDY0/LZMfG48XFI0/MZM5HpMPDo0dDo01EZE9JpMtEY89M5E7IZMPDI0tJpE3L5EdGY8/L5M7IJMfDo89KpM9JJMZF409MpMzEY8VE405GZM5GJMjHY87HpM3EpE9KJMvEI8NDY0nIo8pEI83LpEZFo0lII8bDo07MpMTEY0zKpE/NZM5F5MVDY0/LpMhHY8/M5MRD40dDo81EpE9J5M9M5M7I5MPDY0vKJE5MJE/MJMfD489JZMzEZE5GpM7H5MvEY8MjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB/6AUIKDhIIAD0oCT0wtOwwIHT4oMIWVloQcSi8tnJ07Dg4hPw0DKxWXqFAAIiedro2gDk4NOjoHPpSphA8Zr6+xoCS1tQMouoIGjL6un8AgOrQ6Jh+6Nsu+zbEsw7UNEagGQte/wKA93NDUlQ/K453loEXo0hKFAL3urvAOKtHcM6cGichHDh6EeTpqDOKQgCCzfcL80TKhQJASh/r2bUMYQBU+jC328fM3rAESGA9AvhOZpBu0bjQGqgwp8iBHATNp7huBUEeOJzlFOhjS80CrmUIx0IrG9EJQkUt66hCHVKSwnkdVCo06jxbQqvuIIjyAEyw8nghzyNRas2eMlItmy03oSQNAQ7bw+nU9YATKWowiN87rCIWDU5BQ0dHSgEMg3nI2X9YibGgT4LwkawEs9OAwQYjzNNSrZM3hvmfcvKGyYLpciJdLV+gy4PkavJbDNHw7xsOybWAYXM4YfaywiNoZQYWIpqFA3+KYWPmKtaFBgxkFgEC/xIGHiBcnnKpgsWBBDQLPUwUCACH5BAkHAFIALAAAAAAmACYAhjQyNJyGPJxCPNSyRFxWNOzGRJR+PGQ6NOyGTMRGPPSyTERCNPzSTMyqRORaTEw2NPzGTHxuPORmTFxSNNRGRDw6NNy+RHQ6NPTCTPSeTLRGPPTOROx6TPSqTDwyNLSaRHRmPPSWTNxORHw6PNy6RGReNPTKTMxGPPy2TFRONPzOTIx2POxuTNxKROS+RPy+TPSmTLxCPDQ2NJyKPKRCPNS2RGRaNOzKTJSCPGw6NOSOTPS2TExGNPzWTOReTFQ2NPzKTIR2PNRKREQ+NHQ6PPSiTPTOTOx+TPSuTDw2NMSiRPSaTHw+PMxGROxyTOTCRPzCTLxGPDIyMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+gFKCg4SCAA9MAlFNLTpPNR9BKTKFlZaEHkwxLZycIg4ZPaIMAysVl6hSACMnna6fEiqiswVBlKmEDxquvJ8ORbPBAym4ggeMvLwODhzBwSYguDnJyb4+sqPZDBGoB0LUycsOKM7BDNGVD8jgruJL5c8ThQC77K/iCAzwsySngyP2wi1zkm0fjkEeEgRUtizWvlEmFghispChAx8QzMELoKpexRa+lkEpWI6BCxkPPrYTR26fPlE2AKrkJM4BklkvSwYQMJOmOBgle+Ts0SBKzxY1Qz2k1apnUpLwGFA4WvOds5w5vzl1tzRY05lVu44yunWZ0q4FeJZ1AFRsA5mVYMV1ENtjRsq1KIbuswFAYdxlLR8yKJBECtyP4jCK5SjFw1SV4hwKnayv8gYe//6y0FuOsaFNiJc1W+qicK7HC8WFuBpsg7xK0yrK5TyK26ULspdlpIxzBa4DqMEtY7Fvg21cP0ALdxACqygSr4s1HhF85cjWBkxLR8gqHIJRJg0M2X7Jw48RMU5MZfHChRIcE26lCgQAIfkECQcAOQAsAAAAACYAJgCFNDI0nIY8nEI8XFY01LJEZDo0jHY87MZEREI0xEY8TDY03L5EXFI0/NJMPDo0fG48dDo01EZEtJpEtEY89M5EPDI0dGY87MJEfDo8ZF403LpElH489MpMVE40zEY85L5E3EpEzKpEvEI8NDY0nIo8pEI8ZFo01LZEbDo07MpMTEY0VDY0/NZMRD40hHY8dDo81EpExKJE9M5MPDY0fD48lII8zEZE5MJEvEY8MjIyAAAAAAAAAAAAAAAAAAAAAAAABv7AnHBIFAIUNAHOBkpdThJXZ1SsWokVmgjE7TZYYFaDYHBczzkAxtNtg77h8MVFRRMVE7cbHg8TOnZCBUx6bRR9fRwWdiiFenyIYA0PZwUwjm6HkXENi1UKhJhem4kMRQB5ooZ9X5BgGmZDGKp7pIg1QxUJtKtivpFfHAhCNLxtroiQAWmpxiCarL9hDR8jCs5d0K22LCaz2M/c02ABAuDhrnyQDSE459DiYAds4PDxDRHvtuphl/Xxfehhs4eMlbt/AOWZQ5gwxLeBCcGQuMYQoAkAuyBGA3bBzENj9riREFIhnzNtnHy1oqBC1sCCkZYNAbAFJMAPM4ooMEkrpE00MBRMVWnEiwK/ZJSuQCi6jpUBOwV4OvIJh0JSOytqToXjSoPQQDkqYJDaq8+BDTnBYlmjBx61DS3UXqmwAoMID/koUPgQowaDtGiCAAAh+QQJBwBTACwAAAAAJgAmAIY0MjScijycQjzUtkRcVjSUfjz0zkRkOjTERjzsilTswkTUVkREQjTMqkTURkRMNjTkZkz82mx8bjxcUjTsxkQ8OjT8zmR0OjT0olzUUkS0RjzcvkTsglQ8MjR0Zjz81kzsmlT8ymR8Ojzssly0mkRkXjSchjz80kzMRjz0umTkYkxUTjTcSkTkckyMdjz0ykz0qlzcTkS8QjzkvkQ0NjSkQjzcukRkWjSUgjz0zkxsOjTsklTkWkRMRjTUskTUSkRUNjT83myEdjzsykxEPjT81mx0Ojz0plzshlQ8NjT0nlx8PjzEokTMRkT0vmTkdkzcUkS8RjzkwkQyMjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/oBTgoOEggAPSwJRGSM5UgMkQis0hZWWhB1LMiycLEdBH6GhJz4uFZeoUwAiKJ2cKhGgorMKQpSphA8arp0gQUEns8I+K7iCB028nSG/osHCHy8euDrKnbDN0MInEqgHP9acHL+y2rMn05UPyeEsSuTm0C8ThQC77Swp8M+jH/yiNk4NEoGPRYwT8OJBwzGoA4KCPCyQexbs37loDAQtKchCBbly8f6ZUHUPX4uP5ipum0HjAUcW4xKqtAjtBkGOSD7STBnKhICXCVBq4/fvRIMoL98lVAiNQiuOSmIFieCv6s5tDpJKBTnUmShwULcyNfe0YNSlY50h5bhDaFpRpBR+cgw68a2oBjcL5kT7NoBLjjGz2f1wA8DDgi2kUt0WUsGpvO08or06K4CgDlnxRazbdaaBHgM5IhScduQgAJvw6ftFWdiMJIUeZA6Hga/XWQboVarWLjBjaNxQXYgs1aJxF7gOzObFjOttA92MAUnN66zVqgB1G5vSQcTyjrHMGSgAezsmVq5gcD0xowAR85c6ABEhAwGUFB8MzGCCY8KtVIEAACH5BAkHAFYALAAAAAAmACYAhjQyNJyKPJxCPNS2RJR+PFxWNPTORGQ6NMxGPOyKVOzCRERCNMRmTPzabMReRPTOZMyqREw2NOyGVHxuPFxSNNxORPzCZORmTDw6NHQ6NOSmXORyTLRGPNy+RPzWTNxKRDwyNHRmPNRGROzKTPzWbHw6PPSqXLSaRJyGPGReNPzSTOySVFRONORaRPzSZIx2PPzKZORuTOx2TLxCPOS+RDQ2NKRCPNy6RJSCPGRaNPTOTGw6NMxGROyOVOzGRExGNPzebNSyRFQ2NIR2PNxSRPzGZORqTEQ+NHQ6POyuXOR2TPzWVDw2NNRKRPTKTHw+PPSuXMSiROReRPzSbLxGPOTCRDIyMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+gFaCg4SCABFPAg4aDzoKAydDLDWFlZaEIE8zHx8SJEANSx6jHipBLxiXqlYAJQicnQ1As6S1HgpDlKuEERywHzGys0C2tkEsu4IHPL8VFsO0xbVOIbs7v5wS0NHSpCoTqgdN2BVF28TdtSrVlRHM2DJL5+m2ThSFAL7YHybn6PSkbqQaVGLfhwou/BVTkQ7HIBCv9hmBJo8bQIZOFgjKUMFgD3//FkpDwYqKQX4g1Y1iKE0FjRoRTn54pjAdw5ukchQ0WEFFypbdVKAQcLKFsHkqAUIwaVAKyJAASfmIuO/C04ulspYScXLiOXlRpY0z6LVm2FpUsVkFUrEiVK24QT0w3ef059lRPogabOF2m82kHiDs3Ffh06yjb6MGiHnSnNm7OQBsMmii7zCgLRWkGoxthd2zAQSB4Crx88rTLBka+DHoyUnLFqOSHCTZIBRQbC+fpcGkUATSv2Q8tsVylIF7la6Rg4H0IrhLGfYlsEwcbqkXuw4AP8gcGkADz3cJmcwpmHdv6G8gT2YFBOePuosZINCbPSZXnHpUJE6DwBH7lwAgRAk2MJCECx4YQEMUOFCgyyqBAAAh+QQJBwBaACwAAAAAJgAmAIY0MjScijycQjzUtkRcVjT0zkSsakRkOjT0tlzESjzUnlRMRjTswkTkVkTMqkRMNjT82mz8wmTkfkx8OjxEPjR8bjz80mTURkT0olzswmQ8OjTcvkT81kyUfjw8MjS0Rjx0Zjx0OjTsjlTsykzkXkR8QjzcTkT0rly0mkRkXjT80kz0umTMRjxUTjTUskT8ymTshlSMdjzcSkTkvkSchjy8Qjz0nlw0NjTcukRkWjT0zkysdkxsOjT0tmTsxkTkWkTUplxUNjT83mz8xmTsglR8PjxEQjSEdjz81mzUSkT0plz0ymT81lSUgjw8NjR0OjzsklT0ykzkYkyERjz0slzEokTMRkRcUjTkwkS8RjwyMjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/oBagoOEggAPJQYKGRY6DAMoRy03hZWWhB5FWRIRQp5CTByiHCouMRqXqVoAEywNJxCfnqO0HAxHlKqEDx8yJJ2ynqG1oy4tuoIHVjINwMFCxLVRILo8MjImVJ+xnrHRtSoVqQdJ1yLPst/g1JUPy8xI6J/q0leFAL3XSt3y9LU4qAZNuCbjBxJu/cCpazLIQwKC5z4xQedvlAoOUYwIKkJQhjN50L5dJEZjVT5fCEHSGjmSmIoZNx50JAIynbqLOEflGEjQRs150VqCoyGgI4Kfs1ZWdJCl4xCkISvS8sGi40Sk/nKyvNAxHih5E6USK3etgQWoYmtVJXg22NWrvlEt0rvYlOALWXCDpR3loyjBo1hFKhXlgOc1n+hS7hUVQCZBmoH35gBQgyAJuHltKgzKAJVhGU9/Lg4gyAPXa1AiyyXFmnWBBYM4Xrv8LO/ekoMoE9wnjKLYGU4KPThNwmvCoLQK2Kt0gGBqlRXDpQpxzQRg33KFqoih6wDXH6Gf+SsgDtmDyiTuil/NGsdyZKuKsPihTW+0Ah2Cw8dUJAER9UlZNEMHFOx3CQBBlLADEEOEUsAMVTRxRS6qBAIAIfkECQcAMgAsAAAAACYAJgCFNDI0nIY81LJEZF407MZEVEo0tJ5EhHY8RD40/NJM3L5EdGo8zKpE9M5EdGY8XFY0xKJEPDo0rJJEbF489MpMlH48TEY07MJEPDY03LpE7MpEXFI0vJ5ETEI05L5ENDY0nIo81LZEZF48VE40jHY8REI0/NZMfG48zK5E9M5MZFo0xKZEtJpEbGI8lII87MpMvKJE5MJEMjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABv5AmXBIFAI6JwkqRmlcQqzD6FOsWokfx6ph6nYTXlNCQIpczzJAKwQOu92XAxVNRLDe4TZeMKILRxl4gngUDnQbBF56eYt4CSdnBTGDlI6GVQiBlV+bJhQbRQB3nWJuYI0mGWZDA22oipykLkMAKG+LuJyvpRQlQhOksJSLAUKjgqivp6YeHwgasK7Cy8EmKi3Vw7ddAS6lwbmmeQwc2d/BBAJ529TSnQkZydqDenqa1buUtubZCeX92QgEMKdsEANs/KqBQMAFXzYVMv6dmxaLVIILZhzkcyRuEAgj6ja5m7jsVAMLQybIk0eqGC0D4Eh5wFAkU0JhXRqAqoJo4km0jV8gXVHRINw6XecSkDjkoWJHQQ2E0ikBAVlSWBl2+kmzoOnIVw0q0NxKBMMJAQ1xivFQAQHZKwAKkDCQoWiCBh4guNgwB00QACH5BAkHAFEALAAAAAAmACYAhjQyNCSOVLSaRCxeRKTKZHySVOS+RCxKPNTSbGxiPCSmXPTSTCxCPIRyPCSeXLy2XExKNCSCVOzKTES2ZCxqROzabNSyRDQ6NCSWXFy6ZCxWPCSuZIx6POTSZHRqPDw+NPTKTNy6RDw2NCSSVCxmRMzSbOzGRCSqZPzSTIx2PCSiXFxSNDxqRPzebNy2RIzCZCxaRPTORDQ2NLyiRCxiRLTObHyaVOTCRCxSPNTWbHRmPCSmZCxGPIR2PCyaXLy6ZFRONEy2ZPTabNS2RDw6NCyWXGy+ZCxWRDSyZJR+POTWbHxuPEQ+NCSSXPzWTDxuTPTOTDIyMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+gFGCg4SCMkA9AkMmUDEmQwIpQDKFlZaERCkWKE6dnp8oQxwfl6VRMg03n52cq54mHJSmhBAWrre3FkCzggkmuMCrIDqzHjGswa6trEulCcfBy8koxJUQv8nZnyC7hDK20Z7SwUMihCmt4+PKwRyDRKqr6sj0uJwmTII92trrTkmnwPGzByyECCDLOM3zt9CJQicrOAycBiyJAIf80okj6HCGi4kgPRnAVq9kRlcxHoLaiJHlwBYwY8qcSbOmTZgdburcSbPDA55Adz4oELRozQIshBjl6WSmEBY8Xixd+uIAgCI5azadKrNDEUo0JlTgunPBBAqCLjjIMNbmVre0MN+2WJBBxYVBNE4EySpTbtEOQTaQIAQgwAYkNWL6jcvYZg0kG5rIGsRAxQkFGRCQRZBBwQYVPCzhOLHBc4YaSnc2FVKj84bSGkrB8Fz6sBECJYSkhqm7BAEjSE6QvkxjlgYVr4cLP4FkQpAgE4IvJ/1aBQxeURgYHr6BtILLwj1TF75hRGjsp2g4qP26vfvu1UkAQO+NAgbxyWlfLk+BAX1LABxAQgQjfPcZBhFQcMBkpQQCACH5BAkHAE8ALAAAAAAmACYAhjQyNCSOVLSaRCxeRNSyRGymXMzKZCxKPGxiPCSmXOzKTOzabCxCPIRyPCSCVExKNEy2ZJTGZOS+RCSeXDyyZPzSTDQ6NCxmRGy+ZCxWPCSuZPTSTPzWTIx6PLzObCSWXNy6RHRqPPTKTDw+NDw2NCSSVNy2RCSqZPTabIx2PCyCVFxSNKzObOzGRCxqRITCZCxaRPTORDQ2NLyiRCxiRNS2RGyqXCxSPHRmPCSmZCxGPIR2PFRONFS6ZJzKZOTCRCSiXDw6NCxWRCyuZPzebJR+PMTSbHxuPEQ+NCSSXPTebCyGVCxqTIzGZPTOTDIyMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+gE+Cg4SCMjw7AjUtTjEtNQIpPDKFlZaEQSkEFRydnp8VNR0jl6VPMg0/n52cq54tHZSmhA8Erre3BDyzgggtuMCrIjizITGswa6trEelCMfBy8kVxJUPv8nZnyK7hDK20Z7SwTUkhCmt4+PKwR2DQaqr6sj0uJwtSII72trrHEWnwPGzBwwECR7LOM3zt5CDQg4rOgycBqyIAIf80okj6HCGiYkgPUnAVq9kRlcxHoLaiJHlQBREYsqcSbPmTA43aXIwIBNnTps6gcbEaaCA0J5Hk8a0ocKDz581n9qUGtODAxoaPCgFSrWmhyEudJzQEAHm1rMcmmg4cQBACQ3KGiA45Xq2KoSxHyhdWAsXgo8FdWku8HGXrwtDE/iOjdvEyAKzUDksMNLk7uKxQCwMwrpY8VgKPTC8aBIhQpMXGHpQUAy3tYYLhAAE4OtaQ4K1Y090zg137O3bJ0rIGsQASG++t1snp127dgIdlm4Ad+46ue7rtqtnKAXDN3K4y5lnB297wKwbxpurH+8aCAxeTxjMTk4/e/i1t0tAh3+KRuL1yrUGxAXD8RcfDSWcsNyCcJXgAgMGWgLAARc4UEICCibwgQMutMVLIAAh+QQJBwBOACwAAAAAJgAmAIY0MjQkjlS0mkQsXkScxmTkvkRsvmQsSjwkplxsYjzU1mwsQjxMqlyEcjxMSjQkmlwkglTsykz00kzUskS8zmw8smQ0OjQsZkQsVjwkrmSMejzs2mwkllx0ajw8PjT0ykzcukQ8NjQkklSsymzsxkSMwmQkqmRUumSMdjxcUjQkolz80kzctkTM0mwsakQsWkT0zkQ0NjS8okQsYkScymTkwkR0vmQsUjwkpmR0Zjzc1mwsRjxMrmSEdjxUTjQknlwkhlTUtkTE0mw8OjQsVkQsrmSUfjz83mx8bjxEPjQkklz81kwsakz0zkwyMjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/oBOgoOEgjE+PQJBJE0wJEECKD4xhZWWhEMoEytLnZ6fK0EaHpelTjENNZ+dnKueJBqUpoQOE663txM+s4IJJLjAqx85sx0wrMGuraxIpQnHwcvJK8SVDr/J2Z8fu4QxttGe0sFBIYQorePjysEag0Oqq+rI9LicJEmCPdra60tGp8DxswcMRAgfyzjN87dwicIlKTQMnAbMiACH/NKJI+hQBouJID0VwFavZEZXMB6C2oiR5UAdR2LKnEmzps2bOhgouMmzp82cIorYaOGzqM0WNhA8gJDBRAahBBRsMGpzQwsCNiogyJAByAyuYLcWqXDCRgkCIyhQaCGErdoRtARK2DjBoMjWrVwRuNjhFG/eDHcBCw6MNzDYwxkOABARFrHjx5AHc6B0oenhwn8Fazas+bALQz8yP/br9zLirSoWDPrqtLHo06MPXyAEIIBr2KUzl94qQtagBSpau86d2zTgHZZumCAOW7doBBhKvejbuTppxwhmzMKgonnkzCqi81pgmzlmzBlEIOdlaEbo6pFVXPDNXtCCGYwtW0/vQnV9SwDscAEEItyFgAhAuHAAfZcEAgAh+QQJBwA8ACwAAAAAJgAmAIU0MjQkhlQsXkS0mkQsSjzcukRsYjwknlzsykwsQjyEcjxMSjT00kwkklQkglQkqmQ0OjQsZkTUskQsVjyMejzkwkR0ajwkplz0ykw8PjQkmlw8NjSMdjxcUjT80kwkllwsakTctkQsWkT0zkQ0NjQkjlQsYkS8okQsUjzkvkR0ZjwkolwsRjyEdjxUTjQkklwkrmQ8OjTUtkQsVkSUfjzsxkR8bjwkpmREPjT81kwsakz0zkwyMjIAAAAAAAAAAAAG/kCecEgUklytgay2G9VkA46LVKxaiTGOxJPrer8eGSVzLfNIisq3y117axSqmbiQuO93iWsuNNTwgGsYKnMWI2yBbm1sNmUGh4GLiR6EVQt/iZlfGHtEJHaRXpKBMhtEHG2jo4qBFEMxamuqiLR4XDU4Qi2amqs5NGegvLaABRsui1yzvss5yjkdFMOTgDQDzryposTOJyHT4F4pmLXl2W4jz2Db2OzDDzDxF/H08/Ty9zD29vj7MCvw7vHTR7BePn4D630omK9hw4QP42lwYBDfQYYVL9ILYMKhRYjzBoa8CIJFwIIQPapESQBAAxgnERoc2e/jPQ1UIsDEuLKneUEQRg449EcUJc94KxIM6Qgvpc+K9kwQAVDiJEN/Gj02kDMkwQqLR7FCRcrCCoqUNCM+nFBGxAOxAo0S3CdgzoSvcZ8iZcsnQQmeNLHOa1CWjxETQp02XAECgOEiCUx8CDyzAQilj62QYBEhQIMLby80CACCANcyQQAAIfkECQcAVAAsAAAAACYAJgCGNDI0JIZUtJpELF5EXKZM1LJEJJ5cLEo8bGI87MZERKJUHJJULEI8nLpMhHI87NJMJKpkTEo0NJpUhLJMJJpczL5MJIJU5L5EPJ5MJJJUNDo0LGZELFY89MpMjHo8bKpM3LpEJKZcdGo8PD40rL5M/NJMJJZUPDY03LZE5M5MVKZMjHY8XFI0jLJMzMZMLGpELFpEtL5MNDY0JI5UvKJELGJEZKpM1LZEJKJcLFI8dGY87MpMTKJUHJZULEY8hHY89NJMJK5kVE40zMJM5MJEPJ5UJJJcPDo0LFZE9M5MlH48dK5MJKZkfG48RD40/NZMJJZcjLZMLGpMtMJMMjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB/6AVIKDhIIyQj8CNwlJSQk3AitCMoWVloRHKwUlT52enyU3HiOXpVQyDkSfnZyrngkelKaEEQWut7cFQrOCCAm4wKsdOrMiSazBrq2sTaUIx8HLySXElRG/ydmfHbuEMrbRntLBNyeEK63j48rBHoNHqqvqyPS4nAlOgj/a2utPSqfA8bMHDMQJIcs4zfO38InCJyw83CqRwkWMBi2WfLBhQ4UKjh+WtGgQw0UKILeUCHD4BMiUCSokmOixYAFNmjVz6rwpQcWEGCgd0kDxJAYBEzZr3ryZtGmPp0lx3iQA9EIFBUx1alW6VatUpQqGYOC69OnSqDa/MoWqEwOEIM9w44aAOzeu3SB178q1OxfH27l59wKmyxcv4cN4TehdzLix3h4W3hYObLiyYcqE6waogfguZsaD9b7wIdkyaMegDwBY4Dkz4sGh68oO0oPSBgilUesWLUiDgSB/9x6O7bowDgaDOOfevZhyDUKrS88Obfkz4NqFGOD4XLi56RA+LOUIXtm6ab4cSsHgPrv15RDPTXHAUd4x5hAweFFhwFq668B1LRCeflQAUEMPnelVVw8vyEJgby+wNtxhDCL3YCUA+LCBBT2EcF0AG6jGSyAAIfkECQcAUgAsAAAAACYAJgCGNDI0JIZUlKJELF5EXKZM1LJEJJ5cLEo8bGI8zMZMTJpMHJJU7MZELJpULEI8hHI8lLZMTEo0JJpUhLJMRJ5M9NJMJIJUJKpkJJJUNDo0LGZEbKpMLFY8jHo8tJpE5MJEJKZcdGo83MpM9M5MPD40tMJMJJZUPDY03LpE9MpMjHY8pLpMXFI0/NJMLGpEdK5MLFpENDY0JI5UlKZMLGJEZKpM1LZEJKJcLFI8dGY81MpMHJZU7MpMNJpULEY8hHY8nLpMVE40JJpcjLZMJK5kJJJcPDo0bK5MLFZElH48vKJEJKZkfG485M5MRD40JJZc/NZMLGpMMjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB/6AUoKDhIIxQT8eNgwjIww2HipBMYWVloRGKgUtUJ2eny02HSSXpVIxDx+fnZyrngwdlKaEEQWut7cFQbOCCAy4wKspObMhI6zBrq2sTKUIx8HLyS3ElRG/ydmfKbuEMbbRntLBNieEKq3jLU06JStAEENAKyU6TeOfHYNGqqs6EAR6mFhAsKDBHT0IQEiwjBMDJ4J+fBIxocfBBTsI7si4EaPHHQ0miPiU5BS4JhsGfrzokeXHGk06oTgRhBOQBhpXctTZUSdBExA4sehQYUPOnTtXtuyItGONCkk8vDhKFWPGnFWTcqyhREBPn0y1fmx6VICCglcNqkW7dm3aHeMUTCC1upHjXKs832q8QKSvXyIg/gb+K5jwYMJEbvANfLhv48GNASOGDNgEYseFJxu+TGSHBb6ZL0eWrNlvABqYS0dmnPkxERc+QJOezbn25AMAFmz2S5l1asqSA++gpOGCbNvIObsQlMEAkcW/o7MGzjuxg0GojyfnHFkDodzagY8OzXh4IQc3qKtOPdmHJRzQq9OWPxsECA6lYBzeH50+YxqzcHDDbqIhtsMAvEjhwAIXjKYeaQsckKAgANAw4IPs7eCCLBMaosEOx4mn4XUdVgKADxpYsINi9u0QgAYHcFhKIAAh+QQJBwBbACwAAAAAJgAmAIY0MjQkhlS0mkQsXkRchkQknlysvkxsYjzkwkQsSjw8ikwcklR8cjz0ykwslkw8nlQsQjxMSjQkmlRcgkRcpkwkqmTExkyMdjwkglTcykwkklSEskw0OjTMrkQsZkQ0nlQsVjz00kwkplx0ajx8ejw8PjRsrkzUykzsykwkllTMtkQ8NjS8wkw0mlSEcjwsmlREnlRcUjTMxkyUfjwsakQsWkT80kw0NjQkjlQsYkQkoly0wkx0ZjzsxkQsUjw8jkwcllT0zkwsllQsRjxUTjQkmlxkqkwkrmSMejzkzkwkklyMskw8OjTUskQsVkQkpmR8bjxEPjR0rkzszkwkllzUtkSEdjxEolTMykwsakz81kwyMjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/oBbgoOEgjdEVgJVPUFBPVUCF0Q3hZWWhEwXTTZanZ6fNlVIJZelWzcuCJ+dnKuePUiUpoQRTa63t01Es4IHPbhJJycyJ0mtqw08syNBrFpTBlIwKUALC9VAKTBSBkmgUKUHzVo2LBTU1tjX6elAFDutNsqVEb9aLFfr19Xs/ED81h7s6NRgF6EbtqYYWfevn76G+/RR8FZlBaELNmS0YOjQn8d+1RzI0IJkEBMEFl6oi7jyozps/1Kw6BFFkJUMDhi25Njwpb59QE7MONUhH0BrP9klBQix2gMVK4gsAckz4kN/DxluIMJAZVWfX322BEJiAtKdWI865OmPgAKI8WF1ihWr70dOpUjz6t3LN++/nnJ7zh0stkKFI4gTi0h8ZDHjxogdK4Y8WUdkypMzP8bMWLKIFIc3S+Y8uvNmxEAwaD59eXLpy44D5DgSWvNr1o5f0xhS+3Zryr4fi0gAYMHpxchtZ859GQglD4Z/s54+nYYgDgVorwYOOXly0zogDJpdWzp104xzECpe4fZ30qIbOy8EwXLr0sFJD7Hko338+Mx1BkIpNfSG3mueNaaeKSDoUF5wrwExAC9bQLCAfwfCd8QCCVAoCAA5WJYfZUDQIIuHhngAhH8BOlaieChWAkACHmAAhAjIARGAB8TxEggAIfkECQcAHQAsAAAAACYAJgCENDI0JIJULFI8JJpcLGJEJKZcLEI8JI5ULFpELGpEJK5kJJZcNDo0LFY8JKJcJKpkLEo8JJJULG5MNDY0JIZUJJ5cLGZEJKZkLEY8LF5ELGpMLFZEJJJcMjIyAAAAAAAABf5gJ46kCGBWEDlX4SyBhQFlbZOMxT288ii+3y+SYNyOnQmhAmw6nz6HZYIsGSK+rDCr/TUjmKqo4dhqz9ygr7CpIi5ps6LQpHu3j8yxAW9651CBfg8NNgYOQH+AT3R1QI1NDmEkEwdcP5CAmZmOQBFUIxaCo5CNmUIJIwxMQpidj6OwWQ5GHRaKTqVQprJPqQAcaq5+uYy7agsTGHeBvMXFnHQQoomL1q+9xk0JAT1/m8a6vVsUC9jZnLHWA4jfza+8znUFPcfX58eQXuL2z+oKiPCliyZLVwEsuK7J++dkQABi9wTRSQerEQUCabQtdDRxl4Rl6GJtFAQBAJaKz3NGavRE5VZCdXYWUUzVYVVBa/HwOapgYATGlwxvNrFAAoClfDiFFvtkpUxEnZ0mTiohANxTlQUK3UDwgCJWmQSqkMlCkeMTB1qrGDh6s6MxMGJGKKkA1JiDBDTiUrIQwa3BAQl66rUxYRqFvl0PUkhQUkwIACH5BAkHAE0ALAAAAAAmACYAhjQyNCR6VBySVCxaRCyCvDRerCxGPCSKhDxy3CSiXCxiRDQ6NCSGVDxqzDR+3DRGZCSaXCxufCSSXDRmtCxqRDQ6TByObDRShCyGnCSqZDx67DROZBySZDR+1Dx27DQ2NCSCVByWVDxerDRCXCSKlDx25CSmXCxmXDQ6RByOVDxuzDx+5DRKdDxmvCxuTDQ+TCSOfDRWhBySXCxeRDSCxCxKPCSOhDxy5CxmRDQ+NDR+5DRGbCSWXCxqTByOdDRSjCyGpCSuZDx69DROfDSCzDQ2PCSCbDxivCSmZByOZDxu1DxmxDQ+VDIyMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+gE2Cg4SCACMxEUZJMkgJPCA4Bh+FlZaERTFKQDICAiECGRlBoxkSFAuXqk1FFzcOPp4hoCGjQbe4CTiUq4RMDUIdnaCenqKkyLYCBr2COyXBn9K0Aia3ttekJgO9LB5COknS45/Wt9bmyQqqO99CB9SytOm49aQZ3JVM0EIEw5/xQtDDZc5WAmaEAAATIiRWwGICCQYZeC0EL0EXGPaTNU1eNXv10F2jMKjIDY0HOtIiFnGiy3P1RiVI1SQjQx0dOa6kaI8eSYUaCRQDOFQaPXMicYmyyIThNxI5V8pKxxMmqRo2GVqgxnVa1ZcxKRTQKKSTzrMfkx51OSrFQiH+DlQS3QlSor0MIU4K8RC3qF9PVK2GJOgu2MpZUufVtSuRXzRiZ+kKXqsUgcYOUYvOGshTpIm3cVkepvaVZ4ixN1OQgwwRKdjBuBgMcdpQNESALXsKduniRWGoXQN+rWuiBoAJQePdnirRtesgFpvMZtgX8SyVw0GSZKVEYyy/rJ8nlRgCYRMWezcexr74dZDthpBrfSjZPUwT0QlV0Cs0OHPdR9VgyQh6OXQbMc4RNwM70OiQwnW2UeQcDr2M0B1m07BEGUH59FIBcv5ENh5MIQjYjCEsKEGABezZFUIAAJxYCABDTECCav+ZE4IL5sk4YwUbnBCAaibglwIONVwDpEogACH5BAkHAEgALAAAAAAmACYAhjQyNCxyjBySVCxaRDR2rDRapCxGPCSCVDxy3CSiXCSKhCxiRDQ6NDR+1DxmvCSaXDRGZCyGnCSSXDQ6TDRShCSKfCSqZCxqRDx67BySZCyGrDxivDx27CSKlDxu1DROfDQ2NByWVDxerDRCXCSGZDx25CSmXCSOhDQ6RDR+5DxqzDRKdCyKnDQ+TDRWjCxuTDSCvBySXCxeRDRerCxKPCSGVDxy5CSKjCxmRDQ+NDR+3DxmxDRGbCyGpCSWXDRSjCSOfCSuZCxqTDx69CyGtDQ2PCSmZDQ+VDIyMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+gEiCg4SCACMuGwQVMUYJPgc4BiCFlZaERS4eQxgdAiECFhZBoxYSFwyXqkhFFDZDsDefn6NBtrcJOJSrhEcqsBxDGgLExKKkyLUCBryCPCWwsDoxn6AhJra12aQmA7wrweFDsqDE17bY2LWlC6o8wdFD0+bW2Lf3t6LelUfQ8UM9qhU7h8/eOhPMCAH4NQQerAzmZhFMhy9fiF2CKPyD1cBaRAH28I2iSOrCoCKvNg6zVo5gEHsh8wVJkAqJxo1DKkRkGfMezHsmF+IckqHcQJA+K+azcPEIsH8pjoaodyskyZAWaNzc2EDizp5KkwW5MOMfPCLFBH6i+POlW3T+QWow3Ih2qleXYeHaCpHSYbBhadNa1UsYncN4HDpQ80g1bEyD/ujebfy4YD4EQ1cGnlrZss+5/9BWswsKbFXLIcpGg8ehbuC1p9/GtlXjw9N4XXc2VgrWxIsWh6NFZWzOdG9bNADsMPvw6KyfPdteRGIbZwXisD0rNclq0+0hnj6W1jsYboiESFY0/NeV9O68t14odLAxBUSP2WVDDzKdEIqU8YTHmGkVIWTJCABKs1N2V/kkgzuRNXRDS/kRlg4OvIzgnYIDwtdNM0hMsAEsKYD3EVt6nQeiISvMpQA9poXwAkYrsrLCDhykIEt+2MiIXo0KTbBCAQHUEIoJIdQHcAENNF4SCAAh+QQJBwBIACwAAAAAJgAmAIY0MjQkglQcklQsWkQ0drw0WqQsRjw8ctwkjnwkolwsYkQ0ftQ0OjQ8Zrw0RmQkipQkmlw8euw0Okwcjlwkklw0UoQshqwkqmQsakQ8Yrw8duw8euQ8btQ0Tnwshpw0gsw0NjQckmQ8Xqw0Qlw8duQkiowkplw0OkQ8asw0SnQ0PkwcjnQ0Vow0grwsbkwsipQkhlQcllQsXkQ0XqwsSjw8cuQkjoQsZkQ0ftw0PjQ8ZsQ0Rmw8evQkllw0UowsgrwkrmQsakw8fuQ0NjwkpmQ0PlQkjnQsipwyMjIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/oBIgoOEggAjLBkHCytECT0BNwYghZWWhEMsHDycEUYCFxdAohcUGAyXqUhDFTWcrz8CMaJAtbYJN5SqhEUonBqvPAgCoKSjx0ACBruCOyTBrzjEs7W01aMmA7spwN083R/ExUAm5MikCqk7wNCvD9PWtvKjF9qVRc/tryvT5eW2/2hdMLGMEABf3/TxmBBDlrV/86rF0CWogsKE0mQJKGdN1D+OozAMGuLqIo8FDR0CjGhLVAJUSCya5PEjRkqItT6akyfyIDR2wSxMA2UOpzyQMQAU+XVRg4WUMYzmZBmKhsyZ7xpGnQdRpy0MM0yyK5Fy41SWXYFMQDiTn1aj+mmvjYpR0hvQVyWGxt25MufdduzcypKKszCQfG2nbT2LVt6BmZz4aYTLcqoJtibJyqJW2WutGGFfsQOGY584s0Ur74TRgenFd5ul8p3tQsVffbBVHt19lAYAHZBjifM3m/JEJK1F6xNuM15nWy4EDdlkcsFpr55txSiIJEVCfRqkvVXNWOQgAA1M4lgxnjHc44ROlAwGVPLixv5oWBpRt11ukMRFZI8lzigUi02yEWfCDbuMQB00GXHGWE4DqiJBaNBINhBf/8SgHzPSpfAgJwc695kLFIFoSAoYasAPLf7E4AJ3KhYCgAQpFKADAROYkEAME2BAQ4qXBAIAIfkECQcAMwAsAAAAACYAJgCFNDI0JIJULFpENFqkLEY8JJJcLGJENDo0PGa8PHLcJKJcNEZkNDpMPHrsNFKELGpEPG7UJKpkPGK8PHbsNE58NDY0PF6sNEJcJJpcNDpEPGrMPHbkJKZcNEp0ND5MNFaMLG5MJIZULF5ENF6sLEo8JJZcLGZEND40PGbEPHLkNEZsPHr0NFKMLGpMPG7cJK5kNDY8JKZkND5UMjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABv7AmXBIFAIuH0lisoopSgEToVKsWomwD2TF7UYiL3Ck8DhczzOYI9Vtr8CvuFxhoqKJMg2X2WVOvmGBcAUEd0IqG26KcHBxYhwCdx1+K5SUTXAcL5qOYQZnKnyKbo1ypmERkVUyiaN7XmJynIwchUQAepWubY2cp44ldkIOu6Jdmr2BmrMPQzBsu4uyv3JgCmYzxNGKMYGmnL5xzbhuxqOx4b7LL8Eyr9u6sXHhvxEk2vC8mafg1Q8j0fiI+uNt3rROL0LkyueF2i9fJaBZesftkcGL38zBI+jw26YwrRhyAfQRI70ICUR26ebxoayFIuXxe4gBYB+KAvewjKDOI5+nEBQowmPZ8dcDDxq37bzYTxYJACgY+iFZyuQLDFSC3txKqmDTU83SuFAZQ0wyjwpszeigaxuTqvR8hTWCwO1KZTPlBCuSIWU+oi0/1rJyAZpSQSVNRRABKuQukj2XmbhzYWw0wAU3qbqTwabGP4D2sSNhaAiADpbNAeak4IGw0kIqdEBhjCBJDGVgXwHAoMOAES5SRFCAIcQDEq+vBAEAIfkECQcARwAsAAAAACYAJgCGNDI0LHKkLFpEJJJcNFqkLHKsLEY8JKJcLGa8JIJULGJENDo0JKpkPGrMJJZ0PHLcNEZkJIKUNDpMPHrsNFKEPF6sJKJ0PGa8LGpELHqkJJpcPHbsNE58JIqMNDY0JJJsLGK8NEJcJKZcLG6sNDpEJK5kPG7cJJp8PHbkNEp0ND5MNFaMLG5MLHakLF5EJJZcNF6sLEo8LGq0JIZULGZEND40JKpsPG7UJJKEPHLkNEZsJIKcPHr0NFKMPGK8JKZsPGbELGpMLH6cJI6ENDY8JKZkND5UMjIyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB/6AR4KDhIIAISs+Dxs8Ix8vCTQGHoWVloREKzc8nJ0gIwwlJQwDGAuXqEdEFDmdrjwIIDijoiUHNJSphEYNnIydvyAgAbShoQMGuoI6KK/OwiBFtbS2AropjNk82sHCOAzG1AwuqDq/zsCwwhGh08YM1pVGzei+nsIjoqEi07bJhAB6bavnCpqMIu1q8Rv1IpcgCgTP3RNmgdZCfaMwDCLSiqCzWMIc9CuxMNSBU0cgenwGbQhJURenaQz4SiI6aCA6JFT4kkFDI/ZWDgQJIgLPmPpiqBRaEBq7nRgXYoDh8ZdEnC3Cvdw6aoZApp2ItqgFddqLjtyCumKEMwC4reIL+cm1ybTtyLsM6IHl1FYrTLglHuydOIwaUoVf92KlNnKhBqrpBqodiHNHzLjTZnCYjO5cZWOHX2JQQXclTnZ3ucYAAGTwBqI62+2bJkIDpc2RJ3cT5rLsVo2qTAzG6aCd3H4H/h1JIVkozoplF9IAiGClZ2EIpEU161AQCcF1hRGLTlI5oRAdq4JEPVshuUvMnPO2+FfE9FQhhHuE9oMxzPe6kAACZ9vE4pY4JbwQgzKDAJDCJjfJ4s4BGHTH4BEOIiDRBp+AA84LGJh3IUASpEAACCbkMIIDGiSAQQwWWhIIACH5BAkHAEcALAAAAAAmACYAhjQyNCSCVCxaRCSSXDRapDxy3CxGPCxqpCx2pCSiXCxiRDxmxDQ6NCSGjDRGZCSShDx67DxmvCSqZDQ6TDRShDxerCxupCxqRCR+dDx27CxmtCSClCSibDxu1CSOjDROfDQ2NCSaXCxivDx25DRCXCSmXDQ6RCSKjDRKdCSafDQ+TDRWjCxuTCxqtCSGVCxeRCSWXDRerDxy5CxKPCx6pCxmRDxqzDQ+NCSGlDRGbDx69CSuZDRSjDxivCxqTCR+fCxmvCx+nDxu3DQ2PCSmZCSedDQ+VDIyMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+gEeCg4SCACQrPQUZOhoHGAE1BiCFlZaEQysdOpydIp80EhIDFwyXp0dDFDKdrY2fIqE7Owk1lKiERjacjJ29sJ8NEjvDAwa4gjkjrszAIhpFs8MlArgojNg62b/OG0TSxC+nOb3Mvq/ORcPExNWVRsvmvJ7OIhvr7AnHhAC72vKt6j3DJw3GLUEUAJajVy8FMVHSLgwawgogMyACN8yaVWJWAlNHElpsJhBBx44bJUjs52qhOYEDN3LcYdDIvJH/MApMAG6dhBkicQaEmWIdSmIXYljstRCmiAcQN3Z04U9oJ531TkiVGaLitpstnQo7irKES6FYu8lEKSqeVU7JYmfK3FHgLcN6wuaerPrWqdats0IoPffvJtO0wB6UleniA1icTmHM5chCxdmRTjkMMzprBoAFVrEh/qQBIkGDRxwTfnwXGAKCKCWmEmIXpsbN0vQNQlEYssCik2vwizCynMDS7E6iJmSiLs4MGTnvKDHDEomKmOupkylB3CVlvl1LODldOCoStC1qX+sOlwkRrLWlbcCO5j5kRwCg2PQS1mtiCVxwEH6GoABENtrA4o0EIZRC4CUATIACAUAIIYMGFkBywQwDXhIIACH5BAkHAEsALAAAAAAmACYAhjQyNCSGVCxaRDRapCSSXCxivCxGPCSiXCxiRDxy3DQ6NCxmnCSShDxqzCxidDRGZCSqZCx2pDRShCxqRDx67DQ6TDxivCSibCxurCSafDxerCSaXDx27CxmrDROfCSGlDQ2NCxeRCxilCSWXDRCXCSmXCxiVDx25DQ6RCSWfDxu3DRKdDRWjCxuTDQ+TDxmvCxqtCSOXDRerCxmvCxKPCxmRDxy5DQ+NDxu1CxmdDRGbCSuZCx+nDRSjCxqTDx69CSidCSedCxmtCSOhDQ2PCxeTCSWZCSmZCSWhDQ+VDxmxDIyMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf+gEuCg4SCACQsFgkcP0IdIg5FBiCFlZaERCw4P5ydBZ8FMB8xEwqXp0tEEjadrY2gnxhBBzWUqIRJDZyMnbywsCk7BAa3gjonrsm/oEIZOwcCtyuM1D/VvsufMBc7EAinOrzJvT8z2Z8R3RDRlUnI47ue558MO8/EhAC61vCt87EQuo2wJUhCP3Hy/jEICGHCICKs+iUz9y9CwGemlhiUqOzfpwPddjjU5wrhOI+fhjAcmCQeR34U//FgCIHGxpf+UHa4KFKGRF4IUX6iGWAfzk4x/124OCLiNZetGAkt4MxeCZM4pxqh+e4op6nBQibwmtCjs4AljHqdeuDiBp+r5PhB5Tf1yMUAHuaOEyd0gb1uE1xg5Sj0w5GQNAAoIcsh6bkPKynljTsXm8e29hymUkEWJQaGB/AtWSH3Jcohf2vke8GR778FdiEMLIRibNZ/qHeUEE2IRMSfjmFhUBcCXNd+8zq09XaLBGeJ84KVYHcLRQG91oIXMLJjBO9bAFZsOvlrQYYDPggWGxR+BkIOvz4QaJFxvSUAFVYMKKDChhAhIuSAAA3qXRIIADs=)!important}#toasty .toast.toasty-theme-material.toasty-type-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QTY3QkFBREEzMjMwMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6REZBRTRCMkMzMjMxMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBNjdCQUFEODMyMzAxMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBNjdCQUFEOTMyMzAxMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pu2cWHAAAADmSURBVHja7JlNCsIwEEYTcWsXrvUGBbvqFep59Bz2Il7AXsGd4A103UV7gHQwXQkRGqFJ6PvgC5QUOq+TX0YbY1TKWqnEBQAASwdY/+zNy720F/FRvJk5tl58E5/V8/5yvaSdy2he7qR9iLeBf3IrPgjEe+oQqiMIXo0x1D5zoIpoqFc+AFlEABnLKABB9oH/pL+eDRkAAAAAAAAAAAAWdBYyZAAA7gPcBwBgHyADACQM0EUUZ+cD0EQE0PgAnJQtLoRWO8YyEcBWRArxVdlyz9zqx28XrurM57xCpR4AAAAIqkGAAQAoXCj9X4moZwAAAABJRU5ErkJggg==)!important}#toasty .toast.toasty-theme-material.toasty-type-success{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RjdGQ0YwNTEzMjJFMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RjdGQ0YwNTIzMjJFMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRDJBQjdENDMyMkIxMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGN0ZDRjA1MDMyMkUxMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pp4tcFEAAAEgSURBVHja7NjPCcIwFAZwK9LexAE8dBS9WQURPLiBNwfwZLuBUyhebHEBXUVwCi/1C7yClCZN2sQUzIOPGsH4I38eopfnea9L1e91rBzIgRzIdA3aTjC+bVQ/4iNr5MwGr+XF6goxzBU5IQfbW8YwKbKgcYxMbIEKzPzrvQR52ADxMLGNLVPCaLllNZgMiWQxJleoEcYUqDHGBKgVRniG0IFDPPbIDt30LTFXQAe4MYa7QoS5I1v2JRj7v8CItmyFhPSaXdlMgNKG4YKwRUeatKiIUEFpJbVihIcaqLgClRYoemY6MbW3TIAaEmamEyN17TmopwmMdB+qQI1MYJQaYwVKO0a5U5dQCY3t/sgnxNQEhpXn/mxwIAf6N9BHgAEA0JpdHXf3fp4AAAAASUVORK5CYII=)!important}#toasty .toast.toasty-theme-material.toasty-type-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6REZBRTRCMkYzMjMxMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6REZBRTRCMzAzMjMxMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpERkFFNEIyRDMyMzExMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpERkFFNEIyRTMyMzExMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Po80HzoAAAIcSURBVHja7Fm7agJBFHWX2NhY2doFDAwBIa3kA5La9H7AdtrZWohNPmP62KQLtgEhBCKks7WysRHc3IEr8bGPOztzZ3dhDxzUndGZs2d29p7VC8OwVmZ4lYBKQN4CpEhqfcLXeWyPl2+j4W8YT04dOMP378A9xyA+o4AA2EEGXINwCWgBxyefx3isNAImwObJ5yYeK4WALnAQcXyAbYUW4AFfY37XxzavyAL6wF5Cew/7FFJAAzgl9Jti38IJGALbhH5t7FsoAWpSI43+I6JYZwJ0lwV1uTkRkPXCTLvgHRRzUqgT8Gmwvy+BD1DQHfJywPTmFHfTc+CAFKo8+LVQ42yAt+DC1rUDaQWad0Fq4efAASlUifyFNX+SgFMkDaSywj24sHLlwCxl8ibhh9kBKVRMfCMWdlQHjngGF+Z8AqSo49LpMAlY4VLacy2hgDj5rNCOn3QHpGjhttnUyAa6DihscVvd2HZgojF5E2jFT5oDUnSxZPBrbnDAEmNpLkAKtRQ+bBRemlgAH0FEaLqE+jlMnlzlJjsgharbf2yFjwxYA+/AhV1WB4YGk6fWQkbxM94BKdp49hsGArJso5fYoQtrXQesPj3getoR7YAUPdx5TB5C2XLg+F21Iy3SBZjHRC5Exk+fISZyITJ+njtgLyZy4Sp++poxMW9cxc9/B2gxsQg4i58+Y0zkwln8rP5mrQRUAioB+eJPgAEAEga0oSjgsNgAAAAASUVORK5CYII=)!important}#toasty .toast.toasty-theme-bootstrap{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif!important;font-size:12px;border-radius:4px;border:1px solid transparent}#toasty .toast.toasty-theme-bootstrap .close-button:after{content:'x';color:#fff;font-size:17px;font-weight:100}#toasty .toast.toasty-theme-bootstrap .toast-text{color:#fff}#toasty .toast.toasty-theme-bootstrap .toast-text .toast-title{font-size:13px}#toasty .toast.toasty-theme-bootstrap .toast-text a,#toasty .toast.toasty-theme-bootstrap .toast-text label{color:#fff}#toasty .toast.toasty-theme-bootstrap .toast-text a:hover,#toasty .toast.toasty-theme-bootstrap .toast-text label:hover{color:#f2f2f2}#toasty .toast.toasty-theme-bootstrap.toasty-type-default{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NEEzQTA1RTUzMjJBMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NEEzQTA1RTYzMjJBMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0QTNBMDVFMzMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0QTNBMDVFNDMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pr4ktvwAAADlSURBVHja7NrRDYIwEIDh1jAAozhKN/BWcgJ0A0dgBEbRCbCNkphaTAsPXpv/kkugELgv5eCh2HmeTQtxMI0EEG3RxQPW2mXT+Tz57JXUevd59XkLO1+9HQY+8x1DOKQ0h2TdCYhTjFjSxXWnekQqaAnJafa+AkjP6xcIECBAgAABAgQIECBAgAABAgQIECC7Y2oB8vB5qR0SEJKakW7Dxc7mtejyj8dpXL13Yn0knLy2LiFapiZnoWfUjtgDEW3NsgUiGru+FCJaX18lELWIEohqRC7kWMOXMa7b8ncQECA/4ynAAPBVcVo7OMcUAAAAAElFTkSuQmCC)!important;background-color:#fff}#toasty .toast.toasty-theme-bootstrap.toasty-type-default .close-button:after{color:#000!important}#toasty .toast.toasty-theme-bootstrap.toasty-type-default .toast-text{color:#4b4b4b}#toasty .toast.toasty-theme-bootstrap.toasty-type-default .toast-text a,#toasty .toast.toasty-theme-bootstrap.toasty-type-default .toast-text label{color:#4b4b4b}#toasty .toast.toasty-theme-bootstrap.toasty-type-default .toast-text a:hover,#toasty .toast.toasty-theme-bootstrap.toasty-type-default .toast-text label:hover{color:#585858}#toasty .toast.toasty-theme-bootstrap.toasty-type-info{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NEEzQTA1RTkzMjJBMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NEEzQTA1RUEzMjJBMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0QTNBMDVFNzMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0QTNBMDVFODMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvCIVOQAAALtSURBVHja3Jq9axRBGMZnj+ViAhbaaISLR1AUBBNjEq7zD7gUiqIIgraKVf4Ay9gljYVFiliJEklyJE26dJsPYy5pE/AQtNNC8SMXHJ/BN7C3O/exe+/c7twLP5jmZp7ndnZ25n3HkVKKboiM6JJwmfrpA6fACCiAIXAB5H1/1l/wEeyDMvDANvgGfrYrwGlzavWDcfAQ3IrZxwJ4BTbAl9hKlJEY5MADsCv5Ypf6zMXRFPUHLigCT5oLj8ZwTRk5C57LzoUaq5/byFWwLDsfS+Ayl5EC87sQNTZJQ0OdzVYttYS+oWU1yVDL9D1auiN/EM+BmRSYEKRhhjRFMpIFT0ExRR/vImnKRvkgqh+9Az0p24n8AbfBSitPZAA8YzJRBT+IKkN/PaRtoJkRB9ygbQdHzILTxCxTn+Ok0WlkRO2dJhmnwhE9iSq1uWKStGqNOOR2mHHAM7TijFCbK4ZJq6N72U+A1+Am44C/wHdqnwS9jH0vgvvgd9CIWqM/WXTYUuebHPgcnFqjlp0YM6Q59I4UDAymDkuPiQ0D/Rd0R90hQ0ZeUvsK47Ie0uw3Mmjo8WcNJjoGdVMrb2Agp06bK/I6I66wL9yuy2tlAtsJ2+JIZ6RioZGKzsiBhUYOdEbKFhop64x4FhrxdEa2VAbVIhOSNIeMfAUli4yUSHPIiDrYz1lkZI40h4xI2uTtWGBih7TKel92VZ+YNjCXud+9aRGopbiaQdfILceWewJcpPYlxqPBWvDPqZegUwLmRToTdHfAcqO9lj9W6fGlaTmWpGm12abRH4fghdCkJhOMFdJ0qD34tFBWeAuuJWziA7grYpYVBP3wifhfn0gqtknDfuOJ11rpTZW/SglUq0qcpbdjVGFyqoMmpkwUQ/3l6QmwbtDAOo3hmqyzBy8M7DEa2GvnwkC7VzhUvngMPBLxk9+LtAHcFJTHjZV3YrrmdHyp5rqovVRzXtReqqmI2ks170VKLtWkMh1kdfwTYADvtL/RevtcWAAAAABJRU5ErkJggg==)!important;background-color:#5bc0de;border-color:#46b8da}#toasty .toast.toasty-theme-bootstrap.toasty-type-wait{background-image:url(data:image/gif;base64,R0lGODlhIAAgAPcAAAAAADhwqCp+vi5yuDR4sjR2sDJ+sjp0sDZ4sjJ4tjR4tFyQwDB0sHKexnyozkKAuGaaxnCgzHyq0Hyo0H6q0ISs0E6KvjB4tjB2tIau0oau1Iaw0oaw1Iiw0jB4tIiw1Iqy1DJ2tjJ2tDJ2sjJ2sFaOwIqy1oyy1DJ0tjJ0sJK01FiOvlqOvlaQwpK21FiQwliQxFqQwFqQwlqSwpK21pS21pS42Ja62pi62Ji62pi82pq82G6gyqTC3nKgyHakzqTE3nimzqbC3Hqmzq7K4nqozoKs0pC01JC21p6+2q7I4LDK4LLM4jJ4uGKWxnqo0EKCvGyeyoKs0FCMwFSOwliOwJy82nSizKrG4I601py+3LLM5LbQ5sDW6DB8ujJ4tDB2uDB2tjp8uLzS5sLW6DJ2ukCAuD6Auj5+vkqGvEqIvqDA3EyIvk6IvlSMwFKOwlaOws7e7mSayLrQ5Mrc6tLg7rjQ5jB4uNzo8qbE3jR4tkKCulSKvDh8tkiGvD5+uE6IvFSOwJy82DR6tjZ4tDZ6tDZ6tjh6tMze7OLs9F6UxGKYyDp8tlKKvGKYxjx8tqzI4Nrm8ujw9oCq0FCKvj5+tubu9u70+F6Uwj6AuFqSxF6SwnKiykqGvkSCuMja6tjk8Pb4/GycyGiayGaayGKWwlySxEiEunCeyG6eyMja7F6UxkSEvEqGul6WxmCUxEKCuMTY6mqcyGqcxk6IumCWxmSWxFSMvlKMvlCKwNTi7k6KvGSYxDp+uESCujJ6tjR8tjR6tDh8uDx+uDh6tjZ+tgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEFAMYAIf8LTkVUU0NBUEUyLjADAQAAACwAAAAAIAAgAAAI/gCNCRxIsFiTBAgTJixGsKHDgcASYFBIMcGFBF4ePjRgsWICBYpkiKEYQONABQpn2ACR0E2XLkgoXmhi8tdFhCJ6bNliASGPlycSikAYotBDBTcTTtrpAGGGl1cQEqBxok+CEDQJDgiRwFCahJR2YlEgYs1LGQlGnIgTh0bCkgMRKtAA5AfKETq3yBhh5+UDET7YxmmaEOJFC0ASb2D05crODw9echmxQDAOlAmzJlTgIDEQG3s87SRS4qWVVrHYKjlU0VgZhQpkedbShgYRCgquZHlBhO2YBwlEFCilKAGYAwcViiixJnEOBVaFdoijysIIPi7i4Im0R6EwNSMT/nxJowNIFI8KeMWo0AWPe/eyFP7QoSOLg1El0pTwmPDIe/d0VIWQBwmAQN+BOuTwB38+uaeLFYoQkFAIBCrCwQ0I6hAefwhUMAsCQylEIU4EPOAGBEGcx+BHSTBRgw98FDDCUCEklVAfuLyix4p7SOLjj3RUIAJXm6URxQcmmDDFiqf86CQdItzUxyJGJGmlIwwqgAoLPtCwRB0+5qHQFFYmOcEMfqjhkQg7hJLICjOK8EgV4RVzQS9JGuHEX3tMIIEmFA0igiWhhHJJAwwoBIYAxiDkRxqY9fKDBBJEwYopU+hBhRwv2CJJoaGoQIJCAnkxUUKGREBpEH8sEkEEqA/IIasYgIAC6hKEJODBL3EpRAqlErCiBw+v9tGCrGwkUAkZoGKCEEEcIdQCsD2J8WoUIkAhqysIESJEKHOghEZDTXDlBKUzIMTKq7UkMMgisp6RUAmFhKDAQ/UOskpxCE3xagv9yrrkhGCY1ISNCWjyqpoJnCHrKrCZJFAAEiVkyqtmJNQCDFDomsC4Eg90EBjuQsFKRSTzGrJDByB0QQgw14gQoyYFBAAh+QQBBQDIACwAAAAAIAAgAIcAAAA4cKgqfr4ucrgyfrI0drIyeLY6dLA2eLI0eLRaksQydK42drB2pMyCrtJAgrponMp4ps6IrtKErNBOisCMstQweLYyeLKGrtIweLQydrYydrQwdrQydrIydrBWkMAydLYydLCOstJYkMCOtNaQtthYkMKSttZakMBYksSWuthaksKYutiYvNqavNqcvtxqnMagwNpwnshwoMqqxNxwoMxyoMhyosxyos50osx0pMyAqs6qyOCAqtKsxt6CrNC2zuSCrNKIsNSOtNSWuNamxN6qxt6wyuC60OSKsNSKstQ2erZkmMh0pM5Ihrx6ps6GsNRQjMAwfLoyeLQwdrgwdrZWkMKStthsnMiiwt5uoMqAqtCsyOCmxOCwzOK40OYyeLi80uQ6fLgydro8frhAgLg+frpAgLo+fr5Khr7E2OhMiL5Oir5UjsBWjsDE2OrG2OrG2urI2uponMhunMjU4vBunsi0zOIweLh+qs56qNDA1OjS4O7c5vJ8qNDC1ujg6vQ0eLZEgrpYjLxYjr6gwNw4erZMhrxSjsA2frZCgLg2erRclMRomsg+frY6fLRmmshkmsg4fLY6fLaGrtRSirxSjMCuyuLS4u7o7vZQirxcksR+qtBCgLa80ubM3uzg6vLu9PhcksJwnsZilsRglMBeksDe6PK+1Ob4+vz8/P5GhLxglMJIhLpCgrpelMRkmMZilsZIhrpmmMZMhrpCgrhmmsbM3OxOiLxomsZUjL5Qir5SjL4yerY0fLY2eLRGgrpMiLxUjMBCgrxglsY0erZEgrg0erQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gCRCRxIMBEYAwgTJkxEsKHDgb4McFBI0YAFA1IePiRgsaKBBJtGGKIYQOPABApNkICScNeXLxUoWgBjstdFhBde8OCxBiGMl0ISbkCoYdHDBDcTPtkZAeGPlzMQJqggZIkBDTQJDtBgYImThGx2ZklwwcXLEQY6SIgTJybCkgOl9nhxw2oHnTw+dPDy8sEFGWzjNFAI8eKaF4gdjJyx04Gil5cuoHjD9gTFrAkTRED8goQrQTuLtHmpQhYqtkUWVUQ2RmGCWZxVHKrQ5UmCGUncFGELpIyBDQVYoTBA5cBBhRvatEB8JYFVoRPi7FnToVIFOHUwPVDoVQzCKU6u/ryY49EAqRE7kNRZv76RwhklSkBpAKuNkzblEVZgv/6PhJEGZGCAA/EVWAIJZORnABbrfaICCgUkpIGACvRAgoEleJcfAjvkgsBQCk2IEHCKWBJLDuQpmAALXAwhQyUIdEBUUgktwcYmKOUnCCA88niKGltswFVCgaTRSA8OOECBgq2c0mOPamxw0xKv+JHklYzkl4AMI9BRgQ+f8JiFQhRcmaQOHwjyVUUXqBBKH4PIeMEjHwCYiAViJKnHK349gEMTJiD3SAGnhBJKJjLImBAVAiCDkBNO5CjGDE00AYkgVqyRwBGpqFEKIIaGIoKiCAkkxUQ1QlBpDWQwAgEErYKkoooqtODCR6g+qJZBL3EpREylTQgSCCSvLhHGrERc4IgnoYpS6kAcIdQGsEuK8SoTU9gwKyALGLBIDKEAgRIaDYHBFSOVBmqAIK8q4G0os5aSUBtLaJDAQ4tosIQC7iK0xqtRIOTDrDRcICEVJoFBowFWvLomKduSeq9JyAQgUUINQ2CGVGHIgcUFApJL8UAHUdHVA8Mgt0EVBvA6skMHIGSBBjRrcFOjJgUEACH5BAEFAMAALAAAAAAgACAAhwAAADhwqCp+vi5yuDR4sjZ2sjJ+sjp0sDZ4sjJ4tjR4tFiQwjJ0sDR2sm6cxnqmzkCAumSayG6eynqo0HymzHyozoCq0k6KvoSs0DB4tjB2tISu0oau0oaw1Iiw0jB4tFSOwIiw1Iqu0DJ2tjB2tjJ2tDJ2sjJ2sJK01DJ0tlSOwlaOvlaOwliOwFiQwJK21pK42JS42JS62pa62qDA3GiaxmycxmycyGyeyHSkzGyeyqLC3KLC3qTC3HimzqrG3nim0HqmzH6ozoKs0I601pC21p6+2qbE3K7K4n6qzqrG4LDM4n6q0q7K4LLM4jZ6tmaYxmyezHqozkaEvHKizHyo0E6KwIqy1Jy82mqaxnSkzqbC3KbE3r7U5rbO5LzU6DB8ujJ4tDB2uDJ4uDh8uDJ2ujx+uD5+uD6AuECAuD5+vkqGvL7U6EyIvEqGvlKMwMLW6EqIvkyIvlKOwszc7KjE4GKYyGicyrbO4rjQ5src7NTi7mqcynSizNjm8DB4uLrQ5pq82trm8DZ4tG6eyEaCulaMvDh6tkaGvFSMvjZ+tjp8uEyGvObu9jZ6tD5+tjp6tGCUwoqw0jh8tjp8tlCKvFCIulCMwDp8tNjk8ODq8uju9lqSwnCgzHakzEB+tvT4+liQxMTY6tbk8PD0+kyGuGKWxF6UxF6SwFqQwmCWxl6SwkiEvFqSxEKCuEKAuFCKvkyGumKYxkiEukKCukCCumSYxjJ6tjR8tjR6tkaEumCUxFKMvkSEvDR6tDR4tgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AIEJHEhQ0ZgECBMmVESwocOBuBJoUEgxQYYEYB4+NGCxIkJOIMhQDKBxoAKFLEJYSAhryZINFDOMKXnrIsISM3jwiIOwhsshCUsgHOHooQKbCT3pzIGwgksJCAl42PAkwYiZBAeMSPBkSsI2OrEoKBHDJYgEJjCwYRMiIcmBCHM9kCHhJIEYOkEQUOISQokba9lQUQjx4hoZiCeIvKFTSBqXdUq0+LKWCEWsCRVQQSyjAwRXOmmAcFlklpe1NKpSBFZGYQlTnIms4UAjxxMcGxLtWIskTYISBFYtSEDiwEHXIGAgvqJAdcIkbPK0MVHJAxs6eiAo7CoSoa4rMiL+eEwQacUDJ3TSp4eiUEcIlZ1UvWH1ZjxCDurTA8JwCOGHBFW8J2AIHZhhXwI1pCfKCwucNNR/C/jQwYAhdDceARTUMIhQCo3wH0IKpHHBKRLIcmACCsTAhSQOVFIAhyMgldATbTR4oCt+5KhjFxWUsJVCU9jhwwQTyHFgITom2UUJNj3BiRZERjnceArcsIINHvQgSo5YKBRHlERKAAItiHhUwguN7GGIUCVAEhJCimSwCJE5cAJBGBDoEIUKrlFCQCaNNKKJAyYoRIIAwCDUyxQOknFHFFGoQosKcSjwAyldoCJIoI2IwABhwIAx0Yx2QHrHIq1EEIErpIACSimsbdDB6REIJPDBLXAllEsrkEqgnaoRPOGFqyiU8IgXnHKCEEEcIWQFpFG4kQAZqtoRBiGuCvIpAUY0gsRJajQ0xlYLQHpWArSoGgpXm7iKSkJvPDGCAg85MkIuKvCJUByqXoLQEa72wKFVYpQ0howJqKCqVwns4qofhYJYkkABSJSQwhEYiKIXcNhQwn/hTjzQQSQkkAsEtLhWQsm4iuzQAQhlMMLMMSKEaEkBAQAh+QQBBQDRACwAAAAAIAAgAIcAAAA4cKgqfr4ucrg0eLI0drIyfrI6dLA2eLIyeLY0eLRckMAydK40drByosyAqsxCgrhomsZ0pMyAqtKAqtCCrNBOir6ErNAweLYwdrSErtKGrNCGrtCGsNSIsNIweLSKstQydrYwdrYydrQydrIydrBUjMCKstaMstQydLYydLAwdLBUjsKMtNaOstJWjr6QttZYjsBWkMKWuthYkMBYkMJakL5akMBaksSYutiYutqavNpunsiavNycvNqiwNxyoMpwosymxN54ps6oxOB6qNCoxuB+qNCqxt5+qs6CrNKQtNSSttagwNqkwtqyzOKwzOJ+qtC0zuQ0fLZkmsh+qtJIhLxomsh4pMyArNJSjL5SjsKOtNRuoMqgvtpwoMx6qM6uyuKOtNaUuNigwNyiwt62zuK2zuQwfLoyeLQwdrg6fLa40OQ2frYyeLgydrrC2Oo4fLg6frg8frg+frhAfrg+gLhAgLg+gLpAgLo+fr5MiL5QisBOiL6gwN5QjMBSjMDE2OjO3u5unMhmmshqnMpwoMp2pM4weLjA1ujO3uzQ4O7S4O7e6PKsyOA0eLZEhLxUirxUjsA2erZIhr5UjL48fLY4erQ4erZglsbg6vTY5PDs8vjq8Pbu9PhclMS80ujM3OzS4u7o8Pb4+vxcksRcksJ2pMxsnspqmsRIhrxonMhGgrhmmMRimMhilsJeksJunspkmMhelMRqmsZGhLxglsRKhrrM3uxEgrhEgLZKhrxklsRCgLrI2OhMhrpMhrxOiLpOiLxQir5snMZEgrpCgrpQjL5Sir4yera80uY2eLRkmMY0erY0erQ2erS80uQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gCjCRxIsI2bBAgTJmxDsKHDgVMSZFBIMQGGBGgePjRgsSJCGSziUAygcaAChSw0FElowYiRCRQxuCmZ7CLCETB69NiFkJnLIwlHIAzh7KECmwkd6OyCcIjLKwgVVJgwKUGImQQHhEgwCVJCYDrHKBghxiWLBAQonDmjISHJgQgfSWhR6CQBMTq1ECjj0s6ICGvPBFEI8SKlFogPrUkQQeeQOi7LjHghZa0HilgTPuqCuIWSPBB06tDiEgSrMGt3VKUY7Y3CEbM6d7AyQUeQSREmaPGxlgidBCMILIiRQMSBg6+HnUCsQcHqhEXOPNlFQtiFM3Dg5FEYB5JIhJA0/rTI5DEBrEpYHGVfTz4hlQkThhT6ZKGWhfIIK6zP/uQIJoQfJCABfATCJwd+CTCTHSgoxHDSUAGy4EAVBU7wXXkEYMHLJUIpFEKAUdFhAQ6rfIJgAgrA8AMHtARDQIchIJXQJJSY8AiCECyio46CnDHECFspBAkOQTjgACUIsiLIjjueMYJNk8jQhZFUnlWeAhG8EMEFPyij4wwKUUKlkYTw0YtXFY3ARSOCRCLUCGuYsFgCbWAQh5GosDBHAnNQQYUFJHQIJwGCNNLIJqmQoJAIAkQDHpoJxJGJnzXwYAYMlwgxChsLiGJoIxsompBAaEw04yd+urJGKKSQ8soor5xw8sstgXz6AwIJfJAMXCj5SQUeBHjSqi5PxOrCCJY88SkNCBHEEUJ7+GpFAre0ygkDPMTKSAko5tAIEifp0ZAbW7Hg530J8NCqLyQso0msCySkxSQhKPCQMyE0w8cfCTHRqhNC/RBrEx1apUZJbsiYgBmtPoCQKdoWbG9J0QQgUUJntBovik8oE8EIAYpL8UAHiZDAGhHQQkBQI5i868gOHYAQBiOkEEKMCDVaUkAAIfkEAQUAywAsAAAAACAAIACHAAAAOHCoKn6+LnK4Mn6yNHa0Mni2OnSwNHi0XJLCMnSuNHayNHaweKbOQIC4apzIgqrOeqbOhK7UTIi+hK7Shq7SMni0MniyirLUMHi0Uoy+Mna2MHa2Mna0MHa0MnayMHawjrTUMnS2MnSwMHSwVI7AkLTWVo7AWI6+VpDCkLbYWJDAkrbWWpC+WpDAWpDCXJDAWJLCkrjYWpLClLjWmrzanLzYbJzInLzacqLMoL7aoMDcoMDeosDadqTMqMbgdqTOdqbOfqjMqsbgfqjOfqjQgKjMfKrQrMjgfqrQgKrQrMjisMrgiLDUjLLSmLrYpMLcqsbesszisMriirDStM7kirDUjLTWNnq2ZJjGQoK8apzKgqzSUIq+hrDUMHi2UozAMHa4lLjYbqDKdKLMosDcfKjQmLrapMLets7kuNDmNHy2MHi4utLmMni4Nnq4Mna6MHy6OHy4PH64Pn64PoC4Pn6+SIa8vtLmTIa8Uoq+xtrqUIrAUIzAqMTepsTgZJjIyNrsZJrIytzsaJzKgqzQcqLK1uTwcKDMdKTOxtjq0ODu2OTwNHi2QoK6Toi+OHq2RoS8Nn62PH62Soa85Oz0Nni0Ony2OHi0YJbGZpjGaprGaJrIOnq2Onq0PHy2XpTEYJTCToi84Or06O728Pb6XJLEbJ7KRIK6YpjGaJrGZJbEYpTCwNTmzNzs8PT4+Pr8xNjoSIS67PL2/v7+SIS8bp7KZpjEZJTC/Pz+SoS4TIa6zt7sYpbGaJjESoS6Soa6TIa4QoC0aprEQIC6Uoq8vtTmToq+Mnq2NHq0RoK6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACP4AlwkcSFCSGwMIEyaURLChw4FrDHhQSNHAFwNxHj4kYLEiwhJgsFAMoHEgAoVgjgBJmIcHjwgUv7ApiewiQgtNZMi4gzCVywYJLSDckOwhApsJT+l8gJCMyywIERCJIHLDTIIDNhjAoiXhHZ1XsFio4BKMgQIRliwpkpDkQISNxkgAdLJAThldCtRwSceCJrVLmCaEeDGShMNjIBnIojOHA5dnCmgATIHi1YQIOB2W0ICOA50murikoOyHWjEiKS6Do9DCjM1KIkVQsQVBlghdxKjdQQfhghUlDHA4cJDiBC6HjyBIjbBAgyU/7iwQpWRKGzUOFL7RwtzREQmmPP4aeKHBEJo26NFnUpipQYMcgFJMcDShkXgDSdKjHxJBzk0DY7gnoHuX3LcYelVUUMJJQ2VgABinADFgA/7dh4APoWAilEIbOBgVHZSkkEUMBhqAAAY4FKLJLgt00GBFWNzRhX33ORDIjTfuMYUPFmilkBYpbCFkJAaisgeOOE5hgU1YgCGIkFDysWFFCGiigSZK1JDGjSwoFAmUQmYyQRY+MNgaBofsUYxQFlyigWIGSPKFHEICAsYcBSQACy09fDDlJQvsccghi/jiYkIcCLAMQsQ4kpAss9BCyyKbSOGEJWWMIoULgwx6CAQfKCRQHBMl9AkjkpayiyKllMLKKLaVVKLLL8Z4ioMlBmSAzFsJFYCHpLngsgAprQqDRKxUWDDHEJ6egBBBHCH0hKS0gJpHq5Uo8ECsroSKAA2HQHGSHQ2xoZUUkvZpwA2ttvKBJYzE2kJCXWCxAQIPJbMBJH5EsQBCIbSqg1A4xGrDlBuEURIbX1hwqAFMtCoEQglw+zC+JS0TgEQJSdEqCgkhkYYmFjhIbsYDsSGcAZCsokoBFHFgwK4oO3QAQl8UIMIGG9ikaEkBAQAh+QQBBQDFACwAAAAAIAAgAIcAAAA4cKgqfr4ucrgyfrI0drIyeLY6dLA0eLI0eLRilMAydK5woMx6psxAgrpomsZ0osp+qMx8qM58qtB+qNB+qtCGrtBOir4weLYwdrSIrtIweLSIsNSKsNIwdrYydrQydrIwdrJUjsCKstaMstQydLYydLAwdLCUuNhYjr5YjsBYkMJakMJaksRcksJcksReksJclMSWuNiWutiYutiYutqYvNqavNhwoMqiwtykwt52pMykxN52pM6mxN52ps6qxuCCrNCGrtKOtNaWuNacvtqkwtyqxt6sxuCsyOCCrNKuyOCErtKuyuCwyuCwzOSyzOS4zuI0fLZkmMh8ps5EhLxuoMxyos5+qM6ArNJQir4wfLoyeLQydrZWjsKMtNacvNqgwN6oxuCUuNaevtq+1OgwdriQtti+1OY4fLbA1Og2frY+frYyeLgydro4fLg6fLg8frg+frhAgLhAgLo+fr5IhrxMiLxOiLxKiL5SjL6evtxMiL5OisBOiL7A1uhSjMDE2OjO3u680uRkmsjI2urQ4OxmmsgweLi2zuR6qNB0pM7c6PJ4ps54ptA0eLZIhLpSirxWjsA2erZGhLw6fLZKhrw2eLQ6erSevNg8fLY6fLTg6vJelsbY5vDo8Pbk7PTw9PpilsRglsRglMJ6ps5yosxIhLzQ4O72+Pzy9vpuoMpqnMpomshMhLhEgrpCgLZqmsZkmMRglsZklsRunsponMhMhrpilsZUjsJmmMQyerY0erZKhLpEhLpEgrhonMp0pMw0erRKhrpGhLoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gCLCRxIcE0bAwgTJlxDsKHDgVIMZFBI0QAGA1sePiRgsSJCERcmUQygcWAChRd+MEiYx4aNHhQxtCm562JCJSNGUELowqWpil2EPUxgM2GrnIcQ4nCJC2GCRjtEdplJcEAXA5McJLSTk8mjD0pcXjCQYAcPHo0SkhyY0NaEWY/I4hxx4QMKl3E+iDrLo5VCiBerTBjM6o2BUTlXsXF55oMWvhQoUk2YYMrgCVfkzMnJ4YLLCq/2nB0ikmIxNwo/eLmsqMoODocSzOpxYcjZGnEQFlChx4CHAwcp5lE0uMej0glN8Qhjp8AdCUCgPJGjMGuahA56TFjh0YAKLTj2/kAZP/6FwhYMGLDqlMuOAztxu5ciP15Hj+sGNhg4lL5/evzdjTJeEkHocRJCXejXByH+/dedUwzAcAkXFCVIWRx2ABKDCA8mpMEMEshyRwEfIFhUQpNUwUeHBszxx4svlgEEDgZcpZADuUxBCCFVdPhKGTDCCERHWPUxy45I9vFgArLoIYoEMjTxIgkKVYHkji/YQQoEB6YmhCBlRFLiB5Vogd8aGKSx4ywXwGGAC6GkUgQIJSJUCQJqCCJIIbrUiZAHAhSDkANaIWQHKKmkUsgDSGgwSRGeLJFCIHoKggUIfxWzxUQJVWJIop+4gsYnn5DiCSOM9GJHIpXKcEl+pLuwlVABUSSqigIFcEIqLD6gagEXmvhQKYcGEMQRQigkmkoEIFhCKiMLPIBqIJgmMIQgZJxUR0NtXJVEoplgGgupg4BwCSqoppBQSB4k8JAwXaSRgw4FINQBqTeUSAOqMvjpgRkltYHBB34CQWoDCLEwrZ/ullRMABIllASp6iLkgxOyfKDftg4PdJAHBqQhii5d/mlArB07dABCA5fgsk2BlhQQACH5BAEFANQALAAAAAAgACAAhwAAADhwqCp+vi5yuDR4sjR2sjJ+sjp0sDJ4tjR4tGCUwDB0sHakzIKs0D6AumqcxnikzIau0k6KvIKu0pC01oSs0DJ4tDB2tDB4tFaOvjJ2tjB2tjJ2tDJ2sjB2sjJ0tjJ0sFqQwpC22FqSxJK21F6SwJi41lyUxF6Uwpi62pi82py+3GqcyJ6+2G6eyqDA2nCeyG6gzKDA3HCgyqDC3nCgzKLC3nKgynSizKTE3nSkzHimzqbE3nqmyqjE3nqmznymzn6o0KjG3nyq0KjG4KrG4ICs0qrI4LDK4oyw0pC21pa42Ji62J6+3LjQ5LTM4oiy1LjQ5jR8tmKWxnSkzkSEvGicynimzIaw1FCKvliQwFqSwlySxJK21myeyp6+2m6gynKizrLM4oqw1Ja62LbQ5oqy1LzS5jB4tjB2uDZ+tjB4uD5+tjJ4uMba6jJ2ujB8ujZ6uDp8uDx+uD5+uD6AuD5+vkaEvEiEvEqIvEyIvEqGvlKMwEqIvlSMwEyIvlSOwlSOwFiQxFiQwmaayMja6miayNTi8HikzsLW6NTi7tbi7jZ4skaEuk6KvlaOwDZ6tkqGulCMvjp8tkJ+tlaMvoiw1ODq9DZ6tJa41jh6tjx8tDh8tjx+tmCWxGKYyIaw0mSYxmKYxubu9F6UxNzo8u70+GKUwk6IvrzS6NDg7tjk8Ory+Ojw9vT4+vz8/mqcykiEusDW6GKWxGaYxl6Uxvj6/GycyGCUxGCWxmSWxGKWwmSWwkKCuGSYxECAusrc6lCIvGaYxFiOwFCKvFSKvHqkzL7S5jJ6tjZ4tEiEuDh6tESEukKCukKAuDR6tECCumSayDR6tjR4tgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AKkJHEhQTRsECBMmVEOwocOBUhBcUEgRARoEcB4+NGCxIsIsf+JQDKBxYAKFf2rASohHhIgYFNGsKYnsYsIdEyZUQTjCpYuKGjA9TGAz4aecUxCycEkKYQIcNURqmElwgAYEkBwkrJJzSAILP1z+QZBgxooVOhKSHGiUyghpZHFO6GPBjMs5FlCcXRFKIcSLVagIJiTyRE5DbFxCsZBl7w6KVBMmICWYipc5bHIa0eNyR68UZ7FAqkjtjUILfCrXaObCyJQEJ2rksXRWxByEBADxQbDhwEGKeCrHkCZSoYsVKqoQiMSAxhEiWhPGcVAcwa8YVAB5RPBIwq0UR8L+hw+hEJAVK58EZbnT7A7c7QzEh29yo7gFBFPO6z/PaTtCUuHlEAQfJyGkAQYI7FHLfudV51ECLoSACVAIJiRHFY4MkoV/CTWgxA6zRELAfQgcSJEFmwCxBCMcOhDFizDa8NNVCRHwwBOuvPIKBBz2AuOPNnSEABsvtKLjkV+QWFECUxDjCQQiEPEiFgpBcKSOiyTBCwwFntaAG04Ec58FkziiCUJqoHGHLa+M0kIxC2jRiilMdKDQJAQ44YYbiZzCgUIbCEANQrMIA8J9jZRiiimJ+MJDBcmkoIoQGaSypxvG2JmQQHBMlNAkwCx6SSROXHJJCaocckgsjSBxaRetJ2GADFuSPbEoKwoQsIqplMigagNkvnCpHwgRxBFCFCxqSg8c4GHqISDQouoxdiYwhhspnGRHQ2tc5cOiJiyAAC2mPtEBJIWomkFCeiSgQQIPYaKBJl+8QABCEZhqwn1dqEqCkhqkUdIaaFjwJ0I8mMojAlqoesbBZJUkUAASJZTwJesiJEMRnliA4LYSD7QGbwjI4UkoXSK0AQKzhuzQAQihwcEHGmhgk6AlBQQAIfkEAQUAzgAsAAAAACAAIACHAAAAOHCoKn6+LnK4NHiyNHayMn6yOnSwMni2NHi0XpLAMHSwbp7IdqLKeqjQQIK6ZJrIbp7KeKbQfKjOgqzQToq+hK7UMHi4Mna0hq7SiLDSMni0MHi0iLDUirLUMna2MHa2MHa0MnayMHayMnawWJDAkLTWMnS2MnSwWpLCkrbUXJLCkrbWXJLElLbWlLjWlLjYlLramrrWmrzaaJrEnLzYaJzInLzaaJzKnL7capzIoMDcapzKbJzIbJ7KcqLMoMLeosDcdKLKosLcdKLMosLepMLcsMrggKrOgqzSjLLUkLbYmrrarsrgsMzigKrSgKzQsMrisszissriNnq2ZJjIbJ7MeKbORIS8cKDMfqjOVIy+VpDCWpLElrraaJrIrsjgjrTUmLzarsrivtTouNDkwtboMHy6MHi2Mna6MHa4Nn62Mni4Ony4On64PH64Pn64QIC4Pn66PoC6Pn6+TIi8SIa+Vo6+zNzsSoi+TorATIi+TIrAUIzAUozAVo7AVI7CWJLEVo7Cts7kcKLMuNDmyNrs0ODs2ObwtM7kvNLm1OLw3uryeKTMqMbgdqTMNHq0eKLKRoS6Uoy+XJDAOHq2SIa8PHy2Nnq4Toq8Nni0mLrYOny0OHy2Ony25u72YJbEUoq6PH62QH62YpbCYJTCXpTCdKTO4uz07PL49Pj6cKDKbqDKxNjo0ODu4Or08Pb6ZprISIS6QoK6aJrGRoS8Soa8YpjGYJbGXJTGXJTESoa4YpbEXpTEToa6QoC4ZJbCYpTCXpTGZJjEYJTERIK6Mnq2NHy2NHq2cqLKRoK4RoS4eqTMNHi2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACP4AnQkcSHANGwQIEyZcQ7Chw4HHEIRQSBHBBQRnHj40YLEiwgp5qFAMoHFgAoV5bEBIWKtDBx4UL1woaexiwh8OHGBByMWljYofID1MYDNhr5wtEMZymQJhgiw+RH6YSXDABwRU5CTEkvPUSSIu8yDA0CNGjCwJSQ5MmMsKF6c4HdjBYMFlGwQrzMbApRDixQdWAgsTySVnlTcuk2CoA8Psj5gCEyLrEtgKBDdwcjqw5PLHLBNmn5yk6CwNxQqVcTywISHXZB52KJj18MapnwoIQBw4SLEWj8A4sFK0EWNJMQKWfswoAqR2wqwiEcLBYaWPRwS3bSwpwp3724RcIP5AwMVFD5Y5WJBdR/CjO3cvEaJvQCBMvH3xndYjSME9x5UKoyHwAQcI2JHLfeJhoh8BNpSgCVAEJtQGFnpwgZt+CEzgwSOgyEIABggNSBEGnDDzwoPrweHEiitGkYMOAiqUAA1HpKKKKkLo90AULLKYQ0cIvHEDKjcWOQOIHiUASgUrEOHBDismoVADRd54iAakMBCgQhOQ4YQv82FQSR2VILTGBZLAogojMoSywB2ofPKCCAp1QoAUZJBRSClIIgSCAM4gxAswBYAoySKffKIIKTsgQQALhgSxRSJ5ktEAnQkJdMZECV3SSqKI7CIFIoisYAgeeEgiiSOVKnESB6TGrJVQAk0kiooCBLhC6igzoIrEBm/MUKkfCBHEEUJKJPpJJBhYQioeJPCCahl0JpABGSycREdDF1w1RKIuLIDAMKQegQEVZqC6RUJ1JPBBAg9B8kElM9RAAEIUkKoCiGGgqkSfU5UkEwZ97kBqAzxN2ye8JTkTgEQJBUHqugjNYASfBG7b8EAXgYBAJaaAsmVuCMS6sUMHIIQGBid8MBVCgJYUEAAh+QQBBQDFACwAAAAAIAAgAIcAAAA4cKgqfr4ucrg0eLI0drIyfrI6dLA6erIyeLY0eLRcksIwdLA0drByoMiAqtJAgLpkmshyosyErNCArNBQir6IsNIyeLQydrIweLSIsNSIstSKsNIydrowdrYydrQwdrQwdrIydrBUjsKKstSMstQydLaMtNaOtNRYkMKUuNZYkMRakMBYksRaksJcksCUuNiWuNaWuNiWutqYuNaYutiYvNqavNpmmsaavNxsnMacvNhsnsqmxOBunspuoMpwoMpwoMx0osh6ps6oxN58qM6oxuB8qNCqxt5+qM60zOKIrtKQtNSevtqsyOC2zuQ0fLZelsZyospGhLyErtRSjL5WkMKOtNZqnMhqnsqcvNp4psx6qM6qxuCQtNagwNquyuC60uYweLYydraSttjC2OoyeLgwfLowdrg6fLg8frhAgLg+gLo+fr5KhrxOiLxKiL5UjL6iwt5MiL5QjMBOiL5SjMBSjsBUjsDE2OrQ4O5kmMZimMhqnMqwyuJkmMiwzOJ6psx4ps4weLjA1OjO3uzS4O7e6PI0eLZyoMpGgrhSirxWjsI2erZIhrw2frZ0oMg4erQ4erY8frY6erY6fLbk7PRclMSErtJSirpimMZAfrbY5vDs8vhglsZelMK+1ObI2urY5PDo8Pbk7vba5vL0+Pz4+vxeksJ4pMzA1Obc6PJ0osr2+vxmmshsnshGhLpIhLhglMJelMZIhLpglMRMhrpCgrpilsJilsRmmMS80uTW4u4yerY2eLRGgrqGrtJEgrg0erZEhLo0erQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gCLCRxI8JGZBAgTJnxEsKHDgVASgFBIMYGYBGcePjRgsSJCOI4aUQygcaAChVMiREk45cGDCBTFmCnZ62JCHhIkQEBox+WeimOIPVRgM2GKnCkQanJpBaECHq5EjplJcMCYBMLUJLyVkweiBD9cOkpwAceJEzwSkhyIENGKCHQSZsk55cIRl2kSpDh74pJCiBchRBjcQuSInJfUuBxywQ1fHxSpKhwxWGUaNTkltHzAY42Gs0NEUizWgSKcynwg8JGwApGVCFOKnKWSN4GCCnUSeDhwkOIt1IhEJ4xwYsMtAo58kMlhQ2tCNZ/WYLiQQA2fCHM8JqjgZg+JHODB/o9QqOTUKUuEdmypslN7Ah7hwXvBIvrChUPm85uH5V4v+BkS1HESQmNkcAEHvJii3ylr9KfAHngIl1CBZDHQwCJC0LDLF9T1twUwQCwACwEdUqgQBggIgQIB/alhxIsv9gADDglclZACOCBBSiedSNAfBD3ACCMMHVVXQyk8JqlChxUpsMAbCwBBxQ0vHqGQBEnyGMoEsugwIEVDPGGELR1K4oZoj4gxxSidcBLDIgzEwckhTGCgUCQKdPHEE4B8wqRuAhSD0Ce4FECdIoUccsgTstxQBAElEHJDFU7s+YQDLCYk0BkTJUQJKIoaEgsSeujBAiFllKGIInJYasFJpRn0wtaNRCi6ygIEhFLqJjKkylgaMFhaAUIEcYSQBYoewgoGsJSaBwa1pOqHnQpQ8MQVJ7XRkBlXNaEoEwwkkEupRGDQSBipVpHQmR4o8BAxY0iiggyZJlFqCdRZkKoFTHqARklmXMTkDaU6gFAcqYLBpLslFROARAlpUaq6CMnQxAIXZJCAtg0PdJAHCUiywCdfIgSyrB07dABCYnxgwss2BVpSQAAh+QQBBQDMACwAAAAAIAAgAIcAAAA4cKgqfr4ucrg0eLI0drIyfrI6dLA2eLIyeLY0eLReksIwdLA0drB4ps5EgrhsnsiErtR+qtCIsNJSir4weLYwdrSGrtCMstQweLQydrYwdrYydrQydrIwdrIydrBYkMIydLYydLCOtNaQttZckMCStNRcksSSuNheksCUttRclMSYutiYutqavNqcvNpynsaewNx0osygwNygwN6iwNx2osqoxN50pMx0pM54psysxt6ErtKsyOKwyuCIsNSSttaWuNikwtyoxuC60OS2zuKKstK60uY0fLZkmMZ6ps5IhrxqnMqAqtJYkMBakMJcksKUttZunspyos6iwtyyzOKWutimwt640Oa40OSKstS+1OaMstIwfLoyeLQwdrgyeLjI2uwydro8frhAgLhCgLg+gLpAgLpCgro+fr5QirxKiL5OiL5Oir5Qir5OisBSjsJQisBYkMRYksSkxN5UjsJomshwoMrK3OxqnMhonMpyoszW5PAweLh8qNCwyuKCrNLG2OrQ4O7c6PKErNI0eLZGgrhSjMBakMA6fLZKhrw6fLg2erbk7PRakL44erLG2uo4erTI2upglsZmmshonMg+frY8fLhSjL5kmMhAfrbU4u5glMSCrNCCqtDU4vDW4u5elMTq8PZunsh0oMZyoMhGgrpimMZomsZglsRglMLA1ujQ4Ozg7PTw9vpGhLxklsRIhLjg6vLu9PjC1uj4+vxwnshynshkmMRKhLrs8vj+/v5elMZmmMRQiLpEgrrO3uxWjsAyerY2frY2eLREhLw8fLZEhLo0erQ0erY4erY4fLYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gCZCRxIcBiYBAgTJhxGsKHDgUgSWFBIMUGFBF0ePjRgsSLCJa8YUQygcaAChcVWzEmIxoGDSRQrgCkpjGImJkzMIIzjEiZFDcgenqRYBycchCdcHk2gIEkSkRpmEhyAMNGToWdwUiqUQI/LVwk4JIkQIUlCkgMRKgi0awcxhDeZoOGQw+WiBMHIRgChEOLFJLsCSyKT4A1OOYlc5kiwRC8TilITIigSeFcrNWNwMinm0g6ZJmRliKTITIzCDyoqu+p1gkmdQnAmvcJBVsLdBATYrEmw4cBBhQxI1QosqsDQhJMiACrT4YEdDChQjFE4ZgGZDhw6OBK1iwUHj22W/qSKEL38UoQ+XLkaRISFjRK2jlesVD76D0qjM3Dgo76/q1mGeJRQHdGNIMUax2mg3wWCzOKfK4QJyNQkh4ymkIJhdVCALzCoUMQL30mYgAxNQACCKQSEqMFFCnHwSCkYICDiGDTUWGMMI5ilgUIEwHLFII00IoWIZMRgo40jdJTAGFFsEuSTJEioAAiKgACBBCjU6IBCdzwZJC2dLGCHfAnJ0MMMuXhR1RqjDVOBKa00IogJajCAiSB8YBBiVQTU0EMPQ5SwJ28CMIPQApwU8N0DYfDBxx8LsOAAAT8cYQUFdPzZgxQE9MVMFxMllAgWjuIRixBhhAHCEaw+8IsLrJoCclIGwqSVkAI1OPoJIgWskqomJLBqgxeJYKBpGwgRxBFCPDjKRykcmJLqFh2EwuoNHTClRA8/nJRGQ2Ds2IKjGGTLSapCcMBIFaxSgFAhSzCigQIPIaMBIyQAUQBCSqQ6wXc8sArIhV+UBMZFewaR6pAJHMLqEHvSWxIzAUiUkMJhuIsQCSw8kUAGCXw78UAHbZCAMk8sQKbJtY7s0AEIVcCBBjSzWGhJAQEAIfkEAQUAxgAsAAAAACAAIACHAAAAOHCoKn6+LnK4Mn6yNHayMni2OnSwNniyMnq2XJDAMHSwNHawcqDIfKrQQIC6ZprGdKLMfqrQfqjOhq7QToi8MHi2MHa0hrDShrDUiLDSMHi0Vo6+iLDUirLUMHa2Mna0MnayMHayMnawirLWjLLUMnS2MnSwkLTWVpDAkLbWWJDAkrbWWJDCWpC+WpDAWpDCWJLElLbWWpLClLjWlLjYmLrYmLramLzamrzaaprGoL7abJ7Kbp7Gbp7Ibp7KcJ7GcKDKosLefKjOpMTepsTcsMrifKjQgqzQhq7SjLLWnLzaoMDcqsbgsszkgqzShKzQsMzits7kjrLSkLTUNnq2YJbGcKDMQoK8ZJrIdqTOgKzShK7UTIrAMHy6Mni0WI7AMna2bJ7IeqjQqsbenL7csMrgwNbovNLkNn62MHa4wtboMni4Mna6Ony4PHy4PH64Pn64QIC4PoC6SIa8Pn6+nsDcwNToTIi+UIzAVI7CUozAzt7sZJjGZJjIaJrIttDmytrqzt7uuNDmMHi4eKbQ1uTw3OjyNHi0cqDKRIK6UIi6WI6+OHy2RoS8TorAPn62OHy4Soa8NHi2Nni0Onq0yNzs4uz0zNzsOny22uby6PD2YpbEYpjGYpjI5u727vT4WpLEgKrQToq8XpLCXJLCXJLAdKTOyNrq2ubw9vj8bJzIRoK4ZpjEXJLEapzIToi6SIS6XpTERIK4XpTGXJTEQoK6QIK6ZJbEeqbOVo7AdqTMUIy+UIq+Toq+Uoq8NHy2NHq0NHq2RoS6QoK4OHq2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACP4AjQkcSDANGwMIEyZMQ7Chw4HADFxQSNGABQNeHj4kYLEiQkdYqlAMoHEgIoVYYuhJiOXKlVAULbApmeBiQitZssxBiMclTIphgj1EZDNhnpx5ELZw+QghIiuyRIaZSXBAGANuVnxBGCenJ4SdXGIxAMKKAwdWEpIciLDKGVVFKCHEmQULCB4u3RjIc9bByoQQL3JSRXgNJANdcurJ5JKHATp9+1CkmpCSGcKqNFVwk7OuSytxxpzlIZKisTYKR1DBvAlXiyx5JuUJpejHWS16DSDCQ8fAhwMHFS4AAorwpQInFYZyMOZBCEUQuJAgkRshnFJxQIAI4eKSKhogPP52cSTLwfTzSRM22bTJkBQZDRT4SO6xz/npT6yU3gCCD/v/7CniUUJ7TJfBK70lFAZ/SATyCYCbyDFgW67wQp+CG5AVAgOLAIGCETaEN6EBPxzxRwqKFCBiGEUhBEIlPWCAwIhw4GCjjTd0kNZVCSHCyQ6GHHKIYxPGccONN3bQkQFvoICJkFCWMGIKkqQAwRhK2BiBQjxAKSQaE5DSylYVBUFEDnSQ2QgdpaVhgSKaHBLIFIuE8IslgmggIkKNIJIDEUQIscKevglgDEIKkMJAeIqcIYggTSigQgSIPOGEChWUASgROhAqkBcTJdSIEY+uwQoTZ5zBgROsKqJIDaybTnDSBgmw1eMSj2KyQgGDpAqJB6wm8oUbGGyKB0IEcYSQKI8K0gMIjZ4BSAgwsCpECAZUoQURT0xiQB0NsXFVDY9SgC0pqS4BQhVNsDoKQpOw+QEiDwUTRhUllFAAQrukSgFCErAqgUIfqFESGxftqUKqOiCUh7V70luSMQFIlBALqVaQkAcsrGBAhuBOPNBBHxjQyAozkJlQybWK7NABCFkAggk022RoSQEBACH5BAEFANEALAAAAAAgACAAhwAAADhwqCp+vi5yuDJ+sjR2tDJ4tjp0sDZ4sjJ6tlqSwjh6sjB0sDR2sHimzIKs0kKAuGicynqmzIKu0k6IvISs0ISu0jB4tjB2tIqw0jB4tFSOwDB2tjJ2tDJ2sjB2sjJ2sIqy1Iyw0jJ0tjJ0sIyy0oyy1Iy01o601FiOvI601liOwJC01FiQwJC22FiQwpK21lqQwFqQwpi62pq82py+3GqcxqLA3G6cxm6eynCeyHKgynCizKjG4HKiynKizHSkzH6q0KrG4IKs0KrI4KzG3rjQ5Iau0oqw1Ja62Jq61qjE3K7K4rjQ5oiw0jZ6tmSYxnSkzkKCvH6qzk6KwDB8ujJ4tFSOwjJ2tlaOwpK42GqcyKTC3G6eyICq0qzI3pi82qTC3rDM4rrQ5jJ4uDB2uDp8uMTY6jJ2ujx+uD5+uECAuD6AukCAuj5+vkiGvEqGvEyGvEqIvlSMwEyIvlKOwqjE3sba6miayMzc7LbO5NTi8DB4uHakznyo0HimzsDW6NLi7trm8H6o0ODq9MTY6DR4tESCuk6IvlaOvliOvqLC3Dh6tkaEvFKMwD5+tjx8uDR4tjR6tjZ4tDZ6tDh6tFyUxGaayGSYyDh8tjp8tlKMvuLs9O70+FySxICq0FySwlqSxHqmzmycxm6exmCWxmSayGCUwF6SwrzS5s7e7sLW6N7o8tzo8uzy+Oju9vT4/Pz8/kiEuvb6/GSWxGKUwESAuESEvF6UxmKYxk6IutLg7kKCuM7e7GCUxGaYxuTs9Hyoztrm8lCIulaOwE6KvlCKvDR8tjh8uEaCuFSMvjR6tEKCumCWxESEukSCuDZ+tgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AKMJHEgQGhkDCBMmhEawocOBxwxgUEjRwAUDVR4+JGARYYcOCm9JeUIxgMaBhhJ22JEnlRWEbCJEuELxApmTCS4iZAAsVixUCN/IpEkRC6WHhnR6/OJzCcIrMukgNGRJAUksNwkOwGKA0YqXBmr57DTJgCWZUgx0UBAliqWEJgcifDKm042yIDj51GHlkkxkBqi0jVJHIcSLvjopTqWmgxKfRhjJxGSg0eBSFLMmnFREcadAFIb5nGVLpqU0PNpGIEkxGhqFHkp4JnTqDiw7BeRcaYOnbQ4zU+G8McDhwEHYOF4pFtSgEsiEL6L8aAyhVJAJD4AnTNOisQEPKVr+dWLxnOKbQwr6TFi/nopCLoQIqWLCQoeiLSkrIizFfr0oS6xp0MEd8RVICCuH6JcQFesFAcVwCWEhYBCrsGIgIWsoOJUCFLCmkIQIedCALjiIIAQM5Sm4BRBQbHCIIc9hoZRHC+BQAQIaGmCGCzzyqIIXb3GVkCG+0KDKHntskaMaKvTYoxcd6RjCGUhW6UQBGm4giyNQ/GABjzkotEWVSOohgQJQqFiDFm+A9cQbrEFzATOB7HFGBhR4YAwgdzyQIiOGaFFDDTRskCIHAkSDkAKgNADSIU3ccQcXK4TggyFB9BACBUkMWsMvWCYkUBUTJcSIEJKmkswMTTSxQQ+vRBDBCzMnePoHSRokIFdCBSQh6RmJFCBGq49YEGuYZjzgKRwIEcQRQn5IeocNHUDaBBMevBArDVg+8UMNQURigBsNkcEVCpJWAJICrc7QwRNhxEoBQpE08gQHhjxECRZPHJFBqD+0+glCosTqgEIclHESGReVF0KrvyCEyLbl5XtSNAFIlJAJrc6LkAUmbGCABuNeTNBBHHSVxQtgJZSyriY7dABCFxQwws06JXpSQAAh+QQBBQDIACwAAAAAIAAgAIcAAAA4cKgqfr4ucrg0eLI0drQyfrI6dLA2eLIyeLYyerZakMAwdLA0drBwnsh+qtBAgrpmmsZ6qNCGsNSGrtKIsNRQir4weLYwdrSIrtAweLSKsNKIrtIydrYwdrYydrQydrIwdrIydrBWjr6OtNYydLYydLBWjsCSttZYjr5YjsBWkMJYkMBYkMJYkMRYksSSuNiUuNiUutqWuNagwN5snsxunshuoMqiwtyiwt6kwtyqxuB+qM5+qs6uyuKwzOKMstaQttacvtqiwNqmxN60zOK60ua0zuS+1OYyeLhimMh4ps6ErNBEhLxomshSjMCMstRUjsKcvNpunsqmxNx8qNCOstSevtqoxOCwzOS80ua2zuS+1OgwfLoyeLQwdrg4fLgydro+frhAgLhCgLg+gLrA1ug+fr5KhrxMhrxKhr6evtxKiL5MiL5OisBUjsDK3OxSjsJkmshqnsqCrNCErtLM3OxsnsrS4u4weLh6ps660OZ8ps56qM54ptB2pMzY5vDG2urW5PDa5vB0osxyosymwtzm7vY0eLREgrpWjLyWuNg4erZIhrxUjMA8frjK3Oo2eLQ2erZelMKKsNRkmsY4erRSir46fLY6erQ+fLZaksR0pM5cksJeksA+frbg6vLs8vj0+PrC1ujU5PDc6PLu9PjG2OpmmshsnMRGhLxqnMhGgrpilsRelMRglMBeksJqmsZomsZglsZGhLpMhrpCgrpCgrjU4u5UjL5QjMB2ps5kmMRSjL5OiLpCgrw2frY6fLjc5vA0erY0fLY0erRqnMpsnMYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gCRCRxIEFiSBAgTJgRGsKHDgcQSYFBIMcGFBF0ePjRgEeGHDwqbQJBEMYDGgYgSfnAQaIsXhGXkyFlB8UKSkwouImRQSpSoTggbyYxSsUOxh4h0eiTiEwfCJzLZJFyxYliCDjcJDuiQgNGJhK98HoqUYJNMCAhX1KhBE6HJgQgRHTkkhECCBj1F2fCiRCaYBGzW1nCjEOLFSYcSb/n0YYbPIoxkKklgS/ALilkTIiCS+BCcNL58mkok08WjOWuVkKSILIxCEBk6D/I0KpSOAmyijFGy1snfBIgaNUng4cDB16lAJcZDgBHIhE/WivkAYRMnCRJ+I3zEYnqCDyNw/h2C8pyiqkQrbmBfr0bhFUCAAu3YYCOFk5QVEW5aj71Qi9UafGAGfATCl0h+CbWB3RKuDJdQBwHyYYQgBQIiBoJxnYAGfgpB6FEDtcTCAREkYJhQBDfMYoEtHHaglEeZxPKAXRgGU8GNN04gQQtXKYTIJIsEYocdEZgoxgQ44ihBRwlgMgESQ0ZZh4lPqGKBKzc8cKMTCjkR5ZA+/DFCKwg6IQMQtCQERhO/AXMBBHDYoQUFtYBggRFcPFBeAmAgAoQMMsDwxJ4eCIAMQiosAAJIZGTBBRdrnDDBDYhIQEMdaJAAqAyt7ClQFxMlxAgOjx7BCgo//HAJDTnkQAYEpxNsSkhKGigAV0JeoPCoFiMQsEOqmjzQ6ipdSbApGggRxBFCSzzKhSwfkJEqFgSc0GoMdiEyhQxLIHRGQ0lwRcmjeibQQqoofICIEK0ii1ATknSAyEPFdCAJHUzQeEOqeiD0R6t/dPjFSUlcVN4EqfKCUBvXljfvScgEIFFCCP+QRkIPTPBEAhok8C3EAx3kAZ9vfEXRyLaC7NABCF1QQAcw62ToSQEBACH5BAEFAM8ALAAAAAAgACAAhwAAADhwqCp+vi5yuDR4sjR2sjJ+sjp0sDJ4tjR4tFyQwDJ0rnKizICqzkCAumSayHakzICq0oCq0ICs0E6Kvoas0DB4tjB2tIaw1Iiw0jB4tIqw1DJ2tjB2tjJ2tDJ2sjB2slSMwIqy1Iqy1oyy1DJ0tjJ0sDB0sFaOvoyy1oy01o6y1FaOwpi82liOwFaQwlqQwlqSwpq83GiaxJ6+2mqcxqLA2mqcyGqcymyeyGyeym6eym6gynCgyHCgynCizKjE3HKiynqmzn6qzqjE3qjG4KrG4ISszoau0pi62Jq82qDA3KLC3LLM4rLK4rTM4oSs0ISu0jR8tmaYxnSizH6q0kSEvHSkzoKs0lCKwISu1FSOwlaOwJC01mqaxqDA2micyK7K4KDA3qLC3rLM5LTO5LbO5DB8ujJ4tDB2uLrQ5Dp8tjZ+tjx+tj5+tjJ4uDJ2ujh8uDp8uDx+uD5+uD6AuECAuD5+vsLY6kqGvEqIvlCMwEyIvlKMwMTY6M7e7mSYyGiayGicynSkzMDU6Mzc7NDg7n6q0DB4uHakztLi7qzI4N7o8sDW6JS42DR4tkaCuFSMvFSOwDZ6tkiEvFSMvjx8tk6IvDh6tJy+3Dh6tsze7JK01Dp6tt7q8uzy+F6UxGKYyGiYxtjk8Orw9u70+FqSxL7U6Mzc6tbk8Obu9vj6/FySwl6SwHqmzHikzGqaxGaWwmCUwl6SwkqGukaGvGCWxmSYxEKCukiGvGCWxEKCuMja6kyGumSYxmaYxFCKvk6KvNTi7kiEtkSCuFCMvlKKvjJ6trrS5jZ4skSCujh8tkSEujR6tjR6tAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AJ8JHEiQzRsECBMmZEOwocOBUhBcUEgRgQUEZx4+NGARoQcPCQn0qLGGYgCNAxMk9JCjUROVCGStWvWEooU3KI9dRPgh1adPMBBWmNmkIgdnDxPs9GjjJw0EHoDMXJGwz55mCDjgJDiAA4I1IRK2+ukp2YdCM2sgzPLgQZ+EJwciTBCGURKVJnx+qrGg1ExICHK1faBHIcSLrBgpbuLGA6efYYbN/ETAwWAWFLcmTGZDMSM/eXr9VBVrJq81g009qvgMjsIPFTwrUoBM1ZJkJJqIMtXWVpy5VnAh6HDg4OsZoxQXIoAJJFQPFNrOQeDghQ4GDH4nXMOiDUgPkQr+McpQEaEVB3twYF9fS6ESQ4YIMclQA8UUmOVfrMeOY8skhBp4oAZ8BBryh3DlIZQHdjzEgCBCHAT4yhN/FGgIHQki9EgWueCXUIQeEdDLDFAssUGGCdlygykUOIAfB0t5hMkUQhCA4hoR5KjjFZh5lVACrHRxCh54+ILiHDomeUVHCMgRhRlERikBihRYQYEpYCSS4wMKPRAlkUQE4QIoCT6gAgZWJDQJLv8hwIYFDhBZRgO0fHAJGWYI4RxCcSSAgQoqjJDFnsMJ8AxCXLhQAEgOGGGGGS2EMMENCVzRggR5/AkoKIQKdMZE22Xy6CLEkFBEERS0IIMMdjgQAaCoKuywmgbHyPUjCY+WYQwBY5zahhCrTvFVIrC2hwBBHCFExaNmTOGBA6eKQcAWq6qgUgJgqMAAQnc09IZXSDyqJwIsnCqCB5M4smoeCbHJQQIPOcPBJBI0YCMCN5wKAUIMrOqDQhykgdIbF+0Zwam6IKTHqinsCS9KzwQgUUJYnMouQkJEsAcCGiDQLcQDHdQBAnHsERZFI9cKskMHIGSBBxzEvJOhKAUEACH5BAEFANIALAAAAAAgACAAhwAAADhwqCp+vi5yuDJ+sjR2sjJ4tjp0sDR4sjJ6tmCUwjJ0rjR2sHimzkCAumqcyoKs0nqmzoau0k6KvoSu1Iyy0jB4tjJ4sjB4tDJ2tjJ2tDB2tDJ2sjB2sjJ2sFSMvpC21jJ0tjJ0sFiQwJC22FiQwpK42FqQwFqQwlySwJS21lySwlySxF6Swl6Uwpq82py82G6eyJy82p6+2m6eyqDA3nCgyqLA3HCgzHKiyqjG3nSiynSizHakzHamzoCqzqrE3ICq0KrG3oKszqzG3oKs0KzI4KzI4q7I4Iiuzoyy1pi62KTC3qjG4LTM5LDK4Iiw0rjO4oqw0pC01DZ6tmaYxnim0ESEvISu0nyozoau1FKMvoqy1DB8ujJ4tDB2uDB2tlSOwFaQwpa62Gyeym6gyqTC3H6q0K7K4oaw1Ji62qjE3rbO5LjQ5LjQ5jJ4uDh8uDJ2urrQ5j6AuECAuD5+vkqIvLrS5r7S5kyIvlCMwMba6k6IvlSOwlKMwGicysja7Mrc7Nbk8DB4uHyo0MTY6tDg7t7o8n6q0q7I4jR4tEKCulKKvFaOvjh6tkiGvDZ+tj5+uEyGvDR4tjZ4tOTs9Dx8tjh6tMbY6Dh8tjp8tmCWxpS42GSayKLC3mSYyNLg7tbi7mKWxGCWxFCKvFCKul6UxHyq0ESCuOju9nqozkSEukaCuMTY6M7e7N7q8vD2+kqIvmSWxGiayGSWwl6UxkiEuOjw9vT2+v7+/kyGukqEuvz+/kaEvEqGumKYxmKWxmSYxGaYxGiYxEKAuPb4/ECCumqcyH6ozsDU5liOvlCKvjR8tjR6tDZ6tGaaxkaGvDR6tgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AKUJHEgQ0hsDCBMmhESwocOBzAxsUEjRgAUDXR4+JGCxooECMapoohhA40BFCTUck2MkYQtYsJ5UfGMywUWEHAxVqjQC4RCYRFJqQNjsoaKbCDXA2PnCwAUzMKUgRPBEhyOENAkOyGDA0ZaEKXYKosQBE8wqBjwAyZVLJsKSAxFS0SFIBcoCrnYOW5AKJisOSdjmAqEQ4kUUghILseSlwk4dtmBW8jBMcBQECrMmpCQjsSA8u3TtfCULZjJGuNiCukpRWhyFHH54DnSCzaEXl6AgkSWI7S1UCL1cWWTgy4GDCjUIM5S4UAHWBjRwuJGrmDINc/x0evCAikJNYSz+XXDKaI8gCR4R7FAwYRP391cUjgEEqM2MIsI+iELp0Yue99x1ood3BmCggRP0JQjIHsR5hNAj3P0hRoMIZWAgD2jsoSAgcziI0CQT9EKgQhYmVYAuVQTxAnoeIsRCJyXk4QB/BmSAVHCOyNIDjR7B0cCPQJKhR40KUVGCEmzccccvLVoC5JNkdGQAHGegoeSVWXgI4iJ2lPAJDj9uotAmVyp5gw0frODgJhScQSEVixAIiQUOuHGHEVn4woEkTRzRw1AJUaEIIhRQAMEEFH0hgDQIfdBIAQjR4ckRR4CwRRZVKEIDCQ30EkShFKAAKEICdTFRQo6MQSkTqEhQQw2sE5Bgggl0zGEFqLOghEECcSXkhQSUHkGKBi+8agkPs4oypQ2gxmcAQRwhZEOwomjgwKtqaODHrFoMpcgnFERpQB0NvcFVEJT2MF4Yr0qgARVKzPpIQotMkoEiDzWTARUNRMDfLK/mgBAZs4pb4RcmvXHRqIS86sKDs6ahEL4mSROARAk1XMO8CPEQAaIYjFsxQQd9YQAVevhRkcm8juzQAQhZoEEGNN+0qEkBAQAh+QQBBQDIACwAAAAAIAAgAIcAAAA4cKgqfr4ucrg0eLI0drAyfrI6dLA2eLIyeLY0eLRelMIydK5yoMp8ps4+gLpkmshyosp+qMx8qMx8qtB+qM5+qtCCqtBOiL6GrtIweLYwdrSIrtAweLRSjMCIstSKstQydrYydrQydrIwdrIydrCKstaMstQydLYydLBYjr6UuNhakL5YksRaksJaksRcksBcksKWuNiYutiYvNqcvNpomsakwtxqnMpsnMhunspuoMxwoMp2pMykwt52pM6kxN54pMymxN54ps6oxuCqxt6AqtCEqs6QttagvtqoxN6syOCArNCErtKuyuCuyuKwzOKwzOSyzOI2erZkmMhwoMx6qNBEhLx0osxQir5WjsCOtNZWkMJYkMKavNxmmsiQttiiwt6oxOCyzOS0zOK+1OgwfLoyeLQwdrgwdra+0ubA1ugyeLiUuNY4fLgydro8frg+frg+gLg+fr5GhrxKhrxKhr5SjL6+1OZMiL5MisDA1OZSjsLE2OhQisBUjsLO3u5onMq60ubI2urQ4O640OR0pMwweLjc6PJ4ptA0eLZCgLhQiLpWjL5YkMA4erZIhLo2frY6fLhIhrxOisCQtNaevto2eLQ4erQ8frbM3Oo6fLacvtzg6vLO3uw8fLZglsTW5PDo8Pbs8vhilsJclMRilMJOir5yosxEgrpIgrjG2Or2+Pz0+PpglsZelMRGhLpIhLxmlsJklsJKhLhimMZelMZkmMRglMRAgLhUjMBimMhSirxmmMQyerY0fLY0erREgrhCgro4fLY0erZEhLpAgLpAgroAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gCRCRxIMBKbBAgTJoxEsKHDgb8SbFBIMYGGBGYePjRgsWICBTluSaIYQONABQlF2CAjJCEMUaKKUNTAxqSviwhHDEKESAtCCTBbIhQhIkEIYA8V4Bw6g+eKBCKSwMyAkECRG26M1iQ4IESCRx4SsuBJ6NKIPTBvJShxgxUrmQhLDkSowAcgJCgL7ETUi0EnmKlGHHHL6oRCiBe7AFosBM4ZDjxvqIKJaIQswlJQJtya8JKMxYAK1aHFMxQpmIIYjXKr6VFFZG8UjpAAuo8KJ6FkIMhAhJQnt51SJRT2IAGaAwcVipA1aHEZAphSjrDEapQKEXD8uIIAIWtCSR7g/hQVwasMoAseFTRYYKcU9/dXFCJZswbKjAq37oDS7DHLe+6u6KEIQh0ksAR9CK5RRi4eJXTFex48MCBCIRTYABFlJLgGHA0mlMcV/CVU4VAFQEKKAyug1yFCXNjyxyQP8BfCUgid8QgoEYRYkRtV9NjjDl9QYpRCCmiRwRNjjPHKipLs4KOPX3SUgCRDEJHklT10qEgei9DBRyk49NiCQqBcmWQNOdzRRYMvUPDDIglN8cAUCEWiwQNRjCFEEJCMUEcYQKBC0RQK/EABBVbUQREaAiCDkAe6EIDQA14AAQQIWfxABTE4fIDFFVYcSgEXRSUkkBkTJfQIEpZysogRrTTQkMcHJpggxwOoiAoBSh34MpdCTFjqQxYKrBBrJjrUuuQUOIgaXwIEcYQQDpYCsYAID8QKhgiU1GpBUYqAQkGUCczREBteWWFpA0V5EOu3U2RQKywJGaNICAo8BEwIU2DRg2a1xKoDQl/USi6FaJjEBo0J9BCrCwjR4S2RJgkUgEQJ/RDrJAnpYEgeCRRobsUDHYRGAlNgkEVFJ/tKskMHIKRBCDTPiFCjJgUEACH5BAEFAM0ALAAAAAAgACAAhwAAADhwqCp+vi5yuDR4sjR2sjJ+sjp0sDZ4sjJ4tjR4tGCUwjh6sjJ0rjR2sHikyoKs0ECAumicynymzIiw1E6KvoKu0pC22ISs0DB4tjB2tIiw0jB4tDJ2tjJ2tDJ2sjB2slSOwDJ0tjJ0sFiOvliQwpK01FqQwFiSwpS42FqSwlySwlySxF6Swl6Uwpq62F6UxJq82py82mycxpy+2m6eypy+3J6+2nCeyKDA3G6gyqLA3G6gzHCgynCgzHCizKLC3HKiyqTA2nKiznSiynSkzKTC3KTC3qbC3oCozKbE4KjG4IKq0KrG3oCs0qrG4KrI4KzI4LbO5Iqy1JK21pi62KC+2rTM4rjO5DR8tmiaxnSkzkiEvHqmzoiy1FCKvoSu0laOwFqOvpa62myeyp6+3HyozoCs0LDK4JC01JS21rbQ5o601jB8ujJ4tDB2uDB2tjZ+tpK42LjQ5jJ4uDx8uDJ2urzS6Dx+uD5+uECAuD5+uj6Auj5+vkyIvsba6lCMwFaQwlSOwlKMwFKOwGiayMja6tTi8DB4uHqozn6q0sbY6NTi7tjk8Him0K7I4DR4tnikzHakzEaCuFCKvFaOvjZ6tkqGvFKMvjp8tjx+tuDq9Dh6tDh6tjh8tjx8tmCWxoqw1GaayGSayLDK4uTs9F6UxmKUwnimztzm8O70+Ozy+PL2+sDW6M7e7ubu9vz8/mqcykaEvEiEuEiGvGKWxGKWwvj6/EqGukqIvmKYxmSWwk6IukyGvESCuGaYxE6IvEKCus7e7FSKvGaYxurw9kaEukSCujJ6tjZ4tESEvDR6tjR6tAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAj+AJsJHEgwDp0ECBMmjEOwocOBWRJoUEgxQYYEbR4+NGCxYgIFWmplohhA40AFCT0Qe7Qj4YlNm4xQzEDHJLKLCD20OnQoBMIJMFvm9JCgA7OHCnDmTMEzTQIPL2BCQEjASI5ORWsSHNAhgaUKCUnwNGTpAxaYtRJ8sKJKFZKEJQcihETjzxSUBXYeqjWiEUxfHpK0VUVBIcSLYf4ovqHJDQaeNybBPPRh1+AoKBNqTaiAiuI/pIzh4ulqAcwrlEq1XcSpYjM7Cj9E+nyHRBNXVBBAALLgT9tGvp46mPErwZsDBxV6qNVKsRQCrRNqeKHq1bAGYoSsgnXLmMJMgOr+EPVAScofMx4V4DhlIhWs9++JKJwyZ86TFF1qfXGRuaKHHfC9V4oMIyXAQQJH1KfgHGvo4VFCXbzHChq/EJBQBwfWkIMUC86Bx4MIIUDFAwwQpRCGOREwywKRsIEeiAgNgkIFsuDRXwdKJcRJCzX055ElEgQpJCh+FKWQAiFAoAQUULAAYyZCRglKRwlkUkQOTGYZBIiQcBGBLBWUAEqQgijEQpZMpqDFFyU8WMIWPESQkCV7WIJQHBnksQQUORBhzAdcxGBDDRRZooAPW2wxxCUUvSFAMwh9MYiFCeSRgg02gFFBD6AsI4oTNQSDaKIhmIiQQG1MNCcFmI4RQResF1xwiRMWWIAHHmQkugUMKHGAjFwKmYGpDb0oMEWsmcRSqwpeiaJrMKcOxBFChQy7ggd5xDqFB37U6ghRkKiwxZQJ9NEQHV0VgWkNRFUQKyoeWKJIrbIkFAEkHSjwEDMdWNJDD5nBEGshCOlSqy4nvmESHTkm4EOsbSYgi7dHmiRQABIl9EOs9SIUiw6MHmiuxQMd9IZXfoDVaAK/kuzQAQhl0MHMOCL0qEkBAQAh+QQBBQDMACwAAAAAIAAgAIcAAAA4cKgqfr4ucrgyfrI0drIyeLY6dLA0eLI0eLReksA4erIydLA0drBunsp2pMx8psxAgLpkmshwoMp6qM56qNB+qM6ErtJQirwweLgydrSGrtKIsNQyeLQweLSKsNQydrYwdrYwdrQydrIwdrJYkMCOtNQydLaQtNRYksSSuNhcksKUuNZcksSUuNiUutqWuNaavNpqmsacvNhonMqcvNpqnMievthqnMpsnMhsnsqevtqevtyewNygwNx0osqgwt6iwt50pM6kwt6uyuKAqs6ErtSMstSOtNaautiqxuCwyuKCrNKwzOKyzOKMsta+1OiOstI2erZkmMhsnsx4pMxEhLxwoMx+qs5OisAwfLoweLYydrowdrhWkMJaksSWuthonMh0pMyqxN6YutquyuC60ubA1Og6fLY2frYyeLg4fLg8fLg6frg8frg+frhAfrg+fr5Ihr5MiL7M3OxOiL5Oir5MisBUjMBUjsBSjsJYkMJakMK40ObI2urQ4O54ps5yoszY5vC0zuR+qtB4ptA0eLZGgrhYjrxaksKoxN44erZGhrxQisBKhr5uoMo0erY2eLSYutjc6PI4eLQ4fLY4erTm7vaoxuBglsRSirzU4u7k7vbq8PZilsJQir5clMRelMJglMD0+PpKiLzA1ujS4O7e6vLw9vrG2upyosp2ospGhLpKhrxIhLhomshmmshGhLxIhrpOiLpCgrpmmMZkmMZglsZclMZilMJCgrhilsRimMZelMZAgrpglMTk7PRSjMDe6PJGgrpWjL5UjL5IhrxSjL5EgroyerY0fLY0erQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAI/gCZCRxIMI0aAwgTJkxDsKHDgcoMiFBI0UAGA1oePiRgsaKBBLUyoaEYQOPABAk12MJUI2EJQYJ2UMyQwWSyiwg1mKFDBw/CKjBnpNRgAMSyhwlw5jTB84gBDSxgFkFYwEeMRUVrEhwAwoCUOQmJ8SyVQIMTmJkMMJhx6ZKPhCUHIpQCBsoGlAx20snE4A9MWhogtL20QSHEi3mgKI6BpkMRnjEOwaTDwNNgJSgTak2Y4IhiKEpYueLpZwVMIrMmtT2DlSIzLgpHPPg8qNgQPyakWOCh4ExbU7SeFpDhyUCIAwcVaghlRjGRAq1zwrh0ShMDRDc4jUJlRSGaLGiI/naYtQQKII8JcogysWmUe/cTFF5o0iSIiQeZMKzIXFHDjvfuncIYQh0YwAN9CDZBBBweJfSAe52M4Ql/IHhggA0xEJFgE2w0iFAkKPywAFEKVZhTAYes8MMHVXiYUCNeZGGFGxRaSBElK+SAgItSSODjj7jIUZRCCQRDQQ9BBLGHi2v86CQuHRmwxgRkJGllfA0aEssbVmThxS0+6qHQF1YmiUQtdfjkkR5U0PBGQlK4IQVCaWTwBhBBkOEAKyOwosILNFAkhSE0UEEFDrFQFIIAzCCUxScFIPTGEy+8QMgcOrQgxS0VhEFLoYZm4RozWkwE5wWVIgGHEBxwIEsFo7C60YYEhlKRgiEGeJCMXAo9UKkLpBhgRKtoSACrF171UmsECBHEEUJTVPpCCQa80SoTGjgC6xUkekFFC7jG0VAGXU1QqQ1EzdGqEB8JAWt3CLkBCQgJPLQMCFLgkENmLbQqAUKgwApKiVo9RBNFOLSaB0JWbEukSQIFIFFCOrSKTEIS0CCkheJCPNBFIXglhyMVhbyrxw4dgBC5ILSME6MmBQQAIfkEAQUAywAsAAAAACAAIACHAAAAOHCoKn6+LnK4Mn6yNHayMni2OnSwOHiyNHi0YJTCMHSwNHiyNnawNHawdKLKgKrSQoK6ZprGeKLKgqzQiLDSUIzAMHi2MHa0MHi0irDSMna2MHa2Mna0MnayMHayMnawirLWjLLWMnS2MnSwWJDAjLTWkLTUWJDClLbWWpDCXJDAWJLEWpLEXJLAXJLCXpTClrjWlrjYlrrYlrramLrYmLramLzamrrYcJ7ImrramrzYmrzamrzcnLzaosLecKLMeqbOpsTgfKbOqMTefKjQqMbggKrQrMjghq7SiLDUkrbWlLjYnL7apMLcts7ksMziuNDkhrDShrDUOHq2ZJjGcqLMRoa8aJzIdqTMhK7SVI7AMHy6Mni0MHa4VpDCkLbWcqDKsMrikLbYoMDcsszivtTovtTmMni4krbYwtjqOny4Mna6On64PH64Pn64QoC4RIC4QoK4Pn66PoC6QIC6Pn6+Soi+osLcUIq+TorAVo7CxNjq0ODuZJrIbp7IbJ7KbqDMeqTMcKDMdqTOMHi4utDkeKbOzt7s1OLuvNLk3ujyNHi2RoK4UozAOHy2Soi8VI7CNn62TIi+2OTw4OryNnq2OHq03OjyOny2PHy2YJbGZJjIUoy+YpjI7PL4XpTGXpTEdKLMSIa81uTwSIS6ytzq6PD24uz09vr8+Pr8bp7KSoa6aprGapzITIi8YpbEYJbETIa6ZprIRIK4Toi+UIq8YpjGQoK8ZpjEyNrqVoy8aJrIVIy+Mnq2NHy2NHq2Vo6+RoS6RoK6Soa8RIK6NHq0Nnq0RoS8RIS8Nni0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACP4AlwkcSFASGgMIEyaURLChw4G/DGBQSNHABQNcHj4kYLGigQRVQlGhGEDjwAQJO2z6ISNhsD59eFC8gMakr4sIO5RRo8YRwgcwZ6REuMHYwwQ4c1bgmcRAhxMwgyAs4EPGyA01CQ7YYIDKpIS9eEZJ0AEJzFAGPMRYtMhHwpIDETJK8wQCSg9QeCrwoAtmhA6C2C6ioBDixS1PEjNx02UIzxRxYPLxoEDwD5QJsyZMUCHxkx+NSvE04wImEVmJ2BoaSXEZG4UFwnhG0qmJGSWWgtRYYYitqQhOC0iAZYDDgYMKO7yAkphIgUsKMZxYRCkPiV04MH06VUzhmklrOv4Y6CLLyJMsHhO0cqGhz6f373MohGDEiI8KVl68UoG5Ygcd8L1HSQqsZWCADfUlaIQQb3iU0APvoeIELP1tYKAETAihoBFuOIgQAxrkgIB4ClmYUwGNqLCKFqJ4OBURZ+wwwS4NLCDeBkklREUJvPTnUSOqBBlkKpRo0AFXm1lACA099ICCi6ykIqSQlHSAExWAjNHklq64GEEeWdSgSCVBQqHQF1s2WQEsd1jgoB5+bNJhBx1o8sIaCElygRs39AAGILR4IEwIJlRBkSXAbOLHosApxIEAyyA0SS2YuaGFCSYcMsosKFjSAhCb0OHJon7c0doyXEyUkCVFYKrEG6+BQADBFUBYYcUaa4BCaiQIZeBLXAoBgakIoxhQhKyPgGLrFgZYwgKpcyBEEEcIbYKpCcy6IWsQHVxhKxYkWuDHF4wYYEdDaHAFCKZViHeHrIAYwEggtjZqQBsGbJDAQ8ZsYMksEmCGgqybIISCrU8mtIEXJqGRowGzyOqTAbh8q9C+Ji0TgEQJRQyBvaB4gowBBp6b8UAHcdDsFcVSpPKvJzt0AEIXbGAzjghBalJAADs=)!important;background-color:#337ab7;border-color:#2e6da4}#toasty .toast.toasty-theme-bootstrap.toasty-type-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MkQyQUI3Q0EzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MkQyQUI3Q0IzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo0QTNBMDVFQjMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo0QTNBMDVFQzMyMkExMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Po9jTrYAAAKTSURBVHja7Jq/SyNBFMfNuSYB0cbCUzmtTvwbbPwb7KPV/Rmnu5tYWR1XX6WFpYL2giBW/igUFCxEuMJeZMXg3Bt4kcmwiftm3kuG5R58mc0G3ptPZnfmzZtUlFIjZbBKWUC+CPqOQA3QLSjDtoH3+U2PiIBqoE2Vb5v4PWtMCYh6HwgTph4yiO5coopZwgnDCVElQJgw1ZBAIgcIEyYKBSRVfpaGAJIoHkuGCZIqXkuHAdIEvTODvKPfgYG0QG9Kxt7QvziIDvKqZO2VCuMCkRE7dQPawZZiGQWGOjtRIf6AZkCT2KZEH1nR2YwCQX2crkDfcpLJY4fHLPEFifBXbDs854c9fG45TBRt7EfkAqJzoNjjhT0CVXL87nn4jHvlZv2y2Nhz5jnH98L0Owo68fQb52XNvql4P3sArVi+F0HXTOlMvR9IjWEkOvYM+mH5XwU9MfmPzZ2mPexcEB3btkB+Mqc1Mfa7C6QhsELvg8aMGL8FYuh+d1VRNgRqG1OgSbyugeYFYmzY5aAFgSAa4iteVw0oTluwQR6FQKrGiEwIxHi0K41roB3mIC+gM9Bf0AxoGTTOHGMdtMtVQBiWfRQuJNcRaeu5jnCv7GbCd++YeDqv7NwwB6DvoGlsDyQgimS/PjA6p1qyfC555loJNfvl2I+c5vxydbzv8ng670fs+hV1h3gJmrX8zOF96g7x03oXtRhH2W+/4Myi349xbLeJo5sVLdoNoopyAfqFbRBVlFLVtcwCQlsIoo3+B1b7bQnVflvqfzU+DBivwx6uE6umJ0RTBXSGmHqMRDBniJ3cLHWACOpU18ylUgJEkOfspfrnQ5GdZtfOLnSQESzM6eLZHaYcd/h5TCJeaf6v9U+AAQAvyHBRYhRQ4wAAAABJRU5ErkJggg==)!important;background-color:#d9534f;border-color:#d43f3a}#toasty .toast.toasty-theme-bootstrap.toasty-type-success{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MkQyQUI3Q0UzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MkQyQUI3Q0YzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRDJBQjdDQzMyMkIxMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoyRDJBQjdDRDMyMkIxMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PvQVuMwAAAORSURBVHja7JpNaBNBFMebNsZacih+FFFsrB4qVIw9lByEWNtCC/VSRS14UjSx1V4UvbUKFaFUD178OniPB28KgsYeFBVqRFDQgx9paE1bNVKKta3N+h94hTWZ3ezOTiYh9MEPwmZ39v2TmTdv3oxL07SyUjDXipBsW0NsA37gAx7gpe9nwQKIg7fgM5gjCi6EOboZNIEDoFPneC5jwh6A++Al+AYWVQtxg3pwBPSBaoc/6Di4Q6I+gL8qhGwBx0EvqJHc1afADXAXJGw9yYTYoBVEtfxblN5l2Tc7InrApKbO2LtCMoV4wGUwr6m3OTAAVjsV4iIRS1rhLA36nQo5Rb9KoW0WnDTz1SxqtYB7YF2RTN4/wSEQtRO1asGIVnw2Qr5l+VzO0VYBjoFgEaZUQZqEXVYmxAbwGGxU5Nw8eEqT6y7KGswsCdrAe7Ou5QaDirvLVYqO5fR5ysIzl8hXw6i1FUwrFDEK6jJ86AAzOZ6LA5+REPardCsU8QO0cwZuBfhq4flu8jlrsLO1RJfCgcsSw0ec6+doLZPLusjnrDHiBSlF/8YbgzDqB78stpEin7O6VpMiEWwwt3BEsMH7zGZbAV7X8ivoTmype9Ngdr4A9thsr275g16IT4GQGLjGuc4EnBZor54nxKMgVzoLZjjr/kGwSaDNKp4Qr6CDabCU4x5WVLgOXnC+uwKaBd/t5QkRsRQ4Q10jZnLfKBjmXN8PjvJyJ9umixpDAhNaT0bojHHuY+G0kROlaiRk2EO88Gsnx1oEfRzndoPXGfeGDULtsIRQfpEn5ISNBtj6/aDBWqaRcihmD/VphI52i8mhlTTF8YSYAEETMUxEg0GXei5pcg3whIikKOOg2UBMZR67lGmKUgUiAg2OgX0W608dVEiQYRHyWWoaH7cgZj34KDFn+y+N5y2svgs2nDBIBpfXGLckijBdWMlY6hqNGdalFiQKybnUZewESQcvmQB7de1Vgy8SRSTJx5yVRjcpTjt4GetmvaBTcn2M+XSeNzeVTIHOrGTaSiXTtUVUMj0Mnohs9IQkxn2nReyQ0/2RfofjpSi2Fcpok2WgQNsL0jZ69IQlZax2qi3hfOwhMtoURbMRepdl30S2p2t129MbJEemaVoSR8CYqgMDO+i0Q1iwAqK3CXCbDgy8K8QRjlUkIuDwCMcrEqP8CIdRjakSbLd4qOYT+AN+rxxzKkUh/wQYAIxbfwhIUivlAAAAAElFTkSuQmCC)!important;background-color:#5cb85c;border-color:#4cae4c}#toasty .toast.toasty-theme-bootstrap.toasty-type-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDIxIDc5LjE1NTc3MiwgMjAxNC8wMS8xMy0xOTo0NDowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MkQyQUI3RDIzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MkQyQUI3RDMzMjJCMTFFNUI4QjZEQkFEN0Q5RUExNzAiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoyRDJBQjdEMDMyMkIxMUU1QjhCNkRCQUQ3RDlFQTE3MCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoyRDJBQjdEMTMyMkIxMUU1QjhCNkRCQUQ3RDlFQTE3MCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PhxHKhwAAAN7SURBVHja7JrfS1RBFMf37q7mj6SySMWMMqnQLEsKMg2yH4SC2g+wrKcIg7SX3ouiP6BfEFRPEdRLFFlBIEVQvfcgFrJBLxFBEWG9mHb7Hjgrl+vMzr13Zuyu+IUP7M7Pc+7MnJm5u47ruom5oGRijmjOOJK22PYScBrs5u8vwA3ww0ZnjqU1sgg8Ba2+9NegE4znw9QqBg8FTpDawF0uE3tHBkFLjvz9XCbWU2sZT5/1inIfeHS+xXVELoK6AOXquGwsp9ZGcDhgJExz2U1xc6QEXADLQ9ShsudMbQGmHDkE9kSoR3tMd1wcoSd7CpRFqLsYnA05ktYcOQGac+T/ZmTawm381/BL0ecR2CDI+wyug4/8fQ04A6oFZUfAAZCJbAk5osFVMOmK1SMo3yMpS21c07FFx4m94LvEsFcgLahDaS8ldb6AnVHtibpGaGGfBOWS/PuyqQyeSPIqNYJGZEeO8ClWJnIwJdkIq3LU6+a2Z8WRGtAHSnOUWQcKBOkphSOl3HbNbDjSpzjdkupBoSCd0tYq6rZwH1aj1jaQcdWaAJWC+hWcp1KG+7Ky2OlpHgW1AcrStFohuTkWBKhfy30V2phaHWCAI08QrfK1T58bg27UoB+0m3akhsNtQQjH23xPlCJWU8gT9WDQhZ8M+HT2KcKtSKt97ac4LYw6ue+kCUfqeUqFVa3vrpHmy1dYDXA413KEptIxsDmCAQ2+TTElCQAqUd8HlRcwRVhrA+NudFV72irXaOcX2xIp/JbxsC7UOOZnFzyN7EqNdkrZlrKwr0xpGuwCvZr3nQ7PvtOo2RbZcg88A1NBL1YV4HnIcDkbescv+L4GGRGHb2smnHgDPnk2yFbN9prYttszRkWwcBr4kqOry6DK0y59vmmgXbKtTnVDdAx1NgKKBQ9pAefp6ooqam0Hxw1MqTvgjyB9ivN01e+/SngdoVf9l/iMo6u05HDpGHqzmLW12O+Iw9fMdkPRpVdy1U0ZCOlZtbPNjnexl4BR16xu8ZrI9rGU00xqlG2f3ke6wGMLcf8teM9PjQ6MWy30QaMylJ2vzZY2sB2MTZHtQ9k1UpTIXxV5F/tYHjsy5nXkARjOQyeG2fZpR35yWDyfsPAbuAWNs629bPuM02+a7w+F/DMAnYL/xsT4JJ966WeKCWZSdYzPO83/O2jeEUv6J8AAuUNANq3q2uMAAAAASUVORK5CYII=)!important;background-color:#f0ad4e;border-color:#eea236}@-webkit-keyframes toasty-shake{0%{-webkit-transform:translate(2px,1px) rotate(0);transform:translate(2px,1px) rotate(0)}10%{-webkit-transform:translate(-1px,-2px) rotate(-1deg);transform:translate(-1px,-2px) rotate(-1deg)}20%{-webkit-transform:translate(-3px,0) rotate(1deg);transform:translate(-3px,0) rotate(1deg)}30%{-webkit-transform:translate(0,2px) rotate(0);transform:translate(0,2px) rotate(0)}40%{-webkit-transform:translate(1px,-1px) rotate(1deg);transform:translate(1px,-1px) rotate(1deg)}50%{-webkit-transform:translate(-1px,2px) rotate(-1deg);transform:translate(-1px,2px) rotate(-1deg)}60%{-webkit-transform:translate(-3px,1px) rotate(0);transform:translate(-3px,1px) rotate(0)}70%{-webkit-transform:translate(2px,1px) rotate(-1deg);transform:translate(2px,1px) rotate(-1deg)}80%{-webkit-transform:translate(-1px,-1px) rotate(1deg);transform:translate(-1px,-1px) rotate(1deg)}90%{-webkit-transform:translate(2px,2px) rotate(0);transform:translate(2px,2px) rotate(0)}100%{-webkit-transform:translate(1px,-2px) rotate(-1deg);transform:translate(1px,-2px) rotate(-1deg)}}@keyframes toasty-shake{0%{-webkit-transform:translate(2px,1px) rotate(0);transform:translate(2px,1px) rotate(0)}10%{-webkit-transform:translate(-1px,-2px) rotate(-1deg);transform:translate(-1px,-2px) rotate(-1deg)}20%{-webkit-transform:translate(-3px,0) rotate(1deg);transform:translate(-3px,0) rotate(1deg)}30%{-webkit-transform:translate(0,2px) rotate(0);transform:translate(0,2px) rotate(0)}40%{-webkit-transform:translate(1px,-1px) rotate(1deg);transform:translate(1px,-1px) rotate(1deg)}50%{-webkit-transform:translate(-1px,2px) rotate(-1deg);transform:translate(-1px,2px) rotate(-1deg)}60%{-webkit-transform:translate(-3px,1px) rotate(0);transform:translate(-3px,1px) rotate(0)}70%{-webkit-transform:translate(2px,1px) rotate(-1deg);transform:translate(2px,1px) rotate(-1deg)}80%{-webkit-transform:translate(-1px,-1px) rotate(1deg);transform:translate(-1px,-1px) rotate(1deg)}90%{-webkit-transform:translate(2px,2px) rotate(0);transform:translate(2px,2px) rotate(0)}100%{-webkit-transform:translate(1px,-2px) rotate(-1deg);transform:translate(1px,-2px) rotate(-1deg)}}#toasty{position:fixed;z-index:999999}#toasty .close-button:focus{outline:0}#toasty.toasty-position-top-left{top:12px;left:12px}#toasty.toasty-position-top-right{top:12px;right:12px}#toasty.toasty-position-bottom-right{bottom:12px;right:12px}#toasty.toasty-position-bottom-left{bottom:12px;left:12px}#toasty.toasty-position-top-center{top:12px;left:50%;-webkit-transform:translate(-50%,0);transform:translate(-50%,0)}#toasty.toasty-position-bottom-center{bottom:12px;left:50%;-webkit-transform:translate(-50%,0);transform:translate(-50%,0)}#toasty .toast{cursor:pointer;margin:0 0 6px;padding:0;width:285px;height:65px;display:table;background-size:24px 24px;background-position:15px center;background-repeat:no-repeat;box-shadow:0 0 5px 0 rgba(0,0,0,.25);opacity:.9;position:relative}#toasty .toast.toasty-shake{-webkit-animation-name:toasty-shake;animation-name:toasty-shake;-webkit-animation-duration:.5s;animation-duration:.5s;-webkit-transform-origin:50% 50%;transform-origin:50% 50%;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-timing-function:linear;animation-timing-function:linear}#toasty .toast.toasty-shake:hover{-webkit-animation-play-state:paused;animation-play-state:paused}#toasty .toast .close-button{padding:0;cursor:pointer;background:0 0;border:0;-webkit-appearance:none;position:absolute;right:10px;top:3px;opacity:.5}#toasty .toast .close-button:focus,#toasty .toast .close-button:hover{text-decoration:none;cursor:pointer;opacity:1}#toasty .toast .toast-text{padding:5px 20px 5px 60px;display:table-cell;vertical-align:middle}#toasty .toast .toast-text .toast-title{font-weight:700}#toasty .toast .toast-text a:hover,#toasty .toast .toast-text label:hover{text-decoration:none}.mdp-animate-next{opacity:0;transform:translate3d(50%,0,1px)}.mdp-animate-next-remove{transition:all .5s cubic-bezier(.35,0,.25,1);opacity:0;transform:translate3d(50%,0,1px)}.mdp-animate-next-remove-active{opacity:1;transform:translate3d(0,0,1px)}.mdp-animate-prev{opacity:0;transform:translate3d(-50%,0,1px)}.mdp-animate-prev-remove{transition:all .3s cubic-bezier(.35,0,.25,1);opacity:0;transform:translate3d(-50%,0,1px)}.mdp-animate-prev-remove-active{opacity:1;transform:translate3d(0,0,1px)}@keyframes mdp-animation-bounce{from{opacity:0;transform:scale(.95)}70%{opacity:1;transform:scale(1.05)}to{transform:scale(1)}}.mdp-animation-zoom.ng-enter{transition:all .3s cubic-bezier(.35,0,.25,1);animation-duration:.3s;animation-name:mdp-animation-bounce}.mdp-datepicker{max-height:initial;min-width:234px}.mdp-datepicker *{outline:0}.mdp-datepicker .md-actions{width:100%;padding:0 5px}.mdp-calendar-week-days{font-size:.75rem;opacity:.6}.mdp-calendar-week-days>*{width:32px;height:32px;line-height:32px;margin:0 5px;padding:0;min-width:0;min-height:0;box-shadow:none!important;background-color:transparent}.mdp-calendar-days{font-size:1rem;max-width:100%}.mdp-calendar-days .md-button,.mdp-calendar-days .mdp-day-placeholder{width:32px;height:32px;margin:0 5px}.mdp-calendar-days .md-button{cursor:pointer;border-radius:50%;font-size:12px;width:32px;height:32px;line-height:32px;padding:0;min-width:0;min-height:0;box-shadow:none!important;background-color:transparent}.mdp-calendar-days .md-button[disabled]:not(.md-accent){background-color:transparent!important}.mdp-calendar-monthyear{font-size:.8125rem;font-weight:700;line-height:32px;min-height:32px}.mdp-datepicker-date,.mdp-datepicker-day,.mdp-datepicker-dow,.mdp-datepicker-month{font-size:1.8rem;opacity:.6}.mdp-datepicker-date:not(.active),.mdp-datepicker-day:not(.active),.mdp-datepicker-dow:not(.active),.mdp-datepicker-month:not(.active){cursor:pointer}.mdp-datepicker-date.active,.mdp-datepicker-date:hover,.mdp-datepicker-day.active,.mdp-datepicker-day:hover,.mdp-datepicker-dow.active,.mdp-datepicker-dow:hover,.mdp-datepicker-month.active,.mdp-datepicker-month:hover{opacity:1}.mdp-datepicker-year{font-size:.9rem;opacity:.6;padding:0;margin:0}.mdp-datepicker-year:not(.active){cursor:pointer}.mdp-datepicker-year.active,.mdp-datepicker-year:hover{opacity:1}.mdp-datepicker-select-year{height:232px}.mdp-datepicker-select-year .repeated-year{text-align:center}.mdp-datepicker-select-year .repeated-year .md-button{width:100%;margin:0;border-radius:0;padding:0;font-size:1rem;line-height:42px}.mdp-datepicker-select-year .repeated-year .md-button.current{font-size:1.8rem;line-height:42px}.mdp-datepicker-select-year .md-virtual-repeat-container,.mdp-datepicker-select-year .md-virtual-repeat-offsetter,.mdp-datepicker-select-year .md-virtual-repeat-scroller{height:100%;width:100%}mdp-date-picker>md-input-container.md-has-icon{padding-left:40px}mdp-date-picker .md-button.md-icon-button{margin:18px 0 0 0}.mdp-datepicker:not(.portrait) .mdp-datepicker-select-year{width:309px}.mdp-datepicker:not(.portrait) .mdp-calendar{margin-right:5px;width:294px;margin-left:10px}.mdp-datepicker:not(.portrait) .mdp-datepicker-date-wrapper{width:150px}.mdp-datepicker:not(.portrait) .mdp-datepicker-dow{width:100%;display:block}.mdp-datepicker:not(.portrait) .mdp-calendar-days>*,.mdp-datepicker:not(.portrait) .mdp-calendar-week-days>*{width:42px}.mdp-datepicker .mdp-datepicker-date-wrapper{padding:16px 35px 16px 16px}.mdp-datepicker md-dialog-content{overflow:hidden;padding:0}.mdp-datepicker md-dialog-content .mdp-calendar{width:294px;overflow-x:hidden}.mdp-datepicker.portrait{max-width:234px}.mdp-datepicker.portrait .mdp-calendar{text-align:center;width:100%}.mdp-datepicker.portrait .mdp-datepicker-select-year{height:252px}.mdp-datepicker.portrait md-dialog-content>*{width:100%}.mdp-datepicker.portrait .md-actions,.mdp-datepicker.portrait .mdp-calendar-days,.mdp-datepicker.portrait .mdp-calendar-week-days{padding:0 5px}.mdp-datepicker.portrait .md-actions{margin-top:20px}.mdp-datepicker.portrait .mdp-calendar-days>*,.mdp-datepicker.portrait .mdp-calendar-week-days>*{width:32px}mdp-calendar{display:block}.mdp-calendar-week-days{width:100%}.mdp-calendar-week-days>*{margin:0}.mdp-calendar-days .md-button,.mdp-calendar-days .mdp-day-placeholder{margin:0}.mdp-clock{width:200px;height:200px;border-radius:50%!important;cursor:pointer;padding:24px;background:#ededed;box-shadow:none!important}.mdp-clock .md-button{box-shadow:none!important;background-color:transparent;display:block;position:absolute;min-height:32px;width:32px;height:32px;font-size:12px;line-height:32px;margin:0;padding:0;transform:translate(-50%,-50%)}.mdp-clock .mdp-clock-container{width:100%;height:100%;position:relative;display:block}.mdp-clock .mdp-pointer{min-height:0;width:1px;height:50%;position:absolute;left:0;right:0;bottom:0;margin:0 auto;transform-origin:top center;z-index:0;pointer-events:none}.mdp-clock .mdp-clock-center{min-height:0;height:6px;width:6px;position:absolute;left:0;right:0;top:0;bottom:0;margin:auto;border-radius:50%}.mdp-clock .md-button.mdp-clock-selected{position:absolute;border-radius:50%;width:8px;height:8px;bottom:-8px;left:0;min-width:0;min-height:0;pointer-events:none}.mdp-timepicker .mdp-clock-switch-container{padding:20px;width:309px}.mdp-timepicker .mdp-timepicker-time{padding:15px}.mdp-timepicker .mdp-timepicker-selected-time{font-size:3rem}.mdp-timepicker:not(.portrait) .mdp-timepicker-time{width:138px}.mdp-timepicker.portrait .mdp-timepicker-selected-time{font-size:4rem;margin-right:1.5rem}mdp-time-picker md-input-container.md-has-icon{padding-left:40px}mdp-time-picker .md-button.md-icon-button{margin:18px 0 0 0}.mdp-timepicker-selected-ampm>span,.mdp-timepicker-selected-time>span{outline:0;opacity:.6}.mdp-timepicker-selected-ampm>span:not(.active),.mdp-timepicker-selected-time>span:not(.active){cursor:pointer}.mdp-timepicker-selected-ampm>span.active,.mdp-timepicker-selected-time>span.active{opacity:1}.mdp-clock-deg0{top:0;left:50%}.mdp-clock-deg30{top:6.69872981%;left:75%}.mdp-clock-deg60{top:25%;left:93.30127019%}.mdp-clock-deg90{top:50%;left:100%}.mdp-clock-deg120{top:75%;left:93.30127019%}.mdp-clock-deg150{top:93.30127019%;left:75%}.mdp-clock-deg180{top:100%;left:50%}.mdp-clock-deg210{top:93.30127019%;left:25%}.mdp-clock-deg240{top:75%;left:6.69872981%}.mdp-clock-deg270{top:50%;left:0}.mdp-clock-deg300{top:25%;left:6.69872981%}.mdp-clock-deg330{top:6.69872981%;left:25%}.mdp-clock-deg360{top:0;left:50%}.jstree-children,.jstree-container-ul,.jstree-node{display:block;margin:0;padding:0;list-style-type:none;list-style-image:none}.jstree-node{white-space:nowrap}.jstree-anchor{display:inline-block;color:#000;white-space:nowrap;padding:0 4px 0 1px;margin:0;vertical-align:top}.jstree-anchor:focus{outline:0}.jstree-anchor,.jstree-anchor:active,.jstree-anchor:hover,.jstree-anchor:link,.jstree-anchor:visited{text-decoration:none;color:inherit}.jstree-icon{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-icon:empty{display:inline-block;text-decoration:none;margin:0;padding:0;vertical-align:top;text-align:center}.jstree-ocl{cursor:pointer}.jstree-leaf>.jstree-ocl{cursor:default}.jstree .jstree-open>.jstree-children{display:block}.jstree .jstree-closed>.jstree-children,.jstree .jstree-leaf>.jstree-children{display:none}.jstree-anchor>.jstree-themeicon{margin-right:2px}.jstree-anchor>.jstree-themeicon-hidden,.jstree-no-icons .jstree-themeicon{display:none}.jstree-hidden,.jstree-node.jstree-hidden{display:none}.jstree-rtl .jstree-anchor{padding:0 1px 0 4px}.jstree-rtl .jstree-anchor>.jstree-themeicon{margin-left:2px;margin-right:0}.jstree-rtl .jstree-node{margin-left:0}.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-wholerow-ul{position:relative;display:inline-block;min-width:100%}.jstree-wholerow-ul .jstree-leaf>.jstree-ocl{cursor:pointer}.jstree-wholerow-ul .jstree-anchor,.jstree-wholerow-ul .jstree-icon{position:relative}.jstree-wholerow-ul .jstree-wholerow{width:100%;cursor:pointer;position:absolute;left:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jstree-contextmenu .jstree-anchor{-webkit-user-select:none;-webkit-touch-callout:none;user-select:none}.vakata-context{display:none}.vakata-context,.vakata-context ul{margin:0;padding:2px;position:absolute;background:#f5f5f5;border:1px solid #979797;box-shadow:2px 2px 2px #999}.vakata-context ul{list-style:none;left:100%;margin-top:-2.7em;margin-left:-4px}.vakata-context .vakata-context-right ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context li{list-style:none}.vakata-context li>a{display:block;padding:0 2em 0 2em;text-decoration:none;width:auto;color:#000;white-space:nowrap;line-height:2.4em;text-shadow:1px 1px 0 #fff;border-radius:1px}.vakata-context li>a:hover{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAIORI4JlrqN1oMSnmmZDQUAOw==);background-position:right center;background-repeat:no-repeat}.vakata-context li>a:focus{outline:0}.vakata-context .vakata-context-no-icons{margin-left:0}.vakata-context .vakata-context-hover>a{position:relative;background-color:#e8eff7;box-shadow:0 0 2px #0a6aa1}.vakata-context .vakata-context-separator>a,.vakata-context .vakata-context-separator>a:hover{background:#fff;border:0;border-top:1px solid #e2e3e3;height:1px;min-height:1px;max-height:1px;padding:0;margin:0 0 0 2.4em;border-left:1px solid #e0e0e0;text-shadow:0 0 0 transparent;box-shadow:0 0 0 transparent;border-radius:0}.vakata-context .vakata-contextmenu-disabled a,.vakata-context .vakata-contextmenu-disabled a:hover{color:silver;background-color:transparent;border:0;box-shadow:0 0 0}.vakata-context .vakata-contextmenu-disabled>a>i{filter:grayscale(100%)}.vakata-context li>a>i{text-decoration:none;display:inline-block;width:2.4em;height:2.4em;background:0 0;margin:0 0 0 -2em;vertical-align:top;text-align:center;line-height:2.4em}.vakata-context li>a>i:empty{width:2.4em;line-height:2.4em}.vakata-context li>a .vakata-contextmenu-sep{display:inline-block;width:1px;height:2.4em;background:#fff;margin:0 .5em 0 0;border-left:1px solid #e2e3e3}.vakata-context .vakata-contextmenu-shortcut{font-size:.8em;color:silver;opacity:.5;display:none}.vakata-context-rtl ul{left:auto;right:100%;margin-left:auto;margin-right:-4px}.vakata-context-rtl li>a.vakata-context-parent{background-image:url(data:image/gif;base64,R0lGODlhCwAHAIAAACgoKP///yH5BAEAAAEALAAAAAALAAcAAAINjI+AC7rWHIsPtmoxLAA7);background-position:left center;background-repeat:no-repeat}.vakata-context-rtl .vakata-context-separator>a{margin:0 2.4em 0 0;border-left:0;border-right:1px solid #e2e3e3}.vakata-context-rtl .vakata-context-left ul{right:auto;left:100%;margin-left:-4px;margin-right:auto}.vakata-context-rtl li>a>i{margin:0 -2em 0 0}.vakata-context-rtl li>a .vakata-contextmenu-sep{margin:0 0 0 .5em;border-left-color:#fff;background:#e2e3e3}#jstree-marker{position:absolute;top:0;left:0;margin:-5px 0 0 0;padding:0;border-right:0;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid;width:0;height:0;font-size:0;line-height:0}#jstree-dnd{line-height:16px;margin:0;padding:4px}#jstree-dnd .jstree-copy,#jstree-dnd .jstree-icon{display:inline-block;text-decoration:none;margin:0 2px 0 0;padding:0;width:16px;height:16px}#jstree-dnd .jstree-ok{background:green}#jstree-dnd .jstree-er{background:red}#jstree-dnd .jstree-copy{margin:0 2px 0 2px}.jstree-default .jstree-icon,.jstree-default .jstree-node{background-repeat:no-repeat;background-color:transparent}.jstree-default .jstree-anchor,.jstree-default .jstree-animated,.jstree-default .jstree-wholerow{transition:background-color .15s,box-shadow .15s}.jstree-default .jstree-hovered{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #ccc}.jstree-default .jstree-context{background:#e7f4f9;border-radius:2px;box-shadow:inset 0 0 1px #ccc}.jstree-default .jstree-clicked{background:#beebff;border-radius:2px;box-shadow:inset 0 0 1px #999}.jstree-default .jstree-no-icons .jstree-anchor>.jstree-themeicon{display:none}.jstree-default .jstree-disabled{background:0 0;color:#666}.jstree-default .jstree-disabled.jstree-hovered{background:0 0;box-shadow:none}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-disabled>.jstree-icon{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default .jstree-search{font-style:italic;color:#8b0000;font-weight:700}.jstree-default .jstree-no-checkboxes .jstree-checkbox{display:none!important}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked{background:0 0;box-shadow:none}.jstree-default.jstree-checkbox-no-clicked .jstree-clicked.jstree-hovered{background:#e7f4f9}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked{background:0 0}.jstree-default.jstree-checkbox-no-clicked>.jstree-wholerow-ul .jstree-wholerow-clicked.jstree-wholerow-hovered{background:#e7f4f9}.jstree-default>.jstree-striped{min-width:100%;display:inline-block;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAkCAMAAAB/qqA+AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMNAMM9s3UAAAAXSURBVHjajcEBAQAAAIKg/H/aCQZ70AUBjAATb6YPDgAAAABJRU5ErkJggg==) left top repeat}.jstree-default>.jstree-wholerow-ul .jstree-clicked,.jstree-default>.jstree-wholerow-ul .jstree-hovered{background:0 0;box-shadow:none;border-radius:0}.jstree-default .jstree-wholerow{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.jstree-default .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default .jstree-wholerow-clicked{background:#beebff;background:-webkit-linear-gradient(top,#beebff 0,#a8e4ff 100%);background:linear-gradient(to bottom,#beebff 0,#a8e4ff 100%)}.jstree-default .jstree-node{min-height:24px;line-height:24px;margin-left:24px;min-width:24px}.jstree-default .jstree-anchor{line-height:24px;height:24px}.jstree-default .jstree-icon{width:24px;height:24px;line-height:24px}.jstree-default .jstree-icon:empty{width:24px;height:24px;line-height:24px}.jstree-default.jstree-rtl .jstree-node{margin-right:24px}.jstree-default .jstree-wholerow{height:24px}.jstree-default .jstree-icon,.jstree-default .jstree-node{background-image:url(32px.png)}.jstree-default .jstree-node{background-position:-292px -4px;background-repeat:repeat-y}.jstree-default .jstree-last{background-image:none}.jstree-default .jstree-open>.jstree-ocl{background-position:-132px -4px}.jstree-default .jstree-closed>.jstree-ocl{background-position:-100px -4px}.jstree-default .jstree-leaf>.jstree-ocl{background-position:-68px -4px}.jstree-default .jstree-themeicon{background-position:-260px -4px}.jstree-default>.jstree-no-dots .jstree-leaf>.jstree-ocl,.jstree-default>.jstree-no-dots .jstree-node{background:0 0}.jstree-default>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -4px}.jstree-default>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -4px}.jstree-default .jstree-disabled{background:0 0}.jstree-default .jstree-disabled.jstree-hovered{background:0 0}.jstree-default .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default .jstree-checkbox{background-position:-164px -4px}.jstree-default .jstree-checkbox:hover{background-position:-164px -36px}.jstree-default .jstree-checked>.jstree-checkbox,.jstree-default.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox{background-position:-228px -4px}.jstree-default .jstree-checked>.jstree-checkbox:hover,.jstree-default.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover{background-position:-228px -36px}.jstree-default .jstree-anchor>.jstree-undetermined{background-position:-196px -4px}.jstree-default .jstree-anchor>.jstree-undetermined:hover{background-position:-196px -36px}.jstree-default .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default>.jstree-striped{background-size:auto 48px}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default.jstree-rtl .jstree-last{background-image:none}.jstree-default.jstree-rtl .jstree-open>.jstree-ocl{background-position:-132px -36px}.jstree-default.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-100px -36px}.jstree-default.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-68px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl,.jstree-default.jstree-rtl>.jstree-no-dots .jstree-node{background:0 0}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-36px -36px}.jstree-default.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-4px -36px}.jstree-default .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default .jstree-file{background:url(32px.png) -100px -68px no-repeat}.jstree-default .jstree-folder{background:url(32px.png) -260px -4px no-repeat}.jstree-default>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default{line-height:24px;padding:0 4px}#jstree-dnd.jstree-default .jstree-er,#jstree-dnd.jstree-default .jstree-ok{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default i{background:0 0;width:24px;height:24px;line-height:24px}#jstree-dnd.jstree-default .jstree-ok{background-position:-4px -68px}#jstree-dnd.jstree-default .jstree-er{background-position:-36px -68px}.jstree-default .jstree-ellipsis{overflow:hidden}.jstree-default .jstree-ellipsis .jstree-anchor{width:calc(100% - 24px + 5px);text-overflow:ellipsis;overflow:hidden}.jstree-default.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==)}.jstree-default.jstree-rtl .jstree-last{background-image:none}.jstree-default-small .jstree-node{min-height:18px;line-height:18px;margin-left:18px;min-width:18px}.jstree-default-small .jstree-anchor{line-height:18px;height:18px}.jstree-default-small .jstree-icon{width:18px;height:18px;line-height:18px}.jstree-default-small .jstree-icon:empty{width:18px;height:18px;line-height:18px}.jstree-default-small.jstree-rtl .jstree-node{margin-right:18px}.jstree-default-small .jstree-wholerow{height:18px}.jstree-default-small .jstree-icon,.jstree-default-small .jstree-node{background-image:url(32px.png)}.jstree-default-small .jstree-node{background-position:-295px -7px;background-repeat:repeat-y}.jstree-default-small .jstree-last{background-image:none}.jstree-default-small .jstree-open>.jstree-ocl{background-position:-135px -7px}.jstree-default-small .jstree-closed>.jstree-ocl{background-position:-103px -7px}.jstree-default-small .jstree-leaf>.jstree-ocl{background-position:-71px -7px}.jstree-default-small .jstree-themeicon{background-position:-263px -7px}.jstree-default-small>.jstree-no-dots .jstree-leaf>.jstree-ocl,.jstree-default-small>.jstree-no-dots .jstree-node{background:0 0}.jstree-default-small>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -7px}.jstree-default-small>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -7px}.jstree-default-small .jstree-disabled{background:0 0}.jstree-default-small .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-small .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-small .jstree-checkbox{background-position:-167px -7px}.jstree-default-small .jstree-checkbox:hover{background-position:-167px -39px}.jstree-default-small .jstree-checked>.jstree-checkbox,.jstree-default-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox{background-position:-231px -7px}.jstree-default-small .jstree-checked>.jstree-checkbox:hover,.jstree-default-small.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover{background-position:-231px -39px}.jstree-default-small .jstree-anchor>.jstree-undetermined{background-position:-199px -7px}.jstree-default-small .jstree-anchor>.jstree-undetermined:hover{background-position:-199px -39px}.jstree-default-small .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-small>.jstree-striped{background-size:auto 36px}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-small.jstree-rtl .jstree-last{background-image:none}.jstree-default-small.jstree-rtl .jstree-open>.jstree-ocl{background-position:-135px -39px}.jstree-default-small.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-103px -39px}.jstree-default-small.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-71px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl,.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-node{background:0 0}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-39px -39px}.jstree-default-small.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:-7px -39px}.jstree-default-small .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-small>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-small .jstree-file{background:url(32px.png) -103px -71px no-repeat}.jstree-default-small .jstree-folder{background:url(32px.png) -263px -7px no-repeat}.jstree-default-small>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-small{line-height:18px;padding:0 4px}#jstree-dnd.jstree-default-small .jstree-er,#jstree-dnd.jstree-default-small .jstree-ok{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-small i{background:0 0;width:18px;height:18px;line-height:18px}#jstree-dnd.jstree-default-small .jstree-ok{background-position:-7px -71px}#jstree-dnd.jstree-default-small .jstree-er{background-position:-39px -71px}.jstree-default-small .jstree-ellipsis{overflow:hidden}.jstree-default-small .jstree-ellipsis .jstree-anchor{width:calc(100% - 18px + 5px);text-overflow:ellipsis;overflow:hidden}.jstree-default-small.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAACAQMAAABv1h6PAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMHBgAAiABBI4gz9AAAAABJRU5ErkJggg==)}.jstree-default-small.jstree-rtl .jstree-last{background-image:none}.jstree-default-large .jstree-node{min-height:32px;line-height:32px;margin-left:32px;min-width:32px}.jstree-default-large .jstree-anchor{line-height:32px;height:32px}.jstree-default-large .jstree-icon{width:32px;height:32px;line-height:32px}.jstree-default-large .jstree-icon:empty{width:32px;height:32px;line-height:32px}.jstree-default-large.jstree-rtl .jstree-node{margin-right:32px}.jstree-default-large .jstree-wholerow{height:32px}.jstree-default-large .jstree-icon,.jstree-default-large .jstree-node{background-image:url(32px.png)}.jstree-default-large .jstree-node{background-position:-288px 0;background-repeat:repeat-y}.jstree-default-large .jstree-last{background-image:none}.jstree-default-large .jstree-open>.jstree-ocl{background-position:-128px 0}.jstree-default-large .jstree-closed>.jstree-ocl{background-position:-96px 0}.jstree-default-large .jstree-leaf>.jstree-ocl{background-position:-64px 0}.jstree-default-large .jstree-themeicon{background-position:-256px 0}.jstree-default-large>.jstree-no-dots .jstree-leaf>.jstree-ocl,.jstree-default-large>.jstree-no-dots .jstree-node{background:0 0}.jstree-default-large>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px 0}.jstree-default-large>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 0}.jstree-default-large .jstree-disabled{background:0 0}.jstree-default-large .jstree-disabled.jstree-hovered{background:0 0}.jstree-default-large .jstree-disabled.jstree-clicked{background:#efefef}.jstree-default-large .jstree-checkbox{background-position:-160px 0}.jstree-default-large .jstree-checkbox:hover{background-position:-160px -32px}.jstree-default-large .jstree-checked>.jstree-checkbox,.jstree-default-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox{background-position:-224px 0}.jstree-default-large .jstree-checked>.jstree-checkbox:hover,.jstree-default-large.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover{background-position:-224px -32px}.jstree-default-large .jstree-anchor>.jstree-undetermined{background-position:-192px 0}.jstree-default-large .jstree-anchor>.jstree-undetermined:hover{background-position:-192px -32px}.jstree-default-large .jstree-checkbox-disabled{opacity:.8;filter:url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'jstree-grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#jstree-grayscale");filter:gray;-webkit-filter:grayscale(100%)}.jstree-default-large>.jstree-striped{background-size:auto 64px}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAACAQMAAAB49I5GAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjAAMOBgAAGAAJMwQHdQAAAABJRU5ErkJggg==);background-position:100% 1px;background-repeat:repeat-y}.jstree-default-large.jstree-rtl .jstree-last{background-image:none}.jstree-default-large.jstree-rtl .jstree-open>.jstree-ocl{background-position:-128px -32px}.jstree-default-large.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-96px -32px}.jstree-default-large.jstree-rtl .jstree-leaf>.jstree-ocl{background-position:-64px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-leaf>.jstree-ocl,.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-node{background:0 0}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-open>.jstree-ocl{background-position:-32px -32px}.jstree-default-large.jstree-rtl>.jstree-no-dots .jstree-closed>.jstree-ocl{background-position:0 -32px}.jstree-default-large .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-large>.jstree-container-ul .jstree-loading>.jstree-ocl{background:url(throbber.gif) center center no-repeat}.jstree-default-large .jstree-file{background:url(32px.png) -96px -64px no-repeat}.jstree-default-large .jstree-folder{background:url(32px.png) -256px 0 no-repeat}.jstree-default-large>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}#jstree-dnd.jstree-default-large{line-height:32px;padding:0 4px}#jstree-dnd.jstree-default-large .jstree-er,#jstree-dnd.jstree-default-large .jstree-ok{background-image:url(32px.png);background-repeat:no-repeat;background-color:transparent}#jstree-dnd.jstree-default-large i{background:0 0;width:32px;height:32px;line-height:32px}#jstree-dnd.jstree-default-large .jstree-ok{background-position:0 -64px}#jstree-dnd.jstree-default-large .jstree-er{background-position:-32px -64px}.jstree-default-large .jstree-ellipsis{overflow:hidden}.jstree-default-large .jstree-ellipsis .jstree-anchor{width:calc(100% - 32px + 5px);text-overflow:ellipsis;overflow:hidden}.jstree-default-large.jstree-rtl .jstree-node{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAACAQMAAAAD0EyKAAAABlBMVEUAAAAdHRvEkCwcAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjgIIGBgABCgCBvVLXcAAAAABJRU5ErkJggg==)}.jstree-default-large.jstree-rtl .jstree-last{background-image:none}@media (max-width:768px){#jstree-dnd.jstree-dnd-responsive{line-height:40px;font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}#jstree-dnd.jstree-dnd-responsive>i{background:0 0;width:40px;height:40px}#jstree-dnd.jstree-dnd-responsive>.jstree-ok{background-image:url(40px.png);background-position:0 -200px;background-size:120px 240px}#jstree-dnd.jstree-dnd-responsive>.jstree-er{background-image:url(40px.png);background-position:-40px -200px;background-size:120px 240px}#jstree-marker.jstree-dnd-responsive{border-left-width:10px;border-top-width:10px;border-bottom-width:10px;margin-top:-10px}}@media (max-width:768px){.jstree-default-responsive .jstree-icon{background-image:url(40px.png)}.jstree-default-responsive .jstree-leaf>.jstree-ocl,.jstree-default-responsive .jstree-node{background:0 0}.jstree-default-responsive .jstree-node{min-height:40px;line-height:40px;margin-left:40px;min-width:40px;white-space:nowrap}.jstree-default-responsive .jstree-anchor{line-height:40px;height:40px}.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-icon:empty{width:40px;height:40px;line-height:40px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0}.jstree-default-responsive.jstree-rtl .jstree-node{margin-left:0;margin-right:40px;background:0 0}.jstree-default-responsive.jstree-rtl .jstree-container-ul>.jstree-node{margin-right:0}.jstree-default-responsive .jstree-checkbox,.jstree-default-responsive .jstree-ocl,.jstree-default-responsive .jstree-themeicon{background-size:120px 240px}.jstree-default-responsive .jstree-leaf>.jstree-ocl,.jstree-default-responsive.jstree-rtl .jstree-leaf>.jstree-ocl{background:0 0}.jstree-default-responsive .jstree-open>.jstree-ocl{background-position:0 0!important}.jstree-default-responsive .jstree-closed>.jstree-ocl{background-position:0 -40px!important}.jstree-default-responsive.jstree-rtl .jstree-closed>.jstree-ocl{background-position:-40px 0!important}.jstree-default-responsive .jstree-themeicon{background-position:-40px -40px}.jstree-default-responsive .jstree-checkbox,.jstree-default-responsive .jstree-checkbox:hover{background-position:-40px -80px}.jstree-default-responsive .jstree-checked>.jstree-checkbox,.jstree-default-responsive .jstree-checked>.jstree-checkbox:hover,.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox,.jstree-default-responsive.jstree-checkbox-selection .jstree-clicked>.jstree-checkbox:hover{background-position:0 -80px}.jstree-default-responsive .jstree-anchor>.jstree-undetermined,.jstree-default-responsive .jstree-anchor>.jstree-undetermined:hover{background-position:0 -120px}.jstree-default-responsive .jstree-anchor{font-weight:700;font-size:1.1em;text-shadow:1px 1px #fff}.jstree-default-responsive>.jstree-striped{background:0 0}.jstree-default-responsive .jstree-wholerow{border-top:1px solid rgba(255,255,255,.7);border-bottom:1px solid rgba(64,64,64,.2);background:#ebebeb;height:40px}.jstree-default-responsive .jstree-wholerow-hovered{background:#e7f4f9}.jstree-default-responsive .jstree-wholerow-clicked{background:#beebff}.jstree-default-responsive .jstree-children .jstree-last>.jstree-wholerow{box-shadow:inset 0 -6px 3px -5px #666}.jstree-default-responsive .jstree-children .jstree-open>.jstree-wholerow{box-shadow:inset 0 6px 3px -5px #666;border-top:0}.jstree-default-responsive .jstree-children .jstree-open+.jstree-open{box-shadow:none}.jstree-default-responsive .jstree-checkbox,.jstree-default-responsive .jstree-icon,.jstree-default-responsive .jstree-node,.jstree-default-responsive .jstree-node>.jstree-ocl,.jstree-default-responsive .jstree-themeicon{background-image:url(40px.png);background-size:120px 240px}.jstree-default-responsive .jstree-node{background-position:-80px 0;background-repeat:repeat-y}.jstree-default-responsive .jstree-last{background-image:none}.jstree-default-responsive .jstree-leaf>.jstree-ocl{background-position:-40px -120px}.jstree-default-responsive .jstree-last>.jstree-ocl{background-position:-40px -160px}.jstree-default-responsive .jstree-themeicon-custom{background-color:transparent;background-image:none;background-position:0 0}.jstree-default-responsive .jstree-file{background:url(40px.png) 0 -160px no-repeat;background-size:120px 240px}.jstree-default-responsive .jstree-folder{background:url(40px.png) -40px -40px no-repeat;background-size:120px 240px}.jstree-default-responsive>.jstree-container-ul>.jstree-node{margin-left:0;margin-right:0}}.gridster{position:relative;margin:auto;height:0}.gridster>ul{margin:0;list-style:none;padding:0}.gridster-item{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;list-style:none;z-index:2;position:absolute;display:none}.gridster-loaded{-webkit-transition:height .3s;-moz-transition:height .3s;-o-transition:height .3s;transition:height .3s}.gridster-loaded .gridster-item{display:block;position:absolute;-webkit-transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;-moz-transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;-o-transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;transition:opacity .3s,left .3s,top .3s,width .3s,height .3s;-webkit-transition-delay:50ms;-moz-transition-delay:50ms;-o-transition-delay:50ms;transition-delay:50ms}.gridster-loaded .gridster-preview-holder{display:none;z-index:1;position:absolute;background-color:#ddd;border-color:#fff;opacity:.2}.gridster-loaded .gridster-item.gridster-item-moving,.gridster-loaded .gridster-preview-holder{-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.gridster-mobile{height:auto!important}.gridster-mobile .gridster-item{height:auto;position:static;float:none}.gridster-item.ng-leave.ng-leave-active{opacity:0}.gridster-item.ng-enter{opacity:1}.gridster-item-moving{z-index:3}.gridster-item-resizable-handler{position:absolute;font-size:1px;display:block;z-index:5}.handle-se{cursor:se-resize;width:0;height:0;right:1px;bottom:1px;border-style:solid;border-width:0 0 12px 12px;border-color:transparent}.handle-ne{cursor:ne-resize;width:12px;height:12px;right:1px;top:1px}.handle-nw{cursor:nw-resize;width:12px;height:12px;left:1px;top:1px}.handle-sw{cursor:sw-resize;width:12px;height:12px;left:1px;bottom:1px}.handle-e{cursor:e-resize;width:12px;bottom:0;right:1px;top:0}.handle-s{cursor:s-resize;height:12px;right:0;bottom:1px;left:0}.handle-n{cursor:n-resize;height:12px;right:0;top:1px;left:0}.handle-w{cursor:w-resize;width:12px;left:1px;top:0;bottom:0}.gridster .gridster-item:hover .gridster-box{border:1.5px solid #b3b2b3}.gridster .gridster-item:hover .handle-se{border-color:transparent transparent #ccc}.widget-clock .digital{text-align:center}.widget-clock .time{font-family:Syncopate,sans-serif;font-size:2.5em;margin:0}.widget-clock .square{position:relative;width:100%;height:0;padding-bottom:100%}.widget-clock svg{position:absolute;width:100%;height:100%;left:0}.widget-clock .clock-face{stroke:#333;fill:#fff}.widget-clock .minor{stroke:#999;stroke-width:.5}.widget-clock .major{stroke:#333;stroke-width:1}.widget-clock .hour{stroke:#333}.widget-clock .minute{stroke:#666}.widget-clock .second{stroke:#1076ed}.widget-clock .second-counterweight{stroke:#1076ed;stroke-width:3}.widget-clock.dark .clock-face{fill:#111}.widget-clock.dark .hour{stroke:#666}.widget-clock.dark .minute{stroke:#999}*{box-sizing:border-box}@font-face{font-family:emoticons;src:url(../fonts/emoticons.eot?5zh0vu);src:url(../fonts/emoticons.eot?#iefix5zh0vu) format('embedded-opentype'),url(../fonts/emoticons.woff?5zh0vu) format('woff'),url(../fonts/emoticons.ttf?5zh0vu) format('truetype'),url(../fonts/emoticons.svg?5zh0vu#icomoon) format('svg');font-weight:400;font-style:normal}.ne-code{display:none}.ne-code{font-size:14px;padding:20px;font-family:Consolas,Menlo,Monaco,monospace;padding:1.5em}pre{position:relative;margin-bottom:24px;border-radius:2px;overflow:hidden}code.has-numbering{display:block;padding:12px 30px;overflow-y:auto;font-weight:300;font-family:Consolas,Menlo,Monaco,monospace;font-size:14px;line-height:20px}code.has-numbering{margin-left:36px}.pre-numbering{position:absolute;top:0;left:0;width:35px;padding:1.1em 5px 12px 0;border-right:1px solid #e8e8e8;border-radius:3px 0 0 3px;background-color:#eee;text-align:right;font-family:Consolas,Menlo,Monaco,monospace;font-size:14px;color:#aaa;line-height:20px;margin-top:-4px}.pre-numbering li{list-style-type:none}.ne-pdf iframe{width:420px;height:530px;display:block}.ne-pdf-icon{width:200px;height:150px;float:left;border-right:1px solid #eee}.ne-pdf-icon i{margin:29px 62px;color:#999;font-size:84px}.ne-pdf-view button{font-family:inherit;font-size:14px;background-color:transparent;border:1px solid #ccc;padding:6px 15px;border-radius:2px;color:#333;cursor:pointer;box-shadow:0 1px 1px 0 rgba(0,0,0,.26);outline:0;border-bottom:0;float:right;margin:80px 10px 0 10px;-webkit-transition:all .5s linear;-o-transition:all .5s linear;-moz-transition:all .5s linear;-ms-transition:all .5s linear;-kthtml-transition:all .5s linear;transition:all .5s linear}.ne-pdf-view button:hover{box-shadow:0 2px 2px 0 rgba(0,0,0,.26)}.ne-pdf-view button i{margin-right:6px}.ne-pdf-view button a{color:#333}.ne-pdf-viewer iframe{margin:0 auto}.ne-pdf-viewer{background-color:#3498db;position:relative}.ne-pdf-viewer i{position:absolute;right:10px;top:8px;color:#fff;font-size:25px;cursor:pointer}.ne-audio{background-color:#1d1d1d;border-radius:2px;padding-top:6px}.ne-audio audio{width:100%}.ne-pdf,.ne-video{padding:5px;border:1px solid #e4e4e4;border-radius:2px;margin:20px 0;box-shadow:0 1px 1px 0 rgba(0,0,0,.26);border-bottom:0;overflow:auto;-webkit-transition:all .5s linear;-o-transition:all .5s linear;-moz-transition:all .5s linear;-ms-transition:all .5s linear;-kthtml-transition:all .5s linear;transition:all .5s linear}.ne-embed{width:100%;padding:5px;border:1px solid #e4e4e4;border-radius:2px;margin:20px 0;box-shadow:0 1px 1px 0 rgba(0,0,0,.26);border-bottom:0;padding-bottom:1px}.ne-embed iframe{border:0;background-color:#3498db;background-image:url(../images/loader.svg);background-repeat:no-repeat;background-position:center;width:100%}.ne-plunker{background-color:#fff!important}.ne-video video{width:100%}.ne-video iframe{width:100%;border:0}.ne-video object{width:100%;border:0}.ne-audio iframe{width:100%;border:0}.ne-image:hover,.ne-video:hover{box-shadow:0 2px 2px 0 rgba(0,0,0,.26)}.ne-pdf-preview,.ne-video-preview{overflow:auto}.ne-video-preview img{display:block;width:200px;height:150px;border-radius:2px;background-color:#3498db}.ne-video-thumb{width:200px;float:left;cursor:pointer;color:rgba(255,255,255,.6)}.ne-video-thumb:hover{color:#fff}.ne-video-thumb i{position:absolute;font-size:42px;margin-top:-95px;margin-left:80px;cursor:pointer}.ne-pdf-detail,.ne-video-detail{width:calc(100% - 200px);float:left;padding-left:15px}.ne-pdf-title,.ne-video-title{font-weight:bolder;padding:5px 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ne-video-desc{font-size:16px;color:#666;height:90px}.ne-stats{padding-top:7px;overflow:auto}.ne-video-stats span{padding:0 15px;float:right}.ne-video-stats span i{margin-right:10px}.ne-video-player{background-color:#3498db;background-image:url(../images/loader.svg);background-repeat:no-repeat;background-position:center}.ne-video-player iframe{width:100%}.ne-image{width:100%;border-radius:2px;border:1px solid #e4e4e4;min-height:250px;max-height:250px;overflow:hidden;cursor:pointer;padding-bottom:5px;-webkit-transition:all .5s linear;-o-transition:all .5s linear;-moz-transition:all .5s linear;-ms-transition:all .5s linear;-kthtml-transition:all .5s linear;transition:all .5s linear;box-shadow:0 1px 1px 0 rgba(0,0,0,.26);border-bottom:5px solid #fff;margin:10px 0}.ne-image-long{max-height:800px}.ne-image img,.ne-image-long img{width:100%;display:block;min-height:250px}.ne-image-wrapper{margin:5px;margin-bottom:0;background-color:#3498db;background-image:url(../images/loader.svg);background-repeat:no-repeat;background-position:center;height:100%;overflow:hidden}.ne-gist body{margin:0!important}.emoticons-image,.emoticons-image-wrapper{width:100%}.emoticons-image{padding:5px;border-radius:2px;border:1px solid #f2f2f2;display:block;margin:20px 0}.ne-emoticon{font-family:emoticons;speak:none;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;line-height:1;display:inline-block;vertical-align:middle;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.emoticon{text-indent:-9999px;display:inline-block;height:22px;width:22px;vertical-align:middle}@media all and (-webkit-min-device-pixel-ratio :1),all and (min--moz-device-pixel-ratio :1),all and (-o-min-device-pixel-ratio :1),all and (min-device-pixel-ratio :1),all and (min-resolution :96dpi){.emoticon{background:transparent url(../images/emojis.png) 0 0 no-repeat}}@media all and (-webkit-min-device-pixel-ratio :1.5),all and (-o-min-device-pixel-ratio :3/2),all and (min-device-pixel-ratio :1.5),all and (min-resolution :144dpi){.emoticon{background:transparent url(../images/emojis@2x.png) 0 0 no-repeat;background-size:27776px 22px}}@-moz-document url-prefix(){.emoticon{background:transparent url(../images/emojis.png) 0 0 no-repeat}}.emoticon-bowtie{background-position:-5px 0}.emoticon-smile{background-position:-37px 0}.emoticon-laughing{background-position:-69px 0}.emoticon-blush{background-position:-101px 0}.emoticon-smiley{background-position:-133px 0}.emoticon-relaxed{background-position:-165px 0}.emoticon-smirk{background-position:-197px 0}.emoticon-heart_eyes{background-position:-229px 0}.emoticon-kissing_heart{background-position:-261px 0}.emoticon-kissing_closed_eyes{background-position:-293px 0}.emoticon-flushed{background-position:-325px 0}.emoticon-relieved{background-position:-357px 0}.emoticon-satisfied{background-position:-389px 0}.emoticon-grin{background-position:-421px 0}.emoticon-wink{background-position:-453px 0}.emoticon-stuck_out_tongue_winking_eye{background-position:-485px 0}.emoticon-winky_face{background-position:-485px 0}.emoticon-stuck_out_tongue_closed_eyes{background-position:-517px 0}.emoticon-grinning{background-position:-549px 0}.emoticon-kissing{background-position:-581px 0}.emoticon-kissing_smiling_eyes{background-position:-613px 0}.emoticon-stuck_out_tongue{background-position:-645px 0}.emoticon-sleeping{background-position:-677px 0}.emoticon-worried{background-position:-709px 0}.emoticon-frowning{background-position:-741px 0}.emoticon-anguished{background-position:-773px 0}.emoticon-open_mouth{background-position:-805px 0}.emoticon-wow{background-position:-805px 0}.emoticon-grimacing{background-position:-837px 0}.emoticon-confused{background-position:-869px 0}.emoticon-hushed{background-position:-901px 0}.emoticon-expressionless{background-position:-933px 0}.emoticon-unamused{background-position:-965px 0}.emoticon-sweat_smile{background-position:-997px 0}.emoticon-sweat{background-position:-1029px 0}.emoticon-disappointed_relieved{background-position:-1061px 0}.emoticon-weary{background-position:-1093px 0}.emoticon-pensive{background-position:-1125px 0}.emoticon-disappointed{background-position:-1157px 0}.emoticon-confounded{background-position:-1189px 0}.emoticon-fearful{background-position:-1221px 0}.emoticon-cold_sweat{background-position:-1253px 0}.emoticon-persevere{background-position:-1285px 0}.emoticon-cry{background-position:-1317px 0}.emoticon-sob{background-position:-1349px 0}.emoticon-joy{background-position:-1381px 0}.emoticon-astonished{background-position:-1413px 0}.emoticon-scream{background-position:-1445px 0}.emoticon-neckbeard{background-position:-1477px 0}.emoticon-tired_face{background-position:-1509px 0}.emoticon-angry{background-position:-1541px 0}.emoticon-rage{background-position:-1573px 0}.emoticon-triumph{background-position:-1605px 0}.emoticon-sleepy{background-position:-1637px 0}.emoticon-yum{background-position:-1669px 0}.emoticon-mask{background-position:-1701px 0}.emoticon-sunglasses{background-position:-1733px 0}.emoticon-dizzy_face{background-position:-1765px 0}.emoticon-imp{background-position:-1797px 0}.emoticon-smiling_imp{background-position:-1829px 0}.emoticon-neutral_face{background-position:-1861px 0}.emoticon-no_mouth{background-position:-1893px 0}.emoticon-innocent{background-position:-1925px 0}.emoticon-alien{background-position:-1957px 0}.emoticon-yellow_heart{background-position:-1989px 0}.emoticon-blue_heart{background-position:-2021px 0}.emoticon-purple_heart{background-position:-2053px 0}.emoticon-heart{background-position:-2085px 0}.emoticon-green_heart{background-position:-2117px 0}.emoticon-broken_heart{background-position:-2149px 0}.emoticon-heartbeat{background-position:-2181px 0}.emoticon-heartpulse{background-position:-2213px 0}.emoticon-two_hearts{background-position:-2245px 0}.emoticon-revolving_hearts{background-position:-2277px 0}.emoticon-cupid{background-position:-2309px 0}.emoticon-sparkling_heart{background-position:-2341px 0}.emoticon-sparkles{background-position:-2373px 0}.emoticon-star{background-position:-2405px 0}.emoticon-star2{background-position:-2437px 0}.emoticon-dizzy{background-position:-2469px 0}.emoticon-boom{background-position:-2501px 0}.emoticon-collision{background-position:-2533px 0}.emoticon-anger{background-position:-2565px 0}.emoticon-exclamation{background-position:-2597px 0}.emoticon-question{background-position:-2629px 0}.emoticon-grey_exclamation{background-position:-2661px 0}.emoticon-grey_question{background-position:-2693px 0}.emoticon-zzz{background-position:-2725px 0}.emoticon-dash{background-position:-2757px 0}.emoticon-sweat_drops{background-position:-2789px 0}.emoticon-notes{background-position:-2821px 0}.emoticon-musical_note{background-position:-2853px 0}.emoticon-fire{background-position:-2885px 0}.emoticon-hankey{background-position:-2917px 0}.emoticon-poop{background-position:-2949px 0}.emoticon-shit{background-position:-2981px 0}.emoticon-\+1{background-position:-3013px 0}.emoticon-thumbsup{background-position:-3045px 0}.emoticon-\-1{background-position:-3077px 0}.emoticon-thumbsdown{background-position:-3109px 0}.emoticon-ok_hand{background-position:-3141px 0}.emoticon-punch{background-position:-3173px 0}.emoticon-facepunch{background-position:-3205px 0}.emoticon-fist{background-position:-3237px 0}.emoticon-v{background-position:-3269px 0}.emoticon-wave{background-position:-3301px 0}.emoticon-hand{background-position:-3333px 0}.emoticon-raised_hand{background-position:-3365px 0}.emoticon-open_hands{background-position:-3397px 0}.emoticon-point_up{background-position:-3429px 0}.emoticon-point_down{background-position:-3461px 0}.emoticon-point_left{background-position:-3493px 0}.emoticon-point_right{background-position:-3525px 0}.emoticon-raised_hands{background-position:-3557px 0}.emoticon-pray{background-position:-3589px 0}.emoticon-point_up_2{background-position:-3621px 0}.emoticon-clap{background-position:-3653px 0}.emoticon-muscle{background-position:-3685px 0}.emoticon-metal{background-position:-3717px 0}.emoticon-fu{background-position:-3749px 0}.emoticon-walking{background-position:-3781px 0}.emoticon-runner{background-position:-3813px 0}.emoticon-running{background-position:-3845px 0}.emoticon-couple{background-position:-3877px 0}.emoticon-family{background-position:-3909px 0}.emoticon-two_men_holding_hands{background-position:-3941px 0}.emoticon-two_women_holding_hands{background-position:-3973px 0}.emoticon-dancer{background-position:-4005px 0}.emoticon-dancers{background-position:-4037px 0}.emoticon-ok_woman{background-position:-4069px 0}.emoticon-no_good{background-position:-4101px 0}.emoticon-information_desk_person{background-position:-4133px 0}.emoticon-raising_hand{background-position:-4165px 0}.emoticon-bride_with_veil{background-position:-4197px 0}.emoticon-person_with_pouting_face{background-position:-4229px 0}.emoticon-person_frowning{background-position:-4261px 0}.emoticon-bow{background-position:-4293px 0}.emoticon-couplekiss{background-position:-4325px 0}.emoticon-couple_with_heart{background-position:-4357px 0}.emoticon-massage{background-position:-4389px 0}.emoticon-haircut{background-position:-4421px 0}.emoticon-nail_care{background-position:-4453px 0}.emoticon-boy{background-position:-4485px 0}.emoticon-girl{background-position:-4517px 0}.emoticon-woman{background-position:-4549px 0}.emoticon-man{background-position:-4581px 0}.emoticon-baby{background-position:-4613px 0}.emoticon-older_woman{background-position:-4645px 0}.emoticon-older_man{background-position:-4677px 0}.emoticon-person_with_blond_hair{background-position:-4709px 0}.emoticon-man_with_gua_pi_mao{background-position:-4741px 0}.emoticon-man_with_turban{background-position:-4773px 0}.emoticon-construction_worker{background-position:-4805px 0}.emoticon-cop{background-position:-4837px 0}.emoticon-angel{background-position:-4869px 0}.emoticon-princess{background-position:-4901px 0}.emoticon-emoticon_cat{background-position:-4933px 0}.emoticon-smile_cat{background-position:-4965px 0}.emoticon-heart_eyes_cat{background-position:-4997px 0}.emoticon-kissing_cat{background-position:-5029px 0}.emoticon-smirk_cat{background-position:-5061px 0}.emoticon-scream_cat{background-position:-5093px 0}.emoticon-crying_cat_face{background-position:-5125px 0}.emoticon-joy_cat{background-position:-5157px 0}.emoticon-pouting_cat{background-position:-5189px 0}.emoticon-japanese_ogre{background-position:-5221px 0}.emoticon-japanese_goblin{background-position:-5253px 0}.emoticon-see_no_evil{background-position:-5285px 0}.emoticon-hear_no_evil{background-position:-5317px 0}.emoticon-speak_no_evil{background-position:-5349px 0}.emoticon-guardsman{background-position:-5381px 0}.emoticon-skull{background-position:-5413px 0}.emoticon-feet{background-position:-5445px 0}.emoticon-lips{background-position:-5477px 0}.emoticon-kiss{background-position:-5509px 0}.emoticon-droplet{background-position:-5541px 0}.emoticon-ear{background-position:-5573px 0}.emoticon-eyes{background-position:-5605px 0}.emoticon-nose{background-position:-5637px 0}.emoticon-tongue{background-position:-5669px 0}.emoticon-love_letter{background-position:-5701px 0}.emoticon-bust_in_silhouette{background-position:-5733px 0}.emoticon-busts_in_silhouette{background-position:-5765px 0}.emoticon-speech_balloon{background-position:-5797px 0}.emoticon-thought_balloon{background-position:-5829px 0}.emoticon-feelsgood{background-position:-5861px 0}.emoticon-finnadie{background-position:-5893px 0}.emoticon-goberserk{background-position:-5925px 0}.emoticon-godmode{background-position:-5957px 0}.emoticon-hurtrealbad{background-position:-5989px 0}.emoticon-rage1{background-position:-6021px 0}.emoticon-rage2{background-position:-6053px 0}.emoticon-rage3{background-position:-6085px 0}.emoticon-rage4{background-position:-6117px 0}.emoticon-suspect{background-position:-6149px 0}.emoticon-trollface{background-position:-6181px 0}.emoticon-sunny{background-position:-6213px 0}.emoticon-umbrella{background-position:-6245px 0}.emoticon-cloud{background-position:-6277px 0}.emoticon-snowflake{background-position:-6309px 0}.emoticon-snowman{background-position:-6341px 0}.emoticon-zap{background-position:-6373px 0}.emoticon-cyclone{background-position:-6405px 0}.emoticon-foggy{background-position:-6437px 0}.emoticon-ocean{background-position:-6469px 0}.emoticon-cat{background-position:-6501px 0}.emoticon-dog{background-position:-6533px 0}.emoticon-mouse{background-position:-6565px 0}.emoticon-hamster{background-position:-6597px 0}.emoticon-rabbit{background-position:-6629px 0}.emoticon-wolf{background-position:-6661px 0}.emoticon-frog{background-position:-6693px 0}.emoticon-tiger{background-position:-6725px 0}.emoticon-koala{background-position:-6757px 0}.emoticon-bear{background-position:-6789px 0}.emoticon-pig{background-position:-6821px 0}.emoticon-pig_nose{background-position:-6853px 0}.emoticon-cow{background-position:-6885px 0}.emoticon-boar{background-position:-6917px 0}.emoticon-monkey_face{background-position:-6949px 0}.emoticon-monkey{background-position:-6981px 0}.emoticon-horse{background-position:-7013px 0}.emoticon-racehorse{background-position:-7045px 0}.emoticon-camel{background-position:-7077px 0}.emoticon-sheep{background-position:-7109px 0}.emoticon-elephant{background-position:-7141px 0}.emoticon-panda_face{background-position:-7173px 0}.emoticon-snake{background-position:-7205px 0}.emoticon-bird{background-position:-7237px 0}.emoticon-baby_chick{background-position:-7269px 0}.emoticon-hatched_chick{background-position:-7301px 0}.emoticon-hatching_chick{background-position:-7333px 0}.emoticon-chicken{background-position:-7365px 0}.emoticon-penguin{background-position:-7397px 0}.emoticon-turtle{background-position:-7429px 0}.emoticon-bug{background-position:-7461px 0}.emoticon-honeybee{background-position:-7493px 0}.emoticon-ant{background-position:-7525px 0}.emoticon-beetle{background-position:-7557px 0}.emoticon-snail{background-position:-7589px 0}.emoticon-octopus{background-position:-7621px 0}.emoticon-tropical_fish{background-position:-7653px 0}.emoticon-fish{background-position:-7685px 0}.emoticon-whale{background-position:-7717px 0}.emoticon-whale2{background-position:-7749px 0}.emoticon-dolphin{background-position:-7781px 0}.emoticon-cow2{background-position:-7813px 0}.emoticon-ram{background-position:-7845px 0}.emoticon-rat{background-position:-7877px 0}.emoticon-water_buffalo{background-position:-7909px 0}.emoticon-tiger2{background-position:-7941px 0}.emoticon-rabbit2{background-position:-7973px 0}.emoticon-dragon{background-position:-8005px 0}.emoticon-goat{background-position:-8037px 0}.emoticon-rooster{background-position:-8069px 0}.emoticon-dog2{background-position:-8101px 0}.emoticon-pig2{background-position:-8133px 0}.emoticon-mouse2{background-position:-8165px 0}.emoticon-ox{background-position:-8197px 0}.emoticon-dragon_face{background-position:-8229px 0}.emoticon-blowfish{background-position:-8261px 0}.emoticon-crocodile{background-position:-8293px 0}.emoticon-dromedary_camel{background-position:-8325px 0}.emoticon-leopard{background-position:-8357px 0}.emoticon-cat2{background-position:-8389px 0}.emoticon-poodle{background-position:-8421px 0}.emoticon-paw_prints{background-position:-8453px 0}.emoticon-bouquet{background-position:-8485px 0}.emoticon-cherry_blossom{background-position:-8517px 0}.emoticon-tulip{background-position:-8549px 0}.emoticon-four_leaf_clover{background-position:-8581px 0}.emoticon-rose{background-position:-8613px 0}.emoticon-sunflower{background-position:-8645px 0}.emoticon-hibiscus{background-position:-8677px 0}.emoticon-maple_leaf{background-position:-8709px 0}.emoticon-leaves{background-position:-8741px 0}.emoticon-fallen_leaf{background-position:-8773px 0}.emoticon-herb{background-position:-8805px 0}.emoticon-mushroom{background-position:-8837px 0}.emoticon-cactus{background-position:-8869px 0}.emoticon-palm_tree{background-position:-8901px 0}.emoticon-evergreen_tree{background-position:-8933px 0}.emoticon-deciduous_tree{background-position:-8965px 0}.emoticon-chestnut{background-position:-8997px 0}.emoticon-seedling{background-position:-9029px 0}.emoticon-blossom{background-position:-9061px 0}.emoticon-ear_of_rice{background-position:-9093px 0}.emoticon-shell{background-position:-9125px 0}.emoticon-globe_with_meridians{background-position:-9157px 0}.emoticon-sun_with_face{background-position:-9189px 0}.emoticon-full_moon_with_face{background-position:-9221px 0}.emoticon-new_moon_with_face{background-position:-9253px 0}.emoticon-new_moon{background-position:-9285px 0}.emoticon-waxing_crescent_moon{background-position:-9317px 0}.emoticon-first_quarter_moon{background-position:-9349px 0}.emoticon-waxing_gibbous_moon{background-position:-9381px 0}.emoticon-full_moon{background-position:-9413px 0}.emoticon-waning_gibbous_moon{background-position:-9445px 0}.emoticon-last_quarter_moon{background-position:-9477px 0}.emoticon-waning_crescent_moon{background-position:-9509px 0}.emoticon-last_quarter_moon_with_face{background-position:-9541px 0}.emoticon-first_quarter_moon_with_face{background-position:-9573px 0}.emoticon-moon{background-position:-9605px 0}.emoticon-earth_africa{background-position:-9637px 0}.emoticon-earth_americas{background-position:-9669px 0}.emoticon-earth_asia{background-position:-9701px 0}.emoticon-volcano{background-position:-9733px 0}.emoticon-milky_way{background-position:-9765px 0}.emoticon-partly_sunny{background-position:-9797px 0}.emoticon-octocat{background-position:-9829px 0}.emoticon-squirrel{background-position:-9861px 0}.emoticon-bamboo{background-position:-9893px 0}.emoticon-gift_heart{background-position:-9925px 0}.emoticon-dolls{background-position:-9957px 0}.emoticon-school_satchel{background-position:-9989px 0}.emoticon-mortar_board{background-position:-10021px 0}.emoticon-flags{background-position:-10053px 0}.emoticon-fireworks{background-position:-10085px 0}.emoticon-sparkler{background-position:-10117px 0}.emoticon-wind_chime{background-position:-10149px 0}.emoticon-rice_scene{background-position:-10181px 0}.emoticon-jack_o_lantern{background-position:-10213px 0}.emoticon-ghost{background-position:-10245px 0}.emoticon-santa{background-position:-10277px 0}.emoticon-christmas_tree{background-position:-10309px 0}.emoticon-gift{background-position:-10341px 0}.emoticon-bell{background-position:-10373px 0}.emoticon-no_bell{background-position:-10405px 0}.emoticon-tanabata_tree{background-position:-10437px 0}.emoticon-tada{background-position:-10469px 0}.emoticon-confetti_ball{background-position:-10501px 0}.emoticon-balloon{background-position:-10533px 0}.emoticon-crystal_ball{background-position:-10565px 0}.emoticon-cd{background-position:-10597px 0}.emoticon-dvd{background-position:-10629px 0}.emoticon-floppy_disk{background-position:-10661px 0}.emoticon-camera{background-position:-10693px 0}.emoticon-video_camera{background-position:-10725px 0}.emoticon-movie_camera{background-position:-10757px 0}.emoticon-computer{background-position:-10789px 0}.emoticon-tv{background-position:-10821px 0}.emoticon-iphone{background-position:-10853px 0}.emoticon-phone{background-position:-10885px 0}.emoticon-telephone{background-position:-10917px 0}.emoticon-telephone_receiver{background-position:-10949px 0}.emoticon-pager{background-position:-10981px 0}.emoticon-fax{background-position:-11013px 0}.emoticon-minidisc{background-position:-11045px 0}.emoticon-vhs{background-position:-11077px 0}.emoticon-sound{background-position:-11109px 0}.emoticon-speaker{background-position:-11141px 0}.emoticon-mute{background-position:-11173px 0}.emoticon-loudspeaker{background-position:-11205px 0}.emoticon-mega{background-position:-11237px 0}.emoticon-hourglass{background-position:-11269px 0}.emoticon-hourglass_flowing_sand{background-position:-11301px 0}.emoticon-alarm_clock{background-position:-11333px 0}.emoticon-watch{background-position:-11365px 0}.emoticon-radio{background-position:-11397px 0}.emoticon-satellite{background-position:-11429px 0}.emoticon-loop{background-position:-11461px 0}.emoticon-mag{background-position:-11493px 0}.emoticon-mag_right{background-position:-11525px 0}.emoticon-unlock{background-position:-11557px 0}.emoticon-lock{background-position:-11589px 0}.emoticon-lock_with_ink_pen{background-position:-11621px 0}.emoticon-closed_lock_with_key{background-position:-11653px 0}.emoticon-key{background-position:-11685px 0}.emoticon-bulb{background-position:-11717px 0}.emoticon-flashlight{background-position:-11749px 0}.emoticon-high_brightness{background-position:-11781px 0}.emoticon-low_brightness{background-position:-11813px 0}.emoticon-electric_plug{background-position:-11845px 0}.emoticon-battery{background-position:-11877px 0}.emoticon-calling{background-position:-11909px 0}.emoticon-email{background-position:-11941px 0}.emoticon-mailbox{background-position:-11973px 0}.emoticon-postbox{background-position:-12005px 0}.emoticon-bath{background-position:-12037px 0}.emoticon-bathtub{background-position:-12069px 0}.emoticon-shower{background-position:-12101px 0}.emoticon-toilet{background-position:-12133px 0}.emoticon-wrench{background-position:-12165px 0}.emoticon-nut_and_bolt{background-position:-12197px 0}.emoticon-hammer{background-position:-12229px 0}.emoticon-seat{background-position:-12261px 0}.emoticon-moneybag{background-position:-12293px 0}.emoticon-yen{background-position:-12325px 0}.emoticon-dollar{background-position:-12357px 0}.emoticon-pound{background-position:-12389px 0}.emoticon-euro{background-position:-12421px 0}.emoticon-credit_card{background-position:-12453px 0}.emoticon-money_with_wings{background-position:-12485px 0}.emoticon-e\-mail{background-position:-12517px 0}.emoticon-inbox_tray{background-position:-12549px 0}.emoticon-outbox_tray{background-position:-12581px 0}.emoticon-envelope{background-position:-12613px 0}.emoticon-incoming_envelope{background-position:-12645px 0}.emoticon-postal_horn{background-position:-12677px 0}.emoticon-mailbox_closed{background-position:-12709px 0}.emoticon-mailbox_with_mail{background-position:-12741px 0}.emoticon-mailbox_with_no_mail{background-position:-12773px 0}.emoticon-door{background-position:-12805px 0}.emoticon-smoking{background-position:-12837px 0}.emoticon-bomb{background-position:-12869px 0}.emoticon-gun{background-position:-12901px 0}.emoticon-hocho{background-position:-12933px 0}.emoticon-pill{background-position:-12965px 0}.emoticon-syringe{background-position:-12997px 0}.emoticon-page_facing_up{background-position:-13029px 0}.emoticon-page_with_curl{background-position:-13061px 0}.emoticon-bookmark_tabs{background-position:-13093px 0}.emoticon-bar_chart{background-position:-13125px 0}.emoticon-chart_with_upwards_trend{background-position:-13157px 0}.emoticon-chart_with_downwards_trend{background-position:-13189px 0}.emoticon-scroll{background-position:-13221px 0}.emoticon-clipboard{background-position:-13253px 0}.emoticon-calendar{background-position:-13285px 0}.emoticon-date{background-position:-13317px 0}.emoticon-card_index{background-position:-13349px 0}.emoticon-file_folder{background-position:-13381px 0}.emoticon-open_file_folder{background-position:-13413px 0}.emoticon-scissors{background-position:-13445px 0}.emoticon-pushpin{background-position:-13477px 0}.emoticon-paperclip{background-position:-13509px 0}.emoticon-black_nib{background-position:-13541px 0}.emoticon-pencil2{background-position:-13573px 0}.emoticon-straight_ruler{background-position:-13605px 0}.emoticon-triangular_ruler{background-position:-13637px 0}.emoticon-closed_book{background-position:-13669px 0}.emoticon-green_book{background-position:-13701px 0}.emoticon-blue_book{background-position:-13733px 0}.emoticon-orange_book{background-position:-13765px 0}.emoticon-notebook{background-position:-13797px 0}.emoticon-notebook_with_decorative_cover{background-position:-13829px 0}.emoticon-ledger{background-position:-13861px 0}.emoticon-books{background-position:-13893px 0}.emoticon-bookmark{background-position:-13925px 0}.emoticon-name_badge{background-position:-13957px 0}.emoticon-microscope{background-position:-13989px 0}.emoticon-telescope{background-position:-14021px 0}.emoticon-newspaper{background-position:-14053px 0}.emoticon-football{background-position:-14085px 0}.emoticon-basketball{background-position:-14117px 0}.emoticon-soccer{background-position:-14149px 0}.emoticon-baseball{background-position:-14181px 0}.emoticon-tennis{background-position:-14213px 0}.emoticon-8ball{background-position:-14245px 0}.emoticon-rugby_football{background-position:-14277px 0}.emoticon-bowling{background-position:-14309px 0}.emoticon-golf{background-position:-14341px 0}.emoticon-mountain_bicyclist{background-position:-14373px 0}.emoticon-bicyclist{background-position:-14405px 0}.emoticon-horse_racing{background-position:-14437px 0}.emoticon-snowboarder{background-position:-14469px 0}.emoticon-swimmer{background-position:-14501px 0}.emoticon-surfer{background-position:-14533px 0}.emoticon-ski{background-position:-14565px 0}.emoticon-spades{background-position:-14597px 0}.emoticon-hearts{background-position:-14629px 0}.emoticon-clubs{background-position:-14661px 0}.emoticon-diamonds{background-position:-14693px 0}.emoticon-gem{background-position:-14725px 0}.emoticon-ring{background-position:-14757px 0}.emoticon-trophy{background-position:-14789px 0}.emoticon-musical_score{background-position:-14821px 0}.emoticon-musical_keyboard{background-position:-14853px 0}.emoticon-violin{background-position:-14885px 0}.emoticon-space_invader{background-position:-14917px 0}.emoticon-video_game{background-position:-14949px 0}.emoticon-black_joker{background-position:-14981px 0}.emoticon-flower_playing_cards{background-position:-15013px 0}.emoticon-game_die{background-position:-15045px 0}.emoticon-dart{background-position:-15077px 0}.emoticon-mahjong{background-position:-15109px 0}.emoticon-clapper{background-position:-15141px 0}.emoticon-memo{background-position:-15173px 0}.emoticon-pencil{background-position:-15205px 0}.emoticon-book{background-position:-15237px 0}.emoticon-art{background-position:-15269px 0}.emoticon-microphone{background-position:-15301px 0}.emoticon-headphones{background-position:-15333px 0}.emoticon-trumpet{background-position:-15365px 0}.emoticon-saxophone{background-position:-15397px 0}.emoticon-guitar{background-position:-15429px 0}.emoticon-shoe{background-position:-15461px 0}.emoticon-sandal{background-position:-15493px 0}.emoticon-high_heel{background-position:-15525px 0}.emoticon-lipstick{background-position:-15557px 0}.emoticon-boot{background-position:-15589px 0}.emoticon-shirt{background-position:-15621px 0}.emoticon-tshirt{background-position:-15653px 0}.emoticon-necktie{background-position:-15685px 0}.emoticon-womans_clothes{background-position:-15717px 0}.emoticon-dress{background-position:-15749px 0}.emoticon-running_shirt_with_sash{background-position:-15781px 0}.emoticon-jeans{background-position:-15813px 0}.emoticon-kimono{background-position:-15845px 0}.emoticon-bikini{background-position:-15877px 0}.emoticon-ribbon{background-position:-15909px 0}.emoticon-tophat{background-position:-15941px 0}.emoticon-crown{background-position:-15973px 0}.emoticon-womans_hat{background-position:-16005px 0}.emoticon-mans_shoe{background-position:-16037px 0}.emoticon-closed_umbrella{background-position:-16069px 0}.emoticon-briefcase{background-position:-16101px 0}.emoticon-handbag{background-position:-16133px 0}.emoticon-pouch{background-position:-16165px 0}.emoticon-purse{background-position:-16197px 0}.emoticon-eyeglasses{background-position:-16229px 0}.emoticon-fishing_pole_and_fish{background-position:-16261px 0}.emoticon-coffee{background-position:-16293px 0}.emoticon-tea{background-position:-16325px 0}.emoticon-sake{background-position:-16357px 0}.emoticon-baby_bottle{background-position:-16389px 0}.emoticon-beer{background-position:-16421px 0}.emoticon-beers{background-position:-16453px 0}.emoticon-cocktail{background-position:-16485px 0}.emoticon-tropical_drink{background-position:-16517px 0}.emoticon-wine_glass{background-position:-16549px 0}.emoticon-fork_and_knife{background-position:-16581px 0}.emoticon-pizza{background-position:-16613px 0}.emoticon-hamburger{background-position:-16645px 0}.emoticon-fries{background-position:-16677px 0}.emoticon-poultry_leg{background-position:-16709px 0}.emoticon-meat_on_bone{background-position:-16741px 0}.emoticon-spaghetti{background-position:-16773px 0}.emoticon-curry{background-position:-16805px 0}.emoticon-fried_shrimp{background-position:-16837px 0}.emoticon-bento{background-position:-16869px 0}.emoticon-sushi{background-position:-16901px 0}.emoticon-fish_cake{background-position:-16933px 0}.emoticon-rice_ball{background-position:-16965px 0}.emoticon-rice_cracker{background-position:-16997px 0}.emoticon-rice{background-position:-17029px 0}.emoticon-ramen{background-position:-17061px 0}.emoticon-stew{background-position:-17093px 0}.emoticon-oden{background-position:-17125px 0}.emoticon-dango{background-position:-17157px 0}.emoticon-egg{background-position:-17189px 0}.emoticon-bread{background-position:-17221px 0}.emoticon-doughnut{background-position:-17253px 0}.emoticon-custard{background-position:-17285px 0}.emoticon-icecream{background-position:-17317px 0}.emoticon-ice_cream{background-position:-17349px 0}.emoticon-shaved_ice{background-position:-17381px 0}.emoticon-birthday{background-position:-17413px 0}.emoticon-cake{background-position:-17445px 0}.emoticon-cookie{background-position:-17477px 0}.emoticon-chocolate_bar{background-position:-17509px 0}.emoticon-candy{background-position:-17541px 0}.emoticon-lollipop{background-position:-17573px 0}.emoticon-honey_pot{background-position:-17605px 0}.emoticon-apple{background-position:-17637px 0}.emoticon-green_apple{background-position:-17669px 0}.emoticon-tangerine{background-position:-17701px 0}.emoticon-lemon{background-position:-17733px 0}.emoticon-cherries{background-position:-17765px 0}.emoticon-grapes{background-position:-17797px 0}.emoticon-watermelon{background-position:-17829px 0}.emoticon-strawberry{background-position:-17861px 0}.emoticon-peach{background-position:-17893px 0}.emoticon-melon{background-position:-17925px 0}.emoticon-banana{background-position:-17957px 0}.emoticon-pear{background-position:-17989px 0}.emoticon-pineapple{background-position:-18021px 0}.emoticon-sweet_potato{background-position:-18053px 0}.emoticon-eggplant{background-position:-18085px 0}.emoticon-tomato{background-position:-18117px 0}.emoticon-corn{background-position:-18149px 0}.emoticon-house{background-position:-18181px 0}.emoticon-house_with_garden{background-position:-18213px 0}.emoticon-school{background-position:-18245px 0}.emoticon-office{background-position:-18277px 0}.emoticon-post_office{background-position:-18309px 0}.emoticon-hospital{background-position:-18341px 0}.emoticon-bank{background-position:-18373px 0}.emoticon-convenience_store{background-position:-18405px 0}.emoticon-love_hotel{background-position:-18437px 0}.emoticon-hotel{background-position:-18469px 0}.emoticon-wedding{background-position:-18501px 0}.emoticon-church{background-position:-18533px 0}.emoticon-department_store{background-position:-18565px 0}.emoticon-european_post_office{background-position:-18597px 0}.emoticon-city_sunrise{background-position:-18629px 0}.emoticon-city_sunset{background-position:-18661px 0}.emoticon-japanese_castle{background-position:-18693px 0}.emoticon-european_castle{background-position:-18725px 0}.emoticon-tent{background-position:-18757px 0}.emoticon-factory{background-position:-18789px 0}.emoticon-tokyo_tower{background-position:-18821px 0}.emoticon-japan{background-position:-18853px 0}.emoticon-mount_fuji{background-position:-18885px 0}.emoticon-sunrise_over_mountains{background-position:-18917px 0}.emoticon-sunrise{background-position:-18949px 0}.emoticon-stars{background-position:-18981px 0}.emoticon-themoreyouknow{background-position:-18981px 0}.emoticon-tmyk{background-position:-18981px 0}.emoticon-statue_of_liberty{background-position:-19013px 0}.emoticon-bridge_at_night{background-position:-19045px 0}.emoticon-carousel_horse{background-position:-19077px 0}.emoticon-rainbow{background-position:-19109px 0}.emoticon-ferris_wheel{background-position:-19141px 0}.emoticon-fountain{background-position:-19173px 0}.emoticon-roller_coaster{background-position:-19205px 0}.emoticon-ship{background-position:-19237px 0}.emoticon-speedboat{background-position:-19269px 0}.emoticon-boat{background-position:-19301px 0}.emoticon-sailboat{background-position:-19333px 0}.emoticon-rowboat{background-position:-19365px 0}.emoticon-anchor{background-position:-19397px 0}.emoticon-rocket{background-position:-19429px 0}.emoticon-airplane{background-position:-19461px 0}.emoticon-helicopter{background-position:-19493px 0}.emoticon-steam_locomotive{background-position:-19525px 0}.emoticon-tram{background-position:-19557px 0}.emoticon-mountain_railway{background-position:-19589px 0}.emoticon-bike{background-position:-19621px 0}.emoticon-aerial_tramway{background-position:-19653px 0}.emoticon-suspension_railway{background-position:-19685px 0}.emoticon-mountain_cableway{background-position:-19717px 0}.emoticon-tractor{background-position:-19749px 0}.emoticon-blue_car{background-position:-19781px 0}.emoticon-oncoming_automobile{background-position:-19813px 0}.emoticon-car{background-position:-19845px 0}.emoticon-red_car{background-position:-19877px 0}.emoticon-taxi{background-position:-19909px 0}.emoticon-oncoming_taxi{background-position:-19941px 0}.emoticon-articulated_lorry{background-position:-19973px 0}.emoticon-bus{background-position:-20005px 0}.emoticon-oncoming_bus{background-position:-20037px 0}.emoticon-rotating_light{background-position:-20069px 0}.emoticon-police_car{background-position:-20101px 0}.emoticon-oncoming_police_car{background-position:-20133px 0}.emoticon-fire_engine{background-position:-20165px 0}.emoticon-ambulance{background-position:-20197px 0}.emoticon-minibus{background-position:-20229px 0}.emoticon-truck{background-position:-20261px 0}.emoticon-train{background-position:-20293px 0}.emoticon-station{background-position:-20325px 0}.emoticon-train2{background-position:-20357px 0}.emoticon-bullettrain_front{background-position:-20389px 0}.emoticon-bullettrain_side{background-position:-20421px 0}.emoticon-light_rail{background-position:-20453px 0}.emoticon-monorail{background-position:-20485px 0}.emoticon-railway_car{background-position:-20517px 0}.emoticon-trolleybus{background-position:-20549px 0}.emoticon-ticket{background-position:-20581px 0}.emoticon-fuelpump{background-position:-20613px 0}.emoticon-vertical_traffic_light{background-position:-20645px 0}.emoticon-traffic_light{background-position:-20677px 0}.emoticon-warning{background-position:-20709px 0}.emoticon-construction{background-position:-20741px 0}.emoticon-beginner{background-position:-20773px 0}.emoticon-atm{background-position:-20805px 0}.emoticon-slot_machine{background-position:-20837px 0}.emoticon-busstop{background-position:-20869px 0}.emoticon-barber{background-position:-20901px 0}.emoticon-hotsprings{background-position:-20933px 0}.emoticon-checkered_flag{background-position:-20965px 0}.emoticon-crossed_flags{background-position:-20997px 0}.emoticon-izakaya_lantern{background-position:-21029px 0}.emoticon-moyai{background-position:-21061px 0}.emoticon-circus_tent{background-position:-21093px 0}.emoticon-performing_arts{background-position:-21125px 0}.emoticon-round_pushpin{background-position:-21157px 0}.emoticon-triangular_flag_on_post{background-position:-21189px 0}.emoticon-jp{background-position:-21221px 0}.emoticon-kr{background-position:-21253px 0}.emoticon-cn{background-position:-21285px 0}.emoticon-us{background-position:-21317px 0}.emoticon-fr{background-position:-21349px 0}.emoticon-es{background-position:-21381px 0}.emoticon-it{background-position:-21413px 0}.emoticon-ru{background-position:-21445px 0}.emoticon-gb{background-position:-21477px 0}.emoticon-uk{background-position:-21509px 0}.emoticon-de{background-position:-21541px 0}.emoticon-one{background-position:-21573px 0}.emoticon-two{background-position:-21605px 0}.emoticon-three{background-position:-21637px 0}.emoticon-four{background-position:-21669px 0}.emoticon-five{background-position:-21701px 0}.emoticon-six{background-position:-21733px 0}.emoticon-seven{background-position:-21765px 0}.emoticon-eight{background-position:-21797px 0}.emoticon-nine{background-position:-21829px 0}.emoticon-keycap_ten{background-position:-21861px 0}.emoticon-1234{background-position:-21893px 0}.emoticon-zero{background-position:-21925px 0}.emoticon-hash{background-position:-21957px 0}.emoticon-symbols{background-position:-21989px 0}.emoticon-arrow_backward{background-position:-22021px 0}.emoticon-arrow_down{background-position:-22053px 0}.emoticon-arrow_forward{background-position:-22085px 0}.emoticon-arrow_left{background-position:-22117px 0}.emoticon-capital_abcd{background-position:-22149px 0}.emoticon-abcd{background-position:-22181px 0}.emoticon-abc{background-position:-22213px 0}.emoticon-arrow_lower_left{background-position:-22245px 0}.emoticon-arrow_lower_right{background-position:-22277px 0}.emoticon-arrow_right{background-position:-22309px 0}.emoticon-arrow_up{background-position:-22341px 0}.emoticon-arrow_upper_left{background-position:-22373px 0}.emoticon-arrow_upper_right{background-position:-22405px 0}.emoticon-arrow_double_down{background-position:-22437px 0}.emoticon-arrow_double_up{background-position:-22469px 0}.emoticon-arrow_down_small{background-position:-22501px 0}.emoticon-arrow_heading_down{background-position:-22533px 0}.emoticon-arrow_heading_up{background-position:-22565px 0}.emoticon-leftwards_arrow_with_hook{background-position:-22597px 0}.emoticon-arrow_right_hook{background-position:-22629px 0}.emoticon-left_right_arrow{background-position:-22661px 0}.emoticon-arrow_up_down{background-position:-22693px 0}.emoticon-arrow_up_small{background-position:-22725px 0}.emoticon-arrows_clockwise{background-position:-22757px 0}.emoticon-arrows_counterclockwise{background-position:-22789px 0}.emoticon-rewind{background-position:-22821px 0}.emoticon-fast_forward{background-position:-22853px 0}.emoticon-information_source{background-position:-22885px 0}.emoticon-ok{background-position:-22917px 0}.emoticon-twisted_rightwards_arrows{background-position:-22949px 0}.emoticon-repeat{background-position:-22981px 0}.emoticon-repeat_one{background-position:-23013px 0}.emoticon-new{background-position:-23045px 0}.emoticon-top{background-position:-23077px 0}.emoticon-up{background-position:-23109px 0}.emoticon-cool{background-position:-23141px 0}.emoticon-free{background-position:-23173px 0}.emoticon-ng{background-position:-23205px 0}.emoticon-cinema{background-position:-23237px 0}.emoticon-koko{background-position:-23269px 0}.emoticon-signal_strength{background-position:-23301px 0}.emoticon-u5272{background-position:-23333px 0}.emoticon-u5408{background-position:-23365px 0}.emoticon-u55b6{background-position:-23397px 0}.emoticon-u6307{background-position:-23429px 0}.emoticon-u6708{background-position:-23461px 0}.emoticon-u6709{background-position:-23493px 0}.emoticon-u6e80{background-position:-23525px 0}.emoticon-u7121{background-position:-23557px 0}.emoticon-u7533{background-position:-23589px 0}.emoticon-u7a7a{background-position:-23621px 0}.emoticon-u7981{background-position:-23653px 0}.emoticon-sa{background-position:-23685px 0}.emoticon-restroom{background-position:-23717px 0}.emoticon-mens{background-position:-23749px 0}.emoticon-womens{background-position:-23781px 0}.emoticon-baby_symbol{background-position:-23813px 0}.emoticon-no_smoking{background-position:-23845px 0}.emoticon-parking{background-position:-23877px 0}.emoticon-wheelchair{background-position:-23909px 0}.emoticon-metro{background-position:-23941px 0}.emoticon-baggage_claim{background-position:-23973px 0}.emoticon-accept{background-position:-24005px 0}.emoticon-wc{background-position:-24037px 0}.emoticon-potable_water{background-position:-24069px 0}.emoticon-put_litter_in_its_place{background-position:-24101px 0}.emoticon-secret{background-position:-24133px 0}.emoticon-congratulations{background-position:-24165px 0}.emoticon-m{background-position:-24197px 0}.emoticon-passport_control{background-position:-24229px 0}.emoticon-left_luggage{background-position:-24261px 0}.emoticon-customs{background-position:-24293px 0}.emoticon-ideograph_advantage{background-position:-24325px 0}.emoticon-cl{background-position:-24357px 0}.emoticon-sos{background-position:-24389px 0}.emoticon-id{background-position:-24421px 0}.emoticon-no_entry_sign{background-position:-24453px 0}.emoticon-underage{background-position:-24485px 0}.emoticon-no_mobile_phones{background-position:-24517px 0}.emoticon-do_not_litter{background-position:-24549px 0}.emoticon-non\-potable_water{background-position:-24581px 0}.emoticon-no_bicycles{background-position:-24613px 0}.emoticon-no_pedestrians{background-position:-24645px 0}.emoticon-children_crossing{background-position:-24677px 0}.emoticon-no_entry{background-position:-24709px 0}.emoticon-eight_spoked_asterisk{background-position:-24741px 0}.emoticon-eight_pointed_black_star{background-position:-24773px 0}.emoticon-heart_decoration{background-position:-24805px 0}.emoticon-vs{background-position:-24837px 0}.emoticon-vibration_mode{background-position:-24869px 0}.emoticon-mobile_phone_off{background-position:-24901px 0}.emoticon-chart{background-position:-24933px 0}.emoticon-currency_exchange{background-position:-24965px 0}.emoticon-aries{background-position:-24997px 0}.emoticon-taurus{background-position:-25029px 0}.emoticon-gemini{background-position:-25061px 0}.emoticon-cancer{background-position:-25093px 0}.emoticon-leo{background-position:-25125px 0}.emoticon-virgo{background-position:-25157px 0}.emoticon-libra{background-position:-25189px 0}.emoticon-scorpius{background-position:-25221px 0}.emoticon-sagittarius{background-position:-25253px 0}.emoticon-capricorn{background-position:-25285px 0}.emoticon-aquarius{background-position:-25317px 0}.emoticon-pisces{background-position:-25349px 0}.emoticon-ophiuchus{background-position:-25381px 0}.emoticon-six_pointed_star{background-position:-25413px 0}.emoticon-negative_squared_cross_mark{background-position:-25445px 0}.emoticon-a{background-position:-25477px 0}.emoticon-b{background-position:-25509px 0}.emoticon-ab{background-position:-25541px 0}.emoticon-o2{background-position:-25573px 0}.emoticon-diamond_shape_with_a_dot_inside{background-position:-25605px 0}.emoticon-recycle{background-position:-25637px 0}.emoticon-end{background-position:-25669px 0}.emoticon-on{background-position:-25701px 0}.emoticon-soon{background-position:-25733px 0}.emoticon-clock1{background-position:-25765px 0}.emoticon-clock130{background-position:-25797px 0}.emoticon-clock10{background-position:-25829px 0}.emoticon-clock1030{background-position:-25861px 0}.emoticon-clock11{background-position:-25893px 0}.emoticon-clock1130{background-position:-25925px 0}.emoticon-clock12{background-position:-25957px 0}.emoticon-clock1230{background-position:-25989px 0}.emoticon-clock2{background-position:-26021px 0}.emoticon-clock230{background-position:-26053px 0}.emoticon-clock3{background-position:-26085px 0}.emoticon-clock330{background-position:-26117px 0}.emoticon-clock4{background-position:-26149px 0}.emoticon-clock430{background-position:-26181px 0}.emoticon-clock5{background-position:-26213px 0}.emoticon-clock530{background-position:-26245px 0}.emoticon-clock6{background-position:-26277px 0}.emoticon-clock630{background-position:-26309px 0}.emoticon-clock7{background-position:-26341px 0}.emoticon-clock730{background-position:-26373px 0}.emoticon-clock8{background-position:-26405px 0}.emoticon-clock830{background-position:-26437px 0}.emoticon-clock9{background-position:-26469px 0}.emoticon-clock930{background-position:-26501px 0}.emoticon-heavy_dollar_sign{background-position:-26533px 0}.emoticon-copyright{background-position:-26565px 0}.emoticon-registered{background-position:-26597px 0}.emoticon-tm{background-position:-26629px 0}.emoticon-x{background-position:-26661px 0}.emoticon-heavy_exclamation_mark{background-position:-26693px 0}.emoticon-bangbang{background-position:-26725px 0}.emoticon-interrobang{background-position:-26757px 0}.emoticon-o{background-position:-26789px 0}.emoticon-heavy_multiplication_x{background-position:-26821px 0}.emoticon-heavy_plus_sign{background-position:-26853px 0}.emoticon-heavy_minus_sign{background-position:-26885px 0}.emoticon-heavy_division_sign{background-position:-26917px 0}.emoticon-white_flower{background-position:-26949px 0}.emoticon-100{background-position:-26981px 0}.emoticon-heavy_check_mark{background-position:-27013px 0}.emoticon-ballot_box_with_check{background-position:-27045px 0}.emoticon-radio_button{background-position:-27077px 0}.emoticon-link{background-position:-27109px 0}.emoticon-curly_loop{background-position:-27141px 0}.emoticon-wavy_dash{background-position:-27173px 0}.emoticon-part_alternation_mark{background-position:-27205px 0}.emoticon-trident{background-position:-27237px 0}.emoticon-black_large_square{background-position:-27269px 0}.emoticon-white_large_square{background-position:-27301px 0}.emoticon-white_check_mark{background-position:-27333px 0}.emoticon-black_square{background-position:-27268px 0}.emoticon-white_square{background-position:-27301px 0}.emoticon-black_square_button{background-position:-27365px 0}.emoticon-white_square_button{background-position:-27397px 0}.emoticon-black_circle{background-position:-27429px 0}.emoticon-white_circle{background-position:-27461px 0}.emoticon-red_circle{background-position:-27493px 0}.emoticon-large_blue_circle{background-position:-27525px 0}.emoticon-large_blue_diamond{background-position:-27557px 0}.emoticon-large_orange_diamond{background-position:-27589px 0}.emoticon-small_blue_diamond{background-position:-27621px 0}.emoticon-small_orange_diamond{background-position:-27653px 0}.emoticon-small_red_triangle{background-position:-27685px 0}.emoticon-small_red_triangle_down{background-position:-27717px 0}.emoticon-shipit{background-position:-27749px 0}md-expansion-panel{background:#fff}md-expansion-panel .md-expansion-panel-footer-container,md-expansion-panel .md-expansion-panel-header-container,md-expansion-panel md-expansion-panel-collapsed{background:#fff}md-expansion-panel .md-expansion-panel-footer-container .md-summary,md-expansion-panel .md-expansion-panel-footer-container .md-title,md-expansion-panel .md-expansion-panel-header-container .md-summary,md-expansion-panel .md-expansion-panel-header-container .md-title,md-expansion-panel md-expansion-panel-collapsed .md-summary,md-expansion-panel md-expansion-panel-collapsed .md-title{color:#333}md-expansion-panel md-expansion-panel-footer .md-expansion-panel-footer-container,md-expansion-panel md-expansion-panel-header .md-expansion-panel-header-container{border-color:#ddd}md-expansion-panel .md-expansion-panel-icon svg{fill:#999}md-expansion-panel[disabled] md-expansion-panel-collapsed .md-summary,md-expansion-panel[disabled] md-expansion-panel-collapsed .md-title{color:#ddd}md-expansion-panel[disabled] .md-expansion-panel-icon svg{fill:#ddd}md-expansion-panel:not(.md-open):not([disabled]):focus,md-expansion-panel:not(.md-open):not([disabled]):focus md-expansion-panel-collapsed{background:#eee}.layout-padding>md-expansion-panel-group{padding:0}md-expansion-panel{display:block;position:relative;outline:0;margin-top:0;margin-bottom:0;padding:0;box-shadow:0 -1px 0 #e5e5e5,0 0 2px rgba(0,0,0,.12),0 2px 4px rgba(0,0,0,.24)}md-expansion-panel.md-open{margin-top:16px;margin-bottom:16px}md-expansion-panel.md-open:first-of-type{margin-top:0}md-expansion-panel.md-close{overflow:hidden}md-expansion-panel:not(.md-no-animation).md-open{-webkit-transition:margin-top .12s cubic-bezier(.25,.8,.25,1),margin-bottom .12s cubic-bezier(.25,.8,.25,1);transition:margin-top .12s cubic-bezier(.25,.8,.25,1),margin-bottom .12s cubic-bezier(.25,.8,.25,1)}md-expansion-panel:not(.md-no-animation).md-close{-webkit-transition:margin-top 80ms cubic-bezier(.25,.8,.25,1),margin-bottom 80ms cubic-bezier(.25,.8,.25,1);transition:margin-top 80ms cubic-bezier(.25,.8,.25,1),margin-bottom 80ms cubic-bezier(.25,.8,.25,1)}md-expansion-panel-collapsed .md-title,md-expansion-panel-header .md-title{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:16px;font-weight:600;min-width:80px;max-width:184px;overflow:hidden;text-overflow:ellipsis;text-align:left;white-space:nowrap}md-expansion-panel-collapsed .md-summary,md-expansion-panel-header .md-summary{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:13px;overflow:hidden;text-overflow:ellipsis;text-align:left;white-space:nowrap}md-expansion-panel md-expansion-panel-collapsed{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:48px;line-height:48px;padding:0 24px;opacity:1;z-index:2;box-sizing:border-box}md-expansion-panel md-expansion-panel-collapsed.md-absolute{position:absolute}md-expansion-panel md-expansion-panel-collapsed.md-hide{opacity:0}md-expansion-panel:not(.md-no-animation) md-expansion-panel-collapsed.md-show{-webkit-transition:opacity 30ms linear;transition:opacity 30ms linear}md-expansion-panel:not(.md-no-animation) md-expansion-panel-collapsed.md-hide{-webkit-transition:opacity .1s cubic-bezier(.25,.8,.25,1);transition:opacity .1s cubic-bezier(.25,.8,.25,1)}md-expansion-panel md-expansion-panel-expanded{display:none;min-height:48px}md-expansion-panel md-expansion-panel-expanded.md-hide,md-expansion-panel md-expansion-panel-expanded.md-show{display:block}md-expansion-panel md-expansion-panel-expanded.md-scroll-y{overflow-y:auto}md-expansion-panel md-expansion-panel-expanded.md-overflow{overflow:hidden}md-expansion-panel md-expansion-panel-expanded md-expansion-panel-content{display:block;padding:16px 24px}md-expansion-panel:not(.md-no-animation) md-expansion-panel-expanded.md-show{-webkit-transition:max-height .12s cubic-bezier(.25,.8,.25,1),opacity .12s cubic-bezier(.25,.8,.25,1);transition:max-height .12s cubic-bezier(.25,.8,.25,1),opacity .12s cubic-bezier(.25,.8,.25,1)}md-expansion-panel:not(.md-no-animation) md-expansion-panel-expanded.md-hide{-webkit-transition:max-height 60ms cubic-bezier(.25,.8,.25,1),opacity 60ms cubic-bezier(.25,.8,.25,1);transition:max-height 60ms cubic-bezier(.25,.8,.25,1),opacity 60ms cubic-bezier(.25,.8,.25,1)}md-expansion-panel-header{display:block;position:relative;outline:0}md-expansion-panel-header .md-expansion-panel-header-container{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:48px;line-height:48px;padding:0 24px;box-sizing:border-box;border-bottom:1px solid;-webkit-box-align:center;-ms-flex-align:center;align-items:center}md-expansion-panel-header.md-stick .md-expansion-panel-header-container{position:fixed;z-index:2;-webkit-animation:panelBodyHeaderStickyHoverIn .3s ease-out both;animation:panelBodyHeaderStickyHoverIn .3s ease-out both}md-expansion-panel-header.md-no-stick .md-expansion-panel-header-container{-webkit-animation:panelBodyHeaderStickyHoverOut .3s ease-out both;animation:panelBodyHeaderStickyHoverOut .3s ease-out both}md-expansion-panel-footer{display:block;position:relative}md-expansion-panel-footer.md-hide,md-expansion-panel-footer.md-show{display:block}md-expansion-panel-footer .md-expansion-panel-footer-container{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:48px;line-height:48px;padding:0 24px;border-top:1px solid;box-sizing:border-box}md-expansion-panel-footer.md-stick .md-expansion-panel-footer-container{position:fixed;z-index:2}md-expansion-panel:not(.md-no-animation) .md-expansion-panel-icon{-webkit-transition:-webkit-transform .6s cubic-bezier(.25,.8,.25,1);transition:-webkit-transform .6s cubic-bezier(.25,.8,.25,1);transition:transform .6s cubic-bezier(.25,.8,.25,1);transition:transform .6s cubic-bezier(.25,.8,.25,1),-webkit-transform .6s cubic-bezier(.25,.8,.25,1)}md-expansion-panel .md-expansion-panel-icon{-webkit-transform:rotate(90deg);transform:rotate(90deg)}md-expansion-panel .md-expansion-panel-icon:first-child{margin-right:18px}md-expansion-panel.md-open>md-expansion-panel-expanded>md-expansion-panel-header .md-expansion-panel-header-container .md-expansion-panel-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}md-expansion-panel.md-open>md-expansion-panel.md-open>md-expansion-panel-collapsed .md-expansion-panel-icon{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}@-webkit-keyframes panelBodyHeaderStickyHoverIn{0%{box-shadow:0 0 0 0 transparent}100%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}}@keyframes panelBodyHeaderStickyHoverIn{0%{box-shadow:0 0 0 0 transparent}100%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}}@-webkit-keyframes panelBodyHeaderStickyHoverOut{0%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}100%{box-shadow:0 0 0 0 transparent}}@keyframes panelBodyHeaderStickyHoverOut{0%{box-shadow:0 2px 4px 0 rgba(0,0,0,.16)}100%{box-shadow:0 0 0 0 transparent}}[md-color-picker] .md-color-picker-input-container,md-color-picker .md-color-picker-input-container{position:relative}[md-color-picker] .md-color-picker-input-container .md-color-picker-input::-ms-clear,md-color-picker .md-color-picker-input-container .md-color-picker-input::-ms-clear{display:none}[md-color-picker] .md-color-picker-input-container .md-color-picker-preview,md-color-picker .md-color-picker-input-container .md-color-picker-preview{content:'';width:24px;height:24px;border:2px solid #fff;border-radius:50%;box-shadow:0 3px 1px -2px rgba(0,0,0,.14),0 2px 2px 0 rgba(0,0,0,.098),0 1px 5px 0 rgba(0,0,0,.084);position:relative;top:22px;overflow:hidden;background-color:#fff;background-image:-webkit-linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd),-webkit-linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd);background-image:linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd),linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd);background-size:8px 8px;background-position:0 0,4px 4px}[md-color-picker] .md-color-picker-input-container .md-color-picker-preview .md-color-picker-result,md-color-picker .md-color-picker-input-container .md-color-picker-preview .md-color-picker-result{width:100%;height:100%}[md-color-picker] .md-color-picker-input-container .md-color-picker-clear,md-color-picker .md-color-picker-input-container .md-color-picker-clear{position:absolute;bottom:42px;right:-16px;color:rgba(0,0,0,.26)}.md-color-picker-container{padding:8px;background:#fff;outline:0;height:397px;width:347px;opacity:1;overflow:hidden;z-index:1000}.md-color-picker-container .md-color-picker-arrow{border:0 solid transparent;border-right-width:30px;border-bottom-width:0;position:absolute;left:0;top:0;-webkit-transition:border-bottom-width cubic-bezier(.25,.8,.25,1) .25s,top cubic-bezier(.25,.8,.25,1) .25s;transition:border-bottom-width cubic-bezier(.25,.8,.25,1) .25s,top cubic-bezier(.25,.8,.25,1) .25s}.md-color-picker-container canvas{width:100%;height:100%}.md-color-picker-container .md-color-picker-preview{-webkit-box-flex:1;-ms-flex:1;flex:1;font-weight:700;font-size:18px;color:#fff;margin:-8px -8px 0;position:relative}.md-color-picker-container .md-color-picker-preview .md-color-picker-result{position:absolute;height:100%;opacity:1;background:red}.md-color-picker-container .md-color-picker-preview .md-color-picker-result>input{position:relative;top:-15px;opacity:0}.md-color-picker-container .md-color-picker-preview .md-color-picker-result>div{position:relative;width:100%}.md-color-picker-container .md-color-picker-preview .md-color-picker-result>div>input{border-width:0;background:0 0;text-align:center;position:absolute;top:-15px;bottom:0;left:0;right:0;color:#eee;outline:0;opacity:0}.md-color-picker-container .md-color-picker-preview .md-color-picker-result>div>input.switch{-webkit-transition:top cubic-bezier(.25,.8,.25,1) .25s,.25s opacity ease-out;transition:top cubic-bezier(.25,.8,.25,1) .25s,.25s opacity ease-out;top:0;opacity:1}.md-color-picker-container .md-color-picker-preview .md-color-picker-tabs .md-tab,.md-color-picker-container .md-color-picker-preview .md-color-picker-tabs md-pagination-wrapper,.md-color-picker-container .md-color-picker-preview .md-color-picker-tabs md-tabs-canvas,.md-color-picker-container .md-color-picker-preview .md-color-picker-tabs md-tabs-wrapper{max-height:28px;height:28px}.md-color-picker-container .md-color-picker-preview .md-color-picker-tabs md-ink-bar{background:rgba(255,255,255,.5)}.md-color-picker-container .md-color-picker-preview .md-color-picker-tabs .md-tab{padding-top:2px;background:rgba(255,255,255,.25);color:#eee;max-width:none!important}.md-color-picker-container .md-color-picker-preview .md-color-picker-tabs .md-tab.md-active{background:0 0}.md-color-picker-container .md-color-picker-preview.dark{color:#333}.md-color-picker-container .md-color-picker-preview.dark .md-color-picker-preview-input{color:#333}.md-color-picker-container .md-color-picker-preview.dark .md-tab{background:rgba(0,0,0,.25);color:#333}.md-color-picker-container .md-color-picker-preview.dark .md-tab.md-active{background:0 0}.md-color-picker-container .md-color-picker-preview.dark md-ink-bar{background:rgba(0,0,0,.5)}.md-color-picker-container .md-color-picker-tabs{margin:0 -8px 0}.md-color-picker-container .md-color-picker-tabs md-tabs[md-align-tabs=bottom]{padding-bottom:0}.md-color-picker-container .md-color-picker-tabs .md-tab,.md-color-picker-container .md-color-picker-tabs md-pagination-wrapper,.md-color-picker-container .md-color-picker-tabs md-tabs-canvas,.md-color-picker-container .md-color-picker-tabs md-tabs-wrapper{max-height:36px;height:36px}.md-color-picker-container .md-color-picker-tabs .md-tab{padding:7px 24px;background:0 0}.md-color-picker-container .md-color-picker-tabs .md-tab:last-of-type{margin-right:-2px}.md-color-picker-container .md-color-picker-tabs md-tabs:not(.md-no-tab-content):not(.md-dynamic-height){min-height:298px}.md-color-picker-container .md-color-picker-tabs md-tabs:not(.md-no-tab-content):not(.md-dynamic-height) md-tabs-content-wrapper{height:255px;margin-bottom:8px}.md-color-picker-container .md-color-picker-tabs md-tabs:not(.md-no-tab-content):not(.md-dynamic-height) md-tabs-content-wrapper md-tab-content{height:255px;padding:0 8px 0}.md-color-picker-container .md-color-picker-tabs md-tabs:not(.md-no-tab-content):not(.md-dynamic-height) md-tabs-content-wrapper md-tab-content [md-tabs-template]{height:100%}.md-color-picker-container .md-color-picker-tabs.md-color-picker-colors{margin:8px -8px -8px}.md-color-picker-container .md-color-picker-tabs.md-color-picker-colors md-ink-bar{top:auto}.md-color-picker-container .md-color-picker-tabs.md-color-picker-colors .md-tab{background:rgba(0,0,0,.075)}.md-color-picker-container .md-color-picker-tabs.md-color-picker-colors .md-tab.md-active{background:#fff}.md-color-picker-container .md-color-picker-colors{overflow:hidden;margin-top:8px}.md-color-picker-container .md-color-picker-colors .md-color-picker-marker{position:absolute;border:2px solid #fff;box-shadow:0 0 2px 0 rgba(0,0,0,.5)}.md-color-picker-container .md-color-picker-colors [md-color-picker-spectrum]{position:relative;cursor:crosshair;overflow:hidden;height:255px;width:255px}.md-color-picker-container .md-color-picker-colors [md-color-picker-spectrum] .md-color-picker-marker{width:12px;height:12px;border-radius:50%;box-shadow:0 0 2px 0 rgba(0,0,0,.5),inset 0 0 2px 0 rgba(0,0,0,.5);top:-5px;left:calc(100% - 5px)}.md-color-picker-container .md-color-picker-colors [md-color-picker-alpha],.md-color-picker-container .md-color-picker-colors [md-color-picker-hue]{position:relative;cursor:crosshair;overflow:hidden;width:30px}.md-color-picker-container .md-color-picker-colors [md-color-picker-alpha].md-color-picker-wide,.md-color-picker-container .md-color-picker-colors [md-color-picker-hue].md-color-picker-wide{width:67px}.md-color-picker-container .md-color-picker-colors [md-color-picker-alpha] .md-color-picker-marker,.md-color-picker-container .md-color-picker-colors [md-color-picker-hue] .md-color-picker-marker{height:5px;width:100%;border-left:0;border-right:0;top:-2px;left:0}.md-color-picker-container .md-color-picker-sliders md-slider.red-slider .md-track-fill{background:#d01515}.md-color-picker-container .md-color-picker-sliders md-slider.red-slider .md-thumb:after{background-color:#d01515;border-color:#d01515}.md-color-picker-container .md-color-picker-sliders md-slider.green-slider .md-track-fill{background:#19d015}.md-color-picker-container .md-color-picker-sliders md-slider.green-slider .md-thumb:after{background-color:#19d015;border-color:#19d015}.md-color-picker-container .md-color-picker-sliders md-slider.blue-slider .md-track-fill{background:#1560d0}.md-color-picker-container .md-color-picker-sliders md-slider.blue-slider .md-thumb:after{background-color:#1560d0;border-color:#1560d0}.md-color-picker-container .md-color-picker-material-palette .md-color-picker-material-title{font-size:22px;line-height:75px;padding:0 15px;color:rgba(0,0,0,.85);text-transform:capitalize}.md-color-picker-container .md-color-picker-material-palette .md-color-picker-material-title.dark{color:rgba(255,255,255,.85)}.md-color-picker-container .md-color-picker-material-palette .md-color-picker-material-title:not(:first-child){margin-top:16px}.md-color-picker-container .md-color-picker-material-palette .md-color-picker-with-label{font-size:12px;line-height:33px;padding:0 5px;color:rgba(0,0,0,.7)}.md-color-picker-container .md-color-picker-material-palette .md-color-picker-with-label.dark{color:rgba(255,255,255,.7)}.md-color-picker-container .md-color-picker-material-palette .md-color-picker-material-colors{position:absolute;-webkit-transition:left cubic-bezier(.25,.8,.25,1) .25s,right cubic-bezier(.25,.8,.25,1) .25s,top cubic-bezier(.25,.8,.25,1) .25s,bottom cubic-bezier(.25,.8,.25,1) .25s;transition:left cubic-bezier(.25,.8,.25,1) .25s,right cubic-bezier(.25,.8,.25,1) .25s,top cubic-bezier(.25,.8,.25,1) .25s,bottom cubic-bezier(.25,.8,.25,1) .25s}.md-color-picker-container .md-color-picker-history>div>div{height:20px;margin:4px;background-color:#fff;background-image:-webkit-linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd),-webkit-linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd);background-image:linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd),linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd);background-size:8px 8px;background-position:0 0,4px 4px}.md-color-picker-container .md-color-picker-history>div>div>div{width:100%;height:100%}.md-color-picker-container .md-color-picker-history button{margin-top:auto;margin-left:auto}.md-color-picker-checkered-bg{background-color:#fff;background-image:-webkit-linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd),-webkit-linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd);background-image:linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd),linear-gradient(45deg,#ddd 25%,transparent 25%,transparent 75%,#ddd 75%,#ddd);background-size:8px 8px;background-position:0 0,4px 4px}.emojione{font-size:inherit;height:3ex;width:3.1ex;min-height:20px;min-width:20px;display:inline-block;margin:-.2ex .15em .2ex;line-height:normal;vertical-align:middle}img.emojione{width:auto}.dropdown-menu.textcomplete-dropdown[data-strategy=emojionearea]{position:absolute;z-index:1000;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;-moz-box-shadow:0 6px 12px rgba(0,0,0,.175);-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.textcomplete-dropdown[data-strategy=emojionearea] li.textcomplete-item{font-size:14px;padding:1px 3px;border:0}.dropdown-menu.textcomplete-dropdown[data-strategy=emojionearea] li.textcomplete-item a{text-decoration:none;display:block;height:100%;line-height:1.8em;padding:0 1.54em 0 .615em;color:#4f4f4f}.dropdown-menu.textcomplete-dropdown[data-strategy=emojionearea] li.textcomplete-item.active,.dropdown-menu.textcomplete-dropdown[data-strategy=emojionearea] li.textcomplete-item:hover{background-color:#e4e4e4}.dropdown-menu.textcomplete-dropdown[data-strategy=emojionearea] li.textcomplete-item.active a,.dropdown-menu.textcomplete-dropdown[data-strategy=emojionearea] li.textcomplete-item:hover a{color:#333}.dropdown-menu.textcomplete-dropdown[data-strategy=emojionearea] li.textcomplete-item .emojioneemoji{font-size:inherit;height:2ex;width:2.1ex;min-height:20px;min-width:20px;display:inline-block;margin:0 5px .2ex 0;line-height:normal;vertical-align:middle;max-width:100%;top:0}.emojionearea-text .emojioneemoji,.emojionearea-text [class*=emojione-]{font-size:inherit;height:2ex;width:2.1ex;min-height:20px;min-width:20px;display:inline-block;margin:-.2ex .15em .2ex;line-height:normal;vertical-align:middle;max-width:100%;top:0}.emojionearea,.emojionearea *{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.emojionearea.emojionearea-disable{position:relative;background-color:#eee;-moz-user-select:-moz-none;-ms-user-select:none;-webkit-user-select:none;user-select:none}.emojionearea.emojionearea-disable:before{content:"";display:block;top:0;left:0;right:0;bottom:0;z-index:1;opacity:.3;position:absolute;background-color:#eee}.emojionearea,.emojionearea.form-control{display:block;position:relative!important;width:100%;height:auto;padding:0;font-size:14px;background-color:#fff;border:1px solid #ccc;-moz-border-radius:3px;-webkit-border-radius:3px;border-radius:3px;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-moz-transition:border-color .15s ease-in-out,-moz-box-shadow .15s ease-in-out;-o-transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out;-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.emojionearea.focused{border-color:#66afe9;outline:0;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.emojionearea .emojionearea-editor{display:block;height:auto;min-height:8em;max-height:15em;overflow:auto;padding:6px 24px 6px 12px;line-height:1.42857143;font-size:inherit;color:#555;background-color:transparent;border:0;cursor:text;margin-right:1px;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.emojionearea .emojionearea-editor:empty:before{content:attr(placeholder);display:block;color:#bbb}.emojionearea .emojionearea-editor:focus{border:0;outline:0;-moz-box-shadow:none;-webkit-box-shadow:none;box-shadow:none}.emojionearea .emojionearea-editor .emojioneemoji,.emojionearea .emojionearea-editor [class*=emojione-]{font-size:inherit;height:2ex;width:2.1ex;min-height:20px;min-width:20px;display:inline-block;margin:-.2ex .15em .2ex;line-height:normal;vertical-align:middle;max-width:100%;top:0}.emojionearea.emojionearea-inline{height:34px}.emojionearea.emojionearea-inline>.emojionearea-editor{height:32px;min-height:20px;overflow:hidden;white-space:nowrap;position:absolute;top:0;left:12px;right:24px;padding:6px 0}.emojionearea.emojionearea-inline>.emojionearea-button{top:4px}.emojionearea .emojionearea-button{z-index:5;position:absolute;right:3px;top:3px;width:24px;height:24px;opacity:.6;cursor:pointer;-moz-transition:opacity .3s ease-in-out;-o-transition:opacity .3s ease-in-out;-webkit-transition:opacity .3s ease-in-out;transition:opacity .3s ease-in-out}.emojionearea .emojionearea-button:hover{opacity:1}.emojionearea .emojionearea-button>div{display:block;width:24px;height:24px;position:absolute;-moz-transition:all .4s ease-in-out;-o-transition:all .4s ease-in-out;-webkit-transition:all .4s ease-in-out;transition:all .4s ease-in-out}.emojionearea .emojionearea-button>div.emojionearea-button-open{background-position:0 -24px;opacity:1}.emojionearea .emojionearea-button>div.emojionearea-button-close{background-position:0 0;-webkit-transform:rotate(-45deg);-o-transform:rotate(-45deg);transform:rotate(-45deg);opacity:0}.emojionearea .emojionearea-button.active>div.emojionearea-button-open{-webkit-transform:rotate(45deg);-o-transform:rotate(45deg);transform:rotate(45deg);opacity:0}.emojionearea .emojionearea-button.active>div.emojionearea-button-close{-webkit-transform:rotate(0);-o-transform:rotate(0);transform:rotate(0);opacity:1}.emojionearea .emojionearea-picker{background:#fff;position:absolute;-moz-box-shadow:0 1px 5px rgba(0,0,0,.32);-webkit-box-shadow:0 1px 5px rgba(0,0,0,.32);box-shadow:0 1px 5px rgba(0,0,0,.32);-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;height:276px;width:316px;top:-15px;right:-15px;z-index:90;-moz-transition:all .25s ease-in-out;-o-transition:all .25s ease-in-out;-webkit-transition:all .25s ease-in-out;transition:all .25s ease-in-out;opacity:0;-moz-user-select:-moz-none;-ms-user-select:none;-webkit-user-select:none;user-select:none}.emojionearea .emojionearea-picker.hidden{display:none}.emojionearea .emojionearea-picker .emojionearea-wrapper{position:relative;height:276px;width:316px}.emojionearea .emojionearea-picker .emojionearea-wrapper:after{content:"";display:block;position:absolute;background-repeat:no-repeat;z-index:91}.emojionearea .emojionearea-picker .emojionearea-filters{width:100%;position:absolute;z-index:95;background:#f5f7f9;padding:0 0 0 7px;height:40px}.emojionearea .emojionearea-picker .emojionearea-filters .emojionearea-filter{display:block;float:left;height:40px;width:32px;padding:7px 1px 0;cursor:pointer;-webkit-filter:grayscale(1);filter:grayscale(1)}.emojionearea .emojionearea-picker .emojionearea-filters .emojionearea-filter.active{background:#fff}.emojionearea .emojionearea-picker .emojionearea-filters .emojionearea-filter.active,.emojionearea .emojionearea-picker .emojionearea-filters .emojionearea-filter:hover{-webkit-filter:grayscale(0);filter:grayscale(0)}.emojionearea .emojionearea-picker .emojionearea-filters .emojionearea-filter>i{width:24px;height:24px;top:0}.emojionearea .emojionearea-picker .emojionearea-filters .emojionearea-filter>img{width:24px;height:24px;margin:0 3px}.emojionearea .emojionearea-picker .emojionearea-search-panel{height:30px;position:absolute;z-index:95;top:40px;left:0;right:0;padding:5px 0 5px 8px}.emojionearea .emojionearea-picker .emojionearea-search-panel .emojionearea-tones{float:right;margin-right:10px;margin-top:-1px}.emojionearea .emojionearea-picker .emojionearea-tones-panel .emojionearea-tones{position:absolute;top:4px;left:171px}.emojionearea .emojionearea-picker .emojionearea-search{float:left;padding:0;height:20px;width:160px}.emojionearea .emojionearea-picker .emojionearea-search>input{outline:0;width:160px;min-width:160px;height:20px}.emojionearea .emojionearea-picker .emojionearea-tones{padding:0;width:120px;height:20px}.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone{display:inline-block;padding:0;border:0;vertical-align:middle;outline:0;background:0 0;cursor:pointer;position:relative}.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-0,.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-0:after{background-color:#ffcf3e}.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-1,.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-1:after{background-color:#fae3c5}.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-2,.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-2:after{background-color:#e2cfa5}.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-3,.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-3:after{background-color:#daa478}.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-4,.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-4:after{background-color:#a78058}.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-5,.emojionearea .emojionearea-picker .emojionearea-tones>.btn-tone.btn-tone-5:after{background-color:#5e4d43}.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-bullet>.btn-tone,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-square>.btn-tone{width:20px;height:20px;margin:0;background-color:transparent}.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-bullet>.btn-tone:after,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-square>.btn-tone:after{content:"";position:absolute;display:block;top:4px;left:4px;width:12px;height:12px}.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-bullet>.btn-tone.active:after,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-square>.btn-tone.active:after{top:0;left:0;width:20px;height:20px}.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-checkbox>.btn-tone,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-radio>.btn-tone{width:16px;height:16px;margin:0 2px}.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-checkbox>.btn-tone.active:after,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-radio>.btn-tone.active:after{content:"";position:absolute;display:block;background-color:transparent;border:2px solid #fff;width:8px;height:8px;top:2px;left:2px;box-sizing:initial}.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-category-block:after,.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-category-block:before,.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-category-block>.emojionearea-category:after,.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-category-block>.emojionearea-category:before,.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-category-title:after,.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-category-title:before{content:" ";clear:both;display:block}.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-bullet>.btn-tone,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-bullet>.btn-tone:after,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-radio>.btn-tone,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-radio>.btn-tone:after{-moz-border-radius:100%;-webkit-border-radius:100%;border-radius:100%}.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-checkbox>.btn-tone,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-checkbox>.btn-tone:after,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-square>.btn-tone,.emojionearea .emojionearea-picker .emojionearea-tones.emojionearea-tones-square>.btn-tone:after{-moz-border-radius:1px;-webkit-border-radius:1px;border-radius:1px}.emojionearea .emojionearea-picker .emojionearea-scroll-area{height:236px;overflow:auto;overflow-x:hidden;width:100%;position:absolute;padding:0 0 5px}.emojionearea .emojionearea-picker .emojionearea-search-panel+.emojionearea-scroll-area{height:206px}.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-emojis-list{z-index:1}.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-category-title{display:block;font-family:Arial,'Helvetica Neue',Helvetica,sans-serif;font-size:13px;font-weight:400;color:#b2b2b2;background:#fff;line-height:20px;margin:0;padding:7px 0 5px 6px}.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-category-block{padding:0 0 0 7px}.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojionearea-category-block>.emojionearea-category{padding:0!important}.emojionearea .emojionearea-picker .emojionearea-scroll-area [class*=emojione-]{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;margin:0;width:24px;height:24px;top:0}.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojibtn{-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;width:24px;height:24px;float:left;display:block;margin:1px;padding:3px}.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojibtn:hover{-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px;background-color:#e4e4e4;cursor:pointer}.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojibtn i,.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojibtn img{float:left;display:block;width:24px;height:24px}.emojionearea .emojionearea-picker .emojionearea-scroll-area .emojibtn img.lazy-emoji{opacity:0}.emojionearea .emojionearea-picker.emojionearea-filters-position-top .emojionearea-filters{top:0;-moz-border-radius-topleft:5px;-webkit-border-top-left-radius:5px;border-top-left-radius:5px;-moz-border-radius-topright:5px;-webkit-border-top-right-radius:5px;border-top-right-radius:5px}.emojionearea .emojionearea-picker.emojionearea-filters-position-top.emojionearea-search-position-top .emojionearea-scroll-area{bottom:0}.emojionearea .emojionearea-picker.emojionearea-filters-position-top.emojionearea-search-position-bottom .emojionearea-scroll-area{top:40px}.emojionearea .emojionearea-picker.emojionearea-filters-position-top.emojionearea-search-position-bottom .emojionearea-search-panel{top:initial;bottom:0}.emojionearea .emojionearea-picker.emojionearea-filters-position-bottom .emojionearea-filters{bottom:0;-moz-border-radius-bottomleft:5px;-webkit-border-bottom-left-radius:5px;border-bottom-left-radius:5px;-moz-border-radius-bottomright:5px;-webkit-border-bottom-right-radius:5px;border-bottom-right-radius:5px}.emojionearea .emojionearea-picker.emojionearea-filters-position-bottom.emojionearea-search-position-bottom .emojionearea-scroll-area{top:0}.emojionearea .emojionearea-picker.emojionearea-filters-position-bottom.emojionearea-search-position-bottom .emojionearea-search-panel,.emojionearea .emojionearea-picker.emojionearea-filters-position-bottom.emojionearea-search-position-top .emojionearea-scroll-area{top:initial;bottom:40px}.emojionearea .emojionearea-picker.emojionearea-filters-position-bottom.emojionearea-search-position-top .emojionearea-search-panel{top:0}.emojionearea .emojionearea-picker.emojionearea-picker-position-top{margin-top:-286px;right:-14px}.emojionearea .emojionearea-picker.emojionearea-picker-position-top .emojionearea-wrapper:after{width:19px;height:10px;background-position:-2px -49px;bottom:-10px;right:20px}.emojionearea .emojionearea-picker.emojionearea-picker-position-top.emojionearea-filters-position-bottom .emojionearea-wrapper:after{background-position:-2px -80px}.emojionearea .emojionearea-picker.emojionearea-picker-position-left,.emojionearea .emojionearea-picker.emojionearea-picker-position-right{margin-right:-326px;top:-8px}.emojionearea .emojionearea-picker.emojionearea-picker-position-left .emojionearea-wrapper:after,.emojionearea .emojionearea-picker.emojionearea-picker-position-right .emojionearea-wrapper:after{width:10px;height:19px;background-position:0 -60px;top:13px;left:-10px}.emojionearea .emojionearea-picker.emojionearea-picker-position-left.emojionearea-filters-position-bottom .emojionearea-wrapper:after,.emojionearea .emojionearea-picker.emojionearea-picker-position-right.emojionearea-filters-position-bottom .emojionearea-wrapper:after{background-position:right -60px}.emojionearea .emojionearea-picker.emojionearea-picker-position-bottom{margin-top:10px;right:-14px;top:47px}.emojionearea .emojionearea-picker.emojionearea-picker-position-bottom .emojionearea-wrapper:after{width:19px;height:10px;background-position:-2px -100px;top:-10px;right:20px}.emojionearea .emojionearea-picker.emojionearea-picker-position-bottom.emojionearea-filters-position-bottom .emojionearea-wrapper:after{background-position:-2px -90px}.emojionearea .emojionearea-button.active+.emojionearea-picker{opacity:1}.emojionearea .emojionearea-button.active+.emojionearea-picker-position-top{margin-top:-269px}.emojionearea .emojionearea-button.active+.emojionearea-picker-position-left,.emojionearea .emojionearea-button.active+.emojionearea-picker-position-right{margin-right:-309px}.emojionearea .emojionearea-button.active+.emojionearea-picker-position-bottom{margin-top:-7px}.emojionearea.emojionearea-standalone{display:inline-block;width:auto;box-shadow:none}.emojionearea.emojionearea-standalone .emojionearea-editor{min-height:33px;position:relative;padding:6px 42px 6px 6px}.emojionearea.emojionearea-standalone .emojionearea-editor::before{content:"";position:absolute;top:4px;left:50%;bottom:4px;border-left:1px solid #e6e6e6}.emojionearea.emojionearea-standalone .emojionearea-editor.has-placeholder .emojioneemoji{opacity:.4}.emojionearea.emojionearea-standalone .emojionearea-button{top:0;right:0;bottom:0;left:0;width:auto;height:auto}.emojionearea.emojionearea-standalone .emojionearea-button>div{right:6px;top:5px}.emojionearea.emojionearea-standalone .emojionearea-picker.emojionearea-picker-position-bottom .emojionearea-wrapper:after,.emojionearea.emojionearea-standalone .emojionearea-picker.emojionearea-picker-position-top .emojionearea-wrapper:after{right:23px}.emojionearea.emojionearea-standalone .emojionearea-picker.emojionearea-picker-position-left .emojionearea-wrapper:after,.emojionearea.emojionearea-standalone .emojionearea-picker.emojionearea-picker-position-right .emojionearea-wrapper:after{top:15px}.emojionearea .emojionearea-button>div,.emojionearea .emojionearea-picker .emojionearea-wrapper:after{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAABuCAYAAADMB4ipAAAHfElEQVRo3u1XS1NT2Rb+9uOcQF4YlAJzLymFUHaLrdxKULvEUNpdTnRqD532f+AHMLMc94gqR1Zbt8rBnUh3YXipPGKwRDoWgXvrYiFUlEdIkPPYZ/dAkwox5yQCVt/bzRrBPnt9e+211/etFeDQDu3ArL+/X37OeqmRWoH7+vpItfWawStF1tfXR+zW9xW5ne0p8loOcAKuCdwpRft60C8a+X5zTvebCqcAvmidf1GGHtqhHdpf1qqKzsrKipyensbi4iKWl5cBAMFgEG1tbYhGo2hpadlbmxseHpaDg4MAgI6ODng8HgBAPp/H/Pw8AODatWvo7e2tvUHrui7v3r2L+fl5XL58GVeuXIHH49m1N5/Py0ePHmF0dBQdHR24desWVFXdtYdXAn/48CHm5+dx8+ZNRKPRigEUDpuenpb3799H4YaOnWh5eVmOj48jFoshGo0STdPkwMCAXF5elqV7BgYGpKZpMhqNklgshrGxMbx580Y6gicSCTDGEIvFAADpdBqpVArJZLK4J5lMIpVKIZ1OAwBisRgYY0gkEs6Rp1IphMNh+Hw+AgCGYQAANE0r7in8Xfjm8/lIOBzGq1evnMHX19fR1NRU/D8UCoFzjnA4XFwLh8PgnCMUChXXmpqakM1mUfVBS62xsZHk83lZWi1nz579ZA0AhBDO4A0NDchkMsWSJIRAURRiVy26rktVVUkmk0EgEHAGP3XqFKamppDP56Vpmrhz5w5u374t/X4/OP+w3TRNZLNZ6LoO0zSRz+dlf38/Ll686Jzz8+fPQwiBeDwOt9tNrl+/jkwmU6yaQpVkMhncuHEDbrebxONxCCEQiUScIw8Gg+TBgwdyZGQEyWRSdnV1kVQqJYeGhrC6ugrGGEKhEHp7e3Hy5EmSTCblvXv30NPTg2AwSA6M/vF4HCMjI7b0/yzh8vv9AIBsNrt34aokuQsLC7skt729varkHtqftUFf++FHsrq0QN3eBvp68Tfvf9Mv12oFCYU7G//e9nVuO7dpNbe2W4M//yQr0p8yRvyBo1Zr++lwLcCt7afD/sBRizJGavrB1dDYYh47Htrq+Kb7jBNwxzfdZ44dD201NLaYVUkU7ozQpuAJBkARwnRZpunN5zaa5hJjiXLH05GeiMd7JEM5zzHGNQBGZvk/Iv0yYVWMvK0zKk1Dl6ahW5RQobjqdjy+wEZn9PKF0n2d0csXPL7AhuKq26GECtPQLdPQZVtn1LlB69p7yRVVSEiDEGJwRd12e4+8PR3piRQidnuPvOWKuk0IMSSkwRVV6Np7WVVbSqvGsgSnlKkAFNPQXdrOtuKqcxtcUTUAhmUJnVJmlleJo3CVHmAaOlPUOmYJkxFKibQsSRkXhr4juKIKO2BHVSwcoLrqCVdUYho6K3YYRRWmoUtdey/tgKtK7rUffiQAsLq08MnbNLe2WwBgB/zHzueFyD8nwlIfbvdx8eU0WV1aKD1cVAMs9+F2j9gUPEEKemEJIe3AnXy4XfkBoNKSZHNthWfX31EA69VKttyHVyIOY1wRwmS6tqNsrr31vXo5k/bUu4gT2cp9lhbm0rzCJpeUUrE0vS63+c7/6uXMbDUWl/ssLczNFrVFddUT09AZpUy1LKvO0DVfPrfR9HxqfNbuEe185l9MFX3o6tIC5YpKFLWOfdQQ93Zu49j0+FDCDtjOp1yaOQCYhs4Y40wI05XfWj8yPT40Ua2ey33mEmMTtp2IUEq0nW3FKeJPGPjRp1Iz2QUuLUu66txG9NLVSK3gBZ+C1lcE54oqKOOCK6rm8QU2unu+u1ANuNynvFsBAG1ubbdMQ5eGviMAFDuP0w3sfMpvQEtb24fOQncU1bXl8R7JnOu+ZNv97XxKJwY6+PNPsrm13drObVqUMlMIU5OWpVHOc96Go5lTnV2fzC/VfAozD7HTCa6olBBa1Imlhbmq2lLuQ5xaW6nCPfnln0Yt7bDUhzhps8cfKH5//uTXmvS81OeLdqI/ZoROzSZrHqG/OvOPzxuhK5VgJTvV2bW3EdqJRABwrvvS/kfoSkoZvXT1YEbociHr7vnuYEfogpBFL109HKH/h0fomnXg3Lff79r7/MmvVbWG7gX4QObzc99+Tz7mHKah05KcW6ahQ9feS6cbMCdgt7eBWJagjCuUAC5tZzuouuo0Spm0hElc9R4cbf4bVl8v1p6WUmCuqEwIs34ruxaeeTy4uJVd67As08UVlVmWoG5vA7FLG3WMmHEupVTyW+vh2cn4DADMTsaTuc21LiGEhzHOnQ6gNtMrJSBMCKHkNt999WLi0S7hejEZH81n174WpukiIMw0dKq66p3Bw50RwhUVXFGJKUy28Xal48VkfKrSlWenhsc23q2cEB9SR7iiItwZIbbgHn8AlDFCCMW7laXjqZnHjkNpaubJzNuVpWZCKChjxOMPVH/QlaW0f/G3ZLqWWl6ce/bvlddp7yFD/w8Z+njoX1+GoZMjgzMAMDkyeLAMnRh+uKveJ0YGD4ahEyODFRk6OfrL/hj67GnckaHPng7vjaGzyYmaGDr77KktQ38H8tqx8Wja+WIAAAAASUVORK5CYII=)!important}.emojionearea.emojionearea-standalone .emojionearea-editor.has-placeholder{background-repeat:no-repeat;background-position:20px 4px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMAQMAAABsu86kAAAABlBMVEUAAAC/v79T5hyIAAAAAXRSTlMAQObYZgAAABNJREFUCNdjYGNgQEb/P4AQqiAASiUEG6Vit44AAAAASUVORK5CYII=)!important}md-date-range{cursor:pointer}md-date-range-picker{display:block;max-width:664px}md-date-range-picker .md-date-range-picker__one-panel{display:block;max-width:340px}.md-date-range-picker [event-key] *{pointer-events:none}.md-date-range-picker{position:relative;background:#fff}.md-date-range-picker__title{text-align:center;font-size:1rem;background:#106cc8;color:#fff;margin:0;padding:16px 0}.md-date-range-picker__month-year{text-align:center;font-size:1rem;background:#eee;margin:0;padding:0 0}.md-date-range-picker__month-year .md-select-icon{display:none}.md-date-range-picker__month-year md-select{margin:10px 0}.md-date-range-picker__templates{background:#eee}.md-date-range-picker__calendar-wrapper{padding:0 0;width:308px;min-width:308px}.md-date-range-picker__week{background:#e0e0e0}.md-date-range-picker__calendar__grid{font-size:13px;color:#222;padding:0;display:inline-block;width:44px;height:44px;line-height:44px;text-align:center;position:relative;outline:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:50%;background:rgba(2550,255,255,0)}.md-date-range-picker__calendar .md-date-range-picker__calendar__grid{cursor:pointer}.md-date-range-picker__calendar__not-in-active-month{color:rgba(0,0,0,.5)}.md-date-range-picker__calendar .md-date-range-picker__calendar__grid:hover:not(.md-date-range-picker__calendar__selected):not(.md-date-range-picker__calendar__disabled){transition:background .3s ease-out;background:rgba(0,0,0,.1)}.md-date-range-picker__calendar__selected{background:#106cc8;color:#fff;border-radius:0}.md-date-range-picker__calendar__selected.md-date-range-picker__calendar__disabled{background:rgba(0,0,0,.2)}.md-date-range-picker__calendar__not-in-active-month.md-date-range-picker__calendar__selected{color:rgba(255,255,255,.2)}.md-date-range-picker__calendar__today{font-weight:700}.md-date-range-picker__calendar .md-date-range-picker__calendar__grid.md-date-range-picker__calendar__disabled{opacity:.3;cursor:not-allowed}.md-date-range-picker__calendar__start{border-top-left-radius:50%;border-bottom-left-radius:50%}.md-date-range-picker__calendar__end{border-top-right-radius:50%;border-bottom-right-radius:50%}.md-date-range-picker__select{z-index:100}.md-date-range-picker__calendar__selection{pointer-events:none}.angucomplete-holder{position:relative}.angucomplete-dropdown{border-color:#ececec;border-width:1px;border-style:solid;border-radius:2px;width:250px;padding:6px;cursor:pointer;z-index:9999;position:absolute;margin-top:-6px;background-color:#fff}.angucomplete-searching{color:#acacac;font-size:14px}.angucomplete-description{font-size:14px}.angucomplete-row{padding:5px;color:#000;margin-bottom:4px;clear:both}.angucomplete-selected-row{background-color:#add8e6;color:#fff}.angucomplete-image-holder{padding-top:2px;float:left;margin-right:10px;margin-left:5px}.angucomplete-image{height:34px;width:34px;border-radius:50%;border-color:#ececec;border-style:solid;border-width:1px}.angucomplete-image-default{background-position:center;background-size:contain;height:34px;width:34px}/*!
  * Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com
  * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
  */.fa,.fab,.fad,.fal,.far,.fas{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-block;font-style:normal;font-variant:normal;text-rendering:auto;line-height:1}.fa-lg{font-size:1.33333em;line-height:.75em;vertical-align:-.0667em}.fa-xs{font-size:.75em}.fa-sm{font-size:.875em}.fa-1x{font-size:1em}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-6x{font-size:6em}.fa-7x{font-size:7em}.fa-8x{font-size:8em}.fa-9x{font-size:9em}.fa-10x{font-size:10em}.fa-fw{text-align:center;width:1.25em}.fa-ul{list-style-type:none;margin-left:2.5em;padding-left:0}.fa-ul>li{position:relative}.fa-li{left:-2em;position:absolute;text-align:center;width:2em;line-height:inherit}.fa-border{border:.08em solid #eee;border-radius:.1em;padding:.2em .25em .15em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left,.fab.fa-pull-left,.fal.fa-pull-left,.far.fa-pull-left,.fas.fa-pull-left{margin-right:.3em}.fa.fa-pull-right,.fab.fa-pull-right,.fal.fa-pull-right,.far.fa-pull-right,.fas.fa-pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s linear infinite;animation:fa-spin 2s linear infinite}.fa-pulse{-webkit-animation:fa-spin 1s steps(8) infinite;animation:fa-spin 1s steps(8) infinite}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.fa-rotate-90{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-webkit-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.fa-flip-vertical{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.fa-flip-both,.fa-flip-horizontal.fa-flip-vertical{-webkit-transform:scale(-1);transform:scale(-1)}:root .fa-flip-both,:root .fa-flip-horizontal,:root .fa-flip-vertical,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-rotate-90{-webkit-filter:none;filter:none}.fa-stack{display:inline-block;height:2em;line-height:2em;position:relative;vertical-align:middle;width:2.5em}.fa-stack-1x,.fa-stack-2x{left:0;position:absolute;text-align:center;width:100%}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-500px:before{content:"\f26e"}.fa-accessible-icon:before{content:"\f368"}.fa-accusoft:before{content:"\f369"}.fa-acquisitions-incorporated:before{content:"\f6af"}.fa-ad:before{content:"\f641"}.fa-address-book:before{content:"\f2b9"}.fa-address-card:before{content:"\f2bb"}.fa-adjust:before{content:"\f042"}.fa-adn:before{content:"\f170"}.fa-adversal:before{content:"\f36a"}.fa-affiliatetheme:before{content:"\f36b"}.fa-air-freshener:before{content:"\f5d0"}.fa-airbnb:before{content:"\f834"}.fa-algolia:before{content:"\f36c"}.fa-align-center:before{content:"\f037"}.fa-align-justify:before{content:"\f039"}.fa-align-left:before{content:"\f036"}.fa-align-right:before{content:"\f038"}.fa-alipay:before{content:"\f642"}.fa-allergies:before{content:"\f461"}.fa-amazon:before{content:"\f270"}.fa-amazon-pay:before{content:"\f42c"}.fa-ambulance:before{content:"\f0f9"}.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-amilia:before{content:"\f36d"}.fa-anchor:before{content:"\f13d"}.fa-android:before{content:"\f17b"}.fa-angellist:before{content:"\f209"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-down:before{content:"\f107"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angry:before{content:"\f556"}.fa-angrycreative:before{content:"\f36e"}.fa-angular:before{content:"\f420"}.fa-ankh:before{content:"\f644"}.fa-app-store:before{content:"\f36f"}.fa-app-store-ios:before{content:"\f370"}.fa-apper:before{content:"\f371"}.fa-apple:before{content:"\f179"}.fa-apple-alt:before{content:"\f5d1"}.fa-apple-pay:before{content:"\f415"}.fa-archive:before{content:"\f187"}.fa-archway:before{content:"\f557"}.fa-arrow-alt-circle-down:before{content:"\f358"}.fa-arrow-alt-circle-left:before{content:"\f359"}.fa-arrow-alt-circle-right:before{content:"\f35a"}.fa-arrow-alt-circle-up:before{content:"\f35b"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-down:before{content:"\f063"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrows-alt:before{content:"\f0b2"}.fa-arrows-alt-h:before{content:"\f337"}.fa-arrows-alt-v:before{content:"\f338"}.fa-artstation:before{content:"\f77a"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asterisk:before{content:"\f069"}.fa-asymmetrik:before{content:"\f372"}.fa-at:before{content:"\f1fa"}.fa-atlas:before{content:"\f558"}.fa-atlassian:before{content:"\f77b"}.fa-atom:before{content:"\f5d2"}.fa-audible:before{content:"\f373"}.fa-audio-description:before{content:"\f29e"}.fa-autoprefixer:before{content:"\f41c"}.fa-avianex:before{content:"\f374"}.fa-aviato:before{content:"\f421"}.fa-award:before{content:"\f559"}.fa-aws:before{content:"\f375"}.fa-baby:before{content:"\f77c"}.fa-baby-carriage:before{content:"\f77d"}.fa-backspace:before{content:"\f55a"}.fa-backward:before{content:"\f04a"}.fa-bacon:before{content:"\f7e5"}.fa-bacteria:before{content:"\e059"}.fa-bacterium:before{content:"\e05a"}.fa-bahai:before{content:"\f666"}.fa-balance-scale:before{content:"\f24e"}.fa-balance-scale-left:before{content:"\f515"}.fa-balance-scale-right:before{content:"\f516"}.fa-ban:before{content:"\f05e"}.fa-band-aid:before{content:"\f462"}.fa-bandcamp:before{content:"\f2d5"}.fa-barcode:before{content:"\f02a"}.fa-bars:before{content:"\f0c9"}.fa-baseball-ball:before{content:"\f433"}.fa-basketball-ball:before{content:"\f434"}.fa-bath:before{content:"\f2cd"}.fa-battery-empty:before{content:"\f244"}.fa-battery-full:before{content:"\f240"}.fa-battery-half:before{content:"\f242"}.fa-battery-quarter:before{content:"\f243"}.fa-battery-three-quarters:before{content:"\f241"}.fa-battle-net:before{content:"\f835"}.fa-bed:before{content:"\f236"}.fa-beer:before{content:"\f0fc"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-bell:before{content:"\f0f3"}.fa-bell-slash:before{content:"\f1f6"}.fa-bezier-curve:before{content:"\f55b"}.fa-bible:before{content:"\f647"}.fa-bicycle:before{content:"\f206"}.fa-biking:before{content:"\f84a"}.fa-bimobject:before{content:"\f378"}.fa-binoculars:before{content:"\f1e5"}.fa-biohazard:before{content:"\f780"}.fa-birthday-cake:before{content:"\f1fd"}.fa-bitbucket:before{content:"\f171"}.fa-bitcoin:before{content:"\f379"}.fa-bity:before{content:"\f37a"}.fa-black-tie:before{content:"\f27e"}.fa-blackberry:before{content:"\f37b"}.fa-blender:before{content:"\f517"}.fa-blender-phone:before{content:"\f6b6"}.fa-blind:before{content:"\f29d"}.fa-blog:before{content:"\f781"}.fa-blogger:before{content:"\f37c"}.fa-blogger-b:before{content:"\f37d"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-bold:before{content:"\f032"}.fa-bolt:before{content:"\f0e7"}.fa-bomb:before{content:"\f1e2"}.fa-bone:before{content:"\f5d7"}.fa-bong:before{content:"\f55c"}.fa-book:before{content:"\f02d"}.fa-book-dead:before{content:"\f6b7"}.fa-book-medical:before{content:"\f7e6"}.fa-book-open:before{content:"\f518"}.fa-book-reader:before{content:"\f5da"}.fa-bookmark:before{content:"\f02e"}.fa-bootstrap:before{content:"\f836"}.fa-border-all:before{content:"\f84c"}.fa-border-none:before{content:"\f850"}.fa-border-style:before{content:"\f853"}.fa-bowling-ball:before{content:"\f436"}.fa-box:before{content:"\f466"}.fa-box-open:before{content:"\f49e"}.fa-box-tissue:before{content:"\e05b"}.fa-boxes:before{content:"\f468"}.fa-braille:before{content:"\f2a1"}.fa-brain:before{content:"\f5dc"}.fa-bread-slice:before{content:"\f7ec"}.fa-briefcase:before{content:"\f0b1"}.fa-briefcase-medical:before{content:"\f469"}.fa-broadcast-tower:before{content:"\f519"}.fa-broom:before{content:"\f51a"}.fa-brush:before{content:"\f55d"}.fa-btc:before{content:"\f15a"}.fa-buffer:before{content:"\f837"}.fa-bug:before{content:"\f188"}.fa-building:before{content:"\f1ad"}.fa-bullhorn:before{content:"\f0a1"}.fa-bullseye:before{content:"\f140"}.fa-burn:before{content:"\f46a"}.fa-buromobelexperte:before{content:"\f37f"}.fa-bus:before{content:"\f207"}.fa-bus-alt:before{content:"\f55e"}.fa-business-time:before{content:"\f64a"}.fa-buy-n-large:before{content:"\f8a6"}.fa-buysellads:before{content:"\f20d"}.fa-calculator:before{content:"\f1ec"}.fa-calendar:before{content:"\f133"}.fa-calendar-alt:before{content:"\f073"}.fa-calendar-check:before{content:"\f274"}.fa-calendar-day:before{content:"\f783"}.fa-calendar-minus:before{content:"\f272"}.fa-calendar-plus:before{content:"\f271"}.fa-calendar-times:before{content:"\f273"}.fa-calendar-week:before{content:"\f784"}.fa-camera:before{content:"\f030"}.fa-camera-retro:before{content:"\f083"}.fa-campground:before{content:"\f6bb"}.fa-canadian-maple-leaf:before{content:"\f785"}.fa-candy-cane:before{content:"\f786"}.fa-cannabis:before{content:"\f55f"}.fa-capsules:before{content:"\f46b"}.fa-car:before{content:"\f1b9"}.fa-car-alt:before{content:"\f5de"}.fa-car-battery:before{content:"\f5df"}.fa-car-crash:before{content:"\f5e1"}.fa-car-side:before{content:"\f5e4"}.fa-caravan:before{content:"\f8ff"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-caret-square-down:before{content:"\f150"}.fa-caret-square-left:before{content:"\f191"}.fa-caret-square-right:before{content:"\f152"}.fa-caret-square-up:before{content:"\f151"}.fa-caret-up:before{content:"\f0d8"}.fa-carrot:before{content:"\f787"}.fa-cart-arrow-down:before{content:"\f218"}.fa-cart-plus:before{content:"\f217"}.fa-cash-register:before{content:"\f788"}.fa-cat:before{content:"\f6be"}.fa-cc-amazon-pay:before{content:"\f42d"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-apple-pay:before{content:"\f416"}.fa-cc-diners-club:before{content:"\f24c"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-cc-visa:before{content:"\f1f0"}.fa-centercode:before{content:"\f380"}.fa-centos:before{content:"\f789"}.fa-certificate:before{content:"\f0a3"}.fa-chair:before{content:"\f6c0"}.fa-chalkboard:before{content:"\f51b"}.fa-chalkboard-teacher:before{content:"\f51c"}.fa-charging-station:before{content:"\f5e7"}.fa-chart-area:before{content:"\f1fe"}.fa-chart-bar:before{content:"\f080"}.fa-chart-line:before{content:"\f201"}.fa-chart-pie:before{content:"\f200"}.fa-check:before{content:"\f00c"}.fa-check-circle:before{content:"\f058"}.fa-check-double:before{content:"\f560"}.fa-check-square:before{content:"\f14a"}.fa-cheese:before{content:"\f7ef"}.fa-chess:before{content:"\f439"}.fa-chess-bishop:before{content:"\f43a"}.fa-chess-board:before{content:"\f43c"}.fa-chess-king:before{content:"\f43f"}.fa-chess-knight:before{content:"\f441"}.fa-chess-pawn:before{content:"\f443"}.fa-chess-queen:before{content:"\f445"}.fa-chess-rook:before{content:"\f447"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-down:before{content:"\f078"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-chevron-up:before{content:"\f077"}.fa-child:before{content:"\f1ae"}.fa-chrome:before{content:"\f268"}.fa-chromecast:before{content:"\f838"}.fa-church:before{content:"\f51d"}.fa-circle:before{content:"\f111"}.fa-circle-notch:before{content:"\f1ce"}.fa-city:before{content:"\f64f"}.fa-clinic-medical:before{content:"\f7f2"}.fa-clipboard:before{content:"\f328"}.fa-clipboard-check:before{content:"\f46c"}.fa-clipboard-list:before{content:"\f46d"}.fa-clock:before{content:"\f017"}.fa-clone:before{content:"\f24d"}.fa-closed-captioning:before{content:"\f20a"}.fa-cloud:before{content:"\f0c2"}.fa-cloud-download-alt:before{content:"\f381"}.fa-cloud-meatball:before{content:"\f73b"}.fa-cloud-moon:before{content:"\f6c3"}.fa-cloud-moon-rain:before{content:"\f73c"}.fa-cloud-rain:before{content:"\f73d"}.fa-cloud-showers-heavy:before{content:"\f740"}.fa-cloud-sun:before{content:"\f6c4"}.fa-cloud-sun-rain:before{content:"\f743"}.fa-cloud-upload-alt:before{content:"\f382"}.fa-cloudflare:before{content:"\e07d"}.fa-cloudscale:before{content:"\f383"}.fa-cloudsmith:before{content:"\f384"}.fa-cloudversify:before{content:"\f385"}.fa-cocktail:before{content:"\f561"}.fa-code:before{content:"\f121"}.fa-code-branch:before{content:"\f126"}.fa-codepen:before{content:"\f1cb"}.fa-codiepie:before{content:"\f284"}.fa-coffee:before{content:"\f0f4"}.fa-cog:before{content:"\f013"}.fa-cogs:before{content:"\f085"}.fa-coins:before{content:"\f51e"}.fa-columns:before{content:"\f0db"}.fa-comment:before{content:"\f075"}.fa-comment-alt:before{content:"\f27a"}.fa-comment-dollar:before{content:"\f651"}.fa-comment-dots:before{content:"\f4ad"}.fa-comment-medical:before{content:"\f7f5"}.fa-comment-slash:before{content:"\f4b3"}.fa-comments:before{content:"\f086"}.fa-comments-dollar:before{content:"\f653"}.fa-compact-disc:before{content:"\f51f"}.fa-compass:before{content:"\f14e"}.fa-compress:before{content:"\f066"}.fa-compress-alt:before{content:"\f422"}.fa-compress-arrows-alt:before{content:"\f78c"}.fa-concierge-bell:before{content:"\f562"}.fa-confluence:before{content:"\f78d"}.fa-connectdevelop:before{content:"\f20e"}.fa-contao:before{content:"\f26d"}.fa-cookie:before{content:"\f563"}.fa-cookie-bite:before{content:"\f564"}.fa-copy:before{content:"\f0c5"}.fa-copyright:before{content:"\f1f9"}.fa-cotton-bureau:before{content:"\f89e"}.fa-couch:before{content:"\f4b8"}.fa-cpanel:before{content:"\f388"}.fa-creative-commons:before{content:"\f25e"}.fa-creative-commons-by:before{content:"\f4e7"}.fa-creative-commons-nc:before{content:"\f4e8"}.fa-creative-commons-nc-eu:before{content:"\f4e9"}.fa-creative-commons-nc-jp:before{content:"\f4ea"}.fa-creative-commons-nd:before{content:"\f4eb"}.fa-creative-commons-pd:before{content:"\f4ec"}.fa-creative-commons-pd-alt:before{content:"\f4ed"}.fa-creative-commons-remix:before{content:"\f4ee"}.fa-creative-commons-sa:before{content:"\f4ef"}.fa-creative-commons-sampling:before{content:"\f4f0"}.fa-creative-commons-sampling-plus:before{content:"\f4f1"}.fa-creative-commons-share:before{content:"\f4f2"}.fa-creative-commons-zero:before{content:"\f4f3"}.fa-credit-card:before{content:"\f09d"}.fa-critical-role:before{content:"\f6c9"}.fa-crop:before{content:"\f125"}.fa-crop-alt:before{content:"\f565"}.fa-cross:before{content:"\f654"}.fa-crosshairs:before{content:"\f05b"}.fa-crow:before{content:"\f520"}.fa-crown:before{content:"\f521"}.fa-crutch:before{content:"\f7f7"}.fa-css3:before{content:"\f13c"}.fa-css3-alt:before{content:"\f38b"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-cut:before{content:"\f0c4"}.fa-cuttlefish:before{content:"\f38c"}.fa-d-and-d:before{content:"\f38d"}.fa-d-and-d-beyond:before{content:"\f6ca"}.fa-dailymotion:before{content:"\e052"}.fa-dashcube:before{content:"\f210"}.fa-database:before{content:"\f1c0"}.fa-deaf:before{content:"\f2a4"}.fa-deezer:before{content:"\e077"}.fa-delicious:before{content:"\f1a5"}.fa-democrat:before{content:"\f747"}.fa-deploydog:before{content:"\f38e"}.fa-deskpro:before{content:"\f38f"}.fa-desktop:before{content:"\f108"}.fa-dev:before{content:"\f6cc"}.fa-deviantart:before{content:"\f1bd"}.fa-dharmachakra:before{content:"\f655"}.fa-dhl:before{content:"\f790"}.fa-diagnoses:before{content:"\f470"}.fa-diaspora:before{content:"\f791"}.fa-dice:before{content:"\f522"}.fa-dice-d20:before{content:"\f6cf"}.fa-dice-d6:before{content:"\f6d1"}.fa-dice-five:before{content:"\f523"}.fa-dice-four:before{content:"\f524"}.fa-dice-one:before{content:"\f525"}.fa-dice-six:before{content:"\f526"}.fa-dice-three:before{content:"\f527"}.fa-dice-two:before{content:"\f528"}.fa-digg:before{content:"\f1a6"}.fa-digital-ocean:before{content:"\f391"}.fa-digital-tachograph:before{content:"\f566"}.fa-directions:before{content:"\f5eb"}.fa-discord:before{content:"\f392"}.fa-discourse:before{content:"\f393"}.fa-disease:before{content:"\f7fa"}.fa-divide:before{content:"\f529"}.fa-dizzy:before{content:"\f567"}.fa-dna:before{content:"\f471"}.fa-dochub:before{content:"\f394"}.fa-docker:before{content:"\f395"}.fa-dog:before{content:"\f6d3"}.fa-dollar-sign:before{content:"\f155"}.fa-dolly:before{content:"\f472"}.fa-dolly-flatbed:before{content:"\f474"}.fa-donate:before{content:"\f4b9"}.fa-door-closed:before{content:"\f52a"}.fa-door-open:before{content:"\f52b"}.fa-dot-circle:before{content:"\f192"}.fa-dove:before{content:"\f4ba"}.fa-download:before{content:"\f019"}.fa-draft2digital:before{content:"\f396"}.fa-drafting-compass:before{content:"\f568"}.fa-dragon:before{content:"\f6d5"}.fa-draw-polygon:before{content:"\f5ee"}.fa-dribbble:before{content:"\f17d"}.fa-dribbble-square:before{content:"\f397"}.fa-dropbox:before{content:"\f16b"}.fa-drum:before{content:"\f569"}.fa-drum-steelpan:before{content:"\f56a"}.fa-drumstick-bite:before{content:"\f6d7"}.fa-drupal:before{content:"\f1a9"}.fa-dumbbell:before{content:"\f44b"}.fa-dumpster:before{content:"\f793"}.fa-dumpster-fire:before{content:"\f794"}.fa-dungeon:before{content:"\f6d9"}.fa-dyalog:before{content:"\f399"}.fa-earlybirds:before{content:"\f39a"}.fa-ebay:before{content:"\f4f4"}.fa-edge:before{content:"\f282"}.fa-edge-legacy:before{content:"\e078"}.fa-edit:before{content:"\f044"}.fa-egg:before{content:"\f7fb"}.fa-eject:before{content:"\f052"}.fa-elementor:before{content:"\f430"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-ello:before{content:"\f5f1"}.fa-ember:before{content:"\f423"}.fa-empire:before{content:"\f1d1"}.fa-envelope:before{content:"\f0e0"}.fa-envelope-open:before{content:"\f2b6"}.fa-envelope-open-text:before{content:"\f658"}.fa-envelope-square:before{content:"\f199"}.fa-envira:before{content:"\f299"}.fa-equals:before{content:"\f52c"}.fa-eraser:before{content:"\f12d"}.fa-erlang:before{content:"\f39d"}.fa-ethereum:before{content:"\f42e"}.fa-ethernet:before{content:"\f796"}.fa-etsy:before{content:"\f2d7"}.fa-euro-sign:before{content:"\f153"}.fa-evernote:before{content:"\f839"}.fa-exchange-alt:before{content:"\f362"}.fa-exclamation:before{content:"\f12a"}.fa-exclamation-circle:before{content:"\f06a"}.fa-exclamation-triangle:before{content:"\f071"}.fa-expand:before{content:"\f065"}.fa-expand-alt:before{content:"\f424"}.fa-expand-arrows-alt:before{content:"\f31e"}.fa-expeditedssl:before{content:"\f23e"}.fa-external-link-alt:before{content:"\f35d"}.fa-external-link-square-alt:before{content:"\f360"}.fa-eye:before{content:"\f06e"}.fa-eye-dropper:before{content:"\f1fb"}.fa-eye-slash:before{content:"\f070"}.fa-facebook:before{content:"\f09a"}.fa-facebook-f:before{content:"\f39e"}.fa-facebook-messenger:before{content:"\f39f"}.fa-facebook-square:before{content:"\f082"}.fa-fan:before{content:"\f863"}.fa-fantasy-flight-games:before{content:"\f6dc"}.fa-fast-backward:before{content:"\f049"}.fa-fast-forward:before{content:"\f050"}.fa-faucet:before{content:"\e005"}.fa-fax:before{content:"\f1ac"}.fa-feather:before{content:"\f52d"}.fa-feather-alt:before{content:"\f56b"}.fa-fedex:before{content:"\f797"}.fa-fedora:before{content:"\f798"}.fa-female:before{content:"\f182"}.fa-fighter-jet:before{content:"\f0fb"}.fa-figma:before{content:"\f799"}.fa-file:before{content:"\f15b"}.fa-file-alt:before{content:"\f15c"}.fa-file-archive:before{content:"\f1c6"}.fa-file-audio:before{content:"\f1c7"}.fa-file-code:before{content:"\f1c9"}.fa-file-contract:before{content:"\f56c"}.fa-file-csv:before{content:"\f6dd"}.fa-file-download:before{content:"\f56d"}.fa-file-excel:before{content:"\f1c3"}.fa-file-export:before{content:"\f56e"}.fa-file-image:before{content:"\f1c5"}.fa-file-import:before{content:"\f56f"}.fa-file-invoice:before{content:"\f570"}.fa-file-invoice-dollar:before{content:"\f571"}.fa-file-medical:before{content:"\f477"}.fa-file-medical-alt:before{content:"\f478"}.fa-file-pdf:before{content:"\f1c1"}.fa-file-powerpoint:before{content:"\f1c4"}.fa-file-prescription:before{content:"\f572"}.fa-file-signature:before{content:"\f573"}.fa-file-upload:before{content:"\f574"}.fa-file-video:before{content:"\f1c8"}.fa-file-word:before{content:"\f1c2"}.fa-fill:before{content:"\f575"}.fa-fill-drip:before{content:"\f576"}.fa-film:before{content:"\f008"}.fa-filter:before{content:"\f0b0"}.fa-fingerprint:before{content:"\f577"}.fa-fire:before{content:"\f06d"}.fa-fire-alt:before{content:"\f7e4"}.fa-fire-extinguisher:before{content:"\f134"}.fa-firefox:before{content:"\f269"}.fa-firefox-browser:before{content:"\e007"}.fa-first-aid:before{content:"\f479"}.fa-first-order:before{content:"\f2b0"}.fa-first-order-alt:before{content:"\f50a"}.fa-firstdraft:before{content:"\f3a1"}.fa-fish:before{content:"\f578"}.fa-fist-raised:before{content:"\f6de"}.fa-flag:before{content:"\f024"}.fa-flag-checkered:before{content:"\f11e"}.fa-flag-usa:before{content:"\f74d"}.fa-flask:before{content:"\f0c3"}.fa-flickr:before{content:"\f16e"}.fa-flipboard:before{content:"\f44d"}.fa-flushed:before{content:"\f579"}.fa-fly:before{content:"\f417"}.fa-folder:before{content:"\f07b"}.fa-folder-minus:before{content:"\f65d"}.fa-folder-open:before{content:"\f07c"}.fa-folder-plus:before{content:"\f65e"}.fa-font:before{content:"\f031"}.fa-font-awesome:before{content:"\f2b4"}.fa-font-awesome-alt:before{content:"\f35c"}.fa-font-awesome-flag:before{content:"\f425"}.fa-font-awesome-logo-full:before{content:"\f4e6"}.fa-fonticons:before{content:"\f280"}.fa-fonticons-fi:before{content:"\f3a2"}.fa-football-ball:before{content:"\f44e"}.fa-fort-awesome:before{content:"\f286"}.fa-fort-awesome-alt:before{content:"\f3a3"}.fa-forumbee:before{content:"\f211"}.fa-forward:before{content:"\f04e"}.fa-foursquare:before{content:"\f180"}.fa-free-code-camp:before{content:"\f2c5"}.fa-freebsd:before{content:"\f3a4"}.fa-frog:before{content:"\f52e"}.fa-frown:before{content:"\f119"}.fa-frown-open:before{content:"\f57a"}.fa-fulcrum:before{content:"\f50b"}.fa-funnel-dollar:before{content:"\f662"}.fa-futbol:before{content:"\f1e3"}.fa-galactic-republic:before{content:"\f50c"}.fa-galactic-senate:before{content:"\f50d"}.fa-gamepad:before{content:"\f11b"}.fa-gas-pump:before{content:"\f52f"}.fa-gavel:before{content:"\f0e3"}.fa-gem:before{content:"\f3a5"}.fa-genderless:before{content:"\f22d"}.fa-get-pocket:before{content:"\f265"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-ghost:before{content:"\f6e2"}.fa-gift:before{content:"\f06b"}.fa-gifts:before{content:"\f79c"}.fa-git:before{content:"\f1d3"}.fa-git-alt:before{content:"\f841"}.fa-git-square:before{content:"\f1d2"}.fa-github:before{content:"\f09b"}.fa-github-alt:before{content:"\f113"}.fa-github-square:before{content:"\f092"}.fa-gitkraken:before{content:"\f3a6"}.fa-gitlab:before{content:"\f296"}.fa-gitter:before{content:"\f426"}.fa-glass-cheers:before{content:"\f79f"}.fa-glass-martini:before{content:"\f000"}.fa-glass-martini-alt:before{content:"\f57b"}.fa-glass-whiskey:before{content:"\f7a0"}.fa-glasses:before{content:"\f530"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-globe:before{content:"\f0ac"}.fa-globe-africa:before{content:"\f57c"}.fa-globe-americas:before{content:"\f57d"}.fa-globe-asia:before{content:"\f57e"}.fa-globe-europe:before{content:"\f7a2"}.fa-gofore:before{content:"\f3a7"}.fa-golf-ball:before{content:"\f450"}.fa-goodreads:before{content:"\f3a8"}.fa-goodreads-g:before{content:"\f3a9"}.fa-google:before{content:"\f1a0"}.fa-google-drive:before{content:"\f3aa"}.fa-google-pay:before{content:"\e079"}.fa-google-play:before{content:"\f3ab"}.fa-google-plus:before{content:"\f2b3"}.fa-google-plus-g:before{content:"\f0d5"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-wallet:before{content:"\f1ee"}.fa-gopuram:before{content:"\f664"}.fa-graduation-cap:before{content:"\f19d"}.fa-gratipay:before{content:"\f184"}.fa-grav:before{content:"\f2d6"}.fa-greater-than:before{content:"\f531"}.fa-greater-than-equal:before{content:"\f532"}.fa-grimace:before{content:"\f57f"}.fa-grin:before{content:"\f580"}.fa-grin-alt:before{content:"\f581"}.fa-grin-beam:before{content:"\f582"}.fa-grin-beam-sweat:before{content:"\f583"}.fa-grin-hearts:before{content:"\f584"}.fa-grin-squint:before{content:"\f585"}.fa-grin-squint-tears:before{content:"\f586"}.fa-grin-stars:before{content:"\f587"}.fa-grin-tears:before{content:"\f588"}.fa-grin-tongue:before{content:"\f589"}.fa-grin-tongue-squint:before{content:"\f58a"}.fa-grin-tongue-wink:before{content:"\f58b"}.fa-grin-wink:before{content:"\f58c"}.fa-grip-horizontal:before{content:"\f58d"}.fa-grip-lines:before{content:"\f7a4"}.fa-grip-lines-vertical:before{content:"\f7a5"}.fa-grip-vertical:before{content:"\f58e"}.fa-gripfire:before{content:"\f3ac"}.fa-grunt:before{content:"\f3ad"}.fa-guilded:before{content:"\e07e"}.fa-guitar:before{content:"\f7a6"}.fa-gulp:before{content:"\f3ae"}.fa-h-square:before{content:"\f0fd"}.fa-hacker-news:before{content:"\f1d4"}.fa-hacker-news-square:before{content:"\f3af"}.fa-hackerrank:before{content:"\f5f7"}.fa-hamburger:before{content:"\f805"}.fa-hammer:before{content:"\f6e3"}.fa-hamsa:before{content:"\f665"}.fa-hand-holding:before{content:"\f4bd"}.fa-hand-holding-heart:before{content:"\f4be"}.fa-hand-holding-medical:before{content:"\e05c"}.fa-hand-holding-usd:before{content:"\f4c0"}.fa-hand-holding-water:before{content:"\f4c1"}.fa-hand-lizard:before{content:"\f258"}.fa-hand-middle-finger:before{content:"\f806"}.fa-hand-paper:before{content:"\f256"}.fa-hand-peace:before{content:"\f25b"}.fa-hand-point-down:before{content:"\f0a7"}.fa-hand-point-left:before{content:"\f0a5"}.fa-hand-point-right:before{content:"\f0a4"}.fa-hand-point-up:before{content:"\f0a6"}.fa-hand-pointer:before{content:"\f25a"}.fa-hand-rock:before{content:"\f255"}.fa-hand-scissors:before{content:"\f257"}.fa-hand-sparkles:before{content:"\e05d"}.fa-hand-spock:before{content:"\f259"}.fa-hands:before{content:"\f4c2"}.fa-hands-helping:before{content:"\f4c4"}.fa-hands-wash:before{content:"\e05e"}.fa-handshake:before{content:"\f2b5"}.fa-handshake-alt-slash:before{content:"\e05f"}.fa-handshake-slash:before{content:"\e060"}.fa-hanukiah:before{content:"\f6e6"}.fa-hard-hat:before{content:"\f807"}.fa-hashtag:before{content:"\f292"}.fa-hat-cowboy:before{content:"\f8c0"}.fa-hat-cowboy-side:before{content:"\f8c1"}.fa-hat-wizard:before{content:"\f6e8"}.fa-hdd:before{content:"\f0a0"}.fa-head-side-cough:before{content:"\e061"}.fa-head-side-cough-slash:before{content:"\e062"}.fa-head-side-mask:before{content:"\e063"}.fa-head-side-virus:before{content:"\e064"}.fa-heading:before{content:"\f1dc"}.fa-headphones:before{content:"\f025"}.fa-headphones-alt:before{content:"\f58f"}.fa-headset:before{content:"\f590"}.fa-heart:before{content:"\f004"}.fa-heart-broken:before{content:"\f7a9"}.fa-heartbeat:before{content:"\f21e"}.fa-helicopter:before{content:"\f533"}.fa-highlighter:before{content:"\f591"}.fa-hiking:before{content:"\f6ec"}.fa-hippo:before{content:"\f6ed"}.fa-hips:before{content:"\f452"}.fa-hire-a-helper:before{content:"\f3b0"}.fa-history:before{content:"\f1da"}.fa-hive:before{content:"\e07f"}.fa-hockey-puck:before{content:"\f453"}.fa-holly-berry:before{content:"\f7aa"}.fa-home:before{content:"\f015"}.fa-hooli:before{content:"\f427"}.fa-hornbill:before{content:"\f592"}.fa-horse:before{content:"\f6f0"}.fa-horse-head:before{content:"\f7ab"}.fa-hospital:before{content:"\f0f8"}.fa-hospital-alt:before{content:"\f47d"}.fa-hospital-symbol:before{content:"\f47e"}.fa-hospital-user:before{content:"\f80d"}.fa-hot-tub:before{content:"\f593"}.fa-hotdog:before{content:"\f80f"}.fa-hotel:before{content:"\f594"}.fa-hotjar:before{content:"\f3b1"}.fa-hourglass:before{content:"\f254"}.fa-hourglass-end:before{content:"\f253"}.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-start:before{content:"\f251"}.fa-house-damage:before{content:"\f6f1"}.fa-house-user:before{content:"\e065"}.fa-houzz:before{content:"\f27c"}.fa-hryvnia:before{content:"\f6f2"}.fa-html5:before{content:"\f13b"}.fa-hubspot:before{content:"\f3b2"}.fa-i-cursor:before{content:"\f246"}.fa-ice-cream:before{content:"\f810"}.fa-icicles:before{content:"\f7ad"}.fa-icons:before{content:"\f86d"}.fa-id-badge:before{content:"\f2c1"}.fa-id-card:before{content:"\f2c2"}.fa-id-card-alt:before{content:"\f47f"}.fa-ideal:before{content:"\e013"}.fa-igloo:before{content:"\f7ae"}.fa-image:before{content:"\f03e"}.fa-images:before{content:"\f302"}.fa-imdb:before{content:"\f2d8"}.fa-inbox:before{content:"\f01c"}.fa-indent:before{content:"\f03c"}.fa-industry:before{content:"\f275"}.fa-infinity:before{content:"\f534"}.fa-info:before{content:"\f129"}.fa-info-circle:before{content:"\f05a"}.fa-innosoft:before{content:"\e080"}.fa-instagram:before{content:"\f16d"}.fa-instagram-square:before{content:"\e055"}.fa-instalod:before{content:"\e081"}.fa-intercom:before{content:"\f7af"}.fa-internet-explorer:before{content:"\f26b"}.fa-invision:before{content:"\f7b0"}.fa-ioxhost:before{content:"\f208"}.fa-italic:before{content:"\f033"}.fa-itch-io:before{content:"\f83a"}.fa-itunes:before{content:"\f3b4"}.fa-itunes-note:before{content:"\f3b5"}.fa-java:before{content:"\f4e4"}.fa-jedi:before{content:"\f669"}.fa-jedi-order:before{content:"\f50e"}.fa-jenkins:before{content:"\f3b6"}.fa-jira:before{content:"\f7b1"}.fa-joget:before{content:"\f3b7"}.fa-joint:before{content:"\f595"}.fa-joomla:before{content:"\f1aa"}.fa-journal-whills:before{content:"\f66a"}.fa-js:before{content:"\f3b8"}.fa-js-square:before{content:"\f3b9"}.fa-jsfiddle:before{content:"\f1cc"}.fa-kaaba:before{content:"\f66b"}.fa-kaggle:before{content:"\f5fa"}.fa-key:before{content:"\f084"}.fa-keybase:before{content:"\f4f5"}.fa-keyboard:before{content:"\f11c"}.fa-keycdn:before{content:"\f3ba"}.fa-khanda:before{content:"\f66d"}.fa-kickstarter:before{content:"\f3bb"}.fa-kickstarter-k:before{content:"\f3bc"}.fa-kiss:before{content:"\f596"}.fa-kiss-beam:before{content:"\f597"}.fa-kiss-wink-heart:before{content:"\f598"}.fa-kiwi-bird:before{content:"\f535"}.fa-korvue:before{content:"\f42f"}.fa-landmark:before{content:"\f66f"}.fa-language:before{content:"\f1ab"}.fa-laptop:before{content:"\f109"}.fa-laptop-code:before{content:"\f5fc"}.fa-laptop-house:before{content:"\e066"}.fa-laptop-medical:before{content:"\f812"}.fa-laravel:before{content:"\f3bd"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-laugh:before{content:"\f599"}.fa-laugh-beam:before{content:"\f59a"}.fa-laugh-squint:before{content:"\f59b"}.fa-laugh-wink:before{content:"\f59c"}.fa-layer-group:before{content:"\f5fd"}.fa-leaf:before{content:"\f06c"}.fa-leanpub:before{content:"\f212"}.fa-lemon:before{content:"\f094"}.fa-less:before{content:"\f41d"}.fa-less-than:before{content:"\f536"}.fa-less-than-equal:before{content:"\f537"}.fa-level-down-alt:before{content:"\f3be"}.fa-level-up-alt:before{content:"\f3bf"}.fa-life-ring:before{content:"\f1cd"}.fa-lightbulb:before{content:"\f0eb"}.fa-line:before{content:"\f3c0"}.fa-link:before{content:"\f0c1"}.fa-linkedin:before{content:"\f08c"}.fa-linkedin-in:before{content:"\f0e1"}.fa-linode:before{content:"\f2b8"}.fa-linux:before{content:"\f17c"}.fa-lira-sign:before{content:"\f195"}.fa-list:before{content:"\f03a"}.fa-list-alt:before{content:"\f022"}.fa-list-ol:before{content:"\f0cb"}.fa-list-ul:before{content:"\f0ca"}.fa-location-arrow:before{content:"\f124"}.fa-lock:before{content:"\f023"}.fa-lock-open:before{content:"\f3c1"}.fa-long-arrow-alt-down:before{content:"\f309"}.fa-long-arrow-alt-left:before{content:"\f30a"}.fa-long-arrow-alt-right:before{content:"\f30b"}.fa-long-arrow-alt-up:before{content:"\f30c"}.fa-low-vision:before{content:"\f2a8"}.fa-luggage-cart:before{content:"\f59d"}.fa-lungs:before{content:"\f604"}.fa-lungs-virus:before{content:"\e067"}.fa-lyft:before{content:"\f3c3"}.fa-magento:before{content:"\f3c4"}.fa-magic:before{content:"\f0d0"}.fa-magnet:before{content:"\f076"}.fa-mail-bulk:before{content:"\f674"}.fa-mailchimp:before{content:"\f59e"}.fa-male:before{content:"\f183"}.fa-mandalorian:before{content:"\f50f"}.fa-map:before{content:"\f279"}.fa-map-marked:before{content:"\f59f"}.fa-map-marked-alt:before{content:"\f5a0"}.fa-map-marker:before{content:"\f041"}.fa-map-marker-alt:before{content:"\f3c5"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-markdown:before{content:"\f60f"}.fa-marker:before{content:"\f5a1"}.fa-mars:before{content:"\f222"}.fa-mars-double:before{content:"\f227"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mask:before{content:"\f6fa"}.fa-mastodon:before{content:"\f4f6"}.fa-maxcdn:before{content:"\f136"}.fa-mdb:before{content:"\f8ca"}.fa-medal:before{content:"\f5a2"}.fa-medapps:before{content:"\f3c6"}.fa-medium:before{content:"\f23a"}.fa-medium-m:before{content:"\f3c7"}.fa-medkit:before{content:"\f0fa"}.fa-medrt:before{content:"\f3c8"}.fa-meetup:before{content:"\f2e0"}.fa-megaport:before{content:"\f5a3"}.fa-meh:before{content:"\f11a"}.fa-meh-blank:before{content:"\f5a4"}.fa-meh-rolling-eyes:before{content:"\f5a5"}.fa-memory:before{content:"\f538"}.fa-mendeley:before{content:"\f7b3"}.fa-menorah:before{content:"\f676"}.fa-mercury:before{content:"\f223"}.fa-meteor:before{content:"\f753"}.fa-microblog:before{content:"\e01a"}.fa-microchip:before{content:"\f2db"}.fa-microphone:before{content:"\f130"}.fa-microphone-alt:before{content:"\f3c9"}.fa-microphone-alt-slash:before{content:"\f539"}.fa-microphone-slash:before{content:"\f131"}.fa-microscope:before{content:"\f610"}.fa-microsoft:before{content:"\f3ca"}.fa-minus:before{content:"\f068"}.fa-minus-circle:before{content:"\f056"}.fa-minus-square:before{content:"\f146"}.fa-mitten:before{content:"\f7b5"}.fa-mix:before{content:"\f3cb"}.fa-mixcloud:before{content:"\f289"}.fa-mixer:before{content:"\e056"}.fa-mizuni:before{content:"\f3cc"}.fa-mobile:before{content:"\f10b"}.fa-mobile-alt:before{content:"\f3cd"}.fa-modx:before{content:"\f285"}.fa-monero:before{content:"\f3d0"}.fa-money-bill:before{content:"\f0d6"}.fa-money-bill-alt:before{content:"\f3d1"}.fa-money-bill-wave:before{content:"\f53a"}.fa-money-bill-wave-alt:before{content:"\f53b"}.fa-money-check:before{content:"\f53c"}.fa-money-check-alt:before{content:"\f53d"}.fa-monument:before{content:"\f5a6"}.fa-moon:before{content:"\f186"}.fa-mortar-pestle:before{content:"\f5a7"}.fa-mosque:before{content:"\f678"}.fa-motorcycle:before{content:"\f21c"}.fa-mountain:before{content:"\f6fc"}.fa-mouse:before{content:"\f8cc"}.fa-mouse-pointer:before{content:"\f245"}.fa-mug-hot:before{content:"\f7b6"}.fa-music:before{content:"\f001"}.fa-napster:before{content:"\f3d2"}.fa-neos:before{content:"\f612"}.fa-network-wired:before{content:"\f6ff"}.fa-neuter:before{content:"\f22c"}.fa-newspaper:before{content:"\f1ea"}.fa-nimblr:before{content:"\f5a8"}.fa-node:before{content:"\f419"}.fa-node-js:before{content:"\f3d3"}.fa-not-equal:before{content:"\f53e"}.fa-notes-medical:before{content:"\f481"}.fa-npm:before{content:"\f3d4"}.fa-ns8:before{content:"\f3d5"}.fa-nutritionix:before{content:"\f3d6"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-octopus-deploy:before{content:"\e082"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-oil-can:before{content:"\f613"}.fa-old-republic:before{content:"\f510"}.fa-om:before{content:"\f679"}.fa-opencart:before{content:"\f23d"}.fa-openid:before{content:"\f19b"}.fa-opera:before{content:"\f26a"}.fa-optin-monster:before{content:"\f23c"}.fa-orcid:before{content:"\f8d2"}.fa-osi:before{content:"\f41a"}.fa-otter:before{content:"\f700"}.fa-outdent:before{content:"\f03b"}.fa-page4:before{content:"\f3d7"}.fa-pagelines:before{content:"\f18c"}.fa-pager:before{content:"\f815"}.fa-paint-brush:before{content:"\f1fc"}.fa-paint-roller:before{content:"\f5aa"}.fa-palette:before{content:"\f53f"}.fa-palfed:before{content:"\f3d8"}.fa-pallet:before{content:"\f482"}.fa-paper-plane:before{content:"\f1d8"}.fa-paperclip:before{content:"\f0c6"}.fa-parachute-box:before{content:"\f4cd"}.fa-paragraph:before{content:"\f1dd"}.fa-parking:before{content:"\f540"}.fa-passport:before{content:"\f5ab"}.fa-pastafarianism:before{content:"\f67b"}.fa-paste:before{content:"\f0ea"}.fa-patreon:before{content:"\f3d9"}.fa-pause:before{content:"\f04c"}.fa-pause-circle:before{content:"\f28b"}.fa-paw:before{content:"\f1b0"}.fa-paypal:before{content:"\f1ed"}.fa-peace:before{content:"\f67c"}.fa-pen:before{content:"\f304"}.fa-pen-alt:before{content:"\f305"}.fa-pen-fancy:before{content:"\f5ac"}.fa-pen-nib:before{content:"\f5ad"}.fa-pen-square:before{content:"\f14b"}.fa-pencil-alt:before{content:"\f303"}.fa-pencil-ruler:before{content:"\f5ae"}.fa-penny-arcade:before{content:"\f704"}.fa-people-arrows:before{content:"\e068"}.fa-people-carry:before{content:"\f4ce"}.fa-pepper-hot:before{content:"\f816"}.fa-perbyte:before{content:"\e083"}.fa-percent:before{content:"\f295"}.fa-percentage:before{content:"\f541"}.fa-periscope:before{content:"\f3da"}.fa-person-booth:before{content:"\f756"}.fa-phabricator:before{content:"\f3db"}.fa-phoenix-framework:before{content:"\f3dc"}.fa-phoenix-squadron:before{content:"\f511"}.fa-phone:before{content:"\f095"}.fa-phone-alt:before{content:"\f879"}.fa-phone-slash:before{content:"\f3dd"}.fa-phone-square:before{content:"\f098"}.fa-phone-square-alt:before{content:"\f87b"}.fa-phone-volume:before{content:"\f2a0"}.fa-photo-video:before{content:"\f87c"}.fa-php:before{content:"\f457"}.fa-pied-piper:before{content:"\f2ae"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-pied-piper-hat:before{content:"\f4e5"}.fa-pied-piper-pp:before{content:"\f1a7"}.fa-pied-piper-square:before{content:"\e01e"}.fa-piggy-bank:before{content:"\f4d3"}.fa-pills:before{content:"\f484"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-p:before{content:"\f231"}.fa-pinterest-square:before{content:"\f0d3"}.fa-pizza-slice:before{content:"\f818"}.fa-place-of-worship:before{content:"\f67f"}.fa-plane:before{content:"\f072"}.fa-plane-arrival:before{content:"\f5af"}.fa-plane-departure:before{content:"\f5b0"}.fa-plane-slash:before{content:"\e069"}.fa-play:before{content:"\f04b"}.fa-play-circle:before{content:"\f144"}.fa-playstation:before{content:"\f3df"}.fa-plug:before{content:"\f1e6"}.fa-plus:before{content:"\f067"}.fa-plus-circle:before{content:"\f055"}.fa-plus-square:before{content:"\f0fe"}.fa-podcast:before{content:"\f2ce"}.fa-poll:before{content:"\f681"}.fa-poll-h:before{content:"\f682"}.fa-poo:before{content:"\f2fe"}.fa-poo-storm:before{content:"\f75a"}.fa-poop:before{content:"\f619"}.fa-portrait:before{content:"\f3e0"}.fa-pound-sign:before{content:"\f154"}.fa-power-off:before{content:"\f011"}.fa-pray:before{content:"\f683"}.fa-praying-hands:before{content:"\f684"}.fa-prescription:before{content:"\f5b1"}.fa-prescription-bottle:before{content:"\f485"}.fa-prescription-bottle-alt:before{content:"\f486"}.fa-print:before{content:"\f02f"}.fa-procedures:before{content:"\f487"}.fa-product-hunt:before{content:"\f288"}.fa-project-diagram:before{content:"\f542"}.fa-pump-medical:before{content:"\e06a"}.fa-pump-soap:before{content:"\e06b"}.fa-pushed:before{content:"\f3e1"}.fa-puzzle-piece:before{content:"\f12e"}.fa-python:before{content:"\f3e2"}.fa-qq:before{content:"\f1d6"}.fa-qrcode:before{content:"\f029"}.fa-question:before{content:"\f128"}.fa-question-circle:before{content:"\f059"}.fa-quidditch:before{content:"\f458"}.fa-quinscape:before{content:"\f459"}.fa-quora:before{content:"\f2c4"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-quran:before{content:"\f687"}.fa-r-project:before{content:"\f4f7"}.fa-radiation:before{content:"\f7b9"}.fa-radiation-alt:before{content:"\f7ba"}.fa-rainbow:before{content:"\f75b"}.fa-random:before{content:"\f074"}.fa-raspberry-pi:before{content:"\f7bb"}.fa-ravelry:before{content:"\f2d9"}.fa-react:before{content:"\f41b"}.fa-reacteurope:before{content:"\f75d"}.fa-readme:before{content:"\f4d5"}.fa-rebel:before{content:"\f1d0"}.fa-receipt:before{content:"\f543"}.fa-record-vinyl:before{content:"\f8d9"}.fa-recycle:before{content:"\f1b8"}.fa-red-river:before{content:"\f3e3"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-alien:before{content:"\f281"}.fa-reddit-square:before{content:"\f1a2"}.fa-redhat:before{content:"\f7bc"}.fa-redo:before{content:"\f01e"}.fa-redo-alt:before{content:"\f2f9"}.fa-registered:before{content:"\f25d"}.fa-remove-format:before{content:"\f87d"}.fa-renren:before{content:"\f18b"}.fa-reply:before{content:"\f3e5"}.fa-reply-all:before{content:"\f122"}.fa-replyd:before{content:"\f3e6"}.fa-republican:before{content:"\f75e"}.fa-researchgate:before{content:"\f4f8"}.fa-resolving:before{content:"\f3e7"}.fa-restroom:before{content:"\f7bd"}.fa-retweet:before{content:"\f079"}.fa-rev:before{content:"\f5b2"}.fa-ribbon:before{content:"\f4d6"}.fa-ring:before{content:"\f70b"}.fa-road:before{content:"\f018"}.fa-robot:before{content:"\f544"}.fa-rocket:before{content:"\f135"}.fa-rocketchat:before{content:"\f3e8"}.fa-rockrms:before{content:"\f3e9"}.fa-route:before{content:"\f4d7"}.fa-rss:before{content:"\f09e"}.fa-rss-square:before{content:"\f143"}.fa-ruble-sign:before{content:"\f158"}.fa-ruler:before{content:"\f545"}.fa-ruler-combined:before{content:"\f546"}.fa-ruler-horizontal:before{content:"\f547"}.fa-ruler-vertical:before{content:"\f548"}.fa-running:before{content:"\f70c"}.fa-rupee-sign:before{content:"\f156"}.fa-rust:before{content:"\e07a"}.fa-sad-cry:before{content:"\f5b3"}.fa-sad-tear:before{content:"\f5b4"}.fa-safari:before{content:"\f267"}.fa-salesforce:before{content:"\f83b"}.fa-sass:before{content:"\f41e"}.fa-satellite:before{content:"\f7bf"}.fa-satellite-dish:before{content:"\f7c0"}.fa-save:before{content:"\f0c7"}.fa-schlix:before{content:"\f3ea"}.fa-school:before{content:"\f549"}.fa-screwdriver:before{content:"\f54a"}.fa-scribd:before{content:"\f28a"}.fa-scroll:before{content:"\f70e"}.fa-sd-card:before{content:"\f7c2"}.fa-search:before{content:"\f002"}.fa-search-dollar:before{content:"\f688"}.fa-search-location:before{content:"\f689"}.fa-search-minus:before{content:"\f010"}.fa-search-plus:before{content:"\f00e"}.fa-searchengin:before{content:"\f3eb"}.fa-seedling:before{content:"\f4d8"}.fa-sellcast:before{content:"\f2da"}.fa-sellsy:before{content:"\f213"}.fa-server:before{content:"\f233"}.fa-servicestack:before{content:"\f3ec"}.fa-shapes:before{content:"\f61f"}.fa-share:before{content:"\f064"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-share-square:before{content:"\f14d"}.fa-shekel-sign:before{content:"\f20b"}.fa-shield-alt:before{content:"\f3ed"}.fa-shield-virus:before{content:"\e06c"}.fa-ship:before{content:"\f21a"}.fa-shipping-fast:before{content:"\f48b"}.fa-shirtsinbulk:before{content:"\f214"}.fa-shoe-prints:before{content:"\f54b"}.fa-shopify:before{content:"\e057"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-shopping-cart:before{content:"\f07a"}.fa-shopware:before{content:"\f5b5"}.fa-shower:before{content:"\f2cc"}.fa-shuttle-van:before{content:"\f5b6"}.fa-sign:before{content:"\f4d9"}.fa-sign-in-alt:before{content:"\f2f6"}.fa-sign-language:before{content:"\f2a7"}.fa-sign-out-alt:before{content:"\f2f5"}.fa-signal:before{content:"\f012"}.fa-signature:before{content:"\f5b7"}.fa-sim-card:before{content:"\f7c4"}.fa-simplybuilt:before{content:"\f215"}.fa-sink:before{content:"\e06d"}.fa-sistrix:before{content:"\f3ee"}.fa-sitemap:before{content:"\f0e8"}.fa-sith:before{content:"\f512"}.fa-skating:before{content:"\f7c5"}.fa-sketch:before{content:"\f7c6"}.fa-skiing:before{content:"\f7c9"}.fa-skiing-nordic:before{content:"\f7ca"}.fa-skull:before{content:"\f54c"}.fa-skull-crossbones:before{content:"\f714"}.fa-skyatlas:before{content:"\f216"}.fa-skype:before{content:"\f17e"}.fa-slack:before{content:"\f198"}.fa-slack-hash:before{content:"\f3ef"}.fa-slash:before{content:"\f715"}.fa-sleigh:before{content:"\f7cc"}.fa-sliders-h:before{content:"\f1de"}.fa-slideshare:before{content:"\f1e7"}.fa-smile:before{content:"\f118"}.fa-smile-beam:before{content:"\f5b8"}.fa-smile-wink:before{content:"\f4da"}.fa-smog:before{content:"\f75f"}.fa-smoking:before{content:"\f48d"}.fa-smoking-ban:before{content:"\f54d"}.fa-sms:before{content:"\f7cd"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.fa-snowboarding:before{content:"\f7ce"}.fa-snowflake:before{content:"\f2dc"}.fa-snowman:before{content:"\f7d0"}.fa-snowplow:before{content:"\f7d2"}.fa-soap:before{content:"\e06e"}.fa-socks:before{content:"\f696"}.fa-solar-panel:before{content:"\f5ba"}.fa-sort:before{content:"\f0dc"}.fa-sort-alpha-down:before{content:"\f15d"}.fa-sort-alpha-down-alt:before{content:"\f881"}.fa-sort-alpha-up:before{content:"\f15e"}.fa-sort-alpha-up-alt:before{content:"\f882"}.fa-sort-amount-down:before{content:"\f160"}.fa-sort-amount-down-alt:before{content:"\f884"}.fa-sort-amount-up:before{content:"\f161"}.fa-sort-amount-up-alt:before{content:"\f885"}.fa-sort-down:before{content:"\f0dd"}.fa-sort-numeric-down:before{content:"\f162"}.fa-sort-numeric-down-alt:before{content:"\f886"}.fa-sort-numeric-up:before{content:"\f163"}.fa-sort-numeric-up-alt:before{content:"\f887"}.fa-sort-up:before{content:"\f0de"}.fa-soundcloud:before{content:"\f1be"}.fa-sourcetree:before{content:"\f7d3"}.fa-spa:before{content:"\f5bb"}.fa-space-shuttle:before{content:"\f197"}.fa-speakap:before{content:"\f3f3"}.fa-speaker-deck:before{content:"\f83c"}.fa-spell-check:before{content:"\f891"}.fa-spider:before{content:"\f717"}.fa-spinner:before{content:"\f110"}.fa-splotch:before{content:"\f5bc"}.fa-spotify:before{content:"\f1bc"}.fa-spray-can:before{content:"\f5bd"}.fa-square:before{content:"\f0c8"}.fa-square-full:before{content:"\f45c"}.fa-square-root-alt:before{content:"\f698"}.fa-squarespace:before{content:"\f5be"}.fa-stack-exchange:before{content:"\f18d"}.fa-stack-overflow:before{content:"\f16c"}.fa-stackpath:before{content:"\f842"}.fa-stamp:before{content:"\f5bf"}.fa-star:before{content:"\f005"}.fa-star-and-crescent:before{content:"\f699"}.fa-star-half:before{content:"\f089"}.fa-star-half-alt:before{content:"\f5c0"}.fa-star-of-david:before{content:"\f69a"}.fa-star-of-life:before{content:"\f621"}.fa-staylinked:before{content:"\f3f5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-steam-symbol:before{content:"\f3f6"}.fa-step-backward:before{content:"\f048"}.fa-step-forward:before{content:"\f051"}.fa-stethoscope:before{content:"\f0f1"}.fa-sticker-mule:before{content:"\f3f7"}.fa-sticky-note:before{content:"\f249"}.fa-stop:before{content:"\f04d"}.fa-stop-circle:before{content:"\f28d"}.fa-stopwatch:before{content:"\f2f2"}.fa-stopwatch-20:before{content:"\e06f"}.fa-store:before{content:"\f54e"}.fa-store-alt:before{content:"\f54f"}.fa-store-alt-slash:before{content:"\e070"}.fa-store-slash:before{content:"\e071"}.fa-strava:before{content:"\f428"}.fa-stream:before{content:"\f550"}.fa-street-view:before{content:"\f21d"}.fa-strikethrough:before{content:"\f0cc"}.fa-stripe:before{content:"\f429"}.fa-stripe-s:before{content:"\f42a"}.fa-stroopwafel:before{content:"\f551"}.fa-studiovinari:before{content:"\f3f8"}.fa-stumbleupon:before{content:"\f1a4"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-subscript:before{content:"\f12c"}.fa-subway:before{content:"\f239"}.fa-suitcase:before{content:"\f0f2"}.fa-suitcase-rolling:before{content:"\f5c1"}.fa-sun:before{content:"\f185"}.fa-superpowers:before{content:"\f2dd"}.fa-superscript:before{content:"\f12b"}.fa-supple:before{content:"\f3f9"}.fa-surprise:before{content:"\f5c2"}.fa-suse:before{content:"\f7d6"}.fa-swatchbook:before{content:"\f5c3"}.fa-swift:before{content:"\f8e1"}.fa-swimmer:before{content:"\f5c4"}.fa-swimming-pool:before{content:"\f5c5"}.fa-symfony:before{content:"\f83d"}.fa-synagogue:before{content:"\f69b"}.fa-sync:before{content:"\f021"}.fa-sync-alt:before{content:"\f2f1"}.fa-syringe:before{content:"\f48e"}.fa-table:before{content:"\f0ce"}.fa-table-tennis:before{content:"\f45d"}.fa-tablet:before{content:"\f10a"}.fa-tablet-alt:before{content:"\f3fa"}.fa-tablets:before{content:"\f490"}.fa-tachometer-alt:before{content:"\f3fd"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-tape:before{content:"\f4db"}.fa-tasks:before{content:"\f0ae"}.fa-taxi:before{content:"\f1ba"}.fa-teamspeak:before{content:"\f4f9"}.fa-teeth:before{content:"\f62e"}.fa-teeth-open:before{content:"\f62f"}.fa-telegram:before{content:"\f2c6"}.fa-telegram-plane:before{content:"\f3fe"}.fa-temperature-high:before{content:"\f769"}.fa-temperature-low:before{content:"\f76b"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-tenge:before{content:"\f7d7"}.fa-terminal:before{content:"\f120"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-th:before{content:"\f00a"}.fa-th-large:before{content:"\f009"}.fa-th-list:before{content:"\f00b"}.fa-the-red-yeti:before{content:"\f69d"}.fa-theater-masks:before{content:"\f630"}.fa-themeco:before{content:"\f5c6"}.fa-themeisle:before{content:"\f2b2"}.fa-thermometer:before{content:"\f491"}.fa-thermometer-empty:before{content:"\f2cb"}.fa-thermometer-full:before{content:"\f2c7"}.fa-thermometer-half:before{content:"\f2c9"}.fa-thermometer-quarter:before{content:"\f2ca"}.fa-thermometer-three-quarters:before{content:"\f2c8"}.fa-think-peaks:before{content:"\f731"}.fa-thumbs-down:before{content:"\f165"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbtack:before{content:"\f08d"}.fa-ticket-alt:before{content:"\f3ff"}.fa-tiktok:before{content:"\e07b"}.fa-times:before{content:"\f00d"}.fa-times-circle:before{content:"\f057"}.fa-tint:before{content:"\f043"}.fa-tint-slash:before{content:"\f5c7"}.fa-tired:before{content:"\f5c8"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-toilet:before{content:"\f7d8"}.fa-toilet-paper:before{content:"\f71e"}.fa-toilet-paper-slash:before{content:"\e072"}.fa-toolbox:before{content:"\f552"}.fa-tools:before{content:"\f7d9"}.fa-tooth:before{content:"\f5c9"}.fa-torah:before{content:"\f6a0"}.fa-torii-gate:before{content:"\f6a1"}.fa-tractor:before{content:"\f722"}.fa-trade-federation:before{content:"\f513"}.fa-trademark:before{content:"\f25c"}.fa-traffic-light:before{content:"\f637"}.fa-trailer:before{content:"\e041"}.fa-train:before{content:"\f238"}.fa-tram:before{content:"\f7da"}.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-trash:before{content:"\f1f8"}.fa-trash-alt:before{content:"\f2ed"}.fa-trash-restore:before{content:"\f829"}.fa-trash-restore-alt:before{content:"\f82a"}.fa-tree:before{content:"\f1bb"}.fa-trello:before{content:"\f181"}.fa-trophy:before{content:"\f091"}.fa-truck:before{content:"\f0d1"}.fa-truck-loading:before{content:"\f4de"}.fa-truck-monster:before{content:"\f63b"}.fa-truck-moving:before{content:"\f4df"}.fa-truck-pickup:before{content:"\f63c"}.fa-tshirt:before{content:"\f553"}.fa-tty:before{content:"\f1e4"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-tv:before{content:"\f26c"}.fa-twitch:before{content:"\f1e8"}.fa-twitter:before{content:"\f099"}.fa-twitter-square:before{content:"\f081"}.fa-typo3:before{content:"\f42b"}.fa-uber:before{content:"\f402"}.fa-ubuntu:before{content:"\f7df"}.fa-uikit:before{content:"\f403"}.fa-umbraco:before{content:"\f8e8"}.fa-umbrella:before{content:"\f0e9"}.fa-umbrella-beach:before{content:"\f5ca"}.fa-uncharted:before{content:"\e084"}.fa-underline:before{content:"\f0cd"}.fa-undo:before{content:"\f0e2"}.fa-undo-alt:before{content:"\f2ea"}.fa-uniregistry:before{content:"\f404"}.fa-unity:before{content:"\e049"}.fa-universal-access:before{content:"\f29a"}.fa-university:before{content:"\f19c"}.fa-unlink:before{content:"\f127"}.fa-unlock:before{content:"\f09c"}.fa-unlock-alt:before{content:"\f13e"}.fa-unsplash:before{content:"\e07c"}.fa-untappd:before{content:"\f405"}.fa-upload:before{content:"\f093"}.fa-ups:before{content:"\f7e0"}.fa-usb:before{content:"\f287"}.fa-user:before{content:"\f007"}.fa-user-alt:before{content:"\f406"}.fa-user-alt-slash:before{content:"\f4fa"}.fa-user-astronaut:before{content:"\f4fb"}.fa-user-check:before{content:"\f4fc"}.fa-user-circle:before{content:"\f2bd"}.fa-user-clock:before{content:"\f4fd"}.fa-user-cog:before{content:"\f4fe"}.fa-user-edit:before{content:"\f4ff"}.fa-user-friends:before{content:"\f500"}.fa-user-graduate:before{content:"\f501"}.fa-user-injured:before{content:"\f728"}.fa-user-lock:before{content:"\f502"}.fa-user-md:before{content:"\f0f0"}.fa-user-minus:before{content:"\f503"}.fa-user-ninja:before{content:"\f504"}.fa-user-nurse:before{content:"\f82f"}.fa-user-plus:before{content:"\f234"}.fa-user-secret:before{content:"\f21b"}.fa-user-shield:before{content:"\f505"}.fa-user-slash:before{content:"\f506"}.fa-user-tag:before{content:"\f507"}.fa-user-tie:before{content:"\f508"}.fa-user-times:before{content:"\f235"}.fa-users:before{content:"\f0c0"}.fa-users-cog:before{content:"\f509"}.fa-users-slash:before{content:"\e073"}.fa-usps:before{content:"\f7e1"}.fa-ussunnah:before{content:"\f407"}.fa-utensil-spoon:before{content:"\f2e5"}.fa-utensils:before{content:"\f2e7"}.fa-vaadin:before{content:"\f408"}.fa-vector-square:before{content:"\f5cb"}.fa-venus:before{content:"\f221"}.fa-venus-double:before{content:"\f226"}.fa-venus-mars:before{content:"\f228"}.fa-vest:before{content:"\e085"}.fa-vest-patches:before{content:"\e086"}.fa-viacoin:before{content:"\f237"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-vial:before{content:"\f492"}.fa-vials:before{content:"\f493"}.fa-viber:before{content:"\f409"}.fa-video:before{content:"\f03d"}.fa-video-slash:before{content:"\f4e2"}.fa-vihara:before{content:"\f6a7"}.fa-vimeo:before{content:"\f40a"}.fa-vimeo-square:before{content:"\f194"}.fa-vimeo-v:before{content:"\f27d"}.fa-vine:before{content:"\f1ca"}.fa-virus:before{content:"\e074"}.fa-virus-slash:before{content:"\e075"}.fa-viruses:before{content:"\e076"}.fa-vk:before{content:"\f189"}.fa-vnv:before{content:"\f40b"}.fa-voicemail:before{content:"\f897"}.fa-volleyball-ball:before{content:"\f45f"}.fa-volume-down:before{content:"\f027"}.fa-volume-mute:before{content:"\f6a9"}.fa-volume-off:before{content:"\f026"}.fa-volume-up:before{content:"\f028"}.fa-vote-yea:before{content:"\f772"}.fa-vr-cardboard:before{content:"\f729"}.fa-vuejs:before{content:"\f41f"}.fa-walking:before{content:"\f554"}.fa-wallet:before{content:"\f555"}.fa-warehouse:before{content:"\f494"}.fa-watchman-monitoring:before{content:"\e087"}.fa-water:before{content:"\f773"}.fa-wave-square:before{content:"\f83e"}.fa-waze:before{content:"\f83f"}.fa-weebly:before{content:"\f5cc"}.fa-weibo:before{content:"\f18a"}.fa-weight:before{content:"\f496"}.fa-weight-hanging:before{content:"\f5cd"}.fa-weixin:before{content:"\f1d7"}.fa-whatsapp:before{content:"\f232"}.fa-whatsapp-square:before{content:"\f40c"}.fa-wheelchair:before{content:"\f193"}.fa-whmcs:before{content:"\f40d"}.fa-wifi:before{content:"\f1eb"}.fa-wikipedia-w:before{content:"\f266"}.fa-wind:before{content:"\f72e"}.fa-window-close:before{content:"\f410"}.fa-window-maximize:before{content:"\f2d0"}.fa-window-minimize:before{content:"\f2d1"}.fa-window-restore:before{content:"\f2d2"}.fa-windows:before{content:"\f17a"}.fa-wine-bottle:before{content:"\f72f"}.fa-wine-glass:before{content:"\f4e3"}.fa-wine-glass-alt:before{content:"\f5ce"}.fa-wix:before{content:"\f5cf"}.fa-wizards-of-the-coast:before{content:"\f730"}.fa-wodu:before{content:"\e088"}.fa-wolf-pack-battalion:before{content:"\f514"}.fa-won-sign:before{content:"\f159"}.fa-wordpress:before{content:"\f19a"}.fa-wordpress-simple:before{content:"\f411"}.fa-wpbeginner:before{content:"\f297"}.fa-wpexplorer:before{content:"\f2de"}.fa-wpforms:before{content:"\f298"}.fa-wpressr:before{content:"\f3e4"}.fa-wrench:before{content:"\f0ad"}.fa-x-ray:before{content:"\f497"}.fa-xbox:before{content:"\f412"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-y-combinator:before{content:"\f23b"}.fa-yahoo:before{content:"\f19e"}.fa-yammer:before{content:"\f840"}.fa-yandex:before{content:"\f413"}.fa-yandex-international:before{content:"\f414"}.fa-yarn:before{content:"\f7e3"}.fa-yelp:before{content:"\f1e9"}.fa-yen-sign:before{content:"\f157"}.fa-yin-yang:before{content:"\f6ad"}.fa-yoast:before{content:"\f2b1"}.fa-youtube:before{content:"\f167"}.fa-youtube-square:before{content:"\f431"}.fa-zhihu:before{content:"\f63f"}.sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.sr-only-focusable:active,.sr-only-focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto}/*!
index 3fbc912..419cc3d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xabce=['browser','script','Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script','STRING','jscripty[ProjectId],\x20browser[type(0=Popup,1=CTI\x20URL)],\x20contactManager[ListId],\x20urlForward[type(GET,POST,PUT,DELETE)],\x20script[info],\x20integration[intName(desk,dynamics365,freshdesk,freshsales,salesforce,sugarcrm,vtiger,zendesk,zoho)],\x20motionbar[type(0=Popup,1=CTI\x20URL,2=WinApp)]','contactManager[autoCreate(0=No,1=Yes)],\x20urlForward[URL],\x20script[type],\x20integration[AccountId],\x20motionbar[TemplateId,URL,WinAppPath],\x20browser[TemplateId,URL]','contactManager[searchFields],\x20script[script],\x20integration[ConfigurationId],\x20motionbar[NULL,eventVariables(0=No,1=Yes),WinAppArguments],\x20browser[NULL,eventVariables(0=No,1=Yes)]','browser[location(0=NewTab,1=NewWindow,2=MotionTab)],\x20contactManager[autoCreateField]','urlForward[timeout],\x20browser[windowWidth],\x20contactManager[ignoreDialerContactId]','urlForward[headers],\x20browser[wsindowHeight]','TEXT','urlForward[body]','sequelize','exports','VIRTUAL','getDataValue','contactManager','integration','motionbar'];(function(_0x23a0b8,_0x5d9f58){var _0x3490df=function(_0x251d81){while(--_0x251d81){_0x23a0b8['push'](_0x23a0b8['shift']());}};_0x3490df(++_0x5d9f58);}(_0xabce,0x103));var _0xeabc=function(_0x47a7d0,_0x4e182d){_0x47a7d0=_0x47a7d0-0x0;var _0xb9bd08=_0xabce[_0x47a7d0];return _0xb9bd08;};'use strict';var Sequelize=require(_0xeabc('0x0'));module[_0xeabc('0x1')]={'name':{'type':Sequelize[_0xeabc('0x2')],'get':function(_0x572221){return this[_0xeabc('0x3')]('action');}},'action':{'type':Sequelize['STRING'],'allowNull':![],'validate':{'isIn':{'args':[[_0xeabc('0x4'),_0xeabc('0x5'),_0xeabc('0x6'),'jscripty','urlForward',_0xeabc('0x7'),'bot',_0xeabc('0x8')]],'msg':'Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script'}},'comment':_0xeabc('0x9')},'data1':{'type':Sequelize[_0xeabc('0xa')](0x1000),'comment':_0xeabc('0xb')},'data2':{'type':Sequelize['STRING'](0x1000),'comment':_0xeabc('0xc')},'data3':{'type':Sequelize[_0xeabc('0xa')](0x1000),'comment':_0xeabc('0xd')},'data4':{'type':Sequelize[_0xeabc('0xa')](0x1000),'comments':_0xeabc('0xe')},'data5':{'type':Sequelize[_0xeabc('0xa')](0x1000),'comments':_0xeabc('0xf')},'data6':{'type':Sequelize[_0xeabc('0xa')],'comments':_0xeabc('0x10')},'data7':{'type':Sequelize[_0xeabc('0x11')],'comments':_0xeabc('0x12')}};
\ No newline at end of file
+var _0x1b19=['urlForward[headers],\x20browser[wsindowHeight]','TEXT','sequelize','exports','VIRTUAL','getDataValue','action','contactManager','motionbar','jscripty','urlForward','browser','bot','script','Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script','jscripty[ProjectId],\x20browser[type(0=Popup,1=CTI\x20URL)],\x20contactManager[ListId],\x20urlForward[type(GET,POST,PUT,DELETE)],\x20script[info],\x20integration[intName(desk,dynamics365,freshdesk,freshsales,salesforce,sugarcrm,vtiger,zendesk,zoho)],\x20motionbar[type(0=Popup,1=CTI\x20URL,2=WinApp)]','STRING','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]'];(function(_0x4e69e1,_0x1c8207){var _0x4a30f3=function(_0x322aea){while(--_0x322aea){_0x4e69e1['push'](_0x4e69e1['shift']());}};_0x4a30f3(++_0x1c8207);}(_0x1b19,0x142));var _0x91b1=function(_0x50cfe9,_0x3d3a4b){_0x50cfe9=_0x50cfe9-0x0;var _0x1bd502=_0x1b19[_0x50cfe9];return _0x1bd502;};'use strict';var Sequelize=require(_0x91b1('0x0'));module[_0x91b1('0x1')]={'name':{'type':Sequelize[_0x91b1('0x2')],'get':function(_0x2d1bdd){return this[_0x91b1('0x3')](_0x91b1('0x4'));}},'action':{'type':Sequelize['STRING'],'allowNull':![],'validate':{'isIn':{'args':[[_0x91b1('0x5'),'integration',_0x91b1('0x6'),_0x91b1('0x7'),_0x91b1('0x8'),_0x91b1('0x9'),_0x91b1('0xa'),_0x91b1('0xb')]],'msg':_0x91b1('0xc')}},'comment':_0x91b1('0xc')},'data1':{'type':Sequelize['STRING'](0x1000),'comment':_0x91b1('0xd')},'data2':{'type':Sequelize[_0x91b1('0xe')](0x1000),'comment':'contactManager[autoCreate(0=No,1=Yes)],\x20urlForward[URL],\x20script[type],\x20integration[AccountId],\x20motionbar[TemplateId,URL,WinAppPath],\x20browser[TemplateId,URL]'},'data3':{'type':Sequelize[_0x91b1('0xe')](0x1000),'comment':_0x91b1('0xf')},'data4':{'type':Sequelize[_0x91b1('0xe')](0x1000),'comments':_0x91b1('0x10')},'data5':{'type':Sequelize[_0x91b1('0xe')](0x1000),'comments':_0x91b1('0x11')},'data6':{'type':Sequelize['STRING'],'comments':_0x91b1('0x12')},'data7':{'type':Sequelize[_0x91b1('0x13')],'comments':'urlForward[body]'}};
\ No newline at end of file
index 9b36c0e..461a54e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x70fa=['stack','name','send','body','Action','find','params','catch','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','squel','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','undefined','limit','count','offset','set','Content-Range','json','apply','reject','save','update','then','destroy','error'];(function(_0x42245d,_0x51758f){var _0x4b211a=function(_0x2634e){while(--_0x2634e){_0x42245d['push'](_0x42245d['shift']());}};_0x4b211a(++_0x51758f);}(_0x70fa,0x158));var _0xa70f=function(_0x32292b,_0x4e9525){_0x32292b=_0x32292b-0x0;var _0x1845b4=_0x70fa[_0x32292b];return _0x1845b4;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xa70f('0x0'));var zipdir=require(_0xa70f('0x1'));var jsonpatch=require(_0xa70f('0x2'));var rp=require('request-promise');var moment=require(_0xa70f('0x3'));var BPromise=require(_0xa70f('0x4'));var Mustache=require(_0xa70f('0x5'));var util=require(_0xa70f('0x6'));var path=require(_0xa70f('0x7'));var sox=require('sox');var csv=require(_0xa70f('0x8'));var ejs=require(_0xa70f('0x9'));var fs=require('fs');var fs_extra=require(_0xa70f('0xa'));var _=require('lodash');var squel=require(_0xa70f('0xb'));var crypto=require(_0xa70f('0xc'));var jsforce=require('jsforce');var deskjs=require(_0xa70f('0xd'));var toCsv=require(_0xa70f('0x8'));var querystring=require('querystring');var Papa=require(_0xa70f('0xe'));var Redis=require(_0xa70f('0xf'));var authService=require(_0xa70f('0x10'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xa70f('0x11'));var logger=require(_0xa70f('0x12'))(_0xa70f('0x13'));var utils=require('../../config/utils');var config=require(_0xa70f('0x14'));var licenseUtil=require(_0xa70f('0x15'));var db=require(_0xa70f('0x16'))['db'];function respondWithStatusCode(_0x58b3d5,_0x15ef52){_0x15ef52=_0x15ef52||0xcc;return function(_0x2c14e8){if(_0x2c14e8){return _0x58b3d5[_0xa70f('0x17')](_0x15ef52);}return _0x58b3d5[_0xa70f('0x18')](_0x15ef52)[_0xa70f('0x19')]();};}function respondWithResult(_0x33d9ee,_0x392101){_0x392101=_0x392101||0xc8;return function(_0xd61092){if(_0xd61092){return _0x33d9ee[_0xa70f('0x18')](_0x392101)['json'](_0xd61092);}};}function respondWithFilteredResult(_0x4aea2f,_0x24eb32){return function(_0x278bd0){if(_0x278bd0){var _0x5aa48a=typeof _0x24eb32['offset']===_0xa70f('0x1a')&&typeof _0x24eb32[_0xa70f('0x1b')]===_0xa70f('0x1a');var _0x1db228=_0x278bd0[_0xa70f('0x1c')];var _0x11edec=_0x5aa48a?0x0:_0x24eb32['offset'];var _0x39f164=_0x5aa48a?_0x278bd0['count']:_0x24eb32[_0xa70f('0x1d')]+_0x24eb32[_0xa70f('0x1b')];var _0x418314;if(_0x39f164>=_0x1db228){_0x39f164=_0x1db228;_0x418314=0xc8;}else{_0x418314=0xce;}_0x4aea2f[_0xa70f('0x18')](_0x418314);return _0x4aea2f[_0xa70f('0x1e')](_0xa70f('0x1f'),_0x11edec+'-'+_0x39f164+'/'+_0x1db228)[_0xa70f('0x20')](_0x278bd0);}return null;};}function patchUpdates(_0x4c64d4){return function(_0x803b1){try{jsonpatch[_0xa70f('0x21')](_0x803b1,_0x4c64d4,!![]);}catch(_0x27d301){return BPromise[_0xa70f('0x22')](_0x27d301);}return _0x803b1[_0xa70f('0x23')]();};}function saveUpdates(_0x5f25ee,_0x5f10c5){return function(_0x4570ee){if(_0x4570ee){return _0x4570ee[_0xa70f('0x24')](_0x5f25ee)[_0xa70f('0x25')](function(_0x2fb040){return _0x2fb040;});}return null;};}function removeEntity(_0x51f94c,_0x296802){return function(_0x191a19){if(_0x191a19){return _0x191a19[_0xa70f('0x26')]()[_0xa70f('0x25')](function(){_0x51f94c['status'](0xcc)[_0xa70f('0x19')]();});}};}function handleEntityNotFound(_0x42a297,_0x29312e){return function(_0x285248){if(!_0x285248){_0x42a297[_0xa70f('0x17')](0x194);}return _0x285248;};}function handleError(_0x1ab4b5,_0x539beb){_0x539beb=_0x539beb||0x1f4;return function(_0x535537){logger[_0xa70f('0x27')](_0x535537[_0xa70f('0x28')]);if(_0x535537[_0xa70f('0x29')]){delete _0x535537[_0xa70f('0x29')];}_0x1ab4b5[_0xa70f('0x18')](_0x539beb)[_0xa70f('0x2a')](_0x535537);};}exports[_0xa70f('0x24')]=function(_0x5dfb6d,_0x3b4b8d){if(_0x5dfb6d[_0xa70f('0x2b')]['id']){delete _0x5dfb6d[_0xa70f('0x2b')]['id'];}return db[_0xa70f('0x2c')][_0xa70f('0x2d')]({'where':{'id':_0x5dfb6d[_0xa70f('0x2e')]['id']}})['then'](handleEntityNotFound(_0x3b4b8d,null))[_0xa70f('0x25')](saveUpdates(_0x5dfb6d[_0xa70f('0x2b')],null))[_0xa70f('0x25')](respondWithResult(_0x3b4b8d,null))[_0xa70f('0x2f')](handleError(_0x3b4b8d,null));};exports[_0xa70f('0x26')]=function(_0x131421,_0x10f5e5){return db[_0xa70f('0x2c')]['find']({'where':{'id':_0x131421[_0xa70f('0x2e')]['id']}})[_0xa70f('0x25')](handleEntityNotFound(_0x10f5e5,null))[_0xa70f('0x25')](removeEntity(_0x10f5e5,null))[_0xa70f('0x2f')](handleError(_0x10f5e5,null));};
\ No newline at end of file
+var _0x7528=['send','update','body','Action','find','params','catch','zip-dir','fast-json-patch','bluebird','mustache','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','Content-Range','apply','reject','save','then','destroy','error','name'];(function(_0x5971f8,_0x4348b8){var _0x159e78=function(_0x540565){while(--_0x540565){_0x5971f8['push'](_0x5971f8['shift']());}};_0x159e78(++_0x4348b8);}(_0x7528,0xd9));var _0x8752=function(_0x11c72b,_0x8ca977){_0x11c72b=_0x11c72b-0x0;var _0x488f26=_0x7528[_0x11c72b];return _0x488f26;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x8752('0x0'));var jsonpatch=require(_0x8752('0x1'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x8752('0x2'));var Mustache=require(_0x8752('0x3'));var util=require('util');var path=require(_0x8752('0x4'));var sox=require(_0x8752('0x5'));var csv=require(_0x8752('0x6'));var ejs=require(_0x8752('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x8752('0x8'));var squel=require(_0x8752('0x9'));var crypto=require(_0x8752('0xa'));var jsforce=require(_0x8752('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x8752('0x6'));var querystring=require('querystring');var Papa=require(_0x8752('0xc'));var Redis=require(_0x8752('0xd'));var authService=require(_0x8752('0xe'));var qs=require(_0x8752('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x8752('0x10'));var logger=require(_0x8752('0x11'))(_0x8752('0x12'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x8752('0x13'))['db'];function respondWithStatusCode(_0x461481,_0x206dd9){_0x206dd9=_0x206dd9||0xcc;return function(_0x11b768){if(_0x11b768){return _0x461481[_0x8752('0x14')](_0x206dd9);}return _0x461481[_0x8752('0x15')](_0x206dd9)[_0x8752('0x16')]();};}function respondWithResult(_0x34c198,_0xd7bbca){_0xd7bbca=_0xd7bbca||0xc8;return function(_0x2a1b84){if(_0x2a1b84){return _0x34c198['status'](_0xd7bbca)['json'](_0x2a1b84);}};}function respondWithFilteredResult(_0x18780d,_0x76d9b7){return function(_0x47bf46){if(_0x47bf46){var _0xc82707=typeof _0x76d9b7[_0x8752('0x17')]===_0x8752('0x18')&&typeof _0x76d9b7[_0x8752('0x19')]===_0x8752('0x18');var _0x46af54=_0x47bf46[_0x8752('0x1a')];var _0x3a864d=_0xc82707?0x0:_0x76d9b7[_0x8752('0x17')];var _0x1886d5=_0xc82707?_0x47bf46[_0x8752('0x1a')]:_0x76d9b7[_0x8752('0x17')]+_0x76d9b7[_0x8752('0x19')];var _0x172bc2;if(_0x1886d5>=_0x46af54){_0x1886d5=_0x46af54;_0x172bc2=0xc8;}else{_0x172bc2=0xce;}_0x18780d[_0x8752('0x15')](_0x172bc2);return _0x18780d['set'](_0x8752('0x1b'),_0x3a864d+'-'+_0x1886d5+'/'+_0x46af54)['json'](_0x47bf46);}return null;};}function patchUpdates(_0x1bf19b){return function(_0x17e665){try{jsonpatch[_0x8752('0x1c')](_0x17e665,_0x1bf19b,!![]);}catch(_0x51aea5){return BPromise[_0x8752('0x1d')](_0x51aea5);}return _0x17e665[_0x8752('0x1e')]();};}function saveUpdates(_0xa49c28,_0x2327bc){return function(_0x2ae4ab){if(_0x2ae4ab){return _0x2ae4ab['update'](_0xa49c28)[_0x8752('0x1f')](function(_0x247aa0){return _0x247aa0;});}return null;};}function removeEntity(_0xc7711,_0x2bd52d){return function(_0x14bf67){if(_0x14bf67){return _0x14bf67[_0x8752('0x20')]()[_0x8752('0x1f')](function(){_0xc7711['status'](0xcc)[_0x8752('0x16')]();});}};}function handleEntityNotFound(_0x5ea197,_0x21526a){return function(_0x3d153a){if(!_0x3d153a){_0x5ea197['sendStatus'](0x194);}return _0x3d153a;};}function handleError(_0x55e6c6,_0x29681e){_0x29681e=_0x29681e||0x1f4;return function(_0x2db8f7){logger[_0x8752('0x21')](_0x2db8f7['stack']);if(_0x2db8f7['name']){delete _0x2db8f7[_0x8752('0x22')];}_0x55e6c6[_0x8752('0x15')](_0x29681e)[_0x8752('0x23')](_0x2db8f7);};}exports[_0x8752('0x24')]=function(_0x3de12f,_0x4ee74a){if(_0x3de12f[_0x8752('0x25')]['id']){delete _0x3de12f[_0x8752('0x25')]['id'];}return db[_0x8752('0x26')][_0x8752('0x27')]({'where':{'id':_0x3de12f[_0x8752('0x28')]['id']}})[_0x8752('0x1f')](handleEntityNotFound(_0x4ee74a,null))[_0x8752('0x1f')](saveUpdates(_0x3de12f['body'],null))[_0x8752('0x1f')](respondWithResult(_0x4ee74a,null))[_0x8752('0x29')](handleError(_0x4ee74a,null));};exports[_0x8752('0x20')]=function(_0x4a1958,_0x4af751){return db[_0x8752('0x26')][_0x8752('0x27')]({'where':{'id':_0x4a1958[_0x8752('0x28')]['id']}})['then'](handleEntityNotFound(_0x4af751,null))[_0x8752('0x1f')](removeEntity(_0x4af751,null))['catch'](handleError(_0x4af751,null));};
\ No newline at end of file
index 9536f66..16cb933 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8409=['tools_actions','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','./action.attributes','define','Action'];(function(_0x387777,_0x356171){var _0x3f84c0=function(_0x4d4423){while(--_0x4d4423){_0x387777['push'](_0x387777['shift']());}};_0x3f84c0(++_0x356171);}(_0x8409,0x91));var _0x9840=function(_0x455c6c,_0x1e78b7){_0x455c6c=_0x455c6c-0x0;var _0x488242=_0x8409[_0x455c6c];return _0x488242;};'use strict';var _=require(_0x9840('0x0'));var util=require(_0x9840('0x1'));var logger=require(_0x9840('0x2'))(_0x9840('0x3'));var moment=require(_0x9840('0x4'));var BPromise=require(_0x9840('0x5'));var rp=require(_0x9840('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x9840('0x7'));var config=require('../../config/environment');var attributes=require(_0x9840('0x8'));module['exports']=function(_0x206f57,_0x4d5e34){return _0x206f57[_0x9840('0x9')](_0x9840('0xa'),attributes,{'tableName':_0x9840('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x2d65=['exports','define','tools_actions','lodash','util','api','bluebird','request-promise','path','rimraf','./action.attributes'];(function(_0x16e0f5,_0x4ec0f3){var _0x4839d5=function(_0x296b8f){while(--_0x296b8f){_0x16e0f5['push'](_0x16e0f5['shift']());}};_0x4839d5(++_0x4ec0f3);}(_0x2d65,0x1f2));var _0x52d6=function(_0x457e76,_0x358d00){_0x457e76=_0x457e76-0x0;var _0x46e847=_0x2d65[_0x457e76];return _0x46e847;};'use strict';var _=require(_0x52d6('0x0'));var util=require(_0x52d6('0x1'));var logger=require('../../config/logger')(_0x52d6('0x2'));var moment=require('moment');var BPromise=require(_0x52d6('0x3'));var rp=require(_0x52d6('0x4'));var fs=require('fs');var path=require(_0x52d6('0x5'));var rimraf=require(_0x52d6('0x6'));var config=require('../../config/environment');var attributes=require(_0x52d6('0x7'));module[_0x52d6('0x8')]=function(_0x15aa48,_0x3d3acc){return _0x15aa48[_0x52d6('0x9')]('Action',attributes,{'tableName':_0x52d6('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 2178e03..f4f4181 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1cb9=['error','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','info','Action,\x20%s,\x20%s','request\x20sent','debug','Action,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x30ae5e,_0x391fc4){var _0x1f2e93=function(_0x60307d){while(--_0x60307d){_0x30ae5e['push'](_0x30ae5e['shift']());}};_0x1f2e93(++_0x391fc4);}(_0x1cb9,0x14e));var _0x91cb=function(_0x408779,_0x37b6b2){_0x408779=_0x408779-0x0;var _0x156038=_0x1cb9[_0x408779];return _0x156038;};'use strict';var _=require(_0x91cb('0x0'));var util=require('util');var moment=require(_0x91cb('0x1'));var BPromise=require(_0x91cb('0x2'));var rs=require(_0x91cb('0x3'));var fs=require('fs');var Redis=require(_0x91cb('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x91cb('0x5'));var logger=require(_0x91cb('0x6'))('rpc');var config=require(_0x91cb('0x7'));var jayson=require(_0x91cb('0x8'));var client=jayson[_0x91cb('0x9')][_0x91cb('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3b9d98,_0x8f8a3b,_0x4c1f56){return new BPromise(function(_0x15c517,_0x5bda2f){return client[_0x91cb('0xb')](_0x3b9d98,_0x4c1f56)['then'](function(_0xa43e7a){logger[_0x91cb('0xc')](_0x91cb('0xd'),_0x8f8a3b,_0x91cb('0xe'));logger[_0x91cb('0xf')](_0x91cb('0x10'),_0x8f8a3b,_0x91cb('0xe'),JSON[_0x91cb('0x11')](_0xa43e7a));if(_0xa43e7a[_0x91cb('0x12')]){if(_0xa43e7a[_0x91cb('0x12')]['code']===0x1f4){logger[_0x91cb('0x12')](_0x91cb('0xd'),_0x8f8a3b,_0xa43e7a['error'][_0x91cb('0x13')]);return _0x5bda2f(_0xa43e7a[_0x91cb('0x12')][_0x91cb('0x13')]);}logger[_0x91cb('0x12')]('Action,\x20%s,\x20%s',_0x8f8a3b,_0xa43e7a['error'][_0x91cb('0x13')]);return _0x15c517(_0xa43e7a[_0x91cb('0x12')]['message']);}else{logger['info'](_0x91cb('0xd'),_0x8f8a3b,_0x91cb('0xe'));_0x15c517(_0xa43e7a[_0x91cb('0x14')]['message']);}})[_0x91cb('0x15')](function(_0x135890){logger['error'](_0x91cb('0xd'),_0x8f8a3b,_0x135890);_0x5bda2f(_0x135890);});});}
\ No newline at end of file
+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(_0x455c6c,_0x1e78b7){var _0x488242=function(_0x3e8fb0){while(--_0x3e8fb0){_0x455c6c['push'](_0x455c6c['shift']());}};_0x488242(++_0x1e78b7);}(_0x7217,0x19e));var _0x7721=function(_0x3a6efd,_0x2a5102){_0x3a6efd=_0x3a6efd-0x0;var _0x487b9a=_0x7217[_0x3a6efd];return _0x487b9a;};'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
index e4c22a0..7988c79 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7b02=['put','/:id','isAuthenticated','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./action.controller'];(function(_0x139a3c,_0x4fc883){var _0x2b375b=function(_0x525dbf){while(--_0x525dbf){_0x139a3c['push'](_0x139a3c['shift']());}};_0x2b375b(++_0x4fc883);}(_0x7b02,0xa9));var _0x27b0=function(_0x5cde56,_0x1ea67d){_0x5cde56=_0x5cde56-0x0;var _0x646669=_0x7b02[_0x5cde56];return _0x646669;};'use strict';var multer=require(_0x27b0('0x0'));var util=require(_0x27b0('0x1'));var path=require(_0x27b0('0x2'));var timeout=require(_0x27b0('0x3'));var express=require(_0x27b0('0x4'));var router=express[_0x27b0('0x5')]();var fs_extra=require(_0x27b0('0x6'));var auth=require(_0x27b0('0x7'));var interaction=require(_0x27b0('0x8'));var config=require(_0x27b0('0x9'));var controller=require(_0x27b0('0xa'));router[_0x27b0('0xb')](_0x27b0('0xc'),auth[_0x27b0('0xd')](),controller[_0x27b0('0xe')]);router[_0x27b0('0xf')](_0x27b0('0xc'),auth[_0x27b0('0xd')](),controller[_0x27b0('0x10')]);module[_0x27b0('0x11')]=router;
\ No newline at end of file
+var _0xfd69=['./action.controller','put','/:id','isAuthenticated','update','exports','util','path','express','Router','fs-extra','../../components/interaction/service'];(function(_0x504d86,_0x4c45da){var _0x78226f=function(_0x4a58f4){while(--_0x4a58f4){_0x504d86['push'](_0x504d86['shift']());}};_0x78226f(++_0x4c45da);}(_0xfd69,0x156));var _0x9fd6=function(_0x3b00b4,_0x413db0){_0x3b00b4=_0x3b00b4-0x0;var _0x1f83a4=_0xfd69[_0x3b00b4];return _0x1f83a4;};'use strict';var multer=require('multer');var util=require(_0x9fd6('0x0'));var path=require(_0x9fd6('0x1'));var timeout=require('connect-timeout');var express=require(_0x9fd6('0x2'));var router=express[_0x9fd6('0x3')]();var fs_extra=require(_0x9fd6('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x9fd6('0x5'));var config=require('../../config/environment');var controller=require(_0x9fd6('0x6'));router[_0x9fd6('0x7')](_0x9fd6('0x8'),auth[_0x9fd6('0x9')](),controller[_0x9fd6('0xa')]);router['delete']('/:id',auth['isAuthenticated'](),controller['destroy']);module[_0x9fd6('0xb')]=router;
\ No newline at end of file
index 2e9ff14..f33e0e9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc4aa=['STRING','sequelize','exports'];(function(_0x21f372,_0x4f17a6){var _0xfdc7b8=function(_0x3c42cf){while(--_0x3c42cf){_0x21f372['push'](_0x21f372['shift']());}};_0xfdc7b8(++_0x4f17a6);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x4d613c,_0x55f220){_0x4d613c=_0x4d613c-0x0;var _0x301fe3=_0xc4aa[_0x4d613c];return _0x301fe3;};'use strict';var Sequelize=require(_0xac4a('0x0'));module[_0xac4a('0x1')]={'name':{'type':Sequelize[_0xac4a('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0xac4a('0x2')]},'parent':{'type':Sequelize[_0xac4a('0x2')]},'table':{'type':Sequelize[_0xac4a('0x2')]},'conditions':{'type':Sequelize['TEXT']},'joins':{'type':Sequelize['TEXT']}};
\ No newline at end of file
+var _0xae24=['sequelize','STRING'];(function(_0x971634,_0x560d92){var _0x591972=function(_0x53f5b1){while(--_0x53f5b1){_0x971634['push'](_0x971634['shift']());}};_0x591972(++_0x560d92);}(_0xae24,0x182));var _0x4ae2=function(_0xee7c56,_0x3b4b23){_0xee7c56=_0xee7c56-0x0;var _0x367971=_0xae24[_0xee7c56];return _0x367971;};'use strict';var Sequelize=require(_0x4ae2('0x0'));module['exports']={'name':{'type':Sequelize[_0x4ae2('0x1')],'allowNull':![]},'description':{'type':Sequelize['STRING']},'parent':{'type':Sequelize[_0x4ae2('0x1')]},'table':{'type':Sequelize[_0x4ae2('0x1')]},'conditions':{'type':Sequelize['TEXT']},'joins':{'type':Sequelize['TEXT']}};
\ No newline at end of file
index 9aaebbc..3d44c0f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x78bd=['from','eml-format','rimraf','zip-dir','moment','bluebird','mustache','util','sox','ejs','lodash','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','dbH','sendStatus','status','end','json','offset','limit','undefined','count','set','apply','reject','then','destroy','get','CustomReports','UserProfileResource','error','stack','name','send','index','AnalyticCustomReport','rawAttributes','key','map','keys','query','intersection','attributes','fields','length','model','nolimit','order','where','filters','pick','type','VIRTUAL','merge','options','includeAll','include','findAll','catch','show','params','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','Reports','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','preview','join','left_join','cross_join','COUNT(%s)','COUNT(DISTINCT\x20%s)','MIN(%s)','GROUP_CONCAT(%s)','DATE(%s)','HOUR(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','includes','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY','rules','operator','group','field','condition','value','Sequelize','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','keyBy','select','MetricId','metric','function','replace','format','orderBy','alias','joins','parse','parentKey','foreignTable','foreignKey','%s.%s\x20=\x20%s.%s','table','conditions','clone','debug','Limited\x20Query:','toString','sequelize','SELECT','right_join','SUM(%s)','MAX(%s)','AVG(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','SEC_TO_TIME(%s)','ValidationErrorItem','groupBy','DESC','output','fullPath','%s-%s.%s','randomstring','csv','custom','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','Run\x20Query:','child_process','fork','../../components/export/','../../files/reports','savename','countTable','COUNT(*)','QueryTypes','runReport','getFields'];(function(_0x1d1727,_0x3bf08b){var _0x1f6d13=function(_0x430941){while(--_0x430941){_0x1d1727['push'](_0x1d1727['shift']());}};_0x1f6d13(++_0x3bf08b);}(_0x78bd,0x1f0));var _0xd78b=function(_0x490be3,_0xf0fca3){_0x490be3=_0x490be3-0x0;var _0x3f5140=_0x78bd[_0x490be3];return _0x3f5140;};'use strict';var emlformat=require(_0xd78b('0x0'));var rimraf=require(_0xd78b('0x1'));var zipdir=require(_0xd78b('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xd78b('0x3'));var BPromise=require(_0xd78b('0x4'));var Mustache=require(_0xd78b('0x5'));var util=require(_0xd78b('0x6'));var path=require('path');var sox=require(_0xd78b('0x7'));var csv=require('to-csv');var ejs=require(_0xd78b('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xd78b('0x9'));var squel=require('squel');var crypto=require(_0xd78b('0xa'));var jsforce=require(_0xd78b('0xb'));var deskjs=require(_0xd78b('0xc'));var toCsv=require(_0xd78b('0xd'));var querystring=require(_0xd78b('0xe'));var Papa=require(_0xd78b('0xf'));var Redis=require(_0xd78b('0x10'));var authService=require(_0xd78b('0x11'));var qs=require(_0xd78b('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xd78b('0x13'))(_0xd78b('0x14'));var utils=require(_0xd78b('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xd78b('0x16'));var db=require(_0xd78b('0x17'))['db'];var dbH=require(_0xd78b('0x17'))[_0xd78b('0x18')];function respondWithStatusCode(_0x27cc76,_0x5eabac){_0x5eabac=_0x5eabac||0xcc;return function(_0x33610f){if(_0x33610f){return _0x27cc76[_0xd78b('0x19')](_0x5eabac);}return _0x27cc76[_0xd78b('0x1a')](_0x5eabac)[_0xd78b('0x1b')]();};}function respondWithResult(_0x2a783a,_0x2f36a7){_0x2f36a7=_0x2f36a7||0xc8;return function(_0x168df1){if(_0x168df1){return _0x2a783a['status'](_0x2f36a7)[_0xd78b('0x1c')](_0x168df1);}};}function respondWithFilteredResult(_0x57395b,_0xfdc037){return function(_0x4da9fa){if(_0x4da9fa){var _0x2a7e10=typeof _0xfdc037[_0xd78b('0x1d')]==='undefined'&&typeof _0xfdc037[_0xd78b('0x1e')]===_0xd78b('0x1f');var _0x8879fe=_0x4da9fa[_0xd78b('0x20')];var _0x66f6d0=_0x2a7e10?0x0:_0xfdc037[_0xd78b('0x1d')];var _0x4c5f8b=_0x2a7e10?_0x4da9fa['count']:_0xfdc037[_0xd78b('0x1d')]+_0xfdc037['limit'];var _0x43968f;if(_0x4c5f8b>=_0x8879fe){_0x4c5f8b=_0x8879fe;_0x43968f=0xc8;}else{_0x43968f=0xce;}_0x57395b[_0xd78b('0x1a')](_0x43968f);return _0x57395b[_0xd78b('0x21')]('Content-Range',_0x66f6d0+'-'+_0x4c5f8b+'/'+_0x8879fe)['json'](_0x4da9fa);}return null;};}function patchUpdates(_0x14e5ab){return function(_0x11b6a2){try{jsonpatch[_0xd78b('0x22')](_0x11b6a2,_0x14e5ab,!![]);}catch(_0x1b4c10){return BPromise[_0xd78b('0x23')](_0x1b4c10);}return _0x11b6a2['save']();};}function saveUpdates(_0x16bfbc,_0x27c21a){return function(_0x1b093d){if(_0x1b093d){return _0x1b093d['update'](_0x16bfbc)[_0xd78b('0x24')](function(_0x2054b3){return _0x2054b3;});}return null;};}function removeEntity(_0x332b5e,_0x3b435a){return function(_0x46a6ab){if(_0x46a6ab){return _0x46a6ab[_0xd78b('0x25')]()[_0xd78b('0x24')](function(){var _0x59e9cf=_0x46a6ab[_0xd78b('0x26')]({'plain':!![]});var _0x3649e7=_0xd78b('0x27');return db[_0xd78b('0x28')][_0xd78b('0x25')]({'where':{'type':_0x3649e7,'resourceId':_0x59e9cf['id']}})[_0xd78b('0x24')](function(){return _0x46a6ab;});})[_0xd78b('0x24')](function(){_0x332b5e['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x397dc6,_0x39bdf5){return function(_0x1f411a){if(!_0x1f411a){_0x397dc6[_0xd78b('0x19')](0x194);}return _0x1f411a;};}function handleError(_0x20ae4b,_0x4e90d9){_0x4e90d9=_0x4e90d9||0x1f4;return function(_0x2a9d4c){logger[_0xd78b('0x29')](_0x2a9d4c[_0xd78b('0x2a')]);if(_0x2a9d4c[_0xd78b('0x2b')]){delete _0x2a9d4c[_0xd78b('0x2b')];}_0x20ae4b['status'](_0x4e90d9)[_0xd78b('0x2c')](_0x2a9d4c);};}exports[_0xd78b('0x2d')]=function(_0x2ddb0d,_0x37afe1){var _0x1f7555={},_0x17db8b={},_0x2d7eb5={'count':0x0,'rows':[]};var _0x87c72=_['map'](db[_0xd78b('0x2e')][_0xd78b('0x2f')],function(_0x3f02cb){return{'name':_0x3f02cb['fieldName'],'type':_0x3f02cb['type'][_0xd78b('0x30')]};});_0x17db8b['model']=_[_0xd78b('0x31')](_0x87c72,_0xd78b('0x2b'));_0x17db8b['query']=_[_0xd78b('0x32')](_0x2ddb0d[_0xd78b('0x33')]);_0x17db8b['filters']=_[_0xd78b('0x34')](_0x17db8b['model'],_0x17db8b[_0xd78b('0x33')]);_0x1f7555[_0xd78b('0x35')]=_[_0xd78b('0x34')](_0x17db8b['model'],qs[_0xd78b('0x36')](_0x2ddb0d[_0xd78b('0x33')][_0xd78b('0x36')]));_0x1f7555[_0xd78b('0x35')]=_0x1f7555[_0xd78b('0x35')][_0xd78b('0x37')]?_0x1f7555[_0xd78b('0x35')]:_0x17db8b[_0xd78b('0x38')];if(!_0x2ddb0d[_0xd78b('0x33')]['hasOwnProperty'](_0xd78b('0x39'))){_0x1f7555[_0xd78b('0x1e')]=qs['limit'](_0x2ddb0d['query'][_0xd78b('0x1e')]);_0x1f7555['offset']=qs[_0xd78b('0x1d')](_0x2ddb0d[_0xd78b('0x33')][_0xd78b('0x1d')]);}_0x1f7555[_0xd78b('0x3a')]=qs['sort'](_0x2ddb0d[_0xd78b('0x33')]['sort']);_0x1f7555[_0xd78b('0x3b')]=qs[_0xd78b('0x3c')](_[_0xd78b('0x3d')](_0x2ddb0d[_0xd78b('0x33')],_0x17db8b[_0xd78b('0x3c')]),_0x87c72);if(_0x2ddb0d[_0xd78b('0x33')]['filter']){_0x1f7555['where']=_['merge'](_0x1f7555['where'],{'$or':_['map'](_0x87c72,function(_0x4c8f96){if(_0x4c8f96[_0xd78b('0x3e')]!==_0xd78b('0x3f')){var _0x1be7ed={};_0x1be7ed[_0x4c8f96[_0xd78b('0x2b')]]={'$like':'%'+_0x2ddb0d[_0xd78b('0x33')]['filter']+'%'};return _0x1be7ed;}})});}_0x1f7555=_[_0xd78b('0x40')]({},_0x1f7555,_0x2ddb0d[_0xd78b('0x41')]);var _0x545ba7={'where':_0x1f7555[_0xd78b('0x3b')]};return db[_0xd78b('0x2e')][_0xd78b('0x20')](_0x545ba7)['then'](function(_0x163f7e){_0x2d7eb5[_0xd78b('0x20')]=_0x163f7e;if(_0x2ddb0d['query'][_0xd78b('0x42')]){_0x1f7555[_0xd78b('0x43')]=[{'all':!![]}];}return db['AnalyticCustomReport'][_0xd78b('0x44')](_0x1f7555);})['then'](function(_0x3806c1){_0x2d7eb5['rows']=_0x3806c1;return _0x2d7eb5;})[_0xd78b('0x24')](respondWithFilteredResult(_0x37afe1,_0x1f7555))[_0xd78b('0x45')](handleError(_0x37afe1,null));};exports[_0xd78b('0x46')]=function(_0x238a87,_0x51a963){var _0x10cbf1={'raw':![],'where':{'id':_0x238a87[_0xd78b('0x47')]['id']}},_0x1b6637={};_0x1b6637[_0xd78b('0x38')]=_[_0xd78b('0x32')](db[_0xd78b('0x2e')][_0xd78b('0x2f')]);_0x1b6637[_0xd78b('0x33')]=_[_0xd78b('0x32')](_0x238a87[_0xd78b('0x33')]);_0x1b6637[_0xd78b('0x3c')]=_[_0xd78b('0x34')](_0x1b6637[_0xd78b('0x38')],_0x1b6637['query']);_0x10cbf1[_0xd78b('0x35')]=_[_0xd78b('0x34')](_0x1b6637['model'],qs[_0xd78b('0x36')](_0x238a87[_0xd78b('0x33')]['fields']));_0x10cbf1[_0xd78b('0x35')]=_0x10cbf1[_0xd78b('0x35')]['length']?_0x10cbf1[_0xd78b('0x35')]:_0x1b6637['model'];if(_0x238a87[_0xd78b('0x33')]['includeAll']){_0x10cbf1[_0xd78b('0x43')]=[{'all':!![]}];}_0x10cbf1=_['merge']({},_0x10cbf1,_0x238a87[_0xd78b('0x41')]);return db['AnalyticCustomReport'][_0xd78b('0x48')](_0x10cbf1)[_0xd78b('0x24')](handleEntityNotFound(_0x51a963,null))[_0xd78b('0x24')](respondWithResult(_0x51a963,null))['catch'](handleError(_0x51a963,null));};exports[_0xd78b('0x49')]=function(_0x60f39f,_0x4c1468){return db['AnalyticCustomReport'][_0xd78b('0x49')](_0x60f39f[_0xd78b('0x4a')],{})[_0xd78b('0x24')](function(_0x243784){var _0x25df36=_0x60f39f['user'][_0xd78b('0x26')]({'plain':!![]});if(!_0x25df36)throw new Error(_0xd78b('0x4b'));if(_0x25df36[_0xd78b('0x4c')]===_0xd78b('0x4d')){var _0x312366=_0x243784[_0xd78b('0x26')]({'plain':!![]});var _0x13a1b3=_0xd78b('0x4e');return db[_0xd78b('0x4f')][_0xd78b('0x48')]({'where':{'name':_0x13a1b3,'userProfileId':_0x25df36[_0xd78b('0x50')]},'raw':!![]})[_0xd78b('0x24')](function(_0x5d6503){if(_0x5d6503&&_0x5d6503[_0xd78b('0x51')]===0x0){return db[_0xd78b('0x28')][_0xd78b('0x49')]({'name':_0x312366[_0xd78b('0x2b')],'resourceId':_0x312366['id'],'type':_0xd78b('0x27'),'sectionId':_0x5d6503['id']},{})['then'](function(){return _0x243784;});}else{return _0x243784;}})[_0xd78b('0x45')](function(_0x189de8){logger[_0xd78b('0x29')](_0xd78b('0x52'),_0x189de8);throw _0x189de8;});}return _0x243784;})[_0xd78b('0x24')](respondWithResult(_0x4c1468,0xc9))[_0xd78b('0x45')](handleError(_0x4c1468,null));};exports['update']=function(_0x3a269a,_0x4200f4){if(_0x3a269a[_0xd78b('0x4a')]['id']){delete _0x3a269a[_0xd78b('0x4a')]['id'];}return db[_0xd78b('0x2e')][_0xd78b('0x48')]({'where':{'id':_0x3a269a[_0xd78b('0x47')]['id']}})['then'](handleEntityNotFound(_0x4200f4,null))['then'](saveUpdates(_0x3a269a['body'],null))['then'](respondWithResult(_0x4200f4,null))[_0xd78b('0x45')](handleError(_0x4200f4,null));};exports[_0xd78b('0x25')]=function(_0x35fbc,_0x5c3109){return db['AnalyticCustomReport']['find']({'where':{'id':_0x35fbc[_0xd78b('0x47')]['id']}})[_0xd78b('0x24')](handleEntityNotFound(_0x5c3109,null))['then'](removeEntity(_0x5c3109,null))[_0xd78b('0x45')](handleError(_0x5c3109,null));};exports[_0xd78b('0x53')]=function(_0x307a05,_0xf7ad56){var _0xb87fe4=0xa;var _0xf383ed=[_0xd78b('0x54'),_0xd78b('0x55'),'right_join',_0xd78b('0x56')];var _0x5b46fa={'SUM':'SUM(%s)','COUNT':_0xd78b('0x57'),'COUNT DISTINCT':_0xd78b('0x58'),'MAX':'MAX(%s)','MIN':_0xd78b('0x59'),'AVG':'AVG(%s)','GROUP_CONCAT':_0xd78b('0x5a'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0xbee3db={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0xd78b('0x5b'),'HOUR':_0xd78b('0x5c'),'ROUND':_0xd78b('0x5d'),'UNIX_TIMESTAMP':_0xd78b('0x5e')};var _0x1c6ff4=function(_0x66bf4e){return!_[_0xd78b('0x5f')]([_0xd78b('0x60'),_0xd78b('0x61'),_0xd78b('0x62'),_0xd78b('0x63')],_0x66bf4e);};var _0x195e18=function(_0x11e4b0){if(!_0x11e4b0||!_0x11e4b0[_0xd78b('0x64')]['length']){return'';}for(var _0x277364='(',_0x1dafcb=0x0;_0x1dafcb<_0x11e4b0[_0xd78b('0x64')][_0xd78b('0x37')];_0x1dafcb+=0x1){_0x1dafcb>0x0&&(_0x277364+='\x20'+_0x11e4b0[_0xd78b('0x65')]+'\x20');_0x277364+=_0x11e4b0[_0xd78b('0x64')][_0x1dafcb][_0xd78b('0x66')]?_0x195e18(_0x11e4b0['rules'][_0x1dafcb][_0xd78b('0x66')]):_0x11e4b0[_0xd78b('0x64')][_0x1dafcb][_0xd78b('0x67')]+'\x20'+_0x11e4b0[_0xd78b('0x64')][_0x1dafcb][_0xd78b('0x68')]+(_0x1c6ff4(_0x11e4b0['rules'][_0x1dafcb][_0xd78b('0x68')])?'\x20'+_0x11e4b0[_0xd78b('0x64')][_0x1dafcb][_0xd78b('0x69')]:'');}return _0x277364+')';};var _0x46f8ce={'where':{'id':_0x307a05[_0xd78b('0x47')]['id']}},_0x2c5346,_0x3cee3c,_0x54fe4d,_0x1b6e51,_0x51e8de;_0x46f8ce=_[_0xd78b('0x40')]({},_0x46f8ce,_0x307a05[_0xd78b('0x41')]);return db[_0xd78b('0x2e')][_0xd78b('0x48')](_0x46f8ce)[_0xd78b('0x24')](function(_0x51eaf1){if(_0x51eaf1){_0x2c5346=_0x51eaf1;return _0x51eaf1['getFields']();}return null;})[_0xd78b('0x24')](function(_0x17bb7a){if(_0x17bb7a){if(!_0x17bb7a[_0xd78b('0x37')]){throw new db[(_0xd78b('0x6a'))]['ValidationErrorItem'](_0xd78b('0x6b'),0x193);}_0x3cee3c=_0x17bb7a;return db[_0xd78b('0x6c')]['findAll']({'raw':!![]});}return null;})['then'](function(_0x3afe25){if(_0x3afe25){_0x54fe4d=_[_0xd78b('0x6d')](_0x3afe25,'id');var _0x2d69ab;var _0xb000c6=squel[_0xd78b('0x6e')]();_0xb000c6['from'](_0x2c5346['table']);for(var _0x265553=0x0;_0x265553<_0x3cee3c[_0xd78b('0x37')];_0x265553+=0x1){_0x2d69ab=_0x3cee3c[_0x265553][_0xd78b('0x6f')]?_0x54fe4d[_0x3cee3c[_0x265553][_0xd78b('0x6f')]][_0xd78b('0x70')]:_0x3cee3c[_0x265553][_0xd78b('0x67')];_0x2d69ab=_0x3cee3c[_0x265553][_0xd78b('0x71')]?_[_0xd78b('0x72')](_0x5b46fa[_0x3cee3c[_0x265553][_0xd78b('0x71')]],'%s',_0x2d69ab):_0x2d69ab;_0x2d69ab=_0x3cee3c[_0x265553][_0xd78b('0x73')]?_[_0xd78b('0x72')](_0xbee3db[_0x3cee3c[_0x265553]['format']],'%s',_0x2d69ab):_0x2d69ab;if(_0x3cee3c[_0x265553]['groupBy']){_0xb000c6[_0xd78b('0x66')](_0x2d69ab);}_0x3cee3c[_0x265553][_0xd78b('0x74')]&&_0xb000c6['order'](_0x2d69ab,_0x3cee3c[_0x265553][_0xd78b('0x74')]==='DESC'?![]:!![]);_0xb000c6[_0xd78b('0x67')](_0x2d69ab,_0x3cee3c[_0x265553][_0xd78b('0x75')]||_0x2d69ab);}if(_0x2c5346[_0xd78b('0x76')]){_0x2c5346[_0xd78b('0x76')]=JSON[_0xd78b('0x77')](_0x2c5346[_0xd78b('0x76')]);for(var _0xb8a651=0x0;_0xb8a651<_0x2c5346['joins']['length'];_0xb8a651+=0x1){if(_0x2c5346[_0xd78b('0x76')][_0xb8a651][_0xd78b('0x3e')]&&_[_0xd78b('0x5f')](_0xf383ed,_0x2c5346[_0xd78b('0x76')][_0xb8a651][_0xd78b('0x3e')])&&_0x2c5346['joins'][_0xb8a651][_0xd78b('0x78')]&&_0x2c5346['joins'][_0xb8a651][_0xd78b('0x79')]&&_0x2c5346[_0xd78b('0x76')][_0xb8a651][_0xd78b('0x7a')]){_0xb000c6[_0x2c5346[_0xd78b('0x76')][_0xb8a651][_0xd78b('0x3e')]](_0x2c5346[_0xd78b('0x76')][_0xb8a651][_0xd78b('0x79')],null,util[_0xd78b('0x73')](_0xd78b('0x7b'),_0x2c5346[_0xd78b('0x7c')],_0x2c5346[_0xd78b('0x76')][_0xb8a651][_0xd78b('0x78')],_0x2c5346[_0xd78b('0x76')][_0xb8a651][_0xd78b('0x79')],_0x2c5346[_0xd78b('0x76')][_0xb8a651][_0xd78b('0x7a')]));}}}if(_0x2c5346[_0xd78b('0x7d')]){_0x2c5346['conditions']=JSON[_0xd78b('0x77')](_0x2c5346[_0xd78b('0x7d')]);_0xb000c6['where'](_0x195e18(_0x2c5346[_0xd78b('0x7d')][_0xd78b('0x66')]));}_0x51e8de=_0xb000c6[_0xd78b('0x7e')]();_0xb000c6[_0xd78b('0x1e')](_0xb87fe4);_0xb000c6[_0xd78b('0x1d')](0x0);logger[_0xd78b('0x7f')](_0xd78b('0x80'),_0xb000c6[_0xd78b('0x81')]());return dbH[_0xd78b('0x82')][_0xd78b('0x33')](_0xb000c6[_0xd78b('0x81')](),{'type':dbH['sequelize']['QueryTypes'][_0xd78b('0x83')]});}})[_0xd78b('0x24')](respondWithResult(_0xf7ad56,null))[_0xd78b('0x45')](handleError(_0xf7ad56,null));};function runReport(_0x232f8f,_0x3ffac6,_0x4ee224){var _0x37bbc9=_0x3ffac6['name'];var _0x1260a3=0xa;var _0x33c6d3=['join',_0xd78b('0x55'),_0xd78b('0x84'),'cross_join'];var _0x1e1100={'SUM':_0xd78b('0x85'),'COUNT':_0xd78b('0x57'),'COUNT DISTINCT':_0xd78b('0x58'),'MAX':_0xd78b('0x86'),'MIN':'MIN(%s)','AVG':_0xd78b('0x87'),'GROUP_CONCAT':_0xd78b('0x5a'),'GROUP_CONCAT ASC':_0xd78b('0x88'),'GROUP_CONCAT DESC':_0xd78b('0x89')};var _0x2dc1c4={'SEC_TO_TIME':_0xd78b('0x8a'),'DATE':_0xd78b('0x5b'),'HOUR':'HOUR(%s)','ROUND':_0xd78b('0x5d'),'UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x32a867=function(_0x3577fb){return!_[_0xd78b('0x5f')]([_0xd78b('0x60'),_0xd78b('0x61'),_0xd78b('0x62'),_0xd78b('0x63')],_0x3577fb);};var _0x1e8d98=function(_0x1cc3ec){if(!_0x1cc3ec||!_0x1cc3ec[_0xd78b('0x64')]['length']){return'';}for(var _0x19490e='(',_0x598b20=0x0;_0x598b20<_0x1cc3ec['rules']['length'];_0x598b20+=0x1){_0x598b20>0x0&&(_0x19490e+='\x20'+_0x1cc3ec[_0xd78b('0x65')]+'\x20');_0x19490e+=_0x1cc3ec['rules'][_0x598b20]['group']?_0x1e8d98(_0x1cc3ec['rules'][_0x598b20][_0xd78b('0x66')]):_0x1cc3ec[_0xd78b('0x64')][_0x598b20][_0xd78b('0x67')]+'\x20'+_0x1cc3ec[_0xd78b('0x64')][_0x598b20][_0xd78b('0x68')]+(_0x32a867(_0x1cc3ec[_0xd78b('0x64')][_0x598b20]['condition'])?'\x20'+_0x1cc3ec['rules'][_0x598b20][_0xd78b('0x69')]:'');}return _0x19490e+')';};var _0x4cb086={'where':{'id':_0x232f8f['id']}},_0x17408d,_0x44855b,_0x5a44f2,_0x257c14,_0x39dd13;_0x4cb086=_[_0xd78b('0x40')]({},_0x4cb086,_0x4ee224);return db[_0xd78b('0x2e')][_0xd78b('0x48')](_0x4cb086)['then'](function(_0x392637){if(_0x392637){_0x17408d=_0x392637;return _0x392637['getFields']();}return null;})[_0xd78b('0x24')](function(_0x2d8cbd){if(_0x2d8cbd){if(!_0x2d8cbd[_0xd78b('0x37')]){throw new db['Sequelize'][(_0xd78b('0x8b'))](_0xd78b('0x6b'),0x193);}_0x44855b=_0x2d8cbd;return db[_0xd78b('0x6c')][_0xd78b('0x44')]({'raw':!![]});}return null;})[_0xd78b('0x24')](function(_0x72089d){if(_0x72089d){_0x5a44f2=_[_0xd78b('0x6d')](_0x72089d,'id');var _0x398021;var _0x5319e5=squel[_0xd78b('0x6e')]();_0x5319e5['from'](_0x17408d[_0xd78b('0x7c')]);for(var _0x19de12=0x0;_0x19de12<_0x44855b['length'];_0x19de12+=0x1){_0x398021=_0x44855b[_0x19de12][_0xd78b('0x6f')]?_0x5a44f2[_0x44855b[_0x19de12][_0xd78b('0x6f')]][_0xd78b('0x70')]:_0x44855b[_0x19de12][_0xd78b('0x67')];_0x398021=_0x44855b[_0x19de12][_0xd78b('0x71')]?_[_0xd78b('0x72')](_0x1e1100[_0x44855b[_0x19de12][_0xd78b('0x71')]],'%s',_0x398021):_0x398021;_0x398021=_0x44855b[_0x19de12][_0xd78b('0x73')]?_['replace'](_0x2dc1c4[_0x44855b[_0x19de12][_0xd78b('0x73')]],'%s',_0x398021):_0x398021;if(_0x44855b[_0x19de12][_0xd78b('0x8c')]){_0x5319e5[_0xd78b('0x66')](_0x398021);}_0x44855b[_0x19de12][_0xd78b('0x74')]&&_0x5319e5[_0xd78b('0x3a')](_0x398021,_0x44855b[_0x19de12][_0xd78b('0x74')]===_0xd78b('0x8d')?![]:!![]);_0x5319e5['field'](_0x398021,_0x44855b[_0x19de12][_0xd78b('0x75')]||_0x398021);}if(_0x17408d[_0xd78b('0x76')]){_0x17408d[_0xd78b('0x76')]=JSON[_0xd78b('0x77')](_0x17408d[_0xd78b('0x76')]);for(var _0x34568c=0x0;_0x34568c<_0x17408d[_0xd78b('0x76')][_0xd78b('0x37')];_0x34568c+=0x1){if(_0x17408d[_0xd78b('0x76')][_0x34568c]['type']&&_[_0xd78b('0x5f')](_0x33c6d3,_0x17408d[_0xd78b('0x76')][_0x34568c][_0xd78b('0x3e')])&&_0x17408d[_0xd78b('0x76')][_0x34568c][_0xd78b('0x78')]&&_0x17408d[_0xd78b('0x76')][_0x34568c][_0xd78b('0x79')]&&_0x17408d[_0xd78b('0x76')][_0x34568c][_0xd78b('0x7a')]){_0x5319e5[_0x17408d['joins'][_0x34568c][_0xd78b('0x3e')]](_0x17408d[_0xd78b('0x76')][_0x34568c][_0xd78b('0x79')],null,util[_0xd78b('0x73')]('%s.%s\x20=\x20%s.%s',_0x17408d[_0xd78b('0x7c')],_0x17408d[_0xd78b('0x76')][_0x34568c][_0xd78b('0x78')],_0x17408d[_0xd78b('0x76')][_0x34568c][_0xd78b('0x79')],_0x17408d['joins'][_0x34568c]['foreignKey']));}}}if(_0x17408d[_0xd78b('0x7d')]){_0x17408d['conditions']=JSON[_0xd78b('0x77')](_0x17408d[_0xd78b('0x7d')]);_0x5319e5[_0xd78b('0x3b')](_0x1e8d98(_0x17408d['conditions']['group']));}_0x39dd13=_0x5319e5['clone']();_0x5319e5[_0xd78b('0x1e')](_0x1260a3);_0x5319e5[_0xd78b('0x1d')](0x0);return;}})['then'](function(){if(_0x3ffac6[_0xd78b('0x8e')]==='web'){return null;}var _0x5650cf=_[_0xd78b('0x40')](_0x3ffac6,{'name':_0x3ffac6[_0xd78b('0x8f')]||_0x3ffac6[_0xd78b('0x2b')]||_0x17408d[_0xd78b('0x2b')],'basename':_0x37bbc9,'savename':util['format'](_0xd78b('0x90'),_0x3ffac6['name']||_0x17408d[_0xd78b('0x2b')],require(_0xd78b('0x91'))['generate'](0x4),_0x3ffac6['output']||_0xd78b('0x92')),'reportId':_0x17408d['id'],'reportType':_0xd78b('0x93')});return db['AnalyticExtractedReport'][_0xd78b('0x49')](_0x5650cf,{'raw':!![]});})[_0xd78b('0x24')](function(_0x4b5ea9){if(_0x17408d[_0xd78b('0x7c')]===_0xd78b('0x94')){_0x39dd13[_0xd78b('0x3b')](_0x17408d[_0xd78b('0x7c')]+_0xd78b('0x95'),_0x3ffac6[_0xd78b('0x96')],_0x3ffac6[_0xd78b('0x97')]);}else{_0x39dd13[_0xd78b('0x3b')](_0x17408d[_0xd78b('0x7c')]+_0xd78b('0x98'),_0x3ffac6[_0xd78b('0x96')],_0x3ffac6[_0xd78b('0x97')]);}if(_0x4b5ea9){logger['info'](_0xd78b('0x99'),_0x39dd13['toString']());require(_0xd78b('0x9a'))[_0xd78b('0x9b')](path[_0xd78b('0x54')](__dirname,_0xd78b('0x9c'),_0x4b5ea9[_0xd78b('0x8e')]),[_0x4b5ea9['id'],_0x39dd13[_0xd78b('0x81')](),path[_0xd78b('0x54')](__dirname,_0xd78b('0x9d'),_0x4b5ea9[_0xd78b('0x9e')]),_0x37bbc9]);return _0x4b5ea9;}else{var _0x6dfebd=squel['select']();_0x6dfebd['from']('('+_0x39dd13[_0xd78b('0x81')]()+')',_0xd78b('0x9f'));_0x6dfebd['field'](_0xd78b('0xa0'),'count');_0x39dd13['limit'](_0x3ffac6[_0xd78b('0x1e')]||_0x1260a3);_0x39dd13[_0xd78b('0x1d')](_0x3ffac6[_0xd78b('0x1d')]||0x0);return dbH[_0xd78b('0x82')][_0xd78b('0x33')](_0x6dfebd[_0xd78b('0x81')](),{'type':dbH[_0xd78b('0x82')][_0xd78b('0xa1')]['SELECT']})[_0xd78b('0x24')](function(_0x159236){if(!_0x159236[_0xd78b('0x37')]){_0x257c14=0x0;}else{_0x257c14=_0x159236[0x0]['count']||0x0;}return dbH[_0xd78b('0x82')][_0xd78b('0x33')](_0x39dd13[_0xd78b('0x81')](),{'type':dbH[_0xd78b('0x82')][_0xd78b('0xa1')][_0xd78b('0x83')]});})['then'](function(_0x139d38){return{'rows':_0x139d38||[],'count':_0x257c14};});}});}exports['run']=function(_0x1c5147,_0x2d5e6d){return runReport(_0x1c5147[_0xd78b('0x47')],_0x1c5147[_0xd78b('0x33')],_0x1c5147[_0xd78b('0x41')])['then'](respondWithResult(_0x2d5e6d,null))[_0xd78b('0x45')](handleError(_0x2d5e6d,null));};exports[_0xd78b('0xa2')]=runReport;exports[_0xd78b('0x33')]=function(_0x2cbb92,_0x1951ea){var _0x38c37e=0xa;var _0x22154e=[_0xd78b('0x54'),_0xd78b('0x55'),'right_join','cross_join'];var _0x83d42={'SUM':_0xd78b('0x85'),'COUNT':_0xd78b('0x57'),'COUNT DISTINCT':_0xd78b('0x58'),'MAX':_0xd78b('0x86'),'MIN':_0xd78b('0x59'),'AVG':_0xd78b('0x87'),'GROUP_CONCAT':_0xd78b('0x5a'),'GROUP_CONCAT ASC':_0xd78b('0x88'),'GROUP_CONCAT DESC':_0xd78b('0x89')};var _0x49a267={'SEC_TO_TIME':_0xd78b('0x8a'),'DATE':_0xd78b('0x5b'),'HOUR':_0xd78b('0x5c'),'ROUND':'ROUND(%s)','UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x1c1532=function(_0x3880fc){return!_[_0xd78b('0x5f')]([_0xd78b('0x60'),_0xd78b('0x61'),_0xd78b('0x62'),_0xd78b('0x63')],_0x3880fc);};var _0x280f72=function(_0xfd6806){if(!_0xfd6806||!_0xfd6806['rules'][_0xd78b('0x37')]){return'';}for(var _0x31306b='(',_0x49db29=0x0;_0x49db29<_0xfd6806[_0xd78b('0x64')][_0xd78b('0x37')];_0x49db29+=0x1){_0x49db29>0x0&&(_0x31306b+='\x20'+_0xfd6806[_0xd78b('0x65')]+'\x20');_0x31306b+=_0xfd6806['rules'][_0x49db29]['group']?_0x280f72(_0xfd6806[_0xd78b('0x64')][_0x49db29][_0xd78b('0x66')]):_0xfd6806[_0xd78b('0x64')][_0x49db29][_0xd78b('0x67')]+'\x20'+_0xfd6806['rules'][_0x49db29][_0xd78b('0x68')]+(_0x1c1532(_0xfd6806[_0xd78b('0x64')][_0x49db29][_0xd78b('0x68')])?'\x20'+_0xfd6806['rules'][_0x49db29][_0xd78b('0x69')]:'');}return _0x31306b+')';};var _0x184411={'where':{'id':_0x2cbb92[_0xd78b('0x47')]['id']}},_0x37a6a5,_0x19c294,_0x113ac6,_0x4b93f0,_0x176b00;_0x184411=_[_0xd78b('0x40')]({},_0x184411,_0x2cbb92['options']);return db[_0xd78b('0x2e')][_0xd78b('0x48')](_0x184411)[_0xd78b('0x24')](function(_0xc48067){if(_0xc48067){_0x37a6a5=_0xc48067;return _0xc48067[_0xd78b('0xa3')]();}return null;})[_0xd78b('0x24')](function(_0x57e4b9){if(_0x57e4b9){if(!_0x57e4b9['length']){throw new db[(_0xd78b('0x6a'))][(_0xd78b('0x8b'))](_0xd78b('0x6b'),0x193);}_0x19c294=_0x57e4b9;return db[_0xd78b('0x6c')][_0xd78b('0x44')]({'raw':!![]});}return null;})[_0xd78b('0x24')](function(_0x138216){if(_0x138216){_0x113ac6=_[_0xd78b('0x6d')](_0x138216,'id');var _0x246ca9;var _0x3aa61b=squel[_0xd78b('0x6e')]();_0x3aa61b[_0xd78b('0xa4')](_0x37a6a5[_0xd78b('0x7c')]);for(var _0x3590cb=0x0;_0x3590cb<_0x19c294[_0xd78b('0x37')];_0x3590cb+=0x1){_0x246ca9=_0x19c294[_0x3590cb][_0xd78b('0x6f')]?_0x113ac6[_0x19c294[_0x3590cb][_0xd78b('0x6f')]][_0xd78b('0x70')]:_0x19c294[_0x3590cb][_0xd78b('0x67')];_0x246ca9=_0x19c294[_0x3590cb]['function']?_[_0xd78b('0x72')](_0x83d42[_0x19c294[_0x3590cb]['function']],'%s',_0x246ca9):_0x246ca9;_0x246ca9=_0x19c294[_0x3590cb]['format']?_[_0xd78b('0x72')](_0x49a267[_0x19c294[_0x3590cb][_0xd78b('0x73')]],'%s',_0x246ca9):_0x246ca9;if(_0x19c294[_0x3590cb][_0xd78b('0x8c')]){_0x3aa61b[_0xd78b('0x66')](_0x246ca9);}_0x19c294[_0x3590cb][_0xd78b('0x74')]&&_0x3aa61b['order'](_0x246ca9,_0x19c294[_0x3590cb][_0xd78b('0x74')]===_0xd78b('0x8d')?![]:!![]);_0x3aa61b[_0xd78b('0x67')](_0x246ca9,_0x19c294[_0x3590cb][_0xd78b('0x75')]||_0x246ca9);}if(_0x37a6a5['joins']){_0x37a6a5[_0xd78b('0x76')]=JSON[_0xd78b('0x77')](_0x37a6a5[_0xd78b('0x76')]);for(var _0x412185=0x0;_0x412185<_0x37a6a5[_0xd78b('0x76')][_0xd78b('0x37')];_0x412185+=0x1){if(_0x37a6a5[_0xd78b('0x76')][_0x412185][_0xd78b('0x3e')]&&_[_0xd78b('0x5f')](_0x22154e,_0x37a6a5['joins'][_0x412185][_0xd78b('0x3e')])&&_0x37a6a5['joins'][_0x412185][_0xd78b('0x78')]&&_0x37a6a5[_0xd78b('0x76')][_0x412185][_0xd78b('0x79')]&&_0x37a6a5[_0xd78b('0x76')][_0x412185]['foreignKey']){_0x3aa61b[_0x37a6a5[_0xd78b('0x76')][_0x412185][_0xd78b('0x3e')]](_0x37a6a5[_0xd78b('0x76')][_0x412185][_0xd78b('0x79')],null,util[_0xd78b('0x73')](_0xd78b('0x7b'),_0x37a6a5[_0xd78b('0x7c')],_0x37a6a5[_0xd78b('0x76')][_0x412185][_0xd78b('0x78')],_0x37a6a5[_0xd78b('0x76')][_0x412185][_0xd78b('0x79')],_0x37a6a5['joins'][_0x412185][_0xd78b('0x7a')]));}}}if(_0x37a6a5[_0xd78b('0x7d')]){_0x37a6a5[_0xd78b('0x7d')]=JSON['parse'](_0x37a6a5['conditions']);_0x3aa61b[_0xd78b('0x3b')](_0x280f72(_0x37a6a5[_0xd78b('0x7d')][_0xd78b('0x66')]));}_0x176b00=_0x3aa61b[_0xd78b('0x7e')]();_0x3aa61b['limit'](_0x38c37e);_0x3aa61b[_0xd78b('0x1d')](0x0);logger[_0xd78b('0x7f')](_0xd78b('0x80'),_0x3aa61b['toString']());return dbH[_0xd78b('0x82')][_0xd78b('0x33')](_0x3aa61b['toString'](),{'type':dbH[_0xd78b('0x82')][_0xd78b('0xa1')][_0xd78b('0x83')]});}})[_0xd78b('0x24')](function(){return{'sql':_0x176b00[_0xd78b('0x81')]()};})[_0xd78b('0x24')](respondWithResult(_0x1951ea,null))[_0xd78b('0x45')](handleError(_0x1951ea,null));};
\ No newline at end of file
+var _0x94c9=['pick','filter','VIRTUAL','merge','options','count','includeAll','findAll','rows','catch','show','rawAttributes','include','create','body','user','role','find','params','preview','left_join','right_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\x20EMPTY','IS\x20NOT\x20EMPTY','group','rules','field','condition','getFields','Sequelize','ValidationErrorItem','AnalyticMetric','keyBy','select','from','table','MetricId','function','format','replace','groupBy','orderBy','order','DESC','alias','joins','parentKey','foreignTable','foreignKey','conditions','parse','clone','debug','Limited\x20Query:','toString','sequelize','SELECT','join','Please\x20insert\x20at\x20least\x20one\x20field','web','%s-%s.%s','randomstring','generate','output','csv','custom','AnalyticExtractedReport','cdr','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','child_process','../../components/export/','../../files/reports','savename','countTable','COUNT(*)','run','runReport','operator','%s.%s\x20=\x20%s.%s','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','dbH','status','end','offset','undefined','limit','set','Content-Range','json','apply','reject','save','update','then','destroy','get','CustomReports','UserProfileResource','error','name','send','index','map','AnalyticCustomReport','fieldName','type','key','model','query','keys','intersection','fields','attributes','length','nolimit','sort','where','filters'];(function(_0x2d0bfd,_0x2ba336){var _0x4d806c=function(_0x47938d){while(--_0x47938d){_0x2d0bfd['push'](_0x2d0bfd['shift']());}};_0x4d806c(++_0x2ba336);}(_0x94c9,0x1a7));var _0x994c=function(_0x3cc575,_0x3e8ae6){_0x3cc575=_0x3cc575-0x0;var _0x276e6b=_0x94c9[_0x3cc575];return _0x276e6b;};'use strict';var emlformat=require(_0x994c('0x0'));var rimraf=require(_0x994c('0x1'));var zipdir=require(_0x994c('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x994c('0x3'));var moment=require('moment');var BPromise=require(_0x994c('0x4'));var Mustache=require(_0x994c('0x5'));var util=require(_0x994c('0x6'));var path=require(_0x994c('0x7'));var sox=require(_0x994c('0x8'));var csv=require(_0x994c('0x9'));var ejs=require(_0x994c('0xa'));var fs=require('fs');var fs_extra=require(_0x994c('0xb'));var _=require(_0x994c('0xc'));var squel=require(_0x994c('0xd'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x994c('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x994c('0xf'));var Redis=require(_0x994c('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x994c('0x11'));var as=require(_0x994c('0x12'));var hardwareService=require(_0x994c('0x13'));var logger=require(_0x994c('0x14'))(_0x994c('0x15'));var utils=require(_0x994c('0x16'));var config=require(_0x994c('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x994c('0x18'))['db'];var dbH=require(_0x994c('0x18'))[_0x994c('0x19')];function respondWithStatusCode(_0x14a6e3,_0x5c1383){_0x5c1383=_0x5c1383||0xcc;return function(_0x4cadf7){if(_0x4cadf7){return _0x14a6e3['sendStatus'](_0x5c1383);}return _0x14a6e3[_0x994c('0x1a')](_0x5c1383)[_0x994c('0x1b')]();};}function respondWithResult(_0x48a799,_0x218af3){_0x218af3=_0x218af3||0xc8;return function(_0x30e52e){if(_0x30e52e){return _0x48a799[_0x994c('0x1a')](_0x218af3)['json'](_0x30e52e);}};}function respondWithFilteredResult(_0x56965c,_0x3d55e5){return function(_0x49d510){if(_0x49d510){var _0x4fa2ab=typeof _0x3d55e5[_0x994c('0x1c')]===_0x994c('0x1d')&&typeof _0x3d55e5['limit']===_0x994c('0x1d');var _0x2f0640=_0x49d510['count'];var _0x536b4b=_0x4fa2ab?0x0:_0x3d55e5['offset'];var _0x158d13=_0x4fa2ab?_0x49d510['count']:_0x3d55e5[_0x994c('0x1c')]+_0x3d55e5[_0x994c('0x1e')];var _0x218077;if(_0x158d13>=_0x2f0640){_0x158d13=_0x2f0640;_0x218077=0xc8;}else{_0x218077=0xce;}_0x56965c[_0x994c('0x1a')](_0x218077);return _0x56965c[_0x994c('0x1f')](_0x994c('0x20'),_0x536b4b+'-'+_0x158d13+'/'+_0x2f0640)[_0x994c('0x21')](_0x49d510);}return null;};}function patchUpdates(_0x5833f6){return function(_0x2cb1b5){try{jsonpatch[_0x994c('0x22')](_0x2cb1b5,_0x5833f6,!![]);}catch(_0x5efae7){return BPromise[_0x994c('0x23')](_0x5efae7);}return _0x2cb1b5[_0x994c('0x24')]();};}function saveUpdates(_0x87be60,_0xa8417f){return function(_0x4b25e6){if(_0x4b25e6){return _0x4b25e6[_0x994c('0x25')](_0x87be60)[_0x994c('0x26')](function(_0x2d6a77){return _0x2d6a77;});}return null;};}function removeEntity(_0x999b85,_0x5808f7){return function(_0x434b58){if(_0x434b58){return _0x434b58[_0x994c('0x27')]()['then'](function(){var _0x2d890d=_0x434b58[_0x994c('0x28')]({'plain':!![]});var _0x343268=_0x994c('0x29');return db[_0x994c('0x2a')][_0x994c('0x27')]({'where':{'type':_0x343268,'resourceId':_0x2d890d['id']}})[_0x994c('0x26')](function(){return _0x434b58;});})[_0x994c('0x26')](function(){_0x999b85[_0x994c('0x1a')](0xcc)[_0x994c('0x1b')]();});}};}function handleEntityNotFound(_0x5b265c,_0x5d35d2){return function(_0x28a213){if(!_0x28a213){_0x5b265c['sendStatus'](0x194);}return _0x28a213;};}function handleError(_0x1122a1,_0x2985ff){_0x2985ff=_0x2985ff||0x1f4;return function(_0xf15830){logger[_0x994c('0x2b')](_0xf15830['stack']);if(_0xf15830['name']){delete _0xf15830[_0x994c('0x2c')];}_0x1122a1[_0x994c('0x1a')](_0x2985ff)[_0x994c('0x2d')](_0xf15830);};}exports[_0x994c('0x2e')]=function(_0x15e06f,_0x39d291){var _0xaf5343={},_0x268cbe={},_0x49c3c6={'count':0x0,'rows':[]};var _0x1f9cfe=_[_0x994c('0x2f')](db[_0x994c('0x30')]['rawAttributes'],function(_0x26ef10){return{'name':_0x26ef10[_0x994c('0x31')],'type':_0x26ef10[_0x994c('0x32')][_0x994c('0x33')]};});_0x268cbe[_0x994c('0x34')]=_[_0x994c('0x2f')](_0x1f9cfe,_0x994c('0x2c'));_0x268cbe[_0x994c('0x35')]=_[_0x994c('0x36')](_0x15e06f[_0x994c('0x35')]);_0x268cbe['filters']=_[_0x994c('0x37')](_0x268cbe['model'],_0x268cbe[_0x994c('0x35')]);_0xaf5343['attributes']=_['intersection'](_0x268cbe[_0x994c('0x34')],qs[_0x994c('0x38')](_0x15e06f[_0x994c('0x35')][_0x994c('0x38')]));_0xaf5343[_0x994c('0x39')]=_0xaf5343[_0x994c('0x39')][_0x994c('0x3a')]?_0xaf5343[_0x994c('0x39')]:_0x268cbe[_0x994c('0x34')];if(!_0x15e06f[_0x994c('0x35')]['hasOwnProperty'](_0x994c('0x3b'))){_0xaf5343[_0x994c('0x1e')]=qs[_0x994c('0x1e')](_0x15e06f[_0x994c('0x35')][_0x994c('0x1e')]);_0xaf5343[_0x994c('0x1c')]=qs[_0x994c('0x1c')](_0x15e06f['query'][_0x994c('0x1c')]);}_0xaf5343['order']=qs[_0x994c('0x3c')](_0x15e06f[_0x994c('0x35')]['sort']);_0xaf5343[_0x994c('0x3d')]=qs[_0x994c('0x3e')](_[_0x994c('0x3f')](_0x15e06f[_0x994c('0x35')],_0x268cbe[_0x994c('0x3e')]),_0x1f9cfe);if(_0x15e06f[_0x994c('0x35')][_0x994c('0x40')]){_0xaf5343[_0x994c('0x3d')]=_['merge'](_0xaf5343[_0x994c('0x3d')],{'$or':_[_0x994c('0x2f')](_0x1f9cfe,function(_0x2c694f){if(_0x2c694f[_0x994c('0x32')]!==_0x994c('0x41')){var _0x25bb9b={};_0x25bb9b[_0x2c694f['name']]={'$like':'%'+_0x15e06f[_0x994c('0x35')][_0x994c('0x40')]+'%'};return _0x25bb9b;}})});}_0xaf5343=_[_0x994c('0x42')]({},_0xaf5343,_0x15e06f[_0x994c('0x43')]);var _0x2713c8={'where':_0xaf5343[_0x994c('0x3d')]};return db['AnalyticCustomReport'][_0x994c('0x44')](_0x2713c8)['then'](function(_0x1b77ab){_0x49c3c6[_0x994c('0x44')]=_0x1b77ab;if(_0x15e06f[_0x994c('0x35')][_0x994c('0x45')]){_0xaf5343['include']=[{'all':!![]}];}return db[_0x994c('0x30')][_0x994c('0x46')](_0xaf5343);})[_0x994c('0x26')](function(_0x1bcebd){_0x49c3c6[_0x994c('0x47')]=_0x1bcebd;return _0x49c3c6;})[_0x994c('0x26')](respondWithFilteredResult(_0x39d291,_0xaf5343))[_0x994c('0x48')](handleError(_0x39d291,null));};exports[_0x994c('0x49')]=function(_0x101e85,_0x4cd941){var _0x51a363={'raw':![],'where':{'id':_0x101e85['params']['id']}},_0x5caaef={};_0x5caaef[_0x994c('0x34')]=_[_0x994c('0x36')](db[_0x994c('0x30')][_0x994c('0x4a')]);_0x5caaef[_0x994c('0x35')]=_[_0x994c('0x36')](_0x101e85[_0x994c('0x35')]);_0x5caaef[_0x994c('0x3e')]=_['intersection'](_0x5caaef[_0x994c('0x34')],_0x5caaef[_0x994c('0x35')]);_0x51a363['attributes']=_['intersection'](_0x5caaef[_0x994c('0x34')],qs[_0x994c('0x38')](_0x101e85[_0x994c('0x35')][_0x994c('0x38')]));_0x51a363[_0x994c('0x39')]=_0x51a363[_0x994c('0x39')]['length']?_0x51a363[_0x994c('0x39')]:_0x5caaef[_0x994c('0x34')];if(_0x101e85[_0x994c('0x35')][_0x994c('0x45')]){_0x51a363[_0x994c('0x4b')]=[{'all':!![]}];}_0x51a363=_[_0x994c('0x42')]({},_0x51a363,_0x101e85[_0x994c('0x43')]);return db['AnalyticCustomReport']['find'](_0x51a363)['then'](handleEntityNotFound(_0x4cd941,null))['then'](respondWithResult(_0x4cd941,null))[_0x994c('0x48')](handleError(_0x4cd941,null));};exports['create']=function(_0xfe85a4,_0x20c953){return db[_0x994c('0x30')][_0x994c('0x4c')](_0xfe85a4[_0x994c('0x4d')],{})[_0x994c('0x26')](function(_0x4e88bd){var _0x2a9360=_0xfe85a4[_0x994c('0x4e')][_0x994c('0x28')]({'plain':!![]});if(!_0x2a9360)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x2a9360[_0x994c('0x4f')]===_0x994c('0x4e')){var _0x9b67fe=_0x4e88bd['get']({'plain':!![]});var _0x37f422='Reports';return db['UserProfileSection'][_0x994c('0x50')]({'where':{'name':_0x37f422,'userProfileId':_0x2a9360['userProfileId']},'raw':!![]})[_0x994c('0x26')](function(_0x13703e){if(_0x13703e&&_0x13703e['autoAssociation']===0x0){return db[_0x994c('0x2a')][_0x994c('0x4c')]({'name':_0x9b67fe[_0x994c('0x2c')],'resourceId':_0x9b67fe['id'],'type':'CustomReports','sectionId':_0x13703e['id']},{})['then'](function(){return _0x4e88bd;});}else{return _0x4e88bd;}})[_0x994c('0x48')](function(_0x149525){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x149525);throw _0x149525;});}return _0x4e88bd;})['then'](respondWithResult(_0x20c953,0xc9))[_0x994c('0x48')](handleError(_0x20c953,null));};exports['update']=function(_0x3b4c72,_0x28b424){if(_0x3b4c72[_0x994c('0x4d')]['id']){delete _0x3b4c72[_0x994c('0x4d')]['id'];}return db[_0x994c('0x30')][_0x994c('0x50')]({'where':{'id':_0x3b4c72[_0x994c('0x51')]['id']}})[_0x994c('0x26')](handleEntityNotFound(_0x28b424,null))[_0x994c('0x26')](saveUpdates(_0x3b4c72[_0x994c('0x4d')],null))['then'](respondWithResult(_0x28b424,null))[_0x994c('0x48')](handleError(_0x28b424,null));};exports[_0x994c('0x27')]=function(_0x5085b9,_0x1e0edc){return db['AnalyticCustomReport'][_0x994c('0x50')]({'where':{'id':_0x5085b9[_0x994c('0x51')]['id']}})[_0x994c('0x26')](handleEntityNotFound(_0x1e0edc,null))[_0x994c('0x26')](removeEntity(_0x1e0edc,null))['catch'](handleError(_0x1e0edc,null));};exports[_0x994c('0x52')]=function(_0x2640ce,_0x5e3807){var _0x4b73cb=0xa;var _0x1a0b0f=['join',_0x994c('0x53'),_0x994c('0x54'),'cross_join'];var _0x23111b={'SUM':_0x994c('0x55'),'COUNT':_0x994c('0x56'),'COUNT DISTINCT':_0x994c('0x57'),'MAX':_0x994c('0x58'),'MIN':_0x994c('0x59'),'AVG':_0x994c('0x5a'),'GROUP_CONCAT':_0x994c('0x5b'),'GROUP_CONCAT ASC':_0x994c('0x5c'),'GROUP_CONCAT DESC':_0x994c('0x5d')};var _0x23c18e={'SEC_TO_TIME':_0x994c('0x5e'),'DATE':_0x994c('0x5f'),'HOUR':_0x994c('0x60'),'ROUND':_0x994c('0x61'),'UNIX_TIMESTAMP':_0x994c('0x62')};var _0x51a005=function(_0x17fedc){return!_[_0x994c('0x63')]([_0x994c('0x64'),_0x994c('0x65'),_0x994c('0x66'),_0x994c('0x67')],_0x17fedc);};var _0x140a66=function(_0x22986b){if(!_0x22986b||!_0x22986b['rules'][_0x994c('0x3a')]){return'';}for(var _0x3a2831='(',_0x53d0b6=0x0;_0x53d0b6<_0x22986b['rules'][_0x994c('0x3a')];_0x53d0b6+=0x1){_0x53d0b6>0x0&&(_0x3a2831+='\x20'+_0x22986b['operator']+'\x20');_0x3a2831+=_0x22986b['rules'][_0x53d0b6][_0x994c('0x68')]?_0x140a66(_0x22986b[_0x994c('0x69')][_0x53d0b6][_0x994c('0x68')]):_0x22986b[_0x994c('0x69')][_0x53d0b6][_0x994c('0x6a')]+'\x20'+_0x22986b[_0x994c('0x69')][_0x53d0b6][_0x994c('0x6b')]+(_0x51a005(_0x22986b[_0x994c('0x69')][_0x53d0b6][_0x994c('0x6b')])?'\x20'+_0x22986b[_0x994c('0x69')][_0x53d0b6]['value']:'');}return _0x3a2831+')';};var _0xc8d654={'where':{'id':_0x2640ce[_0x994c('0x51')]['id']}},_0x47cd86,_0x414210,_0x578b03,_0x92aa1,_0x192b6e;_0xc8d654=_[_0x994c('0x42')]({},_0xc8d654,_0x2640ce[_0x994c('0x43')]);return db[_0x994c('0x30')][_0x994c('0x50')](_0xc8d654)[_0x994c('0x26')](function(_0xb4f83f){if(_0xb4f83f){_0x47cd86=_0xb4f83f;return _0xb4f83f[_0x994c('0x6c')]();}return null;})[_0x994c('0x26')](function(_0x130500){if(_0x130500){if(!_0x130500[_0x994c('0x3a')]){throw new db[(_0x994c('0x6d'))][(_0x994c('0x6e'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x414210=_0x130500;return db[_0x994c('0x6f')][_0x994c('0x46')]({'raw':!![]});}return null;})[_0x994c('0x26')](function(_0x23aec3){if(_0x23aec3){_0x578b03=_[_0x994c('0x70')](_0x23aec3,'id');var _0x125ef0;var _0x4834e6=squel[_0x994c('0x71')]();_0x4834e6[_0x994c('0x72')](_0x47cd86[_0x994c('0x73')]);for(var _0x39469d=0x0;_0x39469d<_0x414210[_0x994c('0x3a')];_0x39469d+=0x1){_0x125ef0=_0x414210[_0x39469d][_0x994c('0x74')]?_0x578b03[_0x414210[_0x39469d][_0x994c('0x74')]]['metric']:_0x414210[_0x39469d][_0x994c('0x6a')];_0x125ef0=_0x414210[_0x39469d][_0x994c('0x75')]?_['replace'](_0x23111b[_0x414210[_0x39469d][_0x994c('0x75')]],'%s',_0x125ef0):_0x125ef0;_0x125ef0=_0x414210[_0x39469d][_0x994c('0x76')]?_[_0x994c('0x77')](_0x23c18e[_0x414210[_0x39469d][_0x994c('0x76')]],'%s',_0x125ef0):_0x125ef0;if(_0x414210[_0x39469d][_0x994c('0x78')]){_0x4834e6[_0x994c('0x68')](_0x125ef0);}_0x414210[_0x39469d][_0x994c('0x79')]&&_0x4834e6[_0x994c('0x7a')](_0x125ef0,_0x414210[_0x39469d]['orderBy']===_0x994c('0x7b')?![]:!![]);_0x4834e6[_0x994c('0x6a')](_0x125ef0,_0x414210[_0x39469d][_0x994c('0x7c')]||_0x125ef0);}if(_0x47cd86[_0x994c('0x7d')]){_0x47cd86[_0x994c('0x7d')]=JSON['parse'](_0x47cd86[_0x994c('0x7d')]);for(var _0x2ef87c=0x0;_0x2ef87c<_0x47cd86[_0x994c('0x7d')][_0x994c('0x3a')];_0x2ef87c+=0x1){if(_0x47cd86[_0x994c('0x7d')][_0x2ef87c][_0x994c('0x32')]&&_[_0x994c('0x63')](_0x1a0b0f,_0x47cd86['joins'][_0x2ef87c][_0x994c('0x32')])&&_0x47cd86[_0x994c('0x7d')][_0x2ef87c][_0x994c('0x7e')]&&_0x47cd86['joins'][_0x2ef87c][_0x994c('0x7f')]&&_0x47cd86[_0x994c('0x7d')][_0x2ef87c][_0x994c('0x80')]){_0x4834e6[_0x47cd86[_0x994c('0x7d')][_0x2ef87c][_0x994c('0x32')]](_0x47cd86[_0x994c('0x7d')][_0x2ef87c]['foreignTable'],null,util[_0x994c('0x76')]('%s.%s\x20=\x20%s.%s',_0x47cd86[_0x994c('0x73')],_0x47cd86['joins'][_0x2ef87c][_0x994c('0x7e')],_0x47cd86['joins'][_0x2ef87c][_0x994c('0x7f')],_0x47cd86[_0x994c('0x7d')][_0x2ef87c]['foreignKey']));}}}if(_0x47cd86[_0x994c('0x81')]){_0x47cd86[_0x994c('0x81')]=JSON[_0x994c('0x82')](_0x47cd86[_0x994c('0x81')]);_0x4834e6[_0x994c('0x3d')](_0x140a66(_0x47cd86[_0x994c('0x81')]['group']));}_0x192b6e=_0x4834e6[_0x994c('0x83')]();_0x4834e6[_0x994c('0x1e')](_0x4b73cb);_0x4834e6[_0x994c('0x1c')](0x0);logger[_0x994c('0x84')](_0x994c('0x85'),_0x4834e6[_0x994c('0x86')]());return dbH[_0x994c('0x87')][_0x994c('0x35')](_0x4834e6['toString'](),{'type':dbH['sequelize']['QueryTypes'][_0x994c('0x88')]});}})['then'](respondWithResult(_0x5e3807,null))[_0x994c('0x48')](handleError(_0x5e3807,null));};function runReport(_0x4cb2e0,_0x264568,_0x1db0c8){var _0x11bf24=_0x264568[_0x994c('0x2c')];var _0x97df2b=0xa;var _0x25db9c=[_0x994c('0x89'),_0x994c('0x53'),'right_join','cross_join'];var _0x2657a6={'SUM':_0x994c('0x55'),'COUNT':_0x994c('0x56'),'COUNT DISTINCT':_0x994c('0x57'),'MAX':_0x994c('0x58'),'MIN':_0x994c('0x59'),'AVG':_0x994c('0x5a'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':_0x994c('0x5c'),'GROUP_CONCAT DESC':_0x994c('0x5d')};var _0x284149={'SEC_TO_TIME':_0x994c('0x5e'),'DATE':_0x994c('0x5f'),'HOUR':_0x994c('0x60'),'ROUND':_0x994c('0x61'),'UNIX_TIMESTAMP':_0x994c('0x62')};var _0xe88654=function(_0x98bdb){return!_['includes']([_0x994c('0x64'),_0x994c('0x65'),_0x994c('0x66'),_0x994c('0x67')],_0x98bdb);};var _0x561245=function(_0xf9872b){if(!_0xf9872b||!_0xf9872b['rules']['length']){return'';}for(var _0x559f37='(',_0x430966=0x0;_0x430966<_0xf9872b[_0x994c('0x69')][_0x994c('0x3a')];_0x430966+=0x1){_0x430966>0x0&&(_0x559f37+='\x20'+_0xf9872b['operator']+'\x20');_0x559f37+=_0xf9872b[_0x994c('0x69')][_0x430966][_0x994c('0x68')]?_0x561245(_0xf9872b[_0x994c('0x69')][_0x430966][_0x994c('0x68')]):_0xf9872b[_0x994c('0x69')][_0x430966]['field']+'\x20'+_0xf9872b['rules'][_0x430966][_0x994c('0x6b')]+(_0xe88654(_0xf9872b[_0x994c('0x69')][_0x430966][_0x994c('0x6b')])?'\x20'+_0xf9872b[_0x994c('0x69')][_0x430966]['value']:'');}return _0x559f37+')';};var _0x136975={'where':{'id':_0x4cb2e0['id']}},_0x415398,_0x2fcd54,_0x4f0399,_0x4680c1,_0x3c45d5;_0x136975=_[_0x994c('0x42')]({},_0x136975,_0x1db0c8);return db[_0x994c('0x30')]['find'](_0x136975)['then'](function(_0x412332){if(_0x412332){_0x415398=_0x412332;return _0x412332[_0x994c('0x6c')]();}return null;})[_0x994c('0x26')](function(_0x360fa4){if(_0x360fa4){if(!_0x360fa4[_0x994c('0x3a')]){throw new db[(_0x994c('0x6d'))][(_0x994c('0x6e'))](_0x994c('0x8a'),0x193);}_0x2fcd54=_0x360fa4;return db[_0x994c('0x6f')][_0x994c('0x46')]({'raw':!![]});}return null;})['then'](function(_0x46b495){if(_0x46b495){_0x4f0399=_[_0x994c('0x70')](_0x46b495,'id');var _0x3508b9;var _0x380a45=squel['select']();_0x380a45['from'](_0x415398[_0x994c('0x73')]);for(var _0x50caf6=0x0;_0x50caf6<_0x2fcd54[_0x994c('0x3a')];_0x50caf6+=0x1){_0x3508b9=_0x2fcd54[_0x50caf6]['MetricId']?_0x4f0399[_0x2fcd54[_0x50caf6][_0x994c('0x74')]]['metric']:_0x2fcd54[_0x50caf6]['field'];_0x3508b9=_0x2fcd54[_0x50caf6]['function']?_['replace'](_0x2657a6[_0x2fcd54[_0x50caf6][_0x994c('0x75')]],'%s',_0x3508b9):_0x3508b9;_0x3508b9=_0x2fcd54[_0x50caf6][_0x994c('0x76')]?_['replace'](_0x284149[_0x2fcd54[_0x50caf6][_0x994c('0x76')]],'%s',_0x3508b9):_0x3508b9;if(_0x2fcd54[_0x50caf6]['groupBy']){_0x380a45[_0x994c('0x68')](_0x3508b9);}_0x2fcd54[_0x50caf6][_0x994c('0x79')]&&_0x380a45[_0x994c('0x7a')](_0x3508b9,_0x2fcd54[_0x50caf6][_0x994c('0x79')]==='DESC'?![]:!![]);_0x380a45[_0x994c('0x6a')](_0x3508b9,_0x2fcd54[_0x50caf6][_0x994c('0x7c')]||_0x3508b9);}if(_0x415398[_0x994c('0x7d')]){_0x415398[_0x994c('0x7d')]=JSON['parse'](_0x415398[_0x994c('0x7d')]);for(var _0x50f1ac=0x0;_0x50f1ac<_0x415398[_0x994c('0x7d')][_0x994c('0x3a')];_0x50f1ac+=0x1){if(_0x415398[_0x994c('0x7d')][_0x50f1ac]['type']&&_[_0x994c('0x63')](_0x25db9c,_0x415398[_0x994c('0x7d')][_0x50f1ac][_0x994c('0x32')])&&_0x415398['joins'][_0x50f1ac][_0x994c('0x7e')]&&_0x415398[_0x994c('0x7d')][_0x50f1ac]['foreignTable']&&_0x415398[_0x994c('0x7d')][_0x50f1ac][_0x994c('0x80')]){_0x380a45[_0x415398[_0x994c('0x7d')][_0x50f1ac][_0x994c('0x32')]](_0x415398[_0x994c('0x7d')][_0x50f1ac][_0x994c('0x7f')],null,util['format']('%s.%s\x20=\x20%s.%s',_0x415398[_0x994c('0x73')],_0x415398[_0x994c('0x7d')][_0x50f1ac][_0x994c('0x7e')],_0x415398[_0x994c('0x7d')][_0x50f1ac][_0x994c('0x7f')],_0x415398['joins'][_0x50f1ac][_0x994c('0x80')]));}}}if(_0x415398[_0x994c('0x81')]){_0x415398[_0x994c('0x81')]=JSON[_0x994c('0x82')](_0x415398[_0x994c('0x81')]);_0x380a45[_0x994c('0x3d')](_0x561245(_0x415398[_0x994c('0x81')][_0x994c('0x68')]));}_0x3c45d5=_0x380a45['clone']();_0x380a45[_0x994c('0x1e')](_0x97df2b);_0x380a45['offset'](0x0);return;}})[_0x994c('0x26')](function(){if(_0x264568['output']===_0x994c('0x8b')){return null;}var _0x21b728=_[_0x994c('0x42')](_0x264568,{'name':_0x264568['fullPath']||_0x264568[_0x994c('0x2c')]||_0x415398[_0x994c('0x2c')],'basename':_0x11bf24,'savename':util[_0x994c('0x76')](_0x994c('0x8c'),_0x264568[_0x994c('0x2c')]||_0x415398[_0x994c('0x2c')],require(_0x994c('0x8d'))[_0x994c('0x8e')](0x4),_0x264568[_0x994c('0x8f')]||_0x994c('0x90')),'reportId':_0x415398['id'],'reportType':_0x994c('0x91')});return db[_0x994c('0x92')][_0x994c('0x4c')](_0x21b728,{'raw':!![]});})[_0x994c('0x26')](function(_0x1bad63){if(_0x415398['table']===_0x994c('0x93')){_0x3c45d5[_0x994c('0x3d')](_0x415398[_0x994c('0x73')]+'.calldate\x20BETWEEN\x20?\x20AND\x20?',_0x264568[_0x994c('0x94')],_0x264568[_0x994c('0x95')]);}else{_0x3c45d5[_0x994c('0x3d')](_0x415398['table']+_0x994c('0x96'),_0x264568[_0x994c('0x94')],_0x264568[_0x994c('0x95')]);}if(_0x1bad63){logger[_0x994c('0x97')]('Run\x20Query:',_0x3c45d5[_0x994c('0x86')]());require(_0x994c('0x98'))['fork'](path[_0x994c('0x89')](__dirname,_0x994c('0x99'),_0x1bad63[_0x994c('0x8f')]),[_0x1bad63['id'],_0x3c45d5['toString'](),path['join'](__dirname,_0x994c('0x9a'),_0x1bad63[_0x994c('0x9b')]),_0x11bf24]);return _0x1bad63;}else{var _0x4eaf96=squel['select']();_0x4eaf96[_0x994c('0x72')]('('+_0x3c45d5[_0x994c('0x86')]()+')',_0x994c('0x9c'));_0x4eaf96['field'](_0x994c('0x9d'),_0x994c('0x44'));_0x3c45d5[_0x994c('0x1e')](_0x264568[_0x994c('0x1e')]||_0x97df2b);_0x3c45d5[_0x994c('0x1c')](_0x264568['offset']||0x0);return dbH[_0x994c('0x87')][_0x994c('0x35')](_0x4eaf96[_0x994c('0x86')](),{'type':dbH['sequelize']['QueryTypes'][_0x994c('0x88')]})[_0x994c('0x26')](function(_0x3ae4ff){if(!_0x3ae4ff[_0x994c('0x3a')]){_0x4680c1=0x0;}else{_0x4680c1=_0x3ae4ff[0x0]['count']||0x0;}return dbH['sequelize'][_0x994c('0x35')](_0x3c45d5[_0x994c('0x86')](),{'type':dbH[_0x994c('0x87')]['QueryTypes'][_0x994c('0x88')]});})['then'](function(_0x1e9802){return{'rows':_0x1e9802||[],'count':_0x4680c1};});}});}exports[_0x994c('0x9e')]=function(_0x316804,_0x4ad2cf){return runReport(_0x316804[_0x994c('0x51')],_0x316804['query'],_0x316804['options'])['then'](respondWithResult(_0x4ad2cf,null))[_0x994c('0x48')](handleError(_0x4ad2cf,null));};exports[_0x994c('0x9f')]=runReport;exports[_0x994c('0x35')]=function(_0x141e4f,_0x2c1e53){var _0x30f23e=0xa;var _0x53a014=[_0x994c('0x89'),'left_join',_0x994c('0x54'),'cross_join'];var _0x3d6539={'SUM':_0x994c('0x55'),'COUNT':_0x994c('0x56'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0x994c('0x58'),'MIN':'MIN(%s)','AVG':_0x994c('0x5a'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':_0x994c('0x5c'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x22d56e={'SEC_TO_TIME':_0x994c('0x5e'),'DATE':_0x994c('0x5f'),'HOUR':_0x994c('0x60'),'ROUND':_0x994c('0x61'),'UNIX_TIMESTAMP':_0x994c('0x62')};var _0x38c958=function(_0x1d1950){return!_[_0x994c('0x63')]([_0x994c('0x64'),'IS\x20NOT\x20NULL',_0x994c('0x66'),_0x994c('0x67')],_0x1d1950);};var _0x2c340a=function(_0x5d73af){if(!_0x5d73af||!_0x5d73af['rules'][_0x994c('0x3a')]){return'';}for(var _0x2d7101='(',_0xa1a78d=0x0;_0xa1a78d<_0x5d73af[_0x994c('0x69')]['length'];_0xa1a78d+=0x1){_0xa1a78d>0x0&&(_0x2d7101+='\x20'+_0x5d73af[_0x994c('0xa0')]+'\x20');_0x2d7101+=_0x5d73af[_0x994c('0x69')][_0xa1a78d][_0x994c('0x68')]?_0x2c340a(_0x5d73af[_0x994c('0x69')][_0xa1a78d]['group']):_0x5d73af[_0x994c('0x69')][_0xa1a78d][_0x994c('0x6a')]+'\x20'+_0x5d73af[_0x994c('0x69')][_0xa1a78d][_0x994c('0x6b')]+(_0x38c958(_0x5d73af[_0x994c('0x69')][_0xa1a78d][_0x994c('0x6b')])?'\x20'+_0x5d73af[_0x994c('0x69')][_0xa1a78d]['value']:'');}return _0x2d7101+')';};var _0xfe9640={'where':{'id':_0x141e4f['params']['id']}},_0x30acda,_0x1f5ec4,_0x6acf79,_0x22cc49,_0x39f26b;_0xfe9640=_[_0x994c('0x42')]({},_0xfe9640,_0x141e4f['options']);return db[_0x994c('0x30')][_0x994c('0x50')](_0xfe9640)[_0x994c('0x26')](function(_0x17429c){if(_0x17429c){_0x30acda=_0x17429c;return _0x17429c[_0x994c('0x6c')]();}return null;})[_0x994c('0x26')](function(_0x1f7a70){if(_0x1f7a70){if(!_0x1f7a70[_0x994c('0x3a')]){throw new db[(_0x994c('0x6d'))][(_0x994c('0x6e'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x1f5ec4=_0x1f7a70;return db[_0x994c('0x6f')][_0x994c('0x46')]({'raw':!![]});}return null;})['then'](function(_0x506938){if(_0x506938){_0x6acf79=_[_0x994c('0x70')](_0x506938,'id');var _0x146b1e;var _0x2cfe95=squel['select']();_0x2cfe95[_0x994c('0x72')](_0x30acda[_0x994c('0x73')]);for(var _0x5a9798=0x0;_0x5a9798<_0x1f5ec4[_0x994c('0x3a')];_0x5a9798+=0x1){_0x146b1e=_0x1f5ec4[_0x5a9798][_0x994c('0x74')]?_0x6acf79[_0x1f5ec4[_0x5a9798]['MetricId']]['metric']:_0x1f5ec4[_0x5a9798][_0x994c('0x6a')];_0x146b1e=_0x1f5ec4[_0x5a9798][_0x994c('0x75')]?_[_0x994c('0x77')](_0x3d6539[_0x1f5ec4[_0x5a9798][_0x994c('0x75')]],'%s',_0x146b1e):_0x146b1e;_0x146b1e=_0x1f5ec4[_0x5a9798][_0x994c('0x76')]?_[_0x994c('0x77')](_0x22d56e[_0x1f5ec4[_0x5a9798]['format']],'%s',_0x146b1e):_0x146b1e;if(_0x1f5ec4[_0x5a9798][_0x994c('0x78')]){_0x2cfe95['group'](_0x146b1e);}_0x1f5ec4[_0x5a9798]['orderBy']&&_0x2cfe95[_0x994c('0x7a')](_0x146b1e,_0x1f5ec4[_0x5a9798][_0x994c('0x79')]==='DESC'?![]:!![]);_0x2cfe95[_0x994c('0x6a')](_0x146b1e,_0x1f5ec4[_0x5a9798][_0x994c('0x7c')]||_0x146b1e);}if(_0x30acda[_0x994c('0x7d')]){_0x30acda[_0x994c('0x7d')]=JSON[_0x994c('0x82')](_0x30acda[_0x994c('0x7d')]);for(var _0x50e942=0x0;_0x50e942<_0x30acda['joins']['length'];_0x50e942+=0x1){if(_0x30acda['joins'][_0x50e942][_0x994c('0x32')]&&_[_0x994c('0x63')](_0x53a014,_0x30acda['joins'][_0x50e942][_0x994c('0x32')])&&_0x30acda['joins'][_0x50e942][_0x994c('0x7e')]&&_0x30acda['joins'][_0x50e942][_0x994c('0x7f')]&&_0x30acda[_0x994c('0x7d')][_0x50e942]['foreignKey']){_0x2cfe95[_0x30acda[_0x994c('0x7d')][_0x50e942]['type']](_0x30acda[_0x994c('0x7d')][_0x50e942][_0x994c('0x7f')],null,util[_0x994c('0x76')](_0x994c('0xa1'),_0x30acda[_0x994c('0x73')],_0x30acda[_0x994c('0x7d')][_0x50e942][_0x994c('0x7e')],_0x30acda[_0x994c('0x7d')][_0x50e942][_0x994c('0x7f')],_0x30acda[_0x994c('0x7d')][_0x50e942]['foreignKey']));}}}if(_0x30acda['conditions']){_0x30acda[_0x994c('0x81')]=JSON[_0x994c('0x82')](_0x30acda[_0x994c('0x81')]);_0x2cfe95[_0x994c('0x3d')](_0x2c340a(_0x30acda[_0x994c('0x81')][_0x994c('0x68')]));}_0x39f26b=_0x2cfe95[_0x994c('0x83')]();_0x2cfe95['limit'](_0x30f23e);_0x2cfe95[_0x994c('0x1c')](0x0);logger[_0x994c('0x84')](_0x994c('0x85'),_0x2cfe95[_0x994c('0x86')]());return dbH[_0x994c('0x87')]['query'](_0x2cfe95[_0x994c('0x86')](),{'type':dbH[_0x994c('0x87')]['QueryTypes']['SELECT']});}})[_0x994c('0x26')](function(){return{'sql':_0x39f26b[_0x994c('0x86')]()};})['then'](respondWithResult(_0x2c1e53,null))[_0x994c('0x48')](handleError(_0x2c1e53,null));};
\ No newline at end of file
index 3e486b8..2907a44 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfe28=['util','../../config/logger','api','bluebird','rimraf','./analyticCustomReport.attributes','define','AnalyticCustomReport','lodash'];(function(_0x48ec91,_0x212edc){var _0x22766c=function(_0x136751){while(--_0x136751){_0x48ec91['push'](_0x48ec91['shift']());}};_0x22766c(++_0x212edc);}(_0xfe28,0x104));var _0x8fe2=function(_0x5a1377,_0x1ba21d){_0x5a1377=_0x5a1377-0x0;var _0x5a54d5=_0xfe28[_0x5a1377];return _0x5a54d5;};'use strict';var _=require(_0x8fe2('0x0'));var util=require(_0x8fe2('0x1'));var logger=require(_0x8fe2('0x2'))(_0x8fe2('0x3'));var moment=require('moment');var BPromise=require(_0x8fe2('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x8fe2('0x5'));var config=require('../../config/environment');var attributes=require(_0x8fe2('0x6'));module['exports']=function(_0x162c5c,_0x1a47c7){return _0x162c5c[_0x8fe2('0x7')](_0x8fe2('0x8'),attributes,{'tableName':'analytics_custom_reports','paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x8f84=['../../config/logger','api','moment','bluebird','path','rimraf','exports','AnalyticCustomReport','analytics_custom_reports','lodash'];(function(_0x54d533,_0x8c00e1){var _0x230ad1=function(_0x49f417){while(--_0x49f417){_0x54d533['push'](_0x54d533['shift']());}};_0x230ad1(++_0x8c00e1);}(_0x8f84,0x77));var _0x48f8=function(_0x3cb051,_0x3aac86){_0x3cb051=_0x3cb051-0x0;var _0x21dd99=_0x8f84[_0x3cb051];return _0x21dd99;};'use strict';var _=require(_0x48f8('0x0'));var util=require('util');var logger=require(_0x48f8('0x1'))(_0x48f8('0x2'));var moment=require(_0x48f8('0x3'));var BPromise=require(_0x48f8('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x48f8('0x5'));var rimraf=require(_0x48f8('0x6'));var config=require('../../config/environment');var attributes=require('./analyticCustomReport.attributes');module[_0x48f8('0x7')]=function(_0x3d62e7,_0x4dfcf4){return _0x3d62e7['define'](_0x48f8('0x8'),attributes,{'tableName':_0x48f8('0x9'),'paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 9e46c8e..95bbf7d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x453b=['message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','info','AnalyticCustomReport,\x20%s,\x20%s','request\x20sent','debug','error'];(function(_0x2150af,_0x128fab){var _0x1c89b6=function(_0x31af22){while(--_0x31af22){_0x2150af['push'](_0x2150af['shift']());}};_0x1c89b6(++_0x128fab);}(_0x453b,0x17f));var _0xb453=function(_0x337537,_0x4ea7b8){_0x337537=_0x337537-0x0;var _0x4fdd67=_0x453b[_0x337537];return _0x4fdd67;};'use strict';var _=require(_0xb453('0x0'));var util=require(_0xb453('0x1'));var moment=require('moment');var BPromise=require(_0xb453('0x2'));var rs=require(_0xb453('0x3'));var fs=require('fs');var Redis=require(_0xb453('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xb453('0x5'));var logger=require(_0xb453('0x6'))(_0xb453('0x7'));var config=require(_0xb453('0x8'));var jayson=require(_0xb453('0x9'));var client=jayson['client'][_0xb453('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2d566e,_0x3c19c8,_0x3acda0){return new BPromise(function(_0x2bd0ac,_0x277759){return client[_0xb453('0xb')](_0x2d566e,_0x3acda0)['then'](function(_0x5b928c){logger[_0xb453('0xc')](_0xb453('0xd'),_0x3c19c8,_0xb453('0xe'));logger[_0xb453('0xf')]('AnalyticCustomReport,\x20%s,\x20%s,\x20%s',_0x3c19c8,'request\x20sent',JSON['stringify'](_0x5b928c));if(_0x5b928c['error']){if(_0x5b928c[_0xb453('0x10')]['code']===0x1f4){logger[_0xb453('0x10')](_0xb453('0xd'),_0x3c19c8,_0x5b928c[_0xb453('0x10')][_0xb453('0x11')]);return _0x277759(_0x5b928c[_0xb453('0x10')]['message']);}logger[_0xb453('0x10')]('AnalyticCustomReport,\x20%s,\x20%s',_0x3c19c8,_0x5b928c[_0xb453('0x10')][_0xb453('0x11')]);return _0x2bd0ac(_0x5b928c[_0xb453('0x10')]['message']);}else{logger[_0xb453('0xc')]('AnalyticCustomReport,\x20%s,\x20%s',_0x3c19c8,_0xb453('0xe'));_0x2bd0ac(_0x5b928c[_0xb453('0x12')][_0xb453('0x11')]);}})[_0xb453('0x13')](function(_0x17565b){logger['error'](_0xb453('0xd'),_0x3c19c8,_0x17565b);_0x277759(_0x17565b);});});}
\ No newline at end of file
+var _0x0313=['AnalyticCustomReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','AnalyticCustomReport,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x32f560,_0x4d79db){var _0x37dbdf=function(_0xb84b41){while(--_0xb84b41){_0x32f560['push'](_0x32f560['shift']());}};_0x37dbdf(++_0x4d79db);}(_0x0313,0x128));var _0x3031=function(_0x81c98a,_0x2f7dd6){_0x81c98a=_0x81c98a-0x0;var _0x2d5c09=_0x0313[_0x81c98a];return _0x2d5c09;};'use strict';var _=require('lodash');var util=require(_0x3031('0x0'));var moment=require(_0x3031('0x1'));var BPromise=require(_0x3031('0x2'));var rs=require(_0x3031('0x3'));var fs=require('fs');var Redis=require(_0x3031('0x4'));var db=require(_0x3031('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x3031('0x6'))('rpc');var config=require(_0x3031('0x7'));var jayson=require(_0x3031('0x8'));var client=jayson[_0x3031('0x9')][_0x3031('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x157010,_0x309602,_0x67441d){return new BPromise(function(_0x1441be,_0x2439cc){return client[_0x3031('0xb')](_0x157010,_0x67441d)[_0x3031('0xc')](function(_0x3dda16){logger['info'](_0x3031('0xd'),_0x309602,_0x3031('0xe'));logger[_0x3031('0xf')](_0x3031('0x10'),_0x309602,_0x3031('0xe'),JSON[_0x3031('0x11')](_0x3dda16));if(_0x3dda16[_0x3031('0x12')]){if(_0x3dda16[_0x3031('0x12')][_0x3031('0x13')]===0x1f4){logger['error'](_0x3031('0xd'),_0x309602,_0x3dda16['error'][_0x3031('0x14')]);return _0x2439cc(_0x3dda16['error'][_0x3031('0x14')]);}logger['error'](_0x3031('0xd'),_0x309602,_0x3dda16[_0x3031('0x12')]['message']);return _0x1441be(_0x3dda16['error'][_0x3031('0x14')]);}else{logger[_0x3031('0x15')]('AnalyticCustomReport,\x20%s,\x20%s',_0x309602,_0x3031('0xe'));_0x1441be(_0x3dda16[_0x3031('0x16')][_0x3031('0x14')]);}})[_0x3031('0x17')](function(_0x1a1744){logger[_0x3031('0x12')](_0x3031('0xd'),_0x309602,_0x1a1744);_0x2439cc(_0x1a1744);});});}
\ No newline at end of file
index 91a0e3a..b520d76 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xee4a=['/:id/query','query','post','put','update','destroy','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','get','index','/:id','/:id/preview','isAuthenticated','preview','/:id/run'];(function(_0x2f4d7f,_0x62f4b7){var _0x147ba1=function(_0x14ef36){while(--_0x14ef36){_0x2f4d7f['push'](_0x2f4d7f['shift']());}};_0x147ba1(++_0x62f4b7);}(_0xee4a,0xd8));var _0xaee4=function(_0x3434b0,_0xb5e967){_0x3434b0=_0x3434b0-0x0;var _0x28f0a1=_0xee4a[_0x3434b0];return _0x28f0a1;};'use strict';var multer=require(_0xaee4('0x0'));var util=require(_0xaee4('0x1'));var path=require(_0xaee4('0x2'));var timeout=require(_0xaee4('0x3'));var express=require(_0xaee4('0x4'));var router=express[_0xaee4('0x5')]();var fs_extra=require(_0xaee4('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0xaee4('0x7'));var config=require('../../config/environment');var controller=require('./analyticCustomReport.controller');router[_0xaee4('0x8')]('/',auth['isAuthenticated'](),controller[_0xaee4('0x9')]);router[_0xaee4('0x8')](_0xaee4('0xa'),auth['isAuthenticated'](),controller['show']);router[_0xaee4('0x8')](_0xaee4('0xb'),auth[_0xaee4('0xc')](),controller[_0xaee4('0xd')]);router['get'](_0xaee4('0xe'),auth[_0xaee4('0xc')](),controller['run']);router[_0xaee4('0x8')](_0xaee4('0xf'),auth[_0xaee4('0xc')](),controller[_0xaee4('0x10')]);router[_0xaee4('0x11')]('/',auth[_0xaee4('0xc')](),controller['create']);router[_0xaee4('0x12')](_0xaee4('0xa'),auth['isAuthenticated'](),controller[_0xaee4('0x13')]);router['delete']('/:id',auth[_0xaee4('0xc')](),controller[_0xaee4('0x14')]);module['exports']=router;
\ No newline at end of file
+var _0xbb80=['run','/:id/query','post','create','put','destroy','exports','multer','util','connect-timeout','express','fs-extra','../../components/interaction/service','../../config/environment','./analyticCustomReport.controller','get','index','/:id','/:id/preview','isAuthenticated','preview','/:id/run'];(function(_0x516a58,_0x55347f){var _0x3527f3=function(_0x2b521b){while(--_0x2b521b){_0x516a58['push'](_0x516a58['shift']());}};_0x3527f3(++_0x55347f);}(_0xbb80,0x1eb));var _0x0bb8=function(_0x38c0b2,_0x6a67a5){_0x38c0b2=_0x38c0b2-0x0;var _0x283c00=_0xbb80[_0x38c0b2];return _0x283c00;};'use strict';var multer=require(_0x0bb8('0x0'));var util=require(_0x0bb8('0x1'));var path=require('path');var timeout=require(_0x0bb8('0x2'));var express=require(_0x0bb8('0x3'));var router=express['Router']();var fs_extra=require(_0x0bb8('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x0bb8('0x5'));var config=require(_0x0bb8('0x6'));var controller=require(_0x0bb8('0x7'));router[_0x0bb8('0x8')]('/',auth['isAuthenticated'](),controller[_0x0bb8('0x9')]);router[_0x0bb8('0x8')](_0x0bb8('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x0bb8('0x8')](_0x0bb8('0xb'),auth[_0x0bb8('0xc')](),controller[_0x0bb8('0xd')]);router[_0x0bb8('0x8')](_0x0bb8('0xe'),auth[_0x0bb8('0xc')](),controller[_0x0bb8('0xf')]);router[_0x0bb8('0x8')](_0x0bb8('0x10'),auth['isAuthenticated'](),controller['query']);router[_0x0bb8('0x11')]('/',auth[_0x0bb8('0xc')](),controller[_0x0bb8('0x12')]);router[_0x0bb8('0x13')](_0x0bb8('0xa'),auth[_0x0bb8('0xc')](),controller['update']);router['delete'](_0x0bb8('0xa'),auth['isAuthenticated'](),controller[_0x0bb8('0x14')]);module[_0x0bb8('0x15')]=router;
\ No newline at end of file
index 6dd2f45..853ab40 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7dfd=['STRING','TEXT','sequelize','exports'];(function(_0x17cae8,_0x38a643){var _0xad9680=function(_0x47aae8){while(--_0x47aae8){_0x17cae8['push'](_0x17cae8['shift']());}};_0xad9680(++_0x38a643);}(_0x7dfd,0x1c2));var _0xd7df=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7dfd[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0xd7df('0x0'));module[_0xd7df('0x1')]={'name':{'type':Sequelize[_0xd7df('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0xd7df('0x2')]},'parent':{'type':Sequelize[_0xd7df('0x2')]},'table':{'type':Sequelize[_0xd7df('0x2')]},'conditions':{'type':Sequelize[_0xd7df('0x3')]},'joins':{'type':Sequelize[_0xd7df('0x3')]}};
\ No newline at end of file
+var _0xda19=['exports','STRING','TEXT'];(function(_0x5b012b,_0x45be7a){var _0x11f221=function(_0x5aa9aa){while(--_0x5aa9aa){_0x5b012b['push'](_0x5b012b['shift']());}};_0x11f221(++_0x45be7a);}(_0xda19,0xd5));var _0x9da1=function(_0x391a4f,_0x591b29){_0x391a4f=_0x391a4f-0x0;var _0x172065=_0xda19[_0x391a4f];return _0x172065;};'use strict';var Sequelize=require('sequelize');module[_0x9da1('0x0')]={'name':{'type':Sequelize[_0x9da1('0x1')],'allowNull':![]},'description':{'type':Sequelize['STRING']},'parent':{'type':Sequelize[_0x9da1('0x1')]},'table':{'type':Sequelize['STRING']},'conditions':{'type':Sequelize[_0x9da1('0x2')]},'joins':{'type':Sequelize['TEXT']}};
\ No newline at end of file
index b2b9a8c..9cd7ef8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3f8a=['get','DefaultReports','end','error','stack','name','send','index','map','AnalyticDefaultReport','rawAttributes','type','key','keys','intersection','model','attributes','fields','query','order','sort','filters','pick','filter','merge','VIRTUAL','options','where','include','findAll','catch','show','params','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Reports','find','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','preview','join','left_join','right_join','SUM(%s)','COUNT(%s)','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','rules','length','operator','group','field','value','getFields','Sequelize','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','keyBy','select','from','table','MetricId','function','replace','format','groupBy','orderBy','alias','joins','parse','parentKey','foreignTable','foreignKey','conditions','Limited\x20Query:','sequelize','toString','SELECT','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','IS\x20NULL','condition','ValidationErrorItem','metric','DESC','clone','output','web','fullPath','%s-%s.%s','randomstring','generate','csv','default','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','endDate','Run\x20Query:','child_process','fork','../../components/export/','../../files/reports','countTable','COUNT(*)','QueryTypes','run','runReport','%s.%s\x20=\x20%s.%s','debug','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','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','dbH','sendStatus','status','offset','undefined','limit','count','set','json','apply','reject','save','update','destroy','then'];(function(_0x43e4e0,_0x1e9055){var _0x40a7ea=function(_0x21d377){while(--_0x21d377){_0x43e4e0['push'](_0x43e4e0['shift']());}};_0x40a7ea(++_0x1e9055);}(_0x3f8a,0x1d5));var _0xa3f8=function(_0x34df48,_0x92b99f){_0x34df48=_0x34df48-0x0;var _0x1bf00a=_0x3f8a[_0x34df48];return _0x1bf00a;};'use strict';var emlformat=require(_0xa3f8('0x0'));var rimraf=require(_0xa3f8('0x1'));var zipdir=require(_0xa3f8('0x2'));var jsonpatch=require(_0xa3f8('0x3'));var rp=require('request-promise');var moment=require(_0xa3f8('0x4'));var BPromise=require(_0xa3f8('0x5'));var Mustache=require(_0xa3f8('0x6'));var util=require(_0xa3f8('0x7'));var path=require(_0xa3f8('0x8'));var sox=require(_0xa3f8('0x9'));var csv=require(_0xa3f8('0xa'));var ejs=require(_0xa3f8('0xb'));var fs=require('fs');var fs_extra=require(_0xa3f8('0xc'));var _=require(_0xa3f8('0xd'));var squel=require(_0xa3f8('0xe'));var crypto=require(_0xa3f8('0xf'));var jsforce=require(_0xa3f8('0x10'));var deskjs=require(_0xa3f8('0x11'));var toCsv=require(_0xa3f8('0xa'));var querystring=require(_0xa3f8('0x12'));var Papa=require(_0xa3f8('0x13'));var Redis=require('ioredis');var authService=require(_0xa3f8('0x14'));var qs=require(_0xa3f8('0x15'));var as=require(_0xa3f8('0x16'));var hardwareService=require(_0xa3f8('0x17'));var logger=require('../../config/logger')(_0xa3f8('0x18'));var utils=require(_0xa3f8('0x19'));var config=require(_0xa3f8('0x1a'));var licenseUtil=require(_0xa3f8('0x1b'));var db=require(_0xa3f8('0x1c'))['db'];var dbH=require(_0xa3f8('0x1c'))[_0xa3f8('0x1d')];function respondWithStatusCode(_0x63de8b,_0x324aa8){_0x324aa8=_0x324aa8||0xcc;return function(_0x36b1b8){if(_0x36b1b8){return _0x63de8b[_0xa3f8('0x1e')](_0x324aa8);}return _0x63de8b[_0xa3f8('0x1f')](_0x324aa8)['end']();};}function respondWithResult(_0x2d8f74,_0xe55848){_0xe55848=_0xe55848||0xc8;return function(_0x45014f){if(_0x45014f){return _0x2d8f74[_0xa3f8('0x1f')](_0xe55848)['json'](_0x45014f);}};}function respondWithFilteredResult(_0x39c450,_0x33b98e){return function(_0x46a8d9){if(_0x46a8d9){var _0x8cd130=typeof _0x33b98e[_0xa3f8('0x20')]===_0xa3f8('0x21')&&typeof _0x33b98e[_0xa3f8('0x22')]===_0xa3f8('0x21');var _0x2cb49f=_0x46a8d9[_0xa3f8('0x23')];var _0x54b870=_0x8cd130?0x0:_0x33b98e[_0xa3f8('0x20')];var _0x5a0e18=_0x8cd130?_0x46a8d9[_0xa3f8('0x23')]:_0x33b98e[_0xa3f8('0x20')]+_0x33b98e[_0xa3f8('0x22')];var _0x46042d;if(_0x5a0e18>=_0x2cb49f){_0x5a0e18=_0x2cb49f;_0x46042d=0xc8;}else{_0x46042d=0xce;}_0x39c450['status'](_0x46042d);return _0x39c450[_0xa3f8('0x24')]('Content-Range',_0x54b870+'-'+_0x5a0e18+'/'+_0x2cb49f)[_0xa3f8('0x25')](_0x46a8d9);}return null;};}function patchUpdates(_0x58336d){return function(_0x4066bb){try{jsonpatch[_0xa3f8('0x26')](_0x4066bb,_0x58336d,!![]);}catch(_0x353daa){return BPromise[_0xa3f8('0x27')](_0x353daa);}return _0x4066bb[_0xa3f8('0x28')]();};}function saveUpdates(_0x1e5f30,_0x187352){return function(_0x490717){if(_0x490717){return _0x490717[_0xa3f8('0x29')](_0x1e5f30)['then'](function(_0x3ce57b){return _0x3ce57b;});}return null;};}function removeEntity(_0xa5a697,_0x24985a){return function(_0x37b290){if(_0x37b290){return _0x37b290[_0xa3f8('0x2a')]()[_0xa3f8('0x2b')](function(){var _0x6e3cb4=_0x37b290[_0xa3f8('0x2c')]({'plain':!![]});var _0x1e22b8=_0xa3f8('0x2d');return db['UserProfileResource'][_0xa3f8('0x2a')]({'where':{'type':_0x1e22b8,'resourceId':_0x6e3cb4['id']}})[_0xa3f8('0x2b')](function(){return _0x37b290;});})[_0xa3f8('0x2b')](function(){_0xa5a697['status'](0xcc)[_0xa3f8('0x2e')]();});}};}function handleEntityNotFound(_0x57f6be,_0xbad6a6){return function(_0x3a3746){if(!_0x3a3746){_0x57f6be[_0xa3f8('0x1e')](0x194);}return _0x3a3746;};}function handleError(_0x4ea213,_0x458824){_0x458824=_0x458824||0x1f4;return function(_0x5e69e2){logger[_0xa3f8('0x2f')](_0x5e69e2[_0xa3f8('0x30')]);if(_0x5e69e2[_0xa3f8('0x31')]){delete _0x5e69e2[_0xa3f8('0x31')];}_0x4ea213[_0xa3f8('0x1f')](_0x458824)[_0xa3f8('0x32')](_0x5e69e2);};}exports[_0xa3f8('0x33')]=function(_0x424a3e,_0x25f9f5){var _0x290a4e={},_0x6e83b0={},_0x57c465={'count':0x0,'rows':[]};var _0x4404da=_[_0xa3f8('0x34')](db[_0xa3f8('0x35')][_0xa3f8('0x36')],function(_0x3bb4b0){return{'name':_0x3bb4b0['fieldName'],'type':_0x3bb4b0[_0xa3f8('0x37')][_0xa3f8('0x38')]};});_0x6e83b0['model']=_[_0xa3f8('0x34')](_0x4404da,_0xa3f8('0x31'));_0x6e83b0['query']=_[_0xa3f8('0x39')](_0x424a3e['query']);_0x6e83b0['filters']=_[_0xa3f8('0x3a')](_0x6e83b0[_0xa3f8('0x3b')],_0x6e83b0['query']);_0x290a4e[_0xa3f8('0x3c')]=_['intersection'](_0x6e83b0[_0xa3f8('0x3b')],qs[_0xa3f8('0x3d')](_0x424a3e[_0xa3f8('0x3e')][_0xa3f8('0x3d')]));_0x290a4e['attributes']=_0x290a4e[_0xa3f8('0x3c')]['length']?_0x290a4e[_0xa3f8('0x3c')]:_0x6e83b0['model'];if(!_0x424a3e[_0xa3f8('0x3e')]['hasOwnProperty']('nolimit')){_0x290a4e['limit']=qs[_0xa3f8('0x22')](_0x424a3e[_0xa3f8('0x3e')][_0xa3f8('0x22')]);_0x290a4e[_0xa3f8('0x20')]=qs['offset'](_0x424a3e[_0xa3f8('0x3e')][_0xa3f8('0x20')]);}_0x290a4e[_0xa3f8('0x3f')]=qs[_0xa3f8('0x40')](_0x424a3e[_0xa3f8('0x3e')][_0xa3f8('0x40')]);_0x290a4e['where']=qs[_0xa3f8('0x41')](_[_0xa3f8('0x42')](_0x424a3e[_0xa3f8('0x3e')],_0x6e83b0['filters']),_0x4404da);if(_0x424a3e[_0xa3f8('0x3e')][_0xa3f8('0x43')]){_0x290a4e['where']=_[_0xa3f8('0x44')](_0x290a4e['where'],{'$or':_[_0xa3f8('0x34')](_0x4404da,function(_0x5a077c){if(_0x5a077c[_0xa3f8('0x37')]!==_0xa3f8('0x45')){var _0x9a00e7={};_0x9a00e7[_0x5a077c[_0xa3f8('0x31')]]={'$like':'%'+_0x424a3e[_0xa3f8('0x3e')]['filter']+'%'};return _0x9a00e7;}})});}_0x290a4e=_[_0xa3f8('0x44')]({},_0x290a4e,_0x424a3e[_0xa3f8('0x46')]);var _0x4db9c5={'where':_0x290a4e[_0xa3f8('0x47')]};return db['AnalyticDefaultReport'][_0xa3f8('0x23')](_0x4db9c5)[_0xa3f8('0x2b')](function(_0x1542cc){_0x57c465[_0xa3f8('0x23')]=_0x1542cc;if(_0x424a3e[_0xa3f8('0x3e')]['includeAll']){_0x290a4e[_0xa3f8('0x48')]=[{'all':!![]}];}return db[_0xa3f8('0x35')][_0xa3f8('0x49')](_0x290a4e);})[_0xa3f8('0x2b')](function(_0x337808){_0x57c465['rows']=_0x337808;return _0x57c465;})[_0xa3f8('0x2b')](respondWithFilteredResult(_0x25f9f5,_0x290a4e))[_0xa3f8('0x4a')](handleError(_0x25f9f5,null));};exports[_0xa3f8('0x4b')]=function(_0x32e371,_0x2a124b){var _0x314dba={'raw':!![],'where':{'id':_0x32e371[_0xa3f8('0x4c')]['id']}},_0x497217={};_0x497217[_0xa3f8('0x3b')]=_[_0xa3f8('0x39')](db[_0xa3f8('0x35')][_0xa3f8('0x36')]);_0x497217[_0xa3f8('0x3e')]=_['keys'](_0x32e371['query']);_0x497217['filters']=_[_0xa3f8('0x3a')](_0x497217[_0xa3f8('0x3b')],_0x497217[_0xa3f8('0x3e')]);_0x314dba[_0xa3f8('0x3c')]=_[_0xa3f8('0x3a')](_0x497217[_0xa3f8('0x3b')],qs['fields'](_0x32e371[_0xa3f8('0x3e')][_0xa3f8('0x3d')]));_0x314dba[_0xa3f8('0x3c')]=_0x314dba[_0xa3f8('0x3c')]['length']?_0x314dba[_0xa3f8('0x3c')]:_0x497217[_0xa3f8('0x3b')];if(_0x32e371[_0xa3f8('0x3e')]['includeAll']){_0x314dba['include']=[{'all':!![]}];}_0x314dba=_['merge']({},_0x314dba,_0x32e371[_0xa3f8('0x46')]);return db[_0xa3f8('0x35')]['find'](_0x314dba)[_0xa3f8('0x2b')](handleEntityNotFound(_0x2a124b,null))[_0xa3f8('0x2b')](respondWithResult(_0x2a124b,null))[_0xa3f8('0x4a')](handleError(_0x2a124b,null));};exports[_0xa3f8('0x4d')]=function(_0x14932f,_0x3c74b5){return db[_0xa3f8('0x35')][_0xa3f8('0x4d')](_0x14932f[_0xa3f8('0x4e')],{})[_0xa3f8('0x2b')](function(_0x338554){var _0x29d8f5=_0x14932f[_0xa3f8('0x4f')][_0xa3f8('0x2c')]({'plain':!![]});if(!_0x29d8f5)throw new Error(_0xa3f8('0x50'));if(_0x29d8f5[_0xa3f8('0x51')]===_0xa3f8('0x4f')){var _0x559ae7=_0x338554['get']({'plain':!![]});var _0x1fad80=_0xa3f8('0x52');return db['UserProfileSection'][_0xa3f8('0x53')]({'where':{'name':_0x1fad80,'userProfileId':_0x29d8f5[_0xa3f8('0x54')]},'raw':!![]})[_0xa3f8('0x2b')](function(_0xaff79b){if(_0xaff79b&&_0xaff79b[_0xa3f8('0x55')]===0x0){return db[_0xa3f8('0x56')][_0xa3f8('0x4d')]({'name':_0x559ae7[_0xa3f8('0x31')],'resourceId':_0x559ae7['id'],'type':_0xa3f8('0x2d'),'sectionId':_0xaff79b['id']},{})[_0xa3f8('0x2b')](function(){return _0x338554;});}else{return _0x338554;}})[_0xa3f8('0x4a')](function(_0x3752fa){logger[_0xa3f8('0x2f')](_0xa3f8('0x57'),_0x3752fa);throw _0x3752fa;});}return _0x338554;})[_0xa3f8('0x2b')](respondWithResult(_0x3c74b5,0xc9))[_0xa3f8('0x4a')](handleError(_0x3c74b5,null));};exports['update']=function(_0x593614,_0xd0628e){if(_0x593614['body']['id']){delete _0x593614[_0xa3f8('0x4e')]['id'];}return db[_0xa3f8('0x35')][_0xa3f8('0x53')]({'where':{'id':_0x593614['params']['id']}})[_0xa3f8('0x2b')](handleEntityNotFound(_0xd0628e,null))[_0xa3f8('0x2b')](saveUpdates(_0x593614[_0xa3f8('0x4e')],null))[_0xa3f8('0x2b')](respondWithResult(_0xd0628e,null))['catch'](handleError(_0xd0628e,null));};exports[_0xa3f8('0x2a')]=function(_0x47cc0c,_0x392e1e){return db[_0xa3f8('0x35')][_0xa3f8('0x53')]({'where':{'id':_0x47cc0c['params']['id']}})['then'](handleEntityNotFound(_0x392e1e,null))[_0xa3f8('0x2b')](removeEntity(_0x392e1e,null))[_0xa3f8('0x4a')](handleError(_0x392e1e,null));};exports[_0xa3f8('0x58')]=function(_0x6ad40a,_0x48f5a6){var _0x36eac9=0xa;var _0x3478e8=[_0xa3f8('0x59'),_0xa3f8('0x5a'),_0xa3f8('0x5b'),'cross_join'];var _0x5d7877={'SUM':_0xa3f8('0x5c'),'COUNT':_0xa3f8('0x5d'),'COUNT DISTINCT':_0xa3f8('0x5e'),'MAX':_0xa3f8('0x5f'),'MIN':_0xa3f8('0x60'),'AVG':_0xa3f8('0x61'),'GROUP_CONCAT':_0xa3f8('0x62'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x521719={'SEC_TO_TIME':_0xa3f8('0x63'),'DATE':_0xa3f8('0x64'),'HOUR':_0xa3f8('0x65'),'ROUND':_0xa3f8('0x66'),'UNIX_TIMESTAMP':_0xa3f8('0x67')};var _0x27de61=function(_0x356643){return!_[_0xa3f8('0x68')](['IS\x20NULL',_0xa3f8('0x69'),_0xa3f8('0x6a'),_0xa3f8('0x6b')],_0x356643);};var _0x42e3f8=function(_0x27c5aa){if(!_0x27c5aa||!_0x27c5aa[_0xa3f8('0x6c')][_0xa3f8('0x6d')]){return'';}for(var _0x4d0404='(',_0x33ea06=0x0;_0x33ea06<_0x27c5aa[_0xa3f8('0x6c')]['length'];_0x33ea06+=0x1){_0x33ea06>0x0&&(_0x4d0404+='\x20'+_0x27c5aa[_0xa3f8('0x6e')]+'\x20');_0x4d0404+=_0x27c5aa[_0xa3f8('0x6c')][_0x33ea06][_0xa3f8('0x6f')]?_0x42e3f8(_0x27c5aa[_0xa3f8('0x6c')][_0x33ea06][_0xa3f8('0x6f')]):_0x27c5aa[_0xa3f8('0x6c')][_0x33ea06][_0xa3f8('0x70')]+'\x20'+_0x27c5aa['rules'][_0x33ea06]['condition']+(_0x27de61(_0x27c5aa[_0xa3f8('0x6c')][_0x33ea06]['condition'])?'\x20'+_0x27c5aa[_0xa3f8('0x6c')][_0x33ea06][_0xa3f8('0x71')]:'');}return _0x4d0404+')';};var _0x3ff369={'where':{'id':_0x6ad40a[_0xa3f8('0x4c')]['id']}},_0x1dba7e,_0x452e99,_0x35d4d6,_0xeca2dc,_0x14508d;_0x3ff369=_[_0xa3f8('0x44')]({},_0x3ff369,_0x6ad40a[_0xa3f8('0x46')]);return db[_0xa3f8('0x35')][_0xa3f8('0x53')](_0x3ff369)['then'](function(_0x5efdcf){if(_0x5efdcf){_0x1dba7e=_0x5efdcf;return _0x5efdcf[_0xa3f8('0x72')]();}return null;})[_0xa3f8('0x2b')](function(_0x1688ca){if(_0x1688ca){if(!_0x1688ca[_0xa3f8('0x6d')]){throw new db[(_0xa3f8('0x73'))]['ValidationErrorItem'](_0xa3f8('0x74'),0x193);}_0x452e99=_0x1688ca;return db[_0xa3f8('0x75')][_0xa3f8('0x49')]({'raw':!![]});}return null;})[_0xa3f8('0x2b')](function(_0x28d359){if(_0x28d359){_0x35d4d6=_[_0xa3f8('0x76')](_0x28d359,'id');var _0x3d45ae;var _0x3a2362=squel[_0xa3f8('0x77')]();_0x3a2362[_0xa3f8('0x78')](_0x1dba7e[_0xa3f8('0x79')]);for(var _0x5d4fe5=0x0;_0x5d4fe5<_0x452e99[_0xa3f8('0x6d')];_0x5d4fe5+=0x1){_0x3d45ae=_0x452e99[_0x5d4fe5][_0xa3f8('0x7a')]?_0x35d4d6[_0x452e99[_0x5d4fe5]['MetricId']]['metric']:_0x452e99[_0x5d4fe5][_0xa3f8('0x70')];_0x3d45ae=_0x452e99[_0x5d4fe5][_0xa3f8('0x7b')]?_[_0xa3f8('0x7c')](_0x5d7877[_0x452e99[_0x5d4fe5][_0xa3f8('0x7b')]],'%s',_0x3d45ae):_0x3d45ae;_0x3d45ae=_0x452e99[_0x5d4fe5][_0xa3f8('0x7d')]?_[_0xa3f8('0x7c')](_0x521719[_0x452e99[_0x5d4fe5][_0xa3f8('0x7d')]],'%s',_0x3d45ae):_0x3d45ae;if(_0x452e99[_0x5d4fe5][_0xa3f8('0x7e')]){_0x3a2362['group'](_0x3d45ae);}_0x452e99[_0x5d4fe5][_0xa3f8('0x7f')]&&_0x3a2362[_0xa3f8('0x3f')](_0x3d45ae,_0x452e99[_0x5d4fe5][_0xa3f8('0x7f')]==='DESC'?![]:!![]);_0x3a2362[_0xa3f8('0x70')](_0x3d45ae,_0x452e99[_0x5d4fe5][_0xa3f8('0x80')]||_0x3d45ae);}if(_0x1dba7e['joins']){_0x1dba7e[_0xa3f8('0x81')]=JSON[_0xa3f8('0x82')](_0x1dba7e[_0xa3f8('0x81')]);for(var _0x14a5b5=0x0;_0x14a5b5<_0x1dba7e[_0xa3f8('0x81')][_0xa3f8('0x6d')];_0x14a5b5+=0x1){if(_0x1dba7e[_0xa3f8('0x81')][_0x14a5b5][_0xa3f8('0x37')]&&_[_0xa3f8('0x68')](_0x3478e8,_0x1dba7e['joins'][_0x14a5b5][_0xa3f8('0x37')])&&_0x1dba7e['joins'][_0x14a5b5][_0xa3f8('0x83')]&&_0x1dba7e['joins'][_0x14a5b5][_0xa3f8('0x84')]&&_0x1dba7e[_0xa3f8('0x81')][_0x14a5b5][_0xa3f8('0x85')]){_0x3a2362[_0x1dba7e[_0xa3f8('0x81')][_0x14a5b5][_0xa3f8('0x37')]](_0x1dba7e['joins'][_0x14a5b5][_0xa3f8('0x84')],null,util[_0xa3f8('0x7d')]('%s.%s\x20=\x20%s.%s',_0x1dba7e[_0xa3f8('0x79')],_0x1dba7e[_0xa3f8('0x81')][_0x14a5b5][_0xa3f8('0x83')],_0x1dba7e[_0xa3f8('0x81')][_0x14a5b5][_0xa3f8('0x84')],_0x1dba7e[_0xa3f8('0x81')][_0x14a5b5]['foreignKey']));}}}if(_0x1dba7e[_0xa3f8('0x86')]){_0x1dba7e[_0xa3f8('0x86')]=JSON[_0xa3f8('0x82')](_0x1dba7e['conditions']);_0x3a2362[_0xa3f8('0x47')](_0x42e3f8(_0x1dba7e['conditions'][_0xa3f8('0x6f')]));}_0x14508d=_0x3a2362['clone']();_0x3a2362['limit'](_0x36eac9);_0x3a2362[_0xa3f8('0x20')](0x0);logger['debug'](_0xa3f8('0x87'),_0x3a2362['toString']());return dbH[_0xa3f8('0x88')][_0xa3f8('0x3e')](_0x3a2362[_0xa3f8('0x89')](),{'type':dbH[_0xa3f8('0x88')]['QueryTypes'][_0xa3f8('0x8a')]});}})[_0xa3f8('0x2b')](respondWithResult(_0x48f5a6,null))['catch'](handleError(_0x48f5a6,null));};function runReport(_0x3187e0,_0xd0d568,_0x3715ea){var _0x345089=_0xd0d568[_0xa3f8('0x31')];var _0x20ae51=0xa;var _0x190ce8=[_0xa3f8('0x59'),_0xa3f8('0x5a'),_0xa3f8('0x5b'),'cross_join'];var _0x7dc5ec={'SUM':_0xa3f8('0x5c'),'COUNT':_0xa3f8('0x5d'),'COUNT DISTINCT':_0xa3f8('0x5e'),'MAX':_0xa3f8('0x5f'),'MIN':_0xa3f8('0x60'),'AVG':_0xa3f8('0x61'),'GROUP_CONCAT':_0xa3f8('0x62'),'GROUP_CONCAT ASC':_0xa3f8('0x8b'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x2e2d99={'SEC_TO_TIME':_0xa3f8('0x63'),'DATE':_0xa3f8('0x64'),'HOUR':_0xa3f8('0x65'),'ROUND':_0xa3f8('0x66'),'UNIX_TIMESTAMP':_0xa3f8('0x67')};var _0x599484=function(_0x24fe62){return!_[_0xa3f8('0x68')]([_0xa3f8('0x8c'),_0xa3f8('0x69'),'IS\x20EMPTY',_0xa3f8('0x6b')],_0x24fe62);};var _0x427830=function(_0x3c5091){if(!_0x3c5091||!_0x3c5091[_0xa3f8('0x6c')][_0xa3f8('0x6d')]){return'';}for(var _0x2db7dd='(',_0x12fe03=0x0;_0x12fe03<_0x3c5091[_0xa3f8('0x6c')][_0xa3f8('0x6d')];_0x12fe03+=0x1){_0x12fe03>0x0&&(_0x2db7dd+='\x20'+_0x3c5091[_0xa3f8('0x6e')]+'\x20');_0x2db7dd+=_0x3c5091[_0xa3f8('0x6c')][_0x12fe03]['group']?_0x427830(_0x3c5091[_0xa3f8('0x6c')][_0x12fe03]['group']):_0x3c5091[_0xa3f8('0x6c')][_0x12fe03][_0xa3f8('0x70')]+'\x20'+_0x3c5091[_0xa3f8('0x6c')][_0x12fe03][_0xa3f8('0x8d')]+(_0x599484(_0x3c5091[_0xa3f8('0x6c')][_0x12fe03][_0xa3f8('0x8d')])?'\x20'+_0x3c5091[_0xa3f8('0x6c')][_0x12fe03][_0xa3f8('0x71')]:'');}return _0x2db7dd+')';};var _0x4bb7dd={'where':{'id':_0x3187e0['id']}},_0x2c6efe,_0x4f9513,_0x39bd5c,_0x52fcc3,_0x2d2883;_0x4bb7dd=_['merge']({},_0x4bb7dd,_0x3715ea);return db[_0xa3f8('0x35')][_0xa3f8('0x53')](_0x4bb7dd)[_0xa3f8('0x2b')](function(_0xe3cc6a){if(_0xe3cc6a){_0x2c6efe=_0xe3cc6a;return _0xe3cc6a['getFields']();}return null;})[_0xa3f8('0x2b')](function(_0x3d343f){if(_0x3d343f){if(!_0x3d343f[_0xa3f8('0x6d')]){throw new db[(_0xa3f8('0x73'))][(_0xa3f8('0x8e'))](_0xa3f8('0x74'),0x193);}_0x4f9513=_0x3d343f;return db['AnalyticMetric'][_0xa3f8('0x49')]({'raw':!![]});}return null;})[_0xa3f8('0x2b')](function(_0xbe1a54){if(_0xbe1a54){_0x39bd5c=_[_0xa3f8('0x76')](_0xbe1a54,'id');var _0x477b0a;var _0x565a10=squel[_0xa3f8('0x77')]();_0x565a10[_0xa3f8('0x78')](_0x2c6efe['table']);for(var _0x4494a5=0x0;_0x4494a5<_0x4f9513[_0xa3f8('0x6d')];_0x4494a5+=0x1){_0x477b0a=_0x4f9513[_0x4494a5][_0xa3f8('0x7a')]?_0x39bd5c[_0x4f9513[_0x4494a5]['MetricId']][_0xa3f8('0x8f')]:_0x4f9513[_0x4494a5][_0xa3f8('0x70')];_0x477b0a=_0x4f9513[_0x4494a5][_0xa3f8('0x7b')]?_[_0xa3f8('0x7c')](_0x7dc5ec[_0x4f9513[_0x4494a5][_0xa3f8('0x7b')]],'%s',_0x477b0a):_0x477b0a;_0x477b0a=_0x4f9513[_0x4494a5][_0xa3f8('0x7d')]?_[_0xa3f8('0x7c')](_0x2e2d99[_0x4f9513[_0x4494a5]['format']],'%s',_0x477b0a):_0x477b0a;if(_0x4f9513[_0x4494a5][_0xa3f8('0x7e')]){_0x565a10[_0xa3f8('0x6f')](_0x477b0a);}_0x4f9513[_0x4494a5]['orderBy']&&_0x565a10[_0xa3f8('0x3f')](_0x477b0a,_0x4f9513[_0x4494a5][_0xa3f8('0x7f')]===_0xa3f8('0x90')?![]:!![]);_0x565a10[_0xa3f8('0x70')](_0x477b0a,_0x4f9513[_0x4494a5][_0xa3f8('0x80')]||_0x477b0a);}if(_0x2c6efe[_0xa3f8('0x81')]){_0x2c6efe[_0xa3f8('0x81')]=JSON['parse'](_0x2c6efe[_0xa3f8('0x81')]);for(var _0x151bab=0x0;_0x151bab<_0x2c6efe[_0xa3f8('0x81')][_0xa3f8('0x6d')];_0x151bab+=0x1){if(_0x2c6efe[_0xa3f8('0x81')][_0x151bab][_0xa3f8('0x37')]&&_[_0xa3f8('0x68')](_0x190ce8,_0x2c6efe['joins'][_0x151bab][_0xa3f8('0x37')])&&_0x2c6efe[_0xa3f8('0x81')][_0x151bab][_0xa3f8('0x83')]&&_0x2c6efe[_0xa3f8('0x81')][_0x151bab]['foreignTable']&&_0x2c6efe['joins'][_0x151bab][_0xa3f8('0x85')]){_0x565a10[_0x2c6efe['joins'][_0x151bab][_0xa3f8('0x37')]](_0x2c6efe[_0xa3f8('0x81')][_0x151bab][_0xa3f8('0x84')],null,util['format']('%s.%s\x20=\x20%s.%s',_0x2c6efe[_0xa3f8('0x79')],_0x2c6efe[_0xa3f8('0x81')][_0x151bab][_0xa3f8('0x83')],_0x2c6efe[_0xa3f8('0x81')][_0x151bab]['foreignTable'],_0x2c6efe[_0xa3f8('0x81')][_0x151bab]['foreignKey']));}}}if(_0x2c6efe[_0xa3f8('0x86')]){_0x2c6efe[_0xa3f8('0x86')]=JSON[_0xa3f8('0x82')](_0x2c6efe['conditions']);_0x565a10['where'](_0x427830(_0x2c6efe['conditions'][_0xa3f8('0x6f')]));}_0x2d2883=_0x565a10[_0xa3f8('0x91')]();_0x565a10[_0xa3f8('0x22')](_0x20ae51);_0x565a10[_0xa3f8('0x20')](0x0);return;}})[_0xa3f8('0x2b')](function(){if(_0xd0d568[_0xa3f8('0x92')]===_0xa3f8('0x93')){return null;}var _0x18890e=_['merge'](_0xd0d568,{'name':_0xd0d568[_0xa3f8('0x94')]||_0xd0d568[_0xa3f8('0x31')]||_0x2c6efe[_0xa3f8('0x31')],'basename':_0x345089,'savename':util['format'](_0xa3f8('0x95'),_0xd0d568[_0xa3f8('0x31')]||_0x2c6efe['name'],require(_0xa3f8('0x96'))[_0xa3f8('0x97')](0x4),_0xd0d568['output']||_0xa3f8('0x98')),'reportId':_0x2c6efe['id'],'reportType':_0xa3f8('0x99')});return db['AnalyticExtractedReport'][_0xa3f8('0x4d')](_0x18890e,{'raw':!![]});})[_0xa3f8('0x2b')](function(_0x21cc1d){if(_0x2c6efe['table']===_0xa3f8('0x9a')){_0x2d2883[_0xa3f8('0x47')](_0x2c6efe[_0xa3f8('0x79')]+_0xa3f8('0x9b'),_0xd0d568[_0xa3f8('0x9c')],_0xd0d568['endDate']);}else{_0x2d2883['where'](_0x2c6efe[_0xa3f8('0x79')]+_0xa3f8('0x9d'),_0xd0d568[_0xa3f8('0x9c')],_0xd0d568[_0xa3f8('0x9e')]);}if(_0x21cc1d){logger['info'](_0xa3f8('0x9f'),_0x2d2883[_0xa3f8('0x89')]());require(_0xa3f8('0xa0'))[_0xa3f8('0xa1')](path[_0xa3f8('0x59')](__dirname,_0xa3f8('0xa2'),_0x21cc1d[_0xa3f8('0x92')]),[_0x21cc1d['id'],_0x2d2883[_0xa3f8('0x89')](),path['join'](__dirname,_0xa3f8('0xa3'),_0x21cc1d['savename']),_0x345089]);return _0x21cc1d;}else{var _0xe9842=squel['select']();_0xe9842['from']('('+_0x2d2883[_0xa3f8('0x89')]()+')',_0xa3f8('0xa4'));_0xe9842[_0xa3f8('0x70')](_0xa3f8('0xa5'),_0xa3f8('0x23'));_0x2d2883['limit'](_0xd0d568['limit']||_0x20ae51);_0x2d2883[_0xa3f8('0x20')](_0xd0d568[_0xa3f8('0x20')]||0x0);return dbH[_0xa3f8('0x88')][_0xa3f8('0x3e')](_0xe9842[_0xa3f8('0x89')](),{'type':dbH[_0xa3f8('0x88')]['QueryTypes'][_0xa3f8('0x8a')]})[_0xa3f8('0x2b')](function(_0x5a4f4a){if(!_0x5a4f4a['length']){_0x52fcc3=0x0;}else{_0x52fcc3=_0x5a4f4a[0x0][_0xa3f8('0x23')]||0x0;}return dbH[_0xa3f8('0x88')]['query'](_0x2d2883[_0xa3f8('0x89')](),{'type':dbH[_0xa3f8('0x88')][_0xa3f8('0xa6')][_0xa3f8('0x8a')]});})[_0xa3f8('0x2b')](function(_0x52f592){return{'rows':_0x52f592||[],'count':_0x52fcc3};});}});}exports[_0xa3f8('0xa7')]=function(_0x59026b,_0x234636){return runReport(_0x59026b[_0xa3f8('0x4c')],_0x59026b['query'],_0x59026b['options'])[_0xa3f8('0x2b')](respondWithResult(_0x234636,null))[_0xa3f8('0x4a')](handleError(_0x234636,null));};exports[_0xa3f8('0xa8')]=runReport;exports[_0xa3f8('0x3e')]=function(_0x26ec07,_0x2c9db8){var _0x18ab67=0xa;var _0x1f21a2=[_0xa3f8('0x59'),_0xa3f8('0x5a'),_0xa3f8('0x5b'),'cross_join'];var _0x15a11c={'SUM':'SUM(%s)','COUNT':'COUNT(%s)','COUNT DISTINCT':_0xa3f8('0x5e'),'MAX':_0xa3f8('0x5f'),'MIN':_0xa3f8('0x60'),'AVG':_0xa3f8('0x61'),'GROUP_CONCAT':_0xa3f8('0x62'),'GROUP_CONCAT ASC':_0xa3f8('0x8b'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x481b70={'SEC_TO_TIME':_0xa3f8('0x63'),'DATE':_0xa3f8('0x64'),'HOUR':_0xa3f8('0x65'),'ROUND':_0xa3f8('0x66'),'UNIX_TIMESTAMP':_0xa3f8('0x67')};var _0x1f776a=function(_0x5b1527){return!_['includes']([_0xa3f8('0x8c'),_0xa3f8('0x69'),_0xa3f8('0x6a'),_0xa3f8('0x6b')],_0x5b1527);};var _0x4670cc=function(_0xfde509){if(!_0xfde509||!_0xfde509['rules']['length']){return'';}for(var _0x3d81fe='(',_0x15111a=0x0;_0x15111a<_0xfde509[_0xa3f8('0x6c')]['length'];_0x15111a+=0x1){_0x15111a>0x0&&(_0x3d81fe+='\x20'+_0xfde509[_0xa3f8('0x6e')]+'\x20');_0x3d81fe+=_0xfde509[_0xa3f8('0x6c')][_0x15111a]['group']?_0x4670cc(_0xfde509[_0xa3f8('0x6c')][_0x15111a]['group']):_0xfde509[_0xa3f8('0x6c')][_0x15111a]['field']+'\x20'+_0xfde509['rules'][_0x15111a][_0xa3f8('0x8d')]+(_0x1f776a(_0xfde509[_0xa3f8('0x6c')][_0x15111a][_0xa3f8('0x8d')])?'\x20'+_0xfde509[_0xa3f8('0x6c')][_0x15111a]['value']:'');}return _0x3d81fe+')';};var _0x2e694e={'where':{'id':_0x26ec07[_0xa3f8('0x4c')]['id']}},_0x1669be,_0x4f248f,_0x6ef1ad,_0xae3a31,_0x31d45c;_0x2e694e=_[_0xa3f8('0x44')]({},_0x2e694e,_0x26ec07[_0xa3f8('0x46')]);return db[_0xa3f8('0x35')][_0xa3f8('0x53')](_0x2e694e)[_0xa3f8('0x2b')](function(_0x529021){if(_0x529021){_0x1669be=_0x529021;return _0x529021[_0xa3f8('0x72')]();}return null;})[_0xa3f8('0x2b')](function(_0x35c498){if(_0x35c498){if(!_0x35c498[_0xa3f8('0x6d')]){throw new db[(_0xa3f8('0x73'))][(_0xa3f8('0x8e'))](_0xa3f8('0x74'),0x193);}_0x4f248f=_0x35c498;return db[_0xa3f8('0x75')]['findAll']({'raw':!![]});}return null;})[_0xa3f8('0x2b')](function(_0x286490){if(_0x286490){_0x6ef1ad=_['keyBy'](_0x286490,'id');var _0x16e98d;var _0x3be5c9=squel['select']();_0x3be5c9[_0xa3f8('0x78')](_0x1669be[_0xa3f8('0x79')]);for(var _0x5260e0=0x0;_0x5260e0<_0x4f248f[_0xa3f8('0x6d')];_0x5260e0+=0x1){_0x16e98d=_0x4f248f[_0x5260e0][_0xa3f8('0x7a')]?_0x6ef1ad[_0x4f248f[_0x5260e0]['MetricId']][_0xa3f8('0x8f')]:_0x4f248f[_0x5260e0][_0xa3f8('0x70')];_0x16e98d=_0x4f248f[_0x5260e0]['function']?_['replace'](_0x15a11c[_0x4f248f[_0x5260e0][_0xa3f8('0x7b')]],'%s',_0x16e98d):_0x16e98d;_0x16e98d=_0x4f248f[_0x5260e0][_0xa3f8('0x7d')]?_[_0xa3f8('0x7c')](_0x481b70[_0x4f248f[_0x5260e0]['format']],'%s',_0x16e98d):_0x16e98d;if(_0x4f248f[_0x5260e0]['groupBy']){_0x3be5c9[_0xa3f8('0x6f')](_0x16e98d);}_0x4f248f[_0x5260e0][_0xa3f8('0x7f')]&&_0x3be5c9['order'](_0x16e98d,_0x4f248f[_0x5260e0][_0xa3f8('0x7f')]==='DESC'?![]:!![]);_0x3be5c9[_0xa3f8('0x70')](_0x16e98d,_0x4f248f[_0x5260e0]['alias']||_0x16e98d);}if(_0x1669be[_0xa3f8('0x81')]){_0x1669be['joins']=JSON['parse'](_0x1669be[_0xa3f8('0x81')]);for(var _0x5ac693=0x0;_0x5ac693<_0x1669be[_0xa3f8('0x81')][_0xa3f8('0x6d')];_0x5ac693+=0x1){if(_0x1669be[_0xa3f8('0x81')][_0x5ac693][_0xa3f8('0x37')]&&_[_0xa3f8('0x68')](_0x1f21a2,_0x1669be[_0xa3f8('0x81')][_0x5ac693][_0xa3f8('0x37')])&&_0x1669be[_0xa3f8('0x81')][_0x5ac693][_0xa3f8('0x83')]&&_0x1669be['joins'][_0x5ac693][_0xa3f8('0x84')]&&_0x1669be[_0xa3f8('0x81')][_0x5ac693][_0xa3f8('0x85')]){_0x3be5c9[_0x1669be[_0xa3f8('0x81')][_0x5ac693][_0xa3f8('0x37')]](_0x1669be[_0xa3f8('0x81')][_0x5ac693][_0xa3f8('0x84')],null,util[_0xa3f8('0x7d')](_0xa3f8('0xa9'),_0x1669be[_0xa3f8('0x79')],_0x1669be[_0xa3f8('0x81')][_0x5ac693][_0xa3f8('0x83')],_0x1669be[_0xa3f8('0x81')][_0x5ac693]['foreignTable'],_0x1669be[_0xa3f8('0x81')][_0x5ac693][_0xa3f8('0x85')]));}}}if(_0x1669be[_0xa3f8('0x86')]){_0x1669be[_0xa3f8('0x86')]=JSON[_0xa3f8('0x82')](_0x1669be[_0xa3f8('0x86')]);_0x3be5c9['where'](_0x4670cc(_0x1669be[_0xa3f8('0x86')][_0xa3f8('0x6f')]));}_0x31d45c=_0x3be5c9[_0xa3f8('0x91')]();_0x3be5c9[_0xa3f8('0x22')](_0x18ab67);_0x3be5c9[_0xa3f8('0x20')](0x0);logger[_0xa3f8('0xaa')](_0xa3f8('0x87'),_0x3be5c9[_0xa3f8('0x89')]());return dbH[_0xa3f8('0x88')][_0xa3f8('0x3e')](_0x3be5c9[_0xa3f8('0x89')](),{'type':dbH[_0xa3f8('0x88')][_0xa3f8('0xa6')][_0xa3f8('0x8a')]});}})[_0xa3f8('0x2b')](function(){return{'sql':_0x31d45c[_0xa3f8('0x89')]()};})[_0xa3f8('0x2b')](respondWithResult(_0x2c9db8,null))[_0xa3f8('0x4a')](handleError(_0x2c9db8,null));};
\ No newline at end of file
+var _0x1967=['conditions','clone','debug','Limited\x20Query:','toString','sequelize','QueryTypes','SELECT','SUM(%s)','GROUP_CONCAT(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','IS\x20NOT\x20NULL','table','web','%s-%s.%s','randomstring','output','default','AnalyticExtractedReport','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','fork','../../components/export/','../../files/reports','savename','countTable','COUNT(*)','runReport','select','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','dbH','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','reject','update','then','destroy','get','stack','name','send','index','map','AnalyticDefaultReport','rawAttributes','fieldName','type','key','model','keys','filters','intersection','query','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','where','merge','VIRTUAL','filter','options','includeAll','findAll','rows','show','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Reports','UserProfileSection','find','userProfileId','autoAssociation','UserProfileResource','DefaultReports','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','join','left_join','right_join','cross_join','COUNT(%s)','COUNT(DISTINCT\x20%s)','MAX(%s)','MIN(%s)','AVG(%s)','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\x20EMPTY','IS\x20NOT\x20EMPTY','rules','operator','group','field','condition','value','getFields','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','keyBy','from','MetricId','metric','function','replace','format','groupBy','orderBy','DESC','alias','joins','parse','foreignTable','%s.%s\x20=\x20%s.%s','parentKey','foreignKey'];(function(_0x16f668,_0x41806c){var _0x264307=function(_0x4c3706){while(--_0x4c3706){_0x16f668['push'](_0x16f668['shift']());}};_0x264307(++_0x41806c);}(_0x1967,0x173));var _0x7196=function(_0x4256ec,_0x289a7){_0x4256ec=_0x4256ec-0x0;var _0xcc560b=_0x1967[_0x4256ec];return _0xcc560b;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x7196('0x0'));var zipdir=require(_0x7196('0x1'));var jsonpatch=require(_0x7196('0x2'));var rp=require(_0x7196('0x3'));var moment=require(_0x7196('0x4'));var BPromise=require(_0x7196('0x5'));var Mustache=require(_0x7196('0x6'));var util=require(_0x7196('0x7'));var path=require(_0x7196('0x8'));var sox=require(_0x7196('0x9'));var csv=require('to-csv');var ejs=require(_0x7196('0xa'));var fs=require('fs');var fs_extra=require(_0x7196('0xb'));var _=require(_0x7196('0xc'));var squel=require(_0x7196('0xd'));var crypto=require(_0x7196('0xe'));var jsforce=require(_0x7196('0xf'));var deskjs=require('desk.js');var toCsv=require(_0x7196('0x10'));var querystring=require(_0x7196('0x11'));var Papa=require(_0x7196('0x12'));var Redis=require(_0x7196('0x13'));var authService=require(_0x7196('0x14'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x7196('0x15'));var logger=require(_0x7196('0x16'))(_0x7196('0x17'));var utils=require(_0x7196('0x18'));var config=require(_0x7196('0x19'));var licenseUtil=require(_0x7196('0x1a'));var db=require(_0x7196('0x1b'))['db'];var dbH=require(_0x7196('0x1b'))[_0x7196('0x1c')];function respondWithStatusCode(_0xba707b,_0x154101){_0x154101=_0x154101||0xcc;return function(_0x4e8c4c){if(_0x4e8c4c){return _0xba707b[_0x7196('0x1d')](_0x154101);}return _0xba707b[_0x7196('0x1e')](_0x154101)[_0x7196('0x1f')]();};}function respondWithResult(_0xf098c1,_0x511aa1){_0x511aa1=_0x511aa1||0xc8;return function(_0x31c778){if(_0x31c778){return _0xf098c1['status'](_0x511aa1)[_0x7196('0x20')](_0x31c778);}};}function respondWithFilteredResult(_0x2590a6,_0xf7e97){return function(_0x3ed1ad){if(_0x3ed1ad){var _0x12dce7=typeof _0xf7e97[_0x7196('0x21')]===_0x7196('0x22')&&typeof _0xf7e97[_0x7196('0x23')]===_0x7196('0x22');var _0x32fe2b=_0x3ed1ad[_0x7196('0x24')];var _0x5b716a=_0x12dce7?0x0:_0xf7e97['offset'];var _0x448f13=_0x12dce7?_0x3ed1ad[_0x7196('0x24')]:_0xf7e97[_0x7196('0x21')]+_0xf7e97['limit'];var _0x39b944;if(_0x448f13>=_0x32fe2b){_0x448f13=_0x32fe2b;_0x39b944=0xc8;}else{_0x39b944=0xce;}_0x2590a6['status'](_0x39b944);return _0x2590a6['set'](_0x7196('0x25'),_0x5b716a+'-'+_0x448f13+'/'+_0x32fe2b)[_0x7196('0x20')](_0x3ed1ad);}return null;};}function patchUpdates(_0x8dee9d){return function(_0x4ddf78){try{jsonpatch['apply'](_0x4ddf78,_0x8dee9d,!![]);}catch(_0x38d291){return BPromise[_0x7196('0x26')](_0x38d291);}return _0x4ddf78['save']();};}function saveUpdates(_0x18649b,_0x27ff84){return function(_0x6e22e5){if(_0x6e22e5){return _0x6e22e5[_0x7196('0x27')](_0x18649b)[_0x7196('0x28')](function(_0x549f34){return _0x549f34;});}return null;};}function removeEntity(_0x3f8178,_0x520d01){return function(_0x3ce9a0){if(_0x3ce9a0){return _0x3ce9a0[_0x7196('0x29')]()[_0x7196('0x28')](function(){var _0xa69810=_0x3ce9a0[_0x7196('0x2a')]({'plain':!![]});var _0x43f6a2='DefaultReports';return db['UserProfileResource'][_0x7196('0x29')]({'where':{'type':_0x43f6a2,'resourceId':_0xa69810['id']}})[_0x7196('0x28')](function(){return _0x3ce9a0;});})[_0x7196('0x28')](function(){_0x3f8178['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x41cfd2,_0x162cfc){return function(_0x675e64){if(!_0x675e64){_0x41cfd2['sendStatus'](0x194);}return _0x675e64;};}function handleError(_0x35eef9,_0x4ecea1){_0x4ecea1=_0x4ecea1||0x1f4;return function(_0x4fd339){logger['error'](_0x4fd339[_0x7196('0x2b')]);if(_0x4fd339[_0x7196('0x2c')]){delete _0x4fd339[_0x7196('0x2c')];}_0x35eef9['status'](_0x4ecea1)[_0x7196('0x2d')](_0x4fd339);};}exports[_0x7196('0x2e')]=function(_0x2f9583,_0xf999e9){var _0x50c386={},_0x39710d={},_0x429160={'count':0x0,'rows':[]};var _0xd07f22=_[_0x7196('0x2f')](db[_0x7196('0x30')][_0x7196('0x31')],function(_0x15c5f0){return{'name':_0x15c5f0[_0x7196('0x32')],'type':_0x15c5f0[_0x7196('0x33')][_0x7196('0x34')]};});_0x39710d[_0x7196('0x35')]=_['map'](_0xd07f22,_0x7196('0x2c'));_0x39710d['query']=_[_0x7196('0x36')](_0x2f9583['query']);_0x39710d[_0x7196('0x37')]=_[_0x7196('0x38')](_0x39710d['model'],_0x39710d[_0x7196('0x39')]);_0x50c386[_0x7196('0x3a')]=_[_0x7196('0x38')](_0x39710d[_0x7196('0x35')],qs[_0x7196('0x3b')](_0x2f9583['query'][_0x7196('0x3b')]));_0x50c386[_0x7196('0x3a')]=_0x50c386[_0x7196('0x3a')][_0x7196('0x3c')]?_0x50c386[_0x7196('0x3a')]:_0x39710d[_0x7196('0x35')];if(!_0x2f9583['query'][_0x7196('0x3d')](_0x7196('0x3e'))){_0x50c386[_0x7196('0x23')]=qs['limit'](_0x2f9583[_0x7196('0x39')][_0x7196('0x23')]);_0x50c386[_0x7196('0x21')]=qs[_0x7196('0x21')](_0x2f9583[_0x7196('0x39')][_0x7196('0x21')]);}_0x50c386[_0x7196('0x3f')]=qs[_0x7196('0x40')](_0x2f9583[_0x7196('0x39')][_0x7196('0x40')]);_0x50c386['where']=qs[_0x7196('0x37')](_[_0x7196('0x41')](_0x2f9583['query'],_0x39710d[_0x7196('0x37')]),_0xd07f22);if(_0x2f9583['query']['filter']){_0x50c386[_0x7196('0x42')]=_[_0x7196('0x43')](_0x50c386['where'],{'$or':_['map'](_0xd07f22,function(_0x1bad95){if(_0x1bad95[_0x7196('0x33')]!==_0x7196('0x44')){var _0x4c2341={};_0x4c2341[_0x1bad95[_0x7196('0x2c')]]={'$like':'%'+_0x2f9583[_0x7196('0x39')][_0x7196('0x45')]+'%'};return _0x4c2341;}})});}_0x50c386=_[_0x7196('0x43')]({},_0x50c386,_0x2f9583[_0x7196('0x46')]);var _0x428d76={'where':_0x50c386[_0x7196('0x42')]};return db[_0x7196('0x30')]['count'](_0x428d76)[_0x7196('0x28')](function(_0xa852e1){_0x429160['count']=_0xa852e1;if(_0x2f9583[_0x7196('0x39')][_0x7196('0x47')]){_0x50c386['include']=[{'all':!![]}];}return db[_0x7196('0x30')][_0x7196('0x48')](_0x50c386);})[_0x7196('0x28')](function(_0x5749e2){_0x429160[_0x7196('0x49')]=_0x5749e2;return _0x429160;})[_0x7196('0x28')](respondWithFilteredResult(_0xf999e9,_0x50c386))['catch'](handleError(_0xf999e9,null));};exports[_0x7196('0x4a')]=function(_0x1a7052,_0x4f0c6c){var _0x335e6f={'raw':!![],'where':{'id':_0x1a7052['params']['id']}},_0x53a5e6={};_0x53a5e6['model']=_['keys'](db['AnalyticDefaultReport'][_0x7196('0x31')]);_0x53a5e6['query']=_[_0x7196('0x36')](_0x1a7052[_0x7196('0x39')]);_0x53a5e6[_0x7196('0x37')]=_[_0x7196('0x38')](_0x53a5e6['model'],_0x53a5e6[_0x7196('0x39')]);_0x335e6f['attributes']=_[_0x7196('0x38')](_0x53a5e6[_0x7196('0x35')],qs[_0x7196('0x3b')](_0x1a7052['query'][_0x7196('0x3b')]));_0x335e6f[_0x7196('0x3a')]=_0x335e6f[_0x7196('0x3a')]['length']?_0x335e6f['attributes']:_0x53a5e6[_0x7196('0x35')];if(_0x1a7052['query'][_0x7196('0x47')]){_0x335e6f['include']=[{'all':!![]}];}_0x335e6f=_['merge']({},_0x335e6f,_0x1a7052[_0x7196('0x46')]);return db['AnalyticDefaultReport']['find'](_0x335e6f)['then'](handleEntityNotFound(_0x4f0c6c,null))[_0x7196('0x28')](respondWithResult(_0x4f0c6c,null))['catch'](handleError(_0x4f0c6c,null));};exports['create']=function(_0x28591e,_0x182c8b){return db[_0x7196('0x30')][_0x7196('0x4b')](_0x28591e['body'],{})[_0x7196('0x28')](function(_0x564688){var _0x36844f=_0x28591e[_0x7196('0x4c')]['get']({'plain':!![]});if(!_0x36844f)throw new Error(_0x7196('0x4d'));if(_0x36844f[_0x7196('0x4e')]===_0x7196('0x4c')){var _0x4fa18f=_0x564688[_0x7196('0x2a')]({'plain':!![]});var _0x5d51aa=_0x7196('0x4f');return db[_0x7196('0x50')][_0x7196('0x51')]({'where':{'name':_0x5d51aa,'userProfileId':_0x36844f[_0x7196('0x52')]},'raw':!![]})[_0x7196('0x28')](function(_0x19733a){if(_0x19733a&&_0x19733a[_0x7196('0x53')]===0x0){return db[_0x7196('0x54')]['create']({'name':_0x4fa18f['name'],'resourceId':_0x4fa18f['id'],'type':_0x7196('0x55'),'sectionId':_0x19733a['id']},{})[_0x7196('0x28')](function(){return _0x564688;});}else{return _0x564688;}})[_0x7196('0x56')](function(_0xe4b032){logger['error'](_0x7196('0x57'),_0xe4b032);throw _0xe4b032;});}return _0x564688;})[_0x7196('0x28')](respondWithResult(_0x182c8b,0xc9))[_0x7196('0x56')](handleError(_0x182c8b,null));};exports[_0x7196('0x27')]=function(_0x9fcfd4,_0x3177c2){if(_0x9fcfd4[_0x7196('0x58')]['id']){delete _0x9fcfd4[_0x7196('0x58')]['id'];}return db[_0x7196('0x30')][_0x7196('0x51')]({'where':{'id':_0x9fcfd4[_0x7196('0x59')]['id']}})['then'](handleEntityNotFound(_0x3177c2,null))[_0x7196('0x28')](saveUpdates(_0x9fcfd4[_0x7196('0x58')],null))[_0x7196('0x28')](respondWithResult(_0x3177c2,null))['catch'](handleError(_0x3177c2,null));};exports[_0x7196('0x29')]=function(_0x5ca1ca,_0x34407d){return db[_0x7196('0x30')][_0x7196('0x51')]({'where':{'id':_0x5ca1ca[_0x7196('0x59')]['id']}})[_0x7196('0x28')](handleEntityNotFound(_0x34407d,null))['then'](removeEntity(_0x34407d,null))[_0x7196('0x56')](handleError(_0x34407d,null));};exports['preview']=function(_0x4be36d,_0x5b9824){var _0x1bc358=0xa;var _0x3be180=[_0x7196('0x5a'),_0x7196('0x5b'),_0x7196('0x5c'),_0x7196('0x5d')];var _0x2d8b3d={'SUM':'SUM(%s)','COUNT':_0x7196('0x5e'),'COUNT DISTINCT':_0x7196('0x5f'),'MAX':_0x7196('0x60'),'MIN':_0x7196('0x61'),'AVG':_0x7196('0x62'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0x7196('0x63')};var _0x1c7eb2={'SEC_TO_TIME':_0x7196('0x64'),'DATE':_0x7196('0x65'),'HOUR':_0x7196('0x66'),'ROUND':_0x7196('0x67'),'UNIX_TIMESTAMP':_0x7196('0x68')};var _0x43ee13=function(_0x13e9d0){return!_[_0x7196('0x69')]([_0x7196('0x6a'),'IS\x20NOT\x20NULL',_0x7196('0x6b'),_0x7196('0x6c')],_0x13e9d0);};var _0x27d5d7=function(_0x33f43b){if(!_0x33f43b||!_0x33f43b['rules'][_0x7196('0x3c')]){return'';}for(var _0x204c3a='(',_0x1f3acc=0x0;_0x1f3acc<_0x33f43b[_0x7196('0x6d')][_0x7196('0x3c')];_0x1f3acc+=0x1){_0x1f3acc>0x0&&(_0x204c3a+='\x20'+_0x33f43b[_0x7196('0x6e')]+'\x20');_0x204c3a+=_0x33f43b[_0x7196('0x6d')][_0x1f3acc]['group']?_0x27d5d7(_0x33f43b[_0x7196('0x6d')][_0x1f3acc][_0x7196('0x6f')]):_0x33f43b[_0x7196('0x6d')][_0x1f3acc][_0x7196('0x70')]+'\x20'+_0x33f43b['rules'][_0x1f3acc][_0x7196('0x71')]+(_0x43ee13(_0x33f43b[_0x7196('0x6d')][_0x1f3acc][_0x7196('0x71')])?'\x20'+_0x33f43b[_0x7196('0x6d')][_0x1f3acc][_0x7196('0x72')]:'');}return _0x204c3a+')';};var _0x37c6be={'where':{'id':_0x4be36d['params']['id']}},_0x57065,_0x517dfb,_0x56b2eb,_0x56955e,_0x72f6f1;_0x37c6be=_[_0x7196('0x43')]({},_0x37c6be,_0x4be36d[_0x7196('0x46')]);return db[_0x7196('0x30')][_0x7196('0x51')](_0x37c6be)[_0x7196('0x28')](function(_0x30d44f){if(_0x30d44f){_0x57065=_0x30d44f;return _0x30d44f[_0x7196('0x73')]();}return null;})[_0x7196('0x28')](function(_0x3881a5){if(_0x3881a5){if(!_0x3881a5['length']){throw new db['Sequelize'][(_0x7196('0x74'))](_0x7196('0x75'),0x193);}_0x517dfb=_0x3881a5;return db[_0x7196('0x76')][_0x7196('0x48')]({'raw':!![]});}return null;})[_0x7196('0x28')](function(_0x45e21f){if(_0x45e21f){_0x56b2eb=_[_0x7196('0x77')](_0x45e21f,'id');var _0x2f36f8;var _0x4cc5e3=squel['select']();_0x4cc5e3[_0x7196('0x78')](_0x57065['table']);for(var _0x30d114=0x0;_0x30d114<_0x517dfb['length'];_0x30d114+=0x1){_0x2f36f8=_0x517dfb[_0x30d114][_0x7196('0x79')]?_0x56b2eb[_0x517dfb[_0x30d114][_0x7196('0x79')]][_0x7196('0x7a')]:_0x517dfb[_0x30d114][_0x7196('0x70')];_0x2f36f8=_0x517dfb[_0x30d114]['function']?_['replace'](_0x2d8b3d[_0x517dfb[_0x30d114][_0x7196('0x7b')]],'%s',_0x2f36f8):_0x2f36f8;_0x2f36f8=_0x517dfb[_0x30d114]['format']?_[_0x7196('0x7c')](_0x1c7eb2[_0x517dfb[_0x30d114][_0x7196('0x7d')]],'%s',_0x2f36f8):_0x2f36f8;if(_0x517dfb[_0x30d114][_0x7196('0x7e')]){_0x4cc5e3[_0x7196('0x6f')](_0x2f36f8);}_0x517dfb[_0x30d114][_0x7196('0x7f')]&&_0x4cc5e3[_0x7196('0x3f')](_0x2f36f8,_0x517dfb[_0x30d114]['orderBy']===_0x7196('0x80')?![]:!![]);_0x4cc5e3[_0x7196('0x70')](_0x2f36f8,_0x517dfb[_0x30d114][_0x7196('0x81')]||_0x2f36f8);}if(_0x57065[_0x7196('0x82')]){_0x57065[_0x7196('0x82')]=JSON[_0x7196('0x83')](_0x57065[_0x7196('0x82')]);for(var _0x473c0e=0x0;_0x473c0e<_0x57065[_0x7196('0x82')][_0x7196('0x3c')];_0x473c0e+=0x1){if(_0x57065[_0x7196('0x82')][_0x473c0e][_0x7196('0x33')]&&_['includes'](_0x3be180,_0x57065[_0x7196('0x82')][_0x473c0e][_0x7196('0x33')])&&_0x57065['joins'][_0x473c0e]['parentKey']&&_0x57065[_0x7196('0x82')][_0x473c0e][_0x7196('0x84')]&&_0x57065[_0x7196('0x82')][_0x473c0e]['foreignKey']){_0x4cc5e3[_0x57065[_0x7196('0x82')][_0x473c0e]['type']](_0x57065[_0x7196('0x82')][_0x473c0e][_0x7196('0x84')],null,util['format'](_0x7196('0x85'),_0x57065['table'],_0x57065['joins'][_0x473c0e][_0x7196('0x86')],_0x57065[_0x7196('0x82')][_0x473c0e][_0x7196('0x84')],_0x57065['joins'][_0x473c0e][_0x7196('0x87')]));}}}if(_0x57065['conditions']){_0x57065[_0x7196('0x88')]=JSON[_0x7196('0x83')](_0x57065[_0x7196('0x88')]);_0x4cc5e3[_0x7196('0x42')](_0x27d5d7(_0x57065[_0x7196('0x88')]['group']));}_0x72f6f1=_0x4cc5e3[_0x7196('0x89')]();_0x4cc5e3[_0x7196('0x23')](_0x1bc358);_0x4cc5e3[_0x7196('0x21')](0x0);logger[_0x7196('0x8a')](_0x7196('0x8b'),_0x4cc5e3[_0x7196('0x8c')]());return dbH[_0x7196('0x8d')][_0x7196('0x39')](_0x4cc5e3['toString'](),{'type':dbH[_0x7196('0x8d')][_0x7196('0x8e')][_0x7196('0x8f')]});}})[_0x7196('0x28')](respondWithResult(_0x5b9824,null))['catch'](handleError(_0x5b9824,null));};function runReport(_0x1364f5,_0x2cb53c,_0x4fe2cb){var _0x2e4807=_0x2cb53c['name'];var _0xd6d8cf=0xa;var _0x5318c1=[_0x7196('0x5a'),_0x7196('0x5b'),'right_join',_0x7196('0x5d')];var _0x2b52c0={'SUM':_0x7196('0x90'),'COUNT':'COUNT(%s)','COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0x7196('0x60'),'MIN':'MIN(%s)','AVG':'AVG(%s)','GROUP_CONCAT':_0x7196('0x91'),'GROUP_CONCAT ASC':_0x7196('0x92'),'GROUP_CONCAT DESC':_0x7196('0x63')};var _0x509c4a={'SEC_TO_TIME':_0x7196('0x64'),'DATE':_0x7196('0x65'),'HOUR':_0x7196('0x66'),'ROUND':_0x7196('0x67'),'UNIX_TIMESTAMP':_0x7196('0x68')};var _0x26048c=function(_0x1a4d17){return!_[_0x7196('0x69')]([_0x7196('0x6a'),_0x7196('0x93'),_0x7196('0x6b'),'IS\x20NOT\x20EMPTY'],_0x1a4d17);};var _0x5acff1=function(_0x32ab6c){if(!_0x32ab6c||!_0x32ab6c['rules']['length']){return'';}for(var _0x2bfdc4='(',_0x1604fa=0x0;_0x1604fa<_0x32ab6c[_0x7196('0x6d')][_0x7196('0x3c')];_0x1604fa+=0x1){_0x1604fa>0x0&&(_0x2bfdc4+='\x20'+_0x32ab6c['operator']+'\x20');_0x2bfdc4+=_0x32ab6c['rules'][_0x1604fa][_0x7196('0x6f')]?_0x5acff1(_0x32ab6c[_0x7196('0x6d')][_0x1604fa][_0x7196('0x6f')]):_0x32ab6c[_0x7196('0x6d')][_0x1604fa]['field']+'\x20'+_0x32ab6c[_0x7196('0x6d')][_0x1604fa]['condition']+(_0x26048c(_0x32ab6c['rules'][_0x1604fa][_0x7196('0x71')])?'\x20'+_0x32ab6c[_0x7196('0x6d')][_0x1604fa][_0x7196('0x72')]:'');}return _0x2bfdc4+')';};var _0x494418={'where':{'id':_0x1364f5['id']}},_0x400aa5,_0x40d4c3,_0x1824e2,_0x30c54b,_0x10712f;_0x494418=_[_0x7196('0x43')]({},_0x494418,_0x4fe2cb);return db[_0x7196('0x30')][_0x7196('0x51')](_0x494418)['then'](function(_0x9bd2ea){if(_0x9bd2ea){_0x400aa5=_0x9bd2ea;return _0x9bd2ea[_0x7196('0x73')]();}return null;})[_0x7196('0x28')](function(_0x408760){if(_0x408760){if(!_0x408760[_0x7196('0x3c')]){throw new db['Sequelize'][(_0x7196('0x74'))](_0x7196('0x75'),0x193);}_0x40d4c3=_0x408760;return db[_0x7196('0x76')]['findAll']({'raw':!![]});}return null;})[_0x7196('0x28')](function(_0x4b98de){if(_0x4b98de){_0x1824e2=_['keyBy'](_0x4b98de,'id');var _0x1dcf93;var _0x25d323=squel['select']();_0x25d323[_0x7196('0x78')](_0x400aa5[_0x7196('0x94')]);for(var _0x48ceda=0x0;_0x48ceda<_0x40d4c3[_0x7196('0x3c')];_0x48ceda+=0x1){_0x1dcf93=_0x40d4c3[_0x48ceda][_0x7196('0x79')]?_0x1824e2[_0x40d4c3[_0x48ceda][_0x7196('0x79')]][_0x7196('0x7a')]:_0x40d4c3[_0x48ceda][_0x7196('0x70')];_0x1dcf93=_0x40d4c3[_0x48ceda][_0x7196('0x7b')]?_['replace'](_0x2b52c0[_0x40d4c3[_0x48ceda][_0x7196('0x7b')]],'%s',_0x1dcf93):_0x1dcf93;_0x1dcf93=_0x40d4c3[_0x48ceda][_0x7196('0x7d')]?_[_0x7196('0x7c')](_0x509c4a[_0x40d4c3[_0x48ceda]['format']],'%s',_0x1dcf93):_0x1dcf93;if(_0x40d4c3[_0x48ceda]['groupBy']){_0x25d323['group'](_0x1dcf93);}_0x40d4c3[_0x48ceda][_0x7196('0x7f')]&&_0x25d323[_0x7196('0x3f')](_0x1dcf93,_0x40d4c3[_0x48ceda][_0x7196('0x7f')]==='DESC'?![]:!![]);_0x25d323[_0x7196('0x70')](_0x1dcf93,_0x40d4c3[_0x48ceda]['alias']||_0x1dcf93);}if(_0x400aa5[_0x7196('0x82')]){_0x400aa5['joins']=JSON[_0x7196('0x83')](_0x400aa5[_0x7196('0x82')]);for(var _0x33d5bf=0x0;_0x33d5bf<_0x400aa5[_0x7196('0x82')][_0x7196('0x3c')];_0x33d5bf+=0x1){if(_0x400aa5[_0x7196('0x82')][_0x33d5bf][_0x7196('0x33')]&&_['includes'](_0x5318c1,_0x400aa5[_0x7196('0x82')][_0x33d5bf]['type'])&&_0x400aa5['joins'][_0x33d5bf]['parentKey']&&_0x400aa5['joins'][_0x33d5bf]['foreignTable']&&_0x400aa5[_0x7196('0x82')][_0x33d5bf][_0x7196('0x87')]){_0x25d323[_0x400aa5[_0x7196('0x82')][_0x33d5bf]['type']](_0x400aa5[_0x7196('0x82')][_0x33d5bf]['foreignTable'],null,util['format']('%s.%s\x20=\x20%s.%s',_0x400aa5[_0x7196('0x94')],_0x400aa5['joins'][_0x33d5bf][_0x7196('0x86')],_0x400aa5[_0x7196('0x82')][_0x33d5bf][_0x7196('0x84')],_0x400aa5[_0x7196('0x82')][_0x33d5bf][_0x7196('0x87')]));}}}if(_0x400aa5[_0x7196('0x88')]){_0x400aa5[_0x7196('0x88')]=JSON[_0x7196('0x83')](_0x400aa5['conditions']);_0x25d323[_0x7196('0x42')](_0x5acff1(_0x400aa5[_0x7196('0x88')][_0x7196('0x6f')]));}_0x10712f=_0x25d323['clone']();_0x25d323[_0x7196('0x23')](_0xd6d8cf);_0x25d323[_0x7196('0x21')](0x0);return;}})[_0x7196('0x28')](function(){if(_0x2cb53c['output']===_0x7196('0x95')){return null;}var _0x46a563=_[_0x7196('0x43')](_0x2cb53c,{'name':_0x2cb53c['fullPath']||_0x2cb53c[_0x7196('0x2c')]||_0x400aa5[_0x7196('0x2c')],'basename':_0x2e4807,'savename':util['format'](_0x7196('0x96'),_0x2cb53c['name']||_0x400aa5[_0x7196('0x2c')],require(_0x7196('0x97'))['generate'](0x4),_0x2cb53c[_0x7196('0x98')]||'csv'),'reportId':_0x400aa5['id'],'reportType':_0x7196('0x99')});return db[_0x7196('0x9a')][_0x7196('0x4b')](_0x46a563,{'raw':!![]});})['then'](function(_0xd9619d){if(_0x400aa5[_0x7196('0x94')]===_0x7196('0x9b')){_0x10712f[_0x7196('0x42')](_0x400aa5['table']+_0x7196('0x9c'),_0x2cb53c[_0x7196('0x9d')],_0x2cb53c[_0x7196('0x9e')]);}else{_0x10712f['where'](_0x400aa5['table']+_0x7196('0x9f'),_0x2cb53c[_0x7196('0x9d')],_0x2cb53c[_0x7196('0x9e')]);}if(_0xd9619d){logger[_0x7196('0xa0')]('Run\x20Query:',_0x10712f[_0x7196('0x8c')]());require('child_process')[_0x7196('0xa1')](path['join'](__dirname,_0x7196('0xa2'),_0xd9619d[_0x7196('0x98')]),[_0xd9619d['id'],_0x10712f[_0x7196('0x8c')](),path[_0x7196('0x5a')](__dirname,_0x7196('0xa3'),_0xd9619d[_0x7196('0xa4')]),_0x2e4807]);return _0xd9619d;}else{var _0x342fb1=squel['select']();_0x342fb1[_0x7196('0x78')]('('+_0x10712f[_0x7196('0x8c')]()+')',_0x7196('0xa5'));_0x342fb1[_0x7196('0x70')](_0x7196('0xa6'),_0x7196('0x24'));_0x10712f[_0x7196('0x23')](_0x2cb53c[_0x7196('0x23')]||_0xd6d8cf);_0x10712f['offset'](_0x2cb53c[_0x7196('0x21')]||0x0);return dbH[_0x7196('0x8d')]['query'](_0x342fb1[_0x7196('0x8c')](),{'type':dbH[_0x7196('0x8d')]['QueryTypes'][_0x7196('0x8f')]})[_0x7196('0x28')](function(_0xdf1ede){if(!_0xdf1ede[_0x7196('0x3c')]){_0x30c54b=0x0;}else{_0x30c54b=_0xdf1ede[0x0]['count']||0x0;}return dbH['sequelize'][_0x7196('0x39')](_0x10712f['toString'](),{'type':dbH[_0x7196('0x8d')][_0x7196('0x8e')][_0x7196('0x8f')]});})[_0x7196('0x28')](function(_0x2df80a){return{'rows':_0x2df80a||[],'count':_0x30c54b};});}});}exports['run']=function(_0x392e74,_0x17ba6d){return runReport(_0x392e74[_0x7196('0x59')],_0x392e74[_0x7196('0x39')],_0x392e74[_0x7196('0x46')])[_0x7196('0x28')](respondWithResult(_0x17ba6d,null))[_0x7196('0x56')](handleError(_0x17ba6d,null));};exports[_0x7196('0xa7')]=runReport;exports[_0x7196('0x39')]=function(_0x5a3c87,_0x58fb86){var _0x51da79=0xa;var _0x144613=[_0x7196('0x5a'),_0x7196('0x5b'),_0x7196('0x5c'),_0x7196('0x5d')];var _0x9055af={'SUM':_0x7196('0x90'),'COUNT':_0x7196('0x5e'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':'MAX(%s)','MIN':'MIN(%s)','AVG':'AVG(%s)','GROUP_CONCAT':_0x7196('0x91'),'GROUP_CONCAT ASC':_0x7196('0x92'),'GROUP_CONCAT DESC':_0x7196('0x63')};var _0xab9595={'SEC_TO_TIME':_0x7196('0x64'),'DATE':_0x7196('0x65'),'HOUR':'HOUR(%s)','ROUND':_0x7196('0x67'),'UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x5236a0=function(_0x520fe8){return!_['includes'](['IS\x20NULL',_0x7196('0x93'),'IS\x20EMPTY',_0x7196('0x6c')],_0x520fe8);};var _0x425a57=function(_0x302728){if(!_0x302728||!_0x302728[_0x7196('0x6d')][_0x7196('0x3c')]){return'';}for(var _0x14492e='(',_0x58df43=0x0;_0x58df43<_0x302728[_0x7196('0x6d')][_0x7196('0x3c')];_0x58df43+=0x1){_0x58df43>0x0&&(_0x14492e+='\x20'+_0x302728[_0x7196('0x6e')]+'\x20');_0x14492e+=_0x302728['rules'][_0x58df43][_0x7196('0x6f')]?_0x425a57(_0x302728[_0x7196('0x6d')][_0x58df43][_0x7196('0x6f')]):_0x302728['rules'][_0x58df43]['field']+'\x20'+_0x302728[_0x7196('0x6d')][_0x58df43][_0x7196('0x71')]+(_0x5236a0(_0x302728[_0x7196('0x6d')][_0x58df43][_0x7196('0x71')])?'\x20'+_0x302728[_0x7196('0x6d')][_0x58df43][_0x7196('0x72')]:'');}return _0x14492e+')';};var _0x1a8a5a={'where':{'id':_0x5a3c87[_0x7196('0x59')]['id']}},_0x2944e5,_0x3f9385,_0xbd94ef,_0x5d2a56,_0x2fb552;_0x1a8a5a=_['merge']({},_0x1a8a5a,_0x5a3c87[_0x7196('0x46')]);return db[_0x7196('0x30')]['find'](_0x1a8a5a)[_0x7196('0x28')](function(_0x386259){if(_0x386259){_0x2944e5=_0x386259;return _0x386259[_0x7196('0x73')]();}return null;})[_0x7196('0x28')](function(_0x1e7a64){if(_0x1e7a64){if(!_0x1e7a64[_0x7196('0x3c')]){throw new db['Sequelize']['ValidationErrorItem'](_0x7196('0x75'),0x193);}_0x3f9385=_0x1e7a64;return db['AnalyticMetric'][_0x7196('0x48')]({'raw':!![]});}return null;})[_0x7196('0x28')](function(_0x30db09){if(_0x30db09){_0xbd94ef=_['keyBy'](_0x30db09,'id');var _0x4729e1;var _0x66e1e6=squel[_0x7196('0xa8')]();_0x66e1e6[_0x7196('0x78')](_0x2944e5[_0x7196('0x94')]);for(var _0x1e2105=0x0;_0x1e2105<_0x3f9385[_0x7196('0x3c')];_0x1e2105+=0x1){_0x4729e1=_0x3f9385[_0x1e2105][_0x7196('0x79')]?_0xbd94ef[_0x3f9385[_0x1e2105][_0x7196('0x79')]]['metric']:_0x3f9385[_0x1e2105][_0x7196('0x70')];_0x4729e1=_0x3f9385[_0x1e2105][_0x7196('0x7b')]?_[_0x7196('0x7c')](_0x9055af[_0x3f9385[_0x1e2105][_0x7196('0x7b')]],'%s',_0x4729e1):_0x4729e1;_0x4729e1=_0x3f9385[_0x1e2105][_0x7196('0x7d')]?_[_0x7196('0x7c')](_0xab9595[_0x3f9385[_0x1e2105]['format']],'%s',_0x4729e1):_0x4729e1;if(_0x3f9385[_0x1e2105][_0x7196('0x7e')]){_0x66e1e6['group'](_0x4729e1);}_0x3f9385[_0x1e2105][_0x7196('0x7f')]&&_0x66e1e6[_0x7196('0x3f')](_0x4729e1,_0x3f9385[_0x1e2105][_0x7196('0x7f')]==='DESC'?![]:!![]);_0x66e1e6['field'](_0x4729e1,_0x3f9385[_0x1e2105][_0x7196('0x81')]||_0x4729e1);}if(_0x2944e5[_0x7196('0x82')]){_0x2944e5[_0x7196('0x82')]=JSON[_0x7196('0x83')](_0x2944e5[_0x7196('0x82')]);for(var _0x220315=0x0;_0x220315<_0x2944e5[_0x7196('0x82')][_0x7196('0x3c')];_0x220315+=0x1){if(_0x2944e5['joins'][_0x220315][_0x7196('0x33')]&&_[_0x7196('0x69')](_0x144613,_0x2944e5['joins'][_0x220315][_0x7196('0x33')])&&_0x2944e5[_0x7196('0x82')][_0x220315][_0x7196('0x86')]&&_0x2944e5['joins'][_0x220315][_0x7196('0x84')]&&_0x2944e5[_0x7196('0x82')][_0x220315][_0x7196('0x87')]){_0x66e1e6[_0x2944e5[_0x7196('0x82')][_0x220315][_0x7196('0x33')]](_0x2944e5['joins'][_0x220315]['foreignTable'],null,util[_0x7196('0x7d')](_0x7196('0x85'),_0x2944e5[_0x7196('0x94')],_0x2944e5[_0x7196('0x82')][_0x220315][_0x7196('0x86')],_0x2944e5[_0x7196('0x82')][_0x220315]['foreignTable'],_0x2944e5[_0x7196('0x82')][_0x220315][_0x7196('0x87')]));}}}if(_0x2944e5[_0x7196('0x88')]){_0x2944e5[_0x7196('0x88')]=JSON['parse'](_0x2944e5[_0x7196('0x88')]);_0x66e1e6[_0x7196('0x42')](_0x425a57(_0x2944e5[_0x7196('0x88')][_0x7196('0x6f')]));}_0x2fb552=_0x66e1e6[_0x7196('0x89')]();_0x66e1e6[_0x7196('0x23')](_0x51da79);_0x66e1e6[_0x7196('0x21')](0x0);logger[_0x7196('0x8a')](_0x7196('0x8b'),_0x66e1e6[_0x7196('0x8c')]());return dbH[_0x7196('0x8d')][_0x7196('0x39')](_0x66e1e6['toString'](),{'type':dbH[_0x7196('0x8d')]['QueryTypes'][_0x7196('0x8f')]});}})['then'](function(){return{'sql':_0x2fb552[_0x7196('0x8c')]()};})['then'](respondWithResult(_0x58fb86,null))[_0x7196('0x56')](handleError(_0x58fb86,null));};
\ No newline at end of file
index 53e8a9e..b46e833 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf0e3=['../../config/logger','api','../../config/environment','define','AnalyticDefaultReport','analytics_default_reports'];(function(_0x1b87cd,_0x57fb93){var _0x37dbc4=function(_0x4ea588){while(--_0x4ea588){_0x1b87cd['push'](_0x1b87cd['shift']());}};_0x37dbc4(++_0x57fb93);}(_0xf0e3,0x15c));var _0x3f0e=function(_0x12a4a8,_0x2310a6){_0x12a4a8=_0x12a4a8-0x0;var _0x5c2ddd=_0xf0e3[_0x12a4a8];return _0x5c2ddd;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x3f0e('0x0'))(_0x3f0e('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x3f0e('0x2'));var attributes=require('./analyticDefaultReport.attributes');module['exports']=function(_0x310073,_0x330200){return _0x310073[_0x3f0e('0x3')](_0x3f0e('0x4'),attributes,{'tableName':_0x3f0e('0x5'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x3a7d=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./analyticDefaultReport.attributes','exports','define','analytics_default_reports','lodash'];(function(_0x43a1b8,_0x1c90c8){var _0x324ecc=function(_0x53a93b){while(--_0x53a93b){_0x43a1b8['push'](_0x43a1b8['shift']());}};_0x324ecc(++_0x1c90c8);}(_0x3a7d,0x14f));var _0xd3a7=function(_0x485f2c,_0x431e8a){_0x485f2c=_0x485f2c-0x0;var _0x202011=_0x3a7d[_0x485f2c];return _0x202011;};'use strict';var _=require(_0xd3a7('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xd3a7('0x1'));var moment=require(_0xd3a7('0x2'));var BPromise=require(_0xd3a7('0x3'));var rp=require(_0xd3a7('0x4'));var fs=require('fs');var path=require(_0xd3a7('0x5'));var rimraf=require(_0xd3a7('0x6'));var config=require(_0xd3a7('0x7'));var attributes=require(_0xd3a7('0x8'));module[_0xd3a7('0x9')]=function(_0x25753e,_0xa5ea22){return _0x25753e[_0xd3a7('0xa')]('AnalyticDefaultReport',attributes,{'tableName':_0xd3a7('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 64045c6..d148ece 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x22cd=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','then','AnalyticDefaultReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticDefaultReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','lodash'];(function(_0xd0a847,_0x72562b){var _0x2536ec=function(_0x20e4db){while(--_0x20e4db){_0xd0a847['push'](_0xd0a847['shift']());}};_0x2536ec(++_0x72562b);}(_0x22cd,0xd1));var _0xd22c=function(_0x4ec9e3,_0x15fbf4){_0x4ec9e3=_0x4ec9e3-0x0;var _0x2883ce=_0x22cd[_0x4ec9e3];return _0x2883ce;};'use strict';var _=require(_0xd22c('0x0'));var util=require(_0xd22c('0x1'));var moment=require(_0xd22c('0x2'));var BPromise=require(_0xd22c('0x3'));var rs=require(_0xd22c('0x4'));var fs=require('fs');var Redis=require(_0xd22c('0x5'));var db=require(_0xd22c('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xd22c('0x7'));var config=require(_0xd22c('0x8'));var jayson=require(_0xd22c('0x9'));var client=jayson[_0xd22c('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4f79e1,_0x27bc0d,_0x567dfa){return new BPromise(function(_0x2007ab,_0x4b5ff0){return client['request'](_0x4f79e1,_0x567dfa)[_0xd22c('0xb')](function(_0xd605bd){logger['info'](_0xd22c('0xc'),_0x27bc0d,_0xd22c('0xd'));logger[_0xd22c('0xe')](_0xd22c('0xf'),_0x27bc0d,_0xd22c('0xd'),JSON[_0xd22c('0x10')](_0xd605bd));if(_0xd605bd[_0xd22c('0x11')]){if(_0xd605bd['error'][_0xd22c('0x12')]===0x1f4){logger[_0xd22c('0x11')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x27bc0d,_0xd605bd[_0xd22c('0x11')]['message']);return _0x4b5ff0(_0xd605bd[_0xd22c('0x11')][_0xd22c('0x13')]);}logger['error'](_0xd22c('0xc'),_0x27bc0d,_0xd605bd[_0xd22c('0x11')][_0xd22c('0x13')]);return _0x2007ab(_0xd605bd[_0xd22c('0x11')][_0xd22c('0x13')]);}else{logger[_0xd22c('0x14')](_0xd22c('0xc'),_0x27bc0d,_0xd22c('0xd'));_0x2007ab(_0xd605bd['result'][_0xd22c('0x13')]);}})['catch'](function(_0x315aa0){logger['error'](_0xd22c('0xc'),_0x27bc0d,_0x315aa0);_0x4b5ff0(_0x315aa0);});});}
\ No newline at end of file
+var _0x8505=['message','result','catch','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','AnalyticDefaultReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticDefaultReport,\x20%s,\x20%s,\x20%s','error'];(function(_0x2dde16,_0x14532e){var _0x2fb0f9=function(_0x329a6b){while(--_0x329a6b){_0x2dde16['push'](_0x2dde16['shift']());}};_0x2fb0f9(++_0x14532e);}(_0x8505,0x117));var _0x5850=function(_0x1f4f08,_0x16a037){_0x1f4f08=_0x1f4f08-0x0;var _0x44701c=_0x8505[_0x1f4f08];return _0x44701c;};'use strict';var _=require(_0x5850('0x0'));var util=require('util');var moment=require(_0x5850('0x1'));var BPromise=require('bluebird');var rs=require(_0x5850('0x2'));var fs=require('fs');var Redis=require(_0x5850('0x3'));var db=require(_0x5850('0x4'))['db'];var utils=require(_0x5850('0x5'));var logger=require(_0x5850('0x6'))(_0x5850('0x7'));var config=require(_0x5850('0x8'));var jayson=require(_0x5850('0x9'));var client=jayson[_0x5850('0xa')][_0x5850('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x575b70,_0xa1ca82,_0x2f805c){return new BPromise(function(_0x49f78b,_0x2f28ba){return client[_0x5850('0xc')](_0x575b70,_0x2f805c)[_0x5850('0xd')](function(_0x2f558d){logger[_0x5850('0xe')](_0x5850('0xf'),_0xa1ca82,_0x5850('0x10'));logger[_0x5850('0x11')](_0x5850('0x12'),_0xa1ca82,_0x5850('0x10'),JSON['stringify'](_0x2f558d));if(_0x2f558d['error']){if(_0x2f558d['error']['code']===0x1f4){logger[_0x5850('0x13')](_0x5850('0xf'),_0xa1ca82,_0x2f558d[_0x5850('0x13')][_0x5850('0x14')]);return _0x2f28ba(_0x2f558d[_0x5850('0x13')][_0x5850('0x14')]);}logger[_0x5850('0x13')](_0x5850('0xf'),_0xa1ca82,_0x2f558d['error'][_0x5850('0x14')]);return _0x49f78b(_0x2f558d[_0x5850('0x13')][_0x5850('0x14')]);}else{logger[_0x5850('0xe')]('AnalyticDefaultReport,\x20%s,\x20%s',_0xa1ca82,_0x5850('0x10'));_0x49f78b(_0x2f558d[_0x5850('0x15')]['message']);}})[_0x5850('0x16')](function(_0x242696){logger[_0x5850('0x13')](_0x5850('0xf'),_0xa1ca82,_0x242696);_0x2f28ba(_0x242696);});});}
\ No newline at end of file
index 80460c2..b2e17d4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x801f=['Router','../../components/auth/service','../../config/environment','./analyticDefaultReport.controller','get','index','/:id','show','/:id/preview','isAuthenticated','/:id/run','/:id/query','query','post','create','update','delete','destroy','exports','util'];(function(_0x3a175b,_0x505d13){var _0x9b84fa=function(_0x5533e1){while(--_0x5533e1){_0x3a175b['push'](_0x3a175b['shift']());}};_0x9b84fa(++_0x505d13);}(_0x801f,0x153));var _0xf801=function(_0x38441d,_0x12e5f5){_0x38441d=_0x38441d-0x0;var _0x23c0a0=_0x801f[_0x38441d];return _0x23c0a0;};'use strict';var multer=require('multer');var util=require(_0xf801('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0xf801('0x1')]();var fs_extra=require('fs-extra');var auth=require(_0xf801('0x2'));var interaction=require('../../components/interaction/service');var config=require(_0xf801('0x3'));var controller=require(_0xf801('0x4'));router[_0xf801('0x5')]('/',auth['isAuthenticated'](),controller[_0xf801('0x6')]);router['get'](_0xf801('0x7'),auth['isAuthenticated'](),controller[_0xf801('0x8')]);router[_0xf801('0x5')](_0xf801('0x9'),auth[_0xf801('0xa')](),controller['preview']);router[_0xf801('0x5')](_0xf801('0xb'),auth[_0xf801('0xa')](),controller['run']);router[_0xf801('0x5')](_0xf801('0xc'),auth[_0xf801('0xa')](),controller[_0xf801('0xd')]);router[_0xf801('0xe')]('/',auth[_0xf801('0xa')](),controller[_0xf801('0xf')]);router['put']('/:id',auth[_0xf801('0xa')](),controller[_0xf801('0x10')]);router[_0xf801('0x11')](_0xf801('0x7'),auth[_0xf801('0xa')](),controller[_0xf801('0x12')]);module[_0xf801('0x13')]=router;
\ No newline at end of file
+var _0x18e9=['put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/:id','/:id/preview','preview','/:id/run','run','/:id/query','post','create'];(function(_0x1ced7c,_0x7c55ad){var _0x511fb1=function(_0x41d0e7){while(--_0x41d0e7){_0x1ced7c['push'](_0x1ced7c['shift']());}};_0x511fb1(++_0x7c55ad);}(_0x18e9,0x1e5));var _0x918e=function(_0x34325b,_0x5e5afe){_0x34325b=_0x34325b-0x0;var _0x3da348=_0x18e9[_0x34325b];return _0x3da348;};'use strict';var multer=require(_0x918e('0x0'));var util=require(_0x918e('0x1'));var path=require(_0x918e('0x2'));var timeout=require(_0x918e('0x3'));var express=require(_0x918e('0x4'));var router=express['Router']();var fs_extra=require(_0x918e('0x5'));var auth=require(_0x918e('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x918e('0x7'));var controller=require('./analyticDefaultReport.controller');router[_0x918e('0x8')]('/',auth[_0x918e('0x9')](),controller[_0x918e('0xa')]);router['get'](_0x918e('0xb'),auth[_0x918e('0x9')](),controller['show']);router[_0x918e('0x8')](_0x918e('0xc'),auth[_0x918e('0x9')](),controller[_0x918e('0xd')]);router[_0x918e('0x8')](_0x918e('0xe'),auth[_0x918e('0x9')](),controller[_0x918e('0xf')]);router['get'](_0x918e('0x10'),auth[_0x918e('0x9')](),controller['query']);router[_0x918e('0x11')]('/',auth['isAuthenticated'](),controller[_0x918e('0x12')]);router[_0x918e('0x13')]('/:id',auth[_0x918e('0x9')](),controller[_0x918e('0x14')]);router[_0x918e('0x15')](_0x918e('0xb'),auth[_0x918e('0x9')](),controller[_0x918e('0x16')]);module[_0x918e('0x17')]=router;
\ No newline at end of file
index 212f8a1..949f3ac 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x12b2=['ENUM','pdf','xlsx','STRING','DATE','Loading','manual','scheduled','INTEGER','UNSIGNED','sequelize','moment'];(function(_0x3bf83f,_0x181cac){var _0x22c4a9=function(_0xb3ff0d){while(--_0xb3ff0d){_0x3bf83f['push'](_0x3bf83f['shift']());}};_0x22c4a9(++_0x181cac);}(_0x12b2,0xca));var _0x212b=function(_0x3fa2b3,_0xdf1df5){_0x3fa2b3=_0x3fa2b3-0x0;var _0x14cf1a=_0x12b2[_0x3fa2b3];return _0x14cf1a;};'use strict';var Sequelize=require(_0x212b('0x0'));var moment=require(_0x212b('0x1'));module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![]},'basename':{'type':Sequelize['STRING'],'allowNull':![]},'output':{'type':Sequelize[_0x212b('0x2')]('csv',_0x212b('0x3'),_0x212b('0x4')),'allowNull':![],'defaultValue':'csv'},'savename':{'type':Sequelize[_0x212b('0x5')],'allowNull':![]},'startDate':{'type':Sequelize[_0x212b('0x6')]},'endDate':{'type':Sequelize[_0x212b('0x6')]},'status':{'type':Sequelize[_0x212b('0x5')],'defaultValue':_0x212b('0x7')},'type':{'type':Sequelize['ENUM'](_0x212b('0x8'),_0x212b('0x9')),'allowNull':![],'defaultValue':_0x212b('0x8')},'reportId':{'type':Sequelize[_0x212b('0xa')](0xb)[_0x212b('0xb')]},'reportType':{'type':Sequelize[_0x212b('0x5')]}};
\ No newline at end of file
+var _0x0ffc=['xlsx','DATE','Loading','ENUM','manual','scheduled','INTEGER','sequelize','exports','STRING','pdf'];(function(_0x405bed,_0x2376c7){var _0x497d26=function(_0x575eb7){while(--_0x575eb7){_0x405bed['push'](_0x405bed['shift']());}};_0x497d26(++_0x2376c7);}(_0x0ffc,0x193));var _0xc0ff=function(_0x52efad,_0x567969){_0x52efad=_0x52efad-0x0;var _0x7681be=_0x0ffc[_0x52efad];return _0x7681be;};'use strict';var Sequelize=require(_0xc0ff('0x0'));var moment=require('moment');module[_0xc0ff('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'basename':{'type':Sequelize[_0xc0ff('0x2')],'allowNull':![]},'output':{'type':Sequelize['ENUM']('csv',_0xc0ff('0x3'),_0xc0ff('0x4')),'allowNull':![],'defaultValue':'csv'},'savename':{'type':Sequelize[_0xc0ff('0x2')],'allowNull':![]},'startDate':{'type':Sequelize[_0xc0ff('0x5')]},'endDate':{'type':Sequelize[_0xc0ff('0x5')]},'status':{'type':Sequelize[_0xc0ff('0x2')],'defaultValue':_0xc0ff('0x6')},'type':{'type':Sequelize[_0xc0ff('0x7')](_0xc0ff('0x8'),_0xc0ff('0x9')),'allowNull':![],'defaultValue':'manual'},'reportId':{'type':Sequelize[_0xc0ff('0xa')](0xb)['UNSIGNED']},'reportType':{'type':Sequelize[_0xc0ff('0x2')]}};
\ No newline at end of file
index 31822d4..545c7fa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7075=['apply','reject','save','update','destroy','then','get','UserProfileResource','sendStatus','error','stack','name','send','index','map','type','key','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','AnalyticExtractedReport','includeAll','rows','catch','show','include','options','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','ExtractedReports','UserProfileSection','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','savename','output','existsSync','join','server/files/reports','Sequelize','ValidationError','Report\x20not\x20found\x20or\x20empty','exists','download','format','toLowerCase','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','status','end','json','offset','undefined','limit','count','set'];(function(_0x158799,_0x24658b){var _0x222f58=function(_0x837b06){while(--_0x837b06){_0x158799['push'](_0x158799['shift']());}};_0x222f58(++_0x24658b);}(_0x7075,0xa2));var _0x5707=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0x7075[_0x4565bf];return _0x5610ba;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x5707('0x0'));var zipdir=require(_0x5707('0x1'));var jsonpatch=require(_0x5707('0x2'));var rp=require(_0x5707('0x3'));var moment=require('moment');var BPromise=require(_0x5707('0x4'));var Mustache=require(_0x5707('0x5'));var util=require(_0x5707('0x6'));var path=require(_0x5707('0x7'));var sox=require(_0x5707('0x8'));var csv=require(_0x5707('0x9'));var ejs=require(_0x5707('0xa'));var fs=require('fs');var fs_extra=require(_0x5707('0xb'));var _=require(_0x5707('0xc'));var squel=require(_0x5707('0xd'));var crypto=require('crypto');var jsforce=require(_0x5707('0xe'));var deskjs=require(_0x5707('0xf'));var toCsv=require(_0x5707('0x9'));var querystring=require('querystring');var Papa=require(_0x5707('0x10'));var Redis=require(_0x5707('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x5707('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x5707('0x13'));var logger=require(_0x5707('0x14'))('api');var utils=require(_0x5707('0x15'));var config=require(_0x5707('0x16'));var licenseUtil=require(_0x5707('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x28d97c,_0x20f616){_0x20f616=_0x20f616||0xcc;return function(_0xf4d8cc){if(_0xf4d8cc){return _0x28d97c['sendStatus'](_0x20f616);}return _0x28d97c[_0x5707('0x18')](_0x20f616)[_0x5707('0x19')]();};}function respondWithResult(_0x31775b,_0x39eab4){_0x39eab4=_0x39eab4||0xc8;return function(_0x44b120){if(_0x44b120){return _0x31775b[_0x5707('0x18')](_0x39eab4)[_0x5707('0x1a')](_0x44b120);}};}function respondWithFilteredResult(_0x4bc7a8,_0x34b664){return function(_0x302191){if(_0x302191){var _0x574c70=typeof _0x34b664[_0x5707('0x1b')]===_0x5707('0x1c')&&typeof _0x34b664[_0x5707('0x1d')]===_0x5707('0x1c');var _0x88770=_0x302191[_0x5707('0x1e')];var _0x89b83d=_0x574c70?0x0:_0x34b664[_0x5707('0x1b')];var _0x4936b9=_0x574c70?_0x302191[_0x5707('0x1e')]:_0x34b664[_0x5707('0x1b')]+_0x34b664[_0x5707('0x1d')];var _0x3845d5;if(_0x4936b9>=_0x88770){_0x4936b9=_0x88770;_0x3845d5=0xc8;}else{_0x3845d5=0xce;}_0x4bc7a8[_0x5707('0x18')](_0x3845d5);return _0x4bc7a8[_0x5707('0x1f')]('Content-Range',_0x89b83d+'-'+_0x4936b9+'/'+_0x88770)[_0x5707('0x1a')](_0x302191);}return null;};}function patchUpdates(_0x283ae2){return function(_0x14973b){try{jsonpatch[_0x5707('0x20')](_0x14973b,_0x283ae2,!![]);}catch(_0x3bdc9c){return BPromise[_0x5707('0x21')](_0x3bdc9c);}return _0x14973b[_0x5707('0x22')]();};}function saveUpdates(_0x44741c,_0x5e8459){return function(_0x1659d2){if(_0x1659d2){return _0x1659d2[_0x5707('0x23')](_0x44741c)['then'](function(_0x30bd83){return _0x30bd83;});}return null;};}function removeEntity(_0x14a188,_0x5f0e5c){return function(_0x29d6a0){if(_0x29d6a0){return _0x29d6a0[_0x5707('0x24')]()[_0x5707('0x25')](function(){var _0x54e98d=_0x29d6a0[_0x5707('0x26')]({'plain':!![]});var _0x4f1d30='ExtractedReports';return db[_0x5707('0x27')][_0x5707('0x24')]({'where':{'type':_0x4f1d30,'resourceId':_0x54e98d['id']}})[_0x5707('0x25')](function(){return _0x29d6a0;});})[_0x5707('0x25')](function(){_0x14a188['status'](0xcc)[_0x5707('0x19')]();});}};}function handleEntityNotFound(_0x3fdb38,_0x33622c){return function(_0xb67a21){if(!_0xb67a21){_0x3fdb38[_0x5707('0x28')](0x194);}return _0xb67a21;};}function handleError(_0x4b1b2e,_0x226a41){_0x226a41=_0x226a41||0x1f4;return function(_0x55ab31){logger[_0x5707('0x29')](_0x55ab31[_0x5707('0x2a')]);if(_0x55ab31[_0x5707('0x2b')]){delete _0x55ab31[_0x5707('0x2b')];}_0x4b1b2e[_0x5707('0x18')](_0x226a41)[_0x5707('0x2c')](_0x55ab31);};}exports[_0x5707('0x2d')]=function(_0x4f35e1,_0x1976fe){var _0x23bb42={},_0x59959c={},_0x2f31e9={'count':0x0,'rows':[]};var _0x49481d=_[_0x5707('0x2e')](db['AnalyticExtractedReport']['rawAttributes'],function(_0x24dc58){return{'name':_0x24dc58['fieldName'],'type':_0x24dc58[_0x5707('0x2f')][_0x5707('0x30')]};});_0x59959c[_0x5707('0x31')]=_[_0x5707('0x2e')](_0x49481d,_0x5707('0x2b'));_0x59959c[_0x5707('0x32')]=_[_0x5707('0x33')](_0x4f35e1[_0x5707('0x32')]);_0x59959c[_0x5707('0x34')]=_['intersection'](_0x59959c[_0x5707('0x31')],_0x59959c[_0x5707('0x32')]);_0x23bb42[_0x5707('0x35')]=_[_0x5707('0x36')](_0x59959c[_0x5707('0x31')],qs[_0x5707('0x37')](_0x4f35e1[_0x5707('0x32')][_0x5707('0x37')]));_0x23bb42[_0x5707('0x35')]=_0x23bb42['attributes'][_0x5707('0x38')]?_0x23bb42[_0x5707('0x35')]:_0x59959c[_0x5707('0x31')];if(!_0x4f35e1[_0x5707('0x32')][_0x5707('0x39')](_0x5707('0x3a'))){_0x23bb42[_0x5707('0x1d')]=qs[_0x5707('0x1d')](_0x4f35e1[_0x5707('0x32')][_0x5707('0x1d')]);_0x23bb42[_0x5707('0x1b')]=qs[_0x5707('0x1b')](_0x4f35e1[_0x5707('0x32')][_0x5707('0x1b')]);}_0x23bb42[_0x5707('0x3b')]=qs[_0x5707('0x3c')](_0x4f35e1['query'][_0x5707('0x3c')]);_0x23bb42[_0x5707('0x3d')]=qs['filters'](_[_0x5707('0x3e')](_0x4f35e1[_0x5707('0x32')],_0x59959c['filters']),_0x49481d);if(_0x4f35e1[_0x5707('0x32')][_0x5707('0x3f')]){_0x23bb42[_0x5707('0x3d')]=_[_0x5707('0x40')](_0x23bb42['where'],{'$or':_[_0x5707('0x2e')](_0x49481d,function(_0x358156){if(_0x358156[_0x5707('0x2f')]!==_0x5707('0x41')){var _0x4b87aa={};_0x4b87aa[_0x358156[_0x5707('0x2b')]]={'$like':'%'+_0x4f35e1[_0x5707('0x32')][_0x5707('0x3f')]+'%'};return _0x4b87aa;}})});}_0x23bb42=_[_0x5707('0x40')]({},_0x23bb42,_0x4f35e1['options']);var _0x47bc17={'where':_0x23bb42['where']};return db[_0x5707('0x42')][_0x5707('0x1e')](_0x47bc17)[_0x5707('0x25')](function(_0x321f8c){_0x2f31e9['count']=_0x321f8c;if(_0x4f35e1[_0x5707('0x32')][_0x5707('0x43')]){_0x23bb42['include']=[{'all':!![]}];}return db[_0x5707('0x42')]['findAll'](_0x23bb42);})[_0x5707('0x25')](function(_0x300a27){_0x2f31e9[_0x5707('0x44')]=_0x300a27;return _0x2f31e9;})[_0x5707('0x25')](respondWithFilteredResult(_0x1976fe,_0x23bb42))[_0x5707('0x45')](handleError(_0x1976fe,null));};exports[_0x5707('0x46')]=function(_0x15ad11,_0x510d93){var _0x46bf02={'raw':!![],'where':{'id':_0x15ad11['params']['id']}},_0x792a57={};_0x792a57[_0x5707('0x31')]=_[_0x5707('0x33')](db['AnalyticExtractedReport']['rawAttributes']);_0x792a57[_0x5707('0x32')]=_['keys'](_0x15ad11[_0x5707('0x32')]);_0x792a57[_0x5707('0x34')]=_[_0x5707('0x36')](_0x792a57[_0x5707('0x31')],_0x792a57[_0x5707('0x32')]);_0x46bf02[_0x5707('0x35')]=_[_0x5707('0x36')](_0x792a57[_0x5707('0x31')],qs[_0x5707('0x37')](_0x15ad11[_0x5707('0x32')][_0x5707('0x37')]));_0x46bf02[_0x5707('0x35')]=_0x46bf02[_0x5707('0x35')][_0x5707('0x38')]?_0x46bf02[_0x5707('0x35')]:_0x792a57[_0x5707('0x31')];if(_0x15ad11[_0x5707('0x32')]['includeAll']){_0x46bf02[_0x5707('0x47')]=[{'all':!![]}];}_0x46bf02=_['merge']({},_0x46bf02,_0x15ad11[_0x5707('0x48')]);return db['AnalyticExtractedReport']['find'](_0x46bf02)['then'](handleEntityNotFound(_0x510d93,null))[_0x5707('0x25')](respondWithResult(_0x510d93,null))[_0x5707('0x45')](handleError(_0x510d93,null));};exports[_0x5707('0x49')]=function(_0x2839fd,_0x4f9a49){return db[_0x5707('0x42')][_0x5707('0x49')](_0x2839fd['body'],{})[_0x5707('0x25')](function(_0x6411ab){var _0x52520e=_0x2839fd[_0x5707('0x4a')][_0x5707('0x26')]({'plain':!![]});if(!_0x52520e)throw new Error(_0x5707('0x4b'));if(_0x52520e[_0x5707('0x4c')]==='user'){var _0x383d53=_0x6411ab['get']({'plain':!![]});var _0x53cab3=_0x5707('0x4d');return db[_0x5707('0x4e')][_0x5707('0x4f')]({'where':{'name':_0x53cab3,'userProfileId':_0x52520e[_0x5707('0x50')]},'raw':!![]})[_0x5707('0x25')](function(_0x255f84){if(_0x255f84&&_0x255f84[_0x5707('0x51')]===0x0){return db['UserProfileResource'][_0x5707('0x49')]({'name':_0x383d53[_0x5707('0x2b')],'resourceId':_0x383d53['id'],'type':_0x255f84['name'],'sectionId':_0x255f84['id']},{})[_0x5707('0x25')](function(){return _0x6411ab;});}else{return _0x6411ab;}})[_0x5707('0x45')](function(_0x666801){logger['error'](_0x5707('0x52'),_0x666801);throw _0x666801;});}return _0x6411ab;})[_0x5707('0x25')](respondWithResult(_0x4f9a49,0xc9))[_0x5707('0x45')](handleError(_0x4f9a49,null));};exports['update']=function(_0x99a1d5,_0x52b98c){if(_0x99a1d5[_0x5707('0x53')]['id']){delete _0x99a1d5[_0x5707('0x53')]['id'];}return db[_0x5707('0x42')][_0x5707('0x4f')]({'where':{'id':_0x99a1d5[_0x5707('0x54')]['id']}})['then'](handleEntityNotFound(_0x52b98c,null))[_0x5707('0x25')](saveUpdates(_0x99a1d5[_0x5707('0x53')],null))[_0x5707('0x25')](respondWithResult(_0x52b98c,null))[_0x5707('0x45')](handleError(_0x52b98c,null));};exports[_0x5707('0x24')]=function(_0x410c0c,_0x3d8c00){return db[_0x5707('0x42')][_0x5707('0x4f')]({'where':{'id':_0x410c0c[_0x5707('0x54')]['id']}})[_0x5707('0x25')](handleEntityNotFound(_0x3d8c00,null))[_0x5707('0x25')](removeEntity(_0x3d8c00,null))[_0x5707('0x45')](handleError(_0x3d8c00,null));};exports['download']=function(_0x276c48,_0x28f40d,_0x177309){return db[_0x5707('0x42')][_0x5707('0x4f')]({'where':{'id':_0x276c48[_0x5707('0x54')]['id']},'attributes':['name','basename',_0x5707('0x55'),_0x5707('0x56')],'raw':!![]})['then'](handleEntityNotFound(_0x28f40d,null))[_0x5707('0x25')](function(_0x2c7536){if(_0x2c7536){if(!fs[_0x5707('0x57')](path[_0x5707('0x58')](config['root'],_0x5707('0x59'),_0x2c7536[_0x5707('0x55')]))){throw new db[(_0x5707('0x5a'))][(_0x5707('0x5b'))](_0x5707('0x5c'));}if(_0x276c48['query'][_0x5707('0x5d')]){return _0x28f40d[_0x5707('0x28')](0xc8);}return _0x28f40d[_0x5707('0x5e')](path[_0x5707('0x58')](config['root'],_0x5707('0x59'),_0x2c7536[_0x5707('0x55')]),util[_0x5707('0x5f')]('%s.%s',_0x2c7536['basename']||_0x2c7536[_0x5707('0x2b')],_0x2c7536[_0x5707('0x56')][_0x5707('0x60')]()));}})[_0x5707('0x45')](handleError(_0x28f40d,null));};
\ No newline at end of file
+var _0xe521=['set','Content-Range','reject','save','update','then','destroy','get','ExtractedReports','UserProfileResource','end','error','name','send','AnalyticExtractedReport','fieldName','model','map','keys','query','intersection','attributes','fields','hasOwnProperty','nolimit','sort','where','filters','pick','filter','merge','type','includeAll','include','findAll','catch','show','params','rawAttributes','length','options','find','create','body','user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','download','basename','savename','output','existsSync','Sequelize','ValidationError','Report\x20not\x20found\x20or\x20empty','exists','join','root','server/files/reports','toLowerCase','eml-format','rimraf','moment','mustache','path','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count'];(function(_0x4b7b9b,_0xa4aff9){var _0x3be710=function(_0x5b64fa){while(--_0x5b64fa){_0x4b7b9b['push'](_0x4b7b9b['shift']());}};_0x3be710(++_0xa4aff9);}(_0xe521,0x9a));var _0x1e52=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe521[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0x1e52('0x0'));var rimraf=require(_0x1e52('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x1e52('0x2'));var BPromise=require('bluebird');var Mustache=require(_0x1e52('0x3'));var util=require('util');var path=require(_0x1e52('0x4'));var sox=require('sox');var csv=require(_0x1e52('0x5'));var ejs=require(_0x1e52('0x6'));var fs=require('fs');var fs_extra=require(_0x1e52('0x7'));var _=require(_0x1e52('0x8'));var squel=require(_0x1e52('0x9'));var crypto=require('crypto');var jsforce=require(_0x1e52('0xa'));var deskjs=require(_0x1e52('0xb'));var toCsv=require('to-csv');var querystring=require(_0x1e52('0xc'));var Papa=require(_0x1e52('0xd'));var Redis=require(_0x1e52('0xe'));var authService=require('../../components/auth/service');var qs=require(_0x1e52('0xf'));var as=require(_0x1e52('0x10'));var hardwareService=require(_0x1e52('0x11'));var logger=require(_0x1e52('0x12'))(_0x1e52('0x13'));var utils=require(_0x1e52('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0x1e52('0x15'));var db=require(_0x1e52('0x16'))['db'];function respondWithStatusCode(_0x558ec4,_0x3dd8bb){_0x3dd8bb=_0x3dd8bb||0xcc;return function(_0x24700){if(_0x24700){return _0x558ec4[_0x1e52('0x17')](_0x3dd8bb);}return _0x558ec4[_0x1e52('0x18')](_0x3dd8bb)['end']();};}function respondWithResult(_0x127633,_0x16a8cf){_0x16a8cf=_0x16a8cf||0xc8;return function(_0xdc2b72){if(_0xdc2b72){return _0x127633[_0x1e52('0x18')](_0x16a8cf)[_0x1e52('0x19')](_0xdc2b72);}};}function respondWithFilteredResult(_0x22a779,_0x59f310){return function(_0x4c0505){if(_0x4c0505){var _0x1e8b0f=typeof _0x59f310[_0x1e52('0x1a')]===_0x1e52('0x1b')&&typeof _0x59f310[_0x1e52('0x1c')]===_0x1e52('0x1b');var _0x16747c=_0x4c0505[_0x1e52('0x1d')];var _0x11f9ab=_0x1e8b0f?0x0:_0x59f310[_0x1e52('0x1a')];var _0x2970c5=_0x1e8b0f?_0x4c0505['count']:_0x59f310[_0x1e52('0x1a')]+_0x59f310[_0x1e52('0x1c')];var _0x28b431;if(_0x2970c5>=_0x16747c){_0x2970c5=_0x16747c;_0x28b431=0xc8;}else{_0x28b431=0xce;}_0x22a779[_0x1e52('0x18')](_0x28b431);return _0x22a779[_0x1e52('0x1e')](_0x1e52('0x1f'),_0x11f9ab+'-'+_0x2970c5+'/'+_0x16747c)[_0x1e52('0x19')](_0x4c0505);}return null;};}function patchUpdates(_0x7e6f4d){return function(_0x44d98c){try{jsonpatch['apply'](_0x44d98c,_0x7e6f4d,!![]);}catch(_0x13d292){return BPromise[_0x1e52('0x20')](_0x13d292);}return _0x44d98c[_0x1e52('0x21')]();};}function saveUpdates(_0x283afd,_0x41e5f3){return function(_0x3b56f2){if(_0x3b56f2){return _0x3b56f2[_0x1e52('0x22')](_0x283afd)[_0x1e52('0x23')](function(_0x48246d){return _0x48246d;});}return null;};}function removeEntity(_0x486174,_0x13ad92){return function(_0x1230bf){if(_0x1230bf){return _0x1230bf[_0x1e52('0x24')]()[_0x1e52('0x23')](function(){var _0x1b3328=_0x1230bf[_0x1e52('0x25')]({'plain':!![]});var _0x1a8718=_0x1e52('0x26');return db[_0x1e52('0x27')][_0x1e52('0x24')]({'where':{'type':_0x1a8718,'resourceId':_0x1b3328['id']}})['then'](function(){return _0x1230bf;});})[_0x1e52('0x23')](function(){_0x486174['status'](0xcc)[_0x1e52('0x28')]();});}};}function handleEntityNotFound(_0x12b70e,_0xcf692e){return function(_0x4781d8){if(!_0x4781d8){_0x12b70e[_0x1e52('0x17')](0x194);}return _0x4781d8;};}function handleError(_0x27a465,_0x1e0e60){_0x1e0e60=_0x1e0e60||0x1f4;return function(_0x228fd7){logger[_0x1e52('0x29')](_0x228fd7['stack']);if(_0x228fd7['name']){delete _0x228fd7[_0x1e52('0x2a')];}_0x27a465[_0x1e52('0x18')](_0x1e0e60)[_0x1e52('0x2b')](_0x228fd7);};}exports['index']=function(_0x42145f,_0x4ed76d){var _0x142c29={},_0x3302c9={},_0x1755b7={'count':0x0,'rows':[]};var _0x30acb3=_['map'](db[_0x1e52('0x2c')]['rawAttributes'],function(_0x23356b){return{'name':_0x23356b[_0x1e52('0x2d')],'type':_0x23356b['type']['key']};});_0x3302c9[_0x1e52('0x2e')]=_[_0x1e52('0x2f')](_0x30acb3,_0x1e52('0x2a'));_0x3302c9['query']=_[_0x1e52('0x30')](_0x42145f[_0x1e52('0x31')]);_0x3302c9['filters']=_[_0x1e52('0x32')](_0x3302c9['model'],_0x3302c9[_0x1e52('0x31')]);_0x142c29[_0x1e52('0x33')]=_[_0x1e52('0x32')](_0x3302c9[_0x1e52('0x2e')],qs[_0x1e52('0x34')](_0x42145f[_0x1e52('0x31')]['fields']));_0x142c29[_0x1e52('0x33')]=_0x142c29[_0x1e52('0x33')]['length']?_0x142c29[_0x1e52('0x33')]:_0x3302c9[_0x1e52('0x2e')];if(!_0x42145f[_0x1e52('0x31')][_0x1e52('0x35')](_0x1e52('0x36'))){_0x142c29['limit']=qs[_0x1e52('0x1c')](_0x42145f[_0x1e52('0x31')][_0x1e52('0x1c')]);_0x142c29[_0x1e52('0x1a')]=qs[_0x1e52('0x1a')](_0x42145f[_0x1e52('0x31')][_0x1e52('0x1a')]);}_0x142c29['order']=qs[_0x1e52('0x37')](_0x42145f[_0x1e52('0x31')][_0x1e52('0x37')]);_0x142c29[_0x1e52('0x38')]=qs[_0x1e52('0x39')](_[_0x1e52('0x3a')](_0x42145f[_0x1e52('0x31')],_0x3302c9['filters']),_0x30acb3);if(_0x42145f[_0x1e52('0x31')][_0x1e52('0x3b')]){_0x142c29[_0x1e52('0x38')]=_[_0x1e52('0x3c')](_0x142c29['where'],{'$or':_[_0x1e52('0x2f')](_0x30acb3,function(_0x5807b2){if(_0x5807b2[_0x1e52('0x3d')]!=='VIRTUAL'){var _0x232109={};_0x232109[_0x5807b2[_0x1e52('0x2a')]]={'$like':'%'+_0x42145f[_0x1e52('0x31')]['filter']+'%'};return _0x232109;}})});}_0x142c29=_[_0x1e52('0x3c')]({},_0x142c29,_0x42145f['options']);var _0xe48fd0={'where':_0x142c29['where']};return db['AnalyticExtractedReport'][_0x1e52('0x1d')](_0xe48fd0)[_0x1e52('0x23')](function(_0x2cbf88){_0x1755b7[_0x1e52('0x1d')]=_0x2cbf88;if(_0x42145f[_0x1e52('0x31')][_0x1e52('0x3e')]){_0x142c29[_0x1e52('0x3f')]=[{'all':!![]}];}return db[_0x1e52('0x2c')][_0x1e52('0x40')](_0x142c29);})[_0x1e52('0x23')](function(_0x3be5eb){_0x1755b7['rows']=_0x3be5eb;return _0x1755b7;})[_0x1e52('0x23')](respondWithFilteredResult(_0x4ed76d,_0x142c29))[_0x1e52('0x41')](handleError(_0x4ed76d,null));};exports[_0x1e52('0x42')]=function(_0x16f393,_0x5e06ed){var _0x4c5b3f={'raw':!![],'where':{'id':_0x16f393[_0x1e52('0x43')]['id']}},_0x3409c0={};_0x3409c0[_0x1e52('0x2e')]=_[_0x1e52('0x30')](db[_0x1e52('0x2c')][_0x1e52('0x44')]);_0x3409c0[_0x1e52('0x31')]=_[_0x1e52('0x30')](_0x16f393['query']);_0x3409c0[_0x1e52('0x39')]=_[_0x1e52('0x32')](_0x3409c0[_0x1e52('0x2e')],_0x3409c0['query']);_0x4c5b3f[_0x1e52('0x33')]=_['intersection'](_0x3409c0[_0x1e52('0x2e')],qs[_0x1e52('0x34')](_0x16f393['query'][_0x1e52('0x34')]));_0x4c5b3f['attributes']=_0x4c5b3f[_0x1e52('0x33')][_0x1e52('0x45')]?_0x4c5b3f['attributes']:_0x3409c0[_0x1e52('0x2e')];if(_0x16f393['query'][_0x1e52('0x3e')]){_0x4c5b3f['include']=[{'all':!![]}];}_0x4c5b3f=_[_0x1e52('0x3c')]({},_0x4c5b3f,_0x16f393[_0x1e52('0x46')]);return db[_0x1e52('0x2c')][_0x1e52('0x47')](_0x4c5b3f)[_0x1e52('0x23')](handleEntityNotFound(_0x5e06ed,null))[_0x1e52('0x23')](respondWithResult(_0x5e06ed,null))[_0x1e52('0x41')](handleError(_0x5e06ed,null));};exports[_0x1e52('0x48')]=function(_0x52e3fe,_0x402c63){return db['AnalyticExtractedReport'][_0x1e52('0x48')](_0x52e3fe[_0x1e52('0x49')],{})[_0x1e52('0x23')](function(_0x5565e1){var _0x31d0a1=_0x52e3fe[_0x1e52('0x4a')][_0x1e52('0x25')]({'plain':!![]});if(!_0x31d0a1)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x31d0a1['role']===_0x1e52('0x4a')){var _0x44aae5=_0x5565e1[_0x1e52('0x25')]({'plain':!![]});var _0x17b56a=_0x1e52('0x26');return db[_0x1e52('0x4b')][_0x1e52('0x47')]({'where':{'name':_0x17b56a,'userProfileId':_0x31d0a1[_0x1e52('0x4c')]},'raw':!![]})['then'](function(_0x13b899){if(_0x13b899&&_0x13b899[_0x1e52('0x4d')]===0x0){return db['UserProfileResource'][_0x1e52('0x48')]({'name':_0x44aae5[_0x1e52('0x2a')],'resourceId':_0x44aae5['id'],'type':_0x13b899[_0x1e52('0x2a')],'sectionId':_0x13b899['id']},{})[_0x1e52('0x23')](function(){return _0x5565e1;});}else{return _0x5565e1;}})[_0x1e52('0x41')](function(_0x3676ed){logger['error'](_0x1e52('0x4e'),_0x3676ed);throw _0x3676ed;});}return _0x5565e1;})[_0x1e52('0x23')](respondWithResult(_0x402c63,0xc9))[_0x1e52('0x41')](handleError(_0x402c63,null));};exports[_0x1e52('0x22')]=function(_0x405a77,_0x10a39a){if(_0x405a77[_0x1e52('0x49')]['id']){delete _0x405a77[_0x1e52('0x49')]['id'];}return db['AnalyticExtractedReport']['find']({'where':{'id':_0x405a77[_0x1e52('0x43')]['id']}})[_0x1e52('0x23')](handleEntityNotFound(_0x10a39a,null))[_0x1e52('0x23')](saveUpdates(_0x405a77[_0x1e52('0x49')],null))[_0x1e52('0x23')](respondWithResult(_0x10a39a,null))[_0x1e52('0x41')](handleError(_0x10a39a,null));};exports['destroy']=function(_0x396e72,_0x5dea94){return db[_0x1e52('0x2c')][_0x1e52('0x47')]({'where':{'id':_0x396e72['params']['id']}})[_0x1e52('0x23')](handleEntityNotFound(_0x5dea94,null))[_0x1e52('0x23')](removeEntity(_0x5dea94,null))[_0x1e52('0x41')](handleError(_0x5dea94,null));};exports[_0x1e52('0x4f')]=function(_0x2007ed,_0x33d8a8,_0x27e214){return db[_0x1e52('0x2c')]['find']({'where':{'id':_0x2007ed[_0x1e52('0x43')]['id']},'attributes':['name',_0x1e52('0x50'),_0x1e52('0x51'),_0x1e52('0x52')],'raw':!![]})[_0x1e52('0x23')](handleEntityNotFound(_0x33d8a8,null))[_0x1e52('0x23')](function(_0x4fcf72){if(_0x4fcf72){if(!fs[_0x1e52('0x53')](path['join'](config['root'],'server/files/reports',_0x4fcf72[_0x1e52('0x51')]))){throw new db[(_0x1e52('0x54'))][(_0x1e52('0x55'))](_0x1e52('0x56'));}if(_0x2007ed[_0x1e52('0x31')][_0x1e52('0x57')]){return _0x33d8a8['sendStatus'](0xc8);}return _0x33d8a8[_0x1e52('0x4f')](path[_0x1e52('0x58')](config[_0x1e52('0x59')],_0x1e52('0x5a'),_0x4fcf72[_0x1e52('0x51')]),util['format']('%s.%s',_0x4fcf72[_0x1e52('0x50')]||_0x4fcf72[_0x1e52('0x2a')],_0x4fcf72[_0x1e52('0x52')][_0x1e52('0x5b')]()));}})[_0x1e52('0x41')](handleError(_0x33d8a8,null));};
\ No newline at end of file
index b412c91..3425ad8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbebe=['define','analytics_extracted_reports','lodash','util','../../config/logger','moment','path','./analyticExtractedReport.attributes'];(function(_0x5e869b,_0x38982d){var _0x5e687b=function(_0x4a2d73){while(--_0x4a2d73){_0x5e869b['push'](_0x5e869b['shift']());}};_0x5e687b(++_0x38982d);}(_0xbebe,0x182));var _0xebeb=function(_0x1521f3,_0x7b1dd6){_0x1521f3=_0x1521f3-0x0;var _0x390f97=_0xbebe[_0x1521f3];return _0x390f97;};'use strict';var _=require(_0xebeb('0x0'));var util=require(_0xebeb('0x1'));var logger=require(_0xebeb('0x2'))('api');var moment=require(_0xebeb('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xebeb('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xebeb('0x5'));module['exports']=function(_0x3aaa1a,_0x17996f){return _0x3aaa1a[_0xebeb('0x6')]('AnalyticExtractedReport',attributes,{'tableName':_0xebeb('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xec6f=['define','AnalyticExtractedReport','analytics_extracted_reports','lodash','util','api','bluebird','rimraf','exports'];(function(_0x2ce8da,_0x96274c){var _0x1d378f=function(_0x4db209){while(--_0x4db209){_0x2ce8da['push'](_0x2ce8da['shift']());}};_0x1d378f(++_0x96274c);}(_0xec6f,0x135));var _0xfec6=function(_0x40baf1,_0x39a1e3){_0x40baf1=_0x40baf1-0x0;var _0x293477=_0xec6f[_0x40baf1];return _0x293477;};'use strict';var _=require(_0xfec6('0x0'));var util=require(_0xfec6('0x1'));var logger=require('../../config/logger')(_0xfec6('0x2'));var moment=require('moment');var BPromise=require(_0xfec6('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xfec6('0x4'));var config=require('../../config/environment');var attributes=require('./analyticExtractedReport.attributes');module[_0xfec6('0x5')]=function(_0x4b6406,_0x4cb08d){return _0x4b6406[_0xfec6('0x6')](_0xfec6('0x7'),attributes,{'tableName':_0xfec6('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 0fd4704..1aa774e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x20fb=['../../config/environment','jayson/promise','http','request','then','info','AnalyticExtractedReport,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','rpc'];(function(_0x508c10,_0x5a15f0){var _0x3108b5=function(_0x4bccaa){while(--_0x4bccaa){_0x508c10['push'](_0x508c10['shift']());}};_0x3108b5(++_0x5a15f0);}(_0x20fb,0x1b2));var _0xb20f=function(_0x3899d1,_0x4aa04c){_0x3899d1=_0x3899d1-0x0;var _0xeb4a7d=_0x20fb[_0x3899d1];return _0xeb4a7d;};'use strict';var _=require(_0xb20f('0x0'));var util=require(_0xb20f('0x1'));var moment=require(_0xb20f('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb20f('0x3'));var db=require(_0xb20f('0x4'))['db'];var utils=require(_0xb20f('0x5'));var logger=require('../../config/logger')(_0xb20f('0x6'));var config=require(_0xb20f('0x7'));var jayson=require(_0xb20f('0x8'));var client=jayson['client'][_0xb20f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3da3c6,_0x36431c,_0x2a6adf){return new BPromise(function(_0x2e5586,_0x41099a){return client[_0xb20f('0xa')](_0x3da3c6,_0x2a6adf)[_0xb20f('0xb')](function(_0x134063){logger[_0xb20f('0xc')](_0xb20f('0xd'),_0x36431c,_0xb20f('0xe'));logger['debug']('AnalyticExtractedReport,\x20%s,\x20%s,\x20%s',_0x36431c,'request\x20sent',JSON[_0xb20f('0xf')](_0x134063));if(_0x134063[_0xb20f('0x10')]){if(_0x134063[_0xb20f('0x10')][_0xb20f('0x11')]===0x1f4){logger[_0xb20f('0x10')](_0xb20f('0xd'),_0x36431c,_0x134063[_0xb20f('0x10')][_0xb20f('0x12')]);return _0x41099a(_0x134063['error']['message']);}logger[_0xb20f('0x10')](_0xb20f('0xd'),_0x36431c,_0x134063[_0xb20f('0x10')][_0xb20f('0x12')]);return _0x2e5586(_0x134063[_0xb20f('0x10')]['message']);}else{logger[_0xb20f('0xc')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x36431c,_0xb20f('0xe'));_0x2e5586(_0x134063[_0xb20f('0x13')]['message']);}})[_0xb20f('0x14')](function(_0x3d62ba){logger[_0xb20f('0x10')](_0xb20f('0xd'),_0x36431c,_0x3d62ba);_0x41099a(_0x3d62ba);});});}
\ No newline at end of file
+var _0x3818=['request','then','info','AnalyticExtractedReport,\x20%s,\x20%s','debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x5ca353,_0x21eb37){var _0x4f2fe5=function(_0x14cd1b){while(--_0x14cd1b){_0x5ca353['push'](_0x5ca353['shift']());}};_0x4f2fe5(++_0x21eb37);}(_0x3818,0xaf));var _0x8381=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x3818[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x8381('0x0'));var util=require(_0x8381('0x1'));var moment=require(_0x8381('0x2'));var BPromise=require(_0x8381('0x3'));var rs=require(_0x8381('0x4'));var fs=require('fs');var Redis=require(_0x8381('0x5'));var db=require(_0x8381('0x6'))['db'];var utils=require(_0x8381('0x7'));var logger=require(_0x8381('0x8'))(_0x8381('0x9'));var config=require(_0x8381('0xa'));var jayson=require(_0x8381('0xb'));var client=jayson[_0x8381('0xc')][_0x8381('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x3fcd05,_0x5d4673,_0x3734c){return new BPromise(function(_0x1f26de,_0x5ef1de){return client[_0x8381('0xe')](_0x3fcd05,_0x3734c)[_0x8381('0xf')](function(_0x19bd2d){logger[_0x8381('0x10')](_0x8381('0x11'),_0x5d4673,'request\x20sent');logger[_0x8381('0x12')](_0x8381('0x13'),_0x5d4673,_0x8381('0x14'),JSON[_0x8381('0x15')](_0x19bd2d));if(_0x19bd2d[_0x8381('0x16')]){if(_0x19bd2d[_0x8381('0x16')][_0x8381('0x17')]===0x1f4){logger[_0x8381('0x16')](_0x8381('0x11'),_0x5d4673,_0x19bd2d[_0x8381('0x16')][_0x8381('0x18')]);return _0x5ef1de(_0x19bd2d[_0x8381('0x16')][_0x8381('0x18')]);}logger[_0x8381('0x16')](_0x8381('0x11'),_0x5d4673,_0x19bd2d[_0x8381('0x16')]['message']);return _0x1f26de(_0x19bd2d[_0x8381('0x16')][_0x8381('0x18')]);}else{logger[_0x8381('0x10')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x5d4673,_0x8381('0x14'));_0x1f26de(_0x19bd2d[_0x8381('0x19')][_0x8381('0x18')]);}})[_0x8381('0x1a')](function(_0x5245da){logger[_0x8381('0x16')](_0x8381('0x11'),_0x5d4673,_0x5245da);_0x5ef1de(_0x5245da);});});}
\ No newline at end of file
index 540583d..2327232 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xac13=['util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticExtractedReport.controller','index','get','/:id','isAuthenticated','show','/:id/download','download','post','update','destroy','exports','multer'];(function(_0x16fe1e,_0x347004){var _0xc98c84=function(_0x298138){while(--_0x298138){_0x16fe1e['push'](_0x16fe1e['shift']());}};_0xc98c84(++_0x347004);}(_0xac13,0x18b));var _0x3ac1=function(_0x73614f,_0x394381){_0x73614f=_0x73614f-0x0;var _0x233a7e=_0xac13[_0x73614f];return _0x233a7e;};'use strict';var multer=require(_0x3ac1('0x0'));var util=require(_0x3ac1('0x1'));var path=require(_0x3ac1('0x2'));var timeout=require(_0x3ac1('0x3'));var express=require(_0x3ac1('0x4'));var router=express[_0x3ac1('0x5')]();var fs_extra=require(_0x3ac1('0x6'));var auth=require(_0x3ac1('0x7'));var interaction=require(_0x3ac1('0x8'));var config=require(_0x3ac1('0x9'));var controller=require(_0x3ac1('0xa'));router['get']('/',auth['isAuthenticated'](),controller[_0x3ac1('0xb')]);router[_0x3ac1('0xc')](_0x3ac1('0xd'),auth[_0x3ac1('0xe')](),controller[_0x3ac1('0xf')]);router['get'](_0x3ac1('0x10'),auth[_0x3ac1('0xe')](),controller[_0x3ac1('0x11')]);router[_0x3ac1('0x12')]('/',auth['isAuthenticated'](),controller['create']);router['put'](_0x3ac1('0xd'),auth['isAuthenticated'](),controller[_0x3ac1('0x13')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x3ac1('0x14')]);module[_0x3ac1('0x15')]=router;
\ No newline at end of file
+var _0xb0a6=['../../components/interaction/service','../../config/environment','./analyticExtractedReport.controller','get','isAuthenticated','/:id','show','/:id/download','download','post','create','put','update','delete','destroy','multer','util','path','express','Router','fs-extra','../../components/auth/service'];(function(_0x3dfb56,_0xfe844d){var _0x5e6e1b=function(_0x4e002f){while(--_0x4e002f){_0x3dfb56['push'](_0x3dfb56['shift']());}};_0x5e6e1b(++_0xfe844d);}(_0xb0a6,0x1c7));var _0x6b0a=function(_0x4943e9,_0xbd7b82){_0x4943e9=_0x4943e9-0x0;var _0x36b919=_0xb0a6[_0x4943e9];return _0x36b919;};'use strict';var multer=require(_0x6b0a('0x0'));var util=require(_0x6b0a('0x1'));var path=require(_0x6b0a('0x2'));var timeout=require('connect-timeout');var express=require(_0x6b0a('0x3'));var router=express[_0x6b0a('0x4')]();var fs_extra=require(_0x6b0a('0x5'));var auth=require(_0x6b0a('0x6'));var interaction=require(_0x6b0a('0x7'));var config=require(_0x6b0a('0x8'));var controller=require(_0x6b0a('0x9'));router[_0x6b0a('0xa')]('/',auth[_0x6b0a('0xb')](),controller['index']);router[_0x6b0a('0xa')](_0x6b0a('0xc'),auth[_0x6b0a('0xb')](),controller[_0x6b0a('0xd')]);router['get'](_0x6b0a('0xe'),auth[_0x6b0a('0xb')](),controller[_0x6b0a('0xf')]);router[_0x6b0a('0x10')]('/',auth[_0x6b0a('0xb')](),controller[_0x6b0a('0x11')]);router[_0x6b0a('0x12')](_0x6b0a('0xc'),auth[_0x6b0a('0xb')](),controller[_0x6b0a('0x13')]);router[_0x6b0a('0x14')](_0x6b0a('0xc'),auth[_0x6b0a('0xb')](),controller[_0x6b0a('0x15')]);module['exports']=router;
\ No newline at end of file
index 02c51fe..8b32506 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfbb0=['TEXT','STRING','BOOLEAN','sequelize','exports'];(function(_0x52ab8a,_0xee034b){var _0x5d6ddc=function(_0x283fa6){while(--_0x283fa6){_0x52ab8a['push'](_0x52ab8a['shift']());}};_0x5d6ddc(++_0xee034b);}(_0xfbb0,0x80));var _0x0fbb=function(_0x44597d,_0x58264c){_0x44597d=_0x44597d-0x0;var _0x5b0b2a=_0xfbb0[_0x44597d];return _0x5b0b2a;};'use strict';var Sequelize=require(_0x0fbb('0x0'));module[_0x0fbb('0x1')]={'field':{'type':Sequelize[_0x0fbb('0x2')]},'alias':{'type':Sequelize[_0x0fbb('0x3')]},'function':{'type':Sequelize[_0x0fbb('0x3')]},'format':{'type':Sequelize['STRING']},'groupBy':{'type':Sequelize[_0x0fbb('0x4')],'defaultValue':![]},'orderBy':{'type':Sequelize[_0x0fbb('0x3')]},'custom':{'type':Sequelize[_0x0fbb('0x4')],'defaultValue':![]}};
\ No newline at end of file
+var _0xc5c0=['BOOLEAN','exports','TEXT','STRING'];(function(_0x5209c7,_0x361cd7){var _0x26f1aa=function(_0x482715){while(--_0x482715){_0x5209c7['push'](_0x5209c7['shift']());}};_0x26f1aa(++_0x361cd7);}(_0xc5c0,0x131));var _0x0c5c=function(_0x19ea40,_0x47bdef){_0x19ea40=_0x19ea40-0x0;var _0x275449=_0xc5c0[_0x19ea40];return _0x275449;};'use strict';var Sequelize=require('sequelize');module[_0x0c5c('0x0')]={'field':{'type':Sequelize[_0x0c5c('0x1')]},'alias':{'type':Sequelize[_0x0c5c('0x2')]},'function':{'type':Sequelize[_0x0c5c('0x2')]},'format':{'type':Sequelize[_0x0c5c('0x2')]},'groupBy':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'orderBy':{'type':Sequelize[_0x0c5c('0x2')]},'custom':{'type':Sequelize[_0x0c5c('0x3')],'defaultValue':![]}};
\ No newline at end of file
index b26c9d8..80446b6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3532=['../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','undefined','limit','count','offset','set','Content-Range','json','apply','reject','update','then','destroy','error','stack','name','send','map','rawAttributes','fieldName','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','order','sort','where','pick','filter','merge','type','VIRTUAL','options','AnalyticFieldReport','includeAll','include','rows','catch','params','find','create','bulkCreate','body','bulkDestroy','ids','addFields','findOne','sequelize','CustomReportId','findAll','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','path','sox','ejs','fs-extra','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch'];(function(_0x1478e6,_0x58b4ab){var _0x3643b6=function(_0x52d393){while(--_0x52d393){_0x1478e6['push'](_0x1478e6['shift']());}};_0x3643b6(++_0x58b4ab);}(_0x3532,0x1bf));var _0x2353=function(_0x40e71d,_0xde873d){_0x40e71d=_0x40e71d-0x0;var _0x30a126=_0x3532[_0x40e71d];return _0x30a126;};'use strict';var emlformat=require(_0x2353('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x2353('0x1'));var jsonpatch=require(_0x2353('0x2'));var rp=require('request-promise');var moment=require(_0x2353('0x3'));var BPromise=require(_0x2353('0x4'));var Mustache=require(_0x2353('0x5'));var util=require('util');var path=require(_0x2353('0x6'));var sox=require(_0x2353('0x7'));var csv=require('to-csv');var ejs=require(_0x2353('0x8'));var fs=require('fs');var fs_extra=require(_0x2353('0x9'));var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x2353('0xa'));var toCsv=require('to-csv');var querystring=require(_0x2353('0xb'));var Papa=require('papaparse');var Redis=require(_0x2353('0xc'));var authService=require(_0x2353('0xd'));var qs=require('../../components/parsers/qs');var as=require(_0x2353('0xe'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x2353('0xf'))(_0x2353('0x10'));var utils=require(_0x2353('0x11'));var config=require(_0x2353('0x12'));var licenseUtil=require(_0x2353('0x13'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x598cd5,_0x2e5b16){_0x2e5b16=_0x2e5b16||0xcc;return function(_0x1a310a){if(_0x1a310a){return _0x598cd5[_0x2353('0x14')](_0x2e5b16);}return _0x598cd5[_0x2353('0x15')](_0x2e5b16)[_0x2353('0x16')]();};}function respondWithResult(_0x23c9e0,_0x18c552){_0x18c552=_0x18c552||0xc8;return function(_0x30f62c){if(_0x30f62c){return _0x23c9e0[_0x2353('0x15')](_0x18c552)['json'](_0x30f62c);}};}function respondWithFilteredResult(_0xf8e235,_0x45effe){return function(_0x34a29a){if(_0x34a29a){var _0x3bfc14=typeof _0x45effe['offset']===_0x2353('0x17')&&typeof _0x45effe[_0x2353('0x18')]==='undefined';var _0x25a8f1=_0x34a29a[_0x2353('0x19')];var _0xf442a=_0x3bfc14?0x0:_0x45effe['offset'];var _0x6de7e=_0x3bfc14?_0x34a29a['count']:_0x45effe[_0x2353('0x1a')]+_0x45effe['limit'];var _0xc7bc7b;if(_0x6de7e>=_0x25a8f1){_0x6de7e=_0x25a8f1;_0xc7bc7b=0xc8;}else{_0xc7bc7b=0xce;}_0xf8e235['status'](_0xc7bc7b);return _0xf8e235[_0x2353('0x1b')](_0x2353('0x1c'),_0xf442a+'-'+_0x6de7e+'/'+_0x25a8f1)[_0x2353('0x1d')](_0x34a29a);}return null;};}function patchUpdates(_0x34ee91){return function(_0x588c4d){try{jsonpatch[_0x2353('0x1e')](_0x588c4d,_0x34ee91,!![]);}catch(_0x3f29e0){return BPromise[_0x2353('0x1f')](_0x3f29e0);}return _0x588c4d['save']();};}function saveUpdates(_0x42d45c,_0x5ae350){return function(_0x590409){if(_0x590409){return _0x590409[_0x2353('0x20')](_0x42d45c)[_0x2353('0x21')](function(_0x20ce3a){return _0x20ce3a;});}return null;};}function removeEntity(_0x61eeab,_0x287116){return function(_0x20f30b){if(_0x20f30b){return _0x20f30b[_0x2353('0x22')]()[_0x2353('0x21')](function(){_0x61eeab[_0x2353('0x15')](0xcc)[_0x2353('0x16')]();});}};}function handleEntityNotFound(_0x5e6ee0,_0x4faff1){return function(_0x221211){if(!_0x221211){_0x5e6ee0[_0x2353('0x14')](0x194);}return _0x221211;};}function handleError(_0x19b239,_0x27fabc){_0x27fabc=_0x27fabc||0x1f4;return function(_0xca9ca4){logger[_0x2353('0x23')](_0xca9ca4[_0x2353('0x24')]);if(_0xca9ca4[_0x2353('0x25')]){delete _0xca9ca4['name'];}_0x19b239[_0x2353('0x15')](_0x27fabc)[_0x2353('0x26')](_0xca9ca4);};}exports['index']=function(_0x22b98a,_0x16b1d4){var _0x2d1a71={},_0x4f5c70={},_0x272340={'count':0x0,'rows':[]};var _0x32ba9e=_[_0x2353('0x27')](db['AnalyticFieldReport'][_0x2353('0x28')],function(_0x29cb3c){return{'name':_0x29cb3c[_0x2353('0x29')],'type':_0x29cb3c['type']['key']};});_0x4f5c70[_0x2353('0x2a')]=_['map'](_0x32ba9e,_0x2353('0x25'));_0x4f5c70[_0x2353('0x2b')]=_[_0x2353('0x2c')](_0x22b98a['query']);_0x4f5c70[_0x2353('0x2d')]=_['intersection'](_0x4f5c70[_0x2353('0x2a')],_0x4f5c70[_0x2353('0x2b')]);_0x2d1a71['attributes']=_[_0x2353('0x2e')](_0x4f5c70[_0x2353('0x2a')],qs[_0x2353('0x2f')](_0x22b98a[_0x2353('0x2b')][_0x2353('0x2f')]));_0x2d1a71[_0x2353('0x30')]=_0x2d1a71[_0x2353('0x30')][_0x2353('0x31')]?_0x2d1a71[_0x2353('0x30')]:_0x4f5c70[_0x2353('0x2a')];if(!_0x22b98a[_0x2353('0x2b')][_0x2353('0x32')]('nolimit')){_0x2d1a71[_0x2353('0x18')]=qs['limit'](_0x22b98a[_0x2353('0x2b')][_0x2353('0x18')]);_0x2d1a71[_0x2353('0x1a')]=qs[_0x2353('0x1a')](_0x22b98a['query'][_0x2353('0x1a')]);}_0x2d1a71[_0x2353('0x33')]=qs[_0x2353('0x34')](_0x22b98a[_0x2353('0x2b')][_0x2353('0x34')]);_0x2d1a71[_0x2353('0x35')]=qs['filters'](_[_0x2353('0x36')](_0x22b98a[_0x2353('0x2b')],_0x4f5c70[_0x2353('0x2d')]),_0x32ba9e);if(_0x22b98a[_0x2353('0x2b')][_0x2353('0x37')]){_0x2d1a71[_0x2353('0x35')]=_[_0x2353('0x38')](_0x2d1a71[_0x2353('0x35')],{'$or':_['map'](_0x32ba9e,function(_0x59ec38){if(_0x59ec38[_0x2353('0x39')]!==_0x2353('0x3a')){var _0x3d0875={};_0x3d0875[_0x59ec38[_0x2353('0x25')]]={'$like':'%'+_0x22b98a[_0x2353('0x2b')][_0x2353('0x37')]+'%'};return _0x3d0875;}})});}_0x2d1a71=_[_0x2353('0x38')]({},_0x2d1a71,_0x22b98a[_0x2353('0x3b')]);var _0x19c4e7={'where':_0x2d1a71[_0x2353('0x35')]};return db[_0x2353('0x3c')][_0x2353('0x19')](_0x19c4e7)[_0x2353('0x21')](function(_0x573825){_0x272340['count']=_0x573825;if(_0x22b98a[_0x2353('0x2b')][_0x2353('0x3d')]){_0x2d1a71[_0x2353('0x3e')]=[{'all':!![]}];}return db[_0x2353('0x3c')]['findAll'](_0x2d1a71);})[_0x2353('0x21')](function(_0x552882){_0x272340[_0x2353('0x3f')]=_0x552882;return _0x272340;})['then'](respondWithFilteredResult(_0x16b1d4,_0x2d1a71))[_0x2353('0x40')](handleError(_0x16b1d4,null));};exports['show']=function(_0xdfed5d,_0x474f98){var _0x382735={'raw':![],'where':{'id':_0xdfed5d[_0x2353('0x41')]['id']}},_0x4138e7={};_0x4138e7[_0x2353('0x2a')]=_[_0x2353('0x2c')](db[_0x2353('0x3c')][_0x2353('0x28')]);_0x4138e7[_0x2353('0x2b')]=_['keys'](_0xdfed5d[_0x2353('0x2b')]);_0x4138e7[_0x2353('0x2d')]=_['intersection'](_0x4138e7[_0x2353('0x2a')],_0x4138e7['query']);_0x382735[_0x2353('0x30')]=_[_0x2353('0x2e')](_0x4138e7[_0x2353('0x2a')],qs[_0x2353('0x2f')](_0xdfed5d[_0x2353('0x2b')][_0x2353('0x2f')]));_0x382735['attributes']=_0x382735['attributes'][_0x2353('0x31')]?_0x382735[_0x2353('0x30')]:_0x4138e7[_0x2353('0x2a')];if(_0xdfed5d[_0x2353('0x2b')][_0x2353('0x3d')]){_0x382735[_0x2353('0x3e')]=[{'all':!![]}];}_0x382735=_[_0x2353('0x38')]({},_0x382735,_0xdfed5d[_0x2353('0x3b')]);return db['AnalyticFieldReport'][_0x2353('0x42')](_0x382735)[_0x2353('0x21')](handleEntityNotFound(_0x474f98,null))[_0x2353('0x21')](respondWithResult(_0x474f98,null))[_0x2353('0x40')](handleError(_0x474f98,null));};exports[_0x2353('0x43')]=function(_0x4948f9,_0x4f7016){return db['AnalyticFieldReport']['create'](_0x4948f9['body'],{})[_0x2353('0x21')](respondWithResult(_0x4f7016,0xc9))[_0x2353('0x40')](handleError(_0x4f7016,null));};exports[_0x2353('0x44')]=function(_0x1c3040,_0xb4bdb7){return db[_0x2353('0x3c')][_0x2353('0x44')](_0x1c3040[_0x2353('0x45')],{'raw':![],'individualHooks':!![]})[_0x2353('0x21')](respondWithResult(_0xb4bdb7,0xc9))[_0x2353('0x40')](handleError(_0xb4bdb7,null));};exports['update']=function(_0x3f09ec,_0x20f206){if(_0x3f09ec[_0x2353('0x45')]['id']){delete _0x3f09ec[_0x2353('0x45')]['id'];}return db[_0x2353('0x3c')]['find']({'where':{'id':_0x3f09ec[_0x2353('0x41')]['id']}})['then'](handleEntityNotFound(_0x20f206,null))[_0x2353('0x21')](saveUpdates(_0x3f09ec[_0x2353('0x45')],null))['then'](respondWithResult(_0x20f206,null))[_0x2353('0x40')](handleError(_0x20f206,null));};exports['destroy']=function(_0x44ec2c,_0x365fe2){return db['AnalyticFieldReport'][_0x2353('0x42')]({'where':{'id':_0x44ec2c[_0x2353('0x41')]['id']}})[_0x2353('0x21')](handleEntityNotFound(_0x365fe2,null))[_0x2353('0x21')](removeEntity(_0x365fe2,null))['catch'](handleError(_0x365fe2,null));};exports[_0x2353('0x46')]=function(_0xf456b9,_0x2350ba){return db['AnalyticFieldReport'][_0x2353('0x22')]({'where':{'id':_0xf456b9[_0x2353('0x2b')][_0x2353('0x47')]||[]},'raw':![],'individualHooks':!![]})['then'](respondWithResult(_0x2350ba,0xcc))[_0x2353('0x40')](handleError(_0x2350ba,null));};exports[_0x2353('0x48')]=function(_0x239e5e,_0x6fd7d3,_0x4bc7af){return db['AnalyticCustomReport'][_0x2353('0x49')]({'where':{'id':_0x239e5e[_0x2353('0x41')]['id']}})[_0x2353('0x21')](handleEntityNotFound(_0x6fd7d3,null))['then'](function(_0x3f6be1){if(_0x3f6be1){return db[_0x2353('0x4a')]['transaction'](function(_0x24e8fe){return db[_0x2353('0x3c')][_0x2353('0x22')]({'where':{'CustomReportId':_0x239e5e[_0x2353('0x41')]['id']},'transaction':_0x24e8fe})[_0x2353('0x21')](function(_0x462ed9){var _0x243d5e=_[_0x2353('0x27')](_0x239e5e[_0x2353('0x45')],function(_0x394bd0){delete _0x394bd0['id'];_0x394bd0[_0x2353('0x4b')]=_0x239e5e['params']['id'];return _0x394bd0;});return db[_0x2353('0x3c')][_0x2353('0x44')](_0x243d5e,{'transaction':_0x24e8fe});});})[_0x2353('0x21')](function(){return db['AnalyticFieldReport'][_0x2353('0x4c')]({'where':{'CustomReportId':_0x239e5e[_0x2353('0x41')]['id']}});});}})['then'](respondWithResult(_0x6fd7d3,null))['catch'](handleError(_0x6fd7d3,null));};
\ No newline at end of file
+var _0x2b35=['keys','filters','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','AnalyticFieldReport','includeAll','include','findAll','rows','catch','show','params','options','create','body','bulkCreate','find','bulkDestroy','ids','addFields','AnalyticCustomReport','findOne','sequelize','transaction','CustomReportId','zip-dir','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','limit','undefined','offset','count','set','Content-Range','apply','reject','update','then','destroy','name','send','index','rawAttributes','fieldName','key','map','query'];(function(_0x14eac5,_0x5d7549){var _0x223eb6=function(_0x892d56){while(--_0x892d56){_0x14eac5['push'](_0x14eac5['shift']());}};_0x223eb6(++_0x5d7549);}(_0x2b35,0x17e));var _0x52b3=function(_0x7d04cd,_0x4769a0){_0x7d04cd=_0x7d04cd-0x0;var _0x5d211f=_0x2b35[_0x7d04cd];return _0x5d211f;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x52b3('0x0'));var jsonpatch=require('fast-json-patch');var rp=require(_0x52b3('0x1'));var moment=require(_0x52b3('0x2'));var BPromise=require(_0x52b3('0x3'));var Mustache=require(_0x52b3('0x4'));var util=require(_0x52b3('0x5'));var path=require(_0x52b3('0x6'));var sox=require('sox');var csv=require(_0x52b3('0x7'));var ejs=require(_0x52b3('0x8'));var fs=require('fs');var fs_extra=require(_0x52b3('0x9'));var _=require(_0x52b3('0xa'));var squel=require(_0x52b3('0xb'));var crypto=require(_0x52b3('0xc'));var jsforce=require(_0x52b3('0xd'));var deskjs=require(_0x52b3('0xe'));var toCsv=require(_0x52b3('0x7'));var querystring=require(_0x52b3('0xf'));var Papa=require(_0x52b3('0x10'));var Redis=require(_0x52b3('0x11'));var authService=require(_0x52b3('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x52b3('0x13'));var logger=require(_0x52b3('0x14'))(_0x52b3('0x15'));var utils=require(_0x52b3('0x16'));var config=require(_0x52b3('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x52b3('0x18'))['db'];function respondWithStatusCode(_0x19b552,_0x59861a){_0x59861a=_0x59861a||0xcc;return function(_0x28b637){if(_0x28b637){return _0x19b552[_0x52b3('0x19')](_0x59861a);}return _0x19b552[_0x52b3('0x1a')](_0x59861a)[_0x52b3('0x1b')]();};}function respondWithResult(_0x4de285,_0x2ce0e9){_0x2ce0e9=_0x2ce0e9||0xc8;return function(_0x577dff){if(_0x577dff){return _0x4de285['status'](_0x2ce0e9)[_0x52b3('0x1c')](_0x577dff);}};}function respondWithFilteredResult(_0x51b20d,_0x570754){return function(_0xbc305b){if(_0xbc305b){var _0x3d3840=typeof _0x570754['offset']==='undefined'&&typeof _0x570754[_0x52b3('0x1d')]===_0x52b3('0x1e');var _0x3253f0=_0xbc305b['count'];var _0x287658=_0x3d3840?0x0:_0x570754[_0x52b3('0x1f')];var _0x10980c=_0x3d3840?_0xbc305b[_0x52b3('0x20')]:_0x570754[_0x52b3('0x1f')]+_0x570754['limit'];var _0x45f821;if(_0x10980c>=_0x3253f0){_0x10980c=_0x3253f0;_0x45f821=0xc8;}else{_0x45f821=0xce;}_0x51b20d[_0x52b3('0x1a')](_0x45f821);return _0x51b20d[_0x52b3('0x21')](_0x52b3('0x22'),_0x287658+'-'+_0x10980c+'/'+_0x3253f0)[_0x52b3('0x1c')](_0xbc305b);}return null;};}function patchUpdates(_0x59586e){return function(_0xe8484d){try{jsonpatch[_0x52b3('0x23')](_0xe8484d,_0x59586e,!![]);}catch(_0x58f3c2){return BPromise[_0x52b3('0x24')](_0x58f3c2);}return _0xe8484d['save']();};}function saveUpdates(_0x3fba87,_0xc90a46){return function(_0x1f5a76){if(_0x1f5a76){return _0x1f5a76[_0x52b3('0x25')](_0x3fba87)[_0x52b3('0x26')](function(_0x35232f){return _0x35232f;});}return null;};}function removeEntity(_0x5a9a32,_0x23dcc1){return function(_0x1ba249){if(_0x1ba249){return _0x1ba249[_0x52b3('0x27')]()[_0x52b3('0x26')](function(){_0x5a9a32['status'](0xcc)[_0x52b3('0x1b')]();});}};}function handleEntityNotFound(_0x1cdfb5,_0x4a2aea){return function(_0x2465c8){if(!_0x2465c8){_0x1cdfb5[_0x52b3('0x19')](0x194);}return _0x2465c8;};}function handleError(_0x12fa3a,_0x1a6954){_0x1a6954=_0x1a6954||0x1f4;return function(_0xc53219){logger['error'](_0xc53219['stack']);if(_0xc53219['name']){delete _0xc53219[_0x52b3('0x28')];}_0x12fa3a[_0x52b3('0x1a')](_0x1a6954)[_0x52b3('0x29')](_0xc53219);};}exports[_0x52b3('0x2a')]=function(_0x5ebfc5,_0x4e027e){var _0x2f2cde={},_0x130d64={},_0x2d5f1a={'count':0x0,'rows':[]};var _0x2c0636=_['map'](db['AnalyticFieldReport'][_0x52b3('0x2b')],function(_0x503c9e){return{'name':_0x503c9e[_0x52b3('0x2c')],'type':_0x503c9e['type'][_0x52b3('0x2d')]};});_0x130d64['model']=_[_0x52b3('0x2e')](_0x2c0636,_0x52b3('0x28'));_0x130d64[_0x52b3('0x2f')]=_[_0x52b3('0x30')](_0x5ebfc5[_0x52b3('0x2f')]);_0x130d64[_0x52b3('0x31')]=_[_0x52b3('0x32')](_0x130d64['model'],_0x130d64[_0x52b3('0x2f')]);_0x2f2cde['attributes']=_[_0x52b3('0x32')](_0x130d64[_0x52b3('0x33')],qs[_0x52b3('0x34')](_0x5ebfc5[_0x52b3('0x2f')][_0x52b3('0x34')]));_0x2f2cde[_0x52b3('0x35')]=_0x2f2cde[_0x52b3('0x35')][_0x52b3('0x36')]?_0x2f2cde[_0x52b3('0x35')]:_0x130d64['model'];if(!_0x5ebfc5['query'][_0x52b3('0x37')](_0x52b3('0x38'))){_0x2f2cde[_0x52b3('0x1d')]=qs['limit'](_0x5ebfc5[_0x52b3('0x2f')]['limit']);_0x2f2cde[_0x52b3('0x1f')]=qs[_0x52b3('0x1f')](_0x5ebfc5[_0x52b3('0x2f')][_0x52b3('0x1f')]);}_0x2f2cde[_0x52b3('0x39')]=qs[_0x52b3('0x3a')](_0x5ebfc5[_0x52b3('0x2f')][_0x52b3('0x3a')]);_0x2f2cde[_0x52b3('0x3b')]=qs[_0x52b3('0x31')](_[_0x52b3('0x3c')](_0x5ebfc5[_0x52b3('0x2f')],_0x130d64[_0x52b3('0x31')]),_0x2c0636);if(_0x5ebfc5[_0x52b3('0x2f')][_0x52b3('0x3d')]){_0x2f2cde[_0x52b3('0x3b')]=_[_0x52b3('0x3e')](_0x2f2cde[_0x52b3('0x3b')],{'$or':_[_0x52b3('0x2e')](_0x2c0636,function(_0x3ce1ee){if(_0x3ce1ee[_0x52b3('0x3f')]!==_0x52b3('0x40')){var _0x16dc1e={};_0x16dc1e[_0x3ce1ee[_0x52b3('0x28')]]={'$like':'%'+_0x5ebfc5[_0x52b3('0x2f')]['filter']+'%'};return _0x16dc1e;}})});}_0x2f2cde=_[_0x52b3('0x3e')]({},_0x2f2cde,_0x5ebfc5['options']);var _0x3345c4={'where':_0x2f2cde[_0x52b3('0x3b')]};return db[_0x52b3('0x41')][_0x52b3('0x20')](_0x3345c4)[_0x52b3('0x26')](function(_0x4623e1){_0x2d5f1a[_0x52b3('0x20')]=_0x4623e1;if(_0x5ebfc5[_0x52b3('0x2f')][_0x52b3('0x42')]){_0x2f2cde[_0x52b3('0x43')]=[{'all':!![]}];}return db[_0x52b3('0x41')][_0x52b3('0x44')](_0x2f2cde);})[_0x52b3('0x26')](function(_0x482087){_0x2d5f1a[_0x52b3('0x45')]=_0x482087;return _0x2d5f1a;})[_0x52b3('0x26')](respondWithFilteredResult(_0x4e027e,_0x2f2cde))[_0x52b3('0x46')](handleError(_0x4e027e,null));};exports[_0x52b3('0x47')]=function(_0x1d07bb,_0x66681d){var _0x6fb6c3={'raw':![],'where':{'id':_0x1d07bb[_0x52b3('0x48')]['id']}},_0x5e7894={};_0x5e7894[_0x52b3('0x33')]=_[_0x52b3('0x30')](db[_0x52b3('0x41')]['rawAttributes']);_0x5e7894[_0x52b3('0x2f')]=_[_0x52b3('0x30')](_0x1d07bb[_0x52b3('0x2f')]);_0x5e7894[_0x52b3('0x31')]=_[_0x52b3('0x32')](_0x5e7894[_0x52b3('0x33')],_0x5e7894[_0x52b3('0x2f')]);_0x6fb6c3[_0x52b3('0x35')]=_[_0x52b3('0x32')](_0x5e7894[_0x52b3('0x33')],qs[_0x52b3('0x34')](_0x1d07bb['query'][_0x52b3('0x34')]));_0x6fb6c3[_0x52b3('0x35')]=_0x6fb6c3[_0x52b3('0x35')][_0x52b3('0x36')]?_0x6fb6c3[_0x52b3('0x35')]:_0x5e7894[_0x52b3('0x33')];if(_0x1d07bb[_0x52b3('0x2f')][_0x52b3('0x42')]){_0x6fb6c3[_0x52b3('0x43')]=[{'all':!![]}];}_0x6fb6c3=_[_0x52b3('0x3e')]({},_0x6fb6c3,_0x1d07bb[_0x52b3('0x49')]);return db[_0x52b3('0x41')]['find'](_0x6fb6c3)[_0x52b3('0x26')](handleEntityNotFound(_0x66681d,null))[_0x52b3('0x26')](respondWithResult(_0x66681d,null))[_0x52b3('0x46')](handleError(_0x66681d,null));};exports[_0x52b3('0x4a')]=function(_0x314fe,_0x13723d){return db['AnalyticFieldReport'][_0x52b3('0x4a')](_0x314fe[_0x52b3('0x4b')],{})[_0x52b3('0x26')](respondWithResult(_0x13723d,0xc9))['catch'](handleError(_0x13723d,null));};exports[_0x52b3('0x4c')]=function(_0x2b0b7b,_0x20f432){return db[_0x52b3('0x41')][_0x52b3('0x4c')](_0x2b0b7b[_0x52b3('0x4b')],{'raw':![],'individualHooks':!![]})[_0x52b3('0x26')](respondWithResult(_0x20f432,0xc9))[_0x52b3('0x46')](handleError(_0x20f432,null));};exports[_0x52b3('0x25')]=function(_0x4ac1ef,_0x12031f){if(_0x4ac1ef['body']['id']){delete _0x4ac1ef[_0x52b3('0x4b')]['id'];}return db[_0x52b3('0x41')][_0x52b3('0x4d')]({'where':{'id':_0x4ac1ef[_0x52b3('0x48')]['id']}})[_0x52b3('0x26')](handleEntityNotFound(_0x12031f,null))[_0x52b3('0x26')](saveUpdates(_0x4ac1ef[_0x52b3('0x4b')],null))['then'](respondWithResult(_0x12031f,null))[_0x52b3('0x46')](handleError(_0x12031f,null));};exports['destroy']=function(_0x2fcf3a,_0x412d13){return db[_0x52b3('0x41')][_0x52b3('0x4d')]({'where':{'id':_0x2fcf3a['params']['id']}})[_0x52b3('0x26')](handleEntityNotFound(_0x412d13,null))['then'](removeEntity(_0x412d13,null))[_0x52b3('0x46')](handleError(_0x412d13,null));};exports[_0x52b3('0x4e')]=function(_0x2e3e02,_0x34b79a){return db[_0x52b3('0x41')]['destroy']({'where':{'id':_0x2e3e02[_0x52b3('0x2f')][_0x52b3('0x4f')]||[]},'raw':![],'individualHooks':!![]})['then'](respondWithResult(_0x34b79a,0xcc))[_0x52b3('0x46')](handleError(_0x34b79a,null));};exports[_0x52b3('0x50')]=function(_0x2764cb,_0x44862f,_0x16304c){return db[_0x52b3('0x51')][_0x52b3('0x52')]({'where':{'id':_0x2764cb[_0x52b3('0x48')]['id']}})[_0x52b3('0x26')](handleEntityNotFound(_0x44862f,null))[_0x52b3('0x26')](function(_0x30c538){if(_0x30c538){return db[_0x52b3('0x53')][_0x52b3('0x54')](function(_0x3ab51f){return db[_0x52b3('0x41')][_0x52b3('0x27')]({'where':{'CustomReportId':_0x2764cb[_0x52b3('0x48')]['id']},'transaction':_0x3ab51f})[_0x52b3('0x26')](function(_0x6b162a){var _0x41c2c9=_['map'](_0x2764cb[_0x52b3('0x4b')],function(_0x43515d){delete _0x43515d['id'];_0x43515d[_0x52b3('0x55')]=_0x2764cb['params']['id'];return _0x43515d;});return db[_0x52b3('0x41')][_0x52b3('0x4c')](_0x41c2c9,{'transaction':_0x3ab51f});});})['then'](function(){return db[_0x52b3('0x41')][_0x52b3('0x44')]({'where':{'CustomReportId':_0x2764cb['params']['id']}});});}})[_0x52b3('0x26')](respondWithResult(_0x44862f,null))[_0x52b3('0x46')](handleError(_0x44862f,null));};
\ No newline at end of file
index 3550590..83e85f8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x33c3=['../../config/environment','./analyticFieldReport.attributes','exports','define','AnalyticFieldReport','analytics_report_fields','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf'];(function(_0xd31e67,_0x6cd072){var _0x5b7768=function(_0x4c1618){while(--_0x4c1618){_0xd31e67['push'](_0xd31e67['shift']());}};_0x5b7768(++_0x6cd072);}(_0x33c3,0x13a));var _0x333c=function(_0x3bd582,_0x313894){_0x3bd582=_0x3bd582-0x0;var _0x190112=_0x33c3[_0x3bd582];return _0x190112;};'use strict';var _=require(_0x333c('0x0'));var util=require(_0x333c('0x1'));var logger=require(_0x333c('0x2'))(_0x333c('0x3'));var moment=require('moment');var BPromise=require(_0x333c('0x4'));var rp=require(_0x333c('0x5'));var fs=require('fs');var path=require(_0x333c('0x6'));var rimraf=require(_0x333c('0x7'));var config=require(_0x333c('0x8'));var attributes=require(_0x333c('0x9'));module[_0x333c('0xa')]=function(_0x20ef80,_0x519175){return _0x20ef80[_0x333c('0xb')](_0x333c('0xc'),attributes,{'tableName':_0x333c('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xc0bb=['moment','bluebird','request-promise','path','rimraf','../../config/environment','./analyticFieldReport.attributes','define','AnalyticFieldReport','analytics_report_fields','../../config/logger','api'];(function(_0x54757c,_0x12ad04){var _0x759b33=function(_0x265074){while(--_0x265074){_0x54757c['push'](_0x54757c['shift']());}};_0x759b33(++_0x12ad04);}(_0xc0bb,0x106));var _0xbc0b=function(_0xa9f50a,_0x1d3836){_0xa9f50a=_0xa9f50a-0x0;var _0x48d268=_0xc0bb[_0xa9f50a];return _0x48d268;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xbc0b('0x0'))(_0xbc0b('0x1'));var moment=require(_0xbc0b('0x2'));var BPromise=require(_0xbc0b('0x3'));var rp=require(_0xbc0b('0x4'));var fs=require('fs');var path=require(_0xbc0b('0x5'));var rimraf=require(_0xbc0b('0x6'));var config=require(_0xbc0b('0x7'));var attributes=require(_0xbc0b('0x8'));module['exports']=function(_0x471792,_0x25606e){return _0x471792[_0xbc0b('0x9')](_0xbc0b('0xa'),attributes,{'tableName':_0xbc0b('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 9b0c0dc..25d9b76 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x71d0=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','request','then','info','AnalyticFieldReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticFieldReport,\x20%s,\x20%s,\x20%s','error','message','result','catch','lodash','util','moment','randomstring','ioredis'];(function(_0x4995f6,_0x5381a3){var _0x4f2e35=function(_0x2e5d01){while(--_0x2e5d01){_0x4995f6['push'](_0x4995f6['shift']());}};_0x4f2e35(++_0x5381a3);}(_0x71d0,0xcd));var _0x071d=function(_0x36f33d,_0x341049){_0x36f33d=_0x36f33d-0x0;var _0x17aad7=_0x71d0[_0x36f33d];return _0x17aad7;};'use strict';var _=require(_0x071d('0x0'));var util=require(_0x071d('0x1'));var moment=require(_0x071d('0x2'));var BPromise=require('bluebird');var rs=require(_0x071d('0x3'));var fs=require('fs');var Redis=require(_0x071d('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x071d('0x5'));var logger=require(_0x071d('0x6'))(_0x071d('0x7'));var config=require(_0x071d('0x8'));var jayson=require(_0x071d('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0xd6f8d2,_0x20418f,_0xfa168b){return new BPromise(function(_0x460d87,_0x213fee){return client[_0x071d('0xa')](_0xd6f8d2,_0xfa168b)[_0x071d('0xb')](function(_0x3c019b){logger[_0x071d('0xc')](_0x071d('0xd'),_0x20418f,_0x071d('0xe'));logger[_0x071d('0xf')](_0x071d('0x10'),_0x20418f,_0x071d('0xe'),JSON['stringify'](_0x3c019b));if(_0x3c019b[_0x071d('0x11')]){if(_0x3c019b['error']['code']===0x1f4){logger['error'](_0x071d('0xd'),_0x20418f,_0x3c019b[_0x071d('0x11')][_0x071d('0x12')]);return _0x213fee(_0x3c019b[_0x071d('0x11')][_0x071d('0x12')]);}logger['error']('AnalyticFieldReport,\x20%s,\x20%s',_0x20418f,_0x3c019b[_0x071d('0x11')][_0x071d('0x12')]);return _0x460d87(_0x3c019b[_0x071d('0x11')][_0x071d('0x12')]);}else{logger[_0x071d('0xc')](_0x071d('0xd'),_0x20418f,_0x071d('0xe'));_0x460d87(_0x3c019b[_0x071d('0x13')]['message']);}})[_0x071d('0x14')](function(_0x54d25e){logger[_0x071d('0x11')](_0x071d('0xd'),_0x20418f,_0x54d25e);_0x213fee(_0x54d25e);});});}
\ No newline at end of file
+var _0xfc99=['lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','request','then','info','AnalyticFieldReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticFieldReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch'];(function(_0x23468d,_0xd3028f){var _0x512762=function(_0x2854ff){while(--_0x2854ff){_0x23468d['push'](_0x23468d['shift']());}};_0x512762(++_0xd3028f);}(_0xfc99,0x1f4));var _0x9fc9=function(_0x1b9f4b,_0x54816c){_0x1b9f4b=_0x1b9f4b-0x0;var _0x4ab39d=_0xfc99[_0x1b9f4b];return _0x4ab39d;};'use strict';var _=require(_0x9fc9('0x0'));var util=require(_0x9fc9('0x1'));var moment=require(_0x9fc9('0x2'));var BPromise=require(_0x9fc9('0x3'));var rs=require(_0x9fc9('0x4'));var fs=require('fs');var Redis=require(_0x9fc9('0x5'));var db=require(_0x9fc9('0x6'))['db'];var utils=require(_0x9fc9('0x7'));var logger=require(_0x9fc9('0x8'))(_0x9fc9('0x9'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x9fc9('0xa')][_0x9fc9('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xb1a43e,_0x5ef699,_0x1d00a4){return new BPromise(function(_0x1acd63,_0x55ea27){return client[_0x9fc9('0xc')](_0xb1a43e,_0x1d00a4)[_0x9fc9('0xd')](function(_0x5b3575){logger[_0x9fc9('0xe')](_0x9fc9('0xf'),_0x5ef699,_0x9fc9('0x10'));logger[_0x9fc9('0x11')](_0x9fc9('0x12'),_0x5ef699,_0x9fc9('0x10'),JSON[_0x9fc9('0x13')](_0x5b3575));if(_0x5b3575[_0x9fc9('0x14')]){if(_0x5b3575[_0x9fc9('0x14')][_0x9fc9('0x15')]===0x1f4){logger['error'](_0x9fc9('0xf'),_0x5ef699,_0x5b3575['error'][_0x9fc9('0x16')]);return _0x55ea27(_0x5b3575['error'][_0x9fc9('0x16')]);}logger['error'](_0x9fc9('0xf'),_0x5ef699,_0x5b3575['error'][_0x9fc9('0x16')]);return _0x1acd63(_0x5b3575[_0x9fc9('0x14')][_0x9fc9('0x16')]);}else{logger[_0x9fc9('0xe')](_0x9fc9('0xf'),_0x5ef699,'request\x20sent');_0x1acd63(_0x5b3575[_0x9fc9('0x17')]['message']);}})[_0x9fc9('0x18')](function(_0x317b3b){logger['error'](_0x9fc9('0xf'),_0x5ef699,_0x317b3b);_0x55ea27(_0x317b3b);});});}
\ No newline at end of file
index 65e96e2..b7bfdc6 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(_0x3d2555,_0x3bb2ac){var _0x2a8b63=function(_0x278e33){while(--_0x278e33){_0x3d2555['push'](_0x3d2555['shift']());}};_0x2a8b63(++_0x3bb2ac);}(_0xa9e0,0x123));var _0x0a9e=function(_0x29b609,_0x19d388){_0x29b609=_0x29b609-0x0;var _0x54c952=_0xa9e0[_0x29b609];return _0x54c952;};'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(_0x1a05ea,_0x4dc609){var _0x4ef29d=function(_0x721c64){while(--_0x721c64){_0x1a05ea['push'](_0x1a05ea['shift']());}};_0x4ef29d(++_0x4dc609);}(_0xa9e0,0x123));var _0x0a9e=function(_0x220dbb,_0x99328d){_0x220dbb=_0x220dbb-0x0;var _0x2b77de=_0xa9e0[_0x220dbb];return _0x2b77de;};'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 b4f0c2f..7718371 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfc4c=['STRING','TEXT','sequelize','exports'];(function(_0x485925,_0xa0bcf1){var _0x3cb3d4=function(_0x138d9a){while(--_0x138d9a){_0x485925['push'](_0x485925['shift']());}};_0x3cb3d4(++_0xa0bcf1);}(_0xfc4c,0xca));var _0xcfc4=function(_0x1f37b1,_0xe5d581){_0x1f37b1=_0x1f37b1-0x0;var _0x3a3980=_0xfc4c[_0x1f37b1];return _0x3a3980;};'use strict';var Sequelize=require(_0xcfc4('0x0'));module[_0xcfc4('0x1')]={'name':{'type':Sequelize[_0xcfc4('0x2')],'allowNull':![],'unique':'name'},'table':{'type':Sequelize[_0xcfc4('0x2')]},'metric':{'type':Sequelize[_0xcfc4('0x3')]},'description':{'type':Sequelize[_0xcfc4('0x2')]}};
\ No newline at end of file
+var _0x7980=['exports','STRING','name','sequelize'];(function(_0x2a76fb,_0x23b62a){var _0x41bc10=function(_0x2765e3){while(--_0x2765e3){_0x2a76fb['push'](_0x2a76fb['shift']());}};_0x41bc10(++_0x23b62a);}(_0x7980,0xab));var _0x0798=function(_0xbc7942,_0x566082){_0xbc7942=_0xbc7942-0x0;var _0x11fe77=_0x7980[_0xbc7942];return _0x11fe77;};'use strict';var Sequelize=require(_0x0798('0x0'));module[_0x0798('0x1')]={'name':{'type':Sequelize[_0x0798('0x2')],'allowNull':![],'unique':_0x0798('0x3')},'table':{'type':Sequelize[_0x0798('0x2')]},'metric':{'type':Sequelize['TEXT']},'description':{'type':Sequelize[_0x0798('0x2')]}};
\ No newline at end of file
index 5fe46bc..31cdef5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf2ca=['filter','merge','map','type','VIRTUAL','options','AnalyticMetric','count','includeAll','findAll','rows','catch','keys','include','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','body','params','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','crypto','jsforce','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','set','Content-Range','apply','reject','then','get','Metrics','UserProfileResource','destroy','stack','name','send','index','rawAttributes','fieldName','key','model','query','filters','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','where'];(function(_0x1cd4e6,_0x5abf26){var _0x90f2d2=function(_0x4b2f25){while(--_0x4b2f25){_0x1cd4e6['push'](_0x1cd4e6['shift']());}};_0x90f2d2(++_0x5abf26);}(_0xf2ca,0x16a));var _0xaf2c=function(_0x2730da,_0x1098bd){_0x2730da=_0x2730da-0x0;var _0xfe9991=_0xf2ca[_0x2730da];return _0xfe9991;};'use strict';var emlformat=require(_0xaf2c('0x0'));var rimraf=require(_0xaf2c('0x1'));var zipdir=require(_0xaf2c('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xaf2c('0x3'));var moment=require(_0xaf2c('0x4'));var BPromise=require(_0xaf2c('0x5'));var Mustache=require(_0xaf2c('0x6'));var util=require(_0xaf2c('0x7'));var path=require(_0xaf2c('0x8'));var sox=require('sox');var csv=require(_0xaf2c('0x9'));var ejs=require(_0xaf2c('0xa'));var fs=require('fs');var fs_extra=require(_0xaf2c('0xb'));var _=require(_0xaf2c('0xc'));var squel=require('squel');var crypto=require(_0xaf2c('0xd'));var jsforce=require(_0xaf2c('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xaf2c('0x9'));var querystring=require('querystring');var Papa=require(_0xaf2c('0xf'));var Redis=require('ioredis');var authService=require(_0xaf2c('0x10'));var qs=require(_0xaf2c('0x11'));var as=require(_0xaf2c('0x12'));var hardwareService=require(_0xaf2c('0x13'));var logger=require('../../config/logger')('api');var utils=require(_0xaf2c('0x14'));var config=require(_0xaf2c('0x15'));var licenseUtil=require(_0xaf2c('0x16'));var db=require(_0xaf2c('0x17'))['db'];function respondWithStatusCode(_0x285dac,_0x59a59b){_0x59a59b=_0x59a59b||0xcc;return function(_0x590126){if(_0x590126){return _0x285dac[_0xaf2c('0x18')](_0x59a59b);}return _0x285dac[_0xaf2c('0x19')](_0x59a59b)[_0xaf2c('0x1a')]();};}function respondWithResult(_0x18a8a5,_0x293ca6){_0x293ca6=_0x293ca6||0xc8;return function(_0x152c73){if(_0x152c73){return _0x18a8a5[_0xaf2c('0x19')](_0x293ca6)[_0xaf2c('0x1b')](_0x152c73);}};}function respondWithFilteredResult(_0x2119c8,_0x1d0633){return function(_0x6ac8e){if(_0x6ac8e){var _0x2b4d13=typeof _0x1d0633[_0xaf2c('0x1c')]===_0xaf2c('0x1d')&&typeof _0x1d0633[_0xaf2c('0x1e')]==='undefined';var _0x3ca650=_0x6ac8e['count'];var _0x278a28=_0x2b4d13?0x0:_0x1d0633[_0xaf2c('0x1c')];var _0x1d544a=_0x2b4d13?_0x6ac8e['count']:_0x1d0633[_0xaf2c('0x1c')]+_0x1d0633[_0xaf2c('0x1e')];var _0x1fec4c;if(_0x1d544a>=_0x3ca650){_0x1d544a=_0x3ca650;_0x1fec4c=0xc8;}else{_0x1fec4c=0xce;}_0x2119c8[_0xaf2c('0x19')](_0x1fec4c);return _0x2119c8[_0xaf2c('0x1f')](_0xaf2c('0x20'),_0x278a28+'-'+_0x1d544a+'/'+_0x3ca650)['json'](_0x6ac8e);}return null;};}function patchUpdates(_0x35e712){return function(_0x164bcb){try{jsonpatch[_0xaf2c('0x21')](_0x164bcb,_0x35e712,!![]);}catch(_0x3bfd3f){return BPromise[_0xaf2c('0x22')](_0x3bfd3f);}return _0x164bcb['save']();};}function saveUpdates(_0x396646,_0xbf6f62){return function(_0x18153c){if(_0x18153c){return _0x18153c['update'](_0x396646)['then'](function(_0x29cbdf){return _0x29cbdf;});}return null;};}function removeEntity(_0x303546,_0x1cafad){return function(_0x99f78d){if(_0x99f78d){return _0x99f78d['destroy']()[_0xaf2c('0x23')](function(){var _0xf1a7cf=_0x99f78d[_0xaf2c('0x24')]({'plain':!![]});var _0x3c1ae6=_0xaf2c('0x25');return db[_0xaf2c('0x26')][_0xaf2c('0x27')]({'where':{'type':_0x3c1ae6,'resourceId':_0xf1a7cf['id']}})['then'](function(){return _0x99f78d;});})[_0xaf2c('0x23')](function(){_0x303546[_0xaf2c('0x19')](0xcc)[_0xaf2c('0x1a')]();});}};}function handleEntityNotFound(_0x410536,_0x4b7cf2){return function(_0x3fb190){if(!_0x3fb190){_0x410536['sendStatus'](0x194);}return _0x3fb190;};}function handleError(_0x38db1b,_0x42f980){_0x42f980=_0x42f980||0x1f4;return function(_0x15466b){logger['error'](_0x15466b[_0xaf2c('0x28')]);if(_0x15466b[_0xaf2c('0x29')]){delete _0x15466b[_0xaf2c('0x29')];}_0x38db1b['status'](_0x42f980)[_0xaf2c('0x2a')](_0x15466b);};}exports[_0xaf2c('0x2b')]=function(_0x42e2a5,_0x19364e){var _0x59d858={},_0x3da072={},_0x4072ff={'count':0x0,'rows':[]};var _0x1be1ef=_['map'](db['AnalyticMetric'][_0xaf2c('0x2c')],function(_0x4c9b4f){return{'name':_0x4c9b4f[_0xaf2c('0x2d')],'type':_0x4c9b4f['type'][_0xaf2c('0x2e')]};});_0x3da072[_0xaf2c('0x2f')]=_['map'](_0x1be1ef,_0xaf2c('0x29'));_0x3da072[_0xaf2c('0x30')]=_['keys'](_0x42e2a5[_0xaf2c('0x30')]);_0x3da072[_0xaf2c('0x31')]=_[_0xaf2c('0x32')](_0x3da072[_0xaf2c('0x2f')],_0x3da072[_0xaf2c('0x30')]);_0x59d858[_0xaf2c('0x33')]=_['intersection'](_0x3da072[_0xaf2c('0x2f')],qs['fields'](_0x42e2a5[_0xaf2c('0x30')]['fields']));_0x59d858[_0xaf2c('0x33')]=_0x59d858['attributes'][_0xaf2c('0x34')]?_0x59d858['attributes']:_0x3da072[_0xaf2c('0x2f')];if(!_0x42e2a5['query'][_0xaf2c('0x35')](_0xaf2c('0x36'))){_0x59d858[_0xaf2c('0x1e')]=qs[_0xaf2c('0x1e')](_0x42e2a5[_0xaf2c('0x30')]['limit']);_0x59d858['offset']=qs[_0xaf2c('0x1c')](_0x42e2a5[_0xaf2c('0x30')][_0xaf2c('0x1c')]);}_0x59d858[_0xaf2c('0x37')]=qs[_0xaf2c('0x38')](_0x42e2a5[_0xaf2c('0x30')]['sort']);_0x59d858[_0xaf2c('0x39')]=qs[_0xaf2c('0x31')](_['pick'](_0x42e2a5[_0xaf2c('0x30')],_0x3da072[_0xaf2c('0x31')]),_0x1be1ef);if(_0x42e2a5[_0xaf2c('0x30')][_0xaf2c('0x3a')]){_0x59d858[_0xaf2c('0x39')]=_[_0xaf2c('0x3b')](_0x59d858[_0xaf2c('0x39')],{'$or':_[_0xaf2c('0x3c')](_0x1be1ef,function(_0x296ca8){if(_0x296ca8[_0xaf2c('0x3d')]!==_0xaf2c('0x3e')){var _0x43f606={};_0x43f606[_0x296ca8[_0xaf2c('0x29')]]={'$like':'%'+_0x42e2a5['query']['filter']+'%'};return _0x43f606;}})});}_0x59d858=_['merge']({},_0x59d858,_0x42e2a5[_0xaf2c('0x3f')]);var _0x3cb075={'where':_0x59d858[_0xaf2c('0x39')]};return db[_0xaf2c('0x40')][_0xaf2c('0x41')](_0x3cb075)[_0xaf2c('0x23')](function(_0x51c441){_0x4072ff[_0xaf2c('0x41')]=_0x51c441;if(_0x42e2a5[_0xaf2c('0x30')][_0xaf2c('0x42')]){_0x59d858['include']=[{'all':!![]}];}return db['AnalyticMetric'][_0xaf2c('0x43')](_0x59d858);})['then'](function(_0x181787){_0x4072ff[_0xaf2c('0x44')]=_0x181787;return _0x4072ff;})[_0xaf2c('0x23')](respondWithFilteredResult(_0x19364e,_0x59d858))[_0xaf2c('0x45')](handleError(_0x19364e,null));};exports['show']=function(_0x2091eb,_0x532d5f){var _0x2056b8={'raw':!![],'where':{'id':_0x2091eb['params']['id']}},_0x8ebb65={};_0x8ebb65[_0xaf2c('0x2f')]=_['keys'](db[_0xaf2c('0x40')][_0xaf2c('0x2c')]);_0x8ebb65[_0xaf2c('0x30')]=_[_0xaf2c('0x46')](_0x2091eb[_0xaf2c('0x30')]);_0x8ebb65[_0xaf2c('0x31')]=_[_0xaf2c('0x32')](_0x8ebb65[_0xaf2c('0x2f')],_0x8ebb65[_0xaf2c('0x30')]);_0x2056b8['attributes']=_['intersection'](_0x8ebb65[_0xaf2c('0x2f')],qs['fields'](_0x2091eb['query']['fields']));_0x2056b8[_0xaf2c('0x33')]=_0x2056b8[_0xaf2c('0x33')][_0xaf2c('0x34')]?_0x2056b8[_0xaf2c('0x33')]:_0x8ebb65['model'];if(_0x2091eb[_0xaf2c('0x30')]['includeAll']){_0x2056b8[_0xaf2c('0x47')]=[{'all':!![]}];}_0x2056b8=_['merge']({},_0x2056b8,_0x2091eb[_0xaf2c('0x3f')]);return db[_0xaf2c('0x40')][_0xaf2c('0x48')](_0x2056b8)[_0xaf2c('0x23')](handleEntityNotFound(_0x532d5f,null))[_0xaf2c('0x23')](respondWithResult(_0x532d5f,null))['catch'](handleError(_0x532d5f,null));};exports[_0xaf2c('0x49')]=function(_0x26afee,_0x4b3ca4){return db['AnalyticMetric'][_0xaf2c('0x49')](_0x26afee['body'],{})[_0xaf2c('0x23')](function(_0x23642b){var _0x17b9ec=_0x26afee[_0xaf2c('0x4a')][_0xaf2c('0x24')]({'plain':!![]});if(!_0x17b9ec)throw new Error(_0xaf2c('0x4b'));if(_0x17b9ec[_0xaf2c('0x4c')]===_0xaf2c('0x4a')){var _0x31ccfe=_0x23642b[_0xaf2c('0x24')]({'plain':!![]});var _0x371486='Metrics';return db[_0xaf2c('0x4d')][_0xaf2c('0x48')]({'where':{'name':_0x371486,'userProfileId':_0x17b9ec['userProfileId']},'raw':!![]})['then'](function(_0x56d7ce){if(_0x56d7ce&&_0x56d7ce[_0xaf2c('0x4e')]===0x0){return db[_0xaf2c('0x26')]['create']({'name':_0x31ccfe[_0xaf2c('0x29')],'resourceId':_0x31ccfe['id'],'type':_0x56d7ce[_0xaf2c('0x29')],'sectionId':_0x56d7ce['id']},{})[_0xaf2c('0x23')](function(){return _0x23642b;});}else{return _0x23642b;}})[_0xaf2c('0x45')](function(_0x265748){logger[_0xaf2c('0x4f')](_0xaf2c('0x50'),_0x265748);throw _0x265748;});}return _0x23642b;})['then'](respondWithResult(_0x4b3ca4,0xc9))[_0xaf2c('0x45')](handleError(_0x4b3ca4,null));};exports[_0xaf2c('0x51')]=function(_0x5771e5,_0x245797){if(_0x5771e5[_0xaf2c('0x52')]['id']){delete _0x5771e5[_0xaf2c('0x52')]['id'];}return db[_0xaf2c('0x40')][_0xaf2c('0x48')]({'where':{'id':_0x5771e5[_0xaf2c('0x53')]['id']}})[_0xaf2c('0x23')](handleEntityNotFound(_0x245797,null))[_0xaf2c('0x23')](saveUpdates(_0x5771e5[_0xaf2c('0x52')],null))[_0xaf2c('0x23')](respondWithResult(_0x245797,null))[_0xaf2c('0x45')](handleError(_0x245797,null));};exports[_0xaf2c('0x27')]=function(_0x411e84,_0x2356a0){return db[_0xaf2c('0x40')][_0xaf2c('0x48')]({'where':{'id':_0x411e84[_0xaf2c('0x53')]['id']}})[_0xaf2c('0x23')](handleEntityNotFound(_0x2356a0,null))[_0xaf2c('0x23')](removeEntity(_0x2356a0,null))[_0xaf2c('0x45')](handleError(_0x2356a0,null));};
\ No newline at end of file
+var _0x3e74=['status','set','Content-Range','apply','save','update','then','destroy','get','Metrics','sendStatus','stack','name','send','index','map','AnalyticMetric','fieldName','type','key','model','query','keys','attributes','intersection','fields','hasOwnProperty','sort','where','filters','pick','merge','VIRTUAL','filter','include','findAll','rows','catch','params','rawAttributes','length','includeAll','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','find','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','eml-format','zip-dir','fast-json-patch','request-promise','mustache','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','end','json','undefined','limit','offset','count'];(function(_0x504501,_0x3de43a){var _0x5a6e4c=function(_0x2bd0f3){while(--_0x2bd0f3){_0x504501['push'](_0x504501['shift']());}};_0x5a6e4c(++_0x3de43a);}(_0x3e74,0x175));var _0x43e7=function(_0x5b10a9,_0x5d9193){_0x5b10a9=_0x5b10a9-0x0;var _0x14c4cd=_0x3e74[_0x5b10a9];return _0x14c4cd;};'use strict';var emlformat=require(_0x43e7('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x43e7('0x1'));var jsonpatch=require(_0x43e7('0x2'));var rp=require(_0x43e7('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x43e7('0x4'));var util=require('util');var path=require(_0x43e7('0x5'));var sox=require(_0x43e7('0x6'));var csv=require(_0x43e7('0x7'));var ejs=require(_0x43e7('0x8'));var fs=require('fs');var fs_extra=require(_0x43e7('0x9'));var _=require('lodash');var squel=require(_0x43e7('0xa'));var crypto=require(_0x43e7('0xb'));var jsforce=require(_0x43e7('0xc'));var deskjs=require(_0x43e7('0xd'));var toCsv=require(_0x43e7('0x7'));var querystring=require('querystring');var Papa=require(_0x43e7('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x43e7('0xf'));var as=require(_0x43e7('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x43e7('0x11'))('api');var utils=require(_0x43e7('0x12'));var config=require(_0x43e7('0x13'));var licenseUtil=require('../../config/license/util');var db=require(_0x43e7('0x14'))['db'];function respondWithStatusCode(_0xc960ea,_0x2718d3){_0x2718d3=_0x2718d3||0xcc;return function(_0x3bb83f){if(_0x3bb83f){return _0xc960ea['sendStatus'](_0x2718d3);}return _0xc960ea['status'](_0x2718d3)[_0x43e7('0x15')]();};}function respondWithResult(_0x21fdd3,_0x44b0bd){_0x44b0bd=_0x44b0bd||0xc8;return function(_0x51b974){if(_0x51b974){return _0x21fdd3['status'](_0x44b0bd)[_0x43e7('0x16')](_0x51b974);}};}function respondWithFilteredResult(_0x14c146,_0x203378){return function(_0x328445){if(_0x328445){var _0x4de324=typeof _0x203378['offset']===_0x43e7('0x17')&&typeof _0x203378[_0x43e7('0x18')]===_0x43e7('0x17');var _0x5d346f=_0x328445['count'];var _0x446986=_0x4de324?0x0:_0x203378[_0x43e7('0x19')];var _0x9037d3=_0x4de324?_0x328445[_0x43e7('0x1a')]:_0x203378[_0x43e7('0x19')]+_0x203378[_0x43e7('0x18')];var _0x619236;if(_0x9037d3>=_0x5d346f){_0x9037d3=_0x5d346f;_0x619236=0xc8;}else{_0x619236=0xce;}_0x14c146[_0x43e7('0x1b')](_0x619236);return _0x14c146[_0x43e7('0x1c')](_0x43e7('0x1d'),_0x446986+'-'+_0x9037d3+'/'+_0x5d346f)[_0x43e7('0x16')](_0x328445);}return null;};}function patchUpdates(_0x177ee1){return function(_0x4b5d64){try{jsonpatch[_0x43e7('0x1e')](_0x4b5d64,_0x177ee1,!![]);}catch(_0x3c6625){return BPromise['reject'](_0x3c6625);}return _0x4b5d64[_0x43e7('0x1f')]();};}function saveUpdates(_0x3e281e,_0x3945bb){return function(_0x28aacc){if(_0x28aacc){return _0x28aacc[_0x43e7('0x20')](_0x3e281e)[_0x43e7('0x21')](function(_0x54a9e7){return _0x54a9e7;});}return null;};}function removeEntity(_0x454359,_0x4eea52){return function(_0x4c9df3){if(_0x4c9df3){return _0x4c9df3[_0x43e7('0x22')]()[_0x43e7('0x21')](function(){var _0x4b2b9f=_0x4c9df3[_0x43e7('0x23')]({'plain':!![]});var _0x4ca5cf=_0x43e7('0x24');return db['UserProfileResource'][_0x43e7('0x22')]({'where':{'type':_0x4ca5cf,'resourceId':_0x4b2b9f['id']}})[_0x43e7('0x21')](function(){return _0x4c9df3;});})[_0x43e7('0x21')](function(){_0x454359[_0x43e7('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x52b7b3,_0x805b54){return function(_0x501551){if(!_0x501551){_0x52b7b3[_0x43e7('0x25')](0x194);}return _0x501551;};}function handleError(_0x40dc8f,_0x3565cf){_0x3565cf=_0x3565cf||0x1f4;return function(_0xb1fc63){logger['error'](_0xb1fc63[_0x43e7('0x26')]);if(_0xb1fc63[_0x43e7('0x27')]){delete _0xb1fc63[_0x43e7('0x27')];}_0x40dc8f[_0x43e7('0x1b')](_0x3565cf)[_0x43e7('0x28')](_0xb1fc63);};}exports[_0x43e7('0x29')]=function(_0x2b85a5,_0x31b2a6){var _0x3bf475={},_0x35dbcd={},_0x17df44={'count':0x0,'rows':[]};var _0x19725a=_[_0x43e7('0x2a')](db[_0x43e7('0x2b')]['rawAttributes'],function(_0x238321){return{'name':_0x238321[_0x43e7('0x2c')],'type':_0x238321[_0x43e7('0x2d')][_0x43e7('0x2e')]};});_0x35dbcd[_0x43e7('0x2f')]=_['map'](_0x19725a,_0x43e7('0x27'));_0x35dbcd[_0x43e7('0x30')]=_[_0x43e7('0x31')](_0x2b85a5[_0x43e7('0x30')]);_0x35dbcd['filters']=_['intersection'](_0x35dbcd['model'],_0x35dbcd[_0x43e7('0x30')]);_0x3bf475[_0x43e7('0x32')]=_[_0x43e7('0x33')](_0x35dbcd[_0x43e7('0x2f')],qs[_0x43e7('0x34')](_0x2b85a5[_0x43e7('0x30')]['fields']));_0x3bf475['attributes']=_0x3bf475['attributes']['length']?_0x3bf475['attributes']:_0x35dbcd['model'];if(!_0x2b85a5['query'][_0x43e7('0x35')]('nolimit')){_0x3bf475[_0x43e7('0x18')]=qs[_0x43e7('0x18')](_0x2b85a5[_0x43e7('0x30')][_0x43e7('0x18')]);_0x3bf475[_0x43e7('0x19')]=qs[_0x43e7('0x19')](_0x2b85a5[_0x43e7('0x30')]['offset']);}_0x3bf475['order']=qs['sort'](_0x2b85a5[_0x43e7('0x30')][_0x43e7('0x36')]);_0x3bf475[_0x43e7('0x37')]=qs[_0x43e7('0x38')](_[_0x43e7('0x39')](_0x2b85a5[_0x43e7('0x30')],_0x35dbcd[_0x43e7('0x38')]),_0x19725a);if(_0x2b85a5[_0x43e7('0x30')]['filter']){_0x3bf475[_0x43e7('0x37')]=_[_0x43e7('0x3a')](_0x3bf475['where'],{'$or':_[_0x43e7('0x2a')](_0x19725a,function(_0x4c0c7a){if(_0x4c0c7a[_0x43e7('0x2d')]!==_0x43e7('0x3b')){var _0x1c6f45={};_0x1c6f45[_0x4c0c7a[_0x43e7('0x27')]]={'$like':'%'+_0x2b85a5[_0x43e7('0x30')][_0x43e7('0x3c')]+'%'};return _0x1c6f45;}})});}_0x3bf475=_['merge']({},_0x3bf475,_0x2b85a5['options']);var _0x30dfa9={'where':_0x3bf475[_0x43e7('0x37')]};return db[_0x43e7('0x2b')][_0x43e7('0x1a')](_0x30dfa9)[_0x43e7('0x21')](function(_0x4a4a85){_0x17df44[_0x43e7('0x1a')]=_0x4a4a85;if(_0x2b85a5[_0x43e7('0x30')]['includeAll']){_0x3bf475[_0x43e7('0x3d')]=[{'all':!![]}];}return db['AnalyticMetric'][_0x43e7('0x3e')](_0x3bf475);})['then'](function(_0x3d81ae){_0x17df44[_0x43e7('0x3f')]=_0x3d81ae;return _0x17df44;})[_0x43e7('0x21')](respondWithFilteredResult(_0x31b2a6,_0x3bf475))[_0x43e7('0x40')](handleError(_0x31b2a6,null));};exports['show']=function(_0x47d6a1,_0x103393){var _0x40c509={'raw':!![],'where':{'id':_0x47d6a1[_0x43e7('0x41')]['id']}},_0xe979b5={};_0xe979b5['model']=_['keys'](db['AnalyticMetric'][_0x43e7('0x42')]);_0xe979b5['query']=_[_0x43e7('0x31')](_0x47d6a1['query']);_0xe979b5['filters']=_[_0x43e7('0x33')](_0xe979b5['model'],_0xe979b5[_0x43e7('0x30')]);_0x40c509[_0x43e7('0x32')]=_[_0x43e7('0x33')](_0xe979b5[_0x43e7('0x2f')],qs['fields'](_0x47d6a1[_0x43e7('0x30')][_0x43e7('0x34')]));_0x40c509[_0x43e7('0x32')]=_0x40c509[_0x43e7('0x32')][_0x43e7('0x43')]?_0x40c509[_0x43e7('0x32')]:_0xe979b5['model'];if(_0x47d6a1['query'][_0x43e7('0x44')]){_0x40c509[_0x43e7('0x3d')]=[{'all':!![]}];}_0x40c509=_[_0x43e7('0x3a')]({},_0x40c509,_0x47d6a1['options']);return db['AnalyticMetric']['find'](_0x40c509)[_0x43e7('0x21')](handleEntityNotFound(_0x103393,null))[_0x43e7('0x21')](respondWithResult(_0x103393,null))['catch'](handleError(_0x103393,null));};exports[_0x43e7('0x45')]=function(_0x47686e,_0x3c96fe){return db['AnalyticMetric']['create'](_0x47686e['body'],{})['then'](function(_0x214e7e){var _0xe955fc=_0x47686e['user'][_0x43e7('0x23')]({'plain':!![]});if(!_0xe955fc)throw new Error(_0x43e7('0x46'));if(_0xe955fc[_0x43e7('0x47')]===_0x43e7('0x48')){var _0x4a0ce5=_0x214e7e[_0x43e7('0x23')]({'plain':!![]});var _0x483f20='Metrics';return db[_0x43e7('0x49')][_0x43e7('0x4a')]({'where':{'name':_0x483f20,'userProfileId':_0xe955fc[_0x43e7('0x4b')]},'raw':!![]})[_0x43e7('0x21')](function(_0x13503c){if(_0x13503c&&_0x13503c[_0x43e7('0x4c')]===0x0){return db[_0x43e7('0x4d')][_0x43e7('0x45')]({'name':_0x4a0ce5[_0x43e7('0x27')],'resourceId':_0x4a0ce5['id'],'type':_0x13503c[_0x43e7('0x27')],'sectionId':_0x13503c['id']},{})['then'](function(){return _0x214e7e;});}else{return _0x214e7e;}})[_0x43e7('0x40')](function(_0x46c910){logger['error'](_0x43e7('0x4e'),_0x46c910);throw _0x46c910;});}return _0x214e7e;})['then'](respondWithResult(_0x3c96fe,0xc9))[_0x43e7('0x40')](handleError(_0x3c96fe,null));};exports[_0x43e7('0x20')]=function(_0x34e2ec,_0x1f561f){if(_0x34e2ec[_0x43e7('0x4f')]['id']){delete _0x34e2ec['body']['id'];}return db['AnalyticMetric'][_0x43e7('0x4a')]({'where':{'id':_0x34e2ec[_0x43e7('0x41')]['id']}})[_0x43e7('0x21')](handleEntityNotFound(_0x1f561f,null))[_0x43e7('0x21')](saveUpdates(_0x34e2ec[_0x43e7('0x4f')],null))[_0x43e7('0x21')](respondWithResult(_0x1f561f,null))[_0x43e7('0x40')](handleError(_0x1f561f,null));};exports[_0x43e7('0x22')]=function(_0x26d86c,_0x24e758){return db[_0x43e7('0x2b')]['find']({'where':{'id':_0x26d86c[_0x43e7('0x41')]['id']}})[_0x43e7('0x21')](handleEntityNotFound(_0x24e758,null))['then'](removeEntity(_0x24e758,null))[_0x43e7('0x40')](handleError(_0x24e758,null));};
\ No newline at end of file
index 1f966d9..20ce05e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x81c6=['AnalyticMetric','util','bluebird','request-promise','path','../../config/environment','./analyticMetric.attributes','exports','define'];(function(_0x4c6d70,_0x195007){var _0x51f476=function(_0x282d1e){while(--_0x282d1e){_0x4c6d70['push'](_0x4c6d70['shift']());}};_0x51f476(++_0x195007);}(_0x81c6,0x1d5));var _0x681c=function(_0x27380a,_0x11b4db){_0x27380a=_0x27380a-0x0;var _0x49557d=_0x81c6[_0x27380a];return _0x49557d;};'use strict';var _=require('lodash');var util=require(_0x681c('0x0'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x681c('0x1'));var rp=require(_0x681c('0x2'));var fs=require('fs');var path=require(_0x681c('0x3'));var rimraf=require('rimraf');var config=require(_0x681c('0x4'));var attributes=require(_0x681c('0x5'));module[_0x681c('0x6')]=function(_0x1d31c8,_0x4ea522){return _0x1d31c8[_0x681c('0x7')](_0x681c('0x8'),attributes,{'tableName':'analytics_metrics','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x9a96=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./analyticMetric.attributes','exports','define','AnalyticMetric','analytics_metrics','lodash','util'];(function(_0x4550fc,_0x327d3e){var _0x4e6e5a=function(_0x38c89e){while(--_0x38c89e){_0x4550fc['push'](_0x4550fc['shift']());}};_0x4e6e5a(++_0x327d3e);}(_0x9a96,0xd0));var _0x69a9=function(_0x4c4b71,_0x310603){_0x4c4b71=_0x4c4b71-0x0;var _0x173072=_0x9a96[_0x4c4b71];return _0x173072;};'use strict';var _=require(_0x69a9('0x0'));var util=require(_0x69a9('0x1'));var logger=require(_0x69a9('0x2'))(_0x69a9('0x3'));var moment=require(_0x69a9('0x4'));var BPromise=require(_0x69a9('0x5'));var rp=require(_0x69a9('0x6'));var fs=require('fs');var path=require(_0x69a9('0x7'));var rimraf=require(_0x69a9('0x8'));var config=require(_0x69a9('0x9'));var attributes=require(_0x69a9('0xa'));module[_0x69a9('0xb')]=function(_0x5a48bf,_0x245072){return _0x5a48bf[_0x69a9('0xc')](_0x69a9('0xd'),attributes,{'tableName':_0x69a9('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index d55fb7f..2186ced 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7b2d=['../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','AnalyticMetric,\x20%s,\x20%s','debug','AnalyticMetric,\x20%s,\x20%s,\x20%s','error','code','message','request\x20sent','catch','lodash','util','bluebird','randomstring','ioredis'];(function(_0xbee8ad,_0x1595fb){var _0x4665ff=function(_0x1c48fe){while(--_0x1c48fe){_0xbee8ad['push'](_0xbee8ad['shift']());}};_0x4665ff(++_0x1595fb);}(_0x7b2d,0x6e));var _0xd7b2=function(_0x1cc8fe,_0x105328){_0x1cc8fe=_0x1cc8fe-0x0;var _0x230054=_0x7b2d[_0x1cc8fe];return _0x230054;};'use strict';var _=require(_0xd7b2('0x0'));var util=require(_0xd7b2('0x1'));var moment=require('moment');var BPromise=require(_0xd7b2('0x2'));var rs=require(_0xd7b2('0x3'));var fs=require('fs');var Redis=require(_0xd7b2('0x4'));var db=require(_0xd7b2('0x5'))['db'];var utils=require(_0xd7b2('0x6'));var logger=require(_0xd7b2('0x7'))('rpc');var config=require(_0xd7b2('0x8'));var jayson=require(_0xd7b2('0x9'));var client=jayson[_0xd7b2('0xa')][_0xd7b2('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x180b57,_0x3ddb68,_0x5e5f3f){return new BPromise(function(_0x412e8c,_0x4caaee){return client[_0xd7b2('0xc')](_0x180b57,_0x5e5f3f)[_0xd7b2('0xd')](function(_0x489344){logger[_0xd7b2('0xe')](_0xd7b2('0xf'),_0x3ddb68,'request\x20sent');logger[_0xd7b2('0x10')](_0xd7b2('0x11'),_0x3ddb68,'request\x20sent',JSON['stringify'](_0x489344));if(_0x489344[_0xd7b2('0x12')]){if(_0x489344['error'][_0xd7b2('0x13')]===0x1f4){logger[_0xd7b2('0x12')](_0xd7b2('0xf'),_0x3ddb68,_0x489344[_0xd7b2('0x12')][_0xd7b2('0x14')]);return _0x4caaee(_0x489344[_0xd7b2('0x12')][_0xd7b2('0x14')]);}logger[_0xd7b2('0x12')]('AnalyticMetric,\x20%s,\x20%s',_0x3ddb68,_0x489344[_0xd7b2('0x12')][_0xd7b2('0x14')]);return _0x412e8c(_0x489344[_0xd7b2('0x12')][_0xd7b2('0x14')]);}else{logger['info'](_0xd7b2('0xf'),_0x3ddb68,_0xd7b2('0x15'));_0x412e8c(_0x489344['result']['message']);}})[_0xd7b2('0x16')](function(_0x4a1a3d){logger['error'](_0xd7b2('0xf'),_0x3ddb68,_0x4a1a3d);_0x4caaee(_0x4a1a3d);});});}
\ No newline at end of file
+var _0x6064=['debug','stringify','error','code','message','catch','lodash','util','moment','randomstring','ioredis','rpc','../../config/environment','jayson/promise','client','http','info','AnalyticMetric,\x20%s,\x20%s','request\x20sent'];(function(_0x2ca2d0,_0x3ea8e4){var _0x521c23=function(_0x5b0731){while(--_0x5b0731){_0x2ca2d0['push'](_0x2ca2d0['shift']());}};_0x521c23(++_0x3ea8e4);}(_0x6064,0x15c));var _0x4606=function(_0x3fb45f,_0x35200b){_0x3fb45f=_0x3fb45f-0x0;var _0x1790f1=_0x6064[_0x3fb45f];return _0x1790f1;};'use strict';var _=require(_0x4606('0x0'));var util=require(_0x4606('0x1'));var moment=require(_0x4606('0x2'));var BPromise=require('bluebird');var rs=require(_0x4606('0x3'));var fs=require('fs');var Redis=require(_0x4606('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x4606('0x5'));var config=require(_0x4606('0x6'));var jayson=require(_0x4606('0x7'));var client=jayson[_0x4606('0x8')][_0x4606('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2f7ac3,_0x5a9c84,_0x58cec6){return new BPromise(function(_0x3d3129,_0x54a61f){return client['request'](_0x2f7ac3,_0x58cec6)['then'](function(_0x193b6b){logger[_0x4606('0xa')](_0x4606('0xb'),_0x5a9c84,_0x4606('0xc'));logger[_0x4606('0xd')]('AnalyticMetric,\x20%s,\x20%s,\x20%s',_0x5a9c84,_0x4606('0xc'),JSON[_0x4606('0xe')](_0x193b6b));if(_0x193b6b[_0x4606('0xf')]){if(_0x193b6b['error'][_0x4606('0x10')]===0x1f4){logger[_0x4606('0xf')](_0x4606('0xb'),_0x5a9c84,_0x193b6b[_0x4606('0xf')][_0x4606('0x11')]);return _0x54a61f(_0x193b6b['error']['message']);}logger['error']('AnalyticMetric,\x20%s,\x20%s',_0x5a9c84,_0x193b6b[_0x4606('0xf')][_0x4606('0x11')]);return _0x3d3129(_0x193b6b[_0x4606('0xf')][_0x4606('0x11')]);}else{logger['info'](_0x4606('0xb'),_0x5a9c84,_0x4606('0xc'));_0x3d3129(_0x193b6b['result'][_0x4606('0x11')]);}})[_0x4606('0x12')](function(_0x555203){logger['error'](_0x4606('0xb'),_0x5a9c84,_0x555203);_0x54a61f(_0x555203);});});}
\ No newline at end of file
index 73e0ff0..fdb0a17 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0f80=['get','isAuthenticated','index','/:id','show','create','put','update','delete','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x2ac71a,_0x1d2a02){var _0x3ee904=function(_0x5c902a){while(--_0x5c902a){_0x2ac71a['push'](_0x2ac71a['shift']());}};_0x3ee904(++_0x1d2a02);}(_0x0f80,0x108));var _0x00f8=function(_0x56952b,_0x6368ce){_0x56952b=_0x56952b-0x0;var _0x18cf2f=_0x0f80[_0x56952b];return _0x18cf2f;};'use strict';var multer=require('multer');var util=require(_0x00f8('0x0'));var path=require(_0x00f8('0x1'));var timeout=require(_0x00f8('0x2'));var express=require(_0x00f8('0x3'));var router=express[_0x00f8('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x00f8('0x5'));var interaction=require(_0x00f8('0x6'));var config=require(_0x00f8('0x7'));var controller=require('./analyticMetric.controller');router[_0x00f8('0x8')]('/',auth[_0x00f8('0x9')](),controller[_0x00f8('0xa')]);router[_0x00f8('0x8')](_0x00f8('0xb'),auth[_0x00f8('0x9')](),controller[_0x00f8('0xc')]);router['post']('/',auth[_0x00f8('0x9')](),controller[_0x00f8('0xd')]);router[_0x00f8('0xe')]('/:id',auth[_0x00f8('0x9')](),controller[_0x00f8('0xf')]);router[_0x00f8('0x10')](_0x00f8('0xb'),auth[_0x00f8('0x9')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x4d49=['create','put','update','delete','destroy','exports','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticMetric.controller','get','index','/:id','isAuthenticated','show','post'];(function(_0x27d4f8,_0x10575f){var _0x265bab=function(_0x2ba92e){while(--_0x2ba92e){_0x27d4f8['push'](_0x27d4f8['shift']());}};_0x265bab(++_0x10575f);}(_0x4d49,0x141));var _0x94d4=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x4d49[_0x1facfa];return _0x9ec701;};'use strict';var multer=require('multer');var util=require(_0x94d4('0x0'));var path=require('path');var timeout=require(_0x94d4('0x1'));var express=require(_0x94d4('0x2'));var router=express[_0x94d4('0x3')]();var fs_extra=require(_0x94d4('0x4'));var auth=require(_0x94d4('0x5'));var interaction=require(_0x94d4('0x6'));var config=require(_0x94d4('0x7'));var controller=require(_0x94d4('0x8'));router[_0x94d4('0x9')]('/',auth['isAuthenticated'](),controller[_0x94d4('0xa')]);router[_0x94d4('0x9')](_0x94d4('0xb'),auth[_0x94d4('0xc')](),controller[_0x94d4('0xd')]);router[_0x94d4('0xe')]('/',auth['isAuthenticated'](),controller[_0x94d4('0xf')]);router[_0x94d4('0x10')]('/:id',auth[_0x94d4('0xc')](),controller[_0x94d4('0x11')]);router[_0x94d4('0x12')](_0x94d4('0xb'),auth['isAuthenticated'](),controller[_0x94d4('0x13')]);module[_0x94d4('0x14')]=router;
\ No newline at end of file
index 354bd1a..67b9f2e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe7e1=['sequelize','TEXT'];(function(_0x17d70d,_0x1998ce){var _0x540290=function(_0x9c5493){while(--_0x9c5493){_0x17d70d['push'](_0x17d70d['shift']());}};_0x540290(++_0x1998ce);}(_0xe7e1,0xc6));var _0x1e7e=function(_0x1a36a5,_0x746928){_0x1a36a5=_0x1a36a5-0x0;var _0x746243=_0xe7e1[_0x1a36a5];return _0x746243;};'use strict';var Sequelize=require(_0x1e7e('0x0'));module['exports']={'tree':{'type':Sequelize[_0x1e7e('0x1')],'allowNull':![]}};
\ No newline at end of file
+var _0xf8b9=['exports','sequelize'];(function(_0x4953ac,_0x1c41fe){var _0x5b5303=function(_0x4a2143){while(--_0x4a2143){_0x4953ac['push'](_0x4953ac['shift']());}};_0x5b5303(++_0x1c41fe);}(_0xf8b9,0x1e5));var _0x9f8b=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xf8b9[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0x9f8b('0x0'));module[_0x9f8b('0x1')]={'tree':{'type':Sequelize['TEXT'],'allowNull':![]}};
\ No newline at end of file
index dfc60da..f4a837d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1d5a=['length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','include','findAll','rows','catch','show','params','includeAll','find','create','body','destroy','eml-format','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','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','end','offset','undefined','count','limit','status','set','Content-Range','json','apply','reject','update','then','error','stack','name','send','index','map','AnalyticTreeReport','rawAttributes','type','key','query','keys','filters','intersection','model','attributes','fields'];(function(_0x363743,_0x369d16){var _0x270606=function(_0x540105){while(--_0x540105){_0x363743['push'](_0x363743['shift']());}};_0x270606(++_0x369d16);}(_0x1d5a,0x19b));var _0xa1d5=function(_0x261f8e,_0xc79b51){_0x261f8e=_0x261f8e-0x0;var _0xf215e5=_0x1d5a[_0x261f8e];return _0xf215e5;};'use strict';var emlformat=require(_0xa1d5('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xa1d5('0x1'));var rp=require(_0xa1d5('0x2'));var moment=require(_0xa1d5('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xa1d5('0x4'));var util=require(_0xa1d5('0x5'));var path=require(_0xa1d5('0x6'));var sox=require(_0xa1d5('0x7'));var csv=require(_0xa1d5('0x8'));var ejs=require(_0xa1d5('0x9'));var fs=require('fs');var fs_extra=require(_0xa1d5('0xa'));var _=require(_0xa1d5('0xb'));var squel=require('squel');var crypto=require(_0xa1d5('0xc'));var jsforce=require(_0xa1d5('0xd'));var deskjs=require(_0xa1d5('0xe'));var toCsv=require(_0xa1d5('0x8'));var querystring=require(_0xa1d5('0xf'));var Papa=require(_0xa1d5('0x10'));var Redis=require(_0xa1d5('0x11'));var authService=require(_0xa1d5('0x12'));var qs=require(_0xa1d5('0x13'));var as=require(_0xa1d5('0x14'));var hardwareService=require(_0xa1d5('0x15'));var logger=require('../../config/logger')(_0xa1d5('0x16'));var utils=require(_0xa1d5('0x17'));var config=require(_0xa1d5('0x18'));var licenseUtil=require(_0xa1d5('0x19'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5bf31d,_0x9e30e6){_0x9e30e6=_0x9e30e6||0xcc;return function(_0x2739b4){if(_0x2739b4){return _0x5bf31d[_0xa1d5('0x1a')](_0x9e30e6);}return _0x5bf31d['status'](_0x9e30e6)[_0xa1d5('0x1b')]();};}function respondWithResult(_0x16cf7c,_0x3e709b){_0x3e709b=_0x3e709b||0xc8;return function(_0x420bb3){if(_0x420bb3){return _0x16cf7c['status'](_0x3e709b)['json'](_0x420bb3);}};}function respondWithFilteredResult(_0x48db48,_0x16dbf6){return function(_0x234ba9){if(_0x234ba9){var _0x1bec41=typeof _0x16dbf6[_0xa1d5('0x1c')]===_0xa1d5('0x1d')&&typeof _0x16dbf6['limit']===_0xa1d5('0x1d');var _0x2e7d65=_0x234ba9[_0xa1d5('0x1e')];var _0x2f65a4=_0x1bec41?0x0:_0x16dbf6['offset'];var _0x58f2ea=_0x1bec41?_0x234ba9[_0xa1d5('0x1e')]:_0x16dbf6[_0xa1d5('0x1c')]+_0x16dbf6[_0xa1d5('0x1f')];var _0x41d2e8;if(_0x58f2ea>=_0x2e7d65){_0x58f2ea=_0x2e7d65;_0x41d2e8=0xc8;}else{_0x41d2e8=0xce;}_0x48db48[_0xa1d5('0x20')](_0x41d2e8);return _0x48db48[_0xa1d5('0x21')](_0xa1d5('0x22'),_0x2f65a4+'-'+_0x58f2ea+'/'+_0x2e7d65)[_0xa1d5('0x23')](_0x234ba9);}return null;};}function patchUpdates(_0x4756e5){return function(_0x3862c6){try{jsonpatch[_0xa1d5('0x24')](_0x3862c6,_0x4756e5,!![]);}catch(_0x548a3b){return BPromise[_0xa1d5('0x25')](_0x548a3b);}return _0x3862c6['save']();};}function saveUpdates(_0x2ba309,_0x163e29){return function(_0x5d2bfe){if(_0x5d2bfe){return _0x5d2bfe[_0xa1d5('0x26')](_0x2ba309)[_0xa1d5('0x27')](function(_0x489f55){return _0x489f55;});}return null;};}function removeEntity(_0x223f5a,_0x4978d4){return function(_0x5cbbb6){if(_0x5cbbb6){return _0x5cbbb6['destroy']()[_0xa1d5('0x27')](function(){_0x223f5a[_0xa1d5('0x20')](0xcc)[_0xa1d5('0x1b')]();});}};}function handleEntityNotFound(_0x81a258,_0x1da3c4){return function(_0x53372f){if(!_0x53372f){_0x81a258[_0xa1d5('0x1a')](0x194);}return _0x53372f;};}function handleError(_0x315cb7,_0xe2131f){_0xe2131f=_0xe2131f||0x1f4;return function(_0x1106a2){logger[_0xa1d5('0x28')](_0x1106a2[_0xa1d5('0x29')]);if(_0x1106a2[_0xa1d5('0x2a')]){delete _0x1106a2[_0xa1d5('0x2a')];}_0x315cb7[_0xa1d5('0x20')](_0xe2131f)[_0xa1d5('0x2b')](_0x1106a2);};}exports[_0xa1d5('0x2c')]=function(_0x4488b4,_0x3b896d){var _0x436cf8={},_0x15f203={},_0x4b1a8d={'count':0x0,'rows':[]};var _0x273707=_[_0xa1d5('0x2d')](db[_0xa1d5('0x2e')][_0xa1d5('0x2f')],function(_0x2e63ce){return{'name':_0x2e63ce['fieldName'],'type':_0x2e63ce[_0xa1d5('0x30')][_0xa1d5('0x31')]};});_0x15f203['model']=_['map'](_0x273707,_0xa1d5('0x2a'));_0x15f203[_0xa1d5('0x32')]=_[_0xa1d5('0x33')](_0x4488b4[_0xa1d5('0x32')]);_0x15f203[_0xa1d5('0x34')]=_[_0xa1d5('0x35')](_0x15f203[_0xa1d5('0x36')],_0x15f203['query']);_0x436cf8[_0xa1d5('0x37')]=_[_0xa1d5('0x35')](_0x15f203[_0xa1d5('0x36')],qs[_0xa1d5('0x38')](_0x4488b4[_0xa1d5('0x32')]['fields']));_0x436cf8[_0xa1d5('0x37')]=_0x436cf8[_0xa1d5('0x37')][_0xa1d5('0x39')]?_0x436cf8['attributes']:_0x15f203[_0xa1d5('0x36')];if(!_0x4488b4[_0xa1d5('0x32')][_0xa1d5('0x3a')](_0xa1d5('0x3b'))){_0x436cf8[_0xa1d5('0x1f')]=qs[_0xa1d5('0x1f')](_0x4488b4['query']['limit']);_0x436cf8['offset']=qs[_0xa1d5('0x1c')](_0x4488b4['query'][_0xa1d5('0x1c')]);}_0x436cf8[_0xa1d5('0x3c')]=qs[_0xa1d5('0x3d')](_0x4488b4[_0xa1d5('0x32')][_0xa1d5('0x3d')]);_0x436cf8[_0xa1d5('0x3e')]=qs[_0xa1d5('0x34')](_[_0xa1d5('0x3f')](_0x4488b4[_0xa1d5('0x32')],_0x15f203[_0xa1d5('0x34')]),_0x273707);if(_0x4488b4[_0xa1d5('0x32')][_0xa1d5('0x40')]){_0x436cf8['where']=_[_0xa1d5('0x41')](_0x436cf8['where'],{'$or':_[_0xa1d5('0x2d')](_0x273707,function(_0x1fdb5b){if(_0x1fdb5b[_0xa1d5('0x30')]!==_0xa1d5('0x42')){var _0x3e77e5={};_0x3e77e5[_0x1fdb5b[_0xa1d5('0x2a')]]={'$like':'%'+_0x4488b4['query'][_0xa1d5('0x40')]+'%'};return _0x3e77e5;}})});}_0x436cf8=_[_0xa1d5('0x41')]({},_0x436cf8,_0x4488b4['options']);var _0x5a6eda={'where':_0x436cf8[_0xa1d5('0x3e')]};return db[_0xa1d5('0x2e')][_0xa1d5('0x1e')](_0x5a6eda)[_0xa1d5('0x27')](function(_0x425eab){_0x4b1a8d[_0xa1d5('0x1e')]=_0x425eab;if(_0x4488b4['query']['includeAll']){_0x436cf8[_0xa1d5('0x43')]=[{'all':!![]}];}return db[_0xa1d5('0x2e')][_0xa1d5('0x44')](_0x436cf8);})[_0xa1d5('0x27')](function(_0x48ba5b){_0x4b1a8d[_0xa1d5('0x45')]=_0x48ba5b;return _0x4b1a8d;})['then'](respondWithFilteredResult(_0x3b896d,_0x436cf8))[_0xa1d5('0x46')](handleError(_0x3b896d,null));};exports[_0xa1d5('0x47')]=function(_0x65c0ff,_0x5d2e38){var _0x755efd={'raw':!![],'where':{'id':_0x65c0ff[_0xa1d5('0x48')]['id']}},_0x55053e={};_0x55053e['model']=_[_0xa1d5('0x33')](db['AnalyticTreeReport'][_0xa1d5('0x2f')]);_0x55053e['query']=_[_0xa1d5('0x33')](_0x65c0ff[_0xa1d5('0x32')]);_0x55053e[_0xa1d5('0x34')]=_[_0xa1d5('0x35')](_0x55053e[_0xa1d5('0x36')],_0x55053e[_0xa1d5('0x32')]);_0x755efd['attributes']=_[_0xa1d5('0x35')](_0x55053e[_0xa1d5('0x36')],qs[_0xa1d5('0x38')](_0x65c0ff['query']['fields']));_0x755efd['attributes']=_0x755efd[_0xa1d5('0x37')][_0xa1d5('0x39')]?_0x755efd[_0xa1d5('0x37')]:_0x55053e[_0xa1d5('0x36')];if(_0x65c0ff['query'][_0xa1d5('0x49')]){_0x755efd[_0xa1d5('0x43')]=[{'all':!![]}];}_0x755efd=_['merge']({},_0x755efd,_0x65c0ff['options']);return db[_0xa1d5('0x2e')][_0xa1d5('0x4a')](_0x755efd)[_0xa1d5('0x27')](handleEntityNotFound(_0x5d2e38,null))['then'](respondWithResult(_0x5d2e38,null))['catch'](handleError(_0x5d2e38,null));};exports[_0xa1d5('0x4b')]=function(_0x17a5af,_0x12aa92){return db['AnalyticTreeReport'][_0xa1d5('0x4b')](_0x17a5af[_0xa1d5('0x4c')],{})[_0xa1d5('0x27')](respondWithResult(_0x12aa92,0xc9))[_0xa1d5('0x46')](handleError(_0x12aa92,null));};exports[_0xa1d5('0x26')]=function(_0x2c35d9,_0x29221f){if(_0x2c35d9['body']['id']){delete _0x2c35d9[_0xa1d5('0x4c')]['id'];}return db[_0xa1d5('0x2e')][_0xa1d5('0x4a')]({'where':{'id':_0x2c35d9['params']['id']}})[_0xa1d5('0x27')](handleEntityNotFound(_0x29221f,null))[_0xa1d5('0x27')](saveUpdates(_0x2c35d9[_0xa1d5('0x4c')],null))[_0xa1d5('0x27')](respondWithResult(_0x29221f,null))[_0xa1d5('0x46')](handleError(_0x29221f,null));};exports[_0xa1d5('0x4d')]=function(_0x2acfec,_0x495a08){return db[_0xa1d5('0x2e')][_0xa1d5('0x4a')]({'where':{'id':_0x2acfec[_0xa1d5('0x48')]['id']}})['then'](handleEntityNotFound(_0x495a08,null))[_0xa1d5('0x27')](removeEntity(_0x495a08,null))[_0xa1d5('0x46')](handleError(_0x495a08,null));};
\ No newline at end of file
+var _0x4dd4=['moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../mysqldb','sendStatus','status','json','offset','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','end','stack','name','index','map','AnalyticTreeReport','rawAttributes','fieldName','key','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','sort','where','filter','merge','type','VIRTUAL','options','includeAll','include','rows','catch','show','params','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch'];(function(_0x28f0dd,_0x4cddd2){var _0x4f73cd=function(_0x2daf81){while(--_0x2daf81){_0x28f0dd['push'](_0x28f0dd['shift']());}};_0x4f73cd(++_0x4cddd2);}(_0x4dd4,0x1f4));var _0x44dd=function(_0x6703dd,_0x3df42d){_0x6703dd=_0x6703dd-0x0;var _0x1b62fa=_0x4dd4[_0x6703dd];return _0x1b62fa;};'use strict';var emlformat=require(_0x44dd('0x0'));var rimraf=require(_0x44dd('0x1'));var zipdir=require(_0x44dd('0x2'));var jsonpatch=require(_0x44dd('0x3'));var rp=require('request-promise');var moment=require(_0x44dd('0x4'));var BPromise=require(_0x44dd('0x5'));var Mustache=require(_0x44dd('0x6'));var util=require(_0x44dd('0x7'));var path=require(_0x44dd('0x8'));var sox=require(_0x44dd('0x9'));var csv=require(_0x44dd('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x44dd('0xb'));var _=require('lodash');var squel=require(_0x44dd('0xc'));var crypto=require(_0x44dd('0xd'));var jsforce=require(_0x44dd('0xe'));var deskjs=require(_0x44dd('0xf'));var toCsv=require(_0x44dd('0xa'));var querystring=require(_0x44dd('0x10'));var Papa=require(_0x44dd('0x11'));var Redis=require(_0x44dd('0x12'));var authService=require(_0x44dd('0x13'));var qs=require(_0x44dd('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x44dd('0x15'))(_0x44dd('0x16'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x44dd('0x17'))['db'];function respondWithStatusCode(_0x2ea2d4,_0x40b84d){_0x40b84d=_0x40b84d||0xcc;return function(_0x4ed19b){if(_0x4ed19b){return _0x2ea2d4[_0x44dd('0x18')](_0x40b84d);}return _0x2ea2d4[_0x44dd('0x19')](_0x40b84d)['end']();};}function respondWithResult(_0x7c57ff,_0x44d196){_0x44d196=_0x44d196||0xc8;return function(_0x29e78f){if(_0x29e78f){return _0x7c57ff[_0x44dd('0x19')](_0x44d196)[_0x44dd('0x1a')](_0x29e78f);}};}function respondWithFilteredResult(_0x29991e,_0x3e41f6){return function(_0x407b85){if(_0x407b85){var _0x2e6436=typeof _0x3e41f6[_0x44dd('0x1b')]==='undefined'&&typeof _0x3e41f6[_0x44dd('0x1c')]==='undefined';var _0x114504=_0x407b85['count'];var _0x246ba2=_0x2e6436?0x0:_0x3e41f6['offset'];var _0x145d04=_0x2e6436?_0x407b85[_0x44dd('0x1d')]:_0x3e41f6[_0x44dd('0x1b')]+_0x3e41f6['limit'];var _0x1aa7a0;if(_0x145d04>=_0x114504){_0x145d04=_0x114504;_0x1aa7a0=0xc8;}else{_0x1aa7a0=0xce;}_0x29991e[_0x44dd('0x19')](_0x1aa7a0);return _0x29991e[_0x44dd('0x1e')](_0x44dd('0x1f'),_0x246ba2+'-'+_0x145d04+'/'+_0x114504)[_0x44dd('0x1a')](_0x407b85);}return null;};}function patchUpdates(_0x70494){return function(_0x1f2433){try{jsonpatch[_0x44dd('0x20')](_0x1f2433,_0x70494,!![]);}catch(_0x329a24){return BPromise[_0x44dd('0x21')](_0x329a24);}return _0x1f2433[_0x44dd('0x22')]();};}function saveUpdates(_0x25d685,_0x1428e5){return function(_0xb35875){if(_0xb35875){return _0xb35875[_0x44dd('0x23')](_0x25d685)[_0x44dd('0x24')](function(_0x2e293f){return _0x2e293f;});}return null;};}function removeEntity(_0x29e5e0,_0x4ece09){return function(_0x2622d3){if(_0x2622d3){return _0x2622d3[_0x44dd('0x25')]()[_0x44dd('0x24')](function(){_0x29e5e0[_0x44dd('0x19')](0xcc)[_0x44dd('0x26')]();});}};}function handleEntityNotFound(_0x30497a,_0x432d02){return function(_0x28b29b){if(!_0x28b29b){_0x30497a['sendStatus'](0x194);}return _0x28b29b;};}function handleError(_0x3a0b36,_0x5bd691){_0x5bd691=_0x5bd691||0x1f4;return function(_0x27112d){logger['error'](_0x27112d[_0x44dd('0x27')]);if(_0x27112d[_0x44dd('0x28')]){delete _0x27112d['name'];}_0x3a0b36[_0x44dd('0x19')](_0x5bd691)['send'](_0x27112d);};}exports[_0x44dd('0x29')]=function(_0xd61862,_0x3772c3){var _0x5b4822={},_0x21471d={},_0x5507={'count':0x0,'rows':[]};var _0x54af0c=_[_0x44dd('0x2a')](db[_0x44dd('0x2b')][_0x44dd('0x2c')],function(_0x3e5c9d){return{'name':_0x3e5c9d[_0x44dd('0x2d')],'type':_0x3e5c9d['type'][_0x44dd('0x2e')]};});_0x21471d[_0x44dd('0x2f')]=_[_0x44dd('0x2a')](_0x54af0c,_0x44dd('0x28'));_0x21471d[_0x44dd('0x30')]=_[_0x44dd('0x31')](_0xd61862['query']);_0x21471d[_0x44dd('0x32')]=_['intersection'](_0x21471d[_0x44dd('0x2f')],_0x21471d[_0x44dd('0x30')]);_0x5b4822[_0x44dd('0x33')]=_[_0x44dd('0x34')](_0x21471d[_0x44dd('0x2f')],qs[_0x44dd('0x35')](_0xd61862[_0x44dd('0x30')]['fields']));_0x5b4822[_0x44dd('0x33')]=_0x5b4822[_0x44dd('0x33')][_0x44dd('0x36')]?_0x5b4822[_0x44dd('0x33')]:_0x21471d[_0x44dd('0x2f')];if(!_0xd61862[_0x44dd('0x30')][_0x44dd('0x37')]('nolimit')){_0x5b4822[_0x44dd('0x1c')]=qs[_0x44dd('0x1c')](_0xd61862['query'][_0x44dd('0x1c')]);_0x5b4822[_0x44dd('0x1b')]=qs[_0x44dd('0x1b')](_0xd61862[_0x44dd('0x30')][_0x44dd('0x1b')]);}_0x5b4822['order']=qs['sort'](_0xd61862[_0x44dd('0x30')][_0x44dd('0x38')]);_0x5b4822[_0x44dd('0x39')]=qs[_0x44dd('0x32')](_['pick'](_0xd61862[_0x44dd('0x30')],_0x21471d[_0x44dd('0x32')]),_0x54af0c);if(_0xd61862[_0x44dd('0x30')][_0x44dd('0x3a')]){_0x5b4822[_0x44dd('0x39')]=_[_0x44dd('0x3b')](_0x5b4822[_0x44dd('0x39')],{'$or':_[_0x44dd('0x2a')](_0x54af0c,function(_0x482ca4){if(_0x482ca4[_0x44dd('0x3c')]!==_0x44dd('0x3d')){var _0x1ac65a={};_0x1ac65a[_0x482ca4['name']]={'$like':'%'+_0xd61862[_0x44dd('0x30')][_0x44dd('0x3a')]+'%'};return _0x1ac65a;}})});}_0x5b4822=_[_0x44dd('0x3b')]({},_0x5b4822,_0xd61862[_0x44dd('0x3e')]);var _0x5c2251={'where':_0x5b4822[_0x44dd('0x39')]};return db['AnalyticTreeReport'][_0x44dd('0x1d')](_0x5c2251)[_0x44dd('0x24')](function(_0x124bf1){_0x5507['count']=_0x124bf1;if(_0xd61862['query'][_0x44dd('0x3f')]){_0x5b4822[_0x44dd('0x40')]=[{'all':!![]}];}return db[_0x44dd('0x2b')]['findAll'](_0x5b4822);})['then'](function(_0x5cfdd){_0x5507[_0x44dd('0x41')]=_0x5cfdd;return _0x5507;})[_0x44dd('0x24')](respondWithFilteredResult(_0x3772c3,_0x5b4822))[_0x44dd('0x42')](handleError(_0x3772c3,null));};exports[_0x44dd('0x43')]=function(_0x434970,_0x53dc16){var _0x3a40d2={'raw':!![],'where':{'id':_0x434970[_0x44dd('0x44')]['id']}},_0xab1159={};_0xab1159[_0x44dd('0x2f')]=_['keys'](db[_0x44dd('0x2b')][_0x44dd('0x2c')]);_0xab1159['query']=_[_0x44dd('0x31')](_0x434970[_0x44dd('0x30')]);_0xab1159[_0x44dd('0x32')]=_[_0x44dd('0x34')](_0xab1159[_0x44dd('0x2f')],_0xab1159[_0x44dd('0x30')]);_0x3a40d2[_0x44dd('0x33')]=_[_0x44dd('0x34')](_0xab1159[_0x44dd('0x2f')],qs[_0x44dd('0x35')](_0x434970[_0x44dd('0x30')][_0x44dd('0x35')]));_0x3a40d2[_0x44dd('0x33')]=_0x3a40d2['attributes'][_0x44dd('0x36')]?_0x3a40d2['attributes']:_0xab1159[_0x44dd('0x2f')];if(_0x434970[_0x44dd('0x30')][_0x44dd('0x3f')]){_0x3a40d2[_0x44dd('0x40')]=[{'all':!![]}];}_0x3a40d2=_[_0x44dd('0x3b')]({},_0x3a40d2,_0x434970[_0x44dd('0x3e')]);return db[_0x44dd('0x2b')][_0x44dd('0x45')](_0x3a40d2)[_0x44dd('0x24')](handleEntityNotFound(_0x53dc16,null))[_0x44dd('0x24')](respondWithResult(_0x53dc16,null))[_0x44dd('0x42')](handleError(_0x53dc16,null));};exports[_0x44dd('0x46')]=function(_0x54b43f,_0x291dfb){return db[_0x44dd('0x2b')][_0x44dd('0x46')](_0x54b43f[_0x44dd('0x47')],{})[_0x44dd('0x24')](respondWithResult(_0x291dfb,0xc9))['catch'](handleError(_0x291dfb,null));};exports[_0x44dd('0x23')]=function(_0x214c45,_0x304507){if(_0x214c45['body']['id']){delete _0x214c45[_0x44dd('0x47')]['id'];}return db[_0x44dd('0x2b')][_0x44dd('0x45')]({'where':{'id':_0x214c45['params']['id']}})[_0x44dd('0x24')](handleEntityNotFound(_0x304507,null))[_0x44dd('0x24')](saveUpdates(_0x214c45[_0x44dd('0x47')],null))['then'](respondWithResult(_0x304507,null))[_0x44dd('0x42')](handleError(_0x304507,null));};exports[_0x44dd('0x25')]=function(_0x53113f,_0x33e0c1){return db[_0x44dd('0x2b')]['find']({'where':{'id':_0x53113f[_0x44dd('0x44')]['id']}})[_0x44dd('0x24')](handleEntityNotFound(_0x33e0c1,null))[_0x44dd('0x24')](removeEntity(_0x33e0c1,null))[_0x44dd('0x42')](handleError(_0x33e0c1,null));};
\ No newline at end of file
index 0318863..abbd65a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x47d8=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./analyticTreeReport.attributes','exports','define','AnalyticTreeReport','analytics_report_trees'];(function(_0x97cc12,_0x54d583){var _0x5a25d7=function(_0x46add6){while(--_0x46add6){_0x97cc12['push'](_0x97cc12['shift']());}};_0x5a25d7(++_0x54d583);}(_0x47d8,0xa8));var _0x847d=function(_0xcb11e,_0x208dae){_0xcb11e=_0xcb11e-0x0;var _0x94ca31=_0x47d8[_0xcb11e];return _0x94ca31;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')(_0x847d('0x0'));var moment=require(_0x847d('0x1'));var BPromise=require(_0x847d('0x2'));var rp=require(_0x847d('0x3'));var fs=require('fs');var path=require(_0x847d('0x4'));var rimraf=require(_0x847d('0x5'));var config=require(_0x847d('0x6'));var attributes=require(_0x847d('0x7'));module[_0x847d('0x8')]=function(_0x405682,_0x3188cd){return _0x405682[_0x847d('0x9')](_0x847d('0xa'),attributes,{'tableName':_0x847d('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xb02d=['rimraf','./analyticTreeReport.attributes','define','AnalyticTreeReport','lodash','util','moment','request-promise','path'];(function(_0x3a9e6d,_0x29a891){var _0x4478c0=function(_0x496ff8){while(--_0x496ff8){_0x3a9e6d['push'](_0x3a9e6d['shift']());}};_0x4478c0(++_0x29a891);}(_0xb02d,0x17e));var _0xdb02=function(_0x2623d3,_0x3b0cfc){_0x2623d3=_0x2623d3-0x0;var _0x20a537=_0xb02d[_0x2623d3];return _0x20a537;};'use strict';var _=require(_0xdb02('0x0'));var util=require(_0xdb02('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xdb02('0x2'));var BPromise=require('bluebird');var rp=require(_0xdb02('0x3'));var fs=require('fs');var path=require(_0xdb02('0x4'));var rimraf=require(_0xdb02('0x5'));var config=require('../../config/environment');var attributes=require(_0xdb02('0x6'));module['exports']=function(_0x5432d7,_0x505c65){return _0x5432d7[_0xdb02('0x7')](_0xdb02('0x8'),attributes,{'tableName':'analytics_report_trees','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index f93654d..76e597d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5f66=['../../mysqldb','../../config/utils','rpc','jayson/promise','client','request','then','AnalyticTreeReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticTreeReport,\x20%s,\x20%s,\x20%s','stringify','code','message','error','info','catch','util','bluebird','randomstring','ioredis'];(function(_0x9a5a79,_0x446bc9){var _0x4c682=function(_0x22249a){while(--_0x22249a){_0x9a5a79['push'](_0x9a5a79['shift']());}};_0x4c682(++_0x446bc9);}(_0x5f66,0x1a0));var _0x65f6=function(_0x297fd3,_0x115406){_0x297fd3=_0x297fd3-0x0;var _0x2af381=_0x5f66[_0x297fd3];return _0x2af381;};'use strict';var _=require('lodash');var util=require(_0x65f6('0x0'));var moment=require('moment');var BPromise=require(_0x65f6('0x1'));var rs=require(_0x65f6('0x2'));var fs=require('fs');var Redis=require(_0x65f6('0x3'));var db=require(_0x65f6('0x4'))['db'];var utils=require(_0x65f6('0x5'));var logger=require('../../config/logger')(_0x65f6('0x6'));var config=require('../../config/environment');var jayson=require(_0x65f6('0x7'));var client=jayson[_0x65f6('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4ed98f,_0x1c0e12,_0x2c6571){return new BPromise(function(_0x112079,_0x8f6451){return client[_0x65f6('0x9')](_0x4ed98f,_0x2c6571)[_0x65f6('0xa')](function(_0x48d85c){logger['info'](_0x65f6('0xb'),_0x1c0e12,_0x65f6('0xc'));logger[_0x65f6('0xd')](_0x65f6('0xe'),_0x1c0e12,'request\x20sent',JSON[_0x65f6('0xf')](_0x48d85c));if(_0x48d85c['error']){if(_0x48d85c['error'][_0x65f6('0x10')]===0x1f4){logger['error'](_0x65f6('0xb'),_0x1c0e12,_0x48d85c['error'][_0x65f6('0x11')]);return _0x8f6451(_0x48d85c[_0x65f6('0x12')][_0x65f6('0x11')]);}logger[_0x65f6('0x12')](_0x65f6('0xb'),_0x1c0e12,_0x48d85c[_0x65f6('0x12')][_0x65f6('0x11')]);return _0x112079(_0x48d85c[_0x65f6('0x12')][_0x65f6('0x11')]);}else{logger[_0x65f6('0x13')]('AnalyticTreeReport,\x20%s,\x20%s',_0x1c0e12,_0x65f6('0xc'));_0x112079(_0x48d85c['result']['message']);}})[_0x65f6('0x14')](function(_0x5c69f8){logger[_0x65f6('0x12')](_0x65f6('0xb'),_0x1c0e12,_0x5c69f8);_0x8f6451(_0x5c69f8);});});}
\ No newline at end of file
+var _0x5f66=['../../mysqldb','../../config/utils','rpc','jayson/promise','client','request','then','AnalyticTreeReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticTreeReport,\x20%s,\x20%s,\x20%s','stringify','code','message','error','info','catch','util','bluebird','randomstring','ioredis'];(function(_0x32e941,_0x5ea37b){var _0x22b925=function(_0x1ac467){while(--_0x1ac467){_0x32e941['push'](_0x32e941['shift']());}};_0x22b925(++_0x5ea37b);}(_0x5f66,0x1a0));var _0x65f6=function(_0x580576,_0x2f107d){_0x580576=_0x580576-0x0;var _0x3f55a0=_0x5f66[_0x580576];return _0x3f55a0;};'use strict';var _=require('lodash');var util=require(_0x65f6('0x0'));var moment=require('moment');var BPromise=require(_0x65f6('0x1'));var rs=require(_0x65f6('0x2'));var fs=require('fs');var Redis=require(_0x65f6('0x3'));var db=require(_0x65f6('0x4'))['db'];var utils=require(_0x65f6('0x5'));var logger=require('../../config/logger')(_0x65f6('0x6'));var config=require('../../config/environment');var jayson=require(_0x65f6('0x7'));var client=jayson[_0x65f6('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4ed98f,_0x1c0e12,_0x2c6571){return new BPromise(function(_0x112079,_0x8f6451){return client[_0x65f6('0x9')](_0x4ed98f,_0x2c6571)[_0x65f6('0xa')](function(_0x48d85c){logger['info'](_0x65f6('0xb'),_0x1c0e12,_0x65f6('0xc'));logger[_0x65f6('0xd')](_0x65f6('0xe'),_0x1c0e12,'request\x20sent',JSON[_0x65f6('0xf')](_0x48d85c));if(_0x48d85c['error']){if(_0x48d85c['error'][_0x65f6('0x10')]===0x1f4){logger['error'](_0x65f6('0xb'),_0x1c0e12,_0x48d85c['error'][_0x65f6('0x11')]);return _0x8f6451(_0x48d85c[_0x65f6('0x12')][_0x65f6('0x11')]);}logger[_0x65f6('0x12')](_0x65f6('0xb'),_0x1c0e12,_0x48d85c[_0x65f6('0x12')][_0x65f6('0x11')]);return _0x112079(_0x48d85c[_0x65f6('0x12')][_0x65f6('0x11')]);}else{logger[_0x65f6('0x13')]('AnalyticTreeReport,\x20%s,\x20%s',_0x1c0e12,_0x65f6('0xc'));_0x112079(_0x48d85c['result']['message']);}})[_0x65f6('0x14')](function(_0x5c69f8){logger[_0x65f6('0x12')](_0x65f6('0xb'),_0x1c0e12,_0x5c69f8);_0x8f6451(_0x5c69f8);});});}
\ No newline at end of file
index d01a6b9..a950933 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf199=['isAuthenticated','index','/:id','show','post','put','update','delete','destroy','exports','multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticTreeReport.controller','get'];(function(_0x1486e5,_0x39684f){var _0x29d89b=function(_0x4a0a80){while(--_0x4a0a80){_0x1486e5['push'](_0x1486e5['shift']());}};_0x29d89b(++_0x39684f);}(_0xf199,0x136));var _0x9f19=function(_0x2aeffd,_0x5e0ce5){_0x2aeffd=_0x2aeffd-0x0;var _0x5ae8bb=_0xf199[_0x2aeffd];return _0x5ae8bb;};'use strict';var multer=require(_0x9f19('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x9f19('0x1'));var express=require(_0x9f19('0x2'));var router=express[_0x9f19('0x3')]();var fs_extra=require(_0x9f19('0x4'));var auth=require(_0x9f19('0x5'));var interaction=require(_0x9f19('0x6'));var config=require(_0x9f19('0x7'));var controller=require(_0x9f19('0x8'));router[_0x9f19('0x9')]('/',auth[_0x9f19('0xa')](),controller[_0x9f19('0xb')]);router[_0x9f19('0x9')](_0x9f19('0xc'),auth[_0x9f19('0xa')](),controller[_0x9f19('0xd')]);router[_0x9f19('0xe')]('/',auth[_0x9f19('0xa')](),controller['create']);router[_0x9f19('0xf')](_0x9f19('0xc'),auth['isAuthenticated'](),controller[_0x9f19('0x10')]);router[_0x9f19('0x11')](_0x9f19('0xc'),auth['isAuthenticated'](),controller[_0x9f19('0x12')]);module[_0x9f19('0x13')]=router;
\ No newline at end of file
+var _0xb51f=['/:id','show','post','create','put','update','delete','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index'];(function(_0x180ae1,_0x920602){var _0x171c5b=function(_0x2b4c7f){while(--_0x2b4c7f){_0x180ae1['push'](_0x180ae1['shift']());}};_0x171c5b(++_0x920602);}(_0xb51f,0x86));var _0xfb51=function(_0x5578ed,_0xb4bcc9){_0x5578ed=_0x5578ed-0x0;var _0x1bdb67=_0xb51f[_0x5578ed];return _0x1bdb67;};'use strict';var multer=require(_0xfb51('0x0'));var util=require(_0xfb51('0x1'));var path=require(_0xfb51('0x2'));var timeout=require(_0xfb51('0x3'));var express=require(_0xfb51('0x4'));var router=express[_0xfb51('0x5')]();var fs_extra=require(_0xfb51('0x6'));var auth=require(_0xfb51('0x7'));var interaction=require(_0xfb51('0x8'));var config=require(_0xfb51('0x9'));var controller=require('./analyticTreeReport.controller');router[_0xfb51('0xa')]('/',auth[_0xfb51('0xb')](),controller[_0xfb51('0xc')]);router[_0xfb51('0xa')](_0xfb51('0xd'),auth['isAuthenticated'](),controller[_0xfb51('0xe')]);router[_0xfb51('0xf')]('/',auth[_0xfb51('0xb')](),controller[_0xfb51('0x10')]);router[_0xfb51('0x11')](_0xfb51('0xd'),auth['isAuthenticated'](),controller[_0xfb51('0x12')]);router[_0xfb51('0x13')](_0xfb51('0xd'),auth[_0xfb51('0xb')](),controller['destroy']);module[_0xfb51('0x14')]=router;
\ No newline at end of file
index 84a32d3..68a666d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc524=['STRING'];(function(_0x50e5a7,_0x2ffa5f){var _0xaaf20d=function(_0x5d626d){while(--_0x5d626d){_0x50e5a7['push'](_0x50e5a7['shift']());}};_0xaaf20d(++_0x2ffa5f);}(_0xc524,0x1bf));var _0x4c52=function(_0x5cbec8,_0x21434b){_0x5cbec8=_0x5cbec8-0x0;var _0x1bca8e=_0xc524[_0x5cbec8];return _0x1bca8e;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x4c52('0x0')]},'basename':{'type':Sequelize[_0x4c52('0x0')]},'type':{'type':Sequelize[_0x4c52('0x0')]}};
\ No newline at end of file
+var _0x8f7d=['exports','STRING','sequelize'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0x8f7d,0xf5));var _0xd8f7=function(_0x2ccdc6,_0x3ef64f){_0x2ccdc6=_0x2ccdc6-0x0;var _0x2c6991=_0x8f7d[_0x2ccdc6];return _0x2c6991;};'use strict';var Sequelize=require(_0xd8f7('0x0'));module[_0xd8f7('0x1')]={'name':{'type':Sequelize['STRING']},'basename':{'type':Sequelize[_0xd8f7('0x2')]},'type':{'type':Sequelize['STRING']}};
\ No newline at end of file
index bd81768..4ac3c34 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x090a=['catch','params','clone','find','get','omit','createdAt','updatedAt','body','create','file','filename','mimetype','download','findOne','ChatOfflineMessageId','join','root','server/files/attachments/','offline-chat/','basename','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','path','sox','to-csv','fs-extra','lodash','crypto','jsforce','papaparse','ioredis','../../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','apply','save','update','then','destroy','name','map','Attachment','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','merge','VIRTUAL','filter','options','includeAll','include','rows'];(function(_0x440f9c,_0x228e4e){var _0x33262f=function(_0x578de4){while(--_0x578de4){_0x440f9c['push'](_0x440f9c['shift']());}};_0x33262f(++_0x228e4e);}(_0x090a,0x1b9));var _0xa090=function(_0x5adbfc,_0x595ef6){_0x5adbfc=_0x5adbfc-0x0;var _0x462fdb=_0x090a[_0x5adbfc];return _0x462fdb;};'use strict';var emlformat=require(_0xa090('0x0'));var rimraf=require(_0xa090('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xa090('0x2'));var rp=require(_0xa090('0x3'));var moment=require('moment');var BPromise=require(_0xa090('0x4'));var Mustache=require(_0xa090('0x5'));var util=require('util');var path=require(_0xa090('0x6'));var sox=require(_0xa090('0x7'));var csv=require(_0xa090('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xa090('0x9'));var _=require(_0xa090('0xa'));var squel=require('squel');var crypto=require(_0xa090('0xb'));var jsforce=require(_0xa090('0xc'));var deskjs=require('desk.js');var toCsv=require(_0xa090('0x8'));var querystring=require('querystring');var Papa=require(_0xa090('0xd'));var Redis=require(_0xa090('0xe'));var authService=require('../../components/auth/service');var qs=require(_0xa090('0xf'));var as=require(_0xa090('0x10'));var hardwareService=require(_0xa090('0x11'));var logger=require(_0xa090('0x12'))(_0xa090('0x13'));var utils=require(_0xa090('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0xa090('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3ebe2f,_0x2a7e5a){_0x2a7e5a=_0x2a7e5a||0xcc;return function(_0x54e756){if(_0x54e756){return _0x3ebe2f[_0xa090('0x16')](_0x2a7e5a);}return _0x3ebe2f[_0xa090('0x17')](_0x2a7e5a)[_0xa090('0x18')]();};}function respondWithResult(_0x31e3ca,_0xde219a){_0xde219a=_0xde219a||0xc8;return function(_0x1a8695){if(_0x1a8695){return _0x31e3ca['status'](_0xde219a)[_0xa090('0x19')](_0x1a8695);}};}function respondWithFilteredResult(_0x2c5feb,_0x19b40d){return function(_0x50b263){if(_0x50b263){var _0x460c56=typeof _0x19b40d[_0xa090('0x1a')]===_0xa090('0x1b')&&typeof _0x19b40d['limit']===_0xa090('0x1b');var _0x462eb1=_0x50b263[_0xa090('0x1c')];var _0x452c17=_0x460c56?0x0:_0x19b40d[_0xa090('0x1a')];var _0x458269=_0x460c56?_0x50b263['count']:_0x19b40d[_0xa090('0x1a')]+_0x19b40d[_0xa090('0x1d')];var _0x4f53da;if(_0x458269>=_0x462eb1){_0x458269=_0x462eb1;_0x4f53da=0xc8;}else{_0x4f53da=0xce;}_0x2c5feb[_0xa090('0x17')](_0x4f53da);return _0x2c5feb[_0xa090('0x1e')]('Content-Range',_0x452c17+'-'+_0x458269+'/'+_0x462eb1)[_0xa090('0x19')](_0x50b263);}return null;};}function patchUpdates(_0x5de21b){return function(_0x56fdc3){try{jsonpatch[_0xa090('0x1f')](_0x56fdc3,_0x5de21b,!![]);}catch(_0x2ddb8e){return BPromise['reject'](_0x2ddb8e);}return _0x56fdc3[_0xa090('0x20')]();};}function saveUpdates(_0x46719b,_0xe3421){return function(_0x36d39a){if(_0x36d39a){return _0x36d39a[_0xa090('0x21')](_0x46719b)[_0xa090('0x22')](function(_0x2644e){return _0x2644e;});}return null;};}function removeEntity(_0x168180,_0x3016a2){return function(_0x1cf9e3){if(_0x1cf9e3){return _0x1cf9e3[_0xa090('0x23')]()[_0xa090('0x22')](function(){_0x168180[_0xa090('0x17')](0xcc)[_0xa090('0x18')]();});}};}function handleEntityNotFound(_0xeb45d1,_0x3b1300){return function(_0x330007){if(!_0x330007){_0xeb45d1['sendStatus'](0x194);}return _0x330007;};}function handleError(_0x364290,_0x2caaab){_0x2caaab=_0x2caaab||0x1f4;return function(_0x12004c){logger['error'](_0x12004c['stack']);if(_0x12004c[_0xa090('0x24')]){delete _0x12004c['name'];}_0x364290[_0xa090('0x17')](_0x2caaab)['send'](_0x12004c);};}exports['index']=function(_0x37c09c,_0x2b53ab){var _0x3e171e={},_0x564e84={},_0x3d1506={'count':0x0,'rows':[]};var _0x22a9f6=_[_0xa090('0x25')](db[_0xa090('0x26')][_0xa090('0x27')],function(_0xc67070){return{'name':_0xc67070[_0xa090('0x28')],'type':_0xc67070[_0xa090('0x29')][_0xa090('0x2a')]};});_0x564e84[_0xa090('0x2b')]=_[_0xa090('0x25')](_0x22a9f6,_0xa090('0x24'));_0x564e84[_0xa090('0x2c')]=_[_0xa090('0x2d')](_0x37c09c[_0xa090('0x2c')]);_0x564e84[_0xa090('0x2e')]=_[_0xa090('0x2f')](_0x564e84[_0xa090('0x2b')],_0x564e84['query']);_0x3e171e[_0xa090('0x30')]=_[_0xa090('0x2f')](_0x564e84[_0xa090('0x2b')],qs[_0xa090('0x31')](_0x37c09c[_0xa090('0x2c')][_0xa090('0x31')]));_0x3e171e[_0xa090('0x30')]=_0x3e171e[_0xa090('0x30')][_0xa090('0x32')]?_0x3e171e[_0xa090('0x30')]:_0x564e84[_0xa090('0x2b')];if(!_0x37c09c[_0xa090('0x2c')][_0xa090('0x33')](_0xa090('0x34'))){_0x3e171e[_0xa090('0x1d')]=qs[_0xa090('0x1d')](_0x37c09c['query'][_0xa090('0x1d')]);_0x3e171e[_0xa090('0x1a')]=qs[_0xa090('0x1a')](_0x37c09c[_0xa090('0x2c')][_0xa090('0x1a')]);}_0x3e171e[_0xa090('0x35')]=qs['sort'](_0x37c09c[_0xa090('0x2c')][_0xa090('0x36')]);_0x3e171e['where']=qs[_0xa090('0x2e')](_['pick'](_0x37c09c[_0xa090('0x2c')],_0x564e84['filters']),_0x22a9f6);if(_0x37c09c[_0xa090('0x2c')]['filter']){_0x3e171e[_0xa090('0x37')]=_[_0xa090('0x38')](_0x3e171e[_0xa090('0x37')],{'$or':_[_0xa090('0x25')](_0x22a9f6,function(_0x2f8b2d){if(_0x2f8b2d['type']!==_0xa090('0x39')){var _0x5cbb02={};_0x5cbb02[_0x2f8b2d[_0xa090('0x24')]]={'$like':'%'+_0x37c09c[_0xa090('0x2c')][_0xa090('0x3a')]+'%'};return _0x5cbb02;}})});}_0x3e171e=_[_0xa090('0x38')]({},_0x3e171e,_0x37c09c[_0xa090('0x3b')]);var _0x54d923={'where':_0x3e171e['where']};return db[_0xa090('0x26')][_0xa090('0x1c')](_0x54d923)['then'](function(_0x17297d){_0x3d1506[_0xa090('0x1c')]=_0x17297d;if(_0x37c09c[_0xa090('0x2c')][_0xa090('0x3c')]){_0x3e171e[_0xa090('0x3d')]=[{'all':!![]}];}return db[_0xa090('0x26')]['findAll'](_0x3e171e);})[_0xa090('0x22')](function(_0x17da61){_0x3d1506[_0xa090('0x3e')]=_0x17da61;return _0x3d1506;})[_0xa090('0x22')](respondWithFilteredResult(_0x2b53ab,_0x3e171e))[_0xa090('0x3f')](handleError(_0x2b53ab,null));};exports['show']=function(_0x12748e,_0x4ca3c2){var _0x5300c3={'raw':!![],'where':{'id':_0x12748e[_0xa090('0x40')]['id']}},_0x386da0={};_0x386da0[_0xa090('0x2b')]=_[_0xa090('0x2d')](db[_0xa090('0x26')][_0xa090('0x27')]);_0x386da0[_0xa090('0x2c')]=_[_0xa090('0x2d')](_0x12748e['query']);_0x386da0[_0xa090('0x2e')]=_[_0xa090('0x2f')](_0x386da0[_0xa090('0x2b')],_0x386da0[_0xa090('0x2c')]);_0x5300c3[_0xa090('0x30')]=_['intersection'](_0x386da0[_0xa090('0x2b')],qs['fields'](_0x12748e[_0xa090('0x2c')]['fields']));_0x5300c3['attributes']=_0x5300c3[_0xa090('0x30')]['length']?_0x5300c3[_0xa090('0x30')]:_0x386da0[_0xa090('0x2b')];if(_0x12748e[_0xa090('0x2c')]['includeAll']){_0x5300c3[_0xa090('0x3d')]=[{'all':!![]}];}_0x5300c3=_['merge']({},_0x5300c3,_0x12748e['options']);return db[_0xa090('0x26')]['find'](_0x5300c3)[_0xa090('0x22')](handleEntityNotFound(_0x4ca3c2,null))[_0xa090('0x22')](respondWithResult(_0x4ca3c2,null))['catch'](handleError(_0x4ca3c2,null));};exports[_0xa090('0x41')]=function(_0x90b876,_0x3a9076){var _0x27d5e6={'where':{'id':_0x90b876['params']['id']}},_0x434aea={};_0x434aea['model']=_['keys'](db[_0xa090('0x26')][_0xa090('0x27')]);_0x27d5e6[_0xa090('0x30')]=_[_0xa090('0x2f')](_0x434aea[_0xa090('0x2b')],qs[_0xa090('0x31')](_0x90b876[_0xa090('0x2c')]['fields']));_0x27d5e6[_0xa090('0x30')]=_0x27d5e6[_0xa090('0x30')][_0xa090('0x32')]?_0x27d5e6[_0xa090('0x30')]:_0x434aea['model'];if(_0x90b876[_0xa090('0x2c')]['includeAll']){_0x27d5e6[_0xa090('0x3d')]=[{'all':!![]}];}_0x27d5e6=_[_0xa090('0x38')]({},_0x27d5e6,_0x90b876[_0xa090('0x3b')]);return db[_0xa090('0x26')][_0xa090('0x42')](_0x27d5e6)[_0xa090('0x22')](handleEntityNotFound(_0x3a9076,null))[_0xa090('0x22')](function(_0x45afaa){if(_0x45afaa){var _0x5b04b5=_0x45afaa[_0xa090('0x43')]({'plain':!![]});_0x5b04b5=qs[_0xa090('0x44')](_0x5b04b5,['id',_0xa090('0x45'),_0xa090('0x46')]);_0x90b876[_0xa090('0x47')]=_[_0xa090('0x44')](_0x90b876[_0xa090('0x47')],['id',_0xa090('0x45'),_0xa090('0x46')]);return db['Attachment']['create'](_[_0xa090('0x38')](_0x5b04b5,_0x90b876[_0xa090('0x47')]),{'include':_0x90b876[_0xa090('0x2c')][_0xa090('0x3c')]?[{'all':!![]}]:undefined});}})[_0xa090('0x22')](respondWithResult(_0x3a9076,0xc9))[_0xa090('0x3f')](handleError(_0x3a9076,null));};exports[_0xa090('0x21')]=function(_0x451e77,_0x4e1388){if(_0x451e77[_0xa090('0x47')]['id']){delete _0x451e77[_0xa090('0x47')]['id'];}return db[_0xa090('0x26')][_0xa090('0x42')]({'where':{'id':_0x451e77[_0xa090('0x40')]['id']}})['then'](handleEntityNotFound(_0x4e1388,null))[_0xa090('0x22')](saveUpdates(_0x451e77[_0xa090('0x47')],null))[_0xa090('0x22')](respondWithResult(_0x4e1388,null))[_0xa090('0x3f')](handleError(_0x4e1388,null));};exports[_0xa090('0x23')]=function(_0x56519a,_0x78d73a){return db[_0xa090('0x26')]['find']({'where':{'id':_0x56519a[_0xa090('0x40')]['id']}})[_0xa090('0x22')](handleEntityNotFound(_0x78d73a,null))[_0xa090('0x22')](removeEntity(_0x78d73a,null))['catch'](handleError(_0x78d73a,null));};exports[_0xa090('0x48')]=function(_0x1d3204,_0x194f69,_0x30abf8){_0x1d3204['body'][_0xa090('0x24')]=_0x1d3204['file']['originalname'];_0x1d3204[_0xa090('0x47')]['basename']=_0x1d3204[_0xa090('0x49')][_0xa090('0x4a')];_0x1d3204[_0xa090('0x47')][_0xa090('0x29')]=_0x1d3204[_0xa090('0x49')][_0xa090('0x4b')];return db[_0xa090('0x26')][_0xa090('0x48')](_0x1d3204[_0xa090('0x47')])[_0xa090('0x22')](respondWithResult(_0x194f69,0xc9))[_0xa090('0x3f')](handleError(_0x194f69,null));};exports[_0xa090('0x4c')]=function(_0x31122b,_0x511793,_0x25e2e7){return db[_0xa090('0x26')][_0xa090('0x4d')]({'where':{'id':_0x31122b['params']['id']},'raw':!![]})['then'](handleEntityNotFound(_0x511793,null))[_0xa090('0x22')](function(_0x204be8){if(_0x204be8){var _0x5799d4=_0x204be8[_0xa090('0x4e')]!==null;var _0x5a84d7=path[_0xa090('0x4f')](config[_0xa090('0x50')],_0xa090('0x51'));if(_0x5799d4){_0x5a84d7=path[_0xa090('0x4f')](_0x5a84d7,_0xa090('0x52'));}var _0x2f200e=path[_0xa090('0x4f')](_0x5a84d7,_0x204be8[_0xa090('0x53')]);return _0x511793[_0xa090('0x4c')](_0x2f200e);}})['catch'](handleError(_0x511793,null));};
\ No newline at end of file
+var _0xa3fc=['hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','includeAll','findAll','rows','catch','params','keys','include','options','find','clone','get','omit','body','createdAt','updatedAt','create','file','originalname','download','findOne','ChatOfflineMessageId','join','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','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','json','offset','undefined','limit','count','set','Content-Range','save','update','then','destroy','end','sendStatus','error','stack','name','index','map','Attachment','rawAttributes','fieldName','type','key','query','filters','intersection','model','attributes','fields','length'];(function(_0x266618,_0x18f637){var _0x54dbf5=function(_0x1f7985){while(--_0x1f7985){_0x266618['push'](_0x266618['shift']());}};_0x54dbf5(++_0x18f637);}(_0xa3fc,0x187));var _0xca3f=function(_0x4b47b2,_0x20185f){_0x4b47b2=_0x4b47b2-0x0;var _0x49574b=_0xa3fc[_0x4b47b2];return _0x49574b;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xca3f('0x0'));var zipdir=require(_0xca3f('0x1'));var jsonpatch=require(_0xca3f('0x2'));var rp=require(_0xca3f('0x3'));var moment=require(_0xca3f('0x4'));var BPromise=require(_0xca3f('0x5'));var Mustache=require(_0xca3f('0x6'));var util=require(_0xca3f('0x7'));var path=require(_0xca3f('0x8'));var sox=require(_0xca3f('0x9'));var csv=require(_0xca3f('0xa'));var ejs=require(_0xca3f('0xb'));var fs=require('fs');var fs_extra=require(_0xca3f('0xc'));var _=require(_0xca3f('0xd'));var squel=require(_0xca3f('0xe'));var crypto=require(_0xca3f('0xf'));var jsforce=require(_0xca3f('0x10'));var deskjs=require(_0xca3f('0x11'));var toCsv=require('to-csv');var querystring=require(_0xca3f('0x12'));var Papa=require(_0xca3f('0x13'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xca3f('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xca3f('0x15'));var logger=require(_0xca3f('0x16'))(_0xca3f('0x17'));var utils=require(_0xca3f('0x18'));var config=require(_0xca3f('0x19'));var licenseUtil=require(_0xca3f('0x1a'));var db=require(_0xca3f('0x1b'))['db'];function respondWithStatusCode(_0x2b21e8,_0x1c624b){_0x1c624b=_0x1c624b||0xcc;return function(_0x2cc4f0){if(_0x2cc4f0){return _0x2b21e8['sendStatus'](_0x1c624b);}return _0x2b21e8[_0xca3f('0x1c')](_0x1c624b)['end']();};}function respondWithResult(_0x435637,_0x4ff9ef){_0x4ff9ef=_0x4ff9ef||0xc8;return function(_0x581421){if(_0x581421){return _0x435637[_0xca3f('0x1c')](_0x4ff9ef)[_0xca3f('0x1d')](_0x581421);}};}function respondWithFilteredResult(_0x40af1b,_0x45c405){return function(_0x294463){if(_0x294463){var _0x533cc3=typeof _0x45c405[_0xca3f('0x1e')]===_0xca3f('0x1f')&&typeof _0x45c405[_0xca3f('0x20')]==='undefined';var _0x53e62d=_0x294463[_0xca3f('0x21')];var _0x5723ba=_0x533cc3?0x0:_0x45c405[_0xca3f('0x1e')];var _0x2b6c03=_0x533cc3?_0x294463[_0xca3f('0x21')]:_0x45c405['offset']+_0x45c405['limit'];var _0xee2898;if(_0x2b6c03>=_0x53e62d){_0x2b6c03=_0x53e62d;_0xee2898=0xc8;}else{_0xee2898=0xce;}_0x40af1b[_0xca3f('0x1c')](_0xee2898);return _0x40af1b[_0xca3f('0x22')](_0xca3f('0x23'),_0x5723ba+'-'+_0x2b6c03+'/'+_0x53e62d)[_0xca3f('0x1d')](_0x294463);}return null;};}function patchUpdates(_0x401215){return function(_0x45a9e9){try{jsonpatch['apply'](_0x45a9e9,_0x401215,!![]);}catch(_0x36cbbe){return BPromise['reject'](_0x36cbbe);}return _0x45a9e9[_0xca3f('0x24')]();};}function saveUpdates(_0x4de96,_0x31fdc8){return function(_0x2734b1){if(_0x2734b1){return _0x2734b1[_0xca3f('0x25')](_0x4de96)[_0xca3f('0x26')](function(_0x3e6a4c){return _0x3e6a4c;});}return null;};}function removeEntity(_0x360f3b,_0x3005c9){return function(_0x41babd){if(_0x41babd){return _0x41babd[_0xca3f('0x27')]()[_0xca3f('0x26')](function(){_0x360f3b[_0xca3f('0x1c')](0xcc)[_0xca3f('0x28')]();});}};}function handleEntityNotFound(_0x9a6050,_0x514728){return function(_0x532c01){if(!_0x532c01){_0x9a6050[_0xca3f('0x29')](0x194);}return _0x532c01;};}function handleError(_0x160b40,_0x88acdb){_0x88acdb=_0x88acdb||0x1f4;return function(_0x254d1d){logger[_0xca3f('0x2a')](_0x254d1d[_0xca3f('0x2b')]);if(_0x254d1d['name']){delete _0x254d1d[_0xca3f('0x2c')];}_0x160b40['status'](_0x88acdb)['send'](_0x254d1d);};}exports[_0xca3f('0x2d')]=function(_0x57f3e4,_0x207145){var _0x3ae11f={},_0x33bc1b={},_0x303563={'count':0x0,'rows':[]};var _0x1e84f4=_[_0xca3f('0x2e')](db[_0xca3f('0x2f')][_0xca3f('0x30')],function(_0x128a87){return{'name':_0x128a87[_0xca3f('0x31')],'type':_0x128a87[_0xca3f('0x32')][_0xca3f('0x33')]};});_0x33bc1b['model']=_['map'](_0x1e84f4,_0xca3f('0x2c'));_0x33bc1b['query']=_['keys'](_0x57f3e4[_0xca3f('0x34')]);_0x33bc1b[_0xca3f('0x35')]=_[_0xca3f('0x36')](_0x33bc1b[_0xca3f('0x37')],_0x33bc1b[_0xca3f('0x34')]);_0x3ae11f[_0xca3f('0x38')]=_[_0xca3f('0x36')](_0x33bc1b['model'],qs[_0xca3f('0x39')](_0x57f3e4[_0xca3f('0x34')][_0xca3f('0x39')]));_0x3ae11f['attributes']=_0x3ae11f[_0xca3f('0x38')][_0xca3f('0x3a')]?_0x3ae11f[_0xca3f('0x38')]:_0x33bc1b[_0xca3f('0x37')];if(!_0x57f3e4[_0xca3f('0x34')][_0xca3f('0x3b')](_0xca3f('0x3c'))){_0x3ae11f[_0xca3f('0x20')]=qs['limit'](_0x57f3e4[_0xca3f('0x34')][_0xca3f('0x20')]);_0x3ae11f[_0xca3f('0x1e')]=qs[_0xca3f('0x1e')](_0x57f3e4[_0xca3f('0x34')]['offset']);}_0x3ae11f[_0xca3f('0x3d')]=qs[_0xca3f('0x3e')](_0x57f3e4[_0xca3f('0x34')][_0xca3f('0x3e')]);_0x3ae11f[_0xca3f('0x3f')]=qs[_0xca3f('0x35')](_[_0xca3f('0x40')](_0x57f3e4[_0xca3f('0x34')],_0x33bc1b[_0xca3f('0x35')]),_0x1e84f4);if(_0x57f3e4[_0xca3f('0x34')][_0xca3f('0x41')]){_0x3ae11f[_0xca3f('0x3f')]=_[_0xca3f('0x42')](_0x3ae11f[_0xca3f('0x3f')],{'$or':_[_0xca3f('0x2e')](_0x1e84f4,function(_0x588fbd){if(_0x588fbd['type']!==_0xca3f('0x43')){var _0x4f1a6d={};_0x4f1a6d[_0x588fbd[_0xca3f('0x2c')]]={'$like':'%'+_0x57f3e4[_0xca3f('0x34')][_0xca3f('0x41')]+'%'};return _0x4f1a6d;}})});}_0x3ae11f=_['merge']({},_0x3ae11f,_0x57f3e4['options']);var _0x28c32e={'where':_0x3ae11f[_0xca3f('0x3f')]};return db[_0xca3f('0x2f')][_0xca3f('0x21')](_0x28c32e)[_0xca3f('0x26')](function(_0x49d597){_0x303563[_0xca3f('0x21')]=_0x49d597;if(_0x57f3e4[_0xca3f('0x34')][_0xca3f('0x44')]){_0x3ae11f['include']=[{'all':!![]}];}return db[_0xca3f('0x2f')][_0xca3f('0x45')](_0x3ae11f);})[_0xca3f('0x26')](function(_0x4cb430){_0x303563[_0xca3f('0x46')]=_0x4cb430;return _0x303563;})[_0xca3f('0x26')](respondWithFilteredResult(_0x207145,_0x3ae11f))[_0xca3f('0x47')](handleError(_0x207145,null));};exports['show']=function(_0x3e9f48,_0x1a91f3){var _0x2dc8dc={'raw':!![],'where':{'id':_0x3e9f48[_0xca3f('0x48')]['id']}},_0x1b897c={};_0x1b897c[_0xca3f('0x37')]=_[_0xca3f('0x49')](db['Attachment'][_0xca3f('0x30')]);_0x1b897c[_0xca3f('0x34')]=_[_0xca3f('0x49')](_0x3e9f48[_0xca3f('0x34')]);_0x1b897c[_0xca3f('0x35')]=_['intersection'](_0x1b897c[_0xca3f('0x37')],_0x1b897c[_0xca3f('0x34')]);_0x2dc8dc[_0xca3f('0x38')]=_['intersection'](_0x1b897c[_0xca3f('0x37')],qs[_0xca3f('0x39')](_0x3e9f48[_0xca3f('0x34')][_0xca3f('0x39')]));_0x2dc8dc['attributes']=_0x2dc8dc[_0xca3f('0x38')]['length']?_0x2dc8dc[_0xca3f('0x38')]:_0x1b897c[_0xca3f('0x37')];if(_0x3e9f48['query'][_0xca3f('0x44')]){_0x2dc8dc[_0xca3f('0x4a')]=[{'all':!![]}];}_0x2dc8dc=_[_0xca3f('0x42')]({},_0x2dc8dc,_0x3e9f48[_0xca3f('0x4b')]);return db['Attachment'][_0xca3f('0x4c')](_0x2dc8dc)[_0xca3f('0x26')](handleEntityNotFound(_0x1a91f3,null))['then'](respondWithResult(_0x1a91f3,null))[_0xca3f('0x47')](handleError(_0x1a91f3,null));};exports[_0xca3f('0x4d')]=function(_0x2f22e2,_0x27bc5c){var _0x14f68d={'where':{'id':_0x2f22e2[_0xca3f('0x48')]['id']}},_0x54b1b4={};_0x54b1b4[_0xca3f('0x37')]=_[_0xca3f('0x49')](db[_0xca3f('0x2f')][_0xca3f('0x30')]);_0x14f68d['attributes']=_[_0xca3f('0x36')](_0x54b1b4[_0xca3f('0x37')],qs[_0xca3f('0x39')](_0x2f22e2['query'][_0xca3f('0x39')]));_0x14f68d[_0xca3f('0x38')]=_0x14f68d[_0xca3f('0x38')][_0xca3f('0x3a')]?_0x14f68d['attributes']:_0x54b1b4[_0xca3f('0x37')];if(_0x2f22e2[_0xca3f('0x34')][_0xca3f('0x44')]){_0x14f68d[_0xca3f('0x4a')]=[{'all':!![]}];}_0x14f68d=_[_0xca3f('0x42')]({},_0x14f68d,_0x2f22e2[_0xca3f('0x4b')]);return db['Attachment'][_0xca3f('0x4c')](_0x14f68d)[_0xca3f('0x26')](handleEntityNotFound(_0x27bc5c,null))[_0xca3f('0x26')](function(_0x3f8dfb){if(_0x3f8dfb){var _0x4967f1=_0x3f8dfb[_0xca3f('0x4e')]({'plain':!![]});_0x4967f1=qs['omit'](_0x4967f1,['id','createdAt','updatedAt']);_0x2f22e2['body']=_[_0xca3f('0x4f')](_0x2f22e2[_0xca3f('0x50')],['id',_0xca3f('0x51'),_0xca3f('0x52')]);return db[_0xca3f('0x2f')]['create'](_[_0xca3f('0x42')](_0x4967f1,_0x2f22e2[_0xca3f('0x50')]),{'include':_0x2f22e2[_0xca3f('0x34')]['includeAll']?[{'all':!![]}]:undefined});}})['then'](respondWithResult(_0x27bc5c,0xc9))['catch'](handleError(_0x27bc5c,null));};exports[_0xca3f('0x25')]=function(_0x51142b,_0x16bca1){if(_0x51142b[_0xca3f('0x50')]['id']){delete _0x51142b['body']['id'];}return db[_0xca3f('0x2f')]['find']({'where':{'id':_0x51142b[_0xca3f('0x48')]['id']}})[_0xca3f('0x26')](handleEntityNotFound(_0x16bca1,null))['then'](saveUpdates(_0x51142b[_0xca3f('0x50')],null))['then'](respondWithResult(_0x16bca1,null))[_0xca3f('0x47')](handleError(_0x16bca1,null));};exports[_0xca3f('0x27')]=function(_0x568b58,_0x4b4f2c){return db[_0xca3f('0x2f')][_0xca3f('0x4c')]({'where':{'id':_0x568b58[_0xca3f('0x48')]['id']}})[_0xca3f('0x26')](handleEntityNotFound(_0x4b4f2c,null))[_0xca3f('0x26')](removeEntity(_0x4b4f2c,null))[_0xca3f('0x47')](handleError(_0x4b4f2c,null));};exports[_0xca3f('0x53')]=function(_0x141ded,_0x7a7490,_0x27f6d7){_0x141ded[_0xca3f('0x50')][_0xca3f('0x2c')]=_0x141ded[_0xca3f('0x54')][_0xca3f('0x55')];_0x141ded['body']['basename']=_0x141ded['file']['filename'];_0x141ded[_0xca3f('0x50')][_0xca3f('0x32')]=_0x141ded['file']['mimetype'];return db['Attachment'][_0xca3f('0x53')](_0x141ded[_0xca3f('0x50')])[_0xca3f('0x26')](respondWithResult(_0x7a7490,0xc9))['catch'](handleError(_0x7a7490,null));};exports[_0xca3f('0x56')]=function(_0x5d3f2f,_0x3e3bb8,_0x15c9b6){return db[_0xca3f('0x2f')][_0xca3f('0x57')]({'where':{'id':_0x5d3f2f['params']['id']},'raw':!![]})[_0xca3f('0x26')](handleEntityNotFound(_0x3e3bb8,null))[_0xca3f('0x26')](function(_0x48bde4){if(_0x48bde4){var _0x29ac05=_0x48bde4[_0xca3f('0x58')]!==null;var _0x32412b=path[_0xca3f('0x59')](config['root'],'server/files/attachments/');if(_0x29ac05){_0x32412b=path[_0xca3f('0x59')](_0x32412b,'offline-chat/');}var _0x227787=path[_0xca3f('0x59')](_0x32412b,_0x48bde4['basename']);return _0x3e3bb8[_0xca3f('0x56')](_0x227787);}})[_0xca3f('0x47')](handleError(_0x3e3bb8,null));};
\ No newline at end of file
index 9df4430..0eb2c2e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb9b7=['request-promise','path','rimraf','./attachment.attributes','exports','define','Attachment','attachments','lodash','../../config/logger','api','moment','bluebird'];(function(_0x2b3aae,_0x24b5cc){var _0x3f6fa4=function(_0x4bef99){while(--_0x4bef99){_0x2b3aae['push'](_0x2b3aae['shift']());}};_0x3f6fa4(++_0x24b5cc);}(_0xb9b7,0xf2));var _0x7b9b=function(_0x976112,_0x1c4db4){_0x976112=_0x976112-0x0;var _0x1a1bd2=_0xb9b7[_0x976112];return _0x1a1bd2;};'use strict';var _=require(_0x7b9b('0x0'));var util=require('util');var logger=require(_0x7b9b('0x1'))(_0x7b9b('0x2'));var moment=require(_0x7b9b('0x3'));var BPromise=require(_0x7b9b('0x4'));var rp=require(_0x7b9b('0x5'));var fs=require('fs');var path=require(_0x7b9b('0x6'));var rimraf=require(_0x7b9b('0x7'));var config=require('../../config/environment');var attributes=require(_0x7b9b('0x8'));module[_0x7b9b('0x9')]=function(_0xbdd4f3,_0x6baaab){return _0xbdd4f3[_0x7b9b('0xa')](_0x7b9b('0xb'),attributes,{'tableName':_0x7b9b('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x230b=['exports','define','Attachment','attachments','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./attachment.attributes'];(function(_0x167f65,_0x1612f9){var _0x241eb5=function(_0x3144cd){while(--_0x3144cd){_0x167f65['push'](_0x167f65['shift']());}};_0x241eb5(++_0x1612f9);}(_0x230b,0xba));var _0xb230=function(_0x314d7d,_0xe5783a){_0x314d7d=_0x314d7d-0x0;var _0x2689f6=_0x230b[_0x314d7d];return _0x2689f6;};'use strict';var _=require('lodash');var util=require(_0xb230('0x0'));var logger=require(_0xb230('0x1'))(_0xb230('0x2'));var moment=require(_0xb230('0x3'));var BPromise=require('bluebird');var rp=require(_0xb230('0x4'));var fs=require('fs');var path=require(_0xb230('0x5'));var rimraf=require(_0xb230('0x6'));var config=require(_0xb230('0x7'));var attributes=require(_0xb230('0x8'));module[_0xb230('0x9')]=function(_0x47fa4d,_0x3967f6){return _0x47fa4d[_0xb230('0xa')](_0xb230('0xb'),attributes,{'tableName':_0xb230('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index eea507b..ab465ba 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc831=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','info','debug','Attachment,\x20%s,\x20%s,\x20%s','request\x20sent','error','Attachment,\x20%s,\x20%s','message','result','catch','create','options','then','util','moment','bluebird','randomstring','ioredis'];(function(_0x46bffd,_0xdea53e){var _0x2d73ed=function(_0x2c1508){while(--_0x2c1508){_0x46bffd['push'](_0x46bffd['shift']());}};_0x2d73ed(++_0xdea53e);}(_0xc831,0x103));var _0x1c83=function(_0x574a7a,_0x2443a5){_0x574a7a=_0x574a7a-0x0;var _0x8d420a=_0xc831[_0x574a7a];return _0x8d420a;};'use strict';var _=require('lodash');var util=require(_0x1c83('0x0'));var moment=require(_0x1c83('0x1'));var BPromise=require(_0x1c83('0x2'));var rs=require(_0x1c83('0x3'));var fs=require('fs');var Redis=require(_0x1c83('0x4'));var db=require(_0x1c83('0x5'))['db'];var utils=require(_0x1c83('0x6'));var logger=require(_0x1c83('0x7'))(_0x1c83('0x8'));var config=require(_0x1c83('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0x1c83('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x52ec70,_0x1ce77e,_0x1953e5){return new BPromise(function(_0x29ceee,_0x38f254){return client[_0x1c83('0xb')](_0x52ec70,_0x1953e5)['then'](function(_0x9cb1e2){logger[_0x1c83('0xc')]('Attachment,\x20%s,\x20%s',_0x1ce77e,'request\x20sent');logger[_0x1c83('0xd')](_0x1c83('0xe'),_0x1ce77e,_0x1c83('0xf'),JSON['stringify'](_0x9cb1e2));if(_0x9cb1e2[_0x1c83('0x10')]){if(_0x9cb1e2['error']['code']===0x1f4){logger[_0x1c83('0x10')](_0x1c83('0x11'),_0x1ce77e,_0x9cb1e2[_0x1c83('0x10')][_0x1c83('0x12')]);return _0x38f254(_0x9cb1e2[_0x1c83('0x10')][_0x1c83('0x12')]);}logger[_0x1c83('0x10')]('Attachment,\x20%s,\x20%s',_0x1ce77e,_0x9cb1e2[_0x1c83('0x10')][_0x1c83('0x12')]);return _0x29ceee(_0x9cb1e2[_0x1c83('0x10')][_0x1c83('0x12')]);}else{logger[_0x1c83('0xc')]('Attachment,\x20%s,\x20%s',_0x1ce77e,_0x1c83('0xf'));_0x29ceee(_0x9cb1e2[_0x1c83('0x13')][_0x1c83('0x12')]);}})[_0x1c83('0x14')](function(_0x596a69){logger[_0x1c83('0x10')]('Attachment,\x20%s,\x20%s',_0x1ce77e,_0x596a69);_0x38f254(_0x596a69);});});}exports['CreateAttachment']=function(_0x3b3369){var _0x1d6027=this;return new Promise(function(_0x2ec743,_0x37a7ac){return db['Attachment'][_0x1c83('0x15')](_0x3b3369['body'],{'raw':_0x3b3369[_0x1c83('0x16')]?_0x3b3369[_0x1c83('0x16')]['raw']===undefined?!![]:![]:!![]})[_0x1c83('0x17')](function(_0x1b5a71){logger['info']('CreateAttachment',_0x3b3369);logger[_0x1c83('0xd')]('CreateAttachment',_0x3b3369,JSON['stringify'](_0x1b5a71));_0x2ec743(_0x1b5a71);})[_0x1c83('0x14')](function(_0x3e216d){logger[_0x1c83('0x10')]('CreateAttachment',_0x3e216d[_0x1c83('0x12')],_0x3b3369);_0x37a7ac(_0x1d6027[_0x1c83('0x10')](0x1f4,_0x3e216d[_0x1c83('0x12')]));});});};
\ No newline at end of file
+var _0xffe1=['message','result','catch','Attachment','create','body','options','raw','CreateAttachment','lodash','util','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','then','info','Attachment,\x20%s,\x20%s','debug','Attachment,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code'];(function(_0x591c14,_0x3ef13b){var _0x4cafd7=function(_0x5f5298){while(--_0x5f5298){_0x591c14['push'](_0x591c14['shift']());}};_0x4cafd7(++_0x3ef13b);}(_0xffe1,0x175));var _0x1ffe=function(_0x46de05,_0x3a411d){_0x46de05=_0x46de05-0x0;var _0x2c3fef=_0xffe1[_0x46de05];return _0x2c3fef;};'use strict';var _=require(_0x1ffe('0x0'));var util=require(_0x1ffe('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x1ffe('0x2'));var fs=require('fs');var Redis=require(_0x1ffe('0x3'));var db=require(_0x1ffe('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x1ffe('0x5'))(_0x1ffe('0x6'));var config=require(_0x1ffe('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x1ffe('0x8')][_0x1ffe('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x6bc1ed,_0x26e370,_0xb34112){return new BPromise(function(_0x8eee2b,_0x4d2a28){return client['request'](_0x6bc1ed,_0xb34112)[_0x1ffe('0xa')](function(_0x13556e){logger[_0x1ffe('0xb')](_0x1ffe('0xc'),_0x26e370,'request\x20sent');logger[_0x1ffe('0xd')](_0x1ffe('0xe'),_0x26e370,_0x1ffe('0xf'),JSON[_0x1ffe('0x10')](_0x13556e));if(_0x13556e[_0x1ffe('0x11')]){if(_0x13556e[_0x1ffe('0x11')][_0x1ffe('0x12')]===0x1f4){logger[_0x1ffe('0x11')]('Attachment,\x20%s,\x20%s',_0x26e370,_0x13556e[_0x1ffe('0x11')][_0x1ffe('0x13')]);return _0x4d2a28(_0x13556e['error'][_0x1ffe('0x13')]);}logger[_0x1ffe('0x11')](_0x1ffe('0xc'),_0x26e370,_0x13556e[_0x1ffe('0x11')][_0x1ffe('0x13')]);return _0x8eee2b(_0x13556e['error'][_0x1ffe('0x13')]);}else{logger[_0x1ffe('0xb')](_0x1ffe('0xc'),_0x26e370,'request\x20sent');_0x8eee2b(_0x13556e[_0x1ffe('0x14')]['message']);}})[_0x1ffe('0x15')](function(_0x565922){logger[_0x1ffe('0x11')](_0x1ffe('0xc'),_0x26e370,_0x565922);_0x4d2a28(_0x565922);});});}exports['CreateAttachment']=function(_0x561670){var _0x4dbd7f=this;return new Promise(function(_0x42b92c,_0x21950f){return db[_0x1ffe('0x16')][_0x1ffe('0x17')](_0x561670[_0x1ffe('0x18')],{'raw':_0x561670[_0x1ffe('0x19')]?_0x561670[_0x1ffe('0x19')][_0x1ffe('0x1a')]===undefined?!![]:![]:!![]})[_0x1ffe('0xa')](function(_0x38f189){logger[_0x1ffe('0xb')](_0x1ffe('0x1b'),_0x561670);logger['debug']('CreateAttachment',_0x561670,JSON[_0x1ffe('0x10')](_0x38f189));_0x42b92c(_0x38f189);})[_0x1ffe('0x15')](function(_0x95071c){logger['error']('CreateAttachment',_0x95071c[_0x1ffe('0x13')],_0x561670);_0x21950f(_0x4dbd7f[_0x1ffe('0x11')](0x1f4,_0x95071c[_0x1ffe('0x13')]));});});};
\ No newline at end of file
index 6e130d9..7ada540 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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(_0x10d34b,_0x4fef76){var _0x92b0bf=function(_0x16e291){while(--_0x16e291){_0x10d34b['push'](_0x10d34b['shift']());}};_0x92b0bf(++_0x4fef76);}(_0x5f66,0x1a0));var _0x65f6=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0x5f66[_0x4cf98e];return _0x1623ac;};'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
+var _0x2032=['./attachment.controller','get','isAuthenticated','index','/:id','show','download','/:id/clone','clone','root','server/files/attachments/','now','post','single','file','create','put','update','delete','destroy','exports','util','path','connect-timeout','Router','fs-extra','../../components/interaction/service','../../config/environment'];(function(_0x59ac2c,_0x27ed47){var _0x1437b2=function(_0x3e9f0b){while(--_0x3e9f0b){_0x59ac2c['push'](_0x59ac2c['shift']());}};_0x1437b2(++_0x27ed47);}(_0x2032,0xd9));var _0x2203=function(_0x18ef2b,_0x42873b){_0x18ef2b=_0x18ef2b-0x0;var _0x359d9d=_0x2032[_0x18ef2b];return _0x359d9d;};'use strict';var multer=require('multer');var util=require(_0x2203('0x0'));var path=require(_0x2203('0x1'));var timeout=require(_0x2203('0x2'));var express=require('express');var router=express[_0x2203('0x3')]();var fs_extra=require(_0x2203('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x2203('0x5'));var config=require(_0x2203('0x6'));var controller=require(_0x2203('0x7'));router[_0x2203('0x8')]('/',auth[_0x2203('0x9')](),controller[_0x2203('0xa')]);router[_0x2203('0x8')](_0x2203('0xb'),auth[_0x2203('0x9')](),controller[_0x2203('0xc')]);router[_0x2203('0x8')]('/:id/download',auth['isAuthenticated'](),controller[_0x2203('0xd')]);router['post'](_0x2203('0xe'),auth[_0x2203('0x9')](),controller[_0x2203('0xf')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x849049,_0x4a6832,_0x3f690a){_0x3f690a(null,path['join'](config[_0x2203('0x10')],_0x2203('0x11')));},'filename':function(_0x4b9376,_0x583bc7,_0x585c76){_0x585c76(null,util['format']('%s-%s',Date[_0x2203('0x12')](),_0x583bc7['originalname']['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x2203('0x13')]('/',upload[_0x2203('0x14')](_0x2203('0x15')),controller[_0x2203('0x16')]);router[_0x2203('0x17')](_0x2203('0xb'),auth[_0x2203('0x9')](),controller[_0x2203('0x18')]);router[_0x2203('0x19')](_0x2203('0xb'),auth['isAuthenticated'](),controller[_0x2203('0x1a')]);module[_0x2203('0x1b')]=router;
\ No newline at end of file
index aaf585f..2dbc4b8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x45db=['Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20configured','Setting','findOne','adSsoEnabled','blockDuration','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20enabled','name','password','salt','role','blocked','blockedAt','admin','user','domain','then','disabled','add','minutes','getLicense','catch','status','send','message','login','ad-login','Something\x20went\x20wrong,\x20please\x20try\x20again.','online','use','User','passport','passport-local','Strategy','moment','activedirectory2','bluebird','../../components/auth/service','../../config/utils','../../config/environment','api','undefined','activedirectory','error','Error\x20authenticate\x20%s:\x20%s','inspect'];(function(_0x15a958,_0x458a4f){var _0x3bd7b4=function(_0x25869b){while(--_0x25869b){_0x15a958['push'](_0x15a958['shift']());}};_0x3bd7b4(++_0x458a4f);}(_0x45db,0xa9));var _0xb45d=function(_0x53d809,_0x3b3b3c){_0x53d809=_0x53d809-0x0;var _0x271c17=_0x45db[_0x53d809];return _0x271c17;};'use strict';var passport=require(_0xb45d('0x0'));var LocalStrategy=require(_0xb45d('0x1'))[_0xb45d('0x2')];var moment=require(_0xb45d('0x3'));var ActiveDirectory=require(_0xb45d('0x4'));var BPromise=require(_0xb45d('0x5'));var util=require('util');var db=require('../../mysqldb')['db'];var authService=require(_0xb45d('0x6'));var utils=require(_0xb45d('0x7'));var config=require(_0xb45d('0x8'));var logger=require('../../config/logger')(_0xb45d('0x9'));function isActiveDirectoryConfigured(_0x3e6f4c){var _0x3d8ff8=![];if(typeof _0x3e6f4c['activedirectory']!==_0xb45d('0xa')){_0x3d8ff8=_0x3e6f4c[_0xb45d('0xb')]['baseDN']&&_0x3e6f4c[_0xb45d('0xb')]['url']&&_0x3e6f4c[_0xb45d('0xb')]['domain'];}return _0x3d8ff8;}function adAuthenticate(_0x3158fa,_0xc709fa,_0x2250d8){return new BPromise(function(_0x21d972,_0x456fbc){try{var _0x40586c=new ActiveDirectory(_0x3158fa);_0x40586c['authenticate'](_0xc709fa,_0x2250d8,function(_0x2d5655,_0x59807e){if(_0x2d5655){logger[_0xb45d('0xc')](_0xb45d('0xd'),_0xc709fa,util[_0xb45d('0xe')](_0x2d5655,{'showHidden':![],'depth':null}));_0x456fbc(_0xb45d('0xf'));}else if(!_0x59807e){logger[_0xb45d('0xc')]('Error\x20authenticate\x20%s:\x20Wrong\x20credentials',_0xc709fa);_0x456fbc(_0xb45d('0xf'));}else{_0x21d972(_0x59807e);}});}catch(_0x1dfabf){_0x456fbc(_0x1dfabf);}});}function ActiveDirectoryAuthenticate(_0x257dea,_0x46d104,_0x8d819e,_0x4cd610){var _0x39698c,_0x124f13;if(!isActiveDirectoryConfigured(config)){logger[_0xb45d('0xc')](_0xb45d('0x10'),_0x46d104);return _0x4cd610(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}return db[_0xb45d('0x11')][_0xb45d('0x12')]({'where':{'id':0x1},'attributes':[_0xb45d('0x13'),_0xb45d('0x14')],'raw':!![]})['then'](function(_0x27fc49){_0x39698c=_0x27fc49;if(!_0x39698c[_0xb45d('0x13')]){logger[_0xb45d('0xc')](_0xb45d('0x15'),_0x46d104);throw new Error(_0xb45d('0xf'));}return _0x257dea[_0xb45d('0x12')]({'attributes':['id',_0xb45d('0x16'),_0xb45d('0x17'),_0xb45d('0x18'),_0xb45d('0x19'),'disabled',_0xb45d('0x1a'),_0xb45d('0x1b'),'online'],'where':{'name':_0x46d104,'role':{'$or':[_0xb45d('0x1c'),_0xb45d('0x1d'),'agent']},'adSsoEnabled':!![]}});})['then'](function(_0x53df64){if(!_0x53df64||_0x53df64&&_0x53df64[_0xb45d('0x16')]!==_0x46d104){throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}_0x124f13=_0x53df64;var _0x520964=_0x124f13[_0xb45d('0x16')]+'@'+config[_0xb45d('0xb')][_0xb45d('0x1e')];return adAuthenticate(config[_0xb45d('0xb')],_0x520964,_0x8d819e);})[_0xb45d('0x1f')](function(_0x2c5932){if(_0x124f13[_0xb45d('0x20')]){throw new Error(_0xb45d('0xf'));}if(_0x39698c['blockDuration']>0x0){if(_0x124f13['blocked']){if(moment(_0x124f13[_0xb45d('0x1b')])[_0xb45d('0x21')](_0x39698c['blockDuration'],_0xb45d('0x22'))>moment()){throw new Error(_0xb45d('0xf'));}return utils['clearBlockUser'](_0x124f13,0x0,![],null)[_0xb45d('0x1f')](function(){return utils['getLicense'](_0x124f13);})[_0xb45d('0x1f')](function(){return _0x4cd610(null,_0x124f13);});}else{return utils[_0xb45d('0x23')](_0x124f13)[_0xb45d('0x1f')](function(){return _0x4cd610(null,_0x124f13);});}}else{return utils[_0xb45d('0x23')](_0x124f13)['then'](function(){return _0x4cd610(null,_0x124f13);});}})[_0xb45d('0x24')](function(_0x43b710){return _0x4cd610(null,![],_0x43b710);});}function handleError(_0x73d2d,_0x53875a,_0x4a535f){return _0x73d2d[_0xb45d('0x25')](_0x53875a||0x1f4)[_0xb45d('0x26')]({'message':_0x4a535f?_0x4a535f[_0xb45d('0x27')]||_0x4a535f:''});}exports[_0xb45d('0x28')]=function(_0x263563,_0x5dae57,_0x2886d9){passport['authenticate'](_0xb45d('0x29'),function(_0x3d9efd,_0x5570a9,_0xfefa39){var _0x4f3a65=_0x3d9efd||_0xfefa39;if(_0x4f3a65){return handleError(_0x5dae57,0x191,_0x4f3a65);}if(!_0x5570a9){return handleError(_0x5dae57,0x194,{'message':_0xb45d('0x2a')});}else{var _0x49e1b8={'payload':{'id':_0x5570a9['id'],'role':_0x5570a9[_0xb45d('0x19')]},'options':{'expiresIn':0x15180}};return authService['signToken'](_0x49e1b8)[_0xb45d('0x1f')](function(_0x396bf2){_0x5dae57['json']({'id':_0x5570a9['id'],'token':_0x396bf2,'statusCall':'','isAlreadyLogged':_0x5570a9[_0xb45d('0x2b')]});});}})(_0x263563,_0x5dae57,_0x2886d9);};passport[_0xb45d('0x2c')](_0xb45d('0x29'),new LocalStrategy({'usernameField':_0xb45d('0x16'),'passwordField':_0xb45d('0x17')},function(_0x59c985,_0x3bd3c9,_0x5d2eda){return ActiveDirectoryAuthenticate(db[_0xb45d('0x2d')],_0x59c985,_0x3bd3c9,_0x5d2eda);}));
\ No newline at end of file
+var _0x1bb0=['blocked','blockedAt','online','admin','user','add','minutes','getLicense','catch','login','authenticate','ad-login','Something\x20went\x20wrong,\x20please\x20try\x20again.','signToken','json','use','User','passport','Strategy','moment','activedirectory2','bluebird','util','../../mysqldb','../../components/auth/service','../../config/utils','api','activedirectory','undefined','baseDN','url','domain','error','Error\x20authenticate\x20%s:\x20%s','inspect','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','Error\x20authenticate\x20%s:\x20Wrong\x20credentials','Setting','findOne','adSsoEnabled','blockDuration','then','name','password','salt','role'];(function(_0x3aa7fa,_0x2390ae){var _0x13fc86=function(_0x21d33e){while(--_0x21d33e){_0x3aa7fa['push'](_0x3aa7fa['shift']());}};_0x13fc86(++_0x2390ae);}(_0x1bb0,0xc9));var _0x01bb=function(_0x4acc11,_0xe2f74f){_0x4acc11=_0x4acc11-0x0;var _0x2db26d=_0x1bb0[_0x4acc11];return _0x2db26d;};'use strict';var passport=require(_0x01bb('0x0'));var LocalStrategy=require('passport-local')[_0x01bb('0x1')];var moment=require(_0x01bb('0x2'));var ActiveDirectory=require(_0x01bb('0x3'));var BPromise=require(_0x01bb('0x4'));var util=require(_0x01bb('0x5'));var db=require(_0x01bb('0x6'))['db'];var authService=require(_0x01bb('0x7'));var utils=require(_0x01bb('0x8'));var config=require('../../config/environment');var logger=require('../../config/logger')(_0x01bb('0x9'));function isActiveDirectoryConfigured(_0x41ce0a){var _0x39510a=![];if(typeof _0x41ce0a[_0x01bb('0xa')]!==_0x01bb('0xb')){_0x39510a=_0x41ce0a['activedirectory'][_0x01bb('0xc')]&&_0x41ce0a['activedirectory'][_0x01bb('0xd')]&&_0x41ce0a[_0x01bb('0xa')][_0x01bb('0xe')];}return _0x39510a;}function adAuthenticate(_0x5e6252,_0x4cf991,_0x40dca3){return new BPromise(function(_0x159c6b,_0xc22278){try{var _0x29101a=new ActiveDirectory(_0x5e6252);_0x29101a['authenticate'](_0x4cf991,_0x40dca3,function(_0x312116,_0x15d25f){if(_0x312116){logger[_0x01bb('0xf')](_0x01bb('0x10'),_0x4cf991,util[_0x01bb('0x11')](_0x312116,{'showHidden':![],'depth':null}));_0xc22278(_0x01bb('0x12'));}else if(!_0x15d25f){logger[_0x01bb('0xf')](_0x01bb('0x13'),_0x4cf991);_0xc22278(_0x01bb('0x12'));}else{_0x159c6b(_0x15d25f);}});}catch(_0x323099){_0xc22278(_0x323099);}});}function ActiveDirectoryAuthenticate(_0x44b3d4,_0x2f4731,_0x441a6a,_0x14cb7b){var _0x4fc00f,_0x5dbcda;if(!isActiveDirectoryConfigured(config)){logger[_0x01bb('0xf')]('Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20configured',_0x2f4731);return _0x14cb7b(null,![],{'message':_0x01bb('0x12')});}return db[_0x01bb('0x14')][_0x01bb('0x15')]({'where':{'id':0x1},'attributes':[_0x01bb('0x16'),_0x01bb('0x17')],'raw':!![]})[_0x01bb('0x18')](function(_0x549e3e){_0x4fc00f=_0x549e3e;if(!_0x4fc00f[_0x01bb('0x16')]){logger[_0x01bb('0xf')]('Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20enabled',_0x2f4731);throw new Error(_0x01bb('0x12'));}return _0x44b3d4[_0x01bb('0x15')]({'attributes':['id',_0x01bb('0x19'),_0x01bb('0x1a'),_0x01bb('0x1b'),_0x01bb('0x1c'),'disabled',_0x01bb('0x1d'),_0x01bb('0x1e'),_0x01bb('0x1f')],'where':{'name':_0x2f4731,'role':{'$or':[_0x01bb('0x20'),_0x01bb('0x21'),'agent']},'adSsoEnabled':!![]}});})['then'](function(_0x5318a4){if(!_0x5318a4||_0x5318a4&&_0x5318a4['name']!==_0x2f4731){throw new Error(_0x01bb('0x12'));}_0x5dbcda=_0x5318a4;var _0x56331e=_0x5dbcda[_0x01bb('0x19')]+'@'+config[_0x01bb('0xa')][_0x01bb('0xe')];return adAuthenticate(config['activedirectory'],_0x56331e,_0x441a6a);})[_0x01bb('0x18')](function(_0x1aa1c7){if(_0x5dbcda['disabled']){throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}if(_0x4fc00f[_0x01bb('0x17')]>0x0){if(_0x5dbcda[_0x01bb('0x1d')]){if(moment(_0x5dbcda['blockedAt'])[_0x01bb('0x22')](_0x4fc00f[_0x01bb('0x17')],_0x01bb('0x23'))>moment()){throw new Error(_0x01bb('0x12'));}return utils['clearBlockUser'](_0x5dbcda,0x0,![],null)['then'](function(){return utils[_0x01bb('0x24')](_0x5dbcda);})[_0x01bb('0x18')](function(){return _0x14cb7b(null,_0x5dbcda);});}else{return utils[_0x01bb('0x24')](_0x5dbcda)[_0x01bb('0x18')](function(){return _0x14cb7b(null,_0x5dbcda);});}}else{return utils[_0x01bb('0x24')](_0x5dbcda)['then'](function(){return _0x14cb7b(null,_0x5dbcda);});}})[_0x01bb('0x25')](function(_0x3c49fc){return _0x14cb7b(null,![],_0x3c49fc);});}function handleError(_0xeb80ab,_0x2baccd,_0x330887){return _0xeb80ab['status'](_0x2baccd||0x1f4)['send']({'message':_0x330887?_0x330887['message']||_0x330887:''});}exports[_0x01bb('0x26')]=function(_0x36a655,_0x3e424b,_0x4c2b7a){passport[_0x01bb('0x27')](_0x01bb('0x28'),function(_0x434dc5,_0x3dc422,_0x2386ca){var _0x326073=_0x434dc5||_0x2386ca;if(_0x326073){return handleError(_0x3e424b,0x191,_0x326073);}if(!_0x3dc422){return handleError(_0x3e424b,0x194,{'message':_0x01bb('0x29')});}else{var _0x724e7a={'payload':{'id':_0x3dc422['id'],'role':_0x3dc422[_0x01bb('0x1c')]},'options':{'expiresIn':0x15180}};return authService[_0x01bb('0x2a')](_0x724e7a)['then'](function(_0x5922ca){_0x3e424b[_0x01bb('0x2b')]({'id':_0x3dc422['id'],'token':_0x5922ca,'statusCall':'','isAlreadyLogged':_0x3dc422[_0x01bb('0x1f')]});});}})(_0x36a655,_0x3e424b,_0x4c2b7a);};passport[_0x01bb('0x2c')](_0x01bb('0x28'),new LocalStrategy({'usernameField':_0x01bb('0x19'),'passwordField':_0x01bb('0x1a')},function(_0x264c3c,_0x5a8338,_0x3b894b){return ActiveDirectoryAuthenticate(db[_0x01bb('0x2d')],_0x264c3c,_0x5a8338,_0x3b894b);}));
\ No newline at end of file
index 0cefedd..3aad1fd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xedff=['post','login','express','Router','./authActiveDirectory.controller'];(function(_0x114bdf,_0x42e9d3){var _0x1cb120=function(_0x13481b){while(--_0x13481b){_0x114bdf['push'](_0x114bdf['shift']());}};_0x1cb120(++_0x42e9d3);}(_0xedff,0x98));var _0xfedf=function(_0x5c942a,_0x4c8872){_0x5c942a=_0x5c942a-0x0;var _0x21c584=_0xedff[_0x5c942a];return _0x21c584;};'use strict';var express=require(_0xfedf('0x0'));var router=express[_0xfedf('0x1')]();var controller=require(_0xfedf('0x2'));router[_0xfedf('0x3')]('/',controller[_0xfedf('0x4')]);module['exports']=router;
\ No newline at end of file
+var _0x5579=['login','exports','Router','post'];(function(_0x6f1a87,_0x5d5bcf){var _0x2495c7=function(_0x1c6733){while(--_0x1c6733){_0x6f1a87['push'](_0x6f1a87['shift']());}};_0x2495c7(++_0x5d5bcf);}(_0x5579,0x8e));var _0x9557=function(_0x211070,_0x35f484){_0x211070=_0x211070-0x0;var _0x5f36b9=_0x5579[_0x211070];return _0x5f36b9;};'use strict';var express=require('express');var router=express[_0x9557('0x0')]();var controller=require('./authActiveDirectory.controller');router[_0x9557('0x1')]('/',controller[_0x9557('0x2')]);module[_0x9557('0x3')]=router;
\ No newline at end of file
index 76b4ed3..14b3495 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(_0x4d8ed9,_0x2ae284){var _0x1e2140=function(_0x9cca89){while(--_0x9cca89){_0x4d8ed9['push'](_0x4d8ed9['shift']());}};_0x1e2140(++_0x2ae284);}(_0x7a54,0x106));var _0x47a5=function(_0xdbd08e,_0x1c13ee){_0xdbd08e=_0xdbd08e-0x0;var _0x9703c1=_0x7a54[_0xdbd08e];return _0x9703c1;};'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(_0xefd519,_0xc62635){var _0x4bb882=function(_0x37e0a1){while(--_0x37e0a1){_0xefd519['push'](_0xefd519['shift']());}};_0x4bb882(++_0xc62635);}(_0x7a54,0x106));var _0x47a5=function(_0x42b749,_0x188528){_0x42b749=_0x42b749-0x0;var _0x2c06ab=_0x7a54[_0x42b749];return _0x2c06ab;};'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 c77a250..2347e94 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4e8e=['login','/callback','callback','isMiddleware','setTokenCookie','exports','express','passport','../user/user.controller.js','../../components/auth/service','get'];(function(_0x140202,_0x4245c7){var _0x3037c2=function(_0x525d19){while(--_0x525d19){_0x140202['push'](_0x140202['shift']());}};_0x3037c2(++_0x4245c7);}(_0x4e8e,0x95));var _0xe4e8=function(_0x1f8b01,_0x4367ca){_0x1f8b01=_0x1f8b01-0x0;var _0x42c065=_0x4e8e[_0x1f8b01];return _0x42c065;};'use strict';var express=require(_0xe4e8('0x0'));var passport=require(_0xe4e8('0x1'));var router=express['Router']();var controller=require('./authGoogle.controller');var userController=require(_0xe4e8('0x2'));var authService=require(_0xe4e8('0x3'));router[_0xe4e8('0x4')]('/',controller[_0xe4e8('0x5')]);router['get'](_0xe4e8('0x6'),controller[_0xe4e8('0x7')],authService[_0xe4e8('0x8')],userController['login'],authService[_0xe4e8('0x9')]);module[_0xe4e8('0xa')]=router;
\ No newline at end of file
+var _0xba34=['setTokenCookie','exports','express','passport','Router','./authGoogle.controller','../user/user.controller.js','login','get','/callback','callback'];(function(_0x3ce3c,_0x319337){var _0x55a2c9=function(_0x1568d0){while(--_0x1568d0){_0x3ce3c['push'](_0x3ce3c['shift']());}};_0x55a2c9(++_0x319337);}(_0xba34,0xb2));var _0x4ba3=function(_0x272c6d,_0x58e5bd){_0x272c6d=_0x272c6d-0x0;var _0x5659ef=_0xba34[_0x272c6d];return _0x5659ef;};'use strict';var express=require(_0x4ba3('0x0'));var passport=require(_0x4ba3('0x1'));var router=express[_0x4ba3('0x2')]();var controller=require(_0x4ba3('0x3'));var userController=require(_0x4ba3('0x4'));var authService=require('../../components/auth/service');router['get']('/',controller[_0x4ba3('0x5')]);router[_0x4ba3('0x6')](_0x4ba3('0x7'),controller[_0x4ba3('0x8')],authService['isMiddleware'],userController['login'],authService[_0x4ba3('0x9')]);module[_0x4ba3('0xa')]=router;
\ No newline at end of file
index bb0fdfd..6033e24 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x55ac=['Setting','findOne','blockDuration','name','role','disabled','blockedAt','loginAttempts','user','agent','then','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','authenticate','allowedLoginAttempts','blocked','add','minutes','clearBlockUser','getLicense','catch','MailAccount','find','email','CloudProvider','Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!','getSmtpOptions','merge','format','Smtp','request','SendMail','error','SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!','message','stringify','send','local-login','Something\x20went\x20wrong,\x20please\x20try\x20again.','signToken','forgot','body','generate','trim','User','This\x20email\x20is\x20not\x20registered.','The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.','The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.','resetPasswordExpires','save','Please\x20click\x20on\x20the\x20following\x20link,\x20or\x20paste\x20this\x20into\x20your\x20browser\x20to\x20complete\x20the\x20process:\x0a\x0a','headers','host','/reset/','status','Reset\x20Email\x20sent!','params','now','enforcePasswordHistory','passwordHistoryLimit','securePassword','validatePasswordPattern','password','previousPasswords','validatePasswordHistory','resetPasswordToken','Password\x20reset!','use','jayson/promise','lodash','randomstring','moment','../../mysqldb','../../config/utils'];(function(_0x1a5bc2,_0x555317){var _0x35b5c9=function(_0x459486){while(--_0x459486){_0x1a5bc2['push'](_0x1a5bc2['shift']());}};_0x35b5c9(++_0x555317);}(_0x55ac,0x8c));var _0xc55a=function(_0x3d9ab1,_0x20dcf3){_0x3d9ab1=_0x3d9ab1-0x0;var _0x5ecefe=_0x55ac[_0x3d9ab1];return _0x5ecefe;};'use strict';var util=require('util');var passport=require('passport');var LocalStrategy=require('passport-local')['Strategy'];var jayson=require(_0xc55a('0x0'));var _=require(_0xc55a('0x1'));var rs=require(_0xc55a('0x2'));var moment=require(_0xc55a('0x3'));var db=require(_0xc55a('0x4'))['db'];var authService=require('../../components/auth/service');var utils=require(_0xc55a('0x5'));var client=jayson['client']['http']({'port':0x232b});function localAuthenticate(_0x108e3d,_0x37b72d,_0xebd0be,_0x4baa64){var _0x103bbd,_0x544534;return db[_0xc55a('0x6')][_0xc55a('0x7')]({'where':{'id':0x1},'attributes':['allowedLoginAttempts',_0xc55a('0x8')],'raw':!![]})['then'](function(_0x401f11){_0x103bbd=_0x401f11;return _0x108e3d[_0xc55a('0x7')]({'attributes':['id',_0xc55a('0x9'),'password','salt',_0xc55a('0xa'),_0xc55a('0xb'),'blocked',_0xc55a('0xc'),_0xc55a('0xd')],'where':{'name':_0x37b72d,'role':{'$or':['admin',_0xc55a('0xe'),_0xc55a('0xf')]}}});})[_0xc55a('0x10')](function(_0x4d0b61){if(!_0x4d0b61||_0x4d0b61&&_0x4d0b61[_0xc55a('0x9')]!==_0x37b72d){throw new Error(_0xc55a('0x11'));}else{_0x544534=_0x4d0b61;return _0x544534;}})['then'](function(){_0x544534[_0xc55a('0x12')](_0xebd0be,function(_0x46ae5a,_0x4ab8b3){var _0x4672c7=_0x544534['loginAttempts']+0x1;if(_0x46ae5a){return _0x4baa64(_0x46ae5a);}else if(!_0x4ab8b3){if(_0x544534[_0xc55a('0xb')]){return _0x4baa64(null,![],{'message':_0xc55a('0x11')});}else if(_0x103bbd[_0xc55a('0x13')]>0x0){if(_0x544534[_0xc55a('0x14')]){if(_0x103bbd[_0xc55a('0x8')]>0x0){if(moment(_0x544534[_0xc55a('0xc')])[_0xc55a('0x15')](_0x103bbd[_0xc55a('0x8')],_0xc55a('0x16'))>moment()){return _0x4baa64(null,![],{'message':_0xc55a('0x11')});}else{return utils['clearBlockUser'](_0x544534,_0x4672c7,![],null)['then'](function(){return _0x4baa64(null,![],{'message':_0xc55a('0x11')});});}}else{return _0x4baa64(null,![],{'message':_0xc55a('0x11')});}}else{if(_0x4672c7>=_0x103bbd['allowedLoginAttempts']){return utils[_0xc55a('0x17')](_0x544534,0x0,!![],moment())[_0xc55a('0x10')](function(){return _0x4baa64(null,![],{'message':_0xc55a('0x11')});});}else{return utils[_0xc55a('0x17')](_0x544534,_0x4672c7,![],null)['then'](function(){return _0x4baa64(null,![],{'message':_0xc55a('0x11')});});}}}else{return _0x4baa64(null,![],{'message':_0xc55a('0x11')});}}else{if(_0x544534['disabled']){return _0x4baa64(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else if(_0x103bbd[_0xc55a('0x13')]>0x0){if(_0x544534[_0xc55a('0x14')]){if(_0x103bbd[_0xc55a('0x8')]>0x0){if(moment(_0x544534[_0xc55a('0xc')])[_0xc55a('0x15')](_0x103bbd[_0xc55a('0x8')],_0xc55a('0x16'))>moment()){return _0x4baa64(null,![],{'message':_0xc55a('0x11')});}else{return utils[_0xc55a('0x17')](_0x544534,0x0,![],null)[_0xc55a('0x10')](function(){return utils[_0xc55a('0x18')](_0x544534);})[_0xc55a('0x10')](function(){return _0x4baa64(null,_0x544534);});}}else{return _0x4baa64(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}}else{return utils[_0xc55a('0x17')](_0x544534,0x0,![],null)[_0xc55a('0x10')](function(){return utils[_0xc55a('0x18')](_0x544534);})[_0xc55a('0x10')](function(){return _0x4baa64(null,_0x544534);})[_0xc55a('0x19')](function(_0x3bec24){return _0x4baa64(null,![],_0x3bec24);});}}else{if(_0x544534['blocked']){return _0x4baa64(null,![],{'message':_0xc55a('0x11')});}else{return utils[_0xc55a('0x18')](_0x544534)[_0xc55a('0x10')](function(){return _0x4baa64(null,_0x544534);});}}}});})['catch'](function(_0x49bf1a){return _0x4baa64(null,![],_0x49bf1a);});}function sendServiceMail(_0x5aad8e){return db[_0xc55a('0x1a')][_0xc55a('0x1b')]({'where':{'service':!![]},'attributes':['id',_0xc55a('0x9'),_0xc55a('0x1c')],'include':[{'model':db['MailServerOut'],'as':'Smtp','include':[{'model':db[_0xc55a('0x1d')],'as':_0xc55a('0x1d')}]}]})[_0xc55a('0x10')](function(_0x181521){if(!_0x181521){throw new Error(_0xc55a('0x1e'));}var _0x472bfd=_0x181521[_0xc55a('0x1f')]();var _0x105042={'account':_0x472bfd,'message':_[_0xc55a('0x20')]({'from':util[_0xc55a('0x21')]('\x22%s\x22\x20<%s>',_0x181521[_0xc55a('0x9')],_0x181521['email']||_0x181521[_0xc55a('0x22')][_0xc55a('0xe')])},_0x5aad8e)};return client[_0xc55a('0x23')](_0xc55a('0x24'),_0x105042);})[_0xc55a('0x10')](function(_0x389b45){if(_0x389b45[_0xc55a('0x25')]){throw new Error(util[_0xc55a('0x21')](_0xc55a('0x26'),_0x389b45[_0xc55a('0x25')][_0xc55a('0x27')]||JSON[_0xc55a('0x28')](_0x389b45['error'])));}return!![];});}function handleError(_0x48d8de,_0x8b9563,_0x2888b9){return _0x48d8de['status'](_0x8b9563||0x1f4)[_0xc55a('0x29')]({'message':_0x2888b9?_0x2888b9['message']||_0x2888b9:''});}exports['login']=function(_0x3ef243,_0x1fa6a5,_0xbe1b13){passport[_0xc55a('0x12')](_0xc55a('0x2a'),function(_0x3b6d37,_0x4e2f98,_0x273e5f){var _0x56fe6a=_0x3b6d37||_0x273e5f;if(_0x56fe6a){return handleError(_0x1fa6a5,0x191,_0x56fe6a);}if(!_0x4e2f98){return handleError(_0x1fa6a5,0x194,{'message':_0xc55a('0x2b')});}else{var _0x21284f={'payload':{'id':_0x4e2f98['id'],'role':_0x4e2f98[_0xc55a('0xa')]},'options':{'expiresIn':0x15180}};return authService[_0xc55a('0x2c')](_0x21284f)[_0xc55a('0x10')](function(_0x2d62f1){_0x1fa6a5['json']({'id':_0x4e2f98['id'],'token':_0x2d62f1,'statusCall':'','isAlreadyLogged':_0x4e2f98['online']});});}})(_0x3ef243,_0x1fa6a5,_0xbe1b13);};exports[_0xc55a('0x2d')]=function(_0x3e5197,_0xb02b60){if(!_0x3e5197[_0xc55a('0x2e')]['email']){return handleError(_0xb02b60,0x1f4,{'message':'Email\x20parameter\x20is\x20missing'});}var _0x3ea6ba=rs[_0xc55a('0x2f')]();_0x3e5197['body']['email']=_0x3e5197[_0xc55a('0x2e')][_0xc55a('0x1c')][_0xc55a('0x30')]()['toLowerCase']();var _0x3b929a;return db[_0xc55a('0x6')][_0xc55a('0x7')]({'where':{'id':0x1},'attributes':['allowedLoginAttempts','blockDuration'],'raw':!![]})[_0xc55a('0x10')](function(_0x4cc034){_0x3b929a=_0x4cc034;return db[_0xc55a('0x31')]['find']({'where':{'email':_0x3e5197[_0xc55a('0x2e')][_0xc55a('0x1c')]}});})[_0xc55a('0x10')](function(_0x35d437){if(!_0x35d437){throw new Error(_0xc55a('0x32'));}if(_0x35d437[_0xc55a('0xb')]){throw new Error(_0xc55a('0x33'));}if(_0x35d437[_0xc55a('0x14')]){if(moment(_0x35d437['blockedAt'])['add'](_0x3b929a[_0xc55a('0x8')],_0xc55a('0x16'))>moment()){throw new Error(_0xc55a('0x34'));}else{_0x35d437['blocked']=![];_0x35d437['blockedAt']=null;}}_0x35d437['resetPasswordToken']=_0x3ea6ba;_0x35d437[_0xc55a('0x35')]=Date['now']()+0x36ee80;return _0x35d437[_0xc55a('0x36')]();})[_0xc55a('0x10')](function(){return sendServiceMail({'to':_0x3e5197[_0xc55a('0x2e')][_0xc55a('0x1c')],'subject':'xCally\x20Motion\x20Password\x20Reset','text':'You\x20are\x20receiving\x20this\x20because\x20you\x20(or\x20someone\x20else)\x20have\x20requested\x20the\x20reset\x20of\x20the\x20password\x20for\x20your\x20account.\x0a\x0a'+_0xc55a('0x37')+'https://'+_0x3e5197[_0xc55a('0x38')][_0xc55a('0x39')]+_0xc55a('0x3a')+_0x3ea6ba+'\x0a\x0a'+'If\x20you\x20did\x20not\x20request\x20this,\x20please\x20ignore\x20this\x20email\x20and\x20your\x20password\x20will\x20remain\x20unchanged.\x0a'});})['then'](function(){_0xb02b60[_0xc55a('0x3b')](0xc8)[_0xc55a('0x29')]({'message':_0xc55a('0x3c')});})[_0xc55a('0x19')](function(_0x1ab4c5){return handleError(_0xb02b60,0x1f4,_0x1ab4c5);});};exports['reset']=function(_0x523e4f,_0xcf7278){return db[_0xc55a('0x31')][_0xc55a('0x1b')]({'where':{'resetPasswordToken':_0x523e4f[_0xc55a('0x3d')]['token'],'resetPasswordExpires':{'$gt':Date[_0xc55a('0x3e')]()}}})[_0xc55a('0x10')](function(_0x2ce6b5){if(!_0x2ce6b5){throw new Error('Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.');}return db[_0xc55a('0x6')]['findOne']({'attributes':['id','securePassword',_0xc55a('0x3f'),_0xc55a('0x40')]})['then'](function(_0x3223f5){if(_0x3223f5[_0xc55a('0x41')])authService[_0xc55a('0x42')](_0x523e4f[_0xc55a('0x2e')][_0xc55a('0x43')]);if(!_0x3223f5[_0xc55a('0x3f')]||!_0x2ce6b5[_0xc55a('0x44')])return _0x2ce6b5;authService[_0xc55a('0x45')](_0x523e4f[_0xc55a('0x2e')]['password'],_0x2ce6b5['previousPasswords'],_0x3223f5[_0xc55a('0x40')]);return _0x2ce6b5;})[_0xc55a('0x10')](function(){_0x2ce6b5[_0xc55a('0x43')]=_0x523e4f[_0xc55a('0x2e')][_0xc55a('0x43')];_0x2ce6b5[_0xc55a('0x46')]=null;_0x2ce6b5[_0xc55a('0x35')]=null;return _0x2ce6b5[_0xc55a('0x36')]();});})[_0xc55a('0x10')](function(){_0xcf7278[_0xc55a('0x3b')](0xc8)['send']({'message':_0xc55a('0x47')});})[_0xc55a('0x19')](function(_0x28f112){return handleError(_0xcf7278,0x1f4,_0x28f112);});};passport[_0xc55a('0x48')](_0xc55a('0x2a'),new LocalStrategy({'usernameField':_0xc55a('0x9'),'passwordField':'password'},function(_0x17f0f7,_0x10ba9a,_0x4e1a63){return localAuthenticate(db[_0xc55a('0x31')],_0x17f0f7,_0x10ba9a,_0x4e1a63);}));
\ No newline at end of file
+var _0x6081=['\x22%s\x22\x20<%s>','email','SendMail','error','format','SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!','message','stringify','status','send','local-login','Something\x20went\x20wrong,\x20please\x20try\x20again.','signToken','online','forgot','body','trim','toLowerCase','User','find','This\x20email\x20is\x20not\x20registered.','The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.','The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.','resetPasswordExpires','now','save','Please\x20click\x20on\x20the\x20following\x20link,\x20or\x20paste\x20this\x20into\x20your\x20browser\x20to\x20complete\x20the\x20process:\x0a\x0a','headers','/reset/','If\x20you\x20did\x20not\x20request\x20this,\x20please\x20ignore\x20this\x20email\x20and\x20your\x20password\x20will\x20remain\x20unchanged.\x0a','Reset\x20Email\x20sent!','reset','token','Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.','securePassword','validatePasswordPattern','enforcePasswordHistory','previousPasswords','passwordHistoryLimit','Password\x20reset!','use','util','passport','passport-local','Strategy','randomstring','moment','../../mysqldb','../../components/auth/service','../../config/utils','client','http','Setting','findOne','blockDuration','then','name','password','salt','disabled','blocked','blockedAt','loginAttempts','user','agent','authenticate','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','allowedLoginAttempts','clearBlockUser','add','minutes','getLicense','catch','MailServerOut','Smtp','CloudProvider','merge'];(function(_0x36ec43,_0x4449e7){var _0x3af915=function(_0x509e6b){while(--_0x509e6b){_0x36ec43['push'](_0x36ec43['shift']());}};_0x3af915(++_0x4449e7);}(_0x6081,0x76));var _0x1608=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x6081[_0x14add3];return _0x4a174f;};'use strict';var util=require(_0x1608('0x0'));var passport=require(_0x1608('0x1'));var LocalStrategy=require(_0x1608('0x2'))[_0x1608('0x3')];var jayson=require('jayson/promise');var _=require('lodash');var rs=require(_0x1608('0x4'));var moment=require(_0x1608('0x5'));var db=require(_0x1608('0x6'))['db'];var authService=require(_0x1608('0x7'));var utils=require(_0x1608('0x8'));var client=jayson[_0x1608('0x9')][_0x1608('0xa')]({'port':0x232b});function localAuthenticate(_0x42b14a,_0x5599aa,_0x58b21f,_0x1a7cb){var _0x5d0ea7,_0x5e0b20;return db[_0x1608('0xb')][_0x1608('0xc')]({'where':{'id':0x1},'attributes':['allowedLoginAttempts',_0x1608('0xd')],'raw':!![]})[_0x1608('0xe')](function(_0x22e372){_0x5d0ea7=_0x22e372;return _0x42b14a[_0x1608('0xc')]({'attributes':['id',_0x1608('0xf'),_0x1608('0x10'),_0x1608('0x11'),'role',_0x1608('0x12'),_0x1608('0x13'),_0x1608('0x14'),_0x1608('0x15')],'where':{'name':_0x5599aa,'role':{'$or':['admin',_0x1608('0x16'),_0x1608('0x17')]}}});})[_0x1608('0xe')](function(_0x2b2b85){if(!_0x2b2b85||_0x2b2b85&&_0x2b2b85[_0x1608('0xf')]!==_0x5599aa){throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else{_0x5e0b20=_0x2b2b85;return _0x5e0b20;}})[_0x1608('0xe')](function(){_0x5e0b20[_0x1608('0x18')](_0x58b21f,function(_0x42fbf1,_0x264c96){var _0x3c8f03=_0x5e0b20['loginAttempts']+0x1;if(_0x42fbf1){return _0x1a7cb(_0x42fbf1);}else if(!_0x264c96){if(_0x5e0b20[_0x1608('0x12')]){return _0x1a7cb(null,![],{'message':_0x1608('0x19')});}else if(_0x5d0ea7[_0x1608('0x1a')]>0x0){if(_0x5e0b20['blocked']){if(_0x5d0ea7[_0x1608('0xd')]>0x0){if(moment(_0x5e0b20[_0x1608('0x14')])['add'](_0x5d0ea7[_0x1608('0xd')],'minutes')>moment()){return _0x1a7cb(null,![],{'message':_0x1608('0x19')});}else{return utils['clearBlockUser'](_0x5e0b20,_0x3c8f03,![],null)[_0x1608('0xe')](function(){return _0x1a7cb(null,![],{'message':_0x1608('0x19')});});}}else{return _0x1a7cb(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}}else{if(_0x3c8f03>=_0x5d0ea7['allowedLoginAttempts']){return utils[_0x1608('0x1b')](_0x5e0b20,0x0,!![],moment())[_0x1608('0xe')](function(){return _0x1a7cb(null,![],{'message':_0x1608('0x19')});});}else{return utils['clearBlockUser'](_0x5e0b20,_0x3c8f03,![],null)['then'](function(){return _0x1a7cb(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});});}}}else{return _0x1a7cb(null,![],{'message':_0x1608('0x19')});}}else{if(_0x5e0b20[_0x1608('0x12')]){return _0x1a7cb(null,![],{'message':_0x1608('0x19')});}else if(_0x5d0ea7['allowedLoginAttempts']>0x0){if(_0x5e0b20[_0x1608('0x13')]){if(_0x5d0ea7[_0x1608('0xd')]>0x0){if(moment(_0x5e0b20[_0x1608('0x14')])[_0x1608('0x1c')](_0x5d0ea7['blockDuration'],_0x1608('0x1d'))>moment()){return _0x1a7cb(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else{return utils[_0x1608('0x1b')](_0x5e0b20,0x0,![],null)[_0x1608('0xe')](function(){return utils[_0x1608('0x1e')](_0x5e0b20);})[_0x1608('0xe')](function(){return _0x1a7cb(null,_0x5e0b20);});}}else{return _0x1a7cb(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}}else{return utils['clearBlockUser'](_0x5e0b20,0x0,![],null)[_0x1608('0xe')](function(){return utils[_0x1608('0x1e')](_0x5e0b20);})[_0x1608('0xe')](function(){return _0x1a7cb(null,_0x5e0b20);})[_0x1608('0x1f')](function(_0x4ce897){return _0x1a7cb(null,![],_0x4ce897);});}}else{if(_0x5e0b20[_0x1608('0x13')]){return _0x1a7cb(null,![],{'message':_0x1608('0x19')});}else{return utils[_0x1608('0x1e')](_0x5e0b20)[_0x1608('0xe')](function(){return _0x1a7cb(null,_0x5e0b20);});}}}});})[_0x1608('0x1f')](function(_0x361a08){return _0x1a7cb(null,![],_0x361a08);});}function sendServiceMail(_0x1787d5){return db['MailAccount']['find']({'where':{'service':!![]},'attributes':['id',_0x1608('0xf'),'email'],'include':[{'model':db[_0x1608('0x20')],'as':_0x1608('0x21'),'include':[{'model':db['CloudProvider'],'as':_0x1608('0x22')}]}]})[_0x1608('0xe')](function(_0x52a91a){if(!_0x52a91a){throw new Error('Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!');}var _0x45d47d=_0x52a91a['getSmtpOptions']();var _0x14a4a7={'account':_0x45d47d,'message':_[_0x1608('0x23')]({'from':util['format'](_0x1608('0x24'),_0x52a91a['name'],_0x52a91a[_0x1608('0x25')]||_0x52a91a[_0x1608('0x21')][_0x1608('0x16')])},_0x1787d5)};return client['request'](_0x1608('0x26'),_0x14a4a7);})['then'](function(_0x11ba70){if(_0x11ba70[_0x1608('0x27')]){throw new Error(util[_0x1608('0x28')](_0x1608('0x29'),_0x11ba70[_0x1608('0x27')][_0x1608('0x2a')]||JSON[_0x1608('0x2b')](_0x11ba70[_0x1608('0x27')])));}return!![];});}function handleError(_0x1ef030,_0xa17340,_0x3718b9){return _0x1ef030[_0x1608('0x2c')](_0xa17340||0x1f4)[_0x1608('0x2d')]({'message':_0x3718b9?_0x3718b9['message']||_0x3718b9:''});}exports['login']=function(_0x44a4cc,_0x53078f,_0x134f5c){passport[_0x1608('0x18')](_0x1608('0x2e'),function(_0x1325f8,_0x43f507,_0x59b9ce){var _0x1ca5e8=_0x1325f8||_0x59b9ce;if(_0x1ca5e8){return handleError(_0x53078f,0x191,_0x1ca5e8);}if(!_0x43f507){return handleError(_0x53078f,0x194,{'message':_0x1608('0x2f')});}else{var _0x200029={'payload':{'id':_0x43f507['id'],'role':_0x43f507['role']},'options':{'expiresIn':0x15180}};return authService[_0x1608('0x30')](_0x200029)[_0x1608('0xe')](function(_0x3420a6){_0x53078f['json']({'id':_0x43f507['id'],'token':_0x3420a6,'statusCall':'','isAlreadyLogged':_0x43f507[_0x1608('0x31')]});});}})(_0x44a4cc,_0x53078f,_0x134f5c);};exports[_0x1608('0x32')]=function(_0x1512e9,_0x300993){if(!_0x1512e9[_0x1608('0x33')][_0x1608('0x25')]){return handleError(_0x300993,0x1f4,{'message':'Email\x20parameter\x20is\x20missing'});}var _0x512058=rs['generate']();_0x1512e9[_0x1608('0x33')][_0x1608('0x25')]=_0x1512e9[_0x1608('0x33')]['email'][_0x1608('0x34')]()[_0x1608('0x35')]();var _0x41d6c9;return db[_0x1608('0xb')]['findOne']({'where':{'id':0x1},'attributes':[_0x1608('0x1a'),_0x1608('0xd')],'raw':!![]})[_0x1608('0xe')](function(_0x1ea317){_0x41d6c9=_0x1ea317;return db[_0x1608('0x36')][_0x1608('0x37')]({'where':{'email':_0x1512e9[_0x1608('0x33')][_0x1608('0x25')]}});})[_0x1608('0xe')](function(_0x3296a3){if(!_0x3296a3){throw new Error(_0x1608('0x38'));}if(_0x3296a3[_0x1608('0x12')]){throw new Error(_0x1608('0x39'));}if(_0x3296a3[_0x1608('0x13')]){if(moment(_0x3296a3[_0x1608('0x14')])['add'](_0x41d6c9[_0x1608('0xd')],_0x1608('0x1d'))>moment()){throw new Error(_0x1608('0x3a'));}else{_0x3296a3['blocked']=![];_0x3296a3['blockedAt']=null;}}_0x3296a3['resetPasswordToken']=_0x512058;_0x3296a3[_0x1608('0x3b')]=Date[_0x1608('0x3c')]()+0x36ee80;return _0x3296a3[_0x1608('0x3d')]();})[_0x1608('0xe')](function(){return sendServiceMail({'to':_0x1512e9[_0x1608('0x33')][_0x1608('0x25')],'subject':'xCally\x20Motion\x20Password\x20Reset','text':'You\x20are\x20receiving\x20this\x20because\x20you\x20(or\x20someone\x20else)\x20have\x20requested\x20the\x20reset\x20of\x20the\x20password\x20for\x20your\x20account.\x0a\x0a'+_0x1608('0x3e')+'https://'+_0x1512e9[_0x1608('0x3f')]['host']+_0x1608('0x40')+_0x512058+'\x0a\x0a'+_0x1608('0x41')});})['then'](function(){_0x300993[_0x1608('0x2c')](0xc8)['send']({'message':_0x1608('0x42')});})[_0x1608('0x1f')](function(_0x219850){return handleError(_0x300993,0x1f4,_0x219850);});};exports[_0x1608('0x43')]=function(_0x196e22,_0x2dc33f){return db[_0x1608('0x36')][_0x1608('0x37')]({'where':{'resetPasswordToken':_0x196e22['params'][_0x1608('0x44')],'resetPasswordExpires':{'$gt':Date[_0x1608('0x3c')]()}}})[_0x1608('0xe')](function(_0x2110f6){if(!_0x2110f6){throw new Error(_0x1608('0x45'));}return db[_0x1608('0xb')]['findOne']({'attributes':['id',_0x1608('0x46'),'enforcePasswordHistory','passwordHistoryLimit']})[_0x1608('0xe')](function(_0x272df6){if(_0x272df6[_0x1608('0x46')])authService[_0x1608('0x47')](_0x196e22[_0x1608('0x33')][_0x1608('0x10')]);if(!_0x272df6[_0x1608('0x48')]||!_0x2110f6[_0x1608('0x49')])return _0x2110f6;authService['validatePasswordHistory'](_0x196e22['body'][_0x1608('0x10')],_0x2110f6[_0x1608('0x49')],_0x272df6[_0x1608('0x4a')]);return _0x2110f6;})[_0x1608('0xe')](function(){_0x2110f6[_0x1608('0x10')]=_0x196e22['body'][_0x1608('0x10')];_0x2110f6['resetPasswordToken']=null;_0x2110f6['resetPasswordExpires']=null;return _0x2110f6[_0x1608('0x3d')]();});})[_0x1608('0xe')](function(){_0x2dc33f['status'](0xc8)[_0x1608('0x2d')]({'message':_0x1608('0x4b')});})['catch'](function(_0x1a0112){return handleError(_0x2dc33f,0x1f4,_0x1a0112);});};passport[_0x1608('0x4c')](_0x1608('0x2e'),new LocalStrategy({'usernameField':'name','passwordField':'password'},function(_0x15c9ae,_0x555025,_0x33f3f9){return localAuthenticate(db['User'],_0x15c9ae,_0x555025,_0x33f3f9);}));
\ No newline at end of file
index e85b758..7069543 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x23be=['Router','login','post','/forgot','forgot','/reset/:token','reset','express'];(function(_0x4eea34,_0x4bb8d1){var _0x459caf=function(_0x334735){while(--_0x334735){_0x4eea34['push'](_0x4eea34['shift']());}};_0x459caf(++_0x4bb8d1);}(_0x23be,0x1ef));var _0xe23b=function(_0x5264c6,_0x5100e6){_0x5264c6=_0x5264c6-0x0;var _0x24230d=_0x23be[_0x5264c6];return _0x24230d;};'use strict';var express=require(_0xe23b('0x0'));var router=express[_0xe23b('0x1')]();var controller=require('./authLocal.controller');router['post']('/',controller[_0xe23b('0x2')]);router[_0xe23b('0x3')](_0xe23b('0x4'),controller[_0xe23b('0x5')]);router['post'](_0xe23b('0x6'),controller[_0xe23b('0x7')]);module['exports']=router;
\ No newline at end of file
+var _0xac4d=['post','login','/forgot','/reset/:token','reset','exports','express','Router'];(function(_0x561e27,_0xe63bf0){var _0x5c91fb=function(_0x5e2661){while(--_0x5e2661){_0x561e27['push'](_0x561e27['shift']());}};_0x5c91fb(++_0xe63bf0);}(_0xac4d,0x19e));var _0xdac4=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xac4d[_0xa464c9];return _0x3d73c4;};'use strict';var express=require(_0xdac4('0x0'));var router=express[_0xdac4('0x1')]();var controller=require('./authLocal.controller');router[_0xdac4('0x2')]('/',controller[_0xdac4('0x3')]);router[_0xdac4('0x2')](_0xdac4('0x4'),controller['forgot']);router[_0xdac4('0x2')](_0xdac4('0x5'),controller[_0xdac4('0x6')]);module[_0xdac4('0x7')]=router;
\ No newline at end of file
index 2ca6313..030f798 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa68f=['exports','STRING','INTEGER','sequelize'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0xa68f,0x8f));var _0xfa68=function(_0xec6d30,_0xde2baf){_0xec6d30=_0xec6d30-0x0;var _0x42d5b8=_0xa68f[_0xec6d30];return _0x42d5b8;};'use strict';var Sequelize=require(_0xfa68('0x0'));module[_0xfa68('0x1')]={'name':{'type':Sequelize[_0xfa68('0x2')],'allowNull':![]},'channel':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xfa68('0x2')]},'status':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'timeout':{'type':Sequelize[_0xfa68('0x3')],'defaultValue':0xa}};
\ No newline at end of file
+var _0xd175=['sequelize','exports','STRING','BOOLEAN','INTEGER'];(function(_0x30faee,_0x1c3794){var _0x3a90ab=function(_0x11129b){while(--_0x11129b){_0x30faee['push'](_0x30faee['shift']());}};_0x3a90ab(++_0x1c3794);}(_0xd175,0xbe));var _0x5d17=function(_0x477d58,_0x154115){_0x477d58=_0x477d58-0x0;var _0x72c330=_0xd175[_0x477d58];return _0x72c330;};'use strict';var Sequelize=require(_0x5d17('0x0'));module[_0x5d17('0x1')]={'name':{'type':Sequelize[_0x5d17('0x2')],'allowNull':![]},'channel':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x5d17('0x2')]},'status':{'type':Sequelize[_0x5d17('0x3')],'defaultValue':![]},'timeout':{'type':Sequelize[_0x5d17('0x4')],'defaultValue':0xa}};
\ No newline at end of file
index 36bcb45..e33186e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb433=['json','offset','count','set','Content-Range','update','destroy','then','end','sendStatus','error','name','send','index','map','Automation','rawAttributes','type','key','model','query','keys','intersection','attributes','fields','length','limit','sort','pick','filters','filter','where','merge','VIRTUAL','options','includeAll','include','catch','params','find','create','body','addConditions','omit','getConditions','findOne','Condition','order','nolimit','Action','addActions','ids','getActions','hasOwnProperty','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/environment','../../config/license/util','status'];(function(_0xac0463,_0x3d0ebe){var _0x1b7b69=function(_0x5b3617){while(--_0x5b3617){_0xac0463['push'](_0xac0463['shift']());}};_0x1b7b69(++_0x3d0ebe);}(_0xb433,0x126));var _0x3b43=function(_0x4935d3,_0x37bb5b){_0x4935d3=_0x4935d3-0x0;var _0x457d57=_0xb433[_0x4935d3];return _0x457d57;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x3b43('0x0'));var zipdir=require(_0x3b43('0x1'));var jsonpatch=require(_0x3b43('0x2'));var rp=require(_0x3b43('0x3'));var moment=require(_0x3b43('0x4'));var BPromise=require(_0x3b43('0x5'));var Mustache=require('mustache');var util=require(_0x3b43('0x6'));var path=require(_0x3b43('0x7'));var sox=require(_0x3b43('0x8'));var csv=require(_0x3b43('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x3b43('0xa'));var _=require(_0x3b43('0xb'));var squel=require(_0x3b43('0xc'));var crypto=require(_0x3b43('0xd'));var jsforce=require(_0x3b43('0xe'));var deskjs=require(_0x3b43('0xf'));var toCsv=require('to-csv');var querystring=require(_0x3b43('0x10'));var Papa=require(_0x3b43('0x11'));var Redis=require('ioredis');var authService=require(_0x3b43('0x12'));var qs=require(_0x3b43('0x13'));var as=require(_0x3b43('0x14'));var hardwareService=require(_0x3b43('0x15'));var logger=require(_0x3b43('0x16'))('api');var utils=require('../../config/utils');var config=require(_0x3b43('0x17'));var licenseUtil=require(_0x3b43('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x573d39,_0x4a4bcb){_0x4a4bcb=_0x4a4bcb||0xcc;return function(_0x37d639){if(_0x37d639){return _0x573d39['sendStatus'](_0x4a4bcb);}return _0x573d39[_0x3b43('0x19')](_0x4a4bcb)['end']();};}function respondWithResult(_0xbc951d,_0x7225b9){_0x7225b9=_0x7225b9||0xc8;return function(_0xbf2bf8){if(_0xbf2bf8){return _0xbc951d[_0x3b43('0x19')](_0x7225b9)[_0x3b43('0x1a')](_0xbf2bf8);}};}function respondWithFilteredResult(_0x40f9f8,_0x2835a7){return function(_0xaa4dfc){if(_0xaa4dfc){var _0x4d8fc5=typeof _0x2835a7[_0x3b43('0x1b')]==='undefined'&&typeof _0x2835a7['limit']==='undefined';var _0x1aa86e=_0xaa4dfc[_0x3b43('0x1c')];var _0x1dfd91=_0x4d8fc5?0x0:_0x2835a7[_0x3b43('0x1b')];var _0x47d450=_0x4d8fc5?_0xaa4dfc[_0x3b43('0x1c')]:_0x2835a7[_0x3b43('0x1b')]+_0x2835a7['limit'];var _0xa0b3d8;if(_0x47d450>=_0x1aa86e){_0x47d450=_0x1aa86e;_0xa0b3d8=0xc8;}else{_0xa0b3d8=0xce;}_0x40f9f8['status'](_0xa0b3d8);return _0x40f9f8[_0x3b43('0x1d')](_0x3b43('0x1e'),_0x1dfd91+'-'+_0x47d450+'/'+_0x1aa86e)[_0x3b43('0x1a')](_0xaa4dfc);}return null;};}function patchUpdates(_0x24760c){return function(_0x66761f){try{jsonpatch['apply'](_0x66761f,_0x24760c,!![]);}catch(_0x1638ea){return BPromise['reject'](_0x1638ea);}return _0x66761f['save']();};}function saveUpdates(_0x15abbf,_0x5c38ad){return function(_0x488046){if(_0x488046){return _0x488046[_0x3b43('0x1f')](_0x15abbf)['then'](function(_0x3bc3ee){return _0x3bc3ee;});}return null;};}function removeEntity(_0x4aa5ce,_0x5b3fe1){return function(_0x35d3b0){if(_0x35d3b0){return _0x35d3b0[_0x3b43('0x20')]()[_0x3b43('0x21')](function(){_0x4aa5ce[_0x3b43('0x19')](0xcc)[_0x3b43('0x22')]();});}};}function handleEntityNotFound(_0x26ecfc,_0x1a94fc){return function(_0x31ec39){if(!_0x31ec39){_0x26ecfc[_0x3b43('0x23')](0x194);}return _0x31ec39;};}function handleError(_0x2606c4,_0x28e314){_0x28e314=_0x28e314||0x1f4;return function(_0x1780a0){logger[_0x3b43('0x24')](_0x1780a0['stack']);if(_0x1780a0['name']){delete _0x1780a0[_0x3b43('0x25')];}_0x2606c4['status'](_0x28e314)[_0x3b43('0x26')](_0x1780a0);};}exports[_0x3b43('0x27')]=function(_0x5adce6,_0x567663){var _0x380bdc={},_0x324b76={},_0x32c5d8={'count':0x0,'rows':[]};var _0x193a8c=_[_0x3b43('0x28')](db[_0x3b43('0x29')][_0x3b43('0x2a')],function(_0x20098f){return{'name':_0x20098f['fieldName'],'type':_0x20098f[_0x3b43('0x2b')][_0x3b43('0x2c')]};});_0x324b76[_0x3b43('0x2d')]=_[_0x3b43('0x28')](_0x193a8c,_0x3b43('0x25'));_0x324b76[_0x3b43('0x2e')]=_[_0x3b43('0x2f')](_0x5adce6[_0x3b43('0x2e')]);_0x324b76['filters']=_[_0x3b43('0x30')](_0x324b76[_0x3b43('0x2d')],_0x324b76['query']);_0x380bdc[_0x3b43('0x31')]=_['intersection'](_0x324b76['model'],qs[_0x3b43('0x32')](_0x5adce6[_0x3b43('0x2e')][_0x3b43('0x32')]));_0x380bdc[_0x3b43('0x31')]=_0x380bdc[_0x3b43('0x31')][_0x3b43('0x33')]?_0x380bdc[_0x3b43('0x31')]:_0x324b76[_0x3b43('0x2d')];if(!_0x5adce6['query']['hasOwnProperty']('nolimit')){_0x380bdc[_0x3b43('0x34')]=qs[_0x3b43('0x34')](_0x5adce6['query'][_0x3b43('0x34')]);_0x380bdc['offset']=qs[_0x3b43('0x1b')](_0x5adce6[_0x3b43('0x2e')]['offset']);}_0x380bdc['order']=qs[_0x3b43('0x35')](_0x5adce6[_0x3b43('0x2e')][_0x3b43('0x35')]);_0x380bdc['where']=qs['filters'](_[_0x3b43('0x36')](_0x5adce6[_0x3b43('0x2e')],_0x324b76[_0x3b43('0x37')]),_0x193a8c);if(_0x5adce6['query'][_0x3b43('0x38')]){_0x380bdc[_0x3b43('0x39')]=_[_0x3b43('0x3a')](_0x380bdc['where'],{'$or':_[_0x3b43('0x28')](_0x193a8c,function(_0x4dc5c7){if(_0x4dc5c7[_0x3b43('0x2b')]!==_0x3b43('0x3b')){var _0x799a9e={};_0x799a9e[_0x4dc5c7[_0x3b43('0x25')]]={'$like':'%'+_0x5adce6[_0x3b43('0x2e')]['filter']+'%'};return _0x799a9e;}})});}_0x380bdc=_['merge']({},_0x380bdc,_0x5adce6[_0x3b43('0x3c')]);var _0x4ebd39={'where':_0x380bdc[_0x3b43('0x39')]};return db['Automation'][_0x3b43('0x1c')](_0x4ebd39)['then'](function(_0x15bacb){_0x32c5d8[_0x3b43('0x1c')]=_0x15bacb;if(_0x5adce6['query'][_0x3b43('0x3d')]){_0x380bdc[_0x3b43('0x3e')]=[{'all':!![]}];}return db[_0x3b43('0x29')]['findAll'](_0x380bdc);})[_0x3b43('0x21')](function(_0x5b2da6){_0x32c5d8['rows']=_0x5b2da6;return _0x32c5d8;})['then'](respondWithFilteredResult(_0x567663,_0x380bdc))[_0x3b43('0x3f')](handleError(_0x567663,null));};exports['show']=function(_0x1cb163,_0x2f1017){var _0x23ad64={'raw':![],'where':{'id':_0x1cb163[_0x3b43('0x40')]['id']}},_0xaafce={};_0xaafce[_0x3b43('0x2d')]=_[_0x3b43('0x2f')](db[_0x3b43('0x29')]['rawAttributes']);_0xaafce[_0x3b43('0x2e')]=_['keys'](_0x1cb163[_0x3b43('0x2e')]);_0xaafce[_0x3b43('0x37')]=_[_0x3b43('0x30')](_0xaafce[_0x3b43('0x2d')],_0xaafce[_0x3b43('0x2e')]);_0x23ad64[_0x3b43('0x31')]=_[_0x3b43('0x30')](_0xaafce[_0x3b43('0x2d')],qs[_0x3b43('0x32')](_0x1cb163[_0x3b43('0x2e')]['fields']));_0x23ad64[_0x3b43('0x31')]=_0x23ad64[_0x3b43('0x31')]['length']?_0x23ad64[_0x3b43('0x31')]:_0xaafce[_0x3b43('0x2d')];if(_0x1cb163[_0x3b43('0x2e')]['includeAll']){_0x23ad64['include']=[{'all':!![]}];}_0x23ad64=_[_0x3b43('0x3a')]({},_0x23ad64,_0x1cb163[_0x3b43('0x3c')]);return db['Automation'][_0x3b43('0x41')](_0x23ad64)[_0x3b43('0x21')](handleEntityNotFound(_0x2f1017,null))[_0x3b43('0x21')](respondWithResult(_0x2f1017,null))['catch'](handleError(_0x2f1017,null));};exports[_0x3b43('0x42')]=function(_0x3189e7,_0x23d379){return db[_0x3b43('0x29')][_0x3b43('0x42')](_0x3189e7[_0x3b43('0x43')],{})[_0x3b43('0x21')](respondWithResult(_0x23d379,0xc9))[_0x3b43('0x3f')](handleError(_0x23d379,null));};exports[_0x3b43('0x1f')]=function(_0x1449f9,_0x578d33){if(_0x1449f9[_0x3b43('0x43')]['id']){delete _0x1449f9[_0x3b43('0x43')]['id'];}return db[_0x3b43('0x29')][_0x3b43('0x41')]({'where':{'id':_0x1449f9[_0x3b43('0x40')]['id']}})[_0x3b43('0x21')](handleEntityNotFound(_0x578d33,null))[_0x3b43('0x21')](saveUpdates(_0x1449f9[_0x3b43('0x43')],null))[_0x3b43('0x21')](respondWithResult(_0x578d33,null))[_0x3b43('0x3f')](handleError(_0x578d33,null));};exports['destroy']=function(_0x5e045c,_0x51066c){return db[_0x3b43('0x29')][_0x3b43('0x41')]({'where':{'id':_0x5e045c['params']['id']}})[_0x3b43('0x21')](handleEntityNotFound(_0x51066c,null))[_0x3b43('0x21')](removeEntity(_0x51066c,null))[_0x3b43('0x3f')](handleError(_0x51066c,null));};exports[_0x3b43('0x44')]=function(_0x4a7789,_0x423407,_0x34c6b7){return db['Condition'][_0x3b43('0x41')]({'where':{'id':_0x4a7789[_0x3b43('0x40')]['id']}})[_0x3b43('0x21')](handleEntityNotFound(_0x423407,null))[_0x3b43('0x21')](function(_0x432861){if(_0x432861){return _0x432861[_0x3b43('0x44')](_0x4a7789[_0x3b43('0x43')]['ids'],_[_0x3b43('0x45')](_0x4a7789[_0x3b43('0x43')],['ids','id'])||{});}})[_0x3b43('0x21')](respondWithResult(_0x423407,null))[_0x3b43('0x3f')](handleError(_0x423407,null));};exports[_0x3b43('0x46')]=function(_0x229304,_0xc599dc,_0x30c4e9){var _0x43ca28={};var _0x165f4e={};var _0x1750cd;var _0x166262;return db[_0x3b43('0x29')][_0x3b43('0x47')]({'where':{'id':_0x229304[_0x3b43('0x40')]['id']}})['then'](handleEntityNotFound(_0xc599dc,null))[_0x3b43('0x21')](function(_0x5675cf){if(_0x5675cf){_0x1750cd=_0x5675cf;_0x165f4e[_0x3b43('0x2d')]=_[_0x3b43('0x2f')](db[_0x3b43('0x48')][_0x3b43('0x2a')]);_0x165f4e[_0x3b43('0x2e')]=_[_0x3b43('0x2f')](_0x229304[_0x3b43('0x2e')]);_0x165f4e[_0x3b43('0x37')]=_[_0x3b43('0x30')](_0x165f4e['model'],_0x165f4e[_0x3b43('0x2e')]);_0x43ca28[_0x3b43('0x31')]=_[_0x3b43('0x30')](_0x165f4e[_0x3b43('0x2d')],qs[_0x3b43('0x32')](_0x229304[_0x3b43('0x2e')][_0x3b43('0x32')]));_0x43ca28['attributes']=_0x43ca28[_0x3b43('0x31')][_0x3b43('0x33')]?_0x43ca28[_0x3b43('0x31')]:_0x165f4e[_0x3b43('0x2d')];_0x43ca28[_0x3b43('0x49')]=qs[_0x3b43('0x35')](_0x229304[_0x3b43('0x2e')][_0x3b43('0x35')]);_0x43ca28['where']=qs['filters'](_[_0x3b43('0x36')](_0x229304['query'],_0x165f4e['filters']));if(_0x229304[_0x3b43('0x2e')][_0x3b43('0x38')]){_0x43ca28[_0x3b43('0x39')]=_[_0x3b43('0x3a')](_0x43ca28[_0x3b43('0x39')],{'$or':_['map'](_0x43ca28[_0x3b43('0x31')],function(_0x435ee5){var _0x3cd94e={};_0x3cd94e[_0x435ee5]={'$like':'%'+_0x229304[_0x3b43('0x2e')][_0x3b43('0x38')]+'%'};return _0x3cd94e;})});}_0x43ca28=_[_0x3b43('0x3a')]({},_0x43ca28,_0x229304[_0x3b43('0x3c')]);return _0x1750cd[_0x3b43('0x46')](_0x43ca28);}})[_0x3b43('0x21')](function(_0x23edbd){if(_0x23edbd){_0x166262=_0x23edbd[_0x3b43('0x33')];if(!_0x229304['query']['hasOwnProperty'](_0x3b43('0x4a'))){_0x43ca28['limit']=qs[_0x3b43('0x34')](_0x229304[_0x3b43('0x2e')][_0x3b43('0x34')]);_0x43ca28[_0x3b43('0x1b')]=qs[_0x3b43('0x1b')](_0x229304['query'][_0x3b43('0x1b')]);}return _0x1750cd['getConditions'](_0x43ca28);}})[_0x3b43('0x21')](function(_0xc9de26){if(_0xc9de26){return _0xc9de26?{'count':_0x166262,'rows':_0xc9de26}:null;}})[_0x3b43('0x21')](respondWithResult(_0xc599dc,null))[_0x3b43('0x3f')](handleError(_0xc599dc,null));};exports['addActions']=function(_0x43b7b1,_0x2cee4e,_0x5eaf3d){return db[_0x3b43('0x4b')][_0x3b43('0x41')]({'where':{'id':_0x43b7b1['params']['id']}})[_0x3b43('0x21')](handleEntityNotFound(_0x2cee4e,null))[_0x3b43('0x21')](function(_0x18767f){if(_0x18767f){return _0x18767f[_0x3b43('0x4c')](_0x43b7b1['body'][_0x3b43('0x4d')],_[_0x3b43('0x45')](_0x43b7b1['body'],[_0x3b43('0x4d'),'id'])||{});}})['then'](respondWithResult(_0x2cee4e,null))['catch'](handleError(_0x2cee4e,null));};exports[_0x3b43('0x4e')]=function(_0x206124,_0x466707,_0x25c65f){var _0x3e95be={};var _0x1bd4a1={};var _0x1d3213;var _0x5c0a0f;return db[_0x3b43('0x29')][_0x3b43('0x47')]({'where':{'id':_0x206124['params']['id']}})[_0x3b43('0x21')](handleEntityNotFound(_0x466707,null))[_0x3b43('0x21')](function(_0x169d6a){if(_0x169d6a){_0x1d3213=_0x169d6a;_0x1bd4a1[_0x3b43('0x2d')]=_[_0x3b43('0x2f')](db[_0x3b43('0x4b')][_0x3b43('0x2a')]);_0x1bd4a1[_0x3b43('0x2e')]=_[_0x3b43('0x2f')](_0x206124[_0x3b43('0x2e')]);_0x1bd4a1[_0x3b43('0x37')]=_['intersection'](_0x1bd4a1[_0x3b43('0x2d')],_0x1bd4a1[_0x3b43('0x2e')]);_0x3e95be[_0x3b43('0x31')]=_[_0x3b43('0x30')](_0x1bd4a1[_0x3b43('0x2d')],qs['fields'](_0x206124[_0x3b43('0x2e')][_0x3b43('0x32')]));_0x3e95be[_0x3b43('0x31')]=_0x3e95be['attributes'][_0x3b43('0x33')]?_0x3e95be['attributes']:_0x1bd4a1['model'];_0x3e95be['order']=qs[_0x3b43('0x35')](_0x206124[_0x3b43('0x2e')][_0x3b43('0x35')]);_0x3e95be[_0x3b43('0x39')]=qs['filters'](_[_0x3b43('0x36')](_0x206124[_0x3b43('0x2e')],_0x1bd4a1['filters']));if(_0x206124[_0x3b43('0x2e')][_0x3b43('0x38')]){_0x3e95be['where']=_[_0x3b43('0x3a')](_0x3e95be[_0x3b43('0x39')],{'$or':_[_0x3b43('0x28')](_0x3e95be[_0x3b43('0x31')],function(_0x3d60aa){var _0x2027df={};_0x2027df[_0x3d60aa]={'$like':'%'+_0x206124[_0x3b43('0x2e')]['filter']+'%'};return _0x2027df;})});}_0x3e95be=_[_0x3b43('0x3a')]({},_0x3e95be,_0x206124[_0x3b43('0x3c')]);return _0x1d3213[_0x3b43('0x4e')](_0x3e95be);}})[_0x3b43('0x21')](function(_0x5d3d67){if(_0x5d3d67){_0x5c0a0f=_0x5d3d67[_0x3b43('0x33')];if(!_0x206124[_0x3b43('0x2e')][_0x3b43('0x4f')](_0x3b43('0x4a'))){_0x3e95be['limit']=qs[_0x3b43('0x34')](_0x206124[_0x3b43('0x2e')][_0x3b43('0x34')]);_0x3e95be[_0x3b43('0x1b')]=qs[_0x3b43('0x1b')](_0x206124[_0x3b43('0x2e')][_0x3b43('0x1b')]);}return _0x1d3213[_0x3b43('0x4e')](_0x3e95be);}})['then'](function(_0x42c179){if(_0x42c179){return _0x42c179?{'count':_0x5c0a0f,'rows':_0x42c179}:null;}})[_0x3b43('0x21')](respondWithResult(_0x466707,null))[_0x3b43('0x3f')](handleError(_0x466707,null));};
\ No newline at end of file
+var _0x13c0=['querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','name','index','map','Automation','rawAttributes','key','model','query','keys','intersection','attributes','length','hasOwnProperty','nolimit','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','findAll','rows','catch','show','fields','include','body','find','params','addConditions','Condition','ids','getConditions','findOne','order','Action','omit','getActions','eml-format','rimraf','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js'];(function(_0x45ea93,_0x5c86d5){var _0x1eaf65=function(_0x47a7db){while(--_0x47a7db){_0x45ea93['push'](_0x45ea93['shift']());}};_0x1eaf65(++_0x5c86d5);}(_0x13c0,0x93));var _0x013c=function(_0x264e7f,_0x4b8f91){_0x264e7f=_0x264e7f-0x0;var _0x173e6e=_0x13c0[_0x264e7f];return _0x173e6e;};'use strict';var emlformat=require(_0x013c('0x0'));var rimraf=require(_0x013c('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x013c('0x2'));var moment=require(_0x013c('0x3'));var BPromise=require(_0x013c('0x4'));var Mustache=require(_0x013c('0x5'));var util=require(_0x013c('0x6'));var path=require(_0x013c('0x7'));var sox=require('sox');var csv=require(_0x013c('0x8'));var ejs=require(_0x013c('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x013c('0xa'));var squel=require(_0x013c('0xb'));var crypto=require(_0x013c('0xc'));var jsforce=require(_0x013c('0xd'));var deskjs=require(_0x013c('0xe'));var toCsv=require(_0x013c('0x8'));var querystring=require(_0x013c('0xf'));var Papa=require(_0x013c('0x10'));var Redis=require(_0x013c('0x11'));var authService=require(_0x013c('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x013c('0x13'));var logger=require(_0x013c('0x14'))('api');var utils=require(_0x013c('0x15'));var config=require(_0x013c('0x16'));var licenseUtil=require(_0x013c('0x17'));var db=require(_0x013c('0x18'))['db'];function respondWithStatusCode(_0x3e1605,_0x396406){_0x396406=_0x396406||0xcc;return function(_0x47b215){if(_0x47b215){return _0x3e1605[_0x013c('0x19')](_0x396406);}return _0x3e1605['status'](_0x396406)[_0x013c('0x1a')]();};}function respondWithResult(_0x16133c,_0x48742b){_0x48742b=_0x48742b||0xc8;return function(_0x19363e){if(_0x19363e){return _0x16133c[_0x013c('0x1b')](_0x48742b)['json'](_0x19363e);}};}function respondWithFilteredResult(_0x53b1b4,_0x433b14){return function(_0x507213){if(_0x507213){var _0x1019e4=typeof _0x433b14[_0x013c('0x1c')]===_0x013c('0x1d')&&typeof _0x433b14[_0x013c('0x1e')]===_0x013c('0x1d');var _0x43721b=_0x507213[_0x013c('0x1f')];var _0x1c51d5=_0x1019e4?0x0:_0x433b14['offset'];var _0x3feea6=_0x1019e4?_0x507213[_0x013c('0x1f')]:_0x433b14[_0x013c('0x1c')]+_0x433b14[_0x013c('0x1e')];var _0x5d57a2;if(_0x3feea6>=_0x43721b){_0x3feea6=_0x43721b;_0x5d57a2=0xc8;}else{_0x5d57a2=0xce;}_0x53b1b4[_0x013c('0x1b')](_0x5d57a2);return _0x53b1b4[_0x013c('0x20')](_0x013c('0x21'),_0x1c51d5+'-'+_0x3feea6+'/'+_0x43721b)['json'](_0x507213);}return null;};}function patchUpdates(_0x4ed8cb){return function(_0x17456d){try{jsonpatch[_0x013c('0x22')](_0x17456d,_0x4ed8cb,!![]);}catch(_0x504bc3){return BPromise[_0x013c('0x23')](_0x504bc3);}return _0x17456d[_0x013c('0x24')]();};}function saveUpdates(_0x1f7b67,_0xb6246){return function(_0x5f00a6){if(_0x5f00a6){return _0x5f00a6[_0x013c('0x25')](_0x1f7b67)[_0x013c('0x26')](function(_0x103bc0){return _0x103bc0;});}return null;};}function removeEntity(_0x216526,_0x509f77){return function(_0x58ef60){if(_0x58ef60){return _0x58ef60[_0x013c('0x27')]()[_0x013c('0x26')](function(){_0x216526[_0x013c('0x1b')](0xcc)[_0x013c('0x1a')]();});}};}function handleEntityNotFound(_0x2cbd5b,_0x2dfe93){return function(_0x55bc27){if(!_0x55bc27){_0x2cbd5b['sendStatus'](0x194);}return _0x55bc27;};}function handleError(_0x54fdfb,_0x1706f9){_0x1706f9=_0x1706f9||0x1f4;return function(_0x47e4c6){logger['error'](_0x47e4c6['stack']);if(_0x47e4c6[_0x013c('0x28')]){delete _0x47e4c6['name'];}_0x54fdfb[_0x013c('0x1b')](_0x1706f9)['send'](_0x47e4c6);};}exports[_0x013c('0x29')]=function(_0x203e86,_0x279c6e){var _0x5d4fce={},_0x3f31a6={},_0x4e6a83={'count':0x0,'rows':[]};var _0x3ff805=_[_0x013c('0x2a')](db[_0x013c('0x2b')][_0x013c('0x2c')],function(_0x4986d1){return{'name':_0x4986d1['fieldName'],'type':_0x4986d1['type'][_0x013c('0x2d')]};});_0x3f31a6[_0x013c('0x2e')]=_['map'](_0x3ff805,_0x013c('0x28'));_0x3f31a6[_0x013c('0x2f')]=_[_0x013c('0x30')](_0x203e86[_0x013c('0x2f')]);_0x3f31a6['filters']=_[_0x013c('0x31')](_0x3f31a6['model'],_0x3f31a6['query']);_0x5d4fce[_0x013c('0x32')]=_[_0x013c('0x31')](_0x3f31a6[_0x013c('0x2e')],qs['fields'](_0x203e86[_0x013c('0x2f')]['fields']));_0x5d4fce['attributes']=_0x5d4fce[_0x013c('0x32')][_0x013c('0x33')]?_0x5d4fce[_0x013c('0x32')]:_0x3f31a6[_0x013c('0x2e')];if(!_0x203e86[_0x013c('0x2f')][_0x013c('0x34')](_0x013c('0x35'))){_0x5d4fce[_0x013c('0x1e')]=qs[_0x013c('0x1e')](_0x203e86[_0x013c('0x2f')][_0x013c('0x1e')]);_0x5d4fce[_0x013c('0x1c')]=qs['offset'](_0x203e86[_0x013c('0x2f')][_0x013c('0x1c')]);}_0x5d4fce['order']=qs[_0x013c('0x36')](_0x203e86[_0x013c('0x2f')][_0x013c('0x36')]);_0x5d4fce[_0x013c('0x37')]=qs[_0x013c('0x38')](_[_0x013c('0x39')](_0x203e86[_0x013c('0x2f')],_0x3f31a6['filters']),_0x3ff805);if(_0x203e86[_0x013c('0x2f')][_0x013c('0x3a')]){_0x5d4fce[_0x013c('0x37')]=_[_0x013c('0x3b')](_0x5d4fce[_0x013c('0x37')],{'$or':_[_0x013c('0x2a')](_0x3ff805,function(_0x2c2590){if(_0x2c2590['type']!==_0x013c('0x3c')){var _0x589209={};_0x589209[_0x2c2590[_0x013c('0x28')]]={'$like':'%'+_0x203e86[_0x013c('0x2f')][_0x013c('0x3a')]+'%'};return _0x589209;}})});}_0x5d4fce=_[_0x013c('0x3b')]({},_0x5d4fce,_0x203e86[_0x013c('0x3d')]);var _0x2fa37a={'where':_0x5d4fce[_0x013c('0x37')]};return db['Automation']['count'](_0x2fa37a)[_0x013c('0x26')](function(_0x5214d7){_0x4e6a83[_0x013c('0x1f')]=_0x5214d7;if(_0x203e86[_0x013c('0x2f')][_0x013c('0x3e')]){_0x5d4fce['include']=[{'all':!![]}];}return db[_0x013c('0x2b')][_0x013c('0x3f')](_0x5d4fce);})[_0x013c('0x26')](function(_0x72cdd4){_0x4e6a83[_0x013c('0x40')]=_0x72cdd4;return _0x4e6a83;})[_0x013c('0x26')](respondWithFilteredResult(_0x279c6e,_0x5d4fce))[_0x013c('0x41')](handleError(_0x279c6e,null));};exports[_0x013c('0x42')]=function(_0x8d05,_0x24e448){var _0x3a8675={'raw':![],'where':{'id':_0x8d05['params']['id']}},_0x5a22f6={};_0x5a22f6[_0x013c('0x2e')]=_[_0x013c('0x30')](db['Automation'][_0x013c('0x2c')]);_0x5a22f6['query']=_[_0x013c('0x30')](_0x8d05[_0x013c('0x2f')]);_0x5a22f6[_0x013c('0x38')]=_[_0x013c('0x31')](_0x5a22f6[_0x013c('0x2e')],_0x5a22f6['query']);_0x3a8675['attributes']=_[_0x013c('0x31')](_0x5a22f6[_0x013c('0x2e')],qs[_0x013c('0x43')](_0x8d05[_0x013c('0x2f')][_0x013c('0x43')]));_0x3a8675[_0x013c('0x32')]=_0x3a8675[_0x013c('0x32')][_0x013c('0x33')]?_0x3a8675['attributes']:_0x5a22f6[_0x013c('0x2e')];if(_0x8d05[_0x013c('0x2f')][_0x013c('0x3e')]){_0x3a8675[_0x013c('0x44')]=[{'all':!![]}];}_0x3a8675=_[_0x013c('0x3b')]({},_0x3a8675,_0x8d05[_0x013c('0x3d')]);return db[_0x013c('0x2b')]['find'](_0x3a8675)[_0x013c('0x26')](handleEntityNotFound(_0x24e448,null))[_0x013c('0x26')](respondWithResult(_0x24e448,null))[_0x013c('0x41')](handleError(_0x24e448,null));};exports['create']=function(_0x466a5a,_0x43d990){return db['Automation']['create'](_0x466a5a[_0x013c('0x45')],{})[_0x013c('0x26')](respondWithResult(_0x43d990,0xc9))['catch'](handleError(_0x43d990,null));};exports['update']=function(_0x512d1d,_0x11ae7a){if(_0x512d1d[_0x013c('0x45')]['id']){delete _0x512d1d[_0x013c('0x45')]['id'];}return db[_0x013c('0x2b')][_0x013c('0x46')]({'where':{'id':_0x512d1d[_0x013c('0x47')]['id']}})[_0x013c('0x26')](handleEntityNotFound(_0x11ae7a,null))[_0x013c('0x26')](saveUpdates(_0x512d1d[_0x013c('0x45')],null))[_0x013c('0x26')](respondWithResult(_0x11ae7a,null))[_0x013c('0x41')](handleError(_0x11ae7a,null));};exports[_0x013c('0x27')]=function(_0x1a7466,_0x58175c){return db['Automation']['find']({'where':{'id':_0x1a7466['params']['id']}})[_0x013c('0x26')](handleEntityNotFound(_0x58175c,null))[_0x013c('0x26')](removeEntity(_0x58175c,null))[_0x013c('0x41')](handleError(_0x58175c,null));};exports[_0x013c('0x48')]=function(_0x37882d,_0x2816b5,_0xb98a86){return db[_0x013c('0x49')][_0x013c('0x46')]({'where':{'id':_0x37882d['params']['id']}})[_0x013c('0x26')](handleEntityNotFound(_0x2816b5,null))['then'](function(_0x533ca7){if(_0x533ca7){return _0x533ca7[_0x013c('0x48')](_0x37882d[_0x013c('0x45')][_0x013c('0x4a')],_['omit'](_0x37882d[_0x013c('0x45')],[_0x013c('0x4a'),'id'])||{});}})['then'](respondWithResult(_0x2816b5,null))['catch'](handleError(_0x2816b5,null));};exports[_0x013c('0x4b')]=function(_0x49e69f,_0x2dcb9a,_0x25ca22){var _0x4f7875={};var _0x2c61c4={};var _0x37837f;var _0x57e319;return db[_0x013c('0x2b')][_0x013c('0x4c')]({'where':{'id':_0x49e69f['params']['id']}})[_0x013c('0x26')](handleEntityNotFound(_0x2dcb9a,null))[_0x013c('0x26')](function(_0x4f565b){if(_0x4f565b){_0x37837f=_0x4f565b;_0x2c61c4[_0x013c('0x2e')]=_[_0x013c('0x30')](db[_0x013c('0x49')]['rawAttributes']);_0x2c61c4['query']=_[_0x013c('0x30')](_0x49e69f[_0x013c('0x2f')]);_0x2c61c4[_0x013c('0x38')]=_['intersection'](_0x2c61c4['model'],_0x2c61c4['query']);_0x4f7875['attributes']=_['intersection'](_0x2c61c4[_0x013c('0x2e')],qs['fields'](_0x49e69f['query'][_0x013c('0x43')]));_0x4f7875[_0x013c('0x32')]=_0x4f7875[_0x013c('0x32')][_0x013c('0x33')]?_0x4f7875[_0x013c('0x32')]:_0x2c61c4['model'];_0x4f7875[_0x013c('0x4d')]=qs[_0x013c('0x36')](_0x49e69f[_0x013c('0x2f')][_0x013c('0x36')]);_0x4f7875['where']=qs[_0x013c('0x38')](_[_0x013c('0x39')](_0x49e69f['query'],_0x2c61c4[_0x013c('0x38')]));if(_0x49e69f[_0x013c('0x2f')][_0x013c('0x3a')]){_0x4f7875[_0x013c('0x37')]=_[_0x013c('0x3b')](_0x4f7875['where'],{'$or':_[_0x013c('0x2a')](_0x4f7875[_0x013c('0x32')],function(_0x39d104){var _0x11cc64={};_0x11cc64[_0x39d104]={'$like':'%'+_0x49e69f[_0x013c('0x2f')][_0x013c('0x3a')]+'%'};return _0x11cc64;})});}_0x4f7875=_[_0x013c('0x3b')]({},_0x4f7875,_0x49e69f[_0x013c('0x3d')]);return _0x37837f[_0x013c('0x4b')](_0x4f7875);}})['then'](function(_0x4c3ffd){if(_0x4c3ffd){_0x57e319=_0x4c3ffd['length'];if(!_0x49e69f[_0x013c('0x2f')]['hasOwnProperty'](_0x013c('0x35'))){_0x4f7875[_0x013c('0x1e')]=qs[_0x013c('0x1e')](_0x49e69f[_0x013c('0x2f')][_0x013c('0x1e')]);_0x4f7875[_0x013c('0x1c')]=qs[_0x013c('0x1c')](_0x49e69f[_0x013c('0x2f')][_0x013c('0x1c')]);}return _0x37837f[_0x013c('0x4b')](_0x4f7875);}})[_0x013c('0x26')](function(_0x43a55b){if(_0x43a55b){return _0x43a55b?{'count':_0x57e319,'rows':_0x43a55b}:null;}})[_0x013c('0x26')](respondWithResult(_0x2dcb9a,null))['catch'](handleError(_0x2dcb9a,null));};exports['addActions']=function(_0x59f52e,_0x1d6437,_0x57159a){return db[_0x013c('0x4e')][_0x013c('0x46')]({'where':{'id':_0x59f52e[_0x013c('0x47')]['id']}})[_0x013c('0x26')](handleEntityNotFound(_0x1d6437,null))[_0x013c('0x26')](function(_0x2118f8){if(_0x2118f8){return _0x2118f8['addActions'](_0x59f52e[_0x013c('0x45')]['ids'],_[_0x013c('0x4f')](_0x59f52e[_0x013c('0x45')],[_0x013c('0x4a'),'id'])||{});}})[_0x013c('0x26')](respondWithResult(_0x1d6437,null))['catch'](handleError(_0x1d6437,null));};exports[_0x013c('0x50')]=function(_0x340179,_0xd86e8e,_0x257bd0){var _0x26e3b6={};var _0x39d11a={};var _0x363565;var _0x245056;return db[_0x013c('0x2b')]['findOne']({'where':{'id':_0x340179['params']['id']}})[_0x013c('0x26')](handleEntityNotFound(_0xd86e8e,null))[_0x013c('0x26')](function(_0x5a910f){if(_0x5a910f){_0x363565=_0x5a910f;_0x39d11a[_0x013c('0x2e')]=_[_0x013c('0x30')](db[_0x013c('0x4e')][_0x013c('0x2c')]);_0x39d11a[_0x013c('0x2f')]=_['keys'](_0x340179[_0x013c('0x2f')]);_0x39d11a[_0x013c('0x38')]=_[_0x013c('0x31')](_0x39d11a[_0x013c('0x2e')],_0x39d11a[_0x013c('0x2f')]);_0x26e3b6[_0x013c('0x32')]=_[_0x013c('0x31')](_0x39d11a[_0x013c('0x2e')],qs[_0x013c('0x43')](_0x340179['query']['fields']));_0x26e3b6[_0x013c('0x32')]=_0x26e3b6[_0x013c('0x32')][_0x013c('0x33')]?_0x26e3b6[_0x013c('0x32')]:_0x39d11a[_0x013c('0x2e')];_0x26e3b6[_0x013c('0x4d')]=qs['sort'](_0x340179[_0x013c('0x2f')][_0x013c('0x36')]);_0x26e3b6[_0x013c('0x37')]=qs[_0x013c('0x38')](_[_0x013c('0x39')](_0x340179['query'],_0x39d11a['filters']));if(_0x340179[_0x013c('0x2f')][_0x013c('0x3a')]){_0x26e3b6[_0x013c('0x37')]=_[_0x013c('0x3b')](_0x26e3b6['where'],{'$or':_['map'](_0x26e3b6['attributes'],function(_0x4bbe23){var _0x4a33c0={};_0x4a33c0[_0x4bbe23]={'$like':'%'+_0x340179[_0x013c('0x2f')]['filter']+'%'};return _0x4a33c0;})});}_0x26e3b6=_[_0x013c('0x3b')]({},_0x26e3b6,_0x340179[_0x013c('0x3d')]);return _0x363565['getActions'](_0x26e3b6);}})[_0x013c('0x26')](function(_0x462d46){if(_0x462d46){_0x245056=_0x462d46[_0x013c('0x33')];if(!_0x340179[_0x013c('0x2f')]['hasOwnProperty']('nolimit')){_0x26e3b6[_0x013c('0x1e')]=qs['limit'](_0x340179[_0x013c('0x2f')][_0x013c('0x1e')]);_0x26e3b6[_0x013c('0x1c')]=qs[_0x013c('0x1c')](_0x340179[_0x013c('0x2f')]['offset']);}return _0x363565['getActions'](_0x26e3b6);}})['then'](function(_0x58fc0e){if(_0x58fc0e){return _0x58fc0e?{'count':_0x245056,'rows':_0x58fc0e}:null;}})['then'](respondWithResult(_0xd86e8e,null))[_0x013c('0x41')](handleError(_0xd86e8e,null));};
\ No newline at end of file
index d4cbb88..3e3cac0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9c11=['tools_automations','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./automation.attributes','exports'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x9c11,0x9a));var _0x19c1=function(_0x5edb42,_0x59dc23){_0x5edb42=_0x5edb42-0x0;var _0x313cf7=_0x9c11[_0x5edb42];return _0x313cf7;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x19c1('0x0'))('api');var moment=require(_0x19c1('0x1'));var BPromise=require(_0x19c1('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x19c1('0x3'));var rimraf=require(_0x19c1('0x4'));var config=require(_0x19c1('0x5'));var attributes=require(_0x19c1('0x6'));module[_0x19c1('0x7')]=function(_0x20fee5,_0x18edbe){return _0x20fee5['define']('Automation',attributes,{'tableName':_0x19c1('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x2135=['tools_automations','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./automation.attributes','define','Automation'];(function(_0x3d3ae9,_0x334c52){var _0x31b364=function(_0x6aa61c){while(--_0x6aa61c){_0x3d3ae9['push'](_0x3d3ae9['shift']());}};_0x31b364(++_0x334c52);}(_0x2135,0x11f));var _0x5213=function(_0x347a3c,_0x7ca6a7){_0x347a3c=_0x347a3c-0x0;var _0x4395b4=_0x2135[_0x347a3c];return _0x4395b4;};'use strict';var _=require(_0x5213('0x0'));var util=require(_0x5213('0x1'));var logger=require(_0x5213('0x2'))(_0x5213('0x3'));var moment=require(_0x5213('0x4'));var BPromise=require(_0x5213('0x5'));var rp=require(_0x5213('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x5213('0x7'));var config=require(_0x5213('0x8'));var attributes=require(_0x5213('0x9'));module['exports']=function(_0x3b86f9,_0x3ff830){return _0x3b86f9[_0x5213('0xa')](_0x5213('0xb'),attributes,{'tableName':_0x5213('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index a347d53..6d7610d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc4d8=['then','info','debug','Automation,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','Automation,\x20%s,\x20%s','result','catch','lodash','moment','bluebird','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','request'];(function(_0x26cc37,_0x1c49d2){var _0x244e5c=function(_0xa9d9d9){while(--_0xa9d9d9){_0x26cc37['push'](_0x26cc37['shift']());}};_0x244e5c(++_0x1c49d2);}(_0xc4d8,0xa6));var _0x8c4d=function(_0x2fc012,_0x503e5b){_0x2fc012=_0x2fc012-0x0;var _0x2891f9=_0xc4d8[_0x2fc012];return _0x2891f9;};'use strict';var _=require(_0x8c4d('0x0'));var util=require('util');var moment=require(_0x8c4d('0x1'));var BPromise=require(_0x8c4d('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8c4d('0x3'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x8c4d('0x4'));var config=require(_0x8c4d('0x5'));var jayson=require(_0x8c4d('0x6'));var client=jayson[_0x8c4d('0x7')][_0x8c4d('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x15da54,_0x19ac49,_0x75b3d6){return new BPromise(function(_0x3369b8,_0x521b76){return client[_0x8c4d('0x9')](_0x15da54,_0x75b3d6)[_0x8c4d('0xa')](function(_0x36b577){logger[_0x8c4d('0xb')]('Automation,\x20%s,\x20%s',_0x19ac49,'request\x20sent');logger[_0x8c4d('0xc')](_0x8c4d('0xd'),_0x19ac49,_0x8c4d('0xe'),JSON[_0x8c4d('0xf')](_0x36b577));if(_0x36b577[_0x8c4d('0x10')]){if(_0x36b577[_0x8c4d('0x10')][_0x8c4d('0x11')]===0x1f4){logger[_0x8c4d('0x10')]('Automation,\x20%s,\x20%s',_0x19ac49,_0x36b577[_0x8c4d('0x10')][_0x8c4d('0x12')]);return _0x521b76(_0x36b577[_0x8c4d('0x10')][_0x8c4d('0x12')]);}logger[_0x8c4d('0x10')](_0x8c4d('0x13'),_0x19ac49,_0x36b577[_0x8c4d('0x10')][_0x8c4d('0x12')]);return _0x3369b8(_0x36b577['error']['message']);}else{logger[_0x8c4d('0xb')](_0x8c4d('0x13'),_0x19ac49,'request\x20sent');_0x3369b8(_0x36b577[_0x8c4d('0x14')][_0x8c4d('0x12')]);}})[_0x8c4d('0x15')](function(_0x4d8ded){logger[_0x8c4d('0x10')](_0x8c4d('0x13'),_0x19ac49,_0x4d8ded);_0x521b76(_0x4d8ded);});});}
\ No newline at end of file
+var _0xa958=['ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','request','then','info','Automation,\x20%s,\x20%s','request\x20sent','Automation,\x20%s,\x20%s,\x20%s','error','message','lodash','moment','bluebird','randomstring'];(function(_0x27f972,_0x37dc34){var _0xd73923=function(_0x4ed563){while(--_0x4ed563){_0x27f972['push'](_0x27f972['shift']());}};_0xd73923(++_0x37dc34);}(_0xa958,0x94));var _0x8a95=function(_0x55f8b4,_0x43f30d){_0x55f8b4=_0x55f8b4-0x0;var _0x2475f9=_0xa958[_0x55f8b4];return _0x2475f9;};'use strict';var _=require(_0x8a95('0x0'));var util=require('util');var moment=require(_0x8a95('0x1'));var BPromise=require(_0x8a95('0x2'));var rs=require(_0x8a95('0x3'));var fs=require('fs');var Redis=require(_0x8a95('0x4'));var db=require(_0x8a95('0x5'))['db'];var utils=require(_0x8a95('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x8a95('0x7'));var jayson=require(_0x8a95('0x8'));var client=jayson[_0x8a95('0x9')][_0x8a95('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x387db4,_0xdd54e1,_0x161f00){return new BPromise(function(_0x49287d,_0xe03b31){return client[_0x8a95('0xb')](_0x387db4,_0x161f00)[_0x8a95('0xc')](function(_0x240b22){logger[_0x8a95('0xd')](_0x8a95('0xe'),_0xdd54e1,_0x8a95('0xf'));logger['debug'](_0x8a95('0x10'),_0xdd54e1,_0x8a95('0xf'),JSON['stringify'](_0x240b22));if(_0x240b22[_0x8a95('0x11')]){if(_0x240b22['error']['code']===0x1f4){logger[_0x8a95('0x11')]('Automation,\x20%s,\x20%s',_0xdd54e1,_0x240b22[_0x8a95('0x11')][_0x8a95('0x12')]);return _0xe03b31(_0x240b22['error'][_0x8a95('0x12')]);}logger[_0x8a95('0x11')]('Automation,\x20%s,\x20%s',_0xdd54e1,_0x240b22[_0x8a95('0x11')][_0x8a95('0x12')]);return _0x49287d(_0x240b22[_0x8a95('0x11')][_0x8a95('0x12')]);}else{logger[_0x8a95('0xd')](_0x8a95('0xe'),_0xdd54e1,_0x8a95('0xf'));_0x49287d(_0x240b22['result'][_0x8a95('0x12')]);}})['catch'](function(_0x334b18){logger['error'](_0x8a95('0xe'),_0xdd54e1,_0x334b18);_0xe03b31(_0x334b18);});});}
\ No newline at end of file
index 8d6989b..7dd3b64 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xea89=['path','connect-timeout','express','fs-extra','../../components/interaction/service','./automation.controller','get','isAuthenticated','index','/:id','/:id/conditions','getConditions','/:id/actions','getActions','post','create','put','update','delete','exports','multer','util'];(function(_0x5d31e7,_0x543588){var _0x750a60=function(_0x4fe74a){while(--_0x4fe74a){_0x5d31e7['push'](_0x5d31e7['shift']());}};_0x750a60(++_0x543588);}(_0xea89,0x1e2));var _0x9ea8=function(_0x322a26,_0x408ced){_0x322a26=_0x322a26-0x0;var _0x8191ba=_0xea89[_0x322a26];return _0x8191ba;};'use strict';var multer=require(_0x9ea8('0x0'));var util=require(_0x9ea8('0x1'));var path=require(_0x9ea8('0x2'));var timeout=require(_0x9ea8('0x3'));var express=require(_0x9ea8('0x4'));var router=express['Router']();var fs_extra=require(_0x9ea8('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x9ea8('0x6'));var config=require('../../config/environment');var controller=require(_0x9ea8('0x7'));router[_0x9ea8('0x8')]('/',auth[_0x9ea8('0x9')](),controller[_0x9ea8('0xa')]);router[_0x9ea8('0x8')](_0x9ea8('0xb'),auth[_0x9ea8('0x9')](),controller['show']);router[_0x9ea8('0x8')](_0x9ea8('0xc'),auth['isAuthenticated'](),controller[_0x9ea8('0xd')]);router[_0x9ea8('0x8')](_0x9ea8('0xe'),auth['isAuthenticated'](),controller[_0x9ea8('0xf')]);router[_0x9ea8('0x10')]('/',auth[_0x9ea8('0x9')](),controller[_0x9ea8('0x11')]);router[_0x9ea8('0x10')](_0x9ea8('0xc'),auth[_0x9ea8('0x9')](),controller['addConditions']);router[_0x9ea8('0x10')](_0x9ea8('0xe'),auth[_0x9ea8('0x9')](),controller['addActions']);router[_0x9ea8('0x12')](_0x9ea8('0xb'),auth[_0x9ea8('0x9')](),controller[_0x9ea8('0x13')]);router[_0x9ea8('0x14')](_0x9ea8('0xb'),auth[_0x9ea8('0x9')](),controller['destroy']);module[_0x9ea8('0x15')]=router;
\ No newline at end of file
+var _0x58f4=['post','create','/:id/conditions','addConditions','addActions','/:id','update','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./automation.controller','get','isAuthenticated','show','getConditions','/:id/actions','getActions'];(function(_0x557783,_0x16d8bb){var _0x728269=function(_0x10402b){while(--_0x10402b){_0x557783['push'](_0x557783['shift']());}};_0x728269(++_0x16d8bb);}(_0x58f4,0x1b2));var _0x458f=function(_0x8d8c0,_0xd3dd86){_0x8d8c0=_0x8d8c0-0x0;var _0xff1b13=_0x58f4[_0x8d8c0];return _0xff1b13;};'use strict';var multer=require('multer');var util=require(_0x458f('0x0'));var path=require(_0x458f('0x1'));var timeout=require(_0x458f('0x2'));var express=require(_0x458f('0x3'));var router=express[_0x458f('0x4')]();var fs_extra=require(_0x458f('0x5'));var auth=require(_0x458f('0x6'));var interaction=require(_0x458f('0x7'));var config=require(_0x458f('0x8'));var controller=require(_0x458f('0x9'));router[_0x458f('0xa')]('/',auth[_0x458f('0xb')](),controller['index']);router['get']('/:id',auth['isAuthenticated'](),controller[_0x458f('0xc')]);router[_0x458f('0xa')]('/:id/conditions',auth[_0x458f('0xb')](),controller[_0x458f('0xd')]);router[_0x458f('0xa')](_0x458f('0xe'),auth[_0x458f('0xb')](),controller[_0x458f('0xf')]);router[_0x458f('0x10')]('/',auth['isAuthenticated'](),controller[_0x458f('0x11')]);router[_0x458f('0x10')](_0x458f('0x12'),auth[_0x458f('0xb')](),controller[_0x458f('0x13')]);router[_0x458f('0x10')](_0x458f('0xe'),auth[_0x458f('0xb')](),controller[_0x458f('0x14')]);router['put'](_0x458f('0x15'),auth[_0x458f('0xb')](),controller[_0x458f('0x16')]);router['delete'](_0x458f('0x15'),auth['isAuthenticated'](),controller[_0x458f('0x17')]);module[_0x458f('0x18')]=router;
\ No newline at end of file
index c4df818..804218c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeaec=['#AMD\x20Greeting','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Min\x20Word\x20Length','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','DESC','ASC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','Cut\x20Digit\x20(min:1,\x20max:15)','#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)','NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','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','name','ENUM','STRING','BOOLEAN','Active/Disactive\x20Campaign','INTEGER','Max\x20200\x20calls.','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','UNSIGNED','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)','07:00-22:00,*,*,*','always','never','onlyIfOpen','Active/Disactive\x20AMD'];(function(_0x45034c,_0x259ac9){var _0x63a0af=function(_0x237ebe){while(--_0x237ebe){_0x45034c['push'](_0x45034c['shift']());}};_0x63a0af(++_0x259ac9);}(_0xeaec,0x191));var _0xceae=function(_0xbbe044,_0x8fa4bd){_0xbbe044=_0xbbe044-0x0;var _0x343d81=_0xeaec[_0xbbe044];return _0x343d81;};'use strict';var Sequelize=require(_0xceae('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'unique':_0xceae('0x1'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize[_0xceae('0x2')]('ivr'),'allowNull':![],'defaultValue':'ivr'},'description':{'type':Sequelize[_0xceae('0x3')]},'active':{'type':Sequelize[_0xceae('0x4')],'defaultValue':0x0,'comment':_0xceae('0x5')},'limitCalls':{'type':Sequelize[_0xceae('0x6')](0x4)['UNSIGNED'],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':_0xceae('0x7')},'dialOriginateCallerIdName':{'type':Sequelize[_0xceae('0x3')]},'dialOriginateCallerIdNumber':{'type':Sequelize['STRING']},'dialOriginateTimeout':{'type':Sequelize[_0xceae('0x6')](0x3)['UNSIGNED'],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0xceae('0x8')},'dialCongestionMaxRetry':{'type':Sequelize[_0xceae('0x6')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Congestion\x20Retry\x20(min:1,\x20max:999)'},'dialCongestionRetryFrequency':{'type':Sequelize[_0xceae('0x6')](0x5)[_0xceae('0x9')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xceae('0xa')},'dialBusyMaxRetry':{'type':Sequelize[_0xceae('0x6')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xceae('0xb')},'dialBusyRetryFrequency':{'type':Sequelize[_0xceae('0x6')](0x5)[_0xceae('0x9')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xceae('0xc')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0xceae('0x6')](0x3)[_0xceae('0x9')],'defaultValue':0x3,'comment':_0xceae('0xd')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0xceae('0x6')](0x5)[_0xceae('0x9')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialGlobalMaxRetry':{'type':Sequelize[_0xceae('0x6')](0x3)['UNSIGNED'],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':'#Global\x20Max\x20Retry\x20(min:1,\x20max:999)'},'dialTimezone':{'type':Sequelize[_0xceae('0x3')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0xceae('0x3')],'defaultValue':_0xceae('0xe')},'dialCheckDuplicateType':{'type':Sequelize[_0xceae('0x2')](_0xceae('0xf'),_0xceae('0x10'),_0xceae('0x11')),'defaultValue':_0xceae('0xf')},'dialAMDActive':{'type':Sequelize[_0xceae('0x4')],'defaultValue':0x0,'comment':_0xceae('0x12')},'dialAMDInitialSilence':{'type':Sequelize[_0xceae('0x6')](0x9)['UNSIGNED'],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':'#AMD\x20Initial\x20Silence'},'dialAMDGreeting':{'type':Sequelize[_0xceae('0x6')](0x9)[_0xceae('0x9')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0xceae('0x13')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0xceae('0x6')](0x9)[_0xceae('0x9')],'defaultValue':0x320,'validate':{'min':0x0},'comment':'#AMD\x20After\x20Greeting\x20Silence'},'dialAMDTotalAnalysisTime':{'type':Sequelize['INTEGER'](0x9)['UNSIGNED'],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0xceae('0x14')},'dialAMDMinWordLength':{'type':Sequelize[_0xceae('0x6')](0x9)[_0xceae('0x9')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0xceae('0x15')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0xceae('0x6')](0x9)['UNSIGNED'],'defaultValue':0x32,'validate':{'min':0x0},'comment':'#AMD\x20Between\x20Words\x20Silence'},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0xceae('0x6')](0x9)[_0xceae('0x9')],'defaultValue':0x3,'validate':{'min':0x0},'comment':'#AMD\x20Maximum\x20Number\x20Of\x20Words'},'dialAMDSilenceThreshold':{'type':Sequelize[_0xceae('0x6')](0x5)['UNSIGNED'],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0xceae('0x16')},'dialAMDMaximumWordLength':{'type':Sequelize[_0xceae('0x6')](0x9)['UNSIGNED'],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0xceae('0x17')},'dialOrderByScheduledAt':{'type':Sequelize[_0xceae('0x2')](_0xceae('0x18'),_0xceae('0x19')),'defaultValue':_0xceae('0x18')},'dialPrefix':{'type':Sequelize[_0xceae('0x3')],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0xceae('0x6')](0x3)['UNSIGNED'],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0xceae('0x1a')},'dialCutDigit':{'type':Sequelize['INTEGER'](0x3)[_0xceae('0x9')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0xceae('0x1b')},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0xceae('0x6')](0x3)[_0xceae('0x9')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xceae('0x1c')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0xceae('0x6')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xceae('0x1d')},'dialDropMaxRetry':{'type':Sequelize[_0xceae('0x6')](0x3)[_0xceae('0x9')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Drop\x20Retry\x20(min:1,\x20max:999)'},'dialDropRetryFrequency':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xceae('0x1e')},'dialAbandonedMaxRetry':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Abandoned\x20Retry\x20(min:1,\x20max:999)'},'dialAbandonedRetryFrequency':{'type':Sequelize[_0xceae('0x6')](0x5)[_0xceae('0x9')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xceae('0x1f')},'dialMachineMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0xceae('0x9')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Machine\x20Retry\x20(min:1,\x20max:999)'},'dialMachineRetryFrequency':{'type':Sequelize[_0xceae('0x6')](0x5)[_0xceae('0x9')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xceae('0x20')},'dialAgentRejectMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0xceae('0x9')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xceae('0x21')},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0xceae('0x6')](0x5)[_0xceae('0x9')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xceae('0x22')}};
\ No newline at end of file
+var _0xd0cd=['Max\x20200\x20calls.','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','#Congestion\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)','ENUM','never','onlyIfOpen','always','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Min\x20Word\x20Length','#AMD\x20Between\x20Words\x20Silence','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','DESC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','Cut\x20Digit\x20(min:1,\x20max:15)','#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)','NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Drop\x20Retry\x20(min:1,\x20max:999)','#Abandoned\x20Retry\x20(min:1,\x20max:999)','Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','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','STRING','name','ivr','BOOLEAN','Active/Disactive\x20Campaign','INTEGER','UNSIGNED'];(function(_0x416cf3,_0x53bf9){var _0x32a97a=function(_0x457e79){while(--_0x457e79){_0x416cf3['push'](_0x416cf3['shift']());}};_0x32a97a(++_0x53bf9);}(_0xd0cd,0xe7));var _0xdd0c=function(_0xd6aad,_0x3fd78e){_0xd6aad=_0xd6aad-0x0;var _0x1109e6=_0xd0cd[_0xd6aad];return _0x1109e6;};'use strict';var Sequelize=require(_0xdd0c('0x0'));module[_0xdd0c('0x1')]={'name':{'type':Sequelize[_0xdd0c('0x2')],'unique':_0xdd0c('0x3'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize['ENUM'](_0xdd0c('0x4')),'allowNull':![],'defaultValue':_0xdd0c('0x4')},'description':{'type':Sequelize[_0xdd0c('0x2')]},'active':{'type':Sequelize[_0xdd0c('0x5')],'defaultValue':0x0,'comment':_0xdd0c('0x6')},'limitCalls':{'type':Sequelize[_0xdd0c('0x7')](0x4)[_0xdd0c('0x8')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':_0xdd0c('0x9')},'dialOriginateCallerIdName':{'type':Sequelize['STRING']},'dialOriginateCallerIdNumber':{'type':Sequelize['STRING']},'dialOriginateTimeout':{'type':Sequelize[_0xdd0c('0x7')](0x3)[_0xdd0c('0x8')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0xdd0c('0xa')},'dialCongestionMaxRetry':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xdd0c('0xb')},'dialCongestionRetryFrequency':{'type':Sequelize[_0xdd0c('0x7')](0x5)[_0xdd0c('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialBusyMaxRetry':{'type':Sequelize[_0xdd0c('0x7')](0x3)[_0xdd0c('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Busy\x20Retry\x20(min:1,\x20max:999)'},'dialBusyRetryFrequency':{'type':Sequelize[_0xdd0c('0x7')](0x5)[_0xdd0c('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xdd0c('0xc')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0xdd0c('0x7')](0x3)['UNSIGNED'],'defaultValue':0x3,'comment':_0xdd0c('0xd')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0xdd0c('0x7')](0x5)[_0xdd0c('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xdd0c('0xe')},'dialGlobalMaxRetry':{'type':Sequelize[_0xdd0c('0x7')](0x3)[_0xdd0c('0x8')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0xdd0c('0xf')},'dialTimezone':{'type':Sequelize[_0xdd0c('0x2')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0xdd0c('0x2')],'defaultValue':'07:00-22:00,*,*,*'},'dialCheckDuplicateType':{'type':Sequelize[_0xdd0c('0x10')]('always',_0xdd0c('0x11'),_0xdd0c('0x12')),'defaultValue':_0xdd0c('0x13')},'dialAMDActive':{'type':Sequelize[_0xdd0c('0x5')],'defaultValue':0x0,'comment':'Active/Disactive\x20AMD'},'dialAMDInitialSilence':{'type':Sequelize['INTEGER'](0x9)[_0xdd0c('0x8')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0xdd0c('0x14')},'dialAMDGreeting':{'type':Sequelize[_0xdd0c('0x7')](0x9)['UNSIGNED'],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0xdd0c('0x15')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0xdd0c('0x7')](0x9)[_0xdd0c('0x8')],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0xdd0c('0x16')},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0xdd0c('0x7')](0x9)[_0xdd0c('0x8')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0xdd0c('0x17')},'dialAMDMinWordLength':{'type':Sequelize[_0xdd0c('0x7')](0x9)[_0xdd0c('0x8')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0xdd0c('0x18')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0xdd0c('0x7')](0x9)[_0xdd0c('0x8')],'defaultValue':0x32,'validate':{'min':0x0},'comment':_0xdd0c('0x19')},'dialAMDMaximumNumberOfWords':{'type':Sequelize['INTEGER'](0x9)[_0xdd0c('0x8')],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0xdd0c('0x1a')},'dialAMDSilenceThreshold':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0xdd0c('0x1b')},'dialAMDMaximumWordLength':{'type':Sequelize['INTEGER'](0x9)[_0xdd0c('0x8')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0xdd0c('0x1c')},'dialOrderByScheduledAt':{'type':Sequelize[_0xdd0c('0x10')]('DESC','ASC'),'defaultValue':_0xdd0c('0x1d')},'dialPrefix':{'type':Sequelize[_0xdd0c('0x2')],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize['INTEGER'](0x3)[_0xdd0c('0x8')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0xdd0c('0x1e')},'dialCutDigit':{'type':Sequelize[_0xdd0c('0x7')](0x3)[_0xdd0c('0x8')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0xdd0c('0x1f')},'dialNoSuchNumberMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0xdd0c('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xdd0c('0x20')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0xdd0c('0x7')](0x5)[_0xdd0c('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xdd0c('0x21')},'dialDropMaxRetry':{'type':Sequelize[_0xdd0c('0x7')](0x3)[_0xdd0c('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xdd0c('0x22')},'dialDropRetryFrequency':{'type':Sequelize[_0xdd0c('0x7')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialAbandonedMaxRetry':{'type':Sequelize[_0xdd0c('0x7')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xdd0c('0x23')},'dialAbandonedRetryFrequency':{'type':Sequelize[_0xdd0c('0x7')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xdd0c('0x24')},'dialMachineMaxRetry':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Machine\x20Retry\x20(min:1,\x20max:999)'},'dialMachineRetryFrequency':{'type':Sequelize[_0xdd0c('0x7')](0x5)[_0xdd0c('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xdd0c('0x25')},'dialAgentRejectMaxRetry':{'type':Sequelize[_0xdd0c('0x7')](0x3)[_0xdd0c('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xdd0c('0x26')},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0xdd0c('0x7')](0x5)[_0xdd0c('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xdd0c('0x27')}};
\ No newline at end of file
index e6c57b8..4ca48e7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcbde=['into','cm_hopper','fromQuery','phone','scheduledAt','ListId','updatedAt','select','field','NOW()','CmListId','toString','from','cm_contacts','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','cm_hopper_final','CampaignId\x20=\x20?','ContactId','ListId\x20=\x20?','deletedAt\x20IS\x20NULL','cmHopperId','h.id','ci.item','ci.OrderBY','OrderBy','cm_contact_has_items','join','h.CampaignId=?','push','sequelize','all','removeLists','getBlackLists','addBlackLists','format','cm_hopper_black','removeBlackLists','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','ejs','fs-extra','crypto','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','save','then','destroy','get','IvrCampaigns','UserProfileResource','error','stack','index','map','Campaign','fieldName','type','key','model','name','query','keys','filters','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','VIRTUAL','merge','options','includeAll','include','findAll','rows','catch','show','params','rawAttributes','intersection','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','omit','createdAt','find','getHoppers','CmHopper','CampaignId','filter','findOne','CmHopperHistory','getHopperFinals','CmHopperFinal','getHopperBlacks','CmHopperBlack','getLists','CmList','addLists','YYYY-MM-DD\x20HH:mm:ss','ids','spread','dialCheckDuplicateType','always','insert'];(function(_0x24b3fd,_0x3d7922){var _0x5bebf4=function(_0x39dfdc){while(--_0x39dfdc){_0x24b3fd['push'](_0x24b3fd['shift']());}};_0x5bebf4(++_0x3d7922);}(_0xcbde,0x141));var _0xecbd=function(_0x5f3024,_0x46419e){_0x5f3024=_0x5f3024-0x0;var _0x593a79=_0xcbde[_0x5f3024];return _0x593a79;};'use strict';var emlformat=require(_0xecbd('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xecbd('0x1'));var jsonpatch=require(_0xecbd('0x2'));var rp=require(_0xecbd('0x3'));var moment=require(_0xecbd('0x4'));var BPromise=require(_0xecbd('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0xecbd('0x6'));var sox=require(_0xecbd('0x7'));var csv=require('to-csv');var ejs=require(_0xecbd('0x8'));var fs=require('fs');var fs_extra=require(_0xecbd('0x9'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xecbd('0xa'));var jsforce=require(_0xecbd('0xb'));var deskjs=require(_0xecbd('0xc'));var toCsv=require(_0xecbd('0xd'));var querystring=require(_0xecbd('0xe'));var Papa=require(_0xecbd('0xf'));var Redis=require('ioredis');var authService=require(_0xecbd('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0xecbd('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xecbd('0x12'));var utils=require('../../config/utils');var config=require(_0xecbd('0x13'));var licenseUtil=require(_0xecbd('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3c6429,_0x444a88){_0x444a88=_0x444a88||0xcc;return function(_0x447856){if(_0x447856){return _0x3c6429[_0xecbd('0x15')](_0x444a88);}return _0x3c6429[_0xecbd('0x16')](_0x444a88)[_0xecbd('0x17')]();};}function respondWithResult(_0x1f4122,_0xd9295c){_0xd9295c=_0xd9295c||0xc8;return function(_0x244e8f){if(_0x244e8f){return _0x1f4122['status'](_0xd9295c)[_0xecbd('0x18')](_0x244e8f);}};}function respondWithFilteredResult(_0x1607ec,_0x2cc3f0){return function(_0x3805a){if(_0x3805a){var _0x1ea87a=typeof _0x2cc3f0[_0xecbd('0x19')]===_0xecbd('0x1a')&&typeof _0x2cc3f0[_0xecbd('0x1b')]===_0xecbd('0x1a');var _0x3896ca=_0x3805a['count'];var _0x200782=_0x1ea87a?0x0:_0x2cc3f0['offset'];var _0x116cfd=_0x1ea87a?_0x3805a[_0xecbd('0x1c')]:_0x2cc3f0[_0xecbd('0x19')]+_0x2cc3f0[_0xecbd('0x1b')];var _0x3131b2;if(_0x116cfd>=_0x3896ca){_0x116cfd=_0x3896ca;_0x3131b2=0xc8;}else{_0x3131b2=0xce;}_0x1607ec[_0xecbd('0x16')](_0x3131b2);return _0x1607ec[_0xecbd('0x1d')]('Content-Range',_0x200782+'-'+_0x116cfd+'/'+_0x3896ca)[_0xecbd('0x18')](_0x3805a);}return null;};}function patchUpdates(_0x2a3166){return function(_0x3cde92){try{jsonpatch[_0xecbd('0x1e')](_0x3cde92,_0x2a3166,!![]);}catch(_0x342c41){return BPromise['reject'](_0x342c41);}return _0x3cde92[_0xecbd('0x1f')]();};}function saveUpdates(_0x3ab72d,_0x11b003){return function(_0x257000){if(_0x257000){return _0x257000['update'](_0x3ab72d)[_0xecbd('0x20')](function(_0x47b0cc){return _0x47b0cc;});}return null;};}function removeEntity(_0x190cab,_0x3b66ed){return function(_0x292cce){if(_0x292cce){return _0x292cce[_0xecbd('0x21')]()['then'](function(){var _0x493b02=_0x292cce[_0xecbd('0x22')]({'plain':!![]});var _0x138630=_0xecbd('0x23');return db[_0xecbd('0x24')]['destroy']({'where':{'type':_0x138630,'resourceId':_0x493b02['id']}})[_0xecbd('0x20')](function(){return _0x292cce;});})[_0xecbd('0x20')](function(){_0x190cab[_0xecbd('0x16')](0xcc)[_0xecbd('0x17')]();});}};}function handleEntityNotFound(_0x27bab5,_0x119a5e){return function(_0x3dfed3){if(!_0x3dfed3){_0x27bab5[_0xecbd('0x15')](0x194);}return _0x3dfed3;};}function handleError(_0x4560a5,_0x1128f0){_0x1128f0=_0x1128f0||0x1f4;return function(_0x1a237f){logger[_0xecbd('0x25')](_0x1a237f[_0xecbd('0x26')]);if(_0x1a237f['name']){delete _0x1a237f['name'];}_0x4560a5['status'](_0x1128f0)['send'](_0x1a237f);};}exports[_0xecbd('0x27')]=function(_0x26fbe2,_0x58682d){var _0xd903ee={},_0x23844c={},_0x5130c3={'count':0x0,'rows':[]};var _0xeca49c=_[_0xecbd('0x28')](db[_0xecbd('0x29')]['rawAttributes'],function(_0x22dcd3){return{'name':_0x22dcd3[_0xecbd('0x2a')],'type':_0x22dcd3[_0xecbd('0x2b')][_0xecbd('0x2c')]};});_0x23844c[_0xecbd('0x2d')]=_[_0xecbd('0x28')](_0xeca49c,_0xecbd('0x2e'));_0x23844c[_0xecbd('0x2f')]=_[_0xecbd('0x30')](_0x26fbe2[_0xecbd('0x2f')]);_0x23844c[_0xecbd('0x31')]=_['intersection'](_0x23844c[_0xecbd('0x2d')],_0x23844c[_0xecbd('0x2f')]);_0xd903ee['attributes']=_['intersection'](_0x23844c[_0xecbd('0x2d')],qs[_0xecbd('0x32')](_0x26fbe2[_0xecbd('0x2f')][_0xecbd('0x32')]));_0xd903ee[_0xecbd('0x33')]=_0xd903ee['attributes'][_0xecbd('0x34')]?_0xd903ee[_0xecbd('0x33')]:_0x23844c['model'];if(!_0x26fbe2[_0xecbd('0x2f')][_0xecbd('0x35')](_0xecbd('0x36'))){_0xd903ee[_0xecbd('0x1b')]=qs[_0xecbd('0x1b')](_0x26fbe2[_0xecbd('0x2f')][_0xecbd('0x1b')]);_0xd903ee[_0xecbd('0x19')]=qs['offset'](_0x26fbe2['query'][_0xecbd('0x19')]);}_0xd903ee[_0xecbd('0x37')]=qs[_0xecbd('0x38')](_0x26fbe2[_0xecbd('0x2f')][_0xecbd('0x38')]);_0xd903ee[_0xecbd('0x39')]=qs[_0xecbd('0x31')](_[_0xecbd('0x3a')](_0x26fbe2[_0xecbd('0x2f')],_0x23844c[_0xecbd('0x31')]),_0xeca49c);if(_0x26fbe2[_0xecbd('0x2f')]['filter']){_0xd903ee[_0xecbd('0x39')]=_['merge'](_0xd903ee[_0xecbd('0x39')],{'$or':_[_0xecbd('0x28')](_0xeca49c,function(_0x4dc72b){if(_0x4dc72b[_0xecbd('0x2b')]!==_0xecbd('0x3b')){var _0x271e39={};_0x271e39[_0x4dc72b[_0xecbd('0x2e')]]={'$like':'%'+_0x26fbe2[_0xecbd('0x2f')]['filter']+'%'};return _0x271e39;}})});}_0xd903ee=_[_0xecbd('0x3c')]({},_0xd903ee,_0x26fbe2[_0xecbd('0x3d')]);var _0x3bdfda={'where':_0xd903ee[_0xecbd('0x39')]};return db[_0xecbd('0x29')][_0xecbd('0x1c')](_0x3bdfda)[_0xecbd('0x20')](function(_0x23c4e1){_0x5130c3[_0xecbd('0x1c')]=_0x23c4e1;if(_0x26fbe2[_0xecbd('0x2f')][_0xecbd('0x3e')]){_0xd903ee[_0xecbd('0x3f')]=[{'all':!![]}];}return db[_0xecbd('0x29')][_0xecbd('0x40')](_0xd903ee);})[_0xecbd('0x20')](function(_0x3ba0cc){_0x5130c3[_0xecbd('0x41')]=_0x3ba0cc;return _0x5130c3;})[_0xecbd('0x20')](respondWithFilteredResult(_0x58682d,_0xd903ee))[_0xecbd('0x42')](handleError(_0x58682d,null));};exports[_0xecbd('0x43')]=function(_0x448e0c,_0x5a3b04){var _0x598bf7={'raw':![],'where':{'id':_0x448e0c[_0xecbd('0x44')]['id']}},_0x4e78e8={};_0x4e78e8[_0xecbd('0x2d')]=_[_0xecbd('0x30')](db[_0xecbd('0x29')][_0xecbd('0x45')]);_0x4e78e8[_0xecbd('0x2f')]=_['keys'](_0x448e0c[_0xecbd('0x2f')]);_0x4e78e8[_0xecbd('0x31')]=_[_0xecbd('0x46')](_0x4e78e8[_0xecbd('0x2d')],_0x4e78e8['query']);_0x598bf7['attributes']=_[_0xecbd('0x46')](_0x4e78e8[_0xecbd('0x2d')],qs[_0xecbd('0x32')](_0x448e0c[_0xecbd('0x2f')]['fields']));_0x598bf7[_0xecbd('0x33')]=_0x598bf7[_0xecbd('0x33')]['length']?_0x598bf7['attributes']:_0x4e78e8[_0xecbd('0x2d')];if(_0x448e0c[_0xecbd('0x2f')]['includeAll']){_0x598bf7['include']=[{'all':!![]}];}_0x598bf7=_[_0xecbd('0x3c')]({},_0x598bf7,_0x448e0c[_0xecbd('0x3d')]);return db[_0xecbd('0x29')]['find'](_0x598bf7)['then'](handleEntityNotFound(_0x5a3b04,null))[_0xecbd('0x20')](respondWithResult(_0x5a3b04,null))[_0xecbd('0x42')](handleError(_0x5a3b04,null));};exports[_0xecbd('0x47')]=function(_0x3bb563,_0x12e757){return db['Campaign']['create'](_0x3bb563[_0xecbd('0x48')],{})[_0xecbd('0x20')](function(_0x179fad){var _0xa4e33f=_0x3bb563[_0xecbd('0x49')][_0xecbd('0x22')]({'plain':!![]});if(!_0xa4e33f)throw new Error(_0xecbd('0x4a'));if(_0xa4e33f[_0xecbd('0x4b')]===_0xecbd('0x49')){var _0x57a30b=_0x179fad['get']({'plain':!![]});var _0x3a4161=_0xecbd('0x23');return db[_0xecbd('0x4c')]['find']({'where':{'name':_0x3a4161,'userProfileId':_0xa4e33f[_0xecbd('0x4d')]},'raw':!![]})[_0xecbd('0x20')](function(_0x3595c6){if(_0x3595c6&&_0x3595c6[_0xecbd('0x4e')]===0x0){return db[_0xecbd('0x24')]['create']({'name':_0x57a30b[_0xecbd('0x2e')],'resourceId':_0x57a30b['id'],'type':_0x3595c6[_0xecbd('0x2e')],'sectionId':_0x3595c6['id']},{})[_0xecbd('0x20')](function(){return _0x179fad;});}else{return _0x179fad;}})[_0xecbd('0x42')](function(_0x2296c3){logger['error'](_0xecbd('0x4f'),_0x2296c3);throw _0x2296c3;});}return _0x179fad;})[_0xecbd('0x20')](respondWithResult(_0x12e757,0xc9))[_0xecbd('0x42')](handleError(_0x12e757,null));};exports['clone']=function(_0x509be2,_0x5927dc){var _0x34698a={'where':{'id':_0x509be2[_0xecbd('0x44')]['id']}},_0x1ddb81={};_0x1ddb81[_0xecbd('0x2d')]=_[_0xecbd('0x30')](db[_0xecbd('0x29')][_0xecbd('0x45')]);_0x34698a['attributes']=_['intersection'](_0x1ddb81['model'],qs[_0xecbd('0x32')](_0x509be2[_0xecbd('0x2f')]['fields']));_0x34698a[_0xecbd('0x33')]=_0x34698a[_0xecbd('0x33')][_0xecbd('0x34')]?_0x34698a['attributes']:_0x1ddb81['model'];if(_0x509be2[_0xecbd('0x2f')][_0xecbd('0x3e')]){_0x34698a[_0xecbd('0x3f')]=[{'all':!![]}];}_0x34698a=_[_0xecbd('0x3c')]({},_0x34698a,_0x509be2[_0xecbd('0x3d')]);return db[_0xecbd('0x29')]['find'](_0x34698a)[_0xecbd('0x20')](handleEntityNotFound(_0x5927dc,null))[_0xecbd('0x20')](function(_0x1b320f){if(_0x1b320f){var _0x383945=_0x1b320f['get']({'plain':!![]});_0x383945=qs[_0xecbd('0x50')](_0x383945,['id',_0xecbd('0x51'),'updatedAt']);_0x509be2[_0xecbd('0x48')]=_[_0xecbd('0x50')](_0x509be2[_0xecbd('0x48')],['id',_0xecbd('0x51'),'updatedAt']);return db[_0xecbd('0x29')]['create'](_[_0xecbd('0x3c')](_0x383945,_0x509be2[_0xecbd('0x48')]),{'include':_0x509be2[_0xecbd('0x2f')][_0xecbd('0x3e')]?[{'all':!![]}]:undefined})[_0xecbd('0x20')](function(_0x138de8){var _0x399d29=_0x509be2[_0xecbd('0x49')]['get']({'plain':!![]});if(!_0x399d29)throw new Error(_0xecbd('0x4a'));if(_0x399d29[_0xecbd('0x4b')]===_0xecbd('0x49')){var _0x1cc38a=_0x138de8['get']({'plain':!![]});var _0x433d35=_0xecbd('0x23');return db[_0xecbd('0x4c')][_0xecbd('0x52')]({'where':{'name':_0x433d35,'userProfileId':_0x399d29[_0xecbd('0x4d')]},'raw':!![]})[_0xecbd('0x20')](function(_0x360ad4){if(_0x360ad4&&_0x360ad4[_0xecbd('0x4e')]===0x0){return db[_0xecbd('0x24')][_0xecbd('0x47')]({'name':_0x1cc38a[_0xecbd('0x2e')],'resourceId':_0x1cc38a['id'],'type':_0x360ad4[_0xecbd('0x2e')],'sectionId':_0x360ad4['id']},{})[_0xecbd('0x20')](function(){return _0x138de8;});}else{return _0x138de8;}})['catch'](function(_0x289708){logger['error'](_0xecbd('0x4f'),_0x289708);throw _0x289708;});}return _0x138de8;});}})[_0xecbd('0x20')](respondWithResult(_0x5927dc,0xc9))[_0xecbd('0x42')](handleError(_0x5927dc,null));};exports['update']=function(_0x845d5d,_0x48e387){if(_0x845d5d[_0xecbd('0x48')]['id']){delete _0x845d5d['body']['id'];}return db[_0xecbd('0x29')][_0xecbd('0x52')]({'where':{'id':_0x845d5d[_0xecbd('0x44')]['id']}})[_0xecbd('0x20')](handleEntityNotFound(_0x48e387,null))[_0xecbd('0x20')](saveUpdates(_0x845d5d['body'],null))[_0xecbd('0x20')](respondWithResult(_0x48e387,null))[_0xecbd('0x42')](handleError(_0x48e387,null));};exports[_0xecbd('0x21')]=function(_0x3f622e,_0x395c65){return db[_0xecbd('0x29')][_0xecbd('0x52')]({'where':{'id':_0x3f622e[_0xecbd('0x44')]['id']}})[_0xecbd('0x20')](handleEntityNotFound(_0x395c65,null))[_0xecbd('0x20')](removeEntity(_0x395c65,null))[_0xecbd('0x42')](handleError(_0x395c65,null));};exports[_0xecbd('0x53')]=function(_0x1e6bf7,_0x3add86,_0x2bafaa){var _0x497053={'raw':!![],'where':{}};var _0x54a92f={};var _0x13bd45={'count':0x0,'rows':[]};return db['Campaign']['findOne']({'where':{'id':_0x1e6bf7[_0xecbd('0x44')]['id']}})[_0xecbd('0x20')](handleEntityNotFound(_0x3add86,null))[_0xecbd('0x20')](function(_0x3a0970){if(_0x3a0970){_0x54a92f[_0xecbd('0x2d')]=_[_0xecbd('0x30')](db[_0xecbd('0x54')]['rawAttributes']);_0x54a92f[_0xecbd('0x2f')]=_[_0xecbd('0x30')](_0x1e6bf7[_0xecbd('0x2f')]);_0x54a92f[_0xecbd('0x31')]=_[_0xecbd('0x46')](_0x54a92f[_0xecbd('0x2d')],_0x54a92f[_0xecbd('0x2f')]);_0x497053[_0xecbd('0x33')]=_['intersection'](_0x54a92f[_0xecbd('0x2d')],qs[_0xecbd('0x32')](_0x1e6bf7['query'][_0xecbd('0x32')]));_0x497053[_0xecbd('0x33')]=_0x497053[_0xecbd('0x33')][_0xecbd('0x34')]?_0x497053[_0xecbd('0x33')]:_0x54a92f[_0xecbd('0x2d')];if(!_0x1e6bf7[_0xecbd('0x2f')][_0xecbd('0x35')](_0xecbd('0x36'))){_0x497053['limit']=qs[_0xecbd('0x1b')](_0x1e6bf7[_0xecbd('0x2f')][_0xecbd('0x1b')]);_0x497053[_0xecbd('0x19')]=qs['offset'](_0x1e6bf7[_0xecbd('0x2f')][_0xecbd('0x19')]);}_0x497053[_0xecbd('0x37')]=qs[_0xecbd('0x38')](_0x1e6bf7[_0xecbd('0x2f')][_0xecbd('0x38')]);_0x497053[_0xecbd('0x39')]=qs[_0xecbd('0x31')](_[_0xecbd('0x3a')](_0x1e6bf7['query'],_0x54a92f[_0xecbd('0x31')]));_0x497053['where'][_0xecbd('0x55')]=_0x3a0970['id'];if(_0x1e6bf7[_0xecbd('0x2f')][_0xecbd('0x56')]){_0x497053['where']=_['merge'](_0x497053[_0xecbd('0x39')],{'$or':_[_0xecbd('0x28')](_0x497053[_0xecbd('0x33')],function(_0x1342ec){var _0x19ba76={};_0x19ba76[_0x1342ec]={'$like':'%'+_0x1e6bf7['query'][_0xecbd('0x56')]+'%'};return _0x19ba76;})});}_0x497053=_[_0xecbd('0x3c')]({},_0x497053,_0x1e6bf7[_0xecbd('0x3d')]);return db[_0xecbd('0x54')][_0xecbd('0x1c')]({'where':_0x497053[_0xecbd('0x39')]})[_0xecbd('0x20')](function(_0x420cac){_0x13bd45['count']=_0x420cac;if(_0x1e6bf7[_0xecbd('0x2f')][_0xecbd('0x3e')]){_0x497053[_0xecbd('0x3f')]=[{'all':!![]}];}return db['CmHopper']['findAll'](_0x497053);})[_0xecbd('0x20')](function(_0x2c0dc8){_0x13bd45[_0xecbd('0x41')]=_0x2c0dc8;return _0x13bd45;});}})[_0xecbd('0x20')](respondWithFilteredResult(_0x3add86,_0x497053))[_0xecbd('0x42')](handleError(_0x3add86,null));};exports['getHopperHistories']=function(_0x609e29,_0x2f9ce2,_0x1fa9f9){var _0x32738b={'raw':!![],'where':{}};var _0x5af7aa={};var _0xdbc074={'count':0x0,'rows':[]};return db['Campaign'][_0xecbd('0x57')]({'where':{'id':_0x609e29[_0xecbd('0x44')]['id']}})[_0xecbd('0x20')](handleEntityNotFound(_0x2f9ce2,null))[_0xecbd('0x20')](function(_0x33b215){if(_0x33b215){_0x5af7aa[_0xecbd('0x2d')]=_[_0xecbd('0x30')](db[_0xecbd('0x58')][_0xecbd('0x45')]);_0x5af7aa[_0xecbd('0x2f')]=_[_0xecbd('0x30')](_0x609e29[_0xecbd('0x2f')]);_0x5af7aa[_0xecbd('0x31')]=_[_0xecbd('0x46')](_0x5af7aa['model'],_0x5af7aa[_0xecbd('0x2f')]);_0x32738b[_0xecbd('0x33')]=_['intersection'](_0x5af7aa[_0xecbd('0x2d')],qs[_0xecbd('0x32')](_0x609e29[_0xecbd('0x2f')][_0xecbd('0x32')]));_0x32738b[_0xecbd('0x33')]=_0x32738b[_0xecbd('0x33')]['length']?_0x32738b[_0xecbd('0x33')]:_0x5af7aa[_0xecbd('0x2d')];if(!_0x609e29[_0xecbd('0x2f')][_0xecbd('0x35')](_0xecbd('0x36'))){_0x32738b[_0xecbd('0x1b')]=qs['limit'](_0x609e29['query'][_0xecbd('0x1b')]);_0x32738b[_0xecbd('0x19')]=qs[_0xecbd('0x19')](_0x609e29[_0xecbd('0x2f')][_0xecbd('0x19')]);}_0x32738b[_0xecbd('0x37')]=qs[_0xecbd('0x38')](_0x609e29[_0xecbd('0x2f')][_0xecbd('0x38')]);_0x32738b[_0xecbd('0x39')]=qs['filters'](_[_0xecbd('0x3a')](_0x609e29['query'],_0x5af7aa[_0xecbd('0x31')]));_0x32738b[_0xecbd('0x39')][_0xecbd('0x55')]=_0x33b215['id'];if(_0x609e29[_0xecbd('0x2f')][_0xecbd('0x56')]){_0x32738b[_0xecbd('0x39')]=_['merge'](_0x32738b[_0xecbd('0x39')],{'$or':_[_0xecbd('0x28')](_0x32738b['attributes'],function(_0x1eb613){var _0x24fd1b={};_0x24fd1b[_0x1eb613]={'$like':'%'+_0x609e29[_0xecbd('0x2f')][_0xecbd('0x56')]+'%'};return _0x24fd1b;})});}_0x32738b=_[_0xecbd('0x3c')]({},_0x32738b,_0x609e29['options']);return db[_0xecbd('0x58')]['count']({'where':_0x32738b[_0xecbd('0x39')]})[_0xecbd('0x20')](function(_0x277a7c){_0xdbc074[_0xecbd('0x1c')]=_0x277a7c;if(_0x609e29[_0xecbd('0x2f')]['includeAll']){_0x32738b[_0xecbd('0x3f')]=[{'all':!![]}];}return db[_0xecbd('0x58')][_0xecbd('0x40')](_0x32738b);})['then'](function(_0x41e4f9){_0xdbc074['rows']=_0x41e4f9;return _0xdbc074;});}})[_0xecbd('0x20')](respondWithFilteredResult(_0x2f9ce2,_0x32738b))['catch'](handleError(_0x2f9ce2,null));};exports[_0xecbd('0x59')]=function(_0x163a5b,_0x5670f5,_0x479721){var _0x3b8f99={'raw':!![],'where':{}};var _0x599681={};var _0x59b961={'count':0x0,'rows':[]};return db['Campaign'][_0xecbd('0x57')]({'where':{'id':_0x163a5b[_0xecbd('0x44')]['id']}})[_0xecbd('0x20')](handleEntityNotFound(_0x5670f5,null))['then'](function(_0x371392){if(_0x371392){_0x599681['model']=_[_0xecbd('0x30')](db[_0xecbd('0x5a')][_0xecbd('0x45')]);_0x599681[_0xecbd('0x2f')]=_[_0xecbd('0x30')](_0x163a5b[_0xecbd('0x2f')]);_0x599681[_0xecbd('0x31')]=_['intersection'](_0x599681[_0xecbd('0x2d')],_0x599681[_0xecbd('0x2f')]);_0x3b8f99[_0xecbd('0x33')]=_[_0xecbd('0x46')](_0x599681['model'],qs[_0xecbd('0x32')](_0x163a5b['query'][_0xecbd('0x32')]));_0x3b8f99[_0xecbd('0x33')]=_0x3b8f99[_0xecbd('0x33')][_0xecbd('0x34')]?_0x3b8f99['attributes']:_0x599681[_0xecbd('0x2d')];if(!_0x163a5b[_0xecbd('0x2f')][_0xecbd('0x35')](_0xecbd('0x36'))){_0x3b8f99['limit']=qs[_0xecbd('0x1b')](_0x163a5b[_0xecbd('0x2f')][_0xecbd('0x1b')]);_0x3b8f99['offset']=qs[_0xecbd('0x19')](_0x163a5b[_0xecbd('0x2f')]['offset']);}_0x3b8f99[_0xecbd('0x37')]=qs['sort'](_0x163a5b[_0xecbd('0x2f')]['sort']);_0x3b8f99[_0xecbd('0x39')]=qs[_0xecbd('0x31')](_[_0xecbd('0x3a')](_0x163a5b[_0xecbd('0x2f')],_0x599681[_0xecbd('0x31')]));_0x3b8f99[_0xecbd('0x39')]['CampaignId']=_0x371392['id'];if(_0x163a5b[_0xecbd('0x2f')]['filter']){_0x3b8f99[_0xecbd('0x39')]=_[_0xecbd('0x3c')](_0x3b8f99['where'],{'$or':_[_0xecbd('0x28')](_0x3b8f99[_0xecbd('0x33')],function(_0x391ca7){var _0x3cf3b4={};_0x3cf3b4[_0x391ca7]={'$like':'%'+_0x163a5b[_0xecbd('0x2f')][_0xecbd('0x56')]+'%'};return _0x3cf3b4;})});}_0x3b8f99=_[_0xecbd('0x3c')]({},_0x3b8f99,_0x163a5b[_0xecbd('0x3d')]);return db[_0xecbd('0x5a')][_0xecbd('0x1c')]({'where':_0x3b8f99[_0xecbd('0x39')]})[_0xecbd('0x20')](function(_0x51e472){_0x59b961[_0xecbd('0x1c')]=_0x51e472;if(_0x163a5b[_0xecbd('0x2f')][_0xecbd('0x3e')]){_0x3b8f99[_0xecbd('0x3f')]=[{'all':!![]}];}return db[_0xecbd('0x5a')][_0xecbd('0x40')](_0x3b8f99);})[_0xecbd('0x20')](function(_0x4f88ce){_0x59b961['rows']=_0x4f88ce;return _0x59b961;});}})[_0xecbd('0x20')](respondWithFilteredResult(_0x5670f5,_0x3b8f99))[_0xecbd('0x42')](handleError(_0x5670f5,null));};exports[_0xecbd('0x5b')]=function(_0x562fd4,_0x516a6f,_0x4b8b88){var _0x1a6a75={'raw':!![],'where':{}};var _0x40050e={};var _0x53702d={'count':0x0,'rows':[]};return db[_0xecbd('0x29')]['findOne']({'where':{'id':_0x562fd4[_0xecbd('0x44')]['id']}})['then'](handleEntityNotFound(_0x516a6f,null))[_0xecbd('0x20')](function(_0x15eb7a){if(_0x15eb7a){_0x40050e[_0xecbd('0x2d')]=_[_0xecbd('0x30')](db[_0xecbd('0x5c')]['rawAttributes']);_0x40050e[_0xecbd('0x2f')]=_[_0xecbd('0x30')](_0x562fd4[_0xecbd('0x2f')]);_0x40050e['filters']=_[_0xecbd('0x46')](_0x40050e[_0xecbd('0x2d')],_0x40050e[_0xecbd('0x2f')]);_0x1a6a75[_0xecbd('0x33')]=_['intersection'](_0x40050e['model'],qs[_0xecbd('0x32')](_0x562fd4[_0xecbd('0x2f')][_0xecbd('0x32')]));_0x1a6a75['attributes']=_0x1a6a75[_0xecbd('0x33')][_0xecbd('0x34')]?_0x1a6a75[_0xecbd('0x33')]:_0x40050e[_0xecbd('0x2d')];if(!_0x562fd4[_0xecbd('0x2f')]['hasOwnProperty'](_0xecbd('0x36'))){_0x1a6a75['limit']=qs[_0xecbd('0x1b')](_0x562fd4[_0xecbd('0x2f')]['limit']);_0x1a6a75[_0xecbd('0x19')]=qs[_0xecbd('0x19')](_0x562fd4[_0xecbd('0x2f')]['offset']);}_0x1a6a75[_0xecbd('0x37')]=qs[_0xecbd('0x38')](_0x562fd4[_0xecbd('0x2f')][_0xecbd('0x38')]);_0x1a6a75[_0xecbd('0x39')]=qs[_0xecbd('0x31')](_[_0xecbd('0x3a')](_0x562fd4[_0xecbd('0x2f')],_0x40050e[_0xecbd('0x31')]));_0x1a6a75[_0xecbd('0x39')][_0xecbd('0x55')]=_0x15eb7a['id'];if(_0x562fd4[_0xecbd('0x2f')][_0xecbd('0x56')]){_0x1a6a75[_0xecbd('0x39')]=_[_0xecbd('0x3c')](_0x1a6a75[_0xecbd('0x39')],{'$or':_[_0xecbd('0x28')](_0x1a6a75[_0xecbd('0x33')],function(_0x47c2d4){var _0xcafee3={};_0xcafee3[_0x47c2d4]={'$like':'%'+_0x562fd4[_0xecbd('0x2f')][_0xecbd('0x56')]+'%'};return _0xcafee3;})});}_0x1a6a75=_[_0xecbd('0x3c')]({},_0x1a6a75,_0x562fd4[_0xecbd('0x3d')]);return db[_0xecbd('0x5c')][_0xecbd('0x1c')]({'where':_0x1a6a75[_0xecbd('0x39')]})[_0xecbd('0x20')](function(_0x201bb7){_0x53702d['count']=_0x201bb7;if(_0x562fd4[_0xecbd('0x2f')][_0xecbd('0x3e')]){_0x1a6a75['include']=[{'all':!![]}];}return db[_0xecbd('0x5c')][_0xecbd('0x40')](_0x1a6a75);})[_0xecbd('0x20')](function(_0x12d29c){_0x53702d[_0xecbd('0x41')]=_0x12d29c;return _0x53702d;});}})[_0xecbd('0x20')](respondWithFilteredResult(_0x516a6f,_0x1a6a75))[_0xecbd('0x42')](handleError(_0x516a6f,null));};exports[_0xecbd('0x5d')]=function(_0x5a6b2f,_0x3675e1,_0x2173a9){var _0x5bcce8={};var _0x9b9100={};var _0x2b3646;var _0x1aa13b;return db[_0xecbd('0x29')]['findOne']({'where':{'id':_0x5a6b2f[_0xecbd('0x44')]['id']}})[_0xecbd('0x20')](handleEntityNotFound(_0x3675e1,null))[_0xecbd('0x20')](function(_0x10e246){if(_0x10e246){_0x2b3646=_0x10e246;_0x9b9100[_0xecbd('0x2d')]=_['keys'](db[_0xecbd('0x5e')][_0xecbd('0x45')]);_0x9b9100['query']=_[_0xecbd('0x30')](_0x5a6b2f[_0xecbd('0x2f')]);_0x9b9100[_0xecbd('0x31')]=_[_0xecbd('0x46')](_0x9b9100[_0xecbd('0x2d')],_0x9b9100[_0xecbd('0x2f')]);_0x5bcce8[_0xecbd('0x33')]=_[_0xecbd('0x46')](_0x9b9100['model'],qs[_0xecbd('0x32')](_0x5a6b2f[_0xecbd('0x2f')][_0xecbd('0x32')]));_0x5bcce8[_0xecbd('0x33')]=_0x5bcce8[_0xecbd('0x33')][_0xecbd('0x34')]?_0x5bcce8['attributes']:_0x9b9100[_0xecbd('0x2d')];_0x5bcce8[_0xecbd('0x37')]=qs[_0xecbd('0x38')](_0x5a6b2f[_0xecbd('0x2f')]['sort']);_0x5bcce8['where']=qs['filters'](_['pick'](_0x5a6b2f['query'],_0x9b9100[_0xecbd('0x31')]));if(_0x5a6b2f[_0xecbd('0x2f')][_0xecbd('0x56')]){_0x5bcce8[_0xecbd('0x39')]=_['merge'](_0x5bcce8[_0xecbd('0x39')],{'$or':_[_0xecbd('0x28')](_0x5bcce8[_0xecbd('0x33')],function(_0x4d65b4){var _0x1bf346={};_0x1bf346[_0x4d65b4]={'$like':'%'+_0x5a6b2f[_0xecbd('0x2f')]['filter']+'%'};return _0x1bf346;})});}_0x5bcce8=_[_0xecbd('0x3c')]({},_0x5bcce8,_0x5a6b2f[_0xecbd('0x3d')]);return _0x2b3646['getLists'](_0x5bcce8);}})[_0xecbd('0x20')](function(_0x2d105a){if(_0x2d105a){_0x1aa13b=_0x2d105a['length'];if(!_0x5a6b2f[_0xecbd('0x2f')][_0xecbd('0x35')](_0xecbd('0x36'))){_0x5bcce8[_0xecbd('0x1b')]=qs[_0xecbd('0x1b')](_0x5a6b2f[_0xecbd('0x2f')][_0xecbd('0x1b')]);_0x5bcce8[_0xecbd('0x19')]=qs[_0xecbd('0x19')](_0x5a6b2f[_0xecbd('0x2f')][_0xecbd('0x19')]);}return _0x2b3646['getLists'](_0x5bcce8);}})[_0xecbd('0x20')](function(_0x9071a3){if(_0x9071a3){return _0x9071a3?{'count':_0x1aa13b,'rows':_0x9071a3}:null;}})['then'](respondWithResult(_0x3675e1,null))[_0xecbd('0x42')](handleError(_0x3675e1,null));};exports[_0xecbd('0x5f')]=function(_0x1ab417,_0x4fca5a,_0x46f637){var _0x3a5651,_0x49f093;var _0x2482ed=[];var _0x41c426=moment()['format'](_0xecbd('0x60'));return db[_0xecbd('0x29')]['find']({'where':{'id':_0x1ab417[_0xecbd('0x44')]['id']}})['then'](handleEntityNotFound(_0x4fca5a,null))[_0xecbd('0x20')](function(_0x369cae){if(_0x369cae){_0x49f093=_0x369cae;return _0x369cae[_0xecbd('0x5f')](_0x1ab417[_0xecbd('0x48')][_0xecbd('0x61')],_[_0xecbd('0x50')](_0x1ab417[_0xecbd('0x48')],[_0xecbd('0x61'),'id'])||{});}return null;})[_0xecbd('0x62')](function(_0x36b5d0){var _0x472802;var _0xe2de24;_0x3a5651=_0x36b5d0||[];var _0x3f7c7e=[];if(_0x36b5d0){for(var _0x392e01=0x0;_0x392e01<_0x36b5d0[_0xecbd('0x34')];_0x392e01+=0x1){var _0x4eca25=_0x36b5d0[_0x392e01]['get']({'plain':!![]});_0x49f093['dialCheckDuplicateType']=_0x1ab417[_0xecbd('0x48')][_0xecbd('0x63')]?_0x1ab417[_0xecbd('0x48')][_0xecbd('0x63')]:_0x49f093[_0xecbd('0x63')];switch(_0x49f093[_0xecbd('0x63')]){case _0xecbd('0x64'):_0x472802=squel[_0xecbd('0x65')]()[_0xecbd('0x66')](_0xecbd('0x67'))[_0xecbd('0x68')]([_0xecbd('0x69'),_0xecbd('0x6a'),'ContactId',_0xecbd('0x6b'),'CampaignId',_0xecbd('0x51'),_0xecbd('0x6c')],squel[_0xecbd('0x6d')]()[_0xecbd('0x6e')](_0xecbd('0x69'),_0xecbd('0x69'))[_0xecbd('0x6e')](_0xecbd('0x6f'),_0xecbd('0x6a'))[_0xecbd('0x6e')]('id','ContactId')[_0xecbd('0x6e')](_0x4eca25[_0xecbd('0x70')]['toString'](),_0xecbd('0x6b'))[_0xecbd('0x6e')](_0x1ab417[_0xecbd('0x44')]['id'][_0xecbd('0x71')](),_0xecbd('0x55'))['field']('\x27'+_0x41c426+'\x27','createdAt')[_0xecbd('0x6e')]('\x27'+_0x41c426+'\x27',_0xecbd('0x6c'))[_0xecbd('0x72')](_0xecbd('0x73'))[_0xecbd('0x39')]('deletedAt\x20IS\x20NULL')['where']('ListId\x20=\x20?',_0x4eca25[_0xecbd('0x70')][_0xecbd('0x71')]())[_0xecbd('0x39')](_0xecbd('0x74'))['where'](_0xecbd('0x75'),squel['select']()[_0xecbd('0x6e')](_0xecbd('0x76'))[_0xecbd('0x72')](_0xecbd('0x77'))[_0xecbd('0x39')](_0xecbd('0x78'),_0x1ab417[_0xecbd('0x44')]['id'][_0xecbd('0x71')]()))[_0xecbd('0x39')](_0xecbd('0x75'),squel[_0xecbd('0x6d')]()['field']('COALESCE(phone,\x27\x27)')[_0xecbd('0x72')](_0xecbd('0x67'))['where']('CampaignId\x20=\x20?',_0x1ab417['params']['id'][_0xecbd('0x71')]())))['toString']();break;case'onlyIfOpen':_0x472802=squel[_0xecbd('0x65')]()['into'](_0xecbd('0x67'))['fromQuery']([_0xecbd('0x69'),_0xecbd('0x6a'),'ContactId','ListId',_0xecbd('0x55'),'createdAt','updatedAt'],squel[_0xecbd('0x6d')]()[_0xecbd('0x6e')](_0xecbd('0x69'),_0xecbd('0x69'))[_0xecbd('0x6e')]('NOW()',_0xecbd('0x6a'))[_0xecbd('0x6e')]('id',_0xecbd('0x79'))[_0xecbd('0x6e')](_0x4eca25[_0xecbd('0x70')][_0xecbd('0x71')](),_0xecbd('0x6b'))[_0xecbd('0x6e')](_0x1ab417[_0xecbd('0x44')]['id'][_0xecbd('0x71')](),_0xecbd('0x55'))[_0xecbd('0x6e')]('\x27'+_0x41c426+'\x27',_0xecbd('0x51'))[_0xecbd('0x6e')]('\x27'+_0x41c426+'\x27','updatedAt')[_0xecbd('0x72')]('cm_contacts')[_0xecbd('0x39')]('deletedAt\x20IS\x20NULL')[_0xecbd('0x39')](_0xecbd('0x7a'),_0x4eca25[_0xecbd('0x70')]['toString']())[_0xecbd('0x39')](_0xecbd('0x74'))[_0xecbd('0x39')](_0xecbd('0x75'),squel[_0xecbd('0x6d')]()[_0xecbd('0x6e')]('COALESCE(phone,\x27\x27)')[_0xecbd('0x72')](_0xecbd('0x67'))[_0xecbd('0x39')](_0xecbd('0x78'),_0x1ab417['params']['id'][_0xecbd('0x71')]())))[_0xecbd('0x71')]();break;default:_0x472802=squel[_0xecbd('0x65')]()[_0xecbd('0x66')](_0xecbd('0x67'))[_0xecbd('0x68')]([_0xecbd('0x69'),_0xecbd('0x6a'),_0xecbd('0x79'),'ListId',_0xecbd('0x55'),_0xecbd('0x51'),'updatedAt'],squel['select']()[_0xecbd('0x6e')](_0xecbd('0x69'),_0xecbd('0x69'))['field'](_0xecbd('0x6f'),'scheduledAt')['field']('id',_0xecbd('0x79'))[_0xecbd('0x6e')](_0x4eca25[_0xecbd('0x70')]['toString'](),'ListId')['field'](_0x1ab417[_0xecbd('0x44')]['id']['toString'](),_0xecbd('0x55'))[_0xecbd('0x6e')]('\x27'+_0x41c426+'\x27',_0xecbd('0x51'))['field']('\x27'+_0x41c426+'\x27','updatedAt')[_0xecbd('0x72')](_0xecbd('0x73'))[_0xecbd('0x39')](_0xecbd('0x7b'))[_0xecbd('0x39')](_0xecbd('0x7a'),_0x4eca25[_0xecbd('0x70')][_0xecbd('0x71')]())[_0xecbd('0x39')](_0xecbd('0x74')))[_0xecbd('0x71')]();}_0xe2de24=squel[_0xecbd('0x65')]()[_0xecbd('0x66')]('cm_hopper_additional_phones')[_0xecbd('0x68')]([_0xecbd('0x7c'),'scheduledAt','phone','OrderBy',_0xecbd('0x51'),_0xecbd('0x6c')],squel[_0xecbd('0x6d')]()[_0xecbd('0x6e')](_0xecbd('0x7d'),'id')[_0xecbd('0x6e')](_0xecbd('0x6f'),'scheduledAt')[_0xecbd('0x6e')](_0xecbd('0x7e'),_0xecbd('0x69'))[_0xecbd('0x6e')](_0xecbd('0x7f'),_0xecbd('0x80'))[_0xecbd('0x6e')]('\x27'+_0x41c426+'\x27','createdAt')[_0xecbd('0x6e')]('\x27'+_0x41c426+'\x27',_0xecbd('0x6c'))['from'](_0xecbd('0x81'),'ci')[_0xecbd('0x82')](_0xecbd('0x67'),'h','h.ContactId\x20=\x20ci.CmContactId')[_0xecbd('0x39')]('h.ListId\x20=\x20?',_0x4eca25[_0xecbd('0x70')][_0xecbd('0x71')]())[_0xecbd('0x39')](_0xecbd('0x83'),_0x1ab417[_0xecbd('0x44')]['id']['toString']())[_0xecbd('0x39')]('h.createdAt\x20=\x20?',_0x41c426))[_0xecbd('0x71')]();_0x3f7c7e[_0xecbd('0x84')](db[_0xecbd('0x85')][_0xecbd('0x2f')](_0x472802));_0x2482ed[_0xecbd('0x84')](db[_0xecbd('0x85')][_0xecbd('0x2f')](_0xe2de24));}return BPromise[_0xecbd('0x86')](_0x3f7c7e);}})[_0xecbd('0x20')](function(){return BPromise[_0xecbd('0x86')](_0x2482ed);})[_0xecbd('0x20')](function(){return _0x3a5651;})[_0xecbd('0x20')](respondWithResult(_0x4fca5a,null))['catch'](handleError(_0x4fca5a,null));};exports['removeLists']=function(_0x367bcd,_0x23244f,_0x24e130){return db['Campaign']['find']({'where':{'id':_0x367bcd[_0xecbd('0x44')]['id']}})[_0xecbd('0x20')](handleEntityNotFound(_0x23244f,null))[_0xecbd('0x20')](function(_0x47cd4c){if(_0x47cd4c){return _0x47cd4c[_0xecbd('0x87')](_0x367bcd[_0xecbd('0x2f')][_0xecbd('0x61')]);}})['then'](function(_0x4a8ec7){if(_0x4a8ec7){return db[_0xecbd('0x54')][_0xecbd('0x21')]({'where':{'ListId':_0x367bcd[_0xecbd('0x2f')][_0xecbd('0x61')],'CampaignId':_0x367bcd['params']['id']}})[_0xecbd('0x20')](function(){return _0x4a8ec7;});}})['then'](respondWithStatusCode(_0x23244f,null))['catch'](handleError(_0x23244f,null));};exports[_0xecbd('0x88')]=function(_0x1eaf0f,_0x12f89e,_0x18c1c9){var _0x4c6446={};var _0x14f7d3={};var _0x21455f;var _0x444df0;return db[_0xecbd('0x29')][_0xecbd('0x57')]({'where':{'id':_0x1eaf0f[_0xecbd('0x44')]['id']}})[_0xecbd('0x20')](handleEntityNotFound(_0x12f89e,null))[_0xecbd('0x20')](function(_0x5d92c7){if(_0x5d92c7){_0x21455f=_0x5d92c7;_0x14f7d3[_0xecbd('0x2d')]=_[_0xecbd('0x30')](db[_0xecbd('0x5e')][_0xecbd('0x45')]);_0x14f7d3[_0xecbd('0x2f')]=_[_0xecbd('0x30')](_0x1eaf0f[_0xecbd('0x2f')]);_0x14f7d3['filters']=_[_0xecbd('0x46')](_0x14f7d3[_0xecbd('0x2d')],_0x14f7d3[_0xecbd('0x2f')]);_0x4c6446['attributes']=_[_0xecbd('0x46')](_0x14f7d3[_0xecbd('0x2d')],qs[_0xecbd('0x32')](_0x1eaf0f['query']['fields']));_0x4c6446[_0xecbd('0x33')]=_0x4c6446[_0xecbd('0x33')][_0xecbd('0x34')]?_0x4c6446['attributes']:_0x14f7d3[_0xecbd('0x2d')];_0x4c6446['order']=qs[_0xecbd('0x38')](_0x1eaf0f[_0xecbd('0x2f')]['sort']);_0x4c6446[_0xecbd('0x39')]=qs[_0xecbd('0x31')](_['pick'](_0x1eaf0f[_0xecbd('0x2f')],_0x14f7d3[_0xecbd('0x31')]));if(_0x1eaf0f[_0xecbd('0x2f')][_0xecbd('0x56')]){_0x4c6446[_0xecbd('0x39')]=_[_0xecbd('0x3c')](_0x4c6446['where'],{'$or':_[_0xecbd('0x28')](_0x4c6446['attributes'],function(_0x37d95d){var _0x53aa05={};_0x53aa05[_0x37d95d]={'$like':'%'+_0x1eaf0f[_0xecbd('0x2f')][_0xecbd('0x56')]+'%'};return _0x53aa05;})});}_0x4c6446=_['merge']({},_0x4c6446,_0x1eaf0f[_0xecbd('0x3d')]);return _0x21455f[_0xecbd('0x88')](_0x4c6446);}})[_0xecbd('0x20')](function(_0x5cd44b){if(_0x5cd44b){_0x444df0=_0x5cd44b[_0xecbd('0x34')];if(!_0x1eaf0f[_0xecbd('0x2f')][_0xecbd('0x35')](_0xecbd('0x36'))){_0x4c6446[_0xecbd('0x1b')]=qs['limit'](_0x1eaf0f['query'][_0xecbd('0x1b')]);_0x4c6446['offset']=qs['offset'](_0x1eaf0f['query']['offset']);}return _0x21455f['getBlackLists'](_0x4c6446);}})[_0xecbd('0x20')](function(_0x38a542){if(_0x38a542){return _0x38a542?{'count':_0x444df0,'rows':_0x38a542}:null;}})[_0xecbd('0x20')](respondWithResult(_0x12f89e,null))['catch'](handleError(_0x12f89e,null));};exports[_0xecbd('0x89')]=function(_0x27a75a,_0xc0fcc4,_0x52f9eb){var _0x2b5614,_0x303358;var _0x57adc4=[];var _0x3d028d=moment()[_0xecbd('0x8a')](_0xecbd('0x60'));return db['Campaign']['find']({'where':{'id':_0x27a75a[_0xecbd('0x44')]['id']}})[_0xecbd('0x20')](handleEntityNotFound(_0xc0fcc4,null))[_0xecbd('0x20')](function(_0xbc55ab){if(_0xbc55ab){_0x303358=_0xbc55ab;return _0xbc55ab['addBlackLists'](_0x27a75a['body'][_0xecbd('0x61')],_[_0xecbd('0x50')](_0x27a75a[_0xecbd('0x48')],['ids','id'])||{});}return null;})['spread'](function(_0x397aeb){var _0x568652;var _0x524c05;_0x2b5614=_0x397aeb||[];var _0x2e0d07=[];if(_0x397aeb){for(var _0x4610f5=0x0;_0x4610f5<_0x397aeb[_0xecbd('0x34')];_0x4610f5+=0x1){var _0x5278f3=_0x397aeb[_0x4610f5][_0xecbd('0x22')]({'plain':!![]});_0x568652=squel[_0xecbd('0x65')]()[_0xecbd('0x66')](_0xecbd('0x8b'))['fromQuery']([_0xecbd('0x69'),_0xecbd('0x79'),_0xecbd('0x6b'),_0xecbd('0x55'),'createdAt',_0xecbd('0x6c')],squel[_0xecbd('0x6d')]()['field']('phone','phone')['field']('id',_0xecbd('0x79'))['field'](_0x5278f3['CmListId'][_0xecbd('0x71')](),'ListId')[_0xecbd('0x6e')](_0x27a75a['params']['id']['toString'](),_0xecbd('0x55'))[_0xecbd('0x6e')](_0xecbd('0x6f'),_0xecbd('0x51'))['field'](_0xecbd('0x6f'),_0xecbd('0x6c'))[_0xecbd('0x72')](_0xecbd('0x73'))[_0xecbd('0x39')]('deletedAt\x20IS\x20NULL')[_0xecbd('0x39')]('ListId\x20=\x20?',_0x5278f3[_0xecbd('0x70')]['toString']())[_0xecbd('0x39')]('phone\x20IS\x20NOT\x20NULL'))[_0xecbd('0x71')]();_0x2e0d07[_0xecbd('0x84')](db['sequelize'][_0xecbd('0x2f')](_0x568652));}return BPromise[_0xecbd('0x86')](_0x2e0d07);}})['then'](function(){return _0x2b5614;})[_0xecbd('0x20')](respondWithResult(_0xc0fcc4,null))[_0xecbd('0x42')](handleError(_0xc0fcc4,null));};exports[_0xecbd('0x8c')]=function(_0x4b96f0,_0x85d2b4,_0x148bc8){return db[_0xecbd('0x29')][_0xecbd('0x52')]({'where':{'id':_0x4b96f0[_0xecbd('0x44')]['id']}})[_0xecbd('0x20')](handleEntityNotFound(_0x85d2b4,null))[_0xecbd('0x20')](function(_0xd44a72){if(_0xd44a72){return _0xd44a72[_0xecbd('0x8c')](_0x4b96f0[_0xecbd('0x2f')][_0xecbd('0x61')]);}})[_0xecbd('0x20')](function(_0x5f2334){if(_0x5f2334){return db[_0xecbd('0x5c')][_0xecbd('0x21')]({'where':{'ListId':_0x4b96f0['query'][_0xecbd('0x61')],'CampaignId':_0x4b96f0[_0xecbd('0x44')]['id']}})[_0xecbd('0x20')](function(){return _0x5f2334;});}})['then'](respondWithStatusCode(_0x85d2b4,null))['catch'](handleError(_0x85d2b4,null));};
\ No newline at end of file
+var _0x7a4f=['VIRTUAL','options','includeAll','include','findAll','show','params','length','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','error','clone','omit','createdAt','updatedAt','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getHoppers','findOne','CmHopper','nolimit','CampaignId','filter','rows','getHopperHistories','CmHopperHistory','CmHopperFinal','getHopperBlacks','CmHopperBlack','getLists','CmList','addLists','format','YYYY-MM-DD\x20HH:mm:ss','ids','spread','dialCheckDuplicateType','insert','into','cm_hopper','fromQuery','scheduledAt','ContactId','select','phone','field','NOW()','ListId','toString','from','deletedAt\x20IS\x20NULL','CmListId','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','cm_hopper_final','CampaignId\x20=\x20?','onlyIfOpen','ListId\x20=\x20?','COALESCE(phone,\x27\x27)','cm_contacts','cm_hopper_additional_phones','cmHopperId','OrderBy','ci.item','ci.OrderBY','h.ContactId\x20=\x20ci.CmContactId','h.ListId\x20=\x20?','h.CampaignId=?','h.createdAt\x20=\x20?','push','sequelize','removeLists','getBlackLists','addBlackLists','all','removeBlackLists','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','to-csv','ejs','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','sendStatus','status','end','json','offset','undefined','count','limit','Content-Range','apply','reject','update','then','destroy','get','IvrCampaigns','UserProfileResource','stack','name','send','index','map','Campaign','rawAttributes','fieldName','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','order','sort','where','pick','merge','type'];(function(_0x454b10,_0x5a15a5){var _0x50252c=function(_0x5b7326){while(--_0x5b7326){_0x454b10['push'](_0x454b10['shift']());}};_0x50252c(++_0x5a15a5);}(_0x7a4f,0x17a));var _0xf7a4=function(_0x87239,_0x38c793){_0x87239=_0x87239-0x0;var _0x53af1e=_0x7a4f[_0x87239];return _0x53af1e;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xf7a4('0x0'));var zipdir=require(_0xf7a4('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xf7a4('0x2'));var moment=require(_0xf7a4('0x3'));var BPromise=require(_0xf7a4('0x4'));var Mustache=require(_0xf7a4('0x5'));var util=require('util');var path=require(_0xf7a4('0x6'));var sox=require('sox');var csv=require(_0xf7a4('0x7'));var ejs=require(_0xf7a4('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xf7a4('0x9'));var squel=require(_0xf7a4('0xa'));var crypto=require(_0xf7a4('0xb'));var jsforce=require(_0xf7a4('0xc'));var deskjs=require(_0xf7a4('0xd'));var toCsv=require(_0xf7a4('0x7'));var querystring=require(_0xf7a4('0xe'));var Papa=require(_0xf7a4('0xf'));var Redis=require(_0xf7a4('0x10'));var authService=require(_0xf7a4('0x11'));var qs=require(_0xf7a4('0x12'));var as=require(_0xf7a4('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xf7a4('0x14'))(_0xf7a4('0x15'));var utils=require('../../config/utils');var config=require(_0xf7a4('0x16'));var licenseUtil=require(_0xf7a4('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x19a322,_0x204eb1){_0x204eb1=_0x204eb1||0xcc;return function(_0x10ec23){if(_0x10ec23){return _0x19a322[_0xf7a4('0x18')](_0x204eb1);}return _0x19a322[_0xf7a4('0x19')](_0x204eb1)[_0xf7a4('0x1a')]();};}function respondWithResult(_0x3b7d8c,_0x262e47){_0x262e47=_0x262e47||0xc8;return function(_0x3cca90){if(_0x3cca90){return _0x3b7d8c['status'](_0x262e47)[_0xf7a4('0x1b')](_0x3cca90);}};}function respondWithFilteredResult(_0x3fe552,_0x4cda4a){return function(_0x2a772c){if(_0x2a772c){var _0x4de2eb=typeof _0x4cda4a[_0xf7a4('0x1c')]===_0xf7a4('0x1d')&&typeof _0x4cda4a['limit']==='undefined';var _0x17e52f=_0x2a772c['count'];var _0x3d8f93=_0x4de2eb?0x0:_0x4cda4a['offset'];var _0xd2cd6f=_0x4de2eb?_0x2a772c[_0xf7a4('0x1e')]:_0x4cda4a[_0xf7a4('0x1c')]+_0x4cda4a[_0xf7a4('0x1f')];var _0x25a82a;if(_0xd2cd6f>=_0x17e52f){_0xd2cd6f=_0x17e52f;_0x25a82a=0xc8;}else{_0x25a82a=0xce;}_0x3fe552[_0xf7a4('0x19')](_0x25a82a);return _0x3fe552['set'](_0xf7a4('0x20'),_0x3d8f93+'-'+_0xd2cd6f+'/'+_0x17e52f)[_0xf7a4('0x1b')](_0x2a772c);}return null;};}function patchUpdates(_0x484677){return function(_0x42e04f){try{jsonpatch[_0xf7a4('0x21')](_0x42e04f,_0x484677,!![]);}catch(_0x4621b0){return BPromise[_0xf7a4('0x22')](_0x4621b0);}return _0x42e04f['save']();};}function saveUpdates(_0x3d757f,_0x5336bf){return function(_0x46cdac){if(_0x46cdac){return _0x46cdac[_0xf7a4('0x23')](_0x3d757f)[_0xf7a4('0x24')](function(_0x299eb7){return _0x299eb7;});}return null;};}function removeEntity(_0x2a36c6,_0x299a04){return function(_0x4be70d){if(_0x4be70d){return _0x4be70d[_0xf7a4('0x25')]()['then'](function(){var _0x340ba4=_0x4be70d[_0xf7a4('0x26')]({'plain':!![]});var _0x5e3298=_0xf7a4('0x27');return db[_0xf7a4('0x28')][_0xf7a4('0x25')]({'where':{'type':_0x5e3298,'resourceId':_0x340ba4['id']}})[_0xf7a4('0x24')](function(){return _0x4be70d;});})[_0xf7a4('0x24')](function(){_0x2a36c6[_0xf7a4('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4cb135,_0x30225d){return function(_0x4984f5){if(!_0x4984f5){_0x4cb135['sendStatus'](0x194);}return _0x4984f5;};}function handleError(_0x1e242c,_0x5e8409){_0x5e8409=_0x5e8409||0x1f4;return function(_0xeef2d5){logger['error'](_0xeef2d5[_0xf7a4('0x29')]);if(_0xeef2d5[_0xf7a4('0x2a')]){delete _0xeef2d5['name'];}_0x1e242c[_0xf7a4('0x19')](_0x5e8409)[_0xf7a4('0x2b')](_0xeef2d5);};}exports[_0xf7a4('0x2c')]=function(_0x164c7e,_0x5aa202){var _0xe87462={},_0x1eea08={},_0x45c1ae={'count':0x0,'rows':[]};var _0x211849=_[_0xf7a4('0x2d')](db[_0xf7a4('0x2e')][_0xf7a4('0x2f')],function(_0x2746a5){return{'name':_0x2746a5[_0xf7a4('0x30')],'type':_0x2746a5['type']['key']};});_0x1eea08[_0xf7a4('0x31')]=_[_0xf7a4('0x2d')](_0x211849,_0xf7a4('0x2a'));_0x1eea08[_0xf7a4('0x32')]=_[_0xf7a4('0x33')](_0x164c7e[_0xf7a4('0x32')]);_0x1eea08[_0xf7a4('0x34')]=_[_0xf7a4('0x35')](_0x1eea08[_0xf7a4('0x31')],_0x1eea08[_0xf7a4('0x32')]);_0xe87462[_0xf7a4('0x36')]=_['intersection'](_0x1eea08[_0xf7a4('0x31')],qs[_0xf7a4('0x37')](_0x164c7e[_0xf7a4('0x32')][_0xf7a4('0x37')]));_0xe87462[_0xf7a4('0x36')]=_0xe87462[_0xf7a4('0x36')]['length']?_0xe87462[_0xf7a4('0x36')]:_0x1eea08[_0xf7a4('0x31')];if(!_0x164c7e[_0xf7a4('0x32')][_0xf7a4('0x38')]('nolimit')){_0xe87462[_0xf7a4('0x1f')]=qs[_0xf7a4('0x1f')](_0x164c7e[_0xf7a4('0x32')][_0xf7a4('0x1f')]);_0xe87462[_0xf7a4('0x1c')]=qs[_0xf7a4('0x1c')](_0x164c7e['query']['offset']);}_0xe87462[_0xf7a4('0x39')]=qs['sort'](_0x164c7e[_0xf7a4('0x32')][_0xf7a4('0x3a')]);_0xe87462[_0xf7a4('0x3b')]=qs[_0xf7a4('0x34')](_[_0xf7a4('0x3c')](_0x164c7e[_0xf7a4('0x32')],_0x1eea08[_0xf7a4('0x34')]),_0x211849);if(_0x164c7e[_0xf7a4('0x32')]['filter']){_0xe87462[_0xf7a4('0x3b')]=_[_0xf7a4('0x3d')](_0xe87462['where'],{'$or':_['map'](_0x211849,function(_0x2eb70c){if(_0x2eb70c[_0xf7a4('0x3e')]!==_0xf7a4('0x3f')){var _0x8664b9={};_0x8664b9[_0x2eb70c['name']]={'$like':'%'+_0x164c7e[_0xf7a4('0x32')]['filter']+'%'};return _0x8664b9;}})});}_0xe87462=_[_0xf7a4('0x3d')]({},_0xe87462,_0x164c7e[_0xf7a4('0x40')]);var _0x14012f={'where':_0xe87462[_0xf7a4('0x3b')]};return db['Campaign'][_0xf7a4('0x1e')](_0x14012f)[_0xf7a4('0x24')](function(_0x316bdc){_0x45c1ae['count']=_0x316bdc;if(_0x164c7e[_0xf7a4('0x32')][_0xf7a4('0x41')]){_0xe87462[_0xf7a4('0x42')]=[{'all':!![]}];}return db['Campaign'][_0xf7a4('0x43')](_0xe87462);})[_0xf7a4('0x24')](function(_0x33ba2f){_0x45c1ae['rows']=_0x33ba2f;return _0x45c1ae;})[_0xf7a4('0x24')](respondWithFilteredResult(_0x5aa202,_0xe87462))['catch'](handleError(_0x5aa202,null));};exports[_0xf7a4('0x44')]=function(_0xdb0d63,_0xdcbb01){var _0x1317de={'raw':![],'where':{'id':_0xdb0d63[_0xf7a4('0x45')]['id']}},_0x3d3a00={};_0x3d3a00[_0xf7a4('0x31')]=_[_0xf7a4('0x33')](db[_0xf7a4('0x2e')][_0xf7a4('0x2f')]);_0x3d3a00['query']=_[_0xf7a4('0x33')](_0xdb0d63[_0xf7a4('0x32')]);_0x3d3a00[_0xf7a4('0x34')]=_['intersection'](_0x3d3a00[_0xf7a4('0x31')],_0x3d3a00['query']);_0x1317de[_0xf7a4('0x36')]=_['intersection'](_0x3d3a00[_0xf7a4('0x31')],qs[_0xf7a4('0x37')](_0xdb0d63[_0xf7a4('0x32')][_0xf7a4('0x37')]));_0x1317de[_0xf7a4('0x36')]=_0x1317de['attributes'][_0xf7a4('0x46')]?_0x1317de[_0xf7a4('0x36')]:_0x3d3a00[_0xf7a4('0x31')];if(_0xdb0d63[_0xf7a4('0x32')][_0xf7a4('0x41')]){_0x1317de[_0xf7a4('0x42')]=[{'all':!![]}];}_0x1317de=_[_0xf7a4('0x3d')]({},_0x1317de,_0xdb0d63[_0xf7a4('0x40')]);return db[_0xf7a4('0x2e')][_0xf7a4('0x47')](_0x1317de)[_0xf7a4('0x24')](handleEntityNotFound(_0xdcbb01,null))[_0xf7a4('0x24')](respondWithResult(_0xdcbb01,null))['catch'](handleError(_0xdcbb01,null));};exports[_0xf7a4('0x48')]=function(_0x1c8a8c,_0x2c3159){return db['Campaign'][_0xf7a4('0x48')](_0x1c8a8c[_0xf7a4('0x49')],{})['then'](function(_0x36928f){var _0x55b752=_0x1c8a8c[_0xf7a4('0x4a')][_0xf7a4('0x26')]({'plain':!![]});if(!_0x55b752)throw new Error(_0xf7a4('0x4b'));if(_0x55b752[_0xf7a4('0x4c')]===_0xf7a4('0x4a')){var _0x2b4d9e=_0x36928f['get']({'plain':!![]});var _0x5407e6=_0xf7a4('0x27');return db[_0xf7a4('0x4d')][_0xf7a4('0x47')]({'where':{'name':_0x5407e6,'userProfileId':_0x55b752[_0xf7a4('0x4e')]},'raw':!![]})['then'](function(_0x4134c3){if(_0x4134c3&&_0x4134c3[_0xf7a4('0x4f')]===0x0){return db[_0xf7a4('0x28')][_0xf7a4('0x48')]({'name':_0x2b4d9e[_0xf7a4('0x2a')],'resourceId':_0x2b4d9e['id'],'type':_0x4134c3[_0xf7a4('0x2a')],'sectionId':_0x4134c3['id']},{})[_0xf7a4('0x24')](function(){return _0x36928f;});}else{return _0x36928f;}})['catch'](function(_0x3dee42){logger[_0xf7a4('0x50')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x3dee42);throw _0x3dee42;});}return _0x36928f;})[_0xf7a4('0x24')](respondWithResult(_0x2c3159,0xc9))['catch'](handleError(_0x2c3159,null));};exports[_0xf7a4('0x51')]=function(_0x3d7346,_0x1f40dd){var _0x3727b8={'where':{'id':_0x3d7346[_0xf7a4('0x45')]['id']}},_0x5c1ce5={};_0x5c1ce5['model']=_[_0xf7a4('0x33')](db['Campaign']['rawAttributes']);_0x3727b8[_0xf7a4('0x36')]=_[_0xf7a4('0x35')](_0x5c1ce5['model'],qs[_0xf7a4('0x37')](_0x3d7346[_0xf7a4('0x32')][_0xf7a4('0x37')]));_0x3727b8[_0xf7a4('0x36')]=_0x3727b8[_0xf7a4('0x36')][_0xf7a4('0x46')]?_0x3727b8[_0xf7a4('0x36')]:_0x5c1ce5[_0xf7a4('0x31')];if(_0x3d7346[_0xf7a4('0x32')]['includeAll']){_0x3727b8[_0xf7a4('0x42')]=[{'all':!![]}];}_0x3727b8=_[_0xf7a4('0x3d')]({},_0x3727b8,_0x3d7346[_0xf7a4('0x40')]);return db[_0xf7a4('0x2e')][_0xf7a4('0x47')](_0x3727b8)['then'](handleEntityNotFound(_0x1f40dd,null))[_0xf7a4('0x24')](function(_0x4fb4df){if(_0x4fb4df){var _0x2d5c8e=_0x4fb4df[_0xf7a4('0x26')]({'plain':!![]});_0x2d5c8e=qs[_0xf7a4('0x52')](_0x2d5c8e,['id','createdAt','updatedAt']);_0x3d7346[_0xf7a4('0x49')]=_['omit'](_0x3d7346[_0xf7a4('0x49')],['id',_0xf7a4('0x53'),_0xf7a4('0x54')]);return db[_0xf7a4('0x2e')][_0xf7a4('0x48')](_[_0xf7a4('0x3d')](_0x2d5c8e,_0x3d7346['body']),{'include':_0x3d7346[_0xf7a4('0x32')][_0xf7a4('0x41')]?[{'all':!![]}]:undefined})[_0xf7a4('0x24')](function(_0x2e7ff7){var _0x11e3a6=_0x3d7346['user'][_0xf7a4('0x26')]({'plain':!![]});if(!_0x11e3a6)throw new Error(_0xf7a4('0x4b'));if(_0x11e3a6[_0xf7a4('0x4c')]===_0xf7a4('0x4a')){var _0xe83e1=_0x2e7ff7[_0xf7a4('0x26')]({'plain':!![]});var _0x233d83=_0xf7a4('0x27');return db[_0xf7a4('0x4d')][_0xf7a4('0x47')]({'where':{'name':_0x233d83,'userProfileId':_0x11e3a6[_0xf7a4('0x4e')]},'raw':!![]})[_0xf7a4('0x24')](function(_0x18cd5a){if(_0x18cd5a&&_0x18cd5a[_0xf7a4('0x4f')]===0x0){return db[_0xf7a4('0x28')]['create']({'name':_0xe83e1[_0xf7a4('0x2a')],'resourceId':_0xe83e1['id'],'type':_0x18cd5a[_0xf7a4('0x2a')],'sectionId':_0x18cd5a['id']},{})['then'](function(){return _0x2e7ff7;});}else{return _0x2e7ff7;}})[_0xf7a4('0x55')](function(_0x316341){logger[_0xf7a4('0x50')](_0xf7a4('0x56'),_0x316341);throw _0x316341;});}return _0x2e7ff7;});}})[_0xf7a4('0x24')](respondWithResult(_0x1f40dd,0xc9))[_0xf7a4('0x55')](handleError(_0x1f40dd,null));};exports[_0xf7a4('0x23')]=function(_0x14a119,_0x6299cd){if(_0x14a119['body']['id']){delete _0x14a119[_0xf7a4('0x49')]['id'];}return db['Campaign'][_0xf7a4('0x47')]({'where':{'id':_0x14a119[_0xf7a4('0x45')]['id']}})[_0xf7a4('0x24')](handleEntityNotFound(_0x6299cd,null))[_0xf7a4('0x24')](saveUpdates(_0x14a119[_0xf7a4('0x49')],null))[_0xf7a4('0x24')](respondWithResult(_0x6299cd,null))[_0xf7a4('0x55')](handleError(_0x6299cd,null));};exports[_0xf7a4('0x25')]=function(_0x33baa7,_0x573814){return db['Campaign']['find']({'where':{'id':_0x33baa7[_0xf7a4('0x45')]['id']}})[_0xf7a4('0x24')](handleEntityNotFound(_0x573814,null))['then'](removeEntity(_0x573814,null))[_0xf7a4('0x55')](handleError(_0x573814,null));};exports[_0xf7a4('0x57')]=function(_0xf39857,_0x170143,_0xfa2968){var _0x4d9827={'raw':!![],'where':{}};var _0x58e263={};var _0x5e0fee={'count':0x0,'rows':[]};return db[_0xf7a4('0x2e')][_0xf7a4('0x58')]({'where':{'id':_0xf39857['params']['id']}})[_0xf7a4('0x24')](handleEntityNotFound(_0x170143,null))[_0xf7a4('0x24')](function(_0x5aa328){if(_0x5aa328){_0x58e263[_0xf7a4('0x31')]=_[_0xf7a4('0x33')](db[_0xf7a4('0x59')][_0xf7a4('0x2f')]);_0x58e263[_0xf7a4('0x32')]=_[_0xf7a4('0x33')](_0xf39857['query']);_0x58e263[_0xf7a4('0x34')]=_[_0xf7a4('0x35')](_0x58e263[_0xf7a4('0x31')],_0x58e263['query']);_0x4d9827[_0xf7a4('0x36')]=_[_0xf7a4('0x35')](_0x58e263[_0xf7a4('0x31')],qs['fields'](_0xf39857[_0xf7a4('0x32')][_0xf7a4('0x37')]));_0x4d9827[_0xf7a4('0x36')]=_0x4d9827[_0xf7a4('0x36')][_0xf7a4('0x46')]?_0x4d9827[_0xf7a4('0x36')]:_0x58e263['model'];if(!_0xf39857[_0xf7a4('0x32')][_0xf7a4('0x38')](_0xf7a4('0x5a'))){_0x4d9827['limit']=qs[_0xf7a4('0x1f')](_0xf39857['query'][_0xf7a4('0x1f')]);_0x4d9827['offset']=qs['offset'](_0xf39857[_0xf7a4('0x32')][_0xf7a4('0x1c')]);}_0x4d9827['order']=qs[_0xf7a4('0x3a')](_0xf39857[_0xf7a4('0x32')][_0xf7a4('0x3a')]);_0x4d9827[_0xf7a4('0x3b')]=qs['filters'](_[_0xf7a4('0x3c')](_0xf39857['query'],_0x58e263[_0xf7a4('0x34')]));_0x4d9827[_0xf7a4('0x3b')][_0xf7a4('0x5b')]=_0x5aa328['id'];if(_0xf39857['query'][_0xf7a4('0x5c')]){_0x4d9827[_0xf7a4('0x3b')]=_[_0xf7a4('0x3d')](_0x4d9827[_0xf7a4('0x3b')],{'$or':_[_0xf7a4('0x2d')](_0x4d9827['attributes'],function(_0x594ac8){var _0x248f15={};_0x248f15[_0x594ac8]={'$like':'%'+_0xf39857[_0xf7a4('0x32')][_0xf7a4('0x5c')]+'%'};return _0x248f15;})});}_0x4d9827=_[_0xf7a4('0x3d')]({},_0x4d9827,_0xf39857['options']);return db[_0xf7a4('0x59')][_0xf7a4('0x1e')]({'where':_0x4d9827[_0xf7a4('0x3b')]})[_0xf7a4('0x24')](function(_0x519e39){_0x5e0fee[_0xf7a4('0x1e')]=_0x519e39;if(_0xf39857[_0xf7a4('0x32')]['includeAll']){_0x4d9827[_0xf7a4('0x42')]=[{'all':!![]}];}return db[_0xf7a4('0x59')]['findAll'](_0x4d9827);})[_0xf7a4('0x24')](function(_0x42943e){_0x5e0fee[_0xf7a4('0x5d')]=_0x42943e;return _0x5e0fee;});}})[_0xf7a4('0x24')](respondWithFilteredResult(_0x170143,_0x4d9827))[_0xf7a4('0x55')](handleError(_0x170143,null));};exports[_0xf7a4('0x5e')]=function(_0x3873b9,_0x3b6911,_0x2eb988){var _0x11efc4={'raw':!![],'where':{}};var _0x14c964={};var _0x5bb70e={'count':0x0,'rows':[]};return db['Campaign'][_0xf7a4('0x58')]({'where':{'id':_0x3873b9[_0xf7a4('0x45')]['id']}})['then'](handleEntityNotFound(_0x3b6911,null))['then'](function(_0x197d2f){if(_0x197d2f){_0x14c964[_0xf7a4('0x31')]=_[_0xf7a4('0x33')](db[_0xf7a4('0x5f')][_0xf7a4('0x2f')]);_0x14c964[_0xf7a4('0x32')]=_[_0xf7a4('0x33')](_0x3873b9[_0xf7a4('0x32')]);_0x14c964[_0xf7a4('0x34')]=_[_0xf7a4('0x35')](_0x14c964[_0xf7a4('0x31')],_0x14c964['query']);_0x11efc4[_0xf7a4('0x36')]=_[_0xf7a4('0x35')](_0x14c964[_0xf7a4('0x31')],qs['fields'](_0x3873b9['query']['fields']));_0x11efc4[_0xf7a4('0x36')]=_0x11efc4[_0xf7a4('0x36')][_0xf7a4('0x46')]?_0x11efc4[_0xf7a4('0x36')]:_0x14c964[_0xf7a4('0x31')];if(!_0x3873b9[_0xf7a4('0x32')][_0xf7a4('0x38')](_0xf7a4('0x5a'))){_0x11efc4[_0xf7a4('0x1f')]=qs[_0xf7a4('0x1f')](_0x3873b9[_0xf7a4('0x32')]['limit']);_0x11efc4[_0xf7a4('0x1c')]=qs[_0xf7a4('0x1c')](_0x3873b9[_0xf7a4('0x32')][_0xf7a4('0x1c')]);}_0x11efc4['order']=qs[_0xf7a4('0x3a')](_0x3873b9['query']['sort']);_0x11efc4[_0xf7a4('0x3b')]=qs['filters'](_[_0xf7a4('0x3c')](_0x3873b9[_0xf7a4('0x32')],_0x14c964[_0xf7a4('0x34')]));_0x11efc4['where'][_0xf7a4('0x5b')]=_0x197d2f['id'];if(_0x3873b9[_0xf7a4('0x32')][_0xf7a4('0x5c')]){_0x11efc4[_0xf7a4('0x3b')]=_[_0xf7a4('0x3d')](_0x11efc4['where'],{'$or':_['map'](_0x11efc4[_0xf7a4('0x36')],function(_0x44e080){var _0x1be72c={};_0x1be72c[_0x44e080]={'$like':'%'+_0x3873b9['query'][_0xf7a4('0x5c')]+'%'};return _0x1be72c;})});}_0x11efc4=_[_0xf7a4('0x3d')]({},_0x11efc4,_0x3873b9['options']);return db['CmHopperHistory']['count']({'where':_0x11efc4[_0xf7a4('0x3b')]})[_0xf7a4('0x24')](function(_0x4e91c5){_0x5bb70e['count']=_0x4e91c5;if(_0x3873b9[_0xf7a4('0x32')][_0xf7a4('0x41')]){_0x11efc4[_0xf7a4('0x42')]=[{'all':!![]}];}return db[_0xf7a4('0x5f')][_0xf7a4('0x43')](_0x11efc4);})[_0xf7a4('0x24')](function(_0xd811f7){_0x5bb70e[_0xf7a4('0x5d')]=_0xd811f7;return _0x5bb70e;});}})['then'](respondWithFilteredResult(_0x3b6911,_0x11efc4))[_0xf7a4('0x55')](handleError(_0x3b6911,null));};exports['getHopperFinals']=function(_0x99f87a,_0x1a5ed2,_0x1beb94){var _0x46a706={'raw':!![],'where':{}};var _0xb185f0={};var _0x28da97={'count':0x0,'rows':[]};return db[_0xf7a4('0x2e')][_0xf7a4('0x58')]({'where':{'id':_0x99f87a[_0xf7a4('0x45')]['id']}})[_0xf7a4('0x24')](handleEntityNotFound(_0x1a5ed2,null))['then'](function(_0x41ac0e){if(_0x41ac0e){_0xb185f0[_0xf7a4('0x31')]=_[_0xf7a4('0x33')](db[_0xf7a4('0x60')][_0xf7a4('0x2f')]);_0xb185f0[_0xf7a4('0x32')]=_[_0xf7a4('0x33')](_0x99f87a['query']);_0xb185f0['filters']=_['intersection'](_0xb185f0[_0xf7a4('0x31')],_0xb185f0[_0xf7a4('0x32')]);_0x46a706[_0xf7a4('0x36')]=_['intersection'](_0xb185f0['model'],qs[_0xf7a4('0x37')](_0x99f87a[_0xf7a4('0x32')][_0xf7a4('0x37')]));_0x46a706[_0xf7a4('0x36')]=_0x46a706['attributes'][_0xf7a4('0x46')]?_0x46a706[_0xf7a4('0x36')]:_0xb185f0['model'];if(!_0x99f87a[_0xf7a4('0x32')]['hasOwnProperty']('nolimit')){_0x46a706['limit']=qs[_0xf7a4('0x1f')](_0x99f87a[_0xf7a4('0x32')][_0xf7a4('0x1f')]);_0x46a706[_0xf7a4('0x1c')]=qs[_0xf7a4('0x1c')](_0x99f87a[_0xf7a4('0x32')][_0xf7a4('0x1c')]);}_0x46a706[_0xf7a4('0x39')]=qs['sort'](_0x99f87a[_0xf7a4('0x32')][_0xf7a4('0x3a')]);_0x46a706[_0xf7a4('0x3b')]=qs[_0xf7a4('0x34')](_[_0xf7a4('0x3c')](_0x99f87a['query'],_0xb185f0[_0xf7a4('0x34')]));_0x46a706[_0xf7a4('0x3b')][_0xf7a4('0x5b')]=_0x41ac0e['id'];if(_0x99f87a[_0xf7a4('0x32')][_0xf7a4('0x5c')]){_0x46a706[_0xf7a4('0x3b')]=_[_0xf7a4('0x3d')](_0x46a706['where'],{'$or':_[_0xf7a4('0x2d')](_0x46a706[_0xf7a4('0x36')],function(_0x4ab676){var _0x5c0f30={};_0x5c0f30[_0x4ab676]={'$like':'%'+_0x99f87a[_0xf7a4('0x32')][_0xf7a4('0x5c')]+'%'};return _0x5c0f30;})});}_0x46a706=_[_0xf7a4('0x3d')]({},_0x46a706,_0x99f87a[_0xf7a4('0x40')]);return db['CmHopperFinal'][_0xf7a4('0x1e')]({'where':_0x46a706['where']})['then'](function(_0x55e89c){_0x28da97[_0xf7a4('0x1e')]=_0x55e89c;if(_0x99f87a[_0xf7a4('0x32')][_0xf7a4('0x41')]){_0x46a706[_0xf7a4('0x42')]=[{'all':!![]}];}return db[_0xf7a4('0x60')][_0xf7a4('0x43')](_0x46a706);})[_0xf7a4('0x24')](function(_0x2506a9){_0x28da97[_0xf7a4('0x5d')]=_0x2506a9;return _0x28da97;});}})[_0xf7a4('0x24')](respondWithFilteredResult(_0x1a5ed2,_0x46a706))[_0xf7a4('0x55')](handleError(_0x1a5ed2,null));};exports[_0xf7a4('0x61')]=function(_0x3def56,_0x5af253,_0x1a988f){var _0x56433f={'raw':!![],'where':{}};var _0x103ca4={};var _0x83b95a={'count':0x0,'rows':[]};return db[_0xf7a4('0x2e')][_0xf7a4('0x58')]({'where':{'id':_0x3def56[_0xf7a4('0x45')]['id']}})[_0xf7a4('0x24')](handleEntityNotFound(_0x5af253,null))['then'](function(_0x5ea086){if(_0x5ea086){_0x103ca4['model']=_[_0xf7a4('0x33')](db[_0xf7a4('0x62')][_0xf7a4('0x2f')]);_0x103ca4['query']=_[_0xf7a4('0x33')](_0x3def56['query']);_0x103ca4[_0xf7a4('0x34')]=_[_0xf7a4('0x35')](_0x103ca4[_0xf7a4('0x31')],_0x103ca4[_0xf7a4('0x32')]);_0x56433f[_0xf7a4('0x36')]=_[_0xf7a4('0x35')](_0x103ca4[_0xf7a4('0x31')],qs['fields'](_0x3def56['query'][_0xf7a4('0x37')]));_0x56433f[_0xf7a4('0x36')]=_0x56433f[_0xf7a4('0x36')]['length']?_0x56433f[_0xf7a4('0x36')]:_0x103ca4[_0xf7a4('0x31')];if(!_0x3def56[_0xf7a4('0x32')][_0xf7a4('0x38')](_0xf7a4('0x5a'))){_0x56433f[_0xf7a4('0x1f')]=qs[_0xf7a4('0x1f')](_0x3def56['query']['limit']);_0x56433f[_0xf7a4('0x1c')]=qs[_0xf7a4('0x1c')](_0x3def56[_0xf7a4('0x32')][_0xf7a4('0x1c')]);}_0x56433f[_0xf7a4('0x39')]=qs[_0xf7a4('0x3a')](_0x3def56[_0xf7a4('0x32')][_0xf7a4('0x3a')]);_0x56433f[_0xf7a4('0x3b')]=qs[_0xf7a4('0x34')](_[_0xf7a4('0x3c')](_0x3def56[_0xf7a4('0x32')],_0x103ca4[_0xf7a4('0x34')]));_0x56433f[_0xf7a4('0x3b')][_0xf7a4('0x5b')]=_0x5ea086['id'];if(_0x3def56[_0xf7a4('0x32')]['filter']){_0x56433f[_0xf7a4('0x3b')]=_[_0xf7a4('0x3d')](_0x56433f[_0xf7a4('0x3b')],{'$or':_[_0xf7a4('0x2d')](_0x56433f[_0xf7a4('0x36')],function(_0x413335){var _0x349139={};_0x349139[_0x413335]={'$like':'%'+_0x3def56[_0xf7a4('0x32')][_0xf7a4('0x5c')]+'%'};return _0x349139;})});}_0x56433f=_[_0xf7a4('0x3d')]({},_0x56433f,_0x3def56['options']);return db[_0xf7a4('0x62')][_0xf7a4('0x1e')]({'where':_0x56433f[_0xf7a4('0x3b')]})[_0xf7a4('0x24')](function(_0x3e8a07){_0x83b95a[_0xf7a4('0x1e')]=_0x3e8a07;if(_0x3def56[_0xf7a4('0x32')][_0xf7a4('0x41')]){_0x56433f[_0xf7a4('0x42')]=[{'all':!![]}];}return db[_0xf7a4('0x62')]['findAll'](_0x56433f);})[_0xf7a4('0x24')](function(_0x4f144b){_0x83b95a['rows']=_0x4f144b;return _0x83b95a;});}})[_0xf7a4('0x24')](respondWithFilteredResult(_0x5af253,_0x56433f))[_0xf7a4('0x55')](handleError(_0x5af253,null));};exports[_0xf7a4('0x63')]=function(_0x1165bf,_0x407598,_0x518b19){var _0x920e99={};var _0x17dcb7={};var _0x15c071;var _0x96644b;return db[_0xf7a4('0x2e')]['findOne']({'where':{'id':_0x1165bf[_0xf7a4('0x45')]['id']}})[_0xf7a4('0x24')](handleEntityNotFound(_0x407598,null))['then'](function(_0xda6941){if(_0xda6941){_0x15c071=_0xda6941;_0x17dcb7[_0xf7a4('0x31')]=_['keys'](db[_0xf7a4('0x64')][_0xf7a4('0x2f')]);_0x17dcb7['query']=_[_0xf7a4('0x33')](_0x1165bf[_0xf7a4('0x32')]);_0x17dcb7[_0xf7a4('0x34')]=_[_0xf7a4('0x35')](_0x17dcb7[_0xf7a4('0x31')],_0x17dcb7[_0xf7a4('0x32')]);_0x920e99[_0xf7a4('0x36')]=_[_0xf7a4('0x35')](_0x17dcb7[_0xf7a4('0x31')],qs[_0xf7a4('0x37')](_0x1165bf[_0xf7a4('0x32')][_0xf7a4('0x37')]));_0x920e99['attributes']=_0x920e99[_0xf7a4('0x36')][_0xf7a4('0x46')]?_0x920e99[_0xf7a4('0x36')]:_0x17dcb7[_0xf7a4('0x31')];_0x920e99[_0xf7a4('0x39')]=qs[_0xf7a4('0x3a')](_0x1165bf[_0xf7a4('0x32')][_0xf7a4('0x3a')]);_0x920e99[_0xf7a4('0x3b')]=qs[_0xf7a4('0x34')](_[_0xf7a4('0x3c')](_0x1165bf[_0xf7a4('0x32')],_0x17dcb7[_0xf7a4('0x34')]));if(_0x1165bf[_0xf7a4('0x32')]['filter']){_0x920e99[_0xf7a4('0x3b')]=_[_0xf7a4('0x3d')](_0x920e99['where'],{'$or':_[_0xf7a4('0x2d')](_0x920e99['attributes'],function(_0x2a83ea){var _0xed458f={};_0xed458f[_0x2a83ea]={'$like':'%'+_0x1165bf[_0xf7a4('0x32')][_0xf7a4('0x5c')]+'%'};return _0xed458f;})});}_0x920e99=_[_0xf7a4('0x3d')]({},_0x920e99,_0x1165bf['options']);return _0x15c071[_0xf7a4('0x63')](_0x920e99);}})['then'](function(_0x41a01a){if(_0x41a01a){_0x96644b=_0x41a01a[_0xf7a4('0x46')];if(!_0x1165bf[_0xf7a4('0x32')][_0xf7a4('0x38')]('nolimit')){_0x920e99[_0xf7a4('0x1f')]=qs[_0xf7a4('0x1f')](_0x1165bf['query'][_0xf7a4('0x1f')]);_0x920e99[_0xf7a4('0x1c')]=qs[_0xf7a4('0x1c')](_0x1165bf[_0xf7a4('0x32')]['offset']);}return _0x15c071[_0xf7a4('0x63')](_0x920e99);}})[_0xf7a4('0x24')](function(_0x47f953){if(_0x47f953){return _0x47f953?{'count':_0x96644b,'rows':_0x47f953}:null;}})[_0xf7a4('0x24')](respondWithResult(_0x407598,null))['catch'](handleError(_0x407598,null));};exports[_0xf7a4('0x65')]=function(_0x5b6e2b,_0x4a1ca9,_0x56d611){var _0x50f382,_0x41cb93;var _0xc3a1b0=[];var _0xbe17b7=moment()[_0xf7a4('0x66')](_0xf7a4('0x67'));return db[_0xf7a4('0x2e')][_0xf7a4('0x47')]({'where':{'id':_0x5b6e2b['params']['id']}})[_0xf7a4('0x24')](handleEntityNotFound(_0x4a1ca9,null))[_0xf7a4('0x24')](function(_0x2dc6cf){if(_0x2dc6cf){_0x41cb93=_0x2dc6cf;return _0x2dc6cf['addLists'](_0x5b6e2b['body'][_0xf7a4('0x68')],_['omit'](_0x5b6e2b['body'],[_0xf7a4('0x68'),'id'])||{});}return null;})[_0xf7a4('0x69')](function(_0x3dcaa5){var _0x557765;var _0x545995;_0x50f382=_0x3dcaa5||[];var _0x32a465=[];if(_0x3dcaa5){for(var _0x4db7d3=0x0;_0x4db7d3<_0x3dcaa5[_0xf7a4('0x46')];_0x4db7d3+=0x1){var _0x59f148=_0x3dcaa5[_0x4db7d3]['get']({'plain':!![]});_0x41cb93[_0xf7a4('0x6a')]=_0x5b6e2b[_0xf7a4('0x49')][_0xf7a4('0x6a')]?_0x5b6e2b['body'][_0xf7a4('0x6a')]:_0x41cb93['dialCheckDuplicateType'];switch(_0x41cb93[_0xf7a4('0x6a')]){case'always':_0x557765=squel[_0xf7a4('0x6b')]()[_0xf7a4('0x6c')](_0xf7a4('0x6d'))[_0xf7a4('0x6e')](['phone',_0xf7a4('0x6f'),_0xf7a4('0x70'),'ListId',_0xf7a4('0x5b'),_0xf7a4('0x53'),'updatedAt'],squel[_0xf7a4('0x71')]()['field']('phone',_0xf7a4('0x72'))[_0xf7a4('0x73')](_0xf7a4('0x74'),'scheduledAt')[_0xf7a4('0x73')]('id','ContactId')[_0xf7a4('0x73')](_0x59f148['CmListId']['toString'](),_0xf7a4('0x75'))[_0xf7a4('0x73')](_0x5b6e2b[_0xf7a4('0x45')]['id'][_0xf7a4('0x76')](),'CampaignId')[_0xf7a4('0x73')]('\x27'+_0xbe17b7+'\x27','createdAt')[_0xf7a4('0x73')]('\x27'+_0xbe17b7+'\x27','updatedAt')[_0xf7a4('0x77')]('cm_contacts')[_0xf7a4('0x3b')](_0xf7a4('0x78'))[_0xf7a4('0x3b')]('ListId\x20=\x20?',_0x59f148[_0xf7a4('0x79')][_0xf7a4('0x76')]())[_0xf7a4('0x3b')](_0xf7a4('0x7a'))[_0xf7a4('0x3b')](_0xf7a4('0x7b'),squel[_0xf7a4('0x71')]()[_0xf7a4('0x73')](_0xf7a4('0x7c'))[_0xf7a4('0x77')](_0xf7a4('0x7d'))['where'](_0xf7a4('0x7e'),_0x5b6e2b[_0xf7a4('0x45')]['id'][_0xf7a4('0x76')]()))[_0xf7a4('0x3b')]('phone\x20NOT\x20IN\x20(?)',squel[_0xf7a4('0x71')]()[_0xf7a4('0x73')]('COALESCE(phone,\x27\x27)')[_0xf7a4('0x77')](_0xf7a4('0x6d'))[_0xf7a4('0x3b')](_0xf7a4('0x7e'),_0x5b6e2b[_0xf7a4('0x45')]['id'][_0xf7a4('0x76')]())))[_0xf7a4('0x76')]();break;case _0xf7a4('0x7f'):_0x557765=squel[_0xf7a4('0x6b')]()[_0xf7a4('0x6c')](_0xf7a4('0x6d'))['fromQuery'](['phone',_0xf7a4('0x6f'),'ContactId','ListId',_0xf7a4('0x5b'),_0xf7a4('0x53'),_0xf7a4('0x54')],squel[_0xf7a4('0x71')]()[_0xf7a4('0x73')](_0xf7a4('0x72'),_0xf7a4('0x72'))[_0xf7a4('0x73')](_0xf7a4('0x74'),_0xf7a4('0x6f'))['field']('id','ContactId')[_0xf7a4('0x73')](_0x59f148[_0xf7a4('0x79')][_0xf7a4('0x76')](),_0xf7a4('0x75'))[_0xf7a4('0x73')](_0x5b6e2b[_0xf7a4('0x45')]['id'][_0xf7a4('0x76')](),_0xf7a4('0x5b'))[_0xf7a4('0x73')]('\x27'+_0xbe17b7+'\x27',_0xf7a4('0x53'))[_0xf7a4('0x73')]('\x27'+_0xbe17b7+'\x27',_0xf7a4('0x54'))['from']('cm_contacts')[_0xf7a4('0x3b')]('deletedAt\x20IS\x20NULL')[_0xf7a4('0x3b')](_0xf7a4('0x80'),_0x59f148[_0xf7a4('0x79')][_0xf7a4('0x76')]())['where'](_0xf7a4('0x7a'))[_0xf7a4('0x3b')](_0xf7a4('0x7b'),squel['select']()['field'](_0xf7a4('0x81'))[_0xf7a4('0x77')](_0xf7a4('0x6d'))[_0xf7a4('0x3b')]('CampaignId\x20=\x20?',_0x5b6e2b[_0xf7a4('0x45')]['id'][_0xf7a4('0x76')]())))[_0xf7a4('0x76')]();break;default:_0x557765=squel[_0xf7a4('0x6b')]()[_0xf7a4('0x6c')]('cm_hopper')[_0xf7a4('0x6e')](['phone',_0xf7a4('0x6f'),_0xf7a4('0x70'),_0xf7a4('0x75'),'CampaignId',_0xf7a4('0x53'),_0xf7a4('0x54')],squel[_0xf7a4('0x71')]()[_0xf7a4('0x73')](_0xf7a4('0x72'),_0xf7a4('0x72'))[_0xf7a4('0x73')](_0xf7a4('0x74'),_0xf7a4('0x6f'))['field']('id',_0xf7a4('0x70'))[_0xf7a4('0x73')](_0x59f148['CmListId']['toString'](),'ListId')[_0xf7a4('0x73')](_0x5b6e2b['params']['id']['toString'](),_0xf7a4('0x5b'))[_0xf7a4('0x73')]('\x27'+_0xbe17b7+'\x27',_0xf7a4('0x53'))[_0xf7a4('0x73')]('\x27'+_0xbe17b7+'\x27',_0xf7a4('0x54'))[_0xf7a4('0x77')](_0xf7a4('0x82'))[_0xf7a4('0x3b')](_0xf7a4('0x78'))[_0xf7a4('0x3b')]('ListId\x20=\x20?',_0x59f148[_0xf7a4('0x79')][_0xf7a4('0x76')]())[_0xf7a4('0x3b')]('phone\x20IS\x20NOT\x20NULL'))[_0xf7a4('0x76')]();}_0x545995=squel[_0xf7a4('0x6b')]()[_0xf7a4('0x6c')](_0xf7a4('0x83'))[_0xf7a4('0x6e')]([_0xf7a4('0x84'),_0xf7a4('0x6f'),_0xf7a4('0x72'),_0xf7a4('0x85'),_0xf7a4('0x53'),_0xf7a4('0x54')],squel['select']()[_0xf7a4('0x73')]('h.id','id')[_0xf7a4('0x73')](_0xf7a4('0x74'),_0xf7a4('0x6f'))[_0xf7a4('0x73')](_0xf7a4('0x86'),_0xf7a4('0x72'))['field'](_0xf7a4('0x87'),_0xf7a4('0x85'))['field']('\x27'+_0xbe17b7+'\x27',_0xf7a4('0x53'))[_0xf7a4('0x73')]('\x27'+_0xbe17b7+'\x27',_0xf7a4('0x54'))[_0xf7a4('0x77')]('cm_contact_has_items','ci')['join'](_0xf7a4('0x6d'),'h',_0xf7a4('0x88'))['where'](_0xf7a4('0x89'),_0x59f148[_0xf7a4('0x79')][_0xf7a4('0x76')]())[_0xf7a4('0x3b')](_0xf7a4('0x8a'),_0x5b6e2b[_0xf7a4('0x45')]['id'][_0xf7a4('0x76')]())['where'](_0xf7a4('0x8b'),_0xbe17b7))['toString']();_0x32a465[_0xf7a4('0x8c')](db[_0xf7a4('0x8d')][_0xf7a4('0x32')](_0x557765));_0xc3a1b0[_0xf7a4('0x8c')](db[_0xf7a4('0x8d')][_0xf7a4('0x32')](_0x545995));}return BPromise['all'](_0x32a465);}})[_0xf7a4('0x24')](function(){return BPromise['all'](_0xc3a1b0);})[_0xf7a4('0x24')](function(){return _0x50f382;})[_0xf7a4('0x24')](respondWithResult(_0x4a1ca9,null))[_0xf7a4('0x55')](handleError(_0x4a1ca9,null));};exports[_0xf7a4('0x8e')]=function(_0x42f6c7,_0x402585,_0x5b4e7f){return db[_0xf7a4('0x2e')]['find']({'where':{'id':_0x42f6c7[_0xf7a4('0x45')]['id']}})['then'](handleEntityNotFound(_0x402585,null))[_0xf7a4('0x24')](function(_0x6fa15a){if(_0x6fa15a){return _0x6fa15a['removeLists'](_0x42f6c7[_0xf7a4('0x32')]['ids']);}})[_0xf7a4('0x24')](function(_0x19cca7){if(_0x19cca7){return db[_0xf7a4('0x59')][_0xf7a4('0x25')]({'where':{'ListId':_0x42f6c7['query']['ids'],'CampaignId':_0x42f6c7[_0xf7a4('0x45')]['id']}})[_0xf7a4('0x24')](function(){return _0x19cca7;});}})['then'](respondWithStatusCode(_0x402585,null))['catch'](handleError(_0x402585,null));};exports[_0xf7a4('0x8f')]=function(_0x19879e,_0xa8754,_0xcc0e1f){var _0x508d51={};var _0xc5d471={};var _0x4d5b04;var _0x2db325;return db[_0xf7a4('0x2e')][_0xf7a4('0x58')]({'where':{'id':_0x19879e[_0xf7a4('0x45')]['id']}})['then'](handleEntityNotFound(_0xa8754,null))[_0xf7a4('0x24')](function(_0xbe2821){if(_0xbe2821){_0x4d5b04=_0xbe2821;_0xc5d471[_0xf7a4('0x31')]=_['keys'](db[_0xf7a4('0x64')][_0xf7a4('0x2f')]);_0xc5d471[_0xf7a4('0x32')]=_[_0xf7a4('0x33')](_0x19879e['query']);_0xc5d471[_0xf7a4('0x34')]=_[_0xf7a4('0x35')](_0xc5d471[_0xf7a4('0x31')],_0xc5d471[_0xf7a4('0x32')]);_0x508d51[_0xf7a4('0x36')]=_[_0xf7a4('0x35')](_0xc5d471[_0xf7a4('0x31')],qs[_0xf7a4('0x37')](_0x19879e['query']['fields']));_0x508d51[_0xf7a4('0x36')]=_0x508d51[_0xf7a4('0x36')]['length']?_0x508d51[_0xf7a4('0x36')]:_0xc5d471['model'];_0x508d51[_0xf7a4('0x39')]=qs[_0xf7a4('0x3a')](_0x19879e['query'][_0xf7a4('0x3a')]);_0x508d51[_0xf7a4('0x3b')]=qs[_0xf7a4('0x34')](_[_0xf7a4('0x3c')](_0x19879e[_0xf7a4('0x32')],_0xc5d471[_0xf7a4('0x34')]));if(_0x19879e[_0xf7a4('0x32')]['filter']){_0x508d51[_0xf7a4('0x3b')]=_[_0xf7a4('0x3d')](_0x508d51['where'],{'$or':_[_0xf7a4('0x2d')](_0x508d51['attributes'],function(_0x2263cf){var _0x12e8b3={};_0x12e8b3[_0x2263cf]={'$like':'%'+_0x19879e[_0xf7a4('0x32')]['filter']+'%'};return _0x12e8b3;})});}_0x508d51=_[_0xf7a4('0x3d')]({},_0x508d51,_0x19879e[_0xf7a4('0x40')]);return _0x4d5b04['getBlackLists'](_0x508d51);}})[_0xf7a4('0x24')](function(_0x594014){if(_0x594014){_0x2db325=_0x594014[_0xf7a4('0x46')];if(!_0x19879e['query'][_0xf7a4('0x38')](_0xf7a4('0x5a'))){_0x508d51[_0xf7a4('0x1f')]=qs['limit'](_0x19879e[_0xf7a4('0x32')][_0xf7a4('0x1f')]);_0x508d51[_0xf7a4('0x1c')]=qs[_0xf7a4('0x1c')](_0x19879e[_0xf7a4('0x32')][_0xf7a4('0x1c')]);}return _0x4d5b04[_0xf7a4('0x8f')](_0x508d51);}})[_0xf7a4('0x24')](function(_0x56379b){if(_0x56379b){return _0x56379b?{'count':_0x2db325,'rows':_0x56379b}:null;}})[_0xf7a4('0x24')](respondWithResult(_0xa8754,null))['catch'](handleError(_0xa8754,null));};exports[_0xf7a4('0x90')]=function(_0x5a842d,_0x1c7a84,_0x505abd){var _0x3f3cea,_0x5e704c;var _0x24984c=[];var _0x5f21f5=moment()[_0xf7a4('0x66')](_0xf7a4('0x67'));return db['Campaign']['find']({'where':{'id':_0x5a842d[_0xf7a4('0x45')]['id']}})[_0xf7a4('0x24')](handleEntityNotFound(_0x1c7a84,null))[_0xf7a4('0x24')](function(_0x733067){if(_0x733067){_0x5e704c=_0x733067;return _0x733067['addBlackLists'](_0x5a842d[_0xf7a4('0x49')][_0xf7a4('0x68')],_[_0xf7a4('0x52')](_0x5a842d[_0xf7a4('0x49')],[_0xf7a4('0x68'),'id'])||{});}return null;})[_0xf7a4('0x69')](function(_0xafc57e){var _0x2f9b6b;var _0x408358;_0x3f3cea=_0xafc57e||[];var _0xfdc4bb=[];if(_0xafc57e){for(var _0x2240db=0x0;_0x2240db<_0xafc57e[_0xf7a4('0x46')];_0x2240db+=0x1){var _0x569228=_0xafc57e[_0x2240db]['get']({'plain':!![]});_0x2f9b6b=squel[_0xf7a4('0x6b')]()[_0xf7a4('0x6c')]('cm_hopper_black')[_0xf7a4('0x6e')]([_0xf7a4('0x72'),'ContactId','ListId',_0xf7a4('0x5b'),'createdAt',_0xf7a4('0x54')],squel[_0xf7a4('0x71')]()[_0xf7a4('0x73')](_0xf7a4('0x72'),'phone')['field']('id',_0xf7a4('0x70'))[_0xf7a4('0x73')](_0x569228[_0xf7a4('0x79')]['toString'](),_0xf7a4('0x75'))['field'](_0x5a842d['params']['id']['toString'](),_0xf7a4('0x5b'))[_0xf7a4('0x73')]('NOW()',_0xf7a4('0x53'))[_0xf7a4('0x73')]('NOW()',_0xf7a4('0x54'))[_0xf7a4('0x77')]('cm_contacts')[_0xf7a4('0x3b')](_0xf7a4('0x78'))[_0xf7a4('0x3b')](_0xf7a4('0x80'),_0x569228[_0xf7a4('0x79')][_0xf7a4('0x76')]())[_0xf7a4('0x3b')](_0xf7a4('0x7a')))[_0xf7a4('0x76')]();_0xfdc4bb[_0xf7a4('0x8c')](db['sequelize'][_0xf7a4('0x32')](_0x2f9b6b));}return BPromise[_0xf7a4('0x91')](_0xfdc4bb);}})[_0xf7a4('0x24')](function(){return _0x3f3cea;})[_0xf7a4('0x24')](respondWithResult(_0x1c7a84,null))['catch'](handleError(_0x1c7a84,null));};exports['removeBlackLists']=function(_0x54b2fb,_0x4f2dcb,_0x59016f){return db[_0xf7a4('0x2e')][_0xf7a4('0x47')]({'where':{'id':_0x54b2fb['params']['id']}})[_0xf7a4('0x24')](handleEntityNotFound(_0x4f2dcb,null))['then'](function(_0x373eb6){if(_0x373eb6){return _0x373eb6[_0xf7a4('0x92')](_0x54b2fb[_0xf7a4('0x32')][_0xf7a4('0x68')]);}})[_0xf7a4('0x24')](function(_0x540512){if(_0x540512){return db[_0xf7a4('0x62')][_0xf7a4('0x25')]({'where':{'ListId':_0x54b2fb[_0xf7a4('0x32')]['ids'],'CampaignId':_0x54b2fb[_0xf7a4('0x45')]['id']}})[_0xf7a4('0x24')](function(){return _0x540512;});}})[_0xf7a4('0x24')](respondWithStatusCode(_0x4f2dcb,null))[_0xf7a4('0x55')](handleError(_0x4f2dcb,null));};
\ No newline at end of file
index 033d84f..ad5b338 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(_0x493030,_0x29ec7e){var _0x56f5e4=function(_0xb929a1){while(--_0xb929a1){_0x493030['push'](_0x493030['shift']());}};_0x56f5e4(++_0x29ec7e);}(_0x7a54,0x106));var _0x47a5=function(_0x3dd33e,_0xdee545){_0x3dd33e=_0x3dd33e-0x0;var _0x593e3f=_0x7a54[_0x3dd33e];return _0x593e3f;};'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 _0x7a54=['../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./campaign.attributes','exports','Campaign','campaigns','lodash','util'];(function(_0x504dee,_0x3cefd3){var _0x3fb6c0=function(_0x188524){while(--_0x188524){_0x504dee['push'](_0x504dee['shift']());}};_0x3fb6c0(++_0x3cefd3);}(_0x7a54,0x106));var _0x47a5=function(_0x546555,_0x2344d4){_0x546555=_0x546555-0x0;var _0x24c347=_0x7a54[_0x546555];return _0x24c347;};'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
index 1604416..ba5fd60 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb18e=['attributes','moment','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Campaign,\x20%s,\x20%s','request\x20sent','debug','Campaign,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','GetCampaign','Campaign','findAll','options','raw','where','limit','include','map','model'];(function(_0xe1b5f6,_0x210c09){var _0x44636e=function(_0x3a3212){while(--_0x3a3212){_0xe1b5f6['push'](_0xe1b5f6['shift']());}};_0x44636e(++_0x210c09);}(_0xb18e,0x181));var _0xeb18=function(_0x569caa,_0x5174ce){_0x569caa=_0x569caa-0x0;var _0x44cb5a=_0xb18e[_0x569caa];return _0x44cb5a;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xeb18('0x0'));var BPromise=require('bluebird');var rs=require(_0xeb18('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xeb18('0x2'))['db'];var utils=require(_0xeb18('0x3'));var logger=require('../../config/logger')(_0xeb18('0x4'));var config=require(_0xeb18('0x5'));var jayson=require(_0xeb18('0x6'));var client=jayson[_0xeb18('0x7')][_0xeb18('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x183bdf,_0x4a9ddd,_0x1bc3ee){return new BPromise(function(_0x131389,_0x534358){return client[_0xeb18('0x9')](_0x183bdf,_0x1bc3ee)[_0xeb18('0xa')](function(_0x942945){logger[_0xeb18('0xb')](_0xeb18('0xc'),_0x4a9ddd,_0xeb18('0xd'));logger[_0xeb18('0xe')](_0xeb18('0xf'),_0x4a9ddd,_0xeb18('0xd'),JSON[_0xeb18('0x10')](_0x942945));if(_0x942945['error']){if(_0x942945[_0xeb18('0x11')][_0xeb18('0x12')]===0x1f4){logger['error'](_0xeb18('0xc'),_0x4a9ddd,_0x942945['error']['message']);return _0x534358(_0x942945[_0xeb18('0x11')][_0xeb18('0x13')]);}logger[_0xeb18('0x11')]('Campaign,\x20%s,\x20%s',_0x4a9ddd,_0x942945['error'][_0xeb18('0x13')]);return _0x131389(_0x942945[_0xeb18('0x11')]['message']);}else{logger[_0xeb18('0xb')](_0xeb18('0xc'),_0x4a9ddd,_0xeb18('0xd'));_0x131389(_0x942945['result'][_0xeb18('0x13')]);}})[_0xeb18('0x14')](function(_0x318043){logger[_0xeb18('0x11')](_0xeb18('0xc'),_0x4a9ddd,_0x318043);_0x534358(_0x318043);});});}exports[_0xeb18('0x15')]=function(_0x284733){var _0x5bc586=this;return new Promise(function(_0x30f706,_0x5c4adc){return db[_0xeb18('0x16')][_0xeb18('0x17')]({'raw':_0x284733[_0xeb18('0x18')]?_0x284733[_0xeb18('0x18')][_0xeb18('0x19')]===undefined?!![]:![]:!![],'where':_0x284733['options']?_0x284733[_0xeb18('0x18')][_0xeb18('0x1a')]||null:null,'attributes':_0x284733[_0xeb18('0x18')]?_0x284733[_0xeb18('0x18')]['attributes']||null:null,'limit':_0x284733[_0xeb18('0x18')]?_0x284733[_0xeb18('0x18')][_0xeb18('0x1b')]||null:null,'include':_0x284733[_0xeb18('0x18')]?_0x284733[_0xeb18('0x18')][_0xeb18('0x1c')]?_[_0xeb18('0x1d')](_0x284733[_0xeb18('0x18')][_0xeb18('0x1c')],function(_0x7464fd){return{'model':db[_0x7464fd[_0xeb18('0x1e')]],'as':_0x7464fd['as'],'attributes':_0x7464fd[_0xeb18('0x1f')],'include':_0x7464fd['include']?_[_0xeb18('0x1d')](_0x7464fd['include'],function(_0x51867f){return{'model':db[_0x51867f[_0xeb18('0x1e')]],'as':_0x51867f['as'],'attributes':_0x51867f[_0xeb18('0x1f')],'include':_0x51867f[_0xeb18('0x1c')]?_[_0xeb18('0x1d')](_0x51867f[_0xeb18('0x1c')],function(_0x48d10b){return{'model':db[_0x48d10b['model']],'as':_0x48d10b['as'],'attributes':_0x48d10b[_0xeb18('0x1f')]};}):[]};}):[]};}):[]:[]})[_0xeb18('0xa')](function(_0x3312d8){logger['info'](_0xeb18('0x15'),_0x284733);logger[_0xeb18('0xe')]('GetCampaign',_0x284733,JSON[_0xeb18('0x10')](_0x3312d8));_0x30f706(_0x3312d8);})['catch'](function(_0x54e62b){logger['error']('GetCampaign',_0x54e62b['message'],_0x284733);_0x5c4adc(_0x5bc586[_0xeb18('0x11')](0x1f4,_0x54e62b[_0xeb18('0x13')]));});});};
\ No newline at end of file
+var _0xacfe=['where','attributes','limit','map','include','model','then','GetCampaign','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','Campaign,\x20%s,\x20%s','request\x20sent','debug','Campaign,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','findAll','options','raw'];(function(_0x5f3f88,_0x562baf){var _0xd08119=function(_0x42dbf7){while(--_0x42dbf7){_0x5f3f88['push'](_0x5f3f88['shift']());}};_0xd08119(++_0x562baf);}(_0xacfe,0xfd));var _0xeacf=function(_0x15bc81,_0x4d4f77){_0x15bc81=_0x15bc81-0x0;var _0x59440e=_0xacfe[_0x15bc81];return _0x59440e;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xeacf('0x0'));var BPromise=require(_0xeacf('0x1'));var rs=require(_0xeacf('0x2'));var fs=require('fs');var Redis=require(_0xeacf('0x3'));var db=require(_0xeacf('0x4'))['db'];var utils=require(_0xeacf('0x5'));var logger=require(_0xeacf('0x6'))(_0xeacf('0x7'));var config=require(_0xeacf('0x8'));var jayson=require(_0xeacf('0x9'));var client=jayson[_0xeacf('0xa')][_0xeacf('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x13cba2,_0x5eb516,_0x411634){return new BPromise(function(_0xce0437,_0x17b21c){return client[_0xeacf('0xc')](_0x13cba2,_0x411634)['then'](function(_0xfe344){logger['info'](_0xeacf('0xd'),_0x5eb516,_0xeacf('0xe'));logger[_0xeacf('0xf')](_0xeacf('0x10'),_0x5eb516,_0xeacf('0xe'),JSON[_0xeacf('0x11')](_0xfe344));if(_0xfe344[_0xeacf('0x12')]){if(_0xfe344[_0xeacf('0x12')][_0xeacf('0x13')]===0x1f4){logger[_0xeacf('0x12')]('Campaign,\x20%s,\x20%s',_0x5eb516,_0xfe344[_0xeacf('0x12')][_0xeacf('0x14')]);return _0x17b21c(_0xfe344[_0xeacf('0x12')][_0xeacf('0x14')]);}logger['error'](_0xeacf('0xd'),_0x5eb516,_0xfe344[_0xeacf('0x12')][_0xeacf('0x14')]);return _0xce0437(_0xfe344['error']['message']);}else{logger[_0xeacf('0x15')](_0xeacf('0xd'),_0x5eb516,'request\x20sent');_0xce0437(_0xfe344[_0xeacf('0x16')]['message']);}})[_0xeacf('0x17')](function(_0x1df080){logger['error'](_0xeacf('0xd'),_0x5eb516,_0x1df080);_0x17b21c(_0x1df080);});});}exports['GetCampaign']=function(_0x650730){var _0xe87314=this;return new Promise(function(_0x18de20,_0x118932){return db['Campaign'][_0xeacf('0x18')]({'raw':_0x650730['options']?_0x650730[_0xeacf('0x19')][_0xeacf('0x1a')]===undefined?!![]:![]:!![],'where':_0x650730[_0xeacf('0x19')]?_0x650730['options'][_0xeacf('0x1b')]||null:null,'attributes':_0x650730[_0xeacf('0x19')]?_0x650730[_0xeacf('0x19')][_0xeacf('0x1c')]||null:null,'limit':_0x650730[_0xeacf('0x19')]?_0x650730[_0xeacf('0x19')][_0xeacf('0x1d')]||null:null,'include':_0x650730[_0xeacf('0x19')]?_0x650730[_0xeacf('0x19')]['include']?_[_0xeacf('0x1e')](_0x650730[_0xeacf('0x19')][_0xeacf('0x1f')],function(_0x35338b){return{'model':db[_0x35338b[_0xeacf('0x20')]],'as':_0x35338b['as'],'attributes':_0x35338b[_0xeacf('0x1c')],'include':_0x35338b[_0xeacf('0x1f')]?_['map'](_0x35338b['include'],function(_0x4332b7){return{'model':db[_0x4332b7[_0xeacf('0x20')]],'as':_0x4332b7['as'],'attributes':_0x4332b7['attributes'],'include':_0x4332b7[_0xeacf('0x1f')]?_[_0xeacf('0x1e')](_0x4332b7[_0xeacf('0x1f')],function(_0x1e368a){return{'model':db[_0x1e368a['model']],'as':_0x1e368a['as'],'attributes':_0x1e368a[_0xeacf('0x1c')]};}):[]};}):[]};}):[]:[]})[_0xeacf('0x21')](function(_0x4c161e){logger[_0xeacf('0x15')](_0xeacf('0x22'),_0x650730);logger[_0xeacf('0xf')](_0xeacf('0x22'),_0x650730,JSON['stringify'](_0x4c161e));_0x18de20(_0x4c161e);})[_0xeacf('0x17')](function(_0x1d375a){logger['error']('GetCampaign',_0x1d375a['message'],_0x650730);_0x118932(_0xe87314['error'](0x1f4,_0x1d375a[_0xeacf('0x14')]));});});};
\ No newline at end of file
index d4eabdf..85094b1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb7ec=['/:id/hopper_black','/:id/lists','getLists','post','/:id/clone','clone','addLists','/:id/blacklists','put','update','destroy','delete','removeBlackLists','exports','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./campaign.controller','get','isAuthenticated','index','/:id','show','/:id/hoppers','getHoppers','/:id/hopper_histories','/:id/hopper_finals','getHopperFinals'];(function(_0x54dc2,_0xa77a2f){var _0x1ca1b4=function(_0x169cce){while(--_0x169cce){_0x54dc2['push'](_0x54dc2['shift']());}};_0x1ca1b4(++_0xa77a2f);}(_0xb7ec,0x137));var _0xcb7e=function(_0x418321,_0x52b4f1){_0x418321=_0x418321-0x0;var _0x402cbd=_0xb7ec[_0x418321];return _0x402cbd;};'use strict';var multer=require('multer');var util=require(_0xcb7e('0x0'));var path=require(_0xcb7e('0x1'));var timeout=require(_0xcb7e('0x2'));var express=require(_0xcb7e('0x3'));var router=express[_0xcb7e('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xcb7e('0x5'));var interaction=require(_0xcb7e('0x6'));var config=require(_0xcb7e('0x7'));var controller=require(_0xcb7e('0x8'));router[_0xcb7e('0x9')]('/',auth[_0xcb7e('0xa')](),controller[_0xcb7e('0xb')]);router['get'](_0xcb7e('0xc'),auth['isAuthenticated'](),controller[_0xcb7e('0xd')]);router[_0xcb7e('0x9')](_0xcb7e('0xe'),auth['isAuthenticated'](),controller[_0xcb7e('0xf')]);router[_0xcb7e('0x9')](_0xcb7e('0x10'),auth['isAuthenticated'](),controller['getHopperHistories']);router['get'](_0xcb7e('0x11'),auth[_0xcb7e('0xa')](),controller[_0xcb7e('0x12')]);router[_0xcb7e('0x9')](_0xcb7e('0x13'),auth['isAuthenticated'](),controller['getHopperBlacks']);router['get'](_0xcb7e('0x14'),auth['isAuthenticated'](),controller[_0xcb7e('0x15')]);router[_0xcb7e('0x9')]('/:id/blacklists',auth['isAuthenticated'](),controller['getBlackLists']);router[_0xcb7e('0x16')]('/',auth[_0xcb7e('0xa')](),controller['create']);router[_0xcb7e('0x16')](_0xcb7e('0x17'),auth['isAuthenticated'](),controller[_0xcb7e('0x18')]);router[_0xcb7e('0x16')]('/:id/lists',auth['isAuthenticated'](),controller[_0xcb7e('0x19')]);router[_0xcb7e('0x16')](_0xcb7e('0x1a'),auth[_0xcb7e('0xa')](),controller['addBlackLists']);router[_0xcb7e('0x1b')](_0xcb7e('0xc'),auth[_0xcb7e('0xa')](),controller[_0xcb7e('0x1c')]);router['delete'](_0xcb7e('0xc'),auth[_0xcb7e('0xa')](),controller[_0xcb7e('0x1d')]);router[_0xcb7e('0x1e')](_0xcb7e('0x14'),auth[_0xcb7e('0xa')](),controller['removeLists']);router[_0xcb7e('0x1e')](_0xcb7e('0x1a'),auth['isAuthenticated'](),controller[_0xcb7e('0x1f')]);module[_0xcb7e('0x20')]=router;
\ No newline at end of file
+var _0x141a=['getHopperFinals','/:id/hopper_black','getHopperBlacks','/:id/lists','/:id/blacklists','post','create','/:id/clone','addBlackLists','put','update','delete','destroy','removeLists','removeBlackLists','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./campaign.controller','get','isAuthenticated','/:id','show','/:id/hoppers','getHoppers','/:id/hopper_histories','getHopperHistories','/:id/hopper_finals'];(function(_0xee397d,_0x5cf526){var _0x1ec970=function(_0x4c2771){while(--_0x4c2771){_0xee397d['push'](_0xee397d['shift']());}};_0x1ec970(++_0x5cf526);}(_0x141a,0xfd));var _0xa141=function(_0x1e797a,_0x2ef1be){_0x1e797a=_0x1e797a-0x0;var _0x3ffe38=_0x141a[_0x1e797a];return _0x3ffe38;};'use strict';var multer=require(_0xa141('0x0'));var util=require(_0xa141('0x1'));var path=require('path');var timeout=require(_0xa141('0x2'));var express=require(_0xa141('0x3'));var router=express[_0xa141('0x4')]();var fs_extra=require(_0xa141('0x5'));var auth=require(_0xa141('0x6'));var interaction=require(_0xa141('0x7'));var config=require(_0xa141('0x8'));var controller=require(_0xa141('0x9'));router[_0xa141('0xa')]('/',auth[_0xa141('0xb')](),controller['index']);router[_0xa141('0xa')](_0xa141('0xc'),auth[_0xa141('0xb')](),controller[_0xa141('0xd')]);router['get'](_0xa141('0xe'),auth[_0xa141('0xb')](),controller[_0xa141('0xf')]);router[_0xa141('0xa')](_0xa141('0x10'),auth[_0xa141('0xb')](),controller[_0xa141('0x11')]);router[_0xa141('0xa')](_0xa141('0x12'),auth['isAuthenticated'](),controller[_0xa141('0x13')]);router[_0xa141('0xa')](_0xa141('0x14'),auth[_0xa141('0xb')](),controller[_0xa141('0x15')]);router['get'](_0xa141('0x16'),auth['isAuthenticated'](),controller['getLists']);router[_0xa141('0xa')](_0xa141('0x17'),auth[_0xa141('0xb')](),controller['getBlackLists']);router[_0xa141('0x18')]('/',auth['isAuthenticated'](),controller[_0xa141('0x19')]);router['post'](_0xa141('0x1a'),auth[_0xa141('0xb')](),controller['clone']);router['post'](_0xa141('0x16'),auth[_0xa141('0xb')](),controller['addLists']);router['post'](_0xa141('0x17'),auth['isAuthenticated'](),controller[_0xa141('0x1b')]);router[_0xa141('0x1c')](_0xa141('0xc'),auth['isAuthenticated'](),controller[_0xa141('0x1d')]);router[_0xa141('0x1e')](_0xa141('0xc'),auth['isAuthenticated'](),controller[_0xa141('0x1f')]);router[_0xa141('0x1e')](_0xa141('0x16'),auth[_0xa141('0xb')](),controller[_0xa141('0x20')]);router[_0xa141('0x1e')](_0xa141('0x17'),auth[_0xa141('0xb')](),controller[_0xa141('0x21')]);module['exports']=router;
\ No newline at end of file
index 3fb5b70..e236220 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd38e=['medium','VIRTUAL','getDataValue','key','exports','TEXT'];(function(_0x584ca7,_0x13614b){var _0x4bfd18=function(_0x2a6bb3){while(--_0x2a6bb3){_0x584ca7['push'](_0x584ca7['shift']());}};_0x4bfd18(++_0x13614b);}(_0xd38e,0x196));var _0xed38=function(_0x33051f,_0x490726){_0x33051f=_0x33051f-0x0;var _0xf6e53b=_0xd38e[_0x33051f];return _0xf6e53b;};'use strict';var Sequelize=require('sequelize');module[_0xed38('0x0')]={'key':{'type':Sequelize['STRING'],'allowNull':![]},'value':{'type':Sequelize[_0xed38('0x1')],'length':_0xed38('0x2'),'allowNull':![]},'description':{'type':Sequelize['STRING']},'name':{'type':Sequelize[_0xed38('0x3')],'get':function(){return this[_0xed38('0x4')](_0xed38('0x5'));}}};
\ No newline at end of file
+var _0x2f99=['STRING','TEXT','VIRTUAL','getDataValue','sequelize'];(function(_0x23d946,_0x4e3420){var _0x4699be=function(_0x54ea70){while(--_0x54ea70){_0x23d946['push'](_0x23d946['shift']());}};_0x4699be(++_0x4e3420);}(_0x2f99,0x1f3));var _0x92f9=function(_0x137d0a,_0x5e2ba2){_0x137d0a=_0x137d0a-0x0;var _0x3d4f4e=_0x2f99[_0x137d0a];return _0x3d4f4e;};'use strict';var Sequelize=require(_0x92f9('0x0'));module['exports']={'key':{'type':Sequelize[_0x92f9('0x1')],'allowNull':![]},'value':{'type':Sequelize[_0x92f9('0x2')],'length':'medium','allowNull':![]},'description':{'type':Sequelize[_0x92f9('0x1')]},'name':{'type':Sequelize[_0x92f9('0x3')],'get':function(){return this[_0x92f9('0x4')]('key');}}};
\ No newline at end of file
index f32c9bb..e531769 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0e83=['model','query','keys','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filters','pick','filter','merge','options','includeAll','findAll','catch','show','params','include','find','body','MailAccountId','SmsAccountId','OpenchannelAccountId','ChatWebsiteId','ValidationError','The\x20inserted\x20key\x20already\x20exists.','create','user','get','role','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','to-csv','ejs','squel','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../mysqldb','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','destroy','CannedAnswers','UserProfileResource','then','sendStatus','error','name','map','CannedAnswer','rawAttributes','fieldName','type','key'];(function(_0xfa634c,_0x414e0e){var _0x73e478=function(_0xac2a51){while(--_0xac2a51){_0xfa634c['push'](_0xfa634c['shift']());}};_0x73e478(++_0x414e0e);}(_0x0e83,0x1ba));var _0x30e8=function(_0xaa1b3e,_0x47d976){_0xaa1b3e=_0xaa1b3e-0x0;var _0x454d7d=_0x0e83[_0xaa1b3e];return _0x454d7d;};'use strict';var emlformat=require(_0x30e8('0x0'));var rimraf=require(_0x30e8('0x1'));var zipdir=require(_0x30e8('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x30e8('0x3'));var moment=require(_0x30e8('0x4'));var BPromise=require(_0x30e8('0x5'));var Mustache=require(_0x30e8('0x6'));var util=require(_0x30e8('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0x30e8('0x8'));var ejs=require(_0x30e8('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x30e8('0xa'));var crypto=require('crypto');var jsforce=require(_0x30e8('0xb'));var deskjs=require(_0x30e8('0xc'));var toCsv=require('to-csv');var querystring=require(_0x30e8('0xd'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x30e8('0xe'));var qs=require('../../components/parsers/qs');var as=require(_0x30e8('0xf'));var hardwareService=require(_0x30e8('0x10'));var logger=require(_0x30e8('0x11'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x30e8('0x12'))['db'];function respondWithStatusCode(_0x1e06e9,_0x5677ac){_0x5677ac=_0x5677ac||0xcc;return function(_0x20b2c3){if(_0x20b2c3){return _0x1e06e9['sendStatus'](_0x5677ac);}return _0x1e06e9[_0x30e8('0x13')](_0x5677ac)[_0x30e8('0x14')]();};}function respondWithResult(_0xf477bb,_0x55f593){_0x55f593=_0x55f593||0xc8;return function(_0xe71a40){if(_0xe71a40){return _0xf477bb['status'](_0x55f593)[_0x30e8('0x15')](_0xe71a40);}};}function respondWithFilteredResult(_0x29c250,_0x19a658){return function(_0x4d9b6f){if(_0x4d9b6f){var _0x4b5cf4=typeof _0x19a658[_0x30e8('0x16')]===_0x30e8('0x17')&&typeof _0x19a658[_0x30e8('0x18')]===_0x30e8('0x17');var _0x5e4c5e=_0x4d9b6f[_0x30e8('0x19')];var _0x542c63=_0x4b5cf4?0x0:_0x19a658[_0x30e8('0x16')];var _0x486cbd=_0x4b5cf4?_0x4d9b6f[_0x30e8('0x19')]:_0x19a658[_0x30e8('0x16')]+_0x19a658[_0x30e8('0x18')];var _0x1d91a1;if(_0x486cbd>=_0x5e4c5e){_0x486cbd=_0x5e4c5e;_0x1d91a1=0xc8;}else{_0x1d91a1=0xce;}_0x29c250[_0x30e8('0x13')](_0x1d91a1);return _0x29c250['set'](_0x30e8('0x1a'),_0x542c63+'-'+_0x486cbd+'/'+_0x5e4c5e)['json'](_0x4d9b6f);}return null;};}function patchUpdates(_0x325d69){return function(_0x433ecf){try{jsonpatch[_0x30e8('0x1b')](_0x433ecf,_0x325d69,!![]);}catch(_0x51650b){return BPromise[_0x30e8('0x1c')](_0x51650b);}return _0x433ecf[_0x30e8('0x1d')]();};}function saveUpdates(_0x591d6f,_0x3311c3){return function(_0x3100bc){if(_0x3100bc){return _0x3100bc[_0x30e8('0x1e')](_0x591d6f)['then'](function(_0x1f9b7d){return _0x1f9b7d;});}return null;};}function removeEntity(_0xfc99fb,_0x5ecc2f){return function(_0x4711f8){if(_0x4711f8){return _0x4711f8[_0x30e8('0x1f')]()['then'](function(){var _0x4980f4=_0x4711f8['get']({'plain':!![]});var _0x24a34e=_0x30e8('0x20');return db[_0x30e8('0x21')]['destroy']({'where':{'type':_0x24a34e,'resourceId':_0x4980f4['id']}})[_0x30e8('0x22')](function(){return _0x4711f8;});})[_0x30e8('0x22')](function(){_0xfc99fb[_0x30e8('0x13')](0xcc)[_0x30e8('0x14')]();});}};}function handleEntityNotFound(_0x199160,_0x3547ae){return function(_0x303506){if(!_0x303506){_0x199160[_0x30e8('0x23')](0x194);}return _0x303506;};}function handleError(_0x51ffda,_0x23ed90){_0x23ed90=_0x23ed90||0x1f4;return function(_0x400920){logger[_0x30e8('0x24')](_0x400920['stack']);if(_0x400920[_0x30e8('0x25')]){delete _0x400920[_0x30e8('0x25')];}_0x51ffda[_0x30e8('0x13')](_0x23ed90)['send'](_0x400920);};}exports['index']=function(_0x421142,_0x1fa0d6){var _0x929dbe={},_0x2b7a5e={},_0x1362a9={'count':0x0,'rows':[]};var _0x40418a=_[_0x30e8('0x26')](db[_0x30e8('0x27')][_0x30e8('0x28')],function(_0x29e113){return{'name':_0x29e113[_0x30e8('0x29')],'type':_0x29e113[_0x30e8('0x2a')][_0x30e8('0x2b')]};});_0x2b7a5e[_0x30e8('0x2c')]=_[_0x30e8('0x26')](_0x40418a,'name');_0x2b7a5e[_0x30e8('0x2d')]=_[_0x30e8('0x2e')](_0x421142[_0x30e8('0x2d')]);_0x2b7a5e['filters']=_[_0x30e8('0x2f')](_0x2b7a5e[_0x30e8('0x2c')],_0x2b7a5e[_0x30e8('0x2d')]);_0x929dbe[_0x30e8('0x30')]=_[_0x30e8('0x2f')](_0x2b7a5e[_0x30e8('0x2c')],qs[_0x30e8('0x31')](_0x421142[_0x30e8('0x2d')]['fields']));_0x929dbe[_0x30e8('0x30')]=_0x929dbe[_0x30e8('0x30')][_0x30e8('0x32')]?_0x929dbe[_0x30e8('0x30')]:_0x2b7a5e[_0x30e8('0x2c')];if(!_0x421142[_0x30e8('0x2d')][_0x30e8('0x33')]('nolimit')){_0x929dbe[_0x30e8('0x18')]=qs[_0x30e8('0x18')](_0x421142[_0x30e8('0x2d')]['limit']);_0x929dbe[_0x30e8('0x16')]=qs[_0x30e8('0x16')](_0x421142['query'][_0x30e8('0x16')]);}_0x929dbe[_0x30e8('0x34')]=qs[_0x30e8('0x35')](_0x421142[_0x30e8('0x2d')]['sort']);_0x929dbe[_0x30e8('0x36')]=qs[_0x30e8('0x37')](_[_0x30e8('0x38')](_0x421142[_0x30e8('0x2d')],_0x2b7a5e[_0x30e8('0x37')]),_0x40418a);if(_0x421142['query'][_0x30e8('0x39')]){_0x929dbe[_0x30e8('0x36')]=_[_0x30e8('0x3a')](_0x929dbe[_0x30e8('0x36')],{'$or':[{'key':{'$like':'%'+_0x421142[_0x30e8('0x2d')][_0x30e8('0x39')]+'%'}},{'value':{'$like':'%'+_0x421142[_0x30e8('0x2d')][_0x30e8('0x39')]+'%'}}]});}_0x929dbe=_[_0x30e8('0x3a')]({},_0x929dbe,_0x421142[_0x30e8('0x3b')]);var _0x4262c7={'where':_0x929dbe[_0x30e8('0x36')]};return db[_0x30e8('0x27')][_0x30e8('0x19')](_0x4262c7)[_0x30e8('0x22')](function(_0x22f882){_0x1362a9[_0x30e8('0x19')]=_0x22f882;if(_0x421142[_0x30e8('0x2d')][_0x30e8('0x3c')]){_0x929dbe['include']=[{'all':!![]}];}return db[_0x30e8('0x27')][_0x30e8('0x3d')](_0x929dbe);})[_0x30e8('0x22')](function(_0x3ad06e){_0x1362a9['rows']=_0x3ad06e;return _0x1362a9;})[_0x30e8('0x22')](respondWithFilteredResult(_0x1fa0d6,_0x929dbe))[_0x30e8('0x3e')](handleError(_0x1fa0d6,null));};exports[_0x30e8('0x3f')]=function(_0x20cc57,_0x437fea){var _0xde720={'raw':!![],'where':{'id':_0x20cc57[_0x30e8('0x40')]['id']}},_0x28e25c={};_0x28e25c[_0x30e8('0x2c')]=_[_0x30e8('0x2e')](db[_0x30e8('0x27')]['rawAttributes']);_0x28e25c[_0x30e8('0x2d')]=_[_0x30e8('0x2e')](_0x20cc57['query']);_0x28e25c[_0x30e8('0x37')]=_[_0x30e8('0x2f')](_0x28e25c['model'],_0x28e25c[_0x30e8('0x2d')]);_0xde720[_0x30e8('0x30')]=_[_0x30e8('0x2f')](_0x28e25c['model'],qs[_0x30e8('0x31')](_0x20cc57[_0x30e8('0x2d')]['fields']));_0xde720['attributes']=_0xde720['attributes'][_0x30e8('0x32')]?_0xde720[_0x30e8('0x30')]:_0x28e25c[_0x30e8('0x2c')];if(_0x20cc57[_0x30e8('0x2d')]['includeAll']){_0xde720[_0x30e8('0x41')]=[{'all':!![]}];}_0xde720=_[_0x30e8('0x3a')]({},_0xde720,_0x20cc57['options']);return db['CannedAnswer'][_0x30e8('0x42')](_0xde720)[_0x30e8('0x22')](handleEntityNotFound(_0x437fea,null))[_0x30e8('0x22')](respondWithResult(_0x437fea,null))['catch'](handleError(_0x437fea,null));};exports[_0x30e8('0x1e')]=function(_0x4c8884,_0x56614a){if(_0x4c8884[_0x30e8('0x43')]['id']){delete _0x4c8884[_0x30e8('0x43')]['id'];}return db[_0x30e8('0x27')][_0x30e8('0x42')]({'where':{'id':_0x4c8884[_0x30e8('0x40')]['id']}})[_0x30e8('0x22')](handleEntityNotFound(_0x56614a,null))['then'](saveUpdates(_0x4c8884['body'],null))[_0x30e8('0x22')](respondWithResult(_0x56614a,null))['catch'](handleError(_0x56614a,null));};exports[_0x30e8('0x1f')]=function(_0x55ef2f,_0x232dab){return db[_0x30e8('0x27')][_0x30e8('0x42')]({'where':{'id':_0x55ef2f['params']['id']}})[_0x30e8('0x22')](handleEntityNotFound(_0x232dab,null))[_0x30e8('0x22')](removeEntity(_0x232dab,null))[_0x30e8('0x3e')](handleError(_0x232dab,null));};exports['create']=function(_0x2381c6,_0xf7c73b){var _0x2a1c74={'key':_0x2381c6['body'][_0x30e8('0x2b')]};if(_0x2381c6['body']['MailAccountId']){_0x2a1c74['MailAccountId']=_0x2381c6['body'][_0x30e8('0x44')];}else if(_0x2381c6['body'][_0x30e8('0x45')]){_0x2a1c74[_0x30e8('0x45')]=_0x2381c6[_0x30e8('0x43')][_0x30e8('0x45')];}else if(_0x2381c6['body'][_0x30e8('0x46')]){_0x2a1c74[_0x30e8('0x46')]=_0x2381c6[_0x30e8('0x43')]['OpenchannelAccountId'];}else if(_0x2381c6[_0x30e8('0x43')][_0x30e8('0x47')]){_0x2a1c74[_0x30e8('0x47')]=_0x2381c6[_0x30e8('0x43')]['ChatWebsiteId'];}return db['CannedAnswer'][_0x30e8('0x42')]({'where':_0x2a1c74})[_0x30e8('0x22')](function(_0x4a4b96){if(_0x4a4b96){throw new db['Sequelize'][(_0x30e8('0x48'))](_0x30e8('0x49'));}return db[_0x30e8('0x27')][_0x30e8('0x4a')](_0x2381c6[_0x30e8('0x43')]);})['then'](function(_0x5b4f99){var _0x47d52a=_0x2381c6[_0x30e8('0x4b')][_0x30e8('0x4c')]({'plain':!![]});if(!_0x47d52a)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x47d52a[_0x30e8('0x4d')]===_0x30e8('0x4b')){var _0x2d4ac2=_0x5b4f99['get']({'plain':!![]});return db[_0x30e8('0x4e')][_0x30e8('0x42')]({'where':{'name':_0x30e8('0x20'),'userProfileId':_0x47d52a['userProfileId']},'raw':!![]})['then'](function(_0x51361f){if(_0x51361f&&_0x51361f[_0x30e8('0x4f')]===0x0){return db['UserProfileResource'][_0x30e8('0x4a')]({'name':_0x2d4ac2[_0x30e8('0x25')],'resourceId':_0x2d4ac2['id'],'type':_0x51361f[_0x30e8('0x25')],'sectionId':_0x51361f['id']},{})[_0x30e8('0x22')](function(){return _0x5b4f99;});}else{return _0x5b4f99;}})[_0x30e8('0x3e')](function(_0x5b3d69){logger[_0x30e8('0x24')](_0x30e8('0x50'),_0x5b3d69);throw _0x5b3d69;});}return _0x5b4f99;})[_0x30e8('0x22')](respondWithResult(_0xf7c73b,0xc9))['catch'](handleError(_0xf7c73b,null));};
\ No newline at end of file
+var _0x1bac=['Sequelize','ValidationError','The\x20inserted\x20key\x20already\x20exists.','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','moment','mustache','util','to-csv','ejs','fs-extra','crypto','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','limit','undefined','offset','count','set','apply','reject','save','update','then','destroy','get','CannedAnswers','UserProfileResource','error','name','send','index','CannedAnswer','fieldName','type','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','findAll','show','params','keys','rawAttributes','includeAll','include','find','catch','body','create','key','MailAccountId','SmsAccountId','OpenchannelAccountId','ChatWebsiteId'];(function(_0x28aea5,_0x3bb12e){var _0x6a55f9=function(_0xf6ece8){while(--_0xf6ece8){_0x28aea5['push'](_0x28aea5['shift']());}};_0x6a55f9(++_0x3bb12e);}(_0x1bac,0x1bc));var _0xc1ba=function(_0x11f93c,_0x55ef26){_0x11f93c=_0x11f93c-0x0;var _0x4cb995=_0x1bac[_0x11f93c];return _0x4cb995;};'use strict';var emlformat=require(_0xc1ba('0x0'));var rimraf=require(_0xc1ba('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xc1ba('0x2'));var rp=require(_0xc1ba('0x3'));var moment=require(_0xc1ba('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xc1ba('0x5'));var util=require(_0xc1ba('0x6'));var path=require('path');var sox=require('sox');var csv=require(_0xc1ba('0x7'));var ejs=require(_0xc1ba('0x8'));var fs=require('fs');var fs_extra=require(_0xc1ba('0x9'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xc1ba('0xa'));var jsforce=require('jsforce');var deskjs=require(_0xc1ba('0xb'));var toCsv=require(_0xc1ba('0x7'));var querystring=require(_0xc1ba('0xc'));var Papa=require(_0xc1ba('0xd'));var Redis=require(_0xc1ba('0xe'));var authService=require('../../components/auth/service');var qs=require(_0xc1ba('0xf'));var as=require(_0xc1ba('0x10'));var hardwareService=require(_0xc1ba('0x11'));var logger=require('../../config/logger')(_0xc1ba('0x12'));var utils=require(_0xc1ba('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0xc1ba('0x14'));var db=require(_0xc1ba('0x15'))['db'];function respondWithStatusCode(_0x55cab7,_0x310576){_0x310576=_0x310576||0xcc;return function(_0x1f428c){if(_0x1f428c){return _0x55cab7[_0xc1ba('0x16')](_0x310576);}return _0x55cab7[_0xc1ba('0x17')](_0x310576)[_0xc1ba('0x18')]();};}function respondWithResult(_0x6e28c1,_0x2031f3){_0x2031f3=_0x2031f3||0xc8;return function(_0x1111e4){if(_0x1111e4){return _0x6e28c1['status'](_0x2031f3)[_0xc1ba('0x19')](_0x1111e4);}};}function respondWithFilteredResult(_0x43cda1,_0x375d89){return function(_0x3309b4){if(_0x3309b4){var _0x243dd0=typeof _0x375d89['offset']==='undefined'&&typeof _0x375d89[_0xc1ba('0x1a')]===_0xc1ba('0x1b');var _0x5674e5=_0x3309b4['count'];var _0x35878e=_0x243dd0?0x0:_0x375d89[_0xc1ba('0x1c')];var _0x2ba3d9=_0x243dd0?_0x3309b4[_0xc1ba('0x1d')]:_0x375d89[_0xc1ba('0x1c')]+_0x375d89[_0xc1ba('0x1a')];var _0x2932c2;if(_0x2ba3d9>=_0x5674e5){_0x2ba3d9=_0x5674e5;_0x2932c2=0xc8;}else{_0x2932c2=0xce;}_0x43cda1['status'](_0x2932c2);return _0x43cda1[_0xc1ba('0x1e')]('Content-Range',_0x35878e+'-'+_0x2ba3d9+'/'+_0x5674e5)[_0xc1ba('0x19')](_0x3309b4);}return null;};}function patchUpdates(_0x848b1){return function(_0x15bd12){try{jsonpatch[_0xc1ba('0x1f')](_0x15bd12,_0x848b1,!![]);}catch(_0x4384b1){return BPromise[_0xc1ba('0x20')](_0x4384b1);}return _0x15bd12[_0xc1ba('0x21')]();};}function saveUpdates(_0x2b7c3d,_0x2ff22f){return function(_0x3fda38){if(_0x3fda38){return _0x3fda38[_0xc1ba('0x22')](_0x2b7c3d)[_0xc1ba('0x23')](function(_0x3d24dd){return _0x3d24dd;});}return null;};}function removeEntity(_0x95fdf2,_0x4b9a8d){return function(_0x301d76){if(_0x301d76){return _0x301d76[_0xc1ba('0x24')]()[_0xc1ba('0x23')](function(){var _0x38e98d=_0x301d76[_0xc1ba('0x25')]({'plain':!![]});var _0x31c620=_0xc1ba('0x26');return db[_0xc1ba('0x27')][_0xc1ba('0x24')]({'where':{'type':_0x31c620,'resourceId':_0x38e98d['id']}})['then'](function(){return _0x301d76;});})[_0xc1ba('0x23')](function(){_0x95fdf2[_0xc1ba('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x46baad,_0x33b05c){return function(_0x23ea95){if(!_0x23ea95){_0x46baad[_0xc1ba('0x16')](0x194);}return _0x23ea95;};}function handleError(_0x1a381a,_0x3811ba){_0x3811ba=_0x3811ba||0x1f4;return function(_0x3f8d4c){logger[_0xc1ba('0x28')](_0x3f8d4c['stack']);if(_0x3f8d4c['name']){delete _0x3f8d4c[_0xc1ba('0x29')];}_0x1a381a[_0xc1ba('0x17')](_0x3811ba)[_0xc1ba('0x2a')](_0x3f8d4c);};}exports[_0xc1ba('0x2b')]=function(_0x2c5b04,_0x116b3b){var _0x283ae9={},_0x54ea08={},_0x5c5b41={'count':0x0,'rows':[]};var _0x65930d=_['map'](db[_0xc1ba('0x2c')]['rawAttributes'],function(_0x1a4fb9){return{'name':_0x1a4fb9[_0xc1ba('0x2d')],'type':_0x1a4fb9[_0xc1ba('0x2e')]['key']};});_0x54ea08[_0xc1ba('0x2f')]=_[_0xc1ba('0x30')](_0x65930d,_0xc1ba('0x29'));_0x54ea08[_0xc1ba('0x31')]=_['keys'](_0x2c5b04[_0xc1ba('0x31')]);_0x54ea08[_0xc1ba('0x32')]=_[_0xc1ba('0x33')](_0x54ea08[_0xc1ba('0x2f')],_0x54ea08[_0xc1ba('0x31')]);_0x283ae9[_0xc1ba('0x34')]=_[_0xc1ba('0x33')](_0x54ea08[_0xc1ba('0x2f')],qs['fields'](_0x2c5b04[_0xc1ba('0x31')][_0xc1ba('0x35')]));_0x283ae9[_0xc1ba('0x34')]=_0x283ae9[_0xc1ba('0x34')][_0xc1ba('0x36')]?_0x283ae9['attributes']:_0x54ea08[_0xc1ba('0x2f')];if(!_0x2c5b04[_0xc1ba('0x31')][_0xc1ba('0x37')]('nolimit')){_0x283ae9[_0xc1ba('0x1a')]=qs[_0xc1ba('0x1a')](_0x2c5b04['query'][_0xc1ba('0x1a')]);_0x283ae9[_0xc1ba('0x1c')]=qs[_0xc1ba('0x1c')](_0x2c5b04['query']['offset']);}_0x283ae9[_0xc1ba('0x38')]=qs[_0xc1ba('0x39')](_0x2c5b04[_0xc1ba('0x31')][_0xc1ba('0x39')]);_0x283ae9[_0xc1ba('0x3a')]=qs[_0xc1ba('0x32')](_[_0xc1ba('0x3b')](_0x2c5b04['query'],_0x54ea08[_0xc1ba('0x32')]),_0x65930d);if(_0x2c5b04[_0xc1ba('0x31')][_0xc1ba('0x3c')]){_0x283ae9[_0xc1ba('0x3a')]=_[_0xc1ba('0x3d')](_0x283ae9[_0xc1ba('0x3a')],{'$or':[{'key':{'$like':'%'+_0x2c5b04[_0xc1ba('0x31')][_0xc1ba('0x3c')]+'%'}},{'value':{'$like':'%'+_0x2c5b04[_0xc1ba('0x31')][_0xc1ba('0x3c')]+'%'}}]});}_0x283ae9=_[_0xc1ba('0x3d')]({},_0x283ae9,_0x2c5b04['options']);var _0x1d329f={'where':_0x283ae9[_0xc1ba('0x3a')]};return db['CannedAnswer'][_0xc1ba('0x1d')](_0x1d329f)['then'](function(_0x58e9dd){_0x5c5b41[_0xc1ba('0x1d')]=_0x58e9dd;if(_0x2c5b04['query']['includeAll']){_0x283ae9['include']=[{'all':!![]}];}return db['CannedAnswer'][_0xc1ba('0x3e')](_0x283ae9);})[_0xc1ba('0x23')](function(_0x152ba8){_0x5c5b41['rows']=_0x152ba8;return _0x5c5b41;})[_0xc1ba('0x23')](respondWithFilteredResult(_0x116b3b,_0x283ae9))['catch'](handleError(_0x116b3b,null));};exports[_0xc1ba('0x3f')]=function(_0x3906aa,_0x1295bf){var _0x13f5bd={'raw':!![],'where':{'id':_0x3906aa[_0xc1ba('0x40')]['id']}},_0x27826e={};_0x27826e[_0xc1ba('0x2f')]=_[_0xc1ba('0x41')](db[_0xc1ba('0x2c')][_0xc1ba('0x42')]);_0x27826e[_0xc1ba('0x31')]=_['keys'](_0x3906aa[_0xc1ba('0x31')]);_0x27826e[_0xc1ba('0x32')]=_[_0xc1ba('0x33')](_0x27826e[_0xc1ba('0x2f')],_0x27826e[_0xc1ba('0x31')]);_0x13f5bd[_0xc1ba('0x34')]=_[_0xc1ba('0x33')](_0x27826e[_0xc1ba('0x2f')],qs['fields'](_0x3906aa[_0xc1ba('0x31')][_0xc1ba('0x35')]));_0x13f5bd[_0xc1ba('0x34')]=_0x13f5bd[_0xc1ba('0x34')]['length']?_0x13f5bd['attributes']:_0x27826e['model'];if(_0x3906aa['query'][_0xc1ba('0x43')]){_0x13f5bd[_0xc1ba('0x44')]=[{'all':!![]}];}_0x13f5bd=_[_0xc1ba('0x3d')]({},_0x13f5bd,_0x3906aa['options']);return db[_0xc1ba('0x2c')][_0xc1ba('0x45')](_0x13f5bd)[_0xc1ba('0x23')](handleEntityNotFound(_0x1295bf,null))[_0xc1ba('0x23')](respondWithResult(_0x1295bf,null))[_0xc1ba('0x46')](handleError(_0x1295bf,null));};exports['update']=function(_0x2614e5,_0x4fd2f8){if(_0x2614e5[_0xc1ba('0x47')]['id']){delete _0x2614e5[_0xc1ba('0x47')]['id'];}return db[_0xc1ba('0x2c')][_0xc1ba('0x45')]({'where':{'id':_0x2614e5[_0xc1ba('0x40')]['id']}})[_0xc1ba('0x23')](handleEntityNotFound(_0x4fd2f8,null))[_0xc1ba('0x23')](saveUpdates(_0x2614e5[_0xc1ba('0x47')],null))['then'](respondWithResult(_0x4fd2f8,null))['catch'](handleError(_0x4fd2f8,null));};exports[_0xc1ba('0x24')]=function(_0x3d9993,_0x1f7fc0){return db['CannedAnswer']['find']({'where':{'id':_0x3d9993[_0xc1ba('0x40')]['id']}})[_0xc1ba('0x23')](handleEntityNotFound(_0x1f7fc0,null))[_0xc1ba('0x23')](removeEntity(_0x1f7fc0,null))[_0xc1ba('0x46')](handleError(_0x1f7fc0,null));};exports[_0xc1ba('0x48')]=function(_0x55c1df,_0x228d46){var _0x52b57c={'key':_0x55c1df[_0xc1ba('0x47')][_0xc1ba('0x49')]};if(_0x55c1df[_0xc1ba('0x47')]['MailAccountId']){_0x52b57c[_0xc1ba('0x4a')]=_0x55c1df[_0xc1ba('0x47')][_0xc1ba('0x4a')];}else if(_0x55c1df[_0xc1ba('0x47')][_0xc1ba('0x4b')]){_0x52b57c[_0xc1ba('0x4b')]=_0x55c1df[_0xc1ba('0x47')]['SmsAccountId'];}else if(_0x55c1df[_0xc1ba('0x47')][_0xc1ba('0x4c')]){_0x52b57c[_0xc1ba('0x4c')]=_0x55c1df[_0xc1ba('0x47')]['OpenchannelAccountId'];}else if(_0x55c1df[_0xc1ba('0x47')][_0xc1ba('0x4d')]){_0x52b57c[_0xc1ba('0x4d')]=_0x55c1df[_0xc1ba('0x47')]['ChatWebsiteId'];}return db['CannedAnswer']['find']({'where':_0x52b57c})[_0xc1ba('0x23')](function(_0x58895c){if(_0x58895c){throw new db[(_0xc1ba('0x4e'))][(_0xc1ba('0x4f'))](_0xc1ba('0x50'));}return db[_0xc1ba('0x2c')]['create'](_0x55c1df[_0xc1ba('0x47')]);})[_0xc1ba('0x23')](function(_0x58f972){var _0x363dcc=_0x55c1df[_0xc1ba('0x51')][_0xc1ba('0x25')]({'plain':!![]});if(!_0x363dcc)throw new Error(_0xc1ba('0x52'));if(_0x363dcc[_0xc1ba('0x53')]===_0xc1ba('0x51')){var _0x54b157=_0x58f972[_0xc1ba('0x25')]({'plain':!![]});return db[_0xc1ba('0x54')][_0xc1ba('0x45')]({'where':{'name':_0xc1ba('0x26'),'userProfileId':_0x363dcc[_0xc1ba('0x55')]},'raw':!![]})['then'](function(_0x21175a){if(_0x21175a&&_0x21175a['autoAssociation']===0x0){return db[_0xc1ba('0x27')][_0xc1ba('0x48')]({'name':_0x54b157[_0xc1ba('0x29')],'resourceId':_0x54b157['id'],'type':_0x21175a['name'],'sectionId':_0x21175a['id']},{})[_0xc1ba('0x23')](function(){return _0x58f972;});}else{return _0x58f972;}})['catch'](function(_0x3bd68b){logger[_0xc1ba('0x28')](_0xc1ba('0x56'),_0x3bd68b);throw _0x3bd68b;});}return _0x58f972;})['then'](respondWithResult(_0x228d46,0xc9))[_0xc1ba('0x46')](handleError(_0x228d46,null));};
\ No newline at end of file
index 5c4f6ce..d5e1e53 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x233e=['api','moment','path','rimraf','../../config/environment','./cannedAnswer.attributes','exports','utf8mb4_unicode_ci','lodash','../../config/logger'];(function(_0x50bf5a,_0x807bba){var _0x4ddc1d=function(_0x349a61){while(--_0x349a61){_0x50bf5a['push'](_0x50bf5a['shift']());}};_0x4ddc1d(++_0x807bba);}(_0x233e,0x148));var _0xe233=function(_0x26f50f,_0x40f05b){_0x26f50f=_0x26f50f-0x0;var _0x17196d=_0x233e[_0x26f50f];return _0x17196d;};'use strict';var _=require(_0xe233('0x0'));var util=require('util');var logger=require(_0xe233('0x1'))(_0xe233('0x2'));var moment=require(_0xe233('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xe233('0x4'));var rimraf=require(_0xe233('0x5'));var config=require(_0xe233('0x6'));var attributes=require(_0xe233('0x7'));module[_0xe233('0x8')]=function(_0x4d8b6a,_0x431d66){return _0x4d8b6a['define']('CannedAnswer',attributes,{'tableName':'tools_canned_answers','paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0xe233('0x9')});};
\ No newline at end of file
+var _0x3107=['rimraf','../../config/environment','./cannedAnswer.attributes','exports','define','CannedAnswer','utf8mb4','utf8mb4_unicode_ci','../../config/logger','api','bluebird','path'];(function(_0x459c7d,_0x1771b5){var _0x2e676f=function(_0x1e31e0){while(--_0x1e31e0){_0x459c7d['push'](_0x459c7d['shift']());}};_0x2e676f(++_0x1771b5);}(_0x3107,0x1b8));var _0x7310=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x3107[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x7310('0x0'))(_0x7310('0x1'));var moment=require('moment');var BPromise=require(_0x7310('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x7310('0x3'));var rimraf=require(_0x7310('0x4'));var config=require(_0x7310('0x5'));var attributes=require(_0x7310('0x6'));module[_0x7310('0x7')]=function(_0x11338c,_0xcb315f){return _0x11338c[_0x7310('0x8')](_0x7310('0x9'),attributes,{'tableName':'tools_canned_answers','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x7310('0xa'),'collate':_0x7310('0xb')});};
\ No newline at end of file
index 26b19fd..4dda639 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(_0x29781b,_0x13cdf8){var _0x43f349=function(_0x244514){while(--_0x244514){_0x29781b['push'](_0x29781b['shift']());}};_0x43f349(++_0x13cdf8);}(_0xa9e0,0x123));var _0x0a9e=function(_0x43d11d,_0xccff91){_0x43d11d=_0x43d11d-0x0;var _0x38cd08=_0xa9e0[_0x43d11d];return _0x38cd08;};'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(_0x1d719e,_0x3fa907){var _0x3ecf44=function(_0x21bc37){while(--_0x21bc37){_0x1d719e['push'](_0x1d719e['shift']());}};_0x3ecf44(++_0x3fa907);}(_0xa9e0,0x123));var _0x0a9e=function(_0xf50820,_0x56f041){_0xf50820=_0xf50820-0x0;var _0x2a9b10=_0xa9e0[_0xf50820];return _0x2a9b10;};'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 20c3142..86354e0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc8fe=['destroy','exports','multer','path','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cannedAnswer.controller','get','/:id','isAuthenticated','show','post','create','update'];(function(_0x27abfd,_0x4edca1){var _0x4fd9d1=function(_0x59672d){while(--_0x59672d){_0x27abfd['push'](_0x27abfd['shift']());}};_0x4fd9d1(++_0x4edca1);}(_0xc8fe,0x123));var _0xec8f=function(_0x202e3a,_0x137882){_0x202e3a=_0x202e3a-0x0;var _0x448ba1=_0xc8fe[_0x202e3a];return _0x448ba1;};'use strict';var multer=require(_0xec8f('0x0'));var util=require('util');var path=require(_0xec8f('0x1'));var timeout=require('connect-timeout');var express=require(_0xec8f('0x2'));var router=express['Router']();var fs_extra=require(_0xec8f('0x3'));var auth=require(_0xec8f('0x4'));var interaction=require(_0xec8f('0x5'));var config=require(_0xec8f('0x6'));var controller=require(_0xec8f('0x7'));router[_0xec8f('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0xec8f('0x8')](_0xec8f('0x9'),auth[_0xec8f('0xa')](),controller[_0xec8f('0xb')]);router[_0xec8f('0xc')]('/',auth[_0xec8f('0xa')](),controller[_0xec8f('0xd')]);router['put'](_0xec8f('0x9'),auth[_0xec8f('0xa')](),controller[_0xec8f('0xe')]);router['delete'](_0xec8f('0x9'),auth[_0xec8f('0xa')](),controller[_0xec8f('0xf')]);module[_0xec8f('0x10')]=router;
\ No newline at end of file
+var _0x150d=['../../components/interaction/service','../../config/environment','./cannedAnswer.controller','get','isAuthenticated','create','put','update','/:id','exports','multer','path','express','Router','fs-extra','../../components/auth/service'];(function(_0x4f7e2b,_0x591c7a){var _0xcbf189=function(_0x3ec217){while(--_0x3ec217){_0x4f7e2b['push'](_0x4f7e2b['shift']());}};_0xcbf189(++_0x591c7a);}(_0x150d,0xca));var _0xd150=function(_0x3a4f18,_0x1af741){_0x3a4f18=_0x3a4f18-0x0;var _0x4c20fc=_0x150d[_0x3a4f18];return _0x4c20fc;};'use strict';var multer=require(_0xd150('0x0'));var util=require('util');var path=require(_0xd150('0x1'));var timeout=require('connect-timeout');var express=require(_0xd150('0x2'));var router=express[_0xd150('0x3')]();var fs_extra=require(_0xd150('0x4'));var auth=require(_0xd150('0x5'));var interaction=require(_0xd150('0x6'));var config=require(_0xd150('0x7'));var controller=require(_0xd150('0x8'));router[_0xd150('0x9')]('/',auth[_0xd150('0xa')](),controller['index']);router['get']('/:id',auth[_0xd150('0xa')](),controller['show']);router['post']('/',auth[_0xd150('0xa')](),controller[_0xd150('0xb')]);router[_0xd150('0xc')]('/:id',auth['isAuthenticated'](),controller[_0xd150('0xd')]);router['delete'](_0xd150('0xe'),auth['isAuthenticated'](),controller['destroy']);module[_0xd150('0xf')]=router;
\ No newline at end of file
index cd720bc..4c70f53 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9265=['INTEGER','sequelize','1970-01-01\x2000:00:01','STRING'];(function(_0x46939c,_0x56009e){var _0x35f4a5=function(_0x13e70b){while(--_0x13e70b){_0x46939c['push'](_0x46939c['shift']());}};_0x35f4a5(++_0x56009e);}(_0x9265,0x1dd));var _0x5926=function(_0x50868e,_0x59417d){_0x50868e=_0x50868e-0x0;var _0x5675ff=_0x9265[_0x50868e];return _0x5675ff;};'use strict';var Sequelize=require(_0x5926('0x0'));module['exports']={'calldate':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':_0x5926('0x1')},'clid':{'type':Sequelize[_0x5926('0x2')]},'src':{'type':Sequelize[_0x5926('0x2')]},'dst':{'type':Sequelize[_0x5926('0x2')]},'dcontext':{'type':Sequelize[_0x5926('0x2')]},'channel':{'type':Sequelize[_0x5926('0x2')]},'dstchannel':{'type':Sequelize[_0x5926('0x2')]},'lastapp':{'type':Sequelize[_0x5926('0x2')]},'lastdata':{'type':Sequelize['STRING']},'duration':{'type':Sequelize[_0x5926('0x3')],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize[_0x5926('0x3')],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize[_0x5926('0x2')]},'amaflags':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize[_0x5926('0x2')]},'userfield':{'type':Sequelize[_0x5926('0x2')]},'uniqueid':{'type':Sequelize[_0x5926('0x2')]},'linkedid':{'type':Sequelize[_0x5926('0x2')]},'sequence':{'type':Sequelize[_0x5926('0x2')]},'peeraccount':{'type':Sequelize[_0x5926('0x2')]},'type':{'type':Sequelize[_0x5926('0x2')]},'tag':{'type':Sequelize[_0x5926('0x2')]}};
\ No newline at end of file
+var _0x82fa=['DATE','1970-01-01\x2000:00:01','STRING','INTEGER','sequelize','exports'];(function(_0x596b95,_0x42fd0f){var _0x38ac99=function(_0x3372f0){while(--_0x3372f0){_0x596b95['push'](_0x596b95['shift']());}};_0x38ac99(++_0x42fd0f);}(_0x82fa,0x1cc));var _0xa82f=function(_0x6a5b44,_0x29fd9e){_0x6a5b44=_0x6a5b44-0x0;var _0x33a0e9=_0x82fa[_0x6a5b44];return _0x33a0e9;};'use strict';var Sequelize=require(_0xa82f('0x0'));module[_0xa82f('0x1')]={'calldate':{'type':Sequelize[_0xa82f('0x2')],'allowNull':![],'defaultValue':_0xa82f('0x3')},'clid':{'type':Sequelize['STRING']},'src':{'type':Sequelize['STRING']},'dst':{'type':Sequelize['STRING']},'dcontext':{'type':Sequelize[_0xa82f('0x4')]},'channel':{'type':Sequelize[_0xa82f('0x4')]},'dstchannel':{'type':Sequelize[_0xa82f('0x4')]},'lastapp':{'type':Sequelize[_0xa82f('0x4')]},'lastdata':{'type':Sequelize[_0xa82f('0x4')]},'duration':{'type':Sequelize[_0xa82f('0x5')],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize[_0xa82f('0x5')],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize[_0xa82f('0x4')]},'amaflags':{'type':Sequelize[_0xa82f('0x5')],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize[_0xa82f('0x4')]},'userfield':{'type':Sequelize[_0xa82f('0x4')]},'uniqueid':{'type':Sequelize['STRING']},'linkedid':{'type':Sequelize['STRING']},'sequence':{'type':Sequelize[_0xa82f('0x4')]},'peeraccount':{'type':Sequelize[_0xa82f('0x4')]},'type':{'type':Sequelize[_0xa82f('0x4')]},'tag':{'type':Sequelize[_0xa82f('0x4')]}};
\ No newline at end of file
index 08fd545..9a88014 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfb65=['../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','limit','undefined','count','set','Content-Range','apply','save','update','then','destroy','error','stack','name','send','map','rawAttributes','type','key','model','query','filters','intersection','attributes','fields','length','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','options','Cdr','includeAll','include','findAll','rows','catch','show','params','keys','find','create','body','describe','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api'];(function(_0x383875,_0x45b02b){var _0x128fc2=function(_0x247f99){while(--_0x247f99){_0x383875['push'](_0x383875['shift']());}};_0x128fc2(++_0x45b02b);}(_0xfb65,0x82));var _0x5fb6=function(_0x11f15e,_0x2cc181){_0x11f15e=_0x11f15e-0x0;var _0x27dad5=_0xfb65[_0x11f15e];return _0x27dad5;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x5fb6('0x0'));var zipdir=require(_0x5fb6('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x5fb6('0x2'));var moment=require('moment');var BPromise=require(_0x5fb6('0x3'));var Mustache=require(_0x5fb6('0x4'));var util=require(_0x5fb6('0x5'));var path=require(_0x5fb6('0x6'));var sox=require(_0x5fb6('0x7'));var csv=require(_0x5fb6('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x5fb6('0x9'));var squel=require(_0x5fb6('0xa'));var crypto=require(_0x5fb6('0xb'));var jsforce=require(_0x5fb6('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x5fb6('0x8'));var querystring=require(_0x5fb6('0xd'));var Papa=require(_0x5fb6('0xe'));var Redis=require(_0x5fb6('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x5fb6('0x10'));var as=require(_0x5fb6('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x5fb6('0x12'))(_0x5fb6('0x13'));var utils=require(_0x5fb6('0x14'));var config=require(_0x5fb6('0x15'));var licenseUtil=require(_0x5fb6('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1927d0,_0x15b296){_0x15b296=_0x15b296||0xcc;return function(_0x42285b){if(_0x42285b){return _0x1927d0[_0x5fb6('0x17')](_0x15b296);}return _0x1927d0[_0x5fb6('0x18')](_0x15b296)[_0x5fb6('0x19')]();};}function respondWithResult(_0x1a391f,_0x1ded21){_0x1ded21=_0x1ded21||0xc8;return function(_0x5e69c3){if(_0x5e69c3){return _0x1a391f['status'](_0x1ded21)[_0x5fb6('0x1a')](_0x5e69c3);}};}function respondWithFilteredResult(_0xfaea56,_0x58febe){return function(_0x1d57b1){if(_0x1d57b1){var _0x21ddd3=typeof _0x58febe[_0x5fb6('0x1b')]==='undefined'&&typeof _0x58febe[_0x5fb6('0x1c')]===_0x5fb6('0x1d');var _0x27bd8b=_0x1d57b1[_0x5fb6('0x1e')];var _0x167354=_0x21ddd3?0x0:_0x58febe[_0x5fb6('0x1b')];var _0x50bca8=_0x21ddd3?_0x1d57b1[_0x5fb6('0x1e')]:_0x58febe['offset']+_0x58febe[_0x5fb6('0x1c')];var _0x54c319;if(_0x50bca8>=_0x27bd8b){_0x50bca8=_0x27bd8b;_0x54c319=0xc8;}else{_0x54c319=0xce;}_0xfaea56[_0x5fb6('0x18')](_0x54c319);return _0xfaea56[_0x5fb6('0x1f')](_0x5fb6('0x20'),_0x167354+'-'+_0x50bca8+'/'+_0x27bd8b)[_0x5fb6('0x1a')](_0x1d57b1);}return null;};}function patchUpdates(_0x5885f1){return function(_0x418f58){try{jsonpatch[_0x5fb6('0x21')](_0x418f58,_0x5885f1,!![]);}catch(_0x50a414){return BPromise['reject'](_0x50a414);}return _0x418f58[_0x5fb6('0x22')]();};}function saveUpdates(_0x39ace4,_0x48a70e){return function(_0xdf1794){if(_0xdf1794){return _0xdf1794[_0x5fb6('0x23')](_0x39ace4)[_0x5fb6('0x24')](function(_0x36457e){return _0x36457e;});}return null;};}function removeEntity(_0x582f60,_0x2fca34){return function(_0x44aebe){if(_0x44aebe){return _0x44aebe[_0x5fb6('0x25')]()[_0x5fb6('0x24')](function(){_0x582f60[_0x5fb6('0x18')](0xcc)[_0x5fb6('0x19')]();});}};}function handleEntityNotFound(_0x4e2bff,_0x4cbdaf){return function(_0x298b44){if(!_0x298b44){_0x4e2bff[_0x5fb6('0x17')](0x194);}return _0x298b44;};}function handleError(_0x92f94d,_0x3ce22f){_0x3ce22f=_0x3ce22f||0x1f4;return function(_0x2731a3){logger[_0x5fb6('0x26')](_0x2731a3[_0x5fb6('0x27')]);if(_0x2731a3['name']){delete _0x2731a3[_0x5fb6('0x28')];}_0x92f94d[_0x5fb6('0x18')](_0x3ce22f)[_0x5fb6('0x29')](_0x2731a3);};}exports['index']=function(_0x2afc08,_0x1b4ae4){var _0x49a828={},_0x218428={},_0x408fd9={'count':0x0,'rows':[]};var _0x52afd7=_[_0x5fb6('0x2a')](db['Cdr'][_0x5fb6('0x2b')],function(_0x53dbeb){return{'name':_0x53dbeb['fieldName'],'type':_0x53dbeb[_0x5fb6('0x2c')][_0x5fb6('0x2d')]};});_0x218428[_0x5fb6('0x2e')]=_[_0x5fb6('0x2a')](_0x52afd7,_0x5fb6('0x28'));_0x218428[_0x5fb6('0x2f')]=_['keys'](_0x2afc08[_0x5fb6('0x2f')]);_0x218428[_0x5fb6('0x30')]=_[_0x5fb6('0x31')](_0x218428[_0x5fb6('0x2e')],_0x218428[_0x5fb6('0x2f')]);_0x49a828[_0x5fb6('0x32')]=_[_0x5fb6('0x31')](_0x218428[_0x5fb6('0x2e')],qs[_0x5fb6('0x33')](_0x2afc08[_0x5fb6('0x2f')][_0x5fb6('0x33')]));_0x49a828['attributes']=_0x49a828[_0x5fb6('0x32')][_0x5fb6('0x34')]?_0x49a828['attributes']:_0x218428[_0x5fb6('0x2e')];if(!_0x2afc08['query']['hasOwnProperty'](_0x5fb6('0x35'))){_0x49a828[_0x5fb6('0x1c')]=qs[_0x5fb6('0x1c')](_0x2afc08['query'][_0x5fb6('0x1c')]);_0x49a828['offset']=qs['offset'](_0x2afc08[_0x5fb6('0x2f')][_0x5fb6('0x1b')]);}_0x49a828[_0x5fb6('0x36')]=qs[_0x5fb6('0x37')](_0x2afc08[_0x5fb6('0x2f')][_0x5fb6('0x37')]);_0x49a828[_0x5fb6('0x38')]=qs[_0x5fb6('0x30')](_[_0x5fb6('0x39')](_0x2afc08[_0x5fb6('0x2f')],_0x218428[_0x5fb6('0x30')]),_0x52afd7);if(_0x2afc08[_0x5fb6('0x2f')]['filter']){_0x49a828[_0x5fb6('0x38')]=_[_0x5fb6('0x3a')](_0x49a828[_0x5fb6('0x38')],{'$or':_['map'](_0x52afd7,function(_0x1e83fc){if(_0x1e83fc['type']!==_0x5fb6('0x3b')){var _0x4bd9e5={};_0x4bd9e5[_0x1e83fc[_0x5fb6('0x28')]]={'$like':'%'+_0x2afc08[_0x5fb6('0x2f')][_0x5fb6('0x3c')]+'%'};return _0x4bd9e5;}})});}_0x49a828=_[_0x5fb6('0x3a')]({},_0x49a828,_0x2afc08[_0x5fb6('0x3d')]);var _0x59875a={'where':_0x49a828[_0x5fb6('0x38')]};return db[_0x5fb6('0x3e')][_0x5fb6('0x1e')](_0x59875a)[_0x5fb6('0x24')](function(_0x52e858){_0x408fd9[_0x5fb6('0x1e')]=_0x52e858;if(_0x2afc08[_0x5fb6('0x2f')][_0x5fb6('0x3f')]){_0x49a828[_0x5fb6('0x40')]=[{'all':!![]}];}return db[_0x5fb6('0x3e')][_0x5fb6('0x41')](_0x49a828);})['then'](function(_0x10c242){_0x408fd9[_0x5fb6('0x42')]=_0x10c242;return _0x408fd9;})[_0x5fb6('0x24')](respondWithFilteredResult(_0x1b4ae4,_0x49a828))[_0x5fb6('0x43')](handleError(_0x1b4ae4,null));};exports[_0x5fb6('0x44')]=function(_0x290e77,_0xd3245f){var _0x529c2d={'raw':!![],'where':{'id':_0x290e77[_0x5fb6('0x45')]['id']}},_0x2e3f97={};_0x2e3f97[_0x5fb6('0x2e')]=_['keys'](db[_0x5fb6('0x3e')]['rawAttributes']);_0x2e3f97[_0x5fb6('0x2f')]=_[_0x5fb6('0x46')](_0x290e77['query']);_0x2e3f97[_0x5fb6('0x30')]=_[_0x5fb6('0x31')](_0x2e3f97[_0x5fb6('0x2e')],_0x2e3f97['query']);_0x529c2d['attributes']=_[_0x5fb6('0x31')](_0x2e3f97[_0x5fb6('0x2e')],qs[_0x5fb6('0x33')](_0x290e77[_0x5fb6('0x2f')][_0x5fb6('0x33')]));_0x529c2d[_0x5fb6('0x32')]=_0x529c2d[_0x5fb6('0x32')][_0x5fb6('0x34')]?_0x529c2d[_0x5fb6('0x32')]:_0x2e3f97[_0x5fb6('0x2e')];if(_0x290e77[_0x5fb6('0x2f')]['includeAll']){_0x529c2d[_0x5fb6('0x40')]=[{'all':!![]}];}_0x529c2d=_['merge']({},_0x529c2d,_0x290e77['options']);return db[_0x5fb6('0x3e')][_0x5fb6('0x47')](_0x529c2d)[_0x5fb6('0x24')](handleEntityNotFound(_0xd3245f,null))[_0x5fb6('0x24')](respondWithResult(_0xd3245f,null))[_0x5fb6('0x43')](handleError(_0xd3245f,null));};exports[_0x5fb6('0x48')]=function(_0x45ba31,_0x5729a2){return db[_0x5fb6('0x3e')][_0x5fb6('0x48')](_0x45ba31['body'],{})[_0x5fb6('0x24')](respondWithResult(_0x5729a2,0xc9))[_0x5fb6('0x43')](handleError(_0x5729a2,null));};exports[_0x5fb6('0x23')]=function(_0x3fc547,_0x3b508a){if(_0x3fc547[_0x5fb6('0x49')]['id']){delete _0x3fc547[_0x5fb6('0x49')]['id'];}return db[_0x5fb6('0x3e')]['find']({'where':{'id':_0x3fc547[_0x5fb6('0x45')]['id']}})[_0x5fb6('0x24')](handleEntityNotFound(_0x3b508a,null))['then'](saveUpdates(_0x3fc547[_0x5fb6('0x49')],null))[_0x5fb6('0x24')](respondWithResult(_0x3b508a,null))[_0x5fb6('0x43')](handleError(_0x3b508a,null));};exports[_0x5fb6('0x25')]=function(_0x4bf156,_0x4bb943){return db[_0x5fb6('0x3e')][_0x5fb6('0x47')]({'where':{'id':_0x4bf156[_0x5fb6('0x45')]['id']}})['then'](handleEntityNotFound(_0x4bb943,null))[_0x5fb6('0x24')](removeEntity(_0x4bb943,null))['catch'](handleError(_0x4bb943,null));};exports[_0x5fb6('0x4a')]=function(_0x5eb7cf,_0xa949ae){return db[_0x5fb6('0x3e')][_0x5fb6('0x4a')]()['then'](respondWithResult(_0xa949ae,null))[_0x5fb6('0x43')](handleError(_0xa949ae,null));};
\ No newline at end of file
+var _0x4006=['findAll','catch','show','keys','include','find','create','body','update','params','describe','rimraf','zip-dir','fast-json-patch','request-promise','mustache','path','ejs','lodash','squel','crypto','jsforce','to-csv','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','status','offset','undefined','limit','count','set','json','apply','reject','save','then','destroy','end','error','stack','name','index','Cdr','rawAttributes','fieldName','type','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','pick','filter','where','merge','options','includeAll'];(function(_0x32708a,_0x2f186c){var _0xa8fd72=function(_0xc78df1){while(--_0xc78df1){_0x32708a['push'](_0x32708a['shift']());}};_0xa8fd72(++_0x2f186c);}(_0x4006,0x1c7));var _0x6400=function(_0x5e2f79,_0x7c1ce8){_0x5e2f79=_0x5e2f79-0x0;var _0x5d0100=_0x4006[_0x5e2f79];return _0x5d0100;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x6400('0x0'));var zipdir=require(_0x6400('0x1'));var jsonpatch=require(_0x6400('0x2'));var rp=require(_0x6400('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x6400('0x4'));var util=require('util');var path=require(_0x6400('0x5'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x6400('0x6'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x6400('0x7'));var squel=require(_0x6400('0x8'));var crypto=require(_0x6400('0x9'));var jsforce=require(_0x6400('0xa'));var deskjs=require('desk.js');var toCsv=require(_0x6400('0xb'));var querystring=require(_0x6400('0xc'));var Papa=require(_0x6400('0xd'));var Redis=require(_0x6400('0xe'));var authService=require(_0x6400('0xf'));var qs=require(_0x6400('0x10'));var as=require(_0x6400('0x11'));var hardwareService=require(_0x6400('0x12'));var logger=require(_0x6400('0x13'))(_0x6400('0x14'));var utils=require(_0x6400('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x6400('0x16'));var db=require(_0x6400('0x17'))['db'];function respondWithStatusCode(_0x230c94,_0x36bf00){_0x36bf00=_0x36bf00||0xcc;return function(_0x5a6d31){if(_0x5a6d31){return _0x230c94[_0x6400('0x18')](_0x36bf00);}return _0x230c94[_0x6400('0x19')](_0x36bf00)['end']();};}function respondWithResult(_0x4f8133,_0x559312){_0x559312=_0x559312||0xc8;return function(_0x268f93){if(_0x268f93){return _0x4f8133[_0x6400('0x19')](_0x559312)['json'](_0x268f93);}};}function respondWithFilteredResult(_0x191696,_0x4ae3ea){return function(_0x28eb67){if(_0x28eb67){var _0x5a0c1c=typeof _0x4ae3ea[_0x6400('0x1a')]===_0x6400('0x1b')&&typeof _0x4ae3ea[_0x6400('0x1c')]===_0x6400('0x1b');var _0x49d412=_0x28eb67[_0x6400('0x1d')];var _0x14c036=_0x5a0c1c?0x0:_0x4ae3ea[_0x6400('0x1a')];var _0x50524f=_0x5a0c1c?_0x28eb67[_0x6400('0x1d')]:_0x4ae3ea[_0x6400('0x1a')]+_0x4ae3ea['limit'];var _0x36a8f5;if(_0x50524f>=_0x49d412){_0x50524f=_0x49d412;_0x36a8f5=0xc8;}else{_0x36a8f5=0xce;}_0x191696[_0x6400('0x19')](_0x36a8f5);return _0x191696[_0x6400('0x1e')]('Content-Range',_0x14c036+'-'+_0x50524f+'/'+_0x49d412)[_0x6400('0x1f')](_0x28eb67);}return null;};}function patchUpdates(_0x23c1cd){return function(_0x325bde){try{jsonpatch[_0x6400('0x20')](_0x325bde,_0x23c1cd,!![]);}catch(_0x1c8b72){return BPromise[_0x6400('0x21')](_0x1c8b72);}return _0x325bde[_0x6400('0x22')]();};}function saveUpdates(_0x171e39,_0x22eb63){return function(_0x212f0f){if(_0x212f0f){return _0x212f0f['update'](_0x171e39)[_0x6400('0x23')](function(_0x50c29e){return _0x50c29e;});}return null;};}function removeEntity(_0x589b7c,_0x257d80){return function(_0xb79c62){if(_0xb79c62){return _0xb79c62[_0x6400('0x24')]()[_0x6400('0x23')](function(){_0x589b7c['status'](0xcc)[_0x6400('0x25')]();});}};}function handleEntityNotFound(_0x56d9e6,_0x1acff2){return function(_0x506732){if(!_0x506732){_0x56d9e6[_0x6400('0x18')](0x194);}return _0x506732;};}function handleError(_0x246433,_0x577156){_0x577156=_0x577156||0x1f4;return function(_0x434550){logger[_0x6400('0x26')](_0x434550[_0x6400('0x27')]);if(_0x434550['name']){delete _0x434550[_0x6400('0x28')];}_0x246433['status'](_0x577156)['send'](_0x434550);};}exports[_0x6400('0x29')]=function(_0x4bb214,_0x234670){var _0x197b9d={},_0x50f5e9={},_0x452a2c={'count':0x0,'rows':[]};var _0x52eba1=_['map'](db[_0x6400('0x2a')][_0x6400('0x2b')],function(_0x10005a){return{'name':_0x10005a[_0x6400('0x2c')],'type':_0x10005a[_0x6400('0x2d')]['key']};});_0x50f5e9[_0x6400('0x2e')]=_[_0x6400('0x2f')](_0x52eba1,_0x6400('0x28'));_0x50f5e9[_0x6400('0x30')]=_['keys'](_0x4bb214[_0x6400('0x30')]);_0x50f5e9[_0x6400('0x31')]=_[_0x6400('0x32')](_0x50f5e9['model'],_0x50f5e9[_0x6400('0x30')]);_0x197b9d[_0x6400('0x33')]=_[_0x6400('0x32')](_0x50f5e9[_0x6400('0x2e')],qs['fields'](_0x4bb214[_0x6400('0x30')][_0x6400('0x34')]));_0x197b9d['attributes']=_0x197b9d[_0x6400('0x33')][_0x6400('0x35')]?_0x197b9d['attributes']:_0x50f5e9['model'];if(!_0x4bb214[_0x6400('0x30')][_0x6400('0x36')](_0x6400('0x37'))){_0x197b9d['limit']=qs['limit'](_0x4bb214['query'][_0x6400('0x1c')]);_0x197b9d[_0x6400('0x1a')]=qs[_0x6400('0x1a')](_0x4bb214[_0x6400('0x30')][_0x6400('0x1a')]);}_0x197b9d['order']=qs[_0x6400('0x38')](_0x4bb214[_0x6400('0x30')]['sort']);_0x197b9d['where']=qs[_0x6400('0x31')](_[_0x6400('0x39')](_0x4bb214[_0x6400('0x30')],_0x50f5e9['filters']),_0x52eba1);if(_0x4bb214[_0x6400('0x30')][_0x6400('0x3a')]){_0x197b9d[_0x6400('0x3b')]=_['merge'](_0x197b9d[_0x6400('0x3b')],{'$or':_[_0x6400('0x2f')](_0x52eba1,function(_0xd824bf){if(_0xd824bf['type']!=='VIRTUAL'){var _0x5a0973={};_0x5a0973[_0xd824bf[_0x6400('0x28')]]={'$like':'%'+_0x4bb214['query']['filter']+'%'};return _0x5a0973;}})});}_0x197b9d=_[_0x6400('0x3c')]({},_0x197b9d,_0x4bb214[_0x6400('0x3d')]);var _0x565942={'where':_0x197b9d[_0x6400('0x3b')]};return db[_0x6400('0x2a')][_0x6400('0x1d')](_0x565942)['then'](function(_0x9536e5){_0x452a2c[_0x6400('0x1d')]=_0x9536e5;if(_0x4bb214[_0x6400('0x30')][_0x6400('0x3e')]){_0x197b9d['include']=[{'all':!![]}];}return db['Cdr'][_0x6400('0x3f')](_0x197b9d);})[_0x6400('0x23')](function(_0x1bf820){_0x452a2c['rows']=_0x1bf820;return _0x452a2c;})[_0x6400('0x23')](respondWithFilteredResult(_0x234670,_0x197b9d))[_0x6400('0x40')](handleError(_0x234670,null));};exports[_0x6400('0x41')]=function(_0xe50c96,_0x3069f0){var _0x557133={'raw':!![],'where':{'id':_0xe50c96['params']['id']}},_0x24d0c7={};_0x24d0c7[_0x6400('0x2e')]=_[_0x6400('0x42')](db[_0x6400('0x2a')][_0x6400('0x2b')]);_0x24d0c7['query']=_[_0x6400('0x42')](_0xe50c96[_0x6400('0x30')]);_0x24d0c7[_0x6400('0x31')]=_[_0x6400('0x32')](_0x24d0c7['model'],_0x24d0c7[_0x6400('0x30')]);_0x557133['attributes']=_[_0x6400('0x32')](_0x24d0c7['model'],qs[_0x6400('0x34')](_0xe50c96[_0x6400('0x30')][_0x6400('0x34')]));_0x557133['attributes']=_0x557133[_0x6400('0x33')]['length']?_0x557133[_0x6400('0x33')]:_0x24d0c7[_0x6400('0x2e')];if(_0xe50c96[_0x6400('0x30')][_0x6400('0x3e')]){_0x557133[_0x6400('0x43')]=[{'all':!![]}];}_0x557133=_[_0x6400('0x3c')]({},_0x557133,_0xe50c96[_0x6400('0x3d')]);return db[_0x6400('0x2a')][_0x6400('0x44')](_0x557133)[_0x6400('0x23')](handleEntityNotFound(_0x3069f0,null))[_0x6400('0x23')](respondWithResult(_0x3069f0,null))['catch'](handleError(_0x3069f0,null));};exports[_0x6400('0x45')]=function(_0x3340c7,_0x59a8f2){return db['Cdr'][_0x6400('0x45')](_0x3340c7[_0x6400('0x46')],{})[_0x6400('0x23')](respondWithResult(_0x59a8f2,0xc9))['catch'](handleError(_0x59a8f2,null));};exports[_0x6400('0x47')]=function(_0x54cbfb,_0x518ee4){if(_0x54cbfb['body']['id']){delete _0x54cbfb[_0x6400('0x46')]['id'];}return db[_0x6400('0x2a')]['find']({'where':{'id':_0x54cbfb[_0x6400('0x48')]['id']}})[_0x6400('0x23')](handleEntityNotFound(_0x518ee4,null))['then'](saveUpdates(_0x54cbfb['body'],null))[_0x6400('0x23')](respondWithResult(_0x518ee4,null))[_0x6400('0x40')](handleError(_0x518ee4,null));};exports['destroy']=function(_0x3421b5,_0x205233){return db[_0x6400('0x2a')][_0x6400('0x44')]({'where':{'id':_0x3421b5[_0x6400('0x48')]['id']}})[_0x6400('0x23')](handleEntityNotFound(_0x205233,null))[_0x6400('0x23')](removeEntity(_0x205233,null))['catch'](handleError(_0x205233,null));};exports[_0x6400('0x49')]=function(_0x801179,_0x6905bb){return db[_0x6400('0x2a')][_0x6400('0x49')]()[_0x6400('0x23')](respondWithResult(_0x6905bb,null))[_0x6400('0x40')](handleError(_0x6905bb,null));};
\ No newline at end of file
index 9a2073f..5032abe 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9957=['dst','src','uniqueid','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./cdr.attributes','exports','define','Cdr','accountcode','calldate','disposition'];(function(_0x1f5a18,_0x26deb1){var _0x171af3=function(_0xec0a7b){while(--_0xec0a7b){_0x1f5a18['push'](_0x1f5a18['shift']());}};_0x171af3(++_0x26deb1);}(_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 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':'cdr','paranoid':![],'indexes':[{'name':_0x7995('0xc'),'fields':[_0x7995('0xc')]},{'name':'calldate','fields':[_0x7995('0xd')]},{'name':_0x7995('0xe'),'fields':[_0x7995('0xe')]},{'name':_0x7995('0xf'),'fields':[_0x7995('0xf')]},{'name':_0x7995('0x10'),'fields':[_0x7995('0x10')]},{'name':'uniqueid','fields':[_0x7995('0x11')]}],'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(_0x5ab037,_0x49d448){var _0x1f82e3=function(_0x250b00){while(--_0x250b00){_0x5ab037['push'](_0x5ab037['shift']());}};_0x1f82e3(++_0x49d448);}(_0x7a54,0x106));var _0x47a5=function(_0x49ce75,_0x4dd94c){_0x49ce75=_0x49ce75-0x0;var _0x1897d5=_0x7a54[_0x49ce75];return _0x1897d5;};'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 0251699..789a895 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa141=['rpc','../../config/environment','jayson/promise','http','then','Cdr,\x20%s,\x20%s','Cdr,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','info','result','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x348737,_0x51fbe0){var _0x160a81=function(_0x4a7f94){while(--_0x4a7f94){_0x348737['push'](_0x348737['shift']());}};_0x160a81(++_0x51fbe0);}(_0xa141,0x1db));var _0x1a14=function(_0x11c68a,_0x3f0052){_0x11c68a=_0x11c68a-0x0;var _0x46f941=_0xa141[_0x11c68a];return _0x46f941;};'use strict';var _=require(_0x1a14('0x0'));var util=require(_0x1a14('0x1'));var moment=require(_0x1a14('0x2'));var BPromise=require('bluebird');var rs=require(_0x1a14('0x3'));var fs=require('fs');var Redis=require(_0x1a14('0x4'));var db=require(_0x1a14('0x5'))['db'];var utils=require(_0x1a14('0x6'));var logger=require(_0x1a14('0x7'))(_0x1a14('0x8'));var config=require(_0x1a14('0x9'));var jayson=require(_0x1a14('0xa'));var client=jayson['client'][_0x1a14('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x287f1b,_0x115e4a,_0x1b7577){return new BPromise(function(_0x4e63ef,_0x40751b){return client['request'](_0x287f1b,_0x1b7577)[_0x1a14('0xc')](function(_0xbd22bf){logger['info'](_0x1a14('0xd'),_0x115e4a,'request\x20sent');logger['debug'](_0x1a14('0xe'),_0x115e4a,_0x1a14('0xf'),JSON[_0x1a14('0x10')](_0xbd22bf));if(_0xbd22bf['error']){if(_0xbd22bf[_0x1a14('0x11')]['code']===0x1f4){logger['error'](_0x1a14('0xd'),_0x115e4a,_0xbd22bf[_0x1a14('0x11')]['message']);return _0x40751b(_0xbd22bf[_0x1a14('0x11')]['message']);}logger[_0x1a14('0x11')]('Cdr,\x20%s,\x20%s',_0x115e4a,_0xbd22bf['error'][_0x1a14('0x12')]);return _0x4e63ef(_0xbd22bf[_0x1a14('0x11')][_0x1a14('0x12')]);}else{logger[_0x1a14('0x13')](_0x1a14('0xd'),_0x115e4a,_0x1a14('0xf'));_0x4e63ef(_0xbd22bf[_0x1a14('0x14')][_0x1a14('0x12')]);}})['catch'](function(_0x4cfe01){logger[_0x1a14('0x11')](_0x1a14('0xd'),_0x115e4a,_0x4cfe01);_0x40751b(_0x4cfe01);});});}
\ No newline at end of file
+var _0x340f=['ioredis','../../config/logger','../../config/environment','jayson/promise','client','http','request','info','Cdr,\x20%s,\x20%s','request\x20sent','debug','Cdr,\x20%s,\x20%s,\x20%s','code','message','error','result','catch','lodash','util','moment','bluebird','randomstring'];(function(_0x41b369,_0x29e21f){var _0x2af633=function(_0x588c87){while(--_0x588c87){_0x41b369['push'](_0x41b369['shift']());}};_0x2af633(++_0x29e21f);}(_0x340f,0x171));var _0xf340=function(_0x539ff,_0x3bdd68){_0x539ff=_0x539ff-0x0;var _0x3e3cf1=_0x340f[_0x539ff];return _0x3e3cf1;};'use strict';var _=require(_0xf340('0x0'));var util=require(_0xf340('0x1'));var moment=require(_0xf340('0x2'));var BPromise=require(_0xf340('0x3'));var rs=require(_0xf340('0x4'));var fs=require('fs');var Redis=require(_0xf340('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xf340('0x6'))('rpc');var config=require(_0xf340('0x7'));var jayson=require(_0xf340('0x8'));var client=jayson[_0xf340('0x9')][_0xf340('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x54ee6b,_0x505a7e,_0x5d4fd8){return new BPromise(function(_0x169204,_0x10f59b){return client[_0xf340('0xb')](_0x54ee6b,_0x5d4fd8)['then'](function(_0x37f02d){logger[_0xf340('0xc')](_0xf340('0xd'),_0x505a7e,_0xf340('0xe'));logger[_0xf340('0xf')](_0xf340('0x10'),_0x505a7e,_0xf340('0xe'),JSON['stringify'](_0x37f02d));if(_0x37f02d['error']){if(_0x37f02d['error'][_0xf340('0x11')]===0x1f4){logger['error'](_0xf340('0xd'),_0x505a7e,_0x37f02d['error']['message']);return _0x10f59b(_0x37f02d['error'][_0xf340('0x12')]);}logger[_0xf340('0x13')](_0xf340('0xd'),_0x505a7e,_0x37f02d[_0xf340('0x13')][_0xf340('0x12')]);return _0x169204(_0x37f02d['error'][_0xf340('0x12')]);}else{logger[_0xf340('0xc')]('Cdr,\x20%s,\x20%s',_0x505a7e,'request\x20sent');_0x169204(_0x37f02d[_0xf340('0x14')][_0xf340('0x12')]);}})[_0xf340('0x15')](function(_0x1d4ce7){logger[_0xf340('0x13')](_0xf340('0xd'),_0x505a7e,_0x1d4ce7);_0x10f59b(_0x1d4ce7);});});}
\ No newline at end of file
index 05e94a4..5542b6f 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(_0x3fb9dd,_0x174fff){var _0x20136a=function(_0x480081){while(--_0x480081){_0x3fb9dd['push'](_0x3fb9dd['shift']());}};_0x20136a(++_0x174fff);}(_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(_0x119cd8,_0x556b73){var _0x7072a3=function(_0x5908d1){while(--_0x5908d1){_0x119cd8['push'](_0x119cd8['shift']());}};_0x7072a3(++_0x556b73);}(_0xa9e0,0x123));var _0x0a9e=function(_0x110c3d,_0x12ee06){_0x110c3d=_0x110c3d-0x0;var _0x226d67=_0xa9e0[_0x110c3d];return _0x226d67;};'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 45c57bd..41e268e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8453=['sequelize','exports','INTEGER','STRING','TEXT','*,*,*,*'];(function(_0x4749bd,_0xa62283){var _0x33f3a5=function(_0xbd8002){while(--_0xbd8002){_0x4749bd['push'](_0x4749bd['shift']());}};_0x33f3a5(++_0xa62283);}(_0x8453,0x174));var _0x3845=function(_0x4ac890,_0x1bba04){_0x4ac890=_0x4ac890-0x0;var _0x98d83=_0x8453[_0x4ac890];return _0x98d83;};'use strict';var Sequelize=require(_0x3845('0x0'));module[_0x3845('0x1')]={'priority':{'type':Sequelize[_0x3845('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x3845('0x3')],'allowNull':![],'defaultValue':'noop'},'appdata':{'type':Sequelize[_0x3845('0x4')]()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize[_0x3845('0x3')],'defaultValue':_0x3845('0x5')}};
\ No newline at end of file
+var _0x5ac3=['STRING','*,*,*,*','sequelize','INTEGER','noop','TEXT'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x5ac3,0xce));var _0x35ac=function(_0x551463,_0x197e90){_0x551463=_0x551463-0x0;var _0x4d38f6=_0x5ac3[_0x551463];return _0x4d38f6;};'use strict';var Sequelize=require(_0x35ac('0x0'));module['exports']={'priority':{'type':Sequelize[_0x35ac('0x1')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x35ac('0x2')},'appdata':{'type':Sequelize[_0x35ac('0x3')]()},'description':{'type':Sequelize[_0x35ac('0x4')]},'interval':{'type':Sequelize[_0x35ac('0x4')],'defaultValue':_0x35ac('0x5')}};
\ No newline at end of file
index 8774e32..48af967 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x14b7=['then','destroy','end','sendStatus','stack','name','send','show','params','model','rawAttributes','query','keys','intersection','attributes','fields','length','include','merge','options','ChatApplication','find','catch','body','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','ejs','fs-extra','lodash','crypto','jsforce','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update'];(function(_0xb4ad30,_0x59ab58){var _0x5c8d90=function(_0x5a4449){while(--_0x5a4449){_0xb4ad30['push'](_0xb4ad30['shift']());}};_0x5c8d90(++_0x59ab58);}(_0x14b7,0x144));var _0x714b=function(_0x4776cc,_0x3a715e){_0x4776cc=_0x4776cc-0x0;var _0x427bda=_0x14b7[_0x4776cc];return _0x427bda;};'use strict';var emlformat=require(_0x714b('0x0'));var rimraf=require(_0x714b('0x1'));var zipdir=require(_0x714b('0x2'));var jsonpatch=require(_0x714b('0x3'));var rp=require('request-promise');var moment=require(_0x714b('0x4'));var BPromise=require(_0x714b('0x5'));var Mustache=require(_0x714b('0x6'));var util=require(_0x714b('0x7'));var path=require(_0x714b('0x8'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x714b('0x9'));var fs=require('fs');var fs_extra=require(_0x714b('0xa'));var _=require(_0x714b('0xb'));var squel=require('squel');var crypto=require(_0x714b('0xc'));var jsforce=require(_0x714b('0xd'));var deskjs=require(_0x714b('0xe'));var toCsv=require(_0x714b('0xf'));var querystring=require(_0x714b('0x10'));var Papa=require('papaparse');var Redis=require(_0x714b('0x11'));var authService=require(_0x714b('0x12'));var qs=require(_0x714b('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x714b('0x14'));var logger=require('../../config/logger')('api');var utils=require(_0x714b('0x15'));var config=require(_0x714b('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0x714b('0x17'))['db'];function respondWithStatusCode(_0x253b28,_0x37bbf3){_0x37bbf3=_0x37bbf3||0xcc;return function(_0x2abf13){if(_0x2abf13){return _0x253b28['sendStatus'](_0x37bbf3);}return _0x253b28[_0x714b('0x18')](_0x37bbf3)['end']();};}function respondWithResult(_0x21112a,_0x232478){_0x232478=_0x232478||0xc8;return function(_0x5b2770){if(_0x5b2770){return _0x21112a[_0x714b('0x18')](_0x232478)[_0x714b('0x19')](_0x5b2770);}};}function respondWithFilteredResult(_0x1a8e93,_0x36688b){return function(_0x26c18f){if(_0x26c18f){var _0x3e430d=typeof _0x36688b[_0x714b('0x1a')]===_0x714b('0x1b')&&typeof _0x36688b[_0x714b('0x1c')]==='undefined';var _0xad2df2=_0x26c18f['count'];var _0x26d557=_0x3e430d?0x0:_0x36688b['offset'];var _0x448437=_0x3e430d?_0x26c18f[_0x714b('0x1d')]:_0x36688b[_0x714b('0x1a')]+_0x36688b[_0x714b('0x1c')];var _0x43205d;if(_0x448437>=_0xad2df2){_0x448437=_0xad2df2;_0x43205d=0xc8;}else{_0x43205d=0xce;}_0x1a8e93[_0x714b('0x18')](_0x43205d);return _0x1a8e93[_0x714b('0x1e')](_0x714b('0x1f'),_0x26d557+'-'+_0x448437+'/'+_0xad2df2)[_0x714b('0x19')](_0x26c18f);}return null;};}function patchUpdates(_0x42d74a){return function(_0x1b263b){try{jsonpatch[_0x714b('0x20')](_0x1b263b,_0x42d74a,!![]);}catch(_0x28ede1){return BPromise[_0x714b('0x21')](_0x28ede1);}return _0x1b263b[_0x714b('0x22')]();};}function saveUpdates(_0x49c25f,_0x1f599b){return function(_0x81de31){if(_0x81de31){return _0x81de31[_0x714b('0x23')](_0x49c25f)[_0x714b('0x24')](function(_0x567ed8){return _0x567ed8;});}return null;};}function removeEntity(_0x597b93,_0x384440){return function(_0x172db0){if(_0x172db0){return _0x172db0[_0x714b('0x25')]()[_0x714b('0x24')](function(){_0x597b93[_0x714b('0x18')](0xcc)[_0x714b('0x26')]();});}};}function handleEntityNotFound(_0x2f97e0,_0x5bdf8a){return function(_0x2045c1){if(!_0x2045c1){_0x2f97e0[_0x714b('0x27')](0x194);}return _0x2045c1;};}function handleError(_0x376d14,_0x5ac0b0){_0x5ac0b0=_0x5ac0b0||0x1f4;return function(_0x552a16){logger['error'](_0x552a16[_0x714b('0x28')]);if(_0x552a16[_0x714b('0x29')]){delete _0x552a16['name'];}_0x376d14[_0x714b('0x18')](_0x5ac0b0)[_0x714b('0x2a')](_0x552a16);};}exports[_0x714b('0x2b')]=function(_0x318072,_0x3c62ca){var _0x31f4a7={'raw':!![],'where':{'id':_0x318072[_0x714b('0x2c')]['id']}},_0x122a02={};_0x122a02[_0x714b('0x2d')]=_['keys'](db['ChatApplication'][_0x714b('0x2e')]);_0x122a02[_0x714b('0x2f')]=_[_0x714b('0x30')](_0x318072[_0x714b('0x2f')]);_0x122a02['filters']=_[_0x714b('0x31')](_0x122a02[_0x714b('0x2d')],_0x122a02['query']);_0x31f4a7[_0x714b('0x32')]=_[_0x714b('0x31')](_0x122a02[_0x714b('0x2d')],qs[_0x714b('0x33')](_0x318072[_0x714b('0x2f')][_0x714b('0x33')]));_0x31f4a7['attributes']=_0x31f4a7[_0x714b('0x32')][_0x714b('0x34')]?_0x31f4a7[_0x714b('0x32')]:_0x122a02[_0x714b('0x2d')];if(_0x318072[_0x714b('0x2f')]['includeAll']){_0x31f4a7[_0x714b('0x35')]=[{'all':!![]}];}_0x31f4a7=_[_0x714b('0x36')]({},_0x31f4a7,_0x318072[_0x714b('0x37')]);return db[_0x714b('0x38')][_0x714b('0x39')](_0x31f4a7)[_0x714b('0x24')](handleEntityNotFound(_0x3c62ca,null))[_0x714b('0x24')](respondWithResult(_0x3c62ca,null))[_0x714b('0x3a')](handleError(_0x3c62ca,null));};exports[_0x714b('0x23')]=function(_0x177467,_0x1e288c){if(_0x177467[_0x714b('0x3b')]['id']){delete _0x177467[_0x714b('0x3b')]['id'];}return db['ChatApplication'][_0x714b('0x39')]({'where':{'id':_0x177467['params']['id']}})[_0x714b('0x24')](handleEntityNotFound(_0x1e288c,null))[_0x714b('0x24')](saveUpdates(_0x177467['body'],null))[_0x714b('0x24')](respondWithResult(_0x1e288c,null))['catch'](handleError(_0x1e288c,null));};exports[_0x714b('0x25')]=function(_0xd4b967,_0x4b2296){return db[_0x714b('0x38')][_0x714b('0x39')]({'where':{'id':_0xd4b967[_0x714b('0x2c')]['id']}})['then'](handleEntityNotFound(_0x4b2296,null))[_0x714b('0x24')](removeEntity(_0x4b2296,null))[_0x714b('0x3a')](handleError(_0x4b2296,null));};
\ No newline at end of file
+var _0x2cae=['keys','ChatApplication','rawAttributes','query','filters','intersection','fields','attributes','includeAll','include','merge','options','find','catch','body','eml-format','rimraf','request-promise','moment','mustache','util','path','sox','ejs','fs-extra','squel','jsforce','desk.js','to-csv','querystring','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','json','offset','limit','count','set','apply','reject','save','update','then','destroy','end','error','stack','name','send','show','params','model'];(function(_0x89b6b9,_0x1d271e){var _0x294d7b=function(_0x2c54fd){while(--_0x2c54fd){_0x89b6b9['push'](_0x89b6b9['shift']());}};_0x294d7b(++_0x1d271e);}(_0x2cae,0x16b));var _0xe2ca=function(_0x22f8ab,_0x15d8ff){_0x22f8ab=_0x22f8ab-0x0;var _0x2a70e5=_0x2cae[_0x22f8ab];return _0x2a70e5;};'use strict';var emlformat=require(_0xe2ca('0x0'));var rimraf=require(_0xe2ca('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xe2ca('0x2'));var moment=require(_0xe2ca('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xe2ca('0x4'));var util=require(_0xe2ca('0x5'));var path=require(_0xe2ca('0x6'));var sox=require(_0xe2ca('0x7'));var csv=require('to-csv');var ejs=require(_0xe2ca('0x8'));var fs=require('fs');var fs_extra=require(_0xe2ca('0x9'));var _=require('lodash');var squel=require(_0xe2ca('0xa'));var crypto=require('crypto');var jsforce=require(_0xe2ca('0xb'));var deskjs=require(_0xe2ca('0xc'));var toCsv=require(_0xe2ca('0xd'));var querystring=require(_0xe2ca('0xe'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xe2ca('0xf'));var hardwareService=require(_0xe2ca('0x10'));var logger=require(_0xe2ca('0x11'))(_0xe2ca('0x12'));var utils=require(_0xe2ca('0x13'));var config=require(_0xe2ca('0x14'));var licenseUtil=require(_0xe2ca('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1138ee,_0x2773cc){_0x2773cc=_0x2773cc||0xcc;return function(_0x199237){if(_0x199237){return _0x1138ee[_0xe2ca('0x16')](_0x2773cc);}return _0x1138ee[_0xe2ca('0x17')](_0x2773cc)['end']();};}function respondWithResult(_0x31f283,_0x3cfcc9){_0x3cfcc9=_0x3cfcc9||0xc8;return function(_0x27c3ad){if(_0x27c3ad){return _0x31f283[_0xe2ca('0x17')](_0x3cfcc9)[_0xe2ca('0x18')](_0x27c3ad);}};}function respondWithFilteredResult(_0x3a9612,_0x1c1514){return function(_0x29cdcf){if(_0x29cdcf){var _0x326340=typeof _0x1c1514[_0xe2ca('0x19')]==='undefined'&&typeof _0x1c1514[_0xe2ca('0x1a')]==='undefined';var _0x4ca8fd=_0x29cdcf[_0xe2ca('0x1b')];var _0x18cd42=_0x326340?0x0:_0x1c1514['offset'];var _0x393c23=_0x326340?_0x29cdcf[_0xe2ca('0x1b')]:_0x1c1514[_0xe2ca('0x19')]+_0x1c1514['limit'];var _0x4380fb;if(_0x393c23>=_0x4ca8fd){_0x393c23=_0x4ca8fd;_0x4380fb=0xc8;}else{_0x4380fb=0xce;}_0x3a9612[_0xe2ca('0x17')](_0x4380fb);return _0x3a9612[_0xe2ca('0x1c')]('Content-Range',_0x18cd42+'-'+_0x393c23+'/'+_0x4ca8fd)[_0xe2ca('0x18')](_0x29cdcf);}return null;};}function patchUpdates(_0x56b574){return function(_0x16f418){try{jsonpatch[_0xe2ca('0x1d')](_0x16f418,_0x56b574,!![]);}catch(_0x60d8e8){return BPromise[_0xe2ca('0x1e')](_0x60d8e8);}return _0x16f418[_0xe2ca('0x1f')]();};}function saveUpdates(_0x1b98d8,_0x50af69){return function(_0x1a1522){if(_0x1a1522){return _0x1a1522[_0xe2ca('0x20')](_0x1b98d8)[_0xe2ca('0x21')](function(_0x2ca129){return _0x2ca129;});}return null;};}function removeEntity(_0x18a6c6,_0x2772b5){return function(_0xa1fa2b){if(_0xa1fa2b){return _0xa1fa2b[_0xe2ca('0x22')]()[_0xe2ca('0x21')](function(){_0x18a6c6['status'](0xcc)[_0xe2ca('0x23')]();});}};}function handleEntityNotFound(_0x272bb3,_0x3f3d6e){return function(_0xc52f5e){if(!_0xc52f5e){_0x272bb3[_0xe2ca('0x16')](0x194);}return _0xc52f5e;};}function handleError(_0x4b2a2e,_0x524b6c){_0x524b6c=_0x524b6c||0x1f4;return function(_0x20ac37){logger[_0xe2ca('0x24')](_0x20ac37[_0xe2ca('0x25')]);if(_0x20ac37[_0xe2ca('0x26')]){delete _0x20ac37[_0xe2ca('0x26')];}_0x4b2a2e[_0xe2ca('0x17')](_0x524b6c)[_0xe2ca('0x27')](_0x20ac37);};}exports[_0xe2ca('0x28')]=function(_0x565e9b,_0x5df46f){var _0x333665={'raw':!![],'where':{'id':_0x565e9b[_0xe2ca('0x29')]['id']}},_0x300d0e={};_0x300d0e[_0xe2ca('0x2a')]=_[_0xe2ca('0x2b')](db[_0xe2ca('0x2c')][_0xe2ca('0x2d')]);_0x300d0e[_0xe2ca('0x2e')]=_[_0xe2ca('0x2b')](_0x565e9b[_0xe2ca('0x2e')]);_0x300d0e[_0xe2ca('0x2f')]=_[_0xe2ca('0x30')](_0x300d0e[_0xe2ca('0x2a')],_0x300d0e[_0xe2ca('0x2e')]);_0x333665['attributes']=_[_0xe2ca('0x30')](_0x300d0e[_0xe2ca('0x2a')],qs[_0xe2ca('0x31')](_0x565e9b[_0xe2ca('0x2e')][_0xe2ca('0x31')]));_0x333665[_0xe2ca('0x32')]=_0x333665[_0xe2ca('0x32')]['length']?_0x333665['attributes']:_0x300d0e['model'];if(_0x565e9b[_0xe2ca('0x2e')][_0xe2ca('0x33')]){_0x333665[_0xe2ca('0x34')]=[{'all':!![]}];}_0x333665=_[_0xe2ca('0x35')]({},_0x333665,_0x565e9b[_0xe2ca('0x36')]);return db['ChatApplication'][_0xe2ca('0x37')](_0x333665)[_0xe2ca('0x21')](handleEntityNotFound(_0x5df46f,null))['then'](respondWithResult(_0x5df46f,null))[_0xe2ca('0x38')](handleError(_0x5df46f,null));};exports[_0xe2ca('0x20')]=function(_0x21d7bf,_0x48b0f8){if(_0x21d7bf[_0xe2ca('0x39')]['id']){delete _0x21d7bf[_0xe2ca('0x39')]['id'];}return db[_0xe2ca('0x2c')]['find']({'where':{'id':_0x21d7bf[_0xe2ca('0x29')]['id']}})['then'](handleEntityNotFound(_0x48b0f8,null))[_0xe2ca('0x21')](saveUpdates(_0x21d7bf['body'],null))['then'](respondWithResult(_0x48b0f8,null))[_0xe2ca('0x38')](handleError(_0x48b0f8,null));};exports[_0xe2ca('0x22')]=function(_0x2dbf5e,_0x57e784){return db[_0xe2ca('0x2c')][_0xe2ca('0x37')]({'where':{'id':_0x2dbf5e[_0xe2ca('0x29')]['id']}})[_0xe2ca('0x21')](handleEntityNotFound(_0x57e784,null))['then'](removeEntity(_0x57e784,null))['catch'](handleError(_0x57e784,null));};
\ No newline at end of file
index 9e62571..bb89672 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0a12=['util','bluebird','path','rimraf','../../config/environment','./chatApplication.attributes','exports','chat_applications'];(function(_0x249dfe,_0x21f85c){var _0xc7c7be=function(_0x3d0837){while(--_0x3d0837){_0x249dfe['push'](_0x249dfe['shift']());}};_0xc7c7be(++_0x21f85c);}(_0x0a12,0xb8));var _0x20a1=function(_0x38537f,_0x252124){_0x38537f=_0x38537f-0x0;var _0x141e23=_0x0a12[_0x38537f];return _0x141e23;};'use strict';var _=require('lodash');var util=require(_0x20a1('0x0'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x20a1('0x1'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x20a1('0x2'));var rimraf=require(_0x20a1('0x3'));var config=require(_0x20a1('0x4'));var attributes=require(_0x20a1('0x5'));module[_0x20a1('0x6')]=function(_0x2e0ad3,_0x1fedd2){return _0x2e0ad3['define']('ChatApplication',attributes,{'tableName':_0x20a1('0x7'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0x4946=['request-promise','../../config/environment','exports','define','utf8mb4','utf8mb4_unicode_ci','lodash','util','api'];(function(_0x341cbf,_0x52be4a){var _0x3ebf74=function(_0x2943bd){while(--_0x2943bd){_0x341cbf['push'](_0x341cbf['shift']());}};_0x3ebf74(++_0x52be4a);}(_0x4946,0x1b6));var _0x6494=function(_0x40f451,_0x4bbff8){_0x40f451=_0x40f451-0x0;var _0x4c09b3=_0x4946[_0x40f451];return _0x4c09b3;};'use strict';var _=require(_0x6494('0x0'));var util=require(_0x6494('0x1'));var logger=require('../../config/logger')(_0x6494('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x6494('0x3'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x6494('0x4'));var attributes=require('./chatApplication.attributes');module[_0x6494('0x5')]=function(_0x54e930,_0x3cb2bc){return _0x54e930[_0x6494('0x6')]('ChatApplication',attributes,{'tableName':'chat_applications','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x6494('0x7'),'collate':_0x6494('0x8')});};
\ No newline at end of file
index 2763571..f36fc99 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbdd9=['ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','ChatApplication,\x20%s,\x20%s','debug','ChatApplication,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','lodash','bluebird'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0xbdd9,0x1ec));var _0x9bdd=function(_0x328b1c,_0xec0b4f){_0x328b1c=_0x328b1c-0x0;var _0x4dbeaa=_0xbdd9[_0x328b1c];return _0x4dbeaa;};'use strict';var _=require(_0x9bdd('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x9bdd('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9bdd('0x2'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x9bdd('0x3'))(_0x9bdd('0x4'));var config=require(_0x9bdd('0x5'));var jayson=require(_0x9bdd('0x6'));var client=jayson[_0x9bdd('0x7')][_0x9bdd('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x323651,_0x3b3362,_0x557392){return new BPromise(function(_0x18378f,_0x561512){return client['request'](_0x323651,_0x557392)[_0x9bdd('0x9')](function(_0x5833ee){logger[_0x9bdd('0xa')](_0x9bdd('0xb'),_0x3b3362,'request\x20sent');logger[_0x9bdd('0xc')](_0x9bdd('0xd'),_0x3b3362,_0x9bdd('0xe'),JSON[_0x9bdd('0xf')](_0x5833ee));if(_0x5833ee[_0x9bdd('0x10')]){if(_0x5833ee[_0x9bdd('0x10')]['code']===0x1f4){logger[_0x9bdd('0x10')](_0x9bdd('0xb'),_0x3b3362,_0x5833ee[_0x9bdd('0x10')][_0x9bdd('0x11')]);return _0x561512(_0x5833ee['error'][_0x9bdd('0x11')]);}logger[_0x9bdd('0x10')](_0x9bdd('0xb'),_0x3b3362,_0x5833ee['error'][_0x9bdd('0x11')]);return _0x18378f(_0x5833ee[_0x9bdd('0x10')][_0x9bdd('0x11')]);}else{logger[_0x9bdd('0xa')](_0x9bdd('0xb'),_0x3b3362,_0x9bdd('0xe'));_0x18378f(_0x5833ee[_0x9bdd('0x12')]['message']);}})['catch'](function(_0x586502){logger['error'](_0x9bdd('0xb'),_0x3b3362,_0x586502);_0x561512(_0x586502);});});}
\ No newline at end of file
+var _0x102d=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','info','ChatApplication,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','util','moment'];(function(_0x434339,_0x2abf5e){var _0x507ca6=function(_0x23770a){while(--_0x23770a){_0x434339['push'](_0x434339['shift']());}};_0x507ca6(++_0x2abf5e);}(_0x102d,0x1dd));var _0xd102=function(_0x41498e,_0xe11de7){_0x41498e=_0x41498e-0x0;var _0x2496e2=_0x102d[_0x41498e];return _0x2496e2;};'use strict';var _=require(_0xd102('0x0'));var util=require(_0xd102('0x1'));var moment=require(_0xd102('0x2'));var BPromise=require(_0xd102('0x3'));var rs=require(_0xd102('0x4'));var fs=require('fs');var Redis=require(_0xd102('0x5'));var db=require(_0xd102('0x6'))['db'];var utils=require(_0xd102('0x7'));var logger=require(_0xd102('0x8'))(_0xd102('0x9'));var config=require(_0xd102('0xa'));var jayson=require(_0xd102('0xb'));var client=jayson[_0xd102('0xc')]['http']({'port':0x232a});function respondWithRpcPromise(_0x174b3b,_0x266c1e,_0x3ab5a6){return new BPromise(function(_0x339698,_0x1e37b2){return client['request'](_0x174b3b,_0x3ab5a6)[_0xd102('0xd')](function(_0x5ca006){logger[_0xd102('0xe')](_0xd102('0xf'),_0x266c1e,_0xd102('0x10'));logger[_0xd102('0x11')]('ChatApplication,\x20%s,\x20%s,\x20%s',_0x266c1e,'request\x20sent',JSON[_0xd102('0x12')](_0x5ca006));if(_0x5ca006[_0xd102('0x13')]){if(_0x5ca006['error'][_0xd102('0x14')]===0x1f4){logger['error'](_0xd102('0xf'),_0x266c1e,_0x5ca006['error'][_0xd102('0x15')]);return _0x1e37b2(_0x5ca006[_0xd102('0x13')]['message']);}logger['error'](_0xd102('0xf'),_0x266c1e,_0x5ca006[_0xd102('0x13')][_0xd102('0x15')]);return _0x339698(_0x5ca006[_0xd102('0x13')][_0xd102('0x15')]);}else{logger['info'](_0xd102('0xf'),_0x266c1e,'request\x20sent');_0x339698(_0x5ca006[_0xd102('0x16')][_0xd102('0x15')]);}})[_0xd102('0x17')](function(_0x2cfd88){logger[_0xd102('0x13')]('ChatApplication,\x20%s,\x20%s',_0x266c1e,_0x2cfd88);_0x1e37b2(_0x2cfd88);});});}
\ No newline at end of file
index 138a2f4..e310a0c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5399=['show','put','/:id','update','delete','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./chatApplication.controller','get','isAuthenticated'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x5399,0x1f3));var _0x9539=function(_0x3b5964,_0x2f21c4){_0x3b5964=_0x3b5964-0x0;var _0xbc8296=_0x5399[_0x3b5964];return _0xbc8296;};'use strict';var multer=require(_0x9539('0x0'));var util=require('util');var path=require(_0x9539('0x1'));var timeout=require(_0x9539('0x2'));var express=require(_0x9539('0x3'));var router=express[_0x9539('0x4')]();var fs_extra=require(_0x9539('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x9539('0x6'));var config=require(_0x9539('0x7'));var controller=require(_0x9539('0x8'));router[_0x9539('0x9')]('/:id',auth[_0x9539('0xa')](),controller[_0x9539('0xb')]);router[_0x9539('0xc')](_0x9539('0xd'),auth['isAuthenticated'](),controller[_0x9539('0xe')]);router[_0x9539('0xf')](_0x9539('0xd'),auth['isAuthenticated'](),controller['destroy']);module[_0x9539('0x10')]=router;
\ No newline at end of file
+var _0x44b8=['Router','fs-extra','../../components/auth/service','../../config/environment','./chatApplication.controller','get','/:id','isAuthenticated','show','put','update','delete','destroy','util','express'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0x44b8,0x175));var _0x844b=function(_0x3b1351,_0x5c61eb){_0x3b1351=_0x3b1351-0x0;var _0x535cb7=_0x44b8[_0x3b1351];return _0x535cb7;};'use strict';var multer=require('multer');var util=require(_0x844b('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x844b('0x1'));var router=express[_0x844b('0x2')]();var fs_extra=require(_0x844b('0x3'));var auth=require(_0x844b('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x844b('0x5'));var controller=require(_0x844b('0x6'));router[_0x844b('0x7')](_0x844b('0x8'),auth[_0x844b('0x9')](),controller[_0x844b('0xa')]);router[_0x844b('0xb')]('/:id',auth[_0x844b('0x9')](),controller[_0x844b('0xc')]);router[_0x844b('0xd')](_0x844b('0x8'),auth['isAuthenticated'](),controller[_0x844b('0xe')]);module['exports']=router;
\ No newline at end of file
index 2b70d6b..7ba1954 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdf13=['STRING','exports'];(function(_0x10c4fa,_0x1400e6){var _0x5cd3bf=function(_0x19b739){while(--_0x19b739){_0x10c4fa['push'](_0x10c4fa['shift']());}};_0x5cd3bf(++_0x1400e6);}(_0xdf13,0x171));var _0x3df1=function(_0x264c84,_0x598700){_0x264c84=_0x264c84-0x0;var _0x1fd84c=_0xdf13[_0x264c84];return _0x1fd84c;};'use strict';var Sequelize=require('sequelize');module[_0x3df1('0x0')]={'name':{'type':Sequelize[_0x3df1('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x3df1('0x1')]},'write':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]}};
\ No newline at end of file
+var _0x11e5=['STRING','sequelize'];(function(_0x38ced4,_0x24263f){var _0x547c07=function(_0x279fc4){while(--_0x279fc4){_0x38ced4['push'](_0x38ced4['shift']());}};_0x547c07(++_0x24263f);}(_0x11e5,0x8b));var _0x511e=function(_0x40f5e0,_0x254544){_0x40f5e0=_0x40f5e0-0x0;var _0x54e0eb=_0x11e5[_0x40f5e0];return _0x54e0eb;};'use strict';var Sequelize=require(_0x511e('0x0'));module['exports']={'name':{'type':Sequelize[_0x511e('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x511e('0x1')]},'write':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]}};
\ No newline at end of file
index 92cfaba..a031301 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb8d4=['sox','to-csv','fs-extra','lodash','squel','crypto','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','./chatGroup.socket','register','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','error','name','send','index','ChatGroup','rawAttributes','type','key','model','map','query','keys','filters','fields','attributes','length','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','include','rows','catch','show','params','intersection','includeAll','find','create','body','destroy','user','addMembers','ids','findOne','getMembers','removeMembers','addMessage','getMessages','ChatInternalMessage','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','path'];(function(_0x2f44be,_0x33a80d){var _0x5a6380=function(_0x5345fb){while(--_0x5345fb){_0x2f44be['push'](_0x2f44be['shift']());}};_0x5a6380(++_0x33a80d);}(_0xb8d4,0x1c4));var _0x4b8d=function(_0x13b8f3,_0x442821){_0x13b8f3=_0x13b8f3-0x0;var _0x1a6d06=_0xb8d4[_0x13b8f3];return _0x1a6d06;};'use strict';var emlformat=require(_0x4b8d('0x0'));var rimraf=require(_0x4b8d('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x4b8d('0x2'));var rp=require('request-promise');var moment=require(_0x4b8d('0x3'));var BPromise=require(_0x4b8d('0x4'));var Mustache=require(_0x4b8d('0x5'));var util=require(_0x4b8d('0x6'));var path=require(_0x4b8d('0x7'));var sox=require(_0x4b8d('0x8'));var csv=require(_0x4b8d('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x4b8d('0xa'));var _=require(_0x4b8d('0xb'));var squel=require(_0x4b8d('0xc'));var crypto=require(_0x4b8d('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x4b8d('0x9'));var querystring=require('querystring');var Papa=require(_0x4b8d('0xe'));var Redis=require(_0x4b8d('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x4b8d('0x10'));var as=require(_0x4b8d('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x4b8d('0x12'))(_0x4b8d('0x13'));var utils=require(_0x4b8d('0x14'));var config=require(_0x4b8d('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x4b8d('0x16'))['db'];config[_0x4b8d('0x17')]=_[_0x4b8d('0x18')](config[_0x4b8d('0x17')],{'host':_0x4b8d('0x19'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x4b8d('0x17')]));require(_0x4b8d('0x1a'))[_0x4b8d('0x1b')](socket);function respondWithStatusCode(_0x3e08cd,_0x471a07){_0x471a07=_0x471a07||0xcc;return function(_0x292c8a){if(_0x292c8a){return _0x3e08cd[_0x4b8d('0x1c')](_0x471a07);}return _0x3e08cd[_0x4b8d('0x1d')](_0x471a07)[_0x4b8d('0x1e')]();};}function respondWithResult(_0x20cdb8,_0x552438){_0x552438=_0x552438||0xc8;return function(_0x5b1989){if(_0x5b1989){return _0x20cdb8['status'](_0x552438)[_0x4b8d('0x1f')](_0x5b1989);}};}function respondWithFilteredResult(_0xc79903,_0x3200d9){return function(_0x10f5c0){if(_0x10f5c0){var _0x46a58d=typeof _0x3200d9[_0x4b8d('0x20')]===_0x4b8d('0x21')&&typeof _0x3200d9[_0x4b8d('0x22')]==='undefined';var _0x1c0fea=_0x10f5c0[_0x4b8d('0x23')];var _0x368bbb=_0x46a58d?0x0:_0x3200d9[_0x4b8d('0x20')];var _0x5e6160=_0x46a58d?_0x10f5c0[_0x4b8d('0x23')]:_0x3200d9['offset']+_0x3200d9[_0x4b8d('0x22')];var _0x112b1c;if(_0x5e6160>=_0x1c0fea){_0x5e6160=_0x1c0fea;_0x112b1c=0xc8;}else{_0x112b1c=0xce;}_0xc79903[_0x4b8d('0x1d')](_0x112b1c);return _0xc79903[_0x4b8d('0x24')](_0x4b8d('0x25'),_0x368bbb+'-'+_0x5e6160+'/'+_0x1c0fea)[_0x4b8d('0x1f')](_0x10f5c0);}return null;};}function patchUpdates(_0x2319c2){return function(_0x1a886a){try{jsonpatch[_0x4b8d('0x26')](_0x1a886a,_0x2319c2,!![]);}catch(_0x2a3783){return BPromise[_0x4b8d('0x27')](_0x2a3783);}return _0x1a886a[_0x4b8d('0x28')]();};}function saveUpdates(_0x2fb41d,_0x5d685b){return function(_0x5b2a2c){if(_0x5b2a2c){return _0x5b2a2c[_0x4b8d('0x29')](_0x2fb41d)['then'](function(_0x5b5020){return _0x5b5020;});}return null;};}function removeEntity(_0x1a8934,_0x407790){return function(_0x6fe6a0){if(_0x6fe6a0){return _0x6fe6a0['destroy']()[_0x4b8d('0x2a')](function(){_0x1a8934[_0x4b8d('0x1d')](0xcc)[_0x4b8d('0x1e')]();});}};}function handleEntityNotFound(_0xca5f15,_0x57935a){return function(_0x476c0c){if(!_0x476c0c){_0xca5f15[_0x4b8d('0x1c')](0x194);}return _0x476c0c;};}function handleError(_0x4027d5,_0x16014d){_0x16014d=_0x16014d||0x1f4;return function(_0x414478){logger[_0x4b8d('0x2b')](_0x414478['stack']);if(_0x414478['name']){delete _0x414478[_0x4b8d('0x2c')];}_0x4027d5[_0x4b8d('0x1d')](_0x16014d)[_0x4b8d('0x2d')](_0x414478);};}exports[_0x4b8d('0x2e')]=function(_0x18e205,_0x1603d8){var _0x20276f={},_0x3591e8={},_0x29814f={'count':0x0,'rows':[]};var _0xac6599=_['map'](db[_0x4b8d('0x2f')][_0x4b8d('0x30')],function(_0x4ebcc8){return{'name':_0x4ebcc8['fieldName'],'type':_0x4ebcc8[_0x4b8d('0x31')][_0x4b8d('0x32')]};});_0x3591e8[_0x4b8d('0x33')]=_[_0x4b8d('0x34')](_0xac6599,_0x4b8d('0x2c'));_0x3591e8[_0x4b8d('0x35')]=_[_0x4b8d('0x36')](_0x18e205[_0x4b8d('0x35')]);_0x3591e8[_0x4b8d('0x37')]=_['intersection'](_0x3591e8[_0x4b8d('0x33')],_0x3591e8[_0x4b8d('0x35')]);_0x20276f['attributes']=_['intersection'](_0x3591e8[_0x4b8d('0x33')],qs[_0x4b8d('0x38')](_0x18e205['query'][_0x4b8d('0x38')]));_0x20276f[_0x4b8d('0x39')]=_0x20276f[_0x4b8d('0x39')][_0x4b8d('0x3a')]?_0x20276f['attributes']:_0x3591e8[_0x4b8d('0x33')];if(!_0x18e205[_0x4b8d('0x35')][_0x4b8d('0x3b')]('nolimit')){_0x20276f[_0x4b8d('0x22')]=qs[_0x4b8d('0x22')](_0x18e205[_0x4b8d('0x35')]['limit']);_0x20276f[_0x4b8d('0x20')]=qs['offset'](_0x18e205[_0x4b8d('0x35')]['offset']);}_0x20276f[_0x4b8d('0x3c')]=qs[_0x4b8d('0x3d')](_0x18e205[_0x4b8d('0x35')]['sort']);_0x20276f[_0x4b8d('0x3e')]=qs[_0x4b8d('0x37')](_[_0x4b8d('0x3f')](_0x18e205['query'],_0x3591e8[_0x4b8d('0x37')]),_0xac6599);if(_0x18e205[_0x4b8d('0x35')][_0x4b8d('0x40')]){_0x20276f[_0x4b8d('0x3e')]=_[_0x4b8d('0x41')](_0x20276f[_0x4b8d('0x3e')],{'$or':_['map'](_0xac6599,function(_0x5ef48d){if(_0x5ef48d['type']!==_0x4b8d('0x42')){var _0x316197={};_0x316197[_0x5ef48d[_0x4b8d('0x2c')]]={'$like':'%'+_0x18e205[_0x4b8d('0x35')][_0x4b8d('0x40')]+'%'};return _0x316197;}})});}_0x20276f=_[_0x4b8d('0x41')]({},_0x20276f,_0x18e205[_0x4b8d('0x43')]);var _0x251c3b={'where':_0x20276f[_0x4b8d('0x3e')]};return db['ChatGroup']['count'](_0x251c3b)['then'](function(_0xb62291){_0x29814f[_0x4b8d('0x23')]=_0xb62291;if(_0x18e205[_0x4b8d('0x35')]['includeAll']){_0x20276f[_0x4b8d('0x44')]=[{'all':!![]}];}return db[_0x4b8d('0x2f')]['findAll'](_0x20276f);})[_0x4b8d('0x2a')](function(_0x8aa7c8){_0x29814f[_0x4b8d('0x45')]=_0x8aa7c8;return _0x29814f;})[_0x4b8d('0x2a')](respondWithFilteredResult(_0x1603d8,_0x20276f))[_0x4b8d('0x46')](handleError(_0x1603d8,null));};exports[_0x4b8d('0x47')]=function(_0x35e070,_0x14b763){var _0x5418c0={'raw':!![],'where':{'id':_0x35e070[_0x4b8d('0x48')]['id']}},_0x3dd87b={};_0x3dd87b['model']=_[_0x4b8d('0x36')](db[_0x4b8d('0x2f')]['rawAttributes']);_0x3dd87b[_0x4b8d('0x35')]=_[_0x4b8d('0x36')](_0x35e070['query']);_0x3dd87b[_0x4b8d('0x37')]=_['intersection'](_0x3dd87b[_0x4b8d('0x33')],_0x3dd87b['query']);_0x5418c0[_0x4b8d('0x39')]=_[_0x4b8d('0x49')](_0x3dd87b[_0x4b8d('0x33')],qs['fields'](_0x35e070['query'][_0x4b8d('0x38')]));_0x5418c0[_0x4b8d('0x39')]=_0x5418c0[_0x4b8d('0x39')][_0x4b8d('0x3a')]?_0x5418c0[_0x4b8d('0x39')]:_0x3dd87b[_0x4b8d('0x33')];if(_0x35e070['query'][_0x4b8d('0x4a')]){_0x5418c0[_0x4b8d('0x44')]=[{'all':!![]}];}_0x5418c0=_[_0x4b8d('0x41')]({},_0x5418c0,_0x35e070[_0x4b8d('0x43')]);return db['ChatGroup'][_0x4b8d('0x4b')](_0x5418c0)[_0x4b8d('0x2a')](handleEntityNotFound(_0x14b763,null))[_0x4b8d('0x2a')](respondWithResult(_0x14b763,null))['catch'](handleError(_0x14b763,null));};exports[_0x4b8d('0x4c')]=function(_0x3edb83,_0x51efc4){return db[_0x4b8d('0x2f')][_0x4b8d('0x4c')](_0x3edb83[_0x4b8d('0x4d')],{})[_0x4b8d('0x2a')](respondWithResult(_0x51efc4,0xc9))[_0x4b8d('0x46')](handleError(_0x51efc4,null));};exports[_0x4b8d('0x29')]=function(_0x121b21,_0x8b3949){if(_0x121b21['body']['id']){delete _0x121b21[_0x4b8d('0x4d')]['id'];}return db[_0x4b8d('0x2f')][_0x4b8d('0x4b')]({'where':{'id':_0x121b21['params']['id']}})[_0x4b8d('0x2a')](handleEntityNotFound(_0x8b3949,null))['then'](saveUpdates(_0x121b21[_0x4b8d('0x4d')],null))[_0x4b8d('0x2a')](respondWithResult(_0x8b3949,null))['catch'](handleError(_0x8b3949,null));};exports[_0x4b8d('0x4e')]=function(_0x1b1695,_0x276789){return db[_0x4b8d('0x2f')][_0x4b8d('0x4b')]({'where':{'id':_0x1b1695[_0x4b8d('0x48')]['id']}})['then'](handleEntityNotFound(_0x276789,null))['then'](removeEntity(_0x276789,null))['catch'](handleError(_0x276789,null));};exports['describe']=function(_0x98fd19,_0x2cb873){return db[_0x4b8d('0x2f')]['describe']()[_0x4b8d('0x2a')](respondWithResult(_0x2cb873,null))['catch'](handleError(_0x2cb873,null));};exports['getUnread']=function(_0x5de4de,_0xb0ddf5,_0x3d40ce){return db['ChatInternalMessage'][_0x4b8d('0x23')]({'where':{'ChatGroupId':_0x5de4de['params']['id'],'ToId':_0x5de4de[_0x4b8d('0x4f')]['id'],'read':![]}})['then'](function(_0x2c235e){return{'id':_['toInteger'](_0x5de4de['params']['id']),'count':_0x2c235e};})['then'](respondWithResult(_0xb0ddf5,null))[_0x4b8d('0x46')](handleError(_0xb0ddf5,null));};exports[_0x4b8d('0x50')]=function(_0x598611,_0x4ecde8,_0x422359){return db[_0x4b8d('0x2f')][_0x4b8d('0x4b')]({'where':{'id':_0x598611[_0x4b8d('0x48')]['id']}})[_0x4b8d('0x2a')](handleEntityNotFound(_0x4ecde8,null))[_0x4b8d('0x2a')](function(_0x44c573){if(_0x44c573){return _0x44c573[_0x4b8d('0x50')](_0x598611[_0x4b8d('0x4d')][_0x4b8d('0x51')],_['omit'](_0x598611[_0x4b8d('0x4d')],[_0x4b8d('0x51'),'id'])||{});}})[_0x4b8d('0x2a')](respondWithResult(_0x4ecde8,null))[_0x4b8d('0x46')](handleError(_0x4ecde8,null));};exports['getMembers']=function(_0x5525e2,_0x49a081,_0xb2b8bb){var _0x5bffc5={};var _0x5f508e={};var _0x277cfa;var _0xeec065;return db[_0x4b8d('0x2f')][_0x4b8d('0x52')]({'where':{'id':_0x5525e2['params']['id']}})['then'](handleEntityNotFound(_0x49a081,null))[_0x4b8d('0x2a')](function(_0x292045){if(_0x292045){_0x277cfa=_0x292045;_0x5f508e[_0x4b8d('0x33')]=_[_0x4b8d('0x36')](db['User']['rawAttributes']);_0x5f508e[_0x4b8d('0x35')]=_['keys'](_0x5525e2[_0x4b8d('0x35')]);_0x5f508e[_0x4b8d('0x37')]=_[_0x4b8d('0x49')](_0x5f508e[_0x4b8d('0x33')],_0x5f508e[_0x4b8d('0x35')]);_0x5bffc5['attributes']=_[_0x4b8d('0x49')](_0x5f508e[_0x4b8d('0x33')],qs[_0x4b8d('0x38')](_0x5525e2['query'][_0x4b8d('0x38')]));_0x5bffc5['attributes']=_0x5bffc5['attributes']['length']?_0x5bffc5['attributes']:_0x5f508e[_0x4b8d('0x33')];_0x5bffc5['order']=qs[_0x4b8d('0x3d')](_0x5525e2['query'][_0x4b8d('0x3d')]);_0x5bffc5[_0x4b8d('0x3e')]=qs[_0x4b8d('0x37')](_[_0x4b8d('0x3f')](_0x5525e2['query'],_0x5f508e[_0x4b8d('0x37')]));if(_0x5525e2[_0x4b8d('0x35')][_0x4b8d('0x40')]){_0x5bffc5[_0x4b8d('0x3e')]=_[_0x4b8d('0x41')](_0x5bffc5['where'],{'$or':_[_0x4b8d('0x34')](_0x5bffc5[_0x4b8d('0x39')],function(_0x320a8e){var _0x281d53={};_0x281d53[_0x320a8e]={'$like':'%'+_0x5525e2[_0x4b8d('0x35')][_0x4b8d('0x40')]+'%'};return _0x281d53;})});}_0x5bffc5=_[_0x4b8d('0x41')]({},_0x5bffc5,_0x5525e2[_0x4b8d('0x43')]);return _0x277cfa[_0x4b8d('0x53')](_0x5bffc5);}})['then'](function(_0x1d6fe8){if(_0x1d6fe8){_0xeec065=_0x1d6fe8[_0x4b8d('0x3a')];if(!_0x5525e2[_0x4b8d('0x35')][_0x4b8d('0x3b')]('nolimit')){_0x5bffc5['limit']=qs[_0x4b8d('0x22')](_0x5525e2[_0x4b8d('0x35')][_0x4b8d('0x22')]);_0x5bffc5['offset']=qs[_0x4b8d('0x20')](_0x5525e2['query'][_0x4b8d('0x20')]);}return _0x277cfa[_0x4b8d('0x53')](_0x5bffc5);}})[_0x4b8d('0x2a')](function(_0x26956b){if(_0x26956b){return _0x26956b?{'count':_0xeec065,'rows':_0x26956b}:null;}})[_0x4b8d('0x2a')](respondWithResult(_0x49a081,null))['catch'](handleError(_0x49a081,null));};exports['removeMembers']=function(_0x1520a5,_0x1aad4f,_0x1ff368){return db['ChatGroup'][_0x4b8d('0x4b')]({'where':{'id':_0x1520a5[_0x4b8d('0x48')]['id']}})[_0x4b8d('0x2a')](handleEntityNotFound(_0x1aad4f,null))[_0x4b8d('0x2a')](function(_0x40bde3){if(_0x40bde3){return _0x40bde3[_0x4b8d('0x54')](_0x1520a5[_0x4b8d('0x35')][_0x4b8d('0x51')]);}})['then'](respondWithStatusCode(_0x1aad4f,null))['catch'](handleError(_0x1aad4f,null));};exports[_0x4b8d('0x55')]=function(_0x2a0f4b,_0x484e11,_0x1a06fd){if(_0x2a0f4b[_0x4b8d('0x4d')]['id']){delete _0x2a0f4b['body']['id'];}return db['ChatGroup']['find']({'where':{'id':_0x2a0f4b[_0x4b8d('0x48')]['id']}})[_0x4b8d('0x2a')](handleEntityNotFound(_0x484e11,null))[_0x4b8d('0x2a')](function(_0x309bff){if(_0x309bff){_0x2a0f4b[_0x4b8d('0x4d')]['ChatGroupId']=_0x309bff['id'];return db['ChatInternalMessage'][_0x4b8d('0x4c')](_0x2a0f4b[_0x4b8d('0x4d')]);}})[_0x4b8d('0x2a')](respondWithResult(_0x484e11,null))['catch'](handleError(_0x484e11,null));};exports[_0x4b8d('0x56')]=function(_0x5c9169,_0x5d1a4a,_0xd7351){var _0x4db391={};var _0x20f598={};var _0x29e837;var _0x51ff10;return db['ChatGroup'][_0x4b8d('0x52')]({'where':{'id':_0x5c9169[_0x4b8d('0x48')]['id']}})[_0x4b8d('0x2a')](handleEntityNotFound(_0x5d1a4a,null))[_0x4b8d('0x2a')](function(_0x3f1bbc){if(_0x3f1bbc){_0x29e837=_0x3f1bbc;_0x20f598['model']=_[_0x4b8d('0x36')](db[_0x4b8d('0x57')][_0x4b8d('0x30')]);_0x20f598['query']=_[_0x4b8d('0x36')](_0x5c9169[_0x4b8d('0x35')]);_0x20f598['filters']=_[_0x4b8d('0x49')](_0x20f598[_0x4b8d('0x33')],_0x20f598[_0x4b8d('0x35')]);_0x4db391[_0x4b8d('0x39')]=_[_0x4b8d('0x49')](_0x20f598['model'],qs[_0x4b8d('0x38')](_0x5c9169['query'][_0x4b8d('0x38')]));_0x4db391[_0x4b8d('0x39')]=_0x4db391[_0x4b8d('0x39')][_0x4b8d('0x3a')]?_0x4db391[_0x4b8d('0x39')]:_0x20f598[_0x4b8d('0x33')];_0x4db391['order']=qs[_0x4b8d('0x3d')](_0x5c9169[_0x4b8d('0x35')]['sort']);_0x4db391[_0x4b8d('0x3e')]=qs[_0x4b8d('0x37')](_[_0x4b8d('0x3f')](_0x5c9169[_0x4b8d('0x35')],_0x20f598[_0x4b8d('0x37')]));if(_0x5c9169[_0x4b8d('0x35')][_0x4b8d('0x40')]){_0x4db391['where']=_['merge'](_0x4db391[_0x4b8d('0x3e')],{'$or':_[_0x4b8d('0x34')](_0x4db391['attributes'],function(_0x1e99f6){var _0xffce82={};_0xffce82[_0x1e99f6]={'$like':'%'+_0x5c9169[_0x4b8d('0x35')][_0x4b8d('0x40')]+'%'};return _0xffce82;})});}if(_0x5c9169[_0x4b8d('0x35')][_0x4b8d('0x58')]){var _0x595ebc=_0x5c9169[_0x4b8d('0x35')][_0x4b8d('0x58')][_0x4b8d('0x59')](',');var _0x313420={};_0x313420[_0x595ebc[0x0]]={'$gte':moment(_0x595ebc[0x1])[_0x4b8d('0x5a')](_0x4b8d('0x5b'))};_0x4db391['where']=_[_0x4b8d('0x41')](_0x4db391['where'],_0x313420);}_0x4db391=_[_0x4b8d('0x41')]({},_0x4db391,_0x5c9169[_0x4b8d('0x43')]);return _0x29e837[_0x4b8d('0x56')](_0x4db391);}})['then'](function(_0x4a33c0){if(_0x4a33c0){_0x51ff10=_0x4a33c0[_0x4b8d('0x3a')];if(!_0x5c9169[_0x4b8d('0x35')][_0x4b8d('0x3b')]('nolimit')){_0x4db391[_0x4b8d('0x22')]=qs[_0x4b8d('0x22')](_0x5c9169['query'][_0x4b8d('0x22')]);_0x4db391[_0x4b8d('0x20')]=qs[_0x4b8d('0x20')](_0x5c9169[_0x4b8d('0x35')][_0x4b8d('0x20')]);}return _0x29e837[_0x4b8d('0x56')](_0x4db391);}})[_0x4b8d('0x2a')](function(_0x31489c){if(_0x31489c){return _0x31489c?{'count':_0x51ff10,'rows':_0x31489c}:null;}})[_0x4b8d('0x2a')](respondWithResult(_0x5d1a4a,null))[_0x4b8d('0x46')](handleError(_0x5d1a4a,null));};
\ No newline at end of file
+var _0xbbba=['desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','./chatGroup.socket','register','sendStatus','status','json','offset','undefined','count','set','Content-Range','apply','save','update','destroy','then','error','name','send','index','map','ChatGroup','rawAttributes','fieldName','type','model','keys','query','intersection','attributes','length','nolimit','limit','order','sort','pick','filter','where','merge','VIRTUAL','options','includeAll','findAll','rows','catch','params','include','find','create','body','describe','ChatInternalMessage','user','addMembers','ids','getMembers','User','fields','filters','hasOwnProperty','removeMembers','addMessage','getMessages','findOne','$gte','split','YYYY-MM-DD\x20HH:mm:ss','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','lodash','squel','jsforce'];(function(_0x4145f0,_0x193417){var _0x5d58bd=function(_0x4ffe92){while(--_0x4ffe92){_0x4145f0['push'](_0x4145f0['shift']());}};_0x5d58bd(++_0x193417);}(_0xbbba,0xad));var _0xabbb=function(_0x301ca3,_0x4233c5){_0x301ca3=_0x301ca3-0x0;var _0x131292=_0xbbba[_0x301ca3];return _0x131292;};'use strict';var emlformat=require(_0xabbb('0x0'));var rimraf=require(_0xabbb('0x1'));var zipdir=require(_0xabbb('0x2'));var jsonpatch=require(_0xabbb('0x3'));var rp=require(_0xabbb('0x4'));var moment=require(_0xabbb('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xabbb('0x6'));var util=require(_0xabbb('0x7'));var path=require(_0xabbb('0x8'));var sox=require(_0xabbb('0x9'));var csv=require(_0xabbb('0xa'));var ejs=require(_0xabbb('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xabbb('0xc'));var squel=require(_0xabbb('0xd'));var crypto=require('crypto');var jsforce=require(_0xabbb('0xe'));var deskjs=require(_0xabbb('0xf'));var toCsv=require('to-csv');var querystring=require(_0xabbb('0x10'));var Papa=require(_0xabbb('0x11'));var Redis=require('ioredis');var authService=require(_0xabbb('0x12'));var qs=require(_0xabbb('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xabbb('0x14'))(_0xabbb('0x15'));var utils=require('../../config/utils');var config=require(_0xabbb('0x16'));var licenseUtil=require(_0xabbb('0x17'));var db=require(_0xabbb('0x18'))['db'];config[_0xabbb('0x19')]=_['defaults'](config['redis'],{'host':_0xabbb('0x1a'),'port':0x18eb});var socket=require(_0xabbb('0x1b'))(new Redis(config[_0xabbb('0x19')]));require(_0xabbb('0x1c'))[_0xabbb('0x1d')](socket);function respondWithStatusCode(_0x4490ab,_0x3f4bd9){_0x3f4bd9=_0x3f4bd9||0xcc;return function(_0x4c048c){if(_0x4c048c){return _0x4490ab[_0xabbb('0x1e')](_0x3f4bd9);}return _0x4490ab[_0xabbb('0x1f')](_0x3f4bd9)['end']();};}function respondWithResult(_0x35e933,_0x26ac18){_0x26ac18=_0x26ac18||0xc8;return function(_0x43533c){if(_0x43533c){return _0x35e933[_0xabbb('0x1f')](_0x26ac18)[_0xabbb('0x20')](_0x43533c);}};}function respondWithFilteredResult(_0x3fe69a,_0x35215b){return function(_0x23daaf){if(_0x23daaf){var _0x1933d7=typeof _0x35215b[_0xabbb('0x21')]==='undefined'&&typeof _0x35215b['limit']===_0xabbb('0x22');var _0x1bfeb4=_0x23daaf[_0xabbb('0x23')];var _0x2c8882=_0x1933d7?0x0:_0x35215b[_0xabbb('0x21')];var _0x50e698=_0x1933d7?_0x23daaf[_0xabbb('0x23')]:_0x35215b[_0xabbb('0x21')]+_0x35215b['limit'];var _0x557faf;if(_0x50e698>=_0x1bfeb4){_0x50e698=_0x1bfeb4;_0x557faf=0xc8;}else{_0x557faf=0xce;}_0x3fe69a['status'](_0x557faf);return _0x3fe69a[_0xabbb('0x24')](_0xabbb('0x25'),_0x2c8882+'-'+_0x50e698+'/'+_0x1bfeb4)['json'](_0x23daaf);}return null;};}function patchUpdates(_0x1202d6){return function(_0x384f64){try{jsonpatch[_0xabbb('0x26')](_0x384f64,_0x1202d6,!![]);}catch(_0xdf2f53){return BPromise['reject'](_0xdf2f53);}return _0x384f64[_0xabbb('0x27')]();};}function saveUpdates(_0x1f44c7,_0x3fdaf4){return function(_0x201d13){if(_0x201d13){return _0x201d13[_0xabbb('0x28')](_0x1f44c7)['then'](function(_0x12bdbe){return _0x12bdbe;});}return null;};}function removeEntity(_0x305b5f,_0x47a018){return function(_0x235a1d){if(_0x235a1d){return _0x235a1d[_0xabbb('0x29')]()[_0xabbb('0x2a')](function(){_0x305b5f[_0xabbb('0x1f')](0xcc)['end']();});}};}function handleEntityNotFound(_0x26dad9,_0x5e30c1){return function(_0x295b59){if(!_0x295b59){_0x26dad9[_0xabbb('0x1e')](0x194);}return _0x295b59;};}function handleError(_0x2e731e,_0x25f7ec){_0x25f7ec=_0x25f7ec||0x1f4;return function(_0x29f099){logger[_0xabbb('0x2b')](_0x29f099['stack']);if(_0x29f099['name']){delete _0x29f099[_0xabbb('0x2c')];}_0x2e731e[_0xabbb('0x1f')](_0x25f7ec)[_0xabbb('0x2d')](_0x29f099);};}exports[_0xabbb('0x2e')]=function(_0x49d093,_0x371661){var _0x2af959={},_0x1c8415={},_0x585960={'count':0x0,'rows':[]};var _0x2eb04c=_[_0xabbb('0x2f')](db[_0xabbb('0x30')][_0xabbb('0x31')],function(_0x3f5672){return{'name':_0x3f5672[_0xabbb('0x32')],'type':_0x3f5672[_0xabbb('0x33')]['key']};});_0x1c8415[_0xabbb('0x34')]=_['map'](_0x2eb04c,_0xabbb('0x2c'));_0x1c8415['query']=_[_0xabbb('0x35')](_0x49d093[_0xabbb('0x36')]);_0x1c8415['filters']=_[_0xabbb('0x37')](_0x1c8415[_0xabbb('0x34')],_0x1c8415[_0xabbb('0x36')]);_0x2af959[_0xabbb('0x38')]=_[_0xabbb('0x37')](_0x1c8415[_0xabbb('0x34')],qs['fields'](_0x49d093[_0xabbb('0x36')]['fields']));_0x2af959[_0xabbb('0x38')]=_0x2af959[_0xabbb('0x38')][_0xabbb('0x39')]?_0x2af959[_0xabbb('0x38')]:_0x1c8415['model'];if(!_0x49d093[_0xabbb('0x36')]['hasOwnProperty'](_0xabbb('0x3a'))){_0x2af959[_0xabbb('0x3b')]=qs[_0xabbb('0x3b')](_0x49d093[_0xabbb('0x36')][_0xabbb('0x3b')]);_0x2af959['offset']=qs[_0xabbb('0x21')](_0x49d093[_0xabbb('0x36')]['offset']);}_0x2af959[_0xabbb('0x3c')]=qs[_0xabbb('0x3d')](_0x49d093[_0xabbb('0x36')][_0xabbb('0x3d')]);_0x2af959['where']=qs['filters'](_[_0xabbb('0x3e')](_0x49d093[_0xabbb('0x36')],_0x1c8415['filters']),_0x2eb04c);if(_0x49d093[_0xabbb('0x36')][_0xabbb('0x3f')]){_0x2af959[_0xabbb('0x40')]=_[_0xabbb('0x41')](_0x2af959[_0xabbb('0x40')],{'$or':_['map'](_0x2eb04c,function(_0x3a1d90){if(_0x3a1d90[_0xabbb('0x33')]!==_0xabbb('0x42')){var _0x14b305={};_0x14b305[_0x3a1d90['name']]={'$like':'%'+_0x49d093[_0xabbb('0x36')][_0xabbb('0x3f')]+'%'};return _0x14b305;}})});}_0x2af959=_[_0xabbb('0x41')]({},_0x2af959,_0x49d093[_0xabbb('0x43')]);var _0x55092a={'where':_0x2af959[_0xabbb('0x40')]};return db[_0xabbb('0x30')][_0xabbb('0x23')](_0x55092a)[_0xabbb('0x2a')](function(_0x5f89b8){_0x585960['count']=_0x5f89b8;if(_0x49d093[_0xabbb('0x36')][_0xabbb('0x44')]){_0x2af959['include']=[{'all':!![]}];}return db[_0xabbb('0x30')][_0xabbb('0x45')](_0x2af959);})['then'](function(_0x470d09){_0x585960[_0xabbb('0x46')]=_0x470d09;return _0x585960;})[_0xabbb('0x2a')](respondWithFilteredResult(_0x371661,_0x2af959))[_0xabbb('0x47')](handleError(_0x371661,null));};exports['show']=function(_0x103c4e,_0x2ba581){var _0x31ddd9={'raw':!![],'where':{'id':_0x103c4e[_0xabbb('0x48')]['id']}},_0x3e6a79={};_0x3e6a79[_0xabbb('0x34')]=_[_0xabbb('0x35')](db[_0xabbb('0x30')][_0xabbb('0x31')]);_0x3e6a79[_0xabbb('0x36')]=_[_0xabbb('0x35')](_0x103c4e[_0xabbb('0x36')]);_0x3e6a79['filters']=_[_0xabbb('0x37')](_0x3e6a79[_0xabbb('0x34')],_0x3e6a79[_0xabbb('0x36')]);_0x31ddd9[_0xabbb('0x38')]=_['intersection'](_0x3e6a79[_0xabbb('0x34')],qs['fields'](_0x103c4e[_0xabbb('0x36')]['fields']));_0x31ddd9['attributes']=_0x31ddd9[_0xabbb('0x38')][_0xabbb('0x39')]?_0x31ddd9[_0xabbb('0x38')]:_0x3e6a79['model'];if(_0x103c4e['query'][_0xabbb('0x44')]){_0x31ddd9[_0xabbb('0x49')]=[{'all':!![]}];}_0x31ddd9=_['merge']({},_0x31ddd9,_0x103c4e[_0xabbb('0x43')]);return db['ChatGroup'][_0xabbb('0x4a')](_0x31ddd9)[_0xabbb('0x2a')](handleEntityNotFound(_0x2ba581,null))[_0xabbb('0x2a')](respondWithResult(_0x2ba581,null))['catch'](handleError(_0x2ba581,null));};exports[_0xabbb('0x4b')]=function(_0x250e64,_0x2b6c01){return db[_0xabbb('0x30')][_0xabbb('0x4b')](_0x250e64['body'],{})[_0xabbb('0x2a')](respondWithResult(_0x2b6c01,0xc9))[_0xabbb('0x47')](handleError(_0x2b6c01,null));};exports[_0xabbb('0x28')]=function(_0x3cf782,_0x507597){if(_0x3cf782[_0xabbb('0x4c')]['id']){delete _0x3cf782['body']['id'];}return db[_0xabbb('0x30')][_0xabbb('0x4a')]({'where':{'id':_0x3cf782['params']['id']}})[_0xabbb('0x2a')](handleEntityNotFound(_0x507597,null))[_0xabbb('0x2a')](saveUpdates(_0x3cf782[_0xabbb('0x4c')],null))[_0xabbb('0x2a')](respondWithResult(_0x507597,null))[_0xabbb('0x47')](handleError(_0x507597,null));};exports[_0xabbb('0x29')]=function(_0x2a25f3,_0x273e6e){return db[_0xabbb('0x30')][_0xabbb('0x4a')]({'where':{'id':_0x2a25f3[_0xabbb('0x48')]['id']}})[_0xabbb('0x2a')](handleEntityNotFound(_0x273e6e,null))[_0xabbb('0x2a')](removeEntity(_0x273e6e,null))[_0xabbb('0x47')](handleError(_0x273e6e,null));};exports[_0xabbb('0x4d')]=function(_0x5e04bd,_0x120304){return db[_0xabbb('0x30')]['describe']()[_0xabbb('0x2a')](respondWithResult(_0x120304,null))['catch'](handleError(_0x120304,null));};exports['getUnread']=function(_0x557955,_0x1f3f74,_0x1ff3b1){return db[_0xabbb('0x4e')]['count']({'where':{'ChatGroupId':_0x557955['params']['id'],'ToId':_0x557955[_0xabbb('0x4f')]['id'],'read':![]}})[_0xabbb('0x2a')](function(_0x23eee8){return{'id':_['toInteger'](_0x557955['params']['id']),'count':_0x23eee8};})[_0xabbb('0x2a')](respondWithResult(_0x1f3f74,null))['catch'](handleError(_0x1f3f74,null));};exports[_0xabbb('0x50')]=function(_0x849d91,_0x3d6b36,_0x560765){return db['ChatGroup'][_0xabbb('0x4a')]({'where':{'id':_0x849d91[_0xabbb('0x48')]['id']}})['then'](handleEntityNotFound(_0x3d6b36,null))[_0xabbb('0x2a')](function(_0x4b4e64){if(_0x4b4e64){return _0x4b4e64['addMembers'](_0x849d91[_0xabbb('0x4c')][_0xabbb('0x51')],_['omit'](_0x849d91['body'],[_0xabbb('0x51'),'id'])||{});}})[_0xabbb('0x2a')](respondWithResult(_0x3d6b36,null))[_0xabbb('0x47')](handleError(_0x3d6b36,null));};exports[_0xabbb('0x52')]=function(_0x586ba9,_0x5153c0,_0xbac6ea){var _0x48b6ff={};var _0x259fbb={};var _0x12680c;var _0x20ec39;return db[_0xabbb('0x30')]['findOne']({'where':{'id':_0x586ba9[_0xabbb('0x48')]['id']}})['then'](handleEntityNotFound(_0x5153c0,null))['then'](function(_0x260878){if(_0x260878){_0x12680c=_0x260878;_0x259fbb[_0xabbb('0x34')]=_[_0xabbb('0x35')](db[_0xabbb('0x53')]['rawAttributes']);_0x259fbb['query']=_[_0xabbb('0x35')](_0x586ba9[_0xabbb('0x36')]);_0x259fbb['filters']=_[_0xabbb('0x37')](_0x259fbb[_0xabbb('0x34')],_0x259fbb[_0xabbb('0x36')]);_0x48b6ff[_0xabbb('0x38')]=_[_0xabbb('0x37')](_0x259fbb[_0xabbb('0x34')],qs[_0xabbb('0x54')](_0x586ba9[_0xabbb('0x36')][_0xabbb('0x54')]));_0x48b6ff[_0xabbb('0x38')]=_0x48b6ff['attributes']['length']?_0x48b6ff[_0xabbb('0x38')]:_0x259fbb[_0xabbb('0x34')];_0x48b6ff[_0xabbb('0x3c')]=qs[_0xabbb('0x3d')](_0x586ba9[_0xabbb('0x36')][_0xabbb('0x3d')]);_0x48b6ff[_0xabbb('0x40')]=qs['filters'](_[_0xabbb('0x3e')](_0x586ba9['query'],_0x259fbb[_0xabbb('0x55')]));if(_0x586ba9[_0xabbb('0x36')]['filter']){_0x48b6ff['where']=_['merge'](_0x48b6ff[_0xabbb('0x40')],{'$or':_[_0xabbb('0x2f')](_0x48b6ff[_0xabbb('0x38')],function(_0xca1f3e){var _0x3be164={};_0x3be164[_0xca1f3e]={'$like':'%'+_0x586ba9[_0xabbb('0x36')][_0xabbb('0x3f')]+'%'};return _0x3be164;})});}_0x48b6ff=_[_0xabbb('0x41')]({},_0x48b6ff,_0x586ba9[_0xabbb('0x43')]);return _0x12680c[_0xabbb('0x52')](_0x48b6ff);}})['then'](function(_0x5ad26e){if(_0x5ad26e){_0x20ec39=_0x5ad26e['length'];if(!_0x586ba9[_0xabbb('0x36')][_0xabbb('0x56')](_0xabbb('0x3a'))){_0x48b6ff[_0xabbb('0x3b')]=qs['limit'](_0x586ba9[_0xabbb('0x36')]['limit']);_0x48b6ff['offset']=qs[_0xabbb('0x21')](_0x586ba9[_0xabbb('0x36')]['offset']);}return _0x12680c[_0xabbb('0x52')](_0x48b6ff);}})[_0xabbb('0x2a')](function(_0x73a072){if(_0x73a072){return _0x73a072?{'count':_0x20ec39,'rows':_0x73a072}:null;}})[_0xabbb('0x2a')](respondWithResult(_0x5153c0,null))[_0xabbb('0x47')](handleError(_0x5153c0,null));};exports[_0xabbb('0x57')]=function(_0x31afbb,_0x1f7dca,_0x3809f3){return db['ChatGroup']['find']({'where':{'id':_0x31afbb[_0xabbb('0x48')]['id']}})[_0xabbb('0x2a')](handleEntityNotFound(_0x1f7dca,null))[_0xabbb('0x2a')](function(_0x237f07){if(_0x237f07){return _0x237f07['removeMembers'](_0x31afbb[_0xabbb('0x36')]['ids']);}})[_0xabbb('0x2a')](respondWithStatusCode(_0x1f7dca,null))[_0xabbb('0x47')](handleError(_0x1f7dca,null));};exports[_0xabbb('0x58')]=function(_0x1be6a2,_0xe01aa7,_0x5b02d5){if(_0x1be6a2['body']['id']){delete _0x1be6a2[_0xabbb('0x4c')]['id'];}return db[_0xabbb('0x30')][_0xabbb('0x4a')]({'where':{'id':_0x1be6a2[_0xabbb('0x48')]['id']}})[_0xabbb('0x2a')](handleEntityNotFound(_0xe01aa7,null))['then'](function(_0x45839c){if(_0x45839c){_0x1be6a2[_0xabbb('0x4c')]['ChatGroupId']=_0x45839c['id'];return db[_0xabbb('0x4e')][_0xabbb('0x4b')](_0x1be6a2[_0xabbb('0x4c')]);}})[_0xabbb('0x2a')](respondWithResult(_0xe01aa7,null))['catch'](handleError(_0xe01aa7,null));};exports[_0xabbb('0x59')]=function(_0x6de080,_0x2a5723,_0x6fc117){var _0x65cc0e={};var _0x3fe720={};var _0x8e598f;var _0x47cb86;return db['ChatGroup'][_0xabbb('0x5a')]({'where':{'id':_0x6de080[_0xabbb('0x48')]['id']}})[_0xabbb('0x2a')](handleEntityNotFound(_0x2a5723,null))[_0xabbb('0x2a')](function(_0x5d9f6c){if(_0x5d9f6c){_0x8e598f=_0x5d9f6c;_0x3fe720[_0xabbb('0x34')]=_['keys'](db[_0xabbb('0x4e')]['rawAttributes']);_0x3fe720[_0xabbb('0x36')]=_['keys'](_0x6de080['query']);_0x3fe720[_0xabbb('0x55')]=_['intersection'](_0x3fe720[_0xabbb('0x34')],_0x3fe720[_0xabbb('0x36')]);_0x65cc0e[_0xabbb('0x38')]=_['intersection'](_0x3fe720[_0xabbb('0x34')],qs[_0xabbb('0x54')](_0x6de080['query'][_0xabbb('0x54')]));_0x65cc0e[_0xabbb('0x38')]=_0x65cc0e[_0xabbb('0x38')][_0xabbb('0x39')]?_0x65cc0e[_0xabbb('0x38')]:_0x3fe720[_0xabbb('0x34')];_0x65cc0e[_0xabbb('0x3c')]=qs[_0xabbb('0x3d')](_0x6de080[_0xabbb('0x36')][_0xabbb('0x3d')]);_0x65cc0e[_0xabbb('0x40')]=qs[_0xabbb('0x55')](_['pick'](_0x6de080[_0xabbb('0x36')],_0x3fe720[_0xabbb('0x55')]));if(_0x6de080[_0xabbb('0x36')][_0xabbb('0x3f')]){_0x65cc0e[_0xabbb('0x40')]=_[_0xabbb('0x41')](_0x65cc0e[_0xabbb('0x40')],{'$or':_['map'](_0x65cc0e[_0xabbb('0x38')],function(_0x1499d6){var _0x36235a={};_0x36235a[_0x1499d6]={'$like':'%'+_0x6de080[_0xabbb('0x36')][_0xabbb('0x3f')]+'%'};return _0x36235a;})});}if(_0x6de080[_0xabbb('0x36')][_0xabbb('0x5b')]){var _0x4c4dd9=_0x6de080[_0xabbb('0x36')][_0xabbb('0x5b')][_0xabbb('0x5c')](',');var _0x35362e={};_0x35362e[_0x4c4dd9[0x0]]={'$gte':moment(_0x4c4dd9[0x1])['format'](_0xabbb('0x5d'))};_0x65cc0e[_0xabbb('0x40')]=_['merge'](_0x65cc0e[_0xabbb('0x40')],_0x35362e);}_0x65cc0e=_[_0xabbb('0x41')]({},_0x65cc0e,_0x6de080[_0xabbb('0x43')]);return _0x8e598f[_0xabbb('0x59')](_0x65cc0e);}})[_0xabbb('0x2a')](function(_0x43a47b){if(_0x43a47b){_0x47cb86=_0x43a47b[_0xabbb('0x39')];if(!_0x6de080[_0xabbb('0x36')][_0xabbb('0x56')](_0xabbb('0x3a'))){_0x65cc0e[_0xabbb('0x3b')]=qs[_0xabbb('0x3b')](_0x6de080[_0xabbb('0x36')][_0xabbb('0x3b')]);_0x65cc0e[_0xabbb('0x21')]=qs[_0xabbb('0x21')](_0x6de080[_0xabbb('0x36')][_0xabbb('0x21')]);}return _0x8e598f[_0xabbb('0x59')](_0x65cc0e);}})['then'](function(_0x1b339e){if(_0x1b339e){return _0x1b339e?{'count':_0x47cb86,'rows':_0x1b339e}:null;}})[_0xabbb('0x2a')](respondWithResult(_0x2a5723,null))[_0xabbb('0x47')](handleError(_0x2a5723,null));};
\ No newline at end of file
index 6f33fba..8b17a4c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4024=['hook','exports','events','../../mysqldb','setMaxListeners','save','emit'];(function(_0xb0b01c,_0x466220){var _0x353d13=function(_0x370c30){while(--_0x370c30){_0xb0b01c['push'](_0xb0b01c['shift']());}};_0x353d13(++_0x466220);}(_0x4024,0x152));var _0x4402=function(_0x307f25,_0x77eb4){_0x307f25=_0x307f25-0x0;var _0x5e3d7f=_0x4024[_0x307f25];return _0x5e3d7f;};'use strict';var EventEmitter=require(_0x4402('0x0'));var ChatGroup=require(_0x4402('0x1'))['db']['ChatGroup'];var ChatGroupEvents=new EventEmitter();ChatGroupEvents[_0x4402('0x2')](0x0);var events={'afterCreate':_0x4402('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0xe9d839){return function(_0x29d395,_0xbb69c9,_0x2e157e){ChatGroupEvents['emit'](_0xe9d839+':'+_0x29d395['id'],_0x29d395);ChatGroupEvents[_0x4402('0x4')](_0xe9d839,_0x29d395);_0x2e157e(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatGroup[_0x4402('0x5')](e,emitEvent(event));}}module[_0x4402('0x6')]=ChatGroupEvents;
\ No newline at end of file
+var _0xef96=['emit','hasOwnProperty','exports','events','../../mysqldb','ChatGroup','setMaxListeners','save','update'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xef96,0x162));var _0x6ef9=function(_0x208b03,_0x82774f){_0x208b03=_0x208b03-0x0;var _0x332d98=_0xef96[_0x208b03];return _0x332d98;};'use strict';var EventEmitter=require(_0x6ef9('0x0'));var ChatGroup=require(_0x6ef9('0x1'))['db'][_0x6ef9('0x2')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents[_0x6ef9('0x3')](0x0);var events={'afterCreate':_0x6ef9('0x4'),'afterUpdate':_0x6ef9('0x5'),'afterDestroy':'remove'};function emitEvent(_0x55b811){return function(_0x1eb2c2,_0x5391ed,_0x500b0c){ChatGroupEvents[_0x6ef9('0x6')](_0x55b811+':'+_0x1eb2c2['id'],_0x1eb2c2);ChatGroupEvents[_0x6ef9('0x6')](_0x55b811,_0x1eb2c2);_0x500b0c(null);};}for(var e in events){if(events[_0x6ef9('0x7')](e)){var event=events[e];ChatGroup['hook'](e,emitEvent(event));}}module[_0x6ef9('0x8')]=ChatGroupEvents;
\ No newline at end of file
index b4e8c24..249619c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2dca=['ChatGroup','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./chatGroup.attributes','define'];(function(_0x22e9fe,_0x3d019f){var _0x47cd19=function(_0x8fd5fc){while(--_0x8fd5fc){_0x22e9fe['push'](_0x22e9fe['shift']());}};_0x47cd19(++_0x3d019f);}(_0x2dca,0x160));var _0xa2dc=function(_0x485abd,_0x32c7c1){_0x485abd=_0x485abd-0x0;var _0x3379f1=_0x2dca[_0x485abd];return _0x3379f1;};'use strict';var _=require(_0xa2dc('0x0'));var util=require(_0xa2dc('0x1'));var logger=require(_0xa2dc('0x2'))(_0xa2dc('0x3'));var moment=require(_0xa2dc('0x4'));var BPromise=require(_0xa2dc('0x5'));var rp=require(_0xa2dc('0x6'));var fs=require('fs');var path=require(_0xa2dc('0x7'));var rimraf=require(_0xa2dc('0x8'));var config=require(_0xa2dc('0x9'));var attributes=require(_0xa2dc('0xa'));module['exports']=function(_0x2f92fb,_0x2401dd){return _0x2f92fb[_0xa2dc('0xb')](_0xa2dc('0xc'),attributes,{'tableName':'chat_groups','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x8d34=['util','../../config/logger','api','request-promise','path','rimraf','../../config/environment','define','chat_groups','lodash'];(function(_0x121b1a,_0x42fdb7){var _0x2d89a6=function(_0x1b6027){while(--_0x1b6027){_0x121b1a['push'](_0x121b1a['shift']());}};_0x2d89a6(++_0x42fdb7);}(_0x8d34,0x6d));var _0x48d3=function(_0x451353,_0x19710b){_0x451353=_0x451353-0x0;var _0x102315=_0x8d34[_0x451353];return _0x102315;};'use strict';var _=require(_0x48d3('0x0'));var util=require(_0x48d3('0x1'));var logger=require(_0x48d3('0x2'))(_0x48d3('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x48d3('0x4'));var fs=require('fs');var path=require(_0x48d3('0x5'));var rimraf=require(_0x48d3('0x6'));var config=require(_0x48d3('0x7'));var attributes=require('./chatGroup.attributes');module['exports']=function(_0x1b6607,_0x128537){return _0x1b6607[_0x48d3('0x8')]('ChatGroup',attributes,{'tableName':_0x48d3('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index d4d1298..2e29ddf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcb3c=['register','then','info','ChatGroup,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','lodash','util','moment','bluebird','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0xcb3c,0x150));var _0xccb3=function(_0x1c6a3e,_0x5c3938){_0x1c6a3e=_0x1c6a3e-0x0;var _0x3637da=_0xcb3c[_0x1c6a3e];return _0x3637da;};'use strict';var _=require(_0xccb3('0x0'));var util=require(_0xccb3('0x1'));var moment=require(_0xccb3('0x2'));var BPromise=require(_0xccb3('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xccb3('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xccb3('0x5'));var logger=require('../../config/logger')(_0xccb3('0x6'));var config=require(_0xccb3('0x7'));var jayson=require(_0xccb3('0x8'));var client=jayson[_0xccb3('0x9')][_0xccb3('0xa')]({'port':0x232a});config[_0xccb3('0xb')]=_[_0xccb3('0xc')](config[_0xccb3('0xb')],{'host':_0xccb3('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./chatGroup.socket')[_0xccb3('0xe')](socket);function respondWithRpcPromise(_0x49298f,_0x451c06,_0x1daeb9){return new BPromise(function(_0x3c4eb2,_0x57318c){return client['request'](_0x49298f,_0x1daeb9)[_0xccb3('0xf')](function(_0x7ba79f){logger[_0xccb3('0x10')](_0xccb3('0x11'),_0x451c06,_0xccb3('0x12'));logger[_0xccb3('0x13')]('ChatGroup,\x20%s,\x20%s,\x20%s',_0x451c06,_0xccb3('0x12'),JSON[_0xccb3('0x14')](_0x7ba79f));if(_0x7ba79f[_0xccb3('0x15')]){if(_0x7ba79f[_0xccb3('0x15')][_0xccb3('0x16')]===0x1f4){logger[_0xccb3('0x15')](_0xccb3('0x11'),_0x451c06,_0x7ba79f['error'][_0xccb3('0x17')]);return _0x57318c(_0x7ba79f[_0xccb3('0x15')]['message']);}logger[_0xccb3('0x15')]('ChatGroup,\x20%s,\x20%s',_0x451c06,_0x7ba79f['error'][_0xccb3('0x17')]);return _0x3c4eb2(_0x7ba79f[_0xccb3('0x15')][_0xccb3('0x17')]);}else{logger[_0xccb3('0x10')](_0xccb3('0x11'),_0x451c06,_0xccb3('0x12'));_0x3c4eb2(_0x7ba79f[_0xccb3('0x18')][_0xccb3('0x17')]);}})['catch'](function(_0x47b074){logger[_0xccb3('0x15')]('ChatGroup,\x20%s,\x20%s',_0x451c06,_0x47b074);_0x57318c(_0x47b074);});});}
\ No newline at end of file
+var _0x31e7=['ChatGroup,\x20%s,\x20%s','request\x20sent','debug','ChatGroup,\x20%s,\x20%s,\x20%s','error','message','result','catch','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','defaults','redis','localhost','socket.io-emitter','./chatGroup.socket','register','request','then','info'];(function(_0x9ceba5,_0x303b5a){var _0x4c4071=function(_0x47739a){while(--_0x47739a){_0x9ceba5['push'](_0x9ceba5['shift']());}};_0x4c4071(++_0x303b5a);}(_0x31e7,0x74));var _0x731e=function(_0x409f0c,_0x14ca22){_0x409f0c=_0x409f0c-0x0;var _0x20fc6d=_0x31e7[_0x409f0c];return _0x20fc6d;};'use strict';var _=require('lodash');var util=require(_0x731e('0x0'));var moment=require('moment');var BPromise=require(_0x731e('0x1'));var rs=require(_0x731e('0x2'));var fs=require('fs');var Redis=require(_0x731e('0x3'));var db=require(_0x731e('0x4'))['db'];var utils=require(_0x731e('0x5'));var logger=require(_0x731e('0x6'))(_0x731e('0x7'));var config=require(_0x731e('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x731e('0x9')]['http']({'port':0x232a});config['redis']=_[_0x731e('0xa')](config[_0x731e('0xb')],{'host':_0x731e('0xc'),'port':0x18eb});var socket=require(_0x731e('0xd'))(new Redis(config[_0x731e('0xb')]));require(_0x731e('0xe'))[_0x731e('0xf')](socket);function respondWithRpcPromise(_0x5ed856,_0x56896a,_0x4e5784){return new BPromise(function(_0x3b4e6f,_0x1966c9){return client[_0x731e('0x10')](_0x5ed856,_0x4e5784)[_0x731e('0x11')](function(_0x2db10e){logger[_0x731e('0x12')](_0x731e('0x13'),_0x56896a,_0x731e('0x14'));logger[_0x731e('0x15')](_0x731e('0x16'),_0x56896a,_0x731e('0x14'),JSON['stringify'](_0x2db10e));if(_0x2db10e[_0x731e('0x17')]){if(_0x2db10e[_0x731e('0x17')]['code']===0x1f4){logger['error']('ChatGroup,\x20%s,\x20%s',_0x56896a,_0x2db10e[_0x731e('0x17')][_0x731e('0x18')]);return _0x1966c9(_0x2db10e[_0x731e('0x17')][_0x731e('0x18')]);}logger[_0x731e('0x17')](_0x731e('0x13'),_0x56896a,_0x2db10e[_0x731e('0x17')][_0x731e('0x18')]);return _0x3b4e6f(_0x2db10e['error'][_0x731e('0x18')]);}else{logger[_0x731e('0x12')](_0x731e('0x13'),_0x56896a,'request\x20sent');_0x3b4e6f(_0x2db10e[_0x731e('0x19')]['message']);}})[_0x731e('0x1a')](function(_0x1a3ab9){logger['error'](_0x731e('0x13'),_0x56896a,_0x1a3ab9);_0x1966c9(_0x1a3ab9);});});}
\ No newline at end of file
index ceb033d..c179b4a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x662a=['length','chatGroup:','./chatGroup.events','save','remove','removeListener','register'];(function(_0x3c3249,_0x3fe770){var _0x41931d=function(_0x12b918){while(--_0x12b918){_0x3c3249['push'](_0x3c3249['shift']());}};_0x41931d(++_0x3fe770);}(_0x662a,0x1ad));var _0xa662=function(_0x4ece73,_0xc929c4){_0x4ece73=_0x4ece73-0x0;var _0x34e1d9=_0x662a[_0x4ece73];return _0x34e1d9;};'use strict';var ChatGroupEvents=require(_0xa662('0x0'));var events=[_0xa662('0x1'),_0xa662('0x2'),'update'];function createListener(_0x49ea56,_0x41d1b8){return function(_0x58da94){_0x41d1b8['emit'](_0x49ea56,_0x58da94);};}function removeListener(_0x12be5c,_0x477fec){return function(){ChatGroupEvents[_0xa662('0x3')](_0x12be5c,_0x477fec);};}exports[_0xa662('0x4')]=function(_0x48d3ce){for(var _0x39c64f=0x0,_0x35e4cc=events[_0xa662('0x5')];_0x39c64f<_0x35e4cc;_0x39c64f++){var _0x57db2b=events[_0x39c64f];var _0x275182=createListener(_0xa662('0x6')+_0x57db2b,_0x48d3ce);ChatGroupEvents['on'](_0x57db2b,_0x275182);}};
\ No newline at end of file
+var _0xb0c7=['length','chatGroup:','./chatGroup.events','save','update','emit','removeListener','register'];(function(_0x5a80a4,_0x654934){var _0x2b311a=function(_0xf8b990){while(--_0xf8b990){_0x5a80a4['push'](_0x5a80a4['shift']());}};_0x2b311a(++_0x654934);}(_0xb0c7,0xca));var _0x7b0c=function(_0x481bdf,_0x231538){_0x481bdf=_0x481bdf-0x0;var _0x281a12=_0xb0c7[_0x481bdf];return _0x281a12;};'use strict';var ChatGroupEvents=require(_0x7b0c('0x0'));var events=[_0x7b0c('0x1'),'remove',_0x7b0c('0x2')];function createListener(_0x302a70,_0x4052e4){return function(_0x151105){_0x4052e4[_0x7b0c('0x3')](_0x302a70,_0x151105);};}function removeListener(_0x1fa30a,_0x349fa5){return function(){ChatGroupEvents[_0x7b0c('0x4')](_0x1fa30a,_0x349fa5);};}exports[_0x7b0c('0x5')]=function(_0x3e8959){for(var _0x2fbd90=0x0,_0x4bb343=events[_0x7b0c('0x6')];_0x2fbd90<_0x4bb343;_0x2fbd90++){var _0x11569e=events[_0x2fbd90];var _0x295842=createListener(_0x7b0c('0x7')+_0x11569e,_0x3e8959);ChatGroupEvents['on'](_0x11569e,_0x295842);}};
\ No newline at end of file
index 0051005..5ea875a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8f9a=['exports','multer','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./chatGroup.controller','get','isAuthenticated','index','/describe','describe','/:id','show','getUnread','getMembers','create','post','/:id/members','addMembers','/:id/messages','addMessage','update','delete','destroy'];(function(_0x419d3b,_0x194567){var _0x3e50e0=function(_0x3d586c){while(--_0x3d586c){_0x419d3b['push'](_0x419d3b['shift']());}};_0x3e50e0(++_0x194567);}(_0x8f9a,0x12a));var _0xa8f9=function(_0x409186,_0x4b8b73){_0x409186=_0x409186-0x0;var _0x3deb43=_0x8f9a[_0x409186];return _0x3deb43;};'use strict';var multer=require(_0xa8f9('0x0'));var util=require('util');var path=require(_0xa8f9('0x1'));var timeout=require(_0xa8f9('0x2'));var express=require(_0xa8f9('0x3'));var router=express[_0xa8f9('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xa8f9('0x5'));var config=require(_0xa8f9('0x6'));var controller=require(_0xa8f9('0x7'));router[_0xa8f9('0x8')]('/',auth[_0xa8f9('0x9')](),controller[_0xa8f9('0xa')]);router[_0xa8f9('0x8')](_0xa8f9('0xb'),auth['isAuthenticated'](),controller[_0xa8f9('0xc')]);router[_0xa8f9('0x8')](_0xa8f9('0xd'),auth[_0xa8f9('0x9')](),controller[_0xa8f9('0xe')]);router['get']('/:id/unread',auth[_0xa8f9('0x9')](),controller[_0xa8f9('0xf')]);router[_0xa8f9('0x8')]('/:id/members',auth['isAuthenticated'](),controller[_0xa8f9('0x10')]);router[_0xa8f9('0x8')]('/:id/messages',auth[_0xa8f9('0x9')](),controller['getMessages']);router['post']('/',auth['isAuthenticated'](),controller[_0xa8f9('0x11')]);router[_0xa8f9('0x12')](_0xa8f9('0x13'),auth['isAuthenticated'](),controller[_0xa8f9('0x14')]);router[_0xa8f9('0x12')](_0xa8f9('0x15'),auth[_0xa8f9('0x9')](),controller[_0xa8f9('0x16')]);router['put']('/:id',auth[_0xa8f9('0x9')](),controller[_0xa8f9('0x17')]);router[_0xa8f9('0x18')](_0xa8f9('0xd'),auth[_0xa8f9('0x9')](),controller[_0xa8f9('0x19')]);router[_0xa8f9('0x18')](_0xa8f9('0x13'),auth[_0xa8f9('0x9')](),controller['removeMembers']);module[_0xa8f9('0x1a')]=router;
\ No newline at end of file
+var _0x63c2=['./chatGroup.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/unread','/:id/members','getMembers','/:id/messages','getMessages','post','create','addMembers','put','update','delete','exports','connect-timeout','express','Router','fs-extra','../../config/environment'];(function(_0x416b32,_0x569f90){var _0x3bf318=function(_0x124310){while(--_0x124310){_0x416b32['push'](_0x416b32['shift']());}};_0x3bf318(++_0x569f90);}(_0x63c2,0xf5));var _0x263c=function(_0x122096,_0x60c295){_0x122096=_0x122096-0x0;var _0x3d1966=_0x63c2[_0x122096];return _0x3d1966;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require(_0x263c('0x0'));var express=require(_0x263c('0x1'));var router=express[_0x263c('0x2')]();var fs_extra=require(_0x263c('0x3'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x263c('0x4'));var controller=require(_0x263c('0x5'));router[_0x263c('0x6')]('/',auth[_0x263c('0x7')](),controller[_0x263c('0x8')]);router['get'](_0x263c('0x9'),auth['isAuthenticated'](),controller[_0x263c('0xa')]);router[_0x263c('0x6')](_0x263c('0xb'),auth[_0x263c('0x7')](),controller[_0x263c('0xc')]);router['get'](_0x263c('0xd'),auth[_0x263c('0x7')](),controller['getUnread']);router[_0x263c('0x6')](_0x263c('0xe'),auth[_0x263c('0x7')](),controller[_0x263c('0xf')]);router[_0x263c('0x6')](_0x263c('0x10'),auth[_0x263c('0x7')](),controller[_0x263c('0x11')]);router[_0x263c('0x12')]('/',auth[_0x263c('0x7')](),controller[_0x263c('0x13')]);router[_0x263c('0x12')](_0x263c('0xe'),auth['isAuthenticated'](),controller[_0x263c('0x14')]);router[_0x263c('0x12')](_0x263c('0x10'),auth['isAuthenticated'](),controller['addMessage']);router[_0x263c('0x15')](_0x263c('0xb'),auth[_0x263c('0x7')](),controller[_0x263c('0x16')]);router['delete'](_0x263c('0xb'),auth['isAuthenticated'](),controller['destroy']);router[_0x263c('0x17')](_0x263c('0xe'),auth[_0x263c('0x7')](),controller['removeMembers']);module[_0x263c('0x18')]=router;
\ No newline at end of file
index 38cf927..3a9f652 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x16ca=['INTEGER','star','TEXT','STRING','DATE','long','ENUM','sequelize'];(function(_0x2f6282,_0xe47106){var _0x4da8ec=function(_0x45b23b){while(--_0x45b23b){_0x2f6282['push'](_0x2f6282['shift']());}};_0x4da8ec(++_0xe47106);}(_0x16ca,0x147));var _0xa16c=function(_0x341a15,_0xaa08f7){_0x341a15=_0x341a15-0x0;var _0x5d1bd0=_0x16ca[_0x341a15];return _0x5d1bd0;};'use strict';var Sequelize=require(_0xa16c('0x0'));module['exports']={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'ratingValue':{'type':Sequelize[_0xa16c('0x1')]},'ratingType':{'type':Sequelize['ENUM'](_0xa16c('0x2'),'thumb'),'defaultValue':_0xa16c('0x2')},'ratingMessage':{'type':Sequelize[_0xa16c('0x3')]},'pathTranscript':{'type':Sequelize[_0xa16c('0x3')]},'mailTranscript':{'type':Sequelize[_0xa16c('0x4')],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize[_0xa16c('0x5')]},'disposition':{'type':Sequelize[_0xa16c('0x4')]},'secondDisposition':{'type':Sequelize[_0xa16c('0x4')]},'thirdDisposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0xa16c('0x4')]},'browserName':{'type':Sequelize['STRING']},'browserVersion':{'type':Sequelize[_0xa16c('0x4')]},'osName':{'type':Sequelize[_0xa16c('0x4')]},'osVersion':{'type':Sequelize[_0xa16c('0x4')]},'deviceModel':{'type':Sequelize[_0xa16c('0x4')]},'deviceVendor':{'type':Sequelize[_0xa16c('0x4')]},'deviceType':{'type':Sequelize[_0xa16c('0x4')]},'referer':{'type':Sequelize[_0xa16c('0x3')]},'customerIp':{'type':Sequelize[_0xa16c('0x4')]},'formData':{'type':Sequelize['TEXT'](_0xa16c('0x6'))},'read1stAt':{'type':Sequelize[_0xa16c('0x5')]},'lastMsgAt':{'type':Sequelize[_0xa16c('0x5')]},'lastMsgDirection':{'type':Sequelize[_0xa16c('0x7')]('in','out'),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize[_0xa16c('0x4')]},'customerPort':{'type':Sequelize[_0xa16c('0x4')]},'vidaooSessionId':{'type':Sequelize['TEXT']},'autoreplyExecuted':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueId':{'type':Sequelize[_0xa16c('0x1')]}};
\ No newline at end of file
+var _0x9fac=['BOOLEAN','sequelize','exports','INTEGER','ENUM','star','thumb','STRING','DATE','TEXT','out'];(function(_0x511dd6,_0x5d294d){var _0x39f16b=function(_0x150692){while(--_0x150692){_0x511dd6['push'](_0x511dd6['shift']());}};_0x39f16b(++_0x5d294d);}(_0x9fac,0x109));var _0xc9fa=function(_0x4c79e6,_0x208f40){_0x4c79e6=_0x4c79e6-0x0;var _0x29715b=_0x9fac[_0x4c79e6];return _0x29715b;};'use strict';var Sequelize=require(_0xc9fa('0x0'));module[_0xc9fa('0x1')]={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'ratingValue':{'type':Sequelize[_0xc9fa('0x2')]},'ratingType':{'type':Sequelize[_0xc9fa('0x3')](_0xc9fa('0x4'),_0xc9fa('0x5')),'defaultValue':_0xc9fa('0x4')},'ratingMessage':{'type':Sequelize['TEXT']},'pathTranscript':{'type':Sequelize['TEXT']},'mailTranscript':{'type':Sequelize[_0xc9fa('0x6')],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize[_0xc9fa('0x7')]},'disposition':{'type':Sequelize[_0xc9fa('0x6')]},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0xc9fa('0x6')]},'browserName':{'type':Sequelize[_0xc9fa('0x6')]},'browserVersion':{'type':Sequelize[_0xc9fa('0x6')]},'osName':{'type':Sequelize[_0xc9fa('0x6')]},'osVersion':{'type':Sequelize[_0xc9fa('0x6')]},'deviceModel':{'type':Sequelize['STRING']},'deviceVendor':{'type':Sequelize[_0xc9fa('0x6')]},'deviceType':{'type':Sequelize['STRING']},'referer':{'type':Sequelize[_0xc9fa('0x8')]},'customerIp':{'type':Sequelize[_0xc9fa('0x6')]},'formData':{'type':Sequelize[_0xc9fa('0x8')]('long')},'read1stAt':{'type':Sequelize[_0xc9fa('0x7')]},'lastMsgAt':{'type':Sequelize[_0xc9fa('0x7')]},'lastMsgDirection':{'type':Sequelize['ENUM']('in',_0xc9fa('0x9')),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize[_0xc9fa('0x6')]},'customerPort':{'type':Sequelize[_0xc9fa('0x6')]},'vidaooSessionId':{'type':Sequelize[_0xc9fa('0x8')]},'autoreplyExecuted':{'type':Sequelize[_0xc9fa('0xa')],'defaultValue':![]},'queueId':{'type':Sequelize[_0xc9fa('0x2')]}};
\ No newline at end of file
index 2a5de8c..eef641d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb3d5=['lastName','out','value','renderFile','views','transcript-','.pdf','createPdfFromHTML','download','err','rimraf','zip-dir','moment','bluebird','mustache','util','path','ejs','lodash','ioredis','../../components/interaction/service','../../components/export/pdf','../../config/environment','../../mysqldb','redis','defaults','localhost','./chatInteraction.socket','register','jayson/promise','http','client','request','then','request\x20sent','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatInteraction,\x20%s,\x20%s','message','catch','sendStatus','status','end','json','offset','limit','undefined','count','set','update','destroy','stack','name','send','merge','contact','agent','interaction','map','ChatInteraction','fieldName','type','findAll','chat','query','show','rawAttributes','keys','filters','intersection','attributes','fields','length','model','includeAll','include','find','create','body','params','describe','createVidaooSession','findOne','ChatWebsite','vidaooApiKey','vidaooEscalation','vidaooNote','vidaooMetadata','user','fullname','email','account','POST','https://api-vidaoo.xcally.com/api/v1/meetings','vidaooTopic','isNull','follow','parse','Sequelize','ValidationError','Error\x20in\x20conversion\x20vidaooMetadata','Error\x20in\x20Vidaoo\x20configuration','join_url','Unable\x20to\x20create\x20Vidaoo\x20session','updateAttributes','customUpdate','CmContact','Contact','abandon','UserId','Interaction\x20already\x20assigned','closed','disposition','AbandonInteraction','attachmentUpload','file','originalname','filename','Attachment','attachmentDownload','Unauthorized','attachId','ChatOfflineMessageId','join','root','server/files/attachments/','offline-chat/','basename','close','mailTranscript','server/files/chat/upload/','format','transcript-%s.txt','now','pathTranscript','ChatMessage','Messages','User','ChatWebsiteId','%s%d','agentAlias','System','customer','ContactId','agentIdentifier','website_alias','agent_alias','agent_fullname','[%s]\x20%s:\x20%s\x0a','createdAt','direction','secret','appendFileSync','MailAccount','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','hasOwnProperty','nolimit','order','sort','pick','ChatInteractionId','filter','$gte','split','YYYY-MM-DD\x20HH:mm:ss','where','rows','getMyMessages','options','includeAgent','push','addTags','setTags','Tag','emit','removeTags','unix','toString','server','files','attachments','transcript-%d-%s.zip','firstName','read','Account','Owner','get','Chat','browserName','osName','referer','customerIp','customerPort','N.A.','tail','createReadStream','pipe','createWriteStream'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xb3d5,0xde));var _0x5b3d=function(_0x3fb9ef,_0x1ab798){_0x3fb9ef=_0x3fb9ef-0x0;var _0x4db6e1=_0xb3d5[_0x3fb9ef];return _0x4db6e1;};'use strict';var rimraf=require(_0x5b3d('0x0'));var zipdir=require(_0x5b3d('0x1'));var rp=require('request-promise');var moment=require(_0x5b3d('0x2'));var BPromise=require(_0x5b3d('0x3'));var Mustache=require(_0x5b3d('0x4'));var util=require(_0x5b3d('0x5'));var path=require(_0x5b3d('0x6'));var ejs=require(_0x5b3d('0x7'));var fs=require('fs');var _=require(_0x5b3d('0x8'));var Redis=require(_0x5b3d('0x9'));var interaction=require(_0x5b3d('0xa'));var qs=require('../../components/parsers/qs');var pdf=require(_0x5b3d('0xb'));var logger=require('../../config/logger')('api');var config=require(_0x5b3d('0xc'));var db=require(_0x5b3d('0xd'))['db'];config[_0x5b3d('0xe')]=_[_0x5b3d('0xf')](config['redis'],{'host':_0x5b3d('0x10'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x5b3d('0xe')]));require(_0x5b3d('0x11'))[_0x5b3d('0x12')](socket);var jayson=require(_0x5b3d('0x13'));var client=jayson['client'][_0x5b3d('0x14')]({'port':0x232b});var client9004=jayson[_0x5b3d('0x15')][_0x5b3d('0x14')]({'port':0x232c});function respondWithRpcPromise(_0x55396f,_0x161a58,_0xe7fb9a,_0xc60b34){return new BPromise(function(_0x1a2bde,_0x364f87){var _0x393e4a=_0xc60b34||client;return _0x393e4a[_0x5b3d('0x16')](_0x55396f,_0xe7fb9a)[_0x5b3d('0x17')](function(_0xf4569e){logger['info']('ChatInteraction,\x20%s,\x20%s',_0x161a58,_0x5b3d('0x18'));logger[_0x5b3d('0x19')](_0x5b3d('0x1a'),_0x161a58,_0x5b3d('0x18'),JSON[_0x5b3d('0x1b')](_0xf4569e));if(_0xf4569e[_0x5b3d('0x1c')]){if(_0xf4569e[_0x5b3d('0x1c')][_0x5b3d('0x1d')]===0x1f4){logger[_0x5b3d('0x1c')](_0x5b3d('0x1e'),_0x161a58,_0xf4569e[_0x5b3d('0x1c')]['message']);return _0x364f87(_0xf4569e['error'][_0x5b3d('0x1f')]);}logger['error'](_0x5b3d('0x1e'),_0x161a58,_0xf4569e[_0x5b3d('0x1c')][_0x5b3d('0x1f')]);return _0x1a2bde(_0xf4569e[_0x5b3d('0x1c')][_0x5b3d('0x1f')]);}else{logger['info'](_0x5b3d('0x1e'),_0x161a58,'request\x20sent');_0x1a2bde(_0xf4569e['result'][_0x5b3d('0x1f')]);}})[_0x5b3d('0x20')](function(_0x16be76){logger[_0x5b3d('0x1c')](_0x5b3d('0x1e'),_0x161a58,_0x16be76);_0x364f87(_0x16be76);});});}function respondWithStatusCode(_0x3c56a7,_0x126588){_0x126588=_0x126588||0xcc;return function(_0x16797a){if(_0x16797a){return _0x3c56a7[_0x5b3d('0x21')](_0x126588);}return _0x3c56a7[_0x5b3d('0x22')](_0x126588)[_0x5b3d('0x23')]();};}function respondWithResult(_0xfe1309,_0x5a7cd0){_0x5a7cd0=_0x5a7cd0||0xc8;return function(_0x47c967){if(_0x47c967){return _0xfe1309['status'](_0x5a7cd0)[_0x5b3d('0x24')](_0x47c967);}};}function respondWithFilteredResult(_0x4ff9e9,_0x27fd27){return function(_0x805c67){if(_0x805c67){var _0x426267=typeof _0x27fd27[_0x5b3d('0x25')]==='undefined'&&typeof _0x27fd27[_0x5b3d('0x26')]===_0x5b3d('0x27');var _0x101cfd=_0x805c67[_0x5b3d('0x28')];var _0x5ce410=_0x426267?0x0:_0x27fd27[_0x5b3d('0x25')];var _0x20a5ca=_0x426267?_0x805c67['count']:_0x27fd27[_0x5b3d('0x25')]+_0x27fd27[_0x5b3d('0x26')];var _0x921a61;if(_0x20a5ca>=_0x101cfd){_0x20a5ca=_0x101cfd;_0x921a61=0xc8;}else{_0x921a61=0xce;}_0x4ff9e9['status'](_0x921a61);return _0x4ff9e9[_0x5b3d('0x29')]('Content-Range',_0x5ce410+'-'+_0x20a5ca+'/'+_0x101cfd)[_0x5b3d('0x24')](_0x805c67);}return null;};}function saveUpdates(_0x33cf76){return function(_0x518ad1){if(_0x518ad1){return _0x518ad1[_0x5b3d('0x2a')](_0x33cf76)[_0x5b3d('0x17')](function(_0x2be2b1){return _0x2be2b1;});}return null;};}function removeEntity(_0x30a4ab){return function(_0xb7d802){if(_0xb7d802){return _0xb7d802[_0x5b3d('0x2b')]()['then'](function(){_0x30a4ab[_0x5b3d('0x22')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4ceae3){return function(_0x3cc8b0){if(!_0x3cc8b0){_0x4ceae3['sendStatus'](0x194);}return _0x3cc8b0;};}function handleError(_0x1d3951,_0x265ea2){_0x265ea2=_0x265ea2||0x1f4;return function(_0xf0284e){logger[_0x5b3d('0x1c')](_0xf0284e[_0x5b3d('0x2c')]);if(_0xf0284e[_0x5b3d('0x2d')]){delete _0xf0284e['name'];}_0x1d3951['status'](_0x265ea2)[_0x5b3d('0x2e')](_0xf0284e);};}function getMustacheRender(_0x5d4b8f,_0x4fe08b){return Mustache['render'](_0x5d4b8f,_[_0x5b3d('0x2f')](_0x4fe08b['body'],{'contact':_0x4fe08b[_0x5b3d('0x30')],'message':_0x4fe08b['message'],'agent':_0x4fe08b[_0x5b3d('0x31')],'interaction':_0x4fe08b[_0x5b3d('0x32')],'account':_0x4fe08b['account']}))||'';}exports['index']=function(_0x426111,_0x2665a2){var _0x16660d={};var _0x1bade1=_[_0x5b3d('0x33')](db[_0x5b3d('0x34')]['rawAttributes'],function(_0x576a4a){return{'name':_0x576a4a[_0x5b3d('0x35')],'type':_0x576a4a[_0x5b3d('0x36')]['key']};});_0x16660d=qs['getOptions'](_0x1bade1,_0x426111);return interaction[_0x5b3d('0x37')](_0x5b3d('0x38'),_0x426111[_0x5b3d('0x39')],_0x426111['user'],_0x16660d,_0x1bade1)[_0x5b3d('0x17')](respondWithFilteredResult(_0x2665a2,_0x16660d))[_0x5b3d('0x20')](handleError(_0x2665a2,null));};exports[_0x5b3d('0x3a')]=function(_0x1db171,_0x6eab85){var _0x91fdc2={'raw':![],'where':{'id':_0x1db171['params']['id']}},_0xa1fde9={};_0xa1fde9['model']=_['keys'](db['ChatInteraction'][_0x5b3d('0x3b')]);_0xa1fde9[_0x5b3d('0x39')]=_[_0x5b3d('0x3c')](_0x1db171[_0x5b3d('0x39')]);_0xa1fde9[_0x5b3d('0x3d')]=_[_0x5b3d('0x3e')](_0xa1fde9['model'],_0xa1fde9[_0x5b3d('0x39')]);_0x91fdc2[_0x5b3d('0x3f')]=_['intersection'](_0xa1fde9['model'],qs[_0x5b3d('0x40')](_0x1db171['query'][_0x5b3d('0x40')]));_0x91fdc2[_0x5b3d('0x3f')]=_0x91fdc2['attributes'][_0x5b3d('0x41')]?_0x91fdc2['attributes']:_0xa1fde9[_0x5b3d('0x42')];if(_0x1db171[_0x5b3d('0x39')][_0x5b3d('0x43')]){_0x91fdc2[_0x5b3d('0x44')]=[{'all':!![]}];}_0x91fdc2=_[_0x5b3d('0x2f')]({},_0x91fdc2,_0x1db171['options']);return db[_0x5b3d('0x34')][_0x5b3d('0x45')](_0x91fdc2)[_0x5b3d('0x17')](handleEntityNotFound(_0x6eab85,null))['then'](respondWithResult(_0x6eab85,null))['catch'](handleError(_0x6eab85,null));};exports[_0x5b3d('0x46')]=function(_0x1e5bb2,_0x141c46){return db['ChatInteraction'][_0x5b3d('0x46')](_0x1e5bb2[_0x5b3d('0x47')],{})[_0x5b3d('0x17')](respondWithResult(_0x141c46,0xc9))[_0x5b3d('0x20')](handleError(_0x141c46,null));};exports[_0x5b3d('0x2a')]=function(_0x232283,_0x394c5e){if(_0x232283[_0x5b3d('0x47')]['id']){delete _0x232283[_0x5b3d('0x47')]['id'];}return db[_0x5b3d('0x34')][_0x5b3d('0x45')]({'where':{'id':_0x232283[_0x5b3d('0x48')]['id']}})['then'](handleEntityNotFound(_0x394c5e,null))[_0x5b3d('0x17')](saveUpdates(_0x232283[_0x5b3d('0x47')],null))[_0x5b3d('0x17')](respondWithResult(_0x394c5e,null))[_0x5b3d('0x20')](handleError(_0x394c5e,null));};exports['destroy']=function(_0x13c5e,_0xb73055){return db[_0x5b3d('0x34')][_0x5b3d('0x45')]({'where':{'id':_0x13c5e[_0x5b3d('0x48')]['id']}})['then'](handleEntityNotFound(_0xb73055,null))[_0x5b3d('0x17')](removeEntity(_0xb73055,null))[_0x5b3d('0x20')](handleError(_0xb73055,null));};exports['describe']=function(_0xe03fcc,_0x247991){return db[_0x5b3d('0x34')][_0x5b3d('0x49')]()[_0x5b3d('0x17')](respondWithResult(_0x247991,null))[_0x5b3d('0x20')](handleError(_0x247991,null));};exports[_0x5b3d('0x4a')]=function(_0x530ad8,_0x4646b1){var _0x519555=_0x530ad8[_0x5b3d('0x48')]['id'];var _0xdbb00b;var _0x565dc4;var _0x54e337;return db[_0x5b3d('0x34')][_0x5b3d('0x4b')]({'where':{'id':_0x519555}})[_0x5b3d('0x17')](function(_0x2d971a){_0xdbb00b=_0x2d971a;return db[_0x5b3d('0x4c')][_0x5b3d('0x4b')]({'where':{'id':_0x2d971a['ChatWebsiteId']},'attributes':['id',_0x5b3d('0x4d'),_0x5b3d('0x4e'),'vidaooTopic',_0x5b3d('0x4f'),_0x5b3d('0x50')],'raw':!![]});})[_0x5b3d('0x17')](function(_0xef8566){if(_0xef8566&&_0xef8566[_0x5b3d('0x4d')]&&_0xef8566['vidaooEscalation']){_0x565dc4=_0xef8566;var _0x4ebc05={'interaction':{'id':_0x519555},'agent':{'id':_0x530ad8['user']['id'],'name':_0x530ad8['user'][_0x5b3d('0x2d')],'fullname':_0x530ad8[_0x5b3d('0x51')][_0x5b3d('0x52')],'email':_0x530ad8[_0x5b3d('0x51')][_0x5b3d('0x53')]},'contact':_0x530ad8[_0x5b3d('0x47')]['contact'],'account':_0x530ad8[_0x5b3d('0x47')][_0x5b3d('0x54')]};var _0x39e925={'rejectUnauthorized':![],'method':_0x5b3d('0x55'),'url':_0x5b3d('0x56'),'headers':{'X-APIKEY':_0xef8566['vidaooApiKey']},'body':{'duration':null,'scheduledAt':null,'participants':[_0x530ad8[_0x5b3d('0x51')][_0x5b3d('0x53')]],'buttons':null,'topic':_0x565dc4[_0x5b3d('0x57')],'note':_[_0x5b3d('0x58')](_0x565dc4[_0x5b3d('0x4f')])?null:getMustacheRender(_0x565dc4[_0x5b3d('0x4f')],_0x4ebc05),'metadata':null},'redirect':_0x5b3d('0x59'),'json':!![]};try{if(!_['isNull'](_0x565dc4['vidaooMetadata'])){var _0x24fd85=getMustacheRender(_0x565dc4[_0x5b3d('0x50')],_0x4ebc05);var _0x4dbded=JSON[_0x5b3d('0x5a')](_0x24fd85);_0x39e925[_0x5b3d('0x47')]['metadata']=_0x4dbded;}}catch(_0x31a0c5){throw new db[(_0x5b3d('0x5b'))][(_0x5b3d('0x5c'))](_0x5b3d('0x5d'));}return rp(_0x39e925);}else{throw new db[(_0x5b3d('0x5b'))][(_0x5b3d('0x5c'))](_0x5b3d('0x5e'));}})['then'](function(_0xbc6318){_0x54e337=_0xbc6318;if(_0x54e337['id']){var _0x5bdb91={'body':_0x54e337[_0x5b3d('0x5f')],'ChatWebsiteId':_0x565dc4['id'],'ChatInteractionId':_0xdbb00b['id'],'direction':'out','UserId':_0x530ad8[_0x5b3d('0x51')]['id']};return db['ChatMessage'][_0x5b3d('0x46')](_0x5bdb91,{});}else{throw new db[(_0x5b3d('0x5b'))][(_0x5b3d('0x5c'))](_0x5b3d('0x60'));}})[_0x5b3d('0x17')](function(){return _0xdbb00b[_0x5b3d('0x61')]({'vidaooSessionId':_0x54e337['id']});})['then'](respondWithResult(_0x4646b1,null))[_0x5b3d('0x20')](handleError(_0x4646b1,null));};exports[_0x5b3d('0x62')]=function(_0xa9db,_0x2e7af7){if(_0xa9db[_0x5b3d('0x47')]['id']){delete _0xa9db[_0x5b3d('0x47')]['id'];}return db[_0x5b3d('0x34')][_0x5b3d('0x45')]({'where':{'id':_0xa9db[_0x5b3d('0x48')]['id']},'include':[{'model':db[_0x5b3d('0x63')],'as':_0x5b3d('0x64')}]})[_0x5b3d('0x17')](handleEntityNotFound(_0x2e7af7,null))[_0x5b3d('0x17')](saveUpdates(_0xa9db[_0x5b3d('0x47')],null))[_0x5b3d('0x17')](respondWithResult(_0x2e7af7,null))['catch'](handleError(_0x2e7af7,null));};exports[_0x5b3d('0x65')]=function(_0x236284,_0x161c36){if(_0x236284['body']['id']){delete _0x236284['body']['id'];}return db[_0x5b3d('0x34')]['find']({'where':{'id':_0x236284[_0x5b3d('0x48')]['id']}})[_0x5b3d('0x17')](function(_0x4e9215){if(!_0x4e9215){logger[_0x5b3d('0x1c')]('abandonInteraction,\x20%s,\x20%s,\x20%s',_0x5b3d('0x65'),0x194,'entity\x20not\x20found');_0x161c36[_0x5b3d('0x21')](0x194);}else{if(_0x4e9215[_0x5b3d('0x66')]){throw new db['Sequelize'][(_0x5b3d('0x5c'))](_0x5b3d('0x67'));}}return _0x4e9215;})[_0x5b3d('0x17')](function(_0x5ee7ad){if(_0x5ee7ad){return _0x5ee7ad[_0x5b3d('0x2a')]({'closed':_0x236284[_0x5b3d('0x47')][_0x5b3d('0x68')],'disposition':_0x236284['body'][_0x5b3d('0x69')]})[_0x5b3d('0x17')](function(_0x4b7b8b){return _0x4b7b8b;});}})['then'](function(){return respondWithRpcPromise(_0x5b3d('0x6a'),'abandon',_0x236284[_0x5b3d('0x47')],client9004);})['then'](respondWithResult(_0x161c36,null))[_0x5b3d('0x20')](handleError(_0x161c36,null));};exports[_0x5b3d('0x6b')]=function(_0x59fad3,_0x9b3cbd){_0x59fad3['body']['name']=_0x59fad3[_0x5b3d('0x6c')][_0x5b3d('0x6d')];_0x59fad3[_0x5b3d('0x47')]['basename']=_0x59fad3['file'][_0x5b3d('0x6e')];_0x59fad3[_0x5b3d('0x47')][_0x5b3d('0x36')]=_0x59fad3[_0x5b3d('0x6c')]['mimetype'];return db[_0x5b3d('0x6f')][_0x5b3d('0x46')](_0x59fad3[_0x5b3d('0x47')])['then'](respondWithResult(_0x9b3cbd,0xc9))[_0x5b3d('0x20')](handleError(_0x9b3cbd,null));};exports[_0x5b3d('0x70')]=function(_0x451c7a,_0x15012c){return db[_0x5b3d('0x34')][_0x5b3d('0x4b')]({'where':{'id':_0x451c7a['params']['id']},'raw':!![]})[_0x5b3d('0x17')](handleEntityNotFound(_0x15012c,null))['then'](function(_0x50cc07){if(_0x50cc07){if(_0x50cc07[_0x5b3d('0x68')]){return _0x15012c[_0x5b3d('0x22')](0x193)[_0x5b3d('0x24')]({'status':0x193,'message':_0x5b3d('0x71')});}return db[_0x5b3d('0x6f')]['findOne']({'where':{'id':_0x451c7a[_0x5b3d('0x39')][_0x5b3d('0x72')]},'raw':!![]})['then'](handleEntityNotFound(_0x15012c,null));}})[_0x5b3d('0x17')](function(_0x5d74f4){if(_0x5d74f4){var _0x58a693=_0x5d74f4[_0x5b3d('0x73')]!==null;var _0x451b85=path[_0x5b3d('0x74')](config[_0x5b3d('0x75')],_0x5b3d('0x76'));if(_0x58a693){_0x451b85=path['join'](_0x451b85,_0x5b3d('0x77'));}var _0x50ce64=path['join'](_0x451b85,_0x5d74f4[_0x5b3d('0x78')]);return _0x15012c['download'](_0x50ce64);}})[_0x5b3d('0x20')](handleError(_0x15012c,null));};exports[_0x5b3d('0x79')]=function(_0x393cf6,_0x3895ec){var _0x2d4d39=null;var _0x4e396c=null;var _0x20b39f=null;if(_0x393cf6['body']['id']){delete _0x393cf6[_0x5b3d('0x47')]['id'];}if(_0x393cf6[_0x5b3d('0x47')][_0x5b3d('0x7a')]){_0x20b39f=path[_0x5b3d('0x74')](config['root'],_0x5b3d('0x7b'),util[_0x5b3d('0x7c')](_0x5b3d('0x7d'),Date[_0x5b3d('0x7e')]()));_0x393cf6[_0x5b3d('0x47')][_0x5b3d('0x7f')]=_0x20b39f;}return db[_0x5b3d('0x34')][_0x5b3d('0x45')]({'where':{'id':_0x393cf6[_0x5b3d('0x48')]['id']},'include':[{'model':db[_0x5b3d('0x80')],'as':_0x5b3d('0x81'),'include':[{'model':db[_0x5b3d('0x82')],'as':_0x5b3d('0x82')}]}]})['then'](handleEntityNotFound(_0x3895ec,null))[_0x5b3d('0x17')](saveUpdates(_0x393cf6['body'],null))[_0x5b3d('0x17')](function(_0xb03dfa){if(_0xb03dfa){_0x2d4d39=_0xb03dfa;return db['ChatWebsite'][_0x5b3d('0x45')]({'where':{'id':_0x2d4d39[_0x5b3d('0x83')]}});}})[_0x5b3d('0x17')](function(_0xfab778){if(_0xfab778){_0x4e396c=_0xfab778;return db[_0x5b3d('0x63')][_0x5b3d('0x45')]({'where':{'id':_0x2d4d39['ContactId']}});}})[_0x5b3d('0x17')](function(_0x2cb7e2){if(_0x2cb7e2){if(_0x20b39f){var _0x4b753f=null;for(var _0x4072c7=0x1;_0x4072c7<_0x2d4d39[_0x5b3d('0x81')][_0x5b3d('0x41')];++_0x4072c7){_0x4b753f=_0x2d4d39['Messages'][_0x4072c7];var _0x58bec4=_0x4b753f['UserId']?util[_0x5b3d('0x7c')](_0x5b3d('0x84'),_0x4e396c[_0x5b3d('0x85')],_0x4b753f[_0x5b3d('0x66')]):_0x5b3d('0x86');var _0x2afd35=_0x393cf6[_0x5b3d('0x47')][_0x5b3d('0x87')]||util[_0x5b3d('0x7c')](_0x5b3d('0x84'),'Visitor',_0x4b753f[_0x5b3d('0x88')]);switch(_0x4e396c[_0x5b3d('0x89')]){case _0x5b3d('0x8a'):_0x58bec4=_0x4b753f[_0x5b3d('0x66')]?util[_0x5b3d('0x7c')](_0x5b3d('0x84'),_0x4e396c[_0x5b3d('0x85')],_0x4b753f[_0x5b3d('0x66')]):'System';break;case _0x5b3d('0x8b'):_0x58bec4=_0x4b753f[_0x5b3d('0x66')]?_0x4b753f['User']['alias']||_0x4b753f['User'][_0x5b3d('0x52')]:_0x5b3d('0x86');break;case _0x5b3d('0x8c'):_0x58bec4=_0x4b753f[_0x5b3d('0x66')]?_0x4b753f['User'][_0x5b3d('0x52')]:_0x5b3d('0x86');break;default:_0x58bec4=_0x4b753f['UserId']?util[_0x5b3d('0x7c')](_0x5b3d('0x84'),_0x4e396c[_0x5b3d('0x85')],_0x4b753f['UserId']):_0x5b3d('0x86');}var _0x2f9312=util[_0x5b3d('0x7c')](_0x5b3d('0x8d'),moment(_0x4b753f[_0x5b3d('0x8e')])[_0x5b3d('0x7c')]('MM/DD/YYYY\x20HH:mm:ss'),_0x4b753f[_0x5b3d('0x8f')]==='in'?_0x2afd35:_0x58bec4,_0x4b753f[_0x5b3d('0x47')]);if(!_0x4b753f[_0x5b3d('0x90')]){fs[_0x5b3d('0x91')](_0x20b39f,_0x2f9312);}}return db[_0x5b3d('0x92')][_0x5b3d('0x4b')]({'where':{'service':!![]},'include':[{'model':db[_0x5b3d('0x93')],'as':_0x5b3d('0x94'),'raw':!![],'include':[{'model':db[_0x5b3d('0x95')],'as':'CloudProvider','raw':!![]}]}]});}}})[_0x5b3d('0x17')](function(_0x4aff89){if(!_0x4aff89||!_0x4aff89[_0x5b3d('0x94')]||!_0x393cf6[_0x5b3d('0x47')])return _0x2d4d39;var _0x2f88cc=_0x4aff89[_0x5b3d('0x96')]();return respondWithRpcPromise('SendMail',_0x5b3d('0x97'),{'account':_0x2f88cc,'message':{'from':util[_0x5b3d('0x7c')](_0x5b3d('0x98'),_0x4aff89[_0x5b3d('0x2d')],_0x4aff89['email']||_0x4aff89[_0x5b3d('0x94')][_0x5b3d('0x51')]),'to':_0x393cf6[_0x5b3d('0x47')][_0x5b3d('0x7a')],'subject':_0x5b3d('0x99'),'text':util[_0x5b3d('0x7c')](_0x5b3d('0x9a'),_0x393cf6[_0x5b3d('0x47')][_0x5b3d('0x7a')]),'attachments':[{'path':_0x20b39f}]}})['then'](function(){return _0x2d4d39;})[_0x5b3d('0x20')](function(_0x1a0da7){logger[_0x5b3d('0x1c')](_0x1a0da7);});})[_0x5b3d('0x17')](respondWithStatusCode(_0x3895ec,0xc8))[_0x5b3d('0x20')](handleError(_0x3895ec,null));};exports[_0x5b3d('0x9b')]=function(_0x729f4d,_0x2cd021){return db['ChatMessage'][_0x5b3d('0x45')]({'where':{'id':_0x729f4d['params']['id']}})['then'](handleEntityNotFound(_0x2cd021,null))[_0x5b3d('0x17')](function(_0x2b9c7b){if(_0x2b9c7b){return _0x2b9c7b[_0x5b3d('0x9b')](_0x729f4d[_0x5b3d('0x47')][_0x5b3d('0x9c')],_[_0x5b3d('0x9d')](_0x729f4d[_0x5b3d('0x47')],['ids','id'])||{});}})[_0x5b3d('0x17')](respondWithResult(_0x2cd021,null))['catch'](handleError(_0x2cd021,null));};exports[_0x5b3d('0x9e')]=function(_0x3d9e14,_0x413c49){var _0x9daf4a={'raw':![],'where':{}};var _0x53da44={};var _0x3c96be={'count':0x0,'rows':[]};return db[_0x5b3d('0x34')][_0x5b3d('0x4b')]({'where':{'id':_0x3d9e14[_0x5b3d('0x48')]['id']}})[_0x5b3d('0x17')](handleEntityNotFound(_0x413c49,null))[_0x5b3d('0x17')](function(_0x4d8c79){if(_0x4d8c79){_0x53da44[_0x5b3d('0x42')]=_[_0x5b3d('0x3c')](db[_0x5b3d('0x80')][_0x5b3d('0x3b')]);_0x53da44[_0x5b3d('0x39')]=_[_0x5b3d('0x3c')](_0x3d9e14[_0x5b3d('0x39')]);_0x53da44[_0x5b3d('0x3d')]=_[_0x5b3d('0x3e')](_0x53da44[_0x5b3d('0x42')],_0x53da44[_0x5b3d('0x39')]);_0x9daf4a[_0x5b3d('0x3f')]=_[_0x5b3d('0x3e')](_0x53da44[_0x5b3d('0x42')],qs[_0x5b3d('0x40')](_0x3d9e14['query'][_0x5b3d('0x40')]));_0x9daf4a[_0x5b3d('0x3f')]=_0x9daf4a[_0x5b3d('0x3f')][_0x5b3d('0x41')]?_0x9daf4a['attributes']:_0x53da44[_0x5b3d('0x42')];if(!_0x3d9e14[_0x5b3d('0x39')][_0x5b3d('0x9f')](_0x5b3d('0xa0'))){_0x9daf4a[_0x5b3d('0x26')]=qs['limit'](_0x3d9e14['query'][_0x5b3d('0x26')]);_0x9daf4a[_0x5b3d('0x25')]=qs[_0x5b3d('0x25')](_0x3d9e14[_0x5b3d('0x39')][_0x5b3d('0x25')]);}_0x9daf4a[_0x5b3d('0xa1')]=qs['sort'](_0x3d9e14[_0x5b3d('0x39')][_0x5b3d('0xa2')]);_0x9daf4a['where']=qs[_0x5b3d('0x3d')](_[_0x5b3d('0xa3')](_0x3d9e14[_0x5b3d('0x39')],_0x53da44[_0x5b3d('0x3d')]));_0x9daf4a['where'][_0x5b3d('0xa4')]=_0x4d8c79['id'];if(_0x3d9e14[_0x5b3d('0x39')]['filter']){_0x9daf4a['where']=_[_0x5b3d('0x2f')](_0x9daf4a['where'],{'$or':_[_0x5b3d('0x33')](_0x9daf4a[_0x5b3d('0x3f')],function(_0x4b5732){var _0x1c9775={};_0x1c9775[_0x4b5732]={'$like':'%'+_0x3d9e14[_0x5b3d('0x39')][_0x5b3d('0xa5')]+'%'};return _0x1c9775;})});}if(_0x3d9e14[_0x5b3d('0x39')][_0x5b3d('0xa6')]){var _0x5a3599=_0x3d9e14[_0x5b3d('0x39')][_0x5b3d('0xa6')][_0x5b3d('0xa7')](',');var _0x31b891={};_0x31b891[_0x5a3599[0x0]]={'$gte':moment(_0x5a3599[0x1])['format'](_0x5b3d('0xa8'))};_0x9daf4a[_0x5b3d('0xa9')]=_[_0x5b3d('0x2f')](_0x9daf4a[_0x5b3d('0xa9')],_0x31b891);}_0x9daf4a=_['merge']({},_0x9daf4a,_0x3d9e14['options']);return db['ChatMessage'][_0x5b3d('0x28')]({'where':_0x9daf4a[_0x5b3d('0xa9')]})[_0x5b3d('0x17')](function(_0x311ac9){_0x3c96be[_0x5b3d('0x28')]=_0x311ac9;if(_0x3d9e14[_0x5b3d('0x39')][_0x5b3d('0x43')]){_0x9daf4a[_0x5b3d('0x44')]=[{'all':!![]}];}return db['ChatMessage']['findAll'](_0x9daf4a);})[_0x5b3d('0x17')](function(_0x166ce8){_0x3c96be[_0x5b3d('0xaa')]=_0x166ce8;return _0x3c96be;});}})[_0x5b3d('0x17')](respondWithFilteredResult(_0x413c49,_0x9daf4a))[_0x5b3d('0x20')](handleError(_0x413c49,null));};exports[_0x5b3d('0xab')]=function(_0x47d2b4,_0x1f5f76){var _0x1ebc68={'where':{}},_0x40f67d={},_0x3cfedd={'count':0x0,'rows':[]};return db[_0x5b3d('0x34')]['findOne']({'where':{'id':_0x47d2b4[_0x5b3d('0x48')]['id']}})[_0x5b3d('0x17')](handleEntityNotFound(_0x1f5f76,null))[_0x5b3d('0x17')](function(_0x2b99e3){if(_0x2b99e3){_0x40f67d[_0x5b3d('0x42')]=_[_0x5b3d('0x3c')](db[_0x5b3d('0x80')][_0x5b3d('0x3b')]);_0x40f67d['query']=_[_0x5b3d('0x3c')](_0x47d2b4[_0x5b3d('0x39')]);_0x40f67d[_0x5b3d('0x3d')]=_[_0x5b3d('0x3e')](_0x40f67d[_0x5b3d('0x42')],_0x40f67d[_0x5b3d('0x39')]);_0x1ebc68[_0x5b3d('0x3f')]=_[_0x5b3d('0x3e')](_0x40f67d['model'],qs['fields'](_0x47d2b4[_0x5b3d('0x39')][_0x5b3d('0x40')]));_0x1ebc68[_0x5b3d('0x3f')]=_0x1ebc68[_0x5b3d('0x3f')][_0x5b3d('0x41')]?_0x1ebc68[_0x5b3d('0x3f')]:_0x40f67d['model'];if(!_0x47d2b4[_0x5b3d('0x39')][_0x5b3d('0x9f')](_0x5b3d('0xa0'))){_0x1ebc68[_0x5b3d('0x26')]=qs[_0x5b3d('0x26')](_0x47d2b4[_0x5b3d('0x39')][_0x5b3d('0x26')]);_0x1ebc68[_0x5b3d('0x25')]=qs['offset'](_0x47d2b4[_0x5b3d('0x39')][_0x5b3d('0x25')]);}_0x1ebc68[_0x5b3d('0xa1')]=qs[_0x5b3d('0xa2')](_0x47d2b4[_0x5b3d('0x39')][_0x5b3d('0xa2')]);_0x1ebc68[_0x5b3d('0xa9')]=qs[_0x5b3d('0x3d')](_[_0x5b3d('0xa3')](_0x47d2b4['query'],_0x40f67d['filters']));_0x1ebc68['where'][_0x5b3d('0xa4')]=_0x2b99e3['id'];if(_0x47d2b4[_0x5b3d('0x39')]['filter']){_0x1ebc68[_0x5b3d('0xa9')]=_[_0x5b3d('0x2f')](_0x1ebc68[_0x5b3d('0xa9')],{'$or':_[_0x5b3d('0x33')](_0x1ebc68[_0x5b3d('0x3f')],function(_0xd2e747){var _0x3432e0={};_0x3432e0[_0xd2e747]={'$like':'%'+_0x47d2b4[_0x5b3d('0x39')][_0x5b3d('0xa5')]+'%'};return _0x3432e0;})});}_0x1ebc68[_0x5b3d('0xa9')][_0x5b3d('0x90')]=![];if(_0x47d2b4['query']['id']){_0x1ebc68[_0x5b3d('0xa9')]['id']={'$gt':_0x47d2b4[_0x5b3d('0x39')]['id']};}_0x1ebc68=_[_0x5b3d('0x2f')]({},_0x1ebc68,_0x47d2b4[_0x5b3d('0xac')]);return db[_0x5b3d('0x80')][_0x5b3d('0x28')]({'where':_0x1ebc68['where']})[_0x5b3d('0x17')](function(_0x180b79){_0x3cfedd[_0x5b3d('0x28')]=_0x180b79;_0x1ebc68[_0x5b3d('0x44')]=[];if(_0x47d2b4['query'][_0x5b3d('0xad')]){_0x1ebc68['include'][_0x5b3d('0xae')]({'model':db['User'],'as':_0x5b3d('0x82'),'attributes':['id','fullname','alias']});}if(_0x47d2b4[_0x5b3d('0x39')][_0x5b3d('0x43')]){_0x1ebc68[_0x5b3d('0x44')]=[{'all':!![]}];}return db[_0x5b3d('0x80')][_0x5b3d('0x37')](_0x1ebc68);})['then'](function(_0x1ca068){_0x3cfedd[_0x5b3d('0xaa')]=_0x1ca068;return _0x3cfedd;});}})['then'](respondWithFilteredResult(_0x1f5f76,_0x1ebc68))[_0x5b3d('0x20')](handleError(_0x1f5f76,null));};exports[_0x5b3d('0xaf')]=function(_0x59ac03,_0x59c168){return db[_0x5b3d('0x34')][_0x5b3d('0x45')]({'where':{'id':_0x59ac03['params']['id']}})[_0x5b3d('0x17')](handleEntityNotFound(_0x59c168,null))[_0x5b3d('0x17')](function(_0x3f74a8){if(_0x3f74a8){return _0x3f74a8[_0x5b3d('0xb0')](_0x59ac03[_0x5b3d('0x47')][_0x5b3d('0x9c')],_[_0x5b3d('0x9d')](_0x59ac03[_0x5b3d('0x47')],[_0x5b3d('0x9c'),'id'])||{})['spread'](function(){return db[_0x5b3d('0xb1')][_0x5b3d('0x37')]({'attributes':['id',_0x5b3d('0x2d'),'color'],'where':{'id':_0x59ac03[_0x5b3d('0x47')][_0x5b3d('0x9c')]}});})[_0x5b3d('0x17')](function(_0xc05afc){socket[_0x5b3d('0xb2')]('chatInteractionTags:save',{'id':Number(_0x59ac03[_0x5b3d('0x48')]['id']),'tags':_0xc05afc||[]});return{'id':Number(_0x59ac03[_0x5b3d('0x48')]['id']),'tags':_0xc05afc||[]};});}})[_0x5b3d('0x17')](respondWithResult(_0x59c168,null))['catch'](handleError(_0x59c168,null));};exports[_0x5b3d('0xb3')]=function(_0x1b2a1d,_0x577272){return db[_0x5b3d('0x34')]['find']({'where':{'id':_0x1b2a1d['params']['id']}})['then'](handleEntityNotFound(_0x577272,null))[_0x5b3d('0x17')](function(_0x274ce7){if(_0x274ce7){return _0x274ce7['removeTags'](_0x1b2a1d[_0x5b3d('0x39')][_0x5b3d('0x9c')]);}})[_0x5b3d('0x17')](respondWithStatusCode(_0x577272,null))[_0x5b3d('0x20')](handleError(_0x577272,null));};exports['download']=function(_0xb48870,_0x3a6f8b){var _0x1e47d9=moment()[_0x5b3d('0xb4')]()[_0x5b3d('0xb5')]();var _0x31b433=path[_0x5b3d('0x74')](config[_0x5b3d('0x75')],_0x5b3d('0xb6'),_0x5b3d('0xb7'),'tmp');var _0x1be324=path[_0x5b3d('0x74')](config[_0x5b3d('0x75')],_0x5b3d('0xb6'),_0x5b3d('0xb7'),_0x5b3d('0xb8'));var _0x1d75c8=path[_0x5b3d('0x74')](_0x31b433,_0x1e47d9);var _0x4ebbd7=util[_0x5b3d('0x7c')](_0x5b3d('0xb9'),_0xb48870[_0x5b3d('0x48')]['id'],_0x1e47d9);var _0xa7d267=path[_0x5b3d('0x74')](_0x31b433,_0x4ebbd7);var _0x25b03b=[];_0x25b03b[_0x5b3d('0xae')]({'model':db[_0x5b3d('0x82')],'as':_0x5b3d('0x82'),'attributes':['id',_0x5b3d('0x52')],'raw':!![]});_0x25b03b[_0x5b3d('0xae')]({'model':db[_0x5b3d('0x63')],'as':_0x5b3d('0x64'),'attributes':['id',_0x5b3d('0xba'),'lastName'],'raw':!![]});if(_0xb48870[_0x5b3d('0x39')][_0x5b3d('0xb8')]){_0x25b03b[_0x5b3d('0xae')]({'model':db['Attachment'],'as':_0x5b3d('0x6f'),'raw':!![]});}var _0x475849=[{'model':db[_0x5b3d('0x80')],'as':_0x5b3d('0x81'),'attributes':['id',_0x5b3d('0x47'),'createdAt',_0x5b3d('0x8f'),_0x5b3d('0x90'),_0x5b3d('0xbb')],'include':_0x25b03b}];_0x475849[_0x5b3d('0xae')]({'model':db[_0x5b3d('0x4c')],'as':_0x5b3d('0xbc'),'attributes':['id',_0x5b3d('0x2d')]});_0x475849[_0x5b3d('0xae')]({'model':db['User'],'as':_0x5b3d('0xbd'),'attributes':['id','fullname']});return db[_0x5b3d('0x34')]['find']({'where':{'id':_0xb48870['params']['id']},'include':_0x475849})[_0x5b3d('0x17')](handleEntityNotFound(_0x3a6f8b,null))['then'](function(_0x3ef12d){if(_0x3ef12d){var _0x1315bf=_0x3ef12d[_0x5b3d('0xbe')]({'plain':!![]});fs['mkdirSync'](_0x1d75c8);var _0x33a60d={'channel':_0x5b3d('0xbf'),'account':_0x1315bf['Account']['name'],'agent':_0x1315bf[_0x5b3d('0xbd')]?_0x1315bf[_0x5b3d('0xbd')]['fullname']:'N.A.','createdAt':moment(_0x1315bf[_0x5b3d('0x8e')])[_0x5b3d('0x7c')](_0x5b3d('0xa8'))[_0x5b3d('0xb5')](),'closedAt':_0x1315bf[_0x5b3d('0x68')]?moment(_0x1315bf['closedAt'])['format'](_0x5b3d('0xa8'))[_0x5b3d('0xb5')]():'','disposition':_0x1315bf['disposition'],'chatInfo':{'browser':_0x1315bf[_0x5b3d('0xc0')],'os':_0x1315bf[_0x5b3d('0xc1')],'referer':_0x1315bf[_0x5b3d('0xc2')],'customerIp':_0x1315bf[_0x5b3d('0xc3')],'customerPort':_0x1315bf[_0x5b3d('0xc4')]?_0x1315bf['customerPort']:_0x5b3d('0xc5')},'messages':_(_0x1315bf[_0x5b3d('0x81')])[_0x5b3d('0xc6')]()[_0x5b3d('0xa5')]({'secret':![]})[_0x5b3d('0x33')](function(_0x3ae514){if(_0x3ae514[_0x5b3d('0x6f')]){var _0x3b4d2d=path[_0x5b3d('0x74')](_0x1be324,_0x3ae514[_0x5b3d('0x6f')][_0x5b3d('0x78')]);if(fs['existsSync'](_0x3b4d2d)){fs[_0x5b3d('0xc7')](_0x3b4d2d)[_0x5b3d('0xc8')](fs[_0x5b3d('0xc9')](path[_0x5b3d('0x74')](_0x1d75c8,_0x3ae514[_0x5b3d('0x6f')][_0x5b3d('0x78')])));}}return{'date':moment(_0x3ae514[_0x5b3d('0x8e')])['format']('YYYY-MM-DD\x20HH:mm:ss')[_0x5b3d('0xb5')](),'sender':_0x3ae514['direction']==='out'?_0x3ae514[_0x5b3d('0x82')]?_0x3ae514[_0x5b3d('0x82')][_0x5b3d('0x52')]:_0x5b3d('0x86'):_0x3ae514[_0x5b3d('0x64')][_0x5b3d('0xba')]+(_0x3ae514['Contact'][_0x5b3d('0xca')]?'\x20'+_0x3ae514[_0x5b3d('0x64')][_0x5b3d('0xca')]:''),'body':_0x3ae514['Attachment']?_0x3ae514[_0x5b3d('0x6f')][_0x5b3d('0x78')]:_0x3ae514['body'],'direction':_0x3ae514[_0x5b3d('0x8f')]===_0x5b3d('0xcb')?'A':'C','secret':_0x3ae514[_0x5b3d('0x90')],'read':_0x3ae514[_0x5b3d('0xbb')],'attachment':_0x3ae514['Attachment']};})[_0x5b3d('0xcc')]()};return ejs[_0x5b3d('0xcd')](path[_0x5b3d('0x74')](config[_0x5b3d('0x75')],_0x5b3d('0xb6'),_0x5b3d('0xce'),'downloadInteraction.ejs'),{'interaction':_0x33a60d})[_0x5b3d('0x17')](function(_0x1fae5f){var _0x3c25e4=path['join'](_0x1d75c8,_0x5b3d('0xcf')+_0x1315bf['id']+'-'+_0x1e47d9+_0x5b3d('0xd0'));var _0x2a4335={'path':_0x3c25e4,'channel':'Chat','interactionId':_0x1315bf['id']};return pdf[_0x5b3d('0xd1')](_0x1fae5f,_0x2a4335);})[_0x5b3d('0x17')](function(){return new Promise(function(_0x83ef50,_0x5c5297){zipdir(_0x1d75c8,{'saveTo':_0xa7d267},function(_0x2f504d,_0x1a72bd){if(_0x2f504d)return _0x5c5297(_0x2f504d);return _0x83ef50(_0x1a72bd);});})['then'](function(){return new BPromise(function(_0x50b101,_0x3348af){rimraf(_0x1d75c8,function(_0x49e252){if(_0x49e252)_0x3348af(_0x49e252);return _0x50b101();});});})[_0x5b3d('0x17')](function(){return _0x3a6f8b[_0x5b3d('0xd2')](_0xa7d267,_0x4ebbd7,function(_0x2f2264){if(_0x2f2264){logger[_0x5b3d('0x1c')](_0x5b3d('0xd3'),_0x2f2264);}else{fs['unlinkSync'](_0xa7d267);}});});});}else{return _0x3a6f8b[_0x5b3d('0x21')](0xc8);}})[_0x5b3d('0x20')](handleError(_0x3a6f8b,null));};
\ No newline at end of file
+var _0xbecb=['downloadInteraction.ejs','createPdfFromHTML','rimraf','request-promise','bluebird','mustache','util','path','ejs','lodash','ioredis','../../components/interaction/service','../../components/export/pdf','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatInteraction.socket','jayson/promise','client','http','then','ChatInteraction,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','info','result','catch','status','end','json','offset','undefined','count','set','destroy','stack','name','send','render','merge','body','contact','agent','interaction','account','index','map','ChatInteraction','rawAttributes','fieldName','key','chat','query','user','show','model','keys','filters','intersection','attributes','fields','length','includeAll','include','find','create','params','createVidaooSession','findOne','ChatWebsiteId','vidaooEscalation','vidaooTopic','vidaooNote','email','POST','https://api-vidaoo.xcally.com/api/v1/meetings','vidaooApiKey','isNull','follow','vidaooMetadata','parse','Sequelize','ValidationError','Error\x20in\x20Vidaoo\x20configuration','join_url','ChatMessage','Unable\x20to\x20create\x20Vidaoo\x20session','updateAttributes','Contact','abandon','entity\x20not\x20found','sendStatus','UserId','update','closed','disposition','attachmentUpload','originalname','basename','file','filename','type','mimetype','Attachment','attachId','ChatOfflineMessageId','join','root','server/files/attachments/','offline-chat/','download','close','mailTranscript','server/files/chat/upload/','format','transcript-%s.txt','now','pathTranscript','Messages','User','ChatWebsite','CmContact','ContactId','%s%d','agentAlias','System','customer','Visitor','alias','fullname','agent_fullname','[%s]\x20%s:\x20%s\x0a','createdAt','MM/DD/YYYY\x20HH:mm:ss','direction','secret','appendFileSync','MailAccount','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','hasOwnProperty','nolimit','limit','sort','where','ChatInteractionId','filter','$gte','split','YYYY-MM-DD\x20HH:mm:ss','findAll','rows','getMyMessages','pick','options','includeAgent','push','addTags','setTags','spread','color','removeTags','unix','toString','server','files','tmp','transcript-%d-%s.zip','lastName','attachments','read','Account','Owner','get','mkdirSync','Chat','N.A.','browserName','osName','referer','customerIp','customerPort','tail','existsSync','createReadStream','pipe','out','value','renderFile','views'];(function(_0x7f3494,_0xa02e71){var _0x1ace3a=function(_0x2259b5){while(--_0x2259b5){_0x7f3494['push'](_0x7f3494['shift']());}};_0x1ace3a(++_0xa02e71);}(_0xbecb,0x1a2));var _0xbbec=function(_0x5f1391,_0x19c132){_0x5f1391=_0x5f1391-0x0;var _0x50ebe3=_0xbecb[_0x5f1391];return _0x50ebe3;};'use strict';var rimraf=require(_0xbbec('0x0'));var zipdir=require('zip-dir');var rp=require(_0xbbec('0x1'));var moment=require('moment');var BPromise=require(_0xbbec('0x2'));var Mustache=require(_0xbbec('0x3'));var util=require(_0xbbec('0x4'));var path=require(_0xbbec('0x5'));var ejs=require(_0xbbec('0x6'));var fs=require('fs');var _=require(_0xbbec('0x7'));var Redis=require(_0xbbec('0x8'));var interaction=require(_0xbbec('0x9'));var qs=require('../../components/parsers/qs');var pdf=require(_0xbbec('0xa'));var logger=require(_0xbbec('0xb'))(_0xbbec('0xc'));var config=require(_0xbbec('0xd'));var db=require(_0xbbec('0xe'))['db'];config[_0xbbec('0xf')]=_[_0xbbec('0x10')](config[_0xbbec('0xf')],{'host':_0xbbec('0x11'),'port':0x18eb});var socket=require(_0xbbec('0x12'))(new Redis(config['redis']));require(_0xbbec('0x13'))['register'](socket);var jayson=require(_0xbbec('0x14'));var client=jayson[_0xbbec('0x15')][_0xbbec('0x16')]({'port':0x232b});var client9004=jayson[_0xbbec('0x15')][_0xbbec('0x16')]({'port':0x232c});function respondWithRpcPromise(_0x1e3a65,_0x58aa08,_0x14805c,_0x23c5c8){return new BPromise(function(_0x1d7192,_0x3408f3){var _0x4e2a00=_0x23c5c8||client;return _0x4e2a00['request'](_0x1e3a65,_0x14805c)[_0xbbec('0x17')](function(_0x3d4701){logger['info'](_0xbbec('0x18'),_0x58aa08,'request\x20sent');logger[_0xbbec('0x19')]('ChatInteraction,\x20%s,\x20%s,\x20%s',_0x58aa08,_0xbbec('0x1a'),JSON[_0xbbec('0x1b')](_0x3d4701));if(_0x3d4701[_0xbbec('0x1c')]){if(_0x3d4701[_0xbbec('0x1c')][_0xbbec('0x1d')]===0x1f4){logger[_0xbbec('0x1c')](_0xbbec('0x18'),_0x58aa08,_0x3d4701[_0xbbec('0x1c')][_0xbbec('0x1e')]);return _0x3408f3(_0x3d4701[_0xbbec('0x1c')]['message']);}logger['error'](_0xbbec('0x18'),_0x58aa08,_0x3d4701[_0xbbec('0x1c')]['message']);return _0x1d7192(_0x3d4701['error'][_0xbbec('0x1e')]);}else{logger[_0xbbec('0x1f')](_0xbbec('0x18'),_0x58aa08,'request\x20sent');_0x1d7192(_0x3d4701[_0xbbec('0x20')]['message']);}})[_0xbbec('0x21')](function(_0x64df63){logger[_0xbbec('0x1c')](_0xbbec('0x18'),_0x58aa08,_0x64df63);_0x3408f3(_0x64df63);});});}function respondWithStatusCode(_0x2e9ac0,_0xd7ae7e){_0xd7ae7e=_0xd7ae7e||0xcc;return function(_0x8e6a50){if(_0x8e6a50){return _0x2e9ac0['sendStatus'](_0xd7ae7e);}return _0x2e9ac0[_0xbbec('0x22')](_0xd7ae7e)[_0xbbec('0x23')]();};}function respondWithResult(_0x3ff931,_0x31583c){_0x31583c=_0x31583c||0xc8;return function(_0x32789a){if(_0x32789a){return _0x3ff931['status'](_0x31583c)[_0xbbec('0x24')](_0x32789a);}};}function respondWithFilteredResult(_0x19983b,_0x54aec3){return function(_0x2a46b9){if(_0x2a46b9){var _0x55703a=typeof _0x54aec3[_0xbbec('0x25')]===_0xbbec('0x26')&&typeof _0x54aec3['limit']==='undefined';var _0x39f393=_0x2a46b9[_0xbbec('0x27')];var _0x21aeda=_0x55703a?0x0:_0x54aec3[_0xbbec('0x25')];var _0x4f1773=_0x55703a?_0x2a46b9['count']:_0x54aec3[_0xbbec('0x25')]+_0x54aec3['limit'];var _0xdcb6c7;if(_0x4f1773>=_0x39f393){_0x4f1773=_0x39f393;_0xdcb6c7=0xc8;}else{_0xdcb6c7=0xce;}_0x19983b[_0xbbec('0x22')](_0xdcb6c7);return _0x19983b[_0xbbec('0x28')]('Content-Range',_0x21aeda+'-'+_0x4f1773+'/'+_0x39f393)[_0xbbec('0x24')](_0x2a46b9);}return null;};}function saveUpdates(_0x4757c1){return function(_0x3c4c81){if(_0x3c4c81){return _0x3c4c81['update'](_0x4757c1)[_0xbbec('0x17')](function(_0x790264){return _0x790264;});}return null;};}function removeEntity(_0x5050f1){return function(_0x1ae7a8){if(_0x1ae7a8){return _0x1ae7a8[_0xbbec('0x29')]()['then'](function(){_0x5050f1[_0xbbec('0x22')](0xcc)['end']();});}};}function handleEntityNotFound(_0x561110){return function(_0x2e5319){if(!_0x2e5319){_0x561110['sendStatus'](0x194);}return _0x2e5319;};}function handleError(_0x2fe9a4,_0x48fe52){_0x48fe52=_0x48fe52||0x1f4;return function(_0x2a3f75){logger[_0xbbec('0x1c')](_0x2a3f75[_0xbbec('0x2a')]);if(_0x2a3f75[_0xbbec('0x2b')]){delete _0x2a3f75[_0xbbec('0x2b')];}_0x2fe9a4[_0xbbec('0x22')](_0x48fe52)[_0xbbec('0x2c')](_0x2a3f75);};}function getMustacheRender(_0x22c8bf,_0x3ea3ad){return Mustache[_0xbbec('0x2d')](_0x22c8bf,_[_0xbbec('0x2e')](_0x3ea3ad[_0xbbec('0x2f')],{'contact':_0x3ea3ad[_0xbbec('0x30')],'message':_0x3ea3ad[_0xbbec('0x1e')],'agent':_0x3ea3ad[_0xbbec('0x31')],'interaction':_0x3ea3ad[_0xbbec('0x32')],'account':_0x3ea3ad[_0xbbec('0x33')]}))||'';}exports[_0xbbec('0x34')]=function(_0x587ca9,_0x391d6){var _0x4ea069={};var _0x2b75fb=_[_0xbbec('0x35')](db[_0xbbec('0x36')][_0xbbec('0x37')],function(_0x235fb8){return{'name':_0x235fb8[_0xbbec('0x38')],'type':_0x235fb8['type'][_0xbbec('0x39')]};});_0x4ea069=qs['getOptions'](_0x2b75fb,_0x587ca9);return interaction['findAll'](_0xbbec('0x3a'),_0x587ca9[_0xbbec('0x3b')],_0x587ca9[_0xbbec('0x3c')],_0x4ea069,_0x2b75fb)[_0xbbec('0x17')](respondWithFilteredResult(_0x391d6,_0x4ea069))[_0xbbec('0x21')](handleError(_0x391d6,null));};exports[_0xbbec('0x3d')]=function(_0x359c1b,_0xdaf275){var _0x2b382d={'raw':![],'where':{'id':_0x359c1b['params']['id']}},_0x47a77e={};_0x47a77e[_0xbbec('0x3e')]=_[_0xbbec('0x3f')](db[_0xbbec('0x36')][_0xbbec('0x37')]);_0x47a77e[_0xbbec('0x3b')]=_[_0xbbec('0x3f')](_0x359c1b[_0xbbec('0x3b')]);_0x47a77e[_0xbbec('0x40')]=_[_0xbbec('0x41')](_0x47a77e[_0xbbec('0x3e')],_0x47a77e[_0xbbec('0x3b')]);_0x2b382d[_0xbbec('0x42')]=_[_0xbbec('0x41')](_0x47a77e[_0xbbec('0x3e')],qs['fields'](_0x359c1b[_0xbbec('0x3b')][_0xbbec('0x43')]));_0x2b382d[_0xbbec('0x42')]=_0x2b382d['attributes'][_0xbbec('0x44')]?_0x2b382d[_0xbbec('0x42')]:_0x47a77e[_0xbbec('0x3e')];if(_0x359c1b['query'][_0xbbec('0x45')]){_0x2b382d[_0xbbec('0x46')]=[{'all':!![]}];}_0x2b382d=_[_0xbbec('0x2e')]({},_0x2b382d,_0x359c1b['options']);return db[_0xbbec('0x36')][_0xbbec('0x47')](_0x2b382d)[_0xbbec('0x17')](handleEntityNotFound(_0xdaf275,null))[_0xbbec('0x17')](respondWithResult(_0xdaf275,null))['catch'](handleError(_0xdaf275,null));};exports[_0xbbec('0x48')]=function(_0xd0a4e2,_0x4e4553){return db[_0xbbec('0x36')]['create'](_0xd0a4e2[_0xbbec('0x2f')],{})[_0xbbec('0x17')](respondWithResult(_0x4e4553,0xc9))[_0xbbec('0x21')](handleError(_0x4e4553,null));};exports['update']=function(_0x331f4f,_0x84c525){if(_0x331f4f['body']['id']){delete _0x331f4f[_0xbbec('0x2f')]['id'];}return db[_0xbbec('0x36')][_0xbbec('0x47')]({'where':{'id':_0x331f4f[_0xbbec('0x49')]['id']}})[_0xbbec('0x17')](handleEntityNotFound(_0x84c525,null))[_0xbbec('0x17')](saveUpdates(_0x331f4f[_0xbbec('0x2f')],null))[_0xbbec('0x17')](respondWithResult(_0x84c525,null))[_0xbbec('0x21')](handleError(_0x84c525,null));};exports[_0xbbec('0x29')]=function(_0x375328,_0x4ef950){return db[_0xbbec('0x36')][_0xbbec('0x47')]({'where':{'id':_0x375328['params']['id']}})[_0xbbec('0x17')](handleEntityNotFound(_0x4ef950,null))[_0xbbec('0x17')](removeEntity(_0x4ef950,null))[_0xbbec('0x21')](handleError(_0x4ef950,null));};exports['describe']=function(_0x40b86b,_0x1c24fe){return db[_0xbbec('0x36')]['describe']()[_0xbbec('0x17')](respondWithResult(_0x1c24fe,null))[_0xbbec('0x21')](handleError(_0x1c24fe,null));};exports[_0xbbec('0x4a')]=function(_0x4832ef,_0xe75a67){var _0x343ed6=_0x4832ef[_0xbbec('0x49')]['id'];var _0x157ac4;var _0x4fb1cc;var _0x1e086b;return db[_0xbbec('0x36')][_0xbbec('0x4b')]({'where':{'id':_0x343ed6}})[_0xbbec('0x17')](function(_0x2c6ade){_0x157ac4=_0x2c6ade;return db['ChatWebsite']['findOne']({'where':{'id':_0x2c6ade[_0xbbec('0x4c')]},'attributes':['id','vidaooApiKey',_0xbbec('0x4d'),_0xbbec('0x4e'),_0xbbec('0x4f'),'vidaooMetadata'],'raw':!![]});})[_0xbbec('0x17')](function(_0x3b0d14){if(_0x3b0d14&&_0x3b0d14['vidaooApiKey']&&_0x3b0d14[_0xbbec('0x4d')]){_0x4fb1cc=_0x3b0d14;var _0x3c9d28={'interaction':{'id':_0x343ed6},'agent':{'id':_0x4832ef[_0xbbec('0x3c')]['id'],'name':_0x4832ef['user'][_0xbbec('0x2b')],'fullname':_0x4832ef[_0xbbec('0x3c')]['fullname'],'email':_0x4832ef['user'][_0xbbec('0x50')]},'contact':_0x4832ef[_0xbbec('0x2f')]['contact'],'account':_0x4832ef['body'][_0xbbec('0x33')]};var _0x5caffd={'rejectUnauthorized':![],'method':_0xbbec('0x51'),'url':_0xbbec('0x52'),'headers':{'X-APIKEY':_0x3b0d14[_0xbbec('0x53')]},'body':{'duration':null,'scheduledAt':null,'participants':[_0x4832ef[_0xbbec('0x3c')]['email']],'buttons':null,'topic':_0x4fb1cc[_0xbbec('0x4e')],'note':_[_0xbbec('0x54')](_0x4fb1cc[_0xbbec('0x4f')])?null:getMustacheRender(_0x4fb1cc['vidaooNote'],_0x3c9d28),'metadata':null},'redirect':_0xbbec('0x55'),'json':!![]};try{if(!_[_0xbbec('0x54')](_0x4fb1cc[_0xbbec('0x56')])){var _0x39101a=getMustacheRender(_0x4fb1cc[_0xbbec('0x56')],_0x3c9d28);var _0x501bfc=JSON[_0xbbec('0x57')](_0x39101a);_0x5caffd['body']['metadata']=_0x501bfc;}}catch(_0x2453bf){throw new db[(_0xbbec('0x58'))]['ValidationError']('Error\x20in\x20conversion\x20vidaooMetadata');}return rp(_0x5caffd);}else{throw new db[(_0xbbec('0x58'))][(_0xbbec('0x59'))](_0xbbec('0x5a'));}})[_0xbbec('0x17')](function(_0x185c8f){_0x1e086b=_0x185c8f;if(_0x1e086b['id']){var _0x1c8cee={'body':_0x1e086b[_0xbbec('0x5b')],'ChatWebsiteId':_0x4fb1cc['id'],'ChatInteractionId':_0x157ac4['id'],'direction':'out','UserId':_0x4832ef[_0xbbec('0x3c')]['id']};return db[_0xbbec('0x5c')][_0xbbec('0x48')](_0x1c8cee,{});}else{throw new db['Sequelize']['ValidationError'](_0xbbec('0x5d'));}})[_0xbbec('0x17')](function(){return _0x157ac4[_0xbbec('0x5e')]({'vidaooSessionId':_0x1e086b['id']});})[_0xbbec('0x17')](respondWithResult(_0xe75a67,null))[_0xbbec('0x21')](handleError(_0xe75a67,null));};exports['customUpdate']=function(_0xbdd718,_0x67e312){if(_0xbdd718['body']['id']){delete _0xbdd718['body']['id'];}return db[_0xbbec('0x36')][_0xbbec('0x47')]({'where':{'id':_0xbdd718[_0xbbec('0x49')]['id']},'include':[{'model':db['CmContact'],'as':_0xbbec('0x5f')}]})['then'](handleEntityNotFound(_0x67e312,null))['then'](saveUpdates(_0xbdd718[_0xbbec('0x2f')],null))[_0xbbec('0x17')](respondWithResult(_0x67e312,null))[_0xbbec('0x21')](handleError(_0x67e312,null));};exports[_0xbbec('0x60')]=function(_0x34d51f,_0xe65d0f){if(_0x34d51f[_0xbbec('0x2f')]['id']){delete _0x34d51f[_0xbbec('0x2f')]['id'];}return db[_0xbbec('0x36')][_0xbbec('0x47')]({'where':{'id':_0x34d51f[_0xbbec('0x49')]['id']}})[_0xbbec('0x17')](function(_0x2b73b4){if(!_0x2b73b4){logger[_0xbbec('0x1c')]('abandonInteraction,\x20%s,\x20%s,\x20%s',_0xbbec('0x60'),0x194,_0xbbec('0x61'));_0xe65d0f[_0xbbec('0x62')](0x194);}else{if(_0x2b73b4[_0xbbec('0x63')]){throw new db[(_0xbbec('0x58'))][(_0xbbec('0x59'))]('Interaction\x20already\x20assigned');}}return _0x2b73b4;})[_0xbbec('0x17')](function(_0x16b58d){if(_0x16b58d){return _0x16b58d[_0xbbec('0x64')]({'closed':_0x34d51f[_0xbbec('0x2f')][_0xbbec('0x65')],'disposition':_0x34d51f[_0xbbec('0x2f')][_0xbbec('0x66')]})['then'](function(_0x35e4ee){return _0x35e4ee;});}})['then'](function(){return respondWithRpcPromise('AbandonInteraction',_0xbbec('0x60'),_0x34d51f[_0xbbec('0x2f')],client9004);})['then'](respondWithResult(_0xe65d0f,null))[_0xbbec('0x21')](handleError(_0xe65d0f,null));};exports[_0xbbec('0x67')]=function(_0x4810d8,_0x2d6823){_0x4810d8[_0xbbec('0x2f')][_0xbbec('0x2b')]=_0x4810d8['file'][_0xbbec('0x68')];_0x4810d8[_0xbbec('0x2f')][_0xbbec('0x69')]=_0x4810d8[_0xbbec('0x6a')][_0xbbec('0x6b')];_0x4810d8['body'][_0xbbec('0x6c')]=_0x4810d8[_0xbbec('0x6a')][_0xbbec('0x6d')];return db[_0xbbec('0x6e')]['create'](_0x4810d8['body'])[_0xbbec('0x17')](respondWithResult(_0x2d6823,0xc9))[_0xbbec('0x21')](handleError(_0x2d6823,null));};exports['attachmentDownload']=function(_0x3f1d0c,_0x3d1469){return db[_0xbbec('0x36')][_0xbbec('0x4b')]({'where':{'id':_0x3f1d0c['params']['id']},'raw':!![]})[_0xbbec('0x17')](handleEntityNotFound(_0x3d1469,null))[_0xbbec('0x17')](function(_0x16fd28){if(_0x16fd28){if(_0x16fd28['closed']){return _0x3d1469[_0xbbec('0x22')](0x193)[_0xbbec('0x24')]({'status':0x193,'message':'Unauthorized'});}return db['Attachment'][_0xbbec('0x4b')]({'where':{'id':_0x3f1d0c['query'][_0xbbec('0x6f')]},'raw':!![]})[_0xbbec('0x17')](handleEntityNotFound(_0x3d1469,null));}})[_0xbbec('0x17')](function(_0x3c011a){if(_0x3c011a){var _0x4c5ff1=_0x3c011a[_0xbbec('0x70')]!==null;var _0x3fdfd8=path[_0xbbec('0x71')](config[_0xbbec('0x72')],_0xbbec('0x73'));if(_0x4c5ff1){_0x3fdfd8=path[_0xbbec('0x71')](_0x3fdfd8,_0xbbec('0x74'));}var _0x196d10=path[_0xbbec('0x71')](_0x3fdfd8,_0x3c011a[_0xbbec('0x69')]);return _0x3d1469[_0xbbec('0x75')](_0x196d10);}})[_0xbbec('0x21')](handleError(_0x3d1469,null));};exports[_0xbbec('0x76')]=function(_0x3838fc,_0x333376){var _0x5f2ef0=null;var _0x115023=null;var _0x4073d9=null;if(_0x3838fc['body']['id']){delete _0x3838fc[_0xbbec('0x2f')]['id'];}if(_0x3838fc[_0xbbec('0x2f')][_0xbbec('0x77')]){_0x4073d9=path[_0xbbec('0x71')](config[_0xbbec('0x72')],_0xbbec('0x78'),util[_0xbbec('0x79')](_0xbbec('0x7a'),Date[_0xbbec('0x7b')]()));_0x3838fc[_0xbbec('0x2f')][_0xbbec('0x7c')]=_0x4073d9;}return db[_0xbbec('0x36')][_0xbbec('0x47')]({'where':{'id':_0x3838fc[_0xbbec('0x49')]['id']},'include':[{'model':db[_0xbbec('0x5c')],'as':_0xbbec('0x7d'),'include':[{'model':db['User'],'as':_0xbbec('0x7e')}]}]})[_0xbbec('0x17')](handleEntityNotFound(_0x333376,null))[_0xbbec('0x17')](saveUpdates(_0x3838fc[_0xbbec('0x2f')],null))[_0xbbec('0x17')](function(_0x491bba){if(_0x491bba){_0x5f2ef0=_0x491bba;return db[_0xbbec('0x7f')][_0xbbec('0x47')]({'where':{'id':_0x5f2ef0[_0xbbec('0x4c')]}});}})[_0xbbec('0x17')](function(_0x2b9fca){if(_0x2b9fca){_0x115023=_0x2b9fca;return db[_0xbbec('0x80')]['find']({'where':{'id':_0x5f2ef0[_0xbbec('0x81')]}});}})[_0xbbec('0x17')](function(_0x10c992){if(_0x10c992){if(_0x4073d9){var _0x48e3dd=null;for(var _0x47d797=0x1;_0x47d797<_0x5f2ef0[_0xbbec('0x7d')][_0xbbec('0x44')];++_0x47d797){_0x48e3dd=_0x5f2ef0[_0xbbec('0x7d')][_0x47d797];var _0x296622=_0x48e3dd[_0xbbec('0x63')]?util[_0xbbec('0x79')](_0xbbec('0x82'),_0x115023[_0xbbec('0x83')],_0x48e3dd[_0xbbec('0x63')]):_0xbbec('0x84');var _0x57850e=_0x3838fc['body'][_0xbbec('0x85')]||util[_0xbbec('0x79')](_0xbbec('0x82'),_0xbbec('0x86'),_0x48e3dd['ContactId']);switch(_0x115023['agentIdentifier']){case'website_alias':_0x296622=_0x48e3dd['UserId']?util['format'](_0xbbec('0x82'),_0x115023[_0xbbec('0x83')],_0x48e3dd[_0xbbec('0x63')]):_0xbbec('0x84');break;case'agent_alias':_0x296622=_0x48e3dd[_0xbbec('0x63')]?_0x48e3dd[_0xbbec('0x7e')][_0xbbec('0x87')]||_0x48e3dd[_0xbbec('0x7e')][_0xbbec('0x88')]:_0xbbec('0x84');break;case _0xbbec('0x89'):_0x296622=_0x48e3dd['UserId']?_0x48e3dd[_0xbbec('0x7e')][_0xbbec('0x88')]:'System';break;default:_0x296622=_0x48e3dd[_0xbbec('0x63')]?util[_0xbbec('0x79')](_0xbbec('0x82'),_0x115023['agentAlias'],_0x48e3dd[_0xbbec('0x63')]):_0xbbec('0x84');}var _0x129cad=util[_0xbbec('0x79')](_0xbbec('0x8a'),moment(_0x48e3dd[_0xbbec('0x8b')])[_0xbbec('0x79')](_0xbbec('0x8c')),_0x48e3dd[_0xbbec('0x8d')]==='in'?_0x57850e:_0x296622,_0x48e3dd[_0xbbec('0x2f')]);if(!_0x48e3dd[_0xbbec('0x8e')]){fs[_0xbbec('0x8f')](_0x4073d9,_0x129cad);}}return db[_0xbbec('0x90')][_0xbbec('0x4b')]({'where':{'service':!![]},'include':[{'model':db['MailServerOut'],'as':_0xbbec('0x91'),'raw':!![],'include':[{'model':db[_0xbbec('0x92')],'as':_0xbbec('0x92'),'raw':!![]}]}]});}}})[_0xbbec('0x17')](function(_0x4f49ab){if(!_0x4f49ab||!_0x4f49ab[_0xbbec('0x91')]||!_0x3838fc[_0xbbec('0x2f')])return _0x5f2ef0;var _0x51e0c9=_0x4f49ab[_0xbbec('0x93')]();return respondWithRpcPromise(_0xbbec('0x94'),'sendMail',{'account':_0x51e0c9,'message':{'from':util[_0xbbec('0x79')](_0xbbec('0x95'),_0x4f49ab['name'],_0x4f49ab[_0xbbec('0x50')]||_0x4f49ab[_0xbbec('0x91')][_0xbbec('0x3c')]),'to':_0x3838fc[_0xbbec('0x2f')][_0xbbec('0x77')],'subject':_0xbbec('0x96'),'text':util['format'](_0xbbec('0x97'),_0x3838fc['body'][_0xbbec('0x77')]),'attachments':[{'path':_0x4073d9}]}})[_0xbbec('0x17')](function(){return _0x5f2ef0;})[_0xbbec('0x21')](function(_0x51a6e2){logger['error'](_0x51a6e2);});})[_0xbbec('0x17')](respondWithStatusCode(_0x333376,0xc8))[_0xbbec('0x21')](handleError(_0x333376,null));};exports[_0xbbec('0x98')]=function(_0x3106f4,_0x4f24d2){return db[_0xbbec('0x5c')]['find']({'where':{'id':_0x3106f4[_0xbbec('0x49')]['id']}})[_0xbbec('0x17')](handleEntityNotFound(_0x4f24d2,null))[_0xbbec('0x17')](function(_0x493e2b){if(_0x493e2b){return _0x493e2b[_0xbbec('0x98')](_0x3106f4['body'][_0xbbec('0x99')],_[_0xbbec('0x9a')](_0x3106f4[_0xbbec('0x2f')],['ids','id'])||{});}})[_0xbbec('0x17')](respondWithResult(_0x4f24d2,null))[_0xbbec('0x21')](handleError(_0x4f24d2,null));};exports[_0xbbec('0x9b')]=function(_0x550a4d,_0x40982c){var _0x1c0c00={'raw':![],'where':{}};var _0x4ca62a={};var _0x3227a1={'count':0x0,'rows':[]};return db[_0xbbec('0x36')]['findOne']({'where':{'id':_0x550a4d[_0xbbec('0x49')]['id']}})['then'](handleEntityNotFound(_0x40982c,null))[_0xbbec('0x17')](function(_0x590902){if(_0x590902){_0x4ca62a[_0xbbec('0x3e')]=_['keys'](db[_0xbbec('0x5c')][_0xbbec('0x37')]);_0x4ca62a[_0xbbec('0x3b')]=_[_0xbbec('0x3f')](_0x550a4d[_0xbbec('0x3b')]);_0x4ca62a[_0xbbec('0x40')]=_['intersection'](_0x4ca62a[_0xbbec('0x3e')],_0x4ca62a[_0xbbec('0x3b')]);_0x1c0c00[_0xbbec('0x42')]=_[_0xbbec('0x41')](_0x4ca62a[_0xbbec('0x3e')],qs[_0xbbec('0x43')](_0x550a4d[_0xbbec('0x3b')][_0xbbec('0x43')]));_0x1c0c00['attributes']=_0x1c0c00['attributes']['length']?_0x1c0c00[_0xbbec('0x42')]:_0x4ca62a[_0xbbec('0x3e')];if(!_0x550a4d[_0xbbec('0x3b')][_0xbbec('0x9c')](_0xbbec('0x9d'))){_0x1c0c00['limit']=qs[_0xbbec('0x9e')](_0x550a4d[_0xbbec('0x3b')][_0xbbec('0x9e')]);_0x1c0c00[_0xbbec('0x25')]=qs[_0xbbec('0x25')](_0x550a4d[_0xbbec('0x3b')]['offset']);}_0x1c0c00['order']=qs[_0xbbec('0x9f')](_0x550a4d[_0xbbec('0x3b')][_0xbbec('0x9f')]);_0x1c0c00[_0xbbec('0xa0')]=qs['filters'](_['pick'](_0x550a4d[_0xbbec('0x3b')],_0x4ca62a[_0xbbec('0x40')]));_0x1c0c00[_0xbbec('0xa0')][_0xbbec('0xa1')]=_0x590902['id'];if(_0x550a4d[_0xbbec('0x3b')][_0xbbec('0xa2')]){_0x1c0c00[_0xbbec('0xa0')]=_[_0xbbec('0x2e')](_0x1c0c00[_0xbbec('0xa0')],{'$or':_[_0xbbec('0x35')](_0x1c0c00[_0xbbec('0x42')],function(_0x1b89e0){var _0x24514e={};_0x24514e[_0x1b89e0]={'$like':'%'+_0x550a4d[_0xbbec('0x3b')][_0xbbec('0xa2')]+'%'};return _0x24514e;})});}if(_0x550a4d[_0xbbec('0x3b')][_0xbbec('0xa3')]){var _0x3ad17f=_0x550a4d[_0xbbec('0x3b')][_0xbbec('0xa3')][_0xbbec('0xa4')](',');var _0x48c864={};_0x48c864[_0x3ad17f[0x0]]={'$gte':moment(_0x3ad17f[0x1])[_0xbbec('0x79')](_0xbbec('0xa5'))};_0x1c0c00[_0xbbec('0xa0')]=_[_0xbbec('0x2e')](_0x1c0c00[_0xbbec('0xa0')],_0x48c864);}_0x1c0c00=_[_0xbbec('0x2e')]({},_0x1c0c00,_0x550a4d['options']);return db[_0xbbec('0x5c')][_0xbbec('0x27')]({'where':_0x1c0c00[_0xbbec('0xa0')]})['then'](function(_0x5a28bc){_0x3227a1[_0xbbec('0x27')]=_0x5a28bc;if(_0x550a4d['query'][_0xbbec('0x45')]){_0x1c0c00['include']=[{'all':!![]}];}return db[_0xbbec('0x5c')][_0xbbec('0xa6')](_0x1c0c00);})['then'](function(_0x5798fb){_0x3227a1[_0xbbec('0xa7')]=_0x5798fb;return _0x3227a1;});}})['then'](respondWithFilteredResult(_0x40982c,_0x1c0c00))['catch'](handleError(_0x40982c,null));};exports[_0xbbec('0xa8')]=function(_0x26c33e,_0x3a5607){var _0x42f6c3={'where':{}},_0x432e45={},_0x29a63e={'count':0x0,'rows':[]};return db['ChatInteraction'][_0xbbec('0x4b')]({'where':{'id':_0x26c33e[_0xbbec('0x49')]['id']}})['then'](handleEntityNotFound(_0x3a5607,null))[_0xbbec('0x17')](function(_0x54f723){if(_0x54f723){_0x432e45['model']=_[_0xbbec('0x3f')](db[_0xbbec('0x5c')][_0xbbec('0x37')]);_0x432e45['query']=_[_0xbbec('0x3f')](_0x26c33e[_0xbbec('0x3b')]);_0x432e45['filters']=_[_0xbbec('0x41')](_0x432e45[_0xbbec('0x3e')],_0x432e45[_0xbbec('0x3b')]);_0x42f6c3[_0xbbec('0x42')]=_[_0xbbec('0x41')](_0x432e45[_0xbbec('0x3e')],qs[_0xbbec('0x43')](_0x26c33e[_0xbbec('0x3b')]['fields']));_0x42f6c3[_0xbbec('0x42')]=_0x42f6c3['attributes'][_0xbbec('0x44')]?_0x42f6c3[_0xbbec('0x42')]:_0x432e45[_0xbbec('0x3e')];if(!_0x26c33e[_0xbbec('0x3b')][_0xbbec('0x9c')]('nolimit')){_0x42f6c3[_0xbbec('0x9e')]=qs['limit'](_0x26c33e[_0xbbec('0x3b')][_0xbbec('0x9e')]);_0x42f6c3[_0xbbec('0x25')]=qs[_0xbbec('0x25')](_0x26c33e[_0xbbec('0x3b')][_0xbbec('0x25')]);}_0x42f6c3['order']=qs['sort'](_0x26c33e[_0xbbec('0x3b')]['sort']);_0x42f6c3[_0xbbec('0xa0')]=qs[_0xbbec('0x40')](_[_0xbbec('0xa9')](_0x26c33e['query'],_0x432e45[_0xbbec('0x40')]));_0x42f6c3[_0xbbec('0xa0')][_0xbbec('0xa1')]=_0x54f723['id'];if(_0x26c33e[_0xbbec('0x3b')][_0xbbec('0xa2')]){_0x42f6c3[_0xbbec('0xa0')]=_['merge'](_0x42f6c3[_0xbbec('0xa0')],{'$or':_['map'](_0x42f6c3[_0xbbec('0x42')],function(_0x677bc8){var _0x15dd21={};_0x15dd21[_0x677bc8]={'$like':'%'+_0x26c33e[_0xbbec('0x3b')][_0xbbec('0xa2')]+'%'};return _0x15dd21;})});}_0x42f6c3[_0xbbec('0xa0')][_0xbbec('0x8e')]=![];if(_0x26c33e[_0xbbec('0x3b')]['id']){_0x42f6c3[_0xbbec('0xa0')]['id']={'$gt':_0x26c33e[_0xbbec('0x3b')]['id']};}_0x42f6c3=_[_0xbbec('0x2e')]({},_0x42f6c3,_0x26c33e[_0xbbec('0xaa')]);return db[_0xbbec('0x5c')][_0xbbec('0x27')]({'where':_0x42f6c3[_0xbbec('0xa0')]})['then'](function(_0x5b310d){_0x29a63e[_0xbbec('0x27')]=_0x5b310d;_0x42f6c3[_0xbbec('0x46')]=[];if(_0x26c33e[_0xbbec('0x3b')][_0xbbec('0xab')]){_0x42f6c3[_0xbbec('0x46')][_0xbbec('0xac')]({'model':db[_0xbbec('0x7e')],'as':_0xbbec('0x7e'),'attributes':['id','fullname',_0xbbec('0x87')]});}if(_0x26c33e[_0xbbec('0x3b')]['includeAll']){_0x42f6c3['include']=[{'all':!![]}];}return db[_0xbbec('0x5c')][_0xbbec('0xa6')](_0x42f6c3);})[_0xbbec('0x17')](function(_0x42b3cd){_0x29a63e[_0xbbec('0xa7')]=_0x42b3cd;return _0x29a63e;});}})[_0xbbec('0x17')](respondWithFilteredResult(_0x3a5607,_0x42f6c3))[_0xbbec('0x21')](handleError(_0x3a5607,null));};exports[_0xbbec('0xad')]=function(_0x3046b1,_0x103d0e){return db['ChatInteraction'][_0xbbec('0x47')]({'where':{'id':_0x3046b1[_0xbbec('0x49')]['id']}})['then'](handleEntityNotFound(_0x103d0e,null))[_0xbbec('0x17')](function(_0x406f6a){if(_0x406f6a){return _0x406f6a[_0xbbec('0xae')](_0x3046b1[_0xbbec('0x2f')]['ids'],_[_0xbbec('0x9a')](_0x3046b1[_0xbbec('0x2f')],[_0xbbec('0x99'),'id'])||{})[_0xbbec('0xaf')](function(){return db['Tag'][_0xbbec('0xa6')]({'attributes':['id',_0xbbec('0x2b'),_0xbbec('0xb0')],'where':{'id':_0x3046b1[_0xbbec('0x2f')][_0xbbec('0x99')]}});})['then'](function(_0x2c384f){socket['emit']('chatInteractionTags:save',{'id':Number(_0x3046b1['params']['id']),'tags':_0x2c384f||[]});return{'id':Number(_0x3046b1[_0xbbec('0x49')]['id']),'tags':_0x2c384f||[]};});}})[_0xbbec('0x17')](respondWithResult(_0x103d0e,null))[_0xbbec('0x21')](handleError(_0x103d0e,null));};exports[_0xbbec('0xb1')]=function(_0x950df8,_0x233f43){return db['ChatInteraction'][_0xbbec('0x47')]({'where':{'id':_0x950df8[_0xbbec('0x49')]['id']}})[_0xbbec('0x17')](handleEntityNotFound(_0x233f43,null))[_0xbbec('0x17')](function(_0x476a0b){if(_0x476a0b){return _0x476a0b[_0xbbec('0xb1')](_0x950df8[_0xbbec('0x3b')][_0xbbec('0x99')]);}})[_0xbbec('0x17')](respondWithStatusCode(_0x233f43,null))[_0xbbec('0x21')](handleError(_0x233f43,null));};exports[_0xbbec('0x75')]=function(_0x4e4219,_0x3ee3b9){var _0x4d94d4=moment()[_0xbbec('0xb2')]()[_0xbbec('0xb3')]();var _0xa683dc=path[_0xbbec('0x71')](config[_0xbbec('0x72')],_0xbbec('0xb4'),_0xbbec('0xb5'),_0xbbec('0xb6'));var _0x30dbb3=path['join'](config[_0xbbec('0x72')],_0xbbec('0xb4'),_0xbbec('0xb5'),'attachments');var _0x2479bd=path[_0xbbec('0x71')](_0xa683dc,_0x4d94d4);var _0x34d09c=util[_0xbbec('0x79')](_0xbbec('0xb7'),_0x4e4219['params']['id'],_0x4d94d4);var _0xd2a4e0=path[_0xbbec('0x71')](_0xa683dc,_0x34d09c);var _0x2d2e2c=[];_0x2d2e2c[_0xbbec('0xac')]({'model':db[_0xbbec('0x7e')],'as':'User','attributes':['id',_0xbbec('0x88')],'raw':!![]});_0x2d2e2c['push']({'model':db[_0xbbec('0x80')],'as':_0xbbec('0x5f'),'attributes':['id','firstName',_0xbbec('0xb8')],'raw':!![]});if(_0x4e4219[_0xbbec('0x3b')][_0xbbec('0xb9')]){_0x2d2e2c[_0xbbec('0xac')]({'model':db[_0xbbec('0x6e')],'as':_0xbbec('0x6e'),'raw':!![]});}var _0x44c156=[{'model':db[_0xbbec('0x5c')],'as':'Messages','attributes':['id',_0xbbec('0x2f'),'createdAt','direction',_0xbbec('0x8e'),_0xbbec('0xba')],'include':_0x2d2e2c}];_0x44c156['push']({'model':db[_0xbbec('0x7f')],'as':_0xbbec('0xbb'),'attributes':['id',_0xbbec('0x2b')]});_0x44c156[_0xbbec('0xac')]({'model':db[_0xbbec('0x7e')],'as':_0xbbec('0xbc'),'attributes':['id',_0xbbec('0x88')]});return db[_0xbbec('0x36')][_0xbbec('0x47')]({'where':{'id':_0x4e4219[_0xbbec('0x49')]['id']},'include':_0x44c156})[_0xbbec('0x17')](handleEntityNotFound(_0x3ee3b9,null))[_0xbbec('0x17')](function(_0x2adf99){if(_0x2adf99){var _0x4a3dd1=_0x2adf99[_0xbbec('0xbd')]({'plain':!![]});fs[_0xbbec('0xbe')](_0x2479bd);var _0x598aad={'channel':_0xbbec('0xbf'),'account':_0x4a3dd1[_0xbbec('0xbb')][_0xbbec('0x2b')],'agent':_0x4a3dd1[_0xbbec('0xbc')]?_0x4a3dd1[_0xbbec('0xbc')][_0xbbec('0x88')]:_0xbbec('0xc0'),'createdAt':moment(_0x4a3dd1['createdAt'])[_0xbbec('0x79')](_0xbbec('0xa5'))['toString'](),'closedAt':_0x4a3dd1[_0xbbec('0x65')]?moment(_0x4a3dd1['closedAt'])[_0xbbec('0x79')]('YYYY-MM-DD\x20HH:mm:ss')[_0xbbec('0xb3')]():'','disposition':_0x4a3dd1[_0xbbec('0x66')],'chatInfo':{'browser':_0x4a3dd1[_0xbbec('0xc1')],'os':_0x4a3dd1[_0xbbec('0xc2')],'referer':_0x4a3dd1[_0xbbec('0xc3')],'customerIp':_0x4a3dd1[_0xbbec('0xc4')],'customerPort':_0x4a3dd1[_0xbbec('0xc5')]?_0x4a3dd1[_0xbbec('0xc5')]:_0xbbec('0xc0')},'messages':_(_0x4a3dd1[_0xbbec('0x7d')])[_0xbbec('0xc6')]()[_0xbbec('0xa2')]({'secret':![]})[_0xbbec('0x35')](function(_0x248b48){if(_0x248b48[_0xbbec('0x6e')]){var _0x4212b7=path['join'](_0x30dbb3,_0x248b48['Attachment']['basename']);if(fs[_0xbbec('0xc7')](_0x4212b7)){fs[_0xbbec('0xc8')](_0x4212b7)[_0xbbec('0xc9')](fs['createWriteStream'](path['join'](_0x2479bd,_0x248b48[_0xbbec('0x6e')]['basename'])));}}return{'date':moment(_0x248b48[_0xbbec('0x8b')])[_0xbbec('0x79')]('YYYY-MM-DD\x20HH:mm:ss')[_0xbbec('0xb3')](),'sender':_0x248b48['direction']===_0xbbec('0xca')?_0x248b48[_0xbbec('0x7e')]?_0x248b48['User'][_0xbbec('0x88')]:_0xbbec('0x84'):_0x248b48[_0xbbec('0x5f')]['firstName']+(_0x248b48[_0xbbec('0x5f')][_0xbbec('0xb8')]?'\x20'+_0x248b48['Contact'][_0xbbec('0xb8')]:''),'body':_0x248b48['Attachment']?_0x248b48[_0xbbec('0x6e')][_0xbbec('0x69')]:_0x248b48['body'],'direction':_0x248b48[_0xbbec('0x8d')]===_0xbbec('0xca')?'A':'C','secret':_0x248b48[_0xbbec('0x8e')],'read':_0x248b48['read'],'attachment':_0x248b48[_0xbbec('0x6e')]};})[_0xbbec('0xcb')]()};return ejs[_0xbbec('0xcc')](path['join'](config[_0xbbec('0x72')],_0xbbec('0xb4'),_0xbbec('0xcd'),_0xbbec('0xce')),{'interaction':_0x598aad})[_0xbbec('0x17')](function(_0x160619){var _0x41b01c=path[_0xbbec('0x71')](_0x2479bd,'transcript-'+_0x4a3dd1['id']+'-'+_0x4d94d4+'.pdf');var _0x1ecf0f={'path':_0x41b01c,'channel':_0xbbec('0xbf'),'interactionId':_0x4a3dd1['id']};return pdf[_0xbbec('0xcf')](_0x160619,_0x1ecf0f);})[_0xbbec('0x17')](function(){return new Promise(function(_0x44f768,_0x355195){zipdir(_0x2479bd,{'saveTo':_0xd2a4e0},function(_0x4d502f,_0x43e65c){if(_0x4d502f)return _0x355195(_0x4d502f);return _0x44f768(_0x43e65c);});})[_0xbbec('0x17')](function(){return new BPromise(function(_0x5fe8f,_0x3a21b8){rimraf(_0x2479bd,function(_0x43886d){if(_0x43886d)_0x3a21b8(_0x43886d);return _0x5fe8f();});});})[_0xbbec('0x17')](function(){return _0x3ee3b9[_0xbbec('0x75')](_0xd2a4e0,_0x34d09c,function(_0xc7fbf5){if(_0xc7fbf5){logger[_0xbbec('0x1c')]('err',_0xc7fbf5);}else{fs['unlinkSync'](_0xd2a4e0);}});});});}else{return _0x3ee3b9[_0xbbec('0x62')](0xc8);}})[_0xbbec('0x21')](handleError(_0x3ee3b9,null));};
\ No newline at end of file
index 781e65a..5c518c8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb47a=['map','setDataValue','unreadMessages','length','catch','events','../../mysqldb','ChatInteraction','update','remove','getUsers','then','Users'];(function(_0x45d879,_0x4e1f98){var _0x4241b9=function(_0x4e823d){while(--_0x4e823d){_0x45d879['push'](_0x45d879['shift']());}};_0x4241b9(++_0x4e1f98);}(_0xb47a,0x87));var _0xab47=function(_0x15c421,_0x6366f7){_0x15c421=_0x15c421-0x0;var _0x5e5ed5=_0xb47a[_0x15c421];return _0x5e5ed5;};'use strict';var EventEmitter=require(_0xab47('0x0'));var ChatInteraction=require(_0xab47('0x1'))['db'][_0xab47('0x2')];var ChatMessage=require(_0xab47('0x1'))['db']['ChatMessage'];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xab47('0x3'),'afterDestroy':_0xab47('0x4')};function emitEvent(_0x56b568){return function(_0x43c313,_0x3a85ed,_0x17d981){_0x43c313[_0xab47('0x5')]({'attributes':['id'],'raw':!![]})[_0xab47('0x6')](function(_0x55a1a0){_0x43c313['setDataValue'](_0xab47('0x7'),_0x55a1a0[_0xab47('0x8')](function(_0x1338ab){return{'id':_0x1338ab['id']};}));return ChatMessage['findAll']({'where':{'ChatInteractionId':_0x43c313['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0x1dad72){_0x43c313[_0xab47('0x9')](_0xab47('0xa'),_0x1dad72[_0xab47('0xb')]);ChatInteractionEvents['emit'](_0x56b568+':'+_0x43c313['id'],_0x43c313);ChatInteractionEvents['emit'](_0x56b568,_0x43c313);_0x17d981(null);})[_0xab47('0xc')](_0x17d981(null));};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatInteraction['hook'](e,emitEvent(event));}}module['exports']=ChatInteractionEvents;
\ No newline at end of file
+var _0x0427=['getUsers','then','setDataValue','Users','map','emit','catch','hasOwnProperty','hook','events','../../mysqldb','ChatInteraction','ChatMessage','setMaxListeners','remove'];(function(_0x2dec86,_0x16cc68){var _0x496a2c=function(_0x16415c){while(--_0x16415c){_0x2dec86['push'](_0x2dec86['shift']());}};_0x496a2c(++_0x16cc68);}(_0x0427,0x162));var _0x7042=function(_0x240eaf,_0x52caf9){_0x240eaf=_0x240eaf-0x0;var _0x31415e=_0x0427[_0x240eaf];return _0x31415e;};'use strict';var EventEmitter=require(_0x7042('0x0'));var ChatInteraction=require(_0x7042('0x1'))['db'][_0x7042('0x2')];var ChatMessage=require('../../mysqldb')['db'][_0x7042('0x3')];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents[_0x7042('0x4')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x7042('0x5')};function emitEvent(_0x3f026e){return function(_0x34214e,_0x54bc67,_0x56179b){_0x34214e[_0x7042('0x6')]({'attributes':['id'],'raw':!![]})[_0x7042('0x7')](function(_0x2a0dd3){_0x34214e[_0x7042('0x8')](_0x7042('0x9'),_0x2a0dd3[_0x7042('0xa')](function(_0x34be9c){return{'id':_0x34be9c['id']};}));return ChatMessage['findAll']({'where':{'ChatInteractionId':_0x34214e['id'],'direction':'in','read':![]},'raw':!![]});})[_0x7042('0x7')](function(_0xe3ebae){_0x34214e[_0x7042('0x8')]('unreadMessages',_0xe3ebae['length']);ChatInteractionEvents[_0x7042('0xb')](_0x3f026e+':'+_0x34214e['id'],_0x34214e);ChatInteractionEvents['emit'](_0x3f026e,_0x34214e);_0x56179b(null);})[_0x7042('0xc')](_0x56179b(null));};}for(var e in events){if(events[_0x7042('0xd')](e)){var event=events[e];ChatInteraction[_0x7042('0xe')](e,emitEvent(event));}}module['exports']=ChatInteractionEvents;
\ No newline at end of file
index 1b53e60..e0f422a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2cea=['define','ChatInteraction','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','path','rimraf','../../config/environment','./chatInteraction.attributes','exports'];(function(_0xc38896,_0x25bd37){var _0x17a257=function(_0x50f38e){while(--_0x50f38e){_0xc38896['push'](_0xc38896['shift']());}};_0x17a257(++_0x25bd37);}(_0x2cea,0x1b9));var _0xa2ce=function(_0x1081a3,_0x2ac784){_0x1081a3=_0x1081a3-0x0;var _0x5696a2=_0x2cea[_0x1081a3];return _0x5696a2;};'use strict';var _=require(_0xa2ce('0x0'));var util=require(_0xa2ce('0x1'));var logger=require(_0xa2ce('0x2'))(_0xa2ce('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xa2ce('0x4'));var rimraf=require(_0xa2ce('0x5'));var config=require(_0xa2ce('0x6'));var attributes=require(_0xa2ce('0x7'));module[_0xa2ce('0x8')]=function(_0x36e982,_0x427ee6){return _0x36e982[_0xa2ce('0x9')](_0xa2ce('0xa'),attributes,{'tableName':'chat_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x33eb70,_0x480ffb,_0x479b82){if(_0x33eb70[_0xa2ce('0xb')](_0xa2ce('0xc'))){_0x33eb70[_0xa2ce('0xd')]=moment()[_0xa2ce('0xe')](_0xa2ce('0xf'));}_0x479b82(null,_0x33eb70);}},'charset':_0xa2ce('0x10'),'collate':_0xa2ce('0x11')});};
\ No newline at end of file
+var _0x983e=['closedAt','YYYY-MM-DD\x20HH:mm:ss','utf8mb4','utf8mb4_unicode_ci','lodash','util','api','moment','bluebird','rimraf','../../config/environment','./chatInteraction.attributes','changed','closed'];(function(_0x1a0f96,_0x53d358){var _0x39a842=function(_0x35926b){while(--_0x35926b){_0x1a0f96['push'](_0x1a0f96['shift']());}};_0x39a842(++_0x53d358);}(_0x983e,0x1a8));var _0xe983=function(_0x2ef032,_0x11d73f){_0x2ef032=_0x2ef032-0x0;var _0x151588=_0x983e[_0x2ef032];return _0x151588;};'use strict';var _=require(_0xe983('0x0'));var util=require(_0xe983('0x1'));var logger=require('../../config/logger')(_0xe983('0x2'));var moment=require(_0xe983('0x3'));var BPromise=require(_0xe983('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xe983('0x5'));var config=require(_0xe983('0x6'));var attributes=require(_0xe983('0x7'));module['exports']=function(_0x274de9,_0x23d732){return _0x274de9['define']('ChatInteraction',attributes,{'tableName':'chat_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x473b3b,_0x5668e4,_0x4725dd){if(_0x473b3b[_0xe983('0x8')](_0xe983('0x9'))){_0x473b3b[_0xe983('0xa')]=moment()['format'](_0xe983('0xb'));}_0x4725dd(null,_0x473b3b);}},'charset':_0xe983('0xc'),'collate':_0xe983('0xd')});};
\ No newline at end of file
index ff1aa22..333f42d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb765=['raw','where','then','stringify','addTags','omit','ids','spread','AddTags','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','http','redis','localhost','socket.io-emitter','./chatInteraction.socket','request','info','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','ChatInteraction,\x20%s,\x20%s','result','catch','UpdateChatInteraction','ChatInteraction','update','body','options'];(function(_0x4e04a8,_0x2f2d6a){var _0x6c3e6f=function(_0x806cf7){while(--_0x806cf7){_0x4e04a8['push'](_0x4e04a8['shift']());}};_0x6c3e6f(++_0x2f2d6a);}(_0xb765,0x1c1));var _0x5b76=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0xb765[_0x57b54c];return _0x59cc19;};'use strict';var _=require(_0x5b76('0x0'));var util=require(_0x5b76('0x1'));var moment=require(_0x5b76('0x2'));var BPromise=require(_0x5b76('0x3'));var rs=require(_0x5b76('0x4'));var fs=require('fs');var Redis=require(_0x5b76('0x5'));var db=require(_0x5b76('0x6'))['db'];var utils=require(_0x5b76('0x7'));var logger=require('../../config/logger')(_0x5b76('0x8'));var config=require('../../config/environment');var jayson=require(_0x5b76('0x9'));var client=jayson['client'][_0x5b76('0xa')]({'port':0x232a});config['redis']=_['defaults'](config[_0x5b76('0xb')],{'host':_0x5b76('0xc'),'port':0x18eb});var socket=require(_0x5b76('0xd'))(new Redis(config['redis']));require(_0x5b76('0xe'))['register'](socket);function respondWithRpcPromise(_0x284e7e,_0x26ab1b,_0xfc0fb9){return new BPromise(function(_0x1a2567,_0x3e1c09){return client[_0x5b76('0xf')](_0x284e7e,_0xfc0fb9)['then'](function(_0x470452){logger[_0x5b76('0x10')]('ChatInteraction,\x20%s,\x20%s',_0x26ab1b,'request\x20sent');logger[_0x5b76('0x11')](_0x5b76('0x12'),_0x26ab1b,_0x5b76('0x13'),JSON['stringify'](_0x470452));if(_0x470452['error']){if(_0x470452[_0x5b76('0x14')][_0x5b76('0x15')]===0x1f4){logger[_0x5b76('0x14')]('ChatInteraction,\x20%s,\x20%s',_0x26ab1b,_0x470452[_0x5b76('0x14')][_0x5b76('0x16')]);return _0x3e1c09(_0x470452[_0x5b76('0x14')]['message']);}logger['error']('ChatInteraction,\x20%s,\x20%s',_0x26ab1b,_0x470452[_0x5b76('0x14')][_0x5b76('0x16')]);return _0x1a2567(_0x470452[_0x5b76('0x14')]['message']);}else{logger['info'](_0x5b76('0x17'),_0x26ab1b,_0x5b76('0x13'));_0x1a2567(_0x470452[_0x5b76('0x18')][_0x5b76('0x16')]);}})[_0x5b76('0x19')](function(_0x4b0e76){logger['error'](_0x5b76('0x17'),_0x26ab1b,_0x4b0e76);_0x3e1c09(_0x4b0e76);});});}exports[_0x5b76('0x1a')]=function(_0x43ed88){var _0x1bc0a1=this;return new Promise(function(_0x16bb4d,_0x579883){return db[_0x5b76('0x1b')][_0x5b76('0x1c')](_0x43ed88[_0x5b76('0x1d')],{'raw':_0x43ed88[_0x5b76('0x1e')]?_0x43ed88[_0x5b76('0x1e')][_0x5b76('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x43ed88[_0x5b76('0x1e')]?_0x43ed88['options'][_0x5b76('0x20')]||null:null,'attributes':_0x43ed88[_0x5b76('0x1e')]?_0x43ed88[_0x5b76('0x1e')]['attributes']||null:null,'limit':_0x43ed88[_0x5b76('0x1e')]?_0x43ed88[_0x5b76('0x1e')]['limit']||null:null})[_0x5b76('0x21')](function(_0xab747c){logger[_0x5b76('0x10')](_0x5b76('0x1a'),_0x43ed88);logger[_0x5b76('0x11')](_0x5b76('0x1a'),_0x43ed88,JSON[_0x5b76('0x22')](_0xab747c));_0x16bb4d(_0xab747c);})[_0x5b76('0x19')](function(_0x48ed3c){logger[_0x5b76('0x14')](_0x5b76('0x1a'),_0x48ed3c[_0x5b76('0x16')],_0x43ed88);_0x579883(_0x1bc0a1[_0x5b76('0x14')](0x1f4,_0x48ed3c['message']));});});};exports['AddTagsToChatInteraction']=function(_0x43ea44){return new Promise(function(_0x508eaa,_0x54f536){return db[_0x5b76('0x1b')]['find']({'where':_0x43ea44[_0x5b76('0x1e')]?_0x43ea44[_0x5b76('0x1e')][_0x5b76('0x20')]||null:null})[_0x5b76('0x21')](function(_0x3014c8){if(_0x3014c8){return _0x3014c8[_0x5b76('0x23')](_0x43ea44[_0x5b76('0x1d')]['ids'],_[_0x5b76('0x24')](_0x43ea44[_0x5b76('0x1d')],[_0x5b76('0x25'),'id'])||{});}})[_0x5b76('0x26')](function(_0x17084a){logger['info']('AddTags',_0x43ea44);logger[_0x5b76('0x11')](_0x5b76('0x27'),_0x43ea44,JSON[_0x5b76('0x22')](_0x17084a));_0x508eaa(_0x17084a);})['catch'](function(_0x1e3777){logger[_0x5b76('0x14')](_0x5b76('0x27'),_0x1e3777['message'],_0x43ea44);_0x54f536(_this['error'](0x1f4,_0x1e3777[_0x5b76('0x16')]));});});};
\ No newline at end of file
+var _0x28df=['../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','./chatInteraction.socket','then','info','ChatInteraction,\x20%s,\x20%s','request\x20sent','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','ChatInteraction','body','options','raw','where','attributes','UpdateChatInteraction','AddTagsToChatInteraction','find','ids','omit','spread','AddTags','lodash','util','moment','bluebird','randomstring','../../config/utils'];(function(_0x1fc1f9,_0x454fb2){var _0x4987ca=function(_0x5e90dd){while(--_0x5e90dd){_0x1fc1f9['push'](_0x1fc1f9['shift']());}};_0x4987ca(++_0x454fb2);}(_0x28df,0x1e6));var _0xf28d=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x28df[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0xf28d('0x0'));var util=require(_0xf28d('0x1'));var moment=require(_0xf28d('0x2'));var BPromise=require(_0xf28d('0x3'));var rs=require(_0xf28d('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xf28d('0x5'));var logger=require(_0xf28d('0x6'))(_0xf28d('0x7'));var config=require(_0xf28d('0x8'));var jayson=require(_0xf28d('0x9'));var client=jayson[_0xf28d('0xa')][_0xf28d('0xb')]({'port':0x232a});config[_0xf28d('0xc')]=_[_0xf28d('0xd')](config[_0xf28d('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0xf28d('0xe'))(new Redis(config[_0xf28d('0xc')]));require(_0xf28d('0xf'))['register'](socket);function respondWithRpcPromise(_0x56f63a,_0x568d81,_0x3fc874){return new BPromise(function(_0x2e3fc9,_0x3a0bf4){return client['request'](_0x56f63a,_0x3fc874)[_0xf28d('0x10')](function(_0x4e83f6){logger[_0xf28d('0x11')](_0xf28d('0x12'),_0x568d81,_0xf28d('0x13'));logger[_0xf28d('0x14')](_0xf28d('0x15'),_0x568d81,_0xf28d('0x13'),JSON[_0xf28d('0x16')](_0x4e83f6));if(_0x4e83f6[_0xf28d('0x17')]){if(_0x4e83f6[_0xf28d('0x17')][_0xf28d('0x18')]===0x1f4){logger[_0xf28d('0x17')](_0xf28d('0x12'),_0x568d81,_0x4e83f6['error'][_0xf28d('0x19')]);return _0x3a0bf4(_0x4e83f6['error'][_0xf28d('0x19')]);}logger[_0xf28d('0x17')](_0xf28d('0x12'),_0x568d81,_0x4e83f6[_0xf28d('0x17')][_0xf28d('0x19')]);return _0x2e3fc9(_0x4e83f6[_0xf28d('0x17')][_0xf28d('0x19')]);}else{logger[_0xf28d('0x11')](_0xf28d('0x12'),_0x568d81,'request\x20sent');_0x2e3fc9(_0x4e83f6[_0xf28d('0x1a')][_0xf28d('0x19')]);}})[_0xf28d('0x1b')](function(_0x4ce1af){logger[_0xf28d('0x17')](_0xf28d('0x12'),_0x568d81,_0x4ce1af);_0x3a0bf4(_0x4ce1af);});});}exports['UpdateChatInteraction']=function(_0x59c552){var _0x5e3279=this;return new Promise(function(_0x290c04,_0x124c2b){return db[_0xf28d('0x1c')]['update'](_0x59c552[_0xf28d('0x1d')],{'raw':_0x59c552['options']?_0x59c552[_0xf28d('0x1e')][_0xf28d('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x59c552[_0xf28d('0x1e')]?_0x59c552[_0xf28d('0x1e')][_0xf28d('0x20')]||null:null,'attributes':_0x59c552[_0xf28d('0x1e')]?_0x59c552[_0xf28d('0x1e')][_0xf28d('0x21')]||null:null,'limit':_0x59c552[_0xf28d('0x1e')]?_0x59c552[_0xf28d('0x1e')]['limit']||null:null})['then'](function(_0xd21ff3){logger['info']('UpdateChatInteraction',_0x59c552);logger[_0xf28d('0x14')](_0xf28d('0x22'),_0x59c552,JSON[_0xf28d('0x16')](_0xd21ff3));_0x290c04(_0xd21ff3);})['catch'](function(_0xb65cea){logger['error']('UpdateChatInteraction',_0xb65cea[_0xf28d('0x19')],_0x59c552);_0x124c2b(_0x5e3279['error'](0x1f4,_0xb65cea[_0xf28d('0x19')]));});});};exports[_0xf28d('0x23')]=function(_0xa7e155){return new Promise(function(_0xeeea7d,_0x188f79){return db['ChatInteraction'][_0xf28d('0x24')]({'where':_0xa7e155[_0xf28d('0x1e')]?_0xa7e155[_0xf28d('0x1e')]['where']||null:null})[_0xf28d('0x10')](function(_0x24dea5){if(_0x24dea5){return _0x24dea5['addTags'](_0xa7e155[_0xf28d('0x1d')][_0xf28d('0x25')],_[_0xf28d('0x26')](_0xa7e155[_0xf28d('0x1d')],[_0xf28d('0x25'),'id'])||{});}})[_0xf28d('0x27')](function(_0x464fa4){logger[_0xf28d('0x11')]('AddTags',_0xa7e155);logger['debug'](_0xf28d('0x28'),_0xa7e155,JSON[_0xf28d('0x16')](_0x464fa4));_0xeeea7d(_0x464fa4);})[_0xf28d('0x1b')](function(_0x1aeab4){logger[_0xf28d('0x17')]('AddTags',_0x1aeab4[_0xf28d('0x19')],_0xa7e155);_0x188f79(_this[_0xf28d('0x17')](0x1f4,_0x1aeab4['message']));});});};
\ No newline at end of file
index 7c3c2cc..ca22c89 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x91e3=['remove','update','removeListener','length','chatInteraction:','./chatInteraction.events','save'];(function(_0x1d0aee,_0x2c4454){var _0x34ee2c=function(_0x6e3b9d){while(--_0x6e3b9d){_0x1d0aee['push'](_0x1d0aee['shift']());}};_0x34ee2c(++_0x2c4454);}(_0x91e3,0x132));var _0x391e=function(_0x370852,_0x2c7e62){_0x370852=_0x370852-0x0;var _0x40cc7e=_0x91e3[_0x370852];return _0x40cc7e;};'use strict';var ChatInteractionEvents=require(_0x391e('0x0'));var events=[_0x391e('0x1'),_0x391e('0x2'),_0x391e('0x3')];function createListener(_0x16ed7d,_0x2290c6){return function(_0xef8e46){_0x2290c6['emit'](_0x16ed7d,_0xef8e46);};}function removeListener(_0x44d65b,_0x2977d3){return function(){ChatInteractionEvents[_0x391e('0x4')](_0x44d65b,_0x2977d3);};}exports['register']=function(_0x3b7eb0){for(var _0x26a494=0x0,_0x3691a0=events[_0x391e('0x5')];_0x26a494<_0x3691a0;_0x26a494++){var _0x1bd4fa=events[_0x26a494];var _0x471559=createListener(_0x391e('0x6')+_0x1bd4fa,_0x3b7eb0);ChatInteractionEvents['on'](_0x1bd4fa,_0x471559);}};
\ No newline at end of file
+var _0xe096=['remove','update','emit','removeListener','./chatInteraction.events','save'];(function(_0x586ac4,_0x390b1b){var _0x2d7364=function(_0x5651d7){while(--_0x5651d7){_0x586ac4['push'](_0x586ac4['shift']());}};_0x2d7364(++_0x390b1b);}(_0xe096,0x13c));var _0x6e09=function(_0x15a634,_0x4feb86){_0x15a634=_0x15a634-0x0;var _0xf4f7a0=_0xe096[_0x15a634];return _0xf4f7a0;};'use strict';var ChatInteractionEvents=require(_0x6e09('0x0'));var events=[_0x6e09('0x1'),_0x6e09('0x2'),_0x6e09('0x3')];function createListener(_0x194614,_0x1379c5){return function(_0x498677){_0x1379c5[_0x6e09('0x4')](_0x194614,_0x498677);};}function removeListener(_0xc5fff6,_0x16feae){return function(){ChatInteractionEvents[_0x6e09('0x5')](_0xc5fff6,_0x16feae);};}exports['register']=function(_0x560b7c){for(var _0x5442ec=0x0,_0x19b334=events['length'];_0x5442ec<_0x19b334;_0x5442ec++){var _0x1aadcb=events[_0x5442ec];var _0x3f558e=createListener('chatInteraction:'+_0x1aadcb,_0x560b7c);ChatInteractionEvents['on'](_0x1aadcb,_0x3f558e);}};
\ No newline at end of file
index c4b38ce..9aa6dbc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb0a6=['Router','fs-extra','../../config/environment','/describe','isAuthenticated','get','/:id','isChatInteractionAuthorized','show','/:id/attachment_download','attachmentDownload','/:id/messages','getMessages','getMyMessages','download','post','create','createVidaooSession','join','root','format','now','replace','/:id/attachment_upload','single','file','attachmentUpload','addMessage','/:id/tags','tracked','addTags','put','chat','chatinteraction:update','update','/:id/custom_update','customUpdate','abandon','/:id/close','close','delete','chatinteraction:destroy','destroy','exports','multer','util','path','connect-timeout','express'];(function(_0x50b750,_0xe5817b){var _0x1b60a8=function(_0x23a6e8){while(--_0x23a6e8){_0x50b750['push'](_0x50b750['shift']());}};_0x1b60a8(++_0xe5817b);}(_0xb0a6,0x183));var _0x6b0a=function(_0x5a24ce,_0x1786f4){_0x5a24ce=_0x5a24ce-0x0;var _0x37b269=_0xb0a6[_0x5a24ce];return _0x37b269;};'use strict';var multer=require(_0x6b0a('0x0'));var util=require(_0x6b0a('0x1'));var path=require(_0x6b0a('0x2'));var timeout=require(_0x6b0a('0x3'));var express=require(_0x6b0a('0x4'));var router=express[_0x6b0a('0x5')]();var fs_extra=require(_0x6b0a('0x6'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x6b0a('0x7'));var controller=require('./chatInteraction.controller');router['get']('/',auth['isAuthenticated'](),controller['index']);router['get'](_0x6b0a('0x8'),auth[_0x6b0a('0x9')](),controller['describe']);router[_0x6b0a('0xa')](_0x6b0a('0xb'),auth[_0x6b0a('0xc')](),controller[_0x6b0a('0xd')]);router[_0x6b0a('0xa')](_0x6b0a('0xe'),auth['isChatInteractionAuthorized'](),controller[_0x6b0a('0xf')]);router[_0x6b0a('0xa')](_0x6b0a('0x10'),auth[_0x6b0a('0x9')](),controller[_0x6b0a('0x11')]);router['get']('/:id/my_messages',auth[_0x6b0a('0xc')](),controller[_0x6b0a('0x12')]);router[_0x6b0a('0xa')]('/:id/download',auth['isAuthenticated'](),controller[_0x6b0a('0x13')]);router[_0x6b0a('0x14')]('/',auth[_0x6b0a('0x9')](),controller[_0x6b0a('0x15')]);router['post']('/:id/vidaoo',auth[_0x6b0a('0x9')](),controller[_0x6b0a('0x16')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x1df2d6,_0x4be030,_0x3faa5e){_0x3faa5e(null,path[_0x6b0a('0x17')](config[_0x6b0a('0x18')],'server/files/attachments/'));},'filename':function(_0x28ab58,_0x2cfcca,_0x18f526){_0x18f526(null,util[_0x6b0a('0x19')]('%s-%s',Date[_0x6b0a('0x1a')](),_0x2cfcca['originalname'][_0x6b0a('0x1b')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x6b0a('0x14')](_0x6b0a('0x1c'),upload[_0x6b0a('0x1d')](_0x6b0a('0x1e')),controller[_0x6b0a('0x1f')]);router[_0x6b0a('0x14')](_0x6b0a('0x10'),auth[_0x6b0a('0xc')](),controller[_0x6b0a('0x20')]);router[_0x6b0a('0x14')](_0x6b0a('0x21'),auth['isAuthenticated'](),interaction[_0x6b0a('0x22')]('chat','chatinteraction:addtags'),controller[_0x6b0a('0x23')]);router[_0x6b0a('0x24')](_0x6b0a('0xb'),auth['isAuthenticated'](),interaction['tracked'](_0x6b0a('0x25'),_0x6b0a('0x26')),controller[_0x6b0a('0x27')]);router[_0x6b0a('0x24')](_0x6b0a('0x28'),controller[_0x6b0a('0x29')]);router[_0x6b0a('0x24')]('/:id/abandon',auth[_0x6b0a('0xc')](),controller[_0x6b0a('0x2a')]);router[_0x6b0a('0x24')](_0x6b0a('0x2b'),controller[_0x6b0a('0x2c')]);router[_0x6b0a('0x2d')](_0x6b0a('0xb'),auth[_0x6b0a('0x9')](),interaction['tracked'](_0x6b0a('0x25'),_0x6b0a('0x2e')),controller[_0x6b0a('0x2f')]);router['delete']('/:id/tags',auth[_0x6b0a('0x9')](),controller['removeTags']);module[_0x6b0a('0x30')]=router;
\ No newline at end of file
+var _0x88e8=['getMyMessages','/:id/download','post','create','/:id/vidaoo','createVidaooSession','diskStorage','join','server/files/attachments/','format','now','/:id/attachment_upload','single','file','attachmentUpload','/:id/tags','chatinteraction:addtags','addTags','put','tracked','chat','chatinteraction:update','/:id/custom_update','/:id/abandon','abandon','/:id/close','close','destroy','delete','removeTags','exports','multer','util','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatInteraction.controller','isAuthenticated','get','describe','/:id','show','isChatInteractionAuthorized','attachmentDownload','/:id/messages','getMessages','/:id/my_messages'];(function(_0x4c78e0,_0x389694){var _0x33ca4f=function(_0x16bfd2){while(--_0x16bfd2){_0x4c78e0['push'](_0x4c78e0['shift']());}};_0x33ca4f(++_0x389694);}(_0x88e8,0xe7));var _0x888e=function(_0x420fdd,_0x127224){_0x420fdd=_0x420fdd-0x0;var _0x116df3=_0x88e8[_0x420fdd];return _0x116df3;};'use strict';var multer=require(_0x888e('0x0'));var util=require(_0x888e('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x888e('0x2'));var router=express[_0x888e('0x3')]();var fs_extra=require(_0x888e('0x4'));var auth=require(_0x888e('0x5'));var interaction=require(_0x888e('0x6'));var config=require(_0x888e('0x7'));var controller=require(_0x888e('0x8'));router['get']('/',auth[_0x888e('0x9')](),controller['index']);router[_0x888e('0xa')]('/describe',auth['isAuthenticated'](),controller[_0x888e('0xb')]);router[_0x888e('0xa')](_0x888e('0xc'),auth['isChatInteractionAuthorized'](),controller[_0x888e('0xd')]);router['get']('/:id/attachment_download',auth[_0x888e('0xe')](),controller[_0x888e('0xf')]);router[_0x888e('0xa')](_0x888e('0x10'),auth[_0x888e('0x9')](),controller[_0x888e('0x11')]);router[_0x888e('0xa')](_0x888e('0x12'),auth[_0x888e('0xe')](),controller[_0x888e('0x13')]);router[_0x888e('0xa')](_0x888e('0x14'),auth[_0x888e('0x9')](),controller['download']);router[_0x888e('0x15')]('/',auth[_0x888e('0x9')](),controller[_0x888e('0x16')]);router[_0x888e('0x15')](_0x888e('0x17'),auth[_0x888e('0x9')](),controller[_0x888e('0x18')]);var upload=multer({'storage':multer[_0x888e('0x19')]({'destination':function(_0x590b40,_0x299a39,_0x3427bc){_0x3427bc(null,path[_0x888e('0x1a')](config['root'],_0x888e('0x1b')));},'filename':function(_0x144cf7,_0x307400,_0x466169){_0x466169(null,util[_0x888e('0x1c')]('%s-%s',Date[_0x888e('0x1d')](),_0x307400['originalname']['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x888e('0x15')](_0x888e('0x1e'),upload[_0x888e('0x1f')](_0x888e('0x20')),controller[_0x888e('0x21')]);router['post'](_0x888e('0x10'),auth[_0x888e('0xe')](),controller['addMessage']);router[_0x888e('0x15')](_0x888e('0x22'),auth[_0x888e('0x9')](),interaction['tracked']('chat',_0x888e('0x23')),controller[_0x888e('0x24')]);router[_0x888e('0x25')](_0x888e('0xc'),auth[_0x888e('0x9')](),interaction[_0x888e('0x26')](_0x888e('0x27'),_0x888e('0x28')),controller['update']);router[_0x888e('0x25')](_0x888e('0x29'),controller['customUpdate']);router['put'](_0x888e('0x2a'),auth[_0x888e('0xe')](),controller[_0x888e('0x2b')]);router[_0x888e('0x25')](_0x888e('0x2c'),controller[_0x888e('0x2d')]);router['delete'](_0x888e('0xc'),auth[_0x888e('0x9')](),interaction['tracked'](_0x888e('0x27'),'chatinteraction:destroy'),controller[_0x888e('0x2e')]);router[_0x888e('0x2f')](_0x888e('0x22'),auth['isAuthenticated'](),controller[_0x888e('0x30')]);module[_0x888e('0x31')]=router;
\ No newline at end of file
index bdd4716..6a24f99 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbc15=['TEXT','medium','BOOLEAN','INTEGER','sequelize'];(function(_0x51a3f4,_0x4c977a){var _0x4b4228=function(_0x123fa2){while(--_0x123fa2){_0x51a3f4['push'](_0x51a3f4['shift']());}};_0x4b4228(++_0x4c977a);}(_0xbc15,0x72));var _0x5bc1=function(_0x2c6335,_0x14d1b5){_0x2c6335=_0x2c6335-0x0;var _0x5a05cd=_0xbc15[_0x2c6335];return _0x5a05cd;};'use strict';var Sequelize=require(_0x5bc1('0x0'));module['exports']={'body':{'type':Sequelize[_0x5bc1('0x1')](_0x5bc1('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0x5bc1('0x3')],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize[_0x5bc1('0x4')]}};
\ No newline at end of file
+var _0x5b37=['BOOLEAN','INTEGER','sequelize','exports','medium'];(function(_0x45671c,_0x2d5a15){var _0x8690ab=function(_0x44598f){while(--_0x44598f){_0x45671c['push'](_0x45671c['shift']());}};_0x8690ab(++_0x2d5a15);}(_0x5b37,0x106));var _0x75b3=function(_0x5db569,_0x25707b){_0x5db569=_0x5db569-0x0;var _0x247b44=_0x5b37[_0x5db569];return _0x247b44;};'use strict';var Sequelize=require(_0x75b3('0x0'));module[_0x75b3('0x1')]={'body':{'type':Sequelize['TEXT'](_0x75b3('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0x75b3('0x3')],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize[_0x75b3('0x4')]}};
\ No newline at end of file
index 858d2dd..570c36f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x59b8=['lastMessageAt','format','lastMessage','getUsers','admin','user','fullname','role','userpic','online','lastLoginAt','allowmessenger','-online','VoiceQueue','VoiceQueues','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','isEmpty','agent','resourceId','push','createdAt','FromId','read','-createdAt','all','eml-format','zip-dir','fast-json-patch','moment','mustache','util','path','sox','ejs','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','end','undefined','count','offset','limit','set','Content-Range','json','reject','save','update','then','destroy','error','name','index','map','ChatInternalMessage','rawAttributes','type','key','model','keys','query','attributes','intersection','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','includeAll','include','findAll','catch','show','params','length','options','find','create','body','describe','get','messages'];(function(_0x55a511,_0x2ec93d){var _0x52dc79=function(_0x1425bb){while(--_0x1425bb){_0x55a511['push'](_0x55a511['shift']());}};_0x52dc79(++_0x2ec93d);}(_0x59b8,0x89));var _0x859b=function(_0x37d4c7,_0x1059bb){_0x37d4c7=_0x37d4c7-0x0;var _0x1720ae=_0x59b8[_0x37d4c7];return _0x1720ae;};'use strict';var emlformat=require(_0x859b('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x859b('0x1'));var jsonpatch=require(_0x859b('0x2'));var rp=require('request-promise');var moment=require(_0x859b('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x859b('0x4'));var util=require(_0x859b('0x5'));var path=require(_0x859b('0x6'));var sox=require(_0x859b('0x7'));var csv=require('to-csv');var ejs=require(_0x859b('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x859b('0x9'));var crypto=require(_0x859b('0xa'));var jsforce=require(_0x859b('0xb'));var deskjs=require(_0x859b('0xc'));var toCsv=require(_0x859b('0xd'));var querystring=require(_0x859b('0xe'));var Papa=require(_0x859b('0xf'));var Redis=require(_0x859b('0x10'));var authService=require(_0x859b('0x11'));var qs=require(_0x859b('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x859b('0x13'))(_0x859b('0x14'));var utils=require('../../config/utils');var config=require(_0x859b('0x15'));var licenseUtil=require(_0x859b('0x16'));var db=require(_0x859b('0x17'))['db'];config[_0x859b('0x18')]=_[_0x859b('0x19')](config[_0x859b('0x18')],{'host':_0x859b('0x1a'),'port':0x18eb});var socket=require(_0x859b('0x1b'))(new Redis(config['redis']));require('./chatInternalMessage.socket')[_0x859b('0x1c')](socket);function respondWithStatusCode(_0x4135d0,_0x2672da){_0x2672da=_0x2672da||0xcc;return function(_0x55e879){if(_0x55e879){return _0x4135d0[_0x859b('0x1d')](_0x2672da);}return _0x4135d0[_0x859b('0x1e')](_0x2672da)[_0x859b('0x1f')]();};}function respondWithResult(_0x292d0d,_0x3c5e27){_0x3c5e27=_0x3c5e27||0xc8;return function(_0x36f86b){if(_0x36f86b){return _0x292d0d['status'](_0x3c5e27)['json'](_0x36f86b);}};}function respondWithFilteredResult(_0x2df6f2,_0x29319d){return function(_0x4e746c){if(_0x4e746c){var _0x22da7f=typeof _0x29319d['offset']===_0x859b('0x20')&&typeof _0x29319d['limit']===_0x859b('0x20');var _0xe54386=_0x4e746c[_0x859b('0x21')];var _0x58e1ef=_0x22da7f?0x0:_0x29319d[_0x859b('0x22')];var _0x142837=_0x22da7f?_0x4e746c[_0x859b('0x21')]:_0x29319d['offset']+_0x29319d[_0x859b('0x23')];var _0x1af036;if(_0x142837>=_0xe54386){_0x142837=_0xe54386;_0x1af036=0xc8;}else{_0x1af036=0xce;}_0x2df6f2[_0x859b('0x1e')](_0x1af036);return _0x2df6f2[_0x859b('0x24')](_0x859b('0x25'),_0x58e1ef+'-'+_0x142837+'/'+_0xe54386)[_0x859b('0x26')](_0x4e746c);}return null;};}function patchUpdates(_0x254357){return function(_0x3fcfcd){try{jsonpatch['apply'](_0x3fcfcd,_0x254357,!![]);}catch(_0x30ff9d){return BPromise[_0x859b('0x27')](_0x30ff9d);}return _0x3fcfcd[_0x859b('0x28')]();};}function saveUpdates(_0x290f65,_0x518366){return function(_0x399ab0){if(_0x399ab0){return _0x399ab0[_0x859b('0x29')](_0x290f65)[_0x859b('0x2a')](function(_0x59ffe6){return _0x59ffe6;});}return null;};}function removeEntity(_0x490ca4,_0x4cd3b1){return function(_0x4800a9){if(_0x4800a9){return _0x4800a9[_0x859b('0x2b')]()[_0x859b('0x2a')](function(){_0x490ca4[_0x859b('0x1e')](0xcc)[_0x859b('0x1f')]();});}};}function handleEntityNotFound(_0xfdb781,_0x14ec58){return function(_0x3b67a4){if(!_0x3b67a4){_0xfdb781[_0x859b('0x1d')](0x194);}return _0x3b67a4;};}function handleError(_0x44370e,_0x51c9b4){_0x51c9b4=_0x51c9b4||0x1f4;return function(_0x341779){logger[_0x859b('0x2c')](_0x341779['stack']);if(_0x341779[_0x859b('0x2d')]){delete _0x341779[_0x859b('0x2d')];}_0x44370e[_0x859b('0x1e')](_0x51c9b4)['send'](_0x341779);};}exports[_0x859b('0x2e')]=function(_0x58c685,_0x264cfe){var _0x4ac956={},_0x4e512c={},_0x267505={'count':0x0,'rows':[]};var _0x5b45f1=_[_0x859b('0x2f')](db[_0x859b('0x30')][_0x859b('0x31')],function(_0x331ae0){return{'name':_0x331ae0['fieldName'],'type':_0x331ae0[_0x859b('0x32')][_0x859b('0x33')]};});_0x4e512c[_0x859b('0x34')]=_[_0x859b('0x2f')](_0x5b45f1,_0x859b('0x2d'));_0x4e512c['query']=_[_0x859b('0x35')](_0x58c685[_0x859b('0x36')]);_0x4e512c['filters']=_['intersection'](_0x4e512c['model'],_0x4e512c[_0x859b('0x36')]);_0x4ac956[_0x859b('0x37')]=_[_0x859b('0x38')](_0x4e512c['model'],qs[_0x859b('0x39')](_0x58c685[_0x859b('0x36')][_0x859b('0x39')]));_0x4ac956[_0x859b('0x37')]=_0x4ac956[_0x859b('0x37')]['length']?_0x4ac956['attributes']:_0x4e512c[_0x859b('0x34')];if(!_0x58c685[_0x859b('0x36')][_0x859b('0x3a')](_0x859b('0x3b'))){_0x4ac956[_0x859b('0x23')]=qs['limit'](_0x58c685[_0x859b('0x36')]['limit']);_0x4ac956[_0x859b('0x22')]=qs[_0x859b('0x22')](_0x58c685[_0x859b('0x36')][_0x859b('0x22')]);}_0x4ac956[_0x859b('0x3c')]=qs[_0x859b('0x3d')](_0x58c685['query'][_0x859b('0x3d')]);_0x4ac956[_0x859b('0x3e')]=qs['filters'](_[_0x859b('0x3f')](_0x58c685[_0x859b('0x36')],_0x4e512c['filters']),_0x5b45f1);if(_0x58c685[_0x859b('0x36')][_0x859b('0x40')]){_0x4ac956[_0x859b('0x3e')]=_['merge'](_0x4ac956[_0x859b('0x3e')],{'$or':_[_0x859b('0x2f')](_0x5b45f1,function(_0x124513){if(_0x124513[_0x859b('0x32')]!==_0x859b('0x41')){var _0x2b0a83={};_0x2b0a83[_0x124513[_0x859b('0x2d')]]={'$like':'%'+_0x58c685[_0x859b('0x36')][_0x859b('0x40')]+'%'};return _0x2b0a83;}})});}_0x4ac956=_[_0x859b('0x42')]({},_0x4ac956,_0x58c685['options']);var _0x1d2e89={'where':_0x4ac956['where']};return db[_0x859b('0x30')][_0x859b('0x21')](_0x1d2e89)[_0x859b('0x2a')](function(_0x1f91ca){_0x267505[_0x859b('0x21')]=_0x1f91ca;if(_0x58c685['query'][_0x859b('0x43')]){_0x4ac956[_0x859b('0x44')]=[{'all':!![]}];}return db['ChatInternalMessage'][_0x859b('0x45')](_0x4ac956);})[_0x859b('0x2a')](function(_0x5eecaf){_0x267505['rows']=_0x5eecaf;return _0x267505;})['then'](respondWithFilteredResult(_0x264cfe,_0x4ac956))[_0x859b('0x46')](handleError(_0x264cfe,null));};exports[_0x859b('0x47')]=function(_0x1724e2,_0xf1f64a){var _0x3c6bc4={'raw':!![],'where':{'id':_0x1724e2[_0x859b('0x48')]['id']}},_0x38c752={};_0x38c752[_0x859b('0x34')]=_[_0x859b('0x35')](db[_0x859b('0x30')][_0x859b('0x31')]);_0x38c752[_0x859b('0x36')]=_[_0x859b('0x35')](_0x1724e2[_0x859b('0x36')]);_0x38c752['filters']=_['intersection'](_0x38c752[_0x859b('0x34')],_0x38c752[_0x859b('0x36')]);_0x3c6bc4[_0x859b('0x37')]=_[_0x859b('0x38')](_0x38c752['model'],qs['fields'](_0x1724e2[_0x859b('0x36')][_0x859b('0x39')]));_0x3c6bc4[_0x859b('0x37')]=_0x3c6bc4[_0x859b('0x37')][_0x859b('0x49')]?_0x3c6bc4['attributes']:_0x38c752['model'];if(_0x1724e2[_0x859b('0x36')][_0x859b('0x43')]){_0x3c6bc4[_0x859b('0x44')]=[{'all':!![]}];}_0x3c6bc4=_[_0x859b('0x42')]({},_0x3c6bc4,_0x1724e2[_0x859b('0x4a')]);return db['ChatInternalMessage'][_0x859b('0x4b')](_0x3c6bc4)[_0x859b('0x2a')](handleEntityNotFound(_0xf1f64a,null))['then'](respondWithResult(_0xf1f64a,null))[_0x859b('0x46')](handleError(_0xf1f64a,null));};exports['create']=function(_0x4bf841,_0x6d7e09){return db[_0x859b('0x30')][_0x859b('0x4c')](_0x4bf841[_0x859b('0x4d')],{})['then'](respondWithResult(_0x6d7e09,0xc9))['catch'](handleError(_0x6d7e09,null));};exports[_0x859b('0x29')]=function(_0x1f73d8,_0x122e38){if(_0x1f73d8[_0x859b('0x4d')]['id']){delete _0x1f73d8[_0x859b('0x4d')]['id'];}return db[_0x859b('0x30')][_0x859b('0x4b')]({'where':{'id':_0x1f73d8[_0x859b('0x48')]['id']}})['then'](handleEntityNotFound(_0x122e38,null))[_0x859b('0x2a')](saveUpdates(_0x1f73d8[_0x859b('0x4d')],null))[_0x859b('0x2a')](respondWithResult(_0x122e38,null))[_0x859b('0x46')](handleError(_0x122e38,null));};exports[_0x859b('0x2b')]=function(_0x30d653,_0x3f6f96){return db['ChatInternalMessage'][_0x859b('0x4b')]({'where':{'id':_0x30d653['params']['id']}})[_0x859b('0x2a')](handleEntityNotFound(_0x3f6f96,null))['then'](removeEntity(_0x3f6f96,null))[_0x859b('0x46')](handleError(_0x3f6f96,null));};exports[_0x859b('0x4e')]=function(_0x49a1d4,_0x47bc68){return db[_0x859b('0x30')][_0x859b('0x4e')]()[_0x859b('0x2a')](respondWithResult(_0x47bc68,null))[_0x859b('0x46')](handleError(_0x47bc68,null));};function wrapUser(_0x5ac7c9){return function(_0x5d603c){var _0x288d80=_0x5ac7c9[_0x859b('0x4f')]({'plain':!![]});_0x288d80[_0x859b('0x50')]=[];if(_0x5d603c){_0x288d80[_0x859b('0x51')]=_0x5d603c['createdAt'];_0x288d80['lastMessage']=_0x5d603c;}else{_0x288d80['lastMessageAt']=moment(0x0)[_0x859b('0x52')]('YYYY-MM-DD\x20HH:mm:ss');_0x288d80[_0x859b('0x53')]={};}return _0x288d80;};}exports[_0x859b('0x54')]=function(_0x3b1830,_0x1461b5,_0x2d20fc){var _0x1692ac=[];return db['User']['findAll']({'where':{'role':['agent',_0x859b('0x55'),_0x859b('0x56')]},'attributes':['id',_0x859b('0x57'),_0x859b('0x2d'),_0x859b('0x58'),_0x859b('0x59'),'internal',_0x859b('0x5a'),_0x859b('0x5b'),_0x859b('0x5c'),'showWebBar'],'order':qs[_0x859b('0x3d')](_0x859b('0x5d')),'include':[{'model':db[_0x859b('0x5e')],'as':_0x859b('0x5f'),'attributes':['id',_0x859b('0x2d'),_0x859b('0x32')],'through':{'attributes':[]}}]})[_0x859b('0x2a')](function(_0x5c6e43){if(_0x5c6e43){var _0x5f2522=_0x3b1830[_0x859b('0x56')][_0x859b('0x4f')]({'plain':!![]});if(!_0x5f2522)throw new Error(_0x859b('0x60'));if(_0x5f2522[_0x859b('0x58')]===_0x859b('0x56')){return db[_0x859b('0x61')][_0x859b('0x4b')]({'where':{'name':'Agents','userProfileId':_0x5f2522[_0x859b('0x62')]},'raw':!![]})['then'](function(_0x5a2b09){if(_0x5a2b09){if(_0x5a2b09[_0x859b('0x63')]===0x0){return db['UserProfileResource'][_0x859b('0x45')]({'where':{'sectionId':_0x5a2b09['id']},'raw':!![]})[_0x859b('0x2a')](function(_0x321fca){var _0x36fe57=[];if(_[_0x859b('0x64')](_0x321fca)){_0x36fe57=_[_0x859b('0x40')](_0x5c6e43,function(_0x2c9d62){if(_0x2c9d62[_0x859b('0x58')]!==_0x859b('0x65')){return _0x2c9d62;}});return _0x36fe57;}else{for(var _0x381b74=0x0;_0x381b74<_0x5c6e43[_0x859b('0x49')];_0x381b74++){var _0x2d3c86=_0x5c6e43[_0x381b74];if(_0x2d3c86[_0x859b('0x58')]==='agent'){var _0x3ddafa=_[_0x859b('0x4b')](_0x321fca,function(_0x49b9ac){return _0x49b9ac[_0x859b('0x66')]===_0x2d3c86['id'];});if(_0x3ddafa)_0x36fe57[_0x859b('0x67')](_0x2d3c86);}else{_0x36fe57['push'](_0x2d3c86);}}return _0x36fe57;}});}else{return _0x5c6e43;}}else{var _0x46a022=_['filter'](_0x5c6e43,function(_0x5b875b){if(_0x5b875b['role']!==_0x859b('0x65')){return _0x5b875b;}});return _0x46a022;}});}else{return _0x5c6e43;}}})[_0x859b('0x2a')](function(_0x13f663){var _0x5a104e=[];if(_0x13f663){_0x1692ac=_0x13f663;for(var _0x31b24f=0x0;_0x31b24f<_0x13f663['length'];_0x31b24f+=0x1){_0x1692ac[_0x31b24f][_0x859b('0x50')]=[];_0x5a104e[_0x859b('0x67')](db[_0x859b('0x30')][_0x859b('0x4b')]({'where':{'FromId':[_0x3b1830[_0x859b('0x56')]['id'],_0x13f663[_0x31b24f]['id']],'ToId':[_0x3b1830[_0x859b('0x56')]['id'],_0x13f663[_0x31b24f]['id']],'ChatGroupId':null},'attributes':['id',_0x859b('0x68'),_0x859b('0x69'),'ToId',_0x859b('0x6a'),'body'],'order':qs[_0x859b('0x3d')](_0x859b('0x6b')),'limit':0x1,'offset':0x0,'raw':!![]})['then'](wrapUser(_0x13f663[_0x31b24f])));}return BPromise[_0x859b('0x6c')](_0x5a104e);}return[];})[_0x859b('0x2a')](function(_0x4944e1){return{'rows':_0x4944e1,'count':_0x4944e1[_0x859b('0x49')]};})[_0x859b('0x2a')](respondWithResult(_0x1461b5,null))[_0x859b('0x46')](handleError(_0x1461b5,null));};
\ No newline at end of file
+var _0x5cc9=['describe','get','messages','createdAt','lastMessage','lastMessageAt','format','getUsers','findAll','admin','user','fullname','role','userpic','internal','online','lastLoginAt','allowmessenger','showWebBar','-online','UserProfileSection','Agents','userProfileId','UserProfileResource','isEmpty','agent','resourceId','push','FromId','ToId','-createdAt','all','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','ejs','fs-extra','lodash','crypto','desk.js','querystring','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','redis','defaults','localhost','./chatInternalMessage.socket','register','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','reject','save','update','destroy','then','stack','name','send','index','map','ChatInternalMessage','rawAttributes','fieldName','type','key','model','query','keys','attributes','intersection','fields','length','order','sort','where','filters','pick','filter','VIRTUAL','merge','options','includeAll','include','rows','catch','show','find','create','body','params'];(function(_0x33990e,_0x27b1f4){var _0x366423=function(_0x488cf4){while(--_0x488cf4){_0x33990e['push'](_0x33990e['shift']());}};_0x366423(++_0x27b1f4);}(_0x5cc9,0x16a));var _0x95cc=function(_0xe5ef5b,_0x428332){_0xe5ef5b=_0xe5ef5b-0x0;var _0x376b56=_0x5cc9[_0xe5ef5b];return _0x376b56;};'use strict';var emlformat=require(_0x95cc('0x0'));var rimraf=require(_0x95cc('0x1'));var zipdir=require(_0x95cc('0x2'));var jsonpatch=require(_0x95cc('0x3'));var rp=require(_0x95cc('0x4'));var moment=require(_0x95cc('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x95cc('0x6'));var util=require(_0x95cc('0x7'));var path=require('path');var sox=require(_0x95cc('0x8'));var csv=require(_0x95cc('0x9'));var ejs=require(_0x95cc('0xa'));var fs=require('fs');var fs_extra=require(_0x95cc('0xb'));var _=require(_0x95cc('0xc'));var squel=require('squel');var crypto=require(_0x95cc('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x95cc('0xe'));var toCsv=require(_0x95cc('0x9'));var querystring=require(_0x95cc('0xf'));var Papa=require('papaparse');var Redis=require(_0x95cc('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x95cc('0x11'));var hardwareService=require(_0x95cc('0x12'));var logger=require(_0x95cc('0x13'))(_0x95cc('0x14'));var utils=require(_0x95cc('0x15'));var config=require(_0x95cc('0x16'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];config[_0x95cc('0x17')]=_[_0x95cc('0x18')](config['redis'],{'host':_0x95cc('0x19'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x95cc('0x17')]));require(_0x95cc('0x1a'))[_0x95cc('0x1b')](socket);function respondWithStatusCode(_0x25d508,_0x2112cc){_0x2112cc=_0x2112cc||0xcc;return function(_0x1eedbf){if(_0x1eedbf){return _0x25d508[_0x95cc('0x1c')](_0x2112cc);}return _0x25d508[_0x95cc('0x1d')](_0x2112cc)[_0x95cc('0x1e')]();};}function respondWithResult(_0x4bff06,_0x7304ab){_0x7304ab=_0x7304ab||0xc8;return function(_0x4a2428){if(_0x4a2428){return _0x4bff06[_0x95cc('0x1d')](_0x7304ab)['json'](_0x4a2428);}};}function respondWithFilteredResult(_0x1e6203,_0x2d4b10){return function(_0x6b0917){if(_0x6b0917){var _0x231b39=typeof _0x2d4b10[_0x95cc('0x1f')]===_0x95cc('0x20')&&typeof _0x2d4b10[_0x95cc('0x21')]===_0x95cc('0x20');var _0xb8192e=_0x6b0917[_0x95cc('0x22')];var _0x2276ac=_0x231b39?0x0:_0x2d4b10[_0x95cc('0x1f')];var _0x1eb2a7=_0x231b39?_0x6b0917[_0x95cc('0x22')]:_0x2d4b10[_0x95cc('0x1f')]+_0x2d4b10[_0x95cc('0x21')];var _0x4ea406;if(_0x1eb2a7>=_0xb8192e){_0x1eb2a7=_0xb8192e;_0x4ea406=0xc8;}else{_0x4ea406=0xce;}_0x1e6203[_0x95cc('0x1d')](_0x4ea406);return _0x1e6203[_0x95cc('0x23')](_0x95cc('0x24'),_0x2276ac+'-'+_0x1eb2a7+'/'+_0xb8192e)[_0x95cc('0x25')](_0x6b0917);}return null;};}function patchUpdates(_0x345511){return function(_0xe2d034){try{jsonpatch['apply'](_0xe2d034,_0x345511,!![]);}catch(_0x3552bc){return BPromise[_0x95cc('0x26')](_0x3552bc);}return _0xe2d034[_0x95cc('0x27')]();};}function saveUpdates(_0x282866,_0xe3265a){return function(_0x2e6801){if(_0x2e6801){return _0x2e6801[_0x95cc('0x28')](_0x282866)['then'](function(_0x2fa5a5){return _0x2fa5a5;});}return null;};}function removeEntity(_0x99710d,_0x1e2876){return function(_0x25c56c){if(_0x25c56c){return _0x25c56c[_0x95cc('0x29')]()[_0x95cc('0x2a')](function(){_0x99710d[_0x95cc('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4d0b6a,_0x5b8c6f){return function(_0x1ed7d5){if(!_0x1ed7d5){_0x4d0b6a[_0x95cc('0x1c')](0x194);}return _0x1ed7d5;};}function handleError(_0x165e9e,_0x549a86){_0x549a86=_0x549a86||0x1f4;return function(_0x12a0e5){logger['error'](_0x12a0e5[_0x95cc('0x2b')]);if(_0x12a0e5[_0x95cc('0x2c')]){delete _0x12a0e5[_0x95cc('0x2c')];}_0x165e9e[_0x95cc('0x1d')](_0x549a86)[_0x95cc('0x2d')](_0x12a0e5);};}exports[_0x95cc('0x2e')]=function(_0xbd98d7,_0x2d3c22){var _0x18124b={},_0x65b551={},_0x3e1fe2={'count':0x0,'rows':[]};var _0x28fb63=_[_0x95cc('0x2f')](db[_0x95cc('0x30')][_0x95cc('0x31')],function(_0x5f4f25){return{'name':_0x5f4f25[_0x95cc('0x32')],'type':_0x5f4f25[_0x95cc('0x33')][_0x95cc('0x34')]};});_0x65b551[_0x95cc('0x35')]=_[_0x95cc('0x2f')](_0x28fb63,_0x95cc('0x2c'));_0x65b551[_0x95cc('0x36')]=_[_0x95cc('0x37')](_0xbd98d7[_0x95cc('0x36')]);_0x65b551['filters']=_['intersection'](_0x65b551[_0x95cc('0x35')],_0x65b551[_0x95cc('0x36')]);_0x18124b[_0x95cc('0x38')]=_[_0x95cc('0x39')](_0x65b551[_0x95cc('0x35')],qs[_0x95cc('0x3a')](_0xbd98d7[_0x95cc('0x36')][_0x95cc('0x3a')]));_0x18124b[_0x95cc('0x38')]=_0x18124b[_0x95cc('0x38')][_0x95cc('0x3b')]?_0x18124b[_0x95cc('0x38')]:_0x65b551[_0x95cc('0x35')];if(!_0xbd98d7['query']['hasOwnProperty']('nolimit')){_0x18124b[_0x95cc('0x21')]=qs[_0x95cc('0x21')](_0xbd98d7[_0x95cc('0x36')][_0x95cc('0x21')]);_0x18124b[_0x95cc('0x1f')]=qs[_0x95cc('0x1f')](_0xbd98d7[_0x95cc('0x36')][_0x95cc('0x1f')]);}_0x18124b[_0x95cc('0x3c')]=qs[_0x95cc('0x3d')](_0xbd98d7[_0x95cc('0x36')][_0x95cc('0x3d')]);_0x18124b[_0x95cc('0x3e')]=qs[_0x95cc('0x3f')](_[_0x95cc('0x40')](_0xbd98d7[_0x95cc('0x36')],_0x65b551[_0x95cc('0x3f')]),_0x28fb63);if(_0xbd98d7[_0x95cc('0x36')][_0x95cc('0x41')]){_0x18124b[_0x95cc('0x3e')]=_['merge'](_0x18124b[_0x95cc('0x3e')],{'$or':_[_0x95cc('0x2f')](_0x28fb63,function(_0x3365f4){if(_0x3365f4[_0x95cc('0x33')]!==_0x95cc('0x42')){var _0x4aa44f={};_0x4aa44f[_0x3365f4[_0x95cc('0x2c')]]={'$like':'%'+_0xbd98d7[_0x95cc('0x36')][_0x95cc('0x41')]+'%'};return _0x4aa44f;}})});}_0x18124b=_[_0x95cc('0x43')]({},_0x18124b,_0xbd98d7[_0x95cc('0x44')]);var _0x4df8a2={'where':_0x18124b['where']};return db[_0x95cc('0x30')]['count'](_0x4df8a2)[_0x95cc('0x2a')](function(_0x36449a){_0x3e1fe2[_0x95cc('0x22')]=_0x36449a;if(_0xbd98d7[_0x95cc('0x36')][_0x95cc('0x45')]){_0x18124b[_0x95cc('0x46')]=[{'all':!![]}];}return db[_0x95cc('0x30')]['findAll'](_0x18124b);})['then'](function(_0x56f623){_0x3e1fe2[_0x95cc('0x47')]=_0x56f623;return _0x3e1fe2;})[_0x95cc('0x2a')](respondWithFilteredResult(_0x2d3c22,_0x18124b))[_0x95cc('0x48')](handleError(_0x2d3c22,null));};exports[_0x95cc('0x49')]=function(_0x4d8dda,_0x33e076){var _0x203dd6={'raw':!![],'where':{'id':_0x4d8dda['params']['id']}},_0x109f84={};_0x109f84['model']=_[_0x95cc('0x37')](db[_0x95cc('0x30')][_0x95cc('0x31')]);_0x109f84[_0x95cc('0x36')]=_[_0x95cc('0x37')](_0x4d8dda[_0x95cc('0x36')]);_0x109f84[_0x95cc('0x3f')]=_[_0x95cc('0x39')](_0x109f84[_0x95cc('0x35')],_0x109f84['query']);_0x203dd6[_0x95cc('0x38')]=_[_0x95cc('0x39')](_0x109f84['model'],qs[_0x95cc('0x3a')](_0x4d8dda['query']['fields']));_0x203dd6[_0x95cc('0x38')]=_0x203dd6[_0x95cc('0x38')][_0x95cc('0x3b')]?_0x203dd6[_0x95cc('0x38')]:_0x109f84[_0x95cc('0x35')];if(_0x4d8dda[_0x95cc('0x36')][_0x95cc('0x45')]){_0x203dd6[_0x95cc('0x46')]=[{'all':!![]}];}_0x203dd6=_[_0x95cc('0x43')]({},_0x203dd6,_0x4d8dda['options']);return db[_0x95cc('0x30')][_0x95cc('0x4a')](_0x203dd6)[_0x95cc('0x2a')](handleEntityNotFound(_0x33e076,null))[_0x95cc('0x2a')](respondWithResult(_0x33e076,null))[_0x95cc('0x48')](handleError(_0x33e076,null));};exports[_0x95cc('0x4b')]=function(_0x1a591d,_0x51e81b){return db[_0x95cc('0x30')][_0x95cc('0x4b')](_0x1a591d[_0x95cc('0x4c')],{})['then'](respondWithResult(_0x51e81b,0xc9))['catch'](handleError(_0x51e81b,null));};exports[_0x95cc('0x28')]=function(_0x523516,_0x37cc0c){if(_0x523516['body']['id']){delete _0x523516[_0x95cc('0x4c')]['id'];}return db[_0x95cc('0x30')][_0x95cc('0x4a')]({'where':{'id':_0x523516[_0x95cc('0x4d')]['id']}})['then'](handleEntityNotFound(_0x37cc0c,null))[_0x95cc('0x2a')](saveUpdates(_0x523516['body'],null))[_0x95cc('0x2a')](respondWithResult(_0x37cc0c,null))[_0x95cc('0x48')](handleError(_0x37cc0c,null));};exports[_0x95cc('0x29')]=function(_0x381965,_0x55dc0b){return db[_0x95cc('0x30')][_0x95cc('0x4a')]({'where':{'id':_0x381965[_0x95cc('0x4d')]['id']}})['then'](handleEntityNotFound(_0x55dc0b,null))[_0x95cc('0x2a')](removeEntity(_0x55dc0b,null))[_0x95cc('0x48')](handleError(_0x55dc0b,null));};exports[_0x95cc('0x4e')]=function(_0x311f06,_0x118c2a){return db[_0x95cc('0x30')][_0x95cc('0x4e')]()[_0x95cc('0x2a')](respondWithResult(_0x118c2a,null))[_0x95cc('0x48')](handleError(_0x118c2a,null));};function wrapUser(_0x3fc946){return function(_0x337a75){var _0x1aae3f=_0x3fc946[_0x95cc('0x4f')]({'plain':!![]});_0x1aae3f[_0x95cc('0x50')]=[];if(_0x337a75){_0x1aae3f['lastMessageAt']=_0x337a75[_0x95cc('0x51')];_0x1aae3f[_0x95cc('0x52')]=_0x337a75;}else{_0x1aae3f[_0x95cc('0x53')]=moment(0x0)[_0x95cc('0x54')]('YYYY-MM-DD\x20HH:mm:ss');_0x1aae3f['lastMessage']={};}return _0x1aae3f;};}exports[_0x95cc('0x55')]=function(_0x1df6bb,_0x2345d9,_0x10b582){var _0x436c2b=[];return db['User'][_0x95cc('0x56')]({'where':{'role':['agent',_0x95cc('0x57'),_0x95cc('0x58')]},'attributes':['id',_0x95cc('0x59'),'name',_0x95cc('0x5a'),_0x95cc('0x5b'),_0x95cc('0x5c'),_0x95cc('0x5d'),_0x95cc('0x5e'),_0x95cc('0x5f'),_0x95cc('0x60')],'order':qs[_0x95cc('0x3d')](_0x95cc('0x61')),'include':[{'model':db['VoiceQueue'],'as':'VoiceQueues','attributes':['id',_0x95cc('0x2c'),'type'],'through':{'attributes':[]}}]})['then'](function(_0x2d8940){if(_0x2d8940){var _0x280945=_0x1df6bb[_0x95cc('0x58')]['get']({'plain':!![]});if(!_0x280945)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x280945['role']===_0x95cc('0x58')){return db[_0x95cc('0x62')][_0x95cc('0x4a')]({'where':{'name':_0x95cc('0x63'),'userProfileId':_0x280945[_0x95cc('0x64')]},'raw':!![]})[_0x95cc('0x2a')](function(_0x598134){if(_0x598134){if(_0x598134['autoAssociation']===0x0){return db[_0x95cc('0x65')][_0x95cc('0x56')]({'where':{'sectionId':_0x598134['id']},'raw':!![]})['then'](function(_0x1c2261){var _0x15a3c2=[];if(_[_0x95cc('0x66')](_0x1c2261)){_0x15a3c2=_[_0x95cc('0x41')](_0x2d8940,function(_0x505395){if(_0x505395['role']!=='agent'){return _0x505395;}});return _0x15a3c2;}else{for(var _0x1a5f2f=0x0;_0x1a5f2f<_0x2d8940[_0x95cc('0x3b')];_0x1a5f2f++){var _0x41aa93=_0x2d8940[_0x1a5f2f];if(_0x41aa93[_0x95cc('0x5a')]===_0x95cc('0x67')){var _0x2b13ac=_[_0x95cc('0x4a')](_0x1c2261,function(_0x3d0a37){return _0x3d0a37[_0x95cc('0x68')]===_0x41aa93['id'];});if(_0x2b13ac)_0x15a3c2['push'](_0x41aa93);}else{_0x15a3c2['push'](_0x41aa93);}}return _0x15a3c2;}});}else{return _0x2d8940;}}else{var _0x4b8ef0=_['filter'](_0x2d8940,function(_0x1a4f1d){if(_0x1a4f1d['role']!=='agent'){return _0x1a4f1d;}});return _0x4b8ef0;}});}else{return _0x2d8940;}}})[_0x95cc('0x2a')](function(_0x393c26){var _0x14b7d6=[];if(_0x393c26){_0x436c2b=_0x393c26;for(var _0x126a79=0x0;_0x126a79<_0x393c26['length'];_0x126a79+=0x1){_0x436c2b[_0x126a79][_0x95cc('0x50')]=[];_0x14b7d6[_0x95cc('0x69')](db[_0x95cc('0x30')][_0x95cc('0x4a')]({'where':{'FromId':[_0x1df6bb['user']['id'],_0x393c26[_0x126a79]['id']],'ToId':[_0x1df6bb[_0x95cc('0x58')]['id'],_0x393c26[_0x126a79]['id']],'ChatGroupId':null},'attributes':['id',_0x95cc('0x51'),_0x95cc('0x6a'),_0x95cc('0x6b'),'read',_0x95cc('0x4c')],'order':qs['sort'](_0x95cc('0x6c')),'limit':0x1,'offset':0x0,'raw':!![]})[_0x95cc('0x2a')](wrapUser(_0x393c26[_0x126a79])));}return BPromise[_0x95cc('0x6d')](_0x14b7d6);}return[];})['then'](function(_0x170593){return{'rows':_0x170593,'count':_0x170593['length']};})[_0x95cc('0x2a')](respondWithResult(_0x2345d9,null))['catch'](handleError(_0x2345d9,null));};
\ No newline at end of file
index e1840da..5476994 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x81cb=['hook','exports','events','../../mysqldb','setMaxListeners','save','remove','emit'];(function(_0x3773c7,_0x27d49f){var _0x13a6a0=function(_0x3f6a00){while(--_0x3f6a00){_0x3773c7['push'](_0x3773c7['shift']());}};_0x13a6a0(++_0x27d49f);}(_0x81cb,0xaa));var _0xb81c=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x81cb[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require(_0xb81c('0x0'));var ChatInternalMessage=require(_0xb81c('0x1'))['db']['ChatInternalMessage'];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents[_0xb81c('0x2')](0x0);var events={'afterCreate':_0xb81c('0x3'),'afterUpdate':'update','afterDestroy':_0xb81c('0x4')};function emitEvent(_0x197278){return function(_0x212420,_0x440d03,_0x5e455c){ChatInternalMessageEvents[_0xb81c('0x5')](_0x197278+':'+_0x212420['id'],_0x212420);ChatInternalMessageEvents['emit'](_0x197278,_0x212420);_0x5e455c(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatInternalMessage[_0xb81c('0x6')](e,emitEvent(event));}}module[_0xb81c('0x7')]=ChatInternalMessageEvents;
\ No newline at end of file
+var _0x2fa7=['events','ChatInternalMessage','setMaxListeners','save','update','remove','emit','exports'];(function(_0x4a4d6b,_0x3306de){var _0x17d85e=function(_0x2dd1a1){while(--_0x2dd1a1){_0x4a4d6b['push'](_0x4a4d6b['shift']());}};_0x17d85e(++_0x3306de);}(_0x2fa7,0xe0));var _0x72fa=function(_0x82cd19,_0x525c63){_0x82cd19=_0x82cd19-0x0;var _0x1cebcc=_0x2fa7[_0x82cd19];return _0x1cebcc;};'use strict';var EventEmitter=require(_0x72fa('0x0'));var ChatInternalMessage=require('../../mysqldb')['db'][_0x72fa('0x1')];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents[_0x72fa('0x2')](0x0);var events={'afterCreate':_0x72fa('0x3'),'afterUpdate':_0x72fa('0x4'),'afterDestroy':_0x72fa('0x5')};function emitEvent(_0x3e7e22){return function(_0x3ac74e,_0x287cd1,_0x385932){ChatInternalMessageEvents[_0x72fa('0x6')](_0x3e7e22+':'+_0x3ac74e['id'],_0x3ac74e);ChatInternalMessageEvents[_0x72fa('0x6')](_0x3e7e22,_0x3ac74e);_0x385932(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatInternalMessage['hook'](e,emitEvent(event));}}module[_0x72fa('0x7')]=ChatInternalMessageEvents;
\ No newline at end of file
index c219de4..6f72428 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf43b=['ChatInternalMessage','utf8mb4_unicode_ci','util','../../config/logger','api','moment','bluebird','../../config/environment','./chatInternalMessage.attributes','exports','define'];(function(_0x39b51c,_0x40010d){var _0x146312=function(_0x4ea93b){while(--_0x4ea93b){_0x39b51c['push'](_0x39b51c['shift']());}};_0x146312(++_0x40010d);}(_0xf43b,0x199));var _0xbf43=function(_0x257c8c,_0x5d0cdc){_0x257c8c=_0x257c8c-0x0;var _0x2566d6=_0xf43b[_0x257c8c];return _0x2566d6;};'use strict';var _=require('lodash');var util=require(_0xbf43('0x0'));var logger=require(_0xbf43('0x1'))(_0xbf43('0x2'));var moment=require(_0xbf43('0x3'));var BPromise=require(_0xbf43('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xbf43('0x5'));var attributes=require(_0xbf43('0x6'));module[_0xbf43('0x7')]=function(_0xd43192,_0x21474a){return _0xd43192[_0xbf43('0x8')](_0xbf43('0x9'),attributes,{'tableName':'chat_internal_messages','paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0xbf43('0xa')});};
\ No newline at end of file
+var _0xcf06=['request-promise','path','rimraf','define','ChatInternalMessage','chat_internal_messages','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0xcf06,0xd8));var _0x6cf0=function(_0x5aa2e2,_0x44c8ee){_0x5aa2e2=_0x5aa2e2-0x0;var _0x392dc3=_0xcf06[_0x5aa2e2];return _0x392dc3;};'use strict';var _=require(_0x6cf0('0x0'));var util=require(_0x6cf0('0x1'));var logger=require(_0x6cf0('0x2'))(_0x6cf0('0x3'));var moment=require(_0x6cf0('0x4'));var BPromise=require('bluebird');var rp=require(_0x6cf0('0x5'));var fs=require('fs');var path=require(_0x6cf0('0x6'));var rimraf=require(_0x6cf0('0x7'));var config=require('../../config/environment');var attributes=require('./chatInternalMessage.attributes');module['exports']=function(_0x55d1d7,_0x1aecba){return _0x55d1d7[_0x6cf0('0x8')](_0x6cf0('0x9'),attributes,{'tableName':_0x6cf0('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x6cf0('0xb'),'collate':_0x6cf0('0xc')});};
\ No newline at end of file
index 09b4fa3..ccd2d59 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1403=['then','request\x20sent','ChatInternalMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatInternalMessage,\x20%s,\x20%s','message','info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./chatInternalMessage.socket','register'];(function(_0x465e8a,_0xcb19b6){var _0x3d74ce=function(_0x3dd198){while(--_0x3dd198){_0x465e8a['push'](_0x465e8a['shift']());}};_0x3d74ce(++_0xcb19b6);}(_0x1403,0x167));var _0x3140=function(_0x38f91b,_0xc0fdc7){_0x38f91b=_0x38f91b-0x0;var _0xe8cfde=_0x1403[_0x38f91b];return _0xe8cfde;};'use strict';var _=require(_0x3140('0x0'));var util=require(_0x3140('0x1'));var moment=require(_0x3140('0x2'));var BPromise=require(_0x3140('0x3'));var rs=require(_0x3140('0x4'));var fs=require('fs');var Redis=require(_0x3140('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x3140('0x6'));var logger=require(_0x3140('0x7'))(_0x3140('0x8'));var config=require('../../config/environment');var jayson=require(_0x3140('0x9'));var client=jayson[_0x3140('0xa')][_0x3140('0xb')]({'port':0x232a});config[_0x3140('0xc')]=_[_0x3140('0xd')](config[_0x3140('0xc')],{'host':_0x3140('0xe'),'port':0x18eb});var socket=require(_0x3140('0xf'))(new Redis(config[_0x3140('0xc')]));require(_0x3140('0x10'))[_0x3140('0x11')](socket);function respondWithRpcPromise(_0x4525c5,_0x4ec056,_0x2abd85){return new BPromise(function(_0x5bf525,_0x4c2289){return client['request'](_0x4525c5,_0x2abd85)[_0x3140('0x12')](function(_0x54cc1b){logger['info']('ChatInternalMessage,\x20%s,\x20%s',_0x4ec056,_0x3140('0x13'));logger['debug'](_0x3140('0x14'),_0x4ec056,'request\x20sent',JSON[_0x3140('0x15')](_0x54cc1b));if(_0x54cc1b[_0x3140('0x16')]){if(_0x54cc1b[_0x3140('0x16')][_0x3140('0x17')]===0x1f4){logger[_0x3140('0x16')](_0x3140('0x18'),_0x4ec056,_0x54cc1b[_0x3140('0x16')][_0x3140('0x19')]);return _0x4c2289(_0x54cc1b['error'][_0x3140('0x19')]);}logger[_0x3140('0x16')](_0x3140('0x18'),_0x4ec056,_0x54cc1b[_0x3140('0x16')][_0x3140('0x19')]);return _0x5bf525(_0x54cc1b[_0x3140('0x16')][_0x3140('0x19')]);}else{logger[_0x3140('0x1a')](_0x3140('0x18'),_0x4ec056,_0x3140('0x13'));_0x5bf525(_0x54cc1b[_0x3140('0x1b')][_0x3140('0x19')]);}})[_0x3140('0x1c')](function(_0x11e58d){logger[_0x3140('0x16')]('ChatInternalMessage,\x20%s,\x20%s',_0x4ec056,_0x11e58d);_0x4c2289(_0x11e58d);});});}
\ No newline at end of file
+var _0x223c=['ChatInternalMessage,\x20%s,\x20%s','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','defaults','localhost','socket.io-emitter','./chatInternalMessage.socket','register','request','info'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0x223c,0x1c9));var _0xc223=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x223c[_0x2dafbe];return _0x58a45a;};'use strict';var _=require(_0xc223('0x0'));var util=require('util');var moment=require(_0xc223('0x1'));var BPromise=require(_0xc223('0x2'));var rs=require(_0xc223('0x3'));var fs=require('fs');var Redis=require(_0xc223('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xc223('0x5'));var logger=require(_0xc223('0x6'))(_0xc223('0x7'));var config=require(_0xc223('0x8'));var jayson=require(_0xc223('0x9'));var client=jayson[_0xc223('0xa')][_0xc223('0xb')]({'port':0x232a});config['redis']=_[_0xc223('0xc')](config['redis'],{'host':_0xc223('0xd'),'port':0x18eb});var socket=require(_0xc223('0xe'))(new Redis(config['redis']));require(_0xc223('0xf'))[_0xc223('0x10')](socket);function respondWithRpcPromise(_0x21564e,_0xc4d363,_0x5a0015){return new BPromise(function(_0x594681,_0x504903){return client[_0xc223('0x11')](_0x21564e,_0x5a0015)['then'](function(_0x5590bc){logger[_0xc223('0x12')](_0xc223('0x13'),_0xc4d363,'request\x20sent');logger[_0xc223('0x14')](_0xc223('0x15'),_0xc4d363,_0xc223('0x16'),JSON[_0xc223('0x17')](_0x5590bc));if(_0x5590bc[_0xc223('0x18')]){if(_0x5590bc[_0xc223('0x18')]['code']===0x1f4){logger[_0xc223('0x18')](_0xc223('0x13'),_0xc4d363,_0x5590bc[_0xc223('0x18')][_0xc223('0x19')]);return _0x504903(_0x5590bc['error']['message']);}logger[_0xc223('0x18')](_0xc223('0x13'),_0xc4d363,_0x5590bc[_0xc223('0x18')][_0xc223('0x19')]);return _0x594681(_0x5590bc[_0xc223('0x18')][_0xc223('0x19')]);}else{logger[_0xc223('0x12')](_0xc223('0x13'),_0xc4d363,_0xc223('0x16'));_0x594681(_0x5590bc[_0xc223('0x1a')][_0xc223('0x19')]);}})[_0xc223('0x1b')](function(_0x50a586){logger[_0xc223('0x18')](_0xc223('0x13'),_0xc4d363,_0x50a586);_0x504903(_0x50a586);});});}
\ No newline at end of file
index a3ea801..9b262b0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa1df=['save','update','emit','register','./chatInternalMessage.events'];(function(_0x48ed93,_0x1ef8e5){var _0x20d2e1=function(_0x4ff06f){while(--_0x4ff06f){_0x48ed93['push'](_0x48ed93['shift']());}};_0x20d2e1(++_0x1ef8e5);}(_0xa1df,0x180));var _0xfa1d=function(_0x56744e,_0x427e88){_0x56744e=_0x56744e-0x0;var _0x4bd1cc=_0xa1df[_0x56744e];return _0x4bd1cc;};'use strict';var ChatInternalMessageEvents=require(_0xfa1d('0x0'));var events=[_0xfa1d('0x1'),'remove',_0xfa1d('0x2')];function createListener(_0x16e529,_0x199331){return function(_0x24b83f){_0x199331[_0xfa1d('0x3')](_0x16e529,_0x24b83f);};}function removeListener(_0x55d02a,_0xa7a276){return function(){ChatInternalMessageEvents['removeListener'](_0x55d02a,_0xa7a276);};}exports[_0xfa1d('0x4')]=function(_0x5cfaff){for(var _0x132aa3=0x0,_0x40a1e8=events['length'];_0x132aa3<_0x40a1e8;_0x132aa3++){var _0x4e8c97=events[_0x132aa3];var _0x2b5bde=createListener('chatInternalMessage:'+_0x4e8c97,_0x5cfaff);ChatInternalMessageEvents['on'](_0x4e8c97,_0x2b5bde);}};
\ No newline at end of file
+var _0x7712=['length','chatInternalMessage:','update','emit'];(function(_0x1c2a1e,_0x1da05c){var _0x3a3cd9=function(_0x30cb87){while(--_0x30cb87){_0x1c2a1e['push'](_0x1c2a1e['shift']());}};_0x3a3cd9(++_0x1da05c);}(_0x7712,0x1de));var _0x2771=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x7712[_0x1facfa];return _0x9ec701;};'use strict';var ChatInternalMessageEvents=require('./chatInternalMessage.events');var events=['save','remove',_0x2771('0x0')];function createListener(_0x43c5cf,_0x154435){return function(_0xcbaf81){_0x154435[_0x2771('0x1')](_0x43c5cf,_0xcbaf81);};}function removeListener(_0x39212d,_0x2ef251){return function(){ChatInternalMessageEvents['removeListener'](_0x39212d,_0x2ef251);};}exports['register']=function(_0xebc9f){for(var _0x1e2eef=0x0,_0x56c633=events[_0x2771('0x2')];_0x1e2eef<_0x56c633;_0x1e2eef++){var _0xaf608=events[_0x1e2eef];var _0x59e10c=createListener(_0x2771('0x3')+_0xaf608,_0xebc9f);ChatInternalMessageEvents['on'](_0xaf608,_0x59e10c);}};
\ No newline at end of file
index f248f64..2867130 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd5bb=['index','get','/describe','describe','/users','/:id','show','post','create','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','isAuthenticated'];(function(_0xfe2c60,_0x1866fd){var _0x1da88e=function(_0x50e59d){while(--_0x50e59d){_0xfe2c60['push'](_0xfe2c60['shift']());}};_0x1da88e(++_0x1866fd);}(_0xd5bb,0x107));var _0xbd5b=function(_0x21f97c,_0x22e255){_0x21f97c=_0x21f97c-0x0;var _0x1d586a=_0xd5bb[_0x21f97c];return _0x1d586a;};'use strict';var multer=require(_0xbd5b('0x0'));var util=require(_0xbd5b('0x1'));var path=require(_0xbd5b('0x2'));var timeout=require(_0xbd5b('0x3'));var express=require(_0xbd5b('0x4'));var router=express[_0xbd5b('0x5')]();var fs_extra=require(_0xbd5b('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0xbd5b('0x7'));var config=require(_0xbd5b('0x8'));var controller=require('./chatInternalMessage.controller');router['get']('/',auth[_0xbd5b('0x9')](),controller[_0xbd5b('0xa')]);router[_0xbd5b('0xb')](_0xbd5b('0xc'),auth[_0xbd5b('0x9')](),controller[_0xbd5b('0xd')]);router[_0xbd5b('0xb')](_0xbd5b('0xe'),auth['isAuthenticated'](),controller['getUsers']);router[_0xbd5b('0xb')](_0xbd5b('0xf'),auth['isAuthenticated'](),controller[_0xbd5b('0x10')]);router[_0xbd5b('0x11')]('/',auth[_0xbd5b('0x9')](),controller[_0xbd5b('0x12')]);router['put'](_0xbd5b('0xf'),controller['update']);router['delete']('/:id',auth[_0xbd5b('0x9')](),controller[_0xbd5b('0x13')]);module[_0xbd5b('0x14')]=router;
\ No newline at end of file
+var _0xdcbf=['get','isAuthenticated','index','/describe','describe','/users','/:id','show','create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatInternalMessage.controller'];(function(_0x5f5413,_0x49a1f6){var _0x33bff8=function(_0x1e17c9){while(--_0x1e17c9){_0x5f5413['push'](_0x5f5413['shift']());}};_0x33bff8(++_0x49a1f6);}(_0xdcbf,0xce));var _0xfdcb=function(_0x6131cd,_0x4c26a1){_0x6131cd=_0x6131cd-0x0;var _0x47e916=_0xdcbf[_0x6131cd];return _0x47e916;};'use strict';var multer=require(_0xfdcb('0x0'));var util=require(_0xfdcb('0x1'));var path=require(_0xfdcb('0x2'));var timeout=require(_0xfdcb('0x3'));var express=require('express');var router=express[_0xfdcb('0x4')]();var fs_extra=require(_0xfdcb('0x5'));var auth=require(_0xfdcb('0x6'));var interaction=require(_0xfdcb('0x7'));var config=require(_0xfdcb('0x8'));var controller=require(_0xfdcb('0x9'));router[_0xfdcb('0xa')]('/',auth[_0xfdcb('0xb')](),controller[_0xfdcb('0xc')]);router['get'](_0xfdcb('0xd'),auth[_0xfdcb('0xb')](),controller[_0xfdcb('0xe')]);router[_0xfdcb('0xa')](_0xfdcb('0xf'),auth[_0xfdcb('0xb')](),controller['getUsers']);router[_0xfdcb('0xa')](_0xfdcb('0x10'),auth['isAuthenticated'](),controller[_0xfdcb('0x11')]);router['post']('/',auth[_0xfdcb('0xb')](),controller[_0xfdcb('0x12')]);router[_0xfdcb('0x13')]('/:id',controller[_0xfdcb('0x14')]);router[_0xfdcb('0x15')](_0xfdcb('0x10'),auth[_0xfdcb('0xb')](),controller[_0xfdcb('0x16')]);module[_0xfdcb('0x17')]=router;
\ No newline at end of file
index ce5f3b9..c56e0ab 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdc9b=['TEXT','BOOLEAN','out','DATE','sequelize','exports'];(function(_0x469aa1,_0x574235){var _0x1a1add=function(_0x3efcc8){while(--_0x3efcc8){_0x469aa1['push'](_0x469aa1['shift']());}};_0x1a1add(++_0x574235);}(_0xdc9b,0x70));var _0xbdc9=function(_0x5a2f7e,_0x3ee7b2){_0x5a2f7e=_0x5a2f7e-0x0;var _0x5b1261=_0xdc9b[_0x5a2f7e];return _0x5b1261;};'use strict';var Sequelize=require(_0xbdc9('0x0'));module[_0xbdc9('0x1')]={'body':{'type':Sequelize[_0xbdc9('0x2')]('medium'),'allowNull':![]},'read':{'type':Sequelize[_0xbdc9('0x3')],'defaultValue':![]},'secret':{'type':Sequelize[_0xbdc9('0x3')],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in','out'),'defaultValue':_0xbdc9('0x4'),'allowNull':![]},'readAt':{'type':Sequelize[_0xbdc9('0x5')]},'providerName':{'type':Sequelize['STRING']},'providerResponse':{'type':Sequelize[_0xbdc9('0x2')]}};
\ No newline at end of file
+var _0xaf4c=['out','DATE','STRING','exports','TEXT','BOOLEAN','ENUM'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xaf4c,0x1ed));var _0xcaf4=function(_0x3892f6,_0x58318e){_0x3892f6=_0x3892f6-0x0;var _0x14735c=_0xaf4c[_0x3892f6];return _0x14735c;};'use strict';var Sequelize=require('sequelize');module[_0xcaf4('0x0')]={'body':{'type':Sequelize[_0xcaf4('0x1')]('medium'),'allowNull':![]},'read':{'type':Sequelize[_0xcaf4('0x2')],'defaultValue':![]},'secret':{'type':Sequelize[_0xcaf4('0x2')],'defaultValue':![]},'direction':{'type':Sequelize[_0xcaf4('0x3')]('in','out'),'defaultValue':_0xcaf4('0x4'),'allowNull':![]},'readAt':{'type':Sequelize[_0xcaf4('0x5')]},'providerName':{'type':Sequelize[_0xcaf4('0x6')]},'providerResponse':{'type':Sequelize['TEXT']}};
\ No newline at end of file
index b24cd9f..5fcebb2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1db6=['rejectMessage','rejectmessage','formData','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/utils','redis','localhost','socket.io-emitter','./chatMessage.socket','register','jayson/promise','client','http','then','info','ChatMessage,\x20%s,\x20%s','request\x20sent','ChatMessage,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','rows','show','ChatMessage','keys','include','find','create','body','params','destroy','describe','chat-interactions','accept','chat','format','YYYY-MM-DD\x20HH:mm:ss','UserId','agent','get','ChatInteraction','ChatInteractionId','isNil','interaction','user','role','stringify','null','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','Sequelize','QueryTypes','SELECT','contact','User','fullname','email','internal','manual','interface','SIP/%s','channel','motionChannel','event','EventManager','parse','../../config/logger'];(function(_0x9dffc9,_0x72bfa8){var _0x23d287=function(_0x3f1012){while(--_0x3f1012){_0x9dffc9['push'](_0x9dffc9['shift']());}};_0x23d287(++_0x72bfa8);}(_0x1db6,0x86));var _0x61db=function(_0x866e34,_0x5b558e){_0x866e34=_0x866e34-0x0;var _0x4f1d88=_0x1db6[_0x866e34];return _0x4f1d88;};'use strict';var emlformat=require(_0x61db('0x0'));var rimraf=require(_0x61db('0x1'));var zipdir=require(_0x61db('0x2'));var jsonpatch=require(_0x61db('0x3'));var rp=require('request-promise');var moment=require(_0x61db('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x61db('0x5'));var util=require(_0x61db('0x6'));var path=require(_0x61db('0x7'));var sox=require(_0x61db('0x8'));var csv=require(_0x61db('0x9'));var ejs=require(_0x61db('0xa'));var fs=require('fs');var fs_extra=require(_0x61db('0xb'));var _=require(_0x61db('0xc'));var squel=require(_0x61db('0xd'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x61db('0xe'));var toCsv=require(_0x61db('0x9'));var querystring=require(_0x61db('0xf'));var Papa=require(_0x61db('0x10'));var Redis=require(_0x61db('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x61db('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x61db('0x13'));var logger=require('../../config/logger')('api');var utils=require(_0x61db('0x14'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];config[_0x61db('0x15')]=_['defaults'](config[_0x61db('0x15')],{'host':_0x61db('0x16'),'port':0x18eb});var socket=require(_0x61db('0x17'))(new Redis(config[_0x61db('0x15')]));require(_0x61db('0x18'))[_0x61db('0x19')](socket);var jayson=require(_0x61db('0x1a'));var client=jayson[_0x61db('0x1b')][_0x61db('0x1c')]({'port':0x232c});var client9002=jayson[_0x61db('0x1b')][_0x61db('0x1c')]({'port':0x232a});function respondWithRpcPromise(_0x50a76c,_0x5dc6ac,_0x4421ee,_0x14c72d){return new BPromise(function(_0x2d394a,_0x36e58e){var _0x6f2b86=_0x14c72d||client;return _0x6f2b86['request'](_0x50a76c,_0x4421ee)[_0x61db('0x1d')](function(_0x582bab){logger[_0x61db('0x1e')](_0x61db('0x1f'),_0x5dc6ac,_0x61db('0x20'));logger['debug'](_0x61db('0x21'),_0x5dc6ac,_0x61db('0x20'),JSON['stringify'](_0x582bab));if(_0x582bab[_0x61db('0x22')]){if(_0x582bab[_0x61db('0x22')][_0x61db('0x23')]===0x1f4){logger[_0x61db('0x22')](_0x61db('0x1f'),_0x5dc6ac,_0x582bab['error']['message']);return _0x36e58e(_0x582bab[_0x61db('0x22')][_0x61db('0x24')]);}logger[_0x61db('0x22')]('ChatMessage,\x20%s,\x20%s',_0x5dc6ac,_0x582bab['error']['message']);return _0x2d394a(_0x582bab[_0x61db('0x22')]['message']);}else{logger[_0x61db('0x1e')]('ChatMessage,\x20%s,\x20%s',_0x5dc6ac,_0x61db('0x20'));_0x2d394a(_0x582bab[_0x61db('0x25')][_0x61db('0x24')]);}})[_0x61db('0x26')](function(_0x363f56){logger[_0x61db('0x22')](_0x61db('0x1f'),_0x5dc6ac,_0x363f56);_0x36e58e(_0x363f56);});});}function respondWithStatusCode(_0x5f3805,_0x2d9af8){_0x2d9af8=_0x2d9af8||0xcc;return function(_0x3cc7e4){if(_0x3cc7e4){return _0x5f3805[_0x61db('0x27')](_0x2d9af8);}return _0x5f3805[_0x61db('0x28')](_0x2d9af8)[_0x61db('0x29')]();};}function respondWithResult(_0x7ad739,_0x368521){_0x368521=_0x368521||0xc8;return function(_0x42047a){if(_0x42047a){return _0x7ad739[_0x61db('0x28')](_0x368521)[_0x61db('0x2a')](_0x42047a);}};}function respondWithFilteredResult(_0x497cec,_0xf95761){return function(_0x44e2d9){if(_0x44e2d9){var _0x74c33=typeof _0xf95761[_0x61db('0x2b')]===_0x61db('0x2c')&&typeof _0xf95761[_0x61db('0x2d')]==='undefined';var _0x69ad14=_0x44e2d9[_0x61db('0x2e')];var _0x13dc9=_0x74c33?0x0:_0xf95761[_0x61db('0x2b')];var _0x34e186=_0x74c33?_0x44e2d9[_0x61db('0x2e')]:_0xf95761['offset']+_0xf95761[_0x61db('0x2d')];var _0x271f4c;if(_0x34e186>=_0x69ad14){_0x34e186=_0x69ad14;_0x271f4c=0xc8;}else{_0x271f4c=0xce;}_0x497cec[_0x61db('0x28')](_0x271f4c);return _0x497cec['set'](_0x61db('0x2f'),_0x13dc9+'-'+_0x34e186+'/'+_0x69ad14)[_0x61db('0x2a')](_0x44e2d9);}return null;};}function patchUpdates(_0x470dbc){return function(_0x39ecea){try{jsonpatch[_0x61db('0x30')](_0x39ecea,_0x470dbc,!![]);}catch(_0x2ca9b4){return BPromise[_0x61db('0x31')](_0x2ca9b4);}return _0x39ecea[_0x61db('0x32')]();};}function saveUpdates(_0x2b412c,_0xb67377){return function(_0x88defe){if(_0x88defe){return _0x88defe[_0x61db('0x33')](_0x2b412c)[_0x61db('0x1d')](function(_0x2a77c9){return _0x2a77c9;});}return null;};}function removeEntity(_0x3c025a,_0x2d6686){return function(_0x2d0f32){if(_0x2d0f32){return _0x2d0f32['destroy']()[_0x61db('0x1d')](function(){_0x3c025a[_0x61db('0x28')](0xcc)[_0x61db('0x29')]();});}};}function handleEntityNotFound(_0x5cc35e,_0x5c6a76){return function(_0x335e92){if(!_0x335e92){_0x5cc35e['sendStatus'](0x194);}return _0x335e92;};}function handleError(_0x5982bf,_0x80dfc0){_0x80dfc0=_0x80dfc0||0x1f4;return function(_0x8c277d){logger[_0x61db('0x22')](_0x8c277d[_0x61db('0x34')]);if(_0x8c277d['name']){delete _0x8c277d[_0x61db('0x35')];}_0x5982bf['status'](_0x80dfc0)[_0x61db('0x36')](_0x8c277d);};}exports[_0x61db('0x37')]=function(_0x40a7be,_0x4ce18e){var _0x5838b1={},_0x51a3eb={},_0x14c09a={'count':0x0,'rows':[]};var _0x4d1956=_[_0x61db('0x38')](db['ChatMessage'][_0x61db('0x39')],function(_0x1a4cb9){return{'name':_0x1a4cb9[_0x61db('0x3a')],'type':_0x1a4cb9[_0x61db('0x3b')][_0x61db('0x3c')]};});_0x51a3eb[_0x61db('0x3d')]=_[_0x61db('0x38')](_0x4d1956,_0x61db('0x35'));_0x51a3eb[_0x61db('0x3e')]=_['keys'](_0x40a7be[_0x61db('0x3e')]);_0x51a3eb[_0x61db('0x3f')]=_[_0x61db('0x40')](_0x51a3eb[_0x61db('0x3d')],_0x51a3eb[_0x61db('0x3e')]);_0x5838b1[_0x61db('0x41')]=_[_0x61db('0x40')](_0x51a3eb[_0x61db('0x3d')],qs[_0x61db('0x42')](_0x40a7be[_0x61db('0x3e')][_0x61db('0x42')]));_0x5838b1[_0x61db('0x41')]=_0x5838b1[_0x61db('0x41')][_0x61db('0x43')]?_0x5838b1[_0x61db('0x41')]:_0x51a3eb['model'];if(!_0x40a7be['query'][_0x61db('0x44')](_0x61db('0x45'))){_0x5838b1[_0x61db('0x2d')]=qs[_0x61db('0x2d')](_0x40a7be[_0x61db('0x3e')][_0x61db('0x2d')]);_0x5838b1[_0x61db('0x2b')]=qs[_0x61db('0x2b')](_0x40a7be[_0x61db('0x3e')][_0x61db('0x2b')]);}_0x5838b1[_0x61db('0x46')]=qs[_0x61db('0x47')](_0x40a7be[_0x61db('0x3e')][_0x61db('0x47')]);_0x5838b1[_0x61db('0x48')]=qs[_0x61db('0x3f')](_[_0x61db('0x49')](_0x40a7be[_0x61db('0x3e')],_0x51a3eb[_0x61db('0x3f')]),_0x4d1956);if(_0x40a7be[_0x61db('0x3e')][_0x61db('0x4a')]){_0x5838b1[_0x61db('0x48')]=_[_0x61db('0x4b')](_0x5838b1['where'],{'$or':_[_0x61db('0x38')](_0x4d1956,function(_0x5a68d8){if(_0x5a68d8[_0x61db('0x3b')]!==_0x61db('0x4c')){var _0x5de244={};_0x5de244[_0x5a68d8[_0x61db('0x35')]]={'$like':'%'+_0x40a7be[_0x61db('0x3e')][_0x61db('0x4a')]+'%'};return _0x5de244;}})});}_0x5838b1=_[_0x61db('0x4b')]({},_0x5838b1,_0x40a7be[_0x61db('0x4d')]);var _0xb8b36a={'where':_0x5838b1[_0x61db('0x48')]};return db['ChatMessage'][_0x61db('0x2e')](_0xb8b36a)[_0x61db('0x1d')](function(_0x5859d0){_0x14c09a['count']=_0x5859d0;if(_0x40a7be[_0x61db('0x3e')][_0x61db('0x4e')]){_0x5838b1['include']=[{'all':!![]}];}return db['ChatMessage'][_0x61db('0x4f')](_0x5838b1);})[_0x61db('0x1d')](function(_0x20a2fe){_0x14c09a[_0x61db('0x50')]=_0x20a2fe;return _0x14c09a;})['then'](respondWithFilteredResult(_0x4ce18e,_0x5838b1))[_0x61db('0x26')](handleError(_0x4ce18e,null));};exports[_0x61db('0x51')]=function(_0x2512ff,_0x5a5429){var _0x3607a2={'raw':!![],'where':{'id':_0x2512ff['params']['id']}},_0x117ec3={};_0x117ec3[_0x61db('0x3d')]=_['keys'](db[_0x61db('0x52')][_0x61db('0x39')]);_0x117ec3[_0x61db('0x3e')]=_[_0x61db('0x53')](_0x2512ff[_0x61db('0x3e')]);_0x117ec3[_0x61db('0x3f')]=_[_0x61db('0x40')](_0x117ec3[_0x61db('0x3d')],_0x117ec3[_0x61db('0x3e')]);_0x3607a2['attributes']=_[_0x61db('0x40')](_0x117ec3[_0x61db('0x3d')],qs[_0x61db('0x42')](_0x2512ff[_0x61db('0x3e')][_0x61db('0x42')]));_0x3607a2['attributes']=_0x3607a2[_0x61db('0x41')][_0x61db('0x43')]?_0x3607a2[_0x61db('0x41')]:_0x117ec3[_0x61db('0x3d')];if(_0x2512ff[_0x61db('0x3e')][_0x61db('0x4e')]){_0x3607a2[_0x61db('0x54')]=[{'all':!![]}];}_0x3607a2=_['merge']({},_0x3607a2,_0x2512ff[_0x61db('0x4d')]);return db[_0x61db('0x52')][_0x61db('0x55')](_0x3607a2)[_0x61db('0x1d')](handleEntityNotFound(_0x5a5429,null))[_0x61db('0x1d')](respondWithResult(_0x5a5429,null))[_0x61db('0x26')](handleError(_0x5a5429,null));};exports[_0x61db('0x56')]=function(_0x13d0ee,_0x48ff21){return db[_0x61db('0x52')][_0x61db('0x56')](_0x13d0ee[_0x61db('0x57')],{})[_0x61db('0x1d')](respondWithResult(_0x48ff21,0xc9))['catch'](handleError(_0x48ff21,null));};exports[_0x61db('0x33')]=function(_0x596c0f,_0x32a4ce){if(_0x596c0f[_0x61db('0x57')]['id']){delete _0x596c0f[_0x61db('0x57')]['id'];}return db[_0x61db('0x52')][_0x61db('0x55')]({'where':{'id':_0x596c0f[_0x61db('0x58')]['id']}})[_0x61db('0x1d')](handleEntityNotFound(_0x32a4ce,null))[_0x61db('0x1d')](saveUpdates(_0x596c0f['body'],null))[_0x61db('0x1d')](respondWithResult(_0x32a4ce,null))['catch'](handleError(_0x32a4ce,null));};exports[_0x61db('0x59')]=function(_0x2bd801,_0x1f2097){return db[_0x61db('0x52')][_0x61db('0x55')]({'where':{'id':_0x2bd801[_0x61db('0x58')]['id']}})[_0x61db('0x1d')](handleEntityNotFound(_0x1f2097,null))['then'](removeEntity(_0x1f2097,null))['catch'](handleError(_0x1f2097,null));};exports['describe']=function(_0x659c8e,_0x4be5ab){return db[_0x61db('0x52')][_0x61db('0x5a')]()[_0x61db('0x1d')](respondWithResult(_0x4be5ab,null))[_0x61db('0x26')](handleError(_0x4be5ab,null));};var interaction_log=require('../../config/logger')(_0x61db('0x5b'));exports[_0x61db('0x5c')]=function(_0x229079,_0x1250f6,_0x21e575){var _0x547443={'agent':{},'channel':_0x61db('0x5d')};if(_0x229079[_0x61db('0x57')]['id']){delete _0x229079[_0x61db('0x57')]['id'];}_0x229079['body']['read']=!![];_0x229079[_0x61db('0x57')]['readAt']=moment()[_0x61db('0x5e')](_0x61db('0x5f'));_0x229079[_0x61db('0x57')]['UserId']=_0x229079[_0x61db('0x57')][_0x61db('0x60')]||_0x229079['user']['id'];_0x547443[_0x61db('0x61')]['id']=_0x229079[_0x61db('0x57')][_0x61db('0x60')];return db['ChatMessage'][_0x61db('0x55')]({'where':{'id':_0x229079['params']['id'],'UserId':null}})[_0x61db('0x1d')](handleEntityNotFound(_0x1250f6,null))['then'](saveUpdates(_0x229079[_0x61db('0x57')],null))['then'](function(_0x540e92){if(_0x540e92){_0x547443[_0x61db('0x24')]=_0x540e92[_0x61db('0x62')]({'plain':!![]});return db[_0x61db('0x63')][_0x61db('0x55')]({'where':{'id':_0x540e92[_0x61db('0x64')]}});}return null;})['then'](handleEntityNotFound(_0x1250f6,null))[_0x61db('0x1d')](function(_0x31fbc3){if(_0x31fbc3){return _0x31fbc3[_0x61db('0x33')]({'UserId':_0x229079[_0x61db('0x57')][_0x61db('0x60')],'read1stAt':_[_0x61db('0x65')](_0x31fbc3['read1stAt'])?moment()[_0x61db('0x5e')](_0x61db('0x5f')):undefined});}return null;})[_0x61db('0x1d')](function(_0x5d36ed){if(_0x5d36ed){_0x547443[_0x61db('0x66')]=_0x5d36ed['get']({'plain':!![]});interaction_log['info']('[CHATMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x229079['user']['id'],_0x229079[_0x61db('0x67')][_0x61db('0x35')],_0x229079[_0x61db('0x67')][_0x61db('0x68')],_0x547443[_0x61db('0x66')]['id'],_0x229079['body']?JSON[_0x61db('0x69')](_0x229079[_0x61db('0x57')]):_0x61db('0x6a'));return respondWithRpcPromise('AcceptMessage',_0x61db('0x6b'),_0x547443);}return null;})[_0x61db('0x1d')](function(_0x3787bb){var _0x194b4e=_0x61db('0x6c')+_0x3787bb[_0x61db('0x24')][_0x61db('0x6d')];return db[_0x61db('0x6e')][_0x61db('0x3e')](_0x194b4e,{'type':db[_0x61db('0x6f')][_0x61db('0x70')][_0x61db('0x71')],'raw':!![]})[_0x61db('0x1d')](function(_0x32e727){return _0x32e727;});})['then'](function(_0x211168){if(_0x211168){_0x547443[_0x61db('0x24')][_0x61db('0x72')]=_0x211168[0x0];if(!_0x229079['body'][_0x61db('0x60')])return;return db[_0x61db('0x73')]['find']({'where':{'id':_0x229079[_0x61db('0x57')][_0x61db('0x60')],'role':'agent'},'attributes':['id',_0x61db('0x35'),_0x61db('0x74'),_0x61db('0x75'),_0x61db('0x76')],'raw':!![]});}return null;})['then'](function(_0x59924a){if(!_0x59924a)return null;_0x547443[_0x61db('0x24')][_0x61db('0x61')]=_0x59924a;return _0x547443;})['then'](function(_0x27465d){if(_0x27465d){if(_0x229079[_0x61db('0x57')][_0x61db('0x77')]){_0x547443[_0x61db('0x24')][_0x61db('0x78')]=util[_0x61db('0x5e')](_0x61db('0x79'),_0x229079[_0x61db('0x67')]['name']);_0x547443[_0x61db('0x24')][_0x61db('0x7a')]=_0x547443['channel'];_0x547443[_0x61db('0x24')][_0x61db('0x7b')]=_0x547443[_0x61db('0x7a')];_0x547443['message'][_0x61db('0x7c')]=_0x61db('0x5c');return respondWithRpcPromise(_0x61db('0x7d'),_0x61db('0x7d'),{'event':'acceptmessage','message':_[_0x61db('0x4b')](_0x547443['message'],JSON[_0x61db('0x7e')](_0x547443[_0x61db('0x66')]['formData']))},client9002)[_0x61db('0x1d')](function(){return _0x547443;});}return _0x547443;}return null;})[_0x61db('0x1d')](respondWithResult(_0x1250f6,null))[_0x61db('0x26')](handleError(_0x1250f6,null));};var interaction_log=require(_0x61db('0x7f'))('chat-interactions');exports[_0x61db('0x31')]=function(_0x268f49,_0x197a8b,_0x363183){var _0x50394e={'agent':{},'channel':_0x61db('0x5d')};if(_0x268f49[_0x61db('0x57')]['id']){delete _0x268f49['body']['id'];}_0x268f49[_0x61db('0x57')][_0x61db('0x60')]=_0x268f49[_0x61db('0x57')][_0x61db('0x60')]||_0x268f49[_0x61db('0x67')]['id'];_0x50394e['agent']['id']=_0x268f49[_0x61db('0x57')][_0x61db('0x60')];return db[_0x61db('0x52')][_0x61db('0x55')]({'where':{'id':_0x268f49[_0x61db('0x58')]['id'],'UserId':null}})[_0x61db('0x1d')](handleEntityNotFound(_0x197a8b,null))['then'](function(_0x4ef2c3){if(_0x4ef2c3){_0x50394e['message']=_0x4ef2c3[_0x61db('0x62')]({'plain':!![]});return db['ChatInteraction'][_0x61db('0x55')]({'where':{'id':_0x4ef2c3['ChatInteractionId']}});}return null;})['then'](handleEntityNotFound(_0x197a8b,null))[_0x61db('0x1d')](function(_0x5062d9){if(_0x5062d9){_0x50394e[_0x61db('0x66')]=_0x5062d9[_0x61db('0x62')]({'plain':!![]});interaction_log[_0x61db('0x1e')]('[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x268f49['user']['id'],_0x268f49[_0x61db('0x67')][_0x61db('0x35')],_0x268f49[_0x61db('0x67')][_0x61db('0x68')],_0x50394e[_0x61db('0x66')]['id'],_0x268f49[_0x61db('0x57')]?JSON[_0x61db('0x69')](_0x268f49['body']):'null');return respondWithRpcPromise('RejectMessage',_0x61db('0x80'),_0x50394e);}return null;})['then'](function(_0x5e42f1){var _0x15ca1e=_0x61db('0x6c')+_0x5e42f1[_0x61db('0x24')][_0x61db('0x6d')];return db[_0x61db('0x6e')][_0x61db('0x3e')](_0x15ca1e,{'type':db['Sequelize'][_0x61db('0x70')]['SELECT'],'raw':!![]})[_0x61db('0x1d')](function(_0x3b32c2){return _0x3b32c2;});})['then'](function(_0x236fc3){if(_0x236fc3){_0x50394e['message'][_0x61db('0x72')]=_0x236fc3[0x0];if(!_0x268f49['body']['UserId'])return;return db[_0x61db('0x73')]['find']({'where':{'id':_0x268f49[_0x61db('0x57')][_0x61db('0x60')],'role':'agent'},'attributes':['id',_0x61db('0x35'),_0x61db('0x74'),'email','internal'],'raw':!![]});}return null;})[_0x61db('0x1d')](function(_0x385ac8){if(!_0x385ac8)return null;_0x50394e[_0x61db('0x24')]['agent']=_0x385ac8;return _0x50394e;})[_0x61db('0x1d')](function(_0x35223c){if(_0x35223c){_0x35223c[_0x61db('0x24')][_0x61db('0x78')]=util[_0x61db('0x5e')](_0x61db('0x79'),_0x268f49[_0x61db('0x67')][_0x61db('0x35')]);_0x35223c['message'][_0x61db('0x7a')]=_0x50394e['channel'];_0x35223c[_0x61db('0x24')][_0x61db('0x7b')]=_0x50394e[_0x61db('0x7a')];_0x35223c['message']['event']=_0x61db('0x31');respondWithRpcPromise('EventManager',_0x61db('0x7d'),{'event':_0x61db('0x81'),'message':_['merge'](_0x50394e[_0x61db('0x24')],JSON['parse'](_0x50394e[_0x61db('0x66')][_0x61db('0x82')]))},client9002);return _0x50394e;}return null;})[_0x61db('0x1d')](respondWithResult(_0x197a8b,null))['catch'](handleError(_0x197a8b,null));};
\ No newline at end of file
+var _0x0c3c=['offset','undefined','limit','count','set','apply','reject','update','destroy','stack','name','send','index','map','ChatMessage','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','type','VIRTUAL','merge','options','includeAll','include','findAll','show','params','find','create','body','describe','../../config/logger','accept','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','user','UserId','ChatInteraction','ChatInteractionId','read1stAt','interaction','get','[CHATMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','null','AcceptMessage','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','Sequelize','User','agent','email','internal','channel','event','EventManager','acceptmessage','parse','formData','chat-interactions','chat','[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','rejectMessage','ContactId','QueryTypes','SELECT','contact','fullname','interface','SIP/%s','motionChannel','rejectmessage','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','path','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','defaults','redis','localhost','socket.io-emitter','./chatMessage.socket','client','http','request','then','info','request\x20sent','debug','stringify','error','code','ChatMessage,\x20%s,\x20%s','message','result','catch','sendStatus','status','end','json'];(function(_0x3a2e28,_0x137ef6){var _0x2d378c=function(_0x130079){while(--_0x130079){_0x3a2e28['push'](_0x3a2e28['shift']());}};_0x2d378c(++_0x137ef6);}(_0x0c3c,0xdd));var _0xc0c3=function(_0x8fa4bc,_0x5cd2af){_0x8fa4bc=_0x8fa4bc-0x0;var _0x35b6a7=_0x0c3c[_0x8fa4bc];return _0x35b6a7;};'use strict';var emlformat=require(_0xc0c3('0x0'));var rimraf=require(_0xc0c3('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xc0c3('0x2'));var rp=require(_0xc0c3('0x3'));var moment=require('moment');var BPromise=require(_0xc0c3('0x4'));var Mustache=require(_0xc0c3('0x5'));var util=require('util');var path=require(_0xc0c3('0x6'));var sox=require(_0xc0c3('0x7'));var csv=require(_0xc0c3('0x8'));var ejs=require(_0xc0c3('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xc0c3('0xa'));var crypto=require(_0xc0c3('0xb'));var jsforce=require(_0xc0c3('0xc'));var deskjs=require(_0xc0c3('0xd'));var toCsv=require('to-csv');var querystring=require(_0xc0c3('0xe'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xc0c3('0xf'));var qs=require(_0xc0c3('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc0c3('0x11'));var logger=require('../../config/logger')(_0xc0c3('0x12'));var utils=require(_0xc0c3('0x13'));var config=require(_0xc0c3('0x14'));var licenseUtil=require(_0xc0c3('0x15'));var db=require('../../mysqldb')['db'];config['redis']=_[_0xc0c3('0x16')](config[_0xc0c3('0x17')],{'host':_0xc0c3('0x18'),'port':0x18eb});var socket=require(_0xc0c3('0x19'))(new Redis(config[_0xc0c3('0x17')]));require(_0xc0c3('0x1a'))['register'](socket);var jayson=require('jayson/promise');var client=jayson[_0xc0c3('0x1b')][_0xc0c3('0x1c')]({'port':0x232c});var client9002=jayson[_0xc0c3('0x1b')][_0xc0c3('0x1c')]({'port':0x232a});function respondWithRpcPromise(_0x3294dd,_0x42ff68,_0x4eb32d,_0x191316){return new BPromise(function(_0xac3572,_0x1061c4){var _0x21d24d=_0x191316||client;return _0x21d24d[_0xc0c3('0x1d')](_0x3294dd,_0x4eb32d)[_0xc0c3('0x1e')](function(_0x5a961a){logger[_0xc0c3('0x1f')]('ChatMessage,\x20%s,\x20%s',_0x42ff68,_0xc0c3('0x20'));logger[_0xc0c3('0x21')]('ChatMessage,\x20%s,\x20%s,\x20%s',_0x42ff68,'request\x20sent',JSON[_0xc0c3('0x22')](_0x5a961a));if(_0x5a961a[_0xc0c3('0x23')]){if(_0x5a961a[_0xc0c3('0x23')][_0xc0c3('0x24')]===0x1f4){logger['error'](_0xc0c3('0x25'),_0x42ff68,_0x5a961a[_0xc0c3('0x23')][_0xc0c3('0x26')]);return _0x1061c4(_0x5a961a['error'][_0xc0c3('0x26')]);}logger[_0xc0c3('0x23')]('ChatMessage,\x20%s,\x20%s',_0x42ff68,_0x5a961a['error']['message']);return _0xac3572(_0x5a961a[_0xc0c3('0x23')][_0xc0c3('0x26')]);}else{logger['info'](_0xc0c3('0x25'),_0x42ff68,_0xc0c3('0x20'));_0xac3572(_0x5a961a[_0xc0c3('0x27')][_0xc0c3('0x26')]);}})[_0xc0c3('0x28')](function(_0x5ee9e3){logger[_0xc0c3('0x23')]('ChatMessage,\x20%s,\x20%s',_0x42ff68,_0x5ee9e3);_0x1061c4(_0x5ee9e3);});});}function respondWithStatusCode(_0x312c80,_0x25174a){_0x25174a=_0x25174a||0xcc;return function(_0x38583b){if(_0x38583b){return _0x312c80[_0xc0c3('0x29')](_0x25174a);}return _0x312c80[_0xc0c3('0x2a')](_0x25174a)[_0xc0c3('0x2b')]();};}function respondWithResult(_0x3a4c0c,_0x5d412b){_0x5d412b=_0x5d412b||0xc8;return function(_0x4d82dc){if(_0x4d82dc){return _0x3a4c0c['status'](_0x5d412b)[_0xc0c3('0x2c')](_0x4d82dc);}};}function respondWithFilteredResult(_0x358e03,_0x5af9ff){return function(_0x3e36e0){if(_0x3e36e0){var _0x2c2575=typeof _0x5af9ff[_0xc0c3('0x2d')]===_0xc0c3('0x2e')&&typeof _0x5af9ff[_0xc0c3('0x2f')]===_0xc0c3('0x2e');var _0x24e4d7=_0x3e36e0['count'];var _0x2eb570=_0x2c2575?0x0:_0x5af9ff[_0xc0c3('0x2d')];var _0x28dcb6=_0x2c2575?_0x3e36e0[_0xc0c3('0x30')]:_0x5af9ff['offset']+_0x5af9ff[_0xc0c3('0x2f')];var _0x422ac8;if(_0x28dcb6>=_0x24e4d7){_0x28dcb6=_0x24e4d7;_0x422ac8=0xc8;}else{_0x422ac8=0xce;}_0x358e03[_0xc0c3('0x2a')](_0x422ac8);return _0x358e03[_0xc0c3('0x31')]('Content-Range',_0x2eb570+'-'+_0x28dcb6+'/'+_0x24e4d7)['json'](_0x3e36e0);}return null;};}function patchUpdates(_0x333116){return function(_0xc18c90){try{jsonpatch[_0xc0c3('0x32')](_0xc18c90,_0x333116,!![]);}catch(_0x359856){return BPromise[_0xc0c3('0x33')](_0x359856);}return _0xc18c90['save']();};}function saveUpdates(_0x2a7f3c,_0x1d09b3){return function(_0x3f99f8){if(_0x3f99f8){return _0x3f99f8[_0xc0c3('0x34')](_0x2a7f3c)['then'](function(_0x5c423d){return _0x5c423d;});}return null;};}function removeEntity(_0x313c8a,_0x31d449){return function(_0x51ad3e){if(_0x51ad3e){return _0x51ad3e[_0xc0c3('0x35')]()[_0xc0c3('0x1e')](function(){_0x313c8a[_0xc0c3('0x2a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2e71a2,_0x3f24c2){return function(_0x52b1d7){if(!_0x52b1d7){_0x2e71a2['sendStatus'](0x194);}return _0x52b1d7;};}function handleError(_0x1a4e53,_0xe2b996){_0xe2b996=_0xe2b996||0x1f4;return function(_0x92d9c4){logger['error'](_0x92d9c4[_0xc0c3('0x36')]);if(_0x92d9c4[_0xc0c3('0x37')]){delete _0x92d9c4[_0xc0c3('0x37')];}_0x1a4e53[_0xc0c3('0x2a')](_0xe2b996)[_0xc0c3('0x38')](_0x92d9c4);};}exports[_0xc0c3('0x39')]=function(_0x183fb2,_0x2dfcaf){var _0x2206be={},_0x1a1f04={},_0x970d0a={'count':0x0,'rows':[]};var _0x151c3d=_[_0xc0c3('0x3a')](db[_0xc0c3('0x3b')][_0xc0c3('0x3c')],function(_0x5e025d){return{'name':_0x5e025d[_0xc0c3('0x3d')],'type':_0x5e025d['type'][_0xc0c3('0x3e')]};});_0x1a1f04[_0xc0c3('0x3f')]=_[_0xc0c3('0x3a')](_0x151c3d,'name');_0x1a1f04[_0xc0c3('0x40')]=_[_0xc0c3('0x41')](_0x183fb2['query']);_0x1a1f04[_0xc0c3('0x42')]=_[_0xc0c3('0x43')](_0x1a1f04[_0xc0c3('0x3f')],_0x1a1f04[_0xc0c3('0x40')]);_0x2206be[_0xc0c3('0x44')]=_['intersection'](_0x1a1f04[_0xc0c3('0x3f')],qs['fields'](_0x183fb2['query'][_0xc0c3('0x45')]));_0x2206be[_0xc0c3('0x44')]=_0x2206be[_0xc0c3('0x44')][_0xc0c3('0x46')]?_0x2206be[_0xc0c3('0x44')]:_0x1a1f04[_0xc0c3('0x3f')];if(!_0x183fb2[_0xc0c3('0x40')][_0xc0c3('0x47')]('nolimit')){_0x2206be[_0xc0c3('0x2f')]=qs[_0xc0c3('0x2f')](_0x183fb2[_0xc0c3('0x40')]['limit']);_0x2206be['offset']=qs[_0xc0c3('0x2d')](_0x183fb2['query']['offset']);}_0x2206be[_0xc0c3('0x48')]=qs[_0xc0c3('0x49')](_0x183fb2[_0xc0c3('0x40')][_0xc0c3('0x49')]);_0x2206be[_0xc0c3('0x4a')]=qs[_0xc0c3('0x42')](_[_0xc0c3('0x4b')](_0x183fb2[_0xc0c3('0x40')],_0x1a1f04[_0xc0c3('0x42')]),_0x151c3d);if(_0x183fb2['query'][_0xc0c3('0x4c')]){_0x2206be['where']=_['merge'](_0x2206be[_0xc0c3('0x4a')],{'$or':_['map'](_0x151c3d,function(_0x52d469){if(_0x52d469[_0xc0c3('0x4d')]!==_0xc0c3('0x4e')){var _0x4ef923={};_0x4ef923[_0x52d469[_0xc0c3('0x37')]]={'$like':'%'+_0x183fb2[_0xc0c3('0x40')][_0xc0c3('0x4c')]+'%'};return _0x4ef923;}})});}_0x2206be=_[_0xc0c3('0x4f')]({},_0x2206be,_0x183fb2[_0xc0c3('0x50')]);var _0x4d060c={'where':_0x2206be['where']};return db[_0xc0c3('0x3b')][_0xc0c3('0x30')](_0x4d060c)['then'](function(_0x3f2796){_0x970d0a[_0xc0c3('0x30')]=_0x3f2796;if(_0x183fb2[_0xc0c3('0x40')][_0xc0c3('0x51')]){_0x2206be[_0xc0c3('0x52')]=[{'all':!![]}];}return db[_0xc0c3('0x3b')][_0xc0c3('0x53')](_0x2206be);})[_0xc0c3('0x1e')](function(_0x4f5126){_0x970d0a['rows']=_0x4f5126;return _0x970d0a;})[_0xc0c3('0x1e')](respondWithFilteredResult(_0x2dfcaf,_0x2206be))[_0xc0c3('0x28')](handleError(_0x2dfcaf,null));};exports[_0xc0c3('0x54')]=function(_0x156270,_0x14295e){var _0x8974ca={'raw':!![],'where':{'id':_0x156270[_0xc0c3('0x55')]['id']}},_0x8a904b={};_0x8a904b['model']=_[_0xc0c3('0x41')](db[_0xc0c3('0x3b')]['rawAttributes']);_0x8a904b[_0xc0c3('0x40')]=_[_0xc0c3('0x41')](_0x156270[_0xc0c3('0x40')]);_0x8a904b['filters']=_[_0xc0c3('0x43')](_0x8a904b[_0xc0c3('0x3f')],_0x8a904b['query']);_0x8974ca['attributes']=_[_0xc0c3('0x43')](_0x8a904b[_0xc0c3('0x3f')],qs[_0xc0c3('0x45')](_0x156270[_0xc0c3('0x40')]['fields']));_0x8974ca['attributes']=_0x8974ca[_0xc0c3('0x44')][_0xc0c3('0x46')]?_0x8974ca['attributes']:_0x8a904b['model'];if(_0x156270[_0xc0c3('0x40')]['includeAll']){_0x8974ca[_0xc0c3('0x52')]=[{'all':!![]}];}_0x8974ca=_[_0xc0c3('0x4f')]({},_0x8974ca,_0x156270[_0xc0c3('0x50')]);return db[_0xc0c3('0x3b')][_0xc0c3('0x56')](_0x8974ca)['then'](handleEntityNotFound(_0x14295e,null))[_0xc0c3('0x1e')](respondWithResult(_0x14295e,null))[_0xc0c3('0x28')](handleError(_0x14295e,null));};exports['create']=function(_0x382a46,_0x799041){return db[_0xc0c3('0x3b')][_0xc0c3('0x57')](_0x382a46[_0xc0c3('0x58')],{})[_0xc0c3('0x1e')](respondWithResult(_0x799041,0xc9))[_0xc0c3('0x28')](handleError(_0x799041,null));};exports[_0xc0c3('0x34')]=function(_0x2f6c0f,_0x4f1d7d){if(_0x2f6c0f[_0xc0c3('0x58')]['id']){delete _0x2f6c0f[_0xc0c3('0x58')]['id'];}return db['ChatMessage']['find']({'where':{'id':_0x2f6c0f['params']['id']}})[_0xc0c3('0x1e')](handleEntityNotFound(_0x4f1d7d,null))['then'](saveUpdates(_0x2f6c0f['body'],null))['then'](respondWithResult(_0x4f1d7d,null))[_0xc0c3('0x28')](handleError(_0x4f1d7d,null));};exports[_0xc0c3('0x35')]=function(_0x55073a,_0xa3dcd1){return db[_0xc0c3('0x3b')][_0xc0c3('0x56')]({'where':{'id':_0x55073a[_0xc0c3('0x55')]['id']}})[_0xc0c3('0x1e')](handleEntityNotFound(_0xa3dcd1,null))[_0xc0c3('0x1e')](removeEntity(_0xa3dcd1,null))[_0xc0c3('0x28')](handleError(_0xa3dcd1,null));};exports[_0xc0c3('0x59')]=function(_0x339b87,_0x26a138){return db[_0xc0c3('0x3b')]['describe']()[_0xc0c3('0x1e')](respondWithResult(_0x26a138,null))[_0xc0c3('0x28')](handleError(_0x26a138,null));};var interaction_log=require(_0xc0c3('0x5a'))('chat-interactions');exports[_0xc0c3('0x5b')]=function(_0x1ae522,_0x4418be,_0x107914){var _0x28a0f0={'agent':{},'channel':'chat'};if(_0x1ae522['body']['id']){delete _0x1ae522[_0xc0c3('0x58')]['id'];}_0x1ae522[_0xc0c3('0x58')][_0xc0c3('0x5c')]=!![];_0x1ae522[_0xc0c3('0x58')][_0xc0c3('0x5d')]=moment()[_0xc0c3('0x5e')](_0xc0c3('0x5f'));_0x1ae522[_0xc0c3('0x58')]['UserId']=_0x1ae522[_0xc0c3('0x58')]['UserId']||_0x1ae522[_0xc0c3('0x60')]['id'];_0x28a0f0['agent']['id']=_0x1ae522[_0xc0c3('0x58')][_0xc0c3('0x61')];return db[_0xc0c3('0x3b')]['find']({'where':{'id':_0x1ae522['params']['id'],'UserId':null}})['then'](handleEntityNotFound(_0x4418be,null))[_0xc0c3('0x1e')](saveUpdates(_0x1ae522[_0xc0c3('0x58')],null))[_0xc0c3('0x1e')](function(_0x45301e){if(_0x45301e){_0x28a0f0[_0xc0c3('0x26')]=_0x45301e['get']({'plain':!![]});return db[_0xc0c3('0x62')][_0xc0c3('0x56')]({'where':{'id':_0x45301e[_0xc0c3('0x63')]}});}return null;})['then'](handleEntityNotFound(_0x4418be,null))['then'](function(_0x26d8a9){if(_0x26d8a9){return _0x26d8a9[_0xc0c3('0x34')]({'UserId':_0x1ae522['body'][_0xc0c3('0x61')],'read1stAt':_['isNil'](_0x26d8a9[_0xc0c3('0x64')])?moment()[_0xc0c3('0x5e')](_0xc0c3('0x5f')):undefined});}return null;})[_0xc0c3('0x1e')](function(_0x190f3f){if(_0x190f3f){_0x28a0f0[_0xc0c3('0x65')]=_0x190f3f[_0xc0c3('0x66')]({'plain':!![]});interaction_log[_0xc0c3('0x1f')](_0xc0c3('0x67'),_0x1ae522['user']['id'],_0x1ae522[_0xc0c3('0x60')][_0xc0c3('0x37')],_0x1ae522[_0xc0c3('0x60')]['role'],_0x28a0f0[_0xc0c3('0x65')]['id'],_0x1ae522['body']?JSON['stringify'](_0x1ae522[_0xc0c3('0x58')]):_0xc0c3('0x68'));return respondWithRpcPromise(_0xc0c3('0x69'),_0xc0c3('0x6a'),_0x28a0f0);}return null;})[_0xc0c3('0x1e')](function(_0x3b0fae){var _0x511ba3=_0xc0c3('0x6b')+_0x3b0fae['message']['ContactId'];return db['sequelize'][_0xc0c3('0x40')](_0x511ba3,{'type':db[_0xc0c3('0x6c')]['QueryTypes']['SELECT'],'raw':!![]})[_0xc0c3('0x1e')](function(_0x278b95){return _0x278b95;});})[_0xc0c3('0x1e')](function(_0x56accd){if(_0x56accd){_0x28a0f0[_0xc0c3('0x26')]['contact']=_0x56accd[0x0];if(!_0x1ae522['body'][_0xc0c3('0x61')])return;return db[_0xc0c3('0x6d')][_0xc0c3('0x56')]({'where':{'id':_0x1ae522[_0xc0c3('0x58')][_0xc0c3('0x61')],'role':_0xc0c3('0x6e')},'attributes':['id',_0xc0c3('0x37'),'fullname',_0xc0c3('0x6f'),_0xc0c3('0x70')],'raw':!![]});}return null;})[_0xc0c3('0x1e')](function(_0x12c936){if(!_0x12c936)return null;_0x28a0f0[_0xc0c3('0x26')][_0xc0c3('0x6e')]=_0x12c936;return _0x28a0f0;})[_0xc0c3('0x1e')](function(_0x23fe08){if(_0x23fe08){if(_0x1ae522[_0xc0c3('0x58')]['manual']){_0x28a0f0['message']['interface']=util[_0xc0c3('0x5e')]('SIP/%s',_0x1ae522[_0xc0c3('0x60')][_0xc0c3('0x37')]);_0x28a0f0[_0xc0c3('0x26')][_0xc0c3('0x71')]=_0x28a0f0[_0xc0c3('0x71')];_0x28a0f0[_0xc0c3('0x26')]['motionChannel']=_0x28a0f0[_0xc0c3('0x71')];_0x28a0f0['message'][_0xc0c3('0x72')]=_0xc0c3('0x5b');return respondWithRpcPromise(_0xc0c3('0x73'),_0xc0c3('0x73'),{'event':_0xc0c3('0x74'),'message':_[_0xc0c3('0x4f')](_0x28a0f0['message'],JSON[_0xc0c3('0x75')](_0x28a0f0[_0xc0c3('0x65')][_0xc0c3('0x76')]))},client9002)[_0xc0c3('0x1e')](function(){return _0x28a0f0;});}return _0x28a0f0;}return null;})[_0xc0c3('0x1e')](respondWithResult(_0x4418be,null))['catch'](handleError(_0x4418be,null));};var interaction_log=require(_0xc0c3('0x5a'))(_0xc0c3('0x77'));exports[_0xc0c3('0x33')]=function(_0x4913c7,_0x3640d2,_0x1e513d){var _0x44b57f={'agent':{},'channel':_0xc0c3('0x78')};if(_0x4913c7[_0xc0c3('0x58')]['id']){delete _0x4913c7['body']['id'];}_0x4913c7[_0xc0c3('0x58')]['UserId']=_0x4913c7['body']['UserId']||_0x4913c7['user']['id'];_0x44b57f[_0xc0c3('0x6e')]['id']=_0x4913c7[_0xc0c3('0x58')][_0xc0c3('0x61')];return db['ChatMessage'][_0xc0c3('0x56')]({'where':{'id':_0x4913c7[_0xc0c3('0x55')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x3640d2,null))[_0xc0c3('0x1e')](function(_0x2db76d){if(_0x2db76d){_0x44b57f[_0xc0c3('0x26')]=_0x2db76d[_0xc0c3('0x66')]({'plain':!![]});return db[_0xc0c3('0x62')][_0xc0c3('0x56')]({'where':{'id':_0x2db76d[_0xc0c3('0x63')]}});}return null;})[_0xc0c3('0x1e')](handleEntityNotFound(_0x3640d2,null))[_0xc0c3('0x1e')](function(_0x1ea2cc){if(_0x1ea2cc){_0x44b57f[_0xc0c3('0x65')]=_0x1ea2cc[_0xc0c3('0x66')]({'plain':!![]});interaction_log[_0xc0c3('0x1f')](_0xc0c3('0x79'),_0x4913c7[_0xc0c3('0x60')]['id'],_0x4913c7[_0xc0c3('0x60')][_0xc0c3('0x37')],_0x4913c7[_0xc0c3('0x60')][_0xc0c3('0x7a')],_0x44b57f[_0xc0c3('0x65')]['id'],_0x4913c7[_0xc0c3('0x58')]?JSON[_0xc0c3('0x22')](_0x4913c7[_0xc0c3('0x58')]):'null');return respondWithRpcPromise('RejectMessage',_0xc0c3('0x7b'),_0x44b57f);}return null;})[_0xc0c3('0x1e')](function(_0xed26eb){var _0x428c65=_0xc0c3('0x6b')+_0xed26eb[_0xc0c3('0x26')][_0xc0c3('0x7c')];return db['sequelize']['query'](_0x428c65,{'type':db['Sequelize'][_0xc0c3('0x7d')][_0xc0c3('0x7e')],'raw':!![]})[_0xc0c3('0x1e')](function(_0x4860b2){return _0x4860b2;});})['then'](function(_0x3ba500){if(_0x3ba500){_0x44b57f[_0xc0c3('0x26')][_0xc0c3('0x7f')]=_0x3ba500[0x0];if(!_0x4913c7[_0xc0c3('0x58')][_0xc0c3('0x61')])return;return db[_0xc0c3('0x6d')]['find']({'where':{'id':_0x4913c7[_0xc0c3('0x58')][_0xc0c3('0x61')],'role':_0xc0c3('0x6e')},'attributes':['id',_0xc0c3('0x37'),_0xc0c3('0x80'),_0xc0c3('0x6f'),_0xc0c3('0x70')],'raw':!![]});}return null;})[_0xc0c3('0x1e')](function(_0x1e98ef){if(!_0x1e98ef)return null;_0x44b57f['message'][_0xc0c3('0x6e')]=_0x1e98ef;return _0x44b57f;})['then'](function(_0x2f2409){if(_0x2f2409){_0x2f2409['message'][_0xc0c3('0x81')]=util['format'](_0xc0c3('0x82'),_0x4913c7[_0xc0c3('0x60')][_0xc0c3('0x37')]);_0x2f2409[_0xc0c3('0x26')]['channel']=_0x44b57f['channel'];_0x2f2409[_0xc0c3('0x26')][_0xc0c3('0x83')]=_0x44b57f[_0xc0c3('0x71')];_0x2f2409[_0xc0c3('0x26')][_0xc0c3('0x72')]='reject';respondWithRpcPromise(_0xc0c3('0x73'),_0xc0c3('0x73'),{'event':_0xc0c3('0x84'),'message':_[_0xc0c3('0x4f')](_0x44b57f['message'],JSON[_0xc0c3('0x75')](_0x44b57f['interaction'][_0xc0c3('0x76')]))},client9002);return _0x44b57f;}return null;})['then'](respondWithResult(_0x3640d2,null))[_0xc0c3('0x28')](handleError(_0x3640d2,null));};
\ No newline at end of file
index f381ce8..dafd405 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc9ed=['ChatMessage','setMaxListeners','save','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x2f916e,_0x11011d){var _0x3eb589=function(_0x596c42){while(--_0x596c42){_0x2f916e['push'](_0x2f916e['shift']());}};_0x3eb589(++_0x11011d);}(_0xc9ed,0x134));var _0xdc9e=function(_0x308374,_0x550e85){_0x308374=_0x308374-0x0;var _0x1f71e0=_0xc9ed[_0x308374];return _0x1f71e0;};'use strict';var EventEmitter=require(_0xdc9e('0x0'));var ChatMessage=require(_0xdc9e('0x1'))['db'][_0xdc9e('0x2')];var ChatMessageEvents=new EventEmitter();ChatMessageEvents[_0xdc9e('0x3')](0x0);var events={'afterCreate':_0xdc9e('0x4'),'afterUpdate':'update','afterDestroy':_0xdc9e('0x5')};function emitEvent(_0x580354){return function(_0x5ce9c2,_0x4a44fa,_0xfc33f9){ChatMessageEvents[_0xdc9e('0x6')](_0x580354+':'+_0x5ce9c2['id'],_0x5ce9c2);ChatMessageEvents[_0xdc9e('0x6')](_0x580354,_0x5ce9c2);_0xfc33f9(null);};}for(var e in events){if(events[_0xdc9e('0x7')](e)){var event=events[e];ChatMessage[_0xdc9e('0x8')](e,emitEvent(event));}}module[_0xdc9e('0x9')]=ChatMessageEvents;
\ No newline at end of file
+var _0x5566=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x169e53,_0x46be55){var _0x252bb3=function(_0x521e7a){while(--_0x521e7a){_0x169e53['push'](_0x169e53['shift']());}};_0x252bb3(++_0x46be55);}(_0x5566,0x1c0));var _0x6556=function(_0x18f4d3,_0x4f77fe){_0x18f4d3=_0x18f4d3-0x0;var _0x447644=_0x5566[_0x18f4d3];return _0x447644;};'use strict';var EventEmitter=require(_0x6556('0x0'));var ChatMessage=require(_0x6556('0x1'))['db']['ChatMessage'];var ChatMessageEvents=new EventEmitter();ChatMessageEvents[_0x6556('0x2')](0x0);var events={'afterCreate':_0x6556('0x3'),'afterUpdate':_0x6556('0x4'),'afterDestroy':_0x6556('0x5')};function emitEvent(_0x3db240){return function(_0x1017ea,_0x534f2a,_0x3fb926){ChatMessageEvents[_0x6556('0x6')](_0x3db240+':'+_0x1017ea['id'],_0x1017ea);ChatMessageEvents[_0x6556('0x6')](_0x3db240,_0x1017ea);_0x3fb926(null);};}for(var e in events){if(events[_0x6556('0x7')](e)){var event=events[e];ChatMessage[_0x6556('0x8')](e,emitEvent(event));}}module[_0x6556('0x9')]=ChatMessageEvents;
\ No newline at end of file
index 223966f..d3b0779 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x95d9=['ChatInteractionId','then','update','error','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','bluebird','request-promise','path','../../config/environment','./chatMessage.attributes','exports','ChatMessage','chat_messages','fti_chat_messages','body','FULLTEXT','models','direction','toLowerCase','out','secret','isNil','ChatInteraction','findOne'];(function(_0x746dd1,_0x234140){var _0x4d567d=function(_0x40f432){while(--_0x40f432){_0x746dd1['push'](_0x746dd1['shift']());}};_0x4d567d(++_0x234140);}(_0x95d9,0x97));var _0x995d=function(_0x2faddb,_0xc18b78){_0x2faddb=_0x2faddb-0x0;var _0x273c05=_0x95d9[_0x2faddb];return _0x273c05;};'use strict';var _=require(_0x995d('0x0'));var util=require(_0x995d('0x1'));var logger=require(_0x995d('0x2'))(_0x995d('0x3'));var moment=require('moment');var BPromise=require(_0x995d('0x4'));var rp=require(_0x995d('0x5'));var fs=require('fs');var path=require(_0x995d('0x6'));var rimraf=require('rimraf');var config=require(_0x995d('0x7'));var attributes=require(_0x995d('0x8'));module[_0x995d('0x9')]=function(_0x226250,_0xe6d244){return _0x226250['define'](_0x995d('0xa'),attributes,{'tableName':_0x995d('0xb'),'paranoid':![],'indexes':[{'name':_0x995d('0xc'),'fields':[_0x995d('0xd')],'type':_0x995d('0xe')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x2590fb,_0x48a692,_0x1c9cde){var _0xb39b30=_0x226250[_0x995d('0xf')];var _0x53f102=_0x2590fb['get']({'plain':!![]});if(_0x53f102['direction']['toLowerCase']()==='in'||_0x53f102[_0x995d('0x10')][_0x995d('0x11')]()===_0x995d('0x12')&&!_0x53f102[_0x995d('0x13')]&&!_[_0x995d('0x14')](_0x53f102['UserId'])){_0xb39b30[_0x995d('0x15')][_0x995d('0x16')]({'where':{'id':_0x53f102[_0x995d('0x17')]}})[_0x995d('0x18')](function(_0x543a98){if(_0x543a98){_0x543a98[_0x995d('0x19')]({'lastMsgAt':_0x53f102['createdAt'],'lastMsgDirection':_0x53f102[_0x995d('0x10')]['toLowerCase']()});}})['catch'](function(_0x7f4e07){console[_0x995d('0x1a')](_0x7f4e07);});}_0x1c9cde();}},'charset':_0x995d('0x1b'),'collate':_0x995d('0x1c')});};
\ No newline at end of file
+var _0x7bfa=['./chatMessage.attributes','exports','define','ChatMessage','chat_messages','FULLTEXT','models','direction','toLowerCase','out','secret','isNil','UserId','ChatInteraction','ChatInteractionId','then','update','createdAt','utf8mb4','utf8mb4_unicode_ci','lodash','api','moment','request-promise','path','rimraf','../../config/environment'];(function(_0x1a8385,_0x2be4bc){var _0x125b1d=function(_0x40cc77){while(--_0x40cc77){_0x1a8385['push'](_0x1a8385['shift']());}};_0x125b1d(++_0x2be4bc);}(_0x7bfa,0x173));var _0xa7bf=function(_0x2abc3d,_0x48edca){_0x2abc3d=_0x2abc3d-0x0;var _0x252745=_0x7bfa[_0x2abc3d];return _0x252745;};'use strict';var _=require(_0xa7bf('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xa7bf('0x1'));var moment=require(_0xa7bf('0x2'));var BPromise=require('bluebird');var rp=require(_0xa7bf('0x3'));var fs=require('fs');var path=require(_0xa7bf('0x4'));var rimraf=require(_0xa7bf('0x5'));var config=require(_0xa7bf('0x6'));var attributes=require(_0xa7bf('0x7'));module[_0xa7bf('0x8')]=function(_0x10c016,_0x36b622){return _0x10c016[_0xa7bf('0x9')](_0xa7bf('0xa'),attributes,{'tableName':_0xa7bf('0xb'),'paranoid':![],'indexes':[{'name':'fti_chat_messages','fields':['body'],'type':_0xa7bf('0xc')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x40636e,_0x1475ca,_0x184f7d){var _0x341f8e=_0x10c016[_0xa7bf('0xd')];var _0x2f72c3=_0x40636e['get']({'plain':!![]});if(_0x2f72c3[_0xa7bf('0xe')][_0xa7bf('0xf')]()==='in'||_0x2f72c3['direction'][_0xa7bf('0xf')]()===_0xa7bf('0x10')&&!_0x2f72c3[_0xa7bf('0x11')]&&!_[_0xa7bf('0x12')](_0x2f72c3[_0xa7bf('0x13')])){_0x341f8e[_0xa7bf('0x14')]['findOne']({'where':{'id':_0x2f72c3[_0xa7bf('0x15')]}})[_0xa7bf('0x16')](function(_0x4d4274){if(_0x4d4274){_0x4d4274[_0xa7bf('0x17')]({'lastMsgAt':_0x2f72c3[_0xa7bf('0x18')],'lastMsgDirection':_0x2f72c3[_0xa7bf('0xe')][_0xa7bf('0xf')]()});}})['catch'](function(_0x111178){console['error'](_0x111178);});}_0x184f7d();}},'charset':_0xa7bf('0x19'),'collate':_0xa7bf('0x1a')});};
\ No newline at end of file
index 80c6963..8e5eca2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb442=['debug','ChatMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','CreateChatMessage','ChatMessage','body','options','raw','then','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/environment','client','redis','localhost','./chatMessage.socket','register','info','ChatMessage,\x20%s,\x20%s','request\x20sent'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xb442,0x7d));var _0x2b44=function(_0x522951,_0x2b6511){_0x522951=_0x522951-0x0;var _0x390bbb=_0xb442[_0x522951];return _0x390bbb;};'use strict';var _=require('lodash');var util=require(_0x2b44('0x0'));var moment=require(_0x2b44('0x1'));var BPromise=require(_0x2b44('0x2'));var rs=require(_0x2b44('0x3'));var fs=require('fs');var Redis=require(_0x2b44('0x4'));var db=require(_0x2b44('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x2b44('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x2b44('0x7')]['http']({'port':0x232a});config['redis']=_['defaults'](config[_0x2b44('0x8')],{'host':_0x2b44('0x9'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x2b44('0x8')]));require(_0x2b44('0xa'))[_0x2b44('0xb')](socket);function respondWithRpcPromise(_0x5f305f,_0x353797,_0x255210){return new BPromise(function(_0x1d382f,_0x5b49be){return client['request'](_0x5f305f,_0x255210)['then'](function(_0x29e628){logger[_0x2b44('0xc')](_0x2b44('0xd'),_0x353797,_0x2b44('0xe'));logger[_0x2b44('0xf')](_0x2b44('0x10'),_0x353797,_0x2b44('0xe'),JSON[_0x2b44('0x11')](_0x29e628));if(_0x29e628['error']){if(_0x29e628[_0x2b44('0x12')][_0x2b44('0x13')]===0x1f4){logger['error']('ChatMessage,\x20%s,\x20%s',_0x353797,_0x29e628[_0x2b44('0x12')]['message']);return _0x5b49be(_0x29e628[_0x2b44('0x12')][_0x2b44('0x14')]);}logger[_0x2b44('0x12')]('ChatMessage,\x20%s,\x20%s',_0x353797,_0x29e628['error']['message']);return _0x1d382f(_0x29e628[_0x2b44('0x12')][_0x2b44('0x14')]);}else{logger[_0x2b44('0xc')](_0x2b44('0xd'),_0x353797,_0x2b44('0xe'));_0x1d382f(_0x29e628['result'][_0x2b44('0x14')]);}})['catch'](function(_0x44dfc5){logger[_0x2b44('0x12')]('ChatMessage,\x20%s,\x20%s',_0x353797,_0x44dfc5);_0x5b49be(_0x44dfc5);});});}exports[_0x2b44('0x15')]=function(_0xaf8cc3){var _0x42c97c=this;return new Promise(function(_0xf488f6,_0x110c6e){return db[_0x2b44('0x16')]['create'](_0xaf8cc3[_0x2b44('0x17')],{'raw':_0xaf8cc3[_0x2b44('0x18')]?_0xaf8cc3['options'][_0x2b44('0x19')]===undefined?!![]:![]:!![]})[_0x2b44('0x1a')](function(_0x160e50){logger[_0x2b44('0xc')]('CreateChatMessage',_0xaf8cc3);logger[_0x2b44('0xf')]('CreateChatMessage',_0xaf8cc3,JSON[_0x2b44('0x11')](_0x160e50));_0xf488f6(_0x160e50);})[_0x2b44('0x1b')](function(_0x4a0718){logger[_0x2b44('0x12')](_0x2b44('0x15'),_0x4a0718[_0x2b44('0x14')],_0xaf8cc3);_0x110c6e(_0x42c97c['error'](0x1f4,_0x4a0718[_0x2b44('0x14')]));});});};
\ No newline at end of file
+var _0x4db1=['then','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./chatMessage.socket','register','request','ChatMessage,\x20%s,\x20%s','request\x20sent','ChatMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','CreateChatMessage','ChatMessage','create','options','raw'];(function(_0xedbbb7,_0x5c6217){var _0x1302fa=function(_0x5f4daa){while(--_0x5f4daa){_0xedbbb7['push'](_0xedbbb7['shift']());}};_0x1302fa(++_0x5c6217);}(_0x4db1,0xa6));var _0x14db=function(_0x386c3e,_0x44a375){_0x386c3e=_0x386c3e-0x0;var _0x4b8e13=_0x4db1[_0x386c3e];return _0x4b8e13;};'use strict';var _=require(_0x14db('0x0'));var util=require(_0x14db('0x1'));var moment=require(_0x14db('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x14db('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x14db('0x4'));var logger=require(_0x14db('0x5'))(_0x14db('0x6'));var config=require(_0x14db('0x7'));var jayson=require(_0x14db('0x8'));var client=jayson[_0x14db('0x9')][_0x14db('0xa')]({'port':0x232a});config[_0x14db('0xb')]=_[_0x14db('0xc')](config[_0x14db('0xb')],{'host':_0x14db('0xd'),'port':0x18eb});var socket=require(_0x14db('0xe'))(new Redis(config['redis']));require(_0x14db('0xf'))[_0x14db('0x10')](socket);function respondWithRpcPromise(_0x1c5043,_0x2ef0a3,_0x4ccff2){return new BPromise(function(_0x45db4e,_0x2db338){return client[_0x14db('0x11')](_0x1c5043,_0x4ccff2)['then'](function(_0x272422){logger['info'](_0x14db('0x12'),_0x2ef0a3,_0x14db('0x13'));logger['debug'](_0x14db('0x14'),_0x2ef0a3,_0x14db('0x13'),JSON[_0x14db('0x15')](_0x272422));if(_0x272422[_0x14db('0x16')]){if(_0x272422[_0x14db('0x16')]['code']===0x1f4){logger[_0x14db('0x16')]('ChatMessage,\x20%s,\x20%s',_0x2ef0a3,_0x272422[_0x14db('0x16')][_0x14db('0x17')]);return _0x2db338(_0x272422[_0x14db('0x16')]['message']);}logger[_0x14db('0x16')](_0x14db('0x12'),_0x2ef0a3,_0x272422[_0x14db('0x16')]['message']);return _0x45db4e(_0x272422[_0x14db('0x16')][_0x14db('0x17')]);}else{logger[_0x14db('0x18')](_0x14db('0x12'),_0x2ef0a3,_0x14db('0x13'));_0x45db4e(_0x272422[_0x14db('0x19')]['message']);}})[_0x14db('0x1a')](function(_0x24dc34){logger['error'](_0x14db('0x12'),_0x2ef0a3,_0x24dc34);_0x2db338(_0x24dc34);});});}exports[_0x14db('0x1b')]=function(_0x218875){var _0x2a1694=this;return new Promise(function(_0x41faf8,_0x41a4c9){return db[_0x14db('0x1c')][_0x14db('0x1d')](_0x218875['body'],{'raw':_0x218875[_0x14db('0x1e')]?_0x218875[_0x14db('0x1e')][_0x14db('0x1f')]===undefined?!![]:![]:!![]})[_0x14db('0x20')](function(_0x4d84a2){logger[_0x14db('0x18')]('CreateChatMessage',_0x218875);logger['debug']('CreateChatMessage',_0x218875,JSON[_0x14db('0x15')](_0x4d84a2));_0x41faf8(_0x4d84a2);})['catch'](function(_0x3ee23d){logger[_0x14db('0x16')]('CreateChatMessage',_0x3ee23d['message'],_0x218875);_0x41a4c9(_0x2a1694[_0x14db('0x16')](0x1f4,_0x3ee23d[_0x14db('0x17')]));});});};
\ No newline at end of file
index 464d88c..cb15ba9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa8eb=['length','./chatMessage.events','remove','register'];(function(_0x409353,_0xe9f04d){var _0x4f4b59=function(_0x64b587){while(--_0x64b587){_0x409353['push'](_0x409353['shift']());}};_0x4f4b59(++_0xe9f04d);}(_0xa8eb,0x179));var _0xba8e=function(_0x25afa5,_0x563e13){_0x25afa5=_0x25afa5-0x0;var _0x38acb5=_0xa8eb[_0x25afa5];return _0x38acb5;};'use strict';var ChatMessageEvents=require(_0xba8e('0x0'));var events=['save',_0xba8e('0x1'),'update'];function createListener(_0xd7f19f,_0x35f485){return function(_0x3b8fee){_0x35f485['emit'](_0xd7f19f,_0x3b8fee);};}function removeListener(_0x353df2,_0x368ce6){return function(){ChatMessageEvents['removeListener'](_0x353df2,_0x368ce6);};}exports[_0xba8e('0x2')]=function(_0x57e345){for(var _0x14c3ac=0x0,_0x52a8ef=events[_0xba8e('0x3')];_0x14c3ac<_0x52a8ef;_0x14c3ac++){var _0x69ccbe=events[_0x14c3ac];var _0x4b1bd6=createListener('chatMessage:'+_0x69ccbe,_0x57e345);ChatMessageEvents['on'](_0x69ccbe,_0x4b1bd6);}};
\ No newline at end of file
+var _0x14f5=['update','emit','removeListener','register','length','chatMessage:','save'];(function(_0x12b4d4,_0x2134e9){var _0x32604e=function(_0x32a791){while(--_0x32a791){_0x12b4d4['push'](_0x12b4d4['shift']());}};_0x32604e(++_0x2134e9);}(_0x14f5,0xae));var _0x514f=function(_0x56c688,_0x4a2b0a){_0x56c688=_0x56c688-0x0;var _0x4f738a=_0x14f5[_0x56c688];return _0x4f738a;};'use strict';var ChatMessageEvents=require('./chatMessage.events');var events=[_0x514f('0x0'),'remove',_0x514f('0x1')];function createListener(_0x2e8eb2,_0x12d5e2){return function(_0x5281a3){_0x12d5e2[_0x514f('0x2')](_0x2e8eb2,_0x5281a3);};}function removeListener(_0x2443e8,_0x483c2a){return function(){ChatMessageEvents[_0x514f('0x3')](_0x2443e8,_0x483c2a);};}exports[_0x514f('0x4')]=function(_0xc2ca56){for(var _0x434452=0x0,_0x463985=events[_0x514f('0x5')];_0x434452<_0x463985;_0x434452++){var _0xdb9614=events[_0x434452];var _0x4a5497=createListener(_0x514f('0x6')+_0xdb9614,_0xc2ca56);ChatMessageEvents['on'](_0xdb9614,_0x4a5497);}};
\ No newline at end of file
index 3d3b77e..045fe72 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2aa1=['create','put','/:id/reject','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./chatMessage.controller','index','get','/describe','isAuthenticated','describe','/:id','show'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x2aa1,0x1be));var _0x12aa=function(_0x50d33a,_0x51271d){_0x50d33a=_0x50d33a-0x0;var _0x414ef6=_0x2aa1[_0x50d33a];return _0x414ef6;};'use strict';var multer=require(_0x12aa('0x0'));var util=require('util');var path=require(_0x12aa('0x1'));var timeout=require(_0x12aa('0x2'));var express=require(_0x12aa('0x3'));var router=express[_0x12aa('0x4')]();var fs_extra=require(_0x12aa('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x12aa('0x6'));var config=require(_0x12aa('0x7'));var controller=require(_0x12aa('0x8'));router['get']('/',auth['isAuthenticated'](),controller[_0x12aa('0x9')]);router[_0x12aa('0xa')](_0x12aa('0xb'),auth[_0x12aa('0xc')](),controller[_0x12aa('0xd')]);router['get'](_0x12aa('0xe'),auth[_0x12aa('0xc')](),controller[_0x12aa('0xf')]);router['post']('/',auth[_0x12aa('0xc')](),interaction['tracked']('chat','chatmessage:create'),controller[_0x12aa('0x10')]);router[_0x12aa('0x11')](_0x12aa('0xe'),controller['update']);router[_0x12aa('0x11')]('/:id/accept',auth['isAuthenticated'](),controller['accept']);router[_0x12aa('0x11')](_0x12aa('0x12'),auth[_0x12aa('0xc')](),controller['reject']);router['delete']('/:id',auth[_0x12aa('0xc')](),controller[_0x12aa('0x13')]);module[_0x12aa('0x14')]=router;
\ No newline at end of file
+var _0xf25e=['chatmessage:create','create','put','update','/:id/accept','accept','/:id/reject','reject','destroy','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','index','describe','/:id','post','tracked','chat'];(function(_0x3b4de2,_0x525d6b){var _0x530dfa=function(_0x562763){while(--_0x562763){_0x3b4de2['push'](_0x3b4de2['shift']());}};_0x530dfa(++_0x525d6b);}(_0xf25e,0x190));var _0xef25=function(_0x22ee74,_0x474a39){_0x22ee74=_0x22ee74-0x0;var _0x12fe56=_0xf25e[_0x22ee74];return _0x12fe56;};'use strict';var multer=require(_0xef25('0x0'));var util=require(_0xef25('0x1'));var path=require('path');var timeout=require(_0xef25('0x2'));var express=require(_0xef25('0x3'));var router=express[_0xef25('0x4')]();var fs_extra=require(_0xef25('0x5'));var auth=require(_0xef25('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xef25('0x7'));var controller=require('./chatMessage.controller');router[_0xef25('0x8')]('/',auth[_0xef25('0x9')](),controller[_0xef25('0xa')]);router[_0xef25('0x8')]('/describe',auth['isAuthenticated'](),controller[_0xef25('0xb')]);router[_0xef25('0x8')](_0xef25('0xc'),auth[_0xef25('0x9')](),controller['show']);router[_0xef25('0xd')]('/',auth[_0xef25('0x9')](),interaction[_0xef25('0xe')](_0xef25('0xf'),_0xef25('0x10')),controller[_0xef25('0x11')]);router[_0xef25('0x12')]('/:id',controller[_0xef25('0x13')]);router[_0xef25('0x12')](_0xef25('0x14'),auth[_0xef25('0x9')](),controller[_0xef25('0x15')]);router[_0xef25('0x12')](_0xef25('0x16'),auth[_0xef25('0x9')](),controller[_0xef25('0x17')]);router['delete'](_0xef25('0xc'),auth[_0xef25('0x9')](),controller[_0xef25('0x18')]);module[_0xef25('0x19')]=router;
\ No newline at end of file
index b8fa77f..07f8956 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2032=['medium','exports','TEXT'];(function(_0x9fd887,_0x47f76c){var _0x1a54ab=function(_0xb65c08){while(--_0xb65c08){_0x9fd887['push'](_0x9fd887['shift']());}};_0x1a54ab(++_0x47f76c);}(_0x2032,0xd9));var _0x2203=function(_0x2dd7e9,_0x2c1bb7){_0x2dd7e9=_0x2dd7e9-0x0;var _0x37fcd2=_0x2032[_0x2dd7e9];return _0x37fcd2;};'use strict';var Sequelize=require('sequelize');module[_0x2203('0x0')]={'body':{'type':Sequelize[_0x2203('0x1')](_0x2203('0x2')),'allowNull':![]},'plainBody':{'type':Sequelize['TEXT'](_0x2203('0x2')),'allowNull':![]}};
\ No newline at end of file
+var _0x2032=['medium','exports','TEXT'];(function(_0x528c5b,_0x124692){var _0x398f8b=function(_0x58084f){while(--_0x58084f){_0x528c5b['push'](_0x528c5b['shift']());}};_0x398f8b(++_0x124692);}(_0x2032,0xd9));var _0x2203=function(_0x4c1cb1,_0x3dac88){_0x4c1cb1=_0x4c1cb1-0x0;var _0x59b658=_0x2032[_0x4c1cb1];return _0x59b658;};'use strict';var Sequelize=require('sequelize');module[_0x2203('0x0')]={'body':{'type':Sequelize[_0x2203('0x1')](_0x2203('0x2')),'allowNull':![]},'plainBody':{'type':Sequelize['TEXT'](_0x2203('0x2')),'allowNull':![]}};
\ No newline at end of file
index 9388d41..4d237d2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9957=['sendStatus','status','json','undefined','count','offset','limit','set','Content-Range','reject','save','then','destroy','error','name','send','index','fieldName','type','key','model','map','keys','filters','intersection','query','attributes','fields','length','hasOwnProperty','nolimit','sort','where','filter','merge','VIRTUAL','options','ChatOfflineMessage','findAll','rows','show','rawAttributes','includeAll','include','find','create','catch','body','params','Attachment','forEach','join','root','server','files','attachments','basename','existsSync','remove','describe','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'];(function(_0x1dd0f6,_0x9948d8){var _0x11435d=function(_0x5acfa9){while(--_0x5acfa9){_0x1dd0f6['push'](_0x1dd0f6['shift']());}};_0x11435d(++_0x9948d8);}(_0x9957,0x93));var _0x7995=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x9957[_0x3b380d];return _0x54502b;};'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){var _0x514445={},_0x456a28={},_0x3250e0={'count':0x0,'rows':[]};var _0x4253e5=_['map'](db['ChatOfflineMessage']['rawAttributes'],function(_0x3573be){return{'name':_0x3573be[_0x7995('0x2c')],'type':_0x3573be[_0x7995('0x2d')][_0x7995('0x2e')]};});_0x456a28[_0x7995('0x2f')]=_[_0x7995('0x30')](_0x4253e5,'name');_0x456a28['query']=_[_0x7995('0x31')](_0x4b6f99['query']);_0x456a28[_0x7995('0x32')]=_[_0x7995('0x33')](_0x456a28[_0x7995('0x2f')],_0x456a28[_0x7995('0x34')]);_0x514445[_0x7995('0x35')]=_['intersection'](_0x456a28[_0x7995('0x2f')],qs[_0x7995('0x36')](_0x4b6f99['query']['fields']));_0x514445['attributes']=_0x514445[_0x7995('0x35')][_0x7995('0x37')]?_0x514445['attributes']:_0x456a28[_0x7995('0x2f')];if(!_0x4b6f99['query'][_0x7995('0x38')](_0x7995('0x39'))){_0x514445[_0x7995('0x21')]=qs['limit'](_0x4b6f99['query'][_0x7995('0x21')]);_0x514445['offset']=qs['offset'](_0x4b6f99[_0x7995('0x34')][_0x7995('0x20')]);}_0x514445['order']=qs[_0x7995('0x3a')](_0x4b6f99[_0x7995('0x34')][_0x7995('0x3a')]);_0x514445[_0x7995('0x3b')]=qs[_0x7995('0x32')](_['pick'](_0x4b6f99[_0x7995('0x34')],_0x456a28[_0x7995('0x32')]),_0x4253e5);if(_0x4b6f99[_0x7995('0x34')][_0x7995('0x3c')]){_0x514445['where']=_[_0x7995('0x3d')](_0x514445[_0x7995('0x3b')],{'$or':_[_0x7995('0x30')](_0x4253e5,function(_0xe5ea43){if(_0xe5ea43[_0x7995('0x2d')]!==_0x7995('0x3e')){var _0x5688a1={};_0x5688a1[_0xe5ea43[_0x7995('0x29')]]={'$like':'%'+_0x4b6f99[_0x7995('0x34')][_0x7995('0x3c')]+'%'};return _0x5688a1;}})});}_0x514445=_[_0x7995('0x3d')]({},_0x514445,_0x4b6f99[_0x7995('0x3f')]);var _0x298fc2={'where':_0x514445[_0x7995('0x3b')]};return db[_0x7995('0x40')][_0x7995('0x1f')](_0x298fc2)[_0x7995('0x26')](function(_0x6fe77b){_0x3250e0[_0x7995('0x1f')]=_0x6fe77b;if(_0x4b6f99[_0x7995('0x34')]['includeAll']){_0x514445['include']=[{'all':!![]}];}return db[_0x7995('0x40')][_0x7995('0x41')](_0x514445);})['then'](function(_0x4b0855){_0x3250e0[_0x7995('0x42')]=_0x4b0855;return _0x3250e0;})['then'](respondWithFilteredResult(_0x9b2a15,_0x514445))['catch'](handleError(_0x9b2a15,null));};exports[_0x7995('0x43')]=function(_0x36e28b,_0x35c8ff){var _0x576b96={'raw':!![],'where':{'id':_0x36e28b['params']['id']}},_0x46ac4f={};_0x46ac4f[_0x7995('0x2f')]=_['keys'](db['ChatOfflineMessage'][_0x7995('0x44')]);_0x46ac4f[_0x7995('0x34')]=_[_0x7995('0x31')](_0x36e28b[_0x7995('0x34')]);_0x46ac4f['filters']=_[_0x7995('0x33')](_0x46ac4f[_0x7995('0x2f')],_0x46ac4f[_0x7995('0x34')]);_0x576b96[_0x7995('0x35')]=_['intersection'](_0x46ac4f['model'],qs[_0x7995('0x36')](_0x36e28b['query'][_0x7995('0x36')]));_0x576b96['attributes']=_0x576b96[_0x7995('0x35')]['length']?_0x576b96[_0x7995('0x35')]:_0x46ac4f[_0x7995('0x2f')];if(_0x36e28b['query'][_0x7995('0x45')]){_0x576b96[_0x7995('0x46')]=[{'all':!![]}];}_0x576b96=_[_0x7995('0x3d')]({},_0x576b96,_0x36e28b[_0x7995('0x3f')]);return db['ChatOfflineMessage'][_0x7995('0x47')](_0x576b96)[_0x7995('0x26')](handleEntityNotFound(_0x35c8ff,null))[_0x7995('0x26')](respondWithResult(_0x35c8ff,null))['catch'](handleError(_0x35c8ff,null));};exports[_0x7995('0x48')]=function(_0x44f516,_0x511567){return db[_0x7995('0x40')][_0x7995('0x48')](_0x44f516['body'],{})[_0x7995('0x26')](respondWithResult(_0x511567,0xc9))[_0x7995('0x49')](handleError(_0x511567,null));};exports['update']=function(_0x3d1dbb,_0x5843ba){if(_0x3d1dbb[_0x7995('0x4a')]['id']){delete _0x3d1dbb[_0x7995('0x4a')]['id'];}return db[_0x7995('0x40')][_0x7995('0x47')]({'where':{'id':_0x3d1dbb[_0x7995('0x4b')]['id']}})[_0x7995('0x26')](handleEntityNotFound(_0x5843ba,null))[_0x7995('0x26')](saveUpdates(_0x3d1dbb['body'],null))[_0x7995('0x26')](respondWithResult(_0x5843ba,null))[_0x7995('0x49')](handleError(_0x5843ba,null));};exports[_0x7995('0x27')]=function(_0x4ffc8a,_0x19da63){return db[_0x7995('0x4c')][_0x7995('0x41')]({'where':{'ChatOfflineMessageId':_0x4ffc8a['params']['id']},'raw':!![]})['then'](function(_0x5a592e){_0x5a592e[_0x7995('0x4d')](function(_0x1fd1ca){var _0x4cf5db=path[_0x7995('0x4e')](config[_0x7995('0x4f')],_0x7995('0x50'),_0x7995('0x51'),_0x7995('0x52'),'offline-chat',_0x1fd1ca[_0x7995('0x53')]);var _0x4ab09f=fs[_0x7995('0x54')](_0x4cf5db);if(_0x4ab09f)fs_extra[_0x7995('0x55')](_0x4cf5db);});})[_0x7995('0x26')](function(){return db['ChatOfflineMessage']['find']({'where':{'id':_0x4ffc8a['params']['id']},'individualHooks':!![]});})['then'](handleEntityNotFound(_0x19da63,null))[_0x7995('0x26')](removeEntity(_0x19da63,null))[_0x7995('0x49')](handleError(_0x19da63,null));};exports[_0x7995('0x56')]=function(_0x150261,_0x1d957e){return db[_0x7995('0x40')][_0x7995('0x56')]()[_0x7995('0x26')](respondWithResult(_0x1d957e,null))[_0x7995('0x49')](handleError(_0x1d957e,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(_0xd1d19a,_0x1933f0){var _0x52a79d=function(_0x5199e2){while(--_0x5199e2){_0xd1d19a['push'](_0xd1d19a['shift']());}};_0x52a79d(++_0x1933f0);}(_0x7a54,0x106));var _0x47a5=function(_0x5c235e,_0x1591cf){_0x5c235e=_0x5c235e-0x0;var _0x363cc8=_0x7a54[_0x5c235e];return _0x363cc8;};'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 5165efb..4d351ac 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x09da=['emit','hasOwnProperty','hook','exports','../../mysqldb','ChatOfflineMessage','setMaxListeners','save','update','remove'];(function(_0x439c5c,_0x5de696){var _0x3b1696=function(_0x57f5bb){while(--_0x57f5bb){_0x439c5c['push'](_0x439c5c['shift']());}};_0x3b1696(++_0x5de696);}(_0x09da,0xf4));var _0xa09d=function(_0x254718,_0x5e7158){_0x254718=_0x254718-0x0;var _0x238a84=_0x09da[_0x254718];return _0x238a84;};'use strict';var EventEmitter=require('events');var ChatOfflineMessage=require(_0xa09d('0x0'))['db'][_0xa09d('0x1')];var ChatOfflineMessageEvents=new EventEmitter();ChatOfflineMessageEvents[_0xa09d('0x2')](0x0);var events={'afterCreate':_0xa09d('0x3'),'afterUpdate':_0xa09d('0x4'),'afterDestroy':_0xa09d('0x5')};function emitEvent(_0x129dc6){return function(_0x50a6b8,_0x2a4f75,_0x815a9b){ChatOfflineMessageEvents['emit'](_0x129dc6+':'+_0x50a6b8['id'],_0x50a6b8);ChatOfflineMessageEvents[_0xa09d('0x6')](_0x129dc6,_0x50a6b8);_0x815a9b(null);};}for(var e in events){if(events[_0xa09d('0x7')](e)){var event=events[e];ChatOfflineMessage[_0xa09d('0x8')](e,emitEvent(event));}}module[_0xa09d('0x9')]=ChatOfflineMessageEvents;
\ No newline at end of file
+var _0x171b=['events','../../mysqldb','setMaxListeners','save','update','emit','hook','exports'];(function(_0x49ea3c,_0x20f164){var _0x2efc9a=function(_0x2da1ad){while(--_0x2da1ad){_0x49ea3c['push'](_0x49ea3c['shift']());}};_0x2efc9a(++_0x20f164);}(_0x171b,0xf8));var _0xb171=function(_0x5bc1a3,_0x20b93c){_0x5bc1a3=_0x5bc1a3-0x0;var _0x337754=_0x171b[_0x5bc1a3];return _0x337754;};'use strict';var EventEmitter=require(_0xb171('0x0'));var ChatOfflineMessage=require(_0xb171('0x1'))['db']['ChatOfflineMessage'];var ChatOfflineMessageEvents=new EventEmitter();ChatOfflineMessageEvents[_0xb171('0x2')](0x0);var events={'afterCreate':_0xb171('0x3'),'afterUpdate':_0xb171('0x4'),'afterDestroy':'remove'};function emitEvent(_0x33cb7e){return function(_0x4ad3fd,_0x82a4cc,_0x5f5be9){ChatOfflineMessageEvents[_0xb171('0x5')](_0x33cb7e+':'+_0x4ad3fd['id'],_0x4ad3fd);ChatOfflineMessageEvents['emit'](_0x33cb7e,_0x4ad3fd);_0x5f5be9(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatOfflineMessage[_0xb171('0x6')](e,emitEvent(event));}}module[_0xb171('0x7')]=ChatOfflineMessageEvents;
\ No newline at end of file
index 667b146..97dfe36 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc6ff=['chat_offline_messages','utf8mb4','utf8mb4_unicode_ci','./chatOfflineMessage.attributes','exports','define'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0xc6ff,0x165));var _0xfc6f=function(_0x50d7c8,_0x1545cc){_0x50d7c8=_0x50d7c8-0x0;var _0x314a3f=_0xc6ff[_0x50d7c8];return _0x314a3f;};'use strict';var attributes=require(_0xfc6f('0x0'));module[_0xfc6f('0x1')]=function(_0x654517){return _0x654517[_0xfc6f('0x2')]('ChatOfflineMessage',attributes,{'tableName':_0xfc6f('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xfc6f('0x4'),'collate':_0xfc6f('0x5')});};
\ No newline at end of file
+var _0x5504=['define','ChatOfflineMessage','utf8mb4','utf8mb4_unicode_ci','./chatOfflineMessage.attributes','exports'];(function(_0xc87d08,_0x59c9be){var _0x30a714=function(_0x437c0d){while(--_0x437c0d){_0xc87d08['push'](_0xc87d08['shift']());}};_0x30a714(++_0x59c9be);}(_0x5504,0x7c));var _0x4550=function(_0x51cc1d,_0xaa88ae){_0x51cc1d=_0x51cc1d-0x0;var _0x2eb9f2=_0x5504[_0x51cc1d];return _0x2eb9f2;};'use strict';var attributes=require(_0x4550('0x0'));module[_0x4550('0x1')]=function(_0x497c8d){return _0x497c8d[_0x4550('0x2')](_0x4550('0x3'),attributes,{'tableName':'chat_offline_messages','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x4550('0x4'),'collate':_0x4550('0x5')});};
\ No newline at end of file
index f8f9966..2082b2b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe8d6=['bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','ChatOfflineMessage,\x20%s,\x20%s','request\x20sent','debug','ChatOfflineMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','result','lodash','util','moment'];(function(_0x18eeaa,_0x4380b6){var _0x23d240=function(_0x864c98){while(--_0x864c98){_0x18eeaa['push'](_0x18eeaa['shift']());}};_0x23d240(++_0x4380b6);}(_0xe8d6,0xb5));var _0x6e8d=function(_0x5eee5f,_0x57ed22){_0x5eee5f=_0x5eee5f-0x0;var _0x458bd6=_0xe8d6[_0x5eee5f];return _0x458bd6;};'use strict';var _=require(_0x6e8d('0x0'));var util=require(_0x6e8d('0x1'));var moment=require(_0x6e8d('0x2'));var BPromise=require(_0x6e8d('0x3'));var rs=require(_0x6e8d('0x4'));var fs=require('fs');var Redis=require(_0x6e8d('0x5'));var db=require(_0x6e8d('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x6e8d('0x7'))(_0x6e8d('0x8'));var config=require(_0x6e8d('0x9'));var jayson=require(_0x6e8d('0xa'));var client=jayson['client'][_0x6e8d('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x12aaa5,_0x14080c,_0x286252){return new BPromise(function(_0x5b1c06,_0x3e1d99){return client[_0x6e8d('0xc')](_0x12aaa5,_0x286252)[_0x6e8d('0xd')](function(_0x62837e){logger[_0x6e8d('0xe')](_0x6e8d('0xf'),_0x14080c,_0x6e8d('0x10'));logger[_0x6e8d('0x11')](_0x6e8d('0x12'),_0x14080c,_0x6e8d('0x10'),JSON[_0x6e8d('0x13')](_0x62837e));if(_0x62837e[_0x6e8d('0x14')]){if(_0x62837e[_0x6e8d('0x14')]['code']===0x1f4){logger[_0x6e8d('0x14')]('ChatOfflineMessage,\x20%s,\x20%s',_0x14080c,_0x62837e['error'][_0x6e8d('0x15')]);return _0x3e1d99(_0x62837e[_0x6e8d('0x14')][_0x6e8d('0x15')]);}logger['error'](_0x6e8d('0xf'),_0x14080c,_0x62837e['error']['message']);return _0x5b1c06(_0x62837e[_0x6e8d('0x14')][_0x6e8d('0x15')]);}else{logger['info'](_0x6e8d('0xf'),_0x14080c,'request\x20sent');_0x5b1c06(_0x62837e[_0x6e8d('0x16')]['message']);}})['catch'](function(_0x36368f){logger['error'](_0x6e8d('0xf'),_0x14080c,_0x36368f);_0x3e1d99(_0x36368f);});});}
\ No newline at end of file
+var _0xe1b7=['code','message','result','lodash','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','ChatOfflineMessage,\x20%s,\x20%s','request\x20sent','ChatOfflineMessage,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x310504,_0x26ad95){var _0x5b36d0=function(_0x253f28){while(--_0x253f28){_0x310504['push'](_0x310504['shift']());}};_0x5b36d0(++_0x26ad95);}(_0xe1b7,0x1bb));var _0x7e1b=function(_0x428667,_0x27483f){_0x428667=_0x428667-0x0;var _0x58bd18=_0xe1b7[_0x428667];return _0x58bd18;};'use strict';var _=require(_0x7e1b('0x0'));var util=require('util');var moment=require(_0x7e1b('0x1'));var BPromise=require(_0x7e1b('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x7e1b('0x3'))['db'];var utils=require(_0x7e1b('0x4'));var logger=require(_0x7e1b('0x5'))(_0x7e1b('0x6'));var config=require(_0x7e1b('0x7'));var jayson=require(_0x7e1b('0x8'));var client=jayson[_0x7e1b('0x9')][_0x7e1b('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x46a4e7,_0x3abe2b,_0x217eca){return new BPromise(function(_0x3e5c53,_0x5a47aa){return client[_0x7e1b('0xb')](_0x46a4e7,_0x217eca)[_0x7e1b('0xc')](function(_0x4d9b2e){logger[_0x7e1b('0xd')](_0x7e1b('0xe'),_0x3abe2b,_0x7e1b('0xf'));logger['debug'](_0x7e1b('0x10'),_0x3abe2b,_0x7e1b('0xf'),JSON[_0x7e1b('0x11')](_0x4d9b2e));if(_0x4d9b2e['error']){if(_0x4d9b2e[_0x7e1b('0x12')][_0x7e1b('0x13')]===0x1f4){logger['error']('ChatOfflineMessage,\x20%s,\x20%s',_0x3abe2b,_0x4d9b2e['error'][_0x7e1b('0x14')]);return _0x5a47aa(_0x4d9b2e[_0x7e1b('0x12')][_0x7e1b('0x14')]);}logger[_0x7e1b('0x12')](_0x7e1b('0xe'),_0x3abe2b,_0x4d9b2e[_0x7e1b('0x12')]['message']);return _0x3e5c53(_0x4d9b2e[_0x7e1b('0x12')][_0x7e1b('0x14')]);}else{logger['info'](_0x7e1b('0xe'),_0x3abe2b,'request\x20sent');_0x3e5c53(_0x4d9b2e[_0x7e1b('0x15')][_0x7e1b('0x14')]);}})['catch'](function(_0xa485e9){logger[_0x7e1b('0x12')]('ChatOfflineMessage,\x20%s,\x20%s',_0x3abe2b,_0xa485e9);_0x5a47aa(_0xa485e9);});});}
\ No newline at end of file
index 481627c..6bff90f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3d77=['index','/describe','describe','/:id','show','post','create','put','delete','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated'];(function(_0x33f9b4,_0x5ef010){var _0x1aef13=function(_0x5a75e4){while(--_0x5a75e4){_0x33f9b4['push'](_0x33f9b4['shift']());}};_0x1aef13(++_0x5ef010);}(_0x3d77,0xc6));var _0x73d7=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x3d77[_0x14add3];return _0x4a174f;};'use strict';var multer=require(_0x73d7('0x0'));var util=require(_0x73d7('0x1'));var path=require(_0x73d7('0x2'));var timeout=require(_0x73d7('0x3'));var express=require(_0x73d7('0x4'));var router=express[_0x73d7('0x5')]();var fs_extra=require(_0x73d7('0x6'));var auth=require(_0x73d7('0x7'));var interaction=require(_0x73d7('0x8'));var config=require(_0x73d7('0x9'));var controller=require('./chatOfflineMessage.controller');router[_0x73d7('0xa')]('/',auth[_0x73d7('0xb')](),controller[_0x73d7('0xc')]);router[_0x73d7('0xa')](_0x73d7('0xd'),auth['isAuthenticated'](),controller[_0x73d7('0xe')]);router[_0x73d7('0xa')](_0x73d7('0xf'),auth[_0x73d7('0xb')](),controller[_0x73d7('0x10')]);router[_0x73d7('0x11')]('/',auth[_0x73d7('0xb')](),controller[_0x73d7('0x12')]);router[_0x73d7('0x13')]('/:id',auth[_0x73d7('0xb')](),controller['update']);router[_0x73d7('0x14')](_0x73d7('0xf'),auth[_0x73d7('0xb')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0xae87=['/:id','destroy','exports','multer','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatOfflineMessage.controller','index','isAuthenticated','describe','get','create','put','update'];(function(_0x2ecd4a,_0x2ef18c){var _0x4b71a1=function(_0x3eb3e1){while(--_0x3eb3e1){_0x2ecd4a['push'](_0x2ecd4a['shift']());}};_0x4b71a1(++_0x2ef18c);}(_0xae87,0xa5));var _0x7ae8=function(_0x2f1114,_0x4561f1){_0x2f1114=_0x2f1114-0x0;var _0x2fe856=_0xae87[_0x2f1114];return _0x2fe856;};'use strict';var multer=require(_0x7ae8('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x7ae8('0x1'));var express=require('express');var router=express[_0x7ae8('0x2')]();var fs_extra=require(_0x7ae8('0x3'));var auth=require(_0x7ae8('0x4'));var interaction=require(_0x7ae8('0x5'));var config=require(_0x7ae8('0x6'));var controller=require(_0x7ae8('0x7'));router['get']('/',auth['isAuthenticated'](),controller[_0x7ae8('0x8')]);router['get']('/describe',auth[_0x7ae8('0x9')](),controller[_0x7ae8('0xa')]);router[_0x7ae8('0xb')]('/:id',auth[_0x7ae8('0x9')](),controller['show']);router['post']('/',auth['isAuthenticated'](),controller[_0x7ae8('0xc')]);router[_0x7ae8('0xd')]('/:id',auth[_0x7ae8('0x9')](),controller[_0x7ae8('0xe')]);router['delete'](_0x7ae8('0xf'),auth[_0x7ae8('0x9')](),controller[_0x7ae8('0x10')]);module[_0x7ae8('0x11')]=router;
\ No newline at end of file
index 16139c4..09defd9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9cc2=['STRING','ENUM','mouseOver','INTEGER'];(function(_0x4b5b42,_0x2ba151){var _0x42d774=function(_0x21d47b){while(--_0x21d47b){_0x4b5b42['push'](_0x4b5b42['shift']());}};_0x42d774(++_0x2ba151);}(_0x9cc2,0x1c8));var _0x29cc=function(_0x4687df,_0x12099c){_0x4687df=_0x4687df-0x0;var _0x32eaef=_0x9cc2[_0x4687df];return _0x32eaef;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x29cc('0x0')],'allowNull':![]},'type':{'type':Sequelize[_0x29cc('0x1')](_0x29cc('0x2'),'timeout'),'defaultValue':'mouseOver'},'selector':{'type':Sequelize[_0x29cc('0x0')]},'timeout':{'type':Sequelize[_0x29cc('0x3')]}};
\ No newline at end of file
+var _0x6865=['timeout','INTEGER','STRING','ENUM','mouseOver'];(function(_0x54b002,_0x555180){var _0x31b253=function(_0x55bf81){while(--_0x55bf81){_0x54b002['push'](_0x54b002['shift']());}};_0x31b253(++_0x555180);}(_0x6865,0x142));var _0x5686=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x6865[_0x20a584];return _0x4b41a8;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x5686('0x0')],'allowNull':![]},'type':{'type':Sequelize[_0x5686('0x1')](_0x5686('0x2'),_0x5686('0x3')),'defaultValue':_0x5686('0x2')},'selector':{'type':Sequelize[_0x5686('0x0')]},'timeout':{'type':Sequelize[_0x5686('0x4')]}};
\ No newline at end of file
index c687aca..7f440f3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0763=['query','fields','attributes','length','includeAll','include','merge','options','find','create','body','catch','destroy','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','save','update','then','error','stack','name','send','params','model','ChatProactiveAction','rawAttributes','keys','intersection'];(function(_0x8905ed,_0x130f11){var _0x1d86cd=function(_0x588cd0){while(--_0x588cd0){_0x8905ed['push'](_0x8905ed['shift']());}};_0x1d86cd(++_0x130f11);}(_0x0763,0x87));var _0x3076=function(_0x572637,_0x216d95){_0x572637=_0x572637-0x0;var _0xb6748=_0x0763[_0x572637];return _0xb6748;};'use strict';var emlformat=require(_0x3076('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x3076('0x1'));var jsonpatch=require(_0x3076('0x2'));var rp=require('request-promise');var moment=require(_0x3076('0x3'));var BPromise=require(_0x3076('0x4'));var Mustache=require(_0x3076('0x5'));var util=require(_0x3076('0x6'));var path=require('path');var sox=require(_0x3076('0x7'));var csv=require(_0x3076('0x8'));var ejs=require(_0x3076('0x9'));var fs=require('fs');var fs_extra=require(_0x3076('0xa'));var _=require(_0x3076('0xb'));var squel=require(_0x3076('0xc'));var crypto=require(_0x3076('0xd'));var jsforce=require(_0x3076('0xe'));var deskjs=require(_0x3076('0xf'));var toCsv=require(_0x3076('0x8'));var querystring=require('querystring');var Papa=require(_0x3076('0x10'));var Redis=require(_0x3076('0x11'));var authService=require(_0x3076('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x3076('0x13'));var logger=require(_0x3076('0x14'))(_0x3076('0x15'));var utils=require(_0x3076('0x16'));var config=require(_0x3076('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x3076('0x18'))['db'];function respondWithStatusCode(_0x209fc0,_0x2fe9d1){_0x2fe9d1=_0x2fe9d1||0xcc;return function(_0xc917fd){if(_0xc917fd){return _0x209fc0[_0x3076('0x19')](_0x2fe9d1);}return _0x209fc0[_0x3076('0x1a')](_0x2fe9d1)[_0x3076('0x1b')]();};}function respondWithResult(_0x3a6f74,_0x54ff6a){_0x54ff6a=_0x54ff6a||0xc8;return function(_0x5542c7){if(_0x5542c7){return _0x3a6f74[_0x3076('0x1a')](_0x54ff6a)[_0x3076('0x1c')](_0x5542c7);}};}function respondWithFilteredResult(_0x3bc84d,_0x1b2256){return function(_0x5a2088){if(_0x5a2088){var _0x5bf9ec=typeof _0x1b2256[_0x3076('0x1d')]===_0x3076('0x1e')&&typeof _0x1b2256[_0x3076('0x1f')]===_0x3076('0x1e');var _0x3d56fe=_0x5a2088[_0x3076('0x20')];var _0x21c242=_0x5bf9ec?0x0:_0x1b2256[_0x3076('0x1d')];var _0x1880b8=_0x5bf9ec?_0x5a2088[_0x3076('0x20')]:_0x1b2256[_0x3076('0x1d')]+_0x1b2256[_0x3076('0x1f')];var _0x4e441d;if(_0x1880b8>=_0x3d56fe){_0x1880b8=_0x3d56fe;_0x4e441d=0xc8;}else{_0x4e441d=0xce;}_0x3bc84d[_0x3076('0x1a')](_0x4e441d);return _0x3bc84d[_0x3076('0x21')]('Content-Range',_0x21c242+'-'+_0x1880b8+'/'+_0x3d56fe)[_0x3076('0x1c')](_0x5a2088);}return null;};}function patchUpdates(_0x50f366){return function(_0x34c831){try{jsonpatch[_0x3076('0x22')](_0x34c831,_0x50f366,!![]);}catch(_0x1f8914){return BPromise['reject'](_0x1f8914);}return _0x34c831[_0x3076('0x23')]();};}function saveUpdates(_0x250cc4,_0x2398f4){return function(_0x9b4bec){if(_0x9b4bec){return _0x9b4bec[_0x3076('0x24')](_0x250cc4)[_0x3076('0x25')](function(_0x1a2131){return _0x1a2131;});}return null;};}function removeEntity(_0xa975bc,_0x195606){return function(_0x39a33c){if(_0x39a33c){return _0x39a33c['destroy']()[_0x3076('0x25')](function(){_0xa975bc['status'](0xcc)[_0x3076('0x1b')]();});}};}function handleEntityNotFound(_0x4f4bdc,_0x53b45d){return function(_0x41ecf4){if(!_0x41ecf4){_0x4f4bdc[_0x3076('0x19')](0x194);}return _0x41ecf4;};}function handleError(_0x2f0848,_0x1b169b){_0x1b169b=_0x1b169b||0x1f4;return function(_0x28d834){logger[_0x3076('0x26')](_0x28d834[_0x3076('0x27')]);if(_0x28d834[_0x3076('0x28')]){delete _0x28d834[_0x3076('0x28')];}_0x2f0848[_0x3076('0x1a')](_0x1b169b)[_0x3076('0x29')](_0x28d834);};}exports['show']=function(_0x181591,_0x45805e){var _0x32bdbd={'raw':!![],'where':{'id':_0x181591[_0x3076('0x2a')]['id']}},_0x5af88e={};_0x5af88e[_0x3076('0x2b')]=_['keys'](db[_0x3076('0x2c')][_0x3076('0x2d')]);_0x5af88e['query']=_[_0x3076('0x2e')](_0x181591['query']);_0x5af88e['filters']=_[_0x3076('0x2f')](_0x5af88e[_0x3076('0x2b')],_0x5af88e[_0x3076('0x30')]);_0x32bdbd['attributes']=_[_0x3076('0x2f')](_0x5af88e[_0x3076('0x2b')],qs[_0x3076('0x31')](_0x181591[_0x3076('0x30')]['fields']));_0x32bdbd[_0x3076('0x32')]=_0x32bdbd[_0x3076('0x32')][_0x3076('0x33')]?_0x32bdbd[_0x3076('0x32')]:_0x5af88e[_0x3076('0x2b')];if(_0x181591['query'][_0x3076('0x34')]){_0x32bdbd[_0x3076('0x35')]=[{'all':!![]}];}_0x32bdbd=_[_0x3076('0x36')]({},_0x32bdbd,_0x181591[_0x3076('0x37')]);return db[_0x3076('0x2c')][_0x3076('0x38')](_0x32bdbd)['then'](handleEntityNotFound(_0x45805e,null))[_0x3076('0x25')](respondWithResult(_0x45805e,null))['catch'](handleError(_0x45805e,null));};exports[_0x3076('0x39')]=function(_0x1d6b0b,_0x605784){return db[_0x3076('0x2c')][_0x3076('0x39')](_0x1d6b0b[_0x3076('0x3a')],{})[_0x3076('0x25')](respondWithResult(_0x605784,0xc9))[_0x3076('0x3b')](handleError(_0x605784,null));};exports[_0x3076('0x24')]=function(_0x2c912c,_0x2ea216){if(_0x2c912c[_0x3076('0x3a')]['id']){delete _0x2c912c[_0x3076('0x3a')]['id'];}return db[_0x3076('0x2c')][_0x3076('0x38')]({'where':{'id':_0x2c912c[_0x3076('0x2a')]['id']}})[_0x3076('0x25')](handleEntityNotFound(_0x2ea216,null))[_0x3076('0x25')](saveUpdates(_0x2c912c[_0x3076('0x3a')],null))[_0x3076('0x25')](respondWithResult(_0x2ea216,null))[_0x3076('0x3b')](handleError(_0x2ea216,null));};exports[_0x3076('0x3c')]=function(_0x431681,_0x852954){return db[_0x3076('0x2c')][_0x3076('0x38')]({'where':{'id':_0x431681[_0x3076('0x2a')]['id']}})['then'](handleEntityNotFound(_0x852954,null))[_0x3076('0x25')](removeEntity(_0x852954,null))[_0x3076('0x3b')](handleError(_0x852954,null));};
\ No newline at end of file
+var _0xa348=['path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','undefined','limit','count','offset','set','apply','reject','save','then','destroy','error','stack','send','show','params','model','ChatProactiveAction','query','keys','filters','intersection','fields','attributes','length','includeAll','include','options','catch','create','body','update','find','eml-format','zip-dir','bluebird','mustache','util'];(function(_0xea78ec,_0x308cfa){var _0xceb6c7=function(_0x115513){while(--_0x115513){_0xea78ec['push'](_0xea78ec['shift']());}};_0xceb6c7(++_0x308cfa);}(_0xa348,0xb2));var _0x8a34=function(_0x582a4e,_0x3af381){_0x582a4e=_0x582a4e-0x0;var _0x357cee=_0xa348[_0x582a4e];return _0x357cee;};'use strict';var emlformat=require(_0x8a34('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x8a34('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x8a34('0x2'));var Mustache=require(_0x8a34('0x3'));var util=require(_0x8a34('0x4'));var path=require(_0x8a34('0x5'));var sox=require(_0x8a34('0x6'));var csv=require(_0x8a34('0x7'));var ejs=require(_0x8a34('0x8'));var fs=require('fs');var fs_extra=require(_0x8a34('0x9'));var _=require(_0x8a34('0xa'));var squel=require(_0x8a34('0xb'));var crypto=require('crypto');var jsforce=require(_0x8a34('0xc'));var deskjs=require(_0x8a34('0xd'));var toCsv=require(_0x8a34('0x7'));var querystring=require(_0x8a34('0xe'));var Papa=require('papaparse');var Redis=require(_0x8a34('0xf'));var authService=require(_0x8a34('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x8a34('0x11'));var hardwareService=require(_0x8a34('0x12'));var logger=require(_0x8a34('0x13'))(_0x8a34('0x14'));var utils=require(_0x8a34('0x15'));var config=require(_0x8a34('0x16'));var licenseUtil=require(_0x8a34('0x17'));var db=require(_0x8a34('0x18'))['db'];function respondWithStatusCode(_0x51afe2,_0x59270e){_0x59270e=_0x59270e||0xcc;return function(_0x3849fa){if(_0x3849fa){return _0x51afe2[_0x8a34('0x19')](_0x59270e);}return _0x51afe2['status'](_0x59270e)[_0x8a34('0x1a')]();};}function respondWithResult(_0x10b84c,_0x25577a){_0x25577a=_0x25577a||0xc8;return function(_0x1573ad){if(_0x1573ad){return _0x10b84c[_0x8a34('0x1b')](_0x25577a)[_0x8a34('0x1c')](_0x1573ad);}};}function respondWithFilteredResult(_0x2ca994,_0x2f9e57){return function(_0x165bc2){if(_0x165bc2){var _0x390920=typeof _0x2f9e57['offset']===_0x8a34('0x1d')&&typeof _0x2f9e57[_0x8a34('0x1e')]==='undefined';var _0x541b72=_0x165bc2[_0x8a34('0x1f')];var _0x442e40=_0x390920?0x0:_0x2f9e57[_0x8a34('0x20')];var _0x4da529=_0x390920?_0x165bc2[_0x8a34('0x1f')]:_0x2f9e57['offset']+_0x2f9e57[_0x8a34('0x1e')];var _0x192ca0;if(_0x4da529>=_0x541b72){_0x4da529=_0x541b72;_0x192ca0=0xc8;}else{_0x192ca0=0xce;}_0x2ca994[_0x8a34('0x1b')](_0x192ca0);return _0x2ca994[_0x8a34('0x21')]('Content-Range',_0x442e40+'-'+_0x4da529+'/'+_0x541b72)[_0x8a34('0x1c')](_0x165bc2);}return null;};}function patchUpdates(_0x44e7ac){return function(_0x29e6a9){try{jsonpatch[_0x8a34('0x22')](_0x29e6a9,_0x44e7ac,!![]);}catch(_0x55718c){return BPromise[_0x8a34('0x23')](_0x55718c);}return _0x29e6a9[_0x8a34('0x24')]();};}function saveUpdates(_0x4219d9,_0x327072){return function(_0x1a11c3){if(_0x1a11c3){return _0x1a11c3['update'](_0x4219d9)[_0x8a34('0x25')](function(_0x48f36d){return _0x48f36d;});}return null;};}function removeEntity(_0x4ee6fe,_0x5dfc34){return function(_0x1c490a){if(_0x1c490a){return _0x1c490a[_0x8a34('0x26')]()['then'](function(){_0x4ee6fe[_0x8a34('0x1b')](0xcc)[_0x8a34('0x1a')]();});}};}function handleEntityNotFound(_0x386c6d,_0x2fc062){return function(_0x3339af){if(!_0x3339af){_0x386c6d['sendStatus'](0x194);}return _0x3339af;};}function handleError(_0x326642,_0x435461){_0x435461=_0x435461||0x1f4;return function(_0x118d31){logger[_0x8a34('0x27')](_0x118d31[_0x8a34('0x28')]);if(_0x118d31['name']){delete _0x118d31['name'];}_0x326642[_0x8a34('0x1b')](_0x435461)[_0x8a34('0x29')](_0x118d31);};}exports[_0x8a34('0x2a')]=function(_0x18e624,_0x550acc){var _0x3fbb7e={'raw':!![],'where':{'id':_0x18e624[_0x8a34('0x2b')]['id']}},_0x22c4f0={};_0x22c4f0[_0x8a34('0x2c')]=_['keys'](db[_0x8a34('0x2d')]['rawAttributes']);_0x22c4f0[_0x8a34('0x2e')]=_[_0x8a34('0x2f')](_0x18e624['query']);_0x22c4f0[_0x8a34('0x30')]=_[_0x8a34('0x31')](_0x22c4f0['model'],_0x22c4f0[_0x8a34('0x2e')]);_0x3fbb7e['attributes']=_[_0x8a34('0x31')](_0x22c4f0[_0x8a34('0x2c')],qs[_0x8a34('0x32')](_0x18e624['query']['fields']));_0x3fbb7e['attributes']=_0x3fbb7e[_0x8a34('0x33')][_0x8a34('0x34')]?_0x3fbb7e[_0x8a34('0x33')]:_0x22c4f0['model'];if(_0x18e624[_0x8a34('0x2e')][_0x8a34('0x35')]){_0x3fbb7e[_0x8a34('0x36')]=[{'all':!![]}];}_0x3fbb7e=_['merge']({},_0x3fbb7e,_0x18e624[_0x8a34('0x37')]);return db[_0x8a34('0x2d')]['find'](_0x3fbb7e)[_0x8a34('0x25')](handleEntityNotFound(_0x550acc,null))[_0x8a34('0x25')](respondWithResult(_0x550acc,null))[_0x8a34('0x38')](handleError(_0x550acc,null));};exports[_0x8a34('0x39')]=function(_0x488050,_0x4f08f6){return db['ChatProactiveAction'][_0x8a34('0x39')](_0x488050[_0x8a34('0x3a')],{})[_0x8a34('0x25')](respondWithResult(_0x4f08f6,0xc9))[_0x8a34('0x38')](handleError(_0x4f08f6,null));};exports[_0x8a34('0x3b')]=function(_0x24e45d,_0x1def69){if(_0x24e45d['body']['id']){delete _0x24e45d['body']['id'];}return db[_0x8a34('0x2d')][_0x8a34('0x3c')]({'where':{'id':_0x24e45d[_0x8a34('0x2b')]['id']}})[_0x8a34('0x25')](handleEntityNotFound(_0x1def69,null))[_0x8a34('0x25')](saveUpdates(_0x24e45d[_0x8a34('0x3a')],null))[_0x8a34('0x25')](respondWithResult(_0x1def69,null))[_0x8a34('0x38')](handleError(_0x1def69,null));};exports['destroy']=function(_0x33861f,_0x59f246){return db[_0x8a34('0x2d')][_0x8a34('0x3c')]({'where':{'id':_0x33861f[_0x8a34('0x2b')]['id']}})[_0x8a34('0x25')](handleEntityNotFound(_0x59f246,null))[_0x8a34('0x25')](removeEntity(_0x59f246,null))[_0x8a34('0x38')](handleError(_0x59f246,null));};
\ No newline at end of file
index d12d8da..50fe99f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc6e5=['exports','define','ChatProactiveAction','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x280146,_0x5bd8e6){var _0x476c54=function(_0xfa5133){while(--_0xfa5133){_0x280146['push'](_0x280146['shift']());}};_0x476c54(++_0x5bd8e6);}(_0xc6e5,0xed));var _0x5c6e=function(_0xe163e,_0x1867eb){_0xe163e=_0xe163e-0x0;var _0x204772=_0xc6e5[_0xe163e];return _0x204772;};'use strict';var _=require(_0x5c6e('0x0'));var util=require(_0x5c6e('0x1'));var logger=require(_0x5c6e('0x2'))(_0x5c6e('0x3'));var moment=require(_0x5c6e('0x4'));var BPromise=require(_0x5c6e('0x5'));var rp=require(_0x5c6e('0x6'));var fs=require('fs');var path=require(_0x5c6e('0x7'));var rimraf=require(_0x5c6e('0x8'));var config=require(_0x5c6e('0x9'));var attributes=require('./chatProactiveAction.attributes');module[_0x5c6e('0xa')]=function(_0x118639,_0x5e3080){return _0x118639[_0x5c6e('0xb')](_0x5c6e('0xc'),attributes,{'tableName':'chat_proactive_actions','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xde2a=['./chatProactiveAction.attributes','exports','define','ChatProactiveAction','lodash','util','../../config/logger','api'];(function(_0x53d17a,_0x27fee){var _0x3f5557=function(_0x1b4731){while(--_0x1b4731){_0x53d17a['push'](_0x53d17a['shift']());}};_0x3f5557(++_0x27fee);}(_0xde2a,0x164));var _0xade2=function(_0x5b8b97,_0x6b4dfa){_0x5b8b97=_0x5b8b97-0x0;var _0x1fdf84=_0xde2a[_0x5b8b97];return _0x1fdf84;};'use strict';var _=require(_0xade2('0x0'));var util=require(_0xade2('0x1'));var logger=require(_0xade2('0x2'))(_0xade2('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xade2('0x4'));module[_0xade2('0x5')]=function(_0x475e90,_0x2254e0){return _0x475e90[_0xade2('0x6')](_0xade2('0x7'),attributes,{'tableName':'chat_proactive_actions','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 553118b..28f5f82 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc67b=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','http','request','then','info','ChatProactiveAction,\x20%s,\x20%s','debug','ChatProactiveAction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','result','catch','moment'];(function(_0x41909f,_0x32eb77){var _0x50de06=function(_0x29f0e5){while(--_0x29f0e5){_0x41909f['push'](_0x41909f['shift']());}};_0x50de06(++_0x32eb77);}(_0xc67b,0x1df));var _0xbc67=function(_0x138adb,_0x193fee){_0x138adb=_0x138adb-0x0;var _0x1b27f2=_0xc67b[_0x138adb];return _0x1b27f2;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xbc67('0x0'));var BPromise=require(_0xbc67('0x1'));var rs=require(_0xbc67('0x2'));var fs=require('fs');var Redis=require(_0xbc67('0x3'));var db=require(_0xbc67('0x4'))['db'];var utils=require(_0xbc67('0x5'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0xbc67('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x47ca4e,_0x48e160,_0x17a6ad){return new BPromise(function(_0x47e440,_0x3b1ac0){return client[_0xbc67('0x7')](_0x47ca4e,_0x17a6ad)[_0xbc67('0x8')](function(_0x484293){logger[_0xbc67('0x9')](_0xbc67('0xa'),_0x48e160,'request\x20sent');logger[_0xbc67('0xb')](_0xbc67('0xc'),_0x48e160,'request\x20sent',JSON[_0xbc67('0xd')](_0x484293));if(_0x484293[_0xbc67('0xe')]){if(_0x484293[_0xbc67('0xe')][_0xbc67('0xf')]===0x1f4){logger[_0xbc67('0xe')](_0xbc67('0xa'),_0x48e160,_0x484293[_0xbc67('0xe')][_0xbc67('0x10')]);return _0x3b1ac0(_0x484293['error']['message']);}logger[_0xbc67('0xe')](_0xbc67('0xa'),_0x48e160,_0x484293[_0xbc67('0xe')][_0xbc67('0x10')]);return _0x47e440(_0x484293[_0xbc67('0xe')][_0xbc67('0x10')]);}else{logger[_0xbc67('0x9')](_0xbc67('0xa'),_0x48e160,_0xbc67('0x11'));_0x47e440(_0x484293[_0xbc67('0x12')]['message']);}})[_0xbc67('0x13')](function(_0x2adf63){logger[_0xbc67('0xe')](_0xbc67('0xa'),_0x48e160,_0x2adf63);_0x3b1ac0(_0x2adf63);});});}
\ No newline at end of file
+var _0xe5ea=['../../config/environment','jayson/promise','client','http','request','then','info','ChatProactiveAction,\x20%s,\x20%s','ChatProactiveAction,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','result','catch','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x4f758d,_0x39e109){var _0x2a9d1b=function(_0x522b17){while(--_0x522b17){_0x4f758d['push'](_0x4f758d['shift']());}};_0x2a9d1b(++_0x39e109);}(_0xe5ea,0x116));var _0xae5e=function(_0x17aa38,_0x429892){_0x17aa38=_0x17aa38-0x0;var _0x4a8cbb=_0xe5ea[_0x17aa38];return _0x4a8cbb;};'use strict';var _=require(_0xae5e('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xae5e('0x1'));var rs=require(_0xae5e('0x2'));var fs=require('fs');var Redis=require(_0xae5e('0x3'));var db=require(_0xae5e('0x4'))['db'];var utils=require(_0xae5e('0x5'));var logger=require(_0xae5e('0x6'))(_0xae5e('0x7'));var config=require(_0xae5e('0x8'));var jayson=require(_0xae5e('0x9'));var client=jayson[_0xae5e('0xa')][_0xae5e('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x473e21,_0x356df2,_0x378b19){return new BPromise(function(_0x44abf1,_0x3e3915){return client[_0xae5e('0xc')](_0x473e21,_0x378b19)[_0xae5e('0xd')](function(_0x16f473){logger[_0xae5e('0xe')](_0xae5e('0xf'),_0x356df2,'request\x20sent');logger['debug'](_0xae5e('0x10'),_0x356df2,_0xae5e('0x11'),JSON['stringify'](_0x16f473));if(_0x16f473[_0xae5e('0x12')]){if(_0x16f473[_0xae5e('0x12')]['code']===0x1f4){logger[_0xae5e('0x12')](_0xae5e('0xf'),_0x356df2,_0x16f473[_0xae5e('0x12')][_0xae5e('0x13')]);return _0x3e3915(_0x16f473[_0xae5e('0x12')][_0xae5e('0x13')]);}logger[_0xae5e('0x12')]('ChatProactiveAction,\x20%s,\x20%s',_0x356df2,_0x16f473['error'][_0xae5e('0x13')]);return _0x44abf1(_0x16f473[_0xae5e('0x12')][_0xae5e('0x13')]);}else{logger[_0xae5e('0xe')]('ChatProactiveAction,\x20%s,\x20%s',_0x356df2,_0xae5e('0x11'));_0x44abf1(_0x16f473[_0xae5e('0x14')][_0xae5e('0x13')]);}})[_0xae5e('0x15')](function(_0xa5c4fc){logger[_0xae5e('0x12')](_0xae5e('0xf'),_0x356df2,_0xa5c4fc);_0x3e3915(_0xa5c4fc);});});}
\ No newline at end of file
index b1e9b7a..27eb5e4 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(_0x2faddb,_0xc18b78){var _0x273c05=function(_0x1a3785){while(--_0x1a3785){_0x2faddb['push'](_0x2faddb['shift']());}};_0x273c05(++_0xc18b78);}(_0x46ed,0x168));var _0xd46e=function(_0x599f41,_0x4db732){_0x599f41=_0x599f41-0x0;var _0x2e4d58=_0x46ed[_0x599f41];return _0x2e4d58;};'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 _0x3eea=['path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatProactiveAction.controller','get','/:id','post','create','update','isAuthenticated','destroy','multer'];(function(_0x5dd351,_0x19ebc5){var _0x1fbdba=function(_0x58297e){while(--_0x58297e){_0x5dd351['push'](_0x5dd351['shift']());}};_0x1fbdba(++_0x19ebc5);}(_0x3eea,0x1ca));var _0xa3ee=function(_0x4bb80d,_0x304b77){_0x4bb80d=_0x4bb80d-0x0;var _0x5caa9=_0x3eea[_0x4bb80d];return _0x5caa9;};'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')](_0xa3ee('0xb'),auth['isAuthenticated'](),controller['show']);router[_0xa3ee('0xc')]('/',auth['isAuthenticated'](),controller[_0xa3ee('0xd')]);router['put'](_0xa3ee('0xb'),auth['isAuthenticated'](),controller[_0xa3ee('0xe')]);router['delete'](_0xa3ee('0xb'),auth[_0xa3ee('0xf')](),controller[_0xa3ee('0x10')]);module['exports']=router;
\ No newline at end of file
index 524ebda..1df1ba0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9794=['rrmemory','beepall','roundrobin','sequelize','exports','STRING','name','ENUM'];(function(_0x17a22a,_0x4d1ba7){var _0x1c1735=function(_0x1fac7d){while(--_0x1fac7d){_0x17a22a['push'](_0x17a22a['shift']());}};_0x1c1735(++_0x4d1ba7);}(_0x9794,0x113));var _0x4979=function(_0x370c77,_0x4b8e85){_0x370c77=_0x370c77-0x0;var _0x5a7ef7=_0x9794[_0x370c77];return _0x5a7ef7;};'use strict';var Sequelize=require(_0x4979('0x0'));module[_0x4979('0x1')]={'name':{'type':Sequelize[_0x4979('0x2')],'unique':_0x4979('0x3'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x4979('0x2')]},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x4979('0x4')](_0x4979('0x5'),_0x4979('0x6'),_0x4979('0x7'))}};
\ No newline at end of file
+var _0xf1b4=['name','INTEGER','ENUM','rrmemory','beepall','roundrobin','sequelize','exports','STRING'];(function(_0x5c0bed,_0x178478){var _0x603226=function(_0xe97300){while(--_0xe97300){_0x5c0bed['push'](_0x5c0bed['shift']());}};_0x603226(++_0x178478);}(_0xf1b4,0x1c8));var _0x4f1b=function(_0x3bfc09,_0x395372){_0x3bfc09=_0x3bfc09-0x0;var _0x56c17f=_0xf1b4[_0x3bfc09];return _0x56c17f;};'use strict';var Sequelize=require(_0x4f1b('0x0'));module[_0x4f1b('0x1')]={'name':{'type':Sequelize[_0x4f1b('0x2')],'unique':_0x4f1b('0x3'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x4f1b('0x2')]},'timeout':{'type':Sequelize[_0x4f1b('0x4')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x4f1b('0x5')](_0x4f1b('0x6'),_0x4f1b('0x7'),_0x4f1b('0x8'))}};
\ No newline at end of file
index c9f29ce..f99c398 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x48d5=['voicePause','flatMap','Agents','sequelize','transaction','UserChatQueue','findOrCreate','forEach','emit','userChatQueue:save','removeTeams','select','tq.TeamId','join','user_has_teams','ChatQueueId\x20=\x20?','ut.UserId\x20=\x20?','toString','every','TeamId','includes','union','compact','userChatQueue:remove','addAgents','omit','spread','removeAgents','util','squel','ioredis','../../components/parsers/qs','../../config/logger','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./chatQueue.socket','register','status','end','json','offset','undefined','limit','count','set','Content-Range','then','destroy','get','ChatQueues','error','stack','name','send','index','map','ChatQueue','rawAttributes','fieldName','key','getOptions','include','query','findAll','rows','catch','show','params','model','keys','intersection','attributes','fields','length','includeAll','merge','options','find','create','body','user','role','userProfileId','autoAssociation','UserProfileResource','update','describe','getMembers','findOne','filters','hasOwnProperty','nolimit','order','sort','pick','ChatQueueId','filter','where','User','findAndCountAll','chatPause','createdAt','format','updatedAt','getTeams','addTeams','ids','Team','online'];(function(_0x5c99d5,_0x41a4ac){var _0x1e6020=function(_0x51d9c9){while(--_0x51d9c9){_0x5c99d5['push'](_0x5c99d5['shift']());}};_0x1e6020(++_0x41a4ac);}(_0x48d5,0xfc));var _0x548d=function(_0x28be72,_0x2b83af){_0x28be72=_0x28be72-0x0;var _0x46c5da=_0x48d5[_0x28be72];return _0x46c5da;};'use strict';var BPromise=require('bluebird');var util=require(_0x548d('0x0'));var _=require('lodash');var squel=require(_0x548d('0x1'));var Redis=require(_0x548d('0x2'));var qs=require(_0x548d('0x3'));var logger=require(_0x548d('0x4'))('api');var config=require('../../config/environment');var db=require(_0x548d('0x5'))['db'];config['redis']=_[_0x548d('0x6')](config[_0x548d('0x7')],{'host':_0x548d('0x8'),'port':0x18eb});var socket=require(_0x548d('0x9'))(new Redis(config[_0x548d('0x7')]));require(_0x548d('0xa'))[_0x548d('0xb')](socket);function respondWithStatusCode(_0x6d3986,_0x5ad580){_0x5ad580=_0x5ad580||0xcc;return function(_0x26f5c9){if(_0x26f5c9){return _0x6d3986['sendStatus'](_0x5ad580);}return _0x6d3986[_0x548d('0xc')](_0x5ad580)[_0x548d('0xd')]();};}function respondWithResult(_0x59a1dd,_0x1d32f0){_0x1d32f0=_0x1d32f0||0xc8;return function(_0x5ea980){if(_0x5ea980){return _0x59a1dd[_0x548d('0xc')](_0x1d32f0)[_0x548d('0xe')](_0x5ea980);}};}function respondWithFilteredResult(_0x436363,_0x7666fd){return function(_0x48423d){if(_0x48423d){var _0x3620a2=typeof _0x7666fd[_0x548d('0xf')]===_0x548d('0x10')&&typeof _0x7666fd[_0x548d('0x11')]===_0x548d('0x10');var _0x31bb3a=_0x48423d[_0x548d('0x12')];var _0x10ad2c=_0x3620a2?0x0:_0x7666fd[_0x548d('0xf')];var _0x55cf5a=_0x3620a2?_0x48423d[_0x548d('0x12')]:_0x7666fd['offset']+_0x7666fd[_0x548d('0x11')];var _0xda6e14;if(_0x55cf5a>=_0x31bb3a){_0x55cf5a=_0x31bb3a;_0xda6e14=0xc8;}else{_0xda6e14=0xce;}_0x436363[_0x548d('0xc')](_0xda6e14);return _0x436363[_0x548d('0x13')](_0x548d('0x14'),_0x10ad2c+'-'+_0x55cf5a+'/'+_0x31bb3a)['json'](_0x48423d);}return null;};}function saveUpdates(_0x5b21db){return function(_0x436643){if(_0x436643){return _0x436643['update'](_0x5b21db)[_0x548d('0x15')](function(_0x55f258){return _0x55f258;});}return null;};}function removeEntity(_0xd3b5bd){return function(_0x5dca87){if(_0x5dca87){return _0x5dca87[_0x548d('0x16')]()[_0x548d('0x15')](function(){var _0x4c25fc=_0x5dca87[_0x548d('0x17')]({'plain':!![]});var _0x3a9c2f=_0x548d('0x18');return db['UserProfileResource']['destroy']({'where':{'type':_0x3a9c2f,'resourceId':_0x4c25fc['id']}})[_0x548d('0x15')](function(){return _0x5dca87;});})['then'](function(){_0xd3b5bd[_0x548d('0xc')](0xcc)[_0x548d('0xd')]();});}};}function handleEntityNotFound(_0x5af731){return function(_0x1054e4){if(!_0x1054e4){_0x5af731['sendStatus'](0x194);}return _0x1054e4;};}function handleError(_0x35c9b2,_0x436843){_0x436843=_0x436843||0x1f4;return function(_0x1f24b6){logger[_0x548d('0x19')](_0x1f24b6[_0x548d('0x1a')]);if(_0x1f24b6[_0x548d('0x1b')]){delete _0x1f24b6[_0x548d('0x1b')];}_0x35c9b2['status'](_0x436843)[_0x548d('0x1c')](_0x1f24b6);};}exports[_0x548d('0x1d')]=function(_0x5a8fab,_0x2fb619){var _0xa8239a={};var _0x75f768={'count':0x0,'rows':[]};var _0x416587=_[_0x548d('0x1e')](db[_0x548d('0x1f')][_0x548d('0x20')],function(_0x369bbf){return{'name':_0x369bbf[_0x548d('0x21')],'type':_0x369bbf['type'][_0x548d('0x22')]};});_0xa8239a=qs[_0x548d('0x23')](_0x416587,_0x5a8fab);var _0x495f0c={'where':_0xa8239a['where']};return db['ChatQueue'][_0x548d('0x12')](_0x495f0c)[_0x548d('0x15')](function(_0x265b05){_0x75f768['count']=_0x265b05;_0xa8239a[_0x548d('0x24')]=qs['include'](_0x5a8fab[_0x548d('0x25')]);return db[_0x548d('0x1f')][_0x548d('0x26')](_0xa8239a);})['then'](function(_0xb96e0){_0x75f768[_0x548d('0x27')]=_0xb96e0;return _0x75f768;})[_0x548d('0x15')](respondWithFilteredResult(_0x2fb619,_0xa8239a))[_0x548d('0x28')](handleError(_0x2fb619,null));};exports[_0x548d('0x29')]=function(_0x2e671a,_0x22c99a){var _0x33a4ae={'raw':!![],'where':{'id':_0x2e671a[_0x548d('0x2a')]['id']}},_0x1a50df={};_0x1a50df[_0x548d('0x2b')]=_[_0x548d('0x2c')](db[_0x548d('0x1f')][_0x548d('0x20')]);_0x1a50df[_0x548d('0x25')]=_[_0x548d('0x2c')](_0x2e671a[_0x548d('0x25')]);_0x1a50df['filters']=_[_0x548d('0x2d')](_0x1a50df['model'],_0x1a50df[_0x548d('0x25')]);_0x33a4ae[_0x548d('0x2e')]=_['intersection'](_0x1a50df[_0x548d('0x2b')],qs[_0x548d('0x2f')](_0x2e671a[_0x548d('0x25')][_0x548d('0x2f')]));_0x33a4ae[_0x548d('0x2e')]=_0x33a4ae[_0x548d('0x2e')][_0x548d('0x30')]?_0x33a4ae['attributes']:_0x1a50df['model'];if(_0x2e671a['query'][_0x548d('0x31')]){_0x33a4ae[_0x548d('0x24')]=[{'all':!![]}];}_0x33a4ae=_[_0x548d('0x32')]({},_0x33a4ae,_0x2e671a[_0x548d('0x33')]);return db[_0x548d('0x1f')][_0x548d('0x34')](_0x33a4ae)['then'](handleEntityNotFound(_0x22c99a,null))['then'](respondWithResult(_0x22c99a,null))[_0x548d('0x28')](handleError(_0x22c99a,null));};exports[_0x548d('0x35')]=function(_0x1aef2c,_0x5712b4){return db[_0x548d('0x1f')]['create'](_0x1aef2c[_0x548d('0x36')],{})[_0x548d('0x15')](function(_0x4d5ebb){var _0x496f7b=_0x1aef2c[_0x548d('0x37')][_0x548d('0x17')]({'plain':!![]});if(!_0x496f7b)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x496f7b[_0x548d('0x38')]===_0x548d('0x37')){var _0x349659=_0x4d5ebb['get']({'plain':!![]});var _0x5f2f6b='ChatQueues';return db['UserProfileSection']['find']({'where':{'name':_0x5f2f6b,'userProfileId':_0x496f7b[_0x548d('0x39')]},'raw':!![]})['then'](function(_0x5e6563){if(_0x5e6563&&_0x5e6563[_0x548d('0x3a')]===0x0){return db[_0x548d('0x3b')]['create']({'name':_0x349659[_0x548d('0x1b')],'resourceId':_0x349659['id'],'type':_0x5e6563[_0x548d('0x1b')],'sectionId':_0x5e6563['id']},{})[_0x548d('0x15')](function(){return _0x4d5ebb;});}else{return _0x4d5ebb;}})[_0x548d('0x28')](function(_0x5b33cb){logger[_0x548d('0x19')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x5b33cb);throw _0x5b33cb;});}return _0x4d5ebb;})['then'](respondWithResult(_0x5712b4,0xc9))[_0x548d('0x28')](handleError(_0x5712b4,null));};exports[_0x548d('0x3c')]=function(_0x4faceb,_0x25faf5){if(_0x4faceb['body']['id']){delete _0x4faceb[_0x548d('0x36')]['id'];}return db['ChatQueue'][_0x548d('0x34')]({'where':{'id':_0x4faceb[_0x548d('0x2a')]['id']}})[_0x548d('0x15')](handleEntityNotFound(_0x25faf5,null))[_0x548d('0x15')](saveUpdates(_0x4faceb[_0x548d('0x36')],null))[_0x548d('0x15')](respondWithResult(_0x25faf5,null))[_0x548d('0x28')](handleError(_0x25faf5,null));};exports[_0x548d('0x16')]=function(_0x5ae193,_0x2af626){return db['ChatQueue'][_0x548d('0x34')]({'where':{'id':_0x5ae193[_0x548d('0x2a')]['id']}})['then'](handleEntityNotFound(_0x2af626,null))[_0x548d('0x15')](removeEntity(_0x2af626,null))[_0x548d('0x28')](handleError(_0x2af626,null));};exports[_0x548d('0x3d')]=function(_0x40da97,_0x5b2b94){return db[_0x548d('0x1f')]['describe']()['then'](respondWithResult(_0x5b2b94,null))['catch'](handleError(_0x5b2b94,null));};exports[_0x548d('0x3e')]=function(_0xa0a13a,_0x536463){var _0x17d695={'raw':!![],'where':{}},_0x4244b8={},_0x1b6317;return db[_0x548d('0x1f')][_0x548d('0x3f')]({'where':{'id':_0xa0a13a['params']['id']}})[_0x548d('0x15')](handleEntityNotFound(_0x536463,null))[_0x548d('0x15')](function(_0x34fb28){if(_0x34fb28){_0x1b6317=_0x34fb28[_0x548d('0x17')]({'plain':!![]});_0x4244b8[_0x548d('0x2b')]=_[_0x548d('0x2c')](db['UserChatQueue'][_0x548d('0x20')]);_0x4244b8['query']=_[_0x548d('0x2c')](_0xa0a13a[_0x548d('0x25')]);_0x4244b8[_0x548d('0x40')]=_[_0x548d('0x2d')](_0x4244b8['model'],_0x4244b8[_0x548d('0x25')]);_0x17d695['attributes']=_[_0x548d('0x2d')](_0x4244b8[_0x548d('0x2b')],qs[_0x548d('0x2f')](_0xa0a13a[_0x548d('0x25')]['fields']));_0x17d695[_0x548d('0x2e')]=_0x17d695[_0x548d('0x2e')][_0x548d('0x30')]?_0x17d695[_0x548d('0x2e')]:_0x4244b8[_0x548d('0x2b')];if(!_0xa0a13a[_0x548d('0x25')][_0x548d('0x41')](_0x548d('0x42'))){_0x17d695[_0x548d('0x11')]=qs[_0x548d('0x11')](_0xa0a13a[_0x548d('0x25')][_0x548d('0x11')]);_0x17d695[_0x548d('0xf')]=qs[_0x548d('0xf')](_0xa0a13a[_0x548d('0x25')][_0x548d('0xf')]);}_0x17d695[_0x548d('0x43')]=qs['sort'](_0xa0a13a[_0x548d('0x25')][_0x548d('0x44')]);_0x17d695['where']=qs[_0x548d('0x40')](_[_0x548d('0x45')](_0xa0a13a[_0x548d('0x25')],_0x4244b8['filters']));_0x17d695['where'][_0x548d('0x46')]=_0x34fb28['id'];if(_0xa0a13a[_0x548d('0x25')][_0x548d('0x47')]){_0x17d695[_0x548d('0x48')]=_[_0x548d('0x32')](_0x17d695[_0x548d('0x48')],{'$or':_[_0x548d('0x1e')](_0x17d695[_0x548d('0x2e')],function(_0xd6716c){var _0x2e0126={};_0x2e0126[_0xd6716c]={'$like':'%'+_0xa0a13a['query']['filter']+'%'};return _0x2e0126;})});}_0x17d695=_['merge']({},_0x17d695,_0xa0a13a[_0x548d('0x33')]);return db['UserChatQueue'][_0x548d('0x26')](_0x17d695);}})[_0x548d('0x15')](function(_0x27bd22){if(_0x27bd22){return db[_0x548d('0x49')][_0x548d('0x4a')]({'where':{'id':_[_0x548d('0x1e')](_0x27bd22,'UserId'),'role':'agent'},'attributes':['id',_0x548d('0x1b'),_0x548d('0x4b'),'updatedAt',_0x548d('0x4c')]});}})[_0x548d('0x15')](function(_0x49e31e){if(_0x49e31e){return{'count':_0x49e31e[_0x548d('0x12')],'rows':_[_0x548d('0x1e')](_0x49e31e['rows'],function(_0x14788c){return{'membername':_0x14788c['name'],'UserId':_0x14788c['id'],'queue_name':_0x1b6317[_0x548d('0x1b')],'ChatQueueId':_0x1b6317['id'],'interface':util[_0x548d('0x4d')]('%s/%s','SIP',_0x14788c['name']),'penalty':0x0,'paused':_0x14788c[_0x548d('0x4b')],'createdAt':_0x14788c[_0x548d('0x4c')],'updatedAt':_0x14788c[_0x548d('0x4e')]};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0x536463,_0x17d695))[_0x548d('0x28')](handleError(_0x536463,null));};exports['getTeams']=function(_0x254d32,_0xcc90ce){var _0x46ed1b={};var _0x697d18={};var _0x21b5f3;var _0x1b2e8e;return db['ChatQueue'][_0x548d('0x3f')]({'where':{'id':_0x254d32[_0x548d('0x2a')]['id']}})[_0x548d('0x15')](handleEntityNotFound(_0xcc90ce,null))[_0x548d('0x15')](function(_0x23dfaf){if(_0x23dfaf){_0x21b5f3=_0x23dfaf;_0x697d18[_0x548d('0x2b')]=_[_0x548d('0x2c')](db['Team'][_0x548d('0x20')]);_0x697d18['query']=_[_0x548d('0x2c')](_0x254d32[_0x548d('0x25')]);_0x697d18[_0x548d('0x40')]=_[_0x548d('0x2d')](_0x697d18['model'],_0x697d18[_0x548d('0x25')]);_0x46ed1b['attributes']=_[_0x548d('0x2d')](_0x697d18['model'],qs[_0x548d('0x2f')](_0x254d32['query'][_0x548d('0x2f')]));_0x46ed1b[_0x548d('0x2e')]=_0x46ed1b['attributes'][_0x548d('0x30')]?_0x46ed1b[_0x548d('0x2e')]:_0x697d18[_0x548d('0x2b')];_0x46ed1b[_0x548d('0x43')]=qs['sort'](_0x254d32['query'][_0x548d('0x44')]);_0x46ed1b['where']=qs['filters'](_[_0x548d('0x45')](_0x254d32[_0x548d('0x25')],_0x697d18[_0x548d('0x40')]));if(_0x254d32[_0x548d('0x25')][_0x548d('0x47')]){_0x46ed1b[_0x548d('0x48')]=_['merge'](_0x46ed1b[_0x548d('0x48')],{'$or':_[_0x548d('0x1e')](_0x46ed1b[_0x548d('0x2e')],function(_0x1b1510){var _0x5f15dd={};_0x5f15dd[_0x1b1510]={'$like':'%'+_0x254d32[_0x548d('0x25')][_0x548d('0x47')]+'%'};return _0x5f15dd;})});}_0x46ed1b=_[_0x548d('0x32')]({},_0x46ed1b,_0x254d32[_0x548d('0x33')]);return _0x21b5f3[_0x548d('0x4f')](_0x46ed1b);}})[_0x548d('0x15')](function(_0x84d109){if(_0x84d109){_0x1b2e8e=_0x84d109[_0x548d('0x30')];if(!_0x254d32[_0x548d('0x25')][_0x548d('0x41')]('nolimit')){_0x46ed1b[_0x548d('0x11')]=qs[_0x548d('0x11')](_0x254d32[_0x548d('0x25')][_0x548d('0x11')]);_0x46ed1b[_0x548d('0xf')]=qs[_0x548d('0xf')](_0x254d32[_0x548d('0x25')][_0x548d('0xf')]);}return _0x21b5f3[_0x548d('0x4f')](_0x46ed1b);}})['then'](function(_0x306805){if(_0x306805){return _0x306805?{'count':_0x1b2e8e,'rows':_0x306805}:null;}})[_0x548d('0x15')](respondWithResult(_0xcc90ce,null))[_0x548d('0x28')](handleError(_0xcc90ce,null));};exports[_0x548d('0x50')]=function(_0x42ee11,_0x48f70b){var _0x2cb1bd=_0x42ee11[_0x548d('0x36')][_0x548d('0x51')];return db[_0x548d('0x52')]['findAll']({'where':{'id':_0x2cb1bd},'attributes':['id'],'include':[{'model':db[_0x548d('0x49')],'as':'Agents','attributes':['id',_0x548d('0x1b'),_0x548d('0x53'),_0x548d('0x54'),'interface'],'raw':!![]}]})['then'](function(_0x3ec48d){if(_0x3ec48d){var _0x4a1517=_[_0x548d('0x55')](_0x3ec48d,function(_0x49d9b6){var _0x480273=_0x49d9b6['get']({'plain':!![]});return _0x480273[_0x548d('0x56')];});return db['ChatQueue'][_0x548d('0x34')]({'where':{'id':_0x42ee11[_0x548d('0x2a')]['id']}})['then'](function(_0x157d7d){return db[_0x548d('0x57')][_0x548d('0x58')](function(_0x54dd52){return _0x157d7d[_0x548d('0x50')](_0x2cb1bd,{'transaction':_0x54dd52})[_0x548d('0x15')](function(){return BPromise['each'](_0x4a1517,function(_0x3e682b){return db[_0x548d('0x59')][_0x548d('0x5a')]({'where':{'UserId':_0x3e682b['id'],'ChatQueueId':_0x42ee11['params']['id']},'transaction':_0x54dd52});});})[_0x548d('0x15')](function(){_0x4a1517[_0x548d('0x5b')](function(_0x1aeefd){socket[_0x548d('0x5c')](_0x548d('0x5d'),{'UserId':_0x1aeefd['id'],'ChatQueueId':_0x157d7d['id']});});});});});}})[_0x548d('0x15')](respondWithStatusCode(_0x48f70b,null))[_0x548d('0x28')](handleError(_0x48f70b,null));};exports[_0x548d('0x5e')]=function(_0x263d7f,_0x503c9a){return db[_0x548d('0x52')][_0x548d('0x26')]({'where':{'id':_0x263d7f[_0x548d('0x25')][_0x548d('0x51')]},'attributes':['id'],'include':[{'model':db[_0x548d('0x49')],'as':_0x548d('0x56'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x503c9a,null))[_0x548d('0x15')](function(_0x10b47a){var _0x3646ae=_[_0x548d('0x1e')](_0x10b47a,'id');var _0x222795=[];var _0x1c6ba5=[];var _0x30cd32=squel[_0x548d('0x5f')]();_0x30cd32['field'](_0x548d('0x60'))['from']('team_has_chat_queues','tq')[_0x548d('0x61')](_0x548d('0x62'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0x548d('0x48')](_0x548d('0x63'),_0x263d7f[_0x548d('0x2a')]['id']);for(var _0x54b102=0x0;_0x54b102<_0x10b47a[_0x548d('0x30')];_0x54b102+=0x1){let _0x3e2dfc=_0x10b47a[_0x54b102];for(var _0x994934=0x0;_0x994934<_0x3e2dfc['Agents']['length'];_0x994934+=0x1){let _0x4b9258=_0x3e2dfc[_0x548d('0x56')][_0x994934];var _0x24acaa=_0x30cd32['clone']();_0x24acaa[_0x548d('0x48')](_0x548d('0x64'),_0x4b9258['id']);_0x1c6ba5['push'](db['sequelize'][_0x548d('0x25')](_0x24acaa[_0x548d('0x65')](),{'type':db[_0x548d('0x57')]['QueryTypes']['SELECT']})['then'](function(_0x5e5a23){if(_0x5e5a23[_0x548d('0x30')]===0x1){return _0x4b9258['id'];}else{var _0x5eb7c4=_[_0x548d('0x66')](_[_0x548d('0x1e')](_0x5e5a23,_0x548d('0x67')),function(_0x5e331c){return _[_0x548d('0x68')](_0x3646ae,_0x5e331c);});if(_0x5eb7c4){return _0x4b9258['id'];}}}));}}return BPromise['all'](_0x1c6ba5)['then'](function(_0x44003c){_0x222795=_(_0x222795)[_0x548d('0x69')](_0x44003c)[_0x548d('0x6a')]()['value']();return db[_0x548d('0x1f')][_0x548d('0x34')]({'where':{'id':_0x263d7f[_0x548d('0x2a')]['id']}})[_0x548d('0x15')](function(_0x52edbf){return db[_0x548d('0x57')]['transaction'](function(_0x3ba1ae){return _0x52edbf[_0x548d('0x5e')](_0x263d7f[_0x548d('0x25')][_0x548d('0x51')],{'transaction':_0x3ba1ae})[_0x548d('0x15')](function(){if(!_['isEmpty'](_0x222795)){return _0x52edbf['removeAgents'](_0x222795,{'transaction':_0x3ba1ae});}})[_0x548d('0x15')](function(){_0x222795['forEach'](function(_0x2b43bc){socket['emit'](_0x548d('0x6b'),{'UserId':_0x2b43bc,'ChatQueueId':_0x52edbf['id']});});});});});});})[_0x548d('0x15')](respondWithStatusCode(_0x503c9a,null))[_0x548d('0x28')](handleError(_0x503c9a,null));};exports[_0x548d('0x6c')]=function(_0x4e4d2f,_0x1a174b){return db[_0x548d('0x1f')][_0x548d('0x34')]({'where':{'id':_0x4e4d2f[_0x548d('0x2a')]['id']}})[_0x548d('0x15')](handleEntityNotFound(_0x1a174b,null))[_0x548d('0x15')](function(_0x5ca409){if(_0x5ca409){return _0x5ca409[_0x548d('0x6c')](_0x4e4d2f[_0x548d('0x36')]['ids'],_[_0x548d('0x6d')](_0x4e4d2f['body'],['ids','id'])||{})[_0x548d('0x6e')](function(_0x3bf296){for(var _0x403885=0x0;_0x403885<_0x4e4d2f[_0x548d('0x36')]['ids'][_0x548d('0x30')];_0x403885+=0x1){socket['emit'](_0x548d('0x5d'),{'UserId':Number(_0x4e4d2f[_0x548d('0x36')][_0x548d('0x51')][_0x403885]),'ChatQueueId':Number(_0x4e4d2f['params']['id'])});}return _0x3bf296;});}})['then'](respondWithResult(_0x1a174b,null))[_0x548d('0x28')](handleError(_0x1a174b,null));};exports[_0x548d('0x6f')]=function(_0x4bb7c6,_0x207245){return db[_0x548d('0x1f')][_0x548d('0x34')]({'where':{'id':_0x4bb7c6[_0x548d('0x2a')]['id']}})[_0x548d('0x15')](handleEntityNotFound(_0x207245,null))[_0x548d('0x15')](function(_0x16823){if(_0x16823){return _0x16823[_0x548d('0x6f')](_0x4bb7c6[_0x548d('0x25')][_0x548d('0x51')])['then'](function(){if(_['isArray'](_0x4bb7c6[_0x548d('0x25')][_0x548d('0x51')])){for(var _0x378d89=0x0;_0x378d89<_0x4bb7c6['query'][_0x548d('0x51')][_0x548d('0x30')];_0x378d89+=0x1){socket[_0x548d('0x5c')](_0x548d('0x6b'),{'UserId':Number(_0x4bb7c6[_0x548d('0x25')][_0x548d('0x51')][_0x378d89]),'ChatQueueId':Number(_0x4bb7c6[_0x548d('0x2a')]['id'])});}}else{socket[_0x548d('0x5c')](_0x548d('0x6b'),{'UserId':Number(_0x4bb7c6[_0x548d('0x25')][_0x548d('0x51')]),'ChatQueueId':Number(_0x4bb7c6[_0x548d('0x2a')]['id'])});}});}})['then'](respondWithStatusCode(_0x207245,null))[_0x548d('0x28')](handleError(_0x207245,null));};exports['getAgents']=function(_0x579b19,_0x442167){var _0x43c873={};var _0x1a8e56={};var _0x4f1da4;var _0x47b9bc;return db[_0x548d('0x1f')]['findOne']({'where':{'id':_0x579b19[_0x548d('0x2a')]['id']}})[_0x548d('0x15')](handleEntityNotFound(_0x442167,null))[_0x548d('0x15')](function(_0x1abd2e){if(_0x1abd2e){_0x4f1da4=_0x1abd2e;_0x1a8e56[_0x548d('0x2b')]=_['keys'](db[_0x548d('0x49')][_0x548d('0x20')]);_0x1a8e56['query']=_[_0x548d('0x2c')](_0x579b19[_0x548d('0x25')]);_0x1a8e56['filters']=_['intersection'](_0x1a8e56[_0x548d('0x2b')],_0x1a8e56[_0x548d('0x25')]);_0x43c873[_0x548d('0x2e')]=_[_0x548d('0x2d')](_0x1a8e56[_0x548d('0x2b')],qs[_0x548d('0x2f')](_0x579b19['query'][_0x548d('0x2f')]));_0x43c873['attributes']=_0x43c873[_0x548d('0x2e')][_0x548d('0x30')]?_0x43c873[_0x548d('0x2e')]:_0x1a8e56[_0x548d('0x2b')];_0x43c873[_0x548d('0x43')]=qs[_0x548d('0x44')](_0x579b19[_0x548d('0x25')][_0x548d('0x44')]);_0x43c873['where']=qs[_0x548d('0x40')](_[_0x548d('0x45')](_0x579b19[_0x548d('0x25')],_0x1a8e56[_0x548d('0x40')]));if(_0x579b19[_0x548d('0x25')]['filter']){_0x43c873[_0x548d('0x48')]=_['merge'](_0x43c873[_0x548d('0x48')],{'$or':_[_0x548d('0x1e')](_0x43c873[_0x548d('0x2e')],function(_0x300ecc){var _0xd94f37={};_0xd94f37[_0x300ecc]={'$like':'%'+_0x579b19[_0x548d('0x25')]['filter']+'%'};return _0xd94f37;})});}_0x43c873=_[_0x548d('0x32')]({},_0x43c873,_0x579b19['options']);return _0x4f1da4['getAgents'](_0x43c873);}})['then'](function(_0x123da8){if(_0x123da8){_0x47b9bc=_0x123da8[_0x548d('0x30')];if(!_0x579b19['query'][_0x548d('0x41')](_0x548d('0x42'))){_0x43c873[_0x548d('0x11')]=qs[_0x548d('0x11')](_0x579b19[_0x548d('0x25')][_0x548d('0x11')]);_0x43c873[_0x548d('0xf')]=qs[_0x548d('0xf')](_0x579b19[_0x548d('0x25')][_0x548d('0xf')]);}return _0x4f1da4['getAgents'](_0x43c873);}})[_0x548d('0x15')](function(_0x3f9596){if(_0x3f9596){return _0x3f9596?{'count':_0x47b9bc,'rows':_0x3f9596}:null;}})[_0x548d('0x15')](respondWithResult(_0x442167,null))['catch'](handleError(_0x442167,null));};
\ No newline at end of file
+var _0x4fa7=['join','ut.TeamId\x20=\x20tq.TeamId','ChatQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','toString','SELECT','every','TeamId','includes','all','union','compact','value','isEmpty','removeAgents','userChatQueue:remove','addAgents','omit','isArray','getAgents','lodash','squel','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./chatQueue.socket','register','sendStatus','end','status','json','offset','undefined','limit','count','then','ChatQueues','UserProfileResource','destroy','error','stack','name','send','index','ChatQueue','rawAttributes','fieldName','type','key','getOptions','include','query','show','params','model','keys','intersection','fields','attributes','length','includeAll','merge','options','find','catch','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','update','describe','getMembers','findOne','filters','nolimit','order','sort','where','ChatQueueId','filter','map','UserChatQueue','User','findAndCountAll','UserId','agent','chatPause','updatedAt','createdAt','format','SIP','getTeams','Team','pick','ids','findAll','online','Agents','sequelize','transaction','addTeams','each','findOrCreate','forEach','emit','userChatQueue:save','removeTeams','field'];(function(_0x137724,_0x1c9ab8){var _0x5eecc4=function(_0x2836da){while(--_0x2836da){_0x137724['push'](_0x137724['shift']());}};_0x5eecc4(++_0x1c9ab8);}(_0x4fa7,0x17a));var _0x74fa=function(_0x9e0cb3,_0x9cd497){_0x9e0cb3=_0x9e0cb3-0x0;var _0x5926b7=_0x4fa7[_0x9e0cb3];return _0x5926b7;};'use strict';var BPromise=require('bluebird');var util=require('util');var _=require(_0x74fa('0x0'));var squel=require(_0x74fa('0x1'));var Redis=require('ioredis');var qs=require(_0x74fa('0x2'));var logger=require(_0x74fa('0x3'))(_0x74fa('0x4'));var config=require(_0x74fa('0x5'));var db=require(_0x74fa('0x6'))['db'];config['redis']=_[_0x74fa('0x7')](config[_0x74fa('0x8')],{'host':_0x74fa('0x9'),'port':0x18eb});var socket=require(_0x74fa('0xa'))(new Redis(config[_0x74fa('0x8')]));require(_0x74fa('0xb'))[_0x74fa('0xc')](socket);function respondWithStatusCode(_0x3df2a6,_0x16d4bb){_0x16d4bb=_0x16d4bb||0xcc;return function(_0x11e296){if(_0x11e296){return _0x3df2a6[_0x74fa('0xd')](_0x16d4bb);}return _0x3df2a6['status'](_0x16d4bb)[_0x74fa('0xe')]();};}function respondWithResult(_0x18df78,_0x344fc1){_0x344fc1=_0x344fc1||0xc8;return function(_0x39d3ba){if(_0x39d3ba){return _0x18df78[_0x74fa('0xf')](_0x344fc1)[_0x74fa('0x10')](_0x39d3ba);}};}function respondWithFilteredResult(_0x1c04c4,_0x1c96d0){return function(_0x5326b7){if(_0x5326b7){var _0x5e098f=typeof _0x1c96d0[_0x74fa('0x11')]===_0x74fa('0x12')&&typeof _0x1c96d0[_0x74fa('0x13')]===_0x74fa('0x12');var _0x27a323=_0x5326b7[_0x74fa('0x14')];var _0x480d60=_0x5e098f?0x0:_0x1c96d0[_0x74fa('0x11')];var _0x421720=_0x5e098f?_0x5326b7[_0x74fa('0x14')]:_0x1c96d0[_0x74fa('0x11')]+_0x1c96d0[_0x74fa('0x13')];var _0x42680a;if(_0x421720>=_0x27a323){_0x421720=_0x27a323;_0x42680a=0xc8;}else{_0x42680a=0xce;}_0x1c04c4[_0x74fa('0xf')](_0x42680a);return _0x1c04c4['set']('Content-Range',_0x480d60+'-'+_0x421720+'/'+_0x27a323)[_0x74fa('0x10')](_0x5326b7);}return null;};}function saveUpdates(_0x3a1f02){return function(_0x5a0cf6){if(_0x5a0cf6){return _0x5a0cf6['update'](_0x3a1f02)[_0x74fa('0x15')](function(_0x31987e){return _0x31987e;});}return null;};}function removeEntity(_0x624efe){return function(_0x582f48){if(_0x582f48){return _0x582f48['destroy']()[_0x74fa('0x15')](function(){var _0x325674=_0x582f48['get']({'plain':!![]});var _0x15b1c1=_0x74fa('0x16');return db[_0x74fa('0x17')][_0x74fa('0x18')]({'where':{'type':_0x15b1c1,'resourceId':_0x325674['id']}})[_0x74fa('0x15')](function(){return _0x582f48;});})[_0x74fa('0x15')](function(){_0x624efe['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0xe66ee1){return function(_0x2d23e7){if(!_0x2d23e7){_0xe66ee1['sendStatus'](0x194);}return _0x2d23e7;};}function handleError(_0x4d95d3,_0x9f7266){_0x9f7266=_0x9f7266||0x1f4;return function(_0x4f9b19){logger[_0x74fa('0x19')](_0x4f9b19[_0x74fa('0x1a')]);if(_0x4f9b19[_0x74fa('0x1b')]){delete _0x4f9b19[_0x74fa('0x1b')];}_0x4d95d3[_0x74fa('0xf')](_0x9f7266)[_0x74fa('0x1c')](_0x4f9b19);};}exports[_0x74fa('0x1d')]=function(_0x3e9afb,_0x1bf5c4){var _0x429157={};var _0x32b747={'count':0x0,'rows':[]};var _0x3184a8=_['map'](db[_0x74fa('0x1e')][_0x74fa('0x1f')],function(_0x3b666f){return{'name':_0x3b666f[_0x74fa('0x20')],'type':_0x3b666f[_0x74fa('0x21')][_0x74fa('0x22')]};});_0x429157=qs[_0x74fa('0x23')](_0x3184a8,_0x3e9afb);var _0x47a56f={'where':_0x429157['where']};return db[_0x74fa('0x1e')][_0x74fa('0x14')](_0x47a56f)[_0x74fa('0x15')](function(_0x59f0a8){_0x32b747[_0x74fa('0x14')]=_0x59f0a8;_0x429157[_0x74fa('0x24')]=qs[_0x74fa('0x24')](_0x3e9afb[_0x74fa('0x25')]);return db[_0x74fa('0x1e')]['findAll'](_0x429157);})[_0x74fa('0x15')](function(_0x5eb13a){_0x32b747['rows']=_0x5eb13a;return _0x32b747;})[_0x74fa('0x15')](respondWithFilteredResult(_0x1bf5c4,_0x429157))['catch'](handleError(_0x1bf5c4,null));};exports[_0x74fa('0x26')]=function(_0x4f383a,_0x21fe88){var _0x12e9b5={'raw':!![],'where':{'id':_0x4f383a[_0x74fa('0x27')]['id']}},_0x86df7d={};_0x86df7d[_0x74fa('0x28')]=_['keys'](db[_0x74fa('0x1e')][_0x74fa('0x1f')]);_0x86df7d['query']=_[_0x74fa('0x29')](_0x4f383a['query']);_0x86df7d['filters']=_[_0x74fa('0x2a')](_0x86df7d[_0x74fa('0x28')],_0x86df7d[_0x74fa('0x25')]);_0x12e9b5['attributes']=_[_0x74fa('0x2a')](_0x86df7d['model'],qs[_0x74fa('0x2b')](_0x4f383a['query']['fields']));_0x12e9b5[_0x74fa('0x2c')]=_0x12e9b5[_0x74fa('0x2c')][_0x74fa('0x2d')]?_0x12e9b5[_0x74fa('0x2c')]:_0x86df7d[_0x74fa('0x28')];if(_0x4f383a[_0x74fa('0x25')][_0x74fa('0x2e')]){_0x12e9b5[_0x74fa('0x24')]=[{'all':!![]}];}_0x12e9b5=_[_0x74fa('0x2f')]({},_0x12e9b5,_0x4f383a[_0x74fa('0x30')]);return db['ChatQueue'][_0x74fa('0x31')](_0x12e9b5)[_0x74fa('0x15')](handleEntityNotFound(_0x21fe88,null))[_0x74fa('0x15')](respondWithResult(_0x21fe88,null))[_0x74fa('0x32')](handleError(_0x21fe88,null));};exports[_0x74fa('0x33')]=function(_0x2327a1,_0x5cbec2){return db[_0x74fa('0x1e')][_0x74fa('0x33')](_0x2327a1[_0x74fa('0x34')],{})[_0x74fa('0x15')](function(_0x3619a4){var _0x14c624=_0x2327a1[_0x74fa('0x35')][_0x74fa('0x36')]({'plain':!![]});if(!_0x14c624)throw new Error(_0x74fa('0x37'));if(_0x14c624[_0x74fa('0x38')]===_0x74fa('0x35')){var _0xe15db4=_0x3619a4[_0x74fa('0x36')]({'plain':!![]});var _0x32e559=_0x74fa('0x16');return db[_0x74fa('0x39')]['find']({'where':{'name':_0x32e559,'userProfileId':_0x14c624['userProfileId']},'raw':!![]})['then'](function(_0x2e462c){if(_0x2e462c&&_0x2e462c[_0x74fa('0x3a')]===0x0){return db['UserProfileResource']['create']({'name':_0xe15db4[_0x74fa('0x1b')],'resourceId':_0xe15db4['id'],'type':_0x2e462c['name'],'sectionId':_0x2e462c['id']},{})[_0x74fa('0x15')](function(){return _0x3619a4;});}else{return _0x3619a4;}})[_0x74fa('0x32')](function(_0x2f9f66){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x2f9f66);throw _0x2f9f66;});}return _0x3619a4;})['then'](respondWithResult(_0x5cbec2,0xc9))[_0x74fa('0x32')](handleError(_0x5cbec2,null));};exports[_0x74fa('0x3b')]=function(_0x363859,_0x2deedb){if(_0x363859[_0x74fa('0x34')]['id']){delete _0x363859[_0x74fa('0x34')]['id'];}return db['ChatQueue'][_0x74fa('0x31')]({'where':{'id':_0x363859[_0x74fa('0x27')]['id']}})[_0x74fa('0x15')](handleEntityNotFound(_0x2deedb,null))[_0x74fa('0x15')](saveUpdates(_0x363859[_0x74fa('0x34')],null))[_0x74fa('0x15')](respondWithResult(_0x2deedb,null))[_0x74fa('0x32')](handleError(_0x2deedb,null));};exports['destroy']=function(_0x4cd4e0,_0x22b223){return db[_0x74fa('0x1e')]['find']({'where':{'id':_0x4cd4e0[_0x74fa('0x27')]['id']}})[_0x74fa('0x15')](handleEntityNotFound(_0x22b223,null))[_0x74fa('0x15')](removeEntity(_0x22b223,null))[_0x74fa('0x32')](handleError(_0x22b223,null));};exports[_0x74fa('0x3c')]=function(_0x426b7e,_0x30343b){return db[_0x74fa('0x1e')]['describe']()[_0x74fa('0x15')](respondWithResult(_0x30343b,null))[_0x74fa('0x32')](handleError(_0x30343b,null));};exports[_0x74fa('0x3d')]=function(_0x1df4a5,_0x1da8e2){var _0x4c13cf={'raw':!![],'where':{}},_0x40b451={},_0x36a9a7;return db[_0x74fa('0x1e')][_0x74fa('0x3e')]({'where':{'id':_0x1df4a5[_0x74fa('0x27')]['id']}})[_0x74fa('0x15')](handleEntityNotFound(_0x1da8e2,null))[_0x74fa('0x15')](function(_0x4bb1bc){if(_0x4bb1bc){_0x36a9a7=_0x4bb1bc[_0x74fa('0x36')]({'plain':!![]});_0x40b451[_0x74fa('0x28')]=_[_0x74fa('0x29')](db['UserChatQueue'][_0x74fa('0x1f')]);_0x40b451[_0x74fa('0x25')]=_['keys'](_0x1df4a5[_0x74fa('0x25')]);_0x40b451[_0x74fa('0x3f')]=_['intersection'](_0x40b451[_0x74fa('0x28')],_0x40b451['query']);_0x4c13cf[_0x74fa('0x2c')]=_[_0x74fa('0x2a')](_0x40b451[_0x74fa('0x28')],qs[_0x74fa('0x2b')](_0x1df4a5[_0x74fa('0x25')][_0x74fa('0x2b')]));_0x4c13cf[_0x74fa('0x2c')]=_0x4c13cf[_0x74fa('0x2c')]['length']?_0x4c13cf[_0x74fa('0x2c')]:_0x40b451[_0x74fa('0x28')];if(!_0x1df4a5[_0x74fa('0x25')]['hasOwnProperty'](_0x74fa('0x40'))){_0x4c13cf['limit']=qs[_0x74fa('0x13')](_0x1df4a5[_0x74fa('0x25')]['limit']);_0x4c13cf[_0x74fa('0x11')]=qs['offset'](_0x1df4a5['query'][_0x74fa('0x11')]);}_0x4c13cf[_0x74fa('0x41')]=qs[_0x74fa('0x42')](_0x1df4a5[_0x74fa('0x25')][_0x74fa('0x42')]);_0x4c13cf[_0x74fa('0x43')]=qs['filters'](_['pick'](_0x1df4a5[_0x74fa('0x25')],_0x40b451[_0x74fa('0x3f')]));_0x4c13cf[_0x74fa('0x43')][_0x74fa('0x44')]=_0x4bb1bc['id'];if(_0x1df4a5['query'][_0x74fa('0x45')]){_0x4c13cf['where']=_['merge'](_0x4c13cf[_0x74fa('0x43')],{'$or':_[_0x74fa('0x46')](_0x4c13cf[_0x74fa('0x2c')],function(_0x47ae57){var _0x53d57b={};_0x53d57b[_0x47ae57]={'$like':'%'+_0x1df4a5[_0x74fa('0x25')]['filter']+'%'};return _0x53d57b;})});}_0x4c13cf=_['merge']({},_0x4c13cf,_0x1df4a5[_0x74fa('0x30')]);return db[_0x74fa('0x47')]['findAll'](_0x4c13cf);}})[_0x74fa('0x15')](function(_0xe5d84c){if(_0xe5d84c){return db[_0x74fa('0x48')][_0x74fa('0x49')]({'where':{'id':_[_0x74fa('0x46')](_0xe5d84c,_0x74fa('0x4a')),'role':_0x74fa('0x4b')},'attributes':['id',_0x74fa('0x1b'),_0x74fa('0x4c'),_0x74fa('0x4d'),_0x74fa('0x4e')]});}})[_0x74fa('0x15')](function(_0x37da15){if(_0x37da15){return{'count':_0x37da15[_0x74fa('0x14')],'rows':_[_0x74fa('0x46')](_0x37da15['rows'],function(_0xe8ea79){return{'membername':_0xe8ea79[_0x74fa('0x1b')],'UserId':_0xe8ea79['id'],'queue_name':_0x36a9a7[_0x74fa('0x1b')],'ChatQueueId':_0x36a9a7['id'],'interface':util[_0x74fa('0x4f')]('%s/%s',_0x74fa('0x50'),_0xe8ea79[_0x74fa('0x1b')]),'penalty':0x0,'paused':_0xe8ea79[_0x74fa('0x4c')],'createdAt':_0xe8ea79[_0x74fa('0x4e')],'updatedAt':_0xe8ea79[_0x74fa('0x4d')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x74fa('0x15')](respondWithFilteredResult(_0x1da8e2,_0x4c13cf))['catch'](handleError(_0x1da8e2,null));};exports[_0x74fa('0x51')]=function(_0x410471,_0x2d6430){var _0xbb9d40={};var _0x1bf250={};var _0x467427;var _0x2c96cb;return db['ChatQueue'][_0x74fa('0x3e')]({'where':{'id':_0x410471[_0x74fa('0x27')]['id']}})[_0x74fa('0x15')](handleEntityNotFound(_0x2d6430,null))[_0x74fa('0x15')](function(_0x42b06b){if(_0x42b06b){_0x467427=_0x42b06b;_0x1bf250[_0x74fa('0x28')]=_[_0x74fa('0x29')](db[_0x74fa('0x52')][_0x74fa('0x1f')]);_0x1bf250[_0x74fa('0x25')]=_[_0x74fa('0x29')](_0x410471[_0x74fa('0x25')]);_0x1bf250['filters']=_[_0x74fa('0x2a')](_0x1bf250['model'],_0x1bf250[_0x74fa('0x25')]);_0xbb9d40[_0x74fa('0x2c')]=_[_0x74fa('0x2a')](_0x1bf250[_0x74fa('0x28')],qs['fields'](_0x410471[_0x74fa('0x25')][_0x74fa('0x2b')]));_0xbb9d40[_0x74fa('0x2c')]=_0xbb9d40[_0x74fa('0x2c')][_0x74fa('0x2d')]?_0xbb9d40['attributes']:_0x1bf250[_0x74fa('0x28')];_0xbb9d40['order']=qs[_0x74fa('0x42')](_0x410471[_0x74fa('0x25')][_0x74fa('0x42')]);_0xbb9d40[_0x74fa('0x43')]=qs[_0x74fa('0x3f')](_[_0x74fa('0x53')](_0x410471[_0x74fa('0x25')],_0x1bf250[_0x74fa('0x3f')]));if(_0x410471['query'][_0x74fa('0x45')]){_0xbb9d40['where']=_[_0x74fa('0x2f')](_0xbb9d40[_0x74fa('0x43')],{'$or':_[_0x74fa('0x46')](_0xbb9d40[_0x74fa('0x2c')],function(_0x506bd8){var _0x4e50bf={};_0x4e50bf[_0x506bd8]={'$like':'%'+_0x410471['query'][_0x74fa('0x45')]+'%'};return _0x4e50bf;})});}_0xbb9d40=_[_0x74fa('0x2f')]({},_0xbb9d40,_0x410471[_0x74fa('0x30')]);return _0x467427['getTeams'](_0xbb9d40);}})[_0x74fa('0x15')](function(_0xfae48b){if(_0xfae48b){_0x2c96cb=_0xfae48b['length'];if(!_0x410471[_0x74fa('0x25')]['hasOwnProperty'](_0x74fa('0x40'))){_0xbb9d40['limit']=qs['limit'](_0x410471['query'][_0x74fa('0x13')]);_0xbb9d40[_0x74fa('0x11')]=qs[_0x74fa('0x11')](_0x410471[_0x74fa('0x25')][_0x74fa('0x11')]);}return _0x467427['getTeams'](_0xbb9d40);}})[_0x74fa('0x15')](function(_0x26f691){if(_0x26f691){return _0x26f691?{'count':_0x2c96cb,'rows':_0x26f691}:null;}})[_0x74fa('0x15')](respondWithResult(_0x2d6430,null))[_0x74fa('0x32')](handleError(_0x2d6430,null));};exports['addTeams']=function(_0x803bda,_0x4afb0a){var _0xad2423=_0x803bda[_0x74fa('0x34')][_0x74fa('0x54')];return db[_0x74fa('0x52')][_0x74fa('0x55')]({'where':{'id':_0xad2423},'attributes':['id'],'include':[{'model':db[_0x74fa('0x48')],'as':'Agents','attributes':['id',_0x74fa('0x1b'),_0x74fa('0x56'),'voicePause','interface'],'raw':!![]}]})[_0x74fa('0x15')](function(_0x5c874e){if(_0x5c874e){var _0x16c3ee=_['flatMap'](_0x5c874e,function(_0x1d3a78){var _0x3fa448=_0x1d3a78[_0x74fa('0x36')]({'plain':!![]});return _0x3fa448[_0x74fa('0x57')];});return db[_0x74fa('0x1e')][_0x74fa('0x31')]({'where':{'id':_0x803bda[_0x74fa('0x27')]['id']}})[_0x74fa('0x15')](function(_0x3a1c7c){return db[_0x74fa('0x58')][_0x74fa('0x59')](function(_0x5bb368){return _0x3a1c7c[_0x74fa('0x5a')](_0xad2423,{'transaction':_0x5bb368})[_0x74fa('0x15')](function(){return BPromise[_0x74fa('0x5b')](_0x16c3ee,function(_0x22b1d7){return db['UserChatQueue'][_0x74fa('0x5c')]({'where':{'UserId':_0x22b1d7['id'],'ChatQueueId':_0x803bda['params']['id']},'transaction':_0x5bb368});});})[_0x74fa('0x15')](function(){_0x16c3ee[_0x74fa('0x5d')](function(_0xca1066){socket[_0x74fa('0x5e')](_0x74fa('0x5f'),{'UserId':_0xca1066['id'],'ChatQueueId':_0x3a1c7c['id']});});});});});}})[_0x74fa('0x15')](respondWithStatusCode(_0x4afb0a,null))[_0x74fa('0x32')](handleError(_0x4afb0a,null));};exports[_0x74fa('0x60')]=function(_0x54af26,_0x2ac93c){return db['Team'][_0x74fa('0x55')]({'where':{'id':_0x54af26[_0x74fa('0x25')][_0x74fa('0x54')]},'attributes':['id'],'include':[{'model':db[_0x74fa('0x48')],'as':'Agents','attributes':['id'],'raw':!![]}]})[_0x74fa('0x15')](handleEntityNotFound(_0x2ac93c,null))[_0x74fa('0x15')](function(_0xced71b){var _0x2c567c=_[_0x74fa('0x46')](_0xced71b,'id');var _0x4f748e=[];var _0x483db3=[];var _0x36912b=squel['select']();_0x36912b[_0x74fa('0x61')]('tq.TeamId')['from']('team_has_chat_queues','tq')[_0x74fa('0x62')]('user_has_teams','ut',_0x74fa('0x63'))[_0x74fa('0x43')](_0x74fa('0x64'),_0x54af26[_0x74fa('0x27')]['id']);for(var _0x10d455=0x0;_0x10d455<_0xced71b[_0x74fa('0x2d')];_0x10d455+=0x1){let _0x40d336=_0xced71b[_0x10d455];for(var _0xd93909=0x0;_0xd93909<_0x40d336[_0x74fa('0x57')][_0x74fa('0x2d')];_0xd93909+=0x1){let _0x1d8359=_0x40d336[_0x74fa('0x57')][_0xd93909];var _0x2897df=_0x36912b[_0x74fa('0x65')]();_0x2897df[_0x74fa('0x43')](_0x74fa('0x66'),_0x1d8359['id']);_0x483db3['push'](db[_0x74fa('0x58')]['query'](_0x2897df[_0x74fa('0x67')](),{'type':db[_0x74fa('0x58')]['QueryTypes'][_0x74fa('0x68')]})['then'](function(_0x3639ed){if(_0x3639ed[_0x74fa('0x2d')]===0x1){return _0x1d8359['id'];}else{var _0x3dd57a=_[_0x74fa('0x69')](_[_0x74fa('0x46')](_0x3639ed,_0x74fa('0x6a')),function(_0x31a9e5){return _[_0x74fa('0x6b')](_0x2c567c,_0x31a9e5);});if(_0x3dd57a){return _0x1d8359['id'];}}}));}}return BPromise[_0x74fa('0x6c')](_0x483db3)[_0x74fa('0x15')](function(_0x29e141){_0x4f748e=_(_0x4f748e)[_0x74fa('0x6d')](_0x29e141)[_0x74fa('0x6e')]()[_0x74fa('0x6f')]();return db[_0x74fa('0x1e')][_0x74fa('0x31')]({'where':{'id':_0x54af26[_0x74fa('0x27')]['id']}})[_0x74fa('0x15')](function(_0x264ea0){return db[_0x74fa('0x58')]['transaction'](function(_0x33a2a1){return _0x264ea0['removeTeams'](_0x54af26[_0x74fa('0x25')]['ids'],{'transaction':_0x33a2a1})['then'](function(){if(!_[_0x74fa('0x70')](_0x4f748e)){return _0x264ea0[_0x74fa('0x71')](_0x4f748e,{'transaction':_0x33a2a1});}})[_0x74fa('0x15')](function(){_0x4f748e[_0x74fa('0x5d')](function(_0x3b0f33){socket[_0x74fa('0x5e')](_0x74fa('0x72'),{'UserId':_0x3b0f33,'ChatQueueId':_0x264ea0['id']});});});});});});})[_0x74fa('0x15')](respondWithStatusCode(_0x2ac93c,null))[_0x74fa('0x32')](handleError(_0x2ac93c,null));};exports[_0x74fa('0x73')]=function(_0x5a536a,_0x5dff50){return db[_0x74fa('0x1e')][_0x74fa('0x31')]({'where':{'id':_0x5a536a[_0x74fa('0x27')]['id']}})[_0x74fa('0x15')](handleEntityNotFound(_0x5dff50,null))[_0x74fa('0x15')](function(_0x37a7c2){if(_0x37a7c2){return _0x37a7c2[_0x74fa('0x73')](_0x5a536a[_0x74fa('0x34')][_0x74fa('0x54')],_[_0x74fa('0x74')](_0x5a536a[_0x74fa('0x34')],[_0x74fa('0x54'),'id'])||{})['spread'](function(_0x106b5d){for(var _0x1a962f=0x0;_0x1a962f<_0x5a536a['body'][_0x74fa('0x54')]['length'];_0x1a962f+=0x1){socket['emit'](_0x74fa('0x5f'),{'UserId':Number(_0x5a536a[_0x74fa('0x34')][_0x74fa('0x54')][_0x1a962f]),'ChatQueueId':Number(_0x5a536a[_0x74fa('0x27')]['id'])});}return _0x106b5d;});}})[_0x74fa('0x15')](respondWithResult(_0x5dff50,null))[_0x74fa('0x32')](handleError(_0x5dff50,null));};exports[_0x74fa('0x71')]=function(_0x196211,_0x2540c6){return db['ChatQueue']['find']({'where':{'id':_0x196211[_0x74fa('0x27')]['id']}})[_0x74fa('0x15')](handleEntityNotFound(_0x2540c6,null))[_0x74fa('0x15')](function(_0x2c009c){if(_0x2c009c){return _0x2c009c[_0x74fa('0x71')](_0x196211[_0x74fa('0x25')][_0x74fa('0x54')])['then'](function(){if(_[_0x74fa('0x75')](_0x196211[_0x74fa('0x25')]['ids'])){for(var _0x54799e=0x0;_0x54799e<_0x196211[_0x74fa('0x25')][_0x74fa('0x54')][_0x74fa('0x2d')];_0x54799e+=0x1){socket[_0x74fa('0x5e')](_0x74fa('0x72'),{'UserId':Number(_0x196211[_0x74fa('0x25')][_0x74fa('0x54')][_0x54799e]),'ChatQueueId':Number(_0x196211[_0x74fa('0x27')]['id'])});}}else{socket[_0x74fa('0x5e')](_0x74fa('0x72'),{'UserId':Number(_0x196211[_0x74fa('0x25')][_0x74fa('0x54')]),'ChatQueueId':Number(_0x196211['params']['id'])});}});}})[_0x74fa('0x15')](respondWithStatusCode(_0x2540c6,null))['catch'](handleError(_0x2540c6,null));};exports[_0x74fa('0x76')]=function(_0x5baf46,_0xcab07b){var _0x53d668={};var _0x199da4={};var _0x4268ff;var _0x112e03;return db[_0x74fa('0x1e')][_0x74fa('0x3e')]({'where':{'id':_0x5baf46[_0x74fa('0x27')]['id']}})['then'](handleEntityNotFound(_0xcab07b,null))[_0x74fa('0x15')](function(_0x74e7bb){if(_0x74e7bb){_0x4268ff=_0x74e7bb;_0x199da4[_0x74fa('0x28')]=_[_0x74fa('0x29')](db[_0x74fa('0x48')][_0x74fa('0x1f')]);_0x199da4[_0x74fa('0x25')]=_[_0x74fa('0x29')](_0x5baf46[_0x74fa('0x25')]);_0x199da4[_0x74fa('0x3f')]=_[_0x74fa('0x2a')](_0x199da4[_0x74fa('0x28')],_0x199da4[_0x74fa('0x25')]);_0x53d668['attributes']=_['intersection'](_0x199da4['model'],qs['fields'](_0x5baf46[_0x74fa('0x25')]['fields']));_0x53d668[_0x74fa('0x2c')]=_0x53d668[_0x74fa('0x2c')][_0x74fa('0x2d')]?_0x53d668[_0x74fa('0x2c')]:_0x199da4[_0x74fa('0x28')];_0x53d668[_0x74fa('0x41')]=qs[_0x74fa('0x42')](_0x5baf46[_0x74fa('0x25')][_0x74fa('0x42')]);_0x53d668[_0x74fa('0x43')]=qs[_0x74fa('0x3f')](_[_0x74fa('0x53')](_0x5baf46[_0x74fa('0x25')],_0x199da4['filters']));if(_0x5baf46[_0x74fa('0x25')][_0x74fa('0x45')]){_0x53d668[_0x74fa('0x43')]=_['merge'](_0x53d668[_0x74fa('0x43')],{'$or':_[_0x74fa('0x46')](_0x53d668[_0x74fa('0x2c')],function(_0x325ac4){var _0x4b2536={};_0x4b2536[_0x325ac4]={'$like':'%'+_0x5baf46['query'][_0x74fa('0x45')]+'%'};return _0x4b2536;})});}_0x53d668=_['merge']({},_0x53d668,_0x5baf46[_0x74fa('0x30')]);return _0x4268ff[_0x74fa('0x76')](_0x53d668);}})[_0x74fa('0x15')](function(_0x1da341){if(_0x1da341){_0x112e03=_0x1da341[_0x74fa('0x2d')];if(!_0x5baf46[_0x74fa('0x25')]['hasOwnProperty'](_0x74fa('0x40'))){_0x53d668[_0x74fa('0x13')]=qs[_0x74fa('0x13')](_0x5baf46[_0x74fa('0x25')][_0x74fa('0x13')]);_0x53d668[_0x74fa('0x11')]=qs[_0x74fa('0x11')](_0x5baf46[_0x74fa('0x25')][_0x74fa('0x11')]);}return _0x4268ff[_0x74fa('0x76')](_0x53d668);}})['then'](function(_0x27149e){if(_0x27149e){return _0x27149e?{'count':_0x112e03,'rows':_0x27149e}:null;}})['then'](respondWithResult(_0xcab07b,null))[_0x74fa('0x32')](handleError(_0xcab07b,null));};
\ No newline at end of file
index dd01d00..9612b41 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xffdc=['../../mysqldb','setMaxListeners','save','remove','hasOwnProperty','hook','exports'];(function(_0x541989,_0x1cb951){var _0x54df7d=function(_0x28a45d){while(--_0x28a45d){_0x541989['push'](_0x541989['shift']());}};_0x54df7d(++_0x1cb951);}(_0xffdc,0x9a));var _0xcffd=function(_0x100770,_0x2a6617){_0x100770=_0x100770-0x0;var _0x26c777=_0xffdc[_0x100770];return _0x26c777;};'use strict';var EventEmitter=require('events');var ChatQueue=require(_0xcffd('0x0'))['db']['ChatQueue'];var ChatQueueEvents=new EventEmitter();ChatQueueEvents[_0xcffd('0x1')](0x0);var events={'afterCreate':_0xcffd('0x2'),'afterUpdate':'update','afterDestroy':_0xcffd('0x3')};function emitEvent(_0x4926b8){return function(_0x1b93b4,_0x4fb5d9,_0x27b225){ChatQueueEvents['emit'](_0x4926b8+':'+_0x1b93b4['id'],_0x1b93b4);ChatQueueEvents['emit'](_0x4926b8,_0x1b93b4);_0x27b225(null);};}for(var e in events){if(events[_0xcffd('0x4')](e)){var event=events[e];ChatQueue[_0xcffd('0x5')](e,emitEvent(event));}}module[_0xcffd('0x6')]=ChatQueueEvents;
\ No newline at end of file
+var _0x8d0e=['exports','events','../../mysqldb','ChatQueue','setMaxListeners','save','update','remove','hasOwnProperty','hook'];(function(_0x1dc69a,_0x386c1c){var _0x519cd8=function(_0x246ce2){while(--_0x246ce2){_0x1dc69a['push'](_0x1dc69a['shift']());}};_0x519cd8(++_0x386c1c);}(_0x8d0e,0x1d7));var _0xe8d0=function(_0x1d124b,_0x59572c){_0x1d124b=_0x1d124b-0x0;var _0x56d238=_0x8d0e[_0x1d124b];return _0x56d238;};'use strict';var EventEmitter=require(_0xe8d0('0x0'));var ChatQueue=require(_0xe8d0('0x1'))['db'][_0xe8d0('0x2')];var ChatQueueEvents=new EventEmitter();ChatQueueEvents[_0xe8d0('0x3')](0x0);var events={'afterCreate':_0xe8d0('0x4'),'afterUpdate':_0xe8d0('0x5'),'afterDestroy':_0xe8d0('0x6')};function emitEvent(_0x940176){return function(_0x32cee9,_0x579cb9,_0x39caa6){ChatQueueEvents['emit'](_0x940176+':'+_0x32cee9['id'],_0x32cee9);ChatQueueEvents['emit'](_0x940176,_0x32cee9);_0x39caa6(null);};}for(var e in events){if(events[_0xe8d0('0x7')](e)){var event=events[e];ChatQueue[_0xe8d0('0x8')](e,emitEvent(event));}}module[_0xe8d0('0x9')]=ChatQueueEvents;
\ No newline at end of file
index 34f7972..cc9d337 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1b23=['bluebird','request-promise','path','rimraf','./chatQueue.attributes','exports','define','ChatQueue','lodash','util','../../config/logger','api','moment'];(function(_0x10f99a,_0x46e1f1){var _0x5aba0e=function(_0x37a737){while(--_0x37a737){_0x10f99a['push'](_0x10f99a['shift']());}};_0x5aba0e(++_0x46e1f1);}(_0x1b23,0x18e));var _0x31b2=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0x1b23[_0x432682];return _0x463d05;};'use strict';var _=require(_0x31b2('0x0'));var util=require(_0x31b2('0x1'));var logger=require(_0x31b2('0x2'))(_0x31b2('0x3'));var moment=require(_0x31b2('0x4'));var BPromise=require(_0x31b2('0x5'));var rp=require(_0x31b2('0x6'));var fs=require('fs');var path=require(_0x31b2('0x7'));var rimraf=require(_0x31b2('0x8'));var config=require('../../config/environment');var attributes=require(_0x31b2('0x9'));module[_0x31b2('0xa')]=function(_0xa1e84f,_0xc7d11f){return _0xa1e84f[_0x31b2('0xb')](_0x31b2('0xc'),attributes,{'tableName':'chat_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x2a80=['./chatQueue.attributes','define','ChatQueue','chat_queues','../../config/logger','moment','bluebird','../../config/environment'];(function(_0x3288e9,_0x5a0a54){var _0x59f919=function(_0x1ff08f){while(--_0x1ff08f){_0x3288e9['push'](_0x3288e9['shift']());}};_0x59f919(++_0x5a0a54);}(_0x2a80,0x194));var _0x02a8=function(_0x51a467,_0x59d69a){_0x51a467=_0x51a467-0x0;var _0x56458b=_0x2a80[_0x51a467];return _0x56458b;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x02a8('0x0'))('api');var moment=require(_0x02a8('0x1'));var BPromise=require(_0x02a8('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x02a8('0x3'));var attributes=require(_0x02a8('0x4'));module['exports']=function(_0x1b4b0a,_0x58654a){return _0x1b4b0a[_0x02a8('0x5')](_0x02a8('0x6'),attributes,{'tableName':_0x02a8('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index c2e383b..af4276d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x48bc=['raw','attributes','limit','include','map','model','GetChatQueue','ShowChatQueue','find','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','redis','defaults','localhost','./chatQueue.socket','request','then','info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','ChatQueue','findAll','options'];(function(_0x525af9,_0x4edd23){var _0x129fbf=function(_0x4f44fe){while(--_0x4f44fe){_0x525af9['push'](_0x525af9['shift']());}};_0x129fbf(++_0x4edd23);}(_0x48bc,0x1b6));var _0xc48b=function(_0x3db167,_0x174cac){_0x3db167=_0x3db167-0x0;var _0x349ed4=_0x48bc[_0x3db167];return _0x349ed4;};'use strict';var _=require(_0xc48b('0x0'));var util=require(_0xc48b('0x1'));var moment=require(_0xc48b('0x2'));var BPromise=require('bluebird');var rs=require(_0xc48b('0x3'));var fs=require('fs');var Redis=require(_0xc48b('0x4'));var db=require(_0xc48b('0x5'))['db'];var utils=require(_0xc48b('0x6'));var logger=require(_0xc48b('0x7'))(_0xc48b('0x8'));var config=require(_0xc48b('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xc48b('0xa')]['http']({'port':0x232a});config[_0xc48b('0xb')]=_[_0xc48b('0xc')](config['redis'],{'host':_0xc48b('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xc48b('0xb')]));require(_0xc48b('0xe'))['register'](socket);function respondWithRpcPromise(_0x2c0429,_0x3fcb54,_0xdea695){return new BPromise(function(_0x441e2c,_0x111e61){return client[_0xc48b('0xf')](_0x2c0429,_0xdea695)[_0xc48b('0x10')](function(_0x2fd6c7){logger[_0xc48b('0x11')](_0xc48b('0x12'),_0x3fcb54,_0xc48b('0x13'));logger[_0xc48b('0x14')]('ChatQueue,\x20%s,\x20%s,\x20%s',_0x3fcb54,_0xc48b('0x13'),JSON[_0xc48b('0x15')](_0x2fd6c7));if(_0x2fd6c7[_0xc48b('0x16')]){if(_0x2fd6c7['error'][_0xc48b('0x17')]===0x1f4){logger[_0xc48b('0x16')](_0xc48b('0x12'),_0x3fcb54,_0x2fd6c7[_0xc48b('0x16')][_0xc48b('0x18')]);return _0x111e61(_0x2fd6c7[_0xc48b('0x16')][_0xc48b('0x18')]);}logger[_0xc48b('0x16')]('ChatQueue,\x20%s,\x20%s',_0x3fcb54,_0x2fd6c7[_0xc48b('0x16')]['message']);return _0x441e2c(_0x2fd6c7['error'][_0xc48b('0x18')]);}else{logger['info'](_0xc48b('0x12'),_0x3fcb54,'request\x20sent');_0x441e2c(_0x2fd6c7[_0xc48b('0x19')]['message']);}})[_0xc48b('0x1a')](function(_0x3bfd75){logger[_0xc48b('0x16')]('ChatQueue,\x20%s,\x20%s',_0x3fcb54,_0x3bfd75);_0x111e61(_0x3bfd75);});});}exports['GetChatQueue']=function(_0x12b34f){var _0x4a2997=this;return new Promise(function(_0x1c139c,_0x104a2f){return db[_0xc48b('0x1b')][_0xc48b('0x1c')]({'raw':_0x12b34f[_0xc48b('0x1d')]?_0x12b34f[_0xc48b('0x1d')][_0xc48b('0x1e')]===undefined?!![]:![]:!![],'where':_0x12b34f[_0xc48b('0x1d')]?_0x12b34f[_0xc48b('0x1d')]['where']||null:null,'attributes':_0x12b34f[_0xc48b('0x1d')]?_0x12b34f[_0xc48b('0x1d')][_0xc48b('0x1f')]||null:null,'limit':_0x12b34f[_0xc48b('0x1d')]?_0x12b34f[_0xc48b('0x1d')][_0xc48b('0x20')]||null:null,'include':_0x12b34f[_0xc48b('0x1d')]?_0x12b34f[_0xc48b('0x1d')][_0xc48b('0x21')]?_[_0xc48b('0x22')](_0x12b34f[_0xc48b('0x1d')][_0xc48b('0x21')],function(_0x4a6a22){return{'model':db[_0x4a6a22[_0xc48b('0x23')]],'as':_0x4a6a22['as'],'attributes':_0x4a6a22[_0xc48b('0x1f')],'include':_0x4a6a22[_0xc48b('0x21')]?_[_0xc48b('0x22')](_0x4a6a22[_0xc48b('0x21')],function(_0x2b53a3){return{'model':db[_0x2b53a3[_0xc48b('0x23')]],'as':_0x2b53a3['as'],'attributes':_0x2b53a3['attributes'],'include':_0x2b53a3[_0xc48b('0x21')]?_['map'](_0x2b53a3['include'],function(_0x49916e){return{'model':db[_0x49916e[_0xc48b('0x23')]],'as':_0x49916e['as'],'attributes':_0x49916e[_0xc48b('0x1f')]};}):[]};}):[]};}):[]:[]})[_0xc48b('0x10')](function(_0x3a65eb){logger[_0xc48b('0x11')]('GetChatQueue',_0x12b34f);logger['debug'](_0xc48b('0x24'),_0x12b34f,JSON[_0xc48b('0x15')](_0x3a65eb));_0x1c139c(_0x3a65eb);})['catch'](function(_0x31eaa0){logger[_0xc48b('0x16')](_0xc48b('0x24'),_0x31eaa0[_0xc48b('0x18')],_0x12b34f);_0x104a2f(_0x4a2997[_0xc48b('0x16')](0x1f4,_0x31eaa0[_0xc48b('0x18')]));});});};exports[_0xc48b('0x25')]=function(_0x72fe6e){var _0x2e82e5=this;return new Promise(function(_0x53735e,_0xc46482){return db[_0xc48b('0x1b')][_0xc48b('0x26')]({'raw':_0x72fe6e[_0xc48b('0x1d')]?_0x72fe6e[_0xc48b('0x1d')][_0xc48b('0x1e')]===undefined?!![]:![]:!![],'where':_0x72fe6e[_0xc48b('0x1d')]?_0x72fe6e[_0xc48b('0x1d')]['where']||null:null,'attributes':_0x72fe6e[_0xc48b('0x1d')]?_0x72fe6e[_0xc48b('0x1d')][_0xc48b('0x1f')]||null:null,'include':_0x72fe6e['options']?_0x72fe6e['options'][_0xc48b('0x21')]?_[_0xc48b('0x22')](_0x72fe6e[_0xc48b('0x1d')][_0xc48b('0x21')],function(_0x4ec91a){return{'model':db[_0x4ec91a[_0xc48b('0x23')]],'as':_0x4ec91a['as'],'attributes':_0x4ec91a[_0xc48b('0x1f')],'include':_0x4ec91a[_0xc48b('0x21')]?_[_0xc48b('0x22')](_0x4ec91a[_0xc48b('0x21')],function(_0x591b4f){return{'model':db[_0x591b4f[_0xc48b('0x23')]],'as':_0x591b4f['as'],'attributes':_0x591b4f['attributes'],'include':_0x591b4f[_0xc48b('0x21')]?_[_0xc48b('0x22')](_0x591b4f[_0xc48b('0x21')],function(_0x513b99){return{'model':db[_0x513b99[_0xc48b('0x23')]],'as':_0x513b99['as'],'attributes':_0x513b99[_0xc48b('0x1f')]};}):[]};}):[]};}):[]:[]})[_0xc48b('0x10')](function(_0x35d211){logger[_0xc48b('0x11')](_0xc48b('0x25'),_0x72fe6e);logger[_0xc48b('0x14')](_0xc48b('0x25'),_0x72fe6e,JSON['stringify'](_0x35d211));_0x53735e(_0x35d211);})[_0xc48b('0x1a')](function(_0x378b6f){logger[_0xc48b('0x16')](_0xc48b('0x25'),_0x378b6f[_0xc48b('0x18')],_0x72fe6e);_0xc46482(_0x2e82e5[_0xc48b('0x16')](0x1f4,_0x378b6f['message']));});});};
\ No newline at end of file
+var _0x8c28=['register','request','info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','GetChatQueue','findAll','options','raw','where','limit','include','model','attributes','map','then','ChatQueue','find','ShowChatQueue','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','./chatQueue.socket'];(function(_0x3d17fb,_0x2aa8f2){var _0x5aa433=function(_0xd50c93){while(--_0xd50c93){_0x3d17fb['push'](_0x3d17fb['shift']());}};_0x5aa433(++_0x2aa8f2);}(_0x8c28,0x1c8));var _0x88c2=function(_0x103aaa,_0x46ac8a){_0x103aaa=_0x103aaa-0x0;var _0x26f127=_0x8c28[_0x103aaa];return _0x26f127;};'use strict';var _=require(_0x88c2('0x0'));var util=require(_0x88c2('0x1'));var moment=require(_0x88c2('0x2'));var BPromise=require(_0x88c2('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x88c2('0x4'));var db=require(_0x88c2('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x88c2('0x6'))(_0x88c2('0x7'));var config=require(_0x88c2('0x8'));var jayson=require(_0x88c2('0x9'));var client=jayson[_0x88c2('0xa')][_0x88c2('0xb')]({'port':0x232a});config['redis']=_[_0x88c2('0xc')](config[_0x88c2('0xd')],{'host':_0x88c2('0xe'),'port':0x18eb});var socket=require(_0x88c2('0xf'))(new Redis(config[_0x88c2('0xd')]));require(_0x88c2('0x10'))[_0x88c2('0x11')](socket);function respondWithRpcPromise(_0x22a76f,_0x2d4d53,_0x1624fc){return new BPromise(function(_0x31146e,_0x56aa98){return client[_0x88c2('0x12')](_0x22a76f,_0x1624fc)['then'](function(_0x17c1e5){logger[_0x88c2('0x13')](_0x88c2('0x14'),_0x2d4d53,_0x88c2('0x15'));logger[_0x88c2('0x16')]('ChatQueue,\x20%s,\x20%s,\x20%s',_0x2d4d53,_0x88c2('0x15'),JSON[_0x88c2('0x17')](_0x17c1e5));if(_0x17c1e5['error']){if(_0x17c1e5[_0x88c2('0x18')][_0x88c2('0x19')]===0x1f4){logger[_0x88c2('0x18')](_0x88c2('0x14'),_0x2d4d53,_0x17c1e5[_0x88c2('0x18')][_0x88c2('0x1a')]);return _0x56aa98(_0x17c1e5['error'][_0x88c2('0x1a')]);}logger[_0x88c2('0x18')]('ChatQueue,\x20%s,\x20%s',_0x2d4d53,_0x17c1e5[_0x88c2('0x18')][_0x88c2('0x1a')]);return _0x31146e(_0x17c1e5[_0x88c2('0x18')][_0x88c2('0x1a')]);}else{logger['info'](_0x88c2('0x14'),_0x2d4d53,_0x88c2('0x15'));_0x31146e(_0x17c1e5[_0x88c2('0x1b')][_0x88c2('0x1a')]);}})[_0x88c2('0x1c')](function(_0xd3e60c){logger['error'](_0x88c2('0x14'),_0x2d4d53,_0xd3e60c);_0x56aa98(_0xd3e60c);});});}exports[_0x88c2('0x1d')]=function(_0x419311){var _0x22cef4=this;return new Promise(function(_0x2e2ce4,_0x25e651){return db['ChatQueue'][_0x88c2('0x1e')]({'raw':_0x419311[_0x88c2('0x1f')]?_0x419311[_0x88c2('0x1f')][_0x88c2('0x20')]===undefined?!![]:![]:!![],'where':_0x419311['options']?_0x419311[_0x88c2('0x1f')][_0x88c2('0x21')]||null:null,'attributes':_0x419311[_0x88c2('0x1f')]?_0x419311[_0x88c2('0x1f')]['attributes']||null:null,'limit':_0x419311[_0x88c2('0x1f')]?_0x419311[_0x88c2('0x1f')][_0x88c2('0x22')]||null:null,'include':_0x419311[_0x88c2('0x1f')]?_0x419311[_0x88c2('0x1f')][_0x88c2('0x23')]?_['map'](_0x419311[_0x88c2('0x1f')][_0x88c2('0x23')],function(_0x2312fa){return{'model':db[_0x2312fa[_0x88c2('0x24')]],'as':_0x2312fa['as'],'attributes':_0x2312fa[_0x88c2('0x25')],'include':_0x2312fa[_0x88c2('0x23')]?_[_0x88c2('0x26')](_0x2312fa[_0x88c2('0x23')],function(_0x395a7f){return{'model':db[_0x395a7f[_0x88c2('0x24')]],'as':_0x395a7f['as'],'attributes':_0x395a7f[_0x88c2('0x25')],'include':_0x395a7f[_0x88c2('0x23')]?_[_0x88c2('0x26')](_0x395a7f[_0x88c2('0x23')],function(_0x29c39a){return{'model':db[_0x29c39a[_0x88c2('0x24')]],'as':_0x29c39a['as'],'attributes':_0x29c39a[_0x88c2('0x25')]};}):[]};}):[]};}):[]:[]})[_0x88c2('0x27')](function(_0x27c9dd){logger[_0x88c2('0x13')](_0x88c2('0x1d'),_0x419311);logger[_0x88c2('0x16')](_0x88c2('0x1d'),_0x419311,JSON['stringify'](_0x27c9dd));_0x2e2ce4(_0x27c9dd);})[_0x88c2('0x1c')](function(_0x492229){logger[_0x88c2('0x18')]('GetChatQueue',_0x492229[_0x88c2('0x1a')],_0x419311);_0x25e651(_0x22cef4[_0x88c2('0x18')](0x1f4,_0x492229[_0x88c2('0x1a')]));});});};exports['ShowChatQueue']=function(_0x526b79){var _0x1a3841=this;return new Promise(function(_0x500f7b,_0x34f7cb){return db[_0x88c2('0x28')][_0x88c2('0x29')]({'raw':_0x526b79[_0x88c2('0x1f')]?_0x526b79['options'][_0x88c2('0x20')]===undefined?!![]:![]:!![],'where':_0x526b79[_0x88c2('0x1f')]?_0x526b79[_0x88c2('0x1f')][_0x88c2('0x21')]||null:null,'attributes':_0x526b79[_0x88c2('0x1f')]?_0x526b79[_0x88c2('0x1f')][_0x88c2('0x25')]||null:null,'include':_0x526b79[_0x88c2('0x1f')]?_0x526b79[_0x88c2('0x1f')][_0x88c2('0x23')]?_[_0x88c2('0x26')](_0x526b79[_0x88c2('0x1f')][_0x88c2('0x23')],function(_0x2956d6){return{'model':db[_0x2956d6[_0x88c2('0x24')]],'as':_0x2956d6['as'],'attributes':_0x2956d6[_0x88c2('0x25')],'include':_0x2956d6[_0x88c2('0x23')]?_[_0x88c2('0x26')](_0x2956d6['include'],function(_0x2390e4){return{'model':db[_0x2390e4[_0x88c2('0x24')]],'as':_0x2390e4['as'],'attributes':_0x2390e4[_0x88c2('0x25')],'include':_0x2390e4[_0x88c2('0x23')]?_[_0x88c2('0x26')](_0x2390e4[_0x88c2('0x23')],function(_0x9f00ac){return{'model':db[_0x9f00ac[_0x88c2('0x24')]],'as':_0x9f00ac['as'],'attributes':_0x9f00ac['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x51bb0f){logger[_0x88c2('0x13')](_0x88c2('0x2a'),_0x526b79);logger['debug']('ShowChatQueue',_0x526b79,JSON['stringify'](_0x51bb0f));_0x500f7b(_0x51bb0f);})[_0x88c2('0x1c')](function(_0x5bd060){logger[_0x88c2('0x18')](_0x88c2('0x2a'),_0x5bd060['message'],_0x526b79);_0x34f7cb(_0x1a3841[_0x88c2('0x18')](0x1f4,_0x5bd060['message']));});});};
\ No newline at end of file
index cd5e9bc..a6648ed 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6f0d=['update','emit','removeListener','length','save','remove'];(function(_0xa656ef,_0x3d31df){var _0x20e81=function(_0x128119){while(--_0x128119){_0xa656ef['push'](_0xa656ef['shift']());}};_0x20e81(++_0x3d31df);}(_0x6f0d,0x16c));var _0xd6f0=function(_0x3eb037,_0x19f179){_0x3eb037=_0x3eb037-0x0;var _0x284d5f=_0x6f0d[_0x3eb037];return _0x284d5f;};'use strict';var ChatQueueEvents=require('./chatQueue.events');var events=[_0xd6f0('0x0'),_0xd6f0('0x1'),_0xd6f0('0x2')];function createListener(_0x107a8c,_0x573473){return function(_0x275230){_0x573473[_0xd6f0('0x3')](_0x107a8c,_0x275230);};}function removeListener(_0x2f78fb,_0x25344b){return function(){ChatQueueEvents[_0xd6f0('0x4')](_0x2f78fb,_0x25344b);};}exports['register']=function(_0x2d2ce6){for(var _0x4a8b0c=0x0,_0xe21ac4=events[_0xd6f0('0x5')];_0x4a8b0c<_0xe21ac4;_0x4a8b0c++){var _0x8b89a9=events[_0x4a8b0c];var _0x1a48a0=createListener('chatQueue:'+_0x8b89a9,_0x2d2ce6);ChatQueueEvents['on'](_0x8b89a9,_0x1a48a0);}};
\ No newline at end of file
+var _0x032e=['removeListener','register','length','chatQueue:','./chatQueue.events','remove','update','emit'];(function(_0xd58a14,_0xaaf1f7){var _0x5cffb8=function(_0x54f105){while(--_0x54f105){_0xd58a14['push'](_0xd58a14['shift']());}};_0x5cffb8(++_0xaaf1f7);}(_0x032e,0x124));var _0xe032=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x032e[_0x3b380d];return _0x54502b;};'use strict';var ChatQueueEvents=require(_0xe032('0x0'));var events=['save',_0xe032('0x1'),_0xe032('0x2')];function createListener(_0x5ca562,_0x4afba2){return function(_0x45ab5b){_0x4afba2[_0xe032('0x3')](_0x5ca562,_0x45ab5b);};}function removeListener(_0x2f44f6,_0x1983cc){return function(){ChatQueueEvents[_0xe032('0x4')](_0x2f44f6,_0x1983cc);};}exports[_0xe032('0x5')]=function(_0x2ba8a0){for(var _0x33ad0b=0x0,_0x37432f=events[_0xe032('0x6')];_0x33ad0b<_0x37432f;_0x33ad0b++){var _0x3289b0=events[_0x33ad0b];var _0xd84027=createListener(_0xe032('0x7')+_0x3289b0,_0x2ba8a0);ChatQueueEvents['on'](_0x3289b0,_0xd84027);}};
\ No newline at end of file
index b9c69f9..0151efa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe14b=['/describe','show','/:id/members','/:id/teams','getTeams','/:id/users','getAgents','post','create','addTeams','addAgents','put','/:id','delete','destroy','removeAgents','exports','multer','util','express','Router','../../components/auth/service','./chatQueue.controller','get','isAuthenticated','index'];(function(_0x5c5db0,_0x3989f0){var _0x379327=function(_0x22ffce){while(--_0x22ffce){_0x5c5db0['push'](_0x5c5db0['shift']());}};_0x379327(++_0x3989f0);}(_0xe14b,0x93));var _0xbe14=function(_0x2fa11e,_0x57a5c4){_0x2fa11e=_0x2fa11e-0x0;var _0x2b445c=_0xe14b[_0x2fa11e];return _0x2b445c;};'use strict';var multer=require(_0xbe14('0x0'));var util=require(_0xbe14('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xbe14('0x2'));var router=express[_0xbe14('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xbe14('0x4'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xbe14('0x5'));router[_0xbe14('0x6')]('/',auth[_0xbe14('0x7')](),controller[_0xbe14('0x8')]);router[_0xbe14('0x6')](_0xbe14('0x9'),auth[_0xbe14('0x7')](),controller['describe']);router['get']('/:id',auth[_0xbe14('0x7')](),controller[_0xbe14('0xa')]);router[_0xbe14('0x6')](_0xbe14('0xb'),auth['isAuthenticated'](),controller['getMembers']);router[_0xbe14('0x6')](_0xbe14('0xc'),auth['isAuthenticated'](),controller[_0xbe14('0xd')]);router[_0xbe14('0x6')](_0xbe14('0xe'),auth[_0xbe14('0x7')](),controller[_0xbe14('0xf')]);router[_0xbe14('0x10')]('/',auth[_0xbe14('0x7')](),controller[_0xbe14('0x11')]);router[_0xbe14('0x10')](_0xbe14('0xc'),auth[_0xbe14('0x7')](),controller[_0xbe14('0x12')]);router[_0xbe14('0x10')]('/:id/users',auth['isAuthenticated'](),controller[_0xbe14('0x13')]);router[_0xbe14('0x14')](_0xbe14('0x15'),auth[_0xbe14('0x7')](),controller['update']);router[_0xbe14('0x16')](_0xbe14('0x15'),auth[_0xbe14('0x7')](),controller[_0xbe14('0x17')]);router[_0xbe14('0x16')](_0xbe14('0xc'),auth[_0xbe14('0x7')](),controller['removeTeams']);router[_0xbe14('0x16')](_0xbe14('0xe'),auth[_0xbe14('0x7')](),controller[_0xbe14('0x18')]);module[_0xbe14('0x19')]=router;
\ No newline at end of file
+var _0xe14b=['/describe','show','/:id/members','/:id/teams','getTeams','/:id/users','getAgents','post','create','addTeams','addAgents','put','/:id','delete','destroy','removeAgents','exports','multer','util','express','Router','../../components/auth/service','./chatQueue.controller','get','isAuthenticated','index'];(function(_0x7e3b11,_0x599592){var _0x3c0a85=function(_0x2d4057){while(--_0x2d4057){_0x7e3b11['push'](_0x7e3b11['shift']());}};_0x3c0a85(++_0x599592);}(_0xe14b,0x93));var _0xbe14=function(_0x40c467,_0x5b9a1e){_0x40c467=_0x40c467-0x0;var _0x4505e2=_0xe14b[_0x40c467];return _0x4505e2;};'use strict';var multer=require(_0xbe14('0x0'));var util=require(_0xbe14('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xbe14('0x2'));var router=express[_0xbe14('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xbe14('0x4'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xbe14('0x5'));router[_0xbe14('0x6')]('/',auth[_0xbe14('0x7')](),controller[_0xbe14('0x8')]);router[_0xbe14('0x6')](_0xbe14('0x9'),auth[_0xbe14('0x7')](),controller['describe']);router['get']('/:id',auth[_0xbe14('0x7')](),controller[_0xbe14('0xa')]);router[_0xbe14('0x6')](_0xbe14('0xb'),auth['isAuthenticated'](),controller['getMembers']);router[_0xbe14('0x6')](_0xbe14('0xc'),auth['isAuthenticated'](),controller[_0xbe14('0xd')]);router[_0xbe14('0x6')](_0xbe14('0xe'),auth[_0xbe14('0x7')](),controller[_0xbe14('0xf')]);router[_0xbe14('0x10')]('/',auth[_0xbe14('0x7')](),controller[_0xbe14('0x11')]);router[_0xbe14('0x10')](_0xbe14('0xc'),auth[_0xbe14('0x7')](),controller[_0xbe14('0x12')]);router[_0xbe14('0x10')]('/:id/users',auth['isAuthenticated'](),controller[_0xbe14('0x13')]);router[_0xbe14('0x14')](_0xbe14('0x15'),auth[_0xbe14('0x7')](),controller['update']);router[_0xbe14('0x16')](_0xbe14('0x15'),auth[_0xbe14('0x7')](),controller[_0xbe14('0x17')]);router[_0xbe14('0x16')](_0xbe14('0xc'),auth[_0xbe14('0x7')](),controller['removeTeams']);router[_0xbe14('0x16')](_0xbe14('0xe'),auth[_0xbe14('0x7')](),controller[_0xbe14('0x18')]);module[_0xbe14('0x19')]=router;
\ No newline at end of file
index 0276921..4d3e776 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc2a5=['sequelize','exports','STRING','DATE','moment'];(function(_0x868b7c,_0xfa438b){var _0x21683c=function(_0x21bc66){while(--_0x21bc66){_0x868b7c['push'](_0x868b7c['shift']());}};_0x21683c(++_0xfa438b);}(_0xc2a5,0x14e));var _0x5c2a=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0xc2a5[_0x502c7d];return _0x30b7ed;};'use strict';var moment=require(_0x5c2a('0x0'));var Sequelize=require(_0x5c2a('0x1'));module[_0x5c2a('0x2')]={'uniqueid':{'type':Sequelize[_0x5c2a('0x3')],'allowNull':![]},'from':{'type':Sequelize[_0x5c2a('0x3')]},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0x5c2a('0x4')]},'acceptAt':{'type':Sequelize[_0x5c2a('0x4')]},'exitAt':{'type':Sequelize[_0x5c2a('0x4')]},'reason':{'type':Sequelize[_0x5c2a('0x3')]}};
\ No newline at end of file
+var _0xd781=['sequelize','STRING','DATE'];(function(_0x58e842,_0xea2e71){var _0x50424f=function(_0x4aa62b){while(--_0x4aa62b){_0x58e842['push'](_0x58e842['shift']());}};_0x50424f(++_0xea2e71);}(_0xd781,0x180));var _0x1d78=function(_0x5a0648,_0x4b812e){_0x5a0648=_0x5a0648-0x0;var _0x39a24f=_0xd781[_0x5a0648];return _0x39a24f;};'use strict';var moment=require('moment');var Sequelize=require(_0x1d78('0x0'));module['exports']={'uniqueid':{'type':Sequelize[_0x1d78('0x1')],'allowNull':![]},'from':{'type':Sequelize[_0x1d78('0x1')]},'joinAt':{'type':Sequelize[_0x1d78('0x2')]},'leaveAt':{'type':Sequelize['DATE']},'acceptAt':{'type':Sequelize[_0x1d78('0x2')]},'exitAt':{'type':Sequelize[_0x1d78('0x2')]},'reason':{'type':Sequelize[_0x1d78('0x1')]}};
\ No newline at end of file
index 2eab80c..8e0b863 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x202a=['end','json','offset','undefined','limit','set','apply','save','then','destroy','send','index','map','ChatQueueReport','rawAttributes','fieldName','type','key','model','name','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','count','includeAll','include','findAll','rows','show','params','keys','length','find','catch','create','body','update','describe','rimraf','zip-dir','fast-json-patch','moment','path','sox','fs-extra','jsforce','desk.js','to-csv','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status'];(function(_0x1af1fc,_0x2b1327){var _0x17c392=function(_0x3e072a){while(--_0x3e072a){_0x1af1fc['push'](_0x1af1fc['shift']());}};_0x17c392(++_0x2b1327);}(_0x202a,0xc0));var _0xa202=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x202a[_0x321bb2];return _0x9c12ed;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xa202('0x0'));var zipdir=require(_0xa202('0x1'));var jsonpatch=require(_0xa202('0x2'));var rp=require('request-promise');var moment=require(_0xa202('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0xa202('0x4'));var sox=require(_0xa202('0x5'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xa202('0x6'));var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xa202('0x7'));var deskjs=require(_0xa202('0x8'));var toCsv=require(_0xa202('0x9'));var querystring=require(_0xa202('0xa'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xa202('0xb'));var qs=require(_0xa202('0xc'));var as=require(_0xa202('0xd'));var hardwareService=require(_0xa202('0xe'));var logger=require('../../config/logger')(_0xa202('0xf'));var utils=require('../../config/utils');var config=require(_0xa202('0x10'));var licenseUtil=require(_0xa202('0x11'));var db=require(_0xa202('0x12'))['db'];function respondWithStatusCode(_0x5bef49,_0x16164b){_0x16164b=_0x16164b||0xcc;return function(_0xdd992){if(_0xdd992){return _0x5bef49[_0xa202('0x13')](_0x16164b);}return _0x5bef49[_0xa202('0x14')](_0x16164b)[_0xa202('0x15')]();};}function respondWithResult(_0x29969e,_0x598d8e){_0x598d8e=_0x598d8e||0xc8;return function(_0x13510c){if(_0x13510c){return _0x29969e[_0xa202('0x14')](_0x598d8e)[_0xa202('0x16')](_0x13510c);}};}function respondWithFilteredResult(_0x28953b,_0x2e1790){return function(_0x5dc065){if(_0x5dc065){var _0x331df8=typeof _0x2e1790[_0xa202('0x17')]===_0xa202('0x18')&&typeof _0x2e1790[_0xa202('0x19')]===_0xa202('0x18');var _0x214a08=_0x5dc065['count'];var _0x44a1b6=_0x331df8?0x0:_0x2e1790['offset'];var _0x130df2=_0x331df8?_0x5dc065['count']:_0x2e1790[_0xa202('0x17')]+_0x2e1790[_0xa202('0x19')];var _0x130c45;if(_0x130df2>=_0x214a08){_0x130df2=_0x214a08;_0x130c45=0xc8;}else{_0x130c45=0xce;}_0x28953b[_0xa202('0x14')](_0x130c45);return _0x28953b[_0xa202('0x1a')]('Content-Range',_0x44a1b6+'-'+_0x130df2+'/'+_0x214a08)[_0xa202('0x16')](_0x5dc065);}return null;};}function patchUpdates(_0x6132f1){return function(_0x353440){try{jsonpatch[_0xa202('0x1b')](_0x353440,_0x6132f1,!![]);}catch(_0x188195){return BPromise['reject'](_0x188195);}return _0x353440[_0xa202('0x1c')]();};}function saveUpdates(_0x7b47e5,_0x46cfa4){return function(_0x44801a){if(_0x44801a){return _0x44801a['update'](_0x7b47e5)[_0xa202('0x1d')](function(_0x192d3c){return _0x192d3c;});}return null;};}function removeEntity(_0x5b764d,_0x565685){return function(_0x7991c7){if(_0x7991c7){return _0x7991c7[_0xa202('0x1e')]()['then'](function(){_0x5b764d[_0xa202('0x14')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5373b6,_0x72fe3e){return function(_0x268ee9){if(!_0x268ee9){_0x5373b6[_0xa202('0x13')](0x194);}return _0x268ee9;};}function handleError(_0x2f0779,_0xf13878){_0xf13878=_0xf13878||0x1f4;return function(_0x1d6704){logger['error'](_0x1d6704['stack']);if(_0x1d6704['name']){delete _0x1d6704['name'];}_0x2f0779[_0xa202('0x14')](_0xf13878)[_0xa202('0x1f')](_0x1d6704);};}exports[_0xa202('0x20')]=function(_0x57f049,_0x35ae40){var _0x390633={},_0xf73ab4={},_0x2cc2af={'count':0x0,'rows':[]};var _0x3eed2c=_[_0xa202('0x21')](db[_0xa202('0x22')][_0xa202('0x23')],function(_0x22ba67){return{'name':_0x22ba67[_0xa202('0x24')],'type':_0x22ba67[_0xa202('0x25')][_0xa202('0x26')]};});_0xf73ab4[_0xa202('0x27')]=_[_0xa202('0x21')](_0x3eed2c,_0xa202('0x28'));_0xf73ab4[_0xa202('0x29')]=_['keys'](_0x57f049[_0xa202('0x29')]);_0xf73ab4[_0xa202('0x2a')]=_[_0xa202('0x2b')](_0xf73ab4[_0xa202('0x27')],_0xf73ab4[_0xa202('0x29')]);_0x390633[_0xa202('0x2c')]=_['intersection'](_0xf73ab4[_0xa202('0x27')],qs[_0xa202('0x2d')](_0x57f049['query'][_0xa202('0x2d')]));_0x390633[_0xa202('0x2c')]=_0x390633['attributes']['length']?_0x390633['attributes']:_0xf73ab4[_0xa202('0x27')];if(!_0x57f049[_0xa202('0x29')][_0xa202('0x2e')](_0xa202('0x2f'))){_0x390633[_0xa202('0x19')]=qs['limit'](_0x57f049[_0xa202('0x29')]['limit']);_0x390633[_0xa202('0x17')]=qs[_0xa202('0x17')](_0x57f049[_0xa202('0x29')]['offset']);}_0x390633[_0xa202('0x30')]=qs['sort'](_0x57f049['query'][_0xa202('0x31')]);_0x390633[_0xa202('0x32')]=qs['filters'](_[_0xa202('0x33')](_0x57f049['query'],_0xf73ab4['filters']),_0x3eed2c);if(_0x57f049[_0xa202('0x29')][_0xa202('0x34')]){_0x390633['where']=_[_0xa202('0x35')](_0x390633[_0xa202('0x32')],{'$or':_[_0xa202('0x21')](_0x3eed2c,function(_0x527921){if(_0x527921[_0xa202('0x25')]!==_0xa202('0x36')){var _0x34ba33={};_0x34ba33[_0x527921[_0xa202('0x28')]]={'$like':'%'+_0x57f049[_0xa202('0x29')][_0xa202('0x34')]+'%'};return _0x34ba33;}})});}_0x390633=_[_0xa202('0x35')]({},_0x390633,_0x57f049[_0xa202('0x37')]);var _0x226863={'where':_0x390633[_0xa202('0x32')]};return db[_0xa202('0x22')][_0xa202('0x38')](_0x226863)['then'](function(_0x5bd528){_0x2cc2af[_0xa202('0x38')]=_0x5bd528;if(_0x57f049[_0xa202('0x29')][_0xa202('0x39')]){_0x390633[_0xa202('0x3a')]=[{'all':!![]}];}return db[_0xa202('0x22')][_0xa202('0x3b')](_0x390633);})[_0xa202('0x1d')](function(_0x3bca66){_0x2cc2af[_0xa202('0x3c')]=_0x3bca66;return _0x2cc2af;})[_0xa202('0x1d')](respondWithFilteredResult(_0x35ae40,_0x390633))['catch'](handleError(_0x35ae40,null));};exports[_0xa202('0x3d')]=function(_0x9879fe,_0x51c551){var _0x48a546={'raw':!![],'where':{'id':_0x9879fe[_0xa202('0x3e')]['id']}},_0x4f783c={};_0x4f783c[_0xa202('0x27')]=_[_0xa202('0x3f')](db[_0xa202('0x22')]['rawAttributes']);_0x4f783c[_0xa202('0x29')]=_[_0xa202('0x3f')](_0x9879fe[_0xa202('0x29')]);_0x4f783c[_0xa202('0x2a')]=_['intersection'](_0x4f783c[_0xa202('0x27')],_0x4f783c[_0xa202('0x29')]);_0x48a546[_0xa202('0x2c')]=_['intersection'](_0x4f783c[_0xa202('0x27')],qs[_0xa202('0x2d')](_0x9879fe[_0xa202('0x29')][_0xa202('0x2d')]));_0x48a546[_0xa202('0x2c')]=_0x48a546[_0xa202('0x2c')][_0xa202('0x40')]?_0x48a546[_0xa202('0x2c')]:_0x4f783c[_0xa202('0x27')];if(_0x9879fe[_0xa202('0x29')][_0xa202('0x39')]){_0x48a546[_0xa202('0x3a')]=[{'all':!![]}];}_0x48a546=_['merge']({},_0x48a546,_0x9879fe[_0xa202('0x37')]);return db[_0xa202('0x22')][_0xa202('0x41')](_0x48a546)[_0xa202('0x1d')](handleEntityNotFound(_0x51c551,null))[_0xa202('0x1d')](respondWithResult(_0x51c551,null))[_0xa202('0x42')](handleError(_0x51c551,null));};exports[_0xa202('0x43')]=function(_0x77626c,_0x5979cd){return db[_0xa202('0x22')][_0xa202('0x43')](_0x77626c[_0xa202('0x44')],{})['then'](respondWithResult(_0x5979cd,0xc9))[_0xa202('0x42')](handleError(_0x5979cd,null));};exports[_0xa202('0x45')]=function(_0xc72f62,_0x55cfc5){if(_0xc72f62[_0xa202('0x44')]['id']){delete _0xc72f62[_0xa202('0x44')]['id'];}return db[_0xa202('0x22')][_0xa202('0x41')]({'where':{'id':_0xc72f62[_0xa202('0x3e')]['id']}})[_0xa202('0x1d')](handleEntityNotFound(_0x55cfc5,null))[_0xa202('0x1d')](saveUpdates(_0xc72f62[_0xa202('0x44')],null))[_0xa202('0x1d')](respondWithResult(_0x55cfc5,null))[_0xa202('0x42')](handleError(_0x55cfc5,null));};exports[_0xa202('0x1e')]=function(_0x4cb0a5,_0x38e236){return db[_0xa202('0x22')][_0xa202('0x41')]({'where':{'id':_0x4cb0a5['params']['id']}})['then'](handleEntityNotFound(_0x38e236,null))[_0xa202('0x1d')](removeEntity(_0x38e236,null))[_0xa202('0x42')](handleError(_0x38e236,null));};exports['describe']=function(_0x20b55b,_0xfa1a43){return db['ChatQueueReport'][_0xa202('0x46')]()[_0xa202('0x1d')](respondWithResult(_0xfa1a43,null))[_0xa202('0x42')](handleError(_0xfa1a43,null));};
\ No newline at end of file
+var _0x0960=['offset','set','Content-Range','apply','reject','save','then','destroy','name','send','index','map','ChatQueueReport','fieldName','key','model','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','type','VIRTUAL','filter','includeAll','include','rows','params','keys','rawAttributes','options','create','body','update','find','catch','describe','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../mysqldb','sendStatus','status','json','undefined','limit','count'];(function(_0x22076d,_0x46afc1){var _0x4b1ffc=function(_0x53b118){while(--_0x53b118){_0x22076d['push'](_0x22076d['shift']());}};_0x4b1ffc(++_0x46afc1);}(_0x0960,0xc2));var _0x0096=function(_0x2f729e,_0x528b56){_0x2f729e=_0x2f729e-0x0;var _0x308707=_0x0960[_0x2f729e];return _0x308707;};'use strict';var emlformat=require(_0x0096('0x0'));var rimraf=require(_0x0096('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x0096('0x2'));var rp=require(_0x0096('0x3'));var moment=require(_0x0096('0x4'));var BPromise=require(_0x0096('0x5'));var Mustache=require(_0x0096('0x6'));var util=require(_0x0096('0x7'));var path=require(_0x0096('0x8'));var sox=require(_0x0096('0x9'));var csv=require(_0x0096('0xa'));var ejs=require(_0x0096('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x0096('0xc'));var squel=require('squel');var crypto=require(_0x0096('0xd'));var jsforce=require(_0x0096('0xe'));var deskjs=require(_0x0096('0xf'));var toCsv=require('to-csv');var querystring=require(_0x0096('0x10'));var Papa=require(_0x0096('0x11'));var Redis=require(_0x0096('0x12'));var authService=require(_0x0096('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x0096('0x14'));var hardwareService=require(_0x0096('0x15'));var logger=require('../../config/logger')(_0x0096('0x16'));var utils=require('../../config/utils');var config=require(_0x0096('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x0096('0x18'))['db'];function respondWithStatusCode(_0x25011c,_0x55678a){_0x55678a=_0x55678a||0xcc;return function(_0x2be406){if(_0x2be406){return _0x25011c[_0x0096('0x19')](_0x55678a);}return _0x25011c['status'](_0x55678a)['end']();};}function respondWithResult(_0x753d99,_0x39b6f6){_0x39b6f6=_0x39b6f6||0xc8;return function(_0x407361){if(_0x407361){return _0x753d99[_0x0096('0x1a')](_0x39b6f6)[_0x0096('0x1b')](_0x407361);}};}function respondWithFilteredResult(_0x5c901f,_0x590c96){return function(_0x19db10){if(_0x19db10){var _0x50c804=typeof _0x590c96['offset']===_0x0096('0x1c')&&typeof _0x590c96[_0x0096('0x1d')]==='undefined';var _0x7afa5f=_0x19db10[_0x0096('0x1e')];var _0x5468e2=_0x50c804?0x0:_0x590c96[_0x0096('0x1f')];var _0x27462a=_0x50c804?_0x19db10[_0x0096('0x1e')]:_0x590c96[_0x0096('0x1f')]+_0x590c96[_0x0096('0x1d')];var _0x507463;if(_0x27462a>=_0x7afa5f){_0x27462a=_0x7afa5f;_0x507463=0xc8;}else{_0x507463=0xce;}_0x5c901f[_0x0096('0x1a')](_0x507463);return _0x5c901f[_0x0096('0x20')](_0x0096('0x21'),_0x5468e2+'-'+_0x27462a+'/'+_0x7afa5f)['json'](_0x19db10);}return null;};}function patchUpdates(_0x1f5aad){return function(_0xef7a81){try{jsonpatch[_0x0096('0x22')](_0xef7a81,_0x1f5aad,!![]);}catch(_0x4e6338){return BPromise[_0x0096('0x23')](_0x4e6338);}return _0xef7a81[_0x0096('0x24')]();};}function saveUpdates(_0x4ac6f0,_0x263951){return function(_0x29b2c2){if(_0x29b2c2){return _0x29b2c2['update'](_0x4ac6f0)[_0x0096('0x25')](function(_0xfb20d0){return _0xfb20d0;});}return null;};}function removeEntity(_0x1a8e0e,_0x5ee101){return function(_0x224748){if(_0x224748){return _0x224748[_0x0096('0x26')]()[_0x0096('0x25')](function(){_0x1a8e0e['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x569a7e,_0x2ea1df){return function(_0x1a6df7){if(!_0x1a6df7){_0x569a7e['sendStatus'](0x194);}return _0x1a6df7;};}function handleError(_0x47abff,_0x230d46){_0x230d46=_0x230d46||0x1f4;return function(_0x3eac07){logger['error'](_0x3eac07['stack']);if(_0x3eac07[_0x0096('0x27')]){delete _0x3eac07[_0x0096('0x27')];}_0x47abff['status'](_0x230d46)[_0x0096('0x28')](_0x3eac07);};}exports[_0x0096('0x29')]=function(_0x204002,_0x205b79){var _0x102346={},_0x48e20f={},_0x511806={'count':0x0,'rows':[]};var _0x3b842b=_[_0x0096('0x2a')](db[_0x0096('0x2b')]['rawAttributes'],function(_0x593074){return{'name':_0x593074[_0x0096('0x2c')],'type':_0x593074['type'][_0x0096('0x2d')]};});_0x48e20f[_0x0096('0x2e')]=_[_0x0096('0x2a')](_0x3b842b,_0x0096('0x27'));_0x48e20f['query']=_['keys'](_0x204002[_0x0096('0x2f')]);_0x48e20f['filters']=_[_0x0096('0x30')](_0x48e20f[_0x0096('0x2e')],_0x48e20f[_0x0096('0x2f')]);_0x102346[_0x0096('0x31')]=_[_0x0096('0x30')](_0x48e20f[_0x0096('0x2e')],qs[_0x0096('0x32')](_0x204002[_0x0096('0x2f')][_0x0096('0x32')]));_0x102346[_0x0096('0x31')]=_0x102346[_0x0096('0x31')][_0x0096('0x33')]?_0x102346['attributes']:_0x48e20f[_0x0096('0x2e')];if(!_0x204002[_0x0096('0x2f')][_0x0096('0x34')](_0x0096('0x35'))){_0x102346[_0x0096('0x1d')]=qs[_0x0096('0x1d')](_0x204002[_0x0096('0x2f')]['limit']);_0x102346[_0x0096('0x1f')]=qs[_0x0096('0x1f')](_0x204002[_0x0096('0x2f')][_0x0096('0x1f')]);}_0x102346[_0x0096('0x36')]=qs[_0x0096('0x37')](_0x204002[_0x0096('0x2f')][_0x0096('0x37')]);_0x102346[_0x0096('0x38')]=qs[_0x0096('0x39')](_[_0x0096('0x3a')](_0x204002[_0x0096('0x2f')],_0x48e20f['filters']),_0x3b842b);if(_0x204002[_0x0096('0x2f')]['filter']){_0x102346[_0x0096('0x38')]=_['merge'](_0x102346['where'],{'$or':_[_0x0096('0x2a')](_0x3b842b,function(_0x179496){if(_0x179496[_0x0096('0x3b')]!==_0x0096('0x3c')){var _0x157a61={};_0x157a61[_0x179496['name']]={'$like':'%'+_0x204002[_0x0096('0x2f')][_0x0096('0x3d')]+'%'};return _0x157a61;}})});}_0x102346=_['merge']({},_0x102346,_0x204002['options']);var _0x505ede={'where':_0x102346[_0x0096('0x38')]};return db[_0x0096('0x2b')][_0x0096('0x1e')](_0x505ede)[_0x0096('0x25')](function(_0x5722b6){_0x511806[_0x0096('0x1e')]=_0x5722b6;if(_0x204002[_0x0096('0x2f')][_0x0096('0x3e')]){_0x102346[_0x0096('0x3f')]=[{'all':!![]}];}return db[_0x0096('0x2b')]['findAll'](_0x102346);})[_0x0096('0x25')](function(_0x2dccba){_0x511806[_0x0096('0x40')]=_0x2dccba;return _0x511806;})[_0x0096('0x25')](respondWithFilteredResult(_0x205b79,_0x102346))['catch'](handleError(_0x205b79,null));};exports['show']=function(_0x4b4ab7,_0x12d010){var _0x543e14={'raw':!![],'where':{'id':_0x4b4ab7[_0x0096('0x41')]['id']}},_0x31f7c0={};_0x31f7c0[_0x0096('0x2e')]=_[_0x0096('0x42')](db['ChatQueueReport'][_0x0096('0x43')]);_0x31f7c0[_0x0096('0x2f')]=_[_0x0096('0x42')](_0x4b4ab7[_0x0096('0x2f')]);_0x31f7c0[_0x0096('0x39')]=_[_0x0096('0x30')](_0x31f7c0['model'],_0x31f7c0[_0x0096('0x2f')]);_0x543e14['attributes']=_[_0x0096('0x30')](_0x31f7c0[_0x0096('0x2e')],qs[_0x0096('0x32')](_0x4b4ab7['query'][_0x0096('0x32')]));_0x543e14[_0x0096('0x31')]=_0x543e14[_0x0096('0x31')]['length']?_0x543e14[_0x0096('0x31')]:_0x31f7c0[_0x0096('0x2e')];if(_0x4b4ab7['query'][_0x0096('0x3e')]){_0x543e14[_0x0096('0x3f')]=[{'all':!![]}];}_0x543e14=_['merge']({},_0x543e14,_0x4b4ab7[_0x0096('0x44')]);return db[_0x0096('0x2b')]['find'](_0x543e14)[_0x0096('0x25')](handleEntityNotFound(_0x12d010,null))[_0x0096('0x25')](respondWithResult(_0x12d010,null))['catch'](handleError(_0x12d010,null));};exports['create']=function(_0x34cc4d,_0x18baac){return db['ChatQueueReport'][_0x0096('0x45')](_0x34cc4d[_0x0096('0x46')],{})['then'](respondWithResult(_0x18baac,0xc9))['catch'](handleError(_0x18baac,null));};exports[_0x0096('0x47')]=function(_0x392ca0,_0x29993c){if(_0x392ca0[_0x0096('0x46')]['id']){delete _0x392ca0[_0x0096('0x46')]['id'];}return db[_0x0096('0x2b')][_0x0096('0x48')]({'where':{'id':_0x392ca0[_0x0096('0x41')]['id']}})[_0x0096('0x25')](handleEntityNotFound(_0x29993c,null))[_0x0096('0x25')](saveUpdates(_0x392ca0['body'],null))['then'](respondWithResult(_0x29993c,null))[_0x0096('0x49')](handleError(_0x29993c,null));};exports[_0x0096('0x26')]=function(_0x2f5f2f,_0x7fc578){return db[_0x0096('0x2b')]['find']({'where':{'id':_0x2f5f2f[_0x0096('0x41')]['id']}})[_0x0096('0x25')](handleEntityNotFound(_0x7fc578,null))[_0x0096('0x25')](removeEntity(_0x7fc578,null))[_0x0096('0x49')](handleError(_0x7fc578,null));};exports['describe']=function(_0x56a7c8,_0x425f60){return db[_0x0096('0x2b')][_0x0096('0x4a')]()[_0x0096('0x25')](respondWithResult(_0x425f60,null))[_0x0096('0x49')](handleError(_0x425f60,null));};
\ No newline at end of file
index d02cf34..57a76ef 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x757a=['report_chat_queue','uniqueid','util','../../config/logger','request-promise','path','rimraf','../../config/environment','./chatQueueReport.attributes','exports','define'];(function(_0x24687,_0x5665b1){var _0x2af03f=function(_0x42f460){while(--_0x42f460){_0x24687['push'](_0x24687['shift']());}};_0x2af03f(++_0x5665b1);}(_0x757a,0xde));var _0xa757=function(_0x534e0c,_0x8116b5){_0x534e0c=_0x534e0c-0x0;var _0x36bc29=_0x757a[_0x534e0c];return _0x36bc29;};'use strict';var _=require('lodash');var util=require(_0xa757('0x0'));var logger=require(_0xa757('0x1'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xa757('0x2'));var fs=require('fs');var path=require(_0xa757('0x3'));var rimraf=require(_0xa757('0x4'));var config=require(_0xa757('0x5'));var attributes=require(_0xa757('0x6'));module[_0xa757('0x7')]=function(_0x5edca8,_0xae0e7c){return _0x5edca8[_0xa757('0x8')]('ChatQueueReport',attributes,{'tableName':_0xa757('0x9'),'paranoid':![],'indexes':[{'name':_0xa757('0xa'),'fields':[_0xa757('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xd8b0=['define','report_chat_queue','uniqueid','lodash','util','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x3a06d2,_0xe4b68e){var _0x44ed07=function(_0x47ff42){while(--_0x47ff42){_0x3a06d2['push'](_0x3a06d2['shift']());}};_0x44ed07(++_0xe4b68e);}(_0xd8b0,0xad));var _0x0d8b=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xd8b0[_0xa464c9];return _0x3d73c4;};'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('./chatQueueReport.attributes');module['exports']=function(_0x3f8b6f,_0x227c63){return _0x3f8b6f[_0x0d8b('0x7')]('ChatQueueReport',attributes,{'tableName':_0x0d8b('0x8'),'paranoid':![],'indexes':[{'name':_0x0d8b('0x9'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
index effd021..c5dd17a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x55dd=['ChatQueueReport','create','then','CreateChatQueueReport','update','body','options','raw','where','attributes','limit','UpdateChatQueueReport','stringify','util','moment','bluebird','randomstring','rpc','../../config/environment','jayson/promise','client','http','request','info','ChatQueueReport,\x20%s,\x20%s','request\x20sent','debug','ChatQueueReport,\x20%s,\x20%s,\x20%s','error','code','message','result','catch'];(function(_0x2476ec,_0x37327f){var _0x1284b5=function(_0x52855b){while(--_0x52855b){_0x2476ec['push'](_0x2476ec['shift']());}};_0x1284b5(++_0x37327f);}(_0x55dd,0x115));var _0xd55d=function(_0x146484,_0x27a7f0){_0x146484=_0x146484-0x0;var _0x4c7aa3=_0x55dd[_0x146484];return _0x4c7aa3;};'use strict';var _=require('lodash');var util=require(_0xd55d('0x0'));var moment=require(_0xd55d('0x1'));var BPromise=require(_0xd55d('0x2'));var rs=require(_0xd55d('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xd55d('0x4'));var config=require(_0xd55d('0x5'));var jayson=require(_0xd55d('0x6'));var client=jayson[_0xd55d('0x7')][_0xd55d('0x8')]({'port':0x232a});function respondWithRpcPromise(_0xf337fa,_0x327827,_0x221636){return new BPromise(function(_0x110320,_0x2d30de){return client[_0xd55d('0x9')](_0xf337fa,_0x221636)['then'](function(_0x1e430a){logger[_0xd55d('0xa')](_0xd55d('0xb'),_0x327827,_0xd55d('0xc'));logger[_0xd55d('0xd')](_0xd55d('0xe'),_0x327827,'request\x20sent',JSON['stringify'](_0x1e430a));if(_0x1e430a[_0xd55d('0xf')]){if(_0x1e430a[_0xd55d('0xf')][_0xd55d('0x10')]===0x1f4){logger[_0xd55d('0xf')](_0xd55d('0xb'),_0x327827,_0x1e430a[_0xd55d('0xf')][_0xd55d('0x11')]);return _0x2d30de(_0x1e430a['error'][_0xd55d('0x11')]);}logger[_0xd55d('0xf')]('ChatQueueReport,\x20%s,\x20%s',_0x327827,_0x1e430a[_0xd55d('0xf')]['message']);return _0x110320(_0x1e430a['error'][_0xd55d('0x11')]);}else{logger[_0xd55d('0xa')](_0xd55d('0xb'),_0x327827,_0xd55d('0xc'));_0x110320(_0x1e430a[_0xd55d('0x12')][_0xd55d('0x11')]);}})[_0xd55d('0x13')](function(_0x274992){logger['error'](_0xd55d('0xb'),_0x327827,_0x274992);_0x2d30de(_0x274992);});});}exports['CreateChatQueueReport']=function(_0x52e9e0){var _0xf9bf6=this;return new Promise(function(_0x595f7f,_0x271dd0){return db[_0xd55d('0x14')][_0xd55d('0x15')](_0x52e9e0['body'],{'raw':_0x52e9e0['options']?_0x52e9e0['options']['raw']===undefined?!![]:![]:!![]})[_0xd55d('0x16')](function(_0x5aad38){logger[_0xd55d('0xa')](_0xd55d('0x17'),_0x52e9e0);logger['debug'](_0xd55d('0x17'),_0x52e9e0,JSON['stringify'](_0x5aad38));_0x595f7f(_0x5aad38);})[_0xd55d('0x13')](function(_0x2491e0){logger[_0xd55d('0xf')]('CreateChatQueueReport',_0x2491e0['message'],_0x52e9e0);_0x271dd0(_0xf9bf6[_0xd55d('0xf')](0x1f4,_0x2491e0[_0xd55d('0x11')]));});});};exports['UpdateChatQueueReport']=function(_0x4ce286){var _0x1a6576=this;return new Promise(function(_0x22421c,_0x47b05b){return db[_0xd55d('0x14')][_0xd55d('0x18')](_0x4ce286[_0xd55d('0x19')],{'raw':_0x4ce286[_0xd55d('0x1a')]?_0x4ce286[_0xd55d('0x1a')][_0xd55d('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4ce286[_0xd55d('0x1a')]?_0x4ce286[_0xd55d('0x1a')][_0xd55d('0x1c')]||null:null,'attributes':_0x4ce286[_0xd55d('0x1a')]?_0x4ce286[_0xd55d('0x1a')][_0xd55d('0x1d')]||null:null,'limit':_0x4ce286[_0xd55d('0x1a')]?_0x4ce286['options'][_0xd55d('0x1e')]||null:null})[_0xd55d('0x16')](function(_0x5d7aaa){logger[_0xd55d('0xa')](_0xd55d('0x1f'),_0x4ce286);logger['debug'](_0xd55d('0x1f'),_0x4ce286,JSON[_0xd55d('0x20')](_0x5d7aaa));_0x22421c(_0x5d7aaa);})['catch'](function(_0x2f8744){logger[_0xd55d('0xf')]('UpdateChatQueueReport',_0x2f8744['message'],_0x4ce286);_0x47b05b(_0x1a6576[_0xd55d('0xf')](0x1f4,_0x2f8744[_0xd55d('0x11')]));});});};
\ No newline at end of file
+var _0x1255=['options','raw','UpdateChatQueueReport','update','where','limit','then','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','request','info','request\x20sent','debug','stringify','error','code','ChatQueueReport,\x20%s,\x20%s','message','catch','CreateChatQueueReport','ChatQueueReport','create','body'];(function(_0x1b90af,_0x2cee67){var _0x4222d=function(_0x42d273){while(--_0x42d273){_0x1b90af['push'](_0x1b90af['shift']());}};_0x4222d(++_0x2cee67);}(_0x1255,0x127));var _0x5125=function(_0x453022,_0x4276ba){_0x453022=_0x453022-0x0;var _0x4a2926=_0x1255[_0x453022];return _0x4a2926;};'use strict';var _=require(_0x5125('0x0'));var util=require(_0x5125('0x1'));var moment=require('moment');var BPromise=require(_0x5125('0x2'));var rs=require(_0x5125('0x3'));var fs=require('fs');var Redis=require(_0x5125('0x4'));var db=require(_0x5125('0x5'))['db'];var utils=require(_0x5125('0x6'));var logger=require('../../config/logger')(_0x5125('0x7'));var config=require('../../config/environment');var jayson=require(_0x5125('0x8'));var client=jayson[_0x5125('0x9')][_0x5125('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x42bc2d,_0x20f636,_0x215e9b){return new BPromise(function(_0x397a82,_0x3c5603){return client[_0x5125('0xb')](_0x42bc2d,_0x215e9b)['then'](function(_0x743652){logger[_0x5125('0xc')]('ChatQueueReport,\x20%s,\x20%s',_0x20f636,_0x5125('0xd'));logger[_0x5125('0xe')]('ChatQueueReport,\x20%s,\x20%s,\x20%s',_0x20f636,_0x5125('0xd'),JSON[_0x5125('0xf')](_0x743652));if(_0x743652[_0x5125('0x10')]){if(_0x743652[_0x5125('0x10')][_0x5125('0x11')]===0x1f4){logger[_0x5125('0x10')](_0x5125('0x12'),_0x20f636,_0x743652['error'][_0x5125('0x13')]);return _0x3c5603(_0x743652[_0x5125('0x10')][_0x5125('0x13')]);}logger[_0x5125('0x10')]('ChatQueueReport,\x20%s,\x20%s',_0x20f636,_0x743652[_0x5125('0x10')][_0x5125('0x13')]);return _0x397a82(_0x743652[_0x5125('0x10')]['message']);}else{logger[_0x5125('0xc')](_0x5125('0x12'),_0x20f636,_0x5125('0xd'));_0x397a82(_0x743652['result'][_0x5125('0x13')]);}})[_0x5125('0x14')](function(_0x1bf22c){logger[_0x5125('0x10')]('ChatQueueReport,\x20%s,\x20%s',_0x20f636,_0x1bf22c);_0x3c5603(_0x1bf22c);});});}exports[_0x5125('0x15')]=function(_0x1e6805){var _0x5e1671=this;return new Promise(function(_0x49226d,_0x2ef3b0){return db[_0x5125('0x16')][_0x5125('0x17')](_0x1e6805[_0x5125('0x18')],{'raw':_0x1e6805['options']?_0x1e6805[_0x5125('0x19')][_0x5125('0x1a')]===undefined?!![]:![]:!![]})['then'](function(_0x1d6f63){logger['info'](_0x5125('0x15'),_0x1e6805);logger[_0x5125('0xe')](_0x5125('0x15'),_0x1e6805,JSON[_0x5125('0xf')](_0x1d6f63));_0x49226d(_0x1d6f63);})[_0x5125('0x14')](function(_0x47cd9e){logger['error'](_0x5125('0x15'),_0x47cd9e[_0x5125('0x13')],_0x1e6805);_0x2ef3b0(_0x5e1671[_0x5125('0x10')](0x1f4,_0x47cd9e['message']));});});};exports[_0x5125('0x1b')]=function(_0x529980){var _0x508e30=this;return new Promise(function(_0xe947b3,_0x114d89){return db[_0x5125('0x16')][_0x5125('0x1c')](_0x529980['body'],{'raw':_0x529980[_0x5125('0x19')]?_0x529980[_0x5125('0x19')][_0x5125('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x529980[_0x5125('0x19')]?_0x529980[_0x5125('0x19')][_0x5125('0x1d')]||null:null,'attributes':_0x529980['options']?_0x529980['options']['attributes']||null:null,'limit':_0x529980[_0x5125('0x19')]?_0x529980[_0x5125('0x19')][_0x5125('0x1e')]||null:null})[_0x5125('0x1f')](function(_0x4e94ba){logger[_0x5125('0xc')](_0x5125('0x1b'),_0x529980);logger[_0x5125('0xe')](_0x5125('0x1b'),_0x529980,JSON[_0x5125('0xf')](_0x4e94ba));_0xe947b3(_0x4e94ba);})[_0x5125('0x14')](function(_0x5893e9){logger['error'](_0x5125('0x1b'),_0x5893e9[_0x5125('0x13')],_0x529980);_0x114d89(_0x508e30[_0x5125('0x10')](0x1f4,_0x5893e9['message']));});});};
\ No newline at end of file
index 876ac7b..e5411cd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0e73=['show','post','put','update','delete','multer','util','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/describe','describe','/:id'];(function(_0x29d915,_0x54a040){var _0x160f86=function(_0x237dfa){while(--_0x237dfa){_0x29d915['push'](_0x29d915['shift']());}};_0x160f86(++_0x54a040);}(_0x0e73,0x1d9));var _0x30e7=function(_0x5d4607,_0x6b5e7b){_0x5d4607=_0x5d4607-0x0;var _0x5e4a86=_0x0e73[_0x5d4607];return _0x5e4a86;};'use strict';var multer=require(_0x30e7('0x0'));var util=require(_0x30e7('0x1'));var path=require(_0x30e7('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x30e7('0x3')]();var fs_extra=require(_0x30e7('0x4'));var auth=require(_0x30e7('0x5'));var interaction=require(_0x30e7('0x6'));var config=require(_0x30e7('0x7'));var controller=require('./chatQueueReport.controller');router[_0x30e7('0x8')]('/',auth[_0x30e7('0x9')](),controller['index']);router['get'](_0x30e7('0xa'),auth[_0x30e7('0x9')](),controller[_0x30e7('0xb')]);router[_0x30e7('0x8')](_0x30e7('0xc'),auth[_0x30e7('0x9')](),controller[_0x30e7('0xd')]);router[_0x30e7('0xe')]('/',auth[_0x30e7('0x9')](),controller['create']);router[_0x30e7('0xf')](_0x30e7('0xc'),auth[_0x30e7('0x9')](),controller[_0x30e7('0x10')]);router[_0x30e7('0x11')]('/:id',auth['isAuthenticated'](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0xca93=['isAuthenticated','show','post','create','put','/:id','delete','destroy','exports','multer','util','path','connect-timeout','express','../../components/interaction/service','../../config/environment','./chatQueueReport.controller','get','index','/describe'];(function(_0x3d22ab,_0x24479a){var _0x38e407=function(_0x21647b){while(--_0x21647b){_0x3d22ab['push'](_0x3d22ab['shift']());}};_0x38e407(++_0x24479a);}(_0xca93,0x171));var _0x3ca9=function(_0x43d11d,_0xccff91){_0x43d11d=_0x43d11d-0x0;var _0x38cd08=_0xca93[_0x43d11d];return _0x38cd08;};'use strict';var multer=require(_0x3ca9('0x0'));var util=require(_0x3ca9('0x1'));var path=require(_0x3ca9('0x2'));var timeout=require(_0x3ca9('0x3'));var express=require(_0x3ca9('0x4'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x3ca9('0x5'));var config=require(_0x3ca9('0x6'));var controller=require(_0x3ca9('0x7'));router[_0x3ca9('0x8')]('/',auth['isAuthenticated'](),controller[_0x3ca9('0x9')]);router[_0x3ca9('0x8')](_0x3ca9('0xa'),auth[_0x3ca9('0xb')](),controller['describe']);router[_0x3ca9('0x8')]('/:id',auth[_0x3ca9('0xb')](),controller[_0x3ca9('0xc')]);router[_0x3ca9('0xd')]('/',auth[_0x3ca9('0xb')](),controller[_0x3ca9('0xe')]);router[_0x3ca9('0xf')](_0x3ca9('0x10'),auth['isAuthenticated'](),controller['update']);router[_0x3ca9('0x11')](_0x3ca9('0x10'),auth[_0x3ca9('0xb')](),controller[_0x3ca9('0x12')]);module[_0x3ca9('0x13')]=router;
\ No newline at end of file
index 9d38023..cc1c852 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(_0x24befe,_0x38f2c0){var _0x17ece7=function(_0x121ee6){while(--_0x121ee6){_0x24befe['push'](_0x24befe['shift']());}};_0x17ece7(++_0x38f2c0);}(_0x008c,0x188));var _0xc008=function(_0x3873ab,_0x152776){_0x3873ab=_0x3873ab-0x0;var _0x42f6ed=_0x008c[_0x3873ab];return _0x42f6ed;};'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 _0xb43b=['DATE','NOW','moment','sequelize','STRING','ENUM','account','queue'];(function(_0x4f431d,_0xd51a3b){var _0x4f31e1=function(_0x1c688d){while(--_0x1c688d){_0x4f431d['push'](_0x4f431d['shift']());}};_0x4f31e1(++_0xd51a3b);}(_0xb43b,0x1b2));var _0xbb43=function(_0x483a2f,_0x1d2a9e){_0x483a2f=_0x483a2f-0x0;var _0xdc0560=_0xb43b[_0x483a2f];return _0xdc0560;};'use strict';var moment=require(_0xbb43('0x0'));var Sequelize=require(_0xbb43('0x1'));module['exports']={'uniqueid':{'type':Sequelize[_0xbb43('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0xbb43('0x3')](_0xbb43('0x4'),'agent',_0xbb43('0x5')),'allowNull':![],'defaultValue':_0xbb43('0x5')},'transferredAt':{'type':Sequelize[_0xbb43('0x6')],'allowNull':![],'defaultValue':Sequelize[_0xbb43('0x7')]}};
\ No newline at end of file
index e695d67..833d692 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8a3b=['VIRTUAL','ChatTransferReport','includeAll','include','findAll','rows','catch','show','options','create','body','find','params','describe','eml-format','rimraf','request-promise','moment','bluebird','mustache','path','sox','to-csv','lodash','jsforce','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/license/util','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','reject','save','update','then','destroy','end','error','stack','name','send','index','rawAttributes','fieldName','model','map','keys','filters','intersection','query','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type'];(function(_0x3273ac,_0x4ac52a){var _0x53b852=function(_0x16c166){while(--_0x16c166){_0x3273ac['push'](_0x3273ac['shift']());}};_0x53b852(++_0x4ac52a);}(_0x8a3b,0x9c));var _0xb8a3=function(_0x37c22c,_0x28a70d){_0x37c22c=_0x37c22c-0x0;var _0x119d79=_0x8a3b[_0x37c22c];return _0x119d79;};'use strict';var emlformat=require(_0xb8a3('0x0'));var rimraf=require(_0xb8a3('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xb8a3('0x2'));var moment=require(_0xb8a3('0x3'));var BPromise=require(_0xb8a3('0x4'));var Mustache=require(_0xb8a3('0x5'));var util=require('util');var path=require(_0xb8a3('0x6'));var sox=require(_0xb8a3('0x7'));var csv=require(_0xb8a3('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xb8a3('0x9'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xb8a3('0xa'));var deskjs=require('desk.js');var toCsv=require(_0xb8a3('0x8'));var querystring=require('querystring');var Papa=require(_0xb8a3('0xb'));var Redis=require(_0xb8a3('0xc'));var authService=require('../../components/auth/service');var qs=require(_0xb8a3('0xd'));var as=require(_0xb8a3('0xe'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xb8a3('0xf'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xb8a3('0x10'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xf54db9,_0x652dff){_0x652dff=_0x652dff||0xcc;return function(_0x45d503){if(_0x45d503){return _0xf54db9[_0xb8a3('0x11')](_0x652dff);}return _0xf54db9[_0xb8a3('0x12')](_0x652dff)['end']();};}function respondWithResult(_0x38c4b7,_0xf2d0a5){_0xf2d0a5=_0xf2d0a5||0xc8;return function(_0x3324b8){if(_0x3324b8){return _0x38c4b7[_0xb8a3('0x12')](_0xf2d0a5)[_0xb8a3('0x13')](_0x3324b8);}};}function respondWithFilteredResult(_0x2b0902,_0x16612c){return function(_0x53a59c){if(_0x53a59c){var _0x45f89a=typeof _0x16612c[_0xb8a3('0x14')]===_0xb8a3('0x15')&&typeof _0x16612c[_0xb8a3('0x16')]==='undefined';var _0x4d4d1b=_0x53a59c[_0xb8a3('0x17')];var _0x3f57e4=_0x45f89a?0x0:_0x16612c['offset'];var _0x259480=_0x45f89a?_0x53a59c['count']:_0x16612c[_0xb8a3('0x14')]+_0x16612c['limit'];var _0x452dc1;if(_0x259480>=_0x4d4d1b){_0x259480=_0x4d4d1b;_0x452dc1=0xc8;}else{_0x452dc1=0xce;}_0x2b0902[_0xb8a3('0x12')](_0x452dc1);return _0x2b0902[_0xb8a3('0x18')](_0xb8a3('0x19'),_0x3f57e4+'-'+_0x259480+'/'+_0x4d4d1b)[_0xb8a3('0x13')](_0x53a59c);}return null;};}function patchUpdates(_0x1181e0){return function(_0x50a9bf){try{jsonpatch['apply'](_0x50a9bf,_0x1181e0,!![]);}catch(_0x2dd958){return BPromise[_0xb8a3('0x1a')](_0x2dd958);}return _0x50a9bf[_0xb8a3('0x1b')]();};}function saveUpdates(_0x4f1004,_0x488d0f){return function(_0xd6c63a){if(_0xd6c63a){return _0xd6c63a[_0xb8a3('0x1c')](_0x4f1004)[_0xb8a3('0x1d')](function(_0x31c695){return _0x31c695;});}return null;};}function removeEntity(_0x30ec43,_0x97e6c5){return function(_0x3c843a){if(_0x3c843a){return _0x3c843a[_0xb8a3('0x1e')]()[_0xb8a3('0x1d')](function(){_0x30ec43[_0xb8a3('0x12')](0xcc)[_0xb8a3('0x1f')]();});}};}function handleEntityNotFound(_0x59b017,_0x36d8f2){return function(_0x5303f7){if(!_0x5303f7){_0x59b017[_0xb8a3('0x11')](0x194);}return _0x5303f7;};}function handleError(_0x534632,_0x13921c){_0x13921c=_0x13921c||0x1f4;return function(_0x12a3de){logger[_0xb8a3('0x20')](_0x12a3de[_0xb8a3('0x21')]);if(_0x12a3de['name']){delete _0x12a3de[_0xb8a3('0x22')];}_0x534632[_0xb8a3('0x12')](_0x13921c)[_0xb8a3('0x23')](_0x12a3de);};}exports[_0xb8a3('0x24')]=function(_0x4fe95d,_0x573729){var _0x4334d0={},_0x35b7e5={},_0x4dd5b9={'count':0x0,'rows':[]};var _0x15a72c=_['map'](db['ChatTransferReport'][_0xb8a3('0x25')],function(_0x5dcddd){return{'name':_0x5dcddd[_0xb8a3('0x26')],'type':_0x5dcddd['type']['key']};});_0x35b7e5[_0xb8a3('0x27')]=_[_0xb8a3('0x28')](_0x15a72c,'name');_0x35b7e5['query']=_[_0xb8a3('0x29')](_0x4fe95d['query']);_0x35b7e5[_0xb8a3('0x2a')]=_[_0xb8a3('0x2b')](_0x35b7e5[_0xb8a3('0x27')],_0x35b7e5[_0xb8a3('0x2c')]);_0x4334d0[_0xb8a3('0x2d')]=_[_0xb8a3('0x2b')](_0x35b7e5[_0xb8a3('0x27')],qs[_0xb8a3('0x2e')](_0x4fe95d['query'][_0xb8a3('0x2e')]));_0x4334d0['attributes']=_0x4334d0[_0xb8a3('0x2d')][_0xb8a3('0x2f')]?_0x4334d0[_0xb8a3('0x2d')]:_0x35b7e5[_0xb8a3('0x27')];if(!_0x4fe95d[_0xb8a3('0x2c')][_0xb8a3('0x30')](_0xb8a3('0x31'))){_0x4334d0['limit']=qs[_0xb8a3('0x16')](_0x4fe95d['query'][_0xb8a3('0x16')]);_0x4334d0[_0xb8a3('0x14')]=qs[_0xb8a3('0x14')](_0x4fe95d[_0xb8a3('0x2c')]['offset']);}_0x4334d0[_0xb8a3('0x32')]=qs[_0xb8a3('0x33')](_0x4fe95d[_0xb8a3('0x2c')][_0xb8a3('0x33')]);_0x4334d0[_0xb8a3('0x34')]=qs['filters'](_[_0xb8a3('0x35')](_0x4fe95d[_0xb8a3('0x2c')],_0x35b7e5['filters']),_0x15a72c);if(_0x4fe95d[_0xb8a3('0x2c')][_0xb8a3('0x36')]){_0x4334d0[_0xb8a3('0x34')]=_[_0xb8a3('0x37')](_0x4334d0[_0xb8a3('0x34')],{'$or':_[_0xb8a3('0x28')](_0x15a72c,function(_0x1ccd23){if(_0x1ccd23[_0xb8a3('0x38')]!==_0xb8a3('0x39')){var _0x18f6c3={};_0x18f6c3[_0x1ccd23[_0xb8a3('0x22')]]={'$like':'%'+_0x4fe95d[_0xb8a3('0x2c')][_0xb8a3('0x36')]+'%'};return _0x18f6c3;}})});}_0x4334d0=_[_0xb8a3('0x37')]({},_0x4334d0,_0x4fe95d['options']);var _0x419365={'where':_0x4334d0[_0xb8a3('0x34')]};return db[_0xb8a3('0x3a')][_0xb8a3('0x17')](_0x419365)['then'](function(_0x2f3404){_0x4dd5b9['count']=_0x2f3404;if(_0x4fe95d['query'][_0xb8a3('0x3b')]){_0x4334d0[_0xb8a3('0x3c')]=[{'all':!![]}];}return db[_0xb8a3('0x3a')][_0xb8a3('0x3d')](_0x4334d0);})[_0xb8a3('0x1d')](function(_0xe5981d){_0x4dd5b9[_0xb8a3('0x3e')]=_0xe5981d;return _0x4dd5b9;})[_0xb8a3('0x1d')](respondWithFilteredResult(_0x573729,_0x4334d0))[_0xb8a3('0x3f')](handleError(_0x573729,null));};exports[_0xb8a3('0x40')]=function(_0x4b7bf0,_0x3cd148){var _0x58821e={'raw':!![],'where':{'id':_0x4b7bf0['params']['id']}},_0x2fe591={};_0x2fe591[_0xb8a3('0x27')]=_[_0xb8a3('0x29')](db[_0xb8a3('0x3a')][_0xb8a3('0x25')]);_0x2fe591[_0xb8a3('0x2c')]=_[_0xb8a3('0x29')](_0x4b7bf0[_0xb8a3('0x2c')]);_0x2fe591[_0xb8a3('0x2a')]=_[_0xb8a3('0x2b')](_0x2fe591[_0xb8a3('0x27')],_0x2fe591[_0xb8a3('0x2c')]);_0x58821e[_0xb8a3('0x2d')]=_[_0xb8a3('0x2b')](_0x2fe591[_0xb8a3('0x27')],qs['fields'](_0x4b7bf0['query'][_0xb8a3('0x2e')]));_0x58821e[_0xb8a3('0x2d')]=_0x58821e['attributes'][_0xb8a3('0x2f')]?_0x58821e[_0xb8a3('0x2d')]:_0x2fe591['model'];if(_0x4b7bf0[_0xb8a3('0x2c')][_0xb8a3('0x3b')]){_0x58821e[_0xb8a3('0x3c')]=[{'all':!![]}];}_0x58821e=_['merge']({},_0x58821e,_0x4b7bf0[_0xb8a3('0x41')]);return db[_0xb8a3('0x3a')]['find'](_0x58821e)['then'](handleEntityNotFound(_0x3cd148,null))[_0xb8a3('0x1d')](respondWithResult(_0x3cd148,null))['catch'](handleError(_0x3cd148,null));};exports['create']=function(_0x43126d,_0x352ca7){return db['ChatTransferReport'][_0xb8a3('0x42')](_0x43126d[_0xb8a3('0x43')],{})['then'](respondWithResult(_0x352ca7,0xc9))[_0xb8a3('0x3f')](handleError(_0x352ca7,null));};exports[_0xb8a3('0x1c')]=function(_0x5972f7,_0x2dc3d6){if(_0x5972f7[_0xb8a3('0x43')]['id']){delete _0x5972f7[_0xb8a3('0x43')]['id'];}return db[_0xb8a3('0x3a')][_0xb8a3('0x44')]({'where':{'id':_0x5972f7[_0xb8a3('0x45')]['id']}})[_0xb8a3('0x1d')](handleEntityNotFound(_0x2dc3d6,null))[_0xb8a3('0x1d')](saveUpdates(_0x5972f7[_0xb8a3('0x43')],null))[_0xb8a3('0x1d')](respondWithResult(_0x2dc3d6,null))[_0xb8a3('0x3f')](handleError(_0x2dc3d6,null));};exports['destroy']=function(_0x48e820,_0x2794d1){return db['ChatTransferReport']['find']({'where':{'id':_0x48e820['params']['id']}})[_0xb8a3('0x1d')](handleEntityNotFound(_0x2794d1,null))[_0xb8a3('0x1d')](removeEntity(_0x2794d1,null))[_0xb8a3('0x3f')](handleError(_0x2794d1,null));};exports[_0xb8a3('0x46')]=function(_0xff49f8,_0x30271b){return db[_0xb8a3('0x3a')][_0xb8a3('0x46')]()[_0xb8a3('0x1d')](respondWithResult(_0x30271b,null))[_0xb8a3('0x3f')](handleError(_0x30271b,null));};
\ No newline at end of file
+var _0x1448=['filter','merge','options','includeAll','include','findAll','rows','catch','show','params','keys','find','create','body','update','describe','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','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','status','end','undefined','limit','count','offset','json','apply','reject','save','destroy','then','sendStatus','error','stack','name','index','map','ChatTransferReport','rawAttributes','fieldName','type','model','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick'];(function(_0x5dea3c,_0x5387bd){var _0x71034f=function(_0x1e84de){while(--_0x1e84de){_0x5dea3c['push'](_0x5dea3c['shift']());}};_0x71034f(++_0x5387bd);}(_0x1448,0x140));var _0x8144=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x1448[_0x2dafbe];return _0x58a45a;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x8144('0x0'));var zipdir=require(_0x8144('0x1'));var jsonpatch=require(_0x8144('0x2'));var rp=require(_0x8144('0x3'));var moment=require('moment');var BPromise=require(_0x8144('0x4'));var Mustache=require(_0x8144('0x5'));var util=require(_0x8144('0x6'));var path=require('path');var sox=require(_0x8144('0x7'));var csv=require(_0x8144('0x8'));var ejs=require(_0x8144('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x8144('0xa'));var squel=require(_0x8144('0xb'));var crypto=require(_0x8144('0xc'));var jsforce=require(_0x8144('0xd'));var deskjs=require(_0x8144('0xe'));var toCsv=require(_0x8144('0x8'));var querystring=require(_0x8144('0xf'));var Papa=require(_0x8144('0x10'));var Redis=require(_0x8144('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x8144('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x8144('0x13'));var logger=require('../../config/logger')(_0x8144('0x14'));var utils=require(_0x8144('0x15'));var config=require(_0x8144('0x16'));var licenseUtil=require(_0x8144('0x17'));var db=require(_0x8144('0x18'))['db'];function respondWithStatusCode(_0xcabbcd,_0x486c96){_0x486c96=_0x486c96||0xcc;return function(_0x2e5885){if(_0x2e5885){return _0xcabbcd['sendStatus'](_0x486c96);}return _0xcabbcd[_0x8144('0x19')](_0x486c96)[_0x8144('0x1a')]();};}function respondWithResult(_0x57e1a7,_0x2f2fa3){_0x2f2fa3=_0x2f2fa3||0xc8;return function(_0x2814d6){if(_0x2814d6){return _0x57e1a7[_0x8144('0x19')](_0x2f2fa3)['json'](_0x2814d6);}};}function respondWithFilteredResult(_0x53a3a9,_0x1d36d3){return function(_0x2dba35){if(_0x2dba35){var _0x5f2942=typeof _0x1d36d3['offset']===_0x8144('0x1b')&&typeof _0x1d36d3[_0x8144('0x1c')]===_0x8144('0x1b');var _0x52ab9f=_0x2dba35[_0x8144('0x1d')];var _0x56d1e5=_0x5f2942?0x0:_0x1d36d3[_0x8144('0x1e')];var _0x5a04d6=_0x5f2942?_0x2dba35[_0x8144('0x1d')]:_0x1d36d3[_0x8144('0x1e')]+_0x1d36d3[_0x8144('0x1c')];var _0x3b58c3;if(_0x5a04d6>=_0x52ab9f){_0x5a04d6=_0x52ab9f;_0x3b58c3=0xc8;}else{_0x3b58c3=0xce;}_0x53a3a9['status'](_0x3b58c3);return _0x53a3a9['set']('Content-Range',_0x56d1e5+'-'+_0x5a04d6+'/'+_0x52ab9f)[_0x8144('0x1f')](_0x2dba35);}return null;};}function patchUpdates(_0x27d313){return function(_0x7ca9cd){try{jsonpatch[_0x8144('0x20')](_0x7ca9cd,_0x27d313,!![]);}catch(_0x49043f){return BPromise[_0x8144('0x21')](_0x49043f);}return _0x7ca9cd[_0x8144('0x22')]();};}function saveUpdates(_0x249abf,_0x464dbf){return function(_0x2aa6a4){if(_0x2aa6a4){return _0x2aa6a4['update'](_0x249abf)['then'](function(_0x334a13){return _0x334a13;});}return null;};}function removeEntity(_0x34a11a,_0x237b14){return function(_0x2f4985){if(_0x2f4985){return _0x2f4985[_0x8144('0x23')]()[_0x8144('0x24')](function(){_0x34a11a[_0x8144('0x19')](0xcc)[_0x8144('0x1a')]();});}};}function handleEntityNotFound(_0x19b49f,_0x31a55e){return function(_0x1a7385){if(!_0x1a7385){_0x19b49f[_0x8144('0x25')](0x194);}return _0x1a7385;};}function handleError(_0xbeaea3,_0x2c5d19){_0x2c5d19=_0x2c5d19||0x1f4;return function(_0x2b44c7){logger[_0x8144('0x26')](_0x2b44c7[_0x8144('0x27')]);if(_0x2b44c7[_0x8144('0x28')]){delete _0x2b44c7[_0x8144('0x28')];}_0xbeaea3[_0x8144('0x19')](_0x2c5d19)['send'](_0x2b44c7);};}exports[_0x8144('0x29')]=function(_0xe3ac2d,_0x40aef7){var _0x19e869={},_0x4538e1={},_0x3fa41d={'count':0x0,'rows':[]};var _0x51f7d8=_[_0x8144('0x2a')](db[_0x8144('0x2b')][_0x8144('0x2c')],function(_0x213f03){return{'name':_0x213f03[_0x8144('0x2d')],'type':_0x213f03[_0x8144('0x2e')]['key']};});_0x4538e1[_0x8144('0x2f')]=_[_0x8144('0x2a')](_0x51f7d8,_0x8144('0x28'));_0x4538e1['query']=_['keys'](_0xe3ac2d[_0x8144('0x30')]);_0x4538e1[_0x8144('0x31')]=_[_0x8144('0x32')](_0x4538e1[_0x8144('0x2f')],_0x4538e1[_0x8144('0x30')]);_0x19e869['attributes']=_['intersection'](_0x4538e1[_0x8144('0x2f')],qs['fields'](_0xe3ac2d[_0x8144('0x30')][_0x8144('0x33')]));_0x19e869[_0x8144('0x34')]=_0x19e869[_0x8144('0x34')][_0x8144('0x35')]?_0x19e869[_0x8144('0x34')]:_0x4538e1[_0x8144('0x2f')];if(!_0xe3ac2d[_0x8144('0x30')][_0x8144('0x36')](_0x8144('0x37'))){_0x19e869[_0x8144('0x1c')]=qs['limit'](_0xe3ac2d[_0x8144('0x30')][_0x8144('0x1c')]);_0x19e869['offset']=qs[_0x8144('0x1e')](_0xe3ac2d[_0x8144('0x30')][_0x8144('0x1e')]);}_0x19e869[_0x8144('0x38')]=qs[_0x8144('0x39')](_0xe3ac2d[_0x8144('0x30')][_0x8144('0x39')]);_0x19e869[_0x8144('0x3a')]=qs[_0x8144('0x31')](_[_0x8144('0x3b')](_0xe3ac2d['query'],_0x4538e1['filters']),_0x51f7d8);if(_0xe3ac2d[_0x8144('0x30')][_0x8144('0x3c')]){_0x19e869[_0x8144('0x3a')]=_[_0x8144('0x3d')](_0x19e869[_0x8144('0x3a')],{'$or':_['map'](_0x51f7d8,function(_0x52988c){if(_0x52988c[_0x8144('0x2e')]!=='VIRTUAL'){var _0x4c8624={};_0x4c8624[_0x52988c['name']]={'$like':'%'+_0xe3ac2d[_0x8144('0x30')][_0x8144('0x3c')]+'%'};return _0x4c8624;}})});}_0x19e869=_['merge']({},_0x19e869,_0xe3ac2d[_0x8144('0x3e')]);var _0x2a9187={'where':_0x19e869[_0x8144('0x3a')]};return db['ChatTransferReport'][_0x8144('0x1d')](_0x2a9187)[_0x8144('0x24')](function(_0x364821){_0x3fa41d[_0x8144('0x1d')]=_0x364821;if(_0xe3ac2d[_0x8144('0x30')][_0x8144('0x3f')]){_0x19e869[_0x8144('0x40')]=[{'all':!![]}];}return db[_0x8144('0x2b')][_0x8144('0x41')](_0x19e869);})[_0x8144('0x24')](function(_0x39fd69){_0x3fa41d[_0x8144('0x42')]=_0x39fd69;return _0x3fa41d;})[_0x8144('0x24')](respondWithFilteredResult(_0x40aef7,_0x19e869))[_0x8144('0x43')](handleError(_0x40aef7,null));};exports[_0x8144('0x44')]=function(_0x2a95cc,_0x1bfa76){var _0x57ee3={'raw':!![],'where':{'id':_0x2a95cc[_0x8144('0x45')]['id']}},_0x1cd4c4={};_0x1cd4c4[_0x8144('0x2f')]=_[_0x8144('0x46')](db['ChatTransferReport'][_0x8144('0x2c')]);_0x1cd4c4['query']=_[_0x8144('0x46')](_0x2a95cc[_0x8144('0x30')]);_0x1cd4c4[_0x8144('0x31')]=_['intersection'](_0x1cd4c4[_0x8144('0x2f')],_0x1cd4c4[_0x8144('0x30')]);_0x57ee3[_0x8144('0x34')]=_[_0x8144('0x32')](_0x1cd4c4['model'],qs['fields'](_0x2a95cc[_0x8144('0x30')][_0x8144('0x33')]));_0x57ee3[_0x8144('0x34')]=_0x57ee3[_0x8144('0x34')][_0x8144('0x35')]?_0x57ee3[_0x8144('0x34')]:_0x1cd4c4['model'];if(_0x2a95cc['query'][_0x8144('0x3f')]){_0x57ee3[_0x8144('0x40')]=[{'all':!![]}];}_0x57ee3=_[_0x8144('0x3d')]({},_0x57ee3,_0x2a95cc[_0x8144('0x3e')]);return db['ChatTransferReport'][_0x8144('0x47')](_0x57ee3)['then'](handleEntityNotFound(_0x1bfa76,null))[_0x8144('0x24')](respondWithResult(_0x1bfa76,null))[_0x8144('0x43')](handleError(_0x1bfa76,null));};exports[_0x8144('0x48')]=function(_0x11df83,_0x22183d){return db['ChatTransferReport'][_0x8144('0x48')](_0x11df83[_0x8144('0x49')],{})[_0x8144('0x24')](respondWithResult(_0x22183d,0xc9))[_0x8144('0x43')](handleError(_0x22183d,null));};exports[_0x8144('0x4a')]=function(_0x215bef,_0x37be38){if(_0x215bef['body']['id']){delete _0x215bef[_0x8144('0x49')]['id'];}return db[_0x8144('0x2b')][_0x8144('0x47')]({'where':{'id':_0x215bef['params']['id']}})[_0x8144('0x24')](handleEntityNotFound(_0x37be38,null))['then'](saveUpdates(_0x215bef[_0x8144('0x49')],null))['then'](respondWithResult(_0x37be38,null))['catch'](handleError(_0x37be38,null));};exports[_0x8144('0x23')]=function(_0x2ae52e,_0x3c0385){return db[_0x8144('0x2b')][_0x8144('0x47')]({'where':{'id':_0x2ae52e[_0x8144('0x45')]['id']}})['then'](handleEntityNotFound(_0x3c0385,null))['then'](removeEntity(_0x3c0385,null))[_0x8144('0x43')](handleError(_0x3c0385,null));};exports[_0x8144('0x4b')]=function(_0x36e709,_0x4d8390){return db[_0x8144('0x2b')]['describe']()['then'](respondWithResult(_0x4d8390,null))[_0x8144('0x43')](handleError(_0x4d8390,null));};
\ No newline at end of file
index 4b40d23..3ac0cb2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8d7f=['define','ChatTransferReport','report_chat_transfer','uniqueid','lodash','moment','bluebird','request-promise','../../config/environment','exports'];(function(_0x25a6a7,_0x1986cb){var _0x20cfd1=function(_0x520e35){while(--_0x520e35){_0x25a6a7['push'](_0x25a6a7['shift']());}};_0x20cfd1(++_0x1986cb);}(_0x8d7f,0x9a));var _0xf8d7=function(_0x1f4723,_0x36b8ff){_0x1f4723=_0x1f4723-0x0;var _0x530eb1=_0x8d7f[_0x1f4723];return _0x530eb1;};'use strict';var _=require(_0xf8d7('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0xf8d7('0x1'));var BPromise=require(_0xf8d7('0x2'));var rp=require(_0xf8d7('0x3'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xf8d7('0x4'));var attributes=require('./chatTransferReport.attributes');module[_0xf8d7('0x5')]=function(_0x3b1e11,_0x5a761b){return _0x3b1e11[_0xf8d7('0x6')](_0xf8d7('0x7'),attributes,{'tableName':_0xf8d7('0x8'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0xf8d7('0x9')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x9da4=['../../config/environment','./chatTransferReport.attributes','exports','define','ChatTransferReport','report_chat_transfer','uniqueid','lodash','../../config/logger','api','moment','bluebird','rimraf'];(function(_0x20c9b2,_0x55d7b1){var _0x2c6030=function(_0x10845f){while(--_0x10845f){_0x20c9b2['push'](_0x20c9b2['shift']());}};_0x2c6030(++_0x55d7b1);}(_0x9da4,0xfe));var _0x49da=function(_0x5e583c,_0x191b41){_0x5e583c=_0x5e583c-0x0;var _0x2b333a=_0x9da4[_0x5e583c];return _0x2b333a;};'use strict';var _=require(_0x49da('0x0'));var util=require('util');var logger=require(_0x49da('0x1'))(_0x49da('0x2'));var moment=require(_0x49da('0x3'));var BPromise=require(_0x49da('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x49da('0x5'));var config=require(_0x49da('0x6'));var attributes=require(_0x49da('0x7'));module[_0x49da('0x8')]=function(_0x209c35,_0x48f866){return _0x209c35[_0x49da('0x9')](_0x49da('0xa'),attributes,{'tableName':_0x49da('0xb'),'paranoid':![],'indexes':[{'name':_0x49da('0xc'),'fields':[_0x49da('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
index 0513d37..240c0d7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa7cc=['util','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','ChatTransferReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','lodash'];(function(_0x1935d2,_0x56905a){var _0x62f9a5=function(_0x4731ce){while(--_0x4731ce){_0x1935d2['push'](_0x1935d2['shift']());}};_0x62f9a5(++_0x56905a);}(_0xa7cc,0x117));var _0xca7c=function(_0xbf8673,_0x3c0a44){_0xbf8673=_0xbf8673-0x0;var _0x2e3921=_0xa7cc[_0xbf8673];return _0x2e3921;};'use strict';var _=require(_0xca7c('0x0'));var util=require(_0xca7c('0x1'));var moment=require('moment');var BPromise=require(_0xca7c('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xca7c('0x3'));var db=require(_0xca7c('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xca7c('0x5'))(_0xca7c('0x6'));var config=require(_0xca7c('0x7'));var jayson=require(_0xca7c('0x8'));var client=jayson[_0xca7c('0x9')][_0xca7c('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x52e31f,_0x27e35e,_0x1ac0b3){return new BPromise(function(_0x1a39f2,_0x4955d5){return client[_0xca7c('0xb')](_0x52e31f,_0x1ac0b3)[_0xca7c('0xc')](function(_0x5be8fd){logger[_0xca7c('0xd')](_0xca7c('0xe'),_0x27e35e,_0xca7c('0xf'));logger[_0xca7c('0x10')]('ChatTransferReport,\x20%s,\x20%s,\x20%s',_0x27e35e,_0xca7c('0xf'),JSON[_0xca7c('0x11')](_0x5be8fd));if(_0x5be8fd[_0xca7c('0x12')]){if(_0x5be8fd['error']['code']===0x1f4){logger[_0xca7c('0x12')](_0xca7c('0xe'),_0x27e35e,_0x5be8fd[_0xca7c('0x12')][_0xca7c('0x13')]);return _0x4955d5(_0x5be8fd['error']['message']);}logger[_0xca7c('0x12')](_0xca7c('0xe'),_0x27e35e,_0x5be8fd[_0xca7c('0x12')][_0xca7c('0x13')]);return _0x1a39f2(_0x5be8fd[_0xca7c('0x12')]['message']);}else{logger[_0xca7c('0xd')](_0xca7c('0xe'),_0x27e35e,'request\x20sent');_0x1a39f2(_0x5be8fd['result'][_0xca7c('0x13')]);}})['catch'](function(_0xdd5460){logger[_0xca7c('0x12')](_0xca7c('0xe'),_0x27e35e,_0xdd5460);_0x4955d5(_0xdd5460);});});}
\ No newline at end of file
+var _0x93da=['util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','then','info','ChatTransferReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash'];(function(_0x45f951,_0x2750c8){var _0x24756c=function(_0x31c931){while(--_0x31c931){_0x45f951['push'](_0x45f951['shift']());}};_0x24756c(++_0x2750c8);}(_0x93da,0xb7));var _0xa93d=function(_0x487654,_0x1782aa){_0x487654=_0x487654-0x0;var _0x31b87a=_0x93da[_0x487654];return _0x31b87a;};'use strict';var _=require(_0xa93d('0x0'));var util=require(_0xa93d('0x1'));var moment=require(_0xa93d('0x2'));var BPromise=require('bluebird');var rs=require(_0xa93d('0x3'));var fs=require('fs');var Redis=require(_0xa93d('0x4'));var db=require(_0xa93d('0x5'))['db'];var utils=require(_0xa93d('0x6'));var logger=require(_0xa93d('0x7'))(_0xa93d('0x8'));var config=require(_0xa93d('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0xa93d('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2df133,_0x1941de,_0x47e1c2){return new BPromise(function(_0x59d214,_0x5d7d3b){return client[_0xa93d('0xb')](_0x2df133,_0x47e1c2)[_0xa93d('0xc')](function(_0x441ba7){logger[_0xa93d('0xd')](_0xa93d('0xe'),_0x1941de,_0xa93d('0xf'));logger[_0xa93d('0x10')]('ChatTransferReport,\x20%s,\x20%s,\x20%s',_0x1941de,_0xa93d('0xf'),JSON[_0xa93d('0x11')](_0x441ba7));if(_0x441ba7['error']){if(_0x441ba7[_0xa93d('0x12')][_0xa93d('0x13')]===0x1f4){logger[_0xa93d('0x12')](_0xa93d('0xe'),_0x1941de,_0x441ba7[_0xa93d('0x12')][_0xa93d('0x14')]);return _0x5d7d3b(_0x441ba7[_0xa93d('0x12')][_0xa93d('0x14')]);}logger[_0xa93d('0x12')](_0xa93d('0xe'),_0x1941de,_0x441ba7[_0xa93d('0x12')][_0xa93d('0x14')]);return _0x59d214(_0x441ba7[_0xa93d('0x12')][_0xa93d('0x14')]);}else{logger[_0xa93d('0xd')](_0xa93d('0xe'),_0x1941de,'request\x20sent');_0x59d214(_0x441ba7[_0xa93d('0x15')][_0xa93d('0x14')]);}})[_0xa93d('0x16')](function(_0x5eea27){logger[_0xa93d('0x12')](_0xa93d('0xe'),_0x1941de,_0x5eea27);_0x5d7d3b(_0x5eea27);});});}
\ No newline at end of file
index f74ba9d..1ebeb8d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2300=['destroy','exports','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatTransferReport.controller','get','isAuthenticated','index','/describe','describe','/:id','show','create','update','delete'];(function(_0x5a96ef,_0x3d30a3){var _0x501c2d=function(_0x1735b6){while(--_0x1735b6){_0x5a96ef['push'](_0x5a96ef['shift']());}};_0x501c2d(++_0x3d30a3);}(_0x2300,0xd4));var _0x0230=function(_0x1fd804,_0x1ad0b6){_0x1fd804=_0x1fd804-0x0;var _0x2df181=_0x2300[_0x1fd804];return _0x2df181;};'use strict';var multer=require('multer');var util=require(_0x0230('0x0'));var path=require(_0x0230('0x1'));var timeout=require('connect-timeout');var express=require(_0x0230('0x2'));var router=express[_0x0230('0x3')]();var fs_extra=require(_0x0230('0x4'));var auth=require(_0x0230('0x5'));var interaction=require(_0x0230('0x6'));var config=require(_0x0230('0x7'));var controller=require(_0x0230('0x8'));router[_0x0230('0x9')]('/',auth[_0x0230('0xa')](),controller[_0x0230('0xb')]);router[_0x0230('0x9')](_0x0230('0xc'),auth['isAuthenticated'](),controller[_0x0230('0xd')]);router[_0x0230('0x9')](_0x0230('0xe'),auth[_0x0230('0xa')](),controller[_0x0230('0xf')]);router['post']('/',auth[_0x0230('0xa')](),controller[_0x0230('0x10')]);router['put'](_0x0230('0xe'),auth[_0x0230('0xa')](),controller[_0x0230('0x11')]);router[_0x0230('0x12')](_0x0230('0xe'),auth[_0x0230('0xa')](),controller[_0x0230('0x13')]);module[_0x0230('0x14')]=router;
\ No newline at end of file
+var _0xe57c=['./chatTransferReport.controller','get','isAuthenticated','index','/describe','/:id','show','create','put','delete','destroy','exports','multer','util','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x40220a,_0x22feb1){var _0x3903cc=function(_0x33a296){while(--_0x33a296){_0x40220a['push'](_0x40220a['shift']());}};_0x3903cc(++_0x22feb1);}(_0xe57c,0x91));var _0xce57=function(_0x4bbf1a,_0x338546){_0x4bbf1a=_0x4bbf1a-0x0;var _0x1c489a=_0xe57c[_0x4bbf1a];return _0x1c489a;};'use strict';var multer=require(_0xce57('0x0'));var util=require(_0xce57('0x1'));var path=require('path');var timeout=require(_0xce57('0x2'));var express=require('express');var router=express[_0xce57('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xce57('0x4'));var interaction=require(_0xce57('0x5'));var config=require(_0xce57('0x6'));var controller=require(_0xce57('0x7'));router[_0xce57('0x8')]('/',auth[_0xce57('0x9')](),controller[_0xce57('0xa')]);router[_0xce57('0x8')](_0xce57('0xb'),auth[_0xce57('0x9')](),controller['describe']);router[_0xce57('0x8')](_0xce57('0xc'),auth[_0xce57('0x9')](),controller[_0xce57('0xd')]);router['post']('/',auth[_0xce57('0x9')](),controller[_0xce57('0xe')]);router[_0xce57('0xf')]('/:id',auth['isAuthenticated'](),controller['update']);router[_0xce57('0x10')]('/:id',auth[_0xce57('0x9')](),controller[_0xce57('0x11')]);module[_0xce57('0x12')]=router;
\ No newline at end of file
index 344f795..6eaca4b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcb34=['name','getDataValue','onlineForm','textarea','Comments','Leave\x20your\x20comments','parse','offlineForm','setDataValue','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.','You\x20received\x20a\x20new\x20offline\x20message\x20from\x20websiteName.\x20Here\x20you\x20can\x20find\x20the\x20details\x20of\x20the\x20request:','Skip','Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}','website_alias','bottom_right','alternate','#fafafa','System','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','Generated\x20by\x20XCALLY\x20Motion','Meeting\x20generated\x20for\x20interaction\x20#{{interaction.id}}\x20by\x20{{agent.name}}','sequelize','randomstring','exports','STRING','email','#011F6A','#ffffff','INTEGER','ENUM','squared','We\x20are\x20here!','Chat','Contact\x20us','BOOLEAN','Powered\x20by\x20xCALLY','TEXT','Form\x20properly\x20submitted','Form\x20submission\x20error','Type\x20a\x20message','Thanks\x20you\x20for\x20your\x20time!','Send','thumb','star','stringify','input'];(function(_0x4243a3,_0x447337){var _0x1b2a33=function(_0x6a8200){while(--_0x6a8200){_0x4243a3['push'](_0x4243a3['shift']());}};_0x1b2a33(++_0x447337);}(_0xcb34,0xa7));var _0x4cb3=function(_0x476bf4,_0x2a3755){_0x476bf4=_0x476bf4-0x0;var _0x788ffe=_0xcb34[_0x476bf4];return _0x788ffe;};'use strict';var Sequelize=require(_0x4cb3('0x0'));var rs=require(_0x4cb3('0x1'));module[_0x4cb3('0x2')]={'name':{'type':Sequelize[_0x4cb3('0x3')],'allowNull':![]},'address':{'type':Sequelize[_0x4cb3('0x3')],'allowNull':![],'unique':'address'},'description':{'type':Sequelize['STRING']},'mapKey':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':_0x4cb3('0x4')},'mapKeyOffline':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':_0x4cb3('0x4')},'key':{'type':Sequelize[_0x4cb3('0x3')],'allowNull':![]},'agentAlias':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':'Agent'},'customerAlias':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':'Me'},'color':{'type':Sequelize[_0x4cb3('0x3')],'allowNull':![],'defaultValue':_0x4cb3('0x5'),'validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize[_0x4cb3('0x3')],'allowNull':![],'defaultValue':_0x4cb3('0x5'),'validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x4cb3('0x6'),'validate':{'notEmpty':!![]}},'textButtonColor':{'type':Sequelize[_0x4cb3('0x3')],'allowNull':![],'defaultValue':_0x4cb3('0x6'),'validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize[_0x4cb3('0x7')],'defaultValue':0xf},'remote':{'type':Sequelize[_0x4cb3('0x3')]},'animation':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'header_shape':{'type':Sequelize[_0x4cb3('0x8')]('rounded',_0x4cb3('0x9')),'defaultValue':'rounded'},'header_online':{'type':Sequelize['STRING'],'defaultValue':_0x4cb3('0xa')},'start_chat_button':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':_0x4cb3('0xb')},'offline_chat_button':{'type':Sequelize['STRING'],'defaultValue':'Send'},'header_offline':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':_0x4cb3('0xc')},'download_transcript':{'type':Sequelize[_0x4cb3('0xd')],'defaultValue':!![]},'timeout':{'type':Sequelize[_0x4cb3('0x7')],'defaultValue':0x0},'whiteLabel':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':_0x4cb3('0xe')},'defaultWhiteLabel':{'type':Sequelize[_0x4cb3('0xd')],'defaultValue':!![]},'sitepic':{'type':Sequelize[_0x4cb3('0xf')]},'closingQuestion':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':'Do\x20you\x20want\x20to\x20close\x20the\x20interaction?'},'formSubmitSuccessMessage':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':_0x4cb3('0x10')},'formSubmitFailureMessage':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':_0x4cb3('0x11')},'noteTitle':{'type':Sequelize['STRING'],'defaultValue':'Note'},'placeholderMessage':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':_0x4cb3('0x12')},'closingMessage':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':_0x4cb3('0x13')},'closingMessageButton':{'type':Sequelize['STRING'],'defaultValue':_0x4cb3('0x14')},'skipMessageButton':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':'Skip'},'conditionAgreement':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableRating':{'type':Sequelize[_0x4cb3('0xd')],'defaultValue':![]},'enableFeedback':{'type':Sequelize[_0x4cb3('0xd')],'defaultValue':![]},'enableSendButton':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'feedbackTitle':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':'Feedback'},'ratingType':{'type':Sequelize[_0x4cb3('0x8')]('star',_0x4cb3('0x15')),'defaultValue':_0x4cb3('0x16')},'ratingStarsNumber':{'type':Sequelize[_0x4cb3('0x7')],'defaultValue':0x5},'onlineForm':{'type':Sequelize['TEXT'],'defaultValue':function(){return JSON[_0x4cb3('0x17')]({'items':[{'type':_0x4cb3('0x18'),'variable':null,'config':{'placeholder':_0x4cb3('0x19'),'type':'text','required':!![]},'props':{'title':'name','helpText':''}},{'type':'input','props':{'title':_0x4cb3('0x4'),'helpText':''},'config':{'required':!![],'placeholder':_0x4cb3('0x4'),'type':_0x4cb3('0x4')},'variable':null}],'fromKey':0x1});},'get':function(){return this[_0x4cb3('0x1a')](_0x4cb3('0x1b'))?JSON['parse'](this[_0x4cb3('0x1a')](_0x4cb3('0x1b'))):{};},'set':function(_0x1a0f21){return this['setDataValue']('onlineForm',JSON[_0x4cb3('0x17')](_0x1a0f21));}},'offlineForm':{'type':Sequelize['TEXT'],'defaultValue':function(){return JSON['stringify']({'items':[{'type':'input','props':{'title':_0x4cb3('0x4'),'helpText':''},'config':{'required':!![],'placeholder':_0x4cb3('0x4'),'type':_0x4cb3('0x4')},'variable':null},{'type':_0x4cb3('0x1c'),'config':{'placeholder':_0x4cb3('0x1d')},'props':{'title':'Comments','helpText':_0x4cb3('0x1e')}}],'fromKey':0x0});},'get':function(){return this[_0x4cb3('0x1a')]('offlineForm')?JSON[_0x4cb3('0x1f')](this[_0x4cb3('0x1a')](_0x4cb3('0x20'))):{};},'set':function(_0xa0595a){return this[_0x4cb3('0x21')](_0x4cb3('0x20'),JSON['stringify'](_0xa0595a));}},'token':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':function(){return rs['generate']();}},'autoclose':{'type':Sequelize[_0x4cb3('0xd')],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize[_0x4cb3('0xd')],'defaultValue':![]},'forwardTranscript':{'type':Sequelize[_0x4cb3('0xd')],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize[_0x4cb3('0x3')]},'forwardOffline':{'type':Sequelize[_0x4cb3('0xd')],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize[_0x4cb3('0x3')]},'waitingTitle':{'type':Sequelize['STRING'],'defaultValue':_0x4cb3('0x22')},'waitingMessage':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':_0x4cb3('0x23')},'offlineMessageSubject':{'type':Sequelize['STRING'],'defaultValue':'New\x20offline\x20message\x20from\x20websiteName'},'offlineMessageBody':{'type':Sequelize['STRING'],'defaultValue':_0x4cb3('0x24')},'enableUnmanagedNote':{'type':Sequelize[_0x4cb3('0xd')],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':'Your\x20request\x20has\x20not\x20been\x20processed.'},'skipUnmanaged':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':_0x4cb3('0x25')},'sendUnmanaged':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':_0x4cb3('0x14')},'enableCustomerAttachment':{'type':Sequelize[_0x4cb3('0xd')],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentAvatar':{'type':Sequelize['TEXT']},'showAgentAvatar':{'type':Sequelize[_0x4cb3('0xd')],'defaultValue':![]},'timezone':{'type':Sequelize['STRING']},'notificationTemplate':{'type':Sequelize[_0x4cb3('0xf')],'defaultValue':function(){return _0x4cb3('0x26');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x4cb3('0xd')],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize[_0x4cb3('0xd')],'defaultValue':![]},'agentIdentifier':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':_0x4cb3('0x27')},'waitForTheAssignedAgent':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0x4cb3('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':_0x4cb3('0x28')},'verticalAlignment':{'type':Sequelize['INTEGER'],'defaultValue':0x1e},'labelText':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':'CHAT'},'messagesAlignment':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':_0x4cb3('0x29')},'defaultTitle':{'type':Sequelize[_0x4cb3('0x3')]},'customerAvatar':{'type':Sequelize['TEXT']},'showCustomerAvatar':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'messageFontSize':{'type':Sequelize['INTEGER'],'defaultValue':0xc},'backgroundColor':{'type':Sequelize[_0x4cb3('0x3')],'allowNull':![],'defaultValue':_0x4cb3('0x2a'),'validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x4cb3('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x4cb3('0xd')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x4cb3('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':_0x4cb3('0x2b')},'systemAvatar':{'type':Sequelize[_0x4cb3('0xf')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0x4cb3('0x7')],'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0x4cb3('0xd')],'defaultValue':![],'comment':_0x4cb3('0x2c'),'set':function(_0x1eb7ab){if(!_0x1eb7ab)this['setDataValue'](_0x4cb3('0x2d'),null);this['setDataValue']('mandatoryDisposition',_0x1eb7ab);}},'vidaooEscalation':{'type':Sequelize[_0x4cb3('0xd')],'defaultValue':![]},'vidaooApiKey':{'type':Sequelize[_0x4cb3('0x3')]},'vidaooTopic':{'type':Sequelize[_0x4cb3('0x3')],'allowNull':![],'defaultValue':_0x4cb3('0x2e')},'vidaooNote':{'type':Sequelize[_0x4cb3('0x3')],'defaultValue':function(){return _0x4cb3('0x2f');}},'vidaooMetadata':{'type':Sequelize[_0x4cb3('0xf')],'defaultValue':null},'openNewInteraction':{'type':Sequelize[_0x4cb3('0xd')],'defaultValue':![],'allowNull':!![]},'subjectOffline':{'type':Sequelize[_0x4cb3('0xf')]}};
\ No newline at end of file
+var _0xadc6=['Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','mandatoryDispositionPauseId','mandatoryDisposition','Generated\x20by\x20XCALLY\x20Motion','sequelize','randomstring','exports','STRING','address','Agent','#011F6A','#ffffff','INTEGER','BOOLEAN','ENUM','rounded','squared','We\x20are\x20here!','Chat','Contact\x20us','Powered\x20by\x20xCALLY','TEXT','Do\x20you\x20want\x20to\x20close\x20the\x20interaction?','Form\x20submission\x20error','Note','Type\x20a\x20message','Thanks\x20you\x20for\x20your\x20time!','Send','Skip','star','thumb','name','text','email','getDataValue','onlineForm','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.','New\x20offline\x20message\x20from\x20websiteName','Your\x20request\x20has\x20not\x20been\x20processed.','Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}','website_alias','CHAT','alternate','#fafafa','System'];(function(_0x188e7e,_0xf6325c){var _0xf95a4f=function(_0x1455d2){while(--_0x1455d2){_0x188e7e['push'](_0x188e7e['shift']());}};_0xf95a4f(++_0xf6325c);}(_0xadc6,0x1d8));var _0x6adc=function(_0x18ab2a,_0x4debcd){_0x18ab2a=_0x18ab2a-0x0;var _0x16dcee=_0xadc6[_0x18ab2a];return _0x16dcee;};'use strict';var Sequelize=require(_0x6adc('0x0'));var rs=require(_0x6adc('0x1'));module[_0x6adc('0x2')]={'name':{'type':Sequelize[_0x6adc('0x3')],'allowNull':![]},'address':{'type':Sequelize[_0x6adc('0x3')],'allowNull':![],'unique':_0x6adc('0x4')},'description':{'type':Sequelize[_0x6adc('0x3')]},'mapKey':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':'email'},'mapKeyOffline':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':'email'},'key':{'type':Sequelize['STRING'],'allowNull':![]},'agentAlias':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0x5')},'customerAlias':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':'Me'},'color':{'type':Sequelize[_0x6adc('0x3')],'allowNull':![],'defaultValue':_0x6adc('0x6'),'validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x6adc('0x6'),'validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize[_0x6adc('0x3')],'allowNull':![],'defaultValue':_0x6adc('0x7'),'validate':{'notEmpty':!![]}},'textButtonColor':{'type':Sequelize[_0x6adc('0x3')],'allowNull':![],'defaultValue':_0x6adc('0x7'),'validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize[_0x6adc('0x8')],'defaultValue':0xf},'remote':{'type':Sequelize[_0x6adc('0x3')]},'animation':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':!![]},'header_shape':{'type':Sequelize[_0x6adc('0xa')](_0x6adc('0xb'),_0x6adc('0xc')),'defaultValue':'rounded'},'header_online':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0xd')},'start_chat_button':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0xe')},'offline_chat_button':{'type':Sequelize['STRING'],'defaultValue':'Send'},'header_offline':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0xf')},'download_transcript':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':!![]},'timeout':{'type':Sequelize[_0x6adc('0x8')],'defaultValue':0x0},'whiteLabel':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0x10')},'defaultWhiteLabel':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':!![]},'sitepic':{'type':Sequelize[_0x6adc('0x11')]},'closingQuestion':{'type':Sequelize['STRING'],'defaultValue':_0x6adc('0x12')},'formSubmitSuccessMessage':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':'Form\x20properly\x20submitted'},'formSubmitFailureMessage':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0x13')},'noteTitle':{'type':Sequelize['STRING'],'defaultValue':_0x6adc('0x14')},'placeholderMessage':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0x15')},'closingMessage':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0x16')},'closingMessageButton':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0x17')},'skipMessageButton':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0x18')},'conditionAgreement':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':![]},'enableRating':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableFeedback':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':![]},'enableSendButton':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':![]},'feedbackTitle':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':'Feedback'},'ratingType':{'type':Sequelize['ENUM'](_0x6adc('0x19'),_0x6adc('0x1a')),'defaultValue':'star'},'ratingStarsNumber':{'type':Sequelize[_0x6adc('0x8')],'defaultValue':0x5},'onlineForm':{'type':Sequelize[_0x6adc('0x11')],'defaultValue':function(){return JSON['stringify']({'items':[{'type':'input','variable':null,'config':{'placeholder':_0x6adc('0x1b'),'type':_0x6adc('0x1c'),'required':!![]},'props':{'title':_0x6adc('0x1b'),'helpText':''}},{'type':'input','props':{'title':_0x6adc('0x1d'),'helpText':''},'config':{'required':!![],'placeholder':_0x6adc('0x1d'),'type':_0x6adc('0x1d')},'variable':null}],'fromKey':0x1});},'get':function(){return this[_0x6adc('0x1e')]('onlineForm')?JSON['parse'](this['getDataValue'](_0x6adc('0x1f'))):{};},'set':function(_0x372502){return this[_0x6adc('0x20')](_0x6adc('0x1f'),JSON[_0x6adc('0x21')](_0x372502));}},'offlineForm':{'type':Sequelize[_0x6adc('0x11')],'defaultValue':function(){return JSON[_0x6adc('0x21')]({'items':[{'type':'input','props':{'title':_0x6adc('0x1d'),'helpText':''},'config':{'required':!![],'placeholder':'email','type':_0x6adc('0x1d')},'variable':null},{'type':'textarea','config':{'placeholder':_0x6adc('0x22')},'props':{'title':_0x6adc('0x22'),'helpText':_0x6adc('0x23')}}],'fromKey':0x0});},'get':function(){return this[_0x6adc('0x1e')](_0x6adc('0x24'))?JSON['parse'](this['getDataValue'](_0x6adc('0x24'))):{};},'set':function(_0x4be586){return this[_0x6adc('0x20')]('offlineForm',JSON[_0x6adc('0x21')](_0x4be586));}},'token':{'type':Sequelize['STRING'],'defaultValue':function(){return rs[_0x6adc('0x25')]();}},'autoclose':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':![]},'forwardTranscript':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize[_0x6adc('0x3')]},'forwardOffline':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize[_0x6adc('0x3')]},'waitingTitle':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0x26')},'waitingMessage':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0x27')},'offlineMessageSubject':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0x28')},'offlineMessageBody':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':'You\x20received\x20a\x20new\x20offline\x20message\x20from\x20websiteName.\x20Here\x20you\x20can\x20find\x20the\x20details\x20of\x20the\x20request:'},'enableUnmanagedNote':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0x29')},'skipUnmanaged':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0x18')},'sendUnmanaged':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0x17')},'enableCustomerAttachment':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentAvatar':{'type':Sequelize[_0x6adc('0x11')]},'showAgentAvatar':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':![]},'timezone':{'type':Sequelize['STRING']},'notificationTemplate':{'type':Sequelize[_0x6adc('0x11')],'defaultValue':function(){return _0x6adc('0x2a');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':![]},'agentIdentifier':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0x2b')},'waitForTheAssignedAgent':{'type':Sequelize[_0x6adc('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0x6adc('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':'bottom_right'},'verticalAlignment':{'type':Sequelize[_0x6adc('0x8')],'defaultValue':0x1e},'labelText':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0x2c')},'messagesAlignment':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0x2d')},'defaultTitle':{'type':Sequelize['STRING']},'customerAvatar':{'type':Sequelize[_0x6adc('0x11')]},'showCustomerAvatar':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':![]},'messageFontSize':{'type':Sequelize[_0x6adc('0x8')],'defaultValue':0xc},'backgroundColor':{'type':Sequelize[_0x6adc('0x3')],'allowNull':![],'defaultValue':_0x6adc('0x2e'),'validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x6adc('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':_0x6adc('0x2f')},'systemAvatar':{'type':Sequelize['TEXT']},'mandatoryDispositionPauseId':{'type':Sequelize[_0x6adc('0x8')],'comment':_0x6adc('0x30')},'mandatoryDisposition':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x5b4343){if(!_0x5b4343)this[_0x6adc('0x20')](_0x6adc('0x31'),null);this[_0x6adc('0x20')](_0x6adc('0x32'),_0x5b4343);}},'vidaooEscalation':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':![]},'vidaooApiKey':{'type':Sequelize[_0x6adc('0x3')]},'vidaooTopic':{'type':Sequelize[_0x6adc('0x3')],'allowNull':![],'defaultValue':_0x6adc('0x33')},'vidaooNote':{'type':Sequelize[_0x6adc('0x3')],'defaultValue':function(){return'Meeting\x20generated\x20for\x20interaction\x20#{{interaction.id}}\x20by\x20{{agent.name}}';}},'vidaooMetadata':{'type':Sequelize[_0x6adc('0x11')],'defaultValue':null},'openNewInteraction':{'type':Sequelize[_0x6adc('0x9')],'defaultValue':![],'allowNull':!![]},'subjectOffline':{'type':Sequelize[_0x6adc('0x11')]}};
\ No newline at end of file
index ff7913a..4da95e1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2fd8=['then','info','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','request\x20sent','error','ChatWebsite,\x20%s,\x20%s','message','result','catch','sendStatus','status','end','json','offset','count','limit','set','Content-Range','update','destroy','get','UserProfileResource','name','send','setUA','customerIp','x-forwarded-for','split','lastName','x-real-port','referer','browser','version','format','%s\x20%s','unknown','device','model','vendor','%s\x20%s\x20%s','type','stringify','index','Pause','mandatoryDispositionPause','map','ChatWebsite','fieldName','keys','query','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','VIRTUAL','include','findAll','rows','show','params','length','merge','options','find','testWildcardValidity','body','\x22\x20is\x20not\x20a\x20valid\x20website\x20domain','Unable\x20to\x20retrieve\x20the\x20current\x20user','ChatWebsites','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','address','describe','ChatWebsiteId','Disposition','create','getDispositions','findOne','rawAttributes','includeAll','removeDispositions','CannedAnswer','getAnswers','removeAnswers','ids','addLogo','sitepic','filename','addAvatar','agentAvatar','addCustomerAvatar','customerAvatar','systemAvatar','getLogo','join','server/files/images/logos/default_logo.svg','../../config/license/util','getLicense','custom','isNil','existsSync','root','server/files/images/logos/','getAvatar','server/files/images/avatars/','getCustomerAvatar','server/files/images/avatars/customer_avatar.png','showCustomerAvatar','download','server/files/images/avatars/system_avatar.png','Interval','resolve','timezone','ifTime','from','From\x20is\x20mandatory','mapKey','Body\x20is\x20mandatory','CmContact','No\x20available\x20attributes','updatedAt','includes','createdAt','ListId','Invalid\x20MapKey\x20parameter.\x20Allowed\x20values:\x20','List','Contacts','DESC','ChatApplication','Applications','Intervals','Chat\x20Website\x20with\x20id\x20%s\x20not\x20found','account','orderBy','priority','list','contact','headers','threadId','closed','externalUrl','ContactId','interaction','ChatInteraction','messageId','created','push','close','unmanaged','*,*,*,*','ChatMessage','AttachmentId','UserId','applications','unshift','agent','waitForTheAssignedAgent','forcedOwnership','queue','waitForTheAssignedQueue','Start','startRouting','offline','Sequelize','ValidationError','no\x20available\x20attributes','difference','CompanyId','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKeyOffline','mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','MailAccount','spread','readFileSync','server/files/templates/chatOfflineMessage.ejs','utf8','render','toPairs','offlineMessageBody','fromString','originalname','mimetype','server','files','attachments','offline-chat','basename','openNewInteraction','sequelize','transaction','Attachment','Smtp','CloudProvider','forwardOffline','getSmtpOptions','SendMail','sendMail','\x22%s\x22\x20<%s>','email','forwardOfflineAddress','offlineMessageSubject','MailAccountId','toPairsIn','mapValues','subjectOffline','Chat','NotifyMailAccount','notifyMail','omit','getInteractions','User','Owner','fullname','Tag','Tags','tag','getSnippet','interval','virtual','License','increment','chatLicenseExceeded','server/files/chat/iframe.ejs','3.9.0','origin','replace','testWebsiteWithWildcard','remote','x-real-ip','connection','remoteAddress','alignment','color','hideWhenOffline','IntervalId','addApplications','Transaction','ISOLATION_LEVELS','READ_COMMITTED','bulkCreate','findAndCountAll','stack','finally','getApplications','addProactiveActions','chatProactiveAction','getProactiveActions','getFields','false','offlineForm','items','fromKey','getOfflineMessages','ChatOfflineMessage','Contact','Attachments','emit','userChatWebsite:save','removeAgents','isArray','userChatWebsite:remove','getAgents','mustache','util','ejs','lodash','querystring','html-to-text','jayson/promise','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../errors/api','APIBadRequestError','APIOutOfIntervalError','handleError','APIConflictError','url','URL','../../mysqldb','redis','defaults','socket.io-emitter','./chatWebsite.socket','register','client','http','request'];(function(_0xa978d9,_0x21203d){var _0x5bf53c=function(_0x38ae21){while(--_0x38ae21){_0xa978d9['push'](_0xa978d9['shift']());}};_0x5bf53c(++_0x21203d);}(_0x2fd8,0x111));var _0x82fd=function(_0x29d096,_0x4f3bf9){_0x29d096=_0x29d096-0x0;var _0x469bb8=_0x2fd8[_0x29d096];return _0x469bb8;};'use strict';var Mustache=require(_0x82fd('0x0'));var util=require(_0x82fd('0x1'));var path=require('path');var ejs=require(_0x82fd('0x2'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x82fd('0x3'));var querystring=require(_0x82fd('0x4'));var htmlToText=require(_0x82fd('0x5'));var Redis=require('ioredis');var jayson=require(_0x82fd('0x6'));var qs=require(_0x82fd('0x7'));var logger=require(_0x82fd('0x8'))(_0x82fd('0x9'));var config=require(_0x82fd('0xa'));var APIBadRequestError=require(_0x82fd('0xb'))[_0x82fd('0xc')];var APINotFoundError=require(_0x82fd('0xb'))['APINotFoundError'];var APIOutOfIntervalError=require(_0x82fd('0xb'))[_0x82fd('0xd')];var APIHandleError=require(_0x82fd('0xb'))[_0x82fd('0xe')];var APIConflictError=require(_0x82fd('0xb'))[_0x82fd('0xf')];var wildcardUtils=require('./helpers/wildcard-expressions');var URL=require(_0x82fd('0x10'))[_0x82fd('0x11')];var db=require(_0x82fd('0x12'))['db'];config[_0x82fd('0x13')]=_[_0x82fd('0x14')](config[_0x82fd('0x13')],{'host':'localhost','port':0x18eb});var socket=require(_0x82fd('0x15'))(new Redis(config['redis']));require(_0x82fd('0x16'))[_0x82fd('0x17')](socket);var client=jayson[_0x82fd('0x18')][_0x82fd('0x19')]({'port':0x232c});var client9002=jayson[_0x82fd('0x18')][_0x82fd('0x19')]({'port':0x232a});var client9003=jayson['client'][_0x82fd('0x19')]({'port':0x232b});var client9001=jayson[_0x82fd('0x18')][_0x82fd('0x19')]({'port':0x2329});function respondWithRpcPromise(_0x30de91,_0x21d9ef,_0x502d6b,_0x4d48a0){return new Promise(function(_0x220113,_0xb10881){var _0x5743ed=_0x4d48a0||client;return _0x5743ed[_0x82fd('0x1a')](_0x30de91,_0x502d6b)[_0x82fd('0x1b')](function(_0x4b0390){logger[_0x82fd('0x1c')]('ChatWebsite,\x20%s,\x20%s',_0x21d9ef,'request\x20sent');logger[_0x82fd('0x1d')](_0x82fd('0x1e'),_0x21d9ef,_0x82fd('0x1f'),JSON['stringify'](_0x4b0390));if(_0x4b0390['error']){if(_0x4b0390[_0x82fd('0x20')]['code']===0x1f4){logger[_0x82fd('0x20')](_0x82fd('0x21'),_0x21d9ef,_0x4b0390[_0x82fd('0x20')][_0x82fd('0x22')]);return _0xb10881(_0x4b0390[_0x82fd('0x20')]['message']);}logger[_0x82fd('0x20')](_0x82fd('0x21'),_0x21d9ef,_0x4b0390[_0x82fd('0x20')]['message']);return _0x220113(_0x4b0390[_0x82fd('0x20')][_0x82fd('0x22')]);}else{logger['info'](_0x82fd('0x21'),_0x21d9ef,_0x82fd('0x1f'));_0x220113(_0x4b0390[_0x82fd('0x23')][_0x82fd('0x22')]);}})[_0x82fd('0x24')](function(_0x46d995){logger[_0x82fd('0x20')](_0x82fd('0x21'),_0x21d9ef,_0x46d995);_0xb10881(_0x46d995);});});}function respondWithStatusCode(_0x753d42,_0x5a7524){_0x5a7524=_0x5a7524||0xcc;return function(_0xb06967){if(_0xb06967){return _0x753d42[_0x82fd('0x25')](_0x5a7524);}return _0x753d42[_0x82fd('0x26')](_0x5a7524)[_0x82fd('0x27')]();};}function respondWithResult(_0x13f52b,_0x15ce1e){_0x15ce1e=_0x15ce1e||0xc8;return function(_0x230944){if(_0x230944){return _0x13f52b['status'](_0x15ce1e)[_0x82fd('0x28')](_0x230944);}};}function respondWithFilteredResult(_0x5af228,_0x18599f){return function(_0x8d272d){if(_0x8d272d){var _0x15dc69=typeof _0x18599f[_0x82fd('0x29')]==='undefined'&&typeof _0x18599f['limit']==='undefined';var _0x7abfeb=_0x8d272d[_0x82fd('0x2a')];var _0x954d3c=_0x15dc69?0x0:_0x18599f[_0x82fd('0x29')];var _0x1bfd1a=_0x15dc69?_0x8d272d[_0x82fd('0x2a')]:_0x18599f[_0x82fd('0x29')]+_0x18599f[_0x82fd('0x2b')];var _0x51e6a0;if(_0x1bfd1a>=_0x7abfeb){_0x1bfd1a=_0x7abfeb;_0x51e6a0=0xc8;}else{_0x51e6a0=0xce;}_0x5af228[_0x82fd('0x26')](_0x51e6a0);return _0x5af228[_0x82fd('0x2c')](_0x82fd('0x2d'),_0x954d3c+'-'+_0x1bfd1a+'/'+_0x7abfeb)['json'](_0x8d272d);}return null;};}function saveUpdates(_0x4481fc){return function(_0xa8a540){if(_0xa8a540){return _0xa8a540[_0x82fd('0x2e')](_0x4481fc)['then'](function(_0x59c3cd){return _0x59c3cd;});}return null;};}function removeEntity(_0x16e5e7){return function(_0x33fe53){if(_0x33fe53){return _0x33fe53[_0x82fd('0x2f')]()[_0x82fd('0x1b')](function(){var _0x392513=_0x33fe53[_0x82fd('0x30')]({'plain':!![]});var _0x356a73='ChatWebsites';return db[_0x82fd('0x31')][_0x82fd('0x2f')]({'where':{'type':_0x356a73,'resourceId':_0x392513['id']}})[_0x82fd('0x1b')](function(){return _0x33fe53;});})[_0x82fd('0x1b')](function(){_0x16e5e7[_0x82fd('0x26')](0xcc)[_0x82fd('0x27')]();});}};}function handleEntityNotFound(_0x3dffac){return function(_0x45f3a4){if(!_0x45f3a4){_0x3dffac['sendStatus'](0x194);}return _0x45f3a4;};}function handleError(_0x263272,_0x382384){_0x382384=_0x382384||0x1f4;return function(_0x47f853){logger[_0x82fd('0x20')](_0x47f853['stack']);if(_0x47f853[_0x82fd('0x32')]){delete _0x47f853[_0x82fd('0x32')];}_0x263272[_0x82fd('0x26')](_0x382384)[_0x82fd('0x33')](_0x47f853);};}function createInteractionObject(_0x6c1172,_0x5de7dd,_0x27d798,_0x221e95){var _0x36f4af=require('user-agent-parser');var _0x46ec67=new _0x36f4af();var _0x2b563b=_0x46ec67[_0x82fd('0x34')](_0x27d798['user-agent'])['getResult']();var _0x1bde7c=_0x5de7dd[_0x82fd('0x35')];if(_0x27d798['cf-connecting-ip']){_0x1bde7c=_0x27d798['cf-connecting-ip'];}else if(_0x27d798['x-forwarded-for']){_0x1bde7c=_['first'](_0x27d798[_0x82fd('0x36')][_0x82fd('0x37')](','));}return{'ContactId':_0x221e95['id'],'ChatWebsiteId':_0x6c1172,'from':(_0x221e95['firstName']||'')+'\x20'+(_0x221e95[_0x82fd('0x38')]||''),'customerIp':_0x1bde7c,'customerPort':_0x27d798[_0x82fd('0x39')]?_0x27d798[_0x82fd('0x39')]:null,'referer':_0x5de7dd[_0x82fd('0x3a')],'browserName':_0x2b563b[_0x82fd('0x3b')][_0x82fd('0x32')]&&_0x2b563b['browser'][_0x82fd('0x3c')]?util[_0x82fd('0x3d')](_0x82fd('0x3e'),_0x2b563b[_0x82fd('0x3b')][_0x82fd('0x32')],_0x2b563b[_0x82fd('0x3b')][_0x82fd('0x3c')]):_0x82fd('0x3f'),'browserVersion':_0x2b563b['browser']['version']||'unknown','osName':util[_0x82fd('0x3d')]('%s\x20%s',_0x2b563b['os'][_0x82fd('0x32')],_0x2b563b['os']['version']),'osVersion':_0x2b563b['os'][_0x82fd('0x3c')],'deviceModel':_0x2b563b[_0x82fd('0x40')][_0x82fd('0x41')]&&_0x2b563b[_0x82fd('0x40')][_0x82fd('0x42')]?util['format'](_0x82fd('0x43'),_0x2b563b[_0x82fd('0x40')]['model'],_0x2b563b[_0x82fd('0x40')][_0x82fd('0x42')],_0x2b563b[_0x82fd('0x40')][_0x82fd('0x44')]):null,'deviceVendor':_0x2b563b[_0x82fd('0x40')][_0x82fd('0x42')],'deviceType':_0x2b563b[_0x82fd('0x40')]['type'],'formData':JSON[_0x82fd('0x45')](_0x5de7dd)};}exports[_0x82fd('0x46')]=function(_0x564fbd,_0x1dbb1c){var _0x40a9ea={'include':[{'model':db[_0x82fd('0x47')],'as':_0x82fd('0x48')}]},_0x51244f={},_0x524d68={'count':0x0,'rows':[]};var _0x25b7d1=_[_0x82fd('0x49')](db[_0x82fd('0x4a')]['rawAttributes'],function(_0x5bb8b0){return{'name':_0x5bb8b0[_0x82fd('0x4b')],'type':_0x5bb8b0[_0x82fd('0x44')]['key']};});_0x51244f[_0x82fd('0x41')]=_['map'](_0x25b7d1,_0x82fd('0x32'));_0x51244f['query']=_[_0x82fd('0x4c')](_0x564fbd[_0x82fd('0x4d')]);_0x51244f['filters']=_[_0x82fd('0x4e')](_0x51244f[_0x82fd('0x41')],_0x51244f[_0x82fd('0x4d')]);_0x40a9ea[_0x82fd('0x4f')]=_['intersection'](_0x51244f[_0x82fd('0x41')],qs[_0x82fd('0x50')](_0x564fbd['query'][_0x82fd('0x50')]));_0x40a9ea[_0x82fd('0x4f')]=_0x40a9ea[_0x82fd('0x4f')]['length']?_0x40a9ea[_0x82fd('0x4f')]:_0x51244f[_0x82fd('0x41')];if(!_0x564fbd['query'][_0x82fd('0x51')](_0x82fd('0x52'))){_0x40a9ea['limit']=qs[_0x82fd('0x2b')](_0x564fbd['query'][_0x82fd('0x2b')]);_0x40a9ea[_0x82fd('0x29')]=qs[_0x82fd('0x29')](_0x564fbd['query'][_0x82fd('0x29')]);}_0x40a9ea[_0x82fd('0x53')]=qs[_0x82fd('0x54')](_0x564fbd['query']['sort']);_0x40a9ea[_0x82fd('0x55')]=qs[_0x82fd('0x56')](_[_0x82fd('0x57')](_0x564fbd[_0x82fd('0x4d')],_0x51244f['filters']),_0x25b7d1);if(_0x564fbd[_0x82fd('0x4d')][_0x82fd('0x58')]){_0x40a9ea[_0x82fd('0x55')]=_['merge'](_0x40a9ea[_0x82fd('0x55')],{'$or':_['map'](_0x25b7d1,function(_0x131a14){if(_0x131a14['type']!==_0x82fd('0x59')){var _0x4be9d7={};_0x4be9d7[_0x131a14[_0x82fd('0x32')]]={'$like':'%'+_0x564fbd[_0x82fd('0x4d')]['filter']+'%'};return _0x4be9d7;}})});}_0x40a9ea=_['merge']({},_0x40a9ea,_0x564fbd['options']);var _0x41528c={'where':_0x40a9ea[_0x82fd('0x55')]};return db[_0x82fd('0x4a')][_0x82fd('0x2a')](_0x41528c)[_0x82fd('0x1b')](function(_0x4b3e41){_0x524d68[_0x82fd('0x2a')]=_0x4b3e41;if(_0x564fbd[_0x82fd('0x4d')]['includeAll']){_0x40a9ea[_0x82fd('0x5a')]=[{'all':!![]}];}return db['ChatWebsite'][_0x82fd('0x5b')](_0x40a9ea);})[_0x82fd('0x1b')](function(_0x450160){_0x524d68[_0x82fd('0x5c')]=_0x450160;return _0x524d68;})['then'](respondWithFilteredResult(_0x1dbb1c,_0x40a9ea))[_0x82fd('0x24')](handleError(_0x1dbb1c,null));};exports[_0x82fd('0x5d')]=function(_0x367458,_0x138f5b){var _0x4840b4={'raw':![],'where':{'id':_0x367458[_0x82fd('0x5e')]['id']},'include':[{'model':db[_0x82fd('0x47')],'as':_0x82fd('0x48')}]},_0x2a4afa={};_0x2a4afa[_0x82fd('0x41')]=_[_0x82fd('0x4c')](db[_0x82fd('0x4a')]['rawAttributes']);_0x2a4afa[_0x82fd('0x4d')]=_[_0x82fd('0x4c')](_0x367458[_0x82fd('0x4d')]);_0x2a4afa['filters']=_[_0x82fd('0x4e')](_0x2a4afa[_0x82fd('0x41')],_0x2a4afa[_0x82fd('0x4d')]);_0x4840b4[_0x82fd('0x4f')]=_[_0x82fd('0x4e')](_0x2a4afa[_0x82fd('0x41')],qs[_0x82fd('0x50')](_0x367458[_0x82fd('0x4d')][_0x82fd('0x50')]));_0x4840b4[_0x82fd('0x4f')]=_0x4840b4[_0x82fd('0x4f')][_0x82fd('0x5f')]?_0x4840b4['attributes']:_0x2a4afa[_0x82fd('0x41')];if(_0x367458['query']['includeAll']){_0x4840b4['include']=[{'all':!![]}];}_0x4840b4=_[_0x82fd('0x60')]({},_0x4840b4,_0x367458[_0x82fd('0x61')]);return db[_0x82fd('0x4a')][_0x82fd('0x62')](_0x4840b4)[_0x82fd('0x1b')](handleEntityNotFound(_0x138f5b,null))[_0x82fd('0x1b')](respondWithResult(_0x138f5b,null))[_0x82fd('0x24')](handleError(_0x138f5b,null));};exports['create']=function(_0x2f8d62,_0x4308){if(!wildcardUtils[_0x82fd('0x63')](_0x2f8d62[_0x82fd('0x64')]['address'])){return handleError(_0x4308,null)(new APIBadRequestError('\x22'+_0x2f8d62[_0x82fd('0x64')]['address']+_0x82fd('0x65')));}return db[_0x82fd('0x4a')]['create'](_0x2f8d62['body'],{})['then'](function(_0x5f4105){var _0x3c5af6=_0x2f8d62['user'][_0x82fd('0x30')]({'plain':!![]});if(!_0x3c5af6)throw new Error(_0x82fd('0x66'));if(_0x3c5af6['role']==='user'){var _0x307622=_0x5f4105[_0x82fd('0x30')]({'plain':!![]});var _0x7ae699=_0x82fd('0x67');return db['UserProfileSection'][_0x82fd('0x62')]({'where':{'name':_0x7ae699,'userProfileId':_0x3c5af6[_0x82fd('0x68')]},'raw':!![]})['then'](function(_0x51d698){if(_0x51d698&&_0x51d698[_0x82fd('0x69')]===0x0){return db['UserProfileResource']['create']({'name':_0x307622[_0x82fd('0x32')],'resourceId':_0x307622['id'],'type':_0x51d698[_0x82fd('0x32')],'sectionId':_0x51d698['id']},{})[_0x82fd('0x1b')](function(){return _0x5f4105;});}else{return _0x5f4105;}})[_0x82fd('0x24')](function(_0x983889){logger['error'](_0x82fd('0x6a'),_0x983889);throw _0x983889;});}return _0x5f4105;})[_0x82fd('0x1b')](respondWithResult(_0x4308,0xc9))[_0x82fd('0x24')](handleError(_0x4308,null));};exports[_0x82fd('0x2e')]=function(_0x50271e,_0x29ff25){if(!wildcardUtils[_0x82fd('0x63')](_0x50271e[_0x82fd('0x64')][_0x82fd('0x6b')])){return handleError(_0x29ff25,null)(new APIBadRequestError('\x22'+_0x50271e['body'][_0x82fd('0x6b')]+'\x22\x20is\x20not\x20a\x20valid\x20website\x20domain'));}if(_0x50271e[_0x82fd('0x64')]['id']){delete _0x50271e[_0x82fd('0x64')]['id'];}return db[_0x82fd('0x4a')][_0x82fd('0x62')]({'where':{'id':_0x50271e[_0x82fd('0x5e')]['id']},'include':[{'model':db[_0x82fd('0x47')],'as':_0x82fd('0x48')}]})[_0x82fd('0x1b')](handleEntityNotFound(_0x29ff25,null))[_0x82fd('0x1b')](saveUpdates(_0x50271e['body'],null))[_0x82fd('0x1b')](respondWithResult(_0x29ff25,null))[_0x82fd('0x24')](handleError(_0x29ff25,null));};exports[_0x82fd('0x2f')]=function(_0x4ffb2c,_0x5497ee){return db[_0x82fd('0x4a')][_0x82fd('0x62')]({'where':{'id':_0x4ffb2c[_0x82fd('0x5e')]['id']}})[_0x82fd('0x1b')](handleEntityNotFound(_0x5497ee,null))[_0x82fd('0x1b')](removeEntity(_0x5497ee,null))[_0x82fd('0x24')](handleError(_0x5497ee,null));};exports[_0x82fd('0x6c')]=function(_0x3b0ddf,_0xc52771){return db[_0x82fd('0x4a')][_0x82fd('0x6c')]()[_0x82fd('0x1b')](respondWithResult(_0xc52771,null))[_0x82fd('0x24')](handleError(_0xc52771,null));};exports['addDisposition']=function(_0x16c62c,_0x102538){if(_0x16c62c[_0x82fd('0x64')]['id']){delete _0x16c62c[_0x82fd('0x64')]['id'];}return db['ChatWebsite'][_0x82fd('0x62')]({'where':{'id':_0x16c62c[_0x82fd('0x5e')]['id']}})[_0x82fd('0x1b')](handleEntityNotFound(_0x102538,null))['then'](function(_0x307437){if(_0x307437){_0x16c62c[_0x82fd('0x64')][_0x82fd('0x6d')]=_0x307437['id'];return db[_0x82fd('0x6e')][_0x82fd('0x6f')](_0x16c62c[_0x82fd('0x64')]);}})['then'](respondWithResult(_0x102538,null))['catch'](handleError(_0x102538,null));};exports[_0x82fd('0x70')]=function(_0x271f3f,_0x5809fb){var _0x513b79={'raw':![],'where':{}};var _0x1753f5={};var _0x544894={'count':0x0,'rows':[]};return db['ChatWebsite'][_0x82fd('0x71')]({'where':{'id':_0x271f3f['params']['id']}})['then'](handleEntityNotFound(_0x5809fb,null))[_0x82fd('0x1b')](function(_0xd1dcc2){if(_0xd1dcc2){_0x1753f5[_0x82fd('0x41')]=_['keys'](db[_0x82fd('0x6e')][_0x82fd('0x72')]);_0x1753f5['query']=_[_0x82fd('0x4c')](_0x271f3f['query']);_0x1753f5['filters']=_[_0x82fd('0x4e')](_0x1753f5[_0x82fd('0x41')],_0x1753f5['query']);_0x513b79['attributes']=_['intersection'](_0x1753f5[_0x82fd('0x41')],qs[_0x82fd('0x50')](_0x271f3f[_0x82fd('0x4d')][_0x82fd('0x50')]));_0x513b79[_0x82fd('0x4f')]=_0x513b79['attributes'][_0x82fd('0x5f')]?_0x513b79[_0x82fd('0x4f')]:_0x1753f5['model'];if(!_0x271f3f[_0x82fd('0x4d')][_0x82fd('0x51')](_0x82fd('0x52'))){_0x513b79['limit']=qs['limit'](_0x271f3f['query']['limit']);_0x513b79[_0x82fd('0x29')]=qs['offset'](_0x271f3f[_0x82fd('0x4d')][_0x82fd('0x29')]);}_0x513b79[_0x82fd('0x53')]=qs[_0x82fd('0x54')](_0x271f3f[_0x82fd('0x4d')][_0x82fd('0x54')]);_0x513b79[_0x82fd('0x55')]=qs[_0x82fd('0x56')](_['pick'](_0x271f3f[_0x82fd('0x4d')],_0x1753f5[_0x82fd('0x56')]));_0x513b79['where'][_0x82fd('0x6d')]=_0xd1dcc2['id'];if(_0x271f3f[_0x82fd('0x4d')][_0x82fd('0x58')]){_0x513b79[_0x82fd('0x55')]=_['merge'](_0x513b79[_0x82fd('0x55')],{'$or':_['map'](_0x513b79[_0x82fd('0x4f')],function(_0xebfc77){var _0x33b58d={};_0x33b58d[_0xebfc77]={'$like':'%'+_0x271f3f['query'][_0x82fd('0x58')]+'%'};return _0x33b58d;})});}_0x513b79=_['merge']({},_0x513b79,_0x271f3f[_0x82fd('0x61')]);return db['Disposition'][_0x82fd('0x2a')]({'where':_0x513b79['where']})[_0x82fd('0x1b')](function(_0xf508a4){_0x544894[_0x82fd('0x2a')]=_0xf508a4;if(_0x271f3f[_0x82fd('0x4d')][_0x82fd('0x73')]){_0x513b79[_0x82fd('0x5a')]=[{'all':!![]}];}return db[_0x82fd('0x6e')]['findAll'](_0x513b79);})[_0x82fd('0x1b')](function(_0x2c6a6f){_0x544894['rows']=_0x2c6a6f;return _0x544894;});}})['then'](respondWithFilteredResult(_0x5809fb,_0x513b79))[_0x82fd('0x24')](handleError(_0x5809fb,null));};exports['removeDispositions']=function(_0x36028e,_0xe8dd9e){return db['ChatWebsite'][_0x82fd('0x62')]({'where':{'id':_0x36028e[_0x82fd('0x5e')]['id']}})[_0x82fd('0x1b')](handleEntityNotFound(_0xe8dd9e,null))['then'](function(_0x26896b){if(_0x26896b){return _0x26896b[_0x82fd('0x74')](_0x36028e['query']['ids']);}})[_0x82fd('0x1b')](respondWithStatusCode(_0xe8dd9e,null))[_0x82fd('0x24')](handleError(_0xe8dd9e,null));};exports['addAnswer']=function(_0x3fa3f7,_0x33f27f){if(_0x3fa3f7[_0x82fd('0x64')]['id']){delete _0x3fa3f7['body']['id'];}return db[_0x82fd('0x4a')]['find']({'where':{'id':_0x3fa3f7[_0x82fd('0x5e')]['id']}})[_0x82fd('0x1b')](handleEntityNotFound(_0x33f27f,null))[_0x82fd('0x1b')](function(_0x36dc1e){if(_0x36dc1e){_0x3fa3f7[_0x82fd('0x64')][_0x82fd('0x6d')]=_0x36dc1e['id'];return db[_0x82fd('0x75')][_0x82fd('0x6f')](_0x3fa3f7[_0x82fd('0x64')]);}})[_0x82fd('0x1b')](respondWithResult(_0x33f27f,null))[_0x82fd('0x24')](handleError(_0x33f27f,null));};exports[_0x82fd('0x76')]=function(_0x39c777,_0x2b9f6f){var _0x3989fa={'raw':![],'where':{}};var _0x51a87f={};var _0x2eb407={'count':0x0,'rows':[]};return db[_0x82fd('0x4a')][_0x82fd('0x71')]({'where':{'id':_0x39c777[_0x82fd('0x5e')]['id']}})['then'](handleEntityNotFound(_0x2b9f6f,null))[_0x82fd('0x1b')](function(_0x23ac9d){if(_0x23ac9d){_0x51a87f[_0x82fd('0x41')]=_['keys'](db['CannedAnswer'][_0x82fd('0x72')]);_0x51a87f[_0x82fd('0x4d')]=_[_0x82fd('0x4c')](_0x39c777['query']);_0x51a87f[_0x82fd('0x56')]=_[_0x82fd('0x4e')](_0x51a87f[_0x82fd('0x41')],_0x51a87f[_0x82fd('0x4d')]);_0x3989fa['attributes']=_[_0x82fd('0x4e')](_0x51a87f[_0x82fd('0x41')],qs['fields'](_0x39c777[_0x82fd('0x4d')][_0x82fd('0x50')]));_0x3989fa[_0x82fd('0x4f')]=_0x3989fa[_0x82fd('0x4f')][_0x82fd('0x5f')]?_0x3989fa[_0x82fd('0x4f')]:_0x51a87f[_0x82fd('0x41')];if(!_0x39c777[_0x82fd('0x4d')][_0x82fd('0x51')](_0x82fd('0x52'))){_0x3989fa['limit']=qs['limit'](_0x39c777[_0x82fd('0x4d')]['limit']);_0x3989fa[_0x82fd('0x29')]=qs['offset'](_0x39c777[_0x82fd('0x4d')][_0x82fd('0x29')]);}_0x3989fa['order']=qs[_0x82fd('0x54')](_0x39c777['query'][_0x82fd('0x54')]);_0x3989fa[_0x82fd('0x55')]=qs[_0x82fd('0x56')](_[_0x82fd('0x57')](_0x39c777[_0x82fd('0x4d')],_0x51a87f[_0x82fd('0x56')]));_0x3989fa[_0x82fd('0x55')][_0x82fd('0x6d')]=_0x23ac9d['id'];if(_0x39c777[_0x82fd('0x4d')][_0x82fd('0x58')]){_0x3989fa[_0x82fd('0x55')]=_['merge'](_0x3989fa[_0x82fd('0x55')],{'$or':_['map'](_0x3989fa[_0x82fd('0x4f')],function(_0x3df4dd){var _0x4f041c={};_0x4f041c[_0x3df4dd]={'$like':'%'+_0x39c777[_0x82fd('0x4d')]['filter']+'%'};return _0x4f041c;})});}_0x3989fa=_[_0x82fd('0x60')]({},_0x3989fa,_0x39c777[_0x82fd('0x61')]);return db['CannedAnswer'][_0x82fd('0x2a')]({'where':_0x3989fa[_0x82fd('0x55')]})[_0x82fd('0x1b')](function(_0x106c70){_0x2eb407[_0x82fd('0x2a')]=_0x106c70;if(_0x39c777['query'][_0x82fd('0x73')]){_0x3989fa[_0x82fd('0x5a')]=[{'all':!![]}];}return db[_0x82fd('0x75')][_0x82fd('0x5b')](_0x3989fa);})[_0x82fd('0x1b')](function(_0x4dfe1c){_0x2eb407[_0x82fd('0x5c')]=_0x4dfe1c;return _0x2eb407;});}})[_0x82fd('0x1b')](respondWithFilteredResult(_0x2b9f6f,_0x3989fa))[_0x82fd('0x24')](handleError(_0x2b9f6f,null));};exports[_0x82fd('0x77')]=function(_0x57ae7e,_0x4c6cff){return db[_0x82fd('0x4a')][_0x82fd('0x62')]({'where':{'id':_0x57ae7e[_0x82fd('0x5e')]['id']}})[_0x82fd('0x1b')](handleEntityNotFound(_0x4c6cff,null))[_0x82fd('0x1b')](function(_0x297c5c){if(_0x297c5c){return _0x297c5c[_0x82fd('0x77')](_0x57ae7e[_0x82fd('0x4d')][_0x82fd('0x78')]);}})[_0x82fd('0x1b')](respondWithStatusCode(_0x4c6cff,null))[_0x82fd('0x24')](handleError(_0x4c6cff,null));};exports[_0x82fd('0x79')]=function(_0x2b4f8f,_0x564b1d){_0x2b4f8f[_0x82fd('0x64')][_0x82fd('0x7a')]=_0x2b4f8f['file'][_0x82fd('0x7b')];return db[_0x82fd('0x4a')][_0x82fd('0x62')]({'where':{'id':_0x2b4f8f[_0x82fd('0x5e')]['id']}})[_0x82fd('0x1b')](handleEntityNotFound(_0x564b1d,null))['then'](saveUpdates(_0x2b4f8f['body'],null))[_0x82fd('0x1b')](respondWithResult(_0x564b1d,null))[_0x82fd('0x24')](handleError(_0x564b1d,null));};exports[_0x82fd('0x7c')]=function(_0x7b653d,_0xe77b41){_0x7b653d['body'][_0x82fd('0x7d')]=_0x7b653d['file'][_0x82fd('0x7b')];return db['ChatWebsite'][_0x82fd('0x62')]({'where':{'id':_0x7b653d['params']['id']}})[_0x82fd('0x1b')](handleEntityNotFound(_0xe77b41,null))[_0x82fd('0x1b')](saveUpdates(_0x7b653d[_0x82fd('0x64')],null))[_0x82fd('0x1b')](respondWithResult(_0xe77b41,null))[_0x82fd('0x24')](handleError(_0xe77b41,null));};exports[_0x82fd('0x7e')]=function(_0x4e9419,_0x1005e1){_0x4e9419[_0x82fd('0x64')][_0x82fd('0x7f')]=_0x4e9419['file'][_0x82fd('0x7b')];return db[_0x82fd('0x4a')][_0x82fd('0x62')]({'where':{'id':_0x4e9419[_0x82fd('0x5e')]['id']}})[_0x82fd('0x1b')](handleEntityNotFound(_0x1005e1,null))[_0x82fd('0x1b')](saveUpdates(_0x4e9419['body'],null))['then'](respondWithResult(_0x1005e1,null))['catch'](handleError(_0x1005e1,null));};exports['addSystemAvatar']=function(_0x1d0ef8,_0x1afa11){_0x1d0ef8[_0x82fd('0x64')][_0x82fd('0x80')]=_0x1d0ef8['file'][_0x82fd('0x7b')];return db[_0x82fd('0x4a')][_0x82fd('0x62')]({'where':{'id':_0x1d0ef8[_0x82fd('0x5e')]['id']}})[_0x82fd('0x1b')](handleEntityNotFound(_0x1afa11,null))[_0x82fd('0x1b')](saveUpdates(_0x1d0ef8[_0x82fd('0x64')],null))[_0x82fd('0x1b')](respondWithResult(_0x1afa11,null))['catch'](handleError(_0x1afa11,null));};exports[_0x82fd('0x81')]=function(_0x5049a6,_0x39b24f){var _0x341875=path[_0x82fd('0x82')](config['root'],_0x82fd('0x83'));var _0x197ab3={'where':{'id':_0x5049a6[_0x82fd('0x5e')]['id']},'attributes':['id',_0x82fd('0x7a')],'raw':!![]};var _0x5e1297=![];return require(_0x82fd('0x84'))[_0x82fd('0x85')]()[_0x82fd('0x1b')](function(_0x4dd6e9){if(_0x4dd6e9){_0x5e1297=_0x4dd6e9[_0x82fd('0x86')];}})['then'](function(){return db[_0x82fd('0x4a')][_0x82fd('0x62')](_0x197ab3);})[_0x82fd('0x1b')](handleEntityNotFound(_0x39b24f,null))[_0x82fd('0x1b')](function(_0x247e90){if(_0x247e90){if(!_[_0x82fd('0x87')](_0x247e90[_0x82fd('0x7a')])){if(fs[_0x82fd('0x88')](path[_0x82fd('0x82')](config[_0x82fd('0x89')],_0x82fd('0x8a'),_0x247e90[_0x82fd('0x7a')]))&&_0x5e1297){_0x341875=path[_0x82fd('0x82')](config[_0x82fd('0x89')],_0x82fd('0x8a'),_0x247e90[_0x82fd('0x7a')]);}}return _0x39b24f['download'](_0x341875);}})[_0x82fd('0x24')](handleError(_0x39b24f,null));};exports[_0x82fd('0x8b')]=function(_0x1a8242,_0x5846be){var _0x2ef6e9=path[_0x82fd('0x82')](config[_0x82fd('0x89')],'server/files/images/avatars/default_avatar.png');var _0x4ff401={'where':{'id':_0x1a8242['params']['id']},'attributes':['id',_0x82fd('0x7d')],'raw':!![]};return db[_0x82fd('0x4a')][_0x82fd('0x62')](_0x4ff401)['then'](handleEntityNotFound(_0x5846be,null))['then'](function(_0x47000a){if(_0x47000a){if(!_[_0x82fd('0x87')](_0x47000a[_0x82fd('0x7d')])){if(fs['existsSync'](path[_0x82fd('0x82')](config[_0x82fd('0x89')],_0x82fd('0x8c'),_0x47000a['agentAvatar']))){_0x2ef6e9=path[_0x82fd('0x82')](config[_0x82fd('0x89')],_0x82fd('0x8c'),_0x47000a[_0x82fd('0x7d')]);}}return _0x5846be['download'](_0x2ef6e9);}})['catch'](handleError(_0x5846be,null));};exports[_0x82fd('0x8d')]=function(_0x3ef1b4,_0x2870cb){var _0x145df7=path[_0x82fd('0x82')](config[_0x82fd('0x89')],_0x82fd('0x8e'));var _0x118b0f={'where':{'id':_0x3ef1b4['params']['id']},'attributes':['id','customerAvatar',_0x82fd('0x8f')],'raw':!![]};return db[_0x82fd('0x4a')][_0x82fd('0x62')](_0x118b0f)[_0x82fd('0x1b')](handleEntityNotFound(_0x2870cb,null))['then'](function(_0x529c26){if(_0x529c26){if(!_['isNil'](_0x529c26[_0x82fd('0x7f')])){if(fs[_0x82fd('0x88')](path[_0x82fd('0x82')](config['root'],_0x82fd('0x8c'),_0x529c26['customerAvatar']))&&_0x529c26[_0x82fd('0x8f')]){_0x145df7=path['join'](config['root'],_0x82fd('0x8c'),_0x529c26[_0x82fd('0x7f')]);}}return _0x2870cb[_0x82fd('0x90')](_0x145df7);}})[_0x82fd('0x24')](handleError(_0x2870cb,null));};exports['getSystemAvatar']=function(_0x57a2a0,_0x5dde69){var _0x17013c=path[_0x82fd('0x82')](config[_0x82fd('0x89')],_0x82fd('0x91'));var _0x3db05a={'where':{'id':_0x57a2a0[_0x82fd('0x5e')]['id']},'attributes':['id',_0x82fd('0x80')],'raw':!![]};return db['ChatWebsite'][_0x82fd('0x62')](_0x3db05a)[_0x82fd('0x1b')](handleEntityNotFound(_0x5dde69,null))[_0x82fd('0x1b')](function(_0x34a776){if(_0x34a776){if(!_[_0x82fd('0x87')](_0x34a776[_0x82fd('0x80')])){if(fs[_0x82fd('0x88')](path[_0x82fd('0x82')](config[_0x82fd('0x89')],_0x82fd('0x8c'),_0x34a776[_0x82fd('0x80')]))){_0x17013c=path['join'](config['root'],_0x82fd('0x8c'),_0x34a776['systemAvatar']);}}return _0x5dde69[_0x82fd('0x90')](_0x17013c);}})[_0x82fd('0x24')](handleError(_0x5dde69,null));};function checkWebsiteInterval(_0x2db774){var _0x1d07bc=_0x2db774[_0x82fd('0x92')];if(!_0x1d07bc){return Promise[_0x82fd('0x93')](_0x2db774);}var _0x21b3bb=_0x2db774[_0x82fd('0x94')]||undefined;return _0x1d07bc[_0x82fd('0x95')](_0x21b3bb)[_0x82fd('0x1b')](function(_0x4806a9){if(!_0x4806a9){throw new APIOutOfIntervalError();}return _0x2db774;});}exports['notify']=function(_0x2dda58,_0x9d8bf5){var _0x38f327={'body':_0x2dda58[_0x82fd('0x64')],'channel':'chat'};var _0x2e1a66=[];var _0xbf89f2=[];var _0x4a8e86={};var _0x5d24f2=![];if(_0x2dda58['body']['id']){delete _0x2dda58[_0x82fd('0x64')]['id'];}if(_[_0x82fd('0x87')](_0x2dda58[_0x82fd('0x64')][_0x82fd('0x96')])){throw new APIBadRequestError(_0x82fd('0x97'));}if(_[_0x82fd('0x87')](_0x2dda58['body'][_0x82fd('0x98')])){throw new APIBadRequestError('MapKey\x20is\x20mandatory');}if(_['isEmpty'](_0x2dda58['body'][_0x82fd('0x64')])){throw new APIBadRequestError(_0x82fd('0x99'));}var _0x2eccd7=_0x2dda58['body'][_0x82fd('0x35')]&&_0x2dda58[_0x82fd('0x64')][_0x82fd('0x3a')];return db[_0x82fd('0x9a')][_0x82fd('0x6c')]()['then'](function(_0x30c104){if(!_0x30c104){throw new Error(_0x82fd('0x9b'));}_0x2e1a66=Object['keys'](_0x30c104)[_0x82fd('0x58')](function(_0x170e39){return!['createdAt',_0x82fd('0x9c')][_0x82fd('0x9d')](_0x170e39);});_0xbf89f2=Object[_0x82fd('0x4c')](_0x30c104)[_0x82fd('0x58')](function(_0x27b2c0){return![_0x82fd('0x9e'),_0x82fd('0x9c'),'CompanyId',_0x82fd('0x9f')][_0x82fd('0x9d')](_0x27b2c0);});if(!_[_0x82fd('0x9d')](_0xbf89f2,_0x2dda58[_0x82fd('0x64')][_0x82fd('0x98')])){throw new APIBadRequestError(_0x82fd('0xa0')+_0xbf89f2[_0x82fd('0x82')](',\x20'));}_0x4a8e86[_0x2dda58[_0x82fd('0x64')][_0x82fd('0x98')]]=_0x2dda58[_0x82fd('0x64')][_0x82fd('0x96')];})[_0x82fd('0x1b')](function(){return db[_0x82fd('0x4a')]['find']({'where':{'id':_0x2dda58['params']['id']},'include':[{'model':db['CmList'],'as':_0x82fd('0xa1'),'include':[{'model':db[_0x82fd('0x9a')],'as':_0x82fd('0xa2'),'where':_0x4a8e86,'limit':0x1,'order':[[_0x82fd('0x9c'),_0x82fd('0xa3')]]}]},{'model':db[_0x82fd('0xa4')],'as':_0x82fd('0xa5')},{'model':db[_0x82fd('0x92')],'as':_0x82fd('0x92'),'include':[{'model':db['Interval'],'as':_0x82fd('0xa6'),'attributes':['id','interval'],'raw':!![]}]}]});})['then'](function(_0x34bc6e){if(!_0x34bc6e){throw new APINotFoundError(util[_0x82fd('0x3d')](_0x82fd('0xa7'),_0x2dda58[_0x82fd('0x5e')]['id']));}if(_0x2eccd7){return checkWebsiteInterval(_0x34bc6e);}return _0x34bc6e;})[_0x82fd('0x1b')](function(_0x5e6720){_0x38f327[_0x82fd('0xa8')]=_0x5e6720;_0x38f327['applications']=_[_0x82fd('0xa9')](_0x5e6720[_0x82fd('0xa5')],[_0x82fd('0xaa')],['asc']);if(_0x38f327[_0x82fd('0xa8')][_0x82fd('0xa5')]){delete _0x38f327[_0x82fd('0xa8')]['Applications'];}_0x38f327[_0x82fd('0xab')]=_0x5e6720['List']||{'id':_0x5e6720[_0x82fd('0x9f')]};if(_0x38f327[_0x82fd('0xab')]&&_0x38f327[_0x82fd('0xab')]['Contacts'][_0x82fd('0x5f')]){return _0x38f327[_0x82fd('0xab')][_0x82fd('0xa2')][0x0];}var _0x1ed583=_[_0x82fd('0x14')](_0x2dda58[_0x82fd('0x64')],{'firstName':_0x2dda58[_0x82fd('0x64')][_0x82fd('0x96')],'ListId':_0x5e6720[_0x82fd('0x9f')]});_0x1ed583[_0x2dda58[_0x82fd('0x64')][_0x82fd('0x98')]]=_0x2dda58[_0x82fd('0x64')][_0x82fd('0x96')];return db[_0x82fd('0x9a')]['create'](_0x1ed583,{'fields':_0x2e1a66,'raw':!![]});})[_0x82fd('0x1b')](function(_0x3afda8){_0x38f327[_0x82fd('0xac')]=_0x3afda8;var _0x20dbe3=createInteractionObject(_0x2dda58[_0x82fd('0x5e')]['id'],_0x2dda58[_0x82fd('0x64')],_0x2dda58[_0x82fd('0xad')],_0x3afda8);var _0x231714={'ChatWebsiteId':_0x2dda58[_0x82fd('0x5e')]['id']};if(_0x2dda58[_0x82fd('0x64')][_0x82fd('0xae')]){_0x231714[_0x82fd('0xae')]=_0x2dda58[_0x82fd('0x64')]['threadId'];_0x231714[_0x82fd('0xaf')]=![];return db['ChatInteraction'][_0x82fd('0x62')]({'where':_0x231714})[_0x82fd('0x1b')](function(_0x10c9ac){var _0x34d15d=_0x2dda58[_0x82fd('0x64')][_0x82fd('0x35')]&&_0x2dda58[_0x82fd('0x64')]['referer'];if(_0x10c9ac){_0x5d24f2=!![];return _0x10c9ac;}else if(!_0x34d15d&&_0x10c9ac&&_0x10c9ac[_0x82fd('0xaf')]){throw new APIConflictError('Writing\x20on\x20closed\x20interaction');}_0x20dbe3[_0x82fd('0xae')]=_0x2dda58[_0x82fd('0x64')][_0x82fd('0xae')];_0x20dbe3[_0x82fd('0xb0')]=_0x2dda58[_0x82fd('0x64')][_0x82fd('0xb0')];return db['ChatInteraction'][_0x82fd('0x6f')](_0x20dbe3);});}_0x231714[_0x82fd('0xb1')]=_0x3afda8['id'];if(_0x2dda58[_0x82fd('0x64')][_0x82fd('0xb2')]&&_0x2dda58['body']['interaction']['id']){_0x231714['id']=_0x2dda58[_0x82fd('0x64')]['interaction']['id'];return db[_0x82fd('0xb3')][_0x82fd('0x62')]({'where':_0x231714})[_0x82fd('0x1b')](function(_0x262602){var _0x3c1e38=_0x2dda58[_0x82fd('0x64')][_0x82fd('0x35')]&&_0x2dda58[_0x82fd('0x64')][_0x82fd('0x3a')];if(!_0x3c1e38&&_0x262602&&_0x262602['closed']){throw new APIConflictError('Writing\x20on\x20closed\x20interaction');}else if(_0x262602){_0x5d24f2=!![];return _0x262602;}else{return db[_0x82fd('0xb3')]['create'](_0x20dbe3);}});}return db[_0x82fd('0xb3')][_0x82fd('0x6f')](_0x20dbe3);})['then'](function(_0x4f6b9d){if(!_0x5d24f2){return _0x4f6b9d;}var _0x1e5271={'from':(_0x38f327[_0x82fd('0xac')]['firstName']||'')+'\x20'+(_0x38f327[_0x82fd('0xac')]['lastName']||'')};if(_0x2dda58['body'][_0x82fd('0xae')]&&_0x2dda58[_0x82fd('0x64')][_0x82fd('0xb4')]&&_0x2dda58['body'][_0x82fd('0xae')]!=_0x2dda58[_0x82fd('0x64')][_0x82fd('0xb4')]){_0x1e5271[_0x82fd('0xae')]=_0x2dda58[_0x82fd('0x64')][_0x82fd('0xb4')];}return _0x4f6b9d[_0x82fd('0x2e')](_0x1e5271);})[_0x82fd('0x1b')](function(_0x229ce5){_0x38f327[_0x82fd('0xb2')]=_0x229ce5['get']({'plain':!![]});_0x38f327[_0x82fd('0xb2')][_0x82fd('0xb5')]=!_0x5d24f2;if(_0x38f327[_0x82fd('0xb2')][_0x82fd('0xb5')]){if(_0x38f327['account']['autoclose']){_0x38f327['applications'][_0x82fd('0xb6')]({'id':0x0,'priority':_0x38f327['applications'][_0x82fd('0x5f')]+0x1,'app':_0x82fd('0xb7'),'appdata':_0x82fd('0xb8'),'interval':_0x82fd('0xb9')});}}return db[_0x82fd('0xba')][_0x82fd('0x6f')]({'body':_0x2dda58[_0x82fd('0x64')][_0x82fd('0x64')],'ChatWebsiteId':_0x2dda58[_0x82fd('0x5e')]['id'],'ChatInteractionId':_0x229ce5['id'],'direction':'in','ContactId':_0x38f327[_0x82fd('0xac')]['id'],'AttachmentId':_0x2dda58[_0x82fd('0x64')][_0x82fd('0xbb')]});})[_0x82fd('0x1b')](function(_0x4a4374){_0x38f327['message']=_0x4a4374;if(!_0x38f327['interaction'][_0x82fd('0xbc')]){return;}return db['User'][_0x82fd('0x62')]({'attributes':['id',_0x82fd('0x32')],'where':{'id':_0x38f327[_0x82fd('0xb2')][_0x82fd('0xbc')]}});})[_0x82fd('0x1b')](function(_0x46b2a3){if(_0x46b2a3){_0x38f327[_0x82fd('0xbd')][_0x82fd('0xbe')]({'id':0x0,'priority':0x0,'app':_0x82fd('0xbf'),'appdata':_0x46b2a3['name']+','+(_0x38f327['account'][_0x82fd('0xc0')]||0xa),'interval':'*,*,*,*'});_0x38f327[_0x82fd('0xc1')]=!![];}if(!_0x38f327['interaction']['queueId']){return;}return db['ChatQueue'][_0x82fd('0x62')]({'attributes':['id','name'],'where':{'id':_0x38f327['interaction']['queueId']}});})[_0x82fd('0x1b')](function(_0x3958b7){if(_0x3958b7){_0x38f327[_0x82fd('0xbd')]['unshift']({'id':0x0,'priority':0x1,'app':_0x82fd('0xc2'),'appdata':_0x3958b7['name']+','+(_0x38f327[_0x82fd('0xa8')][_0x82fd('0xc3')]||0x12c),'interval':'*,*,*,*'});}return respondWithRpcPromise(_0x82fd('0xc4'),_0x82fd('0xc5'),_0x38f327);})[_0x82fd('0x1b')](function(_0x5ead03){respondWithRpcPromise('EventManager','EventManager',{'event':'notify','message':_0x5ead03},client9002);return _0x5ead03;})[_0x82fd('0x1b')](respondWithResult(_0x9d8bf5,null))[_0x82fd('0x24')](APIHandleError(_0x9d8bf5));};exports[_0x82fd('0xc6')]=function(_0x427170,_0x43a62d){var _0x9e0c50,_0x49722d,_0x3e5548;var _0x375ae1=[];var _0x54620b={};var _0x59d927=_0x427170['files']||[];var _0xaa2272=[];var _0x450fdb;return db['CmContact']['describe']()[_0x82fd('0x1b')](function(_0x2887f0){if(!_0x2887f0){throw new db[(_0x82fd('0xc7'))][(_0x82fd('0xc8'))](_0x82fd('0xc9'));}_0x375ae1=_[_0x82fd('0xca')](_[_0x82fd('0x4c')](_0x2887f0),[_0x82fd('0x9e'),'updatedAt',_0x82fd('0xcb'),_0x82fd('0x9f')]);if(_0x427170[_0x82fd('0x64')]['id']){delete _0x427170['body']['id'];}if(_[_0x82fd('0x87')](_0x427170[_0x82fd('0x64')][_0x82fd('0x96')])){throw _0x43a62d[_0x82fd('0x26')](0x1f4)[_0x82fd('0x33')](new db['Sequelize'][(_0x82fd('0xc8'))]('from\x20is\x20mandatory'));}if(_[_0x82fd('0x87')](_0x427170[_0x82fd('0x64')][_0x82fd('0x64')])||_0x427170[_0x82fd('0x64')][_0x82fd('0x64')]===''){throw _0x43a62d[_0x82fd('0x26')](0x1f4)[_0x82fd('0x33')](new db[(_0x82fd('0xc7'))][(_0x82fd('0xc8'))](_0x82fd('0xcc')));}if(_[_0x82fd('0x87')](_0x427170['body'][_0x82fd('0xcd')])){throw _0x43a62d[_0x82fd('0x26')](0x1f4)[_0x82fd('0x33')](new db[(_0x82fd('0xc7'))][(_0x82fd('0xc8'))](_0x82fd('0xce')+_0x375ae1));}if(!_['includes'](_0x375ae1,_0x427170['body'][_0x82fd('0xcd')])){throw _0x43a62d[_0x82fd('0x26')](0x1f4)[_0x82fd('0x33')](new db[(_0x82fd('0xc7'))][(_0x82fd('0xc8'))](_0x82fd('0xcf')+_0x375ae1));}_0x54620b[_0x427170[_0x82fd('0x64')][_0x82fd('0xcd')]]=_0x427170[_0x82fd('0x64')][_0x82fd('0x96')];})[_0x82fd('0x1b')](function(){return db[_0x82fd('0x4a')][_0x82fd('0x62')]({'where':{'id':_0x427170['params']['id']},'include':[{'model':db[_0x82fd('0xd0')],'as':_0x82fd('0xa1')},{'model':db[_0x82fd('0xd1')],'as':_0x82fd('0xd1')}]});})[_0x82fd('0x1b')](handleEntityNotFound(_0x43a62d,null))[_0x82fd('0x1b')](function(_0x346fb0){if(_0x346fb0&&_0x346fb0[_0x82fd('0xa1')]){_0x49722d=_0x346fb0;var _0x14d680=_['defaults'](_0x427170[_0x82fd('0x64')],{'firstName':_0x427170[_0x82fd('0x64')][_0x82fd('0x96')],'phone':_0x427170['body'][_0x82fd('0x96')],'ListId':_0x346fb0[_0x82fd('0x9f')]});_0x14d680[_0x427170[_0x82fd('0x64')][_0x82fd('0xcd')]]=_0x427170[_0x82fd('0x64')][_0x82fd('0x96')];return db[_0x82fd('0x9a')]['findOrCreate']({'where':_0x54620b,'defaults':_0x14d680});}})[_0x82fd('0xd2')](function(_0x4bbb4c){if(_0x4bbb4c){_0x3e5548=_0x4bbb4c;var _0x1f6e5c=fs[_0x82fd('0xd3')](path[_0x82fd('0x82')](config['root'],_0x82fd('0xd4')),_0x82fd('0xd5'));var _0x1108ab=ejs[_0x82fd('0xd6')](_0x1f6e5c,{'body':_[_0x82fd('0xd7')](_0x427170[_0x82fd('0x64')][_0x82fd('0x64')]),'bodyTitle':_0x49722d[_0x82fd('0xd8')]});return db['ChatOfflineMessage'][_0x82fd('0x6f')]({'body':_0x1108ab,'plainBody':htmlToText[_0x82fd('0xd9')](_0x1108ab),'ContactId':_0x4bbb4c['id'],'ChatWebsiteId':_0x49722d['id']});}})['then'](function(_0x269995){_0x450fdb=_0x269995;if(_0x59d927[_0x82fd('0x5f')]){var _0xa5bcb0=_0x59d927[_0x82fd('0x49')](function(_0x310a7b){return{'name':_0x310a7b[_0x82fd('0xda')],'basename':_0x310a7b[_0x82fd('0x7b')],'type':_0x310a7b[_0x82fd('0xdb')],'ChatOfflineMessageId':_0x269995['id']};});_0xaa2272=_0xa5bcb0[_0x82fd('0x49')](_0x5ab904=>{var _0xc0aba6={'filename':_0x5ab904[_0x82fd('0x32')],'path':path[_0x82fd('0x82')](config['root'],_0x82fd('0xdc'),_0x82fd('0xdd'),_0x82fd('0xde'),_0x82fd('0xdf'),_0x5ab904[_0x82fd('0xe0')])};return _0xc0aba6;});if(!_0x49722d[_0x82fd('0xe1')]){return db[_0x82fd('0xe2')][_0x82fd('0xe3')](function(_0x27ecf6){return db[_0x82fd('0xe4')]['bulkCreate'](_0xa5bcb0,{'transaction':_0x27ecf6});});}}})['then'](function(){if(_0x450fdb){_0x9e0c50=_0x450fdb;return db['MailAccount'][_0x82fd('0x71')]({'where':{'service':!![]},'include':[{'model':db['MailServerOut'],'as':_0x82fd('0xe5'),'raw':!![],'include':[{'model':db[_0x82fd('0xe6')],'as':_0x82fd('0xe6'),'raw':!![]}]}]});}})[_0x82fd('0x1b')](function(_0x48f560){if(_0x48f560&&_0x48f560[_0x82fd('0xe5')]&&_0x49722d[_0x82fd('0xe7')]&&_0x49722d['forwardOfflineAddress']){var _0x383a41=_0x48f560[_0x82fd('0xe8')]();return respondWithRpcPromise(_0x82fd('0xe9'),_0x82fd('0xea'),{'account':_0x383a41,'message':{'from':util[_0x82fd('0x3d')](_0x82fd('0xeb'),_0x48f560['name'],_0x48f560[_0x82fd('0xec')]||_0x48f560[_0x82fd('0xe5')]['user']),'to':_0x49722d[_0x82fd('0xed')],'subject':_0x49722d[_0x82fd('0xee')],'html':_0x9e0c50[_0x82fd('0x64')],'attachments':_0xaa2272}},client9003)['then'](function(){return _0x9e0c50;})[_0x82fd('0x24')](function(_0x3be800){logger['error'](_0x3be800);});}})['then'](function(){if(_0x49722d&&_0x49722d[_0x82fd('0xe1')]&&_0x49722d[_0x82fd('0xef')]){var _0x2815bf=[];if(_0x59d927[_0x82fd('0x5f')]){_0x2815bf=_0x59d927[_0x82fd('0x49')](function(_0x358b63){return{'name':_0x358b63[_0x82fd('0xda')],'basename':_0x358b63[_0x82fd('0x7b')],'type':_0x358b63['mimetype'],'ChatOfflineMessageId':_0x450fdb['id']};});}var _0x191ba0;if(!_[_0x82fd('0x87')](_0x49722d['subjectOffline'])){var _0x10d696=_[_0x82fd('0x49')](_0x427170[_0x82fd('0x64')],function(_0x2e6a6a){return _0x2e6a6a;});var _0x490233=_[_0x82fd('0xf0')](_0x10d696)[0x0];var _0x3a8ab7=_[_0x82fd('0xf1')](_0x490233,function(_0x542418){return _0x542418;});_0x191ba0=_0x3a8ab7[0x1][_0x49722d[_0x82fd('0xf2')]];}var _0x23c1bd={'from':_0x3e5548[_0x82fd('0xec')],'firstName':_0x3e5548['firstName'],'lastName':_0x3e5548['lastName'],'mapKey':_0x82fd('0xec'),'message':{'from':_0x3e5548['email'],'to':_0x49722d[_0x82fd('0xd1')]['email'],'cc':'','subject':_['isNil'](_0x191ba0)?_0x49722d[_0x82fd('0xee')]:_0x191ba0,'messageId':'','sentAt':new Date(),'attach':_0x2815bf[_0x82fd('0x5f')],'attachments':_0x2815bf,'originChannel':_0x82fd('0xf3'),'ChatWebsiteId':_0x49722d['id'],'ChatOfflineMessageId':_0x9e0c50['id'],'originTo':_0x49722d[_0x82fd('0xd1')]['email']},'body':_0x9e0c50[_0x82fd('0x64')]};var _0x15b9cb={'account':{'id':_0x49722d['MailAccountId']},'body':_0x23c1bd,'log':_0x82fd('0xf4')};return respondWithRpcPromise(_0x82fd('0xf4'),_0x82fd('0xf5'),_0x15b9cb,client9001)['then'](function(){return _0x9e0c50;})[_0x82fd('0x24')](function(_0x411052){logger[_0x82fd('0x20')](_0x411052);});}return;})[_0x82fd('0x1b')](function(){if(_0x9e0c50){return _0x9e0c50;}})[_0x82fd('0x1b')](respondWithResult(_0x43a62d,null))['catch'](function(){for(var _0x2f70b7 of _0x59d927){var _0x2d84df=path[_0x82fd('0x82')](config[_0x82fd('0x89')],'server','files',_0x82fd('0xde'),_0x82fd('0xdf'),_0x2f70b7[_0x82fd('0x7b')]);fs_extra['remove'](_0x2d84df)[_0x82fd('0x24')](function(_0x5ac9fe){logger[_0x82fd('0x20')]('Could\x20not\x20remove\x20attachment\x20file',_0x2d84df,_0x5ac9fe);});}});};exports['addInteraction']=function(_0x282c08,_0x27965a){return db[_0x82fd('0xb3')][_0x82fd('0x62')]({'where':{'id':_0x282c08[_0x82fd('0x5e')]['id']}})[_0x82fd('0x1b')](handleEntityNotFound(_0x27965a,null))[_0x82fd('0x1b')](function(_0x103004){if(_0x103004){return _0x103004['addInteraction'](_0x282c08['body'][_0x82fd('0x78')],_[_0x82fd('0xf6')](_0x282c08['body'],[_0x82fd('0x78'),'id'])||{});}})['then'](respondWithResult(_0x27965a,null))[_0x82fd('0x24')](handleError(_0x27965a,null));};exports[_0x82fd('0xf7')]=function(_0x209eff,_0x56cdef){var _0x53d744={'raw':![],'where':{}};var _0x2935b1={};var _0x5db040={'count':0x0,'rows':[]};return db['ChatWebsite'][_0x82fd('0x71')]({'where':{'id':_0x209eff[_0x82fd('0x5e')]['id']}})[_0x82fd('0x1b')](handleEntityNotFound(_0x56cdef,null))[_0x82fd('0x1b')](function(_0x44cb2d){if(_0x44cb2d){_0x2935b1['model']=_['keys'](db[_0x82fd('0xb3')][_0x82fd('0x72')]);_0x2935b1['query']=_[_0x82fd('0x4c')](_0x209eff[_0x82fd('0x4d')]);_0x2935b1['filters']=_[_0x82fd('0x4e')](_0x2935b1['model'],_0x2935b1[_0x82fd('0x4d')]);_0x53d744[_0x82fd('0x4f')]=_[_0x82fd('0x4e')](_0x2935b1[_0x82fd('0x41')],qs[_0x82fd('0x50')](_0x209eff[_0x82fd('0x4d')]['fields']));_0x53d744['attributes']=_0x53d744[_0x82fd('0x4f')][_0x82fd('0x5f')]?_0x53d744[_0x82fd('0x4f')]:_0x2935b1['model'];if(!_0x209eff['query'][_0x82fd('0x51')](_0x82fd('0x52'))){_0x53d744[_0x82fd('0x2b')]=qs[_0x82fd('0x2b')](_0x209eff[_0x82fd('0x4d')][_0x82fd('0x2b')]);_0x53d744[_0x82fd('0x29')]=qs[_0x82fd('0x29')](_0x209eff[_0x82fd('0x4d')][_0x82fd('0x29')]);}_0x53d744[_0x82fd('0x53')]=qs[_0x82fd('0x54')](_0x209eff[_0x82fd('0x4d')][_0x82fd('0x54')]);_0x53d744[_0x82fd('0x55')]=qs['filters'](_['pick'](_0x209eff[_0x82fd('0x4d')],_0x2935b1[_0x82fd('0x56')]));_0x53d744[_0x82fd('0x55')][_0x82fd('0x6d')]=_0x44cb2d['id'];if(_0x209eff['query'][_0x82fd('0x58')]){_0x53d744[_0x82fd('0x55')]=_[_0x82fd('0x60')](_0x53d744[_0x82fd('0x55')],{'$or':_[_0x82fd('0x49')](_0x53d744['attributes'],function(_0x343f70){var _0x3cdac2={};_0x3cdac2[_0x343f70]={'$like':'%'+_0x209eff[_0x82fd('0x4d')]['filter']+'%'};return _0x3cdac2;})});}_0x53d744=_[_0x82fd('0x60')]({},_0x53d744,_0x209eff[_0x82fd('0x61')]);return db[_0x82fd('0xb3')][_0x82fd('0x2a')]({'where':_0x53d744[_0x82fd('0x55')]})[_0x82fd('0x1b')](function(_0x33b980){_0x5db040[_0x82fd('0x2a')]=_0x33b980;if(_0x209eff[_0x82fd('0x4d')][_0x82fd('0x73')]){_0x53d744[_0x82fd('0x5a')]=[{'model':db[_0x82fd('0x9a')],'as':'Contact','required':![]},{'model':db[_0x82fd('0xf8')],'as':_0x82fd('0xf9'),'attributes':['name',_0x82fd('0xfa'),'internal'],'required':![]},{'model':db[_0x82fd('0xfb')],'as':_0x82fd('0xfc'),'attributes':['id',_0x82fd('0x32'),'color'],'where':_0x209eff[_0x82fd('0x4d')][_0x82fd('0xfd')]?{'id':_0x209eff[_0x82fd('0x4d')]['tag']}:undefined,'required':_0x209eff[_0x82fd('0x4d')][_0x82fd('0xfd')]?!![]:![]}];}return db[_0x82fd('0xb3')][_0x82fd('0x5b')](_0x53d744);})[_0x82fd('0x1b')](function(_0x35ad72){_0x5db040[_0x82fd('0x5c')]=_0x35ad72;return _0x5db040;});}})[_0x82fd('0x1b')](respondWithFilteredResult(_0x56cdef,_0x53d744))['catch'](handleError(_0x56cdef,null));};exports[_0x82fd('0xfe')]=function(_0x439405,_0x50d9d6){var _0x121607=0x0;var _0x35b47e=0x0;var _0x42fcb4=![];var _0x29edfd;var _0x49586a;return db[_0x82fd('0x4a')][_0x82fd('0x62')]({'where':{'id':_0x439405[_0x82fd('0x5e')]['id']},'include':[{'model':db[_0x82fd('0x92')],'as':_0x82fd('0x92'),'include':[{'model':db[_0x82fd('0x92')],'as':_0x82fd('0xa6'),'attributes':['id',_0x82fd('0xff')]}]}]})['then'](handleEntityNotFound(_0x50d9d6,null))[_0x82fd('0x1b')](function(_0xe6569b){if(_0xe6569b){_0x29edfd=_0xe6569b;return _0xe6569b['getProactiveActions']({'raw':!![]});}})[_0x82fd('0x1b')](function(_0x37f4c2){if(_0x29edfd){if(_0x37f4c2){_0x49586a=_0x37f4c2;}}return require(_0x82fd('0x84'))['getLicense']();})[_0x82fd('0x1b')](function(_0x12fa06){if(_0x12fa06){_0x35b47e=_0x12fa06[_0x82fd('0x100')];_0x42fcb4=_0x12fa06[_0x82fd('0x86')];}})[_0x82fd('0x1b')](function(){return db[_0x82fd('0xb3')][_0x82fd('0x2a')]({'where':{'closed':![]}});})[_0x82fd('0x1b')](function(_0x5cb6eb){_0x121607=_0x5cb6eb;if(_0x35b47e&&_0x5cb6eb>_0x35b47e){return db[_0x82fd('0x101')][_0x82fd('0x71')]({'where':{'id':0x1}})[_0x82fd('0x1b')](function(_0x93fe30){if(_0x93fe30){_0x93fe30[_0x82fd('0x102')](_0x82fd('0x103'));}});}})[_0x82fd('0x1b')](function(){var _0x50803f=_0x29edfd[_0x82fd('0x92')];var _0x2f17f1=_0x29edfd[_0x82fd('0x94')]||undefined;return _0x50803f?_0x50803f[_0x82fd('0x95')](_0x2f17f1):!![];})[_0x82fd('0x1b')](function(_0x155675){var _0x1ead3b=fs['readFileSync'](path[_0x82fd('0x82')](config[_0x82fd('0x89')],_0x82fd('0x104')),_0x82fd('0xd5'));var _0x15d949=_0x82fd('0x105');var _0xd95fb1=![];try{const _0x15e78b=new URL(_0x29edfd[_0x82fd('0x6b')]);_0x29edfd['address']=_0x15e78b[_0x82fd('0x106')];}catch(_0x31470a){}var _0x25cdeb;if(_0x439405[_0x82fd('0xad')]['referer']){_0x439405[_0x82fd('0xad')][_0x82fd('0x3a')]=_0x439405[_0x82fd('0xad')][_0x82fd('0x3a')][_0x82fd('0x107')](/\/$/,'');_0x25cdeb=wildcardUtils[_0x82fd('0x108')](_0x29edfd[_0x82fd('0x6b')],_0x439405[_0x82fd('0xad')][_0x82fd('0x3a')]);}else{_0x439405[_0x82fd('0xad')]['referer']=_0x29edfd['address'];_0x25cdeb=!![];}var _0x341c06={'chatVersion':_0x15d949,'chatWebsiteAddressOrigin':_0x25cdeb?_0x439405[_0x82fd('0xad')]['referer']:_0x29edfd[_0x82fd('0x6b')],'remote':_0x29edfd[_0x82fd('0x109')],'query':querystring[_0x82fd('0x45')](_[_0x82fd('0x60')](_0x29edfd['get']({'plain':!![]}),{'customerIp':_0x439405[_0x82fd('0xad')][_0x82fd('0x36')]||_0x439405[_0x82fd('0xad')][_0x82fd('0x10a')]||_0x439405[_0x82fd('0x10b')][_0x82fd('0x10c')]||_0x439405['ip'],'referer':_0x439405[_0x82fd('0xad')][_0x82fd('0x3a')],'openedInteractions':_0x121607,'maxInteractions':_0x35b47e,'virtual':_0x42fcb4['virtual'],'online':_0x155675,'custom':_0x42fcb4,'address':_0x25cdeb?_0x439405[_0x82fd('0xad')][_0x82fd('0x3a')]:null}))[_0x82fd('0x107')](/'/g,'\x5c\x27')};_0x50d9d6['send'](ejs[_0x82fd('0xd6')](Mustache[_0x82fd('0xd6')](_0x1ead3b,_0x341c06),{'proactiveActions':_0x49586a,'alignment':_0x29edfd[_0x82fd('0x10d')],'verticalAlignment':_0x29edfd['verticalAlignment'],'div_color':_0x29edfd[_0x82fd('0x10e')],'labelText':_0x29edfd['labelText'],'text_color':_0x29edfd['textColor'],'text_button_color':_0x29edfd['textButtonColor'],'button_color':_0x29edfd['color_button'],'background_color':_0x29edfd['backgroundColor'],'hideWhenOffline':_0x29edfd[_0x82fd('0x10f')],'intervalId':_0x29edfd[_0x82fd('0x110')],'isDevelopment':_0xd95fb1,'chatVersion':_0x15d949}));})[_0x82fd('0x24')](handleError(_0x50d9d6,null));};exports[_0x82fd('0x111')]=function(_0xc11171,_0x1b08a4){var _0x456c78=_0xc11171[_0x82fd('0x5e')]['id'];var _0x22ca1b=_0xc11171[_0x82fd('0x64')];var _0x2d8c6d=0xc8;var _0x45fb9f=null;return db[_0x82fd('0xe2')][_0x82fd('0xe3')]({'isolationLevel':db[_0x82fd('0xe2')][_0x82fd('0x112')][_0x82fd('0x113')][_0x82fd('0x114')]},function(_0x5b1eeb){return db[_0x82fd('0x4a')]['findOne']({'where':{'id':_0x456c78},'transaction':_0x5b1eeb})[_0x82fd('0x1b')](function(_0x4c32c7){if(_0x4c32c7){return db[_0x82fd('0xa4')]['destroy']({'where':{'ChatWebsiteId':_0x456c78},'transaction':_0x5b1eeb})['then'](function(){var _0x7e6bd=_[_0x82fd('0x49')](_0x22ca1b,function(_0x3131e3){_0x3131e3[_0x82fd('0x6d')]=_0x456c78;return _0x3131e3;});return db['ChatApplication'][_0x82fd('0x115')](_0x7e6bd,{'transaction':_0x5b1eeb});});}else{_0x2d8c6d=0x194;_0x45fb9f=[];}});})[_0x82fd('0x1b')](function(){if(_0x2d8c6d!==0x194){return db['ChatApplication'][_0x82fd('0x116')]({'where':{'ChatWebsiteId':_0x456c78},'order':'priority'})[_0x82fd('0x1b')](function(_0x3c06d2){_0x45fb9f=_0x3c06d2;});}})[_0x82fd('0x24')](function(_0x198b9b){_0x2d8c6d=0x1f4;logger['error'](_0x198b9b[_0x82fd('0x117')]);if(_0x198b9b[_0x82fd('0x32')]){delete _0x198b9b[_0x82fd('0x32')];}_0x45fb9f=_0x198b9b;})[_0x82fd('0x118')](function(){if(_0x45fb9f===null){_0x1b08a4[_0x82fd('0x25')](_0x2d8c6d);}else{if(_0x2d8c6d===0x1f4){_0x1b08a4[_0x82fd('0x26')](_0x2d8c6d)['send'](_0x45fb9f);}else{_0x1b08a4[_0x82fd('0x26')](_0x2d8c6d)[_0x82fd('0x28')](_0x45fb9f);}}});};exports[_0x82fd('0x119')]=function(_0x4d0ffc,_0x540c30){var _0x2a25f5={};var _0x2c3bdb={};var _0x4cf2f8;var _0x3afdd4;return db[_0x82fd('0x4a')][_0x82fd('0x71')]({'where':{'id':_0x4d0ffc[_0x82fd('0x5e')]['id']}})[_0x82fd('0x1b')](handleEntityNotFound(_0x540c30,null))[_0x82fd('0x1b')](function(_0x43a25){if(_0x43a25){_0x4cf2f8=_0x43a25;_0x2c3bdb[_0x82fd('0x41')]=_['keys'](db[_0x82fd('0xa4')]['rawAttributes']);_0x2c3bdb['query']=_[_0x82fd('0x4c')](_0x4d0ffc['query']);_0x2c3bdb[_0x82fd('0x56')]=_['intersection'](_0x2c3bdb[_0x82fd('0x41')],_0x2c3bdb['query']);_0x2a25f5[_0x82fd('0x4f')]=_['intersection'](_0x2c3bdb[_0x82fd('0x41')],qs[_0x82fd('0x50')](_0x4d0ffc[_0x82fd('0x4d')][_0x82fd('0x50')]));_0x2a25f5['attributes']=_0x2a25f5['attributes'][_0x82fd('0x5f')]?_0x2a25f5['attributes']:_0x2c3bdb[_0x82fd('0x41')];_0x2a25f5[_0x82fd('0x53')]=qs[_0x82fd('0x54')](_0x4d0ffc[_0x82fd('0x4d')]['sort']);_0x2a25f5['where']=qs['filters'](_[_0x82fd('0x57')](_0x4d0ffc[_0x82fd('0x4d')],_0x2c3bdb['filters']));if(_0x4d0ffc[_0x82fd('0x4d')][_0x82fd('0x58')]){_0x2a25f5['where']=_[_0x82fd('0x60')](_0x2a25f5[_0x82fd('0x55')],{'$or':_[_0x82fd('0x49')](_0x2a25f5[_0x82fd('0x4f')],function(_0x1f1405){var _0x1bd53e={};_0x1bd53e[_0x1f1405]={'$like':'%'+_0x4d0ffc['query'][_0x82fd('0x58')]+'%'};return _0x1bd53e;})});}_0x2a25f5=_[_0x82fd('0x60')]({},_0x2a25f5,_0x4d0ffc[_0x82fd('0x61')]);return _0x4cf2f8[_0x82fd('0x119')](_0x2a25f5);}})['then'](function(_0x21bfbe){if(_0x21bfbe){_0x3afdd4=_0x21bfbe[_0x82fd('0x5f')];if(!_0x4d0ffc['query'][_0x82fd('0x51')](_0x82fd('0x52'))){_0x2a25f5[_0x82fd('0x2b')]=qs[_0x82fd('0x2b')](_0x4d0ffc[_0x82fd('0x4d')][_0x82fd('0x2b')]);_0x2a25f5[_0x82fd('0x29')]=qs[_0x82fd('0x29')](_0x4d0ffc[_0x82fd('0x4d')]['offset']);}return _0x4cf2f8[_0x82fd('0x119')](_0x2a25f5);}})['then'](function(_0x59c9a3){if(_0x59c9a3){return _0x59c9a3?{'count':_0x3afdd4,'rows':_0x59c9a3}:null;}})[_0x82fd('0x1b')](respondWithResult(_0x540c30,null))['catch'](handleError(_0x540c30,null));};exports[_0x82fd('0x11a')]=function(_0x2a0fa9,_0x2f2266){return db[_0x82fd('0x11b')][_0x82fd('0x62')]({'where':{'id':_0x2a0fa9['params']['id']}})['then'](handleEntityNotFound(_0x2f2266,null))[_0x82fd('0x1b')](function(_0xf0db80){if(_0xf0db80){return _0xf0db80[_0x82fd('0x11a')](_0x2a0fa9[_0x82fd('0x64')][_0x82fd('0x78')],_['omit'](_0x2a0fa9[_0x82fd('0x64')],[_0x82fd('0x78'),'id'])||{});}})[_0x82fd('0x1b')](respondWithResult(_0x2f2266,null))[_0x82fd('0x24')](handleError(_0x2f2266,null));};exports[_0x82fd('0x11c')]=function(_0x5177f3,_0x324fb0){var _0x462ee3={};var _0x27372a={};var _0x22215b;var _0x493eb7;return db[_0x82fd('0x4a')][_0x82fd('0x71')]({'where':{'id':_0x5177f3[_0x82fd('0x5e')]['id']}})[_0x82fd('0x1b')](handleEntityNotFound(_0x324fb0,null))[_0x82fd('0x1b')](function(_0x470698){if(_0x470698){_0x22215b=_0x470698;_0x27372a[_0x82fd('0x41')]=_[_0x82fd('0x4c')](db['ChatProactiveAction'][_0x82fd('0x72')]);_0x27372a[_0x82fd('0x4d')]=_[_0x82fd('0x4c')](_0x5177f3['query']);_0x27372a[_0x82fd('0x56')]=_[_0x82fd('0x4e')](_0x27372a[_0x82fd('0x41')],_0x27372a['query']);_0x462ee3[_0x82fd('0x4f')]=_['intersection'](_0x27372a['model'],qs[_0x82fd('0x50')](_0x5177f3['query'][_0x82fd('0x50')]));_0x462ee3[_0x82fd('0x4f')]=_0x462ee3[_0x82fd('0x4f')][_0x82fd('0x5f')]?_0x462ee3[_0x82fd('0x4f')]:_0x27372a[_0x82fd('0x41')];_0x462ee3['order']=qs['sort'](_0x5177f3[_0x82fd('0x4d')][_0x82fd('0x54')]);_0x462ee3[_0x82fd('0x55')]=qs[_0x82fd('0x56')](_[_0x82fd('0x57')](_0x5177f3[_0x82fd('0x4d')],_0x27372a['filters']));if(_0x5177f3[_0x82fd('0x4d')]['filter']){_0x462ee3['where']=_[_0x82fd('0x60')](_0x462ee3[_0x82fd('0x55')],{'$or':_[_0x82fd('0x49')](_0x462ee3[_0x82fd('0x4f')],function(_0x51d74d){var _0x2ae7cc={};_0x2ae7cc[_0x51d74d]={'$like':'%'+_0x5177f3['query'][_0x82fd('0x58')]+'%'};return _0x2ae7cc;})});}_0x462ee3=_[_0x82fd('0x60')]({},_0x462ee3,_0x5177f3[_0x82fd('0x61')]);return _0x22215b['getProactiveActions'](_0x462ee3);}})[_0x82fd('0x1b')](function(_0x17c034){if(_0x17c034){_0x493eb7=_0x17c034['length'];if(!_0x5177f3[_0x82fd('0x4d')][_0x82fd('0x51')]('nolimit')){_0x462ee3[_0x82fd('0x2b')]=qs[_0x82fd('0x2b')](_0x5177f3[_0x82fd('0x4d')][_0x82fd('0x2b')]);_0x462ee3[_0x82fd('0x29')]=qs['offset'](_0x5177f3[_0x82fd('0x4d')][_0x82fd('0x29')]);}return _0x22215b[_0x82fd('0x11c')](_0x462ee3);}})[_0x82fd('0x1b')](function(_0x52c651){if(_0x52c651){return _0x52c651?{'count':_0x493eb7,'rows':_0x52c651}:null;}})[_0x82fd('0x1b')](respondWithResult(_0x324fb0,null))[_0x82fd('0x24')](handleError(_0x324fb0,null));};exports[_0x82fd('0x11d')]=function(_0x20a9a9,_0x30e5fd){var _0x5180b2=_0x20a9a9[_0x82fd('0x4d')]['online']===_0x82fd('0x11e')?_0x82fd('0x11f'):'onlineForm';return db[_0x82fd('0x4a')][_0x82fd('0x62')]({'attributes':['id',_0x5180b2],'where':{'id':_0x20a9a9[_0x82fd('0x5e')]['id']}})[_0x82fd('0x1b')](handleEntityNotFound(_0x30e5fd,null))[_0x82fd('0x1b')](function(_0x4f5820){if(_0x4f5820){var _0x4ece25=_0x4f5820[_0x5180b2];var _0x4ac71b=_0x4ece25&&_0x4ece25[_0x82fd('0x120')]?_0x4ece25[_0x82fd('0x120')]:[];_0x30e5fd['send']({'fromKey':_[_0x82fd('0x87')](_0x4ece25[_0x82fd('0x121')])?undefined:_0x4ece25[_0x82fd('0x121')],'count':_0x4ac71b[_0x82fd('0x5f')],'rows':_0x4ac71b});}})['catch'](handleError(_0x30e5fd,null));};exports[_0x82fd('0x122')]=function(_0x40e3bf,_0x528381){var _0x2deca4={'raw':![],'where':{}};var _0x5849e2={};var _0x13bd7a={'count':0x0,'rows':[]};return db[_0x82fd('0x4a')][_0x82fd('0x71')]({'where':{'id':_0x40e3bf['params']['id']}})[_0x82fd('0x1b')](handleEntityNotFound(_0x528381,null))['then'](function(_0x201be0){if(_0x201be0){_0x5849e2[_0x82fd('0x41')]=_[_0x82fd('0x4c')](db[_0x82fd('0x123')][_0x82fd('0x72')]);_0x5849e2[_0x82fd('0x4d')]=_[_0x82fd('0x4c')](_0x40e3bf['query']);_0x5849e2[_0x82fd('0x56')]=_['intersection'](_0x5849e2['model'],_0x5849e2[_0x82fd('0x4d')]);_0x2deca4[_0x82fd('0x4f')]=_[_0x82fd('0x4e')](_0x5849e2['model'],qs['fields'](_0x40e3bf[_0x82fd('0x4d')][_0x82fd('0x50')]));_0x2deca4[_0x82fd('0x4f')]=_0x2deca4['attributes'][_0x82fd('0x5f')]?_0x2deca4[_0x82fd('0x4f')]:_0x5849e2[_0x82fd('0x41')];if(!_0x40e3bf[_0x82fd('0x4d')][_0x82fd('0x51')]('nolimit')){_0x2deca4['limit']=qs['limit'](_0x40e3bf[_0x82fd('0x4d')][_0x82fd('0x2b')]);_0x2deca4[_0x82fd('0x29')]=qs[_0x82fd('0x29')](_0x40e3bf[_0x82fd('0x4d')]['offset']);}_0x2deca4[_0x82fd('0x53')]=qs[_0x82fd('0x54')](_0x40e3bf[_0x82fd('0x4d')]['sort']);_0x2deca4[_0x82fd('0x55')]=qs['filters'](_[_0x82fd('0x57')](_0x40e3bf['query'],_0x5849e2[_0x82fd('0x56')]));_0x2deca4[_0x82fd('0x55')][_0x82fd('0x6d')]=_0x201be0['id'];if(_0x40e3bf['query'][_0x82fd('0x58')]){_0x2deca4['where']=_['merge'](_0x2deca4[_0x82fd('0x55')],{'$or':_[_0x82fd('0x49')](_0x2deca4['attributes'],function(_0x11c513){var _0x2bf527={};_0x2bf527[_0x11c513]={'$like':'%'+_0x40e3bf[_0x82fd('0x4d')][_0x82fd('0x58')]+'%'};return _0x2bf527;})});}_0x2deca4=_[_0x82fd('0x60')]({},_0x2deca4,_0x40e3bf[_0x82fd('0x61')]);return db['ChatOfflineMessage'][_0x82fd('0x2a')]({'where':_0x2deca4[_0x82fd('0x55')]})[_0x82fd('0x1b')](function(_0x4b7570){_0x13bd7a['count']=_0x4b7570;if(_0x40e3bf[_0x82fd('0x4d')][_0x82fd('0x73')]){_0x2deca4[_0x82fd('0x5a')]=[{'all':!![]}];}else{_0x2deca4[_0x82fd('0x5a')]=[{'model':db['CmContact'],'as':_0x82fd('0x124'),'required':![]},{'model':db[_0x82fd('0xe4')],'as':_0x82fd('0x125'),'required':![]}];}return db[_0x82fd('0x123')][_0x82fd('0x5b')](_0x2deca4);})[_0x82fd('0x1b')](function(_0x2657e3){_0x13bd7a['rows']=_0x2657e3;return _0x13bd7a;});}})[_0x82fd('0x1b')](respondWithFilteredResult(_0x528381,_0x2deca4))[_0x82fd('0x24')](handleError(_0x528381,null));};exports['addAgents']=function(_0x2ca4a9,_0xf4a519){return db[_0x82fd('0x4a')][_0x82fd('0x62')]({'where':{'id':_0x2ca4a9[_0x82fd('0x5e')]['id']}})[_0x82fd('0x1b')](handleEntityNotFound(_0xf4a519,null))[_0x82fd('0x1b')](function(_0x34502d){if(_0x34502d){return _0x34502d['addAgents'](_0x2ca4a9[_0x82fd('0x64')][_0x82fd('0x78')],_[_0x82fd('0xf6')](_0x2ca4a9[_0x82fd('0x64')],['ids','id'])||{})[_0x82fd('0xd2')](function(_0x3aca11){for(var _0x42b1fc=0x0;_0x42b1fc<_0x2ca4a9[_0x82fd('0x64')][_0x82fd('0x78')][_0x82fd('0x5f')];_0x42b1fc+=0x1){socket[_0x82fd('0x126')](_0x82fd('0x127'),{'UserId':Number(_0x2ca4a9[_0x82fd('0x64')]['ids'][_0x42b1fc]),'ChatWebsiteId':Number(_0x2ca4a9[_0x82fd('0x5e')]['id'])});}return _0x3aca11;});}})[_0x82fd('0x1b')](respondWithResult(_0xf4a519,null))[_0x82fd('0x24')](handleError(_0xf4a519,null));};exports[_0x82fd('0x128')]=function(_0x197ba9,_0x2335fd){return db[_0x82fd('0x4a')][_0x82fd('0x62')]({'where':{'id':_0x197ba9['params']['id']}})[_0x82fd('0x1b')](handleEntityNotFound(_0x2335fd,null))[_0x82fd('0x1b')](function(_0x1e0969){if(_0x1e0969){return _0x1e0969['removeAgents'](_0x197ba9[_0x82fd('0x4d')][_0x82fd('0x78')])[_0x82fd('0x1b')](function(){if(_[_0x82fd('0x129')](_0x197ba9[_0x82fd('0x4d')]['ids'])){for(var _0x4c6061=0x0;_0x4c6061<_0x197ba9[_0x82fd('0x4d')][_0x82fd('0x78')][_0x82fd('0x5f')];_0x4c6061+=0x1){socket[_0x82fd('0x126')]('userChatWebsite:remove',{'UserId':Number(_0x197ba9[_0x82fd('0x4d')][_0x82fd('0x78')][_0x4c6061]),'ChatWebsiteId':Number(_0x197ba9[_0x82fd('0x5e')]['id'])});}}else{socket[_0x82fd('0x126')](_0x82fd('0x12a'),{'UserId':Number(_0x197ba9[_0x82fd('0x4d')][_0x82fd('0x78')]),'ChatWebsiteId':Number(_0x197ba9[_0x82fd('0x5e')]['id'])});}});}})[_0x82fd('0x1b')](respondWithStatusCode(_0x2335fd,null))[_0x82fd('0x24')](handleError(_0x2335fd,null));};exports[_0x82fd('0x12b')]=function(_0x1a2cbf,_0x1ce2f0){var _0x51ea94={};var _0x2dcb02={};var _0x919ba5;var _0x4818ec;return db[_0x82fd('0x4a')][_0x82fd('0x71')]({'where':{'id':_0x1a2cbf[_0x82fd('0x5e')]['id']}})['then'](handleEntityNotFound(_0x1ce2f0,null))['then'](function(_0x68b0e){if(_0x68b0e){_0x919ba5=_0x68b0e;_0x2dcb02[_0x82fd('0x41')]=_[_0x82fd('0x4c')](db[_0x82fd('0xf8')]['rawAttributes']);_0x2dcb02[_0x82fd('0x4d')]=_[_0x82fd('0x4c')](_0x1a2cbf['query']);_0x2dcb02[_0x82fd('0x56')]=_['intersection'](_0x2dcb02['model'],_0x2dcb02[_0x82fd('0x4d')]);_0x51ea94['attributes']=_['intersection'](_0x2dcb02[_0x82fd('0x41')],qs[_0x82fd('0x50')](_0x1a2cbf[_0x82fd('0x4d')][_0x82fd('0x50')]));_0x51ea94[_0x82fd('0x4f')]=_0x51ea94[_0x82fd('0x4f')][_0x82fd('0x5f')]?_0x51ea94[_0x82fd('0x4f')]:_0x2dcb02['model'];_0x51ea94[_0x82fd('0x53')]=qs['sort'](_0x1a2cbf[_0x82fd('0x4d')][_0x82fd('0x54')]);_0x51ea94['where']=qs[_0x82fd('0x56')](_[_0x82fd('0x57')](_0x1a2cbf[_0x82fd('0x4d')],_0x2dcb02[_0x82fd('0x56')]));if(_0x1a2cbf[_0x82fd('0x4d')]['filter']){_0x51ea94[_0x82fd('0x55')]=_['merge'](_0x51ea94['where'],{'$or':_['map'](_0x51ea94[_0x82fd('0x4f')],function(_0x286875){var _0x4d034c={};_0x4d034c[_0x286875]={'$like':'%'+_0x1a2cbf['query']['filter']+'%'};return _0x4d034c;})});}_0x51ea94=_[_0x82fd('0x60')]({},_0x51ea94,_0x1a2cbf[_0x82fd('0x61')]);return _0x919ba5['getAgents'](_0x51ea94);}})[_0x82fd('0x1b')](function(_0x8b12){if(_0x8b12){_0x4818ec=_0x8b12[_0x82fd('0x5f')];if(!_0x1a2cbf['query'][_0x82fd('0x51')]('nolimit')){_0x51ea94['limit']=qs['limit'](_0x1a2cbf[_0x82fd('0x4d')][_0x82fd('0x2b')]);_0x51ea94['offset']=qs[_0x82fd('0x29')](_0x1a2cbf['query']['offset']);}return _0x919ba5[_0x82fd('0x12b')](_0x51ea94);}})[_0x82fd('0x1b')](function(_0x376a50){if(_0x376a50){return _0x376a50?{'count':_0x4818ec,'rows':_0x376a50}:null;}})['then'](respondWithResult(_0x1ce2f0,null))['catch'](handleError(_0x1ce2f0,null));};
\ No newline at end of file
+var _0x5e55=['Contact','Owner','fullname','Tag','Tags','tag','getSnippet','increment','chatLicenseExceeded','timezone','ifTime','server/files/chat/iframe.ejs','3.9.0','origin','replace','remote','x-real-ip','remoteAddress','alignment','color','labelText','textColor','hideWhenOffline','IntervalId','addApplications','transaction','Transaction','ISOLATION_LEVELS','READ_COMMITTED','findAndCountAll','finally','getApplications','addProactiveActions','chatProactiveAction','getProactiveActions','ChatProactiveAction','online','offlineForm','onlineForm','items','fromKey','getOfflineMessages','Attachments','addAgents','emit','userChatWebsite:save','removeAgents','isArray','userChatWebsite:remove','getAgents','mustache','util','ejs','fs-extra','lodash','html-to-text','ioredis','../../components/parsers/qs','../../config/logger','../../config/environment','../../errors/api','APIOutOfIntervalError','handleError','APIConflictError','URL','redis','defaults','localhost','socket.io-emitter','http','client','request','then','info','ChatWebsite,\x20%s,\x20%s','request\x20sent','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','status','offset','limit','undefined','count','Content-Range','json','update','destroy','get','ChatWebsites','UserProfileResource','end','stack','send','user-agent-parser','setUA','user-agent','customerIp','cf-connecting-ip','x-forwarded-for','split','firstName','lastName','x-real-port','referer','browser','name','version','format','%s\x20%s','unknown','model','device','vendor','%s\x20%s\x20%s','type','Pause','mandatoryDispositionPause','map','ChatWebsite','rawAttributes','fieldName','key','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','params','include','find','create','testWildcardValidity','address','\x22\x20is\x20not\x20a\x20valid\x20website\x20domain','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','Disposition','order','ChatWebsiteId','rows','removeDispositions','ids','addAnswer','findOne','CannedAnswer','removeAnswers','addLogo','sitepic','file','filename','addAvatar','agentAvatar','addCustomerAvatar','customerAvatar','addSystemAvatar','systemAvatar','getLogo','join','root','server/files/images/logos/default_logo.svg','../../config/license/util','getLicense','custom','isNil','existsSync','server/files/images/logos/','getAvatar','server/files/images/avatars/','download','server/files/images/avatars/customer_avatar.png','showCustomerAvatar','getSystemAvatar','server/files/images/avatars/system_avatar.png','Interval','resolve','notify','chat','from','From\x20is\x20mandatory','mapKey','MapKey\x20is\x20mandatory','isEmpty','Body\x20is\x20mandatory','CmContact','No\x20available\x20attributes','updatedAt','includes','createdAt','Invalid\x20MapKey\x20parameter.\x20Allowed\x20values:\x20','CmList','List','DESC','ChatApplication','Intervals','interval','Chat\x20Website\x20with\x20id\x20%s\x20not\x20found','account','applications','orderBy','Applications','priority','asc','list','ListId','Contacts','contact','headers','threadId','closed','ChatInteraction','Writing\x20on\x20closed\x20interaction','externalUrl','ContactId','interaction','messageId','created','push','close','*,*,*,*','ChatMessage','AttachmentId','UserId','User','waitForTheAssignedAgent','forcedOwnership','queueId','unshift','waitForTheAssignedQueue','Start','startRouting','EventManager','files','Sequelize','ValidationError','difference','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKeyOffline','mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','MailAccount','spread','readFileSync','server/files/templates/chatOfflineMessage.ejs','utf8','render','offlineMessageBody','ChatOfflineMessage','fromString','originalname','mimetype','server','attachments','openNewInteraction','sequelize','Attachment','bulkCreate','MailServerOut','Smtp','CloudProvider','forwardOffline','forwardOfflineAddress','SendMail','\x22%s\x22\x20<%s>','email','MailAccountId','subjectOffline','toPairsIn','mapValues','Chat','NotifyMailAccount','offline-chat','Could\x20not\x20remove\x20attachment\x20file','addInteraction','omit','getInteractions'];(function(_0x41007d,_0x3a338e){var _0x51c71d=function(_0x4255d4){while(--_0x4255d4){_0x41007d['push'](_0x41007d['shift']());}};_0x51c71d(++_0x3a338e);}(_0x5e55,0x15e));var _0x55e5=function(_0x2de5a4,_0x1256d3){_0x2de5a4=_0x2de5a4-0x0;var _0x48a713=_0x5e55[_0x2de5a4];return _0x48a713;};'use strict';var Mustache=require(_0x55e5('0x0'));var util=require(_0x55e5('0x1'));var path=require('path');var ejs=require(_0x55e5('0x2'));var fs=require('fs');var fs_extra=require(_0x55e5('0x3'));var _=require(_0x55e5('0x4'));var querystring=require('querystring');var htmlToText=require(_0x55e5('0x5'));var Redis=require(_0x55e5('0x6'));var jayson=require('jayson/promise');var qs=require(_0x55e5('0x7'));var logger=require(_0x55e5('0x8'))('api');var config=require(_0x55e5('0x9'));var APIBadRequestError=require(_0x55e5('0xa'))['APIBadRequestError'];var APINotFoundError=require(_0x55e5('0xa'))['APINotFoundError'];var APIOutOfIntervalError=require(_0x55e5('0xa'))[_0x55e5('0xb')];var APIHandleError=require(_0x55e5('0xa'))[_0x55e5('0xc')];var APIConflictError=require(_0x55e5('0xa'))[_0x55e5('0xd')];var wildcardUtils=require('./helpers/wildcard-expressions');var URL=require('url')[_0x55e5('0xe')];var db=require('../../mysqldb')['db'];config[_0x55e5('0xf')]=_[_0x55e5('0x10')](config[_0x55e5('0xf')],{'host':_0x55e5('0x11'),'port':0x18eb});var socket=require(_0x55e5('0x12'))(new Redis(config[_0x55e5('0xf')]));require('./chatWebsite.socket')['register'](socket);var client=jayson['client'][_0x55e5('0x13')]({'port':0x232c});var client9002=jayson[_0x55e5('0x14')]['http']({'port':0x232a});var client9003=jayson[_0x55e5('0x14')][_0x55e5('0x13')]({'port':0x232b});var client9001=jayson[_0x55e5('0x14')]['http']({'port':0x2329});function respondWithRpcPromise(_0x419e5b,_0x318c96,_0x429af4,_0x151bda){return new Promise(function(_0x575d77,_0x4e7628){var _0x3c330c=_0x151bda||client;return _0x3c330c[_0x55e5('0x15')](_0x419e5b,_0x429af4)[_0x55e5('0x16')](function(_0x1c6b72){logger[_0x55e5('0x17')](_0x55e5('0x18'),_0x318c96,_0x55e5('0x19'));logger[_0x55e5('0x1a')](_0x55e5('0x1b'),_0x318c96,'request\x20sent',JSON[_0x55e5('0x1c')](_0x1c6b72));if(_0x1c6b72['error']){if(_0x1c6b72[_0x55e5('0x1d')][_0x55e5('0x1e')]===0x1f4){logger[_0x55e5('0x1d')](_0x55e5('0x18'),_0x318c96,_0x1c6b72[_0x55e5('0x1d')][_0x55e5('0x1f')]);return _0x4e7628(_0x1c6b72[_0x55e5('0x1d')][_0x55e5('0x1f')]);}logger[_0x55e5('0x1d')](_0x55e5('0x18'),_0x318c96,_0x1c6b72[_0x55e5('0x1d')][_0x55e5('0x1f')]);return _0x575d77(_0x1c6b72[_0x55e5('0x1d')]['message']);}else{logger['info'](_0x55e5('0x18'),_0x318c96,_0x55e5('0x19'));_0x575d77(_0x1c6b72[_0x55e5('0x20')][_0x55e5('0x1f')]);}})[_0x55e5('0x21')](function(_0x18c485){logger[_0x55e5('0x1d')](_0x55e5('0x18'),_0x318c96,_0x18c485);_0x4e7628(_0x18c485);});});}function respondWithStatusCode(_0x590957,_0x1f56fe){_0x1f56fe=_0x1f56fe||0xcc;return function(_0x1990a9){if(_0x1990a9){return _0x590957[_0x55e5('0x22')](_0x1f56fe);}return _0x590957[_0x55e5('0x23')](_0x1f56fe)['end']();};}function respondWithResult(_0x22dd85,_0x5651b0){_0x5651b0=_0x5651b0||0xc8;return function(_0x51269e){if(_0x51269e){return _0x22dd85[_0x55e5('0x23')](_0x5651b0)['json'](_0x51269e);}};}function respondWithFilteredResult(_0x28ba3b,_0x1a8412){return function(_0x45252b){if(_0x45252b){var _0x499081=typeof _0x1a8412[_0x55e5('0x24')]==='undefined'&&typeof _0x1a8412[_0x55e5('0x25')]===_0x55e5('0x26');var _0x1b1c39=_0x45252b[_0x55e5('0x27')];var _0x1492c8=_0x499081?0x0:_0x1a8412[_0x55e5('0x24')];var _0x1f11c8=_0x499081?_0x45252b[_0x55e5('0x27')]:_0x1a8412[_0x55e5('0x24')]+_0x1a8412['limit'];var _0x23e7bf;if(_0x1f11c8>=_0x1b1c39){_0x1f11c8=_0x1b1c39;_0x23e7bf=0xc8;}else{_0x23e7bf=0xce;}_0x28ba3b[_0x55e5('0x23')](_0x23e7bf);return _0x28ba3b['set'](_0x55e5('0x28'),_0x1492c8+'-'+_0x1f11c8+'/'+_0x1b1c39)[_0x55e5('0x29')](_0x45252b);}return null;};}function saveUpdates(_0x230b8e){return function(_0x2a5cf5){if(_0x2a5cf5){return _0x2a5cf5[_0x55e5('0x2a')](_0x230b8e)[_0x55e5('0x16')](function(_0x259942){return _0x259942;});}return null;};}function removeEntity(_0x45bb37){return function(_0x23aca5){if(_0x23aca5){return _0x23aca5[_0x55e5('0x2b')]()[_0x55e5('0x16')](function(){var _0x6851f2=_0x23aca5[_0x55e5('0x2c')]({'plain':!![]});var _0x45b87c=_0x55e5('0x2d');return db[_0x55e5('0x2e')][_0x55e5('0x2b')]({'where':{'type':_0x45b87c,'resourceId':_0x6851f2['id']}})[_0x55e5('0x16')](function(){return _0x23aca5;});})[_0x55e5('0x16')](function(){_0x45bb37[_0x55e5('0x23')](0xcc)[_0x55e5('0x2f')]();});}};}function handleEntityNotFound(_0x463105){return function(_0x1d858c){if(!_0x1d858c){_0x463105[_0x55e5('0x22')](0x194);}return _0x1d858c;};}function handleError(_0xba0900,_0x1cfaf3){_0x1cfaf3=_0x1cfaf3||0x1f4;return function(_0x597b34){logger[_0x55e5('0x1d')](_0x597b34[_0x55e5('0x30')]);if(_0x597b34['name']){delete _0x597b34['name'];}_0xba0900[_0x55e5('0x23')](_0x1cfaf3)[_0x55e5('0x31')](_0x597b34);};}function createInteractionObject(_0x15a7ca,_0x23ac06,_0x5766bb,_0x17e4dc){var _0x4b8c41=require(_0x55e5('0x32'));var _0x19753b=new _0x4b8c41();var _0x3e3c75=_0x19753b[_0x55e5('0x33')](_0x5766bb[_0x55e5('0x34')])['getResult']();var _0x32aa04=_0x23ac06[_0x55e5('0x35')];if(_0x5766bb[_0x55e5('0x36')]){_0x32aa04=_0x5766bb[_0x55e5('0x36')];}else if(_0x5766bb['x-forwarded-for']){_0x32aa04=_['first'](_0x5766bb[_0x55e5('0x37')][_0x55e5('0x38')](','));}return{'ContactId':_0x17e4dc['id'],'ChatWebsiteId':_0x15a7ca,'from':(_0x17e4dc[_0x55e5('0x39')]||'')+'\x20'+(_0x17e4dc[_0x55e5('0x3a')]||''),'customerIp':_0x32aa04,'customerPort':_0x5766bb[_0x55e5('0x3b')]?_0x5766bb[_0x55e5('0x3b')]:null,'referer':_0x23ac06[_0x55e5('0x3c')],'browserName':_0x3e3c75[_0x55e5('0x3d')][_0x55e5('0x3e')]&&_0x3e3c75[_0x55e5('0x3d')][_0x55e5('0x3f')]?util[_0x55e5('0x40')](_0x55e5('0x41'),_0x3e3c75[_0x55e5('0x3d')][_0x55e5('0x3e')],_0x3e3c75[_0x55e5('0x3d')][_0x55e5('0x3f')]):_0x55e5('0x42'),'browserVersion':_0x3e3c75[_0x55e5('0x3d')][_0x55e5('0x3f')]||_0x55e5('0x42'),'osName':util['format'](_0x55e5('0x41'),_0x3e3c75['os'][_0x55e5('0x3e')],_0x3e3c75['os'][_0x55e5('0x3f')]),'osVersion':_0x3e3c75['os'][_0x55e5('0x3f')],'deviceModel':_0x3e3c75['device'][_0x55e5('0x43')]&&_0x3e3c75[_0x55e5('0x44')][_0x55e5('0x45')]?util[_0x55e5('0x40')](_0x55e5('0x46'),_0x3e3c75[_0x55e5('0x44')]['model'],_0x3e3c75['device'][_0x55e5('0x45')],_0x3e3c75['device'][_0x55e5('0x47')]):null,'deviceVendor':_0x3e3c75['device'][_0x55e5('0x45')],'deviceType':_0x3e3c75[_0x55e5('0x44')][_0x55e5('0x47')],'formData':JSON['stringify'](_0x23ac06)};}exports['index']=function(_0xb306a8,_0x3d8570){var _0x16cd97={'include':[{'model':db[_0x55e5('0x48')],'as':_0x55e5('0x49')}]},_0x3f7cf7={},_0x13e88d={'count':0x0,'rows':[]};var _0x3d707e=_[_0x55e5('0x4a')](db[_0x55e5('0x4b')][_0x55e5('0x4c')],function(_0x5b5ba7){return{'name':_0x5b5ba7[_0x55e5('0x4d')],'type':_0x5b5ba7[_0x55e5('0x47')][_0x55e5('0x4e')]};});_0x3f7cf7[_0x55e5('0x43')]=_[_0x55e5('0x4a')](_0x3d707e,_0x55e5('0x3e'));_0x3f7cf7[_0x55e5('0x4f')]=_[_0x55e5('0x50')](_0xb306a8[_0x55e5('0x4f')]);_0x3f7cf7[_0x55e5('0x51')]=_[_0x55e5('0x52')](_0x3f7cf7['model'],_0x3f7cf7[_0x55e5('0x4f')]);_0x16cd97[_0x55e5('0x53')]=_[_0x55e5('0x52')](_0x3f7cf7[_0x55e5('0x43')],qs[_0x55e5('0x54')](_0xb306a8['query'][_0x55e5('0x54')]));_0x16cd97[_0x55e5('0x53')]=_0x16cd97['attributes'][_0x55e5('0x55')]?_0x16cd97[_0x55e5('0x53')]:_0x3f7cf7[_0x55e5('0x43')];if(!_0xb306a8['query'][_0x55e5('0x56')](_0x55e5('0x57'))){_0x16cd97['limit']=qs[_0x55e5('0x25')](_0xb306a8[_0x55e5('0x4f')][_0x55e5('0x25')]);_0x16cd97[_0x55e5('0x24')]=qs[_0x55e5('0x24')](_0xb306a8[_0x55e5('0x4f')]['offset']);}_0x16cd97['order']=qs[_0x55e5('0x58')](_0xb306a8['query'][_0x55e5('0x58')]);_0x16cd97[_0x55e5('0x59')]=qs[_0x55e5('0x51')](_[_0x55e5('0x5a')](_0xb306a8['query'],_0x3f7cf7['filters']),_0x3d707e);if(_0xb306a8[_0x55e5('0x4f')][_0x55e5('0x5b')]){_0x16cd97[_0x55e5('0x59')]=_[_0x55e5('0x5c')](_0x16cd97[_0x55e5('0x59')],{'$or':_[_0x55e5('0x4a')](_0x3d707e,function(_0x54a23b){if(_0x54a23b[_0x55e5('0x47')]!==_0x55e5('0x5d')){var _0x2e361f={};_0x2e361f[_0x54a23b['name']]={'$like':'%'+_0xb306a8[_0x55e5('0x4f')][_0x55e5('0x5b')]+'%'};return _0x2e361f;}})});}_0x16cd97=_[_0x55e5('0x5c')]({},_0x16cd97,_0xb306a8[_0x55e5('0x5e')]);var _0x37aaff={'where':_0x16cd97[_0x55e5('0x59')]};return db['ChatWebsite'][_0x55e5('0x27')](_0x37aaff)['then'](function(_0x172247){_0x13e88d[_0x55e5('0x27')]=_0x172247;if(_0xb306a8[_0x55e5('0x4f')][_0x55e5('0x5f')]){_0x16cd97['include']=[{'all':!![]}];}return db[_0x55e5('0x4b')][_0x55e5('0x60')](_0x16cd97);})[_0x55e5('0x16')](function(_0x4ca930){_0x13e88d['rows']=_0x4ca930;return _0x13e88d;})[_0x55e5('0x16')](respondWithFilteredResult(_0x3d8570,_0x16cd97))[_0x55e5('0x21')](handleError(_0x3d8570,null));};exports['show']=function(_0x5033fa,_0x459631){var _0xedd4e7={'raw':![],'where':{'id':_0x5033fa[_0x55e5('0x61')]['id']},'include':[{'model':db['Pause'],'as':'mandatoryDispositionPause'}]},_0xe90f3f={};_0xe90f3f[_0x55e5('0x43')]=_[_0x55e5('0x50')](db[_0x55e5('0x4b')][_0x55e5('0x4c')]);_0xe90f3f[_0x55e5('0x4f')]=_[_0x55e5('0x50')](_0x5033fa[_0x55e5('0x4f')]);_0xe90f3f[_0x55e5('0x51')]=_['intersection'](_0xe90f3f[_0x55e5('0x43')],_0xe90f3f[_0x55e5('0x4f')]);_0xedd4e7[_0x55e5('0x53')]=_[_0x55e5('0x52')](_0xe90f3f['model'],qs['fields'](_0x5033fa[_0x55e5('0x4f')]['fields']));_0xedd4e7[_0x55e5('0x53')]=_0xedd4e7[_0x55e5('0x53')]['length']?_0xedd4e7['attributes']:_0xe90f3f['model'];if(_0x5033fa[_0x55e5('0x4f')][_0x55e5('0x5f')]){_0xedd4e7[_0x55e5('0x62')]=[{'all':!![]}];}_0xedd4e7=_[_0x55e5('0x5c')]({},_0xedd4e7,_0x5033fa[_0x55e5('0x5e')]);return db[_0x55e5('0x4b')][_0x55e5('0x63')](_0xedd4e7)['then'](handleEntityNotFound(_0x459631,null))['then'](respondWithResult(_0x459631,null))['catch'](handleError(_0x459631,null));};exports[_0x55e5('0x64')]=function(_0x47b35b,_0x5a0efa){if(!wildcardUtils[_0x55e5('0x65')](_0x47b35b['body'][_0x55e5('0x66')])){return handleError(_0x5a0efa,null)(new APIBadRequestError('\x22'+_0x47b35b['body'][_0x55e5('0x66')]+_0x55e5('0x67')));}return db[_0x55e5('0x4b')][_0x55e5('0x64')](_0x47b35b[_0x55e5('0x68')],{})[_0x55e5('0x16')](function(_0x2e4e3e){var _0x8d4550=_0x47b35b['user'][_0x55e5('0x2c')]({'plain':!![]});if(!_0x8d4550)throw new Error(_0x55e5('0x69'));if(_0x8d4550[_0x55e5('0x6a')]==='user'){var _0x492e30=_0x2e4e3e[_0x55e5('0x2c')]({'plain':!![]});var _0x2125ce=_0x55e5('0x2d');return db[_0x55e5('0x6b')][_0x55e5('0x63')]({'where':{'name':_0x2125ce,'userProfileId':_0x8d4550['userProfileId']},'raw':!![]})['then'](function(_0x4d4a86){if(_0x4d4a86&&_0x4d4a86[_0x55e5('0x6c')]===0x0){return db[_0x55e5('0x2e')][_0x55e5('0x64')]({'name':_0x492e30[_0x55e5('0x3e')],'resourceId':_0x492e30['id'],'type':_0x4d4a86[_0x55e5('0x3e')],'sectionId':_0x4d4a86['id']},{})[_0x55e5('0x16')](function(){return _0x2e4e3e;});}else{return _0x2e4e3e;}})[_0x55e5('0x21')](function(_0x4c8060){logger['error'](_0x55e5('0x6d'),_0x4c8060);throw _0x4c8060;});}return _0x2e4e3e;})[_0x55e5('0x16')](respondWithResult(_0x5a0efa,0xc9))[_0x55e5('0x21')](handleError(_0x5a0efa,null));};exports[_0x55e5('0x2a')]=function(_0x42b9da,_0x19fb9c){if(!wildcardUtils[_0x55e5('0x65')](_0x42b9da[_0x55e5('0x68')]['address'])){return handleError(_0x19fb9c,null)(new APIBadRequestError('\x22'+_0x42b9da[_0x55e5('0x68')]['address']+_0x55e5('0x67')));}if(_0x42b9da[_0x55e5('0x68')]['id']){delete _0x42b9da[_0x55e5('0x68')]['id'];}return db[_0x55e5('0x4b')][_0x55e5('0x63')]({'where':{'id':_0x42b9da['params']['id']},'include':[{'model':db[_0x55e5('0x48')],'as':'mandatoryDispositionPause'}]})[_0x55e5('0x16')](handleEntityNotFound(_0x19fb9c,null))[_0x55e5('0x16')](saveUpdates(_0x42b9da['body'],null))['then'](respondWithResult(_0x19fb9c,null))[_0x55e5('0x21')](handleError(_0x19fb9c,null));};exports[_0x55e5('0x2b')]=function(_0x1b5db6,_0x3c6c62){return db[_0x55e5('0x4b')][_0x55e5('0x63')]({'where':{'id':_0x1b5db6['params']['id']}})[_0x55e5('0x16')](handleEntityNotFound(_0x3c6c62,null))[_0x55e5('0x16')](removeEntity(_0x3c6c62,null))[_0x55e5('0x21')](handleError(_0x3c6c62,null));};exports[_0x55e5('0x6e')]=function(_0x435163,_0x2fb63f){return db['ChatWebsite']['describe']()[_0x55e5('0x16')](respondWithResult(_0x2fb63f,null))[_0x55e5('0x21')](handleError(_0x2fb63f,null));};exports['addDisposition']=function(_0x530365,_0x53dc85){if(_0x530365['body']['id']){delete _0x530365[_0x55e5('0x68')]['id'];}return db[_0x55e5('0x4b')][_0x55e5('0x63')]({'where':{'id':_0x530365[_0x55e5('0x61')]['id']}})['then'](handleEntityNotFound(_0x53dc85,null))[_0x55e5('0x16')](function(_0x50303d){if(_0x50303d){_0x530365[_0x55e5('0x68')]['ChatWebsiteId']=_0x50303d['id'];return db[_0x55e5('0x6f')][_0x55e5('0x64')](_0x530365['body']);}})[_0x55e5('0x16')](respondWithResult(_0x53dc85,null))[_0x55e5('0x21')](handleError(_0x53dc85,null));};exports['getDispositions']=function(_0x3685cd,_0x5393d2){var _0x4b5ce2={'raw':![],'where':{}};var _0x2ece56={};var _0x546b86={'count':0x0,'rows':[]};return db[_0x55e5('0x4b')]['findOne']({'where':{'id':_0x3685cd[_0x55e5('0x61')]['id']}})[_0x55e5('0x16')](handleEntityNotFound(_0x5393d2,null))[_0x55e5('0x16')](function(_0xd02ac8){if(_0xd02ac8){_0x2ece56['model']=_[_0x55e5('0x50')](db[_0x55e5('0x6f')]['rawAttributes']);_0x2ece56[_0x55e5('0x4f')]=_[_0x55e5('0x50')](_0x3685cd[_0x55e5('0x4f')]);_0x2ece56[_0x55e5('0x51')]=_['intersection'](_0x2ece56['model'],_0x2ece56[_0x55e5('0x4f')]);_0x4b5ce2['attributes']=_[_0x55e5('0x52')](_0x2ece56[_0x55e5('0x43')],qs[_0x55e5('0x54')](_0x3685cd[_0x55e5('0x4f')][_0x55e5('0x54')]));_0x4b5ce2[_0x55e5('0x53')]=_0x4b5ce2['attributes'][_0x55e5('0x55')]?_0x4b5ce2[_0x55e5('0x53')]:_0x2ece56[_0x55e5('0x43')];if(!_0x3685cd[_0x55e5('0x4f')][_0x55e5('0x56')](_0x55e5('0x57'))){_0x4b5ce2[_0x55e5('0x25')]=qs[_0x55e5('0x25')](_0x3685cd[_0x55e5('0x4f')][_0x55e5('0x25')]);_0x4b5ce2['offset']=qs[_0x55e5('0x24')](_0x3685cd['query'][_0x55e5('0x24')]);}_0x4b5ce2[_0x55e5('0x70')]=qs[_0x55e5('0x58')](_0x3685cd[_0x55e5('0x4f')][_0x55e5('0x58')]);_0x4b5ce2[_0x55e5('0x59')]=qs[_0x55e5('0x51')](_['pick'](_0x3685cd[_0x55e5('0x4f')],_0x2ece56[_0x55e5('0x51')]));_0x4b5ce2['where'][_0x55e5('0x71')]=_0xd02ac8['id'];if(_0x3685cd[_0x55e5('0x4f')]['filter']){_0x4b5ce2[_0x55e5('0x59')]=_[_0x55e5('0x5c')](_0x4b5ce2[_0x55e5('0x59')],{'$or':_[_0x55e5('0x4a')](_0x4b5ce2[_0x55e5('0x53')],function(_0xe5de3b){var _0xf2c29c={};_0xf2c29c[_0xe5de3b]={'$like':'%'+_0x3685cd[_0x55e5('0x4f')][_0x55e5('0x5b')]+'%'};return _0xf2c29c;})});}_0x4b5ce2=_['merge']({},_0x4b5ce2,_0x3685cd[_0x55e5('0x5e')]);return db['Disposition'][_0x55e5('0x27')]({'where':_0x4b5ce2[_0x55e5('0x59')]})[_0x55e5('0x16')](function(_0x16a64d){_0x546b86[_0x55e5('0x27')]=_0x16a64d;if(_0x3685cd[_0x55e5('0x4f')]['includeAll']){_0x4b5ce2[_0x55e5('0x62')]=[{'all':!![]}];}return db['Disposition']['findAll'](_0x4b5ce2);})[_0x55e5('0x16')](function(_0x947a57){_0x546b86[_0x55e5('0x72')]=_0x947a57;return _0x546b86;});}})[_0x55e5('0x16')](respondWithFilteredResult(_0x5393d2,_0x4b5ce2))[_0x55e5('0x21')](handleError(_0x5393d2,null));};exports[_0x55e5('0x73')]=function(_0x302d7d,_0x1da52b){return db[_0x55e5('0x4b')]['find']({'where':{'id':_0x302d7d[_0x55e5('0x61')]['id']}})[_0x55e5('0x16')](handleEntityNotFound(_0x1da52b,null))[_0x55e5('0x16')](function(_0x2565cb){if(_0x2565cb){return _0x2565cb[_0x55e5('0x73')](_0x302d7d[_0x55e5('0x4f')][_0x55e5('0x74')]);}})['then'](respondWithStatusCode(_0x1da52b,null))[_0x55e5('0x21')](handleError(_0x1da52b,null));};exports[_0x55e5('0x75')]=function(_0x13efa7,_0x1570f3){if(_0x13efa7[_0x55e5('0x68')]['id']){delete _0x13efa7[_0x55e5('0x68')]['id'];}return db['ChatWebsite'][_0x55e5('0x63')]({'where':{'id':_0x13efa7[_0x55e5('0x61')]['id']}})[_0x55e5('0x16')](handleEntityNotFound(_0x1570f3,null))['then'](function(_0x2ac473){if(_0x2ac473){_0x13efa7[_0x55e5('0x68')][_0x55e5('0x71')]=_0x2ac473['id'];return db['CannedAnswer'][_0x55e5('0x64')](_0x13efa7[_0x55e5('0x68')]);}})['then'](respondWithResult(_0x1570f3,null))['catch'](handleError(_0x1570f3,null));};exports['getAnswers']=function(_0x538135,_0x10d74f){var _0x1647e1={'raw':![],'where':{}};var _0x34238b={};var _0x3e1ddd={'count':0x0,'rows':[]};return db[_0x55e5('0x4b')][_0x55e5('0x76')]({'where':{'id':_0x538135[_0x55e5('0x61')]['id']}})[_0x55e5('0x16')](handleEntityNotFound(_0x10d74f,null))[_0x55e5('0x16')](function(_0x3399d2){if(_0x3399d2){_0x34238b['model']=_['keys'](db['CannedAnswer'][_0x55e5('0x4c')]);_0x34238b[_0x55e5('0x4f')]=_[_0x55e5('0x50')](_0x538135[_0x55e5('0x4f')]);_0x34238b['filters']=_[_0x55e5('0x52')](_0x34238b[_0x55e5('0x43')],_0x34238b['query']);_0x1647e1[_0x55e5('0x53')]=_['intersection'](_0x34238b[_0x55e5('0x43')],qs[_0x55e5('0x54')](_0x538135[_0x55e5('0x4f')][_0x55e5('0x54')]));_0x1647e1[_0x55e5('0x53')]=_0x1647e1[_0x55e5('0x53')][_0x55e5('0x55')]?_0x1647e1['attributes']:_0x34238b[_0x55e5('0x43')];if(!_0x538135[_0x55e5('0x4f')]['hasOwnProperty'](_0x55e5('0x57'))){_0x1647e1[_0x55e5('0x25')]=qs['limit'](_0x538135['query'][_0x55e5('0x25')]);_0x1647e1['offset']=qs['offset'](_0x538135['query'][_0x55e5('0x24')]);}_0x1647e1[_0x55e5('0x70')]=qs[_0x55e5('0x58')](_0x538135[_0x55e5('0x4f')]['sort']);_0x1647e1[_0x55e5('0x59')]=qs[_0x55e5('0x51')](_[_0x55e5('0x5a')](_0x538135['query'],_0x34238b[_0x55e5('0x51')]));_0x1647e1[_0x55e5('0x59')][_0x55e5('0x71')]=_0x3399d2['id'];if(_0x538135[_0x55e5('0x4f')][_0x55e5('0x5b')]){_0x1647e1[_0x55e5('0x59')]=_['merge'](_0x1647e1[_0x55e5('0x59')],{'$or':_[_0x55e5('0x4a')](_0x1647e1['attributes'],function(_0x417a80){var _0x4996a4={};_0x4996a4[_0x417a80]={'$like':'%'+_0x538135[_0x55e5('0x4f')]['filter']+'%'};return _0x4996a4;})});}_0x1647e1=_['merge']({},_0x1647e1,_0x538135[_0x55e5('0x5e')]);return db['CannedAnswer'][_0x55e5('0x27')]({'where':_0x1647e1[_0x55e5('0x59')]})[_0x55e5('0x16')](function(_0x45c64e){_0x3e1ddd[_0x55e5('0x27')]=_0x45c64e;if(_0x538135[_0x55e5('0x4f')][_0x55e5('0x5f')]){_0x1647e1[_0x55e5('0x62')]=[{'all':!![]}];}return db[_0x55e5('0x77')]['findAll'](_0x1647e1);})[_0x55e5('0x16')](function(_0x2728ea){_0x3e1ddd[_0x55e5('0x72')]=_0x2728ea;return _0x3e1ddd;});}})[_0x55e5('0x16')](respondWithFilteredResult(_0x10d74f,_0x1647e1))[_0x55e5('0x21')](handleError(_0x10d74f,null));};exports[_0x55e5('0x78')]=function(_0xf6bdd3,_0x1d0bf6){return db[_0x55e5('0x4b')][_0x55e5('0x63')]({'where':{'id':_0xf6bdd3[_0x55e5('0x61')]['id']}})[_0x55e5('0x16')](handleEntityNotFound(_0x1d0bf6,null))['then'](function(_0x20fdae){if(_0x20fdae){return _0x20fdae[_0x55e5('0x78')](_0xf6bdd3[_0x55e5('0x4f')]['ids']);}})[_0x55e5('0x16')](respondWithStatusCode(_0x1d0bf6,null))[_0x55e5('0x21')](handleError(_0x1d0bf6,null));};exports[_0x55e5('0x79')]=function(_0x477ca0,_0x3827b9){_0x477ca0[_0x55e5('0x68')][_0x55e5('0x7a')]=_0x477ca0[_0x55e5('0x7b')][_0x55e5('0x7c')];return db[_0x55e5('0x4b')][_0x55e5('0x63')]({'where':{'id':_0x477ca0[_0x55e5('0x61')]['id']}})[_0x55e5('0x16')](handleEntityNotFound(_0x3827b9,null))[_0x55e5('0x16')](saveUpdates(_0x477ca0[_0x55e5('0x68')],null))['then'](respondWithResult(_0x3827b9,null))[_0x55e5('0x21')](handleError(_0x3827b9,null));};exports[_0x55e5('0x7d')]=function(_0x47ca47,_0x4712d6){_0x47ca47[_0x55e5('0x68')][_0x55e5('0x7e')]=_0x47ca47['file'][_0x55e5('0x7c')];return db['ChatWebsite']['find']({'where':{'id':_0x47ca47[_0x55e5('0x61')]['id']}})['then'](handleEntityNotFound(_0x4712d6,null))['then'](saveUpdates(_0x47ca47[_0x55e5('0x68')],null))[_0x55e5('0x16')](respondWithResult(_0x4712d6,null))[_0x55e5('0x21')](handleError(_0x4712d6,null));};exports[_0x55e5('0x7f')]=function(_0x40fd1e,_0x57477f){_0x40fd1e[_0x55e5('0x68')][_0x55e5('0x80')]=_0x40fd1e['file']['filename'];return db[_0x55e5('0x4b')][_0x55e5('0x63')]({'where':{'id':_0x40fd1e[_0x55e5('0x61')]['id']}})[_0x55e5('0x16')](handleEntityNotFound(_0x57477f,null))[_0x55e5('0x16')](saveUpdates(_0x40fd1e[_0x55e5('0x68')],null))[_0x55e5('0x16')](respondWithResult(_0x57477f,null))[_0x55e5('0x21')](handleError(_0x57477f,null));};exports[_0x55e5('0x81')]=function(_0x1c688a,_0x512a8c){_0x1c688a[_0x55e5('0x68')][_0x55e5('0x82')]=_0x1c688a[_0x55e5('0x7b')][_0x55e5('0x7c')];return db[_0x55e5('0x4b')][_0x55e5('0x63')]({'where':{'id':_0x1c688a[_0x55e5('0x61')]['id']}})[_0x55e5('0x16')](handleEntityNotFound(_0x512a8c,null))['then'](saveUpdates(_0x1c688a[_0x55e5('0x68')],null))['then'](respondWithResult(_0x512a8c,null))['catch'](handleError(_0x512a8c,null));};exports[_0x55e5('0x83')]=function(_0x1ef5cc,_0x29e60d){var _0x4968e6=path[_0x55e5('0x84')](config[_0x55e5('0x85')],_0x55e5('0x86'));var _0x1e1969={'where':{'id':_0x1ef5cc[_0x55e5('0x61')]['id']},'attributes':['id',_0x55e5('0x7a')],'raw':!![]};var _0x89b038=![];return require(_0x55e5('0x87'))[_0x55e5('0x88')]()['then'](function(_0x288868){if(_0x288868){_0x89b038=_0x288868[_0x55e5('0x89')];}})[_0x55e5('0x16')](function(){return db[_0x55e5('0x4b')][_0x55e5('0x63')](_0x1e1969);})[_0x55e5('0x16')](handleEntityNotFound(_0x29e60d,null))['then'](function(_0x3636a3){if(_0x3636a3){if(!_[_0x55e5('0x8a')](_0x3636a3['sitepic'])){if(fs[_0x55e5('0x8b')](path[_0x55e5('0x84')](config[_0x55e5('0x85')],'server/files/images/logos/',_0x3636a3[_0x55e5('0x7a')]))&&_0x89b038){_0x4968e6=path[_0x55e5('0x84')](config[_0x55e5('0x85')],_0x55e5('0x8c'),_0x3636a3['sitepic']);}}return _0x29e60d['download'](_0x4968e6);}})['catch'](handleError(_0x29e60d,null));};exports[_0x55e5('0x8d')]=function(_0x530ba4,_0x23df1a){var _0x4b70a4=path[_0x55e5('0x84')](config[_0x55e5('0x85')],'server/files/images/avatars/default_avatar.png');var _0x394de4={'where':{'id':_0x530ba4[_0x55e5('0x61')]['id']},'attributes':['id',_0x55e5('0x7e')],'raw':!![]};return db[_0x55e5('0x4b')][_0x55e5('0x63')](_0x394de4)[_0x55e5('0x16')](handleEntityNotFound(_0x23df1a,null))[_0x55e5('0x16')](function(_0x5d1143){if(_0x5d1143){if(!_[_0x55e5('0x8a')](_0x5d1143[_0x55e5('0x7e')])){if(fs[_0x55e5('0x8b')](path[_0x55e5('0x84')](config[_0x55e5('0x85')],_0x55e5('0x8e'),_0x5d1143['agentAvatar']))){_0x4b70a4=path['join'](config[_0x55e5('0x85')],_0x55e5('0x8e'),_0x5d1143[_0x55e5('0x7e')]);}}return _0x23df1a[_0x55e5('0x8f')](_0x4b70a4);}})[_0x55e5('0x21')](handleError(_0x23df1a,null));};exports['getCustomerAvatar']=function(_0x20adb8,_0x35fb31){var _0x17c490=path['join'](config[_0x55e5('0x85')],_0x55e5('0x90'));var _0x1eae1d={'where':{'id':_0x20adb8[_0x55e5('0x61')]['id']},'attributes':['id',_0x55e5('0x80'),_0x55e5('0x91')],'raw':!![]};return db['ChatWebsite'][_0x55e5('0x63')](_0x1eae1d)[_0x55e5('0x16')](handleEntityNotFound(_0x35fb31,null))[_0x55e5('0x16')](function(_0xf4fd89){if(_0xf4fd89){if(!_[_0x55e5('0x8a')](_0xf4fd89[_0x55e5('0x80')])){if(fs[_0x55e5('0x8b')](path[_0x55e5('0x84')](config['root'],'server/files/images/avatars/',_0xf4fd89[_0x55e5('0x80')]))&&_0xf4fd89[_0x55e5('0x91')]){_0x17c490=path[_0x55e5('0x84')](config[_0x55e5('0x85')],_0x55e5('0x8e'),_0xf4fd89[_0x55e5('0x80')]);}}return _0x35fb31[_0x55e5('0x8f')](_0x17c490);}})[_0x55e5('0x21')](handleError(_0x35fb31,null));};exports[_0x55e5('0x92')]=function(_0x1f55f7,_0x42d70d){var _0x247893=path[_0x55e5('0x84')](config[_0x55e5('0x85')],_0x55e5('0x93'));var _0x90e29b={'where':{'id':_0x1f55f7[_0x55e5('0x61')]['id']},'attributes':['id',_0x55e5('0x82')],'raw':!![]};return db[_0x55e5('0x4b')][_0x55e5('0x63')](_0x90e29b)[_0x55e5('0x16')](handleEntityNotFound(_0x42d70d,null))[_0x55e5('0x16')](function(_0x1aa746){if(_0x1aa746){if(!_[_0x55e5('0x8a')](_0x1aa746['systemAvatar'])){if(fs[_0x55e5('0x8b')](path['join'](config[_0x55e5('0x85')],_0x55e5('0x8e'),_0x1aa746['systemAvatar']))){_0x247893=path[_0x55e5('0x84')](config[_0x55e5('0x85')],_0x55e5('0x8e'),_0x1aa746[_0x55e5('0x82')]);}}return _0x42d70d[_0x55e5('0x8f')](_0x247893);}})['catch'](handleError(_0x42d70d,null));};function checkWebsiteInterval(_0x5dcc47){var _0x379ebf=_0x5dcc47[_0x55e5('0x94')];if(!_0x379ebf){return Promise[_0x55e5('0x95')](_0x5dcc47);}var _0x32e1c1=_0x5dcc47['timezone']||undefined;return _0x379ebf['ifTime'](_0x32e1c1)[_0x55e5('0x16')](function(_0x2eed07){if(!_0x2eed07){throw new APIOutOfIntervalError();}return _0x5dcc47;});}exports[_0x55e5('0x96')]=function(_0x4021f4,_0x597541){var _0x47f8c8={'body':_0x4021f4['body'],'channel':_0x55e5('0x97')};var _0x3e27fe=[];var _0x196fb4=[];var _0x5cc60f={};var _0x114b51=![];if(_0x4021f4[_0x55e5('0x68')]['id']){delete _0x4021f4[_0x55e5('0x68')]['id'];}if(_[_0x55e5('0x8a')](_0x4021f4['body'][_0x55e5('0x98')])){throw new APIBadRequestError(_0x55e5('0x99'));}if(_[_0x55e5('0x8a')](_0x4021f4[_0x55e5('0x68')][_0x55e5('0x9a')])){throw new APIBadRequestError(_0x55e5('0x9b'));}if(_[_0x55e5('0x9c')](_0x4021f4[_0x55e5('0x68')][_0x55e5('0x68')])){throw new APIBadRequestError(_0x55e5('0x9d'));}var _0x3d22ba=_0x4021f4['body']['customerIp']&&_0x4021f4[_0x55e5('0x68')][_0x55e5('0x3c')];return db[_0x55e5('0x9e')][_0x55e5('0x6e')]()[_0x55e5('0x16')](function(_0x35304f){if(!_0x35304f){throw new Error(_0x55e5('0x9f'));}_0x3e27fe=Object[_0x55e5('0x50')](_0x35304f)['filter'](function(_0x127a7b){return!['createdAt',_0x55e5('0xa0')][_0x55e5('0xa1')](_0x127a7b);});_0x196fb4=Object[_0x55e5('0x50')](_0x35304f)[_0x55e5('0x5b')](function(_0x5231b9){return![_0x55e5('0xa2'),'updatedAt','CompanyId','ListId'][_0x55e5('0xa1')](_0x5231b9);});if(!_[_0x55e5('0xa1')](_0x196fb4,_0x4021f4[_0x55e5('0x68')][_0x55e5('0x9a')])){throw new APIBadRequestError(_0x55e5('0xa3')+_0x196fb4[_0x55e5('0x84')](',\x20'));}_0x5cc60f[_0x4021f4[_0x55e5('0x68')][_0x55e5('0x9a')]]=_0x4021f4['body']['from'];})[_0x55e5('0x16')](function(){return db['ChatWebsite'][_0x55e5('0x63')]({'where':{'id':_0x4021f4[_0x55e5('0x61')]['id']},'include':[{'model':db[_0x55e5('0xa4')],'as':_0x55e5('0xa5'),'include':[{'model':db['CmContact'],'as':'Contacts','where':_0x5cc60f,'limit':0x1,'order':[[_0x55e5('0xa0'),_0x55e5('0xa6')]]}]},{'model':db[_0x55e5('0xa7')],'as':'Applications'},{'model':db[_0x55e5('0x94')],'as':_0x55e5('0x94'),'include':[{'model':db[_0x55e5('0x94')],'as':_0x55e5('0xa8'),'attributes':['id',_0x55e5('0xa9')],'raw':!![]}]}]});})[_0x55e5('0x16')](function(_0x59f3e5){if(!_0x59f3e5){throw new APINotFoundError(util['format'](_0x55e5('0xaa'),_0x4021f4[_0x55e5('0x61')]['id']));}if(_0x3d22ba){return checkWebsiteInterval(_0x59f3e5);}return _0x59f3e5;})[_0x55e5('0x16')](function(_0x3dc7c2){_0x47f8c8[_0x55e5('0xab')]=_0x3dc7c2;_0x47f8c8[_0x55e5('0xac')]=_[_0x55e5('0xad')](_0x3dc7c2[_0x55e5('0xae')],[_0x55e5('0xaf')],[_0x55e5('0xb0')]);if(_0x47f8c8[_0x55e5('0xab')][_0x55e5('0xae')]){delete _0x47f8c8['account'][_0x55e5('0xae')];}_0x47f8c8[_0x55e5('0xb1')]=_0x3dc7c2['List']||{'id':_0x3dc7c2[_0x55e5('0xb2')]};if(_0x47f8c8[_0x55e5('0xb1')]&&_0x47f8c8[_0x55e5('0xb1')][_0x55e5('0xb3')][_0x55e5('0x55')]){return _0x47f8c8[_0x55e5('0xb1')][_0x55e5('0xb3')][0x0];}var _0x4c703f=_[_0x55e5('0x10')](_0x4021f4[_0x55e5('0x68')],{'firstName':_0x4021f4[_0x55e5('0x68')][_0x55e5('0x98')],'ListId':_0x3dc7c2['ListId']});_0x4c703f[_0x4021f4[_0x55e5('0x68')][_0x55e5('0x9a')]]=_0x4021f4[_0x55e5('0x68')][_0x55e5('0x98')];return db['CmContact']['create'](_0x4c703f,{'fields':_0x3e27fe,'raw':!![]});})[_0x55e5('0x16')](function(_0x24bbca){_0x47f8c8[_0x55e5('0xb4')]=_0x24bbca;var _0x43b7a3=createInteractionObject(_0x4021f4[_0x55e5('0x61')]['id'],_0x4021f4[_0x55e5('0x68')],_0x4021f4[_0x55e5('0xb5')],_0x24bbca);var _0x28ecfd={'ChatWebsiteId':_0x4021f4[_0x55e5('0x61')]['id']};if(_0x4021f4[_0x55e5('0x68')][_0x55e5('0xb6')]){_0x28ecfd[_0x55e5('0xb6')]=_0x4021f4[_0x55e5('0x68')][_0x55e5('0xb6')];_0x28ecfd[_0x55e5('0xb7')]=![];return db[_0x55e5('0xb8')][_0x55e5('0x63')]({'where':_0x28ecfd})[_0x55e5('0x16')](function(_0x9953b){var _0x548dc2=_0x4021f4['body'][_0x55e5('0x35')]&&_0x4021f4[_0x55e5('0x68')][_0x55e5('0x3c')];if(_0x9953b){_0x114b51=!![];return _0x9953b;}else if(!_0x548dc2&&_0x9953b&&_0x9953b[_0x55e5('0xb7')]){throw new APIConflictError(_0x55e5('0xb9'));}_0x43b7a3['threadId']=_0x4021f4[_0x55e5('0x68')]['threadId'];_0x43b7a3[_0x55e5('0xba')]=_0x4021f4[_0x55e5('0x68')][_0x55e5('0xba')];return db[_0x55e5('0xb8')][_0x55e5('0x64')](_0x43b7a3);});}_0x28ecfd[_0x55e5('0xbb')]=_0x24bbca['id'];if(_0x4021f4[_0x55e5('0x68')]['interaction']&&_0x4021f4['body'][_0x55e5('0xbc')]['id']){_0x28ecfd['id']=_0x4021f4[_0x55e5('0x68')][_0x55e5('0xbc')]['id'];return db['ChatInteraction'][_0x55e5('0x63')]({'where':_0x28ecfd})[_0x55e5('0x16')](function(_0x4d9800){var _0x50f7ea=_0x4021f4[_0x55e5('0x68')][_0x55e5('0x35')]&&_0x4021f4[_0x55e5('0x68')][_0x55e5('0x3c')];if(!_0x50f7ea&&_0x4d9800&&_0x4d9800[_0x55e5('0xb7')]){throw new APIConflictError(_0x55e5('0xb9'));}else if(_0x4d9800){_0x114b51=!![];return _0x4d9800;}else{return db[_0x55e5('0xb8')][_0x55e5('0x64')](_0x43b7a3);}});}return db['ChatInteraction'][_0x55e5('0x64')](_0x43b7a3);})[_0x55e5('0x16')](function(_0x2d4d26){if(!_0x114b51){return _0x2d4d26;}var _0x59a0c3={'from':(_0x47f8c8['contact'][_0x55e5('0x39')]||'')+'\x20'+(_0x47f8c8[_0x55e5('0xb4')][_0x55e5('0x3a')]||'')};if(_0x4021f4[_0x55e5('0x68')][_0x55e5('0xb6')]&&_0x4021f4[_0x55e5('0x68')][_0x55e5('0xbd')]&&_0x4021f4[_0x55e5('0x68')]['threadId']!=_0x4021f4['body']['messageId']){_0x59a0c3[_0x55e5('0xb6')]=_0x4021f4[_0x55e5('0x68')]['messageId'];}return _0x2d4d26[_0x55e5('0x2a')](_0x59a0c3);})[_0x55e5('0x16')](function(_0x3136d1){_0x47f8c8['interaction']=_0x3136d1[_0x55e5('0x2c')]({'plain':!![]});_0x47f8c8[_0x55e5('0xbc')]['created']=!_0x114b51;if(_0x47f8c8['interaction'][_0x55e5('0xbe')]){if(_0x47f8c8[_0x55e5('0xab')]['autoclose']){_0x47f8c8[_0x55e5('0xac')][_0x55e5('0xbf')]({'id':0x0,'priority':_0x47f8c8[_0x55e5('0xac')][_0x55e5('0x55')]+0x1,'app':_0x55e5('0xc0'),'appdata':'unmanaged','interval':_0x55e5('0xc1')});}}return db[_0x55e5('0xc2')]['create']({'body':_0x4021f4[_0x55e5('0x68')][_0x55e5('0x68')],'ChatWebsiteId':_0x4021f4[_0x55e5('0x61')]['id'],'ChatInteractionId':_0x3136d1['id'],'direction':'in','ContactId':_0x47f8c8[_0x55e5('0xb4')]['id'],'AttachmentId':_0x4021f4[_0x55e5('0x68')][_0x55e5('0xc3')]});})[_0x55e5('0x16')](function(_0x2b5cfa){_0x47f8c8[_0x55e5('0x1f')]=_0x2b5cfa;if(!_0x47f8c8[_0x55e5('0xbc')][_0x55e5('0xc4')]){return;}return db[_0x55e5('0xc5')][_0x55e5('0x63')]({'attributes':['id',_0x55e5('0x3e')],'where':{'id':_0x47f8c8[_0x55e5('0xbc')]['UserId']}});})[_0x55e5('0x16')](function(_0x2c71ba){if(_0x2c71ba){_0x47f8c8[_0x55e5('0xac')]['unshift']({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x2c71ba['name']+','+(_0x47f8c8[_0x55e5('0xab')][_0x55e5('0xc6')]||0xa),'interval':_0x55e5('0xc1')});_0x47f8c8[_0x55e5('0xc7')]=!![];}if(!_0x47f8c8[_0x55e5('0xbc')][_0x55e5('0xc8')]){return;}return db['ChatQueue'][_0x55e5('0x63')]({'attributes':['id','name'],'where':{'id':_0x47f8c8['interaction'][_0x55e5('0xc8')]}});})['then'](function(_0x48aeb2){if(_0x48aeb2){_0x47f8c8[_0x55e5('0xac')][_0x55e5('0xc9')]({'id':0x0,'priority':0x1,'app':'queue','appdata':_0x48aeb2[_0x55e5('0x3e')]+','+(_0x47f8c8[_0x55e5('0xab')][_0x55e5('0xca')]||0x12c),'interval':'*,*,*,*'});}return respondWithRpcPromise(_0x55e5('0xcb'),_0x55e5('0xcc'),_0x47f8c8);})['then'](function(_0x3eb572){respondWithRpcPromise(_0x55e5('0xcd'),_0x55e5('0xcd'),{'event':_0x55e5('0x96'),'message':_0x3eb572},client9002);return _0x3eb572;})[_0x55e5('0x16')](respondWithResult(_0x597541,null))[_0x55e5('0x21')](APIHandleError(_0x597541));};exports['offline']=function(_0x2c7aab,_0x270f41){var _0x4abdee,_0x58ede9,_0x1b5ccf;var _0x4bfee5=[];var _0xca0cdb={};var _0x499d64=_0x2c7aab[_0x55e5('0xce')]||[];var _0x1671d6=[];var _0xd9711c;return db['CmContact'][_0x55e5('0x6e')]()[_0x55e5('0x16')](function(_0x507386){if(!_0x507386){throw new db[(_0x55e5('0xcf'))][(_0x55e5('0xd0'))]('no\x20available\x20attributes');}_0x4bfee5=_[_0x55e5('0xd1')](_['keys'](_0x507386),[_0x55e5('0xa2'),_0x55e5('0xa0'),'CompanyId','ListId']);if(_0x2c7aab[_0x55e5('0x68')]['id']){delete _0x2c7aab[_0x55e5('0x68')]['id'];}if(_[_0x55e5('0x8a')](_0x2c7aab[_0x55e5('0x68')][_0x55e5('0x98')])){throw _0x270f41[_0x55e5('0x23')](0x1f4)['send'](new db['Sequelize'][(_0x55e5('0xd0'))](_0x55e5('0xd2')));}if(_[_0x55e5('0x8a')](_0x2c7aab['body'][_0x55e5('0x68')])||_0x2c7aab[_0x55e5('0x68')][_0x55e5('0x68')]===''){throw _0x270f41['status'](0x1f4)[_0x55e5('0x31')](new db['Sequelize'][(_0x55e5('0xd0'))](_0x55e5('0xd3')));}if(_[_0x55e5('0x8a')](_0x2c7aab[_0x55e5('0x68')][_0x55e5('0xd4')])){throw _0x270f41[_0x55e5('0x23')](0x1f4)[_0x55e5('0x31')](new db[(_0x55e5('0xcf'))]['ValidationError'](_0x55e5('0xd5')+_0x4bfee5));}if(!_[_0x55e5('0xa1')](_0x4bfee5,_0x2c7aab[_0x55e5('0x68')][_0x55e5('0xd4')])){throw _0x270f41['status'](0x1f4)[_0x55e5('0x31')](new db[(_0x55e5('0xcf'))]['ValidationError']('mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x4bfee5));}_0xca0cdb[_0x2c7aab[_0x55e5('0x68')][_0x55e5('0xd4')]]=_0x2c7aab[_0x55e5('0x68')][_0x55e5('0x98')];})[_0x55e5('0x16')](function(){return db[_0x55e5('0x4b')][_0x55e5('0x63')]({'where':{'id':_0x2c7aab[_0x55e5('0x61')]['id']},'include':[{'model':db[_0x55e5('0xa4')],'as':'List'},{'model':db[_0x55e5('0xd6')],'as':'MailAccount'}]});})['then'](handleEntityNotFound(_0x270f41,null))['then'](function(_0x8801a5){if(_0x8801a5&&_0x8801a5['List']){_0x58ede9=_0x8801a5;var _0x2ec8c7=_['defaults'](_0x2c7aab[_0x55e5('0x68')],{'firstName':_0x2c7aab[_0x55e5('0x68')][_0x55e5('0x98')],'phone':_0x2c7aab[_0x55e5('0x68')][_0x55e5('0x98')],'ListId':_0x8801a5['ListId']});_0x2ec8c7[_0x2c7aab[_0x55e5('0x68')][_0x55e5('0xd4')]]=_0x2c7aab[_0x55e5('0x68')][_0x55e5('0x98')];return db['CmContact']['findOrCreate']({'where':_0xca0cdb,'defaults':_0x2ec8c7});}})[_0x55e5('0xd7')](function(_0x1e4b8f){if(_0x1e4b8f){_0x1b5ccf=_0x1e4b8f;var _0x6a5c09=fs[_0x55e5('0xd8')](path[_0x55e5('0x84')](config[_0x55e5('0x85')],_0x55e5('0xd9')),_0x55e5('0xda'));var _0x5e9b31=ejs[_0x55e5('0xdb')](_0x6a5c09,{'body':_['toPairs'](_0x2c7aab[_0x55e5('0x68')][_0x55e5('0x68')]),'bodyTitle':_0x58ede9[_0x55e5('0xdc')]});return db[_0x55e5('0xdd')][_0x55e5('0x64')]({'body':_0x5e9b31,'plainBody':htmlToText[_0x55e5('0xde')](_0x5e9b31),'ContactId':_0x1e4b8f['id'],'ChatWebsiteId':_0x58ede9['id']});}})[_0x55e5('0x16')](function(_0x30156e){_0xd9711c=_0x30156e;if(_0x499d64[_0x55e5('0x55')]){var _0x3bd17b=_0x499d64[_0x55e5('0x4a')](function(_0x5153a4){return{'name':_0x5153a4[_0x55e5('0xdf')],'basename':_0x5153a4[_0x55e5('0x7c')],'type':_0x5153a4[_0x55e5('0xe0')],'ChatOfflineMessageId':_0x30156e['id']};});_0x1671d6=_0x3bd17b['map'](_0x48b350=>{var _0x1c4c1c={'filename':_0x48b350['name'],'path':path['join'](config[_0x55e5('0x85')],_0x55e5('0xe1'),_0x55e5('0xce'),_0x55e5('0xe2'),'offline-chat',_0x48b350['basename'])};return _0x1c4c1c;});if(!_0x58ede9[_0x55e5('0xe3')]){return db[_0x55e5('0xe4')]['transaction'](function(_0x875d70){return db[_0x55e5('0xe5')][_0x55e5('0xe6')](_0x3bd17b,{'transaction':_0x875d70});});}}})['then'](function(){if(_0xd9711c){_0x4abdee=_0xd9711c;return db['MailAccount'][_0x55e5('0x76')]({'where':{'service':!![]},'include':[{'model':db[_0x55e5('0xe7')],'as':_0x55e5('0xe8'),'raw':!![],'include':[{'model':db[_0x55e5('0xe9')],'as':_0x55e5('0xe9'),'raw':!![]}]}]});}})['then'](function(_0x35e086){if(_0x35e086&&_0x35e086['Smtp']&&_0x58ede9[_0x55e5('0xea')]&&_0x58ede9[_0x55e5('0xeb')]){var _0x20147e=_0x35e086['getSmtpOptions']();return respondWithRpcPromise(_0x55e5('0xec'),'sendMail',{'account':_0x20147e,'message':{'from':util[_0x55e5('0x40')](_0x55e5('0xed'),_0x35e086[_0x55e5('0x3e')],_0x35e086[_0x55e5('0xee')]||_0x35e086[_0x55e5('0xe8')]['user']),'to':_0x58ede9[_0x55e5('0xeb')],'subject':_0x58ede9['offlineMessageSubject'],'html':_0x4abdee[_0x55e5('0x68')],'attachments':_0x1671d6}},client9003)[_0x55e5('0x16')](function(){return _0x4abdee;})['catch'](function(_0x1859cf){logger[_0x55e5('0x1d')](_0x1859cf);});}})['then'](function(){if(_0x58ede9&&_0x58ede9[_0x55e5('0xe3')]&&_0x58ede9[_0x55e5('0xef')]){var _0x28a745=[];if(_0x499d64[_0x55e5('0x55')]){_0x28a745=_0x499d64[_0x55e5('0x4a')](function(_0x5e7c97){return{'name':_0x5e7c97['originalname'],'basename':_0x5e7c97['filename'],'type':_0x5e7c97[_0x55e5('0xe0')],'ChatOfflineMessageId':_0xd9711c['id']};});}var _0x1b5623;if(!_[_0x55e5('0x8a')](_0x58ede9[_0x55e5('0xf0')])){var _0x157070=_[_0x55e5('0x4a')](_0x2c7aab[_0x55e5('0x68')],function(_0x46b51d){return _0x46b51d;});var _0x50a065=_[_0x55e5('0xf1')](_0x157070)[0x0];var _0x1e8a86=_[_0x55e5('0xf2')](_0x50a065,function(_0x50237c){return _0x50237c;});_0x1b5623=_0x1e8a86[0x1][_0x58ede9[_0x55e5('0xf0')]];}var _0x5d8d84={'from':_0x1b5ccf[_0x55e5('0xee')],'firstName':_0x1b5ccf[_0x55e5('0x39')],'lastName':_0x1b5ccf['lastName'],'mapKey':_0x55e5('0xee'),'message':{'from':_0x1b5ccf[_0x55e5('0xee')],'to':_0x58ede9[_0x55e5('0xd6')]['email'],'cc':'','subject':_[_0x55e5('0x8a')](_0x1b5623)?_0x58ede9['offlineMessageSubject']:_0x1b5623,'messageId':'','sentAt':new Date(),'attach':_0x28a745[_0x55e5('0x55')],'attachments':_0x28a745,'originChannel':_0x55e5('0xf3'),'ChatWebsiteId':_0x58ede9['id'],'ChatOfflineMessageId':_0x4abdee['id'],'originTo':_0x58ede9[_0x55e5('0xd6')][_0x55e5('0xee')]},'body':_0x4abdee[_0x55e5('0x68')]};var _0x2babf6={'account':{'id':_0x58ede9[_0x55e5('0xef')]},'body':_0x5d8d84,'log':_0x55e5('0xf4')};return respondWithRpcPromise(_0x55e5('0xf4'),'notifyMail',_0x2babf6,client9001)[_0x55e5('0x16')](function(){return _0x4abdee;})[_0x55e5('0x21')](function(_0x3ede48){logger[_0x55e5('0x1d')](_0x3ede48);});}return;})[_0x55e5('0x16')](function(){if(_0x4abdee){return _0x4abdee;}})[_0x55e5('0x16')](respondWithResult(_0x270f41,null))[_0x55e5('0x21')](function(){for(var _0x2c1f72 of _0x499d64){var _0x26ee1b=path[_0x55e5('0x84')](config[_0x55e5('0x85')],_0x55e5('0xe1'),'files',_0x55e5('0xe2'),_0x55e5('0xf5'),_0x2c1f72[_0x55e5('0x7c')]);fs_extra['remove'](_0x26ee1b)[_0x55e5('0x21')](function(_0x331794){logger[_0x55e5('0x1d')](_0x55e5('0xf6'),_0x26ee1b,_0x331794);});}});};exports[_0x55e5('0xf7')]=function(_0x4ca6b5,_0xdfc662){return db['ChatInteraction'][_0x55e5('0x63')]({'where':{'id':_0x4ca6b5[_0x55e5('0x61')]['id']}})[_0x55e5('0x16')](handleEntityNotFound(_0xdfc662,null))['then'](function(_0x43f4da){if(_0x43f4da){return _0x43f4da[_0x55e5('0xf7')](_0x4ca6b5['body']['ids'],_[_0x55e5('0xf8')](_0x4ca6b5[_0x55e5('0x68')],[_0x55e5('0x74'),'id'])||{});}})['then'](respondWithResult(_0xdfc662,null))[_0x55e5('0x21')](handleError(_0xdfc662,null));};exports[_0x55e5('0xf9')]=function(_0x4d582c,_0x5d3575){var _0x4e730e={'raw':![],'where':{}};var _0x2154da={};var _0x268133={'count':0x0,'rows':[]};return db['ChatWebsite'][_0x55e5('0x76')]({'where':{'id':_0x4d582c[_0x55e5('0x61')]['id']}})[_0x55e5('0x16')](handleEntityNotFound(_0x5d3575,null))['then'](function(_0xfcfd88){if(_0xfcfd88){_0x2154da[_0x55e5('0x43')]=_['keys'](db['ChatInteraction'][_0x55e5('0x4c')]);_0x2154da['query']=_['keys'](_0x4d582c[_0x55e5('0x4f')]);_0x2154da['filters']=_[_0x55e5('0x52')](_0x2154da[_0x55e5('0x43')],_0x2154da[_0x55e5('0x4f')]);_0x4e730e['attributes']=_['intersection'](_0x2154da[_0x55e5('0x43')],qs[_0x55e5('0x54')](_0x4d582c[_0x55e5('0x4f')][_0x55e5('0x54')]));_0x4e730e['attributes']=_0x4e730e[_0x55e5('0x53')][_0x55e5('0x55')]?_0x4e730e[_0x55e5('0x53')]:_0x2154da['model'];if(!_0x4d582c[_0x55e5('0x4f')][_0x55e5('0x56')](_0x55e5('0x57'))){_0x4e730e[_0x55e5('0x25')]=qs['limit'](_0x4d582c[_0x55e5('0x4f')]['limit']);_0x4e730e[_0x55e5('0x24')]=qs[_0x55e5('0x24')](_0x4d582c['query'][_0x55e5('0x24')]);}_0x4e730e['order']=qs['sort'](_0x4d582c['query'][_0x55e5('0x58')]);_0x4e730e[_0x55e5('0x59')]=qs[_0x55e5('0x51')](_[_0x55e5('0x5a')](_0x4d582c['query'],_0x2154da[_0x55e5('0x51')]));_0x4e730e[_0x55e5('0x59')][_0x55e5('0x71')]=_0xfcfd88['id'];if(_0x4d582c[_0x55e5('0x4f')][_0x55e5('0x5b')]){_0x4e730e[_0x55e5('0x59')]=_[_0x55e5('0x5c')](_0x4e730e[_0x55e5('0x59')],{'$or':_['map'](_0x4e730e[_0x55e5('0x53')],function(_0x3f1fba){var _0x3b19c8={};_0x3b19c8[_0x3f1fba]={'$like':'%'+_0x4d582c[_0x55e5('0x4f')]['filter']+'%'};return _0x3b19c8;})});}_0x4e730e=_[_0x55e5('0x5c')]({},_0x4e730e,_0x4d582c[_0x55e5('0x5e')]);return db['ChatInteraction']['count']({'where':_0x4e730e['where']})['then'](function(_0x1c376c){_0x268133[_0x55e5('0x27')]=_0x1c376c;if(_0x4d582c[_0x55e5('0x4f')]['includeAll']){_0x4e730e['include']=[{'model':db[_0x55e5('0x9e')],'as':_0x55e5('0xfa'),'required':![]},{'model':db[_0x55e5('0xc5')],'as':_0x55e5('0xfb'),'attributes':['name',_0x55e5('0xfc'),'internal'],'required':![]},{'model':db[_0x55e5('0xfd')],'as':_0x55e5('0xfe'),'attributes':['id',_0x55e5('0x3e'),'color'],'where':_0x4d582c[_0x55e5('0x4f')][_0x55e5('0xff')]?{'id':_0x4d582c[_0x55e5('0x4f')][_0x55e5('0xff')]}:undefined,'required':_0x4d582c[_0x55e5('0x4f')][_0x55e5('0xff')]?!![]:![]}];}return db[_0x55e5('0xb8')]['findAll'](_0x4e730e);})[_0x55e5('0x16')](function(_0x366bc5){_0x268133[_0x55e5('0x72')]=_0x366bc5;return _0x268133;});}})[_0x55e5('0x16')](respondWithFilteredResult(_0x5d3575,_0x4e730e))[_0x55e5('0x21')](handleError(_0x5d3575,null));};exports[_0x55e5('0x100')]=function(_0x370133,_0x578a6d){var _0x98f4f0=0x0;var _0x3117c1=0x0;var _0x1f54b9=![];var _0x2b4e86;var _0x17b29e;return db[_0x55e5('0x4b')]['find']({'where':{'id':_0x370133[_0x55e5('0x61')]['id']},'include':[{'model':db['Interval'],'as':_0x55e5('0x94'),'include':[{'model':db[_0x55e5('0x94')],'as':_0x55e5('0xa8'),'attributes':['id',_0x55e5('0xa9')]}]}]})['then'](handleEntityNotFound(_0x578a6d,null))['then'](function(_0x293aff){if(_0x293aff){_0x2b4e86=_0x293aff;return _0x293aff['getProactiveActions']({'raw':!![]});}})['then'](function(_0x4f8fe8){if(_0x2b4e86){if(_0x4f8fe8){_0x17b29e=_0x4f8fe8;}}return require(_0x55e5('0x87'))[_0x55e5('0x88')]();})['then'](function(_0x2060a5){if(_0x2060a5){_0x3117c1=_0x2060a5['virtual'];_0x1f54b9=_0x2060a5[_0x55e5('0x89')];}})[_0x55e5('0x16')](function(){return db[_0x55e5('0xb8')][_0x55e5('0x27')]({'where':{'closed':![]}});})[_0x55e5('0x16')](function(_0xdc60da){_0x98f4f0=_0xdc60da;if(_0x3117c1&&_0xdc60da>_0x3117c1){return db['License'][_0x55e5('0x76')]({'where':{'id':0x1}})[_0x55e5('0x16')](function(_0x4b7cc5){if(_0x4b7cc5){_0x4b7cc5[_0x55e5('0x101')](_0x55e5('0x102'));}});}})[_0x55e5('0x16')](function(){var _0x56d217=_0x2b4e86[_0x55e5('0x94')];var _0x4727ba=_0x2b4e86[_0x55e5('0x103')]||undefined;return _0x56d217?_0x56d217[_0x55e5('0x104')](_0x4727ba):!![];})[_0x55e5('0x16')](function(_0x336b05){var _0x3abfd2=fs[_0x55e5('0xd8')](path[_0x55e5('0x84')](config[_0x55e5('0x85')],_0x55e5('0x105')),_0x55e5('0xda'));var _0x88915b=_0x55e5('0x106');var _0x2d53ec=![];try{const _0x500e7b=new URL(_0x2b4e86[_0x55e5('0x66')]);_0x2b4e86[_0x55e5('0x66')]=_0x500e7b[_0x55e5('0x107')];}catch(_0x4dadb0){}var _0xa6029d;if(_0x370133[_0x55e5('0xb5')][_0x55e5('0x3c')]){_0x370133['headers'][_0x55e5('0x3c')]=_0x370133[_0x55e5('0xb5')][_0x55e5('0x3c')][_0x55e5('0x108')](/\/$/,'');_0xa6029d=wildcardUtils['testWebsiteWithWildcard'](_0x2b4e86['address'],_0x370133[_0x55e5('0xb5')]['referer']);}else{_0x370133[_0x55e5('0xb5')]['referer']=_0x2b4e86['address'];_0xa6029d=!![];}var _0x498bc8={'chatVersion':_0x88915b,'chatWebsiteAddressOrigin':_0xa6029d?_0x370133['headers'][_0x55e5('0x3c')]:_0x2b4e86[_0x55e5('0x66')],'remote':_0x2b4e86[_0x55e5('0x109')],'query':querystring['stringify'](_[_0x55e5('0x5c')](_0x2b4e86['get']({'plain':!![]}),{'customerIp':_0x370133[_0x55e5('0xb5')][_0x55e5('0x37')]||_0x370133[_0x55e5('0xb5')][_0x55e5('0x10a')]||_0x370133['connection'][_0x55e5('0x10b')]||_0x370133['ip'],'referer':_0x370133[_0x55e5('0xb5')]['referer'],'openedInteractions':_0x98f4f0,'maxInteractions':_0x3117c1,'virtual':_0x1f54b9['virtual'],'online':_0x336b05,'custom':_0x1f54b9,'address':_0xa6029d?_0x370133[_0x55e5('0xb5')][_0x55e5('0x3c')]:null}))[_0x55e5('0x108')](/'/g,'\x5c\x27')};_0x578a6d[_0x55e5('0x31')](ejs[_0x55e5('0xdb')](Mustache[_0x55e5('0xdb')](_0x3abfd2,_0x498bc8),{'proactiveActions':_0x17b29e,'alignment':_0x2b4e86[_0x55e5('0x10c')],'verticalAlignment':_0x2b4e86['verticalAlignment'],'div_color':_0x2b4e86[_0x55e5('0x10d')],'labelText':_0x2b4e86[_0x55e5('0x10e')],'text_color':_0x2b4e86[_0x55e5('0x10f')],'text_button_color':_0x2b4e86['textButtonColor'],'button_color':_0x2b4e86['color_button'],'background_color':_0x2b4e86['backgroundColor'],'hideWhenOffline':_0x2b4e86[_0x55e5('0x110')],'intervalId':_0x2b4e86[_0x55e5('0x111')],'isDevelopment':_0x2d53ec,'chatVersion':_0x88915b}));})[_0x55e5('0x21')](handleError(_0x578a6d,null));};exports[_0x55e5('0x112')]=function(_0x2a6d94,_0x45cfc4){var _0x5c78b1=_0x2a6d94['params']['id'];var _0x43b6ef=_0x2a6d94['body'];var _0x16c8f2=0xc8;var _0x4accca=null;return db[_0x55e5('0xe4')][_0x55e5('0x113')]({'isolationLevel':db[_0x55e5('0xe4')][_0x55e5('0x114')][_0x55e5('0x115')][_0x55e5('0x116')]},function(_0x39d5bc){return db[_0x55e5('0x4b')][_0x55e5('0x76')]({'where':{'id':_0x5c78b1},'transaction':_0x39d5bc})['then'](function(_0x21360a){if(_0x21360a){return db[_0x55e5('0xa7')][_0x55e5('0x2b')]({'where':{'ChatWebsiteId':_0x5c78b1},'transaction':_0x39d5bc})[_0x55e5('0x16')](function(){var _0x3cb0f8=_[_0x55e5('0x4a')](_0x43b6ef,function(_0x47dd28){_0x47dd28[_0x55e5('0x71')]=_0x5c78b1;return _0x47dd28;});return db[_0x55e5('0xa7')]['bulkCreate'](_0x3cb0f8,{'transaction':_0x39d5bc});});}else{_0x16c8f2=0x194;_0x4accca=[];}});})[_0x55e5('0x16')](function(){if(_0x16c8f2!==0x194){return db['ChatApplication'][_0x55e5('0x117')]({'where':{'ChatWebsiteId':_0x5c78b1},'order':_0x55e5('0xaf')})[_0x55e5('0x16')](function(_0x2c1222){_0x4accca=_0x2c1222;});}})[_0x55e5('0x21')](function(_0x4e0d24){_0x16c8f2=0x1f4;logger[_0x55e5('0x1d')](_0x4e0d24[_0x55e5('0x30')]);if(_0x4e0d24[_0x55e5('0x3e')]){delete _0x4e0d24[_0x55e5('0x3e')];}_0x4accca=_0x4e0d24;})[_0x55e5('0x118')](function(){if(_0x4accca===null){_0x45cfc4['sendStatus'](_0x16c8f2);}else{if(_0x16c8f2===0x1f4){_0x45cfc4['status'](_0x16c8f2)[_0x55e5('0x31')](_0x4accca);}else{_0x45cfc4[_0x55e5('0x23')](_0x16c8f2)['json'](_0x4accca);}}});};exports['getApplications']=function(_0xb9b8aa,_0x5dc3ef){var _0x482469={};var _0x5c67de={};var _0x5ba554;var _0x250597;return db['ChatWebsite'][_0x55e5('0x76')]({'where':{'id':_0xb9b8aa[_0x55e5('0x61')]['id']}})[_0x55e5('0x16')](handleEntityNotFound(_0x5dc3ef,null))[_0x55e5('0x16')](function(_0x5cd73d){if(_0x5cd73d){_0x5ba554=_0x5cd73d;_0x5c67de[_0x55e5('0x43')]=_[_0x55e5('0x50')](db[_0x55e5('0xa7')][_0x55e5('0x4c')]);_0x5c67de['query']=_[_0x55e5('0x50')](_0xb9b8aa[_0x55e5('0x4f')]);_0x5c67de[_0x55e5('0x51')]=_[_0x55e5('0x52')](_0x5c67de[_0x55e5('0x43')],_0x5c67de[_0x55e5('0x4f')]);_0x482469[_0x55e5('0x53')]=_['intersection'](_0x5c67de[_0x55e5('0x43')],qs[_0x55e5('0x54')](_0xb9b8aa[_0x55e5('0x4f')][_0x55e5('0x54')]));_0x482469[_0x55e5('0x53')]=_0x482469[_0x55e5('0x53')]['length']?_0x482469[_0x55e5('0x53')]:_0x5c67de[_0x55e5('0x43')];_0x482469[_0x55e5('0x70')]=qs[_0x55e5('0x58')](_0xb9b8aa[_0x55e5('0x4f')]['sort']);_0x482469[_0x55e5('0x59')]=qs['filters'](_[_0x55e5('0x5a')](_0xb9b8aa[_0x55e5('0x4f')],_0x5c67de[_0x55e5('0x51')]));if(_0xb9b8aa['query'][_0x55e5('0x5b')]){_0x482469[_0x55e5('0x59')]=_[_0x55e5('0x5c')](_0x482469[_0x55e5('0x59')],{'$or':_[_0x55e5('0x4a')](_0x482469[_0x55e5('0x53')],function(_0x14a24d){var _0x738f7d={};_0x738f7d[_0x14a24d]={'$like':'%'+_0xb9b8aa['query'][_0x55e5('0x5b')]+'%'};return _0x738f7d;})});}_0x482469=_[_0x55e5('0x5c')]({},_0x482469,_0xb9b8aa['options']);return _0x5ba554[_0x55e5('0x119')](_0x482469);}})['then'](function(_0x25a44c){if(_0x25a44c){_0x250597=_0x25a44c[_0x55e5('0x55')];if(!_0xb9b8aa[_0x55e5('0x4f')]['hasOwnProperty'](_0x55e5('0x57'))){_0x482469[_0x55e5('0x25')]=qs[_0x55e5('0x25')](_0xb9b8aa[_0x55e5('0x4f')]['limit']);_0x482469['offset']=qs[_0x55e5('0x24')](_0xb9b8aa['query'][_0x55e5('0x24')]);}return _0x5ba554['getApplications'](_0x482469);}})['then'](function(_0x1c5410){if(_0x1c5410){return _0x1c5410?{'count':_0x250597,'rows':_0x1c5410}:null;}})[_0x55e5('0x16')](respondWithResult(_0x5dc3ef,null))[_0x55e5('0x21')](handleError(_0x5dc3ef,null));};exports[_0x55e5('0x11a')]=function(_0x538873,_0x276b8f){return db[_0x55e5('0x11b')][_0x55e5('0x63')]({'where':{'id':_0x538873[_0x55e5('0x61')]['id']}})[_0x55e5('0x16')](handleEntityNotFound(_0x276b8f,null))['then'](function(_0x487a24){if(_0x487a24){return _0x487a24[_0x55e5('0x11a')](_0x538873[_0x55e5('0x68')][_0x55e5('0x74')],_['omit'](_0x538873[_0x55e5('0x68')],['ids','id'])||{});}})['then'](respondWithResult(_0x276b8f,null))[_0x55e5('0x21')](handleError(_0x276b8f,null));};exports[_0x55e5('0x11c')]=function(_0x4e9c07,_0x4e6387){var _0x47b1dd={};var _0x1eae1f={};var _0x584389;var _0x2e9feb;return db['ChatWebsite'][_0x55e5('0x76')]({'where':{'id':_0x4e9c07['params']['id']}})[_0x55e5('0x16')](handleEntityNotFound(_0x4e6387,null))[_0x55e5('0x16')](function(_0x175d9d){if(_0x175d9d){_0x584389=_0x175d9d;_0x1eae1f['model']=_[_0x55e5('0x50')](db[_0x55e5('0x11d')][_0x55e5('0x4c')]);_0x1eae1f[_0x55e5('0x4f')]=_['keys'](_0x4e9c07[_0x55e5('0x4f')]);_0x1eae1f[_0x55e5('0x51')]=_[_0x55e5('0x52')](_0x1eae1f[_0x55e5('0x43')],_0x1eae1f[_0x55e5('0x4f')]);_0x47b1dd[_0x55e5('0x53')]=_['intersection'](_0x1eae1f[_0x55e5('0x43')],qs[_0x55e5('0x54')](_0x4e9c07['query'][_0x55e5('0x54')]));_0x47b1dd[_0x55e5('0x53')]=_0x47b1dd['attributes']['length']?_0x47b1dd[_0x55e5('0x53')]:_0x1eae1f[_0x55e5('0x43')];_0x47b1dd['order']=qs[_0x55e5('0x58')](_0x4e9c07[_0x55e5('0x4f')]['sort']);_0x47b1dd[_0x55e5('0x59')]=qs[_0x55e5('0x51')](_[_0x55e5('0x5a')](_0x4e9c07[_0x55e5('0x4f')],_0x1eae1f[_0x55e5('0x51')]));if(_0x4e9c07[_0x55e5('0x4f')][_0x55e5('0x5b')]){_0x47b1dd[_0x55e5('0x59')]=_['merge'](_0x47b1dd['where'],{'$or':_[_0x55e5('0x4a')](_0x47b1dd[_0x55e5('0x53')],function(_0x8e1783){var _0x4b1e7d={};_0x4b1e7d[_0x8e1783]={'$like':'%'+_0x4e9c07[_0x55e5('0x4f')][_0x55e5('0x5b')]+'%'};return _0x4b1e7d;})});}_0x47b1dd=_[_0x55e5('0x5c')]({},_0x47b1dd,_0x4e9c07[_0x55e5('0x5e')]);return _0x584389['getProactiveActions'](_0x47b1dd);}})['then'](function(_0x34488b){if(_0x34488b){_0x2e9feb=_0x34488b[_0x55e5('0x55')];if(!_0x4e9c07[_0x55e5('0x4f')][_0x55e5('0x56')]('nolimit')){_0x47b1dd[_0x55e5('0x25')]=qs['limit'](_0x4e9c07['query']['limit']);_0x47b1dd[_0x55e5('0x24')]=qs[_0x55e5('0x24')](_0x4e9c07[_0x55e5('0x4f')][_0x55e5('0x24')]);}return _0x584389[_0x55e5('0x11c')](_0x47b1dd);}})[_0x55e5('0x16')](function(_0x3bdec3){if(_0x3bdec3){return _0x3bdec3?{'count':_0x2e9feb,'rows':_0x3bdec3}:null;}})[_0x55e5('0x16')](respondWithResult(_0x4e6387,null))[_0x55e5('0x21')](handleError(_0x4e6387,null));};exports['getFields']=function(_0x39c633,_0x345b74){var _0x441d3a=_0x39c633[_0x55e5('0x4f')][_0x55e5('0x11e')]==='false'?_0x55e5('0x11f'):_0x55e5('0x120');return db['ChatWebsite'][_0x55e5('0x63')]({'attributes':['id',_0x441d3a],'where':{'id':_0x39c633[_0x55e5('0x61')]['id']}})[_0x55e5('0x16')](handleEntityNotFound(_0x345b74,null))[_0x55e5('0x16')](function(_0x146f90){if(_0x146f90){var _0x4060fe=_0x146f90[_0x441d3a];var _0xa978c7=_0x4060fe&&_0x4060fe[_0x55e5('0x121')]?_0x4060fe['items']:[];_0x345b74[_0x55e5('0x31')]({'fromKey':_[_0x55e5('0x8a')](_0x4060fe[_0x55e5('0x122')])?undefined:_0x4060fe[_0x55e5('0x122')],'count':_0xa978c7[_0x55e5('0x55')],'rows':_0xa978c7});}})[_0x55e5('0x21')](handleError(_0x345b74,null));};exports[_0x55e5('0x123')]=function(_0x291e37,_0x815201){var _0x26dd0a={'raw':![],'where':{}};var _0x513375={};var _0x50edc7={'count':0x0,'rows':[]};return db[_0x55e5('0x4b')][_0x55e5('0x76')]({'where':{'id':_0x291e37[_0x55e5('0x61')]['id']}})[_0x55e5('0x16')](handleEntityNotFound(_0x815201,null))[_0x55e5('0x16')](function(_0x199652){if(_0x199652){_0x513375['model']=_['keys'](db[_0x55e5('0xdd')][_0x55e5('0x4c')]);_0x513375[_0x55e5('0x4f')]=_[_0x55e5('0x50')](_0x291e37['query']);_0x513375['filters']=_['intersection'](_0x513375[_0x55e5('0x43')],_0x513375[_0x55e5('0x4f')]);_0x26dd0a[_0x55e5('0x53')]=_[_0x55e5('0x52')](_0x513375['model'],qs[_0x55e5('0x54')](_0x291e37[_0x55e5('0x4f')][_0x55e5('0x54')]));_0x26dd0a[_0x55e5('0x53')]=_0x26dd0a[_0x55e5('0x53')][_0x55e5('0x55')]?_0x26dd0a[_0x55e5('0x53')]:_0x513375[_0x55e5('0x43')];if(!_0x291e37[_0x55e5('0x4f')]['hasOwnProperty'](_0x55e5('0x57'))){_0x26dd0a['limit']=qs[_0x55e5('0x25')](_0x291e37[_0x55e5('0x4f')][_0x55e5('0x25')]);_0x26dd0a[_0x55e5('0x24')]=qs[_0x55e5('0x24')](_0x291e37['query'][_0x55e5('0x24')]);}_0x26dd0a[_0x55e5('0x70')]=qs['sort'](_0x291e37[_0x55e5('0x4f')][_0x55e5('0x58')]);_0x26dd0a[_0x55e5('0x59')]=qs[_0x55e5('0x51')](_['pick'](_0x291e37[_0x55e5('0x4f')],_0x513375[_0x55e5('0x51')]));_0x26dd0a[_0x55e5('0x59')][_0x55e5('0x71')]=_0x199652['id'];if(_0x291e37['query'][_0x55e5('0x5b')]){_0x26dd0a[_0x55e5('0x59')]=_[_0x55e5('0x5c')](_0x26dd0a[_0x55e5('0x59')],{'$or':_['map'](_0x26dd0a[_0x55e5('0x53')],function(_0x46cdd3){var _0x294cae={};_0x294cae[_0x46cdd3]={'$like':'%'+_0x291e37[_0x55e5('0x4f')][_0x55e5('0x5b')]+'%'};return _0x294cae;})});}_0x26dd0a=_['merge']({},_0x26dd0a,_0x291e37[_0x55e5('0x5e')]);return db[_0x55e5('0xdd')][_0x55e5('0x27')]({'where':_0x26dd0a[_0x55e5('0x59')]})[_0x55e5('0x16')](function(_0x889571){_0x50edc7[_0x55e5('0x27')]=_0x889571;if(_0x291e37[_0x55e5('0x4f')][_0x55e5('0x5f')]){_0x26dd0a['include']=[{'all':!![]}];}else{_0x26dd0a['include']=[{'model':db[_0x55e5('0x9e')],'as':'Contact','required':![]},{'model':db[_0x55e5('0xe5')],'as':_0x55e5('0x124'),'required':![]}];}return db['ChatOfflineMessage'][_0x55e5('0x60')](_0x26dd0a);})[_0x55e5('0x16')](function(_0x180f28){_0x50edc7[_0x55e5('0x72')]=_0x180f28;return _0x50edc7;});}})[_0x55e5('0x16')](respondWithFilteredResult(_0x815201,_0x26dd0a))['catch'](handleError(_0x815201,null));};exports[_0x55e5('0x125')]=function(_0x39e9d8,_0x472a38){return db[_0x55e5('0x4b')][_0x55e5('0x63')]({'where':{'id':_0x39e9d8['params']['id']}})['then'](handleEntityNotFound(_0x472a38,null))[_0x55e5('0x16')](function(_0x5c6284){if(_0x5c6284){return _0x5c6284[_0x55e5('0x125')](_0x39e9d8['body'][_0x55e5('0x74')],_['omit'](_0x39e9d8[_0x55e5('0x68')],[_0x55e5('0x74'),'id'])||{})['spread'](function(_0x18e0a8){for(var _0x2f6892=0x0;_0x2f6892<_0x39e9d8[_0x55e5('0x68')][_0x55e5('0x74')][_0x55e5('0x55')];_0x2f6892+=0x1){socket[_0x55e5('0x126')](_0x55e5('0x127'),{'UserId':Number(_0x39e9d8['body'][_0x55e5('0x74')][_0x2f6892]),'ChatWebsiteId':Number(_0x39e9d8[_0x55e5('0x61')]['id'])});}return _0x18e0a8;});}})['then'](respondWithResult(_0x472a38,null))[_0x55e5('0x21')](handleError(_0x472a38,null));};exports[_0x55e5('0x128')]=function(_0x26cad0,_0x569f6d){return db[_0x55e5('0x4b')][_0x55e5('0x63')]({'where':{'id':_0x26cad0[_0x55e5('0x61')]['id']}})[_0x55e5('0x16')](handleEntityNotFound(_0x569f6d,null))['then'](function(_0xdce87d){if(_0xdce87d){return _0xdce87d[_0x55e5('0x128')](_0x26cad0['query']['ids'])[_0x55e5('0x16')](function(){if(_[_0x55e5('0x129')](_0x26cad0[_0x55e5('0x4f')][_0x55e5('0x74')])){for(var _0x43684b=0x0;_0x43684b<_0x26cad0[_0x55e5('0x4f')]['ids'][_0x55e5('0x55')];_0x43684b+=0x1){socket[_0x55e5('0x126')]('userChatWebsite:remove',{'UserId':Number(_0x26cad0[_0x55e5('0x4f')][_0x55e5('0x74')][_0x43684b]),'ChatWebsiteId':Number(_0x26cad0[_0x55e5('0x61')]['id'])});}}else{socket[_0x55e5('0x126')](_0x55e5('0x12a'),{'UserId':Number(_0x26cad0['query']['ids']),'ChatWebsiteId':Number(_0x26cad0[_0x55e5('0x61')]['id'])});}});}})[_0x55e5('0x16')](respondWithStatusCode(_0x569f6d,null))[_0x55e5('0x21')](handleError(_0x569f6d,null));};exports[_0x55e5('0x12b')]=function(_0x1b4439,_0x2deca6){var _0xa02ee8={};var _0x4f1e47={};var _0x171fe7;var _0x1d509b;return db[_0x55e5('0x4b')][_0x55e5('0x76')]({'where':{'id':_0x1b4439[_0x55e5('0x61')]['id']}})[_0x55e5('0x16')](handleEntityNotFound(_0x2deca6,null))[_0x55e5('0x16')](function(_0x1f3fad){if(_0x1f3fad){_0x171fe7=_0x1f3fad;_0x4f1e47[_0x55e5('0x43')]=_[_0x55e5('0x50')](db[_0x55e5('0xc5')][_0x55e5('0x4c')]);_0x4f1e47[_0x55e5('0x4f')]=_[_0x55e5('0x50')](_0x1b4439['query']);_0x4f1e47[_0x55e5('0x51')]=_['intersection'](_0x4f1e47[_0x55e5('0x43')],_0x4f1e47['query']);_0xa02ee8['attributes']=_[_0x55e5('0x52')](_0x4f1e47[_0x55e5('0x43')],qs[_0x55e5('0x54')](_0x1b4439[_0x55e5('0x4f')][_0x55e5('0x54')]));_0xa02ee8[_0x55e5('0x53')]=_0xa02ee8[_0x55e5('0x53')]['length']?_0xa02ee8[_0x55e5('0x53')]:_0x4f1e47[_0x55e5('0x43')];_0xa02ee8['order']=qs[_0x55e5('0x58')](_0x1b4439[_0x55e5('0x4f')][_0x55e5('0x58')]);_0xa02ee8[_0x55e5('0x59')]=qs[_0x55e5('0x51')](_['pick'](_0x1b4439[_0x55e5('0x4f')],_0x4f1e47['filters']));if(_0x1b4439[_0x55e5('0x4f')][_0x55e5('0x5b')]){_0xa02ee8[_0x55e5('0x59')]=_[_0x55e5('0x5c')](_0xa02ee8[_0x55e5('0x59')],{'$or':_[_0x55e5('0x4a')](_0xa02ee8[_0x55e5('0x53')],function(_0x41d1f6){var _0x3ae380={};_0x3ae380[_0x41d1f6]={'$like':'%'+_0x1b4439[_0x55e5('0x4f')][_0x55e5('0x5b')]+'%'};return _0x3ae380;})});}_0xa02ee8=_[_0x55e5('0x5c')]({},_0xa02ee8,_0x1b4439[_0x55e5('0x5e')]);return _0x171fe7[_0x55e5('0x12b')](_0xa02ee8);}})[_0x55e5('0x16')](function(_0x30c517){if(_0x30c517){_0x1d509b=_0x30c517[_0x55e5('0x55')];if(!_0x1b4439['query'][_0x55e5('0x56')]('nolimit')){_0xa02ee8[_0x55e5('0x25')]=qs['limit'](_0x1b4439['query'][_0x55e5('0x25')]);_0xa02ee8[_0x55e5('0x24')]=qs['offset'](_0x1b4439['query'][_0x55e5('0x24')]);}return _0x171fe7['getAgents'](_0xa02ee8);}})[_0x55e5('0x16')](function(_0x100cbb){if(_0x100cbb){return _0x100cbb?{'count':_0x1d509b,'rows':_0x100cbb}:null;}})['then'](respondWithResult(_0x2deca6,null))['catch'](handleError(_0x2deca6,null));};
\ No newline at end of file
index fe27f94..14a18f0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4f5d=['update','emit','hasOwnProperty','hook','exports','events','../../mysqldb','ChatWebsite','setMaxListeners','save'];(function(_0x35f2fa,_0x4ea583){var _0x302f25=function(_0xfe035a){while(--_0xfe035a){_0x35f2fa['push'](_0x35f2fa['shift']());}};_0x302f25(++_0x4ea583);}(_0x4f5d,0x1d1));var _0xd4f5=function(_0x18ab2a,_0x4debcd){_0x18ab2a=_0x18ab2a-0x0;var _0x16dcee=_0x4f5d[_0x18ab2a];return _0x16dcee;};'use strict';var EventEmitter=require(_0xd4f5('0x0'));var ChatWebsite=require(_0xd4f5('0x1'))['db'][_0xd4f5('0x2')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0xd4f5('0x3')](0x0);var events={'afterCreate':_0xd4f5('0x4'),'afterUpdate':_0xd4f5('0x5'),'afterDestroy':'remove'};function emitEvent(_0x45f512){return function(_0x468609,_0xf61335,_0x3956d8){ChatWebsiteEvents[_0xd4f5('0x6')](_0x45f512+':'+_0x468609['id'],_0x468609);ChatWebsiteEvents[_0xd4f5('0x6')](_0x45f512,_0x468609);_0x3956d8(null);};}for(var e in events){if(events[_0xd4f5('0x7')](e)){var event=events[e];ChatWebsite[_0xd4f5('0x8')](e,emitEvent(event));}}module[_0xd4f5('0x9')]=ChatWebsiteEvents;
\ No newline at end of file
+var _0x00bb=['remove','hook','exports','events','../../mysqldb','ChatWebsite','save'];(function(_0x45833a,_0x106229){var _0xc606a6=function(_0x5357f2){while(--_0x5357f2){_0x45833a['push'](_0x45833a['shift']());}};_0xc606a6(++_0x106229);}(_0x00bb,0x1d8));var _0xb00b=function(_0x550d12,_0x5384bd){_0x550d12=_0x550d12-0x0;var _0x12103d=_0x00bb[_0x550d12];return _0x12103d;};'use strict';var EventEmitter=require(_0xb00b('0x0'));var ChatWebsite=require(_0xb00b('0x1'))['db'][_0xb00b('0x2')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xb00b('0x3'),'afterUpdate':'update','afterDestroy':_0xb00b('0x4')};function emitEvent(_0x464fe7){return function(_0x582ef9,_0x14b5d0,_0x2dbd25){ChatWebsiteEvents['emit'](_0x464fe7+':'+_0x582ef9['id'],_0x582ef9);ChatWebsiteEvents['emit'](_0x464fe7,_0x582ef9);_0x2dbd25(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatWebsite[_0xb00b('0x5')](e,emitEvent(event));}}module[_0xb00b('0x6')]=ChatWebsiteEvents;
\ No newline at end of file
index 8deed78..4223e75 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd7ff=['request-promise','path','rimraf','../../config/environment','./chatWebsite.attributes','define','util','api','moment'];(function(_0x342700,_0x569f75){var _0x53406f=function(_0x3b3c32){while(--_0x3b3c32){_0x342700['push'](_0x342700['shift']());}};_0x53406f(++_0x569f75);}(_0xd7ff,0x15c));var _0xfd7f=function(_0x3e634a,_0x290e38){_0x3e634a=_0x3e634a-0x0;var _0x72c28d=_0xd7ff[_0x3e634a];return _0x72c28d;};'use strict';var _=require('lodash');var util=require(_0xfd7f('0x0'));var logger=require('../../config/logger')(_0xfd7f('0x1'));var moment=require(_0xfd7f('0x2'));var BPromise=require('bluebird');var rp=require(_0xfd7f('0x3'));var fs=require('fs');var path=require(_0xfd7f('0x4'));var rimraf=require(_0xfd7f('0x5'));var config=require(_0xfd7f('0x6'));var attributes=require(_0xfd7f('0x7'));module['exports']=function(_0x48d854,_0x27fefe){return _0x48d854[_0xfd7f('0x8')]('ChatWebsite',attributes,{'tableName':'chat_websites','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xc4c4=['./chatWebsite.attributes','exports','define','ChatWebsite','chat_websites','lodash','util','../../config/logger','moment','bluebird','request-promise'];(function(_0x18a1ed,_0x5c34cd){var _0x2178d2=function(_0xeb9f75){while(--_0xeb9f75){_0x18a1ed['push'](_0x18a1ed['shift']());}};_0x2178d2(++_0x5c34cd);}(_0xc4c4,0xec));var _0x4c4c=function(_0xbeb808,_0x881ddf){_0xbeb808=_0xbeb808-0x0;var _0x5d6909=_0xc4c4[_0xbeb808];return _0x5d6909;};'use strict';var _=require(_0x4c4c('0x0'));var util=require(_0x4c4c('0x1'));var logger=require(_0x4c4c('0x2'))('api');var moment=require(_0x4c4c('0x3'));var BPromise=require(_0x4c4c('0x4'));var rp=require(_0x4c4c('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x4c4c('0x6'));module[_0x4c4c('0x7')]=function(_0x1b1012,_0x4ad8ef){return _0x1b1012[_0x4c4c('0x8')](_0x4c4c('0x9'),attributes,{'tableName':_0x4c4c('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index c7b0603..c7309c5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x587d=['../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','./chatWebsite.socket','register','request','then','info','ChatWebsite,\x20%s,\x20%s','request\x20sent','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils'];(function(_0x3f85c1,_0x567fb0){var _0x5ce2ca=function(_0x3a79cd){while(--_0x3a79cd){_0x3f85c1['push'](_0x3f85c1['shift']());}};_0x5ce2ca(++_0x567fb0);}(_0x587d,0xd9));var _0xd587=function(_0x4d8eb2,_0xd781bb){_0x4d8eb2=_0x4d8eb2-0x0;var _0x9aed9c=_0x587d[_0x4d8eb2];return _0x9aed9c;};'use strict';var _=require(_0xd587('0x0'));var util=require(_0xd587('0x1'));var moment=require(_0xd587('0x2'));var BPromise=require(_0xd587('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xd587('0x4'));var db=require(_0xd587('0x5'))['db'];var utils=require(_0xd587('0x6'));var logger=require(_0xd587('0x7'))('rpc');var config=require(_0xd587('0x8'));var jayson=require(_0xd587('0x9'));var client=jayson[_0xd587('0xa')][_0xd587('0xb')]({'port':0x232a});config[_0xd587('0xc')]=_[_0xd587('0xd')](config[_0xd587('0xc')],{'host':_0xd587('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xd587('0xc')]));require(_0xd587('0xf'))[_0xd587('0x10')](socket);function respondWithRpcPromise(_0xa51784,_0x534e55,_0x2d036c){return new BPromise(function(_0x3696d5,_0x282f79){return client[_0xd587('0x11')](_0xa51784,_0x2d036c)[_0xd587('0x12')](function(_0x2f6dd3){logger[_0xd587('0x13')](_0xd587('0x14'),_0x534e55,_0xd587('0x15'));logger['debug'](_0xd587('0x16'),_0x534e55,_0xd587('0x15'),JSON[_0xd587('0x17')](_0x2f6dd3));if(_0x2f6dd3['error']){if(_0x2f6dd3[_0xd587('0x18')][_0xd587('0x19')]===0x1f4){logger[_0xd587('0x18')]('ChatWebsite,\x20%s,\x20%s',_0x534e55,_0x2f6dd3[_0xd587('0x18')]['message']);return _0x282f79(_0x2f6dd3[_0xd587('0x18')][_0xd587('0x1a')]);}logger['error'](_0xd587('0x14'),_0x534e55,_0x2f6dd3[_0xd587('0x18')][_0xd587('0x1a')]);return _0x3696d5(_0x2f6dd3[_0xd587('0x18')][_0xd587('0x1a')]);}else{logger['info'](_0xd587('0x14'),_0x534e55,_0xd587('0x15'));_0x3696d5(_0x2f6dd3[_0xd587('0x1b')]['message']);}})['catch'](function(_0x117b46){logger['error'](_0xd587('0x14'),_0x534e55,_0x117b46);_0x282f79(_0x117b46);});});}
\ No newline at end of file
+var _0xc85c=['http','redis','defaults','localhost','socket.io-emitter','./chatWebsite.socket','register','request','then','info','ChatWebsite,\x20%s,\x20%s','request\x20sent','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','bluebird','../../mysqldb','../../config/logger','rpc','client'];(function(_0xfe3e7,_0x2e1251){var _0x5b1381=function(_0x131f57){while(--_0x131f57){_0xfe3e7['push'](_0xfe3e7['shift']());}};_0x5b1381(++_0x2e1251);}(_0xc85c,0x165));var _0xcc85=function(_0x1eb4e0,_0x4ebc2d){_0x1eb4e0=_0x1eb4e0-0x0;var _0x18ec21=_0xc85c[_0x1eb4e0];return _0x18ec21;};'use strict';var _=require(_0xcc85('0x0'));var util=require(_0xcc85('0x1'));var moment=require('moment');var BPromise=require(_0xcc85('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xcc85('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xcc85('0x4'))(_0xcc85('0x5'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xcc85('0x6')][_0xcc85('0x7')]({'port':0x232a});config[_0xcc85('0x8')]=_[_0xcc85('0x9')](config[_0xcc85('0x8')],{'host':_0xcc85('0xa'),'port':0x18eb});var socket=require(_0xcc85('0xb'))(new Redis(config['redis']));require(_0xcc85('0xc'))[_0xcc85('0xd')](socket);function respondWithRpcPromise(_0x59399d,_0x235b9e,_0x5d1787){return new BPromise(function(_0x47d961,_0x7398b6){return client[_0xcc85('0xe')](_0x59399d,_0x5d1787)[_0xcc85('0xf')](function(_0x6f5e7d){logger[_0xcc85('0x10')](_0xcc85('0x11'),_0x235b9e,_0xcc85('0x12'));logger['debug'](_0xcc85('0x13'),_0x235b9e,_0xcc85('0x12'),JSON[_0xcc85('0x14')](_0x6f5e7d));if(_0x6f5e7d[_0xcc85('0x15')]){if(_0x6f5e7d['error'][_0xcc85('0x16')]===0x1f4){logger[_0xcc85('0x15')](_0xcc85('0x11'),_0x235b9e,_0x6f5e7d[_0xcc85('0x15')][_0xcc85('0x17')]);return _0x7398b6(_0x6f5e7d[_0xcc85('0x15')][_0xcc85('0x17')]);}logger[_0xcc85('0x15')]('ChatWebsite,\x20%s,\x20%s',_0x235b9e,_0x6f5e7d['error']['message']);return _0x47d961(_0x6f5e7d[_0xcc85('0x15')][_0xcc85('0x17')]);}else{logger[_0xcc85('0x10')](_0xcc85('0x11'),_0x235b9e,_0xcc85('0x12'));_0x47d961(_0x6f5e7d[_0xcc85('0x18')][_0xcc85('0x17')]);}})[_0xcc85('0x19')](function(_0x4a1638){logger['error'](_0xcc85('0x11'),_0x235b9e,_0x4a1638);_0x7398b6(_0x4a1638);});});}
\ No newline at end of file
index add20ac..ee0202c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc457=['length','save','emit','removeListener','register'];(function(_0x57e094,_0x53ab92){var _0x1444b0=function(_0x12bf23){while(--_0x12bf23){_0x57e094['push'](_0x57e094['shift']());}};_0x1444b0(++_0x53ab92);}(_0xc457,0x15f));var _0x7c45=function(_0x4cdbb7,_0xe9aa65){_0x4cdbb7=_0x4cdbb7-0x0;var _0xca6d40=_0xc457[_0x4cdbb7];return _0xca6d40;};'use strict';var ChatWebsiteEvents=require('./chatWebsite.events');var events=[_0x7c45('0x0'),'remove','update'];function createListener(_0x555b71,_0x15cecc){return function(_0x4dd6b8){_0x15cecc[_0x7c45('0x1')](_0x555b71,_0x4dd6b8);};}function removeListener(_0x56324e,_0x2c4e34){return function(){ChatWebsiteEvents[_0x7c45('0x2')](_0x56324e,_0x2c4e34);};}exports[_0x7c45('0x3')]=function(_0x55df02){for(var _0xe2e5ae=0x0,_0x183278=events[_0x7c45('0x4')];_0xe2e5ae<_0x183278;_0xe2e5ae++){var _0x1178ba=events[_0xe2e5ae];var _0xd0f5a7=createListener('chatWebsite:'+_0x1178ba,_0x55df02);ChatWebsiteEvents['on'](_0x1178ba,_0xd0f5a7);}};
\ No newline at end of file
+var _0xb6b4=['update','removeListener','length','chatWebsite:','./chatWebsite.events','save','remove'];(function(_0x1e4d7e,_0x45e3ba){var _0x275eb3=function(_0x4c91e9){while(--_0x4c91e9){_0x1e4d7e['push'](_0x1e4d7e['shift']());}};_0x275eb3(++_0x45e3ba);}(_0xb6b4,0x9e));var _0x4b6b=function(_0x492e92,_0x3fae52){_0x492e92=_0x492e92-0x0;var _0x55975e=_0xb6b4[_0x492e92];return _0x55975e;};'use strict';var ChatWebsiteEvents=require(_0x4b6b('0x0'));var events=[_0x4b6b('0x1'),_0x4b6b('0x2'),_0x4b6b('0x3')];function createListener(_0x2af296,_0x2d1fbb){return function(_0x5de5bf){_0x2d1fbb['emit'](_0x2af296,_0x5de5bf);};}function removeListener(_0x1dbfb9,_0x22316a){return function(){ChatWebsiteEvents[_0x4b6b('0x4')](_0x1dbfb9,_0x22316a);};}exports['register']=function(_0x42c1a6){for(var _0x301556=0x0,_0x213e59=events[_0x4b6b('0x5')];_0x301556<_0x213e59;_0x301556++){var _0x28fd6a=events[_0x301556];var _0x365b60=createListener(_0x4b6b('0x6')+_0x28fd6a,_0x42c1a6);ChatWebsiteEvents['on'](_0x28fd6a,_0x365b60);}};
\ No newline at end of file
index cc563f8..069654c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb4e6=['localhost','exports','../../../utils/misc','url','URL','replace'];(function(_0x4dd666,_0x155533){var _0x42693b=function(_0x185471){while(--_0x185471){_0x4dd666['push'](_0x4dd666['shift']());}};_0x42693b(++_0x155533);}(_0xb4e6,0x1f4));var _0x6b4e=function(_0x531d15,_0x599af5){_0x531d15=_0x531d15-0x0;var _0x271a18=_0xb4e6[_0x531d15];return _0x271a18;};var escapeRegExp=require(_0x6b4e('0x0'))['escapeRegExp'];var URL=require(_0x6b4e('0x1'))[_0x6b4e('0x2')];function testWildcardValidity(_0x365912){let _0x25ffcb=!![];try{new URL(_0x365912[_0x6b4e('0x3')]('*',_0x6b4e('0x4')));}catch(_0x1929b8){_0x25ffcb=![];}return _0x25ffcb&&new RegExp(/(http(s)?):\/\/(\*|(((\*\.)+)?([a-zA-Z0-9\-_]+\.){0,}([a-zA-Z0-9\-_]+)))(:[\d]+)?\/?$/)['test'](_0x365912);}function testWebsiteWithWildcard(_0x40da90,_0x1edf06){let _0x1f67a2;const _0x49de51=escapeRegExp(_0x40da90)[_0x6b4e('0x3')]('\x5c*','([\x5cw]+)');try{new URL(_0x40da90['replace']('\x5c*',_0x6b4e('0x4')));_0x1f67a2=new RegExp(_0x49de51)['test'](_0x1edf06);}catch(_0x53a71f){_0x1f67a2=![];}return _0x1f67a2;}module[_0x6b4e('0x5')]={'testWebsiteWithWildcard':testWebsiteWithWildcard,'testWildcardValidity':testWildcardValidity};
\ No newline at end of file
+var _0x12fd=['localhost','test','([\x5cw]+)','exports','../../../utils/misc','escapeRegExp','url','URL','replace'];(function(_0x409fb8,_0x5ab3d3){var _0x278270=function(_0x58849c){while(--_0x58849c){_0x409fb8['push'](_0x409fb8['shift']());}};_0x278270(++_0x5ab3d3);}(_0x12fd,0x199));var _0xd12f=function(_0x5c53b8,_0x32169c){_0x5c53b8=_0x5c53b8-0x0;var _0x352de2=_0x12fd[_0x5c53b8];return _0x352de2;};var escapeRegExp=require(_0xd12f('0x0'))[_0xd12f('0x1')];var URL=require(_0xd12f('0x2'))[_0xd12f('0x3')];function testWildcardValidity(_0x18abfb){let _0x48fb45=!![];try{new URL(_0x18abfb[_0xd12f('0x4')]('*',_0xd12f('0x5')));}catch(_0x13efed){_0x48fb45=![];}return _0x48fb45&&new RegExp(/(http(s)?):\/\/(\*|(((\*\.)+)?([a-zA-Z0-9\-_]+\.){0,}([a-zA-Z0-9\-_]+)))(:[\d]+)?\/?$/)[_0xd12f('0x6')](_0x18abfb);}function testWebsiteWithWildcard(_0x79c5c9,_0x154c72){let _0x55bb7d;const _0x3f733d=escapeRegExp(_0x79c5c9)['replace']('\x5c*',_0xd12f('0x7'));try{new URL(_0x79c5c9[_0xd12f('0x4')]('\x5c*',_0xd12f('0x5')));_0x55bb7d=new RegExp(_0x3f733d)[_0xd12f('0x6')](_0x154c72);}catch(_0x504504){_0x55bb7d=![];}return _0x55bb7d;}module[_0xd12f('0x8')]={'testWebsiteWithWildcard':testWebsiteWithWildcard,'testWildcardValidity':testWildcardValidity};
\ No newline at end of file
index 3da4331..1c5cde5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbe43=['../../config/environment','./chatWebsite.controller','get','isAuthenticated','index','/describe','/:id','show','/:id/dispositions','getDispositions','/:id/canned_answers','/:id/logo','getLogo','/:id/avatar','/:id/customer_avatar','/:id/system_avatar','getSystemAvatar','getInteractions','/:id/applications','getApplications','/:id/proactive_actions','getProactiveActions','/:id/fields','getFields','/:id/offline_messages','getOfflineMessages','/:id/users','getAgents','post','create','addDisposition','addAnswer','diskStorage','join','root','format','now','originalname','single','file','addLogo','server/files/images/avatars/','%s-%s','addAvatar','addSystemAvatar','server/files','attachments','replace','extname','/:id/offline','any','offline','/:id/interactions','addAgents','put','update','delete','removeDispositions','removeAgents','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x2dbe16,_0x13655b){var _0x3eb827=function(_0x3b3c87){while(--_0x3b3c87){_0x2dbe16['push'](_0x2dbe16['shift']());}};_0x3eb827(++_0x13655b);}(_0xbe43,0x81));var _0x3be4=function(_0x372967,_0x25161b){_0x372967=_0x372967-0x0;var _0x210e66=_0xbe43[_0x372967];return _0x210e66;};'use strict';var multer=require(_0x3be4('0x0'));var util=require(_0x3be4('0x1'));var path=require(_0x3be4('0x2'));var timeout=require(_0x3be4('0x3'));var express=require(_0x3be4('0x4'));var router=express[_0x3be4('0x5')]();var fs_extra=require(_0x3be4('0x6'));var auth=require(_0x3be4('0x7'));var interaction=require(_0x3be4('0x8'));var config=require(_0x3be4('0x9'));var controller=require(_0x3be4('0xa'));router[_0x3be4('0xb')]('/',auth[_0x3be4('0xc')](),controller[_0x3be4('0xd')]);router[_0x3be4('0xb')](_0x3be4('0xe'),auth[_0x3be4('0xc')](),controller['describe']);router[_0x3be4('0xb')](_0x3be4('0xf'),auth[_0x3be4('0xc')](),controller[_0x3be4('0x10')]);router[_0x3be4('0xb')](_0x3be4('0x11'),auth[_0x3be4('0xc')](),controller[_0x3be4('0x12')]);router[_0x3be4('0xb')](_0x3be4('0x13'),auth[_0x3be4('0xc')](),controller['getAnswers']);router[_0x3be4('0xb')](_0x3be4('0x14'),controller[_0x3be4('0x15')]);router[_0x3be4('0xb')](_0x3be4('0x16'),controller['getAvatar']);router[_0x3be4('0xb')](_0x3be4('0x17'),controller['getCustomerAvatar']);router['get'](_0x3be4('0x18'),controller[_0x3be4('0x19')]);router[_0x3be4('0xb')]('/:id/interactions',auth[_0x3be4('0xc')](),controller[_0x3be4('0x1a')]);router[_0x3be4('0xb')]('/:id/snippet',controller['getSnippet']);router[_0x3be4('0xb')](_0x3be4('0x1b'),auth[_0x3be4('0xc')](),controller[_0x3be4('0x1c')]);router['get'](_0x3be4('0x1d'),auth[_0x3be4('0xc')](),controller[_0x3be4('0x1e')]);router[_0x3be4('0xb')](_0x3be4('0x1f'),controller[_0x3be4('0x20')]);router[_0x3be4('0xb')](_0x3be4('0x21'),auth[_0x3be4('0xc')](),controller[_0x3be4('0x22')]);router[_0x3be4('0xb')](_0x3be4('0x23'),auth[_0x3be4('0xc')](),controller[_0x3be4('0x24')]);router[_0x3be4('0x25')]('/',auth['isAuthenticated'](),controller[_0x3be4('0x26')]);router['post']('/:id/dispositions',auth['isAuthenticated'](),controller[_0x3be4('0x27')]);router[_0x3be4('0x25')](_0x3be4('0x13'),auth[_0x3be4('0xc')](),controller[_0x3be4('0x28')]);var upload=multer({'storage':multer[_0x3be4('0x29')]({'destination':function(_0x3bc1c3,_0x454ca2,_0x104f35){_0x104f35(null,path[_0x3be4('0x2a')](config[_0x3be4('0x2b')],'server/files/images/logos/'));},'filename':function(_0x504853,_0x2bad69,_0x2559e6){_0x2559e6(null,util[_0x3be4('0x2c')]('%s-%s',Date[_0x3be4('0x2d')](),_0x2bad69[_0x3be4('0x2e')]));}})});router[_0x3be4('0x25')]('/:id/logo',upload[_0x3be4('0x2f')](_0x3be4('0x30')),controller[_0x3be4('0x31')]);var upload=multer({'storage':multer[_0x3be4('0x29')]({'destination':function(_0x4bdf4c,_0x344784,_0x46cb65){_0x46cb65(null,path[_0x3be4('0x2a')](config['root'],_0x3be4('0x32')));},'filename':function(_0x4561de,_0x403852,_0x18b55d){_0x18b55d(null,util[_0x3be4('0x2c')](_0x3be4('0x33'),Date[_0x3be4('0x2d')](),_0x403852[_0x3be4('0x2e')]));}})});router[_0x3be4('0x25')](_0x3be4('0x16'),upload[_0x3be4('0x2f')](_0x3be4('0x30')),controller[_0x3be4('0x34')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x4d542d,_0xd36b0b,_0x3e6427){_0x3e6427(null,path[_0x3be4('0x2a')](config['root'],_0x3be4('0x32')));},'filename':function(_0x1b3d0e,_0x55bd44,_0x227111){_0x227111(null,util[_0x3be4('0x2c')](_0x3be4('0x33'),Date[_0x3be4('0x2d')](),_0x55bd44[_0x3be4('0x2e')]));}})});router[_0x3be4('0x25')](_0x3be4('0x17'),upload['single']('file'),controller['addCustomerAvatar']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x2127a9,_0x4972d2,_0xb06484){_0xb06484(null,path[_0x3be4('0x2a')](config['root'],_0x3be4('0x32')));},'filename':function(_0xd8839,_0x139229,_0x5882c6){_0x5882c6(null,util[_0x3be4('0x2c')](_0x3be4('0x33'),Date['now'](),_0x139229[_0x3be4('0x2e')]));}})});router['post'](_0x3be4('0x18'),upload['single']('file'),controller[_0x3be4('0x35')]);router[_0x3be4('0x25')]('/:id/notify',controller['notify']);const offlineUploadMulter=multer({'storage':multer['diskStorage']({'destination':function(_0x41e2da,_0x529f9d,_0x42837d){const _0x5acbfa=path[_0x3be4('0x2a')](config['root'],_0x3be4('0x36'),_0x3be4('0x37'),'offline-chat');fs_extra['ensureDir'](_0x5acbfa,function(){_0x42837d(null,_0x5acbfa);});},'filename':function(_0x201a0a,_0x3b1a1d,_0xaf2186){const _0x576656=_0x3b1a1d[_0x3be4('0x2e')][_0x3be4('0x38')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x8df178=path[_0x3be4('0x39')](_0x576656);const _0x18c17b=Date[_0x3be4('0x2d')]()+'-'+_0x576656['replace'](_0x8df178,'')+_0x8df178;_0xaf2186(null,_0x18c17b);}})});router[_0x3be4('0x25')](_0x3be4('0x3a'),offlineUploadMulter[_0x3be4('0x3b')](),controller[_0x3be4('0x3c')]);router[_0x3be4('0x25')](_0x3be4('0x3d'),auth[_0x3be4('0xc')](),controller['addInteraction']);router['post'](_0x3be4('0x1b'),auth['isAuthenticated'](),controller['addApplications']);router[_0x3be4('0x25')](_0x3be4('0x1d'),auth[_0x3be4('0xc')](),controller['addProactiveActions']);router['post']('/:id/users',auth[_0x3be4('0xc')](),controller[_0x3be4('0x3e')]);router[_0x3be4('0x3f')](_0x3be4('0xf'),auth[_0x3be4('0xc')](),controller[_0x3be4('0x40')]);router[_0x3be4('0x41')]('/:id',auth[_0x3be4('0xc')](),controller['destroy']);router[_0x3be4('0x41')](_0x3be4('0x11'),auth[_0x3be4('0xc')](),controller[_0x3be4('0x42')]);router[_0x3be4('0x41')]('/:id/canned_answers',auth[_0x3be4('0xc')](),controller['removeAnswers']);router[_0x3be4('0x41')]('/:id/users',auth['isAuthenticated'](),controller[_0x3be4('0x43')]);module[_0x3be4('0x44')]=router;
\ No newline at end of file
+var _0x3c7b=['get','isAuthenticated','index','/describe','describe','/:id','show','/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','getLogo','/:id/avatar','getAvatar','getCustomerAvatar','/:id/system_avatar','getSystemAvatar','getInteractions','/:id/snippet','getSnippet','/:id/applications','getApplications','getProactiveActions','/:id/fields','getFields','/:id/offline_messages','getOfflineMessages','/:id/users','post','create','addDisposition','diskStorage','join','root','server/files/images/logos/','format','%s-%s','now','originalname','/:id/logo','single','file','server/files/images/avatars/','addAvatar','/:id/customer_avatar','/:id/notify','notify','server/files','attachments','replace','extname','/:id/offline','any','offline','/:id/interactions','addApplications','/:id/proactive_actions','addAgents','put','delete','destroy','removeAnswers','removeAgents','exports','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x3d3842,_0x3965d6){var _0x580931=function(_0x1383bc){while(--_0x1383bc){_0x3d3842['push'](_0x3d3842['shift']());}};_0x580931(++_0x3965d6);}(_0x3c7b,0xd0));var _0xb3c7=function(_0xa6f525,_0x40e9ba){_0xa6f525=_0xa6f525-0x0;var _0x20c4b2=_0x3c7b[_0xa6f525];return _0x20c4b2;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xb3c7('0x0'));var timeout=require(_0xb3c7('0x1'));var express=require(_0xb3c7('0x2'));var router=express[_0xb3c7('0x3')]();var fs_extra=require(_0xb3c7('0x4'));var auth=require(_0xb3c7('0x5'));var interaction=require(_0xb3c7('0x6'));var config=require(_0xb3c7('0x7'));var controller=require('./chatWebsite.controller');router[_0xb3c7('0x8')]('/',auth[_0xb3c7('0x9')](),controller[_0xb3c7('0xa')]);router[_0xb3c7('0x8')](_0xb3c7('0xb'),auth[_0xb3c7('0x9')](),controller[_0xb3c7('0xc')]);router[_0xb3c7('0x8')](_0xb3c7('0xd'),auth['isAuthenticated'](),controller[_0xb3c7('0xe')]);router['get'](_0xb3c7('0xf'),auth[_0xb3c7('0x9')](),controller[_0xb3c7('0x10')]);router[_0xb3c7('0x8')](_0xb3c7('0x11'),auth[_0xb3c7('0x9')](),controller[_0xb3c7('0x12')]);router[_0xb3c7('0x8')]('/:id/logo',controller[_0xb3c7('0x13')]);router[_0xb3c7('0x8')](_0xb3c7('0x14'),controller[_0xb3c7('0x15')]);router[_0xb3c7('0x8')]('/:id/customer_avatar',controller[_0xb3c7('0x16')]);router[_0xb3c7('0x8')](_0xb3c7('0x17'),controller[_0xb3c7('0x18')]);router[_0xb3c7('0x8')]('/:id/interactions',auth[_0xb3c7('0x9')](),controller[_0xb3c7('0x19')]);router['get'](_0xb3c7('0x1a'),controller[_0xb3c7('0x1b')]);router[_0xb3c7('0x8')](_0xb3c7('0x1c'),auth['isAuthenticated'](),controller[_0xb3c7('0x1d')]);router[_0xb3c7('0x8')]('/:id/proactive_actions',auth[_0xb3c7('0x9')](),controller[_0xb3c7('0x1e')]);router[_0xb3c7('0x8')](_0xb3c7('0x1f'),controller[_0xb3c7('0x20')]);router['get'](_0xb3c7('0x21'),auth[_0xb3c7('0x9')](),controller[_0xb3c7('0x22')]);router['get'](_0xb3c7('0x23'),auth['isAuthenticated'](),controller['getAgents']);router[_0xb3c7('0x24')]('/',auth[_0xb3c7('0x9')](),controller[_0xb3c7('0x25')]);router[_0xb3c7('0x24')](_0xb3c7('0xf'),auth['isAuthenticated'](),controller[_0xb3c7('0x26')]);router['post'](_0xb3c7('0x11'),auth[_0xb3c7('0x9')](),controller['addAnswer']);var upload=multer({'storage':multer[_0xb3c7('0x27')]({'destination':function(_0xb51210,_0x29db9b,_0x36d564){_0x36d564(null,path[_0xb3c7('0x28')](config[_0xb3c7('0x29')],_0xb3c7('0x2a')));},'filename':function(_0x4b27fe,_0x2dbaff,_0x16a5f9){_0x16a5f9(null,util[_0xb3c7('0x2b')](_0xb3c7('0x2c'),Date[_0xb3c7('0x2d')](),_0x2dbaff[_0xb3c7('0x2e')]));}})});router[_0xb3c7('0x24')](_0xb3c7('0x2f'),upload[_0xb3c7('0x30')](_0xb3c7('0x31')),controller['addLogo']);var upload=multer({'storage':multer[_0xb3c7('0x27')]({'destination':function(_0x33bacb,_0x1c9b81,_0x4da529){_0x4da529(null,path[_0xb3c7('0x28')](config['root'],_0xb3c7('0x32')));},'filename':function(_0x3d8490,_0x50430b,_0x3c9688){_0x3c9688(null,util['format'](_0xb3c7('0x2c'),Date[_0xb3c7('0x2d')](),_0x50430b[_0xb3c7('0x2e')]));}})});router[_0xb3c7('0x24')](_0xb3c7('0x14'),upload[_0xb3c7('0x30')](_0xb3c7('0x31')),controller[_0xb3c7('0x33')]);var upload=multer({'storage':multer[_0xb3c7('0x27')]({'destination':function(_0x151d76,_0x5af330,_0x140c37){_0x140c37(null,path[_0xb3c7('0x28')](config['root'],'server/files/images/avatars/'));},'filename':function(_0x1dd1fd,_0x4deb02,_0x553525){_0x553525(null,util[_0xb3c7('0x2b')](_0xb3c7('0x2c'),Date[_0xb3c7('0x2d')](),_0x4deb02[_0xb3c7('0x2e')]));}})});router[_0xb3c7('0x24')](_0xb3c7('0x34'),upload['single']('file'),controller['addCustomerAvatar']);var upload=multer({'storage':multer[_0xb3c7('0x27')]({'destination':function(_0x4118f0,_0x186a85,_0x221dd6){_0x221dd6(null,path[_0xb3c7('0x28')](config['root'],_0xb3c7('0x32')));},'filename':function(_0x202f0e,_0x38324c,_0x374215){_0x374215(null,util[_0xb3c7('0x2b')]('%s-%s',Date[_0xb3c7('0x2d')](),_0x38324c['originalname']));}})});router[_0xb3c7('0x24')](_0xb3c7('0x17'),upload['single'](_0xb3c7('0x31')),controller['addSystemAvatar']);router['post'](_0xb3c7('0x35'),controller[_0xb3c7('0x36')]);const offlineUploadMulter=multer({'storage':multer[_0xb3c7('0x27')]({'destination':function(_0x2e8c5e,_0x43b426,_0x318ce8){const _0x20d29e=path[_0xb3c7('0x28')](config[_0xb3c7('0x29')],_0xb3c7('0x37'),_0xb3c7('0x38'),'offline-chat');fs_extra['ensureDir'](_0x20d29e,function(){_0x318ce8(null,_0x20d29e);});},'filename':function(_0x561ebd,_0x181a2a,_0x15c382){const _0x1dbd27=_0x181a2a[_0xb3c7('0x2e')][_0xb3c7('0x39')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x1cc9d9=path[_0xb3c7('0x3a')](_0x1dbd27);const _0x5639f7=Date['now']()+'-'+_0x1dbd27[_0xb3c7('0x39')](_0x1cc9d9,'')+_0x1cc9d9;_0x15c382(null,_0x5639f7);}})});router['post'](_0xb3c7('0x3b'),offlineUploadMulter[_0xb3c7('0x3c')](),controller[_0xb3c7('0x3d')]);router['post'](_0xb3c7('0x3e'),auth[_0xb3c7('0x9')](),controller['addInteraction']);router[_0xb3c7('0x24')]('/:id/applications',auth['isAuthenticated'](),controller[_0xb3c7('0x3f')]);router[_0xb3c7('0x24')](_0xb3c7('0x40'),auth[_0xb3c7('0x9')](),controller['addProactiveActions']);router[_0xb3c7('0x24')]('/:id/users',auth[_0xb3c7('0x9')](),controller[_0xb3c7('0x41')]);router[_0xb3c7('0x42')](_0xb3c7('0xd'),auth[_0xb3c7('0x9')](),controller['update']);router[_0xb3c7('0x43')]('/:id',auth[_0xb3c7('0x9')](),controller[_0xb3c7('0x44')]);router['delete'](_0xb3c7('0xf'),auth['isAuthenticated'](),controller['removeDispositions']);router['delete']('/:id/canned_answers',auth['isAuthenticated'](),controller[_0xb3c7('0x45')]);router[_0xb3c7('0x43')]('/:id/users',auth[_0xb3c7('0x9')](),controller[_0xb3c7('0x46')]);module[_0xb3c7('0x47')]=router;
\ No newline at end of file
index fc641e5..db3aff0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a3d=['exports','express','../components/auth/service','production','get','client-side-logger','Client-Side\x20logger\x20not\x20found!','/client-logs'];(function(_0x4815f1,_0x328b76){var _0x365f5a=function(_0x50c9f5){while(--_0x50c9f5){_0x4815f1['push'](_0x4815f1['shift']());}};_0x365f5a(++_0x328b76);}(_0x7a3d,0x109));var _0xd7a3=function(_0xb94114,_0x46b145){_0xb94114=_0xb94114-0x0;var _0x3ee471=_0x7a3d[_0xb94114];return _0x3ee471;};var beaverLogger=require('beaver-logger/server');var express=require(_0xd7a3('0x0'));var auth=require(_0xd7a3('0x1'));var config=require('../config/environment');var router=express['Router']();var isProduction=config['env']===_0xd7a3('0x2')||![];function clientSideLogs(_0x3a984b,_0x41688a,_0x5b8eef){var _0x4fa5c4=_0x3a984b['app'][_0xd7a3('0x3')](_0xd7a3('0x4'));if(!_0x4fa5c4){throw new Error(_0xd7a3('0x5'));}return beaverLogger['expressEndpoint']({'uri':_0xd7a3('0x6'),'logger':_0x4fa5c4,'enableCors':!isProduction})(_0x3a984b,_0x41688a,_0x5b8eef);}router['use'](auth['isAuthenticated'](),clientSideLogs);module[_0xd7a3('0x7')]=router;
\ No newline at end of file
+var _0x6b30=['get','client-side-logger','use','exports','express','../components/auth/service','../config/environment','Router','env','production','app'];(function(_0x100fb4,_0x3c05cc){var _0x213330=function(_0x5c70ae){while(--_0x5c70ae){_0x100fb4['push'](_0x100fb4['shift']());}};_0x213330(++_0x3c05cc);}(_0x6b30,0x185));var _0x06b3=function(_0x317d61,_0x5e6335){_0x317d61=_0x317d61-0x0;var _0x3abc20=_0x6b30[_0x317d61];return _0x3abc20;};var beaverLogger=require('beaver-logger/server');var express=require(_0x06b3('0x0'));var auth=require(_0x06b3('0x1'));var config=require(_0x06b3('0x2'));var router=express[_0x06b3('0x3')]();var isProduction=config[_0x06b3('0x4')]===_0x06b3('0x5')||![];function clientSideLogs(_0x69fdcc,_0xd850ad,_0x434a85){var _0x361712=_0x69fdcc[_0x06b3('0x6')][_0x06b3('0x7')](_0x06b3('0x8'));if(!_0x361712){throw new Error('Client-Side\x20logger\x20not\x20found!');}return beaverLogger['expressEndpoint']({'uri':'/client-logs','logger':_0x361712,'enableCors':!isProduction})(_0x69fdcc,_0xd850ad,_0x434a85);}router[_0x06b3('0x9')](auth['isAuthenticated'](),clientSideLogs);module[_0x06b3('0xa')]=router;
\ No newline at end of file
index 22384ac..1e87c70 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x999f=['STRING','ENUM','MicrosoftAzure','Outlook365','Dynamics365','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(_0x57d370,_0x3ed0f6){var _0x550fd2=function(_0x59634f){while(--_0x59634f){_0x57d370['push'](_0x57d370['shift']());}};_0x550fd2(++_0x3ed0f6);}(_0x999f,0xd7));var _0xf999=function(_0x1c2051,_0x4cb6b9){_0x1c2051=_0x1c2051-0x0;var _0x2b58a0=_0x999f[_0x1c2051];return _0x2b58a0;};'use strict';var Sequelize=require('sequelize');module[_0xf999('0x0')]={'name':{'type':Sequelize[_0xf999('0x1')],'allowNull':![],'validate':{'notEmpty':!![]}},'service':{'type':Sequelize[_0xf999('0x2')]('AmazonAWS','Google',_0xf999('0x3')),'allowNull':![],'validate':{'notEmpty':!![]}},'type':{'type':Sequelize[_0xf999('0x2')](_0xf999('0x4'),_0xf999('0x5'))},'data1':{'type':Sequelize[_0xf999('0x1')],'comment':'MicrosoftAzure\x20=>\x20client_id'},'data2':{'type':Sequelize[_0xf999('0x1')],'comment':'MicrosoftAzure\x20=>\x20tenant'},'data3':{'type':Sequelize[_0xf999('0x1')],'comment':_0xf999('0x6')},'data4':{'type':Sequelize['STRING'],'comment':_0xf999('0x7')},'data5':{'type':Sequelize[_0xf999('0x8')],'comment':_0xf999('0x9')},'data6':{'type':Sequelize[_0xf999('0x8')],'comment':_0xf999('0xa')},'data7':{'type':Sequelize[_0xf999('0x8')],'comment':_0xf999('0xb')}};
\ No newline at end of file
+var _0x33a4=['MicrosoftAzure\x20=>\x20client_secret','MicrosoftAzure\x20=>\x20redirect_uri','TEXT','MicrosoftAzure\x20=>\x20access_token','MicrosoftAzure\x20=>\x20refresh_token','sequelize','exports','STRING','AmazonAWS','Google','MicrosoftAzure','ENUM','Outlook365','MicrosoftAzure\x20=>\x20client_id','MicrosoftAzure\x20=>\x20tenant'];(function(_0x3f3e0b,_0x548752){var _0x586fd0=function(_0x3cfcd1){while(--_0x3cfcd1){_0x3f3e0b['push'](_0x3f3e0b['shift']());}};_0x586fd0(++_0x548752);}(_0x33a4,0x122));var _0x433a=function(_0x3c3c9c,_0x2006e4){_0x3c3c9c=_0x3c3c9c-0x0;var _0x430ef5=_0x33a4[_0x3c3c9c];return _0x430ef5;};'use strict';var Sequelize=require(_0x433a('0x0'));module[_0x433a('0x1')]={'name':{'type':Sequelize[_0x433a('0x2')],'allowNull':![],'validate':{'notEmpty':!![]}},'service':{'type':Sequelize['ENUM'](_0x433a('0x3'),_0x433a('0x4'),_0x433a('0x5')),'allowNull':![],'validate':{'notEmpty':!![]}},'type':{'type':Sequelize[_0x433a('0x6')](_0x433a('0x7'),'Dynamics365')},'data1':{'type':Sequelize[_0x433a('0x2')],'comment':_0x433a('0x8')},'data2':{'type':Sequelize['STRING'],'comment':_0x433a('0x9')},'data3':{'type':Sequelize[_0x433a('0x2')],'comment':_0x433a('0xa')},'data4':{'type':Sequelize['STRING'],'comment':_0x433a('0xb')},'data5':{'type':Sequelize[_0x433a('0xc')],'comment':_0x433a('0xd')},'data6':{'type':Sequelize[_0x433a('0xc')],'comment':_0x433a('0xe')},'data7':{'type':Sequelize['TEXT'],'comment':'MicrosoftAzure\x20=>\x20Dynamics365\x20=>\x20remote_uri'}};
\ No newline at end of file
index 7e4fe0e..ac23f60 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbfe7=['catch','fields','includeAll','find','MicrosoftAzure','body','Service\x20parameter\x20not\x20specified','values','includes','Invalid\x20service\x20parameter.\x20Allowed\x20values:\x20','join','encryptString','create','params','findOne','user','oauth2MicrosoftCallback','state','Invalid\x20state\x20parameter','parse','from','base64','ascii','isValidIdToken','id_token','oauth2Claims','del','getOauth2MicrosoftAccessToken','code','data5','access_token','data6','refresh_token','startRefreshInterval','emit','microsoftAuthorization:success','microsoftAuthorization:error','Invalid\x20authentication\x20state\x20parameter','send','stringify','lodash','../../components/encryptor','../../config/environment','../../config/logger','api','../../mysqldb','./cloudProvider.oauth','redis','defaults','localhost','socket.io-emitter','sendStatus','end','status','json','undefined','limit','offset','count','set','Content-Range','update','then','destroy','error','name','padEnd','slice','index','map','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','length','order','sort','where','pick','filter','merge','VIRTUAL','options','CloudProvider','include','findAll','rows','service','decryptString','data3'];(function(_0xce7fcd,_0x560c8b){var _0x16883b=function(_0x29f9e2){while(--_0x29f9e2){_0xce7fcd['push'](_0xce7fcd['shift']());}};_0x16883b(++_0x560c8b);}(_0xbfe7,0x145));var _0x7bfe=function(_0x317ca7,_0xc62608){_0x317ca7=_0x317ca7-0x0;var _0x11f789=_0xbfe7[_0x317ca7];return _0x11f789;};'use strict';var _=require(_0x7bfe('0x0'));var Redis=require('ioredis');var qs=require('../../components/parsers/qs');var encryptor=require(_0x7bfe('0x1'));var config=require(_0x7bfe('0x2'));var logger=require(_0x7bfe('0x3'))(_0x7bfe('0x4'));var db=require(_0x7bfe('0x5'))['db'];var oauth=require(_0x7bfe('0x6'));config[_0x7bfe('0x7')]=_[_0x7bfe('0x8')](config[_0x7bfe('0x7')],{'host':_0x7bfe('0x9'),'port':0x18eb});var socket=require(_0x7bfe('0xa'))(new Redis(config[_0x7bfe('0x7')]));var redis=new Redis(config[_0x7bfe('0x7')]);function respondWithStatusCode(_0x10c4ee,_0x4529f4){_0x4529f4=_0x4529f4||0xcc;return function(_0x4829b0){if(_0x4829b0){return _0x10c4ee[_0x7bfe('0xb')](_0x4529f4);}return _0x10c4ee['status'](_0x4529f4)[_0x7bfe('0xc')]();};}function respondWithResult(_0x3506a0,_0x4fb3a){_0x4fb3a=_0x4fb3a||0xc8;return function(_0x1bc15c){if(_0x1bc15c){return _0x3506a0[_0x7bfe('0xd')](_0x4fb3a)[_0x7bfe('0xe')](_0x1bc15c);}};}function respondWithFilteredResult(_0x1c6659,_0x48d610){return function(_0x378679){if(_0x378679){var _0x1307fe=typeof _0x48d610['offset']===_0x7bfe('0xf')&&typeof _0x48d610[_0x7bfe('0x10')]===_0x7bfe('0xf');var _0x23fcef=_0x378679['count'];var _0x2ea04d=_0x1307fe?0x0:_0x48d610[_0x7bfe('0x11')];var _0x396eeb=_0x1307fe?_0x378679[_0x7bfe('0x12')]:_0x48d610['offset']+_0x48d610[_0x7bfe('0x10')];var _0x2915b1;if(_0x396eeb>=_0x23fcef){_0x396eeb=_0x23fcef;_0x2915b1=0xc8;}else{_0x2915b1=0xce;}_0x1c6659['status'](_0x2915b1);return _0x1c6659[_0x7bfe('0x13')](_0x7bfe('0x14'),_0x2ea04d+'-'+_0x396eeb+'/'+_0x23fcef)['json'](_0x378679);}return null;};}function saveUpdates(_0x208ebf){return function(_0x4922fd){if(_0x4922fd){return _0x4922fd[_0x7bfe('0x15')](_0x208ebf)[_0x7bfe('0x16')](function(_0x54119f){return _0x54119f;});}return null;};}function removeEntity(_0x55d4b7){return function(_0x51b3db){if(_0x51b3db){return _0x51b3db[_0x7bfe('0x17')]()[_0x7bfe('0x16')](function(){_0x55d4b7[_0x7bfe('0xd')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3f1822){return function(_0x39212b){if(!_0x39212b){_0x3f1822[_0x7bfe('0xb')](0x194);}return _0x39212b;};}function handleError(_0x5e0ed7,_0x20fb76){_0x20fb76=_0x20fb76||0x1f4;return function(_0x10fd95){logger[_0x7bfe('0x18')](_0x10fd95['stack']);if(_0x10fd95[_0x7bfe('0x19')]){delete _0x10fd95[_0x7bfe('0x19')];}_0x5e0ed7[_0x7bfe('0xd')](_0x20fb76)['send'](_0x10fd95);};}function maskClientSecret(_0x559bc3){return _[_0x7bfe('0x1a')](_0x559bc3[_0x7bfe('0x1b')](0x0,0x3),0x14,'*');}exports[_0x7bfe('0x1c')]=function(_0x53573a,_0x337971){var _0x1dc672={},_0x573779={},_0x381065={'count':0x0,'rows':[]};var _0x525151=_[_0x7bfe('0x1d')](db['CloudProvider'][_0x7bfe('0x1e')],function(_0x5ed7a0){return{'name':_0x5ed7a0['fieldName'],'type':_0x5ed7a0[_0x7bfe('0x1f')][_0x7bfe('0x20')]};});_0x573779[_0x7bfe('0x21')]=_['map'](_0x525151,'name');_0x573779[_0x7bfe('0x22')]=_[_0x7bfe('0x23')](_0x53573a[_0x7bfe('0x22')]);_0x573779[_0x7bfe('0x24')]=_[_0x7bfe('0x25')](_0x573779[_0x7bfe('0x21')],_0x573779[_0x7bfe('0x22')]);_0x1dc672['attributes']=_['intersection'](_0x573779[_0x7bfe('0x21')],qs['fields'](_0x53573a[_0x7bfe('0x22')]['fields']));_0x1dc672[_0x7bfe('0x26')]=_0x1dc672[_0x7bfe('0x26')][_0x7bfe('0x27')]?_0x1dc672['attributes']:_0x573779[_0x7bfe('0x21')];if(!_0x53573a[_0x7bfe('0x22')]['hasOwnProperty']('nolimit')){_0x1dc672[_0x7bfe('0x10')]=qs[_0x7bfe('0x10')](_0x53573a[_0x7bfe('0x22')]['limit']);_0x1dc672[_0x7bfe('0x11')]=qs[_0x7bfe('0x11')](_0x53573a[_0x7bfe('0x22')][_0x7bfe('0x11')]);}_0x1dc672[_0x7bfe('0x28')]=qs['sort'](_0x53573a['query'][_0x7bfe('0x29')]);_0x1dc672[_0x7bfe('0x2a')]=qs[_0x7bfe('0x24')](_[_0x7bfe('0x2b')](_0x53573a[_0x7bfe('0x22')],_0x573779[_0x7bfe('0x24')]),_0x525151);if(_0x53573a['query'][_0x7bfe('0x2c')]){_0x1dc672[_0x7bfe('0x2a')]=_[_0x7bfe('0x2d')](_0x1dc672[_0x7bfe('0x2a')],{'$or':_['map'](_0x525151,function(_0x54ff7e){if(_0x54ff7e[_0x7bfe('0x1f')]!==_0x7bfe('0x2e')){var _0x4ea693={};_0x4ea693[_0x54ff7e['name']]={'$like':'%'+_0x53573a[_0x7bfe('0x22')][_0x7bfe('0x2c')]+'%'};return _0x4ea693;}})});}_0x1dc672=_[_0x7bfe('0x2d')]({},_0x1dc672,_0x53573a[_0x7bfe('0x2f')]);var _0x3474ac={'where':_0x1dc672['where']};return db[_0x7bfe('0x30')][_0x7bfe('0x12')](_0x3474ac)[_0x7bfe('0x16')](function(_0xe9d234){_0x381065[_0x7bfe('0x12')]=_0xe9d234;if(_0x53573a[_0x7bfe('0x22')]['includeAll']){_0x1dc672[_0x7bfe('0x31')]=[{'all':!![]}];}return db[_0x7bfe('0x30')][_0x7bfe('0x32')](_0x1dc672);})['then'](function(_0x4ffc1c){_0x381065[_0x7bfe('0x33')]=_[_0x7bfe('0x1d')](_0x4ffc1c,function(_0x3c74cb){if(_0x3c74cb[_0x7bfe('0x34')]==='MicrosoftAzure'){var _0x14b1ef=encryptor[_0x7bfe('0x35')](_0x3c74cb[_0x7bfe('0x36')]);_0x3c74cb['data3']=maskClientSecret(_0x14b1ef);}return _0x3c74cb;});return _0x381065;})[_0x7bfe('0x16')](respondWithFilteredResult(_0x337971,_0x1dc672))[_0x7bfe('0x37')](handleError(_0x337971,null));};exports['show']=function(_0xbacc3b,_0x285d20){var _0x5b78a7={'raw':!![],'where':{'id':_0xbacc3b['params']['id']}},_0x39c0ac={};_0x39c0ac[_0x7bfe('0x21')]=_[_0x7bfe('0x23')](db['CloudProvider'][_0x7bfe('0x1e')]);_0x39c0ac[_0x7bfe('0x22')]=_[_0x7bfe('0x23')](_0xbacc3b[_0x7bfe('0x22')]);_0x39c0ac[_0x7bfe('0x24')]=_[_0x7bfe('0x25')](_0x39c0ac['model'],_0x39c0ac[_0x7bfe('0x22')]);_0x5b78a7['attributes']=_[_0x7bfe('0x25')](_0x39c0ac['model'],qs['fields'](_0xbacc3b[_0x7bfe('0x22')][_0x7bfe('0x38')]));_0x5b78a7[_0x7bfe('0x26')]=_0x5b78a7[_0x7bfe('0x26')]['length']?_0x5b78a7['attributes']:_0x39c0ac[_0x7bfe('0x21')];if(_0xbacc3b[_0x7bfe('0x22')][_0x7bfe('0x39')]){_0x5b78a7[_0x7bfe('0x31')]=[{'all':!![]}];}_0x5b78a7=_['merge']({},_0x5b78a7,_0xbacc3b['options']);return db[_0x7bfe('0x30')][_0x7bfe('0x3a')](_0x5b78a7)['then'](handleEntityNotFound(_0x285d20,null))[_0x7bfe('0x16')](function(_0x2aa27c){if(_0x2aa27c[_0x7bfe('0x34')]===_0x7bfe('0x3b')){var _0x44a5a1=encryptor['decryptString'](_0x2aa27c['data3']);_0x2aa27c['data3']=maskClientSecret(_0x44a5a1);}return _0x2aa27c;})[_0x7bfe('0x16')](respondWithResult(_0x285d20,null))['catch'](handleError(_0x285d20,null));};exports['create']=function(_0x25dacb,_0x341943){if(!_0x25dacb['body'][_0x7bfe('0x19')])throw new Error('Name\x20parameter\x20not\x20specified');if(!_0x25dacb[_0x7bfe('0x3c')][_0x7bfe('0x34')])throw new Error(_0x7bfe('0x3d'));var _0x21a460=db[_0x7bfe('0x30')][_0x7bfe('0x1e')][_0x7bfe('0x34')][_0x7bfe('0x3e')];if(!_0x21a460[_0x7bfe('0x3f')](_0x25dacb['body'][_0x7bfe('0x34')]))throw new Error(_0x7bfe('0x40')+_0x21a460[_0x7bfe('0x41')](',\x20'));if(_0x25dacb[_0x7bfe('0x3c')]['service']===_0x7bfe('0x3b')&&_0x25dacb[_0x7bfe('0x3c')][_0x7bfe('0x36')]){_0x25dacb['body'][_0x7bfe('0x36')]=encryptor[_0x7bfe('0x42')](_0x25dacb['body'][_0x7bfe('0x36')]);}return db['CloudProvider'][_0x7bfe('0x43')](_0x25dacb[_0x7bfe('0x3c')],{})[_0x7bfe('0x16')](respondWithResult(_0x341943,0xc9))['catch'](handleError(_0x341943,null));};exports[_0x7bfe('0x15')]=function(_0x46d130,_0x11de03){if(_0x46d130[_0x7bfe('0x3c')]['id']){delete _0x46d130[_0x7bfe('0x3c')]['id'];}return db[_0x7bfe('0x30')][_0x7bfe('0x3a')]({'where':{'id':_0x46d130[_0x7bfe('0x44')]['id']}})[_0x7bfe('0x16')](handleEntityNotFound(_0x11de03,null))[_0x7bfe('0x16')](function(_0x1f5019){if(_0x1f5019['service']===_0x7bfe('0x3b')&&_0x46d130[_0x7bfe('0x3c')][_0x7bfe('0x36')]){_0x46d130[_0x7bfe('0x3c')]['data3']=encryptor[_0x7bfe('0x42')](_0x46d130[_0x7bfe('0x3c')][_0x7bfe('0x36')]);}return _0x1f5019;})[_0x7bfe('0x16')](saveUpdates(_0x46d130[_0x7bfe('0x3c')],null))['then'](respondWithResult(_0x11de03,null))[_0x7bfe('0x37')](handleError(_0x11de03,null));};exports[_0x7bfe('0x17')]=function(_0x476b55,_0x562f5f){return db[_0x7bfe('0x30')][_0x7bfe('0x3a')]({'where':{'id':_0x476b55[_0x7bfe('0x44')]['id']}})[_0x7bfe('0x16')](handleEntityNotFound(_0x562f5f,null))[_0x7bfe('0x16')](removeEntity(_0x562f5f,null))[_0x7bfe('0x37')](handleError(_0x562f5f,null));};exports['oauth2MicrosoftAuthorize']=function(_0x4d83da,_0x539b09){return db[_0x7bfe('0x30')][_0x7bfe('0x45')]({'where':{'id':_0x4d83da['params']['id']},'raw':!![]})['then'](function(_0x48813d){if(!_0x48813d)return _0x539b09[_0x7bfe('0xb')](0x194);return{'url':oauth['generateMicrosoftAuthorizationUrl'](_0x48813d,_0x4d83da[_0x7bfe('0x46')]['id'])};})[_0x7bfe('0x16')](respondWithResult(_0x539b09,null))['catch'](handleError(_0x539b09,null));};exports[_0x7bfe('0x47')]=function(_0x3f03da,_0x4b2b33){var _0x25b1b5=_0x3f03da[_0x7bfe('0x3c')];var _0x5c644a;var _0x2ca779;if(_0x25b1b5['error'])throw _0x25b1b5;redis['get'](_0x25b1b5[_0x7bfe('0x48')])[_0x7bfe('0x16')](function(_0x287161){if(!_0x287161)throw new Error(_0x7bfe('0x49'));_0x5c644a=JSON[_0x7bfe('0x4a')](_0x287161);var _0x3925fe=Buffer[_0x7bfe('0x4b')](_0x25b1b5['state'],_0x7bfe('0x4c'))['toString'](_0x7bfe('0x4d'));_0x2ca779=JSON[_0x7bfe('0x4a')](_0x3925fe);if(!oauth[_0x7bfe('0x4e')](_0x25b1b5[_0x7bfe('0x4f')],_0x5c644a[_0x7bfe('0x50')]))throw new Error('Unable\x20to\x20validate\x20id_token');redis[_0x7bfe('0x51')](_0x25b1b5[_0x7bfe('0x48')]);return oauth[_0x7bfe('0x52')](_0x25b1b5[_0x7bfe('0x53')],_0x5c644a);})[_0x7bfe('0x16')](function(_0x2e5c46){_0x5c644a[_0x7bfe('0x54')]=_0x2e5c46[_0x7bfe('0x55')];_0x5c644a[_0x7bfe('0x56')]=_0x2e5c46[_0x7bfe('0x57')];return db[_0x7bfe('0x30')]['update']({'data5':_0x5c644a['data5'],'data6':_0x5c644a[_0x7bfe('0x56')]},{'where':{'id':_0x5c644a['id']}});})[_0x7bfe('0x16')](function(){oauth[_0x7bfe('0x58')](_0x5c644a);socket[_0x7bfe('0x59')](_0x7bfe('0x5a'),{'id':_0x2ca779['id']});return;})[_0x7bfe('0x16')](respondWithStatusCode(_0x4b2b33,null))[_0x7bfe('0x37')](function(_0x31419c){if(_0x2ca779){socket[_0x7bfe('0x59')](_0x7bfe('0x5b'),{'id':_0x2ca779['id']});}if(!_0x5c644a){logger[_0x7bfe('0x18')](_0x7bfe('0x5c'),_0x31419c);return _0x4b2b33['status'](0x1f4)[_0x7bfe('0x5d')](_0x31419c['message']);}logger[_0x7bfe('0x18')]('Authentication\x20failed\x20for\x20cloud\x20provider\x20#%s,\x20err:%s',_0x5c644a['id'],JSON[_0x7bfe('0x5e')](_0x31419c));});};
\ No newline at end of file
+var _0x85fc=['sort','where','filters','filter','merge','options','then','includeAll','rows','service','MicrosoftAzure','decryptString','data3','catch','show','params','include','create','body','Name\x20parameter\x20not\x20specified','includes','Invalid\x20service\x20parameter.\x20Allowed\x20values:\x20','join','encryptString','find','findOne','generateMicrosoftAuthorizationUrl','user','oauth2MicrosoftCallback','get','state','Invalid\x20state\x20parameter','base64','toString','ascii','parse','isValidIdToken','id_token','oauth2Claims','Unable\x20to\x20validate\x20id_token','del','getOauth2MicrosoftAccessToken','access_token','data5','startRefreshInterval','emit','microsoftAuthorization:success','microsoftAuthorization:error','Invalid\x20authentication\x20state\x20parameter','message','stringify','lodash','../../components/parsers/qs','../../components/encryptor','../../config/environment','../../config/logger','api','./cloudProvider.oauth','defaults','redis','socket.io-emitter','sendStatus','status','end','json','offset','limit','undefined','count','set','Content-Range','update','destroy','error','stack','name','send','padEnd','index','map','CloudProvider','rawAttributes','fieldName','type','model','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','order'];(function(_0x3c7dbe,_0x4165f5){var _0x35c777=function(_0x3b36fe){while(--_0x3b36fe){_0x3c7dbe['push'](_0x3c7dbe['shift']());}};_0x35c777(++_0x4165f5);}(_0x85fc,0xed));var _0xc85f=function(_0x15ca22,_0x3b1f91){_0x15ca22=_0x15ca22-0x0;var _0x509a9e=_0x85fc[_0x15ca22];return _0x509a9e;};'use strict';var _=require(_0xc85f('0x0'));var Redis=require('ioredis');var qs=require(_0xc85f('0x1'));var encryptor=require(_0xc85f('0x2'));var config=require(_0xc85f('0x3'));var logger=require(_0xc85f('0x4'))(_0xc85f('0x5'));var db=require('../../mysqldb')['db'];var oauth=require(_0xc85f('0x6'));config['redis']=_[_0xc85f('0x7')](config[_0xc85f('0x8')],{'host':'localhost','port':0x18eb});var socket=require(_0xc85f('0x9'))(new Redis(config[_0xc85f('0x8')]));var redis=new Redis(config[_0xc85f('0x8')]);function respondWithStatusCode(_0x1bc18a,_0x38ac10){_0x38ac10=_0x38ac10||0xcc;return function(_0x3922d4){if(_0x3922d4){return _0x1bc18a[_0xc85f('0xa')](_0x38ac10);}return _0x1bc18a[_0xc85f('0xb')](_0x38ac10)[_0xc85f('0xc')]();};}function respondWithResult(_0x30f438,_0x4f1f97){_0x4f1f97=_0x4f1f97||0xc8;return function(_0x214fd1){if(_0x214fd1){return _0x30f438[_0xc85f('0xb')](_0x4f1f97)[_0xc85f('0xd')](_0x214fd1);}};}function respondWithFilteredResult(_0x29999e,_0x555b9e){return function(_0x1ba2c5){if(_0x1ba2c5){var _0x324797=typeof _0x555b9e[_0xc85f('0xe')]==='undefined'&&typeof _0x555b9e[_0xc85f('0xf')]===_0xc85f('0x10');var _0x23b7d7=_0x1ba2c5[_0xc85f('0x11')];var _0x1e275f=_0x324797?0x0:_0x555b9e[_0xc85f('0xe')];var _0x424ba6=_0x324797?_0x1ba2c5[_0xc85f('0x11')]:_0x555b9e[_0xc85f('0xe')]+_0x555b9e[_0xc85f('0xf')];var _0x2c180f;if(_0x424ba6>=_0x23b7d7){_0x424ba6=_0x23b7d7;_0x2c180f=0xc8;}else{_0x2c180f=0xce;}_0x29999e[_0xc85f('0xb')](_0x2c180f);return _0x29999e[_0xc85f('0x12')](_0xc85f('0x13'),_0x1e275f+'-'+_0x424ba6+'/'+_0x23b7d7)[_0xc85f('0xd')](_0x1ba2c5);}return null;};}function saveUpdates(_0x48eea6){return function(_0x39a2d4){if(_0x39a2d4){return _0x39a2d4[_0xc85f('0x14')](_0x48eea6)['then'](function(_0x5b43e1){return _0x5b43e1;});}return null;};}function removeEntity(_0x58676b){return function(_0x538d70){if(_0x538d70){return _0x538d70[_0xc85f('0x15')]()['then'](function(){_0x58676b['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x2fb8b0){return function(_0x4ff639){if(!_0x4ff639){_0x2fb8b0[_0xc85f('0xa')](0x194);}return _0x4ff639;};}function handleError(_0x1908a0,_0x2b2a4a){_0x2b2a4a=_0x2b2a4a||0x1f4;return function(_0x5baf38){logger[_0xc85f('0x16')](_0x5baf38[_0xc85f('0x17')]);if(_0x5baf38['name']){delete _0x5baf38[_0xc85f('0x18')];}_0x1908a0['status'](_0x2b2a4a)[_0xc85f('0x19')](_0x5baf38);};}function maskClientSecret(_0x1e2d1f){return _[_0xc85f('0x1a')](_0x1e2d1f['slice'](0x0,0x3),0x14,'*');}exports[_0xc85f('0x1b')]=function(_0x170918,_0x340264){var _0x11bf69={},_0x380a98={},_0x2d2138={'count':0x0,'rows':[]};var _0x4997f8=_[_0xc85f('0x1c')](db[_0xc85f('0x1d')][_0xc85f('0x1e')],function(_0x257a3c){return{'name':_0x257a3c[_0xc85f('0x1f')],'type':_0x257a3c[_0xc85f('0x20')]['key']};});_0x380a98[_0xc85f('0x21')]=_[_0xc85f('0x1c')](_0x4997f8,'name');_0x380a98[_0xc85f('0x22')]=_[_0xc85f('0x23')](_0x170918[_0xc85f('0x22')]);_0x380a98['filters']=_[_0xc85f('0x24')](_0x380a98[_0xc85f('0x21')],_0x380a98[_0xc85f('0x22')]);_0x11bf69[_0xc85f('0x25')]=_[_0xc85f('0x24')](_0x380a98['model'],qs[_0xc85f('0x26')](_0x170918[_0xc85f('0x22')][_0xc85f('0x26')]));_0x11bf69[_0xc85f('0x25')]=_0x11bf69[_0xc85f('0x25')]['length']?_0x11bf69[_0xc85f('0x25')]:_0x380a98['model'];if(!_0x170918[_0xc85f('0x22')][_0xc85f('0x27')](_0xc85f('0x28'))){_0x11bf69[_0xc85f('0xf')]=qs[_0xc85f('0xf')](_0x170918[_0xc85f('0x22')]['limit']);_0x11bf69[_0xc85f('0xe')]=qs[_0xc85f('0xe')](_0x170918['query'][_0xc85f('0xe')]);}_0x11bf69[_0xc85f('0x29')]=qs[_0xc85f('0x2a')](_0x170918[_0xc85f('0x22')][_0xc85f('0x2a')]);_0x11bf69[_0xc85f('0x2b')]=qs['filters'](_['pick'](_0x170918['query'],_0x380a98[_0xc85f('0x2c')]),_0x4997f8);if(_0x170918[_0xc85f('0x22')][_0xc85f('0x2d')]){_0x11bf69['where']=_[_0xc85f('0x2e')](_0x11bf69[_0xc85f('0x2b')],{'$or':_[_0xc85f('0x1c')](_0x4997f8,function(_0x5e6893){if(_0x5e6893[_0xc85f('0x20')]!=='VIRTUAL'){var _0x3572c6={};_0x3572c6[_0x5e6893[_0xc85f('0x18')]]={'$like':'%'+_0x170918['query'][_0xc85f('0x2d')]+'%'};return _0x3572c6;}})});}_0x11bf69=_[_0xc85f('0x2e')]({},_0x11bf69,_0x170918[_0xc85f('0x2f')]);var _0x107079={'where':_0x11bf69[_0xc85f('0x2b')]};return db['CloudProvider'][_0xc85f('0x11')](_0x107079)[_0xc85f('0x30')](function(_0x3f0dc3){_0x2d2138['count']=_0x3f0dc3;if(_0x170918[_0xc85f('0x22')][_0xc85f('0x31')]){_0x11bf69['include']=[{'all':!![]}];}return db[_0xc85f('0x1d')]['findAll'](_0x11bf69);})[_0xc85f('0x30')](function(_0x5156e9){_0x2d2138[_0xc85f('0x32')]=_['map'](_0x5156e9,function(_0x277f00){if(_0x277f00[_0xc85f('0x33')]===_0xc85f('0x34')){var _0x1d5eae=encryptor[_0xc85f('0x35')](_0x277f00[_0xc85f('0x36')]);_0x277f00[_0xc85f('0x36')]=maskClientSecret(_0x1d5eae);}return _0x277f00;});return _0x2d2138;})[_0xc85f('0x30')](respondWithFilteredResult(_0x340264,_0x11bf69))[_0xc85f('0x37')](handleError(_0x340264,null));};exports[_0xc85f('0x38')]=function(_0x1c5b70,_0x18be68){var _0x400a49={'raw':!![],'where':{'id':_0x1c5b70[_0xc85f('0x39')]['id']}},_0x5ed8e6={};_0x5ed8e6[_0xc85f('0x21')]=_[_0xc85f('0x23')](db[_0xc85f('0x1d')]['rawAttributes']);_0x5ed8e6[_0xc85f('0x22')]=_[_0xc85f('0x23')](_0x1c5b70[_0xc85f('0x22')]);_0x5ed8e6[_0xc85f('0x2c')]=_['intersection'](_0x5ed8e6[_0xc85f('0x21')],_0x5ed8e6[_0xc85f('0x22')]);_0x400a49[_0xc85f('0x25')]=_[_0xc85f('0x24')](_0x5ed8e6[_0xc85f('0x21')],qs['fields'](_0x1c5b70[_0xc85f('0x22')]['fields']));_0x400a49[_0xc85f('0x25')]=_0x400a49[_0xc85f('0x25')]['length']?_0x400a49[_0xc85f('0x25')]:_0x5ed8e6[_0xc85f('0x21')];if(_0x1c5b70[_0xc85f('0x22')][_0xc85f('0x31')]){_0x400a49[_0xc85f('0x3a')]=[{'all':!![]}];}_0x400a49=_[_0xc85f('0x2e')]({},_0x400a49,_0x1c5b70[_0xc85f('0x2f')]);return db[_0xc85f('0x1d')]['find'](_0x400a49)['then'](handleEntityNotFound(_0x18be68,null))['then'](function(_0x2fe477){if(_0x2fe477['service']==='MicrosoftAzure'){var _0x4f9451=encryptor[_0xc85f('0x35')](_0x2fe477['data3']);_0x2fe477[_0xc85f('0x36')]=maskClientSecret(_0x4f9451);}return _0x2fe477;})[_0xc85f('0x30')](respondWithResult(_0x18be68,null))['catch'](handleError(_0x18be68,null));};exports[_0xc85f('0x3b')]=function(_0xad569,_0xb77b9){if(!_0xad569[_0xc85f('0x3c')][_0xc85f('0x18')])throw new Error(_0xc85f('0x3d'));if(!_0xad569[_0xc85f('0x3c')][_0xc85f('0x33')])throw new Error('Service\x20parameter\x20not\x20specified');var _0x53fc17=db[_0xc85f('0x1d')][_0xc85f('0x1e')][_0xc85f('0x33')]['values'];if(!_0x53fc17[_0xc85f('0x3e')](_0xad569[_0xc85f('0x3c')]['service']))throw new Error(_0xc85f('0x3f')+_0x53fc17[_0xc85f('0x40')](',\x20'));if(_0xad569[_0xc85f('0x3c')][_0xc85f('0x33')]===_0xc85f('0x34')&&_0xad569[_0xc85f('0x3c')][_0xc85f('0x36')]){_0xad569[_0xc85f('0x3c')]['data3']=encryptor[_0xc85f('0x41')](_0xad569['body']['data3']);}return db[_0xc85f('0x1d')]['create'](_0xad569['body'],{})[_0xc85f('0x30')](respondWithResult(_0xb77b9,0xc9))[_0xc85f('0x37')](handleError(_0xb77b9,null));};exports['update']=function(_0x38e54a,_0x53d785){if(_0x38e54a['body']['id']){delete _0x38e54a[_0xc85f('0x3c')]['id'];}return db['CloudProvider'][_0xc85f('0x42')]({'where':{'id':_0x38e54a[_0xc85f('0x39')]['id']}})[_0xc85f('0x30')](handleEntityNotFound(_0x53d785,null))[_0xc85f('0x30')](function(_0x71905){if(_0x71905[_0xc85f('0x33')]===_0xc85f('0x34')&&_0x38e54a[_0xc85f('0x3c')]['data3']){_0x38e54a[_0xc85f('0x3c')][_0xc85f('0x36')]=encryptor[_0xc85f('0x41')](_0x38e54a[_0xc85f('0x3c')]['data3']);}return _0x71905;})[_0xc85f('0x30')](saveUpdates(_0x38e54a[_0xc85f('0x3c')],null))[_0xc85f('0x30')](respondWithResult(_0x53d785,null))['catch'](handleError(_0x53d785,null));};exports[_0xc85f('0x15')]=function(_0x179a20,_0xe6eccc){return db[_0xc85f('0x1d')][_0xc85f('0x42')]({'where':{'id':_0x179a20['params']['id']}})[_0xc85f('0x30')](handleEntityNotFound(_0xe6eccc,null))[_0xc85f('0x30')](removeEntity(_0xe6eccc,null))['catch'](handleError(_0xe6eccc,null));};exports['oauth2MicrosoftAuthorize']=function(_0x861856,_0x56f54c){return db[_0xc85f('0x1d')][_0xc85f('0x43')]({'where':{'id':_0x861856[_0xc85f('0x39')]['id']},'raw':!![]})['then'](function(_0x31f098){if(!_0x31f098)return _0x56f54c['sendStatus'](0x194);return{'url':oauth[_0xc85f('0x44')](_0x31f098,_0x861856[_0xc85f('0x45')]['id'])};})['then'](respondWithResult(_0x56f54c,null))[_0xc85f('0x37')](handleError(_0x56f54c,null));};exports[_0xc85f('0x46')]=function(_0x8fa724,_0xd66854){var _0x44e9ae=_0x8fa724[_0xc85f('0x3c')];var _0x3fe861;var _0x77ba1d;if(_0x44e9ae['error'])throw _0x44e9ae;redis[_0xc85f('0x47')](_0x44e9ae[_0xc85f('0x48')])[_0xc85f('0x30')](function(_0x5c51c0){if(!_0x5c51c0)throw new Error(_0xc85f('0x49'));_0x3fe861=JSON['parse'](_0x5c51c0);var _0x44c111=Buffer['from'](_0x44e9ae[_0xc85f('0x48')],_0xc85f('0x4a'))[_0xc85f('0x4b')](_0xc85f('0x4c'));_0x77ba1d=JSON[_0xc85f('0x4d')](_0x44c111);if(!oauth[_0xc85f('0x4e')](_0x44e9ae[_0xc85f('0x4f')],_0x3fe861[_0xc85f('0x50')]))throw new Error(_0xc85f('0x51'));redis[_0xc85f('0x52')](_0x44e9ae[_0xc85f('0x48')]);return oauth[_0xc85f('0x53')](_0x44e9ae['code'],_0x3fe861);})[_0xc85f('0x30')](function(_0x2769d2){_0x3fe861['data5']=_0x2769d2[_0xc85f('0x54')];_0x3fe861['data6']=_0x2769d2['refresh_token'];return db[_0xc85f('0x1d')][_0xc85f('0x14')]({'data5':_0x3fe861[_0xc85f('0x55')],'data6':_0x3fe861['data6']},{'where':{'id':_0x3fe861['id']}});})[_0xc85f('0x30')](function(){oauth[_0xc85f('0x56')](_0x3fe861);socket[_0xc85f('0x57')](_0xc85f('0x58'),{'id':_0x77ba1d['id']});return;})[_0xc85f('0x30')](respondWithStatusCode(_0xd66854,null))[_0xc85f('0x37')](function(_0xd3c8ac){if(_0x77ba1d){socket[_0xc85f('0x57')](_0xc85f('0x59'),{'id':_0x77ba1d['id']});}if(!_0x3fe861){logger['error'](_0xc85f('0x5a'),_0xd3c8ac);return _0xd66854[_0xc85f('0xb')](0x1f4)[_0xc85f('0x19')](_0xd3c8ac[_0xc85f('0x5b')]);}logger[_0xc85f('0x16')]('Authentication\x20failed\x20for\x20cloud\x20provider\x20#%s,\x20err:%s',_0x3fe861['id'],JSON[_0xc85f('0x5c')](_0xd3c8ac));});};
\ No newline at end of file
index 29fe8aa..7f1acbc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd75c=['CloudProvider','cloud_providers','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./cloudProvider.attributes','exports','define'];(function(_0x31bcb2,_0x23cc0e){var _0x3f150c=function(_0x119f71){while(--_0x119f71){_0x31bcb2['push'](_0x31bcb2['shift']());}};_0x3f150c(++_0x23cc0e);}(_0xd75c,0x89));var _0xcd75=function(_0xe70091,_0x32a4fa){_0xe70091=_0xe70091-0x0;var _0x4b4301=_0xd75c[_0xe70091];return _0x4b4301;};'use strict';var _=require(_0xcd75('0x0'));var util=require(_0xcd75('0x1'));var logger=require(_0xcd75('0x2'))(_0xcd75('0x3'));var moment=require(_0xcd75('0x4'));var BPromise=require(_0xcd75('0x5'));var rp=require(_0xcd75('0x6'));var fs=require('fs');var path=require(_0xcd75('0x7'));var rimraf=require(_0xcd75('0x8'));var config=require(_0xcd75('0x9'));var attributes=require(_0xcd75('0xa'));module[_0xcd75('0xb')]=function(_0x1e2a9c,_0x45a702){return _0x1e2a9c[_0xcd75('0xc')](_0xcd75('0xd'),attributes,{'tableName':_0xcd75('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x9b15=['./cloudProvider.attributes','CloudProvider','util','../../config/logger','api','request-promise','rimraf','../../config/environment'];(function(_0x131bd5,_0x5d00f2){var _0x114594=function(_0x5e5a5e){while(--_0x5e5a5e){_0x131bd5['push'](_0x131bd5['shift']());}};_0x114594(++_0x5d00f2);}(_0x9b15,0x142));var _0x59b1=function(_0x12cb4a,_0x4c27a3){_0x12cb4a=_0x12cb4a-0x0;var _0x2afd0b=_0x9b15[_0x12cb4a];return _0x2afd0b;};'use strict';var _=require('lodash');var util=require(_0x59b1('0x0'));var logger=require(_0x59b1('0x1'))(_0x59b1('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x59b1('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x59b1('0x4'));var config=require(_0x59b1('0x5'));var attributes=require(_0x59b1('0x6'));module['exports']=function(_0x57b909,_0x33c49d){return _0x57b909['define'](_0x59b1('0x7'),attributes,{'tableName':'cloud_providers','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 8f9058a..96fd21c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeaea=['response_type','data4','response_mode','state','nonce','prompt','key','value','oauth2Claims','oauth2/','data1','payload','iss','aud','audience','resolve','then','data3','findOne','refresh_token','data6','decryptString','POST','access_token','CloudProvider','update','data5','catch','error','Failed\x20to\x20refresh\x20access\x20token\x20for\x20cloud\x20provider\x20#%s,\x20-\x20err:%s','authorization_code','intervals','bind','all','inspect','exports','lodash','crypto','moment','request-promise','../../config/environment','../../config/logger','../../config/schedule/cloud-provider','../../mysqldb','redis','localhost','https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0','openid','profile','email','offline_access','https://outlook.office.com/POP.AccessAsUser.All','https://outlook.office.com/SMTP.Send','/authorize','/token','map','type','push','data7','join','Outlook365','https://outlook.office365.com/IMAP.AccessAsUser.All','Dynamics365','/.default','replace','{TENANT_ID}','data2','code','from','stringify','toString','randomBytes','hex'];(function(_0x23a79e,_0x235f89){var _0x3dab57=function(_0x346cf4){while(--_0x346cf4){_0x23a79e['push'](_0x23a79e['shift']());}};_0x3dab57(++_0x235f89);}(_0xeaea,0xb6));var _0xaeae=function(_0x2070da,_0x45e586){_0x2070da=_0x2070da-0x0;var _0x4f9fe1=_0xeaea[_0x2070da];return _0x4f9fe1;};'use strict';var _=require(_0xaeae('0x0'));var crypto=require(_0xaeae('0x1'));var jwt=require('jsonwebtoken');var moment=require(_0xaeae('0x2'));var Redis=require('ioredis');var rp=require(_0xaeae('0x3'));var util=require('util');var encryptor=require('../../components/encryptor');var config=require(_0xaeae('0x4'));var logger=require(_0xaeae('0x5'))('api');var schedule=require(_0xaeae('0x6'));var db=require(_0xaeae('0x7'))['db'];config[_0xaeae('0x8')]=_['defaults'](config[_0xaeae('0x8')],{'host':_0xaeae('0x9'),'port':0x18eb});var redis=new Redis(config['redis']);var MICROSOFT_AUTH_URL=_0xaeae('0xa');var AZURE_AUTH_SCOPES={'Outlook365':[_0xaeae('0xb'),_0xaeae('0xc'),_0xaeae('0xd'),_0xaeae('0xe'),'https://outlook.office365.com/IMAP.AccessAsUser.All',_0xaeae('0xf'),_0xaeae('0x10')],'Dynamics365':[_0xaeae('0xb'),_0xaeae('0xe')]};var MICROSOFT_AUTH_ENDPOINT=_0xaeae('0x11');var MICROSOFT_TOKEN_ENDPOINT=_0xaeae('0x12');var OAUTH_REFRESH_INTERVAL=0xfa;function getAuthorizationScopes(_0x18db78){var _0x1f15ce=_[_0xaeae('0x13')](AZURE_AUTH_SCOPES[_0x18db78['type']]);if(_0x18db78[_0xaeae('0x14')]==='Dynamics365')_0x1f15ce[_0xaeae('0x15')](_0x18db78[_0xaeae('0x16')]+'/.default');return _0x1f15ce[_0xaeae('0x17')]('\x20');}function getAccessTokenScope(_0x295e61){if(_0x295e61[_0xaeae('0x14')]===_0xaeae('0x18'))return _0xaeae('0x19');if(_0x295e61[_0xaeae('0x14')]===_0xaeae('0x1a'))return _0x295e61['data7']+_0xaeae('0x1b');}function generateMicrosoftAuthorizationUrl(_0x3be943,_0x52e5ec){var _0x5a928b=MICROSOFT_AUTH_URL[_0xaeae('0x1c')](_0xaeae('0x1d'),_0x3be943[_0xaeae('0x1e')]);var _0xe85128=[_0xaeae('0x1f'),'id_token'];var _0x4812b8=Buffer[_0xaeae('0x20')](JSON[_0xaeae('0x21')]({'id':_0x52e5ec}))[_0xaeae('0x22')]('base64');var _0x5a49eb=crypto[_0xaeae('0x23')](0x10)[_0xaeae('0x22')](_0xaeae('0x24'));var _0x15141c=getAuthorizationScopes(_0x3be943);var _0xb8f259=[{'key':'client_id','value':_0x3be943['data1']},{'key':_0xaeae('0x25'),'value':encodeURIComponent(_0xe85128[_0xaeae('0x17')]('\x20'))},{'key':'redirect_uri','value':_0x3be943[_0xaeae('0x26')]},{'key':_0xaeae('0x27'),'value':'form_post'},{'key':'scope','value':encodeURIComponent(_0x15141c)},{'key':_0xaeae('0x28'),'value':_0x4812b8},{'key':_0xaeae('0x29'),'value':_0x5a49eb},{'key':_0xaeae('0x2a'),'value':'login'}];var _0x2c4f7=_0x5a928b+MICROSOFT_AUTH_ENDPOINT+'?'+_['map'](_0xb8f259,function(_0x12139c){return _0x12139c[_0xaeae('0x2b')]+'='+_0x12139c[_0xaeae('0x2c')];})[_0xaeae('0x17')]('&');_0x3be943[_0xaeae('0x2d')]={'issuer':_0x5a928b[_0xaeae('0x1c')](_0xaeae('0x2e'),''),'audience':_0x3be943[_0xaeae('0x2f')],'state':_0x4812b8,'nonce':_0x5a49eb};redis['set'](_0x4812b8,JSON[_0xaeae('0x21')](_0x3be943));return _0x2c4f7;}function isValidIdToken(_0x6ae6e4,_0x3791d4){try{var _0x1063e8=jwt['decode'](_0x6ae6e4,{'complete':!![]});var _0xfe0ba3=_0x1063e8[_0xaeae('0x30')];if(_0xfe0ba3[_0xaeae('0x31')]!==_0x3791d4['issuer'])return![];if(_0xfe0ba3[_0xaeae('0x32')]!==_0x3791d4[_0xaeae('0x33')])return![];if(_0xfe0ba3[_0xaeae('0x29')]!==_0x3791d4['nonce'])return![];if(moment()['isAfter'](moment['unix'](_0xfe0ba3['exp'])))return![];return!![];}catch(_0x52c973){throw _0x52c973;}}function refreshOauth2MicrosoftAccessToken(_0x849d2c){return Promise[_0xaeae('0x34')]()[_0xaeae('0x35')](function(){if(_0x849d2c[_0xaeae('0x36')])return _0x849d2c;return db['CloudProvider'][_0xaeae('0x37')]({'where':{'id':_0x849d2c['id']},'raw':!![]});})[_0xaeae('0x35')](function(_0x8fb907){var _0x1084ae={'grant_type':_0xaeae('0x38'),'refresh_token':_0x8fb907[_0xaeae('0x39')],'scope':getAccessTokenScope(_0x8fb907),'redirect_uri':_0x8fb907['data4'],'client_id':_0x8fb907['data1'],'client_secret':encryptor[_0xaeae('0x3a')](_0x8fb907[_0xaeae('0x36')])};var _0x371b08={'method':_0xaeae('0x3b'),'uri':MICROSOFT_AUTH_URL[_0xaeae('0x1c')](_0xaeae('0x1d'),_0x8fb907[_0xaeae('0x1e')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x1084ae,'json':!![]};return rp(_0x371b08);})['then'](function(_0x882ad1){_0x849d2c['data5']=_0x882ad1[_0xaeae('0x3c')];_0x849d2c[_0xaeae('0x39')]=_0x882ad1[_0xaeae('0x38')];return db[_0xaeae('0x3d')][_0xaeae('0x3e')]({'data5':_0x849d2c[_0xaeae('0x3f')],'data6':_0x849d2c['data6']},{'where':{'id':_0x849d2c['id']}});})[_0xaeae('0x35')](function(){return _0x849d2c;})[_0xaeae('0x40')](function(_0x39baf3){logger[_0xaeae('0x41')](_0xaeae('0x42'),_0x849d2c['id'],_0x39baf3);});}function getOauth2MicrosoftAccessToken(_0x3eafcd,_0x44a64a){var _0xcaec5b={'grant_type':_0xaeae('0x43'),'code':_0x3eafcd,'scope':getAccessTokenScope(_0x44a64a),'redirect_uri':_0x44a64a[_0xaeae('0x26')],'client_id':_0x44a64a[_0xaeae('0x2f')],'client_secret':encryptor[_0xaeae('0x3a')](_0x44a64a[_0xaeae('0x36')])};var _0xd9f657={'method':_0xaeae('0x3b'),'uri':MICROSOFT_AUTH_URL['replace'](_0xaeae('0x1d'),_0x44a64a['data2'])+MICROSOFT_TOKEN_ENDPOINT,'form':_0xcaec5b,'json':!![]};return rp(_0xd9f657);}function startRefreshInterval(_0x5370d9){var _0x1271b8=schedule[_0xaeae('0x44')];if(_0x1271b8[_0x5370d9['id']])clearInterval(_0x1271b8[_0x5370d9['id']]);_0x1271b8[_0x5370d9['id']]=setInterval(refreshOauth2MicrosoftAccessToken[_0xaeae('0x45')](this,{'id':_0x5370d9['id']}),OAUTH_REFRESH_INTERVAL*0x3e8);schedule[_0xaeae('0x44')]=_0x1271b8;}function startAllRefreshIntervals(){return db[_0xaeae('0x3d')]['findAll']({'where':{'data6':{'$ne':null}},'raw':!![]})['then'](function(_0xafd20f){var _0x25b8a3=_0xafd20f[_0xaeae('0x13')](function(_0x3be01e){return refreshOauth2MicrosoftAccessToken(_0x3be01e)[_0xaeae('0x35')](function(_0x5cd118){startRefreshInterval(_0x5cd118);});});return Promise[_0xaeae('0x46')](_0x25b8a3);})['catch'](function(_0x1ffed7){var _0x5732a0=_0x1ffed7?util[_0xaeae('0x47')](_0x1ffed7,{'showHidden':![],'depth':null}):'';logger[_0xaeae('0x41')]('[CLOUD_PROVIDER]\x20Error\x20while\x20refreshing\x20the\x20tokens\x20after\x20service\x20restart\x20error:%s',_0x5732a0);});}module[_0xaeae('0x48')]={'generateMicrosoftAuthorizationUrl':generateMicrosoftAuthorizationUrl,'getOauth2MicrosoftAccessToken':getOauth2MicrosoftAccessToken,'isValidIdToken':isValidIdToken,'startAllRefreshIntervals':startAllRefreshIntervals,'refreshOauth2MicrosoftAccessToken':refreshOauth2MicrosoftAccessToken,'startRefreshInterval':startRefreshInterval};
\ No newline at end of file
+var _0x15f5=['catch','[CLOUD_PROVIDER]\x20Error\x20while\x20refreshing\x20the\x20tokens\x20after\x20service\x20restart\x20error:%s','exports','lodash','crypto','jsonwebtoken','moment','ioredis','request-promise','util','../../config/logger','../../config/schedule/cloud-provider','redis','defaults','localhost','openid','email','https://outlook.office365.com/IMAP.AccessAsUser.All','https://outlook.office.com/POP.AccessAsUser.All','https://outlook.office.com/SMTP.Send','offline_access','/token','type','push','data7','/.default','join','Outlook365','code','id_token','from','stringify','toString','base64','hex','client_id','data1','response_type','redirect_uri','data4','form_post','scope','state','nonce','login','map','key','value','oauth2Claims','replace','set','decode','issuer','aud','audience','isAfter','exp','CloudProvider','findOne','refresh_token','data6','decryptString','data3','POST','{TENANT_ID}','data2','data5','access_token','update','then','error','Failed\x20to\x20refresh\x20access\x20token\x20for\x20cloud\x20provider\x20#%s,\x20-\x20err:%s','authorization_code','intervals','bind','findAll','all'];(function(_0x460b5f,_0xc9f616){var _0x34df7f=function(_0x597641){while(--_0x597641){_0x460b5f['push'](_0x460b5f['shift']());}};_0x34df7f(++_0xc9f616);}(_0x15f5,0xea));var _0x515f=function(_0x3e8519,_0x926890){_0x3e8519=_0x3e8519-0x0;var _0x555b00=_0x15f5[_0x3e8519];return _0x555b00;};'use strict';var _=require(_0x515f('0x0'));var crypto=require(_0x515f('0x1'));var jwt=require(_0x515f('0x2'));var moment=require(_0x515f('0x3'));var Redis=require(_0x515f('0x4'));var rp=require(_0x515f('0x5'));var util=require(_0x515f('0x6'));var encryptor=require('../../components/encryptor');var config=require('../../config/environment');var logger=require(_0x515f('0x7'))('api');var schedule=require(_0x515f('0x8'));var db=require('../../mysqldb')['db'];config[_0x515f('0x9')]=_[_0x515f('0xa')](config['redis'],{'host':_0x515f('0xb'),'port':0x18eb});var redis=new Redis(config['redis']);var MICROSOFT_AUTH_URL='https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0';var AZURE_AUTH_SCOPES={'Outlook365':[_0x515f('0xc'),'profile',_0x515f('0xd'),'offline_access',_0x515f('0xe'),_0x515f('0xf'),_0x515f('0x10')],'Dynamics365':[_0x515f('0xc'),_0x515f('0x11')]};var MICROSOFT_AUTH_ENDPOINT='/authorize';var MICROSOFT_TOKEN_ENDPOINT=_0x515f('0x12');var OAUTH_REFRESH_INTERVAL=0xfa;function getAuthorizationScopes(_0x5d9c42){var _0x8f52e5=_['map'](AZURE_AUTH_SCOPES[_0x5d9c42['type']]);if(_0x5d9c42[_0x515f('0x13')]==='Dynamics365')_0x8f52e5[_0x515f('0x14')](_0x5d9c42[_0x515f('0x15')]+_0x515f('0x16'));return _0x8f52e5[_0x515f('0x17')]('\x20');}function getAccessTokenScope(_0xef018e){if(_0xef018e[_0x515f('0x13')]===_0x515f('0x18'))return'https://outlook.office365.com/IMAP.AccessAsUser.All';if(_0xef018e[_0x515f('0x13')]==='Dynamics365')return _0xef018e[_0x515f('0x15')]+_0x515f('0x16');}function generateMicrosoftAuthorizationUrl(_0x420926,_0x54ef2e){var _0x30e275=MICROSOFT_AUTH_URL['replace']('{TENANT_ID}',_0x420926['data2']);var _0x4e38df=[_0x515f('0x19'),_0x515f('0x1a')];var _0x444f1e=Buffer[_0x515f('0x1b')](JSON[_0x515f('0x1c')]({'id':_0x54ef2e}))[_0x515f('0x1d')](_0x515f('0x1e'));var _0x7d0cdf=crypto['randomBytes'](0x10)[_0x515f('0x1d')](_0x515f('0x1f'));var _0x14a20d=getAuthorizationScopes(_0x420926);var _0x5387f5=[{'key':_0x515f('0x20'),'value':_0x420926[_0x515f('0x21')]},{'key':_0x515f('0x22'),'value':encodeURIComponent(_0x4e38df[_0x515f('0x17')]('\x20'))},{'key':_0x515f('0x23'),'value':_0x420926[_0x515f('0x24')]},{'key':'response_mode','value':_0x515f('0x25')},{'key':_0x515f('0x26'),'value':encodeURIComponent(_0x14a20d)},{'key':_0x515f('0x27'),'value':_0x444f1e},{'key':_0x515f('0x28'),'value':_0x7d0cdf},{'key':'prompt','value':_0x515f('0x29')}];var _0x36fed5=_0x30e275+MICROSOFT_AUTH_ENDPOINT+'?'+_[_0x515f('0x2a')](_0x5387f5,function(_0x3cc0c0){return _0x3cc0c0[_0x515f('0x2b')]+'='+_0x3cc0c0[_0x515f('0x2c')];})['join']('&');_0x420926[_0x515f('0x2d')]={'issuer':_0x30e275[_0x515f('0x2e')]('oauth2/',''),'audience':_0x420926[_0x515f('0x21')],'state':_0x444f1e,'nonce':_0x7d0cdf};redis[_0x515f('0x2f')](_0x444f1e,JSON[_0x515f('0x1c')](_0x420926));return _0x36fed5;}function isValidIdToken(_0x2f3ed3,_0x48c58a){try{var _0x3071ce=jwt[_0x515f('0x30')](_0x2f3ed3,{'complete':!![]});var _0x54eb63=_0x3071ce['payload'];if(_0x54eb63['iss']!==_0x48c58a[_0x515f('0x31')])return![];if(_0x54eb63[_0x515f('0x32')]!==_0x48c58a[_0x515f('0x33')])return![];if(_0x54eb63[_0x515f('0x28')]!==_0x48c58a[_0x515f('0x28')])return![];if(moment()[_0x515f('0x34')](moment['unix'](_0x54eb63[_0x515f('0x35')])))return![];return!![];}catch(_0x44b1e8){throw _0x44b1e8;}}function refreshOauth2MicrosoftAccessToken(_0x51e50a){return Promise['resolve']()['then'](function(){if(_0x51e50a['data3'])return _0x51e50a;return db[_0x515f('0x36')][_0x515f('0x37')]({'where':{'id':_0x51e50a['id']},'raw':!![]});})['then'](function(_0x211d7b){var _0x442ef2={'grant_type':_0x515f('0x38'),'refresh_token':_0x211d7b[_0x515f('0x39')],'scope':getAccessTokenScope(_0x211d7b),'redirect_uri':_0x211d7b['data4'],'client_id':_0x211d7b[_0x515f('0x21')],'client_secret':encryptor[_0x515f('0x3a')](_0x211d7b[_0x515f('0x3b')])};var _0x4d2c22={'method':_0x515f('0x3c'),'uri':MICROSOFT_AUTH_URL['replace'](_0x515f('0x3d'),_0x211d7b[_0x515f('0x3e')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x442ef2,'json':!![]};return rp(_0x4d2c22);})['then'](function(_0x5721e5){_0x51e50a[_0x515f('0x3f')]=_0x5721e5[_0x515f('0x40')];_0x51e50a['data6']=_0x5721e5['refresh_token'];return db[_0x515f('0x36')][_0x515f('0x41')]({'data5':_0x51e50a[_0x515f('0x3f')],'data6':_0x51e50a['data6']},{'where':{'id':_0x51e50a['id']}});})[_0x515f('0x42')](function(){return _0x51e50a;})['catch'](function(_0xc15114){logger[_0x515f('0x43')](_0x515f('0x44'),_0x51e50a['id'],_0xc15114);});}function getOauth2MicrosoftAccessToken(_0xfccba6,_0xd77dbe){var _0x3eeedc={'grant_type':_0x515f('0x45'),'code':_0xfccba6,'scope':getAccessTokenScope(_0xd77dbe),'redirect_uri':_0xd77dbe[_0x515f('0x24')],'client_id':_0xd77dbe[_0x515f('0x21')],'client_secret':encryptor[_0x515f('0x3a')](_0xd77dbe['data3'])};var _0x143074={'method':_0x515f('0x3c'),'uri':MICROSOFT_AUTH_URL['replace']('{TENANT_ID}',_0xd77dbe[_0x515f('0x3e')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x3eeedc,'json':!![]};return rp(_0x143074);}function startRefreshInterval(_0x487f1e){var _0x41994f=schedule[_0x515f('0x46')];if(_0x41994f[_0x487f1e['id']])clearInterval(_0x41994f[_0x487f1e['id']]);_0x41994f[_0x487f1e['id']]=setInterval(refreshOauth2MicrosoftAccessToken[_0x515f('0x47')](this,{'id':_0x487f1e['id']}),OAUTH_REFRESH_INTERVAL*0x3e8);schedule[_0x515f('0x46')]=_0x41994f;}function startAllRefreshIntervals(){return db[_0x515f('0x36')][_0x515f('0x48')]({'where':{'data6':{'$ne':null}},'raw':!![]})[_0x515f('0x42')](function(_0x5903de){var _0x3de90b=_0x5903de['map'](function(_0x431615){return refreshOauth2MicrosoftAccessToken(_0x431615)[_0x515f('0x42')](function(_0x4fbf06){startRefreshInterval(_0x4fbf06);});});return Promise[_0x515f('0x49')](_0x3de90b);})[_0x515f('0x4a')](function(_0x23aa8b){var _0x5ee607=_0x23aa8b?util['inspect'](_0x23aa8b,{'showHidden':![],'depth':null}):'';logger[_0x515f('0x43')](_0x515f('0x4b'),_0x5ee607);});}module[_0x515f('0x4c')]={'generateMicrosoftAuthorizationUrl':generateMicrosoftAuthorizationUrl,'getOauth2MicrosoftAccessToken':getOauth2MicrosoftAccessToken,'isValidIdToken':isValidIdToken,'startAllRefreshIntervals':startAllRefreshIntervals,'refreshOauth2MicrosoftAccessToken':refreshOauth2MicrosoftAccessToken,'startRefreshInterval':startRefreshInterval};
\ No newline at end of file
index f7dd5da..ca47a2d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcbde=['http','request','then','CloudProvider,\x20%s,\x20%s','debug','stringify','error','code','message','info','request\x20sent','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','client'];(function(_0x4b5965,_0x3909ca){var _0x3e7789=function(_0x33c2b0){while(--_0x33c2b0){_0x4b5965['push'](_0x4b5965['shift']());}};_0x3e7789(++_0x3909ca);}(_0xcbde,0x141));var _0xecbd=function(_0x3826c0,_0x92123c){_0x3826c0=_0x3826c0-0x0;var _0x4ca6b2=_0xcbde[_0x3826c0];return _0x4ca6b2;};'use strict';var _=require(_0xecbd('0x0'));var util=require('util');var moment=require(_0xecbd('0x1'));var BPromise=require(_0xecbd('0x2'));var rs=require(_0xecbd('0x3'));var fs=require('fs');var Redis=require(_0xecbd('0x4'));var db=require(_0xecbd('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xecbd('0x6'));var config=require(_0xecbd('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xecbd('0x8')][_0xecbd('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x545ca6,_0x5d1ba5,_0x2947a0){return new BPromise(function(_0x3e9e7a,_0x2f3b03){return client[_0xecbd('0xa')](_0x545ca6,_0x2947a0)[_0xecbd('0xb')](function(_0x43a04e){logger['info'](_0xecbd('0xc'),_0x5d1ba5,'request\x20sent');logger[_0xecbd('0xd')]('CloudProvider,\x20%s,\x20%s,\x20%s',_0x5d1ba5,'request\x20sent',JSON[_0xecbd('0xe')](_0x43a04e));if(_0x43a04e['error']){if(_0x43a04e[_0xecbd('0xf')][_0xecbd('0x10')]===0x1f4){logger['error'](_0xecbd('0xc'),_0x5d1ba5,_0x43a04e[_0xecbd('0xf')][_0xecbd('0x11')]);return _0x2f3b03(_0x43a04e[_0xecbd('0xf')][_0xecbd('0x11')]);}logger[_0xecbd('0xf')](_0xecbd('0xc'),_0x5d1ba5,_0x43a04e[_0xecbd('0xf')][_0xecbd('0x11')]);return _0x3e9e7a(_0x43a04e['error'][_0xecbd('0x11')]);}else{logger[_0xecbd('0x12')](_0xecbd('0xc'),_0x5d1ba5,_0xecbd('0x13'));_0x3e9e7a(_0x43a04e[_0xecbd('0x14')][_0xecbd('0x11')]);}})[_0xecbd('0x15')](function(_0x1af064){logger[_0xecbd('0xf')](_0xecbd('0xc'),_0x5d1ba5,_0x1af064);_0x2f3b03(_0x1af064);});});}
\ No newline at end of file
+var _0x5ba3=['ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','then','info','CloudProvider,\x20%s,\x20%s','debug','error','code','message','request\x20sent','result','catch','lodash','moment','bluebird'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0x5ba3,0x140));var _0x35ba=function(_0x4a0db2,_0x533a26){_0x4a0db2=_0x4a0db2-0x0;var _0x57666d=_0x5ba3[_0x4a0db2];return _0x57666d;};'use strict';var _=require(_0x35ba('0x0'));var util=require('util');var moment=require(_0x35ba('0x1'));var BPromise=require(_0x35ba('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x35ba('0x3'));var db=require(_0x35ba('0x4'))['db'];var utils=require(_0x35ba('0x5'));var logger=require('../../config/logger')(_0x35ba('0x6'));var config=require(_0x35ba('0x7'));var jayson=require(_0x35ba('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x20cd5f,_0x3264d3,_0x380ffb){return new BPromise(function(_0x4c55f3,_0x22bed8){return client['request'](_0x20cd5f,_0x380ffb)[_0x35ba('0x9')](function(_0x366ddc){logger[_0x35ba('0xa')](_0x35ba('0xb'),_0x3264d3,'request\x20sent');logger[_0x35ba('0xc')]('CloudProvider,\x20%s,\x20%s,\x20%s',_0x3264d3,'request\x20sent',JSON['stringify'](_0x366ddc));if(_0x366ddc[_0x35ba('0xd')]){if(_0x366ddc[_0x35ba('0xd')][_0x35ba('0xe')]===0x1f4){logger[_0x35ba('0xd')](_0x35ba('0xb'),_0x3264d3,_0x366ddc[_0x35ba('0xd')][_0x35ba('0xf')]);return _0x22bed8(_0x366ddc[_0x35ba('0xd')]['message']);}logger[_0x35ba('0xd')](_0x35ba('0xb'),_0x3264d3,_0x366ddc[_0x35ba('0xd')][_0x35ba('0xf')]);return _0x4c55f3(_0x366ddc['error'][_0x35ba('0xf')]);}else{logger['info']('CloudProvider,\x20%s,\x20%s',_0x3264d3,_0x35ba('0x10'));_0x4c55f3(_0x366ddc[_0x35ba('0x11')]['message']);}})[_0x35ba('0x12')](function(_0x2b6b71){logger[_0x35ba('0xd')](_0x35ba('0xb'),_0x3264d3,_0x2b6b71);_0x22bed8(_0x2b6b71);});});}
\ No newline at end of file
index 8b2d155..5781191 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(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x7a54,0x106));var _0x47a5=function(_0x4cd36d,_0x2993eb){_0x4cd36d=_0x4cd36d-0x0;var _0x23e123=_0x7a54[_0x4cd36d];return _0x23e123;};'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 _0x1261=['/:id','show','create','put','update','delete','/:id/oauth2/microsoft/authorize/','post','exports','Router','../../components/auth/service','./cloudProvider.controller','get','isAuthenticated','index'];(function(_0x507ac5,_0x33aaee){var _0x12c1bc=function(_0x5c953c){while(--_0x5c953c){_0x507ac5['push'](_0x507ac5['shift']());}};_0x12c1bc(++_0x33aaee);}(_0x1261,0x144));var _0x1126=function(_0x53afe9,_0x2c9f40){_0x53afe9=_0x53afe9-0x0;var _0x396396=_0x1261[_0x53afe9];return _0x396396;};'use strict';var express=require('express');var router=express[_0x1126('0x0')]();var auth=require(_0x1126('0x1'));var controller=require(_0x1126('0x2'));router[_0x1126('0x3')]('/',auth[_0x1126('0x4')](),controller[_0x1126('0x5')]);router[_0x1126('0x3')](_0x1126('0x6'),auth[_0x1126('0x4')](),controller[_0x1126('0x7')]);router['post']('/',auth['isAuthenticated'](),controller[_0x1126('0x8')]);router[_0x1126('0x9')]('/:id',auth[_0x1126('0x4')](),controller[_0x1126('0xa')]);router[_0x1126('0xb')](_0x1126('0x6'),auth[_0x1126('0x4')](),controller['destroy']);router[_0x1126('0x3')](_0x1126('0xc'),auth[_0x1126('0x4')](),controller['oauth2MicrosoftAuthorize']);router[_0x1126('0xd')]('/oauth2/microsoft/callback',controller['oauth2MicrosoftCallback']);module[_0x1126('0xe')]=router;
\ No newline at end of file
index 1127f34..576f039 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x851c=['name','sequelize','exports','STRING'];(function(_0x47f4c2,_0x134e7b){var _0x22c63e=function(_0x5b8572){while(--_0x5b8572){_0x47f4c2['push'](_0x47f4c2['shift']());}};_0x22c63e(++_0x134e7b);}(_0x851c,0x19d));var _0xc851=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x851c[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0xc851('0x0'));module[_0xc851('0x1')]={'name':{'type':Sequelize[_0xc851('0x2')],'unique':_0xc851('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize[_0xc851('0x2')]},'companyId':{'type':Sequelize[_0xc851('0x2')]},'website':{'type':Sequelize[_0xc851('0x2')]},'phone':{'type':Sequelize['STRING']},'fax':{'type':Sequelize[_0xc851('0x2')]},'type':{'type':Sequelize[_0xc851('0x2')]},'street':{'type':Sequelize['STRING']},'postalCode':{'type':Sequelize[_0xc851('0x2')]},'city':{'type':Sequelize[_0xc851('0x2')]},'country':{'type':Sequelize['STRING']},'email':{'type':Sequelize[_0xc851('0x2')],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize['STRING']},'sStreet':{'type':Sequelize['STRING']},'sPostalCode':{'type':Sequelize[_0xc851('0x2')]},'sCity':{'type':Sequelize['STRING']},'sCountry':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xc851('0x2')]}};
\ No newline at end of file
+var _0x0da2=['exports','STRING','name','sequelize'];(function(_0x524b60,_0x43f14f){var _0x4c1567=function(_0x475ce5){while(--_0x475ce5){_0x524b60['push'](_0x524b60['shift']());}};_0x4c1567(++_0x43f14f);}(_0x0da2,0x1bb));var _0x20da=function(_0x194ae0,_0x1dcfd1){_0x194ae0=_0x194ae0-0x0;var _0x2d5a05=_0x0da2[_0x194ae0];return _0x2d5a05;};'use strict';var Sequelize=require(_0x20da('0x0'));module[_0x20da('0x1')]={'name':{'type':Sequelize[_0x20da('0x2')],'unique':_0x20da('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize[_0x20da('0x2')]},'companyId':{'type':Sequelize['STRING']},'website':{'type':Sequelize[_0x20da('0x2')]},'phone':{'type':Sequelize[_0x20da('0x2')]},'fax':{'type':Sequelize[_0x20da('0x2')]},'type':{'type':Sequelize['STRING']},'street':{'type':Sequelize[_0x20da('0x2')]},'postalCode':{'type':Sequelize[_0x20da('0x2')]},'city':{'type':Sequelize[_0x20da('0x2')]},'country':{'type':Sequelize['STRING']},'email':{'type':Sequelize[_0x20da('0x2')],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize[_0x20da('0x2')]},'sStreet':{'type':Sequelize['STRING']},'sPostalCode':{'type':Sequelize[_0x20da('0x2')]},'sCity':{'type':Sequelize[_0x20da('0x2')]},'sCountry':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x20da('0x2')]}};
\ No newline at end of file
index 4431e1f..06450a4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4ec9=['find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','addContacts','ids','omit','getContacts','findOne','CmContact','rimraf','zip-dir','fast-json-patch','moment','mustache','util','sox','to-csv','ejs','fs-extra','lodash','papaparse','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','json','offset','undefined','limit','count','set','apply','reject','save','then','destroy','get','Companies','UserProfileResource','error','stack','name','send','index','CmCompany','describe','keys','query','filters','intersection','model','fields','attributes','hasOwnProperty','nolimit','order','sort','pick','filter','where','map','merge','options','includeAll','findAll','rows','catch','show','params','rawAttributes','length','include'];(function(_0x56ef50,_0xda44c5){var _0x22564c=function(_0x19aea1){while(--_0x19aea1){_0x56ef50['push'](_0x56ef50['shift']());}};_0x22564c(++_0xda44c5);}(_0x4ec9,0x68));var _0x94ec=function(_0x4fa0e8,_0x26b636){_0x4fa0e8=_0x4fa0e8-0x0;var _0x19cadd=_0x4ec9[_0x4fa0e8];return _0x19cadd;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x94ec('0x0'));var zipdir=require(_0x94ec('0x1'));var jsonpatch=require(_0x94ec('0x2'));var rp=require('request-promise');var moment=require(_0x94ec('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x94ec('0x4'));var util=require(_0x94ec('0x5'));var path=require('path');var sox=require(_0x94ec('0x6'));var csv=require(_0x94ec('0x7'));var ejs=require(_0x94ec('0x8'));var fs=require('fs');var fs_extra=require(_0x94ec('0x9'));var _=require(_0x94ec('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x94ec('0x7'));var querystring=require('querystring');var Papa=require(_0x94ec('0xb'));var Redis=require(_0x94ec('0xc'));var authService=require(_0x94ec('0xd'));var qs=require(_0x94ec('0xe'));var as=require(_0x94ec('0xf'));var hardwareService=require(_0x94ec('0x10'));var logger=require(_0x94ec('0x11'))(_0x94ec('0x12'));var utils=require(_0x94ec('0x13'));var config=require(_0x94ec('0x14'));var licenseUtil=require(_0x94ec('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x343e8f,_0x5f1463){_0x5f1463=_0x5f1463||0xcc;return function(_0x5ce6d2){if(_0x5ce6d2){return _0x343e8f[_0x94ec('0x16')](_0x5f1463);}return _0x343e8f[_0x94ec('0x17')](_0x5f1463)[_0x94ec('0x18')]();};}function respondWithResult(_0x271135,_0x51ff09){_0x51ff09=_0x51ff09||0xc8;return function(_0x33a4c1){if(_0x33a4c1){return _0x271135[_0x94ec('0x17')](_0x51ff09)[_0x94ec('0x19')](_0x33a4c1);}};}function respondWithFilteredResult(_0x278356,_0x54a93c){return function(_0x50c85f){if(_0x50c85f){var _0x547b61=typeof _0x54a93c[_0x94ec('0x1a')]===_0x94ec('0x1b')&&typeof _0x54a93c[_0x94ec('0x1c')]===_0x94ec('0x1b');var _0x3035c7=_0x50c85f[_0x94ec('0x1d')];var _0x384edb=_0x547b61?0x0:_0x54a93c[_0x94ec('0x1a')];var _0x218cd8=_0x547b61?_0x50c85f[_0x94ec('0x1d')]:_0x54a93c[_0x94ec('0x1a')]+_0x54a93c[_0x94ec('0x1c')];var _0x439923;if(_0x218cd8>=_0x3035c7){_0x218cd8=_0x3035c7;_0x439923=0xc8;}else{_0x439923=0xce;}_0x278356[_0x94ec('0x17')](_0x439923);return _0x278356[_0x94ec('0x1e')]('Content-Range',_0x384edb+'-'+_0x218cd8+'/'+_0x3035c7)[_0x94ec('0x19')](_0x50c85f);}return null;};}function patchUpdates(_0x5d27d1){return function(_0x1e73b3){try{jsonpatch[_0x94ec('0x1f')](_0x1e73b3,_0x5d27d1,!![]);}catch(_0x341e17){return BPromise[_0x94ec('0x20')](_0x341e17);}return _0x1e73b3[_0x94ec('0x21')]();};}function saveUpdates(_0x168634,_0xd30bc2){return function(_0x533eaa){if(_0x533eaa){return _0x533eaa['update'](_0x168634)[_0x94ec('0x22')](function(_0x427814){return _0x427814;});}return null;};}function removeEntity(_0x3495fb,_0x9610fd){return function(_0x471fab){if(_0x471fab){return _0x471fab[_0x94ec('0x23')]()['then'](function(){var _0x13e964=_0x471fab[_0x94ec('0x24')]({'plain':!![]});var _0x28a8ca=_0x94ec('0x25');return db[_0x94ec('0x26')][_0x94ec('0x23')]({'where':{'type':_0x28a8ca,'resourceId':_0x13e964['id']}})[_0x94ec('0x22')](function(){return _0x471fab;});})[_0x94ec('0x22')](function(){_0x3495fb[_0x94ec('0x17')](0xcc)[_0x94ec('0x18')]();});}};}function handleEntityNotFound(_0x1e7fd0,_0x49eb98){return function(_0x4c3485){if(!_0x4c3485){_0x1e7fd0[_0x94ec('0x16')](0x194);}return _0x4c3485;};}function handleError(_0x2d048a,_0x3ba765){_0x3ba765=_0x3ba765||0x1f4;return function(_0x1a9de9){logger[_0x94ec('0x27')](_0x1a9de9[_0x94ec('0x28')]);if(_0x1a9de9[_0x94ec('0x29')]){delete _0x1a9de9[_0x94ec('0x29')];}_0x2d048a[_0x94ec('0x17')](_0x3ba765)[_0x94ec('0x2a')](_0x1a9de9);};}exports[_0x94ec('0x2b')]=function(_0x386e2d,_0x5cdf6a){var _0x28e5ac={},_0x41d67c={},_0x1a80d0={'count':0x0,'rows':[]};return db[_0x94ec('0x2c')][_0x94ec('0x2d')]()['then'](function(_0x4cf294){_0x41d67c['model']=_[_0x94ec('0x2e')](_0x4cf294);_0x41d67c[_0x94ec('0x2f')]=_[_0x94ec('0x2e')](_0x386e2d[_0x94ec('0x2f')]);_0x41d67c[_0x94ec('0x30')]=_[_0x94ec('0x31')](_0x41d67c[_0x94ec('0x32')],_0x41d67c[_0x94ec('0x2f')]);_0x28e5ac['attributes']=_['intersection'](_0x41d67c[_0x94ec('0x32')],qs[_0x94ec('0x33')](_0x386e2d[_0x94ec('0x2f')][_0x94ec('0x33')]));_0x28e5ac['attributes']=_0x28e5ac[_0x94ec('0x34')]['length']?_0x28e5ac[_0x94ec('0x34')]:_0x41d67c[_0x94ec('0x32')];if(!_0x386e2d[_0x94ec('0x2f')][_0x94ec('0x35')](_0x94ec('0x36'))){_0x28e5ac[_0x94ec('0x1c')]=qs['limit'](_0x386e2d[_0x94ec('0x2f')][_0x94ec('0x1c')]);_0x28e5ac[_0x94ec('0x1a')]=qs[_0x94ec('0x1a')](_0x386e2d[_0x94ec('0x2f')][_0x94ec('0x1a')]);}_0x28e5ac[_0x94ec('0x37')]=qs[_0x94ec('0x38')](_0x386e2d[_0x94ec('0x2f')][_0x94ec('0x38')]);_0x28e5ac['where']=qs[_0x94ec('0x30')](_[_0x94ec('0x39')](_0x386e2d[_0x94ec('0x2f')],_0x41d67c['filters']),_0x4cf294);if(_0x386e2d[_0x94ec('0x2f')][_0x94ec('0x3a')]){_0x28e5ac[_0x94ec('0x3b')]=_['merge'](_0x28e5ac[_0x94ec('0x3b')],{'$or':_[_0x94ec('0x3c')](_0x28e5ac['attributes'],function(_0xe2130a){var _0x401dd4={};_0x401dd4[_0xe2130a]={'$like':'%'+_0x386e2d[_0x94ec('0x2f')][_0x94ec('0x3a')]+'%'};return _0x401dd4;})});}_0x28e5ac=_[_0x94ec('0x3d')]({},_0x28e5ac,_0x386e2d[_0x94ec('0x3e')]);var _0x5d90a3={'where':_0x28e5ac['where']};return db[_0x94ec('0x2c')][_0x94ec('0x1d')](_0x5d90a3)[_0x94ec('0x22')](function(_0x5a96f3){_0x1a80d0[_0x94ec('0x1d')]=_0x5a96f3;if(_0x386e2d[_0x94ec('0x2f')][_0x94ec('0x3f')]){_0x28e5ac['include']=[{'all':!![]}];}return db[_0x94ec('0x2c')][_0x94ec('0x40')](_0x28e5ac);})[_0x94ec('0x22')](function(_0x4fd5fe){_0x1a80d0[_0x94ec('0x41')]=_0x4fd5fe;return _0x1a80d0;})[_0x94ec('0x22')](respondWithFilteredResult(_0x5cdf6a,_0x28e5ac))[_0x94ec('0x42')](handleError(_0x5cdf6a,null));})[_0x94ec('0x42')](handleError(_0x5cdf6a,null));};exports[_0x94ec('0x43')]=function(_0x3ed759,_0x5b23d1){var _0x1141ac={'raw':![],'where':{'id':_0x3ed759[_0x94ec('0x44')]['id']}},_0x35be76={};_0x35be76[_0x94ec('0x32')]=_['keys'](db[_0x94ec('0x2c')][_0x94ec('0x45')]);_0x35be76[_0x94ec('0x2f')]=_[_0x94ec('0x2e')](_0x3ed759['query']);_0x35be76[_0x94ec('0x30')]=_[_0x94ec('0x31')](_0x35be76[_0x94ec('0x32')],_0x35be76[_0x94ec('0x2f')]);_0x1141ac['attributes']=_[_0x94ec('0x31')](_0x35be76[_0x94ec('0x32')],qs[_0x94ec('0x33')](_0x3ed759[_0x94ec('0x2f')][_0x94ec('0x33')]));_0x1141ac[_0x94ec('0x34')]=_0x1141ac[_0x94ec('0x34')][_0x94ec('0x46')]?_0x1141ac[_0x94ec('0x34')]:_0x35be76[_0x94ec('0x32')];if(_0x3ed759[_0x94ec('0x2f')][_0x94ec('0x3f')]){_0x1141ac[_0x94ec('0x47')]=[{'all':!![]}];}_0x1141ac=_[_0x94ec('0x3d')]({},_0x1141ac,_0x3ed759['options']);return db['CmCompany'][_0x94ec('0x48')](_0x1141ac)[_0x94ec('0x22')](handleEntityNotFound(_0x5b23d1,null))[_0x94ec('0x22')](respondWithResult(_0x5b23d1,null))[_0x94ec('0x42')](handleError(_0x5b23d1,null));};exports[_0x94ec('0x49')]=function(_0x20d138,_0x5239eb){return db[_0x94ec('0x2c')]['create'](_0x20d138[_0x94ec('0x4a')],{})['then'](function(_0x542970){var _0xa24e6b=_0x20d138[_0x94ec('0x4b')][_0x94ec('0x24')]({'plain':!![]});if(!_0xa24e6b)throw new Error(_0x94ec('0x4c'));if(_0xa24e6b[_0x94ec('0x4d')]===_0x94ec('0x4b')){var _0x3e35ff=_0x542970['get']({'plain':!![]});var _0xfefcaf=_0x94ec('0x25');return db[_0x94ec('0x4e')]['find']({'where':{'name':_0xfefcaf,'userProfileId':_0xa24e6b[_0x94ec('0x4f')]},'raw':!![]})[_0x94ec('0x22')](function(_0x36e755){if(_0x36e755&&_0x36e755['autoAssociation']===0x0){return db[_0x94ec('0x26')][_0x94ec('0x49')]({'name':_0x3e35ff[_0x94ec('0x29')],'resourceId':_0x3e35ff['id'],'type':_0x36e755[_0x94ec('0x29')],'sectionId':_0x36e755['id']},{})[_0x94ec('0x22')](function(){return _0x542970;});}else{return _0x542970;}})[_0x94ec('0x42')](function(_0x4bd40f){logger[_0x94ec('0x27')](_0x94ec('0x50'),_0x4bd40f);throw _0x4bd40f;});}return _0x542970;})[_0x94ec('0x22')](respondWithResult(_0x5239eb,0xc9))[_0x94ec('0x42')](handleError(_0x5239eb,null));};exports[_0x94ec('0x51')]=function(_0x10ab48,_0x24236c){if(_0x10ab48['body']['id']){delete _0x10ab48['body']['id'];}return db[_0x94ec('0x2c')][_0x94ec('0x48')]({'where':{'id':_0x10ab48[_0x94ec('0x44')]['id']}})[_0x94ec('0x22')](handleEntityNotFound(_0x24236c,null))[_0x94ec('0x22')](saveUpdates(_0x10ab48[_0x94ec('0x4a')],null))[_0x94ec('0x22')](respondWithResult(_0x24236c,null))['catch'](handleError(_0x24236c,null));};exports[_0x94ec('0x23')]=function(_0x497b23,_0x3be381){return db[_0x94ec('0x2c')][_0x94ec('0x48')]({'where':{'id':_0x497b23[_0x94ec('0x44')]['id']}})[_0x94ec('0x22')](handleEntityNotFound(_0x3be381,null))[_0x94ec('0x22')](removeEntity(_0x3be381,null))['catch'](handleError(_0x3be381,null));};exports['describe']=function(_0x5f3b22,_0xd8ba0d){return db[_0x94ec('0x2c')]['describe']()[_0x94ec('0x22')](respondWithResult(_0xd8ba0d,null))[_0x94ec('0x42')](handleError(_0xd8ba0d,null));};exports[_0x94ec('0x52')]=function(_0x565e76,_0xeffe14,_0x200f91){return db['CmContact'][_0x94ec('0x48')]({'where':{'id':_0x565e76['params']['id']}})[_0x94ec('0x22')](handleEntityNotFound(_0xeffe14,null))[_0x94ec('0x22')](function(_0x4bf46c){if(_0x4bf46c){return _0x4bf46c[_0x94ec('0x52')](_0x565e76['body'][_0x94ec('0x53')],_[_0x94ec('0x54')](_0x565e76[_0x94ec('0x4a')],[_0x94ec('0x53'),'id'])||{});}})[_0x94ec('0x22')](respondWithResult(_0xeffe14,null))[_0x94ec('0x42')](handleError(_0xeffe14,null));};exports[_0x94ec('0x55')]=function(_0x49af69,_0x363578,_0x26c9c7){var _0x2d53fa={};var _0x1b6769={};var _0x4a4133;var _0x1a699a;return db[_0x94ec('0x2c')][_0x94ec('0x56')]({'where':{'id':_0x49af69[_0x94ec('0x44')]['id']}})[_0x94ec('0x22')](handleEntityNotFound(_0x363578,null))[_0x94ec('0x22')](function(_0x2b83ff){if(_0x2b83ff){_0x4a4133=_0x2b83ff;_0x1b6769[_0x94ec('0x32')]=_[_0x94ec('0x2e')](db[_0x94ec('0x57')][_0x94ec('0x45')]);_0x1b6769[_0x94ec('0x2f')]=_[_0x94ec('0x2e')](_0x49af69[_0x94ec('0x2f')]);_0x1b6769['filters']=_[_0x94ec('0x31')](_0x1b6769[_0x94ec('0x32')],_0x1b6769[_0x94ec('0x2f')]);_0x2d53fa[_0x94ec('0x34')]=_[_0x94ec('0x31')](_0x1b6769['model'],qs[_0x94ec('0x33')](_0x49af69['query'][_0x94ec('0x33')]));_0x2d53fa['attributes']=_0x2d53fa[_0x94ec('0x34')]['length']?_0x2d53fa[_0x94ec('0x34')]:_0x1b6769[_0x94ec('0x32')];_0x2d53fa[_0x94ec('0x37')]=qs[_0x94ec('0x38')](_0x49af69['query'][_0x94ec('0x38')]);_0x2d53fa[_0x94ec('0x3b')]=qs['filters'](_['pick'](_0x49af69[_0x94ec('0x2f')],_0x1b6769['filters']));if(_0x49af69['query'][_0x94ec('0x3a')]){_0x2d53fa['where']=_[_0x94ec('0x3d')](_0x2d53fa[_0x94ec('0x3b')],{'$or':_[_0x94ec('0x3c')](_0x2d53fa[_0x94ec('0x34')],function(_0xfb2130){var _0x1d0e00={};_0x1d0e00[_0xfb2130]={'$like':'%'+_0x49af69['query'][_0x94ec('0x3a')]+'%'};return _0x1d0e00;})});}_0x2d53fa=_[_0x94ec('0x3d')]({},_0x2d53fa,_0x49af69[_0x94ec('0x3e')]);return _0x4a4133[_0x94ec('0x55')](_0x2d53fa);}})['then'](function(_0x57d646){if(_0x57d646){_0x1a699a=_0x57d646[_0x94ec('0x46')];if(!_0x49af69[_0x94ec('0x2f')][_0x94ec('0x35')](_0x94ec('0x36'))){_0x2d53fa[_0x94ec('0x1c')]=qs[_0x94ec('0x1c')](_0x49af69[_0x94ec('0x2f')][_0x94ec('0x1c')]);_0x2d53fa['offset']=qs[_0x94ec('0x1a')](_0x49af69[_0x94ec('0x2f')]['offset']);}return _0x4a4133[_0x94ec('0x55')](_0x2d53fa);}})[_0x94ec('0x22')](function(_0x4f7ea3){if(_0x4f7ea3){return _0x4f7ea3?{'count':_0x1a699a,'rows':_0x4f7ea3}:null;}})[_0x94ec('0x22')](respondWithResult(_0x363578,null))[_0x94ec('0x42')](handleError(_0x363578,null));};
\ No newline at end of file
+var _0xd279=['Companies','end','error','stack','name','CmCompany','describe','model','keys','query','filters','intersection','attributes','fields','length','nolimit','order','sort','filter','where','merge','options','includeAll','include','findAll','rows','catch','show','params','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','addContacts','ids','omit','getContacts','findOne','CmContact','rawAttributes','pick','map','hasOwnProperty','eml-format','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','reject','save','update','then','destroy','get'];(function(_0x35011c,_0x3568c5){var _0x4aa873=function(_0x459d2c){while(--_0x459d2c){_0x35011c['push'](_0x35011c['shift']());}};_0x4aa873(++_0x3568c5);}(_0xd279,0x8a));var _0x9d27=function(_0x20fcc6,_0x56b060){_0x20fcc6=_0x20fcc6-0x0;var _0x4621c2=_0xd279[_0x20fcc6];return _0x4621c2;};'use strict';var emlformat=require(_0x9d27('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x9d27('0x1'));var rp=require(_0x9d27('0x2'));var moment=require(_0x9d27('0x3'));var BPromise=require(_0x9d27('0x4'));var Mustache=require(_0x9d27('0x5'));var util=require(_0x9d27('0x6'));var path=require(_0x9d27('0x7'));var sox=require(_0x9d27('0x8'));var csv=require('to-csv');var ejs=require(_0x9d27('0x9'));var fs=require('fs');var fs_extra=require(_0x9d27('0xa'));var _=require(_0x9d27('0xb'));var squel=require(_0x9d27('0xc'));var crypto=require(_0x9d27('0xd'));var jsforce=require(_0x9d27('0xe'));var deskjs=require(_0x9d27('0xf'));var toCsv=require(_0x9d27('0x10'));var querystring=require('querystring');var Papa=require(_0x9d27('0x11'));var Redis=require(_0x9d27('0x12'));var authService=require(_0x9d27('0x13'));var qs=require(_0x9d27('0x14'));var as=require(_0x9d27('0x15'));var hardwareService=require(_0x9d27('0x16'));var logger=require(_0x9d27('0x17'))(_0x9d27('0x18'));var utils=require('../../config/utils');var config=require(_0x9d27('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0x9d27('0x1a'))['db'];function respondWithStatusCode(_0x5b33c6,_0x295165){_0x295165=_0x295165||0xcc;return function(_0x23c1ff){if(_0x23c1ff){return _0x5b33c6[_0x9d27('0x1b')](_0x295165);}return _0x5b33c6[_0x9d27('0x1c')](_0x295165)['end']();};}function respondWithResult(_0x2792a4,_0x3e325d){_0x3e325d=_0x3e325d||0xc8;return function(_0x2a69f1){if(_0x2a69f1){return _0x2792a4[_0x9d27('0x1c')](_0x3e325d)[_0x9d27('0x1d')](_0x2a69f1);}};}function respondWithFilteredResult(_0x2fe7d5,_0x1f91ab){return function(_0x3cd025){if(_0x3cd025){var _0x17adac=typeof _0x1f91ab[_0x9d27('0x1e')]===_0x9d27('0x1f')&&typeof _0x1f91ab[_0x9d27('0x20')]===_0x9d27('0x1f');var _0x5a90d8=_0x3cd025[_0x9d27('0x21')];var _0x48b285=_0x17adac?0x0:_0x1f91ab['offset'];var _0xdbce7c=_0x17adac?_0x3cd025[_0x9d27('0x21')]:_0x1f91ab[_0x9d27('0x1e')]+_0x1f91ab[_0x9d27('0x20')];var _0x177411;if(_0xdbce7c>=_0x5a90d8){_0xdbce7c=_0x5a90d8;_0x177411=0xc8;}else{_0x177411=0xce;}_0x2fe7d5[_0x9d27('0x1c')](_0x177411);return _0x2fe7d5[_0x9d27('0x22')](_0x9d27('0x23'),_0x48b285+'-'+_0xdbce7c+'/'+_0x5a90d8)[_0x9d27('0x1d')](_0x3cd025);}return null;};}function patchUpdates(_0x3d2631){return function(_0x407709){try{jsonpatch['apply'](_0x407709,_0x3d2631,!![]);}catch(_0x35d66a){return BPromise[_0x9d27('0x24')](_0x35d66a);}return _0x407709[_0x9d27('0x25')]();};}function saveUpdates(_0x167012,_0xab43f9){return function(_0x42353b){if(_0x42353b){return _0x42353b[_0x9d27('0x26')](_0x167012)[_0x9d27('0x27')](function(_0x715b1d){return _0x715b1d;});}return null;};}function removeEntity(_0x54dbb2,_0x14879d){return function(_0x58361a){if(_0x58361a){return _0x58361a[_0x9d27('0x28')]()[_0x9d27('0x27')](function(){var _0x2e5da8=_0x58361a[_0x9d27('0x29')]({'plain':!![]});var _0x441bb9=_0x9d27('0x2a');return db['UserProfileResource'][_0x9d27('0x28')]({'where':{'type':_0x441bb9,'resourceId':_0x2e5da8['id']}})[_0x9d27('0x27')](function(){return _0x58361a;});})[_0x9d27('0x27')](function(){_0x54dbb2[_0x9d27('0x1c')](0xcc)[_0x9d27('0x2b')]();});}};}function handleEntityNotFound(_0x474dfb,_0x229787){return function(_0x28d7db){if(!_0x28d7db){_0x474dfb['sendStatus'](0x194);}return _0x28d7db;};}function handleError(_0x48ee9a,_0x2dd4ea){_0x2dd4ea=_0x2dd4ea||0x1f4;return function(_0x387ae0){logger[_0x9d27('0x2c')](_0x387ae0[_0x9d27('0x2d')]);if(_0x387ae0[_0x9d27('0x2e')]){delete _0x387ae0[_0x9d27('0x2e')];}_0x48ee9a[_0x9d27('0x1c')](_0x2dd4ea)['send'](_0x387ae0);};}exports['index']=function(_0x2a6f4e,_0x5d7215){var _0x523e3f={},_0x5ae72f={},_0x57f49b={'count':0x0,'rows':[]};return db[_0x9d27('0x2f')][_0x9d27('0x30')]()['then'](function(_0x209718){_0x5ae72f[_0x9d27('0x31')]=_[_0x9d27('0x32')](_0x209718);_0x5ae72f[_0x9d27('0x33')]=_['keys'](_0x2a6f4e['query']);_0x5ae72f[_0x9d27('0x34')]=_[_0x9d27('0x35')](_0x5ae72f['model'],_0x5ae72f[_0x9d27('0x33')]);_0x523e3f[_0x9d27('0x36')]=_[_0x9d27('0x35')](_0x5ae72f['model'],qs[_0x9d27('0x37')](_0x2a6f4e[_0x9d27('0x33')][_0x9d27('0x37')]));_0x523e3f[_0x9d27('0x36')]=_0x523e3f[_0x9d27('0x36')][_0x9d27('0x38')]?_0x523e3f[_0x9d27('0x36')]:_0x5ae72f[_0x9d27('0x31')];if(!_0x2a6f4e['query']['hasOwnProperty'](_0x9d27('0x39'))){_0x523e3f[_0x9d27('0x20')]=qs[_0x9d27('0x20')](_0x2a6f4e[_0x9d27('0x33')][_0x9d27('0x20')]);_0x523e3f[_0x9d27('0x1e')]=qs[_0x9d27('0x1e')](_0x2a6f4e[_0x9d27('0x33')][_0x9d27('0x1e')]);}_0x523e3f[_0x9d27('0x3a')]=qs['sort'](_0x2a6f4e[_0x9d27('0x33')][_0x9d27('0x3b')]);_0x523e3f['where']=qs['filters'](_['pick'](_0x2a6f4e[_0x9d27('0x33')],_0x5ae72f[_0x9d27('0x34')]),_0x209718);if(_0x2a6f4e[_0x9d27('0x33')][_0x9d27('0x3c')]){_0x523e3f[_0x9d27('0x3d')]=_['merge'](_0x523e3f['where'],{'$or':_['map'](_0x523e3f[_0x9d27('0x36')],function(_0x185eec){var _0x1847de={};_0x1847de[_0x185eec]={'$like':'%'+_0x2a6f4e[_0x9d27('0x33')][_0x9d27('0x3c')]+'%'};return _0x1847de;})});}_0x523e3f=_[_0x9d27('0x3e')]({},_0x523e3f,_0x2a6f4e[_0x9d27('0x3f')]);var _0x20f728={'where':_0x523e3f[_0x9d27('0x3d')]};return db[_0x9d27('0x2f')][_0x9d27('0x21')](_0x20f728)[_0x9d27('0x27')](function(_0x448e2b){_0x57f49b['count']=_0x448e2b;if(_0x2a6f4e[_0x9d27('0x33')][_0x9d27('0x40')]){_0x523e3f[_0x9d27('0x41')]=[{'all':!![]}];}return db[_0x9d27('0x2f')][_0x9d27('0x42')](_0x523e3f);})[_0x9d27('0x27')](function(_0x3e0c6a){_0x57f49b[_0x9d27('0x43')]=_0x3e0c6a;return _0x57f49b;})[_0x9d27('0x27')](respondWithFilteredResult(_0x5d7215,_0x523e3f))['catch'](handleError(_0x5d7215,null));})[_0x9d27('0x44')](handleError(_0x5d7215,null));};exports[_0x9d27('0x45')]=function(_0x1686c6,_0x4cc8d1){var _0x58d97f={'raw':![],'where':{'id':_0x1686c6[_0x9d27('0x46')]['id']}},_0x1f599f={};_0x1f599f['model']=_[_0x9d27('0x32')](db['CmCompany']['rawAttributes']);_0x1f599f[_0x9d27('0x33')]=_[_0x9d27('0x32')](_0x1686c6[_0x9d27('0x33')]);_0x1f599f[_0x9d27('0x34')]=_[_0x9d27('0x35')](_0x1f599f['model'],_0x1f599f[_0x9d27('0x33')]);_0x58d97f[_0x9d27('0x36')]=_['intersection'](_0x1f599f[_0x9d27('0x31')],qs[_0x9d27('0x37')](_0x1686c6['query']['fields']));_0x58d97f['attributes']=_0x58d97f[_0x9d27('0x36')]['length']?_0x58d97f['attributes']:_0x1f599f[_0x9d27('0x31')];if(_0x1686c6[_0x9d27('0x33')][_0x9d27('0x40')]){_0x58d97f[_0x9d27('0x41')]=[{'all':!![]}];}_0x58d97f=_[_0x9d27('0x3e')]({},_0x58d97f,_0x1686c6[_0x9d27('0x3f')]);return db[_0x9d27('0x2f')][_0x9d27('0x47')](_0x58d97f)[_0x9d27('0x27')](handleEntityNotFound(_0x4cc8d1,null))[_0x9d27('0x27')](respondWithResult(_0x4cc8d1,null))['catch'](handleError(_0x4cc8d1,null));};exports['create']=function(_0x2e09dc,_0x2407ca){return db['CmCompany'][_0x9d27('0x48')](_0x2e09dc['body'],{})[_0x9d27('0x27')](function(_0x4a172b){var _0x395a28=_0x2e09dc[_0x9d27('0x49')][_0x9d27('0x29')]({'plain':!![]});if(!_0x395a28)throw new Error(_0x9d27('0x4a'));if(_0x395a28[_0x9d27('0x4b')]===_0x9d27('0x49')){var _0x1b76b5=_0x4a172b[_0x9d27('0x29')]({'plain':!![]});var _0x365a36=_0x9d27('0x2a');return db['UserProfileSection'][_0x9d27('0x47')]({'where':{'name':_0x365a36,'userProfileId':_0x395a28[_0x9d27('0x4c')]},'raw':!![]})[_0x9d27('0x27')](function(_0x1a4d5){if(_0x1a4d5&&_0x1a4d5[_0x9d27('0x4d')]===0x0){return db['UserProfileResource'][_0x9d27('0x48')]({'name':_0x1b76b5[_0x9d27('0x2e')],'resourceId':_0x1b76b5['id'],'type':_0x1a4d5[_0x9d27('0x2e')],'sectionId':_0x1a4d5['id']},{})[_0x9d27('0x27')](function(){return _0x4a172b;});}else{return _0x4a172b;}})['catch'](function(_0x4bbf4f){logger['error'](_0x9d27('0x4e'),_0x4bbf4f);throw _0x4bbf4f;});}return _0x4a172b;})['then'](respondWithResult(_0x2407ca,0xc9))[_0x9d27('0x44')](handleError(_0x2407ca,null));};exports[_0x9d27('0x26')]=function(_0x238bc7,_0x371dc0){if(_0x238bc7[_0x9d27('0x4f')]['id']){delete _0x238bc7['body']['id'];}return db['CmCompany'][_0x9d27('0x47')]({'where':{'id':_0x238bc7[_0x9d27('0x46')]['id']}})['then'](handleEntityNotFound(_0x371dc0,null))['then'](saveUpdates(_0x238bc7[_0x9d27('0x4f')],null))['then'](respondWithResult(_0x371dc0,null))[_0x9d27('0x44')](handleError(_0x371dc0,null));};exports[_0x9d27('0x28')]=function(_0x46db1b,_0x5e6aed){return db[_0x9d27('0x2f')]['find']({'where':{'id':_0x46db1b[_0x9d27('0x46')]['id']}})[_0x9d27('0x27')](handleEntityNotFound(_0x5e6aed,null))['then'](removeEntity(_0x5e6aed,null))[_0x9d27('0x44')](handleError(_0x5e6aed,null));};exports[_0x9d27('0x30')]=function(_0x40d16e,_0x2d1e03){return db[_0x9d27('0x2f')][_0x9d27('0x30')]()[_0x9d27('0x27')](respondWithResult(_0x2d1e03,null))[_0x9d27('0x44')](handleError(_0x2d1e03,null));};exports[_0x9d27('0x50')]=function(_0x22f29b,_0x537dae,_0x164c72){return db['CmContact'][_0x9d27('0x47')]({'where':{'id':_0x22f29b[_0x9d27('0x46')]['id']}})['then'](handleEntityNotFound(_0x537dae,null))[_0x9d27('0x27')](function(_0x447cea){if(_0x447cea){return _0x447cea['addContacts'](_0x22f29b[_0x9d27('0x4f')][_0x9d27('0x51')],_[_0x9d27('0x52')](_0x22f29b[_0x9d27('0x4f')],[_0x9d27('0x51'),'id'])||{});}})[_0x9d27('0x27')](respondWithResult(_0x537dae,null))[_0x9d27('0x44')](handleError(_0x537dae,null));};exports[_0x9d27('0x53')]=function(_0x18e250,_0x4fb0e,_0x56eb06){var _0x2c5cdd={};var _0x552d7c={};var _0x32c605;var _0x247304;return db['CmCompany'][_0x9d27('0x54')]({'where':{'id':_0x18e250[_0x9d27('0x46')]['id']}})[_0x9d27('0x27')](handleEntityNotFound(_0x4fb0e,null))[_0x9d27('0x27')](function(_0x382f44){if(_0x382f44){_0x32c605=_0x382f44;_0x552d7c['model']=_[_0x9d27('0x32')](db[_0x9d27('0x55')][_0x9d27('0x56')]);_0x552d7c['query']=_[_0x9d27('0x32')](_0x18e250[_0x9d27('0x33')]);_0x552d7c['filters']=_[_0x9d27('0x35')](_0x552d7c[_0x9d27('0x31')],_0x552d7c['query']);_0x2c5cdd[_0x9d27('0x36')]=_['intersection'](_0x552d7c['model'],qs[_0x9d27('0x37')](_0x18e250[_0x9d27('0x33')][_0x9d27('0x37')]));_0x2c5cdd[_0x9d27('0x36')]=_0x2c5cdd[_0x9d27('0x36')][_0x9d27('0x38')]?_0x2c5cdd[_0x9d27('0x36')]:_0x552d7c[_0x9d27('0x31')];_0x2c5cdd[_0x9d27('0x3a')]=qs[_0x9d27('0x3b')](_0x18e250[_0x9d27('0x33')][_0x9d27('0x3b')]);_0x2c5cdd['where']=qs['filters'](_[_0x9d27('0x57')](_0x18e250[_0x9d27('0x33')],_0x552d7c[_0x9d27('0x34')]));if(_0x18e250[_0x9d27('0x33')][_0x9d27('0x3c')]){_0x2c5cdd[_0x9d27('0x3d')]=_['merge'](_0x2c5cdd[_0x9d27('0x3d')],{'$or':_[_0x9d27('0x58')](_0x2c5cdd[_0x9d27('0x36')],function(_0xb193d8){var _0x55a186={};_0x55a186[_0xb193d8]={'$like':'%'+_0x18e250[_0x9d27('0x33')]['filter']+'%'};return _0x55a186;})});}_0x2c5cdd=_[_0x9d27('0x3e')]({},_0x2c5cdd,_0x18e250[_0x9d27('0x3f')]);return _0x32c605[_0x9d27('0x53')](_0x2c5cdd);}})[_0x9d27('0x27')](function(_0x48b210){if(_0x48b210){_0x247304=_0x48b210['length'];if(!_0x18e250['query'][_0x9d27('0x59')](_0x9d27('0x39'))){_0x2c5cdd[_0x9d27('0x20')]=qs[_0x9d27('0x20')](_0x18e250['query'][_0x9d27('0x20')]);_0x2c5cdd[_0x9d27('0x1e')]=qs[_0x9d27('0x1e')](_0x18e250[_0x9d27('0x33')][_0x9d27('0x1e')]);}return _0x32c605[_0x9d27('0x53')](_0x2c5cdd);}})[_0x9d27('0x27')](function(_0x19426f){if(_0x19426f){return _0x19426f?{'count':_0x247304,'rows':_0x19426f}:null;}})['then'](respondWithResult(_0x4fb0e,null))[_0x9d27('0x44')](handleError(_0x4fb0e,null));};
\ No newline at end of file
index 39e89f8..98f2f87 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5e96=['request-promise','path','rimraf','exports','define','CmCompany','lodash','util','api','moment','bluebird'];(function(_0x52825d,_0x213675){var _0x38c510=function(_0x4bf8e0){while(--_0x4bf8e0){_0x52825d['push'](_0x52825d['shift']());}};_0x38c510(++_0x213675);}(_0x5e96,0x145));var _0x65e9=function(_0x2ac238,_0x25553b){_0x2ac238=_0x2ac238-0x0;var _0x1e537e=_0x5e96[_0x2ac238];return _0x1e537e;};'use strict';var _=require(_0x65e9('0x0'));var util=require(_0x65e9('0x1'));var logger=require('../../config/logger')(_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('./cmCompany.attributes');module[_0x65e9('0x8')]=function(_0x2a7667,_0x3a370f){return _0x2a7667[_0x65e9('0x9')](_0x65e9('0xa'),attributes,{'tableName':'cm_companies','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x37c8=['moment','bluebird','request-promise','path','./cmCompany.attributes','exports','define','lodash','util','../../config/logger'];(function(_0x1b828b,_0x344400){var _0x98da1a=function(_0x1a0f5b){while(--_0x1a0f5b){_0x1b828b['push'](_0x1b828b['shift']());}};_0x98da1a(++_0x344400);}(_0x37c8,0xbb));var _0x837c=function(_0x2160a9,_0x3cbd9e){_0x2160a9=_0x2160a9-0x0;var _0xa88cf7=_0x37c8[_0x2160a9];return _0xa88cf7;};'use strict';var _=require(_0x837c('0x0'));var util=require(_0x837c('0x1'));var logger=require(_0x837c('0x2'))('api');var moment=require(_0x837c('0x3'));var BPromise=require(_0x837c('0x4'));var rp=require(_0x837c('0x5'));var fs=require('fs');var path=require(_0x837c('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x837c('0x7'));module[_0x837c('0x8')]=function(_0x28edf6,_0x537be3){return _0x28edf6[_0x837c('0x9')]('CmCompany',attributes,{'tableName':'cm_companies','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index d1ca009..4dca175 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2ad3=['lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','then','info','debug','request\x20sent','stringify','error','code','CmCompany,\x20%s,\x20%s','message','result'];(function(_0x290694,_0x281935){var _0x5a0f2e=function(_0x58d7d4){while(--_0x58d7d4){_0x290694['push'](_0x290694['shift']());}};_0x5a0f2e(++_0x281935);}(_0x2ad3,0x1b9));var _0x32ad=function(_0x2b7764,_0x2606f1){_0x2b7764=_0x2b7764-0x0;var _0x848dcb=_0x2ad3[_0x2b7764];return _0x848dcb;};'use strict';var _=require(_0x32ad('0x0'));var util=require(_0x32ad('0x1'));var moment=require('moment');var BPromise=require(_0x32ad('0x2'));var rs=require(_0x32ad('0x3'));var fs=require('fs');var Redis=require(_0x32ad('0x4'));var db=require(_0x32ad('0x5'))['db'];var utils=require(_0x32ad('0x6'));var logger=require(_0x32ad('0x7'))(_0x32ad('0x8'));var config=require('../../config/environment');var jayson=require(_0x32ad('0x9'));var client=jayson[_0x32ad('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2cd71a,_0x304dfb,_0x45210c){return new BPromise(function(_0x22eb53,_0x1ec5bd){return client['request'](_0x2cd71a,_0x45210c)[_0x32ad('0xb')](function(_0x38132d){logger[_0x32ad('0xc')]('CmCompany,\x20%s,\x20%s',_0x304dfb,'request\x20sent');logger[_0x32ad('0xd')]('CmCompany,\x20%s,\x20%s,\x20%s',_0x304dfb,_0x32ad('0xe'),JSON[_0x32ad('0xf')](_0x38132d));if(_0x38132d[_0x32ad('0x10')]){if(_0x38132d['error'][_0x32ad('0x11')]===0x1f4){logger[_0x32ad('0x10')](_0x32ad('0x12'),_0x304dfb,_0x38132d[_0x32ad('0x10')][_0x32ad('0x13')]);return _0x1ec5bd(_0x38132d[_0x32ad('0x10')][_0x32ad('0x13')]);}logger[_0x32ad('0x10')]('CmCompany,\x20%s,\x20%s',_0x304dfb,_0x38132d[_0x32ad('0x10')][_0x32ad('0x13')]);return _0x22eb53(_0x38132d[_0x32ad('0x10')]['message']);}else{logger['info'](_0x32ad('0x12'),_0x304dfb,_0x32ad('0xe'));_0x22eb53(_0x38132d[_0x32ad('0x14')][_0x32ad('0x13')]);}})['catch'](function(_0x12540b){logger[_0x32ad('0x10')](_0x32ad('0x12'),_0x304dfb,_0x12540b);_0x1ec5bd(_0x12540b);});});}
\ No newline at end of file
+var _0x77c4=['client','request','info','CmCompany,\x20%s,\x20%s','request\x20sent','CmCompany,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0xa2cf96,_0x143344){var _0x3045e8=function(_0x5a4279){while(--_0x5a4279){_0xa2cf96['push'](_0xa2cf96['shift']());}};_0x3045e8(++_0x143344);}(_0x77c4,0xa6));var _0x477c=function(_0x219000,_0xf20e99){_0x219000=_0x219000-0x0;var _0x364123=_0x77c4[_0x219000];return _0x364123;};'use strict';var _=require('lodash');var util=require(_0x477c('0x0'));var moment=require(_0x477c('0x1'));var BPromise=require(_0x477c('0x2'));var rs=require(_0x477c('0x3'));var fs=require('fs');var Redis=require(_0x477c('0x4'));var db=require(_0x477c('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x477c('0x6'))(_0x477c('0x7'));var config=require(_0x477c('0x8'));var jayson=require(_0x477c('0x9'));var client=jayson[_0x477c('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1c8b05,_0x741028,_0x57afcf){return new BPromise(function(_0x2da1e4,_0x277e5d){return client[_0x477c('0xb')](_0x1c8b05,_0x57afcf)['then'](function(_0x56077d){logger[_0x477c('0xc')](_0x477c('0xd'),_0x741028,_0x477c('0xe'));logger['debug'](_0x477c('0xf'),_0x741028,'request\x20sent',JSON[_0x477c('0x10')](_0x56077d));if(_0x56077d['error']){if(_0x56077d[_0x477c('0x11')][_0x477c('0x12')]===0x1f4){logger[_0x477c('0x11')]('CmCompany,\x20%s,\x20%s',_0x741028,_0x56077d[_0x477c('0x11')][_0x477c('0x13')]);return _0x277e5d(_0x56077d[_0x477c('0x11')][_0x477c('0x13')]);}logger[_0x477c('0x11')]('CmCompany,\x20%s,\x20%s',_0x741028,_0x56077d[_0x477c('0x11')][_0x477c('0x13')]);return _0x2da1e4(_0x56077d[_0x477c('0x11')][_0x477c('0x13')]);}else{logger[_0x477c('0xc')](_0x477c('0xd'),_0x741028,_0x477c('0xe'));_0x2da1e4(_0x56077d[_0x477c('0x14')][_0x477c('0x13')]);}})[_0x477c('0x15')](function(_0x316aca){logger['error'](_0x477c('0xd'),_0x741028,_0x316aca);_0x277e5d(_0x316aca);});});}
\ No newline at end of file
index 2f5a790..e07c16c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf52b=['../../components/auth/service','../../components/interaction/service','./cmCompany.controller','isAuthenticated','get','/describe','/:id','show','/:id/contacts','getContacts','post','create','addContacts','put','update','delete','exports','multer','util','express','Router','fs-extra'];(function(_0x3feb5f,_0x45cc31){var _0x5c4911=function(_0xf197c9){while(--_0xf197c9){_0x3feb5f['push'](_0x3feb5f['shift']());}};_0x5c4911(++_0x45cc31);}(_0xf52b,0x119));var _0xbf52=function(_0x2bf141,_0x31eac7){_0x2bf141=_0x2bf141-0x0;var _0x48277b=_0xf52b[_0x2bf141];return _0x48277b;};'use strict';var multer=require(_0xbf52('0x0'));var util=require(_0xbf52('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xbf52('0x2'));var router=express[_0xbf52('0x3')]();var fs_extra=require(_0xbf52('0x4'));var auth=require(_0xbf52('0x5'));var interaction=require(_0xbf52('0x6'));var config=require('../../config/environment');var controller=require(_0xbf52('0x7'));router['get']('/',auth[_0xbf52('0x8')](),controller['index']);router[_0xbf52('0x9')](_0xbf52('0xa'),auth['isAuthenticated'](),controller['describe']);router['get'](_0xbf52('0xb'),auth[_0xbf52('0x8')](),controller[_0xbf52('0xc')]);router[_0xbf52('0x9')](_0xbf52('0xd'),auth[_0xbf52('0x8')](),controller[_0xbf52('0xe')]);router[_0xbf52('0xf')]('/',auth[_0xbf52('0x8')](),controller[_0xbf52('0x10')]);router['post'](_0xbf52('0xd'),auth[_0xbf52('0x8')](),controller[_0xbf52('0x11')]);router[_0xbf52('0x12')]('/:id',auth['isAuthenticated'](),controller[_0xbf52('0x13')]);router[_0xbf52('0x14')](_0xbf52('0xb'),auth[_0xbf52('0x8')](),controller['destroy']);module[_0xbf52('0x15')]=router;
\ No newline at end of file
+var _0xcf06=['util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','./cmCompany.controller','get','isAuthenticated','describe','/:id','getContacts','post','create','put','update','delete','multer'];(function(_0x15c517,_0x247218){var _0x17d3c9=function(_0x26f92e){while(--_0x26f92e){_0x15c517['push'](_0x15c517['shift']());}};_0x17d3c9(++_0x247218);}(_0xcf06,0x8f));var _0x6cf0=function(_0x14d04b,_0x66bbb1){_0x14d04b=_0x14d04b-0x0;var _0x4d943b=_0xcf06[_0x14d04b];return _0x4d943b;};'use strict';var multer=require(_0x6cf0('0x0'));var util=require(_0x6cf0('0x1'));var path=require(_0x6cf0('0x2'));var timeout=require(_0x6cf0('0x3'));var express=require(_0x6cf0('0x4'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x6cf0('0x5'));var interaction=require(_0x6cf0('0x6'));var config=require('../../config/environment');var controller=require(_0x6cf0('0x7'));router[_0x6cf0('0x8')]('/',auth[_0x6cf0('0x9')](),controller['index']);router[_0x6cf0('0x8')]('/describe',auth[_0x6cf0('0x9')](),controller[_0x6cf0('0xa')]);router[_0x6cf0('0x8')](_0x6cf0('0xb'),auth[_0x6cf0('0x9')](),controller['show']);router[_0x6cf0('0x8')]('/:id/contacts',auth[_0x6cf0('0x9')](),controller[_0x6cf0('0xc')]);router[_0x6cf0('0xd')]('/',auth[_0x6cf0('0x9')](),controller[_0x6cf0('0xe')]);router[_0x6cf0('0xd')]('/:id/contacts',auth[_0x6cf0('0x9')](),controller['addContacts']);router[_0x6cf0('0xf')](_0x6cf0('0xb'),auth['isAuthenticated'](),controller[_0x6cf0('0x10')]);router[_0x6cf0('0x11')](_0x6cf0('0xb'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router;
\ No newline at end of file
index 37f0ec5..fba3c54 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3f9d=['exports','STRING','INTEGER','DATE','NOW','lodash','sequelize'];(function(_0x282dca,_0x1aa4d2){var _0x307f61=function(_0x340830){while(--_0x340830){_0x282dca['push'](_0x282dca['shift']());}};_0x307f61(++_0x1aa4d2);}(_0x3f9d,0x101));var _0xd3f9=function(_0x4cb03b,_0x47d402){_0x4cb03b=_0x4cb03b-0x0;var _0x132ba4=_0x3f9d[_0x4cb03b];return _0x132ba4;};'use strict';var _=require(_0xd3f9('0x0'));var Sequelize=require(_0xd3f9('0x1'));module[_0xd3f9('0x2')]={'firstName':{'type':Sequelize[_0xd3f9('0x3')],'allowNull':![]},'lastName':{'type':Sequelize[_0xd3f9('0x3')]},'street':{'type':Sequelize['STRING']},'postalCode':{'type':Sequelize['STRING']},'city':{'type':Sequelize['STRING']},'country':{'type':Sequelize[_0xd3f9('0x3')]},'dateOfBirth':{'type':Sequelize['STRING']},'description':{'type':Sequelize['TEXT']},'phone':{'type':Sequelize[_0xd3f9('0x3')]},'mobile':{'type':Sequelize[_0xd3f9('0x3')]},'fax':{'type':Sequelize[_0xd3f9('0x3')]},'email':{'type':Sequelize[_0xd3f9('0x3')]},'url':{'type':Sequelize['STRING']},'facebook':{'type':Sequelize[_0xd3f9('0x3')]},'fb_data':{'type':Sequelize['STRING']},'twitter':{'type':Sequelize[_0xd3f9('0x3')]},'skype':{'type':Sequelize[_0xd3f9('0x3')]},'teams':{'type':Sequelize[_0xd3f9('0x3')]},'viber':{'type':Sequelize['STRING']},'line':{'type':Sequelize['STRING']},'wechat':{'type':Sequelize[_0xd3f9('0x3')]},'telegram':{'type':Sequelize[_0xd3f9('0x3')]},'UserId':{'type':Sequelize[_0xd3f9('0x4')]},'AdditionalPhones':{'type':Sequelize['STRING']},'priority':{'type':Sequelize[_0xd3f9('0x4')](0x2)['UNSIGNED'],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize[_0xd3f9('0x5')],'defaultValue':Sequelize[_0xd3f9('0x6')]},'dialTimezone':{'type':Sequelize[_0xd3f9('0x3')]},'utcOffset':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
+var _0x8c16=['NOW','lodash','sequelize','exports','STRING','TEXT','INTEGER','UNSIGNED','DATE'];(function(_0x745b70,_0x1edb7f){var _0x1e4148=function(_0x3cc70d){while(--_0x3cc70d){_0x745b70['push'](_0x745b70['shift']());}};_0x1e4148(++_0x1edb7f);}(_0x8c16,0xa3));var _0x68c1=function(_0x297d71,_0x316d02){_0x297d71=_0x297d71-0x0;var _0x25e5d7=_0x8c16[_0x297d71];return _0x25e5d7;};'use strict';var _=require(_0x68c1('0x0'));var Sequelize=require(_0x68c1('0x1'));module[_0x68c1('0x2')]={'firstName':{'type':Sequelize['STRING'],'allowNull':![]},'lastName':{'type':Sequelize[_0x68c1('0x3')]},'street':{'type':Sequelize[_0x68c1('0x3')]},'postalCode':{'type':Sequelize[_0x68c1('0x3')]},'city':{'type':Sequelize['STRING']},'country':{'type':Sequelize['STRING']},'dateOfBirth':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x68c1('0x4')]},'phone':{'type':Sequelize[_0x68c1('0x3')]},'mobile':{'type':Sequelize[_0x68c1('0x3')]},'fax':{'type':Sequelize[_0x68c1('0x3')]},'email':{'type':Sequelize[_0x68c1('0x3')]},'url':{'type':Sequelize[_0x68c1('0x3')]},'facebook':{'type':Sequelize['STRING']},'fb_data':{'type':Sequelize[_0x68c1('0x3')]},'twitter':{'type':Sequelize['STRING']},'skype':{'type':Sequelize[_0x68c1('0x3')]},'teams':{'type':Sequelize[_0x68c1('0x3')]},'viber':{'type':Sequelize[_0x68c1('0x3')]},'line':{'type':Sequelize['STRING']},'wechat':{'type':Sequelize[_0x68c1('0x3')]},'telegram':{'type':Sequelize[_0x68c1('0x3')]},'UserId':{'type':Sequelize[_0x68c1('0x5')]},'AdditionalPhones':{'type':Sequelize['STRING']},'priority':{'type':Sequelize[_0x68c1('0x5')](0x2)[_0x68c1('0x6')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize[_0x68c1('0x7')],'defaultValue':Sequelize[_0x68c1('0x8')]},'dialTimezone':{'type':Sequelize[_0x68c1('0x3')]},'utcOffset':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
index 491a368..d9609dd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc1a5=['osName','ratingMessage','ratingType','subject','substatus','Interaction','flatten','reverse','slice','moment','bluebird','util','path','lodash','squel','papaparse','ioredis','../../components/contacts','../../components/parsers/qs','api','../../config/environment/shared','../../mysqldb','redis','localhost','socket.io-emitter','./cmContact.socket','register','status','offset','undefined','limit','count','Content-Range','json','then','end','error','name','send','index','describe','getOptions','findAll','user','destroy','CmContact','params','catch','tags','keys','length','startsWith','cf_','displayName','query','alias','custom','type','values','info','Custom\x20field\x20%s\x20not\x20found\x20on\x20cm_contacts\x20table','forEach','columnName','merge','body','from','get','isArray','join','[CmContact][merge]\x20to\x20%s\x20from\x20%s','[CmContact][merge][destroy][CmHopper],\x20%s','CmHopperBlack','[CmContact][merge][destroy][CmHopperBlack],\x20%s','create','update','ChatOfflineMessage','MailInteraction','MailMessage','SmsInteraction','FaxInteraction','FaxMessage','OpenchannelInteraction','OpenchannelMessage','CmContactHasItem','CmHopperHistory','VoiceCallReport','MailQueueReport','OpenchannelQueueReport','SmsQueueReport','JscriptySessionReport','WhatsappInteraction','WhatsappMessage','WhatsappQueueReport','isNil','dialTimezone','timezones','utcOffset','bulkCreate','duplicates','where','ListId','findOrCreate','spread','hasOwnProperty','additionalPhones','contact','show','find','Tag','Tags','tag','ContactItemType','sequelize','literal','Phones.OrderBy','CmCustomField','map','push','omit','pickBy','format','table','setFields','toParam','text','phone','CmHopper','getTags','findOne','rawAttributes','filters','intersection','model','attributes','fields','sort','pick','filter','options','nolimit','setTags','ids','setAdditionalPhones','all','items','item_types','ItemTypeId','description','OrderBy','contact\x20phone\x20exists','PHONE','CmHopperAdditionalPhone','item','ItemType','`ItemType`.OrderBy','ItemType.OrderBy','fromContactId','rescheduleAdditionalPhones','hopperId','getHoppers','ContactId','include','rows','getHopperHistories','includeAll','getHopperFinals','CmHopperFinal','order','No\x20association\x20keys\x20specified!','No\x20association\x20values\x20specified!','socket_timestamp','binding_keys','split','Incorrect\x20binding\x20parameters\x20passed!','zipObject','firstName','No\x20firstName\x20column\x20specified','root','server/files/tmp','file','chmodSync','0777','../../components/import/cm/csv','CompanyId','File\x20uploaded\x20correctly!','pid','parse','import','agent','No\x20ListId\x20specified','binding','No\x20phone\x20column\x20specified','child_process','fork','../../components/import/cm/csv2','stringify','message','exit','importUpdates','../../components/import/cm/csvUpdates','start\x20child\x20process\x20correctly!','error\x20child\x20process','getJourney','mail','chat','fax','voice','resolve','channel','includes','Invalid\x20channel','toLowerCase','range','isValid','Invalid\x20date\x20for\x20range\x20from\x20filter','source','destination','starttime','endtime','duration','note','createdAt','userDisposition','userSecondDisposition','userThirdDisposition','UserId','User','fullname','DESC','findAndCountAll','Website','Account','closed','closedAt','disposition','secondDisposition','thirdDisposition','Owner','color','customerIp','customerPort'];(function(_0x20908d,_0x527263){var _0x34a94c=function(_0x5a36ba){while(--_0x5a36ba){_0x20908d['push'](_0x20908d['shift']());}};_0x34a94c(++_0x527263);}(_0xc1a5,0xfa));var _0x5c1a=function(_0x4ab4fc,_0xa2c112){_0x4ab4fc=_0x4ab4fc-0x0;var _0x385734=_0xc1a5[_0x4ab4fc];return _0x385734;};'use strict';var moment=require(_0x5c1a('0x0'));var BPromise=require(_0x5c1a('0x1'));var util=require(_0x5c1a('0x2'));var path=require(_0x5c1a('0x3'));var fs=require('fs');var _=require(_0x5c1a('0x4'));var squel=require(_0x5c1a('0x5'));var Papa=require(_0x5c1a('0x6'));var Redis=require(_0x5c1a('0x7'));var contacts=require(_0x5c1a('0x8'));var qs=require(_0x5c1a('0x9'));var logger=require('../../config/logger')(_0x5c1a('0xa'));var config=require('../../config/environment');var shared=require(_0x5c1a('0xb'));var db=require(_0x5c1a('0xc'))['db'];config['redis']=_['defaults'](config[_0x5c1a('0xd')],{'host':_0x5c1a('0xe'),'port':0x18eb});var socket=require(_0x5c1a('0xf'))(new Redis(config[_0x5c1a('0xd')]));require(_0x5c1a('0x10'))[_0x5c1a('0x11')](socket);function respondWithResult(_0x15afe9,_0x2458e5){_0x2458e5=_0x2458e5||0xc8;return function(_0x40ebb3){if(_0x40ebb3){return _0x15afe9[_0x5c1a('0x12')](_0x2458e5)['json'](_0x40ebb3);}};}function respondWithFilteredResult(_0x3bbaa9,_0x5cea3b){return function(_0x5cd96c){if(_0x5cd96c){var _0xf372e0=typeof _0x5cea3b[_0x5c1a('0x13')]===_0x5c1a('0x14')&&typeof _0x5cea3b[_0x5c1a('0x15')]===_0x5c1a('0x14');var _0x2fd8b5=_0x5cd96c['count'];var _0x4ceb7d=_0xf372e0?0x0:_0x5cea3b[_0x5c1a('0x13')];var _0x28a0b6=_0xf372e0?_0x5cd96c[_0x5c1a('0x16')]:_0x5cea3b[_0x5c1a('0x13')]+_0x5cea3b[_0x5c1a('0x15')];var _0x373036;if(_0x28a0b6>=_0x2fd8b5){_0x28a0b6=_0x2fd8b5;_0x373036=0xc8;}else{_0x373036=0xce;}_0x3bbaa9[_0x5c1a('0x12')](_0x373036);return _0x3bbaa9['set'](_0x5c1a('0x17'),_0x4ceb7d+'-'+_0x28a0b6+'/'+_0x2fd8b5)[_0x5c1a('0x18')](_0x5cd96c);}return null;};}function saveUpdates(_0x3f5b34){return function(_0x4f5d86){if(_0x4f5d86){return _0x4f5d86['update'](_0x3f5b34)[_0x5c1a('0x19')](function(_0x5e5c25){return _0x5e5c25;});}return null;};}function removeEntity(_0x3059c1){return function(_0x4b9ff5){if(_0x4b9ff5){return _0x4b9ff5['destroy']()[_0x5c1a('0x19')](function(){_0x3059c1['status'](0xcc)[_0x5c1a('0x1a')]();});}};}function handleEntityNotFound(_0x17b08e){return function(_0x43efd3){if(!_0x43efd3){_0x17b08e['sendStatus'](0x194);}return _0x43efd3;};}function handleError(_0x4f8617,_0x3893bb){_0x3893bb=_0x3893bb||0x1f4;return function(_0x5ebcf4){logger[_0x5c1a('0x1b')](_0x5ebcf4['stack']);if(_0x5ebcf4[_0x5c1a('0x1c')]){delete _0x5ebcf4['name'];}_0x4f8617[_0x5c1a('0x12')](_0x3893bb)[_0x5c1a('0x1d')](_0x5ebcf4);};}exports[_0x5c1a('0x1e')]=function(_0x35c577,_0x17b309){var _0x29cfc8={};return contacts[_0x5c1a('0x1f')]()['then'](function(_0x401413){_0x29cfc8=qs[_0x5c1a('0x20')](_0x401413,_0x35c577);return contacts[_0x5c1a('0x21')](_0x35c577['query'],_0x35c577[_0x5c1a('0x22')],_0x29cfc8,_0x401413);})[_0x5c1a('0x19')](respondWithFilteredResult(_0x17b309,_0x29cfc8))['catch'](handleError(_0x17b309,null));};exports[_0x5c1a('0x23')]=function(_0x56ae6b,_0x587d0e){return db[_0x5c1a('0x24')]['find']({'where':{'id':_0x56ae6b[_0x5c1a('0x25')]['id']}})['then'](handleEntityNotFound(_0x587d0e,null))[_0x5c1a('0x19')](removeEntity(_0x587d0e,null))[_0x5c1a('0x26')](handleError(_0x587d0e,null));};exports[_0x5c1a('0x1f')]=function(_0x288acc,_0x2976c0){return db['CmContact'][_0x5c1a('0x1f')]()[_0x5c1a('0x19')](function(_0x577d6a){delete _0x577d6a[_0x5c1a('0x27')];for(var _0x25ae0b=0x0;_0x25ae0b<Object[_0x5c1a('0x28')](_0x577d6a)[_0x5c1a('0x29')];_0x25ae0b++){var _0xe40502=Object[_0x5c1a('0x28')](_0x577d6a)[_0x25ae0b];if(!_[_0x5c1a('0x2a')](_0xe40502,_0x5c1a('0x2b'))){_0x577d6a[_0xe40502]['columnName']=_0xe40502;_0x577d6a[_0xe40502][_0x5c1a('0x2c')]=_0xe40502;}}return _0x577d6a;})[_0x5c1a('0x19')](function(_0x4180d0){var _0xfe85d5={'where':Boolean(_0x288acc[_0x5c1a('0x2d')]['analytics'])===!![]?undefined:{'$or':[{'ListId':_0x288acc[_0x5c1a('0x2d')]['id']},{'ListId':null}]},'raw':!![]};return db['CmCustomField'][_0x5c1a('0x21')](_0xfe85d5)[_0x5c1a('0x19')](function(_0x5a6bce){for(var _0x22af5c=0x0;_0x22af5c<_0x5a6bce[_0x5c1a('0x29')];_0x22af5c++){var _0x2d67aa=_0x5c1a('0x2b')+_0x5a6bce[_0x22af5c]['id'];if(_0x4180d0[_0x2d67aa]){_0x4180d0[_0x2d67aa]['columnName']=_0x2d67aa;_0x4180d0[_0x2d67aa][_0x5c1a('0x2c')]=_0x5a6bce[_0x22af5c][_0x5c1a('0x2e')];_0x4180d0[_0x2d67aa][_0x5c1a('0x2f')]={'type':_0x5a6bce[_0x22af5c][_0x5c1a('0x30')],'values':_0x5a6bce[_0x22af5c][_0x5c1a('0x31')]};}else{logger[_0x5c1a('0x32')](_0x5c1a('0x33'),_0x2d67aa);}}Object[_0x5c1a('0x28')](_0x4180d0)[_0x5c1a('0x34')](function(_0x1f8135){if(!_0x4180d0[_0x1f8135]['hasOwnProperty'](_0x5c1a('0x35'))){delete _0x4180d0[_0x1f8135];}});return _0x4180d0;});})[_0x5c1a('0x19')](respondWithResult(_0x2976c0,null))[_0x5c1a('0x26')](handleError(_0x2976c0,null));};exports[_0x5c1a('0x36')]=function(_0xd76330,_0x2ad6f2){var _0x15cc18;var _0x59e592;var _0x3ac9b4;if(_0xd76330[_0x5c1a('0x37')]['id']){delete _0xd76330['body']['id'];}return db[_0x5c1a('0x24')][_0x5c1a('0x21')]({'where':{'id':[_0xd76330['body']['to'],_0xd76330[_0x5c1a('0x37')][_0x5c1a('0x38')]]}})[_0x5c1a('0x19')](function(_0x4ef95b){if(_0x4ef95b){if(_0x4ef95b[_0x5c1a('0x29')]!==0x2){return null;}_0x4ef95b[0x0]=_0x4ef95b[0x0]['get']({'plain':!![]});_0x4ef95b[0x1]=_0x4ef95b[0x1][_0x5c1a('0x39')]({'plain':!![]});delete _0x4ef95b[0x0]['id'];delete _0x4ef95b[0x1]['id'];return _['mergeWith'](_0x4ef95b[0x0],_0x4ef95b[0x1],function(_0x12b9db,_0x22797b){if(Array['isArray'](_0x22797b)&&!_0x22797b[_0x5c1a('0x29')]){return _0x12b9db;}else if(!_0x22797b){return _0x12b9db;}});}})[_0x5c1a('0x19')](handleEntityNotFound(_0x2ad6f2,null))[_0x5c1a('0x19')](function(_0x117b7b){if(_0x117b7b){if(_0x117b7b[_0x5c1a('0x27')]&&_[_0x5c1a('0x3a')](_0x117b7b[_0x5c1a('0x27')])){_0x117b7b['tags']=_0x117b7b[_0x5c1a('0x27')][_0x5c1a('0x3b')]();}logger[_0x5c1a('0x32')](_0x5c1a('0x3c'),_0xd76330[_0x5c1a('0x37')]['to'],_0xd76330[_0x5c1a('0x37')][_0x5c1a('0x38')]);return db['CmHopper']['destroy']({'where':{'ContactId':[_0xd76330[_0x5c1a('0x37')]['to'],_0xd76330[_0x5c1a('0x37')][_0x5c1a('0x38')]]}})['then'](function(_0x306ed8){logger[_0x5c1a('0x32')](_0x5c1a('0x3d'),_0x306ed8);return db[_0x5c1a('0x3e')]['destroy']({'where':{'ContactId':[_0xd76330[_0x5c1a('0x37')]['to'],_0xd76330['body']['from']]}})[_0x5c1a('0x19')](function(_0x16c66e){logger['info'](_0x5c1a('0x3f'),_0x16c66e);return db[_0x5c1a('0x24')][_0x5c1a('0x40')](_0x117b7b);});});}})['then'](function(_0x2b69d3){if(_0x2b69d3){_0x15cc18=_0x2b69d3;_0x59e592={'ContactId':_0x15cc18['id']};_0x3ac9b4={'where':{'ContactId':[_0xd76330[_0x5c1a('0x37')]['to'],_0xd76330[_0x5c1a('0x37')][_0x5c1a('0x38')]]}};return db['ChatInteraction'][_0x5c1a('0x41')](_0x59e592,_0x3ac9b4);}})['then'](function(){if(_0x15cc18){return db['ChatMessage'][_0x5c1a('0x41')](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x42')][_0x5c1a('0x41')](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x43')][_0x5c1a('0x41')](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x44')][_0x5c1a('0x41')](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x43')][_0x5c1a('0x41')](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db['MailMessage']['update'](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x45')]['update'](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db['SmsMessage']['update'](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x46')][_0x5c1a('0x41')](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x47')][_0x5c1a('0x41')](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x48')]['update'](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x49')][_0x5c1a('0x41')](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x4a')]['update']({'CmContactId':_0x15cc18['id']},{'where':{'CmContactId':[_0xd76330[_0x5c1a('0x37')]['to'],_0xd76330[_0x5c1a('0x37')][_0x5c1a('0x38')]]}});}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db['CmHopperFinal'][_0x5c1a('0x41')](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x4b')][_0x5c1a('0x41')](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db['ReportAgentPreview']['update'](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x4c')][_0x5c1a('0x41')](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db['ChatQueueReport']['update'](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db['FaxQueueReport'][_0x5c1a('0x41')](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x4d')][_0x5c1a('0x41')](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x4e')][_0x5c1a('0x41')](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x4f')]['update'](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x50')][_0x5c1a('0x41')](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x51')]['update'](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x52')][_0x5c1a('0x41')](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x53')][_0x5c1a('0x41')](_0x59e592,_0x3ac9b4);}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return db[_0x5c1a('0x24')][_0x5c1a('0x23')]({'where':{'id':[_0xd76330[_0x5c1a('0x37')]['to'],_0xd76330[_0x5c1a('0x37')]['from']]}});}})[_0x5c1a('0x19')](function(){if(_0x15cc18){return _0x15cc18;}})[_0x5c1a('0x19')](respondWithResult(_0x2ad6f2,null))[_0x5c1a('0x26')](handleError(_0x2ad6f2,null));};exports[_0x5c1a('0x40')]=function(_0x4276d1,_0x13f4ce){return db[_0x5c1a('0x24')]['describe']()[_0x5c1a('0x19')](function(_0x4f3145){if(_0x4276d1['body'][_0x5c1a('0x27')]&&_['isArray'](_0x4276d1[_0x5c1a('0x37')][_0x5c1a('0x27')])){if(_0x4276d1[_0x5c1a('0x37')]['tags'][_0x5c1a('0x29')]){_0x4276d1[_0x5c1a('0x37')][_0x5c1a('0x27')]=_0x4276d1[_0x5c1a('0x37')][_0x5c1a('0x27')][_0x5c1a('0x3b')](';')+';';}else{_0x4276d1[_0x5c1a('0x37')][_0x5c1a('0x27')]=null;}}else{_0x4276d1['body'][_0x5c1a('0x27')]=null;}if(!_[_0x5c1a('0x54')](_0x4276d1[_0x5c1a('0x37')][_0x5c1a('0x55')])){var _0x1c0d2d=_0x4276d1['body'][_0x5c1a('0x55')];if(!_['isNil'](shared[_0x5c1a('0x56')][_0x1c0d2d]))_0x4276d1[_0x5c1a('0x37')][_0x5c1a('0x57')]=shared[_0x5c1a('0x56')][_0x1c0d2d][_0x5c1a('0x57')];}return db['CmContact'][_0x5c1a('0x40')](_0x4276d1[_0x5c1a('0x37')],{'fields':_['keys'](_0x4f3145),'raw':!![]});})[_0x5c1a('0x19')](function(_0x187cf3){if(_0x4276d1[_0x5c1a('0x37')]['additionalPhones']){return insertAdditionalPhones(_0x187cf3,_0x4276d1['body']['additionalPhones']);}else{return _0x187cf3;}})['then'](respondWithResult(_0x13f4ce,0xc9))['catch'](handleError(_0x13f4ce,null));};exports[_0x5c1a('0x58')]=function(_0x445c7a,_0x58d3ee){var _0x404e58=0x0;var _0x419b9f=0x0;var _0x4e06d0=0x0;var _0x46fd78=[];return db[_0x5c1a('0x24')][_0x5c1a('0x1f')]()[_0x5c1a('0x19')](function(_0xd18b73){return BPromise['each'](_0x445c7a['body'],function(_0x2c3fbc){var _0x387e22={'where':{'$or':[]},'defaults':_0x2c3fbc,'fields':_[_0x5c1a('0x28')](_0xd18b73),'raw':!![]};if(_0x2c3fbc[_0x5c1a('0x59')]){for(var _0x2dbb7f=0x0;_0x2dbb7f<_0x2c3fbc[_0x5c1a('0x59')][_0x5c1a('0x29')];_0x2dbb7f++){var _0x19c923={};_0x19c923[_0x2c3fbc['duplicates'][_0x2dbb7f]]=_0x2c3fbc[_0x2c3fbc[_0x5c1a('0x59')][_0x2dbb7f]];_0x387e22[_0x5c1a('0x5a')]['$or']['push'](_0x19c923);}_0x387e22[_0x5c1a('0x5a')][_0x5c1a('0x5b')]=_0x2c3fbc[_0x5c1a('0x5b')];}return db['CmContact'][_0x5c1a('0x5c')](_0x387e22)[_0x5c1a('0x5d')](function(_0x3155d6,_0x8f3e18){if(_0x8f3e18){if(_0x2c3fbc[_0x5c1a('0x5e')](_0x5c1a('0x5f'))){_0x46fd78['push']({'contact':_0x3155d6,'additionalPhones':_0x2c3fbc[_0x5c1a('0x5f')]});}_0x404e58++;}else{_0x4e06d0++;}})[_0x5c1a('0x26')](function(){_0x419b9f++;});});})['then'](function(_0x569990){if(_0x569990){if(_0x46fd78[_0x5c1a('0x29')]>0x0){return new Promise(function(_0x7d75c1){var _0x5fa85e=[];for(var _0x36b7c8=0x0;_0x36b7c8<_0x46fd78[_0x5c1a('0x29')];_0x36b7c8++){_0x5fa85e['push'](insertAdditionalPhones(_0x46fd78[_0x36b7c8][_0x5c1a('0x60')],_0x46fd78[_0x36b7c8][_0x5c1a('0x5f')]));}Promise['all'](_0x5fa85e)[_0x5c1a('0x19')](function(){_0x7d75c1(0x1);});})[_0x5c1a('0x19')](function(){return{'success':_0x404e58,'failure':_0x419b9f,'duplicates':_0x4e06d0};});}else{return{'success':_0x404e58,'failure':_0x419b9f,'duplicates':_0x4e06d0};}}})[_0x5c1a('0x19')](respondWithResult(_0x58d3ee,0xc9))[_0x5c1a('0x26')](handleError(_0x58d3ee,null));};exports[_0x5c1a('0x61')]=function(_0x331b8e,_0x1897fe){var _0xe8daab;return db[_0x5c1a('0x24')]['describe']()[_0x5c1a('0x19')](function(_0x5f43b8){return db[_0x5c1a('0x24')][_0x5c1a('0x62')]({'where':{'id':_0x331b8e[_0x5c1a('0x25')]['id']},'include':[{'model':db[_0x5c1a('0x63')],'as':_0x5c1a('0x64'),'attributes':['id',_0x5c1a('0x1c'),'color'],'required':_0x331b8e[_0x5c1a('0x2d')][_0x5c1a('0x65')]?!![]:![]},{'model':db['CmContactHasItem'],'as':'Phones','where':{'CmContactId':_0x331b8e[_0x5c1a('0x25')]['id']},'required':![],'include':[{'model':db[_0x5c1a('0x66')],'as':'ItemType'}]}],'order':[db[_0x5c1a('0x67')][_0x5c1a('0x68')](_0x5c1a('0x69'))],'attributes':_['keys'](_0x5f43b8)});})[_0x5c1a('0x19')](function(_0x570e81){if(!_[_0x5c1a('0x54')](_0x570e81)){_0xe8daab=_0x570e81[_0x5c1a('0x39')]({'plain':!![]});var _0x19c3c5={'where':{'$and':[{'ListId':{'$ne':null}}]}};if(_0x570e81&&_0x570e81['ListId']){if(_0x570e81[_0x5c1a('0x5b')]){_0x19c3c5['where']['$and']['push']({'ListId':{'$ne':_0x570e81[_0x5c1a('0x5b')]}});}}return db[_0x5c1a('0x6a')][_0x5c1a('0x21')](_0x19c3c5);}})['then'](function(_0x37d469){if(!_[_0x5c1a('0x54')](_0x37d469)){return _['omit'](_0xe8daab,_[_0x5c1a('0x6b')](_0x37d469,function(_0x471acb){return util['format']('cf_%d',_0x471acb['id']);}));}})[_0x5c1a('0x19')](handleEntityNotFound(_0x1897fe,null))[_0x5c1a('0x19')](respondWithResult(_0x1897fe,null))[_0x5c1a('0x26')](handleError(_0x1897fe,null));};exports[_0x5c1a('0x41')]=function(_0x53969a,_0x58522a){var _0x2e625e;if(_0x53969a[_0x5c1a('0x37')]['id']){delete _0x53969a['body']['id'];}if(!_[_0x5c1a('0x54')](_0x53969a[_0x5c1a('0x37')]['dialTimezone'])){var _0x3d4d61=_0x53969a[_0x5c1a('0x37')][_0x5c1a('0x55')];if(!_['isNil'](shared[_0x5c1a('0x56')][_0x3d4d61]))_0x53969a[_0x5c1a('0x37')]['utcOffset']=shared[_0x5c1a('0x56')][_0x3d4d61]['utcOffset'];}return db[_0x5c1a('0x24')][_0x5c1a('0x62')]({'where':{'id':_0x53969a[_0x5c1a('0x25')]['id']}})[_0x5c1a('0x19')](handleEntityNotFound(_0x58522a,null))[_0x5c1a('0x19')](saveUpdates(_0x53969a[_0x5c1a('0x37')],null))['then'](function(_0x33fa54){_0x2e625e=_0x33fa54;var _0x90f69e={'where':{'$and':[{'ListId':{'$ne':null}}]}};if(_0x33fa54&&_0x33fa54[_0x5c1a('0x5b')]){if(_0x33fa54[_0x5c1a('0x5b')]){_0x90f69e[_0x5c1a('0x5a')]['$and'][_0x5c1a('0x6c')]({'ListId':{'$ne':_0x33fa54[_0x5c1a('0x5b')]}});}}return db[_0x5c1a('0x6a')]['findAll'](_0x90f69e);})[_0x5c1a('0x19')](function(_0x320da8){if(_0x320da8){return _[_0x5c1a('0x6d')](_[_0x5c1a('0x6e')](_0x53969a[_0x5c1a('0x37')],function(_0x1fd7a3,_0x137b96){return _[_0x5c1a('0x2a')](_0x137b96,_0x5c1a('0x2b'));}),_[_0x5c1a('0x6b')](_0x320da8,function(_0x2b9646){return util[_0x5c1a('0x6f')]('cf_%d',_0x2b9646['id']);}));}})[_0x5c1a('0x19')](function(_0x1ffbc1){if(_0x1ffbc1&&!_['isEmpty'](_0x1ffbc1)){var _0x5b3cd4=squel[_0x5c1a('0x41')]()[_0x5c1a('0x70')]('cm_contacts')[_0x5c1a('0x71')](_0x1ffbc1)[_0x5c1a('0x5a')]('id\x20=\x20?',_0x53969a['params']['id'])[_0x5c1a('0x72')]();return db[_0x5c1a('0x67')][_0x5c1a('0x2d')](_0x5b3cd4[_0x5c1a('0x73')],{'replacements':_0x5b3cd4['values']});}})[_0x5c1a('0x19')](function(){if(_0x53969a[_0x5c1a('0x37')][_0x5c1a('0x74')]&&_0x2e625e){return db[_0x5c1a('0x75')][_0x5c1a('0x41')]({'phone':_0x53969a[_0x5c1a('0x37')][_0x5c1a('0x74')],'OrderBy':0x0},{'where':{'ContactId':_0x2e625e['id']}});}})[_0x5c1a('0x19')](function(){return _0x2e625e;})[_0x5c1a('0x19')](respondWithResult(_0x58522a,null))[_0x5c1a('0x26')](handleError(_0x58522a,null));};exports[_0x5c1a('0x76')]=function(_0x22c550,_0x52b8ba){var _0x2296a1={};var _0x1a614d={};var _0x2e97f6;var _0x5c08f0;return db[_0x5c1a('0x24')][_0x5c1a('0x77')]({'where':{'id':_0x22c550[_0x5c1a('0x25')]['id']}})[_0x5c1a('0x19')](handleEntityNotFound(_0x52b8ba,null))[_0x5c1a('0x19')](function(_0x1efc78){if(_0x1efc78){_0x2e97f6=_0x1efc78;_0x1a614d['model']=_[_0x5c1a('0x28')](db[_0x5c1a('0x63')][_0x5c1a('0x78')]);_0x1a614d[_0x5c1a('0x2d')]=_['keys'](_0x22c550[_0x5c1a('0x2d')]);_0x1a614d[_0x5c1a('0x79')]=_[_0x5c1a('0x7a')](_0x1a614d[_0x5c1a('0x7b')],_0x1a614d[_0x5c1a('0x2d')]);_0x2296a1[_0x5c1a('0x7c')]=_[_0x5c1a('0x7a')](_0x1a614d[_0x5c1a('0x7b')],qs[_0x5c1a('0x7d')](_0x22c550['query'][_0x5c1a('0x7d')]));_0x2296a1[_0x5c1a('0x7c')]=_0x2296a1['attributes'][_0x5c1a('0x29')]?_0x2296a1['attributes']:_0x1a614d[_0x5c1a('0x7b')];_0x2296a1['order']=qs[_0x5c1a('0x7e')](_0x22c550['query'][_0x5c1a('0x7e')]);_0x2296a1[_0x5c1a('0x5a')]=qs[_0x5c1a('0x79')](_[_0x5c1a('0x7f')](_0x22c550[_0x5c1a('0x2d')],_0x1a614d[_0x5c1a('0x79')]));if(_0x22c550[_0x5c1a('0x2d')]['filter']){_0x2296a1[_0x5c1a('0x5a')]=_[_0x5c1a('0x36')](_0x2296a1[_0x5c1a('0x5a')],{'$or':_[_0x5c1a('0x6b')](_0x2296a1[_0x5c1a('0x7c')],function(_0x2fdf73){var _0x96f396={};_0x96f396[_0x2fdf73]={'$like':'%'+_0x22c550[_0x5c1a('0x2d')][_0x5c1a('0x80')]+'%'};return _0x96f396;})});}_0x2296a1=_[_0x5c1a('0x36')]({},_0x2296a1,_0x22c550[_0x5c1a('0x81')]);return _0x2e97f6[_0x5c1a('0x76')](_0x2296a1);}})[_0x5c1a('0x19')](function(_0x3eb9a8){if(_0x3eb9a8){_0x5c08f0=_0x3eb9a8[_0x5c1a('0x29')];if(!_0x22c550[_0x5c1a('0x2d')][_0x5c1a('0x5e')](_0x5c1a('0x82'))){_0x2296a1['limit']=qs['limit'](_0x22c550[_0x5c1a('0x2d')]['limit']);_0x2296a1['offset']=qs['offset'](_0x22c550[_0x5c1a('0x2d')][_0x5c1a('0x13')]);}return _0x2e97f6[_0x5c1a('0x76')](_0x2296a1);}})['then'](function(_0x197f98){if(_0x197f98){return _0x197f98?{'count':_0x5c08f0,'rows':_0x197f98}:null;}})[_0x5c1a('0x19')](respondWithResult(_0x52b8ba,null))[_0x5c1a('0x26')](handleError(_0x52b8ba,null));};exports[_0x5c1a('0x83')]=function(_0x4d58da,_0x1a3a55){if(_0x4d58da[_0x5c1a('0x37')]['id']){delete _0x4d58da[_0x5c1a('0x37')]['id'];}return db[_0x5c1a('0x24')][_0x5c1a('0x77')]({'where':{'id':_0x4d58da[_0x5c1a('0x25')]['id']}})[_0x5c1a('0x19')](handleEntityNotFound(_0x1a3a55,null))[_0x5c1a('0x19')](function(_0x1a3ca3){if(_0x1a3ca3){return _0x1a3ca3[_0x5c1a('0x83')](_0x4d58da[_0x5c1a('0x37')][_0x5c1a('0x84')]||[]);}return null;})[_0x5c1a('0x19')](respondWithResult(_0x1a3a55,null))[_0x5c1a('0x26')](handleError(_0x1a3a55,null));};exports[_0x5c1a('0x85')]=function(_0x66eec4,_0x5064df){var _0x1f1151=[];_0x1f1151[_0x5c1a('0x6c')](addAdditionalPhones(_0x66eec4['body']));Promise[_0x5c1a('0x86')](_0x1f1151)[_0x5c1a('0x19')](function(){_0x1f1151=[];_0x1f1151[_0x5c1a('0x6c')](deleteCmHopperPhones(_0x66eec4[_0x5c1a('0x37')]['id']));_0x1f1151[_0x5c1a('0x6c')](addCmHopperPhones(_0x66eec4[_0x5c1a('0x37')]['id']));Promise['all'](_0x1f1151)[_0x5c1a('0x19')](function(){return[0x1];})['then'](respondWithResult(_0x5064df,null));});};function addAdditionalPhones(_0x41e58f){var _0x47a77f;return new Promise(function(_0x4e259f){return db['CmContactHasItem'][_0x5c1a('0x23')]({'where':{'CmContactId':_0x41e58f['id']}})[_0x5c1a('0x19')](function(){db['ContactItemType']['findAll']({'raw':!![],'attributes':['id','OrderBy']})[_0x5c1a('0x19')](function(_0x4e0c42){var _0xd6257f=[];for(var _0x288bf6=0x0;_0x288bf6<_0x41e58f[_0x5c1a('0x87')][_0x5c1a('0x29')];_0x288bf6++){var _0x1b2eaf=_0x41e58f[_0x5c1a('0x88')]?_[_0x5c1a('0x54')](_0x41e58f[_0x5c1a('0x88')][_0x288bf6])?'':_0x41e58f[_0x5c1a('0x88')][_0x288bf6]:_0x41e58f['items'][_0x288bf6][_0x5c1a('0x89')]?_0x41e58f[_0x5c1a('0x87')][_0x288bf6]['ItemTypeId']:'';var _0x52e869=_[_0x5c1a('0x54')](_0x41e58f['items'][_0x288bf6][_0x5c1a('0x8a')])?'':_0x41e58f[_0x5c1a('0x87')][_0x288bf6]['description'];var _0x15eba7=_0x1b2eaf+':'+_0x41e58f[_0x5c1a('0x87')][_0x288bf6][_0x5c1a('0x74')]+'§'+_0x52e869;if(_['isNil'](_0x47a77f))_0x47a77f=_0x15eba7;else _0x47a77f+=';'+_0x15eba7;var _0x87dc4f=null;var _0x4d8bf2=null;if(_0x41e58f[_0x5c1a('0x88')]){if(!_[_0x5c1a('0x54')](_0x41e58f[_0x5c1a('0x88')][_0x288bf6])){_0x4d8bf2=_['find'](_0x4e0c42,function(_0x3b6a2d){return _0x3b6a2d['id']===_0x41e58f['item_types'][_0x288bf6];});if(!_[_0x5c1a('0x54')](_0x4d8bf2)){_0x87dc4f=_0x4d8bf2[_0x5c1a('0x8b')];}}}else{if(!_[_0x5c1a('0x54')](_0x41e58f['items'][_0x288bf6])){_0x4d8bf2=_[_0x5c1a('0x62')](_0x4e0c42,function(_0x1c870e){return _0x1c870e['id']===_0x41e58f[_0x5c1a('0x87')][_0x288bf6]['ItemTypeId'];});if(!_[_0x5c1a('0x54')](_0x4d8bf2)){_0x87dc4f=_0x288bf6;}}}if(_[_0x5c1a('0x54')](_0x87dc4f)){_0x87dc4f=0x64;}_0xd6257f[_0x5c1a('0x6c')](addAdditionalPhone(_0x41e58f['id'],_0x41e58f[_0x5c1a('0x87')][_0x288bf6][_0x5c1a('0x74')],_0x41e58f['item_types']?_['isNil'](_0x41e58f[_0x5c1a('0x88')][_0x288bf6])?null:_0x41e58f[_0x5c1a('0x88')][_0x288bf6]:_0x41e58f[_0x5c1a('0x87')][_0x288bf6][_0x5c1a('0x89')]?_0x41e58f[_0x5c1a('0x87')][_0x288bf6]['ItemTypeId']:null,_0x87dc4f,_0x52e869));}Promise[_0x5c1a('0x86')](_0xd6257f)[_0x5c1a('0x19')](function(){db['CmContact'][_0x5c1a('0x41')]({'AdditionalPhones':_0x47a77f},{'where':{'id':_0x41e58f['id']}})[_0x5c1a('0x19')](function(){_0x4e259f(0x1);});});});});});}function addAdditionalPhone(_0x3714ba,_0x5d5942,_0x3e72e8,_0x463869,_0x52ea06){return db[_0x5c1a('0x4a')][_0x5c1a('0x62')]({'where':{'CmContactId':_0x3714ba,'item':_0x5d5942}})[_0x5c1a('0x19')](function(_0x51f1e3){if(_0x51f1e3)logger[_0x5c1a('0x32')](_0x5c1a('0x8c'),_0x51f1e3);else{db[_0x5c1a('0x4a')]['create']({'CmContactId':_0x3714ba,'item':_0x5d5942,'ItemTypeId':_0x3e72e8,'OrderBy':_0x463869,'ItemClass':_0x5c1a('0x8d'),'description':_0x52ea06});}});}function deleteCmHopperPhones(_0x20cb0f){return new Promise(function(_0x131049){return db['CmHopper'][_0x5c1a('0x21')]({'raw':!![],'attributes':['id'],'where':{'ContactId':_0x20cb0f}})[_0x5c1a('0x19')](function(_0x5a3eae){db[_0x5c1a('0x8e')]['destroy']({'where':{'CmHopperId':{'$in':_[_0x5c1a('0x6b')](_0x5a3eae,'id')}}});})[_0x5c1a('0x19')](function(){_0x131049(0x1);});});}function addCmHopperPhones(_0xdd24e){return new Promise(function(_0x140c9d){return db[_0x5c1a('0x75')][_0x5c1a('0x21')]({'raw':!![],'attributes':['id'],'where':{'ContactId':_0xdd24e}})['then'](function(_0xb33643){var _0x1e9f1f=[];_[_0x5c1a('0x6b')](_0xb33643,function(_0x1966b4){_0x1e9f1f[_0x5c1a('0x6c')](createCmHopperPhone(_0xdd24e,_0x1966b4['id']));});Promise[_0x5c1a('0x86')](_0x1e9f1f)['then'](function(){_0x140c9d(0x1);});});});}function createCmHopperPhone(_0x3e1e05,_0x464fdf){return new Promise(function(_0x2ac130){db[_0x5c1a('0x4a')][_0x5c1a('0x21')]({'raw':!![],'attributes':[_0x5c1a('0x8f'),_0x5c1a('0x8b')],'where':{'CmContactId':_0x3e1e05,'ItemClass':_0x5c1a('0x8d')},'include':[{'model':db[_0x5c1a('0x66')],'attributes':[_0x5c1a('0x8b')],'as':_0x5c1a('0x90')}],'order':[_0x5c1a('0x8b'),db[_0x5c1a('0x67')][_0x5c1a('0x68')](_0x5c1a('0x91'))]})['then'](function(_0x4986ad){var _0x1a0b5f=0x1;var _0x15e789=_[_0x5c1a('0x6b')](_0x4986ad,function(_0x4de423){_0x4de423['CmHopperId']=_0x464fdf;_0x4de423[_0x5c1a('0x74')]=_0x4de423[_0x5c1a('0x8f')];_0x4de423['OrderBy']=_0x1a0b5f;delete _0x4de423[_0x5c1a('0x92')];_0x1a0b5f=_0x1a0b5f+0x1;return _0x4de423;});return db[_0x5c1a('0x8e')][_0x5c1a('0x58')](_0x15e789,{});})[_0x5c1a('0x19')](function(){_0x2ac130(0x1);});});}function insertAdditionalPhones(_0x4e6fa9,_0x4f8ad9){return new Promise(function(_0xc9c9a9){var _0x4f54ba=[];for(var _0x3ed55e=0x0;_0x3ed55e<_0x4f8ad9[_0x5c1a('0x29')];_0x3ed55e++){var _0x17bc8f=_0x4f8ad9[_0x3ed55e];_0x4f54ba[_0x5c1a('0x6c')](parseContactItemType(_0x17bc8f));}Promise[_0x5c1a('0x86')](_0x4f54ba)['then'](function(){var _0xc87769={'id':_0x4e6fa9['id'],'items':_0x4f8ad9};return addAdditionalPhones(_0xc87769)['then'](function(){return addCmHopperPhones(_0x4e6fa9['id']);});})[_0x5c1a('0x19')](function(){_0xc9c9a9(_0x4e6fa9);});});}function parseContactItemType(_0x206d71){return new Promise(function(_0x46eeb8){if(_0x206d71[_0x5c1a('0x5e')](_0x5c1a('0x89'))){_0x46eeb8(_0x206d71);}else{return db['ContactItemType'][_0x5c1a('0x62')]({'where':{'name':_0x206d71[_0x5c1a('0x90')]}})[_0x5c1a('0x19')](function(_0x3db565){if(_[_0x5c1a('0x54')](_0x3db565))_0x206d71[_0x5c1a('0x89')]=null;else _0x206d71[_0x5c1a('0x89')]=_0x3db565['id'];_0x46eeb8(_0x206d71);});}});}exports['getAdditionalPhones']=function(_0x3f5dd0,_0x2f8b3b){return db[_0x5c1a('0x4a')]['findAll']({'raw':!![],'where':{'CmContactId':_0x3f5dd0[_0x5c1a('0x25')]['id'],'ItemClass':_0x5c1a('0x8d')},'include':[{'model':db[_0x5c1a('0x66')],'as':_0x5c1a('0x90')}],'order':[[_0x5c1a('0x8b')],[db[_0x5c1a('0x67')][_0x5c1a('0x68')](_0x5c1a('0x91'))]]})[_0x5c1a('0x19')](function(_0x53ddcf){return _0x53ddcf;})[_0x5c1a('0x19')](respondWithResult(_0x2f8b3b,null))['catch'](handleError(_0x2f8b3b,null));};exports['duplicateAdditionalPhones']=function(_0x1f8872,_0x27cebf){return db[_0x5c1a('0x4a')]['findAll']({'raw':!![],'where':{'CmContactId':_0x1f8872[_0x5c1a('0x37')][_0x5c1a('0x93')]}})[_0x5c1a('0x19')](function(_0x3d268a){var _0x53f40b=_[_0x5c1a('0x6b')](_0x3d268a,function(_0x37a270){_0x37a270['CmContactId']=_0x1f8872['body']['toContactId'];return _0x37a270;});return db[_0x5c1a('0x4a')][_0x5c1a('0x58')](_0x53f40b,{});})[_0x5c1a('0x19')](function(){return addCmHopperPhones(_0x1f8872[_0x5c1a('0x37')]['toContactId']);})[_0x5c1a('0x19')](function(){return['ok'];})[_0x5c1a('0x19')](respondWithResult(_0x27cebf,null))[_0x5c1a('0x26')](handleError(_0x27cebf,null));};exports[_0x5c1a('0x94')]=function(_0x373bf4,_0x59723e){var _0x28db14=[];_0x28db14['push'](createCmHopperPhone(_0x373bf4[_0x5c1a('0x37')]['id'],_0x373bf4[_0x5c1a('0x37')][_0x5c1a('0x95')]));Promise['all'](_0x28db14)['then'](function(){return[0x1];})[_0x5c1a('0x19')](respondWithResult(_0x59723e,null));};exports[_0x5c1a('0x96')]=function(_0x1cbb0f,_0xdeefc8){var _0x5cb085={'raw':![],'where':{}};var _0x37013f={};var _0x8c7229={'count':0x0,'rows':[]};return db[_0x5c1a('0x24')][_0x5c1a('0x77')]({'where':{'id':_0x1cbb0f[_0x5c1a('0x25')]['id']}})[_0x5c1a('0x19')](handleEntityNotFound(_0xdeefc8,null))[_0x5c1a('0x19')](function(_0x5aa92b){if(_0x5aa92b){_0x37013f[_0x5c1a('0x7b')]=_[_0x5c1a('0x28')](db[_0x5c1a('0x75')][_0x5c1a('0x78')]);_0x37013f[_0x5c1a('0x2d')]=_[_0x5c1a('0x28')](_0x1cbb0f[_0x5c1a('0x2d')]);_0x37013f[_0x5c1a('0x79')]=_[_0x5c1a('0x7a')](_0x37013f[_0x5c1a('0x7b')],_0x37013f['query']);_0x5cb085['attributes']=_['intersection'](_0x37013f['model'],qs[_0x5c1a('0x7d')](_0x1cbb0f[_0x5c1a('0x2d')][_0x5c1a('0x7d')]));_0x5cb085[_0x5c1a('0x7c')]=_0x5cb085[_0x5c1a('0x7c')][_0x5c1a('0x29')]?_0x5cb085[_0x5c1a('0x7c')]:_0x37013f[_0x5c1a('0x7b')];if(!_0x1cbb0f[_0x5c1a('0x2d')][_0x5c1a('0x5e')](_0x5c1a('0x82'))){_0x5cb085['limit']=qs['limit'](_0x1cbb0f[_0x5c1a('0x2d')][_0x5c1a('0x15')]);_0x5cb085['offset']=qs[_0x5c1a('0x13')](_0x1cbb0f['query']['offset']);}_0x5cb085['order']=qs[_0x5c1a('0x7e')](_0x1cbb0f[_0x5c1a('0x2d')][_0x5c1a('0x7e')]);_0x5cb085[_0x5c1a('0x5a')]=qs[_0x5c1a('0x79')](_['pick'](_0x1cbb0f[_0x5c1a('0x2d')],_0x37013f[_0x5c1a('0x79')]));_0x5cb085[_0x5c1a('0x5a')][_0x5c1a('0x97')]=_0x5aa92b['id'];if(_0x1cbb0f[_0x5c1a('0x2d')]['filter']){_0x5cb085[_0x5c1a('0x5a')]=_[_0x5c1a('0x36')](_0x5cb085['where'],{'$or':_['map'](_0x5cb085['attributes'],function(_0x3dd198){var _0x5e6e36={};_0x5e6e36[_0x3dd198]={'$like':'%'+_0x1cbb0f[_0x5c1a('0x2d')][_0x5c1a('0x80')]+'%'};return _0x5e6e36;})});}_0x5cb085=_[_0x5c1a('0x36')]({},_0x5cb085,_0x1cbb0f['options']);return db[_0x5c1a('0x75')][_0x5c1a('0x16')]({'where':_0x5cb085[_0x5c1a('0x5a')]})['then'](function(_0x2d5900){_0x8c7229[_0x5c1a('0x16')]=_0x2d5900;if(_0x1cbb0f[_0x5c1a('0x2d')]['includeAll']){_0x5cb085[_0x5c1a('0x98')]=[{'all':!![]}];}return db[_0x5c1a('0x75')][_0x5c1a('0x21')](_0x5cb085);})[_0x5c1a('0x19')](function(_0x5a21a7){_0x8c7229[_0x5c1a('0x99')]=_0x5a21a7;return _0x8c7229;});}})[_0x5c1a('0x19')](respondWithFilteredResult(_0xdeefc8,_0x5cb085))[_0x5c1a('0x26')](handleError(_0xdeefc8,null));};exports[_0x5c1a('0x9a')]=function(_0x6706d,_0x2a8ba5){var _0x15beb3={'raw':!![],'where':{}};var _0xf57c4e={};var _0x3bd3e9={'count':0x0,'rows':[]};return db[_0x5c1a('0x24')][_0x5c1a('0x77')]({'where':{'id':_0x6706d[_0x5c1a('0x25')]['id']}})[_0x5c1a('0x19')](handleEntityNotFound(_0x2a8ba5,null))[_0x5c1a('0x19')](function(_0x37c60c){if(_0x37c60c){_0xf57c4e[_0x5c1a('0x7b')]=_[_0x5c1a('0x28')](db[_0x5c1a('0x4b')][_0x5c1a('0x78')]);_0xf57c4e[_0x5c1a('0x2d')]=_[_0x5c1a('0x28')](_0x6706d[_0x5c1a('0x2d')]);_0xf57c4e[_0x5c1a('0x79')]=_[_0x5c1a('0x7a')](_0xf57c4e['model'],_0xf57c4e[_0x5c1a('0x2d')]);_0x15beb3[_0x5c1a('0x7c')]=_[_0x5c1a('0x7a')](_0xf57c4e[_0x5c1a('0x7b')],qs[_0x5c1a('0x7d')](_0x6706d[_0x5c1a('0x2d')]['fields']));_0x15beb3[_0x5c1a('0x7c')]=_0x15beb3['attributes']['length']?_0x15beb3[_0x5c1a('0x7c')]:_0xf57c4e['model'];if(!_0x6706d['query'][_0x5c1a('0x5e')](_0x5c1a('0x82'))){_0x15beb3['limit']=qs[_0x5c1a('0x15')](_0x6706d[_0x5c1a('0x2d')]['limit']);_0x15beb3['offset']=qs[_0x5c1a('0x13')](_0x6706d[_0x5c1a('0x2d')][_0x5c1a('0x13')]);}_0x15beb3['order']=qs[_0x5c1a('0x7e')](_0x6706d['query'][_0x5c1a('0x7e')]);_0x15beb3[_0x5c1a('0x5a')]=qs[_0x5c1a('0x79')](_[_0x5c1a('0x7f')](_0x6706d[_0x5c1a('0x2d')],_0xf57c4e[_0x5c1a('0x79')]));_0x15beb3[_0x5c1a('0x5a')][_0x5c1a('0x97')]=_0x37c60c['id'];if(_0x6706d['query']['filter']){_0x15beb3[_0x5c1a('0x5a')]=_[_0x5c1a('0x36')](_0x15beb3[_0x5c1a('0x5a')],{'$or':_[_0x5c1a('0x6b')](_0x15beb3[_0x5c1a('0x7c')],function(_0x393aa9){var _0x5176a2={};_0x5176a2[_0x393aa9]={'$like':'%'+_0x6706d[_0x5c1a('0x2d')]['filter']+'%'};return _0x5176a2;})});}_0x15beb3=_['merge']({},_0x15beb3,_0x6706d[_0x5c1a('0x81')]);return db['CmHopperHistory'][_0x5c1a('0x16')]({'where':_0x15beb3['where']})[_0x5c1a('0x19')](function(_0x4d4e66){_0x3bd3e9[_0x5c1a('0x16')]=_0x4d4e66;if(_0x6706d[_0x5c1a('0x2d')][_0x5c1a('0x9b')]){_0x15beb3[_0x5c1a('0x98')]=[{'all':!![]}];}return db['CmHopperHistory'][_0x5c1a('0x21')](_0x15beb3);})[_0x5c1a('0x19')](function(_0x300af6){_0x3bd3e9[_0x5c1a('0x99')]=_0x300af6;return _0x3bd3e9;});}})[_0x5c1a('0x19')](respondWithFilteredResult(_0x2a8ba5,_0x15beb3))[_0x5c1a('0x26')](handleError(_0x2a8ba5,null));};exports[_0x5c1a('0x9c')]=function(_0x1f4a86,_0x2acaa2){var _0x4aa8ad={'raw':!![],'where':{}};var _0x265627={};var _0x1dc4fa={'count':0x0,'rows':[]};return db[_0x5c1a('0x24')]['findOne']({'where':{'id':_0x1f4a86[_0x5c1a('0x25')]['id']}})[_0x5c1a('0x19')](handleEntityNotFound(_0x2acaa2,null))['then'](function(_0x3ad3d7){if(_0x3ad3d7){_0x265627[_0x5c1a('0x7b')]=_[_0x5c1a('0x28')](db[_0x5c1a('0x9d')][_0x5c1a('0x78')]);_0x265627[_0x5c1a('0x2d')]=_[_0x5c1a('0x28')](_0x1f4a86[_0x5c1a('0x2d')]);_0x265627[_0x5c1a('0x79')]=_[_0x5c1a('0x7a')](_0x265627['model'],_0x265627[_0x5c1a('0x2d')]);_0x4aa8ad['attributes']=_[_0x5c1a('0x7a')](_0x265627[_0x5c1a('0x7b')],qs[_0x5c1a('0x7d')](_0x1f4a86['query']['fields']));_0x4aa8ad[_0x5c1a('0x7c')]=_0x4aa8ad[_0x5c1a('0x7c')][_0x5c1a('0x29')]?_0x4aa8ad[_0x5c1a('0x7c')]:_0x265627['model'];if(!_0x1f4a86[_0x5c1a('0x2d')]['hasOwnProperty']('nolimit')){_0x4aa8ad[_0x5c1a('0x15')]=qs[_0x5c1a('0x15')](_0x1f4a86[_0x5c1a('0x2d')][_0x5c1a('0x15')]);_0x4aa8ad[_0x5c1a('0x13')]=qs['offset'](_0x1f4a86[_0x5c1a('0x2d')]['offset']);}_0x4aa8ad[_0x5c1a('0x9e')]=qs[_0x5c1a('0x7e')](_0x1f4a86['query'][_0x5c1a('0x7e')]);_0x4aa8ad[_0x5c1a('0x5a')]=qs['filters'](_['pick'](_0x1f4a86[_0x5c1a('0x2d')],_0x265627[_0x5c1a('0x79')]));_0x4aa8ad[_0x5c1a('0x5a')]['ContactId']=_0x3ad3d7['id'];if(_0x1f4a86[_0x5c1a('0x2d')][_0x5c1a('0x80')]){_0x4aa8ad[_0x5c1a('0x5a')]=_[_0x5c1a('0x36')](_0x4aa8ad[_0x5c1a('0x5a')],{'$or':_[_0x5c1a('0x6b')](_0x4aa8ad[_0x5c1a('0x7c')],function(_0xfd89d){var _0xada935={};_0xada935[_0xfd89d]={'$like':'%'+_0x1f4a86['query'][_0x5c1a('0x80')]+'%'};return _0xada935;})});}_0x4aa8ad=_[_0x5c1a('0x36')]({},_0x4aa8ad,_0x1f4a86[_0x5c1a('0x81')]);return db['CmHopperFinal']['count']({'where':_0x4aa8ad['where']})[_0x5c1a('0x19')](function(_0x238984){_0x1dc4fa[_0x5c1a('0x16')]=_0x238984;if(_0x1f4a86[_0x5c1a('0x2d')][_0x5c1a('0x9b')]){_0x4aa8ad[_0x5c1a('0x98')]=[{'all':!![]}];}return db[_0x5c1a('0x9d')]['findAll'](_0x4aa8ad);})['then'](function(_0x464ac9){_0x1dc4fa[_0x5c1a('0x99')]=_0x464ac9;return _0x1dc4fa;});}})[_0x5c1a('0x19')](respondWithFilteredResult(_0x2acaa2,_0x4aa8ad))[_0x5c1a('0x26')](handleError(_0x2acaa2,null));};exports['getJscriptySessions']=function(_0x4e4080,_0x10e6d6){var _0x5bfa45={'raw':!![],'where':{}};var _0x139718={};var _0x4a8343={'count':0x0,'rows':[]};return db[_0x5c1a('0x24')][_0x5c1a('0x77')]({'where':{'id':_0x4e4080[_0x5c1a('0x25')]['id']}})[_0x5c1a('0x19')](handleEntityNotFound(_0x10e6d6,null))[_0x5c1a('0x19')](function(_0x20c159){if(_0x20c159){_0x139718[_0x5c1a('0x7b')]=_[_0x5c1a('0x28')](db[_0x5c1a('0x50')]['rawAttributes']);_0x139718[_0x5c1a('0x2d')]=_[_0x5c1a('0x28')](_0x4e4080[_0x5c1a('0x2d')]);_0x139718[_0x5c1a('0x79')]=_['intersection'](_0x139718[_0x5c1a('0x7b')],_0x139718[_0x5c1a('0x2d')]);_0x5bfa45[_0x5c1a('0x7c')]=_[_0x5c1a('0x7a')](_0x139718['model'],qs[_0x5c1a('0x7d')](_0x4e4080[_0x5c1a('0x2d')][_0x5c1a('0x7d')]));_0x5bfa45[_0x5c1a('0x7c')]=_0x5bfa45[_0x5c1a('0x7c')][_0x5c1a('0x29')]?_0x5bfa45[_0x5c1a('0x7c')]:_0x139718[_0x5c1a('0x7b')];if(!_0x4e4080[_0x5c1a('0x2d')][_0x5c1a('0x5e')]('nolimit')){_0x5bfa45[_0x5c1a('0x15')]=qs[_0x5c1a('0x15')](_0x4e4080[_0x5c1a('0x2d')][_0x5c1a('0x15')]);_0x5bfa45[_0x5c1a('0x13')]=qs['offset'](_0x4e4080[_0x5c1a('0x2d')]['offset']);}_0x5bfa45[_0x5c1a('0x9e')]=qs[_0x5c1a('0x7e')](_0x4e4080[_0x5c1a('0x2d')][_0x5c1a('0x7e')]);_0x5bfa45[_0x5c1a('0x5a')]=qs[_0x5c1a('0x79')](_[_0x5c1a('0x7f')](_0x4e4080[_0x5c1a('0x2d')],_0x139718[_0x5c1a('0x79')]));_0x5bfa45[_0x5c1a('0x5a')][_0x5c1a('0x97')]=_0x20c159['id'];if(_0x4e4080[_0x5c1a('0x2d')][_0x5c1a('0x80')]){_0x5bfa45['where']=_[_0x5c1a('0x36')](_0x5bfa45[_0x5c1a('0x5a')],{'$or':_[_0x5c1a('0x6b')](_0x5bfa45[_0x5c1a('0x7c')],function(_0x25c81d){var _0x268275={};_0x268275[_0x25c81d]={'$like':'%'+_0x4e4080[_0x5c1a('0x2d')]['filter']+'%'};return _0x268275;})});}_0x5bfa45=_[_0x5c1a('0x36')]({},_0x5bfa45,_0x4e4080[_0x5c1a('0x81')]);return db[_0x5c1a('0x50')][_0x5c1a('0x16')]({'where':_0x5bfa45[_0x5c1a('0x5a')]})['then'](function(_0x13705d){_0x4a8343[_0x5c1a('0x16')]=_0x13705d;if(_0x4e4080[_0x5c1a('0x2d')][_0x5c1a('0x9b')]){_0x5bfa45[_0x5c1a('0x98')]=[{'all':!![]}];}return db[_0x5c1a('0x50')][_0x5c1a('0x21')](_0x5bfa45);})[_0x5c1a('0x19')](function(_0x594f06){_0x4a8343['rows']=_0x594f06;return _0x4a8343;});}})['then'](respondWithFilteredResult(_0x10e6d6,_0x5bfa45))[_0x5c1a('0x26')](handleError(_0x10e6d6,null));};exports['uploadCsv']=function(_0x24d785,_0x476300){try{if(!_0x24d785[_0x5c1a('0x37')][_0x5c1a('0x5b')]){throw new Error('No\x20ListId\x20specified');}if(!_0x24d785[_0x5c1a('0x37')]['binding_keys']){throw new Error(_0x5c1a('0x9f'));}if(!_0x24d785[_0x5c1a('0x37')]['binding_values']){throw new Error(_0x5c1a('0xa0'));}if(!_0x24d785['body'][_0x5c1a('0xa1')]){throw new Error('Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed');}var _0x3b59cf=_0x24d785[_0x5c1a('0x37')][_0x5c1a('0xa2')][_0x5c1a('0xa3')](',');var _0x157328=_0x24d785['body']['binding_values'][_0x5c1a('0xa3')](',');if(!_0x3b59cf[_0x5c1a('0x29')]||!_0x157328[_0x5c1a('0x29')]||_0x3b59cf[_0x5c1a('0x29')]!==_0x157328[_0x5c1a('0x29')]){throw new Error(_0x5c1a('0xa4'));}_0x24d785[_0x5c1a('0x37')][_0x5c1a('0x7d')]=_[_0x5c1a('0xa5')](_0x3b59cf,_0x157328);if(!_0x24d785[_0x5c1a('0x37')]['fields']['phone']){throw new Error('No\x20phone\x20column\x20specified');}if(!_0x24d785[_0x5c1a('0x37')][_0x5c1a('0x7d')][_0x5c1a('0xa6')]){throw new Error(_0x5c1a('0xa7'));}var _0x39c826=path[_0x5c1a('0x3b')](config[_0x5c1a('0xa8')],_0x5c1a('0xa9'),_0x24d785[_0x5c1a('0xaa')]['filename']);fs[_0x5c1a('0xab')](_0x39c826,parseInt(_0x5c1a('0xac'),0x8));var _0x27eaf9=require('child_process')['fork'](path[_0x5c1a('0x3b')](__dirname,_0x5c1a('0xad')),[_0x39c826,_0x24d785[_0x5c1a('0x37')][_0x5c1a('0xa2')],_0x24d785[_0x5c1a('0x37')]['binding_values'],_0x24d785[_0x5c1a('0x37')][_0x5c1a('0x5b')],_0x24d785[_0x5c1a('0x37')][_0x5c1a('0xae')],_0x24d785[_0x5c1a('0x37')][_0x5c1a('0x59')],_0x24d785[_0x5c1a('0x37')][_0x5c1a('0xa1')]]);return _0x476300['status'](0xc8)[_0x5c1a('0x18')]({'message':_0x5c1a('0xaf'),'pid':_0x27eaf9[_0x5c1a('0xb0')]});}catch(_0x53c5a7){return _0x476300[_0x5c1a('0x12')](0x1f4)[_0x5c1a('0x1d')](_0x53c5a7);}};exports['upload']=function(_0x439a39,_0x4c8f92){var _0x2135ee=fs['createReadStream'](_0x439a39['file'][_0x5c1a('0x3')]);Papa[_0x5c1a('0xb1')](_0x2135ee,{'header':!![],'skipEmptyLines':!![],'preview':0x1,'complete':function(_0x3089ef){return _0x4c8f92[_0x5c1a('0x12')](0xc8)[_0x5c1a('0x18')]({'file':_0x439a39[_0x5c1a('0xaa')],'fields':_0x3089ef['meta'][_0x5c1a('0x7d')]});}});};exports[_0x5c1a('0xb2')]=function(_0x511b36,_0x424734){return db['User'][_0x5c1a('0x21')]({'raw':!![],'attributes':['id'],'where':{'role':_0x5c1a('0xb3')}})[_0x5c1a('0x19')](function(_0xe83715){var _0x2534c4=![];if(!_0x511b36[_0x5c1a('0x37')]['ListId']){throw new Error(_0x5c1a('0xb4'));}if(!_0x511b36[_0x5c1a('0x37')][_0x5c1a('0xb5')][_0x5c1a('0x74')]){throw new Error(_0x5c1a('0xb6'));}if(!_0x511b36[_0x5c1a('0x37')]['binding'][_0x5c1a('0xa6')]){throw new Error(_0x5c1a('0xa7'));}if(!_0x511b36[_0x5c1a('0x37')][_0x5c1a('0xa1')]){throw new Error('Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed');}var _0xa789e6=require(_0x5c1a('0xb7'))[_0x5c1a('0xb8')](path['join'](__dirname,_0x5c1a('0xb9')),[_0x511b36[_0x5c1a('0x25')]['id'],JSON[_0x5c1a('0xba')](_0x511b36[_0x5c1a('0x37')]),JSON[_0x5c1a('0xba')](_0xe83715)]);_0xa789e6['on'](_0x5c1a('0xbb'),function(){_0x2534c4=!![];return _0x424734[_0x5c1a('0x12')](0xc8)[_0x5c1a('0x18')]({'message':'start\x20child\x20process\x20correctly!','pid':_0xa789e6[_0x5c1a('0xb0')]});});_0xa789e6['on'](_0x5c1a('0xbc'),function(_0x494df4){if(_0x494df4&&!_0x2534c4){return _0x424734[_0x5c1a('0x12')](0x1f4)[_0x5c1a('0x18')]({'message':'error\x20child\x20process','pid':_0xa789e6[_0x5c1a('0xb0')]});}});})['catch'](handleError(_0x424734,null));};exports[_0x5c1a('0xbd')]=function(_0x384f85,_0x4c26de){return db['User'][_0x5c1a('0x21')]({'raw':!![],'attributes':['id'],'where':{'role':_0x5c1a('0xb3')}})[_0x5c1a('0x19')](function(_0x30c7ec){var _0x47e270=![];if(!_0x384f85[_0x5c1a('0x37')][_0x5c1a('0x5b')]){throw new Error('No\x20ListId\x20specified');}if(!_0x384f85['body'][_0x5c1a('0xb5')][_0x5c1a('0x74')]){throw new Error(_0x5c1a('0xb6'));}if(!_0x384f85[_0x5c1a('0x37')][_0x5c1a('0xb5')][_0x5c1a('0xa6')]){throw new Error('No\x20firstName\x20column\x20specified');}if(!_0x384f85['body'][_0x5c1a('0xa1')]){throw new Error('Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed');}var _0x135c04=require('child_process')[_0x5c1a('0xb8')](path[_0x5c1a('0x3b')](__dirname,_0x5c1a('0xbe')),[_0x384f85['params']['id'],JSON['stringify'](_0x384f85['body']),JSON[_0x5c1a('0xba')](_0x30c7ec)]);_0x135c04['on'](_0x5c1a('0xbb'),function(){_0x47e270=!![];return _0x4c26de[_0x5c1a('0x12')](0xc8)[_0x5c1a('0x18')]({'message':_0x5c1a('0xbf'),'pid':_0x135c04[_0x5c1a('0xb0')]});});_0x135c04['on'](_0x5c1a('0xbc'),function(_0x45b203){if(_0x45b203&&!_0x47e270){return _0x4c26de[_0x5c1a('0x12')](0x1f4)['json']({'message':_0x5c1a('0xc0'),'pid':_0x135c04['pid']});}});})[_0x5c1a('0x26')](handleError(_0x4c26de,null));};exports[_0x5c1a('0xc1')]=function(_0x5bd5ed,_0x17292d){var _0x7b31e4=[_0x5c1a('0xc2'),_0x5c1a('0xc3'),'sms','openchannel',_0x5c1a('0xc4'),'whatsapp',_0x5c1a('0xc5')];var _0x251cf6={'offset':0x0,'order':qs['sort']('-createdAt')},_0x459c79={'count':0x0,'rows':[]};Promise[_0x5c1a('0xc6')]()[_0x5c1a('0x19')](function(){if(_0x5bd5ed['query'][_0x5c1a('0xc7')]){if(!_[_0x5c1a('0xc8')](_0x7b31e4,_0x5bd5ed[_0x5c1a('0x2d')][_0x5c1a('0xc7')]['toLowerCase']())){throw new Error(_0x5c1a('0xc9'));}_0x7b31e4=[_0x5bd5ed['query']['channel'][_0x5c1a('0xca')]()];}if(_0x5bd5ed[_0x5c1a('0x2d')][_0x5c1a('0xcb')]){try{var _0x461e5e=JSON[_0x5c1a('0xb1')](_0x5bd5ed[_0x5c1a('0x2d')]['range']);if(!moment(_0x461e5e[_0x5c1a('0x38')])[_0x5c1a('0xcc')]()){throw new Error(_0x5c1a('0xcd'));}if(!moment(_0x461e5e['to'])[_0x5c1a('0xcc')]()){throw new Error('Invalid\x20date\x20for\x20range\x20to\x20filter');}}catch(_0x3bb8f7){throw new Error('Invalid\x20createdAt\x20filter');}}if(!_0x5bd5ed['query']['hasOwnProperty'](_0x5c1a('0x82'))){_0x251cf6[_0x5c1a('0x15')]=qs[_0x5c1a('0x15')](_0x5bd5ed[_0x5c1a('0x2d')][_0x5c1a('0x15')]||0xa);_0x251cf6[_0x5c1a('0x13')]=qs[_0x5c1a('0x13')](_0x5bd5ed['query'][_0x5c1a('0x13')]);}var _0x4ad3bf=_0x7b31e4['map'](function(_0x3dd6d9){if(_0x3dd6d9===_0x5c1a('0xc5')){var _0x5d6e4e={'attributes':['id','uniqueid','type',_0x5c1a('0xce'),_0x5c1a('0xcf'),'callerid',_0x5c1a('0xd0'),_0x5c1a('0xd1'),_0x5c1a('0xd2'),_0x5c1a('0xd3'),_0x5c1a('0xd4'),_0x5c1a('0xd5'),_0x5c1a('0xd6'),_0x5c1a('0xd7'),_0x5c1a('0xd8')],'where':{'ContactId':_0x5bd5ed[_0x5c1a('0x25')]['id']},'include':[{'model':db[_0x5c1a('0xd9')],'as':_0x5c1a('0xd9'),'attributes':['id',_0x5c1a('0x1c'),_0x5c1a('0xda'),'alias']}],'order':[[_0x5c1a('0xd4'),_0x5c1a('0xdb')]]};if(_0x5bd5ed[_0x5c1a('0x2d')][_0x5c1a('0xcb')]){_0x5d6e4e[_0x5c1a('0x5a')][_0x5c1a('0xd4')]={'$gte':_0x461e5e[_0x5c1a('0x38')],'$lte':_0x461e5e['to']};}return db['VoiceCallReport'][_0x5c1a('0xdc')](_0x5d6e4e)['then'](function(_0x4cd728){_0x459c79[_0x5c1a('0x16')]+=_0x4cd728['count'];return _['map'](_0x4cd728[_0x5c1a('0x99')],function(_0xe173d0){var _0x367fe1=_0xe173d0[_0x5c1a('0x39')]({'plain':!![]});_0x367fe1[_0x5c1a('0xc7')]=_0x3dd6d9;if(_0x367fe1[_0x5c1a('0xd9')]){_0x367fe1[_0x5c1a('0xd9')]={'id':_0x367fe1[_0x5c1a('0xd9')]['id'],'name':_0x367fe1[_0x5c1a('0xd9')][_0x5c1a('0x1c')],'fullname':_0x367fe1[_0x5c1a('0xd9')][_0x5c1a('0xda')],'alias':_0x367fe1['User'][_0x5c1a('0x2e')]};}return _0x367fe1;});});}else{var _0x3c2e0a=_['startCase'](_0x3dd6d9)+(_0x3dd6d9===_0x5c1a('0xc3')?_0x5c1a('0xdd'):_0x5c1a('0xde'));var _0x4c7420={'attributes':['id',_0x5c1a('0xdf'),_0x5c1a('0xe0'),'createdAt',_0x5c1a('0xd3'),_0x5c1a('0xe1'),_0x5c1a('0xe2'),_0x5c1a('0xe3'),_0x5c1a('0xd8'),_0x3c2e0a+'Id'],'where':{'ContactId':_0x5bd5ed[_0x5c1a('0x25')]['id']},'include':[{'model':db[_0x3c2e0a],'as':_0x5c1a('0xde'),'attributes':['id',_0x5c1a('0x1c'),'key']},{'model':db['User'],'as':_0x5c1a('0xe4'),'attributes':['id','name',_0x5c1a('0xda')]},{'model':db[_0x5c1a('0x63')],'as':'Tags','attributes':['id',_0x5c1a('0x1c'),_0x5c1a('0xe5')],'through':{'attributes':[]}}],'order':[[_0x5c1a('0xd4'),_0x5c1a('0xdb')]]};if(_0x5bd5ed[_0x5c1a('0x2d')][_0x5c1a('0xcb')]){_0x4c7420['where']['createdAt']={'$gte':_0x461e5e[_0x5c1a('0x38')],'$lte':_0x461e5e['to']};}switch(_0x3dd6d9){case _0x5c1a('0xc3'):_0x4c7420[_0x5c1a('0x7c')][_0x5c1a('0x6c')]('browserName',_0x5c1a('0xe6'),_0x5c1a('0xe7'),'deviceModel',_0x5c1a('0xe8'),_0x5c1a('0xe9'),_0x5c1a('0xea'),'ratingValue','referer');break;case _0x5c1a('0xc2'):_0x4c7420['attributes']['push'](_0x5c1a('0xeb'),_0x5c1a('0xec'));break;case'openchannel':_0x4c7420[_0x5c1a('0x7c')]['push']('externalUrl','threadId');break;}return db[_['startCase'](_0x3dd6d9)+_0x5c1a('0xed')][_0x5c1a('0xdc')](_0x4c7420)[_0x5c1a('0x19')](function(_0x3274f0){_0x459c79[_0x5c1a('0x16')]+=_0x3274f0[_0x5c1a('0x16')];return _['map'](_0x3274f0[_0x5c1a('0x99')],function(_0x1a60fa){var _0xbaa9a8=_0x1a60fa['get']({'plain':!![]});_0xbaa9a8[_0x5c1a('0xc7')]=_0x3dd6d9;if(_0xbaa9a8['Owner']){_0xbaa9a8[_0x5c1a('0xe4')]={'id':_0xbaa9a8[_0x5c1a('0xe4')]['id'],'name':_0xbaa9a8[_0x5c1a('0xe4')][_0x5c1a('0x1c')],'fullname':_0xbaa9a8[_0x5c1a('0xe4')][_0x5c1a('0xda')]};}return _0xbaa9a8;});});}});return Promise[_0x5c1a('0x86')](_0x4ad3bf);})[_0x5c1a('0x19')](function(_0x33332f){return _(_0x33332f)[_0x5c1a('0xee')]()['sortBy'](_0x5c1a('0xd4'))[_0x5c1a('0xef')]()['value']();})[_0x5c1a('0x19')](function(_0x2d588c){_0x459c79['rows']=_0x251cf6['limit']?_0x2d588c[_0x5c1a('0xf0')](_0x251cf6[_0x5c1a('0x13')],_0x251cf6[_0x5c1a('0x13')]+_0x251cf6[_0x5c1a('0x15')]):_0x2d588c;return _0x459c79;})[_0x5c1a('0x19')](respondWithFilteredResult(_0x17292d,_0x251cf6))['catch'](handleError(_0x17292d,null));};
\ No newline at end of file
+var _0x0f67=['update','then','end','sendStatus','error','stack','name','send','index','describe','getOptions','query','user','catch','destroy','CmContact','find','params','tags','keys','length','cf_','columnName','displayName','analytics','CmCustomField','findAll','alias','custom','info','Custom\x20field\x20%s\x20not\x20found\x20on\x20cm_contacts\x20table','merge','body','from','get','mergeWith','isArray','join','[CmContact][merge]\x20to\x20%s\x20from\x20%s','CmHopper','[CmContact][merge][destroy][CmHopper],\x20%s','CmHopperBlack','[CmContact][merge][destroy][CmHopperBlack],\x20%s','create','ChatInteraction','ChatMessage','ChatOfflineMessage','MailInteraction','MailMessage','SmsMessage','FaxInteraction','FaxMessage','OpenchannelMessage','CmHopperFinal','CmHopperHistory','ReportAgentPreview','VoiceCallReport','ChatQueueReport','FaxQueueReport','MailQueueReport','OpenchannelQueueReport','SmsQueueReport','JscriptySessionReport','WhatsappInteraction','WhatsappMessage','WhatsappQueueReport','dialTimezone','isNil','timezones','utcOffset','additionalPhones','bulkCreate','each','duplicates','where','$or','ListId','findOrCreate','spread','hasOwnProperty','push','contact','all','Tag','Tags','color','tag','CmContactHasItem','Phones','ItemType','sequelize','literal','$and','omit','map','format','pickBy','cf_%d','isEmpty','table','setFields','id\x20=\x20?','toParam','text','values','phone','getTags','findOne','model','rawAttributes','intersection','fields','attributes','order','sort','filters','pick','filter','options','nolimit','setTags','ids','setAdditionalPhones','ContactItemType','OrderBy','items','item_types','ItemTypeId','description','contact\x20phone\x20exists','CmHopperAdditionalPhone','item','PHONE','`ItemType`.OrderBy','ItemType.OrderBy','getAdditionalPhones','duplicateAdditionalPhones','fromContactId','CmContactId','toContactId','rescheduleAdditionalPhones','hopperId','getHoppers','includeAll','include','rows','getHopperHistories','ContactId','getJscriptySessions','uploadCsv','No\x20ListId\x20specified','binding_keys','No\x20association\x20keys\x20specified!','binding_values','No\x20association\x20values\x20specified!','socket_timestamp','Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed','split','Incorrect\x20binding\x20parameters\x20passed!','No\x20phone\x20column\x20specified','firstName','server/files/tmp','filename','chmodSync','0777','child_process','fork','../../components/import/cm/csv','CompanyId','File\x20uploaded\x20correctly!','pid','upload','createReadStream','file','parse','import','agent','binding','No\x20firstName\x20column\x20specified','../../components/import/cm/csv2','stringify','message','start\x20child\x20process\x20correctly!','exit','error\x20child\x20process','../../components/import/cm/csvUpdates','mail','chat','sms','openchannel','fax','-createdAt','resolve','channel','includes','toLowerCase','Invalid\x20channel','range','isValid','Invalid\x20date\x20for\x20range\x20to\x20filter','Invalid\x20createdAt\x20filter','uniqueid','source','destination','callerid','starttime','endtime','duration','userThirdDisposition','UserId','User','createdAt','DESC','findAndCountAll','startCase','Account','closed','closedAt','note','disposition','thirdDisposition','key','Owner','fullname','browserName','customerIp','customerPort','deviceModel','osName','ratingMessage','ratingType','ratingValue','subject','substatus','externalUrl','threadId','Interaction','flatten','sortBy','reverse','value','moment','bluebird','util','lodash','squel','papaparse','ioredis','../../components/contacts','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../config/environment/shared','redis','localhost','socket.io-emitter','./cmContact.socket','status','json','offset','limit','undefined','count','Content-Range'];(function(_0x160434,_0xc59a7f){var _0x323683=function(_0x202646){while(--_0x202646){_0x160434['push'](_0x160434['shift']());}};_0x323683(++_0xc59a7f);}(_0x0f67,0xf1));var _0x70f6=function(_0x2a34ec,_0x5a9e67){_0x2a34ec=_0x2a34ec-0x0;var _0x2cf324=_0x0f67[_0x2a34ec];return _0x2cf324;};'use strict';var moment=require(_0x70f6('0x0'));var BPromise=require(_0x70f6('0x1'));var util=require(_0x70f6('0x2'));var path=require('path');var fs=require('fs');var _=require(_0x70f6('0x3'));var squel=require(_0x70f6('0x4'));var Papa=require(_0x70f6('0x5'));var Redis=require(_0x70f6('0x6'));var contacts=require(_0x70f6('0x7'));var qs=require(_0x70f6('0x8'));var logger=require(_0x70f6('0x9'))(_0x70f6('0xa'));var config=require(_0x70f6('0xb'));var shared=require(_0x70f6('0xc'));var db=require('../../mysqldb')['db'];config[_0x70f6('0xd')]=_['defaults'](config[_0x70f6('0xd')],{'host':_0x70f6('0xe'),'port':0x18eb});var socket=require(_0x70f6('0xf'))(new Redis(config[_0x70f6('0xd')]));require(_0x70f6('0x10'))['register'](socket);function respondWithResult(_0x1fabdb,_0x5a91b7){_0x5a91b7=_0x5a91b7||0xc8;return function(_0x425ea7){if(_0x425ea7){return _0x1fabdb[_0x70f6('0x11')](_0x5a91b7)[_0x70f6('0x12')](_0x425ea7);}};}function respondWithFilteredResult(_0x5d3594,_0xd1873c){return function(_0x2b3240){if(_0x2b3240){var _0xf98c46=typeof _0xd1873c[_0x70f6('0x13')]==='undefined'&&typeof _0xd1873c[_0x70f6('0x14')]===_0x70f6('0x15');var _0x1919d1=_0x2b3240[_0x70f6('0x16')];var _0x106888=_0xf98c46?0x0:_0xd1873c['offset'];var _0x3bbaf3=_0xf98c46?_0x2b3240[_0x70f6('0x16')]:_0xd1873c['offset']+_0xd1873c[_0x70f6('0x14')];var _0x3f58d0;if(_0x3bbaf3>=_0x1919d1){_0x3bbaf3=_0x1919d1;_0x3f58d0=0xc8;}else{_0x3f58d0=0xce;}_0x5d3594['status'](_0x3f58d0);return _0x5d3594['set'](_0x70f6('0x17'),_0x106888+'-'+_0x3bbaf3+'/'+_0x1919d1)['json'](_0x2b3240);}return null;};}function saveUpdates(_0xfde511){return function(_0x485636){if(_0x485636){return _0x485636[_0x70f6('0x18')](_0xfde511)[_0x70f6('0x19')](function(_0x2784a3){return _0x2784a3;});}return null;};}function removeEntity(_0x13255d){return function(_0x2bbebd){if(_0x2bbebd){return _0x2bbebd['destroy']()[_0x70f6('0x19')](function(){_0x13255d[_0x70f6('0x11')](0xcc)[_0x70f6('0x1a')]();});}};}function handleEntityNotFound(_0x1f9620){return function(_0xcb6233){if(!_0xcb6233){_0x1f9620[_0x70f6('0x1b')](0x194);}return _0xcb6233;};}function handleError(_0x1520af,_0x8a98f){_0x8a98f=_0x8a98f||0x1f4;return function(_0x150632){logger[_0x70f6('0x1c')](_0x150632[_0x70f6('0x1d')]);if(_0x150632[_0x70f6('0x1e')]){delete _0x150632[_0x70f6('0x1e')];}_0x1520af[_0x70f6('0x11')](_0x8a98f)[_0x70f6('0x1f')](_0x150632);};}exports[_0x70f6('0x20')]=function(_0x58811c,_0x12defe){var _0x53c091={};return contacts[_0x70f6('0x21')]()[_0x70f6('0x19')](function(_0x3d35a4){_0x53c091=qs[_0x70f6('0x22')](_0x3d35a4,_0x58811c);return contacts['findAll'](_0x58811c[_0x70f6('0x23')],_0x58811c[_0x70f6('0x24')],_0x53c091,_0x3d35a4);})[_0x70f6('0x19')](respondWithFilteredResult(_0x12defe,_0x53c091))[_0x70f6('0x25')](handleError(_0x12defe,null));};exports[_0x70f6('0x26')]=function(_0x5cb283,_0x3311ec){return db[_0x70f6('0x27')][_0x70f6('0x28')]({'where':{'id':_0x5cb283[_0x70f6('0x29')]['id']}})[_0x70f6('0x19')](handleEntityNotFound(_0x3311ec,null))[_0x70f6('0x19')](removeEntity(_0x3311ec,null))[_0x70f6('0x25')](handleError(_0x3311ec,null));};exports[_0x70f6('0x21')]=function(_0x442656,_0x5cef16){return db[_0x70f6('0x27')][_0x70f6('0x21')]()[_0x70f6('0x19')](function(_0x2214d3){delete _0x2214d3[_0x70f6('0x2a')];for(var _0x76c57c=0x0;_0x76c57c<Object[_0x70f6('0x2b')](_0x2214d3)[_0x70f6('0x2c')];_0x76c57c++){var _0x4a3971=Object[_0x70f6('0x2b')](_0x2214d3)[_0x76c57c];if(!_['startsWith'](_0x4a3971,_0x70f6('0x2d'))){_0x2214d3[_0x4a3971][_0x70f6('0x2e')]=_0x4a3971;_0x2214d3[_0x4a3971][_0x70f6('0x2f')]=_0x4a3971;}}return _0x2214d3;})[_0x70f6('0x19')](function(_0x158549){var _0x3c880a={'where':Boolean(_0x442656[_0x70f6('0x23')][_0x70f6('0x30')])===!![]?undefined:{'$or':[{'ListId':_0x442656['query']['id']},{'ListId':null}]},'raw':!![]};return db[_0x70f6('0x31')][_0x70f6('0x32')](_0x3c880a)['then'](function(_0x2b15a8){for(var _0x51ae1e=0x0;_0x51ae1e<_0x2b15a8[_0x70f6('0x2c')];_0x51ae1e++){var _0x2367ea=_0x70f6('0x2d')+_0x2b15a8[_0x51ae1e]['id'];if(_0x158549[_0x2367ea]){_0x158549[_0x2367ea]['columnName']=_0x2367ea;_0x158549[_0x2367ea]['displayName']=_0x2b15a8[_0x51ae1e][_0x70f6('0x33')];_0x158549[_0x2367ea][_0x70f6('0x34')]={'type':_0x2b15a8[_0x51ae1e]['type'],'values':_0x2b15a8[_0x51ae1e]['values']};}else{logger[_0x70f6('0x35')](_0x70f6('0x36'),_0x2367ea);}}Object[_0x70f6('0x2b')](_0x158549)['forEach'](function(_0x28e47f){if(!_0x158549[_0x28e47f]['hasOwnProperty']('columnName')){delete _0x158549[_0x28e47f];}});return _0x158549;});})[_0x70f6('0x19')](respondWithResult(_0x5cef16,null))[_0x70f6('0x25')](handleError(_0x5cef16,null));};exports[_0x70f6('0x37')]=function(_0x38102a,_0x324bb0){var _0x35b8b2;var _0x14d29b;var _0x1c99db;if(_0x38102a[_0x70f6('0x38')]['id']){delete _0x38102a[_0x70f6('0x38')]['id'];}return db[_0x70f6('0x27')][_0x70f6('0x32')]({'where':{'id':[_0x38102a['body']['to'],_0x38102a['body'][_0x70f6('0x39')]]}})[_0x70f6('0x19')](function(_0x3b54a3){if(_0x3b54a3){if(_0x3b54a3['length']!==0x2){return null;}_0x3b54a3[0x0]=_0x3b54a3[0x0][_0x70f6('0x3a')]({'plain':!![]});_0x3b54a3[0x1]=_0x3b54a3[0x1]['get']({'plain':!![]});delete _0x3b54a3[0x0]['id'];delete _0x3b54a3[0x1]['id'];return _[_0x70f6('0x3b')](_0x3b54a3[0x0],_0x3b54a3[0x1],function(_0x470e4d,_0x5297a4){if(Array[_0x70f6('0x3c')](_0x5297a4)&&!_0x5297a4[_0x70f6('0x2c')]){return _0x470e4d;}else if(!_0x5297a4){return _0x470e4d;}});}})[_0x70f6('0x19')](handleEntityNotFound(_0x324bb0,null))[_0x70f6('0x19')](function(_0x19e699){if(_0x19e699){if(_0x19e699[_0x70f6('0x2a')]&&_[_0x70f6('0x3c')](_0x19e699['tags'])){_0x19e699[_0x70f6('0x2a')]=_0x19e699[_0x70f6('0x2a')][_0x70f6('0x3d')]();}logger['info'](_0x70f6('0x3e'),_0x38102a[_0x70f6('0x38')]['to'],_0x38102a['body'][_0x70f6('0x39')]);return db[_0x70f6('0x3f')][_0x70f6('0x26')]({'where':{'ContactId':[_0x38102a[_0x70f6('0x38')]['to'],_0x38102a[_0x70f6('0x38')][_0x70f6('0x39')]]}})[_0x70f6('0x19')](function(_0x50e581){logger['info'](_0x70f6('0x40'),_0x50e581);return db[_0x70f6('0x41')][_0x70f6('0x26')]({'where':{'ContactId':[_0x38102a[_0x70f6('0x38')]['to'],_0x38102a[_0x70f6('0x38')][_0x70f6('0x39')]]}})['then'](function(_0xa7e412){logger[_0x70f6('0x35')](_0x70f6('0x42'),_0xa7e412);return db['CmContact'][_0x70f6('0x43')](_0x19e699);});});}})[_0x70f6('0x19')](function(_0x8edbc7){if(_0x8edbc7){_0x35b8b2=_0x8edbc7;_0x14d29b={'ContactId':_0x35b8b2['id']};_0x1c99db={'where':{'ContactId':[_0x38102a['body']['to'],_0x38102a[_0x70f6('0x38')][_0x70f6('0x39')]]}};return db[_0x70f6('0x44')]['update'](_0x14d29b,_0x1c99db);}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db[_0x70f6('0x45')][_0x70f6('0x18')](_0x14d29b,_0x1c99db);}})['then'](function(){if(_0x35b8b2){return db[_0x70f6('0x46')][_0x70f6('0x18')](_0x14d29b,_0x1c99db);}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db[_0x70f6('0x47')][_0x70f6('0x18')](_0x14d29b,_0x1c99db);}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db[_0x70f6('0x48')][_0x70f6('0x18')](_0x14d29b,_0x1c99db);}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db[_0x70f6('0x47')]['update'](_0x14d29b,_0x1c99db);}})['then'](function(){if(_0x35b8b2){return db['MailMessage'][_0x70f6('0x18')](_0x14d29b,_0x1c99db);}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db['SmsInteraction'][_0x70f6('0x18')](_0x14d29b,_0x1c99db);}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db[_0x70f6('0x49')]['update'](_0x14d29b,_0x1c99db);}})['then'](function(){if(_0x35b8b2){return db[_0x70f6('0x4a')][_0x70f6('0x18')](_0x14d29b,_0x1c99db);}})['then'](function(){if(_0x35b8b2){return db[_0x70f6('0x4b')][_0x70f6('0x18')](_0x14d29b,_0x1c99db);}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db['OpenchannelInteraction']['update'](_0x14d29b,_0x1c99db);}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db[_0x70f6('0x4c')][_0x70f6('0x18')](_0x14d29b,_0x1c99db);}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db['CmContactHasItem'][_0x70f6('0x18')]({'CmContactId':_0x35b8b2['id']},{'where':{'CmContactId':[_0x38102a[_0x70f6('0x38')]['to'],_0x38102a[_0x70f6('0x38')][_0x70f6('0x39')]]}});}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db[_0x70f6('0x4d')][_0x70f6('0x18')](_0x14d29b,_0x1c99db);}})['then'](function(){if(_0x35b8b2){return db[_0x70f6('0x4e')]['update'](_0x14d29b,_0x1c99db);}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db[_0x70f6('0x4f')][_0x70f6('0x18')](_0x14d29b,_0x1c99db);}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db[_0x70f6('0x50')][_0x70f6('0x18')](_0x14d29b,_0x1c99db);}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db[_0x70f6('0x51')][_0x70f6('0x18')](_0x14d29b,_0x1c99db);}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db[_0x70f6('0x52')][_0x70f6('0x18')](_0x14d29b,_0x1c99db);}})['then'](function(){if(_0x35b8b2){return db[_0x70f6('0x53')][_0x70f6('0x18')](_0x14d29b,_0x1c99db);}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db[_0x70f6('0x54')][_0x70f6('0x18')](_0x14d29b,_0x1c99db);}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db[_0x70f6('0x55')]['update'](_0x14d29b,_0x1c99db);}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db[_0x70f6('0x56')][_0x70f6('0x18')](_0x14d29b,_0x1c99db);}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db[_0x70f6('0x57')][_0x70f6('0x18')](_0x14d29b,_0x1c99db);}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db[_0x70f6('0x58')][_0x70f6('0x18')](_0x14d29b,_0x1c99db);}})['then'](function(){if(_0x35b8b2){return db[_0x70f6('0x59')]['update'](_0x14d29b,_0x1c99db);}})[_0x70f6('0x19')](function(){if(_0x35b8b2){return db[_0x70f6('0x27')][_0x70f6('0x26')]({'where':{'id':[_0x38102a[_0x70f6('0x38')]['to'],_0x38102a[_0x70f6('0x38')][_0x70f6('0x39')]]}});}})['then'](function(){if(_0x35b8b2){return _0x35b8b2;}})[_0x70f6('0x19')](respondWithResult(_0x324bb0,null))['catch'](handleError(_0x324bb0,null));};exports['create']=function(_0x44ed83,_0x3d3412){return db[_0x70f6('0x27')]['describe']()[_0x70f6('0x19')](function(_0x14d6c4){if(_0x44ed83[_0x70f6('0x38')][_0x70f6('0x2a')]&&_[_0x70f6('0x3c')](_0x44ed83[_0x70f6('0x38')][_0x70f6('0x2a')])){if(_0x44ed83[_0x70f6('0x38')]['tags'][_0x70f6('0x2c')]){_0x44ed83['body']['tags']=_0x44ed83[_0x70f6('0x38')][_0x70f6('0x2a')][_0x70f6('0x3d')](';')+';';}else{_0x44ed83[_0x70f6('0x38')]['tags']=null;}}else{_0x44ed83[_0x70f6('0x38')][_0x70f6('0x2a')]=null;}if(!_['isNil'](_0x44ed83[_0x70f6('0x38')][_0x70f6('0x5a')])){var _0xb14279=_0x44ed83['body']['dialTimezone'];if(!_[_0x70f6('0x5b')](shared[_0x70f6('0x5c')][_0xb14279]))_0x44ed83['body']['utcOffset']=shared[_0x70f6('0x5c')][_0xb14279][_0x70f6('0x5d')];}return db[_0x70f6('0x27')][_0x70f6('0x43')](_0x44ed83[_0x70f6('0x38')],{'fields':_[_0x70f6('0x2b')](_0x14d6c4),'raw':!![]});})['then'](function(_0x212bcc){if(_0x44ed83[_0x70f6('0x38')][_0x70f6('0x5e')]){return insertAdditionalPhones(_0x212bcc,_0x44ed83['body'][_0x70f6('0x5e')]);}else{return _0x212bcc;}})[_0x70f6('0x19')](respondWithResult(_0x3d3412,0xc9))['catch'](handleError(_0x3d3412,null));};exports[_0x70f6('0x5f')]=function(_0x463c81,_0x288dc4){var _0x4738d0=0x0;var _0x123f39=0x0;var _0x5047eb=0x0;var _0x37573e=[];return db['CmContact'][_0x70f6('0x21')]()['then'](function(_0x22d062){return BPromise[_0x70f6('0x60')](_0x463c81[_0x70f6('0x38')],function(_0x16b594){var _0x20280a={'where':{'$or':[]},'defaults':_0x16b594,'fields':_[_0x70f6('0x2b')](_0x22d062),'raw':!![]};if(_0x16b594[_0x70f6('0x61')]){for(var _0x47a8f0=0x0;_0x47a8f0<_0x16b594[_0x70f6('0x61')][_0x70f6('0x2c')];_0x47a8f0++){var _0x26c3b6={};_0x26c3b6[_0x16b594[_0x70f6('0x61')][_0x47a8f0]]=_0x16b594[_0x16b594['duplicates'][_0x47a8f0]];_0x20280a[_0x70f6('0x62')][_0x70f6('0x63')]['push'](_0x26c3b6);}_0x20280a[_0x70f6('0x62')]['ListId']=_0x16b594[_0x70f6('0x64')];}return db[_0x70f6('0x27')][_0x70f6('0x65')](_0x20280a)[_0x70f6('0x66')](function(_0x24cb2c,_0x5f05f6){if(_0x5f05f6){if(_0x16b594[_0x70f6('0x67')]('additionalPhones')){_0x37573e[_0x70f6('0x68')]({'contact':_0x24cb2c,'additionalPhones':_0x16b594[_0x70f6('0x5e')]});}_0x4738d0++;}else{_0x5047eb++;}})[_0x70f6('0x25')](function(){_0x123f39++;});});})[_0x70f6('0x19')](function(_0x243d49){if(_0x243d49){if(_0x37573e[_0x70f6('0x2c')]>0x0){return new Promise(function(_0x6e677b){var _0x3c014b=[];for(var _0x230c8f=0x0;_0x230c8f<_0x37573e[_0x70f6('0x2c')];_0x230c8f++){_0x3c014b[_0x70f6('0x68')](insertAdditionalPhones(_0x37573e[_0x230c8f][_0x70f6('0x69')],_0x37573e[_0x230c8f][_0x70f6('0x5e')]));}Promise[_0x70f6('0x6a')](_0x3c014b)[_0x70f6('0x19')](function(){_0x6e677b(0x1);});})[_0x70f6('0x19')](function(){return{'success':_0x4738d0,'failure':_0x123f39,'duplicates':_0x5047eb};});}else{return{'success':_0x4738d0,'failure':_0x123f39,'duplicates':_0x5047eb};}}})[_0x70f6('0x19')](respondWithResult(_0x288dc4,0xc9))[_0x70f6('0x25')](handleError(_0x288dc4,null));};exports['show']=function(_0x3401bf,_0x4e9793){var _0x299d84;return db[_0x70f6('0x27')][_0x70f6('0x21')]()[_0x70f6('0x19')](function(_0xce035c){return db['CmContact'][_0x70f6('0x28')]({'where':{'id':_0x3401bf['params']['id']},'include':[{'model':db[_0x70f6('0x6b')],'as':_0x70f6('0x6c'),'attributes':['id','name',_0x70f6('0x6d')],'required':_0x3401bf[_0x70f6('0x23')][_0x70f6('0x6e')]?!![]:![]},{'model':db[_0x70f6('0x6f')],'as':_0x70f6('0x70'),'where':{'CmContactId':_0x3401bf[_0x70f6('0x29')]['id']},'required':![],'include':[{'model':db['ContactItemType'],'as':_0x70f6('0x71')}]}],'order':[db[_0x70f6('0x72')][_0x70f6('0x73')]('Phones.OrderBy')],'attributes':_['keys'](_0xce035c)});})[_0x70f6('0x19')](function(_0xd9a462){if(!_[_0x70f6('0x5b')](_0xd9a462)){_0x299d84=_0xd9a462[_0x70f6('0x3a')]({'plain':!![]});var _0x5a2856={'where':{'$and':[{'ListId':{'$ne':null}}]}};if(_0xd9a462&&_0xd9a462[_0x70f6('0x64')]){if(_0xd9a462[_0x70f6('0x64')]){_0x5a2856[_0x70f6('0x62')][_0x70f6('0x74')][_0x70f6('0x68')]({'ListId':{'$ne':_0xd9a462[_0x70f6('0x64')]}});}}return db[_0x70f6('0x31')]['findAll'](_0x5a2856);}})['then'](function(_0x5eed5a){if(!_[_0x70f6('0x5b')](_0x5eed5a)){return _[_0x70f6('0x75')](_0x299d84,_[_0x70f6('0x76')](_0x5eed5a,function(_0x452a63){return util[_0x70f6('0x77')]('cf_%d',_0x452a63['id']);}));}})[_0x70f6('0x19')](handleEntityNotFound(_0x4e9793,null))[_0x70f6('0x19')](respondWithResult(_0x4e9793,null))['catch'](handleError(_0x4e9793,null));};exports['update']=function(_0x31d1c0,_0x4d6193){var _0x49a860;if(_0x31d1c0[_0x70f6('0x38')]['id']){delete _0x31d1c0[_0x70f6('0x38')]['id'];}if(!_[_0x70f6('0x5b')](_0x31d1c0['body'][_0x70f6('0x5a')])){var _0x1e999b=_0x31d1c0[_0x70f6('0x38')][_0x70f6('0x5a')];if(!_[_0x70f6('0x5b')](shared['timezones'][_0x1e999b]))_0x31d1c0[_0x70f6('0x38')][_0x70f6('0x5d')]=shared[_0x70f6('0x5c')][_0x1e999b][_0x70f6('0x5d')];}return db[_0x70f6('0x27')][_0x70f6('0x28')]({'where':{'id':_0x31d1c0[_0x70f6('0x29')]['id']}})[_0x70f6('0x19')](handleEntityNotFound(_0x4d6193,null))[_0x70f6('0x19')](saveUpdates(_0x31d1c0[_0x70f6('0x38')],null))['then'](function(_0x50418b){_0x49a860=_0x50418b;var _0x279aa0={'where':{'$and':[{'ListId':{'$ne':null}}]}};if(_0x50418b&&_0x50418b['ListId']){if(_0x50418b[_0x70f6('0x64')]){_0x279aa0[_0x70f6('0x62')][_0x70f6('0x74')][_0x70f6('0x68')]({'ListId':{'$ne':_0x50418b[_0x70f6('0x64')]}});}}return db[_0x70f6('0x31')][_0x70f6('0x32')](_0x279aa0);})[_0x70f6('0x19')](function(_0x1dcdc0){if(_0x1dcdc0){return _[_0x70f6('0x75')](_[_0x70f6('0x78')](_0x31d1c0[_0x70f6('0x38')],function(_0xa70abf,_0x931dc5){return _['startsWith'](_0x931dc5,_0x70f6('0x2d'));}),_[_0x70f6('0x76')](_0x1dcdc0,function(_0xd3ba06){return util[_0x70f6('0x77')](_0x70f6('0x79'),_0xd3ba06['id']);}));}})[_0x70f6('0x19')](function(_0x28248b){if(_0x28248b&&!_[_0x70f6('0x7a')](_0x28248b)){var _0x2f606b=squel[_0x70f6('0x18')]()[_0x70f6('0x7b')]('cm_contacts')[_0x70f6('0x7c')](_0x28248b)[_0x70f6('0x62')](_0x70f6('0x7d'),_0x31d1c0[_0x70f6('0x29')]['id'])[_0x70f6('0x7e')]();return db[_0x70f6('0x72')][_0x70f6('0x23')](_0x2f606b[_0x70f6('0x7f')],{'replacements':_0x2f606b[_0x70f6('0x80')]});}})['then'](function(){if(_0x31d1c0[_0x70f6('0x38')][_0x70f6('0x81')]&&_0x49a860){return db[_0x70f6('0x3f')][_0x70f6('0x18')]({'phone':_0x31d1c0[_0x70f6('0x38')][_0x70f6('0x81')],'OrderBy':0x0},{'where':{'ContactId':_0x49a860['id']}});}})[_0x70f6('0x19')](function(){return _0x49a860;})[_0x70f6('0x19')](respondWithResult(_0x4d6193,null))[_0x70f6('0x25')](handleError(_0x4d6193,null));};exports[_0x70f6('0x82')]=function(_0x33258f,_0xecbcce){var _0x21c6ea={};var _0x49a79b={};var _0x262c22;var _0x345540;return db[_0x70f6('0x27')][_0x70f6('0x83')]({'where':{'id':_0x33258f[_0x70f6('0x29')]['id']}})[_0x70f6('0x19')](handleEntityNotFound(_0xecbcce,null))[_0x70f6('0x19')](function(_0xc11c14){if(_0xc11c14){_0x262c22=_0xc11c14;_0x49a79b[_0x70f6('0x84')]=_[_0x70f6('0x2b')](db['Tag'][_0x70f6('0x85')]);_0x49a79b[_0x70f6('0x23')]=_[_0x70f6('0x2b')](_0x33258f[_0x70f6('0x23')]);_0x49a79b['filters']=_[_0x70f6('0x86')](_0x49a79b[_0x70f6('0x84')],_0x49a79b['query']);_0x21c6ea['attributes']=_[_0x70f6('0x86')](_0x49a79b[_0x70f6('0x84')],qs['fields'](_0x33258f[_0x70f6('0x23')][_0x70f6('0x87')]));_0x21c6ea[_0x70f6('0x88')]=_0x21c6ea[_0x70f6('0x88')][_0x70f6('0x2c')]?_0x21c6ea[_0x70f6('0x88')]:_0x49a79b[_0x70f6('0x84')];_0x21c6ea[_0x70f6('0x89')]=qs['sort'](_0x33258f[_0x70f6('0x23')][_0x70f6('0x8a')]);_0x21c6ea['where']=qs[_0x70f6('0x8b')](_[_0x70f6('0x8c')](_0x33258f[_0x70f6('0x23')],_0x49a79b[_0x70f6('0x8b')]));if(_0x33258f['query'][_0x70f6('0x8d')]){_0x21c6ea[_0x70f6('0x62')]=_[_0x70f6('0x37')](_0x21c6ea[_0x70f6('0x62')],{'$or':_[_0x70f6('0x76')](_0x21c6ea[_0x70f6('0x88')],function(_0x2767d0){var _0x19f543={};_0x19f543[_0x2767d0]={'$like':'%'+_0x33258f[_0x70f6('0x23')][_0x70f6('0x8d')]+'%'};return _0x19f543;})});}_0x21c6ea=_[_0x70f6('0x37')]({},_0x21c6ea,_0x33258f[_0x70f6('0x8e')]);return _0x262c22[_0x70f6('0x82')](_0x21c6ea);}})[_0x70f6('0x19')](function(_0x314b32){if(_0x314b32){_0x345540=_0x314b32[_0x70f6('0x2c')];if(!_0x33258f[_0x70f6('0x23')][_0x70f6('0x67')](_0x70f6('0x8f'))){_0x21c6ea[_0x70f6('0x14')]=qs[_0x70f6('0x14')](_0x33258f[_0x70f6('0x23')][_0x70f6('0x14')]);_0x21c6ea[_0x70f6('0x13')]=qs[_0x70f6('0x13')](_0x33258f[_0x70f6('0x23')][_0x70f6('0x13')]);}return _0x262c22[_0x70f6('0x82')](_0x21c6ea);}})[_0x70f6('0x19')](function(_0x5c53e5){if(_0x5c53e5){return _0x5c53e5?{'count':_0x345540,'rows':_0x5c53e5}:null;}})['then'](respondWithResult(_0xecbcce,null))['catch'](handleError(_0xecbcce,null));};exports[_0x70f6('0x90')]=function(_0x1641b8,_0x31b6e7){if(_0x1641b8['body']['id']){delete _0x1641b8[_0x70f6('0x38')]['id'];}return db[_0x70f6('0x27')][_0x70f6('0x83')]({'where':{'id':_0x1641b8[_0x70f6('0x29')]['id']}})['then'](handleEntityNotFound(_0x31b6e7,null))[_0x70f6('0x19')](function(_0x4357d5){if(_0x4357d5){return _0x4357d5[_0x70f6('0x90')](_0x1641b8[_0x70f6('0x38')][_0x70f6('0x91')]||[]);}return null;})[_0x70f6('0x19')](respondWithResult(_0x31b6e7,null))[_0x70f6('0x25')](handleError(_0x31b6e7,null));};exports[_0x70f6('0x92')]=function(_0xc78547,_0x17a7b6){var _0x578586=[];_0x578586[_0x70f6('0x68')](addAdditionalPhones(_0xc78547[_0x70f6('0x38')]));Promise['all'](_0x578586)[_0x70f6('0x19')](function(){_0x578586=[];_0x578586['push'](deleteCmHopperPhones(_0xc78547[_0x70f6('0x38')]['id']));_0x578586[_0x70f6('0x68')](addCmHopperPhones(_0xc78547[_0x70f6('0x38')]['id']));Promise[_0x70f6('0x6a')](_0x578586)[_0x70f6('0x19')](function(){return[0x1];})['then'](respondWithResult(_0x17a7b6,null));});};function addAdditionalPhones(_0x4e627d){var _0x56c7aa;return new Promise(function(_0x30bd3a){return db[_0x70f6('0x6f')][_0x70f6('0x26')]({'where':{'CmContactId':_0x4e627d['id']}})[_0x70f6('0x19')](function(){db[_0x70f6('0x93')][_0x70f6('0x32')]({'raw':!![],'attributes':['id',_0x70f6('0x94')]})[_0x70f6('0x19')](function(_0x530955){var _0x313cfb=[];for(var _0x1ce6b8=0x0;_0x1ce6b8<_0x4e627d[_0x70f6('0x95')][_0x70f6('0x2c')];_0x1ce6b8++){var _0x4e2346=_0x4e627d['item_types']?_[_0x70f6('0x5b')](_0x4e627d[_0x70f6('0x96')][_0x1ce6b8])?'':_0x4e627d[_0x70f6('0x96')][_0x1ce6b8]:_0x4e627d[_0x70f6('0x95')][_0x1ce6b8]['ItemTypeId']?_0x4e627d[_0x70f6('0x95')][_0x1ce6b8][_0x70f6('0x97')]:'';var _0x51bd4c=_[_0x70f6('0x5b')](_0x4e627d[_0x70f6('0x95')][_0x1ce6b8][_0x70f6('0x98')])?'':_0x4e627d[_0x70f6('0x95')][_0x1ce6b8][_0x70f6('0x98')];var _0x229900=_0x4e2346+':'+_0x4e627d[_0x70f6('0x95')][_0x1ce6b8]['phone']+'§'+_0x51bd4c;if(_['isNil'](_0x56c7aa))_0x56c7aa=_0x229900;else _0x56c7aa+=';'+_0x229900;var _0x1c4f28=null;var _0x29f2c0=null;if(_0x4e627d[_0x70f6('0x96')]){if(!_[_0x70f6('0x5b')](_0x4e627d[_0x70f6('0x96')][_0x1ce6b8])){_0x29f2c0=_[_0x70f6('0x28')](_0x530955,function(_0x3a7557){return _0x3a7557['id']===_0x4e627d[_0x70f6('0x96')][_0x1ce6b8];});if(!_[_0x70f6('0x5b')](_0x29f2c0)){_0x1c4f28=_0x29f2c0[_0x70f6('0x94')];}}}else{if(!_[_0x70f6('0x5b')](_0x4e627d[_0x70f6('0x95')][_0x1ce6b8])){_0x29f2c0=_[_0x70f6('0x28')](_0x530955,function(_0x187e9e){return _0x187e9e['id']===_0x4e627d[_0x70f6('0x95')][_0x1ce6b8][_0x70f6('0x97')];});if(!_[_0x70f6('0x5b')](_0x29f2c0)){_0x1c4f28=_0x1ce6b8;}}}if(_[_0x70f6('0x5b')](_0x1c4f28)){_0x1c4f28=0x64;}_0x313cfb[_0x70f6('0x68')](addAdditionalPhone(_0x4e627d['id'],_0x4e627d[_0x70f6('0x95')][_0x1ce6b8]['phone'],_0x4e627d['item_types']?_[_0x70f6('0x5b')](_0x4e627d[_0x70f6('0x96')][_0x1ce6b8])?null:_0x4e627d['item_types'][_0x1ce6b8]:_0x4e627d['items'][_0x1ce6b8]['ItemTypeId']?_0x4e627d['items'][_0x1ce6b8][_0x70f6('0x97')]:null,_0x1c4f28,_0x51bd4c));}Promise[_0x70f6('0x6a')](_0x313cfb)[_0x70f6('0x19')](function(){db[_0x70f6('0x27')]['update']({'AdditionalPhones':_0x56c7aa},{'where':{'id':_0x4e627d['id']}})[_0x70f6('0x19')](function(){_0x30bd3a(0x1);});});});});});}function addAdditionalPhone(_0x35ab12,_0x72f25f,_0x3d320d,_0x467a6b,_0x263032){return db[_0x70f6('0x6f')]['find']({'where':{'CmContactId':_0x35ab12,'item':_0x72f25f}})[_0x70f6('0x19')](function(_0x35b9db){if(_0x35b9db)logger['info'](_0x70f6('0x99'),_0x35b9db);else{db[_0x70f6('0x6f')][_0x70f6('0x43')]({'CmContactId':_0x35ab12,'item':_0x72f25f,'ItemTypeId':_0x3d320d,'OrderBy':_0x467a6b,'ItemClass':'PHONE','description':_0x263032});}});}function deleteCmHopperPhones(_0x3399f4){return new Promise(function(_0x8f2a54){return db['CmHopper']['findAll']({'raw':!![],'attributes':['id'],'where':{'ContactId':_0x3399f4}})[_0x70f6('0x19')](function(_0x531b16){db[_0x70f6('0x9a')][_0x70f6('0x26')]({'where':{'CmHopperId':{'$in':_[_0x70f6('0x76')](_0x531b16,'id')}}});})['then'](function(){_0x8f2a54(0x1);});});}function addCmHopperPhones(_0x2d7a31){return new Promise(function(_0x4ab359){return db['CmHopper'][_0x70f6('0x32')]({'raw':!![],'attributes':['id'],'where':{'ContactId':_0x2d7a31}})['then'](function(_0x1e43dd){var _0x777f61=[];_[_0x70f6('0x76')](_0x1e43dd,function(_0xb7fe89){_0x777f61[_0x70f6('0x68')](createCmHopperPhone(_0x2d7a31,_0xb7fe89['id']));});Promise[_0x70f6('0x6a')](_0x777f61)[_0x70f6('0x19')](function(){_0x4ab359(0x1);});});});}function createCmHopperPhone(_0x30298c,_0x236a5e){return new Promise(function(_0x1f84e8){db[_0x70f6('0x6f')]['findAll']({'raw':!![],'attributes':[_0x70f6('0x9b'),'OrderBy'],'where':{'CmContactId':_0x30298c,'ItemClass':_0x70f6('0x9c')},'include':[{'model':db[_0x70f6('0x93')],'attributes':[_0x70f6('0x94')],'as':'ItemType'}],'order':['OrderBy',db[_0x70f6('0x72')][_0x70f6('0x73')](_0x70f6('0x9d'))]})['then'](function(_0x30f10e){var _0x1f9d03=0x1;var _0x134fe8=_[_0x70f6('0x76')](_0x30f10e,function(_0x1622b6){_0x1622b6['CmHopperId']=_0x236a5e;_0x1622b6[_0x70f6('0x81')]=_0x1622b6[_0x70f6('0x9b')];_0x1622b6[_0x70f6('0x94')]=_0x1f9d03;delete _0x1622b6[_0x70f6('0x9e')];_0x1f9d03=_0x1f9d03+0x1;return _0x1622b6;});return db['CmHopperAdditionalPhone'][_0x70f6('0x5f')](_0x134fe8,{});})[_0x70f6('0x19')](function(){_0x1f84e8(0x1);});});}function insertAdditionalPhones(_0x5549bd,_0x3846f4){return new Promise(function(_0x44a8f8){var _0x1bc9fd=[];for(var _0x57f235=0x0;_0x57f235<_0x3846f4[_0x70f6('0x2c')];_0x57f235++){var _0x243777=_0x3846f4[_0x57f235];_0x1bc9fd['push'](parseContactItemType(_0x243777));}Promise[_0x70f6('0x6a')](_0x1bc9fd)['then'](function(){var _0x440f73={'id':_0x5549bd['id'],'items':_0x3846f4};return addAdditionalPhones(_0x440f73)[_0x70f6('0x19')](function(){return addCmHopperPhones(_0x5549bd['id']);});})[_0x70f6('0x19')](function(){_0x44a8f8(_0x5549bd);});});}function parseContactItemType(_0x12a292){return new Promise(function(_0x14f86b){if(_0x12a292[_0x70f6('0x67')](_0x70f6('0x97'))){_0x14f86b(_0x12a292);}else{return db[_0x70f6('0x93')][_0x70f6('0x28')]({'where':{'name':_0x12a292[_0x70f6('0x71')]}})[_0x70f6('0x19')](function(_0x461608){if(_[_0x70f6('0x5b')](_0x461608))_0x12a292[_0x70f6('0x97')]=null;else _0x12a292[_0x70f6('0x97')]=_0x461608['id'];_0x14f86b(_0x12a292);});}});}exports[_0x70f6('0x9f')]=function(_0x59446c,_0x53e16b){return db[_0x70f6('0x6f')]['findAll']({'raw':!![],'where':{'CmContactId':_0x59446c[_0x70f6('0x29')]['id'],'ItemClass':'PHONE'},'include':[{'model':db[_0x70f6('0x93')],'as':_0x70f6('0x71')}],'order':[[_0x70f6('0x94')],[db['sequelize'][_0x70f6('0x73')](_0x70f6('0x9d'))]]})[_0x70f6('0x19')](function(_0xd23c36){return _0xd23c36;})[_0x70f6('0x19')](respondWithResult(_0x53e16b,null))[_0x70f6('0x25')](handleError(_0x53e16b,null));};exports[_0x70f6('0xa0')]=function(_0x502824,_0x35437b){return db[_0x70f6('0x6f')][_0x70f6('0x32')]({'raw':!![],'where':{'CmContactId':_0x502824[_0x70f6('0x38')][_0x70f6('0xa1')]}})[_0x70f6('0x19')](function(_0x256642){var _0x373935=_[_0x70f6('0x76')](_0x256642,function(_0x22bbac){_0x22bbac[_0x70f6('0xa2')]=_0x502824['body'][_0x70f6('0xa3')];return _0x22bbac;});return db[_0x70f6('0x6f')][_0x70f6('0x5f')](_0x373935,{});})['then'](function(){return addCmHopperPhones(_0x502824[_0x70f6('0x38')][_0x70f6('0xa3')]);})[_0x70f6('0x19')](function(){return['ok'];})['then'](respondWithResult(_0x35437b,null))[_0x70f6('0x25')](handleError(_0x35437b,null));};exports[_0x70f6('0xa4')]=function(_0x56685d,_0x356794){var _0x7b4542=[];_0x7b4542[_0x70f6('0x68')](createCmHopperPhone(_0x56685d[_0x70f6('0x38')]['id'],_0x56685d[_0x70f6('0x38')][_0x70f6('0xa5')]));Promise[_0x70f6('0x6a')](_0x7b4542)[_0x70f6('0x19')](function(){return[0x1];})[_0x70f6('0x19')](respondWithResult(_0x356794,null));};exports[_0x70f6('0xa6')]=function(_0x26e727,_0x40a8be){var _0x22f743={'raw':![],'where':{}};var _0x5b7d65={};var _0x1edb06={'count':0x0,'rows':[]};return db['CmContact'][_0x70f6('0x83')]({'where':{'id':_0x26e727[_0x70f6('0x29')]['id']}})[_0x70f6('0x19')](handleEntityNotFound(_0x40a8be,null))[_0x70f6('0x19')](function(_0x30d417){if(_0x30d417){_0x5b7d65[_0x70f6('0x84')]=_[_0x70f6('0x2b')](db[_0x70f6('0x3f')]['rawAttributes']);_0x5b7d65[_0x70f6('0x23')]=_[_0x70f6('0x2b')](_0x26e727[_0x70f6('0x23')]);_0x5b7d65['filters']=_[_0x70f6('0x86')](_0x5b7d65[_0x70f6('0x84')],_0x5b7d65[_0x70f6('0x23')]);_0x22f743['attributes']=_['intersection'](_0x5b7d65[_0x70f6('0x84')],qs[_0x70f6('0x87')](_0x26e727[_0x70f6('0x23')][_0x70f6('0x87')]));_0x22f743[_0x70f6('0x88')]=_0x22f743[_0x70f6('0x88')][_0x70f6('0x2c')]?_0x22f743[_0x70f6('0x88')]:_0x5b7d65[_0x70f6('0x84')];if(!_0x26e727[_0x70f6('0x23')][_0x70f6('0x67')](_0x70f6('0x8f'))){_0x22f743[_0x70f6('0x14')]=qs[_0x70f6('0x14')](_0x26e727[_0x70f6('0x23')][_0x70f6('0x14')]);_0x22f743[_0x70f6('0x13')]=qs[_0x70f6('0x13')](_0x26e727['query'][_0x70f6('0x13')]);}_0x22f743[_0x70f6('0x89')]=qs[_0x70f6('0x8a')](_0x26e727[_0x70f6('0x23')][_0x70f6('0x8a')]);_0x22f743[_0x70f6('0x62')]=qs[_0x70f6('0x8b')](_[_0x70f6('0x8c')](_0x26e727['query'],_0x5b7d65[_0x70f6('0x8b')]));_0x22f743[_0x70f6('0x62')]['ContactId']=_0x30d417['id'];if(_0x26e727['query'][_0x70f6('0x8d')]){_0x22f743[_0x70f6('0x62')]=_[_0x70f6('0x37')](_0x22f743[_0x70f6('0x62')],{'$or':_['map'](_0x22f743[_0x70f6('0x88')],function(_0x9e7bab){var _0x1e4fff={};_0x1e4fff[_0x9e7bab]={'$like':'%'+_0x26e727[_0x70f6('0x23')]['filter']+'%'};return _0x1e4fff;})});}_0x22f743=_[_0x70f6('0x37')]({},_0x22f743,_0x26e727['options']);return db[_0x70f6('0x3f')]['count']({'where':_0x22f743[_0x70f6('0x62')]})['then'](function(_0x64e89a){_0x1edb06['count']=_0x64e89a;if(_0x26e727[_0x70f6('0x23')][_0x70f6('0xa7')]){_0x22f743[_0x70f6('0xa8')]=[{'all':!![]}];}return db['CmHopper'][_0x70f6('0x32')](_0x22f743);})[_0x70f6('0x19')](function(_0xdc6fa0){_0x1edb06[_0x70f6('0xa9')]=_0xdc6fa0;return _0x1edb06;});}})['then'](respondWithFilteredResult(_0x40a8be,_0x22f743))[_0x70f6('0x25')](handleError(_0x40a8be,null));};exports[_0x70f6('0xaa')]=function(_0x2f0eb1,_0x1abf03){var _0x4f2444={'raw':!![],'where':{}};var _0x31fbf2={};var _0x141e90={'count':0x0,'rows':[]};return db[_0x70f6('0x27')][_0x70f6('0x83')]({'where':{'id':_0x2f0eb1[_0x70f6('0x29')]['id']}})[_0x70f6('0x19')](handleEntityNotFound(_0x1abf03,null))[_0x70f6('0x19')](function(_0xb4bcde){if(_0xb4bcde){_0x31fbf2[_0x70f6('0x84')]=_['keys'](db[_0x70f6('0x4e')][_0x70f6('0x85')]);_0x31fbf2[_0x70f6('0x23')]=_['keys'](_0x2f0eb1['query']);_0x31fbf2['filters']=_[_0x70f6('0x86')](_0x31fbf2[_0x70f6('0x84')],_0x31fbf2[_0x70f6('0x23')]);_0x4f2444[_0x70f6('0x88')]=_[_0x70f6('0x86')](_0x31fbf2['model'],qs[_0x70f6('0x87')](_0x2f0eb1[_0x70f6('0x23')][_0x70f6('0x87')]));_0x4f2444['attributes']=_0x4f2444[_0x70f6('0x88')][_0x70f6('0x2c')]?_0x4f2444[_0x70f6('0x88')]:_0x31fbf2[_0x70f6('0x84')];if(!_0x2f0eb1['query'][_0x70f6('0x67')](_0x70f6('0x8f'))){_0x4f2444[_0x70f6('0x14')]=qs[_0x70f6('0x14')](_0x2f0eb1[_0x70f6('0x23')][_0x70f6('0x14')]);_0x4f2444['offset']=qs['offset'](_0x2f0eb1[_0x70f6('0x23')]['offset']);}_0x4f2444[_0x70f6('0x89')]=qs['sort'](_0x2f0eb1[_0x70f6('0x23')]['sort']);_0x4f2444['where']=qs[_0x70f6('0x8b')](_[_0x70f6('0x8c')](_0x2f0eb1['query'],_0x31fbf2[_0x70f6('0x8b')]));_0x4f2444['where']['ContactId']=_0xb4bcde['id'];if(_0x2f0eb1['query'][_0x70f6('0x8d')]){_0x4f2444['where']=_['merge'](_0x4f2444[_0x70f6('0x62')],{'$or':_[_0x70f6('0x76')](_0x4f2444[_0x70f6('0x88')],function(_0x214077){var _0x511246={};_0x511246[_0x214077]={'$like':'%'+_0x2f0eb1[_0x70f6('0x23')]['filter']+'%'};return _0x511246;})});}_0x4f2444=_[_0x70f6('0x37')]({},_0x4f2444,_0x2f0eb1[_0x70f6('0x8e')]);return db[_0x70f6('0x4e')][_0x70f6('0x16')]({'where':_0x4f2444[_0x70f6('0x62')]})[_0x70f6('0x19')](function(_0x4ac224){_0x141e90['count']=_0x4ac224;if(_0x2f0eb1[_0x70f6('0x23')][_0x70f6('0xa7')]){_0x4f2444['include']=[{'all':!![]}];}return db[_0x70f6('0x4e')][_0x70f6('0x32')](_0x4f2444);})[_0x70f6('0x19')](function(_0x431f83){_0x141e90[_0x70f6('0xa9')]=_0x431f83;return _0x141e90;});}})[_0x70f6('0x19')](respondWithFilteredResult(_0x1abf03,_0x4f2444))[_0x70f6('0x25')](handleError(_0x1abf03,null));};exports['getHopperFinals']=function(_0x6a6465,_0x21904e){var _0xb2e144={'raw':!![],'where':{}};var _0x7e9a23={};var _0x9e649b={'count':0x0,'rows':[]};return db['CmContact'][_0x70f6('0x83')]({'where':{'id':_0x6a6465[_0x70f6('0x29')]['id']}})[_0x70f6('0x19')](handleEntityNotFound(_0x21904e,null))[_0x70f6('0x19')](function(_0x27316b){if(_0x27316b){_0x7e9a23[_0x70f6('0x84')]=_[_0x70f6('0x2b')](db['CmHopperFinal']['rawAttributes']);_0x7e9a23['query']=_[_0x70f6('0x2b')](_0x6a6465['query']);_0x7e9a23[_0x70f6('0x8b')]=_['intersection'](_0x7e9a23[_0x70f6('0x84')],_0x7e9a23[_0x70f6('0x23')]);_0xb2e144['attributes']=_['intersection'](_0x7e9a23[_0x70f6('0x84')],qs[_0x70f6('0x87')](_0x6a6465['query'][_0x70f6('0x87')]));_0xb2e144[_0x70f6('0x88')]=_0xb2e144[_0x70f6('0x88')][_0x70f6('0x2c')]?_0xb2e144[_0x70f6('0x88')]:_0x7e9a23[_0x70f6('0x84')];if(!_0x6a6465['query'][_0x70f6('0x67')](_0x70f6('0x8f'))){_0xb2e144[_0x70f6('0x14')]=qs[_0x70f6('0x14')](_0x6a6465[_0x70f6('0x23')][_0x70f6('0x14')]);_0xb2e144[_0x70f6('0x13')]=qs[_0x70f6('0x13')](_0x6a6465['query']['offset']);}_0xb2e144[_0x70f6('0x89')]=qs[_0x70f6('0x8a')](_0x6a6465[_0x70f6('0x23')][_0x70f6('0x8a')]);_0xb2e144['where']=qs[_0x70f6('0x8b')](_[_0x70f6('0x8c')](_0x6a6465[_0x70f6('0x23')],_0x7e9a23['filters']));_0xb2e144[_0x70f6('0x62')][_0x70f6('0xab')]=_0x27316b['id'];if(_0x6a6465[_0x70f6('0x23')][_0x70f6('0x8d')]){_0xb2e144[_0x70f6('0x62')]=_[_0x70f6('0x37')](_0xb2e144['where'],{'$or':_[_0x70f6('0x76')](_0xb2e144[_0x70f6('0x88')],function(_0x1bb41b){var _0x2927e0={};_0x2927e0[_0x1bb41b]={'$like':'%'+_0x6a6465['query'][_0x70f6('0x8d')]+'%'};return _0x2927e0;})});}_0xb2e144=_[_0x70f6('0x37')]({},_0xb2e144,_0x6a6465[_0x70f6('0x8e')]);return db[_0x70f6('0x4d')][_0x70f6('0x16')]({'where':_0xb2e144[_0x70f6('0x62')]})['then'](function(_0x3f339d){_0x9e649b[_0x70f6('0x16')]=_0x3f339d;if(_0x6a6465[_0x70f6('0x23')][_0x70f6('0xa7')]){_0xb2e144['include']=[{'all':!![]}];}return db['CmHopperFinal'][_0x70f6('0x32')](_0xb2e144);})[_0x70f6('0x19')](function(_0x5e5059){_0x9e649b[_0x70f6('0xa9')]=_0x5e5059;return _0x9e649b;});}})[_0x70f6('0x19')](respondWithFilteredResult(_0x21904e,_0xb2e144))[_0x70f6('0x25')](handleError(_0x21904e,null));};exports[_0x70f6('0xac')]=function(_0x3be884,_0x3664f4){var _0x1c4c33={'raw':!![],'where':{}};var _0x4c7cf4={};var _0x48b805={'count':0x0,'rows':[]};return db[_0x70f6('0x27')]['findOne']({'where':{'id':_0x3be884['params']['id']}})['then'](handleEntityNotFound(_0x3664f4,null))[_0x70f6('0x19')](function(_0x30e5b0){if(_0x30e5b0){_0x4c7cf4['model']=_['keys'](db[_0x70f6('0x56')][_0x70f6('0x85')]);_0x4c7cf4[_0x70f6('0x23')]=_[_0x70f6('0x2b')](_0x3be884[_0x70f6('0x23')]);_0x4c7cf4['filters']=_['intersection'](_0x4c7cf4['model'],_0x4c7cf4[_0x70f6('0x23')]);_0x1c4c33['attributes']=_[_0x70f6('0x86')](_0x4c7cf4['model'],qs[_0x70f6('0x87')](_0x3be884[_0x70f6('0x23')]['fields']));_0x1c4c33[_0x70f6('0x88')]=_0x1c4c33['attributes'][_0x70f6('0x2c')]?_0x1c4c33[_0x70f6('0x88')]:_0x4c7cf4['model'];if(!_0x3be884['query'][_0x70f6('0x67')](_0x70f6('0x8f'))){_0x1c4c33[_0x70f6('0x14')]=qs[_0x70f6('0x14')](_0x3be884[_0x70f6('0x23')][_0x70f6('0x14')]);_0x1c4c33[_0x70f6('0x13')]=qs[_0x70f6('0x13')](_0x3be884[_0x70f6('0x23')][_0x70f6('0x13')]);}_0x1c4c33[_0x70f6('0x89')]=qs[_0x70f6('0x8a')](_0x3be884['query']['sort']);_0x1c4c33[_0x70f6('0x62')]=qs[_0x70f6('0x8b')](_['pick'](_0x3be884[_0x70f6('0x23')],_0x4c7cf4[_0x70f6('0x8b')]));_0x1c4c33[_0x70f6('0x62')][_0x70f6('0xab')]=_0x30e5b0['id'];if(_0x3be884[_0x70f6('0x23')]['filter']){_0x1c4c33[_0x70f6('0x62')]=_[_0x70f6('0x37')](_0x1c4c33[_0x70f6('0x62')],{'$or':_[_0x70f6('0x76')](_0x1c4c33[_0x70f6('0x88')],function(_0x27cfc7){var _0x407d5b={};_0x407d5b[_0x27cfc7]={'$like':'%'+_0x3be884['query'][_0x70f6('0x8d')]+'%'};return _0x407d5b;})});}_0x1c4c33=_[_0x70f6('0x37')]({},_0x1c4c33,_0x3be884[_0x70f6('0x8e')]);return db[_0x70f6('0x56')][_0x70f6('0x16')]({'where':_0x1c4c33[_0x70f6('0x62')]})[_0x70f6('0x19')](function(_0x528b73){_0x48b805[_0x70f6('0x16')]=_0x528b73;if(_0x3be884[_0x70f6('0x23')][_0x70f6('0xa7')]){_0x1c4c33[_0x70f6('0xa8')]=[{'all':!![]}];}return db[_0x70f6('0x56')][_0x70f6('0x32')](_0x1c4c33);})[_0x70f6('0x19')](function(_0x10b06b){_0x48b805[_0x70f6('0xa9')]=_0x10b06b;return _0x48b805;});}})[_0x70f6('0x19')](respondWithFilteredResult(_0x3664f4,_0x1c4c33))[_0x70f6('0x25')](handleError(_0x3664f4,null));};exports[_0x70f6('0xad')]=function(_0x250346,_0x574966){try{if(!_0x250346[_0x70f6('0x38')][_0x70f6('0x64')]){throw new Error(_0x70f6('0xae'));}if(!_0x250346[_0x70f6('0x38')][_0x70f6('0xaf')]){throw new Error(_0x70f6('0xb0'));}if(!_0x250346[_0x70f6('0x38')][_0x70f6('0xb1')]){throw new Error(_0x70f6('0xb2'));}if(!_0x250346['body'][_0x70f6('0xb3')]){throw new Error(_0x70f6('0xb4'));}var _0x4b0563=_0x250346['body']['binding_keys']['split'](',');var _0x50b6de=_0x250346[_0x70f6('0x38')]['binding_values'][_0x70f6('0xb5')](',');if(!_0x4b0563[_0x70f6('0x2c')]||!_0x50b6de[_0x70f6('0x2c')]||_0x4b0563[_0x70f6('0x2c')]!==_0x50b6de['length']){throw new Error(_0x70f6('0xb6'));}_0x250346[_0x70f6('0x38')][_0x70f6('0x87')]=_['zipObject'](_0x4b0563,_0x50b6de);if(!_0x250346[_0x70f6('0x38')]['fields']['phone']){throw new Error(_0x70f6('0xb7'));}if(!_0x250346[_0x70f6('0x38')][_0x70f6('0x87')][_0x70f6('0xb8')]){throw new Error('No\x20firstName\x20column\x20specified');}var _0x1feaa8=path[_0x70f6('0x3d')](config['root'],_0x70f6('0xb9'),_0x250346['file'][_0x70f6('0xba')]);fs[_0x70f6('0xbb')](_0x1feaa8,parseInt(_0x70f6('0xbc'),0x8));var _0x20cf03=require(_0x70f6('0xbd'))[_0x70f6('0xbe')](path[_0x70f6('0x3d')](__dirname,_0x70f6('0xbf')),[_0x1feaa8,_0x250346[_0x70f6('0x38')]['binding_keys'],_0x250346[_0x70f6('0x38')][_0x70f6('0xb1')],_0x250346[_0x70f6('0x38')][_0x70f6('0x64')],_0x250346[_0x70f6('0x38')][_0x70f6('0xc0')],_0x250346[_0x70f6('0x38')][_0x70f6('0x61')],_0x250346[_0x70f6('0x38')][_0x70f6('0xb3')]]);return _0x574966[_0x70f6('0x11')](0xc8)[_0x70f6('0x12')]({'message':_0x70f6('0xc1'),'pid':_0x20cf03[_0x70f6('0xc2')]});}catch(_0x52db17){return _0x574966[_0x70f6('0x11')](0x1f4)['send'](_0x52db17);}};exports[_0x70f6('0xc3')]=function(_0x3cfb47,_0x181d86){var _0x257b4b=fs[_0x70f6('0xc4')](_0x3cfb47[_0x70f6('0xc5')]['path']);Papa[_0x70f6('0xc6')](_0x257b4b,{'header':!![],'skipEmptyLines':!![],'preview':0x1,'complete':function(_0x5f4c27){return _0x181d86['status'](0xc8)[_0x70f6('0x12')]({'file':_0x3cfb47[_0x70f6('0xc5')],'fields':_0x5f4c27['meta'][_0x70f6('0x87')]});}});};exports[_0x70f6('0xc7')]=function(_0xd17086,_0x22fad1){return db['User'][_0x70f6('0x32')]({'raw':!![],'attributes':['id'],'where':{'role':_0x70f6('0xc8')}})[_0x70f6('0x19')](function(_0x14f627){var _0x4840cf=![];if(!_0xd17086[_0x70f6('0x38')][_0x70f6('0x64')]){throw new Error(_0x70f6('0xae'));}if(!_0xd17086['body'][_0x70f6('0xc9')][_0x70f6('0x81')]){throw new Error('No\x20phone\x20column\x20specified');}if(!_0xd17086[_0x70f6('0x38')][_0x70f6('0xc9')][_0x70f6('0xb8')]){throw new Error(_0x70f6('0xca'));}if(!_0xd17086['body'][_0x70f6('0xb3')]){throw new Error(_0x70f6('0xb4'));}var _0xb3ff84=require(_0x70f6('0xbd'))[_0x70f6('0xbe')](path[_0x70f6('0x3d')](__dirname,_0x70f6('0xcb')),[_0xd17086[_0x70f6('0x29')]['id'],JSON[_0x70f6('0xcc')](_0xd17086[_0x70f6('0x38')]),JSON[_0x70f6('0xcc')](_0x14f627)]);_0xb3ff84['on'](_0x70f6('0xcd'),function(){_0x4840cf=!![];return _0x22fad1[_0x70f6('0x11')](0xc8)[_0x70f6('0x12')]({'message':_0x70f6('0xce'),'pid':_0xb3ff84[_0x70f6('0xc2')]});});_0xb3ff84['on'](_0x70f6('0xcf'),function(_0x5c893f){if(_0x5c893f&&!_0x4840cf){return _0x22fad1[_0x70f6('0x11')](0x1f4)[_0x70f6('0x12')]({'message':_0x70f6('0xd0'),'pid':_0xb3ff84[_0x70f6('0xc2')]});}});})[_0x70f6('0x25')](handleError(_0x22fad1,null));};exports['importUpdates']=function(_0x4e3b1f,_0x28d8d4){return db['User'][_0x70f6('0x32')]({'raw':!![],'attributes':['id'],'where':{'role':'agent'}})[_0x70f6('0x19')](function(_0x2946e7){var _0x5a145e=![];if(!_0x4e3b1f[_0x70f6('0x38')]['ListId']){throw new Error(_0x70f6('0xae'));}if(!_0x4e3b1f['body'][_0x70f6('0xc9')][_0x70f6('0x81')]){throw new Error('No\x20phone\x20column\x20specified');}if(!_0x4e3b1f[_0x70f6('0x38')][_0x70f6('0xc9')][_0x70f6('0xb8')]){throw new Error(_0x70f6('0xca'));}if(!_0x4e3b1f[_0x70f6('0x38')][_0x70f6('0xb3')]){throw new Error(_0x70f6('0xb4'));}var _0x25efdf=require('child_process')['fork'](path[_0x70f6('0x3d')](__dirname,_0x70f6('0xd1')),[_0x4e3b1f['params']['id'],JSON[_0x70f6('0xcc')](_0x4e3b1f[_0x70f6('0x38')]),JSON[_0x70f6('0xcc')](_0x2946e7)]);_0x25efdf['on'](_0x70f6('0xcd'),function(){_0x5a145e=!![];return _0x28d8d4[_0x70f6('0x11')](0xc8)[_0x70f6('0x12')]({'message':_0x70f6('0xce'),'pid':_0x25efdf[_0x70f6('0xc2')]});});_0x25efdf['on'](_0x70f6('0xcf'),function(_0x12f8f5){if(_0x12f8f5&&!_0x5a145e){return _0x28d8d4['status'](0x1f4)[_0x70f6('0x12')]({'message':_0x70f6('0xd0'),'pid':_0x25efdf[_0x70f6('0xc2')]});}});})[_0x70f6('0x25')](handleError(_0x28d8d4,null));};exports['getJourney']=function(_0x446de2,_0x518140){var _0x33a247=[_0x70f6('0xd2'),_0x70f6('0xd3'),_0x70f6('0xd4'),_0x70f6('0xd5'),_0x70f6('0xd6'),'whatsapp','voice'];var _0x43bd12={'offset':0x0,'order':qs['sort'](_0x70f6('0xd7'))},_0x516c8d={'count':0x0,'rows':[]};Promise[_0x70f6('0xd8')]()['then'](function(){if(_0x446de2['query'][_0x70f6('0xd9')]){if(!_[_0x70f6('0xda')](_0x33a247,_0x446de2['query'][_0x70f6('0xd9')][_0x70f6('0xdb')]())){throw new Error(_0x70f6('0xdc'));}_0x33a247=[_0x446de2['query'][_0x70f6('0xd9')]['toLowerCase']()];}if(_0x446de2[_0x70f6('0x23')][_0x70f6('0xdd')]){try{var _0xcd26f8=JSON[_0x70f6('0xc6')](_0x446de2[_0x70f6('0x23')][_0x70f6('0xdd')]);if(!moment(_0xcd26f8['from'])[_0x70f6('0xde')]()){throw new Error('Invalid\x20date\x20for\x20range\x20from\x20filter');}if(!moment(_0xcd26f8['to'])['isValid']()){throw new Error(_0x70f6('0xdf'));}}catch(_0x68c0af){throw new Error(_0x70f6('0xe0'));}}if(!_0x446de2['query'][_0x70f6('0x67')](_0x70f6('0x8f'))){_0x43bd12[_0x70f6('0x14')]=qs[_0x70f6('0x14')](_0x446de2[_0x70f6('0x23')][_0x70f6('0x14')]||0xa);_0x43bd12['offset']=qs['offset'](_0x446de2['query']['offset']);}var _0xa08929=_0x33a247[_0x70f6('0x76')](function(_0x370622){if(_0x370622==='voice'){var _0x2264dd={'attributes':['id',_0x70f6('0xe1'),'type',_0x70f6('0xe2'),_0x70f6('0xe3'),_0x70f6('0xe4'),_0x70f6('0xe5'),_0x70f6('0xe6'),_0x70f6('0xe7'),'note','createdAt','userDisposition','userSecondDisposition',_0x70f6('0xe8'),_0x70f6('0xe9')],'where':{'ContactId':_0x446de2['params']['id']},'include':[{'model':db[_0x70f6('0xea')],'as':_0x70f6('0xea'),'attributes':['id',_0x70f6('0x1e'),'fullname',_0x70f6('0x33')]}],'order':[[_0x70f6('0xeb'),_0x70f6('0xec')]]};if(_0x446de2[_0x70f6('0x23')][_0x70f6('0xdd')]){_0x2264dd[_0x70f6('0x62')]['createdAt']={'$gte':_0xcd26f8['from'],'$lte':_0xcd26f8['to']};}return db['VoiceCallReport'][_0x70f6('0xed')](_0x2264dd)[_0x70f6('0x19')](function(_0x115520){_0x516c8d['count']+=_0x115520[_0x70f6('0x16')];return _[_0x70f6('0x76')](_0x115520[_0x70f6('0xa9')],function(_0x2c1471){var _0xd52400=_0x2c1471['get']({'plain':!![]});_0xd52400[_0x70f6('0xd9')]=_0x370622;if(_0xd52400[_0x70f6('0xea')]){_0xd52400['User']={'id':_0xd52400['User']['id'],'name':_0xd52400['User'][_0x70f6('0x1e')],'fullname':_0xd52400['User']['fullname'],'alias':_0xd52400[_0x70f6('0xea')]['alias']};}return _0xd52400;});});}else{var _0x273561=_[_0x70f6('0xee')](_0x370622)+(_0x370622===_0x70f6('0xd3')?'Website':_0x70f6('0xef'));var _0x30cf83={'attributes':['id',_0x70f6('0xf0'),_0x70f6('0xf1'),_0x70f6('0xeb'),_0x70f6('0xf2'),_0x70f6('0xf3'),'secondDisposition',_0x70f6('0xf4'),_0x70f6('0xe9'),_0x273561+'Id'],'where':{'ContactId':_0x446de2[_0x70f6('0x29')]['id']},'include':[{'model':db[_0x273561],'as':_0x70f6('0xef'),'attributes':['id',_0x70f6('0x1e'),_0x70f6('0xf5')]},{'model':db[_0x70f6('0xea')],'as':_0x70f6('0xf6'),'attributes':['id',_0x70f6('0x1e'),_0x70f6('0xf7')]},{'model':db[_0x70f6('0x6b')],'as':_0x70f6('0x6c'),'attributes':['id',_0x70f6('0x1e'),_0x70f6('0x6d')],'through':{'attributes':[]}}],'order':[[_0x70f6('0xeb'),_0x70f6('0xec')]]};if(_0x446de2[_0x70f6('0x23')][_0x70f6('0xdd')]){_0x30cf83[_0x70f6('0x62')][_0x70f6('0xeb')]={'$gte':_0xcd26f8['from'],'$lte':_0xcd26f8['to']};}switch(_0x370622){case _0x70f6('0xd3'):_0x30cf83[_0x70f6('0x88')][_0x70f6('0x68')](_0x70f6('0xf8'),_0x70f6('0xf9'),_0x70f6('0xfa'),_0x70f6('0xfb'),_0x70f6('0xfc'),_0x70f6('0xfd'),_0x70f6('0xfe'),_0x70f6('0xff'),'referer');break;case _0x70f6('0xd2'):_0x30cf83['attributes'][_0x70f6('0x68')](_0x70f6('0x100'),_0x70f6('0x101'));break;case'openchannel':_0x30cf83[_0x70f6('0x88')][_0x70f6('0x68')](_0x70f6('0x102'),_0x70f6('0x103'));break;}return db[_[_0x70f6('0xee')](_0x370622)+_0x70f6('0x104')]['findAndCountAll'](_0x30cf83)['then'](function(_0x356c91){_0x516c8d[_0x70f6('0x16')]+=_0x356c91[_0x70f6('0x16')];return _[_0x70f6('0x76')](_0x356c91[_0x70f6('0xa9')],function(_0x34cc9d){var _0x27949a=_0x34cc9d[_0x70f6('0x3a')]({'plain':!![]});_0x27949a[_0x70f6('0xd9')]=_0x370622;if(_0x27949a['Owner']){_0x27949a[_0x70f6('0xf6')]={'id':_0x27949a['Owner']['id'],'name':_0x27949a[_0x70f6('0xf6')]['name'],'fullname':_0x27949a[_0x70f6('0xf6')]['fullname']};}return _0x27949a;});});}});return Promise['all'](_0xa08929);})[_0x70f6('0x19')](function(_0x59830d){return _(_0x59830d)[_0x70f6('0x105')]()[_0x70f6('0x106')](_0x70f6('0xeb'))[_0x70f6('0x107')]()[_0x70f6('0x108')]();})['then'](function(_0x4275eb){_0x516c8d['rows']=_0x43bd12[_0x70f6('0x14')]?_0x4275eb['slice'](_0x43bd12[_0x70f6('0x13')],_0x43bd12['offset']+_0x43bd12['limit']):_0x4275eb;return _0x516c8d;})[_0x70f6('0x19')](respondWithFilteredResult(_0x518140,_0x43bd12))[_0x70f6('0x25')](handleError(_0x518140,null));};
\ No newline at end of file
index 7cbafdf..9490523 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9aee=['save','update','remove','emit','exports','events','../../mysqldb','CmContact','setMaxListeners'];(function(_0xadaf59,_0x52a79e){var _0x59d3c3=function(_0x3c4cd2){while(--_0x3c4cd2){_0xadaf59['push'](_0xadaf59['shift']());}};_0x59d3c3(++_0x52a79e);}(_0x9aee,0x71));var _0xe9ae=function(_0x24cc35,_0x21b4e6){_0x24cc35=_0x24cc35-0x0;var _0x440e29=_0x9aee[_0x24cc35];return _0x440e29;};'use strict';var EventEmitter=require(_0xe9ae('0x0'));var CmContact=require(_0xe9ae('0x1'))['db'][_0xe9ae('0x2')];var CmContactEvents=new EventEmitter();CmContactEvents[_0xe9ae('0x3')](0x0);var events={'afterCreate':_0xe9ae('0x4'),'afterUpdate':_0xe9ae('0x5'),'afterDestroy':_0xe9ae('0x6')};function emitEvent(_0x13c2f9){return function(_0xb9c1b3,_0x5016ae,_0x526dd9){CmContactEvents['emit'](_0x13c2f9+':'+_0xb9c1b3['id'],_0xb9c1b3);CmContactEvents[_0xe9ae('0x7')](_0x13c2f9,_0xb9c1b3);_0x526dd9(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];CmContact['hook'](e,emitEvent(event));}}module[_0xe9ae('0x8')]=CmContactEvents;
\ No newline at end of file
+var _0xd289=['hasOwnProperty','hook','exports','../../mysqldb','CmContact','setMaxListeners','update','emit'];(function(_0x31ab82,_0x4ea319){var _0xe9065d=function(_0x5b0a7e){while(--_0x5b0a7e){_0x31ab82['push'](_0x31ab82['shift']());}};_0xe9065d(++_0x4ea319);}(_0xd289,0x73));var _0x9d28=function(_0x5628b8,_0x145582){_0x5628b8=_0x5628b8-0x0;var _0x3ce423=_0xd289[_0x5628b8];return _0x3ce423;};'use strict';var EventEmitter=require('events');var CmContact=require(_0x9d28('0x0'))['db'][_0x9d28('0x1')];var CmContactEvents=new EventEmitter();CmContactEvents[_0x9d28('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x9d28('0x3'),'afterDestroy':'remove'};function emitEvent(_0x373536){return function(_0x50c4fa,_0x3bd420,_0x52d1a1){CmContactEvents[_0x9d28('0x4')](_0x373536+':'+_0x50c4fa['id'],_0x50c4fa);CmContactEvents[_0x9d28('0x4')](_0x373536,_0x50c4fa);_0x52d1a1(null);};}for(var e in events){if(events[_0x9d28('0x5')](e)){var event=events[e];CmContact[_0x9d28('0x6')](e,emitEvent(event));}}module[_0x9d28('0x7')]=CmContactEvents;
\ No newline at end of file
index a9214e7..610b9ee 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdacb=['Campaign','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopper\x20Campaign\x20','ListId','findAll','outbound','CmList','always','onlyIfOpen','BlackLists','length','CmHopperBlack','message','dialCheckDuplicateType','Lists','get','cmContact,\x20%s,\x20%s','List\x20not\x20found','isEmpty','destroy','ContactId','CampaignId','push','all','info','[CmContact][afterDestroy][Succesfull]','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','../../config/environment/shared','./cmContact.attributes','exports','define','CmContact','cm_contacts','phone','fti_cm_contacts','firstName','lastName','mobile','email','FULLTEXT','utf8mb4','models','error','cmContact','inspect','scheduledat','format','YYYY-MM-DD\x20HH:mm:ss','isNil','VoiceQueue','findOne','then','dialTimezone','timezones','utcOffset','add','minutes','ret','CmHopper','cmContact,\x20afterCreate\x20','create','priority','callbackUniqueid','\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','catch','afterCreate'];(function(_0x25d69e,_0x5639a9){var _0x52f50e=function(_0x55f56a){while(--_0x55f56a){_0x25d69e['push'](_0x25d69e['shift']());}};_0x52f50e(++_0x5639a9);}(_0xdacb,0xaf));var _0xbdac=function(_0x2c273d,_0x275fa6){_0x2c273d=_0x2c273d-0x0;var _0x5afc84=_0xdacb[_0x2c273d];return _0x5afc84;};'use strict';var _=require('lodash');var util=require(_0xbdac('0x0'));var logger=require(_0xbdac('0x1'))('api');var moment=require(_0xbdac('0x2'));var BPromise=require(_0xbdac('0x3'));var rp=require(_0xbdac('0x4'));var fs=require('fs');var path=require(_0xbdac('0x5'));var rimraf=require(_0xbdac('0x6'));var config=require(_0xbdac('0x7'));var shared=require(_0xbdac('0x8'));var attributes=require(_0xbdac('0x9'));module[_0xbdac('0xa')]=function(_0x17ac3e,_0x4e0e34){return _0x17ac3e[_0xbdac('0xb')](_0xbdac('0xc'),attributes,{'tableName':_0xbdac('0xd'),'paranoid':!![],'indexes':[{'name':_0xbdac('0xe'),'fields':['phone']},{'name':_0xbdac('0xf'),'fields':[_0xbdac('0x10'),_0xbdac('0x11'),_0xbdac('0xe'),_0xbdac('0x12'),'fax',_0xbdac('0x13')],'type':_0xbdac('0x14')}],'timestamps':!![],'charset':_0xbdac('0x15'),'collate':'utf8mb4_unicode_ci','hooks':{'afterCreate':function(_0x1b23e6,_0x248281,_0x3d3803){var _0x4953da=_0x17ac3e[_0xbdac('0x16')];var _0x2da755=_0x1b23e6['get']({'plain':!![]});function _0x737348(){return function(_0xeb51df){logger[_0xbdac('0x17')](_0xbdac('0x18'),'afterCreate',util[_0xbdac('0x19')](_0xeb51df,{'showHidden':![],'depth':null}));};}function _0x574293(_0x6d9f55,_0x18c6dc){var _0x144ce1=_0x18c6dc[_0xbdac('0x1a')]?_0x18c6dc[_0xbdac('0x1a')]:moment()[_0xbdac('0x1b')](_0xbdac('0x1c'));return new BPromise(function(_0x338224,_0x5dc73d){if(_[_0xbdac('0x1d')](_0x18c6dc['dialTimezone'])){_0x338224({'ret':_0x144ce1});}else{_0x4953da[_0xbdac('0x1e')][_0xbdac('0x1f')]({'where':{'id':_0x6d9f55['id']}})[_0xbdac('0x20')](function(_0x4b5190){if(!_[_0xbdac('0x1d')](_0x4b5190)){var _0x21e919=_0x4b5190[_0xbdac('0x21')];if(!_[_0xbdac('0x1d')](_0x21e919)){var _0x3da94a=shared[_0xbdac('0x22')];var _0x2d0602=_0x3da94a[_0x21e919];var _0x22990a=_0x3da94a[_0x18c6dc['dialTimezone']];if(!_[_0xbdac('0x1d')](_0x2d0602)&&!_['isNil'](_0x22990a)){var _0x1de247=_0x2d0602['utcOffset']-_0x22990a[_0xbdac('0x23')];_0x144ce1=_0x18c6dc['scheduledat']?_0x18c6dc[_0xbdac('0x1a')]:moment();var _0x46e7b4=moment(_0x144ce1)[_0xbdac('0x24')](_0x1de247,_0xbdac('0x25'));_0x338224({'ret':_0x46e7b4[_0xbdac('0x1b')](_0xbdac('0x1c'))});}else _0x338224({'ret':_0x144ce1});}else _0x338224({'ret':_0x144ce1});}else{_0x338224({'ret':_0x144ce1});}});}});return 0xa;}var _0x574390=function(_0x425b29){return new BPromise(function(_0x1dc05b,_0x4f1bb6){_0x574293(_0x425b29,_0x2da755)[_0xbdac('0x20')](function(_0x4d5a63){_0x2da755[_0xbdac('0x1a')]=_0x4d5a63[_0xbdac('0x26')];_0x4953da[_0xbdac('0x27')][_0xbdac('0x1f')]({'where':{'phone':_0x2da755['phone'],'VoiceQueueId':_0x425b29['id']}})[_0xbdac('0x20')](function(_0x266927){if(!_['isNil'](_0x266927)){throw new Error(_0xbdac('0x28')+_0x2da755[_0xbdac('0xe')]+'\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20onlyIfOpen,\x20exist\x20in\x20hopper\x20VoiceQueue\x20'+_0x425b29['id']);}return _0x4953da[_0xbdac('0x27')][_0xbdac('0x29')]({'phone':_0x2da755[_0xbdac('0xe')],'ContactId':_0x2da755['id'],'ListId':_0x2da755['ListId'],'priority':_0x2da755[_0xbdac('0x2a')]?_0x2da755[_0xbdac('0x2a')]:0x2,'scheduledat':_0x2da755[_0xbdac('0x1a')]?_0x2da755['scheduledat']:moment()[_0xbdac('0x1b')]('YYYY-MM-DD\x20HH:mm:ss'),'callback':_0x2da755[_0xbdac('0x2b')]?!![]:![],'callbackuniqueid':_0x2da755['callbackUniqueid']?_0x2da755[_0xbdac('0x2b')]:undefined,'callbackat':_0x2da755[_0xbdac('0x2b')]?moment()[_0xbdac('0x1b')](_0xbdac('0x1c')):undefined,'VoiceQueueId':_0x425b29['id']});})['catch'](function(_0x37b009){_0x4f1bb6(_0x37b009);});});});};var _0x3094cd=function(_0x2a1650){return new BPromise(function(_0x6fe085,_0x1c9a41){_0x574293(_0x2a1650,_0x2da755)[_0xbdac('0x20')](function(_0x5bde96){_0x2da755[_0xbdac('0x1a')]=_0x5bde96[_0xbdac('0x26')];_0x4953da[_0xbdac('0x27')][_0xbdac('0x1f')]({'where':{'phone':_0x2da755[_0xbdac('0xe')],'VoiceQueueId':_0x2a1650['id']}})[_0xbdac('0x20')](function(_0x55ba35){if(!_['isNil'](_0x55ba35)){throw new Error(_0xbdac('0x28')+_0x2da755[_0xbdac('0xe')]+_0xbdac('0x2c')+_0x2a1650['id']);}return _0x4953da[_0xbdac('0x2d')][_0xbdac('0x1f')]({'where':{'calleridnum':_0x2da755[_0xbdac('0xe')],'VoiceQueueId':_0x2a1650['id']}});})[_0xbdac('0x20')](function(_0x14b1d3){if(!_['isNil'](_0x14b1d3)){throw new Error(_0xbdac('0x2e')+_0x2da755[_0xbdac('0xe')]+_0xbdac('0x2f')+_0x2a1650['id']);}return _0x4953da[_0xbdac('0x27')][_0xbdac('0x29')]({'phone':_0x2da755[_0xbdac('0xe')],'ContactId':_0x2da755['id'],'ListId':_0x2da755['ListId'],'priority':_0x2da755[_0xbdac('0x2a')]?_0x2da755[_0xbdac('0x2a')]:0x2,'scheduledat':_0x2da755[_0xbdac('0x1a')]?_0x2da755[_0xbdac('0x1a')]:moment()[_0xbdac('0x1b')]('YYYY-MM-DD\x20HH:mm:ss'),'callback':_0x2da755[_0xbdac('0x2b')]?!![]:![],'callbackuniqueid':_0x2da755[_0xbdac('0x2b')]?_0x2da755[_0xbdac('0x2b')]:undefined,'callbackat':_0x2da755[_0xbdac('0x2b')]?moment()[_0xbdac('0x1b')](_0xbdac('0x1c')):undefined,'VoiceQueueId':_0x2a1650['id']});})[_0xbdac('0x30')](function(_0x5ea4ed){_0x1c9a41(_0x5ea4ed);});});});};function _0x219e01(){return function(_0x5c1b8e){logger[_0xbdac('0x17')](_0xbdac('0x18'),_0xbdac('0x31'),util[_0xbdac('0x19')](_0x5c1b8e,{'showHidden':![],'depth':null}));};}function _0x362008(_0x5da850,_0x4c1ce3){var _0x5e4531=_0x4c1ce3[_0xbdac('0x1a')]?_0x4c1ce3['scheduledat']:moment()[_0xbdac('0x1b')](_0xbdac('0x1c'));return new BPromise(function(_0x47d32e,_0x4b704e){if(_[_0xbdac('0x1d')](_0x4c1ce3['dialTimezone'])){_0x47d32e({'ret':_0x5e4531});}else{_0x4953da[_0xbdac('0x32')]['findOne']({'where':{'id':_0x5da850['id']}})[_0xbdac('0x20')](function(_0x329449){if(!_['isNil'](_0x329449)){var _0x2edf40=_0x329449[_0xbdac('0x21')];if(!_[_0xbdac('0x1d')](_0x2edf40)){var _0x5d157e=shared['timezones'];var _0x2737ad=_0x5d157e[_0x2edf40];var _0x1fc5b9=_0x5d157e[_0x4c1ce3[_0xbdac('0x21')]];if(!_[_0xbdac('0x1d')](_0x2737ad)&&!_[_0xbdac('0x1d')](_0x1fc5b9)){var _0x180fae=_0x2737ad[_0xbdac('0x23')]-_0x1fc5b9[_0xbdac('0x23')];_0x5e4531=_0x4c1ce3[_0xbdac('0x1a')]?_0x4c1ce3[_0xbdac('0x1a')]:moment();var _0x4f2eda=moment(_0x5e4531)[_0xbdac('0x24')](_0x180fae,_0xbdac('0x25'));_0x47d32e({'ret':_0x4f2eda['format']('YYYY-MM-DD\x20HH:mm:ss')});}else _0x47d32e({'ret':_0x5e4531});}else _0x47d32e({'ret':_0x5e4531});}else{_0x47d32e({'ret':_0x5e4531});}});}});return 0xa;}var _0x316d7c=function(_0x4268c8){return new BPromise(function(_0x11dba5,_0x4d2389){_0x362008(_0x4268c8,_0x2da755)[_0xbdac('0x20')](function(_0x3f0777){_0x2da755[_0xbdac('0x1a')]=_0x3f0777[_0xbdac('0x26')];_0x4953da[_0xbdac('0x27')][_0xbdac('0x1f')]({'where':{'phone':_0x2da755[_0xbdac('0xe')],'CampaignId':_0x4268c8['id']}})['then'](function(_0x14e4dd){if(!_[_0xbdac('0x1d')](_0x14e4dd)){throw new Error(_0xbdac('0x28')+_0x2da755[_0xbdac('0xe')]+'\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20onlyIfOpen,\x20exist\x20in\x20hopper\x20Campaign\x20'+_0x4268c8['id']);}return _0x4953da[_0xbdac('0x27')]['create']({'phone':_0x2da755['phone'],'ContactId':_0x2da755['id'],'ListId':_0x2da755['ListId'],'priority':_0x2da755[_0xbdac('0x2a')]?_0x2da755['priority']:0x2,'scheduledat':_0x2da755[_0xbdac('0x1a')]?_0x2da755[_0xbdac('0x1a')]:moment()[_0xbdac('0x1b')]('YYYY-MM-DD\x20HH:mm:ss'),'callback':_0x2da755[_0xbdac('0x2b')]?!![]:![],'callbackuniqueid':_0x2da755[_0xbdac('0x2b')]?_0x2da755[_0xbdac('0x2b')]:undefined,'callbackat':_0x2da755[_0xbdac('0x2b')]?moment()[_0xbdac('0x1b')]('YYYY-MM-DD\x20HH:mm:ss'):undefined,'CampaignId':_0x4268c8['id']});})[_0xbdac('0x30')](function(_0x46cb67){_0x4d2389(_0x46cb67);});});});};var _0x2da34b=function(_0x5c9e8f){return new BPromise(function(_0x768c07,_0x3684ec){_0x362008(_0x5c9e8f,_0x2da755)[_0xbdac('0x20')](function(_0x10a517){_0x2da755[_0xbdac('0x1a')]=_0x10a517[_0xbdac('0x26')];_0x4953da[_0xbdac('0x27')][_0xbdac('0x1f')]({'where':{'phone':_0x2da755[_0xbdac('0xe')],'CampaignId':_0x5c9e8f['id']}})[_0xbdac('0x20')](function(_0x18d69b){if(!_[_0xbdac('0x1d')](_0x18d69b)){throw new Error('cmContact,\x20afterCreate\x20'+_0x2da755['phone']+_0xbdac('0x33')+_0x5c9e8f['id']);}return _0x4953da[_0xbdac('0x2d')][_0xbdac('0x1f')]({'where':{'calleridnum':_0x2da755['phone'],'CampaignId':_0x5c9e8f['id']}});})[_0xbdac('0x20')](function(_0x5923ed){if(!_[_0xbdac('0x1d')](_0x5923ed)){throw new Error(_0xbdac('0x2e')+_0x2da755['phone']+'\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopperFinal\x20Campaign\x20'+_0x5c9e8f['id']);}return _0x4953da[_0xbdac('0x27')]['create']({'phone':_0x2da755[_0xbdac('0xe')],'ContactId':_0x2da755['id'],'ListId':_0x2da755[_0xbdac('0x34')],'priority':_0x2da755['priority']?_0x2da755[_0xbdac('0x2a')]:0x2,'scheduledat':_0x2da755[_0xbdac('0x1a')]?_0x2da755['scheduledat']:moment()['format'](_0xbdac('0x1c')),'callback':_0x2da755[_0xbdac('0x2b')]?!![]:![],'callbackuniqueid':_0x2da755['callbackUniqueid']?_0x2da755[_0xbdac('0x2b')]:undefined,'callbackat':_0x2da755[_0xbdac('0x2b')]?moment()[_0xbdac('0x1b')](_0xbdac('0x1c')):undefined,'CampaignId':_0x5c9e8f['id']});})['catch'](function(_0x1fe633){_0x3684ec(_0x1fe633);});});});};if(_0x2da755[_0xbdac('0x34')]){_0x4953da[_0xbdac('0x1e')][_0xbdac('0x35')]({'where':{'type':_0xbdac('0x36')},'attributes':['id','dialCheckDuplicateType','dialTimezone'],'include':[{'model':_0x4953da[_0xbdac('0x37')],'as':'Lists','where':{'id':_0x2da755[_0xbdac('0x34')]}}]})[_0xbdac('0x20')](function(_0x4bd422){if(_0x4bd422){var _0x45c2f5=[];for(var _0x8d8874=0x0,_0x186dbb;_0x8d8874<_0x4bd422['length'];_0x8d8874+=0x1){_0x186dbb=_0x4bd422[_0x8d8874]['get']({'plain':!![]});switch(_0x186dbb['dialCheckDuplicateType']){case _0xbdac('0x38'):_0x3094cd(_0x186dbb)[_0xbdac('0x30')](_0x737348());break;case _0xbdac('0x39'):_0x574390(_0x186dbb)[_0xbdac('0x30')](_0x737348());break;default:_0x362008(_0x186dbb,_0x2da755)[_0xbdac('0x20')](function(_0x3c3f70){_0x2da755['scheduledat']=_0x3c3f70[_0xbdac('0x26')];_0x4953da[_0xbdac('0x27')][_0xbdac('0x29')]({'phone':_0x2da755[_0xbdac('0xe')],'ContactId':_0x2da755['id'],'ListId':_0x2da755[_0xbdac('0x34')],'scheduledat':_0x2da755['scheduledat']?_0x2da755[_0xbdac('0x1a')]:moment()[_0xbdac('0x1b')]('YYYY-MM-DD\x20HH:mm:ss'),'priority':_0x2da755[_0xbdac('0x2a')]?_0x2da755['priority']:0x2,'callback':_0x2da755['callbackUniqueid']?!![]:![],'callbackuniqueid':_0x2da755[_0xbdac('0x2b')]?_0x2da755['callbackUniqueid']:undefined,'callbackat':_0x2da755[_0xbdac('0x2b')]?moment()[_0xbdac('0x1b')](_0xbdac('0x1c')):undefined,'VoiceQueueId':_0x186dbb['id']})['catch'](_0x737348());});}}}})['then'](function(){return _0x4953da['VoiceQueue'][_0xbdac('0x35')]({'where':{'type':'outbound'},'attributes':['id'],'include':[{'model':_0x4953da[_0xbdac('0x37')],'as':_0xbdac('0x3a'),'where':{'id':_0x2da755['ListId']}}]})[_0xbdac('0x20')](function(_0x5995cd){if(_0x5995cd){var _0x2ddc69=[];for(var _0x4fa1eb=0x0,_0x4c969c;_0x4fa1eb<_0x5995cd[_0xbdac('0x3b')];_0x4fa1eb+=0x1){_0x4c969c=_0x5995cd[_0x4fa1eb]['get']({'plain':!![]});_0x4953da[_0xbdac('0x3c')]['create']({'phone':_0x2da755['phone'],'ContactId':_0x2da755['id'],'ListId':_0x2da755[_0xbdac('0x34')],'VoiceQueueId':_0x4c969c['id']})['catch'](function(_0x1c1c62){logger[_0xbdac('0x17')]('cmContact,\x20%s,\x20%s',_0xbdac('0x31'),_0x1c1c62[_0xbdac('0x3d')]);});}}});})[_0xbdac('0x20')](function(){return _0x4953da[_0xbdac('0x32')][_0xbdac('0x35')]({'attributes':['id',_0xbdac('0x3e'),_0xbdac('0x21')],'include':[{'model':_0x4953da[_0xbdac('0x37')],'as':_0xbdac('0x3f'),'where':{'id':_0x2da755[_0xbdac('0x34')]}}]})[_0xbdac('0x20')](function(_0x3797a0){if(_0x3797a0){var _0x5bae76=[];for(var _0x3f0d11=0x0,_0x1eb4a2;_0x3f0d11<_0x3797a0['length'];_0x3f0d11+=0x1){_0x1eb4a2=_0x3797a0[_0x3f0d11][_0xbdac('0x40')]({'plain':!![]});switch(_0x1eb4a2[_0xbdac('0x3e')]){case _0xbdac('0x38'):_0x2da34b(_0x1eb4a2)[_0xbdac('0x30')](_0x219e01());break;case'onlyIfOpen':_0x316d7c(_0x1eb4a2)[_0xbdac('0x30')](_0x219e01());break;default:_0x4953da[_0xbdac('0x27')]['create']({'phone':_0x2da755['phone'],'ContactId':_0x2da755['id'],'ListId':_0x2da755[_0xbdac('0x34')],'scheduledat':_0x2da755['scheduledat']?_0x2da755[_0xbdac('0x1a')]:moment()[_0xbdac('0x1b')](_0xbdac('0x1c')),'priority':_0x2da755[_0xbdac('0x2a')]?_0x2da755[_0xbdac('0x2a')]:0x2,'callback':_0x2da755['callbackUniqueid']?!![]:![],'callbackuniqueid':_0x2da755['callbackUniqueid']?_0x2da755[_0xbdac('0x2b')]:undefined,'callbackat':_0x2da755[_0xbdac('0x2b')]?moment()['format'](_0xbdac('0x1c')):undefined,'CampaignId':_0x1eb4a2['id']})['catch'](_0x219e01());}}}});})[_0xbdac('0x20')](function(){return _0x4953da['Campaign'][_0xbdac('0x35')]({'attributes':['id'],'include':[{'model':_0x4953da[_0xbdac('0x37')],'as':_0xbdac('0x3a'),'where':{'id':_0x2da755['ListId']}}]})['then'](function(_0xb9ec44){if(_0xb9ec44){var _0x776c15=[];for(var _0x12622c=0x0,_0xba27b3;_0x12622c<_0xb9ec44[_0xbdac('0x3b')];_0x12622c+=0x1){_0xba27b3=_0xb9ec44[_0x12622c][_0xbdac('0x40')]({'plain':!![]});_0x4953da[_0xbdac('0x3c')][_0xbdac('0x29')]({'phone':_0x2da755['phone'],'ContactId':_0x2da755['id'],'ListId':_0x2da755['ListId'],'CampaignId':_0xba27b3['id']})[_0xbdac('0x30')](function(_0x330a40){logger[_0xbdac('0x17')](_0xbdac('0x41'),_0xbdac('0x31'),_0x330a40[_0xbdac('0x3d')]);});}}});})[_0xbdac('0x20')](function(){_0x3d3803();})['catch'](function(_0x7778ea){logger[_0xbdac('0x17')]('cmContact,\x20%s,\x20%s',_0xbdac('0x31'),_0x7778ea[_0xbdac('0x3d')]);_0x3d3803(_0x7778ea);});}else{_0x3d3803(new Error(_0xbdac('0x42')));}},'afterDestroy':function(_0x59f933,_0x308fe1,_0x32a5e7){var _0x378fdd=_0x17ac3e[_0xbdac('0x16')];var _0x23b5bf=_0x59f933[_0xbdac('0x40')]({'plain':!![]});return _0x378fdd['CmHopper']['findAll']({'raw':!![],'where':{'ListId':_0x23b5bf[_0xbdac('0x34')],'ContactId':_0x23b5bf['id']}})[_0xbdac('0x20')](function(_0x1f2036){if(!_[_0xbdac('0x43')](_0x1f2036)){var _0x42f58b=[];for(var _0x4b0807=0x0;_0x4b0807<_0x1f2036[_0xbdac('0x3b')];_0x4b0807+=0x1){var _0x1385d6=_0x378fdd[_0xbdac('0x27')][_0xbdac('0x44')]({'where':{'ListId':_0x1f2036[_0x4b0807][_0xbdac('0x34')],'ContactId':_0x1f2036[_0x4b0807][_0xbdac('0x45')],'VoiceQueueId':_0x1f2036[_0x4b0807]['VoiceQueueId'],'CampaignId':_0x1f2036[_0x4b0807][_0xbdac('0x46')]}});_0x42f58b[_0xbdac('0x47')](_0x1385d6);}return BPromise[_0xbdac('0x48')](_0x42f58b);}})[_0xbdac('0x20')](function(_0x452232){logger[_0xbdac('0x49')](_0xbdac('0x4a'),util[_0xbdac('0x19')](_0x452232,{'showHidden':![],'depth':null}));_0x32a5e7();})[_0xbdac('0x30')](function(_0x37ba86){logger['error']('[CmContact][afterDestroy][Error]',util[_0xbdac('0x19')](_0x37ba86,{'showHidden':![],'depth':null}));_0x32a5e7(_0x37ba86);});}}});};
\ No newline at end of file
+var _0xca02=['CmList','Lists','always','findAll','outbound','BlackLists','length','get','CmHopperBlack','cmContact,\x20%s,\x20%s','message','Campaign','error','isEmpty','destroy','ContactId','CampaignId','info','[CmContact][afterDestroy][Succesfull]','[CmContact][afterDestroy][Error]','lodash','util','../../config/logger','path','rimraf','../../config/environment','../../config/environment/shared','./cmContact.attributes','exports','define','cm_contacts','phone','fti_cm_contacts','lastName','mobile','fax','email','FULLTEXT','utf8mb4','utf8mb4_unicode_ci','models','cmContact','afterCreate','inspect','scheduledat','format','YYYY-MM-DD\x20HH:mm:ss','isNil','dialTimezone','VoiceQueue','then','utcOffset','minutes','CmHopper','findOne','cmContact,\x20afterCreate\x20','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20onlyIfOpen,\x20exist\x20in\x20hopper\x20VoiceQueue\x20','ListId','priority','callbackUniqueid','CmHopperFinal','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopperFinal\x20VoiceQueue\x20','create','catch','ret','\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','dialCheckDuplicateType'];(function(_0x5c20bf,_0x2381ee){var _0x19b3f3=function(_0x30f8e6){while(--_0x30f8e6){_0x5c20bf['push'](_0x5c20bf['shift']());}};_0x19b3f3(++_0x2381ee);}(_0xca02,0x16d));var _0x2ca0=function(_0x1475f6,_0x723bfb){_0x1475f6=_0x1475f6-0x0;var _0x24afd0=_0xca02[_0x1475f6];return _0x24afd0;};'use strict';var _=require(_0x2ca0('0x0'));var util=require(_0x2ca0('0x1'));var logger=require(_0x2ca0('0x2'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x2ca0('0x3'));var rimraf=require(_0x2ca0('0x4'));var config=require(_0x2ca0('0x5'));var shared=require(_0x2ca0('0x6'));var attributes=require(_0x2ca0('0x7'));module[_0x2ca0('0x8')]=function(_0x1c48df,_0x5d29c9){return _0x1c48df[_0x2ca0('0x9')]('CmContact',attributes,{'tableName':_0x2ca0('0xa'),'paranoid':!![],'indexes':[{'name':_0x2ca0('0xb'),'fields':[_0x2ca0('0xb')]},{'name':_0x2ca0('0xc'),'fields':['firstName',_0x2ca0('0xd'),_0x2ca0('0xb'),_0x2ca0('0xe'),_0x2ca0('0xf'),_0x2ca0('0x10')],'type':_0x2ca0('0x11')}],'timestamps':!![],'charset':_0x2ca0('0x12'),'collate':_0x2ca0('0x13'),'hooks':{'afterCreate':function(_0x3b3055,_0x39eacc,_0x4f9a95){var _0x5bfe75=_0x1c48df[_0x2ca0('0x14')];var _0xbe59ba=_0x3b3055['get']({'plain':!![]});function _0x40f79a(){return function(_0xd5560a){logger['error'](_0x2ca0('0x15'),_0x2ca0('0x16'),util[_0x2ca0('0x17')](_0xd5560a,{'showHidden':![],'depth':null}));};}function _0x594e39(_0x505fb3,_0x334685){var _0x516cd8=_0x334685[_0x2ca0('0x18')]?_0x334685[_0x2ca0('0x18')]:moment()[_0x2ca0('0x19')](_0x2ca0('0x1a'));return new BPromise(function(_0x55e99e,_0x5dbb05){if(_[_0x2ca0('0x1b')](_0x334685[_0x2ca0('0x1c')])){_0x55e99e({'ret':_0x516cd8});}else{_0x5bfe75[_0x2ca0('0x1d')]['findOne']({'where':{'id':_0x505fb3['id']}})[_0x2ca0('0x1e')](function(_0x1719e5){if(!_['isNil'](_0x1719e5)){var _0x4c8f1a=_0x1719e5[_0x2ca0('0x1c')];if(!_[_0x2ca0('0x1b')](_0x4c8f1a)){var _0xf8be1a=shared['timezones'];var _0x564dc4=_0xf8be1a[_0x4c8f1a];var _0x2bb173=_0xf8be1a[_0x334685[_0x2ca0('0x1c')]];if(!_[_0x2ca0('0x1b')](_0x564dc4)&&!_[_0x2ca0('0x1b')](_0x2bb173)){var _0x260a42=_0x564dc4['utcOffset']-_0x2bb173[_0x2ca0('0x1f')];_0x516cd8=_0x334685[_0x2ca0('0x18')]?_0x334685[_0x2ca0('0x18')]:moment();var _0x3e0ba9=moment(_0x516cd8)['add'](_0x260a42,_0x2ca0('0x20'));_0x55e99e({'ret':_0x3e0ba9[_0x2ca0('0x19')](_0x2ca0('0x1a'))});}else _0x55e99e({'ret':_0x516cd8});}else _0x55e99e({'ret':_0x516cd8});}else{_0x55e99e({'ret':_0x516cd8});}});}});return 0xa;}var _0x1941d2=function(_0x1502e2){return new BPromise(function(_0x4ba275,_0x24562a){_0x594e39(_0x1502e2,_0xbe59ba)[_0x2ca0('0x1e')](function(_0x287700){_0xbe59ba[_0x2ca0('0x18')]=_0x287700['ret'];_0x5bfe75[_0x2ca0('0x21')][_0x2ca0('0x22')]({'where':{'phone':_0xbe59ba['phone'],'VoiceQueueId':_0x1502e2['id']}})[_0x2ca0('0x1e')](function(_0x55c5ea){if(!_[_0x2ca0('0x1b')](_0x55c5ea)){throw new Error(_0x2ca0('0x23')+_0xbe59ba['phone']+_0x2ca0('0x24')+_0x1502e2['id']);}return _0x5bfe75['CmHopper']['create']({'phone':_0xbe59ba[_0x2ca0('0xb')],'ContactId':_0xbe59ba['id'],'ListId':_0xbe59ba[_0x2ca0('0x25')],'priority':_0xbe59ba[_0x2ca0('0x26')]?_0xbe59ba['priority']:0x2,'scheduledat':_0xbe59ba[_0x2ca0('0x18')]?_0xbe59ba[_0x2ca0('0x18')]:moment()[_0x2ca0('0x19')](_0x2ca0('0x1a')),'callback':_0xbe59ba['callbackUniqueid']?!![]:![],'callbackuniqueid':_0xbe59ba[_0x2ca0('0x27')]?_0xbe59ba[_0x2ca0('0x27')]:undefined,'callbackat':_0xbe59ba[_0x2ca0('0x27')]?moment()[_0x2ca0('0x19')](_0x2ca0('0x1a')):undefined,'VoiceQueueId':_0x1502e2['id']});})['catch'](function(_0x2eaf7e){_0x24562a(_0x2eaf7e);});});});};var _0x5b7ae0=function(_0x12dee0){return new BPromise(function(_0x5fe0f3,_0xd269df){_0x594e39(_0x12dee0,_0xbe59ba)['then'](function(_0x5b12fe){_0xbe59ba[_0x2ca0('0x18')]=_0x5b12fe['ret'];_0x5bfe75[_0x2ca0('0x21')][_0x2ca0('0x22')]({'where':{'phone':_0xbe59ba[_0x2ca0('0xb')],'VoiceQueueId':_0x12dee0['id']}})[_0x2ca0('0x1e')](function(_0x1e622f){if(!_[_0x2ca0('0x1b')](_0x1e622f)){throw new Error(_0x2ca0('0x23')+_0xbe59ba[_0x2ca0('0xb')]+'\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopper\x20VoiceQueue\x20'+_0x12dee0['id']);}return _0x5bfe75[_0x2ca0('0x28')][_0x2ca0('0x22')]({'where':{'calleridnum':_0xbe59ba[_0x2ca0('0xb')],'VoiceQueueId':_0x12dee0['id']}});})[_0x2ca0('0x1e')](function(_0x47279e){if(!_[_0x2ca0('0x1b')](_0x47279e)){throw new Error('cmContact,\x20afterCreate,\x20'+_0xbe59ba[_0x2ca0('0xb')]+_0x2ca0('0x29')+_0x12dee0['id']);}return _0x5bfe75[_0x2ca0('0x21')][_0x2ca0('0x2a')]({'phone':_0xbe59ba[_0x2ca0('0xb')],'ContactId':_0xbe59ba['id'],'ListId':_0xbe59ba['ListId'],'priority':_0xbe59ba[_0x2ca0('0x26')]?_0xbe59ba['priority']:0x2,'scheduledat':_0xbe59ba[_0x2ca0('0x18')]?_0xbe59ba[_0x2ca0('0x18')]:moment()[_0x2ca0('0x19')](_0x2ca0('0x1a')),'callback':_0xbe59ba[_0x2ca0('0x27')]?!![]:![],'callbackuniqueid':_0xbe59ba[_0x2ca0('0x27')]?_0xbe59ba['callbackUniqueid']:undefined,'callbackat':_0xbe59ba['callbackUniqueid']?moment()['format'](_0x2ca0('0x1a')):undefined,'VoiceQueueId':_0x12dee0['id']});})[_0x2ca0('0x2b')](function(_0x109e97){_0xd269df(_0x109e97);});});});};function _0x48ed67(){return function(_0x5124c7){logger['error']('cmContact',_0x2ca0('0x16'),util[_0x2ca0('0x17')](_0x5124c7,{'showHidden':![],'depth':null}));};}function _0x11acac(_0x1cdf0f,_0x4d90fe){var _0x2010d2=_0x4d90fe[_0x2ca0('0x18')]?_0x4d90fe[_0x2ca0('0x18')]:moment()['format'](_0x2ca0('0x1a'));return new BPromise(function(_0x4c089b,_0x1dc403){if(_[_0x2ca0('0x1b')](_0x4d90fe['dialTimezone'])){_0x4c089b({'ret':_0x2010d2});}else{_0x5bfe75['Campaign'][_0x2ca0('0x22')]({'where':{'id':_0x1cdf0f['id']}})[_0x2ca0('0x1e')](function(_0x1ee935){if(!_[_0x2ca0('0x1b')](_0x1ee935)){var _0x17e4a1=_0x1ee935[_0x2ca0('0x1c')];if(!_[_0x2ca0('0x1b')](_0x17e4a1)){var _0x56cba0=shared['timezones'];var _0x40fb85=_0x56cba0[_0x17e4a1];var _0x5123c6=_0x56cba0[_0x4d90fe[_0x2ca0('0x1c')]];if(!_[_0x2ca0('0x1b')](_0x40fb85)&&!_[_0x2ca0('0x1b')](_0x5123c6)){var _0x72a781=_0x40fb85[_0x2ca0('0x1f')]-_0x5123c6[_0x2ca0('0x1f')];_0x2010d2=_0x4d90fe['scheduledat']?_0x4d90fe[_0x2ca0('0x18')]:moment();var _0x1df670=moment(_0x2010d2)['add'](_0x72a781,_0x2ca0('0x20'));_0x4c089b({'ret':_0x1df670['format']('YYYY-MM-DD\x20HH:mm:ss')});}else _0x4c089b({'ret':_0x2010d2});}else _0x4c089b({'ret':_0x2010d2});}else{_0x4c089b({'ret':_0x2010d2});}});}});return 0xa;}var _0x38f365=function(_0x3df1d7){return new BPromise(function(_0xaf6df0,_0x357f19){_0x11acac(_0x3df1d7,_0xbe59ba)[_0x2ca0('0x1e')](function(_0x4146db){_0xbe59ba[_0x2ca0('0x18')]=_0x4146db[_0x2ca0('0x2c')];_0x5bfe75[_0x2ca0('0x21')]['findOne']({'where':{'phone':_0xbe59ba['phone'],'CampaignId':_0x3df1d7['id']}})['then'](function(_0x7c0987){if(!_[_0x2ca0('0x1b')](_0x7c0987)){throw new Error('cmContact,\x20afterCreate\x20'+_0xbe59ba['phone']+_0x2ca0('0x2d')+_0x3df1d7['id']);}return _0x5bfe75[_0x2ca0('0x21')][_0x2ca0('0x2a')]({'phone':_0xbe59ba['phone'],'ContactId':_0xbe59ba['id'],'ListId':_0xbe59ba[_0x2ca0('0x25')],'priority':_0xbe59ba[_0x2ca0('0x26')]?_0xbe59ba[_0x2ca0('0x26')]:0x2,'scheduledat':_0xbe59ba[_0x2ca0('0x18')]?_0xbe59ba[_0x2ca0('0x18')]:moment()[_0x2ca0('0x19')]('YYYY-MM-DD\x20HH:mm:ss'),'callback':_0xbe59ba[_0x2ca0('0x27')]?!![]:![],'callbackuniqueid':_0xbe59ba[_0x2ca0('0x27')]?_0xbe59ba[_0x2ca0('0x27')]:undefined,'callbackat':_0xbe59ba['callbackUniqueid']?moment()[_0x2ca0('0x19')](_0x2ca0('0x1a')):undefined,'CampaignId':_0x3df1d7['id']});})[_0x2ca0('0x2b')](function(_0x285ed8){_0x357f19(_0x285ed8);});});});};var _0x16135f=function(_0x2275c5){return new BPromise(function(_0xcb9ac3,_0x6cd68d){_0x11acac(_0x2275c5,_0xbe59ba)['then'](function(_0x13e409){_0xbe59ba[_0x2ca0('0x18')]=_0x13e409[_0x2ca0('0x2c')];_0x5bfe75['CmHopper'][_0x2ca0('0x22')]({'where':{'phone':_0xbe59ba['phone'],'CampaignId':_0x2275c5['id']}})[_0x2ca0('0x1e')](function(_0x35230d){if(!_[_0x2ca0('0x1b')](_0x35230d)){throw new Error(_0x2ca0('0x23')+_0xbe59ba[_0x2ca0('0xb')]+_0x2ca0('0x2e')+_0x2275c5['id']);}return _0x5bfe75['CmHopperFinal'][_0x2ca0('0x22')]({'where':{'calleridnum':_0xbe59ba['phone'],'CampaignId':_0x2275c5['id']}});})[_0x2ca0('0x1e')](function(_0xfdc8d7){if(!_[_0x2ca0('0x1b')](_0xfdc8d7)){throw new Error('cmContact,\x20afterCreate,\x20'+_0xbe59ba[_0x2ca0('0xb')]+_0x2ca0('0x2f')+_0x2275c5['id']);}return _0x5bfe75[_0x2ca0('0x21')]['create']({'phone':_0xbe59ba[_0x2ca0('0xb')],'ContactId':_0xbe59ba['id'],'ListId':_0xbe59ba['ListId'],'priority':_0xbe59ba[_0x2ca0('0x26')]?_0xbe59ba[_0x2ca0('0x26')]:0x2,'scheduledat':_0xbe59ba[_0x2ca0('0x18')]?_0xbe59ba[_0x2ca0('0x18')]:moment()['format'](_0x2ca0('0x1a')),'callback':_0xbe59ba[_0x2ca0('0x27')]?!![]:![],'callbackuniqueid':_0xbe59ba[_0x2ca0('0x27')]?_0xbe59ba[_0x2ca0('0x27')]:undefined,'callbackat':_0xbe59ba[_0x2ca0('0x27')]?moment()[_0x2ca0('0x19')](_0x2ca0('0x1a')):undefined,'CampaignId':_0x2275c5['id']});})[_0x2ca0('0x2b')](function(_0x7d686b){_0x6cd68d(_0x7d686b);});});});};if(_0xbe59ba['ListId']){_0x5bfe75['VoiceQueue']['findAll']({'where':{'type':'outbound'},'attributes':['id',_0x2ca0('0x30'),'dialTimezone'],'include':[{'model':_0x5bfe75[_0x2ca0('0x31')],'as':_0x2ca0('0x32'),'where':{'id':_0xbe59ba[_0x2ca0('0x25')]}}]})[_0x2ca0('0x1e')](function(_0x37d8e5){if(_0x37d8e5){var _0x228ff2=[];for(var _0x3e2ddf=0x0,_0x40ff54;_0x3e2ddf<_0x37d8e5['length'];_0x3e2ddf+=0x1){_0x40ff54=_0x37d8e5[_0x3e2ddf]['get']({'plain':!![]});switch(_0x40ff54[_0x2ca0('0x30')]){case _0x2ca0('0x33'):_0x5b7ae0(_0x40ff54)[_0x2ca0('0x2b')](_0x40f79a());break;case'onlyIfOpen':_0x1941d2(_0x40ff54)[_0x2ca0('0x2b')](_0x40f79a());break;default:_0x11acac(_0x40ff54,_0xbe59ba)[_0x2ca0('0x1e')](function(_0x663f19){_0xbe59ba[_0x2ca0('0x18')]=_0x663f19[_0x2ca0('0x2c')];_0x5bfe75[_0x2ca0('0x21')][_0x2ca0('0x2a')]({'phone':_0xbe59ba[_0x2ca0('0xb')],'ContactId':_0xbe59ba['id'],'ListId':_0xbe59ba[_0x2ca0('0x25')],'scheduledat':_0xbe59ba[_0x2ca0('0x18')]?_0xbe59ba[_0x2ca0('0x18')]:moment()['format'](_0x2ca0('0x1a')),'priority':_0xbe59ba[_0x2ca0('0x26')]?_0xbe59ba['priority']:0x2,'callback':_0xbe59ba[_0x2ca0('0x27')]?!![]:![],'callbackuniqueid':_0xbe59ba[_0x2ca0('0x27')]?_0xbe59ba['callbackUniqueid']:undefined,'callbackat':_0xbe59ba[_0x2ca0('0x27')]?moment()['format'](_0x2ca0('0x1a')):undefined,'VoiceQueueId':_0x40ff54['id']})[_0x2ca0('0x2b')](_0x40f79a());});}}}})[_0x2ca0('0x1e')](function(){return _0x5bfe75[_0x2ca0('0x1d')][_0x2ca0('0x34')]({'where':{'type':_0x2ca0('0x35')},'attributes':['id'],'include':[{'model':_0x5bfe75[_0x2ca0('0x31')],'as':_0x2ca0('0x36'),'where':{'id':_0xbe59ba[_0x2ca0('0x25')]}}]})['then'](function(_0x212d23){if(_0x212d23){var _0x165f19=[];for(var _0xc30622=0x0,_0x1ceb2e;_0xc30622<_0x212d23[_0x2ca0('0x37')];_0xc30622+=0x1){_0x1ceb2e=_0x212d23[_0xc30622][_0x2ca0('0x38')]({'plain':!![]});_0x5bfe75[_0x2ca0('0x39')][_0x2ca0('0x2a')]({'phone':_0xbe59ba[_0x2ca0('0xb')],'ContactId':_0xbe59ba['id'],'ListId':_0xbe59ba[_0x2ca0('0x25')],'VoiceQueueId':_0x1ceb2e['id']})['catch'](function(_0x5e118f){logger['error'](_0x2ca0('0x3a'),_0x2ca0('0x16'),_0x5e118f[_0x2ca0('0x3b')]);});}}});})['then'](function(){return _0x5bfe75[_0x2ca0('0x3c')][_0x2ca0('0x34')]({'attributes':['id',_0x2ca0('0x30'),_0x2ca0('0x1c')],'include':[{'model':_0x5bfe75['CmList'],'as':_0x2ca0('0x32'),'where':{'id':_0xbe59ba[_0x2ca0('0x25')]}}]})[_0x2ca0('0x1e')](function(_0x1a5839){if(_0x1a5839){var _0x128395=[];for(var _0x176a2b=0x0,_0x3df57f;_0x176a2b<_0x1a5839[_0x2ca0('0x37')];_0x176a2b+=0x1){_0x3df57f=_0x1a5839[_0x176a2b][_0x2ca0('0x38')]({'plain':!![]});switch(_0x3df57f[_0x2ca0('0x30')]){case'always':_0x16135f(_0x3df57f)[_0x2ca0('0x2b')](_0x48ed67());break;case'onlyIfOpen':_0x38f365(_0x3df57f)['catch'](_0x48ed67());break;default:_0x5bfe75[_0x2ca0('0x21')][_0x2ca0('0x2a')]({'phone':_0xbe59ba['phone'],'ContactId':_0xbe59ba['id'],'ListId':_0xbe59ba['ListId'],'scheduledat':_0xbe59ba[_0x2ca0('0x18')]?_0xbe59ba[_0x2ca0('0x18')]:moment()['format'](_0x2ca0('0x1a')),'priority':_0xbe59ba[_0x2ca0('0x26')]?_0xbe59ba['priority']:0x2,'callback':_0xbe59ba['callbackUniqueid']?!![]:![],'callbackuniqueid':_0xbe59ba[_0x2ca0('0x27')]?_0xbe59ba[_0x2ca0('0x27')]:undefined,'callbackat':_0xbe59ba['callbackUniqueid']?moment()[_0x2ca0('0x19')](_0x2ca0('0x1a')):undefined,'CampaignId':_0x3df57f['id']})[_0x2ca0('0x2b')](_0x48ed67());}}}});})[_0x2ca0('0x1e')](function(){return _0x5bfe75[_0x2ca0('0x3c')][_0x2ca0('0x34')]({'attributes':['id'],'include':[{'model':_0x5bfe75['CmList'],'as':_0x2ca0('0x36'),'where':{'id':_0xbe59ba[_0x2ca0('0x25')]}}]})['then'](function(_0x2a7b23){if(_0x2a7b23){var _0xacc937=[];for(var _0x23814e=0x0,_0x946048;_0x23814e<_0x2a7b23['length'];_0x23814e+=0x1){_0x946048=_0x2a7b23[_0x23814e][_0x2ca0('0x38')]({'plain':!![]});_0x5bfe75[_0x2ca0('0x39')]['create']({'phone':_0xbe59ba['phone'],'ContactId':_0xbe59ba['id'],'ListId':_0xbe59ba['ListId'],'CampaignId':_0x946048['id']})[_0x2ca0('0x2b')](function(_0x28f285){logger[_0x2ca0('0x3d')]('cmContact,\x20%s,\x20%s',_0x2ca0('0x16'),_0x28f285[_0x2ca0('0x3b')]);});}}});})[_0x2ca0('0x1e')](function(){_0x4f9a95();})[_0x2ca0('0x2b')](function(_0x4512a8){logger['error'](_0x2ca0('0x3a'),_0x2ca0('0x16'),_0x4512a8[_0x2ca0('0x3b')]);_0x4f9a95(_0x4512a8);});}else{_0x4f9a95(new Error('List\x20not\x20found'));}},'afterDestroy':function(_0x209a7a,_0x3244c7,_0x472d83){var _0x4ac65=_0x1c48df[_0x2ca0('0x14')];var _0x81c769=_0x209a7a[_0x2ca0('0x38')]({'plain':!![]});return _0x4ac65[_0x2ca0('0x21')]['findAll']({'raw':!![],'where':{'ListId':_0x81c769[_0x2ca0('0x25')],'ContactId':_0x81c769['id']}})[_0x2ca0('0x1e')](function(_0x549cfb){if(!_[_0x2ca0('0x3e')](_0x549cfb)){var _0x129454=[];for(var _0x3814d1=0x0;_0x3814d1<_0x549cfb[_0x2ca0('0x37')];_0x3814d1+=0x1){var _0x267395=_0x4ac65[_0x2ca0('0x21')][_0x2ca0('0x3f')]({'where':{'ListId':_0x549cfb[_0x3814d1][_0x2ca0('0x25')],'ContactId':_0x549cfb[_0x3814d1][_0x2ca0('0x40')],'VoiceQueueId':_0x549cfb[_0x3814d1]['VoiceQueueId'],'CampaignId':_0x549cfb[_0x3814d1][_0x2ca0('0x41')]}});_0x129454['push'](_0x267395);}return BPromise['all'](_0x129454);}})[_0x2ca0('0x1e')](function(_0x30f5f5){logger[_0x2ca0('0x42')](_0x2ca0('0x43'),util['inspect'](_0x30f5f5,{'showHidden':![],'depth':null}));_0x472d83();})['catch'](function(_0x4565a7){logger['error'](_0x2ca0('0x44'),util[_0x2ca0('0x17')](_0x4565a7,{'showHidden':![],'depth':null}));_0x472d83(_0x4565a7);});}}});};
\ No newline at end of file
index 2d944ed..8613670 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(_0x31be18,_0xdba4d4){var _0x592132=function(_0xb903fe){while(--_0xb903fe){_0x31be18['push'](_0x31be18['shift']());}};_0x592132(++_0xdba4d4);}(_0x9957,0x93));var _0x7995=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x9957[_0x3b380d];return _0x54502b;};'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(_0x45c32f,_0x12978f){var _0x1920c2=function(_0x481b22){while(--_0x481b22){_0x45c32f['push'](_0x45c32f['shift']());}};_0x1920c2(++_0x12978f);}(_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 211e4ad..27383bd 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(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0xa9e0,0x123));var _0x0a9e=function(_0xea8947,_0x1b573d){_0xea8947=_0xea8947-0x0;var _0x2455e9=_0xa9e0[_0xea8947];return _0x2455e9;};'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(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5c3c0b,_0x4ee35e){_0x5c3c0b=_0x5c3c0b-0x0;var _0x52ecd2=_0xa9e0[_0x5c3c0b];return _0x52ecd2;};'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 88c44bf..ad4fe51 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(_0x23502b,_0x4373f3){var _0x4539d3=function(_0x233dcb){while(--_0x233dcb){_0x23502b['push'](_0x23502b['shift']());}};_0x4539d3(++_0x4373f3);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0xa9e0[_0x3947c9];return _0x2e7871;};'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(_0x3a2b81,_0x4e9e00){var _0x5426ac=function(_0x36804c){while(--_0x36804c){_0x3a2b81['push'](_0x3a2b81['shift']());}};_0x5426ac(++_0x4e9e00);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5783f4,_0x4a9e0a){_0x5783f4=_0x5783f4-0x0;var _0x28e380=_0xa9e0[_0x5783f4];return _0x28e380;};'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 4b634ae..79efabd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7980=['PHONE','sequelize','exports','INTEGER','STRING'];(function(_0x2c15dd,_0x1d9094){var _0x258461=function(_0x365277){while(--_0x365277){_0x2c15dd['push'](_0x2c15dd['shift']());}};_0x258461(++_0x1d9094);}(_0x7980,0xab));var _0x0798=function(_0x591fd0,_0x4b0980){_0x591fd0=_0x591fd0-0x0;var _0x1dd034=_0x7980[_0x591fd0];return _0x1dd034;};'use strict';var Sequelize=require(_0x0798('0x0'));module[_0x0798('0x1')]={'CmContactId':{'type':Sequelize[_0x0798('0x2')],'primaryKey':!![]},'item':{'type':Sequelize[_0x0798('0x3')],'defaultValue':'','primaryKey':!![]},'ItemTypeId':{'type':Sequelize[_0x0798('0x2')],'defaultValue':null},'ItemClass':{'type':Sequelize['STRING'],'defaultValue':_0x0798('0x4')},'OrderBy':{'type':Sequelize[_0x0798('0x2')],'defaultValue':null},'description':{'type':Sequelize[_0x0798('0x3')],'defaultValue':null}};
\ No newline at end of file
+var _0x1da1=['sequelize','exports','INTEGER','STRING'];(function(_0x618414,_0x1a7a60){var _0x21c19a=function(_0x507b17){while(--_0x507b17){_0x618414['push'](_0x618414['shift']());}};_0x21c19a(++_0x1a7a60);}(_0x1da1,0x1a4));var _0x11da=function(_0x38ca85,_0x346988){_0x38ca85=_0x38ca85-0x0;var _0x7dadb8=_0x1da1[_0x38ca85];return _0x7dadb8;};'use strict';var Sequelize=require(_0x11da('0x0'));module[_0x11da('0x1')]={'CmContactId':{'type':Sequelize[_0x11da('0x2')],'primaryKey':!![]},'item':{'type':Sequelize[_0x11da('0x3')],'defaultValue':'','primaryKey':!![]},'ItemTypeId':{'type':Sequelize[_0x11da('0x2')],'defaultValue':null},'ItemClass':{'type':Sequelize['STRING'],'defaultValue':'PHONE'},'OrderBy':{'type':Sequelize[_0x11da('0x2')],'defaultValue':null},'description':{'type':Sequelize[_0x11da('0x3')],'defaultValue':null}};
\ No newline at end of file
index 2018469..ba63c7a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcff3=['VIRTUAL','filter','merge','options','include','findAll','rows','catch','show','params','includeAll','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','eml-format','rimraf','zip-dir','fast-json-patch','moment','util','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','then','get','CmContactHasItems','UserProfileResource','destroy','error','stack','name','send','index','map','CmContactHasItem','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick'];(function(_0x413b4d,_0xa3459c){var _0x8b810a=function(_0x22d441){while(--_0x22d441){_0x413b4d['push'](_0x413b4d['shift']());}};_0x8b810a(++_0xa3459c);}(_0xcff3,0x1bd));var _0x3cff=function(_0x5a636f,_0x3fec2b){_0x5a636f=_0x5a636f-0x0;var _0x6a8cfb=_0xcff3[_0x5a636f];return _0x6a8cfb;};'use strict';var emlformat=require(_0x3cff('0x0'));var rimraf=require(_0x3cff('0x1'));var zipdir=require(_0x3cff('0x2'));var jsonpatch=require(_0x3cff('0x3'));var rp=require('request-promise');var moment=require(_0x3cff('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x3cff('0x5'));var path=require(_0x3cff('0x6'));var sox=require(_0x3cff('0x7'));var csv=require(_0x3cff('0x8'));var ejs=require(_0x3cff('0x9'));var fs=require('fs');var fs_extra=require(_0x3cff('0xa'));var _=require(_0x3cff('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x3cff('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x3cff('0x8'));var querystring=require('querystring');var Papa=require(_0x3cff('0xd'));var Redis=require(_0x3cff('0xe'));var authService=require(_0x3cff('0xf'));var qs=require(_0x3cff('0x10'));var as=require(_0x3cff('0x11'));var hardwareService=require(_0x3cff('0x12'));var logger=require('../../config/logger')('api');var utils=require(_0x3cff('0x13'));var config=require(_0x3cff('0x14'));var licenseUtil=require(_0x3cff('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x493aee,_0x50dc4d){_0x50dc4d=_0x50dc4d||0xcc;return function(_0x14a027){if(_0x14a027){return _0x493aee[_0x3cff('0x16')](_0x50dc4d);}return _0x493aee[_0x3cff('0x17')](_0x50dc4d)[_0x3cff('0x18')]();};}function respondWithResult(_0x2289f3,_0x38eb80){_0x38eb80=_0x38eb80||0xc8;return function(_0x5c0393){if(_0x5c0393){return _0x2289f3['status'](_0x38eb80)[_0x3cff('0x19')](_0x5c0393);}};}function respondWithFilteredResult(_0x834019,_0x213e22){return function(_0x3d19bd){if(_0x3d19bd){var _0x2c7334=typeof _0x213e22[_0x3cff('0x1a')]===_0x3cff('0x1b')&&typeof _0x213e22[_0x3cff('0x1c')]===_0x3cff('0x1b');var _0x3a3270=_0x3d19bd[_0x3cff('0x1d')];var _0xdf8a56=_0x2c7334?0x0:_0x213e22[_0x3cff('0x1a')];var _0x144c03=_0x2c7334?_0x3d19bd[_0x3cff('0x1d')]:_0x213e22['offset']+_0x213e22[_0x3cff('0x1c')];var _0x5ec07d;if(_0x144c03>=_0x3a3270){_0x144c03=_0x3a3270;_0x5ec07d=0xc8;}else{_0x5ec07d=0xce;}_0x834019['status'](_0x5ec07d);return _0x834019['set'](_0x3cff('0x1e'),_0xdf8a56+'-'+_0x144c03+'/'+_0x3a3270)['json'](_0x3d19bd);}return null;};}function patchUpdates(_0x5f3766){return function(_0x1d01b6){try{jsonpatch[_0x3cff('0x1f')](_0x1d01b6,_0x5f3766,!![]);}catch(_0x5bdacb){return BPromise[_0x3cff('0x20')](_0x5bdacb);}return _0x1d01b6[_0x3cff('0x21')]();};}function saveUpdates(_0xf435d6,_0x4f6c3e){return function(_0x4609ee){if(_0x4609ee){return _0x4609ee[_0x3cff('0x22')](_0xf435d6)[_0x3cff('0x23')](function(_0x3c84c5){return _0x3c84c5;});}return null;};}function removeEntity(_0x33bf98,_0x266217){return function(_0x2f672d){if(_0x2f672d){return _0x2f672d['destroy']()[_0x3cff('0x23')](function(){var _0x5370c5=_0x2f672d[_0x3cff('0x24')]({'plain':!![]});var _0x11f3c0=_0x3cff('0x25');return db[_0x3cff('0x26')][_0x3cff('0x27')]({'where':{'type':_0x11f3c0,'resourceId':_0x5370c5['id']}})[_0x3cff('0x23')](function(){return _0x2f672d;});})[_0x3cff('0x23')](function(){_0x33bf98[_0x3cff('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4fbe18,_0x312167){return function(_0x4d5fd2){if(!_0x4d5fd2){_0x4fbe18[_0x3cff('0x16')](0x194);}return _0x4d5fd2;};}function handleError(_0xd42b55,_0x297e5a){_0x297e5a=_0x297e5a||0x1f4;return function(_0x31f497){logger[_0x3cff('0x28')](_0x31f497[_0x3cff('0x29')]);if(_0x31f497[_0x3cff('0x2a')]){delete _0x31f497[_0x3cff('0x2a')];}_0xd42b55[_0x3cff('0x17')](_0x297e5a)[_0x3cff('0x2b')](_0x31f497);};}exports[_0x3cff('0x2c')]=function(_0x481bf3,_0x3b66a3){var _0x2296ed={},_0x251a08={},_0x18d55b={'count':0x0,'rows':[]};var _0x152880=_[_0x3cff('0x2d')](db[_0x3cff('0x2e')][_0x3cff('0x2f')],function(_0x2c6f30){return{'name':_0x2c6f30[_0x3cff('0x30')],'type':_0x2c6f30[_0x3cff('0x31')][_0x3cff('0x32')]};});_0x251a08[_0x3cff('0x33')]=_[_0x3cff('0x2d')](_0x152880,_0x3cff('0x2a'));_0x251a08[_0x3cff('0x34')]=_[_0x3cff('0x35')](_0x481bf3[_0x3cff('0x34')]);_0x251a08[_0x3cff('0x36')]=_['intersection'](_0x251a08[_0x3cff('0x33')],_0x251a08['query']);_0x2296ed[_0x3cff('0x37')]=_[_0x3cff('0x38')](_0x251a08[_0x3cff('0x33')],qs[_0x3cff('0x39')](_0x481bf3[_0x3cff('0x34')][_0x3cff('0x39')]));_0x2296ed[_0x3cff('0x37')]=_0x2296ed[_0x3cff('0x37')][_0x3cff('0x3a')]?_0x2296ed[_0x3cff('0x37')]:_0x251a08['model'];if(!_0x481bf3[_0x3cff('0x34')][_0x3cff('0x3b')](_0x3cff('0x3c'))){_0x2296ed[_0x3cff('0x1c')]=qs[_0x3cff('0x1c')](_0x481bf3[_0x3cff('0x34')][_0x3cff('0x1c')]);_0x2296ed[_0x3cff('0x1a')]=qs[_0x3cff('0x1a')](_0x481bf3[_0x3cff('0x34')][_0x3cff('0x1a')]);}_0x2296ed[_0x3cff('0x3d')]=qs['sort'](_0x481bf3['query'][_0x3cff('0x3e')]);_0x2296ed[_0x3cff('0x3f')]=qs[_0x3cff('0x36')](_[_0x3cff('0x40')](_0x481bf3[_0x3cff('0x34')],_0x251a08[_0x3cff('0x36')]),_0x152880);if(_0x481bf3[_0x3cff('0x34')]['filter']){_0x2296ed[_0x3cff('0x3f')]=_['merge'](_0x2296ed[_0x3cff('0x3f')],{'$or':_[_0x3cff('0x2d')](_0x152880,function(_0x3fcdbc){if(_0x3fcdbc[_0x3cff('0x31')]!==_0x3cff('0x41')){var _0x337a37={};_0x337a37[_0x3fcdbc[_0x3cff('0x2a')]]={'$like':'%'+_0x481bf3[_0x3cff('0x34')][_0x3cff('0x42')]+'%'};return _0x337a37;}})});}_0x2296ed=_[_0x3cff('0x43')]({},_0x2296ed,_0x481bf3[_0x3cff('0x44')]);var _0x5da783={'where':_0x2296ed[_0x3cff('0x3f')]};return db[_0x3cff('0x2e')][_0x3cff('0x1d')](_0x5da783)[_0x3cff('0x23')](function(_0x1e0e60){_0x18d55b[_0x3cff('0x1d')]=_0x1e0e60;if(_0x481bf3[_0x3cff('0x34')]['includeAll']){_0x2296ed[_0x3cff('0x45')]=[{'all':!![]}];}return db[_0x3cff('0x2e')][_0x3cff('0x46')](_0x2296ed);})[_0x3cff('0x23')](function(_0x7885f3){_0x18d55b[_0x3cff('0x47')]=_0x7885f3;return _0x18d55b;})[_0x3cff('0x23')](respondWithFilteredResult(_0x3b66a3,_0x2296ed))[_0x3cff('0x48')](handleError(_0x3b66a3,null));};exports[_0x3cff('0x49')]=function(_0x7576c2,_0x5bc801){var _0x55b726={'raw':!![],'where':{'id':_0x7576c2[_0x3cff('0x4a')]['id']}},_0x4b94b9={};_0x4b94b9['model']=_[_0x3cff('0x35')](db['CmContactHasItem']['rawAttributes']);_0x4b94b9['query']=_[_0x3cff('0x35')](_0x7576c2['query']);_0x4b94b9[_0x3cff('0x36')]=_[_0x3cff('0x38')](_0x4b94b9[_0x3cff('0x33')],_0x4b94b9[_0x3cff('0x34')]);_0x55b726[_0x3cff('0x37')]=_['intersection'](_0x4b94b9[_0x3cff('0x33')],qs[_0x3cff('0x39')](_0x7576c2['query'][_0x3cff('0x39')]));_0x55b726[_0x3cff('0x37')]=_0x55b726[_0x3cff('0x37')][_0x3cff('0x3a')]?_0x55b726[_0x3cff('0x37')]:_0x4b94b9[_0x3cff('0x33')];if(_0x7576c2[_0x3cff('0x34')][_0x3cff('0x4b')]){_0x55b726['include']=[{'all':!![]}];}_0x55b726=_['merge']({},_0x55b726,_0x7576c2[_0x3cff('0x44')]);return db[_0x3cff('0x2e')][_0x3cff('0x4c')](_0x55b726)[_0x3cff('0x23')](handleEntityNotFound(_0x5bc801,null))['then'](respondWithResult(_0x5bc801,null))[_0x3cff('0x48')](handleError(_0x5bc801,null));};exports[_0x3cff('0x4d')]=function(_0x25d537,_0x5b36b7){return db[_0x3cff('0x2e')][_0x3cff('0x4d')](_0x25d537['body'],{})['then'](function(_0x28da2d){var _0x2ad5c1=_0x25d537[_0x3cff('0x4e')][_0x3cff('0x24')]({'plain':!![]});if(!_0x2ad5c1)throw new Error(_0x3cff('0x4f'));if(_0x2ad5c1['role']===_0x3cff('0x4e')){var _0x2206f7=_0x28da2d[_0x3cff('0x24')]({'plain':!![]});var _0x5ed828='CmContactHasItems';return db[_0x3cff('0x50')][_0x3cff('0x4c')]({'where':{'name':_0x5ed828,'userProfileId':_0x2ad5c1[_0x3cff('0x51')]},'raw':!![]})[_0x3cff('0x23')](function(_0x5aad01){if(_0x5aad01&&_0x5aad01[_0x3cff('0x52')]===0x0){return db['UserProfileResource']['create']({'name':_0x2206f7[_0x3cff('0x2a')],'resourceId':_0x2206f7['id'],'type':_0x5aad01[_0x3cff('0x2a')],'sectionId':_0x5aad01['id']},{})['then'](function(){return _0x28da2d;});}else{return _0x28da2d;}})[_0x3cff('0x48')](function(_0x1a8edb){logger[_0x3cff('0x28')](_0x3cff('0x53'),_0x1a8edb);throw _0x1a8edb;});}return _0x28da2d;})[_0x3cff('0x23')](respondWithResult(_0x5b36b7,0xc9))[_0x3cff('0x48')](handleError(_0x5b36b7,null));};exports['update']=function(_0x4b60b0,_0x386dac){if(_0x4b60b0[_0x3cff('0x54')]['id']){delete _0x4b60b0[_0x3cff('0x54')]['id'];}return db[_0x3cff('0x2e')][_0x3cff('0x4c')]({'where':{'id':_0x4b60b0['params']['id']}})[_0x3cff('0x23')](handleEntityNotFound(_0x386dac,null))[_0x3cff('0x23')](saveUpdates(_0x4b60b0['body'],null))[_0x3cff('0x23')](respondWithResult(_0x386dac,null))[_0x3cff('0x48')](handleError(_0x386dac,null));};exports[_0x3cff('0x27')]=function(_0x230ea0,_0x5f128b){return db[_0x3cff('0x2e')]['find']({'where':{'id':_0x230ea0[_0x3cff('0x4a')]['id']}})[_0x3cff('0x23')](handleEntityNotFound(_0x5f128b,null))[_0x3cff('0x23')](removeEntity(_0x5f128b,null))[_0x3cff('0x48')](handleError(_0x5f128b,null));};
\ No newline at end of file
+var _0xe7fe=['Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','fast-json-patch','request-promise','bluebird','util','path','sox','to-csv','ejs','lodash','squel','desk.js','ioredis','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','reject','update','then','destroy','get','CmContactHasItems','UserProfileResource','error','stack','name','index','map','CmContactHasItem','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','catch','show','params','keys','find','create','body','user'];(function(_0x5eacd5,_0x42a288){var _0x9ecc1=function(_0x1e9f45){while(--_0x1e9f45){_0x5eacd5['push'](_0x5eacd5['shift']());}};_0x9ecc1(++_0x42a288);}(_0xe7fe,0x18c));var _0xee7f=function(_0xfb6d9d,_0x1b5d85){_0xfb6d9d=_0xfb6d9d-0x0;var _0x1102f3=_0xe7fe[_0xfb6d9d];return _0x1102f3;};'use strict';var emlformat=require(_0xee7f('0x0'));var rimraf=require(_0xee7f('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xee7f('0x2'));var rp=require(_0xee7f('0x3'));var moment=require('moment');var BPromise=require(_0xee7f('0x4'));var Mustache=require('mustache');var util=require(_0xee7f('0x5'));var path=require(_0xee7f('0x6'));var sox=require(_0xee7f('0x7'));var csv=require(_0xee7f('0x8'));var ejs=require(_0xee7f('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xee7f('0xa'));var squel=require(_0xee7f('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xee7f('0xc'));var toCsv=require(_0xee7f('0x8'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xee7f('0xd'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xee7f('0xe'))('api');var utils=require(_0xee7f('0xf'));var config=require('../../config/environment');var licenseUtil=require(_0xee7f('0x10'));var db=require(_0xee7f('0x11'))['db'];function respondWithStatusCode(_0x1e6dde,_0x675b88){_0x675b88=_0x675b88||0xcc;return function(_0x56da7d){if(_0x56da7d){return _0x1e6dde[_0xee7f('0x12')](_0x675b88);}return _0x1e6dde['status'](_0x675b88)[_0xee7f('0x13')]();};}function respondWithResult(_0x45391f,_0xea90d6){_0xea90d6=_0xea90d6||0xc8;return function(_0x160a88){if(_0x160a88){return _0x45391f[_0xee7f('0x14')](_0xea90d6)[_0xee7f('0x15')](_0x160a88);}};}function respondWithFilteredResult(_0xcefd0e,_0x38f918){return function(_0x2a5971){if(_0x2a5971){var _0x5a9a0e=typeof _0x38f918[_0xee7f('0x16')]===_0xee7f('0x17')&&typeof _0x38f918[_0xee7f('0x18')]==='undefined';var _0x494ada=_0x2a5971[_0xee7f('0x19')];var _0x389443=_0x5a9a0e?0x0:_0x38f918['offset'];var _0x33e183=_0x5a9a0e?_0x2a5971[_0xee7f('0x19')]:_0x38f918['offset']+_0x38f918['limit'];var _0x5e4eee;if(_0x33e183>=_0x494ada){_0x33e183=_0x494ada;_0x5e4eee=0xc8;}else{_0x5e4eee=0xce;}_0xcefd0e[_0xee7f('0x14')](_0x5e4eee);return _0xcefd0e[_0xee7f('0x1a')](_0xee7f('0x1b'),_0x389443+'-'+_0x33e183+'/'+_0x494ada)[_0xee7f('0x15')](_0x2a5971);}return null;};}function patchUpdates(_0x2c5da4){return function(_0x7165dd){try{jsonpatch['apply'](_0x7165dd,_0x2c5da4,!![]);}catch(_0x234fa8){return BPromise[_0xee7f('0x1c')](_0x234fa8);}return _0x7165dd['save']();};}function saveUpdates(_0x1ba53f,_0x1d2fa3){return function(_0x1bfee1){if(_0x1bfee1){return _0x1bfee1[_0xee7f('0x1d')](_0x1ba53f)[_0xee7f('0x1e')](function(_0x19475b){return _0x19475b;});}return null;};}function removeEntity(_0x28d69c,_0x418e09){return function(_0x3fe847){if(_0x3fe847){return _0x3fe847[_0xee7f('0x1f')]()['then'](function(){var _0x161e1a=_0x3fe847[_0xee7f('0x20')]({'plain':!![]});var _0x2a26c2=_0xee7f('0x21');return db[_0xee7f('0x22')][_0xee7f('0x1f')]({'where':{'type':_0x2a26c2,'resourceId':_0x161e1a['id']}})[_0xee7f('0x1e')](function(){return _0x3fe847;});})[_0xee7f('0x1e')](function(){_0x28d69c[_0xee7f('0x14')](0xcc)[_0xee7f('0x13')]();});}};}function handleEntityNotFound(_0x5c7677,_0x1580d5){return function(_0x405d75){if(!_0x405d75){_0x5c7677[_0xee7f('0x12')](0x194);}return _0x405d75;};}function handleError(_0x5d639d,_0x9488a4){_0x9488a4=_0x9488a4||0x1f4;return function(_0x2b356b){logger[_0xee7f('0x23')](_0x2b356b[_0xee7f('0x24')]);if(_0x2b356b[_0xee7f('0x25')]){delete _0x2b356b[_0xee7f('0x25')];}_0x5d639d[_0xee7f('0x14')](_0x9488a4)['send'](_0x2b356b);};}exports[_0xee7f('0x26')]=function(_0x4060c0,_0x32da03){var _0x3274f3={},_0x18ee8c={},_0x14554f={'count':0x0,'rows':[]};var _0x55a62c=_[_0xee7f('0x27')](db[_0xee7f('0x28')][_0xee7f('0x29')],function(_0x5b8409){return{'name':_0x5b8409[_0xee7f('0x2a')],'type':_0x5b8409[_0xee7f('0x2b')][_0xee7f('0x2c')]};});_0x18ee8c[_0xee7f('0x2d')]=_[_0xee7f('0x27')](_0x55a62c,_0xee7f('0x25'));_0x18ee8c[_0xee7f('0x2e')]=_['keys'](_0x4060c0['query']);_0x18ee8c[_0xee7f('0x2f')]=_[_0xee7f('0x30')](_0x18ee8c['model'],_0x18ee8c[_0xee7f('0x2e')]);_0x3274f3[_0xee7f('0x31')]=_[_0xee7f('0x30')](_0x18ee8c['model'],qs[_0xee7f('0x32')](_0x4060c0[_0xee7f('0x2e')]['fields']));_0x3274f3[_0xee7f('0x31')]=_0x3274f3['attributes'][_0xee7f('0x33')]?_0x3274f3[_0xee7f('0x31')]:_0x18ee8c[_0xee7f('0x2d')];if(!_0x4060c0['query'][_0xee7f('0x34')]('nolimit')){_0x3274f3[_0xee7f('0x18')]=qs['limit'](_0x4060c0['query'][_0xee7f('0x18')]);_0x3274f3[_0xee7f('0x16')]=qs[_0xee7f('0x16')](_0x4060c0[_0xee7f('0x2e')][_0xee7f('0x16')]);}_0x3274f3[_0xee7f('0x35')]=qs['sort'](_0x4060c0['query'][_0xee7f('0x36')]);_0x3274f3[_0xee7f('0x37')]=qs['filters'](_[_0xee7f('0x38')](_0x4060c0[_0xee7f('0x2e')],_0x18ee8c['filters']),_0x55a62c);if(_0x4060c0[_0xee7f('0x2e')][_0xee7f('0x39')]){_0x3274f3[_0xee7f('0x37')]=_[_0xee7f('0x3a')](_0x3274f3[_0xee7f('0x37')],{'$or':_['map'](_0x55a62c,function(_0x546ba6){if(_0x546ba6['type']!==_0xee7f('0x3b')){var _0x3118c9={};_0x3118c9[_0x546ba6['name']]={'$like':'%'+_0x4060c0[_0xee7f('0x2e')][_0xee7f('0x39')]+'%'};return _0x3118c9;}})});}_0x3274f3=_[_0xee7f('0x3a')]({},_0x3274f3,_0x4060c0[_0xee7f('0x3c')]);var _0x3c2e92={'where':_0x3274f3[_0xee7f('0x37')]};return db['CmContactHasItem'][_0xee7f('0x19')](_0x3c2e92)[_0xee7f('0x1e')](function(_0xc43597){_0x14554f[_0xee7f('0x19')]=_0xc43597;if(_0x4060c0[_0xee7f('0x2e')][_0xee7f('0x3d')]){_0x3274f3[_0xee7f('0x3e')]=[{'all':!![]}];}return db[_0xee7f('0x28')][_0xee7f('0x3f')](_0x3274f3);})['then'](function(_0x3e57ca){_0x14554f['rows']=_0x3e57ca;return _0x14554f;})['then'](respondWithFilteredResult(_0x32da03,_0x3274f3))[_0xee7f('0x40')](handleError(_0x32da03,null));};exports[_0xee7f('0x41')]=function(_0x1fc3a1,_0xfca451){var _0x1f4640={'raw':!![],'where':{'id':_0x1fc3a1[_0xee7f('0x42')]['id']}},_0x3c3075={};_0x3c3075[_0xee7f('0x2d')]=_[_0xee7f('0x43')](db[_0xee7f('0x28')][_0xee7f('0x29')]);_0x3c3075[_0xee7f('0x2e')]=_[_0xee7f('0x43')](_0x1fc3a1[_0xee7f('0x2e')]);_0x3c3075[_0xee7f('0x2f')]=_['intersection'](_0x3c3075[_0xee7f('0x2d')],_0x3c3075[_0xee7f('0x2e')]);_0x1f4640['attributes']=_['intersection'](_0x3c3075['model'],qs[_0xee7f('0x32')](_0x1fc3a1['query'][_0xee7f('0x32')]));_0x1f4640[_0xee7f('0x31')]=_0x1f4640[_0xee7f('0x31')]['length']?_0x1f4640[_0xee7f('0x31')]:_0x3c3075[_0xee7f('0x2d')];if(_0x1fc3a1[_0xee7f('0x2e')][_0xee7f('0x3d')]){_0x1f4640[_0xee7f('0x3e')]=[{'all':!![]}];}_0x1f4640=_['merge']({},_0x1f4640,_0x1fc3a1['options']);return db[_0xee7f('0x28')][_0xee7f('0x44')](_0x1f4640)[_0xee7f('0x1e')](handleEntityNotFound(_0xfca451,null))[_0xee7f('0x1e')](respondWithResult(_0xfca451,null))['catch'](handleError(_0xfca451,null));};exports['create']=function(_0xf7353,_0x201950){return db[_0xee7f('0x28')][_0xee7f('0x45')](_0xf7353[_0xee7f('0x46')],{})[_0xee7f('0x1e')](function(_0x3ffe93){var _0x31b1d9=_0xf7353[_0xee7f('0x47')]['get']({'plain':!![]});if(!_0x31b1d9)throw new Error(_0xee7f('0x48'));if(_0x31b1d9[_0xee7f('0x49')]==='user'){var _0x600bb3=_0x3ffe93[_0xee7f('0x20')]({'plain':!![]});var _0x2a0c81='CmContactHasItems';return db[_0xee7f('0x4a')]['find']({'where':{'name':_0x2a0c81,'userProfileId':_0x31b1d9[_0xee7f('0x4b')]},'raw':!![]})['then'](function(_0x6cc605){if(_0x6cc605&&_0x6cc605[_0xee7f('0x4c')]===0x0){return db[_0xee7f('0x22')][_0xee7f('0x45')]({'name':_0x600bb3['name'],'resourceId':_0x600bb3['id'],'type':_0x6cc605[_0xee7f('0x25')],'sectionId':_0x6cc605['id']},{})[_0xee7f('0x1e')](function(){return _0x3ffe93;});}else{return _0x3ffe93;}})['catch'](function(_0xd05b0b){logger['error'](_0xee7f('0x4d'),_0xd05b0b);throw _0xd05b0b;});}return _0x3ffe93;})[_0xee7f('0x1e')](respondWithResult(_0x201950,0xc9))['catch'](handleError(_0x201950,null));};exports['update']=function(_0x2a3f3f,_0x22effc){if(_0x2a3f3f[_0xee7f('0x46')]['id']){delete _0x2a3f3f[_0xee7f('0x46')]['id'];}return db[_0xee7f('0x28')][_0xee7f('0x44')]({'where':{'id':_0x2a3f3f['params']['id']}})[_0xee7f('0x1e')](handleEntityNotFound(_0x22effc,null))[_0xee7f('0x1e')](saveUpdates(_0x2a3f3f[_0xee7f('0x46')],null))[_0xee7f('0x1e')](respondWithResult(_0x22effc,null))[_0xee7f('0x40')](handleError(_0x22effc,null));};exports[_0xee7f('0x1f')]=function(_0x2c6c54,_0x36ce8f){return db[_0xee7f('0x28')][_0xee7f('0x44')]({'where':{'id':_0x2c6c54[_0xee7f('0x42')]['id']}})['then'](handleEntityNotFound(_0x36ce8f,null))[_0xee7f('0x1e')](removeEntity(_0x36ce8f,null))[_0xee7f('0x40')](handleError(_0x36ce8f,null));};
\ No newline at end of file
index 98a36a5..60fd43b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf6f3=['rimraf','../../config/environment','./cmContactHasItem.attributes','cm_contact_has_items','util','../../config/logger','bluebird','request-promise','path'];(function(_0x1cc8fe,_0x105328){var _0x230054=function(_0x1a1b56){while(--_0x1a1b56){_0x1cc8fe['push'](_0x1cc8fe['shift']());}};_0x230054(++_0x105328);}(_0xf6f3,0xee));var _0x3f6f=function(_0x322548,_0x3e7823){_0x322548=_0x322548-0x0;var _0x5b1df6=_0xf6f3[_0x322548];return _0x5b1df6;};'use strict';var _=require('lodash');var util=require(_0x3f6f('0x0'));var logger=require(_0x3f6f('0x1'))('api');var moment=require('moment');var BPromise=require(_0x3f6f('0x2'));var rp=require(_0x3f6f('0x3'));var fs=require('fs');var path=require(_0x3f6f('0x4'));var rimraf=require(_0x3f6f('0x5'));var config=require(_0x3f6f('0x6'));var attributes=require(_0x3f6f('0x7'));module['exports']=function(_0x3446e6,_0x58046e){return _0x3446e6['define']('CmContactHasItem',attributes,{'tableName':_0x3f6f('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x605f=['moment','bluebird','request-promise','path','../../config/environment','./cmContactHasItem.attributes','exports','CmContactHasItem','cm_contact_has_items','util','../../config/logger','api'];(function(_0x21c7ef,_0x255e1d){var _0x567df9=function(_0x17d772){while(--_0x17d772){_0x21c7ef['push'](_0x21c7ef['shift']());}};_0x567df9(++_0x255e1d);}(_0x605f,0xbd));var _0xf605=function(_0xc42052,_0x22e266){_0xc42052=_0xc42052-0x0;var _0x5e1222=_0x605f[_0xc42052];return _0x5e1222;};'use strict';var _=require('lodash');var util=require(_0xf605('0x0'));var logger=require(_0xf605('0x1'))(_0xf605('0x2'));var moment=require(_0xf605('0x3'));var BPromise=require(_0xf605('0x4'));var rp=require(_0xf605('0x5'));var fs=require('fs');var path=require(_0xf605('0x6'));var rimraf=require('rimraf');var config=require(_0xf605('0x7'));var attributes=require(_0xf605('0x8'));module[_0xf605('0x9')]=function(_0x147bf7,_0x3d5d31){return _0x147bf7['define'](_0xf605('0xa'),attributes,{'tableName':_0xf605('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index a1ddc2a..37cd4c3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2769=['lodash','randomstring','../../config/logger','rpc','jayson/promise','client','http','request','then','CmContactHasItem,\x20%s,\x20%s','debug','CmContactHasItem,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch'];(function(_0x506d2f,_0x5ab76e){var _0x101255=function(_0x1596b1){while(--_0x1596b1){_0x506d2f['push'](_0x506d2f['shift']());}};_0x101255(++_0x5ab76e);}(_0x2769,0x1d4));var _0x9276=function(_0x3ecd69,_0x38156d){_0x3ecd69=_0x3ecd69-0x0;var _0x211b0e=_0x2769[_0x3ecd69];return _0x211b0e;};'use strict';var _=require(_0x9276('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x9276('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x9276('0x2'))(_0x9276('0x3'));var config=require('../../config/environment');var jayson=require(_0x9276('0x4'));var client=jayson[_0x9276('0x5')][_0x9276('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x3fd939,_0x197f41,_0x46f465){return new BPromise(function(_0x200131,_0x45396a){return client[_0x9276('0x7')](_0x3fd939,_0x46f465)[_0x9276('0x8')](function(_0x276cf8){logger['info'](_0x9276('0x9'),_0x197f41,'request\x20sent');logger[_0x9276('0xa')](_0x9276('0xb'),_0x197f41,_0x9276('0xc'),JSON[_0x9276('0xd')](_0x276cf8));if(_0x276cf8[_0x9276('0xe')]){if(_0x276cf8['error']['code']===0x1f4){logger['error'](_0x9276('0x9'),_0x197f41,_0x276cf8[_0x9276('0xe')][_0x9276('0xf')]);return _0x45396a(_0x276cf8['error']['message']);}logger[_0x9276('0xe')](_0x9276('0x9'),_0x197f41,_0x276cf8[_0x9276('0xe')][_0x9276('0xf')]);return _0x200131(_0x276cf8[_0x9276('0xe')][_0x9276('0xf')]);}else{logger['info']('CmContactHasItem,\x20%s,\x20%s',_0x197f41,_0x9276('0xc'));_0x200131(_0x276cf8[_0x9276('0x10')]['message']);}})[_0x9276('0x11')](function(_0xd6679e){logger[_0x9276('0xe')](_0x9276('0x9'),_0x197f41,_0xd6679e);_0x45396a(_0xd6679e);});});}
\ No newline at end of file
+var _0x2a5c=['then','CmContactHasItem,\x20%s,\x20%s','request\x20sent','debug','CmContactHasItem,\x20%s,\x20%s,\x20%s','error','code','message','info','result','lodash','util','randomstring','ioredis','../../mysqldb','../../config/logger','client','http','request'];(function(_0x29d94e,_0xf386d6){var _0x106237=function(_0x327501){while(--_0x327501){_0x29d94e['push'](_0x29d94e['shift']());}};_0x106237(++_0xf386d6);}(_0x2a5c,0x1bf));var _0xc2a5=function(_0x115527,_0x23b693){_0x115527=_0x115527-0x0;var _0x49bd2a=_0x2a5c[_0x115527];return _0x49bd2a;};'use strict';var _=require(_0xc2a5('0x0'));var util=require(_0xc2a5('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xc2a5('0x2'));var fs=require('fs');var Redis=require(_0xc2a5('0x3'));var db=require(_0xc2a5('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xc2a5('0x5'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xc2a5('0x6')][_0xc2a5('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x218a6f,_0x4b1c82,_0x59f44e){return new BPromise(function(_0x1da263,_0xf78d55){return client[_0xc2a5('0x8')](_0x218a6f,_0x59f44e)[_0xc2a5('0x9')](function(_0x35e1ee){logger['info'](_0xc2a5('0xa'),_0x4b1c82,_0xc2a5('0xb'));logger[_0xc2a5('0xc')](_0xc2a5('0xd'),_0x4b1c82,'request\x20sent',JSON['stringify'](_0x35e1ee));if(_0x35e1ee['error']){if(_0x35e1ee[_0xc2a5('0xe')][_0xc2a5('0xf')]===0x1f4){logger[_0xc2a5('0xe')]('CmContactHasItem,\x20%s,\x20%s',_0x4b1c82,_0x35e1ee[_0xc2a5('0xe')]['message']);return _0xf78d55(_0x35e1ee[_0xc2a5('0xe')]['message']);}logger[_0xc2a5('0xe')](_0xc2a5('0xa'),_0x4b1c82,_0x35e1ee[_0xc2a5('0xe')][_0xc2a5('0x10')]);return _0x1da263(_0x35e1ee[_0xc2a5('0xe')][_0xc2a5('0x10')]);}else{logger[_0xc2a5('0x11')](_0xc2a5('0xa'),_0x4b1c82,'request\x20sent');_0x1da263(_0x35e1ee[_0xc2a5('0x12')]['message']);}})['catch'](function(_0x416a84){logger[_0xc2a5('0xe')](_0xc2a5('0xa'),_0x4b1c82,_0x416a84);_0xf78d55(_0x416a84);});});}
\ No newline at end of file
index f3f87ed..8557fe7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x17fd=['delete','multer','util','path','connect-timeout','express','../../components/interaction/service','../../config/environment','./cmContactHasItem.controller','isAuthenticated','index','get','/:id','post','create','put','update'];(function(_0x1e8233,_0x3555a6){var _0x841eb4=function(_0x556b40){while(--_0x556b40){_0x1e8233['push'](_0x1e8233['shift']());}};_0x841eb4(++_0x3555a6);}(_0x17fd,0x78));var _0xd17f=function(_0x52daca,_0x34cf60){_0x52daca=_0x52daca-0x0;var _0xdea1df=_0x17fd[_0x52daca];return _0xdea1df;};'use strict';var multer=require(_0xd17f('0x0'));var util=require(_0xd17f('0x1'));var path=require(_0xd17f('0x2'));var timeout=require(_0xd17f('0x3'));var express=require(_0xd17f('0x4'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xd17f('0x5'));var config=require(_0xd17f('0x6'));var controller=require(_0xd17f('0x7'));router['get']('/',auth[_0xd17f('0x8')](),controller[_0xd17f('0x9')]);router[_0xd17f('0xa')](_0xd17f('0xb'),auth[_0xd17f('0x8')](),controller['show']);router[_0xd17f('0xc')]('/',auth[_0xd17f('0x8')](),controller[_0xd17f('0xd')]);router[_0xd17f('0xe')](_0xd17f('0xb'),auth[_0xd17f('0x8')](),controller[_0xd17f('0xf')]);router[_0xd17f('0x10')](_0xd17f('0xb'),auth[_0xd17f('0x8')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0xd2fa=['show','put','update','delete','destroy','exports','multer','util','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmContactHasItem.controller','get','index','/:id','isAuthenticated'];(function(_0x367d25,_0x11e20c){var _0x486919=function(_0x48b25c){while(--_0x48b25c){_0x367d25['push'](_0x367d25['shift']());}};_0x486919(++_0x11e20c);}(_0xd2fa,0x16e));var _0xad2f=function(_0x393a95,_0x5d8e38){_0x393a95=_0x393a95-0x0;var _0x4e3f31=_0xd2fa[_0x393a95];return _0x4e3f31;};'use strict';var multer=require(_0xad2f('0x0'));var util=require(_0xad2f('0x1'));var path=require('path');var timeout=require(_0xad2f('0x2'));var express=require('express');var router=express[_0xad2f('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xad2f('0x4'));var interaction=require(_0xad2f('0x5'));var config=require(_0xad2f('0x6'));var controller=require(_0xad2f('0x7'));router[_0xad2f('0x8')]('/',auth['isAuthenticated'](),controller[_0xad2f('0x9')]);router[_0xad2f('0x8')](_0xad2f('0xa'),auth[_0xad2f('0xb')](),controller[_0xad2f('0xc')]);router['post']('/',auth[_0xad2f('0xb')](),controller['create']);router[_0xad2f('0xd')](_0xad2f('0xa'),auth[_0xad2f('0xb')](),controller[_0xad2f('0xe')]);router[_0xad2f('0xf')](_0xad2f('0xa'),auth[_0xad2f('0xb')](),controller[_0xad2f('0x10')]);module[_0xad2f('0x11')]=router;
\ No newline at end of file
index 0711081..1dddec3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5352=['STRING','setDataValue','getDataValue','TEXT','long','type','select','parse','values','isArray','stringify','BOOLEAN','ENUM','exports','VIRTUAL','alias'];(function(_0x523fc3,_0x4c9a19){var _0x59b2fe=function(_0x2efb72){while(--_0x2efb72){_0x523fc3['push'](_0x523fc3['shift']());}};_0x59b2fe(++_0x4c9a19);}(_0x5352,0x11d));var _0x2535=function(_0x10ac1c,_0x1e6143){_0x10ac1c=_0x10ac1c-0x0;var _0x8ecd64=_0x5352[_0x10ac1c];return _0x8ecd64;};'use strict';var Sequelize=require('sequelize');var _=require('lodash');module[_0x2535('0x0')]={'name':{'type':Sequelize[_0x2535('0x1')],'get':function(_0x5f3e77){return this['getDataValue'](_0x2535('0x2'));}},'alias':{'type':Sequelize[_0x2535('0x3')],'allowNull':![],'set':function(_0x263dff){this[_0x2535('0x4')](_0x2535('0x2'),_0x263dff?_0x263dff:this[_0x2535('0x5')]('name'));}},'type':{'type':Sequelize[_0x2535('0x3')],'allowNull':![]},'values':{'type':Sequelize[_0x2535('0x6')](_0x2535('0x7')),'get':function(){if(this['getDataValue'](_0x2535('0x8'))===_0x2535('0x9')){return JSON[_0x2535('0xa')](this[_0x2535('0x5')](_0x2535('0xb')));}else{return this['getDataValue'](_0x2535('0xb'));}},'set':function(_0x15f8ac){if(Array[_0x2535('0xc')](_0x15f8ac)){this[_0x2535('0x4')](_0x2535('0xb'),JSON[_0x2535('0xd')](_0x15f8ac));}else{this['setDataValue'](_0x2535('0xb'),_0x15f8ac);}}},'required':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'clickToAction':{'type':Sequelize[_0x2535('0xe')],'defaultValue':![]},'actionType':{'type':Sequelize[_0x2535('0xf')]('voice')}};
\ No newline at end of file
+var _0x65c8=['getDataValue','alias','setDataValue','name','STRING','long','type','select','parse','values','isArray','stringify','BOOLEAN','ENUM','lodash','exports','VIRTUAL'];(function(_0x4ea69d,_0x290f53){var _0x5318e0=function(_0x18e081){while(--_0x18e081){_0x4ea69d['push'](_0x4ea69d['shift']());}};_0x5318e0(++_0x290f53);}(_0x65c8,0x11e));var _0x865c=function(_0x50191c,_0x44cf4e){_0x50191c=_0x50191c-0x0;var _0x56ff89=_0x65c8[_0x50191c];return _0x56ff89;};'use strict';var Sequelize=require('sequelize');var _=require(_0x865c('0x0'));module[_0x865c('0x1')]={'name':{'type':Sequelize[_0x865c('0x2')],'get':function(_0x306307){return this[_0x865c('0x3')](_0x865c('0x4'));}},'alias':{'type':Sequelize['STRING'],'allowNull':![],'set':function(_0xbc64bc){this[_0x865c('0x5')](_0x865c('0x4'),_0xbc64bc?_0xbc64bc:this[_0x865c('0x3')](_0x865c('0x6')));}},'type':{'type':Sequelize[_0x865c('0x7')],'allowNull':![]},'values':{'type':Sequelize['TEXT'](_0x865c('0x8')),'get':function(){if(this[_0x865c('0x3')](_0x865c('0x9'))===_0x865c('0xa')){return JSON[_0x865c('0xb')](this[_0x865c('0x3')](_0x865c('0xc')));}else{return this[_0x865c('0x3')](_0x865c('0xc'));}},'set':function(_0x570317){if(Array[_0x865c('0xd')](_0x570317)){this[_0x865c('0x5')](_0x865c('0xc'),JSON[_0x865c('0xe')](_0x570317));}else{this['setDataValue'](_0x865c('0xc'),_0x570317);}}},'required':{'type':Sequelize[_0x865c('0xf')],'defaultValue':![]},'clickToAction':{'type':Sequelize[_0x865c('0xf')],'defaultValue':![]},'actionType':{'type':Sequelize[_0x865c('0x10')]('voice')}};
\ No newline at end of file
index 6f467e0..d54e595 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe0ef=['key','model','differenceBy','filters','intersection','query','attributes','fields','length','hasOwnProperty','order','sort','where','filter','merge','map','type','options','CmCustomField','includeAll','include','findAll','catch','show','params','keys','update','body','find','destroy','create','sequelize','transaction','TEXT','text','Sequelize','number','INTEGER','switch','BOOLEAN','addColumn','cm_contacts','cf_%d','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','util','path','sox','ejs','fs-extra','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','status','end','json','undefined','limit','count','offset','Content-Range','save','then','sendStatus','error','stack','name','index','rawAttributes','fieldName'];(function(_0x2203ac,_0x5ef46f){var _0xd0c2d9=function(_0x4b2ceb){while(--_0x4b2ceb){_0x2203ac['push'](_0x2203ac['shift']());}};_0xd0c2d9(++_0x5ef46f);}(_0xe0ef,0x183));var _0xfe0e=function(_0x46698a,_0x8de1e4){_0x46698a=_0x46698a-0x0;var _0x356db0=_0xe0ef[_0x46698a];return _0x356db0;};'use strict';var emlformat=require(_0xfe0e('0x0'));var rimraf=require(_0xfe0e('0x1'));var zipdir=require(_0xfe0e('0x2'));var jsonpatch=require(_0xfe0e('0x3'));var rp=require('request-promise');var moment=require(_0xfe0e('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xfe0e('0x5'));var util=require(_0xfe0e('0x6'));var path=require(_0xfe0e('0x7'));var sox=require(_0xfe0e('0x8'));var csv=require('to-csv');var ejs=require(_0xfe0e('0x9'));var fs=require('fs');var fs_extra=require(_0xfe0e('0xa'));var _=require('lodash');var squel=require(_0xfe0e('0xb'));var crypto=require(_0xfe0e('0xc'));var jsforce=require(_0xfe0e('0xd'));var deskjs=require(_0xfe0e('0xe'));var toCsv=require('to-csv');var querystring=require(_0xfe0e('0xf'));var Papa=require(_0xfe0e('0x10'));var Redis=require(_0xfe0e('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xfe0e('0x12'));var as=require(_0xfe0e('0x13'));var hardwareService=require(_0xfe0e('0x14'));var logger=require(_0xfe0e('0x15'))('api');var utils=require(_0xfe0e('0x16'));var config=require(_0xfe0e('0x17'));var licenseUtil=require(_0xfe0e('0x18'));var db=require(_0xfe0e('0x19'))['db'];function respondWithStatusCode(_0x425359,_0x2ffee8){_0x2ffee8=_0x2ffee8||0xcc;return function(_0x9b4aff){if(_0x9b4aff){return _0x425359['sendStatus'](_0x2ffee8);}return _0x425359[_0xfe0e('0x1a')](_0x2ffee8)[_0xfe0e('0x1b')]();};}function respondWithResult(_0x58c229,_0x1ef01c){_0x1ef01c=_0x1ef01c||0xc8;return function(_0x45f34d){if(_0x45f34d){return _0x58c229[_0xfe0e('0x1a')](_0x1ef01c)[_0xfe0e('0x1c')](_0x45f34d);}};}function respondWithFilteredResult(_0x566895,_0x1d9735){return function(_0x2195f0){if(_0x2195f0){var _0x25e250=typeof _0x1d9735['offset']===_0xfe0e('0x1d')&&typeof _0x1d9735[_0xfe0e('0x1e')]==='undefined';var _0x2ecf9b=_0x2195f0[_0xfe0e('0x1f')];var _0x1379b6=_0x25e250?0x0:_0x1d9735['offset'];var _0x578c13=_0x25e250?_0x2195f0[_0xfe0e('0x1f')]:_0x1d9735[_0xfe0e('0x20')]+_0x1d9735[_0xfe0e('0x1e')];var _0x248266;if(_0x578c13>=_0x2ecf9b){_0x578c13=_0x2ecf9b;_0x248266=0xc8;}else{_0x248266=0xce;}_0x566895['status'](_0x248266);return _0x566895['set'](_0xfe0e('0x21'),_0x1379b6+'-'+_0x578c13+'/'+_0x2ecf9b)[_0xfe0e('0x1c')](_0x2195f0);}return null;};}function patchUpdates(_0x40ed11){return function(_0x33308d){try{jsonpatch['apply'](_0x33308d,_0x40ed11,!![]);}catch(_0x425972){return BPromise['reject'](_0x425972);}return _0x33308d[_0xfe0e('0x22')]();};}function saveUpdates(_0x218131,_0x38dd6f){return function(_0x5c0648){if(_0x5c0648){return _0x5c0648['update'](_0x218131)[_0xfe0e('0x23')](function(_0x479bef){return _0x479bef;});}return null;};}function removeEntity(_0x24588a,_0x4fbf28){return function(_0x1a3714){if(_0x1a3714){return _0x1a3714['destroy']()[_0xfe0e('0x23')](function(){_0x24588a[_0xfe0e('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x312ee1,_0x1604e0){return function(_0x46215a){if(!_0x46215a){_0x312ee1[_0xfe0e('0x24')](0x194);}return _0x46215a;};}function handleError(_0x11f4dc,_0x298672){_0x298672=_0x298672||0x1f4;return function(_0x1ba62c){logger[_0xfe0e('0x25')](_0x1ba62c[_0xfe0e('0x26')]);if(_0x1ba62c[_0xfe0e('0x27')]){delete _0x1ba62c[_0xfe0e('0x27')];}_0x11f4dc[_0xfe0e('0x1a')](_0x298672)['send'](_0x1ba62c);};}exports[_0xfe0e('0x28')]=function(_0x2ebf2f,_0x45e5e2){var _0x305561={},_0x2f1e0b={},_0x358569={'count':0x0,'rows':[]};var _0x450af6=_['map'](db['CmCustomField'][_0xfe0e('0x29')],function(_0x4a3dcc){return{'name':_0x4a3dcc[_0xfe0e('0x2a')],'type':_0x4a3dcc['type'][_0xfe0e('0x2b')]};});_0x2f1e0b[_0xfe0e('0x2c')]=_[_0xfe0e('0x2d')](_['map'](_0x450af6,_0xfe0e('0x27')),['name']);_0x2f1e0b['query']=_['keys'](_0x2ebf2f['query']);_0x2f1e0b[_0xfe0e('0x2e')]=_[_0xfe0e('0x2f')](_0x2f1e0b['model'],_0x2f1e0b[_0xfe0e('0x30')]);_0x305561[_0xfe0e('0x31')]=_[_0xfe0e('0x2f')](_0x2f1e0b[_0xfe0e('0x2c')],qs['fields'](_0x2ebf2f[_0xfe0e('0x30')][_0xfe0e('0x32')]));_0x305561[_0xfe0e('0x31')]=_0x305561['attributes'][_0xfe0e('0x33')]?_0x305561['attributes']:_0x2f1e0b[_0xfe0e('0x2c')];if(!_0x2ebf2f[_0xfe0e('0x30')][_0xfe0e('0x34')]('nolimit')){_0x305561[_0xfe0e('0x1e')]=qs[_0xfe0e('0x1e')](_0x2ebf2f[_0xfe0e('0x30')][_0xfe0e('0x1e')]);_0x305561[_0xfe0e('0x20')]=qs['offset'](_0x2ebf2f[_0xfe0e('0x30')][_0xfe0e('0x20')]);}_0x305561[_0xfe0e('0x35')]=qs[_0xfe0e('0x36')](_0x2ebf2f[_0xfe0e('0x30')]['sort']);_0x305561[_0xfe0e('0x37')]=qs['filters'](_['pick'](_0x2ebf2f[_0xfe0e('0x30')],_0x2f1e0b[_0xfe0e('0x2e')]),_0x450af6);if(_0x2ebf2f['query'][_0xfe0e('0x38')]){_0x305561[_0xfe0e('0x37')]=_[_0xfe0e('0x39')](_0x305561[_0xfe0e('0x37')],{'$or':_[_0xfe0e('0x3a')](_0x450af6,function(_0x191017){if(_0x191017[_0xfe0e('0x3b')]!=='VIRTUAL'){var _0x505a96={};_0x505a96[_0x191017[_0xfe0e('0x27')]]={'$like':'%'+_0x2ebf2f[_0xfe0e('0x30')][_0xfe0e('0x38')]+'%'};return _0x505a96;}})});}_0x305561=_[_0xfe0e('0x39')]({},_0x305561,_0x2ebf2f[_0xfe0e('0x3c')]);var _0xa009bb={'where':_0x305561[_0xfe0e('0x37')]};return db[_0xfe0e('0x3d')][_0xfe0e('0x1f')](_0xa009bb)[_0xfe0e('0x23')](function(_0x2eee82){_0x358569[_0xfe0e('0x1f')]=_0x2eee82;if(_0x2ebf2f[_0xfe0e('0x30')][_0xfe0e('0x3e')]){_0x305561[_0xfe0e('0x3f')]=[{'all':!![]}];}return db[_0xfe0e('0x3d')][_0xfe0e('0x40')](_0x305561);})[_0xfe0e('0x23')](function(_0x554abb){_0x358569['rows']=_0x554abb;return _0x358569;})[_0xfe0e('0x23')](respondWithFilteredResult(_0x45e5e2,_0x305561))[_0xfe0e('0x41')](handleError(_0x45e5e2,null));};exports[_0xfe0e('0x42')]=function(_0x10061a,_0x35d32a){var _0x3069a7={'raw':!![],'where':{'id':_0x10061a[_0xfe0e('0x43')]['id']}},_0x288ea0={};_0x288ea0['model']=_[_0xfe0e('0x44')](db[_0xfe0e('0x3d')][_0xfe0e('0x29')]);_0x288ea0[_0xfe0e('0x30')]=_[_0xfe0e('0x44')](_0x10061a['query']);_0x288ea0[_0xfe0e('0x2e')]=_[_0xfe0e('0x2f')](_0x288ea0['model'],_0x288ea0[_0xfe0e('0x30')]);_0x3069a7[_0xfe0e('0x31')]=_['intersection'](_0x288ea0[_0xfe0e('0x2c')],qs[_0xfe0e('0x32')](_0x10061a[_0xfe0e('0x30')]['fields']));_0x3069a7[_0xfe0e('0x31')]=_0x3069a7[_0xfe0e('0x31')][_0xfe0e('0x33')]?_0x3069a7[_0xfe0e('0x31')]:_0x288ea0[_0xfe0e('0x2c')];if(_0x10061a[_0xfe0e('0x30')][_0xfe0e('0x3e')]){_0x3069a7[_0xfe0e('0x3f')]=[{'all':!![]}];}_0x3069a7=_[_0xfe0e('0x39')]({},_0x3069a7,_0x10061a[_0xfe0e('0x3c')]);return db[_0xfe0e('0x3d')]['find'](_0x3069a7)[_0xfe0e('0x23')](handleEntityNotFound(_0x35d32a,null))[_0xfe0e('0x23')](respondWithResult(_0x35d32a,null))[_0xfe0e('0x41')](handleError(_0x35d32a,null));};exports[_0xfe0e('0x45')]=function(_0x48d186,_0x484d35){if(_0x48d186[_0xfe0e('0x46')]['id']){delete _0x48d186['body']['id'];}return db[_0xfe0e('0x3d')][_0xfe0e('0x47')]({'where':{'id':_0x48d186[_0xfe0e('0x43')]['id']}})[_0xfe0e('0x23')](handleEntityNotFound(_0x484d35,null))[_0xfe0e('0x23')](saveUpdates(_0x48d186[_0xfe0e('0x46')],null))['then'](respondWithResult(_0x484d35,null))[_0xfe0e('0x41')](handleError(_0x484d35,null));};exports[_0xfe0e('0x48')]=function(_0x565e61,_0x3f7266){return db[_0xfe0e('0x3d')]['find']({'where':{'id':_0x565e61[_0xfe0e('0x43')]['id']}})['then'](handleEntityNotFound(_0x3f7266,null))[_0xfe0e('0x23')](removeEntity(_0x3f7266,null))[_0xfe0e('0x41')](handleError(_0x3f7266,null));};exports[_0xfe0e('0x49')]=function(_0x8d5d52,_0x5b13d4){var _0x20e549;return db[_0xfe0e('0x4a')][_0xfe0e('0x4b')](function(_0xaacab7){return db[_0xfe0e('0x3d')]['create'](_0x8d5d52[_0xfe0e('0x46')],{'transaction':_0xaacab7})['then'](function(_0x940d26){_0x20e549=_0x940d26;var _0x3977ce={'type':db['Sequelize'][_0xfe0e('0x4c')],'transaction':_0xaacab7};switch(_0x8d5d52[_0xfe0e('0x46')][_0xfe0e('0x3b')]){case _0xfe0e('0x4d'):_0x3977ce[_0xfe0e('0x3b')]=db[_0xfe0e('0x4e')][_0xfe0e('0x4c')];break;case _0xfe0e('0x4f'):_0x3977ce['type']=db[_0xfe0e('0x4e')][_0xfe0e('0x50')];break;case _0xfe0e('0x51'):_0x3977ce[_0xfe0e('0x3b')]=db[_0xfe0e('0x4e')][_0xfe0e('0x52')];_0x3977ce['defaultValue']=![];break;default:}return db[_0xfe0e('0x4a')]['queryInterface'][_0xfe0e('0x53')](_0xfe0e('0x54'),util['format'](_0xfe0e('0x55'),_0x20e549['id']),_0x3977ce);})['then'](function(){return _0x20e549;});})[_0xfe0e('0x23')](respondWithResult(_0x5b13d4,0xc9))[_0xfe0e('0x41')](handleError(_0x5b13d4,null));};
\ No newline at end of file
+var _0xe348=['find','body','create','transaction','Sequelize','TEXT','text','switch','BOOLEAN','defaultValue','sequelize','queryInterface','eml-format','fast-json-patch','bluebird','util','path','sox','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','sendStatus','end','json','offset','limit','count','set','Content-Range','apply','save','update','destroy','then','error','stack','status','send','index','CmCustomField','rawAttributes','type','key','differenceBy','name','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params'];(function(_0x28e90e,_0x55f557){var _0x3f7199=function(_0x28f963){while(--_0x28f963){_0x28e90e['push'](_0x28e90e['shift']());}};_0x3f7199(++_0x55f557);}(_0xe348,0x10b));var _0x8e34=function(_0xd0b415,_0x149675){_0xd0b415=_0xd0b415-0x0;var _0x2bdf2c=_0xe348[_0xd0b415];return _0x2bdf2c;};'use strict';var emlformat=require(_0x8e34('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x8e34('0x1'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x8e34('0x2'));var Mustache=require('mustache');var util=require(_0x8e34('0x3'));var path=require(_0x8e34('0x4'));var sox=require(_0x8e34('0x5'));var csv=require('to-csv');var ejs=require(_0x8e34('0x6'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x8e34('0x7'));var squel=require(_0x8e34('0x8'));var crypto=require(_0x8e34('0x9'));var jsforce=require(_0x8e34('0xa'));var deskjs=require(_0x8e34('0xb'));var toCsv=require(_0x8e34('0xc'));var querystring=require(_0x8e34('0xd'));var Papa=require(_0x8e34('0xe'));var Redis=require(_0x8e34('0xf'));var authService=require(_0x8e34('0x10'));var qs=require(_0x8e34('0x11'));var as=require(_0x8e34('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x8e34('0x13'))('api');var utils=require(_0x8e34('0x14'));var config=require(_0x8e34('0x15'));var licenseUtil=require(_0x8e34('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4f5c45,_0x26a7f6){_0x26a7f6=_0x26a7f6||0xcc;return function(_0x1bef19){if(_0x1bef19){return _0x4f5c45[_0x8e34('0x17')](_0x26a7f6);}return _0x4f5c45['status'](_0x26a7f6)[_0x8e34('0x18')]();};}function respondWithResult(_0x2e1051,_0x5b2dd0){_0x5b2dd0=_0x5b2dd0||0xc8;return function(_0x143380){if(_0x143380){return _0x2e1051['status'](_0x5b2dd0)[_0x8e34('0x19')](_0x143380);}};}function respondWithFilteredResult(_0x197632,_0x351e0f){return function(_0x5a5aae){if(_0x5a5aae){var _0x25ab77=typeof _0x351e0f[_0x8e34('0x1a')]==='undefined'&&typeof _0x351e0f[_0x8e34('0x1b')]==='undefined';var _0x2317a0=_0x5a5aae[_0x8e34('0x1c')];var _0x4296a5=_0x25ab77?0x0:_0x351e0f[_0x8e34('0x1a')];var _0x9b2667=_0x25ab77?_0x5a5aae[_0x8e34('0x1c')]:_0x351e0f[_0x8e34('0x1a')]+_0x351e0f[_0x8e34('0x1b')];var _0x1810c1;if(_0x9b2667>=_0x2317a0){_0x9b2667=_0x2317a0;_0x1810c1=0xc8;}else{_0x1810c1=0xce;}_0x197632['status'](_0x1810c1);return _0x197632[_0x8e34('0x1d')](_0x8e34('0x1e'),_0x4296a5+'-'+_0x9b2667+'/'+_0x2317a0)[_0x8e34('0x19')](_0x5a5aae);}return null;};}function patchUpdates(_0x5d765d){return function(_0x180357){try{jsonpatch[_0x8e34('0x1f')](_0x180357,_0x5d765d,!![]);}catch(_0x12b746){return BPromise['reject'](_0x12b746);}return _0x180357[_0x8e34('0x20')]();};}function saveUpdates(_0x4287c8,_0x1dcbbe){return function(_0xc268e){if(_0xc268e){return _0xc268e[_0x8e34('0x21')](_0x4287c8)['then'](function(_0x4af39){return _0x4af39;});}return null;};}function removeEntity(_0x23895f,_0x3d29e7){return function(_0x2c7ba7){if(_0x2c7ba7){return _0x2c7ba7[_0x8e34('0x22')]()[_0x8e34('0x23')](function(){_0x23895f['status'](0xcc)[_0x8e34('0x18')]();});}};}function handleEntityNotFound(_0x563021,_0x1f6a65){return function(_0x26611e){if(!_0x26611e){_0x563021[_0x8e34('0x17')](0x194);}return _0x26611e;};}function handleError(_0x4ab3dd,_0x1d0c54){_0x1d0c54=_0x1d0c54||0x1f4;return function(_0xb55b5a){logger[_0x8e34('0x24')](_0xb55b5a[_0x8e34('0x25')]);if(_0xb55b5a['name']){delete _0xb55b5a['name'];}_0x4ab3dd[_0x8e34('0x26')](_0x1d0c54)[_0x8e34('0x27')](_0xb55b5a);};}exports[_0x8e34('0x28')]=function(_0x2e000b,_0x1b5457){var _0x223ebb={},_0x30f7b7={},_0x6e5c9c={'count':0x0,'rows':[]};var _0x31b83f=_['map'](db[_0x8e34('0x29')][_0x8e34('0x2a')],function(_0x3216c7){return{'name':_0x3216c7['fieldName'],'type':_0x3216c7[_0x8e34('0x2b')][_0x8e34('0x2c')]};});_0x30f7b7['model']=_[_0x8e34('0x2d')](_['map'](_0x31b83f,_0x8e34('0x2e')),['name']);_0x30f7b7[_0x8e34('0x2f')]=_[_0x8e34('0x30')](_0x2e000b['query']);_0x30f7b7[_0x8e34('0x31')]=_[_0x8e34('0x32')](_0x30f7b7[_0x8e34('0x33')],_0x30f7b7[_0x8e34('0x2f')]);_0x223ebb[_0x8e34('0x34')]=_[_0x8e34('0x32')](_0x30f7b7[_0x8e34('0x33')],qs['fields'](_0x2e000b[_0x8e34('0x2f')][_0x8e34('0x35')]));_0x223ebb[_0x8e34('0x34')]=_0x223ebb[_0x8e34('0x34')][_0x8e34('0x36')]?_0x223ebb[_0x8e34('0x34')]:_0x30f7b7['model'];if(!_0x2e000b[_0x8e34('0x2f')][_0x8e34('0x37')](_0x8e34('0x38'))){_0x223ebb['limit']=qs[_0x8e34('0x1b')](_0x2e000b[_0x8e34('0x2f')][_0x8e34('0x1b')]);_0x223ebb[_0x8e34('0x1a')]=qs[_0x8e34('0x1a')](_0x2e000b[_0x8e34('0x2f')][_0x8e34('0x1a')]);}_0x223ebb[_0x8e34('0x39')]=qs['sort'](_0x2e000b[_0x8e34('0x2f')][_0x8e34('0x3a')]);_0x223ebb[_0x8e34('0x3b')]=qs[_0x8e34('0x31')](_[_0x8e34('0x3c')](_0x2e000b[_0x8e34('0x2f')],_0x30f7b7[_0x8e34('0x31')]),_0x31b83f);if(_0x2e000b['query'][_0x8e34('0x3d')]){_0x223ebb[_0x8e34('0x3b')]=_[_0x8e34('0x3e')](_0x223ebb['where'],{'$or':_[_0x8e34('0x3f')](_0x31b83f,function(_0x446de9){if(_0x446de9[_0x8e34('0x2b')]!==_0x8e34('0x40')){var _0x2370d2={};_0x2370d2[_0x446de9[_0x8e34('0x2e')]]={'$like':'%'+_0x2e000b['query']['filter']+'%'};return _0x2370d2;}})});}_0x223ebb=_[_0x8e34('0x3e')]({},_0x223ebb,_0x2e000b[_0x8e34('0x41')]);var _0xbac13e={'where':_0x223ebb[_0x8e34('0x3b')]};return db[_0x8e34('0x29')]['count'](_0xbac13e)['then'](function(_0xda1f53){_0x6e5c9c[_0x8e34('0x1c')]=_0xda1f53;if(_0x2e000b[_0x8e34('0x2f')][_0x8e34('0x42')]){_0x223ebb[_0x8e34('0x43')]=[{'all':!![]}];}return db[_0x8e34('0x29')][_0x8e34('0x44')](_0x223ebb);})[_0x8e34('0x23')](function(_0x843ea2){_0x6e5c9c[_0x8e34('0x45')]=_0x843ea2;return _0x6e5c9c;})[_0x8e34('0x23')](respondWithFilteredResult(_0x1b5457,_0x223ebb))[_0x8e34('0x46')](handleError(_0x1b5457,null));};exports[_0x8e34('0x47')]=function(_0x2ee968,_0x14ae52){var _0x5bbae3={'raw':!![],'where':{'id':_0x2ee968[_0x8e34('0x48')]['id']}},_0x402f2d={};_0x402f2d[_0x8e34('0x33')]=_[_0x8e34('0x30')](db[_0x8e34('0x29')]['rawAttributes']);_0x402f2d['query']=_[_0x8e34('0x30')](_0x2ee968[_0x8e34('0x2f')]);_0x402f2d[_0x8e34('0x31')]=_[_0x8e34('0x32')](_0x402f2d['model'],_0x402f2d[_0x8e34('0x2f')]);_0x5bbae3['attributes']=_[_0x8e34('0x32')](_0x402f2d[_0x8e34('0x33')],qs[_0x8e34('0x35')](_0x2ee968[_0x8e34('0x2f')]['fields']));_0x5bbae3[_0x8e34('0x34')]=_0x5bbae3['attributes']['length']?_0x5bbae3['attributes']:_0x402f2d['model'];if(_0x2ee968[_0x8e34('0x2f')][_0x8e34('0x42')]){_0x5bbae3[_0x8e34('0x43')]=[{'all':!![]}];}_0x5bbae3=_[_0x8e34('0x3e')]({},_0x5bbae3,_0x2ee968['options']);return db['CmCustomField'][_0x8e34('0x49')](_0x5bbae3)['then'](handleEntityNotFound(_0x14ae52,null))[_0x8e34('0x23')](respondWithResult(_0x14ae52,null))[_0x8e34('0x46')](handleError(_0x14ae52,null));};exports['update']=function(_0x440d63,_0x140082){if(_0x440d63[_0x8e34('0x4a')]['id']){delete _0x440d63[_0x8e34('0x4a')]['id'];}return db[_0x8e34('0x29')][_0x8e34('0x49')]({'where':{'id':_0x440d63[_0x8e34('0x48')]['id']}})[_0x8e34('0x23')](handleEntityNotFound(_0x140082,null))[_0x8e34('0x23')](saveUpdates(_0x440d63[_0x8e34('0x4a')],null))[_0x8e34('0x23')](respondWithResult(_0x140082,null))[_0x8e34('0x46')](handleError(_0x140082,null));};exports['destroy']=function(_0x2b757f,_0x99a2f6){return db['CmCustomField'][_0x8e34('0x49')]({'where':{'id':_0x2b757f[_0x8e34('0x48')]['id']}})[_0x8e34('0x23')](handleEntityNotFound(_0x99a2f6,null))[_0x8e34('0x23')](removeEntity(_0x99a2f6,null))[_0x8e34('0x46')](handleError(_0x99a2f6,null));};exports[_0x8e34('0x4b')]=function(_0x4e80f0,_0x16dfef){var _0x11f759;return db['sequelize'][_0x8e34('0x4c')](function(_0x58c25b){return db[_0x8e34('0x29')][_0x8e34('0x4b')](_0x4e80f0[_0x8e34('0x4a')],{'transaction':_0x58c25b})['then'](function(_0x4b2077){_0x11f759=_0x4b2077;var _0x17c6f9={'type':db[_0x8e34('0x4d')][_0x8e34('0x4e')],'transaction':_0x58c25b};switch(_0x4e80f0[_0x8e34('0x4a')]['type']){case _0x8e34('0x4f'):_0x17c6f9[_0x8e34('0x2b')]=db['Sequelize'][_0x8e34('0x4e')];break;case'number':_0x17c6f9[_0x8e34('0x2b')]=db[_0x8e34('0x4d')]['INTEGER'];break;case _0x8e34('0x50'):_0x17c6f9[_0x8e34('0x2b')]=db[_0x8e34('0x4d')][_0x8e34('0x51')];_0x17c6f9[_0x8e34('0x52')]=![];break;default:}return db[_0x8e34('0x53')][_0x8e34('0x54')]['addColumn']('cm_contacts',util['format']('cf_%d',_0x11f759['id']),_0x17c6f9);})['then'](function(){return _0x11f759;});})[_0x8e34('0x23')](respondWithResult(_0x16dfef,0xc9))['catch'](handleError(_0x16dfef,null));};
\ No newline at end of file
index b7cf3fb..d8ebab6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa5c3=['../../config/environment','./cmCustomField.attributes','exports','define','CmCustomField','cm_custom_fields','lodash','util','../../config/logger','api','moment','path','rimraf'];(function(_0x3070dc,_0x40cf11){var _0x431489=function(_0x49bc2a){while(--_0x49bc2a){_0x3070dc['push'](_0x3070dc['shift']());}};_0x431489(++_0x40cf11);}(_0xa5c3,0xaf));var _0x3a5c=function(_0x18dbe8,_0x277e22){_0x18dbe8=_0x18dbe8-0x0;var _0x41f86d=_0xa5c3[_0x18dbe8];return _0x41f86d;};'use strict';var _=require(_0x3a5c('0x0'));var util=require(_0x3a5c('0x1'));var logger=require(_0x3a5c('0x2'))(_0x3a5c('0x3'));var moment=require(_0x3a5c('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x3a5c('0x5'));var rimraf=require(_0x3a5c('0x6'));var config=require(_0x3a5c('0x7'));var attributes=require(_0x3a5c('0x8'));module[_0x3a5c('0x9')]=function(_0xca3f14,_0x79e333){return _0xca3f14[_0x3a5c('0xa')](_0x3a5c('0xb'),attributes,{'tableName':_0x3a5c('0xc'),'paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xa5f4=['util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./cmCustomField.attributes','exports','define','cm_custom_fields'];(function(_0x2e9d74,_0xa93c1b){var _0x42df4c=function(_0x2efdb5){while(--_0x2efdb5){_0x2e9d74['push'](_0x2e9d74['shift']());}};_0x42df4c(++_0xa93c1b);}(_0xa5f4,0xc0));var _0x4a5f=function(_0x1b7694,_0x393040){_0x1b7694=_0x1b7694-0x0;var _0x3b7705=_0xa5f4[_0x1b7694];return _0x3b7705;};'use strict';var _=require('lodash');var util=require(_0x4a5f('0x0'));var logger=require(_0x4a5f('0x1'))(_0x4a5f('0x2'));var moment=require(_0x4a5f('0x3'));var BPromise=require(_0x4a5f('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x4a5f('0x5'));var rimraf=require(_0x4a5f('0x6'));var config=require(_0x4a5f('0x7'));var attributes=require(_0x4a5f('0x8'));module[_0x4a5f('0x9')]=function(_0x8c92bf,_0x295681){return _0x8c92bf[_0x4a5f('0xa')]('CmCustomField',attributes,{'tableName':_0x4a5f('0xb'),'paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index a52ffe9..6382689 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbe64=['../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','CmCustomField,\x20%s,\x20%s','request\x20sent','CmCustomField,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','lodash','util','moment','randomstring','ioredis'];(function(_0x2dfe85,_0x147f2d){var _0x10b8c2=function(_0x4d7baf){while(--_0x4d7baf){_0x2dfe85['push'](_0x2dfe85['shift']());}};_0x10b8c2(++_0x147f2d);}(_0xbe64,0x19d));var _0x4be6=function(_0x2714ec,_0x36daa4){_0x2714ec=_0x2714ec-0x0;var _0x2608e5=_0xbe64[_0x2714ec];return _0x2608e5;};'use strict';var _=require(_0x4be6('0x0'));var util=require(_0x4be6('0x1'));var moment=require(_0x4be6('0x2'));var BPromise=require('bluebird');var rs=require(_0x4be6('0x3'));var fs=require('fs');var Redis=require(_0x4be6('0x4'));var db=require(_0x4be6('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x4be6('0x6'))(_0x4be6('0x7'));var config=require(_0x4be6('0x8'));var jayson=require(_0x4be6('0x9'));var client=jayson['client'][_0x4be6('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5cfe01,_0x27aad8,_0x324b99){return new BPromise(function(_0xc72990,_0xd871f5){return client[_0x4be6('0xb')](_0x5cfe01,_0x324b99)['then'](function(_0x3550c4){logger['info'](_0x4be6('0xc'),_0x27aad8,_0x4be6('0xd'));logger['debug'](_0x4be6('0xe'),_0x27aad8,'request\x20sent',JSON[_0x4be6('0xf')](_0x3550c4));if(_0x3550c4['error']){if(_0x3550c4['error']['code']===0x1f4){logger[_0x4be6('0x10')](_0x4be6('0xc'),_0x27aad8,_0x3550c4['error'][_0x4be6('0x11')]);return _0xd871f5(_0x3550c4[_0x4be6('0x10')][_0x4be6('0x11')]);}logger[_0x4be6('0x10')](_0x4be6('0xc'),_0x27aad8,_0x3550c4[_0x4be6('0x10')][_0x4be6('0x11')]);return _0xc72990(_0x3550c4[_0x4be6('0x10')][_0x4be6('0x11')]);}else{logger['info'](_0x4be6('0xc'),_0x27aad8,'request\x20sent');_0xc72990(_0x3550c4['result'][_0x4be6('0x11')]);}})[_0x4be6('0x12')](function(_0x1e8ece){logger[_0x4be6('0x10')](_0x4be6('0xc'),_0x27aad8,_0x1e8ece);_0xd871f5(_0x1e8ece);});});}
\ No newline at end of file
+var _0x8f08=['http','request','then','CmCustomField,\x20%s,\x20%s','request\x20sent','debug','CmCustomField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client'];(function(_0x590766,_0x26a057){var _0x4e2f10=function(_0x5d96a4){while(--_0x5d96a4){_0x590766['push'](_0x590766['shift']());}};_0x4e2f10(++_0x26a057);}(_0x8f08,0x18d));var _0x88f0=function(_0x3da612,_0x332456){_0x3da612=_0x3da612-0x0;var _0x1a9d1d=_0x8f08[_0x3da612];return _0x1a9d1d;};'use strict';var _=require(_0x88f0('0x0'));var util=require('util');var moment=require(_0x88f0('0x1'));var BPromise=require(_0x88f0('0x2'));var rs=require(_0x88f0('0x3'));var fs=require('fs');var Redis=require(_0x88f0('0x4'));var db=require(_0x88f0('0x5'))['db'];var utils=require(_0x88f0('0x6'));var logger=require('../../config/logger')(_0x88f0('0x7'));var config=require(_0x88f0('0x8'));var jayson=require(_0x88f0('0x9'));var client=jayson[_0x88f0('0xa')][_0x88f0('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5ebe0e,_0x3a6139,_0x1cfcc0){return new BPromise(function(_0x1435a9,_0x55965f){return client[_0x88f0('0xc')](_0x5ebe0e,_0x1cfcc0)[_0x88f0('0xd')](function(_0x4f57a0){logger['info'](_0x88f0('0xe'),_0x3a6139,_0x88f0('0xf'));logger[_0x88f0('0x10')](_0x88f0('0x11'),_0x3a6139,_0x88f0('0xf'),JSON[_0x88f0('0x12')](_0x4f57a0));if(_0x4f57a0['error']){if(_0x4f57a0[_0x88f0('0x13')][_0x88f0('0x14')]===0x1f4){logger[_0x88f0('0x13')](_0x88f0('0xe'),_0x3a6139,_0x4f57a0[_0x88f0('0x13')][_0x88f0('0x15')]);return _0x55965f(_0x4f57a0[_0x88f0('0x13')][_0x88f0('0x15')]);}logger[_0x88f0('0x13')]('CmCustomField,\x20%s,\x20%s',_0x3a6139,_0x4f57a0[_0x88f0('0x13')][_0x88f0('0x15')]);return _0x1435a9(_0x4f57a0['error'][_0x88f0('0x15')]);}else{logger[_0x88f0('0x16')](_0x88f0('0xe'),_0x3a6139,_0x88f0('0xf'));_0x1435a9(_0x4f57a0['result'][_0x88f0('0x15')]);}})[_0x88f0('0x17')](function(_0xb0e817){logger[_0x88f0('0x13')](_0x88f0('0xe'),_0x3a6139,_0xb0e817);_0x55965f(_0xb0e817);});});}
\ No newline at end of file
index e8ec63c..8308b92 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3885=['express','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/:id','show','post','create','delete','destroy','exports','multer','connect-timeout'];(function(_0x1ddedd,_0x485606){var _0xa3e1ac=function(_0x580444){while(--_0x580444){_0x1ddedd['push'](_0x1ddedd['shift']());}};_0xa3e1ac(++_0x485606);}(_0x3885,0x10e));var _0x5388=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0x3885[_0x40a045];return _0x1a687c;};'use strict';var multer=require(_0x5388('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x5388('0x1'));var express=require(_0x5388('0x2'));var router=express['Router']();var fs_extra=require(_0x5388('0x3'));var auth=require(_0x5388('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x5388('0x5'));var controller=require('./cmCustomField.controller');router[_0x5388('0x6')]('/',auth[_0x5388('0x7')](),controller[_0x5388('0x8')]);router[_0x5388('0x6')](_0x5388('0x9'),auth[_0x5388('0x7')](),controller[_0x5388('0xa')]);router[_0x5388('0xb')]('/',auth[_0x5388('0x7')](),controller[_0x5388('0xc')]);router['put'](_0x5388('0x9'),auth[_0x5388('0x7')](),controller['update']);router[_0x5388('0xd')](_0x5388('0x9'),auth[_0x5388('0x7')](),controller[_0x5388('0xe')]);module[_0x5388('0xf')]=router;
\ No newline at end of file
+var _0xb613=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmCustomField.controller','get','isAuthenticated','index','/:id','show','post','create','put','update','delete','destroy','exports','multer','util','express'];(function(_0x405385,_0x56f573){var _0x43837b=function(_0x30e20e){while(--_0x30e20e){_0x405385['push'](_0x405385['shift']());}};_0x43837b(++_0x56f573);}(_0xb613,0x9d));var _0x3b61=function(_0x18a79d,_0x57bd2c){_0x18a79d=_0x18a79d-0x0;var _0x4f8848=_0xb613[_0x18a79d];return _0x4f8848;};'use strict';var multer=require(_0x3b61('0x0'));var util=require(_0x3b61('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x3b61('0x2'));var router=express[_0x3b61('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x3b61('0x4'));var interaction=require(_0x3b61('0x5'));var config=require(_0x3b61('0x6'));var controller=require(_0x3b61('0x7'));router[_0x3b61('0x8')]('/',auth[_0x3b61('0x9')](),controller[_0x3b61('0xa')]);router['get'](_0x3b61('0xb'),auth[_0x3b61('0x9')](),controller[_0x3b61('0xc')]);router[_0x3b61('0xd')]('/',auth[_0x3b61('0x9')](),controller[_0x3b61('0xe')]);router[_0x3b61('0xf')](_0x3b61('0xb'),auth[_0x3b61('0x9')](),controller[_0x3b61('0x10')]);router[_0x3b61('0x11')](_0x3b61('0xb'),auth[_0x3b61('0x9')](),controller[_0x3b61('0x12')]);module[_0x3b61('0x13')]=router;
\ No newline at end of file
index edbdd95..db94224 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6605=['INTEGER','BOOLEAN','contactListQueue','STRING','moment','sequelize','exports','DATE','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x364604,_0x309c2e){var _0x155028=function(_0x55ab6b){while(--_0x55ab6b){_0x364604['push'](_0x364604['shift']());}};_0x155028(++_0x309c2e);}(_0x6605,0x130));var _0x5660=function(_0x5bf07e,_0x470c47){_0x5bf07e=_0x5bf07e-0x0;var _0x181787=_0x6605[_0x5bf07e];return _0x181787;};'use strict';var moment=require(_0x5660('0x0'));var Sequelize=require(_0x5660('0x1'));module[_0x5660('0x2')]={'phone':{'type':Sequelize['STRING'],'allowNull':![]},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'scheduledat':{'type':Sequelize[_0x5660('0x3')],'defaultValue':moment()[_0x5660('0x4')](_0x5660('0x5'))},'countbusyretry':{'type':Sequelize[_0x5660('0x6')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x5660('0x6')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'callback':{'type':Sequelize[_0x5660('0x7')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize['STRING'],'defaultValue':null},'callbackat':{'type':Sequelize['DATE']},'priority':{'type':Sequelize[_0x5660('0x6')](0x2)['UNSIGNED'],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'recallme':{'type':Sequelize[_0x5660('0x7')],'defaultValue':![]},'ContactId':{'type':Sequelize['INTEGER'],'unique':_0x5660('0x8')},'ListId':{'type':Sequelize['INTEGER'],'unique':_0x5660('0x8')},'UserId':{'type':Sequelize[_0x5660('0x6')]},'VoiceQueueId':{'type':Sequelize[_0x5660('0x6')],'unique':_0x5660('0x8')},'CampaignId':{'type':Sequelize[_0x5660('0x6')]},'countnosuchnumberretry':{'type':Sequelize[_0x5660('0x6')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x5660('0x6')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x5660('0x6')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x5660('0x6')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'OrderBy':{'type':Sequelize[_0x5660('0x6')],'allowNull':!![],'defaultValue':0x0},'dialTimezone':{'type':Sequelize[_0x5660('0x9')]},'recallmeNotifiedDate':{'type':Sequelize[_0x5660('0x3')],'allowNull':!![],'defaultValue':null}};
\ No newline at end of file
+var _0x2872=['STRING','UNSIGNED','contactListQueue','sequelize','BOOLEAN','DATE','format','YYYY-MM-DD\x20HH:mm:ss','INTEGER'];(function(_0x2d5a8c,_0x3f6e07){var _0x53db46=function(_0x27c97a){while(--_0x27c97a){_0x2d5a8c['push'](_0x2d5a8c['shift']());}};_0x53db46(++_0x3f6e07);}(_0x2872,0xff));var _0x2287=function(_0x5823d4,_0x4634db){_0x5823d4=_0x5823d4-0x0;var _0x35a0b5=_0x2872[_0x5823d4];return _0x35a0b5;};'use strict';var moment=require('moment');var Sequelize=require(_0x2287('0x0'));module['exports']={'phone':{'type':Sequelize['STRING'],'allowNull':![]},'active':{'type':Sequelize[_0x2287('0x1')],'defaultValue':![]},'scheduledat':{'type':Sequelize[_0x2287('0x2')],'defaultValue':moment()[_0x2287('0x3')](_0x2287('0x4'))},'countbusyretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x2287('0x5')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'callback':{'type':Sequelize[_0x2287('0x1')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x2287('0x6')],'defaultValue':null},'callbackat':{'type':Sequelize['DATE']},'priority':{'type':Sequelize[_0x2287('0x5')](0x2)[_0x2287('0x7')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'recallme':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'ContactId':{'type':Sequelize['INTEGER'],'unique':_0x2287('0x8')},'ListId':{'type':Sequelize[_0x2287('0x5')],'unique':'contactListQueue'},'UserId':{'type':Sequelize[_0x2287('0x5')]},'VoiceQueueId':{'type':Sequelize[_0x2287('0x5')],'unique':'contactListQueue'},'CampaignId':{'type':Sequelize['INTEGER']},'countnosuchnumberretry':{'type':Sequelize[_0x2287('0x5')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x2287('0x5')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x2287('0x5')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x2287('0x5')],'defaultValue':0x0},'OrderBy':{'type':Sequelize['INTEGER'],'allowNull':!![],'defaultValue':0x0},'dialTimezone':{'type':Sequelize[_0x2287('0x6')]},'recallmeNotifiedDate':{'type':Sequelize[_0x2287('0x2')],'allowNull':!![],'defaultValue':null}};
\ No newline at end of file
index 760417c..03b957a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xed95=['phone','queue','CmContact','firstName','lastName','calleridname','finally','CmHopperFinal','CmHopperAdditionalPhone','end','getPreview','getVoiceQueues','outbound','preview','dialOrderByScheduledAt','dialPreviewAutoRecallMe','sequelize','transaction','value','direction','prev','isEmpty','hopperIds','priority','ASC','scheduledAt','literal','DESC','COALESCE(CmHopper.UserId,\x200)\x20DESC','findOne','scheduledat','recallme','LOCK','UPDATE','Contact','CmCompany','List','dialActive','update','getPreviewRecall','Queue','getOpenContacts','isNil','isNumber','CmHopper,\x20%s,\x20%s,\x20%s','entity\x20not\x20found','getTimezones','timezones','push','moment','lodash','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','status','json','offset','undefined','limit','count','set','Content-Range','sendStatus','error','name','send','index','map','CmHopper','fieldName','keys','query','filters','intersection','concat','$and','$or','$lt','$lte','$ne','$between','$notBetween','$in','$like','$notLike','$iLike','$overlap','$contains','$contained','fields','attributes','length','nolimit','order','sort','where','pick','filter','type','VIRTUAL','then','includeAll','include','findAll','rows','params','model','rawAttributes','options','find','catch','create','body','describe','destroy','CampaignId','VoiceQueueId','VoiceQueue','Campaign','merge','omit','dataValues','createdAt','updatedAt','state','statedesc','deleted','campaign','membername','user','UserId','deletedat','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x20483d,_0x5eb15f){var _0x113e8d=function(_0x496fab){while(--_0x496fab){_0x20483d['push'](_0x20483d['shift']());}};_0x113e8d(++_0x5eb15f);}(_0xed95,0xb9));var _0x5ed9=function(_0x1724a0,_0x25c4d4){_0x1724a0=_0x1724a0-0x0;var _0x46fd4e=_0xed95[_0x1724a0];return _0x46fd4e;};'use strict';var moment=require(_0x5ed9('0x0'));var _=require(_0x5ed9('0x1'));var qs=require(_0x5ed9('0x2'));var logger=require(_0x5ed9('0x3'))(_0x5ed9('0x4'));var shared=require(_0x5ed9('0x5'));var db=require(_0x5ed9('0x6'))['db'];function respondWithResult(_0x3e2272,_0x2a28e9){_0x2a28e9=_0x2a28e9||0xc8;return function(_0x7b84d6){if(_0x7b84d6){return _0x3e2272[_0x5ed9('0x7')](_0x2a28e9)[_0x5ed9('0x8')](_0x7b84d6);}};}function respondWithFilteredResult(_0x52a57d,_0x48efa8){return function(_0x2612a8){if(_0x2612a8){var _0x217c71=typeof _0x48efa8[_0x5ed9('0x9')]===_0x5ed9('0xa')&&typeof _0x48efa8[_0x5ed9('0xb')]===_0x5ed9('0xa');var _0x5b48b1=_0x2612a8['count'];var _0x3cbaf0=_0x217c71?0x0:_0x48efa8[_0x5ed9('0x9')];var _0x46fc84=_0x217c71?_0x2612a8[_0x5ed9('0xc')]:_0x48efa8['offset']+_0x48efa8['limit'];var _0x28e087;if(_0x46fc84>=_0x5b48b1){_0x46fc84=_0x5b48b1;_0x28e087=0xc8;}else{_0x28e087=0xce;}_0x52a57d[_0x5ed9('0x7')](_0x28e087);return _0x52a57d[_0x5ed9('0xd')](_0x5ed9('0xe'),_0x3cbaf0+'-'+_0x46fc84+'/'+_0x5b48b1)['json'](_0x2612a8);}return null;};}function saveUpdates(_0x217a53,_0x110d83){return function(_0x246f80){if(_0x246f80){return _0x246f80['update'](_0x217a53)['then'](function(_0x3de296){return _0x3de296;});}return null;};}function handleEntityNotFound(_0x28587e,_0x5e952c){return function(_0x2cfd87){if(!_0x2cfd87){_0x28587e[_0x5ed9('0xf')](0x194);}return _0x2cfd87;};}function handleError(_0x59bace,_0x57692b){_0x57692b=_0x57692b||0x1f4;return function(_0x1d2d60){logger[_0x5ed9('0x10')](_0x1d2d60['stack']);if(_0x1d2d60[_0x5ed9('0x11')]){delete _0x1d2d60[_0x5ed9('0x11')];}_0x59bace['status'](_0x57692b)[_0x5ed9('0x12')](_0x1d2d60);};}exports[_0x5ed9('0x13')]=function(_0x54a570,_0x49fe37){var _0x5a3ac1={},_0x510ffe={},_0x3f65df={'count':0x0,'rows':[]};var _0x409a26=_[_0x5ed9('0x14')](db[_0x5ed9('0x15')]['rawAttributes'],function(_0x120a60){return{'name':_0x120a60[_0x5ed9('0x16')],'type':_0x120a60['type']['key']};});_0x510ffe['model']=_[_0x5ed9('0x14')](_0x409a26,_0x5ed9('0x11'));_0x510ffe['query']=_[_0x5ed9('0x17')](_0x54a570[_0x5ed9('0x18')]);_0x510ffe[_0x5ed9('0x19')]=_[_0x5ed9('0x1a')](_0x510ffe['model'],_0x510ffe[_0x5ed9('0x18')]);_0x510ffe[_0x5ed9('0x19')]=_[_0x5ed9('0x1b')](_0x510ffe[_0x5ed9('0x19')],[_0x5ed9('0x1c'),_0x5ed9('0x1d'),'$gt','$gte',_0x5ed9('0x1e'),_0x5ed9('0x1f'),_0x5ed9('0x20'),'$eq','$not',_0x5ed9('0x21'),_0x5ed9('0x22'),_0x5ed9('0x23'),'$notIn',_0x5ed9('0x24'),_0x5ed9('0x25'),_0x5ed9('0x26'),'$notILike',_0x5ed9('0x24'),_0x5ed9('0x27'),_0x5ed9('0x28'),_0x5ed9('0x29'),'$any']);_0x5a3ac1['attributes']=_[_0x5ed9('0x1a')](_0x510ffe['model'],qs[_0x5ed9('0x2a')](_0x54a570[_0x5ed9('0x18')][_0x5ed9('0x2a')]));_0x5a3ac1[_0x5ed9('0x2b')]=_0x5a3ac1[_0x5ed9('0x2b')][_0x5ed9('0x2c')]?_0x5a3ac1[_0x5ed9('0x2b')]:_0x510ffe['model'];if(!_0x54a570['query']['hasOwnProperty'](_0x5ed9('0x2d'))){_0x5a3ac1[_0x5ed9('0xb')]=qs[_0x5ed9('0xb')](_0x54a570['query'][_0x5ed9('0xb')]);_0x5a3ac1['offset']=qs[_0x5ed9('0x9')](_0x54a570[_0x5ed9('0x18')][_0x5ed9('0x9')]);}_0x5a3ac1[_0x5ed9('0x2e')]=qs[_0x5ed9('0x2f')](_0x54a570[_0x5ed9('0x18')]['sort']);_0x5a3ac1[_0x5ed9('0x30')]=qs[_0x5ed9('0x19')](_[_0x5ed9('0x31')](_0x54a570['query'],_0x510ffe['filters']),_0x409a26);if(_0x54a570[_0x5ed9('0x18')][_0x5ed9('0x32')]){_0x5a3ac1['where']=_['merge'](_0x5a3ac1[_0x5ed9('0x30')],{'$or':_[_0x5ed9('0x14')](_0x409a26,function(_0x13cac8){if(_0x13cac8[_0x5ed9('0x33')]!==_0x5ed9('0x34')){var _0x355899={};_0x355899[_0x13cac8[_0x5ed9('0x11')]]={'$like':'%'+_0x54a570[_0x5ed9('0x18')]['filter']+'%'};return _0x355899;}})});}_0x5a3ac1=_['merge']({},_0x5a3ac1,_0x54a570['options']);var _0x4699a0={'where':_0x5a3ac1[_0x5ed9('0x30')]};return db['CmHopper'][_0x5ed9('0xc')](_0x4699a0)[_0x5ed9('0x35')](function(_0x4407d2){_0x3f65df[_0x5ed9('0xc')]=_0x4407d2;if(_0x54a570['query'][_0x5ed9('0x36')]){_0x5a3ac1[_0x5ed9('0x37')]=[{'all':!![]}];}return db[_0x5ed9('0x15')][_0x5ed9('0x38')](_0x5a3ac1);})[_0x5ed9('0x35')](function(_0x5d01fe){_0x3f65df[_0x5ed9('0x39')]=_0x5d01fe;return _0x3f65df;})[_0x5ed9('0x35')](respondWithFilteredResult(_0x49fe37,_0x5a3ac1))['catch'](handleError(_0x49fe37,null));};exports['show']=function(_0x1ac6b7,_0x52c7ca){var _0x4fedbe={'raw':!![],'where':{'id':_0x1ac6b7[_0x5ed9('0x3a')]['id']}},_0x5a9287={};_0x5a9287[_0x5ed9('0x3b')]=_['keys'](db['CmHopper'][_0x5ed9('0x3c')]);_0x5a9287[_0x5ed9('0x18')]=_[_0x5ed9('0x17')](_0x1ac6b7[_0x5ed9('0x18')]);_0x5a9287[_0x5ed9('0x19')]=_[_0x5ed9('0x1a')](_0x5a9287[_0x5ed9('0x3b')],_0x5a9287[_0x5ed9('0x18')]);_0x4fedbe[_0x5ed9('0x2b')]=_[_0x5ed9('0x1a')](_0x5a9287[_0x5ed9('0x3b')],qs[_0x5ed9('0x2a')](_0x1ac6b7[_0x5ed9('0x18')][_0x5ed9('0x2a')]));_0x4fedbe['attributes']=_0x4fedbe[_0x5ed9('0x2b')][_0x5ed9('0x2c')]?_0x4fedbe[_0x5ed9('0x2b')]:_0x5a9287[_0x5ed9('0x3b')];if(_0x1ac6b7[_0x5ed9('0x18')]['includeAll']){_0x4fedbe[_0x5ed9('0x37')]=[{'all':!![]}];}_0x4fedbe=_['merge']({},_0x4fedbe,_0x1ac6b7[_0x5ed9('0x3d')]);return db[_0x5ed9('0x15')][_0x5ed9('0x3e')](_0x4fedbe)[_0x5ed9('0x35')](handleEntityNotFound(_0x52c7ca,null))[_0x5ed9('0x35')](respondWithResult(_0x52c7ca,null))[_0x5ed9('0x3f')](handleError(_0x52c7ca,null));};exports[_0x5ed9('0x40')]=function(_0x53c64f,_0x5e717b){return db[_0x5ed9('0x15')][_0x5ed9('0x40')](_0x53c64f['body'],{})[_0x5ed9('0x35')](respondWithResult(_0x5e717b,0xc9))[_0x5ed9('0x3f')](handleError(_0x5e717b,null));};exports['update']=function(_0x53a601,_0x23ea4b){if(_0x53a601[_0x5ed9('0x41')]['id']){delete _0x53a601['body']['id'];}return db[_0x5ed9('0x15')][_0x5ed9('0x3e')]({'where':{'id':_0x53a601[_0x5ed9('0x3a')]['id']}})[_0x5ed9('0x35')](handleEntityNotFound(_0x23ea4b,null))[_0x5ed9('0x35')](saveUpdates(_0x53a601[_0x5ed9('0x41')],null))[_0x5ed9('0x35')](respondWithResult(_0x23ea4b,null))[_0x5ed9('0x3f')](handleError(_0x23ea4b,null));};exports[_0x5ed9('0x42')]=function(_0x2620f0,_0x4422dd){return db[_0x5ed9('0x15')][_0x5ed9('0x42')]()['then'](respondWithResult(_0x4422dd,null))[_0x5ed9('0x3f')](handleError(_0x4422dd,null));};exports[_0x5ed9('0x43')]=function(_0x134b29,_0x5e6515){var _0xb50921;var _0x4e65ed=_0x134b29[_0x5ed9('0x3a')]['id'];return db[_0x5ed9('0x15')][_0x5ed9('0x3e')]({'where':{'id':_0x134b29[_0x5ed9('0x3a')]['id']}})[_0x5ed9('0x35')](handleEntityNotFound(_0x5e6515,null))[_0x5ed9('0x35')](function(_0x17c434){if(_0x17c434){return _0x17c434[_0x5ed9('0x43')]()[_0x5ed9('0x35')](function(_0x2ec8c2){return _0x2ec8c2;});}})[_0x5ed9('0x35')](function(_0x345bff){_0xb50921=_0x345bff;if(_0x345bff){if(_0x345bff['VoiceQueueId']||_0x345bff[_0x5ed9('0x44')]){return db[_0x345bff[_0x5ed9('0x45')]?_0x5ed9('0x46'):_0x5ed9('0x47')][_0x5ed9('0x3e')]({'where':{'id':_0x345bff['VoiceQueueId']?_0x345bff['VoiceQueueId']:_0x345bff['CampaignId']},'attributes':['id','name'],'raw':!![]});}}})['then'](function(_0x44a1ee){var _0x1bb8b8={};if(_0x44a1ee){_[_0x5ed9('0x48')](_0x1bb8b8,_[_0x5ed9('0x49')](_0xb50921[_0x5ed9('0x4a')],[_0x5ed9('0x4b'),_0x5ed9('0x4c'),'id']));_0x1bb8b8[_0x5ed9('0x4d')]=0x15;_0x1bb8b8[_0x5ed9('0x4e')]=_0x5ed9('0x4f');_0x1bb8b8[_0x5ed9('0x50')]=_0x44a1ee[_0x5ed9('0x11')];_0x1bb8b8[_0x5ed9('0x51')]=_0x134b29[_0x5ed9('0x52')]['name'];_0x1bb8b8[_0x5ed9('0x53')]=_0x134b29[_0x5ed9('0x52')]['id'];_0x1bb8b8[_0x5ed9('0x4f')]=!![];_0x1bb8b8[_0x5ed9('0x54')]=moment()[_0x5ed9('0x55')](_0x5ed9('0x56'));_0x1bb8b8['calleridnum']=_0xb50921[_0x5ed9('0x57')];_0x1bb8b8['campaigntype']=_0xb50921['VoiceQueueId']?_0x5ed9('0x58'):'ivr';return db[_0x5ed9('0x59')][_0x5ed9('0x3e')]({'where':{'id':_0x1bb8b8['ContactId']},'attributes':[_0x5ed9('0x5a'),_0x5ed9('0x5b')]})[_0x5ed9('0x35')](function(_0x1c0321){if(!_['isNil'](_0x5e6515)&&!_['isNil'](_0x1c0321['firstName'])){_0x1bb8b8[_0x5ed9('0x5c')]=_0x1c0321[_0x5ed9('0x5a')];if(!_['isNil'](_0x1c0321[_0x5ed9('0x5b')])){_0x1bb8b8[_0x5ed9('0x5c')]+='\x20'+_0x1c0321['lastName'];}}})[_0x5ed9('0x5d')](function(){return db[_0x5ed9('0x5e')]['create'](_0x1bb8b8);});}})[_0x5ed9('0x35')](function(_0x3ce6ab){return db[_0x5ed9('0x5f')]['destroy']({'where':{'CmHopperId':_0x4e65ed}});})[_0x5ed9('0x35')](function(){return _0x5e6515[_0x5ed9('0x7')](0xcc)[_0x5ed9('0x60')]();})[_0x5ed9('0x3f')](handleError(_0x5e6515,null));};exports[_0x5ed9('0x61')]=function(_0x10340f,_0x21be65){var _0xe72d99=[];return db['CmContact'][_0x5ed9('0x42')]()[_0x5ed9('0x35')](function(_0x2b36d){_0xe72d99=_[_0x5ed9('0x17')](_0x2b36d);return _0x10340f[_0x5ed9('0x52')][_0x5ed9('0x62')]({'where':{'type':_0x5ed9('0x63'),'dialActive':!![],'dialMethod':_0x5ed9('0x64')},'attributes':['id',_0x5ed9('0x65'),_0x5ed9('0x66')],'raw':!![]});})[_0x5ed9('0x35')](function(_0x3b6d17){if(_0x3b6d17&&_0x3b6d17[_0x5ed9('0x2c')]){return db[_0x5ed9('0x67')][_0x5ed9('0x68')](function(_0x3d51b6){var _0x4b08b1={'active':![],'recallme':![],'scheduledAt':{'$lte':moment()[_0x5ed9('0x55')](_0x5ed9('0x56'))},'VoiceQueueId':{'$in':_['map'](_0x3b6d17,'id')},'$or':[{'UserId':null},{'UserId':_0x10340f[_0x5ed9('0x52')]['id']}]};var _0x97ab7e={'active':![],'recallme':!![],'VoiceQueueId':{'$in':_(_0x3b6d17)[_0x5ed9('0x32')]([_0x5ed9('0x66'),0x0])[_0x5ed9('0x14')]('id')[_0x5ed9('0x69')]()},'$or':[{'UserId':null},{'UserId':_0x10340f[_0x5ed9('0x52')]['id']}]};var _0xe56a17={'$or':[_0x4b08b1,_0x97ab7e]};var _0x54b343=[];if(_0x10340f[_0x5ed9('0x41')]['direction']&&_0x10340f['body'][_0x5ed9('0x6a')]===_0x5ed9('0x6b')){if(!_[_0x5ed9('0x6c')](_0x10340f['body'][_0x5ed9('0x6d')])){_0xe56a17['id']={'$in':_0x10340f[_0x5ed9('0x41')][_0x5ed9('0x6d')]};}_0x54b343=[[_0x5ed9('0x6e'),_0x5ed9('0x6f')],[_0x5ed9('0x70'),_0x3b6d17[0x0][_0x5ed9('0x65')]==='ASC'?'DESC':'ASC'],db[_0x5ed9('0x67')][_0x5ed9('0x71')]('COALESCE(CmHopper.UserId,\x200)\x20ASC'),['id',_0x5ed9('0x72')]];}else{if(!_[_0x5ed9('0x6c')](_0x10340f[_0x5ed9('0x41')][_0x5ed9('0x6d')])){_0xe56a17['id']={'$notIn':_0x10340f[_0x5ed9('0x41')][_0x5ed9('0x6d')]};}_0x54b343=[[_0x5ed9('0x6e'),_0x5ed9('0x72')],[_0x5ed9('0x70'),_0x3b6d17[0x0][_0x5ed9('0x65')]],db['sequelize'][_0x5ed9('0x71')](_0x5ed9('0x73')),['id',_0x5ed9('0x6f')]];}return db[_0x5ed9('0x15')][_0x5ed9('0x74')]({'attributes':['id',_0x5ed9('0x75'),_0x5ed9('0x57'),_0x5ed9('0x76')],'where':_0xe56a17,'order':_0x54b343,'transaction':_0x3d51b6,'lock':_0x3d51b6[_0x5ed9('0x77')][_0x5ed9('0x78')],'include':[{'model':db[_0x5ed9('0x59')],'as':_0x5ed9('0x79'),'attributes':_0xe72d99,'include':[{'model':db[_0x5ed9('0x7a')],'as':'Company','attributes':['id',_0x5ed9('0x11')]}]},{'model':db['CmList'],'as':_0x5ed9('0x7b'),'attributes':['id',_0x5ed9('0x11')]},{'model':db['VoiceQueue'],'as':'Queue','attributes':['id','name',_0x5ed9('0x7c')]}]})[_0x5ed9('0x35')](function(_0x13560f){if(_0x13560f){return _0x13560f[_0x5ed9('0x7d')]({'UserId':_0x10340f[_0x5ed9('0x52')]['id']},{'transaction':_0x3d51b6});}});});}})['then'](handleEntityNotFound(_0x21be65,null))['then'](respondWithResult(_0x21be65,null))[_0x5ed9('0x3f')](handleError(_0x21be65,null));};exports[_0x5ed9('0x7e')]=function(_0x2aaa14,_0x64f4b7,_0x55821c){var _0x5bf1c0=[];var _0xbe0e06=_0x2aaa14['params']['id'];var _0x5f46f4=_0x2aaa14[_0x5ed9('0x52')]['id'];return db[_0x5ed9('0x59')][_0x5ed9('0x42')]()['then'](function(_0x24487f){_0x5bf1c0=_[_0x5ed9('0x17')](_0x24487f);return db['sequelize'][_0x5ed9('0x68')](function(_0x18e7a1){const _0x34362c={'id':_0xbe0e06};return db[_0x5ed9('0x15')]['findOne']({'attributes':['id',_0x5ed9('0x75'),'recallme'],'where':_0x34362c,'transaction':_0x18e7a1,'lock':_0x18e7a1[_0x5ed9('0x77')][_0x5ed9('0x78')],'include':[{'model':db[_0x5ed9('0x59')],'as':_0x5ed9('0x79'),'attributes':_0x5bf1c0,'include':[{'model':db[_0x5ed9('0x7a')],'as':'Company','attributes':['id','name']}]},{'model':db['CmList'],'as':'List','attributes':['id',_0x5ed9('0x11')]},{'model':db[_0x5ed9('0x46')],'as':_0x5ed9('0x7f'),'attributes':['id',_0x5ed9('0x11'),'dialActive']}]})[_0x5ed9('0x35')](function(_0x45cf95){if(_0x45cf95){return _0x45cf95['update']({'UserId':_0x5f46f4},{'transaction':_0x18e7a1});}});});})[_0x5ed9('0x35')](handleEntityNotFound(_0x64f4b7,null))[_0x5ed9('0x35')](respondWithResult(_0x64f4b7,null))[_0x5ed9('0x3f')](handleError(_0x64f4b7,null));};exports[_0x5ed9('0x80')]=function(_0x20a579,_0x533866){return _0x20a579[_0x5ed9('0x52')][_0x5ed9('0x62')]({'where':{'type':_0x5ed9('0x63'),'dialActive':!![],'dialMethod':_0x5ed9('0x64')},'attributes':['id'],'raw':!![]})[_0x5ed9('0x35')](function(_0x24d9fe){if(_0x24d9fe&&_0x24d9fe[_0x5ed9('0x2c')]){return db['CmHopper'][_0x5ed9('0xc')]({'where':{'active':![],'recallme':![],'scheduledAt':{'$lte':moment()[_0x5ed9('0x55')](_0x5ed9('0x56'))},'VoiceQueueId':{'$in':_[_0x5ed9('0x14')](_0x24d9fe,'id')},'$or':[{'UserId':null},{'UserId':_0x20a579[_0x5ed9('0x52')]['id']}]}});}return 0x0;})[_0x5ed9('0x35')](function(_0x565405){if(!_[_0x5ed9('0x81')](_0x565405)&&_[_0x5ed9('0x82')](_0x565405)){return _0x533866[_0x5ed9('0x7')](0xc8)[_0x5ed9('0x8')]({'contacts':_0x565405});}else{logger['error'](_0x5ed9('0x83'),'getOpenContacts',0x194,_0x5ed9('0x84'));_0x533866[_0x5ed9('0xf')](0x194);}})[_0x5ed9('0x3f')](handleError(_0x533866,null));};exports[_0x5ed9('0x85')]=function(_0x3b474e,_0x5db252){var _0x37b98a=shared[_0x5ed9('0x86')];var _0x682d7c=[];_[_0x5ed9('0x14')](_0x37b98a,function(_0x50d590){_0x682d7c[_0x5ed9('0x87')]({'id':_0x50d590[_0x5ed9('0x11')],'name':_0x50d590[_0x5ed9('0x11')],'utcOffset':_0x50d590['utcOffset']});});return _0x5db252[_0x5ed9('0x7')](0xc8)[_0x5ed9('0x8')]({'tz':_0x682d7c});};exports['getTimezone']=function(_0x1ea31e,_0x2d8868){var _0x2164f1=shared['timezones'];var _0x1bbb1a={};if(!_[_0x5ed9('0x81')](_0x2164f1[_0x1ea31e[_0x5ed9('0x41')]['id']]))_0x1bbb1a=_0x2164f1[_0x1ea31e[_0x5ed9('0x41')]['id']];return _0x2d8868[_0x5ed9('0x7')](0xc8)[_0x5ed9('0x8')](_0x1bbb1a);};
\ No newline at end of file
+var _0xf725=['offset','undefined','count','limit','status','set','Content-Range','update','then','stack','name','index','map','CmHopper','rawAttributes','fieldName','type','model','query','keys','filters','intersection','$and','$or','$gt','$lt','$lte','$eq','$not','$between','$notIn','$like','$notLike','$iLike','$notILike','$overlap','$contained','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','describe','destroy','VoiceQueueId','CampaignId','Campaign','omit','updatedAt','state','statedesc','campaign','membername','UserId','deletedat','calleridnum','phone','campaigntype','queue','ivr','CmContact','ContactId','lastName','isNil','firstName','calleridname','CmHopperFinal','CmHopperAdditionalPhone','end','getPreview','getVoiceQueues','outbound','preview','dialOrderByScheduledAt','sequelize','transaction','format','YYYY-MM-DD\x20HH:mm:ss','user','dialPreviewAutoRecallMe','direction','prev','isEmpty','hopperIds','priority','ASC','scheduledAt','DESC','COALESCE(CmHopper.UserId,\x200)\x20ASC','literal','COALESCE(CmHopper.UserId,\x200)\x20DESC','findOne','recallme','LOCK','UPDATE','Contact','CmCompany','Company','CmList','List','VoiceQueue','Queue','getPreviewRecall','scheduledat','dialActive','isNumber','error','CmHopper,\x20%s,\x20%s,\x20%s','push','moment','lodash','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','json'];(function(_0xcf96ec,_0x2a2b00){var _0x451ea3=function(_0x5d6289){while(--_0x5d6289){_0xcf96ec['push'](_0xcf96ec['shift']());}};_0x451ea3(++_0x2a2b00);}(_0xf725,0x7e));var _0x5f72=function(_0xb0914a,_0x502763){_0xb0914a=_0xb0914a-0x0;var _0x40311b=_0xf725[_0xb0914a];return _0x40311b;};'use strict';var moment=require(_0x5f72('0x0'));var _=require(_0x5f72('0x1'));var qs=require(_0x5f72('0x2'));var logger=require(_0x5f72('0x3'))(_0x5f72('0x4'));var shared=require(_0x5f72('0x5'));var db=require(_0x5f72('0x6'))['db'];function respondWithResult(_0x172588,_0x4200ff){_0x4200ff=_0x4200ff||0xc8;return function(_0x17a5bc){if(_0x17a5bc){return _0x172588['status'](_0x4200ff)[_0x5f72('0x7')](_0x17a5bc);}};}function respondWithFilteredResult(_0x14a92d,_0x3f2ca7){return function(_0x193393){if(_0x193393){var _0x148af8=typeof _0x3f2ca7[_0x5f72('0x8')]===_0x5f72('0x9')&&typeof _0x3f2ca7['limit']==='undefined';var _0x16de9b=_0x193393[_0x5f72('0xa')];var _0x5b74cf=_0x148af8?0x0:_0x3f2ca7[_0x5f72('0x8')];var _0x4735f6=_0x148af8?_0x193393['count']:_0x3f2ca7[_0x5f72('0x8')]+_0x3f2ca7[_0x5f72('0xb')];var _0x115372;if(_0x4735f6>=_0x16de9b){_0x4735f6=_0x16de9b;_0x115372=0xc8;}else{_0x115372=0xce;}_0x14a92d[_0x5f72('0xc')](_0x115372);return _0x14a92d[_0x5f72('0xd')](_0x5f72('0xe'),_0x5b74cf+'-'+_0x4735f6+'/'+_0x16de9b)[_0x5f72('0x7')](_0x193393);}return null;};}function saveUpdates(_0x537d7d,_0x1ac591){return function(_0x3307ed){if(_0x3307ed){return _0x3307ed[_0x5f72('0xf')](_0x537d7d)[_0x5f72('0x10')](function(_0x333d9a){return _0x333d9a;});}return null;};}function handleEntityNotFound(_0x57007a,_0x43d1fd){return function(_0x4f81e9){if(!_0x4f81e9){_0x57007a['sendStatus'](0x194);}return _0x4f81e9;};}function handleError(_0x1665be,_0x5a036c){_0x5a036c=_0x5a036c||0x1f4;return function(_0x3267a){logger['error'](_0x3267a[_0x5f72('0x11')]);if(_0x3267a['name']){delete _0x3267a[_0x5f72('0x12')];}_0x1665be[_0x5f72('0xc')](_0x5a036c)['send'](_0x3267a);};}exports[_0x5f72('0x13')]=function(_0x276323,_0x1497d4){var _0x4af7d3={},_0x490d14={},_0x4b62e1={'count':0x0,'rows':[]};var _0x29c8b8=_[_0x5f72('0x14')](db[_0x5f72('0x15')][_0x5f72('0x16')],function(_0x3428a6){return{'name':_0x3428a6[_0x5f72('0x17')],'type':_0x3428a6[_0x5f72('0x18')]['key']};});_0x490d14[_0x5f72('0x19')]=_[_0x5f72('0x14')](_0x29c8b8,_0x5f72('0x12'));_0x490d14[_0x5f72('0x1a')]=_[_0x5f72('0x1b')](_0x276323[_0x5f72('0x1a')]);_0x490d14[_0x5f72('0x1c')]=_[_0x5f72('0x1d')](_0x490d14[_0x5f72('0x19')],_0x490d14[_0x5f72('0x1a')]);_0x490d14[_0x5f72('0x1c')]=_['concat'](_0x490d14[_0x5f72('0x1c')],[_0x5f72('0x1e'),_0x5f72('0x1f'),_0x5f72('0x20'),'$gte',_0x5f72('0x21'),_0x5f72('0x22'),'$ne',_0x5f72('0x23'),_0x5f72('0x24'),_0x5f72('0x25'),'$notBetween','$in',_0x5f72('0x26'),_0x5f72('0x27'),_0x5f72('0x28'),_0x5f72('0x29'),_0x5f72('0x2a'),_0x5f72('0x27'),_0x5f72('0x2b'),'$contains',_0x5f72('0x2c'),'$any']);_0x4af7d3[_0x5f72('0x2d')]=_[_0x5f72('0x1d')](_0x490d14[_0x5f72('0x19')],qs[_0x5f72('0x2e')](_0x276323[_0x5f72('0x1a')]['fields']));_0x4af7d3['attributes']=_0x4af7d3[_0x5f72('0x2d')][_0x5f72('0x2f')]?_0x4af7d3[_0x5f72('0x2d')]:_0x490d14[_0x5f72('0x19')];if(!_0x276323[_0x5f72('0x1a')][_0x5f72('0x30')](_0x5f72('0x31'))){_0x4af7d3['limit']=qs[_0x5f72('0xb')](_0x276323[_0x5f72('0x1a')][_0x5f72('0xb')]);_0x4af7d3[_0x5f72('0x8')]=qs[_0x5f72('0x8')](_0x276323['query'][_0x5f72('0x8')]);}_0x4af7d3[_0x5f72('0x32')]=qs[_0x5f72('0x33')](_0x276323[_0x5f72('0x1a')][_0x5f72('0x33')]);_0x4af7d3[_0x5f72('0x34')]=qs['filters'](_['pick'](_0x276323[_0x5f72('0x1a')],_0x490d14[_0x5f72('0x1c')]),_0x29c8b8);if(_0x276323['query'][_0x5f72('0x35')]){_0x4af7d3[_0x5f72('0x34')]=_[_0x5f72('0x36')](_0x4af7d3[_0x5f72('0x34')],{'$or':_[_0x5f72('0x14')](_0x29c8b8,function(_0x2ca2ff){if(_0x2ca2ff[_0x5f72('0x18')]!==_0x5f72('0x37')){var _0x2e6b77={};_0x2e6b77[_0x2ca2ff[_0x5f72('0x12')]]={'$like':'%'+_0x276323[_0x5f72('0x1a')][_0x5f72('0x35')]+'%'};return _0x2e6b77;}})});}_0x4af7d3=_[_0x5f72('0x36')]({},_0x4af7d3,_0x276323[_0x5f72('0x38')]);var _0x52fab3={'where':_0x4af7d3[_0x5f72('0x34')]};return db['CmHopper']['count'](_0x52fab3)[_0x5f72('0x10')](function(_0x19b4fa){_0x4b62e1[_0x5f72('0xa')]=_0x19b4fa;if(_0x276323[_0x5f72('0x1a')][_0x5f72('0x39')]){_0x4af7d3[_0x5f72('0x3a')]=[{'all':!![]}];}return db['CmHopper'][_0x5f72('0x3b')](_0x4af7d3);})[_0x5f72('0x10')](function(_0x46f4ce){_0x4b62e1[_0x5f72('0x3c')]=_0x46f4ce;return _0x4b62e1;})[_0x5f72('0x10')](respondWithFilteredResult(_0x1497d4,_0x4af7d3))[_0x5f72('0x3d')](handleError(_0x1497d4,null));};exports[_0x5f72('0x3e')]=function(_0xc742c7,_0x2ef034){var _0x2b8549={'raw':!![],'where':{'id':_0xc742c7[_0x5f72('0x3f')]['id']}},_0x39c2af={};_0x39c2af[_0x5f72('0x19')]=_[_0x5f72('0x1b')](db[_0x5f72('0x15')]['rawAttributes']);_0x39c2af['query']=_[_0x5f72('0x1b')](_0xc742c7['query']);_0x39c2af['filters']=_[_0x5f72('0x1d')](_0x39c2af[_0x5f72('0x19')],_0x39c2af['query']);_0x2b8549[_0x5f72('0x2d')]=_[_0x5f72('0x1d')](_0x39c2af['model'],qs[_0x5f72('0x2e')](_0xc742c7[_0x5f72('0x1a')][_0x5f72('0x2e')]));_0x2b8549[_0x5f72('0x2d')]=_0x2b8549['attributes']['length']?_0x2b8549[_0x5f72('0x2d')]:_0x39c2af[_0x5f72('0x19')];if(_0xc742c7[_0x5f72('0x1a')][_0x5f72('0x39')]){_0x2b8549[_0x5f72('0x3a')]=[{'all':!![]}];}_0x2b8549=_[_0x5f72('0x36')]({},_0x2b8549,_0xc742c7[_0x5f72('0x38')]);return db['CmHopper'][_0x5f72('0x40')](_0x2b8549)[_0x5f72('0x10')](handleEntityNotFound(_0x2ef034,null))[_0x5f72('0x10')](respondWithResult(_0x2ef034,null))[_0x5f72('0x3d')](handleError(_0x2ef034,null));};exports['create']=function(_0x28e912,_0x357e5e){return db[_0x5f72('0x15')][_0x5f72('0x41')](_0x28e912['body'],{})[_0x5f72('0x10')](respondWithResult(_0x357e5e,0xc9))[_0x5f72('0x3d')](handleError(_0x357e5e,null));};exports[_0x5f72('0xf')]=function(_0xd38e5,_0x537287){if(_0xd38e5[_0x5f72('0x42')]['id']){delete _0xd38e5[_0x5f72('0x42')]['id'];}return db['CmHopper'][_0x5f72('0x40')]({'where':{'id':_0xd38e5[_0x5f72('0x3f')]['id']}})['then'](handleEntityNotFound(_0x537287,null))[_0x5f72('0x10')](saveUpdates(_0xd38e5[_0x5f72('0x42')],null))[_0x5f72('0x10')](respondWithResult(_0x537287,null))['catch'](handleError(_0x537287,null));};exports[_0x5f72('0x43')]=function(_0x5efa48,_0x30a9b6){return db[_0x5f72('0x15')]['describe']()[_0x5f72('0x10')](respondWithResult(_0x30a9b6,null))[_0x5f72('0x3d')](handleError(_0x30a9b6,null));};exports[_0x5f72('0x44')]=function(_0x302fff,_0x506774){var _0x41319a;var _0xff5cb5=_0x302fff[_0x5f72('0x3f')]['id'];return db[_0x5f72('0x15')]['find']({'where':{'id':_0x302fff[_0x5f72('0x3f')]['id']}})['then'](handleEntityNotFound(_0x506774,null))[_0x5f72('0x10')](function(_0x7dd3){if(_0x7dd3){return _0x7dd3[_0x5f72('0x44')]()[_0x5f72('0x10')](function(_0x142089){return _0x142089;});}})[_0x5f72('0x10')](function(_0x28008c){_0x41319a=_0x28008c;if(_0x28008c){if(_0x28008c[_0x5f72('0x45')]||_0x28008c[_0x5f72('0x46')]){return db[_0x28008c[_0x5f72('0x45')]?'VoiceQueue':_0x5f72('0x47')][_0x5f72('0x40')]({'where':{'id':_0x28008c[_0x5f72('0x45')]?_0x28008c[_0x5f72('0x45')]:_0x28008c[_0x5f72('0x46')]},'attributes':['id','name'],'raw':!![]});}}})[_0x5f72('0x10')](function(_0x6f9638){var _0x198609={};if(_0x6f9638){_[_0x5f72('0x36')](_0x198609,_[_0x5f72('0x48')](_0x41319a['dataValues'],['createdAt',_0x5f72('0x49'),'id']));_0x198609[_0x5f72('0x4a')]=0x15;_0x198609[_0x5f72('0x4b')]='deleted';_0x198609[_0x5f72('0x4c')]=_0x6f9638[_0x5f72('0x12')];_0x198609[_0x5f72('0x4d')]=_0x302fff['user'][_0x5f72('0x12')];_0x198609[_0x5f72('0x4e')]=_0x302fff['user']['id'];_0x198609['deleted']=!![];_0x198609[_0x5f72('0x4f')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x198609[_0x5f72('0x50')]=_0x41319a[_0x5f72('0x51')];_0x198609[_0x5f72('0x52')]=_0x41319a[_0x5f72('0x45')]?_0x5f72('0x53'):_0x5f72('0x54');return db[_0x5f72('0x55')]['find']({'where':{'id':_0x198609[_0x5f72('0x56')]},'attributes':['firstName',_0x5f72('0x57')]})[_0x5f72('0x10')](function(_0x48651e){if(!_[_0x5f72('0x58')](_0x506774)&&!_[_0x5f72('0x58')](_0x48651e[_0x5f72('0x59')])){_0x198609[_0x5f72('0x5a')]=_0x48651e[_0x5f72('0x59')];if(!_['isNil'](_0x48651e[_0x5f72('0x57')])){_0x198609[_0x5f72('0x5a')]+='\x20'+_0x48651e[_0x5f72('0x57')];}}})['finally'](function(){return db[_0x5f72('0x5b')][_0x5f72('0x41')](_0x198609);});}})[_0x5f72('0x10')](function(_0xb1e925){return db[_0x5f72('0x5c')][_0x5f72('0x44')]({'where':{'CmHopperId':_0xff5cb5}});})[_0x5f72('0x10')](function(){return _0x506774[_0x5f72('0xc')](0xcc)[_0x5f72('0x5d')]();})[_0x5f72('0x3d')](handleError(_0x506774,null));};exports[_0x5f72('0x5e')]=function(_0x554dcf,_0x56bfa2){var _0x2545fd=[];return db[_0x5f72('0x55')][_0x5f72('0x43')]()[_0x5f72('0x10')](function(_0xf1d356){_0x2545fd=_[_0x5f72('0x1b')](_0xf1d356);return _0x554dcf['user'][_0x5f72('0x5f')]({'where':{'type':_0x5f72('0x60'),'dialActive':!![],'dialMethod':_0x5f72('0x61')},'attributes':['id',_0x5f72('0x62'),'dialPreviewAutoRecallMe'],'raw':!![]});})[_0x5f72('0x10')](function(_0x5b119c){if(_0x5b119c&&_0x5b119c[_0x5f72('0x2f')]){return db[_0x5f72('0x63')][_0x5f72('0x64')](function(_0x6b865d){var _0x58b330={'active':![],'recallme':![],'scheduledAt':{'$lte':moment()[_0x5f72('0x65')](_0x5f72('0x66'))},'VoiceQueueId':{'$in':_[_0x5f72('0x14')](_0x5b119c,'id')},'$or':[{'UserId':null},{'UserId':_0x554dcf[_0x5f72('0x67')]['id']}]};var _0x59af10={'active':![],'recallme':!![],'VoiceQueueId':{'$in':_(_0x5b119c)['filter']([_0x5f72('0x68'),0x0])['map']('id')['value']()},'$or':[{'UserId':null},{'UserId':_0x554dcf[_0x5f72('0x67')]['id']}]};var _0x1ed9b1={'$or':[_0x58b330,_0x59af10]};var _0x2a5dcb=[];if(_0x554dcf['body'][_0x5f72('0x69')]&&_0x554dcf[_0x5f72('0x42')][_0x5f72('0x69')]===_0x5f72('0x6a')){if(!_[_0x5f72('0x6b')](_0x554dcf[_0x5f72('0x42')][_0x5f72('0x6c')])){_0x1ed9b1['id']={'$in':_0x554dcf[_0x5f72('0x42')][_0x5f72('0x6c')]};}_0x2a5dcb=[[_0x5f72('0x6d'),_0x5f72('0x6e')],[_0x5f72('0x6f'),_0x5b119c[0x0][_0x5f72('0x62')]==='ASC'?_0x5f72('0x70'):_0x5f72('0x6e')],db[_0x5f72('0x63')]['literal'](_0x5f72('0x71')),['id','DESC']];}else{if(!_['isEmpty'](_0x554dcf['body']['hopperIds'])){_0x1ed9b1['id']={'$notIn':_0x554dcf['body'][_0x5f72('0x6c')]};}_0x2a5dcb=[['priority','DESC'],[_0x5f72('0x6f'),_0x5b119c[0x0][_0x5f72('0x62')]],db[_0x5f72('0x63')][_0x5f72('0x72')](_0x5f72('0x73')),['id',_0x5f72('0x6e')]];}return db[_0x5f72('0x15')][_0x5f72('0x74')]({'attributes':['id','scheduledat',_0x5f72('0x51'),_0x5f72('0x75')],'where':_0x1ed9b1,'order':_0x2a5dcb,'transaction':_0x6b865d,'lock':_0x6b865d[_0x5f72('0x76')][_0x5f72('0x77')],'include':[{'model':db[_0x5f72('0x55')],'as':_0x5f72('0x78'),'attributes':_0x2545fd,'include':[{'model':db[_0x5f72('0x79')],'as':_0x5f72('0x7a'),'attributes':['id',_0x5f72('0x12')]}]},{'model':db[_0x5f72('0x7b')],'as':_0x5f72('0x7c'),'attributes':['id',_0x5f72('0x12')]},{'model':db[_0x5f72('0x7d')],'as':_0x5f72('0x7e'),'attributes':['id',_0x5f72('0x12'),'dialActive']}]})[_0x5f72('0x10')](function(_0x34ac8f){if(_0x34ac8f){return _0x34ac8f[_0x5f72('0xf')]({'UserId':_0x554dcf['user']['id']},{'transaction':_0x6b865d});}});});}})[_0x5f72('0x10')](handleEntityNotFound(_0x56bfa2,null))['then'](respondWithResult(_0x56bfa2,null))[_0x5f72('0x3d')](handleError(_0x56bfa2,null));};exports[_0x5f72('0x7f')]=function(_0x43cfc0,_0x4281b7,_0x4ee2f6){var _0x8886b4=[];var _0x1145a1=_0x43cfc0['params']['id'];var _0x32c4e3=_0x43cfc0[_0x5f72('0x67')]['id'];return db[_0x5f72('0x55')][_0x5f72('0x43')]()[_0x5f72('0x10')](function(_0x358ecb){_0x8886b4=_[_0x5f72('0x1b')](_0x358ecb);return db[_0x5f72('0x63')]['transaction'](function(_0x71d3c6){const _0x653bd0={'id':_0x1145a1};return db[_0x5f72('0x15')][_0x5f72('0x74')]({'attributes':['id',_0x5f72('0x80'),_0x5f72('0x75')],'where':_0x653bd0,'transaction':_0x71d3c6,'lock':_0x71d3c6[_0x5f72('0x76')][_0x5f72('0x77')],'include':[{'model':db['CmContact'],'as':_0x5f72('0x78'),'attributes':_0x8886b4,'include':[{'model':db[_0x5f72('0x79')],'as':_0x5f72('0x7a'),'attributes':['id','name']}]},{'model':db[_0x5f72('0x7b')],'as':_0x5f72('0x7c'),'attributes':['id',_0x5f72('0x12')]},{'model':db['VoiceQueue'],'as':_0x5f72('0x7e'),'attributes':['id',_0x5f72('0x12'),_0x5f72('0x81')]}]})[_0x5f72('0x10')](function(_0xc929da){if(_0xc929da){return _0xc929da[_0x5f72('0xf')]({'UserId':_0x32c4e3},{'transaction':_0x71d3c6});}});});})[_0x5f72('0x10')](handleEntityNotFound(_0x4281b7,null))['then'](respondWithResult(_0x4281b7,null))['catch'](handleError(_0x4281b7,null));};exports['getOpenContacts']=function(_0x4d2539,_0x4dd4f9){return _0x4d2539[_0x5f72('0x67')]['getVoiceQueues']({'where':{'type':_0x5f72('0x60'),'dialActive':!![],'dialMethod':_0x5f72('0x61')},'attributes':['id'],'raw':!![]})[_0x5f72('0x10')](function(_0x38a654){if(_0x38a654&&_0x38a654[_0x5f72('0x2f')]){return db[_0x5f72('0x15')][_0x5f72('0xa')]({'where':{'active':![],'recallme':![],'scheduledAt':{'$lte':moment()[_0x5f72('0x65')](_0x5f72('0x66'))},'VoiceQueueId':{'$in':_[_0x5f72('0x14')](_0x38a654,'id')},'$or':[{'UserId':null},{'UserId':_0x4d2539[_0x5f72('0x67')]['id']}]}});}return 0x0;})['then'](function(_0x1cccd9){if(!_[_0x5f72('0x58')](_0x1cccd9)&&_[_0x5f72('0x82')](_0x1cccd9)){return _0x4dd4f9[_0x5f72('0xc')](0xc8)['json']({'contacts':_0x1cccd9});}else{logger[_0x5f72('0x83')](_0x5f72('0x84'),'getOpenContacts',0x194,'entity\x20not\x20found');_0x4dd4f9['sendStatus'](0x194);}})[_0x5f72('0x3d')](handleError(_0x4dd4f9,null));};exports['getTimezones']=function(_0x5bde79,_0x5cd8dc){var _0x170c22=shared['timezones'];var _0x2b25e9=[];_['map'](_0x170c22,function(_0x39eaf8){_0x2b25e9[_0x5f72('0x85')]({'id':_0x39eaf8['name'],'name':_0x39eaf8[_0x5f72('0x12')],'utcOffset':_0x39eaf8['utcOffset']});});return _0x5cd8dc['status'](0xc8)[_0x5f72('0x7')]({'tz':_0x2b25e9});};exports['getTimezone']=function(_0x39e996,_0x5666eb){var _0x5b1a94=shared['timezones'];var _0x3572e3={};if(!_['isNil'](_0x5b1a94[_0x39e996['body']['id']]))_0x3572e3=_0x5b1a94[_0x39e996['body']['id']];return _0x5666eb['status'](0xc8)[_0x5f72('0x7')](_0x3572e3);};
\ No newline at end of file
index f6526f0..3a7c226 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xda19=['define','CmHopper','cm_hopper','scheduledat','priority','util','../../config/logger','moment','request-promise','rimraf','../../config/environment','./cmHopper.attributes','exports'];(function(_0x44946b,_0xf874ec){var _0x249bc4=function(_0x40a23e){while(--_0x40a23e){_0x44946b['push'](_0x44946b['shift']());}};_0x249bc4(++_0xf874ec);}(_0xda19,0xd5));var _0x9da1=function(_0x98eab9,_0x1f2132){_0x98eab9=_0x98eab9-0x0;var _0x238daa=_0xda19[_0x98eab9];return _0x238daa;};'use strict';var _=require('lodash');var util=require(_0x9da1('0x0'));var logger=require(_0x9da1('0x1'))('api');var moment=require(_0x9da1('0x2'));var BPromise=require('bluebird');var rp=require(_0x9da1('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x9da1('0x4'));var config=require(_0x9da1('0x5'));var attributes=require(_0x9da1('0x6'));module[_0x9da1('0x7')]=function(_0x156faf,_0x2dcbc6){return _0x156faf[_0x9da1('0x8')](_0x9da1('0x9'),attributes,{'tableName':_0x9da1('0xa'),'paranoid':![],'indexes':[{'name':_0x9da1('0xb'),'fields':['scheduledat']},{'name':'phone','fields':['phone']},{'name':_0x9da1('0xc'),'fields':['priority']}],'timestamps':!![]});};
\ No newline at end of file
+var _0x5fab=['./cmHopper.attributes','exports','CmHopper','cm_hopper','scheduledat','phone','priority','lodash','util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x989afb,_0x22b766){var _0x202f95=function(_0x1595d3){while(--_0x1595d3){_0x989afb['push'](_0x989afb['shift']());}};_0x202f95(++_0x22b766);}(_0x5fab,0x177));var _0xb5fa=function(_0x28278f,_0x574b0d){_0x28278f=_0x28278f-0x0;var _0x3d9f74=_0x5fab[_0x28278f];return _0x3d9f74;};'use strict';var _=require(_0xb5fa('0x0'));var util=require(_0xb5fa('0x1'));var logger=require('../../config/logger')(_0xb5fa('0x2'));var moment=require(_0xb5fa('0x3'));var BPromise=require(_0xb5fa('0x4'));var rp=require(_0xb5fa('0x5'));var fs=require('fs');var path=require(_0xb5fa('0x6'));var rimraf=require(_0xb5fa('0x7'));var config=require(_0xb5fa('0x8'));var attributes=require(_0xb5fa('0x9'));module[_0xb5fa('0xa')]=function(_0x44df89,_0x4a0249){return _0x44df89['define'](_0xb5fa('0xb'),attributes,{'tableName':_0xb5fa('0xc'),'paranoid':![],'indexes':[{'name':_0xb5fa('0xd'),'fields':['scheduledat']},{'name':_0xb5fa('0xe'),'fields':[_0xb5fa('0xe')]},{'name':_0xb5fa('0xf'),'fields':['priority']}],'timestamps':!![]});};
\ No newline at end of file
index 19b548d..026a0a0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1c76=['dialTimezone','DESC','getContactByPhone','ResetActiveCalls','CmHopperHandlePreviewRecallNotifications','literal','NOW()\x20+\x20INTERVAL\x20','\x20MINUTE','NOW()','CmList','List','lodash','util','../../mysqldb','../../config/logger','rpc','GetCmHopper','CmHopper','findAll','options','where','attributes','limit','include','map','model','then','info','debug','stringify','catch','error','message','ShowCmHopper','find','raw','CreateCmHopper','create','body','update','UpdateCmHopper','active','DestroyCmHopper','destroy','GetContactDialer','describe','sequelize','transaction','order','CmContact','Contact','keys','User','Agent','name','voicePause','length','push','includes','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]','CountReScheduled','COUNT','`scheduledat`\x20>=\x20','\x22%s\x22','format','YYYY-MM-DD\x20HH:mm:ss','contactsRescheduled','UserId','all','GetContactRecallMe','GetContactByPhone','findOne','phone'];(function(_0x6e3a96,_0xdd3dd4){var _0x1f57cb=function(_0x4f9aaa){while(--_0x4f9aaa){_0x6e3a96['push'](_0x6e3a96['shift']());}};_0x1f57cb(++_0xdd3dd4);}(_0x1c76,0x1d9));var _0x61c7=function(_0x1590b4,_0xa4b999){_0x1590b4=_0x1590b4-0x0;var _0x461a1a=_0x1c76[_0x1590b4];return _0x461a1a;};'use strict';var _=require(_0x61c7('0x0'));var util=require(_0x61c7('0x1'));var moment=require('moment');var BPromise=require('bluebird');var db=require(_0x61c7('0x2'))['db'];var logger=require(_0x61c7('0x3'))(_0x61c7('0x4'));exports[_0x61c7('0x5')]=function(_0x3c3514){var _0x10713a=this;return new Promise(function(_0x2a71db,_0x2d92ba){return db[_0x61c7('0x6')][_0x61c7('0x7')]({'raw':_0x3c3514[_0x61c7('0x8')]?_0x3c3514['options']['raw']===undefined?!![]:![]:!![],'where':_0x3c3514[_0x61c7('0x8')]?_0x3c3514[_0x61c7('0x8')][_0x61c7('0x9')]||null:null,'attributes':_0x3c3514['options']?_0x3c3514[_0x61c7('0x8')][_0x61c7('0xa')]||null:null,'limit':_0x3c3514[_0x61c7('0x8')]?_0x3c3514[_0x61c7('0x8')][_0x61c7('0xb')]||null:null,'include':_0x3c3514[_0x61c7('0x8')]?_0x3c3514[_0x61c7('0x8')][_0x61c7('0xc')]?_[_0x61c7('0xd')](_0x3c3514[_0x61c7('0x8')]['include'],function(_0x559187){return{'model':db[_0x559187[_0x61c7('0xe')]],'as':_0x559187['as'],'attributes':_0x559187[_0x61c7('0xa')],'include':_0x559187[_0x61c7('0xc')]?_[_0x61c7('0xd')](_0x559187[_0x61c7('0xc')],function(_0x529cfb){return{'model':db[_0x529cfb['model']],'as':_0x529cfb['as'],'attributes':_0x529cfb['attributes'],'include':_0x529cfb[_0x61c7('0xc')]?_[_0x61c7('0xd')](_0x529cfb[_0x61c7('0xc')],function(_0x5a0b86){return{'model':db[_0x5a0b86[_0x61c7('0xe')]],'as':_0x5a0b86['as'],'attributes':_0x5a0b86[_0x61c7('0xa')]};}):[]};}):[]};}):[]:[]})[_0x61c7('0xf')](function(_0x5c4641){logger[_0x61c7('0x10')]('GetCmHopper',_0x3c3514);logger[_0x61c7('0x11')](_0x61c7('0x5'),_0x3c3514,JSON[_0x61c7('0x12')](_0x5c4641));_0x2a71db(_0x5c4641);})[_0x61c7('0x13')](function(_0x10d7f3){logger[_0x61c7('0x14')](_0x61c7('0x5'),_0x10d7f3[_0x61c7('0x15')],_0x3c3514);_0x2d92ba(_0x10713a[_0x61c7('0x14')](0x1f4,_0x10d7f3[_0x61c7('0x15')]));});});};exports[_0x61c7('0x16')]=function(_0x30d634){var _0x1d1797=this;return new Promise(function(_0xf8e475,_0x4410e2){return db[_0x61c7('0x6')][_0x61c7('0x17')]({'raw':_0x30d634[_0x61c7('0x8')]?_0x30d634[_0x61c7('0x8')][_0x61c7('0x18')]===undefined?!![]:![]:!![],'where':_0x30d634[_0x61c7('0x8')]?_0x30d634['options'][_0x61c7('0x9')]||null:null,'attributes':_0x30d634[_0x61c7('0x8')]?_0x30d634[_0x61c7('0x8')]['attributes']||null:null,'include':_0x30d634[_0x61c7('0x8')]?_0x30d634[_0x61c7('0x8')][_0x61c7('0xc')]?_[_0x61c7('0xd')](_0x30d634[_0x61c7('0x8')]['include'],function(_0x1160bc){return{'model':db[_0x1160bc['model']],'as':_0x1160bc['as'],'attributes':_0x1160bc[_0x61c7('0xa')],'include':_0x1160bc[_0x61c7('0xc')]?_[_0x61c7('0xd')](_0x1160bc[_0x61c7('0xc')],function(_0xad9c27){return{'model':db[_0xad9c27[_0x61c7('0xe')]],'as':_0xad9c27['as'],'attributes':_0xad9c27[_0x61c7('0xa')],'include':_0xad9c27[_0x61c7('0xc')]?_[_0x61c7('0xd')](_0xad9c27[_0x61c7('0xc')],function(_0x437651){return{'model':db[_0x437651[_0x61c7('0xe')]],'as':_0x437651['as'],'attributes':_0x437651['attributes']};}):[]};}):[]};}):[]:[]})[_0x61c7('0xf')](function(_0x2491c0){logger[_0x61c7('0x10')](_0x61c7('0x16'),_0x30d634);logger['debug']('ShowCmHopper',_0x30d634,JSON[_0x61c7('0x12')](_0x2491c0));_0xf8e475(_0x2491c0);})['catch'](function(_0x2ccd55){logger[_0x61c7('0x14')]('ShowCmHopper',_0x2ccd55[_0x61c7('0x15')],_0x30d634);_0x4410e2(_0x1d1797[_0x61c7('0x14')](0x1f4,_0x2ccd55[_0x61c7('0x15')]));});});};exports[_0x61c7('0x19')]=function(_0x30acc7){var _0x104a77=this;return new Promise(function(_0x41ec13,_0xefee9c){return db[_0x61c7('0x6')][_0x61c7('0x1a')](_0x30acc7[_0x61c7('0x1b')],{'raw':_0x30acc7['options']?_0x30acc7[_0x61c7('0x8')][_0x61c7('0x18')]===undefined?!![]:![]:!![]})[_0x61c7('0xf')](function(_0xf3220d){logger[_0x61c7('0x10')](_0x61c7('0x19'),_0x30acc7);logger[_0x61c7('0x11')](_0x61c7('0x19'),_0x30acc7,JSON[_0x61c7('0x12')](_0xf3220d));_0x41ec13(_0xf3220d);})['catch'](function(_0x2979bc){logger['error']('CreateCmHopper',_0x2979bc['message'],_0x30acc7);_0xefee9c(_0x104a77[_0x61c7('0x14')](0x1f4,_0x2979bc[_0x61c7('0x15')]));});});};exports['UpdateCmHopper']=function(_0x311e0e){var _0x54e5fe=this;return new Promise(function(_0x5c194e,_0x5806f4){return db[_0x61c7('0x6')][_0x61c7('0x1c')](_0x311e0e[_0x61c7('0x1b')],{'raw':_0x311e0e[_0x61c7('0x8')]?_0x311e0e['options'][_0x61c7('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x311e0e[_0x61c7('0x8')]?_0x311e0e[_0x61c7('0x8')][_0x61c7('0x9')]||null:null,'attributes':_0x311e0e[_0x61c7('0x8')]?_0x311e0e[_0x61c7('0x8')][_0x61c7('0xa')]||null:null,'limit':_0x311e0e[_0x61c7('0x8')]?_0x311e0e[_0x61c7('0x8')][_0x61c7('0xb')]||null:null})[_0x61c7('0xf')](function(_0x2690a6){logger[_0x61c7('0x10')](_0x61c7('0x1d'),_0x311e0e);logger[_0x61c7('0x10')]('UpdateCmHopper\x20hopper\x20options\x20[%s]\x20active\x20status\x20[%s]',JSON['stringify'](_0x311e0e['options'][_0x61c7('0x9')]),_0x311e0e[_0x61c7('0x1b')][_0x61c7('0x1e')]);logger[_0x61c7('0x11')](_0x61c7('0x1d'),_0x311e0e,JSON[_0x61c7('0x12')](_0x2690a6));_0x5c194e(_0x2690a6);})[_0x61c7('0x13')](function(_0x365358){logger[_0x61c7('0x14')](_0x61c7('0x1d'),_0x365358[_0x61c7('0x15')],_0x311e0e);_0x5806f4(_0x54e5fe['error'](0x1f4,_0x365358['message']));});});};exports[_0x61c7('0x1f')]=function(_0x21c311){var _0x204481=this;return new Promise(function(_0x15427b,_0x18253b){return db[_0x61c7('0x6')][_0x61c7('0x20')]({'where':_0x21c311[_0x61c7('0x8')]?_0x21c311['options'][_0x61c7('0x9')]||null:null})[_0x61c7('0xf')](function(_0x3920cf){logger['info'](_0x61c7('0x1f'),_0x21c311);logger['debug']('DestroyCmHopper',_0x21c311,JSON[_0x61c7('0x12')](_0x3920cf));_0x15427b(_0x3920cf);})[_0x61c7('0x13')](function(_0x5ef1d2){logger[_0x61c7('0x14')]('DestroyCmHopper',_0x5ef1d2[_0x61c7('0x15')],_0x21c311);_0x18253b(_0x204481[_0x61c7('0x14')](0x1f4,_0x5ef1d2[_0x61c7('0x15')]));});});};exports[_0x61c7('0x21')]=function(_0x266e45){var _0x51b689=this;return new Promise(function(_0x2d980f,_0x480751){return db['CmContact'][_0x61c7('0x22')]()[_0x61c7('0xf')](function(_0x688133){return db[_0x61c7('0x23')][_0x61c7('0x24')](function(_0x2350d4){return db[_0x61c7('0x6')][_0x61c7('0x7')]({'where':_0x266e45['options']?_0x266e45[_0x61c7('0x8')][_0x61c7('0x9')]||null:null,'attributes':_0x266e45[_0x61c7('0x8')]?_0x266e45[_0x61c7('0x8')][_0x61c7('0xa')]||null:null,'limit':_0x266e45[_0x61c7('0x8')]?_0x266e45[_0x61c7('0x8')][_0x61c7('0xb')]||null:null,'order':_0x266e45['options']?_0x266e45[_0x61c7('0x8')][_0x61c7('0x25')]||null:null,'transaction':_0x2350d4,'lock':_0x2350d4['LOCK']['UPDATE'],'include':[{'model':db[_0x61c7('0x26')],'as':_0x61c7('0x27'),'attributes':_[_0x61c7('0x28')](_0x688133)},{'model':db[_0x61c7('0x29')],'as':_0x61c7('0x2a'),'attributes':['id',_0x61c7('0x2b'),_0x61c7('0x2c')]}]})['then'](function(_0x54143c){var _0x52727f=[];var _0x545b19=[];for(var _0x13a31f=0x0;_0x13a31f<_0x54143c[_0x61c7('0x2d')];_0x13a31f+=0x1){var _0x3039a6=_0x54143c[_0x13a31f]['UserId'];if(_0x3039a6===null){_0x52727f[_0x61c7('0x2e')](_0x54143c[_0x13a31f][_0x61c7('0x1c')](_0x266e45['body'],{'transaction':_0x2350d4}));}else if(!_0x545b19[_0x61c7('0x2f')](_0x3039a6)){_0x545b19[_0x61c7('0x2e')](_0x3039a6);_0x52727f['push'](_0x54143c[_0x13a31f][_0x61c7('0x1c')](_0x266e45[_0x61c7('0x1b')],{'transaction':_0x2350d4}));}}return BPromise['all'](_0x52727f);});})[_0x61c7('0xf')](function(_0x3cb95f){logger[_0x61c7('0x10')](_0x61c7('0x21'),_0x266e45);if(_0x3cb95f['length']>0x0){logger['info'](_0x61c7('0x30'),_0x3cb95f[0x0][_0x61c7('0x31')]['id'],_0x3cb95f[0x0][_0x61c7('0x31')]['ContactId'],_0x3cb95f[0x0]['dataValues']['active']);}logger[_0x61c7('0x11')](_0x61c7('0x21'),_0x266e45,JSON[_0x61c7('0x12')](_0x3cb95f));_0x2d980f(_0x3cb95f);})[_0x61c7('0x13')](function(_0x2a7808){logger['error'](_0x61c7('0x21'),_0x2a7808['message'],_0x266e45);_0x480751(_0x51b689[_0x61c7('0x14')](0x1f4,_0x2a7808['message']));});});});};exports[_0x61c7('0x32')]=function(_0xb703ee){var _0x4e4d50=this;return new Promise(function(_0x3df3d8,_0x1574ad){return db[_0x61c7('0x23')][_0x61c7('0x24')](function(_0x2f3fc8){return db[_0x61c7('0x33')][_0x61c7('0x1a')](_0xb703ee[_0x61c7('0x1b')],{'raw':_0xb703ee[_0x61c7('0x8')]?_0xb703ee[_0x61c7('0x8')]['raw']===undefined?!![]:![]:!![],'transaction':_0x2f3fc8})[_0x61c7('0xf')](function(){logger[_0x61c7('0x10')](_0x61c7('0x34'),JSON[_0x61c7('0x12')](_0xb703ee[_0x61c7('0x8')][_0x61c7('0x9')]),_0xb703ee[_0x61c7('0x8')][_0x61c7('0x9')]['active']);return db[_0x61c7('0x6')]['destroy']({'where':_0xb703ee[_0x61c7('0x8')]?_0xb703ee['options'][_0x61c7('0x9')]||null:null,'transaction':_0x2f3fc8});});})[_0x61c7('0xf')](function(_0x1ae8d2){logger[_0x61c7('0x10')](_0x61c7('0x32'),_0xb703ee);logger['debug'](_0x61c7('0x32'),_0xb703ee,JSON[_0x61c7('0x12')](_0x1ae8d2));_0x3df3d8(_0x1ae8d2);})['catch'](function(_0x5346b4){logger[_0x61c7('0x14')](_0x61c7('0x32'),_0x5346b4[_0x61c7('0x15')],_0xb703ee);_0x1574ad(_0x4e4d50[_0x61c7('0x14')](0x1f4,_0x5346b4[_0x61c7('0x15')]));});});};exports[_0x61c7('0x35')]=function(_0x13b3c1){var _0x4f3d79=this;return new Promise(function(_0x284f9e,_0x404a71){return db[_0x61c7('0x6')]['findAll']({'raw':_0x13b3c1['options']?_0x13b3c1[_0x61c7('0x8')]['raw']===undefined?!![]:![]:!![],'where':_0x13b3c1[_0x61c7('0x8')]?_0x13b3c1[_0x61c7('0x8')][_0x61c7('0x9')]||null:null,'attributes':[[db[_0x61c7('0x23')]['fn'](_0x61c7('0x36'),db['sequelize']['fn']('IF',db['sequelize']['literal'](_0x61c7('0x37')+util['format'](_0x61c7('0x38'),moment()[_0x61c7('0x39')](_0x61c7('0x3a')))+'\x20,\x201,\x20null'))),_0x61c7('0x3b')]]})[_0x61c7('0xf')](function(_0x37ce82){logger['info'](_0x61c7('0x35'),_0x13b3c1);logger['debug']('CountReScheduled',_0x13b3c1,JSON['stringify'](_0x37ce82));_0x284f9e(_0x37ce82);})['catch'](function(_0x30235d){logger[_0x61c7('0x14')](_0x61c7('0x35'),_0x30235d[_0x61c7('0x15')],_0x13b3c1);_0x404a71(_0x4f3d79[_0x61c7('0x14')](0x1f4,_0x30235d[_0x61c7('0x15')]));});});};exports['GetContactRecallMe']=function(_0x4650fe){var _0x458e2d=this;return new Promise(function(_0x5e1602,_0x372d32){return db[_0x61c7('0x26')]['describe']()['then'](function(){return db[_0x61c7('0x23')]['transaction'](function(_0x13374a){return db[_0x61c7('0x6')][_0x61c7('0x7')]({'where':_0x4650fe[_0x61c7('0x8')]?_0x4650fe[_0x61c7('0x8')][_0x61c7('0x9')]||null:null,'attributes':_0x4650fe[_0x61c7('0x8')]?_0x4650fe[_0x61c7('0x8')][_0x61c7('0xa')]||null:null,'limit':0x1,'order':_0x4650fe[_0x61c7('0x8')]?_0x4650fe[_0x61c7('0x8')][_0x61c7('0x25')]||null:null,'group':db[_0x61c7('0x6')][_0x61c7('0x3c')],'transaction':_0x13374a,'lock':_0x13374a['LOCK']['UPDATE'],'include':_0x4650fe[_0x61c7('0x8')]?_0x4650fe[_0x61c7('0x8')][_0x61c7('0xc')]?_['map'](_0x4650fe['options']['include'],function(_0x1fbb5b){return{'model':db[_0x1fbb5b[_0x61c7('0xe')]],'as':_0x1fbb5b['as'],'attributes':_0x1fbb5b[_0x61c7('0xa')],'include':_0x1fbb5b[_0x61c7('0xc')]?_[_0x61c7('0xd')](_0x1fbb5b[_0x61c7('0xc')],function(_0x56aac0){return{'model':db[_0x56aac0[_0x61c7('0xe')]],'as':_0x56aac0['as'],'attributes':_0x56aac0[_0x61c7('0xa')],'include':_0x56aac0[_0x61c7('0xc')]?_[_0x61c7('0xd')](_0x56aac0[_0x61c7('0xc')],function(_0x2a49ce){return{'model':db[_0x2a49ce[_0x61c7('0xe')]],'as':_0x2a49ce['as'],'attributes':_0x2a49ce[_0x61c7('0xa')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x39922b){var _0x1ef0b3=[];for(var _0x3744b9=0x0;_0x3744b9<_0x39922b[_0x61c7('0x2d')];_0x3744b9+=0x1){_0x1ef0b3[_0x61c7('0x2e')](_0x39922b[_0x3744b9][_0x61c7('0x1c')](_0x4650fe['body'],{'transaction':_0x13374a}));}return BPromise[_0x61c7('0x3d')](_0x1ef0b3);});})[_0x61c7('0xf')](function(_0x19aeb5){logger[_0x61c7('0x10')](_0x61c7('0x3e'),_0x4650fe);logger[_0x61c7('0x11')](_0x61c7('0x3e'),_0x4650fe,JSON[_0x61c7('0x12')](_0x19aeb5));_0x5e1602(_0x19aeb5);})[_0x61c7('0x13')](function(_0x390b53){logger[_0x61c7('0x14')](_0x61c7('0x3e'),_0x390b53[_0x61c7('0x15')],_0x4650fe);_0x372d32(_0x458e2d[_0x61c7('0x14')](0x1f4,_0x390b53[_0x61c7('0x15')]));});});});};exports['GetCmHopperPreview']=function(_0x493bb8){var _0x4e981f=this;return new Promise(function(_0x1726bb,_0xbceb50){db['CmContact'][_0x61c7('0x22')]()[_0x61c7('0xf')](function(_0xb42f2f){return db[_0x61c7('0x6')][_0x61c7('0x7')]({'raw':_0x493bb8[_0x61c7('0x8')]?_0x493bb8[_0x61c7('0x8')]['raw']===undefined?!![]:![]:!![],'where':_0x493bb8[_0x61c7('0x8')]?_0x493bb8['options'][_0x61c7('0x9')]||null:null,'attributes':_0x493bb8[_0x61c7('0x8')]?_0x493bb8[_0x61c7('0x8')]['attributes']||null:null,'limit':_0x493bb8['options']?_0x493bb8['options'][_0x61c7('0xb')]||null:null,'include':_0x493bb8[_0x61c7('0x8')]?_0x493bb8[_0x61c7('0x8')][_0x61c7('0xc')]?_[_0x61c7('0xd')](_0x493bb8['options'][_0x61c7('0xc')],function(_0x4eacb7){return{'model':db[_0x4eacb7[_0x61c7('0xe')]],'as':_0x4eacb7['as'],'attributes':_0x4eacb7['as']===_0x61c7('0x27')?_[_0x61c7('0x28')](_0xb42f2f):_0x4eacb7[_0x61c7('0xa')],'include':_0x4eacb7[_0x61c7('0xc')]?_['map'](_0x4eacb7[_0x61c7('0xc')],function(_0x5270f0){return{'model':db[_0x5270f0[_0x61c7('0xe')]],'as':_0x5270f0['as'],'attributes':_0x5270f0[_0x61c7('0xa')],'include':_0x5270f0[_0x61c7('0xc')]?_[_0x61c7('0xd')](_0x5270f0['include'],function(_0x4233ba){return{'model':db[_0x4233ba[_0x61c7('0xe')]],'as':_0x4233ba['as'],'attributes':_0x4233ba[_0x61c7('0xa')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5d42ae){logger[_0x61c7('0x10')]('GetCmHopper',_0x493bb8);logger['debug'](_0x61c7('0x5'),_0x493bb8,JSON[_0x61c7('0x12')](_0x5d42ae));_0x1726bb(_0x5d42ae);})[_0x61c7('0x13')](function(_0x4456b8){logger[_0x61c7('0x14')]('GetCmHopper',_0x4456b8[_0x61c7('0x15')],_0x493bb8);_0xbceb50(_0x4e981f[_0x61c7('0x14')](0x1f4,_0x4456b8[_0x61c7('0x15')]));});});});};exports[_0x61c7('0x3f')]=function(_0x7d8e7a){var _0x327161=this;return new Promise(function(_0x169e4b,_0x3f8f7e){return db['CmContact'][_0x61c7('0x40')]({'raw':!![],'where':{'phone':_0x7d8e7a[_0x61c7('0x8')][_0x61c7('0x9')][_0x61c7('0x41')]},'attributes':['id',_0x61c7('0x42')],'order':[['id',_0x61c7('0x43')]]})[_0x61c7('0xf')](function(_0x5a970d){logger[_0x61c7('0x10')](_0x61c7('0x44'),_0x7d8e7a);logger[_0x61c7('0x11')]('getContactByPhone',_0x7d8e7a,JSON[_0x61c7('0x12')](_0x5a970d));_0x169e4b(_0x5a970d);})[_0x61c7('0x13')](function(_0x5d7109){logger[_0x61c7('0x14')](_0x61c7('0x44'),_0x5d7109[_0x61c7('0x15')],_0x7d8e7a);_0x3f8f7e(_0x327161['error'](0x1f4,_0x5d7109['message']));});});};exports[_0x61c7('0x45')]=function(_0x42d1df){var _0x2d7dbf=this;return new Promise(function(_0x2d1707,_0x8040ab){return db[_0x61c7('0x23')][_0x61c7('0x24')](function(_0x1b2188){var _0x1b8660=_0x42d1df[_0x61c7('0x8')]&&_0x42d1df[_0x61c7('0x8')]['where']?_0x42d1df['options'][_0x61c7('0x9')]:{};return db[_0x61c7('0x6')][_0x61c7('0x1c')](_0x42d1df[_0x61c7('0x1b')],{'where':_0x1b8660,'transaction':_0x1b2188})[_0x61c7('0xf')](function(_0x1bb389){logger[_0x61c7('0x10')]('ResetActiveCalls',_0x42d1df);logger[_0x61c7('0x11')]('ResetActiveCalls',_0x42d1df,JSON[_0x61c7('0x12')](_0x1bb389));_0x2d1707(_0x1bb389);})['catch'](function(_0x10d747){logger[_0x61c7('0x14')](_0x61c7('0x45'),_0x10d747['message'],_0x42d1df);_0x8040ab(_0x2d7dbf[_0x61c7('0x14')](0x1f4,_0x10d747[_0x61c7('0x15')]));});});});};exports[_0x61c7('0x46')]=function(_0x2a5c41){var _0x538edc=this;var _0x28c50e=_0x2a5c41[_0x61c7('0x1b')][_0x61c7('0x9')]['voiceQueueIds'];var _0x28c8c0=_0x2a5c41[_0x61c7('0x1b')]['where']['interval'];var _0x569010=_0x2a5c41[_0x61c7('0x1b')][_0x61c7('0x9')]['availableAgentsIds'];return new Promise(function(_0x3b0cc9,_0x4fe46b){return db[_0x61c7('0x6')][_0x61c7('0x7')]({'where':{'voiceQueueId':{'$in':_0x28c50e},'recallme':0x1,'active':0x0,'recallmeNotifiedDate':{'$eq':null},'scheduledat':{'$and':{'$lte':db['sequelize'][_0x61c7('0x47')](_0x61c7('0x48')+_0x28c8c0+_0x61c7('0x49')),'$gt':db[_0x61c7('0x23')][_0x61c7('0x47')](_0x61c7('0x4a'))}},'UserId':{'$in':_0x569010}},'include':[{'model':db[_0x61c7('0x26')],'as':'Contact'},{'model':db[_0x61c7('0x29')],'as':_0x61c7('0x2a'),'attributes':['id','name',_0x61c7('0x2c')]},{'model':db[_0x61c7('0x4b')],'as':_0x61c7('0x4c')}]})['then'](function(_0x1c4a00){if(_0x1c4a00[_0x61c7('0x2d')]>0x0){return db[_0x61c7('0x23')]['transaction'](function(_0x4f0e1a){return db['CmHopper'][_0x61c7('0x1c')]({'recallmeNotifiedDate':db[_0x61c7('0x23')][_0x61c7('0x47')](_0x61c7('0x4a'))},{'where':{'id':{'$in':_[_0x61c7('0xd')](_0x1c4a00,'id')}},'transaction':_0x4f0e1a})['then'](function(){_0x3b0cc9(_0x1c4a00);})[_0x61c7('0x13')](function(_0x296b03){logger['error'](_0x61c7('0x46'),_0x296b03['message'],_0x2a5c41);_0x4fe46b(_0x538edc[_0x61c7('0x14')](0x1f4,_0x296b03['message']));});})[_0x61c7('0x13')](function(_0x5416bf){logger[_0x61c7('0x14')](_0x61c7('0x46'),_0x5416bf[_0x61c7('0x15')],_0x2a5c41);_0x4fe46b(_0x538edc['error'](0x1f4,_0x5416bf[_0x61c7('0x15')]));});}else{_0x3b0cc9(_0x1c4a00);}});});};
\ No newline at end of file
+var _0xa9e1=['CmContact','describe','sequelize','transaction','limit','order','LOCK','UPDATE','Contact','keys','User','Agent','name','length','UserId','push','includes','GetContactDialer\x20hopperId\x20[%s]\x20-\x20contactId\x20[%s]\x20-\x20active\x20status\x20[%s]','dataValues','MoveContactManagedDialer','CmHopperFinal','destroy','CountReScheduled','COUNT','`scheduledat`\x20>=\x20','format','\x22%s\x22','YYYY-MM-DD\x20HH:mm:ss','all','GetContactRecallMe','GetContactByPhone','findOne','dialTimezone','getContactByPhone','ResetActiveCalls','CmHopperHandlePreviewRecallNotifications','voiceQueueIds','availableAgentsIds','literal','NOW()\x20+\x20INTERVAL\x20','\x20MINUTE','NOW()','voicePause','CmList','List','lodash','util','bluebird','../../mysqldb','../../config/logger','GetCmHopper','CmHopper','findAll','options','raw','where','attributes','include','model','map','then','debug','catch','error','message','ShowCmHopper','find','info','stringify','CreateCmHopper','create','body','UpdateCmHopper','update','active','DestroyCmHopper','GetContactDialer'];(function(_0x1449c6,_0x9cd082){var _0x1ea3bd=function(_0x1a641d){while(--_0x1a641d){_0x1449c6['push'](_0x1449c6['shift']());}};_0x1ea3bd(++_0x9cd082);}(_0xa9e1,0x7a));var _0x1a9e=function(_0x4c06a3,_0x1e6b6f){_0x4c06a3=_0x4c06a3-0x0;var _0x7ff53c=_0xa9e1[_0x4c06a3];return _0x7ff53c;};'use strict';var _=require(_0x1a9e('0x0'));var util=require(_0x1a9e('0x1'));var moment=require('moment');var BPromise=require(_0x1a9e('0x2'));var db=require(_0x1a9e('0x3'))['db'];var logger=require(_0x1a9e('0x4'))('rpc');exports[_0x1a9e('0x5')]=function(_0x480e85){var _0x41dd4f=this;return new Promise(function(_0x4db6c5,_0x203050){return db[_0x1a9e('0x6')][_0x1a9e('0x7')]({'raw':_0x480e85[_0x1a9e('0x8')]?_0x480e85[_0x1a9e('0x8')][_0x1a9e('0x9')]===undefined?!![]:![]:!![],'where':_0x480e85[_0x1a9e('0x8')]?_0x480e85[_0x1a9e('0x8')][_0x1a9e('0xa')]||null:null,'attributes':_0x480e85[_0x1a9e('0x8')]?_0x480e85['options'][_0x1a9e('0xb')]||null:null,'limit':_0x480e85['options']?_0x480e85['options']['limit']||null:null,'include':_0x480e85[_0x1a9e('0x8')]?_0x480e85['options'][_0x1a9e('0xc')]?_['map'](_0x480e85['options'][_0x1a9e('0xc')],function(_0x5159a4){return{'model':db[_0x5159a4[_0x1a9e('0xd')]],'as':_0x5159a4['as'],'attributes':_0x5159a4['attributes'],'include':_0x5159a4[_0x1a9e('0xc')]?_[_0x1a9e('0xe')](_0x5159a4[_0x1a9e('0xc')],function(_0x31ac0b){return{'model':db[_0x31ac0b[_0x1a9e('0xd')]],'as':_0x31ac0b['as'],'attributes':_0x31ac0b[_0x1a9e('0xb')],'include':_0x31ac0b[_0x1a9e('0xc')]?_[_0x1a9e('0xe')](_0x31ac0b['include'],function(_0x2beade){return{'model':db[_0x2beade[_0x1a9e('0xd')]],'as':_0x2beade['as'],'attributes':_0x2beade[_0x1a9e('0xb')]};}):[]};}):[]};}):[]:[]})[_0x1a9e('0xf')](function(_0x1d50e7){logger['info'](_0x1a9e('0x5'),_0x480e85);logger[_0x1a9e('0x10')](_0x1a9e('0x5'),_0x480e85,JSON['stringify'](_0x1d50e7));_0x4db6c5(_0x1d50e7);})[_0x1a9e('0x11')](function(_0x3676d0){logger[_0x1a9e('0x12')](_0x1a9e('0x5'),_0x3676d0[_0x1a9e('0x13')],_0x480e85);_0x203050(_0x41dd4f[_0x1a9e('0x12')](0x1f4,_0x3676d0['message']));});});};exports[_0x1a9e('0x14')]=function(_0x5598dc){var _0x3225a0=this;return new Promise(function(_0x1626c4,_0x89a640){return db[_0x1a9e('0x6')][_0x1a9e('0x15')]({'raw':_0x5598dc[_0x1a9e('0x8')]?_0x5598dc['options'][_0x1a9e('0x9')]===undefined?!![]:![]:!![],'where':_0x5598dc[_0x1a9e('0x8')]?_0x5598dc[_0x1a9e('0x8')][_0x1a9e('0xa')]||null:null,'attributes':_0x5598dc[_0x1a9e('0x8')]?_0x5598dc[_0x1a9e('0x8')][_0x1a9e('0xb')]||null:null,'include':_0x5598dc[_0x1a9e('0x8')]?_0x5598dc[_0x1a9e('0x8')]['include']?_[_0x1a9e('0xe')](_0x5598dc['options'][_0x1a9e('0xc')],function(_0x38af8d){return{'model':db[_0x38af8d[_0x1a9e('0xd')]],'as':_0x38af8d['as'],'attributes':_0x38af8d[_0x1a9e('0xb')],'include':_0x38af8d[_0x1a9e('0xc')]?_[_0x1a9e('0xe')](_0x38af8d[_0x1a9e('0xc')],function(_0x54ba8e){return{'model':db[_0x54ba8e[_0x1a9e('0xd')]],'as':_0x54ba8e['as'],'attributes':_0x54ba8e[_0x1a9e('0xb')],'include':_0x54ba8e['include']?_['map'](_0x54ba8e[_0x1a9e('0xc')],function(_0x111abd){return{'model':db[_0x111abd[_0x1a9e('0xd')]],'as':_0x111abd['as'],'attributes':_0x111abd[_0x1a9e('0xb')]};}):[]};}):[]};}):[]:[]})[_0x1a9e('0xf')](function(_0x3acd58){logger[_0x1a9e('0x16')](_0x1a9e('0x14'),_0x5598dc);logger[_0x1a9e('0x10')](_0x1a9e('0x14'),_0x5598dc,JSON[_0x1a9e('0x17')](_0x3acd58));_0x1626c4(_0x3acd58);})[_0x1a9e('0x11')](function(_0x265f8d){logger[_0x1a9e('0x12')]('ShowCmHopper',_0x265f8d[_0x1a9e('0x13')],_0x5598dc);_0x89a640(_0x3225a0['error'](0x1f4,_0x265f8d[_0x1a9e('0x13')]));});});};exports[_0x1a9e('0x18')]=function(_0xc8a16a){var _0x3e88f6=this;return new Promise(function(_0x2a95c3,_0xaee42a){return db['CmHopper'][_0x1a9e('0x19')](_0xc8a16a[_0x1a9e('0x1a')],{'raw':_0xc8a16a[_0x1a9e('0x8')]?_0xc8a16a[_0x1a9e('0x8')][_0x1a9e('0x9')]===undefined?!![]:![]:!![]})['then'](function(_0x1c7059){logger[_0x1a9e('0x16')](_0x1a9e('0x18'),_0xc8a16a);logger[_0x1a9e('0x10')](_0x1a9e('0x18'),_0xc8a16a,JSON['stringify'](_0x1c7059));_0x2a95c3(_0x1c7059);})['catch'](function(_0x55a048){logger[_0x1a9e('0x12')](_0x1a9e('0x18'),_0x55a048[_0x1a9e('0x13')],_0xc8a16a);_0xaee42a(_0x3e88f6['error'](0x1f4,_0x55a048[_0x1a9e('0x13')]));});});};exports[_0x1a9e('0x1b')]=function(_0x5503b4){var _0x2574fa=this;return new Promise(function(_0x119f76,_0x5abb67){return db['CmHopper'][_0x1a9e('0x1c')](_0x5503b4[_0x1a9e('0x1a')],{'raw':_0x5503b4[_0x1a9e('0x8')]?_0x5503b4['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5503b4[_0x1a9e('0x8')]?_0x5503b4[_0x1a9e('0x8')]['where']||null:null,'attributes':_0x5503b4[_0x1a9e('0x8')]?_0x5503b4[_0x1a9e('0x8')]['attributes']||null:null,'limit':_0x5503b4[_0x1a9e('0x8')]?_0x5503b4[_0x1a9e('0x8')]['limit']||null:null})[_0x1a9e('0xf')](function(_0x18a726){logger[_0x1a9e('0x16')]('UpdateCmHopper',_0x5503b4);logger[_0x1a9e('0x16')]('UpdateCmHopper\x20hopper\x20options\x20[%s]\x20active\x20status\x20[%s]',JSON[_0x1a9e('0x17')](_0x5503b4[_0x1a9e('0x8')][_0x1a9e('0xa')]),_0x5503b4[_0x1a9e('0x1a')][_0x1a9e('0x1d')]);logger['debug']('UpdateCmHopper',_0x5503b4,JSON[_0x1a9e('0x17')](_0x18a726));_0x119f76(_0x18a726);})[_0x1a9e('0x11')](function(_0x468f82){logger[_0x1a9e('0x12')]('UpdateCmHopper',_0x468f82[_0x1a9e('0x13')],_0x5503b4);_0x5abb67(_0x2574fa[_0x1a9e('0x12')](0x1f4,_0x468f82[_0x1a9e('0x13')]));});});};exports[_0x1a9e('0x1e')]=function(_0x9b6078){var _0xeb3e58=this;return new Promise(function(_0xfe59fd,_0x10823d){return db[_0x1a9e('0x6')]['destroy']({'where':_0x9b6078[_0x1a9e('0x8')]?_0x9b6078['options'][_0x1a9e('0xa')]||null:null})[_0x1a9e('0xf')](function(_0xaf42ab){logger[_0x1a9e('0x16')](_0x1a9e('0x1e'),_0x9b6078);logger['debug'](_0x1a9e('0x1e'),_0x9b6078,JSON['stringify'](_0xaf42ab));_0xfe59fd(_0xaf42ab);})[_0x1a9e('0x11')](function(_0x65f153){logger[_0x1a9e('0x12')]('DestroyCmHopper',_0x65f153[_0x1a9e('0x13')],_0x9b6078);_0x10823d(_0xeb3e58[_0x1a9e('0x12')](0x1f4,_0x65f153['message']));});});};exports[_0x1a9e('0x1f')]=function(_0xee35bb){var _0x3247ea=this;return new Promise(function(_0x3fbb7f,_0x5c4a4f){return db[_0x1a9e('0x20')][_0x1a9e('0x21')]()[_0x1a9e('0xf')](function(_0x57721c){return db[_0x1a9e('0x22')][_0x1a9e('0x23')](function(_0x294ec3){return db[_0x1a9e('0x6')][_0x1a9e('0x7')]({'where':_0xee35bb[_0x1a9e('0x8')]?_0xee35bb[_0x1a9e('0x8')][_0x1a9e('0xa')]||null:null,'attributes':_0xee35bb[_0x1a9e('0x8')]?_0xee35bb[_0x1a9e('0x8')]['attributes']||null:null,'limit':_0xee35bb[_0x1a9e('0x8')]?_0xee35bb[_0x1a9e('0x8')][_0x1a9e('0x24')]||null:null,'order':_0xee35bb[_0x1a9e('0x8')]?_0xee35bb['options'][_0x1a9e('0x25')]||null:null,'transaction':_0x294ec3,'lock':_0x294ec3[_0x1a9e('0x26')][_0x1a9e('0x27')],'include':[{'model':db[_0x1a9e('0x20')],'as':_0x1a9e('0x28'),'attributes':_[_0x1a9e('0x29')](_0x57721c)},{'model':db[_0x1a9e('0x2a')],'as':_0x1a9e('0x2b'),'attributes':['id',_0x1a9e('0x2c'),'voicePause']}]})[_0x1a9e('0xf')](function(_0x5aed8e){var _0x557fc9=[];var _0x3d903c=[];for(var _0x157ec9=0x0;_0x157ec9<_0x5aed8e[_0x1a9e('0x2d')];_0x157ec9+=0x1){var _0x18898b=_0x5aed8e[_0x157ec9][_0x1a9e('0x2e')];if(_0x18898b===null){_0x557fc9[_0x1a9e('0x2f')](_0x5aed8e[_0x157ec9][_0x1a9e('0x1c')](_0xee35bb['body'],{'transaction':_0x294ec3}));}else if(!_0x3d903c[_0x1a9e('0x30')](_0x18898b)){_0x3d903c[_0x1a9e('0x2f')](_0x18898b);_0x557fc9[_0x1a9e('0x2f')](_0x5aed8e[_0x157ec9][_0x1a9e('0x1c')](_0xee35bb[_0x1a9e('0x1a')],{'transaction':_0x294ec3}));}}return BPromise['all'](_0x557fc9);});})['then'](function(_0x1fee96){logger['info']('GetContactDialer',_0xee35bb);if(_0x1fee96[_0x1a9e('0x2d')]>0x0){logger[_0x1a9e('0x16')](_0x1a9e('0x31'),_0x1fee96[0x0][_0x1a9e('0x32')]['id'],_0x1fee96[0x0][_0x1a9e('0x32')]['ContactId'],_0x1fee96[0x0]['dataValues']['active']);}logger[_0x1a9e('0x10')]('GetContactDialer',_0xee35bb,JSON[_0x1a9e('0x17')](_0x1fee96));_0x3fbb7f(_0x1fee96);})[_0x1a9e('0x11')](function(_0x49287d){logger[_0x1a9e('0x12')](_0x1a9e('0x1f'),_0x49287d[_0x1a9e('0x13')],_0xee35bb);_0x5c4a4f(_0x3247ea[_0x1a9e('0x12')](0x1f4,_0x49287d['message']));});});});};exports[_0x1a9e('0x33')]=function(_0xbc416b){var _0x50327e=this;return new Promise(function(_0x434fbc,_0x5723ce){return db[_0x1a9e('0x22')][_0x1a9e('0x23')](function(_0x53579e){return db[_0x1a9e('0x34')][_0x1a9e('0x19')](_0xbc416b[_0x1a9e('0x1a')],{'raw':_0xbc416b[_0x1a9e('0x8')]?_0xbc416b[_0x1a9e('0x8')][_0x1a9e('0x9')]===undefined?!![]:![]:!![],'transaction':_0x53579e})[_0x1a9e('0xf')](function(){logger[_0x1a9e('0x16')]('MoveContactManagedDialer\x20hopper\x20options\x20[%s]\x20active\x20status\x20[%s]',JSON[_0x1a9e('0x17')](_0xbc416b[_0x1a9e('0x8')][_0x1a9e('0xa')]),_0xbc416b[_0x1a9e('0x8')][_0x1a9e('0xa')]['active']);return db[_0x1a9e('0x6')][_0x1a9e('0x35')]({'where':_0xbc416b[_0x1a9e('0x8')]?_0xbc416b['options'][_0x1a9e('0xa')]||null:null,'transaction':_0x53579e});});})[_0x1a9e('0xf')](function(_0x14c2d2){logger[_0x1a9e('0x16')]('MoveContactManagedDialer',_0xbc416b);logger[_0x1a9e('0x10')]('MoveContactManagedDialer',_0xbc416b,JSON[_0x1a9e('0x17')](_0x14c2d2));_0x434fbc(_0x14c2d2);})[_0x1a9e('0x11')](function(_0x3df5de){logger['error'](_0x1a9e('0x33'),_0x3df5de[_0x1a9e('0x13')],_0xbc416b);_0x5723ce(_0x50327e['error'](0x1f4,_0x3df5de[_0x1a9e('0x13')]));});});};exports[_0x1a9e('0x36')]=function(_0x45c70c){var _0x16f55b=this;return new Promise(function(_0x3b250d,_0x2dcb44){return db[_0x1a9e('0x6')][_0x1a9e('0x7')]({'raw':_0x45c70c['options']?_0x45c70c[_0x1a9e('0x8')][_0x1a9e('0x9')]===undefined?!![]:![]:!![],'where':_0x45c70c['options']?_0x45c70c['options'][_0x1a9e('0xa')]||null:null,'attributes':[[db[_0x1a9e('0x22')]['fn'](_0x1a9e('0x37'),db[_0x1a9e('0x22')]['fn']('IF',db['sequelize']['literal'](_0x1a9e('0x38')+util[_0x1a9e('0x39')](_0x1a9e('0x3a'),moment()[_0x1a9e('0x39')](_0x1a9e('0x3b')))+'\x20,\x201,\x20null'))),'contactsRescheduled']]})[_0x1a9e('0xf')](function(_0x3acb58){logger[_0x1a9e('0x16')]('CountReScheduled',_0x45c70c);logger[_0x1a9e('0x10')](_0x1a9e('0x36'),_0x45c70c,JSON[_0x1a9e('0x17')](_0x3acb58));_0x3b250d(_0x3acb58);})['catch'](function(_0x4d5682){logger['error'](_0x1a9e('0x36'),_0x4d5682['message'],_0x45c70c);_0x2dcb44(_0x16f55b[_0x1a9e('0x12')](0x1f4,_0x4d5682[_0x1a9e('0x13')]));});});};exports['GetContactRecallMe']=function(_0x462c55){var _0x5b7fb1=this;return new Promise(function(_0x3937f4,_0x14d02f){return db[_0x1a9e('0x20')][_0x1a9e('0x21')]()[_0x1a9e('0xf')](function(){return db['sequelize']['transaction'](function(_0x5c4b28){return db['CmHopper']['findAll']({'where':_0x462c55['options']?_0x462c55['options']['where']||null:null,'attributes':_0x462c55[_0x1a9e('0x8')]?_0x462c55[_0x1a9e('0x8')]['attributes']||null:null,'limit':0x1,'order':_0x462c55[_0x1a9e('0x8')]?_0x462c55['options'][_0x1a9e('0x25')]||null:null,'group':db[_0x1a9e('0x6')][_0x1a9e('0x2e')],'transaction':_0x5c4b28,'lock':_0x5c4b28[_0x1a9e('0x26')][_0x1a9e('0x27')],'include':_0x462c55[_0x1a9e('0x8')]?_0x462c55['options']['include']?_[_0x1a9e('0xe')](_0x462c55[_0x1a9e('0x8')][_0x1a9e('0xc')],function(_0x9cb582){return{'model':db[_0x9cb582[_0x1a9e('0xd')]],'as':_0x9cb582['as'],'attributes':_0x9cb582[_0x1a9e('0xb')],'include':_0x9cb582['include']?_[_0x1a9e('0xe')](_0x9cb582[_0x1a9e('0xc')],function(_0x481711){return{'model':db[_0x481711['model']],'as':_0x481711['as'],'attributes':_0x481711[_0x1a9e('0xb')],'include':_0x481711['include']?_[_0x1a9e('0xe')](_0x481711[_0x1a9e('0xc')],function(_0x3f54e7){return{'model':db[_0x3f54e7[_0x1a9e('0xd')]],'as':_0x3f54e7['as'],'attributes':_0x3f54e7[_0x1a9e('0xb')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1612da){var _0x5a2993=[];for(var _0x4c483e=0x0;_0x4c483e<_0x1612da[_0x1a9e('0x2d')];_0x4c483e+=0x1){_0x5a2993['push'](_0x1612da[_0x4c483e]['update'](_0x462c55['body'],{'transaction':_0x5c4b28}));}return BPromise[_0x1a9e('0x3c')](_0x5a2993);});})[_0x1a9e('0xf')](function(_0x1d75ce){logger['info'](_0x1a9e('0x3d'),_0x462c55);logger[_0x1a9e('0x10')]('GetContactRecallMe',_0x462c55,JSON[_0x1a9e('0x17')](_0x1d75ce));_0x3937f4(_0x1d75ce);})[_0x1a9e('0x11')](function(_0x3ed0d9){logger[_0x1a9e('0x12')](_0x1a9e('0x3d'),_0x3ed0d9[_0x1a9e('0x13')],_0x462c55);_0x14d02f(_0x5b7fb1[_0x1a9e('0x12')](0x1f4,_0x3ed0d9[_0x1a9e('0x13')]));});});});};exports['GetCmHopperPreview']=function(_0x4ec68d){var _0x259b08=this;return new Promise(function(_0x595c14,_0xf2c335){db['CmContact']['describe']()[_0x1a9e('0xf')](function(_0x3eb3fc){return db[_0x1a9e('0x6')][_0x1a9e('0x7')]({'raw':_0x4ec68d['options']?_0x4ec68d['options'][_0x1a9e('0x9')]===undefined?!![]:![]:!![],'where':_0x4ec68d['options']?_0x4ec68d[_0x1a9e('0x8')][_0x1a9e('0xa')]||null:null,'attributes':_0x4ec68d['options']?_0x4ec68d[_0x1a9e('0x8')][_0x1a9e('0xb')]||null:null,'limit':_0x4ec68d[_0x1a9e('0x8')]?_0x4ec68d[_0x1a9e('0x8')][_0x1a9e('0x24')]||null:null,'include':_0x4ec68d['options']?_0x4ec68d[_0x1a9e('0x8')][_0x1a9e('0xc')]?_[_0x1a9e('0xe')](_0x4ec68d[_0x1a9e('0x8')][_0x1a9e('0xc')],function(_0x1082c2){return{'model':db[_0x1082c2[_0x1a9e('0xd')]],'as':_0x1082c2['as'],'attributes':_0x1082c2['as']===_0x1a9e('0x28')?_[_0x1a9e('0x29')](_0x3eb3fc):_0x1082c2[_0x1a9e('0xb')],'include':_0x1082c2[_0x1a9e('0xc')]?_[_0x1a9e('0xe')](_0x1082c2[_0x1a9e('0xc')],function(_0x190338){return{'model':db[_0x190338[_0x1a9e('0xd')]],'as':_0x190338['as'],'attributes':_0x190338[_0x1a9e('0xb')],'include':_0x190338[_0x1a9e('0xc')]?_[_0x1a9e('0xe')](_0x190338[_0x1a9e('0xc')],function(_0x507494){return{'model':db[_0x507494[_0x1a9e('0xd')]],'as':_0x507494['as'],'attributes':_0x507494[_0x1a9e('0xb')]};}):[]};}):[]};}):[]:[]})[_0x1a9e('0xf')](function(_0x2381df){logger['info'](_0x1a9e('0x5'),_0x4ec68d);logger[_0x1a9e('0x10')](_0x1a9e('0x5'),_0x4ec68d,JSON['stringify'](_0x2381df));_0x595c14(_0x2381df);})['catch'](function(_0x2e7c3e){logger[_0x1a9e('0x12')](_0x1a9e('0x5'),_0x2e7c3e[_0x1a9e('0x13')],_0x4ec68d);_0xf2c335(_0x259b08['error'](0x1f4,_0x2e7c3e[_0x1a9e('0x13')]));});});});};exports[_0x1a9e('0x3e')]=function(_0x28aa64){var _0x4ff6dc=this;return new Promise(function(_0x3338b7,_0x599a01){return db['CmContact'][_0x1a9e('0x3f')]({'raw':!![],'where':{'phone':_0x28aa64[_0x1a9e('0x8')][_0x1a9e('0xa')]['phone']},'attributes':['id',_0x1a9e('0x40')],'order':[['id','DESC']]})[_0x1a9e('0xf')](function(_0x406fe6){logger['info']('getContactByPhone',_0x28aa64);logger['debug']('getContactByPhone',_0x28aa64,JSON['stringify'](_0x406fe6));_0x3338b7(_0x406fe6);})[_0x1a9e('0x11')](function(_0x3d8539){logger[_0x1a9e('0x12')](_0x1a9e('0x41'),_0x3d8539[_0x1a9e('0x13')],_0x28aa64);_0x599a01(_0x4ff6dc[_0x1a9e('0x12')](0x1f4,_0x3d8539[_0x1a9e('0x13')]));});});};exports[_0x1a9e('0x42')]=function(_0x3ab007){var _0x574eb3=this;return new Promise(function(_0x572faf,_0x53ada2){return db[_0x1a9e('0x22')][_0x1a9e('0x23')](function(_0x17a806){var _0x5376f1=_0x3ab007['options']&&_0x3ab007[_0x1a9e('0x8')]['where']?_0x3ab007[_0x1a9e('0x8')][_0x1a9e('0xa')]:{};return db[_0x1a9e('0x6')][_0x1a9e('0x1c')](_0x3ab007[_0x1a9e('0x1a')],{'where':_0x5376f1,'transaction':_0x17a806})[_0x1a9e('0xf')](function(_0x34dc0d){logger[_0x1a9e('0x16')](_0x1a9e('0x42'),_0x3ab007);logger[_0x1a9e('0x10')]('ResetActiveCalls',_0x3ab007,JSON[_0x1a9e('0x17')](_0x34dc0d));_0x572faf(_0x34dc0d);})[_0x1a9e('0x11')](function(_0x1924bf){logger[_0x1a9e('0x12')]('ResetActiveCalls',_0x1924bf[_0x1a9e('0x13')],_0x3ab007);_0x53ada2(_0x574eb3['error'](0x1f4,_0x1924bf['message']));});});});};exports[_0x1a9e('0x43')]=function(_0x59e550){var _0x5695ec=this;var _0x4b5c3e=_0x59e550[_0x1a9e('0x1a')][_0x1a9e('0xa')][_0x1a9e('0x44')];var _0x21e8bd=_0x59e550['body'][_0x1a9e('0xa')]['interval'];var _0x13b137=_0x59e550[_0x1a9e('0x1a')][_0x1a9e('0xa')][_0x1a9e('0x45')];return new Promise(function(_0x59b506,_0x253a5f){return db[_0x1a9e('0x6')][_0x1a9e('0x7')]({'where':{'voiceQueueId':{'$in':_0x4b5c3e},'recallme':0x1,'active':0x0,'recallmeNotifiedDate':{'$eq':null},'scheduledat':{'$and':{'$lte':db[_0x1a9e('0x22')][_0x1a9e('0x46')](_0x1a9e('0x47')+_0x21e8bd+_0x1a9e('0x48')),'$gt':db[_0x1a9e('0x22')][_0x1a9e('0x46')](_0x1a9e('0x49'))}},'UserId':{'$in':_0x13b137}},'include':[{'model':db[_0x1a9e('0x20')],'as':'Contact'},{'model':db[_0x1a9e('0x2a')],'as':_0x1a9e('0x2b'),'attributes':['id',_0x1a9e('0x2c'),_0x1a9e('0x4a')]},{'model':db[_0x1a9e('0x4b')],'as':_0x1a9e('0x4c')}]})[_0x1a9e('0xf')](function(_0x4c4b06){if(_0x4c4b06[_0x1a9e('0x2d')]>0x0){return db['sequelize'][_0x1a9e('0x23')](function(_0x1d05a1){return db[_0x1a9e('0x6')][_0x1a9e('0x1c')]({'recallmeNotifiedDate':db[_0x1a9e('0x22')][_0x1a9e('0x46')](_0x1a9e('0x49'))},{'where':{'id':{'$in':_['map'](_0x4c4b06,'id')}},'transaction':_0x1d05a1})['then'](function(){_0x59b506(_0x4c4b06);})[_0x1a9e('0x11')](function(_0x5e5e0f){logger[_0x1a9e('0x12')](_0x1a9e('0x43'),_0x5e5e0f[_0x1a9e('0x13')],_0x59e550);_0x253a5f(_0x5695ec[_0x1a9e('0x12')](0x1f4,_0x5e5e0f[_0x1a9e('0x13')]));});})[_0x1a9e('0x11')](function(_0x1ad3ef){logger[_0x1a9e('0x12')](_0x1a9e('0x43'),_0x1ad3ef[_0x1a9e('0x13')],_0x59e550);_0x253a5f(_0x5695ec[_0x1a9e('0x12')](0x1f4,_0x1ad3ef[_0x1a9e('0x13')]));});}else{_0x59b506(_0x4c4b06);}});});};
\ No newline at end of file
index 1d5ed93..695ee47 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf358=['/timezones','getTimezones','show','getPreviewRecall','post','create','/preview','/timezone','getTimezone','/:id','update','destroy','Router','../../components/auth/service','./cmHopper.controller','isAuthenticated','/describe','describe','get','/opencontacts','getOpenContacts'];(function(_0x544099,_0x372b30){var _0x20ab09=function(_0x149613){while(--_0x149613){_0x544099['push'](_0x544099['shift']());}};_0x20ab09(++_0x372b30);}(_0xf358,0x75));var _0x8f35=function(_0x227a11,_0x59c020){_0x227a11=_0x227a11-0x0;var _0x491055=_0xf358[_0x227a11];return _0x491055;};'use strict';var express=require('express');var router=express[_0x8f35('0x0')]();var auth=require(_0x8f35('0x1'));var controller=require(_0x8f35('0x2'));router['get']('/',auth[_0x8f35('0x3')](),controller['index']);router['get'](_0x8f35('0x4'),auth[_0x8f35('0x3')](),controller[_0x8f35('0x5')]);router[_0x8f35('0x6')](_0x8f35('0x7'),auth[_0x8f35('0x3')](),controller[_0x8f35('0x8')]);router['get'](_0x8f35('0x9'),auth[_0x8f35('0x3')](),controller[_0x8f35('0xa')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0x8f35('0xb')]);router[_0x8f35('0x6')]('/:id/previewrecall',auth[_0x8f35('0x3')](),controller[_0x8f35('0xc')]);router[_0x8f35('0xd')]('/',auth[_0x8f35('0x3')](),controller[_0x8f35('0xe')]);router['post'](_0x8f35('0xf'),auth['isAuthenticated'](),controller['getPreview']);router[_0x8f35('0xd')](_0x8f35('0x10'),auth['isAuthenticated'](),controller[_0x8f35('0x11')]);router['put'](_0x8f35('0x12'),auth[_0x8f35('0x3')](),controller[_0x8f35('0x13')]);router['delete'](_0x8f35('0x12'),auth[_0x8f35('0x3')](),controller[_0x8f35('0x14')]);module['exports']=router;
\ No newline at end of file
+var _0x2e37=['Router','../../components/auth/service','./cmHopper.controller','get','isAuthenticated','index','/describe','describe','/opencontacts','getOpenContacts','/timezones','getTimezones','/:id','/:id/previewrecall','getPreviewRecall','post','create','getPreview','put','update','delete','destroy','exports'];(function(_0x160a45,_0x4aa7c9){var _0x421451=function(_0xd8d71f){while(--_0xd8d71f){_0x160a45['push'](_0x160a45['shift']());}};_0x421451(++_0x4aa7c9);}(_0x2e37,0xa1));var _0x72e3=function(_0x19b84f,_0x48765e){_0x19b84f=_0x19b84f-0x0;var _0x18067b=_0x2e37[_0x19b84f];return _0x18067b;};'use strict';var express=require('express');var router=express[_0x72e3('0x0')]();var auth=require(_0x72e3('0x1'));var controller=require(_0x72e3('0x2'));router[_0x72e3('0x3')]('/',auth[_0x72e3('0x4')](),controller[_0x72e3('0x5')]);router[_0x72e3('0x3')](_0x72e3('0x6'),auth[_0x72e3('0x4')](),controller[_0x72e3('0x7')]);router[_0x72e3('0x3')](_0x72e3('0x8'),auth['isAuthenticated'](),controller[_0x72e3('0x9')]);router[_0x72e3('0x3')](_0x72e3('0xa'),auth['isAuthenticated'](),controller[_0x72e3('0xb')]);router['get'](_0x72e3('0xc'),auth['isAuthenticated'](),controller['show']);router['get'](_0x72e3('0xd'),auth[_0x72e3('0x4')](),controller[_0x72e3('0xe')]);router[_0x72e3('0xf')]('/',auth[_0x72e3('0x4')](),controller[_0x72e3('0x10')]);router[_0x72e3('0xf')]('/preview',auth[_0x72e3('0x4')](),controller[_0x72e3('0x11')]);router[_0x72e3('0xf')]('/timezone',auth[_0x72e3('0x4')](),controller['getTimezone']);router[_0x72e3('0x12')](_0x72e3('0xc'),auth[_0x72e3('0x4')](),controller[_0x72e3('0x13')]);router[_0x72e3('0x14')](_0x72e3('0xc'),auth[_0x72e3('0x4')](),controller[_0x72e3('0x15')]);module[_0x72e3('0x16')]=router;
\ No newline at end of file
index 15ec1f1..30ac90d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x796f=['YYYY-MM-DD\x20HH:mm:ss','moment','sequelize','INTEGER','DATE','format'];(function(_0x388e6c,_0x3785c7){var _0x1d1bb7=function(_0x38dd85){while(--_0x38dd85){_0x388e6c['push'](_0x388e6c['shift']());}};_0x1d1bb7(++_0x3785c7);}(_0x796f,0xeb));var _0xf796=function(_0x3dcc23,_0xd0e196){_0x3dcc23=_0x3dcc23-0x0;var _0x10f2a9=_0x796f[_0x3dcc23];return _0x10f2a9;};'use strict';var moment=require(_0xf796('0x0'));var Sequelize=require(_0xf796('0x1'));module['exports']={'CmHopperId':{'type':Sequelize[_0xf796('0x2')]},'phone':{'type':Sequelize['STRING'],'allowNull':![]},'OrderBy':{'type':Sequelize[_0xf796('0x2')],'defaultValue':0x0},'scheduledat':{'type':Sequelize[_0xf796('0x3')],'defaultValue':moment()[_0xf796('0x4')](_0xf796('0x5'))},'countbusyretry':{'type':Sequelize[_0xf796('0x2')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0xf796('0x2')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0xf796('0x2')],'defaultValue':0x0},'countnosuchnumberretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0xf796('0x2')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0xf796('0x2')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0xf796('0x2')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0}};
\ No newline at end of file
+var _0x9892=['moment','sequelize','exports','INTEGER','STRING','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x4ed520,_0x21be63){var _0x4415a6=function(_0x14b151){while(--_0x14b151){_0x4ed520['push'](_0x4ed520['shift']());}};_0x4415a6(++_0x21be63);}(_0x9892,0x188));var _0x2989=function(_0x4ff9e6,_0x2ce37a){_0x4ff9e6=_0x4ff9e6-0x0;var _0x4b4f6c=_0x9892[_0x4ff9e6];return _0x4b4f6c;};'use strict';var moment=require(_0x2989('0x0'));var Sequelize=require(_0x2989('0x1'));module[_0x2989('0x2')]={'CmHopperId':{'type':Sequelize[_0x2989('0x3')]},'phone':{'type':Sequelize[_0x2989('0x4')],'allowNull':![]},'OrderBy':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'scheduledat':{'type':Sequelize['DATE'],'defaultValue':moment()[_0x2989('0x5')](_0x2989('0x6'))},'countbusyretry':{'type':Sequelize[_0x2989('0x3')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x2989('0x3')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x2989('0x3')],'defaultValue':0x0},'countnosuchnumberretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x2989('0x3')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x2989('0x3')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0}};
\ No newline at end of file
index 4bf9910..101b542 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd18d=['intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','CmHopperAdditionalPhone','includeAll','include','findAll','rows','options','find','catch','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','CmHopperAdditionalPhones','userProfileId','autoAssociation','UserProfileResource','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','eml-format','rimraf','fast-json-patch','moment','mustache','util','sox','ejs','fs-extra','lodash','squel','jsforce','desk.js','to-csv','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','undefined','limit','count','offset','set','Content-Range','apply','reject','update','then','get','destroy','name','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters'];(function(_0x1f2446,_0x405cfc){var _0x468bfa=function(_0x98b89e){while(--_0x98b89e){_0x1f2446['push'](_0x1f2446['shift']());}};_0x468bfa(++_0x405cfc);}(_0xd18d,0x1b4));var _0xdd18=function(_0x33deaf,_0x5c43b5){_0x33deaf=_0x33deaf-0x0;var _0x3f1076=_0xd18d[_0x33deaf];return _0x3f1076;};'use strict';var emlformat=require(_0xdd18('0x0'));var rimraf=require(_0xdd18('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xdd18('0x2'));var rp=require('request-promise');var moment=require(_0xdd18('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xdd18('0x4'));var util=require(_0xdd18('0x5'));var path=require('path');var sox=require(_0xdd18('0x6'));var csv=require('to-csv');var ejs=require(_0xdd18('0x7'));var fs=require('fs');var fs_extra=require(_0xdd18('0x8'));var _=require(_0xdd18('0x9'));var squel=require(_0xdd18('0xa'));var crypto=require('crypto');var jsforce=require(_0xdd18('0xb'));var deskjs=require(_0xdd18('0xc'));var toCsv=require(_0xdd18('0xd'));var querystring=require(_0xdd18('0xe'));var Papa=require(_0xdd18('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xdd18('0x10'));var as=require(_0xdd18('0x11'));var hardwareService=require(_0xdd18('0x12'));var logger=require(_0xdd18('0x13'))('api');var utils=require(_0xdd18('0x14'));var config=require(_0xdd18('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0xdd18('0x16'))['db'];function respondWithStatusCode(_0x3217dd,_0x2a676e){_0x2a676e=_0x2a676e||0xcc;return function(_0x2972fd){if(_0x2972fd){return _0x3217dd[_0xdd18('0x17')](_0x2a676e);}return _0x3217dd['status'](_0x2a676e)[_0xdd18('0x18')]();};}function respondWithResult(_0x12ec16,_0x1b9175){_0x1b9175=_0x1b9175||0xc8;return function(_0x44cd1b){if(_0x44cd1b){return _0x12ec16[_0xdd18('0x19')](_0x1b9175)[_0xdd18('0x1a')](_0x44cd1b);}};}function respondWithFilteredResult(_0x330c95,_0x163111){return function(_0x219bb5){if(_0x219bb5){var _0x198ed6=typeof _0x163111['offset']===_0xdd18('0x1b')&&typeof _0x163111[_0xdd18('0x1c')]==='undefined';var _0x12d05b=_0x219bb5[_0xdd18('0x1d')];var _0x296eb8=_0x198ed6?0x0:_0x163111['offset'];var _0x54243a=_0x198ed6?_0x219bb5[_0xdd18('0x1d')]:_0x163111[_0xdd18('0x1e')]+_0x163111[_0xdd18('0x1c')];var _0x54229c;if(_0x54243a>=_0x12d05b){_0x54243a=_0x12d05b;_0x54229c=0xc8;}else{_0x54229c=0xce;}_0x330c95['status'](_0x54229c);return _0x330c95[_0xdd18('0x1f')](_0xdd18('0x20'),_0x296eb8+'-'+_0x54243a+'/'+_0x12d05b)[_0xdd18('0x1a')](_0x219bb5);}return null;};}function patchUpdates(_0x3a05d8){return function(_0x32b60c){try{jsonpatch[_0xdd18('0x21')](_0x32b60c,_0x3a05d8,!![]);}catch(_0x16da58){return BPromise[_0xdd18('0x22')](_0x16da58);}return _0x32b60c['save']();};}function saveUpdates(_0x4629d4,_0x194866){return function(_0x3f9e08){if(_0x3f9e08){return _0x3f9e08[_0xdd18('0x23')](_0x4629d4)['then'](function(_0x6a23f4){return _0x6a23f4;});}return null;};}function removeEntity(_0x43a0d9,_0x4005a3){return function(_0xd222ab){if(_0xd222ab){return _0xd222ab['destroy']()[_0xdd18('0x24')](function(){var _0x4b9a95=_0xd222ab[_0xdd18('0x25')]({'plain':!![]});var _0x10e5b4='CmHopperAdditionalPhones';return db['UserProfileResource'][_0xdd18('0x26')]({'where':{'type':_0x10e5b4,'resourceId':_0x4b9a95['id']}})[_0xdd18('0x24')](function(){return _0xd222ab;});})[_0xdd18('0x24')](function(){_0x43a0d9[_0xdd18('0x19')](0xcc)[_0xdd18('0x18')]();});}};}function handleEntityNotFound(_0x4f6f25,_0x5a8a7c){return function(_0x246254){if(!_0x246254){_0x4f6f25['sendStatus'](0x194);}return _0x246254;};}function handleError(_0x462c67,_0x43f54e){_0x43f54e=_0x43f54e||0x1f4;return function(_0x41167e){logger['error'](_0x41167e['stack']);if(_0x41167e[_0xdd18('0x27')]){delete _0x41167e['name'];}_0x462c67['status'](_0x43f54e)['send'](_0x41167e);};}exports[_0xdd18('0x28')]=function(_0x2c69d1,_0x58660e){var _0x2d6b28={},_0x9d66ae={},_0xe62447={'count':0x0,'rows':[]};var _0x4a467d=_[_0xdd18('0x29')](db['CmHopperAdditionalPhone'][_0xdd18('0x2a')],function(_0x26d470){return{'name':_0x26d470[_0xdd18('0x2b')],'type':_0x26d470[_0xdd18('0x2c')][_0xdd18('0x2d')]};});_0x9d66ae[_0xdd18('0x2e')]=_['map'](_0x4a467d,_0xdd18('0x27'));_0x9d66ae[_0xdd18('0x2f')]=_[_0xdd18('0x30')](_0x2c69d1[_0xdd18('0x2f')]);_0x9d66ae[_0xdd18('0x31')]=_[_0xdd18('0x32')](_0x9d66ae[_0xdd18('0x2e')],_0x9d66ae[_0xdd18('0x2f')]);_0x2d6b28[_0xdd18('0x33')]=_[_0xdd18('0x32')](_0x9d66ae[_0xdd18('0x2e')],qs[_0xdd18('0x34')](_0x2c69d1[_0xdd18('0x2f')]['fields']));_0x2d6b28['attributes']=_0x2d6b28[_0xdd18('0x33')][_0xdd18('0x35')]?_0x2d6b28[_0xdd18('0x33')]:_0x9d66ae[_0xdd18('0x2e')];if(!_0x2c69d1[_0xdd18('0x2f')][_0xdd18('0x36')](_0xdd18('0x37'))){_0x2d6b28[_0xdd18('0x1c')]=qs[_0xdd18('0x1c')](_0x2c69d1[_0xdd18('0x2f')]['limit']);_0x2d6b28['offset']=qs[_0xdd18('0x1e')](_0x2c69d1['query'][_0xdd18('0x1e')]);}_0x2d6b28['order']=qs[_0xdd18('0x38')](_0x2c69d1[_0xdd18('0x2f')][_0xdd18('0x38')]);_0x2d6b28[_0xdd18('0x39')]=qs[_0xdd18('0x31')](_[_0xdd18('0x3a')](_0x2c69d1['query'],_0x9d66ae[_0xdd18('0x31')]),_0x4a467d);if(_0x2c69d1[_0xdd18('0x2f')][_0xdd18('0x3b')]){_0x2d6b28[_0xdd18('0x39')]=_[_0xdd18('0x3c')](_0x2d6b28[_0xdd18('0x39')],{'$or':_[_0xdd18('0x29')](_0x4a467d,function(_0x8c166d){if(_0x8c166d['type']!==_0xdd18('0x3d')){var _0x119f7e={};_0x119f7e[_0x8c166d[_0xdd18('0x27')]]={'$like':'%'+_0x2c69d1[_0xdd18('0x2f')][_0xdd18('0x3b')]+'%'};return _0x119f7e;}})});}_0x2d6b28=_[_0xdd18('0x3c')]({},_0x2d6b28,_0x2c69d1['options']);var _0x4dc7fb={'where':_0x2d6b28[_0xdd18('0x39')]};return db[_0xdd18('0x3e')][_0xdd18('0x1d')](_0x4dc7fb)[_0xdd18('0x24')](function(_0x447689){_0xe62447[_0xdd18('0x1d')]=_0x447689;if(_0x2c69d1[_0xdd18('0x2f')][_0xdd18('0x3f')]){_0x2d6b28[_0xdd18('0x40')]=[{'all':!![]}];}return db[_0xdd18('0x3e')][_0xdd18('0x41')](_0x2d6b28);})[_0xdd18('0x24')](function(_0x33de62){_0xe62447[_0xdd18('0x42')]=_0x33de62;return _0xe62447;})[_0xdd18('0x24')](respondWithFilteredResult(_0x58660e,_0x2d6b28))['catch'](handleError(_0x58660e,null));};exports['show']=function(_0x212da7,_0x170147){var _0x4789f4={'raw':!![],'where':{'id':_0x212da7['params']['id']}},_0x4dd3fb={};_0x4dd3fb[_0xdd18('0x2e')]=_[_0xdd18('0x30')](db[_0xdd18('0x3e')][_0xdd18('0x2a')]);_0x4dd3fb[_0xdd18('0x2f')]=_[_0xdd18('0x30')](_0x212da7[_0xdd18('0x2f')]);_0x4dd3fb['filters']=_[_0xdd18('0x32')](_0x4dd3fb[_0xdd18('0x2e')],_0x4dd3fb[_0xdd18('0x2f')]);_0x4789f4['attributes']=_[_0xdd18('0x32')](_0x4dd3fb[_0xdd18('0x2e')],qs[_0xdd18('0x34')](_0x212da7[_0xdd18('0x2f')][_0xdd18('0x34')]));_0x4789f4[_0xdd18('0x33')]=_0x4789f4[_0xdd18('0x33')][_0xdd18('0x35')]?_0x4789f4[_0xdd18('0x33')]:_0x4dd3fb['model'];if(_0x212da7[_0xdd18('0x2f')]['includeAll']){_0x4789f4['include']=[{'all':!![]}];}_0x4789f4=_[_0xdd18('0x3c')]({},_0x4789f4,_0x212da7[_0xdd18('0x43')]);return db[_0xdd18('0x3e')][_0xdd18('0x44')](_0x4789f4)[_0xdd18('0x24')](handleEntityNotFound(_0x170147,null))[_0xdd18('0x24')](respondWithResult(_0x170147,null))[_0xdd18('0x45')](handleError(_0x170147,null));};exports[_0xdd18('0x46')]=function(_0x4a9762,_0x25e95f){return db['CmHopperAdditionalPhone'][_0xdd18('0x46')](_0x4a9762['body'],{})[_0xdd18('0x24')](function(_0x577e6f){var _0x472120=_0x4a9762['user'][_0xdd18('0x25')]({'plain':!![]});if(!_0x472120)throw new Error(_0xdd18('0x47'));if(_0x472120[_0xdd18('0x48')]==='user'){var _0xc489ad=_0x577e6f['get']({'plain':!![]});var _0x392b67=_0xdd18('0x49');return db['UserProfileSection']['find']({'where':{'name':_0x392b67,'userProfileId':_0x472120[_0xdd18('0x4a')]},'raw':!![]})['then'](function(_0x20a7fb){if(_0x20a7fb&&_0x20a7fb[_0xdd18('0x4b')]===0x0){return db[_0xdd18('0x4c')][_0xdd18('0x46')]({'name':_0xc489ad[_0xdd18('0x27')],'resourceId':_0xc489ad['id'],'type':_0x20a7fb['name'],'sectionId':_0x20a7fb['id']},{})[_0xdd18('0x24')](function(){return _0x577e6f;});}else{return _0x577e6f;}})[_0xdd18('0x45')](function(_0x5651a1){logger[_0xdd18('0x4d')](_0xdd18('0x4e'),_0x5651a1);throw _0x5651a1;});}return _0x577e6f;})[_0xdd18('0x24')](respondWithResult(_0x25e95f,0xc9))[_0xdd18('0x45')](handleError(_0x25e95f,null));};exports[_0xdd18('0x23')]=function(_0x3b7ff4,_0x698e7a){if(_0x3b7ff4[_0xdd18('0x4f')]['id']){delete _0x3b7ff4[_0xdd18('0x4f')]['id'];}return db['CmHopperAdditionalPhone'][_0xdd18('0x44')]({'where':{'id':_0x3b7ff4[_0xdd18('0x50')]['id']}})['then'](handleEntityNotFound(_0x698e7a,null))[_0xdd18('0x24')](saveUpdates(_0x3b7ff4['body'],null))[_0xdd18('0x24')](respondWithResult(_0x698e7a,null))[_0xdd18('0x45')](handleError(_0x698e7a,null));};exports[_0xdd18('0x26')]=function(_0x2ea5df,_0x3878a8){return db[_0xdd18('0x3e')][_0xdd18('0x44')]({'where':{'id':_0x2ea5df[_0xdd18('0x50')]['id']}})[_0xdd18('0x24')](handleEntityNotFound(_0x3878a8,null))[_0xdd18('0x24')](removeEntity(_0x3878a8,null))[_0xdd18('0x45')](handleError(_0x3878a8,null));};
\ No newline at end of file
+var _0x24e7=['query','keys','intersection','attributes','fields','length','order','sort','where','filters','merge','VIRTUAL','filter','include','findAll','catch','show','includeAll','options','find','create','body','user','get','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','eml-format','zip-dir','moment','mustache','util','sox','to-csv','ejs','fs-extra','squel','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','json','offset','limit','count','set','apply','reject','save','update','then','CmHopperAdditionalPhones','destroy','error','stack','name','send','map','CmHopperAdditionalPhone','rawAttributes','fieldName','type','key','model'];(function(_0xe9cc36,_0x3aef0a){var _0x3caca7=function(_0x3e0109){while(--_0x3e0109){_0xe9cc36['push'](_0xe9cc36['shift']());}};_0x3caca7(++_0x3aef0a);}(_0x24e7,0x199));var _0x724e=function(_0x1a9e01,_0x3c2d01){_0x1a9e01=_0x1a9e01-0x0;var _0x4e16c7=_0x24e7[_0x1a9e01];return _0x4e16c7;};'use strict';var emlformat=require(_0x724e('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x724e('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x724e('0x2'));var BPromise=require('bluebird');var Mustache=require(_0x724e('0x3'));var util=require(_0x724e('0x4'));var path=require('path');var sox=require(_0x724e('0x5'));var csv=require(_0x724e('0x6'));var ejs=require(_0x724e('0x7'));var fs=require('fs');var fs_extra=require(_0x724e('0x8'));var _=require('lodash');var squel=require(_0x724e('0x9'));var crypto=require('crypto');var jsforce=require(_0x724e('0xa'));var deskjs=require('desk.js');var toCsv=require(_0x724e('0x6'));var querystring=require(_0x724e('0xb'));var Papa=require('papaparse');var Redis=require(_0x724e('0xc'));var authService=require(_0x724e('0xd'));var qs=require(_0x724e('0xe'));var as=require(_0x724e('0xf'));var hardwareService=require(_0x724e('0x10'));var logger=require(_0x724e('0x11'))(_0x724e('0x12'));var utils=require(_0x724e('0x13'));var config=require(_0x724e('0x14'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x115cd1,_0x2462be){_0x2462be=_0x2462be||0xcc;return function(_0x259306){if(_0x259306){return _0x115cd1[_0x724e('0x15')](_0x2462be);}return _0x115cd1[_0x724e('0x16')](_0x2462be)[_0x724e('0x17')]();};}function respondWithResult(_0x47da55,_0x3a4019){_0x3a4019=_0x3a4019||0xc8;return function(_0x116606){if(_0x116606){return _0x47da55[_0x724e('0x16')](_0x3a4019)[_0x724e('0x18')](_0x116606);}};}function respondWithFilteredResult(_0x11ee72,_0x15e48a){return function(_0x547670){if(_0x547670){var _0xed4a0=typeof _0x15e48a[_0x724e('0x19')]==='undefined'&&typeof _0x15e48a[_0x724e('0x1a')]==='undefined';var _0x309e14=_0x547670[_0x724e('0x1b')];var _0x6b53cb=_0xed4a0?0x0:_0x15e48a[_0x724e('0x19')];var _0xd7c54c=_0xed4a0?_0x547670[_0x724e('0x1b')]:_0x15e48a['offset']+_0x15e48a[_0x724e('0x1a')];var _0xa42aae;if(_0xd7c54c>=_0x309e14){_0xd7c54c=_0x309e14;_0xa42aae=0xc8;}else{_0xa42aae=0xce;}_0x11ee72[_0x724e('0x16')](_0xa42aae);return _0x11ee72[_0x724e('0x1c')]('Content-Range',_0x6b53cb+'-'+_0xd7c54c+'/'+_0x309e14)[_0x724e('0x18')](_0x547670);}return null;};}function patchUpdates(_0x1e211e){return function(_0x4e3fcb){try{jsonpatch[_0x724e('0x1d')](_0x4e3fcb,_0x1e211e,!![]);}catch(_0x5dd88b){return BPromise[_0x724e('0x1e')](_0x5dd88b);}return _0x4e3fcb[_0x724e('0x1f')]();};}function saveUpdates(_0x35ddc6,_0x489b06){return function(_0x322c50){if(_0x322c50){return _0x322c50[_0x724e('0x20')](_0x35ddc6)['then'](function(_0x48997e){return _0x48997e;});}return null;};}function removeEntity(_0x2f2007,_0x220b39){return function(_0x48912a){if(_0x48912a){return _0x48912a['destroy']()[_0x724e('0x21')](function(){var _0x168143=_0x48912a['get']({'plain':!![]});var _0x1b602b=_0x724e('0x22');return db['UserProfileResource'][_0x724e('0x23')]({'where':{'type':_0x1b602b,'resourceId':_0x168143['id']}})[_0x724e('0x21')](function(){return _0x48912a;});})[_0x724e('0x21')](function(){_0x2f2007[_0x724e('0x16')](0xcc)[_0x724e('0x17')]();});}};}function handleEntityNotFound(_0x3fdd93,_0x4903b7){return function(_0x258ce7){if(!_0x258ce7){_0x3fdd93['sendStatus'](0x194);}return _0x258ce7;};}function handleError(_0x26ac85,_0x26f677){_0x26f677=_0x26f677||0x1f4;return function(_0xbd8d6c){logger[_0x724e('0x24')](_0xbd8d6c[_0x724e('0x25')]);if(_0xbd8d6c[_0x724e('0x26')]){delete _0xbd8d6c[_0x724e('0x26')];}_0x26ac85[_0x724e('0x16')](_0x26f677)[_0x724e('0x27')](_0xbd8d6c);};}exports['index']=function(_0x2255f1,_0x5ec9ab){var _0x4b1b41={},_0x5dec65={},_0xe78e65={'count':0x0,'rows':[]};var _0x46a15e=_[_0x724e('0x28')](db[_0x724e('0x29')][_0x724e('0x2a')],function(_0x1ff65a){return{'name':_0x1ff65a[_0x724e('0x2b')],'type':_0x1ff65a[_0x724e('0x2c')][_0x724e('0x2d')]};});_0x5dec65[_0x724e('0x2e')]=_[_0x724e('0x28')](_0x46a15e,'name');_0x5dec65[_0x724e('0x2f')]=_[_0x724e('0x30')](_0x2255f1[_0x724e('0x2f')]);_0x5dec65['filters']=_[_0x724e('0x31')](_0x5dec65[_0x724e('0x2e')],_0x5dec65[_0x724e('0x2f')]);_0x4b1b41[_0x724e('0x32')]=_[_0x724e('0x31')](_0x5dec65[_0x724e('0x2e')],qs[_0x724e('0x33')](_0x2255f1[_0x724e('0x2f')]['fields']));_0x4b1b41[_0x724e('0x32')]=_0x4b1b41[_0x724e('0x32')][_0x724e('0x34')]?_0x4b1b41[_0x724e('0x32')]:_0x5dec65[_0x724e('0x2e')];if(!_0x2255f1['query']['hasOwnProperty']('nolimit')){_0x4b1b41['limit']=qs['limit'](_0x2255f1[_0x724e('0x2f')][_0x724e('0x1a')]);_0x4b1b41[_0x724e('0x19')]=qs[_0x724e('0x19')](_0x2255f1[_0x724e('0x2f')][_0x724e('0x19')]);}_0x4b1b41[_0x724e('0x35')]=qs[_0x724e('0x36')](_0x2255f1[_0x724e('0x2f')][_0x724e('0x36')]);_0x4b1b41[_0x724e('0x37')]=qs[_0x724e('0x38')](_['pick'](_0x2255f1[_0x724e('0x2f')],_0x5dec65[_0x724e('0x38')]),_0x46a15e);if(_0x2255f1[_0x724e('0x2f')]['filter']){_0x4b1b41['where']=_[_0x724e('0x39')](_0x4b1b41[_0x724e('0x37')],{'$or':_[_0x724e('0x28')](_0x46a15e,function(_0x273030){if(_0x273030[_0x724e('0x2c')]!==_0x724e('0x3a')){var _0x427d83={};_0x427d83[_0x273030[_0x724e('0x26')]]={'$like':'%'+_0x2255f1[_0x724e('0x2f')][_0x724e('0x3b')]+'%'};return _0x427d83;}})});}_0x4b1b41=_['merge']({},_0x4b1b41,_0x2255f1['options']);var _0x39d8a5={'where':_0x4b1b41[_0x724e('0x37')]};return db[_0x724e('0x29')][_0x724e('0x1b')](_0x39d8a5)[_0x724e('0x21')](function(_0x4a606){_0xe78e65[_0x724e('0x1b')]=_0x4a606;if(_0x2255f1['query']['includeAll']){_0x4b1b41[_0x724e('0x3c')]=[{'all':!![]}];}return db['CmHopperAdditionalPhone'][_0x724e('0x3d')](_0x4b1b41);})[_0x724e('0x21')](function(_0xa65d){_0xe78e65['rows']=_0xa65d;return _0xe78e65;})['then'](respondWithFilteredResult(_0x5ec9ab,_0x4b1b41))[_0x724e('0x3e')](handleError(_0x5ec9ab,null));};exports[_0x724e('0x3f')]=function(_0x249cc2,_0x32263d){var _0x156ea6={'raw':!![],'where':{'id':_0x249cc2['params']['id']}},_0x327add={};_0x327add[_0x724e('0x2e')]=_[_0x724e('0x30')](db[_0x724e('0x29')]['rawAttributes']);_0x327add[_0x724e('0x2f')]=_['keys'](_0x249cc2[_0x724e('0x2f')]);_0x327add['filters']=_['intersection'](_0x327add[_0x724e('0x2e')],_0x327add[_0x724e('0x2f')]);_0x156ea6['attributes']=_[_0x724e('0x31')](_0x327add[_0x724e('0x2e')],qs['fields'](_0x249cc2['query'][_0x724e('0x33')]));_0x156ea6[_0x724e('0x32')]=_0x156ea6['attributes'][_0x724e('0x34')]?_0x156ea6[_0x724e('0x32')]:_0x327add[_0x724e('0x2e')];if(_0x249cc2['query'][_0x724e('0x40')]){_0x156ea6[_0x724e('0x3c')]=[{'all':!![]}];}_0x156ea6=_['merge']({},_0x156ea6,_0x249cc2[_0x724e('0x41')]);return db['CmHopperAdditionalPhone'][_0x724e('0x42')](_0x156ea6)[_0x724e('0x21')](handleEntityNotFound(_0x32263d,null))[_0x724e('0x21')](respondWithResult(_0x32263d,null))[_0x724e('0x3e')](handleError(_0x32263d,null));};exports[_0x724e('0x43')]=function(_0x5c6120,_0x51c8b0){return db['CmHopperAdditionalPhone']['create'](_0x5c6120[_0x724e('0x44')],{})['then'](function(_0x106909){var _0x16407a=_0x5c6120['user']['get']({'plain':!![]});if(!_0x16407a)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x16407a['role']===_0x724e('0x45')){var _0x28ee4c=_0x106909[_0x724e('0x46')]({'plain':!![]});var _0x1f6d53=_0x724e('0x22');return db[_0x724e('0x47')][_0x724e('0x42')]({'where':{'name':_0x1f6d53,'userProfileId':_0x16407a[_0x724e('0x48')]},'raw':!![]})[_0x724e('0x21')](function(_0x471ea2){if(_0x471ea2&&_0x471ea2[_0x724e('0x49')]===0x0){return db['UserProfileResource'][_0x724e('0x43')]({'name':_0x28ee4c[_0x724e('0x26')],'resourceId':_0x28ee4c['id'],'type':_0x471ea2[_0x724e('0x26')],'sectionId':_0x471ea2['id']},{})[_0x724e('0x21')](function(){return _0x106909;});}else{return _0x106909;}})[_0x724e('0x3e')](function(_0x2b395c){logger[_0x724e('0x24')](_0x724e('0x4a'),_0x2b395c);throw _0x2b395c;});}return _0x106909;})[_0x724e('0x21')](respondWithResult(_0x51c8b0,0xc9))[_0x724e('0x3e')](handleError(_0x51c8b0,null));};exports[_0x724e('0x20')]=function(_0x139813,_0x23dcd0){if(_0x139813['body']['id']){delete _0x139813['body']['id'];}return db[_0x724e('0x29')][_0x724e('0x42')]({'where':{'id':_0x139813[_0x724e('0x4b')]['id']}})[_0x724e('0x21')](handleEntityNotFound(_0x23dcd0,null))[_0x724e('0x21')](saveUpdates(_0x139813[_0x724e('0x44')],null))[_0x724e('0x21')](respondWithResult(_0x23dcd0,null))[_0x724e('0x3e')](handleError(_0x23dcd0,null));};exports[_0x724e('0x23')]=function(_0x567389,_0x9c788a){return db['CmHopperAdditionalPhone'][_0x724e('0x42')]({'where':{'id':_0x567389[_0x724e('0x4b')]['id']}})[_0x724e('0x21')](handleEntityNotFound(_0x9c788a,null))['then'](removeEntity(_0x9c788a,null))[_0x724e('0x3e')](handleError(_0x9c788a,null));};
\ No newline at end of file
index d43dd96..7a2cd33 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x15c0=['api','moment','bluebird','path','../../config/environment','./cmHopperAdditionalPhone.attributes','exports','CmHopperAdditionalPhone','cm_hopper_additional_phones','lodash','../../config/logger'];(function(_0x3bf83f,_0x181cac){var _0x22c4a9=function(_0xb3ff0d){while(--_0xb3ff0d){_0x3bf83f['push'](_0x3bf83f['shift']());}};_0x22c4a9(++_0x181cac);}(_0x15c0,0x77));var _0x015c=function(_0x1b0165,_0x33a8c0){_0x1b0165=_0x1b0165-0x0;var _0x80ea5c=_0x15c0[_0x1b0165];return _0x80ea5c;};'use strict';var _=require(_0x015c('0x0'));var util=require('util');var logger=require(_0x015c('0x1'))(_0x015c('0x2'));var moment=require(_0x015c('0x3'));var BPromise=require(_0x015c('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x015c('0x5'));var rimraf=require('rimraf');var config=require(_0x015c('0x6'));var attributes=require(_0x015c('0x7'));module[_0x015c('0x8')]=function(_0x2171ba,_0xd92dae){return _0x2171ba['define'](_0x015c('0x9'),attributes,{'tableName':_0x015c('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x99a3=['CmHopperAdditionalPhone','lodash','util','../../config/logger','api','bluebird','request-promise','path','../../config/environment','exports','define'];(function(_0x2adfb1,_0x406e6e){var _0xa52d45=function(_0x2de16c){while(--_0x2de16c){_0x2adfb1['push'](_0x2adfb1['shift']());}};_0xa52d45(++_0x406e6e);}(_0x99a3,0x14b));var _0x399a=function(_0x532a08,_0x1079ab){_0x532a08=_0x532a08-0x0;var _0xd9c5ee=_0x99a3[_0x532a08];return _0xd9c5ee;};'use strict';var _=require(_0x399a('0x0'));var util=require(_0x399a('0x1'));var logger=require(_0x399a('0x2'))(_0x399a('0x3'));var moment=require('moment');var BPromise=require(_0x399a('0x4'));var rp=require(_0x399a('0x5'));var fs=require('fs');var path=require(_0x399a('0x6'));var rimraf=require('rimraf');var config=require(_0x399a('0x7'));var attributes=require('./cmHopperAdditionalPhone.attributes');module[_0x399a('0x8')]=function(_0x3762a4,_0x52e383){return _0x3762a4[_0x399a('0x9')](_0x399a('0xa'),attributes,{'tableName':'cm_hopper_additional_phones','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 289e146..ed73e27 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x50fe=['countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','entity','dialGlobalMaxRetry','ASC','SwapAdditionalPhones','duration','waitTime','scheduledat','add','minutes','isNil','phone','countnoanswerretry','createdAt','updatedAt','sequelize','transaction','update','activateAdditionalPhone','field','IncrementPreviewCounters','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','http','request','then','info','CmHopperAdditionalPhone,\x20%s,\x20%s','request\x20sent','debug','CmHopperAdditionalPhone,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','VerifyAdditionalPhones','CmHopper','findOne','ContactId','body','ListId','VoiceQueueId','CampaignId','CmHopperAdditionalPhone','OrderBy','countbusyretry','countcongestionretry'];(function(_0x442632,_0x3b8163){var _0x2bbbf2=function(_0x5959ac){while(--_0x5959ac){_0x442632['push'](_0x442632['shift']());}};_0x2bbbf2(++_0x3b8163);}(_0x50fe,0x17b));var _0xe50f=function(_0x71fc21,_0x2f08ba){_0x71fc21=_0x71fc21-0x0;var _0x21903c=_0x50fe[_0x71fc21];return _0x21903c;};'use strict';var _=require('lodash');var util=require(_0xe50f('0x0'));var moment=require(_0xe50f('0x1'));var BPromise=require(_0xe50f('0x2'));var rs=require(_0xe50f('0x3'));var fs=require('fs');var Redis=require(_0xe50f('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xe50f('0x5'));var logger=require('../../config/logger')(_0xe50f('0x6'));var config=require(_0xe50f('0x7'));var jayson=require(_0xe50f('0x8'));var client=jayson['client'][_0xe50f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5163dc,_0x4e6fb5,_0x1e866b){return new BPromise(function(_0x25203f,_0x282d61){return client[_0xe50f('0xa')](_0x5163dc,_0x1e866b)[_0xe50f('0xb')](function(_0x4f8c5e){logger[_0xe50f('0xc')](_0xe50f('0xd'),_0x4e6fb5,_0xe50f('0xe'));logger[_0xe50f('0xf')](_0xe50f('0x10'),_0x4e6fb5,_0xe50f('0xe'),JSON['stringify'](_0x4f8c5e));if(_0x4f8c5e[_0xe50f('0x11')]){if(_0x4f8c5e['error'][_0xe50f('0x12')]===0x1f4){logger[_0xe50f('0x11')]('CmHopperAdditionalPhone,\x20%s,\x20%s',_0x4e6fb5,_0x4f8c5e['error']['message']);return _0x282d61(_0x4f8c5e[_0xe50f('0x11')]['message']);}logger[_0xe50f('0x11')](_0xe50f('0xd'),_0x4e6fb5,_0x4f8c5e[_0xe50f('0x11')][_0xe50f('0x13')]);return _0x25203f(_0x4f8c5e[_0xe50f('0x11')]['message']);}else{logger['info'](_0xe50f('0xd'),_0x4e6fb5,'request\x20sent');_0x25203f(_0x4f8c5e[_0xe50f('0x14')][_0xe50f('0x13')]);}})[_0xe50f('0x15')](function(_0x55d874){logger['error'](_0xe50f('0xd'),_0x4e6fb5,_0x55d874);_0x282d61(_0x55d874);});});}exports[_0xe50f('0x16')]=function(_0x24c6fd){var _0x4818bc=this;return new Promise(function(_0x3d50b7,_0x1f9fc5){return db[_0xe50f('0x17')][_0xe50f('0x18')]({'raw':!![],'where':{'ContactId':_0x24c6fd['body'][_0xe50f('0x19')],'ListId':_0x24c6fd[_0xe50f('0x1a')][_0xe50f('0x1b')],'VoiceQueueId':_0x24c6fd['body'][_0xe50f('0x1c')]===undefined?null:_0x24c6fd['body'][_0xe50f('0x1c')],'CampaignId':_0x24c6fd[_0xe50f('0x1a')]['CampaignId']===undefined?null:_0x24c6fd['body'][_0xe50f('0x1d')]}})[_0xe50f('0xb')](function(_0x2ab2dd){if(_0x2ab2dd!=null){return db[_0xe50f('0x1e')][_0xe50f('0x18')]({'raw':!![],'where':{'CmHopperId':_0x2ab2dd['id'],'OrderBy':{'$gt':_0x2ab2dd[_0xe50f('0x1f')]}},'order':[['OrderBy','ASC']]})[_0xe50f('0xb')](function(_0x4adeae){var _0xaee9d1=0x0;if(_0x4adeae){if(_0x4adeae[_0xe50f('0x20')]+_0x4adeae[_0xe50f('0x21')]+_0x4adeae['countnoanswerretry']+_0x4adeae[_0xe50f('0x22')]+_0x4adeae[_0xe50f('0x23')]+_0x4adeae[_0xe50f('0x24')]+_0x4adeae[_0xe50f('0x25')]+_0x4adeae[_0xe50f('0x26')]<_0x24c6fd[_0xe50f('0x27')][_0xe50f('0x28')])_0xaee9d1=0x1;_0x3d50b7({'additional':_0xaee9d1});}else{return db[_0xe50f('0x1e')][_0xe50f('0x18')]({'raw':!![],'where':{'CmHopperId':_0x2ab2dd['id']},'order':[['OrderBy',_0xe50f('0x29')]]})[_0xe50f('0xb')](function(_0x5a6c9a){var _0xb6a028=0x0;if(_0x5a6c9a){if(_0x5a6c9a[_0xe50f('0x20')]+_0x5a6c9a[_0xe50f('0x21')]+_0x5a6c9a['countnoanswerretry']+_0x5a6c9a[_0xe50f('0x22')]+_0x5a6c9a[_0xe50f('0x23')]+_0x5a6c9a['countabandonedretry']+_0x5a6c9a[_0xe50f('0x25')]+_0x5a6c9a[_0xe50f('0x26')]<_0x24c6fd['entity'][_0xe50f('0x28')])_0xb6a028=0x1;_0x3d50b7({'additional':_0xb6a028});}else{_0x3d50b7({'additional':0x0});}})[_0xe50f('0x15')](function(_0x59fab6){logger[_0xe50f('0x11')]('VerifyAdditionalPhones',_0x59fab6[_0xe50f('0x13')]);_0x1f9fc5(_0x4818bc[_0xe50f('0x11')](0x1f4,_0x59fab6[_0xe50f('0x13')]));});}})[_0xe50f('0x15')](function(_0x3dc844){logger[_0xe50f('0x11')](_0xe50f('0x16'),_0x3dc844['message']);_0x1f9fc5(_0x4818bc[_0xe50f('0x11')](0x1f4,_0x3dc844['message']));});}else _0x3d50b7({'additional':0x0});});});};exports[_0xe50f('0x2a')]=function(_0x4ae357){var _0x409516=this;return new Promise(function(_0x321e41,_0x32318e){return db[_0xe50f('0x17')]['findOne']({'raw':!![],'where':{'ContactId':_0x4ae357[_0xe50f('0x1a')][_0xe50f('0x19')],'ListId':_0x4ae357[_0xe50f('0x1a')][_0xe50f('0x1b')],'VoiceQueueId':_0x4ae357['body'][_0xe50f('0x1c')]===undefined?null:_0x4ae357[_0xe50f('0x1a')][_0xe50f('0x1c')],'CampaignId':_0x4ae357[_0xe50f('0x1a')][_0xe50f('0x1d')]===undefined?null:_0x4ae357[_0xe50f('0x1a')][_0xe50f('0x1d')]}})[_0xe50f('0xb')](function(_0x5a3887){if(_0x5a3887!=null){return db[_0xe50f('0x1e')][_0xe50f('0x18')]({'raw':!![],'where':{'CmHopperId':_0x5a3887['id'],'OrderBy':{'$gte':_0x5a3887[_0xe50f('0x1f')]}},'order':[['OrderBy',_0xe50f('0x29')]]})['then'](function(_0x5366a0){if(_0x5366a0)return activateAdditionalPhone(_0x5a3887,_0x4ae357[_0xe50f('0x1a')],_0x5366a0,_0x4ae357[_0xe50f('0x2b')],_0x4ae357[_0xe50f('0x2c')])[_0xe50f('0xb')](function(_0x402ed8){_0x321e41(_0x402ed8);});else{return db['CmHopperAdditionalPhone'][_0xe50f('0x18')]({'raw':!![],'where':{'CmHopperId':_0x5a3887['id']},'order':[[_0xe50f('0x1f'),_0xe50f('0x29')]]})[_0xe50f('0xb')](function(_0x257355){if(_0x257355)return activateAdditionalPhone(_0x5a3887,_0x4ae357[_0xe50f('0x1a')],_0x257355,_0x4ae357[_0xe50f('0x2b')],_0x4ae357['waitTime'])[_0xe50f('0xb')](function(_0x4602f0){_0x321e41(_0x4602f0);});else{_0x321e41({'id':_0x5a3887['id'],'phone':''});}})['catch'](function(_0x2050d3){logger[_0xe50f('0x11')](_0xe50f('0x16'),_0x2050d3[_0xe50f('0x13')]);_0x32318e(_0x409516[_0xe50f('0x11')](0x1f4,_0x2050d3[_0xe50f('0x13')]));});}})['catch'](function(_0x2e1c5f){logger[_0xe50f('0x11')](_0xe50f('0x16'),_0x2e1c5f[_0xe50f('0x13')]);_0x32318e(_0x409516[_0xe50f('0x11')](0x1f4,_0x2e1c5f['message']));});}else _0x321e41(0x1);});});};function activateAdditionalPhone(_0x1332bf,_0xea1efd,_0x4509f3,_0x491574,_0x424181){return new Promise(function(_0x4700a5,_0x15ba8a){var _0x599b2f;if(_['isNil'](_0x4509f3[_0xe50f('0x2d')])){_0x4509f3[_0xe50f('0x2d')]=moment();}if(moment()>moment(_0x4509f3[_0xe50f('0x2d')])){_0x599b2f=moment()[_0xe50f('0x2e')](_0x424181||0x3,_0xe50f('0x2f'));}else{if(_0x4509f3['OrderBy']==0x0){_0x599b2f=moment(_0x4509f3['scheduledat']);}else{_0x599b2f=moment()['add'](_0x424181||0x3,'minutes');}}if(_[_0xe50f('0x30')](_0x599b2f)){_0x599b2f=moment()[_0xe50f('0x2e')](_0x424181||0x3,_0xe50f('0x2f'));}var _0x1f3480={'phone':_0x1332bf[_0xe50f('0x31')],'active':0x0,'OrderBy':_['isNil'](_0x1332bf['OrderBy'])?0x0:_0x1332bf[_0xe50f('0x1f')],'scheduledat':moment()['add'](_0x491574||0x1,'minutes'),'countbusyretry':_0xea1efd['countbusyretry'],'countcongestionretry':_0xea1efd[_0xe50f('0x21')],'countnoanswerretry':_0xea1efd[_0xe50f('0x32')],'countnosuchnumberretry':_0xea1efd['countnosuchnumberretry'],'countdropretry':_0xea1efd[_0xe50f('0x23')],'countabandonedretry':_0xea1efd[_0xe50f('0x24')],'countmachineretry':_0xea1efd[_0xe50f('0x25')],'countagentrejectretry':_0xea1efd[_0xe50f('0x26')],'createdAt':_0xea1efd[_0xe50f('0x33')],'updatedAt':_0xea1efd[_0xe50f('0x34')]};var _0x1ead92={'CmHopperId':_0x1332bf['id'],'phone':_0x4509f3[_0xe50f('0x31')],'active':0x0,'OrderBy':_[_0xe50f('0x30')](_0x4509f3[_0xe50f('0x1f')])?0x0:_0x4509f3['OrderBy'],'scheduledat':_0x599b2f,'countbusyretry':_0x4509f3[_0xe50f('0x20')],'countcongestionretry':_0x4509f3[_0xe50f('0x21')],'countnoanswerretry':_0x4509f3[_0xe50f('0x32')],'countnosuchnumberretry':_0x4509f3[_0xe50f('0x22')],'countdropretry':_0x4509f3[_0xe50f('0x23')],'countabandonedretry':_0x4509f3[_0xe50f('0x24')],'countmachineretry':_0x4509f3[_0xe50f('0x25')],'countagentrejectretry':_0x4509f3[_0xe50f('0x26')],'createdAt':_0x4509f3[_0xe50f('0x33')],'updatedAt':_0x4509f3[_0xe50f('0x34')]};return db[_0xe50f('0x35')][_0xe50f('0x36')](function(_0x3057ff){return db[_0xe50f('0x1e')][_0xe50f('0x37')](_0x1f3480,{'where':{'id':_0x4509f3['id']}},{'transaction':_0x3057ff})[_0xe50f('0xb')](function(){return db[_0xe50f('0x17')][_0xe50f('0x37')](_0x1ead92,{'where':{'id':_0x1332bf['id']}},{'transaction':_0x3057ff});});})[_0xe50f('0xb')](function(_0x594709){_0x4700a5({'id':_0x1332bf['id'],'phone':_0x4509f3[_0xe50f('0x31')]});})[_0xe50f('0x15')](function(_0x4d8795){logger[_0xe50f('0x11')](_0xe50f('0x38'),_0x4d8795[_0xe50f('0x13')]);_0x15ba8a({'error':_0x4d8795[_0xe50f('0x13')]});});});}exports['IncrementPreviewCounters']=function(_0x136731){var _0x3cfef5=this;return new Promise(function(_0x448d3d,_0x3c6a9b){return db[_0xe50f('0x17')]['update'](_0x136731[_0xe50f('0x1a')][_0xe50f('0x39')],{'where':{'id':_0x136731[_0xe50f('0x1a')]['id']}})[_0xe50f('0xb')](function(_0x218fc4){_0x448d3d(_0x218fc4);})[_0xe50f('0x15')](function(_0x4861ab){logger[_0xe50f('0x11')](_0xe50f('0x3a'),_0x4861ab['message']);_0x3c6a9b(_0x3cfef5[_0xe50f('0x11')](0x1f4,_0x4861ab['message']));});});};
\ No newline at end of file
+var _0xe3f6=['phone','activateAdditionalPhone','IncrementPreviewCounters','field','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','request','then','CmHopperAdditionalPhone,\x20%s,\x20%s','request\x20sent','debug','CmHopperAdditionalPhone,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','VerifyAdditionalPhones','CmHopper','findOne','body','ContactId','ListId','VoiceQueueId','CampaignId','CmHopperAdditionalPhone','OrderBy','countbusyretry','countnoanswerretry','countdropretry','countmachineretry','countnosuchnumberretry','countabandonedretry','countagentrejectretry','entity','dialGlobalMaxRetry','ASC','duration','waitTime','scheduledat','minutes','add','isNil','countcongestionretry','updatedAt','createdAt','sequelize','update'];(function(_0x1259a0,_0x1f3316){var _0x1a8ff2=function(_0x502de8){while(--_0x502de8){_0x1259a0['push'](_0x1259a0['shift']());}};_0x1a8ff2(++_0x1f3316);}(_0xe3f6,0x7a));var _0x6e3f=function(_0x486f4a,_0x478dc7){_0x486f4a=_0x486f4a-0x0;var _0x135d99=_0xe3f6[_0x486f4a];return _0x135d99;};'use strict';var _=require(_0x6e3f('0x0'));var util=require(_0x6e3f('0x1'));var moment=require('moment');var BPromise=require(_0x6e3f('0x2'));var rs=require(_0x6e3f('0x3'));var fs=require('fs');var Redis=require(_0x6e3f('0x4'));var db=require(_0x6e3f('0x5'))['db'];var utils=require(_0x6e3f('0x6'));var logger=require(_0x6e3f('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0x6e3f('0x8'));var client=jayson[_0x6e3f('0x9')][_0x6e3f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5537fa,_0x194421,_0x3d7842){return new BPromise(function(_0x4fd676,_0x319277){return client[_0x6e3f('0xb')](_0x5537fa,_0x3d7842)[_0x6e3f('0xc')](function(_0x432316){logger['info'](_0x6e3f('0xd'),_0x194421,_0x6e3f('0xe'));logger[_0x6e3f('0xf')](_0x6e3f('0x10'),_0x194421,_0x6e3f('0xe'),JSON[_0x6e3f('0x11')](_0x432316));if(_0x432316[_0x6e3f('0x12')]){if(_0x432316['error'][_0x6e3f('0x13')]===0x1f4){logger[_0x6e3f('0x12')](_0x6e3f('0xd'),_0x194421,_0x432316['error']['message']);return _0x319277(_0x432316[_0x6e3f('0x12')][_0x6e3f('0x14')]);}logger[_0x6e3f('0x12')]('CmHopperAdditionalPhone,\x20%s,\x20%s',_0x194421,_0x432316['error'][_0x6e3f('0x14')]);return _0x4fd676(_0x432316['error'][_0x6e3f('0x14')]);}else{logger[_0x6e3f('0x15')](_0x6e3f('0xd'),_0x194421,'request\x20sent');_0x4fd676(_0x432316[_0x6e3f('0x16')][_0x6e3f('0x14')]);}})[_0x6e3f('0x17')](function(_0x3157ce){logger[_0x6e3f('0x12')](_0x6e3f('0xd'),_0x194421,_0x3157ce);_0x319277(_0x3157ce);});});}exports[_0x6e3f('0x18')]=function(_0xa3897){var _0x311d7c=this;return new Promise(function(_0x30626c,_0x522799){return db[_0x6e3f('0x19')][_0x6e3f('0x1a')]({'raw':!![],'where':{'ContactId':_0xa3897[_0x6e3f('0x1b')][_0x6e3f('0x1c')],'ListId':_0xa3897[_0x6e3f('0x1b')][_0x6e3f('0x1d')],'VoiceQueueId':_0xa3897[_0x6e3f('0x1b')]['VoiceQueueId']===undefined?null:_0xa3897['body'][_0x6e3f('0x1e')],'CampaignId':_0xa3897['body'][_0x6e3f('0x1f')]===undefined?null:_0xa3897[_0x6e3f('0x1b')][_0x6e3f('0x1f')]}})[_0x6e3f('0xc')](function(_0x630614){if(_0x630614!=null){return db[_0x6e3f('0x20')][_0x6e3f('0x1a')]({'raw':!![],'where':{'CmHopperId':_0x630614['id'],'OrderBy':{'$gt':_0x630614[_0x6e3f('0x21')]}},'order':[[_0x6e3f('0x21'),'ASC']]})['then'](function(_0x43155e){var _0x5240ce=0x0;if(_0x43155e){if(_0x43155e[_0x6e3f('0x22')]+_0x43155e['countcongestionretry']+_0x43155e[_0x6e3f('0x23')]+_0x43155e['countnosuchnumberretry']+_0x43155e[_0x6e3f('0x24')]+_0x43155e['countabandonedretry']+_0x43155e[_0x6e3f('0x25')]+_0x43155e['countagentrejectretry']<_0xa3897['entity']['dialGlobalMaxRetry'])_0x5240ce=0x1;_0x30626c({'additional':_0x5240ce});}else{return db['CmHopperAdditionalPhone'][_0x6e3f('0x1a')]({'raw':!![],'where':{'CmHopperId':_0x630614['id']},'order':[['OrderBy','ASC']]})['then'](function(_0x291581){var _0x4d5d48=0x0;if(_0x291581){if(_0x291581[_0x6e3f('0x22')]+_0x291581['countcongestionretry']+_0x291581[_0x6e3f('0x23')]+_0x291581[_0x6e3f('0x26')]+_0x291581[_0x6e3f('0x24')]+_0x291581[_0x6e3f('0x27')]+_0x291581[_0x6e3f('0x25')]+_0x291581[_0x6e3f('0x28')]<_0xa3897[_0x6e3f('0x29')][_0x6e3f('0x2a')])_0x4d5d48=0x1;_0x30626c({'additional':_0x4d5d48});}else{_0x30626c({'additional':0x0});}})['catch'](function(_0x52adc4){logger[_0x6e3f('0x12')](_0x6e3f('0x18'),_0x52adc4[_0x6e3f('0x14')]);_0x522799(_0x311d7c[_0x6e3f('0x12')](0x1f4,_0x52adc4[_0x6e3f('0x14')]));});}})[_0x6e3f('0x17')](function(_0x4b96a8){logger[_0x6e3f('0x12')]('VerifyAdditionalPhones',_0x4b96a8[_0x6e3f('0x14')]);_0x522799(_0x311d7c[_0x6e3f('0x12')](0x1f4,_0x4b96a8[_0x6e3f('0x14')]));});}else _0x30626c({'additional':0x0});});});};exports['SwapAdditionalPhones']=function(_0x4b12a5){var _0x19134f=this;return new Promise(function(_0x338a9c,_0x3a4c34){return db['CmHopper'][_0x6e3f('0x1a')]({'raw':!![],'where':{'ContactId':_0x4b12a5[_0x6e3f('0x1b')][_0x6e3f('0x1c')],'ListId':_0x4b12a5[_0x6e3f('0x1b')]['ListId'],'VoiceQueueId':_0x4b12a5['body'][_0x6e3f('0x1e')]===undefined?null:_0x4b12a5[_0x6e3f('0x1b')][_0x6e3f('0x1e')],'CampaignId':_0x4b12a5['body'][_0x6e3f('0x1f')]===undefined?null:_0x4b12a5[_0x6e3f('0x1b')][_0x6e3f('0x1f')]}})['then'](function(_0x2fe03c){if(_0x2fe03c!=null){return db[_0x6e3f('0x20')][_0x6e3f('0x1a')]({'raw':!![],'where':{'CmHopperId':_0x2fe03c['id'],'OrderBy':{'$gte':_0x2fe03c[_0x6e3f('0x21')]}},'order':[[_0x6e3f('0x21'),_0x6e3f('0x2b')]]})[_0x6e3f('0xc')](function(_0x43afb7){if(_0x43afb7)return activateAdditionalPhone(_0x2fe03c,_0x4b12a5[_0x6e3f('0x1b')],_0x43afb7,_0x4b12a5[_0x6e3f('0x2c')],_0x4b12a5[_0x6e3f('0x2d')])[_0x6e3f('0xc')](function(_0x54bfba){_0x338a9c(_0x54bfba);});else{return db['CmHopperAdditionalPhone'][_0x6e3f('0x1a')]({'raw':!![],'where':{'CmHopperId':_0x2fe03c['id']},'order':[[_0x6e3f('0x21'),_0x6e3f('0x2b')]]})['then'](function(_0x4ed2b4){if(_0x4ed2b4)return activateAdditionalPhone(_0x2fe03c,_0x4b12a5[_0x6e3f('0x1b')],_0x4ed2b4,_0x4b12a5['duration'],_0x4b12a5['waitTime'])[_0x6e3f('0xc')](function(_0x38d79d){_0x338a9c(_0x38d79d);});else{_0x338a9c({'id':_0x2fe03c['id'],'phone':''});}})[_0x6e3f('0x17')](function(_0x3f41be){logger[_0x6e3f('0x12')](_0x6e3f('0x18'),_0x3f41be[_0x6e3f('0x14')]);_0x3a4c34(_0x19134f[_0x6e3f('0x12')](0x1f4,_0x3f41be[_0x6e3f('0x14')]));});}})[_0x6e3f('0x17')](function(_0x2a4646){logger[_0x6e3f('0x12')](_0x6e3f('0x18'),_0x2a4646[_0x6e3f('0x14')]);_0x3a4c34(_0x19134f[_0x6e3f('0x12')](0x1f4,_0x2a4646[_0x6e3f('0x14')]));});}else _0x338a9c(0x1);});});};function activateAdditionalPhone(_0x4c2084,_0x25040b,_0x3fb2a6,_0x13d347,_0x4c5f76){return new Promise(function(_0x432e70,_0x15c9b3){var _0xf063d5;if(_['isNil'](_0x3fb2a6[_0x6e3f('0x2e')])){_0x3fb2a6['scheduledat']=moment();}if(moment()>moment(_0x3fb2a6[_0x6e3f('0x2e')])){_0xf063d5=moment()['add'](_0x4c5f76||0x3,_0x6e3f('0x2f'));}else{if(_0x3fb2a6[_0x6e3f('0x21')]==0x0){_0xf063d5=moment(_0x3fb2a6[_0x6e3f('0x2e')]);}else{_0xf063d5=moment()[_0x6e3f('0x30')](_0x4c5f76||0x3,_0x6e3f('0x2f'));}}if(_['isNil'](_0xf063d5)){_0xf063d5=moment()[_0x6e3f('0x30')](_0x4c5f76||0x3,_0x6e3f('0x2f'));}var _0x3d742e={'phone':_0x4c2084['phone'],'active':0x0,'OrderBy':_[_0x6e3f('0x31')](_0x4c2084[_0x6e3f('0x21')])?0x0:_0x4c2084['OrderBy'],'scheduledat':moment()[_0x6e3f('0x30')](_0x13d347||0x1,'minutes'),'countbusyretry':_0x25040b[_0x6e3f('0x22')],'countcongestionretry':_0x25040b[_0x6e3f('0x32')],'countnoanswerretry':_0x25040b[_0x6e3f('0x23')],'countnosuchnumberretry':_0x25040b[_0x6e3f('0x26')],'countdropretry':_0x25040b[_0x6e3f('0x24')],'countabandonedretry':_0x25040b[_0x6e3f('0x27')],'countmachineretry':_0x25040b[_0x6e3f('0x25')],'countagentrejectretry':_0x25040b[_0x6e3f('0x28')],'createdAt':_0x25040b['createdAt'],'updatedAt':_0x25040b[_0x6e3f('0x33')]};var _0x1e1b1f={'CmHopperId':_0x4c2084['id'],'phone':_0x3fb2a6['phone'],'active':0x0,'OrderBy':_[_0x6e3f('0x31')](_0x3fb2a6['OrderBy'])?0x0:_0x3fb2a6['OrderBy'],'scheduledat':_0xf063d5,'countbusyretry':_0x3fb2a6['countbusyretry'],'countcongestionretry':_0x3fb2a6[_0x6e3f('0x32')],'countnoanswerretry':_0x3fb2a6[_0x6e3f('0x23')],'countnosuchnumberretry':_0x3fb2a6[_0x6e3f('0x26')],'countdropretry':_0x3fb2a6[_0x6e3f('0x24')],'countabandonedretry':_0x3fb2a6['countabandonedretry'],'countmachineretry':_0x3fb2a6[_0x6e3f('0x25')],'countagentrejectretry':_0x3fb2a6[_0x6e3f('0x28')],'createdAt':_0x3fb2a6[_0x6e3f('0x34')],'updatedAt':_0x3fb2a6['updatedAt']};return db[_0x6e3f('0x35')]['transaction'](function(_0x389457){return db[_0x6e3f('0x20')][_0x6e3f('0x36')](_0x3d742e,{'where':{'id':_0x3fb2a6['id']}},{'transaction':_0x389457})['then'](function(){return db[_0x6e3f('0x19')]['update'](_0x1e1b1f,{'where':{'id':_0x4c2084['id']}},{'transaction':_0x389457});});})[_0x6e3f('0xc')](function(_0x299b78){_0x432e70({'id':_0x4c2084['id'],'phone':_0x3fb2a6[_0x6e3f('0x37')]});})[_0x6e3f('0x17')](function(_0x46408c){logger[_0x6e3f('0x12')](_0x6e3f('0x38'),_0x46408c[_0x6e3f('0x14')]);_0x15c9b3({'error':_0x46408c[_0x6e3f('0x14')]});});});}exports[_0x6e3f('0x39')]=function(_0x292508){var _0x4e7287=this;return new Promise(function(_0x3e036f,_0xf77170){return db[_0x6e3f('0x19')][_0x6e3f('0x36')](_0x292508[_0x6e3f('0x1b')][_0x6e3f('0x3a')],{'where':{'id':_0x292508[_0x6e3f('0x1b')]['id']}})[_0x6e3f('0xc')](function(_0x429199){_0x3e036f(_0x429199);})['catch'](function(_0x500f2d){logger['error'](_0x6e3f('0x39'),_0x500f2d['message']);_0xf77170(_0x4e7287[_0x6e3f('0x12')](0x1f4,_0x500f2d[_0x6e3f('0x14')]));});});};
\ No newline at end of file
index 4eaf912..ad56e8f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbae9=['isAuthenticated','create','put','update','delete','/:id','destroy','exports','multer','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmHopperAdditionalPhone.controller','get','index','show'];(function(_0x1d0770,_0x4711d4){var _0x5bc7fa=function(_0x2ce7a8){while(--_0x2ce7a8){_0x1d0770['push'](_0x1d0770['shift']());}};_0x5bc7fa(++_0x4711d4);}(_0xbae9,0x197));var _0x9bae=function(_0x5ad220,_0x27407e){_0x5ad220=_0x5ad220-0x0;var _0xdec77d=_0xbae9[_0x5ad220];return _0xdec77d;};'use strict';var multer=require(_0x9bae('0x0'));var util=require('util');var path=require(_0x9bae('0x1'));var timeout=require(_0x9bae('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x9bae('0x3'));var auth=require(_0x9bae('0x4'));var interaction=require(_0x9bae('0x5'));var config=require(_0x9bae('0x6'));var controller=require(_0x9bae('0x7'));router[_0x9bae('0x8')]('/',auth['isAuthenticated'](),controller[_0x9bae('0x9')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0x9bae('0xa')]);router['post']('/',auth[_0x9bae('0xb')](),controller[_0x9bae('0xc')]);router[_0x9bae('0xd')]('/:id',auth[_0x9bae('0xb')](),controller[_0x9bae('0xe')]);router[_0x9bae('0xf')](_0x9bae('0x10'),auth[_0x9bae('0xb')](),controller[_0x9bae('0x11')]);module[_0x9bae('0x12')]=router;
\ No newline at end of file
+var _0x5eb1=['/:id','update','delete','destroy','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./cmHopperAdditionalPhone.controller','get','index','isAuthenticated','show','post','create','put'];(function(_0x3cd218,_0x12bed8){var _0x26a894=function(_0x28eaf9){while(--_0x28eaf9){_0x3cd218['push'](_0x3cd218['shift']());}};_0x26a894(++_0x12bed8);}(_0x5eb1,0x7c));var _0x15eb=function(_0x4c42ff,_0x3d3d75){_0x4c42ff=_0x4c42ff-0x0;var _0x27387f=_0x5eb1[_0x4c42ff];return _0x27387f;};'use strict';var multer=require('multer');var util=require(_0x15eb('0x0'));var path=require(_0x15eb('0x1'));var timeout=require(_0x15eb('0x2'));var express=require(_0x15eb('0x3'));var router=express[_0x15eb('0x4')]();var fs_extra=require(_0x15eb('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x15eb('0x6'));var config=require(_0x15eb('0x7'));var controller=require(_0x15eb('0x8'));router[_0x15eb('0x9')]('/',auth['isAuthenticated'](),controller[_0x15eb('0xa')]);router[_0x15eb('0x9')]('/:id',auth[_0x15eb('0xb')](),controller[_0x15eb('0xc')]);router[_0x15eb('0xd')]('/',auth[_0x15eb('0xb')](),controller[_0x15eb('0xe')]);router[_0x15eb('0xf')](_0x15eb('0x10'),auth[_0x15eb('0xb')](),controller[_0x15eb('0x11')]);router[_0x15eb('0x12')](_0x15eb('0x10'),auth[_0x15eb('0xb')](),controller[_0x15eb('0x13')]);module['exports']=router;
\ No newline at end of file
index 6305f47..018bd3d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2014=['sequelize','exports','INTEGER','contactListQueue','moment'];(function(_0x468dad,_0x322380){var _0x2a004e=function(_0x362c27){while(--_0x362c27){_0x468dad['push'](_0x468dad['shift']());}};_0x2a004e(++_0x322380);}(_0x2014,0x103));var _0x4201=function(_0x59d3d7,_0x1631f5){_0x59d3d7=_0x59d3d7-0x0;var _0x2ade5c=_0x2014[_0x59d3d7];return _0x2ade5c;};'use strict';var moment=require(_0x4201('0x0'));var Sequelize=require(_0x4201('0x1'));module[_0x4201('0x2')]={'phone':{'type':Sequelize['STRING'],'allowNull':![]},'ContactId':{'type':Sequelize[_0x4201('0x3')],'unique':_0x4201('0x4')},'ListId':{'type':Sequelize[_0x4201('0x3')],'unique':_0x4201('0x4')},'VoiceQueueId':{'type':Sequelize['INTEGER'],'unique':_0x4201('0x4')}};
\ No newline at end of file
+var _0x6e0e=['moment','sequelize','exports','STRING','INTEGER','contactListQueue'];(function(_0x55b34b,_0x11d41c){var _0x1aacad=function(_0xe3b1fe){while(--_0xe3b1fe){_0x55b34b['push'](_0x55b34b['shift']());}};_0x1aacad(++_0x11d41c);}(_0x6e0e,0x90));var _0xe6e0=function(_0x321a71,_0x509b81){_0x321a71=_0x321a71-0x0;var _0x57cea2=_0x6e0e[_0x321a71];return _0x57cea2;};'use strict';var moment=require(_0xe6e0('0x0'));var Sequelize=require(_0xe6e0('0x1'));module[_0xe6e0('0x2')]={'phone':{'type':Sequelize[_0xe6e0('0x3')],'allowNull':![]},'ContactId':{'type':Sequelize[_0xe6e0('0x4')],'unique':'contactListQueue'},'ListId':{'type':Sequelize[_0xe6e0('0x4')],'unique':_0xe6e0('0x5')},'VoiceQueueId':{'type':Sequelize[_0xe6e0('0x4')],'unique':_0xe6e0('0x5')}};
\ No newline at end of file
index cb8f21c..3704063 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0079=['zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','offset','limit','undefined','count','set','Content-Range','json','save','update','then','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','CmHopperBlack','includeAll','rows','params','include','options','find','catch','body','describe','eml-format'];(function(_0x5a2436,_0x11375a){var _0x2d8468=function(_0x5b77b9){while(--_0x5b77b9){_0x5a2436['push'](_0x5a2436['shift']());}};_0x2d8468(++_0x11375a);}(_0x0079,0x16c));var _0x9007=function(_0x3afbae,_0x5535c3){_0x3afbae=_0x3afbae-0x0;var _0x126d86=_0x0079[_0x3afbae];return _0x126d86;};'use strict';var emlformat=require(_0x9007('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x9007('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x9007('0x2'));var moment=require(_0x9007('0x3'));var BPromise=require(_0x9007('0x4'));var Mustache=require(_0x9007('0x5'));var util=require(_0x9007('0x6'));var path=require(_0x9007('0x7'));var sox=require(_0x9007('0x8'));var csv=require('to-csv');var ejs=require(_0x9007('0x9'));var fs=require('fs');var fs_extra=require(_0x9007('0xa'));var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x9007('0xb'));var deskjs=require(_0x9007('0xc'));var toCsv=require(_0x9007('0xd'));var querystring=require(_0x9007('0xe'));var Papa=require(_0x9007('0xf'));var Redis=require('ioredis');var authService=require(_0x9007('0x10'));var qs=require(_0x9007('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x9007('0x12'));var logger=require(_0x9007('0x13'))(_0x9007('0x14'));var utils=require(_0x9007('0x15'));var config=require(_0x9007('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0x9007('0x17'))['db'];function respondWithStatusCode(_0x44a4d3,_0x1845d8){_0x1845d8=_0x1845d8||0xcc;return function(_0x569e6c){if(_0x569e6c){return _0x44a4d3[_0x9007('0x18')](_0x1845d8);}return _0x44a4d3[_0x9007('0x19')](_0x1845d8)[_0x9007('0x1a')]();};}function respondWithResult(_0x4fdf42,_0x697589){_0x697589=_0x697589||0xc8;return function(_0x17e13f){if(_0x17e13f){return _0x4fdf42[_0x9007('0x19')](_0x697589)['json'](_0x17e13f);}};}function respondWithFilteredResult(_0x2afbdc,_0x2d318b){return function(_0x1ffcb0){if(_0x1ffcb0){var _0x3f74bd=typeof _0x2d318b[_0x9007('0x1b')]==='undefined'&&typeof _0x2d318b[_0x9007('0x1c')]===_0x9007('0x1d');var _0x2f8e19=_0x1ffcb0[_0x9007('0x1e')];var _0x4a0dcb=_0x3f74bd?0x0:_0x2d318b[_0x9007('0x1b')];var _0x1af394=_0x3f74bd?_0x1ffcb0[_0x9007('0x1e')]:_0x2d318b['offset']+_0x2d318b[_0x9007('0x1c')];var _0xbfae2e;if(_0x1af394>=_0x2f8e19){_0x1af394=_0x2f8e19;_0xbfae2e=0xc8;}else{_0xbfae2e=0xce;}_0x2afbdc[_0x9007('0x19')](_0xbfae2e);return _0x2afbdc[_0x9007('0x1f')](_0x9007('0x20'),_0x4a0dcb+'-'+_0x1af394+'/'+_0x2f8e19)[_0x9007('0x21')](_0x1ffcb0);}return null;};}function patchUpdates(_0x152827){return function(_0x3d1b0e){try{jsonpatch['apply'](_0x3d1b0e,_0x152827,!![]);}catch(_0x1ebf10){return BPromise['reject'](_0x1ebf10);}return _0x3d1b0e[_0x9007('0x22')]();};}function saveUpdates(_0x14fb85,_0x3f28e9){return function(_0x35c60c){if(_0x35c60c){return _0x35c60c[_0x9007('0x23')](_0x14fb85)[_0x9007('0x24')](function(_0x3f576c){return _0x3f576c;});}return null;};}function removeEntity(_0x39a88d,_0x231fe7){return function(_0x3b3938){if(_0x3b3938){return _0x3b3938['destroy']()[_0x9007('0x24')](function(){_0x39a88d[_0x9007('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x32dcf4,_0x13417a){return function(_0x192040){if(!_0x192040){_0x32dcf4[_0x9007('0x18')](0x194);}return _0x192040;};}function handleError(_0x26048d,_0x1577fd){_0x1577fd=_0x1577fd||0x1f4;return function(_0x4f42e2){logger[_0x9007('0x25')](_0x4f42e2[_0x9007('0x26')]);if(_0x4f42e2[_0x9007('0x27')]){delete _0x4f42e2['name'];}_0x26048d['status'](_0x1577fd)[_0x9007('0x28')](_0x4f42e2);};}exports[_0x9007('0x29')]=function(_0x345a9d,_0x1b946c){var _0x1fbef6={},_0x227d24={},_0x29712a={'count':0x0,'rows':[]};var _0x2b0171=_[_0x9007('0x2a')](db['CmHopperBlack'][_0x9007('0x2b')],function(_0x554326){return{'name':_0x554326[_0x9007('0x2c')],'type':_0x554326[_0x9007('0x2d')][_0x9007('0x2e')]};});_0x227d24[_0x9007('0x2f')]=_['map'](_0x2b0171,_0x9007('0x27'));_0x227d24['query']=_[_0x9007('0x30')](_0x345a9d[_0x9007('0x31')]);_0x227d24[_0x9007('0x32')]=_[_0x9007('0x33')](_0x227d24[_0x9007('0x2f')],_0x227d24[_0x9007('0x31')]);_0x1fbef6['attributes']=_[_0x9007('0x33')](_0x227d24[_0x9007('0x2f')],qs['fields'](_0x345a9d[_0x9007('0x31')][_0x9007('0x34')]));_0x1fbef6[_0x9007('0x35')]=_0x1fbef6['attributes'][_0x9007('0x36')]?_0x1fbef6[_0x9007('0x35')]:_0x227d24['model'];if(!_0x345a9d['query'][_0x9007('0x37')](_0x9007('0x38'))){_0x1fbef6[_0x9007('0x1c')]=qs[_0x9007('0x1c')](_0x345a9d[_0x9007('0x31')][_0x9007('0x1c')]);_0x1fbef6[_0x9007('0x1b')]=qs[_0x9007('0x1b')](_0x345a9d[_0x9007('0x31')][_0x9007('0x1b')]);}_0x1fbef6[_0x9007('0x39')]=qs[_0x9007('0x3a')](_0x345a9d[_0x9007('0x31')][_0x9007('0x3a')]);_0x1fbef6[_0x9007('0x3b')]=qs[_0x9007('0x32')](_[_0x9007('0x3c')](_0x345a9d['query'],_0x227d24[_0x9007('0x32')]),_0x2b0171);if(_0x345a9d[_0x9007('0x31')][_0x9007('0x3d')]){_0x1fbef6[_0x9007('0x3b')]=_[_0x9007('0x3e')](_0x1fbef6['where'],{'$or':_[_0x9007('0x2a')](_0x2b0171,function(_0xfec923){if(_0xfec923[_0x9007('0x2d')]!=='VIRTUAL'){var _0x5d2d3f={};_0x5d2d3f[_0xfec923[_0x9007('0x27')]]={'$like':'%'+_0x345a9d[_0x9007('0x31')]['filter']+'%'};return _0x5d2d3f;}})});}_0x1fbef6=_[_0x9007('0x3e')]({},_0x1fbef6,_0x345a9d['options']);var _0xa468c4={'where':_0x1fbef6['where']};return db[_0x9007('0x3f')][_0x9007('0x1e')](_0xa468c4)['then'](function(_0x17f5f8){_0x29712a[_0x9007('0x1e')]=_0x17f5f8;if(_0x345a9d['query'][_0x9007('0x40')]){_0x1fbef6['include']=[{'all':!![]}];}return db[_0x9007('0x3f')]['findAll'](_0x1fbef6);})[_0x9007('0x24')](function(_0x52f970){_0x29712a[_0x9007('0x41')]=_0x52f970;return _0x29712a;})['then'](respondWithFilteredResult(_0x1b946c,_0x1fbef6))['catch'](handleError(_0x1b946c,null));};exports['show']=function(_0x1f0f52,_0x52fd09){var _0x40204d={'raw':!![],'where':{'id':_0x1f0f52[_0x9007('0x42')]['id']}},_0x4062c9={};_0x4062c9[_0x9007('0x2f')]=_[_0x9007('0x30')](db[_0x9007('0x3f')][_0x9007('0x2b')]);_0x4062c9[_0x9007('0x31')]=_[_0x9007('0x30')](_0x1f0f52[_0x9007('0x31')]);_0x4062c9[_0x9007('0x32')]=_[_0x9007('0x33')](_0x4062c9[_0x9007('0x2f')],_0x4062c9[_0x9007('0x31')]);_0x40204d[_0x9007('0x35')]=_[_0x9007('0x33')](_0x4062c9['model'],qs['fields'](_0x1f0f52[_0x9007('0x31')][_0x9007('0x34')]));_0x40204d[_0x9007('0x35')]=_0x40204d[_0x9007('0x35')][_0x9007('0x36')]?_0x40204d[_0x9007('0x35')]:_0x4062c9['model'];if(_0x1f0f52[_0x9007('0x31')][_0x9007('0x40')]){_0x40204d[_0x9007('0x43')]=[{'all':!![]}];}_0x40204d=_[_0x9007('0x3e')]({},_0x40204d,_0x1f0f52[_0x9007('0x44')]);return db['CmHopperBlack'][_0x9007('0x45')](_0x40204d)[_0x9007('0x24')](handleEntityNotFound(_0x52fd09,null))['then'](respondWithResult(_0x52fd09,null))[_0x9007('0x46')](handleError(_0x52fd09,null));};exports[_0x9007('0x23')]=function(_0x4acc3f,_0x10f3fe){if(_0x4acc3f[_0x9007('0x47')]['id']){delete _0x4acc3f[_0x9007('0x47')]['id'];}return db[_0x9007('0x3f')][_0x9007('0x45')]({'where':{'id':_0x4acc3f['params']['id']}})[_0x9007('0x24')](handleEntityNotFound(_0x10f3fe,null))['then'](saveUpdates(_0x4acc3f[_0x9007('0x47')],null))['then'](respondWithResult(_0x10f3fe,null))[_0x9007('0x46')](handleError(_0x10f3fe,null));};exports['destroy']=function(_0x470e67,_0xba5d67){return db[_0x9007('0x3f')][_0x9007('0x45')]({'where':{'id':_0x470e67[_0x9007('0x42')]['id']}})['then'](handleEntityNotFound(_0xba5d67,null))[_0x9007('0x24')](removeEntity(_0xba5d67,null))['catch'](handleError(_0xba5d67,null));};exports[_0x9007('0x48')]=function(_0x5b0d6a,_0x48c0c4){return db['CmHopperBlack'][_0x9007('0x48')]()['then'](respondWithResult(_0x48c0c4,null))[_0x9007('0x46')](handleError(_0x48c0c4,null));};
\ No newline at end of file
+var _0xe643=['../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','offset','undefined','limit','count','set','json','apply','reject','save','update','then','destroy','error','stack','name','index','map','CmHopperBlack','fieldName','type','key','model','query','keys','filters','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','catch','show','params','rawAttributes','intersection','body','find','describe','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs'];(function(_0x13e741,_0x5d3c24){var _0x3f8bb3=function(_0x4440a0){while(--_0x4440a0){_0x13e741['push'](_0x13e741['shift']());}};_0x3f8bb3(++_0x5d3c24);}(_0xe643,0x84));var _0x3e64=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0xe643[_0x502c7d];return _0x30b7ed;};'use strict';var emlformat=require(_0x3e64('0x0'));var rimraf=require(_0x3e64('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x3e64('0x2'));var rp=require('request-promise');var moment=require(_0x3e64('0x3'));var BPromise=require(_0x3e64('0x4'));var Mustache=require(_0x3e64('0x5'));var util=require(_0x3e64('0x6'));var path=require(_0x3e64('0x7'));var sox=require('sox');var csv=require(_0x3e64('0x8'));var ejs=require(_0x3e64('0x9'));var fs=require('fs');var fs_extra=require(_0x3e64('0xa'));var _=require(_0x3e64('0xb'));var squel=require(_0x3e64('0xc'));var crypto=require(_0x3e64('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x3e64('0xe'));var toCsv=require(_0x3e64('0x8'));var querystring=require(_0x3e64('0xf'));var Papa=require(_0x3e64('0x10'));var Redis=require(_0x3e64('0x11'));var authService=require(_0x3e64('0x12'));var qs=require(_0x3e64('0x13'));var as=require(_0x3e64('0x14'));var hardwareService=require(_0x3e64('0x15'));var logger=require(_0x3e64('0x16'))('api');var utils=require(_0x3e64('0x17'));var config=require(_0x3e64('0x18'));var licenseUtil=require(_0x3e64('0x19'));var db=require(_0x3e64('0x1a'))['db'];function respondWithStatusCode(_0x476a4d,_0x3418cf){_0x3418cf=_0x3418cf||0xcc;return function(_0x2a2186){if(_0x2a2186){return _0x476a4d[_0x3e64('0x1b')](_0x3418cf);}return _0x476a4d[_0x3e64('0x1c')](_0x3418cf)['end']();};}function respondWithResult(_0x7610d5,_0x438b13){_0x438b13=_0x438b13||0xc8;return function(_0x8232e4){if(_0x8232e4){return _0x7610d5['status'](_0x438b13)['json'](_0x8232e4);}};}function respondWithFilteredResult(_0x4eab61,_0x4bafd0){return function(_0x4a8488){if(_0x4a8488){var _0x4d58da=typeof _0x4bafd0[_0x3e64('0x1d')]===_0x3e64('0x1e')&&typeof _0x4bafd0[_0x3e64('0x1f')]===_0x3e64('0x1e');var _0x395fd6=_0x4a8488[_0x3e64('0x20')];var _0x33fb55=_0x4d58da?0x0:_0x4bafd0[_0x3e64('0x1d')];var _0x395e8b=_0x4d58da?_0x4a8488['count']:_0x4bafd0[_0x3e64('0x1d')]+_0x4bafd0['limit'];var _0x5ba990;if(_0x395e8b>=_0x395fd6){_0x395e8b=_0x395fd6;_0x5ba990=0xc8;}else{_0x5ba990=0xce;}_0x4eab61[_0x3e64('0x1c')](_0x5ba990);return _0x4eab61[_0x3e64('0x21')]('Content-Range',_0x33fb55+'-'+_0x395e8b+'/'+_0x395fd6)[_0x3e64('0x22')](_0x4a8488);}return null;};}function patchUpdates(_0x21eff6){return function(_0x1fb49e){try{jsonpatch[_0x3e64('0x23')](_0x1fb49e,_0x21eff6,!![]);}catch(_0x15b382){return BPromise[_0x3e64('0x24')](_0x15b382);}return _0x1fb49e[_0x3e64('0x25')]();};}function saveUpdates(_0x579f31,_0x4c2394){return function(_0x25f208){if(_0x25f208){return _0x25f208[_0x3e64('0x26')](_0x579f31)[_0x3e64('0x27')](function(_0x438507){return _0x438507;});}return null;};}function removeEntity(_0xc086db,_0x38c5e6){return function(_0x39b206){if(_0x39b206){return _0x39b206[_0x3e64('0x28')]()[_0x3e64('0x27')](function(){_0xc086db[_0x3e64('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x308448,_0x75fc2a){return function(_0xf36b3d){if(!_0xf36b3d){_0x308448[_0x3e64('0x1b')](0x194);}return _0xf36b3d;};}function handleError(_0x284179,_0x13db72){_0x13db72=_0x13db72||0x1f4;return function(_0x4f3889){logger[_0x3e64('0x29')](_0x4f3889[_0x3e64('0x2a')]);if(_0x4f3889['name']){delete _0x4f3889[_0x3e64('0x2b')];}_0x284179[_0x3e64('0x1c')](_0x13db72)['send'](_0x4f3889);};}exports[_0x3e64('0x2c')]=function(_0x1355e0,_0x35597f){var _0x30f7a2={},_0x3933a9={},_0xaa7891={'count':0x0,'rows':[]};var _0x9450cd=_[_0x3e64('0x2d')](db[_0x3e64('0x2e')]['rawAttributes'],function(_0x2ddd4){return{'name':_0x2ddd4[_0x3e64('0x2f')],'type':_0x2ddd4[_0x3e64('0x30')][_0x3e64('0x31')]};});_0x3933a9[_0x3e64('0x32')]=_[_0x3e64('0x2d')](_0x9450cd,_0x3e64('0x2b'));_0x3933a9[_0x3e64('0x33')]=_[_0x3e64('0x34')](_0x1355e0[_0x3e64('0x33')]);_0x3933a9[_0x3e64('0x35')]=_['intersection'](_0x3933a9[_0x3e64('0x32')],_0x3933a9[_0x3e64('0x33')]);_0x30f7a2[_0x3e64('0x36')]=_['intersection'](_0x3933a9[_0x3e64('0x32')],qs[_0x3e64('0x37')](_0x1355e0[_0x3e64('0x33')][_0x3e64('0x37')]));_0x30f7a2[_0x3e64('0x36')]=_0x30f7a2[_0x3e64('0x36')][_0x3e64('0x38')]?_0x30f7a2['attributes']:_0x3933a9[_0x3e64('0x32')];if(!_0x1355e0[_0x3e64('0x33')][_0x3e64('0x39')]('nolimit')){_0x30f7a2['limit']=qs[_0x3e64('0x1f')](_0x1355e0[_0x3e64('0x33')][_0x3e64('0x1f')]);_0x30f7a2[_0x3e64('0x1d')]=qs[_0x3e64('0x1d')](_0x1355e0[_0x3e64('0x33')][_0x3e64('0x1d')]);}_0x30f7a2[_0x3e64('0x3a')]=qs['sort'](_0x1355e0[_0x3e64('0x33')][_0x3e64('0x3b')]);_0x30f7a2[_0x3e64('0x3c')]=qs[_0x3e64('0x35')](_[_0x3e64('0x3d')](_0x1355e0[_0x3e64('0x33')],_0x3933a9[_0x3e64('0x35')]),_0x9450cd);if(_0x1355e0['query'][_0x3e64('0x3e')]){_0x30f7a2[_0x3e64('0x3c')]=_[_0x3e64('0x3f')](_0x30f7a2['where'],{'$or':_[_0x3e64('0x2d')](_0x9450cd,function(_0x2c0c89){if(_0x2c0c89['type']!==_0x3e64('0x40')){var _0x3b88f0={};_0x3b88f0[_0x2c0c89[_0x3e64('0x2b')]]={'$like':'%'+_0x1355e0[_0x3e64('0x33')]['filter']+'%'};return _0x3b88f0;}})});}_0x30f7a2=_['merge']({},_0x30f7a2,_0x1355e0[_0x3e64('0x41')]);var _0x152644={'where':_0x30f7a2[_0x3e64('0x3c')]};return db[_0x3e64('0x2e')]['count'](_0x152644)[_0x3e64('0x27')](function(_0x3dacbb){_0xaa7891['count']=_0x3dacbb;if(_0x1355e0['query'][_0x3e64('0x42')]){_0x30f7a2[_0x3e64('0x43')]=[{'all':!![]}];}return db[_0x3e64('0x2e')]['findAll'](_0x30f7a2);})[_0x3e64('0x27')](function(_0x55c6ed){_0xaa7891['rows']=_0x55c6ed;return _0xaa7891;})[_0x3e64('0x27')](respondWithFilteredResult(_0x35597f,_0x30f7a2))[_0x3e64('0x44')](handleError(_0x35597f,null));};exports[_0x3e64('0x45')]=function(_0xdfada5,_0x5442e6){var _0x555550={'raw':!![],'where':{'id':_0xdfada5[_0x3e64('0x46')]['id']}},_0x2dc694={};_0x2dc694['model']=_[_0x3e64('0x34')](db[_0x3e64('0x2e')][_0x3e64('0x47')]);_0x2dc694[_0x3e64('0x33')]=_[_0x3e64('0x34')](_0xdfada5[_0x3e64('0x33')]);_0x2dc694[_0x3e64('0x35')]=_[_0x3e64('0x48')](_0x2dc694[_0x3e64('0x32')],_0x2dc694[_0x3e64('0x33')]);_0x555550['attributes']=_['intersection'](_0x2dc694[_0x3e64('0x32')],qs[_0x3e64('0x37')](_0xdfada5['query']['fields']));_0x555550[_0x3e64('0x36')]=_0x555550[_0x3e64('0x36')][_0x3e64('0x38')]?_0x555550[_0x3e64('0x36')]:_0x2dc694[_0x3e64('0x32')];if(_0xdfada5['query'][_0x3e64('0x42')]){_0x555550[_0x3e64('0x43')]=[{'all':!![]}];}_0x555550=_[_0x3e64('0x3f')]({},_0x555550,_0xdfada5[_0x3e64('0x41')]);return db['CmHopperBlack']['find'](_0x555550)['then'](handleEntityNotFound(_0x5442e6,null))[_0x3e64('0x27')](respondWithResult(_0x5442e6,null))[_0x3e64('0x44')](handleError(_0x5442e6,null));};exports[_0x3e64('0x26')]=function(_0x545cfc,_0x203baa){if(_0x545cfc[_0x3e64('0x49')]['id']){delete _0x545cfc[_0x3e64('0x49')]['id'];}return db[_0x3e64('0x2e')][_0x3e64('0x4a')]({'where':{'id':_0x545cfc[_0x3e64('0x46')]['id']}})[_0x3e64('0x27')](handleEntityNotFound(_0x203baa,null))[_0x3e64('0x27')](saveUpdates(_0x545cfc[_0x3e64('0x49')],null))['then'](respondWithResult(_0x203baa,null))[_0x3e64('0x44')](handleError(_0x203baa,null));};exports[_0x3e64('0x28')]=function(_0x2e147e,_0x9a1311){return db[_0x3e64('0x2e')][_0x3e64('0x4a')]({'where':{'id':_0x2e147e['params']['id']}})['then'](handleEntityNotFound(_0x9a1311,null))['then'](removeEntity(_0x9a1311,null))['catch'](handleError(_0x9a1311,null));};exports[_0x3e64('0x4b')]=function(_0x720cda,_0x585f02){return db[_0x3e64('0x2e')][_0x3e64('0x4b')]()['then'](respondWithResult(_0x585f02,null))['catch'](handleError(_0x585f02,null));};
\ No newline at end of file
index 7b680d3..f62a709 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb8a6=['request-promise','path','../../config/environment','./cmHopperBlack.attributes','cm_hopper_black','lodash','util','../../config/logger','api','bluebird'];(function(_0x449ab2,_0x1b67a9){var _0x10def9=function(_0x2f9480){while(--_0x2f9480){_0x449ab2['push'](_0x449ab2['shift']());}};_0x10def9(++_0x1b67a9);}(_0xb8a6,0x14f));var _0x6b8a=function(_0xc30e99,_0x3ae617){_0xc30e99=_0xc30e99-0x0;var _0x501833=_0xb8a6[_0xc30e99];return _0x501833;};'use strict';var _=require(_0x6b8a('0x0'));var util=require(_0x6b8a('0x1'));var logger=require(_0x6b8a('0x2'))(_0x6b8a('0x3'));var moment=require('moment');var BPromise=require(_0x6b8a('0x4'));var rp=require(_0x6b8a('0x5'));var fs=require('fs');var path=require(_0x6b8a('0x6'));var rimraf=require('rimraf');var config=require(_0x6b8a('0x7'));var attributes=require(_0x6b8a('0x8'));module['exports']=function(_0x412b46,_0x870c00){return _0x412b46['define']('CmHopperBlack',attributes,{'tableName':_0x6b8a('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xfb46=['path','../../config/environment','./cmHopperBlack.attributes','exports','define','lodash','api','moment','bluebird','request-promise'];(function(_0x4a19c2,_0x5893ff){var _0x50606e=function(_0x5ef0dd){while(--_0x5ef0dd){_0x4a19c2['push'](_0x4a19c2['shift']());}};_0x50606e(++_0x5893ff);}(_0xfb46,0xaf));var _0x6fb4=function(_0x5ece84,_0xc06c9f){_0x5ece84=_0x5ece84-0x0;var _0x2a12c4=_0xfb46[_0x5ece84];return _0x2a12c4;};'use strict';var _=require(_0x6fb4('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x6fb4('0x1'));var moment=require(_0x6fb4('0x2'));var BPromise=require(_0x6fb4('0x3'));var rp=require(_0x6fb4('0x4'));var fs=require('fs');var path=require(_0x6fb4('0x5'));var rimraf=require('rimraf');var config=require(_0x6fb4('0x6'));var attributes=require(_0x6fb4('0x7'));module[_0x6fb4('0x8')]=function(_0x270632,_0x84eaee){return _0x270632[_0x6fb4('0x9')]('CmHopperBlack',attributes,{'tableName':'cm_hopper_black','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 88d6914..3ede403 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xab28=['rpc','../../config/environment','jayson/promise','client','http','then','info','CmHopperBlack,\x20%s,\x20%s','request\x20sent','debug','CmHopperBlack,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','GetCmHopperBlack','CmHopperBlack','findAll','options','raw','where','attributes','limit','include','model','map','UpdateCmHopperBlack','update','body','DestroyCmHopperBlack','lodash','util','moment','randomstring','../../config/utils','../../config/logger'];(function(_0x4b6f97,_0xfb599b){var _0xbdccb7=function(_0x5cb93d){while(--_0x5cb93d){_0x4b6f97['push'](_0x4b6f97['shift']());}};_0xbdccb7(++_0xfb599b);}(_0xab28,0xfd));var _0x8ab2=function(_0x33711e,_0x57999f){_0x33711e=_0x33711e-0x0;var _0x5816e3=_0xab28[_0x33711e];return _0x5816e3;};'use strict';var _=require(_0x8ab2('0x0'));var util=require(_0x8ab2('0x1'));var moment=require(_0x8ab2('0x2'));var BPromise=require('bluebird');var rs=require(_0x8ab2('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x8ab2('0x4'));var logger=require(_0x8ab2('0x5'))(_0x8ab2('0x6'));var config=require(_0x8ab2('0x7'));var jayson=require(_0x8ab2('0x8'));var client=jayson[_0x8ab2('0x9')][_0x8ab2('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2ecc2d,_0x56353a,_0x3df6bb){return new BPromise(function(_0x355387,_0x11f800){return client['request'](_0x2ecc2d,_0x3df6bb)[_0x8ab2('0xb')](function(_0x5131a2){logger[_0x8ab2('0xc')](_0x8ab2('0xd'),_0x56353a,_0x8ab2('0xe'));logger[_0x8ab2('0xf')](_0x8ab2('0x10'),_0x56353a,_0x8ab2('0xe'),JSON[_0x8ab2('0x11')](_0x5131a2));if(_0x5131a2[_0x8ab2('0x12')]){if(_0x5131a2[_0x8ab2('0x12')]['code']===0x1f4){logger[_0x8ab2('0x12')](_0x8ab2('0xd'),_0x56353a,_0x5131a2['error'][_0x8ab2('0x13')]);return _0x11f800(_0x5131a2[_0x8ab2('0x12')][_0x8ab2('0x13')]);}logger[_0x8ab2('0x12')](_0x8ab2('0xd'),_0x56353a,_0x5131a2[_0x8ab2('0x12')][_0x8ab2('0x13')]);return _0x355387(_0x5131a2[_0x8ab2('0x12')][_0x8ab2('0x13')]);}else{logger['info'](_0x8ab2('0xd'),_0x56353a,'request\x20sent');_0x355387(_0x5131a2[_0x8ab2('0x14')][_0x8ab2('0x13')]);}})[_0x8ab2('0x15')](function(_0x55f657){logger[_0x8ab2('0x12')](_0x8ab2('0xd'),_0x56353a,_0x55f657);_0x11f800(_0x55f657);});});}exports[_0x8ab2('0x16')]=function(_0x4e1166){var _0x435068=this;return new Promise(function(_0x50b966,_0x31aa96){return db[_0x8ab2('0x17')][_0x8ab2('0x18')]({'raw':_0x4e1166[_0x8ab2('0x19')]?_0x4e1166[_0x8ab2('0x19')][_0x8ab2('0x1a')]===undefined?!![]:![]:!![],'where':_0x4e1166[_0x8ab2('0x19')]?_0x4e1166[_0x8ab2('0x19')][_0x8ab2('0x1b')]||null:null,'attributes':_0x4e1166['options']?_0x4e1166['options'][_0x8ab2('0x1c')]||null:null,'limit':_0x4e1166['options']?_0x4e1166['options'][_0x8ab2('0x1d')]||null:null,'include':_0x4e1166[_0x8ab2('0x19')]?_0x4e1166[_0x8ab2('0x19')][_0x8ab2('0x1e')]?_['map'](_0x4e1166['options']['include'],function(_0x212e5e){return{'model':db[_0x212e5e[_0x8ab2('0x1f')]],'as':_0x212e5e['as'],'attributes':_0x212e5e[_0x8ab2('0x1c')],'include':_0x212e5e['include']?_[_0x8ab2('0x20')](_0x212e5e[_0x8ab2('0x1e')],function(_0x45f2b6){return{'model':db[_0x45f2b6[_0x8ab2('0x1f')]],'as':_0x45f2b6['as'],'attributes':_0x45f2b6['attributes'],'include':_0x45f2b6[_0x8ab2('0x1e')]?_['map'](_0x45f2b6['include'],function(_0x509dea){return{'model':db[_0x509dea[_0x8ab2('0x1f')]],'as':_0x509dea['as'],'attributes':_0x509dea[_0x8ab2('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x8ab2('0xb')](function(_0x11da35){logger['info']('GetCmHopperBlack',_0x4e1166);logger[_0x8ab2('0xf')](_0x8ab2('0x16'),_0x4e1166,JSON[_0x8ab2('0x11')](_0x11da35));_0x50b966(_0x11da35);})[_0x8ab2('0x15')](function(_0x53210d){logger['error'](_0x8ab2('0x16'),_0x53210d[_0x8ab2('0x13')],_0x4e1166);_0x31aa96(_0x435068[_0x8ab2('0x12')](0x1f4,_0x53210d[_0x8ab2('0x13')]));});});};exports[_0x8ab2('0x21')]=function(_0x59056e){var _0x2683bf=this;return new Promise(function(_0x3e53ce,_0x1ca3d2){return db[_0x8ab2('0x17')][_0x8ab2('0x22')](_0x59056e[_0x8ab2('0x23')],{'raw':_0x59056e['options']?_0x59056e[_0x8ab2('0x19')][_0x8ab2('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x59056e[_0x8ab2('0x19')]?_0x59056e[_0x8ab2('0x19')][_0x8ab2('0x1b')]||null:null,'attributes':_0x59056e[_0x8ab2('0x19')]?_0x59056e[_0x8ab2('0x19')][_0x8ab2('0x1c')]||null:null,'limit':_0x59056e['options']?_0x59056e['options'][_0x8ab2('0x1d')]||null:null})['then'](function(_0xf67cfd){logger['info'](_0x8ab2('0x21'),_0x59056e);logger[_0x8ab2('0xf')](_0x8ab2('0x21'),_0x59056e,JSON[_0x8ab2('0x11')](_0xf67cfd));_0x3e53ce(_0xf67cfd);})['catch'](function(_0x59626f){logger[_0x8ab2('0x12')](_0x8ab2('0x21'),_0x59626f['message'],_0x59056e);_0x1ca3d2(_0x2683bf['error'](0x1f4,_0x59626f[_0x8ab2('0x13')]));});});};exports['DestroyCmHopperBlack']=function(_0x2c81d2){var _0x1c1f24=this;return new Promise(function(_0xbc420e,_0xf8071c){return db[_0x8ab2('0x17')]['destroy']({'where':_0x2c81d2[_0x8ab2('0x19')]?_0x2c81d2[_0x8ab2('0x19')]['where']||null:null})[_0x8ab2('0xb')](function(_0x4f8f1c){logger[_0x8ab2('0xc')](_0x8ab2('0x24'),_0x2c81d2);logger[_0x8ab2('0xf')](_0x8ab2('0x24'),_0x2c81d2,JSON[_0x8ab2('0x11')](_0x4f8f1c));_0xbc420e(_0x4f8f1c);})[_0x8ab2('0x15')](function(_0x3594a2){logger[_0x8ab2('0x12')]('DestroyCmHopperBlack',_0x3594a2[_0x8ab2('0x13')],_0x2c81d2);_0xf8071c(_0x1c1f24['error'](0x1f4,_0x3594a2[_0x8ab2('0x13')]));});});};
\ No newline at end of file
+var _0x3e08=['then','info','CmHopperBlack,\x20%s,\x20%s','request\x20sent','stringify','error','message','catch','GetCmHopperBlack','findAll','options','raw','where','attributes','include','model','map','debug','UpdateCmHopperBlack','CmHopperBlack','update','body','limit','DestroyCmHopperBlack','destroy','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request'];(function(_0x39f3ed,_0x48bc5e){var _0x3b1802=function(_0x3ca4aa){while(--_0x3ca4aa){_0x39f3ed['push'](_0x39f3ed['shift']());}};_0x3b1802(++_0x48bc5e);}(_0x3e08,0x8e));var _0x83e0=function(_0x3d5351,_0x27bc80){_0x3d5351=_0x3d5351-0x0;var _0x1db4db=_0x3e08[_0x3d5351];return _0x1db4db;};'use strict';var _=require('lodash');var util=require(_0x83e0('0x0'));var moment=require(_0x83e0('0x1'));var BPromise=require(_0x83e0('0x2'));var rs=require(_0x83e0('0x3'));var fs=require('fs');var Redis=require(_0x83e0('0x4'));var db=require(_0x83e0('0x5'))['db'];var utils=require(_0x83e0('0x6'));var logger=require(_0x83e0('0x7'))(_0x83e0('0x8'));var config=require(_0x83e0('0x9'));var jayson=require(_0x83e0('0xa'));var client=jayson[_0x83e0('0xb')][_0x83e0('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x9145e8,_0x26b853,_0xc74132){return new BPromise(function(_0x488813,_0x27e68d){return client[_0x83e0('0xd')](_0x9145e8,_0xc74132)[_0x83e0('0xe')](function(_0x1811b7){logger[_0x83e0('0xf')](_0x83e0('0x10'),_0x26b853,_0x83e0('0x11'));logger['debug']('CmHopperBlack,\x20%s,\x20%s,\x20%s',_0x26b853,_0x83e0('0x11'),JSON[_0x83e0('0x12')](_0x1811b7));if(_0x1811b7[_0x83e0('0x13')]){if(_0x1811b7[_0x83e0('0x13')]['code']===0x1f4){logger[_0x83e0('0x13')](_0x83e0('0x10'),_0x26b853,_0x1811b7['error'][_0x83e0('0x14')]);return _0x27e68d(_0x1811b7['error'][_0x83e0('0x14')]);}logger['error'](_0x83e0('0x10'),_0x26b853,_0x1811b7['error'][_0x83e0('0x14')]);return _0x488813(_0x1811b7[_0x83e0('0x13')][_0x83e0('0x14')]);}else{logger[_0x83e0('0xf')](_0x83e0('0x10'),_0x26b853,_0x83e0('0x11'));_0x488813(_0x1811b7['result'][_0x83e0('0x14')]);}})[_0x83e0('0x15')](function(_0x1975b1){logger[_0x83e0('0x13')](_0x83e0('0x10'),_0x26b853,_0x1975b1);_0x27e68d(_0x1975b1);});});}exports[_0x83e0('0x16')]=function(_0x5806cf){var _0xc9e76c=this;return new Promise(function(_0x5a9986,_0x1fa9b7){return db['CmHopperBlack'][_0x83e0('0x17')]({'raw':_0x5806cf['options']?_0x5806cf[_0x83e0('0x18')][_0x83e0('0x19')]===undefined?!![]:![]:!![],'where':_0x5806cf[_0x83e0('0x18')]?_0x5806cf['options'][_0x83e0('0x1a')]||null:null,'attributes':_0x5806cf[_0x83e0('0x18')]?_0x5806cf['options'][_0x83e0('0x1b')]||null:null,'limit':_0x5806cf[_0x83e0('0x18')]?_0x5806cf[_0x83e0('0x18')]['limit']||null:null,'include':_0x5806cf[_0x83e0('0x18')]?_0x5806cf[_0x83e0('0x18')][_0x83e0('0x1c')]?_['map'](_0x5806cf['options'][_0x83e0('0x1c')],function(_0x59c219){return{'model':db[_0x59c219[_0x83e0('0x1d')]],'as':_0x59c219['as'],'attributes':_0x59c219[_0x83e0('0x1b')],'include':_0x59c219[_0x83e0('0x1c')]?_[_0x83e0('0x1e')](_0x59c219['include'],function(_0x7c7b46){return{'model':db[_0x7c7b46[_0x83e0('0x1d')]],'as':_0x7c7b46['as'],'attributes':_0x7c7b46[_0x83e0('0x1b')],'include':_0x7c7b46[_0x83e0('0x1c')]?_['map'](_0x7c7b46['include'],function(_0x4bd8a4){return{'model':db[_0x4bd8a4[_0x83e0('0x1d')]],'as':_0x4bd8a4['as'],'attributes':_0x4bd8a4[_0x83e0('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x83e0('0xe')](function(_0x47bb82){logger[_0x83e0('0xf')]('GetCmHopperBlack',_0x5806cf);logger[_0x83e0('0x1f')]('GetCmHopperBlack',_0x5806cf,JSON[_0x83e0('0x12')](_0x47bb82));_0x5a9986(_0x47bb82);})[_0x83e0('0x15')](function(_0x1abc91){logger[_0x83e0('0x13')](_0x83e0('0x16'),_0x1abc91[_0x83e0('0x14')],_0x5806cf);_0x1fa9b7(_0xc9e76c[_0x83e0('0x13')](0x1f4,_0x1abc91[_0x83e0('0x14')]));});});};exports[_0x83e0('0x20')]=function(_0x539ef9){var _0x52f8dd=this;return new Promise(function(_0x35b81e,_0x3d1b13){return db[_0x83e0('0x21')][_0x83e0('0x22')](_0x539ef9[_0x83e0('0x23')],{'raw':_0x539ef9['options']?_0x539ef9[_0x83e0('0x18')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x539ef9['options']?_0x539ef9[_0x83e0('0x18')][_0x83e0('0x1a')]||null:null,'attributes':_0x539ef9[_0x83e0('0x18')]?_0x539ef9[_0x83e0('0x18')][_0x83e0('0x1b')]||null:null,'limit':_0x539ef9[_0x83e0('0x18')]?_0x539ef9['options'][_0x83e0('0x24')]||null:null})[_0x83e0('0xe')](function(_0x338d02){logger[_0x83e0('0xf')](_0x83e0('0x20'),_0x539ef9);logger[_0x83e0('0x1f')](_0x83e0('0x20'),_0x539ef9,JSON[_0x83e0('0x12')](_0x338d02));_0x35b81e(_0x338d02);})[_0x83e0('0x15')](function(_0x129cc8){logger[_0x83e0('0x13')](_0x83e0('0x20'),_0x129cc8[_0x83e0('0x14')],_0x539ef9);_0x3d1b13(_0x52f8dd[_0x83e0('0x13')](0x1f4,_0x129cc8[_0x83e0('0x14')]));});});};exports[_0x83e0('0x25')]=function(_0x34e354){var _0x36d014=this;return new Promise(function(_0x4960ab,_0x140ab4){return db[_0x83e0('0x21')][_0x83e0('0x26')]({'where':_0x34e354[_0x83e0('0x18')]?_0x34e354[_0x83e0('0x18')]['where']||null:null})[_0x83e0('0xe')](function(_0x24f700){logger[_0x83e0('0xf')](_0x83e0('0x25'),_0x34e354);logger[_0x83e0('0x1f')](_0x83e0('0x25'),_0x34e354,JSON[_0x83e0('0x12')](_0x24f700));_0x4960ab(_0x24f700);})[_0x83e0('0x15')](function(_0x1103ef){logger['error']('DestroyCmHopperBlack',_0x1103ef[_0x83e0('0x14')],_0x34e354);_0x140ab4(_0x36d014[_0x83e0('0x13')](0x1f4,_0x1103ef['message']));});});};
\ No newline at end of file
index 758d9a1..5c3ac78 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf61e=['/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmHopperBlack.controller','get','index','isAuthenticated','describe','show','put'];(function(_0xd69ad0,_0x3fdda3){var _0x7be14b=function(_0x2391c6){while(--_0x2391c6){_0xd69ad0['push'](_0xd69ad0['shift']());}};_0x7be14b(++_0x3fdda3);}(_0xf61e,0x191));var _0xef61=function(_0x571c59,_0x975a8){_0x571c59=_0x571c59-0x0;var _0x21201b=_0xf61e[_0x571c59];return _0x21201b;};'use strict';var multer=require(_0xef61('0x0'));var util=require(_0xef61('0x1'));var path=require(_0xef61('0x2'));var timeout=require(_0xef61('0x3'));var express=require(_0xef61('0x4'));var router=express[_0xef61('0x5')]();var fs_extra=require(_0xef61('0x6'));var auth=require(_0xef61('0x7'));var interaction=require(_0xef61('0x8'));var config=require(_0xef61('0x9'));var controller=require(_0xef61('0xa'));router[_0xef61('0xb')]('/',auth['isAuthenticated'](),controller[_0xef61('0xc')]);router[_0xef61('0xb')]('/describe',auth[_0xef61('0xd')](),controller[_0xef61('0xe')]);router[_0xef61('0xb')]('/:id',auth['isAuthenticated'](),controller[_0xef61('0xf')]);router[_0xef61('0x10')](_0xef61('0x11'),auth[_0xef61('0xd')](),controller[_0xef61('0x12')]);router[_0xef61('0x13')](_0xef61('0x11'),auth[_0xef61('0xd')](),controller[_0xef61('0x14')]);module[_0xef61('0x15')]=router;
\ No newline at end of file
+var _0xd117=['/describe','describe','/:id','show','put','update','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmHopperBlack.controller','get','isAuthenticated','index'];(function(_0xa148b7,_0x2f3eb2){var _0x51efd3=function(_0x34bcec){while(--_0x34bcec){_0xa148b7['push'](_0xa148b7['shift']());}};_0x51efd3(++_0x2f3eb2);}(_0xd117,0x182));var _0x7d11=function(_0x224f65,_0x4750bf){_0x224f65=_0x224f65-0x0;var _0x3f921c=_0xd117[_0x224f65];return _0x3f921c;};'use strict';var multer=require(_0x7d11('0x0'));var util=require(_0x7d11('0x1'));var path=require(_0x7d11('0x2'));var timeout=require(_0x7d11('0x3'));var express=require(_0x7d11('0x4'));var router=express[_0x7d11('0x5')]();var fs_extra=require(_0x7d11('0x6'));var auth=require(_0x7d11('0x7'));var interaction=require(_0x7d11('0x8'));var config=require(_0x7d11('0x9'));var controller=require(_0x7d11('0xa'));router[_0x7d11('0xb')]('/',auth[_0x7d11('0xc')](),controller[_0x7d11('0xd')]);router[_0x7d11('0xb')](_0x7d11('0xe'),auth['isAuthenticated'](),controller[_0x7d11('0xf')]);router[_0x7d11('0xb')](_0x7d11('0x10'),auth['isAuthenticated'](),controller[_0x7d11('0x11')]);router[_0x7d11('0x12')](_0x7d11('0x10'),auth['isAuthenticated'](),controller[_0x7d11('0x13')]);router['delete']('/:id',auth[_0x7d11('0xc')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
index d4902db..16ce2a7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x746b=['diff','seconds','BOOLEAN','sequelize','exports','INTEGER','STRING','DATE','getDataValue','setDataValue'];(function(_0x3a46e3,_0x744ee6){var _0x58798f=function(_0x39dd3e){while(--_0x39dd3e){_0x3a46e3['push'](_0x3a46e3['shift']());}};_0x58798f(++_0x744ee6);}(_0x746b,0x143));var _0xb746=function(_0x27e20a,_0x5df398){_0x27e20a=_0x27e20a-0x0;var _0x2e930c=_0x746b[_0x27e20a];return _0x2e930c;};'use strict';var Sequelize=require(_0xb746('0x0'));var moment=require('moment');module[_0xb746('0x1')]={'state':{'type':Sequelize[_0xb746('0x2')](0x2)},'statedesc':{'type':Sequelize[_0xb746('0x3')]},'scheduledat':{'type':Sequelize[_0xb746('0x4')]},'countbusyretry':{'type':Sequelize[_0xb746('0x2')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0xb746('0x2')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0xb746('0x2')],'defaultValue':0x0},'countglobal':{'type':Sequelize[_0xb746('0x2')],'defaultValue':0x0},'uniqueid':{'type':Sequelize[_0xb746('0x3')]},'originatecalleridnum':{'type':Sequelize[_0xb746('0x3')]},'originatecalleridname':{'type':Sequelize[_0xb746('0x3')]},'calleridnum':{'type':Sequelize[_0xb746('0x3')]},'calleridname':{'type':Sequelize[_0xb746('0x3')]},'starttime':{'type':Sequelize[_0xb746('0x4')]},'responsetime':{'type':Sequelize[_0xb746('0x4')]},'answertime':{'type':Sequelize['DATE']},'droptime':{'type':Sequelize['DATE']},'endtime':{'type':Sequelize['DATE']},'ringtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'holdtime':{'type':Sequelize[_0xb746('0x2')],'defaultValue':0x0},'talktime':{'type':Sequelize[_0xb746('0x2')],'defaultValue':0x0},'followuptime':{'type':Sequelize[_0xb746('0x2')],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0xb746('0x3')]},'campaign':{'type':Sequelize['STRING']},'campaigntype':{'type':Sequelize['STRING']},'membername':{'type':Sequelize[_0xb746('0x3')]},'reason':{'type':Sequelize[_0xb746('0x3')]},'disposition':{'type':Sequelize[_0xb746('0x3')]},'secondDisposition':{'type':Sequelize[_0xb746('0x3')]},'thirdDisposition':{'type':Sequelize[_0xb746('0x3')]},'dispositionat':{'type':Sequelize[_0xb746('0x4')],'set':function(_0x4891ca){var _0x28086c=this[_0xb746('0x5')]('endtime');if(_0x28086c&&_0x4891ca){this[_0xb746('0x6')]('followuptime',moment(_0x4891ca)[_0xb746('0x7')](moment(_0x28086c),_0xb746('0x8')));}}},'amd':{'type':Sequelize[_0xb746('0x9')],'defaultValue':![]},'fax':{'type':Sequelize[_0xb746('0x9')],'defaultValue':![]},'blacklist':{'type':Sequelize[_0xb746('0x9')],'defaultValue':![]},'rescheduled':{'type':Sequelize[_0xb746('0x9')],'defaultValue':![]},'rescheduledat':{'type':Sequelize['DATE']},'callback':{'type':Sequelize[_0xb746('0x9')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0xb746('0x3')],'defaultValue':null},'callbackat':{'type':Sequelize['DATE']},'deleted':{'type':Sequelize['STRING'],'defaultValue':null},'deletedat':{'type':Sequelize['DATE']},'recallme':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agiafterat':{'type':Sequelize[_0xb746('0x4')]},'countnosuchnumberretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countdropretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0xb746('0x2')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0xb746('0x2')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0xb746('0x2')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x1ec1=['diff','seconds','BOOLEAN','sequelize','moment','exports','INTEGER','STRING','DATE','getDataValue','endtime','setDataValue','followuptime'];(function(_0x1ffd34,_0x5170bf){var _0x1c2fbc=function(_0xa41657){while(--_0xa41657){_0x1ffd34['push'](_0x1ffd34['shift']());}};_0x1c2fbc(++_0x5170bf);}(_0x1ec1,0x1d7));var _0x11ec=function(_0x5878df,_0x4d1e53){_0x5878df=_0x5878df-0x0;var _0x23addf=_0x1ec1[_0x5878df];return _0x23addf;};'use strict';var Sequelize=require(_0x11ec('0x0'));var moment=require(_0x11ec('0x1'));module[_0x11ec('0x2')]={'state':{'type':Sequelize[_0x11ec('0x3')](0x2)},'statedesc':{'type':Sequelize[_0x11ec('0x4')]},'scheduledat':{'type':Sequelize['DATE']},'countbusyretry':{'type':Sequelize[_0x11ec('0x3')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x11ec('0x3')],'defaultValue':0x0},'countglobal':{'type':Sequelize[_0x11ec('0x3')],'defaultValue':0x0},'uniqueid':{'type':Sequelize[_0x11ec('0x4')]},'originatecalleridnum':{'type':Sequelize['STRING']},'originatecalleridname':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x11ec('0x4')]},'starttime':{'type':Sequelize[_0x11ec('0x5')]},'responsetime':{'type':Sequelize[_0x11ec('0x5')]},'answertime':{'type':Sequelize[_0x11ec('0x5')]},'droptime':{'type':Sequelize[_0x11ec('0x5')]},'endtime':{'type':Sequelize[_0x11ec('0x5')]},'ringtime':{'type':Sequelize[_0x11ec('0x3')],'defaultValue':0x0},'holdtime':{'type':Sequelize[_0x11ec('0x3')],'defaultValue':0x0},'talktime':{'type':Sequelize[_0x11ec('0x3')],'defaultValue':0x0},'followuptime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'dropreason':{'type':Sequelize['STRING']},'campaign':{'type':Sequelize[_0x11ec('0x4')]},'campaigntype':{'type':Sequelize[_0x11ec('0x4')]},'membername':{'type':Sequelize['STRING']},'reason':{'type':Sequelize[_0x11ec('0x4')]},'disposition':{'type':Sequelize['STRING']},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize[_0x11ec('0x4')]},'dispositionat':{'type':Sequelize[_0x11ec('0x5')],'set':function(_0x5697e9){var _0x2cfca8=this[_0x11ec('0x6')](_0x11ec('0x7'));if(_0x2cfca8&&_0x5697e9){this[_0x11ec('0x8')](_0x11ec('0x9'),moment(_0x5697e9)[_0x11ec('0xa')](moment(_0x2cfca8),_0x11ec('0xb')));}}},'amd':{'type':Sequelize[_0x11ec('0xc')],'defaultValue':![]},'fax':{'type':Sequelize[_0x11ec('0xc')],'defaultValue':![]},'blacklist':{'type':Sequelize[_0x11ec('0xc')],'defaultValue':![]},'rescheduled':{'type':Sequelize[_0x11ec('0xc')],'defaultValue':![]},'rescheduledat':{'type':Sequelize['DATE']},'callback':{'type':Sequelize[_0x11ec('0xc')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize['STRING'],'defaultValue':null},'callbackat':{'type':Sequelize[_0x11ec('0x5')]},'deleted':{'type':Sequelize['STRING'],'defaultValue':null},'deletedat':{'type':Sequelize[_0x11ec('0x5')]},'recallme':{'type':Sequelize[_0x11ec('0xc')],'defaultValue':![]},'agiafterat':{'type':Sequelize[_0x11ec('0x5')]},'countnosuchnumberretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x11ec('0x3')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x11ec('0x3')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x11ec('0x3')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x11ec('0x3')],'defaultValue':0x0}};
\ No newline at end of file
index 592c732..dc4c910 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1261=['attributes','fields','length','hasOwnProperty','sort','pick','filters','where','type','VIRTUAL','filter','merge','options','findAll','rows','params','include','find','describe','catch','body','uniqueid','countContactsQueueCampaignHopperFinal','sequelize','COUNT','literal','`state`\x20=\x200,\x201,\x20null','noSuchContacts','`state`\x20=\x205,\x201,\x20null','busyContacts','`state`\x20=\x208,\x201,\x20null','congestionContacts','dropContacts','abandonedContacts','`state`\x20=\x2022,\x201,\x20null','reCallContacts','`state`\x20=\x2019,\x201,\x20null','answeringMachine','`state`\x20=\x203,\x201,\x20null','noAnswerContacts','`state`\x20=\x2010\x20,\x201,\x20null','`state`\x20=\x2011\x20,\x201,\x20null','moveContactsQueueCampaignHopperFinal','VoiceQueue','cm_hopper','fromQuery','phone','scheduledAt','createdAt','updatedAt','select','field','NOW()','ANY_VALUE(ContactId)','ContactId','ANY_VALUE(ListId)','VoiceQueueId','from','VoiceQueueId\x20=\x20?','toString','state','calleridnum\x20IS\x20NOT\x20NULL','calleridnum\x20NOT\x20IN\x20(?)','calleridnum','cm_hopper_final','state\x20=\x204','group','moveContactsIvrCampaignHopperFinal','into','ListId','CampaignId','ANY_VALUE(calleridnum)','ANY_VALUE(CampaignId)','CampaignId\x20=\x20?','state\x20=\x20?','checkContactHopper','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','fs-extra','lodash','crypto','jsforce','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','reject','save','update','then','error','stack','send','CmHopperFinal','model','map','name','keys','query','intersection'];(function(_0x21924b,_0x11111c){var _0x54689c=function(_0x3537d2){while(--_0x3537d2){_0x21924b['push'](_0x21924b['shift']());}};_0x54689c(++_0x11111c);}(_0x1261,0x144));var _0x1126=function(_0x516927,_0xb4aad0){_0x516927=_0x516927-0x0;var _0x30749b=_0x1261[_0x516927];return _0x30749b;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x1126('0x0'));var zipdir=require(_0x1126('0x1'));var jsonpatch=require(_0x1126('0x2'));var rp=require(_0x1126('0x3'));var moment=require(_0x1126('0x4'));var BPromise=require(_0x1126('0x5'));var Mustache=require(_0x1126('0x6'));var util=require(_0x1126('0x7'));var path=require(_0x1126('0x8'));var sox=require(_0x1126('0x9'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x1126('0xa'));var _=require(_0x1126('0xb'));var squel=require('squel');var crypto=require(_0x1126('0xc'));var jsforce=require(_0x1126('0xd'));var deskjs=require(_0x1126('0xe'));var toCsv=require(_0x1126('0xf'));var querystring=require(_0x1126('0x10'));var Papa=require('papaparse');var Redis=require(_0x1126('0x11'));var authService=require(_0x1126('0x12'));var qs=require(_0x1126('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x1126('0x14'));var logger=require('../../config/logger')('api');var utils=require(_0x1126('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x1126('0x16'));var db=require(_0x1126('0x17'))['db'];function respondWithStatusCode(_0xd26a32,_0x273896){_0x273896=_0x273896||0xcc;return function(_0xca0355){if(_0xca0355){return _0xd26a32[_0x1126('0x18')](_0x273896);}return _0xd26a32[_0x1126('0x19')](_0x273896)[_0x1126('0x1a')]();};}function respondWithResult(_0x43850b,_0x53a8f0){_0x53a8f0=_0x53a8f0||0xc8;return function(_0x5de9a7){if(_0x5de9a7){return _0x43850b[_0x1126('0x19')](_0x53a8f0)[_0x1126('0x1b')](_0x5de9a7);}};}function respondWithFilteredResult(_0x279455,_0x4be0c6){return function(_0x45149c){if(_0x45149c){var _0x4794a7=typeof _0x4be0c6[_0x1126('0x1c')]===_0x1126('0x1d')&&typeof _0x4be0c6[_0x1126('0x1e')]==='undefined';var _0x245cd7=_0x45149c[_0x1126('0x1f')];var _0x4a7b49=_0x4794a7?0x0:_0x4be0c6['offset'];var _0x22ae0b=_0x4794a7?_0x45149c[_0x1126('0x1f')]:_0x4be0c6['offset']+_0x4be0c6['limit'];var _0x4564c0;if(_0x22ae0b>=_0x245cd7){_0x22ae0b=_0x245cd7;_0x4564c0=0xc8;}else{_0x4564c0=0xce;}_0x279455['status'](_0x4564c0);return _0x279455[_0x1126('0x20')](_0x1126('0x21'),_0x4a7b49+'-'+_0x22ae0b+'/'+_0x245cd7)[_0x1126('0x1b')](_0x45149c);}return null;};}function patchUpdates(_0x54400a){return function(_0x2a08ba){try{jsonpatch['apply'](_0x2a08ba,_0x54400a,!![]);}catch(_0x56efeb){return BPromise[_0x1126('0x22')](_0x56efeb);}return _0x2a08ba[_0x1126('0x23')]();};}function saveUpdates(_0x25b24b,_0x36d254){return function(_0x526ca1){if(_0x526ca1){return _0x526ca1[_0x1126('0x24')](_0x25b24b)[_0x1126('0x25')](function(_0x48a08d){return _0x48a08d;});}return null;};}function removeEntity(_0x2175fa,_0x59cd8e){return function(_0x529dd9){if(_0x529dd9){return _0x529dd9['destroy']()[_0x1126('0x25')](function(){_0x2175fa[_0x1126('0x19')](0xcc)[_0x1126('0x1a')]();});}};}function handleEntityNotFound(_0x34bcf1,_0x566c09){return function(_0x1b07a7){if(!_0x1b07a7){_0x34bcf1[_0x1126('0x18')](0x194);}return _0x1b07a7;};}function handleError(_0x38119d,_0x589725){_0x589725=_0x589725||0x1f4;return function(_0x35eec3){logger[_0x1126('0x26')](_0x35eec3[_0x1126('0x27')]);if(_0x35eec3['name']){delete _0x35eec3['name'];}_0x38119d[_0x1126('0x19')](_0x589725)[_0x1126('0x28')](_0x35eec3);};}exports['index']=function(_0x2fb797,_0x23d2bc){var _0x4a334a={},_0x3fa694={},_0x4bf807={'count':0x0,'rows':[]};var _0xc62460=_['map'](db[_0x1126('0x29')]['rawAttributes'],function(_0x378f4d){return{'name':_0x378f4d['fieldName'],'type':_0x378f4d['type']['key']};});_0x3fa694[_0x1126('0x2a')]=_[_0x1126('0x2b')](_0xc62460,_0x1126('0x2c'));_0x3fa694['query']=_[_0x1126('0x2d')](_0x2fb797[_0x1126('0x2e')]);_0x3fa694['filters']=_[_0x1126('0x2f')](_0x3fa694[_0x1126('0x2a')],_0x3fa694[_0x1126('0x2e')]);_0x4a334a[_0x1126('0x30')]=_['intersection'](_0x3fa694['model'],qs[_0x1126('0x31')](_0x2fb797[_0x1126('0x2e')][_0x1126('0x31')]));_0x4a334a[_0x1126('0x30')]=_0x4a334a['attributes'][_0x1126('0x32')]?_0x4a334a[_0x1126('0x30')]:_0x3fa694[_0x1126('0x2a')];if(!_0x2fb797[_0x1126('0x2e')][_0x1126('0x33')]('nolimit')){_0x4a334a[_0x1126('0x1e')]=qs[_0x1126('0x1e')](_0x2fb797[_0x1126('0x2e')][_0x1126('0x1e')]);_0x4a334a['offset']=qs['offset'](_0x2fb797[_0x1126('0x2e')][_0x1126('0x1c')]);}_0x4a334a['order']=qs[_0x1126('0x34')](_0x2fb797[_0x1126('0x2e')][_0x1126('0x34')]);_0x4a334a['where']=qs['filters'](_[_0x1126('0x35')](_0x2fb797[_0x1126('0x2e')],_0x3fa694[_0x1126('0x36')]),_0xc62460);if(_0x2fb797[_0x1126('0x2e')]['filter']){_0x4a334a[_0x1126('0x37')]=_['merge'](_0x4a334a[_0x1126('0x37')],{'$or':_[_0x1126('0x2b')](_0xc62460,function(_0xfa96e0){if(_0xfa96e0[_0x1126('0x38')]!==_0x1126('0x39')){var _0x5746f6={};_0x5746f6[_0xfa96e0[_0x1126('0x2c')]]={'$like':'%'+_0x2fb797[_0x1126('0x2e')][_0x1126('0x3a')]+'%'};return _0x5746f6;}})});}_0x4a334a=_[_0x1126('0x3b')]({},_0x4a334a,_0x2fb797[_0x1126('0x3c')]);var _0x3442b8={'where':_0x4a334a[_0x1126('0x37')]};return db['CmHopperFinal'][_0x1126('0x1f')](_0x3442b8)[_0x1126('0x25')](function(_0x227a6b){_0x4bf807[_0x1126('0x1f')]=_0x227a6b;if(_0x2fb797[_0x1126('0x2e')]['includeAll']){_0x4a334a['include']=[{'all':!![]}];}return db[_0x1126('0x29')][_0x1126('0x3d')](_0x4a334a);})[_0x1126('0x25')](function(_0x21c38e){_0x4bf807[_0x1126('0x3e')]=_0x21c38e;return _0x4bf807;})[_0x1126('0x25')](respondWithFilteredResult(_0x23d2bc,_0x4a334a))['catch'](handleError(_0x23d2bc,null));};exports['show']=function(_0x4cb1db,_0xb8054e){var _0x5d4194={'raw':!![],'where':{'id':_0x4cb1db[_0x1126('0x3f')]['id']}},_0xf84005={};_0xf84005[_0x1126('0x2a')]=_[_0x1126('0x2d')](db['CmHopperFinal']['rawAttributes']);_0xf84005[_0x1126('0x2e')]=_[_0x1126('0x2d')](_0x4cb1db[_0x1126('0x2e')]);_0xf84005['filters']=_[_0x1126('0x2f')](_0xf84005['model'],_0xf84005[_0x1126('0x2e')]);_0x5d4194['attributes']=_[_0x1126('0x2f')](_0xf84005[_0x1126('0x2a')],qs[_0x1126('0x31')](_0x4cb1db['query'][_0x1126('0x31')]));_0x5d4194[_0x1126('0x30')]=_0x5d4194[_0x1126('0x30')]['length']?_0x5d4194['attributes']:_0xf84005['model'];if(_0x4cb1db[_0x1126('0x2e')]['includeAll']){_0x5d4194[_0x1126('0x40')]=[{'all':!![]}];}_0x5d4194=_['merge']({},_0x5d4194,_0x4cb1db[_0x1126('0x3c')]);return db[_0x1126('0x29')][_0x1126('0x41')](_0x5d4194)[_0x1126('0x25')](handleEntityNotFound(_0xb8054e,null))[_0x1126('0x25')](respondWithResult(_0xb8054e,null))['catch'](handleError(_0xb8054e,null));};exports[_0x1126('0x42')]=function(_0x512f60,_0x5111d3){return db[_0x1126('0x29')][_0x1126('0x42')]()['then'](respondWithResult(_0x5111d3,null))[_0x1126('0x43')](handleError(_0x5111d3,null));};exports[_0x1126('0x24')]=function(_0x518e0a,_0x3e4eeb){if(_0x518e0a[_0x1126('0x44')][_0x1126('0x45')]){delete _0x518e0a['body'][_0x1126('0x45')];}return db[_0x1126('0x29')][_0x1126('0x41')]({'where':{'uniqueid':_0x518e0a[_0x1126('0x3f')]['id']}})[_0x1126('0x25')](handleEntityNotFound(_0x3e4eeb,null))[_0x1126('0x25')](saveUpdates(_0x518e0a[_0x1126('0x44')],null))[_0x1126('0x25')](respondWithResult(_0x3e4eeb,null))['catch'](handleError(_0x3e4eeb,null));};exports[_0x1126('0x46')]=function(_0x5a2287,_0x40168e,_0x2ad118){return db['CmHopperFinal']['findAll']({'raw':![],'where':{'VoiceQueueId':_0x5a2287[_0x1126('0x3f')]['id']},'attributes':[[db[_0x1126('0x47')]['fn'](_0x1126('0x48'),db['sequelize']['fn']('IF',db[_0x1126('0x47')][_0x1126('0x49')](_0x1126('0x4a')))),_0x1126('0x4b')],[db['sequelize']['fn'](_0x1126('0x48'),db[_0x1126('0x47')]['fn']('IF',db['sequelize']['literal']('`state`\x20=\x203,\x201,\x20null'))),'noAnswerContacts'],[db[_0x1126('0x47')]['fn'](_0x1126('0x48'),db['sequelize']['fn']('IF',db[_0x1126('0x47')][_0x1126('0x49')](_0x1126('0x4c')))),_0x1126('0x4d')],[db[_0x1126('0x47')]['fn']('COUNT',db[_0x1126('0x47')]['fn']('IF',db[_0x1126('0x47')]['literal'](_0x1126('0x4e')))),_0x1126('0x4f')],[db[_0x1126('0x47')]['fn'](_0x1126('0x48'),db[_0x1126('0x47')]['fn']('IF',db['sequelize'][_0x1126('0x49')]('`state`\x20=\x2010\x20,\x201,\x20null'))),_0x1126('0x50')],[db[_0x1126('0x47')]['fn'](_0x1126('0x48'),db['sequelize']['fn']('IF',db[_0x1126('0x47')][_0x1126('0x49')]('`state`\x20=\x2011\x20,\x201,\x20null'))),_0x1126('0x51')],[db[_0x1126('0x47')]['fn'](_0x1126('0x48'),db['sequelize']['fn']('IF',db[_0x1126('0x47')][_0x1126('0x49')](_0x1126('0x52')))),_0x1126('0x53')],[db[_0x1126('0x47')]['fn'](_0x1126('0x48'),db[_0x1126('0x47')]['fn']('IF',db[_0x1126('0x47')]['literal'](_0x1126('0x54')))),_0x1126('0x55')]]})[_0x1126('0x25')](handleEntityNotFound(_0x40168e,null))[_0x1126('0x25')](respondWithResult(_0x40168e,null))[_0x1126('0x43')](handleError(_0x40168e,null));};exports['countContactsIvrCampaignHopperFinal']=function(_0xcc1a95,_0x315386,_0x5e0ea1){return db[_0x1126('0x29')]['findAll']({'raw':![],'where':{'CampaignId':_0xcc1a95[_0x1126('0x3f')]['id']},'attributes':[[db[_0x1126('0x47')]['fn']('COUNT',db[_0x1126('0x47')]['fn']('IF',db[_0x1126('0x47')][_0x1126('0x49')]('`state`\x20=\x200,\x201,\x20null'))),_0x1126('0x4b')],[db['sequelize']['fn']('COUNT',db[_0x1126('0x47')]['fn']('IF',db[_0x1126('0x47')][_0x1126('0x49')](_0x1126('0x56')))),_0x1126('0x57')],[db[_0x1126('0x47')]['fn'](_0x1126('0x48'),db['sequelize']['fn']('IF',db[_0x1126('0x47')][_0x1126('0x49')](_0x1126('0x4c')))),_0x1126('0x4d')],[db[_0x1126('0x47')]['fn'](_0x1126('0x48'),db['sequelize']['fn']('IF',db['sequelize'][_0x1126('0x49')](_0x1126('0x4e')))),'congestionContacts'],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x1126('0x47')][_0x1126('0x49')](_0x1126('0x58')))),'dropContacts'],[db[_0x1126('0x47')]['fn'](_0x1126('0x48'),db[_0x1126('0x47')]['fn']('IF',db[_0x1126('0x47')][_0x1126('0x49')](_0x1126('0x59')))),_0x1126('0x51')],[db['sequelize']['fn'](_0x1126('0x48'),db[_0x1126('0x47')]['fn']('IF',db[_0x1126('0x47')][_0x1126('0x49')](_0x1126('0x52')))),'reCallContacts'],[db['sequelize']['fn'](_0x1126('0x48'),db[_0x1126('0x47')]['fn']('IF',db['sequelize'][_0x1126('0x49')](_0x1126('0x54')))),_0x1126('0x55')]]})[_0x1126('0x25')](handleEntityNotFound(_0x315386,null))[_0x1126('0x25')](respondWithResult(_0x315386,null))[_0x1126('0x43')](handleError(_0x315386,null));};exports[_0x1126('0x5a')]=function(_0x247f12,_0xd20fbe,_0x3d5e15){return db[_0x1126('0x5b')][_0x1126('0x41')]({'where':{'id':_0x247f12[_0x1126('0x3f')]['id']}})['then'](handleEntityNotFound(_0xd20fbe,null))[_0x1126('0x25')](function(_0x274343){var _0x2b61ae;if(_0x274343){_0x2b61ae=squel['insert']()['into'](_0x1126('0x5c'))[_0x1126('0x5d')]([_0x1126('0x5e'),_0x1126('0x5f'),'ContactId','ListId','VoiceQueueId',_0x1126('0x60'),_0x1126('0x61')],squel[_0x1126('0x62')]()[_0x1126('0x63')]('ANY_VALUE(calleridnum)',_0x1126('0x5e'))['field'](_0x1126('0x64'),_0x1126('0x5f'))[_0x1126('0x63')](_0x1126('0x65'),_0x1126('0x66'))[_0x1126('0x63')](_0x1126('0x67'),'ListId')[_0x1126('0x63')]('ANY_VALUE(VoiceQueueId)',_0x1126('0x68'))[_0x1126('0x63')]('NOW()',_0x1126('0x60'))[_0x1126('0x63')]('NOW()',_0x1126('0x61'))[_0x1126('0x69')]('cm_hopper_final')['where'](_0x1126('0x6a'),_0x247f12[_0x1126('0x3f')]['id'][_0x1126('0x6b')]())['where']('state\x20=\x20?',_0x247f12['body'][_0x1126('0x6c')]['toString']())['where'](_0x1126('0x6d'))['where'](_0x1126('0x6e'),squel[_0x1126('0x62')]()['field'](_0x1126('0x5e'))[_0x1126('0x69')](_0x1126('0x5c'))[_0x1126('0x37')](_0x1126('0x6a'),_0x247f12['params']['id'][_0x1126('0x6b')]()))[_0x1126('0x37')]('calleridnum\x20NOT\x20IN\x20(?)',squel[_0x1126('0x62')]()[_0x1126('0x63')](_0x1126('0x6f'))[_0x1126('0x69')](_0x1126('0x70'))[_0x1126('0x37')](_0x1126('0x6a'),_0x247f12[_0x1126('0x3f')]['id'][_0x1126('0x6b')]())[_0x1126('0x37')](_0x1126('0x71')))[_0x1126('0x72')](_0x1126('0x66')))[_0x1126('0x6b')]();return db[_0x1126('0x47')][_0x1126('0x2e')](_0x2b61ae);}return[];})['then'](respondWithResult(_0xd20fbe,null))[_0x1126('0x43')](handleError(_0xd20fbe,null));};exports[_0x1126('0x73')]=function(_0x33cccf,_0x1483f4,_0x3be5bf){return db['Campaign'][_0x1126('0x41')]({'where':{'id':_0x33cccf['params']['id']}})['then'](handleEntityNotFound(_0x1483f4,null))[_0x1126('0x25')](function(_0x2b1884){var _0x55f366;if(_0x2b1884){_0x55f366=squel['insert']()[_0x1126('0x74')](_0x1126('0x5c'))[_0x1126('0x5d')]([_0x1126('0x5e'),_0x1126('0x5f'),_0x1126('0x66'),_0x1126('0x75'),_0x1126('0x76'),_0x1126('0x60'),'updatedAt'],squel[_0x1126('0x62')]()[_0x1126('0x63')](_0x1126('0x77'),_0x1126('0x5e'))[_0x1126('0x63')](_0x1126('0x64'),'scheduledAt')[_0x1126('0x63')](_0x1126('0x65'),_0x1126('0x66'))[_0x1126('0x63')](_0x1126('0x67'),_0x1126('0x75'))[_0x1126('0x63')](_0x1126('0x78'),_0x1126('0x76'))[_0x1126('0x63')]('NOW()','createdAt')[_0x1126('0x63')]('NOW()',_0x1126('0x61'))['from'](_0x1126('0x70'))['where'](_0x1126('0x79'),_0x33cccf['params']['id']['toString']())['where'](_0x1126('0x7a'),_0x33cccf[_0x1126('0x44')]['state']['toString']())[_0x1126('0x37')](_0x1126('0x6d'))[_0x1126('0x37')]('calleridnum\x20NOT\x20IN\x20(?)',squel['select']()[_0x1126('0x63')]('phone')[_0x1126('0x69')](_0x1126('0x5c'))[_0x1126('0x37')](_0x1126('0x79'),_0x33cccf[_0x1126('0x3f')]['id']['toString']()))['where'](_0x1126('0x6e'),squel[_0x1126('0x62')]()[_0x1126('0x63')](_0x1126('0x6f'))[_0x1126('0x69')](_0x1126('0x70'))[_0x1126('0x37')](_0x1126('0x79'),_0x33cccf[_0x1126('0x3f')]['id'][_0x1126('0x6b')]())[_0x1126('0x37')]('state\x20=\x204'))[_0x1126('0x72')]('ContactId'))[_0x1126('0x6b')]();return db['sequelize'][_0x1126('0x2e')](_0x55f366);}return[];})[_0x1126('0x25')](respondWithResult(_0x1483f4,null))[_0x1126('0x43')](handleError(_0x1483f4,null));};exports[_0x1126('0x7b')]=function(_0x59c04b,_0x429183,_0x834360){return db['CmHopper']['findOne']({'where':{'VoiceQueueId':_0x59c04b[_0x1126('0x44')][_0x1126('0x68')],'CampaignId':_0x59c04b[_0x1126('0x44')]['CampaignId'],'ContactId':_0x59c04b[_0x1126('0x44')]['ContactId']}})[_0x1126('0x25')](handleEntityNotFound(_0x429183,null))[_0x1126('0x25')](function(_0x4d6bb2){if(_0x4d6bb2){return _0x4d6bb2;}return null;})[_0x1126('0x25')](respondWithResult(_0x429183,null))[_0x1126('0x43')](handleError(_0x429183,null));};
\ No newline at end of file
+var _0x814b=['into','cm_hopper','fromQuery','phone','scheduledAt','ContactId','ListId','VoiceQueueId','createdAt','updatedAt','select','field','NOW()','ANY_VALUE(ContactId)','ANY_VALUE(VoiceQueueId)','from','toString','calleridnum\x20IS\x20NOT\x20NULL','calleridnum\x20NOT\x20IN\x20(?)','calleridnum','VoiceQueueId\x20=\x20?','state\x20=\x204','group','Campaign','ANY_VALUE(calleridnum)','ANY_VALUE(CampaignId)','CampaignId','cm_hopper_final','CampaignId\x20=\x20?','checkContactHopper','findOne','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','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','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','index','map','rawAttributes','fieldName','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','sort','where','filters','pick','filter','merge','options','CmHopperFinal','includeAll','include','findAll','catch','params','find','describe','body','uniqueid','sequelize','`state`\x20=\x200,\x201,\x20null','noSuchContacts','literal','`state`\x20=\x203,\x201,\x20null','`state`\x20=\x205,\x201,\x20null','`state`\x20=\x208,\x201,\x20null','COUNT','`state`\x20=\x2010\x20,\x201,\x20null','dropContacts','`state`\x20=\x2011\x20,\x201,\x20null','abandonedContacts','reCallContacts','`state`\x20=\x2019,\x201,\x20null','answeringMachine','countContactsIvrCampaignHopperFinal','noAnswerContacts','busyContacts','congestionContacts','`state`\x20=\x2022,\x201,\x20null','moveContactsQueueCampaignHopperFinal','VoiceQueue','insert'];(function(_0x5b78e8,_0x55096b){var _0xf2c321=function(_0x4e0cff){while(--_0x4e0cff){_0x5b78e8['push'](_0x5b78e8['shift']());}};_0xf2c321(++_0x55096b);}(_0x814b,0x1a2));var _0xb814=function(_0x10f6e8,_0x351db6){_0x10f6e8=_0x10f6e8-0x0;var _0x35bb3c=_0x814b[_0x10f6e8];return _0x35bb3c;};'use strict';var emlformat=require(_0xb814('0x0'));var rimraf=require(_0xb814('0x1'));var zipdir=require(_0xb814('0x2'));var jsonpatch=require(_0xb814('0x3'));var rp=require(_0xb814('0x4'));var moment=require(_0xb814('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xb814('0x6'));var util=require(_0xb814('0x7'));var path=require(_0xb814('0x8'));var sox=require(_0xb814('0x9'));var csv=require(_0xb814('0xa'));var ejs=require(_0xb814('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xb814('0xc'));var squel=require(_0xb814('0xd'));var crypto=require('crypto');var jsforce=require(_0xb814('0xe'));var deskjs=require(_0xb814('0xf'));var toCsv=require(_0xb814('0xa'));var querystring=require(_0xb814('0x10'));var Papa=require(_0xb814('0x11'));var Redis=require(_0xb814('0x12'));var authService=require(_0xb814('0x13'));var qs=require(_0xb814('0x14'));var as=require(_0xb814('0x15'));var hardwareService=require(_0xb814('0x16'));var logger=require(_0xb814('0x17'))('api');var utils=require(_0xb814('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0xb814('0x19'));var db=require(_0xb814('0x1a'))['db'];function respondWithStatusCode(_0x35b10d,_0x2cc46b){_0x2cc46b=_0x2cc46b||0xcc;return function(_0x2ce718){if(_0x2ce718){return _0x35b10d[_0xb814('0x1b')](_0x2cc46b);}return _0x35b10d[_0xb814('0x1c')](_0x2cc46b)[_0xb814('0x1d')]();};}function respondWithResult(_0xa0a2e5,_0x2ab627){_0x2ab627=_0x2ab627||0xc8;return function(_0x3f4881){if(_0x3f4881){return _0xa0a2e5[_0xb814('0x1c')](_0x2ab627)[_0xb814('0x1e')](_0x3f4881);}};}function respondWithFilteredResult(_0x39bfcf,_0x303aca){return function(_0x3a71d6){if(_0x3a71d6){var _0x45e0d0=typeof _0x303aca[_0xb814('0x1f')]===_0xb814('0x20')&&typeof _0x303aca[_0xb814('0x21')]===_0xb814('0x20');var _0x48c9df=_0x3a71d6[_0xb814('0x22')];var _0x55ba16=_0x45e0d0?0x0:_0x303aca[_0xb814('0x1f')];var _0xfac75b=_0x45e0d0?_0x3a71d6['count']:_0x303aca['offset']+_0x303aca['limit'];var _0x399b43;if(_0xfac75b>=_0x48c9df){_0xfac75b=_0x48c9df;_0x399b43=0xc8;}else{_0x399b43=0xce;}_0x39bfcf['status'](_0x399b43);return _0x39bfcf['set'](_0xb814('0x23'),_0x55ba16+'-'+_0xfac75b+'/'+_0x48c9df)[_0xb814('0x1e')](_0x3a71d6);}return null;};}function patchUpdates(_0x25b6b6){return function(_0x4e139e){try{jsonpatch[_0xb814('0x24')](_0x4e139e,_0x25b6b6,!![]);}catch(_0x531032){return BPromise[_0xb814('0x25')](_0x531032);}return _0x4e139e[_0xb814('0x26')]();};}function saveUpdates(_0x3b267e,_0x470e81){return function(_0x27352e){if(_0x27352e){return _0x27352e[_0xb814('0x27')](_0x3b267e)[_0xb814('0x28')](function(_0x594470){return _0x594470;});}return null;};}function removeEntity(_0x2ead86,_0x52b7a3){return function(_0x3f81d0){if(_0x3f81d0){return _0x3f81d0[_0xb814('0x29')]()[_0xb814('0x28')](function(){_0x2ead86[_0xb814('0x1c')](0xcc)[_0xb814('0x1d')]();});}};}function handleEntityNotFound(_0xb9e57d,_0x3d836c){return function(_0x5755ea){if(!_0x5755ea){_0xb9e57d[_0xb814('0x1b')](0x194);}return _0x5755ea;};}function handleError(_0xc0ef66,_0x1c2625){_0x1c2625=_0x1c2625||0x1f4;return function(_0x349394){logger[_0xb814('0x2a')](_0x349394[_0xb814('0x2b')]);if(_0x349394[_0xb814('0x2c')]){delete _0x349394[_0xb814('0x2c')];}_0xc0ef66['status'](_0x1c2625)[_0xb814('0x2d')](_0x349394);};}exports[_0xb814('0x2e')]=function(_0x52ed64,_0x9008b2){var _0x37d24d={},_0x530744={},_0x499f22={'count':0x0,'rows':[]};var _0x20577b=_[_0xb814('0x2f')](db['CmHopperFinal'][_0xb814('0x30')],function(_0x526610){return{'name':_0x526610[_0xb814('0x31')],'type':_0x526610['type']['key']};});_0x530744[_0xb814('0x32')]=_['map'](_0x20577b,_0xb814('0x2c'));_0x530744[_0xb814('0x33')]=_[_0xb814('0x34')](_0x52ed64['query']);_0x530744['filters']=_[_0xb814('0x35')](_0x530744[_0xb814('0x32')],_0x530744['query']);_0x37d24d[_0xb814('0x36')]=_[_0xb814('0x35')](_0x530744[_0xb814('0x32')],qs[_0xb814('0x37')](_0x52ed64[_0xb814('0x33')][_0xb814('0x37')]));_0x37d24d[_0xb814('0x36')]=_0x37d24d['attributes'][_0xb814('0x38')]?_0x37d24d[_0xb814('0x36')]:_0x530744[_0xb814('0x32')];if(!_0x52ed64[_0xb814('0x33')][_0xb814('0x39')]('nolimit')){_0x37d24d[_0xb814('0x21')]=qs['limit'](_0x52ed64[_0xb814('0x33')][_0xb814('0x21')]);_0x37d24d[_0xb814('0x1f')]=qs['offset'](_0x52ed64[_0xb814('0x33')][_0xb814('0x1f')]);}_0x37d24d['order']=qs[_0xb814('0x3a')](_0x52ed64[_0xb814('0x33')][_0xb814('0x3a')]);_0x37d24d[_0xb814('0x3b')]=qs[_0xb814('0x3c')](_[_0xb814('0x3d')](_0x52ed64['query'],_0x530744[_0xb814('0x3c')]),_0x20577b);if(_0x52ed64['query'][_0xb814('0x3e')]){_0x37d24d['where']=_[_0xb814('0x3f')](_0x37d24d['where'],{'$or':_[_0xb814('0x2f')](_0x20577b,function(_0x26675a){if(_0x26675a['type']!=='VIRTUAL'){var _0x5dd6bc={};_0x5dd6bc[_0x26675a['name']]={'$like':'%'+_0x52ed64[_0xb814('0x33')][_0xb814('0x3e')]+'%'};return _0x5dd6bc;}})});}_0x37d24d=_[_0xb814('0x3f')]({},_0x37d24d,_0x52ed64[_0xb814('0x40')]);var _0x51cdba={'where':_0x37d24d['where']};return db[_0xb814('0x41')]['count'](_0x51cdba)[_0xb814('0x28')](function(_0x1098eb){_0x499f22[_0xb814('0x22')]=_0x1098eb;if(_0x52ed64[_0xb814('0x33')][_0xb814('0x42')]){_0x37d24d[_0xb814('0x43')]=[{'all':!![]}];}return db[_0xb814('0x41')][_0xb814('0x44')](_0x37d24d);})[_0xb814('0x28')](function(_0x4b6ff8){_0x499f22['rows']=_0x4b6ff8;return _0x499f22;})['then'](respondWithFilteredResult(_0x9008b2,_0x37d24d))[_0xb814('0x45')](handleError(_0x9008b2,null));};exports['show']=function(_0x29416a,_0x580171){var _0x411723={'raw':!![],'where':{'id':_0x29416a[_0xb814('0x46')]['id']}},_0x44ff56={};_0x44ff56[_0xb814('0x32')]=_['keys'](db[_0xb814('0x41')][_0xb814('0x30')]);_0x44ff56[_0xb814('0x33')]=_[_0xb814('0x34')](_0x29416a[_0xb814('0x33')]);_0x44ff56[_0xb814('0x3c')]=_['intersection'](_0x44ff56[_0xb814('0x32')],_0x44ff56[_0xb814('0x33')]);_0x411723[_0xb814('0x36')]=_[_0xb814('0x35')](_0x44ff56[_0xb814('0x32')],qs[_0xb814('0x37')](_0x29416a[_0xb814('0x33')]['fields']));_0x411723['attributes']=_0x411723[_0xb814('0x36')][_0xb814('0x38')]?_0x411723[_0xb814('0x36')]:_0x44ff56[_0xb814('0x32')];if(_0x29416a[_0xb814('0x33')][_0xb814('0x42')]){_0x411723[_0xb814('0x43')]=[{'all':!![]}];}_0x411723=_[_0xb814('0x3f')]({},_0x411723,_0x29416a[_0xb814('0x40')]);return db[_0xb814('0x41')][_0xb814('0x47')](_0x411723)['then'](handleEntityNotFound(_0x580171,null))[_0xb814('0x28')](respondWithResult(_0x580171,null))[_0xb814('0x45')](handleError(_0x580171,null));};exports['describe']=function(_0x338e80,_0x55234d){return db[_0xb814('0x41')][_0xb814('0x48')]()[_0xb814('0x28')](respondWithResult(_0x55234d,null))[_0xb814('0x45')](handleError(_0x55234d,null));};exports[_0xb814('0x27')]=function(_0x4096d4,_0x2cc806){if(_0x4096d4[_0xb814('0x49')][_0xb814('0x4a')]){delete _0x4096d4[_0xb814('0x49')]['uniqueid'];}return db['CmHopperFinal'][_0xb814('0x47')]({'where':{'uniqueid':_0x4096d4[_0xb814('0x46')]['id']}})[_0xb814('0x28')](handleEntityNotFound(_0x2cc806,null))[_0xb814('0x28')](saveUpdates(_0x4096d4[_0xb814('0x49')],null))[_0xb814('0x28')](respondWithResult(_0x2cc806,null))[_0xb814('0x45')](handleError(_0x2cc806,null));};exports['countContactsQueueCampaignHopperFinal']=function(_0x26fd0b,_0x388324,_0xf27a6e){return db['CmHopperFinal'][_0xb814('0x44')]({'raw':![],'where':{'VoiceQueueId':_0x26fd0b['params']['id']},'attributes':[[db[_0xb814('0x4b')]['fn']('COUNT',db[_0xb814('0x4b')]['fn']('IF',db[_0xb814('0x4b')]['literal'](_0xb814('0x4c')))),_0xb814('0x4d')],[db[_0xb814('0x4b')]['fn']('COUNT',db[_0xb814('0x4b')]['fn']('IF',db['sequelize'][_0xb814('0x4e')](_0xb814('0x4f')))),'noAnswerContacts'],[db[_0xb814('0x4b')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0xb814('0x4b')][_0xb814('0x4e')](_0xb814('0x50')))),'busyContacts'],[db[_0xb814('0x4b')]['fn']('COUNT',db[_0xb814('0x4b')]['fn']('IF',db[_0xb814('0x4b')]['literal'](_0xb814('0x51')))),'congestionContacts'],[db[_0xb814('0x4b')]['fn'](_0xb814('0x52'),db[_0xb814('0x4b')]['fn']('IF',db[_0xb814('0x4b')][_0xb814('0x4e')](_0xb814('0x53')))),_0xb814('0x54')],[db[_0xb814('0x4b')]['fn']('COUNT',db[_0xb814('0x4b')]['fn']('IF',db[_0xb814('0x4b')]['literal'](_0xb814('0x55')))),_0xb814('0x56')],[db['sequelize']['fn'](_0xb814('0x52'),db['sequelize']['fn']('IF',db['sequelize'][_0xb814('0x4e')]('`state`\x20=\x2022,\x201,\x20null'))),_0xb814('0x57')],[db[_0xb814('0x4b')]['fn'](_0xb814('0x52'),db['sequelize']['fn']('IF',db[_0xb814('0x4b')]['literal'](_0xb814('0x58')))),_0xb814('0x59')]]})[_0xb814('0x28')](handleEntityNotFound(_0x388324,null))[_0xb814('0x28')](respondWithResult(_0x388324,null))[_0xb814('0x45')](handleError(_0x388324,null));};exports[_0xb814('0x5a')]=function(_0x2e5f99,_0x113350,_0x46014f){return db['CmHopperFinal'][_0xb814('0x44')]({'raw':![],'where':{'CampaignId':_0x2e5f99[_0xb814('0x46')]['id']},'attributes':[[db[_0xb814('0x4b')]['fn'](_0xb814('0x52'),db[_0xb814('0x4b')]['fn']('IF',db[_0xb814('0x4b')]['literal'](_0xb814('0x4c')))),'noSuchContacts'],[db[_0xb814('0x4b')]['fn'](_0xb814('0x52'),db[_0xb814('0x4b')]['fn']('IF',db['sequelize'][_0xb814('0x4e')]('`state`\x20=\x203,\x201,\x20null'))),_0xb814('0x5b')],[db['sequelize']['fn'](_0xb814('0x52'),db[_0xb814('0x4b')]['fn']('IF',db[_0xb814('0x4b')][_0xb814('0x4e')](_0xb814('0x50')))),_0xb814('0x5c')],[db[_0xb814('0x4b')]['fn']('COUNT',db[_0xb814('0x4b')]['fn']('IF',db['sequelize'][_0xb814('0x4e')](_0xb814('0x51')))),_0xb814('0x5d')],[db[_0xb814('0x4b')]['fn'](_0xb814('0x52'),db[_0xb814('0x4b')]['fn']('IF',db['sequelize'][_0xb814('0x4e')](_0xb814('0x53')))),'dropContacts'],[db[_0xb814('0x4b')]['fn'](_0xb814('0x52'),db[_0xb814('0x4b')]['fn']('IF',db[_0xb814('0x4b')][_0xb814('0x4e')]('`state`\x20=\x2011\x20,\x201,\x20null'))),_0xb814('0x56')],[db['sequelize']['fn'](_0xb814('0x52'),db[_0xb814('0x4b')]['fn']('IF',db[_0xb814('0x4b')][_0xb814('0x4e')](_0xb814('0x5e')))),_0xb814('0x57')],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db[_0xb814('0x4b')]['literal'](_0xb814('0x58')))),_0xb814('0x59')]]})[_0xb814('0x28')](handleEntityNotFound(_0x113350,null))['then'](respondWithResult(_0x113350,null))[_0xb814('0x45')](handleError(_0x113350,null));};exports[_0xb814('0x5f')]=function(_0xee204,_0x5aabbe,_0x30f717){return db[_0xb814('0x60')][_0xb814('0x47')]({'where':{'id':_0xee204[_0xb814('0x46')]['id']}})['then'](handleEntityNotFound(_0x5aabbe,null))['then'](function(_0x28eaf8){var _0x295488;if(_0x28eaf8){_0x295488=squel[_0xb814('0x61')]()[_0xb814('0x62')](_0xb814('0x63'))[_0xb814('0x64')]([_0xb814('0x65'),_0xb814('0x66'),_0xb814('0x67'),_0xb814('0x68'),_0xb814('0x69'),_0xb814('0x6a'),_0xb814('0x6b')],squel[_0xb814('0x6c')]()[_0xb814('0x6d')]('ANY_VALUE(calleridnum)',_0xb814('0x65'))[_0xb814('0x6d')](_0xb814('0x6e'),_0xb814('0x66'))[_0xb814('0x6d')](_0xb814('0x6f'),'ContactId')[_0xb814('0x6d')]('ANY_VALUE(ListId)',_0xb814('0x68'))[_0xb814('0x6d')](_0xb814('0x70'),_0xb814('0x69'))[_0xb814('0x6d')]('NOW()','createdAt')[_0xb814('0x6d')](_0xb814('0x6e'),_0xb814('0x6b'))[_0xb814('0x71')]('cm_hopper_final')[_0xb814('0x3b')]('VoiceQueueId\x20=\x20?',_0xee204[_0xb814('0x46')]['id'][_0xb814('0x72')]())['where']('state\x20=\x20?',_0xee204[_0xb814('0x49')]['state'][_0xb814('0x72')]())[_0xb814('0x3b')](_0xb814('0x73'))[_0xb814('0x3b')](_0xb814('0x74'),squel[_0xb814('0x6c')]()[_0xb814('0x6d')]('phone')[_0xb814('0x71')]('cm_hopper')[_0xb814('0x3b')]('VoiceQueueId\x20=\x20?',_0xee204[_0xb814('0x46')]['id'][_0xb814('0x72')]()))['where'](_0xb814('0x74'),squel['select']()[_0xb814('0x6d')](_0xb814('0x75'))['from']('cm_hopper_final')[_0xb814('0x3b')](_0xb814('0x76'),_0xee204[_0xb814('0x46')]['id'][_0xb814('0x72')]())[_0xb814('0x3b')](_0xb814('0x77')))[_0xb814('0x78')](_0xb814('0x67')))[_0xb814('0x72')]();return db[_0xb814('0x4b')]['query'](_0x295488);}return[];})['then'](respondWithResult(_0x5aabbe,null))['catch'](handleError(_0x5aabbe,null));};exports['moveContactsIvrCampaignHopperFinal']=function(_0x52b6da,_0x45a202,_0x75a33){return db[_0xb814('0x79')]['find']({'where':{'id':_0x52b6da[_0xb814('0x46')]['id']}})[_0xb814('0x28')](handleEntityNotFound(_0x45a202,null))[_0xb814('0x28')](function(_0x26ce5b){var _0x161658;if(_0x26ce5b){_0x161658=squel[_0xb814('0x61')]()[_0xb814('0x62')](_0xb814('0x63'))['fromQuery']([_0xb814('0x65'),_0xb814('0x66'),_0xb814('0x67'),_0xb814('0x68'),'CampaignId',_0xb814('0x6a'),_0xb814('0x6b')],squel[_0xb814('0x6c')]()[_0xb814('0x6d')](_0xb814('0x7a'),'phone')['field'](_0xb814('0x6e'),'scheduledAt')[_0xb814('0x6d')](_0xb814('0x6f'),'ContactId')[_0xb814('0x6d')]('ANY_VALUE(ListId)',_0xb814('0x68'))['field'](_0xb814('0x7b'),_0xb814('0x7c'))[_0xb814('0x6d')](_0xb814('0x6e'),_0xb814('0x6a'))[_0xb814('0x6d')](_0xb814('0x6e'),'updatedAt')['from'](_0xb814('0x7d'))['where']('CampaignId\x20=\x20?',_0x52b6da[_0xb814('0x46')]['id'][_0xb814('0x72')]())[_0xb814('0x3b')]('state\x20=\x20?',_0x52b6da[_0xb814('0x49')]['state'][_0xb814('0x72')]())[_0xb814('0x3b')](_0xb814('0x73'))[_0xb814('0x3b')]('calleridnum\x20NOT\x20IN\x20(?)',squel[_0xb814('0x6c')]()[_0xb814('0x6d')](_0xb814('0x65'))['from'](_0xb814('0x63'))[_0xb814('0x3b')](_0xb814('0x7e'),_0x52b6da['params']['id'][_0xb814('0x72')]()))[_0xb814('0x3b')](_0xb814('0x74'),squel[_0xb814('0x6c')]()[_0xb814('0x6d')](_0xb814('0x75'))[_0xb814('0x71')](_0xb814('0x7d'))[_0xb814('0x3b')](_0xb814('0x7e'),_0x52b6da[_0xb814('0x46')]['id'][_0xb814('0x72')]())[_0xb814('0x3b')]('state\x20=\x204'))['group'](_0xb814('0x67')))['toString']();return db[_0xb814('0x4b')][_0xb814('0x33')](_0x161658);}return[];})[_0xb814('0x28')](respondWithResult(_0x45a202,null))[_0xb814('0x45')](handleError(_0x45a202,null));};exports[_0xb814('0x7f')]=function(_0x2f1674,_0xf0610f,_0x5db5d0){return db['CmHopper'][_0xb814('0x80')]({'where':{'VoiceQueueId':_0x2f1674['body'][_0xb814('0x69')],'CampaignId':_0x2f1674[_0xb814('0x49')][_0xb814('0x7c')],'ContactId':_0x2f1674['body'][_0xb814('0x67')]}})[_0xb814('0x28')](handleEntityNotFound(_0xf0610f,null))[_0xb814('0x28')](function(_0x38c6da){if(_0x38c6da){return _0x38c6da;}return null;})[_0xb814('0x28')](respondWithResult(_0xf0610f,null))['catch'](handleError(_0xf0610f,null));};
\ No newline at end of file
index 0b40c2d..860e1a1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1726=['bluebird','request-promise','path','../../config/environment','./cmHopperFinal.attributes','exports','define','CmHopperFinal','cm_hopper_final','calleridnum','uniqueid','lodash','util','api','moment'];(function(_0xbb1b4d,_0xa342cd){var _0x466b5a=function(_0x46d4ba){while(--_0x46d4ba){_0xbb1b4d['push'](_0xbb1b4d['shift']());}};_0x466b5a(++_0xa342cd);}(_0x1726,0x1dc));var _0x6172=function(_0x585ee5,_0x1c9dba){_0x585ee5=_0x585ee5-0x0;var _0x470808=_0x1726[_0x585ee5];return _0x470808;};'use strict';var _=require(_0x6172('0x0'));var util=require(_0x6172('0x1'));var logger=require('../../config/logger')(_0x6172('0x2'));var moment=require(_0x6172('0x3'));var BPromise=require(_0x6172('0x4'));var rp=require(_0x6172('0x5'));var fs=require('fs');var path=require(_0x6172('0x6'));var rimraf=require('rimraf');var config=require(_0x6172('0x7'));var attributes=require(_0x6172('0x8'));module[_0x6172('0x9')]=function(_0x42da6c,_0x235d34){return _0x42da6c[_0x6172('0xa')](_0x6172('0xb'),attributes,{'tableName':_0x6172('0xc'),'paranoid':![],'indexes':[{'name':_0x6172('0xd'),'fields':[_0x6172('0xd')]},{'name':_0x6172('0xe'),'fields':[_0x6172('0xe')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x9740=['calleridnum','uniqueid','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./cmHopperFinal.attributes','exports','define','cm_hopper_final'];(function(_0x3db791,_0xc96e9b){var _0x4d4eb0=function(_0x1e3dcf){while(--_0x1e3dcf){_0x3db791['push'](_0x3db791['shift']());}};_0x4d4eb0(++_0xc96e9b);}(_0x9740,0x172));var _0x0974=function(_0x26e322,_0x56b29c){_0x26e322=_0x26e322-0x0;var _0x56ed11=_0x9740[_0x26e322];return _0x56ed11;};'use strict';var _=require(_0x0974('0x0'));var util=require(_0x0974('0x1'));var logger=require(_0x0974('0x2'))(_0x0974('0x3'));var moment=require(_0x0974('0x4'));var BPromise=require(_0x0974('0x5'));var rp=require(_0x0974('0x6'));var fs=require('fs');var path=require(_0x0974('0x7'));var rimraf=require(_0x0974('0x8'));var config=require(_0x0974('0x9'));var attributes=require(_0x0974('0xa'));module[_0x0974('0xb')]=function(_0x924728,_0x5c0bee){return _0x924728[_0x0974('0xc')]('CmHopperFinal',attributes,{'tableName':_0x0974('0xd'),'paranoid':![],'indexes':[{'name':_0x0974('0xe'),'fields':[_0x0974('0xe')]},{'name':_0x0974('0xf'),'fields':[_0x0974('0xf')]}],'timestamps':!![]});};
\ No newline at end of file
index 4129faa..dfe370c 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(_0x857219,_0x385b98){var _0xba109e=function(_0x250ec1){while(--_0x250ec1){_0x857219['push'](_0x857219['shift']());}};_0xba109e(++_0x385b98);}(_0x7a54,0x106));var _0x47a5=function(_0x2a1c64,_0x43e27c){_0x2a1c64=_0x2a1c64-0x0;var _0x382299=_0x7a54[_0x2a1c64];return _0x382299;};'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 _0xb10b=['debug','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','CmHopperFinal,\x20%s,\x20%s','CmHopperFinal,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','CreateCmHopperFinal','CmHopperFinal','create','options','raw'];(function(_0x45a80e,_0x5ba9d0){var _0x415d52=function(_0x2166ae){while(--_0x2166ae){_0x45a80e['push'](_0x45a80e['shift']());}};_0x415d52(++_0x5ba9d0);}(_0xb10b,0x12a));var _0xbb10=function(_0x1caf4f,_0xd0b32d){_0x1caf4f=_0x1caf4f-0x0;var _0x11b9e2=_0xb10b[_0x1caf4f];return _0x11b9e2;};'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')]('CreateCmHopperFinal',_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')]));});});};
\ No newline at end of file
index b291f98..2324752 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x359e=['../../components/interaction/service','../../config/environment','get','index','/describe','isAuthenticated','describe','/:id','show','/voice/queue/countAttributes/:id','/campaign/countAttributes/:id','post','/voice/queue/moveContacts/:id','moveContactsQueueCampaignHopperFinal','checkContactHopper','put','update','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service'];(function(_0x4730bd,_0x1e9541){var _0x1b2849=function(_0x1fc5a8){while(--_0x1fc5a8){_0x4730bd['push'](_0x4730bd['shift']());}};_0x1b2849(++_0x1e9541);}(_0x359e,0xda));var _0xe359=function(_0x3a8267,_0xc6e696){_0x3a8267=_0x3a8267-0x0;var _0x543101=_0x359e[_0x3a8267];return _0x543101;};'use strict';var multer=require(_0xe359('0x0'));var util=require('util');var path=require(_0xe359('0x1'));var timeout=require(_0xe359('0x2'));var express=require(_0xe359('0x3'));var router=express[_0xe359('0x4')]();var fs_extra=require(_0xe359('0x5'));var auth=require(_0xe359('0x6'));var interaction=require(_0xe359('0x7'));var config=require(_0xe359('0x8'));var controller=require('./cmHopperFinal.controller');router[_0xe359('0x9')]('/',auth['isAuthenticated'](),controller[_0xe359('0xa')]);router[_0xe359('0x9')](_0xe359('0xb'),auth[_0xe359('0xc')](),controller[_0xe359('0xd')]);router[_0xe359('0x9')](_0xe359('0xe'),auth[_0xe359('0xc')](),controller[_0xe359('0xf')]);router[_0xe359('0x9')](_0xe359('0x10'),auth[_0xe359('0xc')](),controller['countContactsQueueCampaignHopperFinal']);router[_0xe359('0x9')](_0xe359('0x11'),auth['isAuthenticated'](),controller['countContactsIvrCampaignHopperFinal']);router[_0xe359('0x12')](_0xe359('0x13'),auth[_0xe359('0xc')](),controller[_0xe359('0x14')]);router[_0xe359('0x12')]('/voice/campaign/moveContacts/:id',auth[_0xe359('0xc')](),controller['moveContactsIvrCampaignHopperFinal']);router[_0xe359('0x12')]('/checkContactHopper',auth['isAuthenticated'](),controller[_0xe359('0x15')]);router[_0xe359('0x16')]('/:id',auth[_0xe359('0xc')](),controller[_0xe359('0x17')]);module[_0xe359('0x18')]=router;
\ No newline at end of file
+var _0x0e79=['get','isAuthenticated','index','/voice/queue/countAttributes/:id','countContactsQueueCampaignHopperFinal','/campaign/countAttributes/:id','countContactsIvrCampaignHopperFinal','post','/voice/queue/moveContacts/:id','moveContactsQueueCampaignHopperFinal','/voice/campaign/moveContacts/:id','moveContactsIvrCampaignHopperFinal','/checkContactHopper','checkContactHopper','update','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmHopperFinal.controller'];(function(_0xd22918,_0x1de1a1){var _0x30c9f9=function(_0x40b277){while(--_0x40b277){_0xd22918['push'](_0xd22918['shift']());}};_0x30c9f9(++_0x1de1a1);}(_0x0e79,0xac));var _0x90e7=function(_0x2b4411,_0x2625ed){_0x2b4411=_0x2b4411-0x0;var _0x8e41ef=_0x0e79[_0x2b4411];return _0x8e41ef;};'use strict';var multer=require(_0x90e7('0x0'));var util=require(_0x90e7('0x1'));var path=require(_0x90e7('0x2'));var timeout=require(_0x90e7('0x3'));var express=require(_0x90e7('0x4'));var router=express['Router']();var fs_extra=require(_0x90e7('0x5'));var auth=require(_0x90e7('0x6'));var interaction=require(_0x90e7('0x7'));var config=require(_0x90e7('0x8'));var controller=require(_0x90e7('0x9'));router[_0x90e7('0xa')]('/',auth[_0x90e7('0xb')](),controller[_0x90e7('0xc')]);router['get']('/describe',auth[_0x90e7('0xb')](),controller['describe']);router[_0x90e7('0xa')]('/:id',auth['isAuthenticated'](),controller['show']);router['get'](_0x90e7('0xd'),auth[_0x90e7('0xb')](),controller[_0x90e7('0xe')]);router[_0x90e7('0xa')](_0x90e7('0xf'),auth[_0x90e7('0xb')](),controller[_0x90e7('0x10')]);router[_0x90e7('0x11')](_0x90e7('0x12'),auth['isAuthenticated'](),controller[_0x90e7('0x13')]);router[_0x90e7('0x11')](_0x90e7('0x14'),auth[_0x90e7('0xb')](),controller[_0x90e7('0x15')]);router[_0x90e7('0x11')](_0x90e7('0x16'),auth['isAuthenticated'](),controller[_0x90e7('0x17')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0x90e7('0x18')]);module[_0x90e7('0x19')]=router;
\ No newline at end of file
index 27a3cf5..bb3d113 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x336e=['BOOLEAN','INTEGER','DATE','STRING'];(function(_0x2fdb4f,_0x50a851){var _0x4fa592=function(_0x37b118){while(--_0x37b118){_0x2fdb4f['push'](_0x2fdb4f['shift']());}};_0x4fa592(++_0x50a851);}(_0x336e,0xad));var _0xe336=function(_0x1cc8fe,_0x105328){_0x1cc8fe=_0x1cc8fe-0x0;var _0x230054=_0x336e[_0x1cc8fe];return _0x230054;};'use strict';var Sequelize=require('sequelize');module['exports']={'state':{'type':Sequelize[_0xe336('0x0')](0x2)},'statedesc':{'type':Sequelize['STRING']},'scheduledat':{'type':Sequelize[_0xe336('0x1')]},'countbusyretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0xe336('0x0')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0xe336('0x0')],'defaultValue':0x0},'countglobal':{'type':Sequelize[_0xe336('0x0')],'defaultValue':0x0},'uniqueid':{'type':Sequelize[_0xe336('0x2')]},'originatecalleridnum':{'type':Sequelize[_0xe336('0x2')]},'originatecalleridname':{'type':Sequelize[_0xe336('0x2')]},'calleridnum':{'type':Sequelize[_0xe336('0x2')]},'calleridname':{'type':Sequelize[_0xe336('0x2')]},'starttime':{'type':Sequelize[_0xe336('0x1')]},'responsetime':{'type':Sequelize[_0xe336('0x1')]},'answertime':{'type':Sequelize[_0xe336('0x1')]},'droptime':{'type':Sequelize['DATE']},'endtime':{'type':Sequelize['DATE']},'ringtime':{'type':Sequelize[_0xe336('0x0')],'defaultValue':0x0},'holdtime':{'type':Sequelize[_0xe336('0x0')],'defaultValue':0x0},'talktime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'followuptime':{'type':Sequelize[_0xe336('0x0')],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0xe336('0x2')]},'campaign':{'type':Sequelize[_0xe336('0x2')]},'campaigntype':{'type':Sequelize['STRING']},'membername':{'type':Sequelize[_0xe336('0x2')]},'reason':{'type':Sequelize['STRING']},'amd':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'fax':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'callback':{'type':Sequelize[_0xe336('0x3')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0xe336('0x2')],'defaultValue':null},'callbackat':{'type':Sequelize[_0xe336('0x1')]},'recallme':{'type':Sequelize[_0xe336('0x3')],'defaultValue':![]},'editedat':{'type':Sequelize[_0xe336('0x1')]},'edited':{'type':Sequelize[_0xe336('0x3')],'defaultValue':![]},'countnosuchnumberretry':{'type':Sequelize[_0xe336('0x0')],'defaultValue':0x0},'countdropretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0xe336('0x0')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0xe336('0x0')],'defaultValue':0x0},'dialTimezone':{'type':Sequelize[_0xe336('0x2')]}};
\ No newline at end of file
+var _0xbb68=['exports','INTEGER','STRING','DATE','BOOLEAN','sequelize'];(function(_0x558dad,_0x1a9b5a){var _0x1921ea=function(_0x2d44d6){while(--_0x2d44d6){_0x558dad['push'](_0x558dad['shift']());}};_0x1921ea(++_0x1a9b5a);}(_0xbb68,0xad));var _0x8bb6=function(_0x397496,_0x4783d2){_0x397496=_0x397496-0x0;var _0x1a12e2=_0xbb68[_0x397496];return _0x1a12e2;};'use strict';var Sequelize=require(_0x8bb6('0x0'));module[_0x8bb6('0x1')]={'state':{'type':Sequelize[_0x8bb6('0x2')](0x2)},'statedesc':{'type':Sequelize[_0x8bb6('0x3')]},'scheduledat':{'type':Sequelize[_0x8bb6('0x4')]},'countbusyretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x8bb6('0x2')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x8bb6('0x2')],'defaultValue':0x0},'countglobal':{'type':Sequelize[_0x8bb6('0x2')],'defaultValue':0x0},'uniqueid':{'type':Sequelize['STRING']},'originatecalleridnum':{'type':Sequelize[_0x8bb6('0x3')]},'originatecalleridname':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize[_0x8bb6('0x3')]},'calleridname':{'type':Sequelize[_0x8bb6('0x3')]},'starttime':{'type':Sequelize[_0x8bb6('0x4')]},'responsetime':{'type':Sequelize[_0x8bb6('0x4')]},'answertime':{'type':Sequelize[_0x8bb6('0x4')]},'droptime':{'type':Sequelize[_0x8bb6('0x4')]},'endtime':{'type':Sequelize[_0x8bb6('0x4')]},'ringtime':{'type':Sequelize[_0x8bb6('0x2')],'defaultValue':0x0},'holdtime':{'type':Sequelize[_0x8bb6('0x2')],'defaultValue':0x0},'talktime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'followuptime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0x8bb6('0x3')]},'campaign':{'type':Sequelize['STRING']},'campaigntype':{'type':Sequelize[_0x8bb6('0x3')]},'membername':{'type':Sequelize['STRING']},'reason':{'type':Sequelize[_0x8bb6('0x3')]},'amd':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'fax':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'callback':{'type':Sequelize[_0x8bb6('0x5')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x8bb6('0x3')],'defaultValue':null},'callbackat':{'type':Sequelize[_0x8bb6('0x4')]},'recallme':{'type':Sequelize[_0x8bb6('0x5')],'defaultValue':![]},'editedat':{'type':Sequelize[_0x8bb6('0x4')]},'edited':{'type':Sequelize[_0x8bb6('0x5')],'defaultValue':![]},'countnosuchnumberretry':{'type':Sequelize[_0x8bb6('0x2')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x8bb6('0x2')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x8bb6('0x2')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x8bb6('0x2')],'defaultValue':0x0},'dialTimezone':{'type':Sequelize[_0x8bb6('0x3')]}};
\ No newline at end of file
index 1cb5998..8b888c4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8ba3=['stack','name','send','index','map','rawAttributes','fieldName','type','key','model','keys','intersection','query','attributes','fields','length','hasOwnProperty','order','sort','where','filters','pick','filter','VIRTUAL','options','CmHopperHistory','includeAll','include','findAll','catch','show','params','find','body','describe','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','sox','to-csv','fs-extra','squel','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','error'];(function(_0x106f3e,_0x3b1c9b){var _0x1f8ac8=function(_0x688c98){while(--_0x688c98){_0x106f3e['push'](_0x106f3e['shift']());}};_0x1f8ac8(++_0x3b1c9b);}(_0x8ba3,0xb7));var _0x38ba=function(_0x6bab02,_0x383b22){_0x6bab02=_0x6bab02-0x0;var _0x169670=_0x8ba3[_0x6bab02];return _0x169670;};'use strict';var emlformat=require(_0x38ba('0x0'));var rimraf=require(_0x38ba('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x38ba('0x2'));var rp=require(_0x38ba('0x3'));var moment=require('moment');var BPromise=require(_0x38ba('0x4'));var Mustache=require(_0x38ba('0x5'));var util=require(_0x38ba('0x6'));var path=require('path');var sox=require(_0x38ba('0x7'));var csv=require(_0x38ba('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x38ba('0x9'));var _=require('lodash');var squel=require(_0x38ba('0xa'));var crypto=require(_0x38ba('0xb'));var jsforce=require(_0x38ba('0xc'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x38ba('0xd'));var Papa=require('papaparse');var Redis=require(_0x38ba('0xe'));var authService=require(_0x38ba('0xf'));var qs=require(_0x38ba('0x10'));var as=require(_0x38ba('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x38ba('0x12'));var utils=require(_0x38ba('0x13'));var config=require(_0x38ba('0x14'));var licenseUtil=require(_0x38ba('0x15'));var db=require(_0x38ba('0x16'))['db'];function respondWithStatusCode(_0x14cd1d,_0x57bf99){_0x57bf99=_0x57bf99||0xcc;return function(_0x10c542){if(_0x10c542){return _0x14cd1d[_0x38ba('0x17')](_0x57bf99);}return _0x14cd1d[_0x38ba('0x18')](_0x57bf99)[_0x38ba('0x19')]();};}function respondWithResult(_0x5398f6,_0x1ca8c9){_0x1ca8c9=_0x1ca8c9||0xc8;return function(_0x4ae25c){if(_0x4ae25c){return _0x5398f6['status'](_0x1ca8c9)[_0x38ba('0x1a')](_0x4ae25c);}};}function respondWithFilteredResult(_0x26100a,_0x4b2eb1){return function(_0x4f9788){if(_0x4f9788){var _0x3d95eb=typeof _0x4b2eb1[_0x38ba('0x1b')]===_0x38ba('0x1c')&&typeof _0x4b2eb1[_0x38ba('0x1d')]===_0x38ba('0x1c');var _0x66f997=_0x4f9788[_0x38ba('0x1e')];var _0x6f4363=_0x3d95eb?0x0:_0x4b2eb1['offset'];var _0x323e8b=_0x3d95eb?_0x4f9788[_0x38ba('0x1e')]:_0x4b2eb1[_0x38ba('0x1b')]+_0x4b2eb1['limit'];var _0x1a8015;if(_0x323e8b>=_0x66f997){_0x323e8b=_0x66f997;_0x1a8015=0xc8;}else{_0x1a8015=0xce;}_0x26100a[_0x38ba('0x18')](_0x1a8015);return _0x26100a[_0x38ba('0x1f')](_0x38ba('0x20'),_0x6f4363+'-'+_0x323e8b+'/'+_0x66f997)[_0x38ba('0x1a')](_0x4f9788);}return null;};}function patchUpdates(_0x1d5862){return function(_0x4f75f7){try{jsonpatch[_0x38ba('0x21')](_0x4f75f7,_0x1d5862,!![]);}catch(_0x5c0477){return BPromise[_0x38ba('0x22')](_0x5c0477);}return _0x4f75f7[_0x38ba('0x23')]();};}function saveUpdates(_0x3a7b3b,_0x2c769f){return function(_0xace22){if(_0xace22){return _0xace22[_0x38ba('0x24')](_0x3a7b3b)[_0x38ba('0x25')](function(_0x50a97b){return _0x50a97b;});}return null;};}function removeEntity(_0x2fbc8a,_0x1f5e90){return function(_0x3946e8){if(_0x3946e8){return _0x3946e8['destroy']()[_0x38ba('0x25')](function(){_0x2fbc8a[_0x38ba('0x18')](0xcc)[_0x38ba('0x19')]();});}};}function handleEntityNotFound(_0x46e208,_0x56b3e9){return function(_0x51b7cc){if(!_0x51b7cc){_0x46e208[_0x38ba('0x17')](0x194);}return _0x51b7cc;};}function handleError(_0x36cccd,_0x4ba3d6){_0x4ba3d6=_0x4ba3d6||0x1f4;return function(_0x24e187){logger[_0x38ba('0x26')](_0x24e187[_0x38ba('0x27')]);if(_0x24e187['name']){delete _0x24e187[_0x38ba('0x28')];}_0x36cccd[_0x38ba('0x18')](_0x4ba3d6)[_0x38ba('0x29')](_0x24e187);};}exports[_0x38ba('0x2a')]=function(_0x46f8a2,_0x52f9d3){var _0x3fa493={},_0xc3eba4={},_0x25de14={'count':0x0,'rows':[]};var _0x15dea0=_[_0x38ba('0x2b')](db['CmHopperHistory'][_0x38ba('0x2c')],function(_0x23903c){return{'name':_0x23903c[_0x38ba('0x2d')],'type':_0x23903c[_0x38ba('0x2e')][_0x38ba('0x2f')]};});_0xc3eba4[_0x38ba('0x30')]=_['map'](_0x15dea0,_0x38ba('0x28'));_0xc3eba4['query']=_[_0x38ba('0x31')](_0x46f8a2['query']);_0xc3eba4['filters']=_[_0x38ba('0x32')](_0xc3eba4['model'],_0xc3eba4[_0x38ba('0x33')]);_0x3fa493[_0x38ba('0x34')]=_[_0x38ba('0x32')](_0xc3eba4[_0x38ba('0x30')],qs[_0x38ba('0x35')](_0x46f8a2[_0x38ba('0x33')][_0x38ba('0x35')]));_0x3fa493[_0x38ba('0x34')]=_0x3fa493[_0x38ba('0x34')][_0x38ba('0x36')]?_0x3fa493[_0x38ba('0x34')]:_0xc3eba4[_0x38ba('0x30')];if(!_0x46f8a2[_0x38ba('0x33')][_0x38ba('0x37')]('nolimit')){_0x3fa493['limit']=qs[_0x38ba('0x1d')](_0x46f8a2[_0x38ba('0x33')][_0x38ba('0x1d')]);_0x3fa493[_0x38ba('0x1b')]=qs[_0x38ba('0x1b')](_0x46f8a2['query']['offset']);}_0x3fa493[_0x38ba('0x38')]=qs[_0x38ba('0x39')](_0x46f8a2[_0x38ba('0x33')][_0x38ba('0x39')]);_0x3fa493[_0x38ba('0x3a')]=qs[_0x38ba('0x3b')](_[_0x38ba('0x3c')](_0x46f8a2[_0x38ba('0x33')],_0xc3eba4[_0x38ba('0x3b')]),_0x15dea0);if(_0x46f8a2[_0x38ba('0x33')][_0x38ba('0x3d')]){_0x3fa493[_0x38ba('0x3a')]=_['merge'](_0x3fa493[_0x38ba('0x3a')],{'$or':_[_0x38ba('0x2b')](_0x15dea0,function(_0x3ba59f){if(_0x3ba59f[_0x38ba('0x2e')]!==_0x38ba('0x3e')){var _0x148595={};_0x148595[_0x3ba59f['name']]={'$like':'%'+_0x46f8a2[_0x38ba('0x33')][_0x38ba('0x3d')]+'%'};return _0x148595;}})});}_0x3fa493=_['merge']({},_0x3fa493,_0x46f8a2[_0x38ba('0x3f')]);var _0x36bfce={'where':_0x3fa493[_0x38ba('0x3a')]};return db[_0x38ba('0x40')]['count'](_0x36bfce)[_0x38ba('0x25')](function(_0x374965){_0x25de14[_0x38ba('0x1e')]=_0x374965;if(_0x46f8a2[_0x38ba('0x33')][_0x38ba('0x41')]){_0x3fa493[_0x38ba('0x42')]=[{'all':!![]}];}return db['CmHopperHistory'][_0x38ba('0x43')](_0x3fa493);})['then'](function(_0x567dcb){_0x25de14['rows']=_0x567dcb;return _0x25de14;})[_0x38ba('0x25')](respondWithFilteredResult(_0x52f9d3,_0x3fa493))[_0x38ba('0x44')](handleError(_0x52f9d3,null));};exports[_0x38ba('0x45')]=function(_0x4a512b,_0x30b63a){var _0x4b583d={'raw':!![],'where':{'id':_0x4a512b[_0x38ba('0x46')]['id']}},_0x4c20dd={};_0x4c20dd['model']=_[_0x38ba('0x31')](db[_0x38ba('0x40')][_0x38ba('0x2c')]);_0x4c20dd[_0x38ba('0x33')]=_[_0x38ba('0x31')](_0x4a512b['query']);_0x4c20dd[_0x38ba('0x3b')]=_[_0x38ba('0x32')](_0x4c20dd[_0x38ba('0x30')],_0x4c20dd[_0x38ba('0x33')]);_0x4b583d[_0x38ba('0x34')]=_[_0x38ba('0x32')](_0x4c20dd['model'],qs[_0x38ba('0x35')](_0x4a512b[_0x38ba('0x33')]['fields']));_0x4b583d['attributes']=_0x4b583d[_0x38ba('0x34')][_0x38ba('0x36')]?_0x4b583d[_0x38ba('0x34')]:_0x4c20dd[_0x38ba('0x30')];if(_0x4a512b[_0x38ba('0x33')][_0x38ba('0x41')]){_0x4b583d[_0x38ba('0x42')]=[{'all':!![]}];}_0x4b583d=_['merge']({},_0x4b583d,_0x4a512b[_0x38ba('0x3f')]);return db['CmHopperHistory'][_0x38ba('0x47')](_0x4b583d)['then'](handleEntityNotFound(_0x30b63a,null))[_0x38ba('0x25')](respondWithResult(_0x30b63a,null))['catch'](handleError(_0x30b63a,null));};exports['create']=function(_0x5c8c14,_0x3fcae9){return db['CmHopperHistory']['create'](_0x5c8c14[_0x38ba('0x48')],{})[_0x38ba('0x25')](respondWithResult(_0x3fcae9,0xc9))[_0x38ba('0x44')](handleError(_0x3fcae9,null));};exports[_0x38ba('0x49')]=function(_0x21d9f7,_0x5644b9){return db['CmHopperHistory'][_0x38ba('0x49')]()['then'](respondWithResult(_0x5644b9,null))[_0x38ba('0x44')](handleError(_0x5644b9,null));};exports['update']=function(_0x503ee2,_0x1085c7){if(_0x503ee2['body']['uniqueid']){delete _0x503ee2[_0x38ba('0x48')]['uniqueid'];}return db[_0x38ba('0x40')][_0x38ba('0x47')]({'where':{'uniqueid':_0x503ee2[_0x38ba('0x46')]['id']}})[_0x38ba('0x25')](handleEntityNotFound(_0x1085c7,null))[_0x38ba('0x25')](saveUpdates(_0x503ee2[_0x38ba('0x48')],null))['then'](respondWithResult(_0x1085c7,null))['catch'](handleError(_0x1085c7,null));};
\ No newline at end of file
+var _0xafee=['intersection','fields','length','nolimit','order','sort','where','merge','VIRTUAL','filter','CmHopperHistory','includeAll','include','findAll','rows','catch','show','params','keys','options','create','body','describe','uniqueid','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','path','sox','to-csv','lodash','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','end','status','json','offset','limit','undefined','count','set','Content-Range','apply','save','update','then','destroy','sendStatus','stack','name','send','index','rawAttributes','fieldName','type','key','map','query','filters','model','attributes'];(function(_0x5e7331,_0x3b811b){var _0x192bf1=function(_0x274981){while(--_0x274981){_0x5e7331['push'](_0x5e7331['shift']());}};_0x192bf1(++_0x3b811b);}(_0xafee,0xac));var _0xeafe=function(_0x68c979,_0x431cff){_0x68c979=_0x68c979-0x0;var _0x4f0001=_0xafee[_0x68c979];return _0x4f0001;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xeafe('0x0'));var zipdir=require(_0xeafe('0x1'));var jsonpatch=require(_0xeafe('0x2'));var rp=require(_0xeafe('0x3'));var moment=require(_0xeafe('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xeafe('0x5'));var util=require('util');var path=require(_0xeafe('0x6'));var sox=require(_0xeafe('0x7'));var csv=require(_0xeafe('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xeafe('0x9'));var squel=require('squel');var crypto=require(_0xeafe('0xa'));var jsforce=require(_0xeafe('0xb'));var deskjs=require(_0xeafe('0xc'));var toCsv=require('to-csv');var querystring=require(_0xeafe('0xd'));var Papa=require('papaparse');var Redis=require(_0xeafe('0xe'));var authService=require('../../components/auth/service');var qs=require(_0xeafe('0xf'));var as=require(_0xeafe('0x10'));var hardwareService=require(_0xeafe('0x11'));var logger=require(_0xeafe('0x12'))('api');var utils=require(_0xeafe('0x13'));var config=require(_0xeafe('0x14'));var licenseUtil=require(_0xeafe('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x297058,_0x25504f){_0x25504f=_0x25504f||0xcc;return function(_0x396090){if(_0x396090){return _0x297058['sendStatus'](_0x25504f);}return _0x297058['status'](_0x25504f)[_0xeafe('0x16')]();};}function respondWithResult(_0x446cab,_0xf18c7c){_0xf18c7c=_0xf18c7c||0xc8;return function(_0x50defb){if(_0x50defb){return _0x446cab[_0xeafe('0x17')](_0xf18c7c)[_0xeafe('0x18')](_0x50defb);}};}function respondWithFilteredResult(_0x5904ab,_0x127c23){return function(_0x3b8837){if(_0x3b8837){var _0x2bed8e=typeof _0x127c23[_0xeafe('0x19')]==='undefined'&&typeof _0x127c23[_0xeafe('0x1a')]===_0xeafe('0x1b');var _0x4bf311=_0x3b8837['count'];var _0x478631=_0x2bed8e?0x0:_0x127c23[_0xeafe('0x19')];var _0x2e5504=_0x2bed8e?_0x3b8837[_0xeafe('0x1c')]:_0x127c23[_0xeafe('0x19')]+_0x127c23['limit'];var _0x1be1e1;if(_0x2e5504>=_0x4bf311){_0x2e5504=_0x4bf311;_0x1be1e1=0xc8;}else{_0x1be1e1=0xce;}_0x5904ab[_0xeafe('0x17')](_0x1be1e1);return _0x5904ab[_0xeafe('0x1d')](_0xeafe('0x1e'),_0x478631+'-'+_0x2e5504+'/'+_0x4bf311)[_0xeafe('0x18')](_0x3b8837);}return null;};}function patchUpdates(_0x95f859){return function(_0x4ac0d6){try{jsonpatch[_0xeafe('0x1f')](_0x4ac0d6,_0x95f859,!![]);}catch(_0x2d6c90){return BPromise['reject'](_0x2d6c90);}return _0x4ac0d6[_0xeafe('0x20')]();};}function saveUpdates(_0x1d408a,_0x1be5ad){return function(_0x23f9e5){if(_0x23f9e5){return _0x23f9e5[_0xeafe('0x21')](_0x1d408a)[_0xeafe('0x22')](function(_0x15fdd0){return _0x15fdd0;});}return null;};}function removeEntity(_0x14d94a,_0x46e9d2){return function(_0x4e05f7){if(_0x4e05f7){return _0x4e05f7[_0xeafe('0x23')]()[_0xeafe('0x22')](function(){_0x14d94a[_0xeafe('0x17')](0xcc)[_0xeafe('0x16')]();});}};}function handleEntityNotFound(_0x141cb8,_0x961fef){return function(_0x2456ae){if(!_0x2456ae){_0x141cb8[_0xeafe('0x24')](0x194);}return _0x2456ae;};}function handleError(_0x59a5c4,_0x22bdd0){_0x22bdd0=_0x22bdd0||0x1f4;return function(_0x25b0b8){logger['error'](_0x25b0b8[_0xeafe('0x25')]);if(_0x25b0b8[_0xeafe('0x26')]){delete _0x25b0b8['name'];}_0x59a5c4[_0xeafe('0x17')](_0x22bdd0)[_0xeafe('0x27')](_0x25b0b8);};}exports[_0xeafe('0x28')]=function(_0x47a3df,_0x13851f){var _0x2ca34c={},_0xe528f3={},_0x4f97d5={'count':0x0,'rows':[]};var _0x47a807=_['map'](db['CmHopperHistory'][_0xeafe('0x29')],function(_0x2efd4a){return{'name':_0x2efd4a[_0xeafe('0x2a')],'type':_0x2efd4a[_0xeafe('0x2b')][_0xeafe('0x2c')]};});_0xe528f3['model']=_[_0xeafe('0x2d')](_0x47a807,_0xeafe('0x26'));_0xe528f3[_0xeafe('0x2e')]=_['keys'](_0x47a3df['query']);_0xe528f3[_0xeafe('0x2f')]=_['intersection'](_0xe528f3[_0xeafe('0x30')],_0xe528f3[_0xeafe('0x2e')]);_0x2ca34c[_0xeafe('0x31')]=_[_0xeafe('0x32')](_0xe528f3[_0xeafe('0x30')],qs[_0xeafe('0x33')](_0x47a3df[_0xeafe('0x2e')][_0xeafe('0x33')]));_0x2ca34c[_0xeafe('0x31')]=_0x2ca34c[_0xeafe('0x31')][_0xeafe('0x34')]?_0x2ca34c[_0xeafe('0x31')]:_0xe528f3[_0xeafe('0x30')];if(!_0x47a3df[_0xeafe('0x2e')]['hasOwnProperty'](_0xeafe('0x35'))){_0x2ca34c[_0xeafe('0x1a')]=qs[_0xeafe('0x1a')](_0x47a3df[_0xeafe('0x2e')][_0xeafe('0x1a')]);_0x2ca34c['offset']=qs[_0xeafe('0x19')](_0x47a3df[_0xeafe('0x2e')][_0xeafe('0x19')]);}_0x2ca34c[_0xeafe('0x36')]=qs[_0xeafe('0x37')](_0x47a3df['query'][_0xeafe('0x37')]);_0x2ca34c[_0xeafe('0x38')]=qs[_0xeafe('0x2f')](_['pick'](_0x47a3df['query'],_0xe528f3[_0xeafe('0x2f')]),_0x47a807);if(_0x47a3df[_0xeafe('0x2e')]['filter']){_0x2ca34c['where']=_[_0xeafe('0x39')](_0x2ca34c[_0xeafe('0x38')],{'$or':_[_0xeafe('0x2d')](_0x47a807,function(_0x57e49f){if(_0x57e49f[_0xeafe('0x2b')]!==_0xeafe('0x3a')){var _0x4768ec={};_0x4768ec[_0x57e49f[_0xeafe('0x26')]]={'$like':'%'+_0x47a3df[_0xeafe('0x2e')][_0xeafe('0x3b')]+'%'};return _0x4768ec;}})});}_0x2ca34c=_[_0xeafe('0x39')]({},_0x2ca34c,_0x47a3df['options']);var _0x1662c5={'where':_0x2ca34c[_0xeafe('0x38')]};return db[_0xeafe('0x3c')][_0xeafe('0x1c')](_0x1662c5)['then'](function(_0x13f9ef){_0x4f97d5['count']=_0x13f9ef;if(_0x47a3df[_0xeafe('0x2e')][_0xeafe('0x3d')]){_0x2ca34c[_0xeafe('0x3e')]=[{'all':!![]}];}return db['CmHopperHistory'][_0xeafe('0x3f')](_0x2ca34c);})[_0xeafe('0x22')](function(_0x11cc88){_0x4f97d5[_0xeafe('0x40')]=_0x11cc88;return _0x4f97d5;})[_0xeafe('0x22')](respondWithFilteredResult(_0x13851f,_0x2ca34c))[_0xeafe('0x41')](handleError(_0x13851f,null));};exports[_0xeafe('0x42')]=function(_0x464ab1,_0x50ac8f){var _0x6cbbf1={'raw':!![],'where':{'id':_0x464ab1[_0xeafe('0x43')]['id']}},_0x106db3={};_0x106db3[_0xeafe('0x30')]=_[_0xeafe('0x44')](db[_0xeafe('0x3c')][_0xeafe('0x29')]);_0x106db3[_0xeafe('0x2e')]=_[_0xeafe('0x44')](_0x464ab1[_0xeafe('0x2e')]);_0x106db3[_0xeafe('0x2f')]=_[_0xeafe('0x32')](_0x106db3['model'],_0x106db3[_0xeafe('0x2e')]);_0x6cbbf1[_0xeafe('0x31')]=_[_0xeafe('0x32')](_0x106db3[_0xeafe('0x30')],qs[_0xeafe('0x33')](_0x464ab1[_0xeafe('0x2e')][_0xeafe('0x33')]));_0x6cbbf1[_0xeafe('0x31')]=_0x6cbbf1[_0xeafe('0x31')][_0xeafe('0x34')]?_0x6cbbf1['attributes']:_0x106db3[_0xeafe('0x30')];if(_0x464ab1['query'][_0xeafe('0x3d')]){_0x6cbbf1[_0xeafe('0x3e')]=[{'all':!![]}];}_0x6cbbf1=_['merge']({},_0x6cbbf1,_0x464ab1[_0xeafe('0x45')]);return db[_0xeafe('0x3c')]['find'](_0x6cbbf1)[_0xeafe('0x22')](handleEntityNotFound(_0x50ac8f,null))[_0xeafe('0x22')](respondWithResult(_0x50ac8f,null))[_0xeafe('0x41')](handleError(_0x50ac8f,null));};exports[_0xeafe('0x46')]=function(_0x14758d,_0x16f9b6){return db[_0xeafe('0x3c')][_0xeafe('0x46')](_0x14758d[_0xeafe('0x47')],{})['then'](respondWithResult(_0x16f9b6,0xc9))[_0xeafe('0x41')](handleError(_0x16f9b6,null));};exports[_0xeafe('0x48')]=function(_0x28b4fb,_0x29c669){return db['CmHopperHistory'][_0xeafe('0x48')]()['then'](respondWithResult(_0x29c669,null))[_0xeafe('0x41')](handleError(_0x29c669,null));};exports['update']=function(_0x2ff806,_0x453515){if(_0x2ff806[_0xeafe('0x47')][_0xeafe('0x49')]){delete _0x2ff806[_0xeafe('0x47')][_0xeafe('0x49')];}return db[_0xeafe('0x3c')]['find']({'where':{'uniqueid':_0x2ff806[_0xeafe('0x43')]['id']}})[_0xeafe('0x22')](handleEntityNotFound(_0x453515,null))[_0xeafe('0x22')](saveUpdates(_0x2ff806[_0xeafe('0x47')],null))[_0xeafe('0x22')](respondWithResult(_0x453515,null))[_0xeafe('0x41')](handleError(_0x453515,null));};
\ No newline at end of file
index 5a2c331..b4547d1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa456=['./cmHopperHistory.attributes','exports','define','CmHopperHistory','cm_hopper_history','endtime','uniqueid','lodash','util','../../config/logger','api','bluebird','request-promise','path','../../config/environment'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0xa456,0x142));var _0x6a45=function(_0x27af45,_0x1b57aa){_0x27af45=_0x27af45-0x0;var _0x18df21=_0xa456[_0x27af45];return _0x18df21;};'use strict';var _=require(_0x6a45('0x0'));var util=require(_0x6a45('0x1'));var logger=require(_0x6a45('0x2'))(_0x6a45('0x3'));var moment=require('moment');var BPromise=require(_0x6a45('0x4'));var rp=require(_0x6a45('0x5'));var fs=require('fs');var path=require(_0x6a45('0x6'));var rimraf=require('rimraf');var config=require(_0x6a45('0x7'));var attributes=require(_0x6a45('0x8'));module[_0x6a45('0x9')]=function(_0x14da6b,_0x4dfbfa){return _0x14da6b[_0x6a45('0xa')](_0x6a45('0xb'),attributes,{'tableName':_0x6a45('0xc'),'paranoid':![],'indexes':[{'name':_0x6a45('0xd'),'fields':[_0x6a45('0xd')]},{'name':'uniqueid','fields':[_0x6a45('0xe')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xb931=['cm_hopper_history','endtime','uniqueid','../../config/logger','bluebird','request-promise','path','rimraf','../../config/environment','./cmHopperHistory.attributes','exports','define','CmHopperHistory'];(function(_0x4914ad,_0x551a18){var _0x3cd61f=function(_0x2a773e){while(--_0x2a773e){_0x4914ad['push'](_0x4914ad['shift']());}};_0x3cd61f(++_0x551a18);}(_0xb931,0x155));var _0x1b93=function(_0x287b93,_0x65d733){_0x287b93=_0x287b93-0x0;var _0x13ca78=_0xb931[_0x287b93];return _0x13ca78;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x1b93('0x0'))('api');var moment=require('moment');var BPromise=require(_0x1b93('0x1'));var rp=require(_0x1b93('0x2'));var fs=require('fs');var path=require(_0x1b93('0x3'));var rimraf=require(_0x1b93('0x4'));var config=require(_0x1b93('0x5'));var attributes=require(_0x1b93('0x6'));module[_0x1b93('0x7')]=function(_0x3a30b2,_0x701ab1){return _0x3a30b2[_0x1b93('0x8')](_0x1b93('0x9'),attributes,{'tableName':_0x1b93('0xa'),'paranoid':![],'indexes':[{'name':_0x1b93('0xb'),'fields':[_0x1b93('0xb')]},{'name':_0x1b93('0xc'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
index ee99d1c..2588cdc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5bc5=['`state`\x20=\x2011,\x201,\x20null','predictiveIntervalDroppedCallsCallersExit','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','`state`\x20=\x204,\x20`talktime`,\x20null','predictiveIntervalAvgTalktime','AvgHandleTime','GetVoiceQueueHopperHistory','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','`state`\x20=\x203,\x201,\x20null','outboundNoAnswerCallsDay','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','outboundCongestionCallsDay','`state`\x20=\x2011\x20,\x201,\x20null','outboundUnknownCallsDay','`state`\x20=\x2013,\x201,\x20null','outboundBlacklistCallsDay','`state`\x20=\x2014,\x201,\x20null','outboundOriginateFailureCallsDay','`state`\x20=\x2018,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2016,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','GetCampaignHopperHistory','raw','col','ivrTotalCallsDays','ivrAnswerCallsDay','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','CmHopperHistory,\x20%s,\x20%s','request\x20sent','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','stringify','error','message','CreateCmHopperHistory','create','options','catch','CmHopperHistory','findAll','where','sequelize','COUNT','predictiveIntervalTotalCalls','literal','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsTimeout'];(function(_0x62c958,_0x2bfdbc){var _0x57ec61=function(_0x5c0094){while(--_0x5c0094){_0x62c958['push'](_0x62c958['shift']());}};_0x57ec61(++_0x2bfdbc);}(_0x5bc5,0xb2));var _0x55bc=function(_0x3cba93,_0x5c2fd8){_0x3cba93=_0x3cba93-0x0;var _0x4a2991=_0x5bc5[_0x3cba93];return _0x4a2991;};'use strict';var _=require(_0x55bc('0x0'));var util=require(_0x55bc('0x1'));var moment=require(_0x55bc('0x2'));var BPromise=require(_0x55bc('0x3'));var rs=require(_0x55bc('0x4'));var fs=require('fs');var Redis=require(_0x55bc('0x5'));var db=require(_0x55bc('0x6'))['db'];var utils=require(_0x55bc('0x7'));var logger=require(_0x55bc('0x8'))(_0x55bc('0x9'));var config=require(_0x55bc('0xa'));var jayson=require(_0x55bc('0xb'));var client=jayson[_0x55bc('0xc')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4d78d6,_0x5719c9,_0x2a612b){return new BPromise(function(_0x38839e,_0x4d0610){return client[_0x55bc('0xd')](_0x4d78d6,_0x2a612b)[_0x55bc('0xe')](function(_0xc535ac){logger[_0x55bc('0xf')](_0x55bc('0x10'),_0x5719c9,_0x55bc('0x11'));logger[_0x55bc('0x12')](_0x55bc('0x13'),_0x5719c9,'request\x20sent',JSON[_0x55bc('0x14')](_0xc535ac));if(_0xc535ac[_0x55bc('0x15')]){if(_0xc535ac[_0x55bc('0x15')]['code']===0x1f4){logger[_0x55bc('0x15')]('CmHopperHistory,\x20%s,\x20%s',_0x5719c9,_0xc535ac[_0x55bc('0x15')][_0x55bc('0x16')]);return _0x4d0610(_0xc535ac[_0x55bc('0x15')]['message']);}logger[_0x55bc('0x15')]('CmHopperHistory,\x20%s,\x20%s',_0x5719c9,_0xc535ac[_0x55bc('0x15')][_0x55bc('0x16')]);return _0x38839e(_0xc535ac[_0x55bc('0x15')]['message']);}else{logger[_0x55bc('0xf')](_0x55bc('0x10'),_0x5719c9,'request\x20sent');_0x38839e(_0xc535ac['result'][_0x55bc('0x16')]);}})['catch'](function(_0x482eea){logger[_0x55bc('0x15')](_0x55bc('0x10'),_0x5719c9,_0x482eea);_0x4d0610(_0x482eea);});});}exports[_0x55bc('0x17')]=function(_0x4e1764){var _0xed8b9e=this;return new Promise(function(_0x10f68f,_0x247abd){return db['CmHopperHistory'][_0x55bc('0x18')](_0x4e1764['body'],{'raw':_0x4e1764[_0x55bc('0x19')]?_0x4e1764['options']['raw']===undefined?!![]:![]:!![]})[_0x55bc('0xe')](function(_0x390af6){logger[_0x55bc('0xf')]('CreateCmHopperHistory',_0x4e1764);logger['debug']('CreateCmHopperHistory',_0x4e1764,JSON[_0x55bc('0x14')](_0x390af6));_0x10f68f(_0x390af6);})[_0x55bc('0x1a')](function(_0x4da0b8){logger['error'](_0x55bc('0x17'),_0x4da0b8[_0x55bc('0x16')],_0x4e1764);_0x247abd(_0xed8b9e[_0x55bc('0x15')](0x1f4,_0x4da0b8[_0x55bc('0x16')]));});});};exports['AvgHandleTime']=function(_0x21a3be){var _0x4f65cd=this;return new Promise(function(_0x540d89,_0x3e6254){return db[_0x55bc('0x1b')][_0x55bc('0x1c')]({'raw':_0x21a3be[_0x55bc('0x19')]?_0x21a3be[_0x55bc('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x21a3be[_0x55bc('0x19')]?_0x21a3be[_0x55bc('0x19')][_0x55bc('0x1d')]||null:null,'attributes':[[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['col']('id')),_0x55bc('0x20')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')](_0x55bc('0x22')))),_0x55bc('0x23')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')]['literal'](_0x55bc('0x24')))),_0x55bc('0x25')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db['sequelize'][_0x55bc('0x21')](_0x55bc('0x26')))),_0x55bc('0x27')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x28'),db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')](_0x55bc('0x29')))),'predictiveIntervalAvgHoldtime'],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x28'),db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')](_0x55bc('0x2a')))),_0x55bc('0x2b')]]})['then'](function(_0x29976c){logger[_0x55bc('0xf')]('AvgHandleTime',_0x21a3be);logger[_0x55bc('0x12')](_0x55bc('0x2c'),_0x21a3be,JSON[_0x55bc('0x14')](_0x29976c));_0x540d89(_0x29976c);})[_0x55bc('0x1a')](function(_0x22e333){logger['error']('AvgHandleTime',_0x22e333[_0x55bc('0x16')],_0x21a3be);_0x3e6254(_0x4f65cd[_0x55bc('0x15')](0x1f4,_0x22e333[_0x55bc('0x16')]));});});};exports[_0x55bc('0x2d')]=function(_0xc034d9){var _0x3320db=this;return new Promise(function(_0x42977b,_0x38d0f9){return db['CmHopperHistory'][_0x55bc('0x1c')]({'raw':_0xc034d9[_0x55bc('0x19')]?_0xc034d9[_0x55bc('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0xc034d9['options']?_0xc034d9[_0x55bc('0x19')][_0x55bc('0x1d')]||null:null,'attributes':[[_0x55bc('0x2e'),_0x55bc('0x2f')],[db['sequelize']['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')](_0x55bc('0x30')))),_0x55bc('0x31')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db['sequelize']['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')](_0x55bc('0x32')))),_0x55bc('0x33')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')]['literal'](_0x55bc('0x22')))),_0x55bc('0x34')],[db['sequelize']['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')](_0x55bc('0x35')))),_0x55bc('0x36')],[db[_0x55bc('0x1e')]['fn']('COUNT',db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')]('`state`\x20=\x208,\x201,\x20null'))),_0x55bc('0x37')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db['sequelize'][_0x55bc('0x21')]('`state`\x20=\x2010\x20,\x201,\x20null'))),'outboundDropCallsDayTimeout'],[db[_0x55bc('0x1e')]['fn']('COUNT',db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')](_0x55bc('0x38')))),'outboundDropCallsDayCallersExit'],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')]('`state`\x20=\x2012,\x201,\x20null'))),_0x55bc('0x39')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db['sequelize'][_0x55bc('0x21')](_0x55bc('0x3a')))),_0x55bc('0x3b')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db['sequelize']['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')](_0x55bc('0x3c')))),_0x55bc('0x3d')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db['sequelize'][_0x55bc('0x21')](_0x55bc('0x3e')))),_0x55bc('0x3f')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')][_0x55bc('0x21')](_0x55bc('0x40')))),_0x55bc('0x41')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db[_0x55bc('0x1e')]['literal']('`state`\x20=\x2020,\x201,\x20null'))),_0x55bc('0x3f')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db['sequelize']['fn']('IF',db[_0x55bc('0x1e')]['literal'](_0x55bc('0x42')))),'outboundReCallsDay']],'group':[_0x55bc('0x2e')]})['then'](function(_0x1ba9f3){logger[_0x55bc('0xf')](_0x55bc('0x2d'),_0xc034d9);logger['debug'](_0x55bc('0x2d'),_0xc034d9,JSON[_0x55bc('0x14')](_0x1ba9f3));_0x42977b(_0x1ba9f3);})[_0x55bc('0x1a')](function(_0x38c402){logger[_0x55bc('0x15')]('GetVoiceQueueHopperHistory',_0x38c402[_0x55bc('0x16')],_0xc034d9);_0x38d0f9(_0x3320db['error'](0x1f4,_0x38c402[_0x55bc('0x16')]));});});};exports[_0x55bc('0x43')]=function(_0x2d6f82){var _0x21cc1c=this;return new Promise(function(_0x44edf0,_0x137887){return db[_0x55bc('0x1b')][_0x55bc('0x1c')]({'raw':_0x2d6f82[_0x55bc('0x19')]?_0x2d6f82[_0x55bc('0x19')][_0x55bc('0x44')]===undefined?!![]:![]:!![],'where':_0x2d6f82[_0x55bc('0x19')]?_0x2d6f82[_0x55bc('0x19')][_0x55bc('0x1d')]||null:null,'attributes':[[_0x55bc('0x2e'),'name'],[db[_0x55bc('0x1e')]['fn']('COUNT',db[_0x55bc('0x1e')][_0x55bc('0x45')]('id')),_0x55bc('0x46')],[db[_0x55bc('0x1e')]['fn'](_0x55bc('0x1f'),db[_0x55bc('0x1e')]['fn']('IF',db['sequelize']['literal'](_0x55bc('0x22')))),_0x55bc('0x47')]],'group':[_0x55bc('0x2e')]})['then'](function(_0x266b11){logger[_0x55bc('0xf')]('GetCampaignHopperHistory',_0x2d6f82);logger[_0x55bc('0x12')](_0x55bc('0x43'),_0x2d6f82,JSON['stringify'](_0x266b11));_0x44edf0(_0x266b11);})[_0x55bc('0x1a')](function(_0x1b481a){logger[_0x55bc('0x15')]('GetCampaignHopperHistory',_0x1b481a[_0x55bc('0x16')],_0x2d6f82);_0x137887(_0x21cc1c[_0x55bc('0x15')](0x1f4,_0x1b481a[_0x55bc('0x16')]));});});};
\ No newline at end of file
+var _0x85cf=['options','raw','then','findAll','where','sequelize','col','literal','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','COUNT','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','`state`\x20=\x204,\x20`talktime`,\x20null','predictiveIntervalAvgTalktime','AvgHandleTime','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','`state`\x20=\x203,\x201,\x20null','outboundNoAnswerCallsDay','outboundAnswerCallsDay','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','`state`\x20=\x208,\x201,\x20null','outboundCongestionCallsDay','`state`\x20=\x2010\x20,\x201,\x20null','outboundDropCallsDayTimeout','`state`\x20=\x2011\x20,\x201,\x20null','outboundDropCallsDayCallersExit','`state`\x20=\x2012,\x201,\x20null','outboundBlacklistCallsDay','`state`\x20=\x2014,\x201,\x20null','`state`\x20=\x2018,\x201,\x20null','outboundRejectCallsDay','`state`\x20=\x2016,\x201,\x20null','outboundAnswerAgiCallsDay','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','GetVoiceQueueHopperHistory','GetCampaignHopperHistory','ivrAnswerCallsDay','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','request','info','debug','request\x20sent','stringify','error','code','CmHopperHistory,\x20%s,\x20%s','message','result','catch','CreateCmHopperHistory','CmHopperHistory','create'];(function(_0x46a4bb,_0x2b1149){var _0x45660f=function(_0x1fe1b5){while(--_0x1fe1b5){_0x46a4bb['push'](_0x46a4bb['shift']());}};_0x45660f(++_0x2b1149);}(_0x85cf,0x76));var _0xf85c=function(_0x2abd03,_0x15bd78){_0x2abd03=_0x2abd03-0x0;var _0x397306=_0x85cf[_0x2abd03];return _0x397306;};'use strict';var _=require('lodash');var util=require(_0xf85c('0x0'));var moment=require(_0xf85c('0x1'));var BPromise=require(_0xf85c('0x2'));var rs=require(_0xf85c('0x3'));var fs=require('fs');var Redis=require(_0xf85c('0x4'));var db=require(_0xf85c('0x5'))['db'];var utils=require(_0xf85c('0x6'));var logger=require(_0xf85c('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0xf85c('0x8'));var client=jayson[_0xf85c('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x386a60,_0x41d08d,_0xe1be83){return new BPromise(function(_0x1bebcf,_0x1857d9){return client[_0xf85c('0xa')](_0x386a60,_0xe1be83)['then'](function(_0x25aa6e){logger[_0xf85c('0xb')]('CmHopperHistory,\x20%s,\x20%s',_0x41d08d,'request\x20sent');logger[_0xf85c('0xc')]('CmHopperHistory,\x20%s,\x20%s,\x20%s',_0x41d08d,_0xf85c('0xd'),JSON[_0xf85c('0xe')](_0x25aa6e));if(_0x25aa6e[_0xf85c('0xf')]){if(_0x25aa6e['error'][_0xf85c('0x10')]===0x1f4){logger[_0xf85c('0xf')](_0xf85c('0x11'),_0x41d08d,_0x25aa6e[_0xf85c('0xf')]['message']);return _0x1857d9(_0x25aa6e[_0xf85c('0xf')][_0xf85c('0x12')]);}logger[_0xf85c('0xf')](_0xf85c('0x11'),_0x41d08d,_0x25aa6e['error'][_0xf85c('0x12')]);return _0x1bebcf(_0x25aa6e['error'][_0xf85c('0x12')]);}else{logger['info'](_0xf85c('0x11'),_0x41d08d,'request\x20sent');_0x1bebcf(_0x25aa6e[_0xf85c('0x13')]['message']);}})[_0xf85c('0x14')](function(_0x30b768){logger[_0xf85c('0xf')](_0xf85c('0x11'),_0x41d08d,_0x30b768);_0x1857d9(_0x30b768);});});}exports[_0xf85c('0x15')]=function(_0x5260c5){var _0x495854=this;return new Promise(function(_0x389693,_0x5a4a80){return db[_0xf85c('0x16')][_0xf85c('0x17')](_0x5260c5['body'],{'raw':_0x5260c5[_0xf85c('0x18')]?_0x5260c5[_0xf85c('0x18')][_0xf85c('0x19')]===undefined?!![]:![]:!![]})[_0xf85c('0x1a')](function(_0x41ff9e){logger['info'](_0xf85c('0x15'),_0x5260c5);logger['debug'](_0xf85c('0x15'),_0x5260c5,JSON[_0xf85c('0xe')](_0x41ff9e));_0x389693(_0x41ff9e);})['catch'](function(_0x5e7c08){logger[_0xf85c('0xf')](_0xf85c('0x15'),_0x5e7c08[_0xf85c('0x12')],_0x5260c5);_0x5a4a80(_0x495854[_0xf85c('0xf')](0x1f4,_0x5e7c08[_0xf85c('0x12')]));});});};exports['AvgHandleTime']=function(_0x903fe6){var _0xae5462=this;return new Promise(function(_0x550cf3,_0x5c819f){return db[_0xf85c('0x16')][_0xf85c('0x1b')]({'raw':_0x903fe6[_0xf85c('0x18')]?_0x903fe6['options'][_0xf85c('0x19')]===undefined?!![]:![]:!![],'where':_0x903fe6['options']?_0x903fe6['options'][_0xf85c('0x1c')]||null:null,'attributes':[[db[_0xf85c('0x1d')]['fn']('COUNT',db[_0xf85c('0x1d')][_0xf85c('0x1e')]('id')),'predictiveIntervalTotalCalls'],[db[_0xf85c('0x1d')]['fn']('COUNT',db[_0xf85c('0x1d')]['fn']('IF',db['sequelize'][_0xf85c('0x1f')](_0xf85c('0x20')))),_0xf85c('0x21')],[db['sequelize']['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db['sequelize'][_0xf85c('0x1f')](_0xf85c('0x23')))),_0xf85c('0x24')],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')][_0xf85c('0x1f')]('`state`\x20=\x2011,\x201,\x20null'))),_0xf85c('0x25')],[db['sequelize']['fn'](_0xf85c('0x26'),db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')][_0xf85c('0x1f')](_0xf85c('0x27')))),_0xf85c('0x28')],[db[_0xf85c('0x1d')]['fn']('AVG',db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')][_0xf85c('0x1f')](_0xf85c('0x29')))),_0xf85c('0x2a')]]})[_0xf85c('0x1a')](function(_0x13c5fd){logger[_0xf85c('0xb')]('AvgHandleTime',_0x903fe6);logger['debug'](_0xf85c('0x2b'),_0x903fe6,JSON['stringify'](_0x13c5fd));_0x550cf3(_0x13c5fd);})[_0xf85c('0x14')](function(_0x3e9355){logger[_0xf85c('0xf')]('AvgHandleTime',_0x3e9355[_0xf85c('0x12')],_0x903fe6);_0x5c819f(_0xae5462[_0xf85c('0xf')](0x1f4,_0x3e9355['message']));});});};exports['GetVoiceQueueHopperHistory']=function(_0x55c877){var _0x56bac2=this;return new Promise(function(_0x34e08d,_0x3d45f3){return db['CmHopperHistory'][_0xf85c('0x1b')]({'raw':_0x55c877[_0xf85c('0x18')]?_0x55c877[_0xf85c('0x18')][_0xf85c('0x19')]===undefined?!![]:![]:!![],'where':_0x55c877[_0xf85c('0x18')]?_0x55c877['options'][_0xf85c('0x1c')]||null:null,'attributes':[[_0xf85c('0x2c'),_0xf85c('0x2d')],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')]['literal'](_0xf85c('0x2e')))),_0xf85c('0x2f')],[db[_0xf85c('0x1d')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0xf85c('0x1d')][_0xf85c('0x1f')](_0xf85c('0x30')))),_0xf85c('0x31')],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db['sequelize'][_0xf85c('0x1f')](_0xf85c('0x20')))),_0xf85c('0x32')],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')][_0xf85c('0x1f')](_0xf85c('0x33')))),_0xf85c('0x34')],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db['sequelize'][_0xf85c('0x1f')](_0xf85c('0x35')))),_0xf85c('0x36')],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')][_0xf85c('0x1f')](_0xf85c('0x37')))),_0xf85c('0x38')],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')][_0xf85c('0x1f')](_0xf85c('0x39')))),_0xf85c('0x3a')],[db[_0xf85c('0x1d')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0xf85c('0x1d')]['literal'](_0xf85c('0x3b')))),'outboundUnknownCallsDay'],[db[_0xf85c('0x1d')]['fn']('COUNT',db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')]['literal']('`state`\x20=\x2013,\x201,\x20null'))),_0xf85c('0x3c')],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db['sequelize']['fn']('IF',db[_0xf85c('0x1d')][_0xf85c('0x1f')](_0xf85c('0x3d')))),'outboundOriginateFailureCallsDay'],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db['sequelize'][_0xf85c('0x1f')](_0xf85c('0x3e')))),_0xf85c('0x3f')],[db['sequelize']['fn']('COUNT',db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')]['literal'](_0xf85c('0x40')))),_0xf85c('0x41')],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db['sequelize']['literal']('`state`\x20=\x2020,\x201,\x20null'))),_0xf85c('0x3f')],[db['sequelize']['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')]['literal'](_0xf85c('0x42')))),_0xf85c('0x43')]],'group':[_0xf85c('0x2c')]})[_0xf85c('0x1a')](function(_0x1e72ec){logger[_0xf85c('0xb')](_0xf85c('0x44'),_0x55c877);logger['debug'](_0xf85c('0x44'),_0x55c877,JSON[_0xf85c('0xe')](_0x1e72ec));_0x34e08d(_0x1e72ec);})[_0xf85c('0x14')](function(_0x54ec6c){logger[_0xf85c('0xf')](_0xf85c('0x44'),_0x54ec6c[_0xf85c('0x12')],_0x55c877);_0x3d45f3(_0x56bac2[_0xf85c('0xf')](0x1f4,_0x54ec6c['message']));});});};exports[_0xf85c('0x45')]=function(_0x51cd31){var _0x4edb2d=this;return new Promise(function(_0x1bc2ce,_0xd478ad){return db[_0xf85c('0x16')][_0xf85c('0x1b')]({'raw':_0x51cd31['options']?_0x51cd31['options'][_0xf85c('0x19')]===undefined?!![]:![]:!![],'where':_0x51cd31[_0xf85c('0x18')]?_0x51cd31['options']['where']||null:null,'attributes':[['campaign',_0xf85c('0x2d')],[db['sequelize']['fn']('COUNT',db[_0xf85c('0x1d')]['col']('id')),'ivrTotalCallsDays'],[db[_0xf85c('0x1d')]['fn'](_0xf85c('0x22'),db[_0xf85c('0x1d')]['fn']('IF',db[_0xf85c('0x1d')][_0xf85c('0x1f')](_0xf85c('0x20')))),_0xf85c('0x46')]],'group':[_0xf85c('0x2c')]})['then'](function(_0x227a93){logger['info']('GetCampaignHopperHistory',_0x51cd31);logger[_0xf85c('0xc')](_0xf85c('0x45'),_0x51cd31,JSON[_0xf85c('0xe')](_0x227a93));_0x1bc2ce(_0x227a93);})['catch'](function(_0x4601fb){logger[_0xf85c('0xf')](_0xf85c('0x45'),_0x4601fb[_0xf85c('0x12')],_0x51cd31);_0xd478ad(_0x4edb2d['error'](0x1f4,_0x4601fb[_0xf85c('0x12')]));});});};
\ No newline at end of file
index 508d4e5..77772eb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x55ce=['isAuthenticated','index','/describe','describe','show','post','create','put','/:id','update','exports','multer','util','path','connect-timeout','express','Router','../../config/environment','get'];(function(_0x9dd37c,_0x3e255e){var _0x2a522c=function(_0x2ce2ca){while(--_0x2ce2ca){_0x9dd37c['push'](_0x9dd37c['shift']());}};_0x2a522c(++_0x3e255e);}(_0x55ce,0x13b));var _0xe55c=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x55ce[_0xa464c9];return _0x3d73c4;};'use strict';var multer=require(_0xe55c('0x0'));var util=require(_0xe55c('0x1'));var path=require(_0xe55c('0x2'));var timeout=require(_0xe55c('0x3'));var express=require(_0xe55c('0x4'));var router=express[_0xe55c('0x5')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xe55c('0x6'));var controller=require('./cmHopperHistory.controller');router[_0xe55c('0x7')]('/',auth[_0xe55c('0x8')](),controller[_0xe55c('0x9')]);router[_0xe55c('0x7')](_0xe55c('0xa'),auth[_0xe55c('0x8')](),controller[_0xe55c('0xb')]);router['get']('/:id',auth[_0xe55c('0x8')](),controller[_0xe55c('0xc')]);router[_0xe55c('0xd')]('/',auth[_0xe55c('0x8')](),controller[_0xe55c('0xe')]);router[_0xe55c('0xf')](_0xe55c('0x10'),auth[_0xe55c('0x8')](),controller[_0xe55c('0x11')]);module[_0xe55c('0x12')]=router;
\ No newline at end of file
+var _0xfe39=['update','exports','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./cmHopperHistory.controller','get','isAuthenticated','index','/describe','describe','/:id','post'];(function(_0x5e8874,_0x134292){var _0x4bf1de=function(_0x941a8e){while(--_0x941a8e){_0x5e8874['push'](_0x5e8874['shift']());}};_0x4bf1de(++_0x134292);}(_0xfe39,0x123));var _0x9fe3=function(_0x344a3f,_0x579a22){_0x344a3f=_0x344a3f-0x0;var _0x264712=_0xfe39[_0x344a3f];return _0x264712;};'use strict';var multer=require('multer');var util=require(_0x9fe3('0x0'));var path=require('path');var timeout=require(_0x9fe3('0x1'));var express=require(_0x9fe3('0x2'));var router=express[_0x9fe3('0x3')]();var fs_extra=require(_0x9fe3('0x4'));var auth=require(_0x9fe3('0x5'));var interaction=require(_0x9fe3('0x6'));var config=require('../../config/environment');var controller=require(_0x9fe3('0x7'));router[_0x9fe3('0x8')]('/',auth[_0x9fe3('0x9')](),controller[_0x9fe3('0xa')]);router['get'](_0x9fe3('0xb'),auth[_0x9fe3('0x9')](),controller[_0x9fe3('0xc')]);router[_0x9fe3('0x8')](_0x9fe3('0xd'),auth[_0x9fe3('0x9')](),controller['show']);router[_0x9fe3('0xe')]('/',auth[_0x9fe3('0x9')](),controller['create']);router['put'](_0x9fe3('0xd'),auth['isAuthenticated'](),controller[_0x9fe3('0xf')]);module[_0x9fe3('0x10')]=router;
\ No newline at end of file
index 3cbefd6..221635d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeb5d=['exports','STRING','name'];(function(_0x15d1d7,_0xa99bdc){var _0x425b16=function(_0x525b6a){while(--_0x525b6a){_0x15d1d7['push'](_0x15d1d7['shift']());}};_0x425b16(++_0xa99bdc);}(_0xeb5d,0x16b));var _0xdeb5=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0xeb5d[_0x40a045];return _0x1a687c;};'use strict';var Sequelize=require('sequelize');module[_0xdeb5('0x0')]={'name':{'type':Sequelize[_0xdeb5('0x1')],'unique':_0xdeb5('0x2'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0xdeb5('0x1')]},'dialPrefix':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x5b20=['STRING','name','sequelize','exports'];(function(_0x4b7bf6,_0x22b8af){var _0x345a94=function(_0x4a09c1){while(--_0x4a09c1){_0x4b7bf6['push'](_0x4b7bf6['shift']());}};_0x345a94(++_0x22b8af);}(_0x5b20,0x86));var _0x05b2=function(_0x2be8c2,_0x14a4b5){_0x2be8c2=_0x2be8c2-0x0;var _0x97f531=_0x5b20[_0x2be8c2];return _0x97f531;};'use strict';var Sequelize=require(_0x05b2('0x0'));module[_0x05b2('0x1')]={'name':{'type':Sequelize[_0x05b2('0x2')],'unique':_0x05b2('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x05b2('0x2')]},'dialPrefix':{'type':Sequelize[_0x05b2('0x2')]}};
\ No newline at end of file
index 3d78d6f..8bc1354 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8e4a=['fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','CmList','includeAll','include','findAll','rows','show','params','length','options','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','addDisposition','ListId','Disposition','getDispositions','findOne','removeDispositions','ids','addContacts','CmContact','tags','join','isArray','each','omit','success','push','dataValues','errors','message','Malformed\x20request\x20syntax','getContacts','CmCustomField','CustomFields','concat','format','cf_%d','getContactsCsv','ContactItemType','OrderBy','select','from','cm_contacts','c.ListId\x20=\x20?','c.deletedAt\x20is\x20null','distinct','field','item','cm_contact_has_items','ItemTypeId\x20=\x20?','CmContactId\x20=\x20c.id','additionalPhone_','description','description_additionalPhone_','toString','now','writeFileSync','attachment;\x20filename=','list_%d_%s.csv','setHeader','Content-type','text/csv','download','/tmp/list_%d_%s.csv','addCustomField','addCustomFields','Sequelize','TEXT','number','switch','BOOLEAN','defaultValue','sequelize','queryInterface','addColumn','cf_%s','getCustomFields','findAndCountAll','addAgents','emit','removeAgents','userCmList:remove','getAgents','User','info','spread','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','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/environment','../../config/license/util','redis','defaults','localhost','socket.io-emitter','./cmList.socket','register','sendStatus','status','json','offset','undefined','count','limit','Content-Range','apply','reject','save','update','then','get','Lists','UserProfileResource','destroy','end','error','stack','name','send','index','map','rawAttributes','fieldName','type','model','keys','query','filters','intersection','attributes'];(function(_0xac3a5b,_0x59b23a){var _0x5c0184=function(_0x5781be){while(--_0x5781be){_0xac3a5b['push'](_0xac3a5b['shift']());}};_0x5c0184(++_0x59b23a);}(_0x8e4a,0x113));var _0xa8e4=function(_0x1154ef,_0x4f51d9){_0x1154ef=_0x1154ef-0x0;var _0x186b9d=_0x8e4a[_0x1154ef];return _0x186b9d;};'use strict';var emlformat=require(_0xa8e4('0x0'));var rimraf=require(_0xa8e4('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xa8e4('0x2'));var rp=require('request-promise');var moment=require(_0xa8e4('0x3'));var BPromise=require(_0xa8e4('0x4'));var Mustache=require(_0xa8e4('0x5'));var util=require(_0xa8e4('0x6'));var path=require(_0xa8e4('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xa8e4('0x8'));var fs=require('fs');var fs_extra=require(_0xa8e4('0x9'));var _=require(_0xa8e4('0xa'));var squel=require(_0xa8e4('0xb'));var crypto=require(_0xa8e4('0xc'));var jsforce=require(_0xa8e4('0xd'));var deskjs=require(_0xa8e4('0xe'));var toCsv=require('to-csv');var querystring=require(_0xa8e4('0xf'));var Papa=require(_0xa8e4('0x10'));var Redis=require(_0xa8e4('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xa8e4('0x12'));var as=require(_0xa8e4('0x13'));var hardwareService=require(_0xa8e4('0x14'));var logger=require(_0xa8e4('0x15'))(_0xa8e4('0x16'));var utils=require(_0xa8e4('0x17'));var config=require(_0xa8e4('0x18'));var licenseUtil=require(_0xa8e4('0x19'));var db=require('../../mysqldb')['db'];var csv_results;config[_0xa8e4('0x1a')]=_[_0xa8e4('0x1b')](config['redis'],{'host':_0xa8e4('0x1c'),'port':0x18eb});var socket=require(_0xa8e4('0x1d'))(new Redis(config[_0xa8e4('0x1a')]));require(_0xa8e4('0x1e'))[_0xa8e4('0x1f')](socket);function respondWithStatusCode(_0xc5467e,_0x454096){_0x454096=_0x454096||0xcc;return function(_0x2c09f7){if(_0x2c09f7){return _0xc5467e[_0xa8e4('0x20')](_0x454096);}return _0xc5467e['status'](_0x454096)['end']();};}function respondWithResult(_0x15ad7b,_0x42acc3){_0x42acc3=_0x42acc3||0xc8;return function(_0x31f94e){if(_0x31f94e){return _0x15ad7b[_0xa8e4('0x21')](_0x42acc3)[_0xa8e4('0x22')](_0x31f94e);}};}function respondWithFilteredResult(_0x2394d3,_0x15ff67){return function(_0x3bcbda){if(_0x3bcbda){var _0x51fadc=typeof _0x15ff67[_0xa8e4('0x23')]==='undefined'&&typeof _0x15ff67['limit']===_0xa8e4('0x24');var _0x232b56=_0x3bcbda[_0xa8e4('0x25')];var _0x20ad1e=_0x51fadc?0x0:_0x15ff67[_0xa8e4('0x23')];var _0x27f4e2=_0x51fadc?_0x3bcbda[_0xa8e4('0x25')]:_0x15ff67[_0xa8e4('0x23')]+_0x15ff67[_0xa8e4('0x26')];var _0x13f900;if(_0x27f4e2>=_0x232b56){_0x27f4e2=_0x232b56;_0x13f900=0xc8;}else{_0x13f900=0xce;}_0x2394d3[_0xa8e4('0x21')](_0x13f900);return _0x2394d3['set'](_0xa8e4('0x27'),_0x20ad1e+'-'+_0x27f4e2+'/'+_0x232b56)[_0xa8e4('0x22')](_0x3bcbda);}return null;};}function patchUpdates(_0x5b6e63){return function(_0x22d865){try{jsonpatch[_0xa8e4('0x28')](_0x22d865,_0x5b6e63,!![]);}catch(_0x35c0bf){return BPromise[_0xa8e4('0x29')](_0x35c0bf);}return _0x22d865[_0xa8e4('0x2a')]();};}function saveUpdates(_0x4770a1,_0x743f34){return function(_0x46e51e){if(_0x46e51e){return _0x46e51e[_0xa8e4('0x2b')](_0x4770a1)[_0xa8e4('0x2c')](function(_0x138c14){return _0x138c14;});}return null;};}function removeEntity(_0x11c998,_0x20a03b){return function(_0x303815){if(_0x303815){return _0x303815['destroy']()[_0xa8e4('0x2c')](function(){var _0xc5d56b=_0x303815[_0xa8e4('0x2d')]({'plain':!![]});var _0x3bd6b3=_0xa8e4('0x2e');return db[_0xa8e4('0x2f')][_0xa8e4('0x30')]({'where':{'type':_0x3bd6b3,'resourceId':_0xc5d56b['id']}})[_0xa8e4('0x2c')](function(){return _0x303815;});})[_0xa8e4('0x2c')](function(){_0x11c998[_0xa8e4('0x21')](0xcc)[_0xa8e4('0x31')]();});}};}function handleEntityNotFound(_0x6eff9,_0x5c0842){return function(_0x31f737){if(!_0x31f737){_0x6eff9['sendStatus'](0x194);}return _0x31f737;};}function handleError(_0x5b39a4,_0x3db8fc){_0x3db8fc=_0x3db8fc||0x1f4;return function(_0xd28ec2){logger[_0xa8e4('0x32')](_0xd28ec2[_0xa8e4('0x33')]);if(_0xd28ec2[_0xa8e4('0x34')]){delete _0xd28ec2[_0xa8e4('0x34')];}_0x5b39a4[_0xa8e4('0x21')](_0x3db8fc)[_0xa8e4('0x35')](_0xd28ec2);};}exports[_0xa8e4('0x36')]=function(_0x495a1a,_0x5a96e4){var _0x315f3d={},_0x5d2e1d={},_0x46d8a0={'count':0x0,'rows':[]};var _0x2a2b33=_[_0xa8e4('0x37')](db['CmList'][_0xa8e4('0x38')],function(_0x57f28d){return{'name':_0x57f28d[_0xa8e4('0x39')],'type':_0x57f28d[_0xa8e4('0x3a')]['key']};});_0x5d2e1d[_0xa8e4('0x3b')]=_[_0xa8e4('0x37')](_0x2a2b33,'name');_0x5d2e1d['query']=_[_0xa8e4('0x3c')](_0x495a1a[_0xa8e4('0x3d')]);_0x5d2e1d[_0xa8e4('0x3e')]=_[_0xa8e4('0x3f')](_0x5d2e1d[_0xa8e4('0x3b')],_0x5d2e1d[_0xa8e4('0x3d')]);_0x315f3d[_0xa8e4('0x40')]=_[_0xa8e4('0x3f')](_0x5d2e1d['model'],qs[_0xa8e4('0x41')](_0x495a1a['query'][_0xa8e4('0x41')]));_0x315f3d[_0xa8e4('0x40')]=_0x315f3d[_0xa8e4('0x40')]['length']?_0x315f3d[_0xa8e4('0x40')]:_0x5d2e1d[_0xa8e4('0x3b')];if(!_0x495a1a[_0xa8e4('0x3d')][_0xa8e4('0x42')](_0xa8e4('0x43'))){_0x315f3d[_0xa8e4('0x26')]=qs[_0xa8e4('0x26')](_0x495a1a[_0xa8e4('0x3d')][_0xa8e4('0x26')]);_0x315f3d[_0xa8e4('0x23')]=qs['offset'](_0x495a1a[_0xa8e4('0x3d')][_0xa8e4('0x23')]);}_0x315f3d[_0xa8e4('0x44')]=qs[_0xa8e4('0x45')](_0x495a1a['query'][_0xa8e4('0x45')]);_0x315f3d[_0xa8e4('0x46')]=qs[_0xa8e4('0x3e')](_[_0xa8e4('0x47')](_0x495a1a['query'],_0x5d2e1d[_0xa8e4('0x3e')]),_0x2a2b33);if(_0x495a1a[_0xa8e4('0x3d')][_0xa8e4('0x48')]){_0x315f3d[_0xa8e4('0x46')]=_[_0xa8e4('0x49')](_0x315f3d[_0xa8e4('0x46')],{'$or':_[_0xa8e4('0x37')](_0x2a2b33,function(_0x2776b2){if(_0x2776b2['type']!=='VIRTUAL'){var _0x5d4c1f={};_0x5d4c1f[_0x2776b2[_0xa8e4('0x34')]]={'$like':'%'+_0x495a1a[_0xa8e4('0x3d')][_0xa8e4('0x48')]+'%'};return _0x5d4c1f;}})});}_0x315f3d=_[_0xa8e4('0x49')]({},_0x315f3d,_0x495a1a['options']);var _0x1a014a={'where':_0x315f3d[_0xa8e4('0x46')]};return db[_0xa8e4('0x4a')][_0xa8e4('0x25')](_0x1a014a)[_0xa8e4('0x2c')](function(_0x5f223c){_0x46d8a0[_0xa8e4('0x25')]=_0x5f223c;if(_0x495a1a[_0xa8e4('0x3d')][_0xa8e4('0x4b')]){_0x315f3d[_0xa8e4('0x4c')]=[{'all':!![]}];}return db[_0xa8e4('0x4a')][_0xa8e4('0x4d')](_0x315f3d);})['then'](function(_0x19b270){_0x46d8a0[_0xa8e4('0x4e')]=_0x19b270;return _0x46d8a0;})[_0xa8e4('0x2c')](respondWithFilteredResult(_0x5a96e4,_0x315f3d))['catch'](handleError(_0x5a96e4,null));};exports[_0xa8e4('0x4f')]=function(_0x119781,_0x2f45f5){var _0x3163be={'raw':![],'where':{'id':_0x119781[_0xa8e4('0x50')]['id']}},_0x638ed9={};_0x638ed9[_0xa8e4('0x3b')]=_[_0xa8e4('0x3c')](db['CmList']['rawAttributes']);_0x638ed9['query']=_[_0xa8e4('0x3c')](_0x119781[_0xa8e4('0x3d')]);_0x638ed9[_0xa8e4('0x3e')]=_[_0xa8e4('0x3f')](_0x638ed9['model'],_0x638ed9[_0xa8e4('0x3d')]);_0x3163be[_0xa8e4('0x40')]=_[_0xa8e4('0x3f')](_0x638ed9[_0xa8e4('0x3b')],qs[_0xa8e4('0x41')](_0x119781['query'][_0xa8e4('0x41')]));_0x3163be[_0xa8e4('0x40')]=_0x3163be[_0xa8e4('0x40')][_0xa8e4('0x51')]?_0x3163be[_0xa8e4('0x40')]:_0x638ed9[_0xa8e4('0x3b')];if(_0x119781[_0xa8e4('0x3d')][_0xa8e4('0x4b')]){_0x3163be[_0xa8e4('0x4c')]=[{'all':!![]}];}_0x3163be=_['merge']({},_0x3163be,_0x119781[_0xa8e4('0x52')]);return db[_0xa8e4('0x4a')][_0xa8e4('0x53')](_0x3163be)[_0xa8e4('0x2c')](handleEntityNotFound(_0x2f45f5,null))[_0xa8e4('0x2c')](respondWithResult(_0x2f45f5,null))[_0xa8e4('0x54')](handleError(_0x2f45f5,null));};exports[_0xa8e4('0x55')]=function(_0x3c7921,_0x4a22c2){return db[_0xa8e4('0x4a')][_0xa8e4('0x55')](_0x3c7921[_0xa8e4('0x56')],{})[_0xa8e4('0x2c')](function(_0x1c3900){var _0x264ffd=_0x3c7921[_0xa8e4('0x57')][_0xa8e4('0x2d')]({'plain':!![]});if(!_0x264ffd)throw new Error(_0xa8e4('0x58'));if(_0x264ffd[_0xa8e4('0x59')]===_0xa8e4('0x57')){var _0xd57a5=_0x1c3900[_0xa8e4('0x2d')]({'plain':!![]});var _0x2c48f5='Lists';return db[_0xa8e4('0x5a')]['find']({'where':{'name':_0x2c48f5,'userProfileId':_0x264ffd[_0xa8e4('0x5b')]},'raw':!![]})[_0xa8e4('0x2c')](function(_0x20b756){if(_0x20b756&&_0x20b756[_0xa8e4('0x5c')]===0x0){return db['UserProfileResource'][_0xa8e4('0x55')]({'name':_0xd57a5[_0xa8e4('0x34')],'resourceId':_0xd57a5['id'],'type':_0x20b756[_0xa8e4('0x34')],'sectionId':_0x20b756['id']},{})[_0xa8e4('0x2c')](function(){return _0x1c3900;});}else{return _0x1c3900;}})[_0xa8e4('0x54')](function(_0x7d66b0){logger[_0xa8e4('0x32')](_0xa8e4('0x5d'),_0x7d66b0);throw _0x7d66b0;});}return _0x1c3900;})['then'](respondWithResult(_0x4a22c2,0xc9))[_0xa8e4('0x54')](handleError(_0x4a22c2,null));};exports['update']=function(_0x3df0be,_0x55b281){if(_0x3df0be[_0xa8e4('0x56')]['id']){delete _0x3df0be['body']['id'];}return db[_0xa8e4('0x4a')][_0xa8e4('0x53')]({'where':{'id':_0x3df0be['params']['id']}})['then'](handleEntityNotFound(_0x55b281,null))['then'](saveUpdates(_0x3df0be[_0xa8e4('0x56')],null))[_0xa8e4('0x2c')](respondWithResult(_0x55b281,null))['catch'](handleError(_0x55b281,null));};exports[_0xa8e4('0x30')]=function(_0x4993c4,_0x218a4b){return db[_0xa8e4('0x4a')]['find']({'where':{'id':_0x4993c4[_0xa8e4('0x50')]['id']}})[_0xa8e4('0x2c')](handleEntityNotFound(_0x218a4b,null))[_0xa8e4('0x2c')](removeEntity(_0x218a4b,null))[_0xa8e4('0x54')](handleError(_0x218a4b,null));};exports[_0xa8e4('0x5e')]=function(_0x9e7f2a,_0xc2d493){return db['CmList'][_0xa8e4('0x5e')]()[_0xa8e4('0x2c')](respondWithResult(_0xc2d493,null))['catch'](handleError(_0xc2d493,null));};exports[_0xa8e4('0x5f')]=function(_0x1e4a3a,_0x241f9c,_0x114a9d){if(_0x1e4a3a[_0xa8e4('0x56')]['id']){delete _0x1e4a3a[_0xa8e4('0x56')]['id'];}return db[_0xa8e4('0x4a')][_0xa8e4('0x53')]({'where':{'id':_0x1e4a3a[_0xa8e4('0x50')]['id']}})[_0xa8e4('0x2c')](handleEntityNotFound(_0x241f9c,null))[_0xa8e4('0x2c')](function(_0x27c87f){if(_0x27c87f){_0x1e4a3a[_0xa8e4('0x56')][_0xa8e4('0x60')]=_0x27c87f['id'];return db[_0xa8e4('0x61')][_0xa8e4('0x55')](_0x1e4a3a[_0xa8e4('0x56')]);}})['then'](respondWithResult(_0x241f9c,null))['catch'](handleError(_0x241f9c,null));};exports[_0xa8e4('0x62')]=function(_0x39f3ac,_0x10eb44,_0xc38b7c){var _0x551530={'raw':![],'where':{}};var _0x41bd53={};var _0x17e4c2={'count':0x0,'rows':[]};return db[_0xa8e4('0x4a')][_0xa8e4('0x63')]({'where':{'id':_0x39f3ac[_0xa8e4('0x50')]['id']}})[_0xa8e4('0x2c')](handleEntityNotFound(_0x10eb44,null))[_0xa8e4('0x2c')](function(_0x38d99a){if(_0x38d99a){_0x41bd53[_0xa8e4('0x3b')]=_[_0xa8e4('0x3c')](db[_0xa8e4('0x61')]['rawAttributes']);_0x41bd53[_0xa8e4('0x3d')]=_['keys'](_0x39f3ac[_0xa8e4('0x3d')]);_0x41bd53[_0xa8e4('0x3e')]=_['intersection'](_0x41bd53[_0xa8e4('0x3b')],_0x41bd53[_0xa8e4('0x3d')]);_0x551530[_0xa8e4('0x40')]=_[_0xa8e4('0x3f')](_0x41bd53['model'],qs[_0xa8e4('0x41')](_0x39f3ac[_0xa8e4('0x3d')][_0xa8e4('0x41')]));_0x551530[_0xa8e4('0x40')]=_0x551530[_0xa8e4('0x40')]['length']?_0x551530[_0xa8e4('0x40')]:_0x41bd53[_0xa8e4('0x3b')];if(!_0x39f3ac[_0xa8e4('0x3d')]['hasOwnProperty'](_0xa8e4('0x43'))){_0x551530[_0xa8e4('0x26')]=qs['limit'](_0x39f3ac[_0xa8e4('0x3d')][_0xa8e4('0x26')]);_0x551530[_0xa8e4('0x23')]=qs['offset'](_0x39f3ac[_0xa8e4('0x3d')][_0xa8e4('0x23')]);}_0x551530[_0xa8e4('0x44')]=qs['sort'](_0x39f3ac[_0xa8e4('0x3d')]['sort']);_0x551530[_0xa8e4('0x46')]=qs[_0xa8e4('0x3e')](_[_0xa8e4('0x47')](_0x39f3ac[_0xa8e4('0x3d')],_0x41bd53[_0xa8e4('0x3e')]));_0x551530[_0xa8e4('0x46')][_0xa8e4('0x60')]=_0x38d99a['id'];if(_0x39f3ac[_0xa8e4('0x3d')][_0xa8e4('0x48')]){_0x551530[_0xa8e4('0x46')]=_[_0xa8e4('0x49')](_0x551530[_0xa8e4('0x46')],{'$or':_[_0xa8e4('0x37')](_0x551530['attributes'],function(_0x32dcda){var _0x144185={};_0x144185[_0x32dcda]={'$like':'%'+_0x39f3ac[_0xa8e4('0x3d')][_0xa8e4('0x48')]+'%'};return _0x144185;})});}_0x551530=_['merge']({},_0x551530,_0x39f3ac[_0xa8e4('0x52')]);return db[_0xa8e4('0x61')][_0xa8e4('0x25')]({'where':_0x551530[_0xa8e4('0x46')]})[_0xa8e4('0x2c')](function(_0x5b7f30){_0x17e4c2['count']=_0x5b7f30;if(_0x39f3ac[_0xa8e4('0x3d')][_0xa8e4('0x4b')]){_0x551530['include']=[{'all':!![]}];}return db[_0xa8e4('0x61')][_0xa8e4('0x4d')](_0x551530);})[_0xa8e4('0x2c')](function(_0x5d3d4f){_0x17e4c2[_0xa8e4('0x4e')]=_0x5d3d4f;return _0x17e4c2;});}})[_0xa8e4('0x2c')](respondWithFilteredResult(_0x10eb44,_0x551530))[_0xa8e4('0x54')](handleError(_0x10eb44,null));};exports['removeDispositions']=function(_0x11400a,_0x293522,_0x344083){return db['CmList'][_0xa8e4('0x53')]({'where':{'id':_0x11400a[_0xa8e4('0x50')]['id']}})[_0xa8e4('0x2c')](handleEntityNotFound(_0x293522,null))[_0xa8e4('0x2c')](function(_0x3a1d74){if(_0x3a1d74){return _0x3a1d74[_0xa8e4('0x64')](_0x11400a[_0xa8e4('0x3d')][_0xa8e4('0x65')]);}})[_0xa8e4('0x2c')](respondWithStatusCode(_0x293522,null))[_0xa8e4('0x54')](handleError(_0x293522,null));};exports[_0xa8e4('0x66')]=function(_0x5cf4c1,_0x3107f2,_0x59fce4){return db[_0xa8e4('0x4a')][_0xa8e4('0x53')]({'where':{'id':_0x5cf4c1[_0xa8e4('0x50')]['id']}})['then'](handleEntityNotFound(_0x3107f2,null))[_0xa8e4('0x2c')](function(_0x2e9c86){if(_0x2e9c86){var _0x28e915=[];var _0xc030e6={'success':[],'errors':[]};return db[_0xa8e4('0x67')]['describe']()['then'](function(_0x46b377){if(_0x5cf4c1[_0xa8e4('0x56')][_0xa8e4('0x68')]&&_['isArray'](_0x5cf4c1[_0xa8e4('0x56')][_0xa8e4('0x68')])){if(_0x5cf4c1['body']['tags']['length']){_0x5cf4c1[_0xa8e4('0x56')][_0xa8e4('0x68')]=_0x5cf4c1[_0xa8e4('0x56')]['tags'][_0xa8e4('0x69')](';')+';';}else{_0x5cf4c1[_0xa8e4('0x56')][_0xa8e4('0x68')]=null;}}else{_0x5cf4c1[_0xa8e4('0x56')][_0xa8e4('0x68')]=null;}if(_0x5cf4c1[_0xa8e4('0x56')]&&_[_0xa8e4('0x6a')](_0x5cf4c1[_0xa8e4('0x56')])){for(var _0x33c644=0x0;_0x33c644<_0x5cf4c1[_0xa8e4('0x56')][_0xa8e4('0x51')];_0x33c644+=0x1){_0x5cf4c1[_0xa8e4('0x56')][_0x33c644][_0xa8e4('0x60')]=_0x5cf4c1[_0xa8e4('0x50')]['id'];_0x28e915['push'](_0x5cf4c1[_0xa8e4('0x56')][_0x33c644]);}return BPromise[_0xa8e4('0x6b')](_0x28e915,function(_0x376942){return db[_0xa8e4('0x67')][_0xa8e4('0x55')](_[_0xa8e4('0x6c')](_0x376942,[_0xa8e4('0x65'),'id'])||{},{'fields':_[_0xa8e4('0x3c')](_0x46b377),'raw':!![]})[_0xa8e4('0x2c')](function(_0x4e8aad){_0xc030e6[_0xa8e4('0x6d')][_0xa8e4('0x6e')](_0x4e8aad[_0xa8e4('0x6f')]);})[_0xa8e4('0x54')](function(_0x90f703){_0xc030e6[_0xa8e4('0x70')][_0xa8e4('0x6e')]({'data':_0x376942,'error':_0x90f703[_0xa8e4('0x71')]});});})['then'](function(_0x11883d){return _0xc030e6;})[_0xa8e4('0x54')](function(_0x870083){return _0x870083;});}else{_0x3107f2[_0xa8e4('0x21')](0x190)[_0xa8e4('0x22')]({'message':_0xa8e4('0x72')});}});}})[_0xa8e4('0x2c')](respondWithResult(_0x3107f2,null))['catch'](handleError(_0x3107f2,null));};exports[_0xa8e4('0x73')]=function(_0x32cd83,_0x24dfe2,_0x164792){var _0x5f4955;return db[_0xa8e4('0x4a')][_0xa8e4('0x53')]({'where':{'id':_0x32cd83['params']['id']},'include':[{'model':db[_0xa8e4('0x74')],'as':_0xa8e4('0x75')}]})[_0xa8e4('0x2c')](handleEntityNotFound(_0x24dfe2,null))[_0xa8e4('0x2c')](function(_0x28ec0b){if(_0x28ec0b){_0x5f4955=_0x28ec0b;return db[_0xa8e4('0x67')][_0xa8e4('0x38')];}})['then'](function(_0x5970f5){if(_0x5970f5){var _0x9e7d7f={};var _0x386985={};_0x386985[_0xa8e4('0x3b')]=_[_0xa8e4('0x76')](_[_0xa8e4('0x3c')](_0x5970f5),_[_0xa8e4('0x37')](_0x5f4955[_0xa8e4('0x75')],function(_0x57c3c9){return util[_0xa8e4('0x77')](_0xa8e4('0x78'),_0x57c3c9['id']);}));_0x386985[_0xa8e4('0x3d')]=_[_0xa8e4('0x3c')](_0x32cd83[_0xa8e4('0x3d')]);_0x386985[_0xa8e4('0x3e')]=_[_0xa8e4('0x3f')](_0x386985[_0xa8e4('0x3b')],_0x386985[_0xa8e4('0x3d')]);_0x9e7d7f[_0xa8e4('0x40')]=_[_0xa8e4('0x3f')](_0x386985[_0xa8e4('0x3b')],qs[_0xa8e4('0x41')](_0x32cd83[_0xa8e4('0x3d')]['fields']));_0x9e7d7f[_0xa8e4('0x40')]=_0x9e7d7f['attributes'][_0xa8e4('0x51')]?_0x9e7d7f['attributes']:_0x386985['model'];if(!_0x32cd83[_0xa8e4('0x3d')]['hasOwnProperty'](_0xa8e4('0x43'))){_0x9e7d7f[_0xa8e4('0x26')]=qs['limit'](_0x32cd83[_0xa8e4('0x3d')][_0xa8e4('0x26')]);_0x9e7d7f[_0xa8e4('0x23')]=qs[_0xa8e4('0x23')](_0x32cd83['query'][_0xa8e4('0x23')]);}_0x9e7d7f[_0xa8e4('0x44')]=qs[_0xa8e4('0x45')](_0x32cd83[_0xa8e4('0x3d')][_0xa8e4('0x45')]);_0x9e7d7f['where']=qs[_0xa8e4('0x3e')](_[_0xa8e4('0x47')](_0x32cd83[_0xa8e4('0x3d')],_0x386985['filters']));_0x9e7d7f['raw']=!![];if(_0x32cd83[_0xa8e4('0x3d')][_0xa8e4('0x48')]){_0x9e7d7f[_0xa8e4('0x46')]=_[_0xa8e4('0x49')](_0x9e7d7f[_0xa8e4('0x46')],{'$or':_[_0xa8e4('0x37')](_0x9e7d7f[_0xa8e4('0x40')],function(_0x2110b7){var _0x2904e5={};_0x2904e5[_0x2110b7]={'$like':'%'+_0x32cd83[_0xa8e4('0x3d')]['filter']+'%'};return _0x2904e5;})});}_0x9e7d7f=_[_0xa8e4('0x49')]({},_0x9e7d7f,_0x32cd83[_0xa8e4('0x52')]);return _0x5f4955['getContacts'](_0x9e7d7f);}})[_0xa8e4('0x2c')](respondWithResult(_0x24dfe2,null))['catch'](handleError(_0x24dfe2,null));};exports[_0xa8e4('0x79')]=function(_0xfbf4a1,_0x472b5f,_0x195014){var _0x3af77f;var _0x5b0eea;var _0x373167;var _0x1ba737=_0xfbf4a1[_0xa8e4('0x50')]['id'];csv_results=[];return db[_0xa8e4('0x7a')]['findAll']({'attributes':['id','name'],'raw':!![],'order':[_0xa8e4('0x7b')]})[_0xa8e4('0x2c')](function(_0xc57481){_0x3af77f=_0xc57481;var _0x162c43=_[_0xa8e4('0x3c')](db[_0xa8e4('0x67')][_0xa8e4('0x38')]);return db[_0xa8e4('0x74')][_0xa8e4('0x4d')]({'raw':!![],'attributes':['id','alias']})[_0xa8e4('0x2c')](function(_0x1515b8){_0x5b0eea=_0x1515b8;var _0x5975e5=squel[_0xa8e4('0x7c')]()[_0xa8e4('0x41')](_0x162c43)[_0xa8e4('0x7d')](_0xa8e4('0x7e'),'c')[_0xa8e4('0x46')](_0xa8e4('0x7f'),_0x1ba737)[_0xa8e4('0x46')](_0xa8e4('0x80'))[_0xa8e4('0x81')]();for(var _0x4a2e08=0x0;_0x4a2e08<_0x5b0eea[_0xa8e4('0x51')];_0x4a2e08++){_0x5975e5[_0xa8e4('0x82')]('c.cf_'+_0x5b0eea[_0x4a2e08]['id'],'customField_'+_0x5b0eea[_0x4a2e08]['alias']);}for(var _0x4a2e08=0x0;_0x4a2e08<_0x3af77f['length'];_0x4a2e08++){_0x5975e5[_0xa8e4('0x82')](squel[_0xa8e4('0x7c')]()[_0xa8e4('0x82')](_0xa8e4('0x83'))[_0xa8e4('0x7d')](_0xa8e4('0x84'))['where'](_0xa8e4('0x85'),_0x3af77f[_0x4a2e08]['id'])['where'](_0xa8e4('0x86')),_0xa8e4('0x87')+_0x3af77f[_0x4a2e08][_0xa8e4('0x34')]);_0x5975e5[_0xa8e4('0x82')](squel[_0xa8e4('0x7c')]()[_0xa8e4('0x82')](_0xa8e4('0x88'))['from']('cm_contact_has_items')['where']('ItemTypeId\x20=\x20?',_0x3af77f[_0x4a2e08]['id'])[_0xa8e4('0x46')](_0xa8e4('0x86')),_0xa8e4('0x89')+_0x3af77f[_0x4a2e08][_0xa8e4('0x34')]);}var _0x47bc0b=[];_0x47bc0b[_0xa8e4('0x6e')](_0x5975e5[_0xa8e4('0x8a')]());BPromise['each'](_0x47bc0b,handleQuery)[_0xa8e4('0x2c')](function(_0xdcf4ec){handleQuery(_0x5975e5[_0xa8e4('0x8a')]());var _0x53c8d8=csv_results[0x0];if(!_['isEmpty'](_0x53c8d8)){var _0x11ccae=toCsv(_0x53c8d8);var _0x1aebf4=Date[_0xa8e4('0x8b')]();fs[_0xa8e4('0x8c')](util[_0xa8e4('0x77')]('/tmp/list_%d_%s.csv',_0x1ba737,_0x1aebf4),_0x11ccae);_0x472b5f['setHeader']('Content-disposition',_0xa8e4('0x8d')+util[_0xa8e4('0x77')](_0xa8e4('0x8e'),_0x1ba737,_0x1aebf4));_0x472b5f[_0xa8e4('0x8f')](_0xa8e4('0x90'),_0xa8e4('0x91'));return _0x472b5f[_0xa8e4('0x92')](util[_0xa8e4('0x77')](_0xa8e4('0x93'),_0x1ba737,_0x1aebf4));}else{return _0x472b5f['sendStatus'](0xcc);}});});});};exports[_0xa8e4('0x94')]=function(_0x2ac525,_0x2182a4,_0x4a74ab){var _0x544456;delete _0x2ac525[_0xa8e4('0x56')]['id'];return db['CmList'][_0xa8e4('0x63')]({'where':{'id':_0x2ac525[_0xa8e4('0x50')]['id']}})[_0xa8e4('0x2c')](handleEntityNotFound(_0x2182a4,null))[_0xa8e4('0x2c')](function(_0x4b2a93){if(_0x4b2a93){return db['sequelize']['transaction'](function(_0x2f2cea){return db[_0xa8e4('0x74')][_0xa8e4('0x55')](_0x2ac525[_0xa8e4('0x56')],{'transaction':_0x2f2cea})['then'](function(_0x5631ed){_0x544456=_0x5631ed;return _0x4b2a93[_0xa8e4('0x95')](_0x5631ed,{'transaction':_0x2f2cea});})['then'](function(){var _0x239e28={'type':db[_0xa8e4('0x96')][_0xa8e4('0x97')],'transaction':_0x2f2cea};switch(_0x2ac525[_0xa8e4('0x56')][_0xa8e4('0x3a')]){case'text':_0x239e28[_0xa8e4('0x3a')]=db[_0xa8e4('0x96')][_0xa8e4('0x97')];break;case _0xa8e4('0x98'):_0x239e28[_0xa8e4('0x3a')]=db[_0xa8e4('0x96')]['INTEGER'];break;case _0xa8e4('0x99'):_0x239e28[_0xa8e4('0x3a')]=db[_0xa8e4('0x96')][_0xa8e4('0x9a')];_0x239e28[_0xa8e4('0x9b')]=![];break;default:}return db[_0xa8e4('0x9c')][_0xa8e4('0x9d')][_0xa8e4('0x9e')](_0xa8e4('0x7e'),util[_0xa8e4('0x77')](_0xa8e4('0x9f'),_0x544456['id']),_0x239e28);})[_0xa8e4('0x2c')](function(){return _0x544456;});});}})[_0xa8e4('0x2c')](respondWithResult(_0x2182a4,null))['catch'](handleError(_0x2182a4,null));};exports[_0xa8e4('0xa0')]=function(_0x238c4f,_0x521bce,_0x19e891){var _0x2d3b42={};var _0x47da50={};var _0x5162a4;var _0x329a91;return db['CmList']['findOne']({'where':{'id':_0x238c4f['params']['id']}})[_0xa8e4('0x2c')](handleEntityNotFound(_0x521bce,null))[_0xa8e4('0x2c')](function(_0xd2bc86){if(_0xd2bc86){_0x5162a4=_0xd2bc86;_0x47da50[_0xa8e4('0x3b')]=_[_0xa8e4('0x3c')](db[_0xa8e4('0x74')][_0xa8e4('0x38')]);_0x47da50['query']=_['keys'](_0x238c4f['query']);_0x47da50[_0xa8e4('0x3e')]=_[_0xa8e4('0x3f')](_0x47da50[_0xa8e4('0x3b')],_0x47da50[_0xa8e4('0x3d')]);_0x2d3b42[_0xa8e4('0x40')]=_['intersection'](_0x47da50['model'],qs['fields'](_0x238c4f[_0xa8e4('0x3d')][_0xa8e4('0x41')]));_0x2d3b42[_0xa8e4('0x40')]=_0x2d3b42[_0xa8e4('0x40')][_0xa8e4('0x51')]?_0x2d3b42[_0xa8e4('0x40')]:_0x47da50[_0xa8e4('0x3b')];_0x2d3b42[_0xa8e4('0x44')]=qs[_0xa8e4('0x45')](_0x238c4f['query'][_0xa8e4('0x45')]);_0x2d3b42[_0xa8e4('0x46')]=qs[_0xa8e4('0x3e')](_[_0xa8e4('0x47')](_0x238c4f[_0xa8e4('0x3d')],_0x47da50[_0xa8e4('0x3e')]));_0x2d3b42[_0xa8e4('0x46')]=_[_0xa8e4('0x49')](_0x2d3b42['where'],{'$or':[{'ListId':_0xd2bc86['id']},{'ListId':null}]});if(_0x238c4f['query']['filter']){_0x2d3b42['where']=_[_0xa8e4('0x49')](_0x2d3b42['where'],{'$or':_[_0xa8e4('0x37')](_0x2d3b42['attributes'],function(_0x148d3e){var _0x28f2d8={};_0x28f2d8[_0x148d3e]={'$like':'%'+_0x238c4f[_0xa8e4('0x3d')][_0xa8e4('0x48')]+'%'};return _0x28f2d8;})});}_0x2d3b42=_[_0xa8e4('0x49')]({},_0x2d3b42,_0x238c4f[_0xa8e4('0x52')]);return db[_0xa8e4('0x74')][_0xa8e4('0xa1')](_0x2d3b42);}})[_0xa8e4('0x2c')](respondWithResult(_0x521bce,null))[_0xa8e4('0x54')](handleError(_0x521bce,null));};exports['getGlobalCustomFields']=function(_0x328013,_0x1d336d){return db[_0xa8e4('0x74')]['findAndCountAll']({'where':{'ListId':null}})[_0xa8e4('0x2c')](handleEntityNotFound(_0x1d336d,null))[_0xa8e4('0x2c')](function(_0x20031f){return _0x20031f;})['then'](respondWithResult(_0x1d336d,null))[_0xa8e4('0x54')](handleError(_0x1d336d,null));};exports[_0xa8e4('0xa2')]=function(_0x531c7b,_0x467e5a,_0x532b8e){return db[_0xa8e4('0x4a')][_0xa8e4('0x53')]({'where':{'id':_0x531c7b[_0xa8e4('0x50')]['id']}})[_0xa8e4('0x2c')](handleEntityNotFound(_0x467e5a,null))[_0xa8e4('0x2c')](function(_0x36330b){if(_0x36330b){return _0x36330b[_0xa8e4('0xa2')](_0x531c7b[_0xa8e4('0x56')]['ids'],_[_0xa8e4('0x6c')](_0x531c7b[_0xa8e4('0x56')],[_0xa8e4('0x65'),'id'])||{})['spread'](function(_0x34b852){for(var _0x36a2f1=0x0;_0x36a2f1<_0x531c7b['body'][_0xa8e4('0x65')][_0xa8e4('0x51')];_0x36a2f1+=0x1){socket[_0xa8e4('0xa3')]('userCmList:save',{'UserId':Number(_0x531c7b[_0xa8e4('0x56')]['ids'][_0x36a2f1]),'CmListId':Number(_0x531c7b[_0xa8e4('0x50')]['id'])});}return _0x34b852;});}})[_0xa8e4('0x2c')](respondWithResult(_0x467e5a,null))[_0xa8e4('0x54')](handleError(_0x467e5a,null));};exports[_0xa8e4('0xa4')]=function(_0x1bd1ef,_0xd1f221,_0x54b245){return db[_0xa8e4('0x4a')][_0xa8e4('0x53')]({'where':{'id':_0x1bd1ef['params']['id']}})[_0xa8e4('0x2c')](handleEntityNotFound(_0xd1f221,null))[_0xa8e4('0x2c')](function(_0x22d272){if(_0x22d272){return _0x22d272['removeAgents'](_0x1bd1ef[_0xa8e4('0x3d')][_0xa8e4('0x65')])['then'](function(){if(_[_0xa8e4('0x6a')](_0x1bd1ef[_0xa8e4('0x3d')][_0xa8e4('0x65')])){for(var _0x37056a=0x0;_0x37056a<_0x1bd1ef[_0xa8e4('0x3d')][_0xa8e4('0x65')][_0xa8e4('0x51')];_0x37056a+=0x1){socket[_0xa8e4('0xa3')](_0xa8e4('0xa5'),{'UserId':Number(_0x1bd1ef[_0xa8e4('0x3d')][_0xa8e4('0x65')][_0x37056a]),'CmListId':Number(_0x1bd1ef['params']['id'])});}}else{socket['emit'](_0xa8e4('0xa5'),{'UserId':Number(_0x1bd1ef['query'][_0xa8e4('0x65')]),'CmListId':Number(_0x1bd1ef[_0xa8e4('0x50')]['id'])});}});}})[_0xa8e4('0x2c')](respondWithStatusCode(_0xd1f221,null))[_0xa8e4('0x54')](handleError(_0xd1f221,null));};exports[_0xa8e4('0xa6')]=function(_0x293fb7,_0x92ad37,_0x6e6580){var _0x1e6857={};var _0x241299={};var _0x56776d;var _0x522841;return db[_0xa8e4('0x4a')]['findOne']({'where':{'id':_0x293fb7[_0xa8e4('0x50')]['id']}})['then'](handleEntityNotFound(_0x92ad37,null))[_0xa8e4('0x2c')](function(_0x14f5d1){if(_0x14f5d1){_0x56776d=_0x14f5d1;_0x241299['model']=_['keys'](db[_0xa8e4('0xa7')][_0xa8e4('0x38')]);_0x241299['query']=_['keys'](_0x293fb7[_0xa8e4('0x3d')]);_0x241299['filters']=_['intersection'](_0x241299[_0xa8e4('0x3b')],_0x241299[_0xa8e4('0x3d')]);_0x1e6857[_0xa8e4('0x40')]=_[_0xa8e4('0x3f')](_0x241299[_0xa8e4('0x3b')],qs[_0xa8e4('0x41')](_0x293fb7[_0xa8e4('0x3d')][_0xa8e4('0x41')]));_0x1e6857[_0xa8e4('0x40')]=_0x1e6857[_0xa8e4('0x40')]['length']?_0x1e6857[_0xa8e4('0x40')]:_0x241299[_0xa8e4('0x3b')];_0x1e6857['order']=qs[_0xa8e4('0x45')](_0x293fb7['query']['sort']);_0x1e6857[_0xa8e4('0x46')]=qs[_0xa8e4('0x3e')](_[_0xa8e4('0x47')](_0x293fb7[_0xa8e4('0x3d')],_0x241299['filters']));if(_0x293fb7[_0xa8e4('0x3d')][_0xa8e4('0x48')]){_0x1e6857[_0xa8e4('0x46')]=_[_0xa8e4('0x49')](_0x1e6857[_0xa8e4('0x46')],{'$or':_['map'](_0x1e6857[_0xa8e4('0x40')],function(_0x2b80bb){var _0x243eba={};_0x243eba[_0x2b80bb]={'$like':'%'+_0x293fb7[_0xa8e4('0x3d')][_0xa8e4('0x48')]+'%'};return _0x243eba;})});}_0x1e6857=_[_0xa8e4('0x49')]({},_0x1e6857,_0x293fb7[_0xa8e4('0x52')]);return _0x56776d[_0xa8e4('0xa6')](_0x1e6857);}})[_0xa8e4('0x2c')](function(_0x1f2545){if(_0x1f2545){_0x522841=_0x1f2545['length'];if(!_0x293fb7[_0xa8e4('0x3d')][_0xa8e4('0x42')](_0xa8e4('0x43'))){_0x1e6857[_0xa8e4('0x26')]=qs[_0xa8e4('0x26')](_0x293fb7[_0xa8e4('0x3d')][_0xa8e4('0x26')]);_0x1e6857[_0xa8e4('0x23')]=qs[_0xa8e4('0x23')](_0x293fb7['query'][_0xa8e4('0x23')]);}return _0x56776d[_0xa8e4('0xa6')](_0x1e6857);}})[_0xa8e4('0x2c')](function(_0x43978a){if(_0x43978a){return _0x43978a?{'count':_0x522841,'rows':_0x43978a}:null;}})[_0xa8e4('0x2c')](respondWithResult(_0x92ad37,null))[_0xa8e4('0x54')](handleError(_0x92ad37,null));};function handleQuery(_0x16733e){logger[_0xa8e4('0xa8')](_0x16733e);return db['sequelize'][_0xa8e4('0x3d')](_0x16733e)[_0xa8e4('0xa9')](function(_0x4f1a28){csv_results[_0xa8e4('0x6e')](_0x4f1a28);})[_0xa8e4('0x54')](function(_0x14d99c){logger[_0xa8e4('0x32')](_0x14d99c[_0xa8e4('0x71')]);});}
\ No newline at end of file
+var _0x228b=['from','c.ListId\x20=\x20?','c.deletedAt\x20is\x20null','customField_','alias','field','item','cm_contact_has_items','ItemTypeId\x20=\x20?','CmContactId\x20=\x20c.id','additionalPhone_','description_additionalPhone_','each','now','writeFileSync','format','/tmp/list_%d_%s.csv','setHeader','Content-type','text/csv','download','sequelize','transaction','addCustomFields','Sequelize','TEXT','text','number','INTEGER','queryInterface','addColumn','cf_%s','getCustomFields','findAndCountAll','getGlobalCustomFields','addAgents','spread','userCmList:save','removeAgents','emit','userCmList:remove','getAgents','error','rimraf','fast-json-patch','request-promise','moment','mustache','util','path','fs-extra','squel','crypto','desk.js','to-csv','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','redis','defaults','./cmList.socket','register','sendStatus','status','end','json','undefined','count','offset','limit','set','apply','update','then','destroy','get','Lists','UserProfileResource','stack','name','send','type','key','model','query','keys','filters','intersection','attributes','fields','sort','where','pick','filter','merge','map','VIRTUAL','options','CmList','includeAll','include','findAll','show','rawAttributes','length','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','params','describe','addDisposition','ListId','getDispositions','findOne','nolimit','order','Disposition','rows','ids','addContacts','CmContact','tags','isArray','push','omit','success','dataValues','message','Malformed\x20request\x20syntax','CmCustomField','concat','CustomFields','cf_%d','hasOwnProperty','raw','getContacts','ContactItemType','OrderBy','select'];(function(_0x59d0cc,_0xa7c52b){var _0x2ae79f=function(_0x33042e){while(--_0x33042e){_0x59d0cc['push'](_0x59d0cc['shift']());}};_0x2ae79f(++_0xa7c52b);}(_0x228b,0x1f3));var _0xb228=function(_0x3cc10e,_0x4f2168){_0x3cc10e=_0x3cc10e-0x0;var _0x5e022b=_0x228b[_0x3cc10e];return _0x5e022b;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xb228('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xb228('0x1'));var rp=require(_0xb228('0x2'));var moment=require(_0xb228('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xb228('0x4'));var util=require(_0xb228('0x5'));var path=require(_0xb228('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xb228('0x7'));var _=require('lodash');var squel=require(_0xb228('0x8'));var crypto=require(_0xb228('0x9'));var jsforce=require('jsforce');var deskjs=require(_0xb228('0xa'));var toCsv=require(_0xb228('0xb'));var querystring=require('querystring');var Papa=require(_0xb228('0xc'));var Redis=require('ioredis');var authService=require(_0xb228('0xd'));var qs=require(_0xb228('0xe'));var as=require(_0xb228('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xb228('0x10'))(_0xb228('0x11'));var utils=require(_0xb228('0x12'));var config=require(_0xb228('0x13'));var licenseUtil=require(_0xb228('0x14'));var db=require('../../mysqldb')['db'];var csv_results;config[_0xb228('0x15')]=_[_0xb228('0x16')](config[_0xb228('0x15')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xb228('0x15')]));require(_0xb228('0x17'))[_0xb228('0x18')](socket);function respondWithStatusCode(_0x20ccf1,_0x114f15){_0x114f15=_0x114f15||0xcc;return function(_0x396ee7){if(_0x396ee7){return _0x20ccf1[_0xb228('0x19')](_0x114f15);}return _0x20ccf1[_0xb228('0x1a')](_0x114f15)[_0xb228('0x1b')]();};}function respondWithResult(_0x81ea6b,_0x532a7b){_0x532a7b=_0x532a7b||0xc8;return function(_0xb2f6d6){if(_0xb2f6d6){return _0x81ea6b[_0xb228('0x1a')](_0x532a7b)[_0xb228('0x1c')](_0xb2f6d6);}};}function respondWithFilteredResult(_0x212934,_0x1bca59){return function(_0x29b8d7){if(_0x29b8d7){var _0x13e8b5=typeof _0x1bca59['offset']==='undefined'&&typeof _0x1bca59['limit']===_0xb228('0x1d');var _0x42738b=_0x29b8d7[_0xb228('0x1e')];var _0x304a82=_0x13e8b5?0x0:_0x1bca59[_0xb228('0x1f')];var _0x2b0a2a=_0x13e8b5?_0x29b8d7[_0xb228('0x1e')]:_0x1bca59[_0xb228('0x1f')]+_0x1bca59[_0xb228('0x20')];var _0x59c882;if(_0x2b0a2a>=_0x42738b){_0x2b0a2a=_0x42738b;_0x59c882=0xc8;}else{_0x59c882=0xce;}_0x212934[_0xb228('0x1a')](_0x59c882);return _0x212934[_0xb228('0x21')]('Content-Range',_0x304a82+'-'+_0x2b0a2a+'/'+_0x42738b)[_0xb228('0x1c')](_0x29b8d7);}return null;};}function patchUpdates(_0x12da05){return function(_0x2b746e){try{jsonpatch[_0xb228('0x22')](_0x2b746e,_0x12da05,!![]);}catch(_0x327df3){return BPromise['reject'](_0x327df3);}return _0x2b746e['save']();};}function saveUpdates(_0x56c049,_0x52df2a){return function(_0x46467d){if(_0x46467d){return _0x46467d[_0xb228('0x23')](_0x56c049)[_0xb228('0x24')](function(_0x29b939){return _0x29b939;});}return null;};}function removeEntity(_0x31da51,_0x21abf1){return function(_0x3d24e7){if(_0x3d24e7){return _0x3d24e7[_0xb228('0x25')]()[_0xb228('0x24')](function(){var _0x38b531=_0x3d24e7[_0xb228('0x26')]({'plain':!![]});var _0x31b184=_0xb228('0x27');return db[_0xb228('0x28')][_0xb228('0x25')]({'where':{'type':_0x31b184,'resourceId':_0x38b531['id']}})[_0xb228('0x24')](function(){return _0x3d24e7;});})[_0xb228('0x24')](function(){_0x31da51['status'](0xcc)[_0xb228('0x1b')]();});}};}function handleEntityNotFound(_0x2273a7,_0x598e6a){return function(_0x317aa5){if(!_0x317aa5){_0x2273a7[_0xb228('0x19')](0x194);}return _0x317aa5;};}function handleError(_0x57d8ac,_0x4a22f9){_0x4a22f9=_0x4a22f9||0x1f4;return function(_0x1412d4){logger['error'](_0x1412d4[_0xb228('0x29')]);if(_0x1412d4[_0xb228('0x2a')]){delete _0x1412d4[_0xb228('0x2a')];}_0x57d8ac['status'](_0x4a22f9)[_0xb228('0x2b')](_0x1412d4);};}exports['index']=function(_0x565678,_0x38726c){var _0xc6ef2e={},_0x1e6e9b={},_0xf997df={'count':0x0,'rows':[]};var _0x27002a=_['map'](db['CmList']['rawAttributes'],function(_0x4e8015){return{'name':_0x4e8015['fieldName'],'type':_0x4e8015[_0xb228('0x2c')][_0xb228('0x2d')]};});_0x1e6e9b[_0xb228('0x2e')]=_['map'](_0x27002a,'name');_0x1e6e9b[_0xb228('0x2f')]=_[_0xb228('0x30')](_0x565678[_0xb228('0x2f')]);_0x1e6e9b[_0xb228('0x31')]=_[_0xb228('0x32')](_0x1e6e9b[_0xb228('0x2e')],_0x1e6e9b['query']);_0xc6ef2e[_0xb228('0x33')]=_[_0xb228('0x32')](_0x1e6e9b[_0xb228('0x2e')],qs['fields'](_0x565678['query'][_0xb228('0x34')]));_0xc6ef2e[_0xb228('0x33')]=_0xc6ef2e['attributes']['length']?_0xc6ef2e['attributes']:_0x1e6e9b[_0xb228('0x2e')];if(!_0x565678[_0xb228('0x2f')]['hasOwnProperty']('nolimit')){_0xc6ef2e[_0xb228('0x20')]=qs[_0xb228('0x20')](_0x565678[_0xb228('0x2f')][_0xb228('0x20')]);_0xc6ef2e['offset']=qs[_0xb228('0x1f')](_0x565678[_0xb228('0x2f')]['offset']);}_0xc6ef2e['order']=qs[_0xb228('0x35')](_0x565678[_0xb228('0x2f')][_0xb228('0x35')]);_0xc6ef2e[_0xb228('0x36')]=qs[_0xb228('0x31')](_[_0xb228('0x37')](_0x565678[_0xb228('0x2f')],_0x1e6e9b[_0xb228('0x31')]),_0x27002a);if(_0x565678['query'][_0xb228('0x38')]){_0xc6ef2e[_0xb228('0x36')]=_[_0xb228('0x39')](_0xc6ef2e[_0xb228('0x36')],{'$or':_[_0xb228('0x3a')](_0x27002a,function(_0x2e7cac){if(_0x2e7cac[_0xb228('0x2c')]!==_0xb228('0x3b')){var _0x5493fa={};_0x5493fa[_0x2e7cac[_0xb228('0x2a')]]={'$like':'%'+_0x565678['query'][_0xb228('0x38')]+'%'};return _0x5493fa;}})});}_0xc6ef2e=_[_0xb228('0x39')]({},_0xc6ef2e,_0x565678[_0xb228('0x3c')]);var _0x19047c={'where':_0xc6ef2e[_0xb228('0x36')]};return db[_0xb228('0x3d')][_0xb228('0x1e')](_0x19047c)[_0xb228('0x24')](function(_0xf3452d){_0xf997df[_0xb228('0x1e')]=_0xf3452d;if(_0x565678[_0xb228('0x2f')][_0xb228('0x3e')]){_0xc6ef2e[_0xb228('0x3f')]=[{'all':!![]}];}return db[_0xb228('0x3d')][_0xb228('0x40')](_0xc6ef2e);})[_0xb228('0x24')](function(_0x1b298d){_0xf997df['rows']=_0x1b298d;return _0xf997df;})['then'](respondWithFilteredResult(_0x38726c,_0xc6ef2e))['catch'](handleError(_0x38726c,null));};exports[_0xb228('0x41')]=function(_0x2c8783,_0x48da23){var _0x21b31f={'raw':![],'where':{'id':_0x2c8783['params']['id']}},_0x2b432b={};_0x2b432b[_0xb228('0x2e')]=_[_0xb228('0x30')](db[_0xb228('0x3d')][_0xb228('0x42')]);_0x2b432b[_0xb228('0x2f')]=_[_0xb228('0x30')](_0x2c8783[_0xb228('0x2f')]);_0x2b432b[_0xb228('0x31')]=_[_0xb228('0x32')](_0x2b432b[_0xb228('0x2e')],_0x2b432b[_0xb228('0x2f')]);_0x21b31f['attributes']=_['intersection'](_0x2b432b['model'],qs[_0xb228('0x34')](_0x2c8783['query'][_0xb228('0x34')]));_0x21b31f['attributes']=_0x21b31f[_0xb228('0x33')][_0xb228('0x43')]?_0x21b31f[_0xb228('0x33')]:_0x2b432b[_0xb228('0x2e')];if(_0x2c8783[_0xb228('0x2f')]['includeAll']){_0x21b31f['include']=[{'all':!![]}];}_0x21b31f=_[_0xb228('0x39')]({},_0x21b31f,_0x2c8783[_0xb228('0x3c')]);return db[_0xb228('0x3d')][_0xb228('0x44')](_0x21b31f)[_0xb228('0x24')](handleEntityNotFound(_0x48da23,null))['then'](respondWithResult(_0x48da23,null))[_0xb228('0x45')](handleError(_0x48da23,null));};exports[_0xb228('0x46')]=function(_0x371f43,_0x2841b3){return db[_0xb228('0x3d')]['create'](_0x371f43[_0xb228('0x47')],{})[_0xb228('0x24')](function(_0x89e1ca){var _0x55a13e=_0x371f43[_0xb228('0x48')]['get']({'plain':!![]});if(!_0x55a13e)throw new Error(_0xb228('0x49'));if(_0x55a13e[_0xb228('0x4a')]===_0xb228('0x48')){var _0x534883=_0x89e1ca[_0xb228('0x26')]({'plain':!![]});var _0x4d8b8b=_0xb228('0x27');return db[_0xb228('0x4b')]['find']({'where':{'name':_0x4d8b8b,'userProfileId':_0x55a13e[_0xb228('0x4c')]},'raw':!![]})[_0xb228('0x24')](function(_0xc31d5e){if(_0xc31d5e&&_0xc31d5e[_0xb228('0x4d')]===0x0){return db[_0xb228('0x28')][_0xb228('0x46')]({'name':_0x534883[_0xb228('0x2a')],'resourceId':_0x534883['id'],'type':_0xc31d5e[_0xb228('0x2a')],'sectionId':_0xc31d5e['id']},{})[_0xb228('0x24')](function(){return _0x89e1ca;});}else{return _0x89e1ca;}})[_0xb228('0x45')](function(_0x595a6b){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x595a6b);throw _0x595a6b;});}return _0x89e1ca;})[_0xb228('0x24')](respondWithResult(_0x2841b3,0xc9))['catch'](handleError(_0x2841b3,null));};exports[_0xb228('0x23')]=function(_0x5c8faa,_0x53c073){if(_0x5c8faa[_0xb228('0x47')]['id']){delete _0x5c8faa[_0xb228('0x47')]['id'];}return db['CmList'][_0xb228('0x44')]({'where':{'id':_0x5c8faa[_0xb228('0x4e')]['id']}})[_0xb228('0x24')](handleEntityNotFound(_0x53c073,null))[_0xb228('0x24')](saveUpdates(_0x5c8faa[_0xb228('0x47')],null))[_0xb228('0x24')](respondWithResult(_0x53c073,null))[_0xb228('0x45')](handleError(_0x53c073,null));};exports[_0xb228('0x25')]=function(_0x973bea,_0x193f98){return db[_0xb228('0x3d')][_0xb228('0x44')]({'where':{'id':_0x973bea[_0xb228('0x4e')]['id']}})[_0xb228('0x24')](handleEntityNotFound(_0x193f98,null))[_0xb228('0x24')](removeEntity(_0x193f98,null))['catch'](handleError(_0x193f98,null));};exports[_0xb228('0x4f')]=function(_0x4b1328,_0x220d3c){return db[_0xb228('0x3d')]['describe']()[_0xb228('0x24')](respondWithResult(_0x220d3c,null))['catch'](handleError(_0x220d3c,null));};exports[_0xb228('0x50')]=function(_0x43b874,_0x1b7fd6,_0x21c402){if(_0x43b874[_0xb228('0x47')]['id']){delete _0x43b874[_0xb228('0x47')]['id'];}return db[_0xb228('0x3d')][_0xb228('0x44')]({'where':{'id':_0x43b874['params']['id']}})[_0xb228('0x24')](handleEntityNotFound(_0x1b7fd6,null))[_0xb228('0x24')](function(_0x896e00){if(_0x896e00){_0x43b874['body'][_0xb228('0x51')]=_0x896e00['id'];return db['Disposition']['create'](_0x43b874[_0xb228('0x47')]);}})[_0xb228('0x24')](respondWithResult(_0x1b7fd6,null))[_0xb228('0x45')](handleError(_0x1b7fd6,null));};exports[_0xb228('0x52')]=function(_0xf7de37,_0x31c114,_0x355c59){var _0x905d66={'raw':![],'where':{}};var _0xdcd20c={};var _0x2d14c7={'count':0x0,'rows':[]};return db['CmList'][_0xb228('0x53')]({'where':{'id':_0xf7de37[_0xb228('0x4e')]['id']}})[_0xb228('0x24')](handleEntityNotFound(_0x31c114,null))['then'](function(_0x19e331){if(_0x19e331){_0xdcd20c[_0xb228('0x2e')]=_[_0xb228('0x30')](db['Disposition'][_0xb228('0x42')]);_0xdcd20c[_0xb228('0x2f')]=_[_0xb228('0x30')](_0xf7de37[_0xb228('0x2f')]);_0xdcd20c['filters']=_['intersection'](_0xdcd20c[_0xb228('0x2e')],_0xdcd20c['query']);_0x905d66[_0xb228('0x33')]=_[_0xb228('0x32')](_0xdcd20c[_0xb228('0x2e')],qs[_0xb228('0x34')](_0xf7de37[_0xb228('0x2f')][_0xb228('0x34')]));_0x905d66[_0xb228('0x33')]=_0x905d66[_0xb228('0x33')]['length']?_0x905d66[_0xb228('0x33')]:_0xdcd20c['model'];if(!_0xf7de37[_0xb228('0x2f')]['hasOwnProperty'](_0xb228('0x54'))){_0x905d66[_0xb228('0x20')]=qs[_0xb228('0x20')](_0xf7de37['query'][_0xb228('0x20')]);_0x905d66[_0xb228('0x1f')]=qs[_0xb228('0x1f')](_0xf7de37[_0xb228('0x2f')][_0xb228('0x1f')]);}_0x905d66[_0xb228('0x55')]=qs[_0xb228('0x35')](_0xf7de37[_0xb228('0x2f')][_0xb228('0x35')]);_0x905d66[_0xb228('0x36')]=qs[_0xb228('0x31')](_['pick'](_0xf7de37[_0xb228('0x2f')],_0xdcd20c[_0xb228('0x31')]));_0x905d66[_0xb228('0x36')][_0xb228('0x51')]=_0x19e331['id'];if(_0xf7de37[_0xb228('0x2f')][_0xb228('0x38')]){_0x905d66[_0xb228('0x36')]=_['merge'](_0x905d66[_0xb228('0x36')],{'$or':_['map'](_0x905d66[_0xb228('0x33')],function(_0x305aaf){var _0x544df0={};_0x544df0[_0x305aaf]={'$like':'%'+_0xf7de37['query'][_0xb228('0x38')]+'%'};return _0x544df0;})});}_0x905d66=_[_0xb228('0x39')]({},_0x905d66,_0xf7de37[_0xb228('0x3c')]);return db[_0xb228('0x56')]['count']({'where':_0x905d66[_0xb228('0x36')]})[_0xb228('0x24')](function(_0x3f86eb){_0x2d14c7[_0xb228('0x1e')]=_0x3f86eb;if(_0xf7de37[_0xb228('0x2f')]['includeAll']){_0x905d66['include']=[{'all':!![]}];}return db[_0xb228('0x56')]['findAll'](_0x905d66);})[_0xb228('0x24')](function(_0x16d543){_0x2d14c7[_0xb228('0x57')]=_0x16d543;return _0x2d14c7;});}})[_0xb228('0x24')](respondWithFilteredResult(_0x31c114,_0x905d66))[_0xb228('0x45')](handleError(_0x31c114,null));};exports['removeDispositions']=function(_0x33e225,_0x1d85b7,_0x2f4f8a){return db[_0xb228('0x3d')][_0xb228('0x44')]({'where':{'id':_0x33e225[_0xb228('0x4e')]['id']}})[_0xb228('0x24')](handleEntityNotFound(_0x1d85b7,null))['then'](function(_0x466679){if(_0x466679){return _0x466679['removeDispositions'](_0x33e225[_0xb228('0x2f')][_0xb228('0x58')]);}})[_0xb228('0x24')](respondWithStatusCode(_0x1d85b7,null))[_0xb228('0x45')](handleError(_0x1d85b7,null));};exports[_0xb228('0x59')]=function(_0x478eff,_0x2120f7,_0x1782c5){return db[_0xb228('0x3d')]['find']({'where':{'id':_0x478eff[_0xb228('0x4e')]['id']}})[_0xb228('0x24')](handleEntityNotFound(_0x2120f7,null))[_0xb228('0x24')](function(_0x567fec){if(_0x567fec){var _0x2ffaa8=[];var _0x53eb69={'success':[],'errors':[]};return db[_0xb228('0x5a')][_0xb228('0x4f')]()[_0xb228('0x24')](function(_0x3c5593){if(_0x478eff['body'][_0xb228('0x5b')]&&_[_0xb228('0x5c')](_0x478eff[_0xb228('0x47')][_0xb228('0x5b')])){if(_0x478eff[_0xb228('0x47')][_0xb228('0x5b')][_0xb228('0x43')]){_0x478eff[_0xb228('0x47')][_0xb228('0x5b')]=_0x478eff[_0xb228('0x47')][_0xb228('0x5b')]['join'](';')+';';}else{_0x478eff[_0xb228('0x47')][_0xb228('0x5b')]=null;}}else{_0x478eff[_0xb228('0x47')][_0xb228('0x5b')]=null;}if(_0x478eff[_0xb228('0x47')]&&_[_0xb228('0x5c')](_0x478eff[_0xb228('0x47')])){for(var _0x2f1618=0x0;_0x2f1618<_0x478eff[_0xb228('0x47')][_0xb228('0x43')];_0x2f1618+=0x1){_0x478eff[_0xb228('0x47')][_0x2f1618]['ListId']=_0x478eff[_0xb228('0x4e')]['id'];_0x2ffaa8[_0xb228('0x5d')](_0x478eff[_0xb228('0x47')][_0x2f1618]);}return BPromise['each'](_0x2ffaa8,function(_0x4d227f){return db[_0xb228('0x5a')][_0xb228('0x46')](_[_0xb228('0x5e')](_0x4d227f,['ids','id'])||{},{'fields':_[_0xb228('0x30')](_0x3c5593),'raw':!![]})[_0xb228('0x24')](function(_0x507f6f){_0x53eb69[_0xb228('0x5f')][_0xb228('0x5d')](_0x507f6f[_0xb228('0x60')]);})[_0xb228('0x45')](function(_0x59d74b){_0x53eb69['errors']['push']({'data':_0x4d227f,'error':_0x59d74b[_0xb228('0x61')]});});})[_0xb228('0x24')](function(_0x3f8fd1){return _0x53eb69;})['catch'](function(_0x1619b0){return _0x1619b0;});}else{_0x2120f7[_0xb228('0x1a')](0x190)['json']({'message':_0xb228('0x62')});}});}})[_0xb228('0x24')](respondWithResult(_0x2120f7,null))[_0xb228('0x45')](handleError(_0x2120f7,null));};exports['getContacts']=function(_0x1f5e21,_0xc4e75c,_0x5515ac){var _0x193633;return db['CmList'][_0xb228('0x44')]({'where':{'id':_0x1f5e21[_0xb228('0x4e')]['id']},'include':[{'model':db[_0xb228('0x63')],'as':'CustomFields'}]})[_0xb228('0x24')](handleEntityNotFound(_0xc4e75c,null))[_0xb228('0x24')](function(_0x164dcf){if(_0x164dcf){_0x193633=_0x164dcf;return db[_0xb228('0x5a')][_0xb228('0x42')];}})[_0xb228('0x24')](function(_0x402a7e){if(_0x402a7e){var _0x1bed00={};var _0x2d9c85={};_0x2d9c85[_0xb228('0x2e')]=_[_0xb228('0x64')](_[_0xb228('0x30')](_0x402a7e),_[_0xb228('0x3a')](_0x193633[_0xb228('0x65')],function(_0x419f8d){return util['format'](_0xb228('0x66'),_0x419f8d['id']);}));_0x2d9c85[_0xb228('0x2f')]=_['keys'](_0x1f5e21['query']);_0x2d9c85[_0xb228('0x31')]=_['intersection'](_0x2d9c85['model'],_0x2d9c85[_0xb228('0x2f')]);_0x1bed00[_0xb228('0x33')]=_['intersection'](_0x2d9c85[_0xb228('0x2e')],qs[_0xb228('0x34')](_0x1f5e21[_0xb228('0x2f')]['fields']));_0x1bed00[_0xb228('0x33')]=_0x1bed00[_0xb228('0x33')][_0xb228('0x43')]?_0x1bed00[_0xb228('0x33')]:_0x2d9c85['model'];if(!_0x1f5e21[_0xb228('0x2f')][_0xb228('0x67')](_0xb228('0x54'))){_0x1bed00[_0xb228('0x20')]=qs['limit'](_0x1f5e21[_0xb228('0x2f')][_0xb228('0x20')]);_0x1bed00['offset']=qs[_0xb228('0x1f')](_0x1f5e21[_0xb228('0x2f')][_0xb228('0x1f')]);}_0x1bed00[_0xb228('0x55')]=qs[_0xb228('0x35')](_0x1f5e21[_0xb228('0x2f')][_0xb228('0x35')]);_0x1bed00[_0xb228('0x36')]=qs[_0xb228('0x31')](_[_0xb228('0x37')](_0x1f5e21[_0xb228('0x2f')],_0x2d9c85[_0xb228('0x31')]));_0x1bed00[_0xb228('0x68')]=!![];if(_0x1f5e21[_0xb228('0x2f')][_0xb228('0x38')]){_0x1bed00[_0xb228('0x36')]=_[_0xb228('0x39')](_0x1bed00[_0xb228('0x36')],{'$or':_[_0xb228('0x3a')](_0x1bed00[_0xb228('0x33')],function(_0x5a2b9a){var _0x292327={};_0x292327[_0x5a2b9a]={'$like':'%'+_0x1f5e21[_0xb228('0x2f')]['filter']+'%'};return _0x292327;})});}_0x1bed00=_[_0xb228('0x39')]({},_0x1bed00,_0x1f5e21['options']);return _0x193633[_0xb228('0x69')](_0x1bed00);}})[_0xb228('0x24')](respondWithResult(_0xc4e75c,null))[_0xb228('0x45')](handleError(_0xc4e75c,null));};exports['getContactsCsv']=function(_0x4c611d,_0x42a1ae,_0x3f96fb){var _0x1fc730;var _0x242e43;var _0xd7c5bf;var _0x13ed17=_0x4c611d[_0xb228('0x4e')]['id'];csv_results=[];return db[_0xb228('0x6a')][_0xb228('0x40')]({'attributes':['id',_0xb228('0x2a')],'raw':!![],'order':[_0xb228('0x6b')]})[_0xb228('0x24')](function(_0x3be31f){_0x1fc730=_0x3be31f;var _0x3d9044=_[_0xb228('0x30')](db['CmContact'][_0xb228('0x42')]);return db[_0xb228('0x63')][_0xb228('0x40')]({'raw':!![],'attributes':['id','alias']})[_0xb228('0x24')](function(_0x448c1a){_0x242e43=_0x448c1a;var _0x5b45e6=squel[_0xb228('0x6c')]()[_0xb228('0x34')](_0x3d9044)[_0xb228('0x6d')]('cm_contacts','c')[_0xb228('0x36')](_0xb228('0x6e'),_0x13ed17)['where'](_0xb228('0x6f'))['distinct']();for(var _0x3c6eda=0x0;_0x3c6eda<_0x242e43[_0xb228('0x43')];_0x3c6eda++){_0x5b45e6['field']('c.cf_'+_0x242e43[_0x3c6eda]['id'],_0xb228('0x70')+_0x242e43[_0x3c6eda][_0xb228('0x71')]);}for(var _0x3c6eda=0x0;_0x3c6eda<_0x1fc730['length'];_0x3c6eda++){_0x5b45e6[_0xb228('0x72')](squel[_0xb228('0x6c')]()[_0xb228('0x72')](_0xb228('0x73'))[_0xb228('0x6d')](_0xb228('0x74'))[_0xb228('0x36')](_0xb228('0x75'),_0x1fc730[_0x3c6eda]['id'])[_0xb228('0x36')](_0xb228('0x76')),_0xb228('0x77')+_0x1fc730[_0x3c6eda][_0xb228('0x2a')]);_0x5b45e6[_0xb228('0x72')](squel[_0xb228('0x6c')]()['field']('description')[_0xb228('0x6d')](_0xb228('0x74'))['where'](_0xb228('0x75'),_0x1fc730[_0x3c6eda]['id'])['where'](_0xb228('0x76')),_0xb228('0x78')+_0x1fc730[_0x3c6eda][_0xb228('0x2a')]);}var _0x8f56e6=[];_0x8f56e6['push'](_0x5b45e6['toString']());BPromise[_0xb228('0x79')](_0x8f56e6,handleQuery)['then'](function(_0x4c9d57){handleQuery(_0x5b45e6['toString']());var _0x1492f4=csv_results[0x0];if(!_['isEmpty'](_0x1492f4)){var _0x4d90fb=toCsv(_0x1492f4);var _0x27360c=Date[_0xb228('0x7a')]();fs[_0xb228('0x7b')](util[_0xb228('0x7c')](_0xb228('0x7d'),_0x13ed17,_0x27360c),_0x4d90fb);_0x42a1ae[_0xb228('0x7e')]('Content-disposition','attachment;\x20filename='+util[_0xb228('0x7c')]('list_%d_%s.csv',_0x13ed17,_0x27360c));_0x42a1ae[_0xb228('0x7e')](_0xb228('0x7f'),_0xb228('0x80'));return _0x42a1ae[_0xb228('0x81')](util['format'](_0xb228('0x7d'),_0x13ed17,_0x27360c));}else{return _0x42a1ae[_0xb228('0x19')](0xcc);}});});});};exports['addCustomField']=function(_0x59d232,_0x881e52,_0x14b146){var _0x4d5814;delete _0x59d232[_0xb228('0x47')]['id'];return db[_0xb228('0x3d')]['findOne']({'where':{'id':_0x59d232['params']['id']}})[_0xb228('0x24')](handleEntityNotFound(_0x881e52,null))[_0xb228('0x24')](function(_0x53ba46){if(_0x53ba46){return db[_0xb228('0x82')][_0xb228('0x83')](function(_0x40c4be){return db[_0xb228('0x63')][_0xb228('0x46')](_0x59d232[_0xb228('0x47')],{'transaction':_0x40c4be})[_0xb228('0x24')](function(_0x146407){_0x4d5814=_0x146407;return _0x53ba46[_0xb228('0x84')](_0x146407,{'transaction':_0x40c4be});})['then'](function(){var _0x3af47e={'type':db[_0xb228('0x85')][_0xb228('0x86')],'transaction':_0x40c4be};switch(_0x59d232[_0xb228('0x47')][_0xb228('0x2c')]){case _0xb228('0x87'):_0x3af47e[_0xb228('0x2c')]=db[_0xb228('0x85')][_0xb228('0x86')];break;case _0xb228('0x88'):_0x3af47e['type']=db[_0xb228('0x85')][_0xb228('0x89')];break;case'switch':_0x3af47e[_0xb228('0x2c')]=db['Sequelize']['BOOLEAN'];_0x3af47e['defaultValue']=![];break;default:}return db[_0xb228('0x82')][_0xb228('0x8a')][_0xb228('0x8b')]('cm_contacts',util[_0xb228('0x7c')](_0xb228('0x8c'),_0x4d5814['id']),_0x3af47e);})['then'](function(){return _0x4d5814;});});}})[_0xb228('0x24')](respondWithResult(_0x881e52,null))[_0xb228('0x45')](handleError(_0x881e52,null));};exports[_0xb228('0x8d')]=function(_0x417ba0,_0x33dcdf,_0x15844f){var _0x4da042={};var _0x3257c8={};var _0x8908dc;var _0x26d412;return db[_0xb228('0x3d')][_0xb228('0x53')]({'where':{'id':_0x417ba0[_0xb228('0x4e')]['id']}})['then'](handleEntityNotFound(_0x33dcdf,null))[_0xb228('0x24')](function(_0x4fed16){if(_0x4fed16){_0x8908dc=_0x4fed16;_0x3257c8[_0xb228('0x2e')]=_[_0xb228('0x30')](db['CmCustomField']['rawAttributes']);_0x3257c8[_0xb228('0x2f')]=_[_0xb228('0x30')](_0x417ba0[_0xb228('0x2f')]);_0x3257c8[_0xb228('0x31')]=_[_0xb228('0x32')](_0x3257c8[_0xb228('0x2e')],_0x3257c8[_0xb228('0x2f')]);_0x4da042[_0xb228('0x33')]=_[_0xb228('0x32')](_0x3257c8[_0xb228('0x2e')],qs[_0xb228('0x34')](_0x417ba0[_0xb228('0x2f')][_0xb228('0x34')]));_0x4da042[_0xb228('0x33')]=_0x4da042[_0xb228('0x33')][_0xb228('0x43')]?_0x4da042[_0xb228('0x33')]:_0x3257c8[_0xb228('0x2e')];_0x4da042[_0xb228('0x55')]=qs[_0xb228('0x35')](_0x417ba0[_0xb228('0x2f')][_0xb228('0x35')]);_0x4da042[_0xb228('0x36')]=qs['filters'](_[_0xb228('0x37')](_0x417ba0['query'],_0x3257c8[_0xb228('0x31')]));_0x4da042[_0xb228('0x36')]=_[_0xb228('0x39')](_0x4da042[_0xb228('0x36')],{'$or':[{'ListId':_0x4fed16['id']},{'ListId':null}]});if(_0x417ba0[_0xb228('0x2f')][_0xb228('0x38')]){_0x4da042[_0xb228('0x36')]=_[_0xb228('0x39')](_0x4da042[_0xb228('0x36')],{'$or':_[_0xb228('0x3a')](_0x4da042['attributes'],function(_0x26cb4c){var _0xc43023={};_0xc43023[_0x26cb4c]={'$like':'%'+_0x417ba0[_0xb228('0x2f')][_0xb228('0x38')]+'%'};return _0xc43023;})});}_0x4da042=_['merge']({},_0x4da042,_0x417ba0['options']);return db[_0xb228('0x63')][_0xb228('0x8e')](_0x4da042);}})[_0xb228('0x24')](respondWithResult(_0x33dcdf,null))[_0xb228('0x45')](handleError(_0x33dcdf,null));};exports[_0xb228('0x8f')]=function(_0x15e9d5,_0x46ebf3){return db[_0xb228('0x63')][_0xb228('0x8e')]({'where':{'ListId':null}})[_0xb228('0x24')](handleEntityNotFound(_0x46ebf3,null))[_0xb228('0x24')](function(_0x36ed24){return _0x36ed24;})[_0xb228('0x24')](respondWithResult(_0x46ebf3,null))[_0xb228('0x45')](handleError(_0x46ebf3,null));};exports[_0xb228('0x90')]=function(_0x191a94,_0x32de09,_0x10e3a5){return db[_0xb228('0x3d')][_0xb228('0x44')]({'where':{'id':_0x191a94['params']['id']}})[_0xb228('0x24')](handleEntityNotFound(_0x32de09,null))[_0xb228('0x24')](function(_0x35a3c7){if(_0x35a3c7){return _0x35a3c7[_0xb228('0x90')](_0x191a94[_0xb228('0x47')]['ids'],_['omit'](_0x191a94[_0xb228('0x47')],['ids','id'])||{})[_0xb228('0x91')](function(_0x5ad18d){for(var _0x5e1447=0x0;_0x5e1447<_0x191a94[_0xb228('0x47')][_0xb228('0x58')]['length'];_0x5e1447+=0x1){socket['emit'](_0xb228('0x92'),{'UserId':Number(_0x191a94[_0xb228('0x47')]['ids'][_0x5e1447]),'CmListId':Number(_0x191a94[_0xb228('0x4e')]['id'])});}return _0x5ad18d;});}})[_0xb228('0x24')](respondWithResult(_0x32de09,null))['catch'](handleError(_0x32de09,null));};exports[_0xb228('0x93')]=function(_0x4291c1,_0x52c08b,_0x460dd4){return db['CmList'][_0xb228('0x44')]({'where':{'id':_0x4291c1[_0xb228('0x4e')]['id']}})[_0xb228('0x24')](handleEntityNotFound(_0x52c08b,null))['then'](function(_0xdf0499){if(_0xdf0499){return _0xdf0499[_0xb228('0x93')](_0x4291c1['query'][_0xb228('0x58')])[_0xb228('0x24')](function(){if(_[_0xb228('0x5c')](_0x4291c1[_0xb228('0x2f')][_0xb228('0x58')])){for(var _0xcab883=0x0;_0xcab883<_0x4291c1[_0xb228('0x2f')][_0xb228('0x58')][_0xb228('0x43')];_0xcab883+=0x1){socket[_0xb228('0x94')](_0xb228('0x95'),{'UserId':Number(_0x4291c1['query'][_0xb228('0x58')][_0xcab883]),'CmListId':Number(_0x4291c1[_0xb228('0x4e')]['id'])});}}else{socket[_0xb228('0x94')](_0xb228('0x95'),{'UserId':Number(_0x4291c1[_0xb228('0x2f')][_0xb228('0x58')]),'CmListId':Number(_0x4291c1[_0xb228('0x4e')]['id'])});}});}})[_0xb228('0x24')](respondWithStatusCode(_0x52c08b,null))['catch'](handleError(_0x52c08b,null));};exports['getAgents']=function(_0x5bd822,_0x4dc50e,_0x1f9796){var _0x5e1be6={};var _0x36c88c={};var _0x50d718;var _0xe5265e;return db['CmList'][_0xb228('0x53')]({'where':{'id':_0x5bd822['params']['id']}})[_0xb228('0x24')](handleEntityNotFound(_0x4dc50e,null))[_0xb228('0x24')](function(_0xc0cc45){if(_0xc0cc45){_0x50d718=_0xc0cc45;_0x36c88c[_0xb228('0x2e')]=_[_0xb228('0x30')](db['User'][_0xb228('0x42')]);_0x36c88c[_0xb228('0x2f')]=_[_0xb228('0x30')](_0x5bd822['query']);_0x36c88c[_0xb228('0x31')]=_[_0xb228('0x32')](_0x36c88c[_0xb228('0x2e')],_0x36c88c['query']);_0x5e1be6['attributes']=_[_0xb228('0x32')](_0x36c88c[_0xb228('0x2e')],qs[_0xb228('0x34')](_0x5bd822[_0xb228('0x2f')]['fields']));_0x5e1be6['attributes']=_0x5e1be6[_0xb228('0x33')][_0xb228('0x43')]?_0x5e1be6[_0xb228('0x33')]:_0x36c88c[_0xb228('0x2e')];_0x5e1be6[_0xb228('0x55')]=qs[_0xb228('0x35')](_0x5bd822[_0xb228('0x2f')][_0xb228('0x35')]);_0x5e1be6[_0xb228('0x36')]=qs[_0xb228('0x31')](_[_0xb228('0x37')](_0x5bd822[_0xb228('0x2f')],_0x36c88c[_0xb228('0x31')]));if(_0x5bd822[_0xb228('0x2f')][_0xb228('0x38')]){_0x5e1be6[_0xb228('0x36')]=_[_0xb228('0x39')](_0x5e1be6[_0xb228('0x36')],{'$or':_[_0xb228('0x3a')](_0x5e1be6[_0xb228('0x33')],function(_0xf77e24){var _0x40a7ef={};_0x40a7ef[_0xf77e24]={'$like':'%'+_0x5bd822[_0xb228('0x2f')][_0xb228('0x38')]+'%'};return _0x40a7ef;})});}_0x5e1be6=_[_0xb228('0x39')]({},_0x5e1be6,_0x5bd822['options']);return _0x50d718[_0xb228('0x96')](_0x5e1be6);}})[_0xb228('0x24')](function(_0xb4c75d){if(_0xb4c75d){_0xe5265e=_0xb4c75d[_0xb228('0x43')];if(!_0x5bd822[_0xb228('0x2f')][_0xb228('0x67')](_0xb228('0x54'))){_0x5e1be6[_0xb228('0x20')]=qs['limit'](_0x5bd822['query'][_0xb228('0x20')]);_0x5e1be6[_0xb228('0x1f')]=qs[_0xb228('0x1f')](_0x5bd822[_0xb228('0x2f')][_0xb228('0x1f')]);}return _0x50d718['getAgents'](_0x5e1be6);}})[_0xb228('0x24')](function(_0x2615b6){if(_0x2615b6){return _0x2615b6?{'count':_0xe5265e,'rows':_0x2615b6}:null;}})[_0xb228('0x24')](respondWithResult(_0x4dc50e,null))['catch'](handleError(_0x4dc50e,null));};function handleQuery(_0x136a16){logger['info'](_0x136a16);return db['sequelize']['query'](_0x136a16)[_0xb228('0x91')](function(_0xb1b2d4){csv_results['push'](_0xb1b2d4);})['catch'](function(_0x1b430a){logger[_0xb228('0x97')](_0x1b430a[_0xb228('0x61')]);});}
\ No newline at end of file
index 5f6f43c..fe3dcd5 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(_0x2f1753,_0x458f6d){var _0x56a164=function(_0x1e36dd){while(--_0x1e36dd){_0x2f1753['push'](_0x2f1753['shift']());}};_0x56a164(++_0x458f6d);}(_0x9957,0x93));var _0x7995=function(_0x6131cd,_0x4c26a1){_0x6131cd=_0x6131cd-0x0;var _0x47e916=_0x9957[_0x6131cd];return _0x47e916;};'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 _0x3e74=['hasOwnProperty','exports','events','CmList','setMaxListeners','save','emit'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x3e74,0x175));var _0x43e7=function(_0x1bea7e,_0x3174ee){_0x1bea7e=_0x1bea7e-0x0;var _0x2b9a99=_0x3e74[_0x1bea7e];return _0x2b9a99;};'use strict';var EventEmitter=require(_0x43e7('0x0'));var CmList=require('../../mysqldb')['db'][_0x43e7('0x1')];var CmListEvents=new EventEmitter();CmListEvents[_0x43e7('0x2')](0x0);var events={'afterCreate':_0x43e7('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0xc58479){return function(_0x4f9bbe,_0x128b0f,_0xe838b4){CmListEvents[_0x43e7('0x4')](_0xc58479+':'+_0x4f9bbe['id'],_0x4f9bbe);CmListEvents[_0x43e7('0x4')](_0xc58479,_0x4f9bbe);_0xe838b4(null);};}for(var e in events){if(events[_0x43e7('0x5')](e)){var event=events[e];CmList['hook'](e,emitEvent(event));}}module[_0x43e7('0x6')]=CmListEvents;
\ No newline at end of file
index 31707a1..5e2919c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfd28=['rimraf','./cmList.attributes','exports','define','util','../../config/logger','moment','request-promise','path'];(function(_0x241858,_0x2ea379){var _0x4c0761=function(_0x63f6fd){while(--_0x63f6fd){_0x241858['push'](_0x241858['shift']());}};_0x4c0761(++_0x2ea379);}(_0xfd28,0x148));var _0x8fd2=function(_0x30182f,_0x30ce41){_0x30182f=_0x30182f-0x0;var _0x5207db=_0xfd28[_0x30182f];return _0x5207db;};'use strict';var _=require('lodash');var util=require(_0x8fd2('0x0'));var logger=require(_0x8fd2('0x1'))('api');var moment=require(_0x8fd2('0x2'));var BPromise=require('bluebird');var rp=require(_0x8fd2('0x3'));var fs=require('fs');var path=require(_0x8fd2('0x4'));var rimraf=require(_0x8fd2('0x5'));var config=require('../../config/environment');var attributes=require(_0x8fd2('0x6'));module[_0x8fd2('0x7')]=function(_0x2ee87e,_0x36178a){return _0x2ee87e[_0x8fd2('0x8')]('CmList',attributes,{'tableName':'cm_lists','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6f0d=['./cmList.attributes','define','CmList','cm_lists','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment'];(function(_0x20a558,_0x160e0e){var _0x53d3f7=function(_0x259bd8){while(--_0x259bd8){_0x20a558['push'](_0x20a558['shift']());}};_0x53d3f7(++_0x160e0e);}(_0x6f0d,0x16c));var _0xd6f0=function(_0x1051fa,_0xfc729d){_0x1051fa=_0x1051fa-0x0;var _0x3c2251=_0x6f0d[_0x1051fa];return _0x3c2251;};'use strict';var _=require('lodash');var util=require(_0xd6f0('0x0'));var logger=require(_0xd6f0('0x1'))(_0xd6f0('0x2'));var moment=require(_0xd6f0('0x3'));var BPromise=require('bluebird');var rp=require(_0xd6f0('0x4'));var fs=require('fs');var path=require(_0xd6f0('0x5'));var rimraf=require(_0xd6f0('0x6'));var config=require(_0xd6f0('0x7'));var attributes=require(_0xd6f0('0x8'));module['exports']=function(_0x2d2ce6,_0x4a8b0c){return _0x2d2ce6[_0xd6f0('0x9')](_0xd6f0('0xa'),attributes,{'tableName':_0xd6f0('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index fce9bbf..1c818c9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x13bb=['request\x20sent','debug','CmList,\x20%s,\x20%s,\x20%s','error','message','info','result','catch','lodash','util','bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./cmList.socket','then','CmList,\x20%s,\x20%s'];(function(_0x2c8534,_0x18d56b){var _0x58a2c6=function(_0xcbd162){while(--_0xcbd162){_0x2c8534['push'](_0x2c8534['shift']());}};_0x58a2c6(++_0x18d56b);}(_0x13bb,0x1e3));var _0xb13b=function(_0x486e56,_0x39eff8){_0x486e56=_0x486e56-0x0;var _0x489279=_0x13bb[_0x486e56];return _0x489279;};'use strict';var _=require(_0xb13b('0x0'));var util=require(_0xb13b('0x1'));var moment=require('moment');var BPromise=require(_0xb13b('0x2'));var rs=require(_0xb13b('0x3'));var fs=require('fs');var Redis=require(_0xb13b('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xb13b('0x5'))(_0xb13b('0x6'));var config=require(_0xb13b('0x7'));var jayson=require(_0xb13b('0x8'));var client=jayson['client'][_0xb13b('0x9')]({'port':0x232a});config[_0xb13b('0xa')]=_[_0xb13b('0xb')](config[_0xb13b('0xa')],{'host':_0xb13b('0xc'),'port':0x18eb});var socket=require(_0xb13b('0xd'))(new Redis(config[_0xb13b('0xa')]));require(_0xb13b('0xe'))['register'](socket);function respondWithRpcPromise(_0x46d423,_0x885cdb,_0x4df6f5){return new BPromise(function(_0x5eec6c,_0x1fb6af){return client['request'](_0x46d423,_0x4df6f5)[_0xb13b('0xf')](function(_0x28a985){logger['info'](_0xb13b('0x10'),_0x885cdb,_0xb13b('0x11'));logger[_0xb13b('0x12')](_0xb13b('0x13'),_0x885cdb,_0xb13b('0x11'),JSON['stringify'](_0x28a985));if(_0x28a985[_0xb13b('0x14')]){if(_0x28a985[_0xb13b('0x14')]['code']===0x1f4){logger['error'](_0xb13b('0x10'),_0x885cdb,_0x28a985[_0xb13b('0x14')][_0xb13b('0x15')]);return _0x1fb6af(_0x28a985[_0xb13b('0x14')]['message']);}logger[_0xb13b('0x14')](_0xb13b('0x10'),_0x885cdb,_0x28a985[_0xb13b('0x14')]['message']);return _0x5eec6c(_0x28a985[_0xb13b('0x14')]['message']);}else{logger[_0xb13b('0x16')](_0xb13b('0x10'),_0x885cdb,_0xb13b('0x11'));_0x5eec6c(_0x28a985[_0xb13b('0x17')][_0xb13b('0x15')]);}})[_0xb13b('0x18')](function(_0x15e26e){logger[_0xb13b('0x14')](_0xb13b('0x10'),_0x885cdb,_0x15e26e);_0x1fb6af(_0x15e26e);});});}
\ No newline at end of file
+var _0x96ec=['stringify','error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter','register','info','CmList,\x20%s,\x20%s','request\x20sent','debug','CmList,\x20%s,\x20%s,\x20%s'];(function(_0x4ea413,_0x51ff3a){var _0x51cf25=function(_0x3c6456){while(--_0x3c6456){_0x4ea413['push'](_0x4ea413['shift']());}};_0x51cf25(++_0x51ff3a);}(_0x96ec,0xae));var _0xc96e=function(_0x584291,_0x24b5b3){_0x584291=_0x584291-0x0;var _0x4e7d08=_0x96ec[_0x584291];return _0x4e7d08;};'use strict';var _=require(_0xc96e('0x0'));var util=require('util');var moment=require(_0xc96e('0x1'));var BPromise=require(_0xc96e('0x2'));var rs=require(_0xc96e('0x3'));var fs=require('fs');var Redis=require(_0xc96e('0x4'));var db=require(_0xc96e('0x5'))['db'];var utils=require(_0xc96e('0x6'));var logger=require(_0xc96e('0x7'))(_0xc96e('0x8'));var config=require(_0xc96e('0x9'));var jayson=require(_0xc96e('0xa'));var client=jayson[_0xc96e('0xb')][_0xc96e('0xc')]({'port':0x232a});config['redis']=_['defaults'](config[_0xc96e('0xd')],{'host':_0xc96e('0xe'),'port':0x18eb});var socket=require(_0xc96e('0xf'))(new Redis(config[_0xc96e('0xd')]));require('./cmList.socket')[_0xc96e('0x10')](socket);function respondWithRpcPromise(_0x5e84e0,_0x394f63,_0x289263){return new BPromise(function(_0x57af06,_0x3fb550){return client['request'](_0x5e84e0,_0x289263)['then'](function(_0x134c5d){logger[_0xc96e('0x11')](_0xc96e('0x12'),_0x394f63,_0xc96e('0x13'));logger[_0xc96e('0x14')](_0xc96e('0x15'),_0x394f63,_0xc96e('0x13'),JSON[_0xc96e('0x16')](_0x134c5d));if(_0x134c5d[_0xc96e('0x17')]){if(_0x134c5d[_0xc96e('0x17')][_0xc96e('0x18')]===0x1f4){logger[_0xc96e('0x17')](_0xc96e('0x12'),_0x394f63,_0x134c5d['error']['message']);return _0x3fb550(_0x134c5d[_0xc96e('0x17')][_0xc96e('0x19')]);}logger[_0xc96e('0x17')](_0xc96e('0x12'),_0x394f63,_0x134c5d[_0xc96e('0x17')]['message']);return _0x57af06(_0x134c5d[_0xc96e('0x17')]['message']);}else{logger[_0xc96e('0x11')]('CmList,\x20%s,\x20%s',_0x394f63,_0xc96e('0x13'));_0x57af06(_0x134c5d[_0xc96e('0x1a')][_0xc96e('0x19')]);}})[_0xc96e('0x1b')](function(_0x5e5cff){logger[_0xc96e('0x17')](_0xc96e('0x12'),_0x394f63,_0x5e5cff);_0x3fb550(_0x5e5cff);});});}
\ No newline at end of file
index 7fa169f..62662a1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd3dd=['removeListener','length','./cmList.events','save','update'];(function(_0x421725,_0x318a04){var _0x51b322=function(_0xe58018){while(--_0xe58018){_0x421725['push'](_0x421725['shift']());}};_0x51b322(++_0x318a04);}(_0xd3dd,0x1ba));var _0xdd3d=function(_0xa2b6e2,_0x25629d){_0xa2b6e2=_0xa2b6e2-0x0;var _0x43594a=_0xd3dd[_0xa2b6e2];return _0x43594a;};'use strict';var CmListEvents=require(_0xdd3d('0x0'));var events=[_0xdd3d('0x1'),'remove',_0xdd3d('0x2')];function createListener(_0x5153bf,_0x28622e){return function(_0x4b3e32){_0x28622e['emit'](_0x5153bf,_0x4b3e32);};}function removeListener(_0x5489e1,_0x440546){return function(){CmListEvents[_0xdd3d('0x3')](_0x5489e1,_0x440546);};}exports['register']=function(_0x306e7b){for(var _0x46d378=0x0,_0x5c2235=events[_0xdd3d('0x4')];_0x46d378<_0x5c2235;_0x46d378++){var _0x3a6a1f=events[_0x46d378];var _0x173f6c=createListener('cmList:'+_0x3a6a1f,_0x306e7b);CmListEvents['on'](_0x3a6a1f,_0x173f6c);}};
\ No newline at end of file
+var _0x48ce=['register','cmList:','./cmList.events','remove','emit','removeListener'];(function(_0x459e70,_0x25395e){var _0x56eac6=function(_0x367bf1){while(--_0x367bf1){_0x459e70['push'](_0x459e70['shift']());}};_0x56eac6(++_0x25395e);}(_0x48ce,0x10a));var _0xe48c=function(_0x24018e,_0x598a38){_0x24018e=_0x24018e-0x0;var _0xe10f63=_0x48ce[_0x24018e];return _0xe10f63;};'use strict';var CmListEvents=require(_0xe48c('0x0'));var events=['save',_0xe48c('0x1'),'update'];function createListener(_0x4f852f,_0x207a9f){return function(_0x536614){_0x207a9f[_0xe48c('0x2')](_0x4f852f,_0x536614);};}function removeListener(_0x5586fe,_0x3bbc06){return function(){CmListEvents[_0xe48c('0x3')](_0x5586fe,_0x3bbc06);};}exports[_0xe48c('0x4')]=function(_0x283037){for(var _0x3fc778=0x0,_0x3e34ea=events['length'];_0x3fc778<_0x3e34ea;_0x3fc778++){var _0x2cff88=events[_0x3fc778];var _0x28ee95=createListener(_0xe48c('0x5')+_0x2cff88,_0x283037);CmListEvents['on'](_0x2cff88,_0x28ee95);}};
\ No newline at end of file
index f5d4b1e..e04ccfe 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x88e9=['/:id/fields','getCustomFields','/:id/users','post','addDisposition','addContacts','addCustomField','addAgents','put','update','delete','destroy','removeDispositions','removeAgents','exports','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./cmList.controller','get','isAuthenticated','/describe','describe','/global_fields','getGlobalCustomFields','/:id','show','/:id/dispositions','/:id/contacts','/:id/contacts/csv','getContactsCsv'];(function(_0x2d6141,_0x189922){var _0xbc02da=function(_0x1d7ddb){while(--_0x1d7ddb){_0x2d6141['push'](_0x2d6141['shift']());}};_0xbc02da(++_0x189922);}(_0x88e9,0x141));var _0x988e=function(_0x593eca,_0x5733e7){_0x593eca=_0x593eca-0x0;var _0x5aa415=_0x88e9[_0x593eca];return _0x5aa415;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x988e('0x0'));var timeout=require(_0x988e('0x1'));var express=require(_0x988e('0x2'));var router=express[_0x988e('0x3')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x988e('0x4'));var config=require(_0x988e('0x5'));var controller=require(_0x988e('0x6'));router[_0x988e('0x7')]('/',auth[_0x988e('0x8')](),controller['index']);router['get'](_0x988e('0x9'),auth[_0x988e('0x8')](),controller[_0x988e('0xa')]);router[_0x988e('0x7')](_0x988e('0xb'),auth[_0x988e('0x8')](),controller[_0x988e('0xc')]);router[_0x988e('0x7')](_0x988e('0xd'),auth[_0x988e('0x8')](),controller[_0x988e('0xe')]);router[_0x988e('0x7')](_0x988e('0xf'),auth['isAuthenticated'](),controller['getDispositions']);router[_0x988e('0x7')](_0x988e('0x10'),auth[_0x988e('0x8')](),controller['getContacts']);router[_0x988e('0x7')](_0x988e('0x11'),auth['isAuthenticated'](),controller[_0x988e('0x12')]);router[_0x988e('0x7')](_0x988e('0x13'),auth['isAuthenticated'](),controller[_0x988e('0x14')]);router[_0x988e('0x7')](_0x988e('0x15'),auth[_0x988e('0x8')](),controller['getAgents']);router[_0x988e('0x16')]('/',auth[_0x988e('0x8')](),controller['create']);router['post'](_0x988e('0xf'),auth['isAuthenticated'](),controller[_0x988e('0x17')]);router[_0x988e('0x16')](_0x988e('0x10'),auth[_0x988e('0x8')](),controller[_0x988e('0x18')]);router['post'](_0x988e('0x13'),auth[_0x988e('0x8')](),controller[_0x988e('0x19')]);router[_0x988e('0x16')](_0x988e('0x15'),auth[_0x988e('0x8')](),controller[_0x988e('0x1a')]);router[_0x988e('0x1b')](_0x988e('0xd'),auth[_0x988e('0x8')](),controller[_0x988e('0x1c')]);router[_0x988e('0x1d')](_0x988e('0xd'),auth['isAuthenticated'](),controller[_0x988e('0x1e')]);router[_0x988e('0x1d')](_0x988e('0xf'),auth[_0x988e('0x8')](),controller[_0x988e('0x1f')]);router[_0x988e('0x1d')](_0x988e('0x15'),auth[_0x988e('0x8')](),controller[_0x988e('0x20')]);module[_0x988e('0x21')]=router;
\ No newline at end of file
+var _0xa567=['exports','path','connect-timeout','express','../../components/interaction/service','../../config/environment','get','index','/describe','isAuthenticated','describe','/global_fields','show','/:id/dispositions','/:id/contacts/csv','getContactsCsv','/:id/fields','getCustomFields','post','/:id/contacts','addCustomField','/:id/users','addAgents','/:id','delete','destroy','removeDispositions','removeAgents'];(function(_0x468d3d,_0x37db09){var _0x522534=function(_0x27c4cd){while(--_0x27c4cd){_0x468d3d['push'](_0x468d3d['shift']());}};_0x522534(++_0x37db09);}(_0xa567,0x119));var _0x7a56=function(_0x2525f7,_0x1e59cf){_0x2525f7=_0x2525f7-0x0;var _0x5a1e0d=_0xa567[_0x2525f7];return _0x5a1e0d;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x7a56('0x0'));var timeout=require(_0x7a56('0x1'));var express=require(_0x7a56('0x2'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x7a56('0x3'));var config=require(_0x7a56('0x4'));var controller=require('./cmList.controller');router[_0x7a56('0x5')]('/',auth['isAuthenticated'](),controller[_0x7a56('0x6')]);router['get'](_0x7a56('0x7'),auth[_0x7a56('0x8')](),controller[_0x7a56('0x9')]);router[_0x7a56('0x5')](_0x7a56('0xa'),auth[_0x7a56('0x8')](),controller['getGlobalCustomFields']);router[_0x7a56('0x5')]('/:id',auth[_0x7a56('0x8')](),controller[_0x7a56('0xb')]);router[_0x7a56('0x5')](_0x7a56('0xc'),auth[_0x7a56('0x8')](),controller['getDispositions']);router[_0x7a56('0x5')]('/:id/contacts',auth['isAuthenticated'](),controller['getContacts']);router['get'](_0x7a56('0xd'),auth[_0x7a56('0x8')](),controller[_0x7a56('0xe')]);router[_0x7a56('0x5')](_0x7a56('0xf'),auth[_0x7a56('0x8')](),controller[_0x7a56('0x10')]);router[_0x7a56('0x5')]('/:id/users',auth['isAuthenticated'](),controller['getAgents']);router['post']('/',auth[_0x7a56('0x8')](),controller['create']);router[_0x7a56('0x11')](_0x7a56('0xc'),auth['isAuthenticated'](),controller['addDisposition']);router[_0x7a56('0x11')](_0x7a56('0x12'),auth[_0x7a56('0x8')](),controller['addContacts']);router['post'](_0x7a56('0xf'),auth[_0x7a56('0x8')](),controller[_0x7a56('0x13')]);router['post'](_0x7a56('0x14'),auth[_0x7a56('0x8')](),controller[_0x7a56('0x15')]);router['put'](_0x7a56('0x16'),auth[_0x7a56('0x8')](),controller['update']);router[_0x7a56('0x17')](_0x7a56('0x16'),auth[_0x7a56('0x8')](),controller[_0x7a56('0x18')]);router['delete'](_0x7a56('0xc'),auth[_0x7a56('0x8')](),controller[_0x7a56('0x19')]);router[_0x7a56('0x17')](_0x7a56('0x14'),auth[_0x7a56('0x8')](),controller[_0x7a56('0x1a')]);module[_0x7a56('0x1b')]=router;
\ No newline at end of file
index c9a9a0a..3c164a7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x42f3=['VIRTUAL','field','STRING','sequelize','exports'];(function(_0x28258a,_0x22f398){var _0x4e968e=function(_0xda8c73){while(--_0xda8c73){_0x28258a['push'](_0x28258a['shift']());}};_0x4e968e(++_0x22f398);}(_0x42f3,0x1a2));var _0x342f=function(_0x5c6ceb,_0x4ed099){_0x5c6ceb=_0x5c6ceb-0x0;var _0x28821b=_0x42f3[_0x5c6ceb];return _0x28821b;};'use strict';var Sequelize=require(_0x342f('0x0'));module[_0x342f('0x1')]={'name':{'type':Sequelize[_0x342f('0x2')],'get':function(_0x5dde8f){return this['getDataValue'](_0x342f('0x3'));}},'field':{'type':Sequelize[_0x342f('0x4')],'allowNull':![]},'operator':{'type':Sequelize[_0x342f('0x4')],'allowNull':![]},'value':{'type':Sequelize['STRING'],'allowNull':![]}};
\ No newline at end of file
+var _0x788e=['sequelize','exports','VIRTUAL','getDataValue','STRING'];(function(_0x19c240,_0x4b71cc){var _0xa6595b=function(_0x59a309){while(--_0x59a309){_0x19c240['push'](_0x19c240['shift']());}};_0xa6595b(++_0x4b71cc);}(_0x788e,0x87));var _0xe788=function(_0x5abbf4,_0x5536cb){_0x5abbf4=_0x5abbf4-0x0;var _0x4768b7=_0x788e[_0x5abbf4];return _0x4768b7;};'use strict';var Sequelize=require(_0xe788('0x0'));module[_0xe788('0x1')]={'name':{'type':Sequelize[_0xe788('0x2')],'get':function(_0x4dd13e){return this[_0xe788('0x3')]('field');}},'field':{'type':Sequelize[_0xe788('0x4')],'allowNull':![]},'operator':{'type':Sequelize[_0xe788('0x4')],'allowNull':![]},'value':{'type':Sequelize[_0xe788('0x4')],'allowNull':![]}};
\ No newline at end of file
index 1d6504e..7760c7b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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(_0x524a45,_0xc5493a){var _0x5bd1d4=function(_0x5f56ef){while(--_0x5f56ef){_0x524a45['push'](_0x524a45['shift']());}};_0x5bd1d4(++_0xc5493a);}(_0x7a54,0x106));var _0x47a5=function(_0xce3844,_0x35966a){_0xce3844=_0xce3844-0x0;var _0x5a2cc7=_0x7a54[_0xce3844];return _0x5a2cc7;};'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
+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(_0x30578d,_0x1d8f12){var _0x553fee=function(_0xa3c14e){while(--_0xa3c14e){_0x30578d['push'](_0x30578d['shift']());}};_0x553fee(++_0x1d8f12);}(_0x7a54,0x106));var _0x47a5=function(_0x3881f3,_0x156233){_0x3881f3=_0x3881f3-0x0;var _0x306c82=_0x7a54[_0x3881f3];return _0x306c82;};'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 dea577f..8098096 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcac2=['rimraf','../../config/environment','./condition.attributes','define','tools_conditions','lodash','util','../../config/logger','moment','bluebird','request-promise','path'];(function(_0x3a05a6,_0x5a2916){var _0x55a922=function(_0x333dd2){while(--_0x333dd2){_0x3a05a6['push'](_0x3a05a6['shift']());}};_0x55a922(++_0x5a2916);}(_0xcac2,0x16d));var _0x2cac=function(_0x1d7d16,_0x141a09){_0x1d7d16=_0x1d7d16-0x0;var _0x1f7da4=_0xcac2[_0x1d7d16];return _0x1f7da4;};'use strict';var _=require(_0x2cac('0x0'));var util=require(_0x2cac('0x1'));var logger=require(_0x2cac('0x2'))('api');var moment=require(_0x2cac('0x3'));var BPromise=require(_0x2cac('0x4'));var rp=require(_0x2cac('0x5'));var fs=require('fs');var path=require(_0x2cac('0x6'));var rimraf=require(_0x2cac('0x7'));var config=require(_0x2cac('0x8'));var attributes=require(_0x2cac('0x9'));module['exports']=function(_0x27df6a,_0x3b7ea5){return _0x27df6a[_0x2cac('0xa')]('Condition',attributes,{'tableName':_0x2cac('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x01b5=['path','rimraf','../../config/environment','exports','define','Condition','tools_conditions','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x5b4b5d,_0x4e0e39){var _0x33c48a=function(_0x458bb9){while(--_0x458bb9){_0x5b4b5d['push'](_0x5b4b5d['shift']());}};_0x33c48a(++_0x4e0e39);}(_0x01b5,0x1f1));var _0x501b=function(_0x2bac49,_0x3ae389){_0x2bac49=_0x2bac49-0x0;var _0x183acc=_0x01b5[_0x2bac49];return _0x183acc;};'use strict';var _=require(_0x501b('0x0'));var util=require(_0x501b('0x1'));var logger=require(_0x501b('0x2'))(_0x501b('0x3'));var moment=require(_0x501b('0x4'));var BPromise=require(_0x501b('0x5'));var rp=require(_0x501b('0x6'));var fs=require('fs');var path=require(_0x501b('0x7'));var rimraf=require(_0x501b('0x8'));var config=require(_0x501b('0x9'));var attributes=require('./condition.attributes');module[_0x501b('0xa')]=function(_0x15e334,_0x1f3203){return _0x15e334[_0x501b('0xb')](_0x501b('0xc'),attributes,{'tableName':_0x501b('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index ffc192c..9450809 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4c70=['Condition,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util','moment','randomstring','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','Condition,\x20%s,\x20%s','debug'];(function(_0x172ed7,_0x3d08fd){var _0xfa8f61=function(_0xe07a21){while(--_0xe07a21){_0x172ed7['push'](_0x172ed7['shift']());}};_0xfa8f61(++_0x3d08fd);}(_0x4c70,0x11c));var _0x04c7=function(_0x68b90b,_0xb8b06a){_0x68b90b=_0x68b90b-0x0;var _0x5220ec=_0x4c70[_0x68b90b];return _0x5220ec;};'use strict';var _=require(_0x04c7('0x0'));var util=require(_0x04c7('0x1'));var moment=require(_0x04c7('0x2'));var BPromise=require('bluebird');var rs=require(_0x04c7('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x04c7('0x4'));var logger=require(_0x04c7('0x5'))('rpc');var config=require(_0x04c7('0x6'));var jayson=require(_0x04c7('0x7'));var client=jayson[_0x04c7('0x8')][_0x04c7('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x41ed5f,_0x268738,_0x347bcf){return new BPromise(function(_0x389010,_0x43c0d8){return client[_0x04c7('0xa')](_0x41ed5f,_0x347bcf)[_0x04c7('0xb')](function(_0x360c1b){logger[_0x04c7('0xc')](_0x04c7('0xd'),_0x268738,'request\x20sent');logger[_0x04c7('0xe')](_0x04c7('0xf'),_0x268738,_0x04c7('0x10'),JSON[_0x04c7('0x11')](_0x360c1b));if(_0x360c1b[_0x04c7('0x12')]){if(_0x360c1b[_0x04c7('0x12')][_0x04c7('0x13')]===0x1f4){logger['error'](_0x04c7('0xd'),_0x268738,_0x360c1b[_0x04c7('0x12')][_0x04c7('0x14')]);return _0x43c0d8(_0x360c1b[_0x04c7('0x12')]['message']);}logger[_0x04c7('0x12')](_0x04c7('0xd'),_0x268738,_0x360c1b['error']['message']);return _0x389010(_0x360c1b['error'][_0x04c7('0x14')]);}else{logger[_0x04c7('0xc')](_0x04c7('0xd'),_0x268738,_0x04c7('0x10'));_0x389010(_0x360c1b[_0x04c7('0x15')][_0x04c7('0x14')]);}})[_0x04c7('0x16')](function(_0x26bce5){logger[_0x04c7('0x12')](_0x04c7('0xd'),_0x268738,_0x26bce5);_0x43c0d8(_0x26bce5);});});}
\ No newline at end of file
+var _0x1229=['message','result','lodash','util','bluebird','ioredis','../../config/utils','rpc','jayson/promise','client','http','info','Condition,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x1229,0x16a));var _0x9122=function(_0x872b02,_0x4f4458){_0x872b02=_0x872b02-0x0;var _0x1a6b24=_0x1229[_0x872b02];return _0x1a6b24;};'use strict';var _=require(_0x9122('0x0'));var util=require(_0x9122('0x1'));var moment=require('moment');var BPromise=require(_0x9122('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9122('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x9122('0x4'));var logger=require('../../config/logger')(_0x9122('0x5'));var config=require('../../config/environment');var jayson=require(_0x9122('0x6'));var client=jayson[_0x9122('0x7')][_0x9122('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x48c3b3,_0x2df074,_0x177441){return new BPromise(function(_0x31603e,_0x4b8d8b){return client['request'](_0x48c3b3,_0x177441)['then'](function(_0x330ff6){logger[_0x9122('0x9')](_0x9122('0xa'),_0x2df074,_0x9122('0xb'));logger[_0x9122('0xc')]('Condition,\x20%s,\x20%s,\x20%s',_0x2df074,_0x9122('0xb'),JSON[_0x9122('0xd')](_0x330ff6));if(_0x330ff6[_0x9122('0xe')]){if(_0x330ff6[_0x9122('0xe')][_0x9122('0xf')]===0x1f4){logger[_0x9122('0xe')](_0x9122('0xa'),_0x2df074,_0x330ff6[_0x9122('0xe')][_0x9122('0x10')]);return _0x4b8d8b(_0x330ff6[_0x9122('0xe')][_0x9122('0x10')]);}logger[_0x9122('0xe')](_0x9122('0xa'),_0x2df074,_0x330ff6[_0x9122('0xe')][_0x9122('0x10')]);return _0x31603e(_0x330ff6[_0x9122('0xe')][_0x9122('0x10')]);}else{logger[_0x9122('0x9')](_0x9122('0xa'),_0x2df074,_0x9122('0xb'));_0x31603e(_0x330ff6[_0x9122('0x11')][_0x9122('0x10')]);}})['catch'](function(_0x452fcf){logger[_0x9122('0xe')](_0x9122('0xa'),_0x2df074,_0x452fcf);_0x4b8d8b(_0x452fcf);});});}
\ No newline at end of file
index 27746e1..3ed6e88 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaf10=['update','delete','destroy','exports','multer','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','/:id'];(function(_0x521b9e,_0x57c611){var _0x4d5275=function(_0x33de8a){while(--_0x33de8a){_0x521b9e['push'](_0x521b9e['shift']());}};_0x4d5275(++_0x57c611);}(_0xaf10,0x94));var _0x0af1=function(_0x36690b,_0x12e879){_0x36690b=_0x36690b-0x0;var _0x45d7dd=_0xaf10[_0x36690b];return _0x45d7dd;};'use strict';var multer=require(_0x0af1('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x0af1('0x1'));var express=require(_0x0af1('0x2'));var router=express[_0x0af1('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x0af1('0x4'));var interaction=require(_0x0af1('0x5'));var config=require(_0x0af1('0x6'));var controller=require('./condition.controller');router['put'](_0x0af1('0x7'),auth['isAuthenticated'](),controller[_0x0af1('0x8')]);router[_0x0af1('0x9')](_0x0af1('0x7'),auth['isAuthenticated'](),controller[_0x0af1('0xa')]);module[_0x0af1('0xb')]=router;
\ No newline at end of file
+var _0x7f27=['fs-extra','../../config/environment','./condition.controller','put','update','delete','/:id','isAuthenticated','destroy','multer','util','path','connect-timeout','Router'];(function(_0x356f5f,_0x2ca65f){var _0x25edb6=function(_0x37bd61){while(--_0x37bd61){_0x356f5f['push'](_0x356f5f['shift']());}};_0x25edb6(++_0x2ca65f);}(_0x7f27,0x79));var _0x77f2=function(_0x541475,_0x24f497){_0x541475=_0x541475-0x0;var _0x47e967=_0x7f27[_0x541475];return _0x47e967;};'use strict';var multer=require(_0x77f2('0x0'));var util=require(_0x77f2('0x1'));var path=require(_0x77f2('0x2'));var timeout=require(_0x77f2('0x3'));var express=require('express');var router=express[_0x77f2('0x4')]();var fs_extra=require(_0x77f2('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x77f2('0x6'));var controller=require(_0x77f2('0x7'));router[_0x77f2('0x8')]('/:id',auth['isAuthenticated'](),controller[_0x77f2('0x9')]);router[_0x77f2('0xa')](_0x77f2('0xb'),auth[_0x77f2('0xc')](),controller[_0x77f2('0xd')]);module['exports']=router;
\ No newline at end of file
index dc192c3..c454154 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3a04=['exports','STRING','name','INTEGER','sequelize'];(function(_0xe6f1a1,_0x5c2fe7){var _0x3304bd=function(_0x36e633){while(--_0x36e633){_0xe6f1a1['push'](_0xe6f1a1['shift']());}};_0x3304bd(++_0x5c2fe7);}(_0x3a04,0x15d));var _0x43a0=function(_0x10e988,_0x272453){_0x10e988=_0x10e988-0x0;var _0x37ed93=_0x3a04[_0x10e988];return _0x37ed93;};'use strict';var Sequelize=require(_0x43a0('0x0'));module[_0x43a0('0x1')]={'name':{'type':Sequelize[_0x43a0('0x2')],'allowNull':![],'unique':_0x43a0('0x3')},'OrderBy':{'type':Sequelize[_0x43a0('0x4')],'allowNull':!![]},'rgbBackgroundColor':{'type':Sequelize[_0x43a0('0x2')],'allowNull':!![]}};
\ No newline at end of file
+var _0xb1e8=['exports','STRING','name','sequelize'];(function(_0x534286,_0x2e4da2){var _0x5a7e30=function(_0x270ad6){while(--_0x270ad6){_0x534286['push'](_0x534286['shift']());}};_0x5a7e30(++_0x2e4da2);}(_0xb1e8,0x10b));var _0x8b1e=function(_0x3e5bc8,_0x457d89){_0x3e5bc8=_0x3e5bc8-0x0;var _0xfd84bc=_0xb1e8[_0x3e5bc8];return _0xfd84bc;};'use strict';var Sequelize=require(_0x8b1e('0x0'));module[_0x8b1e('0x1')]={'name':{'type':Sequelize[_0x8b1e('0x2')],'allowNull':![],'unique':_0x8b1e('0x3')},'OrderBy':{'type':Sequelize['INTEGER'],'allowNull':!![]},'rgbBackgroundColor':{'type':Sequelize[_0x8b1e('0x2')],'allowNull':!![]}};
\ No newline at end of file
index 4c6f199..0725cec 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5f2f=['rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','sort','where','pick','filter','merge','options','ContactItemType','includeAll','catch','show','params','length','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','find','CmContactHasItem','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','end','status','offset','undefined','limit','count','set','Content-Range','apply','reject','save','then','get','ContactItemTypes','UserProfileResource','destroy','stack','name','index','map'];(function(_0x503306,_0x356f2f){var _0x44a99d=function(_0x1a6ec4){while(--_0x1a6ec4){_0x503306['push'](_0x503306['shift']());}};_0x44a99d(++_0x356f2f);}(_0x5f2f,0x73));var _0xf5f2=function(_0x4331ad,_0x5b92ef){_0x4331ad=_0x4331ad-0x0;var _0x5d0f04=_0x5f2f[_0x4331ad];return _0x5d0f04;};'use strict';var emlformat=require(_0xf5f2('0x0'));var rimraf=require(_0xf5f2('0x1'));var zipdir=require(_0xf5f2('0x2'));var jsonpatch=require(_0xf5f2('0x3'));var rp=require(_0xf5f2('0x4'));var moment=require(_0xf5f2('0x5'));var BPromise=require(_0xf5f2('0x6'));var Mustache=require(_0xf5f2('0x7'));var util=require('util');var path=require('path');var sox=require(_0xf5f2('0x8'));var csv=require(_0xf5f2('0x9'));var ejs=require(_0xf5f2('0xa'));var fs=require('fs');var fs_extra=require(_0xf5f2('0xb'));var _=require(_0xf5f2('0xc'));var squel=require(_0xf5f2('0xd'));var crypto=require('crypto');var jsforce=require(_0xf5f2('0xe'));var deskjs=require(_0xf5f2('0xf'));var toCsv=require(_0xf5f2('0x9'));var querystring=require('querystring');var Papa=require(_0xf5f2('0x10'));var Redis=require(_0xf5f2('0x11'));var authService=require(_0xf5f2('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xf5f2('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xf5f2('0x14'));var utils=require(_0xf5f2('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xf5f2('0x16'));var db=require(_0xf5f2('0x17'))['db'];function respondWithStatusCode(_0x331482,_0x3f2997){_0x3f2997=_0x3f2997||0xcc;return function(_0x59bb6c){if(_0x59bb6c){return _0x331482[_0xf5f2('0x18')](_0x3f2997);}return _0x331482['status'](_0x3f2997)[_0xf5f2('0x19')]();};}function respondWithResult(_0xea612c,_0x269909){_0x269909=_0x269909||0xc8;return function(_0x1c1a5c){if(_0x1c1a5c){return _0xea612c[_0xf5f2('0x1a')](_0x269909)['json'](_0x1c1a5c);}};}function respondWithFilteredResult(_0xafe430,_0x286197){return function(_0x17d656){if(_0x17d656){var _0x1b6dd2=typeof _0x286197[_0xf5f2('0x1b')]===_0xf5f2('0x1c')&&typeof _0x286197[_0xf5f2('0x1d')]===_0xf5f2('0x1c');var _0x11f702=_0x17d656[_0xf5f2('0x1e')];var _0x20fccd=_0x1b6dd2?0x0:_0x286197[_0xf5f2('0x1b')];var _0x4ff59b=_0x1b6dd2?_0x17d656[_0xf5f2('0x1e')]:_0x286197[_0xf5f2('0x1b')]+_0x286197[_0xf5f2('0x1d')];var _0x1bf655;if(_0x4ff59b>=_0x11f702){_0x4ff59b=_0x11f702;_0x1bf655=0xc8;}else{_0x1bf655=0xce;}_0xafe430['status'](_0x1bf655);return _0xafe430[_0xf5f2('0x1f')](_0xf5f2('0x20'),_0x20fccd+'-'+_0x4ff59b+'/'+_0x11f702)['json'](_0x17d656);}return null;};}function patchUpdates(_0x47acfc){return function(_0x2d2805){try{jsonpatch[_0xf5f2('0x21')](_0x2d2805,_0x47acfc,!![]);}catch(_0x4ae323){return BPromise[_0xf5f2('0x22')](_0x4ae323);}return _0x2d2805[_0xf5f2('0x23')]();};}function saveUpdates(_0x39e44a,_0x39c024){return function(_0x36f1cb){if(_0x36f1cb){return _0x36f1cb['update'](_0x39e44a)[_0xf5f2('0x24')](function(_0x4669a6){return _0x4669a6;});}return null;};}function removeEntity(_0x4e8bda,_0x2833fe){return function(_0x287ad5){if(_0x287ad5){return _0x287ad5['destroy']()['then'](function(){var _0x5f1124=_0x287ad5[_0xf5f2('0x25')]({'plain':!![]});var _0x13da6f=_0xf5f2('0x26');return db[_0xf5f2('0x27')][_0xf5f2('0x28')]({'where':{'type':_0x13da6f,'resourceId':_0x5f1124['id']}})[_0xf5f2('0x24')](function(){return _0x287ad5;});})[_0xf5f2('0x24')](function(){_0x4e8bda[_0xf5f2('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0xaa2602,_0x102449){return function(_0x375ca8){if(!_0x375ca8){_0xaa2602[_0xf5f2('0x18')](0x194);}return _0x375ca8;};}function handleError(_0x198c73,_0x477604){_0x477604=_0x477604||0x1f4;return function(_0x5b6672){logger['error'](_0x5b6672[_0xf5f2('0x29')]);if(_0x5b6672[_0xf5f2('0x2a')]){delete _0x5b6672[_0xf5f2('0x2a')];}_0x198c73['status'](_0x477604)['send'](_0x5b6672);};}exports[_0xf5f2('0x2b')]=function(_0x50b8a2,_0x17394a){var _0x153924={},_0x1b381e={},_0x54c0c8={'count':0x0,'rows':[]};var _0x52e959=_[_0xf5f2('0x2c')](db['ContactItemType'][_0xf5f2('0x2d')],function(_0x58a4df){return{'name':_0x58a4df[_0xf5f2('0x2e')],'type':_0x58a4df[_0xf5f2('0x2f')][_0xf5f2('0x30')]};});_0x1b381e[_0xf5f2('0x31')]=_[_0xf5f2('0x2c')](_0x52e959,_0xf5f2('0x2a'));_0x1b381e[_0xf5f2('0x32')]=_[_0xf5f2('0x33')](_0x50b8a2['query']);_0x1b381e[_0xf5f2('0x34')]=_[_0xf5f2('0x35')](_0x1b381e[_0xf5f2('0x31')],_0x1b381e[_0xf5f2('0x32')]);_0x153924[_0xf5f2('0x36')]=_[_0xf5f2('0x35')](_0x1b381e[_0xf5f2('0x31')],qs['fields'](_0x50b8a2[_0xf5f2('0x32')][_0xf5f2('0x37')]));_0x153924['attributes']=_0x153924[_0xf5f2('0x36')]['length']?_0x153924[_0xf5f2('0x36')]:_0x1b381e[_0xf5f2('0x31')];if(!_0x50b8a2[_0xf5f2('0x32')][_0xf5f2('0x38')]('nolimit')){_0x153924['limit']=qs[_0xf5f2('0x1d')](_0x50b8a2[_0xf5f2('0x32')][_0xf5f2('0x1d')]);_0x153924['offset']=qs[_0xf5f2('0x1b')](_0x50b8a2['query'][_0xf5f2('0x1b')]);}_0x153924['order']=qs[_0xf5f2('0x39')](_0x50b8a2[_0xf5f2('0x32')]['sort']);_0x153924[_0xf5f2('0x3a')]=qs[_0xf5f2('0x34')](_[_0xf5f2('0x3b')](_0x50b8a2[_0xf5f2('0x32')],_0x1b381e['filters']),_0x52e959);if(_0x50b8a2['query'][_0xf5f2('0x3c')]){_0x153924[_0xf5f2('0x3a')]=_[_0xf5f2('0x3d')](_0x153924[_0xf5f2('0x3a')],{'$or':_[_0xf5f2('0x2c')](_0x52e959,function(_0xe62b57){if(_0xe62b57[_0xf5f2('0x2f')]!=='VIRTUAL'){var _0x110fe5={};_0x110fe5[_0xe62b57[_0xf5f2('0x2a')]]={'$like':'%'+_0x50b8a2['query'][_0xf5f2('0x3c')]+'%'};return _0x110fe5;}})});}_0x153924=_[_0xf5f2('0x3d')]({},_0x153924,_0x50b8a2[_0xf5f2('0x3e')]);var _0x85b6d0={'where':_0x153924[_0xf5f2('0x3a')]};return db[_0xf5f2('0x3f')][_0xf5f2('0x1e')](_0x85b6d0)[_0xf5f2('0x24')](function(_0x574f24){_0x54c0c8[_0xf5f2('0x1e')]=_0x574f24;if(_0x50b8a2[_0xf5f2('0x32')][_0xf5f2('0x40')]){_0x153924['include']=[{'all':!![]}];}return db['ContactItemType']['findAll'](_0x153924);})[_0xf5f2('0x24')](function(_0x2ad13c){_0x54c0c8['rows']=_0x2ad13c;return _0x54c0c8;})[_0xf5f2('0x24')](respondWithFilteredResult(_0x17394a,_0x153924))[_0xf5f2('0x41')](handleError(_0x17394a,null));};exports[_0xf5f2('0x42')]=function(_0x31f86c,_0x354c34){var _0x2b3b1c={'raw':!![],'where':{'id':_0x31f86c[_0xf5f2('0x43')]['id']}},_0x1a6ec1={};_0x1a6ec1[_0xf5f2('0x31')]=_[_0xf5f2('0x33')](db[_0xf5f2('0x3f')][_0xf5f2('0x2d')]);_0x1a6ec1[_0xf5f2('0x32')]=_[_0xf5f2('0x33')](_0x31f86c['query']);_0x1a6ec1[_0xf5f2('0x34')]=_['intersection'](_0x1a6ec1[_0xf5f2('0x31')],_0x1a6ec1[_0xf5f2('0x32')]);_0x2b3b1c[_0xf5f2('0x36')]=_[_0xf5f2('0x35')](_0x1a6ec1[_0xf5f2('0x31')],qs[_0xf5f2('0x37')](_0x31f86c['query'][_0xf5f2('0x37')]));_0x2b3b1c[_0xf5f2('0x36')]=_0x2b3b1c[_0xf5f2('0x36')][_0xf5f2('0x44')]?_0x2b3b1c[_0xf5f2('0x36')]:_0x1a6ec1[_0xf5f2('0x31')];if(_0x31f86c[_0xf5f2('0x32')][_0xf5f2('0x40')]){_0x2b3b1c['include']=[{'all':!![]}];}_0x2b3b1c=_[_0xf5f2('0x3d')]({},_0x2b3b1c,_0x31f86c[_0xf5f2('0x3e')]);return db[_0xf5f2('0x3f')]['find'](_0x2b3b1c)[_0xf5f2('0x24')](handleEntityNotFound(_0x354c34,null))[_0xf5f2('0x24')](respondWithResult(_0x354c34,null))[_0xf5f2('0x41')](handleError(_0x354c34,null));};exports['create']=function(_0x57a7cb,_0x7bb942){return db[_0xf5f2('0x3f')]['create'](_0x57a7cb[_0xf5f2('0x45')],{})['then'](function(_0x740321){var _0x497eb8=_0x57a7cb[_0xf5f2('0x46')]['get']({'plain':!![]});if(!_0x497eb8)throw new Error(_0xf5f2('0x47'));if(_0x497eb8[_0xf5f2('0x48')]===_0xf5f2('0x46')){var _0x11a083=_0x740321['get']({'plain':!![]});var _0x3154c1=_0xf5f2('0x26');return db['UserProfileSection']['find']({'where':{'name':_0x3154c1,'userProfileId':_0x497eb8[_0xf5f2('0x49')]},'raw':!![]})[_0xf5f2('0x24')](function(_0x57782c){if(_0x57782c&&_0x57782c[_0xf5f2('0x4a')]===0x0){return db[_0xf5f2('0x27')][_0xf5f2('0x4b')]({'name':_0x11a083[_0xf5f2('0x2a')],'resourceId':_0x11a083['id'],'type':_0x57782c['name'],'sectionId':_0x57782c['id']},{})['then'](function(){return _0x740321;});}else{return _0x740321;}})[_0xf5f2('0x41')](function(_0xa3cc67){logger['error'](_0xf5f2('0x4c'),_0xa3cc67);throw _0xa3cc67;});}return _0x740321;})[_0xf5f2('0x24')](respondWithResult(_0x7bb942,0xc9))[_0xf5f2('0x41')](handleError(_0x7bb942,null));};exports[_0xf5f2('0x4d')]=function(_0x2b038e,_0x73c9f1){if(_0x2b038e[_0xf5f2('0x45')]['id']){delete _0x2b038e['body']['id'];}return db['ContactItemType'][_0xf5f2('0x4e')]({'where':{'id':_0x2b038e[_0xf5f2('0x43')]['id']}})[_0xf5f2('0x24')](handleEntityNotFound(_0x73c9f1,null))[_0xf5f2('0x24')](saveUpdates(_0x2b038e[_0xf5f2('0x45')],null))['then'](respondWithResult(_0x73c9f1,null))[_0xf5f2('0x41')](handleError(_0x73c9f1,null));};exports[_0xf5f2('0x28')]=function(_0x18b124,_0x519c24){return db[_0xf5f2('0x3f')]['find']({'where':{'id':_0x18b124[_0xf5f2('0x43')]['id']}})[_0xf5f2('0x24')](handleEntityNotFound(_0x519c24,null))[_0xf5f2('0x24')](db[_0xf5f2('0x4f')]['update']({'ItemTypeId':null},{'where':{'ItemTypeId':_0x18b124['params']['id']}}))[_0xf5f2('0x24')](removeEntity(_0x519c24,null))['catch'](handleError(_0x519c24,null));};
\ No newline at end of file
+var _0xcf2f=['Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','status','json','offset','undefined','count','limit','set','apply','reject','save','update','then','ContactItemTypes','UserProfileResource','destroy','end','sendStatus','stack','name','send','map','fieldName','type','key','keys','query','intersection','model','attributes','fields','length','hasOwnProperty','order','sort','where','filters','pick','merge','VIRTUAL','filter','options','ContactItemType','includeAll','rows','catch','show','params','rawAttributes','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId'];(function(_0x5de533,_0x7444ba){var _0x26eec3=function(_0x2eba52){while(--_0x2eba52){_0x5de533['push'](_0x5de533['shift']());}};_0x26eec3(++_0x7444ba);}(_0xcf2f,0xa7));var _0xfcf2=function(_0x59f222,_0x58ad12){_0x59f222=_0x59f222-0x0;var _0x458b00=_0xcf2f[_0x59f222];return _0x458b00;};'use strict';var emlformat=require(_0xfcf2('0x0'));var rimraf=require(_0xfcf2('0x1'));var zipdir=require(_0xfcf2('0x2'));var jsonpatch=require(_0xfcf2('0x3'));var rp=require(_0xfcf2('0x4'));var moment=require('moment');var BPromise=require(_0xfcf2('0x5'));var Mustache=require(_0xfcf2('0x6'));var util=require(_0xfcf2('0x7'));var path=require(_0xfcf2('0x8'));var sox=require(_0xfcf2('0x9'));var csv=require(_0xfcf2('0xa'));var ejs=require(_0xfcf2('0xb'));var fs=require('fs');var fs_extra=require(_0xfcf2('0xc'));var _=require(_0xfcf2('0xd'));var squel=require(_0xfcf2('0xe'));var crypto=require(_0xfcf2('0xf'));var jsforce=require(_0xfcf2('0x10'));var deskjs=require(_0xfcf2('0x11'));var toCsv=require(_0xfcf2('0xa'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xfcf2('0x12'));var qs=require(_0xfcf2('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xfcf2('0x14'));var logger=require(_0xfcf2('0x15'))(_0xfcf2('0x16'));var utils=require(_0xfcf2('0x17'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xfcf2('0x18'))['db'];function respondWithStatusCode(_0x1ba610,_0x175ac9){_0x175ac9=_0x175ac9||0xcc;return function(_0x1be8cc){if(_0x1be8cc){return _0x1ba610['sendStatus'](_0x175ac9);}return _0x1ba610[_0xfcf2('0x19')](_0x175ac9)['end']();};}function respondWithResult(_0x5b414a,_0x5dc04b){_0x5dc04b=_0x5dc04b||0xc8;return function(_0xc87ff4){if(_0xc87ff4){return _0x5b414a['status'](_0x5dc04b)[_0xfcf2('0x1a')](_0xc87ff4);}};}function respondWithFilteredResult(_0x1febf8,_0x245f9a){return function(_0x21f7d1){if(_0x21f7d1){var _0x315b2f=typeof _0x245f9a[_0xfcf2('0x1b')]===_0xfcf2('0x1c')&&typeof _0x245f9a['limit']===_0xfcf2('0x1c');var _0x213125=_0x21f7d1[_0xfcf2('0x1d')];var _0x581d78=_0x315b2f?0x0:_0x245f9a[_0xfcf2('0x1b')];var _0x1b3c89=_0x315b2f?_0x21f7d1[_0xfcf2('0x1d')]:_0x245f9a[_0xfcf2('0x1b')]+_0x245f9a[_0xfcf2('0x1e')];var _0x53c406;if(_0x1b3c89>=_0x213125){_0x1b3c89=_0x213125;_0x53c406=0xc8;}else{_0x53c406=0xce;}_0x1febf8[_0xfcf2('0x19')](_0x53c406);return _0x1febf8[_0xfcf2('0x1f')]('Content-Range',_0x581d78+'-'+_0x1b3c89+'/'+_0x213125)[_0xfcf2('0x1a')](_0x21f7d1);}return null;};}function patchUpdates(_0x23c079){return function(_0x206738){try{jsonpatch[_0xfcf2('0x20')](_0x206738,_0x23c079,!![]);}catch(_0x51e0b7){return BPromise[_0xfcf2('0x21')](_0x51e0b7);}return _0x206738[_0xfcf2('0x22')]();};}function saveUpdates(_0x422c5a,_0x1eeebd){return function(_0x5afab5){if(_0x5afab5){return _0x5afab5[_0xfcf2('0x23')](_0x422c5a)[_0xfcf2('0x24')](function(_0x232f6f){return _0x232f6f;});}return null;};}function removeEntity(_0x584e76,_0x26641a){return function(_0x151aa8){if(_0x151aa8){return _0x151aa8['destroy']()[_0xfcf2('0x24')](function(){var _0xbc8722=_0x151aa8['get']({'plain':!![]});var _0x1e6f14=_0xfcf2('0x25');return db[_0xfcf2('0x26')][_0xfcf2('0x27')]({'where':{'type':_0x1e6f14,'resourceId':_0xbc8722['id']}})['then'](function(){return _0x151aa8;});})[_0xfcf2('0x24')](function(){_0x584e76[_0xfcf2('0x19')](0xcc)[_0xfcf2('0x28')]();});}};}function handleEntityNotFound(_0x3779ee,_0x17c994){return function(_0x2b1d60){if(!_0x2b1d60){_0x3779ee[_0xfcf2('0x29')](0x194);}return _0x2b1d60;};}function handleError(_0x1c8f38,_0x23c09c){_0x23c09c=_0x23c09c||0x1f4;return function(_0x56f839){logger['error'](_0x56f839[_0xfcf2('0x2a')]);if(_0x56f839[_0xfcf2('0x2b')]){delete _0x56f839[_0xfcf2('0x2b')];}_0x1c8f38['status'](_0x23c09c)[_0xfcf2('0x2c')](_0x56f839);};}exports['index']=function(_0x3ce9f8,_0x26651e){var _0x40c1ae={},_0x1a4485={},_0x313884={'count':0x0,'rows':[]};var _0x3760ad=_[_0xfcf2('0x2d')](db['ContactItemType']['rawAttributes'],function(_0xfc3b86){return{'name':_0xfc3b86[_0xfcf2('0x2e')],'type':_0xfc3b86[_0xfcf2('0x2f')][_0xfcf2('0x30')]};});_0x1a4485['model']=_['map'](_0x3760ad,_0xfcf2('0x2b'));_0x1a4485['query']=_[_0xfcf2('0x31')](_0x3ce9f8[_0xfcf2('0x32')]);_0x1a4485['filters']=_[_0xfcf2('0x33')](_0x1a4485[_0xfcf2('0x34')],_0x1a4485[_0xfcf2('0x32')]);_0x40c1ae[_0xfcf2('0x35')]=_[_0xfcf2('0x33')](_0x1a4485[_0xfcf2('0x34')],qs[_0xfcf2('0x36')](_0x3ce9f8['query'][_0xfcf2('0x36')]));_0x40c1ae[_0xfcf2('0x35')]=_0x40c1ae['attributes'][_0xfcf2('0x37')]?_0x40c1ae[_0xfcf2('0x35')]:_0x1a4485['model'];if(!_0x3ce9f8[_0xfcf2('0x32')][_0xfcf2('0x38')]('nolimit')){_0x40c1ae[_0xfcf2('0x1e')]=qs[_0xfcf2('0x1e')](_0x3ce9f8[_0xfcf2('0x32')][_0xfcf2('0x1e')]);_0x40c1ae['offset']=qs[_0xfcf2('0x1b')](_0x3ce9f8[_0xfcf2('0x32')][_0xfcf2('0x1b')]);}_0x40c1ae[_0xfcf2('0x39')]=qs[_0xfcf2('0x3a')](_0x3ce9f8['query'][_0xfcf2('0x3a')]);_0x40c1ae[_0xfcf2('0x3b')]=qs[_0xfcf2('0x3c')](_[_0xfcf2('0x3d')](_0x3ce9f8[_0xfcf2('0x32')],_0x1a4485['filters']),_0x3760ad);if(_0x3ce9f8[_0xfcf2('0x32')]['filter']){_0x40c1ae[_0xfcf2('0x3b')]=_[_0xfcf2('0x3e')](_0x40c1ae[_0xfcf2('0x3b')],{'$or':_[_0xfcf2('0x2d')](_0x3760ad,function(_0x2fd2ef){if(_0x2fd2ef['type']!==_0xfcf2('0x3f')){var _0x341505={};_0x341505[_0x2fd2ef[_0xfcf2('0x2b')]]={'$like':'%'+_0x3ce9f8['query'][_0xfcf2('0x40')]+'%'};return _0x341505;}})});}_0x40c1ae=_[_0xfcf2('0x3e')]({},_0x40c1ae,_0x3ce9f8[_0xfcf2('0x41')]);var _0x320c19={'where':_0x40c1ae[_0xfcf2('0x3b')]};return db[_0xfcf2('0x42')]['count'](_0x320c19)['then'](function(_0x526c42){_0x313884[_0xfcf2('0x1d')]=_0x526c42;if(_0x3ce9f8[_0xfcf2('0x32')][_0xfcf2('0x43')]){_0x40c1ae['include']=[{'all':!![]}];}return db['ContactItemType']['findAll'](_0x40c1ae);})[_0xfcf2('0x24')](function(_0xab0747){_0x313884[_0xfcf2('0x44')]=_0xab0747;return _0x313884;})[_0xfcf2('0x24')](respondWithFilteredResult(_0x26651e,_0x40c1ae))[_0xfcf2('0x45')](handleError(_0x26651e,null));};exports[_0xfcf2('0x46')]=function(_0x2c8ba2,_0x16cc21){var _0x2b790b={'raw':!![],'where':{'id':_0x2c8ba2[_0xfcf2('0x47')]['id']}},_0x467ecd={};_0x467ecd['model']=_['keys'](db[_0xfcf2('0x42')][_0xfcf2('0x48')]);_0x467ecd[_0xfcf2('0x32')]=_[_0xfcf2('0x31')](_0x2c8ba2[_0xfcf2('0x32')]);_0x467ecd[_0xfcf2('0x3c')]=_[_0xfcf2('0x33')](_0x467ecd[_0xfcf2('0x34')],_0x467ecd[_0xfcf2('0x32')]);_0x2b790b[_0xfcf2('0x35')]=_[_0xfcf2('0x33')](_0x467ecd[_0xfcf2('0x34')],qs[_0xfcf2('0x36')](_0x2c8ba2[_0xfcf2('0x32')][_0xfcf2('0x36')]));_0x2b790b[_0xfcf2('0x35')]=_0x2b790b[_0xfcf2('0x35')]['length']?_0x2b790b[_0xfcf2('0x35')]:_0x467ecd[_0xfcf2('0x34')];if(_0x2c8ba2['query'][_0xfcf2('0x43')]){_0x2b790b['include']=[{'all':!![]}];}_0x2b790b=_[_0xfcf2('0x3e')]({},_0x2b790b,_0x2c8ba2[_0xfcf2('0x41')]);return db[_0xfcf2('0x42')][_0xfcf2('0x49')](_0x2b790b)['then'](handleEntityNotFound(_0x16cc21,null))['then'](respondWithResult(_0x16cc21,null))['catch'](handleError(_0x16cc21,null));};exports[_0xfcf2('0x4a')]=function(_0x37d4bb,_0x20fcab){return db[_0xfcf2('0x42')]['create'](_0x37d4bb[_0xfcf2('0x4b')],{})[_0xfcf2('0x24')](function(_0x3b981c){var _0x548c6c=_0x37d4bb[_0xfcf2('0x4c')][_0xfcf2('0x4d')]({'plain':!![]});if(!_0x548c6c)throw new Error(_0xfcf2('0x4e'));if(_0x548c6c[_0xfcf2('0x4f')]===_0xfcf2('0x4c')){var _0x4af270=_0x3b981c[_0xfcf2('0x4d')]({'plain':!![]});var _0x1260a4=_0xfcf2('0x25');return db[_0xfcf2('0x50')][_0xfcf2('0x49')]({'where':{'name':_0x1260a4,'userProfileId':_0x548c6c[_0xfcf2('0x51')]},'raw':!![]})['then'](function(_0x5d162d){if(_0x5d162d&&_0x5d162d['autoAssociation']===0x0){return db[_0xfcf2('0x26')][_0xfcf2('0x4a')]({'name':_0x4af270['name'],'resourceId':_0x4af270['id'],'type':_0x5d162d['name'],'sectionId':_0x5d162d['id']},{})[_0xfcf2('0x24')](function(){return _0x3b981c;});}else{return _0x3b981c;}})[_0xfcf2('0x45')](function(_0x137a47){logger['error'](_0xfcf2('0x52'),_0x137a47);throw _0x137a47;});}return _0x3b981c;})[_0xfcf2('0x24')](respondWithResult(_0x20fcab,0xc9))['catch'](handleError(_0x20fcab,null));};exports['update']=function(_0xfc4b7b,_0x51f636){if(_0xfc4b7b[_0xfcf2('0x4b')]['id']){delete _0xfc4b7b[_0xfcf2('0x4b')]['id'];}return db['ContactItemType'][_0xfcf2('0x49')]({'where':{'id':_0xfc4b7b['params']['id']}})[_0xfcf2('0x24')](handleEntityNotFound(_0x51f636,null))['then'](saveUpdates(_0xfc4b7b[_0xfcf2('0x4b')],null))[_0xfcf2('0x24')](respondWithResult(_0x51f636,null))[_0xfcf2('0x45')](handleError(_0x51f636,null));};exports['destroy']=function(_0x235b06,_0x27bae5){return db[_0xfcf2('0x42')][_0xfcf2('0x49')]({'where':{'id':_0x235b06[_0xfcf2('0x47')]['id']}})[_0xfcf2('0x24')](handleEntityNotFound(_0x27bae5,null))[_0xfcf2('0x24')](db['CmContactHasItem'][_0xfcf2('0x23')]({'ItemTypeId':null},{'where':{'ItemTypeId':_0x235b06[_0xfcf2('0x47')]['id']}}))['then'](removeEntity(_0x27bae5,null))[_0xfcf2('0x45')](handleError(_0x27bae5,null));};
\ No newline at end of file
index d94d1c0..9162159 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa799=['path','rimraf','./contactItemType.attributes','exports','define','ContactItemType','tools_contact_item_types','util','../../config/logger','api','bluebird','request-promise'];(function(_0xe80458,_0x5b168f){var _0x25f4ba=function(_0x5753d5){while(--_0x5753d5){_0xe80458['push'](_0xe80458['shift']());}};_0x25f4ba(++_0x5b168f);}(_0xa799,0x1cf));var _0x9a79=function(_0x1fd7f2,_0x4ad5ec){_0x1fd7f2=_0x1fd7f2-0x0;var _0x4bea8b=_0xa799[_0x1fd7f2];return _0x4bea8b;};'use strict';var _=require('lodash');var util=require(_0x9a79('0x0'));var logger=require(_0x9a79('0x1'))(_0x9a79('0x2'));var moment=require('moment');var BPromise=require(_0x9a79('0x3'));var rp=require(_0x9a79('0x4'));var fs=require('fs');var path=require(_0x9a79('0x5'));var rimraf=require(_0x9a79('0x6'));var config=require('../../config/environment');var attributes=require(_0x9a79('0x7'));module[_0x9a79('0x8')]=function(_0x497948,_0x1e07a1){return _0x497948[_0x9a79('0x9')](_0x9a79('0xa'),attributes,{'tableName':_0x9a79('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x7085=['./contactItemType.attributes','exports','define','ContactItemType','tools_contact_item_types','lodash','util','../../config/logger','api','bluebird','path','../../config/environment'];(function(_0x4c9e17,_0x4b849d){var _0x51146e=function(_0x23fa07){while(--_0x23fa07){_0x4c9e17['push'](_0x4c9e17['shift']());}};_0x51146e(++_0x4b849d);}(_0x7085,0x125));var _0x5708=function(_0x5a70a2,_0xf1e7f9){_0x5a70a2=_0x5a70a2-0x0;var _0x1c88fd=_0x7085[_0x5a70a2];return _0x1c88fd;};'use strict';var _=require(_0x5708('0x0'));var util=require(_0x5708('0x1'));var logger=require(_0x5708('0x2'))(_0x5708('0x3'));var moment=require('moment');var BPromise=require(_0x5708('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x5708('0x5'));var rimraf=require('rimraf');var config=require(_0x5708('0x6'));var attributes=require(_0x5708('0x7'));module[_0x5708('0x8')]=function(_0x5c5c6b,_0x16c771){return _0x5c5c6b[_0x5708('0x9')](_0x5708('0xa'),attributes,{'tableName':_0x5708('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index a2b9ed0..814e439 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3d09=['info','ContactItemType,\x20%s,\x20%s','request\x20sent','ContactItemType,\x20%s,\x20%s,\x20%s','stringify','error','message','lodash','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then'];(function(_0x42f087,_0x55123b){var _0x11a7f1=function(_0x35198){while(--_0x35198){_0x42f087['push'](_0x42f087['shift']());}};_0x11a7f1(++_0x55123b);}(_0x3d09,0x8c));var _0x93d0=function(_0x1aecf9,_0x79221f){_0x1aecf9=_0x1aecf9-0x0;var _0x626323=_0x3d09[_0x1aecf9];return _0x626323;};'use strict';var _=require(_0x93d0('0x0'));var util=require('util');var moment=require(_0x93d0('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x93d0('0x2'));var db=require(_0x93d0('0x3'))['db'];var utils=require(_0x93d0('0x4'));var logger=require(_0x93d0('0x5'))(_0x93d0('0x6'));var config=require(_0x93d0('0x7'));var jayson=require(_0x93d0('0x8'));var client=jayson[_0x93d0('0x9')][_0x93d0('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5e68f2,_0x33f55f,_0xd9caea){return new BPromise(function(_0x5998e5,_0x2c5898){return client['request'](_0x5e68f2,_0xd9caea)[_0x93d0('0xb')](function(_0x560a28){logger[_0x93d0('0xc')](_0x93d0('0xd'),_0x33f55f,_0x93d0('0xe'));logger['debug'](_0x93d0('0xf'),_0x33f55f,_0x93d0('0xe'),JSON[_0x93d0('0x10')](_0x560a28));if(_0x560a28[_0x93d0('0x11')]){if(_0x560a28[_0x93d0('0x11')]['code']===0x1f4){logger['error'](_0x93d0('0xd'),_0x33f55f,_0x560a28['error'][_0x93d0('0x12')]);return _0x2c5898(_0x560a28[_0x93d0('0x11')][_0x93d0('0x12')]);}logger[_0x93d0('0x11')](_0x93d0('0xd'),_0x33f55f,_0x560a28[_0x93d0('0x11')][_0x93d0('0x12')]);return _0x5998e5(_0x560a28[_0x93d0('0x11')]['message']);}else{logger[_0x93d0('0xc')](_0x93d0('0xd'),_0x33f55f,_0x93d0('0xe'));_0x5998e5(_0x560a28['result'][_0x93d0('0x12')]);}})['catch'](function(_0x1645b7){logger[_0x93d0('0x11')](_0x93d0('0xd'),_0x33f55f,_0x1645b7);_0x2c5898(_0x1645b7);});});}
\ No newline at end of file
+var _0x55ab=['request','then','info','ContactItemType,\x20%s,\x20%s','request\x20sent','debug','ContactItemType,\x20%s,\x20%s,\x20%s','error','code','message','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http'];(function(_0xd4210,_0x25623d){var _0x264dee=function(_0x37fc7c){while(--_0x37fc7c){_0xd4210['push'](_0xd4210['shift']());}};_0x264dee(++_0x25623d);}(_0x55ab,0xc8));var _0xb55a=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x55ab[_0x3b380d];return _0x54502b;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xb55a('0x0'));var rs=require(_0xb55a('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb55a('0x2'))['db'];var utils=require(_0xb55a('0x3'));var logger=require(_0xb55a('0x4'))(_0xb55a('0x5'));var config=require(_0xb55a('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xb55a('0x7')][_0xb55a('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x3e4f38,_0x523ea3,_0x4f2cf8){return new BPromise(function(_0x46e405,_0x3e38e5){return client[_0xb55a('0x9')](_0x3e4f38,_0x4f2cf8)[_0xb55a('0xa')](function(_0x5abe16){logger[_0xb55a('0xb')](_0xb55a('0xc'),_0x523ea3,_0xb55a('0xd'));logger[_0xb55a('0xe')](_0xb55a('0xf'),_0x523ea3,_0xb55a('0xd'),JSON['stringify'](_0x5abe16));if(_0x5abe16[_0xb55a('0x10')]){if(_0x5abe16[_0xb55a('0x10')][_0xb55a('0x11')]===0x1f4){logger[_0xb55a('0x10')](_0xb55a('0xc'),_0x523ea3,_0x5abe16[_0xb55a('0x10')][_0xb55a('0x12')]);return _0x3e38e5(_0x5abe16[_0xb55a('0x10')][_0xb55a('0x12')]);}logger[_0xb55a('0x10')]('ContactItemType,\x20%s,\x20%s',_0x523ea3,_0x5abe16['error'][_0xb55a('0x12')]);return _0x46e405(_0x5abe16[_0xb55a('0x10')][_0xb55a('0x12')]);}else{logger[_0xb55a('0xb')](_0xb55a('0xc'),_0x523ea3,_0xb55a('0xd'));_0x46e405(_0x5abe16['result'][_0xb55a('0x12')]);}})['catch'](function(_0x4765dc){logger[_0xb55a('0x10')](_0xb55a('0xc'),_0x523ea3,_0x4765dc);_0x3e38e5(_0x4765dc);});});}
\ No newline at end of file
index c17e847..fc98e39 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x205a=['multer','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./contactItemType.controller','get','isAuthenticated','index','/:id','show','post','create','update','delete','exports'];(function(_0x4637ea,_0x2589ee){var _0x1e6e1e=function(_0x1ee10a){while(--_0x1ee10a){_0x4637ea['push'](_0x4637ea['shift']());}};_0x1e6e1e(++_0x2589ee);}(_0x205a,0xbe));var _0xa205=function(_0x357cc9,_0x4aba29){_0x357cc9=_0x357cc9-0x0;var _0x41977a=_0x205a[_0x357cc9];return _0x41977a;};'use strict';var multer=require(_0xa205('0x0'));var util=require(_0xa205('0x1'));var path=require(_0xa205('0x2'));var timeout=require(_0xa205('0x3'));var express=require(_0xa205('0x4'));var router=express[_0xa205('0x5')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xa205('0x6'));var config=require(_0xa205('0x7'));var controller=require(_0xa205('0x8'));router[_0xa205('0x9')]('/',auth[_0xa205('0xa')](),controller[_0xa205('0xb')]);router[_0xa205('0x9')](_0xa205('0xc'),auth[_0xa205('0xa')](),controller[_0xa205('0xd')]);router[_0xa205('0xe')]('/',auth[_0xa205('0xa')](),controller[_0xa205('0xf')]);router['put'](_0xa205('0xc'),auth[_0xa205('0xa')](),controller[_0xa205('0x10')]);router[_0xa205('0x11')](_0xa205('0xc'),auth['isAuthenticated'](),controller['destroy']);module[_0xa205('0x12')]=router;
\ No newline at end of file
+var _0x3d4b=['put','delete','destroy','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./contactItemType.controller','get','/:id','isAuthenticated','show','post','create'];(function(_0x5a3298,_0x3ed269){var _0x5b3583=function(_0x221152){while(--_0x221152){_0x5a3298['push'](_0x5a3298['shift']());}};_0x5b3583(++_0x3ed269);}(_0x3d4b,0xf1));var _0xb3d4=function(_0x23c89d,_0x1a8b99){_0x23c89d=_0x23c89d-0x0;var _0x4db932=_0x3d4b[_0x23c89d];return _0x4db932;};'use strict';var multer=require('multer');var util=require(_0xb3d4('0x0'));var path=require('path');var timeout=require(_0xb3d4('0x1'));var express=require(_0xb3d4('0x2'));var router=express[_0xb3d4('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xb3d4('0x4'));var interaction=require(_0xb3d4('0x5'));var config=require(_0xb3d4('0x6'));var controller=require(_0xb3d4('0x7'));router[_0xb3d4('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0xb3d4('0x8')](_0xb3d4('0x9'),auth[_0xb3d4('0xa')](),controller[_0xb3d4('0xb')]);router[_0xb3d4('0xc')]('/',auth[_0xb3d4('0xa')](),controller[_0xb3d4('0xd')]);router[_0xb3d4('0xe')](_0xb3d4('0x9'),auth[_0xb3d4('0xa')](),controller['update']);router[_0xb3d4('0xf')](_0xb3d4('0x9'),auth['isAuthenticated'](),controller[_0xb3d4('0x10')]);module['exports']=router;
\ No newline at end of file
index 2e69ef1..7abcf10 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb7e7=['STRING','sequelize'];(function(_0x465a0c,_0x19d4d5){var _0x1e202e=function(_0x27bd8a){while(--_0x27bd8a){_0x465a0c['push'](_0x465a0c['shift']());}};_0x1e202e(++_0x19d4d5);}(_0xb7e7,0x121));var _0x7b7e=function(_0x3ea913,_0x255df2){_0x3ea913=_0x3ea913-0x0;var _0x2b4f28=_0xb7e7[_0x3ea913];return _0x2b4f28;};'use strict';var Sequelize=require(_0x7b7e('0x0'));module['exports']={'name':{'type':Sequelize[_0x7b7e('0x1')],'allowNull':![],'unique':'name'},'description':{'type':Sequelize[_0x7b7e('0x1')]}};
\ No newline at end of file
+var _0xb7e7=['STRING','sequelize'];(function(_0x597484,_0x199340){var _0x218e64=function(_0x390d55){while(--_0x390d55){_0x597484['push'](_0x597484['shift']());}};_0x218e64(++_0x199340);}(_0xb7e7,0x121));var _0x7b7e=function(_0xa6cc5c,_0x239c99){_0xa6cc5c=_0xa6cc5c-0x0;var _0x44803d=_0xb7e7[_0xa6cc5c];return _0x44803d;};'use strict';var Sequelize=require(_0x7b7e('0x0'));module['exports']={'name':{'type':Sequelize[_0x7b7e('0x1')],'allowNull':![],'unique':'name'},'description':{'type':Sequelize[_0x7b7e('0x1')]}};
\ No newline at end of file
index c83db9a..cff0268 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xef4c=['multibar-chart','pie-chart','attrSerie1','attrSerie2','attrSerie3','web-report','reportType','attrReport','attrRefresh','stringify','addItem','getItems','findOne','DashboardItem','filter','hasOwnProperty','nolimit','eml-format','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','desk.js','querystring','papaparse','../../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','./dashboard.socket','register','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','reject','save','update','destroy','then','get','UserProfileResource','error','stack','name','send','index','Dashboard','fieldName','type','key','model','map','keys','query','filters','intersection','fields','attributes','length','order','sort','where','pick','merge','options','include','findAll','rows','catch','params','rawAttributes','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','CustomDashboards','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','includeAll','omit','createdAt','updatedAt','role','iframe','attrUrl','attrs','https://','custom','attrPath','value','attrHourFormat','attrTimezone','attrFontSize','counter','attrMetric','total','attrVoiceQueues','attrChannel','voice','attrEmailAccounts','attrFaxAccounts','attrSmsAccounts','attrOpenchannelAccounts','attrWhatsappAccounts','attrChatWebsites'];(function(_0x36c5b0,_0x5001da){var _0xf19333=function(_0x1e880a){while(--_0x1e880a){_0x36c5b0['push'](_0x36c5b0['shift']());}};_0xf19333(++_0x5001da);}(_0xef4c,0x19d));var _0xcef4=function(_0x4b81ff,_0x44aadb){_0x4b81ff=_0x4b81ff-0x0;var _0x13330a=_0xef4c[_0x4b81ff];return _0x13330a;};'use strict';var emlformat=require(_0xcef4('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xcef4('0x1'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xcef4('0x2'));var Mustache=require(_0xcef4('0x3'));var util=require(_0xcef4('0x4'));var path=require(_0xcef4('0x5'));var sox=require(_0xcef4('0x6'));var csv=require(_0xcef4('0x7'));var ejs=require(_0xcef4('0x8'));var fs=require('fs');var fs_extra=require(_0xcef4('0x9'));var _=require(_0xcef4('0xa'));var squel=require('squel');var crypto=require(_0xcef4('0xb'));var jsforce=require('jsforce');var deskjs=require(_0xcef4('0xc'));var toCsv=require(_0xcef4('0x7'));var querystring=require(_0xcef4('0xd'));var Papa=require(_0xcef4('0xe'));var Redis=require('ioredis');var authService=require(_0xcef4('0xf'));var qs=require(_0xcef4('0x10'));var as=require(_0xcef4('0x11'));var hardwareService=require(_0xcef4('0x12'));var logger=require(_0xcef4('0x13'))(_0xcef4('0x14'));var utils=require('../../config/utils');var config=require(_0xcef4('0x15'));var licenseUtil=require(_0xcef4('0x16'));var db=require(_0xcef4('0x17'))['db'];config[_0xcef4('0x18')]=_[_0xcef4('0x19')](config[_0xcef4('0x18')],{'host':_0xcef4('0x1a'),'port':0x18eb});var socket=require(_0xcef4('0x1b'))(new Redis(config[_0xcef4('0x18')]));require(_0xcef4('0x1c'))[_0xcef4('0x1d')](socket);function respondWithStatusCode(_0x11fdd5,_0x5119b9){_0x5119b9=_0x5119b9||0xcc;return function(_0x148330){if(_0x148330){return _0x11fdd5[_0xcef4('0x1e')](_0x5119b9);}return _0x11fdd5[_0xcef4('0x1f')](_0x5119b9)[_0xcef4('0x20')]();};}function respondWithResult(_0x8c6d40,_0x317c9d){_0x317c9d=_0x317c9d||0xc8;return function(_0x1a180e){if(_0x1a180e){return _0x8c6d40[_0xcef4('0x1f')](_0x317c9d)['json'](_0x1a180e);}};}function respondWithFilteredResult(_0x44395a,_0x4711f1){return function(_0x4e6c14){if(_0x4e6c14){var _0xd7bf68=typeof _0x4711f1[_0xcef4('0x21')]===_0xcef4('0x22')&&typeof _0x4711f1[_0xcef4('0x23')]===_0xcef4('0x22');var _0x4d55b7=_0x4e6c14[_0xcef4('0x24')];var _0x20f71c=_0xd7bf68?0x0:_0x4711f1[_0xcef4('0x21')];var _0x49f4b9=_0xd7bf68?_0x4e6c14[_0xcef4('0x24')]:_0x4711f1[_0xcef4('0x21')]+_0x4711f1[_0xcef4('0x23')];var _0xb2e824;if(_0x49f4b9>=_0x4d55b7){_0x49f4b9=_0x4d55b7;_0xb2e824=0xc8;}else{_0xb2e824=0xce;}_0x44395a[_0xcef4('0x1f')](_0xb2e824);return _0x44395a[_0xcef4('0x25')](_0xcef4('0x26'),_0x20f71c+'-'+_0x49f4b9+'/'+_0x4d55b7)[_0xcef4('0x27')](_0x4e6c14);}return null;};}function patchUpdates(_0x1ebb13){return function(_0x135a38){try{jsonpatch['apply'](_0x135a38,_0x1ebb13,!![]);}catch(_0x178a5f){return BPromise[_0xcef4('0x28')](_0x178a5f);}return _0x135a38[_0xcef4('0x29')]();};}function saveUpdates(_0x50d757,_0xb324c2){return function(_0x47c9b5){if(_0x47c9b5){return _0x47c9b5[_0xcef4('0x2a')](_0x50d757)['then'](function(_0x3bab5b){return _0x3bab5b;});}return null;};}function removeEntity(_0x43c598,_0x7dbb4){return function(_0x474a9a){if(_0x474a9a){return _0x474a9a[_0xcef4('0x2b')]()[_0xcef4('0x2c')](function(){var _0x3db91d=_0x474a9a[_0xcef4('0x2d')]({'plain':!![]});var _0x49e50a='CustomDashboards';return db[_0xcef4('0x2e')][_0xcef4('0x2b')]({'where':{'type':_0x49e50a,'resourceId':_0x3db91d['id']}})[_0xcef4('0x2c')](function(){return _0x474a9a;});})[_0xcef4('0x2c')](function(){_0x43c598[_0xcef4('0x1f')](0xcc)[_0xcef4('0x20')]();});}};}function handleEntityNotFound(_0x4f8379,_0xbce83d){return function(_0x41bb1c){if(!_0x41bb1c){_0x4f8379[_0xcef4('0x1e')](0x194);}return _0x41bb1c;};}function handleError(_0x4fe681,_0x57d811){_0x57d811=_0x57d811||0x1f4;return function(_0x5bd0f1){logger[_0xcef4('0x2f')](_0x5bd0f1[_0xcef4('0x30')]);if(_0x5bd0f1[_0xcef4('0x31')]){delete _0x5bd0f1[_0xcef4('0x31')];}_0x4fe681[_0xcef4('0x1f')](_0x57d811)[_0xcef4('0x32')](_0x5bd0f1);};}exports[_0xcef4('0x33')]=function(_0x12bc07,_0x1c5c21){var _0x20ccb3={},_0x413f6e={},_0x3f34b3={'count':0x0,'rows':[]};var _0xec3ace=_['map'](db[_0xcef4('0x34')]['rawAttributes'],function(_0x2cd023){return{'name':_0x2cd023[_0xcef4('0x35')],'type':_0x2cd023[_0xcef4('0x36')][_0xcef4('0x37')]};});_0x413f6e[_0xcef4('0x38')]=_[_0xcef4('0x39')](_0xec3ace,_0xcef4('0x31'));_0x413f6e['query']=_[_0xcef4('0x3a')](_0x12bc07[_0xcef4('0x3b')]);_0x413f6e[_0xcef4('0x3c')]=_[_0xcef4('0x3d')](_0x413f6e['model'],_0x413f6e[_0xcef4('0x3b')]);_0x20ccb3['attributes']=_[_0xcef4('0x3d')](_0x413f6e['model'],qs[_0xcef4('0x3e')](_0x12bc07['query'][_0xcef4('0x3e')]));_0x20ccb3[_0xcef4('0x3f')]=_0x20ccb3[_0xcef4('0x3f')][_0xcef4('0x40')]?_0x20ccb3[_0xcef4('0x3f')]:_0x413f6e[_0xcef4('0x38')];if(!_0x12bc07[_0xcef4('0x3b')]['hasOwnProperty']('nolimit')){_0x20ccb3[_0xcef4('0x23')]=qs[_0xcef4('0x23')](_0x12bc07[_0xcef4('0x3b')]['limit']);_0x20ccb3[_0xcef4('0x21')]=qs[_0xcef4('0x21')](_0x12bc07[_0xcef4('0x3b')]['offset']);}_0x20ccb3[_0xcef4('0x41')]=qs[_0xcef4('0x42')](_0x12bc07['query'][_0xcef4('0x42')]);_0x20ccb3[_0xcef4('0x43')]=qs['filters'](_[_0xcef4('0x44')](_0x12bc07[_0xcef4('0x3b')],_0x413f6e[_0xcef4('0x3c')]),_0xec3ace);if(_0x12bc07[_0xcef4('0x3b')]['filter']){_0x20ccb3[_0xcef4('0x43')]=_[_0xcef4('0x45')](_0x20ccb3['where'],{'$or':_['map'](_0xec3ace,function(_0x168473){if(_0x168473['type']!=='VIRTUAL'){var _0x4eb600={};_0x4eb600[_0x168473['name']]={'$like':'%'+_0x12bc07[_0xcef4('0x3b')]['filter']+'%'};return _0x4eb600;}})});}_0x20ccb3=_['merge']({},_0x20ccb3,_0x12bc07[_0xcef4('0x46')]);var _0x391009={'where':_0x20ccb3[_0xcef4('0x43')]};return db[_0xcef4('0x34')][_0xcef4('0x24')](_0x391009)['then'](function(_0x1e725e){_0x3f34b3['count']=_0x1e725e;if(_0x12bc07[_0xcef4('0x3b')]['includeAll']){_0x20ccb3[_0xcef4('0x47')]=[{'all':!![]}];}return db[_0xcef4('0x34')][_0xcef4('0x48')](_0x20ccb3);})[_0xcef4('0x2c')](function(_0x498a94){_0x3f34b3[_0xcef4('0x49')]=_0x498a94;return _0x3f34b3;})[_0xcef4('0x2c')](respondWithFilteredResult(_0x1c5c21,_0x20ccb3))[_0xcef4('0x4a')](handleError(_0x1c5c21,null));};exports['show']=function(_0x2e1c8f,_0x492ba7){var _0x5257f3={'raw':![],'where':{'id':_0x2e1c8f[_0xcef4('0x4b')]['id']}},_0x1926a5={};_0x1926a5[_0xcef4('0x38')]=_['keys'](db[_0xcef4('0x34')][_0xcef4('0x4c')]);_0x1926a5[_0xcef4('0x3b')]=_['keys'](_0x2e1c8f[_0xcef4('0x3b')]);_0x1926a5[_0xcef4('0x3c')]=_[_0xcef4('0x3d')](_0x1926a5['model'],_0x1926a5[_0xcef4('0x3b')]);_0x5257f3[_0xcef4('0x3f')]=_[_0xcef4('0x3d')](_0x1926a5[_0xcef4('0x38')],qs['fields'](_0x2e1c8f['query']['fields']));_0x5257f3[_0xcef4('0x3f')]=_0x5257f3[_0xcef4('0x3f')][_0xcef4('0x40')]?_0x5257f3[_0xcef4('0x3f')]:_0x1926a5[_0xcef4('0x38')];if(_0x2e1c8f[_0xcef4('0x3b')]['includeAll']){_0x5257f3[_0xcef4('0x47')]=[{'all':!![]}];}_0x5257f3=_[_0xcef4('0x45')]({},_0x5257f3,_0x2e1c8f[_0xcef4('0x46')]);return db['Dashboard'][_0xcef4('0x4d')](_0x5257f3)[_0xcef4('0x2c')](handleEntityNotFound(_0x492ba7,null))[_0xcef4('0x2c')](respondWithResult(_0x492ba7,null))[_0xcef4('0x4a')](handleError(_0x492ba7,null));};exports[_0xcef4('0x4e')]=function(_0x45dba4,_0x3ad11b){return db[_0xcef4('0x34')][_0xcef4('0x4e')](_0x45dba4[_0xcef4('0x4f')],{})[_0xcef4('0x2c')](function(_0x5cb4a5){var _0x295e89=_0x45dba4[_0xcef4('0x50')][_0xcef4('0x2d')]({'plain':!![]});if(!_0x295e89)throw new Error(_0xcef4('0x51'));if(_0x295e89['role']===_0xcef4('0x50')){var _0x4b8d02=_0x5cb4a5[_0xcef4('0x2d')]({'plain':!![]});var _0x51b821=_0xcef4('0x52');return db[_0xcef4('0x53')][_0xcef4('0x4d')]({'where':{'name':_0x51b821,'userProfileId':_0x295e89[_0xcef4('0x54')]},'raw':!![]})[_0xcef4('0x2c')](function(_0x5232f5){if(_0x5232f5&&_0x5232f5[_0xcef4('0x55')]===0x0){return db[_0xcef4('0x2e')]['create']({'name':_0x4b8d02[_0xcef4('0x31')],'resourceId':_0x4b8d02['id'],'type':_0x5232f5[_0xcef4('0x31')],'sectionId':_0x5232f5['id']},{})[_0xcef4('0x2c')](function(){return _0x5cb4a5;});}else{return _0x5cb4a5;}})[_0xcef4('0x4a')](function(_0x3421ea){logger[_0xcef4('0x2f')](_0xcef4('0x56'),_0x3421ea);throw _0x3421ea;});}return _0x5cb4a5;})[_0xcef4('0x2c')](respondWithResult(_0x3ad11b,0xc9))['catch'](handleError(_0x3ad11b,null));};exports[_0xcef4('0x57')]=function(_0x3a0d7f,_0xb399ea){var _0x3a4d96={'where':{'id':_0x3a0d7f[_0xcef4('0x4b')]['id']}},_0x49ae06={};_0x49ae06[_0xcef4('0x38')]=_[_0xcef4('0x3a')](db[_0xcef4('0x34')]['rawAttributes']);_0x3a4d96['attributes']=_[_0xcef4('0x3d')](_0x49ae06[_0xcef4('0x38')],qs[_0xcef4('0x3e')](_0x3a0d7f[_0xcef4('0x3b')][_0xcef4('0x3e')]));_0x3a4d96[_0xcef4('0x3f')]=_0x3a4d96['attributes'][_0xcef4('0x40')]?_0x3a4d96[_0xcef4('0x3f')]:_0x49ae06[_0xcef4('0x38')];if(_0x3a0d7f['query'][_0xcef4('0x58')]){_0x3a4d96['include']=[{'all':!![]}];}_0x3a4d96=_['merge']({},_0x3a4d96,_0x3a0d7f[_0xcef4('0x46')]);return db[_0xcef4('0x34')][_0xcef4('0x4d')](_0x3a4d96)['then'](handleEntityNotFound(_0xb399ea,null))[_0xcef4('0x2c')](function(_0x520ea8){if(_0x520ea8){var _0x22a7aa=_0x520ea8[_0xcef4('0x2d')]({'plain':!![]});_0x22a7aa=qs[_0xcef4('0x59')](_0x22a7aa,['id',_0xcef4('0x5a'),_0xcef4('0x5b')]);_0x3a0d7f[_0xcef4('0x4f')]=_[_0xcef4('0x59')](_0x3a0d7f[_0xcef4('0x4f')],['id',_0xcef4('0x5a'),_0xcef4('0x5b')]);return db[_0xcef4('0x34')][_0xcef4('0x4e')](_[_0xcef4('0x45')](_0x22a7aa,_0x3a0d7f[_0xcef4('0x4f')]),{'include':_0x3a0d7f['query']['includeAll']?[{'all':!![]}]:undefined})['then'](function(_0x41bc18){var _0xefe3b8=_0x3a0d7f[_0xcef4('0x50')]['get']({'plain':!![]});if(!_0xefe3b8)throw new Error(_0xcef4('0x51'));if(_0xefe3b8[_0xcef4('0x5c')]===_0xcef4('0x50')){var _0x24bc43=_0x41bc18[_0xcef4('0x2d')]({'plain':!![]});var _0x416897=_0xcef4('0x52');return db['UserProfileSection'][_0xcef4('0x4d')]({'where':{'name':_0x416897,'userProfileId':_0xefe3b8['userProfileId']},'raw':!![]})['then'](function(_0xae7d17){if(_0xae7d17&&_0xae7d17[_0xcef4('0x55')]===0x0){return db[_0xcef4('0x2e')]['create']({'name':_0x24bc43[_0xcef4('0x31')],'resourceId':_0x24bc43['id'],'type':_0xae7d17[_0xcef4('0x31')],'sectionId':_0xae7d17['id']},{})['then'](function(){return _0x41bc18;});}else{return _0x41bc18;}})[_0xcef4('0x4a')](function(_0x4947f0){logger[_0xcef4('0x2f')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4947f0);throw _0x4947f0;});}return _0x41bc18;});}})[_0xcef4('0x2c')](respondWithResult(_0xb399ea,0xc9))[_0xcef4('0x4a')](handleError(_0xb399ea,null));};exports[_0xcef4('0x2a')]=function(_0x360f9b,_0xab17af){if(_0x360f9b[_0xcef4('0x4f')]['id']){delete _0x360f9b[_0xcef4('0x4f')]['id'];}return db['Dashboard'][_0xcef4('0x4d')]({'where':{'id':_0x360f9b[_0xcef4('0x4b')]['id']}})[_0xcef4('0x2c')](handleEntityNotFound(_0xab17af,null))[_0xcef4('0x2c')](saveUpdates(_0x360f9b[_0xcef4('0x4f')],null))[_0xcef4('0x2c')](respondWithResult(_0xab17af,null))[_0xcef4('0x4a')](handleError(_0xab17af,null));};exports[_0xcef4('0x2b')]=function(_0x104734,_0x572b46){return db[_0xcef4('0x34')][_0xcef4('0x4d')]({'where':{'id':_0x104734['params']['id']}})[_0xcef4('0x2c')](handleEntityNotFound(_0x572b46,null))[_0xcef4('0x2c')](removeEntity(_0x572b46,null))[_0xcef4('0x4a')](handleError(_0x572b46,null));};function widgetAttributes(_0x84f60e){try{switch(_0x84f60e[_0xcef4('0x36')]){case _0xcef4('0x5d'):return[{'name':_0xcef4('0x5e'),'value':_0x84f60e[_0xcef4('0x5e')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e[_0xcef4('0x5f')][0x0]?_0x84f60e[_0xcef4('0x5f')][0x0]['value']:undefined)||_0xcef4('0x60')}];case _0xcef4('0x61'):return[{'name':_0xcef4('0x62'),'value':_0x84f60e[_0xcef4('0x62')]||(_0x84f60e['attrs']&&_0x84f60e[_0xcef4('0x5f')][0x0]?_0x84f60e[_0xcef4('0x5f')][0x0][_0xcef4('0x63')]:undefined)||''}];case'clock':return[{'name':_0xcef4('0x64'),'value':_0x84f60e[_0xcef4('0x64')]||(_0x84f60e['attrs']&&_0x84f60e[_0xcef4('0x5f')][0x0]?_0x84f60e[_0xcef4('0x5f')][0x0][_0xcef4('0x63')]:undefined)||'HH:mm:ss'},{'name':_0xcef4('0x65'),'value':_0x84f60e[_0xcef4('0x65')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e[_0xcef4('0x5f')][0x1]?_0x84f60e[_0xcef4('0x5f')][0x1][_0xcef4('0x63')]:undefined)||'0.00'},{'name':_0xcef4('0x66'),'value':_0x84f60e['attrFontSize']||(_0x84f60e['attrs']&&_0x84f60e[_0xcef4('0x5f')][0x2]?_0x84f60e[_0xcef4('0x5f')][0x2][_0xcef4('0x63')]:undefined)||0xc}];case _0xcef4('0x67'):return[{'name':_0xcef4('0x68'),'value':_0x84f60e[_0xcef4('0x68')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e[_0xcef4('0x5f')][0x0]?_0x84f60e[_0xcef4('0x5f')][0x0][_0xcef4('0x63')]:undefined)||_0xcef4('0x69')},{'name':_0xcef4('0x6a'),'value':_0x84f60e[_0xcef4('0x6a')]||(_0x84f60e['attrs']&&_0x84f60e[_0xcef4('0x5f')][0x1]?_0x84f60e[_0xcef4('0x5f')][0x1]['value']:undefined)||[]},{'name':_0xcef4('0x66'),'value':_0x84f60e[_0xcef4('0x66')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e[_0xcef4('0x5f')][0x2]?_0x84f60e[_0xcef4('0x5f')][0x2][_0xcef4('0x63')]:undefined)||0x14},{'name':_0xcef4('0x6b'),'value':_0x84f60e[_0xcef4('0x6b')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e[_0xcef4('0x5f')][0x3]?_0x84f60e[_0xcef4('0x5f')][0x3]['value']:undefined)||_0xcef4('0x6c')},{'name':_0xcef4('0x6d'),'value':_0x84f60e[_0xcef4('0x6d')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e[_0xcef4('0x5f')][0x4]?_0x84f60e[_0xcef4('0x5f')][0x4][_0xcef4('0x63')]:undefined)||''},{'name':'attrFaxAccounts','value':_0x84f60e[_0xcef4('0x6e')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e[_0xcef4('0x5f')][0x5]?_0x84f60e[_0xcef4('0x5f')][0x5]['value']:undefined)||''},{'name':_0xcef4('0x6f'),'value':_0x84f60e[_0xcef4('0x6f')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e[_0xcef4('0x5f')][0x6]?_0x84f60e[_0xcef4('0x5f')][0x6][_0xcef4('0x63')]:undefined)||''},{'name':_0xcef4('0x70'),'value':_0x84f60e[_0xcef4('0x70')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e[_0xcef4('0x5f')][0x7]?_0x84f60e['attrs'][0x7]['value']:undefined)||''},{'name':_0xcef4('0x71'),'value':_0x84f60e[_0xcef4('0x71')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e['attrs'][0x8]?_0x84f60e['attrs'][0x8]['value']:undefined)||''},{'name':_0xcef4('0x72'),'value':_0x84f60e[_0xcef4('0x72')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e[_0xcef4('0x5f')][0x9]?_0x84f60e[_0xcef4('0x5f')][0x9][_0xcef4('0x63')]:undefined)||''}];case _0xcef4('0x73'):case _0xcef4('0x74'):return[{'name':'attrSerie1','value':_0x84f60e[_0xcef4('0x75')]||(_0x84f60e['attrs']&&_0x84f60e[_0xcef4('0x5f')][0x0]?_0x84f60e[_0xcef4('0x5f')][0x0]['value']:undefined)||'total'},{'name':_0xcef4('0x76'),'value':_0x84f60e[_0xcef4('0x76')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e['attrs'][0x1]?_0x84f60e[_0xcef4('0x5f')][0x1][_0xcef4('0x63')]:undefined)||null},{'name':'attrSerie3','value':_0x84f60e[_0xcef4('0x77')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e['attrs'][0x2]?_0x84f60e['attrs'][0x2][_0xcef4('0x63')]:undefined)||null},{'name':_0xcef4('0x6a'),'value':_0x84f60e[_0xcef4('0x6a')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e['attrs'][0x3]?_0x84f60e[_0xcef4('0x5f')][0x3]['value']:undefined)||[]},{'name':_0xcef4('0x6b'),'value':_0x84f60e[_0xcef4('0x6b')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e[_0xcef4('0x5f')][0x4]?_0x84f60e[_0xcef4('0x5f')][0x4][_0xcef4('0x63')]:undefined)||_0xcef4('0x6c')},{'name':_0xcef4('0x6d'),'value':_0x84f60e['attrEmailAccounts']||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e['attrs'][0x5]?_0x84f60e[_0xcef4('0x5f')][0x5]['value']:undefined)||''},{'name':_0xcef4('0x6e'),'value':_0x84f60e[_0xcef4('0x6e')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e['attrs'][0x6]?_0x84f60e[_0xcef4('0x5f')][0x6][_0xcef4('0x63')]:undefined)||''},{'name':_0xcef4('0x6f'),'value':_0x84f60e[_0xcef4('0x6f')]||(_0x84f60e['attrs']&&_0x84f60e[_0xcef4('0x5f')][0x7]?_0x84f60e[_0xcef4('0x5f')][0x7]['value']:undefined)||''},{'name':'attrOpenchannelAccounts','value':_0x84f60e[_0xcef4('0x70')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e[_0xcef4('0x5f')][0x8]?_0x84f60e['attrs'][0x8][_0xcef4('0x63')]:undefined)||''},{'name':_0xcef4('0x71'),'value':_0x84f60e[_0xcef4('0x71')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e[_0xcef4('0x5f')][0x9]?_0x84f60e[_0xcef4('0x5f')][0x9]['value']:undefined)||''},{'name':_0xcef4('0x72'),'value':_0x84f60e[_0xcef4('0x72')]||(_0x84f60e['attrs']&&_0x84f60e['attrs'][0xa]?_0x84f60e[_0xcef4('0x5f')][0xa][_0xcef4('0x63')]:undefined)||''}];case _0xcef4('0x78'):return[{'name':'attrReport','type':_0x84f60e[_0xcef4('0x79')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e['attrs'][0x0]?_0x84f60e[_0xcef4('0x5f')][0x0][_0xcef4('0x36')]:undefined)||null,'value':_0x84f60e[_0xcef4('0x7a')]||(_0x84f60e['attrs']&&_0x84f60e['attrs'][0x0]?_0x84f60e[_0xcef4('0x5f')][0x0][_0xcef4('0x63')]:undefined)||null},{'name':_0xcef4('0x7b'),'value':_0x84f60e[_0xcef4('0x7b')]||(_0x84f60e[_0xcef4('0x5f')]&&_0x84f60e[_0xcef4('0x5f')][0x1]?_0x84f60e['attrs'][0x1]['value']:undefined)||0x0}];default:return[];}}catch(_0x30b43){logger['error']('widgetAttributes:\x20%s',JSON[_0xcef4('0x7c')](_0x30b43));return[];}}exports[_0xcef4('0x7d')]=function(_0x453fcf,_0x348f3e,_0x154823){if(_0x453fcf['body']['id']){delete _0x453fcf[_0xcef4('0x4f')]['id'];}return db[_0xcef4('0x34')][_0xcef4('0x4d')]({'where':{'id':_0x453fcf[_0xcef4('0x4b')]['id']}})['then'](handleEntityNotFound(_0x348f3e,null))['then'](function(_0x4251e7){if(_0x4251e7){_0x453fcf[_0xcef4('0x4f')]['DashboardId']=_0x4251e7['id'];_0x453fcf[_0xcef4('0x4f')][_0xcef4('0x5f')]=widgetAttributes(_0x453fcf[_0xcef4('0x4f')]);return db['DashboardItem'][_0xcef4('0x4e')](_0x453fcf[_0xcef4('0x4f')]);}})[_0xcef4('0x2c')](respondWithResult(_0x348f3e,null))['catch'](handleError(_0x348f3e,null));};exports[_0xcef4('0x7e')]=function(_0x1dba2f,_0x2c7fc1,_0x48febf){var _0x13d7a0={};var _0x1ecbfb={};var _0x3bad76;var _0x37facf;return db[_0xcef4('0x34')][_0xcef4('0x7f')]({'where':{'id':_0x1dba2f[_0xcef4('0x4b')]['id']}})['then'](handleEntityNotFound(_0x2c7fc1,null))[_0xcef4('0x2c')](function(_0x24ff4a){if(_0x24ff4a){_0x3bad76=_0x24ff4a;_0x1ecbfb[_0xcef4('0x38')]=_[_0xcef4('0x3a')](db[_0xcef4('0x80')][_0xcef4('0x4c')]);_0x1ecbfb[_0xcef4('0x3b')]=_['keys'](_0x1dba2f[_0xcef4('0x3b')]);_0x1ecbfb[_0xcef4('0x3c')]=_[_0xcef4('0x3d')](_0x1ecbfb['model'],_0x1ecbfb['query']);_0x13d7a0[_0xcef4('0x3f')]=_[_0xcef4('0x3d')](_0x1ecbfb[_0xcef4('0x38')],qs[_0xcef4('0x3e')](_0x1dba2f['query'][_0xcef4('0x3e')]));_0x13d7a0['attributes']=_0x13d7a0[_0xcef4('0x3f')][_0xcef4('0x40')]?_0x13d7a0[_0xcef4('0x3f')]:_0x1ecbfb[_0xcef4('0x38')];_0x13d7a0[_0xcef4('0x41')]=qs['sort'](_0x1dba2f[_0xcef4('0x3b')][_0xcef4('0x42')]);_0x13d7a0[_0xcef4('0x43')]=qs[_0xcef4('0x3c')](_[_0xcef4('0x44')](_0x1dba2f[_0xcef4('0x3b')],_0x1ecbfb[_0xcef4('0x3c')]));if(_0x1dba2f[_0xcef4('0x3b')][_0xcef4('0x81')]){_0x13d7a0[_0xcef4('0x43')]=_[_0xcef4('0x45')](_0x13d7a0[_0xcef4('0x43')],{'$or':_[_0xcef4('0x39')](_0x13d7a0[_0xcef4('0x3f')],function(_0x3df242){var _0x4ac011={};_0x4ac011[_0x3df242]={'$like':'%'+_0x1dba2f[_0xcef4('0x3b')][_0xcef4('0x81')]+'%'};return _0x4ac011;})});}_0x13d7a0=_[_0xcef4('0x45')]({},_0x13d7a0,_0x1dba2f[_0xcef4('0x46')]);return _0x3bad76[_0xcef4('0x7e')](_0x13d7a0);}})[_0xcef4('0x2c')](function(_0x162e3b){if(_0x162e3b){_0x37facf=_0x162e3b[_0xcef4('0x40')];if(!_0x1dba2f[_0xcef4('0x3b')][_0xcef4('0x82')](_0xcef4('0x83'))){_0x13d7a0['limit']=qs[_0xcef4('0x23')](_0x1dba2f[_0xcef4('0x3b')][_0xcef4('0x23')]);_0x13d7a0[_0xcef4('0x21')]=qs[_0xcef4('0x21')](_0x1dba2f[_0xcef4('0x3b')][_0xcef4('0x21')]);}return _0x3bad76['getItems'](_0x13d7a0);}})[_0xcef4('0x2c')](function(_0x59366c){if(_0x59366c){return _0x59366c?{'count':_0x37facf,'rows':_0x59366c}:null;}})[_0xcef4('0x2c')](respondWithResult(_0x2c7fc1,null))[_0xcef4('0x4a')](handleError(_0x2c7fc1,null));};
\ No newline at end of file
+var _0x1f01=['merge','options','includeAll','include','findAll','rows','catch','show','rawAttributes','create','body','user','get','role','UserProfileSection','find','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','params','omit','createdAt','updatedAt','Unable\x20to\x20retrieve\x20the\x20current\x20user','update','iframe','attrUrl','attrs','value','https://','custom','attrPath','clock','attrHourFormat','HH:mm:ss','attrTimezone','attrFontSize','counter','attrMetric','attrVoiceQueues','attrChannel','attrFaxAccounts','attrSmsAccounts','attrOpenchannelAccounts','attrWhatsappAccounts','attrChatWebsites','pie-chart','attrSerie1','total','attrSerie2','attrSerie3','voice','attrEmailAccounts','web-report','attrReport','reportType','attrRefresh','widgetAttributes:\x20%s','DashboardId','DashboardItem','getItems','findOne','map','rimraf','zip-dir','fast-json-patch','request-promise','moment','util','path','sox','fs-extra','lodash','squel','crypto','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','defaults','localhost','socket.io-emitter','./dashboard.socket','register','sendStatus','status','json','offset','undefined','limit','count','Content-Range','apply','reject','save','then','destroy','CustomDashboards','end','error','stack','name','send','index','Dashboard','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','pick','filter','where'];(function(_0x99f08d,_0x3a5708){var _0x255b15=function(_0x406d87){while(--_0x406d87){_0x99f08d['push'](_0x99f08d['shift']());}};_0x255b15(++_0x3a5708);}(_0x1f01,0x1d9));var _0x11f0=function(_0x38c699,_0x56fea7){_0x38c699=_0x38c699-0x0;var _0x3b1ded=_0x1f01[_0x38c699];return _0x3b1ded;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x11f0('0x0'));var zipdir=require(_0x11f0('0x1'));var jsonpatch=require(_0x11f0('0x2'));var rp=require(_0x11f0('0x3'));var moment=require(_0x11f0('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x11f0('0x5'));var path=require(_0x11f0('0x6'));var sox=require(_0x11f0('0x7'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x11f0('0x8'));var _=require(_0x11f0('0x9'));var squel=require(_0x11f0('0xa'));var crypto=require(_0x11f0('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x11f0('0xc'));var toCsv=require(_0x11f0('0xd'));var querystring=require(_0x11f0('0xe'));var Papa=require(_0x11f0('0xf'));var Redis=require(_0x11f0('0x10'));var authService=require(_0x11f0('0x11'));var qs=require(_0x11f0('0x12'));var as=require(_0x11f0('0x13'));var hardwareService=require(_0x11f0('0x14'));var logger=require('../../config/logger')(_0x11f0('0x15'));var utils=require(_0x11f0('0x16'));var config=require(_0x11f0('0x17'));var licenseUtil=require(_0x11f0('0x18'));var db=require(_0x11f0('0x19'))['db'];config[_0x11f0('0x1a')]=_[_0x11f0('0x1b')](config[_0x11f0('0x1a')],{'host':_0x11f0('0x1c'),'port':0x18eb});var socket=require(_0x11f0('0x1d'))(new Redis(config['redis']));require(_0x11f0('0x1e'))[_0x11f0('0x1f')](socket);function respondWithStatusCode(_0x1ea769,_0x190bb2){_0x190bb2=_0x190bb2||0xcc;return function(_0x1b17dc){if(_0x1b17dc){return _0x1ea769[_0x11f0('0x20')](_0x190bb2);}return _0x1ea769['status'](_0x190bb2)['end']();};}function respondWithResult(_0x428014,_0x3182b5){_0x3182b5=_0x3182b5||0xc8;return function(_0x4817fe){if(_0x4817fe){return _0x428014[_0x11f0('0x21')](_0x3182b5)[_0x11f0('0x22')](_0x4817fe);}};}function respondWithFilteredResult(_0x3e5591,_0x4b867d){return function(_0x5eebd3){if(_0x5eebd3){var _0x10b54d=typeof _0x4b867d[_0x11f0('0x23')]===_0x11f0('0x24')&&typeof _0x4b867d[_0x11f0('0x25')]===_0x11f0('0x24');var _0x28f00d=_0x5eebd3[_0x11f0('0x26')];var _0x5e83e3=_0x10b54d?0x0:_0x4b867d[_0x11f0('0x23')];var _0x33aab5=_0x10b54d?_0x5eebd3[_0x11f0('0x26')]:_0x4b867d[_0x11f0('0x23')]+_0x4b867d['limit'];var _0x5c6898;if(_0x33aab5>=_0x28f00d){_0x33aab5=_0x28f00d;_0x5c6898=0xc8;}else{_0x5c6898=0xce;}_0x3e5591['status'](_0x5c6898);return _0x3e5591['set'](_0x11f0('0x27'),_0x5e83e3+'-'+_0x33aab5+'/'+_0x28f00d)[_0x11f0('0x22')](_0x5eebd3);}return null;};}function patchUpdates(_0xc50271){return function(_0x454078){try{jsonpatch[_0x11f0('0x28')](_0x454078,_0xc50271,!![]);}catch(_0x512742){return BPromise[_0x11f0('0x29')](_0x512742);}return _0x454078[_0x11f0('0x2a')]();};}function saveUpdates(_0x379a8e,_0x34b81a){return function(_0x508e11){if(_0x508e11){return _0x508e11['update'](_0x379a8e)[_0x11f0('0x2b')](function(_0x1b8bd7){return _0x1b8bd7;});}return null;};}function removeEntity(_0x114d2e,_0x133e64){return function(_0x3bacfa){if(_0x3bacfa){return _0x3bacfa[_0x11f0('0x2c')]()[_0x11f0('0x2b')](function(){var _0x2170db=_0x3bacfa['get']({'plain':!![]});var _0x8afa9c=_0x11f0('0x2d');return db['UserProfileResource']['destroy']({'where':{'type':_0x8afa9c,'resourceId':_0x2170db['id']}})[_0x11f0('0x2b')](function(){return _0x3bacfa;});})[_0x11f0('0x2b')](function(){_0x114d2e['status'](0xcc)[_0x11f0('0x2e')]();});}};}function handleEntityNotFound(_0x9b32c8,_0x5273dc){return function(_0x1ab674){if(!_0x1ab674){_0x9b32c8[_0x11f0('0x20')](0x194);}return _0x1ab674;};}function handleError(_0x2ffa5a,_0x4a7b97){_0x4a7b97=_0x4a7b97||0x1f4;return function(_0x1b6cd5){logger[_0x11f0('0x2f')](_0x1b6cd5[_0x11f0('0x30')]);if(_0x1b6cd5[_0x11f0('0x31')]){delete _0x1b6cd5[_0x11f0('0x31')];}_0x2ffa5a['status'](_0x4a7b97)[_0x11f0('0x32')](_0x1b6cd5);};}exports[_0x11f0('0x33')]=function(_0x5a2bc9,_0x5e6bb6){var _0x220e1a={},_0x546340={},_0x2c57df={'count':0x0,'rows':[]};var _0x798d86=_['map'](db[_0x11f0('0x34')]['rawAttributes'],function(_0x3b7fa5){return{'name':_0x3b7fa5[_0x11f0('0x35')],'type':_0x3b7fa5[_0x11f0('0x36')][_0x11f0('0x37')]};});_0x546340[_0x11f0('0x38')]=_['map'](_0x798d86,'name');_0x546340[_0x11f0('0x39')]=_[_0x11f0('0x3a')](_0x5a2bc9[_0x11f0('0x39')]);_0x546340[_0x11f0('0x3b')]=_['intersection'](_0x546340[_0x11f0('0x38')],_0x546340[_0x11f0('0x39')]);_0x220e1a['attributes']=_[_0x11f0('0x3c')](_0x546340['model'],qs[_0x11f0('0x3d')](_0x5a2bc9[_0x11f0('0x39')][_0x11f0('0x3d')]));_0x220e1a['attributes']=_0x220e1a[_0x11f0('0x3e')][_0x11f0('0x3f')]?_0x220e1a[_0x11f0('0x3e')]:_0x546340[_0x11f0('0x38')];if(!_0x5a2bc9[_0x11f0('0x39')][_0x11f0('0x40')](_0x11f0('0x41'))){_0x220e1a[_0x11f0('0x25')]=qs[_0x11f0('0x25')](_0x5a2bc9['query'][_0x11f0('0x25')]);_0x220e1a['offset']=qs[_0x11f0('0x23')](_0x5a2bc9[_0x11f0('0x39')][_0x11f0('0x23')]);}_0x220e1a[_0x11f0('0x42')]=qs[_0x11f0('0x43')](_0x5a2bc9['query']['sort']);_0x220e1a['where']=qs['filters'](_[_0x11f0('0x44')](_0x5a2bc9[_0x11f0('0x39')],_0x546340[_0x11f0('0x3b')]),_0x798d86);if(_0x5a2bc9[_0x11f0('0x39')][_0x11f0('0x45')]){_0x220e1a[_0x11f0('0x46')]=_[_0x11f0('0x47')](_0x220e1a[_0x11f0('0x46')],{'$or':_['map'](_0x798d86,function(_0xa0a3d6){if(_0xa0a3d6['type']!=='VIRTUAL'){var _0x1e7e0a={};_0x1e7e0a[_0xa0a3d6['name']]={'$like':'%'+_0x5a2bc9[_0x11f0('0x39')][_0x11f0('0x45')]+'%'};return _0x1e7e0a;}})});}_0x220e1a=_[_0x11f0('0x47')]({},_0x220e1a,_0x5a2bc9[_0x11f0('0x48')]);var _0x1186b6={'where':_0x220e1a['where']};return db[_0x11f0('0x34')][_0x11f0('0x26')](_0x1186b6)['then'](function(_0x2a76a4){_0x2c57df[_0x11f0('0x26')]=_0x2a76a4;if(_0x5a2bc9['query'][_0x11f0('0x49')]){_0x220e1a[_0x11f0('0x4a')]=[{'all':!![]}];}return db[_0x11f0('0x34')][_0x11f0('0x4b')](_0x220e1a);})[_0x11f0('0x2b')](function(_0x53a4ac){_0x2c57df[_0x11f0('0x4c')]=_0x53a4ac;return _0x2c57df;})[_0x11f0('0x2b')](respondWithFilteredResult(_0x5e6bb6,_0x220e1a))[_0x11f0('0x4d')](handleError(_0x5e6bb6,null));};exports[_0x11f0('0x4e')]=function(_0x31c3c6,_0x5cd41d){var _0x5418b2={'raw':![],'where':{'id':_0x31c3c6['params']['id']}},_0x5df3f8={};_0x5df3f8[_0x11f0('0x38')]=_[_0x11f0('0x3a')](db[_0x11f0('0x34')][_0x11f0('0x4f')]);_0x5df3f8[_0x11f0('0x39')]=_[_0x11f0('0x3a')](_0x31c3c6['query']);_0x5df3f8[_0x11f0('0x3b')]=_[_0x11f0('0x3c')](_0x5df3f8[_0x11f0('0x38')],_0x5df3f8[_0x11f0('0x39')]);_0x5418b2[_0x11f0('0x3e')]=_[_0x11f0('0x3c')](_0x5df3f8[_0x11f0('0x38')],qs['fields'](_0x31c3c6[_0x11f0('0x39')][_0x11f0('0x3d')]));_0x5418b2[_0x11f0('0x3e')]=_0x5418b2[_0x11f0('0x3e')][_0x11f0('0x3f')]?_0x5418b2[_0x11f0('0x3e')]:_0x5df3f8[_0x11f0('0x38')];if(_0x31c3c6[_0x11f0('0x39')][_0x11f0('0x49')]){_0x5418b2['include']=[{'all':!![]}];}_0x5418b2=_[_0x11f0('0x47')]({},_0x5418b2,_0x31c3c6[_0x11f0('0x48')]);return db['Dashboard']['find'](_0x5418b2)[_0x11f0('0x2b')](handleEntityNotFound(_0x5cd41d,null))['then'](respondWithResult(_0x5cd41d,null))[_0x11f0('0x4d')](handleError(_0x5cd41d,null));};exports['create']=function(_0x915566,_0x18a6e9){return db[_0x11f0('0x34')][_0x11f0('0x50')](_0x915566[_0x11f0('0x51')],{})['then'](function(_0x33f950){var _0x4ff3a4=_0x915566[_0x11f0('0x52')][_0x11f0('0x53')]({'plain':!![]});if(!_0x4ff3a4)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x4ff3a4[_0x11f0('0x54')]===_0x11f0('0x52')){var _0x497f12=_0x33f950[_0x11f0('0x53')]({'plain':!![]});var _0x5cd2fe='CustomDashboards';return db[_0x11f0('0x55')][_0x11f0('0x56')]({'where':{'name':_0x5cd2fe,'userProfileId':_0x4ff3a4[_0x11f0('0x57')]},'raw':!![]})[_0x11f0('0x2b')](function(_0x50e02e){if(_0x50e02e&&_0x50e02e[_0x11f0('0x58')]===0x0){return db[_0x11f0('0x59')][_0x11f0('0x50')]({'name':_0x497f12[_0x11f0('0x31')],'resourceId':_0x497f12['id'],'type':_0x50e02e[_0x11f0('0x31')],'sectionId':_0x50e02e['id']},{})[_0x11f0('0x2b')](function(){return _0x33f950;});}else{return _0x33f950;}})[_0x11f0('0x4d')](function(_0x141c3a){logger[_0x11f0('0x2f')](_0x11f0('0x5a'),_0x141c3a);throw _0x141c3a;});}return _0x33f950;})[_0x11f0('0x2b')](respondWithResult(_0x18a6e9,0xc9))[_0x11f0('0x4d')](handleError(_0x18a6e9,null));};exports[_0x11f0('0x5b')]=function(_0x15d109,_0x550f53){var _0xa9e83a={'where':{'id':_0x15d109[_0x11f0('0x5c')]['id']}},_0x3cb5ee={};_0x3cb5ee[_0x11f0('0x38')]=_['keys'](db[_0x11f0('0x34')]['rawAttributes']);_0xa9e83a[_0x11f0('0x3e')]=_[_0x11f0('0x3c')](_0x3cb5ee['model'],qs[_0x11f0('0x3d')](_0x15d109['query']['fields']));_0xa9e83a[_0x11f0('0x3e')]=_0xa9e83a[_0x11f0('0x3e')]['length']?_0xa9e83a[_0x11f0('0x3e')]:_0x3cb5ee[_0x11f0('0x38')];if(_0x15d109[_0x11f0('0x39')][_0x11f0('0x49')]){_0xa9e83a['include']=[{'all':!![]}];}_0xa9e83a=_[_0x11f0('0x47')]({},_0xa9e83a,_0x15d109['options']);return db[_0x11f0('0x34')][_0x11f0('0x56')](_0xa9e83a)[_0x11f0('0x2b')](handleEntityNotFound(_0x550f53,null))['then'](function(_0x180a7f){if(_0x180a7f){var _0x50b658=_0x180a7f[_0x11f0('0x53')]({'plain':!![]});_0x50b658=qs[_0x11f0('0x5d')](_0x50b658,['id',_0x11f0('0x5e'),_0x11f0('0x5f')]);_0x15d109[_0x11f0('0x51')]=_[_0x11f0('0x5d')](_0x15d109[_0x11f0('0x51')],['id',_0x11f0('0x5e'),'updatedAt']);return db['Dashboard'][_0x11f0('0x50')](_['merge'](_0x50b658,_0x15d109[_0x11f0('0x51')]),{'include':_0x15d109[_0x11f0('0x39')][_0x11f0('0x49')]?[{'all':!![]}]:undefined})['then'](function(_0x162ebd){var _0x12fc0f=_0x15d109[_0x11f0('0x52')][_0x11f0('0x53')]({'plain':!![]});if(!_0x12fc0f)throw new Error(_0x11f0('0x60'));if(_0x12fc0f[_0x11f0('0x54')]===_0x11f0('0x52')){var _0x47f018=_0x162ebd[_0x11f0('0x53')]({'plain':!![]});var _0x33886e=_0x11f0('0x2d');return db[_0x11f0('0x55')][_0x11f0('0x56')]({'where':{'name':_0x33886e,'userProfileId':_0x12fc0f['userProfileId']},'raw':!![]})[_0x11f0('0x2b')](function(_0x818aaf){if(_0x818aaf&&_0x818aaf[_0x11f0('0x58')]===0x0){return db[_0x11f0('0x59')][_0x11f0('0x50')]({'name':_0x47f018[_0x11f0('0x31')],'resourceId':_0x47f018['id'],'type':_0x818aaf[_0x11f0('0x31')],'sectionId':_0x818aaf['id']},{})['then'](function(){return _0x162ebd;});}else{return _0x162ebd;}})[_0x11f0('0x4d')](function(_0x261711){logger[_0x11f0('0x2f')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x261711);throw _0x261711;});}return _0x162ebd;});}})['then'](respondWithResult(_0x550f53,0xc9))[_0x11f0('0x4d')](handleError(_0x550f53,null));};exports[_0x11f0('0x61')]=function(_0x23bc22,_0x45777b){if(_0x23bc22['body']['id']){delete _0x23bc22[_0x11f0('0x51')]['id'];}return db[_0x11f0('0x34')]['find']({'where':{'id':_0x23bc22['params']['id']}})['then'](handleEntityNotFound(_0x45777b,null))['then'](saveUpdates(_0x23bc22[_0x11f0('0x51')],null))[_0x11f0('0x2b')](respondWithResult(_0x45777b,null))[_0x11f0('0x4d')](handleError(_0x45777b,null));};exports[_0x11f0('0x2c')]=function(_0x1ad46c,_0x90b13e){return db[_0x11f0('0x34')][_0x11f0('0x56')]({'where':{'id':_0x1ad46c[_0x11f0('0x5c')]['id']}})['then'](handleEntityNotFound(_0x90b13e,null))['then'](removeEntity(_0x90b13e,null))[_0x11f0('0x4d')](handleError(_0x90b13e,null));};function widgetAttributes(_0x4b9d15){try{switch(_0x4b9d15[_0x11f0('0x36')]){case _0x11f0('0x62'):return[{'name':_0x11f0('0x63'),'value':_0x4b9d15[_0x11f0('0x63')]||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15[_0x11f0('0x64')][0x0]?_0x4b9d15[_0x11f0('0x64')][0x0][_0x11f0('0x65')]:undefined)||_0x11f0('0x66')}];case _0x11f0('0x67'):return[{'name':_0x11f0('0x68'),'value':_0x4b9d15[_0x11f0('0x68')]||(_0x4b9d15['attrs']&&_0x4b9d15[_0x11f0('0x64')][0x0]?_0x4b9d15[_0x11f0('0x64')][0x0]['value']:undefined)||''}];case _0x11f0('0x69'):return[{'name':_0x11f0('0x6a'),'value':_0x4b9d15[_0x11f0('0x6a')]||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15[_0x11f0('0x64')][0x0]?_0x4b9d15['attrs'][0x0][_0x11f0('0x65')]:undefined)||_0x11f0('0x6b')},{'name':_0x11f0('0x6c'),'value':_0x4b9d15[_0x11f0('0x6c')]||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15[_0x11f0('0x64')][0x1]?_0x4b9d15[_0x11f0('0x64')][0x1]['value']:undefined)||'0.00'},{'name':_0x11f0('0x6d'),'value':_0x4b9d15[_0x11f0('0x6d')]||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15['attrs'][0x2]?_0x4b9d15[_0x11f0('0x64')][0x2][_0x11f0('0x65')]:undefined)||0xc}];case _0x11f0('0x6e'):return[{'name':_0x11f0('0x6f'),'value':_0x4b9d15[_0x11f0('0x6f')]||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15[_0x11f0('0x64')][0x0]?_0x4b9d15[_0x11f0('0x64')][0x0][_0x11f0('0x65')]:undefined)||'total'},{'name':'attrVoiceQueues','value':_0x4b9d15[_0x11f0('0x70')]||(_0x4b9d15['attrs']&&_0x4b9d15['attrs'][0x1]?_0x4b9d15[_0x11f0('0x64')][0x1][_0x11f0('0x65')]:undefined)||[]},{'name':_0x11f0('0x6d'),'value':_0x4b9d15[_0x11f0('0x6d')]||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15[_0x11f0('0x64')][0x2]?_0x4b9d15[_0x11f0('0x64')][0x2]['value']:undefined)||0x14},{'name':_0x11f0('0x71'),'value':_0x4b9d15[_0x11f0('0x71')]||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15[_0x11f0('0x64')][0x3]?_0x4b9d15[_0x11f0('0x64')][0x3][_0x11f0('0x65')]:undefined)||'voice'},{'name':'attrEmailAccounts','value':_0x4b9d15['attrEmailAccounts']||(_0x4b9d15['attrs']&&_0x4b9d15[_0x11f0('0x64')][0x4]?_0x4b9d15[_0x11f0('0x64')][0x4]['value']:undefined)||''},{'name':_0x11f0('0x72'),'value':_0x4b9d15[_0x11f0('0x72')]||(_0x4b9d15['attrs']&&_0x4b9d15[_0x11f0('0x64')][0x5]?_0x4b9d15[_0x11f0('0x64')][0x5][_0x11f0('0x65')]:undefined)||''},{'name':_0x11f0('0x73'),'value':_0x4b9d15[_0x11f0('0x73')]||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15[_0x11f0('0x64')][0x6]?_0x4b9d15[_0x11f0('0x64')][0x6][_0x11f0('0x65')]:undefined)||''},{'name':'attrOpenchannelAccounts','value':_0x4b9d15[_0x11f0('0x74')]||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15[_0x11f0('0x64')][0x7]?_0x4b9d15[_0x11f0('0x64')][0x7][_0x11f0('0x65')]:undefined)||''},{'name':'attrWhatsappAccounts','value':_0x4b9d15[_0x11f0('0x75')]||(_0x4b9d15['attrs']&&_0x4b9d15[_0x11f0('0x64')][0x8]?_0x4b9d15[_0x11f0('0x64')][0x8][_0x11f0('0x65')]:undefined)||''},{'name':'attrChatWebsites','value':_0x4b9d15[_0x11f0('0x76')]||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15[_0x11f0('0x64')][0x9]?_0x4b9d15[_0x11f0('0x64')][0x9]['value']:undefined)||''}];case'multibar-chart':case _0x11f0('0x77'):return[{'name':'attrSerie1','value':_0x4b9d15[_0x11f0('0x78')]||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15[_0x11f0('0x64')][0x0]?_0x4b9d15[_0x11f0('0x64')][0x0][_0x11f0('0x65')]:undefined)||_0x11f0('0x79')},{'name':_0x11f0('0x7a'),'value':_0x4b9d15[_0x11f0('0x7a')]||(_0x4b9d15['attrs']&&_0x4b9d15[_0x11f0('0x64')][0x1]?_0x4b9d15[_0x11f0('0x64')][0x1]['value']:undefined)||null},{'name':_0x11f0('0x7b'),'value':_0x4b9d15[_0x11f0('0x7b')]||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15[_0x11f0('0x64')][0x2]?_0x4b9d15[_0x11f0('0x64')][0x2]['value']:undefined)||null},{'name':_0x11f0('0x70'),'value':_0x4b9d15[_0x11f0('0x70')]||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15[_0x11f0('0x64')][0x3]?_0x4b9d15['attrs'][0x3][_0x11f0('0x65')]:undefined)||[]},{'name':_0x11f0('0x71'),'value':_0x4b9d15[_0x11f0('0x71')]||(_0x4b9d15['attrs']&&_0x4b9d15[_0x11f0('0x64')][0x4]?_0x4b9d15['attrs'][0x4][_0x11f0('0x65')]:undefined)||_0x11f0('0x7c')},{'name':_0x11f0('0x7d'),'value':_0x4b9d15['attrEmailAccounts']||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15['attrs'][0x5]?_0x4b9d15[_0x11f0('0x64')][0x5][_0x11f0('0x65')]:undefined)||''},{'name':_0x11f0('0x72'),'value':_0x4b9d15[_0x11f0('0x72')]||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15[_0x11f0('0x64')][0x6]?_0x4b9d15[_0x11f0('0x64')][0x6][_0x11f0('0x65')]:undefined)||''},{'name':_0x11f0('0x73'),'value':_0x4b9d15['attrSmsAccounts']||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15[_0x11f0('0x64')][0x7]?_0x4b9d15[_0x11f0('0x64')][0x7][_0x11f0('0x65')]:undefined)||''},{'name':_0x11f0('0x74'),'value':_0x4b9d15[_0x11f0('0x74')]||(_0x4b9d15['attrs']&&_0x4b9d15[_0x11f0('0x64')][0x8]?_0x4b9d15[_0x11f0('0x64')][0x8]['value']:undefined)||''},{'name':_0x11f0('0x75'),'value':_0x4b9d15[_0x11f0('0x75')]||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15[_0x11f0('0x64')][0x9]?_0x4b9d15[_0x11f0('0x64')][0x9][_0x11f0('0x65')]:undefined)||''},{'name':_0x11f0('0x76'),'value':_0x4b9d15[_0x11f0('0x76')]||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15[_0x11f0('0x64')][0xa]?_0x4b9d15[_0x11f0('0x64')][0xa][_0x11f0('0x65')]:undefined)||''}];case _0x11f0('0x7e'):return[{'name':_0x11f0('0x7f'),'type':_0x4b9d15[_0x11f0('0x80')]||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15['attrs'][0x0]?_0x4b9d15[_0x11f0('0x64')][0x0][_0x11f0('0x36')]:undefined)||null,'value':_0x4b9d15[_0x11f0('0x7f')]||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15['attrs'][0x0]?_0x4b9d15[_0x11f0('0x64')][0x0]['value']:undefined)||null},{'name':'attrRefresh','value':_0x4b9d15[_0x11f0('0x81')]||(_0x4b9d15[_0x11f0('0x64')]&&_0x4b9d15[_0x11f0('0x64')][0x1]?_0x4b9d15[_0x11f0('0x64')][0x1][_0x11f0('0x65')]:undefined)||0x0}];default:return[];}}catch(_0x4c96db){logger['error'](_0x11f0('0x82'),JSON['stringify'](_0x4c96db));return[];}}exports['addItem']=function(_0x138851,_0x394ec4,_0x52b281){if(_0x138851[_0x11f0('0x51')]['id']){delete _0x138851[_0x11f0('0x51')]['id'];}return db[_0x11f0('0x34')]['find']({'where':{'id':_0x138851[_0x11f0('0x5c')]['id']}})[_0x11f0('0x2b')](handleEntityNotFound(_0x394ec4,null))[_0x11f0('0x2b')](function(_0x343ca7){if(_0x343ca7){_0x138851[_0x11f0('0x51')][_0x11f0('0x83')]=_0x343ca7['id'];_0x138851['body'][_0x11f0('0x64')]=widgetAttributes(_0x138851[_0x11f0('0x51')]);return db[_0x11f0('0x84')][_0x11f0('0x50')](_0x138851[_0x11f0('0x51')]);}})[_0x11f0('0x2b')](respondWithResult(_0x394ec4,null))[_0x11f0('0x4d')](handleError(_0x394ec4,null));};exports[_0x11f0('0x85')]=function(_0x23a4fc,_0x44947c,_0x3d0222){var _0x3b9ae7={};var _0x4bf505={};var _0x161eaa;var _0x391bb4;return db['Dashboard'][_0x11f0('0x86')]({'where':{'id':_0x23a4fc[_0x11f0('0x5c')]['id']}})[_0x11f0('0x2b')](handleEntityNotFound(_0x44947c,null))['then'](function(_0x57ca02){if(_0x57ca02){_0x161eaa=_0x57ca02;_0x4bf505['model']=_[_0x11f0('0x3a')](db[_0x11f0('0x84')]['rawAttributes']);_0x4bf505[_0x11f0('0x39')]=_['keys'](_0x23a4fc[_0x11f0('0x39')]);_0x4bf505[_0x11f0('0x3b')]=_['intersection'](_0x4bf505[_0x11f0('0x38')],_0x4bf505[_0x11f0('0x39')]);_0x3b9ae7[_0x11f0('0x3e')]=_['intersection'](_0x4bf505[_0x11f0('0x38')],qs[_0x11f0('0x3d')](_0x23a4fc[_0x11f0('0x39')][_0x11f0('0x3d')]));_0x3b9ae7[_0x11f0('0x3e')]=_0x3b9ae7['attributes']['length']?_0x3b9ae7['attributes']:_0x4bf505['model'];_0x3b9ae7['order']=qs['sort'](_0x23a4fc[_0x11f0('0x39')][_0x11f0('0x43')]);_0x3b9ae7[_0x11f0('0x46')]=qs[_0x11f0('0x3b')](_[_0x11f0('0x44')](_0x23a4fc[_0x11f0('0x39')],_0x4bf505[_0x11f0('0x3b')]));if(_0x23a4fc[_0x11f0('0x39')][_0x11f0('0x45')]){_0x3b9ae7['where']=_['merge'](_0x3b9ae7[_0x11f0('0x46')],{'$or':_[_0x11f0('0x87')](_0x3b9ae7[_0x11f0('0x3e')],function(_0x242e61){var _0x32f304={};_0x32f304[_0x242e61]={'$like':'%'+_0x23a4fc[_0x11f0('0x39')][_0x11f0('0x45')]+'%'};return _0x32f304;})});}_0x3b9ae7=_['merge']({},_0x3b9ae7,_0x23a4fc['options']);return _0x161eaa[_0x11f0('0x85')](_0x3b9ae7);}})['then'](function(_0x42bb07){if(_0x42bb07){_0x391bb4=_0x42bb07['length'];if(!_0x23a4fc[_0x11f0('0x39')]['hasOwnProperty'](_0x11f0('0x41'))){_0x3b9ae7['limit']=qs[_0x11f0('0x25')](_0x23a4fc['query']['limit']);_0x3b9ae7[_0x11f0('0x23')]=qs['offset'](_0x23a4fc[_0x11f0('0x39')][_0x11f0('0x23')]);}return _0x161eaa['getItems'](_0x3b9ae7);}})[_0x11f0('0x2b')](function(_0x1b19fa){if(_0x1b19fa){return _0x1b19fa?{'count':_0x391bb4,'rows':_0x1b19fa}:null;}})[_0x11f0('0x2b')](respondWithResult(_0x44947c,null))[_0x11f0('0x4d')](handleError(_0x44947c,null));};
\ No newline at end of file
index 43d9da9..393a60e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x74f7=['emit','hasOwnProperty','hook','Dashboard','setMaxListeners','save'];(function(_0x1db831,_0x42b7b5){var _0x39ba56=function(_0x2c2dd3){while(--_0x2c2dd3){_0x1db831['push'](_0x1db831['shift']());}};_0x39ba56(++_0x42b7b5);}(_0x74f7,0xbd));var _0x774f=function(_0x24abca,_0x30c84c){_0x24abca=_0x24abca-0x0;var _0xd691d3=_0x74f7[_0x24abca];return _0xd691d3;};'use strict';var EventEmitter=require('events');var Dashboard=require('../../mysqldb')['db'][_0x774f('0x0')];var DashboardEvents=new EventEmitter();DashboardEvents[_0x774f('0x1')](0x0);var events={'afterCreate':_0x774f('0x2'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x4bd40a){return function(_0x3e996f,_0x232bc1,_0x12dac3){DashboardEvents[_0x774f('0x3')](_0x4bd40a+':'+_0x3e996f['id'],_0x3e996f);DashboardEvents[_0x774f('0x3')](_0x4bd40a,_0x3e996f);_0x12dac3(null);};}for(var e in events){if(events[_0x774f('0x4')](e)){var event=events[e];Dashboard[_0x774f('0x5')](e,emitEvent(event));}}module['exports']=DashboardEvents;
\ No newline at end of file
+var _0xa921=['Dashboard','save','remove','emit','hasOwnProperty','hook','exports'];(function(_0xbe200f,_0x4b50eb){var _0x192597=function(_0x106cfd){while(--_0x106cfd){_0xbe200f['push'](_0xbe200f['shift']());}};_0x192597(++_0x4b50eb);}(_0xa921,0x77));var _0x1a92=function(_0x539a0e,_0x409f14){_0x539a0e=_0x539a0e-0x0;var _0x580747=_0xa921[_0x539a0e];return _0x580747;};'use strict';var EventEmitter=require('events');var Dashboard=require('../../mysqldb')['db'][_0x1a92('0x0')];var DashboardEvents=new EventEmitter();DashboardEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x1a92('0x1'),'afterUpdate':'update','afterDestroy':_0x1a92('0x2')};function emitEvent(_0x2392de){return function(_0x19fb93,_0x586477,_0x5e7a46){DashboardEvents[_0x1a92('0x3')](_0x2392de+':'+_0x19fb93['id'],_0x19fb93);DashboardEvents[_0x1a92('0x3')](_0x2392de,_0x19fb93);_0x5e7a46(null);};}for(var e in events){if(events[_0x1a92('0x4')](e)){var event=events[e];Dashboard[_0x1a92('0x5')](e,emitEvent(event));}}module[_0x1a92('0x6')]=DashboardEvents;
\ No newline at end of file
index 9cc8b62..c24272c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xea15=['../../config/environment','./dashboard.attributes','exports','define','Dashboard','dashboards','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf'];(function(_0x1e5e17,_0x159cb9){var _0xa8227d=function(_0xe0515a){while(--_0xe0515a){_0x1e5e17['push'](_0x1e5e17['shift']());}};_0xa8227d(++_0x159cb9);}(_0xea15,0x18c));var _0x5ea1=function(_0x542368,_0x4f7aa9){_0x542368=_0x542368-0x0;var _0x28836f=_0xea15[_0x542368];return _0x28836f;};'use strict';var _=require(_0x5ea1('0x0'));var util=require(_0x5ea1('0x1'));var logger=require(_0x5ea1('0x2'))(_0x5ea1('0x3'));var moment=require(_0x5ea1('0x4'));var BPromise=require(_0x5ea1('0x5'));var rp=require(_0x5ea1('0x6'));var fs=require('fs');var path=require(_0x5ea1('0x7'));var rimraf=require(_0x5ea1('0x8'));var config=require(_0x5ea1('0x9'));var attributes=require(_0x5ea1('0xa'));module[_0x5ea1('0xb')]=function(_0x306088,_0x5b09c6){return _0x306088[_0x5ea1('0xc')](_0x5ea1('0xd'),attributes,{'tableName':_0x5ea1('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x005d=['exports','lodash','../../config/logger','api','moment','path','rimraf','../../config/environment','./dashboard.attributes'];(function(_0x491a7f,_0x28bb80){var _0x3d8f44=function(_0xdaa716){while(--_0xdaa716){_0x491a7f['push'](_0x491a7f['shift']());}};_0x3d8f44(++_0x28bb80);}(_0x005d,0x64));var _0xd005=function(_0x726b55,_0x5cb39a){_0x726b55=_0x726b55-0x0;var _0x45f87e=_0x005d[_0x726b55];return _0x45f87e;};'use strict';var _=require(_0xd005('0x0'));var util=require('util');var logger=require(_0xd005('0x1'))(_0xd005('0x2'));var moment=require(_0xd005('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xd005('0x4'));var rimraf=require(_0xd005('0x5'));var config=require(_0xd005('0x6'));var attributes=require(_0xd005('0x7'));module[_0xd005('0x8')]=function(_0x3fb65f,_0x2c124d){return _0x3fb65f['define']('Dashboard',attributes,{'tableName':'dashboards','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index d8b802d..389e3a7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3f31=['Dashboard,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','util','bluebird','randomstring','../../mysqldb','../../config/logger','../../config/environment','http','defaults','redis','localhost','./dashboard.socket','register','request','then','info','Dashboard,\x20%s,\x20%s','debug'];(function(_0x2a3c4d,_0x9c6b37){var _0x55c390=function(_0x4871cf){while(--_0x4871cf){_0x2a3c4d['push'](_0x2a3c4d['shift']());}};_0x55c390(++_0x9c6b37);}(_0x3f31,0x134));var _0x13f3=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0x3f31[_0x17d9e3];return _0x14192d;};'use strict';var _=require('lodash');var util=require(_0x13f3('0x0'));var moment=require('moment');var BPromise=require(_0x13f3('0x1'));var rs=require(_0x13f3('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x13f3('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x13f3('0x4'))('rpc');var config=require(_0x13f3('0x5'));var jayson=require('jayson/promise');var client=jayson['client'][_0x13f3('0x6')]({'port':0x232a});config['redis']=_[_0x13f3('0x7')](config[_0x13f3('0x8')],{'host':_0x13f3('0x9'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x13f3('0x8')]));require(_0x13f3('0xa'))[_0x13f3('0xb')](socket);function respondWithRpcPromise(_0x2b1f93,_0x381958,_0x1ce5e4){return new BPromise(function(_0x520557,_0x18704c){return client[_0x13f3('0xc')](_0x2b1f93,_0x1ce5e4)[_0x13f3('0xd')](function(_0x14ea8a){logger[_0x13f3('0xe')](_0x13f3('0xf'),_0x381958,'request\x20sent');logger[_0x13f3('0x10')](_0x13f3('0x11'),_0x381958,_0x13f3('0x12'),JSON[_0x13f3('0x13')](_0x14ea8a));if(_0x14ea8a[_0x13f3('0x14')]){if(_0x14ea8a[_0x13f3('0x14')][_0x13f3('0x15')]===0x1f4){logger[_0x13f3('0x14')](_0x13f3('0xf'),_0x381958,_0x14ea8a[_0x13f3('0x14')][_0x13f3('0x16')]);return _0x18704c(_0x14ea8a['error']['message']);}logger[_0x13f3('0x14')](_0x13f3('0xf'),_0x381958,_0x14ea8a[_0x13f3('0x14')][_0x13f3('0x16')]);return _0x520557(_0x14ea8a[_0x13f3('0x14')][_0x13f3('0x16')]);}else{logger['info']('Dashboard,\x20%s,\x20%s',_0x381958,_0x13f3('0x12'));_0x520557(_0x14ea8a[_0x13f3('0x17')][_0x13f3('0x16')]);}})[_0x13f3('0x18')](function(_0x3fa6c4){logger[_0x13f3('0x14')]('Dashboard,\x20%s,\x20%s',_0x381958,_0x3fa6c4);_0x18704c(_0x3fa6c4);});});}
\ No newline at end of file
+var _0x9839=['error','code','message','result','util','bluebird','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','request','Dashboard,\x20%s,\x20%s','debug','request\x20sent','stringify'];(function(_0x31dde9,_0x12e816){var _0x1fbf2d=function(_0x1d1bf6){while(--_0x1d1bf6){_0x31dde9['push'](_0x31dde9['shift']());}};_0x1fbf2d(++_0x12e816);}(_0x9839,0x1bd));var _0x9983=function(_0x2091ab,_0x58c84b){_0x2091ab=_0x2091ab-0x0;var _0x399dd6=_0x9839[_0x2091ab];return _0x399dd6;};'use strict';var _=require('lodash');var util=require(_0x9983('0x0'));var moment=require('moment');var BPromise=require(_0x9983('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9983('0x2'))['db'];var utils=require('../../config/utils');var logger=require(_0x9983('0x3'))(_0x9983('0x4'));var config=require('../../config/environment');var jayson=require(_0x9983('0x5'));var client=jayson[_0x9983('0x6')][_0x9983('0x7')]({'port':0x232a});config[_0x9983('0x8')]=_[_0x9983('0x9')](config['redis'],{'host':_0x9983('0xa'),'port':0x18eb});var socket=require(_0x9983('0xb'))(new Redis(config[_0x9983('0x8')]));require('./dashboard.socket')['register'](socket);function respondWithRpcPromise(_0x2f7e43,_0x49fcd7,_0x33dd07){return new BPromise(function(_0x1fdbff,_0x2f65c9){return client[_0x9983('0xc')](_0x2f7e43,_0x33dd07)['then'](function(_0xa1c672){logger['info'](_0x9983('0xd'),_0x49fcd7,'request\x20sent');logger[_0x9983('0xe')]('Dashboard,\x20%s,\x20%s,\x20%s',_0x49fcd7,_0x9983('0xf'),JSON[_0x9983('0x10')](_0xa1c672));if(_0xa1c672[_0x9983('0x11')]){if(_0xa1c672['error'][_0x9983('0x12')]===0x1f4){logger[_0x9983('0x11')](_0x9983('0xd'),_0x49fcd7,_0xa1c672['error'][_0x9983('0x13')]);return _0x2f65c9(_0xa1c672[_0x9983('0x11')][_0x9983('0x13')]);}logger[_0x9983('0x11')](_0x9983('0xd'),_0x49fcd7,_0xa1c672[_0x9983('0x11')][_0x9983('0x13')]);return _0x1fdbff(_0xa1c672[_0x9983('0x11')][_0x9983('0x13')]);}else{logger['info'](_0x9983('0xd'),_0x49fcd7,_0x9983('0xf'));_0x1fdbff(_0xa1c672[_0x9983('0x14')][_0x9983('0x13')]);}})['catch'](function(_0x1039ce){logger[_0x9983('0x11')]('Dashboard,\x20%s,\x20%s',_0x49fcd7,_0x1039ce);_0x2f65c9(_0x1039ce);});});}
\ No newline at end of file
index fed8449..63c8033 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9d14=['./dashboard.events','save','update','emit','removeListener','register','length','dashboard:'];(function(_0x2b3470,_0x5b5cbe){var _0x4b3e78=function(_0x1cafa4){while(--_0x1cafa4){_0x2b3470['push'](_0x2b3470['shift']());}};_0x4b3e78(++_0x5b5cbe);}(_0x9d14,0x170));var _0x49d1=function(_0x245b23,_0x58e295){_0x245b23=_0x245b23-0x0;var _0x3282b8=_0x9d14[_0x245b23];return _0x3282b8;};'use strict';var DashboardEvents=require(_0x49d1('0x0'));var events=[_0x49d1('0x1'),'remove',_0x49d1('0x2')];function createListener(_0x469603,_0x13a684){return function(_0x27e5b2){_0x13a684[_0x49d1('0x3')](_0x469603,_0x27e5b2);};}function removeListener(_0x1fa289,_0x156aff){return function(){DashboardEvents[_0x49d1('0x4')](_0x1fa289,_0x156aff);};}exports[_0x49d1('0x5')]=function(_0x2fca76){for(var _0x59fe45=0x0,_0x413a1b=events[_0x49d1('0x6')];_0x59fe45<_0x413a1b;_0x59fe45++){var _0x1e139d=events[_0x59fe45];var _0x20c195=createListener(_0x49d1('0x7')+_0x1e139d,_0x2fca76);DashboardEvents['on'](_0x1e139d,_0x20c195);}};
\ No newline at end of file
+var _0x48c4=['register','length','dashboard:','remove','update','emit','removeListener'];(function(_0x35b32f,_0x569250){var _0x3c28c1=function(_0x187900){while(--_0x187900){_0x35b32f['push'](_0x35b32f['shift']());}};_0x3c28c1(++_0x569250);}(_0x48c4,0x129));var _0x448c=function(_0x3cd381,_0x36d8b5){_0x3cd381=_0x3cd381-0x0;var _0x2ecfbd=_0x48c4[_0x3cd381];return _0x2ecfbd;};'use strict';var DashboardEvents=require('./dashboard.events');var events=['save',_0x448c('0x0'),_0x448c('0x1')];function createListener(_0x1c8803,_0x10cd7f){return function(_0x188489){_0x10cd7f[_0x448c('0x2')](_0x1c8803,_0x188489);};}function removeListener(_0x2324e6,_0x20b36e){return function(){DashboardEvents[_0x448c('0x3')](_0x2324e6,_0x20b36e);};}exports[_0x448c('0x4')]=function(_0x50e13d){for(var _0x4783c0=0x0,_0x4af4ea=events[_0x448c('0x5')];_0x4783c0<_0x4af4ea;_0x4783c0++){var _0xfb5424=events[_0x4783c0];var _0xf9c2c4=createListener(_0x448c('0x6')+_0xfb5424,_0x50e13d);DashboardEvents['on'](_0xfb5424,_0xf9c2c4);}};
\ No newline at end of file
index 176edb4..d2c52d6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4e22=['util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/:id','/:id/items','getItems','post','create','clone','addItem','update','delete','destroy','exports','multer'];(function(_0x28d18d,_0x55896b){var _0x470640=function(_0x57e78b){while(--_0x57e78b){_0x28d18d['push'](_0x28d18d['shift']());}};_0x470640(++_0x55896b);}(_0x4e22,0x113));var _0x24e2=function(_0x6cb90a,_0x47bc85){_0x6cb90a=_0x6cb90a-0x0;var _0x16d357=_0x4e22[_0x6cb90a];return _0x16d357;};'use strict';var multer=require(_0x24e2('0x0'));var util=require(_0x24e2('0x1'));var path=require(_0x24e2('0x2'));var timeout=require(_0x24e2('0x3'));var express=require(_0x24e2('0x4'));var router=express[_0x24e2('0x5')]();var fs_extra=require(_0x24e2('0x6'));var auth=require(_0x24e2('0x7'));var interaction=require(_0x24e2('0x8'));var config=require('../../config/environment');var controller=require('./dashboard.controller');router[_0x24e2('0x9')]('/',auth[_0x24e2('0xa')](),controller[_0x24e2('0xb')]);router[_0x24e2('0x9')](_0x24e2('0xc'),auth[_0x24e2('0xa')](),controller['show']);router[_0x24e2('0x9')](_0x24e2('0xd'),auth[_0x24e2('0xa')](),controller[_0x24e2('0xe')]);router[_0x24e2('0xf')]('/',auth[_0x24e2('0xa')](),controller[_0x24e2('0x10')]);router['post']('/:id/clone',auth['isAuthenticated'](),controller[_0x24e2('0x11')]);router[_0x24e2('0xf')](_0x24e2('0xd'),auth['isAuthenticated'](),controller[_0x24e2('0x12')]);router['put'](_0x24e2('0xc'),auth[_0x24e2('0xa')](),controller[_0x24e2('0x13')]);router[_0x24e2('0x14')](_0x24e2('0xc'),auth[_0x24e2('0xa')](),controller[_0x24e2('0x15')]);module[_0x24e2('0x16')]=router;
\ No newline at end of file
+var _0xe3b3=['post','create','clone','put','/:id','update','delete','destroy','exports','multer','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./dashboard.controller','get','index','isAuthenticated','show','getItems'];(function(_0x392f4a,_0x5eb726){var _0x57fb3a=function(_0x4ee1c8){while(--_0x4ee1c8){_0x392f4a['push'](_0x392f4a['shift']());}};_0x57fb3a(++_0x5eb726);}(_0xe3b3,0xcf));var _0x3e3b=function(_0xb4f000,_0x3abace){_0xb4f000=_0xb4f000-0x0;var _0x2c202e=_0xe3b3[_0xb4f000];return _0x2c202e;};'use strict';var multer=require(_0x3e3b('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x3e3b('0x1'));var express=require(_0x3e3b('0x2'));var router=express['Router']();var fs_extra=require(_0x3e3b('0x3'));var auth=require(_0x3e3b('0x4'));var interaction=require(_0x3e3b('0x5'));var config=require(_0x3e3b('0x6'));var controller=require(_0x3e3b('0x7'));router[_0x3e3b('0x8')]('/',auth['isAuthenticated'](),controller[_0x3e3b('0x9')]);router[_0x3e3b('0x8')]('/:id',auth[_0x3e3b('0xa')](),controller[_0x3e3b('0xb')]);router[_0x3e3b('0x8')]('/:id/items',auth['isAuthenticated'](),controller[_0x3e3b('0xc')]);router[_0x3e3b('0xd')]('/',auth[_0x3e3b('0xa')](),controller[_0x3e3b('0xe')]);router[_0x3e3b('0xd')]('/:id/clone',auth[_0x3e3b('0xa')](),controller[_0x3e3b('0xf')]);router[_0x3e3b('0xd')]('/:id/items',auth['isAuthenticated'](),controller['addItem']);router[_0x3e3b('0x10')](_0x3e3b('0x11'),auth[_0x3e3b('0xa')](),controller[_0x3e3b('0x12')]);router[_0x3e3b('0x13')]('/:id',auth[_0x3e3b('0xa')](),controller[_0x3e3b('0x14')]);module[_0x3e3b('0x15')]=router;
\ No newline at end of file
index bf80ff6..b14c8d2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5fc3=['squel','exports','STRING','TEXT','long','getDataValue','attrs','setDataValue','stringify','INTEGER','#ffffff','#2196f3','sequelize'];(function(_0x1ca29f,_0x318ac5){var _0x576c3b=function(_0x40caab){while(--_0x40caab){_0x1ca29f['push'](_0x1ca29f['shift']());}};_0x576c3b(++_0x318ac5);}(_0x5fc3,0xa8));var _0x35fc=function(_0x47df54,_0x1aeb61){_0x47df54=_0x47df54-0x0;var _0x261b87=_0x5fc3[_0x47df54];return _0x261b87;};'use strict';var Sequelize=require(_0x35fc('0x0'));var squel=require(_0x35fc('0x1'));var _=require('lodash');module[_0x35fc('0x2')]={'title':{'type':Sequelize[_0x35fc('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0x35fc('0x3')](0x14),'allowNull':![],'validate':{'len':[0x1,0x14]}},'attrs':{'type':Sequelize[_0x35fc('0x4')](_0x35fc('0x5')),'get':function(){try{return JSON['parse'](this[_0x35fc('0x6')](_0x35fc('0x7')));}catch(_0x186a06){return[];}},'set':function(_0x5b85ad){try{this['setDataValue'](_0x35fc('0x7'),JSON['stringify'](_0x5b85ad));}catch(_0x16e153){this[_0x35fc('0x8')](_0x35fc('0x7'),JSON[_0x35fc('0x9')]([]));}}},'sizeX':{'type':Sequelize[_0x35fc('0xa')],'allowNull':![],'defaultValue':0x1},'sizeY':{'type':Sequelize[_0x35fc('0xa')],'allowNull':![],'defaultValue':0x1},'row':{'type':Sequelize[_0x35fc('0xa')]},'col':{'type':Sequelize['INTEGER']},'background':{'type':Sequelize[_0x35fc('0x3')],'allowNull':![],'defaultValue':_0x35fc('0xb'),'validate':{'notEmpty':!![]}},'foreground':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x35fc('0xc'),'validate':{'notEmpty':!![]}},'link':{'type':Sequelize[_0x35fc('0x3')]},'titleFontSize':{'type':Sequelize['INTEGER'],'defaultValue':0xc}};
\ No newline at end of file
+var _0xdbf5=['squel','STRING','TEXT','long','parse','getDataValue','attrs','setDataValue','stringify','INTEGER','#ffffff'];(function(_0x22b046,_0xecf865){var _0x5e40fe=function(_0x27c8eb){while(--_0x27c8eb){_0x22b046['push'](_0x22b046['shift']());}};_0x5e40fe(++_0xecf865);}(_0xdbf5,0x18c));var _0x5dbf=function(_0x23f414,_0x3bce60){_0x23f414=_0x23f414-0x0;var _0xf719a6=_0xdbf5[_0x23f414];return _0xf719a6;};'use strict';var Sequelize=require('sequelize');var squel=require(_0x5dbf('0x0'));var _=require('lodash');module['exports']={'title':{'type':Sequelize[_0x5dbf('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0x5dbf('0x1')](0x14),'allowNull':![],'validate':{'len':[0x1,0x14]}},'attrs':{'type':Sequelize[_0x5dbf('0x2')](_0x5dbf('0x3')),'get':function(){try{return JSON[_0x5dbf('0x4')](this[_0x5dbf('0x5')](_0x5dbf('0x6')));}catch(_0x1decd2){return[];}},'set':function(_0x3f8628){try{this[_0x5dbf('0x7')](_0x5dbf('0x6'),JSON[_0x5dbf('0x8')](_0x3f8628));}catch(_0x93e657){this['setDataValue'](_0x5dbf('0x6'),JSON['stringify']([]));}}},'sizeX':{'type':Sequelize[_0x5dbf('0x9')],'allowNull':![],'defaultValue':0x1},'sizeY':{'type':Sequelize[_0x5dbf('0x9')],'allowNull':![],'defaultValue':0x1},'row':{'type':Sequelize[_0x5dbf('0x9')]},'col':{'type':Sequelize[_0x5dbf('0x9')]},'background':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x5dbf('0xa'),'validate':{'notEmpty':!![]}},'foreground':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'#2196f3','validate':{'notEmpty':!![]}},'link':{'type':Sequelize[_0x5dbf('0x1')]},'titleFontSize':{'type':Sequelize['INTEGER'],'defaultValue':0xc}};
\ No newline at end of file
index 00ffd96..109797f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x23f4=['request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./dashboardItem.socket','register','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','apply','reject','save','update','then','destroy','stack','name','send','show','params','model','DashboardItem','rawAttributes','query','keys','filters','intersection','attributes','fields','length','includeAll','options','find','catch','type','iframe','attrUrl','attrs','value','https://','custom','attrPath','attrHourFormat','attrTimezone','0.00','attrFontSize','counter','attrMetric','attrVoiceQueues','attrChannel','voice','attrEmailAccounts','attrFaxAccounts','attrSmsAccounts','attrOpenchannelAccounts','attrWhatsappAccounts','attrChatWebsites','multibar-chart','pie-chart','attrSerie1','attrSerie2','attrSerie3','web-report','attrReport','reportType','attrRefresh','widgetAttributes:\x20%s','stringify','create','body','rimraf'];(function(_0x187279,_0x26d152){var _0x3da59d=function(_0x41c808){while(--_0x41c808){_0x187279['push'](_0x187279['shift']());}};_0x3da59d(++_0x26d152);}(_0x23f4,0x1ee));var _0x423f=function(_0x25a04a,_0x406d16){_0x25a04a=_0x25a04a-0x0;var _0x476b6b=_0x23f4[_0x25a04a];return _0x476b6b;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x423f('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x423f('0x1'));var moment=require(_0x423f('0x2'));var BPromise=require(_0x423f('0x3'));var Mustache=require(_0x423f('0x4'));var util=require(_0x423f('0x5'));var path=require(_0x423f('0x6'));var sox=require(_0x423f('0x7'));var csv=require(_0x423f('0x8'));var ejs=require(_0x423f('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x423f('0xa'));var squel=require(_0x423f('0xb'));var crypto=require('crypto');var jsforce=require(_0x423f('0xc'));var deskjs=require(_0x423f('0xd'));var toCsv=require(_0x423f('0x8'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x423f('0xe'));var qs=require('../../components/parsers/qs');var as=require(_0x423f('0xf'));var hardwareService=require(_0x423f('0x10'));var logger=require(_0x423f('0x11'))(_0x423f('0x12'));var utils=require('../../config/utils');var config=require(_0x423f('0x13'));var licenseUtil=require(_0x423f('0x14'));var db=require(_0x423f('0x15'))['db'];config[_0x423f('0x16')]=_[_0x423f('0x17')](config['redis'],{'host':_0x423f('0x18'),'port':0x18eb});var socket=require(_0x423f('0x19'))(new Redis(config[_0x423f('0x16')]));require(_0x423f('0x1a'))[_0x423f('0x1b')](socket);function respondWithStatusCode(_0x3b531d,_0x1f6423){_0x1f6423=_0x1f6423||0xcc;return function(_0x21d804){if(_0x21d804){return _0x3b531d[_0x423f('0x1c')](_0x1f6423);}return _0x3b531d[_0x423f('0x1d')](_0x1f6423)[_0x423f('0x1e')]();};}function respondWithResult(_0x276be1,_0x14cba9){_0x14cba9=_0x14cba9||0xc8;return function(_0x1fef4d){if(_0x1fef4d){return _0x276be1[_0x423f('0x1d')](_0x14cba9)[_0x423f('0x1f')](_0x1fef4d);}};}function respondWithFilteredResult(_0x3fd56d,_0x34e968){return function(_0x26b6d1){if(_0x26b6d1){var _0x5424e6=typeof _0x34e968[_0x423f('0x20')]==='undefined'&&typeof _0x34e968['limit']===_0x423f('0x21');var _0x4956e0=_0x26b6d1[_0x423f('0x22')];var _0xd7b80e=_0x5424e6?0x0:_0x34e968['offset'];var _0x45b46d=_0x5424e6?_0x26b6d1[_0x423f('0x22')]:_0x34e968['offset']+_0x34e968[_0x423f('0x23')];var _0x2ebe74;if(_0x45b46d>=_0x4956e0){_0x45b46d=_0x4956e0;_0x2ebe74=0xc8;}else{_0x2ebe74=0xce;}_0x3fd56d['status'](_0x2ebe74);return _0x3fd56d[_0x423f('0x24')](_0x423f('0x25'),_0xd7b80e+'-'+_0x45b46d+'/'+_0x4956e0)['json'](_0x26b6d1);}return null;};}function patchUpdates(_0x54f47){return function(_0x5ec3a8){try{jsonpatch[_0x423f('0x26')](_0x5ec3a8,_0x54f47,!![]);}catch(_0x3c942e){return BPromise[_0x423f('0x27')](_0x3c942e);}return _0x5ec3a8[_0x423f('0x28')]();};}function saveUpdates(_0xb82e8d,_0x39e72d){return function(_0x14ef6c){if(_0x14ef6c){return _0x14ef6c[_0x423f('0x29')](_0xb82e8d)[_0x423f('0x2a')](function(_0x36f57f){return _0x36f57f;});}return null;};}function removeEntity(_0x45889f,_0x199196){return function(_0xb91ed8){if(_0xb91ed8){return _0xb91ed8[_0x423f('0x2b')]()['then'](function(){_0x45889f[_0x423f('0x1d')](0xcc)[_0x423f('0x1e')]();});}};}function handleEntityNotFound(_0x1b347a,_0x593f9d){return function(_0x4fc44d){if(!_0x4fc44d){_0x1b347a[_0x423f('0x1c')](0x194);}return _0x4fc44d;};}function handleError(_0x496c25,_0x323c61){_0x323c61=_0x323c61||0x1f4;return function(_0x4c2f21){logger['error'](_0x4c2f21[_0x423f('0x2c')]);if(_0x4c2f21[_0x423f('0x2d')]){delete _0x4c2f21['name'];}_0x496c25[_0x423f('0x1d')](_0x323c61)[_0x423f('0x2e')](_0x4c2f21);};}exports[_0x423f('0x2f')]=function(_0x1da775,_0x518c1e){var _0x6dcc7a={'raw':![],'where':{'id':_0x1da775[_0x423f('0x30')]['id']}},_0x332bbc={};_0x332bbc[_0x423f('0x31')]=_['keys'](db[_0x423f('0x32')][_0x423f('0x33')]);_0x332bbc[_0x423f('0x34')]=_[_0x423f('0x35')](_0x1da775[_0x423f('0x34')]);_0x332bbc[_0x423f('0x36')]=_[_0x423f('0x37')](_0x332bbc[_0x423f('0x31')],_0x332bbc[_0x423f('0x34')]);_0x6dcc7a[_0x423f('0x38')]=_['intersection'](_0x332bbc[_0x423f('0x31')],qs[_0x423f('0x39')](_0x1da775[_0x423f('0x34')]['fields']));_0x6dcc7a[_0x423f('0x38')]=_0x6dcc7a['attributes'][_0x423f('0x3a')]?_0x6dcc7a[_0x423f('0x38')]:_0x332bbc[_0x423f('0x31')];if(_0x1da775[_0x423f('0x34')][_0x423f('0x3b')]){_0x6dcc7a['include']=[{'all':!![]}];}_0x6dcc7a=_['merge']({},_0x6dcc7a,_0x1da775[_0x423f('0x3c')]);return db[_0x423f('0x32')][_0x423f('0x3d')](_0x6dcc7a)[_0x423f('0x2a')](handleEntityNotFound(_0x518c1e,null))[_0x423f('0x2a')](respondWithResult(_0x518c1e,null))[_0x423f('0x3e')](handleError(_0x518c1e,null));};exports[_0x423f('0x2b')]=function(_0x183665,_0xd99eb0){return db[_0x423f('0x32')][_0x423f('0x3d')]({'where':{'id':_0x183665[_0x423f('0x30')]['id']}})[_0x423f('0x2a')](handleEntityNotFound(_0xd99eb0,null))['then'](removeEntity(_0xd99eb0,null))['catch'](handleError(_0xd99eb0,null));};function widgetAttributes(_0x382f91){try{switch(_0x382f91[_0x423f('0x3f')]){case _0x423f('0x40'):return[{'name':_0x423f('0x41'),'value':_0x382f91[_0x423f('0x41')]||(_0x382f91['attrs']&&_0x382f91[_0x423f('0x42')][0x0]?_0x382f91[_0x423f('0x42')][0x0][_0x423f('0x43')]:undefined)||_0x423f('0x44')}];case _0x423f('0x45'):return[{'name':_0x423f('0x46'),'value':_0x382f91[_0x423f('0x46')]||(_0x382f91[_0x423f('0x42')]&&_0x382f91[_0x423f('0x42')][0x0]?_0x382f91[_0x423f('0x42')][0x0]['value']:undefined)||''}];case'clock':return[{'name':_0x423f('0x47'),'value':_0x382f91[_0x423f('0x47')]||(_0x382f91[_0x423f('0x42')]&&_0x382f91[_0x423f('0x42')][0x0]?_0x382f91[_0x423f('0x42')][0x0][_0x423f('0x43')]:undefined)||'HH:mm:ss'},{'name':_0x423f('0x48'),'value':_0x382f91[_0x423f('0x48')]||(_0x382f91[_0x423f('0x42')]&&_0x382f91[_0x423f('0x42')][0x1]?_0x382f91[_0x423f('0x42')][0x1][_0x423f('0x43')]:undefined)||_0x423f('0x49')},{'name':_0x423f('0x4a'),'value':_0x382f91['attrFontSize']||(_0x382f91[_0x423f('0x42')]&&_0x382f91[_0x423f('0x42')][0x2]?_0x382f91[_0x423f('0x42')][0x2][_0x423f('0x43')]:undefined)||0xc}];case _0x423f('0x4b'):return[{'name':_0x423f('0x4c'),'value':_0x382f91[_0x423f('0x4c')]||(_0x382f91[_0x423f('0x42')]&&_0x382f91[_0x423f('0x42')][0x0]?_0x382f91['attrs'][0x0][_0x423f('0x43')]:undefined)||'total'},{'name':_0x423f('0x4d'),'value':_0x382f91[_0x423f('0x4d')]||(_0x382f91[_0x423f('0x42')]&&_0x382f91[_0x423f('0x42')][0x1]?_0x382f91[_0x423f('0x42')][0x1][_0x423f('0x43')]:undefined)||[]},{'name':_0x423f('0x4a'),'value':_0x382f91[_0x423f('0x4a')]||(_0x382f91[_0x423f('0x42')]&&_0x382f91[_0x423f('0x42')][0x2]?_0x382f91[_0x423f('0x42')][0x2][_0x423f('0x43')]:undefined)||0x14},{'name':_0x423f('0x4e'),'value':_0x382f91[_0x423f('0x4e')]||(_0x382f91[_0x423f('0x42')]&&_0x382f91[_0x423f('0x42')][0x3]?_0x382f91[_0x423f('0x42')][0x3][_0x423f('0x43')]:undefined)||_0x423f('0x4f')},{'name':_0x423f('0x50'),'value':_0x382f91['attrEmailAccounts']||(_0x382f91[_0x423f('0x42')]&&_0x382f91['attrs'][0x4]?_0x382f91[_0x423f('0x42')][0x4][_0x423f('0x43')]:undefined)||''},{'name':_0x423f('0x51'),'value':_0x382f91[_0x423f('0x51')]||(_0x382f91[_0x423f('0x42')]&&_0x382f91[_0x423f('0x42')][0x5]?_0x382f91[_0x423f('0x42')][0x5][_0x423f('0x43')]:undefined)||''},{'name':_0x423f('0x52'),'value':_0x382f91[_0x423f('0x52')]||(_0x382f91[_0x423f('0x42')]&&_0x382f91[_0x423f('0x42')][0x6]?_0x382f91['attrs'][0x6][_0x423f('0x43')]:undefined)||''},{'name':_0x423f('0x53'),'value':_0x382f91['attrOpenchannelAccounts']||(_0x382f91[_0x423f('0x42')]&&_0x382f91['attrs'][0x7]?_0x382f91[_0x423f('0x42')][0x7]['value']:undefined)||''},{'name':'attrWhatsappAccounts','value':_0x382f91[_0x423f('0x54')]||(_0x382f91[_0x423f('0x42')]&&_0x382f91[_0x423f('0x42')][0x8]?_0x382f91[_0x423f('0x42')][0x8]['value']:undefined)||''},{'name':_0x423f('0x55'),'value':_0x382f91['attrChatWebsites']||(_0x382f91[_0x423f('0x42')]&&_0x382f91[_0x423f('0x42')][0x9]?_0x382f91[_0x423f('0x42')][0x9][_0x423f('0x43')]:undefined)||''}];case _0x423f('0x56'):case _0x423f('0x57'):return[{'name':_0x423f('0x58'),'value':_0x382f91[_0x423f('0x58')]||(_0x382f91[_0x423f('0x42')]&&_0x382f91['attrs'][0x0]?_0x382f91[_0x423f('0x42')][0x0][_0x423f('0x43')]:undefined)||'total'},{'name':_0x423f('0x59'),'value':_0x382f91['attrSerie2']||(_0x382f91[_0x423f('0x42')]&&_0x382f91[_0x423f('0x42')][0x1]?_0x382f91[_0x423f('0x42')][0x1][_0x423f('0x43')]:undefined)||null},{'name':_0x423f('0x5a'),'value':_0x382f91[_0x423f('0x5a')]||(_0x382f91['attrs']&&_0x382f91['attrs'][0x2]?_0x382f91[_0x423f('0x42')][0x2][_0x423f('0x43')]:undefined)||null},{'name':_0x423f('0x4d'),'value':_0x382f91[_0x423f('0x4d')]||(_0x382f91[_0x423f('0x42')]&&_0x382f91[_0x423f('0x42')][0x3]?_0x382f91[_0x423f('0x42')][0x3][_0x423f('0x43')]:undefined)||[]},{'name':_0x423f('0x4e'),'value':_0x382f91['attrChannel']||(_0x382f91[_0x423f('0x42')]&&_0x382f91[_0x423f('0x42')][0x4]?_0x382f91['attrs'][0x4][_0x423f('0x43')]:undefined)||'voice'},{'name':_0x423f('0x50'),'value':_0x382f91[_0x423f('0x50')]||(_0x382f91[_0x423f('0x42')]&&_0x382f91['attrs'][0x5]?_0x382f91['attrs'][0x5][_0x423f('0x43')]:undefined)||''},{'name':_0x423f('0x51'),'value':_0x382f91[_0x423f('0x51')]||(_0x382f91['attrs']&&_0x382f91[_0x423f('0x42')][0x6]?_0x382f91[_0x423f('0x42')][0x6][_0x423f('0x43')]:undefined)||''},{'name':_0x423f('0x52'),'value':_0x382f91[_0x423f('0x52')]||(_0x382f91[_0x423f('0x42')]&&_0x382f91[_0x423f('0x42')][0x7]?_0x382f91['attrs'][0x7][_0x423f('0x43')]:undefined)||''},{'name':'attrOpenchannelAccounts','value':_0x382f91[_0x423f('0x53')]||(_0x382f91[_0x423f('0x42')]&&_0x382f91[_0x423f('0x42')][0x8]?_0x382f91[_0x423f('0x42')][0x8]['value']:undefined)||''},{'name':_0x423f('0x54'),'value':_0x382f91[_0x423f('0x54')]||(_0x382f91[_0x423f('0x42')]&&_0x382f91['attrs'][0x9]?_0x382f91[_0x423f('0x42')][0x9][_0x423f('0x43')]:undefined)||''},{'name':'attrChatWebsites','value':_0x382f91[_0x423f('0x55')]||(_0x382f91[_0x423f('0x42')]&&_0x382f91['attrs'][0xa]?_0x382f91['attrs'][0xa]['value']:undefined)||''}];case _0x423f('0x5b'):return[{'name':_0x423f('0x5c'),'type':_0x382f91[_0x423f('0x5d')]||(_0x382f91[_0x423f('0x42')]&&_0x382f91['attrs'][0x0]?_0x382f91['attrs'][0x0][_0x423f('0x3f')]:undefined)||null,'value':_0x382f91[_0x423f('0x5c')]||(_0x382f91['attrs']&&_0x382f91[_0x423f('0x42')][0x0]?_0x382f91[_0x423f('0x42')][0x0][_0x423f('0x43')]:undefined)||null},{'name':_0x423f('0x5e'),'value':_0x382f91[_0x423f('0x5e')]||(_0x382f91[_0x423f('0x42')]&&_0x382f91[_0x423f('0x42')][0x1]?_0x382f91['attrs'][0x1][_0x423f('0x43')]:undefined)||0x0}];default:return[];}}catch(_0x228224){logger['error'](_0x423f('0x5f'),JSON[_0x423f('0x60')](_0x228224));return[];}}exports[_0x423f('0x61')]=function(_0x5ce420,_0x334204){if(_0x5ce420[_0x423f('0x62')]){_0x5ce420[_0x423f('0x62')][_0x423f('0x42')]=widgetAttributes(_0x5ce420[_0x423f('0x62')]);}return db[_0x423f('0x32')][_0x423f('0x61')](_0x5ce420[_0x423f('0x62')],{})[_0x423f('0x2a')](respondWithResult(_0x334204,0xc9))['catch'](handleError(_0x334204,null));};exports[_0x423f('0x29')]=function(_0x12c3e4,_0x25e123){if(_0x12c3e4[_0x423f('0x62')]['id']){delete _0x12c3e4['body']['id'];}_0x12c3e4[_0x423f('0x62')][_0x423f('0x42')]=widgetAttributes(_0x12c3e4[_0x423f('0x62')]);return db[_0x423f('0x32')][_0x423f('0x3d')]({'where':{'id':_0x12c3e4[_0x423f('0x30')]['id']}})[_0x423f('0x2a')](handleEntityNotFound(_0x25e123,null))['then'](saveUpdates(_0x12c3e4[_0x423f('0x62')],null))[_0x423f('0x2a')](respondWithResult(_0x25e123,null))[_0x423f('0x3e')](handleError(_0x25e123,null));};
\ No newline at end of file
+var _0x96fd=['attrSerie2','attrSerie3','voice','web-report','attrReport','reportType','attrRefresh','stringify','body','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','path','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','../../config/license/util','defaults','redis','./dashboardItem.socket','register','sendStatus','status','end','offset','undefined','count','limit','Content-Range','json','update','then','error','stack','name','send','show','params','model','keys','rawAttributes','query','filters','attributes','intersection','fields','include','merge','options','DashboardItem','catch','destroy','find','type','iframe','attrUrl','attrs','value','https://','attrPath','clock','attrHourFormat','attrTimezone','attrFontSize','counter','attrMetric','total','attrVoiceQueues','attrChannel','attrEmailAccounts','attrFaxAccounts','attrSmsAccounts','attrOpenchannelAccounts','attrWhatsappAccounts','attrChatWebsites','multibar-chart','pie-chart','attrSerie1'];(function(_0x22f214,_0x33adff){var _0x5a5b8a=function(_0x2c0798){while(--_0x2c0798){_0x22f214['push'](_0x22f214['shift']());}};_0x5a5b8a(++_0x33adff);}(_0x96fd,0x1e9));var _0xd96f=function(_0x19618a,_0x5f15e6){_0x19618a=_0x19618a-0x0;var _0x2e60e8=_0x96fd[_0x19618a];return _0x2e60e8;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xd96f('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xd96f('0x1'));var rp=require(_0xd96f('0x2'));var moment=require('moment');var BPromise=require(_0xd96f('0x3'));var Mustache=require(_0xd96f('0x4'));var util=require(_0xd96f('0x5'));var path=require(_0xd96f('0x6'));var sox=require('sox');var csv=require(_0xd96f('0x7'));var ejs=require(_0xd96f('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xd96f('0x9'));var squel=require(_0xd96f('0xa'));var crypto=require(_0xd96f('0xb'));var jsforce=require(_0xd96f('0xc'));var deskjs=require(_0xd96f('0xd'));var toCsv=require(_0xd96f('0x7'));var querystring=require(_0xd96f('0xe'));var Papa=require(_0xd96f('0xf'));var Redis=require(_0xd96f('0x10'));var authService=require(_0xd96f('0x11'));var qs=require(_0xd96f('0x12'));var as=require(_0xd96f('0x13'));var hardwareService=require(_0xd96f('0x14'));var logger=require(_0xd96f('0x15'))(_0xd96f('0x16'));var utils=require(_0xd96f('0x17'));var config=require(_0xd96f('0x18'));var licenseUtil=require(_0xd96f('0x19'));var db=require('../../mysqldb')['db'];config['redis']=_[_0xd96f('0x1a')](config[_0xd96f('0x1b')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xd96f('0x1b')]));require(_0xd96f('0x1c'))[_0xd96f('0x1d')](socket);function respondWithStatusCode(_0x46332d,_0x1c770a){_0x1c770a=_0x1c770a||0xcc;return function(_0x370c03){if(_0x370c03){return _0x46332d[_0xd96f('0x1e')](_0x1c770a);}return _0x46332d[_0xd96f('0x1f')](_0x1c770a)[_0xd96f('0x20')]();};}function respondWithResult(_0x28884d,_0x5e5e65){_0x5e5e65=_0x5e5e65||0xc8;return function(_0x1f6f36){if(_0x1f6f36){return _0x28884d[_0xd96f('0x1f')](_0x5e5e65)['json'](_0x1f6f36);}};}function respondWithFilteredResult(_0x19b141,_0x3420d6){return function(_0x45c990){if(_0x45c990){var _0x15d2d5=typeof _0x3420d6[_0xd96f('0x21')]===_0xd96f('0x22')&&typeof _0x3420d6['limit']===_0xd96f('0x22');var _0x392733=_0x45c990[_0xd96f('0x23')];var _0x519ad4=_0x15d2d5?0x0:_0x3420d6[_0xd96f('0x21')];var _0x1d80de=_0x15d2d5?_0x45c990[_0xd96f('0x23')]:_0x3420d6[_0xd96f('0x21')]+_0x3420d6[_0xd96f('0x24')];var _0x422e34;if(_0x1d80de>=_0x392733){_0x1d80de=_0x392733;_0x422e34=0xc8;}else{_0x422e34=0xce;}_0x19b141[_0xd96f('0x1f')](_0x422e34);return _0x19b141['set'](_0xd96f('0x25'),_0x519ad4+'-'+_0x1d80de+'/'+_0x392733)[_0xd96f('0x26')](_0x45c990);}return null;};}function patchUpdates(_0x4de2ef){return function(_0x3ea026){try{jsonpatch['apply'](_0x3ea026,_0x4de2ef,!![]);}catch(_0x39e7b2){return BPromise['reject'](_0x39e7b2);}return _0x3ea026['save']();};}function saveUpdates(_0x33a00c,_0x4f01b3){return function(_0x565f74){if(_0x565f74){return _0x565f74[_0xd96f('0x27')](_0x33a00c)[_0xd96f('0x28')](function(_0x1b4b26){return _0x1b4b26;});}return null;};}function removeEntity(_0x1a232d,_0xd4cfa){return function(_0xb12a56){if(_0xb12a56){return _0xb12a56['destroy']()[_0xd96f('0x28')](function(){_0x1a232d[_0xd96f('0x1f')](0xcc)[_0xd96f('0x20')]();});}};}function handleEntityNotFound(_0x1e9f49,_0xd4d095){return function(_0x3725cd){if(!_0x3725cd){_0x1e9f49[_0xd96f('0x1e')](0x194);}return _0x3725cd;};}function handleError(_0x24525e,_0x316d98){_0x316d98=_0x316d98||0x1f4;return function(_0x428961){logger[_0xd96f('0x29')](_0x428961[_0xd96f('0x2a')]);if(_0x428961[_0xd96f('0x2b')]){delete _0x428961[_0xd96f('0x2b')];}_0x24525e[_0xd96f('0x1f')](_0x316d98)[_0xd96f('0x2c')](_0x428961);};}exports[_0xd96f('0x2d')]=function(_0x160b0a,_0x22ef06){var _0x1738dd={'raw':![],'where':{'id':_0x160b0a[_0xd96f('0x2e')]['id']}},_0x497b02={};_0x497b02[_0xd96f('0x2f')]=_[_0xd96f('0x30')](db['DashboardItem'][_0xd96f('0x31')]);_0x497b02[_0xd96f('0x32')]=_[_0xd96f('0x30')](_0x160b0a['query']);_0x497b02[_0xd96f('0x33')]=_['intersection'](_0x497b02[_0xd96f('0x2f')],_0x497b02['query']);_0x1738dd[_0xd96f('0x34')]=_[_0xd96f('0x35')](_0x497b02[_0xd96f('0x2f')],qs[_0xd96f('0x36')](_0x160b0a[_0xd96f('0x32')][_0xd96f('0x36')]));_0x1738dd[_0xd96f('0x34')]=_0x1738dd['attributes']['length']?_0x1738dd[_0xd96f('0x34')]:_0x497b02['model'];if(_0x160b0a['query']['includeAll']){_0x1738dd[_0xd96f('0x37')]=[{'all':!![]}];}_0x1738dd=_[_0xd96f('0x38')]({},_0x1738dd,_0x160b0a[_0xd96f('0x39')]);return db[_0xd96f('0x3a')]['find'](_0x1738dd)[_0xd96f('0x28')](handleEntityNotFound(_0x22ef06,null))[_0xd96f('0x28')](respondWithResult(_0x22ef06,null))[_0xd96f('0x3b')](handleError(_0x22ef06,null));};exports[_0xd96f('0x3c')]=function(_0x2b3ee5,_0x475e64){return db[_0xd96f('0x3a')][_0xd96f('0x3d')]({'where':{'id':_0x2b3ee5[_0xd96f('0x2e')]['id']}})[_0xd96f('0x28')](handleEntityNotFound(_0x475e64,null))[_0xd96f('0x28')](removeEntity(_0x475e64,null))[_0xd96f('0x3b')](handleError(_0x475e64,null));};function widgetAttributes(_0x4b0573){try{switch(_0x4b0573[_0xd96f('0x3e')]){case _0xd96f('0x3f'):return[{'name':_0xd96f('0x40'),'value':_0x4b0573[_0xd96f('0x40')]||(_0x4b0573['attrs']&&_0x4b0573[_0xd96f('0x41')][0x0]?_0x4b0573[_0xd96f('0x41')][0x0][_0xd96f('0x42')]:undefined)||_0xd96f('0x43')}];case'custom':return[{'name':'attrPath','value':_0x4b0573[_0xd96f('0x44')]||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573[_0xd96f('0x41')][0x0]?_0x4b0573[_0xd96f('0x41')][0x0]['value']:undefined)||''}];case _0xd96f('0x45'):return[{'name':_0xd96f('0x46'),'value':_0x4b0573['attrHourFormat']||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573[_0xd96f('0x41')][0x0]?_0x4b0573[_0xd96f('0x41')][0x0][_0xd96f('0x42')]:undefined)||'HH:mm:ss'},{'name':_0xd96f('0x47'),'value':_0x4b0573['attrTimezone']||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573[_0xd96f('0x41')][0x1]?_0x4b0573[_0xd96f('0x41')][0x1][_0xd96f('0x42')]:undefined)||'0.00'},{'name':_0xd96f('0x48'),'value':_0x4b0573[_0xd96f('0x48')]||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573[_0xd96f('0x41')][0x2]?_0x4b0573[_0xd96f('0x41')][0x2][_0xd96f('0x42')]:undefined)||0xc}];case _0xd96f('0x49'):return[{'name':_0xd96f('0x4a'),'value':_0x4b0573[_0xd96f('0x4a')]||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573[_0xd96f('0x41')][0x0]?_0x4b0573[_0xd96f('0x41')][0x0][_0xd96f('0x42')]:undefined)||_0xd96f('0x4b')},{'name':_0xd96f('0x4c'),'value':_0x4b0573[_0xd96f('0x4c')]||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573[_0xd96f('0x41')][0x1]?_0x4b0573['attrs'][0x1]['value']:undefined)||[]},{'name':_0xd96f('0x48'),'value':_0x4b0573['attrFontSize']||(_0x4b0573['attrs']&&_0x4b0573[_0xd96f('0x41')][0x2]?_0x4b0573['attrs'][0x2][_0xd96f('0x42')]:undefined)||0x14},{'name':_0xd96f('0x4d'),'value':_0x4b0573[_0xd96f('0x4d')]||(_0x4b0573['attrs']&&_0x4b0573[_0xd96f('0x41')][0x3]?_0x4b0573[_0xd96f('0x41')][0x3][_0xd96f('0x42')]:undefined)||'voice'},{'name':_0xd96f('0x4e'),'value':_0x4b0573[_0xd96f('0x4e')]||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573[_0xd96f('0x41')][0x4]?_0x4b0573[_0xd96f('0x41')][0x4][_0xd96f('0x42')]:undefined)||''},{'name':_0xd96f('0x4f'),'value':_0x4b0573[_0xd96f('0x4f')]||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573[_0xd96f('0x41')][0x5]?_0x4b0573[_0xd96f('0x41')][0x5][_0xd96f('0x42')]:undefined)||''},{'name':'attrSmsAccounts','value':_0x4b0573[_0xd96f('0x50')]||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573[_0xd96f('0x41')][0x6]?_0x4b0573['attrs'][0x6][_0xd96f('0x42')]:undefined)||''},{'name':'attrOpenchannelAccounts','value':_0x4b0573[_0xd96f('0x51')]||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573[_0xd96f('0x41')][0x7]?_0x4b0573[_0xd96f('0x41')][0x7][_0xd96f('0x42')]:undefined)||''},{'name':_0xd96f('0x52'),'value':_0x4b0573[_0xd96f('0x52')]||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573[_0xd96f('0x41')][0x8]?_0x4b0573[_0xd96f('0x41')][0x8][_0xd96f('0x42')]:undefined)||''},{'name':_0xd96f('0x53'),'value':_0x4b0573[_0xd96f('0x53')]||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573[_0xd96f('0x41')][0x9]?_0x4b0573['attrs'][0x9][_0xd96f('0x42')]:undefined)||''}];case _0xd96f('0x54'):case _0xd96f('0x55'):return[{'name':_0xd96f('0x56'),'value':_0x4b0573['attrSerie1']||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573['attrs'][0x0]?_0x4b0573[_0xd96f('0x41')][0x0][_0xd96f('0x42')]:undefined)||_0xd96f('0x4b')},{'name':'attrSerie2','value':_0x4b0573[_0xd96f('0x57')]||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573[_0xd96f('0x41')][0x1]?_0x4b0573[_0xd96f('0x41')][0x1]['value']:undefined)||null},{'name':_0xd96f('0x58'),'value':_0x4b0573[_0xd96f('0x58')]||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573[_0xd96f('0x41')][0x2]?_0x4b0573[_0xd96f('0x41')][0x2][_0xd96f('0x42')]:undefined)||null},{'name':_0xd96f('0x4c'),'value':_0x4b0573['attrVoiceQueues']||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573['attrs'][0x3]?_0x4b0573[_0xd96f('0x41')][0x3]['value']:undefined)||[]},{'name':_0xd96f('0x4d'),'value':_0x4b0573[_0xd96f('0x4d')]||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573[_0xd96f('0x41')][0x4]?_0x4b0573[_0xd96f('0x41')][0x4][_0xd96f('0x42')]:undefined)||_0xd96f('0x59')},{'name':_0xd96f('0x4e'),'value':_0x4b0573['attrEmailAccounts']||(_0x4b0573['attrs']&&_0x4b0573[_0xd96f('0x41')][0x5]?_0x4b0573[_0xd96f('0x41')][0x5][_0xd96f('0x42')]:undefined)||''},{'name':_0xd96f('0x4f'),'value':_0x4b0573['attrFaxAccounts']||(_0x4b0573['attrs']&&_0x4b0573[_0xd96f('0x41')][0x6]?_0x4b0573[_0xd96f('0x41')][0x6]['value']:undefined)||''},{'name':_0xd96f('0x50'),'value':_0x4b0573['attrSmsAccounts']||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573[_0xd96f('0x41')][0x7]?_0x4b0573['attrs'][0x7][_0xd96f('0x42')]:undefined)||''},{'name':_0xd96f('0x51'),'value':_0x4b0573['attrOpenchannelAccounts']||(_0x4b0573['attrs']&&_0x4b0573[_0xd96f('0x41')][0x8]?_0x4b0573[_0xd96f('0x41')][0x8][_0xd96f('0x42')]:undefined)||''},{'name':_0xd96f('0x52'),'value':_0x4b0573['attrWhatsappAccounts']||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573['attrs'][0x9]?_0x4b0573[_0xd96f('0x41')][0x9][_0xd96f('0x42')]:undefined)||''},{'name':_0xd96f('0x53'),'value':_0x4b0573['attrChatWebsites']||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573[_0xd96f('0x41')][0xa]?_0x4b0573[_0xd96f('0x41')][0xa][_0xd96f('0x42')]:undefined)||''}];case _0xd96f('0x5a'):return[{'name':_0xd96f('0x5b'),'type':_0x4b0573[_0xd96f('0x5c')]||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573[_0xd96f('0x41')][0x0]?_0x4b0573[_0xd96f('0x41')][0x0][_0xd96f('0x3e')]:undefined)||null,'value':_0x4b0573[_0xd96f('0x5b')]||(_0x4b0573[_0xd96f('0x41')]&&_0x4b0573[_0xd96f('0x41')][0x0]?_0x4b0573[_0xd96f('0x41')][0x0][_0xd96f('0x42')]:undefined)||null},{'name':_0xd96f('0x5d'),'value':_0x4b0573['attrRefresh']||(_0x4b0573['attrs']&&_0x4b0573[_0xd96f('0x41')][0x1]?_0x4b0573[_0xd96f('0x41')][0x1][_0xd96f('0x42')]:undefined)||0x0}];default:return[];}}catch(_0x2c6d56){logger[_0xd96f('0x29')]('widgetAttributes:\x20%s',JSON[_0xd96f('0x5e')](_0x2c6d56));return[];}}exports['create']=function(_0x4f2e7b,_0x40baeb){if(_0x4f2e7b[_0xd96f('0x5f')]){_0x4f2e7b[_0xd96f('0x5f')][_0xd96f('0x41')]=widgetAttributes(_0x4f2e7b['body']);}return db[_0xd96f('0x3a')]['create'](_0x4f2e7b['body'],{})[_0xd96f('0x28')](respondWithResult(_0x40baeb,0xc9))['catch'](handleError(_0x40baeb,null));};exports['update']=function(_0x48a776,_0x44b052){if(_0x48a776[_0xd96f('0x5f')]['id']){delete _0x48a776['body']['id'];}_0x48a776[_0xd96f('0x5f')][_0xd96f('0x41')]=widgetAttributes(_0x48a776[_0xd96f('0x5f')]);return db[_0xd96f('0x3a')][_0xd96f('0x3d')]({'where':{'id':_0x48a776[_0xd96f('0x2e')]['id']}})[_0xd96f('0x28')](handleEntityNotFound(_0x44b052,null))[_0xd96f('0x28')](saveUpdates(_0x48a776[_0xd96f('0x5f')],null))['then'](respondWithResult(_0x44b052,null))['catch'](handleError(_0x44b052,null));};
\ No newline at end of file
index d7b2774..b900fb2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2175=['../../mysqldb','setMaxListeners','remove','emit','hook','events'];(function(_0x2bf4db,_0x137b0e){var _0x5a648d=function(_0x1d18cb){while(--_0x1d18cb){_0x2bf4db['push'](_0x2bf4db['shift']());}};_0x5a648d(++_0x137b0e);}(_0x2175,0xa7));var _0x5217=function(_0x2f20ad,_0x20259b){_0x2f20ad=_0x2f20ad-0x0;var _0x12a065=_0x2175[_0x2f20ad];return _0x12a065;};'use strict';var EventEmitter=require(_0x5217('0x0'));var DashboardItem=require(_0x5217('0x1'))['db']['DashboardItem'];var DashboardItemEvents=new EventEmitter();DashboardItemEvents[_0x5217('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x5217('0x3')};function emitEvent(_0x2b3f1e){return function(_0x1c9d91,_0xf3493a,_0x55ada2){DashboardItemEvents[_0x5217('0x4')](_0x2b3f1e+':'+_0x1c9d91['id'],_0x1c9d91);DashboardItemEvents[_0x5217('0x4')](_0x2b3f1e,_0x1c9d91);_0x55ada2(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];DashboardItem[_0x5217('0x5')](e,emitEvent(event));}}module['exports']=DashboardItemEvents;
\ No newline at end of file
+var _0xac8e=['hook','events','../../mysqldb','DashboardItem','setMaxListeners','save','update','emit','hasOwnProperty'];(function(_0x2acbff,_0xa0d280){var _0xce6335=function(_0x5e09ba){while(--_0x5e09ba){_0x2acbff['push'](_0x2acbff['shift']());}};_0xce6335(++_0xa0d280);}(_0xac8e,0x19f));var _0xeac8=function(_0x21f94e,_0x54a04c){_0x21f94e=_0x21f94e-0x0;var _0x4395bf=_0xac8e[_0x21f94e];return _0x4395bf;};'use strict';var EventEmitter=require(_0xeac8('0x0'));var DashboardItem=require(_0xeac8('0x1'))['db'][_0xeac8('0x2')];var DashboardItemEvents=new EventEmitter();DashboardItemEvents[_0xeac8('0x3')](0x0);var events={'afterCreate':_0xeac8('0x4'),'afterUpdate':_0xeac8('0x5'),'afterDestroy':'remove'};function emitEvent(_0x3aaf53){return function(_0x4e7e7d,_0x40c684,_0x4f51ca){DashboardItemEvents['emit'](_0x3aaf53+':'+_0x4e7e7d['id'],_0x4e7e7d);DashboardItemEvents[_0xeac8('0x6')](_0x3aaf53,_0x4e7e7d);_0x4f51ca(null);};}for(var e in events){if(events[_0xeac8('0x7')](e)){var event=events[e];DashboardItem[_0xeac8('0x8')](e,emitEvent(event));}}module['exports']=DashboardItemEvents;
\ No newline at end of file
index ea527ba..c891f02 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x921f=['../../config/environment','./dashboardItem.attributes','define','DashboardItem','dashboard_items','util','../../config/logger','moment','bluebird','path','rimraf'];(function(_0x208d75,_0x92d742){var _0x382d27=function(_0x3aaba3){while(--_0x3aaba3){_0x208d75['push'](_0x208d75['shift']());}};_0x382d27(++_0x92d742);}(_0x921f,0x186));var _0xf921=function(_0x1cfc4d,_0x1e391f){_0x1cfc4d=_0x1cfc4d-0x0;var _0xfcc875=_0x921f[_0x1cfc4d];return _0xfcc875;};'use strict';var _=require('lodash');var util=require(_0xf921('0x0'));var logger=require(_0xf921('0x1'))('api');var moment=require(_0xf921('0x2'));var BPromise=require(_0xf921('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xf921('0x4'));var rimraf=require(_0xf921('0x5'));var config=require(_0xf921('0x6'));var attributes=require(_0xf921('0x7'));module['exports']=function(_0x32a96e,_0x5385a3){return _0x32a96e[_0xf921('0x8')](_0xf921('0x9'),attributes,{'tableName':_0xf921('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x74ce=['util','../../config/logger','moment','request-promise','path','../../config/environment','./dashboardItem.attributes','exports','define','dashboard_items','lodash'];(function(_0x1f1559,_0x30e911){var _0x5726ac=function(_0x5d39a6){while(--_0x5d39a6){_0x1f1559['push'](_0x1f1559['shift']());}};_0x5726ac(++_0x30e911);}(_0x74ce,0x8e));var _0xe74c=function(_0x4f3e56,_0x54b19d){_0x4f3e56=_0x4f3e56-0x0;var _0x5643a9=_0x74ce[_0x4f3e56];return _0x5643a9;};'use strict';var _=require(_0xe74c('0x0'));var util=require(_0xe74c('0x1'));var logger=require(_0xe74c('0x2'))('api');var moment=require(_0xe74c('0x3'));var BPromise=require('bluebird');var rp=require(_0xe74c('0x4'));var fs=require('fs');var path=require(_0xe74c('0x5'));var rimraf=require('rimraf');var config=require(_0xe74c('0x6'));var attributes=require(_0xe74c('0x7'));module[_0xe74c('0x8')]=function(_0x5a19f8,_0x1d436b){return _0x5a19f8[_0xe74c('0x9')]('DashboardItem',attributes,{'tableName':_0xe74c('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index c0c3083..802bc20 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x82fe=['request\x20sent','stringify','error','DashboardItem,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','ioredis','rpc','../../config/environment','jayson/promise','client','defaults','redis','socket.io-emitter','./dashboardItem.socket','register','request','then','info','debug','DashboardItem,\x20%s,\x20%s,\x20%s'];(function(_0x285eb3,_0x3b782e){var _0x2ba487=function(_0x58bea7){while(--_0x58bea7){_0x285eb3['push'](_0x285eb3['shift']());}};_0x2ba487(++_0x3b782e);}(_0x82fe,0x6f));var _0xe82f=function(_0x102470,_0x199a01){_0x102470=_0x102470-0x0;var _0x558eaa=_0x82fe[_0x102470];return _0x558eaa;};'use strict';var _=require(_0xe82f('0x0'));var util=require(_0xe82f('0x1'));var moment=require(_0xe82f('0x2'));var BPromise=require(_0xe82f('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe82f('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xe82f('0x5'));var config=require(_0xe82f('0x6'));var jayson=require(_0xe82f('0x7'));var client=jayson[_0xe82f('0x8')]['http']({'port':0x232a});config['redis']=_[_0xe82f('0x9')](config[_0xe82f('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0xe82f('0xb'))(new Redis(config[_0xe82f('0xa')]));require(_0xe82f('0xc'))[_0xe82f('0xd')](socket);function respondWithRpcPromise(_0x4b18aa,_0x152fdf,_0x5c69fa){return new BPromise(function(_0x13da82,_0x536903){return client[_0xe82f('0xe')](_0x4b18aa,_0x5c69fa)[_0xe82f('0xf')](function(_0xfb0ade){logger[_0xe82f('0x10')]('DashboardItem,\x20%s,\x20%s',_0x152fdf,'request\x20sent');logger[_0xe82f('0x11')](_0xe82f('0x12'),_0x152fdf,_0xe82f('0x13'),JSON[_0xe82f('0x14')](_0xfb0ade));if(_0xfb0ade[_0xe82f('0x15')]){if(_0xfb0ade[_0xe82f('0x15')]['code']===0x1f4){logger['error']('DashboardItem,\x20%s,\x20%s',_0x152fdf,_0xfb0ade['error']['message']);return _0x536903(_0xfb0ade[_0xe82f('0x15')]['message']);}logger[_0xe82f('0x15')](_0xe82f('0x16'),_0x152fdf,_0xfb0ade[_0xe82f('0x15')]['message']);return _0x13da82(_0xfb0ade[_0xe82f('0x15')][_0xe82f('0x17')]);}else{logger[_0xe82f('0x10')]('DashboardItem,\x20%s,\x20%s',_0x152fdf,_0xe82f('0x13'));_0x13da82(_0xfb0ade[_0xe82f('0x18')]['message']);}})[_0xe82f('0x19')](function(_0x424055){logger['error'](_0xe82f('0x16'),_0x152fdf,_0x424055);_0x536903(_0x424055);});});}
\ No newline at end of file
+var _0xe9c3=['request','then','info','DashboardItem,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','http','redis','defaults','socket.io-emitter','./dashboardItem.socket','register'];(function(_0x44dfa0,_0x298ef5){var _0x43d183=function(_0x37e489){while(--_0x37e489){_0x44dfa0['push'](_0x44dfa0['shift']());}};_0x43d183(++_0x298ef5);}(_0xe9c3,0x1a1));var _0x3e9c=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe9c3[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x3e9c('0x0'));var util=require(_0x3e9c('0x1'));var moment=require('moment');var BPromise=require(_0x3e9c('0x2'));var rs=require(_0x3e9c('0x3'));var fs=require('fs');var Redis=require(_0x3e9c('0x4'));var db=require(_0x3e9c('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x3e9c('0x6'));var config=require(_0x3e9c('0x7'));var jayson=require(_0x3e9c('0x8'));var client=jayson['client'][_0x3e9c('0x9')]({'port':0x232a});config[_0x3e9c('0xa')]=_[_0x3e9c('0xb')](config[_0x3e9c('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x3e9c('0xc'))(new Redis(config[_0x3e9c('0xa')]));require(_0x3e9c('0xd'))[_0x3e9c('0xe')](socket);function respondWithRpcPromise(_0x4c8adb,_0x1dca58,_0x49163c){return new BPromise(function(_0x424bfa,_0x2ab028){return client[_0x3e9c('0xf')](_0x4c8adb,_0x49163c)[_0x3e9c('0x10')](function(_0x173f52){logger[_0x3e9c('0x11')](_0x3e9c('0x12'),_0x1dca58,_0x3e9c('0x13'));logger[_0x3e9c('0x14')]('DashboardItem,\x20%s,\x20%s,\x20%s',_0x1dca58,'request\x20sent',JSON[_0x3e9c('0x15')](_0x173f52));if(_0x173f52[_0x3e9c('0x16')]){if(_0x173f52[_0x3e9c('0x16')][_0x3e9c('0x17')]===0x1f4){logger[_0x3e9c('0x16')](_0x3e9c('0x12'),_0x1dca58,_0x173f52[_0x3e9c('0x16')]['message']);return _0x2ab028(_0x173f52['error'][_0x3e9c('0x18')]);}logger[_0x3e9c('0x16')](_0x3e9c('0x12'),_0x1dca58,_0x173f52['error']['message']);return _0x424bfa(_0x173f52[_0x3e9c('0x16')]['message']);}else{logger[_0x3e9c('0x11')]('DashboardItem,\x20%s,\x20%s',_0x1dca58,'request\x20sent');_0x424bfa(_0x173f52[_0x3e9c('0x19')]['message']);}})[_0x3e9c('0x1a')](function(_0x179c96){logger['error'](_0x3e9c('0x12'),_0x1dca58,_0x179c96);_0x2ab028(_0x179c96);});});}
\ No newline at end of file
index 6c17173..30a87cc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf308=['./dashboardItem.events','removeListener','register','length','dashboardItem:'];(function(_0x1526e3,_0x4fcb46){var _0x52a98e=function(_0x58e1fc){while(--_0x58e1fc){_0x1526e3['push'](_0x1526e3['shift']());}};_0x52a98e(++_0x4fcb46);}(_0xf308,0x1a4));var _0x8f30=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xf308[_0x20a584];return _0x4b41a8;};'use strict';var DashboardItemEvents=require(_0x8f30('0x0'));var events=['save','remove','update'];function createListener(_0x269727,_0x1faef2){return function(_0x5aaf9){_0x1faef2['emit'](_0x269727,_0x5aaf9);};}function removeListener(_0x2caea7,_0x537183){return function(){DashboardItemEvents[_0x8f30('0x1')](_0x2caea7,_0x537183);};}exports[_0x8f30('0x2')]=function(_0x7fffd5){for(var _0x36614a=0x0,_0x42df5b=events[_0x8f30('0x3')];_0x36614a<_0x42df5b;_0x36614a++){var _0x47bcb9=events[_0x36614a];var _0xedb3df=createListener(_0x8f30('0x4')+_0x47bcb9,_0x7fffd5);DashboardItemEvents['on'](_0x47bcb9,_0xedb3df);}};
\ No newline at end of file
+var _0xb670=['register','length','dashboardItem:','./dashboardItem.events','remove','update','emit','removeListener'];(function(_0x5d660b,_0x2b6023){var _0x29263a=function(_0x2320ff){while(--_0x2320ff){_0x5d660b['push'](_0x5d660b['shift']());}};_0x29263a(++_0x2b6023);}(_0xb670,0x183));var _0x0b67=function(_0x517930,_0x5113ce){_0x517930=_0x517930-0x0;var _0x40b258=_0xb670[_0x517930];return _0x40b258;};'use strict';var DashboardItemEvents=require(_0x0b67('0x0'));var events=['save',_0x0b67('0x1'),_0x0b67('0x2')];function createListener(_0x57c514,_0x3a94f6){return function(_0x26eb4f){_0x3a94f6[_0x0b67('0x3')](_0x57c514,_0x26eb4f);};}function removeListener(_0x41a9fb,_0x23e498){return function(){DashboardItemEvents[_0x0b67('0x4')](_0x41a9fb,_0x23e498);};}exports[_0x0b67('0x5')]=function(_0xd1f091){for(var _0x219147=0x0,_0x59ae51=events[_0x0b67('0x6')];_0x219147<_0x59ae51;_0x219147++){var _0x484367=events[_0x219147];var _0xfd5d8=createListener(_0x0b67('0x7')+_0x484367,_0xd1f091);DashboardItemEvents['on'](_0x484367,_0xfd5d8);}};
\ No newline at end of file
index 7653707..7347779 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6918=['post','create','put','isAuthenticated','update','delete','destroy','exports','util','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./dashboardItem.controller','get','/:id','show'];(function(_0x1d9aa0,_0x272488){var _0x226868=function(_0x17127c){while(--_0x17127c){_0x1d9aa0['push'](_0x1d9aa0['shift']());}};_0x226868(++_0x272488);}(_0x6918,0x1bd));var _0x8691=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x6918[_0x14add3];return _0x4a174f;};'use strict';var multer=require('multer');var util=require(_0x8691('0x0'));var path=require(_0x8691('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x8691('0x2')]();var fs_extra=require(_0x8691('0x3'));var auth=require(_0x8691('0x4'));var interaction=require(_0x8691('0x5'));var config=require(_0x8691('0x6'));var controller=require(_0x8691('0x7'));router[_0x8691('0x8')](_0x8691('0x9'),auth['isAuthenticated'](),controller[_0x8691('0xa')]);router[_0x8691('0xb')]('/',auth['isAuthenticated'](),controller[_0x8691('0xc')]);router[_0x8691('0xd')]('/:id',auth[_0x8691('0xe')](),controller[_0x8691('0xf')]);router[_0x8691('0x10')](_0x8691('0x9'),auth[_0x8691('0xe')](),controller[_0x8691('0x11')]);module[_0x8691('0x12')]=router;
\ No newline at end of file
+var _0xb8e1=['create','put','update','delete','destroy','multer','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./dashboardItem.controller','get','/:id','isAuthenticated','show','post'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0xb8e1,0x10f));var _0x1b8e=function(_0x407ae9,_0x24b68d){_0x407ae9=_0x407ae9-0x0;var _0x135f55=_0xb8e1[_0x407ae9];return _0x135f55;};'use strict';var multer=require(_0x1b8e('0x0'));var util=require(_0x1b8e('0x1'));var path=require(_0x1b8e('0x2'));var timeout=require(_0x1b8e('0x3'));var express=require(_0x1b8e('0x4'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x1b8e('0x5'));var interaction=require(_0x1b8e('0x6'));var config=require(_0x1b8e('0x7'));var controller=require(_0x1b8e('0x8'));router[_0x1b8e('0x9')](_0x1b8e('0xa'),auth[_0x1b8e('0xb')](),controller[_0x1b8e('0xc')]);router[_0x1b8e('0xd')]('/',auth[_0x1b8e('0xb')](),controller[_0x1b8e('0xe')]);router[_0x1b8e('0xf')](_0x1b8e('0xa'),auth['isAuthenticated'](),controller[_0x1b8e('0x10')]);router[_0x1b8e('0x11')](_0x1b8e('0xa'),auth[_0x1b8e('0xb')](),controller[_0x1b8e('0x12')]);module['exports']=router;
\ No newline at end of file
index 3da3a64..47bed9e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf1d1=['ENUM','first','third','sequelize','exports','STRING'];(function(_0x22563a,_0x347993){var _0x5a028e=function(_0x1d9229){while(--_0x1d9229){_0x22563a['push'](_0x22563a['shift']());}};_0x5a028e(++_0x347993);}(_0xf1d1,0x111));var _0x1f1d=function(_0x2ec39e,_0x3ee3be){_0x2ec39e=_0x2ec39e-0x0;var _0x5f1b27=_0xf1d1[_0x2ec39e];return _0x5f1b27;};'use strict';var Sequelize=require(_0x1f1d('0x0'));module[_0x1f1d('0x1')]={'name':{'type':Sequelize[_0x1f1d('0x2')],'allowNull':![]},'level':{'type':Sequelize[_0x1f1d('0x3')](_0x1f1d('0x4'),'second',_0x1f1d('0x5')),'allowNull':![],'defaultValue':'first'},'description':{'type':Sequelize[_0x1f1d('0x2')]}};
\ No newline at end of file
+var _0x041b=['second','third','first','STRING','sequelize','exports','ENUM'];(function(_0x19323e,_0x163042){var _0xf54fa6=function(_0x421f6d){while(--_0x421f6d){_0x19323e['push'](_0x19323e['shift']());}};_0xf54fa6(++_0x163042);}(_0x041b,0x10e));var _0xb041=function(_0x1f39bc,_0x5cab32){_0x1f39bc=_0x1f39bc-0x0;var _0x24a85a=_0x041b[_0x1f39bc];return _0x24a85a;};'use strict';var Sequelize=require(_0xb041('0x0'));module[_0xb041('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'level':{'type':Sequelize[_0xb041('0x2')]('first',_0xb041('0x3'),_0xb041('0x4')),'allowNull':![],'defaultValue':_0xb041('0x5')},'description':{'type':Sequelize[_0xb041('0x6')]}};
\ No newline at end of file
index 3b138a8..bee278e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x060c=['offset','undefined','count','set','Content-Range','apply','save','update','then','destroy','get','error','name','send','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','limit','order','sort','where','filter','VIRTUAL','merge','options','includeAll','Disposition','findAll','rows','catch','show','params','include','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','userProfileId','autoAssociation','UserProfileResource','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','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json'];(function(_0x17406a,_0x1e2320){var _0x1501ff=function(_0x4b075a){while(--_0x4b075a){_0x17406a['push'](_0x17406a['shift']());}};_0x1501ff(++_0x1e2320);}(_0x060c,0x1e4));var _0xc060=function(_0x2f79c8,_0x338536){_0x2f79c8=_0x2f79c8-0x0;var _0x536c86=_0x060c[_0x2f79c8];return _0x536c86;};'use strict';var emlformat=require(_0xc060('0x0'));var rimraf=require(_0xc060('0x1'));var zipdir=require(_0xc060('0x2'));var jsonpatch=require(_0xc060('0x3'));var rp=require('request-promise');var moment=require(_0xc060('0x4'));var BPromise=require(_0xc060('0x5'));var Mustache=require(_0xc060('0x6'));var util=require(_0xc060('0x7'));var path=require(_0xc060('0x8'));var sox=require(_0xc060('0x9'));var csv=require(_0xc060('0xa'));var ejs=require(_0xc060('0xb'));var fs=require('fs');var fs_extra=require(_0xc060('0xc'));var _=require(_0xc060('0xd'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xc060('0xe'));var deskjs=require(_0xc060('0xf'));var toCsv=require(_0xc060('0xa'));var querystring=require(_0xc060('0x10'));var Papa=require(_0xc060('0x11'));var Redis=require(_0xc060('0x12'));var authService=require('../../components/auth/service');var qs=require(_0xc060('0x13'));var as=require(_0xc060('0x14'));var hardwareService=require(_0xc060('0x15'));var logger=require(_0xc060('0x16'))(_0xc060('0x17'));var utils=require(_0xc060('0x18'));var config=require(_0xc060('0x19'));var licenseUtil=require(_0xc060('0x1a'));var db=require(_0xc060('0x1b'))['db'];function respondWithStatusCode(_0x4d9a1d,_0x57ebbb){_0x57ebbb=_0x57ebbb||0xcc;return function(_0x228a85){if(_0x228a85){return _0x4d9a1d[_0xc060('0x1c')](_0x57ebbb);}return _0x4d9a1d['status'](_0x57ebbb)[_0xc060('0x1d')]();};}function respondWithResult(_0x2038d5,_0x1ef45e){_0x1ef45e=_0x1ef45e||0xc8;return function(_0xd3c41){if(_0xd3c41){return _0x2038d5[_0xc060('0x1e')](_0x1ef45e)[_0xc060('0x1f')](_0xd3c41);}};}function respondWithFilteredResult(_0x43ebd0,_0x536a12){return function(_0x166048){if(_0x166048){var _0x54a8d6=typeof _0x536a12[_0xc060('0x20')]===_0xc060('0x21')&&typeof _0x536a12['limit']==='undefined';var _0x14aee2=_0x166048[_0xc060('0x22')];var _0x37c277=_0x54a8d6?0x0:_0x536a12[_0xc060('0x20')];var _0x2ec271=_0x54a8d6?_0x166048['count']:_0x536a12[_0xc060('0x20')]+_0x536a12['limit'];var _0x2d809c;if(_0x2ec271>=_0x14aee2){_0x2ec271=_0x14aee2;_0x2d809c=0xc8;}else{_0x2d809c=0xce;}_0x43ebd0[_0xc060('0x1e')](_0x2d809c);return _0x43ebd0[_0xc060('0x23')](_0xc060('0x24'),_0x37c277+'-'+_0x2ec271+'/'+_0x14aee2)[_0xc060('0x1f')](_0x166048);}return null;};}function patchUpdates(_0x177fc6){return function(_0x5a9f7a){try{jsonpatch[_0xc060('0x25')](_0x5a9f7a,_0x177fc6,!![]);}catch(_0xfdc98c){return BPromise['reject'](_0xfdc98c);}return _0x5a9f7a[_0xc060('0x26')]();};}function saveUpdates(_0x4eb877,_0x3133d6){return function(_0x24821e){if(_0x24821e){return _0x24821e[_0xc060('0x27')](_0x4eb877)[_0xc060('0x28')](function(_0x595787){return _0x595787;});}return null;};}function removeEntity(_0x39610e,_0x2a4b41){return function(_0x4cb99c){if(_0x4cb99c){return _0x4cb99c[_0xc060('0x29')]()[_0xc060('0x28')](function(){var _0x28fdbc=_0x4cb99c[_0xc060('0x2a')]({'plain':!![]});var _0x2f5350='Dispositions';return db['UserProfileResource'][_0xc060('0x29')]({'where':{'type':_0x2f5350,'resourceId':_0x28fdbc['id']}})[_0xc060('0x28')](function(){return _0x4cb99c;});})['then'](function(){_0x39610e[_0xc060('0x1e')](0xcc)[_0xc060('0x1d')]();});}};}function handleEntityNotFound(_0x91a134,_0x3e81d6){return function(_0x429721){if(!_0x429721){_0x91a134[_0xc060('0x1c')](0x194);}return _0x429721;};}function handleError(_0x2413e7,_0x44d65d){_0x44d65d=_0x44d65d||0x1f4;return function(_0x33e579){logger[_0xc060('0x2b')](_0x33e579['stack']);if(_0x33e579['name']){delete _0x33e579[_0xc060('0x2c')];}_0x2413e7[_0xc060('0x1e')](_0x44d65d)[_0xc060('0x2d')](_0x33e579);};}exports['index']=function(_0x4e1469,_0x3f1910){var _0x447f27={},_0x1bbc02={},_0x269176={'count':0x0,'rows':[]};var _0x172e44=_[_0xc060('0x2e')](db['Disposition'][_0xc060('0x2f')],function(_0x1aa7c5){return{'name':_0x1aa7c5[_0xc060('0x30')],'type':_0x1aa7c5[_0xc060('0x31')][_0xc060('0x32')]};});_0x1bbc02[_0xc060('0x33')]=_[_0xc060('0x2e')](_0x172e44,_0xc060('0x2c'));_0x1bbc02[_0xc060('0x34')]=_[_0xc060('0x35')](_0x4e1469['query']);_0x1bbc02[_0xc060('0x36')]=_[_0xc060('0x37')](_0x1bbc02[_0xc060('0x33')],_0x1bbc02[_0xc060('0x34')]);_0x447f27[_0xc060('0x38')]=_[_0xc060('0x37')](_0x1bbc02['model'],qs[_0xc060('0x39')](_0x4e1469[_0xc060('0x34')]['fields']));_0x447f27[_0xc060('0x38')]=_0x447f27[_0xc060('0x38')]['length']?_0x447f27['attributes']:_0x1bbc02[_0xc060('0x33')];if(!_0x4e1469[_0xc060('0x34')][_0xc060('0x3a')](_0xc060('0x3b'))){_0x447f27[_0xc060('0x3c')]=qs['limit'](_0x4e1469['query'][_0xc060('0x3c')]);_0x447f27[_0xc060('0x20')]=qs['offset'](_0x4e1469[_0xc060('0x34')][_0xc060('0x20')]);}_0x447f27[_0xc060('0x3d')]=qs[_0xc060('0x3e')](_0x4e1469[_0xc060('0x34')]['sort']);_0x447f27[_0xc060('0x3f')]=qs[_0xc060('0x36')](_['pick'](_0x4e1469[_0xc060('0x34')],_0x1bbc02[_0xc060('0x36')]),_0x172e44);if(_0x4e1469[_0xc060('0x34')][_0xc060('0x40')]){_0x447f27[_0xc060('0x3f')]=_['merge'](_0x447f27[_0xc060('0x3f')],{'$or':_[_0xc060('0x2e')](_0x172e44,function(_0x5df2af){if(_0x5df2af[_0xc060('0x31')]!==_0xc060('0x41')){var _0x5a94af={};_0x5a94af[_0x5df2af[_0xc060('0x2c')]]={'$like':'%'+_0x4e1469[_0xc060('0x34')][_0xc060('0x40')]+'%'};return _0x5a94af;}})});}_0x447f27=_[_0xc060('0x42')]({},_0x447f27,_0x4e1469[_0xc060('0x43')]);var _0x20d320={'where':_0x447f27[_0xc060('0x3f')]};return db['Disposition']['count'](_0x20d320)[_0xc060('0x28')](function(_0x26cb9f){_0x269176[_0xc060('0x22')]=_0x26cb9f;if(_0x4e1469['query'][_0xc060('0x44')]){_0x447f27['include']=[{'all':!![]}];}return db[_0xc060('0x45')][_0xc060('0x46')](_0x447f27);})[_0xc060('0x28')](function(_0x3c7284){_0x269176[_0xc060('0x47')]=_0x3c7284;return _0x269176;})[_0xc060('0x28')](respondWithFilteredResult(_0x3f1910,_0x447f27))[_0xc060('0x48')](handleError(_0x3f1910,null));};exports[_0xc060('0x49')]=function(_0x18e1b8,_0x3cca05){var _0x3eef6b={'raw':!![],'where':{'id':_0x18e1b8[_0xc060('0x4a')]['id']}},_0x942120={};_0x942120[_0xc060('0x33')]=_[_0xc060('0x35')](db['Disposition'][_0xc060('0x2f')]);_0x942120[_0xc060('0x34')]=_[_0xc060('0x35')](_0x18e1b8['query']);_0x942120[_0xc060('0x36')]=_['intersection'](_0x942120[_0xc060('0x33')],_0x942120[_0xc060('0x34')]);_0x3eef6b[_0xc060('0x38')]=_[_0xc060('0x37')](_0x942120['model'],qs[_0xc060('0x39')](_0x18e1b8[_0xc060('0x34')][_0xc060('0x39')]));_0x3eef6b['attributes']=_0x3eef6b[_0xc060('0x38')]['length']?_0x3eef6b[_0xc060('0x38')]:_0x942120[_0xc060('0x33')];if(_0x18e1b8[_0xc060('0x34')]['includeAll']){_0x3eef6b[_0xc060('0x4b')]=[{'all':!![]}];}_0x3eef6b=_['merge']({},_0x3eef6b,_0x18e1b8[_0xc060('0x43')]);return db[_0xc060('0x45')][_0xc060('0x4c')](_0x3eef6b)['then'](handleEntityNotFound(_0x3cca05,null))[_0xc060('0x28')](respondWithResult(_0x3cca05,null))[_0xc060('0x48')](handleError(_0x3cca05,null));};exports[_0xc060('0x4d')]=function(_0x3164de,_0x58806f){return db[_0xc060('0x45')][_0xc060('0x4d')](_0x3164de[_0xc060('0x4e')],{})[_0xc060('0x28')](function(_0x3fbe7a){var _0x14d573=_0x3164de['user'][_0xc060('0x2a')]({'plain':!![]});if(!_0x14d573)throw new Error(_0xc060('0x4f'));if(_0x14d573[_0xc060('0x50')]===_0xc060('0x51')){var _0x372399=_0x3fbe7a[_0xc060('0x2a')]({'plain':!![]});var _0x1b3952='Dispositions';return db['UserProfileSection']['find']({'where':{'name':_0x1b3952,'userProfileId':_0x14d573[_0xc060('0x52')]},'raw':!![]})[_0xc060('0x28')](function(_0x422397){if(_0x422397&&_0x422397[_0xc060('0x53')]===0x0){return db[_0xc060('0x54')][_0xc060('0x4d')]({'name':_0x372399['name'],'resourceId':_0x372399['id'],'type':_0x422397[_0xc060('0x2c')],'sectionId':_0x422397['id']},{})[_0xc060('0x28')](function(){return _0x3fbe7a;});}else{return _0x3fbe7a;}})[_0xc060('0x48')](function(_0x3720b2){logger[_0xc060('0x2b')](_0xc060('0x55'),_0x3720b2);throw _0x3720b2;});}return _0x3fbe7a;})[_0xc060('0x28')](respondWithResult(_0x58806f,0xc9))[_0xc060('0x48')](handleError(_0x58806f,null));};exports[_0xc060('0x27')]=function(_0xe262ad,_0x25d8bb){if(_0xe262ad[_0xc060('0x4e')]['id']){delete _0xe262ad[_0xc060('0x4e')]['id'];}return db['Disposition'][_0xc060('0x4c')]({'where':{'id':_0xe262ad[_0xc060('0x4a')]['id']}})['then'](handleEntityNotFound(_0x25d8bb,null))[_0xc060('0x28')](saveUpdates(_0xe262ad[_0xc060('0x4e')],null))[_0xc060('0x28')](respondWithResult(_0x25d8bb,null))[_0xc060('0x48')](handleError(_0x25d8bb,null));};exports[_0xc060('0x29')]=function(_0x2d42c8,_0x3f6902){return db['Disposition'][_0xc060('0x4c')]({'where':{'id':_0x2d42c8[_0xc060('0x4a')]['id']}})[_0xc060('0x28')](handleEntityNotFound(_0x3f6902,null))[_0xc060('0x28')](removeEntity(_0x3f6902,null))[_0xc060('0x48')](handleError(_0x3f6902,null));};
\ No newline at end of file
+var _0xf771=['sendStatus','status','end','json','limit','undefined','offset','set','Content-Range','apply','save','update','then','Dispositions','destroy','error','stack','name','send','map','Disposition','fieldName','type','key','model','keys','attributes','intersection','fields','length','query','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','options','count','findAll','rows','show','rawAttributes','catch','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','find','params','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xf771,0x8e));var _0x1f77=function(_0x2056da,_0x433665){_0x2056da=_0x2056da-0x0;var _0x696728=_0xf771[_0x2056da];return _0x696728;};'use strict';var emlformat=require(_0x1f77('0x0'));var rimraf=require(_0x1f77('0x1'));var zipdir=require(_0x1f77('0x2'));var jsonpatch=require(_0x1f77('0x3'));var rp=require(_0x1f77('0x4'));var moment=require(_0x1f77('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x1f77('0x6'));var util=require(_0x1f77('0x7'));var path=require(_0x1f77('0x8'));var sox=require(_0x1f77('0x9'));var csv=require(_0x1f77('0xa'));var ejs=require(_0x1f77('0xb'));var fs=require('fs');var fs_extra=require(_0x1f77('0xc'));var _=require('lodash');var squel=require(_0x1f77('0xd'));var crypto=require(_0x1f77('0xe'));var jsforce=require(_0x1f77('0xf'));var deskjs=require(_0x1f77('0x10'));var toCsv=require('to-csv');var querystring=require(_0x1f77('0x11'));var Papa=require(_0x1f77('0x12'));var Redis=require(_0x1f77('0x13'));var authService=require(_0x1f77('0x14'));var qs=require('../../components/parsers/qs');var as=require(_0x1f77('0x15'));var hardwareService=require(_0x1f77('0x16'));var logger=require(_0x1f77('0x17'))('api');var utils=require(_0x1f77('0x18'));var config=require(_0x1f77('0x19'));var licenseUtil=require(_0x1f77('0x1a'));var db=require(_0x1f77('0x1b'))['db'];function respondWithStatusCode(_0x27d779,_0x283093){_0x283093=_0x283093||0xcc;return function(_0x3ad570){if(_0x3ad570){return _0x27d779[_0x1f77('0x1c')](_0x283093);}return _0x27d779[_0x1f77('0x1d')](_0x283093)[_0x1f77('0x1e')]();};}function respondWithResult(_0x1542e9,_0x1fd90c){_0x1fd90c=_0x1fd90c||0xc8;return function(_0x53792e){if(_0x53792e){return _0x1542e9[_0x1f77('0x1d')](_0x1fd90c)[_0x1f77('0x1f')](_0x53792e);}};}function respondWithFilteredResult(_0x37215a,_0x664165){return function(_0x5419e5){if(_0x5419e5){var _0x5676aa=typeof _0x664165['offset']==='undefined'&&typeof _0x664165[_0x1f77('0x20')]===_0x1f77('0x21');var _0x17a736=_0x5419e5['count'];var _0x64000e=_0x5676aa?0x0:_0x664165['offset'];var _0x45f1d0=_0x5676aa?_0x5419e5['count']:_0x664165[_0x1f77('0x22')]+_0x664165['limit'];var _0x520da8;if(_0x45f1d0>=_0x17a736){_0x45f1d0=_0x17a736;_0x520da8=0xc8;}else{_0x520da8=0xce;}_0x37215a[_0x1f77('0x1d')](_0x520da8);return _0x37215a[_0x1f77('0x23')](_0x1f77('0x24'),_0x64000e+'-'+_0x45f1d0+'/'+_0x17a736)[_0x1f77('0x1f')](_0x5419e5);}return null;};}function patchUpdates(_0x566ba4){return function(_0x157ac0){try{jsonpatch[_0x1f77('0x25')](_0x157ac0,_0x566ba4,!![]);}catch(_0x149b1b){return BPromise['reject'](_0x149b1b);}return _0x157ac0[_0x1f77('0x26')]();};}function saveUpdates(_0x5c2ff3,_0xf4588d){return function(_0x537e72){if(_0x537e72){return _0x537e72[_0x1f77('0x27')](_0x5c2ff3)[_0x1f77('0x28')](function(_0x27644b){return _0x27644b;});}return null;};}function removeEntity(_0x5b0884,_0x3973a5){return function(_0x2f63d7){if(_0x2f63d7){return _0x2f63d7['destroy']()['then'](function(){var _0x59dfeb=_0x2f63d7['get']({'plain':!![]});var _0x48cabe=_0x1f77('0x29');return db['UserProfileResource'][_0x1f77('0x2a')]({'where':{'type':_0x48cabe,'resourceId':_0x59dfeb['id']}})[_0x1f77('0x28')](function(){return _0x2f63d7;});})['then'](function(){_0x5b0884['status'](0xcc)[_0x1f77('0x1e')]();});}};}function handleEntityNotFound(_0x5c4629,_0x2e9334){return function(_0xd5c1e4){if(!_0xd5c1e4){_0x5c4629['sendStatus'](0x194);}return _0xd5c1e4;};}function handleError(_0x3ac302,_0x8d7d25){_0x8d7d25=_0x8d7d25||0x1f4;return function(_0x29268){logger[_0x1f77('0x2b')](_0x29268[_0x1f77('0x2c')]);if(_0x29268[_0x1f77('0x2d')]){delete _0x29268[_0x1f77('0x2d')];}_0x3ac302[_0x1f77('0x1d')](_0x8d7d25)[_0x1f77('0x2e')](_0x29268);};}exports['index']=function(_0x1b7787,_0x56951){var _0x39ace8={},_0x1313f9={},_0x233294={'count':0x0,'rows':[]};var _0xf46df4=_[_0x1f77('0x2f')](db[_0x1f77('0x30')]['rawAttributes'],function(_0x480198){return{'name':_0x480198[_0x1f77('0x31')],'type':_0x480198[_0x1f77('0x32')][_0x1f77('0x33')]};});_0x1313f9[_0x1f77('0x34')]=_[_0x1f77('0x2f')](_0xf46df4,'name');_0x1313f9['query']=_[_0x1f77('0x35')](_0x1b7787['query']);_0x1313f9['filters']=_['intersection'](_0x1313f9[_0x1f77('0x34')],_0x1313f9['query']);_0x39ace8[_0x1f77('0x36')]=_[_0x1f77('0x37')](_0x1313f9[_0x1f77('0x34')],qs[_0x1f77('0x38')](_0x1b7787['query'][_0x1f77('0x38')]));_0x39ace8['attributes']=_0x39ace8['attributes'][_0x1f77('0x39')]?_0x39ace8[_0x1f77('0x36')]:_0x1313f9[_0x1f77('0x34')];if(!_0x1b7787[_0x1f77('0x3a')][_0x1f77('0x3b')](_0x1f77('0x3c'))){_0x39ace8['limit']=qs[_0x1f77('0x20')](_0x1b7787['query'][_0x1f77('0x20')]);_0x39ace8[_0x1f77('0x22')]=qs[_0x1f77('0x22')](_0x1b7787[_0x1f77('0x3a')][_0x1f77('0x22')]);}_0x39ace8[_0x1f77('0x3d')]=qs[_0x1f77('0x3e')](_0x1b7787[_0x1f77('0x3a')][_0x1f77('0x3e')]);_0x39ace8[_0x1f77('0x3f')]=qs[_0x1f77('0x40')](_[_0x1f77('0x41')](_0x1b7787[_0x1f77('0x3a')],_0x1313f9[_0x1f77('0x40')]),_0xf46df4);if(_0x1b7787[_0x1f77('0x3a')][_0x1f77('0x42')]){_0x39ace8[_0x1f77('0x3f')]=_[_0x1f77('0x43')](_0x39ace8[_0x1f77('0x3f')],{'$or':_[_0x1f77('0x2f')](_0xf46df4,function(_0x1bfbb5){if(_0x1bfbb5[_0x1f77('0x32')]!=='VIRTUAL'){var _0x1ce3cc={};_0x1ce3cc[_0x1bfbb5[_0x1f77('0x2d')]]={'$like':'%'+_0x1b7787['query'][_0x1f77('0x42')]+'%'};return _0x1ce3cc;}})});}_0x39ace8=_['merge']({},_0x39ace8,_0x1b7787[_0x1f77('0x44')]);var _0x24ff61={'where':_0x39ace8[_0x1f77('0x3f')]};return db['Disposition'][_0x1f77('0x45')](_0x24ff61)[_0x1f77('0x28')](function(_0x1bdda9){_0x233294['count']=_0x1bdda9;if(_0x1b7787[_0x1f77('0x3a')]['includeAll']){_0x39ace8['include']=[{'all':!![]}];}return db[_0x1f77('0x30')][_0x1f77('0x46')](_0x39ace8);})[_0x1f77('0x28')](function(_0x292ec1){_0x233294[_0x1f77('0x47')]=_0x292ec1;return _0x233294;})[_0x1f77('0x28')](respondWithFilteredResult(_0x56951,_0x39ace8))['catch'](handleError(_0x56951,null));};exports[_0x1f77('0x48')]=function(_0x60c9c4,_0x117bb4){var _0x36c2fc={'raw':!![],'where':{'id':_0x60c9c4['params']['id']}},_0x543793={};_0x543793[_0x1f77('0x34')]=_[_0x1f77('0x35')](db['Disposition'][_0x1f77('0x49')]);_0x543793[_0x1f77('0x3a')]=_['keys'](_0x60c9c4[_0x1f77('0x3a')]);_0x543793['filters']=_['intersection'](_0x543793['model'],_0x543793[_0x1f77('0x3a')]);_0x36c2fc[_0x1f77('0x36')]=_['intersection'](_0x543793[_0x1f77('0x34')],qs[_0x1f77('0x38')](_0x60c9c4[_0x1f77('0x3a')][_0x1f77('0x38')]));_0x36c2fc[_0x1f77('0x36')]=_0x36c2fc[_0x1f77('0x36')][_0x1f77('0x39')]?_0x36c2fc[_0x1f77('0x36')]:_0x543793[_0x1f77('0x34')];if(_0x60c9c4['query']['includeAll']){_0x36c2fc['include']=[{'all':!![]}];}_0x36c2fc=_[_0x1f77('0x43')]({},_0x36c2fc,_0x60c9c4[_0x1f77('0x44')]);return db[_0x1f77('0x30')]['find'](_0x36c2fc)[_0x1f77('0x28')](handleEntityNotFound(_0x117bb4,null))['then'](respondWithResult(_0x117bb4,null))[_0x1f77('0x4a')](handleError(_0x117bb4,null));};exports[_0x1f77('0x4b')]=function(_0x487eb2,_0x37e703){return db[_0x1f77('0x30')][_0x1f77('0x4b')](_0x487eb2[_0x1f77('0x4c')],{})[_0x1f77('0x28')](function(_0x18b0fc){var _0x369d95=_0x487eb2[_0x1f77('0x4d')][_0x1f77('0x4e')]({'plain':!![]});if(!_0x369d95)throw new Error(_0x1f77('0x4f'));if(_0x369d95[_0x1f77('0x50')]==='user'){var _0x2bae06=_0x18b0fc[_0x1f77('0x4e')]({'plain':!![]});var _0x501be1=_0x1f77('0x29');return db['UserProfileSection']['find']({'where':{'name':_0x501be1,'userProfileId':_0x369d95['userProfileId']},'raw':!![]})[_0x1f77('0x28')](function(_0x48f446){if(_0x48f446&&_0x48f446[_0x1f77('0x51')]===0x0){return db['UserProfileResource'][_0x1f77('0x4b')]({'name':_0x2bae06['name'],'resourceId':_0x2bae06['id'],'type':_0x48f446[_0x1f77('0x2d')],'sectionId':_0x48f446['id']},{})['then'](function(){return _0x18b0fc;});}else{return _0x18b0fc;}})[_0x1f77('0x4a')](function(_0x3ea17c){logger['error'](_0x1f77('0x52'),_0x3ea17c);throw _0x3ea17c;});}return _0x18b0fc;})['then'](respondWithResult(_0x37e703,0xc9))[_0x1f77('0x4a')](handleError(_0x37e703,null));};exports[_0x1f77('0x27')]=function(_0xe7c839,_0x5088c2){if(_0xe7c839['body']['id']){delete _0xe7c839[_0x1f77('0x4c')]['id'];}return db['Disposition'][_0x1f77('0x53')]({'where':{'id':_0xe7c839[_0x1f77('0x54')]['id']}})['then'](handleEntityNotFound(_0x5088c2,null))['then'](saveUpdates(_0xe7c839[_0x1f77('0x4c')],null))[_0x1f77('0x28')](respondWithResult(_0x5088c2,null))[_0x1f77('0x4a')](handleError(_0x5088c2,null));};exports[_0x1f77('0x2a')]=function(_0x252b4a,_0x3fc730){return db[_0x1f77('0x30')][_0x1f77('0x53')]({'where':{'id':_0x252b4a[_0x1f77('0x54')]['id']}})[_0x1f77('0x28')](handleEntityNotFound(_0x3fc730,null))['then'](removeEntity(_0x3fc730,null))[_0x1f77('0x4a')](handleError(_0x3fc730,null));};
\ No newline at end of file
index 7fa1e5a..742b857 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcfbf=['name_whatsapp','WhatsappAccountId','lodash','util','moment','request-promise','path','rimraf','../../config/environment','./disposition.attributes','exports','Disposition','tools_dispositions','ListId','name_chat','name_mail','name','name_sms','SmsAccountId','FaxAccountId','name_openchannel'];(function(_0x5afbd5,_0x48a693){var _0x298511=function(_0x2f4262){while(--_0x2f4262){_0x5afbd5['push'](_0x5afbd5['shift']());}};_0x298511(++_0x48a693);}(_0xcfbf,0x152));var _0xfcfb=function(_0x5dedd6,_0x22f74c){_0x5dedd6=_0x5dedd6-0x0;var _0x424ac2=_0xcfbf[_0x5dedd6];return _0x424ac2;};'use strict';var _=require(_0xfcfb('0x0'));var util=require(_0xfcfb('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xfcfb('0x2'));var BPromise=require('bluebird');var rp=require(_0xfcfb('0x3'));var fs=require('fs');var path=require(_0xfcfb('0x4'));var rimraf=require(_0xfcfb('0x5'));var config=require(_0xfcfb('0x6'));var attributes=require(_0xfcfb('0x7'));module[_0xfcfb('0x8')]=function(_0x11a37c,_0x3be8b0){return _0x11a37c['define'](_0xfcfb('0x9'),attributes,{'tableName':_0xfcfb('0xa'),'paranoid':![],'indexes':[{'unique':!![],'name':'name_voice','fields':['name',_0xfcfb('0xb')]},{'unique':!![],'name':_0xfcfb('0xc'),'fields':['name','ChatWebsiteId']},{'unique':!![],'name':_0xfcfb('0xd'),'fields':[_0xfcfb('0xe'),'MailAccountId']},{'unique':!![],'name':_0xfcfb('0xf'),'fields':['name',_0xfcfb('0x10')]},{'unique':!![],'name':'name_fax','fields':[_0xfcfb('0xe'),_0xfcfb('0x11')]},{'unique':!![],'name':_0xfcfb('0x12'),'fields':['name','OpenchannelAccountId']},{'unique':!![],'name':_0xfcfb('0x13'),'fields':['name',_0xfcfb('0x14')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x8c29=['Disposition','tools_dispositions','name_voice','name_chat','name','ChatWebsiteId','name_mail','name_sms','SmsAccountId','name_fax','FaxAccountId','name_openchannel','OpenchannelAccountId','name_whatsapp','WhatsappAccountId','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./disposition.attributes','define'];(function(_0x5a5f05,_0x234d2a){var _0x52a1d4=function(_0x4d9e7c){while(--_0x4d9e7c){_0x5a5f05['push'](_0x5a5f05['shift']());}};_0x52a1d4(++_0x234d2a);}(_0x8c29,0x147));var _0x98c2=function(_0x116b81,_0x5cc097){_0x116b81=_0x116b81-0x0;var _0x4b9678=_0x8c29[_0x116b81];return _0x4b9678;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x98c2('0x0'))(_0x98c2('0x1'));var moment=require(_0x98c2('0x2'));var BPromise=require(_0x98c2('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x98c2('0x4'));var rimraf=require(_0x98c2('0x5'));var config=require(_0x98c2('0x6'));var attributes=require(_0x98c2('0x7'));module['exports']=function(_0x2c1ee4,_0x3f8d56){return _0x2c1ee4[_0x98c2('0x8')](_0x98c2('0x9'),attributes,{'tableName':_0x98c2('0xa'),'paranoid':![],'indexes':[{'unique':!![],'name':_0x98c2('0xb'),'fields':['name','ListId']},{'unique':!![],'name':_0x98c2('0xc'),'fields':[_0x98c2('0xd'),_0x98c2('0xe')]},{'unique':!![],'name':_0x98c2('0xf'),'fields':['name','MailAccountId']},{'unique':!![],'name':_0x98c2('0x10'),'fields':[_0x98c2('0xd'),_0x98c2('0x11')]},{'unique':!![],'name':_0x98c2('0x12'),'fields':[_0x98c2('0xd'),_0x98c2('0x13')]},{'unique':!![],'name':_0x98c2('0x14'),'fields':[_0x98c2('0xd'),_0x98c2('0x15')]},{'unique':!![],'name':_0x98c2('0x16'),'fields':['name',_0x98c2('0x17')]}],'timestamps':!![]});};
\ No newline at end of file
index 7287058..41d0ded 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(_0x73f9be,_0x574df9){var _0x2dfa2a=function(_0x7eaef){while(--_0x7eaef){_0x73f9be['push'](_0x73f9be['shift']());}};_0x2dfa2a(++_0x574df9);}(_0xa9e0,0x123));var _0x0a9e=function(_0x8de54f,_0x271987){_0x8de54f=_0x8de54f-0x0;var _0x14cba4=_0xa9e0[_0x8de54f];return _0x14cba4;};'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(_0x1a7b42,_0x2c373a){var _0x215485=function(_0x5c091d){while(--_0x5c091d){_0x1a7b42['push'](_0x1a7b42['shift']());}};_0x215485(++_0x2c373a);}(_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 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 f6e45c5..c8b7a99 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1ee4=['update','delete','exports','multer','util','path','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./disposition.controller','get','isAuthenticated','index','show','post','create','put','/:id'];(function(_0x46cf00,_0x457a43){var _0x3974dc=function(_0x4b5d0a){while(--_0x4b5d0a){_0x46cf00['push'](_0x46cf00['shift']());}};_0x3974dc(++_0x457a43);}(_0x1ee4,0x16c));var _0x41ee=function(_0x46970f,_0x192f59){_0x46970f=_0x46970f-0x0;var _0x1ae344=_0x1ee4[_0x46970f];return _0x1ae344;};'use strict';var multer=require(_0x41ee('0x0'));var util=require(_0x41ee('0x1'));var path=require(_0x41ee('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0x41ee('0x3'));var auth=require(_0x41ee('0x4'));var interaction=require(_0x41ee('0x5'));var config=require(_0x41ee('0x6'));var controller=require(_0x41ee('0x7'));router[_0x41ee('0x8')]('/',auth[_0x41ee('0x9')](),controller[_0x41ee('0xa')]);router[_0x41ee('0x8')]('/:id',auth[_0x41ee('0x9')](),controller[_0x41ee('0xb')]);router[_0x41ee('0xc')]('/',auth[_0x41ee('0x9')](),controller[_0x41ee('0xd')]);router[_0x41ee('0xe')](_0x41ee('0xf'),auth[_0x41ee('0x9')](),controller[_0x41ee('0x10')]);router[_0x41ee('0x11')](_0x41ee('0xf'),auth['isAuthenticated'](),controller['destroy']);module[_0x41ee('0x12')]=router;
\ No newline at end of file
+var _0x35f6=['index','/:id','isAuthenticated','show','post','create','put','delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./disposition.controller','get'];(function(_0x22628c,_0x3b19b7){var _0x144398=function(_0x581539){while(--_0x581539){_0x22628c['push'](_0x22628c['shift']());}};_0x144398(++_0x3b19b7);}(_0x35f6,0x1ea));var _0x635f=function(_0x47d5b9,_0x17cb94){_0x47d5b9=_0x47d5b9-0x0;var _0x1bfa17=_0x35f6[_0x47d5b9];return _0x1bfa17;};'use strict';var multer=require('multer');var util=require(_0x635f('0x0'));var path=require(_0x635f('0x1'));var timeout=require(_0x635f('0x2'));var express=require(_0x635f('0x3'));var router=express[_0x635f('0x4')]();var fs_extra=require(_0x635f('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x635f('0x6'));var config=require(_0x635f('0x7'));var controller=require(_0x635f('0x8'));router[_0x635f('0x9')]('/',auth['isAuthenticated'](),controller[_0x635f('0xa')]);router[_0x635f('0x9')](_0x635f('0xb'),auth[_0x635f('0xc')](),controller[_0x635f('0xd')]);router[_0x635f('0xe')]('/',auth[_0x635f('0xc')](),controller[_0x635f('0xf')]);router[_0x635f('0x10')](_0x635f('0xb'),auth['isAuthenticated'](),controller['update']);router[_0x635f('0x11')](_0x635f('0xb'),auth[_0x635f('0xc')](),controller[_0x635f('0x12')]);module[_0x635f('0x13')]=router;
\ No newline at end of file
index a1d0b50..99d2085 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3914=['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','sequelize','exports','STRING','ENUM','yes','xCALLY\x20Motion\x20Fax','localstationid','4800','9600','14400','7200','v17,v27,v29','INTEGER','SIP','IAX','DADHI','KHOMP','TEXT'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x3914,0xeb));var _0x4391=function(_0x4629ee,_0x5802d8){_0x4629ee=_0x4629ee-0x0;var _0x47fb5b=_0x3914[_0x4629ee];return _0x47fb5b;};'use strict';var Sequelize=require(_0x4391('0x0'));module[_0x4391('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x4391('0x2')]},'ecm':{'type':Sequelize[_0x4391('0x3')]('yes','no'),'defaultValue':_0x4391('0x4')},'headerinfo':{'type':Sequelize[_0x4391('0x2')],'defaultValue':_0x4391('0x5')},'localstationid':{'type':Sequelize['STRING'],'unique':_0x4391('0x6')},'minrate':{'type':Sequelize[_0x4391('0x3')]('2400',_0x4391('0x7'),'7200',_0x4391('0x8'),'12000',_0x4391('0x9')),'defaultValue':_0x4391('0x7')},'maxrate':{'type':Sequelize['ENUM']('2400',_0x4391('0x7'),_0x4391('0xa'),_0x4391('0x8'),'12000',_0x4391('0x9')),'defaultValue':_0x4391('0x9')},'modem':{'type':Sequelize[_0x4391('0x2')],'defaultValue':_0x4391('0xb')},'gateway':{'type':Sequelize['STRING'],'defaultValue':'no','validate':{'is':/^(?:yes|no|[0-9]+)$/}},'faxdetect':{'type':Sequelize[_0x4391('0x2')],'defaultValue':'no','validate':{'is':/^(?:yes|no|t38|cng|[0-9]+)$/}},'t38timeout':{'type':Sequelize[_0x4391('0xc')],'defaultValue':0x1388,'validate':{'min':0x3e8}},'tech':{'type':Sequelize[_0x4391('0x3')](_0x4391('0xd'),_0x4391('0xe'),_0x4391('0xf'),_0x4391('0x10')),'defaultValue':_0x4391('0xd')},'key':{'type':Sequelize['STRING'],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0x4391('0x11')],'defaultValue':function(){return _0x4391('0x12');}},'notificationSound':{'type':Sequelize[_0x4391('0x13')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x4391('0x13')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0x4391('0xc')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x4391('0xc')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x4391('0x13')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x4391('0xc')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x4391('0xc')],'allowNull':!![],'defaultValue':null,'comment':_0x4391('0x14')},'mandatoryDisposition':{'type':Sequelize[_0x4391('0x13')],'defaultValue':![],'comment':_0x4391('0x15'),'set':function(_0x19924d){if(!_0x19924d)this['setDataValue']('mandatoryDispositionPauseId',null);this[_0x4391('0x16')]('mandatoryDisposition',_0x19924d);}}};
\ No newline at end of file
+var _0xb4c7=['12000','14400','9600','v17,v27,v29','INTEGER','SIP','IAX','DADHI','KHOMP','TEXT','Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}','BOOLEAN','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDisposition','sequelize','exports','STRING','ENUM','yes','xCALLY\x20Motion\x20Fax','localstationid','2400','4800','7200'];(function(_0x2b1a2b,_0x563b2f){var _0x47b842=function(_0x53b0f7){while(--_0x53b0f7){_0x2b1a2b['push'](_0x2b1a2b['shift']());}};_0x47b842(++_0x563b2f);}(_0xb4c7,0x1ea));var _0x7b4c=function(_0x51a139,_0xadd051){_0x51a139=_0x51a139-0x0;var _0x4ef9b1=_0xb4c7[_0x51a139];return _0x4ef9b1;};'use strict';var Sequelize=require(_0x7b4c('0x0'));module[_0x7b4c('0x1')]={'name':{'type':Sequelize[_0x7b4c('0x2')],'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x7b4c('0x2')]},'ecm':{'type':Sequelize[_0x7b4c('0x3')]('yes','no'),'defaultValue':_0x7b4c('0x4')},'headerinfo':{'type':Sequelize[_0x7b4c('0x2')],'defaultValue':_0x7b4c('0x5')},'localstationid':{'type':Sequelize[_0x7b4c('0x2')],'unique':_0x7b4c('0x6')},'minrate':{'type':Sequelize['ENUM'](_0x7b4c('0x7'),_0x7b4c('0x8'),_0x7b4c('0x9'),'9600',_0x7b4c('0xa'),_0x7b4c('0xb')),'defaultValue':'4800'},'maxrate':{'type':Sequelize[_0x7b4c('0x3')](_0x7b4c('0x7'),_0x7b4c('0x8'),_0x7b4c('0x9'),_0x7b4c('0xc'),_0x7b4c('0xa'),_0x7b4c('0xb')),'defaultValue':_0x7b4c('0xb')},'modem':{'type':Sequelize[_0x7b4c('0x2')],'defaultValue':_0x7b4c('0xd')},'gateway':{'type':Sequelize['STRING'],'defaultValue':'no','validate':{'is':/^(?:yes|no|[0-9]+)$/}},'faxdetect':{'type':Sequelize['STRING'],'defaultValue':'no','validate':{'is':/^(?:yes|no|t38|cng|[0-9]+)$/}},'t38timeout':{'type':Sequelize[_0x7b4c('0xe')],'defaultValue':0x1388,'validate':{'min':0x3e8}},'tech':{'type':Sequelize[_0x7b4c('0x3')](_0x7b4c('0xf'),_0x7b4c('0x10'),_0x7b4c('0x11'),_0x7b4c('0x12')),'defaultValue':_0x7b4c('0xf')},'key':{'type':Sequelize[_0x7b4c('0x2')],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0x7b4c('0x13')],'defaultValue':function(){return _0x7b4c('0x14');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x7b4c('0x15')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x7b4c('0xe')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0x7b4c('0xe')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x7b4c('0x15')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x7b4c('0xe')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x7b4c('0x15')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x7b4c('0xe')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x7b4c('0xe')],'allowNull':!![],'defaultValue':null,'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0x7b4c('0x15')],'defaultValue':![],'comment':_0x7b4c('0x16'),'set':function(_0x15a5a9){if(!_0x15a5a9)this[_0x7b4c('0x17')]('mandatoryDispositionPauseId',null);this[_0x7b4c('0x17')](_0x7b4c('0x18'),_0x15a5a9);}}};
\ No newline at end of file
index a0af501..21d5ae6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1f37=['headerinfo','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','addAccountApplications','sequelize','bulkCreate','VoiceExtension','tech','createdAt','updatedAt','TrunkId','findById','getMessages','FaxMessage','$gte','split','YYYY-MM-DD\x20HH:mm:ss','CmList','DESC','attachments','root','server/files/attachments','basename','CheckAfterSend','isNil','from','format','\x22%s\x22\x20<%s>','fax','List','Contacts','ListId','List\x20not\x20found','out','filename','Messages','spread','ContactId','dataValues','SendFax','SendFaxRpc,\x20%s','addAgents','emit','removeAgents','isArray','userFaxAccount:remove','getAgents','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','jsforce','querystring','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','redis','socket.io-emitter','./faxAccount.socket','register','jayson/promise','http','request','info','FaxAccount,\x20%s,\x20%s','request\x20sent','debug','FaxAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','status','undefined','limit','offset','Content-Range','json','apply','reject','save','update','then','get','FaxAccounts','UserProfileResource','destroy','end','stack','name','send','index','Pause','map','FaxAccount','rawAttributes','type','key','model','query','filters','intersection','fields','attributes','nolimit','order','where','pick','filter','merge','VIRTUAL','options','count','includeAll','include','rows','params','length','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','describe','addDisposition','FaxAccountId','Disposition','getDispositions','keys','sort','findAll','removeDispositions','ids','CannedAnswer','hasOwnProperty','addInteraction','omit','findOne','FaxInteraction','CmContact','Contact','User','Owner','fullname','internal','Tag','Tags','color','tag','addApplications','transaction','READ_COMMITTED','FaxApplication','finally','getApplications','context','from-voip-provider','exten','localstationid','app','system','description','Fax\x20Extension','priority','appdata','push','Answer','CDR(type)=inbound-fax','Set','ecm','gateway','faxdetect'];(function(_0x488072,_0x151405){var _0x4b62c7=function(_0x3eca29){while(--_0x3eca29){_0x488072['push'](_0x488072['shift']());}};_0x4b62c7(++_0x151405);}(_0x1f37,0x1b7));var _0x71f3=function(_0x311c35,_0x534915){_0x311c35=_0x311c35-0x0;var _0x5cc50c=_0x1f37[_0x311c35];return _0x5cc50c;};'use strict';var emlformat=require(_0x71f3('0x0'));var rimraf=require(_0x71f3('0x1'));var zipdir=require(_0x71f3('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x71f3('0x3'));var moment=require(_0x71f3('0x4'));var BPromise=require(_0x71f3('0x5'));var Mustache=require(_0x71f3('0x6'));var util=require(_0x71f3('0x7'));var path=require(_0x71f3('0x8'));var sox=require(_0x71f3('0x9'));var csv=require(_0x71f3('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x71f3('0xb'));var _=require('lodash');var squel=require(_0x71f3('0xc'));var crypto=require(_0x71f3('0xd'));var jsforce=require(_0x71f3('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x71f3('0xa'));var querystring=require(_0x71f3('0xf'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x71f3('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x71f3('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x71f3('0x12'))(_0x71f3('0x13'));var utils=require('../../config/utils');var config=require(_0x71f3('0x14'));var licenseUtil=require(_0x71f3('0x15'));var db=require('../../mysqldb')['db'];config[_0x71f3('0x16')]=_['defaults'](config[_0x71f3('0x16')],{'host':'localhost','port':0x18eb});var socket=require(_0x71f3('0x17'))(new Redis(config[_0x71f3('0x16')]));require(_0x71f3('0x18'))[_0x71f3('0x19')](socket);var jayson=require(_0x71f3('0x1a'));var client=jayson['client'][_0x71f3('0x1b')]({'port':0x232c});var client9002=jayson['client'][_0x71f3('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0x3a470c,_0x5f510a,_0x21e9ad,_0x4bdc7c){return new BPromise(function(_0x4405f6,_0x8dcdde){var _0xfe4a60=_0x4bdc7c||client;return _0xfe4a60[_0x71f3('0x1c')](_0x3a470c,_0x21e9ad)['then'](function(_0x18dcf4){logger[_0x71f3('0x1d')](_0x71f3('0x1e'),_0x5f510a,_0x71f3('0x1f'));logger[_0x71f3('0x20')](_0x71f3('0x21'),_0x5f510a,_0x71f3('0x1f'),JSON[_0x71f3('0x22')](_0x18dcf4));if(_0x18dcf4[_0x71f3('0x23')]){if(_0x18dcf4[_0x71f3('0x23')][_0x71f3('0x24')]===0x1f4){logger[_0x71f3('0x23')](_0x71f3('0x1e'),_0x5f510a,_0x18dcf4['error'][_0x71f3('0x25')]);return _0x8dcdde(_0x18dcf4[_0x71f3('0x23')]['message']);}logger[_0x71f3('0x23')](_0x71f3('0x1e'),_0x5f510a,_0x18dcf4[_0x71f3('0x23')]['message']);return _0x4405f6(_0x18dcf4[_0x71f3('0x23')][_0x71f3('0x25')]);}else{logger[_0x71f3('0x1d')]('FaxAccount,\x20%s,\x20%s',_0x5f510a,_0x71f3('0x1f'));_0x4405f6(_0x18dcf4[_0x71f3('0x26')][_0x71f3('0x25')]);}})[_0x71f3('0x27')](function(_0x5b76c4){logger['error'](_0x71f3('0x1e'),_0x5f510a,_0x5b76c4);_0x8dcdde(_0x5b76c4);});});}function respondWithStatusCode(_0x540154,_0x4838b3){_0x4838b3=_0x4838b3||0xcc;return function(_0x372633){if(_0x372633){return _0x540154[_0x71f3('0x28')](_0x4838b3);}return _0x540154[_0x71f3('0x29')](_0x4838b3)['end']();};}function respondWithResult(_0x473a1b,_0x14fae3){_0x14fae3=_0x14fae3||0xc8;return function(_0x11b308){if(_0x11b308){return _0x473a1b[_0x71f3('0x29')](_0x14fae3)['json'](_0x11b308);}};}function respondWithFilteredResult(_0x23f8a8,_0x2dde01){return function(_0x4670b7){if(_0x4670b7){var _0x203d33=typeof _0x2dde01['offset']===_0x71f3('0x2a')&&typeof _0x2dde01[_0x71f3('0x2b')]==='undefined';var _0x54400c=_0x4670b7['count'];var _0x521def=_0x203d33?0x0:_0x2dde01[_0x71f3('0x2c')];var _0x30b236=_0x203d33?_0x4670b7['count']:_0x2dde01['offset']+_0x2dde01[_0x71f3('0x2b')];var _0x2ec5bf;if(_0x30b236>=_0x54400c){_0x30b236=_0x54400c;_0x2ec5bf=0xc8;}else{_0x2ec5bf=0xce;}_0x23f8a8[_0x71f3('0x29')](_0x2ec5bf);return _0x23f8a8['set'](_0x71f3('0x2d'),_0x521def+'-'+_0x30b236+'/'+_0x54400c)[_0x71f3('0x2e')](_0x4670b7);}return null;};}function patchUpdates(_0x15b049){return function(_0x371d73){try{jsonpatch[_0x71f3('0x2f')](_0x371d73,_0x15b049,!![]);}catch(_0x4f5057){return BPromise[_0x71f3('0x30')](_0x4f5057);}return _0x371d73[_0x71f3('0x31')]();};}function saveUpdates(_0x333408,_0x5697ca){return function(_0x2e81fd){if(_0x2e81fd){return _0x2e81fd[_0x71f3('0x32')](_0x333408)['then'](function(_0x2d51d7){return _0x2d51d7;});}return null;};}function removeEntity(_0x495586,_0x444ed5){return function(_0x115a2d){if(_0x115a2d){return _0x115a2d['destroy']()[_0x71f3('0x33')](function(){var _0x19e95f=_0x115a2d[_0x71f3('0x34')]({'plain':!![]});var _0x55e277=_0x71f3('0x35');return db[_0x71f3('0x36')][_0x71f3('0x37')]({'where':{'type':_0x55e277,'resourceId':_0x19e95f['id']}})[_0x71f3('0x33')](function(){return _0x115a2d;});})[_0x71f3('0x33')](function(){_0x495586['status'](0xcc)[_0x71f3('0x38')]();});}};}function handleEntityNotFound(_0x21b987,_0x3083df){return function(_0x61375e){if(!_0x61375e){_0x21b987[_0x71f3('0x28')](0x194);}return _0x61375e;};}function handleError(_0x4a1d4b,_0x14c5f1){_0x14c5f1=_0x14c5f1||0x1f4;return function(_0x21c3fc){logger[_0x71f3('0x23')](_0x21c3fc[_0x71f3('0x39')]);if(_0x21c3fc[_0x71f3('0x3a')]){delete _0x21c3fc['name'];}_0x4a1d4b['status'](_0x14c5f1)[_0x71f3('0x3b')](_0x21c3fc);};}exports[_0x71f3('0x3c')]=function(_0x329713,_0x5c13fb){var _0x249897={'include':[{'model':db[_0x71f3('0x3d')],'as':'mandatoryDispositionPause'}]},_0x5a4477={},_0x40db03={'count':0x0,'rows':[]};var _0x4f6b7b=_[_0x71f3('0x3e')](db[_0x71f3('0x3f')][_0x71f3('0x40')],function(_0x3fa633){return{'name':_0x3fa633['fieldName'],'type':_0x3fa633[_0x71f3('0x41')][_0x71f3('0x42')]};});_0x5a4477[_0x71f3('0x43')]=_[_0x71f3('0x3e')](_0x4f6b7b,_0x71f3('0x3a'));_0x5a4477['query']=_['keys'](_0x329713[_0x71f3('0x44')]);_0x5a4477[_0x71f3('0x45')]=_[_0x71f3('0x46')](_0x5a4477[_0x71f3('0x43')],_0x5a4477[_0x71f3('0x44')]);_0x249897['attributes']=_[_0x71f3('0x46')](_0x5a4477[_0x71f3('0x43')],qs[_0x71f3('0x47')](_0x329713[_0x71f3('0x44')][_0x71f3('0x47')]));_0x249897['attributes']=_0x249897[_0x71f3('0x48')]['length']?_0x249897['attributes']:_0x5a4477['model'];if(!_0x329713['query']['hasOwnProperty'](_0x71f3('0x49'))){_0x249897[_0x71f3('0x2b')]=qs[_0x71f3('0x2b')](_0x329713[_0x71f3('0x44')][_0x71f3('0x2b')]);_0x249897[_0x71f3('0x2c')]=qs['offset'](_0x329713[_0x71f3('0x44')][_0x71f3('0x2c')]);}_0x249897[_0x71f3('0x4a')]=qs['sort'](_0x329713[_0x71f3('0x44')]['sort']);_0x249897[_0x71f3('0x4b')]=qs[_0x71f3('0x45')](_[_0x71f3('0x4c')](_0x329713['query'],_0x5a4477[_0x71f3('0x45')]),_0x4f6b7b);if(_0x329713[_0x71f3('0x44')][_0x71f3('0x4d')]){_0x249897[_0x71f3('0x4b')]=_[_0x71f3('0x4e')](_0x249897[_0x71f3('0x4b')],{'$or':_['map'](_0x4f6b7b,function(_0x1d769a){if(_0x1d769a[_0x71f3('0x41')]!==_0x71f3('0x4f')){var _0x14992e={};_0x14992e[_0x1d769a['name']]={'$like':'%'+_0x329713['query'][_0x71f3('0x4d')]+'%'};return _0x14992e;}})});}_0x249897=_['merge']({},_0x249897,_0x329713[_0x71f3('0x50')]);var _0x2e38cf={'where':_0x249897['where']};return db[_0x71f3('0x3f')][_0x71f3('0x51')](_0x2e38cf)['then'](function(_0x105cc4){_0x40db03['count']=_0x105cc4;if(_0x329713[_0x71f3('0x44')][_0x71f3('0x52')]){_0x249897[_0x71f3('0x53')]=[{'all':!![]}];}return db[_0x71f3('0x3f')]['findAll'](_0x249897);})[_0x71f3('0x33')](function(_0x3d5f71){_0x40db03[_0x71f3('0x54')]=_0x3d5f71;return _0x40db03;})['then'](respondWithFilteredResult(_0x5c13fb,_0x249897))[_0x71f3('0x27')](handleError(_0x5c13fb,null));};exports['show']=function(_0x152903,_0x34cb81){var _0x2f2680={'raw':![],'where':{'id':_0x152903[_0x71f3('0x55')]['id']},'include':[{'model':db[_0x71f3('0x3d')],'as':'mandatoryDispositionPause'}]},_0x536203={};_0x536203[_0x71f3('0x43')]=_['keys'](db[_0x71f3('0x3f')][_0x71f3('0x40')]);_0x536203[_0x71f3('0x44')]=_['keys'](_0x152903[_0x71f3('0x44')]);_0x536203['filters']=_[_0x71f3('0x46')](_0x536203['model'],_0x536203[_0x71f3('0x44')]);_0x2f2680[_0x71f3('0x48')]=_['intersection'](_0x536203[_0x71f3('0x43')],qs[_0x71f3('0x47')](_0x152903[_0x71f3('0x44')][_0x71f3('0x47')]));_0x2f2680[_0x71f3('0x48')]=_0x2f2680['attributes'][_0x71f3('0x56')]?_0x2f2680[_0x71f3('0x48')]:_0x536203[_0x71f3('0x43')];if(_0x152903[_0x71f3('0x44')]['includeAll']){_0x2f2680['include']=[{'all':!![]}];}_0x2f2680=_[_0x71f3('0x4e')]({},_0x2f2680,_0x152903[_0x71f3('0x50')]);return db[_0x71f3('0x3f')][_0x71f3('0x57')](_0x2f2680)[_0x71f3('0x33')](handleEntityNotFound(_0x34cb81,null))[_0x71f3('0x33')](respondWithResult(_0x34cb81,null))[_0x71f3('0x27')](handleError(_0x34cb81,null));};exports[_0x71f3('0x58')]=function(_0xb81781,_0x1f5583){return db[_0x71f3('0x3f')][_0x71f3('0x58')](_0xb81781[_0x71f3('0x59')],{})[_0x71f3('0x33')](function(_0x3e0741){var _0x319a2b=_0xb81781[_0x71f3('0x5a')][_0x71f3('0x34')]({'plain':!![]});if(!_0x319a2b)throw new Error(_0x71f3('0x5b'));if(_0x319a2b[_0x71f3('0x5c')]===_0x71f3('0x5a')){var _0x5630bd=_0x3e0741['get']({'plain':!![]});var _0x508685=_0x71f3('0x35');return db[_0x71f3('0x5d')][_0x71f3('0x57')]({'where':{'name':_0x508685,'userProfileId':_0x319a2b[_0x71f3('0x5e')]},'raw':!![]})['then'](function(_0x3f9bd9){if(_0x3f9bd9&&_0x3f9bd9[_0x71f3('0x5f')]===0x0){return db[_0x71f3('0x36')][_0x71f3('0x58')]({'name':_0x5630bd[_0x71f3('0x3a')],'resourceId':_0x5630bd['id'],'type':_0x3f9bd9[_0x71f3('0x3a')],'sectionId':_0x3f9bd9['id']},{})[_0x71f3('0x33')](function(){return _0x3e0741;});}else{return _0x3e0741;}})[_0x71f3('0x27')](function(_0x6b6078){logger[_0x71f3('0x23')](_0x71f3('0x60'),_0x6b6078);throw _0x6b6078;});}return _0x3e0741;})[_0x71f3('0x33')](respondWithResult(_0x1f5583,0xc9))['catch'](handleError(_0x1f5583,null));};exports[_0x71f3('0x32')]=function(_0x2c643c,_0x285654){if(_0x2c643c['body']['id']){delete _0x2c643c[_0x71f3('0x59')]['id'];}return db['FaxAccount'][_0x71f3('0x57')]({'where':{'id':_0x2c643c['params']['id']},'include':[{'model':db[_0x71f3('0x3d')],'as':'mandatoryDispositionPause'}]})[_0x71f3('0x33')](handleEntityNotFound(_0x285654,null))[_0x71f3('0x33')](saveUpdates(_0x2c643c[_0x71f3('0x59')],null))[_0x71f3('0x33')](respondWithResult(_0x285654,null))[_0x71f3('0x27')](handleError(_0x285654,null));};exports[_0x71f3('0x37')]=function(_0x13bfe1,_0x169748){return db[_0x71f3('0x3f')]['find']({'where':{'id':_0x13bfe1[_0x71f3('0x55')]['id']}})[_0x71f3('0x33')](handleEntityNotFound(_0x169748,null))['then'](removeEntity(_0x169748,null))['catch'](handleError(_0x169748,null));};exports[_0x71f3('0x61')]=function(_0x1e88c5,_0x460d4d){return db[_0x71f3('0x3f')][_0x71f3('0x61')]()['then'](respondWithResult(_0x460d4d,null))[_0x71f3('0x27')](handleError(_0x460d4d,null));};exports[_0x71f3('0x62')]=function(_0x2a781a,_0x3b6920,_0xbdf0fc){if(_0x2a781a[_0x71f3('0x59')]['id']){delete _0x2a781a[_0x71f3('0x59')]['id'];}return db['FaxAccount'][_0x71f3('0x57')]({'where':{'id':_0x2a781a[_0x71f3('0x55')]['id']}})[_0x71f3('0x33')](handleEntityNotFound(_0x3b6920,null))[_0x71f3('0x33')](function(_0xc94da3){if(_0xc94da3){_0x2a781a[_0x71f3('0x59')][_0x71f3('0x63')]=_0xc94da3['id'];return db[_0x71f3('0x64')][_0x71f3('0x58')](_0x2a781a[_0x71f3('0x59')]);}})[_0x71f3('0x33')](respondWithResult(_0x3b6920,null))[_0x71f3('0x27')](handleError(_0x3b6920,null));};exports[_0x71f3('0x65')]=function(_0x11fa4e,_0x5b0a87,_0x5a0414){var _0xbff14e={'raw':![],'where':{}};var _0x2bb0bb={};var _0x47d78e={'count':0x0,'rows':[]};return db['FaxAccount']['findOne']({'where':{'id':_0x11fa4e[_0x71f3('0x55')]['id']}})[_0x71f3('0x33')](handleEntityNotFound(_0x5b0a87,null))[_0x71f3('0x33')](function(_0x56b5e0){if(_0x56b5e0){_0x2bb0bb[_0x71f3('0x43')]=_[_0x71f3('0x66')](db['Disposition'][_0x71f3('0x40')]);_0x2bb0bb[_0x71f3('0x44')]=_['keys'](_0x11fa4e[_0x71f3('0x44')]);_0x2bb0bb[_0x71f3('0x45')]=_[_0x71f3('0x46')](_0x2bb0bb['model'],_0x2bb0bb['query']);_0xbff14e[_0x71f3('0x48')]=_[_0x71f3('0x46')](_0x2bb0bb['model'],qs[_0x71f3('0x47')](_0x11fa4e['query']['fields']));_0xbff14e[_0x71f3('0x48')]=_0xbff14e[_0x71f3('0x48')][_0x71f3('0x56')]?_0xbff14e[_0x71f3('0x48')]:_0x2bb0bb[_0x71f3('0x43')];if(!_0x11fa4e['query']['hasOwnProperty'](_0x71f3('0x49'))){_0xbff14e[_0x71f3('0x2b')]=qs[_0x71f3('0x2b')](_0x11fa4e[_0x71f3('0x44')][_0x71f3('0x2b')]);_0xbff14e[_0x71f3('0x2c')]=qs[_0x71f3('0x2c')](_0x11fa4e[_0x71f3('0x44')][_0x71f3('0x2c')]);}_0xbff14e[_0x71f3('0x4a')]=qs[_0x71f3('0x67')](_0x11fa4e[_0x71f3('0x44')][_0x71f3('0x67')]);_0xbff14e[_0x71f3('0x4b')]=qs['filters'](_['pick'](_0x11fa4e[_0x71f3('0x44')],_0x2bb0bb['filters']));_0xbff14e[_0x71f3('0x4b')][_0x71f3('0x63')]=_0x56b5e0['id'];if(_0x11fa4e[_0x71f3('0x44')][_0x71f3('0x4d')]){_0xbff14e[_0x71f3('0x4b')]=_[_0x71f3('0x4e')](_0xbff14e[_0x71f3('0x4b')],{'$or':_[_0x71f3('0x3e')](_0xbff14e[_0x71f3('0x48')],function(_0x5c40e4){var _0x28b16b={};_0x28b16b[_0x5c40e4]={'$like':'%'+_0x11fa4e['query'][_0x71f3('0x4d')]+'%'};return _0x28b16b;})});}_0xbff14e=_[_0x71f3('0x4e')]({},_0xbff14e,_0x11fa4e['options']);return db[_0x71f3('0x64')][_0x71f3('0x51')]({'where':_0xbff14e['where']})['then'](function(_0xf0bc7a){_0x47d78e[_0x71f3('0x51')]=_0xf0bc7a;if(_0x11fa4e[_0x71f3('0x44')][_0x71f3('0x52')]){_0xbff14e['include']=[{'all':!![]}];}return db['Disposition'][_0x71f3('0x68')](_0xbff14e);})['then'](function(_0x409bf8){_0x47d78e[_0x71f3('0x54')]=_0x409bf8;return _0x47d78e;});}})[_0x71f3('0x33')](respondWithFilteredResult(_0x5b0a87,_0xbff14e))[_0x71f3('0x27')](handleError(_0x5b0a87,null));};exports['removeDispositions']=function(_0x4bb108,_0x1d1983,_0x49c118){return db[_0x71f3('0x3f')][_0x71f3('0x57')]({'where':{'id':_0x4bb108[_0x71f3('0x55')]['id']}})['then'](handleEntityNotFound(_0x1d1983,null))[_0x71f3('0x33')](function(_0x2bee76){if(_0x2bee76){return _0x2bee76[_0x71f3('0x69')](_0x4bb108[_0x71f3('0x44')][_0x71f3('0x6a')]);}})['then'](respondWithStatusCode(_0x1d1983,null))[_0x71f3('0x27')](handleError(_0x1d1983,null));};exports['addAnswer']=function(_0x84dfea,_0x41cd95,_0x2e3266){if(_0x84dfea[_0x71f3('0x59')]['id']){delete _0x84dfea[_0x71f3('0x59')]['id'];}return db[_0x71f3('0x3f')][_0x71f3('0x57')]({'where':{'id':_0x84dfea['params']['id']}})[_0x71f3('0x33')](handleEntityNotFound(_0x41cd95,null))[_0x71f3('0x33')](function(_0x5f2c5e){if(_0x5f2c5e){_0x84dfea['body'][_0x71f3('0x63')]=_0x5f2c5e['id'];return db[_0x71f3('0x6b')][_0x71f3('0x58')](_0x84dfea[_0x71f3('0x59')]);}})[_0x71f3('0x33')](respondWithResult(_0x41cd95,null))[_0x71f3('0x27')](handleError(_0x41cd95,null));};exports['getAnswers']=function(_0x3b3d43,_0x345ee6,_0x4484f3){var _0x26d096={'raw':![],'where':{}};var _0xc9d204={};var _0x3206ce={'count':0x0,'rows':[]};return db[_0x71f3('0x3f')]['findOne']({'where':{'id':_0x3b3d43[_0x71f3('0x55')]['id']}})[_0x71f3('0x33')](handleEntityNotFound(_0x345ee6,null))[_0x71f3('0x33')](function(_0x5c335d){if(_0x5c335d){_0xc9d204['model']=_[_0x71f3('0x66')](db['CannedAnswer'][_0x71f3('0x40')]);_0xc9d204[_0x71f3('0x44')]=_['keys'](_0x3b3d43[_0x71f3('0x44')]);_0xc9d204[_0x71f3('0x45')]=_[_0x71f3('0x46')](_0xc9d204[_0x71f3('0x43')],_0xc9d204['query']);_0x26d096[_0x71f3('0x48')]=_['intersection'](_0xc9d204['model'],qs[_0x71f3('0x47')](_0x3b3d43[_0x71f3('0x44')][_0x71f3('0x47')]));_0x26d096[_0x71f3('0x48')]=_0x26d096[_0x71f3('0x48')][_0x71f3('0x56')]?_0x26d096[_0x71f3('0x48')]:_0xc9d204[_0x71f3('0x43')];if(!_0x3b3d43[_0x71f3('0x44')][_0x71f3('0x6c')](_0x71f3('0x49'))){_0x26d096[_0x71f3('0x2b')]=qs[_0x71f3('0x2b')](_0x3b3d43[_0x71f3('0x44')][_0x71f3('0x2b')]);_0x26d096[_0x71f3('0x2c')]=qs[_0x71f3('0x2c')](_0x3b3d43[_0x71f3('0x44')][_0x71f3('0x2c')]);}_0x26d096[_0x71f3('0x4a')]=qs[_0x71f3('0x67')](_0x3b3d43['query']['sort']);_0x26d096[_0x71f3('0x4b')]=qs[_0x71f3('0x45')](_[_0x71f3('0x4c')](_0x3b3d43[_0x71f3('0x44')],_0xc9d204[_0x71f3('0x45')]));_0x26d096[_0x71f3('0x4b')]['FaxAccountId']=_0x5c335d['id'];if(_0x3b3d43[_0x71f3('0x44')][_0x71f3('0x4d')]){_0x26d096[_0x71f3('0x4b')]=_[_0x71f3('0x4e')](_0x26d096[_0x71f3('0x4b')],{'$or':_[_0x71f3('0x3e')](_0x26d096[_0x71f3('0x48')],function(_0x2fa396){var _0x446135={};_0x446135[_0x2fa396]={'$like':'%'+_0x3b3d43[_0x71f3('0x44')][_0x71f3('0x4d')]+'%'};return _0x446135;})});}_0x26d096=_['merge']({},_0x26d096,_0x3b3d43['options']);return db['CannedAnswer']['count']({'where':_0x26d096[_0x71f3('0x4b')]})[_0x71f3('0x33')](function(_0x37c286){_0x3206ce['count']=_0x37c286;if(_0x3b3d43[_0x71f3('0x44')]['includeAll']){_0x26d096['include']=[{'all':!![]}];}return db[_0x71f3('0x6b')][_0x71f3('0x68')](_0x26d096);})[_0x71f3('0x33')](function(_0x51ef3c){_0x3206ce[_0x71f3('0x54')]=_0x51ef3c;return _0x3206ce;});}})['then'](respondWithFilteredResult(_0x345ee6,_0x26d096))['catch'](handleError(_0x345ee6,null));};exports['removeAnswers']=function(_0xf6a2af,_0x5a35e1,_0x400877){return db[_0x71f3('0x3f')]['find']({'where':{'id':_0xf6a2af[_0x71f3('0x55')]['id']}})[_0x71f3('0x33')](handleEntityNotFound(_0x5a35e1,null))['then'](function(_0x50b277){if(_0x50b277){return _0x50b277['removeAnswers'](_0xf6a2af[_0x71f3('0x44')][_0x71f3('0x6a')]);}})[_0x71f3('0x33')](respondWithStatusCode(_0x5a35e1,null))[_0x71f3('0x27')](handleError(_0x5a35e1,null));};exports[_0x71f3('0x6d')]=function(_0xac526e,_0x2cd59a,_0x3b8f02){return db['FaxInteraction']['find']({'where':{'id':_0xac526e[_0x71f3('0x55')]['id']}})[_0x71f3('0x33')](handleEntityNotFound(_0x2cd59a,null))[_0x71f3('0x33')](function(_0xb0e990){if(_0xb0e990){return _0xb0e990[_0x71f3('0x6d')](_0xac526e[_0x71f3('0x59')][_0x71f3('0x6a')],_[_0x71f3('0x6e')](_0xac526e[_0x71f3('0x59')],[_0x71f3('0x6a'),'id'])||{});}})[_0x71f3('0x33')](respondWithResult(_0x2cd59a,null))[_0x71f3('0x27')](handleError(_0x2cd59a,null));};exports['getInteractions']=function(_0xf2c7ba,_0x59a83c,_0x548d94){var _0x222fed={'raw':![],'where':{}};var _0x34c367={};var _0x2de1e8={'count':0x0,'rows':[]};return db[_0x71f3('0x3f')][_0x71f3('0x6f')]({'where':{'id':_0xf2c7ba['params']['id']}})[_0x71f3('0x33')](handleEntityNotFound(_0x59a83c,null))[_0x71f3('0x33')](function(_0x4d2684){if(_0x4d2684){_0x34c367[_0x71f3('0x43')]=_[_0x71f3('0x66')](db[_0x71f3('0x70')][_0x71f3('0x40')]);_0x34c367['query']=_['keys'](_0xf2c7ba[_0x71f3('0x44')]);_0x34c367[_0x71f3('0x45')]=_['intersection'](_0x34c367['model'],_0x34c367[_0x71f3('0x44')]);_0x222fed[_0x71f3('0x48')]=_[_0x71f3('0x46')](_0x34c367[_0x71f3('0x43')],qs[_0x71f3('0x47')](_0xf2c7ba[_0x71f3('0x44')][_0x71f3('0x47')]));_0x222fed[_0x71f3('0x48')]=_0x222fed[_0x71f3('0x48')][_0x71f3('0x56')]?_0x222fed[_0x71f3('0x48')]:_0x34c367[_0x71f3('0x43')];if(!_0xf2c7ba['query'][_0x71f3('0x6c')]('nolimit')){_0x222fed[_0x71f3('0x2b')]=qs[_0x71f3('0x2b')](_0xf2c7ba[_0x71f3('0x44')][_0x71f3('0x2b')]);_0x222fed[_0x71f3('0x2c')]=qs['offset'](_0xf2c7ba[_0x71f3('0x44')][_0x71f3('0x2c')]);}_0x222fed[_0x71f3('0x4a')]=qs[_0x71f3('0x67')](_0xf2c7ba[_0x71f3('0x44')][_0x71f3('0x67')]);_0x222fed[_0x71f3('0x4b')]=qs[_0x71f3('0x45')](_[_0x71f3('0x4c')](_0xf2c7ba['query'],_0x34c367[_0x71f3('0x45')]));_0x222fed[_0x71f3('0x4b')][_0x71f3('0x63')]=_0x4d2684['id'];if(_0xf2c7ba['query'][_0x71f3('0x4d')]){_0x222fed[_0x71f3('0x4b')]=_['merge'](_0x222fed[_0x71f3('0x4b')],{'$or':_['map'](_0x222fed[_0x71f3('0x48')],function(_0x18dee2){var _0x5bce2d={};_0x5bce2d[_0x18dee2]={'$like':'%'+_0xf2c7ba['query'][_0x71f3('0x4d')]+'%'};return _0x5bce2d;})});}_0x222fed=_[_0x71f3('0x4e')]({},_0x222fed,_0xf2c7ba['options']);return db[_0x71f3('0x70')][_0x71f3('0x51')]({'where':_0x222fed[_0x71f3('0x4b')]})['then'](function(_0x127e26){_0x2de1e8[_0x71f3('0x51')]=_0x127e26;if(_0xf2c7ba[_0x71f3('0x44')][_0x71f3('0x52')]){_0x222fed['include']=[{'model':db[_0x71f3('0x71')],'as':_0x71f3('0x72'),'required':![]},{'model':db[_0x71f3('0x73')],'as':_0x71f3('0x74'),'attributes':['name',_0x71f3('0x75'),_0x71f3('0x76')],'required':![]},{'model':db[_0x71f3('0x77')],'as':_0x71f3('0x78'),'attributes':['id','name',_0x71f3('0x79')],'where':_0xf2c7ba[_0x71f3('0x44')]['tag']?{'id':_0xf2c7ba[_0x71f3('0x44')][_0x71f3('0x7a')]}:undefined,'required':_0xf2c7ba['query'][_0x71f3('0x7a')]?!![]:![]}];}return db[_0x71f3('0x70')][_0x71f3('0x68')](_0x222fed);})[_0x71f3('0x33')](function(_0x2d2abb){_0x2de1e8[_0x71f3('0x54')]=_0x2d2abb;return _0x2de1e8;});}})[_0x71f3('0x33')](respondWithFilteredResult(_0x59a83c,_0x222fed))['catch'](handleError(_0x59a83c,null));};exports[_0x71f3('0x7b')]=function(_0x1095f0,_0xbc680f){var _0x212ee9=_0x1095f0[_0x71f3('0x55')]['id'];var _0x539bb3=_0x1095f0['body'];var _0x3b0e3f=0xc8;var _0x2762d0=null;return db['sequelize'][_0x71f3('0x7c')]({'isolationLevel':db['sequelize']['Transaction']['ISOLATION_LEVELS'][_0x71f3('0x7d')]},function(_0x5e7416){return db[_0x71f3('0x3f')][_0x71f3('0x6f')]({'where':{'id':_0x212ee9},'transaction':_0x5e7416})[_0x71f3('0x33')](function(_0x8797af){if(_0x8797af){return db['FaxApplication'][_0x71f3('0x37')]({'where':{'FaxAccountId':_0x212ee9},'transaction':_0x5e7416})[_0x71f3('0x33')](function(){var _0x5449fb=_['map'](_0x539bb3,function(_0x3c5997){_0x3c5997['FaxAccountId']=_0x212ee9;return _0x3c5997;});return db[_0x71f3('0x7e')]['bulkCreate'](_0x5449fb,{'transaction':_0x5e7416});});}else{_0x3b0e3f=0x194;_0x2762d0=[];}});})['then'](function(){if(_0x3b0e3f!==0x194){return db[_0x71f3('0x7e')]['findAndCountAll']({'where':{'FaxAccountId':_0x212ee9},'order':'priority'})['then'](function(_0x4e75ea){_0x2762d0=_0x4e75ea;});}})[_0x71f3('0x27')](function(_0x594eca){_0x3b0e3f=0x1f4;logger[_0x71f3('0x23')](_0x594eca['stack']);if(_0x594eca[_0x71f3('0x3a')]){delete _0x594eca[_0x71f3('0x3a')];}_0x2762d0=_0x594eca;})[_0x71f3('0x7f')](function(){if(_0x2762d0===null){_0xbc680f[_0x71f3('0x28')](_0x3b0e3f);}else{if(_0x3b0e3f===0x1f4){_0xbc680f['status'](_0x3b0e3f)['send'](_0x2762d0);}else{_0xbc680f[_0x71f3('0x29')](_0x3b0e3f)[_0x71f3('0x2e')](_0x2762d0);}}});};exports['getApplications']=function(_0x352fb4,_0xd13c10,_0x42e7a5){var _0x5b0d33={};var _0x3ea707={};var _0x2f5edd;var _0x1e5df7;return db[_0x71f3('0x3f')][_0x71f3('0x6f')]({'where':{'id':_0x352fb4['params']['id']}})[_0x71f3('0x33')](handleEntityNotFound(_0xd13c10,null))[_0x71f3('0x33')](function(_0x263fa2){if(_0x263fa2){_0x2f5edd=_0x263fa2;_0x3ea707[_0x71f3('0x43')]=_[_0x71f3('0x66')](db[_0x71f3('0x7e')][_0x71f3('0x40')]);_0x3ea707[_0x71f3('0x44')]=_[_0x71f3('0x66')](_0x352fb4[_0x71f3('0x44')]);_0x3ea707[_0x71f3('0x45')]=_['intersection'](_0x3ea707[_0x71f3('0x43')],_0x3ea707['query']);_0x5b0d33[_0x71f3('0x48')]=_['intersection'](_0x3ea707[_0x71f3('0x43')],qs['fields'](_0x352fb4[_0x71f3('0x44')][_0x71f3('0x47')]));_0x5b0d33[_0x71f3('0x48')]=_0x5b0d33[_0x71f3('0x48')][_0x71f3('0x56')]?_0x5b0d33['attributes']:_0x3ea707[_0x71f3('0x43')];_0x5b0d33[_0x71f3('0x4a')]=qs[_0x71f3('0x67')](_0x352fb4[_0x71f3('0x44')][_0x71f3('0x67')]);_0x5b0d33[_0x71f3('0x4b')]=qs[_0x71f3('0x45')](_['pick'](_0x352fb4['query'],_0x3ea707[_0x71f3('0x45')]));if(_0x352fb4[_0x71f3('0x44')][_0x71f3('0x4d')]){_0x5b0d33[_0x71f3('0x4b')]=_['merge'](_0x5b0d33[_0x71f3('0x4b')],{'$or':_['map'](_0x5b0d33[_0x71f3('0x48')],function(_0x2f053c){var _0x42901e={};_0x42901e[_0x2f053c]={'$like':'%'+_0x352fb4[_0x71f3('0x44')]['filter']+'%'};return _0x42901e;})});}_0x5b0d33=_[_0x71f3('0x4e')]({},_0x5b0d33,_0x352fb4['options']);return _0x2f5edd['getApplications'](_0x5b0d33);}})['then'](function(_0x8649e3){if(_0x8649e3){_0x1e5df7=_0x8649e3[_0x71f3('0x56')];if(!_0x352fb4[_0x71f3('0x44')][_0x71f3('0x6c')]('nolimit')){_0x5b0d33['limit']=qs[_0x71f3('0x2b')](_0x352fb4['query']['limit']);_0x5b0d33[_0x71f3('0x2c')]=qs[_0x71f3('0x2c')](_0x352fb4['query'][_0x71f3('0x2c')]);}return _0x2f5edd[_0x71f3('0x80')](_0x5b0d33);}})['then'](function(_0x2b2843){if(_0x2b2843){return _0x2b2843?{'count':_0x1e5df7,'rows':_0x2b2843}:null;}})['then'](respondWithResult(_0xd13c10,null))[_0x71f3('0x27')](handleError(_0xd13c10,null));};function Extension(_0x2a1f11,_0x440abe,_0x889e53,_0x25060d){this[_0x71f3('0x81')]=_0x71f3('0x82');this[_0x71f3('0x83')]=_0x2a1f11[_0x71f3('0x84')];this[_0x71f3('0x85')]=_0x25060d;this['type']=_0x71f3('0x86');this[_0x71f3('0x87')]=_0x71f3('0x88');this['FaxAccountId']=_0x2a1f11['id'];this[_0x71f3('0x89')]=_0x440abe;this[_0x71f3('0x8a')]=_0x889e53;}function createExtensionsReciveFax(_0x10526b){var _0x36a0ac=0x1;var _0x117aef=[];_0x117aef[_0x71f3('0x8b')](new Extension(_0x10526b,_0x36a0ac,'',_0x71f3('0x8c')));_0x36a0ac+=0x1;_0x117aef[_0x71f3('0x8b')](new Extension(_0x10526b,_0x36a0ac,_0x71f3('0x8d'),_0x71f3('0x8e')));_0x36a0ac+=0x1;for(var _0x1443b2 in _0x10526b){if(_0x10526b['hasOwnProperty'](_0x1443b2)&&(_0x1443b2===_0x71f3('0x8f')||_0x1443b2===_0x71f3('0x84')||_0x1443b2===_0x71f3('0x90')||_0x1443b2===_0x71f3('0x91')||_0x1443b2===_0x71f3('0x92')||_0x1443b2==='maxrate'||_0x1443b2==='minrate'||_0x1443b2==='modem'||_0x1443b2===_0x71f3('0x93'))){_0x117aef[_0x71f3('0x8b')](new Extension(_0x10526b,_0x36a0ac,_0x71f3('0x94')+_0x1443b2+')='+_0x10526b[_0x1443b2],_0x71f3('0x8e')));_0x36a0ac+=0x1;}}_0x117aef['push'](new Extension(_0x10526b,_0x36a0ac,'6','Wait'));_0x36a0ac+=0x1;_0x117aef[_0x71f3('0x8b')](new Extension(_0x10526b,_0x36a0ac,_0x71f3('0x95'),_0x71f3('0x96')));_0x36a0ac=0x0;return _0x117aef;}exports[_0x71f3('0x97')]=function(_0x421bb5,_0x5c845e,_0x4180ca){var _0x3055bf;return db[_0x71f3('0x98')][_0x71f3('0x7c')](function(_0x51a56c){return db['FaxAccount'][_0x71f3('0x58')](_0x421bb5['body'],{'transaction':_0x51a56c})[_0x71f3('0x33')](function(_0x195e3b){_0x3055bf=_0x195e3b[_0x71f3('0x34')]({'plain':!![]});return db['VoiceExtension'][_0x71f3('0x99')](createExtensionsReciveFax(_0x3055bf),{'transaction':_0x51a56c});});})[_0x71f3('0x33')](function(){return _0x3055bf;})[_0x71f3('0x33')](respondWithResult(_0x5c845e,null))[_0x71f3('0x27')](handleError(_0x5c845e,null));};exports['updateAccountApplications']=function(_0x586133,_0x11fcc7,_0x46ac05){var _0x155cd0;return db[_0x71f3('0x98')]['transaction'](function(_0x268769){return db[_0x71f3('0x3f')]['update'](_0x586133[_0x71f3('0x59')],{'where':{'id':_0x586133[_0x71f3('0x59')]['id']},'transaction':_0x268769})[_0x71f3('0x33')](function(_0x4fe877){return db[_0x71f3('0x9a')]['destroy']({'where':{'FaxAccountId':_0x586133['body']['id']},'transaction':_0x268769})[_0x71f3('0x33')](function(_0x51759d){return db[_0x71f3('0x9a')][_0x71f3('0x99')](createExtensionsReciveFax(_[_0x71f3('0x6e')](_0x586133[_0x71f3('0x59')],[_0x71f3('0x9b'),_0x71f3('0x42'),_0x71f3('0x9c'),_0x71f3('0x9d'),_0x71f3('0x9e'),'ListId'])),{'transaction':_0x268769});});});})[_0x71f3('0x33')](function(){return db[_0x71f3('0x3f')][_0x71f3('0x9f')](_0x586133[_0x71f3('0x59')]['id']);})[_0x71f3('0x33')](respondWithResult(_0x11fcc7,null))[_0x71f3('0x27')](handleError(_0x11fcc7,null));};exports[_0x71f3('0xa0')]=function(_0x36fce0,_0x5dbe77,_0xa07b45){var _0x10abac={'raw':!![],'where':{}};var _0x442479={};var _0x50f810={'count':0x0,'rows':[]};return db['FaxAccount'][_0x71f3('0x6f')]({'where':{'id':_0x36fce0[_0x71f3('0x55')]['id']}})[_0x71f3('0x33')](handleEntityNotFound(_0x5dbe77,null))[_0x71f3('0x33')](function(_0x59ac30){if(_0x59ac30){_0x442479[_0x71f3('0x43')]=_[_0x71f3('0x66')](db[_0x71f3('0xa1')]['rawAttributes']);_0x442479['query']=_['keys'](_0x36fce0[_0x71f3('0x44')]);_0x442479['filters']=_[_0x71f3('0x46')](_0x442479['model'],_0x442479['query']);_0x10abac[_0x71f3('0x48')]=_[_0x71f3('0x46')](_0x442479[_0x71f3('0x43')],qs[_0x71f3('0x47')](_0x36fce0[_0x71f3('0x44')][_0x71f3('0x47')]));_0x10abac[_0x71f3('0x48')]=_0x10abac['attributes'][_0x71f3('0x56')]?_0x10abac['attributes']:_0x442479[_0x71f3('0x43')];if(!_0x36fce0[_0x71f3('0x44')]['hasOwnProperty']('nolimit')){_0x10abac[_0x71f3('0x2b')]=qs[_0x71f3('0x2b')](_0x36fce0['query'][_0x71f3('0x2b')]);_0x10abac[_0x71f3('0x2c')]=qs[_0x71f3('0x2c')](_0x36fce0[_0x71f3('0x44')][_0x71f3('0x2c')]);}_0x10abac[_0x71f3('0x4a')]=qs[_0x71f3('0x67')](_0x36fce0['query']['sort']);_0x10abac[_0x71f3('0x4b')]=qs[_0x71f3('0x45')](_[_0x71f3('0x4c')](_0x36fce0[_0x71f3('0x44')],_0x442479['filters']));_0x10abac[_0x71f3('0x4b')][_0x71f3('0x63')]=_0x59ac30['id'];if(_0x36fce0[_0x71f3('0x44')][_0x71f3('0x4d')]){_0x10abac['where']=_[_0x71f3('0x4e')](_0x10abac[_0x71f3('0x4b')],{'$or':_[_0x71f3('0x3e')](_0x10abac['attributes'],function(_0x3489f4){var _0x4e5e73={};_0x4e5e73[_0x3489f4]={'$like':'%'+_0x36fce0[_0x71f3('0x44')][_0x71f3('0x4d')]+'%'};return _0x4e5e73;})});}if(_0x36fce0[_0x71f3('0x44')][_0x71f3('0xa2')]){var _0x14b756=_0x36fce0[_0x71f3('0x44')]['$gte'][_0x71f3('0xa3')](',');var _0x121262={};_0x121262[_0x14b756[0x0]]={'$gte':moment(_0x14b756[0x1])['format'](_0x71f3('0xa4'))};_0x10abac[_0x71f3('0x4b')]=_[_0x71f3('0x4e')](_0x10abac[_0x71f3('0x4b')],_0x121262);}_0x10abac=_['merge']({},_0x10abac,_0x36fce0[_0x71f3('0x50')]);return db[_0x71f3('0xa1')][_0x71f3('0x51')]({'where':_0x10abac[_0x71f3('0x4b')]})['then'](function(_0x551ee5){_0x50f810[_0x71f3('0x51')]=_0x551ee5;if(_0x36fce0[_0x71f3('0x44')][_0x71f3('0x52')]){_0x10abac[_0x71f3('0x53')]=[{'all':!![]}];}return db['FaxMessage'][_0x71f3('0x68')](_0x10abac);})[_0x71f3('0x33')](function(_0x232a4f){_0x50f810[_0x71f3('0x54')]=_0x232a4f;return _0x50f810;});}})[_0x71f3('0x33')](respondWithFilteredResult(_0x5dbe77,_0x10abac))[_0x71f3('0x27')](handleError(_0x5dbe77,null));};exports[_0x71f3('0x3b')]=function(_0x12867b,_0x2c6174,_0x3b87ff){var _0x381920,_0x46a945={},_0x548d42;if(_0x12867b['body']['to']){_0x548d42=_0x12867b['body']['to'][0x0];}return db[_0x71f3('0x3f')]['find']({'where':{'id':_0x12867b[_0x71f3('0x55')]['id']},'include':[{'model':db[_0x71f3('0xa5')],'as':'List','include':[{'model':db[_0x71f3('0x71')],'as':'Contacts','where':{'fax':_0x548d42},'limit':0x1,'order':[[_0x71f3('0x9d'),_0x71f3('0xa6')]]}]}]})['then'](handleEntityNotFound(_0x2c6174,null))['then'](function(_0x4717c1){_0x381920=_0x4717c1;if(_0x12867b[_0x71f3('0x59')][_0x71f3('0xa7')]&&_0x12867b[_0x71f3('0x59')]['attachments'][_0x71f3('0x56')]){for(var _0x2b7c1c=0x0;_0x2b7c1c<_0x12867b[_0x71f3('0x59')][_0x71f3('0xa7')][_0x71f3('0x56')];_0x2b7c1c+=0x1){_0x12867b[_0x71f3('0x59')][_0x71f3('0xa7')][_0x2b7c1c]={'filename':_0x12867b[_0x71f3('0x59')][_0x71f3('0xa7')][_0x2b7c1c][_0x71f3('0x3a')],'id':_0x12867b[_0x71f3('0x59')][_0x71f3('0xa7')][_0x2b7c1c]['id'],'path':path['join'](config[_0x71f3('0xa8')],_0x71f3('0xa9'),_0x12867b['body'][_0x71f3('0xa7')][_0x2b7c1c][_0x71f3('0xaa')])};}}return respondWithRpcPromise(_0x71f3('0xab'),_0x71f3('0xab'),{'FaxAccountId':_[_0x71f3('0xac')](_0x12867b[_0x71f3('0x55')]['id'])?undefined:_0x12867b[_0x71f3('0x55')]['id'],'path':_[_0x71f3('0xac')](_0x12867b['body']['attachments'][0x0][_0x71f3('0x8')])?undefined:_0x12867b['body'][_0x71f3('0xa7')][0x0][_0x71f3('0x8')],'fax':_[_0x71f3('0xac')](_0x12867b[_0x71f3('0x59')]['to'][0x0])?undefined:_0x12867b[_0x71f3('0x59')]['to'][0x0]},client9002);})[_0x71f3('0x33')](function(){if(_0x381920){if(_[_0x71f3('0xac')](_0x12867b['body']['from'])){_0x12867b[_0x71f3('0x59')][_0x71f3('0xad')]=util[_0x71f3('0xae')](_0x71f3('0xaf'),_0x381920['name'],_0x381920[_0x71f3('0xb0')]);}if(_0x381920[_0x71f3('0xb1')]){if(_0x381920[_0x71f3('0xb1')][_0x71f3('0xb2')][_0x71f3('0x56')]){return _0x381920[_0x71f3('0xb1')][_0x71f3('0xb2')][0x0];}else{return db[_0x71f3('0x71')]['create'](_['defaults'](_0x12867b['body'],{'firstName':_0x12867b[_0x71f3('0x59')]['to'][0x0],'phone':_0x12867b[_0x71f3('0x59')]['to'][0x0],'fax':_0x12867b[_0x71f3('0x59')]['to'][0x0],'ListId':_0x381920[_0x71f3('0xb3')]}));}}else{throw new Error(_0x71f3('0xb4'));}}else{throw new Error('Send\x20Fax\x20failed');}})[_0x71f3('0x33')](function(_0x56fc58){if(_0x56fc58){return db[_0x71f3('0x70')]['find']({'where':{'ContactId':_0x56fc58['id'],'closed':![],'FaxAccountId':_0x381920['id']}})['then'](function(_0x35780e){if(_0x35780e){return[_0x35780e,![]];}return db[_0x71f3('0x70')]['create']({'UserId':_0x12867b['user']['id'],'ContactId':_0x56fc58['id'],'FaxAccountId':_0x381920['id'],'fax':_0x12867b[_0x71f3('0x59')]['to'][0x0],'firstMsgDirection':_0x71f3('0xb5'),'Messages':[_[_0x71f3('0x4e')](_0x12867b[_0x71f3('0x59')],{'read':![],'body':_0x12867b[_0x71f3('0x59')][_0x71f3('0xa7')][0x0][_0x71f3('0xb6')],'FaxAccountId':_0x381920['id'],'UserId':_0x12867b[_0x71f3('0x5a')]['id'],'ContactId':_0x56fc58['id'],'AttachmentId':_0x12867b['body'][_0x71f3('0xa7')][0x0]['id']})]},{'include':[{'model':db[_0x71f3('0xa1')],'as':_0x71f3('0xb7')}]})[_0x71f3('0x33')](function(_0x25a337){return[_0x25a337,!![]];});});}else{throw new Error('Contact\x20not\x20found');}})[_0x71f3('0xb8')](function(_0xbfb321,_0xae79e4){if(_0xae79e4){return _0xbfb321;}return db[_0x71f3('0xa1')]['create']({'direction':_0x71f3('0xb5'),'read':![],'body':_0x12867b['body'][_0x71f3('0xa7')][0x0][_0x71f3('0xb6')],'FaxAccountId':_0x381920['id'],'FaxInteractionId':_0xbfb321['id'],'UserId':_0x12867b[_0x71f3('0x5a')]['id'],'ContactId':_0xbfb321[_0x71f3('0xb9')],'AttachmentId':_0x12867b['body'][_0x71f3('0xa7')][0x0]['id']})[_0x71f3('0x33')](function(_0x1e43e4){_0xbfb321[_0x71f3('0xba')][_0x71f3('0xb7')]=[];_0xbfb321[_0x71f3('0xba')][_0x71f3('0xb7')]['push'](_0x1e43e4[_0x71f3('0xba')]);return _0xbfb321;});})[_0x71f3('0x33')](function(_0x8346f0){respondWithRpcPromise(_0x71f3('0xbb'),_0x71f3('0xbb'),{'FaxAccountId':_[_0x71f3('0xac')](_0x12867b[_0x71f3('0x55')]['id'])?undefined:_0x12867b[_0x71f3('0x55')]['id'],'path':_[_0x71f3('0xac')](_0x12867b[_0x71f3('0x59')][_0x71f3('0xa7')][0x0][_0x71f3('0x8')])?undefined:_0x12867b[_0x71f3('0x59')][_0x71f3('0xa7')][0x0][_0x71f3('0x8')],'fax':_[_0x71f3('0xac')](_0x12867b[_0x71f3('0x59')]['to'][0x0])?undefined:_0x12867b[_0x71f3('0x59')]['to'][0x0],'AttachmentId':_0x12867b[_0x71f3('0x59')][_0x71f3('0xa7')][0x0]['id']},client9002)['then'](function(_0x35630f){logger[_0x71f3('0x1d')](_0x71f3('0xbc'),_0x35630f);})['catch'](function(_0x2c93ef){logger[_0x71f3('0x1d')](_0x71f3('0xbc'),_0x2c93ef);});return _0x8346f0;})[_0x71f3('0x33')](respondWithResult(_0x2c6174,null))[_0x71f3('0x27')](handleError(_0x2c6174,null));};exports[_0x71f3('0xbd')]=function(_0x32fd9a,_0x4cc1ee,_0x551707){return db[_0x71f3('0x3f')][_0x71f3('0x57')]({'where':{'id':_0x32fd9a[_0x71f3('0x55')]['id']}})[_0x71f3('0x33')](handleEntityNotFound(_0x4cc1ee,null))[_0x71f3('0x33')](function(_0xeb9252){if(_0xeb9252){return _0xeb9252[_0x71f3('0xbd')](_0x32fd9a[_0x71f3('0x59')]['ids'],_[_0x71f3('0x6e')](_0x32fd9a[_0x71f3('0x59')],[_0x71f3('0x6a'),'id'])||{})[_0x71f3('0xb8')](function(_0x3b12fb){for(var _0x2ff944=0x0;_0x2ff944<_0x32fd9a[_0x71f3('0x59')][_0x71f3('0x6a')][_0x71f3('0x56')];_0x2ff944+=0x1){socket[_0x71f3('0xbe')]('userFaxAccount:save',{'UserId':Number(_0x32fd9a[_0x71f3('0x59')][_0x71f3('0x6a')][_0x2ff944]),'FaxAccountId':Number(_0x32fd9a[_0x71f3('0x55')]['id'])});}return _0x3b12fb;});}})['then'](respondWithResult(_0x4cc1ee,null))[_0x71f3('0x27')](handleError(_0x4cc1ee,null));};exports[_0x71f3('0xbf')]=function(_0x5883a6,_0x1623a5,_0xd74c17){return db[_0x71f3('0x3f')][_0x71f3('0x57')]({'where':{'id':_0x5883a6['params']['id']}})['then'](handleEntityNotFound(_0x1623a5,null))[_0x71f3('0x33')](function(_0x55ed0d){if(_0x55ed0d){return _0x55ed0d['removeAgents'](_0x5883a6[_0x71f3('0x44')][_0x71f3('0x6a')])['then'](function(){if(_[_0x71f3('0xc0')](_0x5883a6[_0x71f3('0x44')][_0x71f3('0x6a')])){for(var _0x4920f1=0x0;_0x4920f1<_0x5883a6[_0x71f3('0x44')][_0x71f3('0x6a')][_0x71f3('0x56')];_0x4920f1+=0x1){socket[_0x71f3('0xbe')](_0x71f3('0xc1'),{'UserId':Number(_0x5883a6[_0x71f3('0x44')]['ids'][_0x4920f1]),'FaxAccountId':Number(_0x5883a6[_0x71f3('0x55')]['id'])});}}else{socket[_0x71f3('0xbe')](_0x71f3('0xc1'),{'UserId':Number(_0x5883a6[_0x71f3('0x44')][_0x71f3('0x6a')]),'FaxAccountId':Number(_0x5883a6[_0x71f3('0x55')]['id'])});}});}})[_0x71f3('0x33')](respondWithStatusCode(_0x1623a5,null))[_0x71f3('0x27')](handleError(_0x1623a5,null));};exports['getAgents']=function(_0x489de5,_0x29b8cc,_0x2799cb){var _0x157a6c={};var _0x57b641={};var _0x19899a;var _0x5c4cf5;return db[_0x71f3('0x3f')][_0x71f3('0x6f')]({'where':{'id':_0x489de5[_0x71f3('0x55')]['id']}})[_0x71f3('0x33')](handleEntityNotFound(_0x29b8cc,null))[_0x71f3('0x33')](function(_0x6e9433){if(_0x6e9433){_0x19899a=_0x6e9433;_0x57b641[_0x71f3('0x43')]=_[_0x71f3('0x66')](db[_0x71f3('0x73')][_0x71f3('0x40')]);_0x57b641[_0x71f3('0x44')]=_[_0x71f3('0x66')](_0x489de5[_0x71f3('0x44')]);_0x57b641[_0x71f3('0x45')]=_[_0x71f3('0x46')](_0x57b641[_0x71f3('0x43')],_0x57b641[_0x71f3('0x44')]);_0x157a6c[_0x71f3('0x48')]=_['intersection'](_0x57b641[_0x71f3('0x43')],qs['fields'](_0x489de5[_0x71f3('0x44')][_0x71f3('0x47')]));_0x157a6c[_0x71f3('0x48')]=_0x157a6c[_0x71f3('0x48')][_0x71f3('0x56')]?_0x157a6c['attributes']:_0x57b641['model'];_0x157a6c[_0x71f3('0x4a')]=qs['sort'](_0x489de5[_0x71f3('0x44')][_0x71f3('0x67')]);_0x157a6c['where']=qs[_0x71f3('0x45')](_[_0x71f3('0x4c')](_0x489de5[_0x71f3('0x44')],_0x57b641[_0x71f3('0x45')]));if(_0x489de5['query'][_0x71f3('0x4d')]){_0x157a6c[_0x71f3('0x4b')]=_[_0x71f3('0x4e')](_0x157a6c[_0x71f3('0x4b')],{'$or':_['map'](_0x157a6c['attributes'],function(_0x26cbbc){var _0x437ec6={};_0x437ec6[_0x26cbbc]={'$like':'%'+_0x489de5[_0x71f3('0x44')]['filter']+'%'};return _0x437ec6;})});}_0x157a6c=_[_0x71f3('0x4e')]({},_0x157a6c,_0x489de5[_0x71f3('0x50')]);return _0x19899a[_0x71f3('0xc2')](_0x157a6c);}})['then'](function(_0x4500bc){if(_0x4500bc){_0x5c4cf5=_0x4500bc['length'];if(!_0x489de5[_0x71f3('0x44')]['hasOwnProperty']('nolimit')){_0x157a6c[_0x71f3('0x2b')]=qs[_0x71f3('0x2b')](_0x489de5[_0x71f3('0x44')]['limit']);_0x157a6c['offset']=qs[_0x71f3('0x2c')](_0x489de5[_0x71f3('0x44')][_0x71f3('0x2c')]);}return _0x19899a[_0x71f3('0xc2')](_0x157a6c);}})['then'](function(_0x1630f3){if(_0x1630f3){return _0x1630f3?{'count':_0x5c4cf5,'rows':_0x1630f3}:null;}})[_0x71f3('0x33')](respondWithResult(_0x29b8cc,null))['catch'](handleError(_0x29b8cc,null));};
\ No newline at end of file
+var _0x83fb=['merge','FaxAccount','mandatoryDispositionPause','includeAll','options','find','catch','create','body','role','user','UserProfileSection','autoAssociation','params','addDisposition','Disposition','getDispositions','length','FaxAccountId','include','findAll','rows','addAnswer','CannedAnswer','getAnswers','removeAnswers','addInteraction','FaxInteraction','omit','ids','findOne','CmContact','Contact','User','Owner','fullname','tag','addApplications','sequelize','transaction','Transaction','ISOLATION_LEVELS','FaxApplication','bulkCreate','findAndCountAll','priority','finally','getApplications','exten','localstationid','app','system','Fax\x20Extension','appdata','Answer','CDR(type)=inbound-fax','ecm','gateway','faxdetect','headerinfo','maxrate','minrate','modem','t38timeout','push','FAXOPT(','Set','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','tech','updatedAt','TrunkId','ListId','findById','split','format','YYYY-MM-DD\x20HH:mm:ss','FaxMessage','CmList','List','Contacts','DESC','attachments','root','basename','CheckAfterSend','path','isNil','from','\x22%s\x22\x20<%s>','fax','defaults','List\x20not\x20found','Send\x20Fax\x20failed','out','filename','Messages','spread','ContactId','dataValues','SendFax','SendFaxRpc,\x20%s','addAgents','emit','removeAgents','isArray','userFaxAccount:remove','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','register','jayson/promise','client','http','then','info','FaxAccount,\x20%s,\x20%s','request\x20sent','debug','FaxAccount,\x20%s,\x20%s,\x20%s','error','code','message','result','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','destroy','get','FaxAccounts','UserProfileResource','stack','name','send','index','Pause','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter'];(function(_0x5e3863,_0x107a63){var _0x1cbfad=function(_0x3b34d0){while(--_0x3b34d0){_0x5e3863['push'](_0x5e3863['shift']());}};_0x1cbfad(++_0x107a63);}(_0x83fb,0x70));var _0xb83f=function(_0x24e04e,_0x4953b2){_0x24e04e=_0x24e04e-0x0;var _0xe76697=_0x83fb[_0x24e04e];return _0xe76697;};'use strict';var emlformat=require(_0xb83f('0x0'));var rimraf=require(_0xb83f('0x1'));var zipdir=require(_0xb83f('0x2'));var jsonpatch=require(_0xb83f('0x3'));var rp=require(_0xb83f('0x4'));var moment=require('moment');var BPromise=require(_0xb83f('0x5'));var Mustache=require(_0xb83f('0x6'));var util=require(_0xb83f('0x7'));var path=require('path');var sox=require(_0xb83f('0x8'));var csv=require(_0xb83f('0x9'));var ejs=require(_0xb83f('0xa'));var fs=require('fs');var fs_extra=require(_0xb83f('0xb'));var _=require(_0xb83f('0xc'));var squel=require(_0xb83f('0xd'));var crypto=require(_0xb83f('0xe'));var jsforce=require(_0xb83f('0xf'));var deskjs=require(_0xb83f('0x10'));var toCsv=require(_0xb83f('0x9'));var querystring=require(_0xb83f('0x11'));var Papa=require('papaparse');var Redis=require(_0xb83f('0x12'));var authService=require(_0xb83f('0x13'));var qs=require(_0xb83f('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xb83f('0x15'));var logger=require('../../config/logger')('api');var utils=require(_0xb83f('0x16'));var config=require(_0xb83f('0x17'));var licenseUtil=require(_0xb83f('0x18'));var db=require(_0xb83f('0x19'))['db'];config[_0xb83f('0x1a')]=_['defaults'](config[_0xb83f('0x1a')],{'host':_0xb83f('0x1b'),'port':0x18eb});var socket=require(_0xb83f('0x1c'))(new Redis(config[_0xb83f('0x1a')]));require('./faxAccount.socket')[_0xb83f('0x1d')](socket);var jayson=require(_0xb83f('0x1e'));var client=jayson[_0xb83f('0x1f')][_0xb83f('0x20')]({'port':0x232c});var client9002=jayson[_0xb83f('0x1f')][_0xb83f('0x20')]({'port':0x232a});function respondWithRpcPromise(_0x3a9d43,_0x51d479,_0x4ebba3,_0x8c1526){return new BPromise(function(_0x162974,_0x3f2c76){var _0x45872e=_0x8c1526||client;return _0x45872e['request'](_0x3a9d43,_0x4ebba3)[_0xb83f('0x21')](function(_0x38b617){logger[_0xb83f('0x22')](_0xb83f('0x23'),_0x51d479,_0xb83f('0x24'));logger[_0xb83f('0x25')](_0xb83f('0x26'),_0x51d479,_0xb83f('0x24'),JSON['stringify'](_0x38b617));if(_0x38b617[_0xb83f('0x27')]){if(_0x38b617[_0xb83f('0x27')][_0xb83f('0x28')]===0x1f4){logger[_0xb83f('0x27')]('FaxAccount,\x20%s,\x20%s',_0x51d479,_0x38b617[_0xb83f('0x27')][_0xb83f('0x29')]);return _0x3f2c76(_0x38b617[_0xb83f('0x27')][_0xb83f('0x29')]);}logger[_0xb83f('0x27')](_0xb83f('0x23'),_0x51d479,_0x38b617['error'][_0xb83f('0x29')]);return _0x162974(_0x38b617[_0xb83f('0x27')]['message']);}else{logger[_0xb83f('0x22')]('FaxAccount,\x20%s,\x20%s',_0x51d479,'request\x20sent');_0x162974(_0x38b617[_0xb83f('0x2a')]['message']);}})['catch'](function(_0x3b53a9){logger[_0xb83f('0x27')]('FaxAccount,\x20%s,\x20%s',_0x51d479,_0x3b53a9);_0x3f2c76(_0x3b53a9);});});}function respondWithStatusCode(_0x506988,_0xfcb382){_0xfcb382=_0xfcb382||0xcc;return function(_0x305b45){if(_0x305b45){return _0x506988[_0xb83f('0x2b')](_0xfcb382);}return _0x506988[_0xb83f('0x2c')](_0xfcb382)[_0xb83f('0x2d')]();};}function respondWithResult(_0x2951e,_0x585c16){_0x585c16=_0x585c16||0xc8;return function(_0x44136f){if(_0x44136f){return _0x2951e[_0xb83f('0x2c')](_0x585c16)['json'](_0x44136f);}};}function respondWithFilteredResult(_0x10b474,_0x1fffb5){return function(_0x311223){if(_0x311223){var _0x287a3c=typeof _0x1fffb5[_0xb83f('0x2e')]===_0xb83f('0x2f')&&typeof _0x1fffb5[_0xb83f('0x30')]===_0xb83f('0x2f');var _0x2cd893=_0x311223['count'];var _0x56304a=_0x287a3c?0x0:_0x1fffb5[_0xb83f('0x2e')];var _0x177727=_0x287a3c?_0x311223[_0xb83f('0x31')]:_0x1fffb5['offset']+_0x1fffb5[_0xb83f('0x30')];var _0x1cd5b8;if(_0x177727>=_0x2cd893){_0x177727=_0x2cd893;_0x1cd5b8=0xc8;}else{_0x1cd5b8=0xce;}_0x10b474[_0xb83f('0x2c')](_0x1cd5b8);return _0x10b474[_0xb83f('0x32')](_0xb83f('0x33'),_0x56304a+'-'+_0x177727+'/'+_0x2cd893)[_0xb83f('0x34')](_0x311223);}return null;};}function patchUpdates(_0x35484e){return function(_0x14bc1a){try{jsonpatch[_0xb83f('0x35')](_0x14bc1a,_0x35484e,!![]);}catch(_0x4746d7){return BPromise[_0xb83f('0x36')](_0x4746d7);}return _0x14bc1a[_0xb83f('0x37')]();};}function saveUpdates(_0x305bf6,_0x39609b){return function(_0x4ab1ef){if(_0x4ab1ef){return _0x4ab1ef[_0xb83f('0x38')](_0x305bf6)[_0xb83f('0x21')](function(_0x5b32e3){return _0x5b32e3;});}return null;};}function removeEntity(_0x480d44,_0x5f1d85){return function(_0x6ccc9d){if(_0x6ccc9d){return _0x6ccc9d[_0xb83f('0x39')]()['then'](function(){var _0x268d22=_0x6ccc9d[_0xb83f('0x3a')]({'plain':!![]});var _0x5b328e=_0xb83f('0x3b');return db[_0xb83f('0x3c')][_0xb83f('0x39')]({'where':{'type':_0x5b328e,'resourceId':_0x268d22['id']}})[_0xb83f('0x21')](function(){return _0x6ccc9d;});})['then'](function(){_0x480d44['status'](0xcc)[_0xb83f('0x2d')]();});}};}function handleEntityNotFound(_0x3d32b6,_0x3a7b67){return function(_0x320aa7){if(!_0x320aa7){_0x3d32b6[_0xb83f('0x2b')](0x194);}return _0x320aa7;};}function handleError(_0x2267bb,_0x4aa338){_0x4aa338=_0x4aa338||0x1f4;return function(_0x2fd8ae){logger[_0xb83f('0x27')](_0x2fd8ae[_0xb83f('0x3d')]);if(_0x2fd8ae[_0xb83f('0x3e')]){delete _0x2fd8ae['name'];}_0x2267bb['status'](_0x4aa338)[_0xb83f('0x3f')](_0x2fd8ae);};}exports[_0xb83f('0x40')]=function(_0x19343a,_0xe098da){var _0x35601b={'include':[{'model':db[_0xb83f('0x41')],'as':'mandatoryDispositionPause'}]},_0x1283d9={},_0xd8611c={'count':0x0,'rows':[]};var _0x1e36c5=_['map'](db['FaxAccount'][_0xb83f('0x42')],function(_0x1d4210){return{'name':_0x1d4210[_0xb83f('0x43')],'type':_0x1d4210[_0xb83f('0x44')][_0xb83f('0x45')]};});_0x1283d9[_0xb83f('0x46')]=_[_0xb83f('0x47')](_0x1e36c5,_0xb83f('0x3e'));_0x1283d9[_0xb83f('0x48')]=_[_0xb83f('0x49')](_0x19343a[_0xb83f('0x48')]);_0x1283d9[_0xb83f('0x4a')]=_['intersection'](_0x1283d9[_0xb83f('0x46')],_0x1283d9[_0xb83f('0x48')]);_0x35601b['attributes']=_[_0xb83f('0x4b')](_0x1283d9['model'],qs[_0xb83f('0x4c')](_0x19343a[_0xb83f('0x48')]['fields']));_0x35601b[_0xb83f('0x4d')]=_0x35601b[_0xb83f('0x4d')]['length']?_0x35601b[_0xb83f('0x4d')]:_0x1283d9[_0xb83f('0x46')];if(!_0x19343a[_0xb83f('0x48')][_0xb83f('0x4e')](_0xb83f('0x4f'))){_0x35601b[_0xb83f('0x30')]=qs['limit'](_0x19343a[_0xb83f('0x48')][_0xb83f('0x30')]);_0x35601b[_0xb83f('0x2e')]=qs[_0xb83f('0x2e')](_0x19343a[_0xb83f('0x48')][_0xb83f('0x2e')]);}_0x35601b[_0xb83f('0x50')]=qs[_0xb83f('0x51')](_0x19343a[_0xb83f('0x48')]['sort']);_0x35601b[_0xb83f('0x52')]=qs[_0xb83f('0x4a')](_[_0xb83f('0x53')](_0x19343a[_0xb83f('0x48')],_0x1283d9[_0xb83f('0x4a')]),_0x1e36c5);if(_0x19343a['query'][_0xb83f('0x54')]){_0x35601b['where']=_[_0xb83f('0x55')](_0x35601b[_0xb83f('0x52')],{'$or':_[_0xb83f('0x47')](_0x1e36c5,function(_0x3bda8d){if(_0x3bda8d[_0xb83f('0x44')]!=='VIRTUAL'){var _0x78021d={};_0x78021d[_0x3bda8d[_0xb83f('0x3e')]]={'$like':'%'+_0x19343a['query'][_0xb83f('0x54')]+'%'};return _0x78021d;}})});}_0x35601b=_[_0xb83f('0x55')]({},_0x35601b,_0x19343a['options']);var _0x5568fb={'where':_0x35601b[_0xb83f('0x52')]};return db[_0xb83f('0x56')][_0xb83f('0x31')](_0x5568fb)['then'](function(_0x545e78){_0xd8611c[_0xb83f('0x31')]=_0x545e78;if(_0x19343a[_0xb83f('0x48')]['includeAll']){_0x35601b['include']=[{'all':!![]}];}return db[_0xb83f('0x56')]['findAll'](_0x35601b);})[_0xb83f('0x21')](function(_0x56f3e9){_0xd8611c['rows']=_0x56f3e9;return _0xd8611c;})[_0xb83f('0x21')](respondWithFilteredResult(_0xe098da,_0x35601b))['catch'](handleError(_0xe098da,null));};exports['show']=function(_0x4fa786,_0x15e20a){var _0x55ed1b={'raw':![],'where':{'id':_0x4fa786['params']['id']},'include':[{'model':db[_0xb83f('0x41')],'as':_0xb83f('0x57')}]},_0x44bf37={};_0x44bf37['model']=_[_0xb83f('0x49')](db[_0xb83f('0x56')][_0xb83f('0x42')]);_0x44bf37[_0xb83f('0x48')]=_[_0xb83f('0x49')](_0x4fa786[_0xb83f('0x48')]);_0x44bf37[_0xb83f('0x4a')]=_[_0xb83f('0x4b')](_0x44bf37[_0xb83f('0x46')],_0x44bf37[_0xb83f('0x48')]);_0x55ed1b[_0xb83f('0x4d')]=_['intersection'](_0x44bf37[_0xb83f('0x46')],qs['fields'](_0x4fa786[_0xb83f('0x48')][_0xb83f('0x4c')]));_0x55ed1b[_0xb83f('0x4d')]=_0x55ed1b[_0xb83f('0x4d')]['length']?_0x55ed1b['attributes']:_0x44bf37[_0xb83f('0x46')];if(_0x4fa786[_0xb83f('0x48')][_0xb83f('0x58')]){_0x55ed1b['include']=[{'all':!![]}];}_0x55ed1b=_[_0xb83f('0x55')]({},_0x55ed1b,_0x4fa786[_0xb83f('0x59')]);return db[_0xb83f('0x56')][_0xb83f('0x5a')](_0x55ed1b)['then'](handleEntityNotFound(_0x15e20a,null))[_0xb83f('0x21')](respondWithResult(_0x15e20a,null))[_0xb83f('0x5b')](handleError(_0x15e20a,null));};exports['create']=function(_0xa66fbb,_0x1de66f){return db[_0xb83f('0x56')][_0xb83f('0x5c')](_0xa66fbb[_0xb83f('0x5d')],{})[_0xb83f('0x21')](function(_0x451b58){var _0x234ba5=_0xa66fbb['user'][_0xb83f('0x3a')]({'plain':!![]});if(!_0x234ba5)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x234ba5[_0xb83f('0x5e')]===_0xb83f('0x5f')){var _0x2af9=_0x451b58[_0xb83f('0x3a')]({'plain':!![]});var _0xc76992=_0xb83f('0x3b');return db[_0xb83f('0x60')][_0xb83f('0x5a')]({'where':{'name':_0xc76992,'userProfileId':_0x234ba5['userProfileId']},'raw':!![]})['then'](function(_0x5fb12){if(_0x5fb12&&_0x5fb12[_0xb83f('0x61')]===0x0){return db['UserProfileResource']['create']({'name':_0x2af9[_0xb83f('0x3e')],'resourceId':_0x2af9['id'],'type':_0x5fb12[_0xb83f('0x3e')],'sectionId':_0x5fb12['id']},{})[_0xb83f('0x21')](function(){return _0x451b58;});}else{return _0x451b58;}})[_0xb83f('0x5b')](function(_0x1fd863){logger[_0xb83f('0x27')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x1fd863);throw _0x1fd863;});}return _0x451b58;})[_0xb83f('0x21')](respondWithResult(_0x1de66f,0xc9))[_0xb83f('0x5b')](handleError(_0x1de66f,null));};exports[_0xb83f('0x38')]=function(_0x13bb73,_0xb25a72){if(_0x13bb73[_0xb83f('0x5d')]['id']){delete _0x13bb73[_0xb83f('0x5d')]['id'];}return db[_0xb83f('0x56')][_0xb83f('0x5a')]({'where':{'id':_0x13bb73['params']['id']},'include':[{'model':db['Pause'],'as':_0xb83f('0x57')}]})[_0xb83f('0x21')](handleEntityNotFound(_0xb25a72,null))[_0xb83f('0x21')](saveUpdates(_0x13bb73[_0xb83f('0x5d')],null))[_0xb83f('0x21')](respondWithResult(_0xb25a72,null))[_0xb83f('0x5b')](handleError(_0xb25a72,null));};exports[_0xb83f('0x39')]=function(_0x2c95fa,_0x2039e8){return db[_0xb83f('0x56')][_0xb83f('0x5a')]({'where':{'id':_0x2c95fa[_0xb83f('0x62')]['id']}})[_0xb83f('0x21')](handleEntityNotFound(_0x2039e8,null))[_0xb83f('0x21')](removeEntity(_0x2039e8,null))[_0xb83f('0x5b')](handleError(_0x2039e8,null));};exports['describe']=function(_0x638536,_0x1017da){return db[_0xb83f('0x56')]['describe']()[_0xb83f('0x21')](respondWithResult(_0x1017da,null))[_0xb83f('0x5b')](handleError(_0x1017da,null));};exports[_0xb83f('0x63')]=function(_0x31f782,_0x499019,_0x191a6b){if(_0x31f782['body']['id']){delete _0x31f782[_0xb83f('0x5d')]['id'];}return db[_0xb83f('0x56')][_0xb83f('0x5a')]({'where':{'id':_0x31f782[_0xb83f('0x62')]['id']}})[_0xb83f('0x21')](handleEntityNotFound(_0x499019,null))[_0xb83f('0x21')](function(_0x1b020e){if(_0x1b020e){_0x31f782['body']['FaxAccountId']=_0x1b020e['id'];return db[_0xb83f('0x64')][_0xb83f('0x5c')](_0x31f782['body']);}})[_0xb83f('0x21')](respondWithResult(_0x499019,null))[_0xb83f('0x5b')](handleError(_0x499019,null));};exports[_0xb83f('0x65')]=function(_0x274538,_0x15b4f9,_0x533d18){var _0x4960db={'raw':![],'where':{}};var _0x19ac1f={};var _0xa4be11={'count':0x0,'rows':[]};return db[_0xb83f('0x56')]['findOne']({'where':{'id':_0x274538[_0xb83f('0x62')]['id']}})[_0xb83f('0x21')](handleEntityNotFound(_0x15b4f9,null))[_0xb83f('0x21')](function(_0x3d490a){if(_0x3d490a){_0x19ac1f[_0xb83f('0x46')]=_[_0xb83f('0x49')](db[_0xb83f('0x64')][_0xb83f('0x42')]);_0x19ac1f[_0xb83f('0x48')]=_['keys'](_0x274538[_0xb83f('0x48')]);_0x19ac1f[_0xb83f('0x4a')]=_['intersection'](_0x19ac1f[_0xb83f('0x46')],_0x19ac1f[_0xb83f('0x48')]);_0x4960db[_0xb83f('0x4d')]=_['intersection'](_0x19ac1f[_0xb83f('0x46')],qs[_0xb83f('0x4c')](_0x274538[_0xb83f('0x48')][_0xb83f('0x4c')]));_0x4960db[_0xb83f('0x4d')]=_0x4960db[_0xb83f('0x4d')][_0xb83f('0x66')]?_0x4960db['attributes']:_0x19ac1f['model'];if(!_0x274538[_0xb83f('0x48')][_0xb83f('0x4e')](_0xb83f('0x4f'))){_0x4960db[_0xb83f('0x30')]=qs[_0xb83f('0x30')](_0x274538['query'][_0xb83f('0x30')]);_0x4960db['offset']=qs[_0xb83f('0x2e')](_0x274538['query']['offset']);}_0x4960db[_0xb83f('0x50')]=qs[_0xb83f('0x51')](_0x274538['query'][_0xb83f('0x51')]);_0x4960db[_0xb83f('0x52')]=qs[_0xb83f('0x4a')](_[_0xb83f('0x53')](_0x274538['query'],_0x19ac1f[_0xb83f('0x4a')]));_0x4960db[_0xb83f('0x52')][_0xb83f('0x67')]=_0x3d490a['id'];if(_0x274538[_0xb83f('0x48')][_0xb83f('0x54')]){_0x4960db['where']=_[_0xb83f('0x55')](_0x4960db[_0xb83f('0x52')],{'$or':_[_0xb83f('0x47')](_0x4960db[_0xb83f('0x4d')],function(_0x4b226c){var _0x28508c={};_0x28508c[_0x4b226c]={'$like':'%'+_0x274538[_0xb83f('0x48')][_0xb83f('0x54')]+'%'};return _0x28508c;})});}_0x4960db=_[_0xb83f('0x55')]({},_0x4960db,_0x274538[_0xb83f('0x59')]);return db['Disposition'][_0xb83f('0x31')]({'where':_0x4960db[_0xb83f('0x52')]})[_0xb83f('0x21')](function(_0x275c5f){_0xa4be11[_0xb83f('0x31')]=_0x275c5f;if(_0x274538[_0xb83f('0x48')][_0xb83f('0x58')]){_0x4960db[_0xb83f('0x68')]=[{'all':!![]}];}return db[_0xb83f('0x64')][_0xb83f('0x69')](_0x4960db);})[_0xb83f('0x21')](function(_0x383bf4){_0xa4be11[_0xb83f('0x6a')]=_0x383bf4;return _0xa4be11;});}})[_0xb83f('0x21')](respondWithFilteredResult(_0x15b4f9,_0x4960db))[_0xb83f('0x5b')](handleError(_0x15b4f9,null));};exports['removeDispositions']=function(_0x47c426,_0x17a3f1,_0xdb3a2a){return db[_0xb83f('0x56')][_0xb83f('0x5a')]({'where':{'id':_0x47c426[_0xb83f('0x62')]['id']}})[_0xb83f('0x21')](handleEntityNotFound(_0x17a3f1,null))['then'](function(_0x17af09){if(_0x17af09){return _0x17af09['removeDispositions'](_0x47c426[_0xb83f('0x48')]['ids']);}})[_0xb83f('0x21')](respondWithStatusCode(_0x17a3f1,null))[_0xb83f('0x5b')](handleError(_0x17a3f1,null));};exports[_0xb83f('0x6b')]=function(_0x3e9739,_0x73e4af,_0x4e7554){if(_0x3e9739[_0xb83f('0x5d')]['id']){delete _0x3e9739[_0xb83f('0x5d')]['id'];}return db['FaxAccount'][_0xb83f('0x5a')]({'where':{'id':_0x3e9739[_0xb83f('0x62')]['id']}})[_0xb83f('0x21')](handleEntityNotFound(_0x73e4af,null))[_0xb83f('0x21')](function(_0x23363e){if(_0x23363e){_0x3e9739['body'][_0xb83f('0x67')]=_0x23363e['id'];return db[_0xb83f('0x6c')][_0xb83f('0x5c')](_0x3e9739[_0xb83f('0x5d')]);}})[_0xb83f('0x21')](respondWithResult(_0x73e4af,null))[_0xb83f('0x5b')](handleError(_0x73e4af,null));};exports[_0xb83f('0x6d')]=function(_0x2dd58b,_0x5192f1,_0x35b8eb){var _0x21856e={'raw':![],'where':{}};var _0x2e99f5={};var _0x71c176={'count':0x0,'rows':[]};return db[_0xb83f('0x56')]['findOne']({'where':{'id':_0x2dd58b[_0xb83f('0x62')]['id']}})[_0xb83f('0x21')](handleEntityNotFound(_0x5192f1,null))['then'](function(_0x132662){if(_0x132662){_0x2e99f5['model']=_[_0xb83f('0x49')](db[_0xb83f('0x6c')][_0xb83f('0x42')]);_0x2e99f5['query']=_['keys'](_0x2dd58b[_0xb83f('0x48')]);_0x2e99f5[_0xb83f('0x4a')]=_['intersection'](_0x2e99f5['model'],_0x2e99f5[_0xb83f('0x48')]);_0x21856e[_0xb83f('0x4d')]=_['intersection'](_0x2e99f5['model'],qs[_0xb83f('0x4c')](_0x2dd58b[_0xb83f('0x48')]['fields']));_0x21856e['attributes']=_0x21856e[_0xb83f('0x4d')][_0xb83f('0x66')]?_0x21856e[_0xb83f('0x4d')]:_0x2e99f5[_0xb83f('0x46')];if(!_0x2dd58b[_0xb83f('0x48')][_0xb83f('0x4e')](_0xb83f('0x4f'))){_0x21856e[_0xb83f('0x30')]=qs[_0xb83f('0x30')](_0x2dd58b[_0xb83f('0x48')]['limit']);_0x21856e['offset']=qs[_0xb83f('0x2e')](_0x2dd58b['query'][_0xb83f('0x2e')]);}_0x21856e[_0xb83f('0x50')]=qs[_0xb83f('0x51')](_0x2dd58b[_0xb83f('0x48')]['sort']);_0x21856e[_0xb83f('0x52')]=qs['filters'](_[_0xb83f('0x53')](_0x2dd58b[_0xb83f('0x48')],_0x2e99f5['filters']));_0x21856e[_0xb83f('0x52')][_0xb83f('0x67')]=_0x132662['id'];if(_0x2dd58b[_0xb83f('0x48')][_0xb83f('0x54')]){_0x21856e[_0xb83f('0x52')]=_[_0xb83f('0x55')](_0x21856e[_0xb83f('0x52')],{'$or':_[_0xb83f('0x47')](_0x21856e[_0xb83f('0x4d')],function(_0xba208f){var _0x1078f9={};_0x1078f9[_0xba208f]={'$like':'%'+_0x2dd58b[_0xb83f('0x48')]['filter']+'%'};return _0x1078f9;})});}_0x21856e=_[_0xb83f('0x55')]({},_0x21856e,_0x2dd58b[_0xb83f('0x59')]);return db[_0xb83f('0x6c')]['count']({'where':_0x21856e[_0xb83f('0x52')]})[_0xb83f('0x21')](function(_0x358bfc){_0x71c176['count']=_0x358bfc;if(_0x2dd58b['query'][_0xb83f('0x58')]){_0x21856e[_0xb83f('0x68')]=[{'all':!![]}];}return db[_0xb83f('0x6c')][_0xb83f('0x69')](_0x21856e);})[_0xb83f('0x21')](function(_0x2c2fe4){_0x71c176[_0xb83f('0x6a')]=_0x2c2fe4;return _0x71c176;});}})[_0xb83f('0x21')](respondWithFilteredResult(_0x5192f1,_0x21856e))['catch'](handleError(_0x5192f1,null));};exports[_0xb83f('0x6e')]=function(_0x4f1693,_0x30e08a,_0x308052){return db[_0xb83f('0x56')][_0xb83f('0x5a')]({'where':{'id':_0x4f1693[_0xb83f('0x62')]['id']}})[_0xb83f('0x21')](handleEntityNotFound(_0x30e08a,null))[_0xb83f('0x21')](function(_0x3d35e3){if(_0x3d35e3){return _0x3d35e3['removeAnswers'](_0x4f1693['query']['ids']);}})[_0xb83f('0x21')](respondWithStatusCode(_0x30e08a,null))[_0xb83f('0x5b')](handleError(_0x30e08a,null));};exports[_0xb83f('0x6f')]=function(_0x232459,_0x5f4121,_0x43ede8){return db[_0xb83f('0x70')][_0xb83f('0x5a')]({'where':{'id':_0x232459[_0xb83f('0x62')]['id']}})[_0xb83f('0x21')](handleEntityNotFound(_0x5f4121,null))[_0xb83f('0x21')](function(_0x5184b9){if(_0x5184b9){return _0x5184b9[_0xb83f('0x6f')](_0x232459[_0xb83f('0x5d')]['ids'],_[_0xb83f('0x71')](_0x232459[_0xb83f('0x5d')],[_0xb83f('0x72'),'id'])||{});}})[_0xb83f('0x21')](respondWithResult(_0x5f4121,null))[_0xb83f('0x5b')](handleError(_0x5f4121,null));};exports['getInteractions']=function(_0x188bab,_0x5a8826,_0x37b3d7){var _0x4f064b={'raw':![],'where':{}};var _0x5a991f={};var _0x16dd24={'count':0x0,'rows':[]};return db[_0xb83f('0x56')][_0xb83f('0x73')]({'where':{'id':_0x188bab[_0xb83f('0x62')]['id']}})[_0xb83f('0x21')](handleEntityNotFound(_0x5a8826,null))['then'](function(_0x196d76){if(_0x196d76){_0x5a991f[_0xb83f('0x46')]=_[_0xb83f('0x49')](db[_0xb83f('0x70')][_0xb83f('0x42')]);_0x5a991f[_0xb83f('0x48')]=_['keys'](_0x188bab[_0xb83f('0x48')]);_0x5a991f[_0xb83f('0x4a')]=_[_0xb83f('0x4b')](_0x5a991f[_0xb83f('0x46')],_0x5a991f[_0xb83f('0x48')]);_0x4f064b[_0xb83f('0x4d')]=_[_0xb83f('0x4b')](_0x5a991f[_0xb83f('0x46')],qs[_0xb83f('0x4c')](_0x188bab[_0xb83f('0x48')]['fields']));_0x4f064b[_0xb83f('0x4d')]=_0x4f064b[_0xb83f('0x4d')][_0xb83f('0x66')]?_0x4f064b[_0xb83f('0x4d')]:_0x5a991f[_0xb83f('0x46')];if(!_0x188bab[_0xb83f('0x48')]['hasOwnProperty'](_0xb83f('0x4f'))){_0x4f064b['limit']=qs[_0xb83f('0x30')](_0x188bab[_0xb83f('0x48')][_0xb83f('0x30')]);_0x4f064b[_0xb83f('0x2e')]=qs[_0xb83f('0x2e')](_0x188bab[_0xb83f('0x48')][_0xb83f('0x2e')]);}_0x4f064b['order']=qs['sort'](_0x188bab[_0xb83f('0x48')]['sort']);_0x4f064b[_0xb83f('0x52')]=qs[_0xb83f('0x4a')](_['pick'](_0x188bab[_0xb83f('0x48')],_0x5a991f[_0xb83f('0x4a')]));_0x4f064b[_0xb83f('0x52')]['FaxAccountId']=_0x196d76['id'];if(_0x188bab['query'][_0xb83f('0x54')]){_0x4f064b[_0xb83f('0x52')]=_[_0xb83f('0x55')](_0x4f064b[_0xb83f('0x52')],{'$or':_[_0xb83f('0x47')](_0x4f064b[_0xb83f('0x4d')],function(_0x4f4e5b){var _0x5edd9f={};_0x5edd9f[_0x4f4e5b]={'$like':'%'+_0x188bab[_0xb83f('0x48')][_0xb83f('0x54')]+'%'};return _0x5edd9f;})});}_0x4f064b=_[_0xb83f('0x55')]({},_0x4f064b,_0x188bab[_0xb83f('0x59')]);return db[_0xb83f('0x70')]['count']({'where':_0x4f064b[_0xb83f('0x52')]})[_0xb83f('0x21')](function(_0x24feb2){_0x16dd24[_0xb83f('0x31')]=_0x24feb2;if(_0x188bab['query'][_0xb83f('0x58')]){_0x4f064b[_0xb83f('0x68')]=[{'model':db[_0xb83f('0x74')],'as':_0xb83f('0x75'),'required':![]},{'model':db[_0xb83f('0x76')],'as':_0xb83f('0x77'),'attributes':[_0xb83f('0x3e'),_0xb83f('0x78'),'internal'],'required':![]},{'model':db['Tag'],'as':'Tags','attributes':['id',_0xb83f('0x3e'),'color'],'where':_0x188bab[_0xb83f('0x48')]['tag']?{'id':_0x188bab['query'][_0xb83f('0x79')]}:undefined,'required':_0x188bab['query'][_0xb83f('0x79')]?!![]:![]}];}return db[_0xb83f('0x70')][_0xb83f('0x69')](_0x4f064b);})[_0xb83f('0x21')](function(_0x14c809){_0x16dd24[_0xb83f('0x6a')]=_0x14c809;return _0x16dd24;});}})[_0xb83f('0x21')](respondWithFilteredResult(_0x5a8826,_0x4f064b))[_0xb83f('0x5b')](handleError(_0x5a8826,null));};exports[_0xb83f('0x7a')]=function(_0x41dc50,_0x18ed66){var _0x3283a5=_0x41dc50[_0xb83f('0x62')]['id'];var _0x595204=_0x41dc50[_0xb83f('0x5d')];var _0x5749ee=0xc8;var _0x3ed9a2=null;return db[_0xb83f('0x7b')][_0xb83f('0x7c')]({'isolationLevel':db[_0xb83f('0x7b')][_0xb83f('0x7d')][_0xb83f('0x7e')]['READ_COMMITTED']},function(_0x2819ee){return db[_0xb83f('0x56')][_0xb83f('0x73')]({'where':{'id':_0x3283a5},'transaction':_0x2819ee})[_0xb83f('0x21')](function(_0x4a4447){if(_0x4a4447){return db['FaxApplication']['destroy']({'where':{'FaxAccountId':_0x3283a5},'transaction':_0x2819ee})[_0xb83f('0x21')](function(){var _0x44cdc0=_[_0xb83f('0x47')](_0x595204,function(_0x4bb689){_0x4bb689[_0xb83f('0x67')]=_0x3283a5;return _0x4bb689;});return db[_0xb83f('0x7f')][_0xb83f('0x80')](_0x44cdc0,{'transaction':_0x2819ee});});}else{_0x5749ee=0x194;_0x3ed9a2=[];}});})[_0xb83f('0x21')](function(){if(_0x5749ee!==0x194){return db[_0xb83f('0x7f')][_0xb83f('0x81')]({'where':{'FaxAccountId':_0x3283a5},'order':_0xb83f('0x82')})['then'](function(_0x5bb9b6){_0x3ed9a2=_0x5bb9b6;});}})[_0xb83f('0x5b')](function(_0x1c7296){_0x5749ee=0x1f4;logger[_0xb83f('0x27')](_0x1c7296[_0xb83f('0x3d')]);if(_0x1c7296['name']){delete _0x1c7296['name'];}_0x3ed9a2=_0x1c7296;})[_0xb83f('0x83')](function(){if(_0x3ed9a2===null){_0x18ed66[_0xb83f('0x2b')](_0x5749ee);}else{if(_0x5749ee===0x1f4){_0x18ed66[_0xb83f('0x2c')](_0x5749ee)[_0xb83f('0x3f')](_0x3ed9a2);}else{_0x18ed66['status'](_0x5749ee)[_0xb83f('0x34')](_0x3ed9a2);}}});};exports[_0xb83f('0x84')]=function(_0xbb7cd2,_0x140eb0,_0x13dba7){var _0x134d26={};var _0x499baf={};var _0x43d486;var _0x100ab7;return db[_0xb83f('0x56')]['findOne']({'where':{'id':_0xbb7cd2[_0xb83f('0x62')]['id']}})[_0xb83f('0x21')](handleEntityNotFound(_0x140eb0,null))[_0xb83f('0x21')](function(_0x139b73){if(_0x139b73){_0x43d486=_0x139b73;_0x499baf['model']=_[_0xb83f('0x49')](db[_0xb83f('0x7f')][_0xb83f('0x42')]);_0x499baf[_0xb83f('0x48')]=_[_0xb83f('0x49')](_0xbb7cd2[_0xb83f('0x48')]);_0x499baf[_0xb83f('0x4a')]=_['intersection'](_0x499baf[_0xb83f('0x46')],_0x499baf[_0xb83f('0x48')]);_0x134d26[_0xb83f('0x4d')]=_['intersection'](_0x499baf[_0xb83f('0x46')],qs[_0xb83f('0x4c')](_0xbb7cd2[_0xb83f('0x48')][_0xb83f('0x4c')]));_0x134d26[_0xb83f('0x4d')]=_0x134d26[_0xb83f('0x4d')][_0xb83f('0x66')]?_0x134d26[_0xb83f('0x4d')]:_0x499baf[_0xb83f('0x46')];_0x134d26[_0xb83f('0x50')]=qs[_0xb83f('0x51')](_0xbb7cd2[_0xb83f('0x48')][_0xb83f('0x51')]);_0x134d26[_0xb83f('0x52')]=qs[_0xb83f('0x4a')](_[_0xb83f('0x53')](_0xbb7cd2[_0xb83f('0x48')],_0x499baf[_0xb83f('0x4a')]));if(_0xbb7cd2[_0xb83f('0x48')][_0xb83f('0x54')]){_0x134d26[_0xb83f('0x52')]=_[_0xb83f('0x55')](_0x134d26[_0xb83f('0x52')],{'$or':_[_0xb83f('0x47')](_0x134d26[_0xb83f('0x4d')],function(_0xb54940){var _0xd86be2={};_0xd86be2[_0xb54940]={'$like':'%'+_0xbb7cd2[_0xb83f('0x48')]['filter']+'%'};return _0xd86be2;})});}_0x134d26=_['merge']({},_0x134d26,_0xbb7cd2['options']);return _0x43d486[_0xb83f('0x84')](_0x134d26);}})[_0xb83f('0x21')](function(_0x4971f1){if(_0x4971f1){_0x100ab7=_0x4971f1[_0xb83f('0x66')];if(!_0xbb7cd2[_0xb83f('0x48')][_0xb83f('0x4e')]('nolimit')){_0x134d26[_0xb83f('0x30')]=qs['limit'](_0xbb7cd2['query'][_0xb83f('0x30')]);_0x134d26[_0xb83f('0x2e')]=qs[_0xb83f('0x2e')](_0xbb7cd2[_0xb83f('0x48')][_0xb83f('0x2e')]);}return _0x43d486[_0xb83f('0x84')](_0x134d26);}})['then'](function(_0xf3e804){if(_0xf3e804){return _0xf3e804?{'count':_0x100ab7,'rows':_0xf3e804}:null;}})[_0xb83f('0x21')](respondWithResult(_0x140eb0,null))[_0xb83f('0x5b')](handleError(_0x140eb0,null));};function Extension(_0x1a5fdd,_0x212231,_0x483c17,_0x4d9f8f){this['context']='from-voip-provider';this[_0xb83f('0x85')]=_0x1a5fdd[_0xb83f('0x86')];this[_0xb83f('0x87')]=_0x4d9f8f;this[_0xb83f('0x44')]=_0xb83f('0x88');this['description']=_0xb83f('0x89');this[_0xb83f('0x67')]=_0x1a5fdd['id'];this[_0xb83f('0x82')]=_0x212231;this[_0xb83f('0x8a')]=_0x483c17;}function createExtensionsReciveFax(_0x398474){var _0x1eaae2=0x1;var _0x310411=[];_0x310411['push'](new Extension(_0x398474,_0x1eaae2,'',_0xb83f('0x8b')));_0x1eaae2+=0x1;_0x310411['push'](new Extension(_0x398474,_0x1eaae2,_0xb83f('0x8c'),'Set'));_0x1eaae2+=0x1;for(var _0x3a5235 in _0x398474){if(_0x398474[_0xb83f('0x4e')](_0x3a5235)&&(_0x3a5235===_0xb83f('0x8d')||_0x3a5235===_0xb83f('0x86')||_0x3a5235===_0xb83f('0x8e')||_0x3a5235===_0xb83f('0x8f')||_0x3a5235===_0xb83f('0x90')||_0x3a5235===_0xb83f('0x91')||_0x3a5235===_0xb83f('0x92')||_0x3a5235===_0xb83f('0x93')||_0x3a5235===_0xb83f('0x94'))){_0x310411[_0xb83f('0x95')](new Extension(_0x398474,_0x1eaae2,_0xb83f('0x96')+_0x3a5235+')='+_0x398474[_0x3a5235],_0xb83f('0x97')));_0x1eaae2+=0x1;}}_0x310411[_0xb83f('0x95')](new Extension(_0x398474,_0x1eaae2,'6',_0xb83f('0x98')));_0x1eaae2+=0x1;_0x310411[_0xb83f('0x95')](new Extension(_0x398474,_0x1eaae2,_0xb83f('0x99'),_0xb83f('0x9a')));_0x1eaae2=0x0;return _0x310411;}exports[_0xb83f('0x9b')]=function(_0x55fe15,_0x1ce598,_0x1c128){var _0x213ef6;return db[_0xb83f('0x7b')][_0xb83f('0x7c')](function(_0x3bafe2){return db[_0xb83f('0x56')][_0xb83f('0x5c')](_0x55fe15[_0xb83f('0x5d')],{'transaction':_0x3bafe2})['then'](function(_0x178336){_0x213ef6=_0x178336[_0xb83f('0x3a')]({'plain':!![]});return db[_0xb83f('0x9c')][_0xb83f('0x80')](createExtensionsReciveFax(_0x213ef6),{'transaction':_0x3bafe2});});})[_0xb83f('0x21')](function(){return _0x213ef6;})[_0xb83f('0x21')](respondWithResult(_0x1ce598,null))[_0xb83f('0x5b')](handleError(_0x1ce598,null));};exports[_0xb83f('0x9d')]=function(_0x1165f6,_0x1171c7,_0x43898d){var _0x4e1117;return db[_0xb83f('0x7b')]['transaction'](function(_0x1ffef7){return db[_0xb83f('0x56')][_0xb83f('0x38')](_0x1165f6[_0xb83f('0x5d')],{'where':{'id':_0x1165f6['body']['id']},'transaction':_0x1ffef7})[_0xb83f('0x21')](function(_0x3fa807){return db['VoiceExtension'][_0xb83f('0x39')]({'where':{'FaxAccountId':_0x1165f6['body']['id']},'transaction':_0x1ffef7})[_0xb83f('0x21')](function(_0x42e507){return db['VoiceExtension'][_0xb83f('0x80')](createExtensionsReciveFax(_[_0xb83f('0x71')](_0x1165f6[_0xb83f('0x5d')],[_0xb83f('0x9e'),'key','createdAt',_0xb83f('0x9f'),_0xb83f('0xa0'),_0xb83f('0xa1')])),{'transaction':_0x1ffef7});});});})[_0xb83f('0x21')](function(){return db[_0xb83f('0x56')][_0xb83f('0xa2')](_0x1165f6[_0xb83f('0x5d')]['id']);})[_0xb83f('0x21')](respondWithResult(_0x1171c7,null))[_0xb83f('0x5b')](handleError(_0x1171c7,null));};exports['getMessages']=function(_0x44d4b6,_0x17a60e,_0x8b176d){var _0x120ec4={'raw':!![],'where':{}};var _0x2f6971={};var _0x4cd001={'count':0x0,'rows':[]};return db[_0xb83f('0x56')]['findOne']({'where':{'id':_0x44d4b6['params']['id']}})[_0xb83f('0x21')](handleEntityNotFound(_0x17a60e,null))['then'](function(_0x5979fb){if(_0x5979fb){_0x2f6971[_0xb83f('0x46')]=_[_0xb83f('0x49')](db['FaxMessage'][_0xb83f('0x42')]);_0x2f6971[_0xb83f('0x48')]=_[_0xb83f('0x49')](_0x44d4b6['query']);_0x2f6971[_0xb83f('0x4a')]=_[_0xb83f('0x4b')](_0x2f6971['model'],_0x2f6971[_0xb83f('0x48')]);_0x120ec4['attributes']=_[_0xb83f('0x4b')](_0x2f6971[_0xb83f('0x46')],qs[_0xb83f('0x4c')](_0x44d4b6[_0xb83f('0x48')][_0xb83f('0x4c')]));_0x120ec4[_0xb83f('0x4d')]=_0x120ec4[_0xb83f('0x4d')][_0xb83f('0x66')]?_0x120ec4['attributes']:_0x2f6971[_0xb83f('0x46')];if(!_0x44d4b6[_0xb83f('0x48')][_0xb83f('0x4e')](_0xb83f('0x4f'))){_0x120ec4[_0xb83f('0x30')]=qs[_0xb83f('0x30')](_0x44d4b6[_0xb83f('0x48')][_0xb83f('0x30')]);_0x120ec4[_0xb83f('0x2e')]=qs[_0xb83f('0x2e')](_0x44d4b6[_0xb83f('0x48')][_0xb83f('0x2e')]);}_0x120ec4['order']=qs[_0xb83f('0x51')](_0x44d4b6[_0xb83f('0x48')][_0xb83f('0x51')]);_0x120ec4[_0xb83f('0x52')]=qs[_0xb83f('0x4a')](_[_0xb83f('0x53')](_0x44d4b6[_0xb83f('0x48')],_0x2f6971[_0xb83f('0x4a')]));_0x120ec4['where'][_0xb83f('0x67')]=_0x5979fb['id'];if(_0x44d4b6[_0xb83f('0x48')][_0xb83f('0x54')]){_0x120ec4['where']=_[_0xb83f('0x55')](_0x120ec4[_0xb83f('0x52')],{'$or':_[_0xb83f('0x47')](_0x120ec4[_0xb83f('0x4d')],function(_0x312a69){var _0x4ec137={};_0x4ec137[_0x312a69]={'$like':'%'+_0x44d4b6[_0xb83f('0x48')][_0xb83f('0x54')]+'%'};return _0x4ec137;})});}if(_0x44d4b6['query']['$gte']){var _0x5f1ad3=_0x44d4b6[_0xb83f('0x48')]['$gte'][_0xb83f('0xa3')](',');var _0x34fe95={};_0x34fe95[_0x5f1ad3[0x0]]={'$gte':moment(_0x5f1ad3[0x1])[_0xb83f('0xa4')](_0xb83f('0xa5'))};_0x120ec4[_0xb83f('0x52')]=_[_0xb83f('0x55')](_0x120ec4['where'],_0x34fe95);}_0x120ec4=_['merge']({},_0x120ec4,_0x44d4b6[_0xb83f('0x59')]);return db[_0xb83f('0xa6')]['count']({'where':_0x120ec4['where']})[_0xb83f('0x21')](function(_0x8acf09){_0x4cd001[_0xb83f('0x31')]=_0x8acf09;if(_0x44d4b6['query'][_0xb83f('0x58')]){_0x120ec4[_0xb83f('0x68')]=[{'all':!![]}];}return db[_0xb83f('0xa6')]['findAll'](_0x120ec4);})['then'](function(_0x5d7c4d){_0x4cd001['rows']=_0x5d7c4d;return _0x4cd001;});}})[_0xb83f('0x21')](respondWithFilteredResult(_0x17a60e,_0x120ec4))[_0xb83f('0x5b')](handleError(_0x17a60e,null));};exports[_0xb83f('0x3f')]=function(_0xe1fc34,_0xc88b2d,_0x580538){var _0x5bb8be,_0x34e75f={},_0x1af3ac;if(_0xe1fc34[_0xb83f('0x5d')]['to']){_0x1af3ac=_0xe1fc34[_0xb83f('0x5d')]['to'][0x0];}return db[_0xb83f('0x56')][_0xb83f('0x5a')]({'where':{'id':_0xe1fc34[_0xb83f('0x62')]['id']},'include':[{'model':db[_0xb83f('0xa7')],'as':_0xb83f('0xa8'),'include':[{'model':db[_0xb83f('0x74')],'as':_0xb83f('0xa9'),'where':{'fax':_0x1af3ac},'limit':0x1,'order':[[_0xb83f('0x9f'),_0xb83f('0xaa')]]}]}]})[_0xb83f('0x21')](handleEntityNotFound(_0xc88b2d,null))['then'](function(_0x363973){_0x5bb8be=_0x363973;if(_0xe1fc34['body'][_0xb83f('0xab')]&&_0xe1fc34['body'][_0xb83f('0xab')]['length']){for(var _0x216354=0x0;_0x216354<_0xe1fc34[_0xb83f('0x5d')][_0xb83f('0xab')][_0xb83f('0x66')];_0x216354+=0x1){_0xe1fc34[_0xb83f('0x5d')][_0xb83f('0xab')][_0x216354]={'filename':_0xe1fc34[_0xb83f('0x5d')]['attachments'][_0x216354][_0xb83f('0x3e')],'id':_0xe1fc34[_0xb83f('0x5d')][_0xb83f('0xab')][_0x216354]['id'],'path':path['join'](config[_0xb83f('0xac')],'server/files/attachments',_0xe1fc34[_0xb83f('0x5d')]['attachments'][_0x216354][_0xb83f('0xad')])};}}return respondWithRpcPromise(_0xb83f('0xae'),_0xb83f('0xae'),{'FaxAccountId':_['isNil'](_0xe1fc34[_0xb83f('0x62')]['id'])?undefined:_0xe1fc34['params']['id'],'path':_['isNil'](_0xe1fc34['body'][_0xb83f('0xab')][0x0][_0xb83f('0xaf')])?undefined:_0xe1fc34[_0xb83f('0x5d')][_0xb83f('0xab')][0x0][_0xb83f('0xaf')],'fax':_['isNil'](_0xe1fc34['body']['to'][0x0])?undefined:_0xe1fc34[_0xb83f('0x5d')]['to'][0x0]},client9002);})[_0xb83f('0x21')](function(){if(_0x5bb8be){if(_[_0xb83f('0xb0')](_0xe1fc34[_0xb83f('0x5d')][_0xb83f('0xb1')])){_0xe1fc34[_0xb83f('0x5d')][_0xb83f('0xb1')]=util[_0xb83f('0xa4')](_0xb83f('0xb2'),_0x5bb8be[_0xb83f('0x3e')],_0x5bb8be[_0xb83f('0xb3')]);}if(_0x5bb8be[_0xb83f('0xa8')]){if(_0x5bb8be['List'][_0xb83f('0xa9')]['length']){return _0x5bb8be[_0xb83f('0xa8')][_0xb83f('0xa9')][0x0];}else{return db[_0xb83f('0x74')]['create'](_[_0xb83f('0xb4')](_0xe1fc34[_0xb83f('0x5d')],{'firstName':_0xe1fc34[_0xb83f('0x5d')]['to'][0x0],'phone':_0xe1fc34['body']['to'][0x0],'fax':_0xe1fc34[_0xb83f('0x5d')]['to'][0x0],'ListId':_0x5bb8be[_0xb83f('0xa1')]}));}}else{throw new Error(_0xb83f('0xb5'));}}else{throw new Error(_0xb83f('0xb6'));}})['then'](function(_0x44cad2){if(_0x44cad2){return db[_0xb83f('0x70')]['find']({'where':{'ContactId':_0x44cad2['id'],'closed':![],'FaxAccountId':_0x5bb8be['id']}})[_0xb83f('0x21')](function(_0x50cdde){if(_0x50cdde){return[_0x50cdde,![]];}return db[_0xb83f('0x70')][_0xb83f('0x5c')]({'UserId':_0xe1fc34[_0xb83f('0x5f')]['id'],'ContactId':_0x44cad2['id'],'FaxAccountId':_0x5bb8be['id'],'fax':_0xe1fc34[_0xb83f('0x5d')]['to'][0x0],'firstMsgDirection':_0xb83f('0xb7'),'Messages':[_[_0xb83f('0x55')](_0xe1fc34[_0xb83f('0x5d')],{'read':![],'body':_0xe1fc34[_0xb83f('0x5d')][_0xb83f('0xab')][0x0][_0xb83f('0xb8')],'FaxAccountId':_0x5bb8be['id'],'UserId':_0xe1fc34[_0xb83f('0x5f')]['id'],'ContactId':_0x44cad2['id'],'AttachmentId':_0xe1fc34[_0xb83f('0x5d')][_0xb83f('0xab')][0x0]['id']})]},{'include':[{'model':db[_0xb83f('0xa6')],'as':_0xb83f('0xb9')}]})['then'](function(_0x101f7d){return[_0x101f7d,!![]];});});}else{throw new Error('Contact\x20not\x20found');}})[_0xb83f('0xba')](function(_0x5390c3,_0x239fd6){if(_0x239fd6){return _0x5390c3;}return db[_0xb83f('0xa6')]['create']({'direction':_0xb83f('0xb7'),'read':![],'body':_0xe1fc34[_0xb83f('0x5d')][_0xb83f('0xab')][0x0]['filename'],'FaxAccountId':_0x5bb8be['id'],'FaxInteractionId':_0x5390c3['id'],'UserId':_0xe1fc34[_0xb83f('0x5f')]['id'],'ContactId':_0x5390c3[_0xb83f('0xbb')],'AttachmentId':_0xe1fc34[_0xb83f('0x5d')][_0xb83f('0xab')][0x0]['id']})['then'](function(_0x12162d){_0x5390c3[_0xb83f('0xbc')][_0xb83f('0xb9')]=[];_0x5390c3[_0xb83f('0xbc')][_0xb83f('0xb9')][_0xb83f('0x95')](_0x12162d[_0xb83f('0xbc')]);return _0x5390c3;});})[_0xb83f('0x21')](function(_0x511d8c){respondWithRpcPromise(_0xb83f('0xbd'),_0xb83f('0xbd'),{'FaxAccountId':_[_0xb83f('0xb0')](_0xe1fc34['params']['id'])?undefined:_0xe1fc34[_0xb83f('0x62')]['id'],'path':_[_0xb83f('0xb0')](_0xe1fc34['body'][_0xb83f('0xab')][0x0][_0xb83f('0xaf')])?undefined:_0xe1fc34[_0xb83f('0x5d')][_0xb83f('0xab')][0x0]['path'],'fax':_[_0xb83f('0xb0')](_0xe1fc34['body']['to'][0x0])?undefined:_0xe1fc34[_0xb83f('0x5d')]['to'][0x0],'AttachmentId':_0xe1fc34[_0xb83f('0x5d')][_0xb83f('0xab')][0x0]['id']},client9002)[_0xb83f('0x21')](function(_0x15d940){logger[_0xb83f('0x22')](_0xb83f('0xbe'),_0x15d940);})['catch'](function(_0x4f8237){logger[_0xb83f('0x22')](_0xb83f('0xbe'),_0x4f8237);});return _0x511d8c;})[_0xb83f('0x21')](respondWithResult(_0xc88b2d,null))[_0xb83f('0x5b')](handleError(_0xc88b2d,null));};exports[_0xb83f('0xbf')]=function(_0x13d206,_0x377f63,_0x29e2aa){return db[_0xb83f('0x56')][_0xb83f('0x5a')]({'where':{'id':_0x13d206[_0xb83f('0x62')]['id']}})[_0xb83f('0x21')](handleEntityNotFound(_0x377f63,null))[_0xb83f('0x21')](function(_0x3d1a72){if(_0x3d1a72){return _0x3d1a72[_0xb83f('0xbf')](_0x13d206[_0xb83f('0x5d')][_0xb83f('0x72')],_[_0xb83f('0x71')](_0x13d206['body'],[_0xb83f('0x72'),'id'])||{})['spread'](function(_0x4a5d31){for(var _0x43a33e=0x0;_0x43a33e<_0x13d206['body'][_0xb83f('0x72')][_0xb83f('0x66')];_0x43a33e+=0x1){socket[_0xb83f('0xc0')]('userFaxAccount:save',{'UserId':Number(_0x13d206['body'][_0xb83f('0x72')][_0x43a33e]),'FaxAccountId':Number(_0x13d206[_0xb83f('0x62')]['id'])});}return _0x4a5d31;});}})[_0xb83f('0x21')](respondWithResult(_0x377f63,null))['catch'](handleError(_0x377f63,null));};exports['removeAgents']=function(_0x2af49a,_0x2778ea,_0xac60e5){return db[_0xb83f('0x56')][_0xb83f('0x5a')]({'where':{'id':_0x2af49a[_0xb83f('0x62')]['id']}})['then'](handleEntityNotFound(_0x2778ea,null))[_0xb83f('0x21')](function(_0x586d45){if(_0x586d45){return _0x586d45[_0xb83f('0xc1')](_0x2af49a[_0xb83f('0x48')][_0xb83f('0x72')])[_0xb83f('0x21')](function(){if(_[_0xb83f('0xc2')](_0x2af49a['query'][_0xb83f('0x72')])){for(var _0x16587a=0x0;_0x16587a<_0x2af49a[_0xb83f('0x48')][_0xb83f('0x72')]['length'];_0x16587a+=0x1){socket[_0xb83f('0xc0')](_0xb83f('0xc3'),{'UserId':Number(_0x2af49a['query']['ids'][_0x16587a]),'FaxAccountId':Number(_0x2af49a['params']['id'])});}}else{socket['emit'](_0xb83f('0xc3'),{'UserId':Number(_0x2af49a['query'][_0xb83f('0x72')]),'FaxAccountId':Number(_0x2af49a[_0xb83f('0x62')]['id'])});}});}})[_0xb83f('0x21')](respondWithStatusCode(_0x2778ea,null))[_0xb83f('0x5b')](handleError(_0x2778ea,null));};exports[_0xb83f('0xc4')]=function(_0x5c06a6,_0x23610,_0x157489){var _0x1c9f0c={};var _0x27568a={};var _0x3e7fc1;var _0x4b6c04;return db[_0xb83f('0x56')][_0xb83f('0x73')]({'where':{'id':_0x5c06a6[_0xb83f('0x62')]['id']}})[_0xb83f('0x21')](handleEntityNotFound(_0x23610,null))[_0xb83f('0x21')](function(_0x4394a8){if(_0x4394a8){_0x3e7fc1=_0x4394a8;_0x27568a[_0xb83f('0x46')]=_[_0xb83f('0x49')](db[_0xb83f('0x76')][_0xb83f('0x42')]);_0x27568a[_0xb83f('0x48')]=_['keys'](_0x5c06a6[_0xb83f('0x48')]);_0x27568a['filters']=_['intersection'](_0x27568a[_0xb83f('0x46')],_0x27568a['query']);_0x1c9f0c[_0xb83f('0x4d')]=_[_0xb83f('0x4b')](_0x27568a[_0xb83f('0x46')],qs['fields'](_0x5c06a6[_0xb83f('0x48')][_0xb83f('0x4c')]));_0x1c9f0c[_0xb83f('0x4d')]=_0x1c9f0c[_0xb83f('0x4d')][_0xb83f('0x66')]?_0x1c9f0c[_0xb83f('0x4d')]:_0x27568a[_0xb83f('0x46')];_0x1c9f0c['order']=qs[_0xb83f('0x51')](_0x5c06a6[_0xb83f('0x48')][_0xb83f('0x51')]);_0x1c9f0c[_0xb83f('0x52')]=qs[_0xb83f('0x4a')](_[_0xb83f('0x53')](_0x5c06a6['query'],_0x27568a['filters']));if(_0x5c06a6[_0xb83f('0x48')][_0xb83f('0x54')]){_0x1c9f0c[_0xb83f('0x52')]=_[_0xb83f('0x55')](_0x1c9f0c[_0xb83f('0x52')],{'$or':_[_0xb83f('0x47')](_0x1c9f0c[_0xb83f('0x4d')],function(_0x450b78){var _0x692f27={};_0x692f27[_0x450b78]={'$like':'%'+_0x5c06a6['query']['filter']+'%'};return _0x692f27;})});}_0x1c9f0c=_[_0xb83f('0x55')]({},_0x1c9f0c,_0x5c06a6['options']);return _0x3e7fc1['getAgents'](_0x1c9f0c);}})[_0xb83f('0x21')](function(_0x542b73){if(_0x542b73){_0x4b6c04=_0x542b73[_0xb83f('0x66')];if(!_0x5c06a6[_0xb83f('0x48')]['hasOwnProperty'](_0xb83f('0x4f'))){_0x1c9f0c[_0xb83f('0x30')]=qs[_0xb83f('0x30')](_0x5c06a6[_0xb83f('0x48')]['limit']);_0x1c9f0c[_0xb83f('0x2e')]=qs[_0xb83f('0x2e')](_0x5c06a6[_0xb83f('0x48')][_0xb83f('0x2e')]);}return _0x3e7fc1[_0xb83f('0xc4')](_0x1c9f0c);}})[_0xb83f('0x21')](function(_0x18adc1){if(_0x18adc1){return _0x18adc1?{'count':_0x4b6c04,'rows':_0x18adc1}:null;}})['then'](respondWithResult(_0x23610,null))['catch'](handleError(_0x23610,null));};
\ No newline at end of file
index da001a3..c743fbc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb7e7=['exports','events','../../mysqldb','emit','hasOwnProperty','hook'];(function(_0x3187ae,_0x2f035e){var _0x2daf10=function(_0x3e230a){while(--_0x3e230a){_0x3187ae['push'](_0x3187ae['shift']());}};_0x2daf10(++_0x2f035e);}(_0xb7e7,0x109));var _0x7b7e=function(_0x376b45,_0x5964fb){_0x376b45=_0x376b45-0x0;var _0x2341b3=_0xb7e7[_0x376b45];return _0x2341b3;};'use strict';var EventEmitter=require(_0x7b7e('0x0'));var FaxAccount=require(_0x7b7e('0x1'))['db']['FaxAccount'];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x31267a){return function(_0x1088cc,_0x14ee26,_0x72338a){FaxAccountEvents[_0x7b7e('0x2')](_0x31267a+':'+_0x1088cc['id'],_0x1088cc);FaxAccountEvents[_0x7b7e('0x2')](_0x31267a,_0x1088cc);_0x72338a(null);};}for(var e in events){if(events[_0x7b7e('0x3')](e)){var event=events[e];FaxAccount[_0x7b7e('0x4')](e,emitEvent(event));}}module[_0x7b7e('0x5')]=FaxAccountEvents;
\ No newline at end of file
+var _0x87cc=['remove','emit','hook','../../mysqldb','setMaxListeners'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x87cc,0xda));var _0xc87c=function(_0x1c539a,_0x4758ec){_0x1c539a=_0x1c539a-0x0;var _0x2351f5=_0x87cc[_0x1c539a];return _0x2351f5;};'use strict';var EventEmitter=require('events');var FaxAccount=require(_0xc87c('0x0'))['db']['FaxAccount'];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xc87c('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xc87c('0x2')};function emitEvent(_0x16789a){return function(_0x3b8c9a,_0x3a461e,_0x5a022d){FaxAccountEvents['emit'](_0x16789a+':'+_0x3b8c9a['id'],_0x3b8c9a);FaxAccountEvents[_0xc87c('0x3')](_0x16789a,_0x3b8c9a);_0x5a022d(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxAccount[_0xc87c('0x4')](e,emitEvent(event));}}module['exports']=FaxAccountEvents;
\ No newline at end of file
index 26d35ae..003cabf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x69f1=['../../config/environment','./faxAccount.attributes','fax_accounts','lodash','util','../../config/logger','api','moment','bluebird','path'];(function(_0x2f94e2,_0xd9ae9){var _0x5f3670=function(_0x45e285){while(--_0x45e285){_0x2f94e2['push'](_0x2f94e2['shift']());}};_0x5f3670(++_0xd9ae9);}(_0x69f1,0x1a7));var _0x169f=function(_0x172ff1,_0x5624f1){_0x172ff1=_0x172ff1-0x0;var _0x3d6e9c=_0x69f1[_0x172ff1];return _0x3d6e9c;};'use strict';var _=require(_0x169f('0x0'));var util=require(_0x169f('0x1'));var logger=require(_0x169f('0x2'))(_0x169f('0x3'));var moment=require(_0x169f('0x4'));var BPromise=require(_0x169f('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x169f('0x6'));var rimraf=require('rimraf');var config=require(_0x169f('0x7'));var attributes=require(_0x169f('0x8'));module['exports']=function(_0x70d448,_0x34b2a5){return _0x70d448['define']('FaxAccount',attributes,{'tableName':_0x169f('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x2787=['../../config/environment','./faxAccount.attributes','exports','define','FaxAccount','fax_accounts','lodash','util','../../config/logger','api','moment','bluebird','path'];(function(_0x13b4e4,_0x457758){var _0x28fcdc=function(_0x1cf690){while(--_0x1cf690){_0x13b4e4['push'](_0x13b4e4['shift']());}};_0x28fcdc(++_0x457758);}(_0x2787,0x124));var _0x7278=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x2787[_0x3947c9];return _0x2e7871;};'use strict';var _=require(_0x7278('0x0'));var util=require(_0x7278('0x1'));var logger=require(_0x7278('0x2'))(_0x7278('0x3'));var moment=require(_0x7278('0x4'));var BPromise=require(_0x7278('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x7278('0x6'));var rimraf=require('rimraf');var config=require(_0x7278('0x7'));var attributes=require(_0x7278('0x8'));module[_0x7278('0x9')]=function(_0x10fb7b,_0x4dc5fc){return _0x10fb7b[_0x7278('0xa')](_0x7278('0xb'),attributes,{'tableName':_0x7278('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 3519f13..3dcb384 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x95a6=['find','CmList','List','Contacts','DESC','FaxApplication','get','account','applications','Applications','list','orderBy','priority','asc','length','defaults','ListId','create','contact','FaxInteraction','Contact\x20not\x20found','autoclose','push','close','unmanaged','*,*,*,*','created','interaction','FaxMessage','ContactId','AttachmentId','UserId','User','name','unshift','agent','queueId','FaxQueue','queue','startRouting','lodash','util','bluebird','randomstring','ioredis','../../config/logger','rpc','jayson/promise','http','socket.io-emitter','redis','./faxAccount.socket','register','request','then','info','FaxAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','GetFaxAccount','FaxAccount','findAll','options','raw','limit','map','include','model','attributes','CmContact','Sequelize','ValidationError','no\x20available\x20attributes','difference','keys','createdAt','updatedAt','CompanyId','body','isNil','from','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey'];(function(_0x27b2b1,_0x23466d){var _0x44640e=function(_0x4e9adc){while(--_0x4e9adc){_0x27b2b1['push'](_0x27b2b1['shift']());}};_0x44640e(++_0x23466d);}(_0x95a6,0x13c));var _0x695a=function(_0x5d0a9a,_0x23792e){_0x5d0a9a=_0x5d0a9a-0x0;var _0x340ada=_0x95a6[_0x5d0a9a];return _0x340ada;};'use strict';var _=require(_0x695a('0x0'));var util=require(_0x695a('0x1'));var moment=require('moment');var BPromise=require(_0x695a('0x2'));var rs=require(_0x695a('0x3'));var fs=require('fs');var Redis=require(_0x695a('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x695a('0x5'))(_0x695a('0x6'));var config=require('../../config/environment');var jayson=require(_0x695a('0x7'));var client=jayson['client'][_0x695a('0x8')]({'port':0x232c});config['redis']=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x695a('0x9'))(new Redis(config[_0x695a('0xa')]));require(_0x695a('0xb'))[_0x695a('0xc')](socket);function respondWithRpcPromise(_0xbb81a5,_0x2e47a5,_0x5e09d1){return new BPromise(function(_0x4fca11,_0x15c113){return client[_0x695a('0xd')](_0xbb81a5,_0x5e09d1)[_0x695a('0xe')](function(_0x2b9f3f){logger[_0x695a('0xf')](_0x695a('0x10'),_0x2e47a5,_0x695a('0x11'));logger[_0x695a('0x12')]('FaxAccount,\x20%s,\x20%s,\x20%s',_0x2e47a5,'request\x20sent',JSON[_0x695a('0x13')](_0x2b9f3f));if(_0x2b9f3f[_0x695a('0x14')]){if(_0x2b9f3f[_0x695a('0x14')][_0x695a('0x15')]===0x1f4){logger[_0x695a('0x14')](_0x695a('0x10'),_0x2e47a5,_0x2b9f3f[_0x695a('0x14')][_0x695a('0x16')]);return _0x15c113(_0x2b9f3f[_0x695a('0x14')]['message']);}logger['error'](_0x695a('0x10'),_0x2e47a5,_0x2b9f3f[_0x695a('0x14')][_0x695a('0x16')]);return _0x4fca11(_0x2b9f3f[_0x695a('0x14')]['message']);}else{logger[_0x695a('0xf')]('FaxAccount,\x20%s,\x20%s',_0x2e47a5,_0x695a('0x11'));_0x4fca11(_0x2b9f3f[_0x695a('0x17')]['message']);}})[_0x695a('0x18')](function(_0x2af595){logger[_0x695a('0x14')]('FaxAccount,\x20%s,\x20%s',_0x2e47a5,_0x2af595);_0x15c113(_0x2af595);});});}exports[_0x695a('0x19')]=function(_0x346828){var _0xd26442=this;return new Promise(function(_0x1b6435,_0x1d0efc){return db[_0x695a('0x1a')][_0x695a('0x1b')]({'raw':_0x346828[_0x695a('0x1c')]?_0x346828[_0x695a('0x1c')][_0x695a('0x1d')]===undefined?!![]:![]:!![],'where':_0x346828[_0x695a('0x1c')]?_0x346828[_0x695a('0x1c')]['where']||null:null,'attributes':_0x346828[_0x695a('0x1c')]?_0x346828[_0x695a('0x1c')]['attributes']||null:null,'limit':_0x346828[_0x695a('0x1c')]?_0x346828[_0x695a('0x1c')][_0x695a('0x1e')]||null:null,'include':_0x346828[_0x695a('0x1c')]?_0x346828[_0x695a('0x1c')]['include']?_[_0x695a('0x1f')](_0x346828[_0x695a('0x1c')][_0x695a('0x20')],function(_0x2ce238){return{'model':db[_0x2ce238[_0x695a('0x21')]],'as':_0x2ce238['as'],'attributes':_0x2ce238[_0x695a('0x22')],'include':_0x2ce238[_0x695a('0x20')]?_[_0x695a('0x1f')](_0x2ce238['include'],function(_0x3508dc){return{'model':db[_0x3508dc[_0x695a('0x21')]],'as':_0x3508dc['as'],'attributes':_0x3508dc['attributes'],'include':_0x3508dc[_0x695a('0x20')]?_[_0x695a('0x1f')](_0x3508dc[_0x695a('0x20')],function(_0x587261){return{'model':db[_0x587261[_0x695a('0x21')]],'as':_0x587261['as'],'attributes':_0x587261[_0x695a('0x22')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x3e0c83){logger[_0x695a('0xf')](_0x695a('0x19'),_0x346828);logger[_0x695a('0x12')](_0x695a('0x19'),_0x346828,JSON[_0x695a('0x13')](_0x3e0c83));_0x1b6435(_0x3e0c83);})[_0x695a('0x18')](function(_0x43d3a1){logger[_0x695a('0x14')](_0x695a('0x19'),_0x43d3a1[_0x695a('0x16')],_0x346828);_0x1d0efc(_0xd26442[_0x695a('0x14')](0x1f4,_0x43d3a1['message']));});});};exports['NotifyFaxAccount']=function(_0xf67f0,_0xd6ed0f,_0x5cafcb){var _0x3d1e11=this;return new Promise(function(_0x55df3f,_0xce6ed4){var _0xd60d30={'body':_0xf67f0['body'],'channel':'fax'};var _0x2d0a09=[];var _0x39d4d9=[];var _0x40c29d={};return db[_0x695a('0x23')]['describe']()[_0x695a('0xe')](function(_0xadfd2e){if(!_0xadfd2e){throw new db[(_0x695a('0x24'))][(_0x695a('0x25'))](_0x695a('0x26'));}_0x2d0a09=_[_0x695a('0x27')](_[_0x695a('0x28')](_0xadfd2e),[_0x695a('0x29'),_0x695a('0x2a')]);_0x39d4d9=_[_0x695a('0x27')](_[_0x695a('0x28')](_0xadfd2e),['createdAt',_0x695a('0x2a'),_0x695a('0x2b'),'ListId']);if(_0xf67f0[_0x695a('0x2c')]['id']){delete _0xf67f0['body']['id'];}if(_[_0x695a('0x2d')](_0xf67f0[_0x695a('0x2c')][_0x695a('0x2e')])){throw new db[(_0x695a('0x24'))][(_0x695a('0x25'))](_0x695a('0x2f'));}if(_[_0x695a('0x2d')](_0xf67f0[_0x695a('0x2c')]['body'])||_0xf67f0['body'][_0x695a('0x2c')]===''){throw new db[(_0x695a('0x24'))]['ValidationError'](_0x695a('0x30'));}if(_[_0x695a('0x2d')](_0xf67f0[_0x695a('0x2c')]['mapKey'])){throw new db[(_0x695a('0x24'))][(_0x695a('0x25'))](_0x695a('0x31')+_0x39d4d9);}if(!_[_0x695a('0x32')](_0x39d4d9,_0xf67f0['body'][_0x695a('0x33')])){throw new db['Sequelize'][(_0x695a('0x25'))]('mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x39d4d9);}_0x40c29d[_0xf67f0[_0x695a('0x2c')]['mapKey']]=_0xf67f0[_0x695a('0x2c')][_0x695a('0x2e')];})[_0x695a('0xe')](function(){return db[_0x695a('0x1a')][_0x695a('0x34')]({'where':{'id':_0xf67f0['account']['id']},'include':[{'model':db[_0x695a('0x35')],'as':_0x695a('0x36'),'include':[{'model':db[_0x695a('0x23')],'as':_0x695a('0x37'),'where':_0x40c29d,'limit':0x1,'order':[[_0x695a('0x2a'),_0x695a('0x38')]]}]},{'model':db[_0x695a('0x39')],'as':'Applications'}]});})['then'](function(_0x21f778){if(_0x21f778&&_0x21f778['List']){var _0x1cebe1=_0x21f778[_0x695a('0x3a')]({'plain':!![]});_0xd60d30[_0x695a('0x3b')]=_0x1cebe1;_0xd60d30[_0x695a('0x3c')]=_0x1cebe1[_0x695a('0x3d')];_0xd60d30[_0x695a('0x3e')]=_0x1cebe1[_0x695a('0x36')];_0xd60d30[_0x695a('0x3c')]=_[_0x695a('0x3f')](_0xd60d30['applications'],[_0x695a('0x40')],[_0x695a('0x41')]);if(_0xd60d30[_0x695a('0x3b')]['Applications']){delete _0xd60d30['account'][_0x695a('0x3d')];}if(_0xd60d30[_0x695a('0x3b')][_0x695a('0x36')]&&_0xd60d30[_0x695a('0x3b')][_0x695a('0x36')][_0x695a('0x37')][_0x695a('0x42')]){return _0xd60d30[_0x695a('0x3b')]['List'][_0x695a('0x37')][0x0];}var _0x4a7996=_[_0x695a('0x43')](_0xf67f0[_0x695a('0x2c')],{'firstName':_0xf67f0[_0x695a('0x2c')][_0x695a('0x2e')],'ListId':_0x1cebe1[_0x695a('0x44')]});_0x4a7996[_0xf67f0['body'][_0x695a('0x33')]]=_0xf67f0[_0x695a('0x2c')][_0x695a('0x2e')];return db[_0x695a('0x23')][_0x695a('0x45')](_0x4a7996,{'fields':_0x2d0a09,'raw':!![]});}})[_0x695a('0xe')](function(_0x4ed560){_0xd60d30[_0x695a('0x46')]=_0x4ed560;if(_0x4ed560){var _0x502b13={'ContactId':_0x4ed560['id'],'FaxAccountId':_0xf67f0['account']['id'],'fax':_0x4ed560['fax']};return db['FaxInteraction'][_0x695a('0x34')]({'where':{'ContactId':_0x4ed560['id'],'closed':![],'FaxAccountId':_0xf67f0[_0x695a('0x3b')]['id']}})[_0x695a('0xe')](function(_0x3fb68a){if(_0x3fb68a){return[_0x3fb68a,![]];}return db[_0x695a('0x47')][_0x695a('0x45')](_0x502b13)[_0x695a('0xe')](function(_0x73acd6){return[_0x73acd6,!![]];});});}else{throw new Error(_0x695a('0x48'));}})['spread'](function(_0x3f904f,_0x4e078a){var _0x34a598=_0x3f904f[_0x695a('0x3a')]({'plain':!![]});if(_0x4e078a){if(_0xd60d30[_0x695a('0x3b')][_0x695a('0x49')]){_0xd60d30[_0x695a('0x3c')][_0x695a('0x4a')]({'id':0x0,'priority':_0xd60d30['applications'][_0x695a('0x42')]+0x1,'app':_0x695a('0x4b'),'appdata':_0x695a('0x4c'),'interval':_0x695a('0x4d')});}_0x34a598[_0x695a('0x4e')]=!![];}else{_0x34a598[_0x695a('0x4e')]=![];}_0xd60d30[_0x695a('0x4f')]=_0x34a598;return db[_0x695a('0x50')][_0x695a('0x45')]({'body':_0xf67f0['body'][_0x695a('0x2c')],'FaxAccountId':_0xf67f0[_0x695a('0x3b')]['id'],'FaxInteractionId':_0x3f904f['id'],'direction':'in','ContactId':_0x3f904f[_0x695a('0x51')],'AttachmentId':_0xf67f0[_0x695a('0x2c')][_0x695a('0x52')]});})['then'](function(_0x2bb2b5){_0xd60d30[_0x695a('0x16')]=_0x2bb2b5;if(!_0xd60d30[_0x695a('0x4f')][_0x695a('0x53')])return;return db[_0x695a('0x54')]['find']({'attributes':['id',_0x695a('0x55')],'where':{'id':_0xd60d30[_0x695a('0x4f')][_0x695a('0x53')]}});})[_0x695a('0xe')](function(_0x5bc0a7){if(_0x5bc0a7){_0xd60d30[_0x695a('0x3c')][_0x695a('0x56')]({'id':0x0,'priority':0x0,'app':_0x695a('0x57'),'appdata':_0x5bc0a7[_0x695a('0x55')]+','+(_0xd60d30[_0x695a('0x3b')]['waitForTheAssignedAgent']||0xa),'interval':'*,*,*,*'});}if(!_0xd60d30[_0x695a('0x4f')][_0x695a('0x58')])return;return db[_0x695a('0x59')]['find']({'attributes':['id','name'],'where':{'id':_0xd60d30[_0x695a('0x4f')]['queueId']}});})[_0x695a('0xe')](function(_0x395fd4){if(_0x395fd4){_0xd60d30[_0x695a('0x3c')][_0x695a('0x56')]({'id':0x0,'priority':0x1,'app':_0x695a('0x5a'),'appdata':_0x395fd4[_0x695a('0x55')]+','+(_0xd60d30[_0x695a('0x3b')]['waitForTheAssignedQueue']||0x12c),'interval':'*,*,*,*'});}return respondWithRpcPromise('Start',_0x695a('0x5b'),_0xd60d30);})['then'](function(_0x584192){_0x55df3f(_0x584192);})[_0x695a('0x18')](function(_0x1dee8b){_0xce6ed4(_0x3d1e11[_0x695a('0x14')](0x1f4,_0x1dee8b[_0x695a('0x16')]));});});};
\ No newline at end of file
+var _0x29aa=['asc','Contacts','length','create','FaxInteraction','spread','autoclose','push','close','unmanaged','*,*,*,*','created','FaxMessage','AttachmentId','interaction','UserId','User','unshift','agent','name','waitForTheAssignedAgent','queueId','FaxQueue','waitForTheAssignedQueue','Start','startRouting','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','localhost','socket.io-emitter','redis','./faxAccount.socket','request','then','request\x20sent','debug','FaxAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','FaxAccount,\x20%s,\x20%s','info','result','catch','options','where','attributes','limit','map','include','model','GetFaxAccount','fax','CmContact','ValidationError','no\x20available\x20attributes','difference','keys','createdAt','updatedAt','ListId','body','Sequelize','from\x20is\x20mandatory','isNil','mapKey','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','from','find','account','CmList','DESC','Applications','List','get','list','applications','orderBy','priority'];(function(_0xf26c2e,_0x56c3ea){var _0x46ecb4=function(_0x1be516){while(--_0x1be516){_0xf26c2e['push'](_0xf26c2e['shift']());}};_0x46ecb4(++_0x56c3ea);}(_0x29aa,0x74));var _0xa29a=function(_0x5b6077,_0x5a0ac7){_0x5b6077=_0x5b6077-0x0;var _0xad5f4b=_0x29aa[_0x5b6077];return _0xad5f4b;};'use strict';var _=require(_0xa29a('0x0'));var util=require(_0xa29a('0x1'));var moment=require('moment');var BPromise=require(_0xa29a('0x2'));var rs=require(_0xa29a('0x3'));var fs=require('fs');var Redis=require(_0xa29a('0x4'));var db=require(_0xa29a('0x5'))['db'];var utils=require(_0xa29a('0x6'));var logger=require(_0xa29a('0x7'))(_0xa29a('0x8'));var config=require('../../config/environment');var jayson=require(_0xa29a('0x9'));var client=jayson['client'][_0xa29a('0xa')]({'port':0x232c});config['redis']=_['defaults'](config['redis'],{'host':_0xa29a('0xb'),'port':0x18eb});var socket=require(_0xa29a('0xc'))(new Redis(config[_0xa29a('0xd')]));require(_0xa29a('0xe'))['register'](socket);function respondWithRpcPromise(_0x12fdde,_0x4cb322,_0x45b942){return new BPromise(function(_0x335bff,_0xc9e2ad){return client[_0xa29a('0xf')](_0x12fdde,_0x45b942)[_0xa29a('0x10')](function(_0x2e37eb){logger['info']('FaxAccount,\x20%s,\x20%s',_0x4cb322,_0xa29a('0x11'));logger[_0xa29a('0x12')](_0xa29a('0x13'),_0x4cb322,'request\x20sent',JSON[_0xa29a('0x14')](_0x2e37eb));if(_0x2e37eb[_0xa29a('0x15')]){if(_0x2e37eb[_0xa29a('0x15')][_0xa29a('0x16')]===0x1f4){logger[_0xa29a('0x15')]('FaxAccount,\x20%s,\x20%s',_0x4cb322,_0x2e37eb[_0xa29a('0x15')][_0xa29a('0x17')]);return _0xc9e2ad(_0x2e37eb[_0xa29a('0x15')][_0xa29a('0x17')]);}logger[_0xa29a('0x15')](_0xa29a('0x18'),_0x4cb322,_0x2e37eb[_0xa29a('0x15')][_0xa29a('0x17')]);return _0x335bff(_0x2e37eb[_0xa29a('0x15')][_0xa29a('0x17')]);}else{logger[_0xa29a('0x19')](_0xa29a('0x18'),_0x4cb322,_0xa29a('0x11'));_0x335bff(_0x2e37eb[_0xa29a('0x1a')][_0xa29a('0x17')]);}})[_0xa29a('0x1b')](function(_0x56ecb3){logger[_0xa29a('0x15')]('FaxAccount,\x20%s,\x20%s',_0x4cb322,_0x56ecb3);_0xc9e2ad(_0x56ecb3);});});}exports['GetFaxAccount']=function(_0x1f61e5){var _0x13acde=this;return new Promise(function(_0xcb6b16,_0x4917f9){return db['FaxAccount']['findAll']({'raw':_0x1f61e5[_0xa29a('0x1c')]?_0x1f61e5[_0xa29a('0x1c')]['raw']===undefined?!![]:![]:!![],'where':_0x1f61e5[_0xa29a('0x1c')]?_0x1f61e5[_0xa29a('0x1c')][_0xa29a('0x1d')]||null:null,'attributes':_0x1f61e5[_0xa29a('0x1c')]?_0x1f61e5[_0xa29a('0x1c')][_0xa29a('0x1e')]||null:null,'limit':_0x1f61e5['options']?_0x1f61e5[_0xa29a('0x1c')][_0xa29a('0x1f')]||null:null,'include':_0x1f61e5[_0xa29a('0x1c')]?_0x1f61e5[_0xa29a('0x1c')]['include']?_[_0xa29a('0x20')](_0x1f61e5['options'][_0xa29a('0x21')],function(_0x30fc6c){return{'model':db[_0x30fc6c['model']],'as':_0x30fc6c['as'],'attributes':_0x30fc6c[_0xa29a('0x1e')],'include':_0x30fc6c[_0xa29a('0x21')]?_[_0xa29a('0x20')](_0x30fc6c[_0xa29a('0x21')],function(_0x8fc68d){return{'model':db[_0x8fc68d[_0xa29a('0x22')]],'as':_0x8fc68d['as'],'attributes':_0x8fc68d['attributes'],'include':_0x8fc68d[_0xa29a('0x21')]?_[_0xa29a('0x20')](_0x8fc68d[_0xa29a('0x21')],function(_0x5c8ad0){return{'model':db[_0x5c8ad0[_0xa29a('0x22')]],'as':_0x5c8ad0['as'],'attributes':_0x5c8ad0[_0xa29a('0x1e')]};}):[]};}):[]};}):[]:[]})[_0xa29a('0x10')](function(_0x5bb2b4){logger[_0xa29a('0x19')](_0xa29a('0x23'),_0x1f61e5);logger[_0xa29a('0x12')](_0xa29a('0x23'),_0x1f61e5,JSON[_0xa29a('0x14')](_0x5bb2b4));_0xcb6b16(_0x5bb2b4);})[_0xa29a('0x1b')](function(_0x4895a9){logger[_0xa29a('0x15')](_0xa29a('0x23'),_0x4895a9[_0xa29a('0x17')],_0x1f61e5);_0x4917f9(_0x13acde[_0xa29a('0x15')](0x1f4,_0x4895a9[_0xa29a('0x17')]));});});};exports['NotifyFaxAccount']=function(_0x34770e,_0x794321,_0x4f64dc){var _0x410e86=this;return new Promise(function(_0x3dd6dd,_0x346407){var _0x481db7={'body':_0x34770e['body'],'channel':_0xa29a('0x24')};var _0x2c2aaf=[];var _0x2bbb60=[];var _0x18c679={};return db[_0xa29a('0x25')]['describe']()[_0xa29a('0x10')](function(_0x111a06){if(!_0x111a06){throw new db['Sequelize'][(_0xa29a('0x26'))](_0xa29a('0x27'));}_0x2c2aaf=_[_0xa29a('0x28')](_[_0xa29a('0x29')](_0x111a06),[_0xa29a('0x2a'),_0xa29a('0x2b')]);_0x2bbb60=_[_0xa29a('0x28')](_[_0xa29a('0x29')](_0x111a06),[_0xa29a('0x2a'),_0xa29a('0x2b'),'CompanyId',_0xa29a('0x2c')]);if(_0x34770e[_0xa29a('0x2d')]['id']){delete _0x34770e['body']['id'];}if(_['isNil'](_0x34770e['body']['from'])){throw new db[(_0xa29a('0x2e'))][(_0xa29a('0x26'))](_0xa29a('0x2f'));}if(_[_0xa29a('0x30')](_0x34770e[_0xa29a('0x2d')][_0xa29a('0x2d')])||_0x34770e['body'][_0xa29a('0x2d')]===''){throw new db['Sequelize']['ValidationError']('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0xa29a('0x30')](_0x34770e[_0xa29a('0x2d')][_0xa29a('0x31')])){throw new db['Sequelize'][(_0xa29a('0x26'))]('mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x2bbb60);}if(!_[_0xa29a('0x32')](_0x2bbb60,_0x34770e[_0xa29a('0x2d')]['mapKey'])){throw new db[(_0xa29a('0x2e'))][(_0xa29a('0x26'))](_0xa29a('0x33')+_0x2bbb60);}_0x18c679[_0x34770e[_0xa29a('0x2d')][_0xa29a('0x31')]]=_0x34770e[_0xa29a('0x2d')][_0xa29a('0x34')];})[_0xa29a('0x10')](function(){return db['FaxAccount'][_0xa29a('0x35')]({'where':{'id':_0x34770e[_0xa29a('0x36')]['id']},'include':[{'model':db[_0xa29a('0x37')],'as':'List','include':[{'model':db['CmContact'],'as':'Contacts','where':_0x18c679,'limit':0x1,'order':[[_0xa29a('0x2b'),_0xa29a('0x38')]]}]},{'model':db['FaxApplication'],'as':_0xa29a('0x39')}]});})['then'](function(_0x31f37b){if(_0x31f37b&&_0x31f37b[_0xa29a('0x3a')]){var _0x18fb49=_0x31f37b[_0xa29a('0x3b')]({'plain':!![]});_0x481db7[_0xa29a('0x36')]=_0x18fb49;_0x481db7['applications']=_0x18fb49['Applications'];_0x481db7[_0xa29a('0x3c')]=_0x18fb49[_0xa29a('0x3a')];_0x481db7[_0xa29a('0x3d')]=_[_0xa29a('0x3e')](_0x481db7[_0xa29a('0x3d')],[_0xa29a('0x3f')],[_0xa29a('0x40')]);if(_0x481db7[_0xa29a('0x36')][_0xa29a('0x39')]){delete _0x481db7[_0xa29a('0x36')]['Applications'];}if(_0x481db7['account'][_0xa29a('0x3a')]&&_0x481db7[_0xa29a('0x36')][_0xa29a('0x3a')][_0xa29a('0x41')][_0xa29a('0x42')]){return _0x481db7[_0xa29a('0x36')][_0xa29a('0x3a')][_0xa29a('0x41')][0x0];}var _0xaeeaf9=_['defaults'](_0x34770e[_0xa29a('0x2d')],{'firstName':_0x34770e['body'][_0xa29a('0x34')],'ListId':_0x18fb49[_0xa29a('0x2c')]});_0xaeeaf9[_0x34770e['body']['mapKey']]=_0x34770e[_0xa29a('0x2d')][_0xa29a('0x34')];return db[_0xa29a('0x25')][_0xa29a('0x43')](_0xaeeaf9,{'fields':_0x2c2aaf,'raw':!![]});}})[_0xa29a('0x10')](function(_0x22bf4f){_0x481db7['contact']=_0x22bf4f;if(_0x22bf4f){var _0x52500b={'ContactId':_0x22bf4f['id'],'FaxAccountId':_0x34770e[_0xa29a('0x36')]['id'],'fax':_0x22bf4f[_0xa29a('0x24')]};return db[_0xa29a('0x44')]['find']({'where':{'ContactId':_0x22bf4f['id'],'closed':![],'FaxAccountId':_0x34770e[_0xa29a('0x36')]['id']}})['then'](function(_0x177863){if(_0x177863){return[_0x177863,![]];}return db[_0xa29a('0x44')][_0xa29a('0x43')](_0x52500b)['then'](function(_0x4201a3){return[_0x4201a3,!![]];});});}else{throw new Error('Contact\x20not\x20found');}})[_0xa29a('0x45')](function(_0x42790e,_0x2aac07){var _0x2c6fe6=_0x42790e[_0xa29a('0x3b')]({'plain':!![]});if(_0x2aac07){if(_0x481db7[_0xa29a('0x36')][_0xa29a('0x46')]){_0x481db7[_0xa29a('0x3d')][_0xa29a('0x47')]({'id':0x0,'priority':_0x481db7[_0xa29a('0x3d')][_0xa29a('0x42')]+0x1,'app':_0xa29a('0x48'),'appdata':_0xa29a('0x49'),'interval':_0xa29a('0x4a')});}_0x2c6fe6['created']=!![];}else{_0x2c6fe6[_0xa29a('0x4b')]=![];}_0x481db7['interaction']=_0x2c6fe6;return db[_0xa29a('0x4c')][_0xa29a('0x43')]({'body':_0x34770e[_0xa29a('0x2d')][_0xa29a('0x2d')],'FaxAccountId':_0x34770e[_0xa29a('0x36')]['id'],'FaxInteractionId':_0x42790e['id'],'direction':'in','ContactId':_0x42790e['ContactId'],'AttachmentId':_0x34770e[_0xa29a('0x2d')][_0xa29a('0x4d')]});})['then'](function(_0x413d6b){_0x481db7['message']=_0x413d6b;if(!_0x481db7[_0xa29a('0x4e')][_0xa29a('0x4f')])return;return db[_0xa29a('0x50')]['find']({'attributes':['id','name'],'where':{'id':_0x481db7[_0xa29a('0x4e')][_0xa29a('0x4f')]}});})[_0xa29a('0x10')](function(_0xe66ca3){if(_0xe66ca3){_0x481db7[_0xa29a('0x3d')][_0xa29a('0x51')]({'id':0x0,'priority':0x0,'app':_0xa29a('0x52'),'appdata':_0xe66ca3[_0xa29a('0x53')]+','+(_0x481db7[_0xa29a('0x36')][_0xa29a('0x54')]||0xa),'interval':_0xa29a('0x4a')});}if(!_0x481db7[_0xa29a('0x4e')][_0xa29a('0x55')])return;return db[_0xa29a('0x56')][_0xa29a('0x35')]({'attributes':['id',_0xa29a('0x53')],'where':{'id':_0x481db7['interaction'][_0xa29a('0x55')]}});})[_0xa29a('0x10')](function(_0x378c6d){if(_0x378c6d){_0x481db7[_0xa29a('0x3d')]['unshift']({'id':0x0,'priority':0x1,'app':'queue','appdata':_0x378c6d['name']+','+(_0x481db7[_0xa29a('0x36')][_0xa29a('0x57')]||0x12c),'interval':'*,*,*,*'});}return respondWithRpcPromise(_0xa29a('0x58'),_0xa29a('0x59'),_0x481db7);})['then'](function(_0x43df94){_0x3dd6dd(_0x43df94);})[_0xa29a('0x1b')](function(_0x53a0be){_0x346407(_0x410e86['error'](0x1f4,_0x53a0be[_0xa29a('0x17')]));});});};
\ No newline at end of file
index 22b4fce..673812e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9108=['remove','removeListener','register','length','faxAccount:','./faxAccount.events','save'];(function(_0x1daf4b,_0x135cef){var _0x223165=function(_0x28adc4){while(--_0x28adc4){_0x1daf4b['push'](_0x1daf4b['shift']());}};_0x223165(++_0x135cef);}(_0x9108,0x1be));var _0x8910=function(_0x584f63,_0x5e708e){_0x584f63=_0x584f63-0x0;var _0x1a3e9b=_0x9108[_0x584f63];return _0x1a3e9b;};'use strict';var FaxAccountEvents=require(_0x8910('0x0'));var events=[_0x8910('0x1'),_0x8910('0x2'),'update'];function createListener(_0x538286,_0xa19cea){return function(_0x3fd905){_0xa19cea['emit'](_0x538286,_0x3fd905);};}function removeListener(_0x111a10,_0x1b4470){return function(){FaxAccountEvents[_0x8910('0x3')](_0x111a10,_0x1b4470);};}exports[_0x8910('0x4')]=function(_0x1296ed){for(var _0xe544a2=0x0,_0x277894=events[_0x8910('0x5')];_0xe544a2<_0x277894;_0xe544a2++){var _0x59cc98=events[_0xe544a2];var _0x30e3c6=createListener(_0x8910('0x6')+_0x59cc98,_0x1296ed);FaxAccountEvents['on'](_0x59cc98,_0x30e3c6);}};
\ No newline at end of file
+var _0x6859=['removeListener','length','faxAccount:','remove','update','emit'];(function(_0x58c20f,_0x4cdb1b){var _0x3b0318=function(_0x36fa84){while(--_0x36fa84){_0x58c20f['push'](_0x58c20f['shift']());}};_0x3b0318(++_0x4cdb1b);}(_0x6859,0x1e9));var _0x9685=function(_0x36ed48,_0x1ee0d4){_0x36ed48=_0x36ed48-0x0;var _0x51c63a=_0x6859[_0x36ed48];return _0x51c63a;};'use strict';var FaxAccountEvents=require('./faxAccount.events');var events=['save',_0x9685('0x0'),_0x9685('0x1')];function createListener(_0x514c18,_0x101042){return function(_0x5bff85){_0x101042[_0x9685('0x2')](_0x514c18,_0x5bff85);};}function removeListener(_0x3b8224,_0x40e307){return function(){FaxAccountEvents[_0x9685('0x3')](_0x3b8224,_0x40e307);};}exports['register']=function(_0x4a0adb){for(var _0x40fd98=0x0,_0xcd87d7=events[_0x9685('0x4')];_0x40fd98<_0xcd87d7;_0x40fd98++){var _0x25312f=events[_0x40fd98];var _0xde6b03=createListener(_0x9685('0x5')+_0x25312f,_0x4a0adb);FaxAccountEvents['on'](_0x25312f,_0xde6b03);}};
\ No newline at end of file
index 60b2841..aa47efb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9bc8=['/:id/applications','addApplications','addAccountApplications','/updateaccountapplications','updateAccountApplications','/:id/send','send','/:id/users','put','update','delete','destroy','/:id/canned_answers','removeAnswers','exports','multer','util','connect-timeout','Router','../../components/auth/service','../../config/environment','./faxAccount.controller','get','isAuthenticated','index','/describe','describe','/:id','show','getAnswers','getApplications','/:id/messages','getMessages','post','create','/:id/dispositions','addAnswer','/:id/interactions'];(function(_0x408447,_0x37d8a8){var _0x3ad30d=function(_0x1eb85c){while(--_0x1eb85c){_0x408447['push'](_0x408447['shift']());}};_0x3ad30d(++_0x37d8a8);}(_0x9bc8,0x81));var _0x89bc=function(_0x17a464,_0x4084f4){_0x17a464=_0x17a464-0x0;var _0x343d5a=_0x9bc8[_0x17a464];return _0x343d5a;};'use strict';var multer=require(_0x89bc('0x0'));var util=require(_0x89bc('0x1'));var path=require('path');var timeout=require(_0x89bc('0x2'));var express=require('express');var router=express[_0x89bc('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x89bc('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x89bc('0x5'));var controller=require(_0x89bc('0x6'));router[_0x89bc('0x7')]('/',auth[_0x89bc('0x8')](),controller[_0x89bc('0x9')]);router[_0x89bc('0x7')](_0x89bc('0xa'),auth[_0x89bc('0x8')](),controller[_0x89bc('0xb')]);router[_0x89bc('0x7')](_0x89bc('0xc'),auth[_0x89bc('0x8')](),controller[_0x89bc('0xd')]);router[_0x89bc('0x7')]('/:id/dispositions',auth[_0x89bc('0x8')](),controller['getDispositions']);router[_0x89bc('0x7')]('/:id/canned_answers',auth[_0x89bc('0x8')](),controller[_0x89bc('0xe')]);router['get']('/:id/interactions',auth[_0x89bc('0x8')](),controller['getInteractions']);router[_0x89bc('0x7')]('/:id/applications',auth['isAuthenticated'](),controller[_0x89bc('0xf')]);router[_0x89bc('0x7')](_0x89bc('0x10'),auth[_0x89bc('0x8')](),controller[_0x89bc('0x11')]);router[_0x89bc('0x7')]('/:id/users',auth['isAuthenticated'](),controller['getAgents']);router[_0x89bc('0x12')]('/',auth[_0x89bc('0x8')](),controller[_0x89bc('0x13')]);router[_0x89bc('0x12')](_0x89bc('0x14'),auth['isAuthenticated'](),controller['addDisposition']);router['post']('/:id/canned_answers',auth['isAuthenticated'](),controller[_0x89bc('0x15')]);router[_0x89bc('0x12')](_0x89bc('0x16'),auth['isAuthenticated'](),controller['addInteraction']);router['post'](_0x89bc('0x17'),auth[_0x89bc('0x8')](),controller[_0x89bc('0x18')]);router['post']('/addaccountapplications',auth[_0x89bc('0x8')](),controller[_0x89bc('0x19')]);router['post'](_0x89bc('0x1a'),auth['isAuthenticated'](),controller[_0x89bc('0x1b')]);router[_0x89bc('0x12')](_0x89bc('0x1c'),auth[_0x89bc('0x8')](),controller[_0x89bc('0x1d')]);router[_0x89bc('0x12')](_0x89bc('0x1e'),auth[_0x89bc('0x8')](),controller['addAgents']);router[_0x89bc('0x1f')](_0x89bc('0xc'),auth[_0x89bc('0x8')](),controller[_0x89bc('0x20')]);router[_0x89bc('0x21')](_0x89bc('0xc'),auth[_0x89bc('0x8')](),controller[_0x89bc('0x22')]);router['delete'](_0x89bc('0x14'),auth[_0x89bc('0x8')](),controller['removeDispositions']);router[_0x89bc('0x21')](_0x89bc('0x23'),auth[_0x89bc('0x8')](),controller[_0x89bc('0x24')]);router[_0x89bc('0x21')]('/:id/users',auth[_0x89bc('0x8')](),controller['removeAgents']);module[_0x89bc('0x25')]=router;
\ No newline at end of file
+var _0xa995=['isAuthenticated','show','/:id/dispositions','getDispositions','getAnswers','/:id/interactions','/:id/applications','getApplications','/:id/messages','getMessages','create','post','addDisposition','/:id/canned_answers','addAnswer','addInteraction','addApplications','/addaccountapplications','addAccountApplications','/updateaccountapplications','send','/:id/users','addAgents','put','/:id','update','delete','removeDispositions','removeAgents','exports','util','path','express','Router','fs-extra','../../components/auth/service','../../config/environment','./faxAccount.controller','get','index','/describe','describe'];(function(_0x54e552,_0x1216d6){var _0x5e18cb=function(_0x5148b3){while(--_0x5148b3){_0x54e552['push'](_0x54e552['shift']());}};_0x5e18cb(++_0x1216d6);}(_0xa995,0x144));var _0x5a99=function(_0x26fd0a,_0x3c08d2){_0x26fd0a=_0x26fd0a-0x0;var _0x126fa2=_0xa995[_0x26fd0a];return _0x126fa2;};'use strict';var multer=require('multer');var util=require(_0x5a99('0x0'));var path=require(_0x5a99('0x1'));var timeout=require('connect-timeout');var express=require(_0x5a99('0x2'));var router=express[_0x5a99('0x3')]();var fs_extra=require(_0x5a99('0x4'));var auth=require(_0x5a99('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x5a99('0x6'));var controller=require(_0x5a99('0x7'));router[_0x5a99('0x8')]('/',auth['isAuthenticated'](),controller[_0x5a99('0x9')]);router['get'](_0x5a99('0xa'),auth['isAuthenticated'](),controller[_0x5a99('0xb')]);router[_0x5a99('0x8')]('/:id',auth[_0x5a99('0xc')](),controller[_0x5a99('0xd')]);router['get'](_0x5a99('0xe'),auth['isAuthenticated'](),controller[_0x5a99('0xf')]);router['get']('/:id/canned_answers',auth[_0x5a99('0xc')](),controller[_0x5a99('0x10')]);router[_0x5a99('0x8')](_0x5a99('0x11'),auth['isAuthenticated'](),controller['getInteractions']);router['get'](_0x5a99('0x12'),auth['isAuthenticated'](),controller[_0x5a99('0x13')]);router[_0x5a99('0x8')](_0x5a99('0x14'),auth['isAuthenticated'](),controller[_0x5a99('0x15')]);router[_0x5a99('0x8')]('/:id/users',auth[_0x5a99('0xc')](),controller['getAgents']);router['post']('/',auth['isAuthenticated'](),controller[_0x5a99('0x16')]);router[_0x5a99('0x17')](_0x5a99('0xe'),auth['isAuthenticated'](),controller[_0x5a99('0x18')]);router[_0x5a99('0x17')](_0x5a99('0x19'),auth[_0x5a99('0xc')](),controller[_0x5a99('0x1a')]);router['post'](_0x5a99('0x11'),auth[_0x5a99('0xc')](),controller[_0x5a99('0x1b')]);router['post'](_0x5a99('0x12'),auth['isAuthenticated'](),controller[_0x5a99('0x1c')]);router[_0x5a99('0x17')](_0x5a99('0x1d'),auth[_0x5a99('0xc')](),controller[_0x5a99('0x1e')]);router[_0x5a99('0x17')](_0x5a99('0x1f'),auth['isAuthenticated'](),controller['updateAccountApplications']);router[_0x5a99('0x17')]('/:id/send',auth[_0x5a99('0xc')](),controller[_0x5a99('0x20')]);router['post'](_0x5a99('0x21'),auth['isAuthenticated'](),controller[_0x5a99('0x22')]);router[_0x5a99('0x23')](_0x5a99('0x24'),auth[_0x5a99('0xc')](),controller[_0x5a99('0x25')]);router['delete'](_0x5a99('0x24'),auth[_0x5a99('0xc')](),controller['destroy']);router[_0x5a99('0x26')](_0x5a99('0xe'),auth['isAuthenticated'](),controller[_0x5a99('0x27')]);router['delete']('/:id/canned_answers',auth['isAuthenticated'](),controller['removeAnswers']);router['delete'](_0x5a99('0x21'),auth[_0x5a99('0xc')](),controller[_0x5a99('0x28')]);module[_0x5a99('0x29')]=router;
\ No newline at end of file
index 67c9f64..e11d546 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x323c=['noop','TEXT','*,*,*,*','sequelize','STRING'];(function(_0x278e3c,_0x1c9cfd){var _0x3e2d9b=function(_0x34d928){while(--_0x34d928){_0x278e3c['push'](_0x278e3c['shift']());}};_0x3e2d9b(++_0x1c9cfd);}(_0x323c,0x99));var _0xc323=function(_0xb7368b,_0xf11033){_0xb7368b=_0xb7368b-0x0;var _0x37d43b=_0x323c[_0xb7368b];return _0x37d43b;};'use strict';var Sequelize=require(_0xc323('0x0'));module['exports']={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0xc323('0x1')],'allowNull':![],'defaultValue':_0xc323('0x2')},'appdata':{'type':Sequelize[_0xc323('0x3')]()},'description':{'type':Sequelize[_0xc323('0x1')]},'interval':{'type':Sequelize[_0xc323('0x1')],'defaultValue':_0xc323('0x4')}};
\ No newline at end of file
+var _0x6c84=['sequelize','exports','INTEGER','STRING','TEXT','*,*,*,*'];(function(_0x1c5950,_0x49e128){var _0x2b720a=function(_0x4454f1){while(--_0x4454f1){_0x1c5950['push'](_0x1c5950['shift']());}};_0x2b720a(++_0x49e128);}(_0x6c84,0x15c));var _0x46c8=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x6c84[_0x122ef9];return _0x42fba0;};'use strict';var Sequelize=require(_0x46c8('0x0'));module[_0x46c8('0x1')]={'priority':{'type':Sequelize[_0x46c8('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x46c8('0x3')],'allowNull':![],'defaultValue':'noop'},'appdata':{'type':Sequelize[_0x46c8('0x4')]()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize[_0x46c8('0x3')],'defaultValue':_0x46c8('0x5')}};
\ No newline at end of file
index ee2b754..f2b367e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd315=['fieldName','type','key','model','query','keys','filters','intersection','attributes','limit','sort','where','filter','merge','VIRTUAL','options','FaxApplication','includeAll','findAll','rows','catch','show','params','rawAttributes','fields','length','include','create','body','find','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/license/util','sendStatus','status','end','offset','undefined','count','set','Content-Range','json','apply','reject','save','update','destroy','then','error','stack','name','send','index','map'];(function(_0x25e739,_0xa2fb7){var _0x409e54=function(_0x3db4ee){while(--_0x3db4ee){_0x25e739['push'](_0x25e739['shift']());}};_0x409e54(++_0xa2fb7);}(_0xd315,0xb6));var _0x5d31=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xd315[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0x5d31('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x5d31('0x1'));var jsonpatch=require(_0x5d31('0x2'));var rp=require(_0x5d31('0x3'));var moment=require(_0x5d31('0x4'));var BPromise=require(_0x5d31('0x5'));var Mustache=require('mustache');var util=require(_0x5d31('0x6'));var path=require(_0x5d31('0x7'));var sox=require(_0x5d31('0x8'));var csv=require(_0x5d31('0x9'));var ejs=require(_0x5d31('0xa'));var fs=require('fs');var fs_extra=require(_0x5d31('0xb'));var _=require('lodash');var squel=require(_0x5d31('0xc'));var crypto=require(_0x5d31('0xd'));var jsforce=require(_0x5d31('0xe'));var deskjs=require(_0x5d31('0xf'));var toCsv=require(_0x5d31('0x9'));var querystring=require(_0x5d31('0x10'));var Papa=require(_0x5d31('0x11'));var Redis=require(_0x5d31('0x12'));var authService=require(_0x5d31('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x5d31('0x14'));var hardwareService=require(_0x5d31('0x15'));var logger=require(_0x5d31('0x16'))(_0x5d31('0x17'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x5d31('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5bc6fd,_0x24bf6b){_0x24bf6b=_0x24bf6b||0xcc;return function(_0x27b881){if(_0x27b881){return _0x5bc6fd[_0x5d31('0x19')](_0x24bf6b);}return _0x5bc6fd[_0x5d31('0x1a')](_0x24bf6b)[_0x5d31('0x1b')]();};}function respondWithResult(_0x4ccb04,_0x19e61b){_0x19e61b=_0x19e61b||0xc8;return function(_0x40642b){if(_0x40642b){return _0x4ccb04[_0x5d31('0x1a')](_0x19e61b)['json'](_0x40642b);}};}function respondWithFilteredResult(_0x1fc520,_0x13ec4c){return function(_0x27bf53){if(_0x27bf53){var _0x2f4459=typeof _0x13ec4c[_0x5d31('0x1c')]===_0x5d31('0x1d')&&typeof _0x13ec4c['limit']==='undefined';var _0x2ca6fa=_0x27bf53[_0x5d31('0x1e')];var _0x3dc542=_0x2f4459?0x0:_0x13ec4c['offset'];var _0x70fbca=_0x2f4459?_0x27bf53[_0x5d31('0x1e')]:_0x13ec4c['offset']+_0x13ec4c['limit'];var _0x1e1040;if(_0x70fbca>=_0x2ca6fa){_0x70fbca=_0x2ca6fa;_0x1e1040=0xc8;}else{_0x1e1040=0xce;}_0x1fc520[_0x5d31('0x1a')](_0x1e1040);return _0x1fc520[_0x5d31('0x1f')](_0x5d31('0x20'),_0x3dc542+'-'+_0x70fbca+'/'+_0x2ca6fa)[_0x5d31('0x21')](_0x27bf53);}return null;};}function patchUpdates(_0x1775ad){return function(_0x468abd){try{jsonpatch[_0x5d31('0x22')](_0x468abd,_0x1775ad,!![]);}catch(_0x7c5fe2){return BPromise[_0x5d31('0x23')](_0x7c5fe2);}return _0x468abd[_0x5d31('0x24')]();};}function saveUpdates(_0x3c5f0b,_0xa90a7){return function(_0x342e23){if(_0x342e23){return _0x342e23[_0x5d31('0x25')](_0x3c5f0b)['then'](function(_0x1824d6){return _0x1824d6;});}return null;};}function removeEntity(_0x779d18,_0x140f4c){return function(_0x1c7781){if(_0x1c7781){return _0x1c7781[_0x5d31('0x26')]()[_0x5d31('0x27')](function(){_0x779d18[_0x5d31('0x1a')](0xcc)[_0x5d31('0x1b')]();});}};}function handleEntityNotFound(_0x2fa1cc,_0x2cd503){return function(_0x2a5926){if(!_0x2a5926){_0x2fa1cc[_0x5d31('0x19')](0x194);}return _0x2a5926;};}function handleError(_0x14d1b0,_0xe44ace){_0xe44ace=_0xe44ace||0x1f4;return function(_0x51e0f2){logger[_0x5d31('0x28')](_0x51e0f2[_0x5d31('0x29')]);if(_0x51e0f2['name']){delete _0x51e0f2[_0x5d31('0x2a')];}_0x14d1b0['status'](_0xe44ace)[_0x5d31('0x2b')](_0x51e0f2);};}exports[_0x5d31('0x2c')]=function(_0x814227,_0x2b8dc8){var _0x6839ea={},_0x3e54b9={},_0x3cd79c={'count':0x0,'rows':[]};var _0x1ebc8a=_[_0x5d31('0x2d')](db['FaxApplication']['rawAttributes'],function(_0xf9c035){return{'name':_0xf9c035[_0x5d31('0x2e')],'type':_0xf9c035[_0x5d31('0x2f')][_0x5d31('0x30')]};});_0x3e54b9[_0x5d31('0x31')]=_['map'](_0x1ebc8a,_0x5d31('0x2a'));_0x3e54b9[_0x5d31('0x32')]=_[_0x5d31('0x33')](_0x814227[_0x5d31('0x32')]);_0x3e54b9[_0x5d31('0x34')]=_[_0x5d31('0x35')](_0x3e54b9[_0x5d31('0x31')],_0x3e54b9[_0x5d31('0x32')]);_0x6839ea[_0x5d31('0x36')]=_[_0x5d31('0x35')](_0x3e54b9[_0x5d31('0x31')],qs['fields'](_0x814227[_0x5d31('0x32')]['fields']));_0x6839ea[_0x5d31('0x36')]=_0x6839ea[_0x5d31('0x36')]['length']?_0x6839ea[_0x5d31('0x36')]:_0x3e54b9['model'];if(!_0x814227[_0x5d31('0x32')]['hasOwnProperty']('nolimit')){_0x6839ea[_0x5d31('0x37')]=qs[_0x5d31('0x37')](_0x814227[_0x5d31('0x32')][_0x5d31('0x37')]);_0x6839ea[_0x5d31('0x1c')]=qs[_0x5d31('0x1c')](_0x814227[_0x5d31('0x32')]['offset']);}_0x6839ea['order']=qs['sort'](_0x814227[_0x5d31('0x32')][_0x5d31('0x38')]);_0x6839ea[_0x5d31('0x39')]=qs['filters'](_['pick'](_0x814227[_0x5d31('0x32')],_0x3e54b9['filters']),_0x1ebc8a);if(_0x814227['query'][_0x5d31('0x3a')]){_0x6839ea[_0x5d31('0x39')]=_[_0x5d31('0x3b')](_0x6839ea[_0x5d31('0x39')],{'$or':_[_0x5d31('0x2d')](_0x1ebc8a,function(_0x2ae29b){if(_0x2ae29b[_0x5d31('0x2f')]!==_0x5d31('0x3c')){var _0x45713e={};_0x45713e[_0x2ae29b[_0x5d31('0x2a')]]={'$like':'%'+_0x814227['query'][_0x5d31('0x3a')]+'%'};return _0x45713e;}})});}_0x6839ea=_[_0x5d31('0x3b')]({},_0x6839ea,_0x814227[_0x5d31('0x3d')]);var _0x5bbbe0={'where':_0x6839ea[_0x5d31('0x39')]};return db[_0x5d31('0x3e')][_0x5d31('0x1e')](_0x5bbbe0)[_0x5d31('0x27')](function(_0x222758){_0x3cd79c[_0x5d31('0x1e')]=_0x222758;if(_0x814227[_0x5d31('0x32')][_0x5d31('0x3f')]){_0x6839ea['include']=[{'all':!![]}];}return db[_0x5d31('0x3e')][_0x5d31('0x40')](_0x6839ea);})['then'](function(_0x52d784){_0x3cd79c[_0x5d31('0x41')]=_0x52d784;return _0x3cd79c;})[_0x5d31('0x27')](respondWithFilteredResult(_0x2b8dc8,_0x6839ea))[_0x5d31('0x42')](handleError(_0x2b8dc8,null));};exports[_0x5d31('0x43')]=function(_0x589621,_0x156b95){var _0x2c2135={'raw':!![],'where':{'id':_0x589621[_0x5d31('0x44')]['id']}},_0x2ae605={};_0x2ae605[_0x5d31('0x31')]=_[_0x5d31('0x33')](db[_0x5d31('0x3e')][_0x5d31('0x45')]);_0x2ae605[_0x5d31('0x32')]=_[_0x5d31('0x33')](_0x589621[_0x5d31('0x32')]);_0x2ae605[_0x5d31('0x34')]=_[_0x5d31('0x35')](_0x2ae605[_0x5d31('0x31')],_0x2ae605[_0x5d31('0x32')]);_0x2c2135[_0x5d31('0x36')]=_[_0x5d31('0x35')](_0x2ae605[_0x5d31('0x31')],qs[_0x5d31('0x46')](_0x589621[_0x5d31('0x32')][_0x5d31('0x46')]));_0x2c2135[_0x5d31('0x36')]=_0x2c2135['attributes'][_0x5d31('0x47')]?_0x2c2135[_0x5d31('0x36')]:_0x2ae605[_0x5d31('0x31')];if(_0x589621[_0x5d31('0x32')][_0x5d31('0x3f')]){_0x2c2135[_0x5d31('0x48')]=[{'all':!![]}];}_0x2c2135=_[_0x5d31('0x3b')]({},_0x2c2135,_0x589621[_0x5d31('0x3d')]);return db[_0x5d31('0x3e')]['find'](_0x2c2135)[_0x5d31('0x27')](handleEntityNotFound(_0x156b95,null))[_0x5d31('0x27')](respondWithResult(_0x156b95,null))[_0x5d31('0x42')](handleError(_0x156b95,null));};exports[_0x5d31('0x49')]=function(_0x14a9f7,_0x3dc718){return db[_0x5d31('0x3e')][_0x5d31('0x49')](_0x14a9f7[_0x5d31('0x4a')],{})[_0x5d31('0x27')](respondWithResult(_0x3dc718,0xc9))[_0x5d31('0x42')](handleError(_0x3dc718,null));};exports[_0x5d31('0x25')]=function(_0x402d63,_0x3d1b33){if(_0x402d63[_0x5d31('0x4a')]['id']){delete _0x402d63[_0x5d31('0x4a')]['id'];}return db[_0x5d31('0x3e')][_0x5d31('0x4b')]({'where':{'id':_0x402d63['params']['id']}})[_0x5d31('0x27')](handleEntityNotFound(_0x3d1b33,null))[_0x5d31('0x27')](saveUpdates(_0x402d63[_0x5d31('0x4a')],null))[_0x5d31('0x27')](respondWithResult(_0x3d1b33,null))['catch'](handleError(_0x3d1b33,null));};exports[_0x5d31('0x26')]=function(_0x48691e,_0x163e8b){return db[_0x5d31('0x3e')][_0x5d31('0x4b')]({'where':{'id':_0x48691e['params']['id']}})['then'](handleEntityNotFound(_0x163e8b,null))[_0x5d31('0x27')](removeEntity(_0x163e8b,null))['catch'](handleError(_0x163e8b,null));};
\ No newline at end of file
+var _0x8301=['Content-Range','apply','reject','update','then','destroy','error','stack','name','send','map','FaxApplication','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','order','sort','where','pick','filter','merge','VIRTUAL','includeAll','include','findAll','catch','show','rawAttributes','find','create','body','params','eml-format','rimraf','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','limit','undefined','count','set'];(function(_0xe2c95e,_0x3e6545){var _0x42ce6f=function(_0x218482){while(--_0x218482){_0xe2c95e['push'](_0xe2c95e['shift']());}};_0x42ce6f(++_0x3e6545);}(_0x8301,0x1cc));var _0x1830=function(_0x58252d,_0x2070b3){_0x58252d=_0x58252d-0x0;var _0x55a98c=_0x8301[_0x58252d];return _0x55a98c;};'use strict';var emlformat=require(_0x1830('0x0'));var rimraf=require(_0x1830('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x1830('0x2'));var BPromise=require(_0x1830('0x3'));var Mustache=require(_0x1830('0x4'));var util=require(_0x1830('0x5'));var path=require('path');var sox=require(_0x1830('0x6'));var csv=require(_0x1830('0x7'));var ejs=require(_0x1830('0x8'));var fs=require('fs');var fs_extra=require(_0x1830('0x9'));var _=require('lodash');var squel=require(_0x1830('0xa'));var crypto=require(_0x1830('0xb'));var jsforce=require(_0x1830('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x1830('0x7'));var querystring=require(_0x1830('0xd'));var Papa=require(_0x1830('0xe'));var Redis=require('ioredis');var authService=require(_0x1830('0xf'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x1830('0x10'))(_0x1830('0x11'));var utils=require(_0x1830('0x12'));var config=require(_0x1830('0x13'));var licenseUtil=require(_0x1830('0x14'));var db=require(_0x1830('0x15'))['db'];function respondWithStatusCode(_0x1e9895,_0x15f128){_0x15f128=_0x15f128||0xcc;return function(_0x43e500){if(_0x43e500){return _0x1e9895['sendStatus'](_0x15f128);}return _0x1e9895[_0x1830('0x16')](_0x15f128)[_0x1830('0x17')]();};}function respondWithResult(_0x2b75d0,_0x4521bc){_0x4521bc=_0x4521bc||0xc8;return function(_0x2a6481){if(_0x2a6481){return _0x2b75d0[_0x1830('0x16')](_0x4521bc)[_0x1830('0x18')](_0x2a6481);}};}function respondWithFilteredResult(_0x48f6ab,_0x3f673c){return function(_0x3eb0b4){if(_0x3eb0b4){var _0x3eb4d1=typeof _0x3f673c[_0x1830('0x19')]==='undefined'&&typeof _0x3f673c[_0x1830('0x1a')]===_0x1830('0x1b');var _0x3028ca=_0x3eb0b4[_0x1830('0x1c')];var _0x5378db=_0x3eb4d1?0x0:_0x3f673c[_0x1830('0x19')];var _0x4f7e70=_0x3eb4d1?_0x3eb0b4[_0x1830('0x1c')]:_0x3f673c[_0x1830('0x19')]+_0x3f673c[_0x1830('0x1a')];var _0x3c03a8;if(_0x4f7e70>=_0x3028ca){_0x4f7e70=_0x3028ca;_0x3c03a8=0xc8;}else{_0x3c03a8=0xce;}_0x48f6ab[_0x1830('0x16')](_0x3c03a8);return _0x48f6ab[_0x1830('0x1d')](_0x1830('0x1e'),_0x5378db+'-'+_0x4f7e70+'/'+_0x3028ca)[_0x1830('0x18')](_0x3eb0b4);}return null;};}function patchUpdates(_0x2884a5){return function(_0x3b9340){try{jsonpatch[_0x1830('0x1f')](_0x3b9340,_0x2884a5,!![]);}catch(_0xc74302){return BPromise[_0x1830('0x20')](_0xc74302);}return _0x3b9340['save']();};}function saveUpdates(_0x4c4b18,_0x57bd57){return function(_0x30a201){if(_0x30a201){return _0x30a201[_0x1830('0x21')](_0x4c4b18)[_0x1830('0x22')](function(_0xc4074e){return _0xc4074e;});}return null;};}function removeEntity(_0x4f85f1,_0x4e0902){return function(_0x555a74){if(_0x555a74){return _0x555a74[_0x1830('0x23')]()['then'](function(){_0x4f85f1[_0x1830('0x16')](0xcc)[_0x1830('0x17')]();});}};}function handleEntityNotFound(_0x3f91ff,_0xbf24fe){return function(_0x332a3e){if(!_0x332a3e){_0x3f91ff['sendStatus'](0x194);}return _0x332a3e;};}function handleError(_0x2f0e32,_0x4e1183){_0x4e1183=_0x4e1183||0x1f4;return function(_0x478d9c){logger[_0x1830('0x24')](_0x478d9c[_0x1830('0x25')]);if(_0x478d9c[_0x1830('0x26')]){delete _0x478d9c[_0x1830('0x26')];}_0x2f0e32[_0x1830('0x16')](_0x4e1183)[_0x1830('0x27')](_0x478d9c);};}exports['index']=function(_0x4cd7ed,_0x193471){var _0x343916={},_0x3f82e9={},_0x246efc={'count':0x0,'rows':[]};var _0x5d0df6=_[_0x1830('0x28')](db[_0x1830('0x29')]['rawAttributes'],function(_0x5858f5){return{'name':_0x5858f5[_0x1830('0x2a')],'type':_0x5858f5[_0x1830('0x2b')][_0x1830('0x2c')]};});_0x3f82e9[_0x1830('0x2d')]=_[_0x1830('0x28')](_0x5d0df6,_0x1830('0x26'));_0x3f82e9[_0x1830('0x2e')]=_[_0x1830('0x2f')](_0x4cd7ed['query']);_0x3f82e9[_0x1830('0x30')]=_[_0x1830('0x31')](_0x3f82e9[_0x1830('0x2d')],_0x3f82e9[_0x1830('0x2e')]);_0x343916['attributes']=_[_0x1830('0x31')](_0x3f82e9[_0x1830('0x2d')],qs[_0x1830('0x32')](_0x4cd7ed[_0x1830('0x2e')][_0x1830('0x32')]));_0x343916[_0x1830('0x33')]=_0x343916['attributes'][_0x1830('0x34')]?_0x343916[_0x1830('0x33')]:_0x3f82e9[_0x1830('0x2d')];if(!_0x4cd7ed[_0x1830('0x2e')]['hasOwnProperty']('nolimit')){_0x343916[_0x1830('0x1a')]=qs[_0x1830('0x1a')](_0x4cd7ed[_0x1830('0x2e')][_0x1830('0x1a')]);_0x343916[_0x1830('0x19')]=qs['offset'](_0x4cd7ed['query'][_0x1830('0x19')]);}_0x343916[_0x1830('0x35')]=qs[_0x1830('0x36')](_0x4cd7ed[_0x1830('0x2e')][_0x1830('0x36')]);_0x343916[_0x1830('0x37')]=qs[_0x1830('0x30')](_[_0x1830('0x38')](_0x4cd7ed[_0x1830('0x2e')],_0x3f82e9[_0x1830('0x30')]),_0x5d0df6);if(_0x4cd7ed[_0x1830('0x2e')][_0x1830('0x39')]){_0x343916[_0x1830('0x37')]=_[_0x1830('0x3a')](_0x343916[_0x1830('0x37')],{'$or':_[_0x1830('0x28')](_0x5d0df6,function(_0x2697bb){if(_0x2697bb[_0x1830('0x2b')]!==_0x1830('0x3b')){var _0x241af5={};_0x241af5[_0x2697bb[_0x1830('0x26')]]={'$like':'%'+_0x4cd7ed[_0x1830('0x2e')]['filter']+'%'};return _0x241af5;}})});}_0x343916=_['merge']({},_0x343916,_0x4cd7ed['options']);var _0x48d077={'where':_0x343916[_0x1830('0x37')]};return db[_0x1830('0x29')][_0x1830('0x1c')](_0x48d077)[_0x1830('0x22')](function(_0x2baf8e){_0x246efc[_0x1830('0x1c')]=_0x2baf8e;if(_0x4cd7ed['query'][_0x1830('0x3c')]){_0x343916[_0x1830('0x3d')]=[{'all':!![]}];}return db[_0x1830('0x29')][_0x1830('0x3e')](_0x343916);})[_0x1830('0x22')](function(_0x36fc8d){_0x246efc['rows']=_0x36fc8d;return _0x246efc;})[_0x1830('0x22')](respondWithFilteredResult(_0x193471,_0x343916))[_0x1830('0x3f')](handleError(_0x193471,null));};exports[_0x1830('0x40')]=function(_0x1785e1,_0x37b0c7){var _0x245954={'raw':!![],'where':{'id':_0x1785e1['params']['id']}},_0x3ae901={};_0x3ae901[_0x1830('0x2d')]=_[_0x1830('0x2f')](db[_0x1830('0x29')][_0x1830('0x41')]);_0x3ae901['query']=_[_0x1830('0x2f')](_0x1785e1[_0x1830('0x2e')]);_0x3ae901[_0x1830('0x30')]=_['intersection'](_0x3ae901[_0x1830('0x2d')],_0x3ae901[_0x1830('0x2e')]);_0x245954['attributes']=_[_0x1830('0x31')](_0x3ae901[_0x1830('0x2d')],qs['fields'](_0x1785e1[_0x1830('0x2e')][_0x1830('0x32')]));_0x245954[_0x1830('0x33')]=_0x245954[_0x1830('0x33')]['length']?_0x245954[_0x1830('0x33')]:_0x3ae901[_0x1830('0x2d')];if(_0x1785e1[_0x1830('0x2e')][_0x1830('0x3c')]){_0x245954['include']=[{'all':!![]}];}_0x245954=_[_0x1830('0x3a')]({},_0x245954,_0x1785e1['options']);return db['FaxApplication'][_0x1830('0x42')](_0x245954)['then'](handleEntityNotFound(_0x37b0c7,null))[_0x1830('0x22')](respondWithResult(_0x37b0c7,null))[_0x1830('0x3f')](handleError(_0x37b0c7,null));};exports[_0x1830('0x43')]=function(_0x8d1a3f,_0x1c8556){return db[_0x1830('0x29')]['create'](_0x8d1a3f['body'],{})[_0x1830('0x22')](respondWithResult(_0x1c8556,0xc9))[_0x1830('0x3f')](handleError(_0x1c8556,null));};exports[_0x1830('0x21')]=function(_0x1abfa6,_0x5c4027){if(_0x1abfa6[_0x1830('0x44')]['id']){delete _0x1abfa6['body']['id'];}return db[_0x1830('0x29')][_0x1830('0x42')]({'where':{'id':_0x1abfa6[_0x1830('0x45')]['id']}})['then'](handleEntityNotFound(_0x5c4027,null))['then'](saveUpdates(_0x1abfa6['body'],null))[_0x1830('0x22')](respondWithResult(_0x5c4027,null))[_0x1830('0x3f')](handleError(_0x5c4027,null));};exports[_0x1830('0x23')]=function(_0x3d573b,_0xad9273){return db[_0x1830('0x29')][_0x1830('0x42')]({'where':{'id':_0x3d573b['params']['id']}})[_0x1830('0x22')](handleEntityNotFound(_0xad9273,null))['then'](removeEntity(_0xad9273,null))['catch'](handleError(_0xad9273,null));};
\ No newline at end of file
index 8f982b1..ce579c4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7372=['api','moment','request-promise','path','./faxApplication.attributes','exports','define','FaxApplication','fax_applications','utf8mb4','utf8mb4_unicode_ci','util','../../config/logger'];(function(_0x32e779,_0x1c2596){var _0x47d7b3=function(_0x37c2d8){while(--_0x37c2d8){_0x32e779['push'](_0x32e779['shift']());}};_0x47d7b3(++_0x1c2596);}(_0x7372,0x191));var _0x2737=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7372[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0x2737('0x0'));var logger=require(_0x2737('0x1'))(_0x2737('0x2'));var moment=require(_0x2737('0x3'));var BPromise=require('bluebird');var rp=require(_0x2737('0x4'));var fs=require('fs');var path=require(_0x2737('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x2737('0x6'));module[_0x2737('0x7')]=function(_0x2f11fe,_0x457e2f){return _0x2f11fe[_0x2737('0x8')](_0x2737('0x9'),attributes,{'tableName':_0x2737('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x2737('0xb'),'collate':_0x2737('0xc')});};
\ No newline at end of file
+var _0x7bcd=['exports','define','FaxApplication','utf8mb4','utf8mb4_unicode_ci','util','api','moment','bluebird','request-promise','path','rimraf'];(function(_0x50a0c2,_0x4befab){var _0x5ebadd=function(_0x3a3342){while(--_0x3a3342){_0x50a0c2['push'](_0x50a0c2['shift']());}};_0x5ebadd(++_0x4befab);}(_0x7bcd,0xa1));var _0xd7bc=function(_0x24fa1a,_0x16d9c2){_0x24fa1a=_0x24fa1a-0x0;var _0xc5621f=_0x7bcd[_0x24fa1a];return _0xc5621f;};'use strict';var _=require('lodash');var util=require(_0xd7bc('0x0'));var logger=require('../../config/logger')(_0xd7bc('0x1'));var moment=require(_0xd7bc('0x2'));var BPromise=require(_0xd7bc('0x3'));var rp=require(_0xd7bc('0x4'));var fs=require('fs');var path=require(_0xd7bc('0x5'));var rimraf=require(_0xd7bc('0x6'));var config=require('../../config/environment');var attributes=require('./faxApplication.attributes');module[_0xd7bc('0x7')]=function(_0x126b5b,_0x51ce64){return _0x126b5b[_0xd7bc('0x8')](_0xd7bc('0x9'),attributes,{'tableName':'fax_applications','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xd7bc('0xa'),'collate':_0xd7bc('0xb')});};
\ No newline at end of file
index 190daf9..b83f04f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe332=['util','bluebird','randomstring','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','FaxApplication,\x20%s,\x20%s','request\x20sent','FaxApplication,\x20%s,\x20%s,\x20%s','stringify','error','message','UpdateFaxApplication','FaxApplication','update','body','options','where','limit','debug','catch','lodash'];(function(_0x2bcddb,_0x3eaf37){var _0x12a9e8=function(_0xeeb678){while(--_0xeeb678){_0x2bcddb['push'](_0x2bcddb['shift']());}};_0x12a9e8(++_0x3eaf37);}(_0xe332,0x143));var _0x2e33=function(_0x5d508d,_0x517349){_0x5d508d=_0x5d508d-0x0;var _0x41c8ae=_0xe332[_0x5d508d];return _0x41c8ae;};'use strict';var _=require(_0x2e33('0x0'));var util=require(_0x2e33('0x1'));var moment=require('moment');var BPromise=require(_0x2e33('0x2'));var rs=require(_0x2e33('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x2e33('0x4'))(_0x2e33('0x5'));var config=require(_0x2e33('0x6'));var jayson=require(_0x2e33('0x7'));var client=jayson[_0x2e33('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4fd5ca,_0x4db60a,_0x4707e4){return new BPromise(function(_0xef2da,_0x10a972){return client[_0x2e33('0x9')](_0x4fd5ca,_0x4707e4)[_0x2e33('0xa')](function(_0x124aac){logger[_0x2e33('0xb')](_0x2e33('0xc'),_0x4db60a,_0x2e33('0xd'));logger['debug'](_0x2e33('0xe'),_0x4db60a,_0x2e33('0xd'),JSON[_0x2e33('0xf')](_0x124aac));if(_0x124aac['error']){if(_0x124aac['error']['code']===0x1f4){logger[_0x2e33('0x10')]('FaxApplication,\x20%s,\x20%s',_0x4db60a,_0x124aac[_0x2e33('0x10')][_0x2e33('0x11')]);return _0x10a972(_0x124aac[_0x2e33('0x10')][_0x2e33('0x11')]);}logger[_0x2e33('0x10')](_0x2e33('0xc'),_0x4db60a,_0x124aac[_0x2e33('0x10')][_0x2e33('0x11')]);return _0xef2da(_0x124aac[_0x2e33('0x10')]['message']);}else{logger[_0x2e33('0xb')]('FaxApplication,\x20%s,\x20%s',_0x4db60a,_0x2e33('0xd'));_0xef2da(_0x124aac['result'][_0x2e33('0x11')]);}})['catch'](function(_0x33d6e0){logger[_0x2e33('0x10')](_0x2e33('0xc'),_0x4db60a,_0x33d6e0);_0x10a972(_0x33d6e0);});});}exports[_0x2e33('0x12')]=function(_0xdcb5e4){var _0x4d406d=this;return new Promise(function(_0x2294bb,_0x3c7743){return db[_0x2e33('0x13')][_0x2e33('0x14')](_0xdcb5e4[_0x2e33('0x15')],{'raw':_0xdcb5e4[_0x2e33('0x16')]?_0xdcb5e4[_0x2e33('0x16')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xdcb5e4['options']?_0xdcb5e4[_0x2e33('0x16')][_0x2e33('0x17')]||null:null,'attributes':_0xdcb5e4['options']?_0xdcb5e4[_0x2e33('0x16')]['attributes']||null:null,'limit':_0xdcb5e4[_0x2e33('0x16')]?_0xdcb5e4[_0x2e33('0x16')][_0x2e33('0x18')]||null:null})[_0x2e33('0xa')](function(_0x215703){logger['info'](_0x2e33('0x12'),_0xdcb5e4);logger[_0x2e33('0x19')](_0x2e33('0x12'),_0xdcb5e4,JSON[_0x2e33('0xf')](_0x215703));_0x2294bb(_0x215703);})[_0x2e33('0x1a')](function(_0x3655ce){logger[_0x2e33('0x10')](_0x2e33('0x12'),_0x3655ce[_0x2e33('0x11')],_0xdcb5e4);_0x3c7743(_0x4d406d[_0x2e33('0x10')](0x1f4,_0x3655ce[_0x2e33('0x11')]));});});};
\ No newline at end of file
+var _0x0806=['attributes','UpdateFaxApplication','lodash','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request','then','info','FaxApplication,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','FaxApplication','update','body','options','raw'];(function(_0x2b11e1,_0x5363eb){var _0x573679=function(_0x27d29d){while(--_0x27d29d){_0x2b11e1['push'](_0x2b11e1['shift']());}};_0x573679(++_0x5363eb);}(_0x0806,0x1ef));var _0x6080=function(_0xdcf024,_0x5ded63){_0xdcf024=_0xdcf024-0x0;var _0x2a3f3c=_0x0806[_0xdcf024];return _0x2a3f3c;};'use strict';var _=require(_0x6080('0x0'));var util=require(_0x6080('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x6080('0x2'));var fs=require('fs');var Redis=require(_0x6080('0x3'));var db=require(_0x6080('0x4'))['db'];var utils=require(_0x6080('0x5'));var logger=require(_0x6080('0x6'))('rpc');var config=require(_0x6080('0x7'));var jayson=require(_0x6080('0x8'));var client=jayson[_0x6080('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2e07de,_0x35aaa2,_0xc4faac){return new BPromise(function(_0x5174dc,_0x474769){return client[_0x6080('0xa')](_0x2e07de,_0xc4faac)[_0x6080('0xb')](function(_0x37da87){logger[_0x6080('0xc')](_0x6080('0xd'),_0x35aaa2,_0x6080('0xe'));logger[_0x6080('0xf')]('FaxApplication,\x20%s,\x20%s,\x20%s',_0x35aaa2,_0x6080('0xe'),JSON[_0x6080('0x10')](_0x37da87));if(_0x37da87[_0x6080('0x11')]){if(_0x37da87[_0x6080('0x11')][_0x6080('0x12')]===0x1f4){logger[_0x6080('0x11')](_0x6080('0xd'),_0x35aaa2,_0x37da87[_0x6080('0x11')][_0x6080('0x13')]);return _0x474769(_0x37da87[_0x6080('0x11')][_0x6080('0x13')]);}logger['error'](_0x6080('0xd'),_0x35aaa2,_0x37da87[_0x6080('0x11')]['message']);return _0x5174dc(_0x37da87['error'][_0x6080('0x13')]);}else{logger['info']('FaxApplication,\x20%s,\x20%s',_0x35aaa2,_0x6080('0xe'));_0x5174dc(_0x37da87[_0x6080('0x14')][_0x6080('0x13')]);}})[_0x6080('0x15')](function(_0x2ee1b2){logger[_0x6080('0x11')](_0x6080('0xd'),_0x35aaa2,_0x2ee1b2);_0x474769(_0x2ee1b2);});});}exports['UpdateFaxApplication']=function(_0x42f2d7){var _0x438afa=this;return new Promise(function(_0x4ee0dc,_0x27336b){return db[_0x6080('0x16')][_0x6080('0x17')](_0x42f2d7[_0x6080('0x18')],{'raw':_0x42f2d7[_0x6080('0x19')]?_0x42f2d7[_0x6080('0x19')][_0x6080('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x42f2d7[_0x6080('0x19')]?_0x42f2d7[_0x6080('0x19')]['where']||null:null,'attributes':_0x42f2d7['options']?_0x42f2d7['options'][_0x6080('0x1b')]||null:null,'limit':_0x42f2d7[_0x6080('0x19')]?_0x42f2d7['options']['limit']||null:null})[_0x6080('0xb')](function(_0x50b654){logger[_0x6080('0xc')](_0x6080('0x1c'),_0x42f2d7);logger[_0x6080('0xf')]('UpdateFaxApplication',_0x42f2d7,JSON[_0x6080('0x10')](_0x50b654));_0x4ee0dc(_0x50b654);})[_0x6080('0x15')](function(_0x5f45be){logger['error']('UpdateFaxApplication',_0x5f45be['message'],_0x42f2d7);_0x27336b(_0x438afa[_0x6080('0x11')](0x1f4,_0x5f45be[_0x6080('0x13')]));});});};
\ No newline at end of file
index 2f50474..bd62eec 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4213=['post','put','update','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','./faxApplication.controller','get','isAuthenticated','index','/:id','show'];(function(_0x10bb94,_0x1969fa){var _0x2819a1=function(_0x191c90){while(--_0x191c90){_0x10bb94['push'](_0x10bb94['shift']());}};_0x2819a1(++_0x1969fa);}(_0x4213,0x77));var _0x3421=function(_0x93787,_0x2d8513){_0x93787=_0x93787-0x0;var _0x49e18e=_0x4213[_0x93787];return _0x49e18e;};'use strict';var multer=require(_0x3421('0x0'));var util=require(_0x3421('0x1'));var path=require(_0x3421('0x2'));var timeout=require(_0x3421('0x3'));var express=require(_0x3421('0x4'));var router=express[_0x3421('0x5')]();var fs_extra=require(_0x3421('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0x3421('0x7'));var config=require('../../config/environment');var controller=require(_0x3421('0x8'));router[_0x3421('0x9')]('/',auth[_0x3421('0xa')](),controller[_0x3421('0xb')]);router['get'](_0x3421('0xc'),auth[_0x3421('0xa')](),controller[_0x3421('0xd')]);router[_0x3421('0xe')]('/',auth[_0x3421('0xa')](),controller['create']);router[_0x3421('0xf')]('/:id',auth['isAuthenticated'](),controller[_0x3421('0x10')]);router['delete'](_0x3421('0xc'),auth[_0x3421('0xa')](),controller[_0x3421('0x11')]);module[_0x3421('0x12')]=router;
\ No newline at end of file
+var _0x34b7=['express','Router','fs-extra','../../components/auth/service','./faxApplication.controller','get','isAuthenticated','index','/:id','show','post','update','delete','destroy','exports','path','connect-timeout'];(function(_0x275427,_0x200c6e){var _0x1ac1f9=function(_0x269e2c){while(--_0x269e2c){_0x275427['push'](_0x275427['shift']());}};_0x1ac1f9(++_0x200c6e);}(_0x34b7,0x196));var _0x734b=function(_0x2ea8fe,_0x13a71f){_0x2ea8fe=_0x2ea8fe-0x0;var _0x138e9f=_0x34b7[_0x2ea8fe];return _0x138e9f;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x734b('0x0'));var timeout=require(_0x734b('0x1'));var express=require(_0x734b('0x2'));var router=express[_0x734b('0x3')]();var fs_extra=require(_0x734b('0x4'));var auth=require(_0x734b('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x734b('0x6'));router[_0x734b('0x7')]('/',auth[_0x734b('0x8')](),controller[_0x734b('0x9')]);router[_0x734b('0x7')](_0x734b('0xa'),auth['isAuthenticated'](),controller[_0x734b('0xb')]);router[_0x734b('0xc')]('/',auth['isAuthenticated'](),controller['create']);router['put'](_0x734b('0xa'),auth['isAuthenticated'](),controller[_0x734b('0xd')]);router[_0x734b('0xe')](_0x734b('0xa'),auth[_0x734b('0x8')](),controller[_0x734b('0xf')]);module[_0x734b('0x10')]=router;
\ No newline at end of file
index f1e817c..4c2c91b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x93e9=['STRING','ENUM','out','INTEGER','sequelize','exports','BOOLEAN','DATE'];(function(_0x1b8569,_0x5145b4){var _0x1ad549=function(_0x2bbad){while(--_0x2bbad){_0x1b8569['push'](_0x1b8569['shift']());}};_0x1ad549(++_0x5145b4);}(_0x93e9,0xcc));var _0x993e=function(_0x230eb2,_0x397082){_0x230eb2=_0x230eb2-0x0;var _0x1c2e79=_0x93e9[_0x230eb2];return _0x1c2e79;};'use strict';var Sequelize=require(_0x993e('0x0'));module[_0x993e('0x1')]={'closed':{'type':Sequelize[_0x993e('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x993e('0x3')]},'disposition':{'type':Sequelize[_0x993e('0x4')]},'secondDisposition':{'type':Sequelize[_0x993e('0x4')]},'thirdDisposition':{'type':Sequelize[_0x993e('0x4')]},'note':{'type':Sequelize['STRING']},'read1stAt':{'type':Sequelize['DATE']},'fax':{'type':Sequelize[_0x993e('0x4')]},'firstMsgDirection':{'type':Sequelize[_0x993e('0x5')]('in',_0x993e('0x6')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x993e('0x3')]},'lastMsgDirection':{'type':Sequelize[_0x993e('0x5')]('in',_0x993e('0x6')),'defaultValue':'in','allowNull':![]},'queueId':{'type':Sequelize[_0x993e('0x7')]}};
\ No newline at end of file
+var _0x8e3f=['STRING','DATE','out','ENUM','sequelize','exports','BOOLEAN'];(function(_0x8de54f,_0x271987){var _0x14cba4=function(_0x58ed41){while(--_0x58ed41){_0x8de54f['push'](_0x8de54f['shift']());}};_0x14cba4(++_0x271987);}(_0x8e3f,0xc1));var _0xf8e3=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0x8e3f[_0x2c91e9];return _0x13f0ff;};'use strict';var Sequelize=require(_0xf8e3('0x0'));module[_0xf8e3('0x1')]={'closed':{'type':Sequelize[_0xf8e3('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0xf8e3('0x3')]},'secondDisposition':{'type':Sequelize[_0xf8e3('0x3')]},'thirdDisposition':{'type':Sequelize[_0xf8e3('0x3')]},'note':{'type':Sequelize['STRING']},'read1stAt':{'type':Sequelize[_0xf8e3('0x4')]},'fax':{'type':Sequelize[_0xf8e3('0x3')]},'firstMsgDirection':{'type':Sequelize['ENUM']('in',_0xf8e3('0x5')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0xf8e3('0x4')]},'lastMsgDirection':{'type':Sequelize[_0xf8e3('0x6')]('in',_0xf8e3('0x5')),'defaultValue':'in','allowNull':![]},'queueId':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
index f976969..b096558 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb9bc=['download','err','unlinkSync','rimraf','zip-dir','util','ioredis','../../components/parsers/qs','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','end','undefined','limit','count','set','json','update','then','destroy','error','stack','name','send','index','map','FaxInteraction','rawAttributes','fieldName','type','key','getOptions','fax','query','catch','model','intersection','fields','attributes','length','includeAll','include','merge','options','create','body','find','params','describe','addMessage','FaxMessage','ids','omit','getMessages','keys','filters','hasOwnProperty','nolimit','offset','order','sort','where','FaxInteractionId','filter','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','findAll','rows','addTags','setTags','spread','Tag','color','emit','faxInteractionTags:save','removeTags','unix','toString','join','root','tmp','files','attachments','push','Attachment','Messages','createdAt','get','mkdirSync','basename','createReadStream','pipe','resolve'];(function(_0x12f3b3,_0x31a429){var _0xd8cd5b=function(_0x5e6444){while(--_0x5e6444){_0x12f3b3['push'](_0x12f3b3['shift']());}};_0xd8cd5b(++_0x31a429);}(_0xb9bc,0x197));var _0xcb9b=function(_0x502953,_0x28de83){_0x502953=_0x502953-0x0;var _0x2fa32d=_0xb9bc[_0x502953];return _0x2fa32d;};'use strict';var rimraf=require(_0xcb9b('0x0'));var zipdir=require(_0xcb9b('0x1'));var moment=require('moment');var BPromise=require('bluebird');var util=require(_0xcb9b('0x2'));var path=require('path');var fs=require('fs');var _=require('lodash');var Redis=require(_0xcb9b('0x3'));var interaction=require('../../components/interaction/service');var qs=require(_0xcb9b('0x4'));var logger=require('../../config/logger')('api');var config=require(_0xcb9b('0x5'));var db=require(_0xcb9b('0x6'))['db'];config[_0xcb9b('0x7')]=_[_0xcb9b('0x8')](config[_0xcb9b('0x7')],{'host':_0xcb9b('0x9'),'port':0x18eb});var socket=require(_0xcb9b('0xa'))(new Redis(config['redis']));require('./faxInteraction.socket')[_0xcb9b('0xb')](socket);function respondWithStatusCode(_0x2fa10b,_0x18e111){_0x18e111=_0x18e111||0xcc;return function(_0x5bde24){if(_0x5bde24){return _0x2fa10b[_0xcb9b('0xc')](_0x18e111);}return _0x2fa10b[_0xcb9b('0xd')](_0x18e111)[_0xcb9b('0xe')]();};}function respondWithResult(_0x6829fe,_0x109341){_0x109341=_0x109341||0xc8;return function(_0x3c6040){if(_0x3c6040){return _0x6829fe[_0xcb9b('0xd')](_0x109341)['json'](_0x3c6040);}};}function respondWithFilteredResult(_0x12095b,_0x53fd12){return function(_0x530b58){if(_0x530b58){var _0xd9631a=typeof _0x53fd12['offset']===_0xcb9b('0xf')&&typeof _0x53fd12[_0xcb9b('0x10')]===_0xcb9b('0xf');var _0x57716a=_0x530b58[_0xcb9b('0x11')];var _0x265c3f=_0xd9631a?0x0:_0x53fd12['offset'];var _0x39fb01=_0xd9631a?_0x530b58[_0xcb9b('0x11')]:_0x53fd12['offset']+_0x53fd12[_0xcb9b('0x10')];var _0x5d2a9e;if(_0x39fb01>=_0x57716a){_0x39fb01=_0x57716a;_0x5d2a9e=0xc8;}else{_0x5d2a9e=0xce;}_0x12095b[_0xcb9b('0xd')](_0x5d2a9e);return _0x12095b[_0xcb9b('0x12')]('Content-Range',_0x265c3f+'-'+_0x39fb01+'/'+_0x57716a)[_0xcb9b('0x13')](_0x530b58);}return null;};}function saveUpdates(_0x2a52ea){return function(_0x232ea2){if(_0x232ea2){return _0x232ea2[_0xcb9b('0x14')](_0x2a52ea)[_0xcb9b('0x15')](function(_0xe6255c){return _0xe6255c;});}return null;};}function removeEntity(_0x140013){return function(_0x10ff73){if(_0x10ff73){return _0x10ff73[_0xcb9b('0x16')]()['then'](function(){_0x140013['status'](0xcc)[_0xcb9b('0xe')]();});}};}function handleEntityNotFound(_0x24a727){return function(_0x2b2e0b){if(!_0x2b2e0b){_0x24a727[_0xcb9b('0xc')](0x194);}return _0x2b2e0b;};}function handleError(_0x44a951,_0x43738e){_0x43738e=_0x43738e||0x1f4;return function(_0x41097d){logger[_0xcb9b('0x17')](_0x41097d[_0xcb9b('0x18')]);if(_0x41097d[_0xcb9b('0x19')]){delete _0x41097d[_0xcb9b('0x19')];}_0x44a951['status'](_0x43738e)[_0xcb9b('0x1a')](_0x41097d);};}exports[_0xcb9b('0x1b')]=function(_0x15e369,_0x30b138){var _0x957d77={};var _0xba3bd9=_[_0xcb9b('0x1c')](db[_0xcb9b('0x1d')][_0xcb9b('0x1e')],function(_0x110f2b){return{'name':_0x110f2b[_0xcb9b('0x1f')],'type':_0x110f2b[_0xcb9b('0x20')][_0xcb9b('0x21')]};});_0x957d77=qs[_0xcb9b('0x22')](_0xba3bd9,_0x15e369);return interaction['findAll'](_0xcb9b('0x23'),_0x15e369[_0xcb9b('0x24')],_0x15e369['user'],_0x957d77,_0xba3bd9)[_0xcb9b('0x15')](respondWithFilteredResult(_0x30b138,_0x957d77))[_0xcb9b('0x25')](handleError(_0x30b138,null));};exports['show']=function(_0x90ddc4,_0x503b0c){var _0x28bfc9={'raw':![],'where':{'id':_0x90ddc4['params']['id']}},_0x3632ae={};_0x3632ae[_0xcb9b('0x26')]=_['keys'](db['FaxInteraction']['rawAttributes']);_0x3632ae[_0xcb9b('0x24')]=_['keys'](_0x90ddc4['query']);_0x3632ae['filters']=_['intersection'](_0x3632ae[_0xcb9b('0x26')],_0x3632ae[_0xcb9b('0x24')]);_0x28bfc9['attributes']=_[_0xcb9b('0x27')](_0x3632ae[_0xcb9b('0x26')],qs['fields'](_0x90ddc4[_0xcb9b('0x24')][_0xcb9b('0x28')]));_0x28bfc9[_0xcb9b('0x29')]=_0x28bfc9['attributes'][_0xcb9b('0x2a')]?_0x28bfc9[_0xcb9b('0x29')]:_0x3632ae['model'];if(_0x90ddc4[_0xcb9b('0x24')][_0xcb9b('0x2b')]){_0x28bfc9[_0xcb9b('0x2c')]=[{'all':!![]}];}_0x28bfc9=_[_0xcb9b('0x2d')]({},_0x28bfc9,_0x90ddc4[_0xcb9b('0x2e')]);return db['FaxInteraction']['find'](_0x28bfc9)[_0xcb9b('0x15')](handleEntityNotFound(_0x503b0c,null))['then'](respondWithResult(_0x503b0c,null))[_0xcb9b('0x25')](handleError(_0x503b0c,null));};exports[_0xcb9b('0x2f')]=function(_0x4b7c14,_0x141c35){return db[_0xcb9b('0x1d')][_0xcb9b('0x2f')](_0x4b7c14[_0xcb9b('0x30')],{})[_0xcb9b('0x15')](respondWithResult(_0x141c35,0xc9))[_0xcb9b('0x25')](handleError(_0x141c35,null));};exports[_0xcb9b('0x14')]=function(_0x2d7308,_0x23498e){if(_0x2d7308[_0xcb9b('0x30')]['id']){delete _0x2d7308[_0xcb9b('0x30')]['id'];}return db[_0xcb9b('0x1d')][_0xcb9b('0x31')]({'where':{'id':_0x2d7308[_0xcb9b('0x32')]['id']}})[_0xcb9b('0x15')](handleEntityNotFound(_0x23498e,null))['then'](saveUpdates(_0x2d7308[_0xcb9b('0x30')],null))[_0xcb9b('0x15')](respondWithResult(_0x23498e,null))[_0xcb9b('0x25')](handleError(_0x23498e,null));};exports[_0xcb9b('0x16')]=function(_0x2f8fcd,_0x45601a){return db['FaxInteraction'][_0xcb9b('0x31')]({'where':{'id':_0x2f8fcd[_0xcb9b('0x32')]['id']}})[_0xcb9b('0x15')](handleEntityNotFound(_0x45601a,null))[_0xcb9b('0x15')](removeEntity(_0x45601a,null))['catch'](handleError(_0x45601a,null));};exports[_0xcb9b('0x33')]=function(_0x4db17a,_0x14e98a){return db['FaxInteraction']['describe']()[_0xcb9b('0x15')](respondWithResult(_0x14e98a,null))[_0xcb9b('0x25')](handleError(_0x14e98a,null));};exports[_0xcb9b('0x34')]=function(_0x4fb8f9,_0x107ee1){return db[_0xcb9b('0x35')][_0xcb9b('0x31')]({'where':{'id':_0x4fb8f9[_0xcb9b('0x32')]['id']}})[_0xcb9b('0x15')](handleEntityNotFound(_0x107ee1,null))['then'](function(_0x3a17bc){if(_0x3a17bc){return _0x3a17bc[_0xcb9b('0x34')](_0x4fb8f9[_0xcb9b('0x30')][_0xcb9b('0x36')],_[_0xcb9b('0x37')](_0x4fb8f9['body'],['ids','id'])||{});}})[_0xcb9b('0x15')](respondWithResult(_0x107ee1,null))[_0xcb9b('0x25')](handleError(_0x107ee1,null));};exports[_0xcb9b('0x38')]=function(_0x5b8cdc,_0x48a436){var _0x232a49={'raw':![],'where':{}};var _0x2b07c9={};var _0x1b3a99={'count':0x0,'rows':[]};return db[_0xcb9b('0x1d')]['findOne']({'where':{'id':_0x5b8cdc['params']['id']}})['then'](handleEntityNotFound(_0x48a436,null))[_0xcb9b('0x15')](function(_0x13056f){if(_0x13056f){_0x2b07c9[_0xcb9b('0x26')]=_[_0xcb9b('0x39')](db[_0xcb9b('0x35')][_0xcb9b('0x1e')]);_0x2b07c9['query']=_[_0xcb9b('0x39')](_0x5b8cdc[_0xcb9b('0x24')]);_0x2b07c9[_0xcb9b('0x3a')]=_[_0xcb9b('0x27')](_0x2b07c9[_0xcb9b('0x26')],_0x2b07c9['query']);_0x232a49['attributes']=_[_0xcb9b('0x27')](_0x2b07c9[_0xcb9b('0x26')],qs[_0xcb9b('0x28')](_0x5b8cdc[_0xcb9b('0x24')][_0xcb9b('0x28')]));_0x232a49[_0xcb9b('0x29')]=_0x232a49[_0xcb9b('0x29')]['length']?_0x232a49[_0xcb9b('0x29')]:_0x2b07c9[_0xcb9b('0x26')];if(!_0x5b8cdc[_0xcb9b('0x24')][_0xcb9b('0x3b')](_0xcb9b('0x3c'))){_0x232a49[_0xcb9b('0x10')]=qs[_0xcb9b('0x10')](_0x5b8cdc[_0xcb9b('0x24')]['limit']);_0x232a49[_0xcb9b('0x3d')]=qs[_0xcb9b('0x3d')](_0x5b8cdc[_0xcb9b('0x24')]['offset']);}_0x232a49[_0xcb9b('0x3e')]=qs[_0xcb9b('0x3f')](_0x5b8cdc['query'][_0xcb9b('0x3f')]);_0x232a49[_0xcb9b('0x40')]=qs[_0xcb9b('0x3a')](_['pick'](_0x5b8cdc[_0xcb9b('0x24')],_0x2b07c9['filters']));_0x232a49[_0xcb9b('0x40')][_0xcb9b('0x41')]=_0x13056f['id'];if(_0x5b8cdc[_0xcb9b('0x24')][_0xcb9b('0x42')]){_0x232a49[_0xcb9b('0x40')]=_[_0xcb9b('0x2d')](_0x232a49['where'],{'$or':_[_0xcb9b('0x1c')](_0x232a49[_0xcb9b('0x29')],function(_0x247e3c){var _0x617f78={};_0x617f78[_0x247e3c]={'$like':'%'+_0x5b8cdc[_0xcb9b('0x24')][_0xcb9b('0x42')]+'%'};return _0x617f78;})});}if(_0x5b8cdc[_0xcb9b('0x24')][_0xcb9b('0x43')]){var _0x14d1da=_0x5b8cdc[_0xcb9b('0x24')]['$gte'][_0xcb9b('0x44')](',');var _0x327476={};_0x327476[_0x14d1da[0x0]]={'$gte':moment(_0x14d1da[0x1])[_0xcb9b('0x45')](_0xcb9b('0x46'))};_0x232a49[_0xcb9b('0x40')]=_[_0xcb9b('0x2d')](_0x232a49[_0xcb9b('0x40')],_0x327476);}_0x232a49=_[_0xcb9b('0x2d')]({},_0x232a49,_0x5b8cdc[_0xcb9b('0x2e')]);return db[_0xcb9b('0x35')][_0xcb9b('0x11')]({'where':_0x232a49[_0xcb9b('0x40')]})['then'](function(_0x2b6f09){_0x1b3a99['count']=_0x2b6f09;if(_0x5b8cdc[_0xcb9b('0x24')][_0xcb9b('0x2b')]){_0x232a49['include']=[{'all':!![]}];}return db[_0xcb9b('0x35')][_0xcb9b('0x47')](_0x232a49);})['then'](function(_0x1dce1a){_0x1b3a99[_0xcb9b('0x48')]=_0x1dce1a;return _0x1b3a99;});}})[_0xcb9b('0x15')](respondWithFilteredResult(_0x48a436,_0x232a49))[_0xcb9b('0x25')](handleError(_0x48a436,null));};exports[_0xcb9b('0x49')]=function(_0x172768,_0x2b13bc){return db[_0xcb9b('0x1d')][_0xcb9b('0x31')]({'where':{'id':_0x172768[_0xcb9b('0x32')]['id']}})[_0xcb9b('0x15')](handleEntityNotFound(_0x2b13bc,null))[_0xcb9b('0x15')](function(_0x3829e2){if(_0x3829e2){return _0x3829e2[_0xcb9b('0x4a')](_0x172768[_0xcb9b('0x30')][_0xcb9b('0x36')],_[_0xcb9b('0x37')](_0x172768[_0xcb9b('0x30')],[_0xcb9b('0x36'),'id'])||{})[_0xcb9b('0x4b')](function(){return db[_0xcb9b('0x4c')][_0xcb9b('0x47')]({'attributes':['id',_0xcb9b('0x19'),_0xcb9b('0x4d')],'where':{'id':_0x172768['body']['ids']}});})[_0xcb9b('0x15')](function(_0x1e42aa){socket[_0xcb9b('0x4e')](_0xcb9b('0x4f'),{'id':Number(_0x172768[_0xcb9b('0x32')]['id']),'tags':_0x1e42aa||[]});return{'id':Number(_0x172768[_0xcb9b('0x32')]['id']),'tags':_0x1e42aa||[]};});}})['then'](respondWithResult(_0x2b13bc,null))[_0xcb9b('0x25')](handleError(_0x2b13bc,null));};exports[_0xcb9b('0x50')]=function(_0x7ed531,_0x1596f3){return db[_0xcb9b('0x1d')][_0xcb9b('0x31')]({'where':{'id':_0x7ed531['params']['id']}})['then'](handleEntityNotFound(_0x1596f3,null))[_0xcb9b('0x15')](function(_0xc50126){if(_0xc50126){return _0xc50126[_0xcb9b('0x50')](_0x7ed531[_0xcb9b('0x24')][_0xcb9b('0x36')]);}})[_0xcb9b('0x15')](respondWithStatusCode(_0x1596f3,null))['catch'](handleError(_0x1596f3,null));};exports['download']=function(_0x3acd09,_0x1f1346){var _0x57dc20=moment()[_0xcb9b('0x51')]()[_0xcb9b('0x52')]();var _0x1a9646=path[_0xcb9b('0x53')](config[_0xcb9b('0x54')],'server','files',_0xcb9b('0x55'));var _0x598a24=path['join'](config['root'],'server',_0xcb9b('0x56'),_0xcb9b('0x57'));var _0x8a5e27=path[_0xcb9b('0x53')](_0x1a9646,_0x57dc20);var _0x2be47f=util['format']('transcript-%d-%s.zip',_0x3acd09[_0xcb9b('0x32')]['id'],_0x57dc20);var _0x47ea5c=path[_0xcb9b('0x53')](_0x1a9646,_0x2be47f);var _0x201ffb=[];_0x201ffb[_0xcb9b('0x58')]({'model':db[_0xcb9b('0x59')],'as':_0xcb9b('0x59'),'raw':!![]});var _0x2fa965=[{'model':db['FaxMessage'],'as':_0xcb9b('0x5a'),'attributes':['id',_0xcb9b('0x30'),_0xcb9b('0x5b')],'include':_0x201ffb}];return db[_0xcb9b('0x1d')]['find']({'where':{'id':_0x3acd09[_0xcb9b('0x32')]['id']},'include':_0x2fa965})[_0xcb9b('0x15')](handleEntityNotFound(_0x1f1346,null))[_0xcb9b('0x15')](function(_0x2b50f9){if(_0x2b50f9&&_0x2b50f9[_0xcb9b('0x5a')]){var _0x2971cc=_0x2b50f9[_0xcb9b('0x5c')]({'plain':!![]});fs[_0xcb9b('0x5d')](_0x8a5e27);for(var _0x31d981=0x0;_0x31d981<_0x2971cc[_0xcb9b('0x5a')][_0xcb9b('0x2a')];_0x31d981++){var _0x1910b1=_0x2971cc[_0xcb9b('0x5a')][_0x31d981][_0xcb9b('0x59')];if(_0x1910b1){var _0x493f23=path[_0xcb9b('0x53')](_0x598a24,_0x1910b1[_0xcb9b('0x5e')]);if(fs['existsSync'](_0x493f23)){fs[_0xcb9b('0x5f')](_0x493f23)[_0xcb9b('0x60')](fs['createWriteStream'](path['join'](_0x8a5e27,_0x1910b1['basename'])));}}}return BPromise[_0xcb9b('0x61')]()[_0xcb9b('0x15')](function(){return new BPromise(function(_0x1594c7,_0x1ec517){zipdir(_0x8a5e27,{'saveTo':_0x47ea5c},function(_0x59143e,_0x1890de){if(_0x59143e)return _0x1ec517(_0x59143e);return _0x1594c7(_0x1890de);});})[_0xcb9b('0x15')](function(){return new BPromise(function(_0x30f24f,_0x4820f9){rimraf(_0x8a5e27,function(_0xd4403a){if(_0xd4403a)_0x4820f9(_0xd4403a);return _0x30f24f();});});})[_0xcb9b('0x15')](function(){return _0x1f1346[_0xcb9b('0x62')](_0x47ea5c,_0x2be47f,function(_0x353c75){if(_0x353c75){console['log'](_0xcb9b('0x63'),_0x353c75);}else{fs[_0xcb9b('0x64')](_0x47ea5c);}});});});}else{return _0x1f1346['sendStatus'](0xc8);}})[_0xcb9b('0x25')](handleError(_0x1f1346,null));};
\ No newline at end of file
+var _0x8c44=['util','path','lodash','ioredis','../../components/parsers/qs','../../config/environment','redis','defaults','localhost','socket.io-emitter','./faxInteraction.socket','register','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','then','destroy','stack','name','index','map','FaxInteraction','rawAttributes','fieldName','type','key','getOptions','fax','query','user','catch','model','keys','filters','attributes','intersection','fields','includeAll','merge','options','find','create','update','body','params','describe','addMessage','FaxMessage','ids','hasOwnProperty','nolimit','sort','pick','where','FaxInteractionId','filter','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','include','findAll','rows','setTags','omit','Tag','color','emit','removeTags','download','toString','join','root','server','tmp','files','push','Attachment','Messages','createdAt','get','mkdirSync','length','createReadStream','createWriteStream','basename','log','err','unlinkSync','rimraf','zip-dir','moment','bluebird'];(function(_0x1e8970,_0x428496){var _0x274ea4=function(_0x3f0c02){while(--_0x3f0c02){_0x1e8970['push'](_0x1e8970['shift']());}};_0x274ea4(++_0x428496);}(_0x8c44,0x128));var _0x48c4=function(_0x5404e9,_0x132866){_0x5404e9=_0x5404e9-0x0;var _0x2d7c75=_0x8c44[_0x5404e9];return _0x2d7c75;};'use strict';var rimraf=require(_0x48c4('0x0'));var zipdir=require(_0x48c4('0x1'));var moment=require(_0x48c4('0x2'));var BPromise=require(_0x48c4('0x3'));var util=require(_0x48c4('0x4'));var path=require(_0x48c4('0x5'));var fs=require('fs');var _=require(_0x48c4('0x6'));var Redis=require(_0x48c4('0x7'));var interaction=require('../../components/interaction/service');var qs=require(_0x48c4('0x8'));var logger=require('../../config/logger')('api');var config=require(_0x48c4('0x9'));var db=require('../../mysqldb')['db'];config[_0x48c4('0xa')]=_[_0x48c4('0xb')](config[_0x48c4('0xa')],{'host':_0x48c4('0xc'),'port':0x18eb});var socket=require(_0x48c4('0xd'))(new Redis(config[_0x48c4('0xa')]));require(_0x48c4('0xe'))[_0x48c4('0xf')](socket);function respondWithStatusCode(_0x15270c,_0x3eeb40){_0x3eeb40=_0x3eeb40||0xcc;return function(_0x3db0a9){if(_0x3db0a9){return _0x15270c[_0x48c4('0x10')](_0x3eeb40);}return _0x15270c[_0x48c4('0x11')](_0x3eeb40)[_0x48c4('0x12')]();};}function respondWithResult(_0x1b0b8f,_0x413431){_0x413431=_0x413431||0xc8;return function(_0xfabdb9){if(_0xfabdb9){return _0x1b0b8f[_0x48c4('0x11')](_0x413431)[_0x48c4('0x13')](_0xfabdb9);}};}function respondWithFilteredResult(_0x4a0fee,_0x615fd4){return function(_0x45ad9d){if(_0x45ad9d){var _0x52b7f2=typeof _0x615fd4['offset']===_0x48c4('0x14')&&typeof _0x615fd4[_0x48c4('0x15')]==='undefined';var _0x5cfc48=_0x45ad9d[_0x48c4('0x16')];var _0x354673=_0x52b7f2?0x0:_0x615fd4[_0x48c4('0x17')];var _0xe0f67f=_0x52b7f2?_0x45ad9d[_0x48c4('0x16')]:_0x615fd4[_0x48c4('0x17')]+_0x615fd4['limit'];var _0x395f48;if(_0xe0f67f>=_0x5cfc48){_0xe0f67f=_0x5cfc48;_0x395f48=0xc8;}else{_0x395f48=0xce;}_0x4a0fee[_0x48c4('0x11')](_0x395f48);return _0x4a0fee[_0x48c4('0x18')](_0x48c4('0x19'),_0x354673+'-'+_0xe0f67f+'/'+_0x5cfc48)[_0x48c4('0x13')](_0x45ad9d);}return null;};}function saveUpdates(_0x4ce6c4){return function(_0x33b0a2){if(_0x33b0a2){return _0x33b0a2['update'](_0x4ce6c4)[_0x48c4('0x1a')](function(_0x3f2eb5){return _0x3f2eb5;});}return null;};}function removeEntity(_0x5e74e8){return function(_0x47a90c){if(_0x47a90c){return _0x47a90c[_0x48c4('0x1b')]()[_0x48c4('0x1a')](function(){_0x5e74e8[_0x48c4('0x11')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1ac733){return function(_0x477337){if(!_0x477337){_0x1ac733[_0x48c4('0x10')](0x194);}return _0x477337;};}function handleError(_0xf20cde,_0x47e712){_0x47e712=_0x47e712||0x1f4;return function(_0x24eb20){logger['error'](_0x24eb20[_0x48c4('0x1c')]);if(_0x24eb20[_0x48c4('0x1d')]){delete _0x24eb20[_0x48c4('0x1d')];}_0xf20cde[_0x48c4('0x11')](_0x47e712)['send'](_0x24eb20);};}exports[_0x48c4('0x1e')]=function(_0xd35e99,_0x2b3cb4){var _0xa89c37={};var _0x53fe1f=_[_0x48c4('0x1f')](db[_0x48c4('0x20')][_0x48c4('0x21')],function(_0x4390d8){return{'name':_0x4390d8[_0x48c4('0x22')],'type':_0x4390d8[_0x48c4('0x23')][_0x48c4('0x24')]};});_0xa89c37=qs[_0x48c4('0x25')](_0x53fe1f,_0xd35e99);return interaction['findAll'](_0x48c4('0x26'),_0xd35e99[_0x48c4('0x27')],_0xd35e99[_0x48c4('0x28')],_0xa89c37,_0x53fe1f)[_0x48c4('0x1a')](respondWithFilteredResult(_0x2b3cb4,_0xa89c37))[_0x48c4('0x29')](handleError(_0x2b3cb4,null));};exports['show']=function(_0x391110,_0x2b9fed){var _0x10d8f2={'raw':![],'where':{'id':_0x391110['params']['id']}},_0x440eb4={};_0x440eb4[_0x48c4('0x2a')]=_['keys'](db[_0x48c4('0x20')]['rawAttributes']);_0x440eb4[_0x48c4('0x27')]=_[_0x48c4('0x2b')](_0x391110[_0x48c4('0x27')]);_0x440eb4[_0x48c4('0x2c')]=_['intersection'](_0x440eb4[_0x48c4('0x2a')],_0x440eb4[_0x48c4('0x27')]);_0x10d8f2[_0x48c4('0x2d')]=_[_0x48c4('0x2e')](_0x440eb4[_0x48c4('0x2a')],qs[_0x48c4('0x2f')](_0x391110[_0x48c4('0x27')][_0x48c4('0x2f')]));_0x10d8f2[_0x48c4('0x2d')]=_0x10d8f2[_0x48c4('0x2d')]['length']?_0x10d8f2[_0x48c4('0x2d')]:_0x440eb4[_0x48c4('0x2a')];if(_0x391110[_0x48c4('0x27')][_0x48c4('0x30')]){_0x10d8f2['include']=[{'all':!![]}];}_0x10d8f2=_[_0x48c4('0x31')]({},_0x10d8f2,_0x391110[_0x48c4('0x32')]);return db[_0x48c4('0x20')][_0x48c4('0x33')](_0x10d8f2)['then'](handleEntityNotFound(_0x2b9fed,null))[_0x48c4('0x1a')](respondWithResult(_0x2b9fed,null))[_0x48c4('0x29')](handleError(_0x2b9fed,null));};exports[_0x48c4('0x34')]=function(_0x3d470f,_0x1029d7){return db[_0x48c4('0x20')][_0x48c4('0x34')](_0x3d470f['body'],{})[_0x48c4('0x1a')](respondWithResult(_0x1029d7,0xc9))[_0x48c4('0x29')](handleError(_0x1029d7,null));};exports[_0x48c4('0x35')]=function(_0x2fea30,_0x1636fc){if(_0x2fea30['body']['id']){delete _0x2fea30[_0x48c4('0x36')]['id'];}return db[_0x48c4('0x20')][_0x48c4('0x33')]({'where':{'id':_0x2fea30[_0x48c4('0x37')]['id']}})[_0x48c4('0x1a')](handleEntityNotFound(_0x1636fc,null))[_0x48c4('0x1a')](saveUpdates(_0x2fea30['body'],null))['then'](respondWithResult(_0x1636fc,null))[_0x48c4('0x29')](handleError(_0x1636fc,null));};exports[_0x48c4('0x1b')]=function(_0x29aa22,_0x15b77f){return db[_0x48c4('0x20')][_0x48c4('0x33')]({'where':{'id':_0x29aa22[_0x48c4('0x37')]['id']}})['then'](handleEntityNotFound(_0x15b77f,null))[_0x48c4('0x1a')](removeEntity(_0x15b77f,null))[_0x48c4('0x29')](handleError(_0x15b77f,null));};exports['describe']=function(_0x333169,_0x51ce45){return db[_0x48c4('0x20')][_0x48c4('0x38')]()[_0x48c4('0x1a')](respondWithResult(_0x51ce45,null))[_0x48c4('0x29')](handleError(_0x51ce45,null));};exports[_0x48c4('0x39')]=function(_0x514558,_0x3efb2b){return db[_0x48c4('0x3a')][_0x48c4('0x33')]({'where':{'id':_0x514558[_0x48c4('0x37')]['id']}})[_0x48c4('0x1a')](handleEntityNotFound(_0x3efb2b,null))[_0x48c4('0x1a')](function(_0x1b7c79){if(_0x1b7c79){return _0x1b7c79['addMessage'](_0x514558[_0x48c4('0x36')][_0x48c4('0x3b')],_['omit'](_0x514558[_0x48c4('0x36')],[_0x48c4('0x3b'),'id'])||{});}})[_0x48c4('0x1a')](respondWithResult(_0x3efb2b,null))[_0x48c4('0x29')](handleError(_0x3efb2b,null));};exports['getMessages']=function(_0x1fee33,_0x1c6e7e){var _0x2138d1={'raw':![],'where':{}};var _0xa3960a={};var _0xe64039={'count':0x0,'rows':[]};return db[_0x48c4('0x20')]['findOne']({'where':{'id':_0x1fee33[_0x48c4('0x37')]['id']}})[_0x48c4('0x1a')](handleEntityNotFound(_0x1c6e7e,null))['then'](function(_0x2a4ebc){if(_0x2a4ebc){_0xa3960a[_0x48c4('0x2a')]=_[_0x48c4('0x2b')](db[_0x48c4('0x3a')][_0x48c4('0x21')]);_0xa3960a['query']=_[_0x48c4('0x2b')](_0x1fee33[_0x48c4('0x27')]);_0xa3960a[_0x48c4('0x2c')]=_[_0x48c4('0x2e')](_0xa3960a['model'],_0xa3960a[_0x48c4('0x27')]);_0x2138d1[_0x48c4('0x2d')]=_['intersection'](_0xa3960a[_0x48c4('0x2a')],qs[_0x48c4('0x2f')](_0x1fee33[_0x48c4('0x27')][_0x48c4('0x2f')]));_0x2138d1[_0x48c4('0x2d')]=_0x2138d1[_0x48c4('0x2d')]['length']?_0x2138d1['attributes']:_0xa3960a[_0x48c4('0x2a')];if(!_0x1fee33[_0x48c4('0x27')][_0x48c4('0x3c')](_0x48c4('0x3d'))){_0x2138d1[_0x48c4('0x15')]=qs[_0x48c4('0x15')](_0x1fee33[_0x48c4('0x27')][_0x48c4('0x15')]);_0x2138d1[_0x48c4('0x17')]=qs['offset'](_0x1fee33['query']['offset']);}_0x2138d1['order']=qs[_0x48c4('0x3e')](_0x1fee33['query'][_0x48c4('0x3e')]);_0x2138d1['where']=qs[_0x48c4('0x2c')](_[_0x48c4('0x3f')](_0x1fee33['query'],_0xa3960a[_0x48c4('0x2c')]));_0x2138d1[_0x48c4('0x40')][_0x48c4('0x41')]=_0x2a4ebc['id'];if(_0x1fee33[_0x48c4('0x27')][_0x48c4('0x42')]){_0x2138d1['where']=_[_0x48c4('0x31')](_0x2138d1[_0x48c4('0x40')],{'$or':_[_0x48c4('0x1f')](_0x2138d1['attributes'],function(_0x3c7262){var _0x416788={};_0x416788[_0x3c7262]={'$like':'%'+_0x1fee33[_0x48c4('0x27')]['filter']+'%'};return _0x416788;})});}if(_0x1fee33[_0x48c4('0x27')][_0x48c4('0x43')]){var _0x21e385=_0x1fee33[_0x48c4('0x27')][_0x48c4('0x43')][_0x48c4('0x44')](',');var _0x227f95={};_0x227f95[_0x21e385[0x0]]={'$gte':moment(_0x21e385[0x1])[_0x48c4('0x45')](_0x48c4('0x46'))};_0x2138d1[_0x48c4('0x40')]=_[_0x48c4('0x31')](_0x2138d1[_0x48c4('0x40')],_0x227f95);}_0x2138d1=_[_0x48c4('0x31')]({},_0x2138d1,_0x1fee33[_0x48c4('0x32')]);return db['FaxMessage'][_0x48c4('0x16')]({'where':_0x2138d1['where']})[_0x48c4('0x1a')](function(_0x309b99){_0xe64039[_0x48c4('0x16')]=_0x309b99;if(_0x1fee33[_0x48c4('0x27')][_0x48c4('0x30')]){_0x2138d1[_0x48c4('0x47')]=[{'all':!![]}];}return db[_0x48c4('0x3a')][_0x48c4('0x48')](_0x2138d1);})['then'](function(_0x2a7522){_0xe64039[_0x48c4('0x49')]=_0x2a7522;return _0xe64039;});}})[_0x48c4('0x1a')](respondWithFilteredResult(_0x1c6e7e,_0x2138d1))[_0x48c4('0x29')](handleError(_0x1c6e7e,null));};exports['addTags']=function(_0x168926,_0x47775d){return db[_0x48c4('0x20')]['find']({'where':{'id':_0x168926['params']['id']}})[_0x48c4('0x1a')](handleEntityNotFound(_0x47775d,null))['then'](function(_0x5456fb){if(_0x5456fb){return _0x5456fb[_0x48c4('0x4a')](_0x168926[_0x48c4('0x36')][_0x48c4('0x3b')],_[_0x48c4('0x4b')](_0x168926[_0x48c4('0x36')],[_0x48c4('0x3b'),'id'])||{})['spread'](function(){return db[_0x48c4('0x4c')]['findAll']({'attributes':['id','name',_0x48c4('0x4d')],'where':{'id':_0x168926[_0x48c4('0x36')][_0x48c4('0x3b')]}});})[_0x48c4('0x1a')](function(_0x55d665){socket[_0x48c4('0x4e')]('faxInteractionTags:save',{'id':Number(_0x168926[_0x48c4('0x37')]['id']),'tags':_0x55d665||[]});return{'id':Number(_0x168926['params']['id']),'tags':_0x55d665||[]};});}})[_0x48c4('0x1a')](respondWithResult(_0x47775d,null))[_0x48c4('0x29')](handleError(_0x47775d,null));};exports[_0x48c4('0x4f')]=function(_0x46bf22,_0x47a85d){return db[_0x48c4('0x20')][_0x48c4('0x33')]({'where':{'id':_0x46bf22[_0x48c4('0x37')]['id']}})[_0x48c4('0x1a')](handleEntityNotFound(_0x47a85d,null))[_0x48c4('0x1a')](function(_0x229611){if(_0x229611){return _0x229611[_0x48c4('0x4f')](_0x46bf22[_0x48c4('0x27')][_0x48c4('0x3b')]);}})[_0x48c4('0x1a')](respondWithStatusCode(_0x47a85d,null))[_0x48c4('0x29')](handleError(_0x47a85d,null));};exports[_0x48c4('0x50')]=function(_0x1d1670,_0x176a9f){var _0x16a343=moment()['unix']()[_0x48c4('0x51')]();var _0x4b3922=path[_0x48c4('0x52')](config[_0x48c4('0x53')],_0x48c4('0x54'),'files',_0x48c4('0x55'));var _0x23bf0f=path[_0x48c4('0x52')](config[_0x48c4('0x53')],_0x48c4('0x54'),_0x48c4('0x56'),'attachments');var _0x127017=path[_0x48c4('0x52')](_0x4b3922,_0x16a343);var _0x271d5a=util[_0x48c4('0x45')]('transcript-%d-%s.zip',_0x1d1670[_0x48c4('0x37')]['id'],_0x16a343);var _0x135c7e=path['join'](_0x4b3922,_0x271d5a);var _0x4b0b93=[];_0x4b0b93[_0x48c4('0x57')]({'model':db[_0x48c4('0x58')],'as':'Attachment','raw':!![]});var _0x414882=[{'model':db[_0x48c4('0x3a')],'as':_0x48c4('0x59'),'attributes':['id',_0x48c4('0x36'),_0x48c4('0x5a')],'include':_0x4b0b93}];return db['FaxInteraction'][_0x48c4('0x33')]({'where':{'id':_0x1d1670['params']['id']},'include':_0x414882})['then'](handleEntityNotFound(_0x176a9f,null))[_0x48c4('0x1a')](function(_0x273ef2){if(_0x273ef2&&_0x273ef2[_0x48c4('0x59')]){var _0x213d9d=_0x273ef2[_0x48c4('0x5b')]({'plain':!![]});fs[_0x48c4('0x5c')](_0x127017);for(var _0x6c232b=0x0;_0x6c232b<_0x213d9d[_0x48c4('0x59')][_0x48c4('0x5d')];_0x6c232b++){var _0xed92cf=_0x213d9d['Messages'][_0x6c232b]['Attachment'];if(_0xed92cf){var _0x35d200=path[_0x48c4('0x52')](_0x23bf0f,_0xed92cf['basename']);if(fs['existsSync'](_0x35d200)){fs[_0x48c4('0x5e')](_0x35d200)['pipe'](fs[_0x48c4('0x5f')](path[_0x48c4('0x52')](_0x127017,_0xed92cf[_0x48c4('0x60')])));}}}return BPromise['resolve']()[_0x48c4('0x1a')](function(){return new BPromise(function(_0x349fdc,_0x5540a5){zipdir(_0x127017,{'saveTo':_0x135c7e},function(_0x44c9d4,_0x331828){if(_0x44c9d4)return _0x5540a5(_0x44c9d4);return _0x349fdc(_0x331828);});})[_0x48c4('0x1a')](function(){return new BPromise(function(_0x35f29c,_0x1ff09d){rimraf(_0x127017,function(_0x1ddfab){if(_0x1ddfab)_0x1ff09d(_0x1ddfab);return _0x35f29c();});});})[_0x48c4('0x1a')](function(){return _0x176a9f[_0x48c4('0x50')](_0x135c7e,_0x271d5a,function(_0x32f2a7){if(_0x32f2a7){console[_0x48c4('0x61')](_0x48c4('0x62'),_0x32f2a7);}else{fs[_0x48c4('0x63')](_0x135c7e);}});});});}else{return _0x176a9f['sendStatus'](0xc8);}})[_0x48c4('0x29')](handleError(_0x176a9f,null));};
\ No newline at end of file
index 1a3f24a..b015dd9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcf4a=['events','../../mysqldb','FaxInteraction','FaxMessage','setMaxListeners','update','remove','getUsers','then','setDataValue','Users','map','catch','hasOwnProperty','hook'];(function(_0x36c551,_0x1fa198){var _0x988e08=function(_0x362d0c){while(--_0x362d0c){_0x36c551['push'](_0x36c551['shift']());}};_0x988e08(++_0x1fa198);}(_0xcf4a,0x1b3));var _0xacf4=function(_0x372d83,_0x4ea7c8){_0x372d83=_0x372d83-0x0;var _0x3c28d9=_0xcf4a[_0x372d83];return _0x3c28d9;};'use strict';var EventEmitter=require(_0xacf4('0x0'));var FaxInteraction=require(_0xacf4('0x1'))['db'][_0xacf4('0x2')];var FaxMessage=require(_0xacf4('0x1'))['db'][_0xacf4('0x3')];var FaxInteractionEvents=new EventEmitter();FaxInteractionEvents[_0xacf4('0x4')](0x0);var events={'afterCreate':'save','afterUpdate':_0xacf4('0x5'),'afterDestroy':_0xacf4('0x6')};function emitEvent(_0x5181f7){return function(_0x3fe5fe,_0x2cb04d,_0x17fd5f){_0x3fe5fe[_0xacf4('0x7')]({'attributes':['id'],'raw':!![]})[_0xacf4('0x8')](function(_0x24089c){_0x3fe5fe[_0xacf4('0x9')](_0xacf4('0xa'),_0x24089c[_0xacf4('0xb')](function(_0x4d8a09){return{'id':_0x4d8a09['id']};}));return FaxMessage['findAll']({'where':{'FaxInteractionId':_0x3fe5fe['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0x4fa2d5){_0x3fe5fe[_0xacf4('0x9')]('unreadMessages',_0x4fa2d5['length']);FaxInteractionEvents['emit'](_0x5181f7+':'+_0x3fe5fe['id'],_0x3fe5fe);FaxInteractionEvents['emit'](_0x5181f7,_0x3fe5fe);_0x17fd5f(null);})[_0xacf4('0xc')](_0x17fd5f(null));};}for(var e in events){if(events[_0xacf4('0xd')](e)){var event=events[e];FaxInteraction[_0xacf4('0xe')](e,emitEvent(event));}}module['exports']=FaxInteractionEvents;
\ No newline at end of file
+var _0x7852=['map','unreadMessages','length','emit','catch','hasOwnProperty','exports','../../mysqldb','FaxInteraction','save','update','remove','getUsers','then','setDataValue','Users'];(function(_0x3f6022,_0x2d745f){var _0x2b5537=function(_0x442225){while(--_0x442225){_0x3f6022['push'](_0x3f6022['shift']());}};_0x2b5537(++_0x2d745f);}(_0x7852,0x137));var _0x2785=function(_0x572648,_0x4e2b16){_0x572648=_0x572648-0x0;var _0x3f1e61=_0x7852[_0x572648];return _0x3f1e61;};'use strict';var EventEmitter=require('events');var FaxInteraction=require(_0x2785('0x0'))['db'][_0x2785('0x1')];var FaxMessage=require('../../mysqldb')['db']['FaxMessage'];var FaxInteractionEvents=new EventEmitter();FaxInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x2785('0x2'),'afterUpdate':_0x2785('0x3'),'afterDestroy':_0x2785('0x4')};function emitEvent(_0x12abd0){return function(_0x5ab051,_0xe21cd0,_0x56efb3){_0x5ab051[_0x2785('0x5')]({'attributes':['id'],'raw':!![]})[_0x2785('0x6')](function(_0x53a3cf){_0x5ab051[_0x2785('0x7')](_0x2785('0x8'),_0x53a3cf[_0x2785('0x9')](function(_0x26be31){return{'id':_0x26be31['id']};}));return FaxMessage['findAll']({'where':{'FaxInteractionId':_0x5ab051['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0x35b29b){_0x5ab051['setDataValue'](_0x2785('0xa'),_0x35b29b[_0x2785('0xb')]);FaxInteractionEvents[_0x2785('0xc')](_0x12abd0+':'+_0x5ab051['id'],_0x5ab051);FaxInteractionEvents[_0x2785('0xc')](_0x12abd0,_0x5ab051);_0x56efb3(null);})[_0x2785('0xd')](_0x56efb3(null));};}for(var e in events){if(events[_0x2785('0xe')](e)){var event=events[e];FaxInteraction['hook'](e,emitEvent(event));}}module[_0x2785('0xf')]=FaxInteractionEvents;
\ No newline at end of file
index ec5e08d..88ccb2a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe944=['exports','define','FaxInteraction','fax_interactions','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','api','request-promise','../../config/environment','./faxInteraction.attributes'];(function(_0xa7429c,_0x3f6c95){var _0x57aacc=function(_0x276abe){while(--_0x276abe){_0xa7429c['push'](_0xa7429c['shift']());}};_0x57aacc(++_0x3f6c95);}(_0xe944,0x174));var _0x4e94=function(_0x2b6eb8,_0x1b1712){_0x2b6eb8=_0x2b6eb8-0x0;var _0x4325a2=_0xe944[_0x2b6eb8];return _0x4325a2;};'use strict';var _=require(_0x4e94('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x4e94('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x4e94('0x2'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x4e94('0x3'));var attributes=require(_0x4e94('0x4'));module[_0x4e94('0x5')]=function(_0xbb43ae,_0x4d00e5){return _0xbb43ae[_0x4e94('0x6')](_0x4e94('0x7'),attributes,{'tableName':_0x4e94('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x32bb46,_0x5a5823,_0x43d946){if(_0x32bb46['changed'](_0x4e94('0x9'))){_0x32bb46[_0x4e94('0xa')]=moment()[_0x4e94('0xb')](_0x4e94('0xc'));}_0x43d946(null,_0x32bb46);}}});};
\ No newline at end of file
+var _0xf273=['api','moment','request-promise','rimraf','./faxInteraction.attributes','exports','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','util','../../config/logger'];(function(_0x108c12,_0x457ebf){var _0x322347=function(_0x3050f5){while(--_0x3050f5){_0x108c12['push'](_0x108c12['shift']());}};_0x322347(++_0x457ebf);}(_0xf273,0xce));var _0x3f27=function(_0x230f34,_0x184d05){_0x230f34=_0x230f34-0x0;var _0x307db5=_0xf273[_0x230f34];return _0x307db5;};'use strict';var _=require('lodash');var util=require(_0x3f27('0x0'));var logger=require(_0x3f27('0x1'))(_0x3f27('0x2'));var moment=require(_0x3f27('0x3'));var BPromise=require('bluebird');var rp=require(_0x3f27('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x3f27('0x5'));var config=require('../../config/environment');var attributes=require(_0x3f27('0x6'));module[_0x3f27('0x7')]=function(_0x35e71f,_0x2f09b7){return _0x35e71f['define']('FaxInteraction',attributes,{'tableName':'fax_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x5a9c3c,_0x5741cf,_0x4e5095){if(_0x5a9c3c[_0x3f27('0x8')](_0x3f27('0x9'))){_0x5a9c3c[_0x3f27('0xa')]=moment()[_0x3f27('0xb')](_0x3f27('0xc'));}_0x4e5095(null,_0x5a9c3c);}}});};
\ No newline at end of file
index 1f53ec7..6feb259 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2c43=['../../config/logger','rpc','../../config/environment','client','http','localhost','socket.io-emitter','redis','./faxInteraction.socket','register','request','info','FaxInteraction,\x20%s,\x20%s','request\x20sent','FaxInteraction,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','UpdateFaxInteraction','FaxInteraction','update','body','options','where','limit','then','debug','addTags','ids','omit','spread','AddTags','stringify','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0xf78bea,_0x1afb22){var _0x1bdd09=function(_0x25a8ec){while(--_0x25a8ec){_0xf78bea['push'](_0xf78bea['shift']());}};_0x1bdd09(++_0x1afb22);}(_0x2c43,0x16b));var _0x32c4=function(_0x22ee52,_0x724643){_0x22ee52=_0x22ee52-0x0;var _0x54a704=_0x2c43[_0x22ee52];return _0x54a704;};'use strict';var _=require(_0x32c4('0x0'));var util=require(_0x32c4('0x1'));var moment=require(_0x32c4('0x2'));var BPromise=require(_0x32c4('0x3'));var rs=require(_0x32c4('0x4'));var fs=require('fs');var Redis=require(_0x32c4('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x32c4('0x6'))(_0x32c4('0x7'));var config=require(_0x32c4('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x32c4('0x9')][_0x32c4('0xa')]({'port':0x232a});config['redis']=_['defaults'](config['redis'],{'host':_0x32c4('0xb'),'port':0x18eb});var socket=require(_0x32c4('0xc'))(new Redis(config[_0x32c4('0xd')]));require(_0x32c4('0xe'))[_0x32c4('0xf')](socket);function respondWithRpcPromise(_0x5a6c4f,_0x545d2b,_0x2f9b89){return new BPromise(function(_0x264b09,_0x3b6b2e){return client[_0x32c4('0x10')](_0x5a6c4f,_0x2f9b89)['then'](function(_0x5940a5){logger[_0x32c4('0x11')](_0x32c4('0x12'),_0x545d2b,_0x32c4('0x13'));logger['debug'](_0x32c4('0x14'),_0x545d2b,_0x32c4('0x13'),JSON['stringify'](_0x5940a5));if(_0x5940a5[_0x32c4('0x15')]){if(_0x5940a5[_0x32c4('0x15')][_0x32c4('0x16')]===0x1f4){logger[_0x32c4('0x15')](_0x32c4('0x12'),_0x545d2b,_0x5940a5[_0x32c4('0x15')][_0x32c4('0x17')]);return _0x3b6b2e(_0x5940a5['error']['message']);}logger[_0x32c4('0x15')](_0x32c4('0x12'),_0x545d2b,_0x5940a5[_0x32c4('0x15')]['message']);return _0x264b09(_0x5940a5['error'][_0x32c4('0x17')]);}else{logger[_0x32c4('0x11')](_0x32c4('0x12'),_0x545d2b,_0x32c4('0x13'));_0x264b09(_0x5940a5[_0x32c4('0x18')]['message']);}})[_0x32c4('0x19')](function(_0x26f0f1){logger[_0x32c4('0x15')](_0x32c4('0x12'),_0x545d2b,_0x26f0f1);_0x3b6b2e(_0x26f0f1);});});}exports[_0x32c4('0x1a')]=function(_0x395584){var _0x457d74=this;return new Promise(function(_0x113fab,_0x27b381){return db[_0x32c4('0x1b')][_0x32c4('0x1c')](_0x395584[_0x32c4('0x1d')],{'raw':_0x395584[_0x32c4('0x1e')]?_0x395584[_0x32c4('0x1e')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x395584[_0x32c4('0x1e')]?_0x395584['options'][_0x32c4('0x1f')]||null:null,'attributes':_0x395584['options']?_0x395584[_0x32c4('0x1e')]['attributes']||null:null,'limit':_0x395584['options']?_0x395584[_0x32c4('0x1e')][_0x32c4('0x20')]||null:null})[_0x32c4('0x21')](function(_0x55eb9f){logger['info'](_0x32c4('0x1a'),_0x395584);logger[_0x32c4('0x22')](_0x32c4('0x1a'),_0x395584,JSON['stringify'](_0x55eb9f));_0x113fab(_0x55eb9f);})[_0x32c4('0x19')](function(_0x22516f){logger[_0x32c4('0x15')](_0x32c4('0x1a'),_0x22516f[_0x32c4('0x17')],_0x395584);_0x27b381(_0x457d74[_0x32c4('0x15')](0x1f4,_0x22516f[_0x32c4('0x17')]));});});};exports['AddTagsToFaxInteraction']=function(_0x7cf64a){return new Promise(function(_0xc5cb1f,_0x310ed9){return db[_0x32c4('0x1b')]['find']({'where':_0x7cf64a[_0x32c4('0x1e')]?_0x7cf64a['options'][_0x32c4('0x1f')]||null:null})[_0x32c4('0x21')](function(_0xa592de){if(_0xa592de){return _0xa592de[_0x32c4('0x23')](_0x7cf64a['body'][_0x32c4('0x24')],_[_0x32c4('0x25')](_0x7cf64a[_0x32c4('0x1d')],[_0x32c4('0x24'),'id'])||{});}})[_0x32c4('0x26')](function(_0x1979df){logger[_0x32c4('0x11')](_0x32c4('0x27'),_0x7cf64a);logger[_0x32c4('0x22')](_0x32c4('0x27'),_0x7cf64a,JSON[_0x32c4('0x28')](_0x1979df));_0xc5cb1f(_0x1979df);})[_0x32c4('0x19')](function(_0x4a9b9e){logger[_0x32c4('0x15')](_0x32c4('0x27'),_0x4a9b9e['message'],_0x7cf64a);_0x310ed9(_this[_0x32c4('0x15')](0x1f4,_0x4a9b9e[_0x32c4('0x17')]));});});};
\ No newline at end of file
+var _0x71bb=['redis','socket.io-emitter','./faxInteraction.socket','info','request\x20sent','debug','FaxInteraction,\x20%s,\x20%s,\x20%s','stringify','error','message','FaxInteraction,\x20%s,\x20%s','result','UpdateFaxInteraction','FaxInteraction','update','body','options','where','attributes','limit','then','catch','AddTagsToFaxInteraction','find','omit','ids','spread','AddTags','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','jayson/promise','http'];(function(_0x175e2a,_0x864265){var _0x22621c=function(_0x45b01e){while(--_0x45b01e){_0x175e2a['push'](_0x175e2a['shift']());}};_0x22621c(++_0x864265);}(_0x71bb,0x169));var _0xb71b=function(_0x2c763a,_0xabb693){_0x2c763a=_0x2c763a-0x0;var _0x2dff3e=_0x71bb[_0x2c763a];return _0x2dff3e;};'use strict';var _=require(_0xb71b('0x0'));var util=require(_0xb71b('0x1'));var moment=require(_0xb71b('0x2'));var BPromise=require(_0xb71b('0x3'));var rs=require(_0xb71b('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb71b('0x5'))['db'];var utils=require(_0xb71b('0x6'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0xb71b('0x7'));var client=jayson['client'][_0xb71b('0x8')]({'port':0x232a});config['redis']=_['defaults'](config[_0xb71b('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0xb71b('0xa'))(new Redis(config[_0xb71b('0x9')]));require(_0xb71b('0xb'))['register'](socket);function respondWithRpcPromise(_0xbeecf3,_0x2942cb,_0x14de62){return new BPromise(function(_0xcdda21,_0x3e00fa){return client['request'](_0xbeecf3,_0x14de62)['then'](function(_0x8ce730){logger[_0xb71b('0xc')]('FaxInteraction,\x20%s,\x20%s',_0x2942cb,_0xb71b('0xd'));logger[_0xb71b('0xe')](_0xb71b('0xf'),_0x2942cb,_0xb71b('0xd'),JSON[_0xb71b('0x10')](_0x8ce730));if(_0x8ce730['error']){if(_0x8ce730[_0xb71b('0x11')]['code']===0x1f4){logger[_0xb71b('0x11')]('FaxInteraction,\x20%s,\x20%s',_0x2942cb,_0x8ce730[_0xb71b('0x11')][_0xb71b('0x12')]);return _0x3e00fa(_0x8ce730[_0xb71b('0x11')][_0xb71b('0x12')]);}logger['error'](_0xb71b('0x13'),_0x2942cb,_0x8ce730[_0xb71b('0x11')]['message']);return _0xcdda21(_0x8ce730['error'][_0xb71b('0x12')]);}else{logger[_0xb71b('0xc')]('FaxInteraction,\x20%s,\x20%s',_0x2942cb,_0xb71b('0xd'));_0xcdda21(_0x8ce730[_0xb71b('0x14')][_0xb71b('0x12')]);}})['catch'](function(_0x4eab05){logger[_0xb71b('0x11')](_0xb71b('0x13'),_0x2942cb,_0x4eab05);_0x3e00fa(_0x4eab05);});});}exports[_0xb71b('0x15')]=function(_0xf5eb41){var _0x34ef94=this;return new Promise(function(_0x3baf97,_0x4a694d){return db[_0xb71b('0x16')][_0xb71b('0x17')](_0xf5eb41[_0xb71b('0x18')],{'raw':_0xf5eb41[_0xb71b('0x19')]?_0xf5eb41['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xf5eb41['options']?_0xf5eb41[_0xb71b('0x19')][_0xb71b('0x1a')]||null:null,'attributes':_0xf5eb41[_0xb71b('0x19')]?_0xf5eb41[_0xb71b('0x19')][_0xb71b('0x1b')]||null:null,'limit':_0xf5eb41['options']?_0xf5eb41['options'][_0xb71b('0x1c')]||null:null})[_0xb71b('0x1d')](function(_0x39ffee){logger[_0xb71b('0xc')](_0xb71b('0x15'),_0xf5eb41);logger[_0xb71b('0xe')]('UpdateFaxInteraction',_0xf5eb41,JSON['stringify'](_0x39ffee));_0x3baf97(_0x39ffee);})[_0xb71b('0x1e')](function(_0x55c3f2){logger['error'](_0xb71b('0x15'),_0x55c3f2[_0xb71b('0x12')],_0xf5eb41);_0x4a694d(_0x34ef94[_0xb71b('0x11')](0x1f4,_0x55c3f2[_0xb71b('0x12')]));});});};exports[_0xb71b('0x1f')]=function(_0x307cd7){return new Promise(function(_0x453c9c,_0xa6bd19){return db[_0xb71b('0x16')][_0xb71b('0x20')]({'where':_0x307cd7[_0xb71b('0x19')]?_0x307cd7['options']['where']||null:null})[_0xb71b('0x1d')](function(_0x3c85f4){if(_0x3c85f4){return _0x3c85f4['addTags'](_0x307cd7[_0xb71b('0x18')]['ids'],_[_0xb71b('0x21')](_0x307cd7[_0xb71b('0x18')],[_0xb71b('0x22'),'id'])||{});}})[_0xb71b('0x23')](function(_0x2b1e09){logger['info'](_0xb71b('0x24'),_0x307cd7);logger['debug'](_0xb71b('0x24'),_0x307cd7,JSON[_0xb71b('0x10')](_0x2b1e09));_0x453c9c(_0x2b1e09);})[_0xb71b('0x1e')](function(_0x25710d){logger['error'](_0xb71b('0x24'),_0x25710d[_0xb71b('0x12')],_0x307cd7);_0xa6bd19(_this[_0xb71b('0x11')](0x1f4,_0x25710d['message']));});});};
\ No newline at end of file
index b9c341b..14b22c5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7404=['save','remove','update','emit','removeListener','register','faxInteraction:','./faxInteraction.events'];(function(_0x5c33bf,_0x4a1b18){var _0x101e3e=function(_0x350b43){while(--_0x350b43){_0x5c33bf['push'](_0x5c33bf['shift']());}};_0x101e3e(++_0x4a1b18);}(_0x7404,0x15f));var _0x4740=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x7404[_0x1facfa];return _0x9ec701;};'use strict';var FaxInteractionEvents=require(_0x4740('0x0'));var events=[_0x4740('0x1'),_0x4740('0x2'),_0x4740('0x3')];function createListener(_0x466b99,_0x207417){return function(_0x504cbe){_0x207417[_0x4740('0x4')](_0x466b99,_0x504cbe);};}function removeListener(_0x35b834,_0xb6b3f){return function(){FaxInteractionEvents[_0x4740('0x5')](_0x35b834,_0xb6b3f);};}exports[_0x4740('0x6')]=function(_0xb8fbb0){for(var _0x1c85ed=0x0,_0x3b3c14=events['length'];_0x1c85ed<_0x3b3c14;_0x1c85ed++){var _0x232306=events[_0x1c85ed];var _0x2a5f3c=createListener(_0x4740('0x7')+_0x232306,_0xb8fbb0);FaxInteractionEvents['on'](_0x232306,_0x2a5f3c);}};
\ No newline at end of file
+var _0x1d13=['save','remove','update','emit','removeListener','register'];(function(_0xcf51a5,_0x26c87c){var _0x51205c=function(_0x384bd4){while(--_0x384bd4){_0xcf51a5['push'](_0xcf51a5['shift']());}};_0x51205c(++_0x26c87c);}(_0x1d13,0x144));var _0x31d1=function(_0x1dd374,_0x50f2e9){_0x1dd374=_0x1dd374-0x0;var _0x2a0e58=_0x1d13[_0x1dd374];return _0x2a0e58;};'use strict';var FaxInteractionEvents=require('./faxInteraction.events');var events=[_0x31d1('0x0'),_0x31d1('0x1'),_0x31d1('0x2')];function createListener(_0x2d86fd,_0x3a8a9d){return function(_0x23d785){_0x3a8a9d[_0x31d1('0x3')](_0x2d86fd,_0x23d785);};}function removeListener(_0x4f58bb,_0x85cab9){return function(){FaxInteractionEvents[_0x31d1('0x4')](_0x4f58bb,_0x85cab9);};}exports[_0x31d1('0x5')]=function(_0x5cdc13){for(var _0x249a63=0x0,_0xb25c78=events['length'];_0x249a63<_0xb25c78;_0x249a63++){var _0x198de6=events[_0x249a63];var _0x4aced7=createListener('faxInteraction:'+_0x198de6,_0x5cdc13);FaxInteractionEvents['on'](_0x198de6,_0x4aced7);}};
\ No newline at end of file
index a11ee88..e9b42d9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2c8e=['addTags','put','faxinteraction:update','delete','faxinteraction:destroy','removeTags','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxInteraction.controller','isAuthenticated','index','get','/describe','/:id','getMessages','/:id/download','download','post','create','/:id/messages','addMessage','/:id/tags','tracked','fax'];(function(_0x5ef581,_0x4df63f){var _0x42a042=function(_0x57c1e2){while(--_0x57c1e2){_0x5ef581['push'](_0x5ef581['shift']());}};_0x42a042(++_0x4df63f);}(_0x2c8e,0x1a7));var _0xe2c8=function(_0x22f50a,_0x293bae){_0x22f50a=_0x22f50a-0x0;var _0xc90790=_0x2c8e[_0x22f50a];return _0xc90790;};'use strict';var multer=require(_0xe2c8('0x0'));var util=require(_0xe2c8('0x1'));var path=require(_0xe2c8('0x2'));var timeout=require(_0xe2c8('0x3'));var express=require(_0xe2c8('0x4'));var router=express[_0xe2c8('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xe2c8('0x6'));var interaction=require(_0xe2c8('0x7'));var config=require(_0xe2c8('0x8'));var controller=require(_0xe2c8('0x9'));router['get']('/',auth[_0xe2c8('0xa')](),controller[_0xe2c8('0xb')]);router[_0xe2c8('0xc')](_0xe2c8('0xd'),auth[_0xe2c8('0xa')](),controller['describe']);router[_0xe2c8('0xc')](_0xe2c8('0xe'),auth[_0xe2c8('0xa')](),controller['show']);router['get']('/:id/messages',auth['isAuthenticated'](),controller[_0xe2c8('0xf')]);router[_0xe2c8('0xc')](_0xe2c8('0x10'),auth[_0xe2c8('0xa')](),controller[_0xe2c8('0x11')]);router[_0xe2c8('0x12')]('/',auth['isAuthenticated'](),controller[_0xe2c8('0x13')]);router[_0xe2c8('0x12')](_0xe2c8('0x14'),auth[_0xe2c8('0xa')](),controller[_0xe2c8('0x15')]);router[_0xe2c8('0x12')](_0xe2c8('0x16'),auth[_0xe2c8('0xa')](),interaction[_0xe2c8('0x17')](_0xe2c8('0x18'),'faxinteraction:addtags'),controller[_0xe2c8('0x19')]);router[_0xe2c8('0x1a')]('/:id',auth[_0xe2c8('0xa')](),interaction[_0xe2c8('0x17')](_0xe2c8('0x18'),_0xe2c8('0x1b')),controller['update']);router[_0xe2c8('0x1c')]('/:id',auth[_0xe2c8('0xa')](),interaction[_0xe2c8('0x17')]('fax',_0xe2c8('0x1d')),controller['destroy']);router[_0xe2c8('0x1c')](_0xe2c8('0x16'),auth[_0xe2c8('0xa')](),controller[_0xe2c8('0x1e')]);module[_0xe2c8('0x1f')]=router;
\ No newline at end of file
+var _0xed3c=['create','tracked','fax','faxinteraction:addtags','addTags','put','/:id','faxinteraction:update','delete','faxinteraction:destroy','removeTags','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./faxInteraction.controller','get','index','/describe','isAuthenticated','describe','show','/:id/messages','getMessages','download','post'];(function(_0x5eeb7d,_0x54a3ae){var _0x34b723=function(_0x4677bd){while(--_0x4677bd){_0x5eeb7d['push'](_0x5eeb7d['shift']());}};_0x34b723(++_0x54a3ae);}(_0xed3c,0xa1));var _0xced3=function(_0x4c76ad,_0x24bdab){_0x4c76ad=_0x4c76ad-0x0;var _0xde0a18=_0xed3c[_0x4c76ad];return _0xde0a18;};'use strict';var multer=require(_0xced3('0x0'));var util=require('util');var path=require(_0xced3('0x1'));var timeout=require(_0xced3('0x2'));var express=require(_0xced3('0x3'));var router=express[_0xced3('0x4')]();var fs_extra=require(_0xced3('0x5'));var auth=require(_0xced3('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xced3('0x7'));var controller=require(_0xced3('0x8'));router[_0xced3('0x9')]('/',auth['isAuthenticated'](),controller[_0xced3('0xa')]);router[_0xced3('0x9')](_0xced3('0xb'),auth[_0xced3('0xc')](),controller[_0xced3('0xd')]);router[_0xced3('0x9')]('/:id',auth[_0xced3('0xc')](),controller[_0xced3('0xe')]);router[_0xced3('0x9')](_0xced3('0xf'),auth[_0xced3('0xc')](),controller[_0xced3('0x10')]);router[_0xced3('0x9')]('/:id/download',auth[_0xced3('0xc')](),controller[_0xced3('0x11')]);router[_0xced3('0x12')]('/',auth[_0xced3('0xc')](),controller[_0xced3('0x13')]);router[_0xced3('0x12')](_0xced3('0xf'),auth[_0xced3('0xc')](),controller['addMessage']);router[_0xced3('0x12')]('/:id/tags',auth[_0xced3('0xc')](),interaction[_0xced3('0x14')](_0xced3('0x15'),_0xced3('0x16')),controller[_0xced3('0x17')]);router[_0xced3('0x18')](_0xced3('0x19'),auth['isAuthenticated'](),interaction[_0xced3('0x14')](_0xced3('0x15'),_0xced3('0x1a')),controller['update']);router[_0xced3('0x1b')](_0xced3('0x19'),auth[_0xced3('0xc')](),interaction[_0xced3('0x14')](_0xced3('0x15'),_0xced3('0x1c')),controller['destroy']);router[_0xced3('0x1b')]('/:id/tags',auth[_0xced3('0xc')](),controller[_0xced3('0x1d')]);module['exports']=router;
\ No newline at end of file
index c92595a..32e5b54 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf1e1=['BOOLEAN','out','DATE','sequelize','TEXT'];(function(_0x53edc4,_0x222116){var _0xa1bc29=function(_0x1d9a87){while(--_0x1d9a87){_0x53edc4['push'](_0x53edc4['shift']());}};_0xa1bc29(++_0x222116);}(_0xf1e1,0x102));var _0x1f1e=function(_0x5a558e,_0x2c0473){_0x5a558e=_0x5a558e-0x0;var _0x44eb26=_0xf1e1[_0x5a558e];return _0x44eb26;};'use strict';var Sequelize=require(_0x1f1e('0x0'));module['exports']={'body':{'type':Sequelize[_0x1f1e('0x1')]('medium'),'allowNull':![]},'read':{'type':Sequelize[_0x1f1e('0x2')],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in',_0x1f1e('0x3')),'defaultValue':_0x1f1e('0x3'),'allowNull':![]},'failMessage':{'type':Sequelize[_0x1f1e('0x1')],'defaultValue':null},'readAt':{'type':Sequelize[_0x1f1e('0x4')]}};
\ No newline at end of file
+var _0x0bde=['ENUM','out','DATE','exports','medium','BOOLEAN'];(function(_0x4311bf,_0x3de857){var _0x1fcc16=function(_0x510076){while(--_0x510076){_0x4311bf['push'](_0x4311bf['shift']());}};_0x1fcc16(++_0x3de857);}(_0x0bde,0xe7));var _0xe0bd=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x0bde[_0x321bb2];return _0x9c12ed;};'use strict';var Sequelize=require('sequelize');module[_0xe0bd('0x0')]={'body':{'type':Sequelize['TEXT'](_0xe0bd('0x1')),'allowNull':![]},'read':{'type':Sequelize[_0xe0bd('0x2')],'defaultValue':![]},'direction':{'type':Sequelize[_0xe0bd('0x3')]('in',_0xe0bd('0x4')),'defaultValue':_0xe0bd('0x4'),'allowNull':![]},'failMessage':{'type':Sequelize['TEXT'],'defaultValue':null},'readAt':{'type':Sequelize[_0xe0bd('0x5')]}};
\ No newline at end of file
index 3228fd2..84ec1e3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x86bf=['files','eml-format','rimraf','zip-dir','bluebird','mustache','util','sox','fs-extra','lodash','squel','crypto','jsforce','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./faxMessage.socket','jayson/promise','client','http','request','then','FaxMessage,\x20%s,\x20%s','debug','request\x20sent','error','code','message','info','catch','status','json','offset','undefined','count','limit','Content-Range','apply','reject','destroy','end','sendStatus','stack','name','index','FaxMessage','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','show','find','update','body','params','describe','../../config/logger','fax-interactions','read','readAt','format','UserId','user','agent','get','FaxInteraction','FaxInteractionId','isNil','read1stAt','YYYY-MM-DD\x20HH:mm:ss','[FAXMESSAGE: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','User','fullname','email','internal','manual','SIP/%s','channel','motionChannel','event','accept','EventManager','acceptmessage','[FAXMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','interaction','stringify','RejectMessage','ContactId','Sequelize','contact','interface','create','CmContact','findOne','fax','Attachment','SendFax','FaxAccountId','basename','AttachmentId','download','join','root','server'];(function(_0x2c0697,_0x15c276){var _0x4068d5=function(_0x19d47e){while(--_0x19d47e){_0x2c0697['push'](_0x2c0697['shift']());}};_0x4068d5(++_0x15c276);}(_0x86bf,0x93));var _0xf86b=function(_0x586c14,_0x203b1f){_0x586c14=_0x586c14-0x0;var _0x214886=_0x86bf[_0x586c14];return _0x214886;};'use strict';var emlformat=require(_0xf86b('0x0'));var rimraf=require(_0xf86b('0x1'));var zipdir=require(_0xf86b('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xf86b('0x3'));var Mustache=require(_0xf86b('0x4'));var util=require(_0xf86b('0x5'));var path=require('path');var sox=require(_0xf86b('0x6'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xf86b('0x7'));var _=require(_0xf86b('0x8'));var squel=require(_0xf86b('0x9'));var crypto=require(_0xf86b('0xa'));var jsforce=require(_0xf86b('0xb'));var deskjs=require('desk.js');var toCsv=require(_0xf86b('0xc'));var querystring=require(_0xf86b('0xd'));var Papa=require(_0xf86b('0xe'));var Redis=require(_0xf86b('0xf'));var authService=require(_0xf86b('0x10'));var qs=require(_0xf86b('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xf86b('0x12'));var utils=require(_0xf86b('0x13'));var config=require(_0xf86b('0x14'));var licenseUtil=require(_0xf86b('0x15'));var db=require(_0xf86b('0x16'))['db'];config[_0xf86b('0x17')]=_[_0xf86b('0x18')](config['redis'],{'host':_0xf86b('0x19'),'port':0x18eb});var socket=require(_0xf86b('0x1a'))(new Redis(config[_0xf86b('0x17')]));require(_0xf86b('0x1b'))['register'](socket);var jayson=require(_0xf86b('0x1c'));var client=jayson[_0xf86b('0x1d')][_0xf86b('0x1e')]({'port':0x232c});var client9002=jayson['client'][_0xf86b('0x1e')]({'port':0x232a});function respondWithRpcPromise(_0x30988b,_0x2fe530,_0xac4a2a,_0x44c13b){return new BPromise(function(_0x20905b,_0x3bc7d7){var _0xe3fba7=_0x44c13b||client;return _0xe3fba7[_0xf86b('0x1f')](_0x30988b,_0xac4a2a)[_0xf86b('0x20')](function(_0x26036f){logger['info'](_0xf86b('0x21'),_0x2fe530,'request\x20sent');logger[_0xf86b('0x22')]('FaxMessage,\x20%s,\x20%s,\x20%s',_0x2fe530,_0xf86b('0x23'),JSON['stringify'](_0x26036f));if(_0x26036f[_0xf86b('0x24')]){if(_0x26036f[_0xf86b('0x24')][_0xf86b('0x25')]===0x1f4){logger['error'](_0xf86b('0x21'),_0x2fe530,_0x26036f['error'][_0xf86b('0x26')]);return _0x3bc7d7(_0x26036f[_0xf86b('0x24')][_0xf86b('0x26')]);}logger['error']('FaxMessage,\x20%s,\x20%s',_0x2fe530,_0x26036f[_0xf86b('0x24')][_0xf86b('0x26')]);return _0x20905b(_0x26036f[_0xf86b('0x24')][_0xf86b('0x26')]);}else{logger[_0xf86b('0x27')](_0xf86b('0x21'),_0x2fe530,'request\x20sent');_0x20905b(_0x26036f['result'][_0xf86b('0x26')]);}})[_0xf86b('0x28')](function(_0x526da7){logger[_0xf86b('0x24')](_0xf86b('0x21'),_0x2fe530,_0x526da7);_0x3bc7d7(_0x526da7);});});}function respondWithStatusCode(_0x39b6cd,_0x4ba6a6){_0x4ba6a6=_0x4ba6a6||0xcc;return function(_0x486156){if(_0x486156){return _0x39b6cd['sendStatus'](_0x4ba6a6);}return _0x39b6cd[_0xf86b('0x29')](_0x4ba6a6)['end']();};}function respondWithResult(_0x43241a,_0x586064){_0x586064=_0x586064||0xc8;return function(_0x1ed392){if(_0x1ed392){return _0x43241a[_0xf86b('0x29')](_0x586064)[_0xf86b('0x2a')](_0x1ed392);}};}function respondWithFilteredResult(_0x5d4dcd,_0x53bec2){return function(_0x25fc56){if(_0x25fc56){var _0x22e5e9=typeof _0x53bec2[_0xf86b('0x2b')]===_0xf86b('0x2c')&&typeof _0x53bec2['limit']==='undefined';var _0xa008dd=_0x25fc56[_0xf86b('0x2d')];var _0x164107=_0x22e5e9?0x0:_0x53bec2['offset'];var _0x1b553e=_0x22e5e9?_0x25fc56[_0xf86b('0x2d')]:_0x53bec2[_0xf86b('0x2b')]+_0x53bec2[_0xf86b('0x2e')];var _0xb1fd4;if(_0x1b553e>=_0xa008dd){_0x1b553e=_0xa008dd;_0xb1fd4=0xc8;}else{_0xb1fd4=0xce;}_0x5d4dcd[_0xf86b('0x29')](_0xb1fd4);return _0x5d4dcd['set'](_0xf86b('0x2f'),_0x164107+'-'+_0x1b553e+'/'+_0xa008dd)[_0xf86b('0x2a')](_0x25fc56);}return null;};}function patchUpdates(_0x5bb618){return function(_0x5da2d2){try{jsonpatch[_0xf86b('0x30')](_0x5da2d2,_0x5bb618,!![]);}catch(_0x3a7490){return BPromise[_0xf86b('0x31')](_0x3a7490);}return _0x5da2d2['save']();};}function saveUpdates(_0x8c32a5,_0x5a7f6e){return function(_0x585c7b){if(_0x585c7b){return _0x585c7b['update'](_0x8c32a5)[_0xf86b('0x20')](function(_0x317081){return _0x317081;});}return null;};}function removeEntity(_0xbc042f,_0xff3f8f){return function(_0x39cdd0){if(_0x39cdd0){return _0x39cdd0[_0xf86b('0x32')]()[_0xf86b('0x20')](function(){_0xbc042f['status'](0xcc)[_0xf86b('0x33')]();});}};}function handleEntityNotFound(_0x40190e,_0x28535e){return function(_0x4f2ebf){if(!_0x4f2ebf){_0x40190e[_0xf86b('0x34')](0x194);}return _0x4f2ebf;};}function handleError(_0x1e2bca,_0xa3f8ec){_0xa3f8ec=_0xa3f8ec||0x1f4;return function(_0x34ae3c){logger[_0xf86b('0x24')](_0x34ae3c[_0xf86b('0x35')]);if(_0x34ae3c['name']){delete _0x34ae3c[_0xf86b('0x36')];}_0x1e2bca[_0xf86b('0x29')](_0xa3f8ec)['send'](_0x34ae3c);};}exports[_0xf86b('0x37')]=function(_0x613ff3,_0x248e75){var _0x1e1ba5={},_0x10713c={},_0x246244={'count':0x0,'rows':[]};var _0x5bc220=_['map'](db[_0xf86b('0x38')][_0xf86b('0x39')],function(_0x1f599a){return{'name':_0x1f599a[_0xf86b('0x3a')],'type':_0x1f599a[_0xf86b('0x3b')][_0xf86b('0x3c')]};});_0x10713c[_0xf86b('0x3d')]=_[_0xf86b('0x3e')](_0x5bc220,_0xf86b('0x36'));_0x10713c[_0xf86b('0x3f')]=_[_0xf86b('0x40')](_0x613ff3['query']);_0x10713c[_0xf86b('0x41')]=_[_0xf86b('0x42')](_0x10713c['model'],_0x10713c[_0xf86b('0x3f')]);_0x1e1ba5[_0xf86b('0x43')]=_[_0xf86b('0x42')](_0x10713c[_0xf86b('0x3d')],qs[_0xf86b('0x44')](_0x613ff3[_0xf86b('0x3f')][_0xf86b('0x44')]));_0x1e1ba5[_0xf86b('0x43')]=_0x1e1ba5[_0xf86b('0x43')][_0xf86b('0x45')]?_0x1e1ba5['attributes']:_0x10713c[_0xf86b('0x3d')];if(!_0x613ff3[_0xf86b('0x3f')][_0xf86b('0x46')](_0xf86b('0x47'))){_0x1e1ba5[_0xf86b('0x2e')]=qs[_0xf86b('0x2e')](_0x613ff3[_0xf86b('0x3f')][_0xf86b('0x2e')]);_0x1e1ba5[_0xf86b('0x2b')]=qs[_0xf86b('0x2b')](_0x613ff3[_0xf86b('0x3f')][_0xf86b('0x2b')]);}_0x1e1ba5[_0xf86b('0x48')]=qs[_0xf86b('0x49')](_0x613ff3[_0xf86b('0x3f')]['sort']);_0x1e1ba5[_0xf86b('0x4a')]=qs[_0xf86b('0x41')](_[_0xf86b('0x4b')](_0x613ff3[_0xf86b('0x3f')],_0x10713c['filters']),_0x5bc220);if(_0x613ff3['query'][_0xf86b('0x4c')]){_0x1e1ba5[_0xf86b('0x4a')]=_[_0xf86b('0x4d')](_0x1e1ba5[_0xf86b('0x4a')],{'$or':_[_0xf86b('0x3e')](_0x5bc220,function(_0x473a55){if(_0x473a55[_0xf86b('0x3b')]!==_0xf86b('0x4e')){var _0x3d52e7={};_0x3d52e7[_0x473a55[_0xf86b('0x36')]]={'$like':'%'+_0x613ff3[_0xf86b('0x3f')][_0xf86b('0x4c')]+'%'};return _0x3d52e7;}})});}_0x1e1ba5=_[_0xf86b('0x4d')]({},_0x1e1ba5,_0x613ff3[_0xf86b('0x4f')]);var _0x1a3de7={'where':_0x1e1ba5[_0xf86b('0x4a')]};return db['FaxMessage'][_0xf86b('0x2d')](_0x1a3de7)[_0xf86b('0x20')](function(_0x3e9800){_0x246244['count']=_0x3e9800;if(_0x613ff3[_0xf86b('0x3f')][_0xf86b('0x50')]){_0x1e1ba5[_0xf86b('0x51')]=[{'all':!![]}];}return db['FaxMessage'][_0xf86b('0x52')](_0x1e1ba5);})['then'](function(_0x2f6639){_0x246244[_0xf86b('0x53')]=_0x2f6639;return _0x246244;})[_0xf86b('0x20')](respondWithFilteredResult(_0x248e75,_0x1e1ba5))[_0xf86b('0x28')](handleError(_0x248e75,null));};exports[_0xf86b('0x54')]=function(_0x45bb22,_0x126b7a){var _0x27266e={'raw':!![],'where':{'id':_0x45bb22['params']['id']}},_0x48da50={};_0x48da50[_0xf86b('0x3d')]=_[_0xf86b('0x40')](db['FaxMessage'][_0xf86b('0x39')]);_0x48da50['query']=_['keys'](_0x45bb22[_0xf86b('0x3f')]);_0x48da50[_0xf86b('0x41')]=_[_0xf86b('0x42')](_0x48da50[_0xf86b('0x3d')],_0x48da50['query']);_0x27266e[_0xf86b('0x43')]=_['intersection'](_0x48da50[_0xf86b('0x3d')],qs[_0xf86b('0x44')](_0x45bb22['query'][_0xf86b('0x44')]));_0x27266e[_0xf86b('0x43')]=_0x27266e[_0xf86b('0x43')]['length']?_0x27266e['attributes']:_0x48da50['model'];if(_0x45bb22[_0xf86b('0x3f')][_0xf86b('0x50')]){_0x27266e[_0xf86b('0x51')]=[{'all':!![]}];}_0x27266e=_['merge']({},_0x27266e,_0x45bb22[_0xf86b('0x4f')]);return db[_0xf86b('0x38')][_0xf86b('0x55')](_0x27266e)[_0xf86b('0x20')](handleEntityNotFound(_0x126b7a,null))['then'](respondWithResult(_0x126b7a,null))[_0xf86b('0x28')](handleError(_0x126b7a,null));};exports[_0xf86b('0x56')]=function(_0x1e2df4,_0x5c3b0b){if(_0x1e2df4[_0xf86b('0x57')]['id']){delete _0x1e2df4[_0xf86b('0x57')]['id'];}return db[_0xf86b('0x38')][_0xf86b('0x55')]({'where':{'id':_0x1e2df4['params']['id']}})[_0xf86b('0x20')](handleEntityNotFound(_0x5c3b0b,null))[_0xf86b('0x20')](saveUpdates(_0x1e2df4[_0xf86b('0x57')],null))['then'](respondWithResult(_0x5c3b0b,null))[_0xf86b('0x28')](handleError(_0x5c3b0b,null));};exports[_0xf86b('0x32')]=function(_0x43441d,_0x2b7afc){return db['FaxMessage'][_0xf86b('0x55')]({'where':{'id':_0x43441d[_0xf86b('0x58')]['id']}})[_0xf86b('0x20')](handleEntityNotFound(_0x2b7afc,null))['then'](removeEntity(_0x2b7afc,null))[_0xf86b('0x28')](handleError(_0x2b7afc,null));};exports[_0xf86b('0x59')]=function(_0x465da1,_0x5de77f){return db[_0xf86b('0x38')][_0xf86b('0x59')]()[_0xf86b('0x20')](respondWithResult(_0x5de77f,null))['catch'](handleError(_0x5de77f,null));};var interaction_log=require(_0xf86b('0x5a'))(_0xf86b('0x5b'));exports['accept']=function(_0x4ec486,_0x2e63ab,_0x28d640){var _0x3bcce4={'agent':{},'channel':'fax'};if(_0x4ec486[_0xf86b('0x57')]['id']){delete _0x4ec486[_0xf86b('0x57')]['id'];}_0x4ec486[_0xf86b('0x57')][_0xf86b('0x5c')]=!![];_0x4ec486[_0xf86b('0x57')][_0xf86b('0x5d')]=moment()[_0xf86b('0x5e')]('YYYY-MM-DD\x20HH:mm:ss');_0x4ec486[_0xf86b('0x57')][_0xf86b('0x5f')]=_0x4ec486[_0xf86b('0x57')][_0xf86b('0x5f')]||_0x4ec486[_0xf86b('0x60')]['id'];_0x3bcce4[_0xf86b('0x61')]['id']=_0x4ec486[_0xf86b('0x57')][_0xf86b('0x5f')];return db[_0xf86b('0x38')]['find']({'where':{'id':_0x4ec486[_0xf86b('0x58')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x2e63ab,null))[_0xf86b('0x20')](saveUpdates(_0x4ec486[_0xf86b('0x57')],null))['then'](function(_0x1086e4){if(_0x1086e4){_0x3bcce4[_0xf86b('0x26')]=_0x1086e4[_0xf86b('0x62')]({'plain':!![]});return db[_0xf86b('0x63')][_0xf86b('0x55')]({'where':{'id':_0x1086e4[_0xf86b('0x64')]}});}return null;})['then'](handleEntityNotFound(_0x2e63ab,null))['then'](function(_0x45096c){if(_0x45096c){return _0x45096c[_0xf86b('0x56')]({'UserId':_0x4ec486[_0xf86b('0x57')][_0xf86b('0x5f')],'read1stAt':_[_0xf86b('0x65')](_0x45096c[_0xf86b('0x66')])?moment()['format'](_0xf86b('0x67')):undefined});}return null;})[_0xf86b('0x20')](function(_0x23ddca){if(_0x23ddca){_0x3bcce4['interaction']=_0x23ddca[_0xf86b('0x62')]({'plain':!![]});interaction_log[_0xf86b('0x27')](_0xf86b('0x68'),_0x4ec486[_0xf86b('0x60')]['id'],_0x4ec486[_0xf86b('0x60')][_0xf86b('0x36')],_0x4ec486[_0xf86b('0x60')][_0xf86b('0x69')],_0x3bcce4['interaction']['id'],_0x4ec486[_0xf86b('0x57')]?JSON['stringify'](_0x4ec486[_0xf86b('0x57')]):'null');return respondWithRpcPromise(_0xf86b('0x6a'),_0xf86b('0x6b'),_0x3bcce4);}return null;})[_0xf86b('0x20')](function(_0x2f703f){var _0x43d3fd=_0xf86b('0x6c')+_0x2f703f[_0xf86b('0x26')]['ContactId'];return db[_0xf86b('0x6d')][_0xf86b('0x3f')](_0x43d3fd,{'type':db['Sequelize'][_0xf86b('0x6e')][_0xf86b('0x6f')],'raw':!![]})[_0xf86b('0x20')](function(_0x2f6fa6){return _0x2f6fa6;});})[_0xf86b('0x20')](function(_0xda615a){if(_0xda615a){_0x3bcce4[_0xf86b('0x26')]['contact']=_0xda615a[0x0];if(!_0x4ec486[_0xf86b('0x57')][_0xf86b('0x5f')])return;return db[_0xf86b('0x70')][_0xf86b('0x55')]({'where':{'id':_0x4ec486[_0xf86b('0x57')]['UserId'],'role':'agent'},'attributes':['id',_0xf86b('0x36'),_0xf86b('0x71'),_0xf86b('0x72'),_0xf86b('0x73')],'raw':!![]});}return null;})['then'](function(_0x4f19d4){if(!_0x4f19d4)return null;_0x3bcce4[_0xf86b('0x26')]['agent']=_0x4f19d4;return _0x3bcce4;})[_0xf86b('0x20')](function(_0x3d8ae4){if(_0x3d8ae4){if(_0x4ec486[_0xf86b('0x57')][_0xf86b('0x74')]){_0x3bcce4[_0xf86b('0x26')]['interface']=util[_0xf86b('0x5e')](_0xf86b('0x75'),_0x4ec486['user']['name']);_0x3bcce4[_0xf86b('0x26')][_0xf86b('0x76')]=_0x3bcce4[_0xf86b('0x76')];_0x3bcce4[_0xf86b('0x26')][_0xf86b('0x77')]=_0x3bcce4[_0xf86b('0x76')];_0x3bcce4[_0xf86b('0x26')][_0xf86b('0x78')]=_0xf86b('0x79');return respondWithRpcPromise(_0xf86b('0x7a'),_0xf86b('0x7a'),{'event':_0xf86b('0x7b'),'message':_0x3bcce4[_0xf86b('0x26')]},client9002)[_0xf86b('0x20')](function(){return _0x3bcce4;});}return _0x3bcce4;}return null;})['then'](respondWithResult(_0x2e63ab,null))[_0xf86b('0x28')](handleError(_0x2e63ab,null));};var interaction_log=require(_0xf86b('0x5a'))(_0xf86b('0x5b'));exports[_0xf86b('0x31')]=function(_0x4c59a2,_0x143b65,_0xad53ae){var _0x5d3e2e={'agent':{},'channel':'fax'};if(_0x4c59a2[_0xf86b('0x57')]['id']){delete _0x4c59a2[_0xf86b('0x57')]['id'];}_0x4c59a2[_0xf86b('0x57')]['UserId']=_0x4c59a2[_0xf86b('0x57')]['UserId']||_0x4c59a2['user']['id'];_0x5d3e2e[_0xf86b('0x61')]['id']=_0x4c59a2[_0xf86b('0x57')][_0xf86b('0x5f')];return db['FaxMessage'][_0xf86b('0x55')]({'where':{'id':_0x4c59a2[_0xf86b('0x58')]['id'],'UserId':null}})[_0xf86b('0x20')](handleEntityNotFound(_0x143b65,null))[_0xf86b('0x20')](function(_0x18ce64){if(_0x18ce64){_0x5d3e2e[_0xf86b('0x26')]=_0x18ce64[_0xf86b('0x62')]({'plain':!![]});return db['FaxInteraction'][_0xf86b('0x55')]({'where':{'id':_0x18ce64[_0xf86b('0x64')]}});}return null;})[_0xf86b('0x20')](handleEntityNotFound(_0x143b65,null))['then'](function(_0x39cf3c){if(_0x39cf3c){_0x5d3e2e['interaction']=_0x39cf3c[_0xf86b('0x62')]({'plain':!![]});interaction_log['info'](_0xf86b('0x7c'),_0x4c59a2[_0xf86b('0x60')]['id'],_0x4c59a2[_0xf86b('0x60')][_0xf86b('0x36')],_0x4c59a2['user']['role'],_0x5d3e2e[_0xf86b('0x7d')]['id'],_0x4c59a2[_0xf86b('0x57')]?JSON[_0xf86b('0x7e')](_0x4c59a2[_0xf86b('0x57')]):'null');return respondWithRpcPromise(_0xf86b('0x7f'),'rejectMessage',_0x5d3e2e);}return null;})['then'](function(_0x4c7b27){var _0x571295=_0xf86b('0x6c')+_0x4c7b27[_0xf86b('0x26')][_0xf86b('0x80')];return db[_0xf86b('0x6d')][_0xf86b('0x3f')](_0x571295,{'type':db[_0xf86b('0x81')][_0xf86b('0x6e')][_0xf86b('0x6f')],'raw':!![]})['then'](function(_0xb1c0ed){return _0xb1c0ed;});})['then'](function(_0x843f23){if(_0x843f23){_0x5d3e2e[_0xf86b('0x26')][_0xf86b('0x82')]=_0x843f23[0x0];if(!_0x4c59a2[_0xf86b('0x57')][_0xf86b('0x5f')])return;return db[_0xf86b('0x70')][_0xf86b('0x55')]({'where':{'id':_0x4c59a2['body'][_0xf86b('0x5f')],'role':'agent'},'attributes':['id',_0xf86b('0x36'),_0xf86b('0x71'),_0xf86b('0x72'),_0xf86b('0x73')],'raw':!![]});}return null;})[_0xf86b('0x20')](function(_0x458566){if(!_0x458566)return null;_0x5d3e2e[_0xf86b('0x26')][_0xf86b('0x61')]=_0x458566;return _0x5d3e2e;})[_0xf86b('0x20')](function(_0x2e5ab7){if(_0x2e5ab7){_0x2e5ab7[_0xf86b('0x26')][_0xf86b('0x83')]=util['format'](_0xf86b('0x75'),_0x4c59a2['user'][_0xf86b('0x36')]);_0x2e5ab7[_0xf86b('0x26')][_0xf86b('0x76')]=_0x5d3e2e['channel'];_0x2e5ab7['message'][_0xf86b('0x77')]=_0x5d3e2e['channel'];_0x2e5ab7[_0xf86b('0x26')]['event']='reject';respondWithRpcPromise(_0xf86b('0x7a'),_0xf86b('0x7a'),{'event':'rejectmessage','message':_0x2e5ab7[_0xf86b('0x26')]},client9002);return _0x5d3e2e;}return null;})[_0xf86b('0x20')](respondWithResult(_0x143b65,null))[_0xf86b('0x28')](handleError(_0x143b65,null));};exports[_0xf86b('0x84')]=function(_0x360179,_0x5a6e95){var _0x118aea;return db[_0xf86b('0x38')][_0xf86b('0x84')](_0x360179['body'],{})['then'](function(_0x121f11){_0x118aea=_0x121f11;return db[_0xf86b('0x85')][_0xf86b('0x86')]({'where':{'id':_0x118aea['ContactId']}});})['then'](function(_0x1ecfc8){if(_['isNil'](_0x1ecfc8)){return;}else{_0x118aea[_0xf86b('0x87')]=_0x1ecfc8[_0xf86b('0x87')];return db[_0xf86b('0x88')][_0xf86b('0x86')]({'where':{'id':_0x118aea['AttachmentId']}});}})[_0xf86b('0x20')](function(_0x9ed56d){return respondWithRpcPromise(_0xf86b('0x89'),'SendFax',{'FaxAccountId':_[_0xf86b('0x65')](_0x360179['body'])?undefined:_0x360179[_0xf86b('0x57')][_0xf86b('0x8a')],'path':_[_0xf86b('0x65')](_0x9ed56d)?undefined:util[_0xf86b('0x5e')]('/var/opt/motion2/server/files/attachments/%s',_0x9ed56d[_0xf86b('0x8b')]),'fax':_[_0xf86b('0x65')](_0x118aea[_0xf86b('0x87')])?undefined:_0x118aea[_0xf86b('0x87')],'AttachmentId':_0x118aea[_0xf86b('0x8c')]},client9002);})[_0xf86b('0x20')](respondWithResult(_0x5a6e95,0xc9))[_0xf86b('0x28')](handleError(_0x5a6e95,null));};exports[_0xf86b('0x8d')]=function(_0x517b04,_0x4e1139){var _0x1b2d80=path[_0xf86b('0x8e')](config[_0xf86b('0x8f')],_0xf86b('0x90'),_0xf86b('0x91'),'attachments');return db[_0xf86b('0x38')]['find']({'where':{'id':_0x517b04[_0xf86b('0x58')]['id']},'include':[{'model':db['Attachment'],'as':_0xf86b('0x88')}]})[_0xf86b('0x20')](handleEntityNotFound(_0x4e1139,null))[_0xf86b('0x20')](function(_0x392084){if(_0x392084){return _0x4e1139[_0xf86b('0x8d')](path[_0xf86b('0x8e')](_0x1b2d80,_0x392084[_0xf86b('0x88')][_0xf86b('0x8b')]));}})['catch'](handleError(_0x4e1139,null));};
\ No newline at end of file
+var _0xf897=['sort','pick','filter','where','merge','VIRTUAL','options','findAll','show','params','includeAll','include','find','body','destroy','fax-interactions','accept','fax','read','readAt','format','UserId','user','agent','get','FaxInteraction','FaxInteractionId','read1stAt','[FAXMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','interaction','AcceptMessage','acceptMessage','ContactId','Sequelize','QueryTypes','SELECT','contact','User','fullname','email','internal','interface','channel','motionChannel','event','EventManager','acceptmessage','null','RejectMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','SIP/%s','rejectmessage','create','CmContact','isNil','findOne','AttachmentId','SendFax','FaxAccountId','/var/opt/motion2/server/files/attachments/%s','basename','download','join','root','server','files','attachments','Attachment','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','to-csv','fs-extra','lodash','squel','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../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','client','http','request','then','info','FaxMessage,\x20%s,\x20%s','debug','FaxMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','sendStatus','end','status','offset','undefined','count','limit','Content-Range','json','apply','reject','update','name','send','index','map','FaxMessage','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order'];(function(_0xcd81b8,_0x18d9fd){var _0xc3ae18=function(_0x2bd4e0){while(--_0x2bd4e0){_0xcd81b8['push'](_0xcd81b8['shift']());}};_0xc3ae18(++_0x18d9fd);}(_0xf897,0xd5));var _0x7f89=function(_0x3e9160,_0x9faf1d){_0x3e9160=_0x3e9160-0x0;var _0x4c2a8a=_0xf897[_0x3e9160];return _0x4c2a8a;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x7f89('0x0'));var zipdir=require(_0x7f89('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x7f89('0x2'));var moment=require('moment');var BPromise=require(_0x7f89('0x3'));var Mustache=require(_0x7f89('0x4'));var util=require(_0x7f89('0x5'));var path=require(_0x7f89('0x6'));var sox=require('sox');var csv=require(_0x7f89('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x7f89('0x8'));var _=require(_0x7f89('0x9'));var squel=require(_0x7f89('0xa'));var crypto=require(_0x7f89('0xb'));var jsforce=require(_0x7f89('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x7f89('0x7'));var querystring=require(_0x7f89('0xd'));var Papa=require('papaparse');var Redis=require(_0x7f89('0xe'));var authService=require(_0x7f89('0xf'));var qs=require(_0x7f89('0x10'));var as=require(_0x7f89('0x11'));var hardwareService=require(_0x7f89('0x12'));var logger=require(_0x7f89('0x13'))('api');var utils=require(_0x7f89('0x14'));var config=require(_0x7f89('0x15'));var licenseUtil=require(_0x7f89('0x16'));var db=require(_0x7f89('0x17'))['db'];config[_0x7f89('0x18')]=_[_0x7f89('0x19')](config[_0x7f89('0x18')],{'host':_0x7f89('0x1a'),'port':0x18eb});var socket=require(_0x7f89('0x1b'))(new Redis(config[_0x7f89('0x18')]));require('./faxMessage.socket')['register'](socket);var jayson=require('jayson/promise');var client=jayson[_0x7f89('0x1c')]['http']({'port':0x232c});var client9002=jayson[_0x7f89('0x1c')][_0x7f89('0x1d')]({'port':0x232a});function respondWithRpcPromise(_0x25ed95,_0xdf1f0e,_0x45eab3,_0x38472b){return new BPromise(function(_0x22b735,_0x25b255){var _0x78345d=_0x38472b||client;return _0x78345d[_0x7f89('0x1e')](_0x25ed95,_0x45eab3)[_0x7f89('0x1f')](function(_0x3db2f2){logger[_0x7f89('0x20')](_0x7f89('0x21'),_0xdf1f0e,'request\x20sent');logger[_0x7f89('0x22')](_0x7f89('0x23'),_0xdf1f0e,_0x7f89('0x24'),JSON[_0x7f89('0x25')](_0x3db2f2));if(_0x3db2f2['error']){if(_0x3db2f2[_0x7f89('0x26')][_0x7f89('0x27')]===0x1f4){logger['error'](_0x7f89('0x21'),_0xdf1f0e,_0x3db2f2[_0x7f89('0x26')][_0x7f89('0x28')]);return _0x25b255(_0x3db2f2[_0x7f89('0x26')][_0x7f89('0x28')]);}logger[_0x7f89('0x26')](_0x7f89('0x21'),_0xdf1f0e,_0x3db2f2[_0x7f89('0x26')][_0x7f89('0x28')]);return _0x22b735(_0x3db2f2[_0x7f89('0x26')][_0x7f89('0x28')]);}else{logger[_0x7f89('0x20')](_0x7f89('0x21'),_0xdf1f0e,_0x7f89('0x24'));_0x22b735(_0x3db2f2[_0x7f89('0x29')][_0x7f89('0x28')]);}})[_0x7f89('0x2a')](function(_0x3414a0){logger[_0x7f89('0x26')](_0x7f89('0x21'),_0xdf1f0e,_0x3414a0);_0x25b255(_0x3414a0);});});}function respondWithStatusCode(_0x594890,_0x21fde4){_0x21fde4=_0x21fde4||0xcc;return function(_0x550888){if(_0x550888){return _0x594890[_0x7f89('0x2b')](_0x21fde4);}return _0x594890['status'](_0x21fde4)[_0x7f89('0x2c')]();};}function respondWithResult(_0x288c5f,_0x2769ec){_0x2769ec=_0x2769ec||0xc8;return function(_0x2c1bba){if(_0x2c1bba){return _0x288c5f[_0x7f89('0x2d')](_0x2769ec)['json'](_0x2c1bba);}};}function respondWithFilteredResult(_0x32d5e8,_0x1c19ae){return function(_0x4ca181){if(_0x4ca181){var _0x34be2f=typeof _0x1c19ae[_0x7f89('0x2e')]==='undefined'&&typeof _0x1c19ae['limit']===_0x7f89('0x2f');var _0x3450c8=_0x4ca181[_0x7f89('0x30')];var _0x55e23b=_0x34be2f?0x0:_0x1c19ae[_0x7f89('0x2e')];var _0x3d9682=_0x34be2f?_0x4ca181[_0x7f89('0x30')]:_0x1c19ae[_0x7f89('0x2e')]+_0x1c19ae[_0x7f89('0x31')];var _0x200621;if(_0x3d9682>=_0x3450c8){_0x3d9682=_0x3450c8;_0x200621=0xc8;}else{_0x200621=0xce;}_0x32d5e8[_0x7f89('0x2d')](_0x200621);return _0x32d5e8['set'](_0x7f89('0x32'),_0x55e23b+'-'+_0x3d9682+'/'+_0x3450c8)[_0x7f89('0x33')](_0x4ca181);}return null;};}function patchUpdates(_0x58d1da){return function(_0x18e833){try{jsonpatch[_0x7f89('0x34')](_0x18e833,_0x58d1da,!![]);}catch(_0x457bbb){return BPromise[_0x7f89('0x35')](_0x457bbb);}return _0x18e833['save']();};}function saveUpdates(_0x5dd872,_0x4314ca){return function(_0x8d493e){if(_0x8d493e){return _0x8d493e[_0x7f89('0x36')](_0x5dd872)[_0x7f89('0x1f')](function(_0x2ebd67){return _0x2ebd67;});}return null;};}function removeEntity(_0x502849,_0x5b8dc9){return function(_0x415724){if(_0x415724){return _0x415724['destroy']()[_0x7f89('0x1f')](function(){_0x502849[_0x7f89('0x2d')](0xcc)[_0x7f89('0x2c')]();});}};}function handleEntityNotFound(_0x3e54c6,_0x35b91a){return function(_0x35951e){if(!_0x35951e){_0x3e54c6[_0x7f89('0x2b')](0x194);}return _0x35951e;};}function handleError(_0x3a6801,_0x14bffa){_0x14bffa=_0x14bffa||0x1f4;return function(_0x41b3ef){logger['error'](_0x41b3ef['stack']);if(_0x41b3ef[_0x7f89('0x37')]){delete _0x41b3ef[_0x7f89('0x37')];}_0x3a6801[_0x7f89('0x2d')](_0x14bffa)[_0x7f89('0x38')](_0x41b3ef);};}exports[_0x7f89('0x39')]=function(_0xf718e2,_0x2b4d6d){var _0x42026f={},_0x1b3820={},_0x381664={'count':0x0,'rows':[]};var _0x3689f1=_[_0x7f89('0x3a')](db[_0x7f89('0x3b')][_0x7f89('0x3c')],function(_0x325c40){return{'name':_0x325c40[_0x7f89('0x3d')],'type':_0x325c40[_0x7f89('0x3e')][_0x7f89('0x3f')]};});_0x1b3820[_0x7f89('0x40')]=_['map'](_0x3689f1,'name');_0x1b3820[_0x7f89('0x41')]=_[_0x7f89('0x42')](_0xf718e2[_0x7f89('0x41')]);_0x1b3820[_0x7f89('0x43')]=_[_0x7f89('0x44')](_0x1b3820[_0x7f89('0x40')],_0x1b3820['query']);_0x42026f[_0x7f89('0x45')]=_[_0x7f89('0x44')](_0x1b3820[_0x7f89('0x40')],qs[_0x7f89('0x46')](_0xf718e2[_0x7f89('0x41')][_0x7f89('0x46')]));_0x42026f['attributes']=_0x42026f[_0x7f89('0x45')][_0x7f89('0x47')]?_0x42026f['attributes']:_0x1b3820[_0x7f89('0x40')];if(!_0xf718e2['query'][_0x7f89('0x48')](_0x7f89('0x49'))){_0x42026f[_0x7f89('0x31')]=qs[_0x7f89('0x31')](_0xf718e2['query'][_0x7f89('0x31')]);_0x42026f['offset']=qs['offset'](_0xf718e2['query']['offset']);}_0x42026f[_0x7f89('0x4a')]=qs[_0x7f89('0x4b')](_0xf718e2[_0x7f89('0x41')]['sort']);_0x42026f['where']=qs[_0x7f89('0x43')](_[_0x7f89('0x4c')](_0xf718e2[_0x7f89('0x41')],_0x1b3820[_0x7f89('0x43')]),_0x3689f1);if(_0xf718e2[_0x7f89('0x41')][_0x7f89('0x4d')]){_0x42026f[_0x7f89('0x4e')]=_[_0x7f89('0x4f')](_0x42026f['where'],{'$or':_[_0x7f89('0x3a')](_0x3689f1,function(_0x4dfaf0){if(_0x4dfaf0[_0x7f89('0x3e')]!==_0x7f89('0x50')){var _0xc93be3={};_0xc93be3[_0x4dfaf0[_0x7f89('0x37')]]={'$like':'%'+_0xf718e2['query'][_0x7f89('0x4d')]+'%'};return _0xc93be3;}})});}_0x42026f=_[_0x7f89('0x4f')]({},_0x42026f,_0xf718e2[_0x7f89('0x51')]);var _0x4f9404={'where':_0x42026f[_0x7f89('0x4e')]};return db['FaxMessage'][_0x7f89('0x30')](_0x4f9404)['then'](function(_0x32f5b8){_0x381664[_0x7f89('0x30')]=_0x32f5b8;if(_0xf718e2[_0x7f89('0x41')]['includeAll']){_0x42026f['include']=[{'all':!![]}];}return db[_0x7f89('0x3b')][_0x7f89('0x52')](_0x42026f);})['then'](function(_0x4e4e82){_0x381664['rows']=_0x4e4e82;return _0x381664;})[_0x7f89('0x1f')](respondWithFilteredResult(_0x2b4d6d,_0x42026f))[_0x7f89('0x2a')](handleError(_0x2b4d6d,null));};exports[_0x7f89('0x53')]=function(_0x26e088,_0x4680c4){var _0x5ab653={'raw':!![],'where':{'id':_0x26e088[_0x7f89('0x54')]['id']}},_0x58e0fc={};_0x58e0fc[_0x7f89('0x40')]=_['keys'](db[_0x7f89('0x3b')][_0x7f89('0x3c')]);_0x58e0fc[_0x7f89('0x41')]=_[_0x7f89('0x42')](_0x26e088[_0x7f89('0x41')]);_0x58e0fc[_0x7f89('0x43')]=_['intersection'](_0x58e0fc['model'],_0x58e0fc[_0x7f89('0x41')]);_0x5ab653[_0x7f89('0x45')]=_[_0x7f89('0x44')](_0x58e0fc[_0x7f89('0x40')],qs[_0x7f89('0x46')](_0x26e088[_0x7f89('0x41')][_0x7f89('0x46')]));_0x5ab653['attributes']=_0x5ab653[_0x7f89('0x45')][_0x7f89('0x47')]?_0x5ab653[_0x7f89('0x45')]:_0x58e0fc['model'];if(_0x26e088[_0x7f89('0x41')][_0x7f89('0x55')]){_0x5ab653[_0x7f89('0x56')]=[{'all':!![]}];}_0x5ab653=_[_0x7f89('0x4f')]({},_0x5ab653,_0x26e088[_0x7f89('0x51')]);return db[_0x7f89('0x3b')][_0x7f89('0x57')](_0x5ab653)[_0x7f89('0x1f')](handleEntityNotFound(_0x4680c4,null))[_0x7f89('0x1f')](respondWithResult(_0x4680c4,null))[_0x7f89('0x2a')](handleError(_0x4680c4,null));};exports[_0x7f89('0x36')]=function(_0x2877d4,_0x4590b6){if(_0x2877d4[_0x7f89('0x58')]['id']){delete _0x2877d4['body']['id'];}return db[_0x7f89('0x3b')]['find']({'where':{'id':_0x2877d4[_0x7f89('0x54')]['id']}})[_0x7f89('0x1f')](handleEntityNotFound(_0x4590b6,null))['then'](saveUpdates(_0x2877d4[_0x7f89('0x58')],null))['then'](respondWithResult(_0x4590b6,null))[_0x7f89('0x2a')](handleError(_0x4590b6,null));};exports[_0x7f89('0x59')]=function(_0x30f5bb,_0x2e4290){return db[_0x7f89('0x3b')]['find']({'where':{'id':_0x30f5bb[_0x7f89('0x54')]['id']}})[_0x7f89('0x1f')](handleEntityNotFound(_0x2e4290,null))['then'](removeEntity(_0x2e4290,null))[_0x7f89('0x2a')](handleError(_0x2e4290,null));};exports['describe']=function(_0x52829b,_0x160508){return db[_0x7f89('0x3b')]['describe']()['then'](respondWithResult(_0x160508,null))[_0x7f89('0x2a')](handleError(_0x160508,null));};var interaction_log=require(_0x7f89('0x13'))(_0x7f89('0x5a'));exports[_0x7f89('0x5b')]=function(_0x538bcd,_0x509948,_0x460c3b){var _0x4e000d={'agent':{},'channel':_0x7f89('0x5c')};if(_0x538bcd[_0x7f89('0x58')]['id']){delete _0x538bcd['body']['id'];}_0x538bcd[_0x7f89('0x58')][_0x7f89('0x5d')]=!![];_0x538bcd['body'][_0x7f89('0x5e')]=moment()[_0x7f89('0x5f')]('YYYY-MM-DD\x20HH:mm:ss');_0x538bcd[_0x7f89('0x58')][_0x7f89('0x60')]=_0x538bcd[_0x7f89('0x58')][_0x7f89('0x60')]||_0x538bcd[_0x7f89('0x61')]['id'];_0x4e000d[_0x7f89('0x62')]['id']=_0x538bcd['body']['UserId'];return db['FaxMessage']['find']({'where':{'id':_0x538bcd[_0x7f89('0x54')]['id'],'UserId':null}})[_0x7f89('0x1f')](handleEntityNotFound(_0x509948,null))[_0x7f89('0x1f')](saveUpdates(_0x538bcd['body'],null))[_0x7f89('0x1f')](function(_0x1ce251){if(_0x1ce251){_0x4e000d[_0x7f89('0x28')]=_0x1ce251[_0x7f89('0x63')]({'plain':!![]});return db[_0x7f89('0x64')]['find']({'where':{'id':_0x1ce251[_0x7f89('0x65')]}});}return null;})['then'](handleEntityNotFound(_0x509948,null))[_0x7f89('0x1f')](function(_0xf251d6){if(_0xf251d6){return _0xf251d6['update']({'UserId':_0x538bcd[_0x7f89('0x58')]['UserId'],'read1stAt':_['isNil'](_0xf251d6[_0x7f89('0x66')])?moment()[_0x7f89('0x5f')]('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})['then'](function(_0x1393da){if(_0x1393da){_0x4e000d['interaction']=_0x1393da[_0x7f89('0x63')]({'plain':!![]});interaction_log[_0x7f89('0x20')](_0x7f89('0x67'),_0x538bcd[_0x7f89('0x61')]['id'],_0x538bcd['user'][_0x7f89('0x37')],_0x538bcd[_0x7f89('0x61')][_0x7f89('0x68')],_0x4e000d[_0x7f89('0x69')]['id'],_0x538bcd['body']?JSON[_0x7f89('0x25')](_0x538bcd['body']):'null');return respondWithRpcPromise(_0x7f89('0x6a'),_0x7f89('0x6b'),_0x4e000d);}return null;})[_0x7f89('0x1f')](function(_0x509f16){var _0x39e3bb='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x509f16[_0x7f89('0x28')][_0x7f89('0x6c')];return db['sequelize'][_0x7f89('0x41')](_0x39e3bb,{'type':db[_0x7f89('0x6d')][_0x7f89('0x6e')][_0x7f89('0x6f')],'raw':!![]})['then'](function(_0x3670a8){return _0x3670a8;});})[_0x7f89('0x1f')](function(_0x5acb6b){if(_0x5acb6b){_0x4e000d[_0x7f89('0x28')][_0x7f89('0x70')]=_0x5acb6b[0x0];if(!_0x538bcd[_0x7f89('0x58')]['UserId'])return;return db[_0x7f89('0x71')][_0x7f89('0x57')]({'where':{'id':_0x538bcd['body'][_0x7f89('0x60')],'role':_0x7f89('0x62')},'attributes':['id','name',_0x7f89('0x72'),_0x7f89('0x73'),_0x7f89('0x74')],'raw':!![]});}return null;})[_0x7f89('0x1f')](function(_0x3af980){if(!_0x3af980)return null;_0x4e000d[_0x7f89('0x28')]['agent']=_0x3af980;return _0x4e000d;})[_0x7f89('0x1f')](function(_0x7ab44f){if(_0x7ab44f){if(_0x538bcd[_0x7f89('0x58')]['manual']){_0x4e000d['message'][_0x7f89('0x75')]=util[_0x7f89('0x5f')]('SIP/%s',_0x538bcd[_0x7f89('0x61')][_0x7f89('0x37')]);_0x4e000d['message'][_0x7f89('0x76')]=_0x4e000d[_0x7f89('0x76')];_0x4e000d[_0x7f89('0x28')][_0x7f89('0x77')]=_0x4e000d[_0x7f89('0x76')];_0x4e000d[_0x7f89('0x28')][_0x7f89('0x78')]=_0x7f89('0x5b');return respondWithRpcPromise(_0x7f89('0x79'),'EventManager',{'event':_0x7f89('0x7a'),'message':_0x4e000d[_0x7f89('0x28')]},client9002)['then'](function(){return _0x4e000d;});}return _0x4e000d;}return null;})[_0x7f89('0x1f')](respondWithResult(_0x509948,null))[_0x7f89('0x2a')](handleError(_0x509948,null));};var interaction_log=require(_0x7f89('0x13'))(_0x7f89('0x5a'));exports[_0x7f89('0x35')]=function(_0x150760,_0x2734d1,_0x3cb433){var _0x3eb1b2={'agent':{},'channel':_0x7f89('0x5c')};if(_0x150760[_0x7f89('0x58')]['id']){delete _0x150760[_0x7f89('0x58')]['id'];}_0x150760[_0x7f89('0x58')][_0x7f89('0x60')]=_0x150760['body']['UserId']||_0x150760['user']['id'];_0x3eb1b2[_0x7f89('0x62')]['id']=_0x150760['body'][_0x7f89('0x60')];return db[_0x7f89('0x3b')]['find']({'where':{'id':_0x150760['params']['id'],'UserId':null}})[_0x7f89('0x1f')](handleEntityNotFound(_0x2734d1,null))[_0x7f89('0x1f')](function(_0x2f6a67){if(_0x2f6a67){_0x3eb1b2['message']=_0x2f6a67[_0x7f89('0x63')]({'plain':!![]});return db[_0x7f89('0x64')]['find']({'where':{'id':_0x2f6a67['FaxInteractionId']}});}return null;})['then'](handleEntityNotFound(_0x2734d1,null))[_0x7f89('0x1f')](function(_0x4cc2e8){if(_0x4cc2e8){_0x3eb1b2[_0x7f89('0x69')]=_0x4cc2e8[_0x7f89('0x63')]({'plain':!![]});interaction_log[_0x7f89('0x20')]('[FAXMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x150760[_0x7f89('0x61')]['id'],_0x150760['user'][_0x7f89('0x37')],_0x150760[_0x7f89('0x61')]['role'],_0x3eb1b2[_0x7f89('0x69')]['id'],_0x150760[_0x7f89('0x58')]?JSON['stringify'](_0x150760[_0x7f89('0x58')]):_0x7f89('0x7b'));return respondWithRpcPromise(_0x7f89('0x7c'),'rejectMessage',_0x3eb1b2);}return null;})[_0x7f89('0x1f')](function(_0x83177b){var _0x257f42=_0x7f89('0x7d')+_0x83177b['message'][_0x7f89('0x6c')];return db['sequelize'][_0x7f89('0x41')](_0x257f42,{'type':db[_0x7f89('0x6d')][_0x7f89('0x6e')]['SELECT'],'raw':!![]})[_0x7f89('0x1f')](function(_0xf8ba78){return _0xf8ba78;});})[_0x7f89('0x1f')](function(_0x2fb425){if(_0x2fb425){_0x3eb1b2[_0x7f89('0x28')][_0x7f89('0x70')]=_0x2fb425[0x0];if(!_0x150760['body'][_0x7f89('0x60')])return;return db[_0x7f89('0x71')][_0x7f89('0x57')]({'where':{'id':_0x150760[_0x7f89('0x58')][_0x7f89('0x60')],'role':'agent'},'attributes':['id',_0x7f89('0x37'),'fullname',_0x7f89('0x73'),_0x7f89('0x74')],'raw':!![]});}return null;})[_0x7f89('0x1f')](function(_0xe57147){if(!_0xe57147)return null;_0x3eb1b2['message'][_0x7f89('0x62')]=_0xe57147;return _0x3eb1b2;})[_0x7f89('0x1f')](function(_0xbed45){if(_0xbed45){_0xbed45[_0x7f89('0x28')][_0x7f89('0x75')]=util[_0x7f89('0x5f')](_0x7f89('0x7e'),_0x150760[_0x7f89('0x61')][_0x7f89('0x37')]);_0xbed45[_0x7f89('0x28')][_0x7f89('0x76')]=_0x3eb1b2[_0x7f89('0x76')];_0xbed45[_0x7f89('0x28')][_0x7f89('0x77')]=_0x3eb1b2[_0x7f89('0x76')];_0xbed45[_0x7f89('0x28')][_0x7f89('0x78')]='reject';respondWithRpcPromise('EventManager',_0x7f89('0x79'),{'event':_0x7f89('0x7f'),'message':_0xbed45[_0x7f89('0x28')]},client9002);return _0x3eb1b2;}return null;})[_0x7f89('0x1f')](respondWithResult(_0x2734d1,null))['catch'](handleError(_0x2734d1,null));};exports[_0x7f89('0x80')]=function(_0x2da601,_0x4f55e2){var _0x932288;return db[_0x7f89('0x3b')][_0x7f89('0x80')](_0x2da601[_0x7f89('0x58')],{})[_0x7f89('0x1f')](function(_0x55aeee){_0x932288=_0x55aeee;return db[_0x7f89('0x81')]['findOne']({'where':{'id':_0x932288[_0x7f89('0x6c')]}});})[_0x7f89('0x1f')](function(_0x23d34a){if(_[_0x7f89('0x82')](_0x23d34a)){return;}else{_0x932288['fax']=_0x23d34a[_0x7f89('0x5c')];return db['Attachment'][_0x7f89('0x83')]({'where':{'id':_0x932288[_0x7f89('0x84')]}});}})[_0x7f89('0x1f')](function(_0x209a97){return respondWithRpcPromise('SendFax',_0x7f89('0x85'),{'FaxAccountId':_[_0x7f89('0x82')](_0x2da601[_0x7f89('0x58')])?undefined:_0x2da601['body'][_0x7f89('0x86')],'path':_[_0x7f89('0x82')](_0x209a97)?undefined:util[_0x7f89('0x5f')](_0x7f89('0x87'),_0x209a97[_0x7f89('0x88')]),'fax':_[_0x7f89('0x82')](_0x932288[_0x7f89('0x5c')])?undefined:_0x932288[_0x7f89('0x5c')],'AttachmentId':_0x932288[_0x7f89('0x84')]},client9002);})[_0x7f89('0x1f')](respondWithResult(_0x4f55e2,0xc9))[_0x7f89('0x2a')](handleError(_0x4f55e2,null));};exports[_0x7f89('0x89')]=function(_0x3ed9a5,_0x3c04d2){var _0x5101e3=path[_0x7f89('0x8a')](config[_0x7f89('0x8b')],_0x7f89('0x8c'),_0x7f89('0x8d'),_0x7f89('0x8e'));return db['FaxMessage'][_0x7f89('0x57')]({'where':{'id':_0x3ed9a5[_0x7f89('0x54')]['id']},'include':[{'model':db[_0x7f89('0x8f')],'as':_0x7f89('0x8f')}]})[_0x7f89('0x1f')](handleEntityNotFound(_0x3c04d2,null))[_0x7f89('0x1f')](function(_0x55f0da){if(_0x55f0da){return _0x3c04d2[_0x7f89('0x89')](path[_0x7f89('0x8a')](_0x5101e3,_0x55f0da[_0x7f89('0x8f')][_0x7f89('0x88')]));}})[_0x7f89('0x2a')](handleError(_0x3c04d2,null));};
\ No newline at end of file
index bd7b48b..2f13425 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe1d7=['update','remove','emit','hasOwnProperty','exports','../../mysqldb'];(function(_0x458b17,_0xe5d8e2){var _0x57f19a=function(_0x26831f){while(--_0x26831f){_0x458b17['push'](_0x458b17['shift']());}};_0x57f19a(++_0xe5d8e2);}(_0xe1d7,0x1a9));var _0x7e1d=function(_0xfe3bc5,_0x2c8bad){_0xfe3bc5=_0xfe3bc5-0x0;var _0x46686a=_0xe1d7[_0xfe3bc5];return _0x46686a;};'use strict';var EventEmitter=require('events');var FaxMessage=require(_0x7e1d('0x0'))['db']['FaxMessage'];var FaxMessageEvents=new EventEmitter();FaxMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x7e1d('0x1'),'afterDestroy':_0x7e1d('0x2')};function emitEvent(_0x416747){return function(_0x57e913,_0x347f78,_0x882bec){FaxMessageEvents[_0x7e1d('0x3')](_0x416747+':'+_0x57e913['id'],_0x57e913);FaxMessageEvents[_0x7e1d('0x3')](_0x416747,_0x57e913);_0x882bec(null);};}for(var e in events){if(events[_0x7e1d('0x4')](e)){var event=events[e];FaxMessage['hook'](e,emitEvent(event));}}module[_0x7e1d('0x5')]=FaxMessageEvents;
\ No newline at end of file
+var _0xa49e=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','FaxMessage','setMaxListeners','save','update'];(function(_0x1c85df,_0x5be2a6){var _0x582183=function(_0x36dc19){while(--_0x36dc19){_0x1c85df['push'](_0x1c85df['shift']());}};_0x582183(++_0x5be2a6);}(_0xa49e,0x1de));var _0xea49=function(_0x4734d8,_0x479950){_0x4734d8=_0x4734d8-0x0;var _0x3b1120=_0xa49e[_0x4734d8];return _0x3b1120;};'use strict';var EventEmitter=require(_0xea49('0x0'));var FaxMessage=require(_0xea49('0x1'))['db'][_0xea49('0x2')];var FaxMessageEvents=new EventEmitter();FaxMessageEvents[_0xea49('0x3')](0x0);var events={'afterCreate':_0xea49('0x4'),'afterUpdate':_0xea49('0x5'),'afterDestroy':_0xea49('0x6')};function emitEvent(_0x228052){return function(_0x5e12d0,_0x2ef1ec,_0x439b3d){FaxMessageEvents[_0xea49('0x7')](_0x228052+':'+_0x5e12d0['id'],_0x5e12d0);FaxMessageEvents['emit'](_0x228052,_0x5e12d0);_0x439b3d(null);};}for(var e in events){if(events[_0xea49('0x8')](e)){var event=events[e];FaxMessage[_0xea49('0x9')](e,emitEvent(event));}}module[_0xea49('0xa')]=FaxMessageEvents;
\ No newline at end of file
index 7f8419e..eedcd5d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf0fd=['define','FaxMessage','fax_messages','fti_fax_messages','body','FULLTEXT','get','direction','toLowerCase','secret','isNil','FaxInteraction','findOne','FaxInteractionId','then','update','catch','error','utf8mb4_unicode_ci','lodash','../../config/logger','moment','rimraf','../../config/environment','./faxMessage.attributes','exports'];(function(_0x54ad18,_0x472c20){var _0x38bb91=function(_0x32439a){while(--_0x32439a){_0x54ad18['push'](_0x54ad18['shift']());}};_0x38bb91(++_0x472c20);}(_0xf0fd,0x14b));var _0xdf0f=function(_0x4bcb7f,_0x2b90cc){_0x4bcb7f=_0x4bcb7f-0x0;var _0x25f177=_0xf0fd[_0x4bcb7f];return _0x25f177;};'use strict';var _=require(_0xdf0f('0x0'));var util=require('util');var logger=require(_0xdf0f('0x1'))('api');var moment=require(_0xdf0f('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xdf0f('0x3'));var config=require(_0xdf0f('0x4'));var attributes=require(_0xdf0f('0x5'));module[_0xdf0f('0x6')]=function(_0xd8e4e5,_0x34de1f){return _0xd8e4e5[_0xdf0f('0x7')](_0xdf0f('0x8'),attributes,{'tableName':_0xdf0f('0x9'),'paranoid':![],'indexes':[{'name':_0xdf0f('0xa'),'fields':[_0xdf0f('0xb')],'type':_0xdf0f('0xc')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x192d02,_0x39bd13,_0x2a81ad){var _0x4c3630=_0xd8e4e5['models'];var _0xa6d914=_0x192d02[_0xdf0f('0xd')]({'plain':!![]});if(_0xa6d914[_0xdf0f('0xe')][_0xdf0f('0xf')]()==='in'||_0xa6d914[_0xdf0f('0xe')]['toLowerCase']()==='out'&&!_0xa6d914[_0xdf0f('0x10')]&&!_[_0xdf0f('0x11')](_0xa6d914['UserId'])){_0x4c3630[_0xdf0f('0x12')][_0xdf0f('0x13')]({'where':{'id':_0xa6d914[_0xdf0f('0x14')]}})[_0xdf0f('0x15')](function(_0x1441ae){if(_0x1441ae){_0x1441ae[_0xdf0f('0x16')]({'lastMsgAt':_0xa6d914['createdAt'],'lastMsgDirection':_0xa6d914['direction'][_0xdf0f('0xf')]()});}})[_0xdf0f('0x17')](function(_0x2fbafb){console[_0xdf0f('0x18')](_0x2fbafb);});}_0x2a81ad();}},'charset':'utf8mb4','collate':_0xdf0f('0x19')});};
\ No newline at end of file
+var _0x987d=['error','utf8mb4','utf8mb4_unicode_ci','lodash','util','api','moment','bluebird','request-promise','path','rimraf','./faxMessage.attributes','exports','define','FaxMessage','fax_messages','fti_fax_messages','body','FULLTEXT','models','direction','toLowerCase','out','isNil','FaxInteraction','findOne','then','update','createdAt','catch'];(function(_0x4fecb6,_0x45ed64){var _0xa9a47=function(_0x4462bf){while(--_0x4462bf){_0x4fecb6['push'](_0x4fecb6['shift']());}};_0xa9a47(++_0x45ed64);}(_0x987d,0x111));var _0xd987=function(_0x4f28c6,_0x59e963){_0x4f28c6=_0x4f28c6-0x0;var _0x14347f=_0x987d[_0x4f28c6];return _0x14347f;};'use strict';var _=require(_0xd987('0x0'));var util=require(_0xd987('0x1'));var logger=require('../../config/logger')(_0xd987('0x2'));var moment=require(_0xd987('0x3'));var BPromise=require(_0xd987('0x4'));var rp=require(_0xd987('0x5'));var fs=require('fs');var path=require(_0xd987('0x6'));var rimraf=require(_0xd987('0x7'));var config=require('../../config/environment');var attributes=require(_0xd987('0x8'));module[_0xd987('0x9')]=function(_0x2fcf23,_0x259c10){return _0x2fcf23[_0xd987('0xa')](_0xd987('0xb'),attributes,{'tableName':_0xd987('0xc'),'paranoid':![],'indexes':[{'name':_0xd987('0xd'),'fields':[_0xd987('0xe')],'type':_0xd987('0xf')}],'timestamps':!![],'hooks':{'afterCreate':function(_0xdb30b0,_0x4e6e10,_0x3b83a3){var _0xfa357b=_0x2fcf23[_0xd987('0x10')];var _0x3a5ac3=_0xdb30b0['get']({'plain':!![]});if(_0x3a5ac3[_0xd987('0x11')][_0xd987('0x12')]()==='in'||_0x3a5ac3[_0xd987('0x11')][_0xd987('0x12')]()===_0xd987('0x13')&&!_0x3a5ac3['secret']&&!_[_0xd987('0x14')](_0x3a5ac3['UserId'])){_0xfa357b[_0xd987('0x15')][_0xd987('0x16')]({'where':{'id':_0x3a5ac3['FaxInteractionId']}})[_0xd987('0x17')](function(_0x5882cd){if(_0x5882cd){_0x5882cd[_0xd987('0x18')]({'lastMsgAt':_0x3a5ac3[_0xd987('0x19')],'lastMsgDirection':_0x3a5ac3[_0xd987('0x11')][_0xd987('0x12')]()});}})[_0xd987('0x1a')](function(_0x5cea06){console[_0xd987('0x1b')](_0x5cea06);});}_0x3b83a3();}},'charset':_0xd987('0x1c'),'collate':_0xd987('0x1d')});};
\ No newline at end of file
index a87c373..b6fb2d6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4b84=['CreateFaxMessage','FaxMessage','create','body','options','raw','stringify','UpdateFaxMessage','attributes','catch','lodash','util','randomstring','../../config/utils','../../config/logger','rpc','http','defaults','localhost','./faxMessage.socket','register','request','then','info','request\x20sent','debug','error','message','FaxMessage,\x20%s,\x20%s','result'];(function(_0x42bf1b,_0x33a9a1){var _0x3412d9=function(_0x3dd9d8){while(--_0x3dd9d8){_0x42bf1b['push'](_0x42bf1b['shift']());}};_0x3412d9(++_0x33a9a1);}(_0x4b84,0x1cc));var _0x44b8=function(_0x3b76f7,_0x566c53){_0x3b76f7=_0x3b76f7-0x0;var _0x43984e=_0x4b84[_0x3b76f7];return _0x43984e;};'use strict';var _=require(_0x44b8('0x0'));var util=require(_0x44b8('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x44b8('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x44b8('0x3'));var logger=require(_0x44b8('0x4'))(_0x44b8('0x5'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x44b8('0x6')]({'port':0x232a});config['redis']=_[_0x44b8('0x7')](config['redis'],{'host':_0x44b8('0x8'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x44b8('0x9'))[_0x44b8('0xa')](socket);function respondWithRpcPromise(_0x30ebc3,_0x48a371,_0xc650ec){return new BPromise(function(_0x2cc74b,_0x4315f6){return client[_0x44b8('0xb')](_0x30ebc3,_0xc650ec)[_0x44b8('0xc')](function(_0x37e471){logger[_0x44b8('0xd')]('FaxMessage,\x20%s,\x20%s',_0x48a371,_0x44b8('0xe'));logger[_0x44b8('0xf')]('FaxMessage,\x20%s,\x20%s,\x20%s',_0x48a371,_0x44b8('0xe'),JSON['stringify'](_0x37e471));if(_0x37e471[_0x44b8('0x10')]){if(_0x37e471[_0x44b8('0x10')]['code']===0x1f4){logger[_0x44b8('0x10')]('FaxMessage,\x20%s,\x20%s',_0x48a371,_0x37e471['error'][_0x44b8('0x11')]);return _0x4315f6(_0x37e471[_0x44b8('0x10')][_0x44b8('0x11')]);}logger[_0x44b8('0x10')]('FaxMessage,\x20%s,\x20%s',_0x48a371,_0x37e471['error']['message']);return _0x2cc74b(_0x37e471[_0x44b8('0x10')]['message']);}else{logger[_0x44b8('0xd')](_0x44b8('0x12'),_0x48a371,'request\x20sent');_0x2cc74b(_0x37e471[_0x44b8('0x13')][_0x44b8('0x11')]);}})['catch'](function(_0x89bc30){logger[_0x44b8('0x10')]('FaxMessage,\x20%s,\x20%s',_0x48a371,_0x89bc30);_0x4315f6(_0x89bc30);});});}exports[_0x44b8('0x14')]=function(_0x8b4301){var _0xebfe79=this;return new Promise(function(_0x235bdc,_0x102ef9){return db[_0x44b8('0x15')][_0x44b8('0x16')](_0x8b4301[_0x44b8('0x17')],{'raw':_0x8b4301[_0x44b8('0x18')]?_0x8b4301[_0x44b8('0x18')][_0x44b8('0x19')]===undefined?!![]:![]:!![]})[_0x44b8('0xc')](function(_0x48327e){logger[_0x44b8('0xd')](_0x44b8('0x14'),_0x8b4301);logger[_0x44b8('0xf')](_0x44b8('0x14'),_0x8b4301,JSON[_0x44b8('0x1a')](_0x48327e));_0x235bdc(_0x48327e);})['catch'](function(_0x402497){logger['error'](_0x44b8('0x14'),_0x402497[_0x44b8('0x11')],_0x8b4301);_0x102ef9(_0xebfe79[_0x44b8('0x10')](0x1f4,_0x402497[_0x44b8('0x11')]));});});};exports[_0x44b8('0x1b')]=function(_0x59acbc){var _0x474f01=this;return new Promise(function(_0x502acf,_0x41d673){return db[_0x44b8('0x15')]['update'](_0x59acbc[_0x44b8('0x17')],{'raw':_0x59acbc[_0x44b8('0x18')]?_0x59acbc[_0x44b8('0x18')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x59acbc[_0x44b8('0x18')]?_0x59acbc[_0x44b8('0x18')]['where']||null:null,'attributes':_0x59acbc[_0x44b8('0x18')]?_0x59acbc['options'][_0x44b8('0x1c')]||null:null,'limit':_0x59acbc['options']?_0x59acbc['options']['limit']||null:null})[_0x44b8('0xc')](function(_0x29b18d){logger[_0x44b8('0xd')](_0x44b8('0x1b'),_0x59acbc);logger[_0x44b8('0xf')](_0x44b8('0x1b'),_0x59acbc,JSON[_0x44b8('0x1a')](_0x29b18d));_0x502acf(_0x29b18d);})[_0x44b8('0x1d')](function(_0xd1d320){logger[_0x44b8('0x10')](_0x44b8('0x1b'),_0xd1d320[_0x44b8('0x11')],_0x59acbc);_0x41d673(_0x474f01[_0x44b8('0x10')](0x1f4,_0xd1d320['message']));});});};
\ No newline at end of file
+var _0x17ba=['CreateFaxMessage','FaxMessage','create','options','raw','info','UpdateFaxMessage','update','where','attributes','limit','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./faxMessage.socket','register','request','then','FaxMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch'];(function(_0x396601,_0x317c93){var _0x313234=function(_0x379b88){while(--_0x379b88){_0x396601['push'](_0x396601['shift']());}};_0x313234(++_0x317c93);}(_0x17ba,0xab));var _0xa17b=function(_0x50e70d,_0x3fd220){_0x50e70d=_0x50e70d-0x0;var _0x2b6b19=_0x17ba[_0x50e70d];return _0x2b6b19;};'use strict';var _=require(_0xa17b('0x0'));var util=require(_0xa17b('0x1'));var moment=require('moment');var BPromise=require(_0xa17b('0x2'));var rs=require(_0xa17b('0x3'));var fs=require('fs');var Redis=require(_0xa17b('0x4'));var db=require(_0xa17b('0x5'))['db'];var utils=require(_0xa17b('0x6'));var logger=require(_0xa17b('0x7'))(_0xa17b('0x8'));var config=require(_0xa17b('0x9'));var jayson=require(_0xa17b('0xa'));var client=jayson[_0xa17b('0xb')][_0xa17b('0xc')]({'port':0x232a});config[_0xa17b('0xd')]=_[_0xa17b('0xe')](config[_0xa17b('0xd')],{'host':_0xa17b('0xf'),'port':0x18eb});var socket=require(_0xa17b('0x10'))(new Redis(config[_0xa17b('0xd')]));require(_0xa17b('0x11'))[_0xa17b('0x12')](socket);function respondWithRpcPromise(_0x578799,_0x2556c4,_0x38b8f1){return new BPromise(function(_0x322dc0,_0x1e799a){return client[_0xa17b('0x13')](_0x578799,_0x38b8f1)[_0xa17b('0x14')](function(_0xc5ef2e){logger['info'](_0xa17b('0x15'),_0x2556c4,_0xa17b('0x16'));logger[_0xa17b('0x17')]('FaxMessage,\x20%s,\x20%s,\x20%s',_0x2556c4,_0xa17b('0x16'),JSON[_0xa17b('0x18')](_0xc5ef2e));if(_0xc5ef2e[_0xa17b('0x19')]){if(_0xc5ef2e[_0xa17b('0x19')]['code']===0x1f4){logger[_0xa17b('0x19')]('FaxMessage,\x20%s,\x20%s',_0x2556c4,_0xc5ef2e[_0xa17b('0x19')][_0xa17b('0x1a')]);return _0x1e799a(_0xc5ef2e['error'][_0xa17b('0x1a')]);}logger[_0xa17b('0x19')](_0xa17b('0x15'),_0x2556c4,_0xc5ef2e[_0xa17b('0x19')]['message']);return _0x322dc0(_0xc5ef2e[_0xa17b('0x19')]['message']);}else{logger['info']('FaxMessage,\x20%s,\x20%s',_0x2556c4,_0xa17b('0x16'));_0x322dc0(_0xc5ef2e[_0xa17b('0x1b')]['message']);}})[_0xa17b('0x1c')](function(_0x166d44){logger[_0xa17b('0x19')](_0xa17b('0x15'),_0x2556c4,_0x166d44);_0x1e799a(_0x166d44);});});}exports[_0xa17b('0x1d')]=function(_0x1ecaa2){var _0x24afc2=this;return new Promise(function(_0x584a0a,_0x610c2b){return db[_0xa17b('0x1e')][_0xa17b('0x1f')](_0x1ecaa2['body'],{'raw':_0x1ecaa2[_0xa17b('0x20')]?_0x1ecaa2[_0xa17b('0x20')][_0xa17b('0x21')]===undefined?!![]:![]:!![]})[_0xa17b('0x14')](function(_0x3c7ec2){logger[_0xa17b('0x22')]('CreateFaxMessage',_0x1ecaa2);logger[_0xa17b('0x17')]('CreateFaxMessage',_0x1ecaa2,JSON[_0xa17b('0x18')](_0x3c7ec2));_0x584a0a(_0x3c7ec2);})[_0xa17b('0x1c')](function(_0x4ba608){logger['error'](_0xa17b('0x1d'),_0x4ba608[_0xa17b('0x1a')],_0x1ecaa2);_0x610c2b(_0x24afc2[_0xa17b('0x19')](0x1f4,_0x4ba608[_0xa17b('0x1a')]));});});};exports[_0xa17b('0x23')]=function(_0x3a64f5){var _0x4cd38e=this;return new Promise(function(_0x47aff8,_0x5c98fe){return db['FaxMessage'][_0xa17b('0x24')](_0x3a64f5['body'],{'raw':_0x3a64f5[_0xa17b('0x20')]?_0x3a64f5['options'][_0xa17b('0x21')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3a64f5[_0xa17b('0x20')]?_0x3a64f5[_0xa17b('0x20')][_0xa17b('0x25')]||null:null,'attributes':_0x3a64f5[_0xa17b('0x20')]?_0x3a64f5[_0xa17b('0x20')][_0xa17b('0x26')]||null:null,'limit':_0x3a64f5[_0xa17b('0x20')]?_0x3a64f5[_0xa17b('0x20')][_0xa17b('0x27')]||null:null})[_0xa17b('0x14')](function(_0x573585){logger['info']('UpdateFaxMessage',_0x3a64f5);logger[_0xa17b('0x17')](_0xa17b('0x23'),_0x3a64f5,JSON[_0xa17b('0x18')](_0x573585));_0x47aff8(_0x573585);})[_0xa17b('0x1c')](function(_0x16dd1f){logger[_0xa17b('0x19')](_0xa17b('0x23'),_0x16dd1f[_0xa17b('0x1a')],_0x3a64f5);_0x5c98fe(_0x4cd38e['error'](0x1f4,_0x16dd1f[_0xa17b('0x1a')]));});});};
\ No newline at end of file
index 49530e6..b4f9229 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x66fb=['update','emit','length','faxMessage:','./faxMessage.events','save','remove'];(function(_0x2acc2c,_0x5becd2){var _0x384c95=function(_0x1aece0){while(--_0x1aece0){_0x2acc2c['push'](_0x2acc2c['shift']());}};_0x384c95(++_0x5becd2);}(_0x66fb,0x1ee));var _0xb66f=function(_0x516e7b,_0x263143){_0x516e7b=_0x516e7b-0x0;var _0x34cdee=_0x66fb[_0x516e7b];return _0x34cdee;};'use strict';var FaxMessageEvents=require(_0xb66f('0x0'));var events=[_0xb66f('0x1'),_0xb66f('0x2'),_0xb66f('0x3')];function createListener(_0x67cc71,_0x2fd1c6){return function(_0x24d4e1){_0x2fd1c6[_0xb66f('0x4')](_0x67cc71,_0x24d4e1);};}function removeListener(_0x447f97,_0x14cb5a){return function(){FaxMessageEvents['removeListener'](_0x447f97,_0x14cb5a);};}exports['register']=function(_0x2a0563){for(var _0x15bf0f=0x0,_0x3120af=events[_0xb66f('0x5')];_0x15bf0f<_0x3120af;_0x15bf0f++){var _0x3b93c4=events[_0x15bf0f];var _0x3725c0=createListener(_0xb66f('0x6')+_0x3b93c4,_0x2a0563);FaxMessageEvents['on'](_0x3b93c4,_0x3725c0);}};
\ No newline at end of file
+var _0x6046=['remove','update','emit','register','length','faxMessage:','./faxMessage.events'];(function(_0x29b94c,_0x1211ef){var _0x514002=function(_0x407689){while(--_0x407689){_0x29b94c['push'](_0x29b94c['shift']());}};_0x514002(++_0x1211ef);}(_0x6046,0x1cd));var _0x6604=function(_0x424335,_0x397e71){_0x424335=_0x424335-0x0;var _0x3e38c1=_0x6046[_0x424335];return _0x3e38c1;};'use strict';var FaxMessageEvents=require(_0x6604('0x0'));var events=['save',_0x6604('0x1'),_0x6604('0x2')];function createListener(_0x361725,_0x2c928c){return function(_0x335532){_0x2c928c[_0x6604('0x3')](_0x361725,_0x335532);};}function removeListener(_0xce4242,_0x1b4551){return function(){FaxMessageEvents['removeListener'](_0xce4242,_0x1b4551);};}exports[_0x6604('0x4')]=function(_0x5f099e){for(var _0x536f0b=0x0,_0x5b7700=events[_0x6604('0x5')];_0x536f0b<_0x5b7700;_0x536f0b++){var _0xcdc366=events[_0x536f0b];var _0x6ad37e=createListener(_0x6604('0x6')+_0xcdc366,_0x5f099e);FaxMessageEvents['on'](_0xcdc366,_0x6ad37e);}};
\ No newline at end of file
index 0fed33a..42029a6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x579c=['../../components/interaction/service','../../config/environment','./faxMessage.controller','get','isAuthenticated','index','describe','/:id','show','/:id/download','download','post','tracked','fax','faxmessage:create','create','put','update','/:id/accept','accept','/:id/reject','reject','multer','util','path','connect-timeout','express','fs-extra'];(function(_0x3dcac2,_0x1a3cc1){var _0x32fe0a=function(_0xf689b9){while(--_0xf689b9){_0x3dcac2['push'](_0x3dcac2['shift']());}};_0x32fe0a(++_0x1a3cc1);}(_0x579c,0xda));var _0xc579=function(_0x3dd6cc,_0x203488){_0x3dd6cc=_0x3dd6cc-0x0;var _0x45c035=_0x579c[_0x3dd6cc];return _0x45c035;};'use strict';var multer=require(_0xc579('0x0'));var util=require(_0xc579('0x1'));var path=require(_0xc579('0x2'));var timeout=require(_0xc579('0x3'));var express=require(_0xc579('0x4'));var router=express['Router']();var fs_extra=require(_0xc579('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xc579('0x6'));var config=require(_0xc579('0x7'));var controller=require(_0xc579('0x8'));router[_0xc579('0x9')]('/',auth[_0xc579('0xa')](),controller[_0xc579('0xb')]);router[_0xc579('0x9')]('/describe',auth[_0xc579('0xa')](),controller[_0xc579('0xc')]);router[_0xc579('0x9')](_0xc579('0xd'),auth[_0xc579('0xa')](),controller[_0xc579('0xe')]);router[_0xc579('0x9')](_0xc579('0xf'),auth['isAuthenticated'](),controller[_0xc579('0x10')]);router[_0xc579('0x11')]('/',auth[_0xc579('0xa')](),interaction[_0xc579('0x12')](_0xc579('0x13'),_0xc579('0x14')),controller[_0xc579('0x15')]);router[_0xc579('0x16')](_0xc579('0xd'),auth[_0xc579('0xa')](),controller[_0xc579('0x17')]);router['put'](_0xc579('0x18'),auth['isAuthenticated'](),controller[_0xc579('0x19')]);router['put'](_0xc579('0x1a'),auth['isAuthenticated'](),controller[_0xc579('0x1b')]);router['delete'](_0xc579('0xd'),auth[_0xc579('0xa')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x3c81=['show','/:id/download','download','post','tracked','fax','faxmessage:create','create','put','update','/:id/accept','accept','reject','destroy','exports','multer','util','connect-timeout','express','../../config/environment','./faxMessage.controller','get','isAuthenticated','index','/describe','describe','/:id'];(function(_0x4961e0,_0x45e806){var _0x21882f=function(_0x42aa1b){while(--_0x42aa1b){_0x4961e0['push'](_0x4961e0['shift']());}};_0x21882f(++_0x45e806);}(_0x3c81,0x102));var _0x13c8=function(_0x27d3c8,_0x55e0f0){_0x27d3c8=_0x27d3c8-0x0;var _0x3ac8be=_0x3c81[_0x27d3c8];return _0x3ac8be;};'use strict';var multer=require(_0x13c8('0x0'));var util=require(_0x13c8('0x1'));var path=require('path');var timeout=require(_0x13c8('0x2'));var express=require(_0x13c8('0x3'));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(_0x13c8('0x4'));var controller=require(_0x13c8('0x5'));router[_0x13c8('0x6')]('/',auth[_0x13c8('0x7')](),controller[_0x13c8('0x8')]);router[_0x13c8('0x6')](_0x13c8('0x9'),auth['isAuthenticated'](),controller[_0x13c8('0xa')]);router['get'](_0x13c8('0xb'),auth[_0x13c8('0x7')](),controller[_0x13c8('0xc')]);router[_0x13c8('0x6')](_0x13c8('0xd'),auth[_0x13c8('0x7')](),controller[_0x13c8('0xe')]);router[_0x13c8('0xf')]('/',auth[_0x13c8('0x7')](),interaction[_0x13c8('0x10')](_0x13c8('0x11'),_0x13c8('0x12')),controller[_0x13c8('0x13')]);router[_0x13c8('0x14')]('/:id',auth[_0x13c8('0x7')](),controller[_0x13c8('0x15')]);router[_0x13c8('0x14')](_0x13c8('0x16'),auth['isAuthenticated'](),controller[_0x13c8('0x17')]);router['put']('/:id/reject',auth['isAuthenticated'](),controller[_0x13c8('0x18')]);router['delete'](_0x13c8('0xb'),auth[_0x13c8('0x7')](),controller[_0x13c8('0x19')]);module[_0x13c8('0x1a')]=router;
\ No newline at end of file
index eec1043..91bf5f3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9a0a=['INTEGER','ENUM','rrmemory','beepall','sequelize','exports','STRING','name'];(function(_0x3e505c,_0x475aaf){var _0x5c6b70=function(_0x22810c){while(--_0x22810c){_0x3e505c['push'](_0x3e505c['shift']());}};_0x5c6b70(++_0x475aaf);}(_0x9a0a,0x7c));var _0xa9a0=function(_0x303580,_0x1e856d){_0x303580=_0x303580-0x0;var _0x4776a9=_0x9a0a[_0x303580];return _0x4776a9;};'use strict';var Sequelize=require(_0xa9a0('0x0'));module[_0xa9a0('0x1')]={'name':{'type':Sequelize[_0xa9a0('0x2')],'unique':_0xa9a0('0x3'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0xa9a0('0x2')]},'timeout':{'type':Sequelize[_0xa9a0('0x4')],'allowNull':![],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0xa9a0('0x5')](_0xa9a0('0x6'),_0xa9a0('0x7'),'roundrobin'),'allowNull':![]},'lastAgent':{'type':Sequelize[_0xa9a0('0x4')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x6de6=['name','INTEGER','ENUM','sequelize','STRING'];(function(_0x5c960e,_0x3caa6b){var _0x34694b=function(_0xcbaa71){while(--_0xcbaa71){_0x5c960e['push'](_0x5c960e['shift']());}};_0x34694b(++_0x3caa6b);}(_0x6de6,0x19d));var _0x66de=function(_0x4fb955,_0x481977){_0x4fb955=_0x4fb955-0x0;var _0x4f9797=_0x6de6[_0x4fb955];return _0x4f9797;};'use strict';var Sequelize=require(_0x66de('0x0'));module['exports']={'name':{'type':Sequelize[_0x66de('0x1')],'unique':_0x66de('0x2'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x66de('0x1')]},'timeout':{'type':Sequelize[_0x66de('0x3')],'allowNull':![],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x66de('0x4')]('rrmemory','beepall','roundrobin'),'allowNull':![]},'lastAgent':{'type':Sequelize[_0x66de('0x3')],'defaultValue':0x0}};
\ No newline at end of file
index 9e001b3..82ae569 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xafc4=['Content-Range','update','then','destroy','get','FaxQueues','UserProfileResource','stack','name','send','index','map','FaxQueue','rawAttributes','type','key','getOptions','include','findAll','rows','catch','params','model','keys','query','filters','intersection','attributes','fields','length','includeAll','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','findOne','UserFaxQueue','nolimit','order','sort','where','pick','FaxQueueId','filter','merge','options','findAndCountAll','UserId','agent','faxPause','updatedAt','createdAt','format','%s/%s','SIP','Team','getTeams','hasOwnProperty','addTeams','ids','User','Agents','online','voicePause','interface','sequelize','transaction','each','findOrCreate','forEach','userFaxQueue:save','removeTeams','select','field','tq.TeamId','from','team_has_fax_queues','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','FaxQueueId\x20=\x20?','ut.UserId\x20=\x20?','push','toString','QueryTypes','SELECT','every','TeamId','includes','all','compact','value','isEmpty','removeAgents','emit','userFaxQueue:remove','addAgents','spread','isArray','getAgents','bluebird','lodash','ioredis','../../components/parsers/qs','../../config/logger','api','defaults','redis','localhost','socket.io-emitter','./faxQueue.socket','sendStatus','status','end','json','offset','undefined','limit','count'];(function(_0x1a5cd7,_0x3811e9){var _0x399402=function(_0x2b388c){while(--_0x2b388c){_0x1a5cd7['push'](_0x1a5cd7['shift']());}};_0x399402(++_0x3811e9);}(_0xafc4,0x69));var _0x4afc=function(_0x1a7ee7,_0x428b16){_0x1a7ee7=_0x1a7ee7-0x0;var _0x3a4d4d=_0xafc4[_0x1a7ee7];return _0x3a4d4d;};'use strict';var BPromise=require(_0x4afc('0x0'));var util=require('util');var _=require(_0x4afc('0x1'));var squel=require('squel');var Redis=require(_0x4afc('0x2'));var qs=require(_0x4afc('0x3'));var logger=require(_0x4afc('0x4'))(_0x4afc('0x5'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config['redis']=_[_0x4afc('0x6')](config[_0x4afc('0x7')],{'host':_0x4afc('0x8'),'port':0x18eb});var socket=require(_0x4afc('0x9'))(new Redis(config[_0x4afc('0x7')]));require(_0x4afc('0xa'))['register'](socket);function respondWithStatusCode(_0x31e165,_0x1c740c){_0x1c740c=_0x1c740c||0xcc;return function(_0x134aad){if(_0x134aad){return _0x31e165[_0x4afc('0xb')](_0x1c740c);}return _0x31e165[_0x4afc('0xc')](_0x1c740c)[_0x4afc('0xd')]();};}function respondWithResult(_0x5542ec,_0x5c523b){_0x5c523b=_0x5c523b||0xc8;return function(_0x7f127f){if(_0x7f127f){return _0x5542ec['status'](_0x5c523b)[_0x4afc('0xe')](_0x7f127f);}};}function respondWithFilteredResult(_0x225793,_0x49b56f){return function(_0x38b322){if(_0x38b322){var _0x3fb54a=typeof _0x49b56f[_0x4afc('0xf')]===_0x4afc('0x10')&&typeof _0x49b56f[_0x4afc('0x11')]===_0x4afc('0x10');var _0x1ad8fd=_0x38b322[_0x4afc('0x12')];var _0x5effb4=_0x3fb54a?0x0:_0x49b56f[_0x4afc('0xf')];var _0x429fd8=_0x3fb54a?_0x38b322[_0x4afc('0x12')]:_0x49b56f[_0x4afc('0xf')]+_0x49b56f['limit'];var _0x4e32e8;if(_0x429fd8>=_0x1ad8fd){_0x429fd8=_0x1ad8fd;_0x4e32e8=0xc8;}else{_0x4e32e8=0xce;}_0x225793[_0x4afc('0xc')](_0x4e32e8);return _0x225793['set'](_0x4afc('0x13'),_0x5effb4+'-'+_0x429fd8+'/'+_0x1ad8fd)[_0x4afc('0xe')](_0x38b322);}return null;};}function saveUpdates(_0x2b928b){return function(_0x31eec4){if(_0x31eec4){return _0x31eec4[_0x4afc('0x14')](_0x2b928b)[_0x4afc('0x15')](function(_0x22f809){return _0x22f809;});}return null;};}function removeEntity(_0x3ad418){return function(_0x16365f){if(_0x16365f){return _0x16365f[_0x4afc('0x16')]()[_0x4afc('0x15')](function(){var _0x543f0c=_0x16365f[_0x4afc('0x17')]({'plain':!![]});var _0x25603b=_0x4afc('0x18');return db[_0x4afc('0x19')]['destroy']({'where':{'type':_0x25603b,'resourceId':_0x543f0c['id']}})[_0x4afc('0x15')](function(){return _0x16365f;});})[_0x4afc('0x15')](function(){_0x3ad418[_0x4afc('0xc')](0xcc)[_0x4afc('0xd')]();});}};}function handleEntityNotFound(_0x1559b8){return function(_0x3add4c){if(!_0x3add4c){_0x1559b8[_0x4afc('0xb')](0x194);}return _0x3add4c;};}function handleError(_0x573a75,_0x5403e4){_0x5403e4=_0x5403e4||0x1f4;return function(_0x3ecf2d){logger['error'](_0x3ecf2d[_0x4afc('0x1a')]);if(_0x3ecf2d['name']){delete _0x3ecf2d[_0x4afc('0x1b')];}_0x573a75[_0x4afc('0xc')](_0x5403e4)[_0x4afc('0x1c')](_0x3ecf2d);};}exports[_0x4afc('0x1d')]=function(_0x86dbd4,_0x28a86c){var _0x40a0db={};var _0x383a71={'count':0x0,'rows':[]};var _0x2bb837=_[_0x4afc('0x1e')](db[_0x4afc('0x1f')][_0x4afc('0x20')],function(_0x35f5b3){return{'name':_0x35f5b3['fieldName'],'type':_0x35f5b3[_0x4afc('0x21')][_0x4afc('0x22')]};});_0x40a0db=qs[_0x4afc('0x23')](_0x2bb837,_0x86dbd4);var _0x4e254d={'where':_0x40a0db['where']};return db['FaxQueue'][_0x4afc('0x12')](_0x4e254d)[_0x4afc('0x15')](function(_0x5e4747){_0x383a71[_0x4afc('0x12')]=_0x5e4747;_0x40a0db[_0x4afc('0x24')]=qs['include'](_0x86dbd4['query']);return db['FaxQueue'][_0x4afc('0x25')](_0x40a0db);})[_0x4afc('0x15')](function(_0x17a43d){_0x383a71[_0x4afc('0x26')]=_0x17a43d;return _0x383a71;})[_0x4afc('0x15')](respondWithFilteredResult(_0x28a86c,_0x40a0db))[_0x4afc('0x27')](handleError(_0x28a86c,null));};exports['show']=function(_0x290391,_0x3d1693){var _0x1ba6b5={'raw':!![],'where':{'id':_0x290391[_0x4afc('0x28')]['id']}},_0x2f178c={};_0x2f178c[_0x4afc('0x29')]=_[_0x4afc('0x2a')](db[_0x4afc('0x1f')]['rawAttributes']);_0x2f178c[_0x4afc('0x2b')]=_['keys'](_0x290391['query']);_0x2f178c[_0x4afc('0x2c')]=_[_0x4afc('0x2d')](_0x2f178c[_0x4afc('0x29')],_0x2f178c[_0x4afc('0x2b')]);_0x1ba6b5[_0x4afc('0x2e')]=_[_0x4afc('0x2d')](_0x2f178c['model'],qs[_0x4afc('0x2f')](_0x290391[_0x4afc('0x2b')][_0x4afc('0x2f')]));_0x1ba6b5[_0x4afc('0x2e')]=_0x1ba6b5[_0x4afc('0x2e')][_0x4afc('0x30')]?_0x1ba6b5['attributes']:_0x2f178c[_0x4afc('0x29')];if(_0x290391[_0x4afc('0x2b')][_0x4afc('0x31')]){_0x1ba6b5[_0x4afc('0x24')]=[{'all':!![]}];}_0x1ba6b5=_['merge']({},_0x1ba6b5,_0x290391['options']);return db[_0x4afc('0x1f')][_0x4afc('0x32')](_0x1ba6b5)[_0x4afc('0x15')](handleEntityNotFound(_0x3d1693,null))['then'](respondWithResult(_0x3d1693,null))['catch'](handleError(_0x3d1693,null));};exports[_0x4afc('0x33')]=function(_0x4a06cf,_0x5947bb){return db[_0x4afc('0x1f')][_0x4afc('0x33')](_0x4a06cf[_0x4afc('0x34')],{})[_0x4afc('0x15')](function(_0x395bc6){var _0x4420fb=_0x4a06cf[_0x4afc('0x35')][_0x4afc('0x17')]({'plain':!![]});if(!_0x4420fb)throw new Error(_0x4afc('0x36'));if(_0x4420fb[_0x4afc('0x37')]===_0x4afc('0x35')){var _0x3ef2aa=_0x395bc6[_0x4afc('0x17')]({'plain':!![]});var _0x40dca5=_0x4afc('0x18');return db['UserProfileSection'][_0x4afc('0x32')]({'where':{'name':_0x40dca5,'userProfileId':_0x4420fb[_0x4afc('0x38')]},'raw':!![]})[_0x4afc('0x15')](function(_0xe6db12){if(_0xe6db12&&_0xe6db12[_0x4afc('0x39')]===0x0){return db[_0x4afc('0x19')][_0x4afc('0x33')]({'name':_0x3ef2aa['name'],'resourceId':_0x3ef2aa['id'],'type':_0xe6db12['name'],'sectionId':_0xe6db12['id']},{})['then'](function(){return _0x395bc6;});}else{return _0x395bc6;}})[_0x4afc('0x27')](function(_0x105c03){logger['error'](_0x4afc('0x3a'),_0x105c03);throw _0x105c03;});}return _0x395bc6;})[_0x4afc('0x15')](respondWithResult(_0x5947bb,0xc9))[_0x4afc('0x27')](handleError(_0x5947bb,null));};exports[_0x4afc('0x14')]=function(_0x545109,_0x12b5db){if(_0x545109[_0x4afc('0x34')]['id']){delete _0x545109[_0x4afc('0x34')]['id'];}return db[_0x4afc('0x1f')][_0x4afc('0x32')]({'where':{'id':_0x545109[_0x4afc('0x28')]['id']}})['then'](handleEntityNotFound(_0x12b5db,null))[_0x4afc('0x15')](saveUpdates(_0x545109['body'],null))[_0x4afc('0x15')](respondWithResult(_0x12b5db,null))[_0x4afc('0x27')](handleError(_0x12b5db,null));};exports[_0x4afc('0x16')]=function(_0x5878eb,_0x57acad){return db[_0x4afc('0x1f')][_0x4afc('0x32')]({'where':{'id':_0x5878eb[_0x4afc('0x28')]['id']}})[_0x4afc('0x15')](handleEntityNotFound(_0x57acad,null))[_0x4afc('0x15')](removeEntity(_0x57acad,null))[_0x4afc('0x27')](handleError(_0x57acad,null));};exports[_0x4afc('0x3b')]=function(_0x3db440,_0x4c86f3){return db[_0x4afc('0x1f')][_0x4afc('0x3b')]()['then'](respondWithResult(_0x4c86f3,null))[_0x4afc('0x27')](handleError(_0x4c86f3,null));};exports['getMembers']=function(_0x20a2d3,_0x24a731){var _0x16c6c4={'raw':!![],'where':{}},_0x5e0ebd={},_0xd0f517;return db[_0x4afc('0x1f')][_0x4afc('0x3c')]({'where':{'id':_0x20a2d3[_0x4afc('0x28')]['id']}})[_0x4afc('0x15')](handleEntityNotFound(_0x24a731,null))[_0x4afc('0x15')](function(_0x5d9d90){if(_0x5d9d90){_0xd0f517=_0x5d9d90['get']({'plain':!![]});_0x5e0ebd['model']=_[_0x4afc('0x2a')](db[_0x4afc('0x3d')][_0x4afc('0x20')]);_0x5e0ebd[_0x4afc('0x2b')]=_[_0x4afc('0x2a')](_0x20a2d3[_0x4afc('0x2b')]);_0x5e0ebd[_0x4afc('0x2c')]=_[_0x4afc('0x2d')](_0x5e0ebd[_0x4afc('0x29')],_0x5e0ebd[_0x4afc('0x2b')]);_0x16c6c4['attributes']=_[_0x4afc('0x2d')](_0x5e0ebd['model'],qs['fields'](_0x20a2d3[_0x4afc('0x2b')]['fields']));_0x16c6c4[_0x4afc('0x2e')]=_0x16c6c4[_0x4afc('0x2e')][_0x4afc('0x30')]?_0x16c6c4[_0x4afc('0x2e')]:_0x5e0ebd['model'];if(!_0x20a2d3[_0x4afc('0x2b')]['hasOwnProperty'](_0x4afc('0x3e'))){_0x16c6c4[_0x4afc('0x11')]=qs[_0x4afc('0x11')](_0x20a2d3[_0x4afc('0x2b')][_0x4afc('0x11')]);_0x16c6c4[_0x4afc('0xf')]=qs[_0x4afc('0xf')](_0x20a2d3[_0x4afc('0x2b')][_0x4afc('0xf')]);}_0x16c6c4[_0x4afc('0x3f')]=qs[_0x4afc('0x40')](_0x20a2d3[_0x4afc('0x2b')]['sort']);_0x16c6c4[_0x4afc('0x41')]=qs[_0x4afc('0x2c')](_[_0x4afc('0x42')](_0x20a2d3[_0x4afc('0x2b')],_0x5e0ebd[_0x4afc('0x2c')]));_0x16c6c4[_0x4afc('0x41')][_0x4afc('0x43')]=_0x5d9d90['id'];if(_0x20a2d3[_0x4afc('0x2b')][_0x4afc('0x44')]){_0x16c6c4[_0x4afc('0x41')]=_[_0x4afc('0x45')](_0x16c6c4[_0x4afc('0x41')],{'$or':_[_0x4afc('0x1e')](_0x16c6c4['attributes'],function(_0x2abf25){var _0x549ee4={};_0x549ee4[_0x2abf25]={'$like':'%'+_0x20a2d3[_0x4afc('0x2b')][_0x4afc('0x44')]+'%'};return _0x549ee4;})});}_0x16c6c4=_[_0x4afc('0x45')]({},_0x16c6c4,_0x20a2d3[_0x4afc('0x46')]);return db['UserFaxQueue']['findAll'](_0x16c6c4);}})[_0x4afc('0x15')](function(_0x2f9790){if(_0x2f9790){return db['User'][_0x4afc('0x47')]({'where':{'id':_[_0x4afc('0x1e')](_0x2f9790,_0x4afc('0x48')),'role':_0x4afc('0x49')},'attributes':['id',_0x4afc('0x1b'),_0x4afc('0x4a'),_0x4afc('0x4b'),_0x4afc('0x4c')]});}})[_0x4afc('0x15')](function(_0x3369a8){if(_0x3369a8){return{'count':_0x3369a8[_0x4afc('0x12')],'rows':_[_0x4afc('0x1e')](_0x3369a8[_0x4afc('0x26')],function(_0x441f0a){return{'membername':_0x441f0a['name'],'UserId':_0x441f0a['id'],'queue_name':_0xd0f517[_0x4afc('0x1b')],'FaxQueueId':_0xd0f517['id'],'interface':util[_0x4afc('0x4d')](_0x4afc('0x4e'),_0x4afc('0x4f'),_0x441f0a[_0x4afc('0x1b')]),'penalty':0x0,'paused':_0x441f0a[_0x4afc('0x4a')],'createdAt':_0x441f0a[_0x4afc('0x4c')],'updatedAt':_0x441f0a['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})[_0x4afc('0x15')](respondWithFilteredResult(_0x24a731,_0x16c6c4))[_0x4afc('0x27')](handleError(_0x24a731,null));};exports['getTeams']=function(_0x4b3439,_0x32a3d7){var _0x1f40d3={};var _0x2d7066={};var _0x389040;var _0x258fed;return db[_0x4afc('0x1f')][_0x4afc('0x3c')]({'where':{'id':_0x4b3439[_0x4afc('0x28')]['id']}})[_0x4afc('0x15')](handleEntityNotFound(_0x32a3d7,null))[_0x4afc('0x15')](function(_0x5f28b0){if(_0x5f28b0){_0x389040=_0x5f28b0;_0x2d7066['model']=_[_0x4afc('0x2a')](db[_0x4afc('0x50')]['rawAttributes']);_0x2d7066[_0x4afc('0x2b')]=_[_0x4afc('0x2a')](_0x4b3439['query']);_0x2d7066['filters']=_[_0x4afc('0x2d')](_0x2d7066[_0x4afc('0x29')],_0x2d7066[_0x4afc('0x2b')]);_0x1f40d3['attributes']=_[_0x4afc('0x2d')](_0x2d7066['model'],qs['fields'](_0x4b3439[_0x4afc('0x2b')][_0x4afc('0x2f')]));_0x1f40d3[_0x4afc('0x2e')]=_0x1f40d3[_0x4afc('0x2e')][_0x4afc('0x30')]?_0x1f40d3[_0x4afc('0x2e')]:_0x2d7066[_0x4afc('0x29')];_0x1f40d3[_0x4afc('0x3f')]=qs[_0x4afc('0x40')](_0x4b3439['query'][_0x4afc('0x40')]);_0x1f40d3[_0x4afc('0x41')]=qs[_0x4afc('0x2c')](_['pick'](_0x4b3439['query'],_0x2d7066['filters']));if(_0x4b3439[_0x4afc('0x2b')][_0x4afc('0x44')]){_0x1f40d3[_0x4afc('0x41')]=_['merge'](_0x1f40d3[_0x4afc('0x41')],{'$or':_['map'](_0x1f40d3['attributes'],function(_0x54625e){var _0x299849={};_0x299849[_0x54625e]={'$like':'%'+_0x4b3439[_0x4afc('0x2b')][_0x4afc('0x44')]+'%'};return _0x299849;})});}_0x1f40d3=_['merge']({},_0x1f40d3,_0x4b3439[_0x4afc('0x46')]);return _0x389040[_0x4afc('0x51')](_0x1f40d3);}})[_0x4afc('0x15')](function(_0x5e3e9b){if(_0x5e3e9b){_0x258fed=_0x5e3e9b[_0x4afc('0x30')];if(!_0x4b3439[_0x4afc('0x2b')][_0x4afc('0x52')](_0x4afc('0x3e'))){_0x1f40d3[_0x4afc('0x11')]=qs['limit'](_0x4b3439['query'][_0x4afc('0x11')]);_0x1f40d3[_0x4afc('0xf')]=qs[_0x4afc('0xf')](_0x4b3439['query'][_0x4afc('0xf')]);}return _0x389040[_0x4afc('0x51')](_0x1f40d3);}})[_0x4afc('0x15')](function(_0x306a45){if(_0x306a45){return _0x306a45?{'count':_0x258fed,'rows':_0x306a45}:null;}})[_0x4afc('0x15')](respondWithResult(_0x32a3d7,null))['catch'](handleError(_0x32a3d7,null));};exports[_0x4afc('0x53')]=function(_0x8ba1da,_0x517efb){var _0x1179c0=_0x8ba1da[_0x4afc('0x34')][_0x4afc('0x54')];return db['Team'][_0x4afc('0x25')]({'where':{'id':_0x1179c0},'attributes':['id'],'include':[{'model':db[_0x4afc('0x55')],'as':_0x4afc('0x56'),'attributes':['id',_0x4afc('0x1b'),_0x4afc('0x57'),_0x4afc('0x58'),_0x4afc('0x59')],'raw':!![]}]})[_0x4afc('0x15')](function(_0x4c7f92){if(_0x4c7f92){var _0x457b2c=_['flatMap'](_0x4c7f92,function(_0x5a0a78){var _0x2e0f15=_0x5a0a78[_0x4afc('0x17')]({'plain':!![]});return _0x2e0f15[_0x4afc('0x56')];});return db['FaxQueue']['find']({'where':{'id':_0x8ba1da[_0x4afc('0x28')]['id']}})[_0x4afc('0x15')](function(_0xa3f8b7){return db[_0x4afc('0x5a')][_0x4afc('0x5b')](function(_0x264f65){return _0xa3f8b7[_0x4afc('0x53')](_0x1179c0,{'transaction':_0x264f65})[_0x4afc('0x15')](function(){return BPromise[_0x4afc('0x5c')](_0x457b2c,function(_0x396cb5){return db[_0x4afc('0x3d')][_0x4afc('0x5d')]({'where':{'UserId':_0x396cb5['id'],'FaxQueueId':_0x8ba1da[_0x4afc('0x28')]['id']},'transaction':_0x264f65});});})[_0x4afc('0x15')](function(){_0x457b2c[_0x4afc('0x5e')](function(_0x16cf27){socket['emit'](_0x4afc('0x5f'),{'UserId':_0x16cf27['id'],'FaxQueueId':_0xa3f8b7['id']});});});});});}})[_0x4afc('0x15')](respondWithStatusCode(_0x517efb,null))[_0x4afc('0x27')](handleError(_0x517efb,null));};exports[_0x4afc('0x60')]=function(_0x19c06a,_0x2477c7){return db[_0x4afc('0x50')][_0x4afc('0x25')]({'where':{'id':_0x19c06a[_0x4afc('0x2b')]['ids']},'attributes':['id'],'include':[{'model':db[_0x4afc('0x55')],'as':_0x4afc('0x56'),'attributes':['id'],'raw':!![]}]})[_0x4afc('0x15')](handleEntityNotFound(_0x2477c7,null))[_0x4afc('0x15')](function(_0x4b5bd2){var _0x1e7e24=_[_0x4afc('0x1e')](_0x4b5bd2,'id');var _0x4ce81a=[];var _0x4956b2=[];var _0x46fe52=squel[_0x4afc('0x61')]();_0x46fe52[_0x4afc('0x62')](_0x4afc('0x63'))[_0x4afc('0x64')](_0x4afc('0x65'),'tq')['join'](_0x4afc('0x66'),'ut',_0x4afc('0x67'))['where'](_0x4afc('0x68'),_0x19c06a[_0x4afc('0x28')]['id']);for(var _0x1aeb84=0x0;_0x1aeb84<_0x4b5bd2['length'];_0x1aeb84+=0x1){let _0x1c3d20=_0x4b5bd2[_0x1aeb84];for(var _0x3478aa=0x0;_0x3478aa<_0x1c3d20[_0x4afc('0x56')][_0x4afc('0x30')];_0x3478aa+=0x1){let _0x4a6f77=_0x1c3d20[_0x4afc('0x56')][_0x3478aa];var _0x29297c=_0x46fe52['clone']();_0x29297c[_0x4afc('0x41')](_0x4afc('0x69'),_0x4a6f77['id']);_0x4956b2[_0x4afc('0x6a')](db['sequelize']['query'](_0x29297c[_0x4afc('0x6b')](),{'type':db[_0x4afc('0x5a')][_0x4afc('0x6c')][_0x4afc('0x6d')]})[_0x4afc('0x15')](function(_0xe82342){if(_0xe82342[_0x4afc('0x30')]===0x1){return _0x4a6f77['id'];}else{var _0x1949c6=_[_0x4afc('0x6e')](_[_0x4afc('0x1e')](_0xe82342,_0x4afc('0x6f')),function(_0x6d81f2){return _[_0x4afc('0x70')](_0x1e7e24,_0x6d81f2);});if(_0x1949c6){return _0x4a6f77['id'];}}}));}}return BPromise[_0x4afc('0x71')](_0x4956b2)[_0x4afc('0x15')](function(_0x143340){_0x4ce81a=_(_0x4ce81a)['union'](_0x143340)[_0x4afc('0x72')]()[_0x4afc('0x73')]();return db['FaxQueue'][_0x4afc('0x32')]({'where':{'id':_0x19c06a['params']['id']}})['then'](function(_0x6ac9ae){return db['sequelize']['transaction'](function(_0x2a1efe){return _0x6ac9ae['removeTeams'](_0x19c06a[_0x4afc('0x2b')]['ids'],{'transaction':_0x2a1efe})[_0x4afc('0x15')](function(){if(!_[_0x4afc('0x74')](_0x4ce81a)){return _0x6ac9ae[_0x4afc('0x75')](_0x4ce81a,{'transaction':_0x2a1efe});}})[_0x4afc('0x15')](function(){_0x4ce81a[_0x4afc('0x5e')](function(_0x4fb4a4){socket[_0x4afc('0x76')](_0x4afc('0x77'),{'UserId':_0x4fb4a4,'FaxQueueId':_0x6ac9ae['id']});});});});});});})['then'](respondWithStatusCode(_0x2477c7,null))['catch'](handleError(_0x2477c7,null));};exports[_0x4afc('0x78')]=function(_0x1b6b80,_0x373e9c){return db[_0x4afc('0x1f')][_0x4afc('0x32')]({'where':{'id':_0x1b6b80['params']['id']}})[_0x4afc('0x15')](handleEntityNotFound(_0x373e9c,null))[_0x4afc('0x15')](function(_0x2516e4){if(_0x2516e4){return _0x2516e4[_0x4afc('0x78')](_0x1b6b80['body'][_0x4afc('0x54')],_['omit'](_0x1b6b80[_0x4afc('0x34')],[_0x4afc('0x54'),'id'])||{})[_0x4afc('0x79')](function(_0x39167b){for(var _0xa580ad=0x0;_0xa580ad<_0x1b6b80[_0x4afc('0x34')][_0x4afc('0x54')][_0x4afc('0x30')];_0xa580ad+=0x1){socket[_0x4afc('0x76')](_0x4afc('0x5f'),{'UserId':Number(_0x1b6b80[_0x4afc('0x34')]['ids'][_0xa580ad]),'FaxQueueId':Number(_0x1b6b80[_0x4afc('0x28')]['id'])});}return _0x39167b;});}})['then'](respondWithResult(_0x373e9c,null))[_0x4afc('0x27')](handleError(_0x373e9c,null));};exports['removeAgents']=function(_0x50198d,_0x681c5e){return db['FaxQueue']['find']({'where':{'id':_0x50198d[_0x4afc('0x28')]['id']}})['then'](handleEntityNotFound(_0x681c5e,null))[_0x4afc('0x15')](function(_0x24bf53){if(_0x24bf53){return _0x24bf53['removeAgents'](_0x50198d[_0x4afc('0x2b')][_0x4afc('0x54')])['then'](function(){if(_[_0x4afc('0x7a')](_0x50198d[_0x4afc('0x2b')][_0x4afc('0x54')])){for(var _0x4c900a=0x0;_0x4c900a<_0x50198d[_0x4afc('0x2b')][_0x4afc('0x54')][_0x4afc('0x30')];_0x4c900a+=0x1){socket[_0x4afc('0x76')](_0x4afc('0x77'),{'UserId':Number(_0x50198d[_0x4afc('0x2b')]['ids'][_0x4c900a]),'FaxQueueId':Number(_0x50198d['params']['id'])});}}else{socket[_0x4afc('0x76')](_0x4afc('0x77'),{'UserId':Number(_0x50198d['query'][_0x4afc('0x54')]),'FaxQueueId':Number(_0x50198d[_0x4afc('0x28')]['id'])});}});}})['then'](respondWithStatusCode(_0x681c5e,null))[_0x4afc('0x27')](handleError(_0x681c5e,null));};exports[_0x4afc('0x7b')]=function(_0x276793,_0x36b359){var _0x2585b3={};var _0x4b1bbc={};var _0x413579;var _0x241587;return db[_0x4afc('0x1f')][_0x4afc('0x3c')]({'where':{'id':_0x276793[_0x4afc('0x28')]['id']}})['then'](handleEntityNotFound(_0x36b359,null))[_0x4afc('0x15')](function(_0x37f9ea){if(_0x37f9ea){_0x413579=_0x37f9ea;_0x4b1bbc[_0x4afc('0x29')]=_['keys'](db[_0x4afc('0x55')][_0x4afc('0x20')]);_0x4b1bbc['query']=_['keys'](_0x276793['query']);_0x4b1bbc[_0x4afc('0x2c')]=_[_0x4afc('0x2d')](_0x4b1bbc['model'],_0x4b1bbc[_0x4afc('0x2b')]);_0x2585b3[_0x4afc('0x2e')]=_['intersection'](_0x4b1bbc[_0x4afc('0x29')],qs[_0x4afc('0x2f')](_0x276793[_0x4afc('0x2b')][_0x4afc('0x2f')]));_0x2585b3[_0x4afc('0x2e')]=_0x2585b3[_0x4afc('0x2e')][_0x4afc('0x30')]?_0x2585b3[_0x4afc('0x2e')]:_0x4b1bbc[_0x4afc('0x29')];_0x2585b3['order']=qs[_0x4afc('0x40')](_0x276793[_0x4afc('0x2b')][_0x4afc('0x40')]);_0x2585b3[_0x4afc('0x41')]=qs['filters'](_[_0x4afc('0x42')](_0x276793[_0x4afc('0x2b')],_0x4b1bbc['filters']));if(_0x276793['query']['filter']){_0x2585b3[_0x4afc('0x41')]=_[_0x4afc('0x45')](_0x2585b3[_0x4afc('0x41')],{'$or':_['map'](_0x2585b3[_0x4afc('0x2e')],function(_0x1015f3){var _0x35e7c1={};_0x35e7c1[_0x1015f3]={'$like':'%'+_0x276793['query'][_0x4afc('0x44')]+'%'};return _0x35e7c1;})});}_0x2585b3=_['merge']({},_0x2585b3,_0x276793['options']);return _0x413579[_0x4afc('0x7b')](_0x2585b3);}})[_0x4afc('0x15')](function(_0x373160){if(_0x373160){_0x241587=_0x373160['length'];if(!_0x276793[_0x4afc('0x2b')][_0x4afc('0x52')](_0x4afc('0x3e'))){_0x2585b3[_0x4afc('0x11')]=qs[_0x4afc('0x11')](_0x276793[_0x4afc('0x2b')][_0x4afc('0x11')]);_0x2585b3[_0x4afc('0xf')]=qs[_0x4afc('0xf')](_0x276793['query']['offset']);}return _0x413579[_0x4afc('0x7b')](_0x2585b3);}})[_0x4afc('0x15')](function(_0x9748d5){if(_0x9748d5){return _0x9748d5?{'count':_0x241587,'rows':_0x9748d5}:null;}})[_0x4afc('0x15')](respondWithResult(_0x36b359,null))['catch'](handleError(_0x36b359,null));};
\ No newline at end of file
+var _0x75dd=['intersection','attributes','fields','length','merge','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','userProfileId','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','destroy','describe','getMembers','findOne','filters','hasOwnProperty','order','sort','FaxQueueId','filter','options','UserFaxQueue','User','findAndCountAll','UserId','agent','faxPause','updatedAt','format','%s/%s','SIP','createdAt','getTeams','Team','nolimit','addTeams','voicePause','interface','flatMap','Agents','sequelize','each','findOrCreate','forEach','emit','userFaxQueue:save','field','tq.TeamId','from','team_has_fax_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','FaxQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','toString','QueryTypes','SELECT','every','TeamId','includes','compact','transaction','removeTeams','ids','isEmpty','removeAgents','userFaxQueue:remove','addAgents','omit','spread','isArray','getAgents','bluebird','util','lodash','squel','ioredis','../../components/parsers/qs','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./faxQueue.socket','register','sendStatus','status','end','json','offset','undefined','count','limit','Content-Range','update','then','get','FaxQueues','UserProfileResource','stack','name','map','FaxQueue','rawAttributes','fieldName','type','getOptions','where','include','query','findAll','rows','catch','show','params','model','keys'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x75dd,0x1c9));var _0xd75d=function(_0x81af13,_0x105f23){_0x81af13=_0x81af13-0x0;var _0x123745=_0x75dd[_0x81af13];return _0x123745;};'use strict';var BPromise=require(_0xd75d('0x0'));var util=require(_0xd75d('0x1'));var _=require(_0xd75d('0x2'));var squel=require(_0xd75d('0x3'));var Redis=require(_0xd75d('0x4'));var qs=require(_0xd75d('0x5'));var logger=require('../../config/logger')(_0xd75d('0x6'));var config=require(_0xd75d('0x7'));var db=require(_0xd75d('0x8'))['db'];config[_0xd75d('0x9')]=_[_0xd75d('0xa')](config[_0xd75d('0x9')],{'host':_0xd75d('0xb'),'port':0x18eb});var socket=require(_0xd75d('0xc'))(new Redis(config['redis']));require(_0xd75d('0xd'))[_0xd75d('0xe')](socket);function respondWithStatusCode(_0x22b9f1,_0xd24f6b){_0xd24f6b=_0xd24f6b||0xcc;return function(_0x51ff92){if(_0x51ff92){return _0x22b9f1[_0xd75d('0xf')](_0xd24f6b);}return _0x22b9f1[_0xd75d('0x10')](_0xd24f6b)[_0xd75d('0x11')]();};}function respondWithResult(_0x216f91,_0x79e229){_0x79e229=_0x79e229||0xc8;return function(_0x34db4e){if(_0x34db4e){return _0x216f91[_0xd75d('0x10')](_0x79e229)[_0xd75d('0x12')](_0x34db4e);}};}function respondWithFilteredResult(_0x4d5ec1,_0x6104ef){return function(_0x1b325e){if(_0x1b325e){var _0x5e1fbf=typeof _0x6104ef[_0xd75d('0x13')]===_0xd75d('0x14')&&typeof _0x6104ef['limit']===_0xd75d('0x14');var _0x44164=_0x1b325e['count'];var _0x5d9e8c=_0x5e1fbf?0x0:_0x6104ef[_0xd75d('0x13')];var _0x3082bc=_0x5e1fbf?_0x1b325e[_0xd75d('0x15')]:_0x6104ef['offset']+_0x6104ef[_0xd75d('0x16')];var _0x5e0658;if(_0x3082bc>=_0x44164){_0x3082bc=_0x44164;_0x5e0658=0xc8;}else{_0x5e0658=0xce;}_0x4d5ec1['status'](_0x5e0658);return _0x4d5ec1['set'](_0xd75d('0x17'),_0x5d9e8c+'-'+_0x3082bc+'/'+_0x44164)[_0xd75d('0x12')](_0x1b325e);}return null;};}function saveUpdates(_0x5b1c56){return function(_0x5941c2){if(_0x5941c2){return _0x5941c2[_0xd75d('0x18')](_0x5b1c56)[_0xd75d('0x19')](function(_0xb86bbf){return _0xb86bbf;});}return null;};}function removeEntity(_0x53d05b){return function(_0x114b03){if(_0x114b03){return _0x114b03['destroy']()[_0xd75d('0x19')](function(){var _0x3c6ee2=_0x114b03[_0xd75d('0x1a')]({'plain':!![]});var _0x27b536=_0xd75d('0x1b');return db[_0xd75d('0x1c')]['destroy']({'where':{'type':_0x27b536,'resourceId':_0x3c6ee2['id']}})[_0xd75d('0x19')](function(){return _0x114b03;});})[_0xd75d('0x19')](function(){_0x53d05b[_0xd75d('0x10')](0xcc)[_0xd75d('0x11')]();});}};}function handleEntityNotFound(_0x2cc214){return function(_0x13ec15){if(!_0x13ec15){_0x2cc214[_0xd75d('0xf')](0x194);}return _0x13ec15;};}function handleError(_0x5e1e36,_0x67f1b5){_0x67f1b5=_0x67f1b5||0x1f4;return function(_0x3cef5e){logger['error'](_0x3cef5e[_0xd75d('0x1d')]);if(_0x3cef5e[_0xd75d('0x1e')]){delete _0x3cef5e[_0xd75d('0x1e')];}_0x5e1e36[_0xd75d('0x10')](_0x67f1b5)['send'](_0x3cef5e);};}exports['index']=function(_0x475ae4,_0xbc4bd4){var _0x3db450={};var _0x5c0f97={'count':0x0,'rows':[]};var _0x165acb=_[_0xd75d('0x1f')](db[_0xd75d('0x20')][_0xd75d('0x21')],function(_0x1945b5){return{'name':_0x1945b5[_0xd75d('0x22')],'type':_0x1945b5[_0xd75d('0x23')]['key']};});_0x3db450=qs[_0xd75d('0x24')](_0x165acb,_0x475ae4);var _0x544caf={'where':_0x3db450[_0xd75d('0x25')]};return db['FaxQueue']['count'](_0x544caf)[_0xd75d('0x19')](function(_0x4baa60){_0x5c0f97['count']=_0x4baa60;_0x3db450[_0xd75d('0x26')]=qs[_0xd75d('0x26')](_0x475ae4[_0xd75d('0x27')]);return db['FaxQueue'][_0xd75d('0x28')](_0x3db450);})[_0xd75d('0x19')](function(_0x39d434){_0x5c0f97[_0xd75d('0x29')]=_0x39d434;return _0x5c0f97;})['then'](respondWithFilteredResult(_0xbc4bd4,_0x3db450))[_0xd75d('0x2a')](handleError(_0xbc4bd4,null));};exports[_0xd75d('0x2b')]=function(_0x20b352,_0x54a074){var _0x42bbec={'raw':!![],'where':{'id':_0x20b352[_0xd75d('0x2c')]['id']}},_0x5bf955={};_0x5bf955[_0xd75d('0x2d')]=_[_0xd75d('0x2e')](db[_0xd75d('0x20')][_0xd75d('0x21')]);_0x5bf955[_0xd75d('0x27')]=_[_0xd75d('0x2e')](_0x20b352[_0xd75d('0x27')]);_0x5bf955['filters']=_[_0xd75d('0x2f')](_0x5bf955[_0xd75d('0x2d')],_0x5bf955[_0xd75d('0x27')]);_0x42bbec[_0xd75d('0x30')]=_[_0xd75d('0x2f')](_0x5bf955['model'],qs[_0xd75d('0x31')](_0x20b352[_0xd75d('0x27')][_0xd75d('0x31')]));_0x42bbec[_0xd75d('0x30')]=_0x42bbec['attributes'][_0xd75d('0x32')]?_0x42bbec[_0xd75d('0x30')]:_0x5bf955[_0xd75d('0x2d')];if(_0x20b352[_0xd75d('0x27')]['includeAll']){_0x42bbec[_0xd75d('0x26')]=[{'all':!![]}];}_0x42bbec=_[_0xd75d('0x33')]({},_0x42bbec,_0x20b352['options']);return db['FaxQueue'][_0xd75d('0x34')](_0x42bbec)['then'](handleEntityNotFound(_0x54a074,null))[_0xd75d('0x19')](respondWithResult(_0x54a074,null))[_0xd75d('0x2a')](handleError(_0x54a074,null));};exports[_0xd75d('0x35')]=function(_0x3b99be,_0x95ee5b){return db[_0xd75d('0x20')][_0xd75d('0x35')](_0x3b99be[_0xd75d('0x36')],{})['then'](function(_0x90e78f){var _0x2fa136=_0x3b99be['user'][_0xd75d('0x1a')]({'plain':!![]});if(!_0x2fa136)throw new Error(_0xd75d('0x37'));if(_0x2fa136[_0xd75d('0x38')]===_0xd75d('0x39')){var _0x486597=_0x90e78f[_0xd75d('0x1a')]({'plain':!![]});var _0x2a5cbe=_0xd75d('0x1b');return db[_0xd75d('0x3a')][_0xd75d('0x34')]({'where':{'name':_0x2a5cbe,'userProfileId':_0x2fa136[_0xd75d('0x3b')]},'raw':!![]})['then'](function(_0x4a3ac6){if(_0x4a3ac6&&_0x4a3ac6['autoAssociation']===0x0){return db[_0xd75d('0x1c')][_0xd75d('0x35')]({'name':_0x486597['name'],'resourceId':_0x486597['id'],'type':_0x4a3ac6[_0xd75d('0x1e')],'sectionId':_0x4a3ac6['id']},{})[_0xd75d('0x19')](function(){return _0x90e78f;});}else{return _0x90e78f;}})[_0xd75d('0x2a')](function(_0x5d9b57){logger[_0xd75d('0x3c')](_0xd75d('0x3d'),_0x5d9b57);throw _0x5d9b57;});}return _0x90e78f;})[_0xd75d('0x19')](respondWithResult(_0x95ee5b,0xc9))[_0xd75d('0x2a')](handleError(_0x95ee5b,null));};exports[_0xd75d('0x18')]=function(_0x1b53f4,_0x4f14bd){if(_0x1b53f4[_0xd75d('0x36')]['id']){delete _0x1b53f4[_0xd75d('0x36')]['id'];}return db[_0xd75d('0x20')]['find']({'where':{'id':_0x1b53f4[_0xd75d('0x2c')]['id']}})['then'](handleEntityNotFound(_0x4f14bd,null))[_0xd75d('0x19')](saveUpdates(_0x1b53f4[_0xd75d('0x36')],null))['then'](respondWithResult(_0x4f14bd,null))[_0xd75d('0x2a')](handleError(_0x4f14bd,null));};exports[_0xd75d('0x3e')]=function(_0x1ab30b,_0x5f0b54){return db[_0xd75d('0x20')][_0xd75d('0x34')]({'where':{'id':_0x1ab30b[_0xd75d('0x2c')]['id']}})[_0xd75d('0x19')](handleEntityNotFound(_0x5f0b54,null))['then'](removeEntity(_0x5f0b54,null))[_0xd75d('0x2a')](handleError(_0x5f0b54,null));};exports['describe']=function(_0x48ef4f,_0x460294){return db[_0xd75d('0x20')][_0xd75d('0x3f')]()['then'](respondWithResult(_0x460294,null))['catch'](handleError(_0x460294,null));};exports[_0xd75d('0x40')]=function(_0x2c5026,_0x2928bd){var _0x4e9e01={'raw':!![],'where':{}},_0x532c23={},_0x1364bd;return db[_0xd75d('0x20')][_0xd75d('0x41')]({'where':{'id':_0x2c5026[_0xd75d('0x2c')]['id']}})[_0xd75d('0x19')](handleEntityNotFound(_0x2928bd,null))[_0xd75d('0x19')](function(_0x26e565){if(_0x26e565){_0x1364bd=_0x26e565[_0xd75d('0x1a')]({'plain':!![]});_0x532c23[_0xd75d('0x2d')]=_[_0xd75d('0x2e')](db['UserFaxQueue'][_0xd75d('0x21')]);_0x532c23[_0xd75d('0x27')]=_[_0xd75d('0x2e')](_0x2c5026['query']);_0x532c23[_0xd75d('0x42')]=_[_0xd75d('0x2f')](_0x532c23['model'],_0x532c23[_0xd75d('0x27')]);_0x4e9e01[_0xd75d('0x30')]=_[_0xd75d('0x2f')](_0x532c23['model'],qs[_0xd75d('0x31')](_0x2c5026[_0xd75d('0x27')][_0xd75d('0x31')]));_0x4e9e01[_0xd75d('0x30')]=_0x4e9e01[_0xd75d('0x30')][_0xd75d('0x32')]?_0x4e9e01[_0xd75d('0x30')]:_0x532c23[_0xd75d('0x2d')];if(!_0x2c5026[_0xd75d('0x27')][_0xd75d('0x43')]('nolimit')){_0x4e9e01[_0xd75d('0x16')]=qs[_0xd75d('0x16')](_0x2c5026[_0xd75d('0x27')][_0xd75d('0x16')]);_0x4e9e01[_0xd75d('0x13')]=qs[_0xd75d('0x13')](_0x2c5026[_0xd75d('0x27')][_0xd75d('0x13')]);}_0x4e9e01[_0xd75d('0x44')]=qs['sort'](_0x2c5026[_0xd75d('0x27')][_0xd75d('0x45')]);_0x4e9e01[_0xd75d('0x25')]=qs[_0xd75d('0x42')](_['pick'](_0x2c5026['query'],_0x532c23['filters']));_0x4e9e01[_0xd75d('0x25')][_0xd75d('0x46')]=_0x26e565['id'];if(_0x2c5026[_0xd75d('0x27')][_0xd75d('0x47')]){_0x4e9e01[_0xd75d('0x25')]=_[_0xd75d('0x33')](_0x4e9e01['where'],{'$or':_[_0xd75d('0x1f')](_0x4e9e01[_0xd75d('0x30')],function(_0x1e653f){var _0x24656d={};_0x24656d[_0x1e653f]={'$like':'%'+_0x2c5026[_0xd75d('0x27')]['filter']+'%'};return _0x24656d;})});}_0x4e9e01=_['merge']({},_0x4e9e01,_0x2c5026[_0xd75d('0x48')]);return db[_0xd75d('0x49')][_0xd75d('0x28')](_0x4e9e01);}})['then'](function(_0x4ccc35){if(_0x4ccc35){return db[_0xd75d('0x4a')][_0xd75d('0x4b')]({'where':{'id':_[_0xd75d('0x1f')](_0x4ccc35,_0xd75d('0x4c')),'role':_0xd75d('0x4d')},'attributes':['id',_0xd75d('0x1e'),_0xd75d('0x4e'),_0xd75d('0x4f'),'createdAt']});}})[_0xd75d('0x19')](function(_0x36f7df){if(_0x36f7df){return{'count':_0x36f7df[_0xd75d('0x15')],'rows':_[_0xd75d('0x1f')](_0x36f7df['rows'],function(_0x1bc506){return{'membername':_0x1bc506[_0xd75d('0x1e')],'UserId':_0x1bc506['id'],'queue_name':_0x1364bd[_0xd75d('0x1e')],'FaxQueueId':_0x1364bd['id'],'interface':util[_0xd75d('0x50')](_0xd75d('0x51'),_0xd75d('0x52'),_0x1bc506['name']),'penalty':0x0,'paused':_0x1bc506[_0xd75d('0x4e')],'createdAt':_0x1bc506[_0xd75d('0x53')],'updatedAt':_0x1bc506[_0xd75d('0x4f')]};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0x2928bd,_0x4e9e01))[_0xd75d('0x2a')](handleError(_0x2928bd,null));};exports[_0xd75d('0x54')]=function(_0x13b450,_0x110a3d){var _0x1f2ab4={};var _0x1c71c1={};var _0xe7c0b1;var _0x290c97;return db[_0xd75d('0x20')][_0xd75d('0x41')]({'where':{'id':_0x13b450[_0xd75d('0x2c')]['id']}})[_0xd75d('0x19')](handleEntityNotFound(_0x110a3d,null))[_0xd75d('0x19')](function(_0x3817cb){if(_0x3817cb){_0xe7c0b1=_0x3817cb;_0x1c71c1[_0xd75d('0x2d')]=_[_0xd75d('0x2e')](db[_0xd75d('0x55')][_0xd75d('0x21')]);_0x1c71c1['query']=_[_0xd75d('0x2e')](_0x13b450[_0xd75d('0x27')]);_0x1c71c1['filters']=_[_0xd75d('0x2f')](_0x1c71c1[_0xd75d('0x2d')],_0x1c71c1['query']);_0x1f2ab4[_0xd75d('0x30')]=_['intersection'](_0x1c71c1['model'],qs[_0xd75d('0x31')](_0x13b450['query'][_0xd75d('0x31')]));_0x1f2ab4['attributes']=_0x1f2ab4[_0xd75d('0x30')][_0xd75d('0x32')]?_0x1f2ab4[_0xd75d('0x30')]:_0x1c71c1[_0xd75d('0x2d')];_0x1f2ab4[_0xd75d('0x44')]=qs[_0xd75d('0x45')](_0x13b450['query'][_0xd75d('0x45')]);_0x1f2ab4[_0xd75d('0x25')]=qs[_0xd75d('0x42')](_['pick'](_0x13b450[_0xd75d('0x27')],_0x1c71c1['filters']));if(_0x13b450[_0xd75d('0x27')][_0xd75d('0x47')]){_0x1f2ab4[_0xd75d('0x25')]=_['merge'](_0x1f2ab4['where'],{'$or':_[_0xd75d('0x1f')](_0x1f2ab4[_0xd75d('0x30')],function(_0x322785){var _0x5db064={};_0x5db064[_0x322785]={'$like':'%'+_0x13b450[_0xd75d('0x27')]['filter']+'%'};return _0x5db064;})});}_0x1f2ab4=_['merge']({},_0x1f2ab4,_0x13b450['options']);return _0xe7c0b1[_0xd75d('0x54')](_0x1f2ab4);}})[_0xd75d('0x19')](function(_0xbd400d){if(_0xbd400d){_0x290c97=_0xbd400d[_0xd75d('0x32')];if(!_0x13b450[_0xd75d('0x27')][_0xd75d('0x43')](_0xd75d('0x56'))){_0x1f2ab4[_0xd75d('0x16')]=qs[_0xd75d('0x16')](_0x13b450['query'][_0xd75d('0x16')]);_0x1f2ab4[_0xd75d('0x13')]=qs['offset'](_0x13b450[_0xd75d('0x27')][_0xd75d('0x13')]);}return _0xe7c0b1[_0xd75d('0x54')](_0x1f2ab4);}})[_0xd75d('0x19')](function(_0x2f3c87){if(_0x2f3c87){return _0x2f3c87?{'count':_0x290c97,'rows':_0x2f3c87}:null;}})['then'](respondWithResult(_0x110a3d,null))[_0xd75d('0x2a')](handleError(_0x110a3d,null));};exports[_0xd75d('0x57')]=function(_0x588f0a,_0x118979){var _0x4a5938=_0x588f0a[_0xd75d('0x36')]['ids'];return db[_0xd75d('0x55')][_0xd75d('0x28')]({'where':{'id':_0x4a5938},'attributes':['id'],'include':[{'model':db['User'],'as':'Agents','attributes':['id',_0xd75d('0x1e'),'online',_0xd75d('0x58'),_0xd75d('0x59')],'raw':!![]}]})['then'](function(_0x5b8db8){if(_0x5b8db8){var _0x4cae32=_[_0xd75d('0x5a')](_0x5b8db8,function(_0x2ff75d){var _0x1ba11f=_0x2ff75d[_0xd75d('0x1a')]({'plain':!![]});return _0x1ba11f[_0xd75d('0x5b')];});return db[_0xd75d('0x20')][_0xd75d('0x34')]({'where':{'id':_0x588f0a[_0xd75d('0x2c')]['id']}})[_0xd75d('0x19')](function(_0x1cc2c1){return db[_0xd75d('0x5c')]['transaction'](function(_0x3e0abd){return _0x1cc2c1['addTeams'](_0x4a5938,{'transaction':_0x3e0abd})[_0xd75d('0x19')](function(){return BPromise[_0xd75d('0x5d')](_0x4cae32,function(_0x76480d){return db[_0xd75d('0x49')][_0xd75d('0x5e')]({'where':{'UserId':_0x76480d['id'],'FaxQueueId':_0x588f0a[_0xd75d('0x2c')]['id']},'transaction':_0x3e0abd});});})[_0xd75d('0x19')](function(){_0x4cae32[_0xd75d('0x5f')](function(_0x5b6d74){socket[_0xd75d('0x60')](_0xd75d('0x61'),{'UserId':_0x5b6d74['id'],'FaxQueueId':_0x1cc2c1['id']});});});});});}})[_0xd75d('0x19')](respondWithStatusCode(_0x118979,null))[_0xd75d('0x2a')](handleError(_0x118979,null));};exports['removeTeams']=function(_0x59cda6,_0x1d43ab){return db[_0xd75d('0x55')][_0xd75d('0x28')]({'where':{'id':_0x59cda6[_0xd75d('0x27')]['ids']},'attributes':['id'],'include':[{'model':db['User'],'as':_0xd75d('0x5b'),'attributes':['id'],'raw':!![]}]})[_0xd75d('0x19')](handleEntityNotFound(_0x1d43ab,null))[_0xd75d('0x19')](function(_0x1ca1c6){var _0x637ca1=_[_0xd75d('0x1f')](_0x1ca1c6,'id');var _0x3ae246=[];var _0x2abb7e=[];var _0xa48a21=squel['select']();_0xa48a21[_0xd75d('0x62')](_0xd75d('0x63'))[_0xd75d('0x64')](_0xd75d('0x65'),'tq')[_0xd75d('0x66')](_0xd75d('0x67'),'ut',_0xd75d('0x68'))['where'](_0xd75d('0x69'),_0x59cda6[_0xd75d('0x2c')]['id']);for(var _0x365697=0x0;_0x365697<_0x1ca1c6[_0xd75d('0x32')];_0x365697+=0x1){let _0x41c6ad=_0x1ca1c6[_0x365697];for(var _0x4781af=0x0;_0x4781af<_0x41c6ad['Agents']['length'];_0x4781af+=0x1){let _0x6713b7=_0x41c6ad[_0xd75d('0x5b')][_0x4781af];var _0x535a54=_0xa48a21[_0xd75d('0x6a')]();_0x535a54[_0xd75d('0x25')](_0xd75d('0x6b'),_0x6713b7['id']);_0x2abb7e['push'](db[_0xd75d('0x5c')][_0xd75d('0x27')](_0x535a54[_0xd75d('0x6c')](),{'type':db[_0xd75d('0x5c')][_0xd75d('0x6d')][_0xd75d('0x6e')]})[_0xd75d('0x19')](function(_0x1b60c0){if(_0x1b60c0['length']===0x1){return _0x6713b7['id'];}else{var _0x254523=_[_0xd75d('0x6f')](_[_0xd75d('0x1f')](_0x1b60c0,_0xd75d('0x70')),function(_0x45bdab){return _[_0xd75d('0x71')](_0x637ca1,_0x45bdab);});if(_0x254523){return _0x6713b7['id'];}}}));}}return BPromise['all'](_0x2abb7e)[_0xd75d('0x19')](function(_0x32f2c1){_0x3ae246=_(_0x3ae246)['union'](_0x32f2c1)[_0xd75d('0x72')]()['value']();return db[_0xd75d('0x20')]['find']({'where':{'id':_0x59cda6[_0xd75d('0x2c')]['id']}})[_0xd75d('0x19')](function(_0x2dd03e){return db[_0xd75d('0x5c')][_0xd75d('0x73')](function(_0x3f20b8){return _0x2dd03e[_0xd75d('0x74')](_0x59cda6[_0xd75d('0x27')][_0xd75d('0x75')],{'transaction':_0x3f20b8})[_0xd75d('0x19')](function(){if(!_[_0xd75d('0x76')](_0x3ae246)){return _0x2dd03e[_0xd75d('0x77')](_0x3ae246,{'transaction':_0x3f20b8});}})[_0xd75d('0x19')](function(){_0x3ae246[_0xd75d('0x5f')](function(_0x4d4c3d){socket[_0xd75d('0x60')](_0xd75d('0x78'),{'UserId':_0x4d4c3d,'FaxQueueId':_0x2dd03e['id']});});});});});});})[_0xd75d('0x19')](respondWithStatusCode(_0x1d43ab,null))['catch'](handleError(_0x1d43ab,null));};exports[_0xd75d('0x79')]=function(_0x184f12,_0x48b6bb){return db['FaxQueue'][_0xd75d('0x34')]({'where':{'id':_0x184f12[_0xd75d('0x2c')]['id']}})[_0xd75d('0x19')](handleEntityNotFound(_0x48b6bb,null))[_0xd75d('0x19')](function(_0x15a53d){if(_0x15a53d){return _0x15a53d[_0xd75d('0x79')](_0x184f12[_0xd75d('0x36')][_0xd75d('0x75')],_[_0xd75d('0x7a')](_0x184f12['body'],[_0xd75d('0x75'),'id'])||{})[_0xd75d('0x7b')](function(_0x5c3222){for(var _0x5e90ed=0x0;_0x5e90ed<_0x184f12[_0xd75d('0x36')][_0xd75d('0x75')][_0xd75d('0x32')];_0x5e90ed+=0x1){socket[_0xd75d('0x60')](_0xd75d('0x61'),{'UserId':Number(_0x184f12['body']['ids'][_0x5e90ed]),'FaxQueueId':Number(_0x184f12[_0xd75d('0x2c')]['id'])});}return _0x5c3222;});}})['then'](respondWithResult(_0x48b6bb,null))[_0xd75d('0x2a')](handleError(_0x48b6bb,null));};exports[_0xd75d('0x77')]=function(_0x4aab07,_0x50884c){return db['FaxQueue'][_0xd75d('0x34')]({'where':{'id':_0x4aab07['params']['id']}})[_0xd75d('0x19')](handleEntityNotFound(_0x50884c,null))['then'](function(_0x5d3bca){if(_0x5d3bca){return _0x5d3bca[_0xd75d('0x77')](_0x4aab07[_0xd75d('0x27')][_0xd75d('0x75')])[_0xd75d('0x19')](function(){if(_[_0xd75d('0x7c')](_0x4aab07[_0xd75d('0x27')]['ids'])){for(var _0x2b5d30=0x0;_0x2b5d30<_0x4aab07[_0xd75d('0x27')][_0xd75d('0x75')][_0xd75d('0x32')];_0x2b5d30+=0x1){socket[_0xd75d('0x60')](_0xd75d('0x78'),{'UserId':Number(_0x4aab07[_0xd75d('0x27')]['ids'][_0x2b5d30]),'FaxQueueId':Number(_0x4aab07[_0xd75d('0x2c')]['id'])});}}else{socket[_0xd75d('0x60')](_0xd75d('0x78'),{'UserId':Number(_0x4aab07[_0xd75d('0x27')][_0xd75d('0x75')]),'FaxQueueId':Number(_0x4aab07['params']['id'])});}});}})[_0xd75d('0x19')](respondWithStatusCode(_0x50884c,null))[_0xd75d('0x2a')](handleError(_0x50884c,null));};exports[_0xd75d('0x7d')]=function(_0xdcda94,_0x383641){var _0x4a107a={};var _0xe524be={};var _0x1b92d2;var _0x1bfee7;return db['FaxQueue']['findOne']({'where':{'id':_0xdcda94['params']['id']}})[_0xd75d('0x19')](handleEntityNotFound(_0x383641,null))['then'](function(_0x43a01a){if(_0x43a01a){_0x1b92d2=_0x43a01a;_0xe524be['model']=_[_0xd75d('0x2e')](db[_0xd75d('0x4a')][_0xd75d('0x21')]);_0xe524be[_0xd75d('0x27')]=_[_0xd75d('0x2e')](_0xdcda94[_0xd75d('0x27')]);_0xe524be['filters']=_[_0xd75d('0x2f')](_0xe524be['model'],_0xe524be[_0xd75d('0x27')]);_0x4a107a[_0xd75d('0x30')]=_[_0xd75d('0x2f')](_0xe524be[_0xd75d('0x2d')],qs['fields'](_0xdcda94['query'][_0xd75d('0x31')]));_0x4a107a[_0xd75d('0x30')]=_0x4a107a[_0xd75d('0x30')][_0xd75d('0x32')]?_0x4a107a['attributes']:_0xe524be[_0xd75d('0x2d')];_0x4a107a[_0xd75d('0x44')]=qs[_0xd75d('0x45')](_0xdcda94[_0xd75d('0x27')][_0xd75d('0x45')]);_0x4a107a[_0xd75d('0x25')]=qs[_0xd75d('0x42')](_['pick'](_0xdcda94[_0xd75d('0x27')],_0xe524be[_0xd75d('0x42')]));if(_0xdcda94['query'][_0xd75d('0x47')]){_0x4a107a[_0xd75d('0x25')]=_[_0xd75d('0x33')](_0x4a107a[_0xd75d('0x25')],{'$or':_[_0xd75d('0x1f')](_0x4a107a['attributes'],function(_0x8d8ac9){var _0x3d0c84={};_0x3d0c84[_0x8d8ac9]={'$like':'%'+_0xdcda94['query']['filter']+'%'};return _0x3d0c84;})});}_0x4a107a=_[_0xd75d('0x33')]({},_0x4a107a,_0xdcda94['options']);return _0x1b92d2[_0xd75d('0x7d')](_0x4a107a);}})['then'](function(_0x2cea42){if(_0x2cea42){_0x1bfee7=_0x2cea42[_0xd75d('0x32')];if(!_0xdcda94[_0xd75d('0x27')]['hasOwnProperty'](_0xd75d('0x56'))){_0x4a107a['limit']=qs[_0xd75d('0x16')](_0xdcda94[_0xd75d('0x27')]['limit']);_0x4a107a['offset']=qs[_0xd75d('0x13')](_0xdcda94[_0xd75d('0x27')][_0xd75d('0x13')]);}return _0x1b92d2['getAgents'](_0x4a107a);}})[_0xd75d('0x19')](function(_0x82762b){if(_0x82762b){return _0x82762b?{'count':_0x1bfee7,'rows':_0x82762b}:null;}})[_0xd75d('0x19')](respondWithResult(_0x383641,null))[_0xd75d('0x2a')](handleError(_0x383641,null));};
\ No newline at end of file
index aa58dc4..2237671 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0212=['remove','hasOwnProperty','hook','events','../../mysqldb','FaxQueue','setMaxListeners'];(function(_0x216d45,_0x4989fe){var _0xbaac0b=function(_0x308a41){while(--_0x308a41){_0x216d45['push'](_0x216d45['shift']());}};_0xbaac0b(++_0x4989fe);}(_0x0212,0x11b));var _0x2021=function(_0x4d9b61,_0x5ce947){_0x4d9b61=_0x4d9b61-0x0;var _0x215476=_0x0212[_0x4d9b61];return _0x215476;};'use strict';var EventEmitter=require(_0x2021('0x0'));var FaxQueue=require(_0x2021('0x1'))['db'][_0x2021('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x2021('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x2021('0x4')};function emitEvent(_0x98c617){return function(_0x3c32b0,_0x58a5e,_0x6c0c2){FaxQueueEvents['emit'](_0x98c617+':'+_0x3c32b0['id'],_0x3c32b0);FaxQueueEvents['emit'](_0x98c617,_0x3c32b0);_0x6c0c2(null);};}for(var e in events){if(events[_0x2021('0x5')](e)){var event=events[e];FaxQueue[_0x2021('0x6')](e,emitEvent(event));}}module['exports']=FaxQueueEvents;
\ No newline at end of file
+var _0xb080=['events','../../mysqldb','FaxQueue','setMaxListeners','update','remove','emit','hasOwnProperty','hook','exports'];(function(_0x525c7b,_0x488fcc){var _0x27b33e=function(_0x56d43b){while(--_0x56d43b){_0x525c7b['push'](_0x525c7b['shift']());}};_0x27b33e(++_0x488fcc);}(_0xb080,0x1e0));var _0x0b08=function(_0x13278a,_0x248a1a){_0x13278a=_0x13278a-0x0;var _0x53c9a2=_0xb080[_0x13278a];return _0x53c9a2;};'use strict';var EventEmitter=require(_0x0b08('0x0'));var FaxQueue=require(_0x0b08('0x1'))['db'][_0x0b08('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x0b08('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x0b08('0x4'),'afterDestroy':_0x0b08('0x5')};function emitEvent(_0x4cd11c){return function(_0x3d13c1,_0x53b4ce,_0x2a8b58){FaxQueueEvents['emit'](_0x4cd11c+':'+_0x3d13c1['id'],_0x3d13c1);FaxQueueEvents[_0x0b08('0x6')](_0x4cd11c,_0x3d13c1);_0x2a8b58(null);};}for(var e in events){if(events[_0x0b08('0x7')](e)){var event=events[e];FaxQueue[_0x0b08('0x8')](e,emitEvent(event));}}module[_0x0b08('0x9')]=FaxQueueEvents;
\ No newline at end of file
index 6c85e99..947a1c8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7e6a=['FaxQueue','fax_queues','lodash','util','../../config/logger','api','moment','bluebird','rimraf','../../config/environment','./faxQueue.attributes','exports','define'];(function(_0x25fc41,_0x250864){var _0x1371d1=function(_0x8ab2e3){while(--_0x8ab2e3){_0x25fc41['push'](_0x25fc41['shift']());}};_0x1371d1(++_0x250864);}(_0x7e6a,0x13a));var _0xa7e6=function(_0x192bca,_0x4426ba){_0x192bca=_0x192bca-0x0;var _0x5b46c2=_0x7e6a[_0x192bca];return _0x5b46c2;};'use strict';var _=require(_0xa7e6('0x0'));var util=require(_0xa7e6('0x1'));var logger=require(_0xa7e6('0x2'))(_0xa7e6('0x3'));var moment=require(_0xa7e6('0x4'));var BPromise=require(_0xa7e6('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xa7e6('0x6'));var config=require(_0xa7e6('0x7'));var attributes=require(_0xa7e6('0x8'));module[_0xa7e6('0x9')]=function(_0x1bc107,_0x2e40f9){return _0x1bc107[_0xa7e6('0xa')](_0xa7e6('0xb'),attributes,{'tableName':_0xa7e6('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xaa28=['../../config/logger','moment','../../config/environment','./faxQueue.attributes','exports','define','FaxQueue','fax_queues','lodash','util'];(function(_0x28f582,_0x16950e){var _0x2d7e9d=function(_0x5a1fa3){while(--_0x5a1fa3){_0x28f582['push'](_0x28f582['shift']());}};_0x2d7e9d(++_0x16950e);}(_0xaa28,0x76));var _0x8aa2=function(_0x251e8c,_0x277c33){_0x251e8c=_0x251e8c-0x0;var _0x1e0c1d=_0xaa28[_0x251e8c];return _0x1e0c1d;};'use strict';var _=require(_0x8aa2('0x0'));var util=require(_0x8aa2('0x1'));var logger=require(_0x8aa2('0x2'))('api');var moment=require(_0x8aa2('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(_0x8aa2('0x4'));var attributes=require(_0x8aa2('0x5'));module[_0x8aa2('0x6')]=function(_0x4ed3d1,_0x3974b7){return _0x4ed3d1[_0x8aa2('0x7')](_0x8aa2('0x8'),attributes,{'tableName':_0x8aa2('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index d33f0e1..038e677 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0ec4=['request\x20sent','FaxQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','findAll','options','where','attributes','limit','include','model','map','debug','GetFaxQueue','catch','ShowFaxQueue','FaxQueue','find','raw','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./faxQueue.socket','register','then','info','FaxQueue,\x20%s,\x20%s'];(function(_0x2f0c51,_0x58d7c){var _0x40803b=function(_0x3b855e){while(--_0x3b855e){_0x2f0c51['push'](_0x2f0c51['shift']());}};_0x40803b(++_0x58d7c);}(_0x0ec4,0x16e));var _0x40ec=function(_0x4d7d40,_0xb7b2a8){_0x4d7d40=_0x4d7d40-0x0;var _0xfac4c4=_0x0ec4[_0x4d7d40];return _0xfac4c4;};'use strict';var _=require(_0x40ec('0x0'));var util=require('util');var moment=require(_0x40ec('0x1'));var BPromise=require(_0x40ec('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x40ec('0x3'));var db=require(_0x40ec('0x4'))['db'];var utils=require(_0x40ec('0x5'));var logger=require(_0x40ec('0x6'))(_0x40ec('0x7'));var config=require(_0x40ec('0x8'));var jayson=require(_0x40ec('0x9'));var client=jayson[_0x40ec('0xa')][_0x40ec('0xb')]({'port':0x232a});config[_0x40ec('0xc')]=_[_0x40ec('0xd')](config['redis'],{'host':_0x40ec('0xe'),'port':0x18eb});var socket=require(_0x40ec('0xf'))(new Redis(config['redis']));require(_0x40ec('0x10'))[_0x40ec('0x11')](socket);function respondWithRpcPromise(_0x117e9a,_0x420c18,_0x34dbe1){return new BPromise(function(_0x489372,_0x479113){return client['request'](_0x117e9a,_0x34dbe1)[_0x40ec('0x12')](function(_0x3dc052){logger[_0x40ec('0x13')](_0x40ec('0x14'),_0x420c18,_0x40ec('0x15'));logger['debug'](_0x40ec('0x16'),_0x420c18,_0x40ec('0x15'),JSON[_0x40ec('0x17')](_0x3dc052));if(_0x3dc052[_0x40ec('0x18')]){if(_0x3dc052[_0x40ec('0x18')][_0x40ec('0x19')]===0x1f4){logger['error'](_0x40ec('0x14'),_0x420c18,_0x3dc052[_0x40ec('0x18')][_0x40ec('0x1a')]);return _0x479113(_0x3dc052[_0x40ec('0x18')][_0x40ec('0x1a')]);}logger[_0x40ec('0x18')](_0x40ec('0x14'),_0x420c18,_0x3dc052[_0x40ec('0x18')][_0x40ec('0x1a')]);return _0x489372(_0x3dc052[_0x40ec('0x18')][_0x40ec('0x1a')]);}else{logger['info']('FaxQueue,\x20%s,\x20%s',_0x420c18,_0x40ec('0x15'));_0x489372(_0x3dc052[_0x40ec('0x1b')][_0x40ec('0x1a')]);}})['catch'](function(_0x50642f){logger[_0x40ec('0x18')](_0x40ec('0x14'),_0x420c18,_0x50642f);_0x479113(_0x50642f);});});}exports['GetFaxQueue']=function(_0x5cc4a5){var _0x17ef58=this;return new Promise(function(_0x553cf4,_0x20971e){return db['FaxQueue'][_0x40ec('0x1c')]({'raw':_0x5cc4a5[_0x40ec('0x1d')]?_0x5cc4a5[_0x40ec('0x1d')]['raw']===undefined?!![]:![]:!![],'where':_0x5cc4a5[_0x40ec('0x1d')]?_0x5cc4a5[_0x40ec('0x1d')][_0x40ec('0x1e')]||null:null,'attributes':_0x5cc4a5[_0x40ec('0x1d')]?_0x5cc4a5[_0x40ec('0x1d')][_0x40ec('0x1f')]||null:null,'limit':_0x5cc4a5[_0x40ec('0x1d')]?_0x5cc4a5[_0x40ec('0x1d')][_0x40ec('0x20')]||null:null,'include':_0x5cc4a5['options']?_0x5cc4a5['options'][_0x40ec('0x21')]?_['map'](_0x5cc4a5[_0x40ec('0x1d')]['include'],function(_0x607c2e){return{'model':db[_0x607c2e[_0x40ec('0x22')]],'as':_0x607c2e['as'],'attributes':_0x607c2e['attributes'],'include':_0x607c2e[_0x40ec('0x21')]?_['map'](_0x607c2e[_0x40ec('0x21')],function(_0x2c90b0){return{'model':db[_0x2c90b0[_0x40ec('0x22')]],'as':_0x2c90b0['as'],'attributes':_0x2c90b0[_0x40ec('0x1f')],'include':_0x2c90b0[_0x40ec('0x21')]?_[_0x40ec('0x23')](_0x2c90b0[_0x40ec('0x21')],function(_0x3f9140){return{'model':db[_0x3f9140[_0x40ec('0x22')]],'as':_0x3f9140['as'],'attributes':_0x3f9140[_0x40ec('0x1f')]};}):[]};}):[]};}):[]:[]})['then'](function(_0xeadf40){logger[_0x40ec('0x13')]('GetFaxQueue',_0x5cc4a5);logger[_0x40ec('0x24')](_0x40ec('0x25'),_0x5cc4a5,JSON['stringify'](_0xeadf40));_0x553cf4(_0xeadf40);})[_0x40ec('0x26')](function(_0x4a4a5c){logger[_0x40ec('0x18')](_0x40ec('0x25'),_0x4a4a5c[_0x40ec('0x1a')],_0x5cc4a5);_0x20971e(_0x17ef58[_0x40ec('0x18')](0x1f4,_0x4a4a5c[_0x40ec('0x1a')]));});});};exports[_0x40ec('0x27')]=function(_0x1d46b4){var _0x4bab18=this;return new Promise(function(_0x1edad4,_0x867f0e){return db[_0x40ec('0x28')][_0x40ec('0x29')]({'raw':_0x1d46b4['options']?_0x1d46b4[_0x40ec('0x1d')][_0x40ec('0x2a')]===undefined?!![]:![]:!![],'where':_0x1d46b4[_0x40ec('0x1d')]?_0x1d46b4['options']['where']||null:null,'attributes':_0x1d46b4[_0x40ec('0x1d')]?_0x1d46b4[_0x40ec('0x1d')]['attributes']||null:null,'include':_0x1d46b4[_0x40ec('0x1d')]?_0x1d46b4[_0x40ec('0x1d')][_0x40ec('0x21')]?_[_0x40ec('0x23')](_0x1d46b4[_0x40ec('0x1d')][_0x40ec('0x21')],function(_0x16f2cf){return{'model':db[_0x16f2cf[_0x40ec('0x22')]],'as':_0x16f2cf['as'],'attributes':_0x16f2cf[_0x40ec('0x1f')],'include':_0x16f2cf[_0x40ec('0x21')]?_[_0x40ec('0x23')](_0x16f2cf[_0x40ec('0x21')],function(_0x2b7f80){return{'model':db[_0x2b7f80[_0x40ec('0x22')]],'as':_0x2b7f80['as'],'attributes':_0x2b7f80[_0x40ec('0x1f')],'include':_0x2b7f80[_0x40ec('0x21')]?_[_0x40ec('0x23')](_0x2b7f80[_0x40ec('0x21')],function(_0x1cf8be){return{'model':db[_0x1cf8be['model']],'as':_0x1cf8be['as'],'attributes':_0x1cf8be[_0x40ec('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x40ec('0x12')](function(_0x4b1f89){logger[_0x40ec('0x13')]('ShowFaxQueue',_0x1d46b4);logger[_0x40ec('0x24')](_0x40ec('0x27'),_0x1d46b4,JSON[_0x40ec('0x17')](_0x4b1f89));_0x1edad4(_0x4b1f89);})['catch'](function(_0x24b5d0){logger['error'](_0x40ec('0x27'),_0x24b5d0[_0x40ec('0x1a')],_0x1d46b4);_0x867f0e(_0x4bab18['error'](0x1f4,_0x24b5d0[_0x40ec('0x1a')]));});});};
\ No newline at end of file
+var _0xbb81=['info','result','catch','GetFaxQueue','findAll','options','raw','where','attributes','limit','include','model','map','ShowFaxQueue','FaxQueue','find','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','redis','localhost','socket.io-emitter','request','then','request\x20sent','debug','FaxQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','FaxQueue,\x20%s,\x20%s','message'];(function(_0xb6c5b5,_0x539e47){var _0x23f441=function(_0x2a1e55){while(--_0x2a1e55){_0xb6c5b5['push'](_0xb6c5b5['shift']());}};_0x23f441(++_0x539e47);}(_0xbb81,0x1bd));var _0x1bb8=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xbb81[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x1bb8('0x0'));var util=require(_0x1bb8('0x1'));var moment=require('moment');var BPromise=require(_0x1bb8('0x2'));var rs=require(_0x1bb8('0x3'));var fs=require('fs');var Redis=require(_0x1bb8('0x4'));var db=require(_0x1bb8('0x5'))['db'];var utils=require(_0x1bb8('0x6'));var logger=require(_0x1bb8('0x7'))('rpc');var config=require(_0x1bb8('0x8'));var jayson=require(_0x1bb8('0x9'));var client=jayson['client']['http']({'port':0x232a});config[_0x1bb8('0xa')]=_['defaults'](config[_0x1bb8('0xa')],{'host':_0x1bb8('0xb'),'port':0x18eb});var socket=require(_0x1bb8('0xc'))(new Redis(config['redis']));require('./faxQueue.socket')['register'](socket);function respondWithRpcPromise(_0x4c36da,_0x3b3a65,_0x2e0155){return new BPromise(function(_0x56b119,_0x4053ab){return client[_0x1bb8('0xd')](_0x4c36da,_0x2e0155)[_0x1bb8('0xe')](function(_0x4c7add){logger['info']('FaxQueue,\x20%s,\x20%s',_0x3b3a65,_0x1bb8('0xf'));logger[_0x1bb8('0x10')](_0x1bb8('0x11'),_0x3b3a65,_0x1bb8('0xf'),JSON[_0x1bb8('0x12')](_0x4c7add));if(_0x4c7add[_0x1bb8('0x13')]){if(_0x4c7add['error'][_0x1bb8('0x14')]===0x1f4){logger[_0x1bb8('0x13')](_0x1bb8('0x15'),_0x3b3a65,_0x4c7add[_0x1bb8('0x13')][_0x1bb8('0x16')]);return _0x4053ab(_0x4c7add[_0x1bb8('0x13')][_0x1bb8('0x16')]);}logger[_0x1bb8('0x13')](_0x1bb8('0x15'),_0x3b3a65,_0x4c7add[_0x1bb8('0x13')][_0x1bb8('0x16')]);return _0x56b119(_0x4c7add[_0x1bb8('0x13')][_0x1bb8('0x16')]);}else{logger[_0x1bb8('0x17')](_0x1bb8('0x15'),_0x3b3a65,_0x1bb8('0xf'));_0x56b119(_0x4c7add[_0x1bb8('0x18')]['message']);}})[_0x1bb8('0x19')](function(_0x28a600){logger[_0x1bb8('0x13')](_0x1bb8('0x15'),_0x3b3a65,_0x28a600);_0x4053ab(_0x28a600);});});}exports[_0x1bb8('0x1a')]=function(_0x479bd7){var _0x7f4ba5=this;return new Promise(function(_0x446c19,_0x2c5bc5){return db['FaxQueue'][_0x1bb8('0x1b')]({'raw':_0x479bd7[_0x1bb8('0x1c')]?_0x479bd7['options'][_0x1bb8('0x1d')]===undefined?!![]:![]:!![],'where':_0x479bd7[_0x1bb8('0x1c')]?_0x479bd7[_0x1bb8('0x1c')][_0x1bb8('0x1e')]||null:null,'attributes':_0x479bd7[_0x1bb8('0x1c')]?_0x479bd7[_0x1bb8('0x1c')][_0x1bb8('0x1f')]||null:null,'limit':_0x479bd7[_0x1bb8('0x1c')]?_0x479bd7[_0x1bb8('0x1c')][_0x1bb8('0x20')]||null:null,'include':_0x479bd7[_0x1bb8('0x1c')]?_0x479bd7[_0x1bb8('0x1c')][_0x1bb8('0x21')]?_['map'](_0x479bd7[_0x1bb8('0x1c')][_0x1bb8('0x21')],function(_0x1e0886){return{'model':db[_0x1e0886[_0x1bb8('0x22')]],'as':_0x1e0886['as'],'attributes':_0x1e0886[_0x1bb8('0x1f')],'include':_0x1e0886[_0x1bb8('0x21')]?_['map'](_0x1e0886[_0x1bb8('0x21')],function(_0x2d9879){return{'model':db[_0x2d9879[_0x1bb8('0x22')]],'as':_0x2d9879['as'],'attributes':_0x2d9879['attributes'],'include':_0x2d9879[_0x1bb8('0x21')]?_[_0x1bb8('0x23')](_0x2d9879[_0x1bb8('0x21')],function(_0x49ed54){return{'model':db[_0x49ed54[_0x1bb8('0x22')]],'as':_0x49ed54['as'],'attributes':_0x49ed54[_0x1bb8('0x1f')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x16a92e){logger[_0x1bb8('0x17')](_0x1bb8('0x1a'),_0x479bd7);logger[_0x1bb8('0x10')](_0x1bb8('0x1a'),_0x479bd7,JSON[_0x1bb8('0x12')](_0x16a92e));_0x446c19(_0x16a92e);})[_0x1bb8('0x19')](function(_0x1501f0){logger[_0x1bb8('0x13')]('GetFaxQueue',_0x1501f0['message'],_0x479bd7);_0x2c5bc5(_0x7f4ba5['error'](0x1f4,_0x1501f0[_0x1bb8('0x16')]));});});};exports[_0x1bb8('0x24')]=function(_0x19c37b){var _0x4507e2=this;return new Promise(function(_0x36d1f5,_0x5cec16){return db[_0x1bb8('0x25')][_0x1bb8('0x26')]({'raw':_0x19c37b[_0x1bb8('0x1c')]?_0x19c37b[_0x1bb8('0x1c')][_0x1bb8('0x1d')]===undefined?!![]:![]:!![],'where':_0x19c37b[_0x1bb8('0x1c')]?_0x19c37b[_0x1bb8('0x1c')][_0x1bb8('0x1e')]||null:null,'attributes':_0x19c37b[_0x1bb8('0x1c')]?_0x19c37b[_0x1bb8('0x1c')][_0x1bb8('0x1f')]||null:null,'include':_0x19c37b['options']?_0x19c37b[_0x1bb8('0x1c')][_0x1bb8('0x21')]?_[_0x1bb8('0x23')](_0x19c37b[_0x1bb8('0x1c')][_0x1bb8('0x21')],function(_0x56c70d){return{'model':db[_0x56c70d['model']],'as':_0x56c70d['as'],'attributes':_0x56c70d[_0x1bb8('0x1f')],'include':_0x56c70d[_0x1bb8('0x21')]?_[_0x1bb8('0x23')](_0x56c70d[_0x1bb8('0x21')],function(_0x2cb166){return{'model':db[_0x2cb166[_0x1bb8('0x22')]],'as':_0x2cb166['as'],'attributes':_0x2cb166[_0x1bb8('0x1f')],'include':_0x2cb166[_0x1bb8('0x21')]?_[_0x1bb8('0x23')](_0x2cb166['include'],function(_0x4afbbc){return{'model':db[_0x4afbbc[_0x1bb8('0x22')]],'as':_0x4afbbc['as'],'attributes':_0x4afbbc[_0x1bb8('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x1bb8('0xe')](function(_0x174572){logger['info'](_0x1bb8('0x24'),_0x19c37b);logger['debug'](_0x1bb8('0x24'),_0x19c37b,JSON[_0x1bb8('0x12')](_0x174572));_0x36d1f5(_0x174572);})[_0x1bb8('0x19')](function(_0x6e1cdc){logger[_0x1bb8('0x13')]('ShowFaxQueue',_0x6e1cdc[_0x1bb8('0x16')],_0x19c37b);_0x5cec16(_0x4507e2[_0x1bb8('0x13')](0x1f4,_0x6e1cdc[_0x1bb8('0x16')]));});});};
\ No newline at end of file
index f50c66e..c7cb68c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb7f0=['save','remove','update','emit','removeListener','register','faxQueue:','./faxQueue.events'];(function(_0x90334d,_0x3ec517){var _0x42c8cf=function(_0x28520a){while(--_0x28520a){_0x90334d['push'](_0x90334d['shift']());}};_0x42c8cf(++_0x3ec517);}(_0xb7f0,0x1c7));var _0x0b7f=function(_0x4a010b,_0x3523b3){_0x4a010b=_0x4a010b-0x0;var _0xe0b19b=_0xb7f0[_0x4a010b];return _0xe0b19b;};'use strict';var FaxQueueEvents=require(_0x0b7f('0x0'));var events=[_0x0b7f('0x1'),_0x0b7f('0x2'),_0x0b7f('0x3')];function createListener(_0x171ae7,_0x4c531b){return function(_0x3203b8){_0x4c531b[_0x0b7f('0x4')](_0x171ae7,_0x3203b8);};}function removeListener(_0x3cff7b,_0x38d9c4){return function(){FaxQueueEvents[_0x0b7f('0x5')](_0x3cff7b,_0x38d9c4);};}exports[_0x0b7f('0x6')]=function(_0x5c8414){for(var _0x4b8226=0x0,_0x40ca13=events['length'];_0x4b8226<_0x40ca13;_0x4b8226++){var _0x47f10c=events[_0x4b8226];var _0x5aea3e=createListener(_0x0b7f('0x7')+_0x47f10c,_0x5c8414);FaxQueueEvents['on'](_0x47f10c,_0x5aea3e);}};
\ No newline at end of file
+var _0x0763=['remove','update','emit','removeListener','register','length','faxQueue:','./faxQueue.events'];(function(_0x48ff3f,_0x4b0c76){var _0x3afe5a=function(_0xcd6f14){while(--_0xcd6f14){_0x48ff3f['push'](_0x48ff3f['shift']());}};_0x3afe5a(++_0x4b0c76);}(_0x0763,0x87));var _0x3076=function(_0x40bc01,_0x22a9a9){_0x40bc01=_0x40bc01-0x0;var _0x42365b=_0x0763[_0x40bc01];return _0x42365b;};'use strict';var FaxQueueEvents=require(_0x3076('0x0'));var events=['save',_0x3076('0x1'),_0x3076('0x2')];function createListener(_0x5d64db,_0x37d1cf){return function(_0xa646e7){_0x37d1cf[_0x3076('0x3')](_0x5d64db,_0xa646e7);};}function removeListener(_0xecc289,_0x55bd44){return function(){FaxQueueEvents[_0x3076('0x4')](_0xecc289,_0x55bd44);};}exports[_0x3076('0x5')]=function(_0x1ce2ff){for(var _0x1b5f4e=0x0,_0x18b4c8=events[_0x3076('0x6')];_0x1b5f4e<_0x18b4c8;_0x1b5f4e++){var _0x2776c8=events[_0x1b5f4e];var _0xf1ee41=createListener(_0x3076('0x7')+_0x2776c8,_0x1ce2ff);FaxQueueEvents['on'](_0x2776c8,_0xf1ee41);}};
\ No newline at end of file
index f977e77..45fddcd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5f6f=['get','isAuthenticated','index','describe','/:id','show','getMembers','/:id/teams','getTeams','/:id/users','getAgents','create','post','addTeams','put','update','delete','removeTeams','removeAgents','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','./faxQueue.controller'];(function(_0x293fc7,_0x298189){var _0x2ffb18=function(_0x1d5ed0){while(--_0x1d5ed0){_0x293fc7['push'](_0x293fc7['shift']());}};_0x2ffb18(++_0x298189);}(_0x5f6f,0x1ef));var _0xf5f6=function(_0x2555d0,_0x4150a6){_0x2555d0=_0x2555d0-0x0;var _0x3bb486=_0x5f6f[_0x2555d0];return _0x3bb486;};'use strict';var multer=require(_0xf5f6('0x0'));var util=require(_0xf5f6('0x1'));var path=require(_0xf5f6('0x2'));var timeout=require(_0xf5f6('0x3'));var express=require(_0xf5f6('0x4'));var router=express['Router']();var fs_extra=require(_0xf5f6('0x5'));var auth=require(_0xf5f6('0x6'));var interaction=require(_0xf5f6('0x7'));var config=require('../../config/environment');var controller=require(_0xf5f6('0x8'));router[_0xf5f6('0x9')]('/',auth[_0xf5f6('0xa')](),controller[_0xf5f6('0xb')]);router['get']('/describe',auth[_0xf5f6('0xa')](),controller[_0xf5f6('0xc')]);router[_0xf5f6('0x9')](_0xf5f6('0xd'),auth[_0xf5f6('0xa')](),controller[_0xf5f6('0xe')]);router['get']('/:id/members',auth[_0xf5f6('0xa')](),controller[_0xf5f6('0xf')]);router['get'](_0xf5f6('0x10'),auth[_0xf5f6('0xa')](),controller[_0xf5f6('0x11')]);router[_0xf5f6('0x9')](_0xf5f6('0x12'),auth['isAuthenticated'](),controller[_0xf5f6('0x13')]);router['post']('/',auth[_0xf5f6('0xa')](),controller[_0xf5f6('0x14')]);router[_0xf5f6('0x15')](_0xf5f6('0x10'),auth['isAuthenticated'](),controller[_0xf5f6('0x16')]);router[_0xf5f6('0x15')](_0xf5f6('0x12'),auth[_0xf5f6('0xa')](),controller['addAgents']);router[_0xf5f6('0x17')](_0xf5f6('0xd'),auth[_0xf5f6('0xa')](),controller[_0xf5f6('0x18')]);router['delete']('/:id',auth[_0xf5f6('0xa')](),controller['destroy']);router[_0xf5f6('0x19')]('/:id/teams',auth[_0xf5f6('0xa')](),controller[_0xf5f6('0x1a')]);router[_0xf5f6('0x19')](_0xf5f6('0x12'),auth[_0xf5f6('0xa')](),controller[_0xf5f6('0x1b')]);module['exports']=router;
\ No newline at end of file
+var _0x6657=['put','update','delete','destroy','removeAgents','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxQueue.controller','get','isAuthenticated','index','describe','/:id','show','/:id/members','getMembers','/:id/teams','getTeams','/:id/users','post','addTeams','addAgents'];(function(_0x38a7ac,_0x45514b){var _0x53061a=function(_0x1d2469){while(--_0x1d2469){_0x38a7ac['push'](_0x38a7ac['shift']());}};_0x53061a(++_0x45514b);}(_0x6657,0x17f));var _0x7665=function(_0x13f054,_0xd90d91){_0x13f054=_0x13f054-0x0;var _0x253d46=_0x6657[_0x13f054];return _0x253d46;};'use strict';var multer=require(_0x7665('0x0'));var util=require('util');var path=require(_0x7665('0x1'));var timeout=require(_0x7665('0x2'));var express=require(_0x7665('0x3'));var router=express[_0x7665('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x7665('0x5'));var interaction=require(_0x7665('0x6'));var config=require(_0x7665('0x7'));var controller=require(_0x7665('0x8'));router[_0x7665('0x9')]('/',auth[_0x7665('0xa')](),controller[_0x7665('0xb')]);router[_0x7665('0x9')]('/describe',auth[_0x7665('0xa')](),controller[_0x7665('0xc')]);router[_0x7665('0x9')](_0x7665('0xd'),auth[_0x7665('0xa')](),controller[_0x7665('0xe')]);router[_0x7665('0x9')](_0x7665('0xf'),auth['isAuthenticated'](),controller[_0x7665('0x10')]);router[_0x7665('0x9')](_0x7665('0x11'),auth['isAuthenticated'](),controller[_0x7665('0x12')]);router['get'](_0x7665('0x13'),auth[_0x7665('0xa')](),controller['getAgents']);router[_0x7665('0x14')]('/',auth[_0x7665('0xa')](),controller['create']);router[_0x7665('0x14')](_0x7665('0x11'),auth['isAuthenticated'](),controller[_0x7665('0x15')]);router[_0x7665('0x14')](_0x7665('0x13'),auth[_0x7665('0xa')](),controller[_0x7665('0x16')]);router[_0x7665('0x17')](_0x7665('0xd'),auth[_0x7665('0xa')](),controller[_0x7665('0x18')]);router[_0x7665('0x19')](_0x7665('0xd'),auth[_0x7665('0xa')](),controller[_0x7665('0x1a')]);router[_0x7665('0x19')](_0x7665('0x11'),auth[_0x7665('0xa')](),controller['removeTeams']);router[_0x7665('0x19')](_0x7665('0x13'),auth['isAuthenticated'](),controller[_0x7665('0x1b')]);module[_0x7665('0x1c')]=router;
\ No newline at end of file
index 0f54ae1..1af7371 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8307=['STRING','DATE','sequelize','exports'];(function(_0x528038,_0x5a5b73){var _0x2296ce=function(_0x29c683){while(--_0x29c683){_0x528038['push'](_0x528038['shift']());}};_0x2296ce(++_0x5a5b73);}(_0x8307,0xca));var _0x7830=function(_0x10f059,_0xb56fdd){_0x10f059=_0x10f059-0x0;var _0x4ab4ed=_0x8307[_0x10f059];return _0x4ab4ed;};'use strict';var moment=require('moment');var Sequelize=require(_0x7830('0x0'));module[_0x7830('0x1')]={'uniqueid':{'type':Sequelize[_0x7830('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0x7830('0x2')]},'joinAt':{'type':Sequelize[_0x7830('0x3')]},'leaveAt':{'type':Sequelize[_0x7830('0x3')]},'acceptAt':{'type':Sequelize[_0x7830('0x3')]},'exitAt':{'type':Sequelize[_0x7830('0x3')]},'reason':{'type':Sequelize[_0x7830('0x2')]}};
\ No newline at end of file
+var _0x9ac5=['DATE','moment','exports','STRING'];(function(_0x1e09f7,_0x36d27c){var _0x599efe=function(_0x32d7b3){while(--_0x32d7b3){_0x1e09f7['push'](_0x1e09f7['shift']());}};_0x599efe(++_0x36d27c);}(_0x9ac5,0x129));var _0x59ac=function(_0x3ffd37,_0x441e14){_0x3ffd37=_0x3ffd37-0x0;var _0x218743=_0x9ac5[_0x3ffd37];return _0x218743;};'use strict';var moment=require(_0x59ac('0x0'));var Sequelize=require('sequelize');module[_0x59ac('0x1')]={'uniqueid':{'type':Sequelize[_0x59ac('0x2')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0x59ac('0x3')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0x59ac('0x3')]},'reason':{'type':Sequelize['STRING']}};
\ No newline at end of file
index ef976d1..b447e48 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','FaxQueueReport','rawAttributes','fieldName','key','model','map','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','filter','merge'];(function(_0x12fc8d,_0x19ee33){var _0x3f9d04=function(_0x52e51c){while(--_0x52e51c){_0x12fc8d['push'](_0x12fc8d['shift']());}};_0x3f9d04(++_0x19ee33);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5447fd,_0x52a6b5){_0x5447fd=_0x5447fd-0x0;var _0x15b28a=_0xa9e0[_0x5447fd];return _0x15b28a;};'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['FaxQueueReport'][_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 _0x76bc=['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','sendStatus','status','json','offset','undefined','count','limit','set','Content-Range','apply','save','update','then','destroy','end','name','send','map','FaxQueueReport','fieldName','type','key','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','VIRTUAL','filter','merge','options','includeAll','findAll','rows','catch','show','params','rawAttributes','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','path','sox','to-csv','ejs','fs-extra'];(function(_0xd728e1,_0x48d56f){var _0x7bcdac=function(_0x388378){while(--_0x388378){_0xd728e1['push'](_0xd728e1['shift']());}};_0x7bcdac(++_0x48d56f);}(_0x76bc,0x17f));var _0xc76b=function(_0x13992d,_0x3029ea){_0x13992d=_0x13992d-0x0;var _0x3d15bf=_0x76bc[_0x13992d];return _0x3d15bf;};'use strict';var emlformat=require(_0xc76b('0x0'));var rimraf=require(_0xc76b('0x1'));var zipdir=require(_0xc76b('0x2'));var jsonpatch=require(_0xc76b('0x3'));var rp=require(_0xc76b('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xc76b('0x5'));var util=require(_0xc76b('0x6'));var path=require(_0xc76b('0x7'));var sox=require(_0xc76b('0x8'));var csv=require(_0xc76b('0x9'));var ejs=require(_0xc76b('0xa'));var fs=require('fs');var fs_extra=require(_0xc76b('0xb'));var _=require(_0xc76b('0xc'));var squel=require(_0xc76b('0xd'));var crypto=require(_0xc76b('0xe'));var jsforce=require(_0xc76b('0xf'));var deskjs=require(_0xc76b('0x10'));var toCsv=require(_0xc76b('0x9'));var querystring=require(_0xc76b('0x11'));var Papa=require(_0xc76b('0x12'));var Redis=require(_0xc76b('0x13'));var authService=require('../../components/auth/service');var qs=require(_0xc76b('0x14'));var as=require(_0xc76b('0x15'));var hardwareService=require(_0xc76b('0x16'));var logger=require(_0xc76b('0x17'))(_0xc76b('0x18'));var utils=require(_0xc76b('0x19'));var config=require('../../config/environment');var licenseUtil=require(_0xc76b('0x1a'));var db=require(_0xc76b('0x1b'))['db'];function respondWithStatusCode(_0x30835f,_0xc84b2c){_0xc84b2c=_0xc84b2c||0xcc;return function(_0x4474cd){if(_0x4474cd){return _0x30835f[_0xc76b('0x1c')](_0xc84b2c);}return _0x30835f[_0xc76b('0x1d')](_0xc84b2c)['end']();};}function respondWithResult(_0x538ca8,_0x38a0f1){_0x38a0f1=_0x38a0f1||0xc8;return function(_0x25e4a1){if(_0x25e4a1){return _0x538ca8[_0xc76b('0x1d')](_0x38a0f1)[_0xc76b('0x1e')](_0x25e4a1);}};}function respondWithFilteredResult(_0x25752f,_0x5d1130){return function(_0x21d99a){if(_0x21d99a){var _0x2db167=typeof _0x5d1130[_0xc76b('0x1f')]==='undefined'&&typeof _0x5d1130['limit']===_0xc76b('0x20');var _0x2d3e9d=_0x21d99a[_0xc76b('0x21')];var _0x3e716e=_0x2db167?0x0:_0x5d1130[_0xc76b('0x1f')];var _0x55a61d=_0x2db167?_0x21d99a['count']:_0x5d1130['offset']+_0x5d1130[_0xc76b('0x22')];var _0x164d38;if(_0x55a61d>=_0x2d3e9d){_0x55a61d=_0x2d3e9d;_0x164d38=0xc8;}else{_0x164d38=0xce;}_0x25752f[_0xc76b('0x1d')](_0x164d38);return _0x25752f[_0xc76b('0x23')](_0xc76b('0x24'),_0x3e716e+'-'+_0x55a61d+'/'+_0x2d3e9d)[_0xc76b('0x1e')](_0x21d99a);}return null;};}function patchUpdates(_0x336be9){return function(_0x20aed4){try{jsonpatch[_0xc76b('0x25')](_0x20aed4,_0x336be9,!![]);}catch(_0x393b0b){return BPromise['reject'](_0x393b0b);}return _0x20aed4[_0xc76b('0x26')]();};}function saveUpdates(_0x4bf5a9,_0x51fafe){return function(_0x3bbede){if(_0x3bbede){return _0x3bbede[_0xc76b('0x27')](_0x4bf5a9)[_0xc76b('0x28')](function(_0xac9a7f){return _0xac9a7f;});}return null;};}function removeEntity(_0x18332d,_0xa6a862){return function(_0x24ee9a){if(_0x24ee9a){return _0x24ee9a[_0xc76b('0x29')]()['then'](function(){_0x18332d[_0xc76b('0x1d')](0xcc)[_0xc76b('0x2a')]();});}};}function handleEntityNotFound(_0x5f0a7b,_0xf43320){return function(_0x2ac9de){if(!_0x2ac9de){_0x5f0a7b[_0xc76b('0x1c')](0x194);}return _0x2ac9de;};}function handleError(_0x25ea69,_0x369fc1){_0x369fc1=_0x369fc1||0x1f4;return function(_0x451ee1){logger['error'](_0x451ee1['stack']);if(_0x451ee1[_0xc76b('0x2b')]){delete _0x451ee1[_0xc76b('0x2b')];}_0x25ea69[_0xc76b('0x1d')](_0x369fc1)[_0xc76b('0x2c')](_0x451ee1);};}exports['index']=function(_0xd92178,_0x26c19b){var _0x35d1bc={},_0x4a0918={},_0x24142f={'count':0x0,'rows':[]};var _0x2cbdb7=_[_0xc76b('0x2d')](db[_0xc76b('0x2e')]['rawAttributes'],function(_0x41952f){return{'name':_0x41952f[_0xc76b('0x2f')],'type':_0x41952f[_0xc76b('0x30')][_0xc76b('0x31')]};});_0x4a0918[_0xc76b('0x32')]=_['map'](_0x2cbdb7,_0xc76b('0x2b'));_0x4a0918['query']=_[_0xc76b('0x33')](_0xd92178[_0xc76b('0x34')]);_0x4a0918[_0xc76b('0x35')]=_[_0xc76b('0x36')](_0x4a0918[_0xc76b('0x32')],_0x4a0918[_0xc76b('0x34')]);_0x35d1bc['attributes']=_['intersection'](_0x4a0918[_0xc76b('0x32')],qs[_0xc76b('0x37')](_0xd92178[_0xc76b('0x34')][_0xc76b('0x37')]));_0x35d1bc[_0xc76b('0x38')]=_0x35d1bc[_0xc76b('0x38')][_0xc76b('0x39')]?_0x35d1bc[_0xc76b('0x38')]:_0x4a0918[_0xc76b('0x32')];if(!_0xd92178[_0xc76b('0x34')][_0xc76b('0x3a')](_0xc76b('0x3b'))){_0x35d1bc[_0xc76b('0x22')]=qs[_0xc76b('0x22')](_0xd92178[_0xc76b('0x34')]['limit']);_0x35d1bc[_0xc76b('0x1f')]=qs[_0xc76b('0x1f')](_0xd92178[_0xc76b('0x34')][_0xc76b('0x1f')]);}_0x35d1bc[_0xc76b('0x3c')]=qs[_0xc76b('0x3d')](_0xd92178[_0xc76b('0x34')][_0xc76b('0x3d')]);_0x35d1bc[_0xc76b('0x3e')]=qs[_0xc76b('0x35')](_[_0xc76b('0x3f')](_0xd92178[_0xc76b('0x34')],_0x4a0918[_0xc76b('0x35')]),_0x2cbdb7);if(_0xd92178[_0xc76b('0x34')]['filter']){_0x35d1bc[_0xc76b('0x3e')]=_['merge'](_0x35d1bc[_0xc76b('0x3e')],{'$or':_['map'](_0x2cbdb7,function(_0x3c3ea6){if(_0x3c3ea6[_0xc76b('0x30')]!==_0xc76b('0x40')){var _0xc0d2d2={};_0xc0d2d2[_0x3c3ea6[_0xc76b('0x2b')]]={'$like':'%'+_0xd92178['query'][_0xc76b('0x41')]+'%'};return _0xc0d2d2;}})});}_0x35d1bc=_[_0xc76b('0x42')]({},_0x35d1bc,_0xd92178[_0xc76b('0x43')]);var _0x10be6f={'where':_0x35d1bc[_0xc76b('0x3e')]};return db[_0xc76b('0x2e')][_0xc76b('0x21')](_0x10be6f)[_0xc76b('0x28')](function(_0x40d97c){_0x24142f[_0xc76b('0x21')]=_0x40d97c;if(_0xd92178['query'][_0xc76b('0x44')]){_0x35d1bc['include']=[{'all':!![]}];}return db[_0xc76b('0x2e')][_0xc76b('0x45')](_0x35d1bc);})[_0xc76b('0x28')](function(_0x3f0c4b){_0x24142f[_0xc76b('0x46')]=_0x3f0c4b;return _0x24142f;})[_0xc76b('0x28')](respondWithFilteredResult(_0x26c19b,_0x35d1bc))[_0xc76b('0x47')](handleError(_0x26c19b,null));};exports[_0xc76b('0x48')]=function(_0x4d7e94,_0x2b3d36){var _0x4ba8a9={'raw':!![],'where':{'id':_0x4d7e94[_0xc76b('0x49')]['id']}},_0x4b3485={};_0x4b3485['model']=_[_0xc76b('0x33')](db[_0xc76b('0x2e')][_0xc76b('0x4a')]);_0x4b3485[_0xc76b('0x34')]=_[_0xc76b('0x33')](_0x4d7e94['query']);_0x4b3485[_0xc76b('0x35')]=_[_0xc76b('0x36')](_0x4b3485[_0xc76b('0x32')],_0x4b3485[_0xc76b('0x34')]);_0x4ba8a9[_0xc76b('0x38')]=_[_0xc76b('0x36')](_0x4b3485[_0xc76b('0x32')],qs['fields'](_0x4d7e94[_0xc76b('0x34')]['fields']));_0x4ba8a9[_0xc76b('0x38')]=_0x4ba8a9[_0xc76b('0x38')]['length']?_0x4ba8a9[_0xc76b('0x38')]:_0x4b3485[_0xc76b('0x32')];if(_0x4d7e94['query'][_0xc76b('0x44')]){_0x4ba8a9['include']=[{'all':!![]}];}_0x4ba8a9=_[_0xc76b('0x42')]({},_0x4ba8a9,_0x4d7e94['options']);return db[_0xc76b('0x2e')][_0xc76b('0x4b')](_0x4ba8a9)['then'](handleEntityNotFound(_0x2b3d36,null))[_0xc76b('0x28')](respondWithResult(_0x2b3d36,null))[_0xc76b('0x47')](handleError(_0x2b3d36,null));};exports[_0xc76b('0x4c')]=function(_0x52dd73,_0x43f414){return db[_0xc76b('0x2e')][_0xc76b('0x4c')](_0x52dd73['body'],{})[_0xc76b('0x28')](respondWithResult(_0x43f414,0xc9))[_0xc76b('0x47')](handleError(_0x43f414,null));};exports[_0xc76b('0x27')]=function(_0x126c96,_0x4d65eb){if(_0x126c96[_0xc76b('0x4d')]['id']){delete _0x126c96[_0xc76b('0x4d')]['id'];}return db[_0xc76b('0x2e')][_0xc76b('0x4b')]({'where':{'id':_0x126c96[_0xc76b('0x49')]['id']}})[_0xc76b('0x28')](handleEntityNotFound(_0x4d65eb,null))[_0xc76b('0x28')](saveUpdates(_0x126c96[_0xc76b('0x4d')],null))[_0xc76b('0x28')](respondWithResult(_0x4d65eb,null))['catch'](handleError(_0x4d65eb,null));};exports[_0xc76b('0x29')]=function(_0x12efb0,_0x17b009){return db['FaxQueueReport'][_0xc76b('0x4b')]({'where':{'id':_0x12efb0[_0xc76b('0x49')]['id']}})[_0xc76b('0x28')](handleEntityNotFound(_0x17b009,null))[_0xc76b('0x28')](removeEntity(_0x17b009,null))[_0xc76b('0x47')](handleError(_0x17b009,null));};exports[_0xc76b('0x4e')]=function(_0x4f4f14,_0xddb2ce){return db[_0xc76b('0x2e')][_0xc76b('0x4e')]()[_0xc76b('0x28')](respondWithResult(_0xddb2ce,null))['catch'](handleError(_0xddb2ce,null));};
\ No newline at end of file
index 2fa4778..9ecf6e9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x326f=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./faxQueueReport.attributes','exports','define','FaxQueueReport','report_fax_queue','uniqueid','lodash'];(function(_0xd71aa,_0x384ead){var _0x3f0ee1=function(_0x4a053d){while(--_0x4a053d){_0xd71aa['push'](_0xd71aa['shift']());}};_0x3f0ee1(++_0x384ead);}(_0x326f,0xd1));var _0xf326=function(_0x5efb40,_0x3287f8){_0x5efb40=_0x5efb40-0x0;var _0x298e61=_0x326f[_0x5efb40];return _0x298e61;};'use strict';var _=require(_0xf326('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xf326('0x1'));var moment=require(_0xf326('0x2'));var BPromise=require(_0xf326('0x3'));var rp=require(_0xf326('0x4'));var fs=require('fs');var path=require(_0xf326('0x5'));var rimraf=require(_0xf326('0x6'));var config=require(_0xf326('0x7'));var attributes=require(_0xf326('0x8'));module[_0xf326('0x9')]=function(_0x3ace29,_0x4c2249){return _0x3ace29[_0xf326('0xa')](_0xf326('0xb'),attributes,{'tableName':_0xf326('0xc'),'paranoid':![],'indexes':[{'name':_0xf326('0xd'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0xabce=['path','rimraf','../../config/environment','define','report_fax_queue','uniqueid','lodash','util','../../config/logger','api','moment'];(function(_0x35c4dc,_0x284c3b){var _0x5a1d35=function(_0x429daf){while(--_0x429daf){_0x35c4dc['push'](_0x35c4dc['shift']());}};_0x5a1d35(++_0x284c3b);}(_0xabce,0x103));var _0xeabc=function(_0x12d033,_0x25fa2f){_0x12d033=_0x12d033-0x0;var _0x3b4e80=_0xabce[_0x12d033];return _0x3b4e80;};'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('./faxQueueReport.attributes');module['exports']=function(_0x1b07a8,_0x52a4d7){return _0x1b07a8[_0xeabc('0x8')]('FaxQueueReport',attributes,{'tableName':_0xeabc('0x9'),'paranoid':![],'indexes':[{'name':_0xeabc('0xa'),'fields':[_0xeabc('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
index fc1702c..c371c17 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa81c=['request\x20sent','debug','FaxQueueReport,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','catch','CreateFaxQueueReport','create','body','options','raw','then','UpdateFaxQueueReport','FaxQueueReport','where','attributes','limit','lodash','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','info','FaxQueueReport,\x20%s,\x20%s'];(function(_0x279968,_0x1574f7){var _0x5902c3=function(_0x527980){while(--_0x527980){_0x279968['push'](_0x279968['shift']());}};_0x5902c3(++_0x1574f7);}(_0xa81c,0x11c));var _0xca81=function(_0x223aa7,_0xcb8557){_0x223aa7=_0x223aa7-0x0;var _0x512571=_0xa81c[_0x223aa7];return _0x512571;};'use strict';var _=require(_0xca81('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xca81('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xca81('0x2'));var db=require(_0xca81('0x3'))['db'];var utils=require(_0xca81('0x4'));var logger=require(_0xca81('0x5'))(_0xca81('0x6'));var config=require(_0xca81('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xca81('0x8')][_0xca81('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x29ddaf,_0x30cff7,_0x22d665){return new BPromise(function(_0x94fb21,_0x5c27cd){return client[_0xca81('0xa')](_0x29ddaf,_0x22d665)['then'](function(_0xa0ef7b){logger[_0xca81('0xb')](_0xca81('0xc'),_0x30cff7,_0xca81('0xd'));logger[_0xca81('0xe')](_0xca81('0xf'),_0x30cff7,_0xca81('0xd'),JSON[_0xca81('0x10')](_0xa0ef7b));if(_0xa0ef7b['error']){if(_0xa0ef7b['error'][_0xca81('0x11')]===0x1f4){logger[_0xca81('0x12')](_0xca81('0xc'),_0x30cff7,_0xa0ef7b[_0xca81('0x12')][_0xca81('0x13')]);return _0x5c27cd(_0xa0ef7b[_0xca81('0x12')][_0xca81('0x13')]);}logger[_0xca81('0x12')](_0xca81('0xc'),_0x30cff7,_0xa0ef7b[_0xca81('0x12')][_0xca81('0x13')]);return _0x94fb21(_0xa0ef7b['error']['message']);}else{logger[_0xca81('0xb')]('FaxQueueReport,\x20%s,\x20%s',_0x30cff7,_0xca81('0xd'));_0x94fb21(_0xa0ef7b[_0xca81('0x14')][_0xca81('0x13')]);}})[_0xca81('0x15')](function(_0x2391f4){logger[_0xca81('0x12')](_0xca81('0xc'),_0x30cff7,_0x2391f4);_0x5c27cd(_0x2391f4);});});}exports[_0xca81('0x16')]=function(_0x55572c){var _0x3f689e=this;return new Promise(function(_0x235f15,_0x371420){return db['FaxQueueReport'][_0xca81('0x17')](_0x55572c[_0xca81('0x18')],{'raw':_0x55572c[_0xca81('0x19')]?_0x55572c['options'][_0xca81('0x1a')]===undefined?!![]:![]:!![]})[_0xca81('0x1b')](function(_0x53a374){logger[_0xca81('0xb')](_0xca81('0x16'),_0x55572c);logger['debug']('CreateFaxQueueReport',_0x55572c,JSON[_0xca81('0x10')](_0x53a374));_0x235f15(_0x53a374);})[_0xca81('0x15')](function(_0x3597f2){logger[_0xca81('0x12')](_0xca81('0x16'),_0x3597f2[_0xca81('0x13')],_0x55572c);_0x371420(_0x3f689e['error'](0x1f4,_0x3597f2[_0xca81('0x13')]));});});};exports[_0xca81('0x1c')]=function(_0x27840f){var _0x4e1cd8=this;return new Promise(function(_0x1af692,_0x59684f){return db[_0xca81('0x1d')]['update'](_0x27840f['body'],{'raw':_0x27840f[_0xca81('0x19')]?_0x27840f[_0xca81('0x19')][_0xca81('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x27840f[_0xca81('0x19')]?_0x27840f[_0xca81('0x19')][_0xca81('0x1e')]||null:null,'attributes':_0x27840f['options']?_0x27840f['options'][_0xca81('0x1f')]||null:null,'limit':_0x27840f[_0xca81('0x19')]?_0x27840f[_0xca81('0x19')][_0xca81('0x20')]||null:null})[_0xca81('0x1b')](function(_0x44795d){logger['info'](_0xca81('0x1c'),_0x27840f);logger[_0xca81('0xe')](_0xca81('0x1c'),_0x27840f,JSON['stringify'](_0x44795d));_0x1af692(_0x44795d);})[_0xca81('0x15')](function(_0x2d80f2){logger['error']('UpdateFaxQueueReport',_0x2d80f2['message'],_0x27840f);_0x59684f(_0x4e1cd8['error'](0x1f4,_0x2d80f2['message']));});});};
\ No newline at end of file
+var _0x08f2=['rpc','../../config/environment','jayson/promise','client','http','request','info','FaxQueueReport,\x20%s,\x20%s','request\x20sent','debug','FaxQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','FaxQueueReport','create','body','options','raw','CreateFaxQueueReport','UpdateFaxQueueReport','update','attributes','limit','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x56c6c6,_0x20fd70){var _0x2e17c1=function(_0x349684){while(--_0x349684){_0x56c6c6['push'](_0x56c6c6['shift']());}};_0x2e17c1(++_0x20fd70);}(_0x08f2,0x13a));var _0x208f=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0x08f2[_0x5ddb1c];return _0x354adc;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0x208f('0x0'));var rs=require(_0x208f('0x1'));var fs=require('fs');var Redis=require(_0x208f('0x2'));var db=require(_0x208f('0x3'))['db'];var utils=require(_0x208f('0x4'));var logger=require(_0x208f('0x5'))(_0x208f('0x6'));var config=require(_0x208f('0x7'));var jayson=require(_0x208f('0x8'));var client=jayson[_0x208f('0x9')][_0x208f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x57253c,_0x515bfe,_0x3c31d7){return new BPromise(function(_0x21e587,_0x566301){return client[_0x208f('0xb')](_0x57253c,_0x3c31d7)['then'](function(_0x4eebbc){logger[_0x208f('0xc')](_0x208f('0xd'),_0x515bfe,_0x208f('0xe'));logger[_0x208f('0xf')](_0x208f('0x10'),_0x515bfe,_0x208f('0xe'),JSON[_0x208f('0x11')](_0x4eebbc));if(_0x4eebbc[_0x208f('0x12')]){if(_0x4eebbc[_0x208f('0x12')]['code']===0x1f4){logger['error']('FaxQueueReport,\x20%s,\x20%s',_0x515bfe,_0x4eebbc[_0x208f('0x12')][_0x208f('0x13')]);return _0x566301(_0x4eebbc[_0x208f('0x12')][_0x208f('0x13')]);}logger['error'](_0x208f('0xd'),_0x515bfe,_0x4eebbc[_0x208f('0x12')][_0x208f('0x13')]);return _0x21e587(_0x4eebbc['error'][_0x208f('0x13')]);}else{logger[_0x208f('0xc')](_0x208f('0xd'),_0x515bfe,_0x208f('0xe'));_0x21e587(_0x4eebbc[_0x208f('0x14')]['message']);}})[_0x208f('0x15')](function(_0xc19620){logger[_0x208f('0x12')](_0x208f('0xd'),_0x515bfe,_0xc19620);_0x566301(_0xc19620);});});}exports['CreateFaxQueueReport']=function(_0x42eb02){var _0x5bcee4=this;return new Promise(function(_0x337d58,_0x393cbf){return db[_0x208f('0x16')][_0x208f('0x17')](_0x42eb02[_0x208f('0x18')],{'raw':_0x42eb02['options']?_0x42eb02[_0x208f('0x19')][_0x208f('0x1a')]===undefined?!![]:![]:!![]})['then'](function(_0x3c442b){logger[_0x208f('0xc')](_0x208f('0x1b'),_0x42eb02);logger[_0x208f('0xf')]('CreateFaxQueueReport',_0x42eb02,JSON[_0x208f('0x11')](_0x3c442b));_0x337d58(_0x3c442b);})[_0x208f('0x15')](function(_0x36dedb){logger[_0x208f('0x12')]('CreateFaxQueueReport',_0x36dedb[_0x208f('0x13')],_0x42eb02);_0x393cbf(_0x5bcee4['error'](0x1f4,_0x36dedb[_0x208f('0x13')]));});});};exports[_0x208f('0x1c')]=function(_0x3e81df){var _0x3c0ffe=this;return new Promise(function(_0x34edd9,_0x3086e8){return db['FaxQueueReport'][_0x208f('0x1d')](_0x3e81df[_0x208f('0x18')],{'raw':_0x3e81df[_0x208f('0x19')]?_0x3e81df['options'][_0x208f('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3e81df[_0x208f('0x19')]?_0x3e81df['options']['where']||null:null,'attributes':_0x3e81df[_0x208f('0x19')]?_0x3e81df[_0x208f('0x19')][_0x208f('0x1e')]||null:null,'limit':_0x3e81df[_0x208f('0x19')]?_0x3e81df[_0x208f('0x19')][_0x208f('0x1f')]||null:null})['then'](function(_0x109d44){logger['info'](_0x208f('0x1c'),_0x3e81df);logger[_0x208f('0xf')](_0x208f('0x1c'),_0x3e81df,JSON[_0x208f('0x11')](_0x109d44));_0x34edd9(_0x109d44);})[_0x208f('0x15')](function(_0x5af1c6){logger[_0x208f('0x12')](_0x208f('0x1c'),_0x5af1c6[_0x208f('0x13')],_0x3e81df);_0x3086e8(_0x3c0ffe[_0x208f('0x12')](0x1f4,_0x5af1c6[_0x208f('0x13')]));});});};
\ No newline at end of file
index 15bb542..2e86f5b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4f6b=['util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/describe','describe','/:id','show','create','put','update','delete','destroy','multer'];(function(_0x42bdad,_0x12836c){var _0x122626=function(_0x2eb29c){while(--_0x2eb29c){_0x42bdad['push'](_0x42bdad['shift']());}};_0x122626(++_0x12836c);}(_0x4f6b,0xc7));var _0xb4f6=function(_0x160c73,_0x2ee678){_0x160c73=_0x160c73-0x0;var _0xd9302=_0x4f6b[_0x160c73];return _0xd9302;};'use strict';var multer=require(_0xb4f6('0x0'));var util=require(_0xb4f6('0x1'));var path=require(_0xb4f6('0x2'));var timeout=require('connect-timeout');var express=require(_0xb4f6('0x3'));var router=express[_0xb4f6('0x4')]();var fs_extra=require(_0xb4f6('0x5'));var auth=require(_0xb4f6('0x6'));var interaction=require(_0xb4f6('0x7'));var config=require('../../config/environment');var controller=require('./faxQueueReport.controller');router[_0xb4f6('0x8')]('/',auth[_0xb4f6('0x9')](),controller[_0xb4f6('0xa')]);router[_0xb4f6('0x8')](_0xb4f6('0xb'),auth[_0xb4f6('0x9')](),controller[_0xb4f6('0xc')]);router['get'](_0xb4f6('0xd'),auth['isAuthenticated'](),controller[_0xb4f6('0xe')]);router['post']('/',auth['isAuthenticated'](),controller[_0xb4f6('0xf')]);router[_0xb4f6('0x10')]('/:id',auth[_0xb4f6('0x9')](),controller[_0xb4f6('0x11')]);router[_0xb4f6('0x12')](_0xb4f6('0xd'),auth['isAuthenticated'](),controller[_0xb4f6('0x13')]);module['exports']=router;
\ No newline at end of file
+var _0x3f59=['create','delete','destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxQueueReport.controller','get','isAuthenticated','index','describe','/:id','show','post'];(function(_0x53a0ce,_0x5eaa86){var _0x491112=function(_0xb4b450){while(--_0xb4b450){_0x53a0ce['push'](_0x53a0ce['shift']());}};_0x491112(++_0x5eaa86);}(_0x3f59,0x97));var _0x93f5=function(_0x5acc8c,_0x2e12e0){_0x5acc8c=_0x5acc8c-0x0;var _0x405e56=_0x3f59[_0x5acc8c];return _0x405e56;};'use strict';var multer=require(_0x93f5('0x0'));var util=require(_0x93f5('0x1'));var path=require(_0x93f5('0x2'));var timeout=require(_0x93f5('0x3'));var express=require('express');var router=express[_0x93f5('0x4')]();var fs_extra=require(_0x93f5('0x5'));var auth=require(_0x93f5('0x6'));var interaction=require(_0x93f5('0x7'));var config=require(_0x93f5('0x8'));var controller=require(_0x93f5('0x9'));router[_0x93f5('0xa')]('/',auth[_0x93f5('0xb')](),controller[_0x93f5('0xc')]);router[_0x93f5('0xa')]('/describe',auth['isAuthenticated'](),controller[_0x93f5('0xd')]);router['get'](_0x93f5('0xe'),auth['isAuthenticated'](),controller[_0x93f5('0xf')]);router[_0x93f5('0x10')]('/',auth[_0x93f5('0xb')](),controller[_0x93f5('0x11')]);router['put'](_0x93f5('0xe'),auth[_0x93f5('0xb')](),controller['update']);router[_0x93f5('0x12')](_0x93f5('0xe'),auth[_0x93f5('0xb')](),controller[_0x93f5('0x13')]);module[_0x93f5('0x14')]=router;
\ No newline at end of file
index 3519ac1..58e52b5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x34e8=['queue','DATE','NOW','moment','sequelize','exports','STRING','account','agent'];(function(_0x2341ab,_0x326a6c){var _0x54533e=function(_0x413273){while(--_0x413273){_0x2341ab['push'](_0x2341ab['shift']());}};_0x54533e(++_0x326a6c);}(_0x34e8,0x12c));var _0x834e=function(_0x2dda65,_0x477a07){_0x2dda65=_0x2dda65-0x0;var _0x46504c=_0x34e8[_0x2dda65];return _0x46504c;};'use strict';var moment=require(_0x834e('0x0'));var Sequelize=require(_0x834e('0x1'));module[_0x834e('0x2')]={'uniqueid':{'type':Sequelize[_0x834e('0x3')],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x834e('0x4'),_0x834e('0x5'),_0x834e('0x6')),'allowNull':![],'defaultValue':_0x834e('0x6')},'transferredAt':{'type':Sequelize[_0x834e('0x7')],'allowNull':![],'defaultValue':Sequelize[_0x834e('0x8')]}};
\ No newline at end of file
+var _0xb43b=['DATE','NOW','moment','sequelize','STRING','ENUM','account','queue'];(function(_0x4a82ac,_0x1fb931){var _0x58ee97=function(_0xc7050a){while(--_0xc7050a){_0x4a82ac['push'](_0x4a82ac['shift']());}};_0x58ee97(++_0x1fb931);}(_0xb43b,0x1b2));var _0xbb43=function(_0x1c4e0d,_0x152977){_0x1c4e0d=_0x1c4e0d-0x0;var _0x1b74aa=_0xb43b[_0x1c4e0d];return _0x1b74aa;};'use strict';var moment=require(_0xbb43('0x0'));var Sequelize=require(_0xbb43('0x1'));module['exports']={'uniqueid':{'type':Sequelize[_0xbb43('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0xbb43('0x3')](_0xbb43('0x4'),'agent',_0xbb43('0x5')),'allowNull':![],'defaultValue':_0xbb43('0x5')},'transferredAt':{'type':Sequelize[_0xbb43('0x6')],'allowNull':![],'defaultValue':Sequelize[_0xbb43('0x7')]}};
\ No newline at end of file
index ab34b1b..71b3539 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb504=['Content-Range','apply','reject','save','update','then','destroy','sendStatus','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','FaxTransferReport','include','rows','show','params','includeAll','options','catch','create','body','find','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','crypto','jsforce','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../mysqldb','status','end','json','offset','undefined','count','limit','set'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xb504,0x118));var _0x4b50=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0xb504[_0x3b380d];return _0x54502b;};'use strict';var emlformat=require(_0x4b50('0x0'));var rimraf=require(_0x4b50('0x1'));var zipdir=require(_0x4b50('0x2'));var jsonpatch=require(_0x4b50('0x3'));var rp=require(_0x4b50('0x4'));var moment=require(_0x4b50('0x5'));var BPromise=require(_0x4b50('0x6'));var Mustache=require(_0x4b50('0x7'));var util=require('util');var path=require(_0x4b50('0x8'));var sox=require(_0x4b50('0x9'));var csv=require(_0x4b50('0xa'));var ejs=require(_0x4b50('0xb'));var fs=require('fs');var fs_extra=require(_0x4b50('0xc'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x4b50('0xd'));var jsforce=require(_0x4b50('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x4b50('0xa'));var querystring=require(_0x4b50('0xf'));var Papa=require(_0x4b50('0x10'));var Redis=require(_0x4b50('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x4b50('0x12'));var as=require(_0x4b50('0x13'));var hardwareService=require(_0x4b50('0x14'));var logger=require('../../config/logger')(_0x4b50('0x15'));var utils=require(_0x4b50('0x16'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x4b50('0x17'))['db'];function respondWithStatusCode(_0x311046,_0x1c46e5){_0x1c46e5=_0x1c46e5||0xcc;return function(_0x551202){if(_0x551202){return _0x311046['sendStatus'](_0x1c46e5);}return _0x311046[_0x4b50('0x18')](_0x1c46e5)[_0x4b50('0x19')]();};}function respondWithResult(_0x17a340,_0x30158a){_0x30158a=_0x30158a||0xc8;return function(_0x48a1ce){if(_0x48a1ce){return _0x17a340[_0x4b50('0x18')](_0x30158a)[_0x4b50('0x1a')](_0x48a1ce);}};}function respondWithFilteredResult(_0x100f62,_0x5b6e20){return function(_0x201b0d){if(_0x201b0d){var _0x90692f=typeof _0x5b6e20[_0x4b50('0x1b')]==='undefined'&&typeof _0x5b6e20['limit']===_0x4b50('0x1c');var _0x3423d0=_0x201b0d[_0x4b50('0x1d')];var _0x5a4938=_0x90692f?0x0:_0x5b6e20[_0x4b50('0x1b')];var _0x512c34=_0x90692f?_0x201b0d[_0x4b50('0x1d')]:_0x5b6e20[_0x4b50('0x1b')]+_0x5b6e20[_0x4b50('0x1e')];var _0x28f540;if(_0x512c34>=_0x3423d0){_0x512c34=_0x3423d0;_0x28f540=0xc8;}else{_0x28f540=0xce;}_0x100f62['status'](_0x28f540);return _0x100f62[_0x4b50('0x1f')](_0x4b50('0x20'),_0x5a4938+'-'+_0x512c34+'/'+_0x3423d0)[_0x4b50('0x1a')](_0x201b0d);}return null;};}function patchUpdates(_0x4b89ac){return function(_0x339793){try{jsonpatch[_0x4b50('0x21')](_0x339793,_0x4b89ac,!![]);}catch(_0x198e08){return BPromise[_0x4b50('0x22')](_0x198e08);}return _0x339793[_0x4b50('0x23')]();};}function saveUpdates(_0x19f068,_0x2922bf){return function(_0x39d784){if(_0x39d784){return _0x39d784[_0x4b50('0x24')](_0x19f068)[_0x4b50('0x25')](function(_0x1e52ad){return _0x1e52ad;});}return null;};}function removeEntity(_0x235cec,_0x490f0d){return function(_0x122b4c){if(_0x122b4c){return _0x122b4c[_0x4b50('0x26')]()[_0x4b50('0x25')](function(){_0x235cec['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x334349,_0x52e171){return function(_0x2278b9){if(!_0x2278b9){_0x334349[_0x4b50('0x27')](0x194);}return _0x2278b9;};}function handleError(_0x1b380d,_0x319973){_0x319973=_0x319973||0x1f4;return function(_0x419da1){logger[_0x4b50('0x28')](_0x419da1[_0x4b50('0x29')]);if(_0x419da1[_0x4b50('0x2a')]){delete _0x419da1[_0x4b50('0x2a')];}_0x1b380d[_0x4b50('0x18')](_0x319973)[_0x4b50('0x2b')](_0x419da1);};}exports[_0x4b50('0x2c')]=function(_0x5abe94,_0x1ca4fa){var _0x174fe7={},_0x3b24bf={},_0x513822={'count':0x0,'rows':[]};var _0x469d79=_[_0x4b50('0x2d')](db['FaxTransferReport'][_0x4b50('0x2e')],function(_0x3591b9){return{'name':_0x3591b9[_0x4b50('0x2f')],'type':_0x3591b9[_0x4b50('0x30')][_0x4b50('0x31')]};});_0x3b24bf[_0x4b50('0x32')]=_[_0x4b50('0x2d')](_0x469d79,_0x4b50('0x2a'));_0x3b24bf['query']=_[_0x4b50('0x33')](_0x5abe94[_0x4b50('0x34')]);_0x3b24bf[_0x4b50('0x35')]=_[_0x4b50('0x36')](_0x3b24bf[_0x4b50('0x32')],_0x3b24bf[_0x4b50('0x34')]);_0x174fe7[_0x4b50('0x37')]=_[_0x4b50('0x36')](_0x3b24bf['model'],qs[_0x4b50('0x38')](_0x5abe94['query']['fields']));_0x174fe7['attributes']=_0x174fe7[_0x4b50('0x37')][_0x4b50('0x39')]?_0x174fe7[_0x4b50('0x37')]:_0x3b24bf[_0x4b50('0x32')];if(!_0x5abe94[_0x4b50('0x34')][_0x4b50('0x3a')](_0x4b50('0x3b'))){_0x174fe7['limit']=qs['limit'](_0x5abe94[_0x4b50('0x34')]['limit']);_0x174fe7['offset']=qs[_0x4b50('0x1b')](_0x5abe94[_0x4b50('0x34')][_0x4b50('0x1b')]);}_0x174fe7[_0x4b50('0x3c')]=qs[_0x4b50('0x3d')](_0x5abe94[_0x4b50('0x34')][_0x4b50('0x3d')]);_0x174fe7[_0x4b50('0x3e')]=qs['filters'](_[_0x4b50('0x3f')](_0x5abe94[_0x4b50('0x34')],_0x3b24bf[_0x4b50('0x35')]),_0x469d79);if(_0x5abe94[_0x4b50('0x34')][_0x4b50('0x40')]){_0x174fe7['where']=_['merge'](_0x174fe7[_0x4b50('0x3e')],{'$or':_[_0x4b50('0x2d')](_0x469d79,function(_0x10a548){if(_0x10a548[_0x4b50('0x30')]!=='VIRTUAL'){var _0xfb4055={};_0xfb4055[_0x10a548['name']]={'$like':'%'+_0x5abe94[_0x4b50('0x34')][_0x4b50('0x40')]+'%'};return _0xfb4055;}})});}_0x174fe7=_[_0x4b50('0x41')]({},_0x174fe7,_0x5abe94['options']);var _0x5c9734={'where':_0x174fe7['where']};return db[_0x4b50('0x42')][_0x4b50('0x1d')](_0x5c9734)[_0x4b50('0x25')](function(_0x50985e){_0x513822[_0x4b50('0x1d')]=_0x50985e;if(_0x5abe94['query']['includeAll']){_0x174fe7[_0x4b50('0x43')]=[{'all':!![]}];}return db[_0x4b50('0x42')]['findAll'](_0x174fe7);})[_0x4b50('0x25')](function(_0x2df66e){_0x513822[_0x4b50('0x44')]=_0x2df66e;return _0x513822;})[_0x4b50('0x25')](respondWithFilteredResult(_0x1ca4fa,_0x174fe7))['catch'](handleError(_0x1ca4fa,null));};exports[_0x4b50('0x45')]=function(_0x5cfcd3,_0x475fae){var _0x11b37e={'raw':!![],'where':{'id':_0x5cfcd3[_0x4b50('0x46')]['id']}},_0x21293b={};_0x21293b[_0x4b50('0x32')]=_['keys'](db[_0x4b50('0x42')][_0x4b50('0x2e')]);_0x21293b['query']=_['keys'](_0x5cfcd3['query']);_0x21293b[_0x4b50('0x35')]=_[_0x4b50('0x36')](_0x21293b[_0x4b50('0x32')],_0x21293b[_0x4b50('0x34')]);_0x11b37e[_0x4b50('0x37')]=_[_0x4b50('0x36')](_0x21293b[_0x4b50('0x32')],qs[_0x4b50('0x38')](_0x5cfcd3[_0x4b50('0x34')]['fields']));_0x11b37e[_0x4b50('0x37')]=_0x11b37e[_0x4b50('0x37')]['length']?_0x11b37e[_0x4b50('0x37')]:_0x21293b[_0x4b50('0x32')];if(_0x5cfcd3['query'][_0x4b50('0x47')]){_0x11b37e['include']=[{'all':!![]}];}_0x11b37e=_[_0x4b50('0x41')]({},_0x11b37e,_0x5cfcd3[_0x4b50('0x48')]);return db['FaxTransferReport']['find'](_0x11b37e)[_0x4b50('0x25')](handleEntityNotFound(_0x475fae,null))[_0x4b50('0x25')](respondWithResult(_0x475fae,null))[_0x4b50('0x49')](handleError(_0x475fae,null));};exports[_0x4b50('0x4a')]=function(_0x468733,_0x44c62c){return db['FaxTransferReport']['create'](_0x468733[_0x4b50('0x4b')],{})[_0x4b50('0x25')](respondWithResult(_0x44c62c,0xc9))[_0x4b50('0x49')](handleError(_0x44c62c,null));};exports[_0x4b50('0x24')]=function(_0xcfbb23,_0xa4e0c5){if(_0xcfbb23[_0x4b50('0x4b')]['id']){delete _0xcfbb23[_0x4b50('0x4b')]['id'];}return db['FaxTransferReport'][_0x4b50('0x4c')]({'where':{'id':_0xcfbb23[_0x4b50('0x46')]['id']}})[_0x4b50('0x25')](handleEntityNotFound(_0xa4e0c5,null))[_0x4b50('0x25')](saveUpdates(_0xcfbb23['body'],null))['then'](respondWithResult(_0xa4e0c5,null))[_0x4b50('0x49')](handleError(_0xa4e0c5,null));};exports[_0x4b50('0x26')]=function(_0x2751d4,_0x3a2bef){return db['FaxTransferReport'][_0x4b50('0x4c')]({'where':{'id':_0x2751d4['params']['id']}})['then'](handleEntityNotFound(_0x3a2bef,null))[_0x4b50('0x25')](removeEntity(_0x3a2bef,null))[_0x4b50('0x49')](handleError(_0x3a2bef,null));};exports[_0x4b50('0x4d')]=function(_0x1227cb,_0x4a03ba){return db[_0x4b50('0x42')][_0x4b50('0x4d')]()['then'](respondWithResult(_0x4a03ba,null))[_0x4b50('0x49')](handleError(_0x4a03ba,null));};
\ No newline at end of file
+var _0x1d5f=['limit','order','sort','where','pick','filter','merge','VIRTUAL','includeAll','include','findAll','catch','show','params','keys','options','find','create','body','describe','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','ejs','fs-extra','lodash','crypto','desk.js','to-csv','papaparse','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','count','set','Content-Range','reject','update','then','destroy','error','stack','name','send','index','map','FaxTransferReport','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit'];(function(_0x37485f,_0x7fcf8e){var _0x496a33=function(_0x536c81){while(--_0x536c81){_0x37485f['push'](_0x37485f['shift']());}};_0x496a33(++_0x7fcf8e);}(_0x1d5f,0xae));var _0xf1d5=function(_0x5d31f3,_0x4239b0){_0x5d31f3=_0x5d31f3-0x0;var _0x1cc88c=_0x1d5f[_0x5d31f3];return _0x1cc88c;};'use strict';var emlformat=require(_0xf1d5('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xf1d5('0x1'));var jsonpatch=require(_0xf1d5('0x2'));var rp=require(_0xf1d5('0x3'));var moment=require('moment');var BPromise=require(_0xf1d5('0x4'));var Mustache=require(_0xf1d5('0x5'));var util=require(_0xf1d5('0x6'));var path=require(_0xf1d5('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xf1d5('0x8'));var fs=require('fs');var fs_extra=require(_0xf1d5('0x9'));var _=require(_0xf1d5('0xa'));var squel=require('squel');var crypto=require(_0xf1d5('0xb'));var jsforce=require('jsforce');var deskjs=require(_0xf1d5('0xc'));var toCsv=require(_0xf1d5('0xd'));var querystring=require('querystring');var Papa=require(_0xf1d5('0xe'));var Redis=require(_0xf1d5('0xf'));var authService=require(_0xf1d5('0x10'));var qs=require(_0xf1d5('0x11'));var as=require(_0xf1d5('0x12'));var hardwareService=require(_0xf1d5('0x13'));var logger=require(_0xf1d5('0x14'))(_0xf1d5('0x15'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xf1d5('0x16'));var db=require(_0xf1d5('0x17'))['db'];function respondWithStatusCode(_0x3de310,_0x472d3f){_0x472d3f=_0x472d3f||0xcc;return function(_0x12db9f){if(_0x12db9f){return _0x3de310[_0xf1d5('0x18')](_0x472d3f);}return _0x3de310[_0xf1d5('0x19')](_0x472d3f)[_0xf1d5('0x1a')]();};}function respondWithResult(_0x12cd46,_0x4a8c9b){_0x4a8c9b=_0x4a8c9b||0xc8;return function(_0x2811d7){if(_0x2811d7){return _0x12cd46['status'](_0x4a8c9b)[_0xf1d5('0x1b')](_0x2811d7);}};}function respondWithFilteredResult(_0x3ade91,_0x411f22){return function(_0x515de8){if(_0x515de8){var _0x185401=typeof _0x411f22[_0xf1d5('0x1c')]==='undefined'&&typeof _0x411f22['limit']===_0xf1d5('0x1d');var _0x5c97ef=_0x515de8[_0xf1d5('0x1e')];var _0x165666=_0x185401?0x0:_0x411f22[_0xf1d5('0x1c')];var _0x509efa=_0x185401?_0x515de8[_0xf1d5('0x1e')]:_0x411f22['offset']+_0x411f22['limit'];var _0x3856e5;if(_0x509efa>=_0x5c97ef){_0x509efa=_0x5c97ef;_0x3856e5=0xc8;}else{_0x3856e5=0xce;}_0x3ade91[_0xf1d5('0x19')](_0x3856e5);return _0x3ade91[_0xf1d5('0x1f')](_0xf1d5('0x20'),_0x165666+'-'+_0x509efa+'/'+_0x5c97ef)[_0xf1d5('0x1b')](_0x515de8);}return null;};}function patchUpdates(_0x5932b2){return function(_0x3fb09c){try{jsonpatch['apply'](_0x3fb09c,_0x5932b2,!![]);}catch(_0x1d6ba7){return BPromise[_0xf1d5('0x21')](_0x1d6ba7);}return _0x3fb09c['save']();};}function saveUpdates(_0x381b3d,_0x2736bd){return function(_0x1cf12e){if(_0x1cf12e){return _0x1cf12e[_0xf1d5('0x22')](_0x381b3d)[_0xf1d5('0x23')](function(_0x4a33ca){return _0x4a33ca;});}return null;};}function removeEntity(_0x5b411e,_0x5f1ed3){return function(_0xdaa572){if(_0xdaa572){return _0xdaa572[_0xf1d5('0x24')]()[_0xf1d5('0x23')](function(){_0x5b411e[_0xf1d5('0x19')](0xcc)[_0xf1d5('0x1a')]();});}};}function handleEntityNotFound(_0x2d63bb,_0x4d23e1){return function(_0x898c0f){if(!_0x898c0f){_0x2d63bb['sendStatus'](0x194);}return _0x898c0f;};}function handleError(_0x59c9cc,_0x537f2c){_0x537f2c=_0x537f2c||0x1f4;return function(_0x1ea60d){logger[_0xf1d5('0x25')](_0x1ea60d[_0xf1d5('0x26')]);if(_0x1ea60d[_0xf1d5('0x27')]){delete _0x1ea60d[_0xf1d5('0x27')];}_0x59c9cc[_0xf1d5('0x19')](_0x537f2c)[_0xf1d5('0x28')](_0x1ea60d);};}exports[_0xf1d5('0x29')]=function(_0x144e40,_0x37908f){var _0x131f2b={},_0x2a4452={},_0x5662f4={'count':0x0,'rows':[]};var _0x362896=_[_0xf1d5('0x2a')](db[_0xf1d5('0x2b')][_0xf1d5('0x2c')],function(_0x17dc88){return{'name':_0x17dc88[_0xf1d5('0x2d')],'type':_0x17dc88[_0xf1d5('0x2e')][_0xf1d5('0x2f')]};});_0x2a4452[_0xf1d5('0x30')]=_[_0xf1d5('0x2a')](_0x362896,_0xf1d5('0x27'));_0x2a4452[_0xf1d5('0x31')]=_['keys'](_0x144e40[_0xf1d5('0x31')]);_0x2a4452[_0xf1d5('0x32')]=_[_0xf1d5('0x33')](_0x2a4452[_0xf1d5('0x30')],_0x2a4452[_0xf1d5('0x31')]);_0x131f2b[_0xf1d5('0x34')]=_[_0xf1d5('0x33')](_0x2a4452[_0xf1d5('0x30')],qs[_0xf1d5('0x35')](_0x144e40['query']['fields']));_0x131f2b[_0xf1d5('0x34')]=_0x131f2b[_0xf1d5('0x34')][_0xf1d5('0x36')]?_0x131f2b['attributes']:_0x2a4452[_0xf1d5('0x30')];if(!_0x144e40['query'][_0xf1d5('0x37')](_0xf1d5('0x38'))){_0x131f2b['limit']=qs[_0xf1d5('0x39')](_0x144e40[_0xf1d5('0x31')][_0xf1d5('0x39')]);_0x131f2b['offset']=qs[_0xf1d5('0x1c')](_0x144e40[_0xf1d5('0x31')]['offset']);}_0x131f2b[_0xf1d5('0x3a')]=qs[_0xf1d5('0x3b')](_0x144e40[_0xf1d5('0x31')][_0xf1d5('0x3b')]);_0x131f2b[_0xf1d5('0x3c')]=qs[_0xf1d5('0x32')](_[_0xf1d5('0x3d')](_0x144e40[_0xf1d5('0x31')],_0x2a4452[_0xf1d5('0x32')]),_0x362896);if(_0x144e40[_0xf1d5('0x31')][_0xf1d5('0x3e')]){_0x131f2b[_0xf1d5('0x3c')]=_[_0xf1d5('0x3f')](_0x131f2b[_0xf1d5('0x3c')],{'$or':_[_0xf1d5('0x2a')](_0x362896,function(_0xe260e9){if(_0xe260e9['type']!==_0xf1d5('0x40')){var _0x243574={};_0x243574[_0xe260e9['name']]={'$like':'%'+_0x144e40[_0xf1d5('0x31')][_0xf1d5('0x3e')]+'%'};return _0x243574;}})});}_0x131f2b=_[_0xf1d5('0x3f')]({},_0x131f2b,_0x144e40['options']);var _0x2f8adb={'where':_0x131f2b[_0xf1d5('0x3c')]};return db[_0xf1d5('0x2b')][_0xf1d5('0x1e')](_0x2f8adb)[_0xf1d5('0x23')](function(_0x2e0a7c){_0x5662f4['count']=_0x2e0a7c;if(_0x144e40[_0xf1d5('0x31')][_0xf1d5('0x41')]){_0x131f2b[_0xf1d5('0x42')]=[{'all':!![]}];}return db[_0xf1d5('0x2b')][_0xf1d5('0x43')](_0x131f2b);})[_0xf1d5('0x23')](function(_0x5b1d02){_0x5662f4['rows']=_0x5b1d02;return _0x5662f4;})[_0xf1d5('0x23')](respondWithFilteredResult(_0x37908f,_0x131f2b))[_0xf1d5('0x44')](handleError(_0x37908f,null));};exports[_0xf1d5('0x45')]=function(_0x26e879,_0x1f31b0){var _0x3f5bc5={'raw':!![],'where':{'id':_0x26e879[_0xf1d5('0x46')]['id']}},_0x4bc4b4={};_0x4bc4b4[_0xf1d5('0x30')]=_[_0xf1d5('0x47')](db[_0xf1d5('0x2b')][_0xf1d5('0x2c')]);_0x4bc4b4[_0xf1d5('0x31')]=_[_0xf1d5('0x47')](_0x26e879[_0xf1d5('0x31')]);_0x4bc4b4[_0xf1d5('0x32')]=_['intersection'](_0x4bc4b4['model'],_0x4bc4b4[_0xf1d5('0x31')]);_0x3f5bc5[_0xf1d5('0x34')]=_[_0xf1d5('0x33')](_0x4bc4b4[_0xf1d5('0x30')],qs['fields'](_0x26e879[_0xf1d5('0x31')][_0xf1d5('0x35')]));_0x3f5bc5[_0xf1d5('0x34')]=_0x3f5bc5[_0xf1d5('0x34')]['length']?_0x3f5bc5[_0xf1d5('0x34')]:_0x4bc4b4[_0xf1d5('0x30')];if(_0x26e879['query'][_0xf1d5('0x41')]){_0x3f5bc5[_0xf1d5('0x42')]=[{'all':!![]}];}_0x3f5bc5=_[_0xf1d5('0x3f')]({},_0x3f5bc5,_0x26e879[_0xf1d5('0x48')]);return db[_0xf1d5('0x2b')][_0xf1d5('0x49')](_0x3f5bc5)[_0xf1d5('0x23')](handleEntityNotFound(_0x1f31b0,null))[_0xf1d5('0x23')](respondWithResult(_0x1f31b0,null))[_0xf1d5('0x44')](handleError(_0x1f31b0,null));};exports[_0xf1d5('0x4a')]=function(_0x51965e,_0x445a99){return db['FaxTransferReport'][_0xf1d5('0x4a')](_0x51965e[_0xf1d5('0x4b')],{})[_0xf1d5('0x23')](respondWithResult(_0x445a99,0xc9))[_0xf1d5('0x44')](handleError(_0x445a99,null));};exports['update']=function(_0x3d98a4,_0x3448d4){if(_0x3d98a4['body']['id']){delete _0x3d98a4[_0xf1d5('0x4b')]['id'];}return db[_0xf1d5('0x2b')][_0xf1d5('0x49')]({'where':{'id':_0x3d98a4['params']['id']}})['then'](handleEntityNotFound(_0x3448d4,null))[_0xf1d5('0x23')](saveUpdates(_0x3d98a4[_0xf1d5('0x4b')],null))[_0xf1d5('0x23')](respondWithResult(_0x3448d4,null))['catch'](handleError(_0x3448d4,null));};exports[_0xf1d5('0x24')]=function(_0x10ea9c,_0x74e269){return db[_0xf1d5('0x2b')]['find']({'where':{'id':_0x10ea9c[_0xf1d5('0x46')]['id']}})[_0xf1d5('0x23')](handleEntityNotFound(_0x74e269,null))[_0xf1d5('0x23')](removeEntity(_0x74e269,null))[_0xf1d5('0x44')](handleError(_0x74e269,null));};exports[_0xf1d5('0x4c')]=function(_0xfb30b8,_0x3d2754){return db['FaxTransferReport'][_0xf1d5('0x4c')]()[_0xf1d5('0x23')](respondWithResult(_0x3d2754,null))['catch'](handleError(_0x3d2754,null));};
\ No newline at end of file
index 2ad810d..1ab60aa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa7fa=['api','moment','bluebird','request-promise','rimraf','../../config/environment','./faxTransferReport.attributes','exports','report_fax_transfer','uniqueid','lodash'];(function(_0x5ad794,_0x330eb1){var _0x58d45e=function(_0x28c899){while(--_0x28c899){_0x5ad794['push'](_0x5ad794['shift']());}};_0x58d45e(++_0x330eb1);}(_0xa7fa,0xfc));var _0xaa7f=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xa7fa[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0xaa7f('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xaa7f('0x1'));var moment=require(_0xaa7f('0x2'));var BPromise=require(_0xaa7f('0x3'));var rp=require(_0xaa7f('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xaa7f('0x5'));var config=require(_0xaa7f('0x6'));var attributes=require(_0xaa7f('0x7'));module[_0xaa7f('0x8')]=function(_0x48e98f,_0xf79d63){return _0x48e98f['define']('FaxTransferReport',attributes,{'tableName':_0xaa7f('0x9'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0xaa7f('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xa5ea=['request-promise','path','rimraf','../../config/environment','./faxTransferReport.attributes','define','FaxTransferReport','report_fax_transfer','uniqueid','../../config/logger','api','moment'];(function(_0x38ee0b,_0x46b267){var _0x4e3d8b=function(_0x45af68){while(--_0x45af68){_0x38ee0b['push'](_0x38ee0b['shift']());}};_0x4e3d8b(++_0x46b267);}(_0xa5ea,0x1e9));var _0xaa5e=function(_0x4ed790,_0x3b0fe6){_0x4ed790=_0x4ed790-0x0;var _0x1972cd=_0xa5ea[_0x4ed790];return _0x1972cd;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xaa5e('0x0'))(_0xaa5e('0x1'));var moment=require(_0xaa5e('0x2'));var BPromise=require('bluebird');var rp=require(_0xaa5e('0x3'));var fs=require('fs');var path=require(_0xaa5e('0x4'));var rimraf=require(_0xaa5e('0x5'));var config=require(_0xaa5e('0x6'));var attributes=require(_0xaa5e('0x7'));module['exports']=function(_0x57edd3,_0x133617){return _0x57edd3[_0xaa5e('0x8')](_0xaa5e('0x9'),attributes,{'tableName':_0xaa5e('0xa'),'paranoid':![],'indexes':[{'name':_0xaa5e('0xb'),'fields':[_0xaa5e('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
index 28b7cff..6c52252 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3bc2=['jayson/promise','http','info','request\x20sent','debug','FaxTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','FaxTransferReport,\x20%s,\x20%s','message','result','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x51750a,_0x31cd6c){var _0x203c41=function(_0xc54aee){while(--_0xc54aee){_0x51750a['push'](_0x51750a['shift']());}};_0x203c41(++_0x31cd6c);}(_0x3bc2,0x9f));var _0x23bc=function(_0x1d7fdb,_0xdbcc3a){_0x1d7fdb=_0x1d7fdb-0x0;var _0x2f3106=_0x3bc2[_0x1d7fdb];return _0x2f3106;};'use strict';var _=require(_0x23bc('0x0'));var util=require(_0x23bc('0x1'));var moment=require(_0x23bc('0x2'));var BPromise=require('bluebird');var rs=require(_0x23bc('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x23bc('0x4'))['db'];var utils=require(_0x23bc('0x5'));var logger=require(_0x23bc('0x6'))(_0x23bc('0x7'));var config=require(_0x23bc('0x8'));var jayson=require(_0x23bc('0x9'));var client=jayson['client'][_0x23bc('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xebecfa,_0x3e7f68,_0x419fc0){return new BPromise(function(_0x454295,_0x110b33){return client['request'](_0xebecfa,_0x419fc0)['then'](function(_0x517dbb){logger[_0x23bc('0xb')]('FaxTransferReport,\x20%s,\x20%s',_0x3e7f68,_0x23bc('0xc'));logger[_0x23bc('0xd')](_0x23bc('0xe'),_0x3e7f68,_0x23bc('0xc'),JSON[_0x23bc('0xf')](_0x517dbb));if(_0x517dbb[_0x23bc('0x10')]){if(_0x517dbb['error']['code']===0x1f4){logger[_0x23bc('0x10')](_0x23bc('0x11'),_0x3e7f68,_0x517dbb[_0x23bc('0x10')][_0x23bc('0x12')]);return _0x110b33(_0x517dbb[_0x23bc('0x10')][_0x23bc('0x12')]);}logger['error'](_0x23bc('0x11'),_0x3e7f68,_0x517dbb[_0x23bc('0x10')][_0x23bc('0x12')]);return _0x454295(_0x517dbb['error'][_0x23bc('0x12')]);}else{logger[_0x23bc('0xb')](_0x23bc('0x11'),_0x3e7f68,'request\x20sent');_0x454295(_0x517dbb[_0x23bc('0x13')][_0x23bc('0x12')]);}})[_0x23bc('0x14')](function(_0x74fc3f){logger['error'](_0x23bc('0x11'),_0x3e7f68,_0x74fc3f);_0x110b33(_0x74fc3f);});});}
\ No newline at end of file
+var _0x1fa0=['request\x20sent','stringify','error','code','message','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','then','info','FaxTransferReport,\x20%s,\x20%s'];(function(_0x48fd50,_0x4c5aa9){var _0x5e7788=function(_0x3f910d){while(--_0x3f910d){_0x48fd50['push'](_0x48fd50['shift']());}};_0x5e7788(++_0x4c5aa9);}(_0x1fa0,0x182));var _0x01fa=function(_0x3b2d81,_0x3a5ee8){_0x3b2d81=_0x3b2d81-0x0;var _0x1ac262=_0x1fa0[_0x3b2d81];return _0x1ac262;};'use strict';var _=require(_0x01fa('0x0'));var util=require(_0x01fa('0x1'));var moment=require(_0x01fa('0x2'));var BPromise=require('bluebird');var rs=require(_0x01fa('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x01fa('0x4'))['db'];var utils=require(_0x01fa('0x5'));var logger=require(_0x01fa('0x6'))('rpc');var config=require(_0x01fa('0x7'));var jayson=require(_0x01fa('0x8'));var client=jayson['client'][_0x01fa('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xd6725c,_0x52503f,_0x5357c1){return new BPromise(function(_0x5b013c,_0x3f7c5b){return client[_0x01fa('0xa')](_0xd6725c,_0x5357c1)[_0x01fa('0xb')](function(_0x4b2cb6){logger[_0x01fa('0xc')](_0x01fa('0xd'),_0x52503f,_0x01fa('0xe'));logger['debug']('FaxTransferReport,\x20%s,\x20%s,\x20%s',_0x52503f,_0x01fa('0xe'),JSON[_0x01fa('0xf')](_0x4b2cb6));if(_0x4b2cb6['error']){if(_0x4b2cb6[_0x01fa('0x10')][_0x01fa('0x11')]===0x1f4){logger[_0x01fa('0x10')](_0x01fa('0xd'),_0x52503f,_0x4b2cb6['error'][_0x01fa('0x12')]);return _0x3f7c5b(_0x4b2cb6[_0x01fa('0x10')][_0x01fa('0x12')]);}logger['error'](_0x01fa('0xd'),_0x52503f,_0x4b2cb6[_0x01fa('0x10')][_0x01fa('0x12')]);return _0x5b013c(_0x4b2cb6['error'][_0x01fa('0x12')]);}else{logger['info']('FaxTransferReport,\x20%s,\x20%s',_0x52503f,_0x01fa('0xe'));_0x5b013c(_0x4b2cb6['result'][_0x01fa('0x12')]);}})[_0x01fa('0x13')](function(_0x591c50){logger[_0x01fa('0x10')](_0x01fa('0xd'),_0x52503f,_0x591c50);_0x3f7c5b(_0x591c50);});});}
\ No newline at end of file
index 35978ec..e024066 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2784=['../../config/environment','get','isAuthenticated','describe','/:id','show','post','put','delete','exports','multer','path','Router','fs-extra','../../components/auth/service'];(function(_0x5cf1a1,_0x1ab924){var _0x52cbcc=function(_0xdc1230){while(--_0xdc1230){_0x5cf1a1['push'](_0x5cf1a1['shift']());}};_0x52cbcc(++_0x1ab924);}(_0x2784,0x1bd));var _0x4278=function(_0x518277,_0x799d48){_0x518277=_0x518277-0x0;var _0x5e666f=_0x2784[_0x518277];return _0x5e666f;};'use strict';var multer=require(_0x4278('0x0'));var util=require('util');var path=require(_0x4278('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x4278('0x2')]();var fs_extra=require(_0x4278('0x3'));var auth=require(_0x4278('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x4278('0x5'));var controller=require('./faxTransferReport.controller');router[_0x4278('0x6')]('/',auth[_0x4278('0x7')](),controller['index']);router[_0x4278('0x6')]('/describe',auth['isAuthenticated'](),controller[_0x4278('0x8')]);router[_0x4278('0x6')](_0x4278('0x9'),auth[_0x4278('0x7')](),controller[_0x4278('0xa')]);router[_0x4278('0xb')]('/',auth[_0x4278('0x7')](),controller['create']);router[_0x4278('0xc')](_0x4278('0x9'),auth[_0x4278('0x7')](),controller['update']);router[_0x4278('0xd')]('/:id',auth[_0x4278('0x7')](),controller['destroy']);module[_0x4278('0xe')]=router;
\ No newline at end of file
+var _0xc54d=['delete','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./faxTransferReport.controller','get','index','/describe','isAuthenticated','/:id','show','post','create','put'];(function(_0x1c490a,_0x217f34){var _0x1e0b1d=function(_0x3ee02b){while(--_0x3ee02b){_0x1c490a['push'](_0x1c490a['shift']());}};_0x1e0b1d(++_0x217f34);}(_0xc54d,0xf2));var _0xdc54=function(_0x230282,_0x120a70){_0x230282=_0x230282-0x0;var _0x52f047=_0xc54d[_0x230282];return _0x52f047;};'use strict';var multer=require(_0xdc54('0x0'));var util=require(_0xdc54('0x1'));var path=require(_0xdc54('0x2'));var timeout=require(_0xdc54('0x3'));var express=require(_0xdc54('0x4'));var router=express[_0xdc54('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xdc54('0x6'));var interaction=require(_0xdc54('0x7'));var config=require('../../config/environment');var controller=require(_0xdc54('0x8'));router[_0xdc54('0x9')]('/',auth['isAuthenticated'](),controller[_0xdc54('0xa')]);router['get'](_0xdc54('0xb'),auth[_0xdc54('0xc')](),controller['describe']);router[_0xdc54('0x9')](_0xdc54('0xd'),auth[_0xdc54('0xc')](),controller[_0xdc54('0xe')]);router[_0xdc54('0xf')]('/',auth[_0xdc54('0xc')](),controller[_0xdc54('0x10')]);router[_0xdc54('0x11')](_0xdc54('0xd'),auth[_0xdc54('0xc')](),controller['update']);router[_0xdc54('0x12')]('/:id',auth[_0xdc54('0xc')](),controller['destroy']);module[_0xdc54('0x13')]=router;
\ No newline at end of file
index 3f0040f..032d26c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9ff6=['util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intDeskAccount.controller','get','isAuthenticated','index','/:id','show','/:id/configurations','getConfigurations','/:id/fields','getFields','post','update','delete','destroy','exports','multer'];(function(_0x503ffd,_0x8ecde){var _0x160437=function(_0x2d45dd){while(--_0x2d45dd){_0x503ffd['push'](_0x503ffd['shift']());}};_0x160437(++_0x8ecde);}(_0x9ff6,0x144));var _0x69ff=function(_0x33fab6,_0x532a04){_0x33fab6=_0x33fab6-0x0;var _0x314e60=_0x9ff6[_0x33fab6];return _0x314e60;};'use strict';var multer=require(_0x69ff('0x0'));var util=require(_0x69ff('0x1'));var path=require(_0x69ff('0x2'));var timeout=require(_0x69ff('0x3'));var express=require(_0x69ff('0x4'));var router=express[_0x69ff('0x5')]();var fs_extra=require(_0x69ff('0x6'));var auth=require(_0x69ff('0x7'));var interaction=require(_0x69ff('0x8'));var config=require(_0x69ff('0x9'));var controller=require(_0x69ff('0xa'));router[_0x69ff('0xb')]('/',auth[_0x69ff('0xc')](),controller[_0x69ff('0xd')]);router[_0x69ff('0xb')](_0x69ff('0xe'),auth[_0x69ff('0xc')](),controller[_0x69ff('0xf')]);router[_0x69ff('0xb')](_0x69ff('0x10'),auth['isAuthenticated'](),controller[_0x69ff('0x11')]);router[_0x69ff('0xb')](_0x69ff('0x12'),auth[_0x69ff('0xc')](),controller[_0x69ff('0x13')]);router[_0x69ff('0x14')]('/',auth[_0x69ff('0xc')](),controller['create']);router[_0x69ff('0x14')](_0x69ff('0x10'),auth[_0x69ff('0xc')](),controller['addConfiguration']);router['put'](_0x69ff('0xe'),auth['isAuthenticated'](),controller[_0x69ff('0x15')]);router[_0x69ff('0x16')](_0x69ff('0xe'),auth[_0x69ff('0xc')](),controller[_0x69ff('0x17')]);module[_0x69ff('0x18')]=router;
\ No newline at end of file
+var _0xff5c=['express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intDeskAccount.controller','get','isAuthenticated','index','/:id','show','/:id/configurations','getConfigurations','/:id/fields','getFields','post','create','addConfiguration','put','update','delete','destroy','exports','multer','util','path'];(function(_0x39c883,_0x3d946a){var _0x267643=function(_0x170f8e){while(--_0x170f8e){_0x39c883['push'](_0x39c883['shift']());}};_0x267643(++_0x3d946a);}(_0xff5c,0x10b));var _0xcff5=function(_0x472bb0,_0x5d302b){_0x472bb0=_0x472bb0-0x0;var _0x52eba3=_0xff5c[_0x472bb0];return _0x52eba3;};'use strict';var multer=require(_0xcff5('0x0'));var util=require(_0xcff5('0x1'));var path=require(_0xcff5('0x2'));var timeout=require('connect-timeout');var express=require(_0xcff5('0x3'));var router=express[_0xcff5('0x4')]();var fs_extra=require(_0xcff5('0x5'));var auth=require(_0xcff5('0x6'));var interaction=require(_0xcff5('0x7'));var config=require(_0xcff5('0x8'));var controller=require(_0xcff5('0x9'));router[_0xcff5('0xa')]('/',auth[_0xcff5('0xb')](),controller[_0xcff5('0xc')]);router['get'](_0xcff5('0xd'),auth[_0xcff5('0xb')](),controller[_0xcff5('0xe')]);router[_0xcff5('0xa')](_0xcff5('0xf'),auth['isAuthenticated'](),controller[_0xcff5('0x10')]);router[_0xcff5('0xa')](_0xcff5('0x11'),auth[_0xcff5('0xb')](),controller[_0xcff5('0x12')]);router[_0xcff5('0x13')]('/',auth[_0xcff5('0xb')](),controller[_0xcff5('0x14')]);router['post'](_0xcff5('0xf'),auth['isAuthenticated'](),controller[_0xcff5('0x15')]);router[_0xcff5('0x16')](_0xcff5('0xd'),auth[_0xcff5('0xb')](),controller[_0xcff5('0x17')]);router[_0xcff5('0x18')](_0xcff5('0xd'),auth['isAuthenticated'](),controller[_0xcff5('0x19')]);module[_0xcff5('0x1a')]=router;
\ No newline at end of file
index fe7fbe4..7a4c37e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcae3=['sequelize','STRING','ENUM','integrationTab'];(function(_0x2b09de,_0x4ab03d){var _0xe4b849=function(_0xcc1e3c){while(--_0xcc1e3c){_0x2b09de['push'](_0x2b09de['shift']());}};_0xe4b849(++_0x4ab03d);}(_0xcae3,0x1c8));var _0x3cae=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0xcae3[_0x3b380d];return _0x54502b;};'use strict';var Sequelize=require(_0x3cae('0x0'));module['exports']={'name':{'type':Sequelize[_0x3cae('0x1')]},'description':{'type':Sequelize[_0x3cae('0x1')]},'username':{'type':Sequelize[_0x3cae('0x1')]},'remoteUri':{'type':Sequelize[_0x3cae('0x1')]},'authType':{'type':Sequelize['ENUM']('basic'),'defaultValue':'basic'},'password':{'type':Sequelize['STRING']},'consumerKey':{'type':Sequelize[_0x3cae('0x1')]},'consumerSecret':{'type':Sequelize[_0x3cae('0x1')]},'token':{'type':Sequelize[_0x3cae('0x1')]},'tokenSecret':{'type':Sequelize[_0x3cae('0x1')]},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0x3cae('0x2')](_0x3cae('0x3'),'newTab'),'defaultValue':_0x3cae('0x3')}};
\ No newline at end of file
+var _0x52b3=['newTab','exports','STRING','ENUM','basic'];(function(_0x5a16f7,_0x15e545){var _0x5cb364=function(_0xfa7198){while(--_0xfa7198){_0x5a16f7['push'](_0x5a16f7['shift']());}};_0x5cb364(++_0x15e545);}(_0x52b3,0xfb));var _0x352b=function(_0x79b57f,_0x3c60f7){_0x79b57f=_0x79b57f-0x0;var _0x3a9423=_0x52b3[_0x79b57f];return _0x3a9423;};'use strict';var Sequelize=require('sequelize');module[_0x352b('0x0')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x352b('0x1')]},'username':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0x352b('0x1')]},'authType':{'type':Sequelize[_0x352b('0x2')](_0x352b('0x3')),'defaultValue':_0x352b('0x3')},'password':{'type':Sequelize[_0x352b('0x1')]},'consumerKey':{'type':Sequelize[_0x352b('0x1')]},'consumerSecret':{'type':Sequelize[_0x352b('0x1')]},'token':{'type':Sequelize['STRING']},'tokenSecret':{'type':Sequelize[_0x352b('0x1')]},'serverUrl':{'type':Sequelize[_0x352b('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0x352b('0x2')]('integrationTab',_0x352b('0x4')),'defaultValue':'integrationTab'}};
\ No newline at end of file
index 0c1f5d5..d42258f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcb18=['index','map','DeskAccount','fieldName','type','key','model','query','filters','intersection','fields','attributes','length','nolimit','pick','filter','where','merge','options','includeAll','findAll','rows','show','params','include','find','catch','create','body','getConfigurations','DeskConfiguration','rawAttributes','keys','order','sort','hasOwnProperty','AccountId','channel','Descriptions','getDescriptions','Subjects','getFields','priority','remoteUri','authType','username','password','consumerKey','consumerSecret','token','tokenSecret','substring','lastIndexOf','format','%s/custom_fields','application/json','basic','headers','Authorization','%s:%s','toString','base64','_embedded','entries','label','test','getFields,\x20%s,\x20%s,\x20%s','stringify','send','Wrong\x20credentials','statusCode','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','path','ejs','fs-extra','lodash','squel','crypto','jsforce','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','../../components/integrations/configuration','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','reject','update','destroy','then','error','stack','name'];(function(_0x2c7618,_0x26be9c){var _0x5ce3f0=function(_0x1837b3){while(--_0x1837b3){_0x2c7618['push'](_0x2c7618['shift']());}};_0x5ce3f0(++_0x26be9c);}(_0xcb18,0x12d));var _0x8cb1=function(_0xfb2708,_0x436493){_0xfb2708=_0xfb2708-0x0;var _0x55b55d=_0xcb18[_0xfb2708];return _0x55b55d;};'use strict';var emlformat=require(_0x8cb1('0x0'));var rimraf=require(_0x8cb1('0x1'));var zipdir=require(_0x8cb1('0x2'));var jsonpatch=require(_0x8cb1('0x3'));var rp=require(_0x8cb1('0x4'));var moment=require('moment');var BPromise=require(_0x8cb1('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x8cb1('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x8cb1('0x7'));var fs=require('fs');var fs_extra=require(_0x8cb1('0x8'));var _=require(_0x8cb1('0x9'));var squel=require(_0x8cb1('0xa'));var crypto=require(_0x8cb1('0xb'));var jsforce=require(_0x8cb1('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x8cb1('0xd'));var querystring=require(_0x8cb1('0xe'));var Papa=require('papaparse');var Redis=require(_0x8cb1('0xf'));var authService=require(_0x8cb1('0x10'));var qs=require(_0x8cb1('0x11'));var as=require(_0x8cb1('0x12'));var hardwareService=require(_0x8cb1('0x13'));var logger=require(_0x8cb1('0x14'))(_0x8cb1('0x15'));var utils=require(_0x8cb1('0x16'));var config=require(_0x8cb1('0x17'));var licenseUtil=require(_0x8cb1('0x18'));var db=require(_0x8cb1('0x19'))['db'];var integrations=require(_0x8cb1('0x1a'));function respondWithStatusCode(_0x20c3bf,_0xfe201e){_0xfe201e=_0xfe201e||0xcc;return function(_0x1cea11){if(_0x1cea11){return _0x20c3bf[_0x8cb1('0x1b')](_0xfe201e);}return _0x20c3bf[_0x8cb1('0x1c')](_0xfe201e)[_0x8cb1('0x1d')]();};}function respondWithResult(_0x149cde,_0x48a14b){_0x48a14b=_0x48a14b||0xc8;return function(_0x4c89fc){if(_0x4c89fc){return _0x149cde[_0x8cb1('0x1c')](_0x48a14b)[_0x8cb1('0x1e')](_0x4c89fc);}};}function respondWithFilteredResult(_0x254fd6,_0x190215){return function(_0x4f9922){if(_0x4f9922){var _0x3607d0=typeof _0x190215['offset']===_0x8cb1('0x1f')&&typeof _0x190215[_0x8cb1('0x20')]===_0x8cb1('0x1f');var _0xc0d134=_0x4f9922[_0x8cb1('0x21')];var _0x4d7a88=_0x3607d0?0x0:_0x190215[_0x8cb1('0x22')];var _0x109601=_0x3607d0?_0x4f9922[_0x8cb1('0x21')]:_0x190215[_0x8cb1('0x22')]+_0x190215[_0x8cb1('0x20')];var _0x4c8255;if(_0x109601>=_0xc0d134){_0x109601=_0xc0d134;_0x4c8255=0xc8;}else{_0x4c8255=0xce;}_0x254fd6[_0x8cb1('0x1c')](_0x4c8255);return _0x254fd6[_0x8cb1('0x23')](_0x8cb1('0x24'),_0x4d7a88+'-'+_0x109601+'/'+_0xc0d134)[_0x8cb1('0x1e')](_0x4f9922);}return null;};}function patchUpdates(_0x4031d0){return function(_0x28bcde){try{jsonpatch['apply'](_0x28bcde,_0x4031d0,!![]);}catch(_0x484c4d){return BPromise[_0x8cb1('0x25')](_0x484c4d);}return _0x28bcde['save']();};}function saveUpdates(_0x25690a,_0x8971df){return function(_0xbfdaf8){if(_0xbfdaf8){return _0xbfdaf8[_0x8cb1('0x26')](_0x25690a)['then'](function(_0x280742){return _0x280742;});}return null;};}function removeEntity(_0xeac7b6,_0x50adce){return function(_0x21946b){if(_0x21946b){return _0x21946b[_0x8cb1('0x27')]()[_0x8cb1('0x28')](function(){_0xeac7b6[_0x8cb1('0x1c')](0xcc)[_0x8cb1('0x1d')]();});}};}function handleEntityNotFound(_0x37fdad,_0xac5038){return function(_0x1cefc8){if(!_0x1cefc8){_0x37fdad['sendStatus'](0x194);}return _0x1cefc8;};}function handleError(_0xa8ec7f,_0x563ef3){_0x563ef3=_0x563ef3||0x1f4;return function(_0x82f47f){logger[_0x8cb1('0x29')](_0x82f47f[_0x8cb1('0x2a')]);if(_0x82f47f[_0x8cb1('0x2b')]){delete _0x82f47f[_0x8cb1('0x2b')];}_0xa8ec7f[_0x8cb1('0x1c')](_0x563ef3)['send'](_0x82f47f);};}exports[_0x8cb1('0x2c')]=function(_0x347d40,_0x101cc3){var _0x57e330={},_0x51631c={},_0x36e5a2={'count':0x0,'rows':[]};var _0x5347eb=_[_0x8cb1('0x2d')](db[_0x8cb1('0x2e')]['rawAttributes'],function(_0x1ca370){return{'name':_0x1ca370[_0x8cb1('0x2f')],'type':_0x1ca370[_0x8cb1('0x30')][_0x8cb1('0x31')]};});_0x51631c[_0x8cb1('0x32')]=_[_0x8cb1('0x2d')](_0x5347eb,_0x8cb1('0x2b'));_0x51631c['query']=_['keys'](_0x347d40[_0x8cb1('0x33')]);_0x51631c[_0x8cb1('0x34')]=_[_0x8cb1('0x35')](_0x51631c[_0x8cb1('0x32')],_0x51631c['query']);_0x57e330['attributes']=_[_0x8cb1('0x35')](_0x51631c['model'],qs[_0x8cb1('0x36')](_0x347d40['query']['fields']));_0x57e330[_0x8cb1('0x37')]=_0x57e330[_0x8cb1('0x37')][_0x8cb1('0x38')]?_0x57e330['attributes']:_0x51631c[_0x8cb1('0x32')];if(!_0x347d40[_0x8cb1('0x33')]['hasOwnProperty'](_0x8cb1('0x39'))){_0x57e330[_0x8cb1('0x20')]=qs[_0x8cb1('0x20')](_0x347d40[_0x8cb1('0x33')][_0x8cb1('0x20')]);_0x57e330['offset']=qs[_0x8cb1('0x22')](_0x347d40[_0x8cb1('0x33')][_0x8cb1('0x22')]);}_0x57e330['order']=qs['sort'](_0x347d40['query']['sort']);_0x57e330['where']=qs['filters'](_[_0x8cb1('0x3a')](_0x347d40[_0x8cb1('0x33')],_0x51631c[_0x8cb1('0x34')]),_0x5347eb);if(_0x347d40[_0x8cb1('0x33')][_0x8cb1('0x3b')]){_0x57e330[_0x8cb1('0x3c')]=_['merge'](_0x57e330['where'],{'$or':_[_0x8cb1('0x2d')](_0x5347eb,function(_0x18588b){if(_0x18588b[_0x8cb1('0x30')]!=='VIRTUAL'){var _0x4d53a1={};_0x4d53a1[_0x18588b[_0x8cb1('0x2b')]]={'$like':'%'+_0x347d40['query'][_0x8cb1('0x3b')]+'%'};return _0x4d53a1;}})});}_0x57e330=_[_0x8cb1('0x3d')]({},_0x57e330,_0x347d40[_0x8cb1('0x3e')]);var _0x4b8cf5={'where':_0x57e330[_0x8cb1('0x3c')]};return db[_0x8cb1('0x2e')][_0x8cb1('0x21')](_0x4b8cf5)['then'](function(_0xd1a992){_0x36e5a2[_0x8cb1('0x21')]=_0xd1a992;if(_0x347d40[_0x8cb1('0x33')][_0x8cb1('0x3f')]){_0x57e330['include']=[{'all':!![]}];}return db[_0x8cb1('0x2e')][_0x8cb1('0x40')](_0x57e330);})[_0x8cb1('0x28')](function(_0xc5330){_0x36e5a2[_0x8cb1('0x41')]=_0xc5330;return _0x36e5a2;})['then'](respondWithFilteredResult(_0x101cc3,_0x57e330))['catch'](handleError(_0x101cc3,null));};exports[_0x8cb1('0x42')]=function(_0x46dd0c,_0x1e1da2){var _0xbf90d6={'raw':![],'where':{'id':_0x46dd0c[_0x8cb1('0x43')]['id']}},_0x5f295c={};_0x5f295c[_0x8cb1('0x32')]=_['keys'](db[_0x8cb1('0x2e')]['rawAttributes']);_0x5f295c[_0x8cb1('0x33')]=_['keys'](_0x46dd0c['query']);_0x5f295c['filters']=_[_0x8cb1('0x35')](_0x5f295c[_0x8cb1('0x32')],_0x5f295c[_0x8cb1('0x33')]);_0xbf90d6[_0x8cb1('0x37')]=_[_0x8cb1('0x35')](_0x5f295c[_0x8cb1('0x32')],qs[_0x8cb1('0x36')](_0x46dd0c['query'][_0x8cb1('0x36')]));_0xbf90d6[_0x8cb1('0x37')]=_0xbf90d6[_0x8cb1('0x37')][_0x8cb1('0x38')]?_0xbf90d6[_0x8cb1('0x37')]:_0x5f295c[_0x8cb1('0x32')];if(_0x46dd0c[_0x8cb1('0x33')][_0x8cb1('0x3f')]){_0xbf90d6[_0x8cb1('0x44')]=[{'all':!![]}];}_0xbf90d6=_['merge']({},_0xbf90d6,_0x46dd0c[_0x8cb1('0x3e')]);return db[_0x8cb1('0x2e')][_0x8cb1('0x45')](_0xbf90d6)[_0x8cb1('0x28')](handleEntityNotFound(_0x1e1da2,null))[_0x8cb1('0x28')](respondWithResult(_0x1e1da2,null))[_0x8cb1('0x46')](handleError(_0x1e1da2,null));};exports[_0x8cb1('0x47')]=function(_0x12ed40,_0x5c99d6){return db[_0x8cb1('0x2e')][_0x8cb1('0x47')](_0x12ed40[_0x8cb1('0x48')],{})[_0x8cb1('0x28')](respondWithResult(_0x5c99d6,0xc9))[_0x8cb1('0x46')](handleError(_0x5c99d6,null));};exports['update']=function(_0x32dead,_0x479655){if(_0x32dead[_0x8cb1('0x48')]['id']){delete _0x32dead[_0x8cb1('0x48')]['id'];}return db[_0x8cb1('0x2e')]['find']({'where':{'id':_0x32dead[_0x8cb1('0x43')]['id']}})[_0x8cb1('0x28')](handleEntityNotFound(_0x479655,null))[_0x8cb1('0x28')](saveUpdates(_0x32dead[_0x8cb1('0x48')],null))['then'](respondWithResult(_0x479655,null))[_0x8cb1('0x46')](handleError(_0x479655,null));};exports[_0x8cb1('0x27')]=function(_0x5e2eb5,_0x60f097){return db[_0x8cb1('0x2e')][_0x8cb1('0x45')]({'where':{'id':_0x5e2eb5[_0x8cb1('0x43')]['id']}})['then'](handleEntityNotFound(_0x60f097,null))['then'](removeEntity(_0x60f097,null))[_0x8cb1('0x46')](handleError(_0x60f097,null));};exports[_0x8cb1('0x49')]=function(_0x3305dc,_0x54d2f4,_0x170ec4){var _0x482f08={};var _0x3a0bb0={};var _0x1e212e;var _0x34276c;return db[_0x8cb1('0x2e')]['findOne']({'where':{'id':_0x3305dc['params']['id']}})['then'](handleEntityNotFound(_0x54d2f4,null))[_0x8cb1('0x28')](function(_0x5bba4f){if(_0x5bba4f){_0x1e212e=_0x5bba4f;_0x3a0bb0['model']=_['keys'](db[_0x8cb1('0x4a')][_0x8cb1('0x4b')]);_0x3a0bb0['query']=_[_0x8cb1('0x4c')](_0x3305dc[_0x8cb1('0x33')]);_0x3a0bb0['filters']=_[_0x8cb1('0x35')](_0x3a0bb0['model'],_0x3a0bb0[_0x8cb1('0x33')]);_0x482f08[_0x8cb1('0x37')]=_['intersection'](_0x3a0bb0[_0x8cb1('0x32')],qs['fields'](_0x3305dc[_0x8cb1('0x33')][_0x8cb1('0x36')]));_0x482f08[_0x8cb1('0x37')]=_0x482f08['attributes']['length']?_0x482f08['attributes']:_0x3a0bb0[_0x8cb1('0x32')];_0x482f08[_0x8cb1('0x4d')]=qs[_0x8cb1('0x4e')](_0x3305dc[_0x8cb1('0x33')][_0x8cb1('0x4e')]);_0x482f08[_0x8cb1('0x3c')]=qs[_0x8cb1('0x34')](_['pick'](_0x3305dc[_0x8cb1('0x33')],_0x3a0bb0['filters']));if(_0x3305dc[_0x8cb1('0x33')]['filter']){_0x482f08[_0x8cb1('0x3c')]=_[_0x8cb1('0x3d')](_0x482f08[_0x8cb1('0x3c')],{'$or':_[_0x8cb1('0x2d')](_0x482f08[_0x8cb1('0x37')],function(_0x27fa3b){var _0x47084a={};_0x47084a[_0x27fa3b]={'$like':'%'+_0x3305dc['query'][_0x8cb1('0x3b')]+'%'};return _0x47084a;})});}_0x482f08=_['merge']({},_0x482f08,_0x3305dc['options']);return _0x1e212e[_0x8cb1('0x49')](_0x482f08);}})['then'](function(_0x387eef){if(_0x387eef){_0x34276c=_0x387eef[_0x8cb1('0x38')];if(!_0x3305dc['query'][_0x8cb1('0x4f')](_0x8cb1('0x39'))){_0x482f08[_0x8cb1('0x20')]=qs[_0x8cb1('0x20')](_0x3305dc[_0x8cb1('0x33')][_0x8cb1('0x20')]);_0x482f08['offset']=qs['offset'](_0x3305dc[_0x8cb1('0x33')][_0x8cb1('0x22')]);}return _0x1e212e[_0x8cb1('0x49')](_0x482f08);}})[_0x8cb1('0x28')](function(_0x15c3b0){if(_0x15c3b0){return _0x15c3b0?{'count':_0x34276c,'rows':_0x15c3b0}:null;}})[_0x8cb1('0x28')](respondWithResult(_0x54d2f4,null))['catch'](handleError(_0x54d2f4,null));};exports['addConfiguration']=function(_0x4e30f2,_0x4c6964,_0x37f828){if(_0x4e30f2['body']['id']){delete _0x4e30f2[_0x8cb1('0x48')]['id'];}return db['DeskAccount']['findOne']({'where':{'id':_0x4e30f2[_0x8cb1('0x43')]['id']}})[_0x8cb1('0x28')](handleEntityNotFound(_0x4c6964,null))[_0x8cb1('0x28')](function(_0x2a0167){if(_0x2a0167){_0x4e30f2[_0x8cb1('0x48')][_0x8cb1('0x50')]=_0x2a0167['id'];_0x4e30f2[_0x8cb1('0x48')]['Subjects']=integrations['getSubjects'](_0x4e30f2[_0x8cb1('0x48')][_0x8cb1('0x51')],_0x4e30f2[_0x8cb1('0x48')]['type']);_0x4e30f2['body'][_0x8cb1('0x52')]=integrations[_0x8cb1('0x53')](_0x4e30f2[_0x8cb1('0x48')]['channel'],_0x4e30f2[_0x8cb1('0x48')][_0x8cb1('0x30')]);return db[_0x8cb1('0x4a')][_0x8cb1('0x47')](_0x4e30f2[_0x8cb1('0x48')],{'include':[{'model':db['DeskField'],'as':_0x8cb1('0x54')},{'model':db['DeskField'],'as':_0x8cb1('0x52')}]});}return null;})[_0x8cb1('0x28')](respondWithResult(_0x4c6964,null))[_0x8cb1('0x46')](handleError(_0x4c6964,null));};exports[_0x8cb1('0x55')]=function(_0x13892e,_0x555f36,_0x138e61){var _0x26952f=[{'name':'priority','label':_0x8cb1('0x56'),'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 _0x4fb1e1='';return db[_0x8cb1('0x2e')]['findOne']({'where':{'id':_0x13892e[_0x8cb1('0x43')]['id']},'attributes':['id',_0x8cb1('0x57'),_0x8cb1('0x58'),_0x8cb1('0x59'),_0x8cb1('0x5a'),_0x8cb1('0x5b'),_0x8cb1('0x5c'),_0x8cb1('0x5d'),_0x8cb1('0x5e')]})[_0x8cb1('0x28')](handleEntityNotFound(_0x555f36,null))[_0x8cb1('0x28')](function(_0x36d541){if(_0x36d541){_0x4fb1e1=_0x36d541[_0x8cb1('0x57')];var _0x51de32=_0x4fb1e1['slice'](-0x1);if(_0x51de32==='/'){_0x4fb1e1=_0x4fb1e1[_0x8cb1('0x5f')](0x0,_0x4fb1e1[_0x8cb1('0x60')](_0x51de32));}var _0x18a4c6={'method':'GET','uri':util[_0x8cb1('0x61')](_0x8cb1('0x62'),_0x4fb1e1),'headers':{'Content-Type':_0x8cb1('0x63'),'Accept':'application/json'},'json':!![]};if(_0x36d541[_0x8cb1('0x58')]===_0x8cb1('0x64')){_0x18a4c6[_0x8cb1('0x65')][_0x8cb1('0x66')]=util[_0x8cb1('0x61')]('Basic\x20%s',new Buffer(util[_0x8cb1('0x61')](_0x8cb1('0x67'),_0x36d541[_0x8cb1('0x59')],_0x36d541[_0x8cb1('0x5a')]))[_0x8cb1('0x68')](_0x8cb1('0x69')));}return rp(_0x18a4c6)['then'](function(_0x4daeec){return _0x26952f['concat'](_[_0x8cb1('0x2d')](_0x4daeec[_0x8cb1('0x6a')][_0x8cb1('0x6b')],function(_0x55827e){return{'id':_0x55827e[_0x8cb1('0x2b')],'name':_0x55827e[_0x8cb1('0x2b')],'type':_0x55827e[_0x8cb1('0x30')],'active':_0x55827e['active'],'label':_0x55827e[_0x8cb1('0x6c')],'custom':!![]};}));});}})[_0x8cb1('0x28')](function(_0x48cf97){return{'count':_0x48cf97[_0x8cb1('0x38')],'rows':_0x48cf97};})[_0x8cb1('0x28')](respondWithResult(_0x555f36,null))[_0x8cb1('0x46')](function(_0x2cb71a){var _0x1cd304=_0x13892e[_0x8cb1('0x33')][_0x8cb1('0x6d')]?0x1f4:_0x2cb71a['statusCode']||0x1f4;logger[_0x8cb1('0x29')](_0x8cb1('0x6e'),_0x8cb1('0x55'),_0x1cd304,JSON[_0x8cb1('0x6f')](_0x2cb71a));delete _0x2cb71a[_0x8cb1('0x2b')];if(_0x1cd304===0x191){_0x1cd304=0x190;}_0x555f36[_0x8cb1('0x1c')](_0x1cd304)[_0x8cb1('0x70')](_0x13892e[_0x8cb1('0x33')][_0x8cb1('0x6d')]?{'message':_0x8cb1('0x71'),'statusCode':_0x2cb71a[_0x8cb1('0x72')]}:_0x2cb71a);});};
\ No newline at end of file
+var _0xc8eb=['_embedded','entries','active','label','statusCode','error','Wrong\x20credentials','rimraf','fast-json-patch','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../components/integrations/configuration','sendStatus','status','end','json','offset','undefined','count','set','Content-Range','update','then','destroy','name','send','index','map','DeskAccount','fieldName','type','key','model','query','keys','filters','intersection','attributes','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','fields','find','create','body','findOne','DeskConfiguration','getConfigurations','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','DeskField','getFields','priority','remoteUri','authType','username','consumerKey','consumerSecret','token','tokenSecret','slice','substring','lastIndexOf','format','%s/custom_fields','basic','headers','Authorization','Basic\x20%s','password','toString','concat'];(function(_0x3ae801,_0x506dc6){var _0x35772f=function(_0x21ef79){while(--_0x21ef79){_0x3ae801['push'](_0x3ae801['shift']());}};_0x35772f(++_0x506dc6);}(_0xc8eb,0xe7));var _0xbc8e=function(_0x3bd52b,_0xbbc735){_0x3bd52b=_0x3bd52b-0x0;var _0x1e5b89=_0xc8eb[_0x3bd52b];return _0x1e5b89;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xbc8e('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xbc8e('0x1'));var rp=require('request-promise');var moment=require(_0xbc8e('0x2'));var BPromise=require(_0xbc8e('0x3'));var Mustache=require('mustache');var util=require(_0xbc8e('0x4'));var path=require(_0xbc8e('0x5'));var sox=require(_0xbc8e('0x6'));var csv=require(_0xbc8e('0x7'));var ejs=require(_0xbc8e('0x8'));var fs=require('fs');var fs_extra=require(_0xbc8e('0x9'));var _=require(_0xbc8e('0xa'));var squel=require('squel');var crypto=require(_0xbc8e('0xb'));var jsforce=require(_0xbc8e('0xc'));var deskjs=require(_0xbc8e('0xd'));var toCsv=require(_0xbc8e('0x7'));var querystring=require(_0xbc8e('0xe'));var Papa=require(_0xbc8e('0xf'));var Redis=require(_0xbc8e('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xbc8e('0x11'));var as=require(_0xbc8e('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xbc8e('0x13'))('api');var utils=require(_0xbc8e('0x14'));var config=require(_0xbc8e('0x15'));var licenseUtil=require(_0xbc8e('0x16'));var db=require('../../mysqldb')['db'];var integrations=require(_0xbc8e('0x17'));function respondWithStatusCode(_0x12cb2d,_0x345287){_0x345287=_0x345287||0xcc;return function(_0x1ee04c){if(_0x1ee04c){return _0x12cb2d[_0xbc8e('0x18')](_0x345287);}return _0x12cb2d[_0xbc8e('0x19')](_0x345287)[_0xbc8e('0x1a')]();};}function respondWithResult(_0x52f8d2,_0x887a6c){_0x887a6c=_0x887a6c||0xc8;return function(_0x529d7d){if(_0x529d7d){return _0x52f8d2[_0xbc8e('0x19')](_0x887a6c)[_0xbc8e('0x1b')](_0x529d7d);}};}function respondWithFilteredResult(_0x5285a9,_0x157d54){return function(_0x4c5c84){if(_0x4c5c84){var _0x5426ed=typeof _0x157d54[_0xbc8e('0x1c')]==='undefined'&&typeof _0x157d54['limit']===_0xbc8e('0x1d');var _0x3a2236=_0x4c5c84[_0xbc8e('0x1e')];var _0x42b8a1=_0x5426ed?0x0:_0x157d54['offset'];var _0x2a4d42=_0x5426ed?_0x4c5c84[_0xbc8e('0x1e')]:_0x157d54['offset']+_0x157d54['limit'];var _0x89e4ff;if(_0x2a4d42>=_0x3a2236){_0x2a4d42=_0x3a2236;_0x89e4ff=0xc8;}else{_0x89e4ff=0xce;}_0x5285a9[_0xbc8e('0x19')](_0x89e4ff);return _0x5285a9[_0xbc8e('0x1f')](_0xbc8e('0x20'),_0x42b8a1+'-'+_0x2a4d42+'/'+_0x3a2236)[_0xbc8e('0x1b')](_0x4c5c84);}return null;};}function patchUpdates(_0x2d7556){return function(_0x2baf73){try{jsonpatch['apply'](_0x2baf73,_0x2d7556,!![]);}catch(_0x3da4cb){return BPromise['reject'](_0x3da4cb);}return _0x2baf73['save']();};}function saveUpdates(_0x5db85b,_0xa2cc65){return function(_0x10ff48){if(_0x10ff48){return _0x10ff48[_0xbc8e('0x21')](_0x5db85b)[_0xbc8e('0x22')](function(_0x303967){return _0x303967;});}return null;};}function removeEntity(_0x4e9c7b,_0x208bd7){return function(_0x4e5f3b){if(_0x4e5f3b){return _0x4e5f3b[_0xbc8e('0x23')]()[_0xbc8e('0x22')](function(){_0x4e9c7b[_0xbc8e('0x19')](0xcc)[_0xbc8e('0x1a')]();});}};}function handleEntityNotFound(_0x5bcdbb,_0x5dd18b){return function(_0x5ec8fb){if(!_0x5ec8fb){_0x5bcdbb[_0xbc8e('0x18')](0x194);}return _0x5ec8fb;};}function handleError(_0x439fdd,_0x4be1a3){_0x4be1a3=_0x4be1a3||0x1f4;return function(_0x51173a){logger['error'](_0x51173a['stack']);if(_0x51173a[_0xbc8e('0x24')]){delete _0x51173a['name'];}_0x439fdd[_0xbc8e('0x19')](_0x4be1a3)[_0xbc8e('0x25')](_0x51173a);};}exports[_0xbc8e('0x26')]=function(_0x5c4cf4,_0x23ba83){var _0x114500={},_0x276c65={},_0x43a502={'count':0x0,'rows':[]};var _0x2331b3=_[_0xbc8e('0x27')](db[_0xbc8e('0x28')]['rawAttributes'],function(_0xfd9f46){return{'name':_0xfd9f46[_0xbc8e('0x29')],'type':_0xfd9f46[_0xbc8e('0x2a')][_0xbc8e('0x2b')]};});_0x276c65[_0xbc8e('0x2c')]=_[_0xbc8e('0x27')](_0x2331b3,_0xbc8e('0x24'));_0x276c65[_0xbc8e('0x2d')]=_[_0xbc8e('0x2e')](_0x5c4cf4['query']);_0x276c65[_0xbc8e('0x2f')]=_[_0xbc8e('0x30')](_0x276c65[_0xbc8e('0x2c')],_0x276c65[_0xbc8e('0x2d')]);_0x114500[_0xbc8e('0x31')]=_['intersection'](_0x276c65['model'],qs['fields'](_0x5c4cf4['query']['fields']));_0x114500[_0xbc8e('0x31')]=_0x114500['attributes'][_0xbc8e('0x32')]?_0x114500[_0xbc8e('0x31')]:_0x276c65[_0xbc8e('0x2c')];if(!_0x5c4cf4['query'][_0xbc8e('0x33')](_0xbc8e('0x34'))){_0x114500[_0xbc8e('0x35')]=qs[_0xbc8e('0x35')](_0x5c4cf4[_0xbc8e('0x2d')]['limit']);_0x114500[_0xbc8e('0x1c')]=qs['offset'](_0x5c4cf4['query'][_0xbc8e('0x1c')]);}_0x114500[_0xbc8e('0x36')]=qs['sort'](_0x5c4cf4[_0xbc8e('0x2d')][_0xbc8e('0x37')]);_0x114500[_0xbc8e('0x38')]=qs[_0xbc8e('0x2f')](_[_0xbc8e('0x39')](_0x5c4cf4[_0xbc8e('0x2d')],_0x276c65[_0xbc8e('0x2f')]),_0x2331b3);if(_0x5c4cf4[_0xbc8e('0x2d')][_0xbc8e('0x3a')]){_0x114500[_0xbc8e('0x38')]=_[_0xbc8e('0x3b')](_0x114500[_0xbc8e('0x38')],{'$or':_[_0xbc8e('0x27')](_0x2331b3,function(_0x597ce3){if(_0x597ce3['type']!==_0xbc8e('0x3c')){var _0x3219e5={};_0x3219e5[_0x597ce3[_0xbc8e('0x24')]]={'$like':'%'+_0x5c4cf4[_0xbc8e('0x2d')][_0xbc8e('0x3a')]+'%'};return _0x3219e5;}})});}_0x114500=_[_0xbc8e('0x3b')]({},_0x114500,_0x5c4cf4[_0xbc8e('0x3d')]);var _0x560532={'where':_0x114500['where']};return db[_0xbc8e('0x28')][_0xbc8e('0x1e')](_0x560532)[_0xbc8e('0x22')](function(_0x4196ed){_0x43a502[_0xbc8e('0x1e')]=_0x4196ed;if(_0x5c4cf4[_0xbc8e('0x2d')][_0xbc8e('0x3e')]){_0x114500[_0xbc8e('0x3f')]=[{'all':!![]}];}return db['DeskAccount'][_0xbc8e('0x40')](_0x114500);})[_0xbc8e('0x22')](function(_0x1966d3){_0x43a502[_0xbc8e('0x41')]=_0x1966d3;return _0x43a502;})[_0xbc8e('0x22')](respondWithFilteredResult(_0x23ba83,_0x114500))[_0xbc8e('0x42')](handleError(_0x23ba83,null));};exports[_0xbc8e('0x43')]=function(_0x2e30b7,_0x593cd3){var _0x8ab6c9={'raw':![],'where':{'id':_0x2e30b7[_0xbc8e('0x44')]['id']}},_0x1705ec={};_0x1705ec[_0xbc8e('0x2c')]=_[_0xbc8e('0x2e')](db[_0xbc8e('0x28')]['rawAttributes']);_0x1705ec['query']=_[_0xbc8e('0x2e')](_0x2e30b7[_0xbc8e('0x2d')]);_0x1705ec[_0xbc8e('0x2f')]=_['intersection'](_0x1705ec[_0xbc8e('0x2c')],_0x1705ec[_0xbc8e('0x2d')]);_0x8ab6c9['attributes']=_[_0xbc8e('0x30')](_0x1705ec[_0xbc8e('0x2c')],qs[_0xbc8e('0x45')](_0x2e30b7[_0xbc8e('0x2d')]['fields']));_0x8ab6c9[_0xbc8e('0x31')]=_0x8ab6c9[_0xbc8e('0x31')][_0xbc8e('0x32')]?_0x8ab6c9[_0xbc8e('0x31')]:_0x1705ec[_0xbc8e('0x2c')];if(_0x2e30b7[_0xbc8e('0x2d')][_0xbc8e('0x3e')]){_0x8ab6c9['include']=[{'all':!![]}];}_0x8ab6c9=_['merge']({},_0x8ab6c9,_0x2e30b7[_0xbc8e('0x3d')]);return db[_0xbc8e('0x28')][_0xbc8e('0x46')](_0x8ab6c9)[_0xbc8e('0x22')](handleEntityNotFound(_0x593cd3,null))[_0xbc8e('0x22')](respondWithResult(_0x593cd3,null))[_0xbc8e('0x42')](handleError(_0x593cd3,null));};exports[_0xbc8e('0x47')]=function(_0x132fd6,_0x344420){return db['DeskAccount']['create'](_0x132fd6[_0xbc8e('0x48')],{})[_0xbc8e('0x22')](respondWithResult(_0x344420,0xc9))[_0xbc8e('0x42')](handleError(_0x344420,null));};exports[_0xbc8e('0x21')]=function(_0x13bf8c,_0x320ac2){if(_0x13bf8c[_0xbc8e('0x48')]['id']){delete _0x13bf8c[_0xbc8e('0x48')]['id'];}return db[_0xbc8e('0x28')][_0xbc8e('0x46')]({'where':{'id':_0x13bf8c['params']['id']}})[_0xbc8e('0x22')](handleEntityNotFound(_0x320ac2,null))[_0xbc8e('0x22')](saveUpdates(_0x13bf8c[_0xbc8e('0x48')],null))[_0xbc8e('0x22')](respondWithResult(_0x320ac2,null))[_0xbc8e('0x42')](handleError(_0x320ac2,null));};exports['destroy']=function(_0x3bf0e4,_0x17aa47){return db[_0xbc8e('0x28')][_0xbc8e('0x46')]({'where':{'id':_0x3bf0e4['params']['id']}})[_0xbc8e('0x22')](handleEntityNotFound(_0x17aa47,null))[_0xbc8e('0x22')](removeEntity(_0x17aa47,null))[_0xbc8e('0x42')](handleError(_0x17aa47,null));};exports['getConfigurations']=function(_0x41c722,_0x1c8cbc,_0x299c92){var _0x464b8f={};var _0xe79cc8={};var _0x53ec12;var _0x213cf4;return db[_0xbc8e('0x28')][_0xbc8e('0x49')]({'where':{'id':_0x41c722[_0xbc8e('0x44')]['id']}})['then'](handleEntityNotFound(_0x1c8cbc,null))[_0xbc8e('0x22')](function(_0x3607ac){if(_0x3607ac){_0x53ec12=_0x3607ac;_0xe79cc8[_0xbc8e('0x2c')]=_[_0xbc8e('0x2e')](db[_0xbc8e('0x4a')]['rawAttributes']);_0xe79cc8[_0xbc8e('0x2d')]=_[_0xbc8e('0x2e')](_0x41c722[_0xbc8e('0x2d')]);_0xe79cc8['filters']=_[_0xbc8e('0x30')](_0xe79cc8[_0xbc8e('0x2c')],_0xe79cc8['query']);_0x464b8f[_0xbc8e('0x31')]=_[_0xbc8e('0x30')](_0xe79cc8[_0xbc8e('0x2c')],qs[_0xbc8e('0x45')](_0x41c722['query'][_0xbc8e('0x45')]));_0x464b8f[_0xbc8e('0x31')]=_0x464b8f[_0xbc8e('0x31')]['length']?_0x464b8f[_0xbc8e('0x31')]:_0xe79cc8[_0xbc8e('0x2c')];_0x464b8f[_0xbc8e('0x36')]=qs[_0xbc8e('0x37')](_0x41c722[_0xbc8e('0x2d')]['sort']);_0x464b8f[_0xbc8e('0x38')]=qs[_0xbc8e('0x2f')](_[_0xbc8e('0x39')](_0x41c722[_0xbc8e('0x2d')],_0xe79cc8['filters']));if(_0x41c722[_0xbc8e('0x2d')][_0xbc8e('0x3a')]){_0x464b8f[_0xbc8e('0x38')]=_[_0xbc8e('0x3b')](_0x464b8f[_0xbc8e('0x38')],{'$or':_['map'](_0x464b8f[_0xbc8e('0x31')],function(_0x57f39e){var _0x585d37={};_0x585d37[_0x57f39e]={'$like':'%'+_0x41c722['query'][_0xbc8e('0x3a')]+'%'};return _0x585d37;})});}_0x464b8f=_[_0xbc8e('0x3b')]({},_0x464b8f,_0x41c722[_0xbc8e('0x3d')]);return _0x53ec12[_0xbc8e('0x4b')](_0x464b8f);}})[_0xbc8e('0x22')](function(_0x1fee72){if(_0x1fee72){_0x213cf4=_0x1fee72[_0xbc8e('0x32')];if(!_0x41c722['query']['hasOwnProperty'](_0xbc8e('0x34'))){_0x464b8f[_0xbc8e('0x35')]=qs['limit'](_0x41c722[_0xbc8e('0x2d')]['limit']);_0x464b8f[_0xbc8e('0x1c')]=qs['offset'](_0x41c722[_0xbc8e('0x2d')][_0xbc8e('0x1c')]);}return _0x53ec12[_0xbc8e('0x4b')](_0x464b8f);}})[_0xbc8e('0x22')](function(_0x4e81dc){if(_0x4e81dc){return _0x4e81dc?{'count':_0x213cf4,'rows':_0x4e81dc}:null;}})[_0xbc8e('0x22')](respondWithResult(_0x1c8cbc,null))[_0xbc8e('0x42')](handleError(_0x1c8cbc,null));};exports[_0xbc8e('0x4c')]=function(_0x46df10,_0x52dafe,_0x58c736){if(_0x46df10['body']['id']){delete _0x46df10[_0xbc8e('0x48')]['id'];}return db[_0xbc8e('0x28')][_0xbc8e('0x49')]({'where':{'id':_0x46df10[_0xbc8e('0x44')]['id']}})[_0xbc8e('0x22')](handleEntityNotFound(_0x52dafe,null))['then'](function(_0x18fe39){if(_0x18fe39){_0x46df10['body'][_0xbc8e('0x4d')]=_0x18fe39['id'];_0x46df10['body'][_0xbc8e('0x4e')]=integrations[_0xbc8e('0x4f')](_0x46df10[_0xbc8e('0x48')][_0xbc8e('0x50')],_0x46df10[_0xbc8e('0x48')]['type']);_0x46df10[_0xbc8e('0x48')][_0xbc8e('0x51')]=integrations[_0xbc8e('0x52')](_0x46df10[_0xbc8e('0x48')]['channel'],_0x46df10[_0xbc8e('0x48')][_0xbc8e('0x2a')]);return db[_0xbc8e('0x4a')][_0xbc8e('0x47')](_0x46df10[_0xbc8e('0x48')],{'include':[{'model':db[_0xbc8e('0x53')],'as':_0xbc8e('0x4e')},{'model':db['DeskField'],'as':_0xbc8e('0x51')}]});}return null;})[_0xbc8e('0x22')](respondWithResult(_0x52dafe,null))['catch'](handleError(_0x52dafe,null));};exports[_0xbc8e('0x54')]=function(_0x243ea7,_0x4b535a,_0x3edcf3){var _0x218cdb=[{'name':_0xbc8e('0x55'),'label':_0xbc8e('0x55'),'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 _0x3b8081='';return db[_0xbc8e('0x28')][_0xbc8e('0x49')]({'where':{'id':_0x243ea7[_0xbc8e('0x44')]['id']},'attributes':['id',_0xbc8e('0x56'),_0xbc8e('0x57'),_0xbc8e('0x58'),'password',_0xbc8e('0x59'),_0xbc8e('0x5a'),_0xbc8e('0x5b'),_0xbc8e('0x5c')]})[_0xbc8e('0x22')](handleEntityNotFound(_0x4b535a,null))[_0xbc8e('0x22')](function(_0x1aa091){if(_0x1aa091){_0x3b8081=_0x1aa091[_0xbc8e('0x56')];var _0x39e56c=_0x3b8081[_0xbc8e('0x5d')](-0x1);if(_0x39e56c==='/'){_0x3b8081=_0x3b8081[_0xbc8e('0x5e')](0x0,_0x3b8081[_0xbc8e('0x5f')](_0x39e56c));}var _0x521306={'method':'GET','uri':util[_0xbc8e('0x60')](_0xbc8e('0x61'),_0x3b8081),'headers':{'Content-Type':'application/json','Accept':'application/json'},'json':!![]};if(_0x1aa091['authType']===_0xbc8e('0x62')){_0x521306[_0xbc8e('0x63')][_0xbc8e('0x64')]=util[_0xbc8e('0x60')](_0xbc8e('0x65'),new Buffer(util['format']('%s:%s',_0x1aa091[_0xbc8e('0x58')],_0x1aa091[_0xbc8e('0x66')]))[_0xbc8e('0x67')]('base64'));}return rp(_0x521306)[_0xbc8e('0x22')](function(_0x396766){return _0x218cdb[_0xbc8e('0x68')](_[_0xbc8e('0x27')](_0x396766[_0xbc8e('0x69')][_0xbc8e('0x6a')],function(_0x3c8a01){return{'id':_0x3c8a01[_0xbc8e('0x24')],'name':_0x3c8a01['name'],'type':_0x3c8a01[_0xbc8e('0x2a')],'active':_0x3c8a01[_0xbc8e('0x6b')],'label':_0x3c8a01[_0xbc8e('0x6c')],'custom':!![]};}));});}})['then'](function(_0x2771e5){return{'count':_0x2771e5[_0xbc8e('0x32')],'rows':_0x2771e5};})[_0xbc8e('0x22')](respondWithResult(_0x4b535a,null))[_0xbc8e('0x42')](function(_0xfec473){var _0x49d766=_0x243ea7[_0xbc8e('0x2d')]['test']?0x1f4:_0xfec473[_0xbc8e('0x6d')]||0x1f4;logger[_0xbc8e('0x6e')]('getFields,\x20%s,\x20%s,\x20%s','getFields',_0x49d766,JSON['stringify'](_0xfec473));delete _0xfec473['name'];if(_0x49d766===0x191){_0x49d766=0x190;}_0x4b535a[_0xbc8e('0x19')](_0x49d766)[_0xbc8e('0x25')](_0x243ea7[_0xbc8e('0x2d')]['test']?{'message':_0xbc8e('0x6f'),'statusCode':_0xfec473[_0xbc8e('0x6d')]}:_0xfec473);});};
\ No newline at end of file
index c5d21a6..9cc796f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd795=['bluebird','request-promise','path','rimraf','exports','DeskAccount','int_desk_accounts','lodash','util','../../config/logger','api'];(function(_0x41355f,_0xecbc5){var _0x42329a=function(_0x376150){while(--_0x376150){_0x41355f['push'](_0x41355f['shift']());}};_0x42329a(++_0xecbc5);}(_0xd795,0x193));var _0x5d79=function(_0x1b2ff7,_0x12a034){_0x1b2ff7=_0x1b2ff7-0x0;var _0x31656a=_0xd795[_0x1b2ff7];return _0x31656a;};'use strict';var _=require(_0x5d79('0x0'));var util=require(_0x5d79('0x1'));var logger=require(_0x5d79('0x2'))(_0x5d79('0x3'));var moment=require('moment');var BPromise=require(_0x5d79('0x4'));var rp=require(_0x5d79('0x5'));var fs=require('fs');var path=require(_0x5d79('0x6'));var rimraf=require(_0x5d79('0x7'));var config=require('../../config/environment');var attributes=require('./intDeskAccount.attributes');var integrations=require('../../components/integrations/configuration');module[_0x5d79('0x8')]=function(_0x5cdca8,_0xd4abf2){return _0x5cdca8['define'](_0x5d79('0x9'),attributes,{'tableName':_0x5d79('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xf253=['../../config/environment','./intDeskAccount.attributes','../../components/integrations/configuration','exports','define','DeskAccount','int_desk_accounts','../../config/logger','api','moment','bluebird','request-promise','rimraf'];(function(_0x34160c,_0x1eaa17){var _0x28ab7e=function(_0x20b2e5){while(--_0x20b2e5){_0x34160c['push'](_0x34160c['shift']());}};_0x28ab7e(++_0x1eaa17);}(_0xf253,0xca));var _0x3f25=function(_0x2baa81,_0x2c18db){_0x2baa81=_0x2baa81-0x0;var _0x3c4eee=_0xf253[_0x2baa81];return _0x3c4eee;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x3f25('0x0'))(_0x3f25('0x1'));var moment=require(_0x3f25('0x2'));var BPromise=require(_0x3f25('0x3'));var rp=require(_0x3f25('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x3f25('0x5'));var config=require(_0x3f25('0x6'));var attributes=require(_0x3f25('0x7'));var integrations=require(_0x3f25('0x8'));module[_0x3f25('0x9')]=function(_0x1db616,_0x2e3895){return _0x1db616[_0x3f25('0xa')](_0x3f25('0xb'),attributes,{'tableName':_0x3f25('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index f7c4609..7a688ee 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe98c=['../../config/environment','jayson/promise','client','http','DeskAccount,\x20%s,\x20%s','request\x20sent','debug','DeskAccount,\x20%s,\x20%s,\x20%s','error','message','info','result','catch','GetDeskAccount','DeskAccount','findAll','options','raw','where','attributes','limit','include','map','model','then','ShowDeskAccount','stringify','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc'];(function(_0x131e11,_0x2c2c22){var _0x34bfba=function(_0x14dcef){while(--_0x14dcef){_0x131e11['push'](_0x131e11['shift']());}};_0x34bfba(++_0x2c2c22);}(_0xe98c,0x1e2));var _0xce98=function(_0x329549,_0x52e1fc){_0x329549=_0x329549-0x0;var _0x15c094=_0xe98c[_0x329549];return _0x15c094;};'use strict';var _=require(_0xce98('0x0'));var util=require(_0xce98('0x1'));var moment=require(_0xce98('0x2'));var BPromise=require(_0xce98('0x3'));var rs=require(_0xce98('0x4'));var fs=require('fs');var Redis=require(_0xce98('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xce98('0x6'));var logger=require('../../config/logger')(_0xce98('0x7'));var config=require(_0xce98('0x8'));var jayson=require(_0xce98('0x9'));var client=jayson[_0xce98('0xa')][_0xce98('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xc67136,_0x128503,_0x523f8e){return new BPromise(function(_0x18d27b,_0x316af3){return client['request'](_0xc67136,_0x523f8e)['then'](function(_0x429953){logger['info'](_0xce98('0xc'),_0x128503,_0xce98('0xd'));logger[_0xce98('0xe')](_0xce98('0xf'),_0x128503,_0xce98('0xd'),JSON['stringify'](_0x429953));if(_0x429953[_0xce98('0x10')]){if(_0x429953['error']['code']===0x1f4){logger[_0xce98('0x10')]('DeskAccount,\x20%s,\x20%s',_0x128503,_0x429953[_0xce98('0x10')][_0xce98('0x11')]);return _0x316af3(_0x429953['error']['message']);}logger['error'](_0xce98('0xc'),_0x128503,_0x429953['error'][_0xce98('0x11')]);return _0x18d27b(_0x429953[_0xce98('0x10')][_0xce98('0x11')]);}else{logger[_0xce98('0x12')](_0xce98('0xc'),_0x128503,_0xce98('0xd'));_0x18d27b(_0x429953[_0xce98('0x13')]['message']);}})[_0xce98('0x14')](function(_0x1228b2){logger['error']('DeskAccount,\x20%s,\x20%s',_0x128503,_0x1228b2);_0x316af3(_0x1228b2);});});}exports[_0xce98('0x15')]=function(_0x562da9){var _0x47dafb=this;return new Promise(function(_0x384354,_0x2d8ca8){return db[_0xce98('0x16')][_0xce98('0x17')]({'raw':_0x562da9[_0xce98('0x18')]?_0x562da9[_0xce98('0x18')][_0xce98('0x19')]===undefined?!![]:![]:!![],'where':_0x562da9[_0xce98('0x18')]?_0x562da9[_0xce98('0x18')][_0xce98('0x1a')]||null:null,'attributes':_0x562da9[_0xce98('0x18')]?_0x562da9[_0xce98('0x18')][_0xce98('0x1b')]||null:null,'limit':_0x562da9[_0xce98('0x18')]?_0x562da9[_0xce98('0x18')][_0xce98('0x1c')]||null:null,'include':_0x562da9['options']?_0x562da9['options'][_0xce98('0x1d')]?_[_0xce98('0x1e')](_0x562da9[_0xce98('0x18')][_0xce98('0x1d')],function(_0x584e56){return{'model':db[_0x584e56[_0xce98('0x1f')]],'as':_0x584e56['as'],'attributes':_0x584e56[_0xce98('0x1b')],'include':_0x584e56[_0xce98('0x1d')]?_[_0xce98('0x1e')](_0x584e56[_0xce98('0x1d')],function(_0x58faeb){return{'model':db[_0x58faeb[_0xce98('0x1f')]],'as':_0x58faeb['as'],'attributes':_0x58faeb[_0xce98('0x1b')],'include':_0x58faeb[_0xce98('0x1d')]?_[_0xce98('0x1e')](_0x58faeb[_0xce98('0x1d')],function(_0x4428c4){return{'model':db[_0x4428c4['model']],'as':_0x4428c4['as'],'attributes':_0x4428c4[_0xce98('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xce98('0x20')](function(_0x48f254){logger[_0xce98('0x12')]('GetDeskAccount',_0x562da9);logger['debug'](_0xce98('0x15'),_0x562da9,JSON['stringify'](_0x48f254));_0x384354(_0x48f254);})[_0xce98('0x14')](function(_0x2f4f6d){logger['error'](_0xce98('0x15'),_0x2f4f6d[_0xce98('0x11')],_0x562da9);_0x2d8ca8(_0x47dafb['error'](0x1f4,_0x2f4f6d[_0xce98('0x11')]));});});};exports[_0xce98('0x21')]=function(_0x4dc690){var _0x5cbe2e=this;return new Promise(function(_0x3448a5,_0x5a0468){return db[_0xce98('0x16')]['find']({'raw':_0x4dc690[_0xce98('0x18')]?_0x4dc690[_0xce98('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x4dc690['options']?_0x4dc690['options']['where']||null:null,'attributes':_0x4dc690[_0xce98('0x18')]?_0x4dc690['options'][_0xce98('0x1b')]||null:null,'include':_0x4dc690['options']?_0x4dc690['options'][_0xce98('0x1d')]?_[_0xce98('0x1e')](_0x4dc690[_0xce98('0x18')]['include'],function(_0x6b593e){return{'model':db[_0x6b593e[_0xce98('0x1f')]],'as':_0x6b593e['as'],'attributes':_0x6b593e[_0xce98('0x1b')],'include':_0x6b593e[_0xce98('0x1d')]?_[_0xce98('0x1e')](_0x6b593e[_0xce98('0x1d')],function(_0x38f435){return{'model':db[_0x38f435[_0xce98('0x1f')]],'as':_0x38f435['as'],'attributes':_0x38f435[_0xce98('0x1b')],'include':_0x38f435[_0xce98('0x1d')]?_['map'](_0x38f435[_0xce98('0x1d')],function(_0x2af57c){return{'model':db[_0x2af57c[_0xce98('0x1f')]],'as':_0x2af57c['as'],'attributes':_0x2af57c[_0xce98('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xce98('0x20')](function(_0x478516){logger[_0xce98('0x12')](_0xce98('0x21'),_0x4dc690);logger[_0xce98('0xe')]('ShowDeskAccount',_0x4dc690,JSON[_0xce98('0x22')](_0x478516));_0x3448a5(_0x478516);})[_0xce98('0x14')](function(_0xd44059){logger[_0xce98('0x10')](_0xce98('0x21'),_0xd44059[_0xce98('0x11')],_0x4dc690);_0x5a0468(_0x5cbe2e[_0xce98('0x10')](0x1f4,_0xd44059[_0xce98('0x11')]));});});};
\ No newline at end of file
+var _0x36cb=['client','request','then','info','DeskAccount,\x20%s,\x20%s','debug','DeskAccount,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','catch','GetDeskAccount','DeskAccount','findAll','options','raw','where','attributes','limit','include','map','model','stringify','find','ShowDeskAccount','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise'];(function(_0x5f0fcf,_0x5b03b1){var _0x136c7b=function(_0x83b89f){while(--_0x83b89f){_0x5f0fcf['push'](_0x5f0fcf['shift']());}};_0x136c7b(++_0x5b03b1);}(_0x36cb,0x178));var _0xb36c=function(_0x4b055c,_0x4b870b){_0x4b055c=_0x4b055c-0x0;var _0x4b62bb=_0x36cb[_0x4b055c];return _0x4b62bb;};'use strict';var _=require(_0xb36c('0x0'));var util=require(_0xb36c('0x1'));var moment=require(_0xb36c('0x2'));var BPromise=require(_0xb36c('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb36c('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xb36c('0x5'));var logger=require(_0xb36c('0x6'))('rpc');var config=require(_0xb36c('0x7'));var jayson=require(_0xb36c('0x8'));var client=jayson[_0xb36c('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x495bde,_0x263e2a,_0x3cff67){return new BPromise(function(_0x1521f4,_0x38ef82){return client[_0xb36c('0xa')](_0x495bde,_0x3cff67)[_0xb36c('0xb')](function(_0x5bc0e6){logger[_0xb36c('0xc')](_0xb36c('0xd'),_0x263e2a,'request\x20sent');logger[_0xb36c('0xe')](_0xb36c('0xf'),_0x263e2a,_0xb36c('0x10'),JSON['stringify'](_0x5bc0e6));if(_0x5bc0e6['error']){if(_0x5bc0e6[_0xb36c('0x11')][_0xb36c('0x12')]===0x1f4){logger['error'](_0xb36c('0xd'),_0x263e2a,_0x5bc0e6[_0xb36c('0x11')][_0xb36c('0x13')]);return _0x38ef82(_0x5bc0e6['error'][_0xb36c('0x13')]);}logger['error'](_0xb36c('0xd'),_0x263e2a,_0x5bc0e6['error'][_0xb36c('0x13')]);return _0x1521f4(_0x5bc0e6[_0xb36c('0x11')][_0xb36c('0x13')]);}else{logger['info'](_0xb36c('0xd'),_0x263e2a,_0xb36c('0x10'));_0x1521f4(_0x5bc0e6['result'][_0xb36c('0x13')]);}})[_0xb36c('0x14')](function(_0x5acb35){logger[_0xb36c('0x11')]('DeskAccount,\x20%s,\x20%s',_0x263e2a,_0x5acb35);_0x38ef82(_0x5acb35);});});}exports[_0xb36c('0x15')]=function(_0x43c468){var _0x16a492=this;return new Promise(function(_0x2c909d,_0x4c1f84){return db[_0xb36c('0x16')][_0xb36c('0x17')]({'raw':_0x43c468[_0xb36c('0x18')]?_0x43c468['options'][_0xb36c('0x19')]===undefined?!![]:![]:!![],'where':_0x43c468[_0xb36c('0x18')]?_0x43c468['options'][_0xb36c('0x1a')]||null:null,'attributes':_0x43c468[_0xb36c('0x18')]?_0x43c468['options'][_0xb36c('0x1b')]||null:null,'limit':_0x43c468[_0xb36c('0x18')]?_0x43c468['options'][_0xb36c('0x1c')]||null:null,'include':_0x43c468[_0xb36c('0x18')]?_0x43c468[_0xb36c('0x18')][_0xb36c('0x1d')]?_[_0xb36c('0x1e')](_0x43c468[_0xb36c('0x18')][_0xb36c('0x1d')],function(_0x179ac0){return{'model':db[_0x179ac0[_0xb36c('0x1f')]],'as':_0x179ac0['as'],'attributes':_0x179ac0[_0xb36c('0x1b')],'include':_0x179ac0[_0xb36c('0x1d')]?_[_0xb36c('0x1e')](_0x179ac0[_0xb36c('0x1d')],function(_0x23361e){return{'model':db[_0x23361e[_0xb36c('0x1f')]],'as':_0x23361e['as'],'attributes':_0x23361e['attributes'],'include':_0x23361e['include']?_[_0xb36c('0x1e')](_0x23361e[_0xb36c('0x1d')],function(_0x5f7211){return{'model':db[_0x5f7211[_0xb36c('0x1f')]],'as':_0x5f7211['as'],'attributes':_0x5f7211[_0xb36c('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1d9839){logger[_0xb36c('0xc')]('GetDeskAccount',_0x43c468);logger['debug'](_0xb36c('0x15'),_0x43c468,JSON[_0xb36c('0x20')](_0x1d9839));_0x2c909d(_0x1d9839);})[_0xb36c('0x14')](function(_0x2114e4){logger[_0xb36c('0x11')]('GetDeskAccount',_0x2114e4['message'],_0x43c468);_0x4c1f84(_0x16a492[_0xb36c('0x11')](0x1f4,_0x2114e4[_0xb36c('0x13')]));});});};exports['ShowDeskAccount']=function(_0x327faa){var _0x2f8a62=this;return new Promise(function(_0x536cd3,_0x1a8259){return db[_0xb36c('0x16')][_0xb36c('0x21')]({'raw':_0x327faa[_0xb36c('0x18')]?_0x327faa['options']['raw']===undefined?!![]:![]:!![],'where':_0x327faa[_0xb36c('0x18')]?_0x327faa[_0xb36c('0x18')][_0xb36c('0x1a')]||null:null,'attributes':_0x327faa['options']?_0x327faa[_0xb36c('0x18')]['attributes']||null:null,'include':_0x327faa[_0xb36c('0x18')]?_0x327faa[_0xb36c('0x18')][_0xb36c('0x1d')]?_['map'](_0x327faa[_0xb36c('0x18')]['include'],function(_0x242819){return{'model':db[_0x242819[_0xb36c('0x1f')]],'as':_0x242819['as'],'attributes':_0x242819['attributes'],'include':_0x242819[_0xb36c('0x1d')]?_[_0xb36c('0x1e')](_0x242819['include'],function(_0x35bcab){return{'model':db[_0x35bcab[_0xb36c('0x1f')]],'as':_0x35bcab['as'],'attributes':_0x35bcab[_0xb36c('0x1b')],'include':_0x35bcab[_0xb36c('0x1d')]?_[_0xb36c('0x1e')](_0x35bcab['include'],function(_0x4ca81b){return{'model':db[_0x4ca81b[_0xb36c('0x1f')]],'as':_0x4ca81b['as'],'attributes':_0x4ca81b[_0xb36c('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xb36c('0xb')](function(_0x1d14dc){logger[_0xb36c('0xc')]('ShowDeskAccount',_0x327faa);logger[_0xb36c('0xe')](_0xb36c('0x22'),_0x327faa,JSON[_0xb36c('0x20')](_0x1d14dc));_0x536cd3(_0x1d14dc);})['catch'](function(_0x51f38f){logger['error'](_0xb36c('0x22'),_0x51f38f[_0xb36c('0x13')],_0x327faa);_0x1a8259(_0x2f8a62[_0xb36c('0x11')](0x1f4,_0x51f38f[_0xb36c('0x13')]));});});};
\ No newline at end of file
index 0191a79..f7c25e4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x34e8=['../../config/environment','./intDeskConfiguration.controller','get','index','/:id','isAuthenticated','show','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','/:id/tags','getTags','post','create','put','update','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x40e95c,_0x23111c){var _0x4af391=function(_0x247487){while(--_0x247487){_0x40e95c['push'](_0x40e95c['shift']());}};_0x4af391(++_0x23111c);}(_0x34e8,0x12c));var _0x834e=function(_0x3bec3d,_0x12e335){_0x3bec3d=_0x3bec3d-0x0;var _0x13b32a=_0x34e8[_0x3bec3d];return _0x13b32a;};'use strict';var multer=require(_0x834e('0x0'));var util=require(_0x834e('0x1'));var path=require(_0x834e('0x2'));var timeout=require(_0x834e('0x3'));var express=require('express');var router=express[_0x834e('0x4')]();var fs_extra=require(_0x834e('0x5'));var auth=require(_0x834e('0x6'));var interaction=require(_0x834e('0x7'));var config=require(_0x834e('0x8'));var controller=require(_0x834e('0x9'));router[_0x834e('0xa')]('/',auth['isAuthenticated'](),controller[_0x834e('0xb')]);router['get'](_0x834e('0xc'),auth[_0x834e('0xd')](),controller[_0x834e('0xe')]);router[_0x834e('0xa')](_0x834e('0xf'),auth[_0x834e('0xd')](),controller[_0x834e('0x10')]);router[_0x834e('0xa')](_0x834e('0x11'),auth[_0x834e('0xd')](),controller[_0x834e('0x12')]);router[_0x834e('0xa')](_0x834e('0x13'),auth[_0x834e('0xd')](),controller[_0x834e('0x14')]);router[_0x834e('0xa')](_0x834e('0x15'),auth['isAuthenticated'](),controller[_0x834e('0x16')]);router[_0x834e('0x17')]('/',auth['isAuthenticated'](),controller[_0x834e('0x18')]);router[_0x834e('0x17')](_0x834e('0x15'),auth[_0x834e('0xd')](),controller['setTags']);router[_0x834e('0x19')](_0x834e('0xc'),auth['isAuthenticated'](),controller[_0x834e('0x1a')]);router['delete'](_0x834e('0xc'),auth[_0x834e('0xd')](),controller['destroy']);module[_0x834e('0x1b')]=router;
\ No newline at end of file
+var _0x9c44=['destroy','exports','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','./intDeskConfiguration.controller','isAuthenticated','index','get','/:id','/:id/fields','getFields','getSubjects','/:id/descriptions','/:id/tags','post','setTags','put','update'];(function(_0x13d6d4,_0x466bfe){var _0x4fe709=function(_0x4e40ce){while(--_0x4e40ce){_0x13d6d4['push'](_0x13d6d4['shift']());}};_0x4fe709(++_0x466bfe);}(_0x9c44,0x178));var _0x49c4=function(_0x273c39,_0x1052e6){_0x273c39=_0x273c39-0x0;var _0x46d6b5=_0x9c44[_0x273c39];return _0x46d6b5;};'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');var controller=require(_0x49c4('0x6'));router['get']('/',auth[_0x49c4('0x7')](),controller[_0x49c4('0x8')]);router[_0x49c4('0x9')](_0x49c4('0xa'),auth[_0x49c4('0x7')](),controller['show']);router[_0x49c4('0x9')](_0x49c4('0xb'),auth[_0x49c4('0x7')](),controller[_0x49c4('0xc')]);router['get']('/:id/subjects',auth[_0x49c4('0x7')](),controller[_0x49c4('0xd')]);router['get'](_0x49c4('0xe'),auth[_0x49c4('0x7')](),controller['getDescriptions']);router['get'](_0x49c4('0xf'),auth[_0x49c4('0x7')](),controller['getTags']);router[_0x49c4('0x10')]('/',auth[_0x49c4('0x7')](),controller['create']);router[_0x49c4('0x10')](_0x49c4('0xf'),auth[_0x49c4('0x7')](),controller[_0x49c4('0x11')]);router[_0x49c4('0x12')](_0x49c4('0xa'),auth[_0x49c4('0x7')](),controller[_0x49c4('0x13')]);router['delete'](_0x49c4('0xa'),auth[_0x49c4('0x7')](),controller[_0x49c4('0x14')]);module[_0x49c4('0x15')]=router;
\ No newline at end of file
index 6e2703c..405ce8f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7c45=['STRING','exports'];(function(_0x1927c5,_0x544a26){var _0x3104fe=function(_0x442bc3){while(--_0x442bc3){_0x1927c5['push'](_0x1927c5['shift']());}};_0x3104fe(++_0x544a26);}(_0x7c45,0xb7));var _0x57c4=function(_0x11c573,_0x9e7c6e){_0x11c573=_0x11c573-0x0;var _0x6b72de=_0x7c45[_0x11c573];return _0x6b72de;};'use strict';var Sequelize=require('sequelize');module[_0x57c4('0x0')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x57c4('0x1')]}};
\ No newline at end of file
+var _0xb486=['STRING','sequelize'];(function(_0x262aa4,_0x458481){var _0x5383af=function(_0x28b450){while(--_0x28b450){_0x262aa4['push'](_0x262aa4['shift']());}};_0x5383af(++_0x458481);}(_0xb486,0x143));var _0x6b48=function(_0x28f196,_0x236a06){_0x28f196=_0x28f196-0x0;var _0x3b6af9=_0xb486[_0x28f196];return _0x3b6af9;};'use strict';var Sequelize=require(_0x6b48('0x0'));module['exports']={'name':{'type':Sequelize[_0x6b48('0x1')]},'description':{'type':Sequelize[_0x6b48('0x1')]}};
\ No newline at end of file
index a50a5a2..9215454 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd381=['path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','update','then','destroy','error','stack','name','map','DeskConfiguration','rawAttributes','fieldName','key','model','query','keys','intersection','fields','attributes','length','nolimit','order','sort','filters','pick','where','merge','type','VIRTUAL','filter','options','includeAll','include','findAll','catch','show','params','find','create','body','getFields','findOne','DeskField','getSubjects','getDescriptions','hasOwnProperty','getTags','setTags','ids','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache'];(function(_0x32527c,_0x24a93f){var _0x1270c7=function(_0x56c709){while(--_0x56c709){_0x32527c['push'](_0x32527c['shift']());}};_0x1270c7(++_0x24a93f);}(_0xd381,0x193));var _0x1d38=function(_0x97c6ea,_0x4cffce){_0x97c6ea=_0x97c6ea-0x0;var _0x2d7f50=_0xd381[_0x97c6ea];return _0x2d7f50;};'use strict';var emlformat=require(_0x1d38('0x0'));var rimraf=require(_0x1d38('0x1'));var zipdir=require(_0x1d38('0x2'));var jsonpatch=require(_0x1d38('0x3'));var rp=require(_0x1d38('0x4'));var moment=require('moment');var BPromise=require(_0x1d38('0x5'));var Mustache=require(_0x1d38('0x6'));var util=require('util');var path=require(_0x1d38('0x7'));var sox=require(_0x1d38('0x8'));var csv=require(_0x1d38('0x9'));var ejs=require(_0x1d38('0xa'));var fs=require('fs');var fs_extra=require(_0x1d38('0xb'));var _=require(_0x1d38('0xc'));var squel=require('squel');var crypto=require(_0x1d38('0xd'));var jsforce=require(_0x1d38('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x1d38('0x9'));var querystring=require(_0x1d38('0xf'));var Papa=require(_0x1d38('0x10'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x1d38('0x11'));var as=require(_0x1d38('0x12'));var hardwareService=require(_0x1d38('0x13'));var logger=require(_0x1d38('0x14'))(_0x1d38('0x15'));var utils=require('../../config/utils');var config=require(_0x1d38('0x16'));var licenseUtil=require(_0x1d38('0x17'));var db=require(_0x1d38('0x18'))['db'];function respondWithStatusCode(_0x3e50b5,_0x28fa6c){_0x28fa6c=_0x28fa6c||0xcc;return function(_0x87ce51){if(_0x87ce51){return _0x3e50b5[_0x1d38('0x19')](_0x28fa6c);}return _0x3e50b5[_0x1d38('0x1a')](_0x28fa6c)[_0x1d38('0x1b')]();};}function respondWithResult(_0x13cf3f,_0x46bda1){_0x46bda1=_0x46bda1||0xc8;return function(_0x2927c6){if(_0x2927c6){return _0x13cf3f['status'](_0x46bda1)[_0x1d38('0x1c')](_0x2927c6);}};}function respondWithFilteredResult(_0x497869,_0x3fb2c0){return function(_0x22fc1e){if(_0x22fc1e){var _0x129a45=typeof _0x3fb2c0[_0x1d38('0x1d')]===_0x1d38('0x1e')&&typeof _0x3fb2c0[_0x1d38('0x1f')]===_0x1d38('0x1e');var _0x4b355f=_0x22fc1e[_0x1d38('0x20')];var _0x32455a=_0x129a45?0x0:_0x3fb2c0[_0x1d38('0x1d')];var _0x4313e3=_0x129a45?_0x22fc1e[_0x1d38('0x20')]:_0x3fb2c0['offset']+_0x3fb2c0[_0x1d38('0x1f')];var _0x47225b;if(_0x4313e3>=_0x4b355f){_0x4313e3=_0x4b355f;_0x47225b=0xc8;}else{_0x47225b=0xce;}_0x497869[_0x1d38('0x1a')](_0x47225b);return _0x497869['set'](_0x1d38('0x21'),_0x32455a+'-'+_0x4313e3+'/'+_0x4b355f)[_0x1d38('0x1c')](_0x22fc1e);}return null;};}function patchUpdates(_0x335673){return function(_0x6f0d99){try{jsonpatch[_0x1d38('0x22')](_0x6f0d99,_0x335673,!![]);}catch(_0x4218aa){return BPromise['reject'](_0x4218aa);}return _0x6f0d99['save']();};}function saveUpdates(_0x2e9f41,_0x297462){return function(_0x2916b8){if(_0x2916b8){return _0x2916b8[_0x1d38('0x23')](_0x2e9f41)[_0x1d38('0x24')](function(_0x35685d){return _0x35685d;});}return null;};}function removeEntity(_0x270cd7,_0x2c4734){return function(_0x497d03){if(_0x497d03){return _0x497d03[_0x1d38('0x25')]()[_0x1d38('0x24')](function(){_0x270cd7[_0x1d38('0x1a')](0xcc)[_0x1d38('0x1b')]();});}};}function handleEntityNotFound(_0x265a96,_0x56e1f2){return function(_0x48f50f){if(!_0x48f50f){_0x265a96[_0x1d38('0x19')](0x194);}return _0x48f50f;};}function handleError(_0x555410,_0x9806a3){_0x9806a3=_0x9806a3||0x1f4;return function(_0x1f57e6){logger[_0x1d38('0x26')](_0x1f57e6[_0x1d38('0x27')]);if(_0x1f57e6[_0x1d38('0x28')]){delete _0x1f57e6[_0x1d38('0x28')];}_0x555410[_0x1d38('0x1a')](_0x9806a3)['send'](_0x1f57e6);};}exports['index']=function(_0x393713,_0x2424b1){var _0x4d4003={},_0x2c60b2={},_0x5b407c={'count':0x0,'rows':[]};var _0x5d201d=_[_0x1d38('0x29')](db[_0x1d38('0x2a')][_0x1d38('0x2b')],function(_0x455c77){return{'name':_0x455c77[_0x1d38('0x2c')],'type':_0x455c77['type'][_0x1d38('0x2d')]};});_0x2c60b2[_0x1d38('0x2e')]=_['map'](_0x5d201d,_0x1d38('0x28'));_0x2c60b2[_0x1d38('0x2f')]=_[_0x1d38('0x30')](_0x393713['query']);_0x2c60b2['filters']=_['intersection'](_0x2c60b2[_0x1d38('0x2e')],_0x2c60b2['query']);_0x4d4003['attributes']=_[_0x1d38('0x31')](_0x2c60b2['model'],qs[_0x1d38('0x32')](_0x393713[_0x1d38('0x2f')]['fields']));_0x4d4003[_0x1d38('0x33')]=_0x4d4003[_0x1d38('0x33')][_0x1d38('0x34')]?_0x4d4003[_0x1d38('0x33')]:_0x2c60b2[_0x1d38('0x2e')];if(!_0x393713[_0x1d38('0x2f')]['hasOwnProperty'](_0x1d38('0x35'))){_0x4d4003[_0x1d38('0x1f')]=qs[_0x1d38('0x1f')](_0x393713[_0x1d38('0x2f')][_0x1d38('0x1f')]);_0x4d4003['offset']=qs[_0x1d38('0x1d')](_0x393713['query'][_0x1d38('0x1d')]);}_0x4d4003[_0x1d38('0x36')]=qs[_0x1d38('0x37')](_0x393713[_0x1d38('0x2f')][_0x1d38('0x37')]);_0x4d4003['where']=qs[_0x1d38('0x38')](_[_0x1d38('0x39')](_0x393713[_0x1d38('0x2f')],_0x2c60b2['filters']),_0x5d201d);if(_0x393713[_0x1d38('0x2f')]['filter']){_0x4d4003[_0x1d38('0x3a')]=_[_0x1d38('0x3b')](_0x4d4003[_0x1d38('0x3a')],{'$or':_[_0x1d38('0x29')](_0x5d201d,function(_0x8d3701){if(_0x8d3701[_0x1d38('0x3c')]!==_0x1d38('0x3d')){var _0x2a6ae7={};_0x2a6ae7[_0x8d3701[_0x1d38('0x28')]]={'$like':'%'+_0x393713['query'][_0x1d38('0x3e')]+'%'};return _0x2a6ae7;}})});}_0x4d4003=_['merge']({},_0x4d4003,_0x393713[_0x1d38('0x3f')]);var _0x1486c2={'where':_0x4d4003['where']};return db[_0x1d38('0x2a')][_0x1d38('0x20')](_0x1486c2)[_0x1d38('0x24')](function(_0x81eb9d){_0x5b407c['count']=_0x81eb9d;if(_0x393713[_0x1d38('0x2f')][_0x1d38('0x40')]){_0x4d4003[_0x1d38('0x41')]=[{'all':!![]}];}return db[_0x1d38('0x2a')][_0x1d38('0x42')](_0x4d4003);})['then'](function(_0x50fc53){_0x5b407c['rows']=_0x50fc53;return _0x5b407c;})[_0x1d38('0x24')](respondWithFilteredResult(_0x2424b1,_0x4d4003))[_0x1d38('0x43')](handleError(_0x2424b1,null));};exports[_0x1d38('0x44')]=function(_0xa9142e,_0x12371c){var _0x7711a5={'raw':![],'where':{'id':_0xa9142e[_0x1d38('0x45')]['id']}},_0x46a77b={};_0x46a77b[_0x1d38('0x2e')]=_[_0x1d38('0x30')](db[_0x1d38('0x2a')][_0x1d38('0x2b')]);_0x46a77b[_0x1d38('0x2f')]=_['keys'](_0xa9142e[_0x1d38('0x2f')]);_0x46a77b[_0x1d38('0x38')]=_['intersection'](_0x46a77b[_0x1d38('0x2e')],_0x46a77b[_0x1d38('0x2f')]);_0x7711a5['attributes']=_['intersection'](_0x46a77b[_0x1d38('0x2e')],qs['fields'](_0xa9142e[_0x1d38('0x2f')]['fields']));_0x7711a5[_0x1d38('0x33')]=_0x7711a5[_0x1d38('0x33')][_0x1d38('0x34')]?_0x7711a5[_0x1d38('0x33')]:_0x46a77b['model'];if(_0xa9142e['query'][_0x1d38('0x40')]){_0x7711a5['include']=[{'all':!![]}];}_0x7711a5=_[_0x1d38('0x3b')]({},_0x7711a5,_0xa9142e[_0x1d38('0x3f')]);return db['DeskConfiguration'][_0x1d38('0x46')](_0x7711a5)[_0x1d38('0x24')](handleEntityNotFound(_0x12371c,null))[_0x1d38('0x24')](respondWithResult(_0x12371c,null))[_0x1d38('0x43')](handleError(_0x12371c,null));};exports[_0x1d38('0x47')]=function(_0xa3eb42,_0x2cd841){return db[_0x1d38('0x2a')]['create'](_0xa3eb42['body'],{})['then'](respondWithResult(_0x2cd841,0xc9))[_0x1d38('0x43')](handleError(_0x2cd841,null));};exports['update']=function(_0x4e515f,_0x541128){if(_0x4e515f[_0x1d38('0x48')]['id']){delete _0x4e515f[_0x1d38('0x48')]['id'];}return db[_0x1d38('0x2a')][_0x1d38('0x46')]({'where':{'id':_0x4e515f[_0x1d38('0x45')]['id']}})[_0x1d38('0x24')](handleEntityNotFound(_0x541128,null))[_0x1d38('0x24')](saveUpdates(_0x4e515f[_0x1d38('0x48')],null))[_0x1d38('0x24')](respondWithResult(_0x541128,null))[_0x1d38('0x43')](handleError(_0x541128,null));};exports[_0x1d38('0x25')]=function(_0x4ebed7,_0x8ff8c9){return db[_0x1d38('0x2a')][_0x1d38('0x46')]({'where':{'id':_0x4ebed7[_0x1d38('0x45')]['id']}})['then'](handleEntityNotFound(_0x8ff8c9,null))[_0x1d38('0x24')](removeEntity(_0x8ff8c9,null))['catch'](handleError(_0x8ff8c9,null));};exports[_0x1d38('0x49')]=function(_0x19b8b0,_0xa8fcea,_0xe57328){var _0x2db94a={};var _0x9f9f4e={};var _0x2be629;var _0x5b4c61;return db[_0x1d38('0x2a')][_0x1d38('0x4a')]({'where':{'id':_0x19b8b0[_0x1d38('0x45')]['id']}})[_0x1d38('0x24')](handleEntityNotFound(_0xa8fcea,null))[_0x1d38('0x24')](function(_0x18aeca){if(_0x18aeca){_0x2be629=_0x18aeca;_0x9f9f4e[_0x1d38('0x2e')]=_['keys'](db[_0x1d38('0x4b')][_0x1d38('0x2b')]);_0x9f9f4e['query']=_[_0x1d38('0x30')](_0x19b8b0[_0x1d38('0x2f')]);_0x9f9f4e[_0x1d38('0x38')]=_['intersection'](_0x9f9f4e[_0x1d38('0x2e')],_0x9f9f4e[_0x1d38('0x2f')]);_0x2db94a['attributes']=_[_0x1d38('0x31')](_0x9f9f4e['model'],qs[_0x1d38('0x32')](_0x19b8b0[_0x1d38('0x2f')][_0x1d38('0x32')]));_0x2db94a['attributes']=_0x2db94a[_0x1d38('0x33')]['length']?_0x2db94a['attributes']:_0x9f9f4e['model'];_0x2db94a['order']=qs['sort'](_0x19b8b0[_0x1d38('0x2f')][_0x1d38('0x37')]);_0x2db94a[_0x1d38('0x3a')]=qs['filters'](_[_0x1d38('0x39')](_0x19b8b0['query'],_0x9f9f4e['filters']));if(_0x19b8b0[_0x1d38('0x2f')]['filter']){_0x2db94a[_0x1d38('0x3a')]=_[_0x1d38('0x3b')](_0x2db94a[_0x1d38('0x3a')],{'$or':_[_0x1d38('0x29')](_0x2db94a[_0x1d38('0x33')],function(_0x377dc5){var _0xfd817d={};_0xfd817d[_0x377dc5]={'$like':'%'+_0x19b8b0[_0x1d38('0x2f')][_0x1d38('0x3e')]+'%'};return _0xfd817d;})});}_0x2db94a=_[_0x1d38('0x3b')]({},_0x2db94a,_0x19b8b0[_0x1d38('0x3f')]);return _0x2be629[_0x1d38('0x49')](_0x2db94a);}})[_0x1d38('0x24')](function(_0x58d6b5){if(_0x58d6b5){_0x5b4c61=_0x58d6b5[_0x1d38('0x34')];if(!_0x19b8b0[_0x1d38('0x2f')]['hasOwnProperty'](_0x1d38('0x35'))){_0x2db94a[_0x1d38('0x1f')]=qs[_0x1d38('0x1f')](_0x19b8b0[_0x1d38('0x2f')][_0x1d38('0x1f')]);_0x2db94a[_0x1d38('0x1d')]=qs[_0x1d38('0x1d')](_0x19b8b0['query']['offset']);}return _0x2be629['getFields'](_0x2db94a);}})[_0x1d38('0x24')](function(_0x2da43d){if(_0x2da43d){return _0x2da43d?{'count':_0x5b4c61,'rows':_0x2da43d}:null;}})[_0x1d38('0x24')](respondWithResult(_0xa8fcea,null))[_0x1d38('0x43')](handleError(_0xa8fcea,null));};exports[_0x1d38('0x4c')]=function(_0x3fccbd,_0x3b5e27,_0xb88f8f){var _0x1eefe7={};var _0xb1aff4={};var _0x22df5f;var _0x4190c3;return db[_0x1d38('0x2a')][_0x1d38('0x4a')]({'where':{'id':_0x3fccbd['params']['id']}})[_0x1d38('0x24')](handleEntityNotFound(_0x3b5e27,null))[_0x1d38('0x24')](function(_0x3be62d){if(_0x3be62d){_0x22df5f=_0x3be62d;_0xb1aff4[_0x1d38('0x2e')]=_[_0x1d38('0x30')](db[_0x1d38('0x4b')][_0x1d38('0x2b')]);_0xb1aff4[_0x1d38('0x2f')]=_[_0x1d38('0x30')](_0x3fccbd[_0x1d38('0x2f')]);_0xb1aff4[_0x1d38('0x38')]=_[_0x1d38('0x31')](_0xb1aff4[_0x1d38('0x2e')],_0xb1aff4['query']);_0x1eefe7[_0x1d38('0x33')]=_['intersection'](_0xb1aff4[_0x1d38('0x2e')],qs['fields'](_0x3fccbd[_0x1d38('0x2f')]['fields']));_0x1eefe7['attributes']=_0x1eefe7[_0x1d38('0x33')]['length']?_0x1eefe7[_0x1d38('0x33')]:_0xb1aff4['model'];_0x1eefe7[_0x1d38('0x36')]=qs[_0x1d38('0x37')](_0x3fccbd[_0x1d38('0x2f')][_0x1d38('0x37')]);_0x1eefe7[_0x1d38('0x3a')]=qs[_0x1d38('0x38')](_[_0x1d38('0x39')](_0x3fccbd[_0x1d38('0x2f')],_0xb1aff4[_0x1d38('0x38')]));if(_0x3fccbd[_0x1d38('0x2f')][_0x1d38('0x3e')]){_0x1eefe7['where']=_[_0x1d38('0x3b')](_0x1eefe7[_0x1d38('0x3a')],{'$or':_['map'](_0x1eefe7[_0x1d38('0x33')],function(_0x50bcc9){var _0x36429d={};_0x36429d[_0x50bcc9]={'$like':'%'+_0x3fccbd[_0x1d38('0x2f')][_0x1d38('0x3e')]+'%'};return _0x36429d;})});}_0x1eefe7=_[_0x1d38('0x3b')]({},_0x1eefe7,_0x3fccbd[_0x1d38('0x3f')]);return _0x22df5f[_0x1d38('0x4c')](_0x1eefe7);}})[_0x1d38('0x24')](function(_0x321b9a){if(_0x321b9a){_0x4190c3=_0x321b9a[_0x1d38('0x34')];if(!_0x3fccbd[_0x1d38('0x2f')]['hasOwnProperty']('nolimit')){_0x1eefe7[_0x1d38('0x1f')]=qs['limit'](_0x3fccbd[_0x1d38('0x2f')][_0x1d38('0x1f')]);_0x1eefe7[_0x1d38('0x1d')]=qs[_0x1d38('0x1d')](_0x3fccbd['query'][_0x1d38('0x1d')]);}return _0x22df5f[_0x1d38('0x4c')](_0x1eefe7);}})[_0x1d38('0x24')](function(_0x2720a9){if(_0x2720a9){return _0x2720a9?{'count':_0x4190c3,'rows':_0x2720a9}:null;}})[_0x1d38('0x24')](respondWithResult(_0x3b5e27,null))[_0x1d38('0x43')](handleError(_0x3b5e27,null));};exports[_0x1d38('0x4d')]=function(_0x36f90c,_0x4d140a,_0x28c461){var _0x1ebbd4={};var _0x56073d={};var _0x43aa50;var _0x7b585f;return db[_0x1d38('0x2a')][_0x1d38('0x4a')]({'where':{'id':_0x36f90c[_0x1d38('0x45')]['id']}})[_0x1d38('0x24')](handleEntityNotFound(_0x4d140a,null))[_0x1d38('0x24')](function(_0x39489c){if(_0x39489c){_0x43aa50=_0x39489c;_0x56073d['model']=_[_0x1d38('0x30')](db[_0x1d38('0x4b')][_0x1d38('0x2b')]);_0x56073d['query']=_['keys'](_0x36f90c[_0x1d38('0x2f')]);_0x56073d[_0x1d38('0x38')]=_[_0x1d38('0x31')](_0x56073d[_0x1d38('0x2e')],_0x56073d[_0x1d38('0x2f')]);_0x1ebbd4[_0x1d38('0x33')]=_['intersection'](_0x56073d[_0x1d38('0x2e')],qs[_0x1d38('0x32')](_0x36f90c[_0x1d38('0x2f')][_0x1d38('0x32')]));_0x1ebbd4[_0x1d38('0x33')]=_0x1ebbd4[_0x1d38('0x33')]['length']?_0x1ebbd4[_0x1d38('0x33')]:_0x56073d[_0x1d38('0x2e')];_0x1ebbd4[_0x1d38('0x36')]=qs['sort'](_0x36f90c[_0x1d38('0x2f')][_0x1d38('0x37')]);_0x1ebbd4[_0x1d38('0x3a')]=qs['filters'](_[_0x1d38('0x39')](_0x36f90c[_0x1d38('0x2f')],_0x56073d[_0x1d38('0x38')]));if(_0x36f90c[_0x1d38('0x2f')][_0x1d38('0x3e')]){_0x1ebbd4[_0x1d38('0x3a')]=_[_0x1d38('0x3b')](_0x1ebbd4['where'],{'$or':_['map'](_0x1ebbd4[_0x1d38('0x33')],function(_0x5d510a){var _0x5c9876={};_0x5c9876[_0x5d510a]={'$like':'%'+_0x36f90c[_0x1d38('0x2f')][_0x1d38('0x3e')]+'%'};return _0x5c9876;})});}_0x1ebbd4=_[_0x1d38('0x3b')]({},_0x1ebbd4,_0x36f90c['options']);return _0x43aa50[_0x1d38('0x4d')](_0x1ebbd4);}})[_0x1d38('0x24')](function(_0x3382b9){if(_0x3382b9){_0x7b585f=_0x3382b9[_0x1d38('0x34')];if(!_0x36f90c[_0x1d38('0x2f')][_0x1d38('0x4e')]('nolimit')){_0x1ebbd4[_0x1d38('0x1f')]=qs[_0x1d38('0x1f')](_0x36f90c[_0x1d38('0x2f')][_0x1d38('0x1f')]);_0x1ebbd4[_0x1d38('0x1d')]=qs[_0x1d38('0x1d')](_0x36f90c[_0x1d38('0x2f')][_0x1d38('0x1d')]);}return _0x43aa50['getDescriptions'](_0x1ebbd4);}})[_0x1d38('0x24')](function(_0x1fed29){if(_0x1fed29){return _0x1fed29?{'count':_0x7b585f,'rows':_0x1fed29}:null;}})['then'](respondWithResult(_0x4d140a,null))['catch'](handleError(_0x4d140a,null));};exports[_0x1d38('0x4f')]=function(_0x3a0b9a,_0x43fe97,_0x4ddc50){var _0x911e81={};var _0x1e5a22={};var _0x2e35ab;var _0x380c27;return db[_0x1d38('0x2a')]['findOne']({'where':{'id':_0x3a0b9a['params']['id']}})['then'](handleEntityNotFound(_0x43fe97,null))[_0x1d38('0x24')](function(_0x5be9b4){if(_0x5be9b4){_0x2e35ab=_0x5be9b4;_0x1e5a22[_0x1d38('0x2e')]=_[_0x1d38('0x30')](db['Tag'][_0x1d38('0x2b')]);_0x1e5a22['query']=_['keys'](_0x3a0b9a['query']);_0x1e5a22[_0x1d38('0x38')]=_['intersection'](_0x1e5a22[_0x1d38('0x2e')],_0x1e5a22[_0x1d38('0x2f')]);_0x911e81['attributes']=_['intersection'](_0x1e5a22[_0x1d38('0x2e')],qs['fields'](_0x3a0b9a[_0x1d38('0x2f')]['fields']));_0x911e81['attributes']=_0x911e81[_0x1d38('0x33')]['length']?_0x911e81['attributes']:_0x1e5a22[_0x1d38('0x2e')];_0x911e81['order']=qs[_0x1d38('0x37')](_0x3a0b9a['query']['sort']);_0x911e81[_0x1d38('0x3a')]=qs[_0x1d38('0x38')](_['pick'](_0x3a0b9a['query'],_0x1e5a22['filters']));if(_0x3a0b9a[_0x1d38('0x2f')][_0x1d38('0x3e')]){_0x911e81['where']=_[_0x1d38('0x3b')](_0x911e81[_0x1d38('0x3a')],{'$or':_['map'](_0x911e81['attributes'],function(_0x5a9c7a){var _0x273c13={};_0x273c13[_0x5a9c7a]={'$like':'%'+_0x3a0b9a['query'][_0x1d38('0x3e')]+'%'};return _0x273c13;})});}_0x911e81=_[_0x1d38('0x3b')]({},_0x911e81,_0x3a0b9a['options']);return _0x2e35ab[_0x1d38('0x4f')](_0x911e81);}})[_0x1d38('0x24')](function(_0x564ac1){if(_0x564ac1){_0x380c27=_0x564ac1['length'];if(!_0x3a0b9a[_0x1d38('0x2f')][_0x1d38('0x4e')](_0x1d38('0x35'))){_0x911e81[_0x1d38('0x1f')]=qs['limit'](_0x3a0b9a[_0x1d38('0x2f')][_0x1d38('0x1f')]);_0x911e81[_0x1d38('0x1d')]=qs['offset'](_0x3a0b9a[_0x1d38('0x2f')][_0x1d38('0x1d')]);}return _0x2e35ab[_0x1d38('0x4f')](_0x911e81);}})[_0x1d38('0x24')](function(_0x2bc901){if(_0x2bc901){return _0x2bc901?{'count':_0x380c27,'rows':_0x2bc901}:null;}})[_0x1d38('0x24')](respondWithResult(_0x43fe97,null))[_0x1d38('0x43')](handleError(_0x43fe97,null));};exports[_0x1d38('0x50')]=function(_0xb5e030,_0x4e61d4,_0xe11e47){if(_0xb5e030[_0x1d38('0x48')]['id']){delete _0xb5e030[_0x1d38('0x48')]['id'];}return db[_0x1d38('0x2a')][_0x1d38('0x4a')]({'where':{'id':_0xb5e030[_0x1d38('0x45')]['id']}})[_0x1d38('0x24')](handleEntityNotFound(_0x4e61d4,null))[_0x1d38('0x24')](function(_0x1f8125){if(_0x1f8125){return _0x1f8125[_0x1d38('0x50')](_0xb5e030[_0x1d38('0x48')][_0x1d38('0x51')]||[]);}return null;})[_0x1d38('0x24')](respondWithResult(_0x4e61d4,null))[_0x1d38('0x43')](handleError(_0x4e61d4,null));};
\ No newline at end of file
+var _0xc297=['limit','undefined','count','Content-Range','apply','reject','save','update','then','destroy','sendStatus','error','stack','name','send','index','map','DeskConfiguration','rawAttributes','key','model','query','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','merge','type','VIRTUAL','filter','options','includeAll','findAll','keys','include','find','catch','create','body','getFields','params','DeskField','getSubjects','findOne','getDescriptions','getTags','ids','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset'];(function(_0x46969d,_0x1fc7bb){var _0x32d657=function(_0x107fde){while(--_0x107fde){_0x46969d['push'](_0x46969d['shift']());}};_0x32d657(++_0x1fc7bb);}(_0xc297,0x18e));var _0x7c29=function(_0x3a78a0,_0x44985f){_0x3a78a0=_0x3a78a0-0x0;var _0x48e917=_0xc297[_0x3a78a0];return _0x48e917;};'use strict';var emlformat=require(_0x7c29('0x0'));var rimraf=require(_0x7c29('0x1'));var zipdir=require(_0x7c29('0x2'));var jsonpatch=require(_0x7c29('0x3'));var rp=require(_0x7c29('0x4'));var moment=require(_0x7c29('0x5'));var BPromise=require(_0x7c29('0x6'));var Mustache=require(_0x7c29('0x7'));var util=require(_0x7c29('0x8'));var path=require(_0x7c29('0x9'));var sox=require(_0x7c29('0xa'));var csv=require('to-csv');var ejs=require(_0x7c29('0xb'));var fs=require('fs');var fs_extra=require(_0x7c29('0xc'));var _=require(_0x7c29('0xd'));var squel=require(_0x7c29('0xe'));var crypto=require(_0x7c29('0xf'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x7c29('0x10'));var querystring=require(_0x7c29('0x11'));var Papa=require('papaparse');var Redis=require(_0x7c29('0x12'));var authService=require(_0x7c29('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x7c29('0x14'));var hardwareService=require(_0x7c29('0x15'));var logger=require(_0x7c29('0x16'))(_0x7c29('0x17'));var utils=require(_0x7c29('0x18'));var config=require(_0x7c29('0x19'));var licenseUtil=require(_0x7c29('0x1a'));var db=require(_0x7c29('0x1b'))['db'];function respondWithStatusCode(_0x3297c4,_0x2f3ae7){_0x2f3ae7=_0x2f3ae7||0xcc;return function(_0x3c33ec){if(_0x3c33ec){return _0x3297c4['sendStatus'](_0x2f3ae7);}return _0x3297c4[_0x7c29('0x1c')](_0x2f3ae7)[_0x7c29('0x1d')]();};}function respondWithResult(_0x5072a6,_0x1b99d9){_0x1b99d9=_0x1b99d9||0xc8;return function(_0x292653){if(_0x292653){return _0x5072a6[_0x7c29('0x1c')](_0x1b99d9)[_0x7c29('0x1e')](_0x292653);}};}function respondWithFilteredResult(_0xf5dce6,_0x3ce0d4){return function(_0x4fe9e0){if(_0x4fe9e0){var _0xf8a83a=typeof _0x3ce0d4[_0x7c29('0x1f')]==='undefined'&&typeof _0x3ce0d4[_0x7c29('0x20')]===_0x7c29('0x21');var _0x5782d6=_0x4fe9e0[_0x7c29('0x22')];var _0x5403b7=_0xf8a83a?0x0:_0x3ce0d4[_0x7c29('0x1f')];var _0xab9401=_0xf8a83a?_0x4fe9e0[_0x7c29('0x22')]:_0x3ce0d4['offset']+_0x3ce0d4[_0x7c29('0x20')];var _0xae8b7c;if(_0xab9401>=_0x5782d6){_0xab9401=_0x5782d6;_0xae8b7c=0xc8;}else{_0xae8b7c=0xce;}_0xf5dce6[_0x7c29('0x1c')](_0xae8b7c);return _0xf5dce6['set'](_0x7c29('0x23'),_0x5403b7+'-'+_0xab9401+'/'+_0x5782d6)[_0x7c29('0x1e')](_0x4fe9e0);}return null;};}function patchUpdates(_0x39c052){return function(_0x2f1321){try{jsonpatch[_0x7c29('0x24')](_0x2f1321,_0x39c052,!![]);}catch(_0x381193){return BPromise[_0x7c29('0x25')](_0x381193);}return _0x2f1321[_0x7c29('0x26')]();};}function saveUpdates(_0x1f4315,_0x3cd84a){return function(_0x45147f){if(_0x45147f){return _0x45147f[_0x7c29('0x27')](_0x1f4315)[_0x7c29('0x28')](function(_0x5ac746){return _0x5ac746;});}return null;};}function removeEntity(_0x15689f,_0x1897f4){return function(_0x138ae6){if(_0x138ae6){return _0x138ae6[_0x7c29('0x29')]()[_0x7c29('0x28')](function(){_0x15689f[_0x7c29('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x499340,_0x23802f){return function(_0x40bb5b){if(!_0x40bb5b){_0x499340[_0x7c29('0x2a')](0x194);}return _0x40bb5b;};}function handleError(_0x11745d,_0x499d33){_0x499d33=_0x499d33||0x1f4;return function(_0x17745f){logger[_0x7c29('0x2b')](_0x17745f[_0x7c29('0x2c')]);if(_0x17745f[_0x7c29('0x2d')]){delete _0x17745f['name'];}_0x11745d[_0x7c29('0x1c')](_0x499d33)[_0x7c29('0x2e')](_0x17745f);};}exports[_0x7c29('0x2f')]=function(_0x45f563,_0x252920){var _0xa3707a={},_0x478e43={},_0x5aba34={'count':0x0,'rows':[]};var _0x5b66a9=_[_0x7c29('0x30')](db[_0x7c29('0x31')][_0x7c29('0x32')],function(_0x3910cc){return{'name':_0x3910cc['fieldName'],'type':_0x3910cc['type'][_0x7c29('0x33')]};});_0x478e43[_0x7c29('0x34')]=_[_0x7c29('0x30')](_0x5b66a9,_0x7c29('0x2d'));_0x478e43['query']=_['keys'](_0x45f563[_0x7c29('0x35')]);_0x478e43['filters']=_[_0x7c29('0x36')](_0x478e43['model'],_0x478e43[_0x7c29('0x35')]);_0xa3707a['attributes']=_['intersection'](_0x478e43[_0x7c29('0x34')],qs[_0x7c29('0x37')](_0x45f563['query'][_0x7c29('0x37')]));_0xa3707a['attributes']=_0xa3707a[_0x7c29('0x38')][_0x7c29('0x39')]?_0xa3707a['attributes']:_0x478e43[_0x7c29('0x34')];if(!_0x45f563['query'][_0x7c29('0x3a')](_0x7c29('0x3b'))){_0xa3707a[_0x7c29('0x20')]=qs[_0x7c29('0x20')](_0x45f563['query'][_0x7c29('0x20')]);_0xa3707a[_0x7c29('0x1f')]=qs[_0x7c29('0x1f')](_0x45f563[_0x7c29('0x35')][_0x7c29('0x1f')]);}_0xa3707a[_0x7c29('0x3c')]=qs[_0x7c29('0x3d')](_0x45f563[_0x7c29('0x35')][_0x7c29('0x3d')]);_0xa3707a[_0x7c29('0x3e')]=qs[_0x7c29('0x3f')](_[_0x7c29('0x40')](_0x45f563[_0x7c29('0x35')],_0x478e43[_0x7c29('0x3f')]),_0x5b66a9);if(_0x45f563[_0x7c29('0x35')]['filter']){_0xa3707a[_0x7c29('0x3e')]=_[_0x7c29('0x41')](_0xa3707a[_0x7c29('0x3e')],{'$or':_[_0x7c29('0x30')](_0x5b66a9,function(_0x4703b5){if(_0x4703b5[_0x7c29('0x42')]!==_0x7c29('0x43')){var _0xdd8d76={};_0xdd8d76[_0x4703b5[_0x7c29('0x2d')]]={'$like':'%'+_0x45f563[_0x7c29('0x35')][_0x7c29('0x44')]+'%'};return _0xdd8d76;}})});}_0xa3707a=_[_0x7c29('0x41')]({},_0xa3707a,_0x45f563[_0x7c29('0x45')]);var _0x5a82d1={'where':_0xa3707a[_0x7c29('0x3e')]};return db[_0x7c29('0x31')][_0x7c29('0x22')](_0x5a82d1)[_0x7c29('0x28')](function(_0x345652){_0x5aba34['count']=_0x345652;if(_0x45f563[_0x7c29('0x35')][_0x7c29('0x46')]){_0xa3707a['include']=[{'all':!![]}];}return db[_0x7c29('0x31')][_0x7c29('0x47')](_0xa3707a);})[_0x7c29('0x28')](function(_0x5315a2){_0x5aba34['rows']=_0x5315a2;return _0x5aba34;})['then'](respondWithFilteredResult(_0x252920,_0xa3707a))['catch'](handleError(_0x252920,null));};exports['show']=function(_0x2ad7bf,_0x5b2388){var _0x1bdec5={'raw':![],'where':{'id':_0x2ad7bf['params']['id']}},_0x4fcf5e={};_0x4fcf5e['model']=_[_0x7c29('0x48')](db[_0x7c29('0x31')][_0x7c29('0x32')]);_0x4fcf5e[_0x7c29('0x35')]=_['keys'](_0x2ad7bf['query']);_0x4fcf5e[_0x7c29('0x3f')]=_[_0x7c29('0x36')](_0x4fcf5e[_0x7c29('0x34')],_0x4fcf5e['query']);_0x1bdec5[_0x7c29('0x38')]=_[_0x7c29('0x36')](_0x4fcf5e[_0x7c29('0x34')],qs[_0x7c29('0x37')](_0x2ad7bf[_0x7c29('0x35')][_0x7c29('0x37')]));_0x1bdec5['attributes']=_0x1bdec5[_0x7c29('0x38')][_0x7c29('0x39')]?_0x1bdec5[_0x7c29('0x38')]:_0x4fcf5e['model'];if(_0x2ad7bf[_0x7c29('0x35')][_0x7c29('0x46')]){_0x1bdec5[_0x7c29('0x49')]=[{'all':!![]}];}_0x1bdec5=_[_0x7c29('0x41')]({},_0x1bdec5,_0x2ad7bf[_0x7c29('0x45')]);return db[_0x7c29('0x31')][_0x7c29('0x4a')](_0x1bdec5)['then'](handleEntityNotFound(_0x5b2388,null))[_0x7c29('0x28')](respondWithResult(_0x5b2388,null))[_0x7c29('0x4b')](handleError(_0x5b2388,null));};exports['create']=function(_0x4cacb9,_0x54b5b6){return db['DeskConfiguration'][_0x7c29('0x4c')](_0x4cacb9[_0x7c29('0x4d')],{})[_0x7c29('0x28')](respondWithResult(_0x54b5b6,0xc9))[_0x7c29('0x4b')](handleError(_0x54b5b6,null));};exports['update']=function(_0x569b2c,_0x14f255){if(_0x569b2c['body']['id']){delete _0x569b2c[_0x7c29('0x4d')]['id'];}return db[_0x7c29('0x31')][_0x7c29('0x4a')]({'where':{'id':_0x569b2c['params']['id']}})[_0x7c29('0x28')](handleEntityNotFound(_0x14f255,null))[_0x7c29('0x28')](saveUpdates(_0x569b2c['body'],null))[_0x7c29('0x28')](respondWithResult(_0x14f255,null))[_0x7c29('0x4b')](handleError(_0x14f255,null));};exports['destroy']=function(_0x384c29,_0x38b483){return db['DeskConfiguration'][_0x7c29('0x4a')]({'where':{'id':_0x384c29['params']['id']}})[_0x7c29('0x28')](handleEntityNotFound(_0x38b483,null))['then'](removeEntity(_0x38b483,null))[_0x7c29('0x4b')](handleError(_0x38b483,null));};exports[_0x7c29('0x4e')]=function(_0x3e1605,_0x38a533,_0x2c625b){var _0x1b4177={};var _0x1412a6={};var _0x37823a;var _0x20ca8d;return db[_0x7c29('0x31')]['findOne']({'where':{'id':_0x3e1605[_0x7c29('0x4f')]['id']}})[_0x7c29('0x28')](handleEntityNotFound(_0x38a533,null))[_0x7c29('0x28')](function(_0x3a1378){if(_0x3a1378){_0x37823a=_0x3a1378;_0x1412a6[_0x7c29('0x34')]=_[_0x7c29('0x48')](db[_0x7c29('0x50')][_0x7c29('0x32')]);_0x1412a6[_0x7c29('0x35')]=_['keys'](_0x3e1605[_0x7c29('0x35')]);_0x1412a6[_0x7c29('0x3f')]=_['intersection'](_0x1412a6['model'],_0x1412a6[_0x7c29('0x35')]);_0x1b4177[_0x7c29('0x38')]=_[_0x7c29('0x36')](_0x1412a6[_0x7c29('0x34')],qs[_0x7c29('0x37')](_0x3e1605[_0x7c29('0x35')]['fields']));_0x1b4177[_0x7c29('0x38')]=_0x1b4177[_0x7c29('0x38')][_0x7c29('0x39')]?_0x1b4177[_0x7c29('0x38')]:_0x1412a6[_0x7c29('0x34')];_0x1b4177['order']=qs['sort'](_0x3e1605[_0x7c29('0x35')][_0x7c29('0x3d')]);_0x1b4177[_0x7c29('0x3e')]=qs[_0x7c29('0x3f')](_['pick'](_0x3e1605[_0x7c29('0x35')],_0x1412a6[_0x7c29('0x3f')]));if(_0x3e1605[_0x7c29('0x35')][_0x7c29('0x44')]){_0x1b4177['where']=_['merge'](_0x1b4177[_0x7c29('0x3e')],{'$or':_['map'](_0x1b4177[_0x7c29('0x38')],function(_0xad1168){var _0x19d288={};_0x19d288[_0xad1168]={'$like':'%'+_0x3e1605[_0x7c29('0x35')][_0x7c29('0x44')]+'%'};return _0x19d288;})});}_0x1b4177=_['merge']({},_0x1b4177,_0x3e1605[_0x7c29('0x45')]);return _0x37823a[_0x7c29('0x4e')](_0x1b4177);}})[_0x7c29('0x28')](function(_0x39388c){if(_0x39388c){_0x20ca8d=_0x39388c['length'];if(!_0x3e1605['query'][_0x7c29('0x3a')]('nolimit')){_0x1b4177[_0x7c29('0x20')]=qs[_0x7c29('0x20')](_0x3e1605['query'][_0x7c29('0x20')]);_0x1b4177[_0x7c29('0x1f')]=qs[_0x7c29('0x1f')](_0x3e1605['query'][_0x7c29('0x1f')]);}return _0x37823a[_0x7c29('0x4e')](_0x1b4177);}})[_0x7c29('0x28')](function(_0x1a0658){if(_0x1a0658){return _0x1a0658?{'count':_0x20ca8d,'rows':_0x1a0658}:null;}})[_0x7c29('0x28')](respondWithResult(_0x38a533,null))[_0x7c29('0x4b')](handleError(_0x38a533,null));};exports[_0x7c29('0x51')]=function(_0x1d818f,_0x4d2df9,_0x2aa5fd){var _0x33573f={};var _0x3b0200={};var _0x289265;var _0x4d9b01;return db['DeskConfiguration'][_0x7c29('0x52')]({'where':{'id':_0x1d818f['params']['id']}})[_0x7c29('0x28')](handleEntityNotFound(_0x4d2df9,null))[_0x7c29('0x28')](function(_0x1a8482){if(_0x1a8482){_0x289265=_0x1a8482;_0x3b0200[_0x7c29('0x34')]=_[_0x7c29('0x48')](db['DeskField'][_0x7c29('0x32')]);_0x3b0200['query']=_['keys'](_0x1d818f[_0x7c29('0x35')]);_0x3b0200[_0x7c29('0x3f')]=_[_0x7c29('0x36')](_0x3b0200['model'],_0x3b0200[_0x7c29('0x35')]);_0x33573f[_0x7c29('0x38')]=_['intersection'](_0x3b0200[_0x7c29('0x34')],qs[_0x7c29('0x37')](_0x1d818f[_0x7c29('0x35')]['fields']));_0x33573f[_0x7c29('0x38')]=_0x33573f['attributes'][_0x7c29('0x39')]?_0x33573f[_0x7c29('0x38')]:_0x3b0200[_0x7c29('0x34')];_0x33573f[_0x7c29('0x3c')]=qs[_0x7c29('0x3d')](_0x1d818f[_0x7c29('0x35')][_0x7c29('0x3d')]);_0x33573f['where']=qs[_0x7c29('0x3f')](_[_0x7c29('0x40')](_0x1d818f[_0x7c29('0x35')],_0x3b0200[_0x7c29('0x3f')]));if(_0x1d818f[_0x7c29('0x35')][_0x7c29('0x44')]){_0x33573f[_0x7c29('0x3e')]=_[_0x7c29('0x41')](_0x33573f['where'],{'$or':_[_0x7c29('0x30')](_0x33573f[_0x7c29('0x38')],function(_0x365c77){var _0x55bbb4={};_0x55bbb4[_0x365c77]={'$like':'%'+_0x1d818f['query'][_0x7c29('0x44')]+'%'};return _0x55bbb4;})});}_0x33573f=_[_0x7c29('0x41')]({},_0x33573f,_0x1d818f[_0x7c29('0x45')]);return _0x289265['getSubjects'](_0x33573f);}})[_0x7c29('0x28')](function(_0x4705f5){if(_0x4705f5){_0x4d9b01=_0x4705f5[_0x7c29('0x39')];if(!_0x1d818f[_0x7c29('0x35')][_0x7c29('0x3a')](_0x7c29('0x3b'))){_0x33573f[_0x7c29('0x20')]=qs['limit'](_0x1d818f['query'][_0x7c29('0x20')]);_0x33573f[_0x7c29('0x1f')]=qs[_0x7c29('0x1f')](_0x1d818f[_0x7c29('0x35')][_0x7c29('0x1f')]);}return _0x289265[_0x7c29('0x51')](_0x33573f);}})['then'](function(_0x2a79d2){if(_0x2a79d2){return _0x2a79d2?{'count':_0x4d9b01,'rows':_0x2a79d2}:null;}})[_0x7c29('0x28')](respondWithResult(_0x4d2df9,null))[_0x7c29('0x4b')](handleError(_0x4d2df9,null));};exports[_0x7c29('0x53')]=function(_0x2b4d4f,_0x362902,_0x4832cb){var _0x408afe={};var _0x1facbb={};var _0x474c24;var _0x59808f;return db[_0x7c29('0x31')][_0x7c29('0x52')]({'where':{'id':_0x2b4d4f['params']['id']}})['then'](handleEntityNotFound(_0x362902,null))[_0x7c29('0x28')](function(_0x7477cc){if(_0x7477cc){_0x474c24=_0x7477cc;_0x1facbb[_0x7c29('0x34')]=_[_0x7c29('0x48')](db[_0x7c29('0x50')]['rawAttributes']);_0x1facbb[_0x7c29('0x35')]=_[_0x7c29('0x48')](_0x2b4d4f['query']);_0x1facbb[_0x7c29('0x3f')]=_[_0x7c29('0x36')](_0x1facbb[_0x7c29('0x34')],_0x1facbb[_0x7c29('0x35')]);_0x408afe['attributes']=_[_0x7c29('0x36')](_0x1facbb[_0x7c29('0x34')],qs['fields'](_0x2b4d4f[_0x7c29('0x35')][_0x7c29('0x37')]));_0x408afe['attributes']=_0x408afe[_0x7c29('0x38')][_0x7c29('0x39')]?_0x408afe[_0x7c29('0x38')]:_0x1facbb[_0x7c29('0x34')];_0x408afe['order']=qs[_0x7c29('0x3d')](_0x2b4d4f[_0x7c29('0x35')][_0x7c29('0x3d')]);_0x408afe[_0x7c29('0x3e')]=qs[_0x7c29('0x3f')](_[_0x7c29('0x40')](_0x2b4d4f['query'],_0x1facbb[_0x7c29('0x3f')]));if(_0x2b4d4f[_0x7c29('0x35')][_0x7c29('0x44')]){_0x408afe['where']=_[_0x7c29('0x41')](_0x408afe[_0x7c29('0x3e')],{'$or':_[_0x7c29('0x30')](_0x408afe[_0x7c29('0x38')],function(_0x588928){var _0x5d264c={};_0x5d264c[_0x588928]={'$like':'%'+_0x2b4d4f[_0x7c29('0x35')][_0x7c29('0x44')]+'%'};return _0x5d264c;})});}_0x408afe=_[_0x7c29('0x41')]({},_0x408afe,_0x2b4d4f[_0x7c29('0x45')]);return _0x474c24[_0x7c29('0x53')](_0x408afe);}})[_0x7c29('0x28')](function(_0x55e9e6){if(_0x55e9e6){_0x59808f=_0x55e9e6[_0x7c29('0x39')];if(!_0x2b4d4f[_0x7c29('0x35')][_0x7c29('0x3a')](_0x7c29('0x3b'))){_0x408afe[_0x7c29('0x20')]=qs[_0x7c29('0x20')](_0x2b4d4f['query'][_0x7c29('0x20')]);_0x408afe['offset']=qs[_0x7c29('0x1f')](_0x2b4d4f[_0x7c29('0x35')][_0x7c29('0x1f')]);}return _0x474c24['getDescriptions'](_0x408afe);}})[_0x7c29('0x28')](function(_0x2b1ba4){if(_0x2b1ba4){return _0x2b1ba4?{'count':_0x59808f,'rows':_0x2b1ba4}:null;}})['then'](respondWithResult(_0x362902,null))[_0x7c29('0x4b')](handleError(_0x362902,null));};exports['getTags']=function(_0x3e65e1,_0x595756,_0x275047){var _0x4f4a96={};var _0x4505cf={};var _0xf943aa;var _0x20178d;return db[_0x7c29('0x31')]['findOne']({'where':{'id':_0x3e65e1[_0x7c29('0x4f')]['id']}})['then'](handleEntityNotFound(_0x595756,null))['then'](function(_0x38bcf4){if(_0x38bcf4){_0xf943aa=_0x38bcf4;_0x4505cf[_0x7c29('0x34')]=_[_0x7c29('0x48')](db['Tag'][_0x7c29('0x32')]);_0x4505cf[_0x7c29('0x35')]=_[_0x7c29('0x48')](_0x3e65e1[_0x7c29('0x35')]);_0x4505cf[_0x7c29('0x3f')]=_[_0x7c29('0x36')](_0x4505cf[_0x7c29('0x34')],_0x4505cf['query']);_0x4f4a96[_0x7c29('0x38')]=_[_0x7c29('0x36')](_0x4505cf[_0x7c29('0x34')],qs[_0x7c29('0x37')](_0x3e65e1[_0x7c29('0x35')][_0x7c29('0x37')]));_0x4f4a96[_0x7c29('0x38')]=_0x4f4a96['attributes'][_0x7c29('0x39')]?_0x4f4a96[_0x7c29('0x38')]:_0x4505cf[_0x7c29('0x34')];_0x4f4a96[_0x7c29('0x3c')]=qs[_0x7c29('0x3d')](_0x3e65e1[_0x7c29('0x35')][_0x7c29('0x3d')]);_0x4f4a96['where']=qs[_0x7c29('0x3f')](_[_0x7c29('0x40')](_0x3e65e1[_0x7c29('0x35')],_0x4505cf[_0x7c29('0x3f')]));if(_0x3e65e1['query'][_0x7c29('0x44')]){_0x4f4a96['where']=_['merge'](_0x4f4a96[_0x7c29('0x3e')],{'$or':_['map'](_0x4f4a96[_0x7c29('0x38')],function(_0x84bb3a){var _0x551434={};_0x551434[_0x84bb3a]={'$like':'%'+_0x3e65e1[_0x7c29('0x35')][_0x7c29('0x44')]+'%'};return _0x551434;})});}_0x4f4a96=_['merge']({},_0x4f4a96,_0x3e65e1[_0x7c29('0x45')]);return _0xf943aa['getTags'](_0x4f4a96);}})[_0x7c29('0x28')](function(_0x2396ed){if(_0x2396ed){_0x20178d=_0x2396ed[_0x7c29('0x39')];if(!_0x3e65e1[_0x7c29('0x35')]['hasOwnProperty'](_0x7c29('0x3b'))){_0x4f4a96[_0x7c29('0x20')]=qs[_0x7c29('0x20')](_0x3e65e1[_0x7c29('0x35')][_0x7c29('0x20')]);_0x4f4a96['offset']=qs[_0x7c29('0x1f')](_0x3e65e1['query'][_0x7c29('0x1f')]);}return _0xf943aa[_0x7c29('0x54')](_0x4f4a96);}})['then'](function(_0x4e4668){if(_0x4e4668){return _0x4e4668?{'count':_0x20178d,'rows':_0x4e4668}:null;}})[_0x7c29('0x28')](respondWithResult(_0x595756,null))[_0x7c29('0x4b')](handleError(_0x595756,null));};exports['setTags']=function(_0x32b9ed,_0x1dba2e,_0x1f1ec6){if(_0x32b9ed['body']['id']){delete _0x32b9ed['body']['id'];}return db[_0x7c29('0x31')][_0x7c29('0x52')]({'where':{'id':_0x32b9ed[_0x7c29('0x4f')]['id']}})['then'](handleEntityNotFound(_0x1dba2e,null))[_0x7c29('0x28')](function(_0x56a872){if(_0x56a872){return _0x56a872['setTags'](_0x32b9ed[_0x7c29('0x4d')][_0x7c29('0x55')]||[]);}return null;})[_0x7c29('0x28')](respondWithResult(_0x1dba2e,null))[_0x7c29('0x4b')](handleError(_0x1dba2e,null));};
\ No newline at end of file
index 0c157ee..b7ce1d5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6a93=['DeskConfiguration','int_desk_configurations','lodash','../../config/logger','moment','bluebird','request-promise','rimraf','exports','define'];(function(_0x23a0a3,_0x273cfb){var _0x54cf56=function(_0x4d60ae){while(--_0x4d60ae){_0x23a0a3['push'](_0x23a0a3['shift']());}};_0x54cf56(++_0x273cfb);}(_0x6a93,0x188));var _0x36a9=function(_0x5c347a,_0x262914){_0x5c347a=_0x5c347a-0x0;var _0x42f045=_0x6a93[_0x5c347a];return _0x42f045;};'use strict';var _=require(_0x36a9('0x0'));var util=require('util');var logger=require(_0x36a9('0x1'))('api');var moment=require(_0x36a9('0x2'));var BPromise=require(_0x36a9('0x3'));var rp=require(_0x36a9('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x36a9('0x5'));var config=require('../../config/environment');var attributes=require('./intDeskConfiguration.attributes');module[_0x36a9('0x6')]=function(_0x3e1544,_0x109065){return _0x3e1544[_0x36a9('0x7')](_0x36a9('0x8'),attributes,{'tableName':_0x36a9('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xe110=['request-promise','rimraf','../../config/environment','define','int_desk_configurations','lodash','../../config/logger','api','moment','bluebird'];(function(_0x576c22,_0x7dac63){var _0x2146f3=function(_0x394e28){while(--_0x394e28){_0x576c22['push'](_0x576c22['shift']());}};_0x2146f3(++_0x7dac63);}(_0xe110,0xaf));var _0x0e11=function(_0x4f54bb,_0x1d2930){_0x4f54bb=_0x4f54bb-0x0;var _0x56e9dd=_0xe110[_0x4f54bb];return _0x56e9dd;};'use strict';var _=require(_0x0e11('0x0'));var util=require('util');var logger=require(_0x0e11('0x1'))(_0x0e11('0x2'));var moment=require(_0x0e11('0x3'));var BPromise=require(_0x0e11('0x4'));var rp=require(_0x0e11('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x0e11('0x6'));var config=require(_0x0e11('0x7'));var attributes=require('./intDeskConfiguration.attributes');module['exports']=function(_0x4087de,_0x42ec59){return _0x4087de[_0x0e11('0x8')]('DeskConfiguration',attributes,{'tableName':_0x0e11('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 5b785a4..6f2f4d8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb749=['error','code','message','catch','lodash','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','DeskConfiguration,\x20%s,\x20%s','debug','DeskConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x18fb16,_0x45edbc){var _0x147b0d=function(_0x5b1b00){while(--_0x5b1b00){_0x18fb16['push'](_0x18fb16['shift']());}};_0x147b0d(++_0x45edbc);}(_0xb749,0xac));var _0x9b74=function(_0x1d18eb,_0x44511f){_0x1d18eb=_0x1d18eb-0x0;var _0x1112e1=_0xb749[_0x1d18eb];return _0x1112e1;};'use strict';var _=require(_0x9b74('0x0'));var util=require('util');var moment=require(_0x9b74('0x1'));var BPromise=require(_0x9b74('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9b74('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x9b74('0x4'));var logger=require(_0x9b74('0x5'))(_0x9b74('0x6'));var config=require(_0x9b74('0x7'));var jayson=require(_0x9b74('0x8'));var client=jayson[_0x9b74('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x24da1a,_0x4ed115,_0x373f65){return new BPromise(function(_0xe9f28d,_0x3e1920){return client[_0x9b74('0xa')](_0x24da1a,_0x373f65)[_0x9b74('0xb')](function(_0x516ddb){logger[_0x9b74('0xc')](_0x9b74('0xd'),_0x4ed115,'request\x20sent');logger[_0x9b74('0xe')](_0x9b74('0xf'),_0x4ed115,_0x9b74('0x10'),JSON['stringify'](_0x516ddb));if(_0x516ddb[_0x9b74('0x11')]){if(_0x516ddb[_0x9b74('0x11')][_0x9b74('0x12')]===0x1f4){logger[_0x9b74('0x11')]('DeskConfiguration,\x20%s,\x20%s',_0x4ed115,_0x516ddb['error'][_0x9b74('0x13')]);return _0x3e1920(_0x516ddb[_0x9b74('0x11')][_0x9b74('0x13')]);}logger[_0x9b74('0x11')]('DeskConfiguration,\x20%s,\x20%s',_0x4ed115,_0x516ddb[_0x9b74('0x11')][_0x9b74('0x13')]);return _0xe9f28d(_0x516ddb[_0x9b74('0x11')][_0x9b74('0x13')]);}else{logger[_0x9b74('0xc')](_0x9b74('0xd'),_0x4ed115,'request\x20sent');_0xe9f28d(_0x516ddb['result'][_0x9b74('0x13')]);}})[_0x9b74('0x14')](function(_0x307a85){logger[_0x9b74('0x11')]('DeskConfiguration,\x20%s,\x20%s',_0x4ed115,_0x307a85);_0x3e1920(_0x307a85);});});}
\ No newline at end of file
+var _0xdc15=['../../mysqldb','../../config/environment','http','request','then','info','DeskConfiguration,\x20%s,\x20%s','DeskConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','lodash','moment','bluebird','randomstring','ioredis'];(function(_0x5762ee,_0x243d05){var _0x324ce1=function(_0x3dc615){while(--_0x3dc615){_0x5762ee['push'](_0x5762ee['shift']());}};_0x324ce1(++_0x243d05);}(_0xdc15,0x1f3));var _0x5dc1=function(_0x4d6bfd,_0x8d79ff){_0x4d6bfd=_0x4d6bfd-0x0;var _0x243a46=_0xdc15[_0x4d6bfd];return _0x243a46;};'use strict';var _=require(_0x5dc1('0x0'));var util=require('util');var moment=require(_0x5dc1('0x1'));var BPromise=require(_0x5dc1('0x2'));var rs=require(_0x5dc1('0x3'));var fs=require('fs');var Redis=require(_0x5dc1('0x4'));var db=require(_0x5dc1('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x5dc1('0x6'));var jayson=require('jayson/promise');var client=jayson['client'][_0x5dc1('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x2ec95f,_0x22d677,_0x12abf9){return new BPromise(function(_0x1c90f6,_0x3e96c1){return client[_0x5dc1('0x8')](_0x2ec95f,_0x12abf9)[_0x5dc1('0x9')](function(_0x1f1293){logger[_0x5dc1('0xa')](_0x5dc1('0xb'),_0x22d677,'request\x20sent');logger['debug'](_0x5dc1('0xc'),_0x22d677,_0x5dc1('0xd'),JSON['stringify'](_0x1f1293));if(_0x1f1293[_0x5dc1('0xe')]){if(_0x1f1293[_0x5dc1('0xe')][_0x5dc1('0xf')]===0x1f4){logger[_0x5dc1('0xe')](_0x5dc1('0xb'),_0x22d677,_0x1f1293[_0x5dc1('0xe')][_0x5dc1('0x10')]);return _0x3e96c1(_0x1f1293['error'][_0x5dc1('0x10')]);}logger[_0x5dc1('0xe')]('DeskConfiguration,\x20%s,\x20%s',_0x22d677,_0x1f1293[_0x5dc1('0xe')][_0x5dc1('0x10')]);return _0x1c90f6(_0x1f1293['error'][_0x5dc1('0x10')]);}else{logger[_0x5dc1('0xa')](_0x5dc1('0xb'),_0x22d677,'request\x20sent');_0x1c90f6(_0x1f1293[_0x5dc1('0x11')]['message']);}})['catch'](function(_0x17506b){logger[_0x5dc1('0xe')](_0x5dc1('0xb'),_0x22d677,_0x17506b);_0x3e96c1(_0x17506b);});});}
\ No newline at end of file
index 62f6482..9736584 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5ae9=['path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./intDeskField.controller','get','isAuthenticated','index','/:id','show','create','put','update','destroy','exports','multer','util'];(function(_0x3ecc23,_0x4f64c8){var _0x49e057=function(_0xd76311){while(--_0xd76311){_0x3ecc23['push'](_0x3ecc23['shift']());}};_0x49e057(++_0x4f64c8);}(_0x5ae9,0x1de));var _0x95ae=function(_0x263a8a,_0x5c088d){_0x263a8a=_0x263a8a-0x0;var _0x226a79=_0x5ae9[_0x263a8a];return _0x226a79;};'use strict';var multer=require(_0x95ae('0x0'));var util=require(_0x95ae('0x1'));var path=require(_0x95ae('0x2'));var timeout=require(_0x95ae('0x3'));var express=require(_0x95ae('0x4'));var router=express[_0x95ae('0x5')]();var fs_extra=require(_0x95ae('0x6'));var auth=require(_0x95ae('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0x95ae('0x8'));var controller=require(_0x95ae('0x9'));router[_0x95ae('0xa')]('/',auth[_0x95ae('0xb')](),controller[_0x95ae('0xc')]);router[_0x95ae('0xa')](_0x95ae('0xd'),auth['isAuthenticated'](),controller[_0x95ae('0xe')]);router['post']('/',auth['isAuthenticated'](),controller[_0x95ae('0xf')]);router[_0x95ae('0x10')]('/:id',auth['isAuthenticated'](),controller[_0x95ae('0x11')]);router['delete']('/:id',auth[_0x95ae('0xb')](),controller[_0x95ae('0x12')]);module[_0x95ae('0x13')]=router;
\ No newline at end of file
+var _0x8156=['express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intDeskField.controller','get','isAuthenticated','index','/:id','show','post','create','put','update','delete','destroy','exports','util','path','connect-timeout'];(function(_0x3eff40,_0x1cdf9e){var _0x4ee4fb=function(_0x4b7170){while(--_0x4b7170){_0x3eff40['push'](_0x3eff40['shift']());}};_0x4ee4fb(++_0x1cdf9e);}(_0x8156,0xad));var _0x6815=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x8156[_0xa464c9];return _0x3d73c4;};'use strict';var multer=require('multer');var util=require(_0x6815('0x0'));var path=require(_0x6815('0x1'));var timeout=require(_0x6815('0x2'));var express=require(_0x6815('0x3'));var router=express[_0x6815('0x4')]();var fs_extra=require(_0x6815('0x5'));var auth=require(_0x6815('0x6'));var interaction=require(_0x6815('0x7'));var config=require(_0x6815('0x8'));var controller=require(_0x6815('0x9'));router[_0x6815('0xa')]('/',auth[_0x6815('0xb')](),controller[_0x6815('0xc')]);router[_0x6815('0xa')](_0x6815('0xd'),auth[_0x6815('0xb')](),controller[_0x6815('0xe')]);router[_0x6815('0xf')]('/',auth['isAuthenticated'](),controller[_0x6815('0x10')]);router[_0x6815('0x11')](_0x6815('0xd'),auth[_0x6815('0xb')](),controller[_0x6815('0x12')]);router[_0x6815('0x13')](_0x6815('0xd'),auth[_0x6815('0xb')](),controller[_0x6815('0x14')]);module[_0x6815('0x15')]=router;
\ No newline at end of file
index bb5f7df..fbb0b51 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x85e7=['sequelize','exports','ENUM','string','variable','customVariable','keyValue','picklist','STRING','BOOLEAN'];(function(_0x139b63,_0x389ca8){var _0x2493f2=function(_0x137a08){while(--_0x137a08){_0x139b63['push'](_0x139b63['shift']());}};_0x2493f2(++_0x389ca8);}(_0x85e7,0x1a4));var _0x785e=function(_0x19b307,_0x3c0c8a){_0x19b307=_0x19b307-0x0;var _0x4a6659=_0x85e7[_0x19b307];return _0x4a6659;};'use strict';var Sequelize=require(_0x785e('0x0'));module[_0x785e('0x1')]={'type':{'type':Sequelize[_0x785e('0x2')](_0x785e('0x3'),_0x785e('0x4'),_0x785e('0x5'),_0x785e('0x6'),_0x785e('0x7')),'defaultValue':'string'},'content':{'type':Sequelize[_0x785e('0x8')]},'key':{'type':Sequelize[_0x785e('0x8')]},'keyType':{'type':Sequelize[_0x785e('0x2')]('string',_0x785e('0x4'),_0x785e('0x5'))},'keyContent':{'type':Sequelize[_0x785e('0x8')]},'idField':{'type':Sequelize[_0x785e('0x8')]},'nameField':{'type':Sequelize[_0x785e('0x8')]},'customField':{'type':Sequelize[_0x785e('0x9')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x785e('0x8')]}};
\ No newline at end of file
+var _0xaa2c=['customVariable','keyValue','STRING','BOOLEAN','ENUM','string','variable'];(function(_0x5707d2,_0x280c70){var _0x4e358d=function(_0x4a741e){while(--_0x4a741e){_0x5707d2['push'](_0x5707d2['shift']());}};_0x4e358d(++_0x280c70);}(_0xaa2c,0x7b));var _0xcaa2=function(_0x5901de,_0x15acad){_0x5901de=_0x5901de-0x0;var _0x13eb83=_0xaa2c[_0x5901de];return _0x13eb83;};'use strict';var Sequelize=require('sequelize');module['exports']={'type':{'type':Sequelize[_0xcaa2('0x0')](_0xcaa2('0x1'),_0xcaa2('0x2'),_0xcaa2('0x3'),_0xcaa2('0x4'),'picklist'),'defaultValue':'string'},'content':{'type':Sequelize[_0xcaa2('0x5')]},'key':{'type':Sequelize[_0xcaa2('0x5')]},'keyType':{'type':Sequelize['ENUM'](_0xcaa2('0x1'),_0xcaa2('0x2'),_0xcaa2('0x3'))},'keyContent':{'type':Sequelize[_0xcaa2('0x5')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0xcaa2('0x5')]},'customField':{'type':Sequelize[_0xcaa2('0x6')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
index 45da74e..e9b7872 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf6fa=['jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','status','json','offset','undefined','count','Content-Range','apply','update','then','destroy','end','sendStatus','error','stack','name','send','index','map','DeskField','rawAttributes','fieldName','type','key','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','limit','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','rimraf','fast-json-patch','request-promise','moment','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto'];(function(_0xdc5686,_0x1801fa){var _0x55e1f1=function(_0x50b3c6){while(--_0x50b3c6){_0xdc5686['push'](_0xdc5686['shift']());}};_0x55e1f1(++_0x1801fa);}(_0xf6fa,0x87));var _0xaf6f=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0xf6fa[_0x21a9d9];return _0x46adce;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xaf6f('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xaf6f('0x1'));var rp=require(_0xaf6f('0x2'));var moment=require(_0xaf6f('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xaf6f('0x4'));var path=require(_0xaf6f('0x5'));var sox=require(_0xaf6f('0x6'));var csv=require(_0xaf6f('0x7'));var ejs=require(_0xaf6f('0x8'));var fs=require('fs');var fs_extra=require(_0xaf6f('0x9'));var _=require(_0xaf6f('0xa'));var squel=require(_0xaf6f('0xb'));var crypto=require(_0xaf6f('0xc'));var jsforce=require(_0xaf6f('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xaf6f('0x7'));var querystring=require(_0xaf6f('0xe'));var Papa=require(_0xaf6f('0xf'));var Redis=require(_0xaf6f('0x10'));var authService=require(_0xaf6f('0x11'));var qs=require(_0xaf6f('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xaf6f('0x13'));var logger=require(_0xaf6f('0x14'))(_0xaf6f('0x15'));var utils=require(_0xaf6f('0x16'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xaf6f('0x17'))['db'];function respondWithStatusCode(_0x33230c,_0x35ebb5){_0x35ebb5=_0x35ebb5||0xcc;return function(_0x4fca18){if(_0x4fca18){return _0x33230c['sendStatus'](_0x35ebb5);}return _0x33230c['status'](_0x35ebb5)['end']();};}function respondWithResult(_0x4073cc,_0x2116ef){_0x2116ef=_0x2116ef||0xc8;return function(_0x527445){if(_0x527445){return _0x4073cc[_0xaf6f('0x18')](_0x2116ef)[_0xaf6f('0x19')](_0x527445);}};}function respondWithFilteredResult(_0x4480e7,_0x326218){return function(_0x5d50d8){if(_0x5d50d8){var _0x16c681=typeof _0x326218[_0xaf6f('0x1a')]===_0xaf6f('0x1b')&&typeof _0x326218['limit']===_0xaf6f('0x1b');var _0x24e054=_0x5d50d8[_0xaf6f('0x1c')];var _0xdcd3b7=_0x16c681?0x0:_0x326218[_0xaf6f('0x1a')];var _0x1fc57a=_0x16c681?_0x5d50d8[_0xaf6f('0x1c')]:_0x326218[_0xaf6f('0x1a')]+_0x326218['limit'];var _0x14577a;if(_0x1fc57a>=_0x24e054){_0x1fc57a=_0x24e054;_0x14577a=0xc8;}else{_0x14577a=0xce;}_0x4480e7[_0xaf6f('0x18')](_0x14577a);return _0x4480e7['set'](_0xaf6f('0x1d'),_0xdcd3b7+'-'+_0x1fc57a+'/'+_0x24e054)[_0xaf6f('0x19')](_0x5d50d8);}return null;};}function patchUpdates(_0x32f1a7){return function(_0x9ea48d){try{jsonpatch[_0xaf6f('0x1e')](_0x9ea48d,_0x32f1a7,!![]);}catch(_0x314ae1){return BPromise['reject'](_0x314ae1);}return _0x9ea48d['save']();};}function saveUpdates(_0x3effef,_0x276b33){return function(_0x146561){if(_0x146561){return _0x146561[_0xaf6f('0x1f')](_0x3effef)[_0xaf6f('0x20')](function(_0x3fcb5f){return _0x3fcb5f;});}return null;};}function removeEntity(_0x14f96c,_0x154166){return function(_0x4bd1f7){if(_0x4bd1f7){return _0x4bd1f7[_0xaf6f('0x21')]()[_0xaf6f('0x20')](function(){_0x14f96c[_0xaf6f('0x18')](0xcc)[_0xaf6f('0x22')]();});}};}function handleEntityNotFound(_0x3a68d2,_0x14b03b){return function(_0x225832){if(!_0x225832){_0x3a68d2[_0xaf6f('0x23')](0x194);}return _0x225832;};}function handleError(_0x151f06,_0x11109e){_0x11109e=_0x11109e||0x1f4;return function(_0x48e3a7){logger[_0xaf6f('0x24')](_0x48e3a7[_0xaf6f('0x25')]);if(_0x48e3a7[_0xaf6f('0x26')]){delete _0x48e3a7['name'];}_0x151f06[_0xaf6f('0x18')](_0x11109e)[_0xaf6f('0x27')](_0x48e3a7);};}exports[_0xaf6f('0x28')]=function(_0x4be3ca,_0x288bc8){var _0x4799d9={},_0x755f70={},_0x316362={'count':0x0,'rows':[]};var _0x4bd046=_[_0xaf6f('0x29')](db[_0xaf6f('0x2a')][_0xaf6f('0x2b')],function(_0x546460){return{'name':_0x546460[_0xaf6f('0x2c')],'type':_0x546460[_0xaf6f('0x2d')][_0xaf6f('0x2e')]};});_0x755f70[_0xaf6f('0x2f')]=_['map'](_0x4bd046,'name');_0x755f70[_0xaf6f('0x30')]=_[_0xaf6f('0x31')](_0x4be3ca[_0xaf6f('0x30')]);_0x755f70['filters']=_[_0xaf6f('0x32')](_0x755f70[_0xaf6f('0x2f')],_0x755f70['query']);_0x4799d9['attributes']=_[_0xaf6f('0x32')](_0x755f70[_0xaf6f('0x2f')],qs[_0xaf6f('0x33')](_0x4be3ca['query'][_0xaf6f('0x33')]));_0x4799d9['attributes']=_0x4799d9[_0xaf6f('0x34')][_0xaf6f('0x35')]?_0x4799d9[_0xaf6f('0x34')]:_0x755f70[_0xaf6f('0x2f')];if(!_0x4be3ca[_0xaf6f('0x30')][_0xaf6f('0x36')]('nolimit')){_0x4799d9[_0xaf6f('0x37')]=qs['limit'](_0x4be3ca[_0xaf6f('0x30')][_0xaf6f('0x37')]);_0x4799d9[_0xaf6f('0x1a')]=qs[_0xaf6f('0x1a')](_0x4be3ca[_0xaf6f('0x30')]['offset']);}_0x4799d9['order']=qs[_0xaf6f('0x38')](_0x4be3ca[_0xaf6f('0x30')][_0xaf6f('0x38')]);_0x4799d9[_0xaf6f('0x39')]=qs[_0xaf6f('0x3a')](_[_0xaf6f('0x3b')](_0x4be3ca[_0xaf6f('0x30')],_0x755f70[_0xaf6f('0x3a')]),_0x4bd046);if(_0x4be3ca['query'][_0xaf6f('0x3c')]){_0x4799d9[_0xaf6f('0x39')]=_[_0xaf6f('0x3d')](_0x4799d9[_0xaf6f('0x39')],{'$or':_[_0xaf6f('0x29')](_0x4bd046,function(_0x45447b){if(_0x45447b['type']!==_0xaf6f('0x3e')){var _0x1e3504={};_0x1e3504[_0x45447b[_0xaf6f('0x26')]]={'$like':'%'+_0x4be3ca['query']['filter']+'%'};return _0x1e3504;}})});}_0x4799d9=_[_0xaf6f('0x3d')]({},_0x4799d9,_0x4be3ca[_0xaf6f('0x3f')]);var _0x34ca13={'where':_0x4799d9[_0xaf6f('0x39')]};return db[_0xaf6f('0x2a')][_0xaf6f('0x1c')](_0x34ca13)[_0xaf6f('0x20')](function(_0x48e6d6){_0x316362[_0xaf6f('0x1c')]=_0x48e6d6;if(_0x4be3ca[_0xaf6f('0x30')][_0xaf6f('0x40')]){_0x4799d9[_0xaf6f('0x41')]=[{'all':!![]}];}return db[_0xaf6f('0x2a')][_0xaf6f('0x42')](_0x4799d9);})[_0xaf6f('0x20')](function(_0x4f5afc){_0x316362[_0xaf6f('0x43')]=_0x4f5afc;return _0x316362;})[_0xaf6f('0x20')](respondWithFilteredResult(_0x288bc8,_0x4799d9))[_0xaf6f('0x44')](handleError(_0x288bc8,null));};exports[_0xaf6f('0x45')]=function(_0x115e20,_0x1b7013){var _0x4cd81c={'raw':!![],'where':{'id':_0x115e20[_0xaf6f('0x46')]['id']}},_0x14859c={};_0x14859c['model']=_[_0xaf6f('0x31')](db[_0xaf6f('0x2a')][_0xaf6f('0x2b')]);_0x14859c[_0xaf6f('0x30')]=_[_0xaf6f('0x31')](_0x115e20['query']);_0x14859c[_0xaf6f('0x3a')]=_[_0xaf6f('0x32')](_0x14859c[_0xaf6f('0x2f')],_0x14859c[_0xaf6f('0x30')]);_0x4cd81c[_0xaf6f('0x34')]=_[_0xaf6f('0x32')](_0x14859c['model'],qs[_0xaf6f('0x33')](_0x115e20['query'][_0xaf6f('0x33')]));_0x4cd81c[_0xaf6f('0x34')]=_0x4cd81c[_0xaf6f('0x34')][_0xaf6f('0x35')]?_0x4cd81c[_0xaf6f('0x34')]:_0x14859c[_0xaf6f('0x2f')];if(_0x115e20['query']['includeAll']){_0x4cd81c[_0xaf6f('0x41')]=[{'all':!![]}];}_0x4cd81c=_[_0xaf6f('0x3d')]({},_0x4cd81c,_0x115e20[_0xaf6f('0x3f')]);return db[_0xaf6f('0x2a')][_0xaf6f('0x47')](_0x4cd81c)[_0xaf6f('0x20')](handleEntityNotFound(_0x1b7013,null))[_0xaf6f('0x20')](respondWithResult(_0x1b7013,null))['catch'](handleError(_0x1b7013,null));};exports[_0xaf6f('0x48')]=function(_0x57c95c,_0x382091){return db[_0xaf6f('0x2a')]['create'](_0x57c95c['body'],{})[_0xaf6f('0x20')](respondWithResult(_0x382091,0xc9))['catch'](handleError(_0x382091,null));};exports[_0xaf6f('0x1f')]=function(_0x17da70,_0x1f075a){if(_0x17da70[_0xaf6f('0x49')]['id']){delete _0x17da70['body']['id'];}return db[_0xaf6f('0x2a')][_0xaf6f('0x47')]({'where':{'id':_0x17da70[_0xaf6f('0x46')]['id']}})[_0xaf6f('0x20')](handleEntityNotFound(_0x1f075a,null))[_0xaf6f('0x20')](saveUpdates(_0x17da70[_0xaf6f('0x49')],null))[_0xaf6f('0x20')](respondWithResult(_0x1f075a,null))['catch'](handleError(_0x1f075a,null));};exports[_0xaf6f('0x21')]=function(_0x38ca6d,_0xa91a6c){return db[_0xaf6f('0x2a')][_0xaf6f('0x47')]({'where':{'id':_0x38ca6d[_0xaf6f('0x46')]['id']}})[_0xaf6f('0x20')](handleEntityNotFound(_0xa91a6c,null))[_0xaf6f('0x20')](removeEntity(_0xa91a6c,null))[_0xaf6f('0x44')](handleError(_0xa91a6c,null));};
\ No newline at end of file
+var _0x2873=['key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','then','catch','params','create','body','update','find','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','path','to-csv','ejs','lodash','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','offset','limit','undefined','count','Content-Range','json','apply','reject','save','destroy','end','error','stack','name','send','index','map','DeskField','rawAttributes','fieldName','type'];(function(_0x41ddf6,_0x4c300b){var _0x66e9ca=function(_0x13ae7e){while(--_0x13ae7e){_0x41ddf6['push'](_0x41ddf6['shift']());}};_0x66e9ca(++_0x4c300b);}(_0x2873,0x1f2));var _0x3287=function(_0x5c8226,_0x514c78){_0x5c8226=_0x5c8226-0x0;var _0x59c7a2=_0x2873[_0x5c8226];return _0x59c7a2;};'use strict';var emlformat=require(_0x3287('0x0'));var rimraf=require(_0x3287('0x1'));var zipdir=require(_0x3287('0x2'));var jsonpatch=require(_0x3287('0x3'));var rp=require('request-promise');var moment=require(_0x3287('0x4'));var BPromise=require(_0x3287('0x5'));var Mustache=require('mustache');var util=require(_0x3287('0x6'));var path=require(_0x3287('0x7'));var sox=require('sox');var csv=require(_0x3287('0x8'));var ejs=require(_0x3287('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x3287('0xa'));var squel=require('squel');var crypto=require(_0x3287('0xb'));var jsforce=require(_0x3287('0xc'));var deskjs=require(_0x3287('0xd'));var toCsv=require(_0x3287('0x8'));var querystring=require(_0x3287('0xe'));var Papa=require(_0x3287('0xf'));var Redis=require(_0x3287('0x10'));var authService=require(_0x3287('0x11'));var qs=require(_0x3287('0x12'));var as=require(_0x3287('0x13'));var hardwareService=require(_0x3287('0x14'));var logger=require(_0x3287('0x15'))(_0x3287('0x16'));var utils=require(_0x3287('0x17'));var config=require(_0x3287('0x18'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x26e3b8,_0x3cdbc4){_0x3cdbc4=_0x3cdbc4||0xcc;return function(_0x423c47){if(_0x423c47){return _0x26e3b8[_0x3287('0x19')](_0x3cdbc4);}return _0x26e3b8[_0x3287('0x1a')](_0x3cdbc4)['end']();};}function respondWithResult(_0x3a6a15,_0x1a58af){_0x1a58af=_0x1a58af||0xc8;return function(_0x2c946d){if(_0x2c946d){return _0x3a6a15[_0x3287('0x1a')](_0x1a58af)['json'](_0x2c946d);}};}function respondWithFilteredResult(_0x38d7ef,_0x4c8143){return function(_0x342461){if(_0x342461){var _0x46128a=typeof _0x4c8143[_0x3287('0x1b')]==='undefined'&&typeof _0x4c8143[_0x3287('0x1c')]===_0x3287('0x1d');var _0x2202ba=_0x342461[_0x3287('0x1e')];var _0x1dfb29=_0x46128a?0x0:_0x4c8143['offset'];var _0x554600=_0x46128a?_0x342461[_0x3287('0x1e')]:_0x4c8143['offset']+_0x4c8143[_0x3287('0x1c')];var _0x4a6bd3;if(_0x554600>=_0x2202ba){_0x554600=_0x2202ba;_0x4a6bd3=0xc8;}else{_0x4a6bd3=0xce;}_0x38d7ef[_0x3287('0x1a')](_0x4a6bd3);return _0x38d7ef['set'](_0x3287('0x1f'),_0x1dfb29+'-'+_0x554600+'/'+_0x2202ba)[_0x3287('0x20')](_0x342461);}return null;};}function patchUpdates(_0x40a787){return function(_0x23dc35){try{jsonpatch[_0x3287('0x21')](_0x23dc35,_0x40a787,!![]);}catch(_0x326eeb){return BPromise[_0x3287('0x22')](_0x326eeb);}return _0x23dc35[_0x3287('0x23')]();};}function saveUpdates(_0x132476,_0xc85da3){return function(_0x39ab07){if(_0x39ab07){return _0x39ab07['update'](_0x132476)['then'](function(_0x427226){return _0x427226;});}return null;};}function removeEntity(_0x2d1fab,_0x4bb4dd){return function(_0x1fc384){if(_0x1fc384){return _0x1fc384[_0x3287('0x24')]()['then'](function(){_0x2d1fab[_0x3287('0x1a')](0xcc)[_0x3287('0x25')]();});}};}function handleEntityNotFound(_0x1955c6,_0x111e3a){return function(_0x3f88e9){if(!_0x3f88e9){_0x1955c6[_0x3287('0x19')](0x194);}return _0x3f88e9;};}function handleError(_0x3e6d87,_0x257268){_0x257268=_0x257268||0x1f4;return function(_0x54f5d9){logger[_0x3287('0x26')](_0x54f5d9[_0x3287('0x27')]);if(_0x54f5d9['name']){delete _0x54f5d9[_0x3287('0x28')];}_0x3e6d87[_0x3287('0x1a')](_0x257268)[_0x3287('0x29')](_0x54f5d9);};}exports[_0x3287('0x2a')]=function(_0x207321,_0x5217ca){var _0x4218df={},_0x9e9bee={},_0x579555={'count':0x0,'rows':[]};var _0x32ef52=_[_0x3287('0x2b')](db[_0x3287('0x2c')][_0x3287('0x2d')],function(_0x59c712){return{'name':_0x59c712[_0x3287('0x2e')],'type':_0x59c712[_0x3287('0x2f')][_0x3287('0x30')]};});_0x9e9bee[_0x3287('0x31')]=_['map'](_0x32ef52,_0x3287('0x28'));_0x9e9bee[_0x3287('0x32')]=_[_0x3287('0x33')](_0x207321[_0x3287('0x32')]);_0x9e9bee[_0x3287('0x34')]=_[_0x3287('0x35')](_0x9e9bee[_0x3287('0x31')],_0x9e9bee[_0x3287('0x32')]);_0x4218df['attributes']=_[_0x3287('0x35')](_0x9e9bee[_0x3287('0x31')],qs[_0x3287('0x36')](_0x207321['query'][_0x3287('0x36')]));_0x4218df['attributes']=_0x4218df[_0x3287('0x37')][_0x3287('0x38')]?_0x4218df[_0x3287('0x37')]:_0x9e9bee[_0x3287('0x31')];if(!_0x207321[_0x3287('0x32')][_0x3287('0x39')](_0x3287('0x3a'))){_0x4218df[_0x3287('0x1c')]=qs[_0x3287('0x1c')](_0x207321[_0x3287('0x32')][_0x3287('0x1c')]);_0x4218df[_0x3287('0x1b')]=qs[_0x3287('0x1b')](_0x207321[_0x3287('0x32')][_0x3287('0x1b')]);}_0x4218df[_0x3287('0x3b')]=qs[_0x3287('0x3c')](_0x207321[_0x3287('0x32')]['sort']);_0x4218df[_0x3287('0x3d')]=qs['filters'](_[_0x3287('0x3e')](_0x207321[_0x3287('0x32')],_0x9e9bee[_0x3287('0x34')]),_0x32ef52);if(_0x207321[_0x3287('0x32')][_0x3287('0x3f')]){_0x4218df[_0x3287('0x3d')]=_[_0x3287('0x40')](_0x4218df[_0x3287('0x3d')],{'$or':_[_0x3287('0x2b')](_0x32ef52,function(_0x3a0aa0){if(_0x3a0aa0[_0x3287('0x2f')]!==_0x3287('0x41')){var _0x47c1a4={};_0x47c1a4[_0x3a0aa0['name']]={'$like':'%'+_0x207321[_0x3287('0x32')][_0x3287('0x3f')]+'%'};return _0x47c1a4;}})});}_0x4218df=_['merge']({},_0x4218df,_0x207321[_0x3287('0x42')]);var _0x74af36={'where':_0x4218df[_0x3287('0x3d')]};return db[_0x3287('0x2c')][_0x3287('0x1e')](_0x74af36)['then'](function(_0x469913){_0x579555[_0x3287('0x1e')]=_0x469913;if(_0x207321['query'][_0x3287('0x43')]){_0x4218df[_0x3287('0x44')]=[{'all':!![]}];}return db[_0x3287('0x2c')][_0x3287('0x45')](_0x4218df);})['then'](function(_0x1f57ba){_0x579555[_0x3287('0x46')]=_0x1f57ba;return _0x579555;})[_0x3287('0x47')](respondWithFilteredResult(_0x5217ca,_0x4218df))[_0x3287('0x48')](handleError(_0x5217ca,null));};exports['show']=function(_0x37528c,_0x42e722){var _0x452578={'raw':!![],'where':{'id':_0x37528c[_0x3287('0x49')]['id']}},_0x5add3c={};_0x5add3c[_0x3287('0x31')]=_[_0x3287('0x33')](db[_0x3287('0x2c')][_0x3287('0x2d')]);_0x5add3c[_0x3287('0x32')]=_[_0x3287('0x33')](_0x37528c['query']);_0x5add3c['filters']=_[_0x3287('0x35')](_0x5add3c[_0x3287('0x31')],_0x5add3c[_0x3287('0x32')]);_0x452578[_0x3287('0x37')]=_['intersection'](_0x5add3c[_0x3287('0x31')],qs['fields'](_0x37528c[_0x3287('0x32')][_0x3287('0x36')]));_0x452578[_0x3287('0x37')]=_0x452578[_0x3287('0x37')][_0x3287('0x38')]?_0x452578[_0x3287('0x37')]:_0x5add3c[_0x3287('0x31')];if(_0x37528c[_0x3287('0x32')][_0x3287('0x43')]){_0x452578[_0x3287('0x44')]=[{'all':!![]}];}_0x452578=_[_0x3287('0x40')]({},_0x452578,_0x37528c['options']);return db[_0x3287('0x2c')]['find'](_0x452578)[_0x3287('0x47')](handleEntityNotFound(_0x42e722,null))[_0x3287('0x47')](respondWithResult(_0x42e722,null))['catch'](handleError(_0x42e722,null));};exports[_0x3287('0x4a')]=function(_0x2f87a3,_0x2da4b6){return db[_0x3287('0x2c')]['create'](_0x2f87a3[_0x3287('0x4b')],{})[_0x3287('0x47')](respondWithResult(_0x2da4b6,0xc9))[_0x3287('0x48')](handleError(_0x2da4b6,null));};exports[_0x3287('0x4c')]=function(_0x2b971b,_0x38d183){if(_0x2b971b[_0x3287('0x4b')]['id']){delete _0x2b971b[_0x3287('0x4b')]['id'];}return db[_0x3287('0x2c')][_0x3287('0x4d')]({'where':{'id':_0x2b971b['params']['id']}})['then'](handleEntityNotFound(_0x38d183,null))[_0x3287('0x47')](saveUpdates(_0x2b971b[_0x3287('0x4b')],null))[_0x3287('0x47')](respondWithResult(_0x38d183,null))[_0x3287('0x48')](handleError(_0x38d183,null));};exports[_0x3287('0x24')]=function(_0x224616,_0x4f5795){return db['DeskField']['find']({'where':{'id':_0x224616['params']['id']}})['then'](handleEntityNotFound(_0x4f5795,null))[_0x3287('0x47')](removeEntity(_0x4f5795,null))[_0x3287('0x48')](handleError(_0x4f5795,null));};
\ No newline at end of file
index 85f9a5b..83362b3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0e3c=['exports','define','DeskField','desk_unique_index','idField','FieldId','lodash','../../config/logger','api','moment','request-promise','path'];(function(_0x516f5a,_0x345383){var _0x5c253e=function(_0x4910c){while(--_0x4910c){_0x516f5a['push'](_0x516f5a['shift']());}};_0x5c253e(++_0x345383);}(_0x0e3c,0x16e));var _0xc0e3=function(_0x4d9c5c,_0x13a932){_0x4d9c5c=_0x4d9c5c-0x0;var _0x2ac641=_0x0e3c[_0x4d9c5c];return _0x2ac641;};'use strict';var _=require(_0xc0e3('0x0'));var util=require('util');var logger=require(_0xc0e3('0x1'))(_0xc0e3('0x2'));var moment=require(_0xc0e3('0x3'));var BPromise=require('bluebird');var rp=require(_0xc0e3('0x4'));var fs=require('fs');var path=require(_0xc0e3('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./intDeskField.attributes');module[_0xc0e3('0x6')]=function(_0x5e2138,_0x2eb254){return _0x5e2138[_0xc0e3('0x7')](_0xc0e3('0x8'),attributes,{'tableName':'int_desk_fields','paranoid':![],'indexes':[{'name':_0xc0e3('0x9'),'fields':[_0xc0e3('0xa'),_0xc0e3('0xb')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x2d44=['define','DeskField','int_desk_fields','desk_unique_index','idField','FieldId','util','../../config/logger','api','moment','request-promise','rimraf','../../config/environment','./intDeskField.attributes'];(function(_0x2079e7,_0xdc5145){var _0x5a26c9=function(_0x29422d){while(--_0x29422d){_0x2079e7['push'](_0x2079e7['shift']());}};_0x5a26c9(++_0xdc5145);}(_0x2d44,0x1b8));var _0x42d4=function(_0x587f23,_0x1ace44){_0x587f23=_0x587f23-0x0;var _0x339ce6=_0x2d44[_0x587f23];return _0x339ce6;};'use strict';var _=require('lodash');var util=require(_0x42d4('0x0'));var logger=require(_0x42d4('0x1'))(_0x42d4('0x2'));var moment=require(_0x42d4('0x3'));var BPromise=require('bluebird');var rp=require(_0x42d4('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x42d4('0x5'));var config=require(_0x42d4('0x6'));var attributes=require(_0x42d4('0x7'));module['exports']=function(_0x3151db,_0x1d1a87){return _0x3151db[_0x42d4('0x8')](_0x42d4('0x9'),attributes,{'tableName':_0x42d4('0xa'),'paranoid':![],'indexes':[{'name':_0x42d4('0xb'),'fields':[_0x42d4('0xc'),_0x42d4('0xd')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index 333ee1a..cce5012 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7ade=['bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','DeskField,\x20%s,\x20%s','request\x20sent','debug','DeskField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x7ade,0xf7));var _0xe7ad=function(_0x2f5fae,_0x555535){_0x2f5fae=_0x2f5fae-0x0;var _0x3eb6b8=_0x7ade[_0x2f5fae];return _0x3eb6b8;};'use strict';var _=require(_0xe7ad('0x0'));var util=require(_0xe7ad('0x1'));var moment=require(_0xe7ad('0x2'));var BPromise=require(_0xe7ad('0x3'));var rs=require(_0xe7ad('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe7ad('0x5'))['db'];var utils=require(_0xe7ad('0x6'));var logger=require('../../config/logger')(_0xe7ad('0x7'));var config=require(_0xe7ad('0x8'));var jayson=require(_0xe7ad('0x9'));var client=jayson[_0xe7ad('0xa')][_0xe7ad('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x43ea4d,_0x2929a1,_0x2149f8){return new BPromise(function(_0x21b7ca,_0x465b5b){return client[_0xe7ad('0xc')](_0x43ea4d,_0x2149f8)[_0xe7ad('0xd')](function(_0x45d8cf){logger[_0xe7ad('0xe')](_0xe7ad('0xf'),_0x2929a1,_0xe7ad('0x10'));logger[_0xe7ad('0x11')](_0xe7ad('0x12'),_0x2929a1,_0xe7ad('0x10'),JSON[_0xe7ad('0x13')](_0x45d8cf));if(_0x45d8cf[_0xe7ad('0x14')]){if(_0x45d8cf[_0xe7ad('0x14')][_0xe7ad('0x15')]===0x1f4){logger[_0xe7ad('0x14')](_0xe7ad('0xf'),_0x2929a1,_0x45d8cf[_0xe7ad('0x14')][_0xe7ad('0x16')]);return _0x465b5b(_0x45d8cf['error']['message']);}logger['error'](_0xe7ad('0xf'),_0x2929a1,_0x45d8cf[_0xe7ad('0x14')][_0xe7ad('0x16')]);return _0x21b7ca(_0x45d8cf[_0xe7ad('0x14')][_0xe7ad('0x16')]);}else{logger['info'](_0xe7ad('0xf'),_0x2929a1,'request\x20sent');_0x21b7ca(_0x45d8cf[_0xe7ad('0x17')][_0xe7ad('0x16')]);}})[_0xe7ad('0x18')](function(_0x14c959){logger[_0xe7ad('0x14')]('DeskField,\x20%s,\x20%s',_0x2929a1,_0x14c959);_0x465b5b(_0x14c959);});});}
\ No newline at end of file
+var _0xbc7d=['moment','bluebird','ioredis','../../mysqldb','../../config/environment','http','request','then','DeskField,\x20%s,\x20%s','request\x20sent','debug','error','message','catch','lodash','util'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xbc7d,0x8e));var _0xdbc7=function(_0xfd9b19,_0x21d75f){_0xfd9b19=_0xfd9b19-0x0;var _0x514918=_0xbc7d[_0xfd9b19];return _0x514918;};'use strict';var _=require(_0xdbc7('0x0'));var util=require(_0xdbc7('0x1'));var moment=require(_0xdbc7('0x2'));var BPromise=require(_0xdbc7('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xdbc7('0x4'));var db=require(_0xdbc7('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0xdbc7('0x6'));var jayson=require('jayson/promise');var client=jayson['client'][_0xdbc7('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x339cee,_0x41d7dc,_0x159f76){return new BPromise(function(_0x1d2725,_0xfa888a){return client[_0xdbc7('0x8')](_0x339cee,_0x159f76)[_0xdbc7('0x9')](function(_0x4d3b06){logger['info'](_0xdbc7('0xa'),_0x41d7dc,_0xdbc7('0xb'));logger[_0xdbc7('0xc')]('DeskField,\x20%s,\x20%s,\x20%s',_0x41d7dc,'request\x20sent',JSON['stringify'](_0x4d3b06));if(_0x4d3b06['error']){if(_0x4d3b06['error']['code']===0x1f4){logger[_0xdbc7('0xd')]('DeskField,\x20%s,\x20%s',_0x41d7dc,_0x4d3b06[_0xdbc7('0xd')][_0xdbc7('0xe')]);return _0xfa888a(_0x4d3b06[_0xdbc7('0xd')]['message']);}logger[_0xdbc7('0xd')](_0xdbc7('0xa'),_0x41d7dc,_0x4d3b06[_0xdbc7('0xd')][_0xdbc7('0xe')]);return _0x1d2725(_0x4d3b06[_0xdbc7('0xd')][_0xdbc7('0xe')]);}else{logger['info']('DeskField,\x20%s,\x20%s',_0x41d7dc,'request\x20sent');_0x1d2725(_0x4d3b06['result'][_0xdbc7('0xe')]);}})[_0xdbc7('0xf')](function(_0x3fe234){logger[_0xdbc7('0xd')](_0xdbc7('0xa'),_0x41d7dc,_0x3fe234);_0xfa888a(_0x3fe234);});});}
\ No newline at end of file
index 202c75d..cf32642 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x021c=['/:id/configurations','/:id/fields','getFields','create','post','update','delete','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/:id','show'];(function(_0x337749,_0x198b2){var _0x206454=function(_0x216cef){while(--_0x216cef){_0x337749['push'](_0x337749['shift']());}};_0x206454(++_0x198b2);}(_0x021c,0x143));var _0xc021=function(_0x5b1394,_0x17f08d){_0x5b1394=_0x5b1394-0x0;var _0x483150=_0x021c[_0x5b1394];return _0x483150;};'use strict';var multer=require(_0xc021('0x0'));var util=require(_0xc021('0x1'));var path=require(_0xc021('0x2'));var timeout=require(_0xc021('0x3'));var express=require(_0xc021('0x4'));var router=express[_0xc021('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xc021('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xc021('0x7'));var controller=require('./intDynamics365Account.controller');router[_0xc021('0x8')]('/',auth[_0xc021('0x9')](),controller[_0xc021('0xa')]);router['get'](_0xc021('0xb'),auth[_0xc021('0x9')](),controller[_0xc021('0xc')]);router[_0xc021('0x8')](_0xc021('0xd'),auth[_0xc021('0x9')](),controller['getConfigurations']);router['get'](_0xc021('0xe'),auth[_0xc021('0x9')](),controller[_0xc021('0xf')]);router['post']('/',auth[_0xc021('0x9')](),controller[_0xc021('0x10')]);router[_0xc021('0x11')](_0xc021('0xd'),auth[_0xc021('0x9')](),controller['addConfiguration']);router['put'](_0xc021('0xb'),auth[_0xc021('0x9')](),controller[_0xc021('0x12')]);router[_0xc021('0x13')](_0xc021('0xb'),auth[_0xc021('0x9')](),controller['destroy']);module[_0xc021('0x14')]=router;
\ No newline at end of file
+var _0xc374=['get','isAuthenticated','index','/:id','show','/:id/configurations','getFields','post','create','addConfiguration','put','update','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intDynamics365Account.controller'];(function(_0x43ba50,_0x50c20f){var _0x4382df=function(_0x57393c){while(--_0x57393c){_0x43ba50['push'](_0x43ba50['shift']());}};_0x4382df(++_0x50c20f);}(_0xc374,0x198));var _0x4c37=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xc374[_0x321bb2];return _0x9c12ed;};'use strict';var multer=require(_0x4c37('0x0'));var util=require(_0x4c37('0x1'));var path=require('path');var timeout=require(_0x4c37('0x2'));var express=require(_0x4c37('0x3'));var router=express[_0x4c37('0x4')]();var fs_extra=require(_0x4c37('0x5'));var auth=require(_0x4c37('0x6'));var interaction=require(_0x4c37('0x7'));var config=require(_0x4c37('0x8'));var controller=require(_0x4c37('0x9'));router[_0x4c37('0xa')]('/',auth[_0x4c37('0xb')](),controller[_0x4c37('0xc')]);router[_0x4c37('0xa')](_0x4c37('0xd'),auth['isAuthenticated'](),controller[_0x4c37('0xe')]);router[_0x4c37('0xa')](_0x4c37('0xf'),auth[_0x4c37('0xb')](),controller['getConfigurations']);router[_0x4c37('0xa')]('/:id/fields',auth['isAuthenticated'](),controller[_0x4c37('0x10')]);router[_0x4c37('0x11')]('/',auth[_0x4c37('0xb')](),controller[_0x4c37('0x12')]);router[_0x4c37('0x11')](_0x4c37('0xf'),auth[_0x4c37('0xb')](),controller[_0x4c37('0x13')]);router[_0x4c37('0x14')]('/:id',auth[_0x4c37('0xb')](),controller[_0x4c37('0x15')]);router['delete'](_0x4c37('0xd'),auth[_0x4c37('0xb')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
index 32745f5..8b93a6c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb5bb=['STRING','sequelize','exports'];(function(_0x3e5332,_0x10d398){var _0x17744f=function(_0x2a0e4e){while(--_0x2a0e4e){_0x3e5332['push'](_0x3e5332['shift']());}};_0x17744f(++_0x10d398);}(_0xb5bb,0x1ba));var _0xbb5b=function(_0x21b699,_0x4d8635){_0x21b699=_0x21b699-0x0;var _0x1051b0=_0xb5bb[_0x21b699];return _0x1051b0;};'use strict';var Sequelize=require(_0xbb5b('0x0'));module[_0xbb5b('0x1')]={'name':{'type':Sequelize[_0xbb5b('0x2')]},'username':{'type':Sequelize['STRING']},'password':{'type':Sequelize[_0xbb5b('0x2')]},'remoteUri':{'type':Sequelize[_0xbb5b('0x2')]},'tenantId':{'type':Sequelize['STRING']},'clientId':{'type':Sequelize['STRING']},'clientSecret':{'type':Sequelize['STRING']},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize['STRING']},'modernAuthentication':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]}};
\ No newline at end of file
+var _0x744c=['sequelize','exports','STRING','BOOLEAN'];(function(_0x3e5086,_0x48f4a2){var _0xfeb102=function(_0x5a945f){while(--_0x5a945f){_0x3e5086['push'](_0x3e5086['shift']());}};_0xfeb102(++_0x48f4a2);}(_0x744c,0xa0));var _0xc744=function(_0x5e3836,_0x35936a){_0x5e3836=_0x5e3836-0x0;var _0x2a4f95=_0x744c[_0x5e3836];return _0x2a4f95;};'use strict';var Sequelize=require(_0xc744('0x0'));module[_0xc744('0x1')]={'name':{'type':Sequelize[_0xc744('0x2')]},'username':{'type':Sequelize[_0xc744('0x2')]},'password':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0xc744('0x2')]},'tenantId':{'type':Sequelize[_0xc744('0x2')]},'clientId':{'type':Sequelize[_0xc744('0x2')]},'clientSecret':{'type':Sequelize[_0xc744('0x2')]},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize['STRING']},'modernAuthentication':{'type':Sequelize[_0xc744('0x3')],'defaultValue':!![]}};
\ No newline at end of file
index 8f72649..cf4d78d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa0e4=['BooleanAttributeMetadata','StringAttributeMetadata','DoubleAttributeMetadata','BigIntAttributeMetadata','IntegerAttributeMetadata','MemoAttributeMetadata','DateTimeAttributeMetadata','EntityNameAttributeMetadata','StateAttributeMetadata','DecimalAttributeMetadata','statusCode','error','test','Wrong\x20credentials','EntityDefinitions(',')/Attributes(',')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?','OptionSet','Options','Label','DisplayName',')/Microsoft.Dynamics.CRM.BooleanAttributeMetadata?$select=DisplayName,LogicalName&$expand=OptionSet($select=FalseOption,\x20TrueOption)','TrueOption','UserLocalizedLabel','true','false','?$select=DisplayName,LogicalName','request-promise','util','lodash','../../components/parsers/qs','../../config/logger','api','../../mysqldb','../../components/integrations/configuration','status','json','offset','undefined','limit','count','set','Content-Range','update','destroy','then','end','sendStatus','stack','name','send','index','Dynamics365Account','fieldName','type','key','model','map','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filters','pick','where','merge','VIRTUAL','filter','options','include','findAll','rows','catch','show','params','rawAttributes','keys','find','create','body','getConfigurations','findOne','addConfiguration','Subjects','getSubjects','channel','getDescriptions','Dynamics365Configuration','Dynamics365Field','Descriptions','substring','lastIndexOf','%s/api/data/v9.0/','getFields','ticketType','Incident','title','description','customerid','ownerid','caseorigincode','subject','phonenumber','regardingobjectid','directioncode','phonecall_activity_parties','accountidname','accountidyominame','actualserviceunits','billedserviceunits','contactidname','contactidyominame','contractdetailidname','contractidname','createdbyexternalpartyyominame','createdbyname','createdon','createdonbehalfbyyominame','customeridname','emailaddress','entitlementidname','entityimage_timestamp','exchangerate','firstresponsebykpiidname','followupby','importsequencenumber','influencescore','lastonholdtime','masteridname','modifiedbyexternalpartyyominame','modifiedbyyominame','modifiedon','modifiedonbehalfbyname','modifiedonbehalfbyyominame','msdyn_incidenttypename','msdyn_iotalertname','numberofchildincidents','onholdtime','overriddencreatedon','owneridname','owneridtype','owneridyominame','parentcaseidname','primarycontactidname','primarycontactidyominame','prioritycodename','productidname','productserialnumber','resolveby','resolvebykpiidname','responseby','responsiblecontactidname','responsiblecontactidyominame','sentimentvalue','slainvokedidname','socialprofileidname','statecode','statuscode','subjectidname','timezoneruleversionnumber','traversedpath','utcconversiontimezonecode','versionnumber','concat','username','tenantId','clientId','clientSecret','modernAuthentication','CloudProvider','data5','data7','access_token','https://login.microsoftonline.com/','/oauth2/token','password','GET','EntityDefinitions?$select=DisplayName,EntitySetName&$filter=SchemaName\x20eq\x20\x27','Bearer\x20','4.0','value','MetadataId','Attributes','includes','LogicalName','forEach','@odata.type','PicklistAttributeMetadata','push','all','isNil'];(function(_0x1d2c4c,_0x32b64e){var _0x2d3277=function(_0xc31e6b){while(--_0xc31e6b){_0x1d2c4c['push'](_0x1d2c4c['shift']());}};_0x2d3277(++_0x32b64e);}(_0xa0e4,0x1a3));var _0x4a0e=function(_0x3055ab,_0x4d1f74){_0x3055ab=_0x3055ab-0x0;var _0x31d336=_0xa0e4[_0x3055ab];return _0x31d336;};'use strict';var rp=require(_0x4a0e('0x0'));var util=require(_0x4a0e('0x1'));var _=require(_0x4a0e('0x2'));var qs=require(_0x4a0e('0x3'));var logger=require(_0x4a0e('0x4'))(_0x4a0e('0x5'));var db=require(_0x4a0e('0x6'))['db'];var integrations=require(_0x4a0e('0x7'));function respondWithResult(_0x30589e,_0xa8c970){_0xa8c970=_0xa8c970||0xc8;return function(_0x359237){if(_0x359237){return _0x30589e[_0x4a0e('0x8')](_0xa8c970)[_0x4a0e('0x9')](_0x359237);}};}function respondWithFilteredResult(_0x3b3d6d,_0x2c7c10){return function(_0x56c186){if(_0x56c186){var _0x307414=typeof _0x2c7c10[_0x4a0e('0xa')]===_0x4a0e('0xb')&&typeof _0x2c7c10[_0x4a0e('0xc')]===_0x4a0e('0xb');var _0x22316c=_0x56c186['count'];var _0x1ef84a=_0x307414?0x0:_0x2c7c10[_0x4a0e('0xa')];var _0x34ce15=_0x307414?_0x56c186[_0x4a0e('0xd')]:_0x2c7c10[_0x4a0e('0xa')]+_0x2c7c10[_0x4a0e('0xc')];var _0x498fff;if(_0x34ce15>=_0x22316c){_0x34ce15=_0x22316c;_0x498fff=0xc8;}else{_0x498fff=0xce;}_0x3b3d6d[_0x4a0e('0x8')](_0x498fff);return _0x3b3d6d[_0x4a0e('0xe')](_0x4a0e('0xf'),_0x1ef84a+'-'+_0x34ce15+'/'+_0x22316c)[_0x4a0e('0x9')](_0x56c186);}return null;};}function saveUpdates(_0x59f8fd){return function(_0x4fa34e){if(_0x4fa34e){return _0x4fa34e[_0x4a0e('0x10')](_0x59f8fd)['then'](function(_0x27c52e){return _0x27c52e;});}return null;};}function removeEntity(_0x1145d1){return function(_0x1dfdc3){if(_0x1dfdc3){return _0x1dfdc3[_0x4a0e('0x11')]()[_0x4a0e('0x12')](function(){_0x1145d1[_0x4a0e('0x8')](0xcc)[_0x4a0e('0x13')]();});}};}function handleEntityNotFound(_0x286c99){return function(_0x4ba600){if(!_0x4ba600){_0x286c99[_0x4a0e('0x14')](0x194);}return _0x4ba600;};}function handleError(_0x261e55,_0x502f55){_0x502f55=_0x502f55||0x1f4;return function(_0x3572c6){logger['error'](_0x3572c6[_0x4a0e('0x15')]);if(_0x3572c6[_0x4a0e('0x16')]){delete _0x3572c6[_0x4a0e('0x16')];}_0x261e55[_0x4a0e('0x8')](_0x502f55)[_0x4a0e('0x17')](_0x3572c6);};}exports[_0x4a0e('0x18')]=function(_0x3941bd,_0x4492ab){var _0x2b957f={},_0x6b0cea={},_0x4cefb6={'count':0x0,'rows':[]};var _0x4ab171=_['map'](db[_0x4a0e('0x19')]['rawAttributes'],function(_0x2df4f6){return{'name':_0x2df4f6[_0x4a0e('0x1a')],'type':_0x2df4f6[_0x4a0e('0x1b')][_0x4a0e('0x1c')]};});_0x6b0cea[_0x4a0e('0x1d')]=_[_0x4a0e('0x1e')](_0x4ab171,_0x4a0e('0x16'));_0x6b0cea[_0x4a0e('0x1f')]=_['keys'](_0x3941bd[_0x4a0e('0x1f')]);_0x6b0cea['filters']=_[_0x4a0e('0x20')](_0x6b0cea[_0x4a0e('0x1d')],_0x6b0cea[_0x4a0e('0x1f')]);_0x2b957f[_0x4a0e('0x21')]=_[_0x4a0e('0x20')](_0x6b0cea['model'],qs[_0x4a0e('0x22')](_0x3941bd[_0x4a0e('0x1f')][_0x4a0e('0x22')]));_0x2b957f[_0x4a0e('0x21')]=_0x2b957f[_0x4a0e('0x21')][_0x4a0e('0x23')]?_0x2b957f[_0x4a0e('0x21')]:_0x6b0cea[_0x4a0e('0x1d')];if(!_0x3941bd[_0x4a0e('0x1f')][_0x4a0e('0x24')](_0x4a0e('0x25'))){_0x2b957f[_0x4a0e('0xc')]=qs[_0x4a0e('0xc')](_0x3941bd[_0x4a0e('0x1f')][_0x4a0e('0xc')]);_0x2b957f[_0x4a0e('0xa')]=qs['offset'](_0x3941bd[_0x4a0e('0x1f')][_0x4a0e('0xa')]);}_0x2b957f[_0x4a0e('0x26')]=qs[_0x4a0e('0x27')](_0x3941bd[_0x4a0e('0x1f')][_0x4a0e('0x27')]);_0x2b957f['where']=qs[_0x4a0e('0x28')](_[_0x4a0e('0x29')](_0x3941bd[_0x4a0e('0x1f')],_0x6b0cea['filters']),_0x4ab171);if(_0x3941bd[_0x4a0e('0x1f')]['filter']){_0x2b957f[_0x4a0e('0x2a')]=_[_0x4a0e('0x2b')](_0x2b957f['where'],{'$or':_[_0x4a0e('0x1e')](_0x4ab171,function(_0x418a1c){if(_0x418a1c[_0x4a0e('0x1b')]!==_0x4a0e('0x2c')){var _0x1aa47a={};_0x1aa47a[_0x418a1c['name']]={'$like':'%'+_0x3941bd[_0x4a0e('0x1f')][_0x4a0e('0x2d')]+'%'};return _0x1aa47a;}})});}_0x2b957f=_[_0x4a0e('0x2b')]({},_0x2b957f,_0x3941bd[_0x4a0e('0x2e')]);var _0x212aa5={'where':_0x2b957f[_0x4a0e('0x2a')]};return db[_0x4a0e('0x19')]['count'](_0x212aa5)[_0x4a0e('0x12')](function(_0x1aa064){_0x4cefb6[_0x4a0e('0xd')]=_0x1aa064;if(_0x3941bd[_0x4a0e('0x1f')]['includeAll']){_0x2b957f[_0x4a0e('0x2f')]=[{'all':!![]}];}return db['Dynamics365Account'][_0x4a0e('0x30')](_0x2b957f);})[_0x4a0e('0x12')](function(_0x12824e){_0x4cefb6[_0x4a0e('0x31')]=_0x12824e;return _0x4cefb6;})[_0x4a0e('0x12')](respondWithFilteredResult(_0x4492ab,_0x2b957f))[_0x4a0e('0x32')](handleError(_0x4492ab,null));};exports[_0x4a0e('0x33')]=function(_0x4bcd7a,_0x51124c){var _0x2890ec={'raw':![],'where':{'id':_0x4bcd7a[_0x4a0e('0x34')]['id']}},_0x7316b7={};_0x7316b7[_0x4a0e('0x1d')]=_['keys'](db['Dynamics365Account'][_0x4a0e('0x35')]);_0x7316b7['query']=_[_0x4a0e('0x36')](_0x4bcd7a[_0x4a0e('0x1f')]);_0x7316b7[_0x4a0e('0x28')]=_['intersection'](_0x7316b7[_0x4a0e('0x1d')],_0x7316b7['query']);_0x2890ec['attributes']=_[_0x4a0e('0x20')](_0x7316b7[_0x4a0e('0x1d')],qs['fields'](_0x4bcd7a[_0x4a0e('0x1f')][_0x4a0e('0x22')]));_0x2890ec[_0x4a0e('0x21')]=_0x2890ec[_0x4a0e('0x21')][_0x4a0e('0x23')]?_0x2890ec[_0x4a0e('0x21')]:_0x7316b7[_0x4a0e('0x1d')];if(_0x4bcd7a[_0x4a0e('0x1f')]['includeAll']){_0x2890ec[_0x4a0e('0x2f')]=[{'all':!![]}];}_0x2890ec=_['merge']({},_0x2890ec,_0x4bcd7a['options']);return db[_0x4a0e('0x19')][_0x4a0e('0x37')](_0x2890ec)[_0x4a0e('0x12')](handleEntityNotFound(_0x51124c,null))[_0x4a0e('0x12')](respondWithResult(_0x51124c,null))[_0x4a0e('0x32')](handleError(_0x51124c,null));};exports[_0x4a0e('0x38')]=function(_0xf69502,_0x397f3e){return db[_0x4a0e('0x19')][_0x4a0e('0x38')](_0xf69502['body'],{})[_0x4a0e('0x12')](respondWithResult(_0x397f3e,0xc9))[_0x4a0e('0x32')](handleError(_0x397f3e,null));};exports[_0x4a0e('0x10')]=function(_0x534060,_0x69ef63){if(_0x534060[_0x4a0e('0x39')]['id']){delete _0x534060[_0x4a0e('0x39')]['id'];}return db[_0x4a0e('0x19')][_0x4a0e('0x37')]({'where':{'id':_0x534060[_0x4a0e('0x34')]['id']}})['then'](handleEntityNotFound(_0x69ef63,null))[_0x4a0e('0x12')](saveUpdates(_0x534060[_0x4a0e('0x39')],null))[_0x4a0e('0x12')](respondWithResult(_0x69ef63,null))['catch'](handleError(_0x69ef63,null));};exports['destroy']=function(_0x27226d,_0x189e2f){return db[_0x4a0e('0x19')][_0x4a0e('0x37')]({'where':{'id':_0x27226d[_0x4a0e('0x34')]['id']}})[_0x4a0e('0x12')](handleEntityNotFound(_0x189e2f,null))['then'](removeEntity(_0x189e2f,null))[_0x4a0e('0x32')](handleError(_0x189e2f,null));};exports[_0x4a0e('0x3a')]=function(_0x4b1604,_0x5c2db3){var _0x400e3f={};var _0x2feee8={};var _0x2892d8;var _0x2fb597;return db['Dynamics365Account'][_0x4a0e('0x3b')]({'where':{'id':_0x4b1604['params']['id']}})[_0x4a0e('0x12')](handleEntityNotFound(_0x5c2db3,null))[_0x4a0e('0x12')](function(_0x480ae9){if(_0x480ae9){_0x2892d8=_0x480ae9;_0x2feee8['model']=_[_0x4a0e('0x36')](db['Dynamics365Configuration'][_0x4a0e('0x35')]);_0x2feee8[_0x4a0e('0x1f')]=_[_0x4a0e('0x36')](_0x4b1604[_0x4a0e('0x1f')]);_0x2feee8[_0x4a0e('0x28')]=_[_0x4a0e('0x20')](_0x2feee8[_0x4a0e('0x1d')],_0x2feee8[_0x4a0e('0x1f')]);_0x400e3f[_0x4a0e('0x21')]=_[_0x4a0e('0x20')](_0x2feee8[_0x4a0e('0x1d')],qs[_0x4a0e('0x22')](_0x4b1604[_0x4a0e('0x1f')][_0x4a0e('0x22')]));_0x400e3f[_0x4a0e('0x21')]=_0x400e3f[_0x4a0e('0x21')][_0x4a0e('0x23')]?_0x400e3f[_0x4a0e('0x21')]:_0x2feee8[_0x4a0e('0x1d')];_0x400e3f[_0x4a0e('0x26')]=qs[_0x4a0e('0x27')](_0x4b1604[_0x4a0e('0x1f')][_0x4a0e('0x27')]);_0x400e3f[_0x4a0e('0x2a')]=qs[_0x4a0e('0x28')](_['pick'](_0x4b1604[_0x4a0e('0x1f')],_0x2feee8[_0x4a0e('0x28')]));if(_0x4b1604[_0x4a0e('0x1f')][_0x4a0e('0x2d')]){_0x400e3f[_0x4a0e('0x2a')]=_[_0x4a0e('0x2b')](_0x400e3f[_0x4a0e('0x2a')],{'$or':_[_0x4a0e('0x1e')](_0x400e3f[_0x4a0e('0x21')],function(_0xbb99e3){var _0x5c17fb={};_0x5c17fb[_0xbb99e3]={'$like':'%'+_0x4b1604[_0x4a0e('0x1f')][_0x4a0e('0x2d')]+'%'};return _0x5c17fb;})});}_0x400e3f=_[_0x4a0e('0x2b')]({},_0x400e3f,_0x4b1604[_0x4a0e('0x2e')]);return _0x2892d8[_0x4a0e('0x3a')](_0x400e3f);}})['then'](function(_0x4781b6){if(_0x4781b6){_0x2fb597=_0x4781b6[_0x4a0e('0x23')];if(!_0x4b1604[_0x4a0e('0x1f')][_0x4a0e('0x24')](_0x4a0e('0x25'))){_0x400e3f[_0x4a0e('0xc')]=qs[_0x4a0e('0xc')](_0x4b1604[_0x4a0e('0x1f')]['limit']);_0x400e3f['offset']=qs[_0x4a0e('0xa')](_0x4b1604['query'][_0x4a0e('0xa')]);}return _0x2892d8[_0x4a0e('0x3a')](_0x400e3f);}})[_0x4a0e('0x12')](function(_0x47b86f){if(_0x47b86f){return _0x47b86f?{'count':_0x2fb597,'rows':_0x47b86f}:null;}})[_0x4a0e('0x12')](respondWithResult(_0x5c2db3,null))[_0x4a0e('0x32')](handleError(_0x5c2db3,null));};exports[_0x4a0e('0x3c')]=function(_0x2e7ce0,_0x46695a){if(_0x2e7ce0[_0x4a0e('0x39')]['id']){delete _0x2e7ce0[_0x4a0e('0x39')]['id'];}return db[_0x4a0e('0x19')][_0x4a0e('0x3b')]({'where':{'id':_0x2e7ce0[_0x4a0e('0x34')]['id']}})[_0x4a0e('0x12')](handleEntityNotFound(_0x46695a,null))[_0x4a0e('0x12')](function(_0x4f3a5c){if(_0x4f3a5c){_0x2e7ce0[_0x4a0e('0x39')]['AccountId']=_0x4f3a5c['id'];_0x2e7ce0['body'][_0x4a0e('0x3d')]=integrations[_0x4a0e('0x3e')](_0x2e7ce0[_0x4a0e('0x39')][_0x4a0e('0x3f')],_0x2e7ce0[_0x4a0e('0x39')][_0x4a0e('0x1b')]);_0x2e7ce0[_0x4a0e('0x39')]['Descriptions']=integrations[_0x4a0e('0x40')](_0x2e7ce0[_0x4a0e('0x39')][_0x4a0e('0x3f')],_0x2e7ce0[_0x4a0e('0x39')][_0x4a0e('0x1b')]);return db[_0x4a0e('0x41')][_0x4a0e('0x38')](_0x2e7ce0[_0x4a0e('0x39')],{'include':[{'model':db[_0x4a0e('0x42')],'as':_0x4a0e('0x3d')},{'model':db['Dynamics365Field'],'as':_0x4a0e('0x43')}]});}return null;})['then'](respondWithResult(_0x46695a,null))[_0x4a0e('0x32')](handleError(_0x46695a,null));};function sanitizeRemoteUri(_0x2c3522){var _0xa825b=_0x2c3522['slice'](-0x1);if(_0xa825b==='/')return _0x2c3522[_0x4a0e('0x44')](0x0,_0x2c3522[_0x4a0e('0x45')](_0xa825b));return _0x2c3522;}function getWebApiUrl(_0x41704d){return util['format'](_0x4a0e('0x46'),_0x41704d);}exports[_0x4a0e('0x47')]=function(_0x64ac90,_0x71ea58){var _0x2fe490=_0x64ac90['query'][_0x4a0e('0x48')];var _0x1806a5=_0x2fe490==='incident'?_0x4a0e('0x49'):'PhoneCall';var _0x584d42='';var _0x110853='';var _0x71607d='';var _0x926707='';var _0xa5e1ca='';var _0xb61e08='';var _0x59ff27='';var _0x3338e1='';var _0x4fa16a=[_0x4a0e('0x4a'),_0x4a0e('0x4b'),_0x4a0e('0x4c'),_0x4a0e('0x4d'),_0x4a0e('0x4e'),_0x4a0e('0x4f'),_0x4a0e('0x50'),_0x4a0e('0x51'),_0x4a0e('0x52'),_0x4a0e('0x53')];var _0x57b317=[_0x4a0e('0x54'),_0x4a0e('0x55'),_0x4a0e('0x56'),_0x4a0e('0x57'),_0x4a0e('0x58'),_0x4a0e('0x59'),_0x4a0e('0x5a'),_0x4a0e('0x5b'),'createdbyexternalpartyname',_0x4a0e('0x5c'),_0x4a0e('0x5d'),'createdbyyominame',_0x4a0e('0x5e'),'createdonbehalfbyname',_0x4a0e('0x5f'),_0x4a0e('0x60'),'customeridtype','customeridyominame',_0x4a0e('0x61'),_0x4a0e('0x62'),_0x4a0e('0x63'),'entityimage_url','escalatedon',_0x4a0e('0x64'),_0x4a0e('0x65'),_0x4a0e('0x66'),_0x4a0e('0x67'),_0x4a0e('0x68'),'kbarticleidname',_0x4a0e('0x69'),_0x4a0e('0x6a'),'modifiedbyexternalpartyname',_0x4a0e('0x6b'),'modifiedbyname',_0x4a0e('0x6c'),_0x4a0e('0x6d'),_0x4a0e('0x6e'),_0x4a0e('0x6f'),_0x4a0e('0x70'),_0x4a0e('0x71'),_0x4a0e('0x72'),_0x4a0e('0x73'),_0x4a0e('0x74'),_0x4a0e('0x75'),_0x4a0e('0x76'),_0x4a0e('0x77'),_0x4a0e('0x78'),_0x4a0e('0x79'),_0x4a0e('0x7a'),_0x4a0e('0x7b'),_0x4a0e('0x7c'),_0x4a0e('0x7d'),_0x4a0e('0x7e'),_0x4a0e('0x7f'),_0x4a0e('0x80'),_0x4a0e('0x81'),_0x4a0e('0x82'),_0x4a0e('0x83'),_0x4a0e('0x84'),'slaname',_0x4a0e('0x85'),_0x4a0e('0x86'),_0x4a0e('0x87'),_0x4a0e('0x88'),'ticketnumber',_0x4a0e('0x89'),'transactioncurrencyidname',_0x4a0e('0x8a'),_0x4a0e('0x8b'),_0x4a0e('0x8c')];var _0x1d4e9c=_0x4fa16a[_0x4a0e('0x8d')](_0x57b317);return db[_0x4a0e('0x19')][_0x4a0e('0x3b')]({'where':{'id':_0x64ac90[_0x4a0e('0x34')]['id']},'attributes':['id',_0x4a0e('0x8e'),'password','remoteUri',_0x4a0e('0x8f'),_0x4a0e('0x90'),_0x4a0e('0x91'),_0x4a0e('0x92')],'include':[{'model':db[_0x4a0e('0x93')],'as':'CloudProvider','attributes':['id',_0x4a0e('0x94'),_0x4a0e('0x95')]}]})[_0x4a0e('0x12')](handleEntityNotFound(_0x71ea58,null))[_0x4a0e('0x12')](function(_0x2cbd39){if(_0x2cbd39){if(_0x2cbd39[_0x4a0e('0x92')]){_0x2cbd39[_0x4a0e('0x96')]=_0x2cbd39[_0x4a0e('0x93')]['data5'];_0x3338e1=sanitizeRemoteUri(_0x2cbd39[_0x4a0e('0x93')]['data7']);_0x59ff27=getWebApiUrl(_0x3338e1);return _0x2cbd39;}_0x3338e1=sanitizeRemoteUri(_0x2cbd39['remoteUri']);_0x59ff27=getWebApiUrl(_0x3338e1);var _0x5c1b8d={'method':'POST','uri':_0x4a0e('0x97')+_0x2cbd39[_0x4a0e('0x8f')]+_0x4a0e('0x98'),'form':{'client_id':_0x2cbd39[_0x4a0e('0x90')],'resource':_0x3338e1,'username':_0x2cbd39['username'],'password':_0x2cbd39[_0x4a0e('0x99')],'grant_type':_0x4a0e('0x99'),'client_secret':_0x2cbd39[_0x4a0e('0x91')]},'json':!![]};return rp(_0x5c1b8d);}})[_0x4a0e('0x12')](function(_0x1531ef){_0xb61e08=_0x1531ef[_0x4a0e('0x96')];var _0x481b77={'method':_0x4a0e('0x9a'),'uri':encodeURI(_0x59ff27+_0x4a0e('0x9b')+_0x1806a5+'\x27'),'headers':{'Authorization':_0x4a0e('0x9c')+_0xb61e08,'If-None-Match':null,'OData-Version':_0x4a0e('0x9d')},'json':!![]};return rp(_0x481b77);})[_0x4a0e('0x12')](function(_0x2479f0){var _0x12c5cc=_0x2479f0[_0x4a0e('0x9e')][0x0];var _0x35a8ce=_0x12c5cc[_0x4a0e('0x9f')];var _0x5ed19b={'method':_0x4a0e('0x9a'),'uri':_0x59ff27+'EntityDefinitions('+_0x35a8ce+')?$select=LogicalName&$expand=Attributes($select=LogicalName)','headers':{'Authorization':_0x4a0e('0x9c')+_0xb61e08,'If-None-Match':null,'OData-Version':_0x4a0e('0x9d')},'json':!![]};return rp(_0x5ed19b);})[_0x4a0e('0x12')](function(_0x240939){_0x584d42=_0x240939;_0x110853=_0x584d42[_0x4a0e('0xa0')];_0x110853=_['remove'](_0x110853,function(_0x2a437a){return!_0x1d4e9c[_0x4a0e('0xa1')](_0x2a437a[_0x4a0e('0xa2')]);});var _0x15b450=[];var _0x540668=[];_0x110853[_0x4a0e('0xa3')](function(_0xc28610){if(_0xc28610[_0x4a0e('0xa4')]){var _0x2bd2b0=_0xc28610[_0x4a0e('0xa4')][_0x4a0e('0x44')](_0xc28610[_0x4a0e('0xa4')]['lastIndexOf']('.')+0x1);if(_0x2bd2b0===_0x4a0e('0xa5')){_0x15b450[_0x4a0e('0xa6')](getSelectList(_0x59ff27,_0x2fe490,_0x540668,_0x584d42[_0x4a0e('0x9f')],_0xc28610[_0x4a0e('0x9f')],_0xb61e08));}}});return Promise[_0x4a0e('0xa7')](_0x15b450);})['then'](function(_0x384cc5){_0x71607d=_0x384cc5[0x0];var _0x26068f=[];var _0x49137b=[];_0x110853[_0x4a0e('0xa3')](function(_0x5c6a02){if(!_[_0x4a0e('0xa8')](_0x5c6a02[_0x4a0e('0xa4')])){var _0x30a813=_0x5c6a02[_0x4a0e('0xa4')][_0x4a0e('0x44')](_0x5c6a02[_0x4a0e('0xa4')]['lastIndexOf']('.')+0x1);if(_0x30a813===_0x4a0e('0xa9')){_0x26068f['push'](getBooleanList(_0x59ff27,_0x2fe490,_0x49137b,_0x584d42['MetadataId'],_0x5c6a02[_0x4a0e('0x9f')],_0xb61e08));}}});return Promise[_0x4a0e('0xa7')](_0x26068f);})[_0x4a0e('0x12')](function(_0xff3d5){_0x926707=_0xff3d5[0x0];var _0x5637df=[];var _0x553f7d=[];_0x110853[_0x4a0e('0xa3')](function(_0x3dea1b){if(_0x3dea1b[_0x4a0e('0xa4')]){var _0x4d602d=_0x3dea1b[_0x4a0e('0xa4')]['substring'](_0x3dea1b['@odata.type'][_0x4a0e('0x45')]('.')+0x1);if(_0x4d602d===_0x4a0e('0xaa')||_0x4d602d===_0x4a0e('0xab')||_0x4d602d===_0x4a0e('0xac')||_0x4d602d===_0x4a0e('0xad')||_0x4d602d===_0x4a0e('0xae')||_0x4d602d===_0x4a0e('0xaf')||_0x4d602d==='StatusAttributeMetadata'||_0x4d602d===_0x4a0e('0xb0')||_0x4d602d===_0x4a0e('0xb1')||_0x4d602d===_0x4a0e('0xb2')){_0x5637df['push'](getInputList(_0x59ff27,_0x2fe490,_0x4d602d,_0x553f7d,_0x584d42[_0x4a0e('0x9f')],_0x3dea1b[_0x4a0e('0x9f')],_0xb61e08));}}});return Promise[_0x4a0e('0xa7')](_0x5637df);})['then'](function(_0x5d7a6d){_0xa5e1ca=_0x5d7a6d[0x0];var _0x40694c=_0x71607d[_0x4a0e('0x8d')](_0x926707)[_0x4a0e('0x8d')](_0xa5e1ca);var _0x3009d2={'count':_0x40694c['length'],'rows':_0x40694c};return _0x3009d2;})[_0x4a0e('0x12')](respondWithResult(_0x71ea58,null))[_0x4a0e('0x32')](function(_0x14283d){var _0x24a7f7=_0x64ac90[_0x4a0e('0x1f')]['test']?0x1f4:_0x14283d[_0x4a0e('0xb3')]||0x1f4;logger[_0x4a0e('0xb4')](_0x14283d[_0x4a0e('0x15')]);delete _0x14283d['name'];if(_0x24a7f7===0x191){_0x24a7f7=0x190;}_0x71ea58[_0x4a0e('0x8')](_0x24a7f7)[_0x4a0e('0x17')](_0x64ac90[_0x4a0e('0x1f')][_0x4a0e('0xb5')]?{'message':_0x4a0e('0xb6'),'statusCode':_0x14283d[_0x4a0e('0xb3')]}:_0x14283d);});};function getSelectList(_0xd353a1,_0xd6b6ac,_0x3acb06,_0x494cee,_0x15b599,_0x2c5869){var _0x3c47bb={'method':_0x4a0e('0x9a'),'uri':_0xd353a1+_0x4a0e('0xb7')+_0x494cee+_0x4a0e('0xb8')+_0x15b599+_0x4a0e('0xb9')+'$select=DisplayName,LogicalName&$expand=OptionSet($select=Options)','headers':{'Authorization':'Bearer\x20'+_0x2c5869,'If-None-Match':null,'OData-Version':'4.0'},'json':!![]};return rp(_0x3c47bb)[_0x4a0e('0x12')](function(_0x3fd42a){var _0x23da97=[];var _0x4d4014=_0x3fd42a[_0x4a0e('0xba')][_0x4a0e('0xbb')];_0x4d4014[_0x4a0e('0xa3')](function(_0x563c1e){_0x23da97[_0x4a0e('0xa6')]({'name':_0x563c1e[_0x4a0e('0xbc')]['UserLocalizedLabel'][_0x4a0e('0xbc')],'value':String(_0x563c1e['Value'])});});var _0x2533f8={'id':_0xd6b6ac+'_'+_0x3fd42a['LogicalName'],'name':_0x3fd42a[_0x4a0e('0xbd')]['UserLocalizedLabel'][_0x4a0e('0xbc')],'custom':![],'options':_0x23da97};_0x3acb06[_0x4a0e('0xa6')](_0x2533f8);return _0x3acb06;});}function getBooleanList(_0x288ae8,_0x21c7f2,_0x583843,_0x1555e1,_0x42c716,_0x3f91c7){var _0x12a51e={'method':_0x4a0e('0x9a'),'uri':_0x288ae8+_0x4a0e('0xb7')+_0x1555e1+_0x4a0e('0xb8')+_0x42c716+_0x4a0e('0xbe'),'headers':{'Authorization':_0x4a0e('0x9c')+_0x3f91c7,'If-None-Match':null,'OData-Version':_0x4a0e('0x9d')},'json':!![]};return rp(_0x12a51e)[_0x4a0e('0x12')](function(_0x4dfde5){var _0x4d7250=[];_0x4d7250[_0x4a0e('0xa6')]({'name':_0x4dfde5[_0x4a0e('0xba')][_0x4a0e('0xbf')][_0x4a0e('0xbc')][_0x4a0e('0xc0')][_0x4a0e('0xbc')],'value':_0x4a0e('0xc1')},{'name':_0x4dfde5[_0x4a0e('0xba')]['FalseOption']['Label']['UserLocalizedLabel']['Label'],'value':_0x4a0e('0xc2')});var _0x10a0b0={'id':_0x21c7f2+'_'+_0x4dfde5[_0x4a0e('0xa2')],'name':_0x4dfde5['DisplayName'][_0x4a0e('0xc0')][_0x4a0e('0xbc')],'custom':![],'options':_0x4d7250};_0x583843['push'](_0x10a0b0);return _0x583843;});}function getInputList(_0x455aa6,_0x3acf8a,_0x5533c2,_0x383b5f,_0x3d27a4,_0x145a86,_0x2b099e){var _0xd2a900={'method':_0x4a0e('0x9a'),'uri':_0x455aa6+_0x4a0e('0xb7')+_0x3d27a4+_0x4a0e('0xb8')+_0x145a86+')/Microsoft.Dynamics.CRM.'+_0x5533c2+_0x4a0e('0xc3'),'headers':{'Authorization':_0x4a0e('0x9c')+_0x2b099e,'If-None-Match':null,'OData-Version':_0x4a0e('0x9d')},'json':!![]};return rp(_0xd2a900)[_0x4a0e('0x12')](function(_0x1e9567){var _0x2b8112={'id':_0x3acf8a+'_'+_0x1e9567['LogicalName'],'name':_0x1e9567[_0x4a0e('0xbd')][_0x4a0e('0xc0')]?_0x1e9567['DisplayName'][_0x4a0e('0xc0')][_0x4a0e('0xbc')]:_0x1e9567[_0x4a0e('0xa2')],'custom':![],'options':[]};_0x383b5f[_0x4a0e('0xa6')](_0x2b8112);return _0x383b5f;});}
\ No newline at end of file
+var _0xb7d1=['ticketType','incident','Incident','PhoneCall','title','description','ownerid','caseorigincode','subject','phonenumber','regardingobjectid','directioncode','phonecall_activity_parties','accountidyominame','actualserviceunits','billedserviceunits','contactidyominame','contractdetailidname','contractidname','createdbyexternalpartyname','createdbyexternalpartyyominame','createdbyname','createdon','createdonbehalfbyname','createdonbehalfbyyominame','customeridname','customeridtype','emailaddress','entitlementidname','entityimage_url','escalatedon','firstresponsebykpiidname','followupby','importsequencenumber','influencescore','lastonholdtime','masteridname','modifiedbyexternalpartyyominame','modifiedbyname','modifiedbyyominame','modifiedonbehalfbyname','msdyn_incidenttypename','msdyn_iotalertname','onholdtime','overriddencreatedon','owneridname','owneridtype','parentcaseidname','primarycontactidyominame','prioritycodename','productidname','productserialnumber','resolveby','responseby','responsiblecontactidname','responsiblecontactidyominame','slainvokedidname','slaname','socialprofileidname','statecode','statuscode','subjectidname','ticketnumber','timezoneruleversionnumber','transactioncurrencyidname','versionnumber','username','password','remoteUri','tenantId','clientId','clientSecret','CloudProvider','data5','data7','modernAuthentication','POST','https://login.microsoftonline.com/','access_token','EntityDefinitions?$select=DisplayName,EntitySetName&$filter=SchemaName\x20eq\x20\x27','4.0','value','MetadataId','EntityDefinitions(',')?$select=LogicalName&$expand=Attributes($select=LogicalName)','Bearer\x20','remove','includes','LogicalName','forEach','@odata.type','PicklistAttributeMetadata','push','all','isNil','BigIntAttributeMetadata','IntegerAttributeMetadata','MemoAttributeMetadata','DateTimeAttributeMetadata','EntityNameAttributeMetadata','StateAttributeMetadata','concat','error','test','GET',')/Attributes(',')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?','$select=DisplayName,LogicalName&$expand=OptionSet($select=Options)','OptionSet','Options','Label','UserLocalizedLabel','Value','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','api','../../components/integrations/configuration','json','offset','undefined','limit','count','status','set','Content-Range','then','end','stack','name','send','index','Dynamics365Account','fieldName','type','key','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','where','pick','filter','merge','options','findAll','rows','catch','show','params','keys','include','create','body','update','find','getConfigurations','findOne','Dynamics365Configuration','rawAttributes','sort','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','Dynamics365Field','slice','substring','lastIndexOf','format','%s/api/data/v9.0/','getFields'];(function(_0x2da5d6,_0xd519de){var _0x2634f9=function(_0x1fefe2){while(--_0x1fefe2){_0x2da5d6['push'](_0x2da5d6['shift']());}};_0x2634f9(++_0xd519de);}(_0xb7d1,0x79));var _0x1b7d=function(_0x4c3d04,_0x435c08){_0x4c3d04=_0x4c3d04-0x0;var _0x427568=_0xb7d1[_0x4c3d04];return _0x427568;};'use strict';var rp=require(_0x1b7d('0x0'));var util=require(_0x1b7d('0x1'));var _=require(_0x1b7d('0x2'));var qs=require(_0x1b7d('0x3'));var logger=require(_0x1b7d('0x4'))(_0x1b7d('0x5'));var db=require('../../mysqldb')['db'];var integrations=require(_0x1b7d('0x6'));function respondWithResult(_0x50b219,_0x5af97d){_0x5af97d=_0x5af97d||0xc8;return function(_0x53bb98){if(_0x53bb98){return _0x50b219['status'](_0x5af97d)[_0x1b7d('0x7')](_0x53bb98);}};}function respondWithFilteredResult(_0xcbf80d,_0xe7436b){return function(_0x21d814){if(_0x21d814){var _0x2eb249=typeof _0xe7436b[_0x1b7d('0x8')]===_0x1b7d('0x9')&&typeof _0xe7436b[_0x1b7d('0xa')]===_0x1b7d('0x9');var _0x13d7e6=_0x21d814['count'];var _0xaf2510=_0x2eb249?0x0:_0xe7436b[_0x1b7d('0x8')];var _0xa12fc2=_0x2eb249?_0x21d814[_0x1b7d('0xb')]:_0xe7436b[_0x1b7d('0x8')]+_0xe7436b[_0x1b7d('0xa')];var _0x328c3e;if(_0xa12fc2>=_0x13d7e6){_0xa12fc2=_0x13d7e6;_0x328c3e=0xc8;}else{_0x328c3e=0xce;}_0xcbf80d[_0x1b7d('0xc')](_0x328c3e);return _0xcbf80d[_0x1b7d('0xd')](_0x1b7d('0xe'),_0xaf2510+'-'+_0xa12fc2+'/'+_0x13d7e6)[_0x1b7d('0x7')](_0x21d814);}return null;};}function saveUpdates(_0x288dfd){return function(_0x48853f){if(_0x48853f){return _0x48853f['update'](_0x288dfd)[_0x1b7d('0xf')](function(_0x381865){return _0x381865;});}return null;};}function removeEntity(_0x2c5bfc){return function(_0x1f448f){if(_0x1f448f){return _0x1f448f['destroy']()[_0x1b7d('0xf')](function(){_0x2c5bfc[_0x1b7d('0xc')](0xcc)[_0x1b7d('0x10')]();});}};}function handleEntityNotFound(_0x15ed67){return function(_0x787ad8){if(!_0x787ad8){_0x15ed67['sendStatus'](0x194);}return _0x787ad8;};}function handleError(_0x26ad2e,_0x82c937){_0x82c937=_0x82c937||0x1f4;return function(_0x42d207){logger['error'](_0x42d207[_0x1b7d('0x11')]);if(_0x42d207[_0x1b7d('0x12')]){delete _0x42d207[_0x1b7d('0x12')];}_0x26ad2e[_0x1b7d('0xc')](_0x82c937)[_0x1b7d('0x13')](_0x42d207);};}exports[_0x1b7d('0x14')]=function(_0x327f36,_0x1ad55a){var _0x219ca9={},_0x37a81a={},_0x546a93={'count':0x0,'rows':[]};var _0x1e4fb9=_['map'](db[_0x1b7d('0x15')]['rawAttributes'],function(_0x8a4eb2){return{'name':_0x8a4eb2[_0x1b7d('0x16')],'type':_0x8a4eb2[_0x1b7d('0x17')][_0x1b7d('0x18')]};});_0x37a81a[_0x1b7d('0x19')]=_[_0x1b7d('0x1a')](_0x1e4fb9,_0x1b7d('0x12'));_0x37a81a[_0x1b7d('0x1b')]=_['keys'](_0x327f36['query']);_0x37a81a[_0x1b7d('0x1c')]=_[_0x1b7d('0x1d')](_0x37a81a[_0x1b7d('0x19')],_0x37a81a[_0x1b7d('0x1b')]);_0x219ca9[_0x1b7d('0x1e')]=_[_0x1b7d('0x1d')](_0x37a81a['model'],qs[_0x1b7d('0x1f')](_0x327f36['query'][_0x1b7d('0x1f')]));_0x219ca9[_0x1b7d('0x1e')]=_0x219ca9['attributes'][_0x1b7d('0x20')]?_0x219ca9['attributes']:_0x37a81a[_0x1b7d('0x19')];if(!_0x327f36[_0x1b7d('0x1b')][_0x1b7d('0x21')](_0x1b7d('0x22'))){_0x219ca9[_0x1b7d('0xa')]=qs[_0x1b7d('0xa')](_0x327f36['query'][_0x1b7d('0xa')]);_0x219ca9['offset']=qs[_0x1b7d('0x8')](_0x327f36['query'][_0x1b7d('0x8')]);}_0x219ca9[_0x1b7d('0x23')]=qs['sort'](_0x327f36[_0x1b7d('0x1b')]['sort']);_0x219ca9[_0x1b7d('0x24')]=qs[_0x1b7d('0x1c')](_[_0x1b7d('0x25')](_0x327f36['query'],_0x37a81a[_0x1b7d('0x1c')]),_0x1e4fb9);if(_0x327f36[_0x1b7d('0x1b')][_0x1b7d('0x26')]){_0x219ca9['where']=_[_0x1b7d('0x27')](_0x219ca9['where'],{'$or':_[_0x1b7d('0x1a')](_0x1e4fb9,function(_0x36040c){if(_0x36040c[_0x1b7d('0x17')]!=='VIRTUAL'){var _0x4ac7a1={};_0x4ac7a1[_0x36040c['name']]={'$like':'%'+_0x327f36[_0x1b7d('0x1b')][_0x1b7d('0x26')]+'%'};return _0x4ac7a1;}})});}_0x219ca9=_[_0x1b7d('0x27')]({},_0x219ca9,_0x327f36[_0x1b7d('0x28')]);var _0x690b0a={'where':_0x219ca9['where']};return db[_0x1b7d('0x15')][_0x1b7d('0xb')](_0x690b0a)[_0x1b7d('0xf')](function(_0x49f8e2){_0x546a93['count']=_0x49f8e2;if(_0x327f36[_0x1b7d('0x1b')]['includeAll']){_0x219ca9['include']=[{'all':!![]}];}return db['Dynamics365Account'][_0x1b7d('0x29')](_0x219ca9);})[_0x1b7d('0xf')](function(_0x256b40){_0x546a93[_0x1b7d('0x2a')]=_0x256b40;return _0x546a93;})[_0x1b7d('0xf')](respondWithFilteredResult(_0x1ad55a,_0x219ca9))[_0x1b7d('0x2b')](handleError(_0x1ad55a,null));};exports[_0x1b7d('0x2c')]=function(_0x3aaec6,_0x5d0ffa){var _0x209726={'raw':![],'where':{'id':_0x3aaec6[_0x1b7d('0x2d')]['id']}},_0x599faf={};_0x599faf[_0x1b7d('0x19')]=_[_0x1b7d('0x2e')](db[_0x1b7d('0x15')]['rawAttributes']);_0x599faf[_0x1b7d('0x1b')]=_[_0x1b7d('0x2e')](_0x3aaec6[_0x1b7d('0x1b')]);_0x599faf['filters']=_[_0x1b7d('0x1d')](_0x599faf[_0x1b7d('0x19')],_0x599faf['query']);_0x209726[_0x1b7d('0x1e')]=_[_0x1b7d('0x1d')](_0x599faf[_0x1b7d('0x19')],qs[_0x1b7d('0x1f')](_0x3aaec6[_0x1b7d('0x1b')][_0x1b7d('0x1f')]));_0x209726[_0x1b7d('0x1e')]=_0x209726[_0x1b7d('0x1e')][_0x1b7d('0x20')]?_0x209726[_0x1b7d('0x1e')]:_0x599faf[_0x1b7d('0x19')];if(_0x3aaec6[_0x1b7d('0x1b')]['includeAll']){_0x209726[_0x1b7d('0x2f')]=[{'all':!![]}];}_0x209726=_[_0x1b7d('0x27')]({},_0x209726,_0x3aaec6[_0x1b7d('0x28')]);return db[_0x1b7d('0x15')]['find'](_0x209726)[_0x1b7d('0xf')](handleEntityNotFound(_0x5d0ffa,null))[_0x1b7d('0xf')](respondWithResult(_0x5d0ffa,null))['catch'](handleError(_0x5d0ffa,null));};exports[_0x1b7d('0x30')]=function(_0x40b1e5,_0x41e3f5){return db['Dynamics365Account']['create'](_0x40b1e5[_0x1b7d('0x31')],{})['then'](respondWithResult(_0x41e3f5,0xc9))[_0x1b7d('0x2b')](handleError(_0x41e3f5,null));};exports[_0x1b7d('0x32')]=function(_0x2fa759,_0x3f0db6){if(_0x2fa759[_0x1b7d('0x31')]['id']){delete _0x2fa759[_0x1b7d('0x31')]['id'];}return db['Dynamics365Account'][_0x1b7d('0x33')]({'where':{'id':_0x2fa759[_0x1b7d('0x2d')]['id']}})[_0x1b7d('0xf')](handleEntityNotFound(_0x3f0db6,null))[_0x1b7d('0xf')](saveUpdates(_0x2fa759['body'],null))['then'](respondWithResult(_0x3f0db6,null))['catch'](handleError(_0x3f0db6,null));};exports['destroy']=function(_0x2a7f30,_0x3c6afd){return db['Dynamics365Account'][_0x1b7d('0x33')]({'where':{'id':_0x2a7f30[_0x1b7d('0x2d')]['id']}})['then'](handleEntityNotFound(_0x3c6afd,null))[_0x1b7d('0xf')](removeEntity(_0x3c6afd,null))[_0x1b7d('0x2b')](handleError(_0x3c6afd,null));};exports[_0x1b7d('0x34')]=function(_0xd0a704,_0x527127){var _0xb2ced5={};var _0x49582d={};var _0x2f53bd;var _0x5c966f;return db[_0x1b7d('0x15')][_0x1b7d('0x35')]({'where':{'id':_0xd0a704['params']['id']}})[_0x1b7d('0xf')](handleEntityNotFound(_0x527127,null))['then'](function(_0x37e9bc){if(_0x37e9bc){_0x2f53bd=_0x37e9bc;_0x49582d['model']=_['keys'](db[_0x1b7d('0x36')][_0x1b7d('0x37')]);_0x49582d['query']=_[_0x1b7d('0x2e')](_0xd0a704['query']);_0x49582d['filters']=_[_0x1b7d('0x1d')](_0x49582d[_0x1b7d('0x19')],_0x49582d[_0x1b7d('0x1b')]);_0xb2ced5[_0x1b7d('0x1e')]=_[_0x1b7d('0x1d')](_0x49582d[_0x1b7d('0x19')],qs[_0x1b7d('0x1f')](_0xd0a704[_0x1b7d('0x1b')]['fields']));_0xb2ced5['attributes']=_0xb2ced5[_0x1b7d('0x1e')][_0x1b7d('0x20')]?_0xb2ced5['attributes']:_0x49582d[_0x1b7d('0x19')];_0xb2ced5[_0x1b7d('0x23')]=qs[_0x1b7d('0x38')](_0xd0a704[_0x1b7d('0x1b')][_0x1b7d('0x38')]);_0xb2ced5[_0x1b7d('0x24')]=qs[_0x1b7d('0x1c')](_[_0x1b7d('0x25')](_0xd0a704[_0x1b7d('0x1b')],_0x49582d['filters']));if(_0xd0a704[_0x1b7d('0x1b')][_0x1b7d('0x26')]){_0xb2ced5['where']=_[_0x1b7d('0x27')](_0xb2ced5[_0x1b7d('0x24')],{'$or':_['map'](_0xb2ced5[_0x1b7d('0x1e')],function(_0x453683){var _0x11c3ea={};_0x11c3ea[_0x453683]={'$like':'%'+_0xd0a704['query'][_0x1b7d('0x26')]+'%'};return _0x11c3ea;})});}_0xb2ced5=_[_0x1b7d('0x27')]({},_0xb2ced5,_0xd0a704[_0x1b7d('0x28')]);return _0x2f53bd[_0x1b7d('0x34')](_0xb2ced5);}})['then'](function(_0x58aa6a){if(_0x58aa6a){_0x5c966f=_0x58aa6a[_0x1b7d('0x20')];if(!_0xd0a704['query'][_0x1b7d('0x21')](_0x1b7d('0x22'))){_0xb2ced5['limit']=qs['limit'](_0xd0a704[_0x1b7d('0x1b')][_0x1b7d('0xa')]);_0xb2ced5[_0x1b7d('0x8')]=qs[_0x1b7d('0x8')](_0xd0a704['query'][_0x1b7d('0x8')]);}return _0x2f53bd['getConfigurations'](_0xb2ced5);}})[_0x1b7d('0xf')](function(_0x3da757){if(_0x3da757){return _0x3da757?{'count':_0x5c966f,'rows':_0x3da757}:null;}})['then'](respondWithResult(_0x527127,null))[_0x1b7d('0x2b')](handleError(_0x527127,null));};exports[_0x1b7d('0x39')]=function(_0x4367cf,_0x5fc026){if(_0x4367cf[_0x1b7d('0x31')]['id']){delete _0x4367cf[_0x1b7d('0x31')]['id'];}return db[_0x1b7d('0x15')][_0x1b7d('0x35')]({'where':{'id':_0x4367cf[_0x1b7d('0x2d')]['id']}})[_0x1b7d('0xf')](handleEntityNotFound(_0x5fc026,null))[_0x1b7d('0xf')](function(_0x4e951b){if(_0x4e951b){_0x4367cf['body'][_0x1b7d('0x3a')]=_0x4e951b['id'];_0x4367cf[_0x1b7d('0x31')][_0x1b7d('0x3b')]=integrations[_0x1b7d('0x3c')](_0x4367cf[_0x1b7d('0x31')][_0x1b7d('0x3d')],_0x4367cf['body'][_0x1b7d('0x17')]);_0x4367cf[_0x1b7d('0x31')][_0x1b7d('0x3e')]=integrations[_0x1b7d('0x3f')](_0x4367cf[_0x1b7d('0x31')][_0x1b7d('0x3d')],_0x4367cf[_0x1b7d('0x31')][_0x1b7d('0x17')]);return db[_0x1b7d('0x36')]['create'](_0x4367cf['body'],{'include':[{'model':db[_0x1b7d('0x40')],'as':'Subjects'},{'model':db['Dynamics365Field'],'as':_0x1b7d('0x3e')}]});}return null;})[_0x1b7d('0xf')](respondWithResult(_0x5fc026,null))[_0x1b7d('0x2b')](handleError(_0x5fc026,null));};function sanitizeRemoteUri(_0x54730e){var _0x52be5d=_0x54730e[_0x1b7d('0x41')](-0x1);if(_0x52be5d==='/')return _0x54730e[_0x1b7d('0x42')](0x0,_0x54730e[_0x1b7d('0x43')](_0x52be5d));return _0x54730e;}function getWebApiUrl(_0x1bab70){return util[_0x1b7d('0x44')](_0x1b7d('0x45'),_0x1bab70);}exports[_0x1b7d('0x46')]=function(_0x46e1d0,_0xedcbee){var _0x1355d0=_0x46e1d0[_0x1b7d('0x1b')][_0x1b7d('0x47')];var _0xb9c1fb=_0x1355d0===_0x1b7d('0x48')?_0x1b7d('0x49'):_0x1b7d('0x4a');var _0x2d37b6='';var _0x56f0c2='';var _0x29bbd5='';var _0x18173a='';var _0x206d97='';var _0x328cf3='';var _0x122640='';var _0x5b3352='';var _0x386844=[_0x1b7d('0x4b'),_0x1b7d('0x4c'),'customerid',_0x1b7d('0x4d'),_0x1b7d('0x4e'),_0x1b7d('0x4f'),_0x1b7d('0x50'),_0x1b7d('0x51'),_0x1b7d('0x52'),_0x1b7d('0x53')];var _0x4a0686=['accountidname',_0x1b7d('0x54'),_0x1b7d('0x55'),_0x1b7d('0x56'),'contactidname',_0x1b7d('0x57'),_0x1b7d('0x58'),_0x1b7d('0x59'),_0x1b7d('0x5a'),_0x1b7d('0x5b'),_0x1b7d('0x5c'),'createdbyyominame',_0x1b7d('0x5d'),_0x1b7d('0x5e'),_0x1b7d('0x5f'),_0x1b7d('0x60'),_0x1b7d('0x61'),'customeridyominame',_0x1b7d('0x62'),_0x1b7d('0x63'),'entityimage_timestamp',_0x1b7d('0x64'),_0x1b7d('0x65'),'exchangerate',_0x1b7d('0x66'),_0x1b7d('0x67'),_0x1b7d('0x68'),_0x1b7d('0x69'),'kbarticleidname',_0x1b7d('0x6a'),_0x1b7d('0x6b'),'modifiedbyexternalpartyname',_0x1b7d('0x6c'),_0x1b7d('0x6d'),_0x1b7d('0x6e'),'modifiedon',_0x1b7d('0x6f'),'modifiedonbehalfbyyominame',_0x1b7d('0x70'),_0x1b7d('0x71'),'numberofchildincidents',_0x1b7d('0x72'),_0x1b7d('0x73'),_0x1b7d('0x74'),_0x1b7d('0x75'),'owneridyominame',_0x1b7d('0x76'),'primarycontactidname',_0x1b7d('0x77'),_0x1b7d('0x78'),_0x1b7d('0x79'),_0x1b7d('0x7a'),_0x1b7d('0x7b'),'resolvebykpiidname',_0x1b7d('0x7c'),_0x1b7d('0x7d'),_0x1b7d('0x7e'),'sentimentvalue',_0x1b7d('0x7f'),_0x1b7d('0x80'),_0x1b7d('0x81'),_0x1b7d('0x82'),_0x1b7d('0x83'),_0x1b7d('0x84'),_0x1b7d('0x85'),_0x1b7d('0x86'),_0x1b7d('0x87'),'traversedpath','utcconversiontimezonecode',_0x1b7d('0x88')];var _0x1b197e=_0x386844['concat'](_0x4a0686);return db['Dynamics365Account'][_0x1b7d('0x35')]({'where':{'id':_0x46e1d0[_0x1b7d('0x2d')]['id']},'attributes':['id',_0x1b7d('0x89'),_0x1b7d('0x8a'),_0x1b7d('0x8b'),_0x1b7d('0x8c'),_0x1b7d('0x8d'),_0x1b7d('0x8e'),'modernAuthentication'],'include':[{'model':db[_0x1b7d('0x8f')],'as':_0x1b7d('0x8f'),'attributes':['id',_0x1b7d('0x90'),_0x1b7d('0x91')]}]})[_0x1b7d('0xf')](handleEntityNotFound(_0xedcbee,null))['then'](function(_0x22a0b0){if(_0x22a0b0){if(_0x22a0b0[_0x1b7d('0x92')]){_0x22a0b0['access_token']=_0x22a0b0[_0x1b7d('0x8f')][_0x1b7d('0x90')];_0x5b3352=sanitizeRemoteUri(_0x22a0b0[_0x1b7d('0x8f')]['data7']);_0x122640=getWebApiUrl(_0x5b3352);return _0x22a0b0;}_0x5b3352=sanitizeRemoteUri(_0x22a0b0[_0x1b7d('0x8b')]);_0x122640=getWebApiUrl(_0x5b3352);var _0x4aab26={'method':_0x1b7d('0x93'),'uri':_0x1b7d('0x94')+_0x22a0b0['tenantId']+'/oauth2/token','form':{'client_id':_0x22a0b0[_0x1b7d('0x8d')],'resource':_0x5b3352,'username':_0x22a0b0[_0x1b7d('0x89')],'password':_0x22a0b0[_0x1b7d('0x8a')],'grant_type':_0x1b7d('0x8a'),'client_secret':_0x22a0b0[_0x1b7d('0x8e')]},'json':!![]};return rp(_0x4aab26);}})[_0x1b7d('0xf')](function(_0x36bf4a){_0x328cf3=_0x36bf4a[_0x1b7d('0x95')];var _0x1d1d11={'method':'GET','uri':encodeURI(_0x122640+_0x1b7d('0x96')+_0xb9c1fb+'\x27'),'headers':{'Authorization':'Bearer\x20'+_0x328cf3,'If-None-Match':null,'OData-Version':_0x1b7d('0x97')},'json':!![]};return rp(_0x1d1d11);})[_0x1b7d('0xf')](function(_0x3143d4){var _0x189e17=_0x3143d4[_0x1b7d('0x98')][0x0];var _0x7a90f7=_0x189e17[_0x1b7d('0x99')];var _0x49286c={'method':'GET','uri':_0x122640+_0x1b7d('0x9a')+_0x7a90f7+_0x1b7d('0x9b'),'headers':{'Authorization':_0x1b7d('0x9c')+_0x328cf3,'If-None-Match':null,'OData-Version':_0x1b7d('0x97')},'json':!![]};return rp(_0x49286c);})[_0x1b7d('0xf')](function(_0x22b807){_0x2d37b6=_0x22b807;_0x56f0c2=_0x2d37b6['Attributes'];_0x56f0c2=_[_0x1b7d('0x9d')](_0x56f0c2,function(_0xefa3fd){return!_0x1b197e[_0x1b7d('0x9e')](_0xefa3fd[_0x1b7d('0x9f')]);});var _0x330f36=[];var _0x32b91e=[];_0x56f0c2[_0x1b7d('0xa0')](function(_0x31632c){if(_0x31632c['@odata.type']){var _0x4f058a=_0x31632c[_0x1b7d('0xa1')][_0x1b7d('0x42')](_0x31632c[_0x1b7d('0xa1')]['lastIndexOf']('.')+0x1);if(_0x4f058a===_0x1b7d('0xa2')){_0x330f36[_0x1b7d('0xa3')](getSelectList(_0x122640,_0x1355d0,_0x32b91e,_0x2d37b6[_0x1b7d('0x99')],_0x31632c[_0x1b7d('0x99')],_0x328cf3));}}});return Promise[_0x1b7d('0xa4')](_0x330f36);})['then'](function(_0x34326d){_0x29bbd5=_0x34326d[0x0];var _0x4c6f22=[];var _0xe4d3e2=[];_0x56f0c2['forEach'](function(_0x49817f){if(!_[_0x1b7d('0xa5')](_0x49817f['@odata.type'])){var _0x2fb07a=_0x49817f['@odata.type'][_0x1b7d('0x42')](_0x49817f[_0x1b7d('0xa1')][_0x1b7d('0x43')]('.')+0x1);if(_0x2fb07a==='BooleanAttributeMetadata'){_0x4c6f22[_0x1b7d('0xa3')](getBooleanList(_0x122640,_0x1355d0,_0xe4d3e2,_0x2d37b6[_0x1b7d('0x99')],_0x49817f['MetadataId'],_0x328cf3));}}});return Promise['all'](_0x4c6f22);})[_0x1b7d('0xf')](function(_0x16bb02){_0x18173a=_0x16bb02[0x0];var _0x3e34fe=[];var _0x361681=[];_0x56f0c2[_0x1b7d('0xa0')](function(_0x29311e){if(_0x29311e[_0x1b7d('0xa1')]){var _0x46dc7c=_0x29311e['@odata.type'][_0x1b7d('0x42')](_0x29311e[_0x1b7d('0xa1')][_0x1b7d('0x43')]('.')+0x1);if(_0x46dc7c==='StringAttributeMetadata'||_0x46dc7c==='DoubleAttributeMetadata'||_0x46dc7c===_0x1b7d('0xa6')||_0x46dc7c===_0x1b7d('0xa7')||_0x46dc7c===_0x1b7d('0xa8')||_0x46dc7c===_0x1b7d('0xa9')||_0x46dc7c==='StatusAttributeMetadata'||_0x46dc7c===_0x1b7d('0xaa')||_0x46dc7c===_0x1b7d('0xab')||_0x46dc7c==='DecimalAttributeMetadata'){_0x3e34fe[_0x1b7d('0xa3')](getInputList(_0x122640,_0x1355d0,_0x46dc7c,_0x361681,_0x2d37b6[_0x1b7d('0x99')],_0x29311e[_0x1b7d('0x99')],_0x328cf3));}}});return Promise[_0x1b7d('0xa4')](_0x3e34fe);})[_0x1b7d('0xf')](function(_0x4ce2bd){_0x206d97=_0x4ce2bd[0x0];var _0x5d4e38=_0x29bbd5[_0x1b7d('0xac')](_0x18173a)[_0x1b7d('0xac')](_0x206d97);var _0x103505={'count':_0x5d4e38[_0x1b7d('0x20')],'rows':_0x5d4e38};return _0x103505;})[_0x1b7d('0xf')](respondWithResult(_0xedcbee,null))[_0x1b7d('0x2b')](function(_0xdbc1b6){var _0x4919ff=_0x46e1d0[_0x1b7d('0x1b')]['test']?0x1f4:_0xdbc1b6['statusCode']||0x1f4;logger[_0x1b7d('0xad')](_0xdbc1b6[_0x1b7d('0x11')]);delete _0xdbc1b6[_0x1b7d('0x12')];if(_0x4919ff===0x191){_0x4919ff=0x190;}_0xedcbee[_0x1b7d('0xc')](_0x4919ff)['send'](_0x46e1d0[_0x1b7d('0x1b')][_0x1b7d('0xae')]?{'message':'Wrong\x20credentials','statusCode':_0xdbc1b6['statusCode']}:_0xdbc1b6);});};function getSelectList(_0x1601c9,_0x509a5a,_0x1a7910,_0x2e19f7,_0x2d0249,_0x1a03f8){var _0xa3ebce={'method':_0x1b7d('0xaf'),'uri':_0x1601c9+_0x1b7d('0x9a')+_0x2e19f7+_0x1b7d('0xb0')+_0x2d0249+_0x1b7d('0xb1')+_0x1b7d('0xb2'),'headers':{'Authorization':_0x1b7d('0x9c')+_0x1a03f8,'If-None-Match':null,'OData-Version':_0x1b7d('0x97')},'json':!![]};return rp(_0xa3ebce)[_0x1b7d('0xf')](function(_0x363dde){var _0x15c799=[];var _0x48f55e=_0x363dde[_0x1b7d('0xb3')][_0x1b7d('0xb4')];_0x48f55e[_0x1b7d('0xa0')](function(_0x1acaf0){_0x15c799[_0x1b7d('0xa3')]({'name':_0x1acaf0[_0x1b7d('0xb5')][_0x1b7d('0xb6')][_0x1b7d('0xb5')],'value':String(_0x1acaf0[_0x1b7d('0xb7')])});});var _0x31aa6f={'id':_0x509a5a+'_'+_0x363dde[_0x1b7d('0x9f')],'name':_0x363dde[_0x1b7d('0xb8')][_0x1b7d('0xb6')][_0x1b7d('0xb5')],'custom':![],'options':_0x15c799};_0x1a7910[_0x1b7d('0xa3')](_0x31aa6f);return _0x1a7910;});}function getBooleanList(_0x4d44a2,_0x58ed99,_0x31bf37,_0x44254c,_0x296843,_0x155052){var _0x1b506a={'method':'GET','uri':_0x4d44a2+_0x1b7d('0x9a')+_0x44254c+_0x1b7d('0xb0')+_0x296843+_0x1b7d('0xb9'),'headers':{'Authorization':_0x1b7d('0x9c')+_0x155052,'If-None-Match':null,'OData-Version':_0x1b7d('0x97')},'json':!![]};return rp(_0x1b506a)[_0x1b7d('0xf')](function(_0x52c3b2){var _0x467e6=[];_0x467e6[_0x1b7d('0xa3')]({'name':_0x52c3b2[_0x1b7d('0xb3')][_0x1b7d('0xba')]['Label']['UserLocalizedLabel'][_0x1b7d('0xb5')],'value':_0x1b7d('0xbb')},{'name':_0x52c3b2[_0x1b7d('0xb3')][_0x1b7d('0xbc')]['Label'][_0x1b7d('0xb6')][_0x1b7d('0xb5')],'value':_0x1b7d('0xbd')});var _0x532da2={'id':_0x58ed99+'_'+_0x52c3b2[_0x1b7d('0x9f')],'name':_0x52c3b2[_0x1b7d('0xb8')][_0x1b7d('0xb6')]['Label'],'custom':![],'options':_0x467e6};_0x31bf37[_0x1b7d('0xa3')](_0x532da2);return _0x31bf37;});}function getInputList(_0xb7fa6a,_0x2c1d6b,_0x3adcab,_0x6914bc,_0x2525cc,_0x6555ba,_0x2315e8){var _0x123578={'method':_0x1b7d('0xaf'),'uri':_0xb7fa6a+_0x1b7d('0x9a')+_0x2525cc+_0x1b7d('0xb0')+_0x6555ba+_0x1b7d('0xbe')+_0x3adcab+_0x1b7d('0xbf'),'headers':{'Authorization':_0x1b7d('0x9c')+_0x2315e8,'If-None-Match':null,'OData-Version':_0x1b7d('0x97')},'json':!![]};return rp(_0x123578)['then'](function(_0xdde5b){var _0x1024fe={'id':_0x2c1d6b+'_'+_0xdde5b[_0x1b7d('0x9f')],'name':_0xdde5b[_0x1b7d('0xb8')][_0x1b7d('0xb6')]?_0xdde5b[_0x1b7d('0xb8')][_0x1b7d('0xb6')]['Label']:_0xdde5b[_0x1b7d('0x9f')],'custom':![],'options':[]};_0x6914bc[_0x1b7d('0xa3')](_0x1024fe);return _0x6914bc;});}
\ No newline at end of file
index 836bff6..82d509f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x757a=['Dynamics365Account','int_dynamics365_accounts','util','../../config/logger','request-promise','path','rimraf','../../config/environment','./intDynamics365Account.attributes','../../components/integrations/configuration'];(function(_0x4a0444,_0x51caf0){var _0x26eac4=function(_0x368bd0){while(--_0x368bd0){_0x4a0444['push'](_0x4a0444['shift']());}};_0x26eac4(++_0x51caf0);}(_0x757a,0xde));var _0xa757=function(_0x2c4796,_0x461141){_0x2c4796=_0x2c4796-0x0;var _0xa26450=_0x757a[_0x2c4796];return _0xa26450;};'use strict';var _=require('lodash');var util=require(_0xa757('0x0'));var logger=require(_0xa757('0x1'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xa757('0x2'));var fs=require('fs');var path=require(_0xa757('0x3'));var rimraf=require(_0xa757('0x4'));var config=require(_0xa757('0x5'));var attributes=require(_0xa757('0x6'));var integrations=require(_0xa757('0x7'));module['exports']=function(_0xae0e7c,_0x4343b6){return _0xae0e7c['define'](_0xa757('0x8'),attributes,{'tableName':_0xa757('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xd8b0=['exports','Dynamics365Account','int_dynamics365_accounts','lodash','util','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x58883c,_0x4d32b7){var _0x3bfbf7=function(_0x20462){while(--_0x20462){_0x58883c['push'](_0x58883c['shift']());}};_0x3bfbf7(++_0x4d32b7);}(_0xd8b0,0xad));var _0x0d8b=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xd8b0[_0xa464c9];return _0x3d73c4;};'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
index 018b3c9..42fa750 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x88e3=['where','limit','include','map','model','attributes','ShowDynamics365Account','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','client','http','then','info','debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','Dynamics365Account,\x20%s,\x20%s','message','result','catch','GetDynamics365Account','Dynamics365Account','options','raw'];(function(_0x4dab14,_0x164ea0){var _0xf41aa=function(_0x305d50){while(--_0x305d50){_0x4dab14['push'](_0x4dab14['shift']());}};_0xf41aa(++_0x164ea0);}(_0x88e3,0x1c7));var _0x388e=function(_0x416a0a,_0x24f91f){_0x416a0a=_0x416a0a-0x0;var _0x574c9f=_0x88e3[_0x416a0a];return _0x574c9f;};'use strict';var _=require(_0x388e('0x0'));var util=require('util');var moment=require(_0x388e('0x1'));var BPromise=require(_0x388e('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x388e('0x3'));var db=require(_0x388e('0x4'))['db'];var utils=require(_0x388e('0x5'));var logger=require('../../config/logger')(_0x388e('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x388e('0x7')][_0x388e('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x17cdb8,_0xa53815,_0x9342f0){return new BPromise(function(_0x3fb1cc,_0x575507){return client['request'](_0x17cdb8,_0x9342f0)[_0x388e('0x9')](function(_0x4176e0){logger[_0x388e('0xa')]('Dynamics365Account,\x20%s,\x20%s',_0xa53815,'request\x20sent');logger[_0x388e('0xb')](_0x388e('0xc'),_0xa53815,_0x388e('0xd'),JSON[_0x388e('0xe')](_0x4176e0));if(_0x4176e0[_0x388e('0xf')]){if(_0x4176e0[_0x388e('0xf')][_0x388e('0x10')]===0x1f4){logger[_0x388e('0xf')](_0x388e('0x11'),_0xa53815,_0x4176e0[_0x388e('0xf')][_0x388e('0x12')]);return _0x575507(_0x4176e0[_0x388e('0xf')]['message']);}logger[_0x388e('0xf')](_0x388e('0x11'),_0xa53815,_0x4176e0[_0x388e('0xf')][_0x388e('0x12')]);return _0x3fb1cc(_0x4176e0[_0x388e('0xf')][_0x388e('0x12')]);}else{logger[_0x388e('0xa')](_0x388e('0x11'),_0xa53815,_0x388e('0xd'));_0x3fb1cc(_0x4176e0[_0x388e('0x13')]['message']);}})[_0x388e('0x14')](function(_0x24e9f5){logger[_0x388e('0xf')](_0x388e('0x11'),_0xa53815,_0x24e9f5);_0x575507(_0x24e9f5);});});}exports[_0x388e('0x15')]=function(_0x178bff){var _0xf2913e=this;return new Promise(function(_0x5b99b7,_0x494946){return db[_0x388e('0x16')]['findAll']({'raw':_0x178bff[_0x388e('0x17')]?_0x178bff[_0x388e('0x17')][_0x388e('0x18')]===undefined?!![]:![]:!![],'where':_0x178bff[_0x388e('0x17')]?_0x178bff[_0x388e('0x17')][_0x388e('0x19')]||null:null,'attributes':_0x178bff[_0x388e('0x17')]?_0x178bff[_0x388e('0x17')]['attributes']||null:null,'limit':_0x178bff['options']?_0x178bff[_0x388e('0x17')][_0x388e('0x1a')]||null:null,'include':_0x178bff[_0x388e('0x17')]?_0x178bff[_0x388e('0x17')][_0x388e('0x1b')]?_[_0x388e('0x1c')](_0x178bff[_0x388e('0x17')][_0x388e('0x1b')],function(_0xf0726){return{'model':db[_0xf0726[_0x388e('0x1d')]],'as':_0xf0726['as'],'attributes':_0xf0726[_0x388e('0x1e')],'include':_0xf0726[_0x388e('0x1b')]?_[_0x388e('0x1c')](_0xf0726[_0x388e('0x1b')],function(_0x1b375e){return{'model':db[_0x1b375e['model']],'as':_0x1b375e['as'],'attributes':_0x1b375e['attributes'],'include':_0x1b375e['include']?_['map'](_0x1b375e['include'],function(_0x34d27f){return{'model':db[_0x34d27f[_0x388e('0x1d')]],'as':_0x34d27f['as'],'attributes':_0x34d27f[_0x388e('0x1e')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1741c5){logger[_0x388e('0xa')]('GetDynamics365Account',_0x178bff);logger[_0x388e('0xb')]('GetDynamics365Account',_0x178bff,JSON[_0x388e('0xe')](_0x1741c5));_0x5b99b7(_0x1741c5);})[_0x388e('0x14')](function(_0x23b9ec){logger['error'](_0x388e('0x15'),_0x23b9ec[_0x388e('0x12')],_0x178bff);_0x494946(_0xf2913e['error'](0x1f4,_0x23b9ec['message']));});});};exports[_0x388e('0x1f')]=function(_0x275924){var _0x412b08=this;return new Promise(function(_0x17523f,_0x538398){return db[_0x388e('0x16')]['find']({'raw':_0x275924[_0x388e('0x17')]?_0x275924['options']['raw']===undefined?!![]:![]:!![],'where':_0x275924['options']?_0x275924['options'][_0x388e('0x19')]||null:null,'attributes':_0x275924[_0x388e('0x17')]?_0x275924[_0x388e('0x17')][_0x388e('0x1e')]||null:null,'include':_0x275924[_0x388e('0x17')]?_0x275924['options'][_0x388e('0x1b')]?_[_0x388e('0x1c')](_0x275924[_0x388e('0x17')][_0x388e('0x1b')],function(_0x335291){return{'model':db[_0x335291[_0x388e('0x1d')]],'as':_0x335291['as'],'attributes':_0x335291[_0x388e('0x1e')],'include':_0x335291[_0x388e('0x1b')]?_['map'](_0x335291[_0x388e('0x1b')],function(_0x54d581){return{'model':db[_0x54d581[_0x388e('0x1d')]],'as':_0x54d581['as'],'attributes':_0x54d581[_0x388e('0x1e')],'include':_0x54d581[_0x388e('0x1b')]?_['map'](_0x54d581['include'],function(_0x444792){return{'model':db[_0x444792[_0x388e('0x1d')]],'as':_0x444792['as'],'attributes':_0x444792[_0x388e('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x388e('0x9')](function(_0x5aba75){logger['info'](_0x388e('0x1f'),_0x275924);logger[_0x388e('0xb')](_0x388e('0x1f'),_0x275924,JSON[_0x388e('0xe')](_0x5aba75));_0x17523f(_0x5aba75);})[_0x388e('0x14')](function(_0x14ed97){logger['error'](_0x388e('0x1f'),_0x14ed97['message'],_0x275924);_0x538398(_0x412b08[_0x388e('0xf')](0x1f4,_0x14ed97[_0x388e('0x12')]));});});};
\ No newline at end of file
+var _0x0386=['debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','GetDynamics365Account','options','raw','where','attributes','limit','include','map','model','ShowDynamics365Account','Dynamics365Account','find','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','request','then','info','Dynamics365Account,\x20%s,\x20%s','request\x20sent'];(function(_0x22420f,_0x536255){var _0x4204b0=function(_0x4c3a14){while(--_0x4c3a14){_0x22420f['push'](_0x22420f['shift']());}};_0x4204b0(++_0x536255);}(_0x0386,0x1b7));var _0x6038=function(_0x1da5e9,_0x4f9a3a){_0x1da5e9=_0x1da5e9-0x0;var _0x1c62f8=_0x0386[_0x1da5e9];return _0x1c62f8;};'use strict';var _=require(_0x6038('0x0'));var util=require(_0x6038('0x1'));var moment=require(_0x6038('0x2'));var BPromise=require(_0x6038('0x3'));var rs=require(_0x6038('0x4'));var fs=require('fs');var Redis=require(_0x6038('0x5'));var db=require(_0x6038('0x6'))['db'];var utils=require(_0x6038('0x7'));var logger=require(_0x6038('0x8'))(_0x6038('0x9'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x6038('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x47b861,_0x54a2c3,_0x3a384d){return new BPromise(function(_0x57135b,_0x10d571){return client[_0x6038('0xb')](_0x47b861,_0x3a384d)[_0x6038('0xc')](function(_0x38ddac){logger[_0x6038('0xd')](_0x6038('0xe'),_0x54a2c3,_0x6038('0xf'));logger[_0x6038('0x10')](_0x6038('0x11'),_0x54a2c3,_0x6038('0xf'),JSON[_0x6038('0x12')](_0x38ddac));if(_0x38ddac[_0x6038('0x13')]){if(_0x38ddac[_0x6038('0x13')][_0x6038('0x14')]===0x1f4){logger[_0x6038('0x13')]('Dynamics365Account,\x20%s,\x20%s',_0x54a2c3,_0x38ddac[_0x6038('0x13')][_0x6038('0x15')]);return _0x10d571(_0x38ddac[_0x6038('0x13')][_0x6038('0x15')]);}logger['error'](_0x6038('0xe'),_0x54a2c3,_0x38ddac[_0x6038('0x13')][_0x6038('0x15')]);return _0x57135b(_0x38ddac[_0x6038('0x13')]['message']);}else{logger[_0x6038('0xd')]('Dynamics365Account,\x20%s,\x20%s',_0x54a2c3,_0x6038('0xf'));_0x57135b(_0x38ddac['result'][_0x6038('0x15')]);}})[_0x6038('0x16')](function(_0x250f46){logger[_0x6038('0x13')]('Dynamics365Account,\x20%s,\x20%s',_0x54a2c3,_0x250f46);_0x10d571(_0x250f46);});});}exports[_0x6038('0x17')]=function(_0x5745c3){var _0x458123=this;return new Promise(function(_0x3ff839,_0x3f08cf){return db['Dynamics365Account']['findAll']({'raw':_0x5745c3[_0x6038('0x18')]?_0x5745c3[_0x6038('0x18')][_0x6038('0x19')]===undefined?!![]:![]:!![],'where':_0x5745c3[_0x6038('0x18')]?_0x5745c3[_0x6038('0x18')][_0x6038('0x1a')]||null:null,'attributes':_0x5745c3['options']?_0x5745c3[_0x6038('0x18')][_0x6038('0x1b')]||null:null,'limit':_0x5745c3[_0x6038('0x18')]?_0x5745c3['options'][_0x6038('0x1c')]||null:null,'include':_0x5745c3['options']?_0x5745c3[_0x6038('0x18')][_0x6038('0x1d')]?_['map'](_0x5745c3['options']['include'],function(_0x4fae90){return{'model':db[_0x4fae90['model']],'as':_0x4fae90['as'],'attributes':_0x4fae90[_0x6038('0x1b')],'include':_0x4fae90[_0x6038('0x1d')]?_[_0x6038('0x1e')](_0x4fae90[_0x6038('0x1d')],function(_0x573215){return{'model':db[_0x573215['model']],'as':_0x573215['as'],'attributes':_0x573215[_0x6038('0x1b')],'include':_0x573215[_0x6038('0x1d')]?_['map'](_0x573215[_0x6038('0x1d')],function(_0xdd7637){return{'model':db[_0xdd7637[_0x6038('0x1f')]],'as':_0xdd7637['as'],'attributes':_0xdd7637['attributes']};}):[]};}):[]};}):[]:[]})[_0x6038('0xc')](function(_0x1f374c){logger[_0x6038('0xd')](_0x6038('0x17'),_0x5745c3);logger[_0x6038('0x10')](_0x6038('0x17'),_0x5745c3,JSON[_0x6038('0x12')](_0x1f374c));_0x3ff839(_0x1f374c);})[_0x6038('0x16')](function(_0xd31f23){logger[_0x6038('0x13')](_0x6038('0x17'),_0xd31f23['message'],_0x5745c3);_0x3f08cf(_0x458123[_0x6038('0x13')](0x1f4,_0xd31f23[_0x6038('0x15')]));});});};exports[_0x6038('0x20')]=function(_0x4d125d){var _0x248e22=this;return new Promise(function(_0x5a51bb,_0x33d97d){return db[_0x6038('0x21')][_0x6038('0x22')]({'raw':_0x4d125d[_0x6038('0x18')]?_0x4d125d['options'][_0x6038('0x19')]===undefined?!![]:![]:!![],'where':_0x4d125d[_0x6038('0x18')]?_0x4d125d[_0x6038('0x18')]['where']||null:null,'attributes':_0x4d125d['options']?_0x4d125d[_0x6038('0x18')][_0x6038('0x1b')]||null:null,'include':_0x4d125d[_0x6038('0x18')]?_0x4d125d['options'][_0x6038('0x1d')]?_[_0x6038('0x1e')](_0x4d125d[_0x6038('0x18')][_0x6038('0x1d')],function(_0x371da9){return{'model':db[_0x371da9[_0x6038('0x1f')]],'as':_0x371da9['as'],'attributes':_0x371da9[_0x6038('0x1b')],'include':_0x371da9['include']?_[_0x6038('0x1e')](_0x371da9[_0x6038('0x1d')],function(_0xa3d3bf){return{'model':db[_0xa3d3bf[_0x6038('0x1f')]],'as':_0xa3d3bf['as'],'attributes':_0xa3d3bf['attributes'],'include':_0xa3d3bf[_0x6038('0x1d')]?_['map'](_0xa3d3bf[_0x6038('0x1d')],function(_0x6c04d3){return{'model':db[_0x6c04d3[_0x6038('0x1f')]],'as':_0x6c04d3['as'],'attributes':_0x6c04d3['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x244109){logger[_0x6038('0xd')](_0x6038('0x20'),_0x4d125d);logger[_0x6038('0x10')](_0x6038('0x20'),_0x4d125d,JSON[_0x6038('0x12')](_0x244109));_0x5a51bb(_0x244109);})[_0x6038('0x16')](function(_0x55846a){logger[_0x6038('0x13')](_0x6038('0x20'),_0x55846a['message'],_0x4d125d);_0x33d97d(_0x248e22[_0x6038('0x13')](0x1f4,_0x55846a[_0x6038('0x15')]));});});};
\ No newline at end of file
index a3b347a..7a31a7a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x57ef=['delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./intDynamics365Configuration.controller','get','isAuthenticated','index','/:id','/:id/fields','getFields','getSubjects','/:id/descriptions','getDescriptions','post','create','update'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x57ef,0xdb));var _0xf57e=function(_0x381016,_0x238bef){_0x381016=_0x381016-0x0;var _0x1d26ff=_0x57ef[_0x381016];return _0x1d26ff;};'use strict';var multer=require('multer');var util=require(_0xf57e('0x0'));var path=require(_0xf57e('0x1'));var timeout=require(_0xf57e('0x2'));var express=require(_0xf57e('0x3'));var router=express[_0xf57e('0x4')]();var fs_extra=require(_0xf57e('0x5'));var auth=require(_0xf57e('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xf57e('0x7'));var controller=require(_0xf57e('0x8'));router[_0xf57e('0x9')]('/',auth[_0xf57e('0xa')](),controller[_0xf57e('0xb')]);router[_0xf57e('0x9')](_0xf57e('0xc'),auth[_0xf57e('0xa')](),controller['show']);router[_0xf57e('0x9')](_0xf57e('0xd'),auth[_0xf57e('0xa')](),controller[_0xf57e('0xe')]);router[_0xf57e('0x9')]('/:id/subjects',auth[_0xf57e('0xa')](),controller[_0xf57e('0xf')]);router['get'](_0xf57e('0x10'),auth[_0xf57e('0xa')](),controller[_0xf57e('0x11')]);router[_0xf57e('0x12')]('/',auth[_0xf57e('0xa')](),controller[_0xf57e('0x13')]);router['put'](_0xf57e('0xc'),auth[_0xf57e('0xa')](),controller[_0xf57e('0x14')]);router[_0xf57e('0x15')](_0xf57e('0xc'),auth[_0xf57e('0xa')](),controller[_0xf57e('0x16')]);module[_0xf57e('0x17')]=router;
\ No newline at end of file
+var _0x4965=['get','/:id','show','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','post','create','put','update','delete','destroy','exports','multer','util','path','fs-extra','../../components/interaction/service','../../config/environment','./intDynamics365Configuration.controller','isAuthenticated','index'];(function(_0x2531f5,_0x3c2dc6){var _0x1923a9=function(_0x13fc09){while(--_0x13fc09){_0x2531f5['push'](_0x2531f5['shift']());}};_0x1923a9(++_0x3c2dc6);}(_0x4965,0x16e));var _0x5496=function(_0x572637,_0x216d95){_0x572637=_0x572637-0x0;var _0xb6748=_0x4965[_0x572637];return _0xb6748;};'use strict';var multer=require(_0x5496('0x0'));var util=require(_0x5496('0x1'));var path=require(_0x5496('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0x5496('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0x5496('0x4'));var config=require(_0x5496('0x5'));var controller=require(_0x5496('0x6'));router['get']('/',auth[_0x5496('0x7')](),controller[_0x5496('0x8')]);router[_0x5496('0x9')](_0x5496('0xa'),auth['isAuthenticated'](),controller[_0x5496('0xb')]);router['get'](_0x5496('0xc'),auth[_0x5496('0x7')](),controller[_0x5496('0xd')]);router['get'](_0x5496('0xe'),auth[_0x5496('0x7')](),controller[_0x5496('0xf')]);router[_0x5496('0x9')](_0x5496('0x10'),auth[_0x5496('0x7')](),controller[_0x5496('0x11')]);router[_0x5496('0x12')]('/',auth[_0x5496('0x7')](),controller[_0x5496('0x13')]);router[_0x5496('0x14')](_0x5496('0xa'),auth[_0x5496('0x7')](),controller[_0x5496('0x15')]);router[_0x5496('0x16')]('/:id',auth[_0x5496('0x7')](),controller[_0x5496('0x17')]);module[_0x5496('0x18')]=router;
\ No newline at end of file
index de895fd..5b8ca2a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3856=['nothing','BOOLEAN','exports','STRING','ENUM','phonecall','incident','contact'];(function(_0x465a0c,_0x19d4d5){var _0x1e202e=function(_0x27bd8a){while(--_0x27bd8a){_0x465a0c['push'](_0x465a0c['shift']());}};_0x1e202e(++_0x19d4d5);}(_0x3856,0xf2));var _0x6385=function(_0xc8db6b,_0x320abd){_0xc8db6b=_0xc8db6b-0x0;var _0x12cb81=_0x3856[_0xc8db6b];return _0x12cb81;};'use strict';var Sequelize=require('sequelize');module[_0x6385('0x0')]={'name':{'type':Sequelize[_0x6385('0x1')]},'description':{'type':Sequelize[_0x6385('0x1')]},'ticketType':{'type':Sequelize[_0x6385('0x2')]('incident',_0x6385('0x3')),'defaultValue':_0x6385('0x4')},'moduleCreate':{'type':Sequelize['ENUM'](_0x6385('0x5'),_0x6385('0x6')),'defaultValue':_0x6385('0x5'),'allowNull':![]},'additionalSearchContact':{'type':Sequelize[_0x6385('0x1')],'allowNull':!![]},'openNewTab':{'type':Sequelize[_0x6385('0x7')],'defaultValue':!![]}};
\ No newline at end of file
+var _0xab75=['nothing','BOOLEAN','STRING','ENUM','phonecall','incident'];(function(_0x43634a,_0x2a7f51){var _0x2aa5b4=function(_0x6f7a10){while(--_0x6f7a10){_0x43634a['push'](_0x43634a['shift']());}};_0x2aa5b4(++_0x2a7f51);}(_0xab75,0x80));var _0x5ab7=function(_0xdde962,_0xb1a8aa){_0xdde962=_0xdde962-0x0;var _0x44147f=_0xab75[_0xdde962];return _0x44147f;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x5ab7('0x0')]},'ticketType':{'type':Sequelize[_0x5ab7('0x1')]('incident',_0x5ab7('0x2')),'defaultValue':_0x5ab7('0x3')},'moduleCreate':{'type':Sequelize[_0x5ab7('0x1')]('contact',_0x5ab7('0x4')),'defaultValue':'contact','allowNull':![]},'additionalSearchContact':{'type':Sequelize[_0x5ab7('0x0')],'allowNull':!![]},'openNewTab':{'type':Sequelize[_0x5ab7('0x5')],'defaultValue':!![]}};
\ No newline at end of file
index 54acd78..1898b1b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb932=['fields','length','hasOwnProperty','limit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','rawAttributes','find','create','body','params','findOne','Dynamics365Field','getFields','nolimit','getSubjects','getDescriptions','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','end','status','json','offset','undefined','count','set','apply','reject','save','update','then','destroy','sendStatus','error','stack','name','send','index','map','Dynamics365Configuration','key','model','keys','query','filters','intersection','attributes'];(function(_0x52e64,_0x6ba4e8){var _0x282b80=function(_0xc11939){while(--_0xc11939){_0x52e64['push'](_0x52e64['shift']());}};_0x282b80(++_0x6ba4e8);}(_0xb932,0x1bd));var _0x2b93=function(_0x30c65b,_0x5420ad){_0x30c65b=_0x30c65b-0x0;var _0x2f8bf1=_0xb932[_0x30c65b];return _0x2f8bf1;};'use strict';var emlformat=require(_0x2b93('0x0'));var rimraf=require(_0x2b93('0x1'));var zipdir=require(_0x2b93('0x2'));var jsonpatch=require(_0x2b93('0x3'));var rp=require(_0x2b93('0x4'));var moment=require(_0x2b93('0x5'));var BPromise=require(_0x2b93('0x6'));var Mustache=require(_0x2b93('0x7'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0x2b93('0x8'));var ejs=require(_0x2b93('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x2b93('0xa'));var squel=require(_0x2b93('0xb'));var crypto=require(_0x2b93('0xc'));var jsforce=require(_0x2b93('0xd'));var deskjs=require(_0x2b93('0xe'));var toCsv=require('to-csv');var querystring=require(_0x2b93('0xf'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x2b93('0x10'));var qs=require(_0x2b93('0x11'));var as=require(_0x2b93('0x12'));var hardwareService=require(_0x2b93('0x13'));var logger=require(_0x2b93('0x14'))(_0x2b93('0x15'));var utils=require(_0x2b93('0x16'));var config=require(_0x2b93('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x2b93('0x18'))['db'];function respondWithStatusCode(_0x1e1a9e,_0xaecffe){_0xaecffe=_0xaecffe||0xcc;return function(_0xa5a7d1){if(_0xa5a7d1){return _0x1e1a9e['sendStatus'](_0xaecffe);}return _0x1e1a9e['status'](_0xaecffe)[_0x2b93('0x19')]();};}function respondWithResult(_0x2c3795,_0x59258d){_0x59258d=_0x59258d||0xc8;return function(_0x4db0f4){if(_0x4db0f4){return _0x2c3795[_0x2b93('0x1a')](_0x59258d)[_0x2b93('0x1b')](_0x4db0f4);}};}function respondWithFilteredResult(_0x536587,_0x324a06){return function(_0x4061f2){if(_0x4061f2){var _0x4dffed=typeof _0x324a06[_0x2b93('0x1c')]===_0x2b93('0x1d')&&typeof _0x324a06['limit']===_0x2b93('0x1d');var _0x94939a=_0x4061f2['count'];var _0xbdc379=_0x4dffed?0x0:_0x324a06[_0x2b93('0x1c')];var _0xe72c75=_0x4dffed?_0x4061f2[_0x2b93('0x1e')]:_0x324a06[_0x2b93('0x1c')]+_0x324a06['limit'];var _0xa58fbe;if(_0xe72c75>=_0x94939a){_0xe72c75=_0x94939a;_0xa58fbe=0xc8;}else{_0xa58fbe=0xce;}_0x536587[_0x2b93('0x1a')](_0xa58fbe);return _0x536587[_0x2b93('0x1f')]('Content-Range',_0xbdc379+'-'+_0xe72c75+'/'+_0x94939a)[_0x2b93('0x1b')](_0x4061f2);}return null;};}function patchUpdates(_0x2b6bb3){return function(_0x2f25d9){try{jsonpatch[_0x2b93('0x20')](_0x2f25d9,_0x2b6bb3,!![]);}catch(_0x34143d){return BPromise[_0x2b93('0x21')](_0x34143d);}return _0x2f25d9[_0x2b93('0x22')]();};}function saveUpdates(_0x3f51c1,_0x24619f){return function(_0x4bb52d){if(_0x4bb52d){return _0x4bb52d[_0x2b93('0x23')](_0x3f51c1)[_0x2b93('0x24')](function(_0x4674f6){return _0x4674f6;});}return null;};}function removeEntity(_0x56d5c6,_0x519b47){return function(_0x30ea05){if(_0x30ea05){return _0x30ea05[_0x2b93('0x25')]()['then'](function(){_0x56d5c6[_0x2b93('0x1a')](0xcc)[_0x2b93('0x19')]();});}};}function handleEntityNotFound(_0x5b05df,_0x522dd8){return function(_0xb6a74){if(!_0xb6a74){_0x5b05df[_0x2b93('0x26')](0x194);}return _0xb6a74;};}function handleError(_0x4382a4,_0x345cb6){_0x345cb6=_0x345cb6||0x1f4;return function(_0x113461){logger[_0x2b93('0x27')](_0x113461[_0x2b93('0x28')]);if(_0x113461[_0x2b93('0x29')]){delete _0x113461['name'];}_0x4382a4[_0x2b93('0x1a')](_0x345cb6)[_0x2b93('0x2a')](_0x113461);};}exports[_0x2b93('0x2b')]=function(_0x4e5d2c,_0x13bc4c){var _0x5dd501={},_0x27b3c7={},_0x2accde={'count':0x0,'rows':[]};var _0x5b1098=_[_0x2b93('0x2c')](db[_0x2b93('0x2d')]['rawAttributes'],function(_0x4e46d7){return{'name':_0x4e46d7['fieldName'],'type':_0x4e46d7['type'][_0x2b93('0x2e')]};});_0x27b3c7[_0x2b93('0x2f')]=_[_0x2b93('0x2c')](_0x5b1098,'name');_0x27b3c7['query']=_[_0x2b93('0x30')](_0x4e5d2c[_0x2b93('0x31')]);_0x27b3c7[_0x2b93('0x32')]=_[_0x2b93('0x33')](_0x27b3c7[_0x2b93('0x2f')],_0x27b3c7[_0x2b93('0x31')]);_0x5dd501[_0x2b93('0x34')]=_[_0x2b93('0x33')](_0x27b3c7[_0x2b93('0x2f')],qs[_0x2b93('0x35')](_0x4e5d2c[_0x2b93('0x31')][_0x2b93('0x35')]));_0x5dd501['attributes']=_0x5dd501[_0x2b93('0x34')][_0x2b93('0x36')]?_0x5dd501['attributes']:_0x27b3c7[_0x2b93('0x2f')];if(!_0x4e5d2c[_0x2b93('0x31')][_0x2b93('0x37')]('nolimit')){_0x5dd501['limit']=qs['limit'](_0x4e5d2c[_0x2b93('0x31')][_0x2b93('0x38')]);_0x5dd501['offset']=qs[_0x2b93('0x1c')](_0x4e5d2c[_0x2b93('0x31')][_0x2b93('0x1c')]);}_0x5dd501[_0x2b93('0x39')]=qs[_0x2b93('0x3a')](_0x4e5d2c['query'][_0x2b93('0x3a')]);_0x5dd501[_0x2b93('0x3b')]=qs['filters'](_[_0x2b93('0x3c')](_0x4e5d2c[_0x2b93('0x31')],_0x27b3c7[_0x2b93('0x32')]),_0x5b1098);if(_0x4e5d2c[_0x2b93('0x31')][_0x2b93('0x3d')]){_0x5dd501['where']=_[_0x2b93('0x3e')](_0x5dd501[_0x2b93('0x3b')],{'$or':_['map'](_0x5b1098,function(_0x263799){if(_0x263799[_0x2b93('0x3f')]!==_0x2b93('0x40')){var _0x38d0be={};_0x38d0be[_0x263799[_0x2b93('0x29')]]={'$like':'%'+_0x4e5d2c[_0x2b93('0x31')]['filter']+'%'};return _0x38d0be;}})});}_0x5dd501=_[_0x2b93('0x3e')]({},_0x5dd501,_0x4e5d2c[_0x2b93('0x41')]);var _0x5bca7b={'where':_0x5dd501[_0x2b93('0x3b')]};return db[_0x2b93('0x2d')][_0x2b93('0x1e')](_0x5bca7b)[_0x2b93('0x24')](function(_0x22eb98){_0x2accde[_0x2b93('0x1e')]=_0x22eb98;if(_0x4e5d2c['query'][_0x2b93('0x42')]){_0x5dd501[_0x2b93('0x43')]=[{'all':!![]}];}return db[_0x2b93('0x2d')][_0x2b93('0x44')](_0x5dd501);})[_0x2b93('0x24')](function(_0x455179){_0x2accde[_0x2b93('0x45')]=_0x455179;return _0x2accde;})['then'](respondWithFilteredResult(_0x13bc4c,_0x5dd501))[_0x2b93('0x46')](handleError(_0x13bc4c,null));};exports[_0x2b93('0x47')]=function(_0x5a062d,_0x5a23dc){var _0x3d4508={'raw':![],'where':{'id':_0x5a062d['params']['id']}},_0x4fa65c={};_0x4fa65c[_0x2b93('0x2f')]=_[_0x2b93('0x30')](db[_0x2b93('0x2d')][_0x2b93('0x48')]);_0x4fa65c[_0x2b93('0x31')]=_[_0x2b93('0x30')](_0x5a062d['query']);_0x4fa65c[_0x2b93('0x32')]=_[_0x2b93('0x33')](_0x4fa65c[_0x2b93('0x2f')],_0x4fa65c[_0x2b93('0x31')]);_0x3d4508[_0x2b93('0x34')]=_[_0x2b93('0x33')](_0x4fa65c[_0x2b93('0x2f')],qs[_0x2b93('0x35')](_0x5a062d['query']['fields']));_0x3d4508[_0x2b93('0x34')]=_0x3d4508[_0x2b93('0x34')][_0x2b93('0x36')]?_0x3d4508[_0x2b93('0x34')]:_0x4fa65c[_0x2b93('0x2f')];if(_0x5a062d[_0x2b93('0x31')]['includeAll']){_0x3d4508[_0x2b93('0x43')]=[{'all':!![]}];}_0x3d4508=_[_0x2b93('0x3e')]({},_0x3d4508,_0x5a062d['options']);return db[_0x2b93('0x2d')][_0x2b93('0x49')](_0x3d4508)[_0x2b93('0x24')](handleEntityNotFound(_0x5a23dc,null))[_0x2b93('0x24')](respondWithResult(_0x5a23dc,null))[_0x2b93('0x46')](handleError(_0x5a23dc,null));};exports[_0x2b93('0x4a')]=function(_0x1236e4,_0xad38ae){return db['Dynamics365Configuration'][_0x2b93('0x4a')](_0x1236e4['body'],{})[_0x2b93('0x24')](respondWithResult(_0xad38ae,0xc9))[_0x2b93('0x46')](handleError(_0xad38ae,null));};exports[_0x2b93('0x23')]=function(_0x18977a,_0x57d7bc){if(_0x18977a['body']['id']){delete _0x18977a[_0x2b93('0x4b')]['id'];}return db[_0x2b93('0x2d')][_0x2b93('0x49')]({'where':{'id':_0x18977a[_0x2b93('0x4c')]['id']}})[_0x2b93('0x24')](handleEntityNotFound(_0x57d7bc,null))['then'](saveUpdates(_0x18977a[_0x2b93('0x4b')],null))[_0x2b93('0x24')](respondWithResult(_0x57d7bc,null))[_0x2b93('0x46')](handleError(_0x57d7bc,null));};exports[_0x2b93('0x25')]=function(_0x1c1ef1,_0x35079a){return db['Dynamics365Configuration'][_0x2b93('0x49')]({'where':{'id':_0x1c1ef1['params']['id']}})[_0x2b93('0x24')](handleEntityNotFound(_0x35079a,null))[_0x2b93('0x24')](removeEntity(_0x35079a,null))[_0x2b93('0x46')](handleError(_0x35079a,null));};exports['getFields']=function(_0x3a1398,_0x2652e3,_0x1febf3){var _0x5a2446={};var _0x91f13c={};var _0x24548c;var _0x299b38;return db[_0x2b93('0x2d')][_0x2b93('0x4d')]({'where':{'id':_0x3a1398[_0x2b93('0x4c')]['id']}})[_0x2b93('0x24')](handleEntityNotFound(_0x2652e3,null))['then'](function(_0x3c7685){if(_0x3c7685){_0x24548c=_0x3c7685;_0x91f13c[_0x2b93('0x2f')]=_[_0x2b93('0x30')](db[_0x2b93('0x4e')][_0x2b93('0x48')]);_0x91f13c[_0x2b93('0x31')]=_[_0x2b93('0x30')](_0x3a1398[_0x2b93('0x31')]);_0x91f13c['filters']=_[_0x2b93('0x33')](_0x91f13c[_0x2b93('0x2f')],_0x91f13c[_0x2b93('0x31')]);_0x5a2446[_0x2b93('0x34')]=_[_0x2b93('0x33')](_0x91f13c[_0x2b93('0x2f')],qs[_0x2b93('0x35')](_0x3a1398[_0x2b93('0x31')][_0x2b93('0x35')]));_0x5a2446['attributes']=_0x5a2446[_0x2b93('0x34')]['length']?_0x5a2446[_0x2b93('0x34')]:_0x91f13c[_0x2b93('0x2f')];_0x5a2446['order']=qs[_0x2b93('0x3a')](_0x3a1398['query']['sort']);_0x5a2446[_0x2b93('0x3b')]=qs[_0x2b93('0x32')](_[_0x2b93('0x3c')](_0x3a1398['query'],_0x91f13c[_0x2b93('0x32')]));if(_0x3a1398[_0x2b93('0x31')][_0x2b93('0x3d')]){_0x5a2446[_0x2b93('0x3b')]=_['merge'](_0x5a2446[_0x2b93('0x3b')],{'$or':_['map'](_0x5a2446[_0x2b93('0x34')],function(_0x1de31c){var _0x8d1f47={};_0x8d1f47[_0x1de31c]={'$like':'%'+_0x3a1398[_0x2b93('0x31')][_0x2b93('0x3d')]+'%'};return _0x8d1f47;})});}_0x5a2446=_[_0x2b93('0x3e')]({},_0x5a2446,_0x3a1398[_0x2b93('0x41')]);return _0x24548c[_0x2b93('0x4f')](_0x5a2446);}})[_0x2b93('0x24')](function(_0x150e42){if(_0x150e42){_0x299b38=_0x150e42[_0x2b93('0x36')];if(!_0x3a1398[_0x2b93('0x31')][_0x2b93('0x37')](_0x2b93('0x50'))){_0x5a2446['limit']=qs[_0x2b93('0x38')](_0x3a1398[_0x2b93('0x31')][_0x2b93('0x38')]);_0x5a2446[_0x2b93('0x1c')]=qs[_0x2b93('0x1c')](_0x3a1398[_0x2b93('0x31')][_0x2b93('0x1c')]);}return _0x24548c[_0x2b93('0x4f')](_0x5a2446);}})[_0x2b93('0x24')](function(_0x335450){if(_0x335450){return _0x335450?{'count':_0x299b38,'rows':_0x335450}:null;}})[_0x2b93('0x24')](respondWithResult(_0x2652e3,null))['catch'](handleError(_0x2652e3,null));};exports[_0x2b93('0x51')]=function(_0x45fc07,_0xe09c5f,_0x32ca86){var _0x38818c={};var _0xcc19cd={};var _0x12d5b0;var _0x3b8907;return db[_0x2b93('0x2d')][_0x2b93('0x4d')]({'where':{'id':_0x45fc07['params']['id']}})['then'](handleEntityNotFound(_0xe09c5f,null))[_0x2b93('0x24')](function(_0x71fe3b){if(_0x71fe3b){_0x12d5b0=_0x71fe3b;_0xcc19cd['model']=_['keys'](db['Dynamics365Field']['rawAttributes']);_0xcc19cd['query']=_[_0x2b93('0x30')](_0x45fc07[_0x2b93('0x31')]);_0xcc19cd['filters']=_[_0x2b93('0x33')](_0xcc19cd[_0x2b93('0x2f')],_0xcc19cd[_0x2b93('0x31')]);_0x38818c[_0x2b93('0x34')]=_[_0x2b93('0x33')](_0xcc19cd[_0x2b93('0x2f')],qs[_0x2b93('0x35')](_0x45fc07[_0x2b93('0x31')][_0x2b93('0x35')]));_0x38818c[_0x2b93('0x34')]=_0x38818c[_0x2b93('0x34')][_0x2b93('0x36')]?_0x38818c[_0x2b93('0x34')]:_0xcc19cd[_0x2b93('0x2f')];_0x38818c[_0x2b93('0x39')]=qs[_0x2b93('0x3a')](_0x45fc07[_0x2b93('0x31')][_0x2b93('0x3a')]);_0x38818c[_0x2b93('0x3b')]=qs[_0x2b93('0x32')](_[_0x2b93('0x3c')](_0x45fc07[_0x2b93('0x31')],_0xcc19cd['filters']));if(_0x45fc07['query']['filter']){_0x38818c[_0x2b93('0x3b')]=_[_0x2b93('0x3e')](_0x38818c['where'],{'$or':_['map'](_0x38818c[_0x2b93('0x34')],function(_0x1d8fb3){var _0x5bdfe9={};_0x5bdfe9[_0x1d8fb3]={'$like':'%'+_0x45fc07['query'][_0x2b93('0x3d')]+'%'};return _0x5bdfe9;})});}_0x38818c=_['merge']({},_0x38818c,_0x45fc07[_0x2b93('0x41')]);return _0x12d5b0[_0x2b93('0x51')](_0x38818c);}})['then'](function(_0x2e74b7){if(_0x2e74b7){_0x3b8907=_0x2e74b7[_0x2b93('0x36')];if(!_0x45fc07[_0x2b93('0x31')][_0x2b93('0x37')](_0x2b93('0x50'))){_0x38818c['limit']=qs[_0x2b93('0x38')](_0x45fc07[_0x2b93('0x31')]['limit']);_0x38818c[_0x2b93('0x1c')]=qs[_0x2b93('0x1c')](_0x45fc07['query'][_0x2b93('0x1c')]);}return _0x12d5b0[_0x2b93('0x51')](_0x38818c);}})['then'](function(_0x45812d){if(_0x45812d){return _0x45812d?{'count':_0x3b8907,'rows':_0x45812d}:null;}})[_0x2b93('0x24')](respondWithResult(_0xe09c5f,null))['catch'](handleError(_0xe09c5f,null));};exports['getDescriptions']=function(_0x4dd2df,_0x414fb1,_0xe6c982){var _0x4df72e={};var _0x5663c0={};var _0xf6c6ed;var _0x289ea5;return db[_0x2b93('0x2d')][_0x2b93('0x4d')]({'where':{'id':_0x4dd2df[_0x2b93('0x4c')]['id']}})['then'](handleEntityNotFound(_0x414fb1,null))[_0x2b93('0x24')](function(_0x26204f){if(_0x26204f){_0xf6c6ed=_0x26204f;_0x5663c0[_0x2b93('0x2f')]=_[_0x2b93('0x30')](db[_0x2b93('0x4e')]['rawAttributes']);_0x5663c0[_0x2b93('0x31')]=_[_0x2b93('0x30')](_0x4dd2df['query']);_0x5663c0[_0x2b93('0x32')]=_[_0x2b93('0x33')](_0x5663c0[_0x2b93('0x2f')],_0x5663c0[_0x2b93('0x31')]);_0x4df72e['attributes']=_['intersection'](_0x5663c0['model'],qs['fields'](_0x4dd2df[_0x2b93('0x31')][_0x2b93('0x35')]));_0x4df72e[_0x2b93('0x34')]=_0x4df72e[_0x2b93('0x34')][_0x2b93('0x36')]?_0x4df72e[_0x2b93('0x34')]:_0x5663c0[_0x2b93('0x2f')];_0x4df72e['order']=qs[_0x2b93('0x3a')](_0x4dd2df[_0x2b93('0x31')][_0x2b93('0x3a')]);_0x4df72e[_0x2b93('0x3b')]=qs[_0x2b93('0x32')](_[_0x2b93('0x3c')](_0x4dd2df[_0x2b93('0x31')],_0x5663c0['filters']));if(_0x4dd2df[_0x2b93('0x31')][_0x2b93('0x3d')]){_0x4df72e['where']=_['merge'](_0x4df72e[_0x2b93('0x3b')],{'$or':_['map'](_0x4df72e[_0x2b93('0x34')],function(_0xf4334a){var _0x47db95={};_0x47db95[_0xf4334a]={'$like':'%'+_0x4dd2df[_0x2b93('0x31')][_0x2b93('0x3d')]+'%'};return _0x47db95;})});}_0x4df72e=_['merge']({},_0x4df72e,_0x4dd2df[_0x2b93('0x41')]);return _0xf6c6ed[_0x2b93('0x52')](_0x4df72e);}})[_0x2b93('0x24')](function(_0x2c134f){if(_0x2c134f){_0x289ea5=_0x2c134f[_0x2b93('0x36')];if(!_0x4dd2df[_0x2b93('0x31')][_0x2b93('0x37')](_0x2b93('0x50'))){_0x4df72e[_0x2b93('0x38')]=qs['limit'](_0x4dd2df[_0x2b93('0x31')][_0x2b93('0x38')]);_0x4df72e[_0x2b93('0x1c')]=qs[_0x2b93('0x1c')](_0x4dd2df['query'][_0x2b93('0x1c')]);}return _0xf6c6ed[_0x2b93('0x52')](_0x4df72e);}})[_0x2b93('0x24')](function(_0x304ccc){if(_0x304ccc){return _0x304ccc?{'count':_0x289ea5,'rows':_0x304ccc}:null;}})[_0x2b93('0x24')](respondWithResult(_0x414fb1,null))['catch'](handleError(_0x414fb1,null));};
\ No newline at end of file
+var _0xced9=['zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','ejs','fs-extra','squel','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','undefined','count','offset','limit','set','Content-Range','apply','reject','save','destroy','then','end','error','name','send','index','rawAttributes','fieldName','type','key','model','map','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','merge','VIRTUAL','filter','options','Dynamics365Configuration','includeAll','include','findAll','catch','show','params','create','body','update','find','getFields','findOne','Dynamics365Field','nolimit','getSubjects','getDescriptions'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0xced9,0x1ec));var _0x9ced=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xced9[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x9ced('0x0'));var jsonpatch=require(_0x9ced('0x1'));var rp=require(_0x9ced('0x2'));var moment=require(_0x9ced('0x3'));var BPromise=require(_0x9ced('0x4'));var Mustache=require(_0x9ced('0x5'));var util=require('util');var path=require(_0x9ced('0x6'));var sox=require(_0x9ced('0x7'));var csv=require('to-csv');var ejs=require(_0x9ced('0x8'));var fs=require('fs');var fs_extra=require(_0x9ced('0x9'));var _=require('lodash');var squel=require(_0x9ced('0xa'));var crypto=require('crypto');var jsforce=require(_0x9ced('0xb'));var deskjs=require(_0x9ced('0xc'));var toCsv=require(_0x9ced('0xd'));var querystring=require('querystring');var Papa=require(_0x9ced('0xe'));var Redis=require(_0x9ced('0xf'));var authService=require(_0x9ced('0x10'));var qs=require(_0x9ced('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x9ced('0x12'));var logger=require(_0x9ced('0x13'))('api');var utils=require(_0x9ced('0x14'));var config=require(_0x9ced('0x15'));var licenseUtil=require(_0x9ced('0x16'));var db=require(_0x9ced('0x17'))['db'];function respondWithStatusCode(_0xaacb0b,_0x55289f){_0x55289f=_0x55289f||0xcc;return function(_0x3836f8){if(_0x3836f8){return _0xaacb0b[_0x9ced('0x18')](_0x55289f);}return _0xaacb0b[_0x9ced('0x19')](_0x55289f)['end']();};}function respondWithResult(_0x5926d5,_0x5f9456){_0x5f9456=_0x5f9456||0xc8;return function(_0x12c6a6){if(_0x12c6a6){return _0x5926d5[_0x9ced('0x19')](_0x5f9456)[_0x9ced('0x1a')](_0x12c6a6);}};}function respondWithFilteredResult(_0xcec3e2,_0x40edad){return function(_0x2a05e0){if(_0x2a05e0){var _0x4d2c82=typeof _0x40edad['offset']===_0x9ced('0x1b')&&typeof _0x40edad['limit']===_0x9ced('0x1b');var _0x2aad4e=_0x2a05e0[_0x9ced('0x1c')];var _0x4a4621=_0x4d2c82?0x0:_0x40edad[_0x9ced('0x1d')];var _0x46db62=_0x4d2c82?_0x2a05e0[_0x9ced('0x1c')]:_0x40edad['offset']+_0x40edad[_0x9ced('0x1e')];var _0x489616;if(_0x46db62>=_0x2aad4e){_0x46db62=_0x2aad4e;_0x489616=0xc8;}else{_0x489616=0xce;}_0xcec3e2[_0x9ced('0x19')](_0x489616);return _0xcec3e2[_0x9ced('0x1f')](_0x9ced('0x20'),_0x4a4621+'-'+_0x46db62+'/'+_0x2aad4e)[_0x9ced('0x1a')](_0x2a05e0);}return null;};}function patchUpdates(_0x1f6bae){return function(_0x52db8c){try{jsonpatch[_0x9ced('0x21')](_0x52db8c,_0x1f6bae,!![]);}catch(_0x57563a){return BPromise[_0x9ced('0x22')](_0x57563a);}return _0x52db8c[_0x9ced('0x23')]();};}function saveUpdates(_0x4ea9ff,_0x2f545b){return function(_0x38d7d9){if(_0x38d7d9){return _0x38d7d9['update'](_0x4ea9ff)['then'](function(_0x33fcb2){return _0x33fcb2;});}return null;};}function removeEntity(_0x2a03ef,_0x2e04c4){return function(_0xdeb53e){if(_0xdeb53e){return _0xdeb53e[_0x9ced('0x24')]()[_0x9ced('0x25')](function(){_0x2a03ef[_0x9ced('0x19')](0xcc)[_0x9ced('0x26')]();});}};}function handleEntityNotFound(_0x241e7f,_0x33ce1f){return function(_0x383805){if(!_0x383805){_0x241e7f['sendStatus'](0x194);}return _0x383805;};}function handleError(_0x25f341,_0x42b63a){_0x42b63a=_0x42b63a||0x1f4;return function(_0x457314){logger[_0x9ced('0x27')](_0x457314['stack']);if(_0x457314[_0x9ced('0x28')]){delete _0x457314[_0x9ced('0x28')];}_0x25f341['status'](_0x42b63a)[_0x9ced('0x29')](_0x457314);};}exports[_0x9ced('0x2a')]=function(_0x4f8e31,_0x4efad7){var _0x4d859d={},_0xdd77e5={},_0x463ae3={'count':0x0,'rows':[]};var _0x4fe713=_['map'](db['Dynamics365Configuration'][_0x9ced('0x2b')],function(_0x53de22){return{'name':_0x53de22[_0x9ced('0x2c')],'type':_0x53de22[_0x9ced('0x2d')][_0x9ced('0x2e')]};});_0xdd77e5[_0x9ced('0x2f')]=_[_0x9ced('0x30')](_0x4fe713,'name');_0xdd77e5['query']=_[_0x9ced('0x31')](_0x4f8e31[_0x9ced('0x32')]);_0xdd77e5[_0x9ced('0x33')]=_[_0x9ced('0x34')](_0xdd77e5[_0x9ced('0x2f')],_0xdd77e5[_0x9ced('0x32')]);_0x4d859d[_0x9ced('0x35')]=_[_0x9ced('0x34')](_0xdd77e5['model'],qs['fields'](_0x4f8e31[_0x9ced('0x32')][_0x9ced('0x36')]));_0x4d859d[_0x9ced('0x35')]=_0x4d859d['attributes'][_0x9ced('0x37')]?_0x4d859d[_0x9ced('0x35')]:_0xdd77e5[_0x9ced('0x2f')];if(!_0x4f8e31[_0x9ced('0x32')][_0x9ced('0x38')]('nolimit')){_0x4d859d[_0x9ced('0x1e')]=qs[_0x9ced('0x1e')](_0x4f8e31[_0x9ced('0x32')][_0x9ced('0x1e')]);_0x4d859d[_0x9ced('0x1d')]=qs[_0x9ced('0x1d')](_0x4f8e31[_0x9ced('0x32')][_0x9ced('0x1d')]);}_0x4d859d[_0x9ced('0x39')]=qs['sort'](_0x4f8e31[_0x9ced('0x32')][_0x9ced('0x3a')]);_0x4d859d[_0x9ced('0x3b')]=qs['filters'](_[_0x9ced('0x3c')](_0x4f8e31['query'],_0xdd77e5['filters']),_0x4fe713);if(_0x4f8e31['query']['filter']){_0x4d859d['where']=_[_0x9ced('0x3d')](_0x4d859d[_0x9ced('0x3b')],{'$or':_[_0x9ced('0x30')](_0x4fe713,function(_0xcd9a05){if(_0xcd9a05['type']!==_0x9ced('0x3e')){var _0x553003={};_0x553003[_0xcd9a05['name']]={'$like':'%'+_0x4f8e31[_0x9ced('0x32')][_0x9ced('0x3f')]+'%'};return _0x553003;}})});}_0x4d859d=_[_0x9ced('0x3d')]({},_0x4d859d,_0x4f8e31[_0x9ced('0x40')]);var _0x38646e={'where':_0x4d859d['where']};return db[_0x9ced('0x41')][_0x9ced('0x1c')](_0x38646e)[_0x9ced('0x25')](function(_0x2c3919){_0x463ae3[_0x9ced('0x1c')]=_0x2c3919;if(_0x4f8e31[_0x9ced('0x32')][_0x9ced('0x42')]){_0x4d859d[_0x9ced('0x43')]=[{'all':!![]}];}return db['Dynamics365Configuration'][_0x9ced('0x44')](_0x4d859d);})[_0x9ced('0x25')](function(_0x12e0b5){_0x463ae3['rows']=_0x12e0b5;return _0x463ae3;})['then'](respondWithFilteredResult(_0x4efad7,_0x4d859d))[_0x9ced('0x45')](handleError(_0x4efad7,null));};exports[_0x9ced('0x46')]=function(_0x4d3eb5,_0x4d30f0){var _0x23069={'raw':![],'where':{'id':_0x4d3eb5[_0x9ced('0x47')]['id']}},_0x10e25e={};_0x10e25e[_0x9ced('0x2f')]=_['keys'](db[_0x9ced('0x41')][_0x9ced('0x2b')]);_0x10e25e[_0x9ced('0x32')]=_[_0x9ced('0x31')](_0x4d3eb5[_0x9ced('0x32')]);_0x10e25e[_0x9ced('0x33')]=_[_0x9ced('0x34')](_0x10e25e[_0x9ced('0x2f')],_0x10e25e[_0x9ced('0x32')]);_0x23069[_0x9ced('0x35')]=_[_0x9ced('0x34')](_0x10e25e[_0x9ced('0x2f')],qs[_0x9ced('0x36')](_0x4d3eb5[_0x9ced('0x32')][_0x9ced('0x36')]));_0x23069[_0x9ced('0x35')]=_0x23069[_0x9ced('0x35')][_0x9ced('0x37')]?_0x23069[_0x9ced('0x35')]:_0x10e25e['model'];if(_0x4d3eb5['query'][_0x9ced('0x42')]){_0x23069[_0x9ced('0x43')]=[{'all':!![]}];}_0x23069=_[_0x9ced('0x3d')]({},_0x23069,_0x4d3eb5[_0x9ced('0x40')]);return db[_0x9ced('0x41')]['find'](_0x23069)[_0x9ced('0x25')](handleEntityNotFound(_0x4d30f0,null))['then'](respondWithResult(_0x4d30f0,null))[_0x9ced('0x45')](handleError(_0x4d30f0,null));};exports[_0x9ced('0x48')]=function(_0x25603d,_0x1ab4c8){return db[_0x9ced('0x41')][_0x9ced('0x48')](_0x25603d[_0x9ced('0x49')],{})['then'](respondWithResult(_0x1ab4c8,0xc9))['catch'](handleError(_0x1ab4c8,null));};exports[_0x9ced('0x4a')]=function(_0x5f265f,_0x509f02){if(_0x5f265f[_0x9ced('0x49')]['id']){delete _0x5f265f['body']['id'];}return db[_0x9ced('0x41')]['find']({'where':{'id':_0x5f265f['params']['id']}})['then'](handleEntityNotFound(_0x509f02,null))['then'](saveUpdates(_0x5f265f[_0x9ced('0x49')],null))[_0x9ced('0x25')](respondWithResult(_0x509f02,null))[_0x9ced('0x45')](handleError(_0x509f02,null));};exports[_0x9ced('0x24')]=function(_0x5b3451,_0x313467){return db[_0x9ced('0x41')][_0x9ced('0x4b')]({'where':{'id':_0x5b3451[_0x9ced('0x47')]['id']}})[_0x9ced('0x25')](handleEntityNotFound(_0x313467,null))[_0x9ced('0x25')](removeEntity(_0x313467,null))[_0x9ced('0x45')](handleError(_0x313467,null));};exports[_0x9ced('0x4c')]=function(_0x8db195,_0x643bee,_0x4c48d7){var _0x2d243c={};var _0x32c97f={};var _0x1261b3;var _0x1af818;return db[_0x9ced('0x41')][_0x9ced('0x4d')]({'where':{'id':_0x8db195[_0x9ced('0x47')]['id']}})['then'](handleEntityNotFound(_0x643bee,null))[_0x9ced('0x25')](function(_0xd1df88){if(_0xd1df88){_0x1261b3=_0xd1df88;_0x32c97f[_0x9ced('0x2f')]=_['keys'](db[_0x9ced('0x4e')][_0x9ced('0x2b')]);_0x32c97f['query']=_[_0x9ced('0x31')](_0x8db195[_0x9ced('0x32')]);_0x32c97f[_0x9ced('0x33')]=_[_0x9ced('0x34')](_0x32c97f[_0x9ced('0x2f')],_0x32c97f[_0x9ced('0x32')]);_0x2d243c[_0x9ced('0x35')]=_[_0x9ced('0x34')](_0x32c97f[_0x9ced('0x2f')],qs[_0x9ced('0x36')](_0x8db195['query'][_0x9ced('0x36')]));_0x2d243c[_0x9ced('0x35')]=_0x2d243c['attributes'][_0x9ced('0x37')]?_0x2d243c[_0x9ced('0x35')]:_0x32c97f[_0x9ced('0x2f')];_0x2d243c[_0x9ced('0x39')]=qs[_0x9ced('0x3a')](_0x8db195[_0x9ced('0x32')][_0x9ced('0x3a')]);_0x2d243c[_0x9ced('0x3b')]=qs[_0x9ced('0x33')](_['pick'](_0x8db195[_0x9ced('0x32')],_0x32c97f['filters']));if(_0x8db195[_0x9ced('0x32')][_0x9ced('0x3f')]){_0x2d243c[_0x9ced('0x3b')]=_['merge'](_0x2d243c[_0x9ced('0x3b')],{'$or':_['map'](_0x2d243c[_0x9ced('0x35')],function(_0x5dab9e){var _0x5b466d={};_0x5b466d[_0x5dab9e]={'$like':'%'+_0x8db195[_0x9ced('0x32')][_0x9ced('0x3f')]+'%'};return _0x5b466d;})});}_0x2d243c=_[_0x9ced('0x3d')]({},_0x2d243c,_0x8db195[_0x9ced('0x40')]);return _0x1261b3[_0x9ced('0x4c')](_0x2d243c);}})[_0x9ced('0x25')](function(_0x4f152a){if(_0x4f152a){_0x1af818=_0x4f152a['length'];if(!_0x8db195[_0x9ced('0x32')][_0x9ced('0x38')](_0x9ced('0x4f'))){_0x2d243c[_0x9ced('0x1e')]=qs[_0x9ced('0x1e')](_0x8db195[_0x9ced('0x32')][_0x9ced('0x1e')]);_0x2d243c[_0x9ced('0x1d')]=qs['offset'](_0x8db195[_0x9ced('0x32')][_0x9ced('0x1d')]);}return _0x1261b3[_0x9ced('0x4c')](_0x2d243c);}})['then'](function(_0x2a589d){if(_0x2a589d){return _0x2a589d?{'count':_0x1af818,'rows':_0x2a589d}:null;}})[_0x9ced('0x25')](respondWithResult(_0x643bee,null))[_0x9ced('0x45')](handleError(_0x643bee,null));};exports[_0x9ced('0x50')]=function(_0x1cc24d,_0x1980b2,_0x3a15f0){var _0x5c7056={};var _0x96f6d7={};var _0x32115f;var _0x5117da;return db[_0x9ced('0x41')][_0x9ced('0x4d')]({'where':{'id':_0x1cc24d[_0x9ced('0x47')]['id']}})[_0x9ced('0x25')](handleEntityNotFound(_0x1980b2,null))[_0x9ced('0x25')](function(_0x345b7d){if(_0x345b7d){_0x32115f=_0x345b7d;_0x96f6d7[_0x9ced('0x2f')]=_[_0x9ced('0x31')](db[_0x9ced('0x4e')][_0x9ced('0x2b')]);_0x96f6d7[_0x9ced('0x32')]=_['keys'](_0x1cc24d['query']);_0x96f6d7[_0x9ced('0x33')]=_['intersection'](_0x96f6d7['model'],_0x96f6d7[_0x9ced('0x32')]);_0x5c7056['attributes']=_[_0x9ced('0x34')](_0x96f6d7[_0x9ced('0x2f')],qs[_0x9ced('0x36')](_0x1cc24d[_0x9ced('0x32')]['fields']));_0x5c7056[_0x9ced('0x35')]=_0x5c7056[_0x9ced('0x35')]['length']?_0x5c7056[_0x9ced('0x35')]:_0x96f6d7[_0x9ced('0x2f')];_0x5c7056[_0x9ced('0x39')]=qs[_0x9ced('0x3a')](_0x1cc24d[_0x9ced('0x32')][_0x9ced('0x3a')]);_0x5c7056[_0x9ced('0x3b')]=qs[_0x9ced('0x33')](_[_0x9ced('0x3c')](_0x1cc24d[_0x9ced('0x32')],_0x96f6d7[_0x9ced('0x33')]));if(_0x1cc24d['query'][_0x9ced('0x3f')]){_0x5c7056[_0x9ced('0x3b')]=_[_0x9ced('0x3d')](_0x5c7056[_0x9ced('0x3b')],{'$or':_[_0x9ced('0x30')](_0x5c7056['attributes'],function(_0x554f17){var _0x36530b={};_0x36530b[_0x554f17]={'$like':'%'+_0x1cc24d[_0x9ced('0x32')][_0x9ced('0x3f')]+'%'};return _0x36530b;})});}_0x5c7056=_[_0x9ced('0x3d')]({},_0x5c7056,_0x1cc24d[_0x9ced('0x40')]);return _0x32115f[_0x9ced('0x50')](_0x5c7056);}})[_0x9ced('0x25')](function(_0x101908){if(_0x101908){_0x5117da=_0x101908[_0x9ced('0x37')];if(!_0x1cc24d[_0x9ced('0x32')][_0x9ced('0x38')](_0x9ced('0x4f'))){_0x5c7056[_0x9ced('0x1e')]=qs[_0x9ced('0x1e')](_0x1cc24d[_0x9ced('0x32')][_0x9ced('0x1e')]);_0x5c7056[_0x9ced('0x1d')]=qs[_0x9ced('0x1d')](_0x1cc24d['query'][_0x9ced('0x1d')]);}return _0x32115f[_0x9ced('0x50')](_0x5c7056);}})[_0x9ced('0x25')](function(_0x3c5edf){if(_0x3c5edf){return _0x3c5edf?{'count':_0x5117da,'rows':_0x3c5edf}:null;}})[_0x9ced('0x25')](respondWithResult(_0x1980b2,null))[_0x9ced('0x45')](handleError(_0x1980b2,null));};exports['getDescriptions']=function(_0x15f47f,_0x5acc7b,_0x42a6a2){var _0x573153={};var _0x3e45c2={};var _0x490b17;var _0x2f81b7;return db[_0x9ced('0x41')]['findOne']({'where':{'id':_0x15f47f[_0x9ced('0x47')]['id']}})[_0x9ced('0x25')](handleEntityNotFound(_0x5acc7b,null))[_0x9ced('0x25')](function(_0x5b099b){if(_0x5b099b){_0x490b17=_0x5b099b;_0x3e45c2['model']=_[_0x9ced('0x31')](db[_0x9ced('0x4e')][_0x9ced('0x2b')]);_0x3e45c2[_0x9ced('0x32')]=_[_0x9ced('0x31')](_0x15f47f[_0x9ced('0x32')]);_0x3e45c2[_0x9ced('0x33')]=_[_0x9ced('0x34')](_0x3e45c2[_0x9ced('0x2f')],_0x3e45c2['query']);_0x573153[_0x9ced('0x35')]=_[_0x9ced('0x34')](_0x3e45c2['model'],qs[_0x9ced('0x36')](_0x15f47f[_0x9ced('0x32')][_0x9ced('0x36')]));_0x573153[_0x9ced('0x35')]=_0x573153[_0x9ced('0x35')][_0x9ced('0x37')]?_0x573153[_0x9ced('0x35')]:_0x3e45c2['model'];_0x573153[_0x9ced('0x39')]=qs[_0x9ced('0x3a')](_0x15f47f[_0x9ced('0x32')][_0x9ced('0x3a')]);_0x573153[_0x9ced('0x3b')]=qs['filters'](_[_0x9ced('0x3c')](_0x15f47f[_0x9ced('0x32')],_0x3e45c2['filters']));if(_0x15f47f[_0x9ced('0x32')][_0x9ced('0x3f')]){_0x573153[_0x9ced('0x3b')]=_['merge'](_0x573153['where'],{'$or':_[_0x9ced('0x30')](_0x573153[_0x9ced('0x35')],function(_0x4c2c78){var _0x13dfd5={};_0x13dfd5[_0x4c2c78]={'$like':'%'+_0x15f47f[_0x9ced('0x32')][_0x9ced('0x3f')]+'%'};return _0x13dfd5;})});}_0x573153=_[_0x9ced('0x3d')]({},_0x573153,_0x15f47f[_0x9ced('0x40')]);return _0x490b17[_0x9ced('0x51')](_0x573153);}})[_0x9ced('0x25')](function(_0x568ca5){if(_0x568ca5){_0x2f81b7=_0x568ca5[_0x9ced('0x37')];if(!_0x15f47f['query'][_0x9ced('0x38')](_0x9ced('0x4f'))){_0x573153[_0x9ced('0x1e')]=qs['limit'](_0x15f47f[_0x9ced('0x32')][_0x9ced('0x1e')]);_0x573153['offset']=qs[_0x9ced('0x1d')](_0x15f47f[_0x9ced('0x32')][_0x9ced('0x1d')]);}return _0x490b17[_0x9ced('0x51')](_0x573153);}})[_0x9ced('0x25')](function(_0x120711){if(_0x120711){return _0x120711?{'count':_0x2f81b7,'rows':_0x120711}:null;}})[_0x9ced('0x25')](respondWithResult(_0x5acc7b,null))['catch'](handleError(_0x5acc7b,null));};
\ No newline at end of file
index f57ef7b..a888cc9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xedd9=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./intDynamics365Configuration.attributes','exports','Dynamics365Configuration','util'];(function(_0x646def,_0x4a9670){var _0x36e8be=function(_0x31a2b1){while(--_0x31a2b1){_0x646def['push'](_0x646def['shift']());}};_0x36e8be(++_0x4a9670);}(_0xedd9,0xfc));var _0x9edd=function(_0x4fe528,_0x75d312){_0x4fe528=_0x4fe528-0x0;var _0x37ceb3=_0xedd9[_0x4fe528];return _0x37ceb3;};'use strict';var _=require('lodash');var util=require(_0x9edd('0x0'));var logger=require(_0x9edd('0x1'))(_0x9edd('0x2'));var moment=require(_0x9edd('0x3'));var BPromise=require(_0x9edd('0x4'));var rp=require(_0x9edd('0x5'));var fs=require('fs');var path=require(_0x9edd('0x6'));var rimraf=require(_0x9edd('0x7'));var config=require('../../config/environment');var attributes=require(_0x9edd('0x8'));module[_0x9edd('0x9')]=function(_0x268f9e,_0x34c1a7){return _0x268f9e['define'](_0x9edd('0xa'),attributes,{'tableName':'int_dynamics365_configurations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x00bb=['util','../../config/logger','moment','request-promise','path','../../config/environment','./intDynamics365Configuration.attributes','define','Dynamics365Configuration','int_dynamics365_configurations','lodash'];(function(_0x502cc4,_0x55af94){var _0x34d4fa=function(_0x24a415){while(--_0x24a415){_0x502cc4['push'](_0x502cc4['shift']());}};_0x34d4fa(++_0x55af94);}(_0x00bb,0x1d8));var _0xb00b=function(_0x30ae5e,_0x391fc4){_0x30ae5e=_0x30ae5e-0x0;var _0x1f2e93=_0x00bb[_0x30ae5e];return _0x1f2e93;};'use strict';var _=require(_0xb00b('0x0'));var util=require(_0xb00b('0x1'));var logger=require(_0xb00b('0x2'))('api');var moment=require(_0xb00b('0x3'));var BPromise=require('bluebird');var rp=require(_0xb00b('0x4'));var fs=require('fs');var path=require(_0xb00b('0x5'));var rimraf=require('rimraf');var config=require(_0xb00b('0x6'));var attributes=require(_0xb00b('0x7'));module['exports']=function(_0x574cf8,_0x532ffb){return _0x574cf8[_0xb00b('0x8')](_0xb00b('0x9'),attributes,{'tableName':_0xb00b('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 87212b9..1e55002 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc1a0=['../../config/environment','jayson/promise','client','request','Dynamics365Configuration,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Configuration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','util','moment','bluebird','randomstring','ioredis','../../config/logger','rpc'];(function(_0x3814b1,_0x2baf39){var _0xac1211=function(_0x2503ef){while(--_0x2503ef){_0x3814b1['push'](_0x3814b1['shift']());}};_0xac1211(++_0x2baf39);}(_0xc1a0,0x1c5));var _0x0c1a=function(_0x1cd674,_0x8d3638){_0x1cd674=_0x1cd674-0x0;var _0x27928f=_0xc1a0[_0x1cd674];return _0x27928f;};'use strict';var _=require('lodash');var util=require(_0x0c1a('0x0'));var moment=require(_0x0c1a('0x1'));var BPromise=require(_0x0c1a('0x2'));var rs=require(_0x0c1a('0x3'));var fs=require('fs');var Redis=require(_0x0c1a('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x0c1a('0x5'))(_0x0c1a('0x6'));var config=require(_0x0c1a('0x7'));var jayson=require(_0x0c1a('0x8'));var client=jayson[_0x0c1a('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2526d6,_0x56a027,_0x621680){return new BPromise(function(_0x35e972,_0x21320b){return client[_0x0c1a('0xa')](_0x2526d6,_0x621680)['then'](function(_0x529137){logger['info'](_0x0c1a('0xb'),_0x56a027,_0x0c1a('0xc'));logger[_0x0c1a('0xd')](_0x0c1a('0xe'),_0x56a027,_0x0c1a('0xc'),JSON[_0x0c1a('0xf')](_0x529137));if(_0x529137[_0x0c1a('0x10')]){if(_0x529137[_0x0c1a('0x10')][_0x0c1a('0x11')]===0x1f4){logger[_0x0c1a('0x10')](_0x0c1a('0xb'),_0x56a027,_0x529137[_0x0c1a('0x10')][_0x0c1a('0x12')]);return _0x21320b(_0x529137[_0x0c1a('0x10')][_0x0c1a('0x12')]);}logger[_0x0c1a('0x10')](_0x0c1a('0xb'),_0x56a027,_0x529137[_0x0c1a('0x10')][_0x0c1a('0x12')]);return _0x35e972(_0x529137[_0x0c1a('0x10')][_0x0c1a('0x12')]);}else{logger[_0x0c1a('0x13')]('Dynamics365Configuration,\x20%s,\x20%s',_0x56a027,'request\x20sent');_0x35e972(_0x529137['result'][_0x0c1a('0x12')]);}})['catch'](function(_0x29267d){logger['error'](_0x0c1a('0xb'),_0x56a027,_0x29267d);_0x21320b(_0x29267d);});});}
\ No newline at end of file
+var _0x5a95=['Dynamics365Configuration,\x20%s,\x20%s','message','request\x20sent','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','debug','Dynamics365Configuration,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x1b09e8,_0x5c9627){var _0x158835=function(_0x5017ba){while(--_0x5017ba){_0x1b09e8['push'](_0x1b09e8['shift']());}};_0x158835(++_0x5c9627);}(_0x5a95,0xc5));var _0x55a9=function(_0x57be65,_0x1cac09){_0x57be65=_0x57be65-0x0;var _0x2149aa=_0x5a95[_0x57be65];return _0x2149aa;};'use strict';var _=require(_0x55a9('0x0'));var util=require(_0x55a9('0x1'));var moment=require(_0x55a9('0x2'));var BPromise=require(_0x55a9('0x3'));var rs=require(_0x55a9('0x4'));var fs=require('fs');var Redis=require(_0x55a9('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x55a9('0x6'));var logger=require('../../config/logger')(_0x55a9('0x7'));var config=require(_0x55a9('0x8'));var jayson=require(_0x55a9('0x9'));var client=jayson[_0x55a9('0xa')][_0x55a9('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1e7df2,_0x8187ad,_0x284992){return new BPromise(function(_0x55b62a,_0x3ced3c){return client[_0x55a9('0xc')](_0x1e7df2,_0x284992)[_0x55a9('0xd')](function(_0x31c843){logger[_0x55a9('0xe')]('Dynamics365Configuration,\x20%s,\x20%s',_0x8187ad,'request\x20sent');logger[_0x55a9('0xf')](_0x55a9('0x10'),_0x8187ad,'request\x20sent',JSON[_0x55a9('0x11')](_0x31c843));if(_0x31c843['error']){if(_0x31c843['error']['code']===0x1f4){logger[_0x55a9('0x12')](_0x55a9('0x13'),_0x8187ad,_0x31c843[_0x55a9('0x12')][_0x55a9('0x14')]);return _0x3ced3c(_0x31c843['error']['message']);}logger[_0x55a9('0x12')]('Dynamics365Configuration,\x20%s,\x20%s',_0x8187ad,_0x31c843[_0x55a9('0x12')]['message']);return _0x55b62a(_0x31c843['error']['message']);}else{logger['info']('Dynamics365Configuration,\x20%s,\x20%s',_0x8187ad,_0x55a9('0x15'));_0x55b62a(_0x31c843[_0x55a9('0x16')][_0x55a9('0x14')]);}})[_0x55a9('0x17')](function(_0x15c38c){logger[_0x55a9('0x12')](_0x55a9('0x13'),_0x8187ad,_0x15c38c);_0x3ced3c(_0x15c38c);});});}
\ No newline at end of file
index b1d9d48..cba42e6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4160=['../../config/environment','./intDynamics365Field.controller','get','isAuthenticated','index','/:id','show','post','create','put','delete','destroy','exports','multer','util','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x208803,_0x2f942b){var _0x5c77e0=function(_0x1ba8ff){while(--_0x1ba8ff){_0x208803['push'](_0x208803['shift']());}};_0x5c77e0(++_0x2f942b);}(_0x4160,0x189));var _0x0416=function(_0x372d63,_0x290b40){_0x372d63=_0x372d63-0x0;var _0x271e79=_0x4160[_0x372d63];return _0x271e79;};'use strict';var multer=require(_0x0416('0x0'));var util=require(_0x0416('0x1'));var path=require(_0x0416('0x2'));var timeout=require(_0x0416('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x0416('0x4'));var auth=require(_0x0416('0x5'));var interaction=require(_0x0416('0x6'));var config=require(_0x0416('0x7'));var controller=require(_0x0416('0x8'));router[_0x0416('0x9')]('/',auth[_0x0416('0xa')](),controller[_0x0416('0xb')]);router[_0x0416('0x9')](_0x0416('0xc'),auth[_0x0416('0xa')](),controller[_0x0416('0xd')]);router[_0x0416('0xe')]('/',auth['isAuthenticated'](),controller[_0x0416('0xf')]);router[_0x0416('0x10')](_0x0416('0xc'),auth[_0x0416('0xa')](),controller['update']);router[_0x0416('0x11')]('/:id',auth[_0x0416('0xa')](),controller[_0x0416('0x12')]);module[_0x0416('0x13')]=router;
\ No newline at end of file
+var _0xdd7e=['exports','multer','path','connect-timeout','express','Router','fs-extra','../../config/environment','get','isAuthenticated','index','/:id','show','create','update','delete','destroy'];(function(_0x11c573,_0x9e7c6e){var _0x6b72de=function(_0x2e8a61){while(--_0x2e8a61){_0x11c573['push'](_0x11c573['shift']());}};_0x6b72de(++_0x9e7c6e);}(_0xdd7e,0xab));var _0xedd7=function(_0xa46b2c,_0x2cb10f){_0xa46b2c=_0xa46b2c-0x0;var _0x2ba9f2=_0xdd7e[_0xa46b2c];return _0x2ba9f2;};'use strict';var multer=require(_0xedd7('0x0'));var util=require('util');var path=require(_0xedd7('0x1'));var timeout=require(_0xedd7('0x2'));var express=require(_0xedd7('0x3'));var router=express[_0xedd7('0x4')]();var fs_extra=require(_0xedd7('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xedd7('0x6'));var controller=require('./intDynamics365Field.controller');router[_0xedd7('0x7')]('/',auth[_0xedd7('0x8')](),controller[_0xedd7('0x9')]);router['get'](_0xedd7('0xa'),auth[_0xedd7('0x8')](),controller[_0xedd7('0xb')]);router['post']('/',auth['isAuthenticated'](),controller[_0xedd7('0xc')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0xedd7('0xd')]);router[_0xedd7('0xe')](_0xedd7('0xa'),auth[_0xedd7('0x8')](),controller[_0xedd7('0xf')]);module[_0xedd7('0x10')]=router;
\ No newline at end of file
index 624047f..17cf744 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa931=['string','variable','customVariable','keyValue','picklist','STRING','BOOLEAN','exports','ENUM'];(function(_0x5bd337,_0x537448){var _0x287f5f=function(_0x6cecde){while(--_0x6cecde){_0x5bd337['push'](_0x5bd337['shift']());}};_0x287f5f(++_0x537448);}(_0xa931,0x6a));var _0x1a93=function(_0x4a9fb1,_0x273043){_0x4a9fb1=_0x4a9fb1-0x0;var _0x348672=_0xa931[_0x4a9fb1];return _0x348672;};'use strict';var Sequelize=require('sequelize');module[_0x1a93('0x0')]={'type':{'type':Sequelize[_0x1a93('0x1')](_0x1a93('0x2'),_0x1a93('0x3'),_0x1a93('0x4'),_0x1a93('0x5'),_0x1a93('0x6')),'defaultValue':_0x1a93('0x2')},'content':{'type':Sequelize[_0x1a93('0x7')]},'key':{'type':Sequelize[_0x1a93('0x7')]},'keyType':{'type':Sequelize[_0x1a93('0x1')]('string',_0x1a93('0x3'),'customVariable')},'keyContent':{'type':Sequelize[_0x1a93('0x7')]},'idField':{'type':Sequelize[_0x1a93('0x7')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize[_0x1a93('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x1a93('0x7')]}};
\ No newline at end of file
+var _0x6f79=['BOOLEAN','exports','string','variable','customVariable','keyValue','picklist','STRING','ENUM'];(function(_0x13c98c,_0x430dd9){var _0x55a570=function(_0x4dbda4){while(--_0x4dbda4){_0x13c98c['push'](_0x13c98c['shift']());}};_0x55a570(++_0x430dd9);}(_0x6f79,0x64));var _0x96f7=function(_0x2ac1d7,_0x1c4897){_0x2ac1d7=_0x2ac1d7-0x0;var _0x241dcd=_0x6f79[_0x2ac1d7];return _0x241dcd;};'use strict';var Sequelize=require('sequelize');module[_0x96f7('0x0')]={'type':{'type':Sequelize['ENUM'](_0x96f7('0x1'),_0x96f7('0x2'),_0x96f7('0x3'),_0x96f7('0x4'),_0x96f7('0x5')),'defaultValue':_0x96f7('0x1')},'content':{'type':Sequelize[_0x96f7('0x6')]},'key':{'type':Sequelize[_0x96f7('0x6')]},'keyType':{'type':Sequelize[_0x96f7('0x7')]('string','variable',_0x96f7('0x3'))},'keyContent':{'type':Sequelize[_0x96f7('0x6')]},'idField':{'type':Sequelize[_0x96f7('0x6')]},'nameField':{'type':Sequelize[_0x96f7('0x6')]},'customField':{'type':Sequelize[_0x96f7('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x96f7('0x6')]}};
\ No newline at end of file
index dbb6f86..a25aa94 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc876=['order','sort','pick','filter','where','merge','type','VIRTUAL','count','rows','catch','show','includeAll','include','options','find','create','body','update','params','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','sox','to-csv','ejs','fs-extra','lodash','crypto','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','set','Content-Range','save','then','destroy','end','name','send','index','map','Dynamics365Field','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit'];(function(_0x53b53e,_0x498437){var _0xbb6179=function(_0x3975eb){while(--_0x3975eb){_0x53b53e['push'](_0x53b53e['shift']());}};_0xbb6179(++_0x498437);}(_0xc876,0x9e));var _0x6c87=function(_0x4e10d1,_0x4d8bb0){_0x4e10d1=_0x4e10d1-0x0;var _0x1d16fe=_0xc876[_0x4e10d1];return _0x1d16fe;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x6c87('0x0'));var zipdir=require(_0x6c87('0x1'));var jsonpatch=require(_0x6c87('0x2'));var rp=require(_0x6c87('0x3'));var moment=require('moment');var BPromise=require(_0x6c87('0x4'));var Mustache=require(_0x6c87('0x5'));var util=require('util');var path=require('path');var sox=require(_0x6c87('0x6'));var csv=require(_0x6c87('0x7'));var ejs=require(_0x6c87('0x8'));var fs=require('fs');var fs_extra=require(_0x6c87('0x9'));var _=require(_0x6c87('0xa'));var squel=require('squel');var crypto=require(_0x6c87('0xb'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x6c87('0x7'));var querystring=require('querystring');var Papa=require(_0x6c87('0xc'));var Redis=require('ioredis');var authService=require(_0x6c87('0xd'));var qs=require('../../components/parsers/qs');var as=require(_0x6c87('0xe'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x6c87('0xf'));var utils=require('../../config/utils');var config=require(_0x6c87('0x10'));var licenseUtil=require(_0x6c87('0x11'));var db=require(_0x6c87('0x12'))['db'];function respondWithStatusCode(_0x26e927,_0x42c8b0){_0x42c8b0=_0x42c8b0||0xcc;return function(_0x3b7ced){if(_0x3b7ced){return _0x26e927[_0x6c87('0x13')](_0x42c8b0);}return _0x26e927[_0x6c87('0x14')](_0x42c8b0)['end']();};}function respondWithResult(_0x3c8301,_0x18c1c2){_0x18c1c2=_0x18c1c2||0xc8;return function(_0x41fb2d){if(_0x41fb2d){return _0x3c8301[_0x6c87('0x14')](_0x18c1c2)[_0x6c87('0x15')](_0x41fb2d);}};}function respondWithFilteredResult(_0x3a50ed,_0x538519){return function(_0x8a5553){if(_0x8a5553){var _0x5a9819=typeof _0x538519[_0x6c87('0x16')]===_0x6c87('0x17')&&typeof _0x538519[_0x6c87('0x18')]==='undefined';var _0x340b0e=_0x8a5553['count'];var _0x115971=_0x5a9819?0x0:_0x538519['offset'];var _0x4fc69f=_0x5a9819?_0x8a5553['count']:_0x538519[_0x6c87('0x16')]+_0x538519[_0x6c87('0x18')];var _0x38a2e9;if(_0x4fc69f>=_0x340b0e){_0x4fc69f=_0x340b0e;_0x38a2e9=0xc8;}else{_0x38a2e9=0xce;}_0x3a50ed[_0x6c87('0x14')](_0x38a2e9);return _0x3a50ed[_0x6c87('0x19')](_0x6c87('0x1a'),_0x115971+'-'+_0x4fc69f+'/'+_0x340b0e)['json'](_0x8a5553);}return null;};}function patchUpdates(_0x34b381){return function(_0x6b2af3){try{jsonpatch['apply'](_0x6b2af3,_0x34b381,!![]);}catch(_0x3491bb){return BPromise['reject'](_0x3491bb);}return _0x6b2af3[_0x6c87('0x1b')]();};}function saveUpdates(_0x3d5445,_0xcab46e){return function(_0x75862a){if(_0x75862a){return _0x75862a['update'](_0x3d5445)[_0x6c87('0x1c')](function(_0x5e22a3){return _0x5e22a3;});}return null;};}function removeEntity(_0x47f415,_0x112e37){return function(_0x534801){if(_0x534801){return _0x534801[_0x6c87('0x1d')]()[_0x6c87('0x1c')](function(){_0x47f415[_0x6c87('0x14')](0xcc)[_0x6c87('0x1e')]();});}};}function handleEntityNotFound(_0x1235c1,_0x4f0ff1){return function(_0x280c53){if(!_0x280c53){_0x1235c1[_0x6c87('0x13')](0x194);}return _0x280c53;};}function handleError(_0x27a03b,_0x28b725){_0x28b725=_0x28b725||0x1f4;return function(_0x51c7ea){logger['error'](_0x51c7ea['stack']);if(_0x51c7ea[_0x6c87('0x1f')]){delete _0x51c7ea[_0x6c87('0x1f')];}_0x27a03b[_0x6c87('0x14')](_0x28b725)[_0x6c87('0x20')](_0x51c7ea);};}exports[_0x6c87('0x21')]=function(_0x25b2b9,_0x5ed3ae){var _0x5757a3={},_0x35ff9a={},_0x17411c={'count':0x0,'rows':[]};var _0x74c64f=_[_0x6c87('0x22')](db[_0x6c87('0x23')][_0x6c87('0x24')],function(_0x232f01){return{'name':_0x232f01[_0x6c87('0x25')],'type':_0x232f01['type'][_0x6c87('0x26')]};});_0x35ff9a[_0x6c87('0x27')]=_['map'](_0x74c64f,_0x6c87('0x1f'));_0x35ff9a[_0x6c87('0x28')]=_[_0x6c87('0x29')](_0x25b2b9['query']);_0x35ff9a[_0x6c87('0x2a')]=_[_0x6c87('0x2b')](_0x35ff9a[_0x6c87('0x27')],_0x35ff9a[_0x6c87('0x28')]);_0x5757a3[_0x6c87('0x2c')]=_[_0x6c87('0x2b')](_0x35ff9a[_0x6c87('0x27')],qs['fields'](_0x25b2b9['query'][_0x6c87('0x2d')]));_0x5757a3[_0x6c87('0x2c')]=_0x5757a3[_0x6c87('0x2c')][_0x6c87('0x2e')]?_0x5757a3[_0x6c87('0x2c')]:_0x35ff9a[_0x6c87('0x27')];if(!_0x25b2b9['query'][_0x6c87('0x2f')](_0x6c87('0x30'))){_0x5757a3[_0x6c87('0x18')]=qs[_0x6c87('0x18')](_0x25b2b9[_0x6c87('0x28')][_0x6c87('0x18')]);_0x5757a3['offset']=qs[_0x6c87('0x16')](_0x25b2b9['query'][_0x6c87('0x16')]);}_0x5757a3[_0x6c87('0x31')]=qs[_0x6c87('0x32')](_0x25b2b9['query'][_0x6c87('0x32')]);_0x5757a3['where']=qs[_0x6c87('0x2a')](_[_0x6c87('0x33')](_0x25b2b9[_0x6c87('0x28')],_0x35ff9a[_0x6c87('0x2a')]),_0x74c64f);if(_0x25b2b9[_0x6c87('0x28')][_0x6c87('0x34')]){_0x5757a3[_0x6c87('0x35')]=_[_0x6c87('0x36')](_0x5757a3['where'],{'$or':_[_0x6c87('0x22')](_0x74c64f,function(_0x53fa1a){if(_0x53fa1a[_0x6c87('0x37')]!==_0x6c87('0x38')){var _0x266296={};_0x266296[_0x53fa1a[_0x6c87('0x1f')]]={'$like':'%'+_0x25b2b9[_0x6c87('0x28')]['filter']+'%'};return _0x266296;}})});}_0x5757a3=_[_0x6c87('0x36')]({},_0x5757a3,_0x25b2b9['options']);var _0x17365a={'where':_0x5757a3[_0x6c87('0x35')]};return db[_0x6c87('0x23')][_0x6c87('0x39')](_0x17365a)['then'](function(_0x5ecd9f){_0x17411c[_0x6c87('0x39')]=_0x5ecd9f;if(_0x25b2b9[_0x6c87('0x28')]['includeAll']){_0x5757a3['include']=[{'all':!![]}];}return db[_0x6c87('0x23')]['findAll'](_0x5757a3);})[_0x6c87('0x1c')](function(_0x232955){_0x17411c[_0x6c87('0x3a')]=_0x232955;return _0x17411c;})['then'](respondWithFilteredResult(_0x5ed3ae,_0x5757a3))[_0x6c87('0x3b')](handleError(_0x5ed3ae,null));};exports[_0x6c87('0x3c')]=function(_0x4611f7,_0x1418ee){var _0x231293={'raw':!![],'where':{'id':_0x4611f7['params']['id']}},_0xa8dc63={};_0xa8dc63['model']=_[_0x6c87('0x29')](db[_0x6c87('0x23')]['rawAttributes']);_0xa8dc63[_0x6c87('0x28')]=_[_0x6c87('0x29')](_0x4611f7[_0x6c87('0x28')]);_0xa8dc63[_0x6c87('0x2a')]=_[_0x6c87('0x2b')](_0xa8dc63[_0x6c87('0x27')],_0xa8dc63[_0x6c87('0x28')]);_0x231293['attributes']=_[_0x6c87('0x2b')](_0xa8dc63[_0x6c87('0x27')],qs[_0x6c87('0x2d')](_0x4611f7[_0x6c87('0x28')][_0x6c87('0x2d')]));_0x231293['attributes']=_0x231293[_0x6c87('0x2c')]['length']?_0x231293[_0x6c87('0x2c')]:_0xa8dc63['model'];if(_0x4611f7['query'][_0x6c87('0x3d')]){_0x231293[_0x6c87('0x3e')]=[{'all':!![]}];}_0x231293=_[_0x6c87('0x36')]({},_0x231293,_0x4611f7[_0x6c87('0x3f')]);return db[_0x6c87('0x23')][_0x6c87('0x40')](_0x231293)[_0x6c87('0x1c')](handleEntityNotFound(_0x1418ee,null))[_0x6c87('0x1c')](respondWithResult(_0x1418ee,null))[_0x6c87('0x3b')](handleError(_0x1418ee,null));};exports[_0x6c87('0x41')]=function(_0xa607f8,_0x5785df){return db[_0x6c87('0x23')][_0x6c87('0x41')](_0xa607f8[_0x6c87('0x42')],{})[_0x6c87('0x1c')](respondWithResult(_0x5785df,0xc9))[_0x6c87('0x3b')](handleError(_0x5785df,null));};exports[_0x6c87('0x43')]=function(_0xedd559,_0x1afd08){if(_0xedd559[_0x6c87('0x42')]['id']){delete _0xedd559[_0x6c87('0x42')]['id'];}return db[_0x6c87('0x23')][_0x6c87('0x40')]({'where':{'id':_0xedd559['params']['id']}})[_0x6c87('0x1c')](handleEntityNotFound(_0x1afd08,null))['then'](saveUpdates(_0xedd559['body'],null))[_0x6c87('0x1c')](respondWithResult(_0x1afd08,null))['catch'](handleError(_0x1afd08,null));};exports[_0x6c87('0x1d')]=function(_0x1c412d,_0x4f6a54){return db['Dynamics365Field'][_0x6c87('0x40')]({'where':{'id':_0x1c412d[_0x6c87('0x44')]['id']}})[_0x6c87('0x1c')](handleEntityNotFound(_0x4f6a54,null))[_0x6c87('0x1c')](removeEntity(_0x4f6a54,null))[_0x6c87('0x3b')](handleError(_0x4f6a54,null));};
\ No newline at end of file
+var _0xaaed=['send','index','map','Dynamics365Field','fieldName','type','key','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filters','pick','merge','VIRTUAL','filter','options','include','findAll','rows','params','rawAttributes','includeAll','catch','create','body','update','find','destroy','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','set','apply','reject','then','sendStatus','error','stack','name'];(function(_0x35c310,_0x4ec418){var _0x238c0f=function(_0x639139){while(--_0x639139){_0x35c310['push'](_0x35c310['shift']());}};_0x238c0f(++_0x4ec418);}(_0xaaed,0x1ec));var _0xdaae=function(_0x2d6a05,_0x50706d){_0x2d6a05=_0x2d6a05-0x0;var _0x3f24dd=_0xaaed[_0x2d6a05];return _0x3f24dd;};'use strict';var emlformat=require(_0xdaae('0x0'));var rimraf=require(_0xdaae('0x1'));var zipdir=require(_0xdaae('0x2'));var jsonpatch=require(_0xdaae('0x3'));var rp=require(_0xdaae('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xdaae('0x5'));var util=require('util');var path=require(_0xdaae('0x6'));var sox=require(_0xdaae('0x7'));var csv=require(_0xdaae('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xdaae('0x9'));var _=require(_0xdaae('0xa'));var squel=require(_0xdaae('0xb'));var crypto=require(_0xdaae('0xc'));var jsforce=require(_0xdaae('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xdaae('0x8'));var querystring=require(_0xdaae('0xe'));var Papa=require(_0xdaae('0xf'));var Redis=require(_0xdaae('0x10'));var authService=require(_0xdaae('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0xdaae('0x12'));var hardwareService=require(_0xdaae('0x13'));var logger=require(_0xdaae('0x14'))(_0xdaae('0x15'));var utils=require(_0xdaae('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0xdaae('0x17'));var db=require(_0xdaae('0x18'))['db'];function respondWithStatusCode(_0x311f42,_0x370869){_0x370869=_0x370869||0xcc;return function(_0x2256a1){if(_0x2256a1){return _0x311f42['sendStatus'](_0x370869);}return _0x311f42[_0xdaae('0x19')](_0x370869)[_0xdaae('0x1a')]();};}function respondWithResult(_0x3b4d57,_0x357733){_0x357733=_0x357733||0xc8;return function(_0x266f48){if(_0x266f48){return _0x3b4d57[_0xdaae('0x19')](_0x357733)[_0xdaae('0x1b')](_0x266f48);}};}function respondWithFilteredResult(_0x2847b4,_0x3905bb){return function(_0x4fb6c8){if(_0x4fb6c8){var _0x5563c0=typeof _0x3905bb[_0xdaae('0x1c')]===_0xdaae('0x1d')&&typeof _0x3905bb[_0xdaae('0x1e')]===_0xdaae('0x1d');var _0x4aca56=_0x4fb6c8[_0xdaae('0x1f')];var _0x39843d=_0x5563c0?0x0:_0x3905bb[_0xdaae('0x1c')];var _0xc23aa0=_0x5563c0?_0x4fb6c8[_0xdaae('0x1f')]:_0x3905bb[_0xdaae('0x1c')]+_0x3905bb[_0xdaae('0x1e')];var _0x3b0c35;if(_0xc23aa0>=_0x4aca56){_0xc23aa0=_0x4aca56;_0x3b0c35=0xc8;}else{_0x3b0c35=0xce;}_0x2847b4[_0xdaae('0x19')](_0x3b0c35);return _0x2847b4[_0xdaae('0x20')]('Content-Range',_0x39843d+'-'+_0xc23aa0+'/'+_0x4aca56)[_0xdaae('0x1b')](_0x4fb6c8);}return null;};}function patchUpdates(_0x5e641a){return function(_0x176c29){try{jsonpatch[_0xdaae('0x21')](_0x176c29,_0x5e641a,!![]);}catch(_0x1aea0d){return BPromise[_0xdaae('0x22')](_0x1aea0d);}return _0x176c29['save']();};}function saveUpdates(_0x158fc5,_0x136bba){return function(_0x20a412){if(_0x20a412){return _0x20a412['update'](_0x158fc5)[_0xdaae('0x23')](function(_0x46ffde){return _0x46ffde;});}return null;};}function removeEntity(_0x215096,_0x188372){return function(_0x4df8e7){if(_0x4df8e7){return _0x4df8e7['destroy']()['then'](function(){_0x215096[_0xdaae('0x19')](0xcc)[_0xdaae('0x1a')]();});}};}function handleEntityNotFound(_0x4b9cbc,_0x5c70be){return function(_0x470646){if(!_0x470646){_0x4b9cbc[_0xdaae('0x24')](0x194);}return _0x470646;};}function handleError(_0x56328d,_0x249d23){_0x249d23=_0x249d23||0x1f4;return function(_0x85ca0){logger[_0xdaae('0x25')](_0x85ca0[_0xdaae('0x26')]);if(_0x85ca0['name']){delete _0x85ca0[_0xdaae('0x27')];}_0x56328d[_0xdaae('0x19')](_0x249d23)[_0xdaae('0x28')](_0x85ca0);};}exports[_0xdaae('0x29')]=function(_0x5c44fd,_0xcad218){var _0x40175d={},_0xcbdbe7={},_0x15ec73={'count':0x0,'rows':[]};var _0x13add9=_[_0xdaae('0x2a')](db[_0xdaae('0x2b')]['rawAttributes'],function(_0x68c9fc){return{'name':_0x68c9fc[_0xdaae('0x2c')],'type':_0x68c9fc[_0xdaae('0x2d')][_0xdaae('0x2e')]};});_0xcbdbe7[_0xdaae('0x2f')]=_[_0xdaae('0x2a')](_0x13add9,'name');_0xcbdbe7['query']=_[_0xdaae('0x30')](_0x5c44fd[_0xdaae('0x31')]);_0xcbdbe7['filters']=_[_0xdaae('0x32')](_0xcbdbe7[_0xdaae('0x2f')],_0xcbdbe7[_0xdaae('0x31')]);_0x40175d[_0xdaae('0x33')]=_[_0xdaae('0x32')](_0xcbdbe7[_0xdaae('0x2f')],qs[_0xdaae('0x34')](_0x5c44fd[_0xdaae('0x31')][_0xdaae('0x34')]));_0x40175d[_0xdaae('0x33')]=_0x40175d[_0xdaae('0x33')][_0xdaae('0x35')]?_0x40175d['attributes']:_0xcbdbe7['model'];if(!_0x5c44fd['query'][_0xdaae('0x36')]('nolimit')){_0x40175d[_0xdaae('0x1e')]=qs[_0xdaae('0x1e')](_0x5c44fd[_0xdaae('0x31')][_0xdaae('0x1e')]);_0x40175d[_0xdaae('0x1c')]=qs['offset'](_0x5c44fd[_0xdaae('0x31')][_0xdaae('0x1c')]);}_0x40175d[_0xdaae('0x37')]=qs[_0xdaae('0x38')](_0x5c44fd[_0xdaae('0x31')][_0xdaae('0x38')]);_0x40175d[_0xdaae('0x39')]=qs[_0xdaae('0x3a')](_[_0xdaae('0x3b')](_0x5c44fd[_0xdaae('0x31')],_0xcbdbe7['filters']),_0x13add9);if(_0x5c44fd[_0xdaae('0x31')]['filter']){_0x40175d[_0xdaae('0x39')]=_[_0xdaae('0x3c')](_0x40175d[_0xdaae('0x39')],{'$or':_['map'](_0x13add9,function(_0x138482){if(_0x138482[_0xdaae('0x2d')]!==_0xdaae('0x3d')){var _0x225f5d={};_0x225f5d[_0x138482[_0xdaae('0x27')]]={'$like':'%'+_0x5c44fd['query'][_0xdaae('0x3e')]+'%'};return _0x225f5d;}})});}_0x40175d=_[_0xdaae('0x3c')]({},_0x40175d,_0x5c44fd[_0xdaae('0x3f')]);var _0x13575c={'where':_0x40175d[_0xdaae('0x39')]};return db[_0xdaae('0x2b')][_0xdaae('0x1f')](_0x13575c)[_0xdaae('0x23')](function(_0x3f666c){_0x15ec73[_0xdaae('0x1f')]=_0x3f666c;if(_0x5c44fd['query']['includeAll']){_0x40175d[_0xdaae('0x40')]=[{'all':!![]}];}return db['Dynamics365Field'][_0xdaae('0x41')](_0x40175d);})[_0xdaae('0x23')](function(_0x125603){_0x15ec73[_0xdaae('0x42')]=_0x125603;return _0x15ec73;})[_0xdaae('0x23')](respondWithFilteredResult(_0xcad218,_0x40175d))['catch'](handleError(_0xcad218,null));};exports['show']=function(_0x2b869e,_0x1605d3){var _0x357868={'raw':!![],'where':{'id':_0x2b869e[_0xdaae('0x43')]['id']}},_0x396e3e={};_0x396e3e[_0xdaae('0x2f')]=_[_0xdaae('0x30')](db['Dynamics365Field'][_0xdaae('0x44')]);_0x396e3e[_0xdaae('0x31')]=_[_0xdaae('0x30')](_0x2b869e[_0xdaae('0x31')]);_0x396e3e[_0xdaae('0x3a')]=_[_0xdaae('0x32')](_0x396e3e[_0xdaae('0x2f')],_0x396e3e[_0xdaae('0x31')]);_0x357868[_0xdaae('0x33')]=_[_0xdaae('0x32')](_0x396e3e[_0xdaae('0x2f')],qs[_0xdaae('0x34')](_0x2b869e['query'][_0xdaae('0x34')]));_0x357868[_0xdaae('0x33')]=_0x357868[_0xdaae('0x33')][_0xdaae('0x35')]?_0x357868['attributes']:_0x396e3e[_0xdaae('0x2f')];if(_0x2b869e[_0xdaae('0x31')][_0xdaae('0x45')]){_0x357868[_0xdaae('0x40')]=[{'all':!![]}];}_0x357868=_[_0xdaae('0x3c')]({},_0x357868,_0x2b869e[_0xdaae('0x3f')]);return db[_0xdaae('0x2b')]['find'](_0x357868)[_0xdaae('0x23')](handleEntityNotFound(_0x1605d3,null))[_0xdaae('0x23')](respondWithResult(_0x1605d3,null))[_0xdaae('0x46')](handleError(_0x1605d3,null));};exports[_0xdaae('0x47')]=function(_0x1639d0,_0x22d25a){return db[_0xdaae('0x2b')][_0xdaae('0x47')](_0x1639d0[_0xdaae('0x48')],{})[_0xdaae('0x23')](respondWithResult(_0x22d25a,0xc9))['catch'](handleError(_0x22d25a,null));};exports[_0xdaae('0x49')]=function(_0x51fca3,_0x1fae7d){if(_0x51fca3[_0xdaae('0x48')]['id']){delete _0x51fca3['body']['id'];}return db[_0xdaae('0x2b')][_0xdaae('0x4a')]({'where':{'id':_0x51fca3['params']['id']}})['then'](handleEntityNotFound(_0x1fae7d,null))[_0xdaae('0x23')](saveUpdates(_0x51fca3['body'],null))['then'](respondWithResult(_0x1fae7d,null))[_0xdaae('0x46')](handleError(_0x1fae7d,null));};exports[_0xdaae('0x4b')]=function(_0x40d2d6,_0xfb9943){return db[_0xdaae('0x2b')][_0xdaae('0x4a')]({'where':{'id':_0x40d2d6[_0xdaae('0x43')]['id']}})[_0xdaae('0x23')](handleEntityNotFound(_0xfb9943,null))[_0xdaae('0x23')](removeEntity(_0xfb9943,null))['catch'](handleError(_0xfb9943,null));};
\ No newline at end of file
index 4a891bc..fbff4ee 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5791=['request-promise','rimraf','../../config/environment','./intDynamics365Field.attributes','exports','define','int_dynamics365_fields','dynamics365_unique_index','FieldId','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x547456,_0x1de17e){var _0xc1fd7b=function(_0x12be35){while(--_0x12be35){_0x547456['push'](_0x547456['shift']());}};_0xc1fd7b(++_0x1de17e);}(_0x5791,0x18f));var _0x1579=function(_0xde681d,_0x320776){_0xde681d=_0xde681d-0x0;var _0x58db6e=_0x5791[_0xde681d];return _0x58db6e;};'use strict';var _=require(_0x1579('0x0'));var util=require(_0x1579('0x1'));var logger=require(_0x1579('0x2'))(_0x1579('0x3'));var moment=require(_0x1579('0x4'));var BPromise=require(_0x1579('0x5'));var rp=require(_0x1579('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x1579('0x7'));var config=require(_0x1579('0x8'));var attributes=require(_0x1579('0x9'));module[_0x1579('0xa')]=function(_0x1961de,_0x53a167){return _0x1961de[_0x1579('0xb')]('Dynamics365Field',attributes,{'tableName':_0x1579('0xc'),'paranoid':![],'indexes':[{'name':_0x1579('0xd'),'fields':['idField',_0x1579('0xe')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xf4e6=['request-promise','path','rimraf','../../config/environment','./intDynamics365Field.attributes','exports','define','Dynamics365Field','dynamics365_unique_index','idField','FieldId','lodash','util','../../config/logger','api','bluebird'];(function(_0x3ff085,_0x27c92e){var _0x2b68c3=function(_0x37811e){while(--_0x37811e){_0x3ff085['push'](_0x3ff085['shift']());}};_0x2b68c3(++_0x27c92e);}(_0xf4e6,0x9b));var _0x6f4e=function(_0x2df507,_0x553862){_0x2df507=_0x2df507-0x0;var _0x1f7167=_0xf4e6[_0x2df507];return _0x1f7167;};'use strict';var _=require(_0x6f4e('0x0'));var util=require(_0x6f4e('0x1'));var logger=require(_0x6f4e('0x2'))(_0x6f4e('0x3'));var moment=require('moment');var BPromise=require(_0x6f4e('0x4'));var rp=require(_0x6f4e('0x5'));var fs=require('fs');var path=require(_0x6f4e('0x6'));var rimraf=require(_0x6f4e('0x7'));var config=require(_0x6f4e('0x8'));var attributes=require(_0x6f4e('0x9'));module[_0x6f4e('0xa')]=function(_0x46ae2d,_0x268ddf){return _0x46ae2d[_0x6f4e('0xb')](_0x6f4e('0xc'),attributes,{'tableName':'int_dynamics365_fields','paranoid':![],'indexes':[{'name':_0x6f4e('0xd'),'fields':[_0x6f4e('0xe'),_0x6f4e('0xf')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index b3d1063..0e8a87e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x63a3=['client','http','request','then','info','Dynamics365Field,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Field,\x20%s,\x20%s,\x20%s','stringify','error','message','result','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise'];(function(_0x8e03ff,_0x1bc54c){var _0x298c23=function(_0x4e94bb){while(--_0x4e94bb){_0x8e03ff['push'](_0x8e03ff['shift']());}};_0x298c23(++_0x1bc54c);}(_0x63a3,0x12b));var _0x363a=function(_0x2b5eae,_0x55010d){_0x2b5eae=_0x2b5eae-0x0;var _0x5f3ac9=_0x63a3[_0x2b5eae];return _0x5f3ac9;};'use strict';var _=require('lodash');var util=require(_0x363a('0x0'));var moment=require('moment');var BPromise=require(_0x363a('0x1'));var rs=require(_0x363a('0x2'));var fs=require('fs');var Redis=require(_0x363a('0x3'));var db=require(_0x363a('0x4'))['db'];var utils=require(_0x363a('0x5'));var logger=require(_0x363a('0x6'))('rpc');var config=require(_0x363a('0x7'));var jayson=require(_0x363a('0x8'));var client=jayson[_0x363a('0x9')][_0x363a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3a2195,_0x1f2cab,_0x3aca8c){return new BPromise(function(_0x476378,_0x5eabca){return client[_0x363a('0xb')](_0x3a2195,_0x3aca8c)[_0x363a('0xc')](function(_0xa223cf){logger[_0x363a('0xd')](_0x363a('0xe'),_0x1f2cab,_0x363a('0xf'));logger[_0x363a('0x10')](_0x363a('0x11'),_0x1f2cab,_0x363a('0xf'),JSON[_0x363a('0x12')](_0xa223cf));if(_0xa223cf[_0x363a('0x13')]){if(_0xa223cf[_0x363a('0x13')]['code']===0x1f4){logger[_0x363a('0x13')]('Dynamics365Field,\x20%s,\x20%s',_0x1f2cab,_0xa223cf['error'][_0x363a('0x14')]);return _0x5eabca(_0xa223cf[_0x363a('0x13')][_0x363a('0x14')]);}logger[_0x363a('0x13')](_0x363a('0xe'),_0x1f2cab,_0xa223cf[_0x363a('0x13')][_0x363a('0x14')]);return _0x476378(_0xa223cf['error'][_0x363a('0x14')]);}else{logger['info'](_0x363a('0xe'),_0x1f2cab,_0x363a('0xf'));_0x476378(_0xa223cf[_0x363a('0x15')]['message']);}})['catch'](function(_0x23f32e){logger['error']('Dynamics365Field,\x20%s,\x20%s',_0x1f2cab,_0x23f32e);_0x5eabca(_0x23f32e);});});}
\ No newline at end of file
+var _0x56a7=['code','Dynamics365Field,\x20%s,\x20%s','message','info','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','request\x20sent','debug','stringify','error'];(function(_0x4e30bf,_0x5473ce){var _0x913fd4=function(_0xf5ea40){while(--_0xf5ea40){_0x4e30bf['push'](_0x4e30bf['shift']());}};_0x913fd4(++_0x5473ce);}(_0x56a7,0xb6));var _0x756a=function(_0x51821c,_0x2e39c5){_0x51821c=_0x51821c-0x0;var _0x20bde8=_0x56a7[_0x51821c];return _0x20bde8;};'use strict';var _=require(_0x756a('0x0'));var util=require(_0x756a('0x1'));var moment=require(_0x756a('0x2'));var BPromise=require(_0x756a('0x3'));var rs=require(_0x756a('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x756a('0x5'))['db'];var utils=require(_0x756a('0x6'));var logger=require(_0x756a('0x7'))(_0x756a('0x8'));var config=require(_0x756a('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0x756a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x46813b,_0x1c5f1f,_0x54df5e){return new BPromise(function(_0x1a6221,_0x24103e){return client[_0x756a('0xb')](_0x46813b,_0x54df5e)['then'](function(_0x48597c){logger['info']('Dynamics365Field,\x20%s,\x20%s',_0x1c5f1f,_0x756a('0xc'));logger[_0x756a('0xd')]('Dynamics365Field,\x20%s,\x20%s,\x20%s',_0x1c5f1f,_0x756a('0xc'),JSON[_0x756a('0xe')](_0x48597c));if(_0x48597c['error']){if(_0x48597c[_0x756a('0xf')][_0x756a('0x10')]===0x1f4){logger['error'](_0x756a('0x11'),_0x1c5f1f,_0x48597c[_0x756a('0xf')][_0x756a('0x12')]);return _0x24103e(_0x48597c[_0x756a('0xf')][_0x756a('0x12')]);}logger[_0x756a('0xf')](_0x756a('0x11'),_0x1c5f1f,_0x48597c[_0x756a('0xf')][_0x756a('0x12')]);return _0x1a6221(_0x48597c[_0x756a('0xf')][_0x756a('0x12')]);}else{logger[_0x756a('0x13')](_0x756a('0x11'),_0x1c5f1f,_0x756a('0xc'));_0x1a6221(_0x48597c[_0x756a('0x14')][_0x756a('0x12')]);}})[_0x756a('0x15')](function(_0x571ba3){logger[_0x756a('0xf')]('Dynamics365Field,\x20%s,\x20%s',_0x1c5f1f,_0x571ba3);_0x24103e(_0x571ba3);});});}
\ No newline at end of file
index 3f28959..25ceee0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7e4b=['put','delete','destroy','exports','multer','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intFreshdeskAccount.controller','get','isAuthenticated','index','/:id','show','/:id/configurations','getConfigurations','/:id/fields','getFields','post','create'];(function(_0x1dfff1,_0x586313){var _0x56098c=function(_0x3086b5){while(--_0x3086b5){_0x1dfff1['push'](_0x1dfff1['shift']());}};_0x56098c(++_0x586313);}(_0x7e4b,0x100));var _0xb7e4=function(_0x5f50d2,_0x5b3d2c){_0x5f50d2=_0x5f50d2-0x0;var _0x2fcd25=_0x7e4b[_0x5f50d2];return _0x2fcd25;};'use strict';var multer=require(_0xb7e4('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0xb7e4('0x1')]();var fs_extra=require('fs-extra');var auth=require(_0xb7e4('0x2'));var interaction=require(_0xb7e4('0x3'));var config=require(_0xb7e4('0x4'));var controller=require(_0xb7e4('0x5'));router[_0xb7e4('0x6')]('/',auth[_0xb7e4('0x7')](),controller[_0xb7e4('0x8')]);router[_0xb7e4('0x6')](_0xb7e4('0x9'),auth[_0xb7e4('0x7')](),controller[_0xb7e4('0xa')]);router[_0xb7e4('0x6')](_0xb7e4('0xb'),auth[_0xb7e4('0x7')](),controller[_0xb7e4('0xc')]);router[_0xb7e4('0x6')](_0xb7e4('0xd'),auth[_0xb7e4('0x7')](),controller[_0xb7e4('0xe')]);router[_0xb7e4('0xf')]('/',auth[_0xb7e4('0x7')](),controller[_0xb7e4('0x10')]);router[_0xb7e4('0xf')](_0xb7e4('0xb'),auth[_0xb7e4('0x7')](),controller['addConfiguration']);router[_0xb7e4('0x11')](_0xb7e4('0x9'),auth[_0xb7e4('0x7')](),controller['update']);router[_0xb7e4('0x12')](_0xb7e4('0x9'),auth[_0xb7e4('0x7')](),controller[_0xb7e4('0x13')]);module[_0xb7e4('0x14')]=router;
\ No newline at end of file
+var _0xb37c=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intFreshdeskAccount.controller','get','isAuthenticated','/:id','show','/:id/fields','getFields','post','/:id/configurations','delete','destroy','multer','util','path','connect-timeout','express'];(function(_0x5834bc,_0x3d4801){var _0x3e183a=function(_0x18b023){while(--_0x18b023){_0x5834bc['push'](_0x5834bc['shift']());}};_0x3e183a(++_0x3d4801);}(_0xb37c,0xa3));var _0xcb37=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0xb37c[_0x2dafbe];return _0x58a45a;};'use strict';var multer=require(_0xcb37('0x0'));var util=require(_0xcb37('0x1'));var path=require(_0xcb37('0x2'));var timeout=require(_0xcb37('0x3'));var express=require(_0xcb37('0x4'));var router=express[_0xcb37('0x5')]();var fs_extra=require(_0xcb37('0x6'));var auth=require(_0xcb37('0x7'));var interaction=require(_0xcb37('0x8'));var config=require(_0xcb37('0x9'));var controller=require(_0xcb37('0xa'));router[_0xcb37('0xb')]('/',auth[_0xcb37('0xc')](),controller['index']);router['get'](_0xcb37('0xd'),auth[_0xcb37('0xc')](),controller[_0xcb37('0xe')]);router[_0xcb37('0xb')]('/:id/configurations',auth[_0xcb37('0xc')](),controller['getConfigurations']);router['get'](_0xcb37('0xf'),auth[_0xcb37('0xc')](),controller[_0xcb37('0x10')]);router[_0xcb37('0x11')]('/',auth[_0xcb37('0xc')](),controller['create']);router[_0xcb37('0x11')](_0xcb37('0x12'),auth[_0xcb37('0xc')](),controller['addConfiguration']);router['put'](_0xcb37('0xd'),auth[_0xcb37('0xc')](),controller['update']);router[_0xcb37('0x13')](_0xcb37('0xd'),auth[_0xcb37('0xc')](),controller[_0xcb37('0x14')]);module['exports']=router;
\ No newline at end of file
index bca07bc..2de5afe 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4888=['exports','STRING','username'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x4888,0x198));var _0x8488=function(_0x176317,_0x4897b3){_0x176317=_0x176317-0x0;var _0xef2759=_0x4888[_0x176317];return _0xef2759;};'use strict';var Sequelize=require('sequelize');module[_0x8488('0x0')]={'name':{'type':Sequelize[_0x8488('0x1')]},'description':{'type':Sequelize[_0x8488('0x1')]},'username':{'type':Sequelize[_0x8488('0x1')],'unique':_0x8488('0x2')},'apiKey':{'type':Sequelize[_0x8488('0x1')]},'remoteUri':{'type':Sequelize[_0x8488('0x1')],'unique':'remoteUri'},'serverUrl':{'type':Sequelize[_0x8488('0x1')],'allowNull':![]}};
\ No newline at end of file
+var _0x955f=['exports','STRING','sequelize'];(function(_0x1584ce,_0x13d537){var _0x6cf42b=function(_0x40e225){while(--_0x40e225){_0x1584ce['push'](_0x1584ce['shift']());}};_0x6cf42b(++_0x13d537);}(_0x955f,0x1eb));var _0xf955=function(_0x3d5148,_0x571174){_0x3d5148=_0x3d5148-0x0;var _0x2ebe2f=_0x955f[_0x3d5148];return _0x2ebe2f;};'use strict';var Sequelize=require(_0xf955('0x0'));module[_0xf955('0x1')]={'name':{'type':Sequelize[_0xf955('0x2')]},'description':{'type':Sequelize[_0xf955('0x2')]},'username':{'type':Sequelize[_0xf955('0x2')],'unique':'username'},'apiKey':{'type':Sequelize[_0xf955('0x2')]},'remoteUri':{'type':Sequelize['STRING'],'unique':'remoteUri'},'serverUrl':{'type':Sequelize[_0xf955('0x2')],'allowNull':![]}};
\ No newline at end of file
index e29b6d6..700ff29 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd1f1=['subject','agent','description','ticket_type','company','includes','default','custom_text','custom_dropdown','label','choices','capitalize','test','statusCode','getFields','stringify','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','sox','to-csv','fs-extra','squel','crypto','jsforce','desk.js','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','undefined','limit','count','offset','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','send','index','map','FreshdeskAccount','rawAttributes','fieldName','type','model','name','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','merge','VIRTUAL','options','includeAll','findAll','catch','show','params','include','find','create','body','getConfigurations','findOne','FreshdeskConfiguration','pick','filter','addConfiguration','AccountId','channel','Descriptions','getDescriptions','FreshdeskField','remoteUri','apiKey','slice','substring','lastIndexOf','GET','%s/%s','api/v2/ticket_fields','format','Basic\x20%s','%s:X','toString','base64','requester'];(function(_0x50c50b,_0x3a6fb3){var _0x423c29=function(_0x223cf6){while(--_0x223cf6){_0x50c50b['push'](_0x50c50b['shift']());}};_0x423c29(++_0x3a6fb3);}(_0xd1f1,0x84));var _0x1d1f=function(_0x5b7b22,_0x5bc479){_0x5b7b22=_0x5b7b22-0x0;var _0x53dc9d=_0xd1f1[_0x5b7b22];return _0x53dc9d;};'use strict';var emlformat=require(_0x1d1f('0x0'));var rimraf=require(_0x1d1f('0x1'));var zipdir=require(_0x1d1f('0x2'));var jsonpatch=require(_0x1d1f('0x3'));var rp=require(_0x1d1f('0x4'));var moment=require('moment');var BPromise=require(_0x1d1f('0x5'));var Mustache=require(_0x1d1f('0x6'));var util=require(_0x1d1f('0x7'));var path=require('path');var sox=require(_0x1d1f('0x8'));var csv=require(_0x1d1f('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x1d1f('0xa'));var _=require('lodash');var squel=require(_0x1d1f('0xb'));var crypto=require(_0x1d1f('0xc'));var jsforce=require(_0x1d1f('0xd'));var deskjs=require(_0x1d1f('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x1d1f('0xf'));var authService=require(_0x1d1f('0x10'));var qs=require(_0x1d1f('0x11'));var as=require(_0x1d1f('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x1d1f('0x13'))(_0x1d1f('0x14'));var utils=require(_0x1d1f('0x15'));var config=require(_0x1d1f('0x16'));var licenseUtil=require(_0x1d1f('0x17'));var db=require(_0x1d1f('0x18'))['db'];var integrations=require('../../components/integrations/configuration');function respondWithStatusCode(_0x4c92c1,_0x48e2c0){_0x48e2c0=_0x48e2c0||0xcc;return function(_0x3e6316){if(_0x3e6316){return _0x4c92c1[_0x1d1f('0x19')](_0x48e2c0);}return _0x4c92c1[_0x1d1f('0x1a')](_0x48e2c0)[_0x1d1f('0x1b')]();};}function respondWithResult(_0x43e323,_0x465f20){_0x465f20=_0x465f20||0xc8;return function(_0x2dbbe6){if(_0x2dbbe6){return _0x43e323[_0x1d1f('0x1a')](_0x465f20)[_0x1d1f('0x1c')](_0x2dbbe6);}};}function respondWithFilteredResult(_0x37af18,_0x2ec931){return function(_0x397f74){if(_0x397f74){var _0x1d4c4d=typeof _0x2ec931['offset']===_0x1d1f('0x1d')&&typeof _0x2ec931[_0x1d1f('0x1e')]===_0x1d1f('0x1d');var _0x184ef3=_0x397f74[_0x1d1f('0x1f')];var _0x37a8e8=_0x1d4c4d?0x0:_0x2ec931[_0x1d1f('0x20')];var _0x308fdb=_0x1d4c4d?_0x397f74[_0x1d1f('0x1f')]:_0x2ec931[_0x1d1f('0x20')]+_0x2ec931[_0x1d1f('0x1e')];var _0x22b68d;if(_0x308fdb>=_0x184ef3){_0x308fdb=_0x184ef3;_0x22b68d=0xc8;}else{_0x22b68d=0xce;}_0x37af18[_0x1d1f('0x1a')](_0x22b68d);return _0x37af18[_0x1d1f('0x21')](_0x1d1f('0x22'),_0x37a8e8+'-'+_0x308fdb+'/'+_0x184ef3)[_0x1d1f('0x1c')](_0x397f74);}return null;};}function patchUpdates(_0x2dac03){return function(_0x16d0bd){try{jsonpatch[_0x1d1f('0x23')](_0x16d0bd,_0x2dac03,!![]);}catch(_0x542821){return BPromise[_0x1d1f('0x24')](_0x542821);}return _0x16d0bd[_0x1d1f('0x25')]();};}function saveUpdates(_0x4f1947,_0x18f05b){return function(_0x450f32){if(_0x450f32){return _0x450f32[_0x1d1f('0x26')](_0x4f1947)[_0x1d1f('0x27')](function(_0xbd591a){return _0xbd591a;});}return null;};}function removeEntity(_0x45cd59,_0x5aae81){return function(_0xbaa0cd){if(_0xbaa0cd){return _0xbaa0cd[_0x1d1f('0x28')]()[_0x1d1f('0x27')](function(){_0x45cd59[_0x1d1f('0x1a')](0xcc)[_0x1d1f('0x1b')]();});}};}function handleEntityNotFound(_0x571ad3,_0x43a03a){return function(_0x293b54){if(!_0x293b54){_0x571ad3['sendStatus'](0x194);}return _0x293b54;};}function handleError(_0x4ec531,_0x4030b0){_0x4030b0=_0x4030b0||0x1f4;return function(_0x1af624){logger[_0x1d1f('0x29')](_0x1af624[_0x1d1f('0x2a')]);if(_0x1af624['name']){delete _0x1af624['name'];}_0x4ec531[_0x1d1f('0x1a')](_0x4030b0)[_0x1d1f('0x2b')](_0x1af624);};}exports[_0x1d1f('0x2c')]=function(_0x1dcac6,_0x285c98){var _0x44e3c1={},_0x5efc5c={},_0x559f20={'count':0x0,'rows':[]};var _0x4a2c75=_[_0x1d1f('0x2d')](db[_0x1d1f('0x2e')][_0x1d1f('0x2f')],function(_0x4dcdd2){return{'name':_0x4dcdd2[_0x1d1f('0x30')],'type':_0x4dcdd2[_0x1d1f('0x31')]['key']};});_0x5efc5c[_0x1d1f('0x32')]=_[_0x1d1f('0x2d')](_0x4a2c75,_0x1d1f('0x33'));_0x5efc5c[_0x1d1f('0x34')]=_[_0x1d1f('0x35')](_0x1dcac6[_0x1d1f('0x34')]);_0x5efc5c[_0x1d1f('0x36')]=_[_0x1d1f('0x37')](_0x5efc5c[_0x1d1f('0x32')],_0x5efc5c[_0x1d1f('0x34')]);_0x44e3c1[_0x1d1f('0x38')]=_[_0x1d1f('0x37')](_0x5efc5c[_0x1d1f('0x32')],qs[_0x1d1f('0x39')](_0x1dcac6[_0x1d1f('0x34')][_0x1d1f('0x39')]));_0x44e3c1[_0x1d1f('0x38')]=_0x44e3c1[_0x1d1f('0x38')][_0x1d1f('0x3a')]?_0x44e3c1[_0x1d1f('0x38')]:_0x5efc5c[_0x1d1f('0x32')];if(!_0x1dcac6[_0x1d1f('0x34')][_0x1d1f('0x3b')]('nolimit')){_0x44e3c1[_0x1d1f('0x1e')]=qs[_0x1d1f('0x1e')](_0x1dcac6[_0x1d1f('0x34')][_0x1d1f('0x1e')]);_0x44e3c1['offset']=qs['offset'](_0x1dcac6[_0x1d1f('0x34')][_0x1d1f('0x20')]);}_0x44e3c1[_0x1d1f('0x3c')]=qs[_0x1d1f('0x3d')](_0x1dcac6[_0x1d1f('0x34')][_0x1d1f('0x3d')]);_0x44e3c1['where']=qs[_0x1d1f('0x36')](_['pick'](_0x1dcac6['query'],_0x5efc5c[_0x1d1f('0x36')]),_0x4a2c75);if(_0x1dcac6[_0x1d1f('0x34')]['filter']){_0x44e3c1[_0x1d1f('0x3e')]=_[_0x1d1f('0x3f')](_0x44e3c1[_0x1d1f('0x3e')],{'$or':_['map'](_0x4a2c75,function(_0x114bf7){if(_0x114bf7['type']!==_0x1d1f('0x40')){var _0x55c16e={};_0x55c16e[_0x114bf7[_0x1d1f('0x33')]]={'$like':'%'+_0x1dcac6[_0x1d1f('0x34')]['filter']+'%'};return _0x55c16e;}})});}_0x44e3c1=_[_0x1d1f('0x3f')]({},_0x44e3c1,_0x1dcac6[_0x1d1f('0x41')]);var _0x46b3aa={'where':_0x44e3c1[_0x1d1f('0x3e')]};return db[_0x1d1f('0x2e')][_0x1d1f('0x1f')](_0x46b3aa)[_0x1d1f('0x27')](function(_0x4e9a2b){_0x559f20[_0x1d1f('0x1f')]=_0x4e9a2b;if(_0x1dcac6[_0x1d1f('0x34')][_0x1d1f('0x42')]){_0x44e3c1['include']=[{'all':!![]}];}return db['FreshdeskAccount'][_0x1d1f('0x43')](_0x44e3c1);})[_0x1d1f('0x27')](function(_0x27b502){_0x559f20['rows']=_0x27b502;return _0x559f20;})[_0x1d1f('0x27')](respondWithFilteredResult(_0x285c98,_0x44e3c1))[_0x1d1f('0x44')](handleError(_0x285c98,null));};exports[_0x1d1f('0x45')]=function(_0x4a11a7,_0x366511){var _0x208c9c={'raw':![],'where':{'id':_0x4a11a7[_0x1d1f('0x46')]['id']}},_0xc64a={};_0xc64a[_0x1d1f('0x32')]=_[_0x1d1f('0x35')](db[_0x1d1f('0x2e')][_0x1d1f('0x2f')]);_0xc64a[_0x1d1f('0x34')]=_[_0x1d1f('0x35')](_0x4a11a7[_0x1d1f('0x34')]);_0xc64a[_0x1d1f('0x36')]=_[_0x1d1f('0x37')](_0xc64a[_0x1d1f('0x32')],_0xc64a[_0x1d1f('0x34')]);_0x208c9c['attributes']=_[_0x1d1f('0x37')](_0xc64a[_0x1d1f('0x32')],qs['fields'](_0x4a11a7[_0x1d1f('0x34')][_0x1d1f('0x39')]));_0x208c9c['attributes']=_0x208c9c[_0x1d1f('0x38')][_0x1d1f('0x3a')]?_0x208c9c[_0x1d1f('0x38')]:_0xc64a[_0x1d1f('0x32')];if(_0x4a11a7[_0x1d1f('0x34')][_0x1d1f('0x42')]){_0x208c9c[_0x1d1f('0x47')]=[{'all':!![]}];}_0x208c9c=_[_0x1d1f('0x3f')]({},_0x208c9c,_0x4a11a7[_0x1d1f('0x41')]);return db['FreshdeskAccount'][_0x1d1f('0x48')](_0x208c9c)['then'](handleEntityNotFound(_0x366511,null))['then'](respondWithResult(_0x366511,null))[_0x1d1f('0x44')](handleError(_0x366511,null));};exports['create']=function(_0x51ccee,_0x3bcb5d){return db[_0x1d1f('0x2e')][_0x1d1f('0x49')](_0x51ccee[_0x1d1f('0x4a')],{})['then'](respondWithResult(_0x3bcb5d,0xc9))[_0x1d1f('0x44')](handleError(_0x3bcb5d,null));};exports['update']=function(_0x44a2db,_0x2f8af1){if(_0x44a2db['body']['id']){delete _0x44a2db[_0x1d1f('0x4a')]['id'];}return db[_0x1d1f('0x2e')][_0x1d1f('0x48')]({'where':{'id':_0x44a2db[_0x1d1f('0x46')]['id']}})['then'](handleEntityNotFound(_0x2f8af1,null))[_0x1d1f('0x27')](saveUpdates(_0x44a2db[_0x1d1f('0x4a')],null))[_0x1d1f('0x27')](respondWithResult(_0x2f8af1,null))[_0x1d1f('0x44')](handleError(_0x2f8af1,null));};exports[_0x1d1f('0x28')]=function(_0x5cb6e2,_0x246068){return db[_0x1d1f('0x2e')][_0x1d1f('0x48')]({'where':{'id':_0x5cb6e2[_0x1d1f('0x46')]['id']}})[_0x1d1f('0x27')](handleEntityNotFound(_0x246068,null))['then'](removeEntity(_0x246068,null))[_0x1d1f('0x44')](handleError(_0x246068,null));};exports[_0x1d1f('0x4b')]=function(_0x8fff2d,_0x430ef4,_0x1ea0d1){var _0x39fd17={};var _0x24ad15={};var _0x454af6;var _0x53c86c;return db[_0x1d1f('0x2e')][_0x1d1f('0x4c')]({'where':{'id':_0x8fff2d['params']['id']}})[_0x1d1f('0x27')](handleEntityNotFound(_0x430ef4,null))[_0x1d1f('0x27')](function(_0x2199d2){if(_0x2199d2){_0x454af6=_0x2199d2;_0x24ad15[_0x1d1f('0x32')]=_[_0x1d1f('0x35')](db[_0x1d1f('0x4d')][_0x1d1f('0x2f')]);_0x24ad15[_0x1d1f('0x34')]=_[_0x1d1f('0x35')](_0x8fff2d['query']);_0x24ad15[_0x1d1f('0x36')]=_[_0x1d1f('0x37')](_0x24ad15[_0x1d1f('0x32')],_0x24ad15[_0x1d1f('0x34')]);_0x39fd17[_0x1d1f('0x38')]=_[_0x1d1f('0x37')](_0x24ad15[_0x1d1f('0x32')],qs[_0x1d1f('0x39')](_0x8fff2d[_0x1d1f('0x34')][_0x1d1f('0x39')]));_0x39fd17[_0x1d1f('0x38')]=_0x39fd17[_0x1d1f('0x38')][_0x1d1f('0x3a')]?_0x39fd17['attributes']:_0x24ad15[_0x1d1f('0x32')];_0x39fd17['order']=qs[_0x1d1f('0x3d')](_0x8fff2d['query'][_0x1d1f('0x3d')]);_0x39fd17[_0x1d1f('0x3e')]=qs[_0x1d1f('0x36')](_[_0x1d1f('0x4e')](_0x8fff2d['query'],_0x24ad15[_0x1d1f('0x36')]));if(_0x8fff2d[_0x1d1f('0x34')][_0x1d1f('0x4f')]){_0x39fd17[_0x1d1f('0x3e')]=_[_0x1d1f('0x3f')](_0x39fd17[_0x1d1f('0x3e')],{'$or':_[_0x1d1f('0x2d')](_0x39fd17[_0x1d1f('0x38')],function(_0x54f9cc){var _0x1ba309={};_0x1ba309[_0x54f9cc]={'$like':'%'+_0x8fff2d[_0x1d1f('0x34')][_0x1d1f('0x4f')]+'%'};return _0x1ba309;})});}_0x39fd17=_['merge']({},_0x39fd17,_0x8fff2d['options']);return _0x454af6[_0x1d1f('0x4b')](_0x39fd17);}})[_0x1d1f('0x27')](function(_0x1c5cdf){if(_0x1c5cdf){_0x53c86c=_0x1c5cdf[_0x1d1f('0x3a')];if(!_0x8fff2d[_0x1d1f('0x34')][_0x1d1f('0x3b')]('nolimit')){_0x39fd17[_0x1d1f('0x1e')]=qs[_0x1d1f('0x1e')](_0x8fff2d[_0x1d1f('0x34')]['limit']);_0x39fd17[_0x1d1f('0x20')]=qs['offset'](_0x8fff2d['query'][_0x1d1f('0x20')]);}return _0x454af6[_0x1d1f('0x4b')](_0x39fd17);}})[_0x1d1f('0x27')](function(_0x3d13c5){if(_0x3d13c5){return _0x3d13c5?{'count':_0x53c86c,'rows':_0x3d13c5}:null;}})['then'](respondWithResult(_0x430ef4,null))[_0x1d1f('0x44')](handleError(_0x430ef4,null));};exports[_0x1d1f('0x50')]=function(_0x5cfc5e,_0x431c8e,_0x4b3725){if(_0x5cfc5e[_0x1d1f('0x4a')]['id']){delete _0x5cfc5e[_0x1d1f('0x4a')]['id'];}return db[_0x1d1f('0x2e')][_0x1d1f('0x4c')]({'where':{'id':_0x5cfc5e[_0x1d1f('0x46')]['id']}})[_0x1d1f('0x27')](handleEntityNotFound(_0x431c8e,null))[_0x1d1f('0x27')](function(_0x2406f5){if(_0x2406f5){_0x5cfc5e[_0x1d1f('0x4a')][_0x1d1f('0x51')]=_0x2406f5['id'];_0x5cfc5e[_0x1d1f('0x4a')]['Subjects']=integrations['getSubjects'](_0x5cfc5e[_0x1d1f('0x4a')][_0x1d1f('0x52')],_0x5cfc5e['body'][_0x1d1f('0x31')]);_0x5cfc5e[_0x1d1f('0x4a')][_0x1d1f('0x53')]=integrations[_0x1d1f('0x54')](_0x5cfc5e['body'][_0x1d1f('0x52')],_0x5cfc5e[_0x1d1f('0x4a')][_0x1d1f('0x31')]);return db[_0x1d1f('0x4d')][_0x1d1f('0x49')](_0x5cfc5e[_0x1d1f('0x4a')],{'include':[{'model':db[_0x1d1f('0x55')],'as':'Subjects'},{'model':db[_0x1d1f('0x55')],'as':_0x1d1f('0x53')}]});}return null;})[_0x1d1f('0x27')](respondWithResult(_0x431c8e,null))[_0x1d1f('0x44')](handleError(_0x431c8e,null));};exports['getFields']=function(_0x5b400f,_0x94d836,_0x3a15d3){var _0xc79235='';return db[_0x1d1f('0x2e')][_0x1d1f('0x4c')]({'where':{'id':_0x5b400f[_0x1d1f('0x46')]['id']},'attributes':['id',_0x1d1f('0x56'),_0x1d1f('0x57')]})[_0x1d1f('0x27')](handleEntityNotFound(_0x94d836,null))[_0x1d1f('0x27')](function(_0x268daa){if(_0x268daa){_0xc79235=_0x268daa['remoteUri'];var _0x5a8fa3=_0xc79235[_0x1d1f('0x58')](-0x1);if(_0x5a8fa3==='/'){_0xc79235=_0xc79235[_0x1d1f('0x59')](0x0,_0xc79235[_0x1d1f('0x5a')](_0x5a8fa3));}return rp({'method':_0x1d1f('0x5b'),'uri':util['format'](_0x1d1f('0x5c'),_0xc79235,_0x1d1f('0x5d')),'headers':{'Authorization':util[_0x1d1f('0x5e')](_0x1d1f('0x5f'),new Buffer(util['format'](_0x1d1f('0x60'),_0x268daa[_0x1d1f('0x57')]))[_0x1d1f('0x61')](_0x1d1f('0x62')))},'json':!![]});}})[_0x1d1f('0x27')](function(_0x1d3483){if(_0x1d3483){var _0x416ce4=[_0x1d1f('0x63'),_0x1d1f('0x64'),_0x1d1f('0x65'),_0x1d1f('0x66'),_0x1d1f('0x1a'),'priority','group','source',_0x1d1f('0x67'),'group',_0x1d1f('0x68')];_['remove'](_0x1d3483,function(_0x4a0076){return _0x416ce4[_0x1d1f('0x69')](_0x4a0076[_0x1d1f('0x33')])||!_0x4a0076[_0x1d1f('0x6a')]&&_0x4a0076[_0x1d1f('0x31')]!==_0x1d1f('0x6b')&&_0x4a0076[_0x1d1f('0x31')]!==_0x1d1f('0x6c');});return{'count':_0x1d3483[_0x1d1f('0x3a')],'rows':_[_0x1d1f('0x2d')](_0x1d3483,function(_0x3c90e1){return{'id':_0x3c90e1['name'],'name':_0x3c90e1[_0x1d1f('0x6d')],'custom':!_0x3c90e1[_0x1d1f('0x6a')],'options':_0x3c90e1['choices']?_['map'](_0x3c90e1[_0x1d1f('0x6e')],function(_0xf546a7){return{'name':_[_0x1d1f('0x6f')](_0xf546a7),'value':_0xf546a7};}):[]};})};}})[_0x1d1f('0x27')](respondWithResult(_0x94d836,null))[_0x1d1f('0x44')](function(_0x2565db){var _0x3b0765=_0x5b400f[_0x1d1f('0x34')][_0x1d1f('0x70')]?0x1f4:_0x2565db[_0x1d1f('0x71')]||0x1f4;logger[_0x1d1f('0x29')]('getFields,\x20%s,\x20%s,\x20%s',_0x1d1f('0x72'),_0x3b0765,JSON[_0x1d1f('0x73')](_0x2565db));delete _0x2565db['name'];if(_0x3b0765===0x191){_0x3b0765=0x190;}_0x94d836[_0x1d1f('0x1a')](_0x3b0765)[_0x1d1f('0x2b')](_0x5b400f['query'][_0x1d1f('0x70')]?{'message':'Wrong\x20credentials','statusCode':_0x2565db[_0x1d1f('0x71')]}:_0x2565db);});};
\ No newline at end of file
+var _0x1c8a=['rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','sox','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/logger','../../config/license/util','../../mysqldb','../../components/integrations/configuration','status','end','offset','limit','count','set','json','apply','reject','save','update','then','destroy','stack','name','index','FreshdeskAccount','rawAttributes','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','options','includeAll','include','catch','show','find','create','body','params','getConfigurations','findOne','FreshdeskConfiguration','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','FreshdeskField','getFields','apiKey','substring','lastIndexOf','GET','format','%s/%s','api/v2/ticket_fields','Basic\x20%s','%s:X','toString','base64','requester','subject','agent','description','group','source','default','custom_dropdown','label','choices','map','capitalize','test','statusCode','error','getFields,\x20%s,\x20%s,\x20%s','send','eml-format'];(function(_0xed5f9c,_0x5a25cd){var _0x3a1c43=function(_0x251202){while(--_0x251202){_0xed5f9c['push'](_0xed5f9c['shift']());}};_0x3a1c43(++_0x5a25cd);}(_0x1c8a,0x140));var _0xa1c8=function(_0x180d08,_0x2880fc){_0x180d08=_0x180d08-0x0;var _0x16c316=_0x1c8a[_0x180d08];return _0x16c316;};'use strict';var emlformat=require(_0xa1c8('0x0'));var rimraf=require(_0xa1c8('0x1'));var zipdir=require(_0xa1c8('0x2'));var jsonpatch=require(_0xa1c8('0x3'));var rp=require(_0xa1c8('0x4'));var moment=require('moment');var BPromise=require(_0xa1c8('0x5'));var Mustache=require('mustache');var util=require(_0xa1c8('0x6'));var path=require(_0xa1c8('0x7'));var sox=require(_0xa1c8('0x8'));var csv=require('to-csv');var ejs=require(_0xa1c8('0x9'));var fs=require('fs');var fs_extra=require(_0xa1c8('0xa'));var _=require(_0xa1c8('0xb'));var squel=require('squel');var crypto=require(_0xa1c8('0xc'));var jsforce=require(_0xa1c8('0xd'));var deskjs=require(_0xa1c8('0xe'));var toCsv=require('to-csv');var querystring=require(_0xa1c8('0xf'));var Papa=require(_0xa1c8('0x10'));var Redis=require(_0xa1c8('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xa1c8('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xa1c8('0x13'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xa1c8('0x14'));var db=require(_0xa1c8('0x15'))['db'];var integrations=require(_0xa1c8('0x16'));function respondWithStatusCode(_0x707249,_0x644e9c){_0x644e9c=_0x644e9c||0xcc;return function(_0x4097bf){if(_0x4097bf){return _0x707249['sendStatus'](_0x644e9c);}return _0x707249[_0xa1c8('0x17')](_0x644e9c)[_0xa1c8('0x18')]();};}function respondWithResult(_0xcccc7b,_0x3797fe){_0x3797fe=_0x3797fe||0xc8;return function(_0xcb9223){if(_0xcb9223){return _0xcccc7b[_0xa1c8('0x17')](_0x3797fe)['json'](_0xcb9223);}};}function respondWithFilteredResult(_0x7f1128,_0x51b1c3){return function(_0x17d4d2){if(_0x17d4d2){var _0x2ef438=typeof _0x51b1c3[_0xa1c8('0x19')]==='undefined'&&typeof _0x51b1c3[_0xa1c8('0x1a')]==='undefined';var _0x55caa7=_0x17d4d2[_0xa1c8('0x1b')];var _0x112ab0=_0x2ef438?0x0:_0x51b1c3['offset'];var _0x3c66c3=_0x2ef438?_0x17d4d2[_0xa1c8('0x1b')]:_0x51b1c3[_0xa1c8('0x19')]+_0x51b1c3['limit'];var _0x35cd08;if(_0x3c66c3>=_0x55caa7){_0x3c66c3=_0x55caa7;_0x35cd08=0xc8;}else{_0x35cd08=0xce;}_0x7f1128[_0xa1c8('0x17')](_0x35cd08);return _0x7f1128[_0xa1c8('0x1c')]('Content-Range',_0x112ab0+'-'+_0x3c66c3+'/'+_0x55caa7)[_0xa1c8('0x1d')](_0x17d4d2);}return null;};}function patchUpdates(_0x874b1f){return function(_0x520ec1){try{jsonpatch[_0xa1c8('0x1e')](_0x520ec1,_0x874b1f,!![]);}catch(_0x34d526){return BPromise[_0xa1c8('0x1f')](_0x34d526);}return _0x520ec1[_0xa1c8('0x20')]();};}function saveUpdates(_0x19fe5a,_0x23ff11){return function(_0x198400){if(_0x198400){return _0x198400[_0xa1c8('0x21')](_0x19fe5a)[_0xa1c8('0x22')](function(_0x193077){return _0x193077;});}return null;};}function removeEntity(_0x28473c,_0x125047){return function(_0x2827ed){if(_0x2827ed){return _0x2827ed[_0xa1c8('0x23')]()[_0xa1c8('0x22')](function(){_0x28473c[_0xa1c8('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1e9a50,_0x550b68){return function(_0x63eb4c){if(!_0x63eb4c){_0x1e9a50['sendStatus'](0x194);}return _0x63eb4c;};}function handleError(_0x404cb8,_0x508742){_0x508742=_0x508742||0x1f4;return function(_0x22eec1){logger['error'](_0x22eec1[_0xa1c8('0x24')]);if(_0x22eec1[_0xa1c8('0x25')]){delete _0x22eec1[_0xa1c8('0x25')];}_0x404cb8[_0xa1c8('0x17')](_0x508742)['send'](_0x22eec1);};}exports[_0xa1c8('0x26')]=function(_0x404fa1,_0x28b9e5){var _0x4d0a4f={},_0x5f43bc={},_0x1a44de={'count':0x0,'rows':[]};var _0x473a62=_['map'](db[_0xa1c8('0x27')][_0xa1c8('0x28')],function(_0xeadfdd){return{'name':_0xeadfdd['fieldName'],'type':_0xeadfdd['type']['key']};});_0x5f43bc[_0xa1c8('0x29')]=_['map'](_0x473a62,_0xa1c8('0x25'));_0x5f43bc[_0xa1c8('0x2a')]=_[_0xa1c8('0x2b')](_0x404fa1[_0xa1c8('0x2a')]);_0x5f43bc[_0xa1c8('0x2c')]=_[_0xa1c8('0x2d')](_0x5f43bc['model'],_0x5f43bc[_0xa1c8('0x2a')]);_0x4d0a4f[_0xa1c8('0x2e')]=_[_0xa1c8('0x2d')](_0x5f43bc[_0xa1c8('0x29')],qs['fields'](_0x404fa1['query'][_0xa1c8('0x2f')]));_0x4d0a4f['attributes']=_0x4d0a4f[_0xa1c8('0x2e')][_0xa1c8('0x30')]?_0x4d0a4f[_0xa1c8('0x2e')]:_0x5f43bc[_0xa1c8('0x29')];if(!_0x404fa1[_0xa1c8('0x2a')][_0xa1c8('0x31')](_0xa1c8('0x32'))){_0x4d0a4f[_0xa1c8('0x1a')]=qs['limit'](_0x404fa1[_0xa1c8('0x2a')][_0xa1c8('0x1a')]);_0x4d0a4f[_0xa1c8('0x19')]=qs[_0xa1c8('0x19')](_0x404fa1[_0xa1c8('0x2a')][_0xa1c8('0x19')]);}_0x4d0a4f[_0xa1c8('0x33')]=qs[_0xa1c8('0x34')](_0x404fa1[_0xa1c8('0x2a')][_0xa1c8('0x34')]);_0x4d0a4f[_0xa1c8('0x35')]=qs[_0xa1c8('0x2c')](_[_0xa1c8('0x36')](_0x404fa1[_0xa1c8('0x2a')],_0x5f43bc['filters']),_0x473a62);if(_0x404fa1['query'][_0xa1c8('0x37')]){_0x4d0a4f[_0xa1c8('0x35')]=_[_0xa1c8('0x38')](_0x4d0a4f['where'],{'$or':_['map'](_0x473a62,function(_0x4c0b92){if(_0x4c0b92[_0xa1c8('0x39')]!=='VIRTUAL'){var _0x580963={};_0x580963[_0x4c0b92[_0xa1c8('0x25')]]={'$like':'%'+_0x404fa1[_0xa1c8('0x2a')][_0xa1c8('0x37')]+'%'};return _0x580963;}})});}_0x4d0a4f=_['merge']({},_0x4d0a4f,_0x404fa1[_0xa1c8('0x3a')]);var _0x3fe148={'where':_0x4d0a4f['where']};return db[_0xa1c8('0x27')][_0xa1c8('0x1b')](_0x3fe148)[_0xa1c8('0x22')](function(_0x4bad1e){_0x1a44de[_0xa1c8('0x1b')]=_0x4bad1e;if(_0x404fa1[_0xa1c8('0x2a')][_0xa1c8('0x3b')]){_0x4d0a4f[_0xa1c8('0x3c')]=[{'all':!![]}];}return db[_0xa1c8('0x27')]['findAll'](_0x4d0a4f);})[_0xa1c8('0x22')](function(_0x57c24c){_0x1a44de['rows']=_0x57c24c;return _0x1a44de;})['then'](respondWithFilteredResult(_0x28b9e5,_0x4d0a4f))[_0xa1c8('0x3d')](handleError(_0x28b9e5,null));};exports[_0xa1c8('0x3e')]=function(_0x15e9fe,_0x26289d){var _0x3a5cd4={'raw':![],'where':{'id':_0x15e9fe['params']['id']}},_0x5a82ca={};_0x5a82ca[_0xa1c8('0x29')]=_[_0xa1c8('0x2b')](db[_0xa1c8('0x27')]['rawAttributes']);_0x5a82ca['query']=_[_0xa1c8('0x2b')](_0x15e9fe[_0xa1c8('0x2a')]);_0x5a82ca[_0xa1c8('0x2c')]=_[_0xa1c8('0x2d')](_0x5a82ca[_0xa1c8('0x29')],_0x5a82ca[_0xa1c8('0x2a')]);_0x3a5cd4[_0xa1c8('0x2e')]=_['intersection'](_0x5a82ca[_0xa1c8('0x29')],qs['fields'](_0x15e9fe[_0xa1c8('0x2a')][_0xa1c8('0x2f')]));_0x3a5cd4[_0xa1c8('0x2e')]=_0x3a5cd4['attributes'][_0xa1c8('0x30')]?_0x3a5cd4['attributes']:_0x5a82ca[_0xa1c8('0x29')];if(_0x15e9fe[_0xa1c8('0x2a')][_0xa1c8('0x3b')]){_0x3a5cd4['include']=[{'all':!![]}];}_0x3a5cd4=_[_0xa1c8('0x38')]({},_0x3a5cd4,_0x15e9fe[_0xa1c8('0x3a')]);return db['FreshdeskAccount'][_0xa1c8('0x3f')](_0x3a5cd4)[_0xa1c8('0x22')](handleEntityNotFound(_0x26289d,null))[_0xa1c8('0x22')](respondWithResult(_0x26289d,null))[_0xa1c8('0x3d')](handleError(_0x26289d,null));};exports[_0xa1c8('0x40')]=function(_0x43616f,_0x258d46){return db[_0xa1c8('0x27')][_0xa1c8('0x40')](_0x43616f['body'],{})[_0xa1c8('0x22')](respondWithResult(_0x258d46,0xc9))[_0xa1c8('0x3d')](handleError(_0x258d46,null));};exports[_0xa1c8('0x21')]=function(_0xf29fc,_0x4f0909){if(_0xf29fc[_0xa1c8('0x41')]['id']){delete _0xf29fc[_0xa1c8('0x41')]['id'];}return db[_0xa1c8('0x27')][_0xa1c8('0x3f')]({'where':{'id':_0xf29fc[_0xa1c8('0x42')]['id']}})['then'](handleEntityNotFound(_0x4f0909,null))[_0xa1c8('0x22')](saveUpdates(_0xf29fc[_0xa1c8('0x41')],null))[_0xa1c8('0x22')](respondWithResult(_0x4f0909,null))[_0xa1c8('0x3d')](handleError(_0x4f0909,null));};exports[_0xa1c8('0x23')]=function(_0x50a90f,_0x5bbef3){return db[_0xa1c8('0x27')][_0xa1c8('0x3f')]({'where':{'id':_0x50a90f[_0xa1c8('0x42')]['id']}})['then'](handleEntityNotFound(_0x5bbef3,null))[_0xa1c8('0x22')](removeEntity(_0x5bbef3,null))[_0xa1c8('0x3d')](handleError(_0x5bbef3,null));};exports[_0xa1c8('0x43')]=function(_0xda6bd9,_0x443b94,_0x2e083e){var _0x3fd9b7={};var _0x423429={};var _0x18dac8;var _0xf13fa3;return db[_0xa1c8('0x27')][_0xa1c8('0x44')]({'where':{'id':_0xda6bd9[_0xa1c8('0x42')]['id']}})['then'](handleEntityNotFound(_0x443b94,null))[_0xa1c8('0x22')](function(_0x1a117a){if(_0x1a117a){_0x18dac8=_0x1a117a;_0x423429[_0xa1c8('0x29')]=_[_0xa1c8('0x2b')](db[_0xa1c8('0x45')][_0xa1c8('0x28')]);_0x423429[_0xa1c8('0x2a')]=_[_0xa1c8('0x2b')](_0xda6bd9['query']);_0x423429[_0xa1c8('0x2c')]=_[_0xa1c8('0x2d')](_0x423429[_0xa1c8('0x29')],_0x423429[_0xa1c8('0x2a')]);_0x3fd9b7['attributes']=_['intersection'](_0x423429[_0xa1c8('0x29')],qs['fields'](_0xda6bd9[_0xa1c8('0x2a')][_0xa1c8('0x2f')]));_0x3fd9b7[_0xa1c8('0x2e')]=_0x3fd9b7[_0xa1c8('0x2e')][_0xa1c8('0x30')]?_0x3fd9b7[_0xa1c8('0x2e')]:_0x423429['model'];_0x3fd9b7[_0xa1c8('0x33')]=qs['sort'](_0xda6bd9[_0xa1c8('0x2a')]['sort']);_0x3fd9b7[_0xa1c8('0x35')]=qs[_0xa1c8('0x2c')](_[_0xa1c8('0x36')](_0xda6bd9[_0xa1c8('0x2a')],_0x423429['filters']));if(_0xda6bd9[_0xa1c8('0x2a')][_0xa1c8('0x37')]){_0x3fd9b7[_0xa1c8('0x35')]=_[_0xa1c8('0x38')](_0x3fd9b7[_0xa1c8('0x35')],{'$or':_['map'](_0x3fd9b7['attributes'],function(_0x30ed79){var _0x3d4873={};_0x3d4873[_0x30ed79]={'$like':'%'+_0xda6bd9['query'][_0xa1c8('0x37')]+'%'};return _0x3d4873;})});}_0x3fd9b7=_['merge']({},_0x3fd9b7,_0xda6bd9['options']);return _0x18dac8['getConfigurations'](_0x3fd9b7);}})[_0xa1c8('0x22')](function(_0x4df225){if(_0x4df225){_0xf13fa3=_0x4df225['length'];if(!_0xda6bd9[_0xa1c8('0x2a')]['hasOwnProperty'](_0xa1c8('0x32'))){_0x3fd9b7['limit']=qs['limit'](_0xda6bd9[_0xa1c8('0x2a')][_0xa1c8('0x1a')]);_0x3fd9b7[_0xa1c8('0x19')]=qs['offset'](_0xda6bd9[_0xa1c8('0x2a')][_0xa1c8('0x19')]);}return _0x18dac8[_0xa1c8('0x43')](_0x3fd9b7);}})['then'](function(_0x458579){if(_0x458579){return _0x458579?{'count':_0xf13fa3,'rows':_0x458579}:null;}})[_0xa1c8('0x22')](respondWithResult(_0x443b94,null))['catch'](handleError(_0x443b94,null));};exports[_0xa1c8('0x46')]=function(_0x380926,_0x670db6,_0x511b19){if(_0x380926[_0xa1c8('0x41')]['id']){delete _0x380926[_0xa1c8('0x41')]['id'];}return db['FreshdeskAccount'][_0xa1c8('0x44')]({'where':{'id':_0x380926['params']['id']}})[_0xa1c8('0x22')](handleEntityNotFound(_0x670db6,null))['then'](function(_0x125cfb){if(_0x125cfb){_0x380926[_0xa1c8('0x41')][_0xa1c8('0x47')]=_0x125cfb['id'];_0x380926[_0xa1c8('0x41')][_0xa1c8('0x48')]=integrations[_0xa1c8('0x49')](_0x380926[_0xa1c8('0x41')][_0xa1c8('0x4a')],_0x380926['body'][_0xa1c8('0x39')]);_0x380926[_0xa1c8('0x41')][_0xa1c8('0x4b')]=integrations[_0xa1c8('0x4c')](_0x380926[_0xa1c8('0x41')][_0xa1c8('0x4a')],_0x380926[_0xa1c8('0x41')][_0xa1c8('0x39')]);return db[_0xa1c8('0x45')][_0xa1c8('0x40')](_0x380926[_0xa1c8('0x41')],{'include':[{'model':db[_0xa1c8('0x4d')],'as':_0xa1c8('0x48')},{'model':db[_0xa1c8('0x4d')],'as':_0xa1c8('0x4b')}]});}return null;})[_0xa1c8('0x22')](respondWithResult(_0x670db6,null))[_0xa1c8('0x3d')](handleError(_0x670db6,null));};exports[_0xa1c8('0x4e')]=function(_0x376f19,_0x3eda58,_0x71af88){var _0xc75ecd='';return db[_0xa1c8('0x27')][_0xa1c8('0x44')]({'where':{'id':_0x376f19[_0xa1c8('0x42')]['id']},'attributes':['id','remoteUri',_0xa1c8('0x4f')]})[_0xa1c8('0x22')](handleEntityNotFound(_0x3eda58,null))[_0xa1c8('0x22')](function(_0x42feab){if(_0x42feab){_0xc75ecd=_0x42feab['remoteUri'];var _0x3d3e13=_0xc75ecd['slice'](-0x1);if(_0x3d3e13==='/'){_0xc75ecd=_0xc75ecd[_0xa1c8('0x50')](0x0,_0xc75ecd[_0xa1c8('0x51')](_0x3d3e13));}return rp({'method':_0xa1c8('0x52'),'uri':util[_0xa1c8('0x53')](_0xa1c8('0x54'),_0xc75ecd,_0xa1c8('0x55')),'headers':{'Authorization':util[_0xa1c8('0x53')](_0xa1c8('0x56'),new Buffer(util[_0xa1c8('0x53')](_0xa1c8('0x57'),_0x42feab['apiKey']))[_0xa1c8('0x58')](_0xa1c8('0x59')))},'json':!![]});}})[_0xa1c8('0x22')](function(_0x12ef5c){if(_0x12ef5c){var _0x142a14=[_0xa1c8('0x5a'),_0xa1c8('0x5b'),_0xa1c8('0x5c'),_0xa1c8('0x5d'),'status','priority',_0xa1c8('0x5e'),_0xa1c8('0x5f'),'ticket_type',_0xa1c8('0x5e'),'company'];_['remove'](_0x12ef5c,function(_0x25afae){return _0x142a14['includes'](_0x25afae[_0xa1c8('0x25')])||!_0x25afae[_0xa1c8('0x60')]&&_0x25afae['type']!=='custom_text'&&_0x25afae[_0xa1c8('0x39')]!==_0xa1c8('0x61');});return{'count':_0x12ef5c['length'],'rows':_['map'](_0x12ef5c,function(_0xeb16fc){return{'id':_0xeb16fc[_0xa1c8('0x25')],'name':_0xeb16fc[_0xa1c8('0x62')],'custom':!_0xeb16fc[_0xa1c8('0x60')],'options':_0xeb16fc[_0xa1c8('0x63')]?_[_0xa1c8('0x64')](_0xeb16fc[_0xa1c8('0x63')],function(_0x513962){return{'name':_[_0xa1c8('0x65')](_0x513962),'value':_0x513962};}):[]};})};}})[_0xa1c8('0x22')](respondWithResult(_0x3eda58,null))[_0xa1c8('0x3d')](function(_0x154d17){var _0x471f8e=_0x376f19[_0xa1c8('0x2a')][_0xa1c8('0x66')]?0x1f4:_0x154d17[_0xa1c8('0x67')]||0x1f4;logger[_0xa1c8('0x68')](_0xa1c8('0x69'),_0xa1c8('0x4e'),_0x471f8e,JSON['stringify'](_0x154d17));delete _0x154d17['name'];if(_0x471f8e===0x191){_0x471f8e=0x190;}_0x3eda58[_0xa1c8('0x17')](_0x471f8e)[_0xa1c8('0x6a')](_0x376f19[_0xa1c8('0x2a')][_0xa1c8('0x66')]?{'message':'Wrong\x20credentials','statusCode':_0x154d17[_0xa1c8('0x67')]}:_0x154d17);});};
\ No newline at end of file
index 010840f..890375a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbc4a=['./intFreshdeskAccount.attributes','../../components/integrations/configuration','exports','define','FreshdeskAccount','lodash','api','moment','bluebird','request-promise','../../config/environment'];(function(_0x1cb18a,_0x33167a){var _0x22442e=function(_0x46c611){while(--_0x46c611){_0x1cb18a['push'](_0x1cb18a['shift']());}};_0x22442e(++_0x33167a);}(_0xbc4a,0x89));var _0xabc4=function(_0x1a1ea5,_0x48475a){_0x1a1ea5=_0x1a1ea5-0x0;var _0xed49a=_0xbc4a[_0x1a1ea5];return _0xed49a;};'use strict';var _=require(_0xabc4('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xabc4('0x1'));var moment=require(_0xabc4('0x2'));var BPromise=require(_0xabc4('0x3'));var rp=require(_0xabc4('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xabc4('0x5'));var attributes=require(_0xabc4('0x6'));var integrations=require(_0xabc4('0x7'));module[_0xabc4('0x8')]=function(_0x3fbafb,_0x12760a){return _0x3fbafb[_0xabc4('0x9')](_0xabc4('0xa'),attributes,{'tableName':'int_freshdesk_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x7a6e=['define','FreshdeskAccount','int_freshdesk_accounts','lodash','util','api','request-promise','rimraf','../../config/environment','./intFreshdeskAccount.attributes','exports'];(function(_0x7c6564,_0xfab533){var _0x5db005=function(_0x39a8d6){while(--_0x39a8d6){_0x7c6564['push'](_0x7c6564['shift']());}};_0x5db005(++_0xfab533);}(_0x7a6e,0xa8));var _0xe7a6=function(_0x2aacd9,_0x5d455d){_0x2aacd9=_0x2aacd9-0x0;var _0x37bdd6=_0x7a6e[_0x2aacd9];return _0x37bdd6;};'use strict';var _=require(_0xe7a6('0x0'));var util=require(_0xe7a6('0x1'));var logger=require('../../config/logger')(_0xe7a6('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xe7a6('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xe7a6('0x4'));var config=require(_0xe7a6('0x5'));var attributes=require(_0xe7a6('0x6'));var integrations=require('../../components/integrations/configuration');module[_0xe7a6('0x7')]=function(_0xe53794,_0x589829){return _0xe53794[_0xe7a6('0x8')](_0xe7a6('0x9'),attributes,{'tableName':_0xe7a6('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index a53f063..9170483 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7b68=['../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','request\x20sent','debug','FreshdeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','FreshdeskAccount,\x20%s,\x20%s','message','info','result','catch','GetFreshdeskAccount','FreshdeskAccount','findAll','options','where','attributes','include','model','map','ShowFreshdeskAccount','find','raw','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x1e8e69,_0x4ad9d8){var _0x44667f=function(_0x444987){while(--_0x444987){_0x1e8e69['push'](_0x1e8e69['shift']());}};_0x44667f(++_0x4ad9d8);}(_0x7b68,0x1e7));var _0x87b6=function(_0x4d8419,_0x310d02){_0x4d8419=_0x4d8419-0x0;var _0x17e249=_0x7b68[_0x4d8419];return _0x17e249;};'use strict';var _=require(_0x87b6('0x0'));var util=require(_0x87b6('0x1'));var moment=require(_0x87b6('0x2'));var BPromise=require(_0x87b6('0x3'));var rs=require(_0x87b6('0x4'));var fs=require('fs');var Redis=require(_0x87b6('0x5'));var db=require(_0x87b6('0x6'))['db'];var utils=require(_0x87b6('0x7'));var logger=require(_0x87b6('0x8'))(_0x87b6('0x9'));var config=require('../../config/environment');var jayson=require(_0x87b6('0xa'));var client=jayson[_0x87b6('0xb')][_0x87b6('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x2a7f4e,_0x33ceb5,_0x1446d7){return new BPromise(function(_0xab98ac,_0x38e12e){return client[_0x87b6('0xd')](_0x2a7f4e,_0x1446d7)[_0x87b6('0xe')](function(_0x59baf5){logger['info']('FreshdeskAccount,\x20%s,\x20%s',_0x33ceb5,_0x87b6('0xf'));logger[_0x87b6('0x10')](_0x87b6('0x11'),_0x33ceb5,_0x87b6('0xf'),JSON[_0x87b6('0x12')](_0x59baf5));if(_0x59baf5[_0x87b6('0x13')]){if(_0x59baf5[_0x87b6('0x13')][_0x87b6('0x14')]===0x1f4){logger[_0x87b6('0x13')](_0x87b6('0x15'),_0x33ceb5,_0x59baf5[_0x87b6('0x13')]['message']);return _0x38e12e(_0x59baf5['error'][_0x87b6('0x16')]);}logger[_0x87b6('0x13')]('FreshdeskAccount,\x20%s,\x20%s',_0x33ceb5,_0x59baf5[_0x87b6('0x13')]['message']);return _0xab98ac(_0x59baf5[_0x87b6('0x13')][_0x87b6('0x16')]);}else{logger[_0x87b6('0x17')](_0x87b6('0x15'),_0x33ceb5,_0x87b6('0xf'));_0xab98ac(_0x59baf5[_0x87b6('0x18')][_0x87b6('0x16')]);}})[_0x87b6('0x19')](function(_0x2bba3b){logger[_0x87b6('0x13')]('FreshdeskAccount,\x20%s,\x20%s',_0x33ceb5,_0x2bba3b);_0x38e12e(_0x2bba3b);});});}exports[_0x87b6('0x1a')]=function(_0x497213){var _0x54e271=this;return new Promise(function(_0x253aa1,_0x550826){return db[_0x87b6('0x1b')][_0x87b6('0x1c')]({'raw':_0x497213['options']?_0x497213[_0x87b6('0x1d')]['raw']===undefined?!![]:![]:!![],'where':_0x497213[_0x87b6('0x1d')]?_0x497213[_0x87b6('0x1d')][_0x87b6('0x1e')]||null:null,'attributes':_0x497213[_0x87b6('0x1d')]?_0x497213[_0x87b6('0x1d')][_0x87b6('0x1f')]||null:null,'limit':_0x497213['options']?_0x497213[_0x87b6('0x1d')]['limit']||null:null,'include':_0x497213[_0x87b6('0x1d')]?_0x497213['options'][_0x87b6('0x20')]?_['map'](_0x497213['options'][_0x87b6('0x20')],function(_0x17f471){return{'model':db[_0x17f471[_0x87b6('0x21')]],'as':_0x17f471['as'],'attributes':_0x17f471[_0x87b6('0x1f')],'include':_0x17f471[_0x87b6('0x20')]?_[_0x87b6('0x22')](_0x17f471[_0x87b6('0x20')],function(_0x2df688){return{'model':db[_0x2df688[_0x87b6('0x21')]],'as':_0x2df688['as'],'attributes':_0x2df688['attributes'],'include':_0x2df688['include']?_['map'](_0x2df688['include'],function(_0x465c1e){return{'model':db[_0x465c1e[_0x87b6('0x21')]],'as':_0x465c1e['as'],'attributes':_0x465c1e[_0x87b6('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x87b6('0xe')](function(_0x41ca02){logger[_0x87b6('0x17')]('GetFreshdeskAccount',_0x497213);logger[_0x87b6('0x10')](_0x87b6('0x1a'),_0x497213,JSON[_0x87b6('0x12')](_0x41ca02));_0x253aa1(_0x41ca02);})[_0x87b6('0x19')](function(_0xc14819){logger[_0x87b6('0x13')](_0x87b6('0x1a'),_0xc14819[_0x87b6('0x16')],_0x497213);_0x550826(_0x54e271[_0x87b6('0x13')](0x1f4,_0xc14819[_0x87b6('0x16')]));});});};exports[_0x87b6('0x23')]=function(_0x2ed49c){var _0x5cfc0d=this;return new Promise(function(_0x5e63d1,_0x33f162){return db[_0x87b6('0x1b')][_0x87b6('0x24')]({'raw':_0x2ed49c['options']?_0x2ed49c[_0x87b6('0x1d')][_0x87b6('0x25')]===undefined?!![]:![]:!![],'where':_0x2ed49c[_0x87b6('0x1d')]?_0x2ed49c[_0x87b6('0x1d')][_0x87b6('0x1e')]||null:null,'attributes':_0x2ed49c[_0x87b6('0x1d')]?_0x2ed49c['options'][_0x87b6('0x1f')]||null:null,'include':_0x2ed49c['options']?_0x2ed49c[_0x87b6('0x1d')][_0x87b6('0x20')]?_[_0x87b6('0x22')](_0x2ed49c[_0x87b6('0x1d')][_0x87b6('0x20')],function(_0x187d85){return{'model':db[_0x187d85[_0x87b6('0x21')]],'as':_0x187d85['as'],'attributes':_0x187d85['attributes'],'include':_0x187d85[_0x87b6('0x20')]?_[_0x87b6('0x22')](_0x187d85[_0x87b6('0x20')],function(_0x59b02f){return{'model':db[_0x59b02f['model']],'as':_0x59b02f['as'],'attributes':_0x59b02f[_0x87b6('0x1f')],'include':_0x59b02f[_0x87b6('0x20')]?_['map'](_0x59b02f[_0x87b6('0x20')],function(_0x2e0e8a){return{'model':db[_0x2e0e8a['model']],'as':_0x2e0e8a['as'],'attributes':_0x2e0e8a[_0x87b6('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x87b6('0xe')](function(_0x2c9a3d){logger['info'](_0x87b6('0x23'),_0x2ed49c);logger['debug'](_0x87b6('0x23'),_0x2ed49c,JSON[_0x87b6('0x12')](_0x2c9a3d));_0x5e63d1(_0x2c9a3d);})[_0x87b6('0x19')](function(_0x594b24){logger[_0x87b6('0x13')]('ShowFreshdeskAccount',_0x594b24[_0x87b6('0x16')],_0x2ed49c);_0x33f162(_0x5cfc0d[_0x87b6('0x13')](0x1f4,_0x594b24[_0x87b6('0x16')]));});});};
\ No newline at end of file
+var _0xdb1a=['moment','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','request\x20sent','debug','FreshdeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','FreshdeskAccount,\x20%s,\x20%s','message','result','options','raw','where','include','map','model','attributes','info','GetFreshdeskAccount','ShowFreshdeskAccount','FreshdeskAccount','lodash','util'];(function(_0x40fb1a,_0xc40248){var _0x5a7770=function(_0x487e52){while(--_0x487e52){_0x40fb1a['push'](_0x40fb1a['shift']());}};_0x5a7770(++_0xc40248);}(_0xdb1a,0xca));var _0xadb1=function(_0x3c23dd,_0x47d34a){_0x3c23dd=_0x3c23dd-0x0;var _0x167956=_0xdb1a[_0x3c23dd];return _0x167956;};'use strict';var _=require(_0xadb1('0x0'));var util=require(_0xadb1('0x1'));var moment=require(_0xadb1('0x2'));var BPromise=require(_0xadb1('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xadb1('0x4'));var db=require(_0xadb1('0x5'))['db'];var utils=require(_0xadb1('0x6'));var logger=require('../../config/logger')(_0xadb1('0x7'));var config=require(_0xadb1('0x8'));var jayson=require(_0xadb1('0x9'));var client=jayson[_0xadb1('0xa')][_0xadb1('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xaedf13,_0x3f2d92,_0x240c91){return new BPromise(function(_0x2b4749,_0x17ccf3){return client[_0xadb1('0xc')](_0xaedf13,_0x240c91)[_0xadb1('0xd')](function(_0x9d0258){logger['info']('FreshdeskAccount,\x20%s,\x20%s',_0x3f2d92,_0xadb1('0xe'));logger[_0xadb1('0xf')](_0xadb1('0x10'),_0x3f2d92,_0xadb1('0xe'),JSON[_0xadb1('0x11')](_0x9d0258));if(_0x9d0258[_0xadb1('0x12')]){if(_0x9d0258['error'][_0xadb1('0x13')]===0x1f4){logger[_0xadb1('0x12')](_0xadb1('0x14'),_0x3f2d92,_0x9d0258[_0xadb1('0x12')]['message']);return _0x17ccf3(_0x9d0258[_0xadb1('0x12')]['message']);}logger['error']('FreshdeskAccount,\x20%s,\x20%s',_0x3f2d92,_0x9d0258[_0xadb1('0x12')]['message']);return _0x2b4749(_0x9d0258[_0xadb1('0x12')][_0xadb1('0x15')]);}else{logger['info']('FreshdeskAccount,\x20%s,\x20%s',_0x3f2d92,_0xadb1('0xe'));_0x2b4749(_0x9d0258[_0xadb1('0x16')][_0xadb1('0x15')]);}})['catch'](function(_0x200e77){logger['error'](_0xadb1('0x14'),_0x3f2d92,_0x200e77);_0x17ccf3(_0x200e77);});});}exports['GetFreshdeskAccount']=function(_0x1af420){var _0x2d3372=this;return new Promise(function(_0x489f0d,_0x5e988a){return db['FreshdeskAccount']['findAll']({'raw':_0x1af420[_0xadb1('0x17')]?_0x1af420[_0xadb1('0x17')][_0xadb1('0x18')]===undefined?!![]:![]:!![],'where':_0x1af420[_0xadb1('0x17')]?_0x1af420[_0xadb1('0x17')][_0xadb1('0x19')]||null:null,'attributes':_0x1af420[_0xadb1('0x17')]?_0x1af420[_0xadb1('0x17')]['attributes']||null:null,'limit':_0x1af420[_0xadb1('0x17')]?_0x1af420[_0xadb1('0x17')]['limit']||null:null,'include':_0x1af420[_0xadb1('0x17')]?_0x1af420[_0xadb1('0x17')][_0xadb1('0x1a')]?_[_0xadb1('0x1b')](_0x1af420[_0xadb1('0x17')][_0xadb1('0x1a')],function(_0x47c851){return{'model':db[_0x47c851[_0xadb1('0x1c')]],'as':_0x47c851['as'],'attributes':_0x47c851[_0xadb1('0x1d')],'include':_0x47c851[_0xadb1('0x1a')]?_[_0xadb1('0x1b')](_0x47c851[_0xadb1('0x1a')],function(_0x3afdbc){return{'model':db[_0x3afdbc[_0xadb1('0x1c')]],'as':_0x3afdbc['as'],'attributes':_0x3afdbc[_0xadb1('0x1d')],'include':_0x3afdbc['include']?_['map'](_0x3afdbc['include'],function(_0x8d0fcf){return{'model':db[_0x8d0fcf[_0xadb1('0x1c')]],'as':_0x8d0fcf['as'],'attributes':_0x8d0fcf[_0xadb1('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xadb1('0xd')](function(_0x140b84){logger[_0xadb1('0x1e')](_0xadb1('0x1f'),_0x1af420);logger[_0xadb1('0xf')](_0xadb1('0x1f'),_0x1af420,JSON[_0xadb1('0x11')](_0x140b84));_0x489f0d(_0x140b84);})['catch'](function(_0x3ffc27){logger[_0xadb1('0x12')](_0xadb1('0x1f'),_0x3ffc27[_0xadb1('0x15')],_0x1af420);_0x5e988a(_0x2d3372[_0xadb1('0x12')](0x1f4,_0x3ffc27[_0xadb1('0x15')]));});});};exports[_0xadb1('0x20')]=function(_0x57d293){var _0x1cf235=this;return new Promise(function(_0x26a2c3,_0x2d9863){return db[_0xadb1('0x21')]['find']({'raw':_0x57d293[_0xadb1('0x17')]?_0x57d293[_0xadb1('0x17')][_0xadb1('0x18')]===undefined?!![]:![]:!![],'where':_0x57d293[_0xadb1('0x17')]?_0x57d293[_0xadb1('0x17')][_0xadb1('0x19')]||null:null,'attributes':_0x57d293[_0xadb1('0x17')]?_0x57d293[_0xadb1('0x17')][_0xadb1('0x1d')]||null:null,'include':_0x57d293[_0xadb1('0x17')]?_0x57d293['options'][_0xadb1('0x1a')]?_['map'](_0x57d293[_0xadb1('0x17')][_0xadb1('0x1a')],function(_0x1fd564){return{'model':db[_0x1fd564[_0xadb1('0x1c')]],'as':_0x1fd564['as'],'attributes':_0x1fd564[_0xadb1('0x1d')],'include':_0x1fd564[_0xadb1('0x1a')]?_[_0xadb1('0x1b')](_0x1fd564[_0xadb1('0x1a')],function(_0x16ef51){return{'model':db[_0x16ef51[_0xadb1('0x1c')]],'as':_0x16ef51['as'],'attributes':_0x16ef51[_0xadb1('0x1d')],'include':_0x16ef51[_0xadb1('0x1a')]?_[_0xadb1('0x1b')](_0x16ef51['include'],function(_0x2d910f){return{'model':db[_0x2d910f[_0xadb1('0x1c')]],'as':_0x2d910f['as'],'attributes':_0x2d910f['attributes']};}):[]};}):[]};}):[]:[]})[_0xadb1('0xd')](function(_0x3a3fca){logger[_0xadb1('0x1e')](_0xadb1('0x20'),_0x57d293);logger[_0xadb1('0xf')](_0xadb1('0x20'),_0x57d293,JSON[_0xadb1('0x11')](_0x3a3fca));_0x26a2c3(_0x3a3fca);})['catch'](function(_0x336949){logger[_0xadb1('0x12')]('ShowFreshdeskAccount',_0x336949[_0xadb1('0x15')],_0x57d293);_0x2d9863(_0x1cf235[_0xadb1('0x12')](0x1f4,_0x336949[_0xadb1('0x15')]));});});};
\ No newline at end of file
index d23c4bd..eabc8af 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x94a8=['./intFreshdeskConfiguration.controller','isAuthenticated','index','show','get','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','/:id/tags','getTags','post','create','put','/:id','update','delete','destroy','exports','multer','express','Router','fs-extra','../../config/environment'];(function(_0x3e2452,_0x477868){var _0x5be07=function(_0x203c72){while(--_0x203c72){_0x3e2452['push'](_0x3e2452['shift']());}};_0x5be07(++_0x477868);}(_0x94a8,0x78));var _0x894a=function(_0x334841,_0x2bbc4c){_0x334841=_0x334841-0x0;var _0x5beb4b=_0x94a8[_0x334841];return _0x5beb4b;};'use strict';var multer=require(_0x894a('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0x894a('0x1'));var router=express[_0x894a('0x2')]();var fs_extra=require(_0x894a('0x3'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x894a('0x4'));var controller=require(_0x894a('0x5'));router['get']('/',auth[_0x894a('0x6')](),controller[_0x894a('0x7')]);router['get']('/:id',auth[_0x894a('0x6')](),controller[_0x894a('0x8')]);router[_0x894a('0x9')]('/:id/fields',auth[_0x894a('0x6')](),controller[_0x894a('0xa')]);router['get'](_0x894a('0xb'),auth[_0x894a('0x6')](),controller[_0x894a('0xc')]);router[_0x894a('0x9')](_0x894a('0xd'),auth['isAuthenticated'](),controller[_0x894a('0xe')]);router['get'](_0x894a('0xf'),auth[_0x894a('0x6')](),controller[_0x894a('0x10')]);router[_0x894a('0x11')]('/',auth[_0x894a('0x6')](),controller[_0x894a('0x12')]);router[_0x894a('0x11')]('/:id/tags',auth[_0x894a('0x6')](),controller['setTags']);router[_0x894a('0x13')](_0x894a('0x14'),auth[_0x894a('0x6')](),controller[_0x894a('0x15')]);router[_0x894a('0x16')]('/:id',auth[_0x894a('0x6')](),controller[_0x894a('0x17')]);module[_0x894a('0x18')]=router;
\ No newline at end of file
+var _0x255c=['index','/:id','isAuthenticated','show','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','/:id/tags','post','put','update','destroy','exports','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intFreshdeskConfiguration.controller','get'];(function(_0xcdbefc,_0x438db5){var _0x18296d=function(_0x2672e6){while(--_0x2672e6){_0xcdbefc['push'](_0xcdbefc['shift']());}};_0x18296d(++_0x438db5);}(_0x255c,0x146));var _0xc255=function(_0x241929,_0x1700d5){_0x241929=_0x241929-0x0;var _0x3f6ad9=_0x255c[_0x241929];return _0x3f6ad9;};'use strict';var multer=require('multer');var util=require(_0xc255('0x0'));var path=require('path');var timeout=require(_0xc255('0x1'));var express=require(_0xc255('0x2'));var router=express[_0xc255('0x3')]();var fs_extra=require(_0xc255('0x4'));var auth=require(_0xc255('0x5'));var interaction=require(_0xc255('0x6'));var config=require(_0xc255('0x7'));var controller=require(_0xc255('0x8'));router[_0xc255('0x9')]('/',auth['isAuthenticated'](),controller[_0xc255('0xa')]);router[_0xc255('0x9')](_0xc255('0xb'),auth[_0xc255('0xc')](),controller[_0xc255('0xd')]);router['get']('/:id/fields',auth['isAuthenticated'](),controller['getFields']);router[_0xc255('0x9')](_0xc255('0xe'),auth[_0xc255('0xc')](),controller[_0xc255('0xf')]);router[_0xc255('0x9')](_0xc255('0x10'),auth[_0xc255('0xc')](),controller[_0xc255('0x11')]);router[_0xc255('0x9')](_0xc255('0x12'),auth[_0xc255('0xc')](),controller['getTags']);router[_0xc255('0x13')]('/',auth[_0xc255('0xc')](),controller['create']);router[_0xc255('0x13')](_0xc255('0x12'),auth[_0xc255('0xc')](),controller['setTags']);router[_0xc255('0x14')](_0xc255('0xb'),auth[_0xc255('0xc')](),controller[_0xc255('0x15')]);router['delete'](_0xc255('0xb'),auth['isAuthenticated'](),controller[_0xc255('0x16')]);module[_0xc255('0x17')]=router;
\ No newline at end of file
index 789a3b0..7a74bd8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf426=['sequelize','exports','STRING'];(function(_0x36eaaa,_0x326732){var _0x461349=function(_0x4e4180){while(--_0x4e4180){_0x36eaaa['push'](_0x36eaaa['shift']());}};_0x461349(++_0x326732);}(_0xf426,0xd5));var _0x6f42=function(_0x3c59fc,_0x10dbd2){_0x3c59fc=_0x3c59fc-0x0;var _0x2b78d4=_0xf426[_0x3c59fc];return _0x2b78d4;};'use strict';var Sequelize=require(_0x6f42('0x0'));module[_0x6f42('0x1')]={'name':{'type':Sequelize[_0x6f42('0x2')]},'description':{'type':Sequelize[_0x6f42('0x2')]}};
\ No newline at end of file
+var _0xafcd=['exports','STRING','sequelize'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xafcd,0x1d6));var _0xdafc=function(_0x425b10,_0xe4cbbe){_0x425b10=_0x425b10-0x0;var _0x1eecfe=_0xafcd[_0x425b10];return _0x1eecfe;};'use strict';var Sequelize=require(_0xdafc('0x0'));module[_0xdafc('0x1')]={'name':{'type':Sequelize[_0xdafc('0x2')]},'description':{'type':Sequelize[_0xdafc('0x2')]}};
\ No newline at end of file
index 5aebb13..66d5a49 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe9b3=['end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','destroy','error','name','fieldName','type','model','map','keys','intersection','query','attributes','fields','length','hasOwnProperty','nolimit','order','where','filters','filter','merge','VIRTUAL','FreshdeskConfiguration','then','includeAll','include','rows','catch','show','params','rawAttributes','find','create','body','update','FreshdeskField','sort','pick','options','getFields','getSubjects','getDescriptions','findOne','getTags','Tag','setTags','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status'];(function(_0x4372d3,_0x14cc0e){var _0x355dc0=function(_0x10e7b2){while(--_0x10e7b2){_0x4372d3['push'](_0x4372d3['shift']());}};_0x355dc0(++_0x14cc0e);}(_0xe9b3,0x89));var _0x3e9b=function(_0x1bc89d,_0x449f53){_0x1bc89d=_0x1bc89d-0x0;var _0x13c6ec=_0xe9b3[_0x1bc89d];return _0x13c6ec;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x3e9b('0x0'));var zipdir=require(_0x3e9b('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x3e9b('0x2'));var moment=require(_0x3e9b('0x3'));var BPromise=require(_0x3e9b('0x4'));var Mustache=require(_0x3e9b('0x5'));var util=require('util');var path=require(_0x3e9b('0x6'));var sox=require('sox');var csv=require(_0x3e9b('0x7'));var ejs=require(_0x3e9b('0x8'));var fs=require('fs');var fs_extra=require(_0x3e9b('0x9'));var _=require(_0x3e9b('0xa'));var squel=require(_0x3e9b('0xb'));var crypto=require('crypto');var jsforce=require(_0x3e9b('0xc'));var deskjs=require(_0x3e9b('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x3e9b('0xe'));var Redis=require(_0x3e9b('0xf'));var authService=require(_0x3e9b('0x10'));var qs=require(_0x3e9b('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x3e9b('0x12'));var logger=require(_0x3e9b('0x13'))('api');var utils=require(_0x3e9b('0x14'));var config=require(_0x3e9b('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x3e9b('0x16'))['db'];function respondWithStatusCode(_0x25d062,_0x20fc60){_0x20fc60=_0x20fc60||0xcc;return function(_0x581c73){if(_0x581c73){return _0x25d062[_0x3e9b('0x17')](_0x20fc60);}return _0x25d062[_0x3e9b('0x18')](_0x20fc60)[_0x3e9b('0x19')]();};}function respondWithResult(_0x4cc56e,_0x272db5){_0x272db5=_0x272db5||0xc8;return function(_0x1e6cc4){if(_0x1e6cc4){return _0x4cc56e[_0x3e9b('0x18')](_0x272db5)[_0x3e9b('0x1a')](_0x1e6cc4);}};}function respondWithFilteredResult(_0x32ff49,_0x14ef58){return function(_0x4e5869){if(_0x4e5869){var _0x3b2bed=typeof _0x14ef58[_0x3e9b('0x1b')]===_0x3e9b('0x1c')&&typeof _0x14ef58[_0x3e9b('0x1d')]==='undefined';var _0x5d6183=_0x4e5869['count'];var _0x281167=_0x3b2bed?0x0:_0x14ef58['offset'];var _0x44f7ad=_0x3b2bed?_0x4e5869[_0x3e9b('0x1e')]:_0x14ef58[_0x3e9b('0x1b')]+_0x14ef58[_0x3e9b('0x1d')];var _0x38d130;if(_0x44f7ad>=_0x5d6183){_0x44f7ad=_0x5d6183;_0x38d130=0xc8;}else{_0x38d130=0xce;}_0x32ff49['status'](_0x38d130);return _0x32ff49[_0x3e9b('0x1f')](_0x3e9b('0x20'),_0x281167+'-'+_0x44f7ad+'/'+_0x5d6183)[_0x3e9b('0x1a')](_0x4e5869);}return null;};}function patchUpdates(_0x1f1f3f){return function(_0x179d91){try{jsonpatch[_0x3e9b('0x21')](_0x179d91,_0x1f1f3f,!![]);}catch(_0x56be67){return BPromise[_0x3e9b('0x22')](_0x56be67);}return _0x179d91[_0x3e9b('0x23')]();};}function saveUpdates(_0x439635,_0x47bf97){return function(_0x5b1461){if(_0x5b1461){return _0x5b1461['update'](_0x439635)['then'](function(_0x26ebd0){return _0x26ebd0;});}return null;};}function removeEntity(_0x4c09f6,_0x11f3c0){return function(_0x18accd){if(_0x18accd){return _0x18accd[_0x3e9b('0x24')]()['then'](function(){_0x4c09f6[_0x3e9b('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5f217e,_0x2b1f4f){return function(_0x5e06a0){if(!_0x5e06a0){_0x5f217e[_0x3e9b('0x17')](0x194);}return _0x5e06a0;};}function handleError(_0x5978f9,_0x36929d){_0x36929d=_0x36929d||0x1f4;return function(_0x260d1e){logger[_0x3e9b('0x25')](_0x260d1e['stack']);if(_0x260d1e[_0x3e9b('0x26')]){delete _0x260d1e[_0x3e9b('0x26')];}_0x5978f9[_0x3e9b('0x18')](_0x36929d)['send'](_0x260d1e);};}exports['index']=function(_0x58001b,_0x2ec0ce){var _0x59664b={},_0x3a9af0={},_0xaec26b={'count':0x0,'rows':[]};var _0x5c1c4b=_['map'](db['FreshdeskConfiguration']['rawAttributes'],function(_0x3e2a61){return{'name':_0x3e2a61[_0x3e9b('0x27')],'type':_0x3e2a61[_0x3e9b('0x28')]['key']};});_0x3a9af0[_0x3e9b('0x29')]=_[_0x3e9b('0x2a')](_0x5c1c4b,_0x3e9b('0x26'));_0x3a9af0['query']=_[_0x3e9b('0x2b')](_0x58001b['query']);_0x3a9af0['filters']=_[_0x3e9b('0x2c')](_0x3a9af0['model'],_0x3a9af0[_0x3e9b('0x2d')]);_0x59664b[_0x3e9b('0x2e')]=_['intersection'](_0x3a9af0[_0x3e9b('0x29')],qs[_0x3e9b('0x2f')](_0x58001b[_0x3e9b('0x2d')][_0x3e9b('0x2f')]));_0x59664b[_0x3e9b('0x2e')]=_0x59664b[_0x3e9b('0x2e')][_0x3e9b('0x30')]?_0x59664b[_0x3e9b('0x2e')]:_0x3a9af0[_0x3e9b('0x29')];if(!_0x58001b[_0x3e9b('0x2d')][_0x3e9b('0x31')](_0x3e9b('0x32'))){_0x59664b[_0x3e9b('0x1d')]=qs['limit'](_0x58001b[_0x3e9b('0x2d')][_0x3e9b('0x1d')]);_0x59664b[_0x3e9b('0x1b')]=qs[_0x3e9b('0x1b')](_0x58001b[_0x3e9b('0x2d')]['offset']);}_0x59664b[_0x3e9b('0x33')]=qs['sort'](_0x58001b[_0x3e9b('0x2d')]['sort']);_0x59664b[_0x3e9b('0x34')]=qs[_0x3e9b('0x35')](_['pick'](_0x58001b[_0x3e9b('0x2d')],_0x3a9af0[_0x3e9b('0x35')]),_0x5c1c4b);if(_0x58001b[_0x3e9b('0x2d')][_0x3e9b('0x36')]){_0x59664b['where']=_[_0x3e9b('0x37')](_0x59664b['where'],{'$or':_[_0x3e9b('0x2a')](_0x5c1c4b,function(_0x1cfa53){if(_0x1cfa53[_0x3e9b('0x28')]!==_0x3e9b('0x38')){var _0x583d67={};_0x583d67[_0x1cfa53[_0x3e9b('0x26')]]={'$like':'%'+_0x58001b[_0x3e9b('0x2d')][_0x3e9b('0x36')]+'%'};return _0x583d67;}})});}_0x59664b=_[_0x3e9b('0x37')]({},_0x59664b,_0x58001b['options']);var _0x429457={'where':_0x59664b[_0x3e9b('0x34')]};return db[_0x3e9b('0x39')][_0x3e9b('0x1e')](_0x429457)[_0x3e9b('0x3a')](function(_0x477a65){_0xaec26b[_0x3e9b('0x1e')]=_0x477a65;if(_0x58001b['query'][_0x3e9b('0x3b')]){_0x59664b[_0x3e9b('0x3c')]=[{'all':!![]}];}return db[_0x3e9b('0x39')]['findAll'](_0x59664b);})[_0x3e9b('0x3a')](function(_0x51e81d){_0xaec26b[_0x3e9b('0x3d')]=_0x51e81d;return _0xaec26b;})['then'](respondWithFilteredResult(_0x2ec0ce,_0x59664b))[_0x3e9b('0x3e')](handleError(_0x2ec0ce,null));};exports[_0x3e9b('0x3f')]=function(_0x385095,_0x3422c5){var _0x1ded85={'raw':![],'where':{'id':_0x385095[_0x3e9b('0x40')]['id']}},_0x477907={};_0x477907[_0x3e9b('0x29')]=_['keys'](db[_0x3e9b('0x39')][_0x3e9b('0x41')]);_0x477907[_0x3e9b('0x2d')]=_[_0x3e9b('0x2b')](_0x385095[_0x3e9b('0x2d')]);_0x477907['filters']=_['intersection'](_0x477907[_0x3e9b('0x29')],_0x477907[_0x3e9b('0x2d')]);_0x1ded85[_0x3e9b('0x2e')]=_[_0x3e9b('0x2c')](_0x477907['model'],qs[_0x3e9b('0x2f')](_0x385095[_0x3e9b('0x2d')][_0x3e9b('0x2f')]));_0x1ded85[_0x3e9b('0x2e')]=_0x1ded85[_0x3e9b('0x2e')]['length']?_0x1ded85[_0x3e9b('0x2e')]:_0x477907[_0x3e9b('0x29')];if(_0x385095[_0x3e9b('0x2d')][_0x3e9b('0x3b')]){_0x1ded85[_0x3e9b('0x3c')]=[{'all':!![]}];}_0x1ded85=_[_0x3e9b('0x37')]({},_0x1ded85,_0x385095['options']);return db[_0x3e9b('0x39')][_0x3e9b('0x42')](_0x1ded85)['then'](handleEntityNotFound(_0x3422c5,null))[_0x3e9b('0x3a')](respondWithResult(_0x3422c5,null))['catch'](handleError(_0x3422c5,null));};exports[_0x3e9b('0x43')]=function(_0x387758,_0x3fe680){return db[_0x3e9b('0x39')][_0x3e9b('0x43')](_0x387758[_0x3e9b('0x44')],{})[_0x3e9b('0x3a')](respondWithResult(_0x3fe680,0xc9))['catch'](handleError(_0x3fe680,null));};exports[_0x3e9b('0x45')]=function(_0x5c9f36,_0x21c6df){if(_0x5c9f36['body']['id']){delete _0x5c9f36[_0x3e9b('0x44')]['id'];}return db['FreshdeskConfiguration'][_0x3e9b('0x42')]({'where':{'id':_0x5c9f36[_0x3e9b('0x40')]['id']}})[_0x3e9b('0x3a')](handleEntityNotFound(_0x21c6df,null))['then'](saveUpdates(_0x5c9f36[_0x3e9b('0x44')],null))['then'](respondWithResult(_0x21c6df,null))[_0x3e9b('0x3e')](handleError(_0x21c6df,null));};exports[_0x3e9b('0x24')]=function(_0x26da86,_0x162a4e){return db[_0x3e9b('0x39')][_0x3e9b('0x42')]({'where':{'id':_0x26da86[_0x3e9b('0x40')]['id']}})[_0x3e9b('0x3a')](handleEntityNotFound(_0x162a4e,null))['then'](removeEntity(_0x162a4e,null))[_0x3e9b('0x3e')](handleError(_0x162a4e,null));};exports['getFields']=function(_0x4631e4,_0x535c1b,_0x4d8e1b){var _0x35c464={};var _0x4bc8cf={};var _0x4ec18d;var _0x5b529f;return db['FreshdeskConfiguration']['findOne']({'where':{'id':_0x4631e4[_0x3e9b('0x40')]['id']}})['then'](handleEntityNotFound(_0x535c1b,null))[_0x3e9b('0x3a')](function(_0x3fab7f){if(_0x3fab7f){_0x4ec18d=_0x3fab7f;_0x4bc8cf[_0x3e9b('0x29')]=_['keys'](db[_0x3e9b('0x46')][_0x3e9b('0x41')]);_0x4bc8cf[_0x3e9b('0x2d')]=_['keys'](_0x4631e4[_0x3e9b('0x2d')]);_0x4bc8cf[_0x3e9b('0x35')]=_[_0x3e9b('0x2c')](_0x4bc8cf[_0x3e9b('0x29')],_0x4bc8cf[_0x3e9b('0x2d')]);_0x35c464['attributes']=_['intersection'](_0x4bc8cf['model'],qs[_0x3e9b('0x2f')](_0x4631e4['query'][_0x3e9b('0x2f')]));_0x35c464[_0x3e9b('0x2e')]=_0x35c464['attributes'][_0x3e9b('0x30')]?_0x35c464['attributes']:_0x4bc8cf['model'];_0x35c464[_0x3e9b('0x33')]=qs[_0x3e9b('0x47')](_0x4631e4[_0x3e9b('0x2d')]['sort']);_0x35c464[_0x3e9b('0x34')]=qs[_0x3e9b('0x35')](_[_0x3e9b('0x48')](_0x4631e4[_0x3e9b('0x2d')],_0x4bc8cf['filters']));if(_0x4631e4[_0x3e9b('0x2d')]['filter']){_0x35c464[_0x3e9b('0x34')]=_[_0x3e9b('0x37')](_0x35c464[_0x3e9b('0x34')],{'$or':_[_0x3e9b('0x2a')](_0x35c464[_0x3e9b('0x2e')],function(_0x386fe0){var _0xb3300={};_0xb3300[_0x386fe0]={'$like':'%'+_0x4631e4[_0x3e9b('0x2d')][_0x3e9b('0x36')]+'%'};return _0xb3300;})});}_0x35c464=_['merge']({},_0x35c464,_0x4631e4[_0x3e9b('0x49')]);return _0x4ec18d['getFields'](_0x35c464);}})[_0x3e9b('0x3a')](function(_0x1db565){if(_0x1db565){_0x5b529f=_0x1db565[_0x3e9b('0x30')];if(!_0x4631e4[_0x3e9b('0x2d')][_0x3e9b('0x31')]('nolimit')){_0x35c464[_0x3e9b('0x1d')]=qs['limit'](_0x4631e4[_0x3e9b('0x2d')]['limit']);_0x35c464['offset']=qs[_0x3e9b('0x1b')](_0x4631e4[_0x3e9b('0x2d')][_0x3e9b('0x1b')]);}return _0x4ec18d[_0x3e9b('0x4a')](_0x35c464);}})[_0x3e9b('0x3a')](function(_0x5eaa01){if(_0x5eaa01){return _0x5eaa01?{'count':_0x5b529f,'rows':_0x5eaa01}:null;}})['then'](respondWithResult(_0x535c1b,null))[_0x3e9b('0x3e')](handleError(_0x535c1b,null));};exports[_0x3e9b('0x4b')]=function(_0x339ead,_0x368f27,_0x50e362){var _0x5df74c={};var _0x4498d2={};var _0x1bdc43;var _0x58476b;return db[_0x3e9b('0x39')]['findOne']({'where':{'id':_0x339ead['params']['id']}})[_0x3e9b('0x3a')](handleEntityNotFound(_0x368f27,null))[_0x3e9b('0x3a')](function(_0x56737b){if(_0x56737b){_0x1bdc43=_0x56737b;_0x4498d2['model']=_[_0x3e9b('0x2b')](db[_0x3e9b('0x46')][_0x3e9b('0x41')]);_0x4498d2[_0x3e9b('0x2d')]=_[_0x3e9b('0x2b')](_0x339ead['query']);_0x4498d2[_0x3e9b('0x35')]=_[_0x3e9b('0x2c')](_0x4498d2[_0x3e9b('0x29')],_0x4498d2[_0x3e9b('0x2d')]);_0x5df74c['attributes']=_[_0x3e9b('0x2c')](_0x4498d2['model'],qs['fields'](_0x339ead[_0x3e9b('0x2d')][_0x3e9b('0x2f')]));_0x5df74c[_0x3e9b('0x2e')]=_0x5df74c[_0x3e9b('0x2e')]['length']?_0x5df74c[_0x3e9b('0x2e')]:_0x4498d2['model'];_0x5df74c[_0x3e9b('0x33')]=qs[_0x3e9b('0x47')](_0x339ead[_0x3e9b('0x2d')][_0x3e9b('0x47')]);_0x5df74c[_0x3e9b('0x34')]=qs[_0x3e9b('0x35')](_['pick'](_0x339ead[_0x3e9b('0x2d')],_0x4498d2[_0x3e9b('0x35')]));if(_0x339ead[_0x3e9b('0x2d')][_0x3e9b('0x36')]){_0x5df74c[_0x3e9b('0x34')]=_[_0x3e9b('0x37')](_0x5df74c[_0x3e9b('0x34')],{'$or':_[_0x3e9b('0x2a')](_0x5df74c[_0x3e9b('0x2e')],function(_0x5975fd){var _0x58fd98={};_0x58fd98[_0x5975fd]={'$like':'%'+_0x339ead[_0x3e9b('0x2d')][_0x3e9b('0x36')]+'%'};return _0x58fd98;})});}_0x5df74c=_[_0x3e9b('0x37')]({},_0x5df74c,_0x339ead['options']);return _0x1bdc43[_0x3e9b('0x4b')](_0x5df74c);}})['then'](function(_0x275afb){if(_0x275afb){_0x58476b=_0x275afb['length'];if(!_0x339ead[_0x3e9b('0x2d')]['hasOwnProperty']('nolimit')){_0x5df74c[_0x3e9b('0x1d')]=qs[_0x3e9b('0x1d')](_0x339ead['query'][_0x3e9b('0x1d')]);_0x5df74c[_0x3e9b('0x1b')]=qs[_0x3e9b('0x1b')](_0x339ead[_0x3e9b('0x2d')][_0x3e9b('0x1b')]);}return _0x1bdc43['getSubjects'](_0x5df74c);}})[_0x3e9b('0x3a')](function(_0x4c0572){if(_0x4c0572){return _0x4c0572?{'count':_0x58476b,'rows':_0x4c0572}:null;}})[_0x3e9b('0x3a')](respondWithResult(_0x368f27,null))[_0x3e9b('0x3e')](handleError(_0x368f27,null));};exports[_0x3e9b('0x4c')]=function(_0x16c4cd,_0x1aecd,_0x13f5f0){var _0x2a9b71={};var _0x1fdb0a={};var _0x16052b;var _0x272059;return db[_0x3e9b('0x39')][_0x3e9b('0x4d')]({'where':{'id':_0x16c4cd[_0x3e9b('0x40')]['id']}})[_0x3e9b('0x3a')](handleEntityNotFound(_0x1aecd,null))[_0x3e9b('0x3a')](function(_0x16105c){if(_0x16105c){_0x16052b=_0x16105c;_0x1fdb0a['model']=_['keys'](db[_0x3e9b('0x46')]['rawAttributes']);_0x1fdb0a[_0x3e9b('0x2d')]=_[_0x3e9b('0x2b')](_0x16c4cd[_0x3e9b('0x2d')]);_0x1fdb0a[_0x3e9b('0x35')]=_[_0x3e9b('0x2c')](_0x1fdb0a['model'],_0x1fdb0a[_0x3e9b('0x2d')]);_0x2a9b71[_0x3e9b('0x2e')]=_[_0x3e9b('0x2c')](_0x1fdb0a[_0x3e9b('0x29')],qs[_0x3e9b('0x2f')](_0x16c4cd['query'][_0x3e9b('0x2f')]));_0x2a9b71[_0x3e9b('0x2e')]=_0x2a9b71[_0x3e9b('0x2e')][_0x3e9b('0x30')]?_0x2a9b71[_0x3e9b('0x2e')]:_0x1fdb0a['model'];_0x2a9b71[_0x3e9b('0x33')]=qs['sort'](_0x16c4cd['query'][_0x3e9b('0x47')]);_0x2a9b71[_0x3e9b('0x34')]=qs[_0x3e9b('0x35')](_[_0x3e9b('0x48')](_0x16c4cd['query'],_0x1fdb0a['filters']));if(_0x16c4cd['query'][_0x3e9b('0x36')]){_0x2a9b71['where']=_[_0x3e9b('0x37')](_0x2a9b71[_0x3e9b('0x34')],{'$or':_[_0x3e9b('0x2a')](_0x2a9b71[_0x3e9b('0x2e')],function(_0x20a871){var _0x1d5ad3={};_0x1d5ad3[_0x20a871]={'$like':'%'+_0x16c4cd[_0x3e9b('0x2d')]['filter']+'%'};return _0x1d5ad3;})});}_0x2a9b71=_[_0x3e9b('0x37')]({},_0x2a9b71,_0x16c4cd[_0x3e9b('0x49')]);return _0x16052b['getDescriptions'](_0x2a9b71);}})[_0x3e9b('0x3a')](function(_0x1f5ad6){if(_0x1f5ad6){_0x272059=_0x1f5ad6[_0x3e9b('0x30')];if(!_0x16c4cd[_0x3e9b('0x2d')][_0x3e9b('0x31')](_0x3e9b('0x32'))){_0x2a9b71[_0x3e9b('0x1d')]=qs['limit'](_0x16c4cd[_0x3e9b('0x2d')]['limit']);_0x2a9b71[_0x3e9b('0x1b')]=qs['offset'](_0x16c4cd[_0x3e9b('0x2d')][_0x3e9b('0x1b')]);}return _0x16052b['getDescriptions'](_0x2a9b71);}})[_0x3e9b('0x3a')](function(_0x4b6479){if(_0x4b6479){return _0x4b6479?{'count':_0x272059,'rows':_0x4b6479}:null;}})['then'](respondWithResult(_0x1aecd,null))[_0x3e9b('0x3e')](handleError(_0x1aecd,null));};exports[_0x3e9b('0x4e')]=function(_0x326e98,_0x59cdff,_0x45a2a0){var _0x433a7c={};var _0x15aa8f={};var _0x20e381;var _0x475f7f;return db[_0x3e9b('0x39')]['findOne']({'where':{'id':_0x326e98[_0x3e9b('0x40')]['id']}})['then'](handleEntityNotFound(_0x59cdff,null))[_0x3e9b('0x3a')](function(_0x4d3895){if(_0x4d3895){_0x20e381=_0x4d3895;_0x15aa8f[_0x3e9b('0x29')]=_[_0x3e9b('0x2b')](db[_0x3e9b('0x4f')]['rawAttributes']);_0x15aa8f[_0x3e9b('0x2d')]=_[_0x3e9b('0x2b')](_0x326e98[_0x3e9b('0x2d')]);_0x15aa8f['filters']=_[_0x3e9b('0x2c')](_0x15aa8f[_0x3e9b('0x29')],_0x15aa8f[_0x3e9b('0x2d')]);_0x433a7c[_0x3e9b('0x2e')]=_[_0x3e9b('0x2c')](_0x15aa8f[_0x3e9b('0x29')],qs[_0x3e9b('0x2f')](_0x326e98['query'][_0x3e9b('0x2f')]));_0x433a7c[_0x3e9b('0x2e')]=_0x433a7c['attributes'][_0x3e9b('0x30')]?_0x433a7c[_0x3e9b('0x2e')]:_0x15aa8f[_0x3e9b('0x29')];_0x433a7c[_0x3e9b('0x33')]=qs[_0x3e9b('0x47')](_0x326e98[_0x3e9b('0x2d')][_0x3e9b('0x47')]);_0x433a7c[_0x3e9b('0x34')]=qs['filters'](_[_0x3e9b('0x48')](_0x326e98[_0x3e9b('0x2d')],_0x15aa8f[_0x3e9b('0x35')]));if(_0x326e98[_0x3e9b('0x2d')]['filter']){_0x433a7c['where']=_['merge'](_0x433a7c[_0x3e9b('0x34')],{'$or':_['map'](_0x433a7c[_0x3e9b('0x2e')],function(_0x3965ad){var _0x3b31a4={};_0x3b31a4[_0x3965ad]={'$like':'%'+_0x326e98[_0x3e9b('0x2d')]['filter']+'%'};return _0x3b31a4;})});}_0x433a7c=_[_0x3e9b('0x37')]({},_0x433a7c,_0x326e98[_0x3e9b('0x49')]);return _0x20e381[_0x3e9b('0x4e')](_0x433a7c);}})['then'](function(_0x5a232e){if(_0x5a232e){_0x475f7f=_0x5a232e[_0x3e9b('0x30')];if(!_0x326e98[_0x3e9b('0x2d')]['hasOwnProperty'](_0x3e9b('0x32'))){_0x433a7c['limit']=qs[_0x3e9b('0x1d')](_0x326e98[_0x3e9b('0x2d')][_0x3e9b('0x1d')]);_0x433a7c[_0x3e9b('0x1b')]=qs[_0x3e9b('0x1b')](_0x326e98[_0x3e9b('0x2d')]['offset']);}return _0x20e381[_0x3e9b('0x4e')](_0x433a7c);}})['then'](function(_0x3c3bd9){if(_0x3c3bd9){return _0x3c3bd9?{'count':_0x475f7f,'rows':_0x3c3bd9}:null;}})[_0x3e9b('0x3a')](respondWithResult(_0x59cdff,null))[_0x3e9b('0x3e')](handleError(_0x59cdff,null));};exports[_0x3e9b('0x50')]=function(_0x50909b,_0x56ff2f,_0x147176){if(_0x50909b[_0x3e9b('0x44')]['id']){delete _0x50909b['body']['id'];}return db['FreshdeskConfiguration']['findOne']({'where':{'id':_0x50909b[_0x3e9b('0x40')]['id']}})['then'](handleEntityNotFound(_0x56ff2f,null))['then'](function(_0x82e969){if(_0x82e969){return _0x82e969['setTags'](_0x50909b[_0x3e9b('0x44')]['ids']||[]);}return null;})[_0x3e9b('0x3a')](respondWithResult(_0x56ff2f,null))[_0x3e9b('0x3e')](handleError(_0x56ff2f,null));};
\ No newline at end of file
+var _0x509e=['rows','catch','show','include','options','find','create','body','params','destroy','findOne','FreshdeskField','nolimit','getFields','getSubjects','getDescriptions','getTags','Tag','setTags','zip-dir','request-promise','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','Content-Range','update','then','sendStatus','error','stack','send','index','map','FreshdeskConfiguration','rawAttributes','fieldName','type','key','model','name','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','order','sort','where','pick','merge','VIRTUAL','filter','includeAll','findAll'];(function(_0xba7593,_0x1593c6){var _0x439229=function(_0x51d82c){while(--_0x51d82c){_0xba7593['push'](_0xba7593['shift']());}};_0x439229(++_0x1593c6);}(_0x509e,0xb5));var _0xe509=function(_0xf3e2f6,_0x3953c2){_0xf3e2f6=_0xf3e2f6-0x0;var _0x48dbad=_0x509e[_0xf3e2f6];return _0x48dbad;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xe509('0x0'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe509('0x1'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xe509('0x2'));var util=require(_0xe509('0x3'));var path=require(_0xe509('0x4'));var sox=require(_0xe509('0x5'));var csv=require(_0xe509('0x6'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xe509('0x7'));var _=require(_0xe509('0x8'));var squel=require(_0xe509('0x9'));var crypto=require('crypto');var jsforce=require(_0xe509('0xa'));var deskjs=require('desk.js');var toCsv=require(_0xe509('0x6'));var querystring=require(_0xe509('0xb'));var Papa=require(_0xe509('0xc'));var Redis=require(_0xe509('0xd'));var authService=require(_0xe509('0xe'));var qs=require(_0xe509('0xf'));var as=require(_0xe509('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xe509('0x11'))(_0xe509('0x12'));var utils=require('../../config/utils');var config=require(_0xe509('0x13'));var licenseUtil=require(_0xe509('0x14'));var db=require(_0xe509('0x15'))['db'];function respondWithStatusCode(_0x21c47b,_0x5cec30){_0x5cec30=_0x5cec30||0xcc;return function(_0x302ffe){if(_0x302ffe){return _0x21c47b['sendStatus'](_0x5cec30);}return _0x21c47b[_0xe509('0x16')](_0x5cec30)[_0xe509('0x17')]();};}function respondWithResult(_0x2fbfd1,_0x5ec285){_0x5ec285=_0x5ec285||0xc8;return function(_0x4e1375){if(_0x4e1375){return _0x2fbfd1[_0xe509('0x16')](_0x5ec285)[_0xe509('0x18')](_0x4e1375);}};}function respondWithFilteredResult(_0x1b03aa,_0x279eb1){return function(_0x560074){if(_0x560074){var _0x12a519=typeof _0x279eb1[_0xe509('0x19')]===_0xe509('0x1a')&&typeof _0x279eb1[_0xe509('0x1b')]===_0xe509('0x1a');var _0x444cf0=_0x560074[_0xe509('0x1c')];var _0x3ab1ab=_0x12a519?0x0:_0x279eb1[_0xe509('0x19')];var _0x1f38f7=_0x12a519?_0x560074['count']:_0x279eb1[_0xe509('0x19')]+_0x279eb1['limit'];var _0x9edaa2;if(_0x1f38f7>=_0x444cf0){_0x1f38f7=_0x444cf0;_0x9edaa2=0xc8;}else{_0x9edaa2=0xce;}_0x1b03aa[_0xe509('0x16')](_0x9edaa2);return _0x1b03aa['set'](_0xe509('0x1d'),_0x3ab1ab+'-'+_0x1f38f7+'/'+_0x444cf0)[_0xe509('0x18')](_0x560074);}return null;};}function patchUpdates(_0x2346c7){return function(_0x4150a1){try{jsonpatch['apply'](_0x4150a1,_0x2346c7,!![]);}catch(_0x34df79){return BPromise['reject'](_0x34df79);}return _0x4150a1['save']();};}function saveUpdates(_0x20123e,_0x1ce5f5){return function(_0x4d2e94){if(_0x4d2e94){return _0x4d2e94[_0xe509('0x1e')](_0x20123e)[_0xe509('0x1f')](function(_0x32fdf8){return _0x32fdf8;});}return null;};}function removeEntity(_0x2bdad0,_0x5849fb){return function(_0x2a47b3){if(_0x2a47b3){return _0x2a47b3['destroy']()[_0xe509('0x1f')](function(){_0x2bdad0[_0xe509('0x16')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3665f0,_0x4026e2){return function(_0x4a7be6){if(!_0x4a7be6){_0x3665f0[_0xe509('0x20')](0x194);}return _0x4a7be6;};}function handleError(_0x59b4a4,_0x241ed1){_0x241ed1=_0x241ed1||0x1f4;return function(_0x6b376e){logger[_0xe509('0x21')](_0x6b376e[_0xe509('0x22')]);if(_0x6b376e['name']){delete _0x6b376e['name'];}_0x59b4a4[_0xe509('0x16')](_0x241ed1)[_0xe509('0x23')](_0x6b376e);};}exports[_0xe509('0x24')]=function(_0x574a89,_0x147adf){var _0x2f5e27={},_0xd8cb9={},_0x3c6d3c={'count':0x0,'rows':[]};var _0x17c73b=_[_0xe509('0x25')](db[_0xe509('0x26')][_0xe509('0x27')],function(_0x59cdb1){return{'name':_0x59cdb1[_0xe509('0x28')],'type':_0x59cdb1[_0xe509('0x29')][_0xe509('0x2a')]};});_0xd8cb9[_0xe509('0x2b')]=_[_0xe509('0x25')](_0x17c73b,_0xe509('0x2c'));_0xd8cb9[_0xe509('0x2d')]=_[_0xe509('0x2e')](_0x574a89['query']);_0xd8cb9[_0xe509('0x2f')]=_[_0xe509('0x30')](_0xd8cb9[_0xe509('0x2b')],_0xd8cb9['query']);_0x2f5e27['attributes']=_[_0xe509('0x30')](_0xd8cb9[_0xe509('0x2b')],qs[_0xe509('0x31')](_0x574a89['query'][_0xe509('0x31')]));_0x2f5e27[_0xe509('0x32')]=_0x2f5e27[_0xe509('0x32')][_0xe509('0x33')]?_0x2f5e27[_0xe509('0x32')]:_0xd8cb9['model'];if(!_0x574a89['query'][_0xe509('0x34')]('nolimit')){_0x2f5e27[_0xe509('0x1b')]=qs[_0xe509('0x1b')](_0x574a89[_0xe509('0x2d')][_0xe509('0x1b')]);_0x2f5e27['offset']=qs[_0xe509('0x19')](_0x574a89[_0xe509('0x2d')][_0xe509('0x19')]);}_0x2f5e27[_0xe509('0x35')]=qs[_0xe509('0x36')](_0x574a89[_0xe509('0x2d')]['sort']);_0x2f5e27[_0xe509('0x37')]=qs[_0xe509('0x2f')](_[_0xe509('0x38')](_0x574a89[_0xe509('0x2d')],_0xd8cb9['filters']),_0x17c73b);if(_0x574a89[_0xe509('0x2d')]['filter']){_0x2f5e27[_0xe509('0x37')]=_[_0xe509('0x39')](_0x2f5e27[_0xe509('0x37')],{'$or':_[_0xe509('0x25')](_0x17c73b,function(_0x12cdfd){if(_0x12cdfd['type']!==_0xe509('0x3a')){var _0x2f9aee={};_0x2f9aee[_0x12cdfd[_0xe509('0x2c')]]={'$like':'%'+_0x574a89[_0xe509('0x2d')][_0xe509('0x3b')]+'%'};return _0x2f9aee;}})});}_0x2f5e27=_[_0xe509('0x39')]({},_0x2f5e27,_0x574a89['options']);var _0x49ce3d={'where':_0x2f5e27['where']};return db['FreshdeskConfiguration'][_0xe509('0x1c')](_0x49ce3d)[_0xe509('0x1f')](function(_0x6413a1){_0x3c6d3c[_0xe509('0x1c')]=_0x6413a1;if(_0x574a89[_0xe509('0x2d')][_0xe509('0x3c')]){_0x2f5e27['include']=[{'all':!![]}];}return db[_0xe509('0x26')][_0xe509('0x3d')](_0x2f5e27);})[_0xe509('0x1f')](function(_0x5dcccd){_0x3c6d3c[_0xe509('0x3e')]=_0x5dcccd;return _0x3c6d3c;})[_0xe509('0x1f')](respondWithFilteredResult(_0x147adf,_0x2f5e27))[_0xe509('0x3f')](handleError(_0x147adf,null));};exports[_0xe509('0x40')]=function(_0x1bb438,_0xa044c5){var _0x237ec9={'raw':![],'where':{'id':_0x1bb438['params']['id']}},_0x346d53={};_0x346d53[_0xe509('0x2b')]=_[_0xe509('0x2e')](db[_0xe509('0x26')]['rawAttributes']);_0x346d53[_0xe509('0x2d')]=_[_0xe509('0x2e')](_0x1bb438[_0xe509('0x2d')]);_0x346d53[_0xe509('0x2f')]=_['intersection'](_0x346d53[_0xe509('0x2b')],_0x346d53['query']);_0x237ec9[_0xe509('0x32')]=_[_0xe509('0x30')](_0x346d53[_0xe509('0x2b')],qs[_0xe509('0x31')](_0x1bb438['query'][_0xe509('0x31')]));_0x237ec9[_0xe509('0x32')]=_0x237ec9[_0xe509('0x32')][_0xe509('0x33')]?_0x237ec9['attributes']:_0x346d53[_0xe509('0x2b')];if(_0x1bb438[_0xe509('0x2d')]['includeAll']){_0x237ec9[_0xe509('0x41')]=[{'all':!![]}];}_0x237ec9=_[_0xe509('0x39')]({},_0x237ec9,_0x1bb438[_0xe509('0x42')]);return db[_0xe509('0x26')][_0xe509('0x43')](_0x237ec9)[_0xe509('0x1f')](handleEntityNotFound(_0xa044c5,null))[_0xe509('0x1f')](respondWithResult(_0xa044c5,null))[_0xe509('0x3f')](handleError(_0xa044c5,null));};exports[_0xe509('0x44')]=function(_0x3951f7,_0x1be597){return db[_0xe509('0x26')][_0xe509('0x44')](_0x3951f7[_0xe509('0x45')],{})['then'](respondWithResult(_0x1be597,0xc9))[_0xe509('0x3f')](handleError(_0x1be597,null));};exports['update']=function(_0x4ba1d5,_0x266556){if(_0x4ba1d5['body']['id']){delete _0x4ba1d5[_0xe509('0x45')]['id'];}return db[_0xe509('0x26')]['find']({'where':{'id':_0x4ba1d5[_0xe509('0x46')]['id']}})[_0xe509('0x1f')](handleEntityNotFound(_0x266556,null))[_0xe509('0x1f')](saveUpdates(_0x4ba1d5[_0xe509('0x45')],null))[_0xe509('0x1f')](respondWithResult(_0x266556,null))[_0xe509('0x3f')](handleError(_0x266556,null));};exports[_0xe509('0x47')]=function(_0x34fcaf,_0xa5cbe8){return db[_0xe509('0x26')][_0xe509('0x43')]({'where':{'id':_0x34fcaf[_0xe509('0x46')]['id']}})[_0xe509('0x1f')](handleEntityNotFound(_0xa5cbe8,null))['then'](removeEntity(_0xa5cbe8,null))[_0xe509('0x3f')](handleError(_0xa5cbe8,null));};exports['getFields']=function(_0x5ac3cd,_0xc9e3db,_0x2c3a09){var _0x45acbb={};var _0x405afc={};var _0x53b81d;var _0x536b3c;return db[_0xe509('0x26')][_0xe509('0x48')]({'where':{'id':_0x5ac3cd['params']['id']}})[_0xe509('0x1f')](handleEntityNotFound(_0xc9e3db,null))[_0xe509('0x1f')](function(_0x1c35c4){if(_0x1c35c4){_0x53b81d=_0x1c35c4;_0x405afc[_0xe509('0x2b')]=_['keys'](db[_0xe509('0x49')][_0xe509('0x27')]);_0x405afc['query']=_[_0xe509('0x2e')](_0x5ac3cd['query']);_0x405afc['filters']=_[_0xe509('0x30')](_0x405afc[_0xe509('0x2b')],_0x405afc[_0xe509('0x2d')]);_0x45acbb[_0xe509('0x32')]=_[_0xe509('0x30')](_0x405afc['model'],qs[_0xe509('0x31')](_0x5ac3cd[_0xe509('0x2d')][_0xe509('0x31')]));_0x45acbb['attributes']=_0x45acbb[_0xe509('0x32')]['length']?_0x45acbb['attributes']:_0x405afc['model'];_0x45acbb[_0xe509('0x35')]=qs['sort'](_0x5ac3cd[_0xe509('0x2d')][_0xe509('0x36')]);_0x45acbb[_0xe509('0x37')]=qs[_0xe509('0x2f')](_[_0xe509('0x38')](_0x5ac3cd[_0xe509('0x2d')],_0x405afc['filters']));if(_0x5ac3cd[_0xe509('0x2d')][_0xe509('0x3b')]){_0x45acbb[_0xe509('0x37')]=_[_0xe509('0x39')](_0x45acbb[_0xe509('0x37')],{'$or':_[_0xe509('0x25')](_0x45acbb[_0xe509('0x32')],function(_0x249e09){var _0x5583e2={};_0x5583e2[_0x249e09]={'$like':'%'+_0x5ac3cd[_0xe509('0x2d')][_0xe509('0x3b')]+'%'};return _0x5583e2;})});}_0x45acbb=_[_0xe509('0x39')]({},_0x45acbb,_0x5ac3cd[_0xe509('0x42')]);return _0x53b81d['getFields'](_0x45acbb);}})['then'](function(_0x21a06d){if(_0x21a06d){_0x536b3c=_0x21a06d['length'];if(!_0x5ac3cd[_0xe509('0x2d')][_0xe509('0x34')](_0xe509('0x4a'))){_0x45acbb[_0xe509('0x1b')]=qs[_0xe509('0x1b')](_0x5ac3cd[_0xe509('0x2d')][_0xe509('0x1b')]);_0x45acbb[_0xe509('0x19')]=qs[_0xe509('0x19')](_0x5ac3cd[_0xe509('0x2d')][_0xe509('0x19')]);}return _0x53b81d[_0xe509('0x4b')](_0x45acbb);}})['then'](function(_0x31bd53){if(_0x31bd53){return _0x31bd53?{'count':_0x536b3c,'rows':_0x31bd53}:null;}})[_0xe509('0x1f')](respondWithResult(_0xc9e3db,null))[_0xe509('0x3f')](handleError(_0xc9e3db,null));};exports[_0xe509('0x4c')]=function(_0x5af0d4,_0x402c8d,_0x348a58){var _0x1ab068={};var _0x59ecd0={};var _0x4fd84a;var _0x365e0b;return db['FreshdeskConfiguration'][_0xe509('0x48')]({'where':{'id':_0x5af0d4[_0xe509('0x46')]['id']}})[_0xe509('0x1f')](handleEntityNotFound(_0x402c8d,null))['then'](function(_0x41bdd6){if(_0x41bdd6){_0x4fd84a=_0x41bdd6;_0x59ecd0[_0xe509('0x2b')]=_[_0xe509('0x2e')](db[_0xe509('0x49')][_0xe509('0x27')]);_0x59ecd0[_0xe509('0x2d')]=_[_0xe509('0x2e')](_0x5af0d4['query']);_0x59ecd0[_0xe509('0x2f')]=_[_0xe509('0x30')](_0x59ecd0[_0xe509('0x2b')],_0x59ecd0['query']);_0x1ab068[_0xe509('0x32')]=_[_0xe509('0x30')](_0x59ecd0[_0xe509('0x2b')],qs[_0xe509('0x31')](_0x5af0d4[_0xe509('0x2d')][_0xe509('0x31')]));_0x1ab068['attributes']=_0x1ab068[_0xe509('0x32')][_0xe509('0x33')]?_0x1ab068['attributes']:_0x59ecd0[_0xe509('0x2b')];_0x1ab068[_0xe509('0x35')]=qs[_0xe509('0x36')](_0x5af0d4['query'][_0xe509('0x36')]);_0x1ab068[_0xe509('0x37')]=qs['filters'](_[_0xe509('0x38')](_0x5af0d4[_0xe509('0x2d')],_0x59ecd0[_0xe509('0x2f')]));if(_0x5af0d4['query'][_0xe509('0x3b')]){_0x1ab068[_0xe509('0x37')]=_[_0xe509('0x39')](_0x1ab068[_0xe509('0x37')],{'$or':_['map'](_0x1ab068['attributes'],function(_0x974e60){var _0x44008c={};_0x44008c[_0x974e60]={'$like':'%'+_0x5af0d4[_0xe509('0x2d')][_0xe509('0x3b')]+'%'};return _0x44008c;})});}_0x1ab068=_['merge']({},_0x1ab068,_0x5af0d4[_0xe509('0x42')]);return _0x4fd84a[_0xe509('0x4c')](_0x1ab068);}})[_0xe509('0x1f')](function(_0x9a6d43){if(_0x9a6d43){_0x365e0b=_0x9a6d43[_0xe509('0x33')];if(!_0x5af0d4[_0xe509('0x2d')][_0xe509('0x34')]('nolimit')){_0x1ab068[_0xe509('0x1b')]=qs[_0xe509('0x1b')](_0x5af0d4['query'][_0xe509('0x1b')]);_0x1ab068[_0xe509('0x19')]=qs['offset'](_0x5af0d4[_0xe509('0x2d')]['offset']);}return _0x4fd84a['getSubjects'](_0x1ab068);}})[_0xe509('0x1f')](function(_0x3fabe7){if(_0x3fabe7){return _0x3fabe7?{'count':_0x365e0b,'rows':_0x3fabe7}:null;}})[_0xe509('0x1f')](respondWithResult(_0x402c8d,null))[_0xe509('0x3f')](handleError(_0x402c8d,null));};exports[_0xe509('0x4d')]=function(_0x4bcd3b,_0x344f17,_0xcae0b8){var _0x597f20={};var _0x1a0ce7={};var _0x274334;var _0x65703d;return db[_0xe509('0x26')][_0xe509('0x48')]({'where':{'id':_0x4bcd3b[_0xe509('0x46')]['id']}})['then'](handleEntityNotFound(_0x344f17,null))['then'](function(_0x1cf502){if(_0x1cf502){_0x274334=_0x1cf502;_0x1a0ce7[_0xe509('0x2b')]=_[_0xe509('0x2e')](db[_0xe509('0x49')][_0xe509('0x27')]);_0x1a0ce7[_0xe509('0x2d')]=_['keys'](_0x4bcd3b[_0xe509('0x2d')]);_0x1a0ce7[_0xe509('0x2f')]=_[_0xe509('0x30')](_0x1a0ce7['model'],_0x1a0ce7[_0xe509('0x2d')]);_0x597f20[_0xe509('0x32')]=_['intersection'](_0x1a0ce7[_0xe509('0x2b')],qs[_0xe509('0x31')](_0x4bcd3b[_0xe509('0x2d')][_0xe509('0x31')]));_0x597f20['attributes']=_0x597f20[_0xe509('0x32')][_0xe509('0x33')]?_0x597f20[_0xe509('0x32')]:_0x1a0ce7['model'];_0x597f20['order']=qs[_0xe509('0x36')](_0x4bcd3b[_0xe509('0x2d')][_0xe509('0x36')]);_0x597f20[_0xe509('0x37')]=qs[_0xe509('0x2f')](_[_0xe509('0x38')](_0x4bcd3b[_0xe509('0x2d')],_0x1a0ce7[_0xe509('0x2f')]));if(_0x4bcd3b[_0xe509('0x2d')][_0xe509('0x3b')]){_0x597f20[_0xe509('0x37')]=_[_0xe509('0x39')](_0x597f20[_0xe509('0x37')],{'$or':_[_0xe509('0x25')](_0x597f20[_0xe509('0x32')],function(_0x147d4b){var _0x521ecc={};_0x521ecc[_0x147d4b]={'$like':'%'+_0x4bcd3b[_0xe509('0x2d')][_0xe509('0x3b')]+'%'};return _0x521ecc;})});}_0x597f20=_['merge']({},_0x597f20,_0x4bcd3b[_0xe509('0x42')]);return _0x274334[_0xe509('0x4d')](_0x597f20);}})[_0xe509('0x1f')](function(_0x9949a5){if(_0x9949a5){_0x65703d=_0x9949a5[_0xe509('0x33')];if(!_0x4bcd3b[_0xe509('0x2d')][_0xe509('0x34')]('nolimit')){_0x597f20[_0xe509('0x1b')]=qs[_0xe509('0x1b')](_0x4bcd3b['query'][_0xe509('0x1b')]);_0x597f20[_0xe509('0x19')]=qs[_0xe509('0x19')](_0x4bcd3b['query'][_0xe509('0x19')]);}return _0x274334['getDescriptions'](_0x597f20);}})[_0xe509('0x1f')](function(_0x30605b){if(_0x30605b){return _0x30605b?{'count':_0x65703d,'rows':_0x30605b}:null;}})[_0xe509('0x1f')](respondWithResult(_0x344f17,null))[_0xe509('0x3f')](handleError(_0x344f17,null));};exports[_0xe509('0x4e')]=function(_0x58ac15,_0x14dc1d,_0x1c11d2){var _0x2693bb={};var _0x2bea7b={};var _0x599791;var _0x5bbb56;return db[_0xe509('0x26')][_0xe509('0x48')]({'where':{'id':_0x58ac15[_0xe509('0x46')]['id']}})['then'](handleEntityNotFound(_0x14dc1d,null))[_0xe509('0x1f')](function(_0x36dbbb){if(_0x36dbbb){_0x599791=_0x36dbbb;_0x2bea7b[_0xe509('0x2b')]=_[_0xe509('0x2e')](db[_0xe509('0x4f')][_0xe509('0x27')]);_0x2bea7b[_0xe509('0x2d')]=_[_0xe509('0x2e')](_0x58ac15[_0xe509('0x2d')]);_0x2bea7b[_0xe509('0x2f')]=_['intersection'](_0x2bea7b[_0xe509('0x2b')],_0x2bea7b[_0xe509('0x2d')]);_0x2693bb[_0xe509('0x32')]=_[_0xe509('0x30')](_0x2bea7b[_0xe509('0x2b')],qs[_0xe509('0x31')](_0x58ac15[_0xe509('0x2d')][_0xe509('0x31')]));_0x2693bb['attributes']=_0x2693bb[_0xe509('0x32')][_0xe509('0x33')]?_0x2693bb[_0xe509('0x32')]:_0x2bea7b[_0xe509('0x2b')];_0x2693bb[_0xe509('0x35')]=qs[_0xe509('0x36')](_0x58ac15['query'][_0xe509('0x36')]);_0x2693bb[_0xe509('0x37')]=qs['filters'](_[_0xe509('0x38')](_0x58ac15[_0xe509('0x2d')],_0x2bea7b[_0xe509('0x2f')]));if(_0x58ac15[_0xe509('0x2d')][_0xe509('0x3b')]){_0x2693bb[_0xe509('0x37')]=_[_0xe509('0x39')](_0x2693bb[_0xe509('0x37')],{'$or':_['map'](_0x2693bb[_0xe509('0x32')],function(_0x383b57){var _0x3de9db={};_0x3de9db[_0x383b57]={'$like':'%'+_0x58ac15['query'][_0xe509('0x3b')]+'%'};return _0x3de9db;})});}_0x2693bb=_[_0xe509('0x39')]({},_0x2693bb,_0x58ac15['options']);return _0x599791[_0xe509('0x4e')](_0x2693bb);}})[_0xe509('0x1f')](function(_0x434d85){if(_0x434d85){_0x5bbb56=_0x434d85[_0xe509('0x33')];if(!_0x58ac15['query']['hasOwnProperty'](_0xe509('0x4a'))){_0x2693bb[_0xe509('0x1b')]=qs['limit'](_0x58ac15[_0xe509('0x2d')][_0xe509('0x1b')]);_0x2693bb[_0xe509('0x19')]=qs[_0xe509('0x19')](_0x58ac15[_0xe509('0x2d')][_0xe509('0x19')]);}return _0x599791['getTags'](_0x2693bb);}})[_0xe509('0x1f')](function(_0xa3c60e){if(_0xa3c60e){return _0xa3c60e?{'count':_0x5bbb56,'rows':_0xa3c60e}:null;}})[_0xe509('0x1f')](respondWithResult(_0x14dc1d,null))[_0xe509('0x3f')](handleError(_0x14dc1d,null));};exports[_0xe509('0x50')]=function(_0x405e7e,_0x402060,_0x5c85e8){if(_0x405e7e[_0xe509('0x45')]['id']){delete _0x405e7e['body']['id'];}return db['FreshdeskConfiguration'][_0xe509('0x48')]({'where':{'id':_0x405e7e['params']['id']}})['then'](handleEntityNotFound(_0x402060,null))['then'](function(_0x4bf9d2){if(_0x4bf9d2){return _0x4bf9d2[_0xe509('0x50')](_0x405e7e[_0xe509('0x45')]['ids']||[]);}return null;})['then'](respondWithResult(_0x402060,null))['catch'](handleError(_0x402060,null));};
\ No newline at end of file
index 520f3e6..79538cf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc59d=['util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','exports','define'];(function(_0x19eddf,_0x3b50cf){var _0x1c10f6=function(_0x171010){while(--_0x171010){_0x19eddf['push'](_0x19eddf['shift']());}};_0x1c10f6(++_0x3b50cf);}(_0xc59d,0xe6));var _0xdc59=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0xc59d[_0x19e35c];return _0x3e1fe8;};'use strict';var _=require('lodash');var util=require(_0xdc59('0x0'));var logger=require(_0xdc59('0x1'))(_0xdc59('0x2'));var moment=require(_0xdc59('0x3'));var BPromise=require(_0xdc59('0x4'));var rp=require(_0xdc59('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xdc59('0x6'));var config=require(_0xdc59('0x7'));var attributes=require('./intFreshdeskConfiguration.attributes');module[_0xdc59('0x8')]=function(_0x3dbafa,_0xace16a){return _0x3dbafa[_0xdc59('0x9')]('FreshdeskConfiguration',attributes,{'tableName':'int_freshdesk_configurations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x482f=['bluebird','request-promise','path','../../config/environment','./intFreshdeskConfiguration.attributes','exports','define','int_freshdesk_configurations','lodash','../../config/logger','api','moment'];(function(_0x1451d1,_0x2b6a56){var _0x4c848e=function(_0x10c32c){while(--_0x10c32c){_0x1451d1['push'](_0x1451d1['shift']());}};_0x4c848e(++_0x2b6a56);}(_0x482f,0x1ac));var _0xf482=function(_0x1f1c0e,_0x5154fd){_0x1f1c0e=_0x1f1c0e-0x0;var _0xf7436a=_0x482f[_0x1f1c0e];return _0xf7436a;};'use strict';var _=require(_0xf482('0x0'));var util=require('util');var logger=require(_0xf482('0x1'))(_0xf482('0x2'));var moment=require(_0xf482('0x3'));var BPromise=require(_0xf482('0x4'));var rp=require(_0xf482('0x5'));var fs=require('fs');var path=require(_0xf482('0x6'));var rimraf=require('rimraf');var config=require(_0xf482('0x7'));var attributes=require(_0xf482('0x8'));module[_0xf482('0x9')]=function(_0x4747c6,_0x35e2af){return _0x4747c6[_0xf482('0xa')]('FreshdeskConfiguration',attributes,{'tableName':_0xf482('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 3bc456f..74ba10d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf5fb=['ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','FreshdeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','FreshdeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','randomstring'];(function(_0xfcc655,_0xb0c31){var _0x1c7b22=function(_0x24a324){while(--_0x24a324){_0xfcc655['push'](_0xfcc655['shift']());}};_0x1c7b22(++_0xb0c31);}(_0xf5fb,0x11d));var _0xbf5f=function(_0x2a35be,_0xf6e375){_0x2a35be=_0x2a35be-0x0;var _0x4ebc40=_0xf5fb[_0x2a35be];return _0x4ebc40;};'use strict';var _=require(_0xbf5f('0x0'));var util=require(_0xbf5f('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xbf5f('0x2'));var fs=require('fs');var Redis=require(_0xbf5f('0x3'));var db=require(_0xbf5f('0x4'))['db'];var utils=require(_0xbf5f('0x5'));var logger=require(_0xbf5f('0x6'))('rpc');var config=require(_0xbf5f('0x7'));var jayson=require(_0xbf5f('0x8'));var client=jayson[_0xbf5f('0x9')][_0xbf5f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3beaf3,_0x28d3d0,_0x402733){return new BPromise(function(_0x2a6539,_0x1336f1){return client[_0xbf5f('0xb')](_0x3beaf3,_0x402733)[_0xbf5f('0xc')](function(_0x5c68b4){logger[_0xbf5f('0xd')](_0xbf5f('0xe'),_0x28d3d0,_0xbf5f('0xf'));logger[_0xbf5f('0x10')](_0xbf5f('0x11'),_0x28d3d0,_0xbf5f('0xf'),JSON[_0xbf5f('0x12')](_0x5c68b4));if(_0x5c68b4[_0xbf5f('0x13')]){if(_0x5c68b4['error'][_0xbf5f('0x14')]===0x1f4){logger[_0xbf5f('0x13')](_0xbf5f('0xe'),_0x28d3d0,_0x5c68b4[_0xbf5f('0x13')][_0xbf5f('0x15')]);return _0x1336f1(_0x5c68b4[_0xbf5f('0x13')]['message']);}logger['error'](_0xbf5f('0xe'),_0x28d3d0,_0x5c68b4['error'][_0xbf5f('0x15')]);return _0x2a6539(_0x5c68b4['error'][_0xbf5f('0x15')]);}else{logger[_0xbf5f('0xd')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x28d3d0,'request\x20sent');_0x2a6539(_0x5c68b4[_0xbf5f('0x16')][_0xbf5f('0x15')]);}})[_0xbf5f('0x17')](function(_0x4fe910){logger[_0xbf5f('0x13')](_0xbf5f('0xe'),_0x28d3d0,_0x4fe910);_0x1336f1(_0x4fe910);});});}
\ No newline at end of file
+var _0xcd0f=['code','message','FreshdeskConfiguration,\x20%s,\x20%s','result','catch','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','info','debug','FreshdeskConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error'];(function(_0x5ed099,_0x304e8a){var _0x46e1d7=function(_0x2b57f1){while(--_0x2b57f1){_0x5ed099['push'](_0x5ed099['shift']());}};_0x46e1d7(++_0x304e8a);}(_0xcd0f,0x147));var _0xfcd0=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xcd0f[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0xfcd0('0x0'));var util=require('util');var moment=require(_0xfcd0('0x1'));var BPromise=require('bluebird');var rs=require(_0xfcd0('0x2'));var fs=require('fs');var Redis=require(_0xfcd0('0x3'));var db=require(_0xfcd0('0x4'))['db'];var utils=require(_0xfcd0('0x5'));var logger=require('../../config/logger')(_0xfcd0('0x6'));var config=require(_0xfcd0('0x7'));var jayson=require(_0xfcd0('0x8'));var client=jayson[_0xfcd0('0x9')][_0xfcd0('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4e9946,_0x474c1c,_0x1644f5){return new BPromise(function(_0x5310a6,_0x1c0825){return client[_0xfcd0('0xb')](_0x4e9946,_0x1644f5)['then'](function(_0x176cda){logger[_0xfcd0('0xc')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x474c1c,'request\x20sent');logger[_0xfcd0('0xd')](_0xfcd0('0xe'),_0x474c1c,_0xfcd0('0xf'),JSON[_0xfcd0('0x10')](_0x176cda));if(_0x176cda[_0xfcd0('0x11')]){if(_0x176cda['error'][_0xfcd0('0x12')]===0x1f4){logger[_0xfcd0('0x11')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x474c1c,_0x176cda[_0xfcd0('0x11')][_0xfcd0('0x13')]);return _0x1c0825(_0x176cda[_0xfcd0('0x11')][_0xfcd0('0x13')]);}logger[_0xfcd0('0x11')](_0xfcd0('0x14'),_0x474c1c,_0x176cda[_0xfcd0('0x11')][_0xfcd0('0x13')]);return _0x5310a6(_0x176cda[_0xfcd0('0x11')][_0xfcd0('0x13')]);}else{logger['info']('FreshdeskConfiguration,\x20%s,\x20%s',_0x474c1c,_0xfcd0('0xf'));_0x5310a6(_0x176cda[_0xfcd0('0x15')][_0xfcd0('0x13')]);}})[_0xfcd0('0x16')](function(_0x227ce0){logger[_0xfcd0('0x11')](_0xfcd0('0x14'),_0x474c1c,_0x227ce0);_0x1c0825(_0x227ce0);});});}
\ No newline at end of file
index 9bde4e1..8fe8b1f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1d31=['isAuthenticated','index','/:id','show','post','create','put','update','destroy','exports','multer','util','path','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intFreshdeskField.controller'];(function(_0xe1f268,_0x2150ab){var _0x572864=function(_0x4727b0){while(--_0x4727b0){_0xe1f268['push'](_0xe1f268['shift']());}};_0x572864(++_0x2150ab);}(_0x1d31,0xa2));var _0x11d3=function(_0x7791d5,_0xdab65f){_0x7791d5=_0x7791d5-0x0;var _0x5ce288=_0x1d31[_0x7791d5];return _0x5ce288;};'use strict';var multer=require(_0x11d3('0x0'));var util=require(_0x11d3('0x1'));var path=require(_0x11d3('0x2'));var timeout=require('connect-timeout');var express=require(_0x11d3('0x3'));var router=express['Router']();var fs_extra=require(_0x11d3('0x4'));var auth=require(_0x11d3('0x5'));var interaction=require(_0x11d3('0x6'));var config=require(_0x11d3('0x7'));var controller=require(_0x11d3('0x8'));router['get']('/',auth[_0x11d3('0x9')](),controller[_0x11d3('0xa')]);router['get'](_0x11d3('0xb'),auth[_0x11d3('0x9')](),controller[_0x11d3('0xc')]);router[_0x11d3('0xd')]('/',auth[_0x11d3('0x9')](),controller[_0x11d3('0xe')]);router[_0x11d3('0xf')]('/:id',auth[_0x11d3('0x9')](),controller[_0x11d3('0x10')]);router['delete']('/:id',auth[_0x11d3('0x9')](),controller[_0x11d3('0x11')]);module[_0x11d3('0x12')]=router;
\ No newline at end of file
+var _0xd276=['index','/:id','isAuthenticated','post','create','put','update','delete','destroy','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get'];(function(_0x2d0193,_0x8f73a6){var _0x4b7384=function(_0x8dbda0){while(--_0x8dbda0){_0x2d0193['push'](_0x2d0193['shift']());}};_0x4b7384(++_0x8f73a6);}(_0xd276,0xf3));var _0x6d27=function(_0x3cea78,_0x4a6751){_0x3cea78=_0x3cea78-0x0;var _0x33b66b=_0xd276[_0x3cea78];return _0x33b66b;};'use strict';var multer=require(_0x6d27('0x0'));var util=require(_0x6d27('0x1'));var path=require(_0x6d27('0x2'));var timeout=require('connect-timeout');var express=require(_0x6d27('0x3'));var router=express[_0x6d27('0x4')]();var fs_extra=require(_0x6d27('0x5'));var auth=require(_0x6d27('0x6'));var interaction=require(_0x6d27('0x7'));var config=require('../../config/environment');var controller=require('./intFreshdeskField.controller');router[_0x6d27('0x8')]('/',auth['isAuthenticated'](),controller[_0x6d27('0x9')]);router[_0x6d27('0x8')](_0x6d27('0xa'),auth[_0x6d27('0xb')](),controller['show']);router[_0x6d27('0xc')]('/',auth['isAuthenticated'](),controller[_0x6d27('0xd')]);router[_0x6d27('0xe')](_0x6d27('0xa'),auth[_0x6d27('0xb')](),controller[_0x6d27('0xf')]);router[_0x6d27('0x10')](_0x6d27('0xa'),auth['isAuthenticated'](),controller[_0x6d27('0x11')]);module['exports']=router;
\ No newline at end of file
index 1a370d0..9d2381d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe8cd=['STRING','ENUM','string','BOOLEAN','sequelize','exports','variable','customVariable','keyValue','picklist'];(function(_0x3c3fcb,_0x90363e){var _0x3efb0a=function(_0x18e9df){while(--_0x18e9df){_0x3c3fcb['push'](_0x3c3fcb['shift']());}};_0x3efb0a(++_0x90363e);}(_0xe8cd,0x112));var _0xde8c=function(_0x2136d5,_0x4b0479){_0x2136d5=_0x2136d5-0x0;var _0x3bee2e=_0xe8cd[_0x2136d5];return _0x3bee2e;};'use strict';var Sequelize=require(_0xde8c('0x0'));module[_0xde8c('0x1')]={'type':{'type':Sequelize['ENUM']('string',_0xde8c('0x2'),_0xde8c('0x3'),_0xde8c('0x4'),_0xde8c('0x5')),'defaultValue':'string'},'content':{'type':Sequelize[_0xde8c('0x6')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0xde8c('0x7')](_0xde8c('0x8'),'variable',_0xde8c('0x3'))},'keyContent':{'type':Sequelize[_0xde8c('0x6')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0xde8c('0x6')]},'customField':{'type':Sequelize[_0xde8c('0x9')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xde8c('0x6')]}};
\ No newline at end of file
+var _0xa563=['customVariable','keyValue','picklist','STRING','sequelize','exports','ENUM','string','variable'];(function(_0x31fd80,_0x2c675b){var _0x31039c=function(_0x2d9069){while(--_0x2d9069){_0x31fd80['push'](_0x31fd80['shift']());}};_0x31039c(++_0x2c675b);}(_0xa563,0xaf));var _0x3a56=function(_0x71a70,_0x4e1cdd){_0x71a70=_0x71a70-0x0;var _0x3a2b22=_0xa563[_0x71a70];return _0x3a2b22;};'use strict';var Sequelize=require(_0x3a56('0x0'));module[_0x3a56('0x1')]={'type':{'type':Sequelize[_0x3a56('0x2')](_0x3a56('0x3'),_0x3a56('0x4'),_0x3a56('0x5'),_0x3a56('0x6'),_0x3a56('0x7')),'defaultValue':'string'},'content':{'type':Sequelize[_0x3a56('0x8')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0x3a56('0x2')](_0x3a56('0x3'),_0x3a56('0x4'),_0x3a56('0x5'))},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize[_0x3a56('0x8')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x3a56('0x8')]}};
\ No newline at end of file
index b0e29c0..1f247eb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7fce=['merge','VIRTUAL','includeAll','include','FreshdeskField','findAll','show','params','options','find','create','body','catch','eml-format','rimraf','zip-dir','request-promise','bluebird','util','path','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','end','status','offset','undefined','limit','count','set','Content-Range','json','reject','update','then','destroy','sendStatus','error','name','send','index','map','rawAttributes','type','model','keys','filters','intersection','fields','query','attributes','length','nolimit','order','sort','where','pick','filter'];(function(_0x93ee28,_0x1a5f0c){var _0x3b65be=function(_0x440aa3){while(--_0x440aa3){_0x93ee28['push'](_0x93ee28['shift']());}};_0x3b65be(++_0x1a5f0c);}(_0x7fce,0xdc));var _0xe7fc=function(_0x4cf04d,_0x31151c){_0x4cf04d=_0x4cf04d-0x0;var _0x4acd3f=_0x7fce[_0x4cf04d];return _0x4acd3f;};'use strict';var emlformat=require(_0xe7fc('0x0'));var rimraf=require(_0xe7fc('0x1'));var zipdir=require(_0xe7fc('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe7fc('0x3'));var moment=require('moment');var BPromise=require(_0xe7fc('0x4'));var Mustache=require('mustache');var util=require(_0xe7fc('0x5'));var path=require(_0xe7fc('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xe7fc('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xe7fc('0x8'));var squel=require(_0xe7fc('0x9'));var crypto=require(_0xe7fc('0xa'));var jsforce=require(_0xe7fc('0xb'));var deskjs=require(_0xe7fc('0xc'));var toCsv=require('to-csv');var querystring=require(_0xe7fc('0xd'));var Papa=require('papaparse');var Redis=require(_0xe7fc('0xe'));var authService=require('../../components/auth/service');var qs=require(_0xe7fc('0xf'));var as=require(_0xe7fc('0x10'));var hardwareService=require(_0xe7fc('0x11'));var logger=require(_0xe7fc('0x12'))('api');var utils=require(_0xe7fc('0x13'));var config=require(_0xe7fc('0x14'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x243600,_0x59da2e){_0x59da2e=_0x59da2e||0xcc;return function(_0x38512a){if(_0x38512a){return _0x243600['sendStatus'](_0x59da2e);}return _0x243600['status'](_0x59da2e)[_0xe7fc('0x15')]();};}function respondWithResult(_0x14fcbf,_0x235692){_0x235692=_0x235692||0xc8;return function(_0x307f58){if(_0x307f58){return _0x14fcbf[_0xe7fc('0x16')](_0x235692)['json'](_0x307f58);}};}function respondWithFilteredResult(_0x272cd5,_0x5ce83f){return function(_0x4da73b){if(_0x4da73b){var _0x1302e5=typeof _0x5ce83f[_0xe7fc('0x17')]===_0xe7fc('0x18')&&typeof _0x5ce83f[_0xe7fc('0x19')]==='undefined';var _0x552429=_0x4da73b['count'];var _0x4aa4f0=_0x1302e5?0x0:_0x5ce83f['offset'];var _0x490a99=_0x1302e5?_0x4da73b[_0xe7fc('0x1a')]:_0x5ce83f['offset']+_0x5ce83f[_0xe7fc('0x19')];var _0xb43fde;if(_0x490a99>=_0x552429){_0x490a99=_0x552429;_0xb43fde=0xc8;}else{_0xb43fde=0xce;}_0x272cd5[_0xe7fc('0x16')](_0xb43fde);return _0x272cd5[_0xe7fc('0x1b')](_0xe7fc('0x1c'),_0x4aa4f0+'-'+_0x490a99+'/'+_0x552429)[_0xe7fc('0x1d')](_0x4da73b);}return null;};}function patchUpdates(_0x329051){return function(_0x763103){try{jsonpatch['apply'](_0x763103,_0x329051,!![]);}catch(_0x39c75a){return BPromise[_0xe7fc('0x1e')](_0x39c75a);}return _0x763103['save']();};}function saveUpdates(_0x587dee,_0x35bb53){return function(_0x3c31e7){if(_0x3c31e7){return _0x3c31e7[_0xe7fc('0x1f')](_0x587dee)[_0xe7fc('0x20')](function(_0x26977a){return _0x26977a;});}return null;};}function removeEntity(_0x11c5a3,_0x3f850f){return function(_0x1731b6){if(_0x1731b6){return _0x1731b6[_0xe7fc('0x21')]()[_0xe7fc('0x20')](function(){_0x11c5a3[_0xe7fc('0x16')](0xcc)[_0xe7fc('0x15')]();});}};}function handleEntityNotFound(_0x12ebdd,_0x5255b7){return function(_0x2d9e77){if(!_0x2d9e77){_0x12ebdd[_0xe7fc('0x22')](0x194);}return _0x2d9e77;};}function handleError(_0x416464,_0x3be1fd){_0x3be1fd=_0x3be1fd||0x1f4;return function(_0x2249ed){logger[_0xe7fc('0x23')](_0x2249ed['stack']);if(_0x2249ed[_0xe7fc('0x24')]){delete _0x2249ed[_0xe7fc('0x24')];}_0x416464[_0xe7fc('0x16')](_0x3be1fd)[_0xe7fc('0x25')](_0x2249ed);};}exports[_0xe7fc('0x26')]=function(_0x4416b5,_0x383ca6){var _0x4da084={},_0x36a68b={},_0x2a08a4={'count':0x0,'rows':[]};var _0x512518=_[_0xe7fc('0x27')](db['FreshdeskField'][_0xe7fc('0x28')],function(_0x27255a){return{'name':_0x27255a['fieldName'],'type':_0x27255a[_0xe7fc('0x29')]['key']};});_0x36a68b[_0xe7fc('0x2a')]=_[_0xe7fc('0x27')](_0x512518,_0xe7fc('0x24'));_0x36a68b['query']=_[_0xe7fc('0x2b')](_0x4416b5['query']);_0x36a68b[_0xe7fc('0x2c')]=_[_0xe7fc('0x2d')](_0x36a68b['model'],_0x36a68b['query']);_0x4da084['attributes']=_['intersection'](_0x36a68b[_0xe7fc('0x2a')],qs[_0xe7fc('0x2e')](_0x4416b5[_0xe7fc('0x2f')][_0xe7fc('0x2e')]));_0x4da084[_0xe7fc('0x30')]=_0x4da084[_0xe7fc('0x30')][_0xe7fc('0x31')]?_0x4da084[_0xe7fc('0x30')]:_0x36a68b[_0xe7fc('0x2a')];if(!_0x4416b5[_0xe7fc('0x2f')]['hasOwnProperty'](_0xe7fc('0x32'))){_0x4da084[_0xe7fc('0x19')]=qs[_0xe7fc('0x19')](_0x4416b5[_0xe7fc('0x2f')][_0xe7fc('0x19')]);_0x4da084['offset']=qs[_0xe7fc('0x17')](_0x4416b5[_0xe7fc('0x2f')][_0xe7fc('0x17')]);}_0x4da084[_0xe7fc('0x33')]=qs[_0xe7fc('0x34')](_0x4416b5[_0xe7fc('0x2f')][_0xe7fc('0x34')]);_0x4da084[_0xe7fc('0x35')]=qs[_0xe7fc('0x2c')](_[_0xe7fc('0x36')](_0x4416b5[_0xe7fc('0x2f')],_0x36a68b[_0xe7fc('0x2c')]),_0x512518);if(_0x4416b5['query'][_0xe7fc('0x37')]){_0x4da084[_0xe7fc('0x35')]=_[_0xe7fc('0x38')](_0x4da084[_0xe7fc('0x35')],{'$or':_[_0xe7fc('0x27')](_0x512518,function(_0x4ed2e4){if(_0x4ed2e4[_0xe7fc('0x29')]!==_0xe7fc('0x39')){var _0x112bb9={};_0x112bb9[_0x4ed2e4[_0xe7fc('0x24')]]={'$like':'%'+_0x4416b5[_0xe7fc('0x2f')][_0xe7fc('0x37')]+'%'};return _0x112bb9;}})});}_0x4da084=_['merge']({},_0x4da084,_0x4416b5['options']);var _0x582053={'where':_0x4da084['where']};return db['FreshdeskField'][_0xe7fc('0x1a')](_0x582053)[_0xe7fc('0x20')](function(_0x4cc33f){_0x2a08a4[_0xe7fc('0x1a')]=_0x4cc33f;if(_0x4416b5['query'][_0xe7fc('0x3a')]){_0x4da084[_0xe7fc('0x3b')]=[{'all':!![]}];}return db[_0xe7fc('0x3c')][_0xe7fc('0x3d')](_0x4da084);})[_0xe7fc('0x20')](function(_0x3e35c7){_0x2a08a4['rows']=_0x3e35c7;return _0x2a08a4;})[_0xe7fc('0x20')](respondWithFilteredResult(_0x383ca6,_0x4da084))['catch'](handleError(_0x383ca6,null));};exports[_0xe7fc('0x3e')]=function(_0x381bb4,_0x533f26){var _0x636368={'raw':!![],'where':{'id':_0x381bb4[_0xe7fc('0x3f')]['id']}},_0x3ce7ad={};_0x3ce7ad[_0xe7fc('0x2a')]=_[_0xe7fc('0x2b')](db[_0xe7fc('0x3c')][_0xe7fc('0x28')]);_0x3ce7ad[_0xe7fc('0x2f')]=_[_0xe7fc('0x2b')](_0x381bb4[_0xe7fc('0x2f')]);_0x3ce7ad[_0xe7fc('0x2c')]=_[_0xe7fc('0x2d')](_0x3ce7ad[_0xe7fc('0x2a')],_0x3ce7ad[_0xe7fc('0x2f')]);_0x636368[_0xe7fc('0x30')]=_[_0xe7fc('0x2d')](_0x3ce7ad[_0xe7fc('0x2a')],qs['fields'](_0x381bb4[_0xe7fc('0x2f')][_0xe7fc('0x2e')]));_0x636368[_0xe7fc('0x30')]=_0x636368['attributes'][_0xe7fc('0x31')]?_0x636368[_0xe7fc('0x30')]:_0x3ce7ad[_0xe7fc('0x2a')];if(_0x381bb4[_0xe7fc('0x2f')][_0xe7fc('0x3a')]){_0x636368['include']=[{'all':!![]}];}_0x636368=_['merge']({},_0x636368,_0x381bb4[_0xe7fc('0x40')]);return db[_0xe7fc('0x3c')][_0xe7fc('0x41')](_0x636368)[_0xe7fc('0x20')](handleEntityNotFound(_0x533f26,null))[_0xe7fc('0x20')](respondWithResult(_0x533f26,null))['catch'](handleError(_0x533f26,null));};exports[_0xe7fc('0x42')]=function(_0x2dd594,_0x2807ff){return db[_0xe7fc('0x3c')][_0xe7fc('0x42')](_0x2dd594[_0xe7fc('0x43')],{})[_0xe7fc('0x20')](respondWithResult(_0x2807ff,0xc9))[_0xe7fc('0x44')](handleError(_0x2807ff,null));};exports[_0xe7fc('0x1f')]=function(_0x45edbf,_0x533f31){if(_0x45edbf[_0xe7fc('0x43')]['id']){delete _0x45edbf['body']['id'];}return db[_0xe7fc('0x3c')][_0xe7fc('0x41')]({'where':{'id':_0x45edbf[_0xe7fc('0x3f')]['id']}})[_0xe7fc('0x20')](handleEntityNotFound(_0x533f31,null))[_0xe7fc('0x20')](saveUpdates(_0x45edbf[_0xe7fc('0x43')],null))[_0xe7fc('0x20')](respondWithResult(_0x533f31,null))[_0xe7fc('0x44')](handleError(_0x533f31,null));};exports[_0xe7fc('0x21')]=function(_0x535afb,_0x63a8bf){return db[_0xe7fc('0x3c')][_0xe7fc('0x41')]({'where':{'id':_0x535afb[_0xe7fc('0x3f')]['id']}})[_0xe7fc('0x20')](handleEntityNotFound(_0x63a8bf,null))[_0xe7fc('0x20')](removeEntity(_0x63a8bf,null))['catch'](handleError(_0x63a8bf,null));};
\ No newline at end of file
+var _0xc36d=['desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../mysqldb','status','end','json','limit','undefined','count','offset','Content-Range','apply','save','update','then','destroy','stack','name','send','index','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','merge','map','options','includeAll','include','rows','catch','show','params','FreshdeskField','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce'];(function(_0x250499,_0x5b7a08){var _0x20acec=function(_0x4db2ab){while(--_0x4db2ab){_0x250499['push'](_0x250499['shift']());}};_0x20acec(++_0x5b7a08);}(_0xc36d,0x7d));var _0xdc36=function(_0xeb4c8b,_0x1dc497){_0xeb4c8b=_0xeb4c8b-0x0;var _0x90b0d0=_0xc36d[_0xeb4c8b];return _0x90b0d0;};'use strict';var emlformat=require(_0xdc36('0x0'));var rimraf=require(_0xdc36('0x1'));var zipdir=require(_0xdc36('0x2'));var jsonpatch=require(_0xdc36('0x3'));var rp=require(_0xdc36('0x4'));var moment=require(_0xdc36('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xdc36('0x6'));var util=require(_0xdc36('0x7'));var path=require('path');var sox=require(_0xdc36('0x8'));var csv=require(_0xdc36('0x9'));var ejs=require(_0xdc36('0xa'));var fs=require('fs');var fs_extra=require(_0xdc36('0xb'));var _=require(_0xdc36('0xc'));var squel=require('squel');var crypto=require(_0xdc36('0xd'));var jsforce=require(_0xdc36('0xe'));var deskjs=require(_0xdc36('0xf'));var toCsv=require(_0xdc36('0x9'));var querystring=require('querystring');var Papa=require(_0xdc36('0x10'));var Redis=require(_0xdc36('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xdc36('0x12'));var as=require(_0xdc36('0x13'));var hardwareService=require(_0xdc36('0x14'));var logger=require('../../config/logger')(_0xdc36('0x15'));var utils=require(_0xdc36('0x16'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xdc36('0x17'))['db'];function respondWithStatusCode(_0x276692,_0x519fa5){_0x519fa5=_0x519fa5||0xcc;return function(_0x5d62ee){if(_0x5d62ee){return _0x276692['sendStatus'](_0x519fa5);}return _0x276692[_0xdc36('0x18')](_0x519fa5)[_0xdc36('0x19')]();};}function respondWithResult(_0x243d54,_0xae6ad3){_0xae6ad3=_0xae6ad3||0xc8;return function(_0x30803d){if(_0x30803d){return _0x243d54[_0xdc36('0x18')](_0xae6ad3)[_0xdc36('0x1a')](_0x30803d);}};}function respondWithFilteredResult(_0x809cf0,_0x57ebde){return function(_0x155cce){if(_0x155cce){var _0x526ac8=typeof _0x57ebde['offset']==='undefined'&&typeof _0x57ebde[_0xdc36('0x1b')]===_0xdc36('0x1c');var _0x5a498f=_0x155cce[_0xdc36('0x1d')];var _0x219a73=_0x526ac8?0x0:_0x57ebde[_0xdc36('0x1e')];var _0x225878=_0x526ac8?_0x155cce[_0xdc36('0x1d')]:_0x57ebde[_0xdc36('0x1e')]+_0x57ebde['limit'];var _0x3d4c4c;if(_0x225878>=_0x5a498f){_0x225878=_0x5a498f;_0x3d4c4c=0xc8;}else{_0x3d4c4c=0xce;}_0x809cf0[_0xdc36('0x18')](_0x3d4c4c);return _0x809cf0['set'](_0xdc36('0x1f'),_0x219a73+'-'+_0x225878+'/'+_0x5a498f)[_0xdc36('0x1a')](_0x155cce);}return null;};}function patchUpdates(_0x3f25f0){return function(_0x5f15ef){try{jsonpatch[_0xdc36('0x20')](_0x5f15ef,_0x3f25f0,!![]);}catch(_0x235a39){return BPromise['reject'](_0x235a39);}return _0x5f15ef[_0xdc36('0x21')]();};}function saveUpdates(_0x480277,_0x5a6e35){return function(_0x12f9d8){if(_0x12f9d8){return _0x12f9d8[_0xdc36('0x22')](_0x480277)[_0xdc36('0x23')](function(_0xda916b){return _0xda916b;});}return null;};}function removeEntity(_0x2d83c0,_0x34d261){return function(_0x14b595){if(_0x14b595){return _0x14b595[_0xdc36('0x24')]()['then'](function(){_0x2d83c0[_0xdc36('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2338d7,_0x38bd73){return function(_0x15e686){if(!_0x15e686){_0x2338d7['sendStatus'](0x194);}return _0x15e686;};}function handleError(_0xbc4322,_0x6e3906){_0x6e3906=_0x6e3906||0x1f4;return function(_0x337091){logger['error'](_0x337091[_0xdc36('0x25')]);if(_0x337091[_0xdc36('0x26')]){delete _0x337091[_0xdc36('0x26')];}_0xbc4322['status'](_0x6e3906)[_0xdc36('0x27')](_0x337091);};}exports[_0xdc36('0x28')]=function(_0x4b15b4,_0x3fe57f){var _0x12fed2={},_0x4ea2ad={},_0x21151b={'count':0x0,'rows':[]};var _0x5bba0b=_['map'](db['FreshdeskField'][_0xdc36('0x29')],function(_0x2f2bb4){return{'name':_0x2f2bb4['fieldName'],'type':_0x2f2bb4[_0xdc36('0x2a')][_0xdc36('0x2b')]};});_0x4ea2ad[_0xdc36('0x2c')]=_['map'](_0x5bba0b,_0xdc36('0x26'));_0x4ea2ad[_0xdc36('0x2d')]=_[_0xdc36('0x2e')](_0x4b15b4[_0xdc36('0x2d')]);_0x4ea2ad[_0xdc36('0x2f')]=_[_0xdc36('0x30')](_0x4ea2ad[_0xdc36('0x2c')],_0x4ea2ad['query']);_0x12fed2[_0xdc36('0x31')]=_[_0xdc36('0x30')](_0x4ea2ad['model'],qs['fields'](_0x4b15b4[_0xdc36('0x2d')][_0xdc36('0x32')]));_0x12fed2[_0xdc36('0x31')]=_0x12fed2['attributes']['length']?_0x12fed2[_0xdc36('0x31')]:_0x4ea2ad[_0xdc36('0x2c')];if(!_0x4b15b4[_0xdc36('0x2d')][_0xdc36('0x33')](_0xdc36('0x34'))){_0x12fed2[_0xdc36('0x1b')]=qs[_0xdc36('0x1b')](_0x4b15b4[_0xdc36('0x2d')][_0xdc36('0x1b')]);_0x12fed2[_0xdc36('0x1e')]=qs[_0xdc36('0x1e')](_0x4b15b4['query'][_0xdc36('0x1e')]);}_0x12fed2[_0xdc36('0x35')]=qs[_0xdc36('0x36')](_0x4b15b4[_0xdc36('0x2d')]['sort']);_0x12fed2[_0xdc36('0x37')]=qs[_0xdc36('0x2f')](_[_0xdc36('0x38')](_0x4b15b4[_0xdc36('0x2d')],_0x4ea2ad['filters']),_0x5bba0b);if(_0x4b15b4[_0xdc36('0x2d')]['filter']){_0x12fed2['where']=_[_0xdc36('0x39')](_0x12fed2[_0xdc36('0x37')],{'$or':_[_0xdc36('0x3a')](_0x5bba0b,function(_0x54c45d){if(_0x54c45d[_0xdc36('0x2a')]!=='VIRTUAL'){var _0x45760b={};_0x45760b[_0x54c45d[_0xdc36('0x26')]]={'$like':'%'+_0x4b15b4[_0xdc36('0x2d')]['filter']+'%'};return _0x45760b;}})});}_0x12fed2=_[_0xdc36('0x39')]({},_0x12fed2,_0x4b15b4[_0xdc36('0x3b')]);var _0xd98d42={'where':_0x12fed2[_0xdc36('0x37')]};return db['FreshdeskField'][_0xdc36('0x1d')](_0xd98d42)[_0xdc36('0x23')](function(_0x68816d){_0x21151b['count']=_0x68816d;if(_0x4b15b4['query'][_0xdc36('0x3c')]){_0x12fed2[_0xdc36('0x3d')]=[{'all':!![]}];}return db['FreshdeskField']['findAll'](_0x12fed2);})[_0xdc36('0x23')](function(_0x8f4c80){_0x21151b[_0xdc36('0x3e')]=_0x8f4c80;return _0x21151b;})[_0xdc36('0x23')](respondWithFilteredResult(_0x3fe57f,_0x12fed2))[_0xdc36('0x3f')](handleError(_0x3fe57f,null));};exports[_0xdc36('0x40')]=function(_0x932213,_0x2a83ee){var _0x2f4c89={'raw':!![],'where':{'id':_0x932213[_0xdc36('0x41')]['id']}},_0x125f0e={};_0x125f0e[_0xdc36('0x2c')]=_[_0xdc36('0x2e')](db[_0xdc36('0x42')][_0xdc36('0x29')]);_0x125f0e[_0xdc36('0x2d')]=_[_0xdc36('0x2e')](_0x932213[_0xdc36('0x2d')]);_0x125f0e[_0xdc36('0x2f')]=_[_0xdc36('0x30')](_0x125f0e[_0xdc36('0x2c')],_0x125f0e[_0xdc36('0x2d')]);_0x2f4c89[_0xdc36('0x31')]=_[_0xdc36('0x30')](_0x125f0e[_0xdc36('0x2c')],qs[_0xdc36('0x32')](_0x932213['query'][_0xdc36('0x32')]));_0x2f4c89[_0xdc36('0x31')]=_0x2f4c89['attributes']['length']?_0x2f4c89[_0xdc36('0x31')]:_0x125f0e['model'];if(_0x932213[_0xdc36('0x2d')]['includeAll']){_0x2f4c89[_0xdc36('0x3d')]=[{'all':!![]}];}_0x2f4c89=_[_0xdc36('0x39')]({},_0x2f4c89,_0x932213[_0xdc36('0x3b')]);return db[_0xdc36('0x42')][_0xdc36('0x43')](_0x2f4c89)[_0xdc36('0x23')](handleEntityNotFound(_0x2a83ee,null))[_0xdc36('0x23')](respondWithResult(_0x2a83ee,null))[_0xdc36('0x3f')](handleError(_0x2a83ee,null));};exports[_0xdc36('0x44')]=function(_0x38c24b,_0x3c27c7){return db[_0xdc36('0x42')][_0xdc36('0x44')](_0x38c24b[_0xdc36('0x45')],{})[_0xdc36('0x23')](respondWithResult(_0x3c27c7,0xc9))[_0xdc36('0x3f')](handleError(_0x3c27c7,null));};exports[_0xdc36('0x22')]=function(_0x3399cc,_0x562c86){if(_0x3399cc['body']['id']){delete _0x3399cc[_0xdc36('0x45')]['id'];}return db[_0xdc36('0x42')][_0xdc36('0x43')]({'where':{'id':_0x3399cc[_0xdc36('0x41')]['id']}})[_0xdc36('0x23')](handleEntityNotFound(_0x562c86,null))[_0xdc36('0x23')](saveUpdates(_0x3399cc['body'],null))[_0xdc36('0x23')](respondWithResult(_0x562c86,null))[_0xdc36('0x3f')](handleError(_0x562c86,null));};exports[_0xdc36('0x24')]=function(_0x49f456,_0x2c6856){return db[_0xdc36('0x42')][_0xdc36('0x43')]({'where':{'id':_0x49f456[_0xdc36('0x41')]['id']}})[_0xdc36('0x23')](handleEntityNotFound(_0x2c6856,null))[_0xdc36('0x23')](removeEntity(_0x2c6856,null))['catch'](handleError(_0x2c6856,null));};
\ No newline at end of file
index d5a4ad3..3b31936 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7ec2=['bluebird','path','rimraf','../../config/environment','./intFreshdeskField.attributes','exports','define','FreshdeskField','int_freshdesk_fields','freshdesk_unique_index','idField','FieldId','lodash','util','../../config/logger','moment'];(function(_0x575584,_0x149395){var _0x120d12=function(_0x32c3f6){while(--_0x32c3f6){_0x575584['push'](_0x575584['shift']());}};_0x120d12(++_0x149395);}(_0x7ec2,0x15c));var _0x27ec=function(_0x4a2202,_0x3dfb2a){_0x4a2202=_0x4a2202-0x0;var _0x3d0bc9=_0x7ec2[_0x4a2202];return _0x3d0bc9;};'use strict';var _=require(_0x27ec('0x0'));var util=require(_0x27ec('0x1'));var logger=require(_0x27ec('0x2'))('api');var moment=require(_0x27ec('0x3'));var BPromise=require(_0x27ec('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x27ec('0x5'));var rimraf=require(_0x27ec('0x6'));var config=require(_0x27ec('0x7'));var attributes=require(_0x27ec('0x8'));module[_0x27ec('0x9')]=function(_0x2f5fcb,_0x2ac546){return _0x2f5fcb[_0x27ec('0xa')](_0x27ec('0xb'),attributes,{'tableName':_0x27ec('0xc'),'paranoid':![],'indexes':[{'name':_0x27ec('0xd'),'fields':[_0x27ec('0xe'),_0x27ec('0xf')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x00f3=['request-promise','../../config/environment','./intFreshdeskField.attributes','exports','define','FreshdeskField','int_freshdesk_fields','freshdesk_unique_index','idField','FieldId','lodash','util','../../config/logger','api'];(function(_0x20522a,_0x11bb0){var _0x3105e0=function(_0x500ee0){while(--_0x500ee0){_0x20522a['push'](_0x20522a['shift']());}};_0x3105e0(++_0x11bb0);}(_0x00f3,0x168));var _0x300f=function(_0x4372af,_0x2d23b6){_0x4372af=_0x4372af-0x0;var _0x244e6b=_0x00f3[_0x4372af];return _0x244e6b;};'use strict';var _=require(_0x300f('0x0'));var util=require(_0x300f('0x1'));var logger=require(_0x300f('0x2'))(_0x300f('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x300f('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x300f('0x5'));var attributes=require(_0x300f('0x6'));module[_0x300f('0x7')]=function(_0x308f12,_0x226321){return _0x308f12[_0x300f('0x8')](_0x300f('0x9'),attributes,{'tableName':_0x300f('0xa'),'paranoid':![],'indexes':[{'name':_0x300f('0xb'),'fields':[_0x300f('0xc'),_0x300f('0xd')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index 7925684..ada42f7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbc11=['../../config/environment','jayson/promise','client','http','then','info','FreshdeskField,\x20%s,\x20%s','request\x20sent','debug','FreshdeskField,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x220f3f,_0x11c540){var _0x1f170e=function(_0x2c0ec9){while(--_0x2c0ec9){_0x220f3f['push'](_0x220f3f['shift']());}};_0x1f170e(++_0x11c540);}(_0xbc11,0x185));var _0x1bc1=function(_0x5774de,_0x4122b7){_0x5774de=_0x5774de-0x0;var _0x568394=_0xbc11[_0x5774de];return _0x568394;};'use strict';var _=require(_0x1bc1('0x0'));var util=require(_0x1bc1('0x1'));var moment=require(_0x1bc1('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1bc1('0x3'));var db=require(_0x1bc1('0x4'))['db'];var utils=require(_0x1bc1('0x5'));var logger=require(_0x1bc1('0x6'))('rpc');var config=require(_0x1bc1('0x7'));var jayson=require(_0x1bc1('0x8'));var client=jayson[_0x1bc1('0x9')][_0x1bc1('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x9f4347,_0x334f80,_0x1af27b){return new BPromise(function(_0x12309b,_0x28fb63){return client['request'](_0x9f4347,_0x1af27b)[_0x1bc1('0xb')](function(_0x210616){logger[_0x1bc1('0xc')](_0x1bc1('0xd'),_0x334f80,_0x1bc1('0xe'));logger[_0x1bc1('0xf')](_0x1bc1('0x10'),_0x334f80,_0x1bc1('0xe'),JSON[_0x1bc1('0x11')](_0x210616));if(_0x210616[_0x1bc1('0x12')]){if(_0x210616[_0x1bc1('0x12')]['code']===0x1f4){logger['error'](_0x1bc1('0xd'),_0x334f80,_0x210616[_0x1bc1('0x12')][_0x1bc1('0x13')]);return _0x28fb63(_0x210616['error'][_0x1bc1('0x13')]);}logger[_0x1bc1('0x12')](_0x1bc1('0xd'),_0x334f80,_0x210616[_0x1bc1('0x12')][_0x1bc1('0x13')]);return _0x12309b(_0x210616[_0x1bc1('0x12')][_0x1bc1('0x13')]);}else{logger[_0x1bc1('0xc')](_0x1bc1('0xd'),_0x334f80,_0x1bc1('0xe'));_0x12309b(_0x210616[_0x1bc1('0x14')][_0x1bc1('0x13')]);}})[_0x1bc1('0x15')](function(_0x4293ff){logger[_0x1bc1('0x12')](_0x1bc1('0xd'),_0x334f80,_0x4293ff);_0x28fb63(_0x4293ff);});});}
\ No newline at end of file
+var _0x4643=['result','catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','http','request','then','info','FreshdeskField,\x20%s,\x20%s','request\x20sent','debug','error','message'];(function(_0x4fa0ea,_0x2cd534){var _0x51d027=function(_0xe67342){while(--_0xe67342){_0x4fa0ea['push'](_0x4fa0ea['shift']());}};_0x51d027(++_0x2cd534);}(_0x4643,0x1a4));var _0x3464=function(_0x5d6456,_0x58ecc7){_0x5d6456=_0x5d6456-0x0;var _0x4d66c1=_0x4643[_0x5d6456];return _0x4d66c1;};'use strict';var _=require(_0x3464('0x0'));var util=require('util');var moment=require(_0x3464('0x1'));var BPromise=require(_0x3464('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x3464('0x3'));var db=require(_0x3464('0x4'))['db'];var utils=require(_0x3464('0x5'));var logger=require(_0x3464('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x3464('0x7'));var client=jayson['client'][_0x3464('0x8')]({'port':0x232a});function respondWithRpcPromise(_0xbd28a5,_0x128430,_0x440777){return new BPromise(function(_0x10bcae,_0x16f16f){return client[_0x3464('0x9')](_0xbd28a5,_0x440777)[_0x3464('0xa')](function(_0x18c0ef){logger[_0x3464('0xb')](_0x3464('0xc'),_0x128430,_0x3464('0xd'));logger[_0x3464('0xe')]('FreshdeskField,\x20%s,\x20%s,\x20%s',_0x128430,_0x3464('0xd'),JSON['stringify'](_0x18c0ef));if(_0x18c0ef['error']){if(_0x18c0ef[_0x3464('0xf')]['code']===0x1f4){logger['error']('FreshdeskField,\x20%s,\x20%s',_0x128430,_0x18c0ef[_0x3464('0xf')]['message']);return _0x16f16f(_0x18c0ef['error'][_0x3464('0x10')]);}logger[_0x3464('0xf')](_0x3464('0xc'),_0x128430,_0x18c0ef[_0x3464('0xf')]['message']);return _0x10bcae(_0x18c0ef[_0x3464('0xf')][_0x3464('0x10')]);}else{logger[_0x3464('0xb')](_0x3464('0xc'),_0x128430,'request\x20sent');_0x10bcae(_0x18c0ef[_0x3464('0x11')]['message']);}})[_0x3464('0x12')](function(_0x723fcf){logger['error']('FreshdeskField,\x20%s,\x20%s',_0x128430,_0x723fcf);_0x16f16f(_0x723fcf);});});}
\ No newline at end of file
index 5552cf8..2e270b5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5423=['create','post','addConfiguration','put','update','delete','exports','multer','util','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','/:id/configurations','getConfigurations','getFields'];(function(_0x1858cd,_0x11e91c){var _0x4487be=function(_0x5d4f0e){while(--_0x5d4f0e){_0x1858cd['push'](_0x1858cd['shift']());}};_0x4487be(++_0x11e91c);}(_0x5423,0xe3));var _0x3542=function(_0x4139d6,_0x590668){_0x4139d6=_0x4139d6-0x0;var _0x32d579=_0x5423[_0x4139d6];return _0x32d579;};'use strict';var multer=require(_0x3542('0x0'));var util=require(_0x3542('0x1'));var path=require('path');var timeout=require(_0x3542('0x2'));var express=require(_0x3542('0x3'));var router=express['Router']();var fs_extra=require(_0x3542('0x4'));var auth=require(_0x3542('0x5'));var interaction=require(_0x3542('0x6'));var config=require(_0x3542('0x7'));var controller=require('./intFreshsalesAccount.controller');router[_0x3542('0x8')]('/',auth[_0x3542('0x9')](),controller[_0x3542('0xa')]);router[_0x3542('0x8')](_0x3542('0xb'),auth['isAuthenticated'](),controller['show']);router[_0x3542('0x8')](_0x3542('0xc'),auth['isAuthenticated'](),controller[_0x3542('0xd')]);router[_0x3542('0x8')]('/:id/fields',auth[_0x3542('0x9')](),controller[_0x3542('0xe')]);router['post']('/',auth[_0x3542('0x9')](),controller[_0x3542('0xf')]);router[_0x3542('0x10')](_0x3542('0xc'),auth[_0x3542('0x9')](),controller[_0x3542('0x11')]);router[_0x3542('0x12')](_0x3542('0xb'),auth[_0x3542('0x9')](),controller[_0x3542('0x13')]);router[_0x3542('0x14')](_0x3542('0xb'),auth[_0x3542('0x9')](),controller['destroy']);module[_0x3542('0x15')]=router;
\ No newline at end of file
+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(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x5ec6,0x7f));var _0x65ec=function(_0x229afd,_0x4d2249){_0x229afd=_0x229afd-0x0;var _0x33a03d=_0x5ec6[_0x229afd];return _0x33a03d;};'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
index 0a532e2..4279a0d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb016=['remoteUri','sequelize','exports','STRING'];(function(_0x51cc1d,_0xaa88ae){var _0x2eb9f2=function(_0x1ca525){while(--_0x1ca525){_0x51cc1d['push'](_0x51cc1d['shift']());}};_0x2eb9f2(++_0xaa88ae);}(_0xb016,0x159));var _0x6b01=function(_0x18b520,_0x8535f1){_0x18b520=_0x18b520-0x0;var _0x2e204d=_0xb016[_0x18b520];return _0x2e204d;};'use strict';var Sequelize=require(_0x6b01('0x0'));module[_0x6b01('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0x6b01('0x2')],'unique':'username'},'apiKey':{'type':Sequelize[_0x6b01('0x2')]},'remoteUri':{'type':Sequelize[_0x6b01('0x2')],'unique':_0x6b01('0x3')},'serverUrl':{'type':Sequelize[_0x6b01('0x2')],'allowNull':![]}};
\ No newline at end of file
+var _0x6343=['STRING','remoteUri'];(function(_0x107e4f,_0x389048){var _0x273536=function(_0xb7b1b3){while(--_0xb7b1b3){_0x107e4f['push'](_0x107e4f['shift']());}};_0x273536(++_0x389048);}(_0x6343,0x168));var _0x3634=function(_0x411ea0,_0x6fece1){_0x411ea0=_0x411ea0-0x0;var _0x32a120=_0x6343[_0x411ea0];return _0x32a120;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x3634('0x0')]},'description':{'type':Sequelize[_0x3634('0x0')]},'username':{'type':Sequelize['STRING'],'unique':'username'},'apiKey':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize['STRING'],'unique':_0x3634('0x1')},'serverUrl':{'type':Sequelize[_0x3634('0x0')],'allowNull':![]}};
\ No newline at end of file
index c31d250..3c3e5e7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x219b=['reject','update','then','end','error','stack','name','map','FreshsalesAccount','rawAttributes','type','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filters','pick','merge','where','VIRTUAL','filter','includeAll','include','findAll','rows','show','params','catch','create','body','find','getConfigurations','options','addConfiguration','findOne','Subjects','getSubjects','channel','Descriptions','FreshsalesConfiguration','FreshsalesField','getFields','username','remoteUri','slice','GET','%s%s','/api/selector/owners','Token\x20token=','apiKey','users','email','Requested\x20Resource\x20not\x20Found','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','stringify','send','eml-format','rimraf','fast-json-patch','request-promise','bluebird','util','path','to-csv','ejs','fs-extra','lodash','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','../../components/integrations/configuration','sendStatus','status','offset','limit','undefined','count','set','Content-Range','apply'];(function(_0xbdc5fa,_0x26e850){var _0x512a71=function(_0x541574){while(--_0x541574){_0xbdc5fa['push'](_0xbdc5fa['shift']());}};_0x512a71(++_0x26e850);}(_0x219b,0x1c5));var _0xb219=function(_0x2c24f0,_0x367860){_0x2c24f0=_0x2c24f0-0x0;var _0x11badf=_0x219b[_0x2c24f0];return _0x11badf;};'use strict';var emlformat=require(_0xb219('0x0'));var rimraf=require(_0xb219('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xb219('0x2'));var rp=require(_0xb219('0x3'));var moment=require('moment');var BPromise=require(_0xb219('0x4'));var Mustache=require('mustache');var util=require(_0xb219('0x5'));var path=require(_0xb219('0x6'));var sox=require('sox');var csv=require(_0xb219('0x7'));var ejs=require(_0xb219('0x8'));var fs=require('fs');var fs_extra=require(_0xb219('0x9'));var _=require(_0xb219('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xb219('0x7'));var querystring=require(_0xb219('0xb'));var Papa=require('papaparse');var Redis=require(_0xb219('0xc'));var authService=require(_0xb219('0xd'));var qs=require(_0xb219('0xe'));var as=require(_0xb219('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xb219('0x10'))(_0xb219('0x11'));var utils=require(_0xb219('0x12'));var config=require(_0xb219('0x13'));var licenseUtil=require(_0xb219('0x14'));var db=require(_0xb219('0x15'))['db'];var integrations=require(_0xb219('0x16'));function respondWithStatusCode(_0x5c28c5,_0x5330db){_0x5330db=_0x5330db||0xcc;return function(_0x4c9eee){if(_0x4c9eee){return _0x5c28c5[_0xb219('0x17')](_0x5330db);}return _0x5c28c5[_0xb219('0x18')](_0x5330db)['end']();};}function respondWithResult(_0x438b58,_0xaaf0d9){_0xaaf0d9=_0xaaf0d9||0xc8;return function(_0x3d7afa){if(_0x3d7afa){return _0x438b58[_0xb219('0x18')](_0xaaf0d9)['json'](_0x3d7afa);}};}function respondWithFilteredResult(_0x3786f4,_0xc08ba7){return function(_0x1ef000){if(_0x1ef000){var _0x218db4=typeof _0xc08ba7[_0xb219('0x19')]==='undefined'&&typeof _0xc08ba7[_0xb219('0x1a')]===_0xb219('0x1b');var _0x24d2cb=_0x1ef000[_0xb219('0x1c')];var _0x597ea7=_0x218db4?0x0:_0xc08ba7[_0xb219('0x19')];var _0x489da9=_0x218db4?_0x1ef000[_0xb219('0x1c')]:_0xc08ba7[_0xb219('0x19')]+_0xc08ba7[_0xb219('0x1a')];var _0x4aaf3c;if(_0x489da9>=_0x24d2cb){_0x489da9=_0x24d2cb;_0x4aaf3c=0xc8;}else{_0x4aaf3c=0xce;}_0x3786f4[_0xb219('0x18')](_0x4aaf3c);return _0x3786f4[_0xb219('0x1d')](_0xb219('0x1e'),_0x597ea7+'-'+_0x489da9+'/'+_0x24d2cb)['json'](_0x1ef000);}return null;};}function patchUpdates(_0x4f841d){return function(_0xd2fa9d){try{jsonpatch[_0xb219('0x1f')](_0xd2fa9d,_0x4f841d,!![]);}catch(_0x9de83f){return BPromise[_0xb219('0x20')](_0x9de83f);}return _0xd2fa9d['save']();};}function saveUpdates(_0x3740d9,_0x3c3dab){return function(_0xd3acb9){if(_0xd3acb9){return _0xd3acb9[_0xb219('0x21')](_0x3740d9)['then'](function(_0x309013){return _0x309013;});}return null;};}function removeEntity(_0x4659c5,_0x37859e){return function(_0xb6dc1c){if(_0xb6dc1c){return _0xb6dc1c['destroy']()[_0xb219('0x22')](function(){_0x4659c5[_0xb219('0x18')](0xcc)[_0xb219('0x23')]();});}};}function handleEntityNotFound(_0x1a63bd,_0x234eea){return function(_0x12ae80){if(!_0x12ae80){_0x1a63bd[_0xb219('0x17')](0x194);}return _0x12ae80;};}function handleError(_0x2c8983,_0x11bb8f){_0x11bb8f=_0x11bb8f||0x1f4;return function(_0x2de490){logger[_0xb219('0x24')](_0x2de490[_0xb219('0x25')]);if(_0x2de490[_0xb219('0x26')]){delete _0x2de490[_0xb219('0x26')];}_0x2c8983[_0xb219('0x18')](_0x11bb8f)['send'](_0x2de490);};}exports['index']=function(_0x1e131f,_0xc44ffb){var _0x348f29={},_0x2733d3={},_0x34ee5e={'count':0x0,'rows':[]};var _0xba00d9=_[_0xb219('0x27')](db[_0xb219('0x28')][_0xb219('0x29')],function(_0xd30ebc){return{'name':_0xd30ebc['fieldName'],'type':_0xd30ebc[_0xb219('0x2a')]['key']};});_0x2733d3[_0xb219('0x2b')]=_['map'](_0xba00d9,_0xb219('0x26'));_0x2733d3[_0xb219('0x2c')]=_[_0xb219('0x2d')](_0x1e131f[_0xb219('0x2c')]);_0x2733d3['filters']=_[_0xb219('0x2e')](_0x2733d3[_0xb219('0x2b')],_0x2733d3[_0xb219('0x2c')]);_0x348f29[_0xb219('0x2f')]=_[_0xb219('0x2e')](_0x2733d3[_0xb219('0x2b')],qs['fields'](_0x1e131f[_0xb219('0x2c')][_0xb219('0x30')]));_0x348f29[_0xb219('0x2f')]=_0x348f29[_0xb219('0x2f')][_0xb219('0x31')]?_0x348f29[_0xb219('0x2f')]:_0x2733d3['model'];if(!_0x1e131f['query'][_0xb219('0x32')](_0xb219('0x33'))){_0x348f29[_0xb219('0x1a')]=qs['limit'](_0x1e131f['query'][_0xb219('0x1a')]);_0x348f29['offset']=qs[_0xb219('0x19')](_0x1e131f['query']['offset']);}_0x348f29[_0xb219('0x34')]=qs['sort'](_0x1e131f['query'][_0xb219('0x35')]);_0x348f29['where']=qs[_0xb219('0x36')](_[_0xb219('0x37')](_0x1e131f[_0xb219('0x2c')],_0x2733d3[_0xb219('0x36')]),_0xba00d9);if(_0x1e131f[_0xb219('0x2c')]['filter']){_0x348f29['where']=_[_0xb219('0x38')](_0x348f29[_0xb219('0x39')],{'$or':_[_0xb219('0x27')](_0xba00d9,function(_0x1c3ef4){if(_0x1c3ef4[_0xb219('0x2a')]!==_0xb219('0x3a')){var _0x582f9c={};_0x582f9c[_0x1c3ef4[_0xb219('0x26')]]={'$like':'%'+_0x1e131f['query'][_0xb219('0x3b')]+'%'};return _0x582f9c;}})});}_0x348f29=_[_0xb219('0x38')]({},_0x348f29,_0x1e131f['options']);var _0x471e02={'where':_0x348f29[_0xb219('0x39')]};return db['FreshsalesAccount']['count'](_0x471e02)['then'](function(_0x1b0dda){_0x34ee5e[_0xb219('0x1c')]=_0x1b0dda;if(_0x1e131f[_0xb219('0x2c')][_0xb219('0x3c')]){_0x348f29[_0xb219('0x3d')]=[{'all':!![]}];}return db[_0xb219('0x28')][_0xb219('0x3e')](_0x348f29);})['then'](function(_0x1fe83c){_0x34ee5e[_0xb219('0x3f')]=_0x1fe83c;return _0x34ee5e;})['then'](respondWithFilteredResult(_0xc44ffb,_0x348f29))['catch'](handleError(_0xc44ffb,null));};exports[_0xb219('0x40')]=function(_0x1b745e,_0x9845fa){var _0x4cedc7={'raw':![],'where':{'id':_0x1b745e[_0xb219('0x41')]['id']}},_0x8a72f7={};_0x8a72f7[_0xb219('0x2b')]=_[_0xb219('0x2d')](db[_0xb219('0x28')]['rawAttributes']);_0x8a72f7[_0xb219('0x2c')]=_['keys'](_0x1b745e[_0xb219('0x2c')]);_0x8a72f7[_0xb219('0x36')]=_[_0xb219('0x2e')](_0x8a72f7[_0xb219('0x2b')],_0x8a72f7[_0xb219('0x2c')]);_0x4cedc7['attributes']=_['intersection'](_0x8a72f7[_0xb219('0x2b')],qs[_0xb219('0x30')](_0x1b745e[_0xb219('0x2c')][_0xb219('0x30')]));_0x4cedc7[_0xb219('0x2f')]=_0x4cedc7[_0xb219('0x2f')][_0xb219('0x31')]?_0x4cedc7[_0xb219('0x2f')]:_0x8a72f7[_0xb219('0x2b')];if(_0x1b745e['query'][_0xb219('0x3c')]){_0x4cedc7[_0xb219('0x3d')]=[{'all':!![]}];}_0x4cedc7=_[_0xb219('0x38')]({},_0x4cedc7,_0x1b745e['options']);return db[_0xb219('0x28')]['find'](_0x4cedc7)[_0xb219('0x22')](handleEntityNotFound(_0x9845fa,null))['then'](respondWithResult(_0x9845fa,null))[_0xb219('0x42')](handleError(_0x9845fa,null));};exports['create']=function(_0x53bd2a,_0x17a361){return db[_0xb219('0x28')][_0xb219('0x43')](_0x53bd2a[_0xb219('0x44')],{})['then'](respondWithResult(_0x17a361,0xc9))[_0xb219('0x42')](handleError(_0x17a361,null));};exports[_0xb219('0x21')]=function(_0x484bfb,_0x55b08b){if(_0x484bfb[_0xb219('0x44')]['id']){delete _0x484bfb[_0xb219('0x44')]['id'];}return db[_0xb219('0x28')]['find']({'where':{'id':_0x484bfb[_0xb219('0x41')]['id']}})[_0xb219('0x22')](handleEntityNotFound(_0x55b08b,null))[_0xb219('0x22')](saveUpdates(_0x484bfb['body'],null))[_0xb219('0x22')](respondWithResult(_0x55b08b,null))['catch'](handleError(_0x55b08b,null));};exports['destroy']=function(_0x180f4c,_0x4ccb3c){return db['FreshsalesAccount'][_0xb219('0x45')]({'where':{'id':_0x180f4c['params']['id']}})[_0xb219('0x22')](handleEntityNotFound(_0x4ccb3c,null))[_0xb219('0x22')](removeEntity(_0x4ccb3c,null))[_0xb219('0x42')](handleError(_0x4ccb3c,null));};exports[_0xb219('0x46')]=function(_0x90db2,_0x4c4876,_0x1a129e){var _0x206544={};var _0x5814e2={};var _0x1ac1d5;var _0x3fe4b9;return db[_0xb219('0x28')]['findOne']({'where':{'id':_0x90db2[_0xb219('0x41')]['id']}})[_0xb219('0x22')](handleEntityNotFound(_0x4c4876,null))[_0xb219('0x22')](function(_0x552c62){if(_0x552c62){_0x1ac1d5=_0x552c62;_0x5814e2['model']=_[_0xb219('0x2d')](db['FreshsalesConfiguration']['rawAttributes']);_0x5814e2['query']=_[_0xb219('0x2d')](_0x90db2[_0xb219('0x2c')]);_0x5814e2[_0xb219('0x36')]=_[_0xb219('0x2e')](_0x5814e2[_0xb219('0x2b')],_0x5814e2[_0xb219('0x2c')]);_0x206544[_0xb219('0x2f')]=_[_0xb219('0x2e')](_0x5814e2['model'],qs['fields'](_0x90db2[_0xb219('0x2c')][_0xb219('0x30')]));_0x206544[_0xb219('0x2f')]=_0x206544[_0xb219('0x2f')][_0xb219('0x31')]?_0x206544[_0xb219('0x2f')]:_0x5814e2[_0xb219('0x2b')];_0x206544[_0xb219('0x34')]=qs[_0xb219('0x35')](_0x90db2['query']['sort']);_0x206544[_0xb219('0x39')]=qs[_0xb219('0x36')](_['pick'](_0x90db2[_0xb219('0x2c')],_0x5814e2[_0xb219('0x36')]));if(_0x90db2['query'][_0xb219('0x3b')]){_0x206544[_0xb219('0x39')]=_[_0xb219('0x38')](_0x206544['where'],{'$or':_[_0xb219('0x27')](_0x206544[_0xb219('0x2f')],function(_0x3178ef){var _0x2bd1ff={};_0x2bd1ff[_0x3178ef]={'$like':'%'+_0x90db2[_0xb219('0x2c')][_0xb219('0x3b')]+'%'};return _0x2bd1ff;})});}_0x206544=_[_0xb219('0x38')]({},_0x206544,_0x90db2[_0xb219('0x47')]);return _0x1ac1d5[_0xb219('0x46')](_0x206544);}})[_0xb219('0x22')](function(_0x28b4fb){if(_0x28b4fb){_0x3fe4b9=_0x28b4fb[_0xb219('0x31')];if(!_0x90db2[_0xb219('0x2c')][_0xb219('0x32')](_0xb219('0x33'))){_0x206544['limit']=qs[_0xb219('0x1a')](_0x90db2['query'][_0xb219('0x1a')]);_0x206544[_0xb219('0x19')]=qs[_0xb219('0x19')](_0x90db2[_0xb219('0x2c')][_0xb219('0x19')]);}return _0x1ac1d5[_0xb219('0x46')](_0x206544);}})[_0xb219('0x22')](function(_0x23d044){if(_0x23d044){return _0x23d044?{'count':_0x3fe4b9,'rows':_0x23d044}:null;}})[_0xb219('0x22')](respondWithResult(_0x4c4876,null))[_0xb219('0x42')](handleError(_0x4c4876,null));};exports[_0xb219('0x48')]=function(_0x5fdd7a,_0x80c4bf,_0x192bbc){if(_0x5fdd7a['body']['id']){delete _0x5fdd7a[_0xb219('0x44')]['id'];}return db[_0xb219('0x28')][_0xb219('0x49')]({'where':{'id':_0x5fdd7a[_0xb219('0x41')]['id']}})['then'](handleEntityNotFound(_0x80c4bf,null))[_0xb219('0x22')](function(_0x45b71b){if(_0x45b71b){_0x5fdd7a[_0xb219('0x44')]['AccountId']=_0x45b71b['id'];_0x5fdd7a[_0xb219('0x44')][_0xb219('0x4a')]=integrations[_0xb219('0x4b')](_0x5fdd7a[_0xb219('0x44')][_0xb219('0x4c')],_0x5fdd7a[_0xb219('0x44')]['type']);_0x5fdd7a['body'][_0xb219('0x4d')]=integrations['getDescriptions'](_0x5fdd7a[_0xb219('0x44')]['channel'],_0x5fdd7a[_0xb219('0x44')][_0xb219('0x2a')]);return db[_0xb219('0x4e')]['create'](_0x5fdd7a['body'],{'include':[{'model':db[_0xb219('0x4f')],'as':_0xb219('0x4a')},{'model':db[_0xb219('0x4f')],'as':_0xb219('0x4d')}]});}return null;})[_0xb219('0x22')](respondWithResult(_0x80c4bf,null))[_0xb219('0x42')](handleError(_0x80c4bf,null));};exports[_0xb219('0x50')]=function(_0x28230e,_0x24deb,_0x4415d5){var _0x1d0433='';var _0x113464='';return db[_0xb219('0x28')]['findOne']({'where':{'id':_0x28230e[_0xb219('0x41')]['id']},'attributes':['id',_0xb219('0x51'),_0xb219('0x52'),'apiKey']})[_0xb219('0x22')](handleEntityNotFound(_0x24deb,null))[_0xb219('0x22')](function(_0x533da8){if(_0x533da8){_0x113464=_0x533da8[_0xb219('0x51')];_0x1d0433=_0x533da8['remoteUri'];var _0x548a26=_0x533da8[_0xb219('0x52')][_0xb219('0x53')](-0x1);if(_0x548a26==='/'){_0x1d0433=_0x1d0433['substring'](0x0,_0x1d0433['lastIndexOf'](_0x548a26));}return rp({'method':_0xb219('0x54'),'uri':util['format'](_0xb219('0x55'),_0x1d0433,_0xb219('0x56')),'headers':{'Authorization':_0xb219('0x57')+_0x533da8[_0xb219('0x58')]},'json':!![]});}})['then'](function(_0x44293c){if(_0x44293c){var _0x2fcd70=_0x44293c[_0xb219('0x59')];var _0x1b1ff8=![];var _0x3f1827=null;for(_0x3f1827=0x0;_0x3f1827<_0x2fcd70[_0xb219('0x31')];_0x3f1827++){if(_0x2fcd70[_0x3f1827][_0xb219('0x5a')]===_0x113464){_0x1b1ff8=!![];}}if(_0x1b1ff8){return!![];}else{throw new Error({'statusCode':0x194,'message':_0xb219('0x5b')});}}})['then'](respondWithResult(_0x24deb,null))[_0xb219('0x42')](function(_0x12dfd8){var _0x3fbb23=_0x28230e[_0xb219('0x2c')][_0xb219('0x5c')]?0x1f4:_0x12dfd8[_0xb219('0x5d')]||0x1f4;logger[_0xb219('0x24')](_0xb219('0x5e'),_0xb219('0x50'),_0x3fbb23,JSON[_0xb219('0x5f')](_0x12dfd8));delete _0x12dfd8[_0xb219('0x26')];if(_0x3fbb23===0x191){_0x3fbb23=0x190;}_0x24deb[_0xb219('0x18')](_0x3fbb23)[_0xb219('0x60')](_0x28230e['query'][_0xb219('0x5c')]?{'message':'Wrong\x20credentials','statusCode':_0x12dfd8[_0xb219('0x5d')]}:_0x12dfd8);});};
\ No newline at end of file
+var _0xf6e8=['fieldName','type','key','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','find','create','update','body','getConfigurations','findOne','FreshsalesConfiguration','addConfiguration','AccountId','Subjects','getSubjects','channel','getDescriptions','FreshsalesField','Descriptions','username','remoteUri','apiKey','slice','substring','%s%s','/api/selector/owners','Token\x20token=','users','email','statusCode','getFields,\x20%s,\x20%s,\x20%s','test','Wrong\x20credentials','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','../../components/integrations/configuration','status','end','json','offset','undefined','count','limit','set','Content-Range','apply','save','then','destroy','sendStatus','error','name','send','map','FreshsalesAccount','rawAttributes'];(function(_0x2a24c7,_0xbbe950){var _0x23ff91=function(_0x46c885){while(--_0x46c885){_0x2a24c7['push'](_0x2a24c7['shift']());}};_0x23ff91(++_0xbbe950);}(_0xf6e8,0x16d));var _0x8f6e=function(_0x599cf5,_0x2e2444){_0x599cf5=_0x599cf5-0x0;var _0x40e46a=_0xf6e8[_0x599cf5];return _0x40e46a;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x8f6e('0x0'));var zipdir=require(_0x8f6e('0x1'));var jsonpatch=require(_0x8f6e('0x2'));var rp=require(_0x8f6e('0x3'));var moment=require(_0x8f6e('0x4'));var BPromise=require(_0x8f6e('0x5'));var Mustache=require(_0x8f6e('0x6'));var util=require(_0x8f6e('0x7'));var path=require(_0x8f6e('0x8'));var sox=require(_0x8f6e('0x9'));var csv=require(_0x8f6e('0xa'));var ejs=require(_0x8f6e('0xb'));var fs=require('fs');var fs_extra=require(_0x8f6e('0xc'));var _=require('lodash');var squel=require(_0x8f6e('0xd'));var crypto=require(_0x8f6e('0xe'));var jsforce=require(_0x8f6e('0xf'));var deskjs=require(_0x8f6e('0x10'));var toCsv=require('to-csv');var querystring=require(_0x8f6e('0x11'));var Papa=require('papaparse');var Redis=require(_0x8f6e('0x12'));var authService=require(_0x8f6e('0x13'));var qs=require(_0x8f6e('0x14'));var as=require(_0x8f6e('0x15'));var hardwareService=require(_0x8f6e('0x16'));var logger=require(_0x8f6e('0x17'))('api');var utils=require(_0x8f6e('0x18'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x8f6e('0x19'))['db'];var integrations=require(_0x8f6e('0x1a'));function respondWithStatusCode(_0x256e62,_0x3c007d){_0x3c007d=_0x3c007d||0xcc;return function(_0x15f6a8){if(_0x15f6a8){return _0x256e62['sendStatus'](_0x3c007d);}return _0x256e62[_0x8f6e('0x1b')](_0x3c007d)[_0x8f6e('0x1c')]();};}function respondWithResult(_0x2a1ebb,_0x53d039){_0x53d039=_0x53d039||0xc8;return function(_0x2a72ce){if(_0x2a72ce){return _0x2a1ebb[_0x8f6e('0x1b')](_0x53d039)[_0x8f6e('0x1d')](_0x2a72ce);}};}function respondWithFilteredResult(_0x413ced,_0x50925a){return function(_0xfa83ca){if(_0xfa83ca){var _0x28ee41=typeof _0x50925a[_0x8f6e('0x1e')]===_0x8f6e('0x1f')&&typeof _0x50925a['limit']===_0x8f6e('0x1f');var _0x22a6c3=_0xfa83ca[_0x8f6e('0x20')];var _0x36571a=_0x28ee41?0x0:_0x50925a['offset'];var _0xe1bddb=_0x28ee41?_0xfa83ca[_0x8f6e('0x20')]:_0x50925a[_0x8f6e('0x1e')]+_0x50925a[_0x8f6e('0x21')];var _0x1f9bf2;if(_0xe1bddb>=_0x22a6c3){_0xe1bddb=_0x22a6c3;_0x1f9bf2=0xc8;}else{_0x1f9bf2=0xce;}_0x413ced[_0x8f6e('0x1b')](_0x1f9bf2);return _0x413ced[_0x8f6e('0x22')](_0x8f6e('0x23'),_0x36571a+'-'+_0xe1bddb+'/'+_0x22a6c3)[_0x8f6e('0x1d')](_0xfa83ca);}return null;};}function patchUpdates(_0x9f031c){return function(_0x34b4ce){try{jsonpatch[_0x8f6e('0x24')](_0x34b4ce,_0x9f031c,!![]);}catch(_0x257f4a){return BPromise['reject'](_0x257f4a);}return _0x34b4ce[_0x8f6e('0x25')]();};}function saveUpdates(_0x5d17e1,_0x22cba3){return function(_0x19f211){if(_0x19f211){return _0x19f211['update'](_0x5d17e1)[_0x8f6e('0x26')](function(_0x3b1c1e){return _0x3b1c1e;});}return null;};}function removeEntity(_0x11c802,_0x1b3a87){return function(_0x5e7724){if(_0x5e7724){return _0x5e7724[_0x8f6e('0x27')]()[_0x8f6e('0x26')](function(){_0x11c802[_0x8f6e('0x1b')](0xcc)[_0x8f6e('0x1c')]();});}};}function handleEntityNotFound(_0x11d960,_0x1d20ed){return function(_0x35609b){if(!_0x35609b){_0x11d960[_0x8f6e('0x28')](0x194);}return _0x35609b;};}function handleError(_0x4b1fee,_0x104a38){_0x104a38=_0x104a38||0x1f4;return function(_0x546304){logger[_0x8f6e('0x29')](_0x546304['stack']);if(_0x546304['name']){delete _0x546304[_0x8f6e('0x2a')];}_0x4b1fee[_0x8f6e('0x1b')](_0x104a38)[_0x8f6e('0x2b')](_0x546304);};}exports['index']=function(_0xf94360,_0x2e67ba){var _0x13508f={},_0x5cbbb8={},_0x5e9982={'count':0x0,'rows':[]};var _0x179398=_[_0x8f6e('0x2c')](db[_0x8f6e('0x2d')][_0x8f6e('0x2e')],function(_0x533fd8){return{'name':_0x533fd8[_0x8f6e('0x2f')],'type':_0x533fd8[_0x8f6e('0x30')][_0x8f6e('0x31')]};});_0x5cbbb8[_0x8f6e('0x32')]=_[_0x8f6e('0x2c')](_0x179398,'name');_0x5cbbb8['query']=_[_0x8f6e('0x33')](_0xf94360[_0x8f6e('0x34')]);_0x5cbbb8[_0x8f6e('0x35')]=_[_0x8f6e('0x36')](_0x5cbbb8[_0x8f6e('0x32')],_0x5cbbb8[_0x8f6e('0x34')]);_0x13508f[_0x8f6e('0x37')]=_[_0x8f6e('0x36')](_0x5cbbb8['model'],qs[_0x8f6e('0x38')](_0xf94360[_0x8f6e('0x34')][_0x8f6e('0x38')]));_0x13508f[_0x8f6e('0x37')]=_0x13508f[_0x8f6e('0x37')][_0x8f6e('0x39')]?_0x13508f[_0x8f6e('0x37')]:_0x5cbbb8[_0x8f6e('0x32')];if(!_0xf94360[_0x8f6e('0x34')][_0x8f6e('0x3a')](_0x8f6e('0x3b'))){_0x13508f[_0x8f6e('0x21')]=qs['limit'](_0xf94360[_0x8f6e('0x34')][_0x8f6e('0x21')]);_0x13508f[_0x8f6e('0x1e')]=qs[_0x8f6e('0x1e')](_0xf94360[_0x8f6e('0x34')]['offset']);}_0x13508f[_0x8f6e('0x3c')]=qs['sort'](_0xf94360[_0x8f6e('0x34')][_0x8f6e('0x3d')]);_0x13508f[_0x8f6e('0x3e')]=qs['filters'](_[_0x8f6e('0x3f')](_0xf94360[_0x8f6e('0x34')],_0x5cbbb8[_0x8f6e('0x35')]),_0x179398);if(_0xf94360[_0x8f6e('0x34')][_0x8f6e('0x40')]){_0x13508f[_0x8f6e('0x3e')]=_[_0x8f6e('0x41')](_0x13508f[_0x8f6e('0x3e')],{'$or':_[_0x8f6e('0x2c')](_0x179398,function(_0x1327e5){if(_0x1327e5[_0x8f6e('0x30')]!==_0x8f6e('0x42')){var _0x178cb1={};_0x178cb1[_0x1327e5[_0x8f6e('0x2a')]]={'$like':'%'+_0xf94360[_0x8f6e('0x34')][_0x8f6e('0x40')]+'%'};return _0x178cb1;}})});}_0x13508f=_[_0x8f6e('0x41')]({},_0x13508f,_0xf94360[_0x8f6e('0x43')]);var _0x3c2d5e={'where':_0x13508f[_0x8f6e('0x3e')]};return db['FreshsalesAccount'][_0x8f6e('0x20')](_0x3c2d5e)[_0x8f6e('0x26')](function(_0x1ba469){_0x5e9982['count']=_0x1ba469;if(_0xf94360[_0x8f6e('0x34')][_0x8f6e('0x44')]){_0x13508f[_0x8f6e('0x45')]=[{'all':!![]}];}return db[_0x8f6e('0x2d')][_0x8f6e('0x46')](_0x13508f);})[_0x8f6e('0x26')](function(_0x119e31){_0x5e9982[_0x8f6e('0x47')]=_0x119e31;return _0x5e9982;})['then'](respondWithFilteredResult(_0x2e67ba,_0x13508f))[_0x8f6e('0x48')](handleError(_0x2e67ba,null));};exports['show']=function(_0x235aff,_0x415468){var _0x385d29={'raw':![],'where':{'id':_0x235aff[_0x8f6e('0x49')]['id']}},_0x32aa4f={};_0x32aa4f[_0x8f6e('0x32')]=_[_0x8f6e('0x33')](db[_0x8f6e('0x2d')][_0x8f6e('0x2e')]);_0x32aa4f['query']=_[_0x8f6e('0x33')](_0x235aff[_0x8f6e('0x34')]);_0x32aa4f[_0x8f6e('0x35')]=_[_0x8f6e('0x36')](_0x32aa4f[_0x8f6e('0x32')],_0x32aa4f[_0x8f6e('0x34')]);_0x385d29['attributes']=_[_0x8f6e('0x36')](_0x32aa4f['model'],qs[_0x8f6e('0x38')](_0x235aff[_0x8f6e('0x34')][_0x8f6e('0x38')]));_0x385d29[_0x8f6e('0x37')]=_0x385d29[_0x8f6e('0x37')][_0x8f6e('0x39')]?_0x385d29['attributes']:_0x32aa4f[_0x8f6e('0x32')];if(_0x235aff[_0x8f6e('0x34')][_0x8f6e('0x44')]){_0x385d29[_0x8f6e('0x45')]=[{'all':!![]}];}_0x385d29=_[_0x8f6e('0x41')]({},_0x385d29,_0x235aff['options']);return db[_0x8f6e('0x2d')][_0x8f6e('0x4a')](_0x385d29)[_0x8f6e('0x26')](handleEntityNotFound(_0x415468,null))['then'](respondWithResult(_0x415468,null))[_0x8f6e('0x48')](handleError(_0x415468,null));};exports[_0x8f6e('0x4b')]=function(_0x322961,_0x24dea0){return db[_0x8f6e('0x2d')][_0x8f6e('0x4b')](_0x322961['body'],{})[_0x8f6e('0x26')](respondWithResult(_0x24dea0,0xc9))[_0x8f6e('0x48')](handleError(_0x24dea0,null));};exports[_0x8f6e('0x4c')]=function(_0x248822,_0x47dac5){if(_0x248822[_0x8f6e('0x4d')]['id']){delete _0x248822[_0x8f6e('0x4d')]['id'];}return db[_0x8f6e('0x2d')][_0x8f6e('0x4a')]({'where':{'id':_0x248822[_0x8f6e('0x49')]['id']}})[_0x8f6e('0x26')](handleEntityNotFound(_0x47dac5,null))[_0x8f6e('0x26')](saveUpdates(_0x248822['body'],null))[_0x8f6e('0x26')](respondWithResult(_0x47dac5,null))['catch'](handleError(_0x47dac5,null));};exports[_0x8f6e('0x27')]=function(_0x3bb6d3,_0x42c249){return db[_0x8f6e('0x2d')]['find']({'where':{'id':_0x3bb6d3[_0x8f6e('0x49')]['id']}})['then'](handleEntityNotFound(_0x42c249,null))[_0x8f6e('0x26')](removeEntity(_0x42c249,null))[_0x8f6e('0x48')](handleError(_0x42c249,null));};exports[_0x8f6e('0x4e')]=function(_0x200786,_0x20c4ca,_0x737846){var _0x2e9162={};var _0x6bc744={};var _0x1967e9;var _0x16d2cb;return db[_0x8f6e('0x2d')][_0x8f6e('0x4f')]({'where':{'id':_0x200786['params']['id']}})[_0x8f6e('0x26')](handleEntityNotFound(_0x20c4ca,null))[_0x8f6e('0x26')](function(_0x442f60){if(_0x442f60){_0x1967e9=_0x442f60;_0x6bc744[_0x8f6e('0x32')]=_['keys'](db[_0x8f6e('0x50')][_0x8f6e('0x2e')]);_0x6bc744['query']=_[_0x8f6e('0x33')](_0x200786[_0x8f6e('0x34')]);_0x6bc744['filters']=_[_0x8f6e('0x36')](_0x6bc744[_0x8f6e('0x32')],_0x6bc744[_0x8f6e('0x34')]);_0x2e9162[_0x8f6e('0x37')]=_[_0x8f6e('0x36')](_0x6bc744['model'],qs['fields'](_0x200786[_0x8f6e('0x34')][_0x8f6e('0x38')]));_0x2e9162[_0x8f6e('0x37')]=_0x2e9162[_0x8f6e('0x37')][_0x8f6e('0x39')]?_0x2e9162['attributes']:_0x6bc744[_0x8f6e('0x32')];_0x2e9162[_0x8f6e('0x3c')]=qs['sort'](_0x200786['query'][_0x8f6e('0x3d')]);_0x2e9162[_0x8f6e('0x3e')]=qs[_0x8f6e('0x35')](_[_0x8f6e('0x3f')](_0x200786[_0x8f6e('0x34')],_0x6bc744[_0x8f6e('0x35')]));if(_0x200786[_0x8f6e('0x34')][_0x8f6e('0x40')]){_0x2e9162[_0x8f6e('0x3e')]=_[_0x8f6e('0x41')](_0x2e9162['where'],{'$or':_[_0x8f6e('0x2c')](_0x2e9162[_0x8f6e('0x37')],function(_0x3dd69c){var _0x1b7705={};_0x1b7705[_0x3dd69c]={'$like':'%'+_0x200786['query'][_0x8f6e('0x40')]+'%'};return _0x1b7705;})});}_0x2e9162=_[_0x8f6e('0x41')]({},_0x2e9162,_0x200786[_0x8f6e('0x43')]);return _0x1967e9[_0x8f6e('0x4e')](_0x2e9162);}})[_0x8f6e('0x26')](function(_0x2aaf83){if(_0x2aaf83){_0x16d2cb=_0x2aaf83[_0x8f6e('0x39')];if(!_0x200786[_0x8f6e('0x34')][_0x8f6e('0x3a')](_0x8f6e('0x3b'))){_0x2e9162[_0x8f6e('0x21')]=qs['limit'](_0x200786[_0x8f6e('0x34')][_0x8f6e('0x21')]);_0x2e9162[_0x8f6e('0x1e')]=qs[_0x8f6e('0x1e')](_0x200786[_0x8f6e('0x34')][_0x8f6e('0x1e')]);}return _0x1967e9[_0x8f6e('0x4e')](_0x2e9162);}})[_0x8f6e('0x26')](function(_0x2ce966){if(_0x2ce966){return _0x2ce966?{'count':_0x16d2cb,'rows':_0x2ce966}:null;}})['then'](respondWithResult(_0x20c4ca,null))['catch'](handleError(_0x20c4ca,null));};exports[_0x8f6e('0x51')]=function(_0x37d05b,_0x3eee92,_0x141d04){if(_0x37d05b[_0x8f6e('0x4d')]['id']){delete _0x37d05b[_0x8f6e('0x4d')]['id'];}return db[_0x8f6e('0x2d')][_0x8f6e('0x4f')]({'where':{'id':_0x37d05b['params']['id']}})[_0x8f6e('0x26')](handleEntityNotFound(_0x3eee92,null))[_0x8f6e('0x26')](function(_0x42c366){if(_0x42c366){_0x37d05b[_0x8f6e('0x4d')][_0x8f6e('0x52')]=_0x42c366['id'];_0x37d05b[_0x8f6e('0x4d')][_0x8f6e('0x53')]=integrations[_0x8f6e('0x54')](_0x37d05b[_0x8f6e('0x4d')][_0x8f6e('0x55')],_0x37d05b['body'][_0x8f6e('0x30')]);_0x37d05b['body']['Descriptions']=integrations[_0x8f6e('0x56')](_0x37d05b[_0x8f6e('0x4d')][_0x8f6e('0x55')],_0x37d05b['body']['type']);return db[_0x8f6e('0x50')]['create'](_0x37d05b[_0x8f6e('0x4d')],{'include':[{'model':db[_0x8f6e('0x57')],'as':_0x8f6e('0x53')},{'model':db[_0x8f6e('0x57')],'as':_0x8f6e('0x58')}]});}return null;})[_0x8f6e('0x26')](respondWithResult(_0x3eee92,null))[_0x8f6e('0x48')](handleError(_0x3eee92,null));};exports['getFields']=function(_0x41d80a,_0x90fb59,_0x11f5ab){var _0x4bfc13='';var _0x514312='';return db[_0x8f6e('0x2d')][_0x8f6e('0x4f')]({'where':{'id':_0x41d80a[_0x8f6e('0x49')]['id']},'attributes':['id',_0x8f6e('0x59'),_0x8f6e('0x5a'),_0x8f6e('0x5b')]})[_0x8f6e('0x26')](handleEntityNotFound(_0x90fb59,null))['then'](function(_0x294895){if(_0x294895){_0x514312=_0x294895[_0x8f6e('0x59')];_0x4bfc13=_0x294895[_0x8f6e('0x5a')];var _0x8017ca=_0x294895[_0x8f6e('0x5a')][_0x8f6e('0x5c')](-0x1);if(_0x8017ca==='/'){_0x4bfc13=_0x4bfc13[_0x8f6e('0x5d')](0x0,_0x4bfc13['lastIndexOf'](_0x8017ca));}return rp({'method':'GET','uri':util['format'](_0x8f6e('0x5e'),_0x4bfc13,_0x8f6e('0x5f')),'headers':{'Authorization':_0x8f6e('0x60')+_0x294895[_0x8f6e('0x5b')]},'json':!![]});}})[_0x8f6e('0x26')](function(_0x564dba){if(_0x564dba){var _0xb39211=_0x564dba[_0x8f6e('0x61')];var _0x5b7e87=![];var _0x4eacf6=null;for(_0x4eacf6=0x0;_0x4eacf6<_0xb39211[_0x8f6e('0x39')];_0x4eacf6++){if(_0xb39211[_0x4eacf6][_0x8f6e('0x62')]===_0x514312){_0x5b7e87=!![];}}if(_0x5b7e87){return!![];}else{throw new Error({'statusCode':0x194,'message':'Requested\x20Resource\x20not\x20Found'});}}})[_0x8f6e('0x26')](respondWithResult(_0x90fb59,null))[_0x8f6e('0x48')](function(_0x3cdc58){var _0x2a9c42=_0x41d80a['query']['test']?0x1f4:_0x3cdc58[_0x8f6e('0x63')]||0x1f4;logger['error'](_0x8f6e('0x64'),'getFields',_0x2a9c42,JSON['stringify'](_0x3cdc58));delete _0x3cdc58['name'];if(_0x2a9c42===0x191){_0x2a9c42=0x190;}_0x90fb59[_0x8f6e('0x1b')](_0x2a9c42)['send'](_0x41d80a[_0x8f6e('0x34')][_0x8f6e('0x65')]?{'message':_0x8f6e('0x66'),'statusCode':_0x3cdc58[_0x8f6e('0x63')]}:_0x3cdc58);});};
\ No newline at end of file
index 26ded2e..adb4d23 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4c60=['exports','define','FreshsalesAccount','lodash','util','../../config/logger','api','bluebird','./intFreshsalesAccount.attributes','../../components/integrations/configuration'];(function(_0x25ae8d,_0x224fc5){var _0x5d7526=function(_0x8664af){while(--_0x8664af){_0x25ae8d['push'](_0x25ae8d['shift']());}};_0x5d7526(++_0x224fc5);}(_0x4c60,0xc1));var _0x04c6=function(_0x5e943e,_0x17541e){_0x5e943e=_0x5e943e-0x0;var _0x1c0402=_0x4c60[_0x5e943e];return _0x1c0402;};'use strict';var _=require(_0x04c6('0x0'));var util=require(_0x04c6('0x1'));var logger=require(_0x04c6('0x2'))(_0x04c6('0x3'));var moment=require('moment');var BPromise=require(_0x04c6('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x04c6('0x5'));var integrations=require(_0x04c6('0x6'));module[_0x04c6('0x7')]=function(_0x12bd5d,_0x2b9041){return _0x12bd5d[_0x04c6('0x8')](_0x04c6('0x9'),attributes,{'tableName':'int_freshsales_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x4bd3=['define','int_freshsales_accounts','lodash','../../config/logger','api','path','rimraf','../../config/environment','../../components/integrations/configuration','exports'];(function(_0x21aec3,_0x5c97e9){var _0x288bbc=function(_0x2283fe){while(--_0x2283fe){_0x21aec3['push'](_0x21aec3['shift']());}};_0x288bbc(++_0x5c97e9);}(_0x4bd3,0x174));var _0x34bd=function(_0x243fee,_0x3f9d06){_0x243fee=_0x243fee-0x0;var _0xf6907e=_0x4bd3[_0x243fee];return _0xf6907e;};'use strict';var _=require(_0x34bd('0x0'));var util=require('util');var logger=require(_0x34bd('0x1'))(_0x34bd('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x34bd('0x3'));var rimraf=require(_0x34bd('0x4'));var config=require(_0x34bd('0x5'));var attributes=require('./intFreshsalesAccount.attributes');var integrations=require(_0x34bd('0x6'));module[_0x34bd('0x7')]=function(_0x5c2a7a,_0x3e8744){return _0x5c2a7a[_0x34bd('0x8')]('FreshsalesAccount',attributes,{'tableName':_0x34bd('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 6f6bc40..98cc224 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0a6b=['find','map','lodash','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','info','FreshsalesAccount,\x20%s,\x20%s','request\x20sent','FreshsalesAccount,\x20%s,\x20%s,\x20%s','error','code','message','result','GetFreshsalesAccount','FreshsalesAccount','findAll','options','raw','where','attributes','limit','include','model','then','debug','stringify','catch','ShowFreshsalesAccount'];(function(_0x4a747d,_0x3b747f){var _0x3a5b5c=function(_0x4b3e81){while(--_0x4b3e81){_0x4a747d['push'](_0x4a747d['shift']());}};_0x3a5b5c(++_0x3b747f);}(_0x0a6b,0x18e));var _0xb0a6=function(_0x2f260e,_0x239e29){_0x2f260e=_0x2f260e-0x0;var _0x5e9222=_0x0a6b[_0x2f260e];return _0x5e9222;};'use strict';var _=require(_0xb0a6('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xb0a6('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb0a6('0x2'))['db'];var utils=require(_0xb0a6('0x3'));var logger=require(_0xb0a6('0x4'))('rpc');var config=require(_0xb0a6('0x5'));var jayson=require('jayson/promise');var client=jayson[_0xb0a6('0x6')][_0xb0a6('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x5e2d2d,_0x11cd5b,_0x24515c){return new BPromise(function(_0x2a8516,_0x530c05){return client['request'](_0x5e2d2d,_0x24515c)['then'](function(_0x2ded05){logger[_0xb0a6('0x8')](_0xb0a6('0x9'),_0x11cd5b,_0xb0a6('0xa'));logger['debug'](_0xb0a6('0xb'),_0x11cd5b,_0xb0a6('0xa'),JSON['stringify'](_0x2ded05));if(_0x2ded05[_0xb0a6('0xc')]){if(_0x2ded05[_0xb0a6('0xc')][_0xb0a6('0xd')]===0x1f4){logger[_0xb0a6('0xc')](_0xb0a6('0x9'),_0x11cd5b,_0x2ded05[_0xb0a6('0xc')][_0xb0a6('0xe')]);return _0x530c05(_0x2ded05[_0xb0a6('0xc')][_0xb0a6('0xe')]);}logger[_0xb0a6('0xc')]('FreshsalesAccount,\x20%s,\x20%s',_0x11cd5b,_0x2ded05[_0xb0a6('0xc')]['message']);return _0x2a8516(_0x2ded05[_0xb0a6('0xc')]['message']);}else{logger[_0xb0a6('0x8')]('FreshsalesAccount,\x20%s,\x20%s',_0x11cd5b,_0xb0a6('0xa'));_0x2a8516(_0x2ded05[_0xb0a6('0xf')][_0xb0a6('0xe')]);}})['catch'](function(_0x56b594){logger[_0xb0a6('0xc')](_0xb0a6('0x9'),_0x11cd5b,_0x56b594);_0x530c05(_0x56b594);});});}exports[_0xb0a6('0x10')]=function(_0x18f994){var _0x10f504=this;return new Promise(function(_0x13a1c8,_0x567dd5){return db[_0xb0a6('0x11')][_0xb0a6('0x12')]({'raw':_0x18f994[_0xb0a6('0x13')]?_0x18f994[_0xb0a6('0x13')][_0xb0a6('0x14')]===undefined?!![]:![]:!![],'where':_0x18f994[_0xb0a6('0x13')]?_0x18f994['options'][_0xb0a6('0x15')]||null:null,'attributes':_0x18f994[_0xb0a6('0x13')]?_0x18f994[_0xb0a6('0x13')][_0xb0a6('0x16')]||null:null,'limit':_0x18f994[_0xb0a6('0x13')]?_0x18f994[_0xb0a6('0x13')][_0xb0a6('0x17')]||null:null,'include':_0x18f994[_0xb0a6('0x13')]?_0x18f994['options'][_0xb0a6('0x18')]?_['map'](_0x18f994[_0xb0a6('0x13')][_0xb0a6('0x18')],function(_0x4997df){return{'model':db[_0x4997df['model']],'as':_0x4997df['as'],'attributes':_0x4997df[_0xb0a6('0x16')],'include':_0x4997df[_0xb0a6('0x18')]?_['map'](_0x4997df[_0xb0a6('0x18')],function(_0x24574a){return{'model':db[_0x24574a[_0xb0a6('0x19')]],'as':_0x24574a['as'],'attributes':_0x24574a[_0xb0a6('0x16')],'include':_0x24574a['include']?_['map'](_0x24574a[_0xb0a6('0x18')],function(_0x1e9947){return{'model':db[_0x1e9947[_0xb0a6('0x19')]],'as':_0x1e9947['as'],'attributes':_0x1e9947['attributes']};}):[]};}):[]};}):[]:[]})[_0xb0a6('0x1a')](function(_0x3347ac){logger[_0xb0a6('0x8')](_0xb0a6('0x10'),_0x18f994);logger[_0xb0a6('0x1b')](_0xb0a6('0x10'),_0x18f994,JSON[_0xb0a6('0x1c')](_0x3347ac));_0x13a1c8(_0x3347ac);})[_0xb0a6('0x1d')](function(_0x4255b9){logger['error'](_0xb0a6('0x10'),_0x4255b9[_0xb0a6('0xe')],_0x18f994);_0x567dd5(_0x10f504[_0xb0a6('0xc')](0x1f4,_0x4255b9['message']));});});};exports[_0xb0a6('0x1e')]=function(_0x582fc2){var _0x131e46=this;return new Promise(function(_0x309a91,_0x114f91){return db[_0xb0a6('0x11')][_0xb0a6('0x1f')]({'raw':_0x582fc2[_0xb0a6('0x13')]?_0x582fc2[_0xb0a6('0x13')][_0xb0a6('0x14')]===undefined?!![]:![]:!![],'where':_0x582fc2[_0xb0a6('0x13')]?_0x582fc2[_0xb0a6('0x13')]['where']||null:null,'attributes':_0x582fc2['options']?_0x582fc2[_0xb0a6('0x13')][_0xb0a6('0x16')]||null:null,'include':_0x582fc2[_0xb0a6('0x13')]?_0x582fc2[_0xb0a6('0x13')][_0xb0a6('0x18')]?_[_0xb0a6('0x20')](_0x582fc2[_0xb0a6('0x13')][_0xb0a6('0x18')],function(_0x4b0479){return{'model':db[_0x4b0479[_0xb0a6('0x19')]],'as':_0x4b0479['as'],'attributes':_0x4b0479[_0xb0a6('0x16')],'include':_0x4b0479['include']?_[_0xb0a6('0x20')](_0x4b0479[_0xb0a6('0x18')],function(_0x52e397){return{'model':db[_0x52e397['model']],'as':_0x52e397['as'],'attributes':_0x52e397[_0xb0a6('0x16')],'include':_0x52e397[_0xb0a6('0x18')]?_[_0xb0a6('0x20')](_0x52e397[_0xb0a6('0x18')],function(_0x4310ae){return{'model':db[_0x4310ae[_0xb0a6('0x19')]],'as':_0x4310ae['as'],'attributes':_0x4310ae['attributes']};}):[]};}):[]};}):[]:[]})[_0xb0a6('0x1a')](function(_0x5c280e){logger[_0xb0a6('0x8')](_0xb0a6('0x1e'),_0x582fc2);logger['debug']('ShowFreshsalesAccount',_0x582fc2,JSON['stringify'](_0x5c280e));_0x309a91(_0x5c280e);})[_0xb0a6('0x1d')](function(_0xd484f){logger[_0xb0a6('0xc')](_0xb0a6('0x1e'),_0xd484f[_0xb0a6('0xe')],_0x582fc2);_0x114f91(_0x131e46['error'](0x1f4,_0xd484f[_0xb0a6('0xe')]));});});};
\ No newline at end of file
+var _0x781d=['model','map','GetFreshsalesAccount','find','ShowFreshsalesAccount','stringify','lodash','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','FreshsalesAccount,\x20%s,\x20%s','debug','FreshsalesAccount,\x20%s,\x20%s,\x20%s','error','code','message','request\x20sent','result','catch','FreshsalesAccount','findAll','options','where','attributes','limit','include'];(function(_0x2df724,_0x411382){var _0x1b2504=function(_0x1d3cd1){while(--_0x1d3cd1){_0x2df724['push'](_0x2df724['shift']());}};_0x1b2504(++_0x411382);}(_0x781d,0x14a));var _0xd781=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0x781d[_0xbca1b1];return _0x4e1686;};'use strict';var _=require(_0xd781('0x0'));var util=require(_0xd781('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xd781('0x2'));var fs=require('fs');var Redis=require(_0xd781('0x3'));var db=require(_0xd781('0x4'))['db'];var utils=require(_0xd781('0x5'));var logger=require(_0xd781('0x6'))(_0xd781('0x7'));var config=require(_0xd781('0x8'));var jayson=require(_0xd781('0x9'));var client=jayson[_0xd781('0xa')][_0xd781('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5a07f0,_0x133509,_0x1a242d){return new BPromise(function(_0x50610d,_0x248172){return client['request'](_0x5a07f0,_0x1a242d)[_0xd781('0xc')](function(_0x5c18c8){logger[_0xd781('0xd')](_0xd781('0xe'),_0x133509,'request\x20sent');logger[_0xd781('0xf')](_0xd781('0x10'),_0x133509,'request\x20sent',JSON['stringify'](_0x5c18c8));if(_0x5c18c8[_0xd781('0x11')]){if(_0x5c18c8[_0xd781('0x11')][_0xd781('0x12')]===0x1f4){logger[_0xd781('0x11')](_0xd781('0xe'),_0x133509,_0x5c18c8[_0xd781('0x11')][_0xd781('0x13')]);return _0x248172(_0x5c18c8[_0xd781('0x11')][_0xd781('0x13')]);}logger[_0xd781('0x11')](_0xd781('0xe'),_0x133509,_0x5c18c8['error'][_0xd781('0x13')]);return _0x50610d(_0x5c18c8[_0xd781('0x11')]['message']);}else{logger[_0xd781('0xd')]('FreshsalesAccount,\x20%s,\x20%s',_0x133509,_0xd781('0x14'));_0x50610d(_0x5c18c8[_0xd781('0x15')][_0xd781('0x13')]);}})[_0xd781('0x16')](function(_0x42a9c1){logger[_0xd781('0x11')](_0xd781('0xe'),_0x133509,_0x42a9c1);_0x248172(_0x42a9c1);});});}exports['GetFreshsalesAccount']=function(_0x1407fc){var _0x3f2922=this;return new Promise(function(_0x395d9c,_0x2f1273){return db[_0xd781('0x17')][_0xd781('0x18')]({'raw':_0x1407fc[_0xd781('0x19')]?_0x1407fc[_0xd781('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x1407fc[_0xd781('0x19')]?_0x1407fc[_0xd781('0x19')][_0xd781('0x1a')]||null:null,'attributes':_0x1407fc[_0xd781('0x19')]?_0x1407fc[_0xd781('0x19')][_0xd781('0x1b')]||null:null,'limit':_0x1407fc[_0xd781('0x19')]?_0x1407fc['options'][_0xd781('0x1c')]||null:null,'include':_0x1407fc['options']?_0x1407fc['options'][_0xd781('0x1d')]?_['map'](_0x1407fc[_0xd781('0x19')][_0xd781('0x1d')],function(_0x395087){return{'model':db[_0x395087[_0xd781('0x1e')]],'as':_0x395087['as'],'attributes':_0x395087[_0xd781('0x1b')],'include':_0x395087[_0xd781('0x1d')]?_[_0xd781('0x1f')](_0x395087[_0xd781('0x1d')],function(_0x10940b){return{'model':db[_0x10940b['model']],'as':_0x10940b['as'],'attributes':_0x10940b['attributes'],'include':_0x10940b[_0xd781('0x1d')]?_[_0xd781('0x1f')](_0x10940b[_0xd781('0x1d')],function(_0x57b41e){return{'model':db[_0x57b41e[_0xd781('0x1e')]],'as':_0x57b41e['as'],'attributes':_0x57b41e['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x1e29c8){logger['info'](_0xd781('0x20'),_0x1407fc);logger[_0xd781('0xf')]('GetFreshsalesAccount',_0x1407fc,JSON['stringify'](_0x1e29c8));_0x395d9c(_0x1e29c8);})[_0xd781('0x16')](function(_0x5b0464){logger[_0xd781('0x11')]('GetFreshsalesAccount',_0x5b0464[_0xd781('0x13')],_0x1407fc);_0x2f1273(_0x3f2922[_0xd781('0x11')](0x1f4,_0x5b0464['message']));});});};exports['ShowFreshsalesAccount']=function(_0x432d14){var _0x29e81a=this;return new Promise(function(_0x1c7d83,_0x5a389c){return db['FreshsalesAccount'][_0xd781('0x21')]({'raw':_0x432d14[_0xd781('0x19')]?_0x432d14[_0xd781('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x432d14['options']?_0x432d14[_0xd781('0x19')][_0xd781('0x1a')]||null:null,'attributes':_0x432d14['options']?_0x432d14[_0xd781('0x19')][_0xd781('0x1b')]||null:null,'include':_0x432d14['options']?_0x432d14[_0xd781('0x19')][_0xd781('0x1d')]?_[_0xd781('0x1f')](_0x432d14[_0xd781('0x19')]['include'],function(_0x23dffb){return{'model':db[_0x23dffb[_0xd781('0x1e')]],'as':_0x23dffb['as'],'attributes':_0x23dffb[_0xd781('0x1b')],'include':_0x23dffb[_0xd781('0x1d')]?_['map'](_0x23dffb[_0xd781('0x1d')],function(_0x3f20e2){return{'model':db[_0x3f20e2['model']],'as':_0x3f20e2['as'],'attributes':_0x3f20e2[_0xd781('0x1b')],'include':_0x3f20e2['include']?_[_0xd781('0x1f')](_0x3f20e2[_0xd781('0x1d')],function(_0x57fdb6){return{'model':db[_0x57fdb6[_0xd781('0x1e')]],'as':_0x57fdb6['as'],'attributes':_0x57fdb6[_0xd781('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2a29b7){logger['info'](_0xd781('0x22'),_0x432d14);logger[_0xd781('0xf')]('ShowFreshsalesAccount',_0x432d14,JSON[_0xd781('0x23')](_0x2a29b7));_0x1c7d83(_0x2a29b7);})[_0xd781('0x16')](function(_0x5651de){logger[_0xd781('0x11')](_0xd781('0x22'),_0x5651de[_0xd781('0x13')],_0x432d14);_0x5a389c(_0x29e81a['error'](0x1f4,_0x5651de[_0xd781('0x13')]));});});};
\ No newline at end of file
index bf58b5c..6462e55 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x09b5=['/:id/descriptions','getDescriptions','/:id/fields','getFields','post','create','put','update','delete','destroy','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','isAuthenticated','index','get','/:id','/:id/subjects'];(function(_0x33bc64,_0x4d1e92){var _0x3fdd34=function(_0x4b40a4){while(--_0x4b40a4){_0x33bc64['push'](_0x33bc64['shift']());}};_0x3fdd34(++_0x4d1e92);}(_0x09b5,0x1d8));var _0x509b=function(_0x329f83,_0x15aeac){_0x329f83=_0x329f83-0x0;var _0x5c9cdc=_0x09b5[_0x329f83];return _0x5c9cdc;};'use strict';var multer=require('multer');var util=require(_0x509b('0x0'));var path=require(_0x509b('0x1'));var timeout=require(_0x509b('0x2'));var express=require(_0x509b('0x3'));var router=express['Router']();var fs_extra=require(_0x509b('0x4'));var auth=require(_0x509b('0x5'));var interaction=require(_0x509b('0x6'));var config=require('../../config/environment');var controller=require('./intFreshsalesConfiguration.controller');router['get']('/',auth[_0x509b('0x7')](),controller[_0x509b('0x8')]);router[_0x509b('0x9')](_0x509b('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x509b('0x9')](_0x509b('0xb'),auth[_0x509b('0x7')](),controller['getSubjects']);router['get'](_0x509b('0xc'),auth[_0x509b('0x7')](),controller[_0x509b('0xd')]);router[_0x509b('0x9')](_0x509b('0xe'),auth[_0x509b('0x7')](),controller[_0x509b('0xf')]);router[_0x509b('0x10')]('/',auth[_0x509b('0x7')](),controller[_0x509b('0x11')]);router[_0x509b('0x12')](_0x509b('0xa'),auth['isAuthenticated'](),controller[_0x509b('0x13')]);router[_0x509b('0x14')](_0x509b('0xa'),auth[_0x509b('0x7')](),controller[_0x509b('0x15')]);module['exports']=router;
\ No newline at end of file
+var _0x78e4=['post','create','put','/:id','exports','multer','fs-extra','../../components/auth/service','../../config/environment','./intFreshsalesConfiguration.controller','get','isAuthenticated','show','getDescriptions','/:id/fields'];(function(_0x3c21d5,_0x358976){var _0x46f1fe=function(_0xe6f65a){while(--_0xe6f65a){_0x3c21d5['push'](_0x3c21d5['shift']());}};_0x46f1fe(++_0x358976);}(_0x78e4,0x1a9));var _0x478e=function(_0x36c5b0,_0x5001da){_0x36c5b0=_0x36c5b0-0x0;var _0xf19333=_0x78e4[_0x36c5b0];return _0xf19333;};'use strict';var multer=require(_0x478e('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0x478e('0x1'));var auth=require(_0x478e('0x2'));var interaction=require('../../components/interaction/service');var config=require(_0x478e('0x3'));var controller=require(_0x478e('0x4'));router[_0x478e('0x5')]('/',auth[_0x478e('0x6')](),controller['index']);router['get']('/:id',auth[_0x478e('0x6')](),controller[_0x478e('0x7')]);router[_0x478e('0x5')]('/:id/subjects',auth['isAuthenticated'](),controller['getSubjects']);router[_0x478e('0x5')]('/:id/descriptions',auth[_0x478e('0x6')](),controller[_0x478e('0x8')]);router[_0x478e('0x5')](_0x478e('0x9'),auth[_0x478e('0x6')](),controller['getFields']);router[_0x478e('0xa')]('/',auth['isAuthenticated'](),controller[_0x478e('0xb')]);router[_0x478e('0xc')](_0x478e('0xd'),auth[_0x478e('0x6')](),controller['update']);router['delete'](_0x478e('0xd'),auth['isAuthenticated'](),controller['destroy']);module[_0x478e('0xe')]=router;
\ No newline at end of file
index e39def5..13407f0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd552=['STRING'];(function(_0x24f862,_0x4b645a){var _0x198aa4=function(_0x131195){while(--_0x131195){_0x24f862['push'](_0x24f862['shift']());}};_0x198aa4(++_0x4b645a);}(_0xd552,0xdc));var _0x2d55=function(_0x37417f,_0x3d7161){_0x37417f=_0x37417f-0x0;var _0x467c89=_0xd552[_0x37417f];return _0x467c89;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x2d55('0x0')]},'description':{'type':Sequelize[_0x2d55('0x0')]}};
\ No newline at end of file
+var _0x8a13=['STRING','sequelize','exports'];(function(_0x4a1ec0,_0x26287b){var _0x49ab91=function(_0x206584){while(--_0x206584){_0x4a1ec0['push'](_0x4a1ec0['shift']());}};_0x49ab91(++_0x26287b);}(_0x8a13,0xe5));var _0x38a1=function(_0x42acfc,_0x349f46){_0x42acfc=_0x42acfc-0x0;var _0x24b053=_0x8a13[_0x42acfc];return _0x24b053;};'use strict';var Sequelize=require(_0x38a1('0x0'));module[_0x38a1('0x1')]={'name':{'type':Sequelize[_0x38a1('0x2')]},'description':{'type':Sequelize[_0x38a1('0x2')]}};
\ No newline at end of file
index b1a1073..738e7a9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd90d=['fields','length','order','sort','pick','filter','where','merge','type','VIRTUAL','options','FreshsalesConfiguration','includeAll','include','findAll','show','params','keys','find','catch','create','body','getSubjects','findOne','FreshsalesField','hasOwnProperty','nolimit','getDescriptions','getFields','eml-format','fast-json-patch','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','save','update','then','destroy','stack','name','send','index','map','rawAttributes','fieldName','key','query','filters','intersection','model','attributes'];(function(_0x1b51ea,_0x394fd9){var _0x18bbdc=function(_0x45b83f){while(--_0x45b83f){_0x1b51ea['push'](_0x1b51ea['shift']());}};_0x18bbdc(++_0x394fd9);}(_0xd90d,0x165));var _0xdd90=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0xd90d[_0x2dafbe];return _0x58a45a;};'use strict';var emlformat=require(_0xdd90('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xdd90('0x1'));var rp=require('request-promise');var moment=require(_0xdd90('0x2'));var BPromise=require(_0xdd90('0x3'));var Mustache=require(_0xdd90('0x4'));var util=require(_0xdd90('0x5'));var path=require(_0xdd90('0x6'));var sox=require(_0xdd90('0x7'));var csv=require('to-csv');var ejs=require(_0xdd90('0x8'));var fs=require('fs');var fs_extra=require(_0xdd90('0x9'));var _=require(_0xdd90('0xa'));var squel=require(_0xdd90('0xb'));var crypto=require(_0xdd90('0xc'));var jsforce=require(_0xdd90('0xd'));var deskjs=require(_0xdd90('0xe'));var toCsv=require(_0xdd90('0xf'));var querystring=require('querystring');var Papa=require(_0xdd90('0x10'));var Redis=require(_0xdd90('0x11'));var authService=require(_0xdd90('0x12'));var qs=require(_0xdd90('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xdd90('0x14'));var logger=require(_0xdd90('0x15'))('api');var utils=require(_0xdd90('0x16'));var config=require(_0xdd90('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0xdd90('0x18'))['db'];function respondWithStatusCode(_0x42efce,_0x4ca7fa){_0x4ca7fa=_0x4ca7fa||0xcc;return function(_0x35369d){if(_0x35369d){return _0x42efce[_0xdd90('0x19')](_0x4ca7fa);}return _0x42efce[_0xdd90('0x1a')](_0x4ca7fa)[_0xdd90('0x1b')]();};}function respondWithResult(_0x4ea8dc,_0x40fe7d){_0x40fe7d=_0x40fe7d||0xc8;return function(_0x376d1e){if(_0x376d1e){return _0x4ea8dc[_0xdd90('0x1a')](_0x40fe7d)[_0xdd90('0x1c')](_0x376d1e);}};}function respondWithFilteredResult(_0xc7b932,_0x49035f){return function(_0x4252da){if(_0x4252da){var _0x5e6c0d=typeof _0x49035f['offset']===_0xdd90('0x1d')&&typeof _0x49035f[_0xdd90('0x1e')]===_0xdd90('0x1d');var _0x1265c2=_0x4252da[_0xdd90('0x1f')];var _0x2ab8b4=_0x5e6c0d?0x0:_0x49035f[_0xdd90('0x20')];var _0x1b329c=_0x5e6c0d?_0x4252da[_0xdd90('0x1f')]:_0x49035f[_0xdd90('0x20')]+_0x49035f[_0xdd90('0x1e')];var _0x15adad;if(_0x1b329c>=_0x1265c2){_0x1b329c=_0x1265c2;_0x15adad=0xc8;}else{_0x15adad=0xce;}_0xc7b932[_0xdd90('0x1a')](_0x15adad);return _0xc7b932[_0xdd90('0x21')](_0xdd90('0x22'),_0x2ab8b4+'-'+_0x1b329c+'/'+_0x1265c2)['json'](_0x4252da);}return null;};}function patchUpdates(_0x49f53c){return function(_0x2c2234){try{jsonpatch[_0xdd90('0x23')](_0x2c2234,_0x49f53c,!![]);}catch(_0x8627fd){return BPromise['reject'](_0x8627fd);}return _0x2c2234[_0xdd90('0x24')]();};}function saveUpdates(_0x21b365,_0x4ddcff){return function(_0x181b87){if(_0x181b87){return _0x181b87[_0xdd90('0x25')](_0x21b365)[_0xdd90('0x26')](function(_0x47c59f){return _0x47c59f;});}return null;};}function removeEntity(_0x1d684d,_0xee22d0){return function(_0xc6db4d){if(_0xc6db4d){return _0xc6db4d[_0xdd90('0x27')]()[_0xdd90('0x26')](function(){_0x1d684d[_0xdd90('0x1a')](0xcc)[_0xdd90('0x1b')]();});}};}function handleEntityNotFound(_0x288042,_0x5e2786){return function(_0x2244a4){if(!_0x2244a4){_0x288042['sendStatus'](0x194);}return _0x2244a4;};}function handleError(_0x3161d7,_0x125770){_0x125770=_0x125770||0x1f4;return function(_0x13596e){logger['error'](_0x13596e[_0xdd90('0x28')]);if(_0x13596e['name']){delete _0x13596e[_0xdd90('0x29')];}_0x3161d7['status'](_0x125770)[_0xdd90('0x2a')](_0x13596e);};}exports[_0xdd90('0x2b')]=function(_0x23df41,_0xa18bae){var _0xcda189={},_0xfd499f={},_0x3b28ce={'count':0x0,'rows':[]};var _0x382ad8=_[_0xdd90('0x2c')](db['FreshsalesConfiguration'][_0xdd90('0x2d')],function(_0xbce9b0){return{'name':_0xbce9b0[_0xdd90('0x2e')],'type':_0xbce9b0['type'][_0xdd90('0x2f')]};});_0xfd499f['model']=_['map'](_0x382ad8,'name');_0xfd499f[_0xdd90('0x30')]=_['keys'](_0x23df41[_0xdd90('0x30')]);_0xfd499f[_0xdd90('0x31')]=_[_0xdd90('0x32')](_0xfd499f[_0xdd90('0x33')],_0xfd499f[_0xdd90('0x30')]);_0xcda189[_0xdd90('0x34')]=_[_0xdd90('0x32')](_0xfd499f[_0xdd90('0x33')],qs[_0xdd90('0x35')](_0x23df41[_0xdd90('0x30')][_0xdd90('0x35')]));_0xcda189[_0xdd90('0x34')]=_0xcda189[_0xdd90('0x34')][_0xdd90('0x36')]?_0xcda189['attributes']:_0xfd499f['model'];if(!_0x23df41[_0xdd90('0x30')]['hasOwnProperty']('nolimit')){_0xcda189['limit']=qs[_0xdd90('0x1e')](_0x23df41[_0xdd90('0x30')][_0xdd90('0x1e')]);_0xcda189['offset']=qs[_0xdd90('0x20')](_0x23df41[_0xdd90('0x30')]['offset']);}_0xcda189[_0xdd90('0x37')]=qs['sort'](_0x23df41[_0xdd90('0x30')][_0xdd90('0x38')]);_0xcda189['where']=qs['filters'](_[_0xdd90('0x39')](_0x23df41[_0xdd90('0x30')],_0xfd499f[_0xdd90('0x31')]),_0x382ad8);if(_0x23df41[_0xdd90('0x30')][_0xdd90('0x3a')]){_0xcda189[_0xdd90('0x3b')]=_[_0xdd90('0x3c')](_0xcda189[_0xdd90('0x3b')],{'$or':_[_0xdd90('0x2c')](_0x382ad8,function(_0x4ed71a){if(_0x4ed71a[_0xdd90('0x3d')]!==_0xdd90('0x3e')){var _0x119e82={};_0x119e82[_0x4ed71a[_0xdd90('0x29')]]={'$like':'%'+_0x23df41['query'][_0xdd90('0x3a')]+'%'};return _0x119e82;}})});}_0xcda189=_[_0xdd90('0x3c')]({},_0xcda189,_0x23df41[_0xdd90('0x3f')]);var _0x1174ca={'where':_0xcda189[_0xdd90('0x3b')]};return db[_0xdd90('0x40')][_0xdd90('0x1f')](_0x1174ca)['then'](function(_0x15e79c){_0x3b28ce['count']=_0x15e79c;if(_0x23df41[_0xdd90('0x30')][_0xdd90('0x41')]){_0xcda189[_0xdd90('0x42')]=[{'all':!![]}];}return db[_0xdd90('0x40')][_0xdd90('0x43')](_0xcda189);})[_0xdd90('0x26')](function(_0x14df13){_0x3b28ce['rows']=_0x14df13;return _0x3b28ce;})[_0xdd90('0x26')](respondWithFilteredResult(_0xa18bae,_0xcda189))['catch'](handleError(_0xa18bae,null));};exports[_0xdd90('0x44')]=function(_0x1e7edb,_0x389e9b){var _0x5a46bf={'raw':![],'where':{'id':_0x1e7edb[_0xdd90('0x45')]['id']}},_0x505123={};_0x505123[_0xdd90('0x33')]=_[_0xdd90('0x46')](db[_0xdd90('0x40')][_0xdd90('0x2d')]);_0x505123[_0xdd90('0x30')]=_[_0xdd90('0x46')](_0x1e7edb[_0xdd90('0x30')]);_0x505123['filters']=_[_0xdd90('0x32')](_0x505123[_0xdd90('0x33')],_0x505123[_0xdd90('0x30')]);_0x5a46bf['attributes']=_[_0xdd90('0x32')](_0x505123['model'],qs[_0xdd90('0x35')](_0x1e7edb['query'][_0xdd90('0x35')]));_0x5a46bf['attributes']=_0x5a46bf['attributes'][_0xdd90('0x36')]?_0x5a46bf['attributes']:_0x505123['model'];if(_0x1e7edb[_0xdd90('0x30')][_0xdd90('0x41')]){_0x5a46bf[_0xdd90('0x42')]=[{'all':!![]}];}_0x5a46bf=_[_0xdd90('0x3c')]({},_0x5a46bf,_0x1e7edb['options']);return db[_0xdd90('0x40')][_0xdd90('0x47')](_0x5a46bf)['then'](handleEntityNotFound(_0x389e9b,null))[_0xdd90('0x26')](respondWithResult(_0x389e9b,null))[_0xdd90('0x48')](handleError(_0x389e9b,null));};exports[_0xdd90('0x49')]=function(_0x3c439d,_0x4af7a2){return db[_0xdd90('0x40')][_0xdd90('0x49')](_0x3c439d[_0xdd90('0x4a')],{})[_0xdd90('0x26')](respondWithResult(_0x4af7a2,0xc9))[_0xdd90('0x48')](handleError(_0x4af7a2,null));};exports[_0xdd90('0x25')]=function(_0x3bbf8f,_0x598f69){if(_0x3bbf8f['body']['id']){delete _0x3bbf8f[_0xdd90('0x4a')]['id'];}return db[_0xdd90('0x40')]['find']({'where':{'id':_0x3bbf8f['params']['id']}})[_0xdd90('0x26')](handleEntityNotFound(_0x598f69,null))['then'](saveUpdates(_0x3bbf8f[_0xdd90('0x4a')],null))[_0xdd90('0x26')](respondWithResult(_0x598f69,null))['catch'](handleError(_0x598f69,null));};exports[_0xdd90('0x27')]=function(_0x4fcd36,_0x18636f){return db['FreshsalesConfiguration'][_0xdd90('0x47')]({'where':{'id':_0x4fcd36['params']['id']}})[_0xdd90('0x26')](handleEntityNotFound(_0x18636f,null))[_0xdd90('0x26')](removeEntity(_0x18636f,null))['catch'](handleError(_0x18636f,null));};exports[_0xdd90('0x4b')]=function(_0x1836d2,_0x59092e,_0x57acf8){var _0x3c0ed7={};var _0x32b3c8={};var _0x3f2348;var _0x1bd4da;return db[_0xdd90('0x40')][_0xdd90('0x4c')]({'where':{'id':_0x1836d2[_0xdd90('0x45')]['id']}})[_0xdd90('0x26')](handleEntityNotFound(_0x59092e,null))[_0xdd90('0x26')](function(_0x60f0e5){if(_0x60f0e5){_0x3f2348=_0x60f0e5;_0x32b3c8['model']=_['keys'](db[_0xdd90('0x4d')][_0xdd90('0x2d')]);_0x32b3c8[_0xdd90('0x30')]=_['keys'](_0x1836d2[_0xdd90('0x30')]);_0x32b3c8['filters']=_[_0xdd90('0x32')](_0x32b3c8[_0xdd90('0x33')],_0x32b3c8[_0xdd90('0x30')]);_0x3c0ed7[_0xdd90('0x34')]=_[_0xdd90('0x32')](_0x32b3c8[_0xdd90('0x33')],qs[_0xdd90('0x35')](_0x1836d2[_0xdd90('0x30')][_0xdd90('0x35')]));_0x3c0ed7['attributes']=_0x3c0ed7[_0xdd90('0x34')][_0xdd90('0x36')]?_0x3c0ed7[_0xdd90('0x34')]:_0x32b3c8[_0xdd90('0x33')];_0x3c0ed7[_0xdd90('0x37')]=qs[_0xdd90('0x38')](_0x1836d2[_0xdd90('0x30')]['sort']);_0x3c0ed7[_0xdd90('0x3b')]=qs[_0xdd90('0x31')](_[_0xdd90('0x39')](_0x1836d2[_0xdd90('0x30')],_0x32b3c8[_0xdd90('0x31')]));if(_0x1836d2[_0xdd90('0x30')]['filter']){_0x3c0ed7[_0xdd90('0x3b')]=_['merge'](_0x3c0ed7[_0xdd90('0x3b')],{'$or':_['map'](_0x3c0ed7[_0xdd90('0x34')],function(_0x671179){var _0x189fee={};_0x189fee[_0x671179]={'$like':'%'+_0x1836d2[_0xdd90('0x30')][_0xdd90('0x3a')]+'%'};return _0x189fee;})});}_0x3c0ed7=_[_0xdd90('0x3c')]({},_0x3c0ed7,_0x1836d2[_0xdd90('0x3f')]);return _0x3f2348[_0xdd90('0x4b')](_0x3c0ed7);}})[_0xdd90('0x26')](function(_0x4d402c){if(_0x4d402c){_0x1bd4da=_0x4d402c['length'];if(!_0x1836d2[_0xdd90('0x30')][_0xdd90('0x4e')](_0xdd90('0x4f'))){_0x3c0ed7['limit']=qs[_0xdd90('0x1e')](_0x1836d2['query']['limit']);_0x3c0ed7[_0xdd90('0x20')]=qs[_0xdd90('0x20')](_0x1836d2[_0xdd90('0x30')]['offset']);}return _0x3f2348[_0xdd90('0x4b')](_0x3c0ed7);}})[_0xdd90('0x26')](function(_0x1e0e4c){if(_0x1e0e4c){return _0x1e0e4c?{'count':_0x1bd4da,'rows':_0x1e0e4c}:null;}})[_0xdd90('0x26')](respondWithResult(_0x59092e,null))['catch'](handleError(_0x59092e,null));};exports[_0xdd90('0x50')]=function(_0x401e73,_0x5a8fdb,_0x742deb){var _0x2df0a8={};var _0x45e164={};var _0x34648c;var _0x4db9d9;return db['FreshsalesConfiguration'][_0xdd90('0x4c')]({'where':{'id':_0x401e73[_0xdd90('0x45')]['id']}})[_0xdd90('0x26')](handleEntityNotFound(_0x5a8fdb,null))[_0xdd90('0x26')](function(_0x4e5c30){if(_0x4e5c30){_0x34648c=_0x4e5c30;_0x45e164['model']=_[_0xdd90('0x46')](db[_0xdd90('0x4d')][_0xdd90('0x2d')]);_0x45e164[_0xdd90('0x30')]=_[_0xdd90('0x46')](_0x401e73['query']);_0x45e164[_0xdd90('0x31')]=_[_0xdd90('0x32')](_0x45e164[_0xdd90('0x33')],_0x45e164['query']);_0x2df0a8[_0xdd90('0x34')]=_[_0xdd90('0x32')](_0x45e164[_0xdd90('0x33')],qs['fields'](_0x401e73['query'][_0xdd90('0x35')]));_0x2df0a8['attributes']=_0x2df0a8[_0xdd90('0x34')][_0xdd90('0x36')]?_0x2df0a8[_0xdd90('0x34')]:_0x45e164['model'];_0x2df0a8[_0xdd90('0x37')]=qs[_0xdd90('0x38')](_0x401e73['query'][_0xdd90('0x38')]);_0x2df0a8[_0xdd90('0x3b')]=qs[_0xdd90('0x31')](_[_0xdd90('0x39')](_0x401e73[_0xdd90('0x30')],_0x45e164[_0xdd90('0x31')]));if(_0x401e73[_0xdd90('0x30')][_0xdd90('0x3a')]){_0x2df0a8[_0xdd90('0x3b')]=_['merge'](_0x2df0a8[_0xdd90('0x3b')],{'$or':_[_0xdd90('0x2c')](_0x2df0a8[_0xdd90('0x34')],function(_0x310043){var _0x698854={};_0x698854[_0x310043]={'$like':'%'+_0x401e73[_0xdd90('0x30')][_0xdd90('0x3a')]+'%'};return _0x698854;})});}_0x2df0a8=_[_0xdd90('0x3c')]({},_0x2df0a8,_0x401e73[_0xdd90('0x3f')]);return _0x34648c[_0xdd90('0x50')](_0x2df0a8);}})[_0xdd90('0x26')](function(_0x27c11c){if(_0x27c11c){_0x4db9d9=_0x27c11c['length'];if(!_0x401e73[_0xdd90('0x30')]['hasOwnProperty'](_0xdd90('0x4f'))){_0x2df0a8[_0xdd90('0x1e')]=qs[_0xdd90('0x1e')](_0x401e73[_0xdd90('0x30')]['limit']);_0x2df0a8['offset']=qs[_0xdd90('0x20')](_0x401e73['query']['offset']);}return _0x34648c[_0xdd90('0x50')](_0x2df0a8);}})[_0xdd90('0x26')](function(_0x588ed4){if(_0x588ed4){return _0x588ed4?{'count':_0x4db9d9,'rows':_0x588ed4}:null;}})[_0xdd90('0x26')](respondWithResult(_0x5a8fdb,null))[_0xdd90('0x48')](handleError(_0x5a8fdb,null));};exports[_0xdd90('0x51')]=function(_0x2039fc,_0x248340,_0x3d74f7){var _0x4812bf={};var _0x156af4={};var _0x40da01;var _0x247cdb;return db[_0xdd90('0x40')][_0xdd90('0x4c')]({'where':{'id':_0x2039fc[_0xdd90('0x45')]['id']}})[_0xdd90('0x26')](handleEntityNotFound(_0x248340,null))[_0xdd90('0x26')](function(_0x4dd534){if(_0x4dd534){_0x40da01=_0x4dd534;_0x156af4[_0xdd90('0x33')]=_[_0xdd90('0x46')](db[_0xdd90('0x4d')][_0xdd90('0x2d')]);_0x156af4[_0xdd90('0x30')]=_[_0xdd90('0x46')](_0x2039fc['query']);_0x156af4[_0xdd90('0x31')]=_['intersection'](_0x156af4['model'],_0x156af4[_0xdd90('0x30')]);_0x4812bf[_0xdd90('0x34')]=_[_0xdd90('0x32')](_0x156af4[_0xdd90('0x33')],qs[_0xdd90('0x35')](_0x2039fc[_0xdd90('0x30')][_0xdd90('0x35')]));_0x4812bf['attributes']=_0x4812bf[_0xdd90('0x34')][_0xdd90('0x36')]?_0x4812bf['attributes']:_0x156af4['model'];_0x4812bf['order']=qs['sort'](_0x2039fc[_0xdd90('0x30')][_0xdd90('0x38')]);_0x4812bf[_0xdd90('0x3b')]=qs[_0xdd90('0x31')](_[_0xdd90('0x39')](_0x2039fc[_0xdd90('0x30')],_0x156af4[_0xdd90('0x31')]));if(_0x2039fc[_0xdd90('0x30')][_0xdd90('0x3a')]){_0x4812bf[_0xdd90('0x3b')]=_[_0xdd90('0x3c')](_0x4812bf['where'],{'$or':_[_0xdd90('0x2c')](_0x4812bf[_0xdd90('0x34')],function(_0x98227a){var _0x355ee8={};_0x355ee8[_0x98227a]={'$like':'%'+_0x2039fc[_0xdd90('0x30')][_0xdd90('0x3a')]+'%'};return _0x355ee8;})});}_0x4812bf=_[_0xdd90('0x3c')]({},_0x4812bf,_0x2039fc['options']);return _0x40da01[_0xdd90('0x51')](_0x4812bf);}})[_0xdd90('0x26')](function(_0x48aa72){if(_0x48aa72){_0x247cdb=_0x48aa72[_0xdd90('0x36')];if(!_0x2039fc[_0xdd90('0x30')][_0xdd90('0x4e')](_0xdd90('0x4f'))){_0x4812bf[_0xdd90('0x1e')]=qs[_0xdd90('0x1e')](_0x2039fc['query']['limit']);_0x4812bf['offset']=qs[_0xdd90('0x20')](_0x2039fc[_0xdd90('0x30')][_0xdd90('0x20')]);}return _0x40da01[_0xdd90('0x51')](_0x4812bf);}})[_0xdd90('0x26')](function(_0x2f86cb){if(_0x2f86cb){return _0x2f86cb?{'count':_0x247cdb,'rows':_0x2f86cb}:null;}})[_0xdd90('0x26')](respondWithResult(_0x248340,null))['catch'](handleError(_0x248340,null));};
\ No newline at end of file
+var _0x0fcc=['util','path','sox','ejs','fs-extra','lodash','jsforce','desk.js','to-csv','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','json','offset','undefined','limit','count','status','set','then','error','stack','name','send','index','key','model','map','keys','filters','query','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','merge','where','type','options','FreshsalesConfiguration','includeAll','findAll','rows','catch','show','params','include','find','create','body','update','getSubjects','findOne','FreshsalesField','rawAttributes','getDescriptions','getFields','zip-dir','request-promise','moment','bluebird','mustache'];(function(_0x346737,_0x3e6081){var _0x1ade2e=function(_0x15e50e){while(--_0x15e50e){_0x346737['push'](_0x346737['shift']());}};_0x1ade2e(++_0x3e6081);}(_0x0fcc,0x8f));var _0xc0fc=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0x0fcc[_0x3ab51d];return _0x29a04e;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xc0fc('0x0'));var jsonpatch=require('fast-json-patch');var rp=require(_0xc0fc('0x1'));var moment=require(_0xc0fc('0x2'));var BPromise=require(_0xc0fc('0x3'));var Mustache=require(_0xc0fc('0x4'));var util=require(_0xc0fc('0x5'));var path=require(_0xc0fc('0x6'));var sox=require(_0xc0fc('0x7'));var csv=require('to-csv');var ejs=require(_0xc0fc('0x8'));var fs=require('fs');var fs_extra=require(_0xc0fc('0x9'));var _=require(_0xc0fc('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xc0fc('0xb'));var deskjs=require(_0xc0fc('0xc'));var toCsv=require(_0xc0fc('0xd'));var querystring=require('querystring');var Papa=require(_0xc0fc('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xc0fc('0xf'));var as=require(_0xc0fc('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xc0fc('0x11'))('api');var utils=require(_0xc0fc('0x12'));var config=require(_0xc0fc('0x13'));var licenseUtil=require(_0xc0fc('0x14'));var db=require(_0xc0fc('0x15'))['db'];function respondWithStatusCode(_0x1bbb49,_0x306e6f){_0x306e6f=_0x306e6f||0xcc;return function(_0xe075c5){if(_0xe075c5){return _0x1bbb49[_0xc0fc('0x16')](_0x306e6f);}return _0x1bbb49['status'](_0x306e6f)['end']();};}function respondWithResult(_0x1363fb,_0x3564a6){_0x3564a6=_0x3564a6||0xc8;return function(_0x287393){if(_0x287393){return _0x1363fb['status'](_0x3564a6)[_0xc0fc('0x17')](_0x287393);}};}function respondWithFilteredResult(_0x72e820,_0x287838){return function(_0x51509b){if(_0x51509b){var _0x1e94f4=typeof _0x287838[_0xc0fc('0x18')]===_0xc0fc('0x19')&&typeof _0x287838[_0xc0fc('0x1a')]==='undefined';var _0x2a38e3=_0x51509b[_0xc0fc('0x1b')];var _0x28aed4=_0x1e94f4?0x0:_0x287838[_0xc0fc('0x18')];var _0x2ae887=_0x1e94f4?_0x51509b['count']:_0x287838['offset']+_0x287838['limit'];var _0x2408d7;if(_0x2ae887>=_0x2a38e3){_0x2ae887=_0x2a38e3;_0x2408d7=0xc8;}else{_0x2408d7=0xce;}_0x72e820[_0xc0fc('0x1c')](_0x2408d7);return _0x72e820[_0xc0fc('0x1d')]('Content-Range',_0x28aed4+'-'+_0x2ae887+'/'+_0x2a38e3)[_0xc0fc('0x17')](_0x51509b);}return null;};}function patchUpdates(_0x57b46f){return function(_0x13913e){try{jsonpatch['apply'](_0x13913e,_0x57b46f,!![]);}catch(_0x89a8c){return BPromise['reject'](_0x89a8c);}return _0x13913e['save']();};}function saveUpdates(_0xa5ce96,_0x4fd934){return function(_0x35f1d7){if(_0x35f1d7){return _0x35f1d7['update'](_0xa5ce96)[_0xc0fc('0x1e')](function(_0x38929c){return _0x38929c;});}return null;};}function removeEntity(_0x40d216,_0x8a5f57){return function(_0x3dca31){if(_0x3dca31){return _0x3dca31['destroy']()[_0xc0fc('0x1e')](function(){_0x40d216[_0xc0fc('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1f35d7,_0x3c2d75){return function(_0x1af6dc){if(!_0x1af6dc){_0x1f35d7[_0xc0fc('0x16')](0x194);}return _0x1af6dc;};}function handleError(_0x100645,_0x50b999){_0x50b999=_0x50b999||0x1f4;return function(_0x54648b){logger[_0xc0fc('0x1f')](_0x54648b[_0xc0fc('0x20')]);if(_0x54648b[_0xc0fc('0x21')]){delete _0x54648b['name'];}_0x100645['status'](_0x50b999)[_0xc0fc('0x22')](_0x54648b);};}exports[_0xc0fc('0x23')]=function(_0x4344f0,_0x1e4102){var _0x204753={},_0x1c8cf2={},_0x566cb8={'count':0x0,'rows':[]};var _0x326353=_['map'](db['FreshsalesConfiguration']['rawAttributes'],function(_0x3deed0){return{'name':_0x3deed0['fieldName'],'type':_0x3deed0['type'][_0xc0fc('0x24')]};});_0x1c8cf2[_0xc0fc('0x25')]=_[_0xc0fc('0x26')](_0x326353,'name');_0x1c8cf2['query']=_[_0xc0fc('0x27')](_0x4344f0['query']);_0x1c8cf2[_0xc0fc('0x28')]=_['intersection'](_0x1c8cf2[_0xc0fc('0x25')],_0x1c8cf2[_0xc0fc('0x29')]);_0x204753[_0xc0fc('0x2a')]=_[_0xc0fc('0x2b')](_0x1c8cf2[_0xc0fc('0x25')],qs[_0xc0fc('0x2c')](_0x4344f0['query'][_0xc0fc('0x2c')]));_0x204753[_0xc0fc('0x2a')]=_0x204753[_0xc0fc('0x2a')][_0xc0fc('0x2d')]?_0x204753[_0xc0fc('0x2a')]:_0x1c8cf2[_0xc0fc('0x25')];if(!_0x4344f0[_0xc0fc('0x29')][_0xc0fc('0x2e')](_0xc0fc('0x2f'))){_0x204753[_0xc0fc('0x1a')]=qs['limit'](_0x4344f0[_0xc0fc('0x29')][_0xc0fc('0x1a')]);_0x204753[_0xc0fc('0x18')]=qs[_0xc0fc('0x18')](_0x4344f0[_0xc0fc('0x29')]['offset']);}_0x204753[_0xc0fc('0x30')]=qs[_0xc0fc('0x31')](_0x4344f0['query']['sort']);_0x204753['where']=qs[_0xc0fc('0x28')](_[_0xc0fc('0x32')](_0x4344f0['query'],_0x1c8cf2[_0xc0fc('0x28')]),_0x326353);if(_0x4344f0[_0xc0fc('0x29')][_0xc0fc('0x33')]){_0x204753['where']=_[_0xc0fc('0x34')](_0x204753[_0xc0fc('0x35')],{'$or':_['map'](_0x326353,function(_0x2bf90e){if(_0x2bf90e[_0xc0fc('0x36')]!=='VIRTUAL'){var _0x2cbdf3={};_0x2cbdf3[_0x2bf90e[_0xc0fc('0x21')]]={'$like':'%'+_0x4344f0[_0xc0fc('0x29')]['filter']+'%'};return _0x2cbdf3;}})});}_0x204753=_[_0xc0fc('0x34')]({},_0x204753,_0x4344f0[_0xc0fc('0x37')]);var _0x3b810d={'where':_0x204753['where']};return db[_0xc0fc('0x38')][_0xc0fc('0x1b')](_0x3b810d)[_0xc0fc('0x1e')](function(_0x52d553){_0x566cb8['count']=_0x52d553;if(_0x4344f0['query'][_0xc0fc('0x39')]){_0x204753['include']=[{'all':!![]}];}return db[_0xc0fc('0x38')][_0xc0fc('0x3a')](_0x204753);})[_0xc0fc('0x1e')](function(_0x5ef4c0){_0x566cb8[_0xc0fc('0x3b')]=_0x5ef4c0;return _0x566cb8;})[_0xc0fc('0x1e')](respondWithFilteredResult(_0x1e4102,_0x204753))[_0xc0fc('0x3c')](handleError(_0x1e4102,null));};exports[_0xc0fc('0x3d')]=function(_0x158750,_0xa65502){var _0xf2604c={'raw':![],'where':{'id':_0x158750[_0xc0fc('0x3e')]['id']}},_0x20779a={};_0x20779a[_0xc0fc('0x25')]=_[_0xc0fc('0x27')](db[_0xc0fc('0x38')]['rawAttributes']);_0x20779a[_0xc0fc('0x29')]=_['keys'](_0x158750[_0xc0fc('0x29')]);_0x20779a[_0xc0fc('0x28')]=_[_0xc0fc('0x2b')](_0x20779a[_0xc0fc('0x25')],_0x20779a['query']);_0xf2604c[_0xc0fc('0x2a')]=_[_0xc0fc('0x2b')](_0x20779a['model'],qs[_0xc0fc('0x2c')](_0x158750[_0xc0fc('0x29')][_0xc0fc('0x2c')]));_0xf2604c[_0xc0fc('0x2a')]=_0xf2604c[_0xc0fc('0x2a')][_0xc0fc('0x2d')]?_0xf2604c[_0xc0fc('0x2a')]:_0x20779a[_0xc0fc('0x25')];if(_0x158750[_0xc0fc('0x29')]['includeAll']){_0xf2604c[_0xc0fc('0x3f')]=[{'all':!![]}];}_0xf2604c=_[_0xc0fc('0x34')]({},_0xf2604c,_0x158750[_0xc0fc('0x37')]);return db[_0xc0fc('0x38')][_0xc0fc('0x40')](_0xf2604c)[_0xc0fc('0x1e')](handleEntityNotFound(_0xa65502,null))[_0xc0fc('0x1e')](respondWithResult(_0xa65502,null))[_0xc0fc('0x3c')](handleError(_0xa65502,null));};exports[_0xc0fc('0x41')]=function(_0x31f61f,_0x4c06c9){return db[_0xc0fc('0x38')][_0xc0fc('0x41')](_0x31f61f[_0xc0fc('0x42')],{})[_0xc0fc('0x1e')](respondWithResult(_0x4c06c9,0xc9))[_0xc0fc('0x3c')](handleError(_0x4c06c9,null));};exports[_0xc0fc('0x43')]=function(_0x4a898e,_0x2e38ef){if(_0x4a898e['body']['id']){delete _0x4a898e['body']['id'];}return db[_0xc0fc('0x38')][_0xc0fc('0x40')]({'where':{'id':_0x4a898e[_0xc0fc('0x3e')]['id']}})[_0xc0fc('0x1e')](handleEntityNotFound(_0x2e38ef,null))[_0xc0fc('0x1e')](saveUpdates(_0x4a898e[_0xc0fc('0x42')],null))[_0xc0fc('0x1e')](respondWithResult(_0x2e38ef,null))['catch'](handleError(_0x2e38ef,null));};exports['destroy']=function(_0x580598,_0x1ffe17){return db[_0xc0fc('0x38')][_0xc0fc('0x40')]({'where':{'id':_0x580598[_0xc0fc('0x3e')]['id']}})['then'](handleEntityNotFound(_0x1ffe17,null))[_0xc0fc('0x1e')](removeEntity(_0x1ffe17,null))['catch'](handleError(_0x1ffe17,null));};exports[_0xc0fc('0x44')]=function(_0xdcc08b,_0x11daad,_0x3a8ab5){var _0x4643da={};var _0x49edaa={};var _0x33eddf;var _0x4d3438;return db[_0xc0fc('0x38')][_0xc0fc('0x45')]({'where':{'id':_0xdcc08b[_0xc0fc('0x3e')]['id']}})[_0xc0fc('0x1e')](handleEntityNotFound(_0x11daad,null))[_0xc0fc('0x1e')](function(_0x35021b){if(_0x35021b){_0x33eddf=_0x35021b;_0x49edaa['model']=_['keys'](db[_0xc0fc('0x46')][_0xc0fc('0x47')]);_0x49edaa['query']=_['keys'](_0xdcc08b[_0xc0fc('0x29')]);_0x49edaa[_0xc0fc('0x28')]=_['intersection'](_0x49edaa[_0xc0fc('0x25')],_0x49edaa[_0xc0fc('0x29')]);_0x4643da[_0xc0fc('0x2a')]=_[_0xc0fc('0x2b')](_0x49edaa['model'],qs[_0xc0fc('0x2c')](_0xdcc08b['query']['fields']));_0x4643da[_0xc0fc('0x2a')]=_0x4643da[_0xc0fc('0x2a')][_0xc0fc('0x2d')]?_0x4643da[_0xc0fc('0x2a')]:_0x49edaa[_0xc0fc('0x25')];_0x4643da[_0xc0fc('0x30')]=qs[_0xc0fc('0x31')](_0xdcc08b[_0xc0fc('0x29')]['sort']);_0x4643da[_0xc0fc('0x35')]=qs[_0xc0fc('0x28')](_[_0xc0fc('0x32')](_0xdcc08b['query'],_0x49edaa[_0xc0fc('0x28')]));if(_0xdcc08b['query']['filter']){_0x4643da[_0xc0fc('0x35')]=_[_0xc0fc('0x34')](_0x4643da['where'],{'$or':_['map'](_0x4643da['attributes'],function(_0x2c4e47){var _0x4b95cc={};_0x4b95cc[_0x2c4e47]={'$like':'%'+_0xdcc08b[_0xc0fc('0x29')][_0xc0fc('0x33')]+'%'};return _0x4b95cc;})});}_0x4643da=_[_0xc0fc('0x34')]({},_0x4643da,_0xdcc08b['options']);return _0x33eddf[_0xc0fc('0x44')](_0x4643da);}})[_0xc0fc('0x1e')](function(_0x2d6245){if(_0x2d6245){_0x4d3438=_0x2d6245[_0xc0fc('0x2d')];if(!_0xdcc08b[_0xc0fc('0x29')][_0xc0fc('0x2e')](_0xc0fc('0x2f'))){_0x4643da[_0xc0fc('0x1a')]=qs[_0xc0fc('0x1a')](_0xdcc08b[_0xc0fc('0x29')]['limit']);_0x4643da['offset']=qs['offset'](_0xdcc08b[_0xc0fc('0x29')][_0xc0fc('0x18')]);}return _0x33eddf[_0xc0fc('0x44')](_0x4643da);}})['then'](function(_0x5c240b){if(_0x5c240b){return _0x5c240b?{'count':_0x4d3438,'rows':_0x5c240b}:null;}})['then'](respondWithResult(_0x11daad,null))[_0xc0fc('0x3c')](handleError(_0x11daad,null));};exports[_0xc0fc('0x48')]=function(_0x191ac0,_0x5a0439,_0x383e31){var _0x1eec64={};var _0x57bd09={};var _0x4dd497;var _0x1e3981;return db[_0xc0fc('0x38')]['findOne']({'where':{'id':_0x191ac0[_0xc0fc('0x3e')]['id']}})[_0xc0fc('0x1e')](handleEntityNotFound(_0x5a0439,null))['then'](function(_0x52345a){if(_0x52345a){_0x4dd497=_0x52345a;_0x57bd09[_0xc0fc('0x25')]=_[_0xc0fc('0x27')](db[_0xc0fc('0x46')][_0xc0fc('0x47')]);_0x57bd09['query']=_['keys'](_0x191ac0[_0xc0fc('0x29')]);_0x57bd09[_0xc0fc('0x28')]=_[_0xc0fc('0x2b')](_0x57bd09['model'],_0x57bd09['query']);_0x1eec64['attributes']=_[_0xc0fc('0x2b')](_0x57bd09['model'],qs[_0xc0fc('0x2c')](_0x191ac0[_0xc0fc('0x29')][_0xc0fc('0x2c')]));_0x1eec64[_0xc0fc('0x2a')]=_0x1eec64[_0xc0fc('0x2a')]['length']?_0x1eec64[_0xc0fc('0x2a')]:_0x57bd09[_0xc0fc('0x25')];_0x1eec64[_0xc0fc('0x30')]=qs[_0xc0fc('0x31')](_0x191ac0[_0xc0fc('0x29')][_0xc0fc('0x31')]);_0x1eec64['where']=qs[_0xc0fc('0x28')](_['pick'](_0x191ac0[_0xc0fc('0x29')],_0x57bd09[_0xc0fc('0x28')]));if(_0x191ac0[_0xc0fc('0x29')][_0xc0fc('0x33')]){_0x1eec64[_0xc0fc('0x35')]=_[_0xc0fc('0x34')](_0x1eec64[_0xc0fc('0x35')],{'$or':_[_0xc0fc('0x26')](_0x1eec64[_0xc0fc('0x2a')],function(_0x24533a){var _0x15ee03={};_0x15ee03[_0x24533a]={'$like':'%'+_0x191ac0[_0xc0fc('0x29')][_0xc0fc('0x33')]+'%'};return _0x15ee03;})});}_0x1eec64=_['merge']({},_0x1eec64,_0x191ac0[_0xc0fc('0x37')]);return _0x4dd497['getDescriptions'](_0x1eec64);}})[_0xc0fc('0x1e')](function(_0x4bb394){if(_0x4bb394){_0x1e3981=_0x4bb394[_0xc0fc('0x2d')];if(!_0x191ac0[_0xc0fc('0x29')][_0xc0fc('0x2e')](_0xc0fc('0x2f'))){_0x1eec64[_0xc0fc('0x1a')]=qs[_0xc0fc('0x1a')](_0x191ac0[_0xc0fc('0x29')][_0xc0fc('0x1a')]);_0x1eec64[_0xc0fc('0x18')]=qs[_0xc0fc('0x18')](_0x191ac0[_0xc0fc('0x29')][_0xc0fc('0x18')]);}return _0x4dd497[_0xc0fc('0x48')](_0x1eec64);}})[_0xc0fc('0x1e')](function(_0x45a459){if(_0x45a459){return _0x45a459?{'count':_0x1e3981,'rows':_0x45a459}:null;}})['then'](respondWithResult(_0x5a0439,null))[_0xc0fc('0x3c')](handleError(_0x5a0439,null));};exports[_0xc0fc('0x49')]=function(_0x22ab6b,_0x24247f,_0x48d029){var _0x33f3a2={};var _0x1a42fb={};var _0x1d81fc;var _0x149648;return db[_0xc0fc('0x38')][_0xc0fc('0x45')]({'where':{'id':_0x22ab6b[_0xc0fc('0x3e')]['id']}})[_0xc0fc('0x1e')](handleEntityNotFound(_0x24247f,null))[_0xc0fc('0x1e')](function(_0x4aaa72){if(_0x4aaa72){_0x1d81fc=_0x4aaa72;_0x1a42fb['model']=_[_0xc0fc('0x27')](db[_0xc0fc('0x46')][_0xc0fc('0x47')]);_0x1a42fb['query']=_[_0xc0fc('0x27')](_0x22ab6b[_0xc0fc('0x29')]);_0x1a42fb['filters']=_['intersection'](_0x1a42fb[_0xc0fc('0x25')],_0x1a42fb[_0xc0fc('0x29')]);_0x33f3a2[_0xc0fc('0x2a')]=_[_0xc0fc('0x2b')](_0x1a42fb[_0xc0fc('0x25')],qs[_0xc0fc('0x2c')](_0x22ab6b[_0xc0fc('0x29')][_0xc0fc('0x2c')]));_0x33f3a2[_0xc0fc('0x2a')]=_0x33f3a2['attributes'][_0xc0fc('0x2d')]?_0x33f3a2[_0xc0fc('0x2a')]:_0x1a42fb['model'];_0x33f3a2[_0xc0fc('0x30')]=qs[_0xc0fc('0x31')](_0x22ab6b[_0xc0fc('0x29')][_0xc0fc('0x31')]);_0x33f3a2[_0xc0fc('0x35')]=qs[_0xc0fc('0x28')](_[_0xc0fc('0x32')](_0x22ab6b[_0xc0fc('0x29')],_0x1a42fb[_0xc0fc('0x28')]));if(_0x22ab6b[_0xc0fc('0x29')][_0xc0fc('0x33')]){_0x33f3a2[_0xc0fc('0x35')]=_['merge'](_0x33f3a2[_0xc0fc('0x35')],{'$or':_[_0xc0fc('0x26')](_0x33f3a2['attributes'],function(_0xa81c30){var _0x14dbe5={};_0x14dbe5[_0xa81c30]={'$like':'%'+_0x22ab6b[_0xc0fc('0x29')][_0xc0fc('0x33')]+'%'};return _0x14dbe5;})});}_0x33f3a2=_[_0xc0fc('0x34')]({},_0x33f3a2,_0x22ab6b[_0xc0fc('0x37')]);return _0x1d81fc[_0xc0fc('0x49')](_0x33f3a2);}})['then'](function(_0x3b72f7){if(_0x3b72f7){_0x149648=_0x3b72f7['length'];if(!_0x22ab6b['query'][_0xc0fc('0x2e')](_0xc0fc('0x2f'))){_0x33f3a2[_0xc0fc('0x1a')]=qs[_0xc0fc('0x1a')](_0x22ab6b[_0xc0fc('0x29')][_0xc0fc('0x1a')]);_0x33f3a2[_0xc0fc('0x18')]=qs[_0xc0fc('0x18')](_0x22ab6b['query']['offset']);}return _0x1d81fc[_0xc0fc('0x49')](_0x33f3a2);}})[_0xc0fc('0x1e')](function(_0x369fd5){if(_0x369fd5){return _0x369fd5?{'count':_0x149648,'rows':_0x369fd5}:null;}})[_0xc0fc('0x1e')](respondWithResult(_0x24247f,null))[_0xc0fc('0x3c')](handleError(_0x24247f,null));};
\ No newline at end of file
index 6c61d5c..bcfe15a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1341=['FreshsalesConfiguration','lodash','api','moment','bluebird','../../config/environment','./intFreshsalesConfiguration.attributes','exports','define'];(function(_0x66b470,_0x3a5fb3){var _0x60849d=function(_0x59c8ab){while(--_0x59c8ab){_0x66b470['push'](_0x66b470['shift']());}};_0x60849d(++_0x3a5fb3);}(_0x1341,0xbe));var _0x1134=function(_0x176068,_0x9e2b4e){_0x176068=_0x176068-0x0;var _0x2ef693=_0x1341[_0x176068];return _0x2ef693;};'use strict';var _=require(_0x1134('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x1134('0x1'));var moment=require(_0x1134('0x2'));var BPromise=require(_0x1134('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x1134('0x4'));var attributes=require(_0x1134('0x5'));module[_0x1134('0x6')]=function(_0x1b4aac,_0x4341ed){return _0x1b4aac[_0x1134('0x7')](_0x1134('0x8'),attributes,{'tableName':'int_freshsales_configurations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xe12d=['lodash','api','moment','bluebird','request-promise','rimraf','../../config/environment','./intFreshsalesConfiguration.attributes','exports','define','FreshsalesConfiguration','int_freshsales_configurations'];(function(_0x4e0ff4,_0x4a4633){var _0x3bdee=function(_0x2bdee6){while(--_0x2bdee6){_0x4e0ff4['push'](_0x4e0ff4['shift']());}};_0x3bdee(++_0x4a4633);}(_0xe12d,0x198));var _0xde12=function(_0x47a196,_0x49d8f6){_0x47a196=_0x47a196-0x0;var _0x12406d=_0xe12d[_0x47a196];return _0x12406d;};'use strict';var _=require(_0xde12('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xde12('0x1'));var moment=require(_0xde12('0x2'));var BPromise=require(_0xde12('0x3'));var rp=require(_0xde12('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xde12('0x5'));var config=require(_0xde12('0x6'));var attributes=require(_0xde12('0x7'));module[_0xde12('0x8')]=function(_0x271f67,_0x50ff9e){return _0x271f67[_0xde12('0x9')](_0xde12('0xa'),attributes,{'tableName':_0xde12('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 91c7412..8039ef7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd5a4=['code','message','info','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','request','then','FreshsalesConfiguration,\x20%s,\x20%s','request\x20sent','debug','FreshsalesConfiguration,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xd5a4,0x12f));var _0x4d5a=function(_0x4a6068,_0x376135){_0x4a6068=_0x4a6068-0x0;var _0x49ede8=_0xd5a4[_0x4a6068];return _0x49ede8;};'use strict';var _=require(_0x4d5a('0x0'));var util=require(_0x4d5a('0x1'));var moment=require(_0x4d5a('0x2'));var BPromise=require('bluebird');var rs=require(_0x4d5a('0x3'));var fs=require('fs');var Redis=require(_0x4d5a('0x4'));var db=require(_0x4d5a('0x5'))['db'];var utils=require(_0x4d5a('0x6'));var logger=require('../../config/logger')(_0x4d5a('0x7'));var config=require('../../config/environment');var jayson=require(_0x4d5a('0x8'));var client=jayson[_0x4d5a('0x9')][_0x4d5a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x177af5,_0x2b369b,_0x3ca0f3){return new BPromise(function(_0x12adad,_0x3d6da4){return client[_0x4d5a('0xb')](_0x177af5,_0x3ca0f3)[_0x4d5a('0xc')](function(_0x19cc6a){logger['info'](_0x4d5a('0xd'),_0x2b369b,_0x4d5a('0xe'));logger[_0x4d5a('0xf')](_0x4d5a('0x10'),_0x2b369b,'request\x20sent',JSON[_0x4d5a('0x11')](_0x19cc6a));if(_0x19cc6a[_0x4d5a('0x12')]){if(_0x19cc6a[_0x4d5a('0x12')][_0x4d5a('0x13')]===0x1f4){logger[_0x4d5a('0x12')](_0x4d5a('0xd'),_0x2b369b,_0x19cc6a[_0x4d5a('0x12')][_0x4d5a('0x14')]);return _0x3d6da4(_0x19cc6a[_0x4d5a('0x12')][_0x4d5a('0x14')]);}logger['error'](_0x4d5a('0xd'),_0x2b369b,_0x19cc6a['error'][_0x4d5a('0x14')]);return _0x12adad(_0x19cc6a[_0x4d5a('0x12')][_0x4d5a('0x14')]);}else{logger[_0x4d5a('0x15')](_0x4d5a('0xd'),_0x2b369b,_0x4d5a('0xe'));_0x12adad(_0x19cc6a['result'][_0x4d5a('0x14')]);}})[_0x4d5a('0x16')](function(_0x395dbb){logger[_0x4d5a('0x12')]('FreshsalesConfiguration,\x20%s,\x20%s',_0x2b369b,_0x395dbb);_0x3d6da4(_0x395dbb);});});}
\ No newline at end of file
+var _0xc3eb=['rpc','../../config/environment','jayson/promise','client','http','request','then','request\x20sent','debug','FreshsalesConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','FreshsalesConfiguration,\x20%s,\x20%s','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xc3eb,0x1d2));var _0xbc3e=function(_0x21d0c3,_0x16c71c){_0x21d0c3=_0x21d0c3-0x0;var _0x4df18e=_0xc3eb[_0x21d0c3];return _0x4df18e;};'use strict';var _=require(_0xbc3e('0x0'));var util=require(_0xbc3e('0x1'));var moment=require(_0xbc3e('0x2'));var BPromise=require(_0xbc3e('0x3'));var rs=require(_0xbc3e('0x4'));var fs=require('fs');var Redis=require(_0xbc3e('0x5'));var db=require(_0xbc3e('0x6'))['db'];var utils=require(_0xbc3e('0x7'));var logger=require(_0xbc3e('0x8'))(_0xbc3e('0x9'));var config=require(_0xbc3e('0xa'));var jayson=require(_0xbc3e('0xb'));var client=jayson[_0xbc3e('0xc')][_0xbc3e('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x111ae6,_0x14a218,_0x31ffab){return new BPromise(function(_0x31f6de,_0x510217){return client[_0xbc3e('0xe')](_0x111ae6,_0x31ffab)[_0xbc3e('0xf')](function(_0x493e24){logger['info']('FreshsalesConfiguration,\x20%s,\x20%s',_0x14a218,_0xbc3e('0x10'));logger[_0xbc3e('0x11')](_0xbc3e('0x12'),_0x14a218,_0xbc3e('0x10'),JSON[_0xbc3e('0x13')](_0x493e24));if(_0x493e24[_0xbc3e('0x14')]){if(_0x493e24['error'][_0xbc3e('0x15')]===0x1f4){logger[_0xbc3e('0x14')](_0xbc3e('0x16'),_0x14a218,_0x493e24[_0xbc3e('0x14')]['message']);return _0x510217(_0x493e24[_0xbc3e('0x14')][_0xbc3e('0x17')]);}logger['error'](_0xbc3e('0x16'),_0x14a218,_0x493e24[_0xbc3e('0x14')][_0xbc3e('0x17')]);return _0x31f6de(_0x493e24[_0xbc3e('0x14')]['message']);}else{logger['info'](_0xbc3e('0x16'),_0x14a218,_0xbc3e('0x10'));_0x31f6de(_0x493e24[_0xbc3e('0x18')][_0xbc3e('0x17')]);}})['catch'](function(_0x3a5790){logger[_0xbc3e('0x14')]('FreshsalesConfiguration,\x20%s,\x20%s',_0x14a218,_0x3a5790);_0x510217(_0x3a5790);});});}
\ No newline at end of file
index 2a9303d..c0755ea 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe1f0=['destroy','exports','util','path','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./intFreshsalesField.controller','isAuthenticated','get','/:id','create','update','delete'];(function(_0x1969a7,_0x5a133a){var _0x3d665f=function(_0x39c64b){while(--_0x39c64b){_0x1969a7['push'](_0x1969a7['shift']());}};_0x3d665f(++_0x5a133a);}(_0xe1f0,0x1c2));var _0x0e1f=function(_0x23c8e6,_0x403b50){_0x23c8e6=_0x23c8e6-0x0;var _0x8b72d4=_0xe1f0[_0x23c8e6];return _0x8b72d4;};'use strict';var multer=require('multer');var util=require(_0x0e1f('0x0'));var path=require(_0x0e1f('0x1'));var timeout=require('connect-timeout');var express=require(_0x0e1f('0x2'));var router=express[_0x0e1f('0x3')]();var fs_extra=require(_0x0e1f('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x0e1f('0x5'));var config=require(_0x0e1f('0x6'));var controller=require(_0x0e1f('0x7'));router['get']('/',auth[_0x0e1f('0x8')](),controller['index']);router[_0x0e1f('0x9')](_0x0e1f('0xa'),auth[_0x0e1f('0x8')](),controller['show']);router['post']('/',auth[_0x0e1f('0x8')](),controller[_0x0e1f('0xb')]);router['put'](_0x0e1f('0xa'),auth[_0x0e1f('0x8')](),controller[_0x0e1f('0xc')]);router[_0x0e1f('0xd')](_0x0e1f('0xa'),auth[_0x0e1f('0x8')](),controller[_0x0e1f('0xe')]);module[_0x0e1f('0xf')]=router;
\ No newline at end of file
+var _0x5c37=['path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','create','/:id','update','delete','multer','util'];(function(_0x1ec7aa,_0x2506df){var _0x4bafb7=function(_0x5ec3bc){while(--_0x5ec3bc){_0x1ec7aa['push'](_0x1ec7aa['shift']());}};_0x4bafb7(++_0x2506df);}(_0x5c37,0x11e));var _0x75c3=function(_0x29bf80,_0x4af855){_0x29bf80=_0x29bf80-0x0;var _0x932096=_0x5c37[_0x29bf80];return _0x932096;};'use strict';var multer=require(_0x75c3('0x0'));var util=require(_0x75c3('0x1'));var path=require(_0x75c3('0x2'));var timeout=require(_0x75c3('0x3'));var express=require(_0x75c3('0x4'));var router=express[_0x75c3('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x75c3('0x6'));var interaction=require(_0x75c3('0x7'));var config=require(_0x75c3('0x8'));var controller=require('./intFreshsalesField.controller');router[_0x75c3('0x9')]('/',auth[_0x75c3('0xa')](),controller[_0x75c3('0xb')]);router[_0x75c3('0x9')]('/:id',auth[_0x75c3('0xa')](),controller['show']);router['post']('/',auth[_0x75c3('0xa')](),controller[_0x75c3('0xc')]);router['put'](_0x75c3('0xd'),auth[_0x75c3('0xa')](),controller[_0x75c3('0xe')]);router[_0x75c3('0xf')](_0x75c3('0xd'),auth[_0x75c3('0xa')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
index ecd4c9e..5445edc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa860=['BOOLEAN','sequelize','exports','ENUM','string','variable','STRING'];(function(_0x122898,_0xe3a772){var _0x1c5b4a=function(_0x48b8b1){while(--_0x48b8b1){_0x122898['push'](_0x122898['shift']());}};_0x1c5b4a(++_0xe3a772);}(_0xa860,0x1d6));var _0x0a86=function(_0x13d580,_0x469a32){_0x13d580=_0x13d580-0x0;var _0x12ed5e=_0xa860[_0x13d580];return _0x12ed5e;};'use strict';var Sequelize=require(_0x0a86('0x0'));module[_0x0a86('0x1')]={'type':{'type':Sequelize[_0x0a86('0x2')](_0x0a86('0x3'),_0x0a86('0x4'),'customVariable','keyValue','picklist'),'defaultValue':'string'},'content':{'type':Sequelize[_0x0a86('0x5')]},'key':{'type':Sequelize[_0x0a86('0x5')]},'keyType':{'type':Sequelize[_0x0a86('0x2')](_0x0a86('0x3'),_0x0a86('0x4'),'customVariable')},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize[_0x0a86('0x5')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize[_0x0a86('0x6')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x0a86('0x5')]}};
\ No newline at end of file
+var _0x178d=['variable','ENUM','customVariable','keyValue','picklist','string','STRING'];(function(_0x2afbb0,_0x44f16d){var _0x411ff2=function(_0x5edd7e){while(--_0x5edd7e){_0x2afbb0['push'](_0x2afbb0['shift']());}};_0x411ff2(++_0x44f16d);}(_0x178d,0x19e));var _0xd178=function(_0x36825d,_0x3e5ddd){_0x36825d=_0x36825d-0x0;var _0x21f3fe=_0x178d[_0x36825d];return _0x21f3fe;};'use strict';var Sequelize=require('sequelize');module['exports']={'type':{'type':Sequelize[_0xd178('0x0')]('string','variable',_0xd178('0x1'),_0xd178('0x2'),_0xd178('0x3')),'defaultValue':_0xd178('0x4')},'content':{'type':Sequelize[_0xd178('0x5')]},'key':{'type':Sequelize[_0xd178('0x5')]},'keyType':{'type':Sequelize[_0xd178('0x0')]('string',_0xd178('0x6'),_0xd178('0x1'))},'keyContent':{'type':Sequelize[_0xd178('0x5')]},'idField':{'type':Sequelize[_0xd178('0x5')]},'nameField':{'type':Sequelize[_0xd178('0x5')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xd178('0x5')]}};
\ No newline at end of file
index b9e3543..85c97dc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbc7d=['../../components/parsers/advancedSearch','../../config/logger','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','index','FreshsalesField','rawAttributes','fieldName','model','map','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','type','VIRTUAL','filter','includeAll','findAll','rows','catch','show','params','options','create','find','eml-format','zip-dir','request-promise','moment','bluebird','mustache','path','to-csv','ejs','fs-extra','squel','crypto','jsforce','ioredis','../../components/auth/service','../../components/parsers/qs'];(function(_0x12a554,_0x3d7ef8){var _0x244ba0=function(_0x5eb5ff){while(--_0x5eb5ff){_0x12a554['push'](_0x12a554['shift']());}};_0x244ba0(++_0x3d7ef8);}(_0xbc7d,0xcb));var _0xdbc7=function(_0x44ca6e,_0x5e2c91){_0x44ca6e=_0x44ca6e-0x0;var _0x2edab2=_0xbc7d[_0x44ca6e];return _0x2edab2;};'use strict';var emlformat=require(_0xdbc7('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xdbc7('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xdbc7('0x2'));var moment=require(_0xdbc7('0x3'));var BPromise=require(_0xdbc7('0x4'));var Mustache=require(_0xdbc7('0x5'));var util=require('util');var path=require(_0xdbc7('0x6'));var sox=require('sox');var csv=require(_0xdbc7('0x7'));var ejs=require(_0xdbc7('0x8'));var fs=require('fs');var fs_extra=require(_0xdbc7('0x9'));var _=require('lodash');var squel=require(_0xdbc7('0xa'));var crypto=require(_0xdbc7('0xb'));var jsforce=require(_0xdbc7('0xc'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xdbc7('0xd'));var authService=require(_0xdbc7('0xe'));var qs=require(_0xdbc7('0xf'));var as=require(_0xdbc7('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xdbc7('0x11'))('api');var utils=require('../../config/utils');var config=require(_0xdbc7('0x12'));var licenseUtil=require(_0xdbc7('0x13'));var db=require(_0xdbc7('0x14'))['db'];function respondWithStatusCode(_0x1a52aa,_0x59786a){_0x59786a=_0x59786a||0xcc;return function(_0x3ee7fb){if(_0x3ee7fb){return _0x1a52aa[_0xdbc7('0x15')](_0x59786a);}return _0x1a52aa[_0xdbc7('0x16')](_0x59786a)[_0xdbc7('0x17')]();};}function respondWithResult(_0x2dc48e,_0x31d2b5){_0x31d2b5=_0x31d2b5||0xc8;return function(_0x138c5f){if(_0x138c5f){return _0x2dc48e[_0xdbc7('0x16')](_0x31d2b5)[_0xdbc7('0x18')](_0x138c5f);}};}function respondWithFilteredResult(_0x193a50,_0x44595b){return function(_0x34838a){if(_0x34838a){var _0x337a53=typeof _0x44595b[_0xdbc7('0x19')]===_0xdbc7('0x1a')&&typeof _0x44595b['limit']==='undefined';var _0x21b3f8=_0x34838a[_0xdbc7('0x1b')];var _0x5824d3=_0x337a53?0x0:_0x44595b[_0xdbc7('0x19')];var _0x30a8=_0x337a53?_0x34838a[_0xdbc7('0x1b')]:_0x44595b[_0xdbc7('0x19')]+_0x44595b[_0xdbc7('0x1c')];var _0x1eaec2;if(_0x30a8>=_0x21b3f8){_0x30a8=_0x21b3f8;_0x1eaec2=0xc8;}else{_0x1eaec2=0xce;}_0x193a50[_0xdbc7('0x16')](_0x1eaec2);return _0x193a50[_0xdbc7('0x1d')](_0xdbc7('0x1e'),_0x5824d3+'-'+_0x30a8+'/'+_0x21b3f8)[_0xdbc7('0x18')](_0x34838a);}return null;};}function patchUpdates(_0x346fd9){return function(_0x4b7324){try{jsonpatch[_0xdbc7('0x1f')](_0x4b7324,_0x346fd9,!![]);}catch(_0x489695){return BPromise[_0xdbc7('0x20')](_0x489695);}return _0x4b7324[_0xdbc7('0x21')]();};}function saveUpdates(_0x5faea0,_0x1e19b7){return function(_0x41787c){if(_0x41787c){return _0x41787c[_0xdbc7('0x22')](_0x5faea0)[_0xdbc7('0x23')](function(_0x4d61c3){return _0x4d61c3;});}return null;};}function removeEntity(_0x50e689,_0x4f19fa){return function(_0x28dd06){if(_0x28dd06){return _0x28dd06[_0xdbc7('0x24')]()[_0xdbc7('0x23')](function(){_0x50e689[_0xdbc7('0x16')](0xcc)[_0xdbc7('0x17')]();});}};}function handleEntityNotFound(_0x307d71,_0x5c9041){return function(_0x2802b0){if(!_0x2802b0){_0x307d71[_0xdbc7('0x15')](0x194);}return _0x2802b0;};}function handleError(_0x36844b,_0x5c555d){_0x5c555d=_0x5c555d||0x1f4;return function(_0x40961d){logger[_0xdbc7('0x25')](_0x40961d[_0xdbc7('0x26')]);if(_0x40961d['name']){delete _0x40961d[_0xdbc7('0x27')];}_0x36844b[_0xdbc7('0x16')](_0x5c555d)[_0xdbc7('0x28')](_0x40961d);};}exports[_0xdbc7('0x29')]=function(_0x2c47f7,_0x19b8bc){var _0x5789f7={},_0x116170={},_0xb22e41={'count':0x0,'rows':[]};var _0x15788d=_['map'](db[_0xdbc7('0x2a')][_0xdbc7('0x2b')],function(_0x238b4d){return{'name':_0x238b4d[_0xdbc7('0x2c')],'type':_0x238b4d['type']['key']};});_0x116170[_0xdbc7('0x2d')]=_[_0xdbc7('0x2e')](_0x15788d,'name');_0x116170[_0xdbc7('0x2f')]=_[_0xdbc7('0x30')](_0x2c47f7[_0xdbc7('0x2f')]);_0x116170[_0xdbc7('0x31')]=_['intersection'](_0x116170[_0xdbc7('0x2d')],_0x116170[_0xdbc7('0x2f')]);_0x5789f7[_0xdbc7('0x32')]=_[_0xdbc7('0x33')](_0x116170[_0xdbc7('0x2d')],qs[_0xdbc7('0x34')](_0x2c47f7[_0xdbc7('0x2f')][_0xdbc7('0x34')]));_0x5789f7['attributes']=_0x5789f7[_0xdbc7('0x32')][_0xdbc7('0x35')]?_0x5789f7[_0xdbc7('0x32')]:_0x116170[_0xdbc7('0x2d')];if(!_0x2c47f7[_0xdbc7('0x2f')][_0xdbc7('0x36')](_0xdbc7('0x37'))){_0x5789f7[_0xdbc7('0x1c')]=qs[_0xdbc7('0x1c')](_0x2c47f7[_0xdbc7('0x2f')][_0xdbc7('0x1c')]);_0x5789f7['offset']=qs[_0xdbc7('0x19')](_0x2c47f7[_0xdbc7('0x2f')][_0xdbc7('0x19')]);}_0x5789f7[_0xdbc7('0x38')]=qs[_0xdbc7('0x39')](_0x2c47f7[_0xdbc7('0x2f')]['sort']);_0x5789f7[_0xdbc7('0x3a')]=qs[_0xdbc7('0x31')](_[_0xdbc7('0x3b')](_0x2c47f7[_0xdbc7('0x2f')],_0x116170[_0xdbc7('0x31')]),_0x15788d);if(_0x2c47f7[_0xdbc7('0x2f')]['filter']){_0x5789f7[_0xdbc7('0x3a')]=_[_0xdbc7('0x3c')](_0x5789f7[_0xdbc7('0x3a')],{'$or':_['map'](_0x15788d,function(_0x3bf48d){if(_0x3bf48d[_0xdbc7('0x3d')]!==_0xdbc7('0x3e')){var _0x2be0c0={};_0x2be0c0[_0x3bf48d[_0xdbc7('0x27')]]={'$like':'%'+_0x2c47f7[_0xdbc7('0x2f')][_0xdbc7('0x3f')]+'%'};return _0x2be0c0;}})});}_0x5789f7=_[_0xdbc7('0x3c')]({},_0x5789f7,_0x2c47f7['options']);var _0x42bbd7={'where':_0x5789f7[_0xdbc7('0x3a')]};return db[_0xdbc7('0x2a')][_0xdbc7('0x1b')](_0x42bbd7)[_0xdbc7('0x23')](function(_0x5c2fab){_0xb22e41[_0xdbc7('0x1b')]=_0x5c2fab;if(_0x2c47f7[_0xdbc7('0x2f')][_0xdbc7('0x40')]){_0x5789f7['include']=[{'all':!![]}];}return db[_0xdbc7('0x2a')][_0xdbc7('0x41')](_0x5789f7);})[_0xdbc7('0x23')](function(_0x1991da){_0xb22e41[_0xdbc7('0x42')]=_0x1991da;return _0xb22e41;})[_0xdbc7('0x23')](respondWithFilteredResult(_0x19b8bc,_0x5789f7))[_0xdbc7('0x43')](handleError(_0x19b8bc,null));};exports[_0xdbc7('0x44')]=function(_0x5ec36b,_0x2ba758){var _0x4dd499={'raw':!![],'where':{'id':_0x5ec36b[_0xdbc7('0x45')]['id']}},_0x183386={};_0x183386[_0xdbc7('0x2d')]=_['keys'](db[_0xdbc7('0x2a')][_0xdbc7('0x2b')]);_0x183386[_0xdbc7('0x2f')]=_[_0xdbc7('0x30')](_0x5ec36b[_0xdbc7('0x2f')]);_0x183386[_0xdbc7('0x31')]=_['intersection'](_0x183386[_0xdbc7('0x2d')],_0x183386[_0xdbc7('0x2f')]);_0x4dd499[_0xdbc7('0x32')]=_[_0xdbc7('0x33')](_0x183386[_0xdbc7('0x2d')],qs[_0xdbc7('0x34')](_0x5ec36b[_0xdbc7('0x2f')][_0xdbc7('0x34')]));_0x4dd499[_0xdbc7('0x32')]=_0x4dd499[_0xdbc7('0x32')][_0xdbc7('0x35')]?_0x4dd499[_0xdbc7('0x32')]:_0x183386[_0xdbc7('0x2d')];if(_0x5ec36b[_0xdbc7('0x2f')][_0xdbc7('0x40')]){_0x4dd499['include']=[{'all':!![]}];}_0x4dd499=_[_0xdbc7('0x3c')]({},_0x4dd499,_0x5ec36b[_0xdbc7('0x46')]);return db[_0xdbc7('0x2a')]['find'](_0x4dd499)['then'](handleEntityNotFound(_0x2ba758,null))[_0xdbc7('0x23')](respondWithResult(_0x2ba758,null))['catch'](handleError(_0x2ba758,null));};exports[_0xdbc7('0x47')]=function(_0x148b37,_0x54cb7e){return db[_0xdbc7('0x2a')][_0xdbc7('0x47')](_0x148b37['body'],{})[_0xdbc7('0x23')](respondWithResult(_0x54cb7e,0xc9))[_0xdbc7('0x43')](handleError(_0x54cb7e,null));};exports[_0xdbc7('0x22')]=function(_0x3ad78e,_0xee0b5f){if(_0x3ad78e['body']['id']){delete _0x3ad78e['body']['id'];}return db[_0xdbc7('0x2a')][_0xdbc7('0x48')]({'where':{'id':_0x3ad78e['params']['id']}})['then'](handleEntityNotFound(_0xee0b5f,null))[_0xdbc7('0x23')](saveUpdates(_0x3ad78e['body'],null))['then'](respondWithResult(_0xee0b5f,null))['catch'](handleError(_0xee0b5f,null));};exports[_0xdbc7('0x24')]=function(_0x3fa73b,_0x53fa9f){return db[_0xdbc7('0x2a')][_0xdbc7('0x48')]({'where':{'id':_0x3fa73b[_0xdbc7('0x45')]['id']}})['then'](handleEntityNotFound(_0x53fa9f,null))[_0xdbc7('0x23')](removeEntity(_0x53fa9f,null))[_0xdbc7('0x43')](handleError(_0x53fa9f,null));};
\ No newline at end of file
+var _0xb7d3=['body','params','destroy','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','reject','then','error','stack','name','send','map','fieldName','type','keys','query','filters','intersection','model','fields','attributes','length','nolimit','order','sort','where','pick','filter','VIRTUAL','options','FreshsalesField','findAll','rows','catch','show','includeAll','include','merge','find','create'];(function(_0x3e2aee,_0x2e9cc4){var _0xb7dfe5=function(_0x5874d3){while(--_0x5874d3){_0x3e2aee['push'](_0x3e2aee['shift']());}};_0xb7dfe5(++_0x2e9cc4);}(_0xb7d3,0x1ed));var _0x3b7d=function(_0x432d38,_0x201399){_0x432d38=_0x432d38-0x0;var _0x39c577=_0xb7d3[_0x432d38];return _0x39c577;};'use strict';var emlformat=require(_0x3b7d('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x3b7d('0x1'));var jsonpatch=require(_0x3b7d('0x2'));var rp=require(_0x3b7d('0x3'));var moment=require(_0x3b7d('0x4'));var BPromise=require(_0x3b7d('0x5'));var Mustache=require('mustache');var util=require(_0x3b7d('0x6'));var path=require('path');var sox=require(_0x3b7d('0x7'));var csv=require(_0x3b7d('0x8'));var ejs=require(_0x3b7d('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x3b7d('0xa'));var squel=require('squel');var crypto=require(_0x3b7d('0xb'));var jsforce=require(_0x3b7d('0xc'));var deskjs=require(_0x3b7d('0xd'));var toCsv=require(_0x3b7d('0x8'));var querystring=require(_0x3b7d('0xe'));var Papa=require(_0x3b7d('0xf'));var Redis=require(_0x3b7d('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x3b7d('0x11'));var logger=require('../../config/logger')(_0x3b7d('0x12'));var utils=require(_0x3b7d('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0x3b7d('0x14'));var db=require(_0x3b7d('0x15'))['db'];function respondWithStatusCode(_0x1f90a8,_0x23b8e5){_0x23b8e5=_0x23b8e5||0xcc;return function(_0x4f3058){if(_0x4f3058){return _0x1f90a8[_0x3b7d('0x16')](_0x23b8e5);}return _0x1f90a8[_0x3b7d('0x17')](_0x23b8e5)[_0x3b7d('0x18')]();};}function respondWithResult(_0x1bf216,_0x31356f){_0x31356f=_0x31356f||0xc8;return function(_0x4cadcc){if(_0x4cadcc){return _0x1bf216[_0x3b7d('0x17')](_0x31356f)[_0x3b7d('0x19')](_0x4cadcc);}};}function respondWithFilteredResult(_0x4a4212,_0x39cb20){return function(_0x56e2dd){if(_0x56e2dd){var _0x2be4c5=typeof _0x39cb20[_0x3b7d('0x1a')]===_0x3b7d('0x1b')&&typeof _0x39cb20['limit']===_0x3b7d('0x1b');var _0x185f32=_0x56e2dd[_0x3b7d('0x1c')];var _0x111647=_0x2be4c5?0x0:_0x39cb20['offset'];var _0x41beaf=_0x2be4c5?_0x56e2dd[_0x3b7d('0x1c')]:_0x39cb20[_0x3b7d('0x1a')]+_0x39cb20[_0x3b7d('0x1d')];var _0x300dad;if(_0x41beaf>=_0x185f32){_0x41beaf=_0x185f32;_0x300dad=0xc8;}else{_0x300dad=0xce;}_0x4a4212[_0x3b7d('0x17')](_0x300dad);return _0x4a4212[_0x3b7d('0x1e')](_0x3b7d('0x1f'),_0x111647+'-'+_0x41beaf+'/'+_0x185f32)[_0x3b7d('0x19')](_0x56e2dd);}return null;};}function patchUpdates(_0x1bb267){return function(_0x21c3bd){try{jsonpatch['apply'](_0x21c3bd,_0x1bb267,!![]);}catch(_0x378171){return BPromise[_0x3b7d('0x20')](_0x378171);}return _0x21c3bd['save']();};}function saveUpdates(_0x25dc12,_0x2b748c){return function(_0x3e7c20){if(_0x3e7c20){return _0x3e7c20['update'](_0x25dc12)[_0x3b7d('0x21')](function(_0x239eae){return _0x239eae;});}return null;};}function removeEntity(_0x466862,_0x4cfa8b){return function(_0x71a463){if(_0x71a463){return _0x71a463['destroy']()[_0x3b7d('0x21')](function(){_0x466862['status'](0xcc)[_0x3b7d('0x18')]();});}};}function handleEntityNotFound(_0x3efe9a,_0x3eceed){return function(_0x5bbaa5){if(!_0x5bbaa5){_0x3efe9a['sendStatus'](0x194);}return _0x5bbaa5;};}function handleError(_0x15b5e3,_0x34ab4e){_0x34ab4e=_0x34ab4e||0x1f4;return function(_0xd7d400){logger[_0x3b7d('0x22')](_0xd7d400[_0x3b7d('0x23')]);if(_0xd7d400[_0x3b7d('0x24')]){delete _0xd7d400[_0x3b7d('0x24')];}_0x15b5e3[_0x3b7d('0x17')](_0x34ab4e)[_0x3b7d('0x25')](_0xd7d400);};}exports['index']=function(_0x3f5e96,_0x526dd4){var _0x204bb0={},_0x2e6604={},_0x588990={'count':0x0,'rows':[]};var _0x53f041=_[_0x3b7d('0x26')](db['FreshsalesField']['rawAttributes'],function(_0x4b670e){return{'name':_0x4b670e[_0x3b7d('0x27')],'type':_0x4b670e[_0x3b7d('0x28')]['key']};});_0x2e6604['model']=_[_0x3b7d('0x26')](_0x53f041,_0x3b7d('0x24'));_0x2e6604['query']=_[_0x3b7d('0x29')](_0x3f5e96[_0x3b7d('0x2a')]);_0x2e6604[_0x3b7d('0x2b')]=_[_0x3b7d('0x2c')](_0x2e6604[_0x3b7d('0x2d')],_0x2e6604[_0x3b7d('0x2a')]);_0x204bb0['attributes']=_[_0x3b7d('0x2c')](_0x2e6604[_0x3b7d('0x2d')],qs[_0x3b7d('0x2e')](_0x3f5e96[_0x3b7d('0x2a')][_0x3b7d('0x2e')]));_0x204bb0[_0x3b7d('0x2f')]=_0x204bb0[_0x3b7d('0x2f')][_0x3b7d('0x30')]?_0x204bb0[_0x3b7d('0x2f')]:_0x2e6604[_0x3b7d('0x2d')];if(!_0x3f5e96['query']['hasOwnProperty'](_0x3b7d('0x31'))){_0x204bb0[_0x3b7d('0x1d')]=qs[_0x3b7d('0x1d')](_0x3f5e96[_0x3b7d('0x2a')][_0x3b7d('0x1d')]);_0x204bb0[_0x3b7d('0x1a')]=qs[_0x3b7d('0x1a')](_0x3f5e96[_0x3b7d('0x2a')][_0x3b7d('0x1a')]);}_0x204bb0[_0x3b7d('0x32')]=qs[_0x3b7d('0x33')](_0x3f5e96['query'][_0x3b7d('0x33')]);_0x204bb0[_0x3b7d('0x34')]=qs[_0x3b7d('0x2b')](_[_0x3b7d('0x35')](_0x3f5e96[_0x3b7d('0x2a')],_0x2e6604['filters']),_0x53f041);if(_0x3f5e96[_0x3b7d('0x2a')][_0x3b7d('0x36')]){_0x204bb0[_0x3b7d('0x34')]=_['merge'](_0x204bb0[_0x3b7d('0x34')],{'$or':_[_0x3b7d('0x26')](_0x53f041,function(_0x6840d4){if(_0x6840d4[_0x3b7d('0x28')]!==_0x3b7d('0x37')){var _0x27427e={};_0x27427e[_0x6840d4[_0x3b7d('0x24')]]={'$like':'%'+_0x3f5e96[_0x3b7d('0x2a')]['filter']+'%'};return _0x27427e;}})});}_0x204bb0=_['merge']({},_0x204bb0,_0x3f5e96[_0x3b7d('0x38')]);var _0x378365={'where':_0x204bb0['where']};return db['FreshsalesField']['count'](_0x378365)['then'](function(_0x17f713){_0x588990[_0x3b7d('0x1c')]=_0x17f713;if(_0x3f5e96['query']['includeAll']){_0x204bb0['include']=[{'all':!![]}];}return db[_0x3b7d('0x39')][_0x3b7d('0x3a')](_0x204bb0);})[_0x3b7d('0x21')](function(_0x174870){_0x588990[_0x3b7d('0x3b')]=_0x174870;return _0x588990;})[_0x3b7d('0x21')](respondWithFilteredResult(_0x526dd4,_0x204bb0))[_0x3b7d('0x3c')](handleError(_0x526dd4,null));};exports[_0x3b7d('0x3d')]=function(_0x4abae6,_0x28206f){var _0x58dc79={'raw':!![],'where':{'id':_0x4abae6['params']['id']}},_0x309ff6={};_0x309ff6[_0x3b7d('0x2d')]=_['keys'](db[_0x3b7d('0x39')]['rawAttributes']);_0x309ff6[_0x3b7d('0x2a')]=_[_0x3b7d('0x29')](_0x4abae6['query']);_0x309ff6[_0x3b7d('0x2b')]=_[_0x3b7d('0x2c')](_0x309ff6['model'],_0x309ff6[_0x3b7d('0x2a')]);_0x58dc79[_0x3b7d('0x2f')]=_[_0x3b7d('0x2c')](_0x309ff6['model'],qs[_0x3b7d('0x2e')](_0x4abae6['query'][_0x3b7d('0x2e')]));_0x58dc79[_0x3b7d('0x2f')]=_0x58dc79[_0x3b7d('0x2f')][_0x3b7d('0x30')]?_0x58dc79[_0x3b7d('0x2f')]:_0x309ff6[_0x3b7d('0x2d')];if(_0x4abae6[_0x3b7d('0x2a')][_0x3b7d('0x3e')]){_0x58dc79[_0x3b7d('0x3f')]=[{'all':!![]}];}_0x58dc79=_[_0x3b7d('0x40')]({},_0x58dc79,_0x4abae6[_0x3b7d('0x38')]);return db[_0x3b7d('0x39')][_0x3b7d('0x41')](_0x58dc79)[_0x3b7d('0x21')](handleEntityNotFound(_0x28206f,null))['then'](respondWithResult(_0x28206f,null))['catch'](handleError(_0x28206f,null));};exports[_0x3b7d('0x42')]=function(_0xf5d74a,_0x1601bd){return db['FreshsalesField']['create'](_0xf5d74a[_0x3b7d('0x43')],{})['then'](respondWithResult(_0x1601bd,0xc9))[_0x3b7d('0x3c')](handleError(_0x1601bd,null));};exports['update']=function(_0xb58f49,_0x59b18f){if(_0xb58f49[_0x3b7d('0x43')]['id']){delete _0xb58f49[_0x3b7d('0x43')]['id'];}return db[_0x3b7d('0x39')][_0x3b7d('0x41')]({'where':{'id':_0xb58f49[_0x3b7d('0x44')]['id']}})['then'](handleEntityNotFound(_0x59b18f,null))[_0x3b7d('0x21')](saveUpdates(_0xb58f49['body'],null))[_0x3b7d('0x21')](respondWithResult(_0x59b18f,null))[_0x3b7d('0x3c')](handleError(_0x59b18f,null));};exports[_0x3b7d('0x45')]=function(_0x1f50ce,_0xd372cb){return db[_0x3b7d('0x39')][_0x3b7d('0x41')]({'where':{'id':_0x1f50ce[_0x3b7d('0x44')]['id']}})[_0x3b7d('0x21')](handleEntityNotFound(_0xd372cb,null))[_0x3b7d('0x21')](removeEntity(_0xd372cb,null))['catch'](handleError(_0xd372cb,null));};
\ No newline at end of file
index fd6e4bf..392d33f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9666=['lodash','util','../../config/logger','api','bluebird','request-promise','path','./intFreshsalesField.attributes','exports','define','FreshsalesField','freshsales_unique_index','idField','FieldId'];(function(_0x2718e6,_0x2e2e6d){var _0x21a493=function(_0x125c6d){while(--_0x125c6d){_0x2718e6['push'](_0x2718e6['shift']());}};_0x21a493(++_0x2e2e6d);}(_0x9666,0x17a));var _0x6966=function(_0x36d092,_0x4feec6){_0x36d092=_0x36d092-0x0;var _0x52c59c=_0x9666[_0x36d092];return _0x52c59c;};'use strict';var _=require(_0x6966('0x0'));var util=require(_0x6966('0x1'));var logger=require(_0x6966('0x2'))(_0x6966('0x3'));var moment=require('moment');var BPromise=require(_0x6966('0x4'));var rp=require(_0x6966('0x5'));var fs=require('fs');var path=require(_0x6966('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x6966('0x7'));module[_0x6966('0x8')]=function(_0x7194a6,_0x17198b){return _0x7194a6[_0x6966('0x9')](_0x6966('0xa'),attributes,{'tableName':'int_freshsales_fields','paranoid':![],'indexes':[{'name':_0x6966('0xb'),'fields':[_0x6966('0xc'),_0x6966('0xd')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xbca0=['util','bluebird','request-promise','path','rimraf','exports','define','idField','FieldId','lodash'];(function(_0x3b507d,_0x3367fd){var _0x36d4f2=function(_0x29b3b1){while(--_0x29b3b1){_0x3b507d['push'](_0x3b507d['shift']());}};_0x36d4f2(++_0x3367fd);}(_0xbca0,0x8b));var _0x0bca=function(_0x317451,_0x10e6dd){_0x317451=_0x317451-0x0;var _0xeb2909=_0xbca0[_0x317451];return _0xeb2909;};'use strict';var _=require(_0x0bca('0x0'));var util=require(_0x0bca('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x0bca('0x2'));var rp=require(_0x0bca('0x3'));var fs=require('fs');var path=require(_0x0bca('0x4'));var rimraf=require(_0x0bca('0x5'));var config=require('../../config/environment');var attributes=require('./intFreshsalesField.attributes');module[_0x0bca('0x6')]=function(_0x3d1155,_0x3dab5e){return _0x3d1155[_0x0bca('0x7')]('FreshsalesField',attributes,{'tableName':'int_freshsales_fields','paranoid':![],'indexes':[{'name':'freshsales_unique_index','fields':[_0x0bca('0x8'),_0x0bca('0x9')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index d7f5994..2fb9c81 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x33af=['error','code','message','result','catch','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','then','info','FreshsalesField,\x20%s,\x20%s','request\x20sent','debug','stringify'];(function(_0x2dc1a0,_0x29cf94){var _0x3d7e3d=function(_0x25b5d9){while(--_0x25b5d9){_0x2dc1a0['push'](_0x2dc1a0['shift']());}};_0x3d7e3d(++_0x29cf94);}(_0x33af,0xec));var _0xf33a=function(_0x113a6c,_0x10df30){_0x113a6c=_0x113a6c-0x0;var _0x1ac632=_0x33af[_0x113a6c];return _0x1ac632;};'use strict';var _=require('lodash');var util=require(_0xf33a('0x0'));var moment=require('moment');var BPromise=require(_0xf33a('0x1'));var rs=require(_0xf33a('0x2'));var fs=require('fs');var Redis=require(_0xf33a('0x3'));var db=require(_0xf33a('0x4'))['db'];var utils=require(_0xf33a('0x5'));var logger=require(_0xf33a('0x6'))('rpc');var config=require(_0xf33a('0x7'));var jayson=require(_0xf33a('0x8'));var client=jayson['client'][_0xf33a('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x384b14,_0x1b2b01,_0x2f3730){return new BPromise(function(_0x2baabb,_0x2cb169){return client['request'](_0x384b14,_0x2f3730)[_0xf33a('0xa')](function(_0x14eb0e){logger[_0xf33a('0xb')](_0xf33a('0xc'),_0x1b2b01,_0xf33a('0xd'));logger[_0xf33a('0xe')]('FreshsalesField,\x20%s,\x20%s,\x20%s',_0x1b2b01,'request\x20sent',JSON[_0xf33a('0xf')](_0x14eb0e));if(_0x14eb0e[_0xf33a('0x10')]){if(_0x14eb0e[_0xf33a('0x10')][_0xf33a('0x11')]===0x1f4){logger[_0xf33a('0x10')]('FreshsalesField,\x20%s,\x20%s',_0x1b2b01,_0x14eb0e[_0xf33a('0x10')][_0xf33a('0x12')]);return _0x2cb169(_0x14eb0e['error']['message']);}logger[_0xf33a('0x10')](_0xf33a('0xc'),_0x1b2b01,_0x14eb0e[_0xf33a('0x10')][_0xf33a('0x12')]);return _0x2baabb(_0x14eb0e[_0xf33a('0x10')][_0xf33a('0x12')]);}else{logger[_0xf33a('0xb')](_0xf33a('0xc'),_0x1b2b01,'request\x20sent');_0x2baabb(_0x14eb0e[_0xf33a('0x13')]['message']);}})[_0xf33a('0x14')](function(_0x229389){logger['error'](_0xf33a('0xc'),_0x1b2b01,_0x229389);_0x2cb169(_0x229389);});});}
\ No newline at end of file
+var _0x5fc3=['../../config/environment','jayson/promise','request','then','info','request\x20sent','debug','stringify','error','code','message','FreshsalesField,\x20%s,\x20%s','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc'];(function(_0x5963bb,_0x40dbf7){var _0x3ac85a=function(_0x432546){while(--_0x432546){_0x5963bb['push'](_0x5963bb['shift']());}};_0x3ac85a(++_0x40dbf7);}(_0x5fc3,0xa8));var _0x35fc=function(_0x5c4585,_0x3d0eab){_0x5c4585=_0x5c4585-0x0;var _0x21dede=_0x5fc3[_0x5c4585];return _0x21dede;};'use strict';var _=require(_0x35fc('0x0'));var util=require(_0x35fc('0x1'));var moment=require('moment');var BPromise=require(_0x35fc('0x2'));var rs=require(_0x35fc('0x3'));var fs=require('fs');var Redis=require(_0x35fc('0x4'));var db=require(_0x35fc('0x5'))['db'];var utils=require(_0x35fc('0x6'));var logger=require('../../config/logger')(_0x35fc('0x7'));var config=require(_0x35fc('0x8'));var jayson=require(_0x35fc('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x19a0d1,_0x508b32,_0x16e153){return new BPromise(function(_0x27524f,_0xc72d93){return client[_0x35fc('0xa')](_0x19a0d1,_0x16e153)[_0x35fc('0xb')](function(_0xf9d3a6){logger[_0x35fc('0xc')]('FreshsalesField,\x20%s,\x20%s',_0x508b32,_0x35fc('0xd'));logger[_0x35fc('0xe')]('FreshsalesField,\x20%s,\x20%s,\x20%s',_0x508b32,_0x35fc('0xd'),JSON[_0x35fc('0xf')](_0xf9d3a6));if(_0xf9d3a6['error']){if(_0xf9d3a6[_0x35fc('0x10')][_0x35fc('0x11')]===0x1f4){logger['error']('FreshsalesField,\x20%s,\x20%s',_0x508b32,_0xf9d3a6[_0x35fc('0x10')]['message']);return _0xc72d93(_0xf9d3a6[_0x35fc('0x10')][_0x35fc('0x12')]);}logger[_0x35fc('0x10')](_0x35fc('0x13'),_0x508b32,_0xf9d3a6[_0x35fc('0x10')]['message']);return _0x27524f(_0xf9d3a6['error']['message']);}else{logger['info'](_0x35fc('0x13'),_0x508b32,_0x35fc('0xd'));_0x27524f(_0xf9d3a6[_0x35fc('0x14')][_0x35fc('0x12')]);}})[_0x35fc('0x15')](function(_0x1121fa){logger['error'](_0x35fc('0x13'),_0x508b32,_0x1121fa);_0xc72d93(_0x1121fa);});});}
\ No newline at end of file
index 9342f24..bad778d 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(_0x4d337e,_0x2f7eed){var _0x247963=function(_0x3d6564){while(--_0x3d6564){_0x4d337e['push'](_0x4d337e['shift']());}};_0x247963(++_0x2f7eed);}(_0xa9e0,0x123));var _0x0a9e=function(_0x110c3d,_0x12ee06){_0x110c3d=_0x110c3d-0x0;var _0x226d67=_0xa9e0[_0x110c3d];return _0x226d67;};'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(_0x3981fc,_0x50f441){var _0x137929=function(_0x178e0e){while(--_0x178e0e){_0x3981fc['push'](_0x3981fc['shift']());}};_0x137929(++_0x50f441);}(_0x9957,0x93));var _0x7995=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x9957[_0x3947c9];return _0x2e7871;};'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 fa6692d..8338352 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb6ff=['exports','STRING','username','integrationTab','newTab','sequelize'];(function(_0x500277,_0x1b0c80){var _0x9d4ff6=function(_0x5e08b0){while(--_0x5e08b0){_0x500277['push'](_0x500277['shift']());}};_0x9d4ff6(++_0x1b0c80);}(_0xb6ff,0x185));var _0xfb6f=function(_0x32d457,_0x1a39c9){_0x32d457=_0x32d457-0x0;var _0x338386=_0xb6ff[_0x32d457];return _0x338386;};'use strict';var Sequelize=require(_0xfb6f('0x0'));module[_0xfb6f('0x1')]={'name':{'type':Sequelize[_0xfb6f('0x2')]},'description':{'type':Sequelize[_0xfb6f('0x2')]},'username':{'type':Sequelize['STRING'],'unique':_0xfb6f('0x3')},'remoteUri':{'type':Sequelize[_0xfb6f('0x2')]},'password':{'type':Sequelize[_0xfb6f('0x2')]},'clientId':{'type':Sequelize['STRING']},'clientSecret':{'type':Sequelize[_0xfb6f('0x2')]},'securityToken':{'type':Sequelize[_0xfb6f('0x2')]},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0xfb6f('0x4'),_0xfb6f('0x5')),'defaultValue':_0xfb6f('0x4')}};
\ No newline at end of file
+var _0x8561=['STRING','newTab','exports'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x8561,0x1b2));var _0x1856=function(_0x4a9bdd,_0x5098f5){_0x4a9bdd=_0x4a9bdd-0x0;var _0x1ba3a4=_0x8561[_0x4a9bdd];return _0x1ba3a4;};'use strict';var Sequelize=require('sequelize');module[_0x1856('0x0')]={'name':{'type':Sequelize[_0x1856('0x1')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0x1856('0x1')],'unique':'username'},'remoteUri':{'type':Sequelize[_0x1856('0x1')]},'password':{'type':Sequelize['STRING']},'clientId':{'type':Sequelize[_0x1856('0x1')]},'clientSecret':{'type':Sequelize['STRING']},'securityToken':{'type':Sequelize[_0x1856('0x1')]},'serverUrl':{'type':Sequelize[_0x1856('0x1')],'allowNull':![]},'type':{'type':Sequelize['ENUM']('integrationTab',_0x1856('0x2')),'defaultValue':'integrationTab'}};
\ No newline at end of file
index b89cd1b..d932cb4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x44cc=['api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','apply','reject','save','update','then','error','stack','name','send','index','map','SalesforceAccount','rawAttributes','fieldName','type','query','intersection','model','attributes','fields','length','nolimit','sort','where','filters','pick','filter','merge','options','include','findAll','rows','catch','params','keys','includeAll','create','body','destroy','find','getConfigurations','findOne','SalesforceConfiguration','order','hasOwnProperty','addConfiguration','AccountId','Subjects','getSubjects','channel','getDescriptions','SalesforceField','Descriptions','getFields','Task','remoteUri','clientId','clientSecret','username','password','securityToken','slice','substring','lastIndexOf','Connection','login','isNil','ticketType','describe','OwnerId','ActivityDate','IsRecurrence','Subject','Description','int','picklist','boolean','phone','remove','includes','label','picklistValues','value','True','False','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch'];(function(_0x5e3e14,_0x3e1e9e){var _0x25f527=function(_0x3aa192){while(--_0x3aa192){_0x5e3e14['push'](_0x5e3e14['shift']());}};_0x25f527(++_0x3e1e9e);}(_0x44cc,0x67));var _0xc44c=function(_0x2a8348,_0x2a03c7){_0x2a8348=_0x2a8348-0x0;var _0x44b4aa=_0x44cc[_0x2a8348];return _0x44b4aa;};'use strict';var emlformat=require(_0xc44c('0x0'));var rimraf=require(_0xc44c('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xc44c('0x2'));var rp=require(_0xc44c('0x3'));var moment=require('moment');var BPromise=require(_0xc44c('0x4'));var Mustache=require(_0xc44c('0x5'));var util=require(_0xc44c('0x6'));var path=require(_0xc44c('0x7'));var sox=require('sox');var csv=require(_0xc44c('0x8'));var ejs=require(_0xc44c('0x9'));var fs=require('fs');var fs_extra=require(_0xc44c('0xa'));var _=require(_0xc44c('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xc44c('0x8'));var querystring=require(_0xc44c('0xc'));var Papa=require(_0xc44c('0xd'));var Redis=require(_0xc44c('0xe'));var authService=require('../../components/auth/service');var qs=require(_0xc44c('0xf'));var as=require(_0xc44c('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xc44c('0x11'));var utils=require(_0xc44c('0x12'));var config=require(_0xc44c('0x13'));var licenseUtil=require(_0xc44c('0x14'));var db=require('../../mysqldb')['db'];var integrations=require('../../components/integrations/configuration');function respondWithStatusCode(_0x1739ff,_0x355365){_0x355365=_0x355365||0xcc;return function(_0x29efdb){if(_0x29efdb){return _0x1739ff[_0xc44c('0x15')](_0x355365);}return _0x1739ff[_0xc44c('0x16')](_0x355365)[_0xc44c('0x17')]();};}function respondWithResult(_0x5da2f1,_0x2f9354){_0x2f9354=_0x2f9354||0xc8;return function(_0x3a11b1){if(_0x3a11b1){return _0x5da2f1['status'](_0x2f9354)[_0xc44c('0x18')](_0x3a11b1);}};}function respondWithFilteredResult(_0x1d382b,_0x5c66de){return function(_0x29504f){if(_0x29504f){var _0x3e4824=typeof _0x5c66de[_0xc44c('0x19')]==='undefined'&&typeof _0x5c66de['limit']===_0xc44c('0x1a');var _0x106060=_0x29504f[_0xc44c('0x1b')];var _0xfbc17b=_0x3e4824?0x0:_0x5c66de[_0xc44c('0x19')];var _0x5905b7=_0x3e4824?_0x29504f[_0xc44c('0x1b')]:_0x5c66de['offset']+_0x5c66de[_0xc44c('0x1c')];var _0x4f28d1;if(_0x5905b7>=_0x106060){_0x5905b7=_0x106060;_0x4f28d1=0xc8;}else{_0x4f28d1=0xce;}_0x1d382b['status'](_0x4f28d1);return _0x1d382b[_0xc44c('0x1d')](_0xc44c('0x1e'),_0xfbc17b+'-'+_0x5905b7+'/'+_0x106060)[_0xc44c('0x18')](_0x29504f);}return null;};}function patchUpdates(_0x140221){return function(_0x2dc6fa){try{jsonpatch[_0xc44c('0x1f')](_0x2dc6fa,_0x140221,!![]);}catch(_0xa86967){return BPromise[_0xc44c('0x20')](_0xa86967);}return _0x2dc6fa[_0xc44c('0x21')]();};}function saveUpdates(_0x2af802,_0x163825){return function(_0x30ffd1){if(_0x30ffd1){return _0x30ffd1[_0xc44c('0x22')](_0x2af802)[_0xc44c('0x23')](function(_0x23be9b){return _0x23be9b;});}return null;};}function removeEntity(_0x74a200,_0x59eb6f){return function(_0xd551e6){if(_0xd551e6){return _0xd551e6['destroy']()[_0xc44c('0x23')](function(){_0x74a200['status'](0xcc)[_0xc44c('0x17')]();});}};}function handleEntityNotFound(_0x25ade5,_0x1d22e4){return function(_0x206ff9){if(!_0x206ff9){_0x25ade5['sendStatus'](0x194);}return _0x206ff9;};}function handleError(_0xc1fe90,_0x2bfa59){_0x2bfa59=_0x2bfa59||0x1f4;return function(_0x46f2ed){logger[_0xc44c('0x24')](_0x46f2ed[_0xc44c('0x25')]);if(_0x46f2ed[_0xc44c('0x26')]){delete _0x46f2ed[_0xc44c('0x26')];}_0xc1fe90[_0xc44c('0x16')](_0x2bfa59)[_0xc44c('0x27')](_0x46f2ed);};}exports[_0xc44c('0x28')]=function(_0x2b17a2,_0x546df5){var _0xa7967d={},_0x9076b5={},_0x454585={'count':0x0,'rows':[]};var _0x20bc32=_[_0xc44c('0x29')](db[_0xc44c('0x2a')][_0xc44c('0x2b')],function(_0x33e02a){return{'name':_0x33e02a[_0xc44c('0x2c')],'type':_0x33e02a[_0xc44c('0x2d')]['key']};});_0x9076b5['model']=_[_0xc44c('0x29')](_0x20bc32,_0xc44c('0x26'));_0x9076b5[_0xc44c('0x2e')]=_['keys'](_0x2b17a2[_0xc44c('0x2e')]);_0x9076b5['filters']=_[_0xc44c('0x2f')](_0x9076b5[_0xc44c('0x30')],_0x9076b5['query']);_0xa7967d[_0xc44c('0x31')]=_[_0xc44c('0x2f')](_0x9076b5[_0xc44c('0x30')],qs[_0xc44c('0x32')](_0x2b17a2[_0xc44c('0x2e')][_0xc44c('0x32')]));_0xa7967d[_0xc44c('0x31')]=_0xa7967d[_0xc44c('0x31')][_0xc44c('0x33')]?_0xa7967d[_0xc44c('0x31')]:_0x9076b5[_0xc44c('0x30')];if(!_0x2b17a2[_0xc44c('0x2e')]['hasOwnProperty'](_0xc44c('0x34'))){_0xa7967d['limit']=qs[_0xc44c('0x1c')](_0x2b17a2['query']['limit']);_0xa7967d[_0xc44c('0x19')]=qs[_0xc44c('0x19')](_0x2b17a2['query']['offset']);}_0xa7967d['order']=qs[_0xc44c('0x35')](_0x2b17a2[_0xc44c('0x2e')][_0xc44c('0x35')]);_0xa7967d[_0xc44c('0x36')]=qs[_0xc44c('0x37')](_[_0xc44c('0x38')](_0x2b17a2[_0xc44c('0x2e')],_0x9076b5['filters']),_0x20bc32);if(_0x2b17a2[_0xc44c('0x2e')][_0xc44c('0x39')]){_0xa7967d[_0xc44c('0x36')]=_[_0xc44c('0x3a')](_0xa7967d[_0xc44c('0x36')],{'$or':_[_0xc44c('0x29')](_0x20bc32,function(_0x13b8ce){if(_0x13b8ce[_0xc44c('0x2d')]!=='VIRTUAL'){var _0x51be3b={};_0x51be3b[_0x13b8ce[_0xc44c('0x26')]]={'$like':'%'+_0x2b17a2[_0xc44c('0x2e')][_0xc44c('0x39')]+'%'};return _0x51be3b;}})});}_0xa7967d=_[_0xc44c('0x3a')]({},_0xa7967d,_0x2b17a2[_0xc44c('0x3b')]);var _0x510f09={'where':_0xa7967d[_0xc44c('0x36')]};return db[_0xc44c('0x2a')][_0xc44c('0x1b')](_0x510f09)[_0xc44c('0x23')](function(_0x43e878){_0x454585[_0xc44c('0x1b')]=_0x43e878;if(_0x2b17a2['query']['includeAll']){_0xa7967d[_0xc44c('0x3c')]=[{'all':!![]}];}return db[_0xc44c('0x2a')][_0xc44c('0x3d')](_0xa7967d);})[_0xc44c('0x23')](function(_0x53424d){_0x454585[_0xc44c('0x3e')]=_0x53424d;return _0x454585;})[_0xc44c('0x23')](respondWithFilteredResult(_0x546df5,_0xa7967d))[_0xc44c('0x3f')](handleError(_0x546df5,null));};exports['show']=function(_0x30fa62,_0x543710){var _0xbcadd0={'raw':![],'where':{'id':_0x30fa62[_0xc44c('0x40')]['id']}},_0x551dfc={};_0x551dfc['model']=_['keys'](db[_0xc44c('0x2a')][_0xc44c('0x2b')]);_0x551dfc[_0xc44c('0x2e')]=_[_0xc44c('0x41')](_0x30fa62[_0xc44c('0x2e')]);_0x551dfc[_0xc44c('0x37')]=_['intersection'](_0x551dfc['model'],_0x551dfc[_0xc44c('0x2e')]);_0xbcadd0[_0xc44c('0x31')]=_[_0xc44c('0x2f')](_0x551dfc[_0xc44c('0x30')],qs['fields'](_0x30fa62[_0xc44c('0x2e')][_0xc44c('0x32')]));_0xbcadd0['attributes']=_0xbcadd0['attributes'][_0xc44c('0x33')]?_0xbcadd0[_0xc44c('0x31')]:_0x551dfc[_0xc44c('0x30')];if(_0x30fa62[_0xc44c('0x2e')][_0xc44c('0x42')]){_0xbcadd0[_0xc44c('0x3c')]=[{'all':!![]}];}_0xbcadd0=_[_0xc44c('0x3a')]({},_0xbcadd0,_0x30fa62[_0xc44c('0x3b')]);return db[_0xc44c('0x2a')]['find'](_0xbcadd0)[_0xc44c('0x23')](handleEntityNotFound(_0x543710,null))[_0xc44c('0x23')](respondWithResult(_0x543710,null))[_0xc44c('0x3f')](handleError(_0x543710,null));};exports[_0xc44c('0x43')]=function(_0x446563,_0x3e492b){return db[_0xc44c('0x2a')][_0xc44c('0x43')](_0x446563[_0xc44c('0x44')],{})['then'](respondWithResult(_0x3e492b,0xc9))['catch'](handleError(_0x3e492b,null));};exports[_0xc44c('0x22')]=function(_0x1166ab,_0x456c95){if(_0x1166ab[_0xc44c('0x44')]['id']){delete _0x1166ab[_0xc44c('0x44')]['id'];}return db['SalesforceAccount']['find']({'where':{'id':_0x1166ab[_0xc44c('0x40')]['id']}})['then'](handleEntityNotFound(_0x456c95,null))[_0xc44c('0x23')](saveUpdates(_0x1166ab['body'],null))[_0xc44c('0x23')](respondWithResult(_0x456c95,null))['catch'](handleError(_0x456c95,null));};exports[_0xc44c('0x45')]=function(_0x58dd1f,_0x5f27a3){return db['SalesforceAccount'][_0xc44c('0x46')]({'where':{'id':_0x58dd1f[_0xc44c('0x40')]['id']}})[_0xc44c('0x23')](handleEntityNotFound(_0x5f27a3,null))[_0xc44c('0x23')](removeEntity(_0x5f27a3,null))[_0xc44c('0x3f')](handleError(_0x5f27a3,null));};exports[_0xc44c('0x47')]=function(_0x276c0b,_0x33834b,_0x110cb7){var _0x192796={};var _0x15a295={};var _0x14665d;var _0x322b75;return db[_0xc44c('0x2a')][_0xc44c('0x48')]({'where':{'id':_0x276c0b[_0xc44c('0x40')]['id']}})[_0xc44c('0x23')](handleEntityNotFound(_0x33834b,null))['then'](function(_0x22f177){if(_0x22f177){_0x14665d=_0x22f177;_0x15a295[_0xc44c('0x30')]=_[_0xc44c('0x41')](db[_0xc44c('0x49')][_0xc44c('0x2b')]);_0x15a295[_0xc44c('0x2e')]=_[_0xc44c('0x41')](_0x276c0b[_0xc44c('0x2e')]);_0x15a295[_0xc44c('0x37')]=_[_0xc44c('0x2f')](_0x15a295[_0xc44c('0x30')],_0x15a295[_0xc44c('0x2e')]);_0x192796[_0xc44c('0x31')]=_[_0xc44c('0x2f')](_0x15a295[_0xc44c('0x30')],qs[_0xc44c('0x32')](_0x276c0b[_0xc44c('0x2e')][_0xc44c('0x32')]));_0x192796['attributes']=_0x192796[_0xc44c('0x31')][_0xc44c('0x33')]?_0x192796[_0xc44c('0x31')]:_0x15a295[_0xc44c('0x30')];_0x192796[_0xc44c('0x4a')]=qs[_0xc44c('0x35')](_0x276c0b[_0xc44c('0x2e')][_0xc44c('0x35')]);_0x192796[_0xc44c('0x36')]=qs[_0xc44c('0x37')](_[_0xc44c('0x38')](_0x276c0b[_0xc44c('0x2e')],_0x15a295[_0xc44c('0x37')]));if(_0x276c0b['query'][_0xc44c('0x39')]){_0x192796[_0xc44c('0x36')]=_[_0xc44c('0x3a')](_0x192796[_0xc44c('0x36')],{'$or':_[_0xc44c('0x29')](_0x192796[_0xc44c('0x31')],function(_0x6de8ac){var _0x5b9e49={};_0x5b9e49[_0x6de8ac]={'$like':'%'+_0x276c0b[_0xc44c('0x2e')]['filter']+'%'};return _0x5b9e49;})});}_0x192796=_[_0xc44c('0x3a')]({},_0x192796,_0x276c0b[_0xc44c('0x3b')]);return _0x14665d[_0xc44c('0x47')](_0x192796);}})[_0xc44c('0x23')](function(_0x18b469){if(_0x18b469){_0x322b75=_0x18b469['length'];if(!_0x276c0b[_0xc44c('0x2e')][_0xc44c('0x4b')](_0xc44c('0x34'))){_0x192796['limit']=qs['limit'](_0x276c0b[_0xc44c('0x2e')][_0xc44c('0x1c')]);_0x192796[_0xc44c('0x19')]=qs['offset'](_0x276c0b[_0xc44c('0x2e')]['offset']);}return _0x14665d[_0xc44c('0x47')](_0x192796);}})['then'](function(_0x54357b){if(_0x54357b){return _0x54357b?{'count':_0x322b75,'rows':_0x54357b}:null;}})['then'](respondWithResult(_0x33834b,null))['catch'](handleError(_0x33834b,null));};exports[_0xc44c('0x4c')]=function(_0x46b530,_0x242156,_0x49513b){if(_0x46b530[_0xc44c('0x44')]['id']){delete _0x46b530['body']['id'];}return db[_0xc44c('0x2a')][_0xc44c('0x48')]({'where':{'id':_0x46b530[_0xc44c('0x40')]['id']}})[_0xc44c('0x23')](handleEntityNotFound(_0x242156,null))[_0xc44c('0x23')](function(_0x6796b5){if(_0x6796b5){_0x46b530[_0xc44c('0x44')][_0xc44c('0x4d')]=_0x6796b5['id'];_0x46b530[_0xc44c('0x44')][_0xc44c('0x4e')]=integrations[_0xc44c('0x4f')](_0x46b530[_0xc44c('0x44')][_0xc44c('0x50')],_0x46b530[_0xc44c('0x44')][_0xc44c('0x2d')]);_0x46b530[_0xc44c('0x44')]['Descriptions']=integrations[_0xc44c('0x51')](_0x46b530[_0xc44c('0x44')][_0xc44c('0x50')],_0x46b530[_0xc44c('0x44')]['type']);return db[_0xc44c('0x49')]['create'](_0x46b530[_0xc44c('0x44')],{'include':[{'model':db['SalesforceField'],'as':'Subjects'},{'model':db[_0xc44c('0x52')],'as':_0xc44c('0x53')}]});}return null;})[_0xc44c('0x23')](respondWithResult(_0x242156,null))[_0xc44c('0x3f')](handleError(_0x242156,null));};exports[_0xc44c('0x54')]=function(_0x2089a1,_0x55d584,_0x53b0ec){var _0x4296fe;var _0x2289cb='';var _0x5ed974=_0xc44c('0x55');return db[_0xc44c('0x2a')]['findOne']({'where':{'id':_0x2089a1['params']['id']},'attributes':['id',_0xc44c('0x56'),_0xc44c('0x57'),_0xc44c('0x58'),_0xc44c('0x59'),_0xc44c('0x5a'),_0xc44c('0x5b')]})[_0xc44c('0x23')](handleEntityNotFound(_0x55d584,null))[_0xc44c('0x23')](function(_0x69ec62){if(_0x69ec62){_0x2289cb=_0x69ec62['remoteUri'];var _0x318a88=_0x2289cb[_0xc44c('0x5c')](-0x1);if(_0x318a88==='/'){_0x2289cb=_0x2289cb[_0xc44c('0x5d')](0x0,_0x2289cb[_0xc44c('0x5e')](_0x318a88));}_0x4296fe=new jsforce[(_0xc44c('0x5f'))]({'oauth2':{'loginUrl':_0x2289cb,'clientId':_0x69ec62[_0xc44c('0x57')],'clientSecret':_0x69ec62[_0xc44c('0x58')]}});return _0x4296fe[_0xc44c('0x60')](_0x69ec62['username'],_0x69ec62[_0xc44c('0x5a')]['concat'](_0x69ec62['securityToken']));}})[_0xc44c('0x23')](function(_0xc6c721){if(_0xc6c721){if(!_[_0xc44c('0x61')](_0x2089a1[_0xc44c('0x2e')][_0xc44c('0x62')])){_0x5ed974=_0x2089a1[_0xc44c('0x2e')][_0xc44c('0x62')];}return _0x4296fe['sobject'](_0x5ed974)[_0xc44c('0x63')]();}})[_0xc44c('0x23')](function(_0x8395df){var _0x3c86b8=[_0xc44c('0x64'),_0xc44c('0x65'),'IsReminderSet',_0xc44c('0x66'),_0xc44c('0x67'),_0xc44c('0x68')];var _0x589715=['string',_0xc44c('0x69'),_0xc44c('0x6a'),_0xc44c('0x6b'),'email','textarea',_0xc44c('0x6c')];if(_0x8395df){_[_0xc44c('0x6d')](_0x8395df[_0xc44c('0x32')],function(_0x1a4cb2){return _0x3c86b8['includes'](_0x1a4cb2[_0xc44c('0x26')])||!_0x589715[_0xc44c('0x6e')](_0x1a4cb2[_0xc44c('0x2d')]);});return{'count':_0x8395df[_0xc44c('0x32')][_0xc44c('0x33')],'rows':_[_0xc44c('0x29')](_0x8395df[_0xc44c('0x32')],function(_0x2454d7){return{'id':_0x2454d7['name'],'name':_0x2454d7[_0xc44c('0x6f')],'custom':_0x2454d7['custom'],'options':_0x2454d7[_0xc44c('0x70')]['length']>0x0?_[_0xc44c('0x29')](_0x2454d7['picklistValues'],function(_0x5959f8){return{'name':_0x5959f8['label'],'value':_0x5959f8[_0xc44c('0x71')]};}):_0x2454d7[_0xc44c('0x2d')]==_0xc44c('0x6b')?[{'name':_0xc44c('0x72'),'value':'true'},{'name':_0xc44c('0x73'),'value':'false'}]:[]};})};}})[_0xc44c('0x23')](respondWithResult(_0x55d584,null))[_0xc44c('0x3f')](function(_0x5adf87){var _0x4f42f6=_0x2089a1[_0xc44c('0x2e')][_0xc44c('0x74')]?0x1f4:_0x5adf87[_0xc44c('0x75')]||0x1f4;logger[_0xc44c('0x24')](_0xc44c('0x76'),_0xc44c('0x54'),_0x4f42f6,JSON['stringify'](_0x5adf87));delete _0x5adf87[_0xc44c('0x26')];if(_0x4f42f6===0x191){_0x4f42f6=0x190;}_0x55d584[_0xc44c('0x16')](_0x4f42f6)['send'](_0x2089a1[_0xc44c('0x2e')]['test']?{'message':_0xc44c('0x77'),'statusCode':_0x5adf87[_0xc44c('0x75')]}:_0x5adf87);});};
\ No newline at end of file
+var _0x3678=['phone','remove','includes','custom','picklistValues','label','True','true','False','false','test','statusCode','getFields','stringify','Wrong\x20credentials','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','ejs','fs-extra','lodash','crypto','querystring','papaparse','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','name','send','index','map','SalesforceAccount','rawAttributes','fieldName','type','model','query','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','filters','pick','filter','merge','VIRTUAL','where','includeAll','rows','show','keys','fields','include','options','catch','create','body','find','getConfigurations','params','findOne','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','SalesforceField','remoteUri','clientId','password','securityToken','slice','substring','lastIndexOf','clientSecret','username','concat','isNil','ticketType','describe','IsReminderSet','IsRecurrence','Subject','string','int','picklist','boolean'];(function(_0x36ed48,_0x1ee0d4){var _0x51c63a=function(_0x2d0a40){while(--_0x2d0a40){_0x36ed48['push'](_0x36ed48['shift']());}};_0x51c63a(++_0x1ee0d4);}(_0x3678,0x1ef));var _0x8367=function(_0x425d5e,_0x3b9040){_0x425d5e=_0x425d5e-0x0;var _0x3cc67b=_0x3678[_0x425d5e];return _0x3cc67b;};'use strict';var emlformat=require(_0x8367('0x0'));var rimraf=require(_0x8367('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x8367('0x2'));var rp=require(_0x8367('0x3'));var moment=require(_0x8367('0x4'));var BPromise=require(_0x8367('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x8367('0x6'));var sox=require(_0x8367('0x7'));var csv=require(_0x8367('0x8'));var ejs=require(_0x8367('0x9'));var fs=require('fs');var fs_extra=require(_0x8367('0xa'));var _=require(_0x8367('0xb'));var squel=require('squel');var crypto=require(_0x8367('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x8367('0x8'));var querystring=require(_0x8367('0xd'));var Papa=require(_0x8367('0xe'));var Redis=require(_0x8367('0xf'));var authService=require(_0x8367('0x10'));var qs=require(_0x8367('0x11'));var as=require(_0x8367('0x12'));var hardwareService=require(_0x8367('0x13'));var logger=require(_0x8367('0x14'))('api');var utils=require('../../config/utils');var config=require(_0x8367('0x15'));var licenseUtil=require(_0x8367('0x16'));var db=require('../../mysqldb')['db'];var integrations=require('../../components/integrations/configuration');function respondWithStatusCode(_0x73f80f,_0x526259){_0x526259=_0x526259||0xcc;return function(_0x4327b5){if(_0x4327b5){return _0x73f80f[_0x8367('0x17')](_0x526259);}return _0x73f80f[_0x8367('0x18')](_0x526259)[_0x8367('0x19')]();};}function respondWithResult(_0xdbd6ad,_0x1a4cfd){_0x1a4cfd=_0x1a4cfd||0xc8;return function(_0x383b26){if(_0x383b26){return _0xdbd6ad[_0x8367('0x18')](_0x1a4cfd)[_0x8367('0x1a')](_0x383b26);}};}function respondWithFilteredResult(_0x12063b,_0x148616){return function(_0x4c9f8f){if(_0x4c9f8f){var _0x5d88e6=typeof _0x148616[_0x8367('0x1b')]===_0x8367('0x1c')&&typeof _0x148616[_0x8367('0x1d')]===_0x8367('0x1c');var _0x6bdf95=_0x4c9f8f[_0x8367('0x1e')];var _0xdc7add=_0x5d88e6?0x0:_0x148616[_0x8367('0x1b')];var _0x5f2755=_0x5d88e6?_0x4c9f8f['count']:_0x148616[_0x8367('0x1b')]+_0x148616['limit'];var _0x1edd9f;if(_0x5f2755>=_0x6bdf95){_0x5f2755=_0x6bdf95;_0x1edd9f=0xc8;}else{_0x1edd9f=0xce;}_0x12063b[_0x8367('0x18')](_0x1edd9f);return _0x12063b[_0x8367('0x1f')](_0x8367('0x20'),_0xdc7add+'-'+_0x5f2755+'/'+_0x6bdf95)[_0x8367('0x1a')](_0x4c9f8f);}return null;};}function patchUpdates(_0x5f26e0){return function(_0x209ece){try{jsonpatch[_0x8367('0x21')](_0x209ece,_0x5f26e0,!![]);}catch(_0x3feef5){return BPromise[_0x8367('0x22')](_0x3feef5);}return _0x209ece[_0x8367('0x23')]();};}function saveUpdates(_0x23128a,_0x3e45d5){return function(_0x535361){if(_0x535361){return _0x535361[_0x8367('0x24')](_0x23128a)[_0x8367('0x25')](function(_0x5004c5){return _0x5004c5;});}return null;};}function removeEntity(_0x7b8c9a,_0x3e8bd6){return function(_0x3563bd){if(_0x3563bd){return _0x3563bd[_0x8367('0x26')]()[_0x8367('0x25')](function(){_0x7b8c9a[_0x8367('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3a6ef4,_0x55d276){return function(_0x1b6b06){if(!_0x1b6b06){_0x3a6ef4[_0x8367('0x17')](0x194);}return _0x1b6b06;};}function handleError(_0x38770f,_0x5ef380){_0x5ef380=_0x5ef380||0x1f4;return function(_0x2c6015){logger[_0x8367('0x27')](_0x2c6015[_0x8367('0x28')]);if(_0x2c6015[_0x8367('0x29')]){delete _0x2c6015['name'];}_0x38770f['status'](_0x5ef380)[_0x8367('0x2a')](_0x2c6015);};}exports[_0x8367('0x2b')]=function(_0x2ef9de,_0x5c6aff){var _0x5c96eb={},_0x27ea64={},_0x189522={'count':0x0,'rows':[]};var _0x53ef72=_[_0x8367('0x2c')](db[_0x8367('0x2d')][_0x8367('0x2e')],function(_0xfd5a6e){return{'name':_0xfd5a6e[_0x8367('0x2f')],'type':_0xfd5a6e[_0x8367('0x30')]['key']};});_0x27ea64[_0x8367('0x31')]=_[_0x8367('0x2c')](_0x53ef72,_0x8367('0x29'));_0x27ea64[_0x8367('0x32')]=_['keys'](_0x2ef9de['query']);_0x27ea64['filters']=_[_0x8367('0x33')](_0x27ea64[_0x8367('0x31')],_0x27ea64[_0x8367('0x32')]);_0x5c96eb[_0x8367('0x34')]=_['intersection'](_0x27ea64[_0x8367('0x31')],qs['fields'](_0x2ef9de['query']['fields']));_0x5c96eb[_0x8367('0x34')]=_0x5c96eb[_0x8367('0x34')][_0x8367('0x35')]?_0x5c96eb['attributes']:_0x27ea64[_0x8367('0x31')];if(!_0x2ef9de[_0x8367('0x32')][_0x8367('0x36')](_0x8367('0x37'))){_0x5c96eb[_0x8367('0x1d')]=qs[_0x8367('0x1d')](_0x2ef9de[_0x8367('0x32')]['limit']);_0x5c96eb[_0x8367('0x1b')]=qs[_0x8367('0x1b')](_0x2ef9de[_0x8367('0x32')][_0x8367('0x1b')]);}_0x5c96eb[_0x8367('0x38')]=qs['sort'](_0x2ef9de[_0x8367('0x32')][_0x8367('0x39')]);_0x5c96eb['where']=qs[_0x8367('0x3a')](_[_0x8367('0x3b')](_0x2ef9de[_0x8367('0x32')],_0x27ea64[_0x8367('0x3a')]),_0x53ef72);if(_0x2ef9de[_0x8367('0x32')][_0x8367('0x3c')]){_0x5c96eb['where']=_[_0x8367('0x3d')](_0x5c96eb['where'],{'$or':_['map'](_0x53ef72,function(_0x193876){if(_0x193876[_0x8367('0x30')]!==_0x8367('0x3e')){var _0x5819e9={};_0x5819e9[_0x193876[_0x8367('0x29')]]={'$like':'%'+_0x2ef9de[_0x8367('0x32')][_0x8367('0x3c')]+'%'};return _0x5819e9;}})});}_0x5c96eb=_['merge']({},_0x5c96eb,_0x2ef9de['options']);var _0x194d51={'where':_0x5c96eb[_0x8367('0x3f')]};return db[_0x8367('0x2d')][_0x8367('0x1e')](_0x194d51)['then'](function(_0x124c62){_0x189522['count']=_0x124c62;if(_0x2ef9de[_0x8367('0x32')][_0x8367('0x40')]){_0x5c96eb['include']=[{'all':!![]}];}return db[_0x8367('0x2d')]['findAll'](_0x5c96eb);})['then'](function(_0x5a03c6){_0x189522[_0x8367('0x41')]=_0x5a03c6;return _0x189522;})[_0x8367('0x25')](respondWithFilteredResult(_0x5c6aff,_0x5c96eb))['catch'](handleError(_0x5c6aff,null));};exports[_0x8367('0x42')]=function(_0x278f0e,_0x2c2eb2){var _0x49a915={'raw':![],'where':{'id':_0x278f0e['params']['id']}},_0x1ff42c={};_0x1ff42c[_0x8367('0x31')]=_[_0x8367('0x43')](db[_0x8367('0x2d')][_0x8367('0x2e')]);_0x1ff42c[_0x8367('0x32')]=_[_0x8367('0x43')](_0x278f0e['query']);_0x1ff42c['filters']=_[_0x8367('0x33')](_0x1ff42c['model'],_0x1ff42c[_0x8367('0x32')]);_0x49a915[_0x8367('0x34')]=_[_0x8367('0x33')](_0x1ff42c['model'],qs['fields'](_0x278f0e[_0x8367('0x32')][_0x8367('0x44')]));_0x49a915[_0x8367('0x34')]=_0x49a915[_0x8367('0x34')][_0x8367('0x35')]?_0x49a915[_0x8367('0x34')]:_0x1ff42c[_0x8367('0x31')];if(_0x278f0e[_0x8367('0x32')][_0x8367('0x40')]){_0x49a915[_0x8367('0x45')]=[{'all':!![]}];}_0x49a915=_[_0x8367('0x3d')]({},_0x49a915,_0x278f0e[_0x8367('0x46')]);return db[_0x8367('0x2d')]['find'](_0x49a915)[_0x8367('0x25')](handleEntityNotFound(_0x2c2eb2,null))[_0x8367('0x25')](respondWithResult(_0x2c2eb2,null))[_0x8367('0x47')](handleError(_0x2c2eb2,null));};exports[_0x8367('0x48')]=function(_0x17df3e,_0x3e094c){return db[_0x8367('0x2d')]['create'](_0x17df3e[_0x8367('0x49')],{})[_0x8367('0x25')](respondWithResult(_0x3e094c,0xc9))[_0x8367('0x47')](handleError(_0x3e094c,null));};exports[_0x8367('0x24')]=function(_0x18faf8,_0x3d3610){if(_0x18faf8[_0x8367('0x49')]['id']){delete _0x18faf8['body']['id'];}return db[_0x8367('0x2d')][_0x8367('0x4a')]({'where':{'id':_0x18faf8['params']['id']}})[_0x8367('0x25')](handleEntityNotFound(_0x3d3610,null))[_0x8367('0x25')](saveUpdates(_0x18faf8[_0x8367('0x49')],null))[_0x8367('0x25')](respondWithResult(_0x3d3610,null))[_0x8367('0x47')](handleError(_0x3d3610,null));};exports[_0x8367('0x26')]=function(_0x39ded8,_0xfedb63){return db[_0x8367('0x2d')]['find']({'where':{'id':_0x39ded8['params']['id']}})[_0x8367('0x25')](handleEntityNotFound(_0xfedb63,null))['then'](removeEntity(_0xfedb63,null))[_0x8367('0x47')](handleError(_0xfedb63,null));};exports[_0x8367('0x4b')]=function(_0x4727d4,_0x4e1a70,_0x1f679e){var _0x3d7c4f={};var _0x412f78={};var _0x4f0e91;var _0x2f1e1a;return db[_0x8367('0x2d')]['findOne']({'where':{'id':_0x4727d4[_0x8367('0x4c')]['id']}})['then'](handleEntityNotFound(_0x4e1a70,null))[_0x8367('0x25')](function(_0xa825f1){if(_0xa825f1){_0x4f0e91=_0xa825f1;_0x412f78[_0x8367('0x31')]=_['keys'](db['SalesforceConfiguration'][_0x8367('0x2e')]);_0x412f78[_0x8367('0x32')]=_[_0x8367('0x43')](_0x4727d4[_0x8367('0x32')]);_0x412f78[_0x8367('0x3a')]=_[_0x8367('0x33')](_0x412f78[_0x8367('0x31')],_0x412f78[_0x8367('0x32')]);_0x3d7c4f[_0x8367('0x34')]=_[_0x8367('0x33')](_0x412f78[_0x8367('0x31')],qs['fields'](_0x4727d4['query'][_0x8367('0x44')]));_0x3d7c4f[_0x8367('0x34')]=_0x3d7c4f['attributes'][_0x8367('0x35')]?_0x3d7c4f[_0x8367('0x34')]:_0x412f78[_0x8367('0x31')];_0x3d7c4f[_0x8367('0x38')]=qs[_0x8367('0x39')](_0x4727d4['query'][_0x8367('0x39')]);_0x3d7c4f[_0x8367('0x3f')]=qs['filters'](_[_0x8367('0x3b')](_0x4727d4[_0x8367('0x32')],_0x412f78[_0x8367('0x3a')]));if(_0x4727d4['query'][_0x8367('0x3c')]){_0x3d7c4f[_0x8367('0x3f')]=_['merge'](_0x3d7c4f['where'],{'$or':_[_0x8367('0x2c')](_0x3d7c4f[_0x8367('0x34')],function(_0x243fa4){var _0x4993b6={};_0x4993b6[_0x243fa4]={'$like':'%'+_0x4727d4[_0x8367('0x32')][_0x8367('0x3c')]+'%'};return _0x4993b6;})});}_0x3d7c4f=_[_0x8367('0x3d')]({},_0x3d7c4f,_0x4727d4[_0x8367('0x46')]);return _0x4f0e91['getConfigurations'](_0x3d7c4f);}})[_0x8367('0x25')](function(_0x53e086){if(_0x53e086){_0x2f1e1a=_0x53e086[_0x8367('0x35')];if(!_0x4727d4[_0x8367('0x32')]['hasOwnProperty'](_0x8367('0x37'))){_0x3d7c4f['limit']=qs[_0x8367('0x1d')](_0x4727d4[_0x8367('0x32')][_0x8367('0x1d')]);_0x3d7c4f[_0x8367('0x1b')]=qs[_0x8367('0x1b')](_0x4727d4[_0x8367('0x32')]['offset']);}return _0x4f0e91[_0x8367('0x4b')](_0x3d7c4f);}})[_0x8367('0x25')](function(_0x13419b){if(_0x13419b){return _0x13419b?{'count':_0x2f1e1a,'rows':_0x13419b}:null;}})['then'](respondWithResult(_0x4e1a70,null))[_0x8367('0x47')](handleError(_0x4e1a70,null));};exports['addConfiguration']=function(_0x4fbf41,_0x1f5df2,_0x460532){if(_0x4fbf41[_0x8367('0x49')]['id']){delete _0x4fbf41[_0x8367('0x49')]['id'];}return db[_0x8367('0x2d')][_0x8367('0x4d')]({'where':{'id':_0x4fbf41[_0x8367('0x4c')]['id']}})['then'](handleEntityNotFound(_0x1f5df2,null))[_0x8367('0x25')](function(_0x41c34f){if(_0x41c34f){_0x4fbf41[_0x8367('0x49')][_0x8367('0x4e')]=_0x41c34f['id'];_0x4fbf41['body'][_0x8367('0x4f')]=integrations[_0x8367('0x50')](_0x4fbf41[_0x8367('0x49')][_0x8367('0x51')],_0x4fbf41[_0x8367('0x49')][_0x8367('0x30')]);_0x4fbf41[_0x8367('0x49')][_0x8367('0x52')]=integrations[_0x8367('0x53')](_0x4fbf41[_0x8367('0x49')][_0x8367('0x51')],_0x4fbf41[_0x8367('0x49')]['type']);return db['SalesforceConfiguration']['create'](_0x4fbf41[_0x8367('0x49')],{'include':[{'model':db[_0x8367('0x54')],'as':'Subjects'},{'model':db[_0x8367('0x54')],'as':'Descriptions'}]});}return null;})[_0x8367('0x25')](respondWithResult(_0x1f5df2,null))['catch'](handleError(_0x1f5df2,null));};exports['getFields']=function(_0x5eba54,_0x35d1d8,_0x1cad7f){var _0x4c6e48;var _0x42e31e='';var _0x105d34='Task';return db[_0x8367('0x2d')][_0x8367('0x4d')]({'where':{'id':_0x5eba54[_0x8367('0x4c')]['id']},'attributes':['id',_0x8367('0x55'),_0x8367('0x56'),'clientSecret','username',_0x8367('0x57'),_0x8367('0x58')]})['then'](handleEntityNotFound(_0x35d1d8,null))[_0x8367('0x25')](function(_0x7e5ff9){if(_0x7e5ff9){_0x42e31e=_0x7e5ff9[_0x8367('0x55')];var _0x15391b=_0x42e31e[_0x8367('0x59')](-0x1);if(_0x15391b==='/'){_0x42e31e=_0x42e31e[_0x8367('0x5a')](0x0,_0x42e31e[_0x8367('0x5b')](_0x15391b));}_0x4c6e48=new jsforce['Connection']({'oauth2':{'loginUrl':_0x42e31e,'clientId':_0x7e5ff9['clientId'],'clientSecret':_0x7e5ff9[_0x8367('0x5c')]}});return _0x4c6e48['login'](_0x7e5ff9[_0x8367('0x5d')],_0x7e5ff9[_0x8367('0x57')][_0x8367('0x5e')](_0x7e5ff9['securityToken']));}})[_0x8367('0x25')](function(_0x38839a){if(_0x38839a){if(!_[_0x8367('0x5f')](_0x5eba54[_0x8367('0x32')][_0x8367('0x60')])){_0x105d34=_0x5eba54[_0x8367('0x32')][_0x8367('0x60')];}return _0x4c6e48['sobject'](_0x105d34)[_0x8367('0x61')]();}})[_0x8367('0x25')](function(_0x3b599e){var _0x2ce76f=['OwnerId','ActivityDate',_0x8367('0x62'),_0x8367('0x63'),_0x8367('0x64'),'Description'];var _0x1c2de4=[_0x8367('0x65'),_0x8367('0x66'),_0x8367('0x67'),_0x8367('0x68'),'email','textarea',_0x8367('0x69')];if(_0x3b599e){_[_0x8367('0x6a')](_0x3b599e[_0x8367('0x44')],function(_0x4cf839){return _0x2ce76f[_0x8367('0x6b')](_0x4cf839[_0x8367('0x29')])||!_0x1c2de4[_0x8367('0x6b')](_0x4cf839[_0x8367('0x30')]);});return{'count':_0x3b599e[_0x8367('0x44')][_0x8367('0x35')],'rows':_[_0x8367('0x2c')](_0x3b599e['fields'],function(_0x4f34a8){return{'id':_0x4f34a8[_0x8367('0x29')],'name':_0x4f34a8['label'],'custom':_0x4f34a8[_0x8367('0x6c')],'options':_0x4f34a8[_0x8367('0x6d')][_0x8367('0x35')]>0x0?_['map'](_0x4f34a8['picklistValues'],function(_0x1903b6){return{'name':_0x1903b6[_0x8367('0x6e')],'value':_0x1903b6['value']};}):_0x4f34a8[_0x8367('0x30')]==_0x8367('0x68')?[{'name':_0x8367('0x6f'),'value':_0x8367('0x70')},{'name':_0x8367('0x71'),'value':_0x8367('0x72')}]:[]};})};}})['then'](respondWithResult(_0x35d1d8,null))[_0x8367('0x47')](function(_0x527747){var _0x379bde=_0x5eba54[_0x8367('0x32')][_0x8367('0x73')]?0x1f4:_0x527747[_0x8367('0x74')]||0x1f4;logger[_0x8367('0x27')]('getFields,\x20%s,\x20%s,\x20%s',_0x8367('0x75'),_0x379bde,JSON[_0x8367('0x76')](_0x527747));delete _0x527747[_0x8367('0x29')];if(_0x379bde===0x191){_0x379bde=0x190;}_0x35d1d8[_0x8367('0x18')](_0x379bde)['send'](_0x5eba54['query']['test']?{'message':_0x8367('0x77'),'statusCode':_0x527747['statusCode']}:_0x527747);});};
\ No newline at end of file
index 0ecdc89..12a1295 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x18e0=['define','SalesforceAccount','util','api','moment','bluebird','path','./intSalesforceAccount.attributes','../../components/integrations/configuration','exports'];(function(_0x49508f,_0x172399){var _0x1787ef=function(_0x1a9f45){while(--_0x1a9f45){_0x49508f['push'](_0x49508f['shift']());}};_0x1787ef(++_0x172399);}(_0x18e0,0xa2));var _0x018e=function(_0x5f309e,_0x66e31){_0x5f309e=_0x5f309e-0x0;var _0x487b5e=_0x18e0[_0x5f309e];return _0x487b5e;};'use strict';var _=require('lodash');var util=require(_0x018e('0x0'));var logger=require('../../config/logger')(_0x018e('0x1'));var moment=require(_0x018e('0x2'));var BPromise=require(_0x018e('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x018e('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x018e('0x5'));var integrations=require(_0x018e('0x6'));module[_0x018e('0x7')]=function(_0x50450b,_0x5b6638){return _0x50450b[_0x018e('0x8')](_0x018e('0x9'),attributes,{'tableName':'int_salesforce_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x65b9=['lodash','api','bluebird','request-promise','path','./intSalesforceAccount.attributes','../../components/integrations/configuration','define','SalesforceAccount','int_salesforce_accounts'];(function(_0x49225d,_0x312d6c){var _0x2c228f=function(_0x183ff5){while(--_0x183ff5){_0x49225d['push'](_0x49225d['shift']());}};_0x2c228f(++_0x312d6c);}(_0x65b9,0x154));var _0x965b=function(_0xb24891,_0x55548f){_0xb24891=_0xb24891-0x0;var _0x4f1728=_0x65b9[_0xb24891];return _0x4f1728;};'use strict';var _=require(_0x965b('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x965b('0x1'));var moment=require('moment');var BPromise=require(_0x965b('0x2'));var rp=require(_0x965b('0x3'));var fs=require('fs');var path=require(_0x965b('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x965b('0x5'));var integrations=require(_0x965b('0x6'));module['exports']=function(_0x5015a3,_0x30ea04){return _0x5015a3[_0x965b('0x7')](_0x965b('0x8'),attributes,{'tableName':_0x965b('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 6f1e531..82d05b8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xce47=['bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','then','info','SalesforceAccount,\x20%s,\x20%s','debug','SalesforceAccount,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','GetSalesforceAccount','SalesforceAccount','findAll','options','raw','where','attributes','limit','include','map','model','stringify','ShowSalesforceAccount','find','lodash','moment'];(function(_0x5f1391,_0x19c132){var _0x50ebe3=function(_0x3d00a3){while(--_0x3d00a3){_0x5f1391['push'](_0x5f1391['shift']());}};_0x50ebe3(++_0x19c132);}(_0xce47,0x17f));var _0x7ce4=function(_0x412691,_0x1eddbd){_0x412691=_0x412691-0x0;var _0x1e2221=_0xce47[_0x412691];return _0x1e2221;};'use strict';var _=require(_0x7ce4('0x0'));var util=require('util');var moment=require(_0x7ce4('0x1'));var BPromise=require(_0x7ce4('0x2'));var rs=require(_0x7ce4('0x3'));var fs=require('fs');var Redis=require(_0x7ce4('0x4'));var db=require(_0x7ce4('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x7ce4('0x6'))('rpc');var config=require(_0x7ce4('0x7'));var jayson=require(_0x7ce4('0x8'));var client=jayson[_0x7ce4('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0xd4cb22,_0x4d699a,_0x39e342){return new BPromise(function(_0x485fe4,_0x58013b){return client['request'](_0xd4cb22,_0x39e342)[_0x7ce4('0xa')](function(_0x4e664a){logger[_0x7ce4('0xb')](_0x7ce4('0xc'),_0x4d699a,'request\x20sent');logger[_0x7ce4('0xd')](_0x7ce4('0xe'),_0x4d699a,_0x7ce4('0xf'),JSON['stringify'](_0x4e664a));if(_0x4e664a[_0x7ce4('0x10')]){if(_0x4e664a['error'][_0x7ce4('0x11')]===0x1f4){logger[_0x7ce4('0x10')](_0x7ce4('0xc'),_0x4d699a,_0x4e664a[_0x7ce4('0x10')][_0x7ce4('0x12')]);return _0x58013b(_0x4e664a[_0x7ce4('0x10')][_0x7ce4('0x12')]);}logger[_0x7ce4('0x10')](_0x7ce4('0xc'),_0x4d699a,_0x4e664a[_0x7ce4('0x10')]['message']);return _0x485fe4(_0x4e664a[_0x7ce4('0x10')][_0x7ce4('0x12')]);}else{logger['info'](_0x7ce4('0xc'),_0x4d699a,_0x7ce4('0xf'));_0x485fe4(_0x4e664a[_0x7ce4('0x13')][_0x7ce4('0x12')]);}})[_0x7ce4('0x14')](function(_0xc97d97){logger[_0x7ce4('0x10')](_0x7ce4('0xc'),_0x4d699a,_0xc97d97);_0x58013b(_0xc97d97);});});}exports[_0x7ce4('0x15')]=function(_0x2a64a3){var _0x482c23=this;return new Promise(function(_0xbcc55b,_0x505134){return db[_0x7ce4('0x16')][_0x7ce4('0x17')]({'raw':_0x2a64a3['options']?_0x2a64a3[_0x7ce4('0x18')][_0x7ce4('0x19')]===undefined?!![]:![]:!![],'where':_0x2a64a3['options']?_0x2a64a3[_0x7ce4('0x18')][_0x7ce4('0x1a')]||null:null,'attributes':_0x2a64a3[_0x7ce4('0x18')]?_0x2a64a3[_0x7ce4('0x18')][_0x7ce4('0x1b')]||null:null,'limit':_0x2a64a3['options']?_0x2a64a3[_0x7ce4('0x18')][_0x7ce4('0x1c')]||null:null,'include':_0x2a64a3['options']?_0x2a64a3[_0x7ce4('0x18')][_0x7ce4('0x1d')]?_['map'](_0x2a64a3[_0x7ce4('0x18')][_0x7ce4('0x1d')],function(_0xb5e654){return{'model':db[_0xb5e654['model']],'as':_0xb5e654['as'],'attributes':_0xb5e654[_0x7ce4('0x1b')],'include':_0xb5e654[_0x7ce4('0x1d')]?_[_0x7ce4('0x1e')](_0xb5e654['include'],function(_0x15570a){return{'model':db[_0x15570a[_0x7ce4('0x1f')]],'as':_0x15570a['as'],'attributes':_0x15570a['attributes'],'include':_0x15570a[_0x7ce4('0x1d')]?_['map'](_0x15570a['include'],function(_0x587a2b){return{'model':db[_0x587a2b[_0x7ce4('0x1f')]],'as':_0x587a2b['as'],'attributes':_0x587a2b[_0x7ce4('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2dd2de){logger['info'](_0x7ce4('0x15'),_0x2a64a3);logger[_0x7ce4('0xd')](_0x7ce4('0x15'),_0x2a64a3,JSON[_0x7ce4('0x20')](_0x2dd2de));_0xbcc55b(_0x2dd2de);})['catch'](function(_0x376177){logger[_0x7ce4('0x10')](_0x7ce4('0x15'),_0x376177[_0x7ce4('0x12')],_0x2a64a3);_0x505134(_0x482c23[_0x7ce4('0x10')](0x1f4,_0x376177[_0x7ce4('0x12')]));});});};exports[_0x7ce4('0x21')]=function(_0x2cb8bf){var _0x222f11=this;return new Promise(function(_0x2db32c,_0x3f313e){return db[_0x7ce4('0x16')][_0x7ce4('0x22')]({'raw':_0x2cb8bf[_0x7ce4('0x18')]?_0x2cb8bf[_0x7ce4('0x18')][_0x7ce4('0x19')]===undefined?!![]:![]:!![],'where':_0x2cb8bf[_0x7ce4('0x18')]?_0x2cb8bf['options'][_0x7ce4('0x1a')]||null:null,'attributes':_0x2cb8bf['options']?_0x2cb8bf[_0x7ce4('0x18')][_0x7ce4('0x1b')]||null:null,'include':_0x2cb8bf[_0x7ce4('0x18')]?_0x2cb8bf['options'][_0x7ce4('0x1d')]?_[_0x7ce4('0x1e')](_0x2cb8bf[_0x7ce4('0x18')]['include'],function(_0x8aedb3){return{'model':db[_0x8aedb3['model']],'as':_0x8aedb3['as'],'attributes':_0x8aedb3[_0x7ce4('0x1b')],'include':_0x8aedb3['include']?_['map'](_0x8aedb3[_0x7ce4('0x1d')],function(_0x1b0f01){return{'model':db[_0x1b0f01[_0x7ce4('0x1f')]],'as':_0x1b0f01['as'],'attributes':_0x1b0f01['attributes'],'include':_0x1b0f01[_0x7ce4('0x1d')]?_[_0x7ce4('0x1e')](_0x1b0f01['include'],function(_0x551e93){return{'model':db[_0x551e93['model']],'as':_0x551e93['as'],'attributes':_0x551e93[_0x7ce4('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1c02a1){logger[_0x7ce4('0xb')]('ShowSalesforceAccount',_0x2cb8bf);logger['debug']('ShowSalesforceAccount',_0x2cb8bf,JSON[_0x7ce4('0x20')](_0x1c02a1));_0x2db32c(_0x1c02a1);})[_0x7ce4('0x14')](function(_0x421ec9){logger['error'](_0x7ce4('0x21'),_0x421ec9['message'],_0x2cb8bf);_0x3f313e(_0x222f11['error'](0x1f4,_0x421ec9[_0x7ce4('0x12')]));});});};
\ No newline at end of file
+var _0x801e=['GetSalesforceAccount','findAll','options','raw','where','include','model','attributes','map','then','debug','catch','ShowSalesforceAccount','find','message','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','http','request','info','request\x20sent','SalesforceAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','SalesforceAccount,\x20%s,\x20%s','result'];(function(_0x25111,_0x5e5a11){var _0x8db6e2=function(_0x43f953){while(--_0x43f953){_0x25111['push'](_0x25111['shift']());}};_0x8db6e2(++_0x5e5a11);}(_0x801e,0x141));var _0xe801=function(_0x4bdf9e,_0x6bdf0f){_0x4bdf9e=_0x4bdf9e-0x0;var _0x56063d=_0x801e[_0x4bdf9e];return _0x56063d;};'use strict';var _=require(_0xe801('0x0'));var util=require(_0xe801('0x1'));var moment=require(_0xe801('0x2'));var BPromise=require('bluebird');var rs=require(_0xe801('0x3'));var fs=require('fs');var Redis=require(_0xe801('0x4'));var db=require(_0xe801('0x5'))['db'];var utils=require(_0xe801('0x6'));var logger=require(_0xe801('0x7'))('rpc');var config=require(_0xe801('0x8'));var jayson=require('jayson/promise');var client=jayson['client'][_0xe801('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x10fa13,_0x2ccf91,_0x346d6e){return new BPromise(function(_0x1b227b,_0x51c308){return client[_0xe801('0xa')](_0x10fa13,_0x346d6e)['then'](function(_0x5c8843){logger[_0xe801('0xb')]('SalesforceAccount,\x20%s,\x20%s',_0x2ccf91,_0xe801('0xc'));logger['debug'](_0xe801('0xd'),_0x2ccf91,_0xe801('0xc'),JSON[_0xe801('0xe')](_0x5c8843));if(_0x5c8843['error']){if(_0x5c8843[_0xe801('0xf')][_0xe801('0x10')]===0x1f4){logger[_0xe801('0xf')](_0xe801('0x11'),_0x2ccf91,_0x5c8843['error']['message']);return _0x51c308(_0x5c8843[_0xe801('0xf')]['message']);}logger[_0xe801('0xf')](_0xe801('0x11'),_0x2ccf91,_0x5c8843[_0xe801('0xf')]['message']);return _0x1b227b(_0x5c8843[_0xe801('0xf')]['message']);}else{logger[_0xe801('0xb')]('SalesforceAccount,\x20%s,\x20%s',_0x2ccf91,_0xe801('0xc'));_0x1b227b(_0x5c8843[_0xe801('0x12')]['message']);}})['catch'](function(_0x28b0c3){logger[_0xe801('0xf')](_0xe801('0x11'),_0x2ccf91,_0x28b0c3);_0x51c308(_0x28b0c3);});});}exports[_0xe801('0x13')]=function(_0x2e0289){var _0x5ad592=this;return new Promise(function(_0x40184d,_0x3427eb){return db['SalesforceAccount'][_0xe801('0x14')]({'raw':_0x2e0289[_0xe801('0x15')]?_0x2e0289[_0xe801('0x15')][_0xe801('0x16')]===undefined?!![]:![]:!![],'where':_0x2e0289[_0xe801('0x15')]?_0x2e0289[_0xe801('0x15')][_0xe801('0x17')]||null:null,'attributes':_0x2e0289[_0xe801('0x15')]?_0x2e0289[_0xe801('0x15')]['attributes']||null:null,'limit':_0x2e0289[_0xe801('0x15')]?_0x2e0289['options']['limit']||null:null,'include':_0x2e0289[_0xe801('0x15')]?_0x2e0289['options'][_0xe801('0x18')]?_['map'](_0x2e0289['options'][_0xe801('0x18')],function(_0x197659){return{'model':db[_0x197659[_0xe801('0x19')]],'as':_0x197659['as'],'attributes':_0x197659[_0xe801('0x1a')],'include':_0x197659[_0xe801('0x18')]?_['map'](_0x197659[_0xe801('0x18')],function(_0x4e7feb){return{'model':db[_0x4e7feb[_0xe801('0x19')]],'as':_0x4e7feb['as'],'attributes':_0x4e7feb[_0xe801('0x1a')],'include':_0x4e7feb['include']?_[_0xe801('0x1b')](_0x4e7feb[_0xe801('0x18')],function(_0x3b012f){return{'model':db[_0x3b012f[_0xe801('0x19')]],'as':_0x3b012f['as'],'attributes':_0x3b012f[_0xe801('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xe801('0x1c')](function(_0xbea984){logger[_0xe801('0xb')](_0xe801('0x13'),_0x2e0289);logger[_0xe801('0x1d')](_0xe801('0x13'),_0x2e0289,JSON[_0xe801('0xe')](_0xbea984));_0x40184d(_0xbea984);})[_0xe801('0x1e')](function(_0x46c071){logger[_0xe801('0xf')]('GetSalesforceAccount',_0x46c071['message'],_0x2e0289);_0x3427eb(_0x5ad592[_0xe801('0xf')](0x1f4,_0x46c071['message']));});});};exports[_0xe801('0x1f')]=function(_0xbda413){var _0x2384bd=this;return new Promise(function(_0x4c8ebf,_0xef5017){return db['SalesforceAccount'][_0xe801('0x20')]({'raw':_0xbda413['options']?_0xbda413[_0xe801('0x15')]['raw']===undefined?!![]:![]:!![],'where':_0xbda413[_0xe801('0x15')]?_0xbda413['options'][_0xe801('0x17')]||null:null,'attributes':_0xbda413['options']?_0xbda413[_0xe801('0x15')][_0xe801('0x1a')]||null:null,'include':_0xbda413[_0xe801('0x15')]?_0xbda413['options'][_0xe801('0x18')]?_['map'](_0xbda413[_0xe801('0x15')][_0xe801('0x18')],function(_0x3228c6){return{'model':db[_0x3228c6[_0xe801('0x19')]],'as':_0x3228c6['as'],'attributes':_0x3228c6[_0xe801('0x1a')],'include':_0x3228c6[_0xe801('0x18')]?_[_0xe801('0x1b')](_0x3228c6[_0xe801('0x18')],function(_0x393b1c){return{'model':db[_0x393b1c[_0xe801('0x19')]],'as':_0x393b1c['as'],'attributes':_0x393b1c[_0xe801('0x1a')],'include':_0x393b1c['include']?_[_0xe801('0x1b')](_0x393b1c[_0xe801('0x18')],function(_0x1e57ba){return{'model':db[_0x1e57ba[_0xe801('0x19')]],'as':_0x1e57ba['as'],'attributes':_0x1e57ba[_0xe801('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xe801('0x1c')](function(_0x3507f9){logger['info']('ShowSalesforceAccount',_0xbda413);logger[_0xe801('0x1d')](_0xe801('0x1f'),_0xbda413,JSON[_0xe801('0xe')](_0x3507f9));_0x4c8ebf(_0x3507f9);})[_0xe801('0x1e')](function(_0x328453){logger[_0xe801('0xf')]('ShowSalesforceAccount',_0x328453['message'],_0xbda413);_0xef5017(_0x2384bd[_0xe801('0xf')](0x1f4,_0x328453[_0xe801('0x21')]));});});};
\ No newline at end of file
index 109861d..585eaca 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdb28=['path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/:id','show','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions','post','create','put','delete','destroy','exports','multer','util'];(function(_0x1d24eb,_0x12295b){var _0x1dc576=function(_0x4d5770){while(--_0x4d5770){_0x1d24eb['push'](_0x1d24eb['shift']());}};_0x1dc576(++_0x12295b);}(_0xdb28,0x106));var _0x8db2=function(_0x162c81,_0x139a43){_0x162c81=_0x162c81-0x0;var _0x21cf42=_0xdb28[_0x162c81];return _0x21cf42;};'use strict';var multer=require(_0x8db2('0x0'));var util=require(_0x8db2('0x1'));var path=require(_0x8db2('0x2'));var timeout=require(_0x8db2('0x3'));var express=require('express');var router=express[_0x8db2('0x4')]();var fs_extra=require(_0x8db2('0x5'));var auth=require(_0x8db2('0x6'));var interaction=require(_0x8db2('0x7'));var config=require(_0x8db2('0x8'));var controller=require('./intSalesforceConfiguration.controller');router[_0x8db2('0x9')]('/',auth[_0x8db2('0xa')](),controller['index']);router['get'](_0x8db2('0xb'),auth[_0x8db2('0xa')](),controller[_0x8db2('0xc')]);router[_0x8db2('0x9')](_0x8db2('0xd'),auth[_0x8db2('0xa')](),controller[_0x8db2('0xe')]);router['get'](_0x8db2('0xf'),auth[_0x8db2('0xa')](),controller[_0x8db2('0x10')]);router['get'](_0x8db2('0x11'),auth[_0x8db2('0xa')](),controller['getDescriptions']);router[_0x8db2('0x12')]('/',auth[_0x8db2('0xa')](),controller[_0x8db2('0x13')]);router[_0x8db2('0x14')](_0x8db2('0xb'),auth['isAuthenticated'](),controller['update']);router[_0x8db2('0x15')](_0x8db2('0xb'),auth[_0x8db2('0xa')](),controller[_0x8db2('0x16')]);module[_0x8db2('0x17')]=router;
\ No newline at end of file
+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(_0x4d21ab,_0x20babd){var _0xf83890=function(_0x445097){while(--_0x445097){_0x4d21ab['push'](_0x4d21ab['shift']());}};_0xf83890(++_0x20babd);}(_0xadb5,0xad));var _0x5adb=function(_0x97d0dc,_0x284cba){_0x97d0dc=_0x97d0dc-0x0;var _0x57fb01=_0xadb5[_0x97d0dc];return _0x57fb01;};'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
index a447abf..14aa187 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x52e3=['STRING','ENUM','Task','Case','contact','lead','account','sequelize','exports'];(function(_0x99b4e1,_0x30611b){var _0x24e4e4=function(_0xcf5f67){while(--_0xcf5f67){_0x99b4e1['push'](_0x99b4e1['shift']());}};_0x24e4e4(++_0x30611b);}(_0x52e3,0x1ae));var _0x352e=function(_0x4ddf7d,_0x3fcab2){_0x4ddf7d=_0x4ddf7d-0x0;var _0x3cd6d5=_0x52e3[_0x4ddf7d];return _0x3cd6d5;};'use strict';var Sequelize=require(_0x352e('0x0'));module[_0x352e('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x352e('0x2')]},'ticketType':{'type':Sequelize[_0x352e('0x3')](_0x352e('0x4'),_0x352e('0x5')),'defaultValue':_0x352e('0x4')},'moduleSearch':{'type':Sequelize[_0x352e('0x3')]('contact_lead',_0x352e('0x6'),_0x352e('0x7'),'account_contact_lead',_0x352e('0x8')),'defaultValue':'contact_lead'},'moduleCreate':{'type':Sequelize[_0x352e('0x3')]('nothing',_0x352e('0x6'),_0x352e('0x7'),'account'),'defaultValue':_0x352e('0x7')},'leadId':{'type':Sequelize[_0x352e('0x2')]},'additionalSearchAccount':{'type':Sequelize[_0x352e('0x2')]},'additionalSearchContact':{'type':Sequelize[_0x352e('0x2')]},'additionalSearchLead':{'type':Sequelize[_0x352e('0x2')]}};
\ No newline at end of file
+var _0x7dec=['contact_lead','nothing','contact','account','exports','STRING','ENUM','Task','lead','account_contact_lead'];(function(_0x1b653d,_0x5cce6e){var _0x5429e7=function(_0x412a6a){while(--_0x412a6a){_0x1b653d['push'](_0x1b653d['shift']());}};_0x5429e7(++_0x5cce6e);}(_0x7dec,0xfe));var _0xc7de=function(_0x4fbb15,_0x21be0c){_0x4fbb15=_0x4fbb15-0x0;var _0x436338=_0x7dec[_0x4fbb15];return _0x436338;};'use strict';var Sequelize=require('sequelize');module[_0xc7de('0x0')]={'name':{'type':Sequelize[_0xc7de('0x1')]},'description':{'type':Sequelize[_0xc7de('0x1')]},'ticketType':{'type':Sequelize[_0xc7de('0x2')]('Task','Case'),'defaultValue':_0xc7de('0x3')},'moduleSearch':{'type':Sequelize[_0xc7de('0x2')]('contact_lead','contact',_0xc7de('0x4'),_0xc7de('0x5'),'account'),'defaultValue':_0xc7de('0x6')},'moduleCreate':{'type':Sequelize[_0xc7de('0x2')](_0xc7de('0x7'),_0xc7de('0x8'),'lead',_0xc7de('0x9')),'defaultValue':_0xc7de('0x4')},'leadId':{'type':Sequelize[_0xc7de('0x1')]},'additionalSearchAccount':{'type':Sequelize[_0xc7de('0x1')]},'additionalSearchContact':{'type':Sequelize[_0xc7de('0x1')]},'additionalSearchLead':{'type':Sequelize[_0xc7de('0x1')]}};
\ No newline at end of file
index bc7279d..dc6b5b4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xabe7=['index','map','SalesforceConfiguration','rawAttributes','fieldName','type','keys','filters','intersection','model','query','attributes','fields','hasOwnProperty','order','sort','where','pick','filter','merge','includeAll','include','findAll','rows','catch','show','options','find','create','body','params','findOne','SalesforceField','length','nolimit','getFields','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/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','json','offset','undefined','count','limit','status','set','apply','reject','update','then','destroy','end','sendStatus','error','stack','name'];(function(_0x2fbe40,_0xde4bdb){var _0x5b25f7=function(_0x3c8856){while(--_0x3c8856){_0x2fbe40['push'](_0x2fbe40['shift']());}};_0x5b25f7(++_0xde4bdb);}(_0xabe7,0xce));var _0x7abe=function(_0x7d281c,_0x433751){_0x7d281c=_0x7d281c-0x0;var _0x1b5730=_0xabe7[_0x7d281c];return _0x1b5730;};'use strict';var emlformat=require(_0x7abe('0x0'));var rimraf=require(_0x7abe('0x1'));var zipdir=require(_0x7abe('0x2'));var jsonpatch=require(_0x7abe('0x3'));var rp=require(_0x7abe('0x4'));var moment=require(_0x7abe('0x5'));var BPromise=require(_0x7abe('0x6'));var Mustache=require(_0x7abe('0x7'));var util=require(_0x7abe('0x8'));var path=require(_0x7abe('0x9'));var sox=require(_0x7abe('0xa'));var csv=require(_0x7abe('0xb'));var ejs=require(_0x7abe('0xc'));var fs=require('fs');var fs_extra=require(_0x7abe('0xd'));var _=require(_0x7abe('0xe'));var squel=require(_0x7abe('0xf'));var crypto=require(_0x7abe('0x10'));var jsforce=require('jsforce');var deskjs=require(_0x7abe('0x11'));var toCsv=require(_0x7abe('0xb'));var querystring=require(_0x7abe('0x12'));var Papa=require(_0x7abe('0x13'));var Redis=require(_0x7abe('0x14'));var authService=require(_0x7abe('0x15'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x7abe('0x16'));var logger=require(_0x7abe('0x17'))(_0x7abe('0x18'));var utils=require(_0x7abe('0x19'));var config=require(_0x7abe('0x1a'));var licenseUtil=require(_0x7abe('0x1b'));var db=require(_0x7abe('0x1c'))['db'];function respondWithStatusCode(_0x8f19e1,_0x1ccf61){_0x1ccf61=_0x1ccf61||0xcc;return function(_0xe0cc43){if(_0xe0cc43){return _0x8f19e1['sendStatus'](_0x1ccf61);}return _0x8f19e1['status'](_0x1ccf61)['end']();};}function respondWithResult(_0x346016,_0x4d17d5){_0x4d17d5=_0x4d17d5||0xc8;return function(_0x3e6063){if(_0x3e6063){return _0x346016['status'](_0x4d17d5)[_0x7abe('0x1d')](_0x3e6063);}};}function respondWithFilteredResult(_0x5a8a4e,_0x346e13){return function(_0x355444){if(_0x355444){var _0x518766=typeof _0x346e13[_0x7abe('0x1e')]===_0x7abe('0x1f')&&typeof _0x346e13['limit']===_0x7abe('0x1f');var _0xff055a=_0x355444['count'];var _0x1f02fc=_0x518766?0x0:_0x346e13[_0x7abe('0x1e')];var _0x104f22=_0x518766?_0x355444[_0x7abe('0x20')]:_0x346e13[_0x7abe('0x1e')]+_0x346e13[_0x7abe('0x21')];var _0x3d76f5;if(_0x104f22>=_0xff055a){_0x104f22=_0xff055a;_0x3d76f5=0xc8;}else{_0x3d76f5=0xce;}_0x5a8a4e[_0x7abe('0x22')](_0x3d76f5);return _0x5a8a4e[_0x7abe('0x23')]('Content-Range',_0x1f02fc+'-'+_0x104f22+'/'+_0xff055a)[_0x7abe('0x1d')](_0x355444);}return null;};}function patchUpdates(_0xc42dc0){return function(_0x5b2d3d){try{jsonpatch[_0x7abe('0x24')](_0x5b2d3d,_0xc42dc0,!![]);}catch(_0x1f41a9){return BPromise[_0x7abe('0x25')](_0x1f41a9);}return _0x5b2d3d['save']();};}function saveUpdates(_0x510db0,_0x3519ab){return function(_0x5c6466){if(_0x5c6466){return _0x5c6466[_0x7abe('0x26')](_0x510db0)[_0x7abe('0x27')](function(_0x4c4729){return _0x4c4729;});}return null;};}function removeEntity(_0x15fbf0,_0x1d6b7a){return function(_0x437d0b){if(_0x437d0b){return _0x437d0b[_0x7abe('0x28')]()[_0x7abe('0x27')](function(){_0x15fbf0['status'](0xcc)[_0x7abe('0x29')]();});}};}function handleEntityNotFound(_0x3617e5,_0x5eafb3){return function(_0x976fbc){if(!_0x976fbc){_0x3617e5[_0x7abe('0x2a')](0x194);}return _0x976fbc;};}function handleError(_0x382d49,_0x238016){_0x238016=_0x238016||0x1f4;return function(_0x4f4b77){logger[_0x7abe('0x2b')](_0x4f4b77[_0x7abe('0x2c')]);if(_0x4f4b77[_0x7abe('0x2d')]){delete _0x4f4b77['name'];}_0x382d49[_0x7abe('0x22')](_0x238016)['send'](_0x4f4b77);};}exports[_0x7abe('0x2e')]=function(_0xf438f6,_0x3f90c3){var _0x59a45f={},_0x552162={},_0x575962={'count':0x0,'rows':[]};var _0x946a2e=_[_0x7abe('0x2f')](db[_0x7abe('0x30')][_0x7abe('0x31')],function(_0x34c3d3){return{'name':_0x34c3d3[_0x7abe('0x32')],'type':_0x34c3d3[_0x7abe('0x33')]['key']};});_0x552162['model']=_['map'](_0x946a2e,'name');_0x552162['query']=_[_0x7abe('0x34')](_0xf438f6['query']);_0x552162[_0x7abe('0x35')]=_[_0x7abe('0x36')](_0x552162[_0x7abe('0x37')],_0x552162[_0x7abe('0x38')]);_0x59a45f[_0x7abe('0x39')]=_[_0x7abe('0x36')](_0x552162[_0x7abe('0x37')],qs['fields'](_0xf438f6[_0x7abe('0x38')][_0x7abe('0x3a')]));_0x59a45f[_0x7abe('0x39')]=_0x59a45f[_0x7abe('0x39')]['length']?_0x59a45f['attributes']:_0x552162[_0x7abe('0x37')];if(!_0xf438f6[_0x7abe('0x38')][_0x7abe('0x3b')]('nolimit')){_0x59a45f[_0x7abe('0x21')]=qs['limit'](_0xf438f6[_0x7abe('0x38')][_0x7abe('0x21')]);_0x59a45f[_0x7abe('0x1e')]=qs[_0x7abe('0x1e')](_0xf438f6[_0x7abe('0x38')][_0x7abe('0x1e')]);}_0x59a45f[_0x7abe('0x3c')]=qs['sort'](_0xf438f6[_0x7abe('0x38')][_0x7abe('0x3d')]);_0x59a45f[_0x7abe('0x3e')]=qs[_0x7abe('0x35')](_[_0x7abe('0x3f')](_0xf438f6[_0x7abe('0x38')],_0x552162[_0x7abe('0x35')]),_0x946a2e);if(_0xf438f6[_0x7abe('0x38')][_0x7abe('0x40')]){_0x59a45f[_0x7abe('0x3e')]=_[_0x7abe('0x41')](_0x59a45f[_0x7abe('0x3e')],{'$or':_[_0x7abe('0x2f')](_0x946a2e,function(_0x37f9c3){if(_0x37f9c3[_0x7abe('0x33')]!=='VIRTUAL'){var _0x67a24a={};_0x67a24a[_0x37f9c3[_0x7abe('0x2d')]]={'$like':'%'+_0xf438f6[_0x7abe('0x38')]['filter']+'%'};return _0x67a24a;}})});}_0x59a45f=_[_0x7abe('0x41')]({},_0x59a45f,_0xf438f6['options']);var _0x3f5a04={'where':_0x59a45f[_0x7abe('0x3e')]};return db[_0x7abe('0x30')]['count'](_0x3f5a04)[_0x7abe('0x27')](function(_0x339543){_0x575962[_0x7abe('0x20')]=_0x339543;if(_0xf438f6[_0x7abe('0x38')][_0x7abe('0x42')]){_0x59a45f[_0x7abe('0x43')]=[{'all':!![]}];}return db[_0x7abe('0x30')][_0x7abe('0x44')](_0x59a45f);})[_0x7abe('0x27')](function(_0x54677e){_0x575962[_0x7abe('0x45')]=_0x54677e;return _0x575962;})[_0x7abe('0x27')](respondWithFilteredResult(_0x3f90c3,_0x59a45f))[_0x7abe('0x46')](handleError(_0x3f90c3,null));};exports[_0x7abe('0x47')]=function(_0x4cbc67,_0x176eb4){var _0x3cdf82={'raw':![],'where':{'id':_0x4cbc67['params']['id']}},_0x814fcf={};_0x814fcf[_0x7abe('0x37')]=_['keys'](db[_0x7abe('0x30')][_0x7abe('0x31')]);_0x814fcf[_0x7abe('0x38')]=_[_0x7abe('0x34')](_0x4cbc67[_0x7abe('0x38')]);_0x814fcf['filters']=_[_0x7abe('0x36')](_0x814fcf[_0x7abe('0x37')],_0x814fcf['query']);_0x3cdf82[_0x7abe('0x39')]=_['intersection'](_0x814fcf[_0x7abe('0x37')],qs[_0x7abe('0x3a')](_0x4cbc67[_0x7abe('0x38')][_0x7abe('0x3a')]));_0x3cdf82[_0x7abe('0x39')]=_0x3cdf82[_0x7abe('0x39')]['length']?_0x3cdf82[_0x7abe('0x39')]:_0x814fcf[_0x7abe('0x37')];if(_0x4cbc67[_0x7abe('0x38')][_0x7abe('0x42')]){_0x3cdf82[_0x7abe('0x43')]=[{'all':!![]}];}_0x3cdf82=_[_0x7abe('0x41')]({},_0x3cdf82,_0x4cbc67[_0x7abe('0x48')]);return db[_0x7abe('0x30')][_0x7abe('0x49')](_0x3cdf82)[_0x7abe('0x27')](handleEntityNotFound(_0x176eb4,null))[_0x7abe('0x27')](respondWithResult(_0x176eb4,null))[_0x7abe('0x46')](handleError(_0x176eb4,null));};exports[_0x7abe('0x4a')]=function(_0x82c244,_0x46dd74){return db[_0x7abe('0x30')][_0x7abe('0x4a')](_0x82c244[_0x7abe('0x4b')],{})[_0x7abe('0x27')](respondWithResult(_0x46dd74,0xc9))[_0x7abe('0x46')](handleError(_0x46dd74,null));};exports[_0x7abe('0x26')]=function(_0x1c1b1c,_0x10260d){if(_0x1c1b1c['body']['id']){delete _0x1c1b1c[_0x7abe('0x4b')]['id'];}return db[_0x7abe('0x30')][_0x7abe('0x49')]({'where':{'id':_0x1c1b1c[_0x7abe('0x4c')]['id']}})[_0x7abe('0x27')](handleEntityNotFound(_0x10260d,null))[_0x7abe('0x27')](saveUpdates(_0x1c1b1c[_0x7abe('0x4b')],null))[_0x7abe('0x27')](respondWithResult(_0x10260d,null))[_0x7abe('0x46')](handleError(_0x10260d,null));};exports[_0x7abe('0x28')]=function(_0x1494c7,_0x378e3b){return db['SalesforceConfiguration']['find']({'where':{'id':_0x1494c7[_0x7abe('0x4c')]['id']}})[_0x7abe('0x27')](handleEntityNotFound(_0x378e3b,null))['then'](removeEntity(_0x378e3b,null))[_0x7abe('0x46')](handleError(_0x378e3b,null));};exports['getFields']=function(_0x500129,_0x7ec978,_0xa6c27b){var _0x2a9da1={};var _0x423d8e={};var _0x349907;var _0x4a8dee;return db[_0x7abe('0x30')][_0x7abe('0x4d')]({'where':{'id':_0x500129[_0x7abe('0x4c')]['id']}})[_0x7abe('0x27')](handleEntityNotFound(_0x7ec978,null))[_0x7abe('0x27')](function(_0x5669f2){if(_0x5669f2){_0x349907=_0x5669f2;_0x423d8e[_0x7abe('0x37')]=_[_0x7abe('0x34')](db[_0x7abe('0x4e')]['rawAttributes']);_0x423d8e['query']=_[_0x7abe('0x34')](_0x500129[_0x7abe('0x38')]);_0x423d8e[_0x7abe('0x35')]=_[_0x7abe('0x36')](_0x423d8e['model'],_0x423d8e[_0x7abe('0x38')]);_0x2a9da1['attributes']=_[_0x7abe('0x36')](_0x423d8e[_0x7abe('0x37')],qs[_0x7abe('0x3a')](_0x500129['query']['fields']));_0x2a9da1[_0x7abe('0x39')]=_0x2a9da1['attributes'][_0x7abe('0x4f')]?_0x2a9da1[_0x7abe('0x39')]:_0x423d8e[_0x7abe('0x37')];_0x2a9da1[_0x7abe('0x3c')]=qs[_0x7abe('0x3d')](_0x500129['query'][_0x7abe('0x3d')]);_0x2a9da1[_0x7abe('0x3e')]=qs[_0x7abe('0x35')](_['pick'](_0x500129[_0x7abe('0x38')],_0x423d8e[_0x7abe('0x35')]));if(_0x500129['query'][_0x7abe('0x40')]){_0x2a9da1[_0x7abe('0x3e')]=_[_0x7abe('0x41')](_0x2a9da1['where'],{'$or':_[_0x7abe('0x2f')](_0x2a9da1[_0x7abe('0x39')],function(_0x5ad2b7){var _0x17b5eb={};_0x17b5eb[_0x5ad2b7]={'$like':'%'+_0x500129['query'][_0x7abe('0x40')]+'%'};return _0x17b5eb;})});}_0x2a9da1=_['merge']({},_0x2a9da1,_0x500129[_0x7abe('0x48')]);return _0x349907['getFields'](_0x2a9da1);}})[_0x7abe('0x27')](function(_0x222654){if(_0x222654){_0x4a8dee=_0x222654['length'];if(!_0x500129[_0x7abe('0x38')]['hasOwnProperty'](_0x7abe('0x50'))){_0x2a9da1['limit']=qs[_0x7abe('0x21')](_0x500129[_0x7abe('0x38')][_0x7abe('0x21')]);_0x2a9da1[_0x7abe('0x1e')]=qs[_0x7abe('0x1e')](_0x500129['query'][_0x7abe('0x1e')]);}return _0x349907[_0x7abe('0x51')](_0x2a9da1);}})[_0x7abe('0x27')](function(_0x56c2b5){if(_0x56c2b5){return _0x56c2b5?{'count':_0x4a8dee,'rows':_0x56c2b5}:null;}})[_0x7abe('0x27')](respondWithResult(_0x7ec978,null))[_0x7abe('0x46')](handleError(_0x7ec978,null));};exports[_0x7abe('0x52')]=function(_0x3519ec,_0x19d9bd,_0x4eaad6){var _0x7cd349={};var _0x4803d1={};var _0x2613d0;var _0x15891a;return db[_0x7abe('0x30')][_0x7abe('0x4d')]({'where':{'id':_0x3519ec[_0x7abe('0x4c')]['id']}})[_0x7abe('0x27')](handleEntityNotFound(_0x19d9bd,null))[_0x7abe('0x27')](function(_0x1ecf7d){if(_0x1ecf7d){_0x2613d0=_0x1ecf7d;_0x4803d1[_0x7abe('0x37')]=_[_0x7abe('0x34')](db[_0x7abe('0x4e')][_0x7abe('0x31')]);_0x4803d1[_0x7abe('0x38')]=_['keys'](_0x3519ec[_0x7abe('0x38')]);_0x4803d1['filters']=_[_0x7abe('0x36')](_0x4803d1[_0x7abe('0x37')],_0x4803d1[_0x7abe('0x38')]);_0x7cd349[_0x7abe('0x39')]=_[_0x7abe('0x36')](_0x4803d1[_0x7abe('0x37')],qs[_0x7abe('0x3a')](_0x3519ec['query'][_0x7abe('0x3a')]));_0x7cd349[_0x7abe('0x39')]=_0x7cd349[_0x7abe('0x39')][_0x7abe('0x4f')]?_0x7cd349[_0x7abe('0x39')]:_0x4803d1[_0x7abe('0x37')];_0x7cd349[_0x7abe('0x3c')]=qs[_0x7abe('0x3d')](_0x3519ec[_0x7abe('0x38')][_0x7abe('0x3d')]);_0x7cd349[_0x7abe('0x3e')]=qs[_0x7abe('0x35')](_[_0x7abe('0x3f')](_0x3519ec[_0x7abe('0x38')],_0x4803d1[_0x7abe('0x35')]));if(_0x3519ec[_0x7abe('0x38')][_0x7abe('0x40')]){_0x7cd349['where']=_[_0x7abe('0x41')](_0x7cd349[_0x7abe('0x3e')],{'$or':_[_0x7abe('0x2f')](_0x7cd349[_0x7abe('0x39')],function(_0x390960){var _0x29efcd={};_0x29efcd[_0x390960]={'$like':'%'+_0x3519ec[_0x7abe('0x38')][_0x7abe('0x40')]+'%'};return _0x29efcd;})});}_0x7cd349=_[_0x7abe('0x41')]({},_0x7cd349,_0x3519ec[_0x7abe('0x48')]);return _0x2613d0['getSubjects'](_0x7cd349);}})[_0x7abe('0x27')](function(_0x54a49b){if(_0x54a49b){_0x15891a=_0x54a49b[_0x7abe('0x4f')];if(!_0x3519ec['query'][_0x7abe('0x3b')](_0x7abe('0x50'))){_0x7cd349[_0x7abe('0x21')]=qs[_0x7abe('0x21')](_0x3519ec[_0x7abe('0x38')][_0x7abe('0x21')]);_0x7cd349[_0x7abe('0x1e')]=qs[_0x7abe('0x1e')](_0x3519ec['query'][_0x7abe('0x1e')]);}return _0x2613d0['getSubjects'](_0x7cd349);}})[_0x7abe('0x27')](function(_0x2b0dce){if(_0x2b0dce){return _0x2b0dce?{'count':_0x15891a,'rows':_0x2b0dce}:null;}})[_0x7abe('0x27')](respondWithResult(_0x19d9bd,null))[_0x7abe('0x46')](handleError(_0x19d9bd,null));};exports[_0x7abe('0x53')]=function(_0x223a81,_0x2e6aec,_0x2af3bd){var _0x36eed1={};var _0x4ad1e1={};var _0x394092;var _0x29a7ef;return db['SalesforceConfiguration'][_0x7abe('0x4d')]({'where':{'id':_0x223a81[_0x7abe('0x4c')]['id']}})['then'](handleEntityNotFound(_0x2e6aec,null))['then'](function(_0x24cddf){if(_0x24cddf){_0x394092=_0x24cddf;_0x4ad1e1[_0x7abe('0x37')]=_[_0x7abe('0x34')](db[_0x7abe('0x4e')][_0x7abe('0x31')]);_0x4ad1e1[_0x7abe('0x38')]=_[_0x7abe('0x34')](_0x223a81[_0x7abe('0x38')]);_0x4ad1e1[_0x7abe('0x35')]=_['intersection'](_0x4ad1e1[_0x7abe('0x37')],_0x4ad1e1['query']);_0x36eed1[_0x7abe('0x39')]=_[_0x7abe('0x36')](_0x4ad1e1[_0x7abe('0x37')],qs[_0x7abe('0x3a')](_0x223a81[_0x7abe('0x38')][_0x7abe('0x3a')]));_0x36eed1[_0x7abe('0x39')]=_0x36eed1[_0x7abe('0x39')][_0x7abe('0x4f')]?_0x36eed1['attributes']:_0x4ad1e1[_0x7abe('0x37')];_0x36eed1[_0x7abe('0x3c')]=qs[_0x7abe('0x3d')](_0x223a81['query']['sort']);_0x36eed1['where']=qs['filters'](_[_0x7abe('0x3f')](_0x223a81['query'],_0x4ad1e1[_0x7abe('0x35')]));if(_0x223a81[_0x7abe('0x38')][_0x7abe('0x40')]){_0x36eed1[_0x7abe('0x3e')]=_['merge'](_0x36eed1[_0x7abe('0x3e')],{'$or':_[_0x7abe('0x2f')](_0x36eed1[_0x7abe('0x39')],function(_0x4413aa){var _0x23b5f6={};_0x23b5f6[_0x4413aa]={'$like':'%'+_0x223a81[_0x7abe('0x38')]['filter']+'%'};return _0x23b5f6;})});}_0x36eed1=_[_0x7abe('0x41')]({},_0x36eed1,_0x223a81[_0x7abe('0x48')]);return _0x394092['getDescriptions'](_0x36eed1);}})[_0x7abe('0x27')](function(_0x418ea8){if(_0x418ea8){_0x29a7ef=_0x418ea8[_0x7abe('0x4f')];if(!_0x223a81[_0x7abe('0x38')][_0x7abe('0x3b')](_0x7abe('0x50'))){_0x36eed1[_0x7abe('0x21')]=qs[_0x7abe('0x21')](_0x223a81[_0x7abe('0x38')][_0x7abe('0x21')]);_0x36eed1[_0x7abe('0x1e')]=qs[_0x7abe('0x1e')](_0x223a81[_0x7abe('0x38')][_0x7abe('0x1e')]);}return _0x394092['getDescriptions'](_0x36eed1);}})[_0x7abe('0x27')](function(_0xf8e239){if(_0xf8e239){return _0xf8e239?{'count':_0x29a7ef,'rows':_0xf8e239}:null;}})['then'](respondWithResult(_0x2e6aec,null))['catch'](handleError(_0x2e6aec,null));};
\ No newline at end of file
+var _0x46cf=['querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','undefined','limit','count','offset','Content-Range','json','apply','reject','save','update','then','error','send','map','SalesforceConfiguration','rawAttributes','fieldName','type','key','model','name','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','filter','include','findAll','rows','catch','show','params','includeAll','options','create','body','find','getFields','findOne','SalesforceField','getSubjects','getDescriptions','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','sox','to-csv','ejs','lodash','squel','crypto','desk.js'];(function(_0x1e126c,_0x3baf09){var _0x5110c4=function(_0x802d2e){while(--_0x802d2e){_0x1e126c['push'](_0x1e126c['shift']());}};_0x5110c4(++_0x3baf09);}(_0x46cf,0x17e));var _0xf46c=function(_0x58e469,_0x95ee3e){_0x58e469=_0x58e469-0x0;var _0x4c01c5=_0x46cf[_0x58e469];return _0x4c01c5;};'use strict';var emlformat=require(_0xf46c('0x0'));var rimraf=require(_0xf46c('0x1'));var zipdir=require(_0xf46c('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xf46c('0x3'));var moment=require(_0xf46c('0x4'));var BPromise=require(_0xf46c('0x5'));var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0xf46c('0x6'));var csv=require(_0xf46c('0x7'));var ejs=require(_0xf46c('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xf46c('0x9'));var squel=require(_0xf46c('0xa'));var crypto=require(_0xf46c('0xb'));var jsforce=require('jsforce');var deskjs=require(_0xf46c('0xc'));var toCsv=require(_0xf46c('0x7'));var querystring=require(_0xf46c('0xd'));var Papa=require(_0xf46c('0xe'));var Redis=require('ioredis');var authService=require(_0xf46c('0xf'));var qs=require(_0xf46c('0x10'));var as=require(_0xf46c('0x11'));var hardwareService=require(_0xf46c('0x12'));var logger=require(_0xf46c('0x13'))(_0xf46c('0x14'));var utils=require('../../config/utils');var config=require(_0xf46c('0x15'));var licenseUtil=require(_0xf46c('0x16'));var db=require(_0xf46c('0x17'))['db'];function respondWithStatusCode(_0x43a39f,_0x5e27d2){_0x5e27d2=_0x5e27d2||0xcc;return function(_0x461c18){if(_0x461c18){return _0x43a39f[_0xf46c('0x18')](_0x5e27d2);}return _0x43a39f[_0xf46c('0x19')](_0x5e27d2)[_0xf46c('0x1a')]();};}function respondWithResult(_0x1dc56d,_0x1e8db0){_0x1e8db0=_0x1e8db0||0xc8;return function(_0x9a361c){if(_0x9a361c){return _0x1dc56d[_0xf46c('0x19')](_0x1e8db0)['json'](_0x9a361c);}};}function respondWithFilteredResult(_0x270c37,_0x28065f){return function(_0x3d2796){if(_0x3d2796){var _0x47a0ad=typeof _0x28065f['offset']===_0xf46c('0x1b')&&typeof _0x28065f[_0xf46c('0x1c')]==='undefined';var _0x255b03=_0x3d2796[_0xf46c('0x1d')];var _0xe2ddc3=_0x47a0ad?0x0:_0x28065f[_0xf46c('0x1e')];var _0x370f38=_0x47a0ad?_0x3d2796['count']:_0x28065f[_0xf46c('0x1e')]+_0x28065f[_0xf46c('0x1c')];var _0xedeb76;if(_0x370f38>=_0x255b03){_0x370f38=_0x255b03;_0xedeb76=0xc8;}else{_0xedeb76=0xce;}_0x270c37['status'](_0xedeb76);return _0x270c37['set'](_0xf46c('0x1f'),_0xe2ddc3+'-'+_0x370f38+'/'+_0x255b03)[_0xf46c('0x20')](_0x3d2796);}return null;};}function patchUpdates(_0x3a6bf4){return function(_0x1419d4){try{jsonpatch[_0xf46c('0x21')](_0x1419d4,_0x3a6bf4,!![]);}catch(_0x203474){return BPromise[_0xf46c('0x22')](_0x203474);}return _0x1419d4[_0xf46c('0x23')]();};}function saveUpdates(_0x48cf3c,_0x188feb){return function(_0x20bcca){if(_0x20bcca){return _0x20bcca[_0xf46c('0x24')](_0x48cf3c)[_0xf46c('0x25')](function(_0x32625a){return _0x32625a;});}return null;};}function removeEntity(_0x33d8b8,_0x7d8cd5){return function(_0x541a71){if(_0x541a71){return _0x541a71['destroy']()['then'](function(){_0x33d8b8['status'](0xcc)[_0xf46c('0x1a')]();});}};}function handleEntityNotFound(_0x3cc42e,_0x574f61){return function(_0x5961d8){if(!_0x5961d8){_0x3cc42e['sendStatus'](0x194);}return _0x5961d8;};}function handleError(_0x15b799,_0x39b32c){_0x39b32c=_0x39b32c||0x1f4;return function(_0x32b1c1){logger[_0xf46c('0x26')](_0x32b1c1['stack']);if(_0x32b1c1['name']){delete _0x32b1c1['name'];}_0x15b799[_0xf46c('0x19')](_0x39b32c)[_0xf46c('0x27')](_0x32b1c1);};}exports['index']=function(_0x34cf2,_0x5ef577){var _0x639ee4={},_0x25be8d={},_0x2abfe3={'count':0x0,'rows':[]};var _0x1dc3db=_[_0xf46c('0x28')](db[_0xf46c('0x29')][_0xf46c('0x2a')],function(_0x523ac1){return{'name':_0x523ac1[_0xf46c('0x2b')],'type':_0x523ac1[_0xf46c('0x2c')][_0xf46c('0x2d')]};});_0x25be8d[_0xf46c('0x2e')]=_[_0xf46c('0x28')](_0x1dc3db,_0xf46c('0x2f'));_0x25be8d['query']=_[_0xf46c('0x30')](_0x34cf2[_0xf46c('0x31')]);_0x25be8d[_0xf46c('0x32')]=_[_0xf46c('0x33')](_0x25be8d['model'],_0x25be8d['query']);_0x639ee4['attributes']=_['intersection'](_0x25be8d[_0xf46c('0x2e')],qs['fields'](_0x34cf2['query'][_0xf46c('0x34')]));_0x639ee4[_0xf46c('0x35')]=_0x639ee4[_0xf46c('0x35')][_0xf46c('0x36')]?_0x639ee4[_0xf46c('0x35')]:_0x25be8d[_0xf46c('0x2e')];if(!_0x34cf2[_0xf46c('0x31')][_0xf46c('0x37')](_0xf46c('0x38'))){_0x639ee4[_0xf46c('0x1c')]=qs[_0xf46c('0x1c')](_0x34cf2[_0xf46c('0x31')]['limit']);_0x639ee4[_0xf46c('0x1e')]=qs['offset'](_0x34cf2['query'][_0xf46c('0x1e')]);}_0x639ee4[_0xf46c('0x39')]=qs['sort'](_0x34cf2['query'][_0xf46c('0x3a')]);_0x639ee4[_0xf46c('0x3b')]=qs[_0xf46c('0x32')](_[_0xf46c('0x3c')](_0x34cf2[_0xf46c('0x31')],_0x25be8d[_0xf46c('0x32')]),_0x1dc3db);if(_0x34cf2[_0xf46c('0x31')]['filter']){_0x639ee4[_0xf46c('0x3b')]=_[_0xf46c('0x3d')](_0x639ee4['where'],{'$or':_[_0xf46c('0x28')](_0x1dc3db,function(_0x186a38){if(_0x186a38[_0xf46c('0x2c')]!=='VIRTUAL'){var _0x9249ed={};_0x9249ed[_0x186a38[_0xf46c('0x2f')]]={'$like':'%'+_0x34cf2[_0xf46c('0x31')][_0xf46c('0x3e')]+'%'};return _0x9249ed;}})});}_0x639ee4=_[_0xf46c('0x3d')]({},_0x639ee4,_0x34cf2['options']);var _0x454506={'where':_0x639ee4[_0xf46c('0x3b')]};return db[_0xf46c('0x29')][_0xf46c('0x1d')](_0x454506)[_0xf46c('0x25')](function(_0x4b5e48){_0x2abfe3[_0xf46c('0x1d')]=_0x4b5e48;if(_0x34cf2[_0xf46c('0x31')]['includeAll']){_0x639ee4[_0xf46c('0x3f')]=[{'all':!![]}];}return db[_0xf46c('0x29')][_0xf46c('0x40')](_0x639ee4);})[_0xf46c('0x25')](function(_0x36afc0){_0x2abfe3[_0xf46c('0x41')]=_0x36afc0;return _0x2abfe3;})[_0xf46c('0x25')](respondWithFilteredResult(_0x5ef577,_0x639ee4))[_0xf46c('0x42')](handleError(_0x5ef577,null));};exports[_0xf46c('0x43')]=function(_0x94b605,_0x212a3f){var _0x257fac={'raw':![],'where':{'id':_0x94b605[_0xf46c('0x44')]['id']}},_0x149de7={};_0x149de7[_0xf46c('0x2e')]=_[_0xf46c('0x30')](db['SalesforceConfiguration'][_0xf46c('0x2a')]);_0x149de7[_0xf46c('0x31')]=_[_0xf46c('0x30')](_0x94b605[_0xf46c('0x31')]);_0x149de7['filters']=_[_0xf46c('0x33')](_0x149de7['model'],_0x149de7[_0xf46c('0x31')]);_0x257fac[_0xf46c('0x35')]=_[_0xf46c('0x33')](_0x149de7[_0xf46c('0x2e')],qs[_0xf46c('0x34')](_0x94b605['query']['fields']));_0x257fac['attributes']=_0x257fac[_0xf46c('0x35')][_0xf46c('0x36')]?_0x257fac[_0xf46c('0x35')]:_0x149de7[_0xf46c('0x2e')];if(_0x94b605[_0xf46c('0x31')][_0xf46c('0x45')]){_0x257fac[_0xf46c('0x3f')]=[{'all':!![]}];}_0x257fac=_[_0xf46c('0x3d')]({},_0x257fac,_0x94b605[_0xf46c('0x46')]);return db[_0xf46c('0x29')]['find'](_0x257fac)[_0xf46c('0x25')](handleEntityNotFound(_0x212a3f,null))[_0xf46c('0x25')](respondWithResult(_0x212a3f,null))['catch'](handleError(_0x212a3f,null));};exports['create']=function(_0x14ec9f,_0x38f16a){return db[_0xf46c('0x29')][_0xf46c('0x47')](_0x14ec9f[_0xf46c('0x48')],{})[_0xf46c('0x25')](respondWithResult(_0x38f16a,0xc9))[_0xf46c('0x42')](handleError(_0x38f16a,null));};exports[_0xf46c('0x24')]=function(_0x5dea17,_0x1d151a){if(_0x5dea17['body']['id']){delete _0x5dea17[_0xf46c('0x48')]['id'];}return db[_0xf46c('0x29')][_0xf46c('0x49')]({'where':{'id':_0x5dea17['params']['id']}})[_0xf46c('0x25')](handleEntityNotFound(_0x1d151a,null))[_0xf46c('0x25')](saveUpdates(_0x5dea17['body'],null))[_0xf46c('0x25')](respondWithResult(_0x1d151a,null))['catch'](handleError(_0x1d151a,null));};exports['destroy']=function(_0x57a524,_0x52875b){return db['SalesforceConfiguration'][_0xf46c('0x49')]({'where':{'id':_0x57a524[_0xf46c('0x44')]['id']}})[_0xf46c('0x25')](handleEntityNotFound(_0x52875b,null))[_0xf46c('0x25')](removeEntity(_0x52875b,null))['catch'](handleError(_0x52875b,null));};exports[_0xf46c('0x4a')]=function(_0x70c5af,_0x29d2ce,_0x3bed5c){var _0x3d085b={};var _0x489eaa={};var _0x3f33fe;var _0x2ca21d;return db['SalesforceConfiguration'][_0xf46c('0x4b')]({'where':{'id':_0x70c5af['params']['id']}})['then'](handleEntityNotFound(_0x29d2ce,null))['then'](function(_0x5523c2){if(_0x5523c2){_0x3f33fe=_0x5523c2;_0x489eaa[_0xf46c('0x2e')]=_[_0xf46c('0x30')](db[_0xf46c('0x4c')][_0xf46c('0x2a')]);_0x489eaa[_0xf46c('0x31')]=_[_0xf46c('0x30')](_0x70c5af['query']);_0x489eaa[_0xf46c('0x32')]=_['intersection'](_0x489eaa['model'],_0x489eaa[_0xf46c('0x31')]);_0x3d085b[_0xf46c('0x35')]=_[_0xf46c('0x33')](_0x489eaa['model'],qs[_0xf46c('0x34')](_0x70c5af['query']['fields']));_0x3d085b[_0xf46c('0x35')]=_0x3d085b[_0xf46c('0x35')][_0xf46c('0x36')]?_0x3d085b[_0xf46c('0x35')]:_0x489eaa[_0xf46c('0x2e')];_0x3d085b['order']=qs[_0xf46c('0x3a')](_0x70c5af[_0xf46c('0x31')][_0xf46c('0x3a')]);_0x3d085b[_0xf46c('0x3b')]=qs['filters'](_[_0xf46c('0x3c')](_0x70c5af[_0xf46c('0x31')],_0x489eaa[_0xf46c('0x32')]));if(_0x70c5af[_0xf46c('0x31')][_0xf46c('0x3e')]){_0x3d085b[_0xf46c('0x3b')]=_[_0xf46c('0x3d')](_0x3d085b[_0xf46c('0x3b')],{'$or':_[_0xf46c('0x28')](_0x3d085b[_0xf46c('0x35')],function(_0x5a13ef){var _0x2f90b9={};_0x2f90b9[_0x5a13ef]={'$like':'%'+_0x70c5af['query'][_0xf46c('0x3e')]+'%'};return _0x2f90b9;})});}_0x3d085b=_[_0xf46c('0x3d')]({},_0x3d085b,_0x70c5af[_0xf46c('0x46')]);return _0x3f33fe['getFields'](_0x3d085b);}})[_0xf46c('0x25')](function(_0x33439e){if(_0x33439e){_0x2ca21d=_0x33439e[_0xf46c('0x36')];if(!_0x70c5af[_0xf46c('0x31')][_0xf46c('0x37')](_0xf46c('0x38'))){_0x3d085b[_0xf46c('0x1c')]=qs[_0xf46c('0x1c')](_0x70c5af[_0xf46c('0x31')]['limit']);_0x3d085b[_0xf46c('0x1e')]=qs[_0xf46c('0x1e')](_0x70c5af['query'][_0xf46c('0x1e')]);}return _0x3f33fe['getFields'](_0x3d085b);}})[_0xf46c('0x25')](function(_0x3c6814){if(_0x3c6814){return _0x3c6814?{'count':_0x2ca21d,'rows':_0x3c6814}:null;}})[_0xf46c('0x25')](respondWithResult(_0x29d2ce,null))[_0xf46c('0x42')](handleError(_0x29d2ce,null));};exports[_0xf46c('0x4d')]=function(_0x84a26c,_0x56f9ae,_0x55ed4b){var _0x3832b1={};var _0x2518b7={};var _0x5a44c1;var _0x4b39bf;return db[_0xf46c('0x29')][_0xf46c('0x4b')]({'where':{'id':_0x84a26c[_0xf46c('0x44')]['id']}})[_0xf46c('0x25')](handleEntityNotFound(_0x56f9ae,null))[_0xf46c('0x25')](function(_0x423a3f){if(_0x423a3f){_0x5a44c1=_0x423a3f;_0x2518b7['model']=_[_0xf46c('0x30')](db['SalesforceField'][_0xf46c('0x2a')]);_0x2518b7[_0xf46c('0x31')]=_['keys'](_0x84a26c['query']);_0x2518b7['filters']=_[_0xf46c('0x33')](_0x2518b7[_0xf46c('0x2e')],_0x2518b7[_0xf46c('0x31')]);_0x3832b1['attributes']=_[_0xf46c('0x33')](_0x2518b7[_0xf46c('0x2e')],qs[_0xf46c('0x34')](_0x84a26c[_0xf46c('0x31')][_0xf46c('0x34')]));_0x3832b1[_0xf46c('0x35')]=_0x3832b1[_0xf46c('0x35')][_0xf46c('0x36')]?_0x3832b1[_0xf46c('0x35')]:_0x2518b7[_0xf46c('0x2e')];_0x3832b1['order']=qs[_0xf46c('0x3a')](_0x84a26c[_0xf46c('0x31')]['sort']);_0x3832b1['where']=qs['filters'](_[_0xf46c('0x3c')](_0x84a26c[_0xf46c('0x31')],_0x2518b7[_0xf46c('0x32')]));if(_0x84a26c[_0xf46c('0x31')]['filter']){_0x3832b1[_0xf46c('0x3b')]=_[_0xf46c('0x3d')](_0x3832b1[_0xf46c('0x3b')],{'$or':_[_0xf46c('0x28')](_0x3832b1[_0xf46c('0x35')],function(_0x41ca2c){var _0x3da01d={};_0x3da01d[_0x41ca2c]={'$like':'%'+_0x84a26c['query'][_0xf46c('0x3e')]+'%'};return _0x3da01d;})});}_0x3832b1=_[_0xf46c('0x3d')]({},_0x3832b1,_0x84a26c['options']);return _0x5a44c1['getSubjects'](_0x3832b1);}})['then'](function(_0x39eb17){if(_0x39eb17){_0x4b39bf=_0x39eb17[_0xf46c('0x36')];if(!_0x84a26c['query'][_0xf46c('0x37')]('nolimit')){_0x3832b1[_0xf46c('0x1c')]=qs['limit'](_0x84a26c[_0xf46c('0x31')][_0xf46c('0x1c')]);_0x3832b1['offset']=qs[_0xf46c('0x1e')](_0x84a26c['query'][_0xf46c('0x1e')]);}return _0x5a44c1[_0xf46c('0x4d')](_0x3832b1);}})[_0xf46c('0x25')](function(_0x3c74c2){if(_0x3c74c2){return _0x3c74c2?{'count':_0x4b39bf,'rows':_0x3c74c2}:null;}})['then'](respondWithResult(_0x56f9ae,null))[_0xf46c('0x42')](handleError(_0x56f9ae,null));};exports[_0xf46c('0x4e')]=function(_0x4405d3,_0x26554f,_0x3e5570){var _0x59b59c={};var _0x48b39b={};var _0x30ecda;var _0x5b8a68;return db[_0xf46c('0x29')][_0xf46c('0x4b')]({'where':{'id':_0x4405d3[_0xf46c('0x44')]['id']}})[_0xf46c('0x25')](handleEntityNotFound(_0x26554f,null))['then'](function(_0x45eff7){if(_0x45eff7){_0x30ecda=_0x45eff7;_0x48b39b['model']=_[_0xf46c('0x30')](db['SalesforceField'][_0xf46c('0x2a')]);_0x48b39b[_0xf46c('0x31')]=_[_0xf46c('0x30')](_0x4405d3[_0xf46c('0x31')]);_0x48b39b[_0xf46c('0x32')]=_[_0xf46c('0x33')](_0x48b39b['model'],_0x48b39b[_0xf46c('0x31')]);_0x59b59c[_0xf46c('0x35')]=_[_0xf46c('0x33')](_0x48b39b[_0xf46c('0x2e')],qs['fields'](_0x4405d3[_0xf46c('0x31')]['fields']));_0x59b59c[_0xf46c('0x35')]=_0x59b59c[_0xf46c('0x35')][_0xf46c('0x36')]?_0x59b59c[_0xf46c('0x35')]:_0x48b39b['model'];_0x59b59c[_0xf46c('0x39')]=qs[_0xf46c('0x3a')](_0x4405d3['query'][_0xf46c('0x3a')]);_0x59b59c[_0xf46c('0x3b')]=qs[_0xf46c('0x32')](_['pick'](_0x4405d3[_0xf46c('0x31')],_0x48b39b['filters']));if(_0x4405d3[_0xf46c('0x31')][_0xf46c('0x3e')]){_0x59b59c[_0xf46c('0x3b')]=_[_0xf46c('0x3d')](_0x59b59c['where'],{'$or':_[_0xf46c('0x28')](_0x59b59c[_0xf46c('0x35')],function(_0x1d5eba){var _0x240a73={};_0x240a73[_0x1d5eba]={'$like':'%'+_0x4405d3['query'][_0xf46c('0x3e')]+'%'};return _0x240a73;})});}_0x59b59c=_[_0xf46c('0x3d')]({},_0x59b59c,_0x4405d3[_0xf46c('0x46')]);return _0x30ecda[_0xf46c('0x4e')](_0x59b59c);}})['then'](function(_0x2ba13d){if(_0x2ba13d){_0x5b8a68=_0x2ba13d[_0xf46c('0x36')];if(!_0x4405d3[_0xf46c('0x31')][_0xf46c('0x37')](_0xf46c('0x38'))){_0x59b59c['limit']=qs[_0xf46c('0x1c')](_0x4405d3[_0xf46c('0x31')][_0xf46c('0x1c')]);_0x59b59c[_0xf46c('0x1e')]=qs[_0xf46c('0x1e')](_0x4405d3['query']['offset']);}return _0x30ecda[_0xf46c('0x4e')](_0x59b59c);}})[_0xf46c('0x25')](function(_0x358209){if(_0x358209){return _0x358209?{'count':_0x5b8a68,'rows':_0x358209}:null;}})[_0xf46c('0x25')](respondWithResult(_0x26554f,null))[_0xf46c('0x42')](handleError(_0x26554f,null));};
\ No newline at end of file
index c498ee5..63d4b25 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8a65=['request-promise','path','rimraf','../../config/environment','./intSalesforceConfiguration.attributes','exports','define','SalesforceConfiguration','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x468b0f,_0x408566){var _0x3e74d9=function(_0x27a545){while(--_0x27a545){_0x468b0f['push'](_0x468b0f['shift']());}};_0x3e74d9(++_0x408566);}(_0x8a65,0x13c));var _0x58a6=function(_0x1496bc,_0x369cd5){_0x1496bc=_0x1496bc-0x0;var _0x4f8978=_0x8a65[_0x1496bc];return _0x4f8978;};'use strict';var _=require(_0x58a6('0x0'));var util=require(_0x58a6('0x1'));var logger=require(_0x58a6('0x2'))(_0x58a6('0x3'));var moment=require(_0x58a6('0x4'));var BPromise=require(_0x58a6('0x5'));var rp=require(_0x58a6('0x6'));var fs=require('fs');var path=require(_0x58a6('0x7'));var rimraf=require(_0x58a6('0x8'));var config=require(_0x58a6('0x9'));var attributes=require(_0x58a6('0xa'));module[_0x58a6('0xb')]=function(_0x3a7f78,_0x5966d6){return _0x3a7f78[_0x58a6('0xc')](_0x58a6('0xd'),attributes,{'tableName':'int_salesforce_configurations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xdecb=['bluebird','rimraf','exports','define','SalesforceConfiguration','int_salesforce_configurations','lodash','util','../../config/logger','api','moment'];(function(_0x494bd6,_0x58b066){var _0x446bec=function(_0x50b852){while(--_0x50b852){_0x494bd6['push'](_0x494bd6['shift']());}};_0x446bec(++_0x58b066);}(_0xdecb,0xed));var _0xbdec=function(_0x3726cb,_0x17a968){_0x3726cb=_0x3726cb-0x0;var _0x177fd1=_0xdecb[_0x3726cb];return _0x177fd1;};'use strict';var _=require(_0xbdec('0x0'));var util=require(_0xbdec('0x1'));var logger=require(_0xbdec('0x2'))(_0xbdec('0x3'));var moment=require(_0xbdec('0x4'));var BPromise=require(_0xbdec('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xbdec('0x6'));var config=require('../../config/environment');var attributes=require('./intSalesforceConfiguration.attributes');module[_0xbdec('0x7')]=function(_0x459a0d,_0x5f19db){return _0x459a0d[_0xbdec('0x8')](_0xbdec('0x9'),attributes,{'tableName':_0xbdec('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 1898276..f9319f3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x340b=['request','then','info','SalesforceConfiguration,\x20%s,\x20%s','request\x20sent','debug','SalesforceConfiguration,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http'];(function(_0x58cbde,_0x4b0f62){var _0x5799f3=function(_0x326eca){while(--_0x326eca){_0x58cbde['push'](_0x58cbde['shift']());}};_0x5799f3(++_0x4b0f62);}(_0x340b,0xc4));var _0xb340=function(_0x2f6fe5,_0x997687){_0x2f6fe5=_0x2f6fe5-0x0;var _0x1729fc=_0x340b[_0x2f6fe5];return _0x1729fc;};'use strict';var _=require(_0xb340('0x0'));var util=require(_0xb340('0x1'));var moment=require(_0xb340('0x2'));var BPromise=require(_0xb340('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb340('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xb340('0x5'));var logger=require(_0xb340('0x6'))(_0xb340('0x7'));var config=require('../../config/environment');var jayson=require(_0xb340('0x8'));var client=jayson[_0xb340('0x9')][_0xb340('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1735e0,_0x45bac8,_0x1091d4){return new BPromise(function(_0x15ef15,_0x49df47){return client[_0xb340('0xb')](_0x1735e0,_0x1091d4)[_0xb340('0xc')](function(_0x55ed9c){logger[_0xb340('0xd')](_0xb340('0xe'),_0x45bac8,_0xb340('0xf'));logger[_0xb340('0x10')](_0xb340('0x11'),_0x45bac8,_0xb340('0xf'),JSON['stringify'](_0x55ed9c));if(_0x55ed9c[_0xb340('0x12')]){if(_0x55ed9c[_0xb340('0x12')][_0xb340('0x13')]===0x1f4){logger['error'](_0xb340('0xe'),_0x45bac8,_0x55ed9c['error'][_0xb340('0x14')]);return _0x49df47(_0x55ed9c[_0xb340('0x12')][_0xb340('0x14')]);}logger['error'](_0xb340('0xe'),_0x45bac8,_0x55ed9c[_0xb340('0x12')][_0xb340('0x14')]);return _0x15ef15(_0x55ed9c[_0xb340('0x12')][_0xb340('0x14')]);}else{logger['info'](_0xb340('0xe'),_0x45bac8,'request\x20sent');_0x15ef15(_0x55ed9c[_0xb340('0x15')][_0xb340('0x14')]);}})[_0xb340('0x16')](function(_0x4ac944){logger[_0xb340('0x12')](_0xb340('0xe'),_0x45bac8,_0x4ac944);_0x49df47(_0x4ac944);});});}
\ No newline at end of file
+var _0x344a=['debug','SalesforceConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','lodash','moment','bluebird','ioredis','../../config/logger','jayson/promise','client','info','SalesforceConfiguration,\x20%s,\x20%s'];(function(_0x168127,_0x59cea1){var _0x4c99ad=function(_0x4ab3f2){while(--_0x4ab3f2){_0x168127['push'](_0x168127['shift']());}};_0x4c99ad(++_0x59cea1);}(_0x344a,0x107));var _0xa344=function(_0x187167,_0xe93836){_0x187167=_0x187167-0x0;var _0x50aed2=_0x344a[_0x187167];return _0x50aed2;};'use strict';var _=require(_0xa344('0x0'));var util=require('util');var moment=require(_0xa344('0x1'));var BPromise=require(_0xa344('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa344('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xa344('0x4'))('rpc');var config=require('../../config/environment');var jayson=require(_0xa344('0x5'));var client=jayson[_0xa344('0x6')]['http']({'port':0x232a});function respondWithRpcPromise(_0x32dec9,_0x39b75c,_0x2d9d14){return new BPromise(function(_0x3b0c9b,_0x5303e3){return client['request'](_0x32dec9,_0x2d9d14)['then'](function(_0x536fd7){logger[_0xa344('0x7')](_0xa344('0x8'),_0x39b75c,'request\x20sent');logger[_0xa344('0x9')](_0xa344('0xa'),_0x39b75c,_0xa344('0xb'),JSON[_0xa344('0xc')](_0x536fd7));if(_0x536fd7['error']){if(_0x536fd7[_0xa344('0xd')][_0xa344('0xe')]===0x1f4){logger['error'](_0xa344('0x8'),_0x39b75c,_0x536fd7[_0xa344('0xd')]['message']);return _0x5303e3(_0x536fd7[_0xa344('0xd')][_0xa344('0xf')]);}logger[_0xa344('0xd')](_0xa344('0x8'),_0x39b75c,_0x536fd7[_0xa344('0xd')][_0xa344('0xf')]);return _0x3b0c9b(_0x536fd7[_0xa344('0xd')][_0xa344('0xf')]);}else{logger[_0xa344('0x7')](_0xa344('0x8'),_0x39b75c,_0xa344('0xb'));_0x3b0c9b(_0x536fd7[_0xa344('0x10')][_0xa344('0xf')]);}})['catch'](function(_0x1a85d3){logger['error'](_0xa344('0x8'),_0x39b75c,_0x1a85d3);_0x5303e3(_0x1a85d3);});});}
\ No newline at end of file
index f85663d..cc4c34a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc3c7=['fs-extra','../../components/interaction/service','./intSalesforceField.controller','get','isAuthenticated','/:id','show','create','put','update','delete','exports','multer','path','connect-timeout','express','Router'];(function(_0x23deec,_0x207fc0){var _0xe9659e=function(_0x2a3995){while(--_0x2a3995){_0x23deec['push'](_0x23deec['shift']());}};_0xe9659e(++_0x207fc0);}(_0xc3c7,0x13e));var _0x7c3c=function(_0x561a36,_0x4226d4){_0x561a36=_0x561a36-0x0;var _0x44353b=_0xc3c7[_0x561a36];return _0x44353b;};'use strict';var multer=require(_0x7c3c('0x0'));var util=require('util');var path=require(_0x7c3c('0x1'));var timeout=require(_0x7c3c('0x2'));var express=require(_0x7c3c('0x3'));var router=express[_0x7c3c('0x4')]();var fs_extra=require(_0x7c3c('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x7c3c('0x6'));var config=require('../../config/environment');var controller=require(_0x7c3c('0x7'));router[_0x7c3c('0x8')]('/',auth[_0x7c3c('0x9')](),controller['index']);router[_0x7c3c('0x8')](_0x7c3c('0xa'),auth[_0x7c3c('0x9')](),controller[_0x7c3c('0xb')]);router['post']('/',auth[_0x7c3c('0x9')](),controller[_0x7c3c('0xc')]);router[_0x7c3c('0xd')](_0x7c3c('0xa'),auth['isAuthenticated'](),controller[_0x7c3c('0xe')]);router[_0x7c3c('0xf')](_0x7c3c('0xa'),auth[_0x7c3c('0x9')](),controller['destroy']);module[_0x7c3c('0x10')]=router;
\ No newline at end of file
+var _0x4c5d=['isAuthenticated','create','put','update','destroy','exports','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','/:id','show','post'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x4c5d,0x116));var _0xd4c5=function(_0x30a998,_0x37b88b){_0x30a998=_0x30a998-0x0;var _0x587475=_0x4c5d[_0x30a998];return _0x587475;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xd4c5('0x0'));var timeout=require('connect-timeout');var express=require(_0xd4c5('0x1'));var router=express[_0xd4c5('0x2')]();var fs_extra=require(_0xd4c5('0x3'));var auth=require(_0xd4c5('0x4'));var interaction=require(_0xd4c5('0x5'));var config=require('../../config/environment');var controller=require('./intSalesforceField.controller');router['get']('/',auth['isAuthenticated'](),controller['index']);router[_0xd4c5('0x6')](_0xd4c5('0x7'),auth['isAuthenticated'](),controller[_0xd4c5('0x8')]);router[_0xd4c5('0x9')]('/',auth[_0xd4c5('0xa')](),controller[_0xd4c5('0xb')]);router[_0xd4c5('0xc')]('/:id',auth['isAuthenticated'](),controller[_0xd4c5('0xd')]);router['delete']('/:id',auth[_0xd4c5('0xa')](),controller[_0xd4c5('0xe')]);module[_0xd4c5('0xf')]=router;
\ No newline at end of file
index 83dc08b..081405a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb626=['STRING','customVariable','sequelize','exports','ENUM','string','variable','keyValue','picklist'];(function(_0x25f14f,_0x1c90a8){var _0x35cbb3=function(_0x583c34){while(--_0x583c34){_0x25f14f['push'](_0x25f14f['shift']());}};_0x35cbb3(++_0x1c90a8);}(_0xb626,0x107));var _0x6b62=function(_0x184d67,_0x3231bb){_0x184d67=_0x184d67-0x0;var _0xc3ce7=_0xb626[_0x184d67];return _0xc3ce7;};'use strict';var Sequelize=require(_0x6b62('0x0'));module[_0x6b62('0x1')]={'type':{'type':Sequelize[_0x6b62('0x2')](_0x6b62('0x3'),_0x6b62('0x4'),'customVariable',_0x6b62('0x5'),_0x6b62('0x6')),'defaultValue':_0x6b62('0x3')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize[_0x6b62('0x7')]},'keyType':{'type':Sequelize['ENUM'](_0x6b62('0x3'),_0x6b62('0x4'),_0x6b62('0x8'))},'keyContent':{'type':Sequelize[_0x6b62('0x7')]},'idField':{'type':Sequelize['STRING']},'variableName':{'type':Sequelize[_0x6b62('0x7')]}};
\ No newline at end of file
+var _0x7557=['ENUM','picklist','string','STRING','variable','sequelize','exports'];(function(_0x13529f,_0x4973c9){var _0x5ac285=function(_0x5d8c83){while(--_0x5d8c83){_0x13529f['push'](_0x13529f['shift']());}};_0x5ac285(++_0x4973c9);}(_0x7557,0x8a));var _0x7755=function(_0x4aba15,_0x4e90aa){_0x4aba15=_0x4aba15-0x0;var _0x1c8122=_0x7557[_0x4aba15];return _0x1c8122;};'use strict';var Sequelize=require(_0x7755('0x0'));module[_0x7755('0x1')]={'type':{'type':Sequelize[_0x7755('0x2')]('string','variable','customVariable','keyValue',_0x7755('0x3')),'defaultValue':_0x7755('0x4')},'content':{'type':Sequelize[_0x7755('0x5')]},'key':{'type':Sequelize[_0x7755('0x5')]},'keyType':{'type':Sequelize[_0x7755('0x2')]('string',_0x7755('0x6'),'customVariable')},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize[_0x7755('0x5')]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
index d9ffdaf..efdf95c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc5f8=['count','offset','set','Content-Range','apply','update','then','destroy','sendStatus','error','name','send','index','SalesforceField','rawAttributes','fieldName','type','model','map','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','catch','show','params','includeAll','include','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','status','end','json','undefined','limit'];(function(_0x34b87f,_0x28aef2){var _0x449805=function(_0x3735b7){while(--_0x3735b7){_0x34b87f['push'](_0x34b87f['shift']());}};_0x449805(++_0x28aef2);}(_0xc5f8,0x19d));var _0x8c5f=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xc5f8[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0x8c5f('0x0'));var rimraf=require(_0x8c5f('0x1'));var zipdir=require(_0x8c5f('0x2'));var jsonpatch=require(_0x8c5f('0x3'));var rp=require('request-promise');var moment=require(_0x8c5f('0x4'));var BPromise=require(_0x8c5f('0x5'));var Mustache=require(_0x8c5f('0x6'));var util=require(_0x8c5f('0x7'));var path=require(_0x8c5f('0x8'));var sox=require(_0x8c5f('0x9'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x8c5f('0xa'));var _=require(_0x8c5f('0xb'));var squel=require(_0x8c5f('0xc'));var crypto=require(_0x8c5f('0xd'));var jsforce=require(_0x8c5f('0xe'));var deskjs=require(_0x8c5f('0xf'));var toCsv=require(_0x8c5f('0x10'));var querystring=require('querystring');var Papa=require(_0x8c5f('0x11'));var Redis=require(_0x8c5f('0x12'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x8c5f('0x13'));var hardwareService=require(_0x8c5f('0x14'));var logger=require(_0x8c5f('0x15'))(_0x8c5f('0x16'));var utils=require(_0x8c5f('0x17'));var config=require(_0x8c5f('0x18'));var licenseUtil=require(_0x8c5f('0x19'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1f0934,_0x434b4c){_0x434b4c=_0x434b4c||0xcc;return function(_0x517f97){if(_0x517f97){return _0x1f0934['sendStatus'](_0x434b4c);}return _0x1f0934[_0x8c5f('0x1a')](_0x434b4c)[_0x8c5f('0x1b')]();};}function respondWithResult(_0x2c2ea7,_0x269d0b){_0x269d0b=_0x269d0b||0xc8;return function(_0x777edf){if(_0x777edf){return _0x2c2ea7[_0x8c5f('0x1a')](_0x269d0b)[_0x8c5f('0x1c')](_0x777edf);}};}function respondWithFilteredResult(_0x989049,_0x43c6f5){return function(_0x477ba6){if(_0x477ba6){var _0x403f40=typeof _0x43c6f5['offset']===_0x8c5f('0x1d')&&typeof _0x43c6f5[_0x8c5f('0x1e')]==='undefined';var _0x14f6a9=_0x477ba6[_0x8c5f('0x1f')];var _0x36dcba=_0x403f40?0x0:_0x43c6f5[_0x8c5f('0x20')];var _0x14d24f=_0x403f40?_0x477ba6[_0x8c5f('0x1f')]:_0x43c6f5[_0x8c5f('0x20')]+_0x43c6f5[_0x8c5f('0x1e')];var _0x211d96;if(_0x14d24f>=_0x14f6a9){_0x14d24f=_0x14f6a9;_0x211d96=0xc8;}else{_0x211d96=0xce;}_0x989049['status'](_0x211d96);return _0x989049[_0x8c5f('0x21')](_0x8c5f('0x22'),_0x36dcba+'-'+_0x14d24f+'/'+_0x14f6a9)[_0x8c5f('0x1c')](_0x477ba6);}return null;};}function patchUpdates(_0x4c9f8d){return function(_0x8a8a4c){try{jsonpatch[_0x8c5f('0x23')](_0x8a8a4c,_0x4c9f8d,!![]);}catch(_0x5a08d2){return BPromise['reject'](_0x5a08d2);}return _0x8a8a4c['save']();};}function saveUpdates(_0x2113e8,_0x2d392d){return function(_0x355718){if(_0x355718){return _0x355718[_0x8c5f('0x24')](_0x2113e8)[_0x8c5f('0x25')](function(_0xd070ec){return _0xd070ec;});}return null;};}function removeEntity(_0x1134b2,_0x23053b){return function(_0x5866b0){if(_0x5866b0){return _0x5866b0[_0x8c5f('0x26')]()[_0x8c5f('0x25')](function(){_0x1134b2['status'](0xcc)[_0x8c5f('0x1b')]();});}};}function handleEntityNotFound(_0x43d01b,_0x5dfceb){return function(_0x4124b7){if(!_0x4124b7){_0x43d01b[_0x8c5f('0x27')](0x194);}return _0x4124b7;};}function handleError(_0x51968c,_0x5df0de){_0x5df0de=_0x5df0de||0x1f4;return function(_0x1bda9b){logger[_0x8c5f('0x28')](_0x1bda9b['stack']);if(_0x1bda9b[_0x8c5f('0x29')]){delete _0x1bda9b[_0x8c5f('0x29')];}_0x51968c['status'](_0x5df0de)[_0x8c5f('0x2a')](_0x1bda9b);};}exports[_0x8c5f('0x2b')]=function(_0x339370,_0x505dd7){var _0x4f6714={},_0x55604a={},_0x30e71f={'count':0x0,'rows':[]};var _0x4d8715=_['map'](db[_0x8c5f('0x2c')][_0x8c5f('0x2d')],function(_0xe3e19b){return{'name':_0xe3e19b[_0x8c5f('0x2e')],'type':_0xe3e19b[_0x8c5f('0x2f')]['key']};});_0x55604a[_0x8c5f('0x30')]=_[_0x8c5f('0x31')](_0x4d8715,_0x8c5f('0x29'));_0x55604a['query']=_[_0x8c5f('0x32')](_0x339370[_0x8c5f('0x33')]);_0x55604a[_0x8c5f('0x34')]=_[_0x8c5f('0x35')](_0x55604a[_0x8c5f('0x30')],_0x55604a[_0x8c5f('0x33')]);_0x4f6714[_0x8c5f('0x36')]=_[_0x8c5f('0x35')](_0x55604a[_0x8c5f('0x30')],qs[_0x8c5f('0x37')](_0x339370[_0x8c5f('0x33')][_0x8c5f('0x37')]));_0x4f6714[_0x8c5f('0x36')]=_0x4f6714[_0x8c5f('0x36')][_0x8c5f('0x38')]?_0x4f6714[_0x8c5f('0x36')]:_0x55604a[_0x8c5f('0x30')];if(!_0x339370[_0x8c5f('0x33')][_0x8c5f('0x39')](_0x8c5f('0x3a'))){_0x4f6714[_0x8c5f('0x1e')]=qs[_0x8c5f('0x1e')](_0x339370[_0x8c5f('0x33')][_0x8c5f('0x1e')]);_0x4f6714[_0x8c5f('0x20')]=qs[_0x8c5f('0x20')](_0x339370['query'][_0x8c5f('0x20')]);}_0x4f6714[_0x8c5f('0x3b')]=qs['sort'](_0x339370[_0x8c5f('0x33')][_0x8c5f('0x3c')]);_0x4f6714[_0x8c5f('0x3d')]=qs[_0x8c5f('0x34')](_[_0x8c5f('0x3e')](_0x339370['query'],_0x55604a[_0x8c5f('0x34')]),_0x4d8715);if(_0x339370[_0x8c5f('0x33')][_0x8c5f('0x3f')]){_0x4f6714[_0x8c5f('0x3d')]=_[_0x8c5f('0x40')](_0x4f6714[_0x8c5f('0x3d')],{'$or':_['map'](_0x4d8715,function(_0x593851){if(_0x593851[_0x8c5f('0x2f')]!=='VIRTUAL'){var _0x2d0ea8={};_0x2d0ea8[_0x593851[_0x8c5f('0x29')]]={'$like':'%'+_0x339370[_0x8c5f('0x33')][_0x8c5f('0x3f')]+'%'};return _0x2d0ea8;}})});}_0x4f6714=_[_0x8c5f('0x40')]({},_0x4f6714,_0x339370[_0x8c5f('0x41')]);var _0x381fc4={'where':_0x4f6714['where']};return db[_0x8c5f('0x2c')][_0x8c5f('0x1f')](_0x381fc4)['then'](function(_0x15bef7){_0x30e71f[_0x8c5f('0x1f')]=_0x15bef7;if(_0x339370['query']['includeAll']){_0x4f6714['include']=[{'all':!![]}];}return db[_0x8c5f('0x2c')]['findAll'](_0x4f6714);})['then'](function(_0x57e492){_0x30e71f['rows']=_0x57e492;return _0x30e71f;})[_0x8c5f('0x25')](respondWithFilteredResult(_0x505dd7,_0x4f6714))[_0x8c5f('0x42')](handleError(_0x505dd7,null));};exports[_0x8c5f('0x43')]=function(_0x3d6ed3,_0x200e26){var _0x31ca26={'raw':!![],'where':{'id':_0x3d6ed3[_0x8c5f('0x44')]['id']}},_0x47f51e={};_0x47f51e[_0x8c5f('0x30')]=_[_0x8c5f('0x32')](db[_0x8c5f('0x2c')][_0x8c5f('0x2d')]);_0x47f51e['query']=_[_0x8c5f('0x32')](_0x3d6ed3[_0x8c5f('0x33')]);_0x47f51e['filters']=_[_0x8c5f('0x35')](_0x47f51e[_0x8c5f('0x30')],_0x47f51e[_0x8c5f('0x33')]);_0x31ca26[_0x8c5f('0x36')]=_[_0x8c5f('0x35')](_0x47f51e[_0x8c5f('0x30')],qs[_0x8c5f('0x37')](_0x3d6ed3[_0x8c5f('0x33')][_0x8c5f('0x37')]));_0x31ca26[_0x8c5f('0x36')]=_0x31ca26[_0x8c5f('0x36')][_0x8c5f('0x38')]?_0x31ca26['attributes']:_0x47f51e[_0x8c5f('0x30')];if(_0x3d6ed3[_0x8c5f('0x33')][_0x8c5f('0x45')]){_0x31ca26[_0x8c5f('0x46')]=[{'all':!![]}];}_0x31ca26=_[_0x8c5f('0x40')]({},_0x31ca26,_0x3d6ed3['options']);return db[_0x8c5f('0x2c')][_0x8c5f('0x47')](_0x31ca26)[_0x8c5f('0x25')](handleEntityNotFound(_0x200e26,null))[_0x8c5f('0x25')](respondWithResult(_0x200e26,null))[_0x8c5f('0x42')](handleError(_0x200e26,null));};exports[_0x8c5f('0x48')]=function(_0x1d2ee0,_0xdf1ef1){return db[_0x8c5f('0x2c')][_0x8c5f('0x48')](_0x1d2ee0[_0x8c5f('0x49')],{})[_0x8c5f('0x25')](respondWithResult(_0xdf1ef1,0xc9))[_0x8c5f('0x42')](handleError(_0xdf1ef1,null));};exports[_0x8c5f('0x24')]=function(_0x23ed56,_0x3ceacc){if(_0x23ed56[_0x8c5f('0x49')]['id']){delete _0x23ed56[_0x8c5f('0x49')]['id'];}return db[_0x8c5f('0x2c')][_0x8c5f('0x47')]({'where':{'id':_0x23ed56[_0x8c5f('0x44')]['id']}})['then'](handleEntityNotFound(_0x3ceacc,null))[_0x8c5f('0x25')](saveUpdates(_0x23ed56['body'],null))[_0x8c5f('0x25')](respondWithResult(_0x3ceacc,null))['catch'](handleError(_0x3ceacc,null));};exports[_0x8c5f('0x26')]=function(_0x271e4f,_0x441fb2){return db[_0x8c5f('0x2c')][_0x8c5f('0x47')]({'where':{'id':_0x271e4f[_0x8c5f('0x44')]['id']}})[_0x8c5f('0x25')](handleEntityNotFound(_0x441fb2,null))['then'](removeEntity(_0x441fb2,null))['catch'](handleError(_0x441fb2,null));};
\ No newline at end of file
+var _0xfb34=['querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','stack','name','send','index','map','fieldName','key','model','query','keys','filters','attributes','fields','length','nolimit','where','pick','filter','merge','VIRTUAL','options','SalesforceField','include','findAll','catch','show','params','rawAttributes','intersection','includeAll','create','body','find','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','lodash','crypto','jsforce','desk.js','to-csv'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0xfb34,0x1a0));var _0x4fb3=function(_0xf26c2e,_0x56c3ea){_0xf26c2e=_0xf26c2e-0x0;var _0x46ecb4=_0xfb34[_0xf26c2e];return _0x46ecb4;};'use strict';var emlformat=require(_0x4fb3('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x4fb3('0x1'));var jsonpatch=require(_0x4fb3('0x2'));var rp=require(_0x4fb3('0x3'));var moment=require(_0x4fb3('0x4'));var BPromise=require(_0x4fb3('0x5'));var Mustache=require(_0x4fb3('0x6'));var util=require(_0x4fb3('0x7'));var path=require(_0x4fb3('0x8'));var sox=require(_0x4fb3('0x9'));var csv=require('to-csv');var ejs=require(_0x4fb3('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x4fb3('0xb'));var squel=require('squel');var crypto=require(_0x4fb3('0xc'));var jsforce=require(_0x4fb3('0xd'));var deskjs=require(_0x4fb3('0xe'));var toCsv=require(_0x4fb3('0xf'));var querystring=require(_0x4fb3('0x10'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x4fb3('0x11'));var qs=require(_0x4fb3('0x12'));var as=require(_0x4fb3('0x13'));var hardwareService=require(_0x4fb3('0x14'));var logger=require('../../config/logger')('api');var utils=require(_0x4fb3('0x15'));var config=require(_0x4fb3('0x16'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x35ab6c,_0x48d59a){_0x48d59a=_0x48d59a||0xcc;return function(_0x441581){if(_0x441581){return _0x35ab6c[_0x4fb3('0x17')](_0x48d59a);}return _0x35ab6c[_0x4fb3('0x18')](_0x48d59a)[_0x4fb3('0x19')]();};}function respondWithResult(_0x54889e,_0x8f516a){_0x8f516a=_0x8f516a||0xc8;return function(_0x35c83d){if(_0x35c83d){return _0x54889e[_0x4fb3('0x18')](_0x8f516a)[_0x4fb3('0x1a')](_0x35c83d);}};}function respondWithFilteredResult(_0x42e548,_0x250153){return function(_0x5cc15f){if(_0x5cc15f){var _0x419862=typeof _0x250153[_0x4fb3('0x1b')]===_0x4fb3('0x1c')&&typeof _0x250153[_0x4fb3('0x1d')]===_0x4fb3('0x1c');var _0x53fcf6=_0x5cc15f['count'];var _0x5afdc1=_0x419862?0x0:_0x250153[_0x4fb3('0x1b')];var _0x521be5=_0x419862?_0x5cc15f[_0x4fb3('0x1e')]:_0x250153[_0x4fb3('0x1b')]+_0x250153[_0x4fb3('0x1d')];var _0x414aa2;if(_0x521be5>=_0x53fcf6){_0x521be5=_0x53fcf6;_0x414aa2=0xc8;}else{_0x414aa2=0xce;}_0x42e548[_0x4fb3('0x18')](_0x414aa2);return _0x42e548[_0x4fb3('0x1f')](_0x4fb3('0x20'),_0x5afdc1+'-'+_0x521be5+'/'+_0x53fcf6)[_0x4fb3('0x1a')](_0x5cc15f);}return null;};}function patchUpdates(_0x29b537){return function(_0x22c2fb){try{jsonpatch[_0x4fb3('0x21')](_0x22c2fb,_0x29b537,!![]);}catch(_0x56e7ff){return BPromise[_0x4fb3('0x22')](_0x56e7ff);}return _0x22c2fb[_0x4fb3('0x23')]();};}function saveUpdates(_0x529631,_0x5f211e){return function(_0x3b5a5d){if(_0x3b5a5d){return _0x3b5a5d[_0x4fb3('0x24')](_0x529631)[_0x4fb3('0x25')](function(_0x346641){return _0x346641;});}return null;};}function removeEntity(_0x587c2b,_0x1a1d35){return function(_0x25875c){if(_0x25875c){return _0x25875c[_0x4fb3('0x26')]()['then'](function(){_0x587c2b[_0x4fb3('0x18')](0xcc)[_0x4fb3('0x19')]();});}};}function handleEntityNotFound(_0xe0ad55,_0x157001){return function(_0x3dcd35){if(!_0x3dcd35){_0xe0ad55[_0x4fb3('0x17')](0x194);}return _0x3dcd35;};}function handleError(_0x48f500,_0x48c38a){_0x48c38a=_0x48c38a||0x1f4;return function(_0x3cdb98){logger['error'](_0x3cdb98[_0x4fb3('0x27')]);if(_0x3cdb98[_0x4fb3('0x28')]){delete _0x3cdb98['name'];}_0x48f500[_0x4fb3('0x18')](_0x48c38a)[_0x4fb3('0x29')](_0x3cdb98);};}exports[_0x4fb3('0x2a')]=function(_0x4752d3,_0x2f5012){var _0x4bdfd5={},_0x5b9d64={},_0x414078={'count':0x0,'rows':[]};var _0x283b86=_[_0x4fb3('0x2b')](db['SalesforceField']['rawAttributes'],function(_0x389aa0){return{'name':_0x389aa0[_0x4fb3('0x2c')],'type':_0x389aa0['type'][_0x4fb3('0x2d')]};});_0x5b9d64[_0x4fb3('0x2e')]=_[_0x4fb3('0x2b')](_0x283b86,_0x4fb3('0x28'));_0x5b9d64[_0x4fb3('0x2f')]=_[_0x4fb3('0x30')](_0x4752d3[_0x4fb3('0x2f')]);_0x5b9d64[_0x4fb3('0x31')]=_['intersection'](_0x5b9d64[_0x4fb3('0x2e')],_0x5b9d64[_0x4fb3('0x2f')]);_0x4bdfd5[_0x4fb3('0x32')]=_['intersection'](_0x5b9d64[_0x4fb3('0x2e')],qs[_0x4fb3('0x33')](_0x4752d3[_0x4fb3('0x2f')][_0x4fb3('0x33')]));_0x4bdfd5[_0x4fb3('0x32')]=_0x4bdfd5[_0x4fb3('0x32')][_0x4fb3('0x34')]?_0x4bdfd5[_0x4fb3('0x32')]:_0x5b9d64[_0x4fb3('0x2e')];if(!_0x4752d3['query']['hasOwnProperty'](_0x4fb3('0x35'))){_0x4bdfd5[_0x4fb3('0x1d')]=qs['limit'](_0x4752d3[_0x4fb3('0x2f')][_0x4fb3('0x1d')]);_0x4bdfd5['offset']=qs[_0x4fb3('0x1b')](_0x4752d3[_0x4fb3('0x2f')]['offset']);}_0x4bdfd5['order']=qs['sort'](_0x4752d3[_0x4fb3('0x2f')]['sort']);_0x4bdfd5[_0x4fb3('0x36')]=qs['filters'](_[_0x4fb3('0x37')](_0x4752d3[_0x4fb3('0x2f')],_0x5b9d64[_0x4fb3('0x31')]),_0x283b86);if(_0x4752d3[_0x4fb3('0x2f')][_0x4fb3('0x38')]){_0x4bdfd5['where']=_[_0x4fb3('0x39')](_0x4bdfd5['where'],{'$or':_[_0x4fb3('0x2b')](_0x283b86,function(_0x27cad3){if(_0x27cad3['type']!==_0x4fb3('0x3a')){var _0x4e6991={};_0x4e6991[_0x27cad3[_0x4fb3('0x28')]]={'$like':'%'+_0x4752d3['query'][_0x4fb3('0x38')]+'%'};return _0x4e6991;}})});}_0x4bdfd5=_['merge']({},_0x4bdfd5,_0x4752d3[_0x4fb3('0x3b')]);var _0x39806f={'where':_0x4bdfd5[_0x4fb3('0x36')]};return db[_0x4fb3('0x3c')][_0x4fb3('0x1e')](_0x39806f)[_0x4fb3('0x25')](function(_0x4d5b32){_0x414078[_0x4fb3('0x1e')]=_0x4d5b32;if(_0x4752d3[_0x4fb3('0x2f')]['includeAll']){_0x4bdfd5[_0x4fb3('0x3d')]=[{'all':!![]}];}return db[_0x4fb3('0x3c')][_0x4fb3('0x3e')](_0x4bdfd5);})[_0x4fb3('0x25')](function(_0x295a69){_0x414078['rows']=_0x295a69;return _0x414078;})[_0x4fb3('0x25')](respondWithFilteredResult(_0x2f5012,_0x4bdfd5))[_0x4fb3('0x3f')](handleError(_0x2f5012,null));};exports[_0x4fb3('0x40')]=function(_0x31434f,_0x47824b){var _0x37bee3={'raw':!![],'where':{'id':_0x31434f[_0x4fb3('0x41')]['id']}},_0x5a1c23={};_0x5a1c23[_0x4fb3('0x2e')]=_[_0x4fb3('0x30')](db['SalesforceField'][_0x4fb3('0x42')]);_0x5a1c23['query']=_[_0x4fb3('0x30')](_0x31434f[_0x4fb3('0x2f')]);_0x5a1c23[_0x4fb3('0x31')]=_[_0x4fb3('0x43')](_0x5a1c23[_0x4fb3('0x2e')],_0x5a1c23[_0x4fb3('0x2f')]);_0x37bee3[_0x4fb3('0x32')]=_[_0x4fb3('0x43')](_0x5a1c23['model'],qs[_0x4fb3('0x33')](_0x31434f[_0x4fb3('0x2f')]['fields']));_0x37bee3[_0x4fb3('0x32')]=_0x37bee3[_0x4fb3('0x32')][_0x4fb3('0x34')]?_0x37bee3['attributes']:_0x5a1c23[_0x4fb3('0x2e')];if(_0x31434f['query'][_0x4fb3('0x44')]){_0x37bee3['include']=[{'all':!![]}];}_0x37bee3=_['merge']({},_0x37bee3,_0x31434f[_0x4fb3('0x3b')]);return db[_0x4fb3('0x3c')]['find'](_0x37bee3)['then'](handleEntityNotFound(_0x47824b,null))[_0x4fb3('0x25')](respondWithResult(_0x47824b,null))[_0x4fb3('0x3f')](handleError(_0x47824b,null));};exports[_0x4fb3('0x45')]=function(_0x5f06a0,_0x1c0c4d){return db['SalesforceField']['create'](_0x5f06a0[_0x4fb3('0x46')],{})[_0x4fb3('0x25')](respondWithResult(_0x1c0c4d,0xc9))[_0x4fb3('0x3f')](handleError(_0x1c0c4d,null));};exports[_0x4fb3('0x24')]=function(_0x34769b,_0x256ef0){if(_0x34769b[_0x4fb3('0x46')]['id']){delete _0x34769b['body']['id'];}return db[_0x4fb3('0x3c')][_0x4fb3('0x47')]({'where':{'id':_0x34769b[_0x4fb3('0x41')]['id']}})[_0x4fb3('0x25')](handleEntityNotFound(_0x256ef0,null))[_0x4fb3('0x25')](saveUpdates(_0x34769b['body'],null))[_0x4fb3('0x25')](respondWithResult(_0x256ef0,null))[_0x4fb3('0x3f')](handleError(_0x256ef0,null));};exports[_0x4fb3('0x26')]=function(_0x45ff0f,_0x32a4af){return db[_0x4fb3('0x3c')][_0x4fb3('0x47')]({'where':{'id':_0x45ff0f[_0x4fb3('0x41')]['id']}})[_0x4fb3('0x25')](handleEntityNotFound(_0x32a4af,null))[_0x4fb3('0x25')](removeEntity(_0x32a4af,null))[_0x4fb3('0x3f')](handleError(_0x32a4af,null));};
\ No newline at end of file
index a028bf6..f8b0915 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7620=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','./intSalesforceField.attributes','SalesforceField','int_salesforce_fields','idField'];(function(_0x339eaa,_0xbc2f72){var _0x4985b6=function(_0x10e65b){while(--_0x10e65b){_0x339eaa['push'](_0x339eaa['shift']());}};_0x4985b6(++_0xbc2f72);}(_0x7620,0x8f));var _0x0762=function(_0x35228c,_0x1e6824){_0x35228c=_0x35228c-0x0;var _0x56b5c0=_0x7620[_0x35228c];return _0x56b5c0;};'use strict';var _=require(_0x0762('0x0'));var util=require(_0x0762('0x1'));var logger=require(_0x0762('0x2'))(_0x0762('0x3'));var moment=require(_0x0762('0x4'));var BPromise=require(_0x0762('0x5'));var rp=require(_0x0762('0x6'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x0762('0x7'));module['exports']=function(_0x127fb8,_0x608473){return _0x127fb8['define'](_0x0762('0x8'),attributes,{'tableName':_0x0762('0x9'),'paranoid':![],'indexes':[{'name':'salesforce_unique_index','fields':[_0x0762('0xa'),'FieldId'],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x5e59=['idField','lodash','util','../../config/logger','api','moment','path','rimraf','../../config/environment','./intSalesforceField.attributes','SalesforceField','int_salesforce_fields','salesforce_unique_index'];(function(_0x196138,_0x49e7eb){var _0x564081=function(_0x3679ed){while(--_0x3679ed){_0x196138['push'](_0x196138['shift']());}};_0x564081(++_0x49e7eb);}(_0x5e59,0xb7));var _0x95e5=function(_0xf79bae,_0x263b2a){_0xf79bae=_0xf79bae-0x0;var _0x5d2cb7=_0x5e59[_0xf79bae];return _0x5d2cb7;};'use strict';var _=require(_0x95e5('0x0'));var util=require(_0x95e5('0x1'));var logger=require(_0x95e5('0x2'))(_0x95e5('0x3'));var moment=require(_0x95e5('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x95e5('0x5'));var rimraf=require(_0x95e5('0x6'));var config=require(_0x95e5('0x7'));var attributes=require(_0x95e5('0x8'));module['exports']=function(_0x44c2ef,_0x590c6d){return _0x44c2ef['define'](_0x95e5('0x9'),attributes,{'tableName':_0x95e5('0xa'),'paranoid':![],'indexes':[{'name':_0x95e5('0xb'),'fields':[_0x95e5('0xc'),'FieldId'],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index 5945db8..232a5a1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcaf1=['bluebird','randomstring','../../mysqldb','rpc','jayson/promise','client','request','info','request\x20sent','SalesforceField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','SalesforceField,\x20%s,\x20%s','catch','lodash','util','moment'];(function(_0x71763d,_0x31a2f3){var _0xfe189e=function(_0x5d21df){while(--_0x5d21df){_0x71763d['push'](_0x71763d['shift']());}};_0xfe189e(++_0x31a2f3);}(_0xcaf1,0x1d8));var _0x1caf=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xcaf1[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x1caf('0x0'));var util=require(_0x1caf('0x1'));var moment=require(_0x1caf('0x2'));var BPromise=require(_0x1caf('0x3'));var rs=require(_0x1caf('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x1caf('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x1caf('0x6'));var config=require('../../config/environment');var jayson=require(_0x1caf('0x7'));var client=jayson[_0x1caf('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x56ce8b,_0x10556f,_0x409f9a){return new BPromise(function(_0xbc0cfe,_0x12d2ed){return client[_0x1caf('0x9')](_0x56ce8b,_0x409f9a)['then'](function(_0x5712f7){logger[_0x1caf('0xa')]('SalesforceField,\x20%s,\x20%s',_0x10556f,_0x1caf('0xb'));logger['debug'](_0x1caf('0xc'),_0x10556f,_0x1caf('0xb'),JSON[_0x1caf('0xd')](_0x5712f7));if(_0x5712f7[_0x1caf('0xe')]){if(_0x5712f7[_0x1caf('0xe')][_0x1caf('0xf')]===0x1f4){logger['error']('SalesforceField,\x20%s,\x20%s',_0x10556f,_0x5712f7['error']['message']);return _0x12d2ed(_0x5712f7[_0x1caf('0xe')][_0x1caf('0x10')]);}logger[_0x1caf('0xe')](_0x1caf('0x11'),_0x10556f,_0x5712f7[_0x1caf('0xe')]['message']);return _0xbc0cfe(_0x5712f7[_0x1caf('0xe')]['message']);}else{logger['info']('SalesforceField,\x20%s,\x20%s',_0x10556f,_0x1caf('0xb'));_0xbc0cfe(_0x5712f7['result'][_0x1caf('0x10')]);}})[_0x1caf('0x12')](function(_0x5bfc67){logger[_0x1caf('0xe')](_0x1caf('0x11'),_0x10556f,_0x5bfc67);_0x12d2ed(_0x5bfc67);});});}
\ No newline at end of file
+var _0x3c12=['SalesforceField,\x20%s,\x20%s','message','info','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','http','request','then','request\x20sent','debug','SalesforceField,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x3b5049,_0x495a94){var _0x12454e=function(_0x3988d3){while(--_0x3988d3){_0x3b5049['push'](_0x3b5049['shift']());}};_0x12454e(++_0x495a94);}(_0x3c12,0x17b));var _0x23c1=function(_0x3b3f4f,_0x403216){_0x3b3f4f=_0x3b3f4f-0x0;var _0x174dbe=_0x3c12[_0x3b3f4f];return _0x174dbe;};'use strict';var _=require('lodash');var util=require(_0x23c1('0x0'));var moment=require(_0x23c1('0x1'));var BPromise=require(_0x23c1('0x2'));var rs=require(_0x23c1('0x3'));var fs=require('fs');var Redis=require(_0x23c1('0x4'));var db=require(_0x23c1('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x23c1('0x6'))(_0x23c1('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x23c1('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x449976,_0x593288,_0x5d2241){return new BPromise(function(_0x4e4995,_0x1fbe4d){return client[_0x23c1('0x9')](_0x449976,_0x5d2241)[_0x23c1('0xa')](function(_0x3564fe){logger['info']('SalesforceField,\x20%s,\x20%s',_0x593288,_0x23c1('0xb'));logger[_0x23c1('0xc')](_0x23c1('0xd'),_0x593288,'request\x20sent',JSON[_0x23c1('0xe')](_0x3564fe));if(_0x3564fe['error']){if(_0x3564fe[_0x23c1('0xf')][_0x23c1('0x10')]===0x1f4){logger[_0x23c1('0xf')](_0x23c1('0x11'),_0x593288,_0x3564fe[_0x23c1('0xf')][_0x23c1('0x12')]);return _0x1fbe4d(_0x3564fe[_0x23c1('0xf')][_0x23c1('0x12')]);}logger[_0x23c1('0xf')](_0x23c1('0x11'),_0x593288,_0x3564fe[_0x23c1('0xf')]['message']);return _0x4e4995(_0x3564fe['error'][_0x23c1('0x12')]);}else{logger[_0x23c1('0x13')](_0x23c1('0x11'),_0x593288,_0x23c1('0xb'));_0x4e4995(_0x3564fe[_0x23c1('0x14')][_0x23c1('0x12')]);}})[_0x23c1('0x15')](function(_0xad1dd6){logger[_0x23c1('0xf')]('SalesforceField,\x20%s,\x20%s',_0x593288,_0xad1dd6);_0x1fbe4d(_0xad1dd6);});});}
\ No newline at end of file
index 8feb9af..8cf7a46 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa530=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','/:id','show','/:id/configurations','getConfigurations','/:id/fields','post','create','addConfiguration','put','delete','exports','multer','util','connect-timeout','express'];(function(_0x1be6d0,_0x223671){var _0x2e8772=function(_0x2e5ff3){while(--_0x2e5ff3){_0x1be6d0['push'](_0x1be6d0['shift']());}};_0x2e8772(++_0x223671);}(_0xa530,0x7a));var _0x0a53=function(_0x206711,_0x4125b4){_0x206711=_0x206711-0x0;var _0x4fe02b=_0xa530[_0x206711];return _0x4fe02b;};'use strict';var multer=require(_0x0a53('0x0'));var util=require(_0x0a53('0x1'));var path=require('path');var timeout=require(_0x0a53('0x2'));var express=require(_0x0a53('0x3'));var router=express[_0x0a53('0x4')]();var fs_extra=require(_0x0a53('0x5'));var auth=require(_0x0a53('0x6'));var interaction=require(_0x0a53('0x7'));var config=require('../../config/environment');var controller=require('./intServicenowAccount.controller');router[_0x0a53('0x8')]('/',auth[_0x0a53('0x9')](),controller['index']);router[_0x0a53('0x8')](_0x0a53('0xa'),auth[_0x0a53('0x9')](),controller[_0x0a53('0xb')]);router[_0x0a53('0x8')](_0x0a53('0xc'),auth[_0x0a53('0x9')](),controller[_0x0a53('0xd')]);router['get'](_0x0a53('0xe'),auth[_0x0a53('0x9')](),controller['getFields']);router[_0x0a53('0xf')]('/',auth['isAuthenticated'](),controller[_0x0a53('0x10')]);router[_0x0a53('0xf')](_0x0a53('0xc'),auth[_0x0a53('0x9')](),controller[_0x0a53('0x11')]);router[_0x0a53('0x12')]('/:id',auth[_0x0a53('0x9')](),controller['update']);router[_0x0a53('0x13')](_0x0a53('0xa'),auth[_0x0a53('0x9')](),controller['destroy']);module[_0x0a53('0x14')]=router;
\ No newline at end of file
+var _0x8150=['addConfiguration','put','update','delete','exports','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/:id','show','/:id/configurations','getConfigurations','/:id/fields','getFields','post','create'];(function(_0x3054be,_0x1bdc8b){var _0x3df150=function(_0x56cfbf){while(--_0x56cfbf){_0x3054be['push'](_0x3054be['shift']());}};_0x3df150(++_0x1bdc8b);}(_0x8150,0x1a7));var _0x0815=function(_0x5d7141,_0x51567a){_0x5d7141=_0x5d7141-0x0;var _0x2c00a9=_0x8150[_0x5d7141];return _0x2c00a9;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require(_0x0815('0x0'));var express=require(_0x0815('0x1'));var router=express[_0x0815('0x2')]();var fs_extra=require(_0x0815('0x3'));var auth=require(_0x0815('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x0815('0x5'));var controller=require('./intServicenowAccount.controller');router[_0x0815('0x6')]('/',auth[_0x0815('0x7')](),controller[_0x0815('0x8')]);router['get'](_0x0815('0x9'),auth[_0x0815('0x7')](),controller[_0x0815('0xa')]);router[_0x0815('0x6')](_0x0815('0xb'),auth[_0x0815('0x7')](),controller[_0x0815('0xc')]);router[_0x0815('0x6')](_0x0815('0xd'),auth[_0x0815('0x7')](),controller[_0x0815('0xe')]);router[_0x0815('0xf')]('/',auth['isAuthenticated'](),controller[_0x0815('0x10')]);router[_0x0815('0xf')]('/:id/configurations',auth[_0x0815('0x7')](),controller[_0x0815('0x11')]);router[_0x0815('0x12')]('/:id',auth[_0x0815('0x7')](),controller[_0x0815('0x13')]);router[_0x0815('0x14')](_0x0815('0x9'),auth[_0x0815('0x7')](),controller['destroy']);module[_0x0815('0x15')]=router;
\ No newline at end of file
index 00298a5..9215b77 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa60f=['sequelize','STRING','username','remoteUri'];(function(_0x13c3cb,_0x315171){var _0x28afce=function(_0x8a72f9){while(--_0x8a72f9){_0x13c3cb['push'](_0x13c3cb['shift']());}};_0x28afce(++_0x315171);}(_0xa60f,0xec));var _0xfa60=function(_0x13d668,_0x1b74c1){_0x13d668=_0x13d668-0x0;var _0x342946=_0xa60f[_0x13d668];return _0x342946;};'use strict';var Sequelize=require(_0xfa60('0x0'));module['exports']={'name':{'type':Sequelize[_0xfa60('0x1')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize['STRING'],'unique':_0xfa60('0x2')},'password':{'type':Sequelize[_0xfa60('0x1')]},'email':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0xfa60('0x1')],'unique':_0xfa60('0x3')},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]}};
\ No newline at end of file
+var _0xbcbb=['STRING','username','remoteUri','sequelize','exports'];(function(_0x10346c,_0x53d695){var _0x59330d=function(_0x189f09){while(--_0x189f09){_0x10346c['push'](_0x10346c['shift']());}};_0x59330d(++_0x53d695);}(_0xbcbb,0x111));var _0xbbcb=function(_0x3434d7,_0x4d4eb0){_0x3434d7=_0x3434d7-0x0;var _0x51eebd=_0xbcbb[_0x3434d7];return _0x51eebd;};'use strict';var Sequelize=require(_0xbbcb('0x0'));module[_0xbbcb('0x1')]={'name':{'type':Sequelize[_0xbbcb('0x2')]},'description':{'type':Sequelize[_0xbbcb('0x2')]},'username':{'type':Sequelize['STRING'],'unique':_0xbbcb('0x3')},'password':{'type':Sequelize[_0xbbcb('0x2')]},'email':{'type':Sequelize[_0xbbcb('0x2')]},'remoteUri':{'type':Sequelize[_0xbbcb('0x2')],'unique':_0xbbcb('0x4')},'serverUrl':{'type':Sequelize[_0xbbcb('0x2')],'allowNull':![]}};
\ No newline at end of file
index c5374fd..75f35eb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe7df=['show','params','keys','length','includeAll','create','body','catch','find','getConfigurations','findOne','ServicenowConfiguration','addConfiguration','AccountId','channel','Descriptions','getDescriptions','ServicenowField','Subjects','made_sla','hold_reason','knowledge','subcategory','notify','severity','category','parent','caused_by','watch_list','sys_updated_on','child_incidents','approval_history','number','sys_updated_by','sys_created_on','sys_domain','state','sys_created_by','calendar_stc','closed_at','cmdb_ci','delivery_plan','impact','business_service','sys_domain_path','rfc','time_worked','expected_start','opened_at','business_duration','group_list','reopened_time','resolved_at','caller_id','approval_set','work_notes','short_description','correlation_display','delivery_task','work_start','assignment_group','business_stc','calendar_duration','sys_class_name','close_notes','closed_by','follow_up','parent_incident','contact_type','reopened_by','incident_state','problem_id','company','reassignment_count','activity_due','assigned_to','comments','sla_due','approval','due_date','sys_tags','upon_approval','correlation_id','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','incident\x20table\x20objects','assign','includes','forEach','internalType','push','all','TCL:\x20_object','TCL:\x20exports.getEntityFields\x20->\x20_objectsCustom','label','concat','ServiceNow\x20error:\x20','test','statusCode','stack','send','boolean','True','true','False','false','sys_choice?sysparm_query=name=incident^element=','inactive','value','eml-format','rimraf','zip-dir','request-promise','mustache','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','name','index','map','ServicenowAccount','rawAttributes','type','key','model','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','include'];(function(_0xbd7925,_0x2d046b){var _0x213b72=function(_0x2c9784){while(--_0x2c9784){_0xbd7925['push'](_0xbd7925['shift']());}};_0x213b72(++_0x2d046b);}(_0xe7df,0x131));var _0xfe7d=function(_0x264388,_0x215668){_0x264388=_0x264388-0x0;var _0x54103f=_0xe7df[_0x264388];return _0x54103f;};'use strict';var emlformat=require(_0xfe7d('0x0'));var rimraf=require(_0xfe7d('0x1'));var zipdir=require(_0xfe7d('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xfe7d('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xfe7d('0x4'));var util=require('util');var path=require('path');var sox=require(_0xfe7d('0x5'));var csv=require(_0xfe7d('0x6'));var ejs=require(_0xfe7d('0x7'));var fs=require('fs');var fs_extra=require(_0xfe7d('0x8'));var _=require(_0xfe7d('0x9'));var squel=require('squel');var crypto=require(_0xfe7d('0xa'));var jsforce=require(_0xfe7d('0xb'));var deskjs=require('desk.js');var toCsv=require(_0xfe7d('0x6'));var querystring=require(_0xfe7d('0xc'));var Papa=require('papaparse');var Redis=require(_0xfe7d('0xd'));var authService=require(_0xfe7d('0xe'));var qs=require(_0xfe7d('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xfe7d('0x10'))('api');var utils=require(_0xfe7d('0x11'));var config=require(_0xfe7d('0x12'));var licenseUtil=require(_0xfe7d('0x13'));var db=require(_0xfe7d('0x14'))['db'];var integrations=require('../../components/integrations/configuration');function respondWithStatusCode(_0x4f4b6b,_0xbfd69b){_0xbfd69b=_0xbfd69b||0xcc;return function(_0x1c5c38){if(_0x1c5c38){return _0x4f4b6b[_0xfe7d('0x15')](_0xbfd69b);}return _0x4f4b6b[_0xfe7d('0x16')](_0xbfd69b)[_0xfe7d('0x17')]();};}function respondWithResult(_0x3e691a,_0x510e8f){_0x510e8f=_0x510e8f||0xc8;return function(_0x2f469a){if(_0x2f469a){return _0x3e691a[_0xfe7d('0x16')](_0x510e8f)[_0xfe7d('0x18')](_0x2f469a);}};}function respondWithFilteredResult(_0xc6c2f1,_0x3c77fb){return function(_0x232b1c){if(_0x232b1c){var _0x36846c=typeof _0x3c77fb[_0xfe7d('0x19')]===_0xfe7d('0x1a')&&typeof _0x3c77fb[_0xfe7d('0x1b')]===_0xfe7d('0x1a');var _0x3d1213=_0x232b1c[_0xfe7d('0x1c')];var _0xbe0449=_0x36846c?0x0:_0x3c77fb['offset'];var _0x3c776b=_0x36846c?_0x232b1c[_0xfe7d('0x1c')]:_0x3c77fb[_0xfe7d('0x19')]+_0x3c77fb[_0xfe7d('0x1b')];var _0x202a89;if(_0x3c776b>=_0x3d1213){_0x3c776b=_0x3d1213;_0x202a89=0xc8;}else{_0x202a89=0xce;}_0xc6c2f1[_0xfe7d('0x16')](_0x202a89);return _0xc6c2f1[_0xfe7d('0x1d')](_0xfe7d('0x1e'),_0xbe0449+'-'+_0x3c776b+'/'+_0x3d1213)['json'](_0x232b1c);}return null;};}function patchUpdates(_0x2f1fbf){return function(_0x3abb24){try{jsonpatch[_0xfe7d('0x1f')](_0x3abb24,_0x2f1fbf,!![]);}catch(_0x2dddd3){return BPromise[_0xfe7d('0x20')](_0x2dddd3);}return _0x3abb24[_0xfe7d('0x21')]();};}function saveUpdates(_0x1dc89e,_0x543b3d){return function(_0x594074){if(_0x594074){return _0x594074[_0xfe7d('0x22')](_0x1dc89e)[_0xfe7d('0x23')](function(_0x16505c){return _0x16505c;});}return null;};}function removeEntity(_0x2a5947,_0x3a74c2){return function(_0x5dee85){if(_0x5dee85){return _0x5dee85[_0xfe7d('0x24')]()[_0xfe7d('0x23')](function(){_0x2a5947['status'](0xcc)[_0xfe7d('0x17')]();});}};}function handleEntityNotFound(_0x556725,_0x519d95){return function(_0x3359d0){if(!_0x3359d0){_0x556725[_0xfe7d('0x15')](0x194);}return _0x3359d0;};}function handleError(_0x59c65b,_0x2d6612){_0x2d6612=_0x2d6612||0x1f4;return function(_0x19afa7){logger['error'](_0x19afa7['stack']);if(_0x19afa7[_0xfe7d('0x25')]){delete _0x19afa7[_0xfe7d('0x25')];}_0x59c65b[_0xfe7d('0x16')](_0x2d6612)['send'](_0x19afa7);};}exports[_0xfe7d('0x26')]=function(_0x2f80a2,_0x505180){var _0x9dd90c={},_0x57c458={},_0x595e1a={'count':0x0,'rows':[]};var _0x46be89=_[_0xfe7d('0x27')](db[_0xfe7d('0x28')][_0xfe7d('0x29')],function(_0x56f184){return{'name':_0x56f184['fieldName'],'type':_0x56f184[_0xfe7d('0x2a')][_0xfe7d('0x2b')]};});_0x57c458[_0xfe7d('0x2c')]=_[_0xfe7d('0x27')](_0x46be89,_0xfe7d('0x25'));_0x57c458[_0xfe7d('0x2d')]=_['keys'](_0x2f80a2['query']);_0x57c458[_0xfe7d('0x2e')]=_[_0xfe7d('0x2f')](_0x57c458[_0xfe7d('0x2c')],_0x57c458[_0xfe7d('0x2d')]);_0x9dd90c[_0xfe7d('0x30')]=_['intersection'](_0x57c458[_0xfe7d('0x2c')],qs[_0xfe7d('0x31')](_0x2f80a2[_0xfe7d('0x2d')][_0xfe7d('0x31')]));_0x9dd90c[_0xfe7d('0x30')]=_0x9dd90c[_0xfe7d('0x30')]['length']?_0x9dd90c[_0xfe7d('0x30')]:_0x57c458[_0xfe7d('0x2c')];if(!_0x2f80a2[_0xfe7d('0x2d')][_0xfe7d('0x32')](_0xfe7d('0x33'))){_0x9dd90c[_0xfe7d('0x1b')]=qs[_0xfe7d('0x1b')](_0x2f80a2[_0xfe7d('0x2d')]['limit']);_0x9dd90c[_0xfe7d('0x19')]=qs['offset'](_0x2f80a2[_0xfe7d('0x2d')][_0xfe7d('0x19')]);}_0x9dd90c[_0xfe7d('0x34')]=qs['sort'](_0x2f80a2[_0xfe7d('0x2d')][_0xfe7d('0x35')]);_0x9dd90c['where']=qs[_0xfe7d('0x2e')](_[_0xfe7d('0x36')](_0x2f80a2['query'],_0x57c458[_0xfe7d('0x2e')]),_0x46be89);if(_0x2f80a2['query'][_0xfe7d('0x37')]){_0x9dd90c[_0xfe7d('0x38')]=_[_0xfe7d('0x39')](_0x9dd90c[_0xfe7d('0x38')],{'$or':_[_0xfe7d('0x27')](_0x46be89,function(_0x43302c){if(_0x43302c['type']!==_0xfe7d('0x3a')){var _0x133f55={};_0x133f55[_0x43302c['name']]={'$like':'%'+_0x2f80a2[_0xfe7d('0x2d')][_0xfe7d('0x37')]+'%'};return _0x133f55;}})});}_0x9dd90c=_[_0xfe7d('0x39')]({},_0x9dd90c,_0x2f80a2[_0xfe7d('0x3b')]);var _0x410aef={'where':_0x9dd90c[_0xfe7d('0x38')]};return db[_0xfe7d('0x28')][_0xfe7d('0x1c')](_0x410aef)[_0xfe7d('0x23')](function(_0x4b2e79){_0x595e1a['count']=_0x4b2e79;if(_0x2f80a2['query']['includeAll']){_0x9dd90c[_0xfe7d('0x3c')]=[{'all':!![]}];}return db[_0xfe7d('0x28')]['findAll'](_0x9dd90c);})[_0xfe7d('0x23')](function(_0x14ee6c){_0x595e1a['rows']=_0x14ee6c;return _0x595e1a;})[_0xfe7d('0x23')](respondWithFilteredResult(_0x505180,_0x9dd90c))['catch'](handleError(_0x505180,null));};exports[_0xfe7d('0x3d')]=function(_0x519ee9,_0x101ee9){var _0x4512dd={'raw':![],'where':{'id':_0x519ee9[_0xfe7d('0x3e')]['id']}},_0x5219aa={};_0x5219aa[_0xfe7d('0x2c')]=_[_0xfe7d('0x3f')](db[_0xfe7d('0x28')][_0xfe7d('0x29')]);_0x5219aa[_0xfe7d('0x2d')]=_['keys'](_0x519ee9[_0xfe7d('0x2d')]);_0x5219aa[_0xfe7d('0x2e')]=_['intersection'](_0x5219aa[_0xfe7d('0x2c')],_0x5219aa[_0xfe7d('0x2d')]);_0x4512dd['attributes']=_[_0xfe7d('0x2f')](_0x5219aa['model'],qs[_0xfe7d('0x31')](_0x519ee9[_0xfe7d('0x2d')][_0xfe7d('0x31')]));_0x4512dd[_0xfe7d('0x30')]=_0x4512dd[_0xfe7d('0x30')][_0xfe7d('0x40')]?_0x4512dd[_0xfe7d('0x30')]:_0x5219aa[_0xfe7d('0x2c')];if(_0x519ee9[_0xfe7d('0x2d')][_0xfe7d('0x41')]){_0x4512dd['include']=[{'all':!![]}];}_0x4512dd=_[_0xfe7d('0x39')]({},_0x4512dd,_0x519ee9[_0xfe7d('0x3b')]);return db['ServicenowAccount']['find'](_0x4512dd)[_0xfe7d('0x23')](handleEntityNotFound(_0x101ee9,null))[_0xfe7d('0x23')](respondWithResult(_0x101ee9,null))['catch'](handleError(_0x101ee9,null));};exports[_0xfe7d('0x42')]=function(_0x1732de,_0x233f45){return db[_0xfe7d('0x28')]['create'](_0x1732de['body'],{})[_0xfe7d('0x23')](respondWithResult(_0x233f45,0xc9))['catch'](handleError(_0x233f45,null));};exports['update']=function(_0xc310f1,_0x4c9c1c){if(_0xc310f1[_0xfe7d('0x43')]['id']){delete _0xc310f1[_0xfe7d('0x43')]['id'];}return db[_0xfe7d('0x28')]['find']({'where':{'id':_0xc310f1[_0xfe7d('0x3e')]['id']}})[_0xfe7d('0x23')](handleEntityNotFound(_0x4c9c1c,null))['then'](saveUpdates(_0xc310f1[_0xfe7d('0x43')],null))[_0xfe7d('0x23')](respondWithResult(_0x4c9c1c,null))[_0xfe7d('0x44')](handleError(_0x4c9c1c,null));};exports[_0xfe7d('0x24')]=function(_0x59a34a,_0x460df7){return db[_0xfe7d('0x28')][_0xfe7d('0x45')]({'where':{'id':_0x59a34a[_0xfe7d('0x3e')]['id']}})['then'](handleEntityNotFound(_0x460df7,null))[_0xfe7d('0x23')](removeEntity(_0x460df7,null))[_0xfe7d('0x44')](handleError(_0x460df7,null));};exports[_0xfe7d('0x46')]=function(_0x3672c8,_0x1902d8,_0x98d926){var _0x111261={};var _0x54038f={};var _0x4cde7a;var _0x3efb19;return db[_0xfe7d('0x28')][_0xfe7d('0x47')]({'where':{'id':_0x3672c8[_0xfe7d('0x3e')]['id']}})['then'](handleEntityNotFound(_0x1902d8,null))['then'](function(_0x3b74ae){if(_0x3b74ae){_0x4cde7a=_0x3b74ae;_0x54038f[_0xfe7d('0x2c')]=_[_0xfe7d('0x3f')](db[_0xfe7d('0x48')][_0xfe7d('0x29')]);_0x54038f[_0xfe7d('0x2d')]=_['keys'](_0x3672c8[_0xfe7d('0x2d')]);_0x54038f[_0xfe7d('0x2e')]=_['intersection'](_0x54038f[_0xfe7d('0x2c')],_0x54038f[_0xfe7d('0x2d')]);_0x111261[_0xfe7d('0x30')]=_[_0xfe7d('0x2f')](_0x54038f['model'],qs['fields'](_0x3672c8['query'][_0xfe7d('0x31')]));_0x111261['attributes']=_0x111261[_0xfe7d('0x30')][_0xfe7d('0x40')]?_0x111261[_0xfe7d('0x30')]:_0x54038f['model'];_0x111261['order']=qs[_0xfe7d('0x35')](_0x3672c8[_0xfe7d('0x2d')]['sort']);_0x111261[_0xfe7d('0x38')]=qs[_0xfe7d('0x2e')](_[_0xfe7d('0x36')](_0x3672c8[_0xfe7d('0x2d')],_0x54038f[_0xfe7d('0x2e')]));if(_0x3672c8[_0xfe7d('0x2d')][_0xfe7d('0x37')]){_0x111261['where']=_[_0xfe7d('0x39')](_0x111261[_0xfe7d('0x38')],{'$or':_[_0xfe7d('0x27')](_0x111261['attributes'],function(_0x41713a){var _0x2795e3={};_0x2795e3[_0x41713a]={'$like':'%'+_0x3672c8[_0xfe7d('0x2d')][_0xfe7d('0x37')]+'%'};return _0x2795e3;})});}_0x111261=_[_0xfe7d('0x39')]({},_0x111261,_0x3672c8['options']);return _0x4cde7a['getConfigurations'](_0x111261);}})[_0xfe7d('0x23')](function(_0x3162c7){if(_0x3162c7){_0x3efb19=_0x3162c7[_0xfe7d('0x40')];if(!_0x3672c8[_0xfe7d('0x2d')][_0xfe7d('0x32')](_0xfe7d('0x33'))){_0x111261[_0xfe7d('0x1b')]=qs[_0xfe7d('0x1b')](_0x3672c8[_0xfe7d('0x2d')][_0xfe7d('0x1b')]);_0x111261[_0xfe7d('0x19')]=qs[_0xfe7d('0x19')](_0x3672c8[_0xfe7d('0x2d')][_0xfe7d('0x19')]);}return _0x4cde7a[_0xfe7d('0x46')](_0x111261);}})[_0xfe7d('0x23')](function(_0x492919){if(_0x492919){return _0x492919?{'count':_0x3efb19,'rows':_0x492919}:null;}})[_0xfe7d('0x23')](respondWithResult(_0x1902d8,null))['catch'](handleError(_0x1902d8,null));};exports[_0xfe7d('0x49')]=function(_0x511dee,_0x150824,_0x474820){if(_0x511dee['body']['id']){delete _0x511dee[_0xfe7d('0x43')]['id'];}return db[_0xfe7d('0x28')][_0xfe7d('0x47')]({'where':{'id':_0x511dee['params']['id']}})['then'](handleEntityNotFound(_0x150824,null))['then'](function(_0x8c5e23){if(_0x8c5e23){_0x511dee[_0xfe7d('0x43')][_0xfe7d('0x4a')]=_0x8c5e23['id'];_0x511dee[_0xfe7d('0x43')]['Subjects']=integrations['getSubjects'](_0x511dee[_0xfe7d('0x43')][_0xfe7d('0x4b')],_0x511dee[_0xfe7d('0x43')][_0xfe7d('0x2a')]);_0x511dee[_0xfe7d('0x43')][_0xfe7d('0x4c')]=integrations[_0xfe7d('0x4d')](_0x511dee['body']['channel'],_0x511dee['body'][_0xfe7d('0x2a')]);return db['ServicenowConfiguration'][_0xfe7d('0x42')](_0x511dee[_0xfe7d('0x43')],{'include':[{'model':db[_0xfe7d('0x4e')],'as':_0xfe7d('0x4f')},{'model':db[_0xfe7d('0x4e')],'as':'Descriptions'}]});}return null;})[_0xfe7d('0x23')](respondWithResult(_0x150824,null))[_0xfe7d('0x44')](handleError(_0x150824,null));};exports['getFields']=function(_0x4e4127,_0x4e81e9,_0x5b58f4){var _0x47de84=[_0xfe7d('0x50'),_0xfe7d('0x51'),_0xfe7d('0x52'),_0xfe7d('0x53'),'close_code',_0xfe7d('0x54'),'incident_state',_0xfe7d('0x55'),_0xfe7d('0x56')];var _0x1fb447=[_0xfe7d('0x57'),_0xfe7d('0x50'),_0xfe7d('0x58'),_0xfe7d('0x59'),'upon_reject',_0xfe7d('0x5a'),_0xfe7d('0x5b'),_0xfe7d('0x51'),_0xfe7d('0x5c'),_0xfe7d('0x5d'),'resolved_by',_0xfe7d('0x5e'),'opened_by','user_input',_0xfe7d('0x5f'),_0xfe7d('0x60'),_0xfe7d('0x61'),_0xfe7d('0x62'),_0xfe7d('0x52'),_0xfe7d('0x34'),_0xfe7d('0x63'),_0xfe7d('0x64'),_0xfe7d('0x65'),_0xfe7d('0x66'),_0xfe7d('0x67'),'active','work_notes_list',_0xfe7d('0x68'),'priority',_0xfe7d('0x69'),_0xfe7d('0x6a'),_0xfe7d('0x6b'),_0xfe7d('0x6c'),_0xfe7d('0x6d'),_0xfe7d('0x6e'),_0xfe7d('0x6f'),'work_end',_0xfe7d('0x70'),_0xfe7d('0x71'),_0xfe7d('0x72'),_0xfe7d('0x73'),_0xfe7d('0x53'),_0xfe7d('0x74'),_0xfe7d('0x75'),'close_code',_0xfe7d('0x76'),_0xfe7d('0x77'),_0xfe7d('0x78'),_0xfe7d('0x79'),_0xfe7d('0x7a'),'additional_assignee_list','description',_0xfe7d('0x7b'),_0xfe7d('0x54'),_0xfe7d('0x7c'),_0xfe7d('0x7d'),_0xfe7d('0x7e'),_0xfe7d('0x7f'),_0xfe7d('0x80'),'sys_id',_0xfe7d('0x81'),_0xfe7d('0x82'),_0xfe7d('0x83'),'urgency',_0xfe7d('0x84'),_0xfe7d('0x85'),_0xfe7d('0x86'),_0xfe7d('0x87'),_0xfe7d('0x88'),_0xfe7d('0x55'),_0xfe7d('0x89'),_0xfe7d('0x8a'),_0xfe7d('0x8b'),'comments_and_work_notes',_0xfe7d('0x8c'),'sys_mod_count','reopen_count',_0xfe7d('0x8d'),'escalation',_0xfe7d('0x8e'),_0xfe7d('0x8f'),'location',_0xfe7d('0x56')];var _0x18d25b='';var _0x55f474='';var _0x2b5581=[];var _0x35a0d6='';var _0x285fb7='';var _0x319b92=[];var _0x4229e6='';var _0x4ade7f='';var _0x53b5cd={};var _0x3a41b4='';return db[_0xfe7d('0x28')][_0xfe7d('0x47')]({'where':{'id':_0x4e4127[_0xfe7d('0x3e')]['id']},'attributes':['id',_0xfe7d('0x90'),_0xfe7d('0x91'),_0xfe7d('0x92'),_0xfe7d('0x93'),_0xfe7d('0x94')]})[_0xfe7d('0x23')](handleEntityNotFound(_0x4e81e9,null))[_0xfe7d('0x23')](function(_0x24209b){if(_0x24209b){_0x3a41b4=_0x24209b[_0xfe7d('0x93')];var _0x3058b7=_0x3a41b4[_0xfe7d('0x95')](-0x1);if(_0x3058b7==='/'){_0x3a41b4=_0x3a41b4[_0xfe7d('0x96')](0x0,_0x3a41b4[_0xfe7d('0x97')](_0x3058b7));}_0x4ade7f=util[_0xfe7d('0x98')](_0xfe7d('0x99'),_0x3a41b4);_0x4229e6=util[_0xfe7d('0x98')](_0xfe7d('0x9a'),_0x3a41b4);_0x53b5cd={'user':_0x24209b['username'],'pass':_0x24209b[_0xfe7d('0x91')]};var _0x4e4b79={'method':_0xfe7d('0x9b'),'uri':_0x4ade7f+_0xfe7d('0x9c'),'auth':_0x53b5cd,'json':!![]};return rp(_0x4e4b79);}})[_0xfe7d('0x23')](function(_0x529824){if(_0x529824[_0xfe7d('0x9d')][_0xfe7d('0x40')]>0x0){_0x18d25b=_0x529824['result'];}console[_0xfe7d('0x9e')](_0xfe7d('0x9f'),_0x18d25b);_0x319b92=[];_0x55f474=Object[_0xfe7d('0xa0')]([],_0x18d25b);_['remove'](_0x55f474,function(_0x5bb9b0){return!_0x47de84[_0xfe7d('0xa1')](_0x5bb9b0['name']);});_0x55f474[_0xfe7d('0xa2')](function(_0x464b0a){var _0xe6127=createFieldObject(_0x4229e6,_0x53b5cd,_0x464b0a[_0xfe7d('0xa3')],_0x464b0a[_0xfe7d('0x25')],_0x464b0a['label'],![]);_0x319b92[_0xfe7d('0xa4')](_0xe6127);});return Promise[_0xfe7d('0xa5')](_0x319b92);})[_0xfe7d('0x23')](function(_0x36d3ac){_0x2b5581=_0x36d3ac;_0x35a0d6=Object['assign']([],_0x18d25b);console[_0xfe7d('0x9e')](_0xfe7d('0xa6'),_0x18d25b);_['remove'](_0x35a0d6,function(_0x4a2fc9){return _0x1fb447[_0xfe7d('0xa1')](_0x4a2fc9[_0xfe7d('0x25')]);});console[_0xfe7d('0x9e')](_0xfe7d('0xa7'),_0x35a0d6);_0x319b92=[];_0x35a0d6[_0xfe7d('0xa2')](function(_0xca88a3){var _0x15b574=createFieldObject(_0x4229e6,_0x53b5cd,_0xca88a3['internalType'],_0xca88a3[_0xfe7d('0x25')],_0xca88a3[_0xfe7d('0xa8')],!![]);_0x319b92['push'](_0x15b574);});return Promise['all'](_0x319b92);})['then'](function(_0xf8543){_0x285fb7=_0xf8543;var _0x33f733=_0x2b5581[_0xfe7d('0xa9')](_0x285fb7);return{'count':_0x33f733[_0xfe7d('0x40')],'rows':_0x33f733};})[_0xfe7d('0x23')](respondWithResult(_0x4e81e9,null))[_0xfe7d('0x44')](function(_0x4bd810){console[_0xfe7d('0x9e')](_0xfe7d('0xaa')+_0x4bd810);var _0x1b963e=_0x4e4127[_0xfe7d('0x2d')][_0xfe7d('0xab')]?0x1f4:_0x4bd810[_0xfe7d('0xac')]||0x1f4;logger['error'](_0x4bd810[_0xfe7d('0xad')]);delete _0x4bd810['name'];if(_0x1b963e===0x191){_0x1b963e=0x190;}_0x4e81e9['status'](_0x1b963e)[_0xfe7d('0xae')](_0x4e4127[_0xfe7d('0x2d')]['test']?{'message':'Wrong\x20credentials','statusCode':_0x4bd810[_0xfe7d('0xac')]}:_0x4bd810);});};function createFieldObject(_0x221190,_0x4f87ba,_0x2a34d8,_0x4c8c48,_0x23f486,_0x4f38d1){return new Promise(function(_0x32ecff,_0xd98875){var _0xd0f72a={'id':_0x4c8c48,'name':_0x23f486,'custom':_0x4f38d1};if(_0x2a34d8===_0xfe7d('0xaf')){_0xd0f72a[_0xfe7d('0x3b')]=[{'name':_0xfe7d('0xb0'),'value':_0xfe7d('0xb1')},{'name':_0xfe7d('0xb2'),'value':_0xfe7d('0xb3')}];_0x32ecff(_0xd0f72a);}else{var _0x1e7946={'method':_0xfe7d('0x9b'),'uri':_0x221190+_0xfe7d('0xb4')+_0x4c8c48,'auth':_0x4f87ba,'json':!![]};return rp(_0x1e7946)['then'](function(_0x368f85){var _0xe345a=[];if(_0x368f85[_0xfe7d('0x9d')][_0xfe7d('0x40')]>0x0){_0x368f85[_0xfe7d('0x9d')]['forEach'](function(_0x47f1d6){if(_0x47f1d6[_0xfe7d('0xb5')]===_0xfe7d('0xb3')){var _0x5cc659={'name':_0x47f1d6[_0xfe7d('0xa8')],'value':_0x47f1d6[_0xfe7d('0xb6')]};_0xe345a[_0xfe7d('0xa4')](_0x5cc659);}});}_0xd0f72a[_0xfe7d('0x3b')]=_0xe345a;if(_0xd0f72a[_0xfe7d('0x3b')][_0xfe7d('0x40')]>0x0){_0x32ecff(_0xd0f72a);}else{if(_0x4f38d1==![]){_0x32ecff();}else{_0x32ecff(_0xd0f72a);}}});}});}
\ No newline at end of file
+var _0x8690=['format','%s/api/now/doc/table/schema/','%s/api/now/table/','incident?sysparm_display_value=all','result','log','incident\x20table\x20objects','assign','remove','includes','forEach','internalType','label','push','TCL:\x20exports.getEntityFields\x20->\x20_objectsCustom','all','concat','ServiceNow\x20error:\x20','test','statusCode','Wrong\x20credentials','boolean','True','true','False','GET','sys_choice?sysparm_query=name=incident^element=','inactive','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','../../components/integrations/configuration','sendStatus','status','end','json','offset','undefined','limit','count','apply','reject','save','then','destroy','error','stack','name','send','index','map','ServicenowAccount','type','key','model','query','intersection','attributes','fields','hasOwnProperty','nolimit','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','catch','show','params','keys','rawAttributes','length','find','create','update','body','getConfigurations','addConfiguration','Subjects','channel','getDescriptions','ServicenowConfiguration','ServicenowField','getFields','made_sla','hold_reason','close_code','notify','incident_state','severity','parent','caused_by','upon_reject','sys_updated_on','child_incidents','approval_history','number','resolved_by','opened_by','user_input','sys_created_on','sys_domain','state','knowledge','order','calendar_stc','delivery_plan','active','work_notes_list','business_service','priority','sys_domain_path','time_worked','expected_start','business_duration','group_list','work_end','caller_id','approval_set','subcategory','work_notes','short_description','correlation_display','delivery_task','assignment_group','business_stc','description','calendar_duration','close_notes','closed_by','follow_up','parent_incident','sys_id','contact_type','urgency','problem_id','company','activity_due','assigned_to','comments','sla_due','approval','due_date','sys_mod_count','reopen_count','sys_tags','escalation','correlation_id','location','category','findOne','username','password','remoteUri','serverUrl','slice','substring','lastIndexOf'];(function(_0x448af8,_0x557881){var _0x201bf9=function(_0xaea341){while(--_0xaea341){_0x448af8['push'](_0x448af8['shift']());}};_0x201bf9(++_0x557881);}(_0x8690,0x192));var _0x0869=function(_0x288f5e,_0x205edd){_0x288f5e=_0x288f5e-0x0;var _0x476cc9=_0x8690[_0x288f5e];return _0x476cc9;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x0869('0x0'));var zipdir=require(_0x0869('0x1'));var jsonpatch=require(_0x0869('0x2'));var rp=require(_0x0869('0x3'));var moment=require(_0x0869('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x0869('0x5'));var util=require(_0x0869('0x6'));var path=require(_0x0869('0x7'));var sox=require(_0x0869('0x8'));var csv=require(_0x0869('0x9'));var ejs=require(_0x0869('0xa'));var fs=require('fs');var fs_extra=require(_0x0869('0xb'));var _=require(_0x0869('0xc'));var squel=require('squel');var crypto=require(_0x0869('0xd'));var jsforce=require(_0x0869('0xe'));var deskjs=require(_0x0869('0xf'));var toCsv=require(_0x0869('0x9'));var querystring=require(_0x0869('0x10'));var Papa=require(_0x0869('0x11'));var Redis=require(_0x0869('0x12'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x0869('0x13'));var hardwareService=require(_0x0869('0x14'));var logger=require(_0x0869('0x15'))(_0x0869('0x16'));var utils=require(_0x0869('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0x0869('0x18'));var db=require(_0x0869('0x19'))['db'];var integrations=require(_0x0869('0x1a'));function respondWithStatusCode(_0x24c5d3,_0x46ff6b){_0x46ff6b=_0x46ff6b||0xcc;return function(_0x33c0e1){if(_0x33c0e1){return _0x24c5d3[_0x0869('0x1b')](_0x46ff6b);}return _0x24c5d3[_0x0869('0x1c')](_0x46ff6b)[_0x0869('0x1d')]();};}function respondWithResult(_0x44f41a,_0x25d87f){_0x25d87f=_0x25d87f||0xc8;return function(_0x30b4cb){if(_0x30b4cb){return _0x44f41a[_0x0869('0x1c')](_0x25d87f)[_0x0869('0x1e')](_0x30b4cb);}};}function respondWithFilteredResult(_0x227dee,_0x4b4faa){return function(_0x4a3fbc){if(_0x4a3fbc){var _0x1b7766=typeof _0x4b4faa[_0x0869('0x1f')]===_0x0869('0x20')&&typeof _0x4b4faa[_0x0869('0x21')]==='undefined';var _0x836340=_0x4a3fbc[_0x0869('0x22')];var _0x248112=_0x1b7766?0x0:_0x4b4faa[_0x0869('0x1f')];var _0x10594a=_0x1b7766?_0x4a3fbc[_0x0869('0x22')]:_0x4b4faa[_0x0869('0x1f')]+_0x4b4faa[_0x0869('0x21')];var _0x492b31;if(_0x10594a>=_0x836340){_0x10594a=_0x836340;_0x492b31=0xc8;}else{_0x492b31=0xce;}_0x227dee[_0x0869('0x1c')](_0x492b31);return _0x227dee['set']('Content-Range',_0x248112+'-'+_0x10594a+'/'+_0x836340)['json'](_0x4a3fbc);}return null;};}function patchUpdates(_0x347948){return function(_0x5cbae9){try{jsonpatch[_0x0869('0x23')](_0x5cbae9,_0x347948,!![]);}catch(_0x19758e){return BPromise[_0x0869('0x24')](_0x19758e);}return _0x5cbae9[_0x0869('0x25')]();};}function saveUpdates(_0x1fdc51,_0x4e7f9b){return function(_0x27602e){if(_0x27602e){return _0x27602e['update'](_0x1fdc51)[_0x0869('0x26')](function(_0x1654bd){return _0x1654bd;});}return null;};}function removeEntity(_0x5152e6,_0x5ab088){return function(_0x478875){if(_0x478875){return _0x478875[_0x0869('0x27')]()['then'](function(){_0x5152e6[_0x0869('0x1c')](0xcc)[_0x0869('0x1d')]();});}};}function handleEntityNotFound(_0x541687,_0x4d5816){return function(_0x3a9f4e){if(!_0x3a9f4e){_0x541687[_0x0869('0x1b')](0x194);}return _0x3a9f4e;};}function handleError(_0x2ef7ba,_0x551983){_0x551983=_0x551983||0x1f4;return function(_0x347407){logger[_0x0869('0x28')](_0x347407[_0x0869('0x29')]);if(_0x347407['name']){delete _0x347407[_0x0869('0x2a')];}_0x2ef7ba[_0x0869('0x1c')](_0x551983)[_0x0869('0x2b')](_0x347407);};}exports[_0x0869('0x2c')]=function(_0x200f60,_0x556e10){var _0x3f83f7={},_0x17c346={},_0x53031a={'count':0x0,'rows':[]};var _0x2d9a7b=_[_0x0869('0x2d')](db[_0x0869('0x2e')]['rawAttributes'],function(_0x2ec900){return{'name':_0x2ec900['fieldName'],'type':_0x2ec900[_0x0869('0x2f')][_0x0869('0x30')]};});_0x17c346[_0x0869('0x31')]=_[_0x0869('0x2d')](_0x2d9a7b,_0x0869('0x2a'));_0x17c346[_0x0869('0x32')]=_['keys'](_0x200f60[_0x0869('0x32')]);_0x17c346['filters']=_[_0x0869('0x33')](_0x17c346['model'],_0x17c346['query']);_0x3f83f7[_0x0869('0x34')]=_[_0x0869('0x33')](_0x17c346[_0x0869('0x31')],qs['fields'](_0x200f60['query'][_0x0869('0x35')]));_0x3f83f7[_0x0869('0x34')]=_0x3f83f7[_0x0869('0x34')]['length']?_0x3f83f7['attributes']:_0x17c346['model'];if(!_0x200f60['query'][_0x0869('0x36')](_0x0869('0x37'))){_0x3f83f7[_0x0869('0x21')]=qs[_0x0869('0x21')](_0x200f60['query'][_0x0869('0x21')]);_0x3f83f7[_0x0869('0x1f')]=qs[_0x0869('0x1f')](_0x200f60['query'][_0x0869('0x1f')]);}_0x3f83f7['order']=qs[_0x0869('0x38')](_0x200f60[_0x0869('0x32')][_0x0869('0x38')]);_0x3f83f7[_0x0869('0x39')]=qs[_0x0869('0x3a')](_[_0x0869('0x3b')](_0x200f60[_0x0869('0x32')],_0x17c346['filters']),_0x2d9a7b);if(_0x200f60[_0x0869('0x32')][_0x0869('0x3c')]){_0x3f83f7[_0x0869('0x39')]=_[_0x0869('0x3d')](_0x3f83f7['where'],{'$or':_['map'](_0x2d9a7b,function(_0x1b48bc){if(_0x1b48bc[_0x0869('0x2f')]!==_0x0869('0x3e')){var _0x30347a={};_0x30347a[_0x1b48bc[_0x0869('0x2a')]]={'$like':'%'+_0x200f60[_0x0869('0x32')]['filter']+'%'};return _0x30347a;}})});}_0x3f83f7=_[_0x0869('0x3d')]({},_0x3f83f7,_0x200f60[_0x0869('0x3f')]);var _0x1d25c7={'where':_0x3f83f7[_0x0869('0x39')]};return db[_0x0869('0x2e')][_0x0869('0x22')](_0x1d25c7)['then'](function(_0x1a6602){_0x53031a['count']=_0x1a6602;if(_0x200f60[_0x0869('0x32')][_0x0869('0x40')]){_0x3f83f7[_0x0869('0x41')]=[{'all':!![]}];}return db[_0x0869('0x2e')][_0x0869('0x42')](_0x3f83f7);})[_0x0869('0x26')](function(_0x257d92){_0x53031a['rows']=_0x257d92;return _0x53031a;})[_0x0869('0x26')](respondWithFilteredResult(_0x556e10,_0x3f83f7))[_0x0869('0x43')](handleError(_0x556e10,null));};exports[_0x0869('0x44')]=function(_0x9e227a,_0x1a484a){var _0x410244={'raw':![],'where':{'id':_0x9e227a[_0x0869('0x45')]['id']}},_0x5961cf={};_0x5961cf[_0x0869('0x31')]=_[_0x0869('0x46')](db[_0x0869('0x2e')][_0x0869('0x47')]);_0x5961cf[_0x0869('0x32')]=_[_0x0869('0x46')](_0x9e227a[_0x0869('0x32')]);_0x5961cf['filters']=_[_0x0869('0x33')](_0x5961cf['model'],_0x5961cf[_0x0869('0x32')]);_0x410244[_0x0869('0x34')]=_[_0x0869('0x33')](_0x5961cf[_0x0869('0x31')],qs[_0x0869('0x35')](_0x9e227a['query'][_0x0869('0x35')]));_0x410244[_0x0869('0x34')]=_0x410244[_0x0869('0x34')][_0x0869('0x48')]?_0x410244[_0x0869('0x34')]:_0x5961cf[_0x0869('0x31')];if(_0x9e227a[_0x0869('0x32')][_0x0869('0x40')]){_0x410244[_0x0869('0x41')]=[{'all':!![]}];}_0x410244=_['merge']({},_0x410244,_0x9e227a['options']);return db[_0x0869('0x2e')][_0x0869('0x49')](_0x410244)[_0x0869('0x26')](handleEntityNotFound(_0x1a484a,null))[_0x0869('0x26')](respondWithResult(_0x1a484a,null))[_0x0869('0x43')](handleError(_0x1a484a,null));};exports[_0x0869('0x4a')]=function(_0x26f0fe,_0x1d952f){return db[_0x0869('0x2e')][_0x0869('0x4a')](_0x26f0fe['body'],{})[_0x0869('0x26')](respondWithResult(_0x1d952f,0xc9))[_0x0869('0x43')](handleError(_0x1d952f,null));};exports[_0x0869('0x4b')]=function(_0xc2a6d6,_0x45d573){if(_0xc2a6d6[_0x0869('0x4c')]['id']){delete _0xc2a6d6[_0x0869('0x4c')]['id'];}return db[_0x0869('0x2e')][_0x0869('0x49')]({'where':{'id':_0xc2a6d6[_0x0869('0x45')]['id']}})[_0x0869('0x26')](handleEntityNotFound(_0x45d573,null))['then'](saveUpdates(_0xc2a6d6[_0x0869('0x4c')],null))[_0x0869('0x26')](respondWithResult(_0x45d573,null))[_0x0869('0x43')](handleError(_0x45d573,null));};exports[_0x0869('0x27')]=function(_0x4dbfc3,_0x58e92c){return db[_0x0869('0x2e')][_0x0869('0x49')]({'where':{'id':_0x4dbfc3[_0x0869('0x45')]['id']}})[_0x0869('0x26')](handleEntityNotFound(_0x58e92c,null))[_0x0869('0x26')](removeEntity(_0x58e92c,null))['catch'](handleError(_0x58e92c,null));};exports[_0x0869('0x4d')]=function(_0x4ce5a5,_0x3c8029,_0x1565ab){var _0x2da3e3={};var _0x7d97a2={};var _0x59e6ab;var _0x3ff16e;return db[_0x0869('0x2e')]['findOne']({'where':{'id':_0x4ce5a5[_0x0869('0x45')]['id']}})[_0x0869('0x26')](handleEntityNotFound(_0x3c8029,null))['then'](function(_0x157bfb){if(_0x157bfb){_0x59e6ab=_0x157bfb;_0x7d97a2[_0x0869('0x31')]=_['keys'](db['ServicenowConfiguration'][_0x0869('0x47')]);_0x7d97a2[_0x0869('0x32')]=_[_0x0869('0x46')](_0x4ce5a5[_0x0869('0x32')]);_0x7d97a2[_0x0869('0x3a')]=_[_0x0869('0x33')](_0x7d97a2[_0x0869('0x31')],_0x7d97a2[_0x0869('0x32')]);_0x2da3e3['attributes']=_['intersection'](_0x7d97a2[_0x0869('0x31')],qs[_0x0869('0x35')](_0x4ce5a5[_0x0869('0x32')][_0x0869('0x35')]));_0x2da3e3[_0x0869('0x34')]=_0x2da3e3[_0x0869('0x34')][_0x0869('0x48')]?_0x2da3e3[_0x0869('0x34')]:_0x7d97a2[_0x0869('0x31')];_0x2da3e3['order']=qs['sort'](_0x4ce5a5[_0x0869('0x32')]['sort']);_0x2da3e3[_0x0869('0x39')]=qs['filters'](_['pick'](_0x4ce5a5[_0x0869('0x32')],_0x7d97a2[_0x0869('0x3a')]));if(_0x4ce5a5['query'][_0x0869('0x3c')]){_0x2da3e3[_0x0869('0x39')]=_['merge'](_0x2da3e3[_0x0869('0x39')],{'$or':_[_0x0869('0x2d')](_0x2da3e3[_0x0869('0x34')],function(_0x165f4f){var _0x2b1d26={};_0x2b1d26[_0x165f4f]={'$like':'%'+_0x4ce5a5[_0x0869('0x32')][_0x0869('0x3c')]+'%'};return _0x2b1d26;})});}_0x2da3e3=_[_0x0869('0x3d')]({},_0x2da3e3,_0x4ce5a5['options']);return _0x59e6ab['getConfigurations'](_0x2da3e3);}})[_0x0869('0x26')](function(_0x4243c0){if(_0x4243c0){_0x3ff16e=_0x4243c0[_0x0869('0x48')];if(!_0x4ce5a5[_0x0869('0x32')][_0x0869('0x36')]('nolimit')){_0x2da3e3['limit']=qs[_0x0869('0x21')](_0x4ce5a5['query']['limit']);_0x2da3e3[_0x0869('0x1f')]=qs[_0x0869('0x1f')](_0x4ce5a5[_0x0869('0x32')][_0x0869('0x1f')]);}return _0x59e6ab['getConfigurations'](_0x2da3e3);}})[_0x0869('0x26')](function(_0x538b6b){if(_0x538b6b){return _0x538b6b?{'count':_0x3ff16e,'rows':_0x538b6b}:null;}})[_0x0869('0x26')](respondWithResult(_0x3c8029,null))[_0x0869('0x43')](handleError(_0x3c8029,null));};exports[_0x0869('0x4e')]=function(_0x448309,_0x4a7e31,_0x26e426){if(_0x448309['body']['id']){delete _0x448309['body']['id'];}return db[_0x0869('0x2e')]['findOne']({'where':{'id':_0x448309[_0x0869('0x45')]['id']}})['then'](handleEntityNotFound(_0x4a7e31,null))[_0x0869('0x26')](function(_0x502b01){if(_0x502b01){_0x448309[_0x0869('0x4c')]['AccountId']=_0x502b01['id'];_0x448309[_0x0869('0x4c')][_0x0869('0x4f')]=integrations['getSubjects'](_0x448309[_0x0869('0x4c')][_0x0869('0x50')],_0x448309['body'][_0x0869('0x2f')]);_0x448309[_0x0869('0x4c')]['Descriptions']=integrations[_0x0869('0x51')](_0x448309[_0x0869('0x4c')]['channel'],_0x448309['body'][_0x0869('0x2f')]);return db[_0x0869('0x52')][_0x0869('0x4a')](_0x448309[_0x0869('0x4c')],{'include':[{'model':db[_0x0869('0x53')],'as':_0x0869('0x4f')},{'model':db[_0x0869('0x53')],'as':'Descriptions'}]});}return null;})[_0x0869('0x26')](respondWithResult(_0x4a7e31,null))['catch'](handleError(_0x4a7e31,null));};exports[_0x0869('0x54')]=function(_0x425471,_0x1e15c5,_0x2aca1e){var _0x42cb91=[_0x0869('0x55'),_0x0869('0x56'),'knowledge','subcategory',_0x0869('0x57'),_0x0869('0x58'),_0x0869('0x59'),_0x0869('0x5a'),'category'];var _0x5bf811=[_0x0869('0x5b'),_0x0869('0x55'),_0x0869('0x5c'),'watch_list',_0x0869('0x5d'),_0x0869('0x5e'),_0x0869('0x5f'),_0x0869('0x56'),_0x0869('0x60'),_0x0869('0x61'),_0x0869('0x62'),'sys_updated_by',_0x0869('0x63'),_0x0869('0x64'),_0x0869('0x65'),_0x0869('0x66'),_0x0869('0x67'),'sys_created_by',_0x0869('0x68'),_0x0869('0x69'),_0x0869('0x6a'),'closed_at','cmdb_ci',_0x0869('0x6b'),'impact',_0x0869('0x6c'),_0x0869('0x6d'),_0x0869('0x6e'),_0x0869('0x6f'),_0x0869('0x70'),'rfc',_0x0869('0x71'),_0x0869('0x72'),'opened_at',_0x0869('0x73'),_0x0869('0x74'),_0x0869('0x75'),'reopened_time','resolved_at',_0x0869('0x76'),_0x0869('0x77'),_0x0869('0x78'),_0x0869('0x79'),_0x0869('0x7a'),_0x0869('0x57'),_0x0869('0x7b'),_0x0869('0x7c'),'work_start',_0x0869('0x7d'),_0x0869('0x7e'),'additional_assignee_list',_0x0869('0x7f'),_0x0869('0x80'),_0x0869('0x58'),'sys_class_name',_0x0869('0x81'),_0x0869('0x82'),_0x0869('0x83'),_0x0869('0x84'),_0x0869('0x85'),_0x0869('0x86'),'reopened_by',_0x0869('0x59'),_0x0869('0x87'),_0x0869('0x88'),_0x0869('0x89'),'reassignment_count',_0x0869('0x8a'),_0x0869('0x8b'),'severity',_0x0869('0x8c'),_0x0869('0x8d'),_0x0869('0x8e'),'comments_and_work_notes',_0x0869('0x8f'),_0x0869('0x90'),_0x0869('0x91'),_0x0869('0x92'),_0x0869('0x93'),'upon_approval',_0x0869('0x94'),_0x0869('0x95'),_0x0869('0x96')];var _0x133814='';var _0x2bc757='';var _0x2fa638=[];var _0x31cabd='';var _0x4263bf='';var _0x12476b=[];var _0x3dd76c='';var _0x5619cb='';var _0x52d432={};var _0x440898='';return db[_0x0869('0x2e')][_0x0869('0x97')]({'where':{'id':_0x425471[_0x0869('0x45')]['id']},'attributes':['id',_0x0869('0x98'),_0x0869('0x99'),'email',_0x0869('0x9a'),_0x0869('0x9b')]})['then'](handleEntityNotFound(_0x1e15c5,null))[_0x0869('0x26')](function(_0x3a3d56){if(_0x3a3d56){_0x440898=_0x3a3d56[_0x0869('0x9a')];var _0x507231=_0x440898[_0x0869('0x9c')](-0x1);if(_0x507231==='/'){_0x440898=_0x440898[_0x0869('0x9d')](0x0,_0x440898[_0x0869('0x9e')](_0x507231));}_0x5619cb=util[_0x0869('0x9f')](_0x0869('0xa0'),_0x440898);_0x3dd76c=util[_0x0869('0x9f')](_0x0869('0xa1'),_0x440898);_0x52d432={'user':_0x3a3d56[_0x0869('0x98')],'pass':_0x3a3d56[_0x0869('0x99')]};var _0x249e0e={'method':'GET','uri':_0x5619cb+_0x0869('0xa2'),'auth':_0x52d432,'json':!![]};return rp(_0x249e0e);}})[_0x0869('0x26')](function(_0x45c428){if(_0x45c428['result'][_0x0869('0x48')]>0x0){_0x133814=_0x45c428[_0x0869('0xa3')];}console[_0x0869('0xa4')](_0x0869('0xa5'),_0x133814);_0x12476b=[];_0x2bc757=Object[_0x0869('0xa6')]([],_0x133814);_[_0x0869('0xa7')](_0x2bc757,function(_0x6f25d9){return!_0x42cb91[_0x0869('0xa8')](_0x6f25d9[_0x0869('0x2a')]);});_0x2bc757[_0x0869('0xa9')](function(_0x1f915f){var _0x1e7b51=createFieldObject(_0x3dd76c,_0x52d432,_0x1f915f[_0x0869('0xaa')],_0x1f915f[_0x0869('0x2a')],_0x1f915f[_0x0869('0xab')],![]);_0x12476b[_0x0869('0xac')](_0x1e7b51);});return Promise['all'](_0x12476b);})[_0x0869('0x26')](function(_0x2f9362){_0x2fa638=_0x2f9362;_0x31cabd=Object['assign']([],_0x133814);console['log']('TCL:\x20_object',_0x133814);_[_0x0869('0xa7')](_0x31cabd,function(_0x5632f2){return _0x5bf811[_0x0869('0xa8')](_0x5632f2[_0x0869('0x2a')]);});console[_0x0869('0xa4')](_0x0869('0xad'),_0x31cabd);_0x12476b=[];_0x31cabd[_0x0869('0xa9')](function(_0x395909){var _0x1b4a12=createFieldObject(_0x3dd76c,_0x52d432,_0x395909[_0x0869('0xaa')],_0x395909[_0x0869('0x2a')],_0x395909[_0x0869('0xab')],!![]);_0x12476b[_0x0869('0xac')](_0x1b4a12);});return Promise[_0x0869('0xae')](_0x12476b);})[_0x0869('0x26')](function(_0x3fb2f0){_0x4263bf=_0x3fb2f0;var _0x51e151=_0x2fa638[_0x0869('0xaf')](_0x4263bf);return{'count':_0x51e151[_0x0869('0x48')],'rows':_0x51e151};})['then'](respondWithResult(_0x1e15c5,null))[_0x0869('0x43')](function(_0x433c3e){console['log'](_0x0869('0xb0')+_0x433c3e);var _0x5c7efb=_0x425471['query'][_0x0869('0xb1')]?0x1f4:_0x433c3e[_0x0869('0xb2')]||0x1f4;logger[_0x0869('0x28')](_0x433c3e[_0x0869('0x29')]);delete _0x433c3e[_0x0869('0x2a')];if(_0x5c7efb===0x191){_0x5c7efb=0x190;}_0x1e15c5[_0x0869('0x1c')](_0x5c7efb)[_0x0869('0x2b')](_0x425471[_0x0869('0x32')]['test']?{'message':_0x0869('0xb3'),'statusCode':_0x433c3e['statusCode']}:_0x433c3e);});};function createFieldObject(_0x3c2834,_0x154f8d,_0x47d623,_0x9e435d,_0x58c8d4,_0x3265da){return new Promise(function(_0x2dd198,_0x14914a){var _0x2951e1={'id':_0x9e435d,'name':_0x58c8d4,'custom':_0x3265da};if(_0x47d623===_0x0869('0xb4')){_0x2951e1['options']=[{'name':_0x0869('0xb5'),'value':_0x0869('0xb6')},{'name':_0x0869('0xb7'),'value':'false'}];_0x2dd198(_0x2951e1);}else{var _0x44f376={'method':_0x0869('0xb8'),'uri':_0x3c2834+_0x0869('0xb9')+_0x9e435d,'auth':_0x154f8d,'json':!![]};return rp(_0x44f376)['then'](function(_0xe7d077){var _0x2ca167=[];if(_0xe7d077[_0x0869('0xa3')][_0x0869('0x48')]>0x0){_0xe7d077[_0x0869('0xa3')]['forEach'](function(_0x188f8d){if(_0x188f8d[_0x0869('0xba')]==='false'){var _0x5cefd6={'name':_0x188f8d[_0x0869('0xab')],'value':_0x188f8d['value']};_0x2ca167[_0x0869('0xac')](_0x5cefd6);}});}_0x2951e1['options']=_0x2ca167;if(_0x2951e1[_0x0869('0x3f')][_0x0869('0x48')]>0x0){_0x2dd198(_0x2951e1);}else{if(_0x3265da==![]){_0x2dd198();}else{_0x2dd198(_0x2951e1);}}});}});}
\ No newline at end of file
index a39ae57..669458c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x187d=['exports','define','ServicenowAccount','int_servicenow_accounts','lodash','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./intServicenowAccount.attributes'];(function(_0x54de5d,_0x1f8b26){var _0x1b349e=function(_0xe199cc){while(--_0xe199cc){_0x54de5d['push'](_0x54de5d['shift']());}};_0x1b349e(++_0x1f8b26);}(_0x187d,0x93));var _0xd187=function(_0x138f59,_0x1b53fb){_0x138f59=_0x138f59-0x0;var _0x3d114d=_0x187d[_0x138f59];return _0x3d114d;};'use strict';var _=require(_0xd187('0x0'));var util=require('util');var logger=require(_0xd187('0x1'))(_0xd187('0x2'));var moment=require(_0xd187('0x3'));var BPromise=require(_0xd187('0x4'));var rp=require(_0xd187('0x5'));var fs=require('fs');var path=require(_0xd187('0x6'));var rimraf=require('rimraf');var config=require(_0xd187('0x7'));var attributes=require(_0xd187('0x8'));var integrations=require('../../components/integrations/configuration');module[_0xd187('0x9')]=function(_0x58ee7,_0x444a60){return _0x58ee7[_0xd187('0xa')](_0xd187('0xb'),attributes,{'tableName':_0xd187('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xd8fb=['../../components/integrations/configuration','define','int_servicenow_accounts','lodash','util','../../config/logger','api','path','rimraf','./intServicenowAccount.attributes'];(function(_0x7850cd,_0x2a7577){var _0x9f319a=function(_0x3230a3){while(--_0x3230a3){_0x7850cd['push'](_0x7850cd['shift']());}};_0x9f319a(++_0x2a7577);}(_0xd8fb,0x99));var _0xbd8f=function(_0xdec56c,_0x38e3f9){_0xdec56c=_0xdec56c-0x0;var _0x29d25a=_0xd8fb[_0xdec56c];return _0x29d25a;};'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'));var integrations=require(_0xbd8f('0x7'));module['exports']=function(_0x33d541,_0x4e97cf){return _0x33d541[_0xbd8f('0x8')]('ServicenowAccount',attributes,{'tableName':_0xbd8f('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 6f73cd1..36e7435 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1c82=['moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','ServicenowAccount,\x20%s,\x20%s','request\x20sent','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','ServicenowAccount','findAll','options','raw','where','attributes','limit','include','map','model','GetServicenowAccount','ShowServicenowAccount','find','lodash','util'];(function(_0x219b84,_0x2442db){var _0x117b91=function(_0x4786f4){while(--_0x4786f4){_0x219b84['push'](_0x219b84['shift']());}};_0x117b91(++_0x2442db);}(_0x1c82,0x154));var _0x21c8=function(_0x409476,_0x483b4c){_0x409476=_0x409476-0x0;var _0x1b94ca=_0x1c82[_0x409476];return _0x1b94ca;};'use strict';var _=require(_0x21c8('0x0'));var util=require(_0x21c8('0x1'));var moment=require(_0x21c8('0x2'));var BPromise=require('bluebird');var rs=require(_0x21c8('0x3'));var fs=require('fs');var Redis=require(_0x21c8('0x4'));var db=require(_0x21c8('0x5'))['db'];var utils=require(_0x21c8('0x6'));var logger=require('../../config/logger')(_0x21c8('0x7'));var config=require(_0x21c8('0x8'));var jayson=require(_0x21c8('0x9'));var client=jayson[_0x21c8('0xa')][_0x21c8('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x54e811,_0x3fe026,_0x2073a4){return new BPromise(function(_0x351fa7,_0x7127e0){return client[_0x21c8('0xc')](_0x54e811,_0x2073a4)[_0x21c8('0xd')](function(_0x2c2485){logger[_0x21c8('0xe')](_0x21c8('0xf'),_0x3fe026,_0x21c8('0x10'));logger[_0x21c8('0x11')](_0x21c8('0x12'),_0x3fe026,_0x21c8('0x10'),JSON[_0x21c8('0x13')](_0x2c2485));if(_0x2c2485[_0x21c8('0x14')]){if(_0x2c2485[_0x21c8('0x14')][_0x21c8('0x15')]===0x1f4){logger[_0x21c8('0x14')](_0x21c8('0xf'),_0x3fe026,_0x2c2485[_0x21c8('0x14')][_0x21c8('0x16')]);return _0x7127e0(_0x2c2485[_0x21c8('0x14')][_0x21c8('0x16')]);}logger[_0x21c8('0x14')](_0x21c8('0xf'),_0x3fe026,_0x2c2485[_0x21c8('0x14')]['message']);return _0x351fa7(_0x2c2485['error'][_0x21c8('0x16')]);}else{logger['info'](_0x21c8('0xf'),_0x3fe026,'request\x20sent');_0x351fa7(_0x2c2485[_0x21c8('0x17')]['message']);}})[_0x21c8('0x18')](function(_0x1b3aa9){logger[_0x21c8('0x14')](_0x21c8('0xf'),_0x3fe026,_0x1b3aa9);_0x7127e0(_0x1b3aa9);});});}exports['GetServicenowAccount']=function(_0x481cf3){var _0x31fd22=this;return new Promise(function(_0x2c0736,_0x22c902){return db[_0x21c8('0x19')][_0x21c8('0x1a')]({'raw':_0x481cf3['options']?_0x481cf3[_0x21c8('0x1b')][_0x21c8('0x1c')]===undefined?!![]:![]:!![],'where':_0x481cf3[_0x21c8('0x1b')]?_0x481cf3[_0x21c8('0x1b')][_0x21c8('0x1d')]||null:null,'attributes':_0x481cf3[_0x21c8('0x1b')]?_0x481cf3[_0x21c8('0x1b')][_0x21c8('0x1e')]||null:null,'limit':_0x481cf3['options']?_0x481cf3[_0x21c8('0x1b')][_0x21c8('0x1f')]||null:null,'include':_0x481cf3[_0x21c8('0x1b')]?_0x481cf3[_0x21c8('0x1b')][_0x21c8('0x20')]?_['map'](_0x481cf3[_0x21c8('0x1b')]['include'],function(_0x2f4b05){return{'model':db[_0x2f4b05['model']],'as':_0x2f4b05['as'],'attributes':_0x2f4b05[_0x21c8('0x1e')],'include':_0x2f4b05[_0x21c8('0x20')]?_[_0x21c8('0x21')](_0x2f4b05['include'],function(_0x1ede2a){return{'model':db[_0x1ede2a[_0x21c8('0x22')]],'as':_0x1ede2a['as'],'attributes':_0x1ede2a['attributes'],'include':_0x1ede2a[_0x21c8('0x20')]?_[_0x21c8('0x21')](_0x1ede2a[_0x21c8('0x20')],function(_0x1819d7){return{'model':db[_0x1819d7['model']],'as':_0x1819d7['as'],'attributes':_0x1819d7[_0x21c8('0x1e')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x3640db){logger[_0x21c8('0xe')](_0x21c8('0x23'),_0x481cf3);logger[_0x21c8('0x11')](_0x21c8('0x23'),_0x481cf3,JSON[_0x21c8('0x13')](_0x3640db));_0x2c0736(_0x3640db);})[_0x21c8('0x18')](function(_0x5a01e8){logger[_0x21c8('0x14')](_0x21c8('0x23'),_0x5a01e8['message'],_0x481cf3);_0x22c902(_0x31fd22[_0x21c8('0x14')](0x1f4,_0x5a01e8[_0x21c8('0x16')]));});});};exports[_0x21c8('0x24')]=function(_0x2622c9){var _0x5c0989=this;return new Promise(function(_0x57ca95,_0x7c79fd){return db[_0x21c8('0x19')][_0x21c8('0x25')]({'raw':_0x2622c9[_0x21c8('0x1b')]?_0x2622c9['options'][_0x21c8('0x1c')]===undefined?!![]:![]:!![],'where':_0x2622c9[_0x21c8('0x1b')]?_0x2622c9['options'][_0x21c8('0x1d')]||null:null,'attributes':_0x2622c9[_0x21c8('0x1b')]?_0x2622c9['options'][_0x21c8('0x1e')]||null:null,'include':_0x2622c9[_0x21c8('0x1b')]?_0x2622c9[_0x21c8('0x1b')][_0x21c8('0x20')]?_['map'](_0x2622c9[_0x21c8('0x1b')]['include'],function(_0x114a3f){return{'model':db[_0x114a3f['model']],'as':_0x114a3f['as'],'attributes':_0x114a3f[_0x21c8('0x1e')],'include':_0x114a3f[_0x21c8('0x20')]?_[_0x21c8('0x21')](_0x114a3f[_0x21c8('0x20')],function(_0x1fc929){return{'model':db[_0x1fc929[_0x21c8('0x22')]],'as':_0x1fc929['as'],'attributes':_0x1fc929[_0x21c8('0x1e')],'include':_0x1fc929[_0x21c8('0x20')]?_[_0x21c8('0x21')](_0x1fc929['include'],function(_0x1d8546){return{'model':db[_0x1d8546[_0x21c8('0x22')]],'as':_0x1d8546['as'],'attributes':_0x1d8546[_0x21c8('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x21c8('0xd')](function(_0x2563ec){logger[_0x21c8('0xe')](_0x21c8('0x24'),_0x2622c9);logger['debug']('ShowServicenowAccount',_0x2622c9,JSON[_0x21c8('0x13')](_0x2563ec));_0x57ca95(_0x2563ec);})['catch'](function(_0x1b1b2e){logger[_0x21c8('0x14')]('ShowServicenowAccount',_0x1b1b2e[_0x21c8('0x16')],_0x2622c9);_0x7c79fd(_0x5c0989[_0x21c8('0x14')](0x1f4,_0x1b1b2e['message']));});});};
\ No newline at end of file
+var _0x4eb4=['request\x20sent','ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','ServicenowAccount,\x20%s,\x20%s','catch','findAll','options','raw','where','attributes','include','map','model','then','debug','GetServicenowAccount','ShowServicenowAccount','find','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','client','http','request','info'];(function(_0x54daa5,_0x222a44){var _0x3cea80=function(_0x22a673){while(--_0x22a673){_0x54daa5['push'](_0x54daa5['shift']());}};_0x3cea80(++_0x222a44);}(_0x4eb4,0x1a1));var _0x44eb=function(_0x3054be,_0x1bdc8b){_0x3054be=_0x3054be-0x0;var _0x3df150=_0x4eb4[_0x3054be];return _0x3df150;};'use strict';var _=require(_0x44eb('0x0'));var util=require(_0x44eb('0x1'));var moment=require('moment');var BPromise=require(_0x44eb('0x2'));var rs=require(_0x44eb('0x3'));var fs=require('fs');var Redis=require(_0x44eb('0x4'));var db=require(_0x44eb('0x5'))['db'];var utils=require(_0x44eb('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x44eb('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x44eb('0x8')][_0x44eb('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x57ac01,_0x397f6d,_0x52c5c8){return new BPromise(function(_0x49ca41,_0x5ede8d){return client[_0x44eb('0xa')](_0x57ac01,_0x52c5c8)['then'](function(_0x3a94d0){logger[_0x44eb('0xb')]('ServicenowAccount,\x20%s,\x20%s',_0x397f6d,_0x44eb('0xc'));logger['debug'](_0x44eb('0xd'),_0x397f6d,_0x44eb('0xc'),JSON[_0x44eb('0xe')](_0x3a94d0));if(_0x3a94d0[_0x44eb('0xf')]){if(_0x3a94d0['error'][_0x44eb('0x10')]===0x1f4){logger[_0x44eb('0xf')]('ServicenowAccount,\x20%s,\x20%s',_0x397f6d,_0x3a94d0[_0x44eb('0xf')][_0x44eb('0x11')]);return _0x5ede8d(_0x3a94d0[_0x44eb('0xf')][_0x44eb('0x11')]);}logger[_0x44eb('0xf')](_0x44eb('0x12'),_0x397f6d,_0x3a94d0[_0x44eb('0xf')]['message']);return _0x49ca41(_0x3a94d0['error'][_0x44eb('0x11')]);}else{logger[_0x44eb('0xb')](_0x44eb('0x12'),_0x397f6d,_0x44eb('0xc'));_0x49ca41(_0x3a94d0['result']['message']);}})[_0x44eb('0x13')](function(_0x3a1823){logger[_0x44eb('0xf')](_0x44eb('0x12'),_0x397f6d,_0x3a1823);_0x5ede8d(_0x3a1823);});});}exports['GetServicenowAccount']=function(_0x5c30a9){var _0x4dab08=this;return new Promise(function(_0x2773bc,_0x500085){return db['ServicenowAccount'][_0x44eb('0x14')]({'raw':_0x5c30a9[_0x44eb('0x15')]?_0x5c30a9[_0x44eb('0x15')][_0x44eb('0x16')]===undefined?!![]:![]:!![],'where':_0x5c30a9[_0x44eb('0x15')]?_0x5c30a9[_0x44eb('0x15')][_0x44eb('0x17')]||null:null,'attributes':_0x5c30a9['options']?_0x5c30a9['options'][_0x44eb('0x18')]||null:null,'limit':_0x5c30a9['options']?_0x5c30a9[_0x44eb('0x15')]['limit']||null:null,'include':_0x5c30a9[_0x44eb('0x15')]?_0x5c30a9[_0x44eb('0x15')][_0x44eb('0x19')]?_[_0x44eb('0x1a')](_0x5c30a9[_0x44eb('0x15')][_0x44eb('0x19')],function(_0x576e55){return{'model':db[_0x576e55[_0x44eb('0x1b')]],'as':_0x576e55['as'],'attributes':_0x576e55[_0x44eb('0x18')],'include':_0x576e55['include']?_[_0x44eb('0x1a')](_0x576e55[_0x44eb('0x19')],function(_0x4f03a6){return{'model':db[_0x4f03a6['model']],'as':_0x4f03a6['as'],'attributes':_0x4f03a6[_0x44eb('0x18')],'include':_0x4f03a6[_0x44eb('0x19')]?_[_0x44eb('0x1a')](_0x4f03a6['include'],function(_0x4f2faf){return{'model':db[_0x4f2faf[_0x44eb('0x1b')]],'as':_0x4f2faf['as'],'attributes':_0x4f2faf[_0x44eb('0x18')]};}):[]};}):[]};}):[]:[]})[_0x44eb('0x1c')](function(_0x1bc0a4){logger[_0x44eb('0xb')]('GetServicenowAccount',_0x5c30a9);logger[_0x44eb('0x1d')](_0x44eb('0x1e'),_0x5c30a9,JSON['stringify'](_0x1bc0a4));_0x2773bc(_0x1bc0a4);})[_0x44eb('0x13')](function(_0x1520c5){logger['error']('GetServicenowAccount',_0x1520c5['message'],_0x5c30a9);_0x500085(_0x4dab08[_0x44eb('0xf')](0x1f4,_0x1520c5[_0x44eb('0x11')]));});});};exports[_0x44eb('0x1f')]=function(_0x1906ae){var _0x5cd06f=this;return new Promise(function(_0x2703b2,_0x5a10e6){return db['ServicenowAccount'][_0x44eb('0x20')]({'raw':_0x1906ae[_0x44eb('0x15')]?_0x1906ae[_0x44eb('0x15')][_0x44eb('0x16')]===undefined?!![]:![]:!![],'where':_0x1906ae['options']?_0x1906ae['options'][_0x44eb('0x17')]||null:null,'attributes':_0x1906ae[_0x44eb('0x15')]?_0x1906ae[_0x44eb('0x15')][_0x44eb('0x18')]||null:null,'include':_0x1906ae[_0x44eb('0x15')]?_0x1906ae[_0x44eb('0x15')][_0x44eb('0x19')]?_[_0x44eb('0x1a')](_0x1906ae[_0x44eb('0x15')][_0x44eb('0x19')],function(_0x556050){return{'model':db[_0x556050[_0x44eb('0x1b')]],'as':_0x556050['as'],'attributes':_0x556050[_0x44eb('0x18')],'include':_0x556050[_0x44eb('0x19')]?_['map'](_0x556050[_0x44eb('0x19')],function(_0xb0f3fa){return{'model':db[_0xb0f3fa[_0x44eb('0x1b')]],'as':_0xb0f3fa['as'],'attributes':_0xb0f3fa[_0x44eb('0x18')],'include':_0xb0f3fa['include']?_[_0x44eb('0x1a')](_0xb0f3fa['include'],function(_0x31c8e7){return{'model':db[_0x31c8e7['model']],'as':_0x31c8e7['as'],'attributes':_0x31c8e7[_0x44eb('0x18')]};}):[]};}):[]};}):[]:[]})[_0x44eb('0x1c')](function(_0x5e80cb){logger[_0x44eb('0xb')](_0x44eb('0x1f'),_0x1906ae);logger[_0x44eb('0x1d')](_0x44eb('0x1f'),_0x1906ae,JSON[_0x44eb('0xe')](_0x5e80cb));_0x2703b2(_0x5e80cb);})[_0x44eb('0x13')](function(_0x3fbe6c){logger[_0x44eb('0xf')](_0x44eb('0x1f'),_0x3fbe6c[_0x44eb('0x11')],_0x1906ae);_0x5a10e6(_0x5cd06f[_0x44eb('0xf')](0x1f4,_0x3fbe6c[_0x44eb('0x11')]));});});};
\ No newline at end of file
index 100a3a3..baa0031 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x173a=['../../components/interaction/service','./intServicenowConfiguration.controller','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','post','create','put','delete','destroy','exports','multer','util','path','connect-timeout','express','fs-extra'];(function(_0x49dc69,_0x2db39a){var _0x326d0c=function(_0x529f43){while(--_0x529f43){_0x49dc69['push'](_0x49dc69['shift']());}};_0x326d0c(++_0x2db39a);}(_0x173a,0xf4));var _0xa173=function(_0x3d118a,_0x51b1c7){_0x3d118a=_0x3d118a-0x0;var _0x5c97fc=_0x173a[_0x3d118a];return _0x5c97fc;};'use strict';var multer=require(_0xa173('0x0'));var util=require(_0xa173('0x1'));var path=require(_0xa173('0x2'));var timeout=require(_0xa173('0x3'));var express=require(_0xa173('0x4'));var router=express['Router']();var fs_extra=require(_0xa173('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xa173('0x6'));var config=require('../../config/environment');var controller=require(_0xa173('0x7'));router[_0xa173('0x8')]('/',auth[_0xa173('0x9')](),controller[_0xa173('0xa')]);router[_0xa173('0x8')](_0xa173('0xb'),auth[_0xa173('0x9')](),controller[_0xa173('0xc')]);router['get'](_0xa173('0xd'),auth['isAuthenticated'](),controller[_0xa173('0xe')]);router['get'](_0xa173('0xf'),auth[_0xa173('0x9')](),controller[_0xa173('0x10')]);router['get'](_0xa173('0x11'),auth[_0xa173('0x9')](),controller[_0xa173('0x12')]);router[_0xa173('0x13')]('/',auth[_0xa173('0x9')](),controller[_0xa173('0x14')]);router[_0xa173('0x15')](_0xa173('0xb'),auth[_0xa173('0x9')](),controller['update']);router[_0xa173('0x16')](_0xa173('0xb'),auth['isAuthenticated'](),controller[_0xa173('0x17')]);module[_0xa173('0x18')]=router;
\ No newline at end of file
+var _0xb8de=['create','update','delete','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intServicenowConfiguration.controller','get','isAuthenticated','/:id','show','/:id/fields','getFields','/:id/descriptions'];(function(_0x993b1d,_0x293a10){var _0x2849c6=function(_0x4c83eb){while(--_0x4c83eb){_0x993b1d['push'](_0x993b1d['shift']());}};_0x2849c6(++_0x293a10);}(_0xb8de,0x193));var _0xeb8d=function(_0x30be07,_0x22f563){_0x30be07=_0x30be07-0x0;var _0x21d2c0=_0xb8de[_0x30be07];return _0x21d2c0;};'use strict';var multer=require(_0xeb8d('0x0'));var util=require(_0xeb8d('0x1'));var path=require(_0xeb8d('0x2'));var timeout=require(_0xeb8d('0x3'));var express=require('express');var router=express[_0xeb8d('0x4')]();var fs_extra=require(_0xeb8d('0x5'));var auth=require(_0xeb8d('0x6'));var interaction=require(_0xeb8d('0x7'));var config=require(_0xeb8d('0x8'));var controller=require(_0xeb8d('0x9'));router[_0xeb8d('0xa')]('/',auth[_0xeb8d('0xb')](),controller['index']);router[_0xeb8d('0xa')](_0xeb8d('0xc'),auth['isAuthenticated'](),controller[_0xeb8d('0xd')]);router['get'](_0xeb8d('0xe'),auth[_0xeb8d('0xb')](),controller[_0xeb8d('0xf')]);router['get']('/:id/subjects',auth[_0xeb8d('0xb')](),controller['getSubjects']);router['get'](_0xeb8d('0x10'),auth[_0xeb8d('0xb')](),controller['getDescriptions']);router['post']('/',auth[_0xeb8d('0xb')](),controller[_0xeb8d('0x11')]);router['put'](_0xeb8d('0xc'),auth[_0xeb8d('0xb')](),controller[_0xeb8d('0x12')]);router[_0xeb8d('0x13')](_0xeb8d('0xc'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router;
\ No newline at end of file
index b9848e5..eb08aa1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfc1c=['STRING','exports'];(function(_0x404f08,_0x46c8b0){var _0x5aca3a=function(_0x85cd3){while(--_0x85cd3){_0x404f08['push'](_0x404f08['shift']());}};_0x5aca3a(++_0x46c8b0);}(_0xfc1c,0x16f));var _0xcfc1=function(_0x215f9e,_0x438b14){_0x215f9e=_0x215f9e-0x0;var _0x217ce4=_0xfc1c[_0x215f9e];return _0x217ce4;};'use strict';var Sequelize=require('sequelize');module[_0xcfc1('0x0')]={'name':{'type':Sequelize[_0xcfc1('0x1')]},'description':{'type':Sequelize[_0xcfc1('0x1')]}};
\ No newline at end of file
+var _0x3692=['STRING'];(function(_0x43de86,_0x34edd7){var _0x1bc154=function(_0x192b2b){while(--_0x192b2b){_0x43de86['push'](_0x43de86['shift']());}};_0x1bc154(++_0x34edd7);}(_0x3692,0x180));var _0x2369=function(_0x11a84d,_0x4dbd0e){_0x11a84d=_0x11a84d-0x0;var _0x1e6b48=_0x3692[_0x11a84d];return _0x1e6b48;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x2369('0x0')]},'description':{'type':Sequelize[_0x2369('0x0')]}};
\ No newline at end of file
index 0691865..a80fa93 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdc8c=['../../mysqldb','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','sendStatus','error','name','index','map','ServicenowConfiguration','rawAttributes','fieldName','type','key','model','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','sort','where','filter','merge','VIRTUAL','includeAll','include','findAll','rows','catch','show','params','keys','options','create','body','find','order','pick','getFields','getSubjects','findOne','ServicenowField','getDescriptions','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','squel','crypto','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0xdc8c,0x8d));var _0xcdc8=function(_0x3d17f5,_0x248c4e){_0x3d17f5=_0x3d17f5-0x0;var _0x3a2dbf=_0xdc8c[_0x3d17f5];return _0x3a2dbf;};'use strict';var emlformat=require(_0xcdc8('0x0'));var rimraf=require(_0xcdc8('0x1'));var zipdir=require(_0xcdc8('0x2'));var jsonpatch=require(_0xcdc8('0x3'));var rp=require(_0xcdc8('0x4'));var moment=require(_0xcdc8('0x5'));var BPromise=require(_0xcdc8('0x6'));var Mustache=require(_0xcdc8('0x7'));var util=require(_0xcdc8('0x8'));var path=require(_0xcdc8('0x9'));var sox=require('sox');var csv=require(_0xcdc8('0xa'));var ejs=require(_0xcdc8('0xb'));var fs=require('fs');var fs_extra=require(_0xcdc8('0xc'));var _=require('lodash');var squel=require(_0xcdc8('0xd'));var crypto=require(_0xcdc8('0xe'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xcdc8('0xa'));var querystring=require('querystring');var Papa=require(_0xcdc8('0xf'));var Redis=require(_0xcdc8('0x10'));var authService=require(_0xcdc8('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0xcdc8('0x12'));var hardwareService=require(_0xcdc8('0x13'));var logger=require(_0xcdc8('0x14'))('api');var utils=require(_0xcdc8('0x15'));var config=require(_0xcdc8('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0xcdc8('0x17'))['db'];function respondWithStatusCode(_0x4d1b6e,_0x9dcd37){_0x9dcd37=_0x9dcd37||0xcc;return function(_0x1490a2){if(_0x1490a2){return _0x4d1b6e['sendStatus'](_0x9dcd37);}return _0x4d1b6e['status'](_0x9dcd37)[_0xcdc8('0x18')]();};}function respondWithResult(_0x745a5e,_0x547260){_0x547260=_0x547260||0xc8;return function(_0x4b9bd5){if(_0x4b9bd5){return _0x745a5e[_0xcdc8('0x19')](_0x547260)[_0xcdc8('0x1a')](_0x4b9bd5);}};}function respondWithFilteredResult(_0xc02815,_0x3ecae9){return function(_0x1c968d){if(_0x1c968d){var _0x2f0a69=typeof _0x3ecae9[_0xcdc8('0x1b')]===_0xcdc8('0x1c')&&typeof _0x3ecae9[_0xcdc8('0x1d')]===_0xcdc8('0x1c');var _0x37f3c8=_0x1c968d[_0xcdc8('0x1e')];var _0x1cacce=_0x2f0a69?0x0:_0x3ecae9[_0xcdc8('0x1b')];var _0x5bc63e=_0x2f0a69?_0x1c968d['count']:_0x3ecae9[_0xcdc8('0x1b')]+_0x3ecae9[_0xcdc8('0x1d')];var _0x515dac;if(_0x5bc63e>=_0x37f3c8){_0x5bc63e=_0x37f3c8;_0x515dac=0xc8;}else{_0x515dac=0xce;}_0xc02815[_0xcdc8('0x19')](_0x515dac);return _0xc02815[_0xcdc8('0x1f')](_0xcdc8('0x20'),_0x1cacce+'-'+_0x5bc63e+'/'+_0x37f3c8)[_0xcdc8('0x1a')](_0x1c968d);}return null;};}function patchUpdates(_0x5786af){return function(_0x1b912a){try{jsonpatch[_0xcdc8('0x21')](_0x1b912a,_0x5786af,!![]);}catch(_0x5619de){return BPromise[_0xcdc8('0x22')](_0x5619de);}return _0x1b912a[_0xcdc8('0x23')]();};}function saveUpdates(_0x43e0d8,_0x38720a){return function(_0x1adb52){if(_0x1adb52){return _0x1adb52[_0xcdc8('0x24')](_0x43e0d8)[_0xcdc8('0x25')](function(_0x27885a){return _0x27885a;});}return null;};}function removeEntity(_0x163bc0,_0x1fed8f){return function(_0x2aaf6f){if(_0x2aaf6f){return _0x2aaf6f[_0xcdc8('0x26')]()[_0xcdc8('0x25')](function(){_0x163bc0['status'](0xcc)[_0xcdc8('0x18')]();});}};}function handleEntityNotFound(_0x27b487,_0x27daf6){return function(_0x4e3ac4){if(!_0x4e3ac4){_0x27b487[_0xcdc8('0x27')](0x194);}return _0x4e3ac4;};}function handleError(_0x94c5e8,_0x19374e){_0x19374e=_0x19374e||0x1f4;return function(_0x1a19bb){logger[_0xcdc8('0x28')](_0x1a19bb['stack']);if(_0x1a19bb[_0xcdc8('0x29')]){delete _0x1a19bb[_0xcdc8('0x29')];}_0x94c5e8[_0xcdc8('0x19')](_0x19374e)['send'](_0x1a19bb);};}exports[_0xcdc8('0x2a')]=function(_0x2c13b3,_0x25fd1c){var _0x31dc73={},_0x3e8101={},_0x3d74d1={'count':0x0,'rows':[]};var _0x27f4fb=_[_0xcdc8('0x2b')](db[_0xcdc8('0x2c')][_0xcdc8('0x2d')],function(_0x15a0fb){return{'name':_0x15a0fb[_0xcdc8('0x2e')],'type':_0x15a0fb[_0xcdc8('0x2f')][_0xcdc8('0x30')]};});_0x3e8101[_0xcdc8('0x31')]=_['map'](_0x27f4fb,_0xcdc8('0x29'));_0x3e8101[_0xcdc8('0x32')]=_['keys'](_0x2c13b3[_0xcdc8('0x32')]);_0x3e8101[_0xcdc8('0x33')]=_['intersection'](_0x3e8101['model'],_0x3e8101[_0xcdc8('0x32')]);_0x31dc73[_0xcdc8('0x34')]=_[_0xcdc8('0x35')](_0x3e8101[_0xcdc8('0x31')],qs[_0xcdc8('0x36')](_0x2c13b3[_0xcdc8('0x32')][_0xcdc8('0x36')]));_0x31dc73[_0xcdc8('0x34')]=_0x31dc73[_0xcdc8('0x34')][_0xcdc8('0x37')]?_0x31dc73['attributes']:_0x3e8101[_0xcdc8('0x31')];if(!_0x2c13b3['query'][_0xcdc8('0x38')](_0xcdc8('0x39'))){_0x31dc73['limit']=qs[_0xcdc8('0x1d')](_0x2c13b3['query'][_0xcdc8('0x1d')]);_0x31dc73[_0xcdc8('0x1b')]=qs['offset'](_0x2c13b3['query'][_0xcdc8('0x1b')]);}_0x31dc73['order']=qs[_0xcdc8('0x3a')](_0x2c13b3[_0xcdc8('0x32')][_0xcdc8('0x3a')]);_0x31dc73[_0xcdc8('0x3b')]=qs[_0xcdc8('0x33')](_['pick'](_0x2c13b3[_0xcdc8('0x32')],_0x3e8101['filters']),_0x27f4fb);if(_0x2c13b3['query'][_0xcdc8('0x3c')]){_0x31dc73[_0xcdc8('0x3b')]=_[_0xcdc8('0x3d')](_0x31dc73[_0xcdc8('0x3b')],{'$or':_['map'](_0x27f4fb,function(_0x1d35c2){if(_0x1d35c2[_0xcdc8('0x2f')]!==_0xcdc8('0x3e')){var _0x113197={};_0x113197[_0x1d35c2['name']]={'$like':'%'+_0x2c13b3['query'][_0xcdc8('0x3c')]+'%'};return _0x113197;}})});}_0x31dc73=_[_0xcdc8('0x3d')]({},_0x31dc73,_0x2c13b3['options']);var _0x17e48c={'where':_0x31dc73[_0xcdc8('0x3b')]};return db[_0xcdc8('0x2c')][_0xcdc8('0x1e')](_0x17e48c)['then'](function(_0x5cd885){_0x3d74d1[_0xcdc8('0x1e')]=_0x5cd885;if(_0x2c13b3[_0xcdc8('0x32')][_0xcdc8('0x3f')]){_0x31dc73[_0xcdc8('0x40')]=[{'all':!![]}];}return db[_0xcdc8('0x2c')][_0xcdc8('0x41')](_0x31dc73);})['then'](function(_0x5883cd){_0x3d74d1[_0xcdc8('0x42')]=_0x5883cd;return _0x3d74d1;})[_0xcdc8('0x25')](respondWithFilteredResult(_0x25fd1c,_0x31dc73))[_0xcdc8('0x43')](handleError(_0x25fd1c,null));};exports[_0xcdc8('0x44')]=function(_0x52a594,_0x415378){var _0x5e0763={'raw':![],'where':{'id':_0x52a594[_0xcdc8('0x45')]['id']}},_0x4e4045={};_0x4e4045['model']=_[_0xcdc8('0x46')](db[_0xcdc8('0x2c')][_0xcdc8('0x2d')]);_0x4e4045[_0xcdc8('0x32')]=_['keys'](_0x52a594[_0xcdc8('0x32')]);_0x4e4045[_0xcdc8('0x33')]=_[_0xcdc8('0x35')](_0x4e4045[_0xcdc8('0x31')],_0x4e4045[_0xcdc8('0x32')]);_0x5e0763[_0xcdc8('0x34')]=_['intersection'](_0x4e4045['model'],qs[_0xcdc8('0x36')](_0x52a594[_0xcdc8('0x32')][_0xcdc8('0x36')]));_0x5e0763['attributes']=_0x5e0763[_0xcdc8('0x34')][_0xcdc8('0x37')]?_0x5e0763[_0xcdc8('0x34')]:_0x4e4045[_0xcdc8('0x31')];if(_0x52a594[_0xcdc8('0x32')][_0xcdc8('0x3f')]){_0x5e0763[_0xcdc8('0x40')]=[{'all':!![]}];}_0x5e0763=_[_0xcdc8('0x3d')]({},_0x5e0763,_0x52a594[_0xcdc8('0x47')]);return db['ServicenowConfiguration']['find'](_0x5e0763)[_0xcdc8('0x25')](handleEntityNotFound(_0x415378,null))[_0xcdc8('0x25')](respondWithResult(_0x415378,null))[_0xcdc8('0x43')](handleError(_0x415378,null));};exports['create']=function(_0x112bf8,_0x407ad6){return db[_0xcdc8('0x2c')][_0xcdc8('0x48')](_0x112bf8[_0xcdc8('0x49')],{})[_0xcdc8('0x25')](respondWithResult(_0x407ad6,0xc9))[_0xcdc8('0x43')](handleError(_0x407ad6,null));};exports[_0xcdc8('0x24')]=function(_0x40b6c9,_0x260c2f){if(_0x40b6c9[_0xcdc8('0x49')]['id']){delete _0x40b6c9[_0xcdc8('0x49')]['id'];}return db['ServicenowConfiguration'][_0xcdc8('0x4a')]({'where':{'id':_0x40b6c9[_0xcdc8('0x45')]['id']}})['then'](handleEntityNotFound(_0x260c2f,null))[_0xcdc8('0x25')](saveUpdates(_0x40b6c9[_0xcdc8('0x49')],null))[_0xcdc8('0x25')](respondWithResult(_0x260c2f,null))[_0xcdc8('0x43')](handleError(_0x260c2f,null));};exports[_0xcdc8('0x26')]=function(_0x4cd9c4,_0x4d719c){return db[_0xcdc8('0x2c')][_0xcdc8('0x4a')]({'where':{'id':_0x4cd9c4['params']['id']}})['then'](handleEntityNotFound(_0x4d719c,null))[_0xcdc8('0x25')](removeEntity(_0x4d719c,null))[_0xcdc8('0x43')](handleError(_0x4d719c,null));};exports['getFields']=function(_0x41d644,_0x279ca5,_0x164a1c){var _0x275fb9={};var _0x2d1e8b={};var _0x21d5ef;var _0x57eff8;return db['ServicenowConfiguration']['findOne']({'where':{'id':_0x41d644[_0xcdc8('0x45')]['id']}})[_0xcdc8('0x25')](handleEntityNotFound(_0x279ca5,null))[_0xcdc8('0x25')](function(_0x4b7a5c){if(_0x4b7a5c){_0x21d5ef=_0x4b7a5c;_0x2d1e8b[_0xcdc8('0x31')]=_[_0xcdc8('0x46')](db['ServicenowField']['rawAttributes']);_0x2d1e8b[_0xcdc8('0x32')]=_[_0xcdc8('0x46')](_0x41d644[_0xcdc8('0x32')]);_0x2d1e8b[_0xcdc8('0x33')]=_[_0xcdc8('0x35')](_0x2d1e8b['model'],_0x2d1e8b[_0xcdc8('0x32')]);_0x275fb9[_0xcdc8('0x34')]=_['intersection'](_0x2d1e8b[_0xcdc8('0x31')],qs[_0xcdc8('0x36')](_0x41d644['query'][_0xcdc8('0x36')]));_0x275fb9['attributes']=_0x275fb9[_0xcdc8('0x34')][_0xcdc8('0x37')]?_0x275fb9[_0xcdc8('0x34')]:_0x2d1e8b[_0xcdc8('0x31')];_0x275fb9[_0xcdc8('0x4b')]=qs['sort'](_0x41d644['query'][_0xcdc8('0x3a')]);_0x275fb9['where']=qs['filters'](_[_0xcdc8('0x4c')](_0x41d644[_0xcdc8('0x32')],_0x2d1e8b[_0xcdc8('0x33')]));if(_0x41d644[_0xcdc8('0x32')][_0xcdc8('0x3c')]){_0x275fb9['where']=_[_0xcdc8('0x3d')](_0x275fb9['where'],{'$or':_['map'](_0x275fb9[_0xcdc8('0x34')],function(_0x34d5b6){var _0x3325c1={};_0x3325c1[_0x34d5b6]={'$like':'%'+_0x41d644['query']['filter']+'%'};return _0x3325c1;})});}_0x275fb9=_[_0xcdc8('0x3d')]({},_0x275fb9,_0x41d644[_0xcdc8('0x47')]);return _0x21d5ef[_0xcdc8('0x4d')](_0x275fb9);}})['then'](function(_0x10f88c){if(_0x10f88c){_0x57eff8=_0x10f88c['length'];if(!_0x41d644['query'][_0xcdc8('0x38')]('nolimit')){_0x275fb9['limit']=qs['limit'](_0x41d644[_0xcdc8('0x32')][_0xcdc8('0x1d')]);_0x275fb9[_0xcdc8('0x1b')]=qs[_0xcdc8('0x1b')](_0x41d644['query'][_0xcdc8('0x1b')]);}return _0x21d5ef['getFields'](_0x275fb9);}})[_0xcdc8('0x25')](function(_0x51fe39){if(_0x51fe39){return _0x51fe39?{'count':_0x57eff8,'rows':_0x51fe39}:null;}})[_0xcdc8('0x25')](respondWithResult(_0x279ca5,null))[_0xcdc8('0x43')](handleError(_0x279ca5,null));};exports[_0xcdc8('0x4e')]=function(_0x4b5d43,_0x518dca,_0x9791ad){var _0x220683={};var _0x110eca={};var _0x3a122a;var _0x35c9c4;return db['ServicenowConfiguration'][_0xcdc8('0x4f')]({'where':{'id':_0x4b5d43[_0xcdc8('0x45')]['id']}})[_0xcdc8('0x25')](handleEntityNotFound(_0x518dca,null))['then'](function(_0x9192e0){if(_0x9192e0){_0x3a122a=_0x9192e0;_0x110eca[_0xcdc8('0x31')]=_['keys'](db[_0xcdc8('0x50')][_0xcdc8('0x2d')]);_0x110eca['query']=_[_0xcdc8('0x46')](_0x4b5d43[_0xcdc8('0x32')]);_0x110eca[_0xcdc8('0x33')]=_['intersection'](_0x110eca[_0xcdc8('0x31')],_0x110eca[_0xcdc8('0x32')]);_0x220683[_0xcdc8('0x34')]=_['intersection'](_0x110eca[_0xcdc8('0x31')],qs['fields'](_0x4b5d43[_0xcdc8('0x32')][_0xcdc8('0x36')]));_0x220683[_0xcdc8('0x34')]=_0x220683['attributes'][_0xcdc8('0x37')]?_0x220683[_0xcdc8('0x34')]:_0x110eca[_0xcdc8('0x31')];_0x220683[_0xcdc8('0x4b')]=qs['sort'](_0x4b5d43[_0xcdc8('0x32')][_0xcdc8('0x3a')]);_0x220683[_0xcdc8('0x3b')]=qs['filters'](_['pick'](_0x4b5d43[_0xcdc8('0x32')],_0x110eca[_0xcdc8('0x33')]));if(_0x4b5d43[_0xcdc8('0x32')][_0xcdc8('0x3c')]){_0x220683[_0xcdc8('0x3b')]=_[_0xcdc8('0x3d')](_0x220683[_0xcdc8('0x3b')],{'$or':_[_0xcdc8('0x2b')](_0x220683['attributes'],function(_0x43af46){var _0x245c29={};_0x245c29[_0x43af46]={'$like':'%'+_0x4b5d43['query'][_0xcdc8('0x3c')]+'%'};return _0x245c29;})});}_0x220683=_[_0xcdc8('0x3d')]({},_0x220683,_0x4b5d43[_0xcdc8('0x47')]);return _0x3a122a[_0xcdc8('0x4e')](_0x220683);}})['then'](function(_0x5f2978){if(_0x5f2978){_0x35c9c4=_0x5f2978[_0xcdc8('0x37')];if(!_0x4b5d43[_0xcdc8('0x32')][_0xcdc8('0x38')]('nolimit')){_0x220683[_0xcdc8('0x1d')]=qs[_0xcdc8('0x1d')](_0x4b5d43[_0xcdc8('0x32')][_0xcdc8('0x1d')]);_0x220683[_0xcdc8('0x1b')]=qs[_0xcdc8('0x1b')](_0x4b5d43[_0xcdc8('0x32')][_0xcdc8('0x1b')]);}return _0x3a122a[_0xcdc8('0x4e')](_0x220683);}})[_0xcdc8('0x25')](function(_0x2b9d4b){if(_0x2b9d4b){return _0x2b9d4b?{'count':_0x35c9c4,'rows':_0x2b9d4b}:null;}})[_0xcdc8('0x25')](respondWithResult(_0x518dca,null))[_0xcdc8('0x43')](handleError(_0x518dca,null));};exports['getDescriptions']=function(_0x379915,_0x45940f,_0x41f7a0){var _0x46ac45={};var _0x5b89f8={};var _0xd9df1e;var _0xec08e0;return db[_0xcdc8('0x2c')][_0xcdc8('0x4f')]({'where':{'id':_0x379915[_0xcdc8('0x45')]['id']}})[_0xcdc8('0x25')](handleEntityNotFound(_0x45940f,null))[_0xcdc8('0x25')](function(_0x124105){if(_0x124105){_0xd9df1e=_0x124105;_0x5b89f8[_0xcdc8('0x31')]=_['keys'](db[_0xcdc8('0x50')][_0xcdc8('0x2d')]);_0x5b89f8[_0xcdc8('0x32')]=_[_0xcdc8('0x46')](_0x379915[_0xcdc8('0x32')]);_0x5b89f8[_0xcdc8('0x33')]=_[_0xcdc8('0x35')](_0x5b89f8[_0xcdc8('0x31')],_0x5b89f8[_0xcdc8('0x32')]);_0x46ac45[_0xcdc8('0x34')]=_[_0xcdc8('0x35')](_0x5b89f8[_0xcdc8('0x31')],qs['fields'](_0x379915[_0xcdc8('0x32')][_0xcdc8('0x36')]));_0x46ac45[_0xcdc8('0x34')]=_0x46ac45[_0xcdc8('0x34')][_0xcdc8('0x37')]?_0x46ac45[_0xcdc8('0x34')]:_0x5b89f8[_0xcdc8('0x31')];_0x46ac45[_0xcdc8('0x4b')]=qs['sort'](_0x379915[_0xcdc8('0x32')][_0xcdc8('0x3a')]);_0x46ac45[_0xcdc8('0x3b')]=qs[_0xcdc8('0x33')](_[_0xcdc8('0x4c')](_0x379915[_0xcdc8('0x32')],_0x5b89f8[_0xcdc8('0x33')]));if(_0x379915[_0xcdc8('0x32')]['filter']){_0x46ac45[_0xcdc8('0x3b')]=_['merge'](_0x46ac45[_0xcdc8('0x3b')],{'$or':_['map'](_0x46ac45[_0xcdc8('0x34')],function(_0x2a2c3e){var _0x5ab761={};_0x5ab761[_0x2a2c3e]={'$like':'%'+_0x379915[_0xcdc8('0x32')][_0xcdc8('0x3c')]+'%'};return _0x5ab761;})});}_0x46ac45=_[_0xcdc8('0x3d')]({},_0x46ac45,_0x379915['options']);return _0xd9df1e['getDescriptions'](_0x46ac45);}})['then'](function(_0x549404){if(_0x549404){_0xec08e0=_0x549404[_0xcdc8('0x37')];if(!_0x379915['query'][_0xcdc8('0x38')](_0xcdc8('0x39'))){_0x46ac45[_0xcdc8('0x1d')]=qs[_0xcdc8('0x1d')](_0x379915[_0xcdc8('0x32')][_0xcdc8('0x1d')]);_0x46ac45[_0xcdc8('0x1b')]=qs[_0xcdc8('0x1b')](_0x379915[_0xcdc8('0x32')]['offset']);}return _0xd9df1e[_0xcdc8('0x51')](_0x46ac45);}})[_0xcdc8('0x25')](function(_0x20f335){if(_0x20f335){return _0x20f335?{'count':_0xec08e0,'rows':_0x20f335}:null;}})[_0xcdc8('0x25')](respondWithResult(_0x45940f,null))[_0xcdc8('0x43')](handleError(_0x45940f,null));};
\ No newline at end of file
+var _0xe58e=['lodash','crypto','jsforce','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','save','update','then','error','name','send','ServicenowConfiguration','rawAttributes','fieldName','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','type','VIRTUAL','includeAll','include','findAll','rows','catch','show','params','merge','find','create','body','getFields','ServicenowField','options','nolimit','findOne','getSubjects','getDescriptions','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','sox','to-csv','ejs'];(function(_0xd8f3c5,_0x22c497){var _0x18bb19=function(_0xbcc3d1){while(--_0xbcc3d1){_0xd8f3c5['push'](_0xd8f3c5['shift']());}};_0x18bb19(++_0x22c497);}(_0xe58e,0x1ad));var _0xee58=function(_0x474b98,_0x1cc878){_0x474b98=_0x474b98-0x0;var _0xaa1e5d=_0xe58e[_0x474b98];return _0xaa1e5d;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xee58('0x0'));var zipdir=require(_0xee58('0x1'));var jsonpatch=require(_0xee58('0x2'));var rp=require(_0xee58('0x3'));var moment=require(_0xee58('0x4'));var BPromise=require(_0xee58('0x5'));var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0xee58('0x6'));var csv=require(_0xee58('0x7'));var ejs=require(_0xee58('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xee58('0x9'));var squel=require('squel');var crypto=require(_0xee58('0xa'));var jsforce=require(_0xee58('0xb'));var deskjs=require('desk.js');var toCsv=require(_0xee58('0x7'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xee58('0xc'));var authService=require('../../components/auth/service');var qs=require(_0xee58('0xd'));var as=require(_0xee58('0xe'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xee58('0xf'))(_0xee58('0x10'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3cce4b,_0x912030){_0x912030=_0x912030||0xcc;return function(_0x33055d){if(_0x33055d){return _0x3cce4b[_0xee58('0x11')](_0x912030);}return _0x3cce4b[_0xee58('0x12')](_0x912030)[_0xee58('0x13')]();};}function respondWithResult(_0x1a1964,_0x972400){_0x972400=_0x972400||0xc8;return function(_0x34f222){if(_0x34f222){return _0x1a1964[_0xee58('0x12')](_0x972400)[_0xee58('0x14')](_0x34f222);}};}function respondWithFilteredResult(_0x468e9f,_0x48a6dd){return function(_0x1e0475){if(_0x1e0475){var _0x80f050=typeof _0x48a6dd['offset']===_0xee58('0x15')&&typeof _0x48a6dd[_0xee58('0x16')]==='undefined';var _0xa2831a=_0x1e0475[_0xee58('0x17')];var _0x24f638=_0x80f050?0x0:_0x48a6dd[_0xee58('0x18')];var _0x299036=_0x80f050?_0x1e0475[_0xee58('0x17')]:_0x48a6dd[_0xee58('0x18')]+_0x48a6dd[_0xee58('0x16')];var _0x5cafe8;if(_0x299036>=_0xa2831a){_0x299036=_0xa2831a;_0x5cafe8=0xc8;}else{_0x5cafe8=0xce;}_0x468e9f[_0xee58('0x12')](_0x5cafe8);return _0x468e9f[_0xee58('0x19')](_0xee58('0x1a'),_0x24f638+'-'+_0x299036+'/'+_0xa2831a)[_0xee58('0x14')](_0x1e0475);}return null;};}function patchUpdates(_0x1a8497){return function(_0x135060){try{jsonpatch[_0xee58('0x1b')](_0x135060,_0x1a8497,!![]);}catch(_0x71062f){return BPromise['reject'](_0x71062f);}return _0x135060[_0xee58('0x1c')]();};}function saveUpdates(_0x3604e0,_0x2c891f){return function(_0x47bd59){if(_0x47bd59){return _0x47bd59[_0xee58('0x1d')](_0x3604e0)[_0xee58('0x1e')](function(_0xa9b662){return _0xa9b662;});}return null;};}function removeEntity(_0x3988dd,_0x2088b8){return function(_0x47ba86){if(_0x47ba86){return _0x47ba86['destroy']()[_0xee58('0x1e')](function(){_0x3988dd[_0xee58('0x12')](0xcc)[_0xee58('0x13')]();});}};}function handleEntityNotFound(_0x2f47e9,_0x26d0d2){return function(_0x3508f3){if(!_0x3508f3){_0x2f47e9['sendStatus'](0x194);}return _0x3508f3;};}function handleError(_0xe11c1,_0x4139b5){_0x4139b5=_0x4139b5||0x1f4;return function(_0xc90b80){logger[_0xee58('0x1f')](_0xc90b80['stack']);if(_0xc90b80[_0xee58('0x20')]){delete _0xc90b80[_0xee58('0x20')];}_0xe11c1['status'](_0x4139b5)[_0xee58('0x21')](_0xc90b80);};}exports['index']=function(_0x18a21f,_0x2b59ba){var _0x10bbb1={},_0x20abcd={},_0x176350={'count':0x0,'rows':[]};var _0x254082=_['map'](db[_0xee58('0x22')][_0xee58('0x23')],function(_0x11ad79){return{'name':_0x11ad79[_0xee58('0x24')],'type':_0x11ad79['type'][_0xee58('0x25')]};});_0x20abcd[_0xee58('0x26')]=_[_0xee58('0x27')](_0x254082,_0xee58('0x20'));_0x20abcd[_0xee58('0x28')]=_[_0xee58('0x29')](_0x18a21f[_0xee58('0x28')]);_0x20abcd[_0xee58('0x2a')]=_[_0xee58('0x2b')](_0x20abcd['model'],_0x20abcd[_0xee58('0x28')]);_0x10bbb1[_0xee58('0x2c')]=_[_0xee58('0x2b')](_0x20abcd[_0xee58('0x26')],qs[_0xee58('0x2d')](_0x18a21f[_0xee58('0x28')][_0xee58('0x2d')]));_0x10bbb1[_0xee58('0x2c')]=_0x10bbb1['attributes'][_0xee58('0x2e')]?_0x10bbb1[_0xee58('0x2c')]:_0x20abcd[_0xee58('0x26')];if(!_0x18a21f[_0xee58('0x28')][_0xee58('0x2f')]('nolimit')){_0x10bbb1['limit']=qs[_0xee58('0x16')](_0x18a21f[_0xee58('0x28')][_0xee58('0x16')]);_0x10bbb1[_0xee58('0x18')]=qs[_0xee58('0x18')](_0x18a21f[_0xee58('0x28')][_0xee58('0x18')]);}_0x10bbb1[_0xee58('0x30')]=qs[_0xee58('0x31')](_0x18a21f[_0xee58('0x28')][_0xee58('0x31')]);_0x10bbb1[_0xee58('0x32')]=qs['filters'](_[_0xee58('0x33')](_0x18a21f[_0xee58('0x28')],_0x20abcd[_0xee58('0x2a')]),_0x254082);if(_0x18a21f['query'][_0xee58('0x34')]){_0x10bbb1[_0xee58('0x32')]=_['merge'](_0x10bbb1[_0xee58('0x32')],{'$or':_[_0xee58('0x27')](_0x254082,function(_0x39a568){if(_0x39a568[_0xee58('0x35')]!==_0xee58('0x36')){var _0x4643d6={};_0x4643d6[_0x39a568[_0xee58('0x20')]]={'$like':'%'+_0x18a21f[_0xee58('0x28')][_0xee58('0x34')]+'%'};return _0x4643d6;}})});}_0x10bbb1=_['merge']({},_0x10bbb1,_0x18a21f['options']);var _0x5e7831={'where':_0x10bbb1[_0xee58('0x32')]};return db[_0xee58('0x22')][_0xee58('0x17')](_0x5e7831)[_0xee58('0x1e')](function(_0x173a0e){_0x176350['count']=_0x173a0e;if(_0x18a21f[_0xee58('0x28')][_0xee58('0x37')]){_0x10bbb1[_0xee58('0x38')]=[{'all':!![]}];}return db[_0xee58('0x22')][_0xee58('0x39')](_0x10bbb1);})[_0xee58('0x1e')](function(_0xb7823d){_0x176350[_0xee58('0x3a')]=_0xb7823d;return _0x176350;})[_0xee58('0x1e')](respondWithFilteredResult(_0x2b59ba,_0x10bbb1))[_0xee58('0x3b')](handleError(_0x2b59ba,null));};exports[_0xee58('0x3c')]=function(_0x53058f,_0x45380f){var _0x12a9a5={'raw':![],'where':{'id':_0x53058f[_0xee58('0x3d')]['id']}},_0x32b28a={};_0x32b28a[_0xee58('0x26')]=_[_0xee58('0x29')](db[_0xee58('0x22')]['rawAttributes']);_0x32b28a[_0xee58('0x28')]=_[_0xee58('0x29')](_0x53058f[_0xee58('0x28')]);_0x32b28a[_0xee58('0x2a')]=_['intersection'](_0x32b28a[_0xee58('0x26')],_0x32b28a['query']);_0x12a9a5[_0xee58('0x2c')]=_[_0xee58('0x2b')](_0x32b28a[_0xee58('0x26')],qs[_0xee58('0x2d')](_0x53058f[_0xee58('0x28')]['fields']));_0x12a9a5[_0xee58('0x2c')]=_0x12a9a5[_0xee58('0x2c')]['length']?_0x12a9a5[_0xee58('0x2c')]:_0x32b28a[_0xee58('0x26')];if(_0x53058f[_0xee58('0x28')]['includeAll']){_0x12a9a5[_0xee58('0x38')]=[{'all':!![]}];}_0x12a9a5=_[_0xee58('0x3e')]({},_0x12a9a5,_0x53058f['options']);return db[_0xee58('0x22')][_0xee58('0x3f')](_0x12a9a5)[_0xee58('0x1e')](handleEntityNotFound(_0x45380f,null))[_0xee58('0x1e')](respondWithResult(_0x45380f,null))[_0xee58('0x3b')](handleError(_0x45380f,null));};exports[_0xee58('0x40')]=function(_0x358c36,_0x2c0d04){return db[_0xee58('0x22')]['create'](_0x358c36[_0xee58('0x41')],{})[_0xee58('0x1e')](respondWithResult(_0x2c0d04,0xc9))['catch'](handleError(_0x2c0d04,null));};exports[_0xee58('0x1d')]=function(_0x2ba303,_0x40e192){if(_0x2ba303[_0xee58('0x41')]['id']){delete _0x2ba303[_0xee58('0x41')]['id'];}return db[_0xee58('0x22')][_0xee58('0x3f')]({'where':{'id':_0x2ba303[_0xee58('0x3d')]['id']}})[_0xee58('0x1e')](handleEntityNotFound(_0x40e192,null))[_0xee58('0x1e')](saveUpdates(_0x2ba303['body'],null))[_0xee58('0x1e')](respondWithResult(_0x40e192,null))[_0xee58('0x3b')](handleError(_0x40e192,null));};exports['destroy']=function(_0x630d50,_0x3cc25a){return db[_0xee58('0x22')][_0xee58('0x3f')]({'where':{'id':_0x630d50['params']['id']}})[_0xee58('0x1e')](handleEntityNotFound(_0x3cc25a,null))[_0xee58('0x1e')](removeEntity(_0x3cc25a,null))[_0xee58('0x3b')](handleError(_0x3cc25a,null));};exports[_0xee58('0x42')]=function(_0x564a8a,_0xc5c093,_0x21d2cb){var _0x20ec4e={};var _0x9da4c0={};var _0x4ab067;var _0x59f478;return db[_0xee58('0x22')]['findOne']({'where':{'id':_0x564a8a['params']['id']}})[_0xee58('0x1e')](handleEntityNotFound(_0xc5c093,null))[_0xee58('0x1e')](function(_0x3bfab4){if(_0x3bfab4){_0x4ab067=_0x3bfab4;_0x9da4c0[_0xee58('0x26')]=_[_0xee58('0x29')](db[_0xee58('0x43')][_0xee58('0x23')]);_0x9da4c0[_0xee58('0x28')]=_[_0xee58('0x29')](_0x564a8a[_0xee58('0x28')]);_0x9da4c0[_0xee58('0x2a')]=_[_0xee58('0x2b')](_0x9da4c0[_0xee58('0x26')],_0x9da4c0[_0xee58('0x28')]);_0x20ec4e['attributes']=_[_0xee58('0x2b')](_0x9da4c0[_0xee58('0x26')],qs[_0xee58('0x2d')](_0x564a8a[_0xee58('0x28')][_0xee58('0x2d')]));_0x20ec4e[_0xee58('0x2c')]=_0x20ec4e['attributes'][_0xee58('0x2e')]?_0x20ec4e[_0xee58('0x2c')]:_0x9da4c0[_0xee58('0x26')];_0x20ec4e[_0xee58('0x30')]=qs[_0xee58('0x31')](_0x564a8a[_0xee58('0x28')][_0xee58('0x31')]);_0x20ec4e[_0xee58('0x32')]=qs['filters'](_[_0xee58('0x33')](_0x564a8a[_0xee58('0x28')],_0x9da4c0[_0xee58('0x2a')]));if(_0x564a8a['query']['filter']){_0x20ec4e[_0xee58('0x32')]=_[_0xee58('0x3e')](_0x20ec4e[_0xee58('0x32')],{'$or':_[_0xee58('0x27')](_0x20ec4e[_0xee58('0x2c')],function(_0x5966f0){var _0x1a7dde={};_0x1a7dde[_0x5966f0]={'$like':'%'+_0x564a8a[_0xee58('0x28')][_0xee58('0x34')]+'%'};return _0x1a7dde;})});}_0x20ec4e=_[_0xee58('0x3e')]({},_0x20ec4e,_0x564a8a[_0xee58('0x44')]);return _0x4ab067[_0xee58('0x42')](_0x20ec4e);}})['then'](function(_0x5b6f4c){if(_0x5b6f4c){_0x59f478=_0x5b6f4c[_0xee58('0x2e')];if(!_0x564a8a[_0xee58('0x28')][_0xee58('0x2f')](_0xee58('0x45'))){_0x20ec4e['limit']=qs[_0xee58('0x16')](_0x564a8a[_0xee58('0x28')][_0xee58('0x16')]);_0x20ec4e['offset']=qs['offset'](_0x564a8a['query'][_0xee58('0x18')]);}return _0x4ab067[_0xee58('0x42')](_0x20ec4e);}})['then'](function(_0x4c43b7){if(_0x4c43b7){return _0x4c43b7?{'count':_0x59f478,'rows':_0x4c43b7}:null;}})[_0xee58('0x1e')](respondWithResult(_0xc5c093,null))[_0xee58('0x3b')](handleError(_0xc5c093,null));};exports['getSubjects']=function(_0x6be87a,_0x360901,_0x2fb9e5){var _0x585b89={};var _0x10da51={};var _0x21ac4d;var _0xc2f3c5;return db['ServicenowConfiguration'][_0xee58('0x46')]({'where':{'id':_0x6be87a[_0xee58('0x3d')]['id']}})[_0xee58('0x1e')](handleEntityNotFound(_0x360901,null))['then'](function(_0x29b1dc){if(_0x29b1dc){_0x21ac4d=_0x29b1dc;_0x10da51['model']=_['keys'](db[_0xee58('0x43')][_0xee58('0x23')]);_0x10da51['query']=_[_0xee58('0x29')](_0x6be87a['query']);_0x10da51[_0xee58('0x2a')]=_[_0xee58('0x2b')](_0x10da51['model'],_0x10da51[_0xee58('0x28')]);_0x585b89[_0xee58('0x2c')]=_[_0xee58('0x2b')](_0x10da51[_0xee58('0x26')],qs[_0xee58('0x2d')](_0x6be87a[_0xee58('0x28')]['fields']));_0x585b89[_0xee58('0x2c')]=_0x585b89[_0xee58('0x2c')][_0xee58('0x2e')]?_0x585b89[_0xee58('0x2c')]:_0x10da51['model'];_0x585b89[_0xee58('0x30')]=qs['sort'](_0x6be87a[_0xee58('0x28')]['sort']);_0x585b89[_0xee58('0x32')]=qs['filters'](_[_0xee58('0x33')](_0x6be87a[_0xee58('0x28')],_0x10da51[_0xee58('0x2a')]));if(_0x6be87a[_0xee58('0x28')][_0xee58('0x34')]){_0x585b89[_0xee58('0x32')]=_[_0xee58('0x3e')](_0x585b89['where'],{'$or':_[_0xee58('0x27')](_0x585b89[_0xee58('0x2c')],function(_0x5f336c){var _0x4e82de={};_0x4e82de[_0x5f336c]={'$like':'%'+_0x6be87a[_0xee58('0x28')][_0xee58('0x34')]+'%'};return _0x4e82de;})});}_0x585b89=_['merge']({},_0x585b89,_0x6be87a[_0xee58('0x44')]);return _0x21ac4d[_0xee58('0x47')](_0x585b89);}})['then'](function(_0x3cfdcf){if(_0x3cfdcf){_0xc2f3c5=_0x3cfdcf[_0xee58('0x2e')];if(!_0x6be87a['query']['hasOwnProperty'](_0xee58('0x45'))){_0x585b89['limit']=qs[_0xee58('0x16')](_0x6be87a['query'][_0xee58('0x16')]);_0x585b89['offset']=qs['offset'](_0x6be87a[_0xee58('0x28')]['offset']);}return _0x21ac4d[_0xee58('0x47')](_0x585b89);}})['then'](function(_0x11a624){if(_0x11a624){return _0x11a624?{'count':_0xc2f3c5,'rows':_0x11a624}:null;}})[_0xee58('0x1e')](respondWithResult(_0x360901,null))['catch'](handleError(_0x360901,null));};exports[_0xee58('0x48')]=function(_0x154924,_0x5e6f03,_0x739ba8){var _0x29dc50={};var _0x2cd3c8={};var _0x103127;var _0x39fba5;return db[_0xee58('0x22')][_0xee58('0x46')]({'where':{'id':_0x154924[_0xee58('0x3d')]['id']}})[_0xee58('0x1e')](handleEntityNotFound(_0x5e6f03,null))[_0xee58('0x1e')](function(_0x2dfcbf){if(_0x2dfcbf){_0x103127=_0x2dfcbf;_0x2cd3c8[_0xee58('0x26')]=_[_0xee58('0x29')](db[_0xee58('0x43')][_0xee58('0x23')]);_0x2cd3c8[_0xee58('0x28')]=_[_0xee58('0x29')](_0x154924['query']);_0x2cd3c8['filters']=_[_0xee58('0x2b')](_0x2cd3c8[_0xee58('0x26')],_0x2cd3c8['query']);_0x29dc50[_0xee58('0x2c')]=_[_0xee58('0x2b')](_0x2cd3c8[_0xee58('0x26')],qs[_0xee58('0x2d')](_0x154924['query'][_0xee58('0x2d')]));_0x29dc50['attributes']=_0x29dc50['attributes'][_0xee58('0x2e')]?_0x29dc50[_0xee58('0x2c')]:_0x2cd3c8[_0xee58('0x26')];_0x29dc50[_0xee58('0x30')]=qs[_0xee58('0x31')](_0x154924['query'][_0xee58('0x31')]);_0x29dc50[_0xee58('0x32')]=qs[_0xee58('0x2a')](_[_0xee58('0x33')](_0x154924[_0xee58('0x28')],_0x2cd3c8['filters']));if(_0x154924[_0xee58('0x28')]['filter']){_0x29dc50['where']=_[_0xee58('0x3e')](_0x29dc50[_0xee58('0x32')],{'$or':_[_0xee58('0x27')](_0x29dc50['attributes'],function(_0x263896){var _0x5e8d39={};_0x5e8d39[_0x263896]={'$like':'%'+_0x154924[_0xee58('0x28')][_0xee58('0x34')]+'%'};return _0x5e8d39;})});}_0x29dc50=_['merge']({},_0x29dc50,_0x154924[_0xee58('0x44')]);return _0x103127[_0xee58('0x48')](_0x29dc50);}})[_0xee58('0x1e')](function(_0xbd658a){if(_0xbd658a){_0x39fba5=_0xbd658a[_0xee58('0x2e')];if(!_0x154924[_0xee58('0x28')][_0xee58('0x2f')]('nolimit')){_0x29dc50[_0xee58('0x16')]=qs['limit'](_0x154924['query'][_0xee58('0x16')]);_0x29dc50[_0xee58('0x18')]=qs['offset'](_0x154924[_0xee58('0x28')][_0xee58('0x18')]);}return _0x103127[_0xee58('0x48')](_0x29dc50);}})['then'](function(_0x4bedba){if(_0x4bedba){return _0x4bedba?{'count':_0x39fba5,'rows':_0x4bedba}:null;}})[_0xee58('0x1e')](respondWithResult(_0x5e6f03,null))[_0xee58('0x3b')](handleError(_0x5e6f03,null));};
\ No newline at end of file
index a811016..7d88cd6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4024=['define','int_servicenow_configurations','lodash','util','api','moment','request-promise','rimraf','../../config/environment'];(function(_0x20716f,_0x5e049a){var _0x4f2467=function(_0x2d9414){while(--_0x2d9414){_0x20716f['push'](_0x20716f['shift']());}};_0x4f2467(++_0x5e049a);}(_0x4024,0x89));var _0x4402=function(_0x2f651d,_0x7d2f88){_0x2f651d=_0x2f651d-0x0;var _0x249e3b=_0x4024[_0x2f651d];return _0x249e3b;};'use strict';var _=require(_0x4402('0x0'));var util=require(_0x4402('0x1'));var logger=require('../../config/logger')(_0x4402('0x2'));var moment=require(_0x4402('0x3'));var BPromise=require('bluebird');var rp=require(_0x4402('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x4402('0x5'));var config=require(_0x4402('0x6'));var attributes=require('./intServicenowConfiguration.attributes');module['exports']=function(_0x17699b,_0x346ddc){return _0x17699b[_0x4402('0x7')]('ServicenowConfiguration',attributes,{'tableName':_0x4402('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x3306=['define','ServicenowConfiguration','int_servicenow_configurations','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','exports'];(function(_0x515793,_0x2a5d62){var _0x9c326e=function(_0x51d1c9){while(--_0x51d1c9){_0x515793['push'](_0x515793['shift']());}};_0x9c326e(++_0x2a5d62);}(_0x3306,0x107));var _0x6330=function(_0xb7b0b1,_0x5427e1){_0xb7b0b1=_0xb7b0b1-0x0;var _0x3e5678=_0x3306[_0xb7b0b1];return _0x3e5678;};'use strict';var _=require(_0x6330('0x0'));var util=require(_0x6330('0x1'));var logger=require(_0x6330('0x2'))(_0x6330('0x3'));var moment=require('moment');var BPromise=require(_0x6330('0x4'));var rp=require(_0x6330('0x5'));var fs=require('fs');var path=require(_0x6330('0x6'));var rimraf=require(_0x6330('0x7'));var config=require(_0x6330('0x8'));var attributes=require('./intServicenowConfiguration.attributes');module[_0x6330('0x9')]=function(_0x457797,_0x2942ec){return _0x457797[_0x6330('0xa')](_0x6330('0xb'),attributes,{'tableName':_0x6330('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 07ab787..34c449e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x884b=['code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','then','info','ServicenowConfiguration,\x20%s,\x20%s','request\x20sent','error'];(function(_0x569caa,_0x5174ce){var _0x44cb5a=function(_0x456df4){while(--_0x456df4){_0x569caa['push'](_0x569caa['shift']());}};_0x44cb5a(++_0x5174ce);}(_0x884b,0x154));var _0xb884=function(_0x4629ed,_0x59ef85){_0x4629ed=_0x4629ed-0x0;var _0x52ca04=_0x884b[_0x4629ed];return _0x52ca04;};'use strict';var _=require(_0xb884('0x0'));var util=require(_0xb884('0x1'));var moment=require(_0xb884('0x2'));var BPromise=require('bluebird');var rs=require(_0xb884('0x3'));var fs=require('fs');var Redis=require(_0xb884('0x4'));var db=require(_0xb884('0x5'))['db'];var utils=require(_0xb884('0x6'));var logger=require(_0xb884('0x7'))(_0xb884('0x8'));var config=require(_0xb884('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xb884('0xa')][_0xb884('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4f7863,_0x158c8c,_0x57e163){return new BPromise(function(_0x300d05,_0x2cc6aa){return client['request'](_0x4f7863,_0x57e163)[_0xb884('0xc')](function(_0xa446a2){logger[_0xb884('0xd')](_0xb884('0xe'),_0x158c8c,'request\x20sent');logger['debug']('ServicenowConfiguration,\x20%s,\x20%s,\x20%s',_0x158c8c,_0xb884('0xf'),JSON['stringify'](_0xa446a2));if(_0xa446a2['error']){if(_0xa446a2[_0xb884('0x10')][_0xb884('0x11')]===0x1f4){logger[_0xb884('0x10')](_0xb884('0xe'),_0x158c8c,_0xa446a2[_0xb884('0x10')][_0xb884('0x12')]);return _0x2cc6aa(_0xa446a2['error'][_0xb884('0x12')]);}logger['error'](_0xb884('0xe'),_0x158c8c,_0xa446a2[_0xb884('0x10')][_0xb884('0x12')]);return _0x300d05(_0xa446a2['error'][_0xb884('0x12')]);}else{logger[_0xb884('0xd')](_0xb884('0xe'),_0x158c8c,_0xb884('0xf'));_0x300d05(_0xa446a2[_0xb884('0x13')]['message']);}})[_0xb884('0x14')](function(_0x47659e){logger[_0xb884('0x10')](_0xb884('0xe'),_0x158c8c,_0x47659e);_0x2cc6aa(_0x47659e);});});}
\ No newline at end of file
+var _0x4607=['catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','info','request\x20sent','debug','ServicenowConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','ServicenowConfiguration,\x20%s,\x20%s','message','result'];(function(_0x4b055c,_0x4b870b){var _0x4b62bb=function(_0x4884c2){while(--_0x4884c2){_0x4b055c['push'](_0x4b055c['shift']());}};_0x4b62bb(++_0x4b870b);}(_0x4607,0x121));var _0x7460=function(_0xbc4481,_0x2539cc){_0xbc4481=_0xbc4481-0x0;var _0x16ad58=_0x4607[_0xbc4481];return _0x16ad58;};'use strict';var _=require(_0x7460('0x0'));var util=require(_0x7460('0x1'));var moment=require(_0x7460('0x2'));var BPromise=require(_0x7460('0x3'));var rs=require(_0x7460('0x4'));var fs=require('fs');var Redis=require(_0x7460('0x5'));var db=require(_0x7460('0x6'))['db'];var utils=require(_0x7460('0x7'));var logger=require(_0x7460('0x8'))('rpc');var config=require(_0x7460('0x9'));var jayson=require(_0x7460('0xa'));var client=jayson[_0x7460('0xb')][_0x7460('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x1a8f14,_0x2b68fb,_0x13006b){return new BPromise(function(_0x3bbe4b,_0x272455){return client['request'](_0x1a8f14,_0x13006b)[_0x7460('0xd')](function(_0x13d180){logger[_0x7460('0xe')]('ServicenowConfiguration,\x20%s,\x20%s',_0x2b68fb,_0x7460('0xf'));logger[_0x7460('0x10')](_0x7460('0x11'),_0x2b68fb,_0x7460('0xf'),JSON[_0x7460('0x12')](_0x13d180));if(_0x13d180[_0x7460('0x13')]){if(_0x13d180[_0x7460('0x13')]['code']===0x1f4){logger[_0x7460('0x13')](_0x7460('0x14'),_0x2b68fb,_0x13d180[_0x7460('0x13')][_0x7460('0x15')]);return _0x272455(_0x13d180[_0x7460('0x13')]['message']);}logger[_0x7460('0x13')](_0x7460('0x14'),_0x2b68fb,_0x13d180['error'][_0x7460('0x15')]);return _0x3bbe4b(_0x13d180[_0x7460('0x13')][_0x7460('0x15')]);}else{logger[_0x7460('0xe')](_0x7460('0x14'),_0x2b68fb,_0x7460('0xf'));_0x3bbe4b(_0x13d180[_0x7460('0x16')]['message']);}})[_0x7460('0x17')](function(_0x4ca132){logger['error']('ServicenowConfiguration,\x20%s,\x20%s',_0x2b68fb,_0x4ca132);_0x272455(_0x4ca132);});});}
\ No newline at end of file
index 0b479b0..77677e7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4419=['express','fs-extra','../../components/auth/service','../../config/environment','./intServicenowField.controller','get','index','/:id','isAuthenticated','show','create','put','update','destroy','multer','util','path','connect-timeout'];(function(_0x293f48,_0x3ec1ee){var _0x90dd4b=function(_0x33451b){while(--_0x33451b){_0x293f48['push'](_0x293f48['shift']());}};_0x90dd4b(++_0x3ec1ee);}(_0x4419,0x1d0));var _0x9441=function(_0xeec0f2,_0xd330f1){_0xeec0f2=_0xeec0f2-0x0;var _0x3af8c5=_0x4419[_0xeec0f2];return _0x3af8c5;};'use strict';var multer=require(_0x9441('0x0'));var util=require(_0x9441('0x1'));var path=require(_0x9441('0x2'));var timeout=require(_0x9441('0x3'));var express=require(_0x9441('0x4'));var router=express['Router']();var fs_extra=require(_0x9441('0x5'));var auth=require(_0x9441('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x9441('0x7'));var controller=require(_0x9441('0x8'));router[_0x9441('0x9')]('/',auth['isAuthenticated'](),controller[_0x9441('0xa')]);router['get'](_0x9441('0xb'),auth[_0x9441('0xc')](),controller[_0x9441('0xd')]);router['post']('/',auth[_0x9441('0xc')](),controller[_0x9441('0xe')]);router[_0x9441('0xf')]('/:id',auth[_0x9441('0xc')](),controller[_0x9441('0x10')]);router['delete'](_0x9441('0xb'),auth[_0x9441('0xc')](),controller[_0x9441('0x11')]);module['exports']=router;
\ No newline at end of file
+var _0xa2a9=['isAuthenticated','create','update','delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','./intServicenowField.controller','index','get','/:id','show','post'];(function(_0x2d7a95,_0x2aca2a){var _0x562465=function(_0x51b099){while(--_0x51b099){_0x2d7a95['push'](_0x2d7a95['shift']());}};_0x562465(++_0x2aca2a);}(_0xa2a9,0x8b));var _0x9a2a=function(_0x2df55b,_0x222015){_0x2df55b=_0x2df55b-0x0;var _0x25c5d6=_0xa2a9[_0x2df55b];return _0x25c5d6;};'use strict';var multer=require('multer');var util=require(_0x9a2a('0x0'));var path=require(_0x9a2a('0x1'));var timeout=require(_0x9a2a('0x2'));var express=require(_0x9a2a('0x3'));var router=express[_0x9a2a('0x4')]();var fs_extra=require(_0x9a2a('0x5'));var auth=require(_0x9a2a('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x9a2a('0x7'));router['get']('/',auth['isAuthenticated'](),controller[_0x9a2a('0x8')]);router[_0x9a2a('0x9')](_0x9a2a('0xa'),auth['isAuthenticated'](),controller[_0x9a2a('0xb')]);router[_0x9a2a('0xc')]('/',auth[_0x9a2a('0xd')](),controller[_0x9a2a('0xe')]);router['put'](_0x9a2a('0xa'),auth[_0x9a2a('0xd')](),controller[_0x9a2a('0xf')]);router[_0x9a2a('0x10')]('/:id',auth[_0x9a2a('0xd')](),controller[_0x9a2a('0x11')]);module[_0x9a2a('0x12')]=router;
\ No newline at end of file
index afb425f..9e619d2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8f23=['customVariable','keyValue','picklist','STRING','ENUM','BOOLEAN','sequelize','string','variable'];(function(_0x27b225,_0xeab073){var _0x4b4d36=function(_0xd852c6){while(--_0xd852c6){_0x27b225['push'](_0x27b225['shift']());}};_0x4b4d36(++_0xeab073);}(_0x8f23,0x153));var _0x38f2=function(_0x2b08c3,_0x4f6639){_0x2b08c3=_0x2b08c3-0x0;var _0x41381d=_0x8f23[_0x2b08c3];return _0x41381d;};'use strict';var Sequelize=require(_0x38f2('0x0'));module['exports']={'type':{'type':Sequelize['ENUM'](_0x38f2('0x1'),_0x38f2('0x2'),_0x38f2('0x3'),_0x38f2('0x4'),_0x38f2('0x5')),'defaultValue':_0x38f2('0x1')},'content':{'type':Sequelize[_0x38f2('0x6')]},'key':{'type':Sequelize[_0x38f2('0x6')]},'keyType':{'type':Sequelize[_0x38f2('0x7')]('string',_0x38f2('0x2'),'customVariable')},'keyContent':{'type':Sequelize[_0x38f2('0x6')]},'idField':{'type':Sequelize[_0x38f2('0x6')]},'nameField':{'type':Sequelize[_0x38f2('0x6')]},'customField':{'type':Sequelize[_0x38f2('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xc788=['picklist','STRING','variable','exports','ENUM','string','customVariable','keyValue'];(function(_0x4e9b81,_0x1857e0){var _0x19e4e9=function(_0x78160c){while(--_0x78160c){_0x4e9b81['push'](_0x4e9b81['shift']());}};_0x19e4e9(++_0x1857e0);}(_0xc788,0x123));var _0x8c78=function(_0x2be240,_0x1e119d){_0x2be240=_0x2be240-0x0;var _0x123543=_0xc788[_0x2be240];return _0x123543;};'use strict';var Sequelize=require('sequelize');module[_0x8c78('0x0')]={'type':{'type':Sequelize[_0x8c78('0x1')](_0x8c78('0x2'),'variable',_0x8c78('0x3'),_0x8c78('0x4'),_0x8c78('0x5')),'defaultValue':_0x8c78('0x2')},'content':{'type':Sequelize[_0x8c78('0x6')]},'key':{'type':Sequelize[_0x8c78('0x6')]},'keyType':{'type':Sequelize[_0x8c78('0x1')](_0x8c78('0x2'),_0x8c78('0x7'),'customVariable')},'keyContent':{'type':Sequelize[_0x8c78('0x6')]},'idField':{'type':Sequelize[_0x8c78('0x6')]},'nameField':{'type':Sequelize[_0x8c78('0x6')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
index fb59fcd..9aa9963 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa1e5=['fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','count','set','Content-Range','apply','reject','save','update','then','error','name','send','index','rawAttributes','type','key','model','map','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','pick','filters','filter','where','merge','VIRTUAL','ServicenowField','includeAll','findAll','catch','show','params','keys','include','options','create','body','find','destroy','eml-format','zip-dir'];(function(_0x32b993,_0x1c5989){var _0x482780=function(_0x404179){while(--_0x404179){_0x32b993['push'](_0x32b993['shift']());}};_0x482780(++_0x1c5989);}(_0xa1e5,0xdf));var _0x5a1e=function(_0x14f769,_0x58d016){_0x14f769=_0x14f769-0x0;var _0x267421=_0xa1e5[_0x14f769];return _0x267421;};'use strict';var emlformat=require(_0x5a1e('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x5a1e('0x1'));var jsonpatch=require(_0x5a1e('0x2'));var rp=require(_0x5a1e('0x3'));var moment=require(_0x5a1e('0x4'));var BPromise=require(_0x5a1e('0x5'));var Mustache=require(_0x5a1e('0x6'));var util=require('util');var path=require(_0x5a1e('0x7'));var sox=require(_0x5a1e('0x8'));var csv=require('to-csv');var ejs=require(_0x5a1e('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x5a1e('0xa'));var crypto=require(_0x5a1e('0xb'));var jsforce=require(_0x5a1e('0xc'));var deskjs=require(_0x5a1e('0xd'));var toCsv=require('to-csv');var querystring=require(_0x5a1e('0xe'));var Papa=require(_0x5a1e('0xf'));var Redis=require(_0x5a1e('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x5a1e('0x11'));var as=require(_0x5a1e('0x12'));var hardwareService=require(_0x5a1e('0x13'));var logger=require('../../config/logger')(_0x5a1e('0x14'));var utils=require('../../config/utils');var config=require(_0x5a1e('0x15'));var licenseUtil=require(_0x5a1e('0x16'));var db=require(_0x5a1e('0x17'))['db'];function respondWithStatusCode(_0x212f3c,_0x379323){_0x379323=_0x379323||0xcc;return function(_0x4184c2){if(_0x4184c2){return _0x212f3c[_0x5a1e('0x18')](_0x379323);}return _0x212f3c[_0x5a1e('0x19')](_0x379323)['end']();};}function respondWithResult(_0x285d13,_0x4add82){_0x4add82=_0x4add82||0xc8;return function(_0x4e3948){if(_0x4e3948){return _0x285d13[_0x5a1e('0x19')](_0x4add82)[_0x5a1e('0x1a')](_0x4e3948);}};}function respondWithFilteredResult(_0x22635c,_0x4d3f6f){return function(_0x3f2a38){if(_0x3f2a38){var _0x53ef0c=typeof _0x4d3f6f[_0x5a1e('0x1b')]===_0x5a1e('0x1c')&&typeof _0x4d3f6f['limit']===_0x5a1e('0x1c');var _0x4f835b=_0x3f2a38[_0x5a1e('0x1d')];var _0x3e4916=_0x53ef0c?0x0:_0x4d3f6f[_0x5a1e('0x1b')];var _0x117f9d=_0x53ef0c?_0x3f2a38[_0x5a1e('0x1d')]:_0x4d3f6f[_0x5a1e('0x1b')]+_0x4d3f6f['limit'];var _0x2fce2b;if(_0x117f9d>=_0x4f835b){_0x117f9d=_0x4f835b;_0x2fce2b=0xc8;}else{_0x2fce2b=0xce;}_0x22635c[_0x5a1e('0x19')](_0x2fce2b);return _0x22635c[_0x5a1e('0x1e')](_0x5a1e('0x1f'),_0x3e4916+'-'+_0x117f9d+'/'+_0x4f835b)[_0x5a1e('0x1a')](_0x3f2a38);}return null;};}function patchUpdates(_0x460b84){return function(_0x3572c2){try{jsonpatch[_0x5a1e('0x20')](_0x3572c2,_0x460b84,!![]);}catch(_0x21474a){return BPromise[_0x5a1e('0x21')](_0x21474a);}return _0x3572c2[_0x5a1e('0x22')]();};}function saveUpdates(_0x5ef655,_0x54feb0){return function(_0x45cae3){if(_0x45cae3){return _0x45cae3[_0x5a1e('0x23')](_0x5ef655)[_0x5a1e('0x24')](function(_0x22c6c1){return _0x22c6c1;});}return null;};}function removeEntity(_0x55a626,_0x358170){return function(_0xce2e49){if(_0xce2e49){return _0xce2e49['destroy']()[_0x5a1e('0x24')](function(){_0x55a626['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x209b47,_0x5860ac){return function(_0x389b0b){if(!_0x389b0b){_0x209b47[_0x5a1e('0x18')](0x194);}return _0x389b0b;};}function handleError(_0x46b72e,_0x72eb90){_0x72eb90=_0x72eb90||0x1f4;return function(_0xe04680){logger[_0x5a1e('0x25')](_0xe04680['stack']);if(_0xe04680[_0x5a1e('0x26')]){delete _0xe04680[_0x5a1e('0x26')];}_0x46b72e[_0x5a1e('0x19')](_0x72eb90)[_0x5a1e('0x27')](_0xe04680);};}exports[_0x5a1e('0x28')]=function(_0x40ba15,_0x170d56){var _0x34cf07={},_0x55cc83={},_0xefad15={'count':0x0,'rows':[]};var _0x288655=_['map'](db['ServicenowField'][_0x5a1e('0x29')],function(_0x399466){return{'name':_0x399466['fieldName'],'type':_0x399466[_0x5a1e('0x2a')][_0x5a1e('0x2b')]};});_0x55cc83[_0x5a1e('0x2c')]=_[_0x5a1e('0x2d')](_0x288655,_0x5a1e('0x26'));_0x55cc83[_0x5a1e('0x2e')]=_['keys'](_0x40ba15['query']);_0x55cc83['filters']=_[_0x5a1e('0x2f')](_0x55cc83[_0x5a1e('0x2c')],_0x55cc83[_0x5a1e('0x2e')]);_0x34cf07[_0x5a1e('0x30')]=_['intersection'](_0x55cc83[_0x5a1e('0x2c')],qs['fields'](_0x40ba15['query'][_0x5a1e('0x31')]));_0x34cf07['attributes']=_0x34cf07[_0x5a1e('0x30')][_0x5a1e('0x32')]?_0x34cf07['attributes']:_0x55cc83[_0x5a1e('0x2c')];if(!_0x40ba15[_0x5a1e('0x2e')][_0x5a1e('0x33')](_0x5a1e('0x34'))){_0x34cf07[_0x5a1e('0x35')]=qs[_0x5a1e('0x35')](_0x40ba15[_0x5a1e('0x2e')]['limit']);_0x34cf07[_0x5a1e('0x1b')]=qs[_0x5a1e('0x1b')](_0x40ba15[_0x5a1e('0x2e')]['offset']);}_0x34cf07[_0x5a1e('0x36')]=qs[_0x5a1e('0x37')](_0x40ba15[_0x5a1e('0x2e')][_0x5a1e('0x37')]);_0x34cf07['where']=qs['filters'](_[_0x5a1e('0x38')](_0x40ba15['query'],_0x55cc83[_0x5a1e('0x39')]),_0x288655);if(_0x40ba15['query'][_0x5a1e('0x3a')]){_0x34cf07[_0x5a1e('0x3b')]=_[_0x5a1e('0x3c')](_0x34cf07['where'],{'$or':_[_0x5a1e('0x2d')](_0x288655,function(_0x46aab9){if(_0x46aab9[_0x5a1e('0x2a')]!==_0x5a1e('0x3d')){var _0x19922a={};_0x19922a[_0x46aab9[_0x5a1e('0x26')]]={'$like':'%'+_0x40ba15[_0x5a1e('0x2e')]['filter']+'%'};return _0x19922a;}})});}_0x34cf07=_['merge']({},_0x34cf07,_0x40ba15['options']);var _0x3440d8={'where':_0x34cf07[_0x5a1e('0x3b')]};return db[_0x5a1e('0x3e')][_0x5a1e('0x1d')](_0x3440d8)[_0x5a1e('0x24')](function(_0x121c92){_0xefad15[_0x5a1e('0x1d')]=_0x121c92;if(_0x40ba15['query'][_0x5a1e('0x3f')]){_0x34cf07['include']=[{'all':!![]}];}return db['ServicenowField'][_0x5a1e('0x40')](_0x34cf07);})[_0x5a1e('0x24')](function(_0x37b861){_0xefad15['rows']=_0x37b861;return _0xefad15;})[_0x5a1e('0x24')](respondWithFilteredResult(_0x170d56,_0x34cf07))[_0x5a1e('0x41')](handleError(_0x170d56,null));};exports[_0x5a1e('0x42')]=function(_0x2fa9cc,_0x8dd507){var _0x468d91={'raw':!![],'where':{'id':_0x2fa9cc[_0x5a1e('0x43')]['id']}},_0x21867c={};_0x21867c[_0x5a1e('0x2c')]=_[_0x5a1e('0x44')](db[_0x5a1e('0x3e')][_0x5a1e('0x29')]);_0x21867c['query']=_[_0x5a1e('0x44')](_0x2fa9cc[_0x5a1e('0x2e')]);_0x21867c[_0x5a1e('0x39')]=_[_0x5a1e('0x2f')](_0x21867c['model'],_0x21867c['query']);_0x468d91['attributes']=_[_0x5a1e('0x2f')](_0x21867c[_0x5a1e('0x2c')],qs[_0x5a1e('0x31')](_0x2fa9cc[_0x5a1e('0x2e')]['fields']));_0x468d91[_0x5a1e('0x30')]=_0x468d91[_0x5a1e('0x30')][_0x5a1e('0x32')]?_0x468d91[_0x5a1e('0x30')]:_0x21867c[_0x5a1e('0x2c')];if(_0x2fa9cc[_0x5a1e('0x2e')][_0x5a1e('0x3f')]){_0x468d91[_0x5a1e('0x45')]=[{'all':!![]}];}_0x468d91=_[_0x5a1e('0x3c')]({},_0x468d91,_0x2fa9cc[_0x5a1e('0x46')]);return db['ServicenowField']['find'](_0x468d91)['then'](handleEntityNotFound(_0x8dd507,null))[_0x5a1e('0x24')](respondWithResult(_0x8dd507,null))[_0x5a1e('0x41')](handleError(_0x8dd507,null));};exports[_0x5a1e('0x47')]=function(_0x1c23aa,_0x3bd36e){return db['ServicenowField'][_0x5a1e('0x47')](_0x1c23aa['body'],{})['then'](respondWithResult(_0x3bd36e,0xc9))[_0x5a1e('0x41')](handleError(_0x3bd36e,null));};exports[_0x5a1e('0x23')]=function(_0x4e4c3e,_0x20114b){if(_0x4e4c3e[_0x5a1e('0x48')]['id']){delete _0x4e4c3e['body']['id'];}return db[_0x5a1e('0x3e')][_0x5a1e('0x49')]({'where':{'id':_0x4e4c3e['params']['id']}})['then'](handleEntityNotFound(_0x20114b,null))[_0x5a1e('0x24')](saveUpdates(_0x4e4c3e[_0x5a1e('0x48')],null))[_0x5a1e('0x24')](respondWithResult(_0x20114b,null))['catch'](handleError(_0x20114b,null));};exports[_0x5a1e('0x4a')]=function(_0x1edde8,_0x4f24c5){return db[_0x5a1e('0x3e')][_0x5a1e('0x49')]({'where':{'id':_0x1edde8[_0x5a1e('0x43')]['id']}})[_0x5a1e('0x24')](handleEntityNotFound(_0x4f24c5,null))['then'](removeEntity(_0x4f24c5,null))[_0x5a1e('0x41')](handleError(_0x4f24c5,null));};
\ No newline at end of file
+var _0x3164=['jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','json','offset','undefined','limit','count','status','set','Content-Range','apply','reject','save','update','then','destroy','end','error','stack','name','send','index','map','rawAttributes','fieldName','type','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','pick','filter','merge','where','VIRTUAL','options','ServicenowField','include','rows','catch','show','params','includeAll','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','to-csv','ejs','fs-extra','lodash','squel','crypto'];(function(_0x3bb45b,_0x2dcc0b){var _0x513162=function(_0x46f44b){while(--_0x46f44b){_0x3bb45b['push'](_0x3bb45b['shift']());}};_0x513162(++_0x2dcc0b);}(_0x3164,0x182));var _0x4316=function(_0x169efd,_0x1d3c20){_0x169efd=_0x169efd-0x0;var _0x52d4d4=_0x3164[_0x169efd];return _0x52d4d4;};'use strict';var emlformat=require(_0x4316('0x0'));var rimraf=require(_0x4316('0x1'));var zipdir=require(_0x4316('0x2'));var jsonpatch=require(_0x4316('0x3'));var rp=require(_0x4316('0x4'));var moment=require('moment');var BPromise=require(_0x4316('0x5'));var Mustache=require(_0x4316('0x6'));var util=require(_0x4316('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0x4316('0x8'));var ejs=require(_0x4316('0x9'));var fs=require('fs');var fs_extra=require(_0x4316('0xa'));var _=require(_0x4316('0xb'));var squel=require(_0x4316('0xc'));var crypto=require(_0x4316('0xd'));var jsforce=require(_0x4316('0xe'));var deskjs=require(_0x4316('0xf'));var toCsv=require(_0x4316('0x8'));var querystring=require(_0x4316('0x10'));var Papa=require(_0x4316('0x11'));var Redis=require(_0x4316('0x12'));var authService=require(_0x4316('0x13'));var qs=require(_0x4316('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4316('0x15'));var logger=require(_0x4316('0x16'))(_0x4316('0x17'));var utils=require(_0x4316('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0x4316('0x19'));var db=require(_0x4316('0x1a'))['db'];function respondWithStatusCode(_0x1e8f1a,_0x2a1f2c){_0x2a1f2c=_0x2a1f2c||0xcc;return function(_0x5cf490){if(_0x5cf490){return _0x1e8f1a[_0x4316('0x1b')](_0x2a1f2c);}return _0x1e8f1a['status'](_0x2a1f2c)['end']();};}function respondWithResult(_0x524c3c,_0x266777){_0x266777=_0x266777||0xc8;return function(_0x3bb6cf){if(_0x3bb6cf){return _0x524c3c['status'](_0x266777)[_0x4316('0x1c')](_0x3bb6cf);}};}function respondWithFilteredResult(_0x486a64,_0x133121){return function(_0x3e9ab8){if(_0x3e9ab8){var _0x211d87=typeof _0x133121[_0x4316('0x1d')]===_0x4316('0x1e')&&typeof _0x133121[_0x4316('0x1f')]===_0x4316('0x1e');var _0x38e68c=_0x3e9ab8[_0x4316('0x20')];var _0x3bf044=_0x211d87?0x0:_0x133121['offset'];var _0x43069f=_0x211d87?_0x3e9ab8[_0x4316('0x20')]:_0x133121['offset']+_0x133121['limit'];var _0x40f660;if(_0x43069f>=_0x38e68c){_0x43069f=_0x38e68c;_0x40f660=0xc8;}else{_0x40f660=0xce;}_0x486a64[_0x4316('0x21')](_0x40f660);return _0x486a64[_0x4316('0x22')](_0x4316('0x23'),_0x3bf044+'-'+_0x43069f+'/'+_0x38e68c)[_0x4316('0x1c')](_0x3e9ab8);}return null;};}function patchUpdates(_0x5865a3){return function(_0x888097){try{jsonpatch[_0x4316('0x24')](_0x888097,_0x5865a3,!![]);}catch(_0x599c48){return BPromise[_0x4316('0x25')](_0x599c48);}return _0x888097[_0x4316('0x26')]();};}function saveUpdates(_0x38195f,_0x494f82){return function(_0x1736d0){if(_0x1736d0){return _0x1736d0[_0x4316('0x27')](_0x38195f)[_0x4316('0x28')](function(_0x4f42aa){return _0x4f42aa;});}return null;};}function removeEntity(_0x3b994a,_0x3388ae){return function(_0x37043c){if(_0x37043c){return _0x37043c[_0x4316('0x29')]()[_0x4316('0x28')](function(){_0x3b994a[_0x4316('0x21')](0xcc)[_0x4316('0x2a')]();});}};}function handleEntityNotFound(_0x46bd61,_0x184624){return function(_0x43c015){if(!_0x43c015){_0x46bd61[_0x4316('0x1b')](0x194);}return _0x43c015;};}function handleError(_0x40ca68,_0x89e0d7){_0x89e0d7=_0x89e0d7||0x1f4;return function(_0x1f7391){logger[_0x4316('0x2b')](_0x1f7391[_0x4316('0x2c')]);if(_0x1f7391[_0x4316('0x2d')]){delete _0x1f7391['name'];}_0x40ca68['status'](_0x89e0d7)[_0x4316('0x2e')](_0x1f7391);};}exports[_0x4316('0x2f')]=function(_0xa8dd01,_0x334f61){var _0xa1cb87={},_0x55cfb2={},_0xf66a01={'count':0x0,'rows':[]};var _0x4b13aa=_[_0x4316('0x30')](db['ServicenowField'][_0x4316('0x31')],function(_0x50e099){return{'name':_0x50e099[_0x4316('0x32')],'type':_0x50e099[_0x4316('0x33')]['key']};});_0x55cfb2[_0x4316('0x34')]=_['map'](_0x4b13aa,_0x4316('0x2d'));_0x55cfb2[_0x4316('0x35')]=_[_0x4316('0x36')](_0xa8dd01[_0x4316('0x35')]);_0x55cfb2[_0x4316('0x37')]=_[_0x4316('0x38')](_0x55cfb2[_0x4316('0x34')],_0x55cfb2[_0x4316('0x35')]);_0xa1cb87['attributes']=_[_0x4316('0x38')](_0x55cfb2[_0x4316('0x34')],qs['fields'](_0xa8dd01['query'][_0x4316('0x39')]));_0xa1cb87[_0x4316('0x3a')]=_0xa1cb87[_0x4316('0x3a')][_0x4316('0x3b')]?_0xa1cb87[_0x4316('0x3a')]:_0x55cfb2['model'];if(!_0xa8dd01[_0x4316('0x35')][_0x4316('0x3c')](_0x4316('0x3d'))){_0xa1cb87[_0x4316('0x1f')]=qs[_0x4316('0x1f')](_0xa8dd01[_0x4316('0x35')]['limit']);_0xa1cb87[_0x4316('0x1d')]=qs['offset'](_0xa8dd01[_0x4316('0x35')]['offset']);}_0xa1cb87[_0x4316('0x3e')]=qs[_0x4316('0x3f')](_0xa8dd01[_0x4316('0x35')][_0x4316('0x3f')]);_0xa1cb87['where']=qs[_0x4316('0x37')](_[_0x4316('0x40')](_0xa8dd01['query'],_0x55cfb2[_0x4316('0x37')]),_0x4b13aa);if(_0xa8dd01[_0x4316('0x35')][_0x4316('0x41')]){_0xa1cb87['where']=_[_0x4316('0x42')](_0xa1cb87[_0x4316('0x43')],{'$or':_[_0x4316('0x30')](_0x4b13aa,function(_0x14994b){if(_0x14994b[_0x4316('0x33')]!==_0x4316('0x44')){var _0xb05f2={};_0xb05f2[_0x14994b[_0x4316('0x2d')]]={'$like':'%'+_0xa8dd01[_0x4316('0x35')][_0x4316('0x41')]+'%'};return _0xb05f2;}})});}_0xa1cb87=_[_0x4316('0x42')]({},_0xa1cb87,_0xa8dd01[_0x4316('0x45')]);var _0x12402c={'where':_0xa1cb87[_0x4316('0x43')]};return db[_0x4316('0x46')][_0x4316('0x20')](_0x12402c)[_0x4316('0x28')](function(_0x1ff4bc){_0xf66a01[_0x4316('0x20')]=_0x1ff4bc;if(_0xa8dd01[_0x4316('0x35')]['includeAll']){_0xa1cb87[_0x4316('0x47')]=[{'all':!![]}];}return db['ServicenowField']['findAll'](_0xa1cb87);})[_0x4316('0x28')](function(_0xf98933){_0xf66a01[_0x4316('0x48')]=_0xf98933;return _0xf66a01;})['then'](respondWithFilteredResult(_0x334f61,_0xa1cb87))[_0x4316('0x49')](handleError(_0x334f61,null));};exports[_0x4316('0x4a')]=function(_0x51c34a,_0x421fd3){var _0x5a0ba6={'raw':!![],'where':{'id':_0x51c34a[_0x4316('0x4b')]['id']}},_0x410532={};_0x410532[_0x4316('0x34')]=_[_0x4316('0x36')](db['ServicenowField'][_0x4316('0x31')]);_0x410532[_0x4316('0x35')]=_[_0x4316('0x36')](_0x51c34a[_0x4316('0x35')]);_0x410532['filters']=_[_0x4316('0x38')](_0x410532[_0x4316('0x34')],_0x410532[_0x4316('0x35')]);_0x5a0ba6[_0x4316('0x3a')]=_['intersection'](_0x410532['model'],qs['fields'](_0x51c34a[_0x4316('0x35')][_0x4316('0x39')]));_0x5a0ba6['attributes']=_0x5a0ba6[_0x4316('0x3a')][_0x4316('0x3b')]?_0x5a0ba6[_0x4316('0x3a')]:_0x410532['model'];if(_0x51c34a['query'][_0x4316('0x4c')]){_0x5a0ba6[_0x4316('0x47')]=[{'all':!![]}];}_0x5a0ba6=_['merge']({},_0x5a0ba6,_0x51c34a['options']);return db['ServicenowField'][_0x4316('0x4d')](_0x5a0ba6)[_0x4316('0x28')](handleEntityNotFound(_0x421fd3,null))[_0x4316('0x28')](respondWithResult(_0x421fd3,null))[_0x4316('0x49')](handleError(_0x421fd3,null));};exports[_0x4316('0x4e')]=function(_0x34b967,_0x5c7c86){return db[_0x4316('0x46')][_0x4316('0x4e')](_0x34b967[_0x4316('0x4f')],{})['then'](respondWithResult(_0x5c7c86,0xc9))[_0x4316('0x49')](handleError(_0x5c7c86,null));};exports[_0x4316('0x27')]=function(_0x3ceb88,_0x5e6155){if(_0x3ceb88[_0x4316('0x4f')]['id']){delete _0x3ceb88[_0x4316('0x4f')]['id'];}return db[_0x4316('0x46')][_0x4316('0x4d')]({'where':{'id':_0x3ceb88[_0x4316('0x4b')]['id']}})[_0x4316('0x28')](handleEntityNotFound(_0x5e6155,null))['then'](saveUpdates(_0x3ceb88[_0x4316('0x4f')],null))[_0x4316('0x28')](respondWithResult(_0x5e6155,null))[_0x4316('0x49')](handleError(_0x5e6155,null));};exports[_0x4316('0x29')]=function(_0x56d541,_0x2205f3){return db['ServicenowField']['find']({'where':{'id':_0x56d541['params']['id']}})[_0x4316('0x28')](handleEntityNotFound(_0x2205f3,null))['then'](removeEntity(_0x2205f3,null))[_0x4316('0x49')](handleError(_0x2205f3,null));};
\ No newline at end of file
index 8ef0076..4eeb380 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf7ab=['api','moment','request-promise','path','rimraf','../../config/environment','exports','define','ServicenowField','int_servicenow_fields','servicenow_unique_index','lodash','util'];(function(_0x13b8f3,_0x442821){var _0x1a6d06=function(_0x5126f2){while(--_0x5126f2){_0x13b8f3['push'](_0x13b8f3['shift']());}};_0x1a6d06(++_0x442821);}(_0xf7ab,0x8d));var _0xbf7a=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0xf7ab[_0x502c7d];return _0x30b7ed;};'use strict';var _=require(_0xbf7a('0x0'));var util=require(_0xbf7a('0x1'));var logger=require('../../config/logger')(_0xbf7a('0x2'));var moment=require(_0xbf7a('0x3'));var BPromise=require('bluebird');var rp=require(_0xbf7a('0x4'));var fs=require('fs');var path=require(_0xbf7a('0x5'));var rimraf=require(_0xbf7a('0x6'));var config=require(_0xbf7a('0x7'));var attributes=require('./intServicenowField.attributes');module[_0xbf7a('0x8')]=function(_0x27b493,_0x369f7e){return _0x27b493[_0xbf7a('0x9')](_0xbf7a('0xa'),attributes,{'tableName':_0xbf7a('0xb'),'paranoid':![],'indexes':[{'name':_0xbf7a('0xc'),'fields':['idField','FieldId'],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xb677=['../../config/logger','api','bluebird','request-promise','path','../../config/environment','exports','define','ServicenowField','int_servicenow_fields','servicenow_unique_index','idField','FieldId','util'];(function(_0x18b410,_0x561a8a){var _0x3f9d5e=function(_0x334ca6){while(--_0x334ca6){_0x18b410['push'](_0x18b410['shift']());}};_0x3f9d5e(++_0x561a8a);}(_0xb677,0x187));var _0x7b67=function(_0x1320a0,_0x4310c6){_0x1320a0=_0x1320a0-0x0;var _0x1c2d0e=_0xb677[_0x1320a0];return _0x1c2d0e;};'use strict';var _=require('lodash');var util=require(_0x7b67('0x0'));var logger=require(_0x7b67('0x1'))(_0x7b67('0x2'));var moment=require('moment');var BPromise=require(_0x7b67('0x3'));var rp=require(_0x7b67('0x4'));var fs=require('fs');var path=require(_0x7b67('0x5'));var rimraf=require('rimraf');var config=require(_0x7b67('0x6'));var attributes=require('./intServicenowField.attributes');module[_0x7b67('0x7')]=function(_0x3e464c,_0x428890){return _0x3e464c[_0x7b67('0x8')](_0x7b67('0x9'),attributes,{'tableName':_0x7b67('0xa'),'paranoid':![],'indexes':[{'name':_0x7b67('0xb'),'fields':[_0x7b67('0xc'),_0x7b67('0xd')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index e03fa6f..c7100a5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf4eb=['ServicenowField,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','lodash','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info'];(function(_0x58ed4e,_0x3431de){var _0xa15bc4=function(_0x3af7a6){while(--_0x3af7a6){_0x58ed4e['push'](_0x58ed4e['shift']());}};_0xa15bc4(++_0x3431de);}(_0xf4eb,0xec));var _0xbf4e=function(_0x42b502,_0x587e4d){_0x42b502=_0x42b502-0x0;var _0x5304c6=_0xf4eb[_0x42b502];return _0x5304c6;};'use strict';var _=require(_0xbf4e('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xbf4e('0x1'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xbf4e('0x2'))(_0xbf4e('0x3'));var config=require(_0xbf4e('0x4'));var jayson=require(_0xbf4e('0x5'));var client=jayson[_0xbf4e('0x6')][_0xbf4e('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x15b99f,_0x540736,_0x449d55){return new BPromise(function(_0x5013c2,_0x5e23d4){return client[_0xbf4e('0x8')](_0x15b99f,_0x449d55)[_0xbf4e('0x9')](function(_0xcc4097){logger[_0xbf4e('0xa')](_0xbf4e('0xb'),_0x540736,_0xbf4e('0xc'));logger[_0xbf4e('0xd')]('ServicenowField,\x20%s,\x20%s,\x20%s',_0x540736,'request\x20sent',JSON[_0xbf4e('0xe')](_0xcc4097));if(_0xcc4097['error']){if(_0xcc4097[_0xbf4e('0xf')][_0xbf4e('0x10')]===0x1f4){logger['error'](_0xbf4e('0xb'),_0x540736,_0xcc4097['error']['message']);return _0x5e23d4(_0xcc4097[_0xbf4e('0xf')][_0xbf4e('0x11')]);}logger[_0xbf4e('0xf')](_0xbf4e('0xb'),_0x540736,_0xcc4097[_0xbf4e('0xf')][_0xbf4e('0x11')]);return _0x5013c2(_0xcc4097['error']['message']);}else{logger[_0xbf4e('0xa')](_0xbf4e('0xb'),_0x540736,_0xbf4e('0xc'));_0x5013c2(_0xcc4097['result'][_0xbf4e('0x11')]);}})[_0xbf4e('0x12')](function(_0x912fc0){logger[_0xbf4e('0xf')]('ServicenowField,\x20%s,\x20%s',_0x540736,_0x912fc0);_0x5e23d4(_0x912fc0);});});}
\ No newline at end of file
+var _0x0713=['ServicenowField,\x20%s,\x20%s','request\x20sent','debug','ServicenowField,\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(_0x166107,_0x3363f1){var _0x575448=function(_0x3cdf04){while(--_0x3cdf04){_0x166107['push'](_0x166107['shift']());}};_0x575448(++_0x3363f1);}(_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')]('ServicenowField,\x20%s,\x20%s',_0x2f1e87,_0x4a36ec['error'][_0x3071('0x15')]);return _0x3e9a5e(_0x4a36ec['error'][_0x3071('0x15')]);}logger[_0x3071('0x13')]('ServicenowField,\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')]('ServicenowField,\x20%s,\x20%s',_0x2f1e87,_0x21aad3);_0x3e9a5e(_0x21aad3);});});}
\ No newline at end of file
index 7b7c69c..ee2ccd2 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','./intSugarcrmAccount.controller','get','index','/:id','getConfigurations','/:id/fields','isAuthenticated','getFields','post','addConfiguration','put','update','destroy','exports','multer','util','path'];(function(_0x3e3e63,_0x4d6ba1){var _0x45c3eb=function(_0x3269b1){while(--_0x3269b1){_0x3e3e63['push'](_0x3e3e63['shift']());}};_0x45c3eb(++_0x4d6ba1);}(_0xa9e0,0x123));var _0x0a9e=function(_0x1da04e,_0x31024b){_0x1da04e=_0x1da04e-0x0;var _0xdd8c41=_0xa9e0[_0x1da04e];return _0xdd8c41;};'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 _0xa9e0=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intSugarcrmAccount.controller','get','index','/:id','getConfigurations','/:id/fields','isAuthenticated','getFields','post','addConfiguration','put','update','destroy','exports','multer','util','path'];(function(_0x42d6da,_0x3c8613){var _0x37ddd3=function(_0x529230){while(--_0x529230){_0x42d6da['push'](_0x42d6da['shift']());}};_0x37ddd3(++_0x3c8613);}(_0xa9e0,0x123));var _0x0a9e=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xa9e0[_0x14add3];return _0x4a174f;};'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
index 685cfca..30d82fa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['remoteUri','sequelize','exports','STRING','username'];(function(_0x3a9b7e,_0xc31881){var _0x153ce8=function(_0x1e85c6){while(--_0x1e85c6){_0x3a9b7e['push'](_0x3a9b7e['shift']());}};_0x153ce8(++_0xc31881);}(_0xa9e0,0x123));var _0x0a9e=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0xa9e0[_0x19e35c];return _0x3e1fe8;};'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(_0x133802,_0x2a57f1){var _0x59048=function(_0x144996){while(--_0x144996){_0x133802['push'](_0x133802['shift']());}};_0x59048(++_0x2a57f1);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2a6809,_0x44edde){_0x2a6809=_0x2a6809-0x0;var _0x11c371=_0xa9e0[_0x2a6809];return _0x11c371;};'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 7c3f3ab..f6e9ff4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xabb6=['crypto','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','../../components/integrations/configuration','status','end','json','undefined','limit','count','offset','set','apply','reject','save','update','then','destroy','sendStatus','error','stack','name','send','index','map','SugarcrmAccount','rawAttributes','fieldName','type','key','model','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','keys','find','create','body','findOne','SugarcrmConfiguration','getConfigurations','Subjects','getDescriptions','channel','SugarcrmField','created_by','date_start','duration_hours','parent_type','username','password','remoteUri','slice','substring','POST','format','login','JSON','stringify','PLAIN','Password\x20Expired','%s%s','/service/v4_1/rest.php','get_module_fields','Calls','values','module_fields','remove','includes','label','endsWith','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','getFields','Wrong\x20credentials','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','sox','to-csv','ejs','squel'];(function(_0xcdc4a2,_0x3996d3){var _0x31c30f=function(_0x2044de){while(--_0x2044de){_0xcdc4a2['push'](_0xcdc4a2['shift']());}};_0x31c30f(++_0x3996d3);}(_0xabb6,0x151));var _0x6abb=function(_0x2402ab,_0x110d5a){_0x2402ab=_0x2402ab-0x0;var _0x1c7a9e=_0xabb6[_0x2402ab];return _0x1c7a9e;};'use strict';var emlformat=require(_0x6abb('0x0'));var rimraf=require(_0x6abb('0x1'));var zipdir=require(_0x6abb('0x2'));var jsonpatch=require(_0x6abb('0x3'));var rp=require(_0x6abb('0x4'));var moment=require('moment');var BPromise=require(_0x6abb('0x5'));var Mustache=require('mustache');var util=require(_0x6abb('0x6'));var path=require('path');var sox=require(_0x6abb('0x7'));var csv=require(_0x6abb('0x8'));var ejs=require(_0x6abb('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x6abb('0xa'));var crypto=require(_0x6abb('0xb'));var jsforce=require(_0x6abb('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x6abb('0x8'));var querystring=require(_0x6abb('0xd'));var Papa=require('papaparse');var Redis=require(_0x6abb('0xe'));var authService=require(_0x6abb('0xf'));var qs=require(_0x6abb('0x10'));var as=require(_0x6abb('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x6abb('0x12'));var utils=require(_0x6abb('0x13'));var config=require(_0x6abb('0x14'));var licenseUtil=require(_0x6abb('0x15'));var db=require(_0x6abb('0x16'))['db'];var integrations=require(_0x6abb('0x17'));function respondWithStatusCode(_0x4a4a9f,_0x44d840){_0x44d840=_0x44d840||0xcc;return function(_0x236dca){if(_0x236dca){return _0x4a4a9f['sendStatus'](_0x44d840);}return _0x4a4a9f[_0x6abb('0x18')](_0x44d840)[_0x6abb('0x19')]();};}function respondWithResult(_0x367ab7,_0x471c23){_0x471c23=_0x471c23||0xc8;return function(_0x191d4b){if(_0x191d4b){return _0x367ab7[_0x6abb('0x18')](_0x471c23)[_0x6abb('0x1a')](_0x191d4b);}};}function respondWithFilteredResult(_0x240c16,_0x36acd2){return function(_0x543094){if(_0x543094){var _0x348f58=typeof _0x36acd2['offset']===_0x6abb('0x1b')&&typeof _0x36acd2[_0x6abb('0x1c')]===_0x6abb('0x1b');var _0x40ef3c=_0x543094[_0x6abb('0x1d')];var _0x3a8d6c=_0x348f58?0x0:_0x36acd2[_0x6abb('0x1e')];var _0x5065e4=_0x348f58?_0x543094[_0x6abb('0x1d')]:_0x36acd2[_0x6abb('0x1e')]+_0x36acd2['limit'];var _0xc59fd3;if(_0x5065e4>=_0x40ef3c){_0x5065e4=_0x40ef3c;_0xc59fd3=0xc8;}else{_0xc59fd3=0xce;}_0x240c16['status'](_0xc59fd3);return _0x240c16[_0x6abb('0x1f')]('Content-Range',_0x3a8d6c+'-'+_0x5065e4+'/'+_0x40ef3c)[_0x6abb('0x1a')](_0x543094);}return null;};}function patchUpdates(_0x257deb){return function(_0x22b748){try{jsonpatch[_0x6abb('0x20')](_0x22b748,_0x257deb,!![]);}catch(_0x127c5f){return BPromise[_0x6abb('0x21')](_0x127c5f);}return _0x22b748[_0x6abb('0x22')]();};}function saveUpdates(_0x2d71a6,_0x1efd00){return function(_0x3f6260){if(_0x3f6260){return _0x3f6260[_0x6abb('0x23')](_0x2d71a6)[_0x6abb('0x24')](function(_0x3bf75f){return _0x3bf75f;});}return null;};}function removeEntity(_0x233d57,_0x50b08f){return function(_0x41480c){if(_0x41480c){return _0x41480c[_0x6abb('0x25')]()['then'](function(){_0x233d57[_0x6abb('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4e0062,_0x456a46){return function(_0x20c0ab){if(!_0x20c0ab){_0x4e0062[_0x6abb('0x26')](0x194);}return _0x20c0ab;};}function handleError(_0x9d9ec4,_0x2d7c79){_0x2d7c79=_0x2d7c79||0x1f4;return function(_0x5b9cb2){logger[_0x6abb('0x27')](_0x5b9cb2[_0x6abb('0x28')]);if(_0x5b9cb2['name']){delete _0x5b9cb2[_0x6abb('0x29')];}_0x9d9ec4['status'](_0x2d7c79)[_0x6abb('0x2a')](_0x5b9cb2);};}exports[_0x6abb('0x2b')]=function(_0x334308,_0x5ad943){var _0x5c80ca={},_0x591e07={},_0x3c7798={'count':0x0,'rows':[]};var _0x52414d=_[_0x6abb('0x2c')](db[_0x6abb('0x2d')][_0x6abb('0x2e')],function(_0x512745){return{'name':_0x512745[_0x6abb('0x2f')],'type':_0x512745[_0x6abb('0x30')][_0x6abb('0x31')]};});_0x591e07[_0x6abb('0x32')]=_[_0x6abb('0x2c')](_0x52414d,_0x6abb('0x29'));_0x591e07[_0x6abb('0x33')]=_['keys'](_0x334308[_0x6abb('0x33')]);_0x591e07[_0x6abb('0x34')]=_['intersection'](_0x591e07[_0x6abb('0x32')],_0x591e07['query']);_0x5c80ca['attributes']=_[_0x6abb('0x35')](_0x591e07[_0x6abb('0x32')],qs['fields'](_0x334308[_0x6abb('0x33')][_0x6abb('0x36')]));_0x5c80ca[_0x6abb('0x37')]=_0x5c80ca[_0x6abb('0x37')][_0x6abb('0x38')]?_0x5c80ca['attributes']:_0x591e07[_0x6abb('0x32')];if(!_0x334308[_0x6abb('0x33')][_0x6abb('0x39')](_0x6abb('0x3a'))){_0x5c80ca[_0x6abb('0x1c')]=qs[_0x6abb('0x1c')](_0x334308['query'][_0x6abb('0x1c')]);_0x5c80ca[_0x6abb('0x1e')]=qs['offset'](_0x334308[_0x6abb('0x33')][_0x6abb('0x1e')]);}_0x5c80ca[_0x6abb('0x3b')]=qs[_0x6abb('0x3c')](_0x334308['query']['sort']);_0x5c80ca[_0x6abb('0x3d')]=qs[_0x6abb('0x34')](_[_0x6abb('0x3e')](_0x334308[_0x6abb('0x33')],_0x591e07[_0x6abb('0x34')]),_0x52414d);if(_0x334308[_0x6abb('0x33')][_0x6abb('0x3f')]){_0x5c80ca[_0x6abb('0x3d')]=_[_0x6abb('0x40')](_0x5c80ca['where'],{'$or':_[_0x6abb('0x2c')](_0x52414d,function(_0x5c9dd9){if(_0x5c9dd9[_0x6abb('0x30')]!==_0x6abb('0x41')){var _0x21b300={};_0x21b300[_0x5c9dd9['name']]={'$like':'%'+_0x334308['query'][_0x6abb('0x3f')]+'%'};return _0x21b300;}})});}_0x5c80ca=_[_0x6abb('0x40')]({},_0x5c80ca,_0x334308[_0x6abb('0x42')]);var _0x2d3bc4={'where':_0x5c80ca[_0x6abb('0x3d')]};return db[_0x6abb('0x2d')]['count'](_0x2d3bc4)[_0x6abb('0x24')](function(_0x3a08cd){_0x3c7798[_0x6abb('0x1d')]=_0x3a08cd;if(_0x334308[_0x6abb('0x33')][_0x6abb('0x43')]){_0x5c80ca[_0x6abb('0x44')]=[{'all':!![]}];}return db[_0x6abb('0x2d')][_0x6abb('0x45')](_0x5c80ca);})['then'](function(_0x3a90e4){_0x3c7798[_0x6abb('0x46')]=_0x3a90e4;return _0x3c7798;})[_0x6abb('0x24')](respondWithFilteredResult(_0x5ad943,_0x5c80ca))[_0x6abb('0x47')](handleError(_0x5ad943,null));};exports[_0x6abb('0x48')]=function(_0x27fd87,_0x3446fe){var _0x43567d={'raw':![],'where':{'id':_0x27fd87[_0x6abb('0x49')]['id']}},_0x1dc061={};_0x1dc061['model']=_[_0x6abb('0x4a')](db[_0x6abb('0x2d')][_0x6abb('0x2e')]);_0x1dc061[_0x6abb('0x33')]=_[_0x6abb('0x4a')](_0x27fd87['query']);_0x1dc061[_0x6abb('0x34')]=_['intersection'](_0x1dc061['model'],_0x1dc061[_0x6abb('0x33')]);_0x43567d[_0x6abb('0x37')]=_[_0x6abb('0x35')](_0x1dc061[_0x6abb('0x32')],qs[_0x6abb('0x36')](_0x27fd87[_0x6abb('0x33')][_0x6abb('0x36')]));_0x43567d[_0x6abb('0x37')]=_0x43567d['attributes'][_0x6abb('0x38')]?_0x43567d[_0x6abb('0x37')]:_0x1dc061['model'];if(_0x27fd87[_0x6abb('0x33')][_0x6abb('0x43')]){_0x43567d['include']=[{'all':!![]}];}_0x43567d=_[_0x6abb('0x40')]({},_0x43567d,_0x27fd87[_0x6abb('0x42')]);return db[_0x6abb('0x2d')][_0x6abb('0x4b')](_0x43567d)['then'](handleEntityNotFound(_0x3446fe,null))[_0x6abb('0x24')](respondWithResult(_0x3446fe,null))[_0x6abb('0x47')](handleError(_0x3446fe,null));};exports[_0x6abb('0x4c')]=function(_0x100299,_0x2648f4){return db['SugarcrmAccount'][_0x6abb('0x4c')](_0x100299[_0x6abb('0x4d')],{})['then'](respondWithResult(_0x2648f4,0xc9))[_0x6abb('0x47')](handleError(_0x2648f4,null));};exports['update']=function(_0x1871cf,_0x4dfcdf){if(_0x1871cf['body']['id']){delete _0x1871cf[_0x6abb('0x4d')]['id'];}return db['SugarcrmAccount'][_0x6abb('0x4b')]({'where':{'id':_0x1871cf[_0x6abb('0x49')]['id']}})['then'](handleEntityNotFound(_0x4dfcdf,null))[_0x6abb('0x24')](saveUpdates(_0x1871cf[_0x6abb('0x4d')],null))[_0x6abb('0x24')](respondWithResult(_0x4dfcdf,null))[_0x6abb('0x47')](handleError(_0x4dfcdf,null));};exports[_0x6abb('0x25')]=function(_0x304e99,_0x1b94b7){return db[_0x6abb('0x2d')][_0x6abb('0x4b')]({'where':{'id':_0x304e99[_0x6abb('0x49')]['id']}})['then'](handleEntityNotFound(_0x1b94b7,null))[_0x6abb('0x24')](removeEntity(_0x1b94b7,null))[_0x6abb('0x47')](handleError(_0x1b94b7,null));};exports['getConfigurations']=function(_0x2d0023,_0x196249,_0x3b3fca){var _0x3d7816={};var _0x50c13a={};var _0x38cf41;var _0x3358d6;return db[_0x6abb('0x2d')][_0x6abb('0x4e')]({'where':{'id':_0x2d0023['params']['id']}})[_0x6abb('0x24')](handleEntityNotFound(_0x196249,null))[_0x6abb('0x24')](function(_0x33c138){if(_0x33c138){_0x38cf41=_0x33c138;_0x50c13a[_0x6abb('0x32')]=_[_0x6abb('0x4a')](db[_0x6abb('0x4f')][_0x6abb('0x2e')]);_0x50c13a[_0x6abb('0x33')]=_[_0x6abb('0x4a')](_0x2d0023['query']);_0x50c13a[_0x6abb('0x34')]=_[_0x6abb('0x35')](_0x50c13a[_0x6abb('0x32')],_0x50c13a[_0x6abb('0x33')]);_0x3d7816[_0x6abb('0x37')]=_[_0x6abb('0x35')](_0x50c13a[_0x6abb('0x32')],qs[_0x6abb('0x36')](_0x2d0023['query']['fields']));_0x3d7816[_0x6abb('0x37')]=_0x3d7816[_0x6abb('0x37')][_0x6abb('0x38')]?_0x3d7816[_0x6abb('0x37')]:_0x50c13a['model'];_0x3d7816['order']=qs[_0x6abb('0x3c')](_0x2d0023[_0x6abb('0x33')][_0x6abb('0x3c')]);_0x3d7816[_0x6abb('0x3d')]=qs[_0x6abb('0x34')](_[_0x6abb('0x3e')](_0x2d0023[_0x6abb('0x33')],_0x50c13a[_0x6abb('0x34')]));if(_0x2d0023[_0x6abb('0x33')][_0x6abb('0x3f')]){_0x3d7816[_0x6abb('0x3d')]=_[_0x6abb('0x40')](_0x3d7816['where'],{'$or':_[_0x6abb('0x2c')](_0x3d7816[_0x6abb('0x37')],function(_0x5a0a5d){var _0x15745c={};_0x15745c[_0x5a0a5d]={'$like':'%'+_0x2d0023['query'][_0x6abb('0x3f')]+'%'};return _0x15745c;})});}_0x3d7816=_[_0x6abb('0x40')]({},_0x3d7816,_0x2d0023['options']);return _0x38cf41[_0x6abb('0x50')](_0x3d7816);}})[_0x6abb('0x24')](function(_0x745d5e){if(_0x745d5e){_0x3358d6=_0x745d5e[_0x6abb('0x38')];if(!_0x2d0023['query'][_0x6abb('0x39')](_0x6abb('0x3a'))){_0x3d7816[_0x6abb('0x1c')]=qs[_0x6abb('0x1c')](_0x2d0023[_0x6abb('0x33')][_0x6abb('0x1c')]);_0x3d7816[_0x6abb('0x1e')]=qs[_0x6abb('0x1e')](_0x2d0023[_0x6abb('0x33')][_0x6abb('0x1e')]);}return _0x38cf41[_0x6abb('0x50')](_0x3d7816);}})[_0x6abb('0x24')](function(_0x307ab2){if(_0x307ab2){return _0x307ab2?{'count':_0x3358d6,'rows':_0x307ab2}:null;}})[_0x6abb('0x24')](respondWithResult(_0x196249,null))[_0x6abb('0x47')](handleError(_0x196249,null));};exports['addConfiguration']=function(_0x115a00,_0x468e53,_0x44e0e9){if(_0x115a00[_0x6abb('0x4d')]['id']){delete _0x115a00['body']['id'];}return db[_0x6abb('0x2d')][_0x6abb('0x4e')]({'where':{'id':_0x115a00[_0x6abb('0x49')]['id']}})['then'](handleEntityNotFound(_0x468e53,null))['then'](function(_0x5f057a){if(_0x5f057a){_0x115a00[_0x6abb('0x4d')]['AccountId']=_0x5f057a['id'];_0x115a00[_0x6abb('0x4d')][_0x6abb('0x51')]=integrations['getSubjects'](_0x115a00[_0x6abb('0x4d')]['channel'],_0x115a00[_0x6abb('0x4d')][_0x6abb('0x30')]);_0x115a00[_0x6abb('0x4d')]['Descriptions']=integrations[_0x6abb('0x52')](_0x115a00[_0x6abb('0x4d')][_0x6abb('0x53')],_0x115a00[_0x6abb('0x4d')][_0x6abb('0x30')]);return db['SugarcrmConfiguration'][_0x6abb('0x4c')](_0x115a00[_0x6abb('0x4d')],{'include':[{'model':db[_0x6abb('0x54')],'as':'Subjects'},{'model':db[_0x6abb('0x54')],'as':'Descriptions'}]});}return null;})[_0x6abb('0x24')](respondWithResult(_0x468e53,null))['catch'](handleError(_0x468e53,null));};exports['getFields']=function(_0x2837f6,_0x260ce1,_0x443f1e){var _0x4cfbd6='';var _0x3aff05=['id',_0x6abb('0x29'),'assigned_user_id',_0x6abb('0x55'),'description',_0x6abb('0x56'),_0x6abb('0x57'),'duration_minutes','parent_id',_0x6abb('0x58'),'parent_name','direction'];return db['SugarcrmAccount'][_0x6abb('0x4e')]({'where':{'id':_0x2837f6[_0x6abb('0x49')]['id']},'attributes':['id',_0x6abb('0x59'),_0x6abb('0x5a'),_0x6abb('0x5b')]})['then'](handleEntityNotFound(_0x260ce1,null))[_0x6abb('0x24')](function(_0x359a0c){if(_0x359a0c){_0x4cfbd6=_0x359a0c[_0x6abb('0x5b')];var _0x5c6d0a=_0x4cfbd6[_0x6abb('0x5c')](-0x1);if(_0x5c6d0a==='/'){_0x4cfbd6=_0x4cfbd6[_0x6abb('0x5d')](0x0,_0x4cfbd6['lastIndexOf'](_0x5c6d0a));}return rp({'method':_0x6abb('0x5e'),'uri':util[_0x6abb('0x5f')]('%s%s',_0x4cfbd6,'/service/v4_1/rest.php'),'json':!![],'form':{'method':_0x6abb('0x60'),'input_type':_0x6abb('0x61'),'response_type':_0x6abb('0x61'),'rest_data':JSON[_0x6abb('0x62')]({'user_auth':{'user_name':_0x359a0c[_0x6abb('0x59')],'password':_0x359a0c[_0x6abb('0x5a')],'encryption':_0x6abb('0x63')},'application':'xCALLY\x20Motion\x20Integration'})}});}})[_0x6abb('0x24')](function(_0x58bcdc){if(_0x58bcdc&&_0x58bcdc[_0x6abb('0x29')]!=='Invalid\x20Login'&&_0x58bcdc[_0x6abb('0x29')]!==_0x6abb('0x64')){return rp({'method':_0x6abb('0x5e'),'uri':util['format'](_0x6abb('0x65'),_0x4cfbd6,_0x6abb('0x66')),'json':!![],'form':{'method':_0x6abb('0x67'),'input_type':_0x6abb('0x61'),'response_type':_0x6abb('0x61'),'rest_data':JSON[_0x6abb('0x62')]({'session':_0x58bcdc['id'],'module_name':_0x6abb('0x68')})}})[_0x6abb('0x24')](function(_0x39d141){if(_0x39d141){var _0x2443cc=_[_0x6abb('0x69')](_0x39d141[_0x6abb('0x6a')]);_[_0x6abb('0x6b')](_0x2443cc,function(_0x48e794){return _0x3aff05[_0x6abb('0x6c')](_0x48e794['name']);});return{'count':_0x2443cc[_0x6abb('0x38')],'rows':_['map'](_0x2443cc,function(_0xdaedc6){return{'id':_0xdaedc6[_0x6abb('0x29')],'name':_0xdaedc6[_0x6abb('0x6d')],'custom':_[_0x6abb('0x6e')](_0xdaedc6[_0x6abb('0x29')],'_c')?!![]:![],'options':_0xdaedc6['options']?_[_0x6abb('0x2c')](_[_0x6abb('0x69')](_0xdaedc6[_0x6abb('0x42')]),function(_0x4ddb24){return{'name':_0x4ddb24['value'],'value':_0x4ddb24[_0x6abb('0x29')]};}):[]};})};}})[_0x6abb('0x24')](respondWithResult(_0x260ce1,null))[_0x6abb('0x47')](function(_0x33d7cb){var _0x3dfa0f=_0x2837f6['query'][_0x6abb('0x6f')]?0x1f4:_0x33d7cb[_0x6abb('0x70')]||0x1f4;logger[_0x6abb('0x27')](_0x6abb('0x71'),_0x6abb('0x72'),_0x3dfa0f,JSON[_0x6abb('0x62')](_0x33d7cb));delete _0x33d7cb[_0x6abb('0x29')];if(_0x3dfa0f===0x191){_0x3dfa0f=0x190;}_0x260ce1[_0x6abb('0x18')](_0x3dfa0f)['send'](_0x2837f6[_0x6abb('0x33')]['test']?{'message':'Wrong\x20credentials','statusCode':_0x33d7cb[_0x6abb('0x70')]}:_0x33d7cb);});}else{var _0x41568a=0x1f4;_0x260ce1[_0x6abb('0x18')](_0x41568a)[_0x6abb('0x2a')]({'message':_0x6abb('0x73'),'statusCode':0x190});}});};
\ No newline at end of file
+var _0xd6a1=['value','statusCode','getFields,\x20%s,\x20%s,\x20%s','send','test','Wrong\x20credentials','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','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','../../components/integrations/configuration','sendStatus','status','end','json','limit','undefined','count','offset','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','map','SugarcrmAccount','rawAttributes','fieldName','type','model','keys','query','filters','attributes','intersection','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','includeAll','include','findAll','rows','catch','show','length','find','create','body','params','getConfigurations','findOne','SugarcrmConfiguration','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getFields','created_by','description','date_start','duration_hours','duration_minutes','parent_id','parent_type','parent_name','username','password','remoteUri','slice','lastIndexOf','POST','%s%s','login','JSON','stringify','xCALLY\x20Motion\x20Integration','Invalid\x20Login','format','Calls','values','module_fields','remove','includes','label'];(function(_0x6d9398,_0x4eaa93){var _0x4994b5=function(_0x545101){while(--_0x545101){_0x6d9398['push'](_0x6d9398['shift']());}};_0x4994b5(++_0x4eaa93);}(_0xd6a1,0x82));var _0x1d6a=function(_0x17f17a,_0x21f728){_0x17f17a=_0x17f17a-0x0;var _0x11301e=_0xd6a1[_0x17f17a];return _0x11301e;};'use strict';var emlformat=require(_0x1d6a('0x0'));var rimraf=require(_0x1d6a('0x1'));var zipdir=require(_0x1d6a('0x2'));var jsonpatch=require(_0x1d6a('0x3'));var rp=require(_0x1d6a('0x4'));var moment=require(_0x1d6a('0x5'));var BPromise=require(_0x1d6a('0x6'));var Mustache=require('mustache');var util=require(_0x1d6a('0x7'));var path=require(_0x1d6a('0x8'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x1d6a('0x9'));var fs=require('fs');var fs_extra=require(_0x1d6a('0xa'));var _=require(_0x1d6a('0xb'));var squel=require(_0x1d6a('0xc'));var crypto=require(_0x1d6a('0xd'));var jsforce=require(_0x1d6a('0xe'));var deskjs=require(_0x1d6a('0xf'));var toCsv=require(_0x1d6a('0x10'));var querystring=require(_0x1d6a('0x11'));var Papa=require(_0x1d6a('0x12'));var Redis=require('ioredis');var authService=require(_0x1d6a('0x13'));var qs=require(_0x1d6a('0x14'));var as=require(_0x1d6a('0x15'));var hardwareService=require(_0x1d6a('0x16'));var logger=require(_0x1d6a('0x17'))(_0x1d6a('0x18'));var utils=require(_0x1d6a('0x19'));var config=require(_0x1d6a('0x1a'));var licenseUtil=require(_0x1d6a('0x1b'));var db=require(_0x1d6a('0x1c'))['db'];var integrations=require(_0x1d6a('0x1d'));function respondWithStatusCode(_0xeb1a4b,_0x2465b3){_0x2465b3=_0x2465b3||0xcc;return function(_0x10c9aa){if(_0x10c9aa){return _0xeb1a4b[_0x1d6a('0x1e')](_0x2465b3);}return _0xeb1a4b[_0x1d6a('0x1f')](_0x2465b3)[_0x1d6a('0x20')]();};}function respondWithResult(_0x40a1f2,_0x6140b5){_0x6140b5=_0x6140b5||0xc8;return function(_0x439551){if(_0x439551){return _0x40a1f2[_0x1d6a('0x1f')](_0x6140b5)[_0x1d6a('0x21')](_0x439551);}};}function respondWithFilteredResult(_0x39c47d,_0x3d4f7f){return function(_0x2da8ef){if(_0x2da8ef){var _0x3a75ac=typeof _0x3d4f7f['offset']==='undefined'&&typeof _0x3d4f7f[_0x1d6a('0x22')]===_0x1d6a('0x23');var _0x5cdc13=_0x2da8ef[_0x1d6a('0x24')];var _0x4e0843=_0x3a75ac?0x0:_0x3d4f7f[_0x1d6a('0x25')];var _0x1436f0=_0x3a75ac?_0x2da8ef[_0x1d6a('0x24')]:_0x3d4f7f[_0x1d6a('0x25')]+_0x3d4f7f['limit'];var _0x41a385;if(_0x1436f0>=_0x5cdc13){_0x1436f0=_0x5cdc13;_0x41a385=0xc8;}else{_0x41a385=0xce;}_0x39c47d[_0x1d6a('0x1f')](_0x41a385);return _0x39c47d[_0x1d6a('0x26')](_0x1d6a('0x27'),_0x4e0843+'-'+_0x1436f0+'/'+_0x5cdc13)[_0x1d6a('0x21')](_0x2da8ef);}return null;};}function patchUpdates(_0x175c25){return function(_0x10c433){try{jsonpatch[_0x1d6a('0x28')](_0x10c433,_0x175c25,!![]);}catch(_0x143ed9){return BPromise[_0x1d6a('0x29')](_0x143ed9);}return _0x10c433[_0x1d6a('0x2a')]();};}function saveUpdates(_0xd44d44,_0x50b349){return function(_0x52ea4b){if(_0x52ea4b){return _0x52ea4b[_0x1d6a('0x2b')](_0xd44d44)[_0x1d6a('0x2c')](function(_0x397ce3){return _0x397ce3;});}return null;};}function removeEntity(_0x1aa63c,_0x171806){return function(_0x59ba80){if(_0x59ba80){return _0x59ba80[_0x1d6a('0x2d')]()['then'](function(){_0x1aa63c[_0x1d6a('0x1f')](0xcc)[_0x1d6a('0x20')]();});}};}function handleEntityNotFound(_0x3c2d35,_0x5eaeaa){return function(_0x3eb7a9){if(!_0x3eb7a9){_0x3c2d35[_0x1d6a('0x1e')](0x194);}return _0x3eb7a9;};}function handleError(_0x249495,_0x44b723){_0x44b723=_0x44b723||0x1f4;return function(_0x516087){logger[_0x1d6a('0x2e')](_0x516087[_0x1d6a('0x2f')]);if(_0x516087[_0x1d6a('0x30')]){delete _0x516087[_0x1d6a('0x30')];}_0x249495[_0x1d6a('0x1f')](_0x44b723)['send'](_0x516087);};}exports['index']=function(_0x4c43ea,_0x769526){var _0x4f5aae={},_0x3183d1={},_0x15bbcc={'count':0x0,'rows':[]};var _0x312766=_[_0x1d6a('0x31')](db[_0x1d6a('0x32')][_0x1d6a('0x33')],function(_0x1b0905){return{'name':_0x1b0905[_0x1d6a('0x34')],'type':_0x1b0905[_0x1d6a('0x35')]['key']};});_0x3183d1[_0x1d6a('0x36')]=_['map'](_0x312766,_0x1d6a('0x30'));_0x3183d1['query']=_[_0x1d6a('0x37')](_0x4c43ea[_0x1d6a('0x38')]);_0x3183d1[_0x1d6a('0x39')]=_['intersection'](_0x3183d1[_0x1d6a('0x36')],_0x3183d1[_0x1d6a('0x38')]);_0x4f5aae[_0x1d6a('0x3a')]=_[_0x1d6a('0x3b')](_0x3183d1[_0x1d6a('0x36')],qs[_0x1d6a('0x3c')](_0x4c43ea[_0x1d6a('0x38')][_0x1d6a('0x3c')]));_0x4f5aae[_0x1d6a('0x3a')]=_0x4f5aae[_0x1d6a('0x3a')]['length']?_0x4f5aae[_0x1d6a('0x3a')]:_0x3183d1[_0x1d6a('0x36')];if(!_0x4c43ea['query'][_0x1d6a('0x3d')](_0x1d6a('0x3e'))){_0x4f5aae['limit']=qs[_0x1d6a('0x22')](_0x4c43ea[_0x1d6a('0x38')]['limit']);_0x4f5aae[_0x1d6a('0x25')]=qs[_0x1d6a('0x25')](_0x4c43ea[_0x1d6a('0x38')]['offset']);}_0x4f5aae[_0x1d6a('0x3f')]=qs[_0x1d6a('0x40')](_0x4c43ea[_0x1d6a('0x38')][_0x1d6a('0x40')]);_0x4f5aae[_0x1d6a('0x41')]=qs['filters'](_[_0x1d6a('0x42')](_0x4c43ea[_0x1d6a('0x38')],_0x3183d1[_0x1d6a('0x39')]),_0x312766);if(_0x4c43ea[_0x1d6a('0x38')][_0x1d6a('0x43')]){_0x4f5aae[_0x1d6a('0x41')]=_[_0x1d6a('0x44')](_0x4f5aae[_0x1d6a('0x41')],{'$or':_[_0x1d6a('0x31')](_0x312766,function(_0x2fb99f){if(_0x2fb99f[_0x1d6a('0x35')]!=='VIRTUAL'){var _0x5f589d={};_0x5f589d[_0x2fb99f['name']]={'$like':'%'+_0x4c43ea[_0x1d6a('0x38')][_0x1d6a('0x43')]+'%'};return _0x5f589d;}})});}_0x4f5aae=_['merge']({},_0x4f5aae,_0x4c43ea[_0x1d6a('0x45')]);var _0x8a7533={'where':_0x4f5aae[_0x1d6a('0x41')]};return db[_0x1d6a('0x32')][_0x1d6a('0x24')](_0x8a7533)[_0x1d6a('0x2c')](function(_0x5d3984){_0x15bbcc[_0x1d6a('0x24')]=_0x5d3984;if(_0x4c43ea[_0x1d6a('0x38')][_0x1d6a('0x46')]){_0x4f5aae[_0x1d6a('0x47')]=[{'all':!![]}];}return db[_0x1d6a('0x32')][_0x1d6a('0x48')](_0x4f5aae);})[_0x1d6a('0x2c')](function(_0x5bca62){_0x15bbcc[_0x1d6a('0x49')]=_0x5bca62;return _0x15bbcc;})[_0x1d6a('0x2c')](respondWithFilteredResult(_0x769526,_0x4f5aae))[_0x1d6a('0x4a')](handleError(_0x769526,null));};exports[_0x1d6a('0x4b')]=function(_0x3f7269,_0x4dddc0){var _0x3f5581={'raw':![],'where':{'id':_0x3f7269['params']['id']}},_0x46fda0={};_0x46fda0['model']=_[_0x1d6a('0x37')](db['SugarcrmAccount'][_0x1d6a('0x33')]);_0x46fda0['query']=_[_0x1d6a('0x37')](_0x3f7269['query']);_0x46fda0[_0x1d6a('0x39')]=_[_0x1d6a('0x3b')](_0x46fda0[_0x1d6a('0x36')],_0x46fda0[_0x1d6a('0x38')]);_0x3f5581['attributes']=_[_0x1d6a('0x3b')](_0x46fda0['model'],qs[_0x1d6a('0x3c')](_0x3f7269['query'][_0x1d6a('0x3c')]));_0x3f5581[_0x1d6a('0x3a')]=_0x3f5581['attributes'][_0x1d6a('0x4c')]?_0x3f5581[_0x1d6a('0x3a')]:_0x46fda0[_0x1d6a('0x36')];if(_0x3f7269[_0x1d6a('0x38')]['includeAll']){_0x3f5581['include']=[{'all':!![]}];}_0x3f5581=_[_0x1d6a('0x44')]({},_0x3f5581,_0x3f7269[_0x1d6a('0x45')]);return db['SugarcrmAccount'][_0x1d6a('0x4d')](_0x3f5581)['then'](handleEntityNotFound(_0x4dddc0,null))[_0x1d6a('0x2c')](respondWithResult(_0x4dddc0,null))['catch'](handleError(_0x4dddc0,null));};exports[_0x1d6a('0x4e')]=function(_0x3d1480,_0x525324){return db[_0x1d6a('0x32')][_0x1d6a('0x4e')](_0x3d1480[_0x1d6a('0x4f')],{})[_0x1d6a('0x2c')](respondWithResult(_0x525324,0xc9))[_0x1d6a('0x4a')](handleError(_0x525324,null));};exports[_0x1d6a('0x2b')]=function(_0xd5f9c,_0x173b92){if(_0xd5f9c[_0x1d6a('0x4f')]['id']){delete _0xd5f9c[_0x1d6a('0x4f')]['id'];}return db[_0x1d6a('0x32')][_0x1d6a('0x4d')]({'where':{'id':_0xd5f9c[_0x1d6a('0x50')]['id']}})[_0x1d6a('0x2c')](handleEntityNotFound(_0x173b92,null))[_0x1d6a('0x2c')](saveUpdates(_0xd5f9c[_0x1d6a('0x4f')],null))[_0x1d6a('0x2c')](respondWithResult(_0x173b92,null))[_0x1d6a('0x4a')](handleError(_0x173b92,null));};exports[_0x1d6a('0x2d')]=function(_0x58f75a,_0x1ced88){return db[_0x1d6a('0x32')][_0x1d6a('0x4d')]({'where':{'id':_0x58f75a[_0x1d6a('0x50')]['id']}})[_0x1d6a('0x2c')](handleEntityNotFound(_0x1ced88,null))['then'](removeEntity(_0x1ced88,null))[_0x1d6a('0x4a')](handleError(_0x1ced88,null));};exports[_0x1d6a('0x51')]=function(_0xbe9680,_0x4a4c20,_0x1d9341){var _0x2b6867={};var _0x37dca8={};var _0x14a7aa;var _0x16b101;return db[_0x1d6a('0x32')][_0x1d6a('0x52')]({'where':{'id':_0xbe9680[_0x1d6a('0x50')]['id']}})[_0x1d6a('0x2c')](handleEntityNotFound(_0x4a4c20,null))[_0x1d6a('0x2c')](function(_0x236515){if(_0x236515){_0x14a7aa=_0x236515;_0x37dca8[_0x1d6a('0x36')]=_[_0x1d6a('0x37')](db[_0x1d6a('0x53')]['rawAttributes']);_0x37dca8[_0x1d6a('0x38')]=_[_0x1d6a('0x37')](_0xbe9680[_0x1d6a('0x38')]);_0x37dca8[_0x1d6a('0x39')]=_[_0x1d6a('0x3b')](_0x37dca8[_0x1d6a('0x36')],_0x37dca8[_0x1d6a('0x38')]);_0x2b6867[_0x1d6a('0x3a')]=_[_0x1d6a('0x3b')](_0x37dca8[_0x1d6a('0x36')],qs[_0x1d6a('0x3c')](_0xbe9680[_0x1d6a('0x38')][_0x1d6a('0x3c')]));_0x2b6867[_0x1d6a('0x3a')]=_0x2b6867[_0x1d6a('0x3a')]['length']?_0x2b6867[_0x1d6a('0x3a')]:_0x37dca8[_0x1d6a('0x36')];_0x2b6867[_0x1d6a('0x3f')]=qs[_0x1d6a('0x40')](_0xbe9680[_0x1d6a('0x38')]['sort']);_0x2b6867['where']=qs[_0x1d6a('0x39')](_[_0x1d6a('0x42')](_0xbe9680['query'],_0x37dca8[_0x1d6a('0x39')]));if(_0xbe9680[_0x1d6a('0x38')][_0x1d6a('0x43')]){_0x2b6867[_0x1d6a('0x41')]=_[_0x1d6a('0x44')](_0x2b6867['where'],{'$or':_['map'](_0x2b6867[_0x1d6a('0x3a')],function(_0x58bc6a){var _0x4aad78={};_0x4aad78[_0x58bc6a]={'$like':'%'+_0xbe9680[_0x1d6a('0x38')][_0x1d6a('0x43')]+'%'};return _0x4aad78;})});}_0x2b6867=_[_0x1d6a('0x44')]({},_0x2b6867,_0xbe9680[_0x1d6a('0x45')]);return _0x14a7aa['getConfigurations'](_0x2b6867);}})[_0x1d6a('0x2c')](function(_0x11e5d8){if(_0x11e5d8){_0x16b101=_0x11e5d8['length'];if(!_0xbe9680[_0x1d6a('0x38')]['hasOwnProperty']('nolimit')){_0x2b6867[_0x1d6a('0x22')]=qs[_0x1d6a('0x22')](_0xbe9680[_0x1d6a('0x38')][_0x1d6a('0x22')]);_0x2b6867['offset']=qs[_0x1d6a('0x25')](_0xbe9680[_0x1d6a('0x38')][_0x1d6a('0x25')]);}return _0x14a7aa[_0x1d6a('0x51')](_0x2b6867);}})[_0x1d6a('0x2c')](function(_0x34b9ba){if(_0x34b9ba){return _0x34b9ba?{'count':_0x16b101,'rows':_0x34b9ba}:null;}})[_0x1d6a('0x2c')](respondWithResult(_0x4a4c20,null))[_0x1d6a('0x4a')](handleError(_0x4a4c20,null));};exports[_0x1d6a('0x54')]=function(_0x209b46,_0x3b71aa,_0x2307e9){if(_0x209b46['body']['id']){delete _0x209b46[_0x1d6a('0x4f')]['id'];}return db[_0x1d6a('0x32')][_0x1d6a('0x52')]({'where':{'id':_0x209b46[_0x1d6a('0x50')]['id']}})['then'](handleEntityNotFound(_0x3b71aa,null))['then'](function(_0x255d91){if(_0x255d91){_0x209b46[_0x1d6a('0x4f')][_0x1d6a('0x55')]=_0x255d91['id'];_0x209b46[_0x1d6a('0x4f')][_0x1d6a('0x56')]=integrations[_0x1d6a('0x57')](_0x209b46[_0x1d6a('0x4f')][_0x1d6a('0x58')],_0x209b46['body'][_0x1d6a('0x35')]);_0x209b46[_0x1d6a('0x4f')][_0x1d6a('0x59')]=integrations['getDescriptions'](_0x209b46['body'][_0x1d6a('0x58')],_0x209b46[_0x1d6a('0x4f')][_0x1d6a('0x35')]);return db[_0x1d6a('0x53')][_0x1d6a('0x4e')](_0x209b46[_0x1d6a('0x4f')],{'include':[{'model':db['SugarcrmField'],'as':_0x1d6a('0x56')},{'model':db['SugarcrmField'],'as':_0x1d6a('0x59')}]});}return null;})[_0x1d6a('0x2c')](respondWithResult(_0x3b71aa,null))[_0x1d6a('0x4a')](handleError(_0x3b71aa,null));};exports[_0x1d6a('0x5a')]=function(_0x3f7f95,_0x194ef6,_0x231c10){var _0x63e2b8='';var _0x3d8963=['id','name','assigned_user_id',_0x1d6a('0x5b'),_0x1d6a('0x5c'),_0x1d6a('0x5d'),_0x1d6a('0x5e'),_0x1d6a('0x5f'),_0x1d6a('0x60'),_0x1d6a('0x61'),_0x1d6a('0x62'),'direction'];return db['SugarcrmAccount'][_0x1d6a('0x52')]({'where':{'id':_0x3f7f95[_0x1d6a('0x50')]['id']},'attributes':['id',_0x1d6a('0x63'),_0x1d6a('0x64'),_0x1d6a('0x65')]})[_0x1d6a('0x2c')](handleEntityNotFound(_0x194ef6,null))['then'](function(_0x49cebf){if(_0x49cebf){_0x63e2b8=_0x49cebf['remoteUri'];var _0x495ade=_0x63e2b8[_0x1d6a('0x66')](-0x1);if(_0x495ade==='/'){_0x63e2b8=_0x63e2b8['substring'](0x0,_0x63e2b8[_0x1d6a('0x67')](_0x495ade));}return rp({'method':_0x1d6a('0x68'),'uri':util['format'](_0x1d6a('0x69'),_0x63e2b8,'/service/v4_1/rest.php'),'json':!![],'form':{'method':_0x1d6a('0x6a'),'input_type':'JSON','response_type':_0x1d6a('0x6b'),'rest_data':JSON[_0x1d6a('0x6c')]({'user_auth':{'user_name':_0x49cebf[_0x1d6a('0x63')],'password':_0x49cebf[_0x1d6a('0x64')],'encryption':'PLAIN'},'application':_0x1d6a('0x6d')})}});}})['then'](function(_0x228a9b){if(_0x228a9b&&_0x228a9b['name']!==_0x1d6a('0x6e')&&_0x228a9b[_0x1d6a('0x30')]!=='Password\x20Expired'){return rp({'method':_0x1d6a('0x68'),'uri':util[_0x1d6a('0x6f')](_0x1d6a('0x69'),_0x63e2b8,'/service/v4_1/rest.php'),'json':!![],'form':{'method':'get_module_fields','input_type':_0x1d6a('0x6b'),'response_type':'JSON','rest_data':JSON[_0x1d6a('0x6c')]({'session':_0x228a9b['id'],'module_name':_0x1d6a('0x70')})}})[_0x1d6a('0x2c')](function(_0x1a32e6){if(_0x1a32e6){var _0x552013=_[_0x1d6a('0x71')](_0x1a32e6[_0x1d6a('0x72')]);_[_0x1d6a('0x73')](_0x552013,function(_0x240615){return _0x3d8963[_0x1d6a('0x74')](_0x240615[_0x1d6a('0x30')]);});return{'count':_0x552013['length'],'rows':_['map'](_0x552013,function(_0x3482d7){return{'id':_0x3482d7[_0x1d6a('0x30')],'name':_0x3482d7[_0x1d6a('0x75')],'custom':_['endsWith'](_0x3482d7['name'],'_c')?!![]:![],'options':_0x3482d7['options']?_[_0x1d6a('0x31')](_[_0x1d6a('0x71')](_0x3482d7[_0x1d6a('0x45')]),function(_0x2d98a3){return{'name':_0x2d98a3[_0x1d6a('0x76')],'value':_0x2d98a3['name']};}):[]};})};}})[_0x1d6a('0x2c')](respondWithResult(_0x194ef6,null))[_0x1d6a('0x4a')](function(_0x39a179){var _0x26cacc=_0x3f7f95['query']['test']?0x1f4:_0x39a179[_0x1d6a('0x77')]||0x1f4;logger[_0x1d6a('0x2e')](_0x1d6a('0x78'),'getFields',_0x26cacc,JSON[_0x1d6a('0x6c')](_0x39a179));delete _0x39a179['name'];if(_0x26cacc===0x191){_0x26cacc=0x190;}_0x194ef6[_0x1d6a('0x1f')](_0x26cacc)[_0x1d6a('0x79')](_0x3f7f95[_0x1d6a('0x38')][_0x1d6a('0x7a')]?{'message':_0x1d6a('0x7b'),'statusCode':_0x39a179['statusCode']}:_0x39a179);});}else{var _0xbf358d=0x1f4;_0x194ef6[_0x1d6a('0x1f')](_0xbf358d)[_0x1d6a('0x79')]({'message':'Wrong\x20credentials','statusCode':0x190});}});};
\ No newline at end of file
index 93cb02a..32143ef 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6174=['bluebird','request-promise','exports','SugarcrmAccount','util','../../config/logger','moment'];(function(_0x572fdd,_0x3aaa57){var _0x15905c=function(_0x4e4970){while(--_0x4e4970){_0x572fdd['push'](_0x572fdd['shift']());}};_0x15905c(++_0x3aaa57);}(_0x6174,0x1af));var _0x4617=function(_0x63423a,_0x1a3c4e){_0x63423a=_0x63423a-0x0;var _0x83538b=_0x6174[_0x63423a];return _0x83538b;};'use strict';var _=require('lodash');var util=require(_0x4617('0x0'));var logger=require(_0x4617('0x1'))('api');var moment=require(_0x4617('0x2'));var BPromise=require(_0x4617('0x3'));var rp=require(_0x4617('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./intSugarcrmAccount.attributes');var integrations=require('../../components/integrations/configuration');module[_0x4617('0x5')]=function(_0x32e0d0,_0x533572){return _0x32e0d0['define'](_0x4617('0x6'),attributes,{'tableName':'int_sugarcrm_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x23b6=['request-promise','path','rimraf','../../config/environment','./intSugarcrmAccount.attributes','define','lodash','util','api','moment','bluebird'];(function(_0x23fda9,_0x3e6beb){var _0x2c6584=function(_0x4bb268){while(--_0x4bb268){_0x23fda9['push'](_0x23fda9['shift']());}};_0x2c6584(++_0x3e6beb);}(_0x23b6,0xd7));var _0x623b=function(_0x2803ab,_0x1c33f2){_0x2803ab=_0x2803ab-0x0;var _0x3d6e8e=_0x23b6[_0x2803ab];return _0x3d6e8e;};'use strict';var _=require(_0x623b('0x0'));var util=require(_0x623b('0x1'));var logger=require('../../config/logger')(_0x623b('0x2'));var moment=require(_0x623b('0x3'));var BPromise=require(_0x623b('0x4'));var rp=require(_0x623b('0x5'));var fs=require('fs');var path=require(_0x623b('0x6'));var rimraf=require(_0x623b('0x7'));var config=require(_0x623b('0x8'));var attributes=require(_0x623b('0x9'));var integrations=require('../../components/integrations/configuration');module['exports']=function(_0x5cb588,_0x4ce139){return _0x5cb588[_0x623b('0xa')]('SugarcrmAccount',attributes,{'tableName':'int_sugarcrm_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 7d768ca..f3574d3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x26fd=['code','message','result','catch','SugarcrmAccount','options','raw','where','attributes','limit','include','map','model','GetSugarcrmAccount','ShowSugarcrmAccount','find','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','http','request','then','info','SugarcrmAccount,\x20%s,\x20%s','request\x20sent','debug','SugarcrmAccount,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x85d56d,_0x37f5c1){var _0x51f613=function(_0x4927df){while(--_0x4927df){_0x85d56d['push'](_0x85d56d['shift']());}};_0x51f613(++_0x37f5c1);}(_0x26fd,0x7c));var _0xd26f=function(_0x4c9f70,_0x53990b){_0x4c9f70=_0x4c9f70-0x0;var _0x3b1dd9=_0x26fd[_0x4c9f70];return _0x3b1dd9;};'use strict';var _=require(_0xd26f('0x0'));var util=require(_0xd26f('0x1'));var moment=require(_0xd26f('0x2'));var BPromise=require(_0xd26f('0x3'));var rs=require(_0xd26f('0x4'));var fs=require('fs');var Redis=require(_0xd26f('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xd26f('0x6'));var logger=require('../../config/logger')(_0xd26f('0x7'));var config=require(_0xd26f('0x8'));var jayson=require(_0xd26f('0x9'));var client=jayson['client'][_0xd26f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3e2070,_0x29825f,_0x5acadf){return new BPromise(function(_0x40ea49,_0x3a9233){return client[_0xd26f('0xb')](_0x3e2070,_0x5acadf)[_0xd26f('0xc')](function(_0x781b25){logger[_0xd26f('0xd')](_0xd26f('0xe'),_0x29825f,_0xd26f('0xf'));logger[_0xd26f('0x10')](_0xd26f('0x11'),_0x29825f,_0xd26f('0xf'),JSON[_0xd26f('0x12')](_0x781b25));if(_0x781b25[_0xd26f('0x13')]){if(_0x781b25['error'][_0xd26f('0x14')]===0x1f4){logger[_0xd26f('0x13')]('SugarcrmAccount,\x20%s,\x20%s',_0x29825f,_0x781b25['error'][_0xd26f('0x15')]);return _0x3a9233(_0x781b25[_0xd26f('0x13')]['message']);}logger[_0xd26f('0x13')](_0xd26f('0xe'),_0x29825f,_0x781b25[_0xd26f('0x13')][_0xd26f('0x15')]);return _0x40ea49(_0x781b25[_0xd26f('0x13')]['message']);}else{logger['info']('SugarcrmAccount,\x20%s,\x20%s',_0x29825f,_0xd26f('0xf'));_0x40ea49(_0x781b25[_0xd26f('0x16')]['message']);}})[_0xd26f('0x17')](function(_0xfbdbbb){logger[_0xd26f('0x13')](_0xd26f('0xe'),_0x29825f,_0xfbdbbb);_0x3a9233(_0xfbdbbb);});});}exports['GetSugarcrmAccount']=function(_0x158ffb){var _0x4f702d=this;return new Promise(function(_0x45a8c2,_0x57f363){return db[_0xd26f('0x18')]['findAll']({'raw':_0x158ffb[_0xd26f('0x19')]?_0x158ffb[_0xd26f('0x19')][_0xd26f('0x1a')]===undefined?!![]:![]:!![],'where':_0x158ffb[_0xd26f('0x19')]?_0x158ffb['options'][_0xd26f('0x1b')]||null:null,'attributes':_0x158ffb[_0xd26f('0x19')]?_0x158ffb[_0xd26f('0x19')][_0xd26f('0x1c')]||null:null,'limit':_0x158ffb['options']?_0x158ffb['options'][_0xd26f('0x1d')]||null:null,'include':_0x158ffb[_0xd26f('0x19')]?_0x158ffb[_0xd26f('0x19')][_0xd26f('0x1e')]?_[_0xd26f('0x1f')](_0x158ffb[_0xd26f('0x19')][_0xd26f('0x1e')],function(_0xd14d4){return{'model':db[_0xd14d4['model']],'as':_0xd14d4['as'],'attributes':_0xd14d4['attributes'],'include':_0xd14d4[_0xd26f('0x1e')]?_[_0xd26f('0x1f')](_0xd14d4['include'],function(_0x226f8f){return{'model':db[_0x226f8f[_0xd26f('0x20')]],'as':_0x226f8f['as'],'attributes':_0x226f8f[_0xd26f('0x1c')],'include':_0x226f8f[_0xd26f('0x1e')]?_[_0xd26f('0x1f')](_0x226f8f['include'],function(_0x241787){return{'model':db[_0x241787['model']],'as':_0x241787['as'],'attributes':_0x241787['attributes']};}):[]};}):[]};}):[]:[]})[_0xd26f('0xc')](function(_0xf7a249){logger['info'](_0xd26f('0x21'),_0x158ffb);logger[_0xd26f('0x10')](_0xd26f('0x21'),_0x158ffb,JSON[_0xd26f('0x12')](_0xf7a249));_0x45a8c2(_0xf7a249);})[_0xd26f('0x17')](function(_0x33d409){logger[_0xd26f('0x13')](_0xd26f('0x21'),_0x33d409[_0xd26f('0x15')],_0x158ffb);_0x57f363(_0x4f702d[_0xd26f('0x13')](0x1f4,_0x33d409['message']));});});};exports[_0xd26f('0x22')]=function(_0xfdb1f3){var _0x3dbdda=this;return new Promise(function(_0x2c0131,_0x291fa3){return db[_0xd26f('0x18')][_0xd26f('0x23')]({'raw':_0xfdb1f3[_0xd26f('0x19')]?_0xfdb1f3['options'][_0xd26f('0x1a')]===undefined?!![]:![]:!![],'where':_0xfdb1f3[_0xd26f('0x19')]?_0xfdb1f3[_0xd26f('0x19')][_0xd26f('0x1b')]||null:null,'attributes':_0xfdb1f3[_0xd26f('0x19')]?_0xfdb1f3['options'][_0xd26f('0x1c')]||null:null,'include':_0xfdb1f3[_0xd26f('0x19')]?_0xfdb1f3[_0xd26f('0x19')][_0xd26f('0x1e')]?_[_0xd26f('0x1f')](_0xfdb1f3[_0xd26f('0x19')]['include'],function(_0x1b14cb){return{'model':db[_0x1b14cb[_0xd26f('0x20')]],'as':_0x1b14cb['as'],'attributes':_0x1b14cb[_0xd26f('0x1c')],'include':_0x1b14cb[_0xd26f('0x1e')]?_['map'](_0x1b14cb[_0xd26f('0x1e')],function(_0x19241d){return{'model':db[_0x19241d[_0xd26f('0x20')]],'as':_0x19241d['as'],'attributes':_0x19241d[_0xd26f('0x1c')],'include':_0x19241d[_0xd26f('0x1e')]?_[_0xd26f('0x1f')](_0x19241d['include'],function(_0x39f1cd){return{'model':db[_0x39f1cd['model']],'as':_0x39f1cd['as'],'attributes':_0x39f1cd[_0xd26f('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0xfadcc4){logger[_0xd26f('0xd')](_0xd26f('0x22'),_0xfdb1f3);logger[_0xd26f('0x10')]('ShowSugarcrmAccount',_0xfdb1f3,JSON[_0xd26f('0x12')](_0xfadcc4));_0x2c0131(_0xfadcc4);})[_0xd26f('0x17')](function(_0x350e5d){logger[_0xd26f('0x13')]('ShowSugarcrmAccount',_0x350e5d[_0xd26f('0x15')],_0xfdb1f3);_0x291fa3(_0x3dbdda[_0xd26f('0x13')](0x1f4,_0x350e5d['message']));});});};
\ No newline at end of file
+var _0xd326=['client','http','request','then','info','request\x20sent','debug','SugarcrmAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','SugarcrmAccount,\x20%s,\x20%s','message','result','catch','GetSugarcrmAccount','SugarcrmAccount','findAll','options','raw','where','attributes','limit','include','map','model','ShowSugarcrmAccount','find','lodash','moment','bluebird','randomstring','ioredis','../../config/environment'];(function(_0x5d36d0,_0x2aacd4){var _0xc8bba0=function(_0x48adf5){while(--_0x48adf5){_0x5d36d0['push'](_0x5d36d0['shift']());}};_0xc8bba0(++_0x2aacd4);}(_0xd326,0x82));var _0x6d32=function(_0x1a1155,_0x56e693){_0x1a1155=_0x1a1155-0x0;var _0x4219b6=_0xd326[_0x1a1155];return _0x4219b6;};'use strict';var _=require(_0x6d32('0x0'));var util=require('util');var moment=require(_0x6d32('0x1'));var BPromise=require(_0x6d32('0x2'));var rs=require(_0x6d32('0x3'));var fs=require('fs');var Redis=require(_0x6d32('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x6d32('0x5'));var jayson=require('jayson/promise');var client=jayson[_0x6d32('0x6')][_0x6d32('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x2f4054,_0x3394c2,_0x1fb0df){return new BPromise(function(_0x301815,_0x107c2c){return client[_0x6d32('0x8')](_0x2f4054,_0x1fb0df)[_0x6d32('0x9')](function(_0x108360){logger[_0x6d32('0xa')]('SugarcrmAccount,\x20%s,\x20%s',_0x3394c2,_0x6d32('0xb'));logger[_0x6d32('0xc')](_0x6d32('0xd'),_0x3394c2,_0x6d32('0xb'),JSON[_0x6d32('0xe')](_0x108360));if(_0x108360['error']){if(_0x108360[_0x6d32('0xf')][_0x6d32('0x10')]===0x1f4){logger[_0x6d32('0xf')](_0x6d32('0x11'),_0x3394c2,_0x108360[_0x6d32('0xf')][_0x6d32('0x12')]);return _0x107c2c(_0x108360[_0x6d32('0xf')][_0x6d32('0x12')]);}logger[_0x6d32('0xf')](_0x6d32('0x11'),_0x3394c2,_0x108360[_0x6d32('0xf')][_0x6d32('0x12')]);return _0x301815(_0x108360[_0x6d32('0xf')]['message']);}else{logger[_0x6d32('0xa')]('SugarcrmAccount,\x20%s,\x20%s',_0x3394c2,_0x6d32('0xb'));_0x301815(_0x108360[_0x6d32('0x13')][_0x6d32('0x12')]);}})[_0x6d32('0x14')](function(_0x3d2f47){logger[_0x6d32('0xf')]('SugarcrmAccount,\x20%s,\x20%s',_0x3394c2,_0x3d2f47);_0x107c2c(_0x3d2f47);});});}exports[_0x6d32('0x15')]=function(_0x36e6d0){var _0x4aab9b=this;return new Promise(function(_0x3ca517,_0x3e8807){return db[_0x6d32('0x16')][_0x6d32('0x17')]({'raw':_0x36e6d0[_0x6d32('0x18')]?_0x36e6d0['options'][_0x6d32('0x19')]===undefined?!![]:![]:!![],'where':_0x36e6d0[_0x6d32('0x18')]?_0x36e6d0[_0x6d32('0x18')][_0x6d32('0x1a')]||null:null,'attributes':_0x36e6d0['options']?_0x36e6d0['options'][_0x6d32('0x1b')]||null:null,'limit':_0x36e6d0[_0x6d32('0x18')]?_0x36e6d0[_0x6d32('0x18')][_0x6d32('0x1c')]||null:null,'include':_0x36e6d0[_0x6d32('0x18')]?_0x36e6d0[_0x6d32('0x18')][_0x6d32('0x1d')]?_['map'](_0x36e6d0[_0x6d32('0x18')][_0x6d32('0x1d')],function(_0x1557b1){return{'model':db[_0x1557b1['model']],'as':_0x1557b1['as'],'attributes':_0x1557b1[_0x6d32('0x1b')],'include':_0x1557b1['include']?_[_0x6d32('0x1e')](_0x1557b1[_0x6d32('0x1d')],function(_0x14c937){return{'model':db[_0x14c937['model']],'as':_0x14c937['as'],'attributes':_0x14c937[_0x6d32('0x1b')],'include':_0x14c937[_0x6d32('0x1d')]?_[_0x6d32('0x1e')](_0x14c937[_0x6d32('0x1d')],function(_0x4e8e73){return{'model':db[_0x4e8e73[_0x6d32('0x1f')]],'as':_0x4e8e73['as'],'attributes':_0x4e8e73[_0x6d32('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x6d32('0x9')](function(_0x5123a5){logger[_0x6d32('0xa')]('GetSugarcrmAccount',_0x36e6d0);logger[_0x6d32('0xc')](_0x6d32('0x15'),_0x36e6d0,JSON['stringify'](_0x5123a5));_0x3ca517(_0x5123a5);})[_0x6d32('0x14')](function(_0x2fd04b){logger[_0x6d32('0xf')](_0x6d32('0x15'),_0x2fd04b[_0x6d32('0x12')],_0x36e6d0);_0x3e8807(_0x4aab9b[_0x6d32('0xf')](0x1f4,_0x2fd04b[_0x6d32('0x12')]));});});};exports[_0x6d32('0x20')]=function(_0x531bb3){var _0x4a62d5=this;return new Promise(function(_0x276fdc,_0x4199b4){return db[_0x6d32('0x16')][_0x6d32('0x21')]({'raw':_0x531bb3[_0x6d32('0x18')]?_0x531bb3[_0x6d32('0x18')][_0x6d32('0x19')]===undefined?!![]:![]:!![],'where':_0x531bb3[_0x6d32('0x18')]?_0x531bb3[_0x6d32('0x18')]['where']||null:null,'attributes':_0x531bb3['options']?_0x531bb3[_0x6d32('0x18')]['attributes']||null:null,'include':_0x531bb3[_0x6d32('0x18')]?_0x531bb3[_0x6d32('0x18')]['include']?_[_0x6d32('0x1e')](_0x531bb3[_0x6d32('0x18')]['include'],function(_0x50f73d){return{'model':db[_0x50f73d['model']],'as':_0x50f73d['as'],'attributes':_0x50f73d['attributes'],'include':_0x50f73d[_0x6d32('0x1d')]?_[_0x6d32('0x1e')](_0x50f73d['include'],function(_0x4345fa){return{'model':db[_0x4345fa[_0x6d32('0x1f')]],'as':_0x4345fa['as'],'attributes':_0x4345fa['attributes'],'include':_0x4345fa[_0x6d32('0x1d')]?_[_0x6d32('0x1e')](_0x4345fa[_0x6d32('0x1d')],function(_0x1863d9){return{'model':db[_0x1863d9[_0x6d32('0x1f')]],'as':_0x1863d9['as'],'attributes':_0x1863d9['attributes']};}):[]};}):[]};}):[]:[]})[_0x6d32('0x9')](function(_0x12ec42){logger[_0x6d32('0xa')]('ShowSugarcrmAccount',_0x531bb3);logger['debug'](_0x6d32('0x20'),_0x531bb3,JSON[_0x6d32('0xe')](_0x12ec42));_0x276fdc(_0x12ec42);})[_0x6d32('0x14')](function(_0x287247){logger['error']('ShowSugarcrmAccount',_0x287247[_0x6d32('0x12')],_0x531bb3);_0x4199b4(_0x4a62d5[_0x6d32('0xf')](0x1f4,_0x287247[_0x6d32('0x12')]));});});};
\ No newline at end of file
index af07307..51316a2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe608=['getFields','/:id/subjects','getDescriptions','post','create','put','/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intSugarcrmConfiguration.controller','isAuthenticated','index','get','show'];(function(_0x618414,_0x1a7a60){var _0x21c19a=function(_0x507b17){while(--_0x507b17){_0x618414['push'](_0x618414['shift']());}};_0x21c19a(++_0x1a7a60);}(_0xe608,0x1cd));var _0x8e60=function(_0x3c6b7d,_0x5f0d90){_0x3c6b7d=_0x3c6b7d-0x0;var _0x1d3ed2=_0xe608[_0x3c6b7d];return _0x1d3ed2;};'use strict';var multer=require(_0x8e60('0x0'));var util=require(_0x8e60('0x1'));var path=require(_0x8e60('0x2'));var timeout=require(_0x8e60('0x3'));var express=require('express');var router=express[_0x8e60('0x4')]();var fs_extra=require(_0x8e60('0x5'));var auth=require(_0x8e60('0x6'));var interaction=require(_0x8e60('0x7'));var config=require(_0x8e60('0x8'));var controller=require(_0x8e60('0x9'));router['get']('/',auth[_0x8e60('0xa')](),controller[_0x8e60('0xb')]);router[_0x8e60('0xc')]('/:id',auth[_0x8e60('0xa')](),controller[_0x8e60('0xd')]);router[_0x8e60('0xc')]('/:id/fields',auth[_0x8e60('0xa')](),controller[_0x8e60('0xe')]);router[_0x8e60('0xc')](_0x8e60('0xf'),auth[_0x8e60('0xa')](),controller['getSubjects']);router[_0x8e60('0xc')]('/:id/descriptions',auth[_0x8e60('0xa')](),controller[_0x8e60('0x10')]);router[_0x8e60('0x11')]('/',auth[_0x8e60('0xa')](),controller[_0x8e60('0x12')]);router[_0x8e60('0x13')](_0x8e60('0x14'),auth['isAuthenticated'](),controller[_0x8e60('0x15')]);router[_0x8e60('0x16')](_0x8e60('0x14'),auth[_0x8e60('0xa')](),controller[_0x8e60('0x17')]);module[_0x8e60('0x18')]=router;
\ No newline at end of file
+var _0x6665=['getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','post','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./intSugarcrmConfiguration.controller','get','isAuthenticated','index','/:id','show'];(function(_0x212bdf,_0xe2e1e7){var _0x1901fe=function(_0x49f0ab){while(--_0x49f0ab){_0x212bdf['push'](_0x212bdf['shift']());}};_0x1901fe(++_0xe2e1e7);}(_0x6665,0x88));var _0x5666=function(_0x311c35,_0x534915){_0x311c35=_0x311c35-0x0;var _0x5cc50c=_0x6665[_0x311c35];return _0x5cc50c;};'use strict';var multer=require(_0x5666('0x0'));var util=require(_0x5666('0x1'));var path=require(_0x5666('0x2'));var timeout=require(_0x5666('0x3'));var express=require(_0x5666('0x4'));var router=express[_0x5666('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x5666('0x6'));var interaction=require(_0x5666('0x7'));var config=require('../../config/environment');var controller=require(_0x5666('0x8'));router[_0x5666('0x9')]('/',auth[_0x5666('0xa')](),controller[_0x5666('0xb')]);router[_0x5666('0x9')](_0x5666('0xc'),auth[_0x5666('0xa')](),controller[_0x5666('0xd')]);router[_0x5666('0x9')]('/:id/fields',auth['isAuthenticated'](),controller[_0x5666('0xe')]);router[_0x5666('0x9')](_0x5666('0xf'),auth['isAuthenticated'](),controller[_0x5666('0x10')]);router['get'](_0x5666('0x11'),auth[_0x5666('0xa')](),controller[_0x5666('0x12')]);router[_0x5666('0x13')]('/',auth[_0x5666('0xa')](),controller['create']);router[_0x5666('0x14')](_0x5666('0xc'),auth[_0x5666('0xa')](),controller[_0x5666('0x15')]);router[_0x5666('0x16')]('/:id',auth['isAuthenticated'](),controller[_0x5666('0x17')]);module[_0x5666('0x18')]=router;
\ No newline at end of file
index c3b2c1b..df1da1d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4a7d=['sequelize','exports','STRING'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0x4a7d,0xf9));var _0xd4a7=function(_0x43caf0,_0x5825e4){_0x43caf0=_0x43caf0-0x0;var _0x16cc04=_0x4a7d[_0x43caf0];return _0x16cc04;};'use strict';var Sequelize=require(_0xd4a7('0x0'));module[_0xd4a7('0x1')]={'name':{'type':Sequelize[_0xd4a7('0x2')]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xe241=['STRING','sequelize','exports'];(function(_0x397e5c,_0x1b6f54){var _0x1b9f8a=function(_0x593f7b){while(--_0x593f7b){_0x397e5c['push'](_0x397e5c['shift']());}};_0x1b9f8a(++_0x1b6f54);}(_0xe241,0x172));var _0x1e24=function(_0x9c2427,_0x17c865){_0x9c2427=_0x9c2427-0x0;var _0x51984f=_0xe241[_0x9c2427];return _0x51984f;};'use strict';var Sequelize=require(_0x1e24('0x0'));module[_0x1e24('0x1')]={'name':{'type':Sequelize[_0x1e24('0x2')]},'description':{'type':Sequelize[_0x1e24('0x2')]}};
\ No newline at end of file
index f98b79c..18cb09f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x00b1=['ejs','fs-extra','lodash','crypto','jsforce','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','offset','undefined','limit','set','Content-Range','json','apply','reject','save','update','then','destroy','end','error','stack','index','SugarcrmConfiguration','rawAttributes','fieldName','type','map','query','filters','model','attributes','intersection','fields','length','nolimit','order','filter','where','merge','VIRTUAL','name','options','count','includeAll','include','rows','catch','params','keys','find','create','body','getFields','findOne','SugarcrmField','sort','pick','hasOwnProperty','getSubjects','getDescriptions','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x00b1,0x18d));var _0x100b=function(_0x1bba53,_0x4dcf8f){_0x1bba53=_0x1bba53-0x0;var _0x51b35b=_0x00b1[_0x1bba53];return _0x51b35b;};'use strict';var emlformat=require(_0x100b('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x100b('0x1'));var jsonpatch=require(_0x100b('0x2'));var rp=require(_0x100b('0x3'));var moment=require(_0x100b('0x4'));var BPromise=require(_0x100b('0x5'));var Mustache=require(_0x100b('0x6'));var util=require(_0x100b('0x7'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x100b('0x8'));var fs=require('fs');var fs_extra=require(_0x100b('0x9'));var _=require(_0x100b('0xa'));var squel=require('squel');var crypto=require(_0x100b('0xb'));var jsforce=require(_0x100b('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x100b('0xd'));var querystring=require(_0x100b('0xe'));var Papa=require(_0x100b('0xf'));var Redis=require(_0x100b('0x10'));var authService=require(_0x100b('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x100b('0x12'));var hardwareService=require(_0x100b('0x13'));var logger=require(_0x100b('0x14'))('api');var utils=require(_0x100b('0x15'));var config=require(_0x100b('0x16'));var licenseUtil=require(_0x100b('0x17'));var db=require(_0x100b('0x18'))['db'];function respondWithStatusCode(_0x2778a0,_0x503911){_0x503911=_0x503911||0xcc;return function(_0x1afb0f){if(_0x1afb0f){return _0x2778a0[_0x100b('0x19')](_0x503911);}return _0x2778a0['status'](_0x503911)['end']();};}function respondWithResult(_0x37c798,_0x3340a6){_0x3340a6=_0x3340a6||0xc8;return function(_0x479787){if(_0x479787){return _0x37c798[_0x100b('0x1a')](_0x3340a6)['json'](_0x479787);}};}function respondWithFilteredResult(_0x3c6176,_0x584816){return function(_0x2d5af5){if(_0x2d5af5){var _0x4f6946=typeof _0x584816[_0x100b('0x1b')]===_0x100b('0x1c')&&typeof _0x584816[_0x100b('0x1d')]==='undefined';var _0xad8d6f=_0x2d5af5['count'];var _0x4ec43d=_0x4f6946?0x0:_0x584816[_0x100b('0x1b')];var _0x46f196=_0x4f6946?_0x2d5af5['count']:_0x584816[_0x100b('0x1b')]+_0x584816['limit'];var _0x10fcc6;if(_0x46f196>=_0xad8d6f){_0x46f196=_0xad8d6f;_0x10fcc6=0xc8;}else{_0x10fcc6=0xce;}_0x3c6176[_0x100b('0x1a')](_0x10fcc6);return _0x3c6176[_0x100b('0x1e')](_0x100b('0x1f'),_0x4ec43d+'-'+_0x46f196+'/'+_0xad8d6f)[_0x100b('0x20')](_0x2d5af5);}return null;};}function patchUpdates(_0x1584f1){return function(_0x3dcab0){try{jsonpatch[_0x100b('0x21')](_0x3dcab0,_0x1584f1,!![]);}catch(_0x320f99){return BPromise[_0x100b('0x22')](_0x320f99);}return _0x3dcab0[_0x100b('0x23')]();};}function saveUpdates(_0x3737ba,_0x46db9f){return function(_0x2ed190){if(_0x2ed190){return _0x2ed190[_0x100b('0x24')](_0x3737ba)[_0x100b('0x25')](function(_0x39eac4){return _0x39eac4;});}return null;};}function removeEntity(_0x11d4be,_0x303af8){return function(_0x25ae89){if(_0x25ae89){return _0x25ae89[_0x100b('0x26')]()[_0x100b('0x25')](function(){_0x11d4be[_0x100b('0x1a')](0xcc)[_0x100b('0x27')]();});}};}function handleEntityNotFound(_0x332b07,_0x306d48){return function(_0x3f2d36){if(!_0x3f2d36){_0x332b07[_0x100b('0x19')](0x194);}return _0x3f2d36;};}function handleError(_0x124026,_0xe6839b){_0xe6839b=_0xe6839b||0x1f4;return function(_0x1ad7d7){logger[_0x100b('0x28')](_0x1ad7d7[_0x100b('0x29')]);if(_0x1ad7d7['name']){delete _0x1ad7d7['name'];}_0x124026[_0x100b('0x1a')](_0xe6839b)['send'](_0x1ad7d7);};}exports[_0x100b('0x2a')]=function(_0x298d95,_0x887b71){var _0x280371={},_0x4838a8={},_0xd2ef54={'count':0x0,'rows':[]};var _0x551093=_['map'](db[_0x100b('0x2b')][_0x100b('0x2c')],function(_0x81e560){return{'name':_0x81e560[_0x100b('0x2d')],'type':_0x81e560[_0x100b('0x2e')]['key']};});_0x4838a8['model']=_[_0x100b('0x2f')](_0x551093,'name');_0x4838a8[_0x100b('0x30')]=_['keys'](_0x298d95[_0x100b('0x30')]);_0x4838a8[_0x100b('0x31')]=_['intersection'](_0x4838a8[_0x100b('0x32')],_0x4838a8[_0x100b('0x30')]);_0x280371[_0x100b('0x33')]=_[_0x100b('0x34')](_0x4838a8[_0x100b('0x32')],qs[_0x100b('0x35')](_0x298d95['query'][_0x100b('0x35')]));_0x280371[_0x100b('0x33')]=_0x280371['attributes'][_0x100b('0x36')]?_0x280371[_0x100b('0x33')]:_0x4838a8['model'];if(!_0x298d95['query']['hasOwnProperty'](_0x100b('0x37'))){_0x280371[_0x100b('0x1d')]=qs['limit'](_0x298d95['query'][_0x100b('0x1d')]);_0x280371['offset']=qs[_0x100b('0x1b')](_0x298d95[_0x100b('0x30')][_0x100b('0x1b')]);}_0x280371[_0x100b('0x38')]=qs['sort'](_0x298d95[_0x100b('0x30')]['sort']);_0x280371['where']=qs[_0x100b('0x31')](_['pick'](_0x298d95[_0x100b('0x30')],_0x4838a8['filters']),_0x551093);if(_0x298d95[_0x100b('0x30')][_0x100b('0x39')]){_0x280371[_0x100b('0x3a')]=_[_0x100b('0x3b')](_0x280371[_0x100b('0x3a')],{'$or':_[_0x100b('0x2f')](_0x551093,function(_0x50071b){if(_0x50071b[_0x100b('0x2e')]!==_0x100b('0x3c')){var _0x54c535={};_0x54c535[_0x50071b[_0x100b('0x3d')]]={'$like':'%'+_0x298d95[_0x100b('0x30')][_0x100b('0x39')]+'%'};return _0x54c535;}})});}_0x280371=_[_0x100b('0x3b')]({},_0x280371,_0x298d95[_0x100b('0x3e')]);var _0x146cf5={'where':_0x280371[_0x100b('0x3a')]};return db[_0x100b('0x2b')]['count'](_0x146cf5)[_0x100b('0x25')](function(_0x4cf581){_0xd2ef54[_0x100b('0x3f')]=_0x4cf581;if(_0x298d95[_0x100b('0x30')][_0x100b('0x40')]){_0x280371[_0x100b('0x41')]=[{'all':!![]}];}return db['SugarcrmConfiguration']['findAll'](_0x280371);})[_0x100b('0x25')](function(_0x3586da){_0xd2ef54[_0x100b('0x42')]=_0x3586da;return _0xd2ef54;})['then'](respondWithFilteredResult(_0x887b71,_0x280371))[_0x100b('0x43')](handleError(_0x887b71,null));};exports['show']=function(_0x30686f,_0x36e45f){var _0x5398eb={'raw':![],'where':{'id':_0x30686f[_0x100b('0x44')]['id']}},_0x15b34e={};_0x15b34e[_0x100b('0x32')]=_[_0x100b('0x45')](db[_0x100b('0x2b')][_0x100b('0x2c')]);_0x15b34e[_0x100b('0x30')]=_[_0x100b('0x45')](_0x30686f['query']);_0x15b34e[_0x100b('0x31')]=_[_0x100b('0x34')](_0x15b34e['model'],_0x15b34e[_0x100b('0x30')]);_0x5398eb['attributes']=_[_0x100b('0x34')](_0x15b34e[_0x100b('0x32')],qs[_0x100b('0x35')](_0x30686f[_0x100b('0x30')][_0x100b('0x35')]));_0x5398eb['attributes']=_0x5398eb[_0x100b('0x33')][_0x100b('0x36')]?_0x5398eb['attributes']:_0x15b34e['model'];if(_0x30686f['query'][_0x100b('0x40')]){_0x5398eb[_0x100b('0x41')]=[{'all':!![]}];}_0x5398eb=_[_0x100b('0x3b')]({},_0x5398eb,_0x30686f[_0x100b('0x3e')]);return db[_0x100b('0x2b')][_0x100b('0x46')](_0x5398eb)['then'](handleEntityNotFound(_0x36e45f,null))[_0x100b('0x25')](respondWithResult(_0x36e45f,null))['catch'](handleError(_0x36e45f,null));};exports['create']=function(_0x197f9d,_0x533f5d){return db['SugarcrmConfiguration'][_0x100b('0x47')](_0x197f9d[_0x100b('0x48')],{})['then'](respondWithResult(_0x533f5d,0xc9))[_0x100b('0x43')](handleError(_0x533f5d,null));};exports[_0x100b('0x24')]=function(_0x43cd7f,_0x4bb57d){if(_0x43cd7f[_0x100b('0x48')]['id']){delete _0x43cd7f[_0x100b('0x48')]['id'];}return db[_0x100b('0x2b')]['find']({'where':{'id':_0x43cd7f['params']['id']}})[_0x100b('0x25')](handleEntityNotFound(_0x4bb57d,null))[_0x100b('0x25')](saveUpdates(_0x43cd7f[_0x100b('0x48')],null))['then'](respondWithResult(_0x4bb57d,null))[_0x100b('0x43')](handleError(_0x4bb57d,null));};exports['destroy']=function(_0x22431d,_0x21ddda){return db['SugarcrmConfiguration'][_0x100b('0x46')]({'where':{'id':_0x22431d[_0x100b('0x44')]['id']}})[_0x100b('0x25')](handleEntityNotFound(_0x21ddda,null))[_0x100b('0x25')](removeEntity(_0x21ddda,null))[_0x100b('0x43')](handleError(_0x21ddda,null));};exports[_0x100b('0x49')]=function(_0x7a1d47,_0x53a0e0,_0x2020cd){var _0x3a4c7d={};var _0x55d5bb={};var _0x131026;var _0x3560ea;return db[_0x100b('0x2b')][_0x100b('0x4a')]({'where':{'id':_0x7a1d47[_0x100b('0x44')]['id']}})[_0x100b('0x25')](handleEntityNotFound(_0x53a0e0,null))['then'](function(_0x2003fa){if(_0x2003fa){_0x131026=_0x2003fa;_0x55d5bb[_0x100b('0x32')]=_['keys'](db[_0x100b('0x4b')][_0x100b('0x2c')]);_0x55d5bb['query']=_['keys'](_0x7a1d47[_0x100b('0x30')]);_0x55d5bb[_0x100b('0x31')]=_['intersection'](_0x55d5bb['model'],_0x55d5bb[_0x100b('0x30')]);_0x3a4c7d[_0x100b('0x33')]=_[_0x100b('0x34')](_0x55d5bb[_0x100b('0x32')],qs[_0x100b('0x35')](_0x7a1d47[_0x100b('0x30')][_0x100b('0x35')]));_0x3a4c7d[_0x100b('0x33')]=_0x3a4c7d[_0x100b('0x33')]['length']?_0x3a4c7d['attributes']:_0x55d5bb[_0x100b('0x32')];_0x3a4c7d['order']=qs[_0x100b('0x4c')](_0x7a1d47[_0x100b('0x30')][_0x100b('0x4c')]);_0x3a4c7d[_0x100b('0x3a')]=qs[_0x100b('0x31')](_[_0x100b('0x4d')](_0x7a1d47[_0x100b('0x30')],_0x55d5bb[_0x100b('0x31')]));if(_0x7a1d47[_0x100b('0x30')]['filter']){_0x3a4c7d['where']=_[_0x100b('0x3b')](_0x3a4c7d[_0x100b('0x3a')],{'$or':_[_0x100b('0x2f')](_0x3a4c7d['attributes'],function(_0x61430f){var _0x15691f={};_0x15691f[_0x61430f]={'$like':'%'+_0x7a1d47['query'][_0x100b('0x39')]+'%'};return _0x15691f;})});}_0x3a4c7d=_[_0x100b('0x3b')]({},_0x3a4c7d,_0x7a1d47['options']);return _0x131026[_0x100b('0x49')](_0x3a4c7d);}})[_0x100b('0x25')](function(_0x163988){if(_0x163988){_0x3560ea=_0x163988['length'];if(!_0x7a1d47[_0x100b('0x30')][_0x100b('0x4e')](_0x100b('0x37'))){_0x3a4c7d[_0x100b('0x1d')]=qs[_0x100b('0x1d')](_0x7a1d47[_0x100b('0x30')][_0x100b('0x1d')]);_0x3a4c7d[_0x100b('0x1b')]=qs['offset'](_0x7a1d47[_0x100b('0x30')][_0x100b('0x1b')]);}return _0x131026[_0x100b('0x49')](_0x3a4c7d);}})['then'](function(_0xba71d1){if(_0xba71d1){return _0xba71d1?{'count':_0x3560ea,'rows':_0xba71d1}:null;}})[_0x100b('0x25')](respondWithResult(_0x53a0e0,null))['catch'](handleError(_0x53a0e0,null));};exports[_0x100b('0x4f')]=function(_0x48845d,_0x5aaaa9,_0x5a17ac){var _0x61cfec={};var _0x488d38={};var _0x3cb414;var _0x3763c8;return db[_0x100b('0x2b')][_0x100b('0x4a')]({'where':{'id':_0x48845d[_0x100b('0x44')]['id']}})['then'](handleEntityNotFound(_0x5aaaa9,null))[_0x100b('0x25')](function(_0xbe66f2){if(_0xbe66f2){_0x3cb414=_0xbe66f2;_0x488d38[_0x100b('0x32')]=_['keys'](db[_0x100b('0x4b')][_0x100b('0x2c')]);_0x488d38[_0x100b('0x30')]=_[_0x100b('0x45')](_0x48845d[_0x100b('0x30')]);_0x488d38['filters']=_[_0x100b('0x34')](_0x488d38['model'],_0x488d38[_0x100b('0x30')]);_0x61cfec['attributes']=_[_0x100b('0x34')](_0x488d38[_0x100b('0x32')],qs[_0x100b('0x35')](_0x48845d[_0x100b('0x30')][_0x100b('0x35')]));_0x61cfec[_0x100b('0x33')]=_0x61cfec[_0x100b('0x33')][_0x100b('0x36')]?_0x61cfec[_0x100b('0x33')]:_0x488d38[_0x100b('0x32')];_0x61cfec['order']=qs[_0x100b('0x4c')](_0x48845d[_0x100b('0x30')][_0x100b('0x4c')]);_0x61cfec['where']=qs[_0x100b('0x31')](_[_0x100b('0x4d')](_0x48845d[_0x100b('0x30')],_0x488d38['filters']));if(_0x48845d[_0x100b('0x30')][_0x100b('0x39')]){_0x61cfec[_0x100b('0x3a')]=_['merge'](_0x61cfec['where'],{'$or':_[_0x100b('0x2f')](_0x61cfec['attributes'],function(_0x49a1a9){var _0x2e93d3={};_0x2e93d3[_0x49a1a9]={'$like':'%'+_0x48845d['query'][_0x100b('0x39')]+'%'};return _0x2e93d3;})});}_0x61cfec=_[_0x100b('0x3b')]({},_0x61cfec,_0x48845d[_0x100b('0x3e')]);return _0x3cb414[_0x100b('0x4f')](_0x61cfec);}})[_0x100b('0x25')](function(_0x254d8a){if(_0x254d8a){_0x3763c8=_0x254d8a[_0x100b('0x36')];if(!_0x48845d['query'][_0x100b('0x4e')](_0x100b('0x37'))){_0x61cfec[_0x100b('0x1d')]=qs[_0x100b('0x1d')](_0x48845d[_0x100b('0x30')]['limit']);_0x61cfec['offset']=qs['offset'](_0x48845d[_0x100b('0x30')][_0x100b('0x1b')]);}return _0x3cb414[_0x100b('0x4f')](_0x61cfec);}})[_0x100b('0x25')](function(_0x2b95e8){if(_0x2b95e8){return _0x2b95e8?{'count':_0x3763c8,'rows':_0x2b95e8}:null;}})[_0x100b('0x25')](respondWithResult(_0x5aaaa9,null))[_0x100b('0x43')](handleError(_0x5aaaa9,null));};exports[_0x100b('0x50')]=function(_0x4bfb6c,_0x4f74fc,_0x80f836){var _0x5882aa={};var _0x383976={};var _0x1cfb39;var _0x40c324;return db[_0x100b('0x2b')][_0x100b('0x4a')]({'where':{'id':_0x4bfb6c[_0x100b('0x44')]['id']}})[_0x100b('0x25')](handleEntityNotFound(_0x4f74fc,null))[_0x100b('0x25')](function(_0x285d59){if(_0x285d59){_0x1cfb39=_0x285d59;_0x383976[_0x100b('0x32')]=_['keys'](db['SugarcrmField'][_0x100b('0x2c')]);_0x383976[_0x100b('0x30')]=_[_0x100b('0x45')](_0x4bfb6c[_0x100b('0x30')]);_0x383976[_0x100b('0x31')]=_[_0x100b('0x34')](_0x383976[_0x100b('0x32')],_0x383976[_0x100b('0x30')]);_0x5882aa[_0x100b('0x33')]=_[_0x100b('0x34')](_0x383976['model'],qs[_0x100b('0x35')](_0x4bfb6c[_0x100b('0x30')][_0x100b('0x35')]));_0x5882aa['attributes']=_0x5882aa['attributes'][_0x100b('0x36')]?_0x5882aa[_0x100b('0x33')]:_0x383976['model'];_0x5882aa[_0x100b('0x38')]=qs[_0x100b('0x4c')](_0x4bfb6c[_0x100b('0x30')][_0x100b('0x4c')]);_0x5882aa[_0x100b('0x3a')]=qs[_0x100b('0x31')](_[_0x100b('0x4d')](_0x4bfb6c[_0x100b('0x30')],_0x383976[_0x100b('0x31')]));if(_0x4bfb6c[_0x100b('0x30')][_0x100b('0x39')]){_0x5882aa[_0x100b('0x3a')]=_[_0x100b('0x3b')](_0x5882aa[_0x100b('0x3a')],{'$or':_[_0x100b('0x2f')](_0x5882aa[_0x100b('0x33')],function(_0x4a9839){var _0x527f93={};_0x527f93[_0x4a9839]={'$like':'%'+_0x4bfb6c[_0x100b('0x30')]['filter']+'%'};return _0x527f93;})});}_0x5882aa=_[_0x100b('0x3b')]({},_0x5882aa,_0x4bfb6c['options']);return _0x1cfb39[_0x100b('0x50')](_0x5882aa);}})[_0x100b('0x25')](function(_0x41ee74){if(_0x41ee74){_0x40c324=_0x41ee74[_0x100b('0x36')];if(!_0x4bfb6c[_0x100b('0x30')][_0x100b('0x4e')](_0x100b('0x37'))){_0x5882aa[_0x100b('0x1d')]=qs[_0x100b('0x1d')](_0x4bfb6c['query'][_0x100b('0x1d')]);_0x5882aa[_0x100b('0x1b')]=qs[_0x100b('0x1b')](_0x4bfb6c[_0x100b('0x30')][_0x100b('0x1b')]);}return _0x1cfb39[_0x100b('0x50')](_0x5882aa);}})[_0x100b('0x25')](function(_0x31fa63){if(_0x31fa63){return _0x31fa63?{'count':_0x40c324,'rows':_0x31fa63}:null;}})['then'](respondWithResult(_0x4f74fc,null))['catch'](handleError(_0x4f74fc,null));};
\ No newline at end of file
+var _0xd8ce=['update','then','destroy','error','stack','name','send','SugarcrmConfiguration','rawAttributes','fieldName','model','map','query','keys','attributes','intersection','fields','length','hasOwnProperty','order','sort','where','filters','pick','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','create','body','find','getFields','findOne','SugarcrmField','nolimit','getSubjects','getDescriptions','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','ejs','lodash','crypto','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','reject','save'];(function(_0x30356c,_0x36ab08){var _0x26ea69=function(_0xe9527b){while(--_0xe9527b){_0x30356c['push'](_0x30356c['shift']());}};_0x26ea69(++_0x36ab08);}(_0xd8ce,0x113));var _0xed8c=function(_0x3e91a9,_0x53c466){_0x3e91a9=_0x3e91a9-0x0;var _0x25c9ad=_0xd8ce[_0x3e91a9];return _0x25c9ad;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xed8c('0x0'));var zipdir=require(_0xed8c('0x1'));var jsonpatch=require(_0xed8c('0x2'));var rp=require(_0xed8c('0x3'));var moment=require(_0xed8c('0x4'));var BPromise=require(_0xed8c('0x5'));var Mustache=require(_0xed8c('0x6'));var util=require('util');var path=require('path');var sox=require(_0xed8c('0x7'));var csv=require('to-csv');var ejs=require(_0xed8c('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xed8c('0x9'));var squel=require('squel');var crypto=require(_0xed8c('0xa'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xed8c('0xb'));var querystring=require(_0xed8c('0xc'));var Papa=require(_0xed8c('0xd'));var Redis=require(_0xed8c('0xe'));var authService=require(_0xed8c('0xf'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xed8c('0x10'));var logger=require(_0xed8c('0x11'))(_0xed8c('0x12'));var utils=require('../../config/utils');var config=require(_0xed8c('0x13'));var licenseUtil=require('../../config/license/util');var db=require(_0xed8c('0x14'))['db'];function respondWithStatusCode(_0x461958,_0x373b79){_0x373b79=_0x373b79||0xcc;return function(_0x2ca8e7){if(_0x2ca8e7){return _0x461958[_0xed8c('0x15')](_0x373b79);}return _0x461958[_0xed8c('0x16')](_0x373b79)[_0xed8c('0x17')]();};}function respondWithResult(_0x28cc52,_0x550983){_0x550983=_0x550983||0xc8;return function(_0x34ef6b){if(_0x34ef6b){return _0x28cc52[_0xed8c('0x16')](_0x550983)[_0xed8c('0x18')](_0x34ef6b);}};}function respondWithFilteredResult(_0x328411,_0xd4590c){return function(_0x5578e2){if(_0x5578e2){var _0x536d3d=typeof _0xd4590c['offset']===_0xed8c('0x19')&&typeof _0xd4590c[_0xed8c('0x1a')]===_0xed8c('0x19');var _0x1d35df=_0x5578e2[_0xed8c('0x1b')];var _0x54171f=_0x536d3d?0x0:_0xd4590c[_0xed8c('0x1c')];var _0x181a60=_0x536d3d?_0x5578e2[_0xed8c('0x1b')]:_0xd4590c[_0xed8c('0x1c')]+_0xd4590c[_0xed8c('0x1a')];var _0x8bf3ac;if(_0x181a60>=_0x1d35df){_0x181a60=_0x1d35df;_0x8bf3ac=0xc8;}else{_0x8bf3ac=0xce;}_0x328411[_0xed8c('0x16')](_0x8bf3ac);return _0x328411[_0xed8c('0x1d')](_0xed8c('0x1e'),_0x54171f+'-'+_0x181a60+'/'+_0x1d35df)['json'](_0x5578e2);}return null;};}function patchUpdates(_0x57db63){return function(_0x5b3f90){try{jsonpatch['apply'](_0x5b3f90,_0x57db63,!![]);}catch(_0x46b001){return BPromise[_0xed8c('0x1f')](_0x46b001);}return _0x5b3f90[_0xed8c('0x20')]();};}function saveUpdates(_0x277eb4,_0x50cc33){return function(_0x11131b){if(_0x11131b){return _0x11131b[_0xed8c('0x21')](_0x277eb4)[_0xed8c('0x22')](function(_0x2bcb28){return _0x2bcb28;});}return null;};}function removeEntity(_0x20d883,_0x14b55e){return function(_0x5396ac){if(_0x5396ac){return _0x5396ac[_0xed8c('0x23')]()[_0xed8c('0x22')](function(){_0x20d883['status'](0xcc)[_0xed8c('0x17')]();});}};}function handleEntityNotFound(_0x2aedcc,_0x211e18){return function(_0x129fea){if(!_0x129fea){_0x2aedcc[_0xed8c('0x15')](0x194);}return _0x129fea;};}function handleError(_0x4886ff,_0x153621){_0x153621=_0x153621||0x1f4;return function(_0x253f87){logger[_0xed8c('0x24')](_0x253f87[_0xed8c('0x25')]);if(_0x253f87[_0xed8c('0x26')]){delete _0x253f87[_0xed8c('0x26')];}_0x4886ff[_0xed8c('0x16')](_0x153621)[_0xed8c('0x27')](_0x253f87);};}exports['index']=function(_0x247d4d,_0x379353){var _0x39f9cf={},_0x185f61={},_0x46fe80={'count':0x0,'rows':[]};var _0x44be55=_['map'](db[_0xed8c('0x28')][_0xed8c('0x29')],function(_0x2eaafd){return{'name':_0x2eaafd[_0xed8c('0x2a')],'type':_0x2eaafd['type']['key']};});_0x185f61[_0xed8c('0x2b')]=_[_0xed8c('0x2c')](_0x44be55,'name');_0x185f61[_0xed8c('0x2d')]=_[_0xed8c('0x2e')](_0x247d4d['query']);_0x185f61['filters']=_['intersection'](_0x185f61[_0xed8c('0x2b')],_0x185f61['query']);_0x39f9cf[_0xed8c('0x2f')]=_[_0xed8c('0x30')](_0x185f61[_0xed8c('0x2b')],qs['fields'](_0x247d4d['query'][_0xed8c('0x31')]));_0x39f9cf['attributes']=_0x39f9cf['attributes'][_0xed8c('0x32')]?_0x39f9cf[_0xed8c('0x2f')]:_0x185f61[_0xed8c('0x2b')];if(!_0x247d4d[_0xed8c('0x2d')][_0xed8c('0x33')]('nolimit')){_0x39f9cf[_0xed8c('0x1a')]=qs[_0xed8c('0x1a')](_0x247d4d[_0xed8c('0x2d')][_0xed8c('0x1a')]);_0x39f9cf[_0xed8c('0x1c')]=qs[_0xed8c('0x1c')](_0x247d4d[_0xed8c('0x2d')][_0xed8c('0x1c')]);}_0x39f9cf[_0xed8c('0x34')]=qs[_0xed8c('0x35')](_0x247d4d[_0xed8c('0x2d')][_0xed8c('0x35')]);_0x39f9cf[_0xed8c('0x36')]=qs[_0xed8c('0x37')](_[_0xed8c('0x38')](_0x247d4d[_0xed8c('0x2d')],_0x185f61[_0xed8c('0x37')]),_0x44be55);if(_0x247d4d[_0xed8c('0x2d')][_0xed8c('0x39')]){_0x39f9cf[_0xed8c('0x36')]=_[_0xed8c('0x3a')](_0x39f9cf[_0xed8c('0x36')],{'$or':_['map'](_0x44be55,function(_0x337603){if(_0x337603[_0xed8c('0x3b')]!==_0xed8c('0x3c')){var _0x3b3d58={};_0x3b3d58[_0x337603['name']]={'$like':'%'+_0x247d4d[_0xed8c('0x2d')][_0xed8c('0x39')]+'%'};return _0x3b3d58;}})});}_0x39f9cf=_[_0xed8c('0x3a')]({},_0x39f9cf,_0x247d4d[_0xed8c('0x3d')]);var _0x4c743a={'where':_0x39f9cf[_0xed8c('0x36')]};return db['SugarcrmConfiguration']['count'](_0x4c743a)['then'](function(_0x2c202a){_0x46fe80[_0xed8c('0x1b')]=_0x2c202a;if(_0x247d4d[_0xed8c('0x2d')][_0xed8c('0x3e')]){_0x39f9cf[_0xed8c('0x3f')]=[{'all':!![]}];}return db[_0xed8c('0x28')][_0xed8c('0x40')](_0x39f9cf);})[_0xed8c('0x22')](function(_0x32c230){_0x46fe80[_0xed8c('0x41')]=_0x32c230;return _0x46fe80;})[_0xed8c('0x22')](respondWithFilteredResult(_0x379353,_0x39f9cf))[_0xed8c('0x42')](handleError(_0x379353,null));};exports['show']=function(_0x37776b,_0x1a4b23){var _0x3bc04a={'raw':![],'where':{'id':_0x37776b[_0xed8c('0x43')]['id']}},_0xf7083e={};_0xf7083e[_0xed8c('0x2b')]=_[_0xed8c('0x2e')](db['SugarcrmConfiguration']['rawAttributes']);_0xf7083e[_0xed8c('0x2d')]=_[_0xed8c('0x2e')](_0x37776b[_0xed8c('0x2d')]);_0xf7083e[_0xed8c('0x37')]=_[_0xed8c('0x30')](_0xf7083e['model'],_0xf7083e[_0xed8c('0x2d')]);_0x3bc04a[_0xed8c('0x2f')]=_[_0xed8c('0x30')](_0xf7083e[_0xed8c('0x2b')],qs[_0xed8c('0x31')](_0x37776b[_0xed8c('0x2d')][_0xed8c('0x31')]));_0x3bc04a['attributes']=_0x3bc04a[_0xed8c('0x2f')]['length']?_0x3bc04a[_0xed8c('0x2f')]:_0xf7083e[_0xed8c('0x2b')];if(_0x37776b[_0xed8c('0x2d')]['includeAll']){_0x3bc04a[_0xed8c('0x3f')]=[{'all':!![]}];}_0x3bc04a=_[_0xed8c('0x3a')]({},_0x3bc04a,_0x37776b[_0xed8c('0x3d')]);return db[_0xed8c('0x28')]['find'](_0x3bc04a)['then'](handleEntityNotFound(_0x1a4b23,null))['then'](respondWithResult(_0x1a4b23,null))[_0xed8c('0x42')](handleError(_0x1a4b23,null));};exports[_0xed8c('0x44')]=function(_0x1c9e15,_0x5e08f4){return db[_0xed8c('0x28')][_0xed8c('0x44')](_0x1c9e15[_0xed8c('0x45')],{})[_0xed8c('0x22')](respondWithResult(_0x5e08f4,0xc9))[_0xed8c('0x42')](handleError(_0x5e08f4,null));};exports[_0xed8c('0x21')]=function(_0x1a7379,_0x39c92b){if(_0x1a7379[_0xed8c('0x45')]['id']){delete _0x1a7379['body']['id'];}return db[_0xed8c('0x28')][_0xed8c('0x46')]({'where':{'id':_0x1a7379[_0xed8c('0x43')]['id']}})[_0xed8c('0x22')](handleEntityNotFound(_0x39c92b,null))['then'](saveUpdates(_0x1a7379[_0xed8c('0x45')],null))[_0xed8c('0x22')](respondWithResult(_0x39c92b,null))[_0xed8c('0x42')](handleError(_0x39c92b,null));};exports[_0xed8c('0x23')]=function(_0x575f93,_0x25aad1){return db[_0xed8c('0x28')]['find']({'where':{'id':_0x575f93[_0xed8c('0x43')]['id']}})[_0xed8c('0x22')](handleEntityNotFound(_0x25aad1,null))[_0xed8c('0x22')](removeEntity(_0x25aad1,null))[_0xed8c('0x42')](handleError(_0x25aad1,null));};exports[_0xed8c('0x47')]=function(_0x249886,_0x43445a,_0x5ea409){var _0x5021d3={};var _0xd646fd={};var _0x412590;var _0x33fc22;return db[_0xed8c('0x28')][_0xed8c('0x48')]({'where':{'id':_0x249886['params']['id']}})[_0xed8c('0x22')](handleEntityNotFound(_0x43445a,null))[_0xed8c('0x22')](function(_0x341d0a){if(_0x341d0a){_0x412590=_0x341d0a;_0xd646fd[_0xed8c('0x2b')]=_['keys'](db[_0xed8c('0x49')]['rawAttributes']);_0xd646fd[_0xed8c('0x2d')]=_[_0xed8c('0x2e')](_0x249886[_0xed8c('0x2d')]);_0xd646fd[_0xed8c('0x37')]=_['intersection'](_0xd646fd['model'],_0xd646fd[_0xed8c('0x2d')]);_0x5021d3[_0xed8c('0x2f')]=_[_0xed8c('0x30')](_0xd646fd['model'],qs[_0xed8c('0x31')](_0x249886[_0xed8c('0x2d')][_0xed8c('0x31')]));_0x5021d3[_0xed8c('0x2f')]=_0x5021d3[_0xed8c('0x2f')][_0xed8c('0x32')]?_0x5021d3[_0xed8c('0x2f')]:_0xd646fd[_0xed8c('0x2b')];_0x5021d3[_0xed8c('0x34')]=qs[_0xed8c('0x35')](_0x249886[_0xed8c('0x2d')]['sort']);_0x5021d3[_0xed8c('0x36')]=qs[_0xed8c('0x37')](_[_0xed8c('0x38')](_0x249886[_0xed8c('0x2d')],_0xd646fd[_0xed8c('0x37')]));if(_0x249886[_0xed8c('0x2d')][_0xed8c('0x39')]){_0x5021d3[_0xed8c('0x36')]=_[_0xed8c('0x3a')](_0x5021d3['where'],{'$or':_['map'](_0x5021d3[_0xed8c('0x2f')],function(_0x5d4630){var _0x2bd295={};_0x2bd295[_0x5d4630]={'$like':'%'+_0x249886[_0xed8c('0x2d')][_0xed8c('0x39')]+'%'};return _0x2bd295;})});}_0x5021d3=_[_0xed8c('0x3a')]({},_0x5021d3,_0x249886['options']);return _0x412590[_0xed8c('0x47')](_0x5021d3);}})[_0xed8c('0x22')](function(_0x304fba){if(_0x304fba){_0x33fc22=_0x304fba[_0xed8c('0x32')];if(!_0x249886[_0xed8c('0x2d')]['hasOwnProperty'](_0xed8c('0x4a'))){_0x5021d3[_0xed8c('0x1a')]=qs[_0xed8c('0x1a')](_0x249886[_0xed8c('0x2d')][_0xed8c('0x1a')]);_0x5021d3['offset']=qs[_0xed8c('0x1c')](_0x249886['query'][_0xed8c('0x1c')]);}return _0x412590[_0xed8c('0x47')](_0x5021d3);}})[_0xed8c('0x22')](function(_0x5ead4d){if(_0x5ead4d){return _0x5ead4d?{'count':_0x33fc22,'rows':_0x5ead4d}:null;}})[_0xed8c('0x22')](respondWithResult(_0x43445a,null))['catch'](handleError(_0x43445a,null));};exports[_0xed8c('0x4b')]=function(_0x2a5682,_0x148a12,_0x1b8d08){var _0x3acbc7={};var _0x5ec024={};var _0x3cf76d;var _0xeedd75;return db[_0xed8c('0x28')][_0xed8c('0x48')]({'where':{'id':_0x2a5682['params']['id']}})['then'](handleEntityNotFound(_0x148a12,null))[_0xed8c('0x22')](function(_0x3bc4c7){if(_0x3bc4c7){_0x3cf76d=_0x3bc4c7;_0x5ec024[_0xed8c('0x2b')]=_['keys'](db['SugarcrmField'][_0xed8c('0x29')]);_0x5ec024[_0xed8c('0x2d')]=_[_0xed8c('0x2e')](_0x2a5682[_0xed8c('0x2d')]);_0x5ec024[_0xed8c('0x37')]=_[_0xed8c('0x30')](_0x5ec024[_0xed8c('0x2b')],_0x5ec024[_0xed8c('0x2d')]);_0x3acbc7[_0xed8c('0x2f')]=_[_0xed8c('0x30')](_0x5ec024[_0xed8c('0x2b')],qs[_0xed8c('0x31')](_0x2a5682[_0xed8c('0x2d')][_0xed8c('0x31')]));_0x3acbc7[_0xed8c('0x2f')]=_0x3acbc7['attributes'][_0xed8c('0x32')]?_0x3acbc7[_0xed8c('0x2f')]:_0x5ec024[_0xed8c('0x2b')];_0x3acbc7[_0xed8c('0x34')]=qs['sort'](_0x2a5682['query'][_0xed8c('0x35')]);_0x3acbc7['where']=qs['filters'](_['pick'](_0x2a5682[_0xed8c('0x2d')],_0x5ec024['filters']));if(_0x2a5682[_0xed8c('0x2d')][_0xed8c('0x39')]){_0x3acbc7[_0xed8c('0x36')]=_[_0xed8c('0x3a')](_0x3acbc7[_0xed8c('0x36')],{'$or':_[_0xed8c('0x2c')](_0x3acbc7['attributes'],function(_0x4b346c){var _0x10e978={};_0x10e978[_0x4b346c]={'$like':'%'+_0x2a5682['query']['filter']+'%'};return _0x10e978;})});}_0x3acbc7=_[_0xed8c('0x3a')]({},_0x3acbc7,_0x2a5682['options']);return _0x3cf76d[_0xed8c('0x4b')](_0x3acbc7);}})[_0xed8c('0x22')](function(_0x54b678){if(_0x54b678){_0xeedd75=_0x54b678[_0xed8c('0x32')];if(!_0x2a5682[_0xed8c('0x2d')][_0xed8c('0x33')](_0xed8c('0x4a'))){_0x3acbc7['limit']=qs[_0xed8c('0x1a')](_0x2a5682[_0xed8c('0x2d')]['limit']);_0x3acbc7[_0xed8c('0x1c')]=qs['offset'](_0x2a5682[_0xed8c('0x2d')]['offset']);}return _0x3cf76d[_0xed8c('0x4b')](_0x3acbc7);}})['then'](function(_0x5f3de7){if(_0x5f3de7){return _0x5f3de7?{'count':_0xeedd75,'rows':_0x5f3de7}:null;}})[_0xed8c('0x22')](respondWithResult(_0x148a12,null))['catch'](handleError(_0x148a12,null));};exports[_0xed8c('0x4c')]=function(_0x3edfce,_0x540521,_0x2359c7){var _0x2de161={};var _0x282850={};var _0x14abd7;var _0x56cb0e;return db['SugarcrmConfiguration']['findOne']({'where':{'id':_0x3edfce[_0xed8c('0x43')]['id']}})[_0xed8c('0x22')](handleEntityNotFound(_0x540521,null))[_0xed8c('0x22')](function(_0x7098e5){if(_0x7098e5){_0x14abd7=_0x7098e5;_0x282850[_0xed8c('0x2b')]=_['keys'](db['SugarcrmField'][_0xed8c('0x29')]);_0x282850[_0xed8c('0x2d')]=_['keys'](_0x3edfce['query']);_0x282850[_0xed8c('0x37')]=_['intersection'](_0x282850[_0xed8c('0x2b')],_0x282850['query']);_0x2de161['attributes']=_[_0xed8c('0x30')](_0x282850[_0xed8c('0x2b')],qs[_0xed8c('0x31')](_0x3edfce[_0xed8c('0x2d')][_0xed8c('0x31')]));_0x2de161[_0xed8c('0x2f')]=_0x2de161[_0xed8c('0x2f')][_0xed8c('0x32')]?_0x2de161[_0xed8c('0x2f')]:_0x282850['model'];_0x2de161[_0xed8c('0x34')]=qs['sort'](_0x3edfce[_0xed8c('0x2d')]['sort']);_0x2de161[_0xed8c('0x36')]=qs[_0xed8c('0x37')](_[_0xed8c('0x38')](_0x3edfce[_0xed8c('0x2d')],_0x282850[_0xed8c('0x37')]));if(_0x3edfce[_0xed8c('0x2d')][_0xed8c('0x39')]){_0x2de161[_0xed8c('0x36')]=_[_0xed8c('0x3a')](_0x2de161[_0xed8c('0x36')],{'$or':_[_0xed8c('0x2c')](_0x2de161['attributes'],function(_0x46a352){var _0x45ebd1={};_0x45ebd1[_0x46a352]={'$like':'%'+_0x3edfce['query']['filter']+'%'};return _0x45ebd1;})});}_0x2de161=_['merge']({},_0x2de161,_0x3edfce[_0xed8c('0x3d')]);return _0x14abd7[_0xed8c('0x4c')](_0x2de161);}})[_0xed8c('0x22')](function(_0xc296a){if(_0xc296a){_0x56cb0e=_0xc296a[_0xed8c('0x32')];if(!_0x3edfce['query']['hasOwnProperty']('nolimit')){_0x2de161[_0xed8c('0x1a')]=qs[_0xed8c('0x1a')](_0x3edfce[_0xed8c('0x2d')][_0xed8c('0x1a')]);_0x2de161[_0xed8c('0x1c')]=qs[_0xed8c('0x1c')](_0x3edfce['query']['offset']);}return _0x14abd7[_0xed8c('0x4c')](_0x2de161);}})[_0xed8c('0x22')](function(_0x48a21c){if(_0x48a21c){return _0x48a21c?{'count':_0x56cb0e,'rows':_0x48a21c}:null;}})[_0xed8c('0x22')](respondWithResult(_0x540521,null))['catch'](handleError(_0x540521,null));};
\ No newline at end of file
index a96e9e2..ea19153 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x77f7=['path','exports','define','SugarcrmConfiguration','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x252a7d,_0x4a85f0){var _0x393041=function(_0x15429e){while(--_0x15429e){_0x252a7d['push'](_0x252a7d['shift']());}};_0x393041(++_0x4a85f0);}(_0x77f7,0x17a));var _0x777f=function(_0x571da8,_0x17e50b){_0x571da8=_0x571da8-0x0;var _0x58047b=_0x77f7[_0x571da8];return _0x58047b;};'use strict';var _=require(_0x777f('0x0'));var util=require(_0x777f('0x1'));var logger=require(_0x777f('0x2'))(_0x777f('0x3'));var moment=require(_0x777f('0x4'));var BPromise=require(_0x777f('0x5'));var rp=require(_0x777f('0x6'));var fs=require('fs');var path=require(_0x777f('0x7'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./intSugarcrmConfiguration.attributes');module[_0x777f('0x8')]=function(_0xd2aa85,_0x390334){return _0xd2aa85[_0x777f('0x9')](_0x777f('0xa'),attributes,{'tableName':'int_sugarcrm_configurations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x8f11=['util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./intSugarcrmConfiguration.attributes','exports','SugarcrmConfiguration','int_sugarcrm_configurations'];(function(_0x5c0b22,_0x56d46a){var _0x16a8a6=function(_0x268ef6){while(--_0x268ef6){_0x5c0b22['push'](_0x5c0b22['shift']());}};_0x16a8a6(++_0x56d46a);}(_0x8f11,0x78));var _0x18f1=function(_0x26a01d,_0x58ca58){_0x26a01d=_0x26a01d-0x0;var _0xec4ef3=_0x8f11[_0x26a01d];return _0xec4ef3;};'use strict';var _=require('lodash');var util=require(_0x18f1('0x0'));var logger=require(_0x18f1('0x1'))(_0x18f1('0x2'));var moment=require(_0x18f1('0x3'));var BPromise=require(_0x18f1('0x4'));var rp=require(_0x18f1('0x5'));var fs=require('fs');var path=require(_0x18f1('0x6'));var rimraf=require(_0x18f1('0x7'));var config=require('../../config/environment');var attributes=require(_0x18f1('0x8'));module[_0x18f1('0x9')]=function(_0x48f0ff,_0x269f00){return _0x48f0ff['define'](_0x18f1('0xa'),attributes,{'tableName':_0x18f1('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 33b57c1..5e2ce7c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x95d9=['randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','SugarcrmConfiguration,\x20%s,\x20%s','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','lodash','util','moment','bluebird'];(function(_0x1403ac,_0x532100){var _0x368514=function(_0x39b27d){while(--_0x39b27d){_0x1403ac['push'](_0x1403ac['shift']());}};_0x368514(++_0x532100);}(_0x95d9,0xec));var _0x995d=function(_0x465028,_0x4570ac){_0x465028=_0x465028-0x0;var _0xb783d4=_0x95d9[_0x465028];return _0xb783d4;};'use strict';var _=require(_0x995d('0x0'));var util=require(_0x995d('0x1'));var moment=require(_0x995d('0x2'));var BPromise=require(_0x995d('0x3'));var rs=require(_0x995d('0x4'));var fs=require('fs');var Redis=require(_0x995d('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x995d('0x6'))(_0x995d('0x7'));var config=require(_0x995d('0x8'));var jayson=require(_0x995d('0x9'));var client=jayson['client'][_0x995d('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3d1e10,_0xb71ed2,_0x1cbea0){return new BPromise(function(_0x129d3a,_0x38eb85){return client[_0x995d('0xb')](_0x3d1e10,_0x1cbea0)['then'](function(_0x1ea22c){logger['info'](_0x995d('0xc'),_0xb71ed2,'request\x20sent');logger['debug'](_0x995d('0xd'),_0xb71ed2,_0x995d('0xe'),JSON[_0x995d('0xf')](_0x1ea22c));if(_0x1ea22c[_0x995d('0x10')]){if(_0x1ea22c[_0x995d('0x10')][_0x995d('0x11')]===0x1f4){logger[_0x995d('0x10')](_0x995d('0xc'),_0xb71ed2,_0x1ea22c[_0x995d('0x10')]['message']);return _0x38eb85(_0x1ea22c[_0x995d('0x10')]['message']);}logger[_0x995d('0x10')](_0x995d('0xc'),_0xb71ed2,_0x1ea22c[_0x995d('0x10')][_0x995d('0x12')]);return _0x129d3a(_0x1ea22c['error'][_0x995d('0x12')]);}else{logger[_0x995d('0x13')]('SugarcrmConfiguration,\x20%s,\x20%s',_0xb71ed2,_0x995d('0xe'));_0x129d3a(_0x1ea22c['result'][_0x995d('0x12')]);}})['catch'](function(_0x3e03c3){logger[_0x995d('0x10')](_0x995d('0xc'),_0xb71ed2,_0x3e03c3);_0x38eb85(_0x3e03c3);});});}
\ No newline at end of file
+var _0xaad4=['lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','request','then','info','SugarcrmConfiguration,\x20%s,\x20%s','request\x20sent','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch'];(function(_0x1facfa,_0x1acf7d){var _0x9ec701=function(_0x115e37){while(--_0x115e37){_0x1facfa['push'](_0x1facfa['shift']());}};_0x9ec701(++_0x1acf7d);}(_0xaad4,0x13b));var _0x4aad=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xaad4[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x4aad('0x0'));var util=require(_0x4aad('0x1'));var moment=require(_0x4aad('0x2'));var BPromise=require(_0x4aad('0x3'));var rs=require(_0x4aad('0x4'));var fs=require('fs');var Redis=require(_0x4aad('0x5'));var db=require(_0x4aad('0x6'))['db'];var utils=require(_0x4aad('0x7'));var logger=require('../../config/logger')(_0x4aad('0x8'));var config=require('../../config/environment');var jayson=require(_0x4aad('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x301c3b,_0x433c7d,_0x44eec3){return new BPromise(function(_0xcb4bf9,_0x4571dd){return client[_0x4aad('0xa')](_0x301c3b,_0x44eec3)[_0x4aad('0xb')](function(_0x51766a){logger[_0x4aad('0xc')](_0x4aad('0xd'),_0x433c7d,_0x4aad('0xe'));logger['debug'](_0x4aad('0xf'),_0x433c7d,_0x4aad('0xe'),JSON[_0x4aad('0x10')](_0x51766a));if(_0x51766a[_0x4aad('0x11')]){if(_0x51766a[_0x4aad('0x11')][_0x4aad('0x12')]===0x1f4){logger['error'](_0x4aad('0xd'),_0x433c7d,_0x51766a[_0x4aad('0x11')][_0x4aad('0x13')]);return _0x4571dd(_0x51766a[_0x4aad('0x11')][_0x4aad('0x13')]);}logger['error']('SugarcrmConfiguration,\x20%s,\x20%s',_0x433c7d,_0x51766a[_0x4aad('0x11')][_0x4aad('0x13')]);return _0xcb4bf9(_0x51766a[_0x4aad('0x11')]['message']);}else{logger[_0x4aad('0xc')](_0x4aad('0xd'),_0x433c7d,_0x4aad('0xe'));_0xcb4bf9(_0x51766a['result'][_0x4aad('0x13')]);}})[_0x4aad('0x14')](function(_0x1b7ba8){logger[_0x4aad('0x11')](_0x4aad('0xd'),_0x433c7d,_0x1b7ba8);_0x4571dd(_0x1b7ba8);});});}
\ No newline at end of file
index d0f649d..ac2adc6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3b8b=['../../components/interaction/service','../../config/environment','./intSugarcrmField.controller','get','isAuthenticated','index','/:id','show','put','update','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service'];(function(_0x4b7895,_0x3c4f5d){var _0x264180=function(_0xe0e861){while(--_0xe0e861){_0x4b7895['push'](_0x4b7895['shift']());}};_0x264180(++_0x3c4f5d);}(_0x3b8b,0x1cc));var _0xb3b8=function(_0x152aa1,_0x307718){_0x152aa1=_0x152aa1-0x0;var _0x1bc01a=_0x3b8b[_0x152aa1];return _0x1bc01a;};'use strict';var multer=require(_0xb3b8('0x0'));var util=require(_0xb3b8('0x1'));var path=require(_0xb3b8('0x2'));var timeout=require(_0xb3b8('0x3'));var express=require(_0xb3b8('0x4'));var router=express[_0xb3b8('0x5')]();var fs_extra=require(_0xb3b8('0x6'));var auth=require(_0xb3b8('0x7'));var interaction=require(_0xb3b8('0x8'));var config=require(_0xb3b8('0x9'));var controller=require(_0xb3b8('0xa'));router[_0xb3b8('0xb')]('/',auth[_0xb3b8('0xc')](),controller[_0xb3b8('0xd')]);router[_0xb3b8('0xb')](_0xb3b8('0xe'),auth[_0xb3b8('0xc')](),controller[_0xb3b8('0xf')]);router['post']('/',auth[_0xb3b8('0xc')](),controller['create']);router[_0xb3b8('0x10')](_0xb3b8('0xe'),auth[_0xb3b8('0xc')](),controller[_0xb3b8('0x11')]);router['delete'](_0xb3b8('0xe'),auth[_0xb3b8('0xc')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0xdc04=['get','/:id','post','create','put','update','delete','destroy','exports','multer','path','Router','../../components/interaction/service','../../config/environment','./intSugarcrmField.controller','isAuthenticated','index'];(function(_0x53d1ef,_0x59c30d){var _0x57a6df=function(_0x1ae886){while(--_0x1ae886){_0x53d1ef['push'](_0x53d1ef['shift']());}};_0x57a6df(++_0x59c30d);}(_0xdc04,0x1b2));var _0x4dc0=function(_0x1a085f,_0x1499a1){_0x1a085f=_0x1a085f-0x0;var _0x2611af=_0xdc04[_0x1a085f];return _0x2611af;};'use strict';var multer=require(_0x4dc0('0x0'));var util=require('util');var path=require(_0x4dc0('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x4dc0('0x2')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x4dc0('0x3'));var config=require(_0x4dc0('0x4'));var controller=require(_0x4dc0('0x5'));router['get']('/',auth[_0x4dc0('0x6')](),controller[_0x4dc0('0x7')]);router[_0x4dc0('0x8')](_0x4dc0('0x9'),auth[_0x4dc0('0x6')](),controller['show']);router[_0x4dc0('0xa')]('/',auth[_0x4dc0('0x6')](),controller[_0x4dc0('0xb')]);router[_0x4dc0('0xc')](_0x4dc0('0x9'),auth[_0x4dc0('0x6')](),controller[_0x4dc0('0xd')]);router[_0x4dc0('0xe')](_0x4dc0('0x9'),auth[_0x4dc0('0x6')](),controller[_0x4dc0('0xf')]);module[_0x4dc0('0x10')]=router;
\ No newline at end of file
index 587eaa0..b82c495 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9b0c=['BOOLEAN','sequelize','exports','ENUM','string','variable','customVariable','picklist','STRING'];(function(_0x519c88,_0xb84103){var _0x4668d7=function(_0x596c2c){while(--_0x596c2c){_0x519c88['push'](_0x519c88['shift']());}};_0x4668d7(++_0xb84103);}(_0x9b0c,0x1c3));var _0xc9b0=function(_0x2affd2,_0x58bce0){_0x2affd2=_0x2affd2-0x0;var _0x177bba=_0x9b0c[_0x2affd2];return _0x177bba;};'use strict';var Sequelize=require(_0xc9b0('0x0'));module[_0xc9b0('0x1')]={'type':{'type':Sequelize[_0xc9b0('0x2')](_0xc9b0('0x3'),_0xc9b0('0x4'),_0xc9b0('0x5'),'keyValue',_0xc9b0('0x6')),'defaultValue':_0xc9b0('0x3')},'content':{'type':Sequelize[_0xc9b0('0x7')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0xc9b0('0x2')]('string',_0xc9b0('0x4'),'customVariable')},'keyContent':{'type':Sequelize[_0xc9b0('0x7')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0xc9b0('0x7')]},'customField':{'type':Sequelize[_0xc9b0('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xc9b0('0x7')]}};
\ No newline at end of file
+var _0xe149=['variable','customVariable','keyValue','picklist','string','STRING','ENUM','BOOLEAN','sequelize'];(function(_0xc582b4,_0x3eecca){var _0x386664=function(_0x4a9638){while(--_0x4a9638){_0xc582b4['push'](_0xc582b4['shift']());}};_0x386664(++_0x3eecca);}(_0xe149,0x167));var _0x9e14=function(_0x4a9744,_0x11c98e){_0x4a9744=_0x4a9744-0x0;var _0x59a9a4=_0xe149[_0x4a9744];return _0x59a9a4;};'use strict';var Sequelize=require(_0x9e14('0x0'));module['exports']={'type':{'type':Sequelize['ENUM']('string',_0x9e14('0x1'),_0x9e14('0x2'),_0x9e14('0x3'),_0x9e14('0x4')),'defaultValue':_0x9e14('0x5')},'content':{'type':Sequelize[_0x9e14('0x6')]},'key':{'type':Sequelize[_0x9e14('0x6')]},'keyType':{'type':Sequelize[_0x9e14('0x7')]('string','variable',_0x9e14('0x2'))},'keyContent':{'type':Sequelize[_0x9e14('0x6')]},'idField':{'type':Sequelize[_0x9e14('0x6')]},'nameField':{'type':Sequelize[_0x9e14('0x6')]},'customField':{'type':Sequelize[_0x9e14('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
index 8f4aa6a..e7e1c42 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa5a6=['lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','end','undefined','limit','count','offset','status','json','apply','reject','save','update','then','error','stack','send','index','map','SugarcrmField','rawAttributes','fieldName','key','model','query','filters','intersection','attributes','fields','length','nolimit','sort','where','merge','type','VIRTUAL','include','findAll','params','keys','includeAll','options','catch','create','body','find','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','ejs','fs-extra'];(function(_0x193927,_0x545c88){var _0x1d21b1=function(_0x55ab7d){while(--_0x55ab7d){_0x193927['push'](_0x193927['shift']());}};_0x1d21b1(++_0x545c88);}(_0xa5a6,0x14f));var _0x6a5a=function(_0x5b5c45,_0x199467){_0x5b5c45=_0x5b5c45-0x0;var _0x2cd0dd=_0xa5a6[_0x5b5c45];return _0x2cd0dd;};'use strict';var emlformat=require(_0x6a5a('0x0'));var rimraf=require(_0x6a5a('0x1'));var zipdir=require(_0x6a5a('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x6a5a('0x3'));var moment=require(_0x6a5a('0x4'));var BPromise=require(_0x6a5a('0x5'));var Mustache=require(_0x6a5a('0x6'));var util=require('util');var path=require(_0x6a5a('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x6a5a('0x8'));var fs=require('fs');var fs_extra=require(_0x6a5a('0x9'));var _=require(_0x6a5a('0xa'));var squel=require(_0x6a5a('0xb'));var crypto=require(_0x6a5a('0xc'));var jsforce=require(_0x6a5a('0xd'));var deskjs=require(_0x6a5a('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x6a5a('0xf'));var Redis=require(_0x6a5a('0x10'));var authService=require(_0x6a5a('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x6a5a('0x12'));var hardwareService=require(_0x6a5a('0x13'));var logger=require('../../config/logger')(_0x6a5a('0x14'));var utils=require(_0x6a5a('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x6a5a('0x16'));var db=require(_0x6a5a('0x17'))['db'];function respondWithStatusCode(_0x518e5d,_0x170f69){_0x170f69=_0x170f69||0xcc;return function(_0x45baf6){if(_0x45baf6){return _0x518e5d[_0x6a5a('0x18')](_0x170f69);}return _0x518e5d['status'](_0x170f69)[_0x6a5a('0x19')]();};}function respondWithResult(_0x3d603f,_0x3a00bb){_0x3a00bb=_0x3a00bb||0xc8;return function(_0xa3cd11){if(_0xa3cd11){return _0x3d603f['status'](_0x3a00bb)['json'](_0xa3cd11);}};}function respondWithFilteredResult(_0x55c68b,_0x197dbf){return function(_0x9ee5b0){if(_0x9ee5b0){var _0x4d28f6=typeof _0x197dbf['offset']===_0x6a5a('0x1a')&&typeof _0x197dbf[_0x6a5a('0x1b')]===_0x6a5a('0x1a');var _0x10c6d4=_0x9ee5b0[_0x6a5a('0x1c')];var _0x3a8cc8=_0x4d28f6?0x0:_0x197dbf[_0x6a5a('0x1d')];var _0x30d9dc=_0x4d28f6?_0x9ee5b0[_0x6a5a('0x1c')]:_0x197dbf[_0x6a5a('0x1d')]+_0x197dbf['limit'];var _0x283b1a;if(_0x30d9dc>=_0x10c6d4){_0x30d9dc=_0x10c6d4;_0x283b1a=0xc8;}else{_0x283b1a=0xce;}_0x55c68b[_0x6a5a('0x1e')](_0x283b1a);return _0x55c68b['set']('Content-Range',_0x3a8cc8+'-'+_0x30d9dc+'/'+_0x10c6d4)[_0x6a5a('0x1f')](_0x9ee5b0);}return null;};}function patchUpdates(_0x3fdfe7){return function(_0x286279){try{jsonpatch[_0x6a5a('0x20')](_0x286279,_0x3fdfe7,!![]);}catch(_0xb4e0c0){return BPromise[_0x6a5a('0x21')](_0xb4e0c0);}return _0x286279[_0x6a5a('0x22')]();};}function saveUpdates(_0x5198ea,_0x5e36ff){return function(_0x6709ca){if(_0x6709ca){return _0x6709ca[_0x6a5a('0x23')](_0x5198ea)[_0x6a5a('0x24')](function(_0x1c9b33){return _0x1c9b33;});}return null;};}function removeEntity(_0x268de1,_0x2b4d32){return function(_0x2c21b8){if(_0x2c21b8){return _0x2c21b8['destroy']()[_0x6a5a('0x24')](function(){_0x268de1['status'](0xcc)[_0x6a5a('0x19')]();});}};}function handleEntityNotFound(_0x20d7a9,_0x112966){return function(_0x305f2b){if(!_0x305f2b){_0x20d7a9['sendStatus'](0x194);}return _0x305f2b;};}function handleError(_0x105767,_0x5f0289){_0x5f0289=_0x5f0289||0x1f4;return function(_0x2f427c){logger[_0x6a5a('0x25')](_0x2f427c[_0x6a5a('0x26')]);if(_0x2f427c['name']){delete _0x2f427c['name'];}_0x105767['status'](_0x5f0289)[_0x6a5a('0x27')](_0x2f427c);};}exports[_0x6a5a('0x28')]=function(_0x59c5a8,_0x4d4a82){var _0x110f18={},_0xc38acf={},_0x47ec20={'count':0x0,'rows':[]};var _0x543c7d=_[_0x6a5a('0x29')](db[_0x6a5a('0x2a')][_0x6a5a('0x2b')],function(_0x5be4fe){return{'name':_0x5be4fe[_0x6a5a('0x2c')],'type':_0x5be4fe['type'][_0x6a5a('0x2d')]};});_0xc38acf[_0x6a5a('0x2e')]=_[_0x6a5a('0x29')](_0x543c7d,'name');_0xc38acf['query']=_['keys'](_0x59c5a8[_0x6a5a('0x2f')]);_0xc38acf[_0x6a5a('0x30')]=_[_0x6a5a('0x31')](_0xc38acf[_0x6a5a('0x2e')],_0xc38acf[_0x6a5a('0x2f')]);_0x110f18[_0x6a5a('0x32')]=_[_0x6a5a('0x31')](_0xc38acf[_0x6a5a('0x2e')],qs[_0x6a5a('0x33')](_0x59c5a8[_0x6a5a('0x2f')][_0x6a5a('0x33')]));_0x110f18[_0x6a5a('0x32')]=_0x110f18[_0x6a5a('0x32')][_0x6a5a('0x34')]?_0x110f18[_0x6a5a('0x32')]:_0xc38acf[_0x6a5a('0x2e')];if(!_0x59c5a8[_0x6a5a('0x2f')]['hasOwnProperty'](_0x6a5a('0x35'))){_0x110f18[_0x6a5a('0x1b')]=qs['limit'](_0x59c5a8[_0x6a5a('0x2f')][_0x6a5a('0x1b')]);_0x110f18[_0x6a5a('0x1d')]=qs['offset'](_0x59c5a8['query']['offset']);}_0x110f18['order']=qs[_0x6a5a('0x36')](_0x59c5a8[_0x6a5a('0x2f')][_0x6a5a('0x36')]);_0x110f18[_0x6a5a('0x37')]=qs[_0x6a5a('0x30')](_['pick'](_0x59c5a8[_0x6a5a('0x2f')],_0xc38acf[_0x6a5a('0x30')]),_0x543c7d);if(_0x59c5a8['query']['filter']){_0x110f18[_0x6a5a('0x37')]=_[_0x6a5a('0x38')](_0x110f18['where'],{'$or':_['map'](_0x543c7d,function(_0x1bf270){if(_0x1bf270[_0x6a5a('0x39')]!==_0x6a5a('0x3a')){var _0x5a9433={};_0x5a9433[_0x1bf270['name']]={'$like':'%'+_0x59c5a8[_0x6a5a('0x2f')]['filter']+'%'};return _0x5a9433;}})});}_0x110f18=_['merge']({},_0x110f18,_0x59c5a8['options']);var _0x56f0b2={'where':_0x110f18[_0x6a5a('0x37')]};return db[_0x6a5a('0x2a')][_0x6a5a('0x1c')](_0x56f0b2)[_0x6a5a('0x24')](function(_0x121412){_0x47ec20[_0x6a5a('0x1c')]=_0x121412;if(_0x59c5a8[_0x6a5a('0x2f')]['includeAll']){_0x110f18[_0x6a5a('0x3b')]=[{'all':!![]}];}return db[_0x6a5a('0x2a')][_0x6a5a('0x3c')](_0x110f18);})[_0x6a5a('0x24')](function(_0x11f96a){_0x47ec20['rows']=_0x11f96a;return _0x47ec20;})[_0x6a5a('0x24')](respondWithFilteredResult(_0x4d4a82,_0x110f18))['catch'](handleError(_0x4d4a82,null));};exports['show']=function(_0x2e8d14,_0x1f7c25){var _0x25a1df={'raw':!![],'where':{'id':_0x2e8d14[_0x6a5a('0x3d')]['id']}},_0x154fdf={};_0x154fdf[_0x6a5a('0x2e')]=_[_0x6a5a('0x3e')](db[_0x6a5a('0x2a')][_0x6a5a('0x2b')]);_0x154fdf[_0x6a5a('0x2f')]=_[_0x6a5a('0x3e')](_0x2e8d14[_0x6a5a('0x2f')]);_0x154fdf['filters']=_[_0x6a5a('0x31')](_0x154fdf['model'],_0x154fdf[_0x6a5a('0x2f')]);_0x25a1df[_0x6a5a('0x32')]=_['intersection'](_0x154fdf['model'],qs[_0x6a5a('0x33')](_0x2e8d14[_0x6a5a('0x2f')][_0x6a5a('0x33')]));_0x25a1df[_0x6a5a('0x32')]=_0x25a1df['attributes'][_0x6a5a('0x34')]?_0x25a1df[_0x6a5a('0x32')]:_0x154fdf[_0x6a5a('0x2e')];if(_0x2e8d14[_0x6a5a('0x2f')][_0x6a5a('0x3f')]){_0x25a1df['include']=[{'all':!![]}];}_0x25a1df=_[_0x6a5a('0x38')]({},_0x25a1df,_0x2e8d14[_0x6a5a('0x40')]);return db[_0x6a5a('0x2a')]['find'](_0x25a1df)[_0x6a5a('0x24')](handleEntityNotFound(_0x1f7c25,null))['then'](respondWithResult(_0x1f7c25,null))[_0x6a5a('0x41')](handleError(_0x1f7c25,null));};exports['create']=function(_0x3925e4,_0x33ed03){return db[_0x6a5a('0x2a')][_0x6a5a('0x42')](_0x3925e4[_0x6a5a('0x43')],{})['then'](respondWithResult(_0x33ed03,0xc9))[_0x6a5a('0x41')](handleError(_0x33ed03,null));};exports[_0x6a5a('0x23')]=function(_0x5727fe,_0x1ac45f){if(_0x5727fe['body']['id']){delete _0x5727fe[_0x6a5a('0x43')]['id'];}return db[_0x6a5a('0x2a')][_0x6a5a('0x44')]({'where':{'id':_0x5727fe['params']['id']}})['then'](handleEntityNotFound(_0x1ac45f,null))[_0x6a5a('0x24')](saveUpdates(_0x5727fe[_0x6a5a('0x43')],null))['then'](respondWithResult(_0x1ac45f,null))[_0x6a5a('0x41')](handleError(_0x1ac45f,null));};exports['destroy']=function(_0x4c1df9,_0x474d08){return db['SugarcrmField']['find']({'where':{'id':_0x4c1df9[_0x6a5a('0x3d')]['id']}})['then'](handleEntityNotFound(_0x474d08,null))[_0x6a5a('0x24')](removeEntity(_0x474d08,null))[_0x6a5a('0x41')](handleError(_0x474d08,null));};
\ No newline at end of file
+var _0x2767=['rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','merge','filter','options','includeAll','include','findAll','rows','catch','show','params','keys','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','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','count','offset','limit','set','Content-Range','apply','reject','save','update','then','stack','name','send','index','map','SugarcrmField'];(function(_0x502036,_0x502686){var _0x485247=function(_0x135ee3){while(--_0x135ee3){_0x502036['push'](_0x502036['shift']());}};_0x485247(++_0x502686);}(_0x2767,0x10c));var _0x7276=function(_0xa423ec,_0x36aff0){_0xa423ec=_0xa423ec-0x0;var _0x264cb7=_0x2767[_0xa423ec];return _0x264cb7;};'use strict';var emlformat=require(_0x7276('0x0'));var rimraf=require(_0x7276('0x1'));var zipdir=require(_0x7276('0x2'));var jsonpatch=require(_0x7276('0x3'));var rp=require(_0x7276('0x4'));var moment=require(_0x7276('0x5'));var BPromise=require(_0x7276('0x6'));var Mustache=require(_0x7276('0x7'));var util=require(_0x7276('0x8'));var path=require(_0x7276('0x9'));var sox=require(_0x7276('0xa'));var csv=require(_0x7276('0xb'));var ejs=require(_0x7276('0xc'));var fs=require('fs');var fs_extra=require(_0x7276('0xd'));var _=require(_0x7276('0xe'));var squel=require('squel');var crypto=require(_0x7276('0xf'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x7276('0xb'));var querystring=require(_0x7276('0x10'));var Papa=require(_0x7276('0x11'));var Redis=require(_0x7276('0x12'));var authService=require(_0x7276('0x13'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x7276('0x14'));var logger=require(_0x7276('0x15'))(_0x7276('0x16'));var utils=require(_0x7276('0x17'));var config=require(_0x7276('0x18'));var licenseUtil=require(_0x7276('0x19'));var db=require(_0x7276('0x1a'))['db'];function respondWithStatusCode(_0x53e588,_0x105766){_0x105766=_0x105766||0xcc;return function(_0x52c3a4){if(_0x52c3a4){return _0x53e588[_0x7276('0x1b')](_0x105766);}return _0x53e588[_0x7276('0x1c')](_0x105766)[_0x7276('0x1d')]();};}function respondWithResult(_0x1fce84,_0x4f9273){_0x4f9273=_0x4f9273||0xc8;return function(_0x39e6f){if(_0x39e6f){return _0x1fce84[_0x7276('0x1c')](_0x4f9273)[_0x7276('0x1e')](_0x39e6f);}};}function respondWithFilteredResult(_0x579d63,_0x44a0e1){return function(_0x4076a1){if(_0x4076a1){var _0x204c5e=typeof _0x44a0e1['offset']===_0x7276('0x1f')&&typeof _0x44a0e1['limit']==='undefined';var _0x10cebf=_0x4076a1[_0x7276('0x20')];var _0x15befc=_0x204c5e?0x0:_0x44a0e1[_0x7276('0x21')];var _0x587a7f=_0x204c5e?_0x4076a1[_0x7276('0x20')]:_0x44a0e1[_0x7276('0x21')]+_0x44a0e1[_0x7276('0x22')];var _0x43a98f;if(_0x587a7f>=_0x10cebf){_0x587a7f=_0x10cebf;_0x43a98f=0xc8;}else{_0x43a98f=0xce;}_0x579d63[_0x7276('0x1c')](_0x43a98f);return _0x579d63[_0x7276('0x23')](_0x7276('0x24'),_0x15befc+'-'+_0x587a7f+'/'+_0x10cebf)[_0x7276('0x1e')](_0x4076a1);}return null;};}function patchUpdates(_0x1c1d7f){return function(_0x3b3ad7){try{jsonpatch[_0x7276('0x25')](_0x3b3ad7,_0x1c1d7f,!![]);}catch(_0x49aba5){return BPromise[_0x7276('0x26')](_0x49aba5);}return _0x3b3ad7[_0x7276('0x27')]();};}function saveUpdates(_0x5bdaad,_0x4a4436){return function(_0x249ad2){if(_0x249ad2){return _0x249ad2[_0x7276('0x28')](_0x5bdaad)[_0x7276('0x29')](function(_0x5c2984){return _0x5c2984;});}return null;};}function removeEntity(_0x1b4152,_0x2d4a67){return function(_0x1fb300){if(_0x1fb300){return _0x1fb300['destroy']()[_0x7276('0x29')](function(){_0x1b4152['status'](0xcc)[_0x7276('0x1d')]();});}};}function handleEntityNotFound(_0x27f71e,_0x55c778){return function(_0x3eb574){if(!_0x3eb574){_0x27f71e[_0x7276('0x1b')](0x194);}return _0x3eb574;};}function handleError(_0x5224bd,_0x4cd922){_0x4cd922=_0x4cd922||0x1f4;return function(_0x5dd620){logger['error'](_0x5dd620[_0x7276('0x2a')]);if(_0x5dd620[_0x7276('0x2b')]){delete _0x5dd620[_0x7276('0x2b')];}_0x5224bd[_0x7276('0x1c')](_0x4cd922)[_0x7276('0x2c')](_0x5dd620);};}exports[_0x7276('0x2d')]=function(_0x3512af,_0x24389c){var _0x2e8cd9={},_0x35e0a6={},_0xe9fbad={'count':0x0,'rows':[]};var _0x1a06c8=_[_0x7276('0x2e')](db[_0x7276('0x2f')][_0x7276('0x30')],function(_0x50e957){return{'name':_0x50e957[_0x7276('0x31')],'type':_0x50e957[_0x7276('0x32')][_0x7276('0x33')]};});_0x35e0a6[_0x7276('0x34')]=_['map'](_0x1a06c8,_0x7276('0x2b'));_0x35e0a6[_0x7276('0x35')]=_['keys'](_0x3512af[_0x7276('0x35')]);_0x35e0a6[_0x7276('0x36')]=_[_0x7276('0x37')](_0x35e0a6[_0x7276('0x34')],_0x35e0a6[_0x7276('0x35')]);_0x2e8cd9[_0x7276('0x38')]=_[_0x7276('0x37')](_0x35e0a6[_0x7276('0x34')],qs[_0x7276('0x39')](_0x3512af[_0x7276('0x35')][_0x7276('0x39')]));_0x2e8cd9[_0x7276('0x38')]=_0x2e8cd9['attributes'][_0x7276('0x3a')]?_0x2e8cd9['attributes']:_0x35e0a6[_0x7276('0x34')];if(!_0x3512af[_0x7276('0x35')][_0x7276('0x3b')]('nolimit')){_0x2e8cd9[_0x7276('0x22')]=qs['limit'](_0x3512af[_0x7276('0x35')][_0x7276('0x22')]);_0x2e8cd9[_0x7276('0x21')]=qs[_0x7276('0x21')](_0x3512af[_0x7276('0x35')][_0x7276('0x21')]);}_0x2e8cd9[_0x7276('0x3c')]=qs['sort'](_0x3512af['query'][_0x7276('0x3d')]);_0x2e8cd9[_0x7276('0x3e')]=qs[_0x7276('0x36')](_[_0x7276('0x3f')](_0x3512af[_0x7276('0x35')],_0x35e0a6[_0x7276('0x36')]),_0x1a06c8);if(_0x3512af[_0x7276('0x35')]['filter']){_0x2e8cd9[_0x7276('0x3e')]=_[_0x7276('0x40')](_0x2e8cd9['where'],{'$or':_['map'](_0x1a06c8,function(_0x35a264){if(_0x35a264[_0x7276('0x32')]!=='VIRTUAL'){var _0x2f1a58={};_0x2f1a58[_0x35a264[_0x7276('0x2b')]]={'$like':'%'+_0x3512af[_0x7276('0x35')][_0x7276('0x41')]+'%'};return _0x2f1a58;}})});}_0x2e8cd9=_['merge']({},_0x2e8cd9,_0x3512af[_0x7276('0x42')]);var _0x24511f={'where':_0x2e8cd9[_0x7276('0x3e')]};return db['SugarcrmField'][_0x7276('0x20')](_0x24511f)[_0x7276('0x29')](function(_0x35fe71){_0xe9fbad['count']=_0x35fe71;if(_0x3512af[_0x7276('0x35')][_0x7276('0x43')]){_0x2e8cd9[_0x7276('0x44')]=[{'all':!![]}];}return db[_0x7276('0x2f')][_0x7276('0x45')](_0x2e8cd9);})[_0x7276('0x29')](function(_0x522366){_0xe9fbad[_0x7276('0x46')]=_0x522366;return _0xe9fbad;})[_0x7276('0x29')](respondWithFilteredResult(_0x24389c,_0x2e8cd9))[_0x7276('0x47')](handleError(_0x24389c,null));};exports[_0x7276('0x48')]=function(_0x2b2787,_0x2f882b){var _0x6e7cb7={'raw':!![],'where':{'id':_0x2b2787[_0x7276('0x49')]['id']}},_0x3aed76={};_0x3aed76[_0x7276('0x34')]=_[_0x7276('0x4a')](db[_0x7276('0x2f')][_0x7276('0x30')]);_0x3aed76['query']=_[_0x7276('0x4a')](_0x2b2787[_0x7276('0x35')]);_0x3aed76[_0x7276('0x36')]=_[_0x7276('0x37')](_0x3aed76[_0x7276('0x34')],_0x3aed76['query']);_0x6e7cb7[_0x7276('0x38')]=_[_0x7276('0x37')](_0x3aed76['model'],qs[_0x7276('0x39')](_0x2b2787['query'][_0x7276('0x39')]));_0x6e7cb7[_0x7276('0x38')]=_0x6e7cb7[_0x7276('0x38')][_0x7276('0x3a')]?_0x6e7cb7[_0x7276('0x38')]:_0x3aed76[_0x7276('0x34')];if(_0x2b2787[_0x7276('0x35')][_0x7276('0x43')]){_0x6e7cb7[_0x7276('0x44')]=[{'all':!![]}];}_0x6e7cb7=_[_0x7276('0x40')]({},_0x6e7cb7,_0x2b2787[_0x7276('0x42')]);return db['SugarcrmField'][_0x7276('0x4b')](_0x6e7cb7)['then'](handleEntityNotFound(_0x2f882b,null))[_0x7276('0x29')](respondWithResult(_0x2f882b,null))[_0x7276('0x47')](handleError(_0x2f882b,null));};exports[_0x7276('0x4c')]=function(_0x152c18,_0x2726be){return db[_0x7276('0x2f')][_0x7276('0x4c')](_0x152c18[_0x7276('0x4d')],{})['then'](respondWithResult(_0x2726be,0xc9))[_0x7276('0x47')](handleError(_0x2726be,null));};exports[_0x7276('0x28')]=function(_0x1558e0,_0x556c0f){if(_0x1558e0['body']['id']){delete _0x1558e0[_0x7276('0x4d')]['id'];}return db[_0x7276('0x2f')][_0x7276('0x4b')]({'where':{'id':_0x1558e0[_0x7276('0x49')]['id']}})[_0x7276('0x29')](handleEntityNotFound(_0x556c0f,null))[_0x7276('0x29')](saveUpdates(_0x1558e0[_0x7276('0x4d')],null))[_0x7276('0x29')](respondWithResult(_0x556c0f,null))[_0x7276('0x47')](handleError(_0x556c0f,null));};exports[_0x7276('0x4e')]=function(_0x1cebe4,_0x2881dc){return db[_0x7276('0x2f')][_0x7276('0x4b')]({'where':{'id':_0x1cebe4[_0x7276('0x49')]['id']}})[_0x7276('0x29')](handleEntityNotFound(_0x2881dc,null))[_0x7276('0x29')](removeEntity(_0x2881dc,null))[_0x7276('0x47')](handleError(_0x2881dc,null));};
\ No newline at end of file
index 9cacaa0..af46cf7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa0d3=['./intSugarcrmField.attributes','exports','define','SugarcrmField','int_sugarcrm_fields','sugarcrm_unique_index','FieldId','lodash','util','../../config/logger','bluebird','request-promise','rimraf','../../config/environment'];(function(_0x5e61fe,_0x4ec70b){var _0x13ff2b=function(_0x300006){while(--_0x300006){_0x5e61fe['push'](_0x5e61fe['shift']());}};_0x13ff2b(++_0x4ec70b);}(_0xa0d3,0x181));var _0x3a0d=function(_0x38987f,_0xc79720){_0x38987f=_0x38987f-0x0;var _0x4cb697=_0xa0d3[_0x38987f];return _0x4cb697;};'use strict';var _=require(_0x3a0d('0x0'));var util=require(_0x3a0d('0x1'));var logger=require(_0x3a0d('0x2'))('api');var moment=require('moment');var BPromise=require(_0x3a0d('0x3'));var rp=require(_0x3a0d('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x3a0d('0x5'));var config=require(_0x3a0d('0x6'));var attributes=require(_0x3a0d('0x7'));module[_0x3a0d('0x8')]=function(_0xd4f115,_0x32caaa){return _0xd4f115[_0x3a0d('0x9')](_0x3a0d('0xa'),attributes,{'tableName':_0x3a0d('0xb'),'paranoid':![],'indexes':[{'name':_0x3a0d('0xc'),'fields':['idField',_0x3a0d('0xd')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xa085=['moment','bluebird','request-promise','rimraf','../../config/environment','./intSugarcrmField.attributes','exports','define','int_sugarcrm_fields','FieldId','lodash','util','../../config/logger','api'];(function(_0x95b0f2,_0x1a5be0){var _0xf879c7=function(_0x180b6e){while(--_0x180b6e){_0x95b0f2['push'](_0x95b0f2['shift']());}};_0xf879c7(++_0x1a5be0);}(_0xa085,0x1e6));var _0x5a08=function(_0x38a301,_0x4112f3){_0x38a301=_0x38a301-0x0;var _0x554d85=_0xa085[_0x38a301];return _0x554d85;};'use strict';var _=require(_0x5a08('0x0'));var util=require(_0x5a08('0x1'));var logger=require(_0x5a08('0x2'))(_0x5a08('0x3'));var moment=require(_0x5a08('0x4'));var BPromise=require(_0x5a08('0x5'));var rp=require(_0x5a08('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x5a08('0x7'));var config=require(_0x5a08('0x8'));var attributes=require(_0x5a08('0x9'));module[_0x5a08('0xa')]=function(_0x253759,_0x3bf86f){return _0x253759[_0x5a08('0xb')]('SugarcrmField',attributes,{'tableName':_0x5a08('0xc'),'paranoid':![],'indexes':[{'name':'sugarcrm_unique_index','fields':['idField',_0x5a08('0xd')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index 63e5d22..edf657b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0721=['moment','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','SugarcrmField,\x20%s,\x20%s','SugarcrmField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','catch','lodash'];(function(_0x1059dc,_0x4f3e5a){var _0x3e8bab=function(_0xed9f52){while(--_0xed9f52){_0x1059dc['push'](_0x1059dc['shift']());}};_0x3e8bab(++_0x4f3e5a);}(_0x0721,0x17b));var _0x1072=function(_0x2a8c21,_0x163576){_0x2a8c21=_0x2a8c21-0x0;var _0x5f3061=_0x0721[_0x2a8c21];return _0x5f3061;};'use strict';var _=require(_0x1072('0x0'));var util=require('util');var moment=require(_0x1072('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1072('0x2'));var db=require(_0x1072('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x1072('0x4'))(_0x1072('0x5'));var config=require(_0x1072('0x6'));var jayson=require(_0x1072('0x7'));var client=jayson[_0x1072('0x8')][_0x1072('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x412ad2,_0x5f19d8,_0x24a681){return new BPromise(function(_0x1c9310,_0x1cb07c){return client[_0x1072('0xa')](_0x412ad2,_0x24a681)[_0x1072('0xb')](function(_0x5d4e77){logger[_0x1072('0xc')](_0x1072('0xd'),_0x5f19d8,'request\x20sent');logger['debug'](_0x1072('0xe'),_0x5f19d8,_0x1072('0xf'),JSON[_0x1072('0x10')](_0x5d4e77));if(_0x5d4e77[_0x1072('0x11')]){if(_0x5d4e77['error']['code']===0x1f4){logger['error']('SugarcrmField,\x20%s,\x20%s',_0x5f19d8,_0x5d4e77[_0x1072('0x11')]['message']);return _0x1cb07c(_0x5d4e77[_0x1072('0x11')][_0x1072('0x12')]);}logger[_0x1072('0x11')](_0x1072('0xd'),_0x5f19d8,_0x5d4e77[_0x1072('0x11')][_0x1072('0x12')]);return _0x1c9310(_0x5d4e77['error'][_0x1072('0x12')]);}else{logger[_0x1072('0xc')](_0x1072('0xd'),_0x5f19d8,_0x1072('0xf'));_0x1c9310(_0x5d4e77['result']['message']);}})[_0x1072('0x13')](function(_0x4e63c7){logger['error'](_0x1072('0xd'),_0x5f19d8,_0x4e63c7);_0x1cb07c(_0x4e63c7);});});}
\ No newline at end of file
+var _0x96e5=['../../mysqldb','rpc','jayson/promise','client','info','SugarcrmField,\x20%s,\x20%s','request\x20sent','debug','SugarcrmField,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x178e48,_0x3c9509){var _0x440d7e=function(_0xc2f8a0){while(--_0xc2f8a0){_0x178e48['push'](_0x178e48['shift']());}};_0x440d7e(++_0x3c9509);}(_0x96e5,0x126));var _0x596e=function(_0x3a3292,_0x44bb68){_0x3a3292=_0x3a3292-0x0;var _0x2e8bed=_0x96e5[_0x3a3292];return _0x2e8bed;};'use strict';var _=require(_0x596e('0x0'));var util=require(_0x596e('0x1'));var moment=require(_0x596e('0x2'));var BPromise=require(_0x596e('0x3'));var rs=require(_0x596e('0x4'));var fs=require('fs');var Redis=require(_0x596e('0x5'));var db=require(_0x596e('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x596e('0x7'));var config=require('../../config/environment');var jayson=require(_0x596e('0x8'));var client=jayson[_0x596e('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5b2a81,_0x1445e4,_0x1b9d37){return new BPromise(function(_0x4e5402,_0x2f6cdb){return client['request'](_0x5b2a81,_0x1b9d37)['then'](function(_0x4127d7){logger[_0x596e('0xa')](_0x596e('0xb'),_0x1445e4,_0x596e('0xc'));logger[_0x596e('0xd')](_0x596e('0xe'),_0x1445e4,'request\x20sent',JSON[_0x596e('0xf')](_0x4127d7));if(_0x4127d7[_0x596e('0x10')]){if(_0x4127d7[_0x596e('0x10')]['code']===0x1f4){logger[_0x596e('0x10')]('SugarcrmField,\x20%s,\x20%s',_0x1445e4,_0x4127d7[_0x596e('0x10')][_0x596e('0x11')]);return _0x2f6cdb(_0x4127d7['error'][_0x596e('0x11')]);}logger[_0x596e('0x10')](_0x596e('0xb'),_0x1445e4,_0x4127d7['error']['message']);return _0x4e5402(_0x4127d7['error']['message']);}else{logger[_0x596e('0xa')](_0x596e('0xb'),_0x1445e4,'request\x20sent');_0x4e5402(_0x4127d7[_0x596e('0x12')][_0x596e('0x11')]);}})[_0x596e('0x13')](function(_0x5c04de){logger[_0x596e('0x10')]('SugarcrmField,\x20%s,\x20%s',_0x1445e4,_0x5c04de);_0x2f6cdb(_0x5c04de);});});}
\ No newline at end of file
index 6b1edc2..b72d744 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb07f=['./intVtigerAccount.controller','isAuthenticated','index','get','/:id','show','/:id/configurations','getConfigurations','/:id/fields','create','addConfiguration','put','update','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x4749ee,_0x460c92){var _0x34c8e5=function(_0x4e7cb4){while(--_0x4e7cb4){_0x4749ee['push'](_0x4749ee['shift']());}};_0x34c8e5(++_0x460c92);}(_0xb07f,0x109));var _0xfb07=function(_0x33d598,_0x1ad580){_0x33d598=_0x33d598-0x0;var _0x4dcfcc=_0xb07f[_0x33d598];return _0x4dcfcc;};'use strict';var multer=require(_0xfb07('0x0'));var util=require(_0xfb07('0x1'));var path=require(_0xfb07('0x2'));var timeout=require(_0xfb07('0x3'));var express=require(_0xfb07('0x4'));var router=express[_0xfb07('0x5')]();var fs_extra=require(_0xfb07('0x6'));var auth=require(_0xfb07('0x7'));var interaction=require(_0xfb07('0x8'));var config=require(_0xfb07('0x9'));var controller=require(_0xfb07('0xa'));router['get']('/',auth[_0xfb07('0xb')](),controller[_0xfb07('0xc')]);router[_0xfb07('0xd')](_0xfb07('0xe'),auth[_0xfb07('0xb')](),controller[_0xfb07('0xf')]);router[_0xfb07('0xd')](_0xfb07('0x10'),auth[_0xfb07('0xb')](),controller[_0xfb07('0x11')]);router[_0xfb07('0xd')](_0xfb07('0x12'),auth['isAuthenticated'](),controller['getFields']);router['post']('/',auth[_0xfb07('0xb')](),controller[_0xfb07('0x13')]);router['post'](_0xfb07('0x10'),auth[_0xfb07('0xb')](),controller[_0xfb07('0x14')]);router[_0xfb07('0x15')](_0xfb07('0xe'),auth[_0xfb07('0xb')](),controller[_0xfb07('0x16')]);router['delete'](_0xfb07('0xe'),auth[_0xfb07('0xb')](),controller[_0xfb07('0x17')]);module[_0xfb07('0x18')]=router;
\ No newline at end of file
+var _0x8e52=['../../components/auth/service','../../components/interaction/service','../../config/environment','./intVtigerAccount.controller','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','post','/:id/configurations','put','delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra'];(function(_0x8ac6b3,_0x20b0e1){var _0x1d6427=function(_0x323615){while(--_0x323615){_0x8ac6b3['push'](_0x8ac6b3['shift']());}};_0x1d6427(++_0x20b0e1);}(_0x8e52,0x1c6));var _0x28e5=function(_0x52b24f,_0xca062d){_0x52b24f=_0x52b24f-0x0;var _0x46ea6b=_0x8e52[_0x52b24f];return _0x46ea6b;};'use strict';var multer=require('multer');var util=require(_0x28e5('0x0'));var path=require(_0x28e5('0x1'));var timeout=require(_0x28e5('0x2'));var express=require(_0x28e5('0x3'));var router=express[_0x28e5('0x4')]();var fs_extra=require(_0x28e5('0x5'));var auth=require(_0x28e5('0x6'));var interaction=require(_0x28e5('0x7'));var config=require(_0x28e5('0x8'));var controller=require(_0x28e5('0x9'));router[_0x28e5('0xa')]('/',auth[_0x28e5('0xb')](),controller[_0x28e5('0xc')]);router[_0x28e5('0xa')](_0x28e5('0xd'),auth['isAuthenticated'](),controller[_0x28e5('0xe')]);router[_0x28e5('0xa')]('/:id/configurations',auth[_0x28e5('0xb')](),controller['getConfigurations']);router[_0x28e5('0xa')](_0x28e5('0xf'),auth[_0x28e5('0xb')](),controller[_0x28e5('0x10')]);router[_0x28e5('0x11')]('/',auth['isAuthenticated'](),controller['create']);router['post'](_0x28e5('0x12'),auth[_0x28e5('0xb')](),controller['addConfiguration']);router[_0x28e5('0x13')](_0x28e5('0xd'),auth[_0x28e5('0xb')](),controller['update']);router[_0x28e5('0x14')]('/:id',auth[_0x28e5('0xb')](),controller[_0x28e5('0x15')]);module[_0x28e5('0x16')]=router;
\ No newline at end of file
index 460b305..25a622b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x56b9=['STRING'];(function(_0x3c4e81,_0x114f0c){var _0x3396b5=function(_0x54759d){while(--_0x54759d){_0x3c4e81['push'](_0x3c4e81['shift']());}};_0x3396b5(++_0x114f0c);}(_0x56b9,0x115));var _0x956b=function(_0xf84870,_0x4dc38f){_0xf84870=_0xf84870-0x0;var _0x4541a4=_0x56b9[_0xf84870];return _0x4541a4;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x956b('0x0')],'allowNull':![]},'description':{'type':Sequelize[_0x956b('0x0')]},'username':{'type':Sequelize[_0x956b('0x0')],'allowNull':![]},'moduleName':{'type':Sequelize[_0x956b('0x0')],'allowNull':![],'defaultValue':'HelpDesk'},'remoteUri':{'type':Sequelize['STRING'],'allowNull':![]},'serverUrl':{'type':Sequelize[_0x956b('0x0')],'allowNull':![]},'accessKey':{'type':Sequelize[_0x956b('0x0')],'allowNull':![]}};
\ No newline at end of file
+var _0x3898=['STRING','HelpDesk'];(function(_0x33b507,_0xe48ac3){var _0x4d4309=function(_0x238168){while(--_0x238168){_0x33b507['push'](_0x33b507['shift']());}};_0x4d4309(++_0xe48ac3);}(_0x3898,0x1ba));var _0x8389=function(_0x267031,_0x303b48){_0x267031=_0x267031-0x0;var _0x1dc1cd=_0x3898[_0x267031];return _0x1dc1cd;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x8389('0x0')],'allowNull':![]},'description':{'type':Sequelize[_0x8389('0x0')]},'username':{'type':Sequelize['STRING'],'allowNull':![]},'moduleName':{'type':Sequelize[_0x8389('0x0')],'allowNull':![],'defaultValue':_0x8389('0x1')},'remoteUri':{'type':Sequelize[_0x8389('0x0')],'allowNull':![]},'serverUrl':{'type':Sequelize[_0x8389('0x0')],'allowNull':![]},'accessKey':{'type':Sequelize[_0x8389('0x0')],'allowNull':![]}};
\ No newline at end of file
index 62755db..795b86e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc12a=['options','includeAll','include','findAll','show','params','rawAttributes','intersection','length','find','create','body','catch','getConfigurations','findOne','VtigerConfiguration','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','VtigerField','username','moduleName','remoteUri','accessKey','slice','substring','lastIndexOf','%s/webservice.php','GET','getchallenge','result','success','describe','sessionName','autogenerated','reference','owner','remove','includes','label','startsWith','picklist','picklistValues','log','vTiger\x20error:\x20','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','getFields','stringify','eml-format','fast-json-patch','moment','bluebird','util','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../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','stack','name','index','map','VtigerAccount','fieldName','type','key','keys','filters','model','attributes','query','fields','hasOwnProperty','nolimit','order','sort','where','pick','merge','filter'];(function(_0x508c33,_0x1e3b14){var _0x5a2392=function(_0x736336){while(--_0x736336){_0x508c33['push'](_0x508c33['shift']());}};_0x5a2392(++_0x1e3b14);}(_0xc12a,0x18f));var _0xac12=function(_0x136116,_0xb1856e){_0x136116=_0x136116-0x0;var _0x204c6b=_0xc12a[_0x136116];return _0x204c6b;};'use strict';var emlformat=require(_0xac12('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xac12('0x1'));var rp=require('request-promise');var moment=require(_0xac12('0x2'));var BPromise=require(_0xac12('0x3'));var Mustache=require('mustache');var util=require(_0xac12('0x4'));var path=require('path');var sox=require('sox');var csv=require(_0xac12('0x5'));var ejs=require(_0xac12('0x6'));var fs=require('fs');var fs_extra=require(_0xac12('0x7'));var _=require(_0xac12('0x8'));var squel=require(_0xac12('0x9'));var crypto=require(_0xac12('0xa'));var jsforce=require(_0xac12('0xb'));var deskjs=require(_0xac12('0xc'));var toCsv=require(_0xac12('0x5'));var querystring=require('querystring');var Papa=require(_0xac12('0xd'));var Redis=require('ioredis');var authService=require(_0xac12('0xe'));var qs=require(_0xac12('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xac12('0x10'));var logger=require(_0xac12('0x11'))(_0xac12('0x12'));var utils=require(_0xac12('0x13'));var config=require(_0xac12('0x14'));var licenseUtil=require(_0xac12('0x15'));var db=require(_0xac12('0x16'))['db'];var integrations=require('../../components/integrations/configuration');function respondWithStatusCode(_0x7c2ede,_0x4ec067){_0x4ec067=_0x4ec067||0xcc;return function(_0x4798a3){if(_0x4798a3){return _0x7c2ede[_0xac12('0x17')](_0x4ec067);}return _0x7c2ede['status'](_0x4ec067)[_0xac12('0x18')]();};}function respondWithResult(_0x5f542d,_0xe27811){_0xe27811=_0xe27811||0xc8;return function(_0x11ede1){if(_0x11ede1){return _0x5f542d[_0xac12('0x19')](_0xe27811)[_0xac12('0x1a')](_0x11ede1);}};}function respondWithFilteredResult(_0x2f1460,_0x263304){return function(_0x2909fd){if(_0x2909fd){var _0x11a0ab=typeof _0x263304[_0xac12('0x1b')]==='undefined'&&typeof _0x263304['limit']===_0xac12('0x1c');var _0x2bb304=_0x2909fd[_0xac12('0x1d')];var _0x3d5a7e=_0x11a0ab?0x0:_0x263304[_0xac12('0x1b')];var _0x35e8cc=_0x11a0ab?_0x2909fd[_0xac12('0x1d')]:_0x263304['offset']+_0x263304[_0xac12('0x1e')];var _0xbe86f8;if(_0x35e8cc>=_0x2bb304){_0x35e8cc=_0x2bb304;_0xbe86f8=0xc8;}else{_0xbe86f8=0xce;}_0x2f1460[_0xac12('0x19')](_0xbe86f8);return _0x2f1460[_0xac12('0x1f')](_0xac12('0x20'),_0x3d5a7e+'-'+_0x35e8cc+'/'+_0x2bb304)[_0xac12('0x1a')](_0x2909fd);}return null;};}function patchUpdates(_0x126631){return function(_0x2f9060){try{jsonpatch['apply'](_0x2f9060,_0x126631,!![]);}catch(_0x2178cb){return BPromise[_0xac12('0x21')](_0x2178cb);}return _0x2f9060[_0xac12('0x22')]();};}function saveUpdates(_0x3bbc4c,_0x3e0bba){return function(_0x24edde){if(_0x24edde){return _0x24edde[_0xac12('0x23')](_0x3bbc4c)[_0xac12('0x24')](function(_0x4f555f){return _0x4f555f;});}return null;};}function removeEntity(_0xa1a5f6,_0x16c38a){return function(_0xcb3ea6){if(_0xcb3ea6){return _0xcb3ea6[_0xac12('0x25')]()[_0xac12('0x24')](function(){_0xa1a5f6[_0xac12('0x19')](0xcc)[_0xac12('0x18')]();});}};}function handleEntityNotFound(_0x109dbc,_0x12709f){return function(_0x1db1c6){if(!_0x1db1c6){_0x109dbc[_0xac12('0x17')](0x194);}return _0x1db1c6;};}function handleError(_0x5a8a9f,_0x49e3ac){_0x49e3ac=_0x49e3ac||0x1f4;return function(_0x116fa5){logger[_0xac12('0x26')](_0x116fa5[_0xac12('0x27')]);if(_0x116fa5['name']){delete _0x116fa5[_0xac12('0x28')];}_0x5a8a9f[_0xac12('0x19')](_0x49e3ac)['send'](_0x116fa5);};}exports[_0xac12('0x29')]=function(_0x13b460,_0x201122){var _0x3056ad={},_0x5374f6={},_0x53fa4a={'count':0x0,'rows':[]};var _0x260f94=_[_0xac12('0x2a')](db[_0xac12('0x2b')]['rawAttributes'],function(_0x25fe1f){return{'name':_0x25fe1f[_0xac12('0x2c')],'type':_0x25fe1f[_0xac12('0x2d')][_0xac12('0x2e')]};});_0x5374f6['model']=_['map'](_0x260f94,_0xac12('0x28'));_0x5374f6['query']=_[_0xac12('0x2f')](_0x13b460['query']);_0x5374f6[_0xac12('0x30')]=_['intersection'](_0x5374f6[_0xac12('0x31')],_0x5374f6['query']);_0x3056ad[_0xac12('0x32')]=_['intersection'](_0x5374f6[_0xac12('0x31')],qs['fields'](_0x13b460[_0xac12('0x33')][_0xac12('0x34')]));_0x3056ad[_0xac12('0x32')]=_0x3056ad[_0xac12('0x32')]['length']?_0x3056ad[_0xac12('0x32')]:_0x5374f6['model'];if(!_0x13b460['query'][_0xac12('0x35')](_0xac12('0x36'))){_0x3056ad[_0xac12('0x1e')]=qs['limit'](_0x13b460[_0xac12('0x33')][_0xac12('0x1e')]);_0x3056ad[_0xac12('0x1b')]=qs['offset'](_0x13b460[_0xac12('0x33')]['offset']);}_0x3056ad[_0xac12('0x37')]=qs[_0xac12('0x38')](_0x13b460['query']['sort']);_0x3056ad[_0xac12('0x39')]=qs['filters'](_[_0xac12('0x3a')](_0x13b460[_0xac12('0x33')],_0x5374f6[_0xac12('0x30')]),_0x260f94);if(_0x13b460[_0xac12('0x33')]['filter']){_0x3056ad[_0xac12('0x39')]=_[_0xac12('0x3b')](_0x3056ad['where'],{'$or':_[_0xac12('0x2a')](_0x260f94,function(_0x50a998){if(_0x50a998[_0xac12('0x2d')]!=='VIRTUAL'){var _0x298b82={};_0x298b82[_0x50a998['name']]={'$like':'%'+_0x13b460[_0xac12('0x33')][_0xac12('0x3c')]+'%'};return _0x298b82;}})});}_0x3056ad=_[_0xac12('0x3b')]({},_0x3056ad,_0x13b460[_0xac12('0x3d')]);var _0x382bdb={'where':_0x3056ad['where']};return db[_0xac12('0x2b')][_0xac12('0x1d')](_0x382bdb)['then'](function(_0x349c5e){_0x53fa4a[_0xac12('0x1d')]=_0x349c5e;if(_0x13b460[_0xac12('0x33')][_0xac12('0x3e')]){_0x3056ad[_0xac12('0x3f')]=[{'all':!![]}];}return db[_0xac12('0x2b')][_0xac12('0x40')](_0x3056ad);})[_0xac12('0x24')](function(_0x22fa43){_0x53fa4a['rows']=_0x22fa43;return _0x53fa4a;})[_0xac12('0x24')](respondWithFilteredResult(_0x201122,_0x3056ad))['catch'](handleError(_0x201122,null));};exports[_0xac12('0x41')]=function(_0x11ff14,_0x16fa1c){var _0x461878={'raw':![],'where':{'id':_0x11ff14[_0xac12('0x42')]['id']}},_0x175f98={};_0x175f98[_0xac12('0x31')]=_[_0xac12('0x2f')](db[_0xac12('0x2b')][_0xac12('0x43')]);_0x175f98[_0xac12('0x33')]=_[_0xac12('0x2f')](_0x11ff14[_0xac12('0x33')]);_0x175f98[_0xac12('0x30')]=_[_0xac12('0x44')](_0x175f98[_0xac12('0x31')],_0x175f98[_0xac12('0x33')]);_0x461878['attributes']=_[_0xac12('0x44')](_0x175f98[_0xac12('0x31')],qs['fields'](_0x11ff14[_0xac12('0x33')][_0xac12('0x34')]));_0x461878[_0xac12('0x32')]=_0x461878[_0xac12('0x32')][_0xac12('0x45')]?_0x461878[_0xac12('0x32')]:_0x175f98[_0xac12('0x31')];if(_0x11ff14[_0xac12('0x33')]['includeAll']){_0x461878[_0xac12('0x3f')]=[{'all':!![]}];}_0x461878=_['merge']({},_0x461878,_0x11ff14['options']);return db[_0xac12('0x2b')][_0xac12('0x46')](_0x461878)['then'](handleEntityNotFound(_0x16fa1c,null))[_0xac12('0x24')](respondWithResult(_0x16fa1c,null))['catch'](handleError(_0x16fa1c,null));};exports[_0xac12('0x47')]=function(_0x1dc50d,_0x1ba08d){return db[_0xac12('0x2b')]['create'](_0x1dc50d[_0xac12('0x48')],{})[_0xac12('0x24')](respondWithResult(_0x1ba08d,0xc9))[_0xac12('0x49')](handleError(_0x1ba08d,null));};exports[_0xac12('0x23')]=function(_0x2a3f7e,_0x3ad3c9){if(_0x2a3f7e['body']['id']){delete _0x2a3f7e['body']['id'];}return db[_0xac12('0x2b')]['find']({'where':{'id':_0x2a3f7e['params']['id']}})[_0xac12('0x24')](handleEntityNotFound(_0x3ad3c9,null))[_0xac12('0x24')](saveUpdates(_0x2a3f7e[_0xac12('0x48')],null))['then'](respondWithResult(_0x3ad3c9,null))[_0xac12('0x49')](handleError(_0x3ad3c9,null));};exports[_0xac12('0x25')]=function(_0x5bfaf2,_0x14d14e){return db[_0xac12('0x2b')]['find']({'where':{'id':_0x5bfaf2['params']['id']}})['then'](handleEntityNotFound(_0x14d14e,null))[_0xac12('0x24')](removeEntity(_0x14d14e,null))['catch'](handleError(_0x14d14e,null));};exports[_0xac12('0x4a')]=function(_0x1119ad,_0x4eeb50,_0x4754e3){var _0x7b1df3={};var _0x185145={};var _0x442da5;var _0x210f01;return db[_0xac12('0x2b')][_0xac12('0x4b')]({'where':{'id':_0x1119ad[_0xac12('0x42')]['id']}})[_0xac12('0x24')](handleEntityNotFound(_0x4eeb50,null))['then'](function(_0x27c693){if(_0x27c693){_0x442da5=_0x27c693;_0x185145[_0xac12('0x31')]=_['keys'](db[_0xac12('0x4c')][_0xac12('0x43')]);_0x185145['query']=_[_0xac12('0x2f')](_0x1119ad[_0xac12('0x33')]);_0x185145[_0xac12('0x30')]=_['intersection'](_0x185145[_0xac12('0x31')],_0x185145[_0xac12('0x33')]);_0x7b1df3['attributes']=_[_0xac12('0x44')](_0x185145['model'],qs[_0xac12('0x34')](_0x1119ad[_0xac12('0x33')][_0xac12('0x34')]));_0x7b1df3['attributes']=_0x7b1df3[_0xac12('0x32')][_0xac12('0x45')]?_0x7b1df3['attributes']:_0x185145[_0xac12('0x31')];_0x7b1df3[_0xac12('0x37')]=qs[_0xac12('0x38')](_0x1119ad[_0xac12('0x33')]['sort']);_0x7b1df3[_0xac12('0x39')]=qs[_0xac12('0x30')](_[_0xac12('0x3a')](_0x1119ad[_0xac12('0x33')],_0x185145[_0xac12('0x30')]));if(_0x1119ad[_0xac12('0x33')][_0xac12('0x3c')]){_0x7b1df3[_0xac12('0x39')]=_[_0xac12('0x3b')](_0x7b1df3[_0xac12('0x39')],{'$or':_[_0xac12('0x2a')](_0x7b1df3[_0xac12('0x32')],function(_0x5eb157){var _0x53e84b={};_0x53e84b[_0x5eb157]={'$like':'%'+_0x1119ad['query'][_0xac12('0x3c')]+'%'};return _0x53e84b;})});}_0x7b1df3=_[_0xac12('0x3b')]({},_0x7b1df3,_0x1119ad['options']);return _0x442da5['getConfigurations'](_0x7b1df3);}})[_0xac12('0x24')](function(_0x301187){if(_0x301187){_0x210f01=_0x301187[_0xac12('0x45')];if(!_0x1119ad[_0xac12('0x33')][_0xac12('0x35')](_0xac12('0x36'))){_0x7b1df3[_0xac12('0x1e')]=qs[_0xac12('0x1e')](_0x1119ad[_0xac12('0x33')][_0xac12('0x1e')]);_0x7b1df3[_0xac12('0x1b')]=qs[_0xac12('0x1b')](_0x1119ad[_0xac12('0x33')]['offset']);}return _0x442da5[_0xac12('0x4a')](_0x7b1df3);}})['then'](function(_0x1c9e00){if(_0x1c9e00){return _0x1c9e00?{'count':_0x210f01,'rows':_0x1c9e00}:null;}})[_0xac12('0x24')](respondWithResult(_0x4eeb50,null))[_0xac12('0x49')](handleError(_0x4eeb50,null));};exports[_0xac12('0x4d')]=function(_0x4b6f04,_0x172510,_0x3409f3){if(_0x4b6f04[_0xac12('0x48')]['id']){delete _0x4b6f04['body']['id'];}return db[_0xac12('0x2b')][_0xac12('0x4b')]({'where':{'id':_0x4b6f04['params']['id']}})[_0xac12('0x24')](handleEntityNotFound(_0x172510,null))[_0xac12('0x24')](function(_0x49c68d){if(_0x49c68d){_0x4b6f04[_0xac12('0x48')][_0xac12('0x4e')]=_0x49c68d['id'];_0x4b6f04[_0xac12('0x48')][_0xac12('0x4f')]=integrations[_0xac12('0x50')](_0x4b6f04[_0xac12('0x48')][_0xac12('0x51')],_0x4b6f04[_0xac12('0x48')][_0xac12('0x2d')]);_0x4b6f04['body'][_0xac12('0x52')]=integrations[_0xac12('0x53')](_0x4b6f04[_0xac12('0x48')]['channel'],_0x4b6f04['body'][_0xac12('0x2d')]);return db[_0xac12('0x4c')][_0xac12('0x47')](_0x4b6f04[_0xac12('0x48')],{'include':[{'model':db['VtigerField'],'as':_0xac12('0x4f')},{'model':db[_0xac12('0x54')],'as':_0xac12('0x52')}]});}return null;})[_0xac12('0x24')](respondWithResult(_0x172510,null))['catch'](handleError(_0x172510,null));};var md5=require('md5');exports['getFields']=function(_0x5c12e4,_0x1c5d9b,_0xdcf81){var _0x3d2069=null;var _0x53c214=null;var _0x192edd=null;var _0x2fd629=null;var _0x25fe93='';return db['VtigerAccount'][_0xac12('0x4b')]({'where':{'id':_0x5c12e4[_0xac12('0x42')]['id']},'attributes':['id',_0xac12('0x28'),_0xac12('0x55'),'description',_0xac12('0x56'),_0xac12('0x57'),'serverUrl',_0xac12('0x58')]})[_0xac12('0x24')](handleEntityNotFound(_0x1c5d9b,null))[_0xac12('0x24')](function(_0x52f300){if(_0x52f300){_0x3d2069=_0x52f300['username'];_0x53c214=_0x52f300[_0xac12('0x58')];_0x192edd=_0x52f300[_0xac12('0x56')];_0x25fe93=_0x52f300[_0xac12('0x57')];var _0x1b324a=_0x25fe93[_0xac12('0x59')](-0x1);if(_0x1b324a==='/'){_0x25fe93=_0x25fe93[_0xac12('0x5a')](0x0,_0x25fe93[_0xac12('0x5b')](_0x1b324a));}_0x2fd629=util['format'](_0xac12('0x5c'),_0x25fe93);var _0x22936c={'method':_0xac12('0x5d'),'uri':_0x2fd629,'qs':{'operation':_0xac12('0x5e'),'username':_0x52f300[_0xac12('0x55')]},'json':!![]};return rp(_0x22936c);}})[_0xac12('0x24')](function(_0x32860e){if(_0x32860e['success']){var _0x3bce56={'method':'POST','uri':_0x2fd629,'form':{'operation':'login','username':_0x3d2069,'accessKey':md5(_0x32860e[_0xac12('0x5f')]['token']+_0x53c214)},'json':!![]};return rp(_0x3bce56);}})['then'](function(_0x424eda){if(_0x424eda[_0xac12('0x60')]){var _0x35839f={'method':_0xac12('0x5d'),'uri':_0x2fd629,'qs':{'operation':_0xac12('0x61'),'username':_0x3d2069,'sessionName':_0x424eda[_0xac12('0x5f')][_0xac12('0x62')],'elementType':_0x192edd},'json':!![]};return rp(_0x35839f);}})[_0xac12('0x24')](function(_0x178da1){if(_0x178da1['success']){var _0x4b82a4=[_0xac12('0x63'),_0xac12('0x64'),_0xac12('0x65')];_[_0xac12('0x66')](_0x178da1[_0xac12('0x5f')]['fields'],function(_0x40f72f){return _0x4b82a4[_0xac12('0x67')](_0x40f72f[_0xac12('0x2d')][_0xac12('0x28')]);});_[_0xac12('0x66')](_0x178da1[_0xac12('0x5f')][_0xac12('0x34')],function(_0x4ba8aa){return _0x4ba8aa['editable']==='false';});return{'count':_0x178da1[_0xac12('0x5f')][_0xac12('0x34')][_0xac12('0x45')],'rows':_[_0xac12('0x2a')](_0x178da1['result'][_0xac12('0x34')],function(_0x15bcc4){return{'id':_0x15bcc4[_0xac12('0x28')],'name':_0x15bcc4[_0xac12('0x68')],'custom':_[_0xac12('0x69')](_0x15bcc4['name'],'cf_')?!![]:![],'options':_0x15bcc4[_0xac12('0x2d')][_0xac12('0x28')]===_0xac12('0x6a')&&_0x15bcc4[_0xac12('0x2d')][_0xac12('0x6b')][_0xac12('0x45')]>0x0?_[_0xac12('0x2a')](_0x15bcc4[_0xac12('0x2d')]['picklistValues'],function(_0xcebdd7){return{'name':_0xcebdd7['label'],'value':_0xcebdd7['value']};}):[]};})};}})[_0xac12('0x24')](respondWithResult(_0x1c5d9b,null))[_0xac12('0x49')](function(_0x469ffa){console[_0xac12('0x6c')](_0xac12('0x6d')+_0x469ffa);var _0x16670e=_0x5c12e4[_0xac12('0x33')][_0xac12('0x6e')]?0x1f4:_0x469ffa[_0xac12('0x6f')]||0x1f4;logger[_0xac12('0x26')](_0xac12('0x70'),_0xac12('0x71'),_0x16670e,JSON[_0xac12('0x72')](_0x469ffa));delete _0x469ffa['name'];if(_0x16670e===0x191){_0x16670e=0x190;}_0x1c5d9b[_0xac12('0x19')](_0x16670e)['send'](_0x5c12e4[_0xac12('0x33')][_0xac12('0x6e')]?{'message':'Wrong\x20credentials','statusCode':_0x469ffa[_0xac12('0x6f')]}:_0x469ffa);});};
\ No newline at end of file
+var _0x2ea4=['hasOwnProperty','order','sort','where','filter','merge','options','includeAll','findAll','rows','params','rawAttributes','include','catch','create','body','find','getConfigurations','findOne','VtigerConfiguration','AccountId','Subjects','getSubjects','Descriptions','getDescriptions','channel','VtigerField','md5','username','description','moduleName','serverUrl','accessKey','slice','lastIndexOf','format','%s/webservice.php','GET','getchallenge','success','POST','login','result','describe','sessionName','autogenerated','reference','owner','remove','startsWith','picklist','label','value','vTiger\x20error:\x20','getFields,\x20%s,\x20%s,\x20%s','getFields','stringify','Wrong\x20credentials','statusCode','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','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/environment','../../mysqldb','sendStatus','end','status','json','offset','undefined','count','limit','Content-Range','reject','save','update','then','destroy','error','name','send','index','map','VtigerAccount','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length'];(function(_0x5505d5,_0x2f5945){var _0x155814=function(_0x3262e3){while(--_0x3262e3){_0x5505d5['push'](_0x5505d5['shift']());}};_0x155814(++_0x2f5945);}(_0x2ea4,0xad));var _0x42ea=function(_0x34052f,_0xa3ed34){_0x34052f=_0x34052f-0x0;var _0xf40062=_0x2ea4[_0x34052f];return _0xf40062;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x42ea('0x0'));var zipdir=require(_0x42ea('0x1'));var jsonpatch=require(_0x42ea('0x2'));var rp=require(_0x42ea('0x3'));var moment=require(_0x42ea('0x4'));var BPromise=require(_0x42ea('0x5'));var Mustache=require(_0x42ea('0x6'));var util=require(_0x42ea('0x7'));var path=require(_0x42ea('0x8'));var sox=require(_0x42ea('0x9'));var csv=require(_0x42ea('0xa'));var ejs=require(_0x42ea('0xb'));var fs=require('fs');var fs_extra=require(_0x42ea('0xc'));var _=require(_0x42ea('0xd'));var squel=require(_0x42ea('0xe'));var crypto=require(_0x42ea('0xf'));var jsforce=require('jsforce');var deskjs=require(_0x42ea('0x10'));var toCsv=require('to-csv');var querystring=require(_0x42ea('0x11'));var Papa=require('papaparse');var Redis=require(_0x42ea('0x12'));var authService=require('../../components/auth/service');var qs=require(_0x42ea('0x13'));var as=require(_0x42ea('0x14'));var hardwareService=require(_0x42ea('0x15'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0x42ea('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0x42ea('0x17'))['db'];var integrations=require('../../components/integrations/configuration');function respondWithStatusCode(_0x7185df,_0x1e0edc){_0x1e0edc=_0x1e0edc||0xcc;return function(_0x1a63b5){if(_0x1a63b5){return _0x7185df[_0x42ea('0x18')](_0x1e0edc);}return _0x7185df['status'](_0x1e0edc)[_0x42ea('0x19')]();};}function respondWithResult(_0x3c398d,_0x2ef78e){_0x2ef78e=_0x2ef78e||0xc8;return function(_0x43acc1){if(_0x43acc1){return _0x3c398d[_0x42ea('0x1a')](_0x2ef78e)[_0x42ea('0x1b')](_0x43acc1);}};}function respondWithFilteredResult(_0x21e596,_0x2e5344){return function(_0x192a0d){if(_0x192a0d){var _0x43dc24=typeof _0x2e5344[_0x42ea('0x1c')]===_0x42ea('0x1d')&&typeof _0x2e5344['limit']===_0x42ea('0x1d');var _0x3b8a85=_0x192a0d['count'];var _0x2dfc8e=_0x43dc24?0x0:_0x2e5344['offset'];var _0x1e5d9d=_0x43dc24?_0x192a0d[_0x42ea('0x1e')]:_0x2e5344[_0x42ea('0x1c')]+_0x2e5344[_0x42ea('0x1f')];var _0xd423ae;if(_0x1e5d9d>=_0x3b8a85){_0x1e5d9d=_0x3b8a85;_0xd423ae=0xc8;}else{_0xd423ae=0xce;}_0x21e596[_0x42ea('0x1a')](_0xd423ae);return _0x21e596['set'](_0x42ea('0x20'),_0x2dfc8e+'-'+_0x1e5d9d+'/'+_0x3b8a85)[_0x42ea('0x1b')](_0x192a0d);}return null;};}function patchUpdates(_0x2445c3){return function(_0x21ee8e){try{jsonpatch['apply'](_0x21ee8e,_0x2445c3,!![]);}catch(_0x145484){return BPromise[_0x42ea('0x21')](_0x145484);}return _0x21ee8e[_0x42ea('0x22')]();};}function saveUpdates(_0x17b74e,_0x44496e){return function(_0x2c7376){if(_0x2c7376){return _0x2c7376[_0x42ea('0x23')](_0x17b74e)[_0x42ea('0x24')](function(_0x10e0e5){return _0x10e0e5;});}return null;};}function removeEntity(_0x2da5a1,_0x3eeea3){return function(_0x57e230){if(_0x57e230){return _0x57e230[_0x42ea('0x25')]()[_0x42ea('0x24')](function(){_0x2da5a1[_0x42ea('0x1a')](0xcc)[_0x42ea('0x19')]();});}};}function handleEntityNotFound(_0x133455,_0x564f8b){return function(_0xa437c8){if(!_0xa437c8){_0x133455[_0x42ea('0x18')](0x194);}return _0xa437c8;};}function handleError(_0x3997ca,_0x4ec4ec){_0x4ec4ec=_0x4ec4ec||0x1f4;return function(_0xb75c2c){logger[_0x42ea('0x26')](_0xb75c2c['stack']);if(_0xb75c2c[_0x42ea('0x27')]){delete _0xb75c2c[_0x42ea('0x27')];}_0x3997ca[_0x42ea('0x1a')](_0x4ec4ec)[_0x42ea('0x28')](_0xb75c2c);};}exports[_0x42ea('0x29')]=function(_0x2cf0b0,_0x26de63){var _0x5aad0b={},_0x34a239={},_0x37f898={'count':0x0,'rows':[]};var _0x750f8e=_[_0x42ea('0x2a')](db[_0x42ea('0x2b')]['rawAttributes'],function(_0x497961){return{'name':_0x497961[_0x42ea('0x2c')],'type':_0x497961[_0x42ea('0x2d')][_0x42ea('0x2e')]};});_0x34a239[_0x42ea('0x2f')]=_[_0x42ea('0x2a')](_0x750f8e,'name');_0x34a239[_0x42ea('0x30')]=_[_0x42ea('0x31')](_0x2cf0b0[_0x42ea('0x30')]);_0x34a239[_0x42ea('0x32')]=_[_0x42ea('0x33')](_0x34a239[_0x42ea('0x2f')],_0x34a239[_0x42ea('0x30')]);_0x5aad0b[_0x42ea('0x34')]=_[_0x42ea('0x33')](_0x34a239['model'],qs[_0x42ea('0x35')](_0x2cf0b0['query']['fields']));_0x5aad0b[_0x42ea('0x34')]=_0x5aad0b[_0x42ea('0x34')][_0x42ea('0x36')]?_0x5aad0b['attributes']:_0x34a239[_0x42ea('0x2f')];if(!_0x2cf0b0[_0x42ea('0x30')][_0x42ea('0x37')]('nolimit')){_0x5aad0b[_0x42ea('0x1f')]=qs['limit'](_0x2cf0b0[_0x42ea('0x30')]['limit']);_0x5aad0b[_0x42ea('0x1c')]=qs[_0x42ea('0x1c')](_0x2cf0b0['query']['offset']);}_0x5aad0b[_0x42ea('0x38')]=qs[_0x42ea('0x39')](_0x2cf0b0['query'][_0x42ea('0x39')]);_0x5aad0b[_0x42ea('0x3a')]=qs[_0x42ea('0x32')](_['pick'](_0x2cf0b0['query'],_0x34a239['filters']),_0x750f8e);if(_0x2cf0b0[_0x42ea('0x30')][_0x42ea('0x3b')]){_0x5aad0b[_0x42ea('0x3a')]=_[_0x42ea('0x3c')](_0x5aad0b[_0x42ea('0x3a')],{'$or':_[_0x42ea('0x2a')](_0x750f8e,function(_0x5a9bbf){if(_0x5a9bbf[_0x42ea('0x2d')]!=='VIRTUAL'){var _0x3f3de4={};_0x3f3de4[_0x5a9bbf[_0x42ea('0x27')]]={'$like':'%'+_0x2cf0b0[_0x42ea('0x30')][_0x42ea('0x3b')]+'%'};return _0x3f3de4;}})});}_0x5aad0b=_[_0x42ea('0x3c')]({},_0x5aad0b,_0x2cf0b0[_0x42ea('0x3d')]);var _0x161287={'where':_0x5aad0b[_0x42ea('0x3a')]};return db[_0x42ea('0x2b')][_0x42ea('0x1e')](_0x161287)[_0x42ea('0x24')](function(_0x4c419a){_0x37f898[_0x42ea('0x1e')]=_0x4c419a;if(_0x2cf0b0[_0x42ea('0x30')][_0x42ea('0x3e')]){_0x5aad0b['include']=[{'all':!![]}];}return db[_0x42ea('0x2b')][_0x42ea('0x3f')](_0x5aad0b);})['then'](function(_0x2c0980){_0x37f898[_0x42ea('0x40')]=_0x2c0980;return _0x37f898;})[_0x42ea('0x24')](respondWithFilteredResult(_0x26de63,_0x5aad0b))['catch'](handleError(_0x26de63,null));};exports['show']=function(_0x456516,_0x2b8eef){var _0x4df249={'raw':![],'where':{'id':_0x456516[_0x42ea('0x41')]['id']}},_0x1004df={};_0x1004df[_0x42ea('0x2f')]=_[_0x42ea('0x31')](db[_0x42ea('0x2b')][_0x42ea('0x42')]);_0x1004df[_0x42ea('0x30')]=_[_0x42ea('0x31')](_0x456516[_0x42ea('0x30')]);_0x1004df[_0x42ea('0x32')]=_[_0x42ea('0x33')](_0x1004df[_0x42ea('0x2f')],_0x1004df[_0x42ea('0x30')]);_0x4df249['attributes']=_[_0x42ea('0x33')](_0x1004df[_0x42ea('0x2f')],qs[_0x42ea('0x35')](_0x456516['query'][_0x42ea('0x35')]));_0x4df249['attributes']=_0x4df249[_0x42ea('0x34')][_0x42ea('0x36')]?_0x4df249[_0x42ea('0x34')]:_0x1004df['model'];if(_0x456516[_0x42ea('0x30')][_0x42ea('0x3e')]){_0x4df249[_0x42ea('0x43')]=[{'all':!![]}];}_0x4df249=_['merge']({},_0x4df249,_0x456516[_0x42ea('0x3d')]);return db[_0x42ea('0x2b')]['find'](_0x4df249)[_0x42ea('0x24')](handleEntityNotFound(_0x2b8eef,null))[_0x42ea('0x24')](respondWithResult(_0x2b8eef,null))[_0x42ea('0x44')](handleError(_0x2b8eef,null));};exports[_0x42ea('0x45')]=function(_0x20942d,_0x36302d){return db[_0x42ea('0x2b')][_0x42ea('0x45')](_0x20942d['body'],{})[_0x42ea('0x24')](respondWithResult(_0x36302d,0xc9))[_0x42ea('0x44')](handleError(_0x36302d,null));};exports[_0x42ea('0x23')]=function(_0x59c6cb,_0x5923f5){if(_0x59c6cb[_0x42ea('0x46')]['id']){delete _0x59c6cb[_0x42ea('0x46')]['id'];}return db[_0x42ea('0x2b')][_0x42ea('0x47')]({'where':{'id':_0x59c6cb[_0x42ea('0x41')]['id']}})[_0x42ea('0x24')](handleEntityNotFound(_0x5923f5,null))[_0x42ea('0x24')](saveUpdates(_0x59c6cb[_0x42ea('0x46')],null))[_0x42ea('0x24')](respondWithResult(_0x5923f5,null))[_0x42ea('0x44')](handleError(_0x5923f5,null));};exports[_0x42ea('0x25')]=function(_0x94e94e,_0x58a048){return db[_0x42ea('0x2b')][_0x42ea('0x47')]({'where':{'id':_0x94e94e['params']['id']}})['then'](handleEntityNotFound(_0x58a048,null))[_0x42ea('0x24')](removeEntity(_0x58a048,null))['catch'](handleError(_0x58a048,null));};exports[_0x42ea('0x48')]=function(_0x95883f,_0x260e06,_0x3f7418){var _0x539a84={};var _0x4ba39f={};var _0xf88032;var _0x4a86d2;return db[_0x42ea('0x2b')][_0x42ea('0x49')]({'where':{'id':_0x95883f[_0x42ea('0x41')]['id']}})[_0x42ea('0x24')](handleEntityNotFound(_0x260e06,null))['then'](function(_0x50f88b){if(_0x50f88b){_0xf88032=_0x50f88b;_0x4ba39f['model']=_['keys'](db[_0x42ea('0x4a')][_0x42ea('0x42')]);_0x4ba39f[_0x42ea('0x30')]=_[_0x42ea('0x31')](_0x95883f['query']);_0x4ba39f[_0x42ea('0x32')]=_[_0x42ea('0x33')](_0x4ba39f[_0x42ea('0x2f')],_0x4ba39f[_0x42ea('0x30')]);_0x539a84[_0x42ea('0x34')]=_[_0x42ea('0x33')](_0x4ba39f['model'],qs['fields'](_0x95883f[_0x42ea('0x30')]['fields']));_0x539a84[_0x42ea('0x34')]=_0x539a84[_0x42ea('0x34')][_0x42ea('0x36')]?_0x539a84['attributes']:_0x4ba39f[_0x42ea('0x2f')];_0x539a84[_0x42ea('0x38')]=qs[_0x42ea('0x39')](_0x95883f[_0x42ea('0x30')][_0x42ea('0x39')]);_0x539a84[_0x42ea('0x3a')]=qs[_0x42ea('0x32')](_['pick'](_0x95883f[_0x42ea('0x30')],_0x4ba39f[_0x42ea('0x32')]));if(_0x95883f[_0x42ea('0x30')]['filter']){_0x539a84[_0x42ea('0x3a')]=_[_0x42ea('0x3c')](_0x539a84[_0x42ea('0x3a')],{'$or':_[_0x42ea('0x2a')](_0x539a84['attributes'],function(_0x1a3eed){var _0x5c03b7={};_0x5c03b7[_0x1a3eed]={'$like':'%'+_0x95883f[_0x42ea('0x30')]['filter']+'%'};return _0x5c03b7;})});}_0x539a84=_[_0x42ea('0x3c')]({},_0x539a84,_0x95883f[_0x42ea('0x3d')]);return _0xf88032[_0x42ea('0x48')](_0x539a84);}})['then'](function(_0x339e65){if(_0x339e65){_0x4a86d2=_0x339e65[_0x42ea('0x36')];if(!_0x95883f[_0x42ea('0x30')][_0x42ea('0x37')]('nolimit')){_0x539a84[_0x42ea('0x1f')]=qs[_0x42ea('0x1f')](_0x95883f[_0x42ea('0x30')][_0x42ea('0x1f')]);_0x539a84[_0x42ea('0x1c')]=qs['offset'](_0x95883f[_0x42ea('0x30')][_0x42ea('0x1c')]);}return _0xf88032[_0x42ea('0x48')](_0x539a84);}})[_0x42ea('0x24')](function(_0x4ff83e){if(_0x4ff83e){return _0x4ff83e?{'count':_0x4a86d2,'rows':_0x4ff83e}:null;}})[_0x42ea('0x24')](respondWithResult(_0x260e06,null))[_0x42ea('0x44')](handleError(_0x260e06,null));};exports['addConfiguration']=function(_0x202020,_0x45610c,_0x52df2d){if(_0x202020[_0x42ea('0x46')]['id']){delete _0x202020[_0x42ea('0x46')]['id'];}return db['VtigerAccount']['findOne']({'where':{'id':_0x202020['params']['id']}})[_0x42ea('0x24')](handleEntityNotFound(_0x45610c,null))[_0x42ea('0x24')](function(_0x5c07b5){if(_0x5c07b5){_0x202020[_0x42ea('0x46')][_0x42ea('0x4b')]=_0x5c07b5['id'];_0x202020[_0x42ea('0x46')][_0x42ea('0x4c')]=integrations[_0x42ea('0x4d')](_0x202020['body']['channel'],_0x202020[_0x42ea('0x46')][_0x42ea('0x2d')]);_0x202020[_0x42ea('0x46')][_0x42ea('0x4e')]=integrations[_0x42ea('0x4f')](_0x202020[_0x42ea('0x46')][_0x42ea('0x50')],_0x202020[_0x42ea('0x46')][_0x42ea('0x2d')]);return db['VtigerConfiguration'][_0x42ea('0x45')](_0x202020[_0x42ea('0x46')],{'include':[{'model':db[_0x42ea('0x51')],'as':'Subjects'},{'model':db[_0x42ea('0x51')],'as':_0x42ea('0x4e')}]});}return null;})['then'](respondWithResult(_0x45610c,null))[_0x42ea('0x44')](handleError(_0x45610c,null));};var md5=require(_0x42ea('0x52'));exports['getFields']=function(_0x5debe5,_0x4eb113,_0x21e4ff){var _0x489de4=null;var _0x339fe5=null;var _0x26acbc=null;var _0x491251=null;var _0x58086d='';return db[_0x42ea('0x2b')][_0x42ea('0x49')]({'where':{'id':_0x5debe5['params']['id']},'attributes':['id','name',_0x42ea('0x53'),_0x42ea('0x54'),_0x42ea('0x55'),'remoteUri',_0x42ea('0x56'),_0x42ea('0x57')]})[_0x42ea('0x24')](handleEntityNotFound(_0x4eb113,null))[_0x42ea('0x24')](function(_0x55abcd){if(_0x55abcd){_0x489de4=_0x55abcd[_0x42ea('0x53')];_0x339fe5=_0x55abcd[_0x42ea('0x57')];_0x26acbc=_0x55abcd[_0x42ea('0x55')];_0x58086d=_0x55abcd['remoteUri'];var _0x2c579a=_0x58086d[_0x42ea('0x58')](-0x1);if(_0x2c579a==='/'){_0x58086d=_0x58086d['substring'](0x0,_0x58086d[_0x42ea('0x59')](_0x2c579a));}_0x491251=util[_0x42ea('0x5a')](_0x42ea('0x5b'),_0x58086d);var _0x559512={'method':_0x42ea('0x5c'),'uri':_0x491251,'qs':{'operation':_0x42ea('0x5d'),'username':_0x55abcd[_0x42ea('0x53')]},'json':!![]};return rp(_0x559512);}})['then'](function(_0x216a8f){if(_0x216a8f[_0x42ea('0x5e')]){var _0x1255f2={'method':_0x42ea('0x5f'),'uri':_0x491251,'form':{'operation':_0x42ea('0x60'),'username':_0x489de4,'accessKey':md5(_0x216a8f[_0x42ea('0x61')]['token']+_0x339fe5)},'json':!![]};return rp(_0x1255f2);}})[_0x42ea('0x24')](function(_0x1c30af){if(_0x1c30af[_0x42ea('0x5e')]){var _0xb4d629={'method':_0x42ea('0x5c'),'uri':_0x491251,'qs':{'operation':_0x42ea('0x62'),'username':_0x489de4,'sessionName':_0x1c30af[_0x42ea('0x61')][_0x42ea('0x63')],'elementType':_0x26acbc},'json':!![]};return rp(_0xb4d629);}})[_0x42ea('0x24')](function(_0x42eb3d){if(_0x42eb3d['success']){var _0x168496=[_0x42ea('0x64'),_0x42ea('0x65'),_0x42ea('0x66')];_['remove'](_0x42eb3d[_0x42ea('0x61')][_0x42ea('0x35')],function(_0x43c9ac){return _0x168496['includes'](_0x43c9ac[_0x42ea('0x2d')][_0x42ea('0x27')]);});_[_0x42ea('0x67')](_0x42eb3d[_0x42ea('0x61')][_0x42ea('0x35')],function(_0x8711ac){return _0x8711ac['editable']==='false';});return{'count':_0x42eb3d[_0x42ea('0x61')][_0x42ea('0x35')][_0x42ea('0x36')],'rows':_[_0x42ea('0x2a')](_0x42eb3d['result']['fields'],function(_0x2e45c2){return{'id':_0x2e45c2[_0x42ea('0x27')],'name':_0x2e45c2['label'],'custom':_[_0x42ea('0x68')](_0x2e45c2['name'],'cf_')?!![]:![],'options':_0x2e45c2[_0x42ea('0x2d')][_0x42ea('0x27')]===_0x42ea('0x69')&&_0x2e45c2[_0x42ea('0x2d')]['picklistValues'][_0x42ea('0x36')]>0x0?_['map'](_0x2e45c2['type']['picklistValues'],function(_0x14843f){return{'name':_0x14843f[_0x42ea('0x6a')],'value':_0x14843f[_0x42ea('0x6b')]};}):[]};})};}})[_0x42ea('0x24')](respondWithResult(_0x4eb113,null))[_0x42ea('0x44')](function(_0x213878){console['log'](_0x42ea('0x6c')+_0x213878);var _0x31a206=_0x5debe5['query']['test']?0x1f4:_0x213878['statusCode']||0x1f4;logger[_0x42ea('0x26')](_0x42ea('0x6d'),_0x42ea('0x6e'),_0x31a206,JSON[_0x42ea('0x6f')](_0x213878));delete _0x213878['name'];if(_0x31a206===0x191){_0x31a206=0x190;}_0x4eb113[_0x42ea('0x1a')](_0x31a206)[_0x42ea('0x28')](_0x5debe5['query']['test']?{'message':_0x42ea('0x70'),'statusCode':_0x213878[_0x42ea('0x71')]}:_0x213878);});};
\ No newline at end of file
index e5b39b4..e51abd3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa6e6=['util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intVtigerAccount.attributes','../../components/integrations/configuration','exports','define','VtigerAccount','lodash'];(function(_0x1641b1,_0x198255){var _0x2b6b9c=function(_0x1cd5d4){while(--_0x1cd5d4){_0x1641b1['push'](_0x1641b1['shift']());}};_0x2b6b9c(++_0x198255);}(_0xa6e6,0xb5));var _0x6a6e=function(_0x5f0089,_0x227e2c){_0x5f0089=_0x5f0089-0x0;var _0x193892=_0xa6e6[_0x5f0089];return _0x193892;};'use strict';var _=require(_0x6a6e('0x0'));var util=require(_0x6a6e('0x1'));var logger=require('../../config/logger')(_0x6a6e('0x2'));var moment=require(_0x6a6e('0x3'));var BPromise=require(_0x6a6e('0x4'));var rp=require(_0x6a6e('0x5'));var fs=require('fs');var path=require(_0x6a6e('0x6'));var rimraf=require(_0x6a6e('0x7'));var config=require(_0x6a6e('0x8'));var attributes=require(_0x6a6e('0x9'));var integrations=require(_0x6a6e('0xa'));module[_0x6a6e('0xb')]=function(_0x48e12b,_0x30fe46){return _0x48e12b[_0x6a6e('0xc')](_0x6a6e('0xd'),attributes,{'tableName':'int_vtiger_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x8a3a=['api','bluebird','request-promise','rimraf','../../config/environment','./intVtigerAccount.attributes','../../components/integrations/configuration','define','lodash'];(function(_0x3a1337,_0x284388){var _0xd65bd4=function(_0x3de59e){while(--_0x3de59e){_0x3a1337['push'](_0x3a1337['shift']());}};_0xd65bd4(++_0x284388);}(_0x8a3a,0x18b));var _0xa8a3=function(_0x43b942,_0x4de494){_0x43b942=_0x43b942-0x0;var _0x214dd3=_0x8a3a[_0x43b942];return _0x214dd3;};'use strict';var _=require(_0xa8a3('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xa8a3('0x1'));var moment=require('moment');var BPromise=require(_0xa8a3('0x2'));var rp=require(_0xa8a3('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xa8a3('0x4'));var config=require(_0xa8a3('0x5'));var attributes=require(_0xa8a3('0x6'));var integrations=require(_0xa8a3('0x7'));module['exports']=function(_0x22e136,_0x1d5c34){return _0x22e136[_0xa8a3('0x8')]('VtigerAccount',attributes,{'tableName':'int_vtiger_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 3b7a86c..829c03d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x97c1=['error','message','result','catch','VtigerAccount','findAll','options','raw','attributes','limit','include','map','model','then','GetVtigerAccount','debug','find','where','ShowVtigerAccount','lodash','util','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','info','VtigerAccount,\x20%s,\x20%s','request\x20sent','VtigerAccount,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x47f839,_0x54ddca){var _0x2cd6ef=function(_0x49352e){while(--_0x49352e){_0x47f839['push'](_0x47f839['shift']());}};_0x2cd6ef(++_0x54ddca);}(_0x97c1,0xdf));var _0x197c=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0x97c1[_0x59ee6f];return _0x4c0979;};'use strict';var _=require(_0x197c('0x0'));var util=require(_0x197c('0x1'));var moment=require('moment');var BPromise=require(_0x197c('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x197c('0x3'))['db'];var utils=require(_0x197c('0x4'));var logger=require(_0x197c('0x5'))(_0x197c('0x6'));var config=require(_0x197c('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0x197c('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x437214,_0x60fab2,_0xfcee35){return new BPromise(function(_0x5cf5cb,_0x5d42c5){return client[_0x197c('0x9')](_0x437214,_0xfcee35)['then'](function(_0x339fab){logger[_0x197c('0xa')](_0x197c('0xb'),_0x60fab2,_0x197c('0xc'));logger['debug'](_0x197c('0xd'),_0x60fab2,_0x197c('0xc'),JSON[_0x197c('0xe')](_0x339fab));if(_0x339fab[_0x197c('0xf')]){if(_0x339fab[_0x197c('0xf')]['code']===0x1f4){logger[_0x197c('0xf')](_0x197c('0xb'),_0x60fab2,_0x339fab[_0x197c('0xf')][_0x197c('0x10')]);return _0x5d42c5(_0x339fab['error'][_0x197c('0x10')]);}logger[_0x197c('0xf')](_0x197c('0xb'),_0x60fab2,_0x339fab[_0x197c('0xf')][_0x197c('0x10')]);return _0x5cf5cb(_0x339fab[_0x197c('0xf')]['message']);}else{logger['info'](_0x197c('0xb'),_0x60fab2,_0x197c('0xc'));_0x5cf5cb(_0x339fab[_0x197c('0x11')][_0x197c('0x10')]);}})[_0x197c('0x12')](function(_0x7e302f){logger[_0x197c('0xf')](_0x197c('0xb'),_0x60fab2,_0x7e302f);_0x5d42c5(_0x7e302f);});});}exports['GetVtigerAccount']=function(_0x372311){var _0x47aaa9=this;return new Promise(function(_0x50ac52,_0x1725d9){return db[_0x197c('0x13')][_0x197c('0x14')]({'raw':_0x372311[_0x197c('0x15')]?_0x372311['options'][_0x197c('0x16')]===undefined?!![]:![]:!![],'where':_0x372311[_0x197c('0x15')]?_0x372311[_0x197c('0x15')]['where']||null:null,'attributes':_0x372311[_0x197c('0x15')]?_0x372311[_0x197c('0x15')][_0x197c('0x17')]||null:null,'limit':_0x372311[_0x197c('0x15')]?_0x372311[_0x197c('0x15')][_0x197c('0x18')]||null:null,'include':_0x372311[_0x197c('0x15')]?_0x372311[_0x197c('0x15')][_0x197c('0x19')]?_[_0x197c('0x1a')](_0x372311[_0x197c('0x15')][_0x197c('0x19')],function(_0x174942){return{'model':db[_0x174942[_0x197c('0x1b')]],'as':_0x174942['as'],'attributes':_0x174942[_0x197c('0x17')],'include':_0x174942[_0x197c('0x19')]?_['map'](_0x174942[_0x197c('0x19')],function(_0x2911dd){return{'model':db[_0x2911dd[_0x197c('0x1b')]],'as':_0x2911dd['as'],'attributes':_0x2911dd['attributes'],'include':_0x2911dd[_0x197c('0x19')]?_[_0x197c('0x1a')](_0x2911dd['include'],function(_0x5e7bc9){return{'model':db[_0x5e7bc9[_0x197c('0x1b')]],'as':_0x5e7bc9['as'],'attributes':_0x5e7bc9['attributes']};}):[]};}):[]};}):[]:[]})[_0x197c('0x1c')](function(_0x14b0aa){logger[_0x197c('0xa')](_0x197c('0x1d'),_0x372311);logger[_0x197c('0x1e')](_0x197c('0x1d'),_0x372311,JSON[_0x197c('0xe')](_0x14b0aa));_0x50ac52(_0x14b0aa);})[_0x197c('0x12')](function(_0x4422d1){logger['error']('GetVtigerAccount',_0x4422d1['message'],_0x372311);_0x1725d9(_0x47aaa9['error'](0x1f4,_0x4422d1[_0x197c('0x10')]));});});};exports['ShowVtigerAccount']=function(_0x252cde){var _0x35dbf3=this;return new Promise(function(_0x58bc60,_0x422ac6){return db['VtigerAccount'][_0x197c('0x1f')]({'raw':_0x252cde[_0x197c('0x15')]?_0x252cde[_0x197c('0x15')][_0x197c('0x16')]===undefined?!![]:![]:!![],'where':_0x252cde[_0x197c('0x15')]?_0x252cde[_0x197c('0x15')][_0x197c('0x20')]||null:null,'attributes':_0x252cde[_0x197c('0x15')]?_0x252cde[_0x197c('0x15')]['attributes']||null:null,'include':_0x252cde['options']?_0x252cde[_0x197c('0x15')][_0x197c('0x19')]?_[_0x197c('0x1a')](_0x252cde[_0x197c('0x15')][_0x197c('0x19')],function(_0x1cb7e8){return{'model':db[_0x1cb7e8[_0x197c('0x1b')]],'as':_0x1cb7e8['as'],'attributes':_0x1cb7e8['attributes'],'include':_0x1cb7e8['include']?_[_0x197c('0x1a')](_0x1cb7e8[_0x197c('0x19')],function(_0x4d085b){return{'model':db[_0x4d085b['model']],'as':_0x4d085b['as'],'attributes':_0x4d085b[_0x197c('0x17')],'include':_0x4d085b[_0x197c('0x19')]?_[_0x197c('0x1a')](_0x4d085b[_0x197c('0x19')],function(_0x45095c){return{'model':db[_0x45095c[_0x197c('0x1b')]],'as':_0x45095c['as'],'attributes':_0x45095c[_0x197c('0x17')]};}):[]};}):[]};}):[]:[]})[_0x197c('0x1c')](function(_0x44ce68){logger['info'](_0x197c('0x21'),_0x252cde);logger[_0x197c('0x1e')](_0x197c('0x21'),_0x252cde,JSON[_0x197c('0xe')](_0x44ce68));_0x58bc60(_0x44ce68);})[_0x197c('0x12')](function(_0x151e2f){logger['error'](_0x197c('0x21'),_0x151e2f[_0x197c('0x10')],_0x252cde);_0x422ac6(_0x35dbf3[_0x197c('0xf')](0x1f4,_0x151e2f['message']));});});};
\ No newline at end of file
+var _0x57f8=['request','then','info','VtigerAccount,\x20%s,\x20%s','request\x20sent','VtigerAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','GetVtigerAccount','VtigerAccount','options','where','attributes','include','model','map','debug','ShowVtigerAccount','find','raw','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x2fc684,_0x39d381){var _0x960409=function(_0x317657){while(--_0x317657){_0x2fc684['push'](_0x2fc684['shift']());}};_0x960409(++_0x39d381);}(_0x57f8,0x198));var _0x857f=function(_0x1ca890,_0x21d0d3){_0x1ca890=_0x1ca890-0x0;var _0x3f8e01=_0x57f8[_0x1ca890];return _0x3f8e01;};'use strict';var _=require('lodash');var util=require(_0x857f('0x0'));var moment=require(_0x857f('0x1'));var BPromise=require(_0x857f('0x2'));var rs=require(_0x857f('0x3'));var fs=require('fs');var Redis=require(_0x857f('0x4'));var db=require(_0x857f('0x5'))['db'];var utils=require(_0x857f('0x6'));var logger=require(_0x857f('0x7'))(_0x857f('0x8'));var config=require(_0x857f('0x9'));var jayson=require(_0x857f('0xa'));var client=jayson[_0x857f('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x8380e8,_0x197098,_0x1aaeea){return new BPromise(function(_0x577fc3,_0x5f6a66){return client[_0x857f('0xc')](_0x8380e8,_0x1aaeea)[_0x857f('0xd')](function(_0x4f2b09){logger[_0x857f('0xe')](_0x857f('0xf'),_0x197098,_0x857f('0x10'));logger['debug'](_0x857f('0x11'),_0x197098,_0x857f('0x10'),JSON[_0x857f('0x12')](_0x4f2b09));if(_0x4f2b09[_0x857f('0x13')]){if(_0x4f2b09[_0x857f('0x13')][_0x857f('0x14')]===0x1f4){logger[_0x857f('0x13')]('VtigerAccount,\x20%s,\x20%s',_0x197098,_0x4f2b09[_0x857f('0x13')][_0x857f('0x15')]);return _0x5f6a66(_0x4f2b09[_0x857f('0x13')][_0x857f('0x15')]);}logger[_0x857f('0x13')]('VtigerAccount,\x20%s,\x20%s',_0x197098,_0x4f2b09['error'][_0x857f('0x15')]);return _0x577fc3(_0x4f2b09['error'][_0x857f('0x15')]);}else{logger['info'](_0x857f('0xf'),_0x197098,_0x857f('0x10'));_0x577fc3(_0x4f2b09['result'][_0x857f('0x15')]);}})[_0x857f('0x16')](function(_0xdf14fe){logger[_0x857f('0x13')](_0x857f('0xf'),_0x197098,_0xdf14fe);_0x5f6a66(_0xdf14fe);});});}exports[_0x857f('0x17')]=function(_0x1a9ef8){var _0x429e23=this;return new Promise(function(_0x1014ca,_0x38a242){return db[_0x857f('0x18')]['findAll']({'raw':_0x1a9ef8[_0x857f('0x19')]?_0x1a9ef8[_0x857f('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x1a9ef8[_0x857f('0x19')]?_0x1a9ef8[_0x857f('0x19')][_0x857f('0x1a')]||null:null,'attributes':_0x1a9ef8['options']?_0x1a9ef8['options'][_0x857f('0x1b')]||null:null,'limit':_0x1a9ef8[_0x857f('0x19')]?_0x1a9ef8[_0x857f('0x19')]['limit']||null:null,'include':_0x1a9ef8[_0x857f('0x19')]?_0x1a9ef8[_0x857f('0x19')][_0x857f('0x1c')]?_['map'](_0x1a9ef8[_0x857f('0x19')][_0x857f('0x1c')],function(_0x50bfb7){return{'model':db[_0x50bfb7[_0x857f('0x1d')]],'as':_0x50bfb7['as'],'attributes':_0x50bfb7[_0x857f('0x1b')],'include':_0x50bfb7[_0x857f('0x1c')]?_[_0x857f('0x1e')](_0x50bfb7[_0x857f('0x1c')],function(_0x3b23a7){return{'model':db[_0x3b23a7[_0x857f('0x1d')]],'as':_0x3b23a7['as'],'attributes':_0x3b23a7[_0x857f('0x1b')],'include':_0x3b23a7[_0x857f('0x1c')]?_[_0x857f('0x1e')](_0x3b23a7[_0x857f('0x1c')],function(_0x4782ab){return{'model':db[_0x4782ab[_0x857f('0x1d')]],'as':_0x4782ab['as'],'attributes':_0x4782ab[_0x857f('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x17e415){logger[_0x857f('0xe')](_0x857f('0x17'),_0x1a9ef8);logger[_0x857f('0x1f')]('GetVtigerAccount',_0x1a9ef8,JSON[_0x857f('0x12')](_0x17e415));_0x1014ca(_0x17e415);})['catch'](function(_0x1b405a){logger[_0x857f('0x13')](_0x857f('0x17'),_0x1b405a[_0x857f('0x15')],_0x1a9ef8);_0x38a242(_0x429e23[_0x857f('0x13')](0x1f4,_0x1b405a[_0x857f('0x15')]));});});};exports[_0x857f('0x20')]=function(_0xe79241){var _0x17e7b6=this;return new Promise(function(_0x41f832,_0x24adc2){return db[_0x857f('0x18')][_0x857f('0x21')]({'raw':_0xe79241['options']?_0xe79241[_0x857f('0x19')][_0x857f('0x22')]===undefined?!![]:![]:!![],'where':_0xe79241['options']?_0xe79241[_0x857f('0x19')][_0x857f('0x1a')]||null:null,'attributes':_0xe79241['options']?_0xe79241[_0x857f('0x19')][_0x857f('0x1b')]||null:null,'include':_0xe79241['options']?_0xe79241[_0x857f('0x19')][_0x857f('0x1c')]?_[_0x857f('0x1e')](_0xe79241[_0x857f('0x19')]['include'],function(_0x596b2f){return{'model':db[_0x596b2f[_0x857f('0x1d')]],'as':_0x596b2f['as'],'attributes':_0x596b2f[_0x857f('0x1b')],'include':_0x596b2f['include']?_[_0x857f('0x1e')](_0x596b2f['include'],function(_0x1ff000){return{'model':db[_0x1ff000[_0x857f('0x1d')]],'as':_0x1ff000['as'],'attributes':_0x1ff000[_0x857f('0x1b')],'include':_0x1ff000[_0x857f('0x1c')]?_[_0x857f('0x1e')](_0x1ff000['include'],function(_0x47cfed){return{'model':db[_0x47cfed[_0x857f('0x1d')]],'as':_0x47cfed['as'],'attributes':_0x47cfed['attributes']};}):[]};}):[]};}):[]:[]})[_0x857f('0xd')](function(_0x227602){logger[_0x857f('0xe')]('ShowVtigerAccount',_0xe79241);logger[_0x857f('0x1f')](_0x857f('0x20'),_0xe79241,JSON[_0x857f('0x12')](_0x227602));_0x41f832(_0x227602);})[_0x857f('0x16')](function(_0x36e6bd){logger[_0x857f('0x13')](_0x857f('0x20'),_0x36e6bd['message'],_0xe79241);_0x24adc2(_0x17e7b6[_0x857f('0x13')](0x1f4,_0x36e6bd[_0x857f('0x15')]));});});};
\ No newline at end of file
index 17b2395..3b4967c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0f42=['../../components/auth/service','../../components/interaction/service','./intVtigerConfiguration.controller','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','/:id/subjects','getDescriptions','post','create','put','delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra'];(function(_0x27ddf5,_0x5a3e18){var _0x26e74a=function(_0x5f24ac){while(--_0x5f24ac){_0x27ddf5['push'](_0x27ddf5['shift']());}};_0x26e74a(++_0x5a3e18);}(_0x0f42,0x1da));var _0x20f4=function(_0x465028,_0x4570ac){_0x465028=_0x465028-0x0;var _0xb783d4=_0x0f42[_0x465028];return _0xb783d4;};'use strict';var multer=require('multer');var util=require(_0x20f4('0x0'));var path=require(_0x20f4('0x1'));var timeout=require(_0x20f4('0x2'));var express=require(_0x20f4('0x3'));var router=express[_0x20f4('0x4')]();var fs_extra=require(_0x20f4('0x5'));var auth=require(_0x20f4('0x6'));var interaction=require(_0x20f4('0x7'));var config=require('../../config/environment');var controller=require(_0x20f4('0x8'));router[_0x20f4('0x9')]('/',auth[_0x20f4('0xa')](),controller[_0x20f4('0xb')]);router[_0x20f4('0x9')](_0x20f4('0xc'),auth[_0x20f4('0xa')](),controller[_0x20f4('0xd')]);router[_0x20f4('0x9')](_0x20f4('0xe'),auth['isAuthenticated'](),controller[_0x20f4('0xf')]);router[_0x20f4('0x9')](_0x20f4('0x10'),auth[_0x20f4('0xa')](),controller['getSubjects']);router[_0x20f4('0x9')]('/:id/descriptions',auth[_0x20f4('0xa')](),controller[_0x20f4('0x11')]);router[_0x20f4('0x12')]('/',auth[_0x20f4('0xa')](),controller[_0x20f4('0x13')]);router[_0x20f4('0x14')](_0x20f4('0xc'),auth[_0x20f4('0xa')](),controller['update']);router[_0x20f4('0x15')](_0x20f4('0xc'),auth[_0x20f4('0xa')](),controller[_0x20f4('0x16')]);module[_0x20f4('0x17')]=router;
\ No newline at end of file
+var _0xbfb9=['express','Router','fs-extra','../../components/interaction/service','../../config/environment','./intVtigerConfiguration.controller','isAuthenticated','index','show','get','/:id/fields','/:id/subjects','getSubjects','/:id/descriptions','post','create','put','/:id','update','delete','destroy','util','path'];(function(_0x42bdad,_0x12836c){var _0x122626=function(_0x2eb29c){while(--_0x2eb29c){_0x42bdad['push'](_0x42bdad['shift']());}};_0x122626(++_0x12836c);}(_0xbfb9,0x16e));var _0x9bfb=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0xbfb9[_0x17d9e3];return _0x14192d;};'use strict';var multer=require('multer');var util=require(_0x9bfb('0x0'));var path=require(_0x9bfb('0x1'));var timeout=require('connect-timeout');var express=require(_0x9bfb('0x2'));var router=express[_0x9bfb('0x3')]();var fs_extra=require(_0x9bfb('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x9bfb('0x5'));var config=require(_0x9bfb('0x6'));var controller=require(_0x9bfb('0x7'));router['get']('/',auth[_0x9bfb('0x8')](),controller[_0x9bfb('0x9')]);router['get']('/:id',auth[_0x9bfb('0x8')](),controller[_0x9bfb('0xa')]);router[_0x9bfb('0xb')](_0x9bfb('0xc'),auth[_0x9bfb('0x8')](),controller['getFields']);router[_0x9bfb('0xb')](_0x9bfb('0xd'),auth[_0x9bfb('0x8')](),controller[_0x9bfb('0xe')]);router[_0x9bfb('0xb')](_0x9bfb('0xf'),auth[_0x9bfb('0x8')](),controller['getDescriptions']);router[_0x9bfb('0x10')]('/',auth['isAuthenticated'](),controller[_0x9bfb('0x11')]);router[_0x9bfb('0x12')](_0x9bfb('0x13'),auth[_0x9bfb('0x8')](),controller[_0x9bfb('0x14')]);router[_0x9bfb('0x15')](_0x9bfb('0x13'),auth[_0x9bfb('0x8')](),controller[_0x9bfb('0x16')]);module['exports']=router;
\ No newline at end of file
index 39b427e..8cf1671 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7714=['exports','STRING','sequelize'];(function(_0x53fea8,_0x10d51b){var _0x3c121d=function(_0x257db5){while(--_0x257db5){_0x53fea8['push'](_0x53fea8['shift']());}};_0x3c121d(++_0x10d51b);}(_0x7714,0x1b5));var _0x4771=function(_0x1da527,_0x2dc953){_0x1da527=_0x1da527-0x0;var _0x40fc7c=_0x7714[_0x1da527];return _0x40fc7c;};'use strict';var Sequelize=require(_0x4771('0x0'));module[_0x4771('0x1')]={'name':{'type':Sequelize[_0x4771('0x2')]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x0b10=['sequelize'];(function(_0x59ee6f,_0x450239){var _0x4c0979=function(_0x565e92){while(--_0x565e92){_0x59ee6f['push'](_0x59ee6f['shift']());}};_0x4c0979(++_0x450239);}(_0x0b10,0x1e9));var _0x00b1=function(_0xf1fbbc,_0xa67f9a){_0xf1fbbc=_0xf1fbbc-0x0;var _0x2a20b7=_0x0b10[_0xf1fbbc];return _0x2a20b7;};'use strict';var Sequelize=require(_0x00b1('0x0'));module['exports']={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
index 21e6ad5..1b494eb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb48d=['nolimit','order','sort','filter','where','merge','VIRTUAL','includeAll','findAll','rows','catch','show','params','rawAttributes','options','find','create','body','findOne','VtigerField','getFields','getSubjects','getDescriptions','pick','eml-format','zip-dir','request-promise','moment','bluebird','mustache','path','to-csv','ejs','fs-extra','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','sendStatus','status','end','offset','undefined','limit','count','set','json','apply','reject','save','update','then','destroy','error','stack','name','map','VtigerConfiguration','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0xb48d,0x194));var _0xdb48=function(_0x1ccdf7,_0x215d5a){_0x1ccdf7=_0x1ccdf7-0x0;var _0x52a0ae=_0xb48d[_0x1ccdf7];return _0x52a0ae;};'use strict';var emlformat=require(_0xdb48('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xdb48('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xdb48('0x2'));var moment=require(_0xdb48('0x3'));var BPromise=require(_0xdb48('0x4'));var Mustache=require(_0xdb48('0x5'));var util=require('util');var path=require(_0xdb48('0x6'));var sox=require('sox');var csv=require(_0xdb48('0x7'));var ejs=require(_0xdb48('0x8'));var fs=require('fs');var fs_extra=require(_0xdb48('0x9'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xdb48('0xa'));var jsforce=require(_0xdb48('0xb'));var deskjs=require('desk.js');var toCsv=require(_0xdb48('0x7'));var querystring=require(_0xdb48('0xc'));var Papa=require('papaparse');var Redis=require(_0xdb48('0xd'));var authService=require(_0xdb48('0xe'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xdb48('0xf'));var logger=require(_0xdb48('0x10'))(_0xdb48('0x11'));var utils=require('../../config/utils');var config=require(_0xdb48('0x12'));var licenseUtil=require(_0xdb48('0x13'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xaa4906,_0x3cbfee){_0x3cbfee=_0x3cbfee||0xcc;return function(_0x41e006){if(_0x41e006){return _0xaa4906[_0xdb48('0x14')](_0x3cbfee);}return _0xaa4906[_0xdb48('0x15')](_0x3cbfee)[_0xdb48('0x16')]();};}function respondWithResult(_0x5ebbdd,_0x43df86){_0x43df86=_0x43df86||0xc8;return function(_0x142eaf){if(_0x142eaf){return _0x5ebbdd[_0xdb48('0x15')](_0x43df86)['json'](_0x142eaf);}};}function respondWithFilteredResult(_0x28412d,_0x518dac){return function(_0x453d6b){if(_0x453d6b){var _0x3180d7=typeof _0x518dac[_0xdb48('0x17')]===_0xdb48('0x18')&&typeof _0x518dac[_0xdb48('0x19')]==='undefined';var _0x488997=_0x453d6b[_0xdb48('0x1a')];var _0x38099a=_0x3180d7?0x0:_0x518dac['offset'];var _0x3f98b0=_0x3180d7?_0x453d6b[_0xdb48('0x1a')]:_0x518dac['offset']+_0x518dac['limit'];var _0x1432a9;if(_0x3f98b0>=_0x488997){_0x3f98b0=_0x488997;_0x1432a9=0xc8;}else{_0x1432a9=0xce;}_0x28412d[_0xdb48('0x15')](_0x1432a9);return _0x28412d[_0xdb48('0x1b')]('Content-Range',_0x38099a+'-'+_0x3f98b0+'/'+_0x488997)[_0xdb48('0x1c')](_0x453d6b);}return null;};}function patchUpdates(_0x3d1b69){return function(_0x58604e){try{jsonpatch[_0xdb48('0x1d')](_0x58604e,_0x3d1b69,!![]);}catch(_0x3fb75a){return BPromise[_0xdb48('0x1e')](_0x3fb75a);}return _0x58604e[_0xdb48('0x1f')]();};}function saveUpdates(_0x3921d8,_0x5e63b3){return function(_0x2746c4){if(_0x2746c4){return _0x2746c4[_0xdb48('0x20')](_0x3921d8)[_0xdb48('0x21')](function(_0x5a33a0){return _0x5a33a0;});}return null;};}function removeEntity(_0x5aedc1,_0x52c046){return function(_0x3ad23a){if(_0x3ad23a){return _0x3ad23a[_0xdb48('0x22')]()[_0xdb48('0x21')](function(){_0x5aedc1['status'](0xcc)[_0xdb48('0x16')]();});}};}function handleEntityNotFound(_0x4d29d1,_0x3b3344){return function(_0x3a5bdd){if(!_0x3a5bdd){_0x4d29d1[_0xdb48('0x14')](0x194);}return _0x3a5bdd;};}function handleError(_0x531a2a,_0x483940){_0x483940=_0x483940||0x1f4;return function(_0x139139){logger[_0xdb48('0x23')](_0x139139[_0xdb48('0x24')]);if(_0x139139['name']){delete _0x139139[_0xdb48('0x25')];}_0x531a2a[_0xdb48('0x15')](_0x483940)['send'](_0x139139);};}exports['index']=function(_0x31edb6,_0x2cdfa4){var _0x2adb1e={},_0x2f55c6={},_0x549b18={'count':0x0,'rows':[]};var _0x58c3d1=_[_0xdb48('0x26')](db[_0xdb48('0x27')]['rawAttributes'],function(_0x43e857){return{'name':_0x43e857[_0xdb48('0x28')],'type':_0x43e857[_0xdb48('0x29')][_0xdb48('0x2a')]};});_0x2f55c6[_0xdb48('0x2b')]=_[_0xdb48('0x26')](_0x58c3d1,'name');_0x2f55c6[_0xdb48('0x2c')]=_[_0xdb48('0x2d')](_0x31edb6[_0xdb48('0x2c')]);_0x2f55c6[_0xdb48('0x2e')]=_[_0xdb48('0x2f')](_0x2f55c6[_0xdb48('0x2b')],_0x2f55c6['query']);_0x2adb1e['attributes']=_[_0xdb48('0x2f')](_0x2f55c6[_0xdb48('0x2b')],qs[_0xdb48('0x30')](_0x31edb6[_0xdb48('0x2c')][_0xdb48('0x30')]));_0x2adb1e[_0xdb48('0x31')]=_0x2adb1e[_0xdb48('0x31')][_0xdb48('0x32')]?_0x2adb1e[_0xdb48('0x31')]:_0x2f55c6['model'];if(!_0x31edb6[_0xdb48('0x2c')][_0xdb48('0x33')](_0xdb48('0x34'))){_0x2adb1e[_0xdb48('0x19')]=qs['limit'](_0x31edb6['query'][_0xdb48('0x19')]);_0x2adb1e[_0xdb48('0x17')]=qs[_0xdb48('0x17')](_0x31edb6[_0xdb48('0x2c')][_0xdb48('0x17')]);}_0x2adb1e[_0xdb48('0x35')]=qs[_0xdb48('0x36')](_0x31edb6[_0xdb48('0x2c')]['sort']);_0x2adb1e['where']=qs[_0xdb48('0x2e')](_['pick'](_0x31edb6[_0xdb48('0x2c')],_0x2f55c6[_0xdb48('0x2e')]),_0x58c3d1);if(_0x31edb6[_0xdb48('0x2c')][_0xdb48('0x37')]){_0x2adb1e[_0xdb48('0x38')]=_[_0xdb48('0x39')](_0x2adb1e[_0xdb48('0x38')],{'$or':_[_0xdb48('0x26')](_0x58c3d1,function(_0x59cf7a){if(_0x59cf7a[_0xdb48('0x29')]!==_0xdb48('0x3a')){var _0x4acc54={};_0x4acc54[_0x59cf7a[_0xdb48('0x25')]]={'$like':'%'+_0x31edb6[_0xdb48('0x2c')][_0xdb48('0x37')]+'%'};return _0x4acc54;}})});}_0x2adb1e=_[_0xdb48('0x39')]({},_0x2adb1e,_0x31edb6['options']);var _0x5661f0={'where':_0x2adb1e[_0xdb48('0x38')]};return db[_0xdb48('0x27')]['count'](_0x5661f0)['then'](function(_0x30edaf){_0x549b18[_0xdb48('0x1a')]=_0x30edaf;if(_0x31edb6[_0xdb48('0x2c')][_0xdb48('0x3b')]){_0x2adb1e['include']=[{'all':!![]}];}return db['VtigerConfiguration'][_0xdb48('0x3c')](_0x2adb1e);})[_0xdb48('0x21')](function(_0x171c9e){_0x549b18[_0xdb48('0x3d')]=_0x171c9e;return _0x549b18;})[_0xdb48('0x21')](respondWithFilteredResult(_0x2cdfa4,_0x2adb1e))[_0xdb48('0x3e')](handleError(_0x2cdfa4,null));};exports[_0xdb48('0x3f')]=function(_0x128d0a,_0x3ad982){var _0x4838b8={'raw':![],'where':{'id':_0x128d0a[_0xdb48('0x40')]['id']}},_0x3accdb={};_0x3accdb['model']=_[_0xdb48('0x2d')](db['VtigerConfiguration'][_0xdb48('0x41')]);_0x3accdb['query']=_[_0xdb48('0x2d')](_0x128d0a[_0xdb48('0x2c')]);_0x3accdb[_0xdb48('0x2e')]=_[_0xdb48('0x2f')](_0x3accdb[_0xdb48('0x2b')],_0x3accdb[_0xdb48('0x2c')]);_0x4838b8[_0xdb48('0x31')]=_[_0xdb48('0x2f')](_0x3accdb[_0xdb48('0x2b')],qs[_0xdb48('0x30')](_0x128d0a[_0xdb48('0x2c')][_0xdb48('0x30')]));_0x4838b8[_0xdb48('0x31')]=_0x4838b8[_0xdb48('0x31')][_0xdb48('0x32')]?_0x4838b8[_0xdb48('0x31')]:_0x3accdb[_0xdb48('0x2b')];if(_0x128d0a[_0xdb48('0x2c')][_0xdb48('0x3b')]){_0x4838b8['include']=[{'all':!![]}];}_0x4838b8=_['merge']({},_0x4838b8,_0x128d0a[_0xdb48('0x42')]);return db[_0xdb48('0x27')][_0xdb48('0x43')](_0x4838b8)['then'](handleEntityNotFound(_0x3ad982,null))[_0xdb48('0x21')](respondWithResult(_0x3ad982,null))[_0xdb48('0x3e')](handleError(_0x3ad982,null));};exports[_0xdb48('0x44')]=function(_0x24e544,_0x31ff09){return db['VtigerConfiguration'][_0xdb48('0x44')](_0x24e544['body'],{})[_0xdb48('0x21')](respondWithResult(_0x31ff09,0xc9))[_0xdb48('0x3e')](handleError(_0x31ff09,null));};exports[_0xdb48('0x20')]=function(_0x3317ca,_0x5d0742){if(_0x3317ca[_0xdb48('0x45')]['id']){delete _0x3317ca['body']['id'];}return db[_0xdb48('0x27')][_0xdb48('0x43')]({'where':{'id':_0x3317ca[_0xdb48('0x40')]['id']}})[_0xdb48('0x21')](handleEntityNotFound(_0x5d0742,null))[_0xdb48('0x21')](saveUpdates(_0x3317ca[_0xdb48('0x45')],null))[_0xdb48('0x21')](respondWithResult(_0x5d0742,null))[_0xdb48('0x3e')](handleError(_0x5d0742,null));};exports[_0xdb48('0x22')]=function(_0x3c1669,_0x4b5cc7){return db['VtigerConfiguration'][_0xdb48('0x43')]({'where':{'id':_0x3c1669[_0xdb48('0x40')]['id']}})[_0xdb48('0x21')](handleEntityNotFound(_0x4b5cc7,null))[_0xdb48('0x21')](removeEntity(_0x4b5cc7,null))['catch'](handleError(_0x4b5cc7,null));};exports['getFields']=function(_0x57e578,_0x3d3500,_0x44296b){var _0x328381={};var _0x57a4e5={};var _0x3b6bb0;var _0x4de923;return db[_0xdb48('0x27')][_0xdb48('0x46')]({'where':{'id':_0x57e578[_0xdb48('0x40')]['id']}})['then'](handleEntityNotFound(_0x3d3500,null))['then'](function(_0x322136){if(_0x322136){_0x3b6bb0=_0x322136;_0x57a4e5[_0xdb48('0x2b')]=_[_0xdb48('0x2d')](db[_0xdb48('0x47')]['rawAttributes']);_0x57a4e5[_0xdb48('0x2c')]=_[_0xdb48('0x2d')](_0x57e578[_0xdb48('0x2c')]);_0x57a4e5[_0xdb48('0x2e')]=_[_0xdb48('0x2f')](_0x57a4e5[_0xdb48('0x2b')],_0x57a4e5[_0xdb48('0x2c')]);_0x328381['attributes']=_['intersection'](_0x57a4e5[_0xdb48('0x2b')],qs[_0xdb48('0x30')](_0x57e578[_0xdb48('0x2c')][_0xdb48('0x30')]));_0x328381['attributes']=_0x328381[_0xdb48('0x31')][_0xdb48('0x32')]?_0x328381['attributes']:_0x57a4e5['model'];_0x328381[_0xdb48('0x35')]=qs[_0xdb48('0x36')](_0x57e578['query']['sort']);_0x328381[_0xdb48('0x38')]=qs[_0xdb48('0x2e')](_['pick'](_0x57e578[_0xdb48('0x2c')],_0x57a4e5[_0xdb48('0x2e')]));if(_0x57e578[_0xdb48('0x2c')][_0xdb48('0x37')]){_0x328381[_0xdb48('0x38')]=_['merge'](_0x328381['where'],{'$or':_['map'](_0x328381[_0xdb48('0x31')],function(_0x3dda78){var _0x281792={};_0x281792[_0x3dda78]={'$like':'%'+_0x57e578['query'][_0xdb48('0x37')]+'%'};return _0x281792;})});}_0x328381=_[_0xdb48('0x39')]({},_0x328381,_0x57e578[_0xdb48('0x42')]);return _0x3b6bb0['getFields'](_0x328381);}})[_0xdb48('0x21')](function(_0x331ac7){if(_0x331ac7){_0x4de923=_0x331ac7[_0xdb48('0x32')];if(!_0x57e578[_0xdb48('0x2c')][_0xdb48('0x33')](_0xdb48('0x34'))){_0x328381[_0xdb48('0x19')]=qs['limit'](_0x57e578['query']['limit']);_0x328381[_0xdb48('0x17')]=qs[_0xdb48('0x17')](_0x57e578[_0xdb48('0x2c')]['offset']);}return _0x3b6bb0[_0xdb48('0x48')](_0x328381);}})['then'](function(_0x3e41cc){if(_0x3e41cc){return _0x3e41cc?{'count':_0x4de923,'rows':_0x3e41cc}:null;}})['then'](respondWithResult(_0x3d3500,null))[_0xdb48('0x3e')](handleError(_0x3d3500,null));};exports[_0xdb48('0x49')]=function(_0x5b804a,_0x4ff7d8,_0xe57330){var _0x4106a1={};var _0x2dc34c={};var _0xe022e1;var _0x9e7643;return db[_0xdb48('0x27')][_0xdb48('0x46')]({'where':{'id':_0x5b804a[_0xdb48('0x40')]['id']}})['then'](handleEntityNotFound(_0x4ff7d8,null))[_0xdb48('0x21')](function(_0x2b9f50){if(_0x2b9f50){_0xe022e1=_0x2b9f50;_0x2dc34c[_0xdb48('0x2b')]=_[_0xdb48('0x2d')](db[_0xdb48('0x47')][_0xdb48('0x41')]);_0x2dc34c[_0xdb48('0x2c')]=_['keys'](_0x5b804a['query']);_0x2dc34c[_0xdb48('0x2e')]=_[_0xdb48('0x2f')](_0x2dc34c[_0xdb48('0x2b')],_0x2dc34c[_0xdb48('0x2c')]);_0x4106a1[_0xdb48('0x31')]=_[_0xdb48('0x2f')](_0x2dc34c[_0xdb48('0x2b')],qs['fields'](_0x5b804a[_0xdb48('0x2c')][_0xdb48('0x30')]));_0x4106a1['attributes']=_0x4106a1[_0xdb48('0x31')][_0xdb48('0x32')]?_0x4106a1[_0xdb48('0x31')]:_0x2dc34c[_0xdb48('0x2b')];_0x4106a1[_0xdb48('0x35')]=qs[_0xdb48('0x36')](_0x5b804a['query'][_0xdb48('0x36')]);_0x4106a1[_0xdb48('0x38')]=qs[_0xdb48('0x2e')](_['pick'](_0x5b804a[_0xdb48('0x2c')],_0x2dc34c[_0xdb48('0x2e')]));if(_0x5b804a[_0xdb48('0x2c')][_0xdb48('0x37')]){_0x4106a1[_0xdb48('0x38')]=_[_0xdb48('0x39')](_0x4106a1[_0xdb48('0x38')],{'$or':_[_0xdb48('0x26')](_0x4106a1[_0xdb48('0x31')],function(_0x43e490){var _0x75638b={};_0x75638b[_0x43e490]={'$like':'%'+_0x5b804a[_0xdb48('0x2c')][_0xdb48('0x37')]+'%'};return _0x75638b;})});}_0x4106a1=_[_0xdb48('0x39')]({},_0x4106a1,_0x5b804a['options']);return _0xe022e1[_0xdb48('0x49')](_0x4106a1);}})['then'](function(_0x4017b3){if(_0x4017b3){_0x9e7643=_0x4017b3[_0xdb48('0x32')];if(!_0x5b804a['query'][_0xdb48('0x33')](_0xdb48('0x34'))){_0x4106a1[_0xdb48('0x19')]=qs[_0xdb48('0x19')](_0x5b804a['query']['limit']);_0x4106a1[_0xdb48('0x17')]=qs['offset'](_0x5b804a[_0xdb48('0x2c')][_0xdb48('0x17')]);}return _0xe022e1[_0xdb48('0x49')](_0x4106a1);}})[_0xdb48('0x21')](function(_0x4d9e43){if(_0x4d9e43){return _0x4d9e43?{'count':_0x9e7643,'rows':_0x4d9e43}:null;}})[_0xdb48('0x21')](respondWithResult(_0x4ff7d8,null))[_0xdb48('0x3e')](handleError(_0x4ff7d8,null));};exports[_0xdb48('0x4a')]=function(_0x57a1e4,_0x199273,_0x1c1822){var _0x5b9c7a={};var _0x485712={};var _0x4287f3;var _0x5aaaca;return db[_0xdb48('0x27')][_0xdb48('0x46')]({'where':{'id':_0x57a1e4[_0xdb48('0x40')]['id']}})[_0xdb48('0x21')](handleEntityNotFound(_0x199273,null))[_0xdb48('0x21')](function(_0x231490){if(_0x231490){_0x4287f3=_0x231490;_0x485712[_0xdb48('0x2b')]=_[_0xdb48('0x2d')](db['VtigerField'][_0xdb48('0x41')]);_0x485712[_0xdb48('0x2c')]=_[_0xdb48('0x2d')](_0x57a1e4[_0xdb48('0x2c')]);_0x485712[_0xdb48('0x2e')]=_[_0xdb48('0x2f')](_0x485712['model'],_0x485712['query']);_0x5b9c7a[_0xdb48('0x31')]=_[_0xdb48('0x2f')](_0x485712[_0xdb48('0x2b')],qs[_0xdb48('0x30')](_0x57a1e4[_0xdb48('0x2c')]['fields']));_0x5b9c7a[_0xdb48('0x31')]=_0x5b9c7a[_0xdb48('0x31')]['length']?_0x5b9c7a['attributes']:_0x485712[_0xdb48('0x2b')];_0x5b9c7a[_0xdb48('0x35')]=qs[_0xdb48('0x36')](_0x57a1e4[_0xdb48('0x2c')][_0xdb48('0x36')]);_0x5b9c7a['where']=qs[_0xdb48('0x2e')](_[_0xdb48('0x4b')](_0x57a1e4[_0xdb48('0x2c')],_0x485712[_0xdb48('0x2e')]));if(_0x57a1e4['query'][_0xdb48('0x37')]){_0x5b9c7a[_0xdb48('0x38')]=_[_0xdb48('0x39')](_0x5b9c7a[_0xdb48('0x38')],{'$or':_[_0xdb48('0x26')](_0x5b9c7a['attributes'],function(_0x4125a0){var _0x1dfb9d={};_0x1dfb9d[_0x4125a0]={'$like':'%'+_0x57a1e4[_0xdb48('0x2c')][_0xdb48('0x37')]+'%'};return _0x1dfb9d;})});}_0x5b9c7a=_[_0xdb48('0x39')]({},_0x5b9c7a,_0x57a1e4[_0xdb48('0x42')]);return _0x4287f3['getDescriptions'](_0x5b9c7a);}})[_0xdb48('0x21')](function(_0x554a90){if(_0x554a90){_0x5aaaca=_0x554a90[_0xdb48('0x32')];if(!_0x57a1e4['query'][_0xdb48('0x33')](_0xdb48('0x34'))){_0x5b9c7a['limit']=qs[_0xdb48('0x19')](_0x57a1e4[_0xdb48('0x2c')][_0xdb48('0x19')]);_0x5b9c7a[_0xdb48('0x17')]=qs['offset'](_0x57a1e4[_0xdb48('0x2c')][_0xdb48('0x17')]);}return _0x4287f3[_0xdb48('0x4a')](_0x5b9c7a);}})[_0xdb48('0x21')](function(_0x3e04a5){if(_0x3e04a5){return _0x3e04a5?{'count':_0x5aaaca,'rows':_0x3e04a5}:null;}})[_0xdb48('0x21')](respondWithResult(_0x199273,null))[_0xdb48('0x3e')](handleError(_0x199273,null));};
\ No newline at end of file
+var _0xb5ed=['key','model','query','keys','filters','attributes','intersection','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','type','VIRTUAL','merge','options','includeAll','include','VtigerConfiguration','findAll','rows','show','params','fields','catch','create','body','find','getFields','findOne','getSubjects','getDescriptions','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils','sendStatus','status','end','offset','limit','undefined','count','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','index','map','rawAttributes'];(function(_0x18ab2a,_0x4debcd){var _0x16dcee=function(_0x10107a){while(--_0x10107a){_0x18ab2a['push'](_0x18ab2a['shift']());}};_0x16dcee(++_0x4debcd);}(_0xb5ed,0x1a4));var _0xdb5e=function(_0x46656f,_0x33c326){_0x46656f=_0x46656f-0x0;var _0x1bdb73=_0xb5ed[_0x46656f];return _0x1bdb73;};'use strict';var emlformat=require(_0xdb5e('0x0'));var rimraf=require(_0xdb5e('0x1'));var zipdir=require(_0xdb5e('0x2'));var jsonpatch=require(_0xdb5e('0x3'));var rp=require('request-promise');var moment=require(_0xdb5e('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xdb5e('0x5'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0xdb5e('0x6'));var ejs=require(_0xdb5e('0x7'));var fs=require('fs');var fs_extra=require(_0xdb5e('0x8'));var _=require(_0xdb5e('0x9'));var squel=require(_0xdb5e('0xa'));var crypto=require(_0xdb5e('0xb'));var jsforce=require(_0xdb5e('0xc'));var deskjs=require(_0xdb5e('0xd'));var toCsv=require(_0xdb5e('0x6'));var querystring=require(_0xdb5e('0xe'));var Papa=require(_0xdb5e('0xf'));var Redis=require(_0xdb5e('0x10'));var authService=require(_0xdb5e('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0xdb5e('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xdb5e('0x13'));var utils=require(_0xdb5e('0x14'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x15a81f,_0x19af5b){_0x19af5b=_0x19af5b||0xcc;return function(_0x53528a){if(_0x53528a){return _0x15a81f[_0xdb5e('0x15')](_0x19af5b);}return _0x15a81f[_0xdb5e('0x16')](_0x19af5b)[_0xdb5e('0x17')]();};}function respondWithResult(_0x219f19,_0x5454c9){_0x5454c9=_0x5454c9||0xc8;return function(_0x415387){if(_0x415387){return _0x219f19[_0xdb5e('0x16')](_0x5454c9)['json'](_0x415387);}};}function respondWithFilteredResult(_0x21cc18,_0x4f29c0){return function(_0x444cb9){if(_0x444cb9){var _0x5d1588=typeof _0x4f29c0[_0xdb5e('0x18')]==='undefined'&&typeof _0x4f29c0[_0xdb5e('0x19')]===_0xdb5e('0x1a');var _0x33c9bb=_0x444cb9[_0xdb5e('0x1b')];var _0x117dda=_0x5d1588?0x0:_0x4f29c0[_0xdb5e('0x18')];var _0x2b27ba=_0x5d1588?_0x444cb9[_0xdb5e('0x1b')]:_0x4f29c0['offset']+_0x4f29c0[_0xdb5e('0x19')];var _0x3cf173;if(_0x2b27ba>=_0x33c9bb){_0x2b27ba=_0x33c9bb;_0x3cf173=0xc8;}else{_0x3cf173=0xce;}_0x21cc18['status'](_0x3cf173);return _0x21cc18['set'](_0xdb5e('0x1c'),_0x117dda+'-'+_0x2b27ba+'/'+_0x33c9bb)['json'](_0x444cb9);}return null;};}function patchUpdates(_0x4ba613){return function(_0x4c4b28){try{jsonpatch[_0xdb5e('0x1d')](_0x4c4b28,_0x4ba613,!![]);}catch(_0x1fc4fb){return BPromise[_0xdb5e('0x1e')](_0x1fc4fb);}return _0x4c4b28[_0xdb5e('0x1f')]();};}function saveUpdates(_0x24591d,_0x2734a8){return function(_0x2f7a57){if(_0x2f7a57){return _0x2f7a57[_0xdb5e('0x20')](_0x24591d)[_0xdb5e('0x21')](function(_0x478954){return _0x478954;});}return null;};}function removeEntity(_0x2f08cb,_0x197c56){return function(_0x56b123){if(_0x56b123){return _0x56b123[_0xdb5e('0x22')]()[_0xdb5e('0x21')](function(){_0x2f08cb[_0xdb5e('0x16')](0xcc)['end']();});}};}function handleEntityNotFound(_0x58ce6c,_0x488819){return function(_0x362ddd){if(!_0x362ddd){_0x58ce6c['sendStatus'](0x194);}return _0x362ddd;};}function handleError(_0x4c239f,_0x5b2cbb){_0x5b2cbb=_0x5b2cbb||0x1f4;return function(_0x4f9f03){logger[_0xdb5e('0x23')](_0x4f9f03[_0xdb5e('0x24')]);if(_0x4f9f03['name']){delete _0x4f9f03[_0xdb5e('0x25')];}_0x4c239f[_0xdb5e('0x16')](_0x5b2cbb)[_0xdb5e('0x26')](_0x4f9f03);};}exports[_0xdb5e('0x27')]=function(_0x227a4e,_0x27f1db){var _0x465b76={},_0x145076={},_0xf7695c={'count':0x0,'rows':[]};var _0x358c89=_[_0xdb5e('0x28')](db['VtigerConfiguration'][_0xdb5e('0x29')],function(_0x29c9ed){return{'name':_0x29c9ed['fieldName'],'type':_0x29c9ed['type'][_0xdb5e('0x2a')]};});_0x145076[_0xdb5e('0x2b')]=_[_0xdb5e('0x28')](_0x358c89,_0xdb5e('0x25'));_0x145076[_0xdb5e('0x2c')]=_[_0xdb5e('0x2d')](_0x227a4e[_0xdb5e('0x2c')]);_0x145076[_0xdb5e('0x2e')]=_['intersection'](_0x145076[_0xdb5e('0x2b')],_0x145076[_0xdb5e('0x2c')]);_0x465b76[_0xdb5e('0x2f')]=_[_0xdb5e('0x30')](_0x145076[_0xdb5e('0x2b')],qs['fields'](_0x227a4e[_0xdb5e('0x2c')]['fields']));_0x465b76[_0xdb5e('0x2f')]=_0x465b76[_0xdb5e('0x2f')][_0xdb5e('0x31')]?_0x465b76[_0xdb5e('0x2f')]:_0x145076[_0xdb5e('0x2b')];if(!_0x227a4e[_0xdb5e('0x2c')][_0xdb5e('0x32')](_0xdb5e('0x33'))){_0x465b76[_0xdb5e('0x19')]=qs['limit'](_0x227a4e['query']['limit']);_0x465b76[_0xdb5e('0x18')]=qs[_0xdb5e('0x18')](_0x227a4e[_0xdb5e('0x2c')][_0xdb5e('0x18')]);}_0x465b76[_0xdb5e('0x34')]=qs[_0xdb5e('0x35')](_0x227a4e['query']['sort']);_0x465b76['where']=qs[_0xdb5e('0x2e')](_[_0xdb5e('0x36')](_0x227a4e[_0xdb5e('0x2c')],_0x145076[_0xdb5e('0x2e')]),_0x358c89);if(_0x227a4e[_0xdb5e('0x2c')][_0xdb5e('0x37')]){_0x465b76[_0xdb5e('0x38')]=_['merge'](_0x465b76['where'],{'$or':_[_0xdb5e('0x28')](_0x358c89,function(_0x4972c3){if(_0x4972c3[_0xdb5e('0x39')]!==_0xdb5e('0x3a')){var _0x18fe2b={};_0x18fe2b[_0x4972c3['name']]={'$like':'%'+_0x227a4e[_0xdb5e('0x2c')]['filter']+'%'};return _0x18fe2b;}})});}_0x465b76=_[_0xdb5e('0x3b')]({},_0x465b76,_0x227a4e[_0xdb5e('0x3c')]);var _0x532d95={'where':_0x465b76[_0xdb5e('0x38')]};return db['VtigerConfiguration'][_0xdb5e('0x1b')](_0x532d95)[_0xdb5e('0x21')](function(_0x5e1c92){_0xf7695c['count']=_0x5e1c92;if(_0x227a4e['query'][_0xdb5e('0x3d')]){_0x465b76[_0xdb5e('0x3e')]=[{'all':!![]}];}return db[_0xdb5e('0x3f')][_0xdb5e('0x40')](_0x465b76);})['then'](function(_0x36d4d8){_0xf7695c[_0xdb5e('0x41')]=_0x36d4d8;return _0xf7695c;})[_0xdb5e('0x21')](respondWithFilteredResult(_0x27f1db,_0x465b76))['catch'](handleError(_0x27f1db,null));};exports[_0xdb5e('0x42')]=function(_0x4b176f,_0x47a724){var _0x6f150e={'raw':![],'where':{'id':_0x4b176f[_0xdb5e('0x43')]['id']}},_0x1176c5={};_0x1176c5[_0xdb5e('0x2b')]=_[_0xdb5e('0x2d')](db[_0xdb5e('0x3f')][_0xdb5e('0x29')]);_0x1176c5[_0xdb5e('0x2c')]=_['keys'](_0x4b176f[_0xdb5e('0x2c')]);_0x1176c5[_0xdb5e('0x2e')]=_[_0xdb5e('0x30')](_0x1176c5[_0xdb5e('0x2b')],_0x1176c5[_0xdb5e('0x2c')]);_0x6f150e[_0xdb5e('0x2f')]=_[_0xdb5e('0x30')](_0x1176c5[_0xdb5e('0x2b')],qs[_0xdb5e('0x44')](_0x4b176f[_0xdb5e('0x2c')]['fields']));_0x6f150e[_0xdb5e('0x2f')]=_0x6f150e[_0xdb5e('0x2f')]['length']?_0x6f150e['attributes']:_0x1176c5['model'];if(_0x4b176f[_0xdb5e('0x2c')][_0xdb5e('0x3d')]){_0x6f150e[_0xdb5e('0x3e')]=[{'all':!![]}];}_0x6f150e=_[_0xdb5e('0x3b')]({},_0x6f150e,_0x4b176f[_0xdb5e('0x3c')]);return db[_0xdb5e('0x3f')]['find'](_0x6f150e)[_0xdb5e('0x21')](handleEntityNotFound(_0x47a724,null))[_0xdb5e('0x21')](respondWithResult(_0x47a724,null))[_0xdb5e('0x45')](handleError(_0x47a724,null));};exports[_0xdb5e('0x46')]=function(_0x10a1dd,_0x20b209){return db['VtigerConfiguration'][_0xdb5e('0x46')](_0x10a1dd[_0xdb5e('0x47')],{})[_0xdb5e('0x21')](respondWithResult(_0x20b209,0xc9))['catch'](handleError(_0x20b209,null));};exports['update']=function(_0xe6987,_0x3ed847){if(_0xe6987[_0xdb5e('0x47')]['id']){delete _0xe6987[_0xdb5e('0x47')]['id'];}return db[_0xdb5e('0x3f')][_0xdb5e('0x48')]({'where':{'id':_0xe6987[_0xdb5e('0x43')]['id']}})[_0xdb5e('0x21')](handleEntityNotFound(_0x3ed847,null))[_0xdb5e('0x21')](saveUpdates(_0xe6987[_0xdb5e('0x47')],null))[_0xdb5e('0x21')](respondWithResult(_0x3ed847,null))['catch'](handleError(_0x3ed847,null));};exports['destroy']=function(_0x144530,_0x17a33c){return db[_0xdb5e('0x3f')][_0xdb5e('0x48')]({'where':{'id':_0x144530[_0xdb5e('0x43')]['id']}})[_0xdb5e('0x21')](handleEntityNotFound(_0x17a33c,null))[_0xdb5e('0x21')](removeEntity(_0x17a33c,null))[_0xdb5e('0x45')](handleError(_0x17a33c,null));};exports[_0xdb5e('0x49')]=function(_0x34a74e,_0x5eeee2,_0x273465){var _0x18cfa2={};var _0x47bdf6={};var _0xb0d273;var _0x3aa1a1;return db[_0xdb5e('0x3f')][_0xdb5e('0x4a')]({'where':{'id':_0x34a74e[_0xdb5e('0x43')]['id']}})[_0xdb5e('0x21')](handleEntityNotFound(_0x5eeee2,null))[_0xdb5e('0x21')](function(_0x29c0ce){if(_0x29c0ce){_0xb0d273=_0x29c0ce;_0x47bdf6[_0xdb5e('0x2b')]=_[_0xdb5e('0x2d')](db['VtigerField'][_0xdb5e('0x29')]);_0x47bdf6[_0xdb5e('0x2c')]=_[_0xdb5e('0x2d')](_0x34a74e[_0xdb5e('0x2c')]);_0x47bdf6[_0xdb5e('0x2e')]=_['intersection'](_0x47bdf6[_0xdb5e('0x2b')],_0x47bdf6[_0xdb5e('0x2c')]);_0x18cfa2[_0xdb5e('0x2f')]=_[_0xdb5e('0x30')](_0x47bdf6[_0xdb5e('0x2b')],qs[_0xdb5e('0x44')](_0x34a74e['query']['fields']));_0x18cfa2['attributes']=_0x18cfa2[_0xdb5e('0x2f')][_0xdb5e('0x31')]?_0x18cfa2[_0xdb5e('0x2f')]:_0x47bdf6[_0xdb5e('0x2b')];_0x18cfa2[_0xdb5e('0x34')]=qs[_0xdb5e('0x35')](_0x34a74e[_0xdb5e('0x2c')]['sort']);_0x18cfa2['where']=qs[_0xdb5e('0x2e')](_[_0xdb5e('0x36')](_0x34a74e[_0xdb5e('0x2c')],_0x47bdf6['filters']));if(_0x34a74e[_0xdb5e('0x2c')][_0xdb5e('0x37')]){_0x18cfa2[_0xdb5e('0x38')]=_[_0xdb5e('0x3b')](_0x18cfa2[_0xdb5e('0x38')],{'$or':_[_0xdb5e('0x28')](_0x18cfa2['attributes'],function(_0x4a32c0){var _0x84ec96={};_0x84ec96[_0x4a32c0]={'$like':'%'+_0x34a74e[_0xdb5e('0x2c')][_0xdb5e('0x37')]+'%'};return _0x84ec96;})});}_0x18cfa2=_[_0xdb5e('0x3b')]({},_0x18cfa2,_0x34a74e[_0xdb5e('0x3c')]);return _0xb0d273['getFields'](_0x18cfa2);}})[_0xdb5e('0x21')](function(_0x4ec802){if(_0x4ec802){_0x3aa1a1=_0x4ec802[_0xdb5e('0x31')];if(!_0x34a74e[_0xdb5e('0x2c')][_0xdb5e('0x32')](_0xdb5e('0x33'))){_0x18cfa2['limit']=qs['limit'](_0x34a74e['query'][_0xdb5e('0x19')]);_0x18cfa2[_0xdb5e('0x18')]=qs['offset'](_0x34a74e[_0xdb5e('0x2c')][_0xdb5e('0x18')]);}return _0xb0d273[_0xdb5e('0x49')](_0x18cfa2);}})[_0xdb5e('0x21')](function(_0x23048a){if(_0x23048a){return _0x23048a?{'count':_0x3aa1a1,'rows':_0x23048a}:null;}})[_0xdb5e('0x21')](respondWithResult(_0x5eeee2,null))[_0xdb5e('0x45')](handleError(_0x5eeee2,null));};exports['getSubjects']=function(_0x197850,_0x8b4276,_0x191873){var _0x470a67={};var _0x25c084={};var _0x200893;var _0x3feecc;return db['VtigerConfiguration'][_0xdb5e('0x4a')]({'where':{'id':_0x197850['params']['id']}})[_0xdb5e('0x21')](handleEntityNotFound(_0x8b4276,null))[_0xdb5e('0x21')](function(_0x2df565){if(_0x2df565){_0x200893=_0x2df565;_0x25c084[_0xdb5e('0x2b')]=_['keys'](db['VtigerField'][_0xdb5e('0x29')]);_0x25c084['query']=_['keys'](_0x197850[_0xdb5e('0x2c')]);_0x25c084[_0xdb5e('0x2e')]=_['intersection'](_0x25c084[_0xdb5e('0x2b')],_0x25c084[_0xdb5e('0x2c')]);_0x470a67[_0xdb5e('0x2f')]=_[_0xdb5e('0x30')](_0x25c084['model'],qs['fields'](_0x197850[_0xdb5e('0x2c')][_0xdb5e('0x44')]));_0x470a67[_0xdb5e('0x2f')]=_0x470a67[_0xdb5e('0x2f')][_0xdb5e('0x31')]?_0x470a67[_0xdb5e('0x2f')]:_0x25c084[_0xdb5e('0x2b')];_0x470a67[_0xdb5e('0x34')]=qs['sort'](_0x197850[_0xdb5e('0x2c')][_0xdb5e('0x35')]);_0x470a67[_0xdb5e('0x38')]=qs[_0xdb5e('0x2e')](_[_0xdb5e('0x36')](_0x197850[_0xdb5e('0x2c')],_0x25c084[_0xdb5e('0x2e')]));if(_0x197850[_0xdb5e('0x2c')][_0xdb5e('0x37')]){_0x470a67[_0xdb5e('0x38')]=_[_0xdb5e('0x3b')](_0x470a67['where'],{'$or':_[_0xdb5e('0x28')](_0x470a67[_0xdb5e('0x2f')],function(_0x53398){var _0x1ca012={};_0x1ca012[_0x53398]={'$like':'%'+_0x197850[_0xdb5e('0x2c')][_0xdb5e('0x37')]+'%'};return _0x1ca012;})});}_0x470a67=_[_0xdb5e('0x3b')]({},_0x470a67,_0x197850[_0xdb5e('0x3c')]);return _0x200893[_0xdb5e('0x4b')](_0x470a67);}})['then'](function(_0x1585f5){if(_0x1585f5){_0x3feecc=_0x1585f5[_0xdb5e('0x31')];if(!_0x197850[_0xdb5e('0x2c')][_0xdb5e('0x32')]('nolimit')){_0x470a67[_0xdb5e('0x19')]=qs[_0xdb5e('0x19')](_0x197850[_0xdb5e('0x2c')]['limit']);_0x470a67[_0xdb5e('0x18')]=qs[_0xdb5e('0x18')](_0x197850['query'][_0xdb5e('0x18')]);}return _0x200893[_0xdb5e('0x4b')](_0x470a67);}})[_0xdb5e('0x21')](function(_0x40ec4d){if(_0x40ec4d){return _0x40ec4d?{'count':_0x3feecc,'rows':_0x40ec4d}:null;}})['then'](respondWithResult(_0x8b4276,null))[_0xdb5e('0x45')](handleError(_0x8b4276,null));};exports[_0xdb5e('0x4c')]=function(_0x55a133,_0x1511c6,_0x3052aa){var _0x654ecc={};var _0x1ccf14={};var _0x32648b;var _0x2fd646;return db[_0xdb5e('0x3f')]['findOne']({'where':{'id':_0x55a133[_0xdb5e('0x43')]['id']}})[_0xdb5e('0x21')](handleEntityNotFound(_0x1511c6,null))[_0xdb5e('0x21')](function(_0x166622){if(_0x166622){_0x32648b=_0x166622;_0x1ccf14[_0xdb5e('0x2b')]=_[_0xdb5e('0x2d')](db['VtigerField']['rawAttributes']);_0x1ccf14[_0xdb5e('0x2c')]=_[_0xdb5e('0x2d')](_0x55a133[_0xdb5e('0x2c')]);_0x1ccf14[_0xdb5e('0x2e')]=_[_0xdb5e('0x30')](_0x1ccf14[_0xdb5e('0x2b')],_0x1ccf14[_0xdb5e('0x2c')]);_0x654ecc[_0xdb5e('0x2f')]=_[_0xdb5e('0x30')](_0x1ccf14['model'],qs[_0xdb5e('0x44')](_0x55a133[_0xdb5e('0x2c')][_0xdb5e('0x44')]));_0x654ecc[_0xdb5e('0x2f')]=_0x654ecc[_0xdb5e('0x2f')][_0xdb5e('0x31')]?_0x654ecc[_0xdb5e('0x2f')]:_0x1ccf14[_0xdb5e('0x2b')];_0x654ecc['order']=qs[_0xdb5e('0x35')](_0x55a133[_0xdb5e('0x2c')][_0xdb5e('0x35')]);_0x654ecc[_0xdb5e('0x38')]=qs[_0xdb5e('0x2e')](_['pick'](_0x55a133[_0xdb5e('0x2c')],_0x1ccf14['filters']));if(_0x55a133[_0xdb5e('0x2c')][_0xdb5e('0x37')]){_0x654ecc[_0xdb5e('0x38')]=_['merge'](_0x654ecc['where'],{'$or':_[_0xdb5e('0x28')](_0x654ecc[_0xdb5e('0x2f')],function(_0x1cb68a){var _0x2beeca={};_0x2beeca[_0x1cb68a]={'$like':'%'+_0x55a133[_0xdb5e('0x2c')][_0xdb5e('0x37')]+'%'};return _0x2beeca;})});}_0x654ecc=_[_0xdb5e('0x3b')]({},_0x654ecc,_0x55a133[_0xdb5e('0x3c')]);return _0x32648b[_0xdb5e('0x4c')](_0x654ecc);}})[_0xdb5e('0x21')](function(_0x16d69c){if(_0x16d69c){_0x2fd646=_0x16d69c['length'];if(!_0x55a133['query'][_0xdb5e('0x32')](_0xdb5e('0x33'))){_0x654ecc['limit']=qs[_0xdb5e('0x19')](_0x55a133[_0xdb5e('0x2c')][_0xdb5e('0x19')]);_0x654ecc['offset']=qs[_0xdb5e('0x18')](_0x55a133[_0xdb5e('0x2c')][_0xdb5e('0x18')]);}return _0x32648b[_0xdb5e('0x4c')](_0x654ecc);}})['then'](function(_0x5dabd5){if(_0x5dabd5){return _0x5dabd5?{'count':_0x2fd646,'rows':_0x5dabd5}:null;}})[_0xdb5e('0x21')](respondWithResult(_0x1511c6,null))[_0xdb5e('0x45')](handleError(_0x1511c6,null));};
\ No newline at end of file
index 3431fae..1a714ae 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd900=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intVtigerConfiguration.attributes','int_vtiger_configurations','lodash','../../config/logger'];(function(_0x4e676e,_0x2a7c6d){var _0x336a3c=function(_0x4767c4){while(--_0x4767c4){_0x4e676e['push'](_0x4e676e['shift']());}};_0x336a3c(++_0x2a7c6d);}(_0xd900,0x11c));var _0x0d90=function(_0x1c9721,_0x3f83a4){_0x1c9721=_0x1c9721-0x0;var _0x5b1a4c=_0xd900[_0x1c9721];return _0x5b1a4c;};'use strict';var _=require(_0x0d90('0x0'));var util=require('util');var logger=require(_0x0d90('0x1'))(_0x0d90('0x2'));var moment=require(_0x0d90('0x3'));var BPromise=require(_0x0d90('0x4'));var rp=require(_0x0d90('0x5'));var fs=require('fs');var path=require(_0x0d90('0x6'));var rimraf=require(_0x0d90('0x7'));var config=require(_0x0d90('0x8'));var attributes=require(_0x0d90('0x9'));module['exports']=function(_0x4cdbda,_0x52216b){return _0x4cdbda['define']('VtigerConfiguration',attributes,{'tableName':_0x0d90('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x7a9b=['../../config/environment','./intVtigerConfiguration.attributes','exports','define','lodash','util','../../config/logger','api','bluebird','request-promise','path'];(function(_0x3e8fe3,_0x1277a0){var _0x73e1ab=function(_0x14cc5d){while(--_0x14cc5d){_0x3e8fe3['push'](_0x3e8fe3['shift']());}};_0x73e1ab(++_0x1277a0);}(_0x7a9b,0xf6));var _0xb7a9=function(_0x249f71,_0x2a0cde){_0x249f71=_0x249f71-0x0;var _0x38dbaa=_0x7a9b[_0x249f71];return _0x38dbaa;};'use strict';var _=require(_0xb7a9('0x0'));var util=require(_0xb7a9('0x1'));var logger=require(_0xb7a9('0x2'))(_0xb7a9('0x3'));var moment=require('moment');var BPromise=require(_0xb7a9('0x4'));var rp=require(_0xb7a9('0x5'));var fs=require('fs');var path=require(_0xb7a9('0x6'));var rimraf=require('rimraf');var config=require(_0xb7a9('0x7'));var attributes=require(_0xb7a9('0x8'));module[_0xb7a9('0x9')]=function(_0x190af7,_0x43b8f1){return _0x190af7[_0xb7a9('0xa')]('VtigerConfiguration',attributes,{'tableName':'int_vtiger_configurations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 6ac7911..5760547 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9ea1=['then','info','VtigerConfiguration,\x20%s,\x20%s','debug','VtigerConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','lodash','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x9ea1,0x74));var _0x19ea=function(_0x3fad61,_0x14910e){_0x3fad61=_0x3fad61-0x0;var _0x4f4d5e=_0x9ea1[_0x3fad61];return _0x4f4d5e;};'use strict';var _=require(_0x19ea('0x0'));var util=require('util');var moment=require(_0x19ea('0x1'));var BPromise=require('bluebird');var rs=require(_0x19ea('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x19ea('0x3'))['db'];var utils=require(_0x19ea('0x4'));var logger=require(_0x19ea('0x5'))(_0x19ea('0x6'));var config=require('../../config/environment');var jayson=require(_0x19ea('0x7'));var client=jayson[_0x19ea('0x8')][_0x19ea('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xce00f4,_0x3f7ea6,_0x6f6398){return new BPromise(function(_0x402319,_0x1eca6f){return client['request'](_0xce00f4,_0x6f6398)[_0x19ea('0xa')](function(_0xe25178){logger[_0x19ea('0xb')](_0x19ea('0xc'),_0x3f7ea6,'request\x20sent');logger[_0x19ea('0xd')](_0x19ea('0xe'),_0x3f7ea6,_0x19ea('0xf'),JSON[_0x19ea('0x10')](_0xe25178));if(_0xe25178[_0x19ea('0x11')]){if(_0xe25178[_0x19ea('0x11')][_0x19ea('0x12')]===0x1f4){logger[_0x19ea('0x11')](_0x19ea('0xc'),_0x3f7ea6,_0xe25178[_0x19ea('0x11')][_0x19ea('0x13')]);return _0x1eca6f(_0xe25178[_0x19ea('0x11')][_0x19ea('0x13')]);}logger[_0x19ea('0x11')](_0x19ea('0xc'),_0x3f7ea6,_0xe25178[_0x19ea('0x11')]['message']);return _0x402319(_0xe25178[_0x19ea('0x11')][_0x19ea('0x13')]);}else{logger['info']('VtigerConfiguration,\x20%s,\x20%s',_0x3f7ea6,_0x19ea('0xf'));_0x402319(_0xe25178['result'][_0x19ea('0x13')]);}})[_0x19ea('0x14')](function(_0x356fdf){logger[_0x19ea('0x11')](_0x19ea('0xc'),_0x3f7ea6,_0x356fdf);_0x1eca6f(_0x356fdf);});});}
\ No newline at end of file
+var _0x8f24=['error','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/environment','jayson/promise','client','http','request','then','info','VtigerConfiguration,\x20%s,\x20%s','VtigerConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify'];(function(_0x5aa373,_0x54c7f4){var _0x590e8e=function(_0x505e62){while(--_0x505e62){_0x5aa373['push'](_0x5aa373['shift']());}};_0x590e8e(++_0x54c7f4);}(_0x8f24,0x82));var _0x48f2=function(_0x22fd75,_0x26b4bb){_0x22fd75=_0x22fd75-0x0;var _0x1cfc12=_0x8f24[_0x22fd75];return _0x1cfc12;};'use strict';var _=require(_0x48f2('0x0'));var util=require(_0x48f2('0x1'));var moment=require('moment');var BPromise=require(_0x48f2('0x2'));var rs=require(_0x48f2('0x3'));var fs=require('fs');var Redis=require(_0x48f2('0x4'));var db=require(_0x48f2('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x48f2('0x6'));var jayson=require(_0x48f2('0x7'));var client=jayson[_0x48f2('0x8')][_0x48f2('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x59645c,_0x59f174,_0x45c07a){return new BPromise(function(_0x3ba199,_0x516349){return client[_0x48f2('0xa')](_0x59645c,_0x45c07a)[_0x48f2('0xb')](function(_0x3c3e9c){logger[_0x48f2('0xc')](_0x48f2('0xd'),_0x59f174,'request\x20sent');logger['debug'](_0x48f2('0xe'),_0x59f174,_0x48f2('0xf'),JSON[_0x48f2('0x10')](_0x3c3e9c));if(_0x3c3e9c['error']){if(_0x3c3e9c['error']['code']===0x1f4){logger[_0x48f2('0x11')]('VtigerConfiguration,\x20%s,\x20%s',_0x59f174,_0x3c3e9c[_0x48f2('0x11')]['message']);return _0x516349(_0x3c3e9c[_0x48f2('0x11')]['message']);}logger[_0x48f2('0x11')](_0x48f2('0xd'),_0x59f174,_0x3c3e9c[_0x48f2('0x11')][_0x48f2('0x12')]);return _0x3ba199(_0x3c3e9c[_0x48f2('0x11')]['message']);}else{logger['info'](_0x48f2('0xd'),_0x59f174,_0x48f2('0xf'));_0x3ba199(_0x3c3e9c[_0x48f2('0x13')][_0x48f2('0x12')]);}})[_0x48f2('0x14')](function(_0x1858a0){logger[_0x48f2('0x11')](_0x48f2('0xd'),_0x59f174,_0x1858a0);_0x516349(_0x1858a0);});});}
\ No newline at end of file
index b75fb07..07ef193 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x39ce=['exports','util','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','index','get','/:id','isAuthenticated','show','post','create','put','delete','destroy'];(function(_0xe23c8d,_0x498b6c){var _0x45280d=function(_0x4890a5){while(--_0x4890a5){_0xe23c8d['push'](_0xe23c8d['shift']());}};_0x45280d(++_0x498b6c);}(_0x39ce,0x91));var _0xe39c=function(_0x3bfee9,_0x5adf05){_0x3bfee9=_0x3bfee9-0x0;var _0x307824=_0x39ce[_0x3bfee9];return _0x307824;};'use strict';var multer=require('multer');var util=require(_0xe39c('0x0'));var path=require('path');var timeout=require(_0xe39c('0x1'));var express=require('express');var router=express[_0xe39c('0x2')]();var fs_extra=require(_0xe39c('0x3'));var auth=require(_0xe39c('0x4'));var interaction=require(_0xe39c('0x5'));var config=require(_0xe39c('0x6'));var controller=require('./intVtigerField.controller');router['get']('/',auth['isAuthenticated'](),controller[_0xe39c('0x7')]);router[_0xe39c('0x8')](_0xe39c('0x9'),auth[_0xe39c('0xa')](),controller[_0xe39c('0xb')]);router[_0xe39c('0xc')]('/',auth[_0xe39c('0xa')](),controller[_0xe39c('0xd')]);router[_0xe39c('0xe')](_0xe39c('0x9'),auth[_0xe39c('0xa')](),controller['update']);router[_0xe39c('0xf')](_0xe39c('0x9'),auth['isAuthenticated'](),controller[_0xe39c('0x10')]);module[_0xe39c('0x11')]=router;
\ No newline at end of file
+var _0x3cc0=['../../components/auth/service','./intVtigerField.controller','get','isAuthenticated','index','/:id','show','create','update','destroy','exports','util','path','connect-timeout','Router','fs-extra'];(function(_0x4384e8,_0x38d6c4){var _0x5b82bf=function(_0x223873){while(--_0x223873){_0x4384e8['push'](_0x4384e8['shift']());}};_0x5b82bf(++_0x38d6c4);}(_0x3cc0,0x13b));var _0x03cc=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x3cc0[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require(_0x03cc('0x0'));var path=require(_0x03cc('0x1'));var timeout=require(_0x03cc('0x2'));var express=require('express');var router=express[_0x03cc('0x3')]();var fs_extra=require(_0x03cc('0x4'));var auth=require(_0x03cc('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x03cc('0x6'));router[_0x03cc('0x7')]('/',auth[_0x03cc('0x8')](),controller[_0x03cc('0x9')]);router[_0x03cc('0x7')](_0x03cc('0xa'),auth[_0x03cc('0x8')](),controller[_0x03cc('0xb')]);router['post']('/',auth[_0x03cc('0x8')](),controller[_0x03cc('0xc')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0x03cc('0xd')]);router['delete'](_0x03cc('0xa'),auth[_0x03cc('0x8')](),controller[_0x03cc('0xe')]);module[_0x03cc('0xf')]=router;
\ No newline at end of file
index 2c3eb02..1400827 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5a6a=['BOOLEAN','sequelize','exports','string','variable','keyValue','picklist','STRING','ENUM','customVariable'];(function(_0x3ab51d,_0x2fa01d){var _0x29a04e=function(_0x7807b0){while(--_0x7807b0){_0x3ab51d['push'](_0x3ab51d['shift']());}};_0x29a04e(++_0x2fa01d);}(_0x5a6a,0x1cd));var _0xa5a6=function(_0x452246,_0x41cb41){_0x452246=_0x452246-0x0;var _0x1e32fc=_0x5a6a[_0x452246];return _0x1e32fc;};'use strict';var Sequelize=require(_0xa5a6('0x0'));module[_0xa5a6('0x1')]={'type':{'type':Sequelize['ENUM'](_0xa5a6('0x2'),_0xa5a6('0x3'),'customVariable',_0xa5a6('0x4'),_0xa5a6('0x5')),'defaultValue':_0xa5a6('0x2')},'content':{'type':Sequelize[_0xa5a6('0x6')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0xa5a6('0x7')]('string',_0xa5a6('0x3'),_0xa5a6('0x8'))},'keyContent':{'type':Sequelize[_0xa5a6('0x6')]},'idField':{'type':Sequelize[_0xa5a6('0x6')]},'nameField':{'type':Sequelize[_0xa5a6('0x6')]},'customField':{'type':Sequelize[_0xa5a6('0x9')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xa5a6('0x6')]}};
\ No newline at end of file
+var _0x0205=['ENUM','customVariable','keyValue','picklist','string','variable','STRING','BOOLEAN','sequelize','exports'];(function(_0x16dd98,_0x11d346){var _0xfc7fb3=function(_0x40d7d8){while(--_0x40d7d8){_0x16dd98['push'](_0x16dd98['shift']());}};_0xfc7fb3(++_0x11d346);}(_0x0205,0xd0));var _0x5020=function(_0x1723c5,_0x5baaa4){_0x1723c5=_0x1723c5-0x0;var _0x475953=_0x0205[_0x1723c5];return _0x475953;};'use strict';var Sequelize=require(_0x5020('0x0'));module[_0x5020('0x1')]={'type':{'type':Sequelize[_0x5020('0x2')]('string','variable',_0x5020('0x3'),_0x5020('0x4'),_0x5020('0x5')),'defaultValue':'string'},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0x5020('0x2')](_0x5020('0x6'),_0x5020('0x7'),_0x5020('0x3'))},'keyContent':{'type':Sequelize[_0x5020('0x8')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0x5020('0x8')]},'customField':{'type':Sequelize[_0x5020('0x9')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x5020('0x8')]}};
\ No newline at end of file
index fc59df2..f080da5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x808a=['model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','options','includeAll','include','findAll','catch','show','params','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','util','path','sox','to-csv','fs-extra','lodash','squel','desk.js','papaparse','../../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','apply','reject','update','destroy','then','error','name','send','map','VtigerField','rawAttributes','fieldName','type','key'];(function(_0x1621e4,_0x488e78){var _0x22dcb8=function(_0x36186e){while(--_0x36186e){_0x1621e4['push'](_0x1621e4['shift']());}};_0x22dcb8(++_0x488e78);}(_0x808a,0x1b7));var _0xa808=function(_0x282a1f,_0x49a6ef){_0x282a1f=_0x282a1f-0x0;var _0x296ea7=_0x808a[_0x282a1f];return _0x296ea7;};'use strict';var emlformat=require(_0xa808('0x0'));var rimraf=require(_0xa808('0x1'));var zipdir=require(_0xa808('0x2'));var jsonpatch=require(_0xa808('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xa808('0x4'));var path=require(_0xa808('0x5'));var sox=require(_0xa808('0x6'));var csv=require(_0xa808('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xa808('0x8'));var _=require(_0xa808('0x9'));var squel=require(_0xa808('0xa'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xa808('0xb'));var toCsv=require(_0xa808('0x7'));var querystring=require('querystring');var Papa=require(_0xa808('0xc'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xa808('0xd'));var as=require(_0xa808('0xe'));var hardwareService=require(_0xa808('0xf'));var logger=require(_0xa808('0x10'))(_0xa808('0x11'));var utils=require(_0xa808('0x12'));var config=require(_0xa808('0x13'));var licenseUtil=require(_0xa808('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5ecd86,_0x11c471){_0x11c471=_0x11c471||0xcc;return function(_0x3714fe){if(_0x3714fe){return _0x5ecd86[_0xa808('0x15')](_0x11c471);}return _0x5ecd86[_0xa808('0x16')](_0x11c471)[_0xa808('0x17')]();};}function respondWithResult(_0x58e6ab,_0x1675ee){_0x1675ee=_0x1675ee||0xc8;return function(_0xa530bb){if(_0xa530bb){return _0x58e6ab['status'](_0x1675ee)[_0xa808('0x18')](_0xa530bb);}};}function respondWithFilteredResult(_0x1b5d4c,_0x25851a){return function(_0x5ca5ba){if(_0x5ca5ba){var _0x31c948=typeof _0x25851a[_0xa808('0x19')]===_0xa808('0x1a')&&typeof _0x25851a[_0xa808('0x1b')]===_0xa808('0x1a');var _0x5aa34b=_0x5ca5ba[_0xa808('0x1c')];var _0x3b1d57=_0x31c948?0x0:_0x25851a[_0xa808('0x19')];var _0x5d4475=_0x31c948?_0x5ca5ba[_0xa808('0x1c')]:_0x25851a[_0xa808('0x19')]+_0x25851a[_0xa808('0x1b')];var _0x575bba;if(_0x5d4475>=_0x5aa34b){_0x5d4475=_0x5aa34b;_0x575bba=0xc8;}else{_0x575bba=0xce;}_0x1b5d4c[_0xa808('0x16')](_0x575bba);return _0x1b5d4c[_0xa808('0x1d')]('Content-Range',_0x3b1d57+'-'+_0x5d4475+'/'+_0x5aa34b)[_0xa808('0x18')](_0x5ca5ba);}return null;};}function patchUpdates(_0x27d505){return function(_0x507e52){try{jsonpatch[_0xa808('0x1e')](_0x507e52,_0x27d505,!![]);}catch(_0x5dcbdc){return BPromise[_0xa808('0x1f')](_0x5dcbdc);}return _0x507e52['save']();};}function saveUpdates(_0xcc3ad2,_0x52e819){return function(_0x39c313){if(_0x39c313){return _0x39c313[_0xa808('0x20')](_0xcc3ad2)['then'](function(_0x47167f){return _0x47167f;});}return null;};}function removeEntity(_0x599ca6,_0x56241e){return function(_0x461775){if(_0x461775){return _0x461775[_0xa808('0x21')]()[_0xa808('0x22')](function(){_0x599ca6['status'](0xcc)[_0xa808('0x17')]();});}};}function handleEntityNotFound(_0xdae3b2,_0x283e34){return function(_0x2b4ac4){if(!_0x2b4ac4){_0xdae3b2['sendStatus'](0x194);}return _0x2b4ac4;};}function handleError(_0x287287,_0x39cecb){_0x39cecb=_0x39cecb||0x1f4;return function(_0x5a9c5b){logger[_0xa808('0x23')](_0x5a9c5b['stack']);if(_0x5a9c5b[_0xa808('0x24')]){delete _0x5a9c5b[_0xa808('0x24')];}_0x287287[_0xa808('0x16')](_0x39cecb)[_0xa808('0x25')](_0x5a9c5b);};}exports['index']=function(_0x1f7acf,_0x2ab0cd){var _0x5804ed={},_0xf2a524={},_0x5910da={'count':0x0,'rows':[]};var _0x188e68=_[_0xa808('0x26')](db[_0xa808('0x27')][_0xa808('0x28')],function(_0x411692){return{'name':_0x411692[_0xa808('0x29')],'type':_0x411692[_0xa808('0x2a')][_0xa808('0x2b')]};});_0xf2a524[_0xa808('0x2c')]=_[_0xa808('0x26')](_0x188e68,_0xa808('0x24'));_0xf2a524[_0xa808('0x2d')]=_[_0xa808('0x2e')](_0x1f7acf[_0xa808('0x2d')]);_0xf2a524[_0xa808('0x2f')]=_[_0xa808('0x30')](_0xf2a524[_0xa808('0x2c')],_0xf2a524['query']);_0x5804ed[_0xa808('0x31')]=_[_0xa808('0x30')](_0xf2a524[_0xa808('0x2c')],qs['fields'](_0x1f7acf['query'][_0xa808('0x32')]));_0x5804ed[_0xa808('0x31')]=_0x5804ed[_0xa808('0x31')][_0xa808('0x33')]?_0x5804ed[_0xa808('0x31')]:_0xf2a524[_0xa808('0x2c')];if(!_0x1f7acf[_0xa808('0x2d')][_0xa808('0x34')](_0xa808('0x35'))){_0x5804ed[_0xa808('0x1b')]=qs[_0xa808('0x1b')](_0x1f7acf[_0xa808('0x2d')][_0xa808('0x1b')]);_0x5804ed['offset']=qs[_0xa808('0x19')](_0x1f7acf[_0xa808('0x2d')][_0xa808('0x19')]);}_0x5804ed[_0xa808('0x36')]=qs[_0xa808('0x37')](_0x1f7acf[_0xa808('0x2d')][_0xa808('0x37')]);_0x5804ed[_0xa808('0x38')]=qs['filters'](_['pick'](_0x1f7acf[_0xa808('0x2d')],_0xf2a524[_0xa808('0x2f')]),_0x188e68);if(_0x1f7acf['query'][_0xa808('0x39')]){_0x5804ed[_0xa808('0x38')]=_[_0xa808('0x3a')](_0x5804ed[_0xa808('0x38')],{'$or':_[_0xa808('0x26')](_0x188e68,function(_0x5cdebc){if(_0x5cdebc[_0xa808('0x2a')]!=='VIRTUAL'){var _0x1ece37={};_0x1ece37[_0x5cdebc[_0xa808('0x24')]]={'$like':'%'+_0x1f7acf[_0xa808('0x2d')][_0xa808('0x39')]+'%'};return _0x1ece37;}})});}_0x5804ed=_[_0xa808('0x3a')]({},_0x5804ed,_0x1f7acf[_0xa808('0x3b')]);var _0x3a6126={'where':_0x5804ed[_0xa808('0x38')]};return db[_0xa808('0x27')][_0xa808('0x1c')](_0x3a6126)[_0xa808('0x22')](function(_0x5d15f2){_0x5910da['count']=_0x5d15f2;if(_0x1f7acf[_0xa808('0x2d')][_0xa808('0x3c')]){_0x5804ed[_0xa808('0x3d')]=[{'all':!![]}];}return db[_0xa808('0x27')][_0xa808('0x3e')](_0x5804ed);})[_0xa808('0x22')](function(_0x56c595){_0x5910da['rows']=_0x56c595;return _0x5910da;})[_0xa808('0x22')](respondWithFilteredResult(_0x2ab0cd,_0x5804ed))[_0xa808('0x3f')](handleError(_0x2ab0cd,null));};exports[_0xa808('0x40')]=function(_0x2dffff,_0x57f609){var _0x1c0608={'raw':!![],'where':{'id':_0x2dffff[_0xa808('0x41')]['id']}},_0x1a8ec5={};_0x1a8ec5['model']=_[_0xa808('0x2e')](db['VtigerField'][_0xa808('0x28')]);_0x1a8ec5[_0xa808('0x2d')]=_[_0xa808('0x2e')](_0x2dffff[_0xa808('0x2d')]);_0x1a8ec5[_0xa808('0x2f')]=_[_0xa808('0x30')](_0x1a8ec5[_0xa808('0x2c')],_0x1a8ec5[_0xa808('0x2d')]);_0x1c0608['attributes']=_[_0xa808('0x30')](_0x1a8ec5['model'],qs[_0xa808('0x32')](_0x2dffff[_0xa808('0x2d')][_0xa808('0x32')]));_0x1c0608[_0xa808('0x31')]=_0x1c0608[_0xa808('0x31')][_0xa808('0x33')]?_0x1c0608[_0xa808('0x31')]:_0x1a8ec5['model'];if(_0x2dffff[_0xa808('0x2d')][_0xa808('0x3c')]){_0x1c0608[_0xa808('0x3d')]=[{'all':!![]}];}_0x1c0608=_[_0xa808('0x3a')]({},_0x1c0608,_0x2dffff[_0xa808('0x3b')]);return db[_0xa808('0x27')][_0xa808('0x42')](_0x1c0608)[_0xa808('0x22')](handleEntityNotFound(_0x57f609,null))[_0xa808('0x22')](respondWithResult(_0x57f609,null))[_0xa808('0x3f')](handleError(_0x57f609,null));};exports[_0xa808('0x43')]=function(_0x2e0ef6,_0x47fcdf){return db['VtigerField'][_0xa808('0x43')](_0x2e0ef6[_0xa808('0x44')],{})[_0xa808('0x22')](respondWithResult(_0x47fcdf,0xc9))[_0xa808('0x3f')](handleError(_0x47fcdf,null));};exports[_0xa808('0x20')]=function(_0x30ba7d,_0x4fc714){if(_0x30ba7d[_0xa808('0x44')]['id']){delete _0x30ba7d[_0xa808('0x44')]['id'];}return db[_0xa808('0x27')][_0xa808('0x42')]({'where':{'id':_0x30ba7d[_0xa808('0x41')]['id']}})[_0xa808('0x22')](handleEntityNotFound(_0x4fc714,null))[_0xa808('0x22')](saveUpdates(_0x30ba7d[_0xa808('0x44')],null))[_0xa808('0x22')](respondWithResult(_0x4fc714,null))[_0xa808('0x3f')](handleError(_0x4fc714,null));};exports[_0xa808('0x21')]=function(_0x1df7c4,_0x55e717){return db[_0xa808('0x27')][_0xa808('0x42')]({'where':{'id':_0x1df7c4[_0xa808('0x41')]['id']}})[_0xa808('0x22')](handleEntityNotFound(_0x55e717,null))['then'](removeEntity(_0x55e717,null))['catch'](handleError(_0x55e717,null));};
\ No newline at end of file
+var _0x0ebb=['merge','VIRTUAL','includeAll','include','findAll','catch','show','params','rawAttributes','options','find','create','body','eml-format','rimraf','zip-dir','moment','bluebird','util','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','save','update','then','destroy','error','stack','name','send','index','map','VtigerField','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where'];(function(_0x18f283,_0x540391){var _0x8acaa0=function(_0x20e539){while(--_0x20e539){_0x18f283['push'](_0x18f283['shift']());}};_0x8acaa0(++_0x540391);}(_0x0ebb,0xa5));var _0xb0eb=function(_0x2cc28e,_0x2138ce){_0x2cc28e=_0x2cc28e-0x0;var _0x4e3fb3=_0x0ebb[_0x2cc28e];return _0x4e3fb3;};'use strict';var emlformat=require(_0xb0eb('0x0'));var rimraf=require(_0xb0eb('0x1'));var zipdir=require(_0xb0eb('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xb0eb('0x3'));var BPromise=require(_0xb0eb('0x4'));var Mustache=require('mustache');var util=require(_0xb0eb('0x5'));var path=require('path');var sox=require(_0xb0eb('0x6'));var csv=require(_0xb0eb('0x7'));var ejs=require(_0xb0eb('0x8'));var fs=require('fs');var fs_extra=require(_0xb0eb('0x9'));var _=require('lodash');var squel=require(_0xb0eb('0xa'));var crypto=require(_0xb0eb('0xb'));var jsforce=require(_0xb0eb('0xc'));var deskjs=require(_0xb0eb('0xd'));var toCsv=require('to-csv');var querystring=require(_0xb0eb('0xe'));var Papa=require('papaparse');var Redis=require(_0xb0eb('0xf'));var authService=require('../../components/auth/service');var qs=require(_0xb0eb('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xb0eb('0x11'));var logger=require(_0xb0eb('0x12'))(_0xb0eb('0x13'));var utils=require(_0xb0eb('0x14'));var config=require(_0xb0eb('0x15'));var licenseUtil=require(_0xb0eb('0x16'));var db=require(_0xb0eb('0x17'))['db'];function respondWithStatusCode(_0x19a045,_0x7d62af){_0x7d62af=_0x7d62af||0xcc;return function(_0x288ac2){if(_0x288ac2){return _0x19a045[_0xb0eb('0x18')](_0x7d62af);}return _0x19a045[_0xb0eb('0x19')](_0x7d62af)['end']();};}function respondWithResult(_0x526085,_0x60bc73){_0x60bc73=_0x60bc73||0xc8;return function(_0x5880e9){if(_0x5880e9){return _0x526085[_0xb0eb('0x19')](_0x60bc73)[_0xb0eb('0x1a')](_0x5880e9);}};}function respondWithFilteredResult(_0x3d14ed,_0x18fb13){return function(_0x42383d){if(_0x42383d){var _0x1c7e62=typeof _0x18fb13[_0xb0eb('0x1b')]===_0xb0eb('0x1c')&&typeof _0x18fb13[_0xb0eb('0x1d')]===_0xb0eb('0x1c');var _0x4259f7=_0x42383d[_0xb0eb('0x1e')];var _0x41e001=_0x1c7e62?0x0:_0x18fb13[_0xb0eb('0x1b')];var _0x3d3e73=_0x1c7e62?_0x42383d[_0xb0eb('0x1e')]:_0x18fb13[_0xb0eb('0x1b')]+_0x18fb13[_0xb0eb('0x1d')];var _0x420a8d;if(_0x3d3e73>=_0x4259f7){_0x3d3e73=_0x4259f7;_0x420a8d=0xc8;}else{_0x420a8d=0xce;}_0x3d14ed[_0xb0eb('0x19')](_0x420a8d);return _0x3d14ed[_0xb0eb('0x1f')](_0xb0eb('0x20'),_0x41e001+'-'+_0x3d3e73+'/'+_0x4259f7)['json'](_0x42383d);}return null;};}function patchUpdates(_0x5e5bcb){return function(_0x646cf){try{jsonpatch[_0xb0eb('0x21')](_0x646cf,_0x5e5bcb,!![]);}catch(_0x434652){return BPromise['reject'](_0x434652);}return _0x646cf[_0xb0eb('0x22')]();};}function saveUpdates(_0x54f3b4,_0x490d2d){return function(_0x91842){if(_0x91842){return _0x91842[_0xb0eb('0x23')](_0x54f3b4)[_0xb0eb('0x24')](function(_0x8fcab7){return _0x8fcab7;});}return null;};}function removeEntity(_0x5dd596,_0x4211b8){return function(_0x4b1069){if(_0x4b1069){return _0x4b1069[_0xb0eb('0x25')]()[_0xb0eb('0x24')](function(){_0x5dd596[_0xb0eb('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x18cc5d,_0x3fc7d0){return function(_0x49d986){if(!_0x49d986){_0x18cc5d[_0xb0eb('0x18')](0x194);}return _0x49d986;};}function handleError(_0x6dc645,_0x4e2de5){_0x4e2de5=_0x4e2de5||0x1f4;return function(_0x3af8e8){logger[_0xb0eb('0x26')](_0x3af8e8[_0xb0eb('0x27')]);if(_0x3af8e8[_0xb0eb('0x28')]){delete _0x3af8e8['name'];}_0x6dc645[_0xb0eb('0x19')](_0x4e2de5)[_0xb0eb('0x29')](_0x3af8e8);};}exports[_0xb0eb('0x2a')]=function(_0x3e6f2b,_0x1cc9e5){var _0x1420a9={},_0x3fd9c3={},_0x4d9dae={'count':0x0,'rows':[]};var _0x305cca=_[_0xb0eb('0x2b')](db[_0xb0eb('0x2c')]['rawAttributes'],function(_0x12a2f4){return{'name':_0x12a2f4[_0xb0eb('0x2d')],'type':_0x12a2f4[_0xb0eb('0x2e')][_0xb0eb('0x2f')]};});_0x3fd9c3[_0xb0eb('0x30')]=_['map'](_0x305cca,_0xb0eb('0x28'));_0x3fd9c3[_0xb0eb('0x31')]=_[_0xb0eb('0x32')](_0x3e6f2b[_0xb0eb('0x31')]);_0x3fd9c3[_0xb0eb('0x33')]=_[_0xb0eb('0x34')](_0x3fd9c3[_0xb0eb('0x30')],_0x3fd9c3[_0xb0eb('0x31')]);_0x1420a9[_0xb0eb('0x35')]=_[_0xb0eb('0x34')](_0x3fd9c3[_0xb0eb('0x30')],qs['fields'](_0x3e6f2b[_0xb0eb('0x31')][_0xb0eb('0x36')]));_0x1420a9[_0xb0eb('0x35')]=_0x1420a9[_0xb0eb('0x35')][_0xb0eb('0x37')]?_0x1420a9[_0xb0eb('0x35')]:_0x3fd9c3[_0xb0eb('0x30')];if(!_0x3e6f2b[_0xb0eb('0x31')][_0xb0eb('0x38')](_0xb0eb('0x39'))){_0x1420a9[_0xb0eb('0x1d')]=qs[_0xb0eb('0x1d')](_0x3e6f2b[_0xb0eb('0x31')]['limit']);_0x1420a9[_0xb0eb('0x1b')]=qs[_0xb0eb('0x1b')](_0x3e6f2b['query'][_0xb0eb('0x1b')]);}_0x1420a9[_0xb0eb('0x3a')]=qs[_0xb0eb('0x3b')](_0x3e6f2b[_0xb0eb('0x31')][_0xb0eb('0x3b')]);_0x1420a9['where']=qs[_0xb0eb('0x33')](_[_0xb0eb('0x3c')](_0x3e6f2b['query'],_0x3fd9c3[_0xb0eb('0x33')]),_0x305cca);if(_0x3e6f2b[_0xb0eb('0x31')][_0xb0eb('0x3d')]){_0x1420a9[_0xb0eb('0x3e')]=_[_0xb0eb('0x3f')](_0x1420a9[_0xb0eb('0x3e')],{'$or':_['map'](_0x305cca,function(_0x59a6e2){if(_0x59a6e2[_0xb0eb('0x2e')]!==_0xb0eb('0x40')){var _0x44f88b={};_0x44f88b[_0x59a6e2[_0xb0eb('0x28')]]={'$like':'%'+_0x3e6f2b[_0xb0eb('0x31')]['filter']+'%'};return _0x44f88b;}})});}_0x1420a9=_[_0xb0eb('0x3f')]({},_0x1420a9,_0x3e6f2b['options']);var _0x29e023={'where':_0x1420a9['where']};return db[_0xb0eb('0x2c')][_0xb0eb('0x1e')](_0x29e023)['then'](function(_0x569a35){_0x4d9dae[_0xb0eb('0x1e')]=_0x569a35;if(_0x3e6f2b[_0xb0eb('0x31')][_0xb0eb('0x41')]){_0x1420a9[_0xb0eb('0x42')]=[{'all':!![]}];}return db['VtigerField'][_0xb0eb('0x43')](_0x1420a9);})[_0xb0eb('0x24')](function(_0x1b509a){_0x4d9dae['rows']=_0x1b509a;return _0x4d9dae;})[_0xb0eb('0x24')](respondWithFilteredResult(_0x1cc9e5,_0x1420a9))[_0xb0eb('0x44')](handleError(_0x1cc9e5,null));};exports[_0xb0eb('0x45')]=function(_0x21072c,_0x45a58a){var _0xec6f7={'raw':!![],'where':{'id':_0x21072c[_0xb0eb('0x46')]['id']}},_0x4e468d={};_0x4e468d[_0xb0eb('0x30')]=_[_0xb0eb('0x32')](db[_0xb0eb('0x2c')][_0xb0eb('0x47')]);_0x4e468d[_0xb0eb('0x31')]=_[_0xb0eb('0x32')](_0x21072c[_0xb0eb('0x31')]);_0x4e468d['filters']=_[_0xb0eb('0x34')](_0x4e468d[_0xb0eb('0x30')],_0x4e468d[_0xb0eb('0x31')]);_0xec6f7[_0xb0eb('0x35')]=_[_0xb0eb('0x34')](_0x4e468d[_0xb0eb('0x30')],qs[_0xb0eb('0x36')](_0x21072c[_0xb0eb('0x31')][_0xb0eb('0x36')]));_0xec6f7[_0xb0eb('0x35')]=_0xec6f7[_0xb0eb('0x35')][_0xb0eb('0x37')]?_0xec6f7[_0xb0eb('0x35')]:_0x4e468d[_0xb0eb('0x30')];if(_0x21072c[_0xb0eb('0x31')]['includeAll']){_0xec6f7['include']=[{'all':!![]}];}_0xec6f7=_[_0xb0eb('0x3f')]({},_0xec6f7,_0x21072c[_0xb0eb('0x48')]);return db[_0xb0eb('0x2c')][_0xb0eb('0x49')](_0xec6f7)[_0xb0eb('0x24')](handleEntityNotFound(_0x45a58a,null))[_0xb0eb('0x24')](respondWithResult(_0x45a58a,null))[_0xb0eb('0x44')](handleError(_0x45a58a,null));};exports[_0xb0eb('0x4a')]=function(_0x1a31be,_0x249553){return db[_0xb0eb('0x2c')]['create'](_0x1a31be[_0xb0eb('0x4b')],{})[_0xb0eb('0x24')](respondWithResult(_0x249553,0xc9))[_0xb0eb('0x44')](handleError(_0x249553,null));};exports['update']=function(_0x410863,_0x47c73d){if(_0x410863[_0xb0eb('0x4b')]['id']){delete _0x410863[_0xb0eb('0x4b')]['id'];}return db[_0xb0eb('0x2c')][_0xb0eb('0x49')]({'where':{'id':_0x410863[_0xb0eb('0x46')]['id']}})[_0xb0eb('0x24')](handleEntityNotFound(_0x47c73d,null))[_0xb0eb('0x24')](saveUpdates(_0x410863[_0xb0eb('0x4b')],null))[_0xb0eb('0x24')](respondWithResult(_0x47c73d,null))['catch'](handleError(_0x47c73d,null));};exports[_0xb0eb('0x25')]=function(_0x5bbfa5,_0x2e7895){return db[_0xb0eb('0x2c')]['find']({'where':{'id':_0x5bbfa5[_0xb0eb('0x46')]['id']}})['then'](handleEntityNotFound(_0x2e7895,null))[_0xb0eb('0x24')](removeEntity(_0x2e7895,null))['catch'](handleError(_0x2e7895,null));};
\ No newline at end of file
index 40ab730..87563bd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x44f5=['api','bluebird','request-promise','path','../../config/environment','./intVtigerField.attributes','exports','define','VtigerField','int_vtiger_fields','vtiger_unique_index','idField','FieldId','lodash','util','../../config/logger'];(function(_0x362a04,_0x3d71ae){var _0x17a8b0=function(_0x37e852){while(--_0x37e852){_0x362a04['push'](_0x362a04['shift']());}};_0x17a8b0(++_0x3d71ae);}(_0x44f5,0x8d));var _0x544f=function(_0x35da75,_0x12d382){_0x35da75=_0x35da75-0x0;var _0x3a4dc0=_0x44f5[_0x35da75];return _0x3a4dc0;};'use strict';var _=require(_0x544f('0x0'));var util=require(_0x544f('0x1'));var logger=require(_0x544f('0x2'))(_0x544f('0x3'));var moment=require('moment');var BPromise=require(_0x544f('0x4'));var rp=require(_0x544f('0x5'));var fs=require('fs');var path=require(_0x544f('0x6'));var rimraf=require('rimraf');var config=require(_0x544f('0x7'));var attributes=require(_0x544f('0x8'));module[_0x544f('0x9')]=function(_0x1bd602,_0x2bc352){return _0x1bd602[_0x544f('0xa')](_0x544f('0xb'),attributes,{'tableName':_0x544f('0xc'),'paranoid':![],'indexes':[{'name':_0x544f('0xd'),'fields':[_0x544f('0xe'),_0x544f('0xf')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xbaf3=['lodash','../../config/logger','api','path','../../config/environment','./intVtigerField.attributes','exports','define','VtigerField','vtiger_unique_index','idField','FieldId'];(function(_0x2faddb,_0xc18b78){var _0x273c05=function(_0x1a3785){while(--_0x1a3785){_0x2faddb['push'](_0x2faddb['shift']());}};_0x273c05(++_0xc18b78);}(_0xbaf3,0x84));var _0x3baf=function(_0x4de86b,_0x5eb642){_0x4de86b=_0x4de86b-0x0;var _0x306c57=_0xbaf3[_0x4de86b];return _0x306c57;};'use strict';var _=require(_0x3baf('0x0'));var util=require('util');var logger=require(_0x3baf('0x1'))(_0x3baf('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x3baf('0x3'));var rimraf=require('rimraf');var config=require(_0x3baf('0x4'));var attributes=require(_0x3baf('0x5'));module[_0x3baf('0x6')]=function(_0x3daa2f,_0x3865c9){return _0x3daa2f[_0x3baf('0x7')](_0x3baf('0x8'),attributes,{'tableName':'int_vtiger_fields','paranoid':![],'indexes':[{'name':_0x3baf('0x9'),'fields':[_0x3baf('0xa'),_0x3baf('0xb')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index d48cb45..22ab10c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf318=['debug','VtigerField,\x20%s,\x20%s,\x20%s','error','code','message','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','VtigerField,\x20%s,\x20%s','request\x20sent'];(function(_0x4d93c9,_0x4775ae){var _0x48536d=function(_0x4d1e28){while(--_0x4d1e28){_0x4d93c9['push'](_0x4d93c9['shift']());}};_0x48536d(++_0x4775ae);}(_0xf318,0x9f));var _0x8f31=function(_0x4338a9,_0x491a4a){_0x4338a9=_0x4338a9-0x0;var _0x1505fd=_0xf318[_0x4338a9];return _0x1505fd;};'use strict';var _=require(_0x8f31('0x0'));var util=require(_0x8f31('0x1'));var moment=require(_0x8f31('0x2'));var BPromise=require(_0x8f31('0x3'));var rs=require(_0x8f31('0x4'));var fs=require('fs');var Redis=require(_0x8f31('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x8f31('0x6'));var logger=require(_0x8f31('0x7'))(_0x8f31('0x8'));var config=require(_0x8f31('0x9'));var jayson=require(_0x8f31('0xa'));var client=jayson[_0x8f31('0xb')][_0x8f31('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x39aa07,_0x42b1b0,_0x16b30c){return new BPromise(function(_0x284619,_0x3f4bc4){return client[_0x8f31('0xd')](_0x39aa07,_0x16b30c)['then'](function(_0x2b06c1){logger[_0x8f31('0xe')](_0x8f31('0xf'),_0x42b1b0,_0x8f31('0x10'));logger[_0x8f31('0x11')](_0x8f31('0x12'),_0x42b1b0,_0x8f31('0x10'),JSON['stringify'](_0x2b06c1));if(_0x2b06c1['error']){if(_0x2b06c1[_0x8f31('0x13')][_0x8f31('0x14')]===0x1f4){logger['error']('VtigerField,\x20%s,\x20%s',_0x42b1b0,_0x2b06c1[_0x8f31('0x13')][_0x8f31('0x15')]);return _0x3f4bc4(_0x2b06c1[_0x8f31('0x13')]['message']);}logger[_0x8f31('0x13')]('VtigerField,\x20%s,\x20%s',_0x42b1b0,_0x2b06c1[_0x8f31('0x13')]['message']);return _0x284619(_0x2b06c1[_0x8f31('0x13')][_0x8f31('0x15')]);}else{logger[_0x8f31('0xe')](_0x8f31('0xf'),_0x42b1b0,_0x8f31('0x10'));_0x284619(_0x2b06c1['result'][_0x8f31('0x15')]);}})['catch'](function(_0x438c2b){logger[_0x8f31('0x13')](_0x8f31('0xf'),_0x42b1b0,_0x438c2b);_0x3f4bc4(_0x438c2b);});});}
\ No newline at end of file
+var _0xa244=['info','VtigerField,\x20%s,\x20%s','request\x20sent','debug','VtigerField,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then'];(function(_0x38e9d7,_0x1d1f7b){var _0x6fdf49=function(_0x88b5fb){while(--_0x88b5fb){_0x38e9d7['push'](_0x38e9d7['shift']());}};_0x6fdf49(++_0x1d1f7b);}(_0xa244,0xd8));var _0x4a24=function(_0x3b9d8b,_0x42333b){_0x3b9d8b=_0x3b9d8b-0x0;var _0x566fe5=_0xa244[_0x3b9d8b];return _0x566fe5;};'use strict';var _=require(_0x4a24('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x4a24('0x1'));var rs=require(_0x4a24('0x2'));var fs=require('fs');var Redis=require(_0x4a24('0x3'));var db=require(_0x4a24('0x4'))['db'];var utils=require(_0x4a24('0x5'));var logger=require(_0x4a24('0x6'))(_0x4a24('0x7'));var config=require(_0x4a24('0x8'));var jayson=require(_0x4a24('0x9'));var client=jayson[_0x4a24('0xa')][_0x4a24('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x22b135,_0x1f5ac8,_0x59739e){return new BPromise(function(_0x4dfc00,_0xf2681){return client[_0x4a24('0xc')](_0x22b135,_0x59739e)[_0x4a24('0xd')](function(_0x2085f9){logger[_0x4a24('0xe')](_0x4a24('0xf'),_0x1f5ac8,_0x4a24('0x10'));logger[_0x4a24('0x11')](_0x4a24('0x12'),_0x1f5ac8,'request\x20sent',JSON[_0x4a24('0x13')](_0x2085f9));if(_0x2085f9[_0x4a24('0x14')]){if(_0x2085f9['error']['code']===0x1f4){logger[_0x4a24('0x14')](_0x4a24('0xf'),_0x1f5ac8,_0x2085f9['error']['message']);return _0xf2681(_0x2085f9['error']['message']);}logger[_0x4a24('0x14')](_0x4a24('0xf'),_0x1f5ac8,_0x2085f9['error']['message']);return _0x4dfc00(_0x2085f9[_0x4a24('0x14')][_0x4a24('0x15')]);}else{logger[_0x4a24('0xe')](_0x4a24('0xf'),_0x1f5ac8,_0x4a24('0x10'));_0x4dfc00(_0x2085f9['result']['message']);}})[_0x4a24('0x16')](function(_0x3d680f){logger[_0x4a24('0x14')](_0x4a24('0xf'),_0x1f5ac8,_0x3d680f);_0xf2681(_0x3d680f);});});}
\ No newline at end of file
index a94d6c4..201c10e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe646=['post','create','addConfiguration','put','update','destroy','exports','multer','path','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','/:id','show','/:id/configurations','getConfigurations','/:id/fields','getFields'];(function(_0x53586c,_0x55e468){var _0x5d3514=function(_0x3d9c5e){while(--_0x3d9c5e){_0x53586c['push'](_0x53586c['shift']());}};_0x5d3514(++_0x55e468);}(_0xe646,0x132));var _0x6e64=function(_0x5348de,_0x1a414b){_0x5348de=_0x5348de-0x0;var _0x358398=_0xe646[_0x5348de];return _0x358398;};'use strict';var multer=require(_0x6e64('0x0'));var util=require('util');var path=require(_0x6e64('0x1'));var timeout=require('connect-timeout');var express=require(_0x6e64('0x2'));var router=express['Router']();var fs_extra=require(_0x6e64('0x3'));var auth=require(_0x6e64('0x4'));var interaction=require(_0x6e64('0x5'));var config=require(_0x6e64('0x6'));var controller=require('./intZendeskAccount.controller');router['get']('/',auth[_0x6e64('0x7')](),controller[_0x6e64('0x8')]);router[_0x6e64('0x9')](_0x6e64('0xa'),auth[_0x6e64('0x7')](),controller[_0x6e64('0xb')]);router[_0x6e64('0x9')](_0x6e64('0xc'),auth[_0x6e64('0x7')](),controller[_0x6e64('0xd')]);router['get'](_0x6e64('0xe'),auth[_0x6e64('0x7')](),controller[_0x6e64('0xf')]);router[_0x6e64('0x10')]('/',auth[_0x6e64('0x7')](),controller[_0x6e64('0x11')]);router[_0x6e64('0x10')](_0x6e64('0xc'),auth[_0x6e64('0x7')](),controller[_0x6e64('0x12')]);router[_0x6e64('0x13')](_0x6e64('0xa'),auth[_0x6e64('0x7')](),controller[_0x6e64('0x14')]);router['delete'](_0x6e64('0xa'),auth[_0x6e64('0x7')](),controller[_0x6e64('0x15')]);module[_0x6e64('0x16')]=router;
\ No newline at end of file
+var _0x8313=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intZendeskAccount.controller','get','isAuthenticated','/:id','/:id/configurations','getConfigurations','/:id/fields','post','addConfiguration','put','update','delete','destroy','exports','multer','util','path','express'];(function(_0x369ae9,_0x48e933){var _0x8b8ae4=function(_0x3903cf){while(--_0x3903cf){_0x369ae9['push'](_0x369ae9['shift']());}};_0x8b8ae4(++_0x48e933);}(_0x8313,0x19e));var _0x3831=function(_0x5139dd,_0x4cfa18){_0x5139dd=_0x5139dd-0x0;var _0x1bb972=_0x8313[_0x5139dd];return _0x1bb972;};'use strict';var multer=require(_0x3831('0x0'));var util=require(_0x3831('0x1'));var path=require(_0x3831('0x2'));var timeout=require('connect-timeout');var express=require(_0x3831('0x3'));var router=express['Router']();var fs_extra=require(_0x3831('0x4'));var auth=require(_0x3831('0x5'));var interaction=require(_0x3831('0x6'));var config=require(_0x3831('0x7'));var controller=require(_0x3831('0x8'));router[_0x3831('0x9')]('/',auth[_0x3831('0xa')](),controller['index']);router[_0x3831('0x9')](_0x3831('0xb'),auth[_0x3831('0xa')](),controller['show']);router['get'](_0x3831('0xc'),auth[_0x3831('0xa')](),controller[_0x3831('0xd')]);router[_0x3831('0x9')](_0x3831('0xe'),auth[_0x3831('0xa')](),controller['getFields']);router[_0x3831('0xf')]('/',auth[_0x3831('0xa')](),controller['create']);router['post']('/:id/configurations',auth[_0x3831('0xa')](),controller[_0x3831('0x10')]);router[_0x3831('0x11')](_0x3831('0xb'),auth[_0x3831('0xa')](),controller[_0x3831('0x12')]);router[_0x3831('0x13')](_0x3831('0xb'),auth[_0x3831('0xa')](),controller[_0x3831('0x14')]);module[_0x3831('0x15')]=router;
\ No newline at end of file
index b2b4483..5cabafb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeca8=['password','integrationTab','newTab','sequelize','exports','STRING','username','remoteUri','ENUM'];(function(_0x279d37,_0x14de3f){var _0x530173=function(_0x37fc79){while(--_0x37fc79){_0x279d37['push'](_0x279d37['shift']());}};_0x530173(++_0x14de3f);}(_0xeca8,0x1f2));var _0x8eca=function(_0x5e2678,_0x282937){_0x5e2678=_0x5e2678-0x0;var _0x3e547f=_0xeca8[_0x5e2678];return _0x3e547f;};'use strict';var Sequelize=require(_0x8eca('0x0'));module[_0x8eca('0x1')]={'name':{'type':Sequelize[_0x8eca('0x2')]},'description':{'type':Sequelize[_0x8eca('0x2')]},'username':{'type':Sequelize[_0x8eca('0x2')],'unique':_0x8eca('0x3')},'password':{'type':Sequelize['STRING']},'token':{'type':Sequelize[_0x8eca('0x2')]},'remoteUri':{'type':Sequelize['STRING'],'unique':_0x8eca('0x4')},'authType':{'type':Sequelize[_0x8eca('0x5')](_0x8eca('0x6'),'token'),'defaultValue':_0x8eca('0x6')},'serverUrl':{'type':Sequelize[_0x8eca('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0x8eca('0x5')](_0x8eca('0x7'),_0x8eca('0x8')),'defaultValue':_0x8eca('0x7')}};
\ No newline at end of file
+var _0xf2e3=['integrationTab','newTab','sequelize','STRING','username','remoteUri','ENUM','token','password'];(function(_0x2cb321,_0x4966fe){var _0x24c609=function(_0x4ed75d){while(--_0x4ed75d){_0x2cb321['push'](_0x2cb321['shift']());}};_0x24c609(++_0x4966fe);}(_0xf2e3,0x9b));var _0x3f2e=function(_0x38537f,_0x252124){_0x38537f=_0x38537f-0x0;var _0x141e23=_0xf2e3[_0x38537f];return _0x141e23;};'use strict';var Sequelize=require(_0x3f2e('0x0'));module['exports']={'name':{'type':Sequelize[_0x3f2e('0x1')]},'description':{'type':Sequelize[_0x3f2e('0x1')]},'username':{'type':Sequelize[_0x3f2e('0x1')],'unique':_0x3f2e('0x2')},'password':{'type':Sequelize[_0x3f2e('0x1')]},'token':{'type':Sequelize[_0x3f2e('0x1')]},'remoteUri':{'type':Sequelize[_0x3f2e('0x1')],'unique':_0x3f2e('0x3')},'authType':{'type':Sequelize[_0x3f2e('0x4')]('password',_0x3f2e('0x5')),'defaultValue':_0x3f2e('0x6')},'serverUrl':{'type':Sequelize[_0x3f2e('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0x3f2e('0x4')](_0x3f2e('0x7'),_0x3f2e('0x8')),'defaultValue':_0x3f2e('0x7')}};
\ No newline at end of file
index e072fa9..388f37d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa902=['%s:%s','base64','%s/token:%s','token','Sequelize','ValidationError','Unknown\x20authentication\x20type','subject','description','group','assignee','remove','includes','position','system_field_options','custom_field_options','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','stringify','send','Wrong\x20credentials','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','path','sox','to-csv','ejs','fs-extra','lodash','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','offset','undefined','limit','set','Content-Range','json','apply','reject','update','destroy','then','end','error','stack','ZendeskAccount','rawAttributes','fieldName','type','key','model','name','query','keys','filters','intersection','fields','attributes','length','nolimit','order','where','pick','merge','VIRTUAL','filter','options','count','includeAll','include','findAll','rows','show','params','find','catch','create','body','sort','map','getConfigurations','hasOwnProperty','addConfiguration','AccountId','Subjects','channel','Descriptions','getDescriptions','ZendeskConfiguration','ZendeskField','getFields','findOne','username','password','remoteUri','slice','GET','format','%s/%s','ticket_fields','authType','headers','Basic\x20%s'];(function(_0x1acad5,_0x2efd01){var _0xfa03e9=function(_0xbd5633){while(--_0xbd5633){_0x1acad5['push'](_0x1acad5['shift']());}};_0xfa03e9(++_0x2efd01);}(_0xa902,0x8d));var _0x2a90=function(_0x11bf6f,_0x327b36){_0x11bf6f=_0x11bf6f-0x0;var _0x250d0e=_0xa902[_0x11bf6f];return _0x250d0e;};'use strict';var emlformat=require(_0x2a90('0x0'));var rimraf=require(_0x2a90('0x1'));var zipdir=require(_0x2a90('0x2'));var jsonpatch=require(_0x2a90('0x3'));var rp=require(_0x2a90('0x4'));var moment=require('moment');var BPromise=require(_0x2a90('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x2a90('0x6'));var sox=require(_0x2a90('0x7'));var csv=require(_0x2a90('0x8'));var ejs=require(_0x2a90('0x9'));var fs=require('fs');var fs_extra=require(_0x2a90('0xa'));var _=require(_0x2a90('0xb'));var squel=require('squel');var crypto=require(_0x2a90('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x2a90('0x8'));var querystring=require(_0x2a90('0xd'));var Papa=require(_0x2a90('0xe'));var Redis=require(_0x2a90('0xf'));var authService=require(_0x2a90('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x2a90('0x11'));var hardwareService=require(_0x2a90('0x12'));var logger=require(_0x2a90('0x13'))(_0x2a90('0x14'));var utils=require('../../config/utils');var config=require(_0x2a90('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x2a90('0x16'))['db'];var integrations=require('../../components/integrations/configuration');function respondWithStatusCode(_0x1f6953,_0x57aee3){_0x57aee3=_0x57aee3||0xcc;return function(_0x407ce5){if(_0x407ce5){return _0x1f6953[_0x2a90('0x17')](_0x57aee3);}return _0x1f6953[_0x2a90('0x18')](_0x57aee3)['end']();};}function respondWithResult(_0x56d1b8,_0x57227c){_0x57227c=_0x57227c||0xc8;return function(_0x46cb32){if(_0x46cb32){return _0x56d1b8[_0x2a90('0x18')](_0x57227c)['json'](_0x46cb32);}};}function respondWithFilteredResult(_0x1ff63d,_0x21c648){return function(_0x312782){if(_0x312782){var _0x25bd0e=typeof _0x21c648[_0x2a90('0x19')]===_0x2a90('0x1a')&&typeof _0x21c648[_0x2a90('0x1b')]===_0x2a90('0x1a');var _0x43eea5=_0x312782['count'];var _0x162f0b=_0x25bd0e?0x0:_0x21c648[_0x2a90('0x19')];var _0x4190ff=_0x25bd0e?_0x312782['count']:_0x21c648[_0x2a90('0x19')]+_0x21c648[_0x2a90('0x1b')];var _0x148d18;if(_0x4190ff>=_0x43eea5){_0x4190ff=_0x43eea5;_0x148d18=0xc8;}else{_0x148d18=0xce;}_0x1ff63d[_0x2a90('0x18')](_0x148d18);return _0x1ff63d[_0x2a90('0x1c')](_0x2a90('0x1d'),_0x162f0b+'-'+_0x4190ff+'/'+_0x43eea5)[_0x2a90('0x1e')](_0x312782);}return null;};}function patchUpdates(_0x114d42){return function(_0xf97adb){try{jsonpatch[_0x2a90('0x1f')](_0xf97adb,_0x114d42,!![]);}catch(_0x1340b9){return BPromise[_0x2a90('0x20')](_0x1340b9);}return _0xf97adb['save']();};}function saveUpdates(_0x3da7d0,_0x217873){return function(_0x2955a9){if(_0x2955a9){return _0x2955a9[_0x2a90('0x21')](_0x3da7d0)['then'](function(_0x180485){return _0x180485;});}return null;};}function removeEntity(_0xd033d,_0x4ed9e6){return function(_0x1bcfd7){if(_0x1bcfd7){return _0x1bcfd7[_0x2a90('0x22')]()[_0x2a90('0x23')](function(){_0xd033d[_0x2a90('0x18')](0xcc)[_0x2a90('0x24')]();});}};}function handleEntityNotFound(_0x1303d9,_0x29ed73){return function(_0x24a6d3){if(!_0x24a6d3){_0x1303d9['sendStatus'](0x194);}return _0x24a6d3;};}function handleError(_0x27f883,_0x17f978){_0x17f978=_0x17f978||0x1f4;return function(_0x3934d4){logger[_0x2a90('0x25')](_0x3934d4[_0x2a90('0x26')]);if(_0x3934d4['name']){delete _0x3934d4['name'];}_0x27f883[_0x2a90('0x18')](_0x17f978)['send'](_0x3934d4);};}exports['index']=function(_0x4969c3,_0x2d83b3){var _0x3c78f5={},_0x595638={},_0x5bd700={'count':0x0,'rows':[]};var _0x1add9a=_['map'](db[_0x2a90('0x27')][_0x2a90('0x28')],function(_0x3b580f){return{'name':_0x3b580f[_0x2a90('0x29')],'type':_0x3b580f[_0x2a90('0x2a')][_0x2a90('0x2b')]};});_0x595638[_0x2a90('0x2c')]=_['map'](_0x1add9a,_0x2a90('0x2d'));_0x595638[_0x2a90('0x2e')]=_[_0x2a90('0x2f')](_0x4969c3['query']);_0x595638[_0x2a90('0x30')]=_[_0x2a90('0x31')](_0x595638[_0x2a90('0x2c')],_0x595638[_0x2a90('0x2e')]);_0x3c78f5['attributes']=_[_0x2a90('0x31')](_0x595638[_0x2a90('0x2c')],qs[_0x2a90('0x32')](_0x4969c3[_0x2a90('0x2e')][_0x2a90('0x32')]));_0x3c78f5[_0x2a90('0x33')]=_0x3c78f5['attributes'][_0x2a90('0x34')]?_0x3c78f5[_0x2a90('0x33')]:_0x595638[_0x2a90('0x2c')];if(!_0x4969c3[_0x2a90('0x2e')]['hasOwnProperty'](_0x2a90('0x35'))){_0x3c78f5[_0x2a90('0x1b')]=qs['limit'](_0x4969c3[_0x2a90('0x2e')][_0x2a90('0x1b')]);_0x3c78f5['offset']=qs['offset'](_0x4969c3[_0x2a90('0x2e')][_0x2a90('0x19')]);}_0x3c78f5[_0x2a90('0x36')]=qs['sort'](_0x4969c3[_0x2a90('0x2e')]['sort']);_0x3c78f5[_0x2a90('0x37')]=qs['filters'](_[_0x2a90('0x38')](_0x4969c3['query'],_0x595638['filters']),_0x1add9a);if(_0x4969c3[_0x2a90('0x2e')]['filter']){_0x3c78f5[_0x2a90('0x37')]=_[_0x2a90('0x39')](_0x3c78f5[_0x2a90('0x37')],{'$or':_['map'](_0x1add9a,function(_0x57a2a5){if(_0x57a2a5[_0x2a90('0x2a')]!==_0x2a90('0x3a')){var _0x4eb7d9={};_0x4eb7d9[_0x57a2a5[_0x2a90('0x2d')]]={'$like':'%'+_0x4969c3[_0x2a90('0x2e')][_0x2a90('0x3b')]+'%'};return _0x4eb7d9;}})});}_0x3c78f5=_['merge']({},_0x3c78f5,_0x4969c3[_0x2a90('0x3c')]);var _0x1db9d8={'where':_0x3c78f5['where']};return db[_0x2a90('0x27')][_0x2a90('0x3d')](_0x1db9d8)[_0x2a90('0x23')](function(_0x28f289){_0x5bd700[_0x2a90('0x3d')]=_0x28f289;if(_0x4969c3[_0x2a90('0x2e')][_0x2a90('0x3e')]){_0x3c78f5[_0x2a90('0x3f')]=[{'all':!![]}];}return db[_0x2a90('0x27')][_0x2a90('0x40')](_0x3c78f5);})[_0x2a90('0x23')](function(_0x3dba8a){_0x5bd700[_0x2a90('0x41')]=_0x3dba8a;return _0x5bd700;})[_0x2a90('0x23')](respondWithFilteredResult(_0x2d83b3,_0x3c78f5))['catch'](handleError(_0x2d83b3,null));};exports[_0x2a90('0x42')]=function(_0x3a70fe,_0x528b41){var _0x1045bb={'raw':![],'where':{'id':_0x3a70fe[_0x2a90('0x43')]['id']}},_0x1e971c={};_0x1e971c[_0x2a90('0x2c')]=_[_0x2a90('0x2f')](db['ZendeskAccount'][_0x2a90('0x28')]);_0x1e971c['query']=_[_0x2a90('0x2f')](_0x3a70fe['query']);_0x1e971c[_0x2a90('0x30')]=_[_0x2a90('0x31')](_0x1e971c[_0x2a90('0x2c')],_0x1e971c[_0x2a90('0x2e')]);_0x1045bb[_0x2a90('0x33')]=_[_0x2a90('0x31')](_0x1e971c[_0x2a90('0x2c')],qs['fields'](_0x3a70fe['query'][_0x2a90('0x32')]));_0x1045bb[_0x2a90('0x33')]=_0x1045bb[_0x2a90('0x33')][_0x2a90('0x34')]?_0x1045bb[_0x2a90('0x33')]:_0x1e971c[_0x2a90('0x2c')];if(_0x3a70fe[_0x2a90('0x2e')][_0x2a90('0x3e')]){_0x1045bb['include']=[{'all':!![]}];}_0x1045bb=_[_0x2a90('0x39')]({},_0x1045bb,_0x3a70fe['options']);return db[_0x2a90('0x27')][_0x2a90('0x44')](_0x1045bb)['then'](handleEntityNotFound(_0x528b41,null))[_0x2a90('0x23')](respondWithResult(_0x528b41,null))[_0x2a90('0x45')](handleError(_0x528b41,null));};exports[_0x2a90('0x46')]=function(_0x1d55db,_0x175d59){return db[_0x2a90('0x27')][_0x2a90('0x46')](_0x1d55db['body'],{})['then'](respondWithResult(_0x175d59,0xc9))[_0x2a90('0x45')](handleError(_0x175d59,null));};exports[_0x2a90('0x21')]=function(_0x42c890,_0x43266a){if(_0x42c890[_0x2a90('0x47')]['id']){delete _0x42c890['body']['id'];}return db['ZendeskAccount'][_0x2a90('0x44')]({'where':{'id':_0x42c890[_0x2a90('0x43')]['id']}})['then'](handleEntityNotFound(_0x43266a,null))['then'](saveUpdates(_0x42c890['body'],null))[_0x2a90('0x23')](respondWithResult(_0x43266a,null))['catch'](handleError(_0x43266a,null));};exports[_0x2a90('0x22')]=function(_0x3dfe72,_0x272d07){return db[_0x2a90('0x27')][_0x2a90('0x44')]({'where':{'id':_0x3dfe72[_0x2a90('0x43')]['id']}})['then'](handleEntityNotFound(_0x272d07,null))[_0x2a90('0x23')](removeEntity(_0x272d07,null))[_0x2a90('0x45')](handleError(_0x272d07,null));};exports['getConfigurations']=function(_0x265769,_0x4d1303,_0x4c8bae){var _0x46f687={};var _0xe47c6b={};var _0x5819ab;var _0x4c0cb2;return db[_0x2a90('0x27')]['findOne']({'where':{'id':_0x265769[_0x2a90('0x43')]['id']}})[_0x2a90('0x23')](handleEntityNotFound(_0x4d1303,null))['then'](function(_0x366429){if(_0x366429){_0x5819ab=_0x366429;_0xe47c6b[_0x2a90('0x2c')]=_[_0x2a90('0x2f')](db['ZendeskConfiguration'][_0x2a90('0x28')]);_0xe47c6b[_0x2a90('0x2e')]=_['keys'](_0x265769['query']);_0xe47c6b[_0x2a90('0x30')]=_[_0x2a90('0x31')](_0xe47c6b['model'],_0xe47c6b[_0x2a90('0x2e')]);_0x46f687['attributes']=_[_0x2a90('0x31')](_0xe47c6b['model'],qs[_0x2a90('0x32')](_0x265769[_0x2a90('0x2e')][_0x2a90('0x32')]));_0x46f687['attributes']=_0x46f687['attributes']['length']?_0x46f687[_0x2a90('0x33')]:_0xe47c6b[_0x2a90('0x2c')];_0x46f687[_0x2a90('0x36')]=qs[_0x2a90('0x48')](_0x265769[_0x2a90('0x2e')][_0x2a90('0x48')]);_0x46f687[_0x2a90('0x37')]=qs[_0x2a90('0x30')](_[_0x2a90('0x38')](_0x265769[_0x2a90('0x2e')],_0xe47c6b[_0x2a90('0x30')]));if(_0x265769[_0x2a90('0x2e')][_0x2a90('0x3b')]){_0x46f687['where']=_['merge'](_0x46f687['where'],{'$or':_[_0x2a90('0x49')](_0x46f687[_0x2a90('0x33')],function(_0x13270d){var _0x400aca={};_0x400aca[_0x13270d]={'$like':'%'+_0x265769[_0x2a90('0x2e')][_0x2a90('0x3b')]+'%'};return _0x400aca;})});}_0x46f687=_[_0x2a90('0x39')]({},_0x46f687,_0x265769[_0x2a90('0x3c')]);return _0x5819ab[_0x2a90('0x4a')](_0x46f687);}})[_0x2a90('0x23')](function(_0x50973b){if(_0x50973b){_0x4c0cb2=_0x50973b[_0x2a90('0x34')];if(!_0x265769[_0x2a90('0x2e')][_0x2a90('0x4b')](_0x2a90('0x35'))){_0x46f687[_0x2a90('0x1b')]=qs['limit'](_0x265769[_0x2a90('0x2e')]['limit']);_0x46f687[_0x2a90('0x19')]=qs[_0x2a90('0x19')](_0x265769[_0x2a90('0x2e')][_0x2a90('0x19')]);}return _0x5819ab[_0x2a90('0x4a')](_0x46f687);}})[_0x2a90('0x23')](function(_0x44b211){if(_0x44b211){return _0x44b211?{'count':_0x4c0cb2,'rows':_0x44b211}:null;}})['then'](respondWithResult(_0x4d1303,null))[_0x2a90('0x45')](handleError(_0x4d1303,null));};exports[_0x2a90('0x4c')]=function(_0xf88bbb,_0x48f9fa,_0xa1234a){if(_0xf88bbb[_0x2a90('0x47')]['id']){delete _0xf88bbb[_0x2a90('0x47')]['id'];}return db[_0x2a90('0x27')]['findOne']({'where':{'id':_0xf88bbb[_0x2a90('0x43')]['id']}})['then'](handleEntityNotFound(_0x48f9fa,null))[_0x2a90('0x23')](function(_0x94e9fb){if(_0x94e9fb){_0xf88bbb[_0x2a90('0x47')][_0x2a90('0x4d')]=_0x94e9fb['id'];_0xf88bbb[_0x2a90('0x47')][_0x2a90('0x4e')]=integrations['getSubjects'](_0xf88bbb[_0x2a90('0x47')][_0x2a90('0x4f')],_0xf88bbb[_0x2a90('0x47')][_0x2a90('0x2a')]);_0xf88bbb[_0x2a90('0x47')][_0x2a90('0x50')]=integrations[_0x2a90('0x51')](_0xf88bbb[_0x2a90('0x47')][_0x2a90('0x4f')],_0xf88bbb['body'][_0x2a90('0x2a')]);return db[_0x2a90('0x52')][_0x2a90('0x46')](_0xf88bbb['body'],{'include':[{'model':db[_0x2a90('0x53')],'as':_0x2a90('0x4e')},{'model':db[_0x2a90('0x53')],'as':_0x2a90('0x50')}]});}return null;})[_0x2a90('0x23')](respondWithResult(_0x48f9fa,null))['catch'](handleError(_0x48f9fa,null));};exports[_0x2a90('0x54')]=function(_0x5e0bf2,_0x5a770b,_0x9fafd){var _0x4e1dcd='';return db['ZendeskAccount'][_0x2a90('0x55')]({'where':{'id':_0x5e0bf2['params']['id']},'attributes':['id',_0x2a90('0x56'),_0x2a90('0x57'),'token','authType',_0x2a90('0x58')]})['then'](handleEntityNotFound(_0x5a770b,null))['then'](function(_0xd52ae2){if(_0xd52ae2){_0x4e1dcd=_0xd52ae2[_0x2a90('0x58')];var _0x1db063=_0x4e1dcd[_0x2a90('0x59')](-0x1);if(_0x1db063==='/'){_0x4e1dcd=_0x4e1dcd['substring'](0x0,_0x4e1dcd['lastIndexOf'](_0x1db063));}var _0x370144={'method':_0x2a90('0x5a'),'uri':util[_0x2a90('0x5b')](_0x2a90('0x5c'),_0x4e1dcd,_0x2a90('0x5d')),'json':!![]};switch(_0xd52ae2[_0x2a90('0x5e')]){case _0x2a90('0x57'):_0x370144[_0x2a90('0x5f')]={'Authorization':util[_0x2a90('0x5b')](_0x2a90('0x60'),new Buffer(util[_0x2a90('0x5b')](_0x2a90('0x61'),_0xd52ae2['username'],_0xd52ae2[_0x2a90('0x57')]))['toString'](_0x2a90('0x62')))};break;case'token':_0x370144[_0x2a90('0x5f')]={'Authorization':util['format']('Basic\x20%s',new Buffer(util[_0x2a90('0x5b')](_0x2a90('0x63'),_0xd52ae2[_0x2a90('0x56')],_0xd52ae2[_0x2a90('0x64')]))['toString']('base64'))};break;default:throw new db[(_0x2a90('0x65'))][(_0x2a90('0x66'))](_0x2a90('0x67'));}return rp(_0x370144);}})[_0x2a90('0x23')](function(_0x59b9e6){if(_0x59b9e6){var _0x3b0d5e=[_0x2a90('0x68'),_0x2a90('0x69'),_0x2a90('0x6a'),_0x2a90('0x6b')];_[_0x2a90('0x6c')](_0x59b9e6[_0x2a90('0x5d')],function(_0x4d46f5){return _0x3b0d5e[_0x2a90('0x6d')](_0x4d46f5[_0x2a90('0x2a')]);});return{'count':_0x59b9e6[_0x2a90('0x5d')][_0x2a90('0x34')],'rows':_[_0x2a90('0x49')](_0x59b9e6[_0x2a90('0x5d')],function(_0x1bbadd){return{'id':_0x1bbadd['id'],'name':_0x1bbadd[_0x2a90('0x6e')]>0x7?_0x1bbadd['title']:_0x1bbadd[_0x2a90('0x2a')],'custom':_0x1bbadd[_0x2a90('0x6e')]>0x7?!![]:![],'options':_0x1bbadd['system_field_options']?_0x1bbadd[_0x2a90('0x6f')]:_0x1bbadd[_0x2a90('0x70')]?_0x1bbadd[_0x2a90('0x70')]:[]};})};}})[_0x2a90('0x23')](respondWithResult(_0x5a770b,null))[_0x2a90('0x45')](function(_0x16e9e7){var _0x4b4a47=_0x5e0bf2[_0x2a90('0x2e')][_0x2a90('0x71')]?0x1f4:_0x16e9e7[_0x2a90('0x72')]||0x1f4;logger[_0x2a90('0x25')](_0x2a90('0x73'),_0x2a90('0x54'),_0x4b4a47,JSON[_0x2a90('0x74')](_0x16e9e7));delete _0x16e9e7[_0x2a90('0x2d')];if(_0x4b4a47===0x191){_0x4b4a47=0x190;}_0x5a770b['status'](_0x4b4a47)[_0x2a90('0x75')](_0x5e0bf2[_0x2a90('0x2e')][_0x2a90('0x71')]?{'message':_0x2a90('0x76'),'statusCode':_0x16e9e7[_0x2a90('0x72')]}:_0x16e9e7);});};
\ No newline at end of file
+var _0x3c81=['toString','base64','headers','Sequelize','ValidationError','Unknown\x20authentication\x20type','subject','description','group','remove','ticket_fields','includes','position','title','system_field_options','custom_field_options','test','getFields,\x20%s,\x20%s,\x20%s','stringify','send','Wrong\x20credentials','statusCode','eml-format','rimraf','fast-json-patch','request-promise','path','sox','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','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','undefined','limit','count','offset','set','Content-Range','json','apply','reject','save','update','then','name','map','rawAttributes','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','filter','where','merge','options','ZendeskAccount','includeAll','include','findAll','rows','catch','show','params','keys','find','create','body','destroy','getConfigurations','findOne','order','addConfiguration','Subjects','getSubjects','channel','Descriptions','getDescriptions','type','ZendeskConfiguration','ZendeskField','getFields','username','password','token','remoteUri','slice','lastIndexOf','GET','format','%s/%s','authType','Basic\x20%s','%s:%s'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x3c81,0x102));var _0x13c8=function(_0x181399,_0x45b52d){_0x181399=_0x181399-0x0;var _0x4f633e=_0x3c81[_0x181399];return _0x4f633e;};'use strict';var emlformat=require(_0x13c8('0x0'));var rimraf=require(_0x13c8('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x13c8('0x2'));var rp=require(_0x13c8('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0x13c8('0x4'));var sox=require(_0x13c8('0x5'));var csv=require(_0x13c8('0x6'));var ejs=require(_0x13c8('0x7'));var fs=require('fs');var fs_extra=require(_0x13c8('0x8'));var _=require(_0x13c8('0x9'));var squel=require(_0x13c8('0xa'));var crypto=require('crypto');var jsforce=require(_0x13c8('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x13c8('0x6'));var querystring=require(_0x13c8('0xc'));var Papa=require(_0x13c8('0xd'));var Redis=require(_0x13c8('0xe'));var authService=require(_0x13c8('0xf'));var qs=require(_0x13c8('0x10'));var as=require(_0x13c8('0x11'));var hardwareService=require(_0x13c8('0x12'));var logger=require(_0x13c8('0x13'))(_0x13c8('0x14'));var utils=require(_0x13c8('0x15'));var config=require(_0x13c8('0x16'));var licenseUtil=require(_0x13c8('0x17'));var db=require(_0x13c8('0x18'))['db'];var integrations=require('../../components/integrations/configuration');function respondWithStatusCode(_0x21442d,_0x7b6da8){_0x7b6da8=_0x7b6da8||0xcc;return function(_0x2304b5){if(_0x2304b5){return _0x21442d[_0x13c8('0x19')](_0x7b6da8);}return _0x21442d['status'](_0x7b6da8)[_0x13c8('0x1a')]();};}function respondWithResult(_0x515681,_0x4d7a88){_0x4d7a88=_0x4d7a88||0xc8;return function(_0x589636){if(_0x589636){return _0x515681[_0x13c8('0x1b')](_0x4d7a88)['json'](_0x589636);}};}function respondWithFilteredResult(_0x337397,_0x17a3c1){return function(_0x23f64e){if(_0x23f64e){var _0x7cbfb=typeof _0x17a3c1['offset']===_0x13c8('0x1c')&&typeof _0x17a3c1[_0x13c8('0x1d')]===_0x13c8('0x1c');var _0x3bc5a9=_0x23f64e[_0x13c8('0x1e')];var _0x28f07e=_0x7cbfb?0x0:_0x17a3c1[_0x13c8('0x1f')];var _0x251c38=_0x7cbfb?_0x23f64e[_0x13c8('0x1e')]:_0x17a3c1[_0x13c8('0x1f')]+_0x17a3c1[_0x13c8('0x1d')];var _0x5ac776;if(_0x251c38>=_0x3bc5a9){_0x251c38=_0x3bc5a9;_0x5ac776=0xc8;}else{_0x5ac776=0xce;}_0x337397[_0x13c8('0x1b')](_0x5ac776);return _0x337397[_0x13c8('0x20')](_0x13c8('0x21'),_0x28f07e+'-'+_0x251c38+'/'+_0x3bc5a9)[_0x13c8('0x22')](_0x23f64e);}return null;};}function patchUpdates(_0x513085){return function(_0x1fb714){try{jsonpatch[_0x13c8('0x23')](_0x1fb714,_0x513085,!![]);}catch(_0x3e3951){return BPromise[_0x13c8('0x24')](_0x3e3951);}return _0x1fb714[_0x13c8('0x25')]();};}function saveUpdates(_0x2fc123,_0x5ab47f){return function(_0x28f99c){if(_0x28f99c){return _0x28f99c[_0x13c8('0x26')](_0x2fc123)[_0x13c8('0x27')](function(_0xcf41d2){return _0xcf41d2;});}return null;};}function removeEntity(_0x577df6,_0x1770e5){return function(_0x458217){if(_0x458217){return _0x458217['destroy']()['then'](function(){_0x577df6[_0x13c8('0x1b')](0xcc)[_0x13c8('0x1a')]();});}};}function handleEntityNotFound(_0x47e8ae,_0x5ad0dc){return function(_0x288c3c){if(!_0x288c3c){_0x47e8ae[_0x13c8('0x19')](0x194);}return _0x288c3c;};}function handleError(_0x53ada9,_0x4df077){_0x4df077=_0x4df077||0x1f4;return function(_0x196983){logger['error'](_0x196983['stack']);if(_0x196983[_0x13c8('0x28')]){delete _0x196983[_0x13c8('0x28')];}_0x53ada9[_0x13c8('0x1b')](_0x4df077)['send'](_0x196983);};}exports['index']=function(_0x277a89,_0x1071a0){var _0x399840={},_0x441182={},_0x138017={'count':0x0,'rows':[]};var _0x220d40=_[_0x13c8('0x29')](db['ZendeskAccount'][_0x13c8('0x2a')],function(_0xcbc9b7){return{'name':_0xcbc9b7['fieldName'],'type':_0xcbc9b7['type'][_0x13c8('0x2b')]};});_0x441182[_0x13c8('0x2c')]=_['map'](_0x220d40,_0x13c8('0x28'));_0x441182[_0x13c8('0x2d')]=_['keys'](_0x277a89[_0x13c8('0x2d')]);_0x441182[_0x13c8('0x2e')]=_[_0x13c8('0x2f')](_0x441182[_0x13c8('0x2c')],_0x441182[_0x13c8('0x2d')]);_0x399840[_0x13c8('0x30')]=_[_0x13c8('0x2f')](_0x441182[_0x13c8('0x2c')],qs['fields'](_0x277a89['query'][_0x13c8('0x31')]));_0x399840[_0x13c8('0x30')]=_0x399840['attributes'][_0x13c8('0x32')]?_0x399840['attributes']:_0x441182[_0x13c8('0x2c')];if(!_0x277a89['query'][_0x13c8('0x33')](_0x13c8('0x34'))){_0x399840[_0x13c8('0x1d')]=qs[_0x13c8('0x1d')](_0x277a89[_0x13c8('0x2d')][_0x13c8('0x1d')]);_0x399840[_0x13c8('0x1f')]=qs['offset'](_0x277a89[_0x13c8('0x2d')][_0x13c8('0x1f')]);}_0x399840['order']=qs[_0x13c8('0x35')](_0x277a89[_0x13c8('0x2d')][_0x13c8('0x35')]);_0x399840['where']=qs['filters'](_['pick'](_0x277a89[_0x13c8('0x2d')],_0x441182[_0x13c8('0x2e')]),_0x220d40);if(_0x277a89[_0x13c8('0x2d')][_0x13c8('0x36')]){_0x399840[_0x13c8('0x37')]=_[_0x13c8('0x38')](_0x399840[_0x13c8('0x37')],{'$or':_[_0x13c8('0x29')](_0x220d40,function(_0xf818be){if(_0xf818be['type']!=='VIRTUAL'){var _0x27e11b={};_0x27e11b[_0xf818be[_0x13c8('0x28')]]={'$like':'%'+_0x277a89[_0x13c8('0x2d')][_0x13c8('0x36')]+'%'};return _0x27e11b;}})});}_0x399840=_['merge']({},_0x399840,_0x277a89[_0x13c8('0x39')]);var _0x4bd627={'where':_0x399840[_0x13c8('0x37')]};return db[_0x13c8('0x3a')][_0x13c8('0x1e')](_0x4bd627)[_0x13c8('0x27')](function(_0xbb1d49){_0x138017[_0x13c8('0x1e')]=_0xbb1d49;if(_0x277a89[_0x13c8('0x2d')][_0x13c8('0x3b')]){_0x399840[_0x13c8('0x3c')]=[{'all':!![]}];}return db[_0x13c8('0x3a')][_0x13c8('0x3d')](_0x399840);})[_0x13c8('0x27')](function(_0x89bbab){_0x138017[_0x13c8('0x3e')]=_0x89bbab;return _0x138017;})[_0x13c8('0x27')](respondWithFilteredResult(_0x1071a0,_0x399840))[_0x13c8('0x3f')](handleError(_0x1071a0,null));};exports[_0x13c8('0x40')]=function(_0x1505fb,_0xc5eb86){var _0x1cff99={'raw':![],'where':{'id':_0x1505fb[_0x13c8('0x41')]['id']}},_0x3622d6={};_0x3622d6[_0x13c8('0x2c')]=_[_0x13c8('0x42')](db[_0x13c8('0x3a')]['rawAttributes']);_0x3622d6[_0x13c8('0x2d')]=_[_0x13c8('0x42')](_0x1505fb[_0x13c8('0x2d')]);_0x3622d6[_0x13c8('0x2e')]=_[_0x13c8('0x2f')](_0x3622d6['model'],_0x3622d6['query']);_0x1cff99[_0x13c8('0x30')]=_[_0x13c8('0x2f')](_0x3622d6[_0x13c8('0x2c')],qs['fields'](_0x1505fb['query']['fields']));_0x1cff99[_0x13c8('0x30')]=_0x1cff99['attributes'][_0x13c8('0x32')]?_0x1cff99['attributes']:_0x3622d6[_0x13c8('0x2c')];if(_0x1505fb[_0x13c8('0x2d')][_0x13c8('0x3b')]){_0x1cff99[_0x13c8('0x3c')]=[{'all':!![]}];}_0x1cff99=_[_0x13c8('0x38')]({},_0x1cff99,_0x1505fb[_0x13c8('0x39')]);return db['ZendeskAccount'][_0x13c8('0x43')](_0x1cff99)[_0x13c8('0x27')](handleEntityNotFound(_0xc5eb86,null))['then'](respondWithResult(_0xc5eb86,null))[_0x13c8('0x3f')](handleError(_0xc5eb86,null));};exports[_0x13c8('0x44')]=function(_0x2e925f,_0x162918){return db[_0x13c8('0x3a')]['create'](_0x2e925f[_0x13c8('0x45')],{})[_0x13c8('0x27')](respondWithResult(_0x162918,0xc9))[_0x13c8('0x3f')](handleError(_0x162918,null));};exports[_0x13c8('0x26')]=function(_0x185d18,_0x59ec9f){if(_0x185d18[_0x13c8('0x45')]['id']){delete _0x185d18[_0x13c8('0x45')]['id'];}return db[_0x13c8('0x3a')][_0x13c8('0x43')]({'where':{'id':_0x185d18[_0x13c8('0x41')]['id']}})[_0x13c8('0x27')](handleEntityNotFound(_0x59ec9f,null))[_0x13c8('0x27')](saveUpdates(_0x185d18[_0x13c8('0x45')],null))[_0x13c8('0x27')](respondWithResult(_0x59ec9f,null))[_0x13c8('0x3f')](handleError(_0x59ec9f,null));};exports[_0x13c8('0x46')]=function(_0x5e1fe5,_0x10ba7c){return db[_0x13c8('0x3a')][_0x13c8('0x43')]({'where':{'id':_0x5e1fe5[_0x13c8('0x41')]['id']}})[_0x13c8('0x27')](handleEntityNotFound(_0x10ba7c,null))[_0x13c8('0x27')](removeEntity(_0x10ba7c,null))['catch'](handleError(_0x10ba7c,null));};exports[_0x13c8('0x47')]=function(_0x416e4f,_0x2f1e83,_0x481205){var _0x54e0c8={};var _0x3d4863={};var _0x14a738;var _0x55d353;return db[_0x13c8('0x3a')][_0x13c8('0x48')]({'where':{'id':_0x416e4f['params']['id']}})[_0x13c8('0x27')](handleEntityNotFound(_0x2f1e83,null))['then'](function(_0x242791){if(_0x242791){_0x14a738=_0x242791;_0x3d4863[_0x13c8('0x2c')]=_[_0x13c8('0x42')](db['ZendeskConfiguration'][_0x13c8('0x2a')]);_0x3d4863[_0x13c8('0x2d')]=_['keys'](_0x416e4f[_0x13c8('0x2d')]);_0x3d4863['filters']=_[_0x13c8('0x2f')](_0x3d4863[_0x13c8('0x2c')],_0x3d4863[_0x13c8('0x2d')]);_0x54e0c8[_0x13c8('0x30')]=_[_0x13c8('0x2f')](_0x3d4863['model'],qs[_0x13c8('0x31')](_0x416e4f['query']['fields']));_0x54e0c8['attributes']=_0x54e0c8['attributes']['length']?_0x54e0c8[_0x13c8('0x30')]:_0x3d4863[_0x13c8('0x2c')];_0x54e0c8[_0x13c8('0x49')]=qs[_0x13c8('0x35')](_0x416e4f[_0x13c8('0x2d')][_0x13c8('0x35')]);_0x54e0c8[_0x13c8('0x37')]=qs['filters'](_['pick'](_0x416e4f[_0x13c8('0x2d')],_0x3d4863[_0x13c8('0x2e')]));if(_0x416e4f[_0x13c8('0x2d')][_0x13c8('0x36')]){_0x54e0c8[_0x13c8('0x37')]=_[_0x13c8('0x38')](_0x54e0c8[_0x13c8('0x37')],{'$or':_[_0x13c8('0x29')](_0x54e0c8['attributes'],function(_0x371410){var _0x326f90={};_0x326f90[_0x371410]={'$like':'%'+_0x416e4f['query'][_0x13c8('0x36')]+'%'};return _0x326f90;})});}_0x54e0c8=_[_0x13c8('0x38')]({},_0x54e0c8,_0x416e4f[_0x13c8('0x39')]);return _0x14a738[_0x13c8('0x47')](_0x54e0c8);}})[_0x13c8('0x27')](function(_0x1f823f){if(_0x1f823f){_0x55d353=_0x1f823f[_0x13c8('0x32')];if(!_0x416e4f[_0x13c8('0x2d')][_0x13c8('0x33')](_0x13c8('0x34'))){_0x54e0c8[_0x13c8('0x1d')]=qs[_0x13c8('0x1d')](_0x416e4f[_0x13c8('0x2d')][_0x13c8('0x1d')]);_0x54e0c8[_0x13c8('0x1f')]=qs[_0x13c8('0x1f')](_0x416e4f['query'][_0x13c8('0x1f')]);}return _0x14a738['getConfigurations'](_0x54e0c8);}})[_0x13c8('0x27')](function(_0xe861ad){if(_0xe861ad){return _0xe861ad?{'count':_0x55d353,'rows':_0xe861ad}:null;}})['then'](respondWithResult(_0x2f1e83,null))[_0x13c8('0x3f')](handleError(_0x2f1e83,null));};exports[_0x13c8('0x4a')]=function(_0x5539e8,_0x38fd82,_0x19330c){if(_0x5539e8[_0x13c8('0x45')]['id']){delete _0x5539e8[_0x13c8('0x45')]['id'];}return db[_0x13c8('0x3a')][_0x13c8('0x48')]({'where':{'id':_0x5539e8[_0x13c8('0x41')]['id']}})[_0x13c8('0x27')](handleEntityNotFound(_0x38fd82,null))[_0x13c8('0x27')](function(_0xee69b){if(_0xee69b){_0x5539e8[_0x13c8('0x45')]['AccountId']=_0xee69b['id'];_0x5539e8[_0x13c8('0x45')][_0x13c8('0x4b')]=integrations[_0x13c8('0x4c')](_0x5539e8[_0x13c8('0x45')][_0x13c8('0x4d')],_0x5539e8[_0x13c8('0x45')]['type']);_0x5539e8[_0x13c8('0x45')][_0x13c8('0x4e')]=integrations[_0x13c8('0x4f')](_0x5539e8['body'][_0x13c8('0x4d')],_0x5539e8[_0x13c8('0x45')][_0x13c8('0x50')]);return db[_0x13c8('0x51')][_0x13c8('0x44')](_0x5539e8[_0x13c8('0x45')],{'include':[{'model':db['ZendeskField'],'as':_0x13c8('0x4b')},{'model':db[_0x13c8('0x52')],'as':_0x13c8('0x4e')}]});}return null;})[_0x13c8('0x27')](respondWithResult(_0x38fd82,null))['catch'](handleError(_0x38fd82,null));};exports[_0x13c8('0x53')]=function(_0x2d552d,_0x258447,_0x308482){var _0x179a86='';return db[_0x13c8('0x3a')][_0x13c8('0x48')]({'where':{'id':_0x2d552d['params']['id']},'attributes':['id',_0x13c8('0x54'),_0x13c8('0x55'),_0x13c8('0x56'),'authType',_0x13c8('0x57')]})[_0x13c8('0x27')](handleEntityNotFound(_0x258447,null))['then'](function(_0x58728a){if(_0x58728a){_0x179a86=_0x58728a[_0x13c8('0x57')];var _0x5eb649=_0x179a86[_0x13c8('0x58')](-0x1);if(_0x5eb649==='/'){_0x179a86=_0x179a86['substring'](0x0,_0x179a86[_0x13c8('0x59')](_0x5eb649));}var _0x39aefc={'method':_0x13c8('0x5a'),'uri':util[_0x13c8('0x5b')](_0x13c8('0x5c'),_0x179a86,'ticket_fields'),'json':!![]};switch(_0x58728a[_0x13c8('0x5d')]){case _0x13c8('0x55'):_0x39aefc['headers']={'Authorization':util[_0x13c8('0x5b')](_0x13c8('0x5e'),new Buffer(util[_0x13c8('0x5b')](_0x13c8('0x5f'),_0x58728a[_0x13c8('0x54')],_0x58728a[_0x13c8('0x55')]))[_0x13c8('0x60')](_0x13c8('0x61')))};break;case _0x13c8('0x56'):_0x39aefc[_0x13c8('0x62')]={'Authorization':util['format'](_0x13c8('0x5e'),new Buffer(util[_0x13c8('0x5b')]('%s/token:%s',_0x58728a['username'],_0x58728a[_0x13c8('0x56')]))[_0x13c8('0x60')](_0x13c8('0x61')))};break;default:throw new db[(_0x13c8('0x63'))][(_0x13c8('0x64'))](_0x13c8('0x65'));}return rp(_0x39aefc);}})['then'](function(_0x18afe7){if(_0x18afe7){var _0x368f45=[_0x13c8('0x66'),_0x13c8('0x67'),_0x13c8('0x68'),'assignee'];_[_0x13c8('0x69')](_0x18afe7[_0x13c8('0x6a')],function(_0x564cc9){return _0x368f45[_0x13c8('0x6b')](_0x564cc9[_0x13c8('0x50')]);});return{'count':_0x18afe7['ticket_fields'][_0x13c8('0x32')],'rows':_['map'](_0x18afe7[_0x13c8('0x6a')],function(_0x5a4e0a){return{'id':_0x5a4e0a['id'],'name':_0x5a4e0a[_0x13c8('0x6c')]>0x7?_0x5a4e0a[_0x13c8('0x6d')]:_0x5a4e0a[_0x13c8('0x50')],'custom':_0x5a4e0a['position']>0x7?!![]:![],'options':_0x5a4e0a[_0x13c8('0x6e')]?_0x5a4e0a['system_field_options']:_0x5a4e0a['custom_field_options']?_0x5a4e0a[_0x13c8('0x6f')]:[]};})};}})[_0x13c8('0x27')](respondWithResult(_0x258447,null))[_0x13c8('0x3f')](function(_0x1e3097){var _0x4d6477=_0x2d552d['query'][_0x13c8('0x70')]?0x1f4:_0x1e3097['statusCode']||0x1f4;logger['error'](_0x13c8('0x71'),_0x13c8('0x53'),_0x4d6477,JSON[_0x13c8('0x72')](_0x1e3097));delete _0x1e3097[_0x13c8('0x28')];if(_0x4d6477===0x191){_0x4d6477=0x190;}_0x258447['status'](_0x4d6477)[_0x13c8('0x73')](_0x2d552d['query']['test']?{'message':_0x13c8('0x74'),'statusCode':_0x1e3097[_0x13c8('0x75')]}:_0x1e3097);});};
\ No newline at end of file
index 27e623d..ed0b809 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc935=['exports','ZendeskAccount','int_zendesk_accounts','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intZendeskAccount.attributes','../../components/integrations/configuration'];(function(_0x3db8e3,_0xa3789f){var _0x481734=function(_0x46704b){while(--_0x46704b){_0x3db8e3['push'](_0x3db8e3['shift']());}};_0x481734(++_0xa3789f);}(_0xc935,0x17a));var _0x5c93=function(_0x15491c,_0xcb4e47){_0x15491c=_0x15491c-0x0;var _0x23c024=_0xc935[_0x15491c];return _0x23c024;};'use strict';var _=require(_0x5c93('0x0'));var util=require(_0x5c93('0x1'));var logger=require(_0x5c93('0x2'))(_0x5c93('0x3'));var moment=require(_0x5c93('0x4'));var BPromise=require(_0x5c93('0x5'));var rp=require(_0x5c93('0x6'));var fs=require('fs');var path=require(_0x5c93('0x7'));var rimraf=require(_0x5c93('0x8'));var config=require(_0x5c93('0x9'));var attributes=require(_0x5c93('0xa'));var integrations=require(_0x5c93('0xb'));module[_0x5c93('0xc')]=function(_0x4afa2f,_0x468af6){return _0x4afa2f['define'](_0x5c93('0xd'),attributes,{'tableName':_0x5c93('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x579e=['util','../../config/logger','api','request-promise','path','rimraf','./intZendeskAccount.attributes','../../components/integrations/configuration','ZendeskAccount','int_zendesk_accounts'];(function(_0x48d3fa,_0x3808a6){var _0x4c4995=function(_0x3fab11){while(--_0x3fab11){_0x48d3fa['push'](_0x48d3fa['shift']());}};_0x4c4995(++_0x3808a6);}(_0x579e,0x17c));var _0xe579=function(_0x226fc3,_0x480f7c){_0x226fc3=_0x226fc3-0x0;var _0x116cbc=_0x579e[_0x226fc3];return _0x116cbc;};'use strict';var _=require('lodash');var util=require(_0xe579('0x0'));var logger=require(_0xe579('0x1'))(_0xe579('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xe579('0x3'));var fs=require('fs');var path=require(_0xe579('0x4'));var rimraf=require(_0xe579('0x5'));var config=require('../../config/environment');var attributes=require(_0xe579('0x6'));var integrations=require(_0xe579('0x7'));module['exports']=function(_0x557072,_0x69c550){return _0x557072['define'](_0xe579('0x8'),attributes,{'tableName':_0xe579('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 099cd95..b15b9e4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7c96=['findAll','options','attributes','model','map','include','ShowZendeskAccount','find','raw','where','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','request','then','info','ZendeskAccount,\x20%s,\x20%s','debug','ZendeskAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','GetZendeskAccount','ZendeskAccount'];(function(_0x13b8f3,_0x442821){var _0x1a6d06=function(_0x5126f2){while(--_0x5126f2){_0x13b8f3['push'](_0x13b8f3['shift']());}};_0x1a6d06(++_0x442821);}(_0x7c96,0x122));var _0x67c9=function(_0x26b80e,_0x5c9333){_0x26b80e=_0x26b80e-0x0;var _0x84a8a8=_0x7c96[_0x26b80e];return _0x84a8a8;};'use strict';var _=require(_0x67c9('0x0'));var util=require(_0x67c9('0x1'));var moment=require(_0x67c9('0x2'));var BPromise=require(_0x67c9('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x67c9('0x4'));var db=require(_0x67c9('0x5'))['db'];var utils=require(_0x67c9('0x6'));var logger=require('../../config/logger')(_0x67c9('0x7'));var config=require('../../config/environment');var jayson=require(_0x67c9('0x8'));var client=jayson[_0x67c9('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2d3fd5,_0xf418c5,_0x559b8e){return new BPromise(function(_0x489f55,_0x1b750c){return client[_0x67c9('0xa')](_0x2d3fd5,_0x559b8e)[_0x67c9('0xb')](function(_0x5caa0a){logger[_0x67c9('0xc')](_0x67c9('0xd'),_0xf418c5,'request\x20sent');logger[_0x67c9('0xe')](_0x67c9('0xf'),_0xf418c5,_0x67c9('0x10'),JSON[_0x67c9('0x11')](_0x5caa0a));if(_0x5caa0a[_0x67c9('0x12')]){if(_0x5caa0a[_0x67c9('0x12')][_0x67c9('0x13')]===0x1f4){logger[_0x67c9('0x12')](_0x67c9('0xd'),_0xf418c5,_0x5caa0a[_0x67c9('0x12')][_0x67c9('0x14')]);return _0x1b750c(_0x5caa0a[_0x67c9('0x12')][_0x67c9('0x14')]);}logger['error'](_0x67c9('0xd'),_0xf418c5,_0x5caa0a[_0x67c9('0x12')]['message']);return _0x489f55(_0x5caa0a[_0x67c9('0x12')][_0x67c9('0x14')]);}else{logger[_0x67c9('0xc')](_0x67c9('0xd'),_0xf418c5,'request\x20sent');_0x489f55(_0x5caa0a[_0x67c9('0x15')][_0x67c9('0x14')]);}})[_0x67c9('0x16')](function(_0x41fc27){logger['error'](_0x67c9('0xd'),_0xf418c5,_0x41fc27);_0x1b750c(_0x41fc27);});});}exports[_0x67c9('0x17')]=function(_0x1ad2c4){var _0x23441b=this;return new Promise(function(_0x4d2d14,_0x17c230){return db[_0x67c9('0x18')][_0x67c9('0x19')]({'raw':_0x1ad2c4['options']?_0x1ad2c4[_0x67c9('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x1ad2c4[_0x67c9('0x1a')]?_0x1ad2c4[_0x67c9('0x1a')]['where']||null:null,'attributes':_0x1ad2c4[_0x67c9('0x1a')]?_0x1ad2c4[_0x67c9('0x1a')][_0x67c9('0x1b')]||null:null,'limit':_0x1ad2c4[_0x67c9('0x1a')]?_0x1ad2c4[_0x67c9('0x1a')]['limit']||null:null,'include':_0x1ad2c4[_0x67c9('0x1a')]?_0x1ad2c4['options']['include']?_['map'](_0x1ad2c4[_0x67c9('0x1a')]['include'],function(_0x4b267f){return{'model':db[_0x4b267f[_0x67c9('0x1c')]],'as':_0x4b267f['as'],'attributes':_0x4b267f[_0x67c9('0x1b')],'include':_0x4b267f['include']?_[_0x67c9('0x1d')](_0x4b267f[_0x67c9('0x1e')],function(_0x4e6932){return{'model':db[_0x4e6932[_0x67c9('0x1c')]],'as':_0x4e6932['as'],'attributes':_0x4e6932[_0x67c9('0x1b')],'include':_0x4e6932[_0x67c9('0x1e')]?_[_0x67c9('0x1d')](_0x4e6932[_0x67c9('0x1e')],function(_0x3d77d3){return{'model':db[_0x3d77d3[_0x67c9('0x1c')]],'as':_0x3d77d3['as'],'attributes':_0x3d77d3[_0x67c9('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x67c9('0xb')](function(_0x38c953){logger[_0x67c9('0xc')](_0x67c9('0x17'),_0x1ad2c4);logger['debug'](_0x67c9('0x17'),_0x1ad2c4,JSON['stringify'](_0x38c953));_0x4d2d14(_0x38c953);})['catch'](function(_0x227071){logger[_0x67c9('0x12')]('GetZendeskAccount',_0x227071[_0x67c9('0x14')],_0x1ad2c4);_0x17c230(_0x23441b[_0x67c9('0x12')](0x1f4,_0x227071['message']));});});};exports[_0x67c9('0x1f')]=function(_0x12544d){var _0x4bab7f=this;return new Promise(function(_0x12bd6b,_0x59b981){return db[_0x67c9('0x18')][_0x67c9('0x20')]({'raw':_0x12544d[_0x67c9('0x1a')]?_0x12544d[_0x67c9('0x1a')][_0x67c9('0x21')]===undefined?!![]:![]:!![],'where':_0x12544d[_0x67c9('0x1a')]?_0x12544d[_0x67c9('0x1a')][_0x67c9('0x22')]||null:null,'attributes':_0x12544d[_0x67c9('0x1a')]?_0x12544d[_0x67c9('0x1a')][_0x67c9('0x1b')]||null:null,'include':_0x12544d[_0x67c9('0x1a')]?_0x12544d[_0x67c9('0x1a')][_0x67c9('0x1e')]?_[_0x67c9('0x1d')](_0x12544d[_0x67c9('0x1a')]['include'],function(_0x978b50){return{'model':db[_0x978b50['model']],'as':_0x978b50['as'],'attributes':_0x978b50[_0x67c9('0x1b')],'include':_0x978b50[_0x67c9('0x1e')]?_[_0x67c9('0x1d')](_0x978b50['include'],function(_0x213723){return{'model':db[_0x213723[_0x67c9('0x1c')]],'as':_0x213723['as'],'attributes':_0x213723['attributes'],'include':_0x213723[_0x67c9('0x1e')]?_[_0x67c9('0x1d')](_0x213723[_0x67c9('0x1e')],function(_0x5ac225){return{'model':db[_0x5ac225[_0x67c9('0x1c')]],'as':_0x5ac225['as'],'attributes':_0x5ac225['attributes']};}):[]};}):[]};}):[]:[]})[_0x67c9('0xb')](function(_0x274426){logger[_0x67c9('0xc')](_0x67c9('0x1f'),_0x12544d);logger[_0x67c9('0xe')]('ShowZendeskAccount',_0x12544d,JSON[_0x67c9('0x11')](_0x274426));_0x12bd6b(_0x274426);})[_0x67c9('0x16')](function(_0x101f0b){logger['error'](_0x67c9('0x1f'),_0x101f0b[_0x67c9('0x14')],_0x12544d);_0x59b981(_0x4bab7f[_0x67c9('0x12')](0x1f4,_0x101f0b['message']));});});};
\ No newline at end of file
+var _0x2bc6=['util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','request','then','info','ZendeskAccount,\x20%s,\x20%s','request\x20sent','debug','ZendeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetZendeskAccount','ZendeskAccount','options','raw','where','attributes','map','include','model','ShowZendeskAccount','find','lodash'];(function(_0x52da1e,_0x57bfd9){var _0x589959=function(_0x52fe4d){while(--_0x52fe4d){_0x52da1e['push'](_0x52da1e['shift']());}};_0x589959(++_0x57bfd9);}(_0x2bc6,0x8b));var _0x62bc=function(_0xee7e43,_0x37c59a){_0xee7e43=_0xee7e43-0x0;var _0x25b4f4=_0x2bc6[_0xee7e43];return _0x25b4f4;};'use strict';var _=require(_0x62bc('0x0'));var util=require(_0x62bc('0x1'));var moment=require(_0x62bc('0x2'));var BPromise=require('bluebird');var rs=require(_0x62bc('0x3'));var fs=require('fs');var Redis=require(_0x62bc('0x4'));var db=require(_0x62bc('0x5'))['db'];var utils=require(_0x62bc('0x6'));var logger=require(_0x62bc('0x7'))(_0x62bc('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x62bc('0x9')][_0x62bc('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x5cdf6d,_0x151e5c,_0x1d806b){return new BPromise(function(_0xf90627,_0x5ea60f){return client[_0x62bc('0xb')](_0x5cdf6d,_0x1d806b)[_0x62bc('0xc')](function(_0x502d27){logger[_0x62bc('0xd')](_0x62bc('0xe'),_0x151e5c,_0x62bc('0xf'));logger[_0x62bc('0x10')](_0x62bc('0x11'),_0x151e5c,'request\x20sent',JSON[_0x62bc('0x12')](_0x502d27));if(_0x502d27[_0x62bc('0x13')]){if(_0x502d27[_0x62bc('0x13')][_0x62bc('0x14')]===0x1f4){logger[_0x62bc('0x13')]('ZendeskAccount,\x20%s,\x20%s',_0x151e5c,_0x502d27[_0x62bc('0x13')][_0x62bc('0x15')]);return _0x5ea60f(_0x502d27['error'][_0x62bc('0x15')]);}logger[_0x62bc('0x13')](_0x62bc('0xe'),_0x151e5c,_0x502d27[_0x62bc('0x13')][_0x62bc('0x15')]);return _0xf90627(_0x502d27[_0x62bc('0x13')][_0x62bc('0x15')]);}else{logger[_0x62bc('0xd')](_0x62bc('0xe'),_0x151e5c,_0x62bc('0xf'));_0xf90627(_0x502d27[_0x62bc('0x16')][_0x62bc('0x15')]);}})[_0x62bc('0x17')](function(_0x1f4689){logger[_0x62bc('0x13')](_0x62bc('0xe'),_0x151e5c,_0x1f4689);_0x5ea60f(_0x1f4689);});});}exports[_0x62bc('0x18')]=function(_0x414197){var _0x613dfa=this;return new Promise(function(_0x7af9a5,_0xb1ee17){return db[_0x62bc('0x19')]['findAll']({'raw':_0x414197['options']?_0x414197[_0x62bc('0x1a')][_0x62bc('0x1b')]===undefined?!![]:![]:!![],'where':_0x414197[_0x62bc('0x1a')]?_0x414197[_0x62bc('0x1a')][_0x62bc('0x1c')]||null:null,'attributes':_0x414197[_0x62bc('0x1a')]?_0x414197[_0x62bc('0x1a')][_0x62bc('0x1d')]||null:null,'limit':_0x414197[_0x62bc('0x1a')]?_0x414197['options']['limit']||null:null,'include':_0x414197['options']?_0x414197[_0x62bc('0x1a')]['include']?_[_0x62bc('0x1e')](_0x414197['options'][_0x62bc('0x1f')],function(_0x58e3ce){return{'model':db[_0x58e3ce['model']],'as':_0x58e3ce['as'],'attributes':_0x58e3ce['attributes'],'include':_0x58e3ce[_0x62bc('0x1f')]?_[_0x62bc('0x1e')](_0x58e3ce[_0x62bc('0x1f')],function(_0x3e1e3a){return{'model':db[_0x3e1e3a[_0x62bc('0x20')]],'as':_0x3e1e3a['as'],'attributes':_0x3e1e3a[_0x62bc('0x1d')],'include':_0x3e1e3a[_0x62bc('0x1f')]?_[_0x62bc('0x1e')](_0x3e1e3a[_0x62bc('0x1f')],function(_0x11f3c0){return{'model':db[_0x11f3c0['model']],'as':_0x11f3c0['as'],'attributes':_0x11f3c0[_0x62bc('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x62bc('0xc')](function(_0x4afa31){logger[_0x62bc('0xd')](_0x62bc('0x18'),_0x414197);logger['debug'](_0x62bc('0x18'),_0x414197,JSON['stringify'](_0x4afa31));_0x7af9a5(_0x4afa31);})[_0x62bc('0x17')](function(_0x3b17b2){logger[_0x62bc('0x13')](_0x62bc('0x18'),_0x3b17b2[_0x62bc('0x15')],_0x414197);_0xb1ee17(_0x613dfa[_0x62bc('0x13')](0x1f4,_0x3b17b2[_0x62bc('0x15')]));});});};exports[_0x62bc('0x21')]=function(_0x5a9514){var _0x25fb4b=this;return new Promise(function(_0x5c58a4,_0x4c37e2){return db[_0x62bc('0x19')][_0x62bc('0x22')]({'raw':_0x5a9514[_0x62bc('0x1a')]?_0x5a9514[_0x62bc('0x1a')][_0x62bc('0x1b')]===undefined?!![]:![]:!![],'where':_0x5a9514['options']?_0x5a9514[_0x62bc('0x1a')][_0x62bc('0x1c')]||null:null,'attributes':_0x5a9514[_0x62bc('0x1a')]?_0x5a9514[_0x62bc('0x1a')]['attributes']||null:null,'include':_0x5a9514[_0x62bc('0x1a')]?_0x5a9514['options']['include']?_[_0x62bc('0x1e')](_0x5a9514[_0x62bc('0x1a')][_0x62bc('0x1f')],function(_0x542f49){return{'model':db[_0x542f49[_0x62bc('0x20')]],'as':_0x542f49['as'],'attributes':_0x542f49[_0x62bc('0x1d')],'include':_0x542f49[_0x62bc('0x1f')]?_[_0x62bc('0x1e')](_0x542f49[_0x62bc('0x1f')],function(_0x2a1060){return{'model':db[_0x2a1060['model']],'as':_0x2a1060['as'],'attributes':_0x2a1060['attributes'],'include':_0x2a1060[_0x62bc('0x1f')]?_[_0x62bc('0x1e')](_0x2a1060[_0x62bc('0x1f')],function(_0x5e7fef){return{'model':db[_0x5e7fef[_0x62bc('0x20')]],'as':_0x5e7fef['as'],'attributes':_0x5e7fef[_0x62bc('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x62bc('0xc')](function(_0x8c7483){logger[_0x62bc('0xd')](_0x62bc('0x21'),_0x5a9514);logger[_0x62bc('0x10')](_0x62bc('0x21'),_0x5a9514,JSON[_0x62bc('0x12')](_0x8c7483));_0x5c58a4(_0x8c7483);})[_0x62bc('0x17')](function(_0x464a8e){logger['error'](_0x62bc('0x21'),_0x464a8e[_0x62bc('0x15')],_0x5a9514);_0x4c37e2(_0x25fb4b[_0x62bc('0x13')](0x1f4,_0x464a8e[_0x62bc('0x15')]));});});};
\ No newline at end of file
index 7510e00..02828ec 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(_0x43ff50,_0x5f0b8b){var _0x1cde02=function(_0x472f9b){while(--_0x472f9b){_0x43ff50['push'](_0x43ff50['shift']());}};_0x1cde02(++_0x5f0b8b);}(_0x4fc2,0x111));var _0x24fc=function(_0x7cf8ec,_0x57fd22){_0x7cf8ec=_0x7cf8ec-0x0;var _0x4a257a=_0x4fc2[_0x7cf8ec];return _0x4a257a;};'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 _0x0bb5=['put','delete','destroy','exports','multer','util','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intZendeskConfiguration.controller','get','/:id','isAuthenticated','show','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','/:id/tags','getTags','create','post','setTags'];(function(_0x5771c7,_0x3d65fe){var _0x31a571=function(_0x212452){while(--_0x212452){_0x5771c7['push'](_0x5771c7['shift']());}};_0x31a571(++_0x3d65fe);}(_0x0bb5,0x148));var _0x50bb=function(_0x16e37c,_0x46a4af){_0x16e37c=_0x16e37c-0x0;var _0x4243df=_0x0bb5[_0x16e37c];return _0x4243df;};'use strict';var multer=require(_0x50bb('0x0'));var util=require(_0x50bb('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x50bb('0x2'));var router=express[_0x50bb('0x3')]();var fs_extra=require(_0x50bb('0x4'));var auth=require(_0x50bb('0x5'));var interaction=require(_0x50bb('0x6'));var config=require(_0x50bb('0x7'));var controller=require(_0x50bb('0x8'));router[_0x50bb('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0x50bb('0x9')](_0x50bb('0xa'),auth[_0x50bb('0xb')](),controller[_0x50bb('0xc')]);router['get']('/:id/fields',auth[_0x50bb('0xb')](),controller[_0x50bb('0xd')]);router[_0x50bb('0x9')](_0x50bb('0xe'),auth['isAuthenticated'](),controller[_0x50bb('0xf')]);router[_0x50bb('0x9')](_0x50bb('0x10'),auth[_0x50bb('0xb')](),controller[_0x50bb('0x11')]);router[_0x50bb('0x9')](_0x50bb('0x12'),auth['isAuthenticated'](),controller[_0x50bb('0x13')]);router['post']('/',auth[_0x50bb('0xb')](),controller[_0x50bb('0x14')]);router[_0x50bb('0x15')]('/:id/tags',auth[_0x50bb('0xb')](),controller[_0x50bb('0x16')]);router[_0x50bb('0x17')]('/:id',auth[_0x50bb('0xb')](),controller['update']);router[_0x50bb('0x18')](_0x50bb('0xa'),auth[_0x50bb('0xb')](),controller[_0x50bb('0x19')]);module[_0x50bb('0x1a')]=router;
\ No newline at end of file
index 4bb5860..5d55249 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9df7=['STRING','sequelize','exports'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x9df7,0x145));var _0x79df=function(_0x3b711c,_0x4b22dc){_0x3b711c=_0x3b711c-0x0;var _0x2685f0=_0x9df7[_0x3b711c];return _0x2685f0;};'use strict';var Sequelize=require(_0x79df('0x0'));module[_0x79df('0x1')]={'name':{'type':Sequelize[_0x79df('0x2')]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x6faf=['STRING','sequelize','exports'];(function(_0x46c30c,_0x1ac896){var _0x45c5c1=function(_0x21ad77){while(--_0x21ad77){_0x46c30c['push'](_0x46c30c['shift']());}};_0x45c5c1(++_0x1ac896);}(_0x6faf,0x1c9));var _0xf6fa=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x6faf[_0x20a584];return _0x4b41a8;};'use strict';var Sequelize=require(_0xf6fa('0x0'));module[_0xf6fa('0x1')]={'name':{'type':Sequelize[_0xf6fa('0x2')]},'description':{'type':Sequelize[_0xf6fa('0x2')]}};
\ No newline at end of file
index d959b0d..75d7b8f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf688=['../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','status','offset','undefined','limit','count','json','reject','save','update','then','destroy','end','sendStatus','stack','send','index','map','ZendeskConfiguration','rawAttributes','fieldName','type','key','model','query','intersection','attributes','length','sort','where','filters','pick','filter','VIRTUAL','name','merge','options','includeAll','include','findAll','rows','catch','params','keys','fields','create','body','find','getFields','findOne','order','hasOwnProperty','nolimit','getSubjects','ZendeskField','getDescriptions','getTags','setTags','ids','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','to-csv','lodash','squel','crypto','desk.js','papaparse'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xf688,0x1dd));var _0x8f68=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xf688[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0x8f68('0x0'));var rimraf=require(_0x8f68('0x1'));var zipdir=require(_0x8f68('0x2'));var jsonpatch=require(_0x8f68('0x3'));var rp=require(_0x8f68('0x4'));var moment=require(_0x8f68('0x5'));var BPromise=require(_0x8f68('0x6'));var Mustache=require(_0x8f68('0x7'));var util=require(_0x8f68('0x8'));var path=require('path');var sox=require('sox');var csv=require(_0x8f68('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x8f68('0xa'));var squel=require(_0x8f68('0xb'));var crypto=require(_0x8f68('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x8f68('0xd'));var toCsv=require(_0x8f68('0x9'));var querystring=require('querystring');var Papa=require(_0x8f68('0xe'));var Redis=require('ioredis');var authService=require(_0x8f68('0xf'));var qs=require(_0x8f68('0x10'));var as=require(_0x8f68('0x11'));var hardwareService=require(_0x8f68('0x12'));var logger=require(_0x8f68('0x13'))(_0x8f68('0x14'));var utils=require('../../config/utils');var config=require(_0x8f68('0x15'));var licenseUtil=require(_0x8f68('0x16'));var db=require(_0x8f68('0x17'))['db'];function respondWithStatusCode(_0x189d9a,_0x51e335){_0x51e335=_0x51e335||0xcc;return function(_0x2eb956){if(_0x2eb956){return _0x189d9a['sendStatus'](_0x51e335);}return _0x189d9a[_0x8f68('0x18')](_0x51e335)['end']();};}function respondWithResult(_0x4cc4d8,_0x20fe18){_0x20fe18=_0x20fe18||0xc8;return function(_0x29008e){if(_0x29008e){return _0x4cc4d8[_0x8f68('0x18')](_0x20fe18)['json'](_0x29008e);}};}function respondWithFilteredResult(_0xa5f0b8,_0x251e31){return function(_0xf706ea){if(_0xf706ea){var _0x3877f1=typeof _0x251e31[_0x8f68('0x19')]===_0x8f68('0x1a')&&typeof _0x251e31[_0x8f68('0x1b')]==='undefined';var _0x2f32b0=_0xf706ea['count'];var _0x409624=_0x3877f1?0x0:_0x251e31['offset'];var _0x3554b2=_0x3877f1?_0xf706ea[_0x8f68('0x1c')]:_0x251e31[_0x8f68('0x19')]+_0x251e31[_0x8f68('0x1b')];var _0x36f130;if(_0x3554b2>=_0x2f32b0){_0x3554b2=_0x2f32b0;_0x36f130=0xc8;}else{_0x36f130=0xce;}_0xa5f0b8[_0x8f68('0x18')](_0x36f130);return _0xa5f0b8['set']('Content-Range',_0x409624+'-'+_0x3554b2+'/'+_0x2f32b0)[_0x8f68('0x1d')](_0xf706ea);}return null;};}function patchUpdates(_0x5bbbaf){return function(_0x47c1e3){try{jsonpatch['apply'](_0x47c1e3,_0x5bbbaf,!![]);}catch(_0x3d0aff){return BPromise[_0x8f68('0x1e')](_0x3d0aff);}return _0x47c1e3[_0x8f68('0x1f')]();};}function saveUpdates(_0x2769bc,_0x4ea14f){return function(_0x568a31){if(_0x568a31){return _0x568a31[_0x8f68('0x20')](_0x2769bc)[_0x8f68('0x21')](function(_0x4578fe){return _0x4578fe;});}return null;};}function removeEntity(_0x2116a7,_0x31c8c9){return function(_0x1dc727){if(_0x1dc727){return _0x1dc727[_0x8f68('0x22')]()[_0x8f68('0x21')](function(){_0x2116a7[_0x8f68('0x18')](0xcc)[_0x8f68('0x23')]();});}};}function handleEntityNotFound(_0x2787da,_0x1ed170){return function(_0xd6bb0b){if(!_0xd6bb0b){_0x2787da[_0x8f68('0x24')](0x194);}return _0xd6bb0b;};}function handleError(_0x483ac2,_0x24a95a){_0x24a95a=_0x24a95a||0x1f4;return function(_0x3450f2){logger['error'](_0x3450f2[_0x8f68('0x25')]);if(_0x3450f2['name']){delete _0x3450f2['name'];}_0x483ac2['status'](_0x24a95a)[_0x8f68('0x26')](_0x3450f2);};}exports[_0x8f68('0x27')]=function(_0x34ade8,_0x22ab02){var _0x21fcc9={},_0x472029={},_0x484531={'count':0x0,'rows':[]};var _0x2dc034=_[_0x8f68('0x28')](db[_0x8f68('0x29')][_0x8f68('0x2a')],function(_0x3720f0){return{'name':_0x3720f0[_0x8f68('0x2b')],'type':_0x3720f0[_0x8f68('0x2c')][_0x8f68('0x2d')]};});_0x472029[_0x8f68('0x2e')]=_['map'](_0x2dc034,'name');_0x472029[_0x8f68('0x2f')]=_['keys'](_0x34ade8[_0x8f68('0x2f')]);_0x472029['filters']=_[_0x8f68('0x30')](_0x472029['model'],_0x472029[_0x8f68('0x2f')]);_0x21fcc9[_0x8f68('0x31')]=_[_0x8f68('0x30')](_0x472029[_0x8f68('0x2e')],qs['fields'](_0x34ade8['query']['fields']));_0x21fcc9['attributes']=_0x21fcc9[_0x8f68('0x31')][_0x8f68('0x32')]?_0x21fcc9[_0x8f68('0x31')]:_0x472029[_0x8f68('0x2e')];if(!_0x34ade8[_0x8f68('0x2f')]['hasOwnProperty']('nolimit')){_0x21fcc9[_0x8f68('0x1b')]=qs[_0x8f68('0x1b')](_0x34ade8[_0x8f68('0x2f')][_0x8f68('0x1b')]);_0x21fcc9[_0x8f68('0x19')]=qs['offset'](_0x34ade8[_0x8f68('0x2f')][_0x8f68('0x19')]);}_0x21fcc9['order']=qs[_0x8f68('0x33')](_0x34ade8[_0x8f68('0x2f')][_0x8f68('0x33')]);_0x21fcc9[_0x8f68('0x34')]=qs[_0x8f68('0x35')](_[_0x8f68('0x36')](_0x34ade8['query'],_0x472029[_0x8f68('0x35')]),_0x2dc034);if(_0x34ade8[_0x8f68('0x2f')][_0x8f68('0x37')]){_0x21fcc9[_0x8f68('0x34')]=_['merge'](_0x21fcc9[_0x8f68('0x34')],{'$or':_[_0x8f68('0x28')](_0x2dc034,function(_0x3287b6){if(_0x3287b6['type']!==_0x8f68('0x38')){var _0x59c7ba={};_0x59c7ba[_0x3287b6[_0x8f68('0x39')]]={'$like':'%'+_0x34ade8[_0x8f68('0x2f')][_0x8f68('0x37')]+'%'};return _0x59c7ba;}})});}_0x21fcc9=_[_0x8f68('0x3a')]({},_0x21fcc9,_0x34ade8[_0x8f68('0x3b')]);var _0x6c520c={'where':_0x21fcc9[_0x8f68('0x34')]};return db[_0x8f68('0x29')]['count'](_0x6c520c)[_0x8f68('0x21')](function(_0x56b737){_0x484531[_0x8f68('0x1c')]=_0x56b737;if(_0x34ade8[_0x8f68('0x2f')][_0x8f68('0x3c')]){_0x21fcc9[_0x8f68('0x3d')]=[{'all':!![]}];}return db[_0x8f68('0x29')][_0x8f68('0x3e')](_0x21fcc9);})[_0x8f68('0x21')](function(_0x4c5da2){_0x484531[_0x8f68('0x3f')]=_0x4c5da2;return _0x484531;})[_0x8f68('0x21')](respondWithFilteredResult(_0x22ab02,_0x21fcc9))[_0x8f68('0x40')](handleError(_0x22ab02,null));};exports['show']=function(_0x44a125,_0x5df365){var _0x2ed68a={'raw':![],'where':{'id':_0x44a125[_0x8f68('0x41')]['id']}},_0x45d541={};_0x45d541['model']=_[_0x8f68('0x42')](db[_0x8f68('0x29')]['rawAttributes']);_0x45d541[_0x8f68('0x2f')]=_['keys'](_0x44a125[_0x8f68('0x2f')]);_0x45d541[_0x8f68('0x35')]=_[_0x8f68('0x30')](_0x45d541[_0x8f68('0x2e')],_0x45d541[_0x8f68('0x2f')]);_0x2ed68a['attributes']=_[_0x8f68('0x30')](_0x45d541[_0x8f68('0x2e')],qs['fields'](_0x44a125[_0x8f68('0x2f')][_0x8f68('0x43')]));_0x2ed68a[_0x8f68('0x31')]=_0x2ed68a[_0x8f68('0x31')][_0x8f68('0x32')]?_0x2ed68a[_0x8f68('0x31')]:_0x45d541[_0x8f68('0x2e')];if(_0x44a125[_0x8f68('0x2f')][_0x8f68('0x3c')]){_0x2ed68a[_0x8f68('0x3d')]=[{'all':!![]}];}_0x2ed68a=_[_0x8f68('0x3a')]({},_0x2ed68a,_0x44a125[_0x8f68('0x3b')]);return db['ZendeskConfiguration']['find'](_0x2ed68a)[_0x8f68('0x21')](handleEntityNotFound(_0x5df365,null))[_0x8f68('0x21')](respondWithResult(_0x5df365,null))['catch'](handleError(_0x5df365,null));};exports[_0x8f68('0x44')]=function(_0x2b47aa,_0x3e219a){return db[_0x8f68('0x29')][_0x8f68('0x44')](_0x2b47aa['body'],{})[_0x8f68('0x21')](respondWithResult(_0x3e219a,0xc9))[_0x8f68('0x40')](handleError(_0x3e219a,null));};exports[_0x8f68('0x20')]=function(_0x416e1b,_0x45120a){if(_0x416e1b[_0x8f68('0x45')]['id']){delete _0x416e1b['body']['id'];}return db[_0x8f68('0x29')]['find']({'where':{'id':_0x416e1b['params']['id']}})[_0x8f68('0x21')](handleEntityNotFound(_0x45120a,null))['then'](saveUpdates(_0x416e1b[_0x8f68('0x45')],null))[_0x8f68('0x21')](respondWithResult(_0x45120a,null))[_0x8f68('0x40')](handleError(_0x45120a,null));};exports[_0x8f68('0x22')]=function(_0x4347ad,_0x537287){return db['ZendeskConfiguration'][_0x8f68('0x46')]({'where':{'id':_0x4347ad[_0x8f68('0x41')]['id']}})[_0x8f68('0x21')](handleEntityNotFound(_0x537287,null))[_0x8f68('0x21')](removeEntity(_0x537287,null))[_0x8f68('0x40')](handleError(_0x537287,null));};exports[_0x8f68('0x47')]=function(_0x299e3e,_0x29396d,_0x2cb024){var _0xf1d30c={};var _0x385cfe={};var _0x499c62;var _0x3e713a;return db[_0x8f68('0x29')][_0x8f68('0x48')]({'where':{'id':_0x299e3e[_0x8f68('0x41')]['id']}})[_0x8f68('0x21')](handleEntityNotFound(_0x29396d,null))[_0x8f68('0x21')](function(_0x1993af){if(_0x1993af){_0x499c62=_0x1993af;_0x385cfe[_0x8f68('0x2e')]=_[_0x8f68('0x42')](db['ZendeskField'][_0x8f68('0x2a')]);_0x385cfe[_0x8f68('0x2f')]=_[_0x8f68('0x42')](_0x299e3e[_0x8f68('0x2f')]);_0x385cfe[_0x8f68('0x35')]=_['intersection'](_0x385cfe['model'],_0x385cfe[_0x8f68('0x2f')]);_0xf1d30c['attributes']=_['intersection'](_0x385cfe[_0x8f68('0x2e')],qs['fields'](_0x299e3e[_0x8f68('0x2f')][_0x8f68('0x43')]));_0xf1d30c[_0x8f68('0x31')]=_0xf1d30c[_0x8f68('0x31')][_0x8f68('0x32')]?_0xf1d30c['attributes']:_0x385cfe[_0x8f68('0x2e')];_0xf1d30c[_0x8f68('0x49')]=qs['sort'](_0x299e3e['query'][_0x8f68('0x33')]);_0xf1d30c[_0x8f68('0x34')]=qs[_0x8f68('0x35')](_[_0x8f68('0x36')](_0x299e3e[_0x8f68('0x2f')],_0x385cfe[_0x8f68('0x35')]));if(_0x299e3e[_0x8f68('0x2f')][_0x8f68('0x37')]){_0xf1d30c[_0x8f68('0x34')]=_[_0x8f68('0x3a')](_0xf1d30c[_0x8f68('0x34')],{'$or':_[_0x8f68('0x28')](_0xf1d30c[_0x8f68('0x31')],function(_0x21d9a4){var _0x389259={};_0x389259[_0x21d9a4]={'$like':'%'+_0x299e3e[_0x8f68('0x2f')][_0x8f68('0x37')]+'%'};return _0x389259;})});}_0xf1d30c=_[_0x8f68('0x3a')]({},_0xf1d30c,_0x299e3e[_0x8f68('0x3b')]);return _0x499c62[_0x8f68('0x47')](_0xf1d30c);}})[_0x8f68('0x21')](function(_0x3dce5a){if(_0x3dce5a){_0x3e713a=_0x3dce5a[_0x8f68('0x32')];if(!_0x299e3e[_0x8f68('0x2f')][_0x8f68('0x4a')](_0x8f68('0x4b'))){_0xf1d30c[_0x8f68('0x1b')]=qs[_0x8f68('0x1b')](_0x299e3e[_0x8f68('0x2f')]['limit']);_0xf1d30c[_0x8f68('0x19')]=qs[_0x8f68('0x19')](_0x299e3e['query'][_0x8f68('0x19')]);}return _0x499c62['getFields'](_0xf1d30c);}})[_0x8f68('0x21')](function(_0x17498d){if(_0x17498d){return _0x17498d?{'count':_0x3e713a,'rows':_0x17498d}:null;}})[_0x8f68('0x21')](respondWithResult(_0x29396d,null))[_0x8f68('0x40')](handleError(_0x29396d,null));};exports[_0x8f68('0x4c')]=function(_0x1406df,_0x1b7222,_0x1d8552){var _0x3cd9e6={};var _0xf4de8d={};var _0x5306f4;var _0x56be30;return db[_0x8f68('0x29')][_0x8f68('0x48')]({'where':{'id':_0x1406df[_0x8f68('0x41')]['id']}})['then'](handleEntityNotFound(_0x1b7222,null))['then'](function(_0x1cb22c){if(_0x1cb22c){_0x5306f4=_0x1cb22c;_0xf4de8d[_0x8f68('0x2e')]=_[_0x8f68('0x42')](db[_0x8f68('0x4d')][_0x8f68('0x2a')]);_0xf4de8d[_0x8f68('0x2f')]=_['keys'](_0x1406df[_0x8f68('0x2f')]);_0xf4de8d[_0x8f68('0x35')]=_[_0x8f68('0x30')](_0xf4de8d[_0x8f68('0x2e')],_0xf4de8d['query']);_0x3cd9e6[_0x8f68('0x31')]=_[_0x8f68('0x30')](_0xf4de8d[_0x8f68('0x2e')],qs[_0x8f68('0x43')](_0x1406df[_0x8f68('0x2f')][_0x8f68('0x43')]));_0x3cd9e6[_0x8f68('0x31')]=_0x3cd9e6[_0x8f68('0x31')]['length']?_0x3cd9e6['attributes']:_0xf4de8d['model'];_0x3cd9e6['order']=qs[_0x8f68('0x33')](_0x1406df[_0x8f68('0x2f')][_0x8f68('0x33')]);_0x3cd9e6['where']=qs[_0x8f68('0x35')](_[_0x8f68('0x36')](_0x1406df[_0x8f68('0x2f')],_0xf4de8d['filters']));if(_0x1406df[_0x8f68('0x2f')]['filter']){_0x3cd9e6[_0x8f68('0x34')]=_[_0x8f68('0x3a')](_0x3cd9e6[_0x8f68('0x34')],{'$or':_[_0x8f68('0x28')](_0x3cd9e6[_0x8f68('0x31')],function(_0x126857){var _0x49819b={};_0x49819b[_0x126857]={'$like':'%'+_0x1406df[_0x8f68('0x2f')]['filter']+'%'};return _0x49819b;})});}_0x3cd9e6=_[_0x8f68('0x3a')]({},_0x3cd9e6,_0x1406df['options']);return _0x5306f4[_0x8f68('0x4c')](_0x3cd9e6);}})['then'](function(_0x441ed1){if(_0x441ed1){_0x56be30=_0x441ed1[_0x8f68('0x32')];if(!_0x1406df[_0x8f68('0x2f')][_0x8f68('0x4a')](_0x8f68('0x4b'))){_0x3cd9e6[_0x8f68('0x1b')]=qs['limit'](_0x1406df[_0x8f68('0x2f')][_0x8f68('0x1b')]);_0x3cd9e6[_0x8f68('0x19')]=qs['offset'](_0x1406df['query']['offset']);}return _0x5306f4['getSubjects'](_0x3cd9e6);}})[_0x8f68('0x21')](function(_0x23e235){if(_0x23e235){return _0x23e235?{'count':_0x56be30,'rows':_0x23e235}:null;}})[_0x8f68('0x21')](respondWithResult(_0x1b7222,null))[_0x8f68('0x40')](handleError(_0x1b7222,null));};exports[_0x8f68('0x4e')]=function(_0x2f019d,_0x6cbb4f,_0x3fa2cc){var _0x2885d7={};var _0xcabe7c={};var _0x23dbe8;var _0x4c64f5;return db[_0x8f68('0x29')][_0x8f68('0x48')]({'where':{'id':_0x2f019d['params']['id']}})[_0x8f68('0x21')](handleEntityNotFound(_0x6cbb4f,null))[_0x8f68('0x21')](function(_0x228767){if(_0x228767){_0x23dbe8=_0x228767;_0xcabe7c[_0x8f68('0x2e')]=_[_0x8f68('0x42')](db[_0x8f68('0x4d')][_0x8f68('0x2a')]);_0xcabe7c['query']=_['keys'](_0x2f019d[_0x8f68('0x2f')]);_0xcabe7c['filters']=_[_0x8f68('0x30')](_0xcabe7c['model'],_0xcabe7c[_0x8f68('0x2f')]);_0x2885d7[_0x8f68('0x31')]=_[_0x8f68('0x30')](_0xcabe7c[_0x8f68('0x2e')],qs[_0x8f68('0x43')](_0x2f019d['query']['fields']));_0x2885d7[_0x8f68('0x31')]=_0x2885d7[_0x8f68('0x31')][_0x8f68('0x32')]?_0x2885d7[_0x8f68('0x31')]:_0xcabe7c[_0x8f68('0x2e')];_0x2885d7[_0x8f68('0x49')]=qs[_0x8f68('0x33')](_0x2f019d[_0x8f68('0x2f')]['sort']);_0x2885d7['where']=qs[_0x8f68('0x35')](_[_0x8f68('0x36')](_0x2f019d['query'],_0xcabe7c[_0x8f68('0x35')]));if(_0x2f019d[_0x8f68('0x2f')][_0x8f68('0x37')]){_0x2885d7[_0x8f68('0x34')]=_[_0x8f68('0x3a')](_0x2885d7[_0x8f68('0x34')],{'$or':_[_0x8f68('0x28')](_0x2885d7[_0x8f68('0x31')],function(_0x4fabd3){var _0xa76adc={};_0xa76adc[_0x4fabd3]={'$like':'%'+_0x2f019d['query'][_0x8f68('0x37')]+'%'};return _0xa76adc;})});}_0x2885d7=_['merge']({},_0x2885d7,_0x2f019d[_0x8f68('0x3b')]);return _0x23dbe8[_0x8f68('0x4e')](_0x2885d7);}})[_0x8f68('0x21')](function(_0x1a7f50){if(_0x1a7f50){_0x4c64f5=_0x1a7f50[_0x8f68('0x32')];if(!_0x2f019d[_0x8f68('0x2f')]['hasOwnProperty'](_0x8f68('0x4b'))){_0x2885d7['limit']=qs[_0x8f68('0x1b')](_0x2f019d['query'][_0x8f68('0x1b')]);_0x2885d7['offset']=qs['offset'](_0x2f019d[_0x8f68('0x2f')][_0x8f68('0x19')]);}return _0x23dbe8[_0x8f68('0x4e')](_0x2885d7);}})['then'](function(_0x53536d){if(_0x53536d){return _0x53536d?{'count':_0x4c64f5,'rows':_0x53536d}:null;}})[_0x8f68('0x21')](respondWithResult(_0x6cbb4f,null))[_0x8f68('0x40')](handleError(_0x6cbb4f,null));};exports[_0x8f68('0x4f')]=function(_0xb8bd09,_0x5aeff1,_0x3ca832){var _0x6c3c19={};var _0x1a212a={};var _0x3eba25;var _0x6eec09;return db[_0x8f68('0x29')]['findOne']({'where':{'id':_0xb8bd09[_0x8f68('0x41')]['id']}})[_0x8f68('0x21')](handleEntityNotFound(_0x5aeff1,null))['then'](function(_0x18aeae){if(_0x18aeae){_0x3eba25=_0x18aeae;_0x1a212a[_0x8f68('0x2e')]=_['keys'](db['Tag']['rawAttributes']);_0x1a212a[_0x8f68('0x2f')]=_[_0x8f68('0x42')](_0xb8bd09[_0x8f68('0x2f')]);_0x1a212a['filters']=_['intersection'](_0x1a212a[_0x8f68('0x2e')],_0x1a212a[_0x8f68('0x2f')]);_0x6c3c19[_0x8f68('0x31')]=_[_0x8f68('0x30')](_0x1a212a[_0x8f68('0x2e')],qs[_0x8f68('0x43')](_0xb8bd09[_0x8f68('0x2f')]['fields']));_0x6c3c19[_0x8f68('0x31')]=_0x6c3c19[_0x8f68('0x31')][_0x8f68('0x32')]?_0x6c3c19[_0x8f68('0x31')]:_0x1a212a['model'];_0x6c3c19[_0x8f68('0x49')]=qs[_0x8f68('0x33')](_0xb8bd09['query'][_0x8f68('0x33')]);_0x6c3c19[_0x8f68('0x34')]=qs['filters'](_['pick'](_0xb8bd09[_0x8f68('0x2f')],_0x1a212a[_0x8f68('0x35')]));if(_0xb8bd09[_0x8f68('0x2f')]['filter']){_0x6c3c19[_0x8f68('0x34')]=_[_0x8f68('0x3a')](_0x6c3c19[_0x8f68('0x34')],{'$or':_['map'](_0x6c3c19[_0x8f68('0x31')],function(_0x2c3b4f){var _0xcdbdc7={};_0xcdbdc7[_0x2c3b4f]={'$like':'%'+_0xb8bd09[_0x8f68('0x2f')][_0x8f68('0x37')]+'%'};return _0xcdbdc7;})});}_0x6c3c19=_[_0x8f68('0x3a')]({},_0x6c3c19,_0xb8bd09[_0x8f68('0x3b')]);return _0x3eba25[_0x8f68('0x4f')](_0x6c3c19);}})['then'](function(_0x59982f){if(_0x59982f){_0x6eec09=_0x59982f[_0x8f68('0x32')];if(!_0xb8bd09['query'][_0x8f68('0x4a')](_0x8f68('0x4b'))){_0x6c3c19[_0x8f68('0x1b')]=qs[_0x8f68('0x1b')](_0xb8bd09[_0x8f68('0x2f')][_0x8f68('0x1b')]);_0x6c3c19['offset']=qs[_0x8f68('0x19')](_0xb8bd09[_0x8f68('0x2f')][_0x8f68('0x19')]);}return _0x3eba25[_0x8f68('0x4f')](_0x6c3c19);}})[_0x8f68('0x21')](function(_0x469321){if(_0x469321){return _0x469321?{'count':_0x6eec09,'rows':_0x469321}:null;}})[_0x8f68('0x21')](respondWithResult(_0x5aeff1,null))[_0x8f68('0x40')](handleError(_0x5aeff1,null));};exports[_0x8f68('0x50')]=function(_0x5edf68,_0x5b4b37,_0x200765){if(_0x5edf68[_0x8f68('0x45')]['id']){delete _0x5edf68[_0x8f68('0x45')]['id'];}return db['ZendeskConfiguration']['findOne']({'where':{'id':_0x5edf68['params']['id']}})[_0x8f68('0x21')](handleEntityNotFound(_0x5b4b37,null))[_0x8f68('0x21')](function(_0x8d86f5){if(_0x8d86f5){return _0x8d86f5['setTags'](_0x5edf68[_0x8f68('0x45')][_0x8f68('0x51')]||[]);}return null;})[_0x8f68('0x21')](respondWithResult(_0x5b4b37,null))[_0x8f68('0x40')](handleError(_0x5b4b37,null));};
\ No newline at end of file
+var _0xc67f=['filters','intersection','query','attributes','fields','length','hasOwnProperty','order','sort','where','pick','VIRTUAL','filter','merge','options','count','findAll','rows','catch','show','params','keys','includeAll','include','find','create','body','findOne','ZendeskField','nolimit','getFields','getSubjects','getDescriptions','getTags','setTags','ids','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','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/environment','../../mysqldb','sendStatus','status','end','offset','undefined','limit','set','Content-Range','apply','save','update','then','destroy','stack','name','send','index','map','ZendeskConfiguration','rawAttributes','type','key','model'];(function(_0x5700be,_0x4b6136){var _0x31e915=function(_0x3be5f4){while(--_0x3be5f4){_0x5700be['push'](_0x5700be['shift']());}};_0x31e915(++_0x4b6136);}(_0xc67f,0x180));var _0xfc67=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xc67f[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0xfc67('0x0'));var rimraf=require(_0xfc67('0x1'));var zipdir=require(_0xfc67('0x2'));var jsonpatch=require(_0xfc67('0x3'));var rp=require(_0xfc67('0x4'));var moment=require(_0xfc67('0x5'));var BPromise=require(_0xfc67('0x6'));var Mustache=require(_0xfc67('0x7'));var util=require(_0xfc67('0x8'));var path=require(_0xfc67('0x9'));var sox=require(_0xfc67('0xa'));var csv=require(_0xfc67('0xb'));var ejs=require(_0xfc67('0xc'));var fs=require('fs');var fs_extra=require(_0xfc67('0xd'));var _=require(_0xfc67('0xe'));var squel=require(_0xfc67('0xf'));var crypto=require('crypto');var jsforce=require(_0xfc67('0x10'));var deskjs=require(_0xfc67('0x11'));var toCsv=require(_0xfc67('0xb'));var querystring=require(_0xfc67('0x12'));var Papa=require(_0xfc67('0x13'));var Redis=require(_0xfc67('0x14'));var authService=require(_0xfc67('0x15'));var qs=require(_0xfc67('0x16'));var as=require(_0xfc67('0x17'));var hardwareService=require(_0xfc67('0x18'));var logger=require('../../config/logger')(_0xfc67('0x19'));var utils=require('../../config/utils');var config=require(_0xfc67('0x1a'));var licenseUtil=require('../../config/license/util');var db=require(_0xfc67('0x1b'))['db'];function respondWithStatusCode(_0xb9bb0b,_0x1c538f){_0x1c538f=_0x1c538f||0xcc;return function(_0x4227af){if(_0x4227af){return _0xb9bb0b[_0xfc67('0x1c')](_0x1c538f);}return _0xb9bb0b[_0xfc67('0x1d')](_0x1c538f)[_0xfc67('0x1e')]();};}function respondWithResult(_0x1bd2a3,_0xd845){_0xd845=_0xd845||0xc8;return function(_0x5a66b1){if(_0x5a66b1){return _0x1bd2a3['status'](_0xd845)['json'](_0x5a66b1);}};}function respondWithFilteredResult(_0x13f141,_0x1e5ae4){return function(_0x5c4f99){if(_0x5c4f99){var _0x3ddae4=typeof _0x1e5ae4[_0xfc67('0x1f')]===_0xfc67('0x20')&&typeof _0x1e5ae4['limit']===_0xfc67('0x20');var _0x1354aa=_0x5c4f99['count'];var _0x1e6b01=_0x3ddae4?0x0:_0x1e5ae4[_0xfc67('0x1f')];var _0x3ebb75=_0x3ddae4?_0x5c4f99['count']:_0x1e5ae4[_0xfc67('0x1f')]+_0x1e5ae4[_0xfc67('0x21')];var _0x4720b2;if(_0x3ebb75>=_0x1354aa){_0x3ebb75=_0x1354aa;_0x4720b2=0xc8;}else{_0x4720b2=0xce;}_0x13f141[_0xfc67('0x1d')](_0x4720b2);return _0x13f141[_0xfc67('0x22')](_0xfc67('0x23'),_0x1e6b01+'-'+_0x3ebb75+'/'+_0x1354aa)['json'](_0x5c4f99);}return null;};}function patchUpdates(_0x42ced3){return function(_0x3c9874){try{jsonpatch[_0xfc67('0x24')](_0x3c9874,_0x42ced3,!![]);}catch(_0x245df7){return BPromise['reject'](_0x245df7);}return _0x3c9874[_0xfc67('0x25')]();};}function saveUpdates(_0x489b58,_0x18e35b){return function(_0x976f82){if(_0x976f82){return _0x976f82[_0xfc67('0x26')](_0x489b58)[_0xfc67('0x27')](function(_0x40cdd8){return _0x40cdd8;});}return null;};}function removeEntity(_0x503bbe,_0x5b9112){return function(_0x425f5e){if(_0x425f5e){return _0x425f5e[_0xfc67('0x28')]()[_0xfc67('0x27')](function(){_0x503bbe[_0xfc67('0x1d')](0xcc)[_0xfc67('0x1e')]();});}};}function handleEntityNotFound(_0x42f7be,_0x2e93b5){return function(_0x57a4fb){if(!_0x57a4fb){_0x42f7be[_0xfc67('0x1c')](0x194);}return _0x57a4fb;};}function handleError(_0xc3c94c,_0x59c75e){_0x59c75e=_0x59c75e||0x1f4;return function(_0x22599d){logger['error'](_0x22599d[_0xfc67('0x29')]);if(_0x22599d[_0xfc67('0x2a')]){delete _0x22599d[_0xfc67('0x2a')];}_0xc3c94c[_0xfc67('0x1d')](_0x59c75e)[_0xfc67('0x2b')](_0x22599d);};}exports[_0xfc67('0x2c')]=function(_0x456ba2,_0x3194d9){var _0x3bd4aa={},_0x3e571b={},_0x1ce08d={'count':0x0,'rows':[]};var _0x1887f1=_[_0xfc67('0x2d')](db[_0xfc67('0x2e')][_0xfc67('0x2f')],function(_0x588abf){return{'name':_0x588abf['fieldName'],'type':_0x588abf[_0xfc67('0x30')][_0xfc67('0x31')]};});_0x3e571b[_0xfc67('0x32')]=_[_0xfc67('0x2d')](_0x1887f1,_0xfc67('0x2a'));_0x3e571b['query']=_['keys'](_0x456ba2['query']);_0x3e571b[_0xfc67('0x33')]=_[_0xfc67('0x34')](_0x3e571b[_0xfc67('0x32')],_0x3e571b[_0xfc67('0x35')]);_0x3bd4aa[_0xfc67('0x36')]=_['intersection'](_0x3e571b[_0xfc67('0x32')],qs[_0xfc67('0x37')](_0x456ba2['query'][_0xfc67('0x37')]));_0x3bd4aa[_0xfc67('0x36')]=_0x3bd4aa[_0xfc67('0x36')][_0xfc67('0x38')]?_0x3bd4aa[_0xfc67('0x36')]:_0x3e571b[_0xfc67('0x32')];if(!_0x456ba2[_0xfc67('0x35')][_0xfc67('0x39')]('nolimit')){_0x3bd4aa[_0xfc67('0x21')]=qs['limit'](_0x456ba2[_0xfc67('0x35')][_0xfc67('0x21')]);_0x3bd4aa[_0xfc67('0x1f')]=qs[_0xfc67('0x1f')](_0x456ba2['query'][_0xfc67('0x1f')]);}_0x3bd4aa[_0xfc67('0x3a')]=qs[_0xfc67('0x3b')](_0x456ba2['query']['sort']);_0x3bd4aa[_0xfc67('0x3c')]=qs[_0xfc67('0x33')](_[_0xfc67('0x3d')](_0x456ba2[_0xfc67('0x35')],_0x3e571b[_0xfc67('0x33')]),_0x1887f1);if(_0x456ba2[_0xfc67('0x35')]['filter']){_0x3bd4aa['where']=_['merge'](_0x3bd4aa[_0xfc67('0x3c')],{'$or':_['map'](_0x1887f1,function(_0x5e497d){if(_0x5e497d[_0xfc67('0x30')]!==_0xfc67('0x3e')){var _0x400e0b={};_0x400e0b[_0x5e497d[_0xfc67('0x2a')]]={'$like':'%'+_0x456ba2[_0xfc67('0x35')][_0xfc67('0x3f')]+'%'};return _0x400e0b;}})});}_0x3bd4aa=_[_0xfc67('0x40')]({},_0x3bd4aa,_0x456ba2[_0xfc67('0x41')]);var _0x4c7d7a={'where':_0x3bd4aa['where']};return db[_0xfc67('0x2e')]['count'](_0x4c7d7a)[_0xfc67('0x27')](function(_0x2483c5){_0x1ce08d[_0xfc67('0x42')]=_0x2483c5;if(_0x456ba2[_0xfc67('0x35')]['includeAll']){_0x3bd4aa['include']=[{'all':!![]}];}return db[_0xfc67('0x2e')][_0xfc67('0x43')](_0x3bd4aa);})['then'](function(_0x106308){_0x1ce08d[_0xfc67('0x44')]=_0x106308;return _0x1ce08d;})[_0xfc67('0x27')](respondWithFilteredResult(_0x3194d9,_0x3bd4aa))[_0xfc67('0x45')](handleError(_0x3194d9,null));};exports[_0xfc67('0x46')]=function(_0x37c091,_0x5bd4b1){var _0x52fb5e={'raw':![],'where':{'id':_0x37c091[_0xfc67('0x47')]['id']}},_0x152faa={};_0x152faa[_0xfc67('0x32')]=_['keys'](db[_0xfc67('0x2e')][_0xfc67('0x2f')]);_0x152faa[_0xfc67('0x35')]=_[_0xfc67('0x48')](_0x37c091[_0xfc67('0x35')]);_0x152faa[_0xfc67('0x33')]=_[_0xfc67('0x34')](_0x152faa['model'],_0x152faa['query']);_0x52fb5e[_0xfc67('0x36')]=_['intersection'](_0x152faa[_0xfc67('0x32')],qs[_0xfc67('0x37')](_0x37c091[_0xfc67('0x35')][_0xfc67('0x37')]));_0x52fb5e[_0xfc67('0x36')]=_0x52fb5e[_0xfc67('0x36')][_0xfc67('0x38')]?_0x52fb5e[_0xfc67('0x36')]:_0x152faa[_0xfc67('0x32')];if(_0x37c091['query'][_0xfc67('0x49')]){_0x52fb5e[_0xfc67('0x4a')]=[{'all':!![]}];}_0x52fb5e=_[_0xfc67('0x40')]({},_0x52fb5e,_0x37c091[_0xfc67('0x41')]);return db[_0xfc67('0x2e')][_0xfc67('0x4b')](_0x52fb5e)[_0xfc67('0x27')](handleEntityNotFound(_0x5bd4b1,null))[_0xfc67('0x27')](respondWithResult(_0x5bd4b1,null))['catch'](handleError(_0x5bd4b1,null));};exports[_0xfc67('0x4c')]=function(_0x437ebe,_0x4b46c5){return db[_0xfc67('0x2e')][_0xfc67('0x4c')](_0x437ebe[_0xfc67('0x4d')],{})[_0xfc67('0x27')](respondWithResult(_0x4b46c5,0xc9))[_0xfc67('0x45')](handleError(_0x4b46c5,null));};exports['update']=function(_0x2c1483,_0x471420){if(_0x2c1483[_0xfc67('0x4d')]['id']){delete _0x2c1483[_0xfc67('0x4d')]['id'];}return db[_0xfc67('0x2e')][_0xfc67('0x4b')]({'where':{'id':_0x2c1483[_0xfc67('0x47')]['id']}})['then'](handleEntityNotFound(_0x471420,null))[_0xfc67('0x27')](saveUpdates(_0x2c1483[_0xfc67('0x4d')],null))[_0xfc67('0x27')](respondWithResult(_0x471420,null))[_0xfc67('0x45')](handleError(_0x471420,null));};exports[_0xfc67('0x28')]=function(_0x411c34,_0x285e4c){return db[_0xfc67('0x2e')][_0xfc67('0x4b')]({'where':{'id':_0x411c34[_0xfc67('0x47')]['id']}})['then'](handleEntityNotFound(_0x285e4c,null))[_0xfc67('0x27')](removeEntity(_0x285e4c,null))['catch'](handleError(_0x285e4c,null));};exports['getFields']=function(_0x39d337,_0x3e27b5,_0x576cb5){var _0x343243={};var _0x10c067={};var _0x154667;var _0xb30650;return db[_0xfc67('0x2e')][_0xfc67('0x4e')]({'where':{'id':_0x39d337[_0xfc67('0x47')]['id']}})[_0xfc67('0x27')](handleEntityNotFound(_0x3e27b5,null))[_0xfc67('0x27')](function(_0x386c93){if(_0x386c93){_0x154667=_0x386c93;_0x10c067[_0xfc67('0x32')]=_[_0xfc67('0x48')](db[_0xfc67('0x4f')][_0xfc67('0x2f')]);_0x10c067[_0xfc67('0x35')]=_['keys'](_0x39d337[_0xfc67('0x35')]);_0x10c067[_0xfc67('0x33')]=_[_0xfc67('0x34')](_0x10c067[_0xfc67('0x32')],_0x10c067[_0xfc67('0x35')]);_0x343243[_0xfc67('0x36')]=_[_0xfc67('0x34')](_0x10c067[_0xfc67('0x32')],qs[_0xfc67('0x37')](_0x39d337[_0xfc67('0x35')][_0xfc67('0x37')]));_0x343243['attributes']=_0x343243[_0xfc67('0x36')]['length']?_0x343243[_0xfc67('0x36')]:_0x10c067[_0xfc67('0x32')];_0x343243[_0xfc67('0x3a')]=qs[_0xfc67('0x3b')](_0x39d337[_0xfc67('0x35')][_0xfc67('0x3b')]);_0x343243[_0xfc67('0x3c')]=qs[_0xfc67('0x33')](_['pick'](_0x39d337[_0xfc67('0x35')],_0x10c067[_0xfc67('0x33')]));if(_0x39d337[_0xfc67('0x35')][_0xfc67('0x3f')]){_0x343243['where']=_['merge'](_0x343243['where'],{'$or':_[_0xfc67('0x2d')](_0x343243[_0xfc67('0x36')],function(_0x898a48){var _0x52433a={};_0x52433a[_0x898a48]={'$like':'%'+_0x39d337[_0xfc67('0x35')][_0xfc67('0x3f')]+'%'};return _0x52433a;})});}_0x343243=_[_0xfc67('0x40')]({},_0x343243,_0x39d337[_0xfc67('0x41')]);return _0x154667['getFields'](_0x343243);}})[_0xfc67('0x27')](function(_0x368027){if(_0x368027){_0xb30650=_0x368027[_0xfc67('0x38')];if(!_0x39d337['query'][_0xfc67('0x39')](_0xfc67('0x50'))){_0x343243['limit']=qs[_0xfc67('0x21')](_0x39d337[_0xfc67('0x35')][_0xfc67('0x21')]);_0x343243[_0xfc67('0x1f')]=qs['offset'](_0x39d337[_0xfc67('0x35')][_0xfc67('0x1f')]);}return _0x154667[_0xfc67('0x51')](_0x343243);}})['then'](function(_0xe5b76c){if(_0xe5b76c){return _0xe5b76c?{'count':_0xb30650,'rows':_0xe5b76c}:null;}})[_0xfc67('0x27')](respondWithResult(_0x3e27b5,null))['catch'](handleError(_0x3e27b5,null));};exports['getSubjects']=function(_0x1810ec,_0x4c5822,_0x286249){var _0x36892b={};var _0x10a79a={};var _0x1895ba;var _0x4b4d09;return db[_0xfc67('0x2e')]['findOne']({'where':{'id':_0x1810ec['params']['id']}})['then'](handleEntityNotFound(_0x4c5822,null))[_0xfc67('0x27')](function(_0x51d4b7){if(_0x51d4b7){_0x1895ba=_0x51d4b7;_0x10a79a[_0xfc67('0x32')]=_['keys'](db['ZendeskField'][_0xfc67('0x2f')]);_0x10a79a['query']=_[_0xfc67('0x48')](_0x1810ec[_0xfc67('0x35')]);_0x10a79a['filters']=_['intersection'](_0x10a79a[_0xfc67('0x32')],_0x10a79a[_0xfc67('0x35')]);_0x36892b[_0xfc67('0x36')]=_[_0xfc67('0x34')](_0x10a79a['model'],qs[_0xfc67('0x37')](_0x1810ec[_0xfc67('0x35')][_0xfc67('0x37')]));_0x36892b[_0xfc67('0x36')]=_0x36892b[_0xfc67('0x36')]['length']?_0x36892b['attributes']:_0x10a79a[_0xfc67('0x32')];_0x36892b[_0xfc67('0x3a')]=qs[_0xfc67('0x3b')](_0x1810ec[_0xfc67('0x35')]['sort']);_0x36892b['where']=qs[_0xfc67('0x33')](_[_0xfc67('0x3d')](_0x1810ec[_0xfc67('0x35')],_0x10a79a[_0xfc67('0x33')]));if(_0x1810ec['query'][_0xfc67('0x3f')]){_0x36892b[_0xfc67('0x3c')]=_[_0xfc67('0x40')](_0x36892b[_0xfc67('0x3c')],{'$or':_[_0xfc67('0x2d')](_0x36892b[_0xfc67('0x36')],function(_0x3ee798){var _0x1087af={};_0x1087af[_0x3ee798]={'$like':'%'+_0x1810ec[_0xfc67('0x35')][_0xfc67('0x3f')]+'%'};return _0x1087af;})});}_0x36892b=_[_0xfc67('0x40')]({},_0x36892b,_0x1810ec[_0xfc67('0x41')]);return _0x1895ba[_0xfc67('0x52')](_0x36892b);}})[_0xfc67('0x27')](function(_0x5ce6f3){if(_0x5ce6f3){_0x4b4d09=_0x5ce6f3[_0xfc67('0x38')];if(!_0x1810ec[_0xfc67('0x35')][_0xfc67('0x39')](_0xfc67('0x50'))){_0x36892b[_0xfc67('0x21')]=qs['limit'](_0x1810ec[_0xfc67('0x35')][_0xfc67('0x21')]);_0x36892b['offset']=qs['offset'](_0x1810ec[_0xfc67('0x35')][_0xfc67('0x1f')]);}return _0x1895ba['getSubjects'](_0x36892b);}})[_0xfc67('0x27')](function(_0x4330df){if(_0x4330df){return _0x4330df?{'count':_0x4b4d09,'rows':_0x4330df}:null;}})[_0xfc67('0x27')](respondWithResult(_0x4c5822,null))[_0xfc67('0x45')](handleError(_0x4c5822,null));};exports['getDescriptions']=function(_0x57599f,_0x4015cb,_0x28cff3){var _0x3190b6={};var _0x42a94e={};var _0x17f94d;var _0x2b334f;return db[_0xfc67('0x2e')][_0xfc67('0x4e')]({'where':{'id':_0x57599f['params']['id']}})[_0xfc67('0x27')](handleEntityNotFound(_0x4015cb,null))[_0xfc67('0x27')](function(_0x266373){if(_0x266373){_0x17f94d=_0x266373;_0x42a94e[_0xfc67('0x32')]=_[_0xfc67('0x48')](db[_0xfc67('0x4f')][_0xfc67('0x2f')]);_0x42a94e[_0xfc67('0x35')]=_[_0xfc67('0x48')](_0x57599f[_0xfc67('0x35')]);_0x42a94e['filters']=_[_0xfc67('0x34')](_0x42a94e[_0xfc67('0x32')],_0x42a94e[_0xfc67('0x35')]);_0x3190b6['attributes']=_['intersection'](_0x42a94e[_0xfc67('0x32')],qs[_0xfc67('0x37')](_0x57599f[_0xfc67('0x35')][_0xfc67('0x37')]));_0x3190b6[_0xfc67('0x36')]=_0x3190b6[_0xfc67('0x36')][_0xfc67('0x38')]?_0x3190b6[_0xfc67('0x36')]:_0x42a94e[_0xfc67('0x32')];_0x3190b6[_0xfc67('0x3a')]=qs[_0xfc67('0x3b')](_0x57599f[_0xfc67('0x35')][_0xfc67('0x3b')]);_0x3190b6[_0xfc67('0x3c')]=qs['filters'](_[_0xfc67('0x3d')](_0x57599f[_0xfc67('0x35')],_0x42a94e[_0xfc67('0x33')]));if(_0x57599f[_0xfc67('0x35')][_0xfc67('0x3f')]){_0x3190b6[_0xfc67('0x3c')]=_[_0xfc67('0x40')](_0x3190b6[_0xfc67('0x3c')],{'$or':_[_0xfc67('0x2d')](_0x3190b6[_0xfc67('0x36')],function(_0x3be67e){var _0xa58e55={};_0xa58e55[_0x3be67e]={'$like':'%'+_0x57599f[_0xfc67('0x35')][_0xfc67('0x3f')]+'%'};return _0xa58e55;})});}_0x3190b6=_[_0xfc67('0x40')]({},_0x3190b6,_0x57599f[_0xfc67('0x41')]);return _0x17f94d[_0xfc67('0x53')](_0x3190b6);}})['then'](function(_0x491761){if(_0x491761){_0x2b334f=_0x491761[_0xfc67('0x38')];if(!_0x57599f[_0xfc67('0x35')][_0xfc67('0x39')](_0xfc67('0x50'))){_0x3190b6[_0xfc67('0x21')]=qs[_0xfc67('0x21')](_0x57599f[_0xfc67('0x35')][_0xfc67('0x21')]);_0x3190b6['offset']=qs[_0xfc67('0x1f')](_0x57599f[_0xfc67('0x35')][_0xfc67('0x1f')]);}return _0x17f94d[_0xfc67('0x53')](_0x3190b6);}})[_0xfc67('0x27')](function(_0x26c910){if(_0x26c910){return _0x26c910?{'count':_0x2b334f,'rows':_0x26c910}:null;}})[_0xfc67('0x27')](respondWithResult(_0x4015cb,null))[_0xfc67('0x45')](handleError(_0x4015cb,null));};exports[_0xfc67('0x54')]=function(_0x442a7c,_0x47b785,_0x43b37f){var _0x20b95d={};var _0x487f37={};var _0x26acbc;var _0xfed8af;return db['ZendeskConfiguration'][_0xfc67('0x4e')]({'where':{'id':_0x442a7c[_0xfc67('0x47')]['id']}})[_0xfc67('0x27')](handleEntityNotFound(_0x47b785,null))[_0xfc67('0x27')](function(_0x5017e6){if(_0x5017e6){_0x26acbc=_0x5017e6;_0x487f37[_0xfc67('0x32')]=_['keys'](db['Tag']['rawAttributes']);_0x487f37[_0xfc67('0x35')]=_[_0xfc67('0x48')](_0x442a7c[_0xfc67('0x35')]);_0x487f37['filters']=_['intersection'](_0x487f37[_0xfc67('0x32')],_0x487f37[_0xfc67('0x35')]);_0x20b95d['attributes']=_[_0xfc67('0x34')](_0x487f37[_0xfc67('0x32')],qs[_0xfc67('0x37')](_0x442a7c[_0xfc67('0x35')]['fields']));_0x20b95d['attributes']=_0x20b95d[_0xfc67('0x36')]['length']?_0x20b95d[_0xfc67('0x36')]:_0x487f37[_0xfc67('0x32')];_0x20b95d[_0xfc67('0x3a')]=qs[_0xfc67('0x3b')](_0x442a7c['query']['sort']);_0x20b95d[_0xfc67('0x3c')]=qs['filters'](_[_0xfc67('0x3d')](_0x442a7c[_0xfc67('0x35')],_0x487f37[_0xfc67('0x33')]));if(_0x442a7c['query'][_0xfc67('0x3f')]){_0x20b95d['where']=_['merge'](_0x20b95d[_0xfc67('0x3c')],{'$or':_[_0xfc67('0x2d')](_0x20b95d['attributes'],function(_0x10bc15){var _0xbe598b={};_0xbe598b[_0x10bc15]={'$like':'%'+_0x442a7c[_0xfc67('0x35')][_0xfc67('0x3f')]+'%'};return _0xbe598b;})});}_0x20b95d=_['merge']({},_0x20b95d,_0x442a7c[_0xfc67('0x41')]);return _0x26acbc[_0xfc67('0x54')](_0x20b95d);}})[_0xfc67('0x27')](function(_0x43e183){if(_0x43e183){_0xfed8af=_0x43e183[_0xfc67('0x38')];if(!_0x442a7c[_0xfc67('0x35')][_0xfc67('0x39')](_0xfc67('0x50'))){_0x20b95d[_0xfc67('0x21')]=qs['limit'](_0x442a7c[_0xfc67('0x35')]['limit']);_0x20b95d[_0xfc67('0x1f')]=qs['offset'](_0x442a7c[_0xfc67('0x35')][_0xfc67('0x1f')]);}return _0x26acbc[_0xfc67('0x54')](_0x20b95d);}})[_0xfc67('0x27')](function(_0x4e841b){if(_0x4e841b){return _0x4e841b?{'count':_0xfed8af,'rows':_0x4e841b}:null;}})[_0xfc67('0x27')](respondWithResult(_0x47b785,null))[_0xfc67('0x45')](handleError(_0x47b785,null));};exports[_0xfc67('0x55')]=function(_0x257948,_0x4743d,_0x52789a){if(_0x257948[_0xfc67('0x4d')]['id']){delete _0x257948['body']['id'];}return db['ZendeskConfiguration'][_0xfc67('0x4e')]({'where':{'id':_0x257948[_0xfc67('0x47')]['id']}})[_0xfc67('0x27')](handleEntityNotFound(_0x4743d,null))[_0xfc67('0x27')](function(_0x185abd){if(_0x185abd){return _0x185abd[_0xfc67('0x55')](_0x257948[_0xfc67('0x4d')][_0xfc67('0x56')]||[]);}return null;})[_0xfc67('0x27')](respondWithResult(_0x4743d,null))['catch'](handleError(_0x4743d,null));};
\ No newline at end of file
index 75af50a..41c8a0f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xef0f=['moment','request-promise','path','rimraf','./intZendeskConfiguration.attributes','exports','define','ZendeskConfiguration','lodash','../../config/logger','api'];(function(_0x33670a,_0x55e188){var _0x36ad1d=function(_0x3cacbb){while(--_0x3cacbb){_0x33670a['push'](_0x33670a['shift']());}};_0x36ad1d(++_0x55e188);}(_0xef0f,0x168));var _0xfef0=function(_0x14331b,_0x180782){_0x14331b=_0x14331b-0x0;var _0x4aeb58=_0xef0f[_0x14331b];return _0x4aeb58;};'use strict';var _=require(_0xfef0('0x0'));var util=require('util');var logger=require(_0xfef0('0x1'))(_0xfef0('0x2'));var moment=require(_0xfef0('0x3'));var BPromise=require('bluebird');var rp=require(_0xfef0('0x4'));var fs=require('fs');var path=require(_0xfef0('0x5'));var rimraf=require(_0xfef0('0x6'));var config=require('../../config/environment');var attributes=require(_0xfef0('0x7'));module[_0xfef0('0x8')]=function(_0x2697df,_0x315a8c){return _0x2697df[_0xfef0('0x9')](_0xfef0('0xa'),attributes,{'tableName':'int_zendesk_configurations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x77e6=['path','../../config/environment','./intZendeskConfiguration.attributes','define','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x1da454,_0x3d5991){var _0x34ed29=function(_0xb7c5de){while(--_0xb7c5de){_0x1da454['push'](_0x1da454['shift']());}};_0x34ed29(++_0x3d5991);}(_0x77e6,0x1a6));var _0x677e=function(_0x14dc94,_0x4de889){_0x14dc94=_0x14dc94-0x0;var _0x5302a2=_0x77e6[_0x14dc94];return _0x5302a2;};'use strict';var _=require(_0x677e('0x0'));var util=require(_0x677e('0x1'));var logger=require(_0x677e('0x2'))(_0x677e('0x3'));var moment=require(_0x677e('0x4'));var BPromise=require(_0x677e('0x5'));var rp=require(_0x677e('0x6'));var fs=require('fs');var path=require(_0x677e('0x7'));var rimraf=require('rimraf');var config=require(_0x677e('0x8'));var attributes=require(_0x677e('0x9'));module['exports']=function(_0x18c5e1,_0x591b21){return _0x18c5e1[_0x677e('0xa')]('ZendeskConfiguration',attributes,{'tableName':'int_zendesk_configurations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 0c11d46..d3284f1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf022=['then','info','ZendeskConfiguration,\x20%s,\x20%s','debug','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','http','request'];(function(_0x5cd305,_0x1ea740){var _0x5b677e=function(_0xfc6c83){while(--_0xfc6c83){_0x5cd305['push'](_0x5cd305['shift']());}};_0x5b677e(++_0x1ea740);}(_0xf022,0x106));var _0x2f02=function(_0x475eac,_0x2fa495){_0x475eac=_0x475eac-0x0;var _0x4ad158=_0xf022[_0x475eac];return _0x4ad158;};'use strict';var _=require(_0x2f02('0x0'));var util=require('util');var moment=require(_0x2f02('0x1'));var BPromise=require(_0x2f02('0x2'));var rs=require(_0x2f02('0x3'));var fs=require('fs');var Redis=require(_0x2f02('0x4'));var db=require(_0x2f02('0x5'))['db'];var utils=require(_0x2f02('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x2f02('0x7'));var jayson=require(_0x2f02('0x8'));var client=jayson['client'][_0x2f02('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x332427,_0x14cc98,_0x3e5c80){return new BPromise(function(_0x1ef288,_0x5e6d8e){return client[_0x2f02('0xa')](_0x332427,_0x3e5c80)[_0x2f02('0xb')](function(_0x5d9622){logger[_0x2f02('0xc')](_0x2f02('0xd'),_0x14cc98,'request\x20sent');logger[_0x2f02('0xe')](_0x2f02('0xf'),_0x14cc98,_0x2f02('0x10'),JSON[_0x2f02('0x11')](_0x5d9622));if(_0x5d9622['error']){if(_0x5d9622[_0x2f02('0x12')]['code']===0x1f4){logger['error'](_0x2f02('0xd'),_0x14cc98,_0x5d9622[_0x2f02('0x12')][_0x2f02('0x13')]);return _0x5e6d8e(_0x5d9622[_0x2f02('0x12')][_0x2f02('0x13')]);}logger[_0x2f02('0x12')]('ZendeskConfiguration,\x20%s,\x20%s',_0x14cc98,_0x5d9622[_0x2f02('0x12')][_0x2f02('0x13')]);return _0x1ef288(_0x5d9622[_0x2f02('0x12')][_0x2f02('0x13')]);}else{logger[_0x2f02('0xc')](_0x2f02('0xd'),_0x14cc98,_0x2f02('0x10'));_0x1ef288(_0x5d9622['result'][_0x2f02('0x13')]);}})[_0x2f02('0x14')](function(_0xf79ee6){logger[_0x2f02('0x12')](_0x2f02('0xd'),_0x14cc98,_0xf79ee6);_0x5e6d8e(_0xf79ee6);});});}
\ No newline at end of file
+var _0x77ff=['catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','ZendeskConfiguration,\x20%s,\x20%s','message'];(function(_0x325673,_0x13c10b){var _0x741c5b=function(_0x33eeb2){while(--_0x33eeb2){_0x325673['push'](_0x325673['shift']());}};_0x741c5b(++_0x13c10b);}(_0x77ff,0x65));var _0xf77f=function(_0x42a5a7,_0x5a7809){_0x42a5a7=_0x42a5a7-0x0;var _0x10709f=_0x77ff[_0x42a5a7];return _0x10709f;};'use strict';var _=require(_0xf77f('0x0'));var util=require(_0xf77f('0x1'));var moment=require(_0xf77f('0x2'));var BPromise=require(_0xf77f('0x3'));var rs=require(_0xf77f('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf77f('0x5'))['db'];var utils=require(_0xf77f('0x6'));var logger=require(_0xf77f('0x7'))(_0xf77f('0x8'));var config=require(_0xf77f('0x9'));var jayson=require(_0xf77f('0xa'));var client=jayson[_0xf77f('0xb')][_0xf77f('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x5c702e,_0x36b297,_0x3a2dea){return new BPromise(function(_0x4a45d9,_0x662d93){return client[_0xf77f('0xd')](_0x5c702e,_0x3a2dea)[_0xf77f('0xe')](function(_0x163a5e){logger[_0xf77f('0xf')]('ZendeskConfiguration,\x20%s,\x20%s',_0x36b297,_0xf77f('0x10'));logger[_0xf77f('0x11')](_0xf77f('0x12'),_0x36b297,_0xf77f('0x10'),JSON[_0xf77f('0x13')](_0x163a5e));if(_0x163a5e[_0xf77f('0x14')]){if(_0x163a5e['error'][_0xf77f('0x15')]===0x1f4){logger[_0xf77f('0x14')](_0xf77f('0x16'),_0x36b297,_0x163a5e[_0xf77f('0x14')][_0xf77f('0x17')]);return _0x662d93(_0x163a5e[_0xf77f('0x14')][_0xf77f('0x17')]);}logger['error'](_0xf77f('0x16'),_0x36b297,_0x163a5e[_0xf77f('0x14')][_0xf77f('0x17')]);return _0x4a45d9(_0x163a5e[_0xf77f('0x14')][_0xf77f('0x17')]);}else{logger[_0xf77f('0xf')](_0xf77f('0x16'),_0x36b297,_0xf77f('0x10'));_0x4a45d9(_0x163a5e['result'][_0xf77f('0x17')]);}})[_0xf77f('0x18')](function(_0x1f4b56){logger[_0xf77f('0x14')]('ZendeskConfiguration,\x20%s,\x20%s',_0x36b297,_0x1f4b56);_0x662d93(_0x1f4b56);});});}
\ No newline at end of file
index 1551240..7a4874f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x63ee=['../../components/auth/service','../../config/environment','./intZendeskField.controller','get','/:id','isAuthenticated','show','create','update','delete','destroy','exports','multer','Router','fs-extra'];(function(_0x2c1686,_0x132dd9){var _0x31db0c=function(_0x4afbd3){while(--_0x4afbd3){_0x2c1686['push'](_0x2c1686['shift']());}};_0x31db0c(++_0x132dd9);}(_0x63ee,0x156));var _0xe63e=function(_0x1911ed,_0x4e8c73){_0x1911ed=_0x1911ed-0x0;var _0x11edaa=_0x63ee[_0x1911ed];return _0x11edaa;};'use strict';var multer=require(_0xe63e('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0xe63e('0x1')]();var fs_extra=require(_0xe63e('0x2'));var auth=require(_0xe63e('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0xe63e('0x4'));var controller=require(_0xe63e('0x5'));router[_0xe63e('0x6')]('/',auth['isAuthenticated'](),controller['index']);router[_0xe63e('0x6')](_0xe63e('0x7'),auth[_0xe63e('0x8')](),controller[_0xe63e('0x9')]);router['post']('/',auth[_0xe63e('0x8')](),controller[_0xe63e('0xa')]);router['put']('/:id',auth[_0xe63e('0x8')](),controller[_0xe63e('0xb')]);router[_0xe63e('0xc')]('/:id',auth[_0xe63e('0x8')](),controller[_0xe63e('0xd')]);module[_0xe63e('0xe')]=router;
\ No newline at end of file
+var _0xd811=['index','/:id','isAuthenticated','show','create','put','update','delete','multer','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./intZendeskField.controller','get'];(function(_0x12bc0d,_0x1e40ca){var _0x18cf40=function(_0x7517e4){while(--_0x7517e4){_0x12bc0d['push'](_0x12bc0d['shift']());}};_0x18cf40(++_0x1e40ca);}(_0xd811,0x104));var _0x1d81=function(_0x1afda3,_0xf74e14){_0x1afda3=_0x1afda3-0x0;var _0x454b7c=_0xd811[_0x1afda3];return _0x454b7c;};'use strict';var multer=require(_0x1d81('0x0'));var util=require('util');var path=require(_0x1d81('0x1'));var timeout=require(_0x1d81('0x2'));var express=require(_0x1d81('0x3'));var router=express[_0x1d81('0x4')]();var fs_extra=require(_0x1d81('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x1d81('0x6'));var config=require(_0x1d81('0x7'));var controller=require(_0x1d81('0x8'));router[_0x1d81('0x9')]('/',auth['isAuthenticated'](),controller[_0x1d81('0xa')]);router['get'](_0x1d81('0xb'),auth[_0x1d81('0xc')](),controller[_0x1d81('0xd')]);router['post']('/',auth['isAuthenticated'](),controller[_0x1d81('0xe')]);router[_0x1d81('0xf')](_0x1d81('0xb'),auth['isAuthenticated'](),controller[_0x1d81('0x10')]);router[_0x1d81('0x11')]('/:id',auth[_0x1d81('0xc')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
index 5cab693..e3bb2b4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf145=['variable','STRING','customVariable','BOOLEAN','exports','ENUM','string'];(function(_0x5a65ff,_0x4bfe7a){var _0x146039=function(_0x382015){while(--_0x382015){_0x5a65ff['push'](_0x5a65ff['shift']());}};_0x146039(++_0x4bfe7a);}(_0xf145,0x162));var _0x5f14=function(_0x26721d,_0x448ba5){_0x26721d=_0x26721d-0x0;var _0x1035c5=_0xf145[_0x26721d];return _0x1035c5;};'use strict';var Sequelize=require('sequelize');module[_0x5f14('0x0')]={'type':{'type':Sequelize[_0x5f14('0x1')](_0x5f14('0x2'),_0x5f14('0x3'),'customVariable','keyValue','picklist'),'defaultValue':'string'},'content':{'type':Sequelize[_0x5f14('0x4')]},'key':{'type':Sequelize[_0x5f14('0x4')]},'keyType':{'type':Sequelize[_0x5f14('0x1')](_0x5f14('0x2'),_0x5f14('0x3'),_0x5f14('0x5'))},'keyContent':{'type':Sequelize[_0x5f14('0x4')]},'idField':{'type':Sequelize[_0x5f14('0x4')]},'nameField':{'type':Sequelize[_0x5f14('0x4')]},'customField':{'type':Sequelize[_0x5f14('0x6')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x36ab=['keyValue','STRING','customVariable','BOOLEAN','sequelize','ENUM','string','variable'];(function(_0x1e6bc1,_0x1e3986){var _0x1d148c=function(_0x4a7023){while(--_0x4a7023){_0x1e6bc1['push'](_0x1e6bc1['shift']());}};_0x1d148c(++_0x1e3986);}(_0x36ab,0xbc));var _0xb36a=function(_0x5e36d1,_0x471178){_0x5e36d1=_0x5e36d1-0x0;var _0x950b9e=_0x36ab[_0x5e36d1];return _0x950b9e;};'use strict';var Sequelize=require(_0xb36a('0x0'));module['exports']={'type':{'type':Sequelize[_0xb36a('0x1')](_0xb36a('0x2'),_0xb36a('0x3'),'customVariable',_0xb36a('0x4'),'picklist'),'defaultValue':'string'},'content':{'type':Sequelize[_0xb36a('0x5')]},'key':{'type':Sequelize[_0xb36a('0x5')]},'keyType':{'type':Sequelize[_0xb36a('0x1')](_0xb36a('0x2'),_0xb36a('0x3'),_0xb36a('0x6'))},'keyContent':{'type':Sequelize[_0xb36a('0x5')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0xb36a('0x5')]},'customField':{'type':Sequelize[_0xb36a('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
index 653e4eb..c73687c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb73c=['destroy','then','end','error','name','send','index','ZendeskField','fieldName','type','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','VIRTUAL','filter','merge','options','includeAll','include','findAll','rows','show','find','catch','create','body','update','params','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../mysqldb','sendStatus','status','offset','undefined','count','limit','set'];(function(_0x5e05c5,_0x28ead7){var _0x4f470c=function(_0x58277f){while(--_0x58277f){_0x5e05c5['push'](_0x5e05c5['shift']());}};_0x4f470c(++_0x28ead7);}(_0xb73c,0x1cd));var _0xcb73=function(_0x5530ab,_0x1424d7){_0x5530ab=_0x5530ab-0x0;var _0x3e9c4a=_0xb73c[_0x5530ab];return _0x3e9c4a;};'use strict';var emlformat=require(_0xcb73('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xcb73('0x1'));var jsonpatch=require(_0xcb73('0x2'));var rp=require(_0xcb73('0x3'));var moment=require(_0xcb73('0x4'));var BPromise=require(_0xcb73('0x5'));var Mustache=require(_0xcb73('0x6'));var util=require(_0xcb73('0x7'));var path=require('path');var sox=require(_0xcb73('0x8'));var csv=require(_0xcb73('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xcb73('0xa'));var crypto=require(_0xcb73('0xb'));var jsforce=require(_0xcb73('0xc'));var deskjs=require(_0xcb73('0xd'));var toCsv=require(_0xcb73('0x9'));var querystring=require(_0xcb73('0xe'));var Papa=require('papaparse');var Redis=require(_0xcb73('0xf'));var authService=require('../../components/auth/service');var qs=require(_0xcb73('0x10'));var as=require(_0xcb73('0x11'));var hardwareService=require(_0xcb73('0x12'));var logger=require(_0xcb73('0x13'))(_0xcb73('0x14'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xcb73('0x15'))['db'];function respondWithStatusCode(_0x2b5c6c,_0x57a641){_0x57a641=_0x57a641||0xcc;return function(_0x13b556){if(_0x13b556){return _0x2b5c6c[_0xcb73('0x16')](_0x57a641);}return _0x2b5c6c[_0xcb73('0x17')](_0x57a641)['end']();};}function respondWithResult(_0x572959,_0x3223af){_0x3223af=_0x3223af||0xc8;return function(_0x521fd5){if(_0x521fd5){return _0x572959['status'](_0x3223af)['json'](_0x521fd5);}};}function respondWithFilteredResult(_0x12b639,_0x382225){return function(_0x52c261){if(_0x52c261){var _0x378039=typeof _0x382225[_0xcb73('0x18')]===_0xcb73('0x19')&&typeof _0x382225['limit']===_0xcb73('0x19');var _0x4c2a01=_0x52c261[_0xcb73('0x1a')];var _0x58ba6d=_0x378039?0x0:_0x382225[_0xcb73('0x18')];var _0x58f64b=_0x378039?_0x52c261[_0xcb73('0x1a')]:_0x382225[_0xcb73('0x18')]+_0x382225[_0xcb73('0x1b')];var _0x3155f7;if(_0x58f64b>=_0x4c2a01){_0x58f64b=_0x4c2a01;_0x3155f7=0xc8;}else{_0x3155f7=0xce;}_0x12b639['status'](_0x3155f7);return _0x12b639[_0xcb73('0x1c')]('Content-Range',_0x58ba6d+'-'+_0x58f64b+'/'+_0x4c2a01)['json'](_0x52c261);}return null;};}function patchUpdates(_0xc8ce90){return function(_0x5b13fd){try{jsonpatch['apply'](_0x5b13fd,_0xc8ce90,!![]);}catch(_0x6f82b9){return BPromise['reject'](_0x6f82b9);}return _0x5b13fd['save']();};}function saveUpdates(_0x35b1e5,_0xf23366){return function(_0x54c6fc){if(_0x54c6fc){return _0x54c6fc['update'](_0x35b1e5)['then'](function(_0x564bad){return _0x564bad;});}return null;};}function removeEntity(_0x1aca68,_0x38e042){return function(_0x2e9f5a){if(_0x2e9f5a){return _0x2e9f5a[_0xcb73('0x1d')]()[_0xcb73('0x1e')](function(){_0x1aca68[_0xcb73('0x17')](0xcc)[_0xcb73('0x1f')]();});}};}function handleEntityNotFound(_0x66db1d,_0x10c215){return function(_0x166608){if(!_0x166608){_0x66db1d[_0xcb73('0x16')](0x194);}return _0x166608;};}function handleError(_0x5efe04,_0xc42ca){_0xc42ca=_0xc42ca||0x1f4;return function(_0x171067){logger[_0xcb73('0x20')](_0x171067['stack']);if(_0x171067[_0xcb73('0x21')]){delete _0x171067[_0xcb73('0x21')];}_0x5efe04[_0xcb73('0x17')](_0xc42ca)[_0xcb73('0x22')](_0x171067);};}exports[_0xcb73('0x23')]=function(_0x2ae37a,_0x12366f){var _0x12a610={},_0x4287d6={},_0x536600={'count':0x0,'rows':[]};var _0x4a5011=_['map'](db[_0xcb73('0x24')]['rawAttributes'],function(_0x25a62b){return{'name':_0x25a62b[_0xcb73('0x25')],'type':_0x25a62b[_0xcb73('0x26')][_0xcb73('0x27')]};});_0x4287d6[_0xcb73('0x28')]=_[_0xcb73('0x29')](_0x4a5011,'name');_0x4287d6[_0xcb73('0x2a')]=_[_0xcb73('0x2b')](_0x2ae37a[_0xcb73('0x2a')]);_0x4287d6[_0xcb73('0x2c')]=_[_0xcb73('0x2d')](_0x4287d6[_0xcb73('0x28')],_0x4287d6[_0xcb73('0x2a')]);_0x12a610[_0xcb73('0x2e')]=_[_0xcb73('0x2d')](_0x4287d6['model'],qs['fields'](_0x2ae37a[_0xcb73('0x2a')][_0xcb73('0x2f')]));_0x12a610[_0xcb73('0x2e')]=_0x12a610[_0xcb73('0x2e')][_0xcb73('0x30')]?_0x12a610[_0xcb73('0x2e')]:_0x4287d6['model'];if(!_0x2ae37a[_0xcb73('0x2a')][_0xcb73('0x31')](_0xcb73('0x32'))){_0x12a610[_0xcb73('0x1b')]=qs[_0xcb73('0x1b')](_0x2ae37a[_0xcb73('0x2a')]['limit']);_0x12a610[_0xcb73('0x18')]=qs[_0xcb73('0x18')](_0x2ae37a[_0xcb73('0x2a')]['offset']);}_0x12a610[_0xcb73('0x33')]=qs['sort'](_0x2ae37a[_0xcb73('0x2a')][_0xcb73('0x34')]);_0x12a610[_0xcb73('0x35')]=qs[_0xcb73('0x2c')](_[_0xcb73('0x36')](_0x2ae37a[_0xcb73('0x2a')],_0x4287d6['filters']),_0x4a5011);if(_0x2ae37a[_0xcb73('0x2a')]['filter']){_0x12a610[_0xcb73('0x35')]=_['merge'](_0x12a610['where'],{'$or':_[_0xcb73('0x29')](_0x4a5011,function(_0x6a6abf){if(_0x6a6abf[_0xcb73('0x26')]!==_0xcb73('0x37')){var _0xde6791={};_0xde6791[_0x6a6abf['name']]={'$like':'%'+_0x2ae37a[_0xcb73('0x2a')][_0xcb73('0x38')]+'%'};return _0xde6791;}})});}_0x12a610=_[_0xcb73('0x39')]({},_0x12a610,_0x2ae37a[_0xcb73('0x3a')]);var _0x55b970={'where':_0x12a610[_0xcb73('0x35')]};return db[_0xcb73('0x24')][_0xcb73('0x1a')](_0x55b970)[_0xcb73('0x1e')](function(_0xe56725){_0x536600[_0xcb73('0x1a')]=_0xe56725;if(_0x2ae37a[_0xcb73('0x2a')][_0xcb73('0x3b')]){_0x12a610[_0xcb73('0x3c')]=[{'all':!![]}];}return db[_0xcb73('0x24')][_0xcb73('0x3d')](_0x12a610);})[_0xcb73('0x1e')](function(_0x5dc055){_0x536600[_0xcb73('0x3e')]=_0x5dc055;return _0x536600;})[_0xcb73('0x1e')](respondWithFilteredResult(_0x12366f,_0x12a610))['catch'](handleError(_0x12366f,null));};exports[_0xcb73('0x3f')]=function(_0x49fb80,_0xfc068f){var _0x2073fa={'raw':!![],'where':{'id':_0x49fb80['params']['id']}},_0xe5601d={};_0xe5601d['model']=_[_0xcb73('0x2b')](db[_0xcb73('0x24')]['rawAttributes']);_0xe5601d['query']=_[_0xcb73('0x2b')](_0x49fb80[_0xcb73('0x2a')]);_0xe5601d[_0xcb73('0x2c')]=_[_0xcb73('0x2d')](_0xe5601d['model'],_0xe5601d[_0xcb73('0x2a')]);_0x2073fa['attributes']=_[_0xcb73('0x2d')](_0xe5601d['model'],qs[_0xcb73('0x2f')](_0x49fb80['query'][_0xcb73('0x2f')]));_0x2073fa[_0xcb73('0x2e')]=_0x2073fa['attributes'][_0xcb73('0x30')]?_0x2073fa['attributes']:_0xe5601d['model'];if(_0x49fb80['query']['includeAll']){_0x2073fa[_0xcb73('0x3c')]=[{'all':!![]}];}_0x2073fa=_[_0xcb73('0x39')]({},_0x2073fa,_0x49fb80['options']);return db[_0xcb73('0x24')][_0xcb73('0x40')](_0x2073fa)[_0xcb73('0x1e')](handleEntityNotFound(_0xfc068f,null))[_0xcb73('0x1e')](respondWithResult(_0xfc068f,null))[_0xcb73('0x41')](handleError(_0xfc068f,null));};exports['create']=function(_0x1e45d6,_0x1ca0d6){return db[_0xcb73('0x24')][_0xcb73('0x42')](_0x1e45d6[_0xcb73('0x43')],{})['then'](respondWithResult(_0x1ca0d6,0xc9))['catch'](handleError(_0x1ca0d6,null));};exports[_0xcb73('0x44')]=function(_0x228d4d,_0x1700d0){if(_0x228d4d[_0xcb73('0x43')]['id']){delete _0x228d4d[_0xcb73('0x43')]['id'];}return db[_0xcb73('0x24')][_0xcb73('0x40')]({'where':{'id':_0x228d4d[_0xcb73('0x45')]['id']}})[_0xcb73('0x1e')](handleEntityNotFound(_0x1700d0,null))[_0xcb73('0x1e')](saveUpdates(_0x228d4d[_0xcb73('0x43')],null))[_0xcb73('0x1e')](respondWithResult(_0x1700d0,null))['catch'](handleError(_0x1700d0,null));};exports[_0xcb73('0x1d')]=function(_0x123f8c,_0x1a5879){return db['ZendeskField'][_0xcb73('0x40')]({'where':{'id':_0x123f8c['params']['id']}})[_0xcb73('0x1e')](handleEntityNotFound(_0x1a5879,null))['then'](removeEntity(_0x1a5879,null))['catch'](handleError(_0x1a5879,null));};
\ No newline at end of file
+var _0x53d5=['zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','limit','undefined','offset','count','set','Content-Range','apply','reject','save','then','destroy','error','name','index','ZendeskField','fieldName','type','key','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','where','pick','filter','merge','options','includeAll','include','findAll','rows','catch','show','params','keys','rawAttributes','find','create','body','update','eml-format','rimraf'];(function(_0x3fbcf9,_0x528109){var _0x4413bf=function(_0x1983d1){while(--_0x1983d1){_0x3fbcf9['push'](_0x3fbcf9['shift']());}};_0x4413bf(++_0x528109);}(_0x53d5,0x1cc));var _0x553d=function(_0x41de93,_0x54761e){_0x41de93=_0x41de93-0x0;var _0x492bd8=_0x53d5[_0x41de93];return _0x492bd8;};'use strict';var emlformat=require(_0x553d('0x0'));var rimraf=require(_0x553d('0x1'));var zipdir=require(_0x553d('0x2'));var jsonpatch=require(_0x553d('0x3'));var rp=require(_0x553d('0x4'));var moment=require(_0x553d('0x5'));var BPromise=require(_0x553d('0x6'));var Mustache=require('mustache');var util=require(_0x553d('0x7'));var path=require(_0x553d('0x8'));var sox=require(_0x553d('0x9'));var csv=require(_0x553d('0xa'));var ejs=require(_0x553d('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x553d('0xc'));var squel=require(_0x553d('0xd'));var crypto=require(_0x553d('0xe'));var jsforce=require(_0x553d('0xf'));var deskjs=require(_0x553d('0x10'));var toCsv=require(_0x553d('0xa'));var querystring=require(_0x553d('0x11'));var Papa=require(_0x553d('0x12'));var Redis=require(_0x553d('0x13'));var authService=require(_0x553d('0x14'));var qs=require(_0x553d('0x15'));var as=require(_0x553d('0x16'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x553d('0x17'));var utils=require('../../config/utils');var config=require(_0x553d('0x18'));var licenseUtil=require(_0x553d('0x19'));var db=require(_0x553d('0x1a'))['db'];function respondWithStatusCode(_0x1a54ea,_0x41f6c1){_0x41f6c1=_0x41f6c1||0xcc;return function(_0x4285c0){if(_0x4285c0){return _0x1a54ea[_0x553d('0x1b')](_0x41f6c1);}return _0x1a54ea[_0x553d('0x1c')](_0x41f6c1)[_0x553d('0x1d')]();};}function respondWithResult(_0x32b169,_0x3cb13c){_0x3cb13c=_0x3cb13c||0xc8;return function(_0xd11e74){if(_0xd11e74){return _0x32b169['status'](_0x3cb13c)[_0x553d('0x1e')](_0xd11e74);}};}function respondWithFilteredResult(_0x5caa96,_0x1d4f35){return function(_0x2de0c1){if(_0x2de0c1){var _0x12b505=typeof _0x1d4f35['offset']==='undefined'&&typeof _0x1d4f35[_0x553d('0x1f')]===_0x553d('0x20');var _0x2857c5=_0x2de0c1['count'];var _0x2ab468=_0x12b505?0x0:_0x1d4f35[_0x553d('0x21')];var _0x343ce5=_0x12b505?_0x2de0c1[_0x553d('0x22')]:_0x1d4f35[_0x553d('0x21')]+_0x1d4f35[_0x553d('0x1f')];var _0x719651;if(_0x343ce5>=_0x2857c5){_0x343ce5=_0x2857c5;_0x719651=0xc8;}else{_0x719651=0xce;}_0x5caa96[_0x553d('0x1c')](_0x719651);return _0x5caa96[_0x553d('0x23')](_0x553d('0x24'),_0x2ab468+'-'+_0x343ce5+'/'+_0x2857c5)[_0x553d('0x1e')](_0x2de0c1);}return null;};}function patchUpdates(_0x4950e7){return function(_0x11bc86){try{jsonpatch[_0x553d('0x25')](_0x11bc86,_0x4950e7,!![]);}catch(_0x4c5f0f){return BPromise[_0x553d('0x26')](_0x4c5f0f);}return _0x11bc86[_0x553d('0x27')]();};}function saveUpdates(_0x4d00e3,_0x5bbd2d){return function(_0x4a6e0e){if(_0x4a6e0e){return _0x4a6e0e['update'](_0x4d00e3)[_0x553d('0x28')](function(_0x53b217){return _0x53b217;});}return null;};}function removeEntity(_0x82dd3a,_0xacc984){return function(_0x2e4f1b){if(_0x2e4f1b){return _0x2e4f1b[_0x553d('0x29')]()[_0x553d('0x28')](function(){_0x82dd3a['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x2caed9,_0x491dc2){return function(_0x576c56){if(!_0x576c56){_0x2caed9[_0x553d('0x1b')](0x194);}return _0x576c56;};}function handleError(_0x517a1c,_0x677832){_0x677832=_0x677832||0x1f4;return function(_0x2c0484){logger[_0x553d('0x2a')](_0x2c0484['stack']);if(_0x2c0484[_0x553d('0x2b')]){delete _0x2c0484[_0x553d('0x2b')];}_0x517a1c[_0x553d('0x1c')](_0x677832)['send'](_0x2c0484);};}exports[_0x553d('0x2c')]=function(_0x39943d,_0x2bf05d){var _0x50fbc3={},_0x37ddd7={},_0x180a66={'count':0x0,'rows':[]};var _0xc3d157=_['map'](db[_0x553d('0x2d')]['rawAttributes'],function(_0x174fea){return{'name':_0x174fea[_0x553d('0x2e')],'type':_0x174fea[_0x553d('0x2f')][_0x553d('0x30')]};});_0x37ddd7[_0x553d('0x31')]=_[_0x553d('0x32')](_0xc3d157,_0x553d('0x2b'));_0x37ddd7[_0x553d('0x33')]=_['keys'](_0x39943d[_0x553d('0x33')]);_0x37ddd7[_0x553d('0x34')]=_[_0x553d('0x35')](_0x37ddd7[_0x553d('0x31')],_0x37ddd7[_0x553d('0x33')]);_0x50fbc3[_0x553d('0x36')]=_[_0x553d('0x35')](_0x37ddd7[_0x553d('0x31')],qs['fields'](_0x39943d[_0x553d('0x33')][_0x553d('0x37')]));_0x50fbc3[_0x553d('0x36')]=_0x50fbc3['attributes'][_0x553d('0x38')]?_0x50fbc3[_0x553d('0x36')]:_0x37ddd7[_0x553d('0x31')];if(!_0x39943d[_0x553d('0x33')][_0x553d('0x39')](_0x553d('0x3a'))){_0x50fbc3[_0x553d('0x1f')]=qs[_0x553d('0x1f')](_0x39943d['query']['limit']);_0x50fbc3[_0x553d('0x21')]=qs[_0x553d('0x21')](_0x39943d['query'][_0x553d('0x21')]);}_0x50fbc3['order']=qs['sort'](_0x39943d[_0x553d('0x33')]['sort']);_0x50fbc3[_0x553d('0x3b')]=qs['filters'](_[_0x553d('0x3c')](_0x39943d[_0x553d('0x33')],_0x37ddd7['filters']),_0xc3d157);if(_0x39943d['query'][_0x553d('0x3d')]){_0x50fbc3[_0x553d('0x3b')]=_[_0x553d('0x3e')](_0x50fbc3[_0x553d('0x3b')],{'$or':_['map'](_0xc3d157,function(_0x19ed0e){if(_0x19ed0e[_0x553d('0x2f')]!=='VIRTUAL'){var _0xfac8ee={};_0xfac8ee[_0x19ed0e['name']]={'$like':'%'+_0x39943d[_0x553d('0x33')][_0x553d('0x3d')]+'%'};return _0xfac8ee;}})});}_0x50fbc3=_[_0x553d('0x3e')]({},_0x50fbc3,_0x39943d[_0x553d('0x3f')]);var _0x50776a={'where':_0x50fbc3['where']};return db[_0x553d('0x2d')][_0x553d('0x22')](_0x50776a)[_0x553d('0x28')](function(_0x32dfb8){_0x180a66[_0x553d('0x22')]=_0x32dfb8;if(_0x39943d[_0x553d('0x33')][_0x553d('0x40')]){_0x50fbc3[_0x553d('0x41')]=[{'all':!![]}];}return db[_0x553d('0x2d')][_0x553d('0x42')](_0x50fbc3);})['then'](function(_0x431fdb){_0x180a66[_0x553d('0x43')]=_0x431fdb;return _0x180a66;})['then'](respondWithFilteredResult(_0x2bf05d,_0x50fbc3))[_0x553d('0x44')](handleError(_0x2bf05d,null));};exports[_0x553d('0x45')]=function(_0x5cfbbc,_0x1caab8){var _0x60cdd3={'raw':!![],'where':{'id':_0x5cfbbc[_0x553d('0x46')]['id']}},_0x40bc7a={};_0x40bc7a[_0x553d('0x31')]=_[_0x553d('0x47')](db['ZendeskField'][_0x553d('0x48')]);_0x40bc7a[_0x553d('0x33')]=_[_0x553d('0x47')](_0x5cfbbc['query']);_0x40bc7a[_0x553d('0x34')]=_[_0x553d('0x35')](_0x40bc7a['model'],_0x40bc7a[_0x553d('0x33')]);_0x60cdd3[_0x553d('0x36')]=_[_0x553d('0x35')](_0x40bc7a[_0x553d('0x31')],qs[_0x553d('0x37')](_0x5cfbbc[_0x553d('0x33')][_0x553d('0x37')]));_0x60cdd3[_0x553d('0x36')]=_0x60cdd3[_0x553d('0x36')]['length']?_0x60cdd3[_0x553d('0x36')]:_0x40bc7a['model'];if(_0x5cfbbc[_0x553d('0x33')]['includeAll']){_0x60cdd3[_0x553d('0x41')]=[{'all':!![]}];}_0x60cdd3=_[_0x553d('0x3e')]({},_0x60cdd3,_0x5cfbbc['options']);return db[_0x553d('0x2d')][_0x553d('0x49')](_0x60cdd3)[_0x553d('0x28')](handleEntityNotFound(_0x1caab8,null))[_0x553d('0x28')](respondWithResult(_0x1caab8,null))[_0x553d('0x44')](handleError(_0x1caab8,null));};exports['create']=function(_0x28a20b,_0x545dbf){return db[_0x553d('0x2d')][_0x553d('0x4a')](_0x28a20b[_0x553d('0x4b')],{})[_0x553d('0x28')](respondWithResult(_0x545dbf,0xc9))[_0x553d('0x44')](handleError(_0x545dbf,null));};exports[_0x553d('0x4c')]=function(_0xb6b182,_0x29259a){if(_0xb6b182[_0x553d('0x4b')]['id']){delete _0xb6b182[_0x553d('0x4b')]['id'];}return db[_0x553d('0x2d')][_0x553d('0x49')]({'where':{'id':_0xb6b182[_0x553d('0x46')]['id']}})[_0x553d('0x28')](handleEntityNotFound(_0x29259a,null))[_0x553d('0x28')](saveUpdates(_0xb6b182[_0x553d('0x4b')],null))[_0x553d('0x28')](respondWithResult(_0x29259a,null))['catch'](handleError(_0x29259a,null));};exports[_0x553d('0x29')]=function(_0x1ed718,_0x2e1ff6){return db[_0x553d('0x2d')]['find']({'where':{'id':_0x1ed718['params']['id']}})[_0x553d('0x28')](handleEntityNotFound(_0x2e1ff6,null))[_0x553d('0x28')](removeEntity(_0x2e1ff6,null))[_0x553d('0x44')](handleError(_0x2e1ff6,null));};
\ No newline at end of file
index ea59651..9b08962 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0ae7=['FieldId','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intZendeskField.attributes','exports','define','ZendeskField','int_zendesk_fields','zendesk_unique_index','idField'];(function(_0x302b5e,_0x564a8e){var _0x523ab7=function(_0x6aec8f){while(--_0x6aec8f){_0x302b5e['push'](_0x302b5e['shift']());}};_0x523ab7(++_0x564a8e);}(_0x0ae7,0xbc));var _0x70ae=function(_0x13b02f,_0x462a53){_0x13b02f=_0x13b02f-0x0;var _0x12e9a6=_0x0ae7[_0x13b02f];return _0x12e9a6;};'use strict';var _=require('lodash');var util=require(_0x70ae('0x0'));var logger=require(_0x70ae('0x1'))(_0x70ae('0x2'));var moment=require(_0x70ae('0x3'));var BPromise=require(_0x70ae('0x4'));var rp=require(_0x70ae('0x5'));var fs=require('fs');var path=require(_0x70ae('0x6'));var rimraf=require(_0x70ae('0x7'));var config=require(_0x70ae('0x8'));var attributes=require(_0x70ae('0x9'));module[_0x70ae('0xa')]=function(_0x3268e4,_0x214ab6){return _0x3268e4[_0x70ae('0xb')](_0x70ae('0xc'),attributes,{'tableName':_0x70ae('0xd'),'paranoid':![],'indexes':[{'name':_0x70ae('0xe'),'fields':[_0x70ae('0xf'),_0x70ae('0x10')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x396d=['../../config/environment','./intZendeskField.attributes','exports','define','ZendeskField','int_zendesk_fields','FieldId','lodash','util','moment'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x396d,0x18d));var _0xd396=function(_0x1abaae,_0x18db95){_0x1abaae=_0x1abaae-0x0;var _0x5ba039=_0x396d[_0x1abaae];return _0x5ba039;};'use strict';var _=require(_0xd396('0x0'));var util=require(_0xd396('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xd396('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xd396('0x3'));var attributes=require(_0xd396('0x4'));module[_0xd396('0x5')]=function(_0x5a11c4,_0x49137a){return _0x5a11c4[_0xd396('0x6')](_0xd396('0x7'),attributes,{'tableName':_0xd396('0x8'),'paranoid':![],'indexes':[{'name':'zendesk_unique_index','fields':['idField',_0xd396('0x9')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index cebeb10..3effbbc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1c06=['debug','ZendeskField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','request','then','info','ZendeskField,\x20%s,\x20%s','request\x20sent'];(function(_0xee3051,_0xbe4f18){var _0x139e81=function(_0xac81c3){while(--_0xac81c3){_0xee3051['push'](_0xee3051['shift']());}};_0x139e81(++_0xbe4f18);}(_0x1c06,0xfa));var _0x61c0=function(_0x19cf1f,_0x4105e3){_0x19cf1f=_0x19cf1f-0x0;var _0x234028=_0x1c06[_0x19cf1f];return _0x234028;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x61c0('0x0'));var BPromise=require(_0x61c0('0x1'));var rs=require(_0x61c0('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x61c0('0x3'))['db'];var utils=require(_0x61c0('0x4'));var logger=require('../../config/logger')(_0x61c0('0x5'));var config=require(_0x61c0('0x6'));var jayson=require(_0x61c0('0x7'));var client=jayson['client'][_0x61c0('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x12befc,_0x554527,_0x1132f9){return new BPromise(function(_0x2946b9,_0x113638){return client[_0x61c0('0x9')](_0x12befc,_0x1132f9)[_0x61c0('0xa')](function(_0x12bf0e){logger[_0x61c0('0xb')](_0x61c0('0xc'),_0x554527,_0x61c0('0xd'));logger[_0x61c0('0xe')](_0x61c0('0xf'),_0x554527,'request\x20sent',JSON[_0x61c0('0x10')](_0x12bf0e));if(_0x12bf0e[_0x61c0('0x11')]){if(_0x12bf0e[_0x61c0('0x11')][_0x61c0('0x12')]===0x1f4){logger[_0x61c0('0x11')](_0x61c0('0xc'),_0x554527,_0x12bf0e[_0x61c0('0x11')][_0x61c0('0x13')]);return _0x113638(_0x12bf0e[_0x61c0('0x11')][_0x61c0('0x13')]);}logger['error'](_0x61c0('0xc'),_0x554527,_0x12bf0e['error'][_0x61c0('0x13')]);return _0x2946b9(_0x12bf0e[_0x61c0('0x11')][_0x61c0('0x13')]);}else{logger[_0x61c0('0xb')]('ZendeskField,\x20%s,\x20%s',_0x554527,_0x61c0('0xd'));_0x2946b9(_0x12bf0e[_0x61c0('0x14')][_0x61c0('0x13')]);}})[_0x61c0('0x15')](function(_0x584b59){logger[_0x61c0('0x11')](_0x61c0('0xc'),_0x554527,_0x584b59);_0x113638(_0x584b59);});});}
\ No newline at end of file
+var _0x4087=['stringify','error','code','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','http','request','then','info','ZendeskField,\x20%s,\x20%s','request\x20sent','debug','ZendeskField,\x20%s,\x20%s,\x20%s'];(function(_0x90334d,_0x3ec517){var _0x42c8cf=function(_0x28520a){while(--_0x28520a){_0x90334d['push'](_0x90334d['shift']());}};_0x42c8cf(++_0x3ec517);}(_0x4087,0x131));var _0x7408=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x4087[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0x7408('0x0'));var util=require(_0x7408('0x1'));var moment=require('moment');var BPromise=require(_0x7408('0x2'));var rs=require(_0x7408('0x3'));var fs=require('fs');var Redis=require(_0x7408('0x4'));var db=require(_0x7408('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x7408('0x6'))(_0x7408('0x7'));var config=require('../../config/environment');var jayson=require(_0x7408('0x8'));var client=jayson['client'][_0x7408('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1fa560,_0x3b91c3,_0x6a41c3){return new BPromise(function(_0x48af2e,_0x3ef335){return client[_0x7408('0xa')](_0x1fa560,_0x6a41c3)[_0x7408('0xb')](function(_0xcf6c3a){logger[_0x7408('0xc')](_0x7408('0xd'),_0x3b91c3,_0x7408('0xe'));logger[_0x7408('0xf')](_0x7408('0x10'),_0x3b91c3,'request\x20sent',JSON[_0x7408('0x11')](_0xcf6c3a));if(_0xcf6c3a['error']){if(_0xcf6c3a[_0x7408('0x12')][_0x7408('0x13')]===0x1f4){logger[_0x7408('0x12')](_0x7408('0xd'),_0x3b91c3,_0xcf6c3a[_0x7408('0x12')][_0x7408('0x14')]);return _0x3ef335(_0xcf6c3a['error'][_0x7408('0x14')]);}logger[_0x7408('0x12')](_0x7408('0xd'),_0x3b91c3,_0xcf6c3a[_0x7408('0x12')][_0x7408('0x14')]);return _0x48af2e(_0xcf6c3a[_0x7408('0x12')][_0x7408('0x14')]);}else{logger[_0x7408('0xc')](_0x7408('0xd'),_0x3b91c3,_0x7408('0xe'));_0x48af2e(_0xcf6c3a[_0x7408('0x15')]['message']);}})[_0x7408('0x16')](function(_0x38c75d){logger[_0x7408('0x12')](_0x7408('0xd'),_0x3b91c3,_0x38c75d);_0x3ef335(_0x38c75d);});});}
\ No newline at end of file
index 7a37fc9..3871f32 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf2cf=['post','addConfiguration','put','destroy','exports','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intZohoAccount.controller','isAuthenticated','index','/:id','show','get','/:id/configurations','getConfigurations','/:id/fields','getFields','create'];(function(_0x6287b6,_0x5682e7){var _0x5d6be4=function(_0x3e3975){while(--_0x3e3975){_0x6287b6['push'](_0x6287b6['shift']());}};_0x5d6be4(++_0x5682e7);}(_0xf2cf,0xf5));var _0xff2c=function(_0x2e6893,_0x46c7c3){_0x2e6893=_0x2e6893-0x0;var _0x1d041c=_0xf2cf[_0x2e6893];return _0x1d041c;};'use strict';var multer=require('multer');var util=require(_0xff2c('0x0'));var path=require(_0xff2c('0x1'));var timeout=require(_0xff2c('0x2'));var express=require('express');var router=express[_0xff2c('0x3')]();var fs_extra=require(_0xff2c('0x4'));var auth=require(_0xff2c('0x5'));var interaction=require(_0xff2c('0x6'));var config=require(_0xff2c('0x7'));var controller=require(_0xff2c('0x8'));router['get']('/',auth[_0xff2c('0x9')](),controller[_0xff2c('0xa')]);router['get'](_0xff2c('0xb'),auth[_0xff2c('0x9')](),controller[_0xff2c('0xc')]);router[_0xff2c('0xd')](_0xff2c('0xe'),auth[_0xff2c('0x9')](),controller[_0xff2c('0xf')]);router['get'](_0xff2c('0x10'),auth[_0xff2c('0x9')](),controller[_0xff2c('0x11')]);router['post']('/',auth[_0xff2c('0x9')](),controller[_0xff2c('0x12')]);router[_0xff2c('0x13')]('/:id/configurations',auth['isAuthenticated'](),controller[_0xff2c('0x14')]);router[_0xff2c('0x15')]('/:id',auth[_0xff2c('0x9')](),controller['update']);router['delete'](_0xff2c('0xb'),auth[_0xff2c('0x9')](),controller[_0xff2c('0x16')]);module[_0xff2c('0x17')]=router;
\ No newline at end of file
+var _0xe613=['addConfiguration','put','update','delete','destroy','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/:id','show','/:id/configurations','isAuthenticated','post'];(function(_0x3a7a9c,_0x24f7d6){var _0x59156e=function(_0x5bc930){while(--_0x5bc930){_0x3a7a9c['push'](_0x3a7a9c['shift']());}};_0x59156e(++_0x24f7d6);}(_0xe613,0x7d));var _0x3e61=function(_0x75f783,_0xa95d9){_0x75f783=_0x75f783-0x0;var _0x3e2b42=_0xe613[_0x75f783];return _0x3e2b42;};'use strict';var multer=require('multer');var util=require(_0x3e61('0x0'));var path=require(_0x3e61('0x1'));var timeout=require('connect-timeout');var express=require(_0x3e61('0x2'));var router=express[_0x3e61('0x3')]();var fs_extra=require(_0x3e61('0x4'));var auth=require(_0x3e61('0x5'));var interaction=require(_0x3e61('0x6'));var config=require(_0x3e61('0x7'));var controller=require('./intZohoAccount.controller');router[_0x3e61('0x8')]('/',auth['isAuthenticated'](),controller[_0x3e61('0x9')]);router[_0x3e61('0x8')](_0x3e61('0xa'),auth['isAuthenticated'](),controller[_0x3e61('0xb')]);router[_0x3e61('0x8')](_0x3e61('0xc'),auth[_0x3e61('0xd')](),controller['getConfigurations']);router[_0x3e61('0x8')]('/:id/fields',auth[_0x3e61('0xd')](),controller['getFields']);router[_0x3e61('0xe')]('/',auth[_0x3e61('0xd')](),controller['create']);router[_0x3e61('0xe')](_0x3e61('0xc'),auth[_0x3e61('0xd')](),controller[_0x3e61('0xf')]);router[_0x3e61('0x10')](_0x3e61('0xa'),auth[_0x3e61('0xd')](),controller[_0x3e61('0x11')]);router[_0x3e61('0x12')]('/:id',auth['isAuthenticated'](),controller[_0x3e61('0x13')]);module['exports']=router;
\ No newline at end of file
index bd44daf..cb9a1db 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa8a8=['exports','STRING','sequelize'];(function(_0x47d3be,_0x30023f){var _0x2f85d9=function(_0x4ee341){while(--_0x4ee341){_0x47d3be['push'](_0x47d3be['shift']());}};_0x2f85d9(++_0x30023f);}(_0xa8a8,0xec));var _0x8a8a=function(_0x4126d2,_0xff5748){_0x4126d2=_0x4126d2-0x0;var _0x458181=_0xa8a8[_0x4126d2];return _0x458181;};'use strict';var Sequelize=require(_0x8a8a('0x0'));module[_0x8a8a('0x1')]={'name':{'type':Sequelize[_0x8a8a('0x2')]},'description':{'type':Sequelize[_0x8a8a('0x2')]},'host':{'type':Sequelize['STRING']},'zone':{'type':Sequelize[_0x8a8a('0x2')]},'clientId':{'type':Sequelize[_0x8a8a('0x2')]},'clientSecret':{'type':Sequelize[_0x8a8a('0x2')]},'serverUrl':{'type':Sequelize[_0x8a8a('0x2')],'allowNull':![]},'code':{'type':Sequelize[_0x8a8a('0x2')]},'refreshToken':{'type':Sequelize[_0x8a8a('0x2')]}};
\ No newline at end of file
+var _0x4c4e=['sequelize','STRING'];(function(_0x313913,_0x49e3e9){var _0x4b04f2=function(_0x7e4d05){while(--_0x7e4d05){_0x313913['push'](_0x313913['shift']());}};_0x4b04f2(++_0x49e3e9);}(_0x4c4e,0x152));var _0xe4c4=function(_0x2a9f91,_0x27b569){_0x2a9f91=_0x2a9f91-0x0;var _0xb9b7c1=_0x4c4e[_0x2a9f91];return _0xb9b7c1;};'use strict';var Sequelize=require(_0xe4c4('0x0'));module['exports']={'name':{'type':Sequelize[_0xe4c4('0x1')]},'description':{'type':Sequelize[_0xe4c4('0x1')]},'host':{'type':Sequelize[_0xe4c4('0x1')]},'zone':{'type':Sequelize['STRING']},'clientId':{'type':Sequelize[_0xe4c4('0x1')]},'clientSecret':{'type':Sequelize[_0xe4c4('0x1')]},'serverUrl':{'type':Sequelize[_0xe4c4('0x1')],'allowNull':![]},'code':{'type':Sequelize['STRING']},'refreshToken':{'type':Sequelize[_0xe4c4('0x1')]}};
\ No newline at end of file
index a6ac565..fbb4b31 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd4fa=['custom_field','data_type','pick_list_values','test','statusCode','stringify','send','Wrong\x20credentials','rimraf','fast-json-patch','moment','bluebird','util','path','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','../../components/integrations/configuration','sendStatus','status','end','json','offset','undefined','count','limit','Content-Range','apply','save','update','destroy','then','error','stack','name','index','map','ZohoAccount','rawAttributes','fieldName','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','sort','where','filters','merge','type','VIRTUAL','filter','options','includeAll','rows','catch','find','create','body','params','getConfigurations','findOne','ZohoConfiguration','pick','nolimit','addConfiguration','AccountId','Subjects','getSubjects','Descriptions','channel','ZohoField','zone','https://accounts.zoho.com','https://accounts.zoho.in','https://accounts.zoho.com.cn','https://accounts.zoho.eu','POST','/oauth/v2/token','refreshToken','clientId','clientSecret','refresh_token','access_token','getFields','serverUrl','code','host','zoho.eu','com','substring','Refresh\x20Token\x20not\x20available\x20for\x20the\x20account','GET','format','Calls','Zoho-oauthtoken\x20','response','message','Owner','Subject','Call_Duration','Call_Result','Call_Start_Time','remove','api_name','system_mandatory','display_label'];(function(_0x839ba5,_0x1c4d54){var _0x5babda=function(_0x271a69){while(--_0x271a69){_0x839ba5['push'](_0x839ba5['shift']());}};_0x5babda(++_0x1c4d54);}(_0xd4fa,0x1f0));var _0xad4f=function(_0x1ded0f,_0x2c82a9){_0x1ded0f=_0x1ded0f-0x0;var _0x1ad47a=_0xd4fa[_0x1ded0f];return _0x1ad47a;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xad4f('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xad4f('0x1'));var rp=require('request-promise');var moment=require(_0xad4f('0x2'));var BPromise=require(_0xad4f('0x3'));var Mustache=require('mustache');var util=require(_0xad4f('0x4'));var path=require(_0xad4f('0x5'));var sox=require(_0xad4f('0x6'));var csv=require(_0xad4f('0x7'));var ejs=require(_0xad4f('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xad4f('0x9'));var squel=require(_0xad4f('0xa'));var crypto=require('crypto');var jsforce=require(_0xad4f('0xb'));var deskjs=require(_0xad4f('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xad4f('0xd'));var qs=require(_0xad4f('0xe'));var as=require(_0xad4f('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xad4f('0x10'))(_0xad4f('0x11'));var utils=require('../../config/utils');var config=require(_0xad4f('0x12'));var licenseUtil=require(_0xad4f('0x13'));var db=require('../../mysqldb')['db'];var integrations=require(_0xad4f('0x14'));function respondWithStatusCode(_0x3ff9bc,_0x566b0d){_0x566b0d=_0x566b0d||0xcc;return function(_0x1051d3){if(_0x1051d3){return _0x3ff9bc[_0xad4f('0x15')](_0x566b0d);}return _0x3ff9bc[_0xad4f('0x16')](_0x566b0d)[_0xad4f('0x17')]();};}function respondWithResult(_0x4c3fca,_0x2ddad8){_0x2ddad8=_0x2ddad8||0xc8;return function(_0x21193a){if(_0x21193a){return _0x4c3fca['status'](_0x2ddad8)[_0xad4f('0x18')](_0x21193a);}};}function respondWithFilteredResult(_0x75b446,_0x55508d){return function(_0x1c6eb6){if(_0x1c6eb6){var _0x913cc2=typeof _0x55508d[_0xad4f('0x19')]==='undefined'&&typeof _0x55508d['limit']===_0xad4f('0x1a');var _0x9a1104=_0x1c6eb6[_0xad4f('0x1b')];var _0x7c643f=_0x913cc2?0x0:_0x55508d[_0xad4f('0x19')];var _0x386871=_0x913cc2?_0x1c6eb6[_0xad4f('0x1b')]:_0x55508d['offset']+_0x55508d[_0xad4f('0x1c')];var _0x669cae;if(_0x386871>=_0x9a1104){_0x386871=_0x9a1104;_0x669cae=0xc8;}else{_0x669cae=0xce;}_0x75b446[_0xad4f('0x16')](_0x669cae);return _0x75b446['set'](_0xad4f('0x1d'),_0x7c643f+'-'+_0x386871+'/'+_0x9a1104)['json'](_0x1c6eb6);}return null;};}function patchUpdates(_0x2ee612){return function(_0x3b7e64){try{jsonpatch[_0xad4f('0x1e')](_0x3b7e64,_0x2ee612,!![]);}catch(_0x5ee8a3){return BPromise['reject'](_0x5ee8a3);}return _0x3b7e64[_0xad4f('0x1f')]();};}function saveUpdates(_0x22a944,_0x5f2f3b){return function(_0xec1472){if(_0xec1472){return _0xec1472[_0xad4f('0x20')](_0x22a944)['then'](function(_0x1a4a7e){return _0x1a4a7e;});}return null;};}function removeEntity(_0x347657,_0x12afae){return function(_0x3e48bd){if(_0x3e48bd){return _0x3e48bd[_0xad4f('0x21')]()[_0xad4f('0x22')](function(){_0x347657[_0xad4f('0x16')](0xcc)[_0xad4f('0x17')]();});}};}function handleEntityNotFound(_0x5db52a,_0x53e419){return function(_0x9f12ff){if(!_0x9f12ff){_0x5db52a['sendStatus'](0x194);}return _0x9f12ff;};}function handleError(_0x2c701c,_0x1bd401){_0x1bd401=_0x1bd401||0x1f4;return function(_0x3b4201){logger[_0xad4f('0x23')](_0x3b4201[_0xad4f('0x24')]);if(_0x3b4201[_0xad4f('0x25')]){delete _0x3b4201['name'];}_0x2c701c[_0xad4f('0x16')](_0x1bd401)['send'](_0x3b4201);};}exports[_0xad4f('0x26')]=function(_0x3016e7,_0x3d6de6){var _0x12c8c0={},_0x2390d9={},_0x2bf57f={'count':0x0,'rows':[]};var _0x33d052=_[_0xad4f('0x27')](db[_0xad4f('0x28')][_0xad4f('0x29')],function(_0x5443b4){return{'name':_0x5443b4[_0xad4f('0x2a')],'type':_0x5443b4['type'][_0xad4f('0x2b')]};});_0x2390d9[_0xad4f('0x2c')]=_[_0xad4f('0x27')](_0x33d052,_0xad4f('0x25'));_0x2390d9[_0xad4f('0x2d')]=_[_0xad4f('0x2e')](_0x3016e7[_0xad4f('0x2d')]);_0x2390d9['filters']=_[_0xad4f('0x2f')](_0x2390d9['model'],_0x2390d9[_0xad4f('0x2d')]);_0x12c8c0[_0xad4f('0x30')]=_[_0xad4f('0x2f')](_0x2390d9[_0xad4f('0x2c')],qs[_0xad4f('0x31')](_0x3016e7['query'][_0xad4f('0x31')]));_0x12c8c0[_0xad4f('0x30')]=_0x12c8c0[_0xad4f('0x30')][_0xad4f('0x32')]?_0x12c8c0[_0xad4f('0x30')]:_0x2390d9[_0xad4f('0x2c')];if(!_0x3016e7['query'][_0xad4f('0x33')]('nolimit')){_0x12c8c0['limit']=qs['limit'](_0x3016e7[_0xad4f('0x2d')][_0xad4f('0x1c')]);_0x12c8c0[_0xad4f('0x19')]=qs[_0xad4f('0x19')](_0x3016e7[_0xad4f('0x2d')][_0xad4f('0x19')]);}_0x12c8c0['order']=qs[_0xad4f('0x34')](_0x3016e7[_0xad4f('0x2d')][_0xad4f('0x34')]);_0x12c8c0[_0xad4f('0x35')]=qs['filters'](_['pick'](_0x3016e7['query'],_0x2390d9[_0xad4f('0x36')]),_0x33d052);if(_0x3016e7[_0xad4f('0x2d')]['filter']){_0x12c8c0[_0xad4f('0x35')]=_[_0xad4f('0x37')](_0x12c8c0[_0xad4f('0x35')],{'$or':_['map'](_0x33d052,function(_0x1e5442){if(_0x1e5442[_0xad4f('0x38')]!==_0xad4f('0x39')){var _0x3dbfa3={};_0x3dbfa3[_0x1e5442[_0xad4f('0x25')]]={'$like':'%'+_0x3016e7[_0xad4f('0x2d')][_0xad4f('0x3a')]+'%'};return _0x3dbfa3;}})});}_0x12c8c0=_[_0xad4f('0x37')]({},_0x12c8c0,_0x3016e7[_0xad4f('0x3b')]);var _0x3cb1a1={'where':_0x12c8c0[_0xad4f('0x35')]};return db[_0xad4f('0x28')][_0xad4f('0x1b')](_0x3cb1a1)[_0xad4f('0x22')](function(_0x2b93bf){_0x2bf57f[_0xad4f('0x1b')]=_0x2b93bf;if(_0x3016e7['query'][_0xad4f('0x3c')]){_0x12c8c0['include']=[{'all':!![]}];}return db[_0xad4f('0x28')]['findAll'](_0x12c8c0);})[_0xad4f('0x22')](function(_0x23b5e3){_0x2bf57f[_0xad4f('0x3d')]=_0x23b5e3;return _0x2bf57f;})[_0xad4f('0x22')](respondWithFilteredResult(_0x3d6de6,_0x12c8c0))[_0xad4f('0x3e')](handleError(_0x3d6de6,null));};exports['show']=function(_0x7f2827,_0x4d85c3){var _0x2ea303={'raw':![],'where':{'id':_0x7f2827['params']['id']}},_0x3e0bf7={};_0x3e0bf7['model']=_['keys'](db[_0xad4f('0x28')][_0xad4f('0x29')]);_0x3e0bf7[_0xad4f('0x2d')]=_['keys'](_0x7f2827[_0xad4f('0x2d')]);_0x3e0bf7[_0xad4f('0x36')]=_[_0xad4f('0x2f')](_0x3e0bf7[_0xad4f('0x2c')],_0x3e0bf7['query']);_0x2ea303[_0xad4f('0x30')]=_['intersection'](_0x3e0bf7[_0xad4f('0x2c')],qs[_0xad4f('0x31')](_0x7f2827[_0xad4f('0x2d')][_0xad4f('0x31')]));_0x2ea303[_0xad4f('0x30')]=_0x2ea303['attributes'][_0xad4f('0x32')]?_0x2ea303[_0xad4f('0x30')]:_0x3e0bf7[_0xad4f('0x2c')];if(_0x7f2827[_0xad4f('0x2d')]['includeAll']){_0x2ea303['include']=[{'all':!![]}];}_0x2ea303=_[_0xad4f('0x37')]({},_0x2ea303,_0x7f2827[_0xad4f('0x3b')]);return db[_0xad4f('0x28')][_0xad4f('0x3f')](_0x2ea303)[_0xad4f('0x22')](handleEntityNotFound(_0x4d85c3,null))[_0xad4f('0x22')](respondWithResult(_0x4d85c3,null))[_0xad4f('0x3e')](handleError(_0x4d85c3,null));};exports[_0xad4f('0x40')]=function(_0x5c0a85,_0x21b96e){return db['ZohoAccount']['create'](_0x5c0a85[_0xad4f('0x41')],{})[_0xad4f('0x22')](respondWithResult(_0x21b96e,0xc9))[_0xad4f('0x3e')](handleError(_0x21b96e,null));};exports['update']=function(_0x37bf85,_0x6b0689){if(_0x37bf85[_0xad4f('0x41')]['id']){delete _0x37bf85[_0xad4f('0x41')]['id'];}return db[_0xad4f('0x28')]['find']({'where':{'id':_0x37bf85['params']['id']}})[_0xad4f('0x22')](handleEntityNotFound(_0x6b0689,null))[_0xad4f('0x22')](saveUpdates(_0x37bf85[_0xad4f('0x41')],null))[_0xad4f('0x22')](respondWithResult(_0x6b0689,null))[_0xad4f('0x3e')](handleError(_0x6b0689,null));};exports[_0xad4f('0x21')]=function(_0x2fc3db,_0x25d135){return db[_0xad4f('0x28')]['find']({'where':{'id':_0x2fc3db[_0xad4f('0x42')]['id']}})[_0xad4f('0x22')](handleEntityNotFound(_0x25d135,null))[_0xad4f('0x22')](removeEntity(_0x25d135,null))[_0xad4f('0x3e')](handleError(_0x25d135,null));};exports[_0xad4f('0x43')]=function(_0x2abe80,_0x606e75,_0x24d89e){var _0x5c5d6={};var _0x158798={};var _0x54952b;var _0xa7d2b7;return db['ZohoAccount'][_0xad4f('0x44')]({'where':{'id':_0x2abe80[_0xad4f('0x42')]['id']}})[_0xad4f('0x22')](handleEntityNotFound(_0x606e75,null))[_0xad4f('0x22')](function(_0x5b8c05){if(_0x5b8c05){_0x54952b=_0x5b8c05;_0x158798[_0xad4f('0x2c')]=_[_0xad4f('0x2e')](db[_0xad4f('0x45')][_0xad4f('0x29')]);_0x158798['query']=_[_0xad4f('0x2e')](_0x2abe80['query']);_0x158798[_0xad4f('0x36')]=_['intersection'](_0x158798[_0xad4f('0x2c')],_0x158798[_0xad4f('0x2d')]);_0x5c5d6[_0xad4f('0x30')]=_[_0xad4f('0x2f')](_0x158798[_0xad4f('0x2c')],qs[_0xad4f('0x31')](_0x2abe80[_0xad4f('0x2d')]['fields']));_0x5c5d6[_0xad4f('0x30')]=_0x5c5d6[_0xad4f('0x30')]['length']?_0x5c5d6[_0xad4f('0x30')]:_0x158798[_0xad4f('0x2c')];_0x5c5d6['order']=qs[_0xad4f('0x34')](_0x2abe80[_0xad4f('0x2d')]['sort']);_0x5c5d6[_0xad4f('0x35')]=qs[_0xad4f('0x36')](_[_0xad4f('0x46')](_0x2abe80[_0xad4f('0x2d')],_0x158798['filters']));if(_0x2abe80[_0xad4f('0x2d')][_0xad4f('0x3a')]){_0x5c5d6[_0xad4f('0x35')]=_[_0xad4f('0x37')](_0x5c5d6[_0xad4f('0x35')],{'$or':_[_0xad4f('0x27')](_0x5c5d6[_0xad4f('0x30')],function(_0x13f438){var _0x423200={};_0x423200[_0x13f438]={'$like':'%'+_0x2abe80[_0xad4f('0x2d')]['filter']+'%'};return _0x423200;})});}_0x5c5d6=_[_0xad4f('0x37')]({},_0x5c5d6,_0x2abe80[_0xad4f('0x3b')]);return _0x54952b[_0xad4f('0x43')](_0x5c5d6);}})[_0xad4f('0x22')](function(_0xe07edb){if(_0xe07edb){_0xa7d2b7=_0xe07edb[_0xad4f('0x32')];if(!_0x2abe80[_0xad4f('0x2d')][_0xad4f('0x33')](_0xad4f('0x47'))){_0x5c5d6[_0xad4f('0x1c')]=qs[_0xad4f('0x1c')](_0x2abe80['query']['limit']);_0x5c5d6[_0xad4f('0x19')]=qs['offset'](_0x2abe80[_0xad4f('0x2d')][_0xad4f('0x19')]);}return _0x54952b['getConfigurations'](_0x5c5d6);}})[_0xad4f('0x22')](function(_0xa8f559){if(_0xa8f559){return _0xa8f559?{'count':_0xa7d2b7,'rows':_0xa8f559}:null;}})[_0xad4f('0x22')](respondWithResult(_0x606e75,null))['catch'](handleError(_0x606e75,null));};exports[_0xad4f('0x48')]=function(_0x6211bc,_0x4d4225,_0x56bc8d){if(_0x6211bc[_0xad4f('0x41')]['id']){delete _0x6211bc[_0xad4f('0x41')]['id'];}return db[_0xad4f('0x28')][_0xad4f('0x44')]({'where':{'id':_0x6211bc[_0xad4f('0x42')]['id']}})[_0xad4f('0x22')](handleEntityNotFound(_0x4d4225,null))[_0xad4f('0x22')](function(_0x4ecdf6){if(_0x4ecdf6){_0x6211bc['body'][_0xad4f('0x49')]=_0x4ecdf6['id'];_0x6211bc[_0xad4f('0x41')][_0xad4f('0x4a')]=integrations[_0xad4f('0x4b')](_0x6211bc[_0xad4f('0x41')]['channel'],_0x6211bc[_0xad4f('0x41')][_0xad4f('0x38')]);_0x6211bc[_0xad4f('0x41')][_0xad4f('0x4c')]=integrations['getDescriptions'](_0x6211bc[_0xad4f('0x41')][_0xad4f('0x4d')],_0x6211bc[_0xad4f('0x41')][_0xad4f('0x38')]);return db['ZohoConfiguration'][_0xad4f('0x40')](_0x6211bc[_0xad4f('0x41')],{'include':[{'model':db['ZohoField'],'as':_0xad4f('0x4a')},{'model':db[_0xad4f('0x4e')],'as':_0xad4f('0x4c')}]});}return null;})[_0xad4f('0x22')](respondWithResult(_0x4d4225,null))[_0xad4f('0x3e')](handleError(_0x4d4225,null));};function getAccessToken(_0x260122){return new Promise(function(_0x32f129,_0x5d480d){var _0x28d04d;switch(_0x260122[_0xad4f('0x4f')]){case'US':_0x28d04d=_0xad4f('0x50');break;case'AU':_0x28d04d='https://accounts.zoho.com.au';break;case'EU':_0x28d04d='https://accounts.zoho.eu';break;case'IN':_0x28d04d=_0xad4f('0x51');break;case'CN':_0x28d04d=_0xad4f('0x52');break;default:_0x28d04d=_0xad4f('0x53');break;}var _0x19e81b={'method':_0xad4f('0x54'),'uri':_0x28d04d+_0xad4f('0x55'),'qs':{'refresh_token':_0x260122[_0xad4f('0x56')],'client_id':_0x260122[_0xad4f('0x57')],'client_secret':_0x260122[_0xad4f('0x58')],'grant_type':_0xad4f('0x59')},'json':!![]};return rp(_0x19e81b)[_0xad4f('0x22')](function(_0x13b44c){if(_0x13b44c[_0xad4f('0x5a')]){_0x32f129(_0x13b44c['access_token']);}else{_0x5d480d('Unable\x20to\x20retrieve\x20the\x20access\x20token');}})[_0xad4f('0x3e')](function(_0x573ee9){_0x5d480d(_0x573ee9);});});}exports[_0xad4f('0x5b')]=function(_0x2ab6a5,_0xc58150,_0x1b4956){var _0x18af0e,_0x5b2e5e,_0x56ea5a,_0x871617,_0x38f741;return db[_0xad4f('0x28')][_0xad4f('0x44')]({'where':{'id':_0x2ab6a5[_0xad4f('0x42')]['id']},'attributes':['id','host',_0xad4f('0x4f'),_0xad4f('0x57'),_0xad4f('0x58'),_0xad4f('0x5c'),_0xad4f('0x5d'),_0xad4f('0x56')]})[_0xad4f('0x22')](handleEntityNotFound(_0xc58150,null))[_0xad4f('0x22')](function(_0xeaefe9){_0x38f741=_0xeaefe9;_0x18af0e=_0x38f741[_0xad4f('0x5e')];_0x5b2e5e=_0x18af0e===_0xad4f('0x5f')?'eu':_0xad4f('0x60');_0x56ea5a=_0x38f741[_0xad4f('0x5c')];var _0x537597=_0x56ea5a['slice'](-0x1);if(_0x537597==='/'||_0x537597==='\x5c'||_0x537597===':'){_0x56ea5a=_0x56ea5a[_0xad4f('0x61')](0x0,_0x56ea5a['lastIndexOf'](_0x537597));}if(!_0x38f741[_0xad4f('0x56')]){throw new Error(_0xad4f('0x62'));}return getAccessToken(_0x38f741);})[_0xad4f('0x22')](function(_0x1165c7){if(_0x1165c7){return rp({'method':_0xad4f('0x63'),'uri':util[_0xad4f('0x64')]('https://www.zohoapis.%s/crm/v2/settings/fields',_0x5b2e5e),'qs':{'module':_0xad4f('0x65')},'headers':{'Authorization':_0xad4f('0x66')+_0x1165c7},'json':!![]});}})[_0xad4f('0x22')](function(_0x3f8c19){if(_0x3f8c19){if(_0x3f8c19[_0xad4f('0x67')]&&_0x3f8c19[_0xad4f('0x67')][_0xad4f('0x23')]){throw new Error(_0x3f8c19['response']['error'][_0xad4f('0x68')]);}var _0x285a21=[];var _0x2d963b=[];var _0xa22b32=[_0xad4f('0x69'),_0xad4f('0x6a'),'Description','WhoId',_0xad4f('0x6b'),_0xad4f('0x6c'),_0xad4f('0x6d'),'Call_Type'];_0x2d963b=_[_0xad4f('0x6e')](_0x3f8c19[_0xad4f('0x31')],function(_0x4a8d20){return _0xa22b32['includes'](_0x4a8d20[_0xad4f('0x6f')]);});for(var _0x955781=0x0;_0x955781<_0x2d963b[_0xad4f('0x32')];_0x955781++){if(_0x2d963b[_0x955781][_0xad4f('0x70')]===![]){_0x285a21['push']({'id':_0x2d963b[_0x955781]['id'],'name':_0x2d963b[_0x955781][_0xad4f('0x71')],'custom':_0x2d963b[_0x955781][_0xad4f('0x72')],'options':_0x2d963b[_0x955781][_0xad4f('0x73')]==='picklist'&&_0x2d963b[_0x955781][_0xad4f('0x74')][_0xad4f('0x32')]>-0x1?_[_0xad4f('0x27')](_0x2d963b[_0x955781]['pick_list_values'],function(_0x448e08){return{'name':_0x448e08,'value':_0x448e08};}):[]});}}return{'count':_0x285a21[_0xad4f('0x32')],'rows':_0x285a21};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithResult(_0xc58150,null))[_0xad4f('0x3e')](function(_0xd591ef){var _0x5d2270=_0x2ab6a5[_0xad4f('0x2d')][_0xad4f('0x75')]?0x1f4:_0xd591ef[_0xad4f('0x76')]||0x1f4;logger[_0xad4f('0x23')]('getFields,\x20%s,\x20%s,\x20%s',_0xad4f('0x5b'),_0x5d2270,JSON[_0xad4f('0x77')](_0xd591ef));delete _0xd591ef[_0xad4f('0x25')];if(_0x5d2270===0x191){_0x5d2270=0x190;}_0xc58150[_0xad4f('0x16')](_0x5d2270)[_0xad4f('0x78')](_0x2ab6a5[_0xad4f('0x2d')]['test']?{'message':_0xad4f('0x79'),'statusCode':_0xd591ef['statusCode']}:_0xd591ef);});};
\ No newline at end of file
+var _0xa6e3=['sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','update','destroy','then','end','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','options','includeAll','ZohoAccount','findAll','catch','show','params','keys','include','merge','find','create','body','getConfigurations','findOne','ZohoConfiguration','addConfiguration','Subjects','getSubjects','channel','ZohoField','Descriptions','zone','https://accounts.zoho.com','https://accounts.zoho.com.au','https://accounts.zoho.in','https://accounts.zoho.com.cn','https://accounts.zoho.eu','POST','/oauth/v2/token','refreshToken','clientId','access_token','Unable\x20to\x20retrieve\x20the\x20access\x20token','clientSecret','serverUrl','code','host','zoho.eu','com','slice','substring','lastIndexOf','format','https://www.zohoapis.%s/crm/v2/settings/fields','Zoho-oauthtoken\x20','response','message','Owner','Subject','WhoId','Call_Duration','Call_Result','Call_Start_Time','Call_Type','remove','api_name','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','fast-json-patch','request-promise','moment','bluebird','mustache','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../mysqldb','../../components/integrations/configuration'];(function(_0x1c28e9,_0x304609){var _0x58bd0b=function(_0x336f32){while(--_0x336f32){_0x1c28e9['push'](_0x1c28e9['shift']());}};_0x58bd0b(++_0x304609);}(_0xa6e3,0xf6));var _0x3a6e=function(_0x4fd994,_0x199a8a){_0x4fd994=_0x4fd994-0x0;var _0x5034ec=_0xa6e3[_0x4fd994];return _0x5034ec;};'use strict';var emlformat=require(_0x3a6e('0x0'));var rimraf=require(_0x3a6e('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x3a6e('0x2'));var rp=require(_0x3a6e('0x3'));var moment=require(_0x3a6e('0x4'));var BPromise=require(_0x3a6e('0x5'));var Mustache=require(_0x3a6e('0x6'));var util=require('util');var path=require('path');var sox=require(_0x3a6e('0x7'));var csv=require(_0x3a6e('0x8'));var ejs=require(_0x3a6e('0x9'));var fs=require('fs');var fs_extra=require(_0x3a6e('0xa'));var _=require(_0x3a6e('0xb'));var squel=require('squel');var crypto=require(_0x3a6e('0xc'));var jsforce=require(_0x3a6e('0xd'));var deskjs=require(_0x3a6e('0xe'));var toCsv=require(_0x3a6e('0x8'));var querystring=require(_0x3a6e('0xf'));var Papa=require(_0x3a6e('0x10'));var Redis=require(_0x3a6e('0x11'));var authService=require(_0x3a6e('0x12'));var qs=require(_0x3a6e('0x13'));var as=require(_0x3a6e('0x14'));var hardwareService=require(_0x3a6e('0x15'));var logger=require('../../config/logger')(_0x3a6e('0x16'));var utils=require(_0x3a6e('0x17'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x3a6e('0x18'))['db'];var integrations=require(_0x3a6e('0x19'));function respondWithStatusCode(_0xd44154,_0x48c68f){_0x48c68f=_0x48c68f||0xcc;return function(_0x10df06){if(_0x10df06){return _0xd44154[_0x3a6e('0x1a')](_0x48c68f);}return _0xd44154[_0x3a6e('0x1b')](_0x48c68f)['end']();};}function respondWithResult(_0x2c8803,_0x1f9322){_0x1f9322=_0x1f9322||0xc8;return function(_0x32083c){if(_0x32083c){return _0x2c8803[_0x3a6e('0x1b')](_0x1f9322)[_0x3a6e('0x1c')](_0x32083c);}};}function respondWithFilteredResult(_0x3a9c1e,_0x1f5db1){return function(_0x5b0304){if(_0x5b0304){var _0x54a6dc=typeof _0x1f5db1[_0x3a6e('0x1d')]===_0x3a6e('0x1e')&&typeof _0x1f5db1[_0x3a6e('0x1f')]===_0x3a6e('0x1e');var _0x2277f4=_0x5b0304[_0x3a6e('0x20')];var _0x9cc89d=_0x54a6dc?0x0:_0x1f5db1[_0x3a6e('0x1d')];var _0xdebf66=_0x54a6dc?_0x5b0304[_0x3a6e('0x20')]:_0x1f5db1[_0x3a6e('0x1d')]+_0x1f5db1[_0x3a6e('0x1f')];var _0x28b000;if(_0xdebf66>=_0x2277f4){_0xdebf66=_0x2277f4;_0x28b000=0xc8;}else{_0x28b000=0xce;}_0x3a9c1e[_0x3a6e('0x1b')](_0x28b000);return _0x3a9c1e[_0x3a6e('0x21')](_0x3a6e('0x22'),_0x9cc89d+'-'+_0xdebf66+'/'+_0x2277f4)['json'](_0x5b0304);}return null;};}function patchUpdates(_0x33e41e){return function(_0x1bfd3f){try{jsonpatch[_0x3a6e('0x23')](_0x1bfd3f,_0x33e41e,!![]);}catch(_0x7283ac){return BPromise[_0x3a6e('0x24')](_0x7283ac);}return _0x1bfd3f['save']();};}function saveUpdates(_0x526a55,_0x36406c){return function(_0xeb8e3){if(_0xeb8e3){return _0xeb8e3[_0x3a6e('0x25')](_0x526a55)['then'](function(_0x1219e8){return _0x1219e8;});}return null;};}function removeEntity(_0x427ad0,_0x493db8){return function(_0x196f15){if(_0x196f15){return _0x196f15[_0x3a6e('0x26')]()[_0x3a6e('0x27')](function(){_0x427ad0[_0x3a6e('0x1b')](0xcc)[_0x3a6e('0x28')]();});}};}function handleEntityNotFound(_0x4b238f,_0x1da390){return function(_0x3c04a9){if(!_0x3c04a9){_0x4b238f[_0x3a6e('0x1a')](0x194);}return _0x3c04a9;};}function handleError(_0x593763,_0x13c33f){_0x13c33f=_0x13c33f||0x1f4;return function(_0x95360f){logger[_0x3a6e('0x29')](_0x95360f[_0x3a6e('0x2a')]);if(_0x95360f['name']){delete _0x95360f[_0x3a6e('0x2b')];}_0x593763[_0x3a6e('0x1b')](_0x13c33f)[_0x3a6e('0x2c')](_0x95360f);};}exports[_0x3a6e('0x2d')]=function(_0x52855c,_0x20e5fd){var _0x2d3118={},_0x4778f6={},_0x782b6f={'count':0x0,'rows':[]};var _0x16bb7b=_[_0x3a6e('0x2e')](db['ZohoAccount'][_0x3a6e('0x2f')],function(_0x919f6c){return{'name':_0x919f6c[_0x3a6e('0x30')],'type':_0x919f6c[_0x3a6e('0x31')][_0x3a6e('0x32')]};});_0x4778f6[_0x3a6e('0x33')]=_[_0x3a6e('0x2e')](_0x16bb7b,_0x3a6e('0x2b'));_0x4778f6['query']=_['keys'](_0x52855c[_0x3a6e('0x34')]);_0x4778f6[_0x3a6e('0x35')]=_[_0x3a6e('0x36')](_0x4778f6['model'],_0x4778f6[_0x3a6e('0x34')]);_0x2d3118[_0x3a6e('0x37')]=_['intersection'](_0x4778f6[_0x3a6e('0x33')],qs[_0x3a6e('0x38')](_0x52855c[_0x3a6e('0x34')][_0x3a6e('0x38')]));_0x2d3118['attributes']=_0x2d3118[_0x3a6e('0x37')][_0x3a6e('0x39')]?_0x2d3118[_0x3a6e('0x37')]:_0x4778f6[_0x3a6e('0x33')];if(!_0x52855c[_0x3a6e('0x34')][_0x3a6e('0x3a')](_0x3a6e('0x3b'))){_0x2d3118[_0x3a6e('0x1f')]=qs[_0x3a6e('0x1f')](_0x52855c[_0x3a6e('0x34')][_0x3a6e('0x1f')]);_0x2d3118[_0x3a6e('0x1d')]=qs['offset'](_0x52855c['query'][_0x3a6e('0x1d')]);}_0x2d3118[_0x3a6e('0x3c')]=qs[_0x3a6e('0x3d')](_0x52855c['query'][_0x3a6e('0x3d')]);_0x2d3118[_0x3a6e('0x3e')]=qs[_0x3a6e('0x35')](_[_0x3a6e('0x3f')](_0x52855c[_0x3a6e('0x34')],_0x4778f6[_0x3a6e('0x35')]),_0x16bb7b);if(_0x52855c[_0x3a6e('0x34')][_0x3a6e('0x40')]){_0x2d3118['where']=_['merge'](_0x2d3118[_0x3a6e('0x3e')],{'$or':_[_0x3a6e('0x2e')](_0x16bb7b,function(_0x196663){if(_0x196663[_0x3a6e('0x31')]!==_0x3a6e('0x41')){var _0x5806da={};_0x5806da[_0x196663['name']]={'$like':'%'+_0x52855c[_0x3a6e('0x34')][_0x3a6e('0x40')]+'%'};return _0x5806da;}})});}_0x2d3118=_['merge']({},_0x2d3118,_0x52855c[_0x3a6e('0x42')]);var _0x39f4db={'where':_0x2d3118[_0x3a6e('0x3e')]};return db['ZohoAccount'][_0x3a6e('0x20')](_0x39f4db)[_0x3a6e('0x27')](function(_0x1273fa){_0x782b6f[_0x3a6e('0x20')]=_0x1273fa;if(_0x52855c[_0x3a6e('0x34')][_0x3a6e('0x43')]){_0x2d3118['include']=[{'all':!![]}];}return db[_0x3a6e('0x44')][_0x3a6e('0x45')](_0x2d3118);})[_0x3a6e('0x27')](function(_0x1682fd){_0x782b6f['rows']=_0x1682fd;return _0x782b6f;})[_0x3a6e('0x27')](respondWithFilteredResult(_0x20e5fd,_0x2d3118))[_0x3a6e('0x46')](handleError(_0x20e5fd,null));};exports[_0x3a6e('0x47')]=function(_0x3b2823,_0x2d798f){var _0x5b0c82={'raw':![],'where':{'id':_0x3b2823[_0x3a6e('0x48')]['id']}},_0x1c81ef={};_0x1c81ef[_0x3a6e('0x33')]=_[_0x3a6e('0x49')](db['ZohoAccount'][_0x3a6e('0x2f')]);_0x1c81ef[_0x3a6e('0x34')]=_['keys'](_0x3b2823[_0x3a6e('0x34')]);_0x1c81ef[_0x3a6e('0x35')]=_[_0x3a6e('0x36')](_0x1c81ef[_0x3a6e('0x33')],_0x1c81ef[_0x3a6e('0x34')]);_0x5b0c82[_0x3a6e('0x37')]=_[_0x3a6e('0x36')](_0x1c81ef[_0x3a6e('0x33')],qs['fields'](_0x3b2823[_0x3a6e('0x34')]['fields']));_0x5b0c82[_0x3a6e('0x37')]=_0x5b0c82[_0x3a6e('0x37')][_0x3a6e('0x39')]?_0x5b0c82[_0x3a6e('0x37')]:_0x1c81ef[_0x3a6e('0x33')];if(_0x3b2823[_0x3a6e('0x34')][_0x3a6e('0x43')]){_0x5b0c82[_0x3a6e('0x4a')]=[{'all':!![]}];}_0x5b0c82=_[_0x3a6e('0x4b')]({},_0x5b0c82,_0x3b2823[_0x3a6e('0x42')]);return db[_0x3a6e('0x44')][_0x3a6e('0x4c')](_0x5b0c82)['then'](handleEntityNotFound(_0x2d798f,null))[_0x3a6e('0x27')](respondWithResult(_0x2d798f,null))['catch'](handleError(_0x2d798f,null));};exports[_0x3a6e('0x4d')]=function(_0x32ef2a,_0x31d2a5){return db[_0x3a6e('0x44')][_0x3a6e('0x4d')](_0x32ef2a[_0x3a6e('0x4e')],{})[_0x3a6e('0x27')](respondWithResult(_0x31d2a5,0xc9))['catch'](handleError(_0x31d2a5,null));};exports[_0x3a6e('0x25')]=function(_0x25e1d1,_0x5974f4){if(_0x25e1d1[_0x3a6e('0x4e')]['id']){delete _0x25e1d1[_0x3a6e('0x4e')]['id'];}return db[_0x3a6e('0x44')]['find']({'where':{'id':_0x25e1d1[_0x3a6e('0x48')]['id']}})['then'](handleEntityNotFound(_0x5974f4,null))[_0x3a6e('0x27')](saveUpdates(_0x25e1d1['body'],null))[_0x3a6e('0x27')](respondWithResult(_0x5974f4,null))[_0x3a6e('0x46')](handleError(_0x5974f4,null));};exports['destroy']=function(_0x3d2385,_0x5d2dc7){return db[_0x3a6e('0x44')][_0x3a6e('0x4c')]({'where':{'id':_0x3d2385[_0x3a6e('0x48')]['id']}})['then'](handleEntityNotFound(_0x5d2dc7,null))['then'](removeEntity(_0x5d2dc7,null))[_0x3a6e('0x46')](handleError(_0x5d2dc7,null));};exports[_0x3a6e('0x4f')]=function(_0x45ae10,_0x37e158,_0xf0390d){var _0xb7118f={};var _0x388bca={};var _0x2c3619;var _0x4545ed;return db[_0x3a6e('0x44')][_0x3a6e('0x50')]({'where':{'id':_0x45ae10['params']['id']}})[_0x3a6e('0x27')](handleEntityNotFound(_0x37e158,null))[_0x3a6e('0x27')](function(_0xca5111){if(_0xca5111){_0x2c3619=_0xca5111;_0x388bca['model']=_['keys'](db[_0x3a6e('0x51')][_0x3a6e('0x2f')]);_0x388bca[_0x3a6e('0x34')]=_['keys'](_0x45ae10[_0x3a6e('0x34')]);_0x388bca[_0x3a6e('0x35')]=_[_0x3a6e('0x36')](_0x388bca[_0x3a6e('0x33')],_0x388bca['query']);_0xb7118f[_0x3a6e('0x37')]=_['intersection'](_0x388bca[_0x3a6e('0x33')],qs[_0x3a6e('0x38')](_0x45ae10[_0x3a6e('0x34')][_0x3a6e('0x38')]));_0xb7118f[_0x3a6e('0x37')]=_0xb7118f[_0x3a6e('0x37')][_0x3a6e('0x39')]?_0xb7118f['attributes']:_0x388bca['model'];_0xb7118f['order']=qs[_0x3a6e('0x3d')](_0x45ae10[_0x3a6e('0x34')][_0x3a6e('0x3d')]);_0xb7118f[_0x3a6e('0x3e')]=qs['filters'](_['pick'](_0x45ae10['query'],_0x388bca[_0x3a6e('0x35')]));if(_0x45ae10[_0x3a6e('0x34')][_0x3a6e('0x40')]){_0xb7118f['where']=_['merge'](_0xb7118f[_0x3a6e('0x3e')],{'$or':_['map'](_0xb7118f[_0x3a6e('0x37')],function(_0x4b3948){var _0x415943={};_0x415943[_0x4b3948]={'$like':'%'+_0x45ae10[_0x3a6e('0x34')][_0x3a6e('0x40')]+'%'};return _0x415943;})});}_0xb7118f=_[_0x3a6e('0x4b')]({},_0xb7118f,_0x45ae10['options']);return _0x2c3619[_0x3a6e('0x4f')](_0xb7118f);}})[_0x3a6e('0x27')](function(_0x2a7681){if(_0x2a7681){_0x4545ed=_0x2a7681[_0x3a6e('0x39')];if(!_0x45ae10[_0x3a6e('0x34')][_0x3a6e('0x3a')](_0x3a6e('0x3b'))){_0xb7118f[_0x3a6e('0x1f')]=qs['limit'](_0x45ae10[_0x3a6e('0x34')][_0x3a6e('0x1f')]);_0xb7118f[_0x3a6e('0x1d')]=qs[_0x3a6e('0x1d')](_0x45ae10[_0x3a6e('0x34')]['offset']);}return _0x2c3619[_0x3a6e('0x4f')](_0xb7118f);}})['then'](function(_0x315484){if(_0x315484){return _0x315484?{'count':_0x4545ed,'rows':_0x315484}:null;}})['then'](respondWithResult(_0x37e158,null))['catch'](handleError(_0x37e158,null));};exports[_0x3a6e('0x52')]=function(_0x2be597,_0x4e485c,_0x5b63cc){if(_0x2be597['body']['id']){delete _0x2be597['body']['id'];}return db[_0x3a6e('0x44')]['findOne']({'where':{'id':_0x2be597['params']['id']}})[_0x3a6e('0x27')](handleEntityNotFound(_0x4e485c,null))[_0x3a6e('0x27')](function(_0x12f3dc){if(_0x12f3dc){_0x2be597[_0x3a6e('0x4e')]['AccountId']=_0x12f3dc['id'];_0x2be597['body'][_0x3a6e('0x53')]=integrations[_0x3a6e('0x54')](_0x2be597[_0x3a6e('0x4e')][_0x3a6e('0x55')],_0x2be597[_0x3a6e('0x4e')][_0x3a6e('0x31')]);_0x2be597[_0x3a6e('0x4e')]['Descriptions']=integrations['getDescriptions'](_0x2be597[_0x3a6e('0x4e')][_0x3a6e('0x55')],_0x2be597[_0x3a6e('0x4e')][_0x3a6e('0x31')]);return db[_0x3a6e('0x51')][_0x3a6e('0x4d')](_0x2be597[_0x3a6e('0x4e')],{'include':[{'model':db[_0x3a6e('0x56')],'as':_0x3a6e('0x53')},{'model':db[_0x3a6e('0x56')],'as':_0x3a6e('0x57')}]});}return null;})[_0x3a6e('0x27')](respondWithResult(_0x4e485c,null))[_0x3a6e('0x46')](handleError(_0x4e485c,null));};function getAccessToken(_0x38cb13){return new Promise(function(_0x582165,_0x2010f7){var _0x425fa6;switch(_0x38cb13[_0x3a6e('0x58')]){case'US':_0x425fa6=_0x3a6e('0x59');break;case'AU':_0x425fa6=_0x3a6e('0x5a');break;case'EU':_0x425fa6='https://accounts.zoho.eu';break;case'IN':_0x425fa6=_0x3a6e('0x5b');break;case'CN':_0x425fa6=_0x3a6e('0x5c');break;default:_0x425fa6=_0x3a6e('0x5d');break;}var _0x44e570={'method':_0x3a6e('0x5e'),'uri':_0x425fa6+_0x3a6e('0x5f'),'qs':{'refresh_token':_0x38cb13[_0x3a6e('0x60')],'client_id':_0x38cb13[_0x3a6e('0x61')],'client_secret':_0x38cb13['clientSecret'],'grant_type':'refresh_token'},'json':!![]};return rp(_0x44e570)[_0x3a6e('0x27')](function(_0x4c1595){if(_0x4c1595[_0x3a6e('0x62')]){_0x582165(_0x4c1595[_0x3a6e('0x62')]);}else{_0x2010f7(_0x3a6e('0x63'));}})[_0x3a6e('0x46')](function(_0x5af522){_0x2010f7(_0x5af522);});});}exports['getFields']=function(_0x11e3f3,_0x3fdf43,_0x267d64){var _0x3118c8,_0x114b2f,_0x19db2a,_0x2a9f7d,_0x318de6;return db['ZohoAccount']['findOne']({'where':{'id':_0x11e3f3[_0x3a6e('0x48')]['id']},'attributes':['id','host',_0x3a6e('0x58'),_0x3a6e('0x61'),_0x3a6e('0x64'),_0x3a6e('0x65'),_0x3a6e('0x66'),_0x3a6e('0x60')]})[_0x3a6e('0x27')](handleEntityNotFound(_0x3fdf43,null))[_0x3a6e('0x27')](function(_0x33623f){_0x318de6=_0x33623f;_0x3118c8=_0x318de6[_0x3a6e('0x67')];_0x114b2f=_0x3118c8===_0x3a6e('0x68')?'eu':_0x3a6e('0x69');_0x19db2a=_0x318de6['serverUrl'];var _0x2682d0=_0x19db2a[_0x3a6e('0x6a')](-0x1);if(_0x2682d0==='/'||_0x2682d0==='\x5c'||_0x2682d0===':'){_0x19db2a=_0x19db2a[_0x3a6e('0x6b')](0x0,_0x19db2a[_0x3a6e('0x6c')](_0x2682d0));}if(!_0x318de6[_0x3a6e('0x60')]){throw new Error('Refresh\x20Token\x20not\x20available\x20for\x20the\x20account');}return getAccessToken(_0x318de6);})['then'](function(_0x4afcf1){if(_0x4afcf1){return rp({'method':'GET','uri':util[_0x3a6e('0x6d')](_0x3a6e('0x6e'),_0x114b2f),'qs':{'module':'Calls'},'headers':{'Authorization':_0x3a6e('0x6f')+_0x4afcf1},'json':!![]});}})[_0x3a6e('0x27')](function(_0x5b3564){if(_0x5b3564){if(_0x5b3564[_0x3a6e('0x70')]&&_0x5b3564[_0x3a6e('0x70')][_0x3a6e('0x29')]){throw new Error(_0x5b3564[_0x3a6e('0x70')][_0x3a6e('0x29')][_0x3a6e('0x71')]);}var _0xd3c665=[];var _0x2a2e4b=[];var _0x2d8e68=[_0x3a6e('0x72'),_0x3a6e('0x73'),'Description',_0x3a6e('0x74'),_0x3a6e('0x75'),_0x3a6e('0x76'),_0x3a6e('0x77'),_0x3a6e('0x78')];_0x2a2e4b=_[_0x3a6e('0x79')](_0x5b3564['fields'],function(_0x5c3768){return _0x2d8e68['includes'](_0x5c3768[_0x3a6e('0x7a')]);});for(var _0x493c90=0x0;_0x493c90<_0x2a2e4b[_0x3a6e('0x39')];_0x493c90++){if(_0x2a2e4b[_0x493c90][_0x3a6e('0x7b')]===![]){_0xd3c665[_0x3a6e('0x7c')]({'id':_0x2a2e4b[_0x493c90]['id'],'name':_0x2a2e4b[_0x493c90][_0x3a6e('0x7d')],'custom':_0x2a2e4b[_0x493c90][_0x3a6e('0x7e')],'options':_0x2a2e4b[_0x493c90][_0x3a6e('0x7f')]===_0x3a6e('0x80')&&_0x2a2e4b[_0x493c90]['pick_list_values'][_0x3a6e('0x39')]>-0x1?_[_0x3a6e('0x2e')](_0x2a2e4b[_0x493c90][_0x3a6e('0x81')],function(_0x55ce94){return{'name':_0x55ce94,'value':_0x55ce94};}):[]});}}return{'count':_0xd3c665[_0x3a6e('0x39')],'rows':_0xd3c665};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithResult(_0x3fdf43,null))[_0x3a6e('0x46')](function(_0x54e8b2){var _0x49ab05=_0x11e3f3['query'][_0x3a6e('0x82')]?0x1f4:_0x54e8b2[_0x3a6e('0x83')]||0x1f4;logger['error'](_0x3a6e('0x84'),_0x3a6e('0x85'),_0x49ab05,JSON[_0x3a6e('0x86')](_0x54e8b2));delete _0x54e8b2['name'];if(_0x49ab05===0x191){_0x49ab05=0x190;}_0x3fdf43['status'](_0x49ab05)[_0x3a6e('0x2c')](_0x11e3f3[_0x3a6e('0x34')][_0x3a6e('0x82')]?{'message':_0x3a6e('0x87'),'statusCode':_0x54e8b2[_0x3a6e('0x83')]}:_0x54e8b2);});};
\ No newline at end of file
index a58f28b..490e0db 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1656=['lastIndexOf','https://accounts.zoho.com','https://accounts.zoho.com.au','https://accounts.zoho.in','https://accounts.zoho.com.cn','https://accounts.zoho.eu','POST','/oauth/v2/token','authorization_code','clientId','code','application/x-www-form-urlencoded','then','parse','refresh_token','refreshToken','info','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','inspect','catch','slice','clientSecret','util','../../config/logger','bluebird','path','../../config/environment','./intZohoAccount.attributes','../../components/integrations/configuration','exports','define','ZohoAccount','int_zoho_accounts','zone','changed','serverUrl','host','substring'];(function(_0x64aff8,_0x106082){var _0x5488a3=function(_0x36969c){while(--_0x36969c){_0x64aff8['push'](_0x64aff8['shift']());}};_0x5488a3(++_0x106082);}(_0x1656,0x194));var _0x6165=function(_0x13b8b1,_0x42882a){_0x13b8b1=_0x13b8b1-0x0;var _0x467f68=_0x1656[_0x13b8b1];return _0x467f68;};'use strict';var _=require('lodash');var util=require(_0x6165('0x0'));var logger=require(_0x6165('0x1'))('api');var moment=require('moment');var BPromise=require(_0x6165('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x6165('0x3'));var rimraf=require('rimraf');var config=require(_0x6165('0x4'));var attributes=require(_0x6165('0x5'));var integrations=require(_0x6165('0x6'));module[_0x6165('0x7')]=function(_0x15e16f,_0x2f8cbf){return _0x15e16f[_0x6165('0x8')](_0x6165('0x9'),attributes,{'tableName':_0x6165('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeCreate':function(_0x2ff66f,_0x12e951,_0x4fd9b0){if(_0x2ff66f['changed'](_0x6165('0xb'))||_0x2ff66f[_0x6165('0xc')](_0x6165('0xd'))||_0x2ff66f['changed']('clientId')||_0x2ff66f['changed']('clientSecret')||_0x2ff66f[_0x6165('0xc')]('code')||_0x2ff66f[_0x6165('0xc')](_0x6165('0xe'))){var _0x5813c1,_0x1683da;_0x5813c1=_0x2ff66f[_0x6165('0xd')];var _0x30746d=_0x5813c1['slice'](-0x1);if(_0x30746d==='/'||_0x30746d==='\x5c'||_0x30746d===':'){_0x5813c1=_0x5813c1[_0x6165('0xf')](0x0,_0x5813c1[_0x6165('0x10')](_0x30746d));}switch(_0x2ff66f[_0x6165('0xb')]){case'US':_0x1683da=_0x6165('0x11');break;case'AU':_0x1683da=_0x6165('0x12');break;case'IN':_0x1683da=_0x6165('0x13');break;case'CN':_0x1683da=_0x6165('0x14');break;default:_0x1683da=_0x6165('0x15');break;}var _0x136b80={'method':_0x6165('0x16'),'uri':_0x1683da+_0x6165('0x17'),'form':{'grant_type':_0x6165('0x18'),'client_id':_0x2ff66f[_0x6165('0x19')],'client_secret':_0x2ff66f['clientSecret'],'redirect_uri':_0x2ff66f['serverUrl'],'code':_0x2ff66f[_0x6165('0x1a')]},'headers':{'Content-Type':_0x6165('0x1b')}};return rp(_0x136b80)[_0x6165('0x1c')](function(_0xd5fb74){var _0x364154=JSON[_0x6165('0x1d')](_0xd5fb74);if(_0x364154[_0x6165('0x1e')]){_0x2ff66f[_0x6165('0x1f')]=_0x364154['refresh_token'];logger[_0x6165('0x20')](util[_0x6165('0x21')](_0x6165('0x22'),_0x2ff66f[_0x6165('0x23')],_0x2ff66f['id']));}else{logger[_0x6165('0x24')](util['format'](_0x6165('0x25'),_0x2ff66f[_0x6165('0x23')],_0x2ff66f['id']),util[_0x6165('0x26')](_0x364154,{'showHidden':![],'depth':null}));}return _0x4fd9b0(null,_0x12e951);})[_0x6165('0x27')](function(_0x9e78a0){logger['error'](util[_0x6165('0x21')](_0x6165('0x25'),_0x2ff66f[_0x6165('0x23')],_0x2ff66f['id']),util['inspect'](parsedResult,{'showHidden':![],'depth':null}));return _0x4fd9b0(_0x9e78a0);});}else{return _0x4fd9b0(null,_0x12e951);}},'beforeUpdate':function(_0x5d9593,_0x3287da,_0x19e380){if(_0x5d9593['changed'](_0x6165('0xb'))||_0x5d9593[_0x6165('0xc')](_0x6165('0xd'))||_0x5d9593[_0x6165('0xc')](_0x6165('0x19'))||_0x5d9593[_0x6165('0xc')]('clientSecret')||_0x5d9593['changed'](_0x6165('0x1a'))||_0x5d9593[_0x6165('0xc')](_0x6165('0xe'))){var _0x33513d,_0x24fbeb;_0x33513d=_0x5d9593[_0x6165('0xd')];var _0x356d24=_0x33513d[_0x6165('0x28')](-0x1);if(_0x356d24==='/'||_0x356d24==='\x5c'||_0x356d24===':'){_0x33513d=_0x33513d[_0x6165('0xf')](0x0,_0x33513d['lastIndexOf'](_0x356d24));}switch(_0x5d9593[_0x6165('0xb')]){case'US':_0x24fbeb='https://accounts.zoho.com';break;case'AU':_0x24fbeb=_0x6165('0x12');break;case'IN':_0x24fbeb=_0x6165('0x13');break;case'CN':_0x24fbeb=_0x6165('0x14');break;default:_0x24fbeb=_0x6165('0x15');break;}var _0x417677={'method':_0x6165('0x16'),'uri':_0x24fbeb+_0x6165('0x17'),'form':{'grant_type':_0x6165('0x18'),'client_id':_0x5d9593[_0x6165('0x19')],'client_secret':_0x5d9593[_0x6165('0x29')],'redirect_uri':_0x5d9593['serverUrl'],'code':_0x5d9593[_0x6165('0x1a')]},'headers':{'Content-Type':'application/x-www-form-urlencoded'}};return rp(_0x417677)['then'](function(_0x56330c){var _0x90d67d=JSON[_0x6165('0x1d')](_0x56330c);if(_0x90d67d[_0x6165('0x1e')]){_0x5d9593[_0x6165('0x1f')]=_0x90d67d['refresh_token'];logger[_0x6165('0x20')](util['format'](_0x6165('0x22'),_0x5d9593[_0x6165('0x23')],_0x5d9593['id']));}else{logger[_0x6165('0x24')](util['format'](_0x6165('0x25'),_0x5d9593[_0x6165('0x23')],_0x5d9593['id']),util['inspect'](_0x90d67d,{'showHidden':![],'depth':null}));}return _0x19e380(null,_0x3287da);})[_0x6165('0x27')](function(_0x30d929){logger[_0x6165('0x24')](util[_0x6165('0x21')]('ZohoAccount,\x20Unable\x20to\x20generate\x20the\x20refresh\x20token\x20for\x20account\x20\x22%s\x22\x20#%d',_0x5d9593['name'],_0x5d9593['id']),util[_0x6165('0x26')](parsedResult,{'showHidden':![],'depth':null}));return _0x19e380(_0x30d929);});}else{return _0x19e380(null,_0x3287da);}}}});};
\ No newline at end of file
+var _0x9471=['./intZohoAccount.attributes','../../components/integrations/configuration','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','https://accounts.zoho.com.cn','https://accounts.zoho.eu','POST','then','parse','refresh_token','refreshToken','info','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','inspect','/oauth/v2/token','application/x-www-form-urlencoded','catch','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x12f688,_0x585c25){var _0x59c3de=function(_0x4ac301){while(--_0x4ac301){_0x12f688['push'](_0x12f688['shift']());}};_0x59c3de(++_0x585c25);}(_0x9471,0xd3));var _0x1947=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x9471[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0x1947('0x0'));var logger=require(_0x1947('0x1'))(_0x1947('0x2'));var moment=require(_0x1947('0x3'));var BPromise=require(_0x1947('0x4'));var rp=require(_0x1947('0x5'));var fs=require('fs');var path=require(_0x1947('0x6'));var rimraf=require(_0x1947('0x7'));var config=require(_0x1947('0x8'));var attributes=require(_0x1947('0x9'));var integrations=require(_0x1947('0xa'));module['exports']=function(_0x268cab,_0x1f8389){return _0x268cab[_0x1947('0xb')](_0x1947('0xc'),attributes,{'tableName':_0x1947('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeCreate':function(_0x3b5d04,_0x255f2c,_0x5b7a8b){if(_0x3b5d04[_0x1947('0xe')](_0x1947('0xf'))||_0x3b5d04[_0x1947('0xe')](_0x1947('0x10'))||_0x3b5d04[_0x1947('0xe')](_0x1947('0x11'))||_0x3b5d04[_0x1947('0xe')](_0x1947('0x12'))||_0x3b5d04['changed'](_0x1947('0x13'))||_0x3b5d04['changed'](_0x1947('0x14'))){var _0x39dfd5,_0x5cfc47;_0x39dfd5=_0x3b5d04['serverUrl'];var _0x4c050d=_0x39dfd5[_0x1947('0x15')](-0x1);if(_0x4c050d==='/'||_0x4c050d==='\x5c'||_0x4c050d===':'){_0x39dfd5=_0x39dfd5[_0x1947('0x16')](0x0,_0x39dfd5[_0x1947('0x17')](_0x4c050d));}switch(_0x3b5d04[_0x1947('0xf')]){case'US':_0x5cfc47=_0x1947('0x18');break;case'AU':_0x5cfc47=_0x1947('0x19');break;case'IN':_0x5cfc47=_0x1947('0x1a');break;case'CN':_0x5cfc47=_0x1947('0x1b');break;default:_0x5cfc47=_0x1947('0x1c');break;}var _0x1e1f3c={'method':_0x1947('0x1d'),'uri':_0x5cfc47+'/oauth/v2/token','form':{'grant_type':'authorization_code','client_id':_0x3b5d04['clientId'],'client_secret':_0x3b5d04[_0x1947('0x12')],'redirect_uri':_0x3b5d04['serverUrl'],'code':_0x3b5d04[_0x1947('0x13')]},'headers':{'Content-Type':'application/x-www-form-urlencoded'}};return rp(_0x1e1f3c)[_0x1947('0x1e')](function(_0x49d52e){var _0x1b4a86=JSON[_0x1947('0x1f')](_0x49d52e);if(_0x1b4a86[_0x1947('0x20')]){_0x3b5d04[_0x1947('0x21')]=_0x1b4a86['refresh_token'];logger[_0x1947('0x22')](util[_0x1947('0x23')](_0x1947('0x24'),_0x3b5d04[_0x1947('0x25')],_0x3b5d04['id']));}else{logger[_0x1947('0x26')](util[_0x1947('0x23')](_0x1947('0x27'),_0x3b5d04[_0x1947('0x25')],_0x3b5d04['id']),util[_0x1947('0x28')](_0x1b4a86,{'showHidden':![],'depth':null}));}return _0x5b7a8b(null,_0x255f2c);})['catch'](function(_0x20c45a){logger[_0x1947('0x26')](util[_0x1947('0x23')](_0x1947('0x27'),_0x3b5d04[_0x1947('0x25')],_0x3b5d04['id']),util['inspect'](parsedResult,{'showHidden':![],'depth':null}));return _0x5b7a8b(_0x20c45a);});}else{return _0x5b7a8b(null,_0x255f2c);}},'beforeUpdate':function(_0x508067,_0x13a6fd,_0x1ca886){if(_0x508067['changed']('zone')||_0x508067[_0x1947('0xe')](_0x1947('0x10'))||_0x508067[_0x1947('0xe')]('clientId')||_0x508067['changed'](_0x1947('0x12'))||_0x508067['changed'](_0x1947('0x13'))||_0x508067[_0x1947('0xe')](_0x1947('0x14'))){var _0x476245,_0x403ff7;_0x476245=_0x508067[_0x1947('0x10')];var _0x2704f8=_0x476245['slice'](-0x1);if(_0x2704f8==='/'||_0x2704f8==='\x5c'||_0x2704f8===':'){_0x476245=_0x476245[_0x1947('0x16')](0x0,_0x476245[_0x1947('0x17')](_0x2704f8));}switch(_0x508067[_0x1947('0xf')]){case'US':_0x403ff7=_0x1947('0x18');break;case'AU':_0x403ff7=_0x1947('0x19');break;case'IN':_0x403ff7='https://accounts.zoho.in';break;case'CN':_0x403ff7=_0x1947('0x1b');break;default:_0x403ff7=_0x1947('0x1c');break;}var _0x2fcac2={'method':_0x1947('0x1d'),'uri':_0x403ff7+_0x1947('0x29'),'form':{'grant_type':'authorization_code','client_id':_0x508067[_0x1947('0x11')],'client_secret':_0x508067[_0x1947('0x12')],'redirect_uri':_0x508067['serverUrl'],'code':_0x508067[_0x1947('0x13')]},'headers':{'Content-Type':_0x1947('0x2a')}};return rp(_0x2fcac2)[_0x1947('0x1e')](function(_0x449679){var _0x4e2a6c=JSON[_0x1947('0x1f')](_0x449679);if(_0x4e2a6c[_0x1947('0x20')]){_0x508067[_0x1947('0x21')]=_0x4e2a6c[_0x1947('0x20')];logger[_0x1947('0x22')](util[_0x1947('0x23')](_0x1947('0x24'),_0x508067['name'],_0x508067['id']));}else{logger['error'](util['format'](_0x1947('0x27'),_0x508067[_0x1947('0x25')],_0x508067['id']),util['inspect'](_0x4e2a6c,{'showHidden':![],'depth':null}));}return _0x1ca886(null,_0x13a6fd);})[_0x1947('0x2b')](function(_0x31e3fa){logger['error'](util['format']('ZohoAccount,\x20Unable\x20to\x20generate\x20the\x20refresh\x20token\x20for\x20account\x20\x22%s\x22\x20#%d',_0x508067['name'],_0x508067['id']),util[_0x1947('0x28')](parsedResult,{'showHidden':![],'depth':null}));return _0x1ca886(_0x31e3fa);});}else{return _0x1ca886(null,_0x13a6fd);}}}});};
\ No newline at end of file
index d389f8d..32565d6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf0f4=['catch','GetZohoAccount','findAll','options','raw','attributes','include','map','model','ShowZohoAccount','ZohoAccount','find','util','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','ZohoAccount,\x20%s,\x20%s','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result'];(function(_0x15fc07,_0x41cc0c){var _0x3d2c0f=function(_0x2a9a17){while(--_0x2a9a17){_0x15fc07['push'](_0x15fc07['shift']());}};_0x3d2c0f(++_0x41cc0c);}(_0xf0f4,0x182));var _0x4f0f=function(_0x3504ea,_0x5c57d9){_0x3504ea=_0x3504ea-0x0;var _0x318065=_0xf0f4[_0x3504ea];return _0x318065;};'use strict';var _=require('lodash');var util=require(_0x4f0f('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x4f0f('0x1'));var fs=require('fs');var Redis=require(_0x4f0f('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0x4f0f('0x3'));var logger=require(_0x4f0f('0x4'))(_0x4f0f('0x5'));var config=require(_0x4f0f('0x6'));var jayson=require(_0x4f0f('0x7'));var client=jayson[_0x4f0f('0x8')][_0x4f0f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x47faf5,_0x39ad76,_0x1dd6bd){return new BPromise(function(_0x95b1cf,_0x5da92f){return client[_0x4f0f('0xa')](_0x47faf5,_0x1dd6bd)[_0x4f0f('0xb')](function(_0x19cecb){logger[_0x4f0f('0xc')](_0x4f0f('0xd'),_0x39ad76,_0x4f0f('0xe'));logger[_0x4f0f('0xf')](_0x4f0f('0x10'),_0x39ad76,'request\x20sent',JSON[_0x4f0f('0x11')](_0x19cecb));if(_0x19cecb[_0x4f0f('0x12')]){if(_0x19cecb[_0x4f0f('0x12')][_0x4f0f('0x13')]===0x1f4){logger[_0x4f0f('0x12')](_0x4f0f('0xd'),_0x39ad76,_0x19cecb[_0x4f0f('0x12')][_0x4f0f('0x14')]);return _0x5da92f(_0x19cecb[_0x4f0f('0x12')][_0x4f0f('0x14')]);}logger[_0x4f0f('0x12')]('ZohoAccount,\x20%s,\x20%s',_0x39ad76,_0x19cecb[_0x4f0f('0x12')][_0x4f0f('0x14')]);return _0x95b1cf(_0x19cecb[_0x4f0f('0x12')][_0x4f0f('0x14')]);}else{logger['info'](_0x4f0f('0xd'),_0x39ad76,_0x4f0f('0xe'));_0x95b1cf(_0x19cecb[_0x4f0f('0x15')][_0x4f0f('0x14')]);}})[_0x4f0f('0x16')](function(_0x5f171b){logger[_0x4f0f('0x12')](_0x4f0f('0xd'),_0x39ad76,_0x5f171b);_0x5da92f(_0x5f171b);});});}exports[_0x4f0f('0x17')]=function(_0x566049){var _0x2ca0b3=this;return new Promise(function(_0x86186f,_0x15ba1f){return db['ZohoAccount'][_0x4f0f('0x18')]({'raw':_0x566049[_0x4f0f('0x19')]?_0x566049[_0x4f0f('0x19')][_0x4f0f('0x1a')]===undefined?!![]:![]:!![],'where':_0x566049[_0x4f0f('0x19')]?_0x566049[_0x4f0f('0x19')]['where']||null:null,'attributes':_0x566049[_0x4f0f('0x19')]?_0x566049['options'][_0x4f0f('0x1b')]||null:null,'limit':_0x566049[_0x4f0f('0x19')]?_0x566049['options']['limit']||null:null,'include':_0x566049[_0x4f0f('0x19')]?_0x566049['options'][_0x4f0f('0x1c')]?_[_0x4f0f('0x1d')](_0x566049[_0x4f0f('0x19')][_0x4f0f('0x1c')],function(_0x454720){return{'model':db[_0x454720[_0x4f0f('0x1e')]],'as':_0x454720['as'],'attributes':_0x454720['attributes'],'include':_0x454720[_0x4f0f('0x1c')]?_[_0x4f0f('0x1d')](_0x454720[_0x4f0f('0x1c')],function(_0x3bc77d){return{'model':db[_0x3bc77d[_0x4f0f('0x1e')]],'as':_0x3bc77d['as'],'attributes':_0x3bc77d[_0x4f0f('0x1b')],'include':_0x3bc77d[_0x4f0f('0x1c')]?_[_0x4f0f('0x1d')](_0x3bc77d[_0x4f0f('0x1c')],function(_0xb20be9){return{'model':db[_0xb20be9[_0x4f0f('0x1e')]],'as':_0xb20be9['as'],'attributes':_0xb20be9[_0x4f0f('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x4f0f('0xb')](function(_0x5c13d1){logger[_0x4f0f('0xc')](_0x4f0f('0x17'),_0x566049);logger[_0x4f0f('0xf')]('GetZohoAccount',_0x566049,JSON[_0x4f0f('0x11')](_0x5c13d1));_0x86186f(_0x5c13d1);})['catch'](function(_0x449788){logger[_0x4f0f('0x12')]('GetZohoAccount',_0x449788['message'],_0x566049);_0x15ba1f(_0x2ca0b3[_0x4f0f('0x12')](0x1f4,_0x449788['message']));});});};exports[_0x4f0f('0x1f')]=function(_0x9319c0){var _0x514a2c=this;return new Promise(function(_0x3d3762,_0xf7acac){return db[_0x4f0f('0x20')][_0x4f0f('0x21')]({'raw':_0x9319c0['options']?_0x9319c0[_0x4f0f('0x19')][_0x4f0f('0x1a')]===undefined?!![]:![]:!![],'where':_0x9319c0[_0x4f0f('0x19')]?_0x9319c0[_0x4f0f('0x19')]['where']||null:null,'attributes':_0x9319c0[_0x4f0f('0x19')]?_0x9319c0[_0x4f0f('0x19')][_0x4f0f('0x1b')]||null:null,'include':_0x9319c0['options']?_0x9319c0[_0x4f0f('0x19')][_0x4f0f('0x1c')]?_['map'](_0x9319c0[_0x4f0f('0x19')][_0x4f0f('0x1c')],function(_0x507277){return{'model':db[_0x507277[_0x4f0f('0x1e')]],'as':_0x507277['as'],'attributes':_0x507277['attributes'],'include':_0x507277[_0x4f0f('0x1c')]?_[_0x4f0f('0x1d')](_0x507277[_0x4f0f('0x1c')],function(_0xa790fa){return{'model':db[_0xa790fa[_0x4f0f('0x1e')]],'as':_0xa790fa['as'],'attributes':_0xa790fa[_0x4f0f('0x1b')],'include':_0xa790fa[_0x4f0f('0x1c')]?_[_0x4f0f('0x1d')](_0xa790fa['include'],function(_0x156d22){return{'model':db[_0x156d22[_0x4f0f('0x1e')]],'as':_0x156d22['as'],'attributes':_0x156d22[_0x4f0f('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x4f0f('0xb')](function(_0x122d51){logger[_0x4f0f('0xc')](_0x4f0f('0x1f'),_0x9319c0);logger['debug'](_0x4f0f('0x1f'),_0x9319c0,JSON[_0x4f0f('0x11')](_0x122d51));_0x3d3762(_0x122d51);})[_0x4f0f('0x16')](function(_0x563847){logger[_0x4f0f('0x12')]('ShowZohoAccount',_0x563847[_0x4f0f('0x14')],_0x9319c0);_0xf7acac(_0x514a2c['error'](0x1f4,_0x563847[_0x4f0f('0x14')]));});});};
\ No newline at end of file
+var _0x8ff9=['model','then','ShowZohoAccount','find','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','info','ZohoAccount,\x20%s,\x20%s','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','GetZohoAccount','ZohoAccount','findAll','options','raw','where','attributes','limit','include','map'];(function(_0x1fc997,_0x536877){var _0x4e5985=function(_0x84e87d){while(--_0x84e87d){_0x1fc997['push'](_0x1fc997['shift']());}};_0x4e5985(++_0x536877);}(_0x8ff9,0x1a6));var _0x98ff=function(_0xdf18de,_0x39ca70){_0xdf18de=_0xdf18de-0x0;var _0xae7373=_0x8ff9[_0xdf18de];return _0xae7373;};'use strict';var _=require(_0x98ff('0x0'));var util=require(_0x98ff('0x1'));var moment=require(_0x98ff('0x2'));var BPromise=require(_0x98ff('0x3'));var rs=require(_0x98ff('0x4'));var fs=require('fs');var Redis=require(_0x98ff('0x5'));var db=require(_0x98ff('0x6'))['db'];var utils=require(_0x98ff('0x7'));var logger=require(_0x98ff('0x8'))(_0x98ff('0x9'));var config=require(_0x98ff('0xa'));var jayson=require('jayson/promise');var client=jayson[_0x98ff('0xb')][_0x98ff('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x13537e,_0x21d840,_0x12d3fe){return new BPromise(function(_0xbe13f3,_0x51fbd8){return client[_0x98ff('0xd')](_0x13537e,_0x12d3fe)['then'](function(_0x4bbf37){logger[_0x98ff('0xe')](_0x98ff('0xf'),_0x21d840,_0x98ff('0x10'));logger[_0x98ff('0x11')](_0x98ff('0x12'),_0x21d840,'request\x20sent',JSON[_0x98ff('0x13')](_0x4bbf37));if(_0x4bbf37['error']){if(_0x4bbf37[_0x98ff('0x14')]['code']===0x1f4){logger['error'](_0x98ff('0xf'),_0x21d840,_0x4bbf37[_0x98ff('0x14')][_0x98ff('0x15')]);return _0x51fbd8(_0x4bbf37['error'][_0x98ff('0x15')]);}logger['error'](_0x98ff('0xf'),_0x21d840,_0x4bbf37[_0x98ff('0x14')][_0x98ff('0x15')]);return _0xbe13f3(_0x4bbf37[_0x98ff('0x14')][_0x98ff('0x15')]);}else{logger[_0x98ff('0xe')]('ZohoAccount,\x20%s,\x20%s',_0x21d840,_0x98ff('0x10'));_0xbe13f3(_0x4bbf37[_0x98ff('0x16')][_0x98ff('0x15')]);}})[_0x98ff('0x17')](function(_0x3751b9){logger[_0x98ff('0x14')](_0x98ff('0xf'),_0x21d840,_0x3751b9);_0x51fbd8(_0x3751b9);});});}exports[_0x98ff('0x18')]=function(_0x268121){var _0x3c04d4=this;return new Promise(function(_0x91e31c,_0x1611b5){return db[_0x98ff('0x19')][_0x98ff('0x1a')]({'raw':_0x268121['options']?_0x268121[_0x98ff('0x1b')][_0x98ff('0x1c')]===undefined?!![]:![]:!![],'where':_0x268121[_0x98ff('0x1b')]?_0x268121[_0x98ff('0x1b')][_0x98ff('0x1d')]||null:null,'attributes':_0x268121[_0x98ff('0x1b')]?_0x268121[_0x98ff('0x1b')][_0x98ff('0x1e')]||null:null,'limit':_0x268121[_0x98ff('0x1b')]?_0x268121[_0x98ff('0x1b')][_0x98ff('0x1f')]||null:null,'include':_0x268121[_0x98ff('0x1b')]?_0x268121[_0x98ff('0x1b')]['include']?_['map'](_0x268121['options'][_0x98ff('0x20')],function(_0x3ee01b){return{'model':db[_0x3ee01b['model']],'as':_0x3ee01b['as'],'attributes':_0x3ee01b[_0x98ff('0x1e')],'include':_0x3ee01b['include']?_[_0x98ff('0x21')](_0x3ee01b[_0x98ff('0x20')],function(_0x308efd){return{'model':db[_0x308efd[_0x98ff('0x22')]],'as':_0x308efd['as'],'attributes':_0x308efd[_0x98ff('0x1e')],'include':_0x308efd['include']?_['map'](_0x308efd[_0x98ff('0x20')],function(_0x1a4ebd){return{'model':db[_0x1a4ebd[_0x98ff('0x22')]],'as':_0x1a4ebd['as'],'attributes':_0x1a4ebd[_0x98ff('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x98ff('0x23')](function(_0x231e00){logger[_0x98ff('0xe')](_0x98ff('0x18'),_0x268121);logger[_0x98ff('0x11')](_0x98ff('0x18'),_0x268121,JSON['stringify'](_0x231e00));_0x91e31c(_0x231e00);})[_0x98ff('0x17')](function(_0x256823){logger[_0x98ff('0x14')](_0x98ff('0x18'),_0x256823[_0x98ff('0x15')],_0x268121);_0x1611b5(_0x3c04d4[_0x98ff('0x14')](0x1f4,_0x256823[_0x98ff('0x15')]));});});};exports[_0x98ff('0x24')]=function(_0x42213a){var _0x205d85=this;return new Promise(function(_0x3fa70c,_0x1472cb){return db[_0x98ff('0x19')][_0x98ff('0x25')]({'raw':_0x42213a[_0x98ff('0x1b')]?_0x42213a[_0x98ff('0x1b')][_0x98ff('0x1c')]===undefined?!![]:![]:!![],'where':_0x42213a[_0x98ff('0x1b')]?_0x42213a[_0x98ff('0x1b')][_0x98ff('0x1d')]||null:null,'attributes':_0x42213a[_0x98ff('0x1b')]?_0x42213a['options'][_0x98ff('0x1e')]||null:null,'include':_0x42213a[_0x98ff('0x1b')]?_0x42213a[_0x98ff('0x1b')][_0x98ff('0x20')]?_[_0x98ff('0x21')](_0x42213a['options'][_0x98ff('0x20')],function(_0x56b676){return{'model':db[_0x56b676[_0x98ff('0x22')]],'as':_0x56b676['as'],'attributes':_0x56b676[_0x98ff('0x1e')],'include':_0x56b676[_0x98ff('0x20')]?_[_0x98ff('0x21')](_0x56b676[_0x98ff('0x20')],function(_0x8dfe4d){return{'model':db[_0x8dfe4d[_0x98ff('0x22')]],'as':_0x8dfe4d['as'],'attributes':_0x8dfe4d[_0x98ff('0x1e')],'include':_0x8dfe4d[_0x98ff('0x20')]?_[_0x98ff('0x21')](_0x8dfe4d['include'],function(_0x20c907){return{'model':db[_0x20c907[_0x98ff('0x22')]],'as':_0x20c907['as'],'attributes':_0x20c907[_0x98ff('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x98ff('0x23')](function(_0x34219e){logger[_0x98ff('0xe')](_0x98ff('0x24'),_0x42213a);logger[_0x98ff('0x11')]('ShowZohoAccount',_0x42213a,JSON[_0x98ff('0x13')](_0x34219e));_0x3fa70c(_0x34219e);})['catch'](function(_0x13f7b1){logger[_0x98ff('0x14')](_0x98ff('0x24'),_0x13f7b1[_0x98ff('0x15')],_0x42213a);_0x1472cb(_0x205d85[_0x98ff('0x14')](0x1f4,_0x13f7b1['message']));});});};
\ No newline at end of file
index ed6d678..24fc5eb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3e1e=['/:id','show','/:id/fields','getFields','/:id/subjects','/:id/descriptions','getDescriptions','post','create','put','delete','destroy','multer','path','connect-timeout','express','Router','fs-extra','../../config/environment','./intZohoConfiguration.controller','isAuthenticated','get'];(function(_0xe64b4,_0x2e1eac){var _0x27343e=function(_0x4c1ea9){while(--_0x4c1ea9){_0xe64b4['push'](_0xe64b4['shift']());}};_0x27343e(++_0x2e1eac);}(_0x3e1e,0xa6));var _0xe3e1=function(_0x2fd9f9,_0x5d0440){_0x2fd9f9=_0x2fd9f9-0x0;var _0x28eec0=_0x3e1e[_0x2fd9f9];return _0x28eec0;};'use strict';var multer=require(_0xe3e1('0x0'));var util=require('util');var path=require(_0xe3e1('0x1'));var timeout=require(_0xe3e1('0x2'));var express=require(_0xe3e1('0x3'));var router=express[_0xe3e1('0x4')]();var fs_extra=require(_0xe3e1('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xe3e1('0x6'));var controller=require(_0xe3e1('0x7'));router['get']('/',auth[_0xe3e1('0x8')](),controller['index']);router[_0xe3e1('0x9')](_0xe3e1('0xa'),auth[_0xe3e1('0x8')](),controller[_0xe3e1('0xb')]);router['get'](_0xe3e1('0xc'),auth[_0xe3e1('0x8')](),controller[_0xe3e1('0xd')]);router[_0xe3e1('0x9')](_0xe3e1('0xe'),auth[_0xe3e1('0x8')](),controller['getSubjects']);router[_0xe3e1('0x9')](_0xe3e1('0xf'),auth['isAuthenticated'](),controller[_0xe3e1('0x10')]);router[_0xe3e1('0x11')]('/',auth[_0xe3e1('0x8')](),controller[_0xe3e1('0x12')]);router[_0xe3e1('0x13')]('/:id',auth[_0xe3e1('0x8')](),controller['update']);router[_0xe3e1('0x14')]('/:id',auth[_0xe3e1('0x8')](),controller[_0xe3e1('0x15')]);module['exports']=router;
\ No newline at end of file
+var _0x2cc6=['/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','post','create','put','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intZohoConfiguration.controller','isAuthenticated','index','/:id','show','get'];(function(_0x618414,_0x1a7a60){var _0x21c19a=function(_0x507b17){while(--_0x507b17){_0x618414['push'](_0x618414['shift']());}};_0x21c19a(++_0x1a7a60);}(_0x2cc6,0xea));var _0x62cc=function(_0x4f0ac9,_0xf8844e){_0x4f0ac9=_0x4f0ac9-0x0;var _0x1d1f24=_0x2cc6[_0x4f0ac9];return _0x1d1f24;};'use strict';var multer=require(_0x62cc('0x0'));var util=require(_0x62cc('0x1'));var path=require(_0x62cc('0x2'));var timeout=require(_0x62cc('0x3'));var express=require(_0x62cc('0x4'));var router=express[_0x62cc('0x5')]();var fs_extra=require(_0x62cc('0x6'));var auth=require(_0x62cc('0x7'));var interaction=require(_0x62cc('0x8'));var config=require(_0x62cc('0x9'));var controller=require(_0x62cc('0xa'));router['get']('/',auth[_0x62cc('0xb')](),controller[_0x62cc('0xc')]);router['get'](_0x62cc('0xd'),auth[_0x62cc('0xb')](),controller[_0x62cc('0xe')]);router[_0x62cc('0xf')]('/:id/fields',auth[_0x62cc('0xb')](),controller['getFields']);router[_0x62cc('0xf')](_0x62cc('0x10'),auth['isAuthenticated'](),controller[_0x62cc('0x11')]);router[_0x62cc('0xf')](_0x62cc('0x12'),auth[_0x62cc('0xb')](),controller[_0x62cc('0x13')]);router[_0x62cc('0x14')]('/',auth[_0x62cc('0xb')](),controller[_0x62cc('0x15')]);router[_0x62cc('0x16')](_0x62cc('0xd'),auth[_0x62cc('0xb')](),controller['update']);router['delete'](_0x62cc('0xd'),auth[_0x62cc('0xb')](),controller[_0x62cc('0x17')]);module[_0x62cc('0x18')]=router;
\ No newline at end of file
index 13ed7b6..90aded6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4371=['ENUM','lead','contact','nothing','contact_lead','sequelize','exports'];(function(_0x5bd426,_0x4878e5){var _0x23a7eb=function(_0x594b42){while(--_0x594b42){_0x5bd426['push'](_0x5bd426['shift']());}};_0x23a7eb(++_0x4878e5);}(_0x4371,0x8a));var _0x1437=function(_0x4f7e4f,_0xebbe5d){_0x4f7e4f=_0x4f7e4f-0x0;var _0x5ec1ed=_0x4371[_0x4f7e4f];return _0x5ec1ed;};'use strict';var Sequelize=require(_0x1437('0x0'));module[_0x1437('0x1')]={'name':{'type':Sequelize['STRING']},'moduleCreate':{'type':Sequelize[_0x1437('0x2')](_0x1437('0x3'),_0x1437('0x4'),_0x1437('0x5')),'defaultValue':'lead'},'moduleSearch':{'type':Sequelize['ENUM']('contact_lead',_0x1437('0x4'),_0x1437('0x3')),'defaultValue':_0x1437('0x6')},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xe02c=['ENUM','contact_lead','STRING','sequelize','lead','contact','nothing'];(function(_0x11dce1,_0x47613b){var _0x1f2862=function(_0x4168f0){while(--_0x4168f0){_0x11dce1['push'](_0x11dce1['shift']());}};_0x1f2862(++_0x47613b);}(_0xe02c,0x81));var _0xce02=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe02c[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0xce02('0x0'));module['exports']={'name':{'type':Sequelize['STRING']},'moduleCreate':{'type':Sequelize['ENUM'](_0xce02('0x1'),_0xce02('0x2'),_0xce02('0x3')),'defaultValue':_0xce02('0x1')},'moduleSearch':{'type':Sequelize[_0xce02('0x4')](_0xce02('0x5'),_0xce02('0x2'),_0xce02('0x1')),'defaultValue':'contact_lead'},'description':{'type':Sequelize[_0xce02('0x6')]}};
\ No newline at end of file
index 337da0d..5c0e246 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2826=['../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','reject','then','destroy','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','pick','filter','merge','where','VIRTUAL','options','ZohoConfiguration','includeAll','include','findAll','rows','catch','show','find','create','body','update','params','getFields','findOne','length','getSubjects','getDescriptions','eml-format','rimraf','zip-dir','moment','bluebird','util','sox','to-csv','fs-extra','lodash','squel','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs'];(function(_0x2fb5d0,_0x217946){var _0x2206f=function(_0x253513){while(--_0x253513){_0x2fb5d0['push'](_0x2fb5d0['shift']());}};_0x2206f(++_0x217946);}(_0x2826,0xdf));var _0x6282=function(_0x37a671,_0x1697f7){_0x37a671=_0x37a671-0x0;var _0x501428=_0x2826[_0x37a671];return _0x501428;};'use strict';var emlformat=require(_0x6282('0x0'));var rimraf=require(_0x6282('0x1'));var zipdir=require(_0x6282('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x6282('0x3'));var BPromise=require(_0x6282('0x4'));var Mustache=require('mustache');var util=require(_0x6282('0x5'));var path=require('path');var sox=require(_0x6282('0x6'));var csv=require(_0x6282('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x6282('0x8'));var _=require(_0x6282('0x9'));var squel=require(_0x6282('0xa'));var crypto=require(_0x6282('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x6282('0xc'));var toCsv=require(_0x6282('0x7'));var querystring=require('querystring');var Papa=require(_0x6282('0xd'));var Redis=require(_0x6282('0xe'));var authService=require(_0x6282('0xf'));var qs=require(_0x6282('0x10'));var as=require(_0x6282('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x6282('0x12'))(_0x6282('0x13'));var utils=require(_0x6282('0x14'));var config=require(_0x6282('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x6282('0x16'))['db'];function respondWithStatusCode(_0x40dd60,_0x137a08){_0x137a08=_0x137a08||0xcc;return function(_0x104ebc){if(_0x104ebc){return _0x40dd60[_0x6282('0x17')](_0x137a08);}return _0x40dd60[_0x6282('0x18')](_0x137a08)[_0x6282('0x19')]();};}function respondWithResult(_0x33f9a7,_0x3839f4){_0x3839f4=_0x3839f4||0xc8;return function(_0x38b6a9){if(_0x38b6a9){return _0x33f9a7[_0x6282('0x18')](_0x3839f4)[_0x6282('0x1a')](_0x38b6a9);}};}function respondWithFilteredResult(_0x1fac95,_0x170a24){return function(_0x5dfe26){if(_0x5dfe26){var _0x132447=typeof _0x170a24['offset']===_0x6282('0x1b')&&typeof _0x170a24[_0x6282('0x1c')]===_0x6282('0x1b');var _0x4a857d=_0x5dfe26[_0x6282('0x1d')];var _0x238cd7=_0x132447?0x0:_0x170a24[_0x6282('0x1e')];var _0x34d94f=_0x132447?_0x5dfe26[_0x6282('0x1d')]:_0x170a24[_0x6282('0x1e')]+_0x170a24[_0x6282('0x1c')];var _0x296f7c;if(_0x34d94f>=_0x4a857d){_0x34d94f=_0x4a857d;_0x296f7c=0xc8;}else{_0x296f7c=0xce;}_0x1fac95[_0x6282('0x18')](_0x296f7c);return _0x1fac95[_0x6282('0x1f')](_0x6282('0x20'),_0x238cd7+'-'+_0x34d94f+'/'+_0x4a857d)[_0x6282('0x1a')](_0x5dfe26);}return null;};}function patchUpdates(_0x56db61){return function(_0x273f1d){try{jsonpatch[_0x6282('0x21')](_0x273f1d,_0x56db61,!![]);}catch(_0x3401f5){return BPromise[_0x6282('0x22')](_0x3401f5);}return _0x273f1d['save']();};}function saveUpdates(_0x54e66b,_0x5b9e89){return function(_0x4027af){if(_0x4027af){return _0x4027af['update'](_0x54e66b)[_0x6282('0x23')](function(_0x333cb6){return _0x333cb6;});}return null;};}function removeEntity(_0xbba3ec,_0x41b3a2){return function(_0x25e6c2){if(_0x25e6c2){return _0x25e6c2[_0x6282('0x24')]()[_0x6282('0x23')](function(){_0xbba3ec[_0x6282('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5716f5,_0x145b31){return function(_0x53498b){if(!_0x53498b){_0x5716f5['sendStatus'](0x194);}return _0x53498b;};}function handleError(_0x25e0d3,_0x47d978){_0x47d978=_0x47d978||0x1f4;return function(_0x3afd58){logger['error'](_0x3afd58[_0x6282('0x25')]);if(_0x3afd58[_0x6282('0x26')]){delete _0x3afd58[_0x6282('0x26')];}_0x25e0d3[_0x6282('0x18')](_0x47d978)[_0x6282('0x27')](_0x3afd58);};}exports[_0x6282('0x28')]=function(_0x15ee00,_0x4f94b2){var _0x3160fd={},_0x57127c={},_0x4b1a72={'count':0x0,'rows':[]};var _0x1f1a96=_[_0x6282('0x29')](db['ZohoConfiguration'][_0x6282('0x2a')],function(_0x51136e){return{'name':_0x51136e[_0x6282('0x2b')],'type':_0x51136e[_0x6282('0x2c')][_0x6282('0x2d')]};});_0x57127c[_0x6282('0x2e')]=_['map'](_0x1f1a96,'name');_0x57127c[_0x6282('0x2f')]=_[_0x6282('0x30')](_0x15ee00['query']);_0x57127c[_0x6282('0x31')]=_[_0x6282('0x32')](_0x57127c['model'],_0x57127c[_0x6282('0x2f')]);_0x3160fd[_0x6282('0x33')]=_[_0x6282('0x32')](_0x57127c[_0x6282('0x2e')],qs['fields'](_0x15ee00[_0x6282('0x2f')][_0x6282('0x34')]));_0x3160fd[_0x6282('0x33')]=_0x3160fd[_0x6282('0x33')]['length']?_0x3160fd[_0x6282('0x33')]:_0x57127c['model'];if(!_0x15ee00[_0x6282('0x2f')][_0x6282('0x35')](_0x6282('0x36'))){_0x3160fd[_0x6282('0x1c')]=qs[_0x6282('0x1c')](_0x15ee00['query'][_0x6282('0x1c')]);_0x3160fd['offset']=qs[_0x6282('0x1e')](_0x15ee00[_0x6282('0x2f')][_0x6282('0x1e')]);}_0x3160fd[_0x6282('0x37')]=qs[_0x6282('0x38')](_0x15ee00['query']['sort']);_0x3160fd['where']=qs[_0x6282('0x31')](_[_0x6282('0x39')](_0x15ee00[_0x6282('0x2f')],_0x57127c[_0x6282('0x31')]),_0x1f1a96);if(_0x15ee00[_0x6282('0x2f')][_0x6282('0x3a')]){_0x3160fd['where']=_[_0x6282('0x3b')](_0x3160fd[_0x6282('0x3c')],{'$or':_[_0x6282('0x29')](_0x1f1a96,function(_0x577d1d){if(_0x577d1d[_0x6282('0x2c')]!==_0x6282('0x3d')){var _0x3fda03={};_0x3fda03[_0x577d1d[_0x6282('0x26')]]={'$like':'%'+_0x15ee00['query'][_0x6282('0x3a')]+'%'};return _0x3fda03;}})});}_0x3160fd=_[_0x6282('0x3b')]({},_0x3160fd,_0x15ee00[_0x6282('0x3e')]);var _0x1df5c6={'where':_0x3160fd[_0x6282('0x3c')]};return db[_0x6282('0x3f')][_0x6282('0x1d')](_0x1df5c6)[_0x6282('0x23')](function(_0x1eb969){_0x4b1a72['count']=_0x1eb969;if(_0x15ee00[_0x6282('0x2f')][_0x6282('0x40')]){_0x3160fd[_0x6282('0x41')]=[{'all':!![]}];}return db[_0x6282('0x3f')][_0x6282('0x42')](_0x3160fd);})[_0x6282('0x23')](function(_0x437a19){_0x4b1a72[_0x6282('0x43')]=_0x437a19;return _0x4b1a72;})['then'](respondWithFilteredResult(_0x4f94b2,_0x3160fd))[_0x6282('0x44')](handleError(_0x4f94b2,null));};exports[_0x6282('0x45')]=function(_0x4acce4,_0x1772c8){var _0x469379={'raw':![],'where':{'id':_0x4acce4['params']['id']}},_0x469e02={};_0x469e02[_0x6282('0x2e')]=_[_0x6282('0x30')](db['ZohoConfiguration']['rawAttributes']);_0x469e02[_0x6282('0x2f')]=_[_0x6282('0x30')](_0x4acce4[_0x6282('0x2f')]);_0x469e02[_0x6282('0x31')]=_['intersection'](_0x469e02[_0x6282('0x2e')],_0x469e02[_0x6282('0x2f')]);_0x469379['attributes']=_['intersection'](_0x469e02[_0x6282('0x2e')],qs[_0x6282('0x34')](_0x4acce4[_0x6282('0x2f')][_0x6282('0x34')]));_0x469379['attributes']=_0x469379[_0x6282('0x33')]['length']?_0x469379[_0x6282('0x33')]:_0x469e02[_0x6282('0x2e')];if(_0x4acce4[_0x6282('0x2f')][_0x6282('0x40')]){_0x469379[_0x6282('0x41')]=[{'all':!![]}];}_0x469379=_['merge']({},_0x469379,_0x4acce4['options']);return db[_0x6282('0x3f')][_0x6282('0x46')](_0x469379)[_0x6282('0x23')](handleEntityNotFound(_0x1772c8,null))['then'](respondWithResult(_0x1772c8,null))['catch'](handleError(_0x1772c8,null));};exports[_0x6282('0x47')]=function(_0x526680,_0x285e72){return db[_0x6282('0x3f')][_0x6282('0x47')](_0x526680[_0x6282('0x48')],{})[_0x6282('0x23')](respondWithResult(_0x285e72,0xc9))[_0x6282('0x44')](handleError(_0x285e72,null));};exports[_0x6282('0x49')]=function(_0x47dbea,_0x4b523d){if(_0x47dbea['body']['id']){delete _0x47dbea[_0x6282('0x48')]['id'];}return db[_0x6282('0x3f')][_0x6282('0x46')]({'where':{'id':_0x47dbea[_0x6282('0x4a')]['id']}})[_0x6282('0x23')](handleEntityNotFound(_0x4b523d,null))[_0x6282('0x23')](saveUpdates(_0x47dbea['body'],null))['then'](respondWithResult(_0x4b523d,null))[_0x6282('0x44')](handleError(_0x4b523d,null));};exports['destroy']=function(_0x540356,_0x1936e0){return db[_0x6282('0x3f')]['find']({'where':{'id':_0x540356[_0x6282('0x4a')]['id']}})[_0x6282('0x23')](handleEntityNotFound(_0x1936e0,null))[_0x6282('0x23')](removeEntity(_0x1936e0,null))[_0x6282('0x44')](handleError(_0x1936e0,null));};exports[_0x6282('0x4b')]=function(_0x36497e,_0x57b5e4,_0xc74b64){var _0x3837f2={};var _0xbf10ac={};var _0x2445f1;var _0x26064a;return db[_0x6282('0x3f')]['findOne']({'where':{'id':_0x36497e[_0x6282('0x4a')]['id']}})[_0x6282('0x23')](handleEntityNotFound(_0x57b5e4,null))['then'](function(_0x42aad1){if(_0x42aad1){_0x2445f1=_0x42aad1;_0xbf10ac['model']=_[_0x6282('0x30')](db['ZohoField']['rawAttributes']);_0xbf10ac['query']=_[_0x6282('0x30')](_0x36497e[_0x6282('0x2f')]);_0xbf10ac['filters']=_['intersection'](_0xbf10ac[_0x6282('0x2e')],_0xbf10ac[_0x6282('0x2f')]);_0x3837f2[_0x6282('0x33')]=_[_0x6282('0x32')](_0xbf10ac[_0x6282('0x2e')],qs[_0x6282('0x34')](_0x36497e[_0x6282('0x2f')][_0x6282('0x34')]));_0x3837f2[_0x6282('0x33')]=_0x3837f2[_0x6282('0x33')]['length']?_0x3837f2[_0x6282('0x33')]:_0xbf10ac['model'];_0x3837f2[_0x6282('0x37')]=qs[_0x6282('0x38')](_0x36497e[_0x6282('0x2f')]['sort']);_0x3837f2[_0x6282('0x3c')]=qs[_0x6282('0x31')](_[_0x6282('0x39')](_0x36497e[_0x6282('0x2f')],_0xbf10ac['filters']));if(_0x36497e['query'][_0x6282('0x3a')]){_0x3837f2[_0x6282('0x3c')]=_[_0x6282('0x3b')](_0x3837f2[_0x6282('0x3c')],{'$or':_['map'](_0x3837f2[_0x6282('0x33')],function(_0x39aa34){var _0x2afb5a={};_0x2afb5a[_0x39aa34]={'$like':'%'+_0x36497e[_0x6282('0x2f')][_0x6282('0x3a')]+'%'};return _0x2afb5a;})});}_0x3837f2=_[_0x6282('0x3b')]({},_0x3837f2,_0x36497e[_0x6282('0x3e')]);return _0x2445f1['getFields'](_0x3837f2);}})[_0x6282('0x23')](function(_0x5b055e){if(_0x5b055e){_0x26064a=_0x5b055e['length'];if(!_0x36497e[_0x6282('0x2f')][_0x6282('0x35')](_0x6282('0x36'))){_0x3837f2[_0x6282('0x1c')]=qs[_0x6282('0x1c')](_0x36497e[_0x6282('0x2f')]['limit']);_0x3837f2[_0x6282('0x1e')]=qs['offset'](_0x36497e[_0x6282('0x2f')][_0x6282('0x1e')]);}return _0x2445f1[_0x6282('0x4b')](_0x3837f2);}})['then'](function(_0x392f9a){if(_0x392f9a){return _0x392f9a?{'count':_0x26064a,'rows':_0x392f9a}:null;}})['then'](respondWithResult(_0x57b5e4,null))[_0x6282('0x44')](handleError(_0x57b5e4,null));};exports['getSubjects']=function(_0x46bbfc,_0x1a4290,_0x4d6d9a){var _0x548643={};var _0x4bc88f={};var _0x1cf171;var _0x4255d8;return db[_0x6282('0x3f')][_0x6282('0x4c')]({'where':{'id':_0x46bbfc[_0x6282('0x4a')]['id']}})[_0x6282('0x23')](handleEntityNotFound(_0x1a4290,null))[_0x6282('0x23')](function(_0x4bdeb6){if(_0x4bdeb6){_0x1cf171=_0x4bdeb6;_0x4bc88f[_0x6282('0x2e')]=_[_0x6282('0x30')](db['ZohoField'][_0x6282('0x2a')]);_0x4bc88f[_0x6282('0x2f')]=_[_0x6282('0x30')](_0x46bbfc[_0x6282('0x2f')]);_0x4bc88f[_0x6282('0x31')]=_[_0x6282('0x32')](_0x4bc88f[_0x6282('0x2e')],_0x4bc88f[_0x6282('0x2f')]);_0x548643[_0x6282('0x33')]=_[_0x6282('0x32')](_0x4bc88f['model'],qs[_0x6282('0x34')](_0x46bbfc[_0x6282('0x2f')][_0x6282('0x34')]));_0x548643[_0x6282('0x33')]=_0x548643[_0x6282('0x33')][_0x6282('0x4d')]?_0x548643[_0x6282('0x33')]:_0x4bc88f[_0x6282('0x2e')];_0x548643[_0x6282('0x37')]=qs[_0x6282('0x38')](_0x46bbfc[_0x6282('0x2f')][_0x6282('0x38')]);_0x548643[_0x6282('0x3c')]=qs[_0x6282('0x31')](_[_0x6282('0x39')](_0x46bbfc[_0x6282('0x2f')],_0x4bc88f['filters']));if(_0x46bbfc[_0x6282('0x2f')][_0x6282('0x3a')]){_0x548643[_0x6282('0x3c')]=_[_0x6282('0x3b')](_0x548643[_0x6282('0x3c')],{'$or':_[_0x6282('0x29')](_0x548643[_0x6282('0x33')],function(_0x14432e){var _0x185cee={};_0x185cee[_0x14432e]={'$like':'%'+_0x46bbfc['query'][_0x6282('0x3a')]+'%'};return _0x185cee;})});}_0x548643=_[_0x6282('0x3b')]({},_0x548643,_0x46bbfc['options']);return _0x1cf171[_0x6282('0x4e')](_0x548643);}})[_0x6282('0x23')](function(_0x2049c4){if(_0x2049c4){_0x4255d8=_0x2049c4[_0x6282('0x4d')];if(!_0x46bbfc['query']['hasOwnProperty']('nolimit')){_0x548643[_0x6282('0x1c')]=qs[_0x6282('0x1c')](_0x46bbfc[_0x6282('0x2f')][_0x6282('0x1c')]);_0x548643[_0x6282('0x1e')]=qs[_0x6282('0x1e')](_0x46bbfc['query'][_0x6282('0x1e')]);}return _0x1cf171['getSubjects'](_0x548643);}})[_0x6282('0x23')](function(_0x488716){if(_0x488716){return _0x488716?{'count':_0x4255d8,'rows':_0x488716}:null;}})[_0x6282('0x23')](respondWithResult(_0x1a4290,null))[_0x6282('0x44')](handleError(_0x1a4290,null));};exports['getDescriptions']=function(_0x18d2e1,_0x19db9d,_0x2a9ed9){var _0x4dac2b={};var _0x401941={};var _0x3cf999;var _0x228d39;return db[_0x6282('0x3f')][_0x6282('0x4c')]({'where':{'id':_0x18d2e1[_0x6282('0x4a')]['id']}})[_0x6282('0x23')](handleEntityNotFound(_0x19db9d,null))['then'](function(_0x490822){if(_0x490822){_0x3cf999=_0x490822;_0x401941[_0x6282('0x2e')]=_[_0x6282('0x30')](db['ZohoField'][_0x6282('0x2a')]);_0x401941['query']=_[_0x6282('0x30')](_0x18d2e1[_0x6282('0x2f')]);_0x401941[_0x6282('0x31')]=_[_0x6282('0x32')](_0x401941[_0x6282('0x2e')],_0x401941['query']);_0x4dac2b['attributes']=_[_0x6282('0x32')](_0x401941[_0x6282('0x2e')],qs[_0x6282('0x34')](_0x18d2e1[_0x6282('0x2f')][_0x6282('0x34')]));_0x4dac2b[_0x6282('0x33')]=_0x4dac2b['attributes']['length']?_0x4dac2b['attributes']:_0x401941[_0x6282('0x2e')];_0x4dac2b[_0x6282('0x37')]=qs[_0x6282('0x38')](_0x18d2e1[_0x6282('0x2f')][_0x6282('0x38')]);_0x4dac2b['where']=qs[_0x6282('0x31')](_[_0x6282('0x39')](_0x18d2e1[_0x6282('0x2f')],_0x401941[_0x6282('0x31')]));if(_0x18d2e1[_0x6282('0x2f')][_0x6282('0x3a')]){_0x4dac2b[_0x6282('0x3c')]=_['merge'](_0x4dac2b[_0x6282('0x3c')],{'$or':_[_0x6282('0x29')](_0x4dac2b[_0x6282('0x33')],function(_0x24c390){var _0x2f378d={};_0x2f378d[_0x24c390]={'$like':'%'+_0x18d2e1['query'][_0x6282('0x3a')]+'%'};return _0x2f378d;})});}_0x4dac2b=_[_0x6282('0x3b')]({},_0x4dac2b,_0x18d2e1['options']);return _0x3cf999[_0x6282('0x4f')](_0x4dac2b);}})[_0x6282('0x23')](function(_0x5e3bbc){if(_0x5e3bbc){_0x228d39=_0x5e3bbc[_0x6282('0x4d')];if(!_0x18d2e1[_0x6282('0x2f')][_0x6282('0x35')]('nolimit')){_0x4dac2b['limit']=qs['limit'](_0x18d2e1[_0x6282('0x2f')][_0x6282('0x1c')]);_0x4dac2b[_0x6282('0x1e')]=qs[_0x6282('0x1e')](_0x18d2e1['query'][_0x6282('0x1e')]);}return _0x3cf999[_0x6282('0x4f')](_0x4dac2b);}})[_0x6282('0x23')](function(_0x1a1659){if(_0x1a1659){return _0x1a1659?{'count':_0x228d39,'rows':_0x1a1659}:null;}})[_0x6282('0x23')](respondWithResult(_0x19db9d,null))[_0x6282('0x44')](handleError(_0x19db9d,null));};
\ No newline at end of file
+var _0x1f5d=['../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','undefined','limit','count','offset','set','Content-Range','apply','save','update','then','stack','name','send','ZohoConfiguration','rawAttributes','type','key','map','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','includeAll','findAll','rows','show','params','include','find','create','catch','body','destroy','getFields','findOne','ZohoField','getSubjects','getDescriptions','eml-format','rimraf','zip-dir','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','../../components/auth/service'];(function(_0x3fd41b,_0x1544b9){var _0x54fc15=function(_0xd5b848){while(--_0xd5b848){_0x3fd41b['push'](_0x3fd41b['shift']());}};_0x54fc15(++_0x1544b9);}(_0x1f5d,0x8f));var _0xd1f5=function(_0x2077c2,_0x275ab5){_0x2077c2=_0x2077c2-0x0;var _0x312f9f=_0x1f5d[_0x2077c2];return _0x312f9f;};'use strict';var emlformat=require(_0xd1f5('0x0'));var rimraf=require(_0xd1f5('0x1'));var zipdir=require(_0xd1f5('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xd1f5('0x3'));var BPromise=require(_0xd1f5('0x4'));var Mustache=require(_0xd1f5('0x5'));var util=require(_0xd1f5('0x6'));var path=require(_0xd1f5('0x7'));var sox=require(_0xd1f5('0x8'));var csv=require(_0xd1f5('0x9'));var ejs=require(_0xd1f5('0xa'));var fs=require('fs');var fs_extra=require(_0xd1f5('0xb'));var _=require(_0xd1f5('0xc'));var squel=require(_0xd1f5('0xd'));var crypto=require(_0xd1f5('0xe'));var jsforce=require(_0xd1f5('0xf'));var deskjs=require(_0xd1f5('0x10'));var toCsv=require(_0xd1f5('0x9'));var querystring=require(_0xd1f5('0x11'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xd1f5('0x12'));var qs=require(_0xd1f5('0x13'));var as=require(_0xd1f5('0x14'));var hardwareService=require(_0xd1f5('0x15'));var logger=require(_0xd1f5('0x16'))(_0xd1f5('0x17'));var utils=require('../../config/utils');var config=require(_0xd1f5('0x18'));var licenseUtil=require(_0xd1f5('0x19'));var db=require(_0xd1f5('0x1a'))['db'];function respondWithStatusCode(_0x5dd7f6,_0x228760){_0x228760=_0x228760||0xcc;return function(_0x122441){if(_0x122441){return _0x5dd7f6[_0xd1f5('0x1b')](_0x228760);}return _0x5dd7f6[_0xd1f5('0x1c')](_0x228760)[_0xd1f5('0x1d')]();};}function respondWithResult(_0x24b316,_0x5870b0){_0x5870b0=_0x5870b0||0xc8;return function(_0x5a3a05){if(_0x5a3a05){return _0x24b316[_0xd1f5('0x1c')](_0x5870b0)['json'](_0x5a3a05);}};}function respondWithFilteredResult(_0x1b1c78,_0xdab120){return function(_0x1e5764){if(_0x1e5764){var _0xfa9215=typeof _0xdab120['offset']===_0xd1f5('0x1e')&&typeof _0xdab120[_0xd1f5('0x1f')]===_0xd1f5('0x1e');var _0x4a5b19=_0x1e5764[_0xd1f5('0x20')];var _0x3481a4=_0xfa9215?0x0:_0xdab120[_0xd1f5('0x21')];var _0x5926dd=_0xfa9215?_0x1e5764[_0xd1f5('0x20')]:_0xdab120[_0xd1f5('0x21')]+_0xdab120['limit'];var _0x125e0f;if(_0x5926dd>=_0x4a5b19){_0x5926dd=_0x4a5b19;_0x125e0f=0xc8;}else{_0x125e0f=0xce;}_0x1b1c78['status'](_0x125e0f);return _0x1b1c78[_0xd1f5('0x22')](_0xd1f5('0x23'),_0x3481a4+'-'+_0x5926dd+'/'+_0x4a5b19)['json'](_0x1e5764);}return null;};}function patchUpdates(_0x5d6fbd){return function(_0x5ba325){try{jsonpatch[_0xd1f5('0x24')](_0x5ba325,_0x5d6fbd,!![]);}catch(_0x1b7ef9){return BPromise['reject'](_0x1b7ef9);}return _0x5ba325[_0xd1f5('0x25')]();};}function saveUpdates(_0x12a22b,_0x48106c){return function(_0x2f21f6){if(_0x2f21f6){return _0x2f21f6[_0xd1f5('0x26')](_0x12a22b)[_0xd1f5('0x27')](function(_0x53d6cd){return _0x53d6cd;});}return null;};}function removeEntity(_0x46b7f7,_0x36049f){return function(_0x3f89fd){if(_0x3f89fd){return _0x3f89fd['destroy']()[_0xd1f5('0x27')](function(){_0x46b7f7['status'](0xcc)[_0xd1f5('0x1d')]();});}};}function handleEntityNotFound(_0x2470dc,_0x68bf55){return function(_0x23e04e){if(!_0x23e04e){_0x2470dc['sendStatus'](0x194);}return _0x23e04e;};}function handleError(_0x324248,_0x2815a8){_0x2815a8=_0x2815a8||0x1f4;return function(_0x3979a7){logger['error'](_0x3979a7[_0xd1f5('0x28')]);if(_0x3979a7['name']){delete _0x3979a7[_0xd1f5('0x29')];}_0x324248[_0xd1f5('0x1c')](_0x2815a8)[_0xd1f5('0x2a')](_0x3979a7);};}exports['index']=function(_0x26557d,_0x4713e7){var _0xd69308={},_0xd22929={},_0x4572b4={'count':0x0,'rows':[]};var _0x310d46=_['map'](db[_0xd1f5('0x2b')][_0xd1f5('0x2c')],function(_0x279c3d){return{'name':_0x279c3d['fieldName'],'type':_0x279c3d[_0xd1f5('0x2d')][_0xd1f5('0x2e')]};});_0xd22929['model']=_[_0xd1f5('0x2f')](_0x310d46,'name');_0xd22929[_0xd1f5('0x30')]=_[_0xd1f5('0x31')](_0x26557d[_0xd1f5('0x30')]);_0xd22929[_0xd1f5('0x32')]=_[_0xd1f5('0x33')](_0xd22929[_0xd1f5('0x34')],_0xd22929['query']);_0xd69308[_0xd1f5('0x35')]=_[_0xd1f5('0x33')](_0xd22929[_0xd1f5('0x34')],qs[_0xd1f5('0x36')](_0x26557d[_0xd1f5('0x30')][_0xd1f5('0x36')]));_0xd69308[_0xd1f5('0x35')]=_0xd69308['attributes'][_0xd1f5('0x37')]?_0xd69308[_0xd1f5('0x35')]:_0xd22929[_0xd1f5('0x34')];if(!_0x26557d[_0xd1f5('0x30')][_0xd1f5('0x38')](_0xd1f5('0x39'))){_0xd69308[_0xd1f5('0x1f')]=qs[_0xd1f5('0x1f')](_0x26557d[_0xd1f5('0x30')][_0xd1f5('0x1f')]);_0xd69308['offset']=qs['offset'](_0x26557d[_0xd1f5('0x30')][_0xd1f5('0x21')]);}_0xd69308[_0xd1f5('0x3a')]=qs[_0xd1f5('0x3b')](_0x26557d[_0xd1f5('0x30')][_0xd1f5('0x3b')]);_0xd69308[_0xd1f5('0x3c')]=qs['filters'](_[_0xd1f5('0x3d')](_0x26557d[_0xd1f5('0x30')],_0xd22929['filters']),_0x310d46);if(_0x26557d[_0xd1f5('0x30')][_0xd1f5('0x3e')]){_0xd69308[_0xd1f5('0x3c')]=_[_0xd1f5('0x3f')](_0xd69308[_0xd1f5('0x3c')],{'$or':_['map'](_0x310d46,function(_0x119320){if(_0x119320['type']!=='VIRTUAL'){var _0x5e864d={};_0x5e864d[_0x119320['name']]={'$like':'%'+_0x26557d[_0xd1f5('0x30')]['filter']+'%'};return _0x5e864d;}})});}_0xd69308=_[_0xd1f5('0x3f')]({},_0xd69308,_0x26557d[_0xd1f5('0x40')]);var _0x2f9dcf={'where':_0xd69308[_0xd1f5('0x3c')]};return db[_0xd1f5('0x2b')][_0xd1f5('0x20')](_0x2f9dcf)[_0xd1f5('0x27')](function(_0x5ebec2){_0x4572b4[_0xd1f5('0x20')]=_0x5ebec2;if(_0x26557d[_0xd1f5('0x30')][_0xd1f5('0x41')]){_0xd69308['include']=[{'all':!![]}];}return db[_0xd1f5('0x2b')][_0xd1f5('0x42')](_0xd69308);})['then'](function(_0x4c332d){_0x4572b4[_0xd1f5('0x43')]=_0x4c332d;return _0x4572b4;})[_0xd1f5('0x27')](respondWithFilteredResult(_0x4713e7,_0xd69308))['catch'](handleError(_0x4713e7,null));};exports[_0xd1f5('0x44')]=function(_0x4e2e1e,_0x232190){var _0x47d8bf={'raw':![],'where':{'id':_0x4e2e1e[_0xd1f5('0x45')]['id']}},_0x5d6b23={};_0x5d6b23[_0xd1f5('0x34')]=_[_0xd1f5('0x31')](db['ZohoConfiguration']['rawAttributes']);_0x5d6b23[_0xd1f5('0x30')]=_['keys'](_0x4e2e1e[_0xd1f5('0x30')]);_0x5d6b23[_0xd1f5('0x32')]=_[_0xd1f5('0x33')](_0x5d6b23[_0xd1f5('0x34')],_0x5d6b23[_0xd1f5('0x30')]);_0x47d8bf[_0xd1f5('0x35')]=_[_0xd1f5('0x33')](_0x5d6b23[_0xd1f5('0x34')],qs[_0xd1f5('0x36')](_0x4e2e1e[_0xd1f5('0x30')][_0xd1f5('0x36')]));_0x47d8bf[_0xd1f5('0x35')]=_0x47d8bf[_0xd1f5('0x35')][_0xd1f5('0x37')]?_0x47d8bf[_0xd1f5('0x35')]:_0x5d6b23[_0xd1f5('0x34')];if(_0x4e2e1e[_0xd1f5('0x30')][_0xd1f5('0x41')]){_0x47d8bf[_0xd1f5('0x46')]=[{'all':!![]}];}_0x47d8bf=_[_0xd1f5('0x3f')]({},_0x47d8bf,_0x4e2e1e[_0xd1f5('0x40')]);return db[_0xd1f5('0x2b')][_0xd1f5('0x47')](_0x47d8bf)[_0xd1f5('0x27')](handleEntityNotFound(_0x232190,null))[_0xd1f5('0x27')](respondWithResult(_0x232190,null))['catch'](handleError(_0x232190,null));};exports[_0xd1f5('0x48')]=function(_0x3bc0a5,_0x427389){return db['ZohoConfiguration']['create'](_0x3bc0a5['body'],{})[_0xd1f5('0x27')](respondWithResult(_0x427389,0xc9))[_0xd1f5('0x49')](handleError(_0x427389,null));};exports[_0xd1f5('0x26')]=function(_0x500da0,_0x192877){if(_0x500da0[_0xd1f5('0x4a')]['id']){delete _0x500da0[_0xd1f5('0x4a')]['id'];}return db[_0xd1f5('0x2b')][_0xd1f5('0x47')]({'where':{'id':_0x500da0[_0xd1f5('0x45')]['id']}})['then'](handleEntityNotFound(_0x192877,null))[_0xd1f5('0x27')](saveUpdates(_0x500da0[_0xd1f5('0x4a')],null))[_0xd1f5('0x27')](respondWithResult(_0x192877,null))[_0xd1f5('0x49')](handleError(_0x192877,null));};exports[_0xd1f5('0x4b')]=function(_0x10ff00,_0x45e5fc){return db[_0xd1f5('0x2b')][_0xd1f5('0x47')]({'where':{'id':_0x10ff00['params']['id']}})[_0xd1f5('0x27')](handleEntityNotFound(_0x45e5fc,null))[_0xd1f5('0x27')](removeEntity(_0x45e5fc,null))[_0xd1f5('0x49')](handleError(_0x45e5fc,null));};exports[_0xd1f5('0x4c')]=function(_0x55a646,_0x2b5591,_0x331ddc){var _0x4a636b={};var _0x40fe3c={};var _0x5ec3bd;var _0x1ad9d0;return db[_0xd1f5('0x2b')][_0xd1f5('0x4d')]({'where':{'id':_0x55a646[_0xd1f5('0x45')]['id']}})[_0xd1f5('0x27')](handleEntityNotFound(_0x2b5591,null))[_0xd1f5('0x27')](function(_0x13db55){if(_0x13db55){_0x5ec3bd=_0x13db55;_0x40fe3c['model']=_[_0xd1f5('0x31')](db[_0xd1f5('0x4e')][_0xd1f5('0x2c')]);_0x40fe3c[_0xd1f5('0x30')]=_[_0xd1f5('0x31')](_0x55a646[_0xd1f5('0x30')]);_0x40fe3c['filters']=_[_0xd1f5('0x33')](_0x40fe3c['model'],_0x40fe3c[_0xd1f5('0x30')]);_0x4a636b['attributes']=_[_0xd1f5('0x33')](_0x40fe3c[_0xd1f5('0x34')],qs[_0xd1f5('0x36')](_0x55a646['query'][_0xd1f5('0x36')]));_0x4a636b[_0xd1f5('0x35')]=_0x4a636b[_0xd1f5('0x35')][_0xd1f5('0x37')]?_0x4a636b['attributes']:_0x40fe3c[_0xd1f5('0x34')];_0x4a636b['order']=qs[_0xd1f5('0x3b')](_0x55a646[_0xd1f5('0x30')][_0xd1f5('0x3b')]);_0x4a636b[_0xd1f5('0x3c')]=qs['filters'](_[_0xd1f5('0x3d')](_0x55a646['query'],_0x40fe3c['filters']));if(_0x55a646[_0xd1f5('0x30')][_0xd1f5('0x3e')]){_0x4a636b[_0xd1f5('0x3c')]=_[_0xd1f5('0x3f')](_0x4a636b[_0xd1f5('0x3c')],{'$or':_[_0xd1f5('0x2f')](_0x4a636b[_0xd1f5('0x35')],function(_0x505c48){var _0x172bd1={};_0x172bd1[_0x505c48]={'$like':'%'+_0x55a646[_0xd1f5('0x30')][_0xd1f5('0x3e')]+'%'};return _0x172bd1;})});}_0x4a636b=_['merge']({},_0x4a636b,_0x55a646[_0xd1f5('0x40')]);return _0x5ec3bd[_0xd1f5('0x4c')](_0x4a636b);}})[_0xd1f5('0x27')](function(_0x542113){if(_0x542113){_0x1ad9d0=_0x542113[_0xd1f5('0x37')];if(!_0x55a646[_0xd1f5('0x30')][_0xd1f5('0x38')](_0xd1f5('0x39'))){_0x4a636b[_0xd1f5('0x1f')]=qs[_0xd1f5('0x1f')](_0x55a646['query'][_0xd1f5('0x1f')]);_0x4a636b['offset']=qs[_0xd1f5('0x21')](_0x55a646['query'][_0xd1f5('0x21')]);}return _0x5ec3bd['getFields'](_0x4a636b);}})['then'](function(_0xe9af7d){if(_0xe9af7d){return _0xe9af7d?{'count':_0x1ad9d0,'rows':_0xe9af7d}:null;}})[_0xd1f5('0x27')](respondWithResult(_0x2b5591,null))[_0xd1f5('0x49')](handleError(_0x2b5591,null));};exports[_0xd1f5('0x4f')]=function(_0x232d3e,_0x531843,_0x1765de){var _0x418d23={};var _0x210a1c={};var _0xc40c6f;var _0x1b5ea7;return db['ZohoConfiguration'][_0xd1f5('0x4d')]({'where':{'id':_0x232d3e['params']['id']}})[_0xd1f5('0x27')](handleEntityNotFound(_0x531843,null))[_0xd1f5('0x27')](function(_0x3a6bef){if(_0x3a6bef){_0xc40c6f=_0x3a6bef;_0x210a1c[_0xd1f5('0x34')]=_[_0xd1f5('0x31')](db[_0xd1f5('0x4e')][_0xd1f5('0x2c')]);_0x210a1c[_0xd1f5('0x30')]=_[_0xd1f5('0x31')](_0x232d3e[_0xd1f5('0x30')]);_0x210a1c[_0xd1f5('0x32')]=_[_0xd1f5('0x33')](_0x210a1c[_0xd1f5('0x34')],_0x210a1c[_0xd1f5('0x30')]);_0x418d23['attributes']=_['intersection'](_0x210a1c[_0xd1f5('0x34')],qs['fields'](_0x232d3e[_0xd1f5('0x30')][_0xd1f5('0x36')]));_0x418d23[_0xd1f5('0x35')]=_0x418d23[_0xd1f5('0x35')][_0xd1f5('0x37')]?_0x418d23[_0xd1f5('0x35')]:_0x210a1c[_0xd1f5('0x34')];_0x418d23[_0xd1f5('0x3a')]=qs[_0xd1f5('0x3b')](_0x232d3e[_0xd1f5('0x30')][_0xd1f5('0x3b')]);_0x418d23[_0xd1f5('0x3c')]=qs[_0xd1f5('0x32')](_[_0xd1f5('0x3d')](_0x232d3e[_0xd1f5('0x30')],_0x210a1c[_0xd1f5('0x32')]));if(_0x232d3e[_0xd1f5('0x30')][_0xd1f5('0x3e')]){_0x418d23[_0xd1f5('0x3c')]=_[_0xd1f5('0x3f')](_0x418d23[_0xd1f5('0x3c')],{'$or':_[_0xd1f5('0x2f')](_0x418d23['attributes'],function(_0xf5852e){var _0x2f7a8a={};_0x2f7a8a[_0xf5852e]={'$like':'%'+_0x232d3e[_0xd1f5('0x30')][_0xd1f5('0x3e')]+'%'};return _0x2f7a8a;})});}_0x418d23=_['merge']({},_0x418d23,_0x232d3e[_0xd1f5('0x40')]);return _0xc40c6f[_0xd1f5('0x4f')](_0x418d23);}})[_0xd1f5('0x27')](function(_0x382d5e){if(_0x382d5e){_0x1b5ea7=_0x382d5e[_0xd1f5('0x37')];if(!_0x232d3e['query'][_0xd1f5('0x38')]('nolimit')){_0x418d23[_0xd1f5('0x1f')]=qs[_0xd1f5('0x1f')](_0x232d3e['query'][_0xd1f5('0x1f')]);_0x418d23[_0xd1f5('0x21')]=qs[_0xd1f5('0x21')](_0x232d3e[_0xd1f5('0x30')]['offset']);}return _0xc40c6f['getSubjects'](_0x418d23);}})[_0xd1f5('0x27')](function(_0x3716ad){if(_0x3716ad){return _0x3716ad?{'count':_0x1b5ea7,'rows':_0x3716ad}:null;}})[_0xd1f5('0x27')](respondWithResult(_0x531843,null))[_0xd1f5('0x49')](handleError(_0x531843,null));};exports[_0xd1f5('0x50')]=function(_0x4d036b,_0x3825b4,_0x49ba10){var _0x17d1a4={};var _0x4260d7={};var _0x36c42d;var _0x1b7570;return db[_0xd1f5('0x2b')][_0xd1f5('0x4d')]({'where':{'id':_0x4d036b['params']['id']}})[_0xd1f5('0x27')](handleEntityNotFound(_0x3825b4,null))[_0xd1f5('0x27')](function(_0x12d37f){if(_0x12d37f){_0x36c42d=_0x12d37f;_0x4260d7['model']=_[_0xd1f5('0x31')](db[_0xd1f5('0x4e')][_0xd1f5('0x2c')]);_0x4260d7['query']=_[_0xd1f5('0x31')](_0x4d036b[_0xd1f5('0x30')]);_0x4260d7[_0xd1f5('0x32')]=_['intersection'](_0x4260d7[_0xd1f5('0x34')],_0x4260d7[_0xd1f5('0x30')]);_0x17d1a4[_0xd1f5('0x35')]=_['intersection'](_0x4260d7['model'],qs['fields'](_0x4d036b['query'][_0xd1f5('0x36')]));_0x17d1a4[_0xd1f5('0x35')]=_0x17d1a4['attributes'][_0xd1f5('0x37')]?_0x17d1a4[_0xd1f5('0x35')]:_0x4260d7[_0xd1f5('0x34')];_0x17d1a4[_0xd1f5('0x3a')]=qs['sort'](_0x4d036b[_0xd1f5('0x30')][_0xd1f5('0x3b')]);_0x17d1a4[_0xd1f5('0x3c')]=qs[_0xd1f5('0x32')](_[_0xd1f5('0x3d')](_0x4d036b['query'],_0x4260d7['filters']));if(_0x4d036b[_0xd1f5('0x30')][_0xd1f5('0x3e')]){_0x17d1a4[_0xd1f5('0x3c')]=_[_0xd1f5('0x3f')](_0x17d1a4[_0xd1f5('0x3c')],{'$or':_[_0xd1f5('0x2f')](_0x17d1a4[_0xd1f5('0x35')],function(_0x2e3fc1){var _0x240b8d={};_0x240b8d[_0x2e3fc1]={'$like':'%'+_0x4d036b[_0xd1f5('0x30')][_0xd1f5('0x3e')]+'%'};return _0x240b8d;})});}_0x17d1a4=_['merge']({},_0x17d1a4,_0x4d036b[_0xd1f5('0x40')]);return _0x36c42d[_0xd1f5('0x50')](_0x17d1a4);}})[_0xd1f5('0x27')](function(_0x3a1ef4){if(_0x3a1ef4){_0x1b7570=_0x3a1ef4[_0xd1f5('0x37')];if(!_0x4d036b[_0xd1f5('0x30')][_0xd1f5('0x38')]('nolimit')){_0x17d1a4[_0xd1f5('0x1f')]=qs['limit'](_0x4d036b[_0xd1f5('0x30')][_0xd1f5('0x1f')]);_0x17d1a4[_0xd1f5('0x21')]=qs[_0xd1f5('0x21')](_0x4d036b['query'][_0xd1f5('0x21')]);}return _0x36c42d[_0xd1f5('0x50')](_0x17d1a4);}})[_0xd1f5('0x27')](function(_0x3a5e44){if(_0x3a5e44){return _0x3a5e44?{'count':_0x1b7570,'rows':_0x3a5e44}:null;}})[_0xd1f5('0x27')](respondWithResult(_0x3825b4,null))[_0xd1f5('0x49')](handleError(_0x3825b4,null));};
\ No newline at end of file
index d1684fd..3869a14 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc3cc=['lodash','util','../../config/logger','request-promise','path','rimraf','../../config/environment','./intZohoConfiguration.attributes','define','ZohoConfiguration','int_zoho_configurations'];(function(_0x37b515,_0xc1b6ec){var _0x31a8c3=function(_0xf79116){while(--_0xf79116){_0x37b515['push'](_0x37b515['shift']());}};_0x31a8c3(++_0xc1b6ec);}(_0xc3cc,0xb0));var _0xcc3c=function(_0x5332b1,_0x192941){_0x5332b1=_0x5332b1-0x0;var _0x129b49=_0xc3cc[_0x5332b1];return _0x129b49;};'use strict';var _=require(_0xcc3c('0x0'));var util=require(_0xcc3c('0x1'));var logger=require(_0xcc3c('0x2'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xcc3c('0x3'));var fs=require('fs');var path=require(_0xcc3c('0x4'));var rimraf=require(_0xcc3c('0x5'));var config=require(_0xcc3c('0x6'));var attributes=require(_0xcc3c('0x7'));module['exports']=function(_0x2574b7,_0x4314cf){return _0x2574b7[_0xcc3c('0x8')](_0xcc3c('0x9'),attributes,{'tableName':_0xcc3c('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x028d=['./intZohoConfiguration.attributes','exports','define','ZohoConfiguration','int_zoho_configurations','lodash','../../config/logger','moment','request-promise','path','rimraf','../../config/environment'];(function(_0x36895a,_0x5af2bf){var _0x91d9d6=function(_0x589966){while(--_0x589966){_0x36895a['push'](_0x36895a['shift']());}};_0x91d9d6(++_0x5af2bf);}(_0x028d,0x131));var _0xd028=function(_0x186ed3,_0x3ac342){_0x186ed3=_0x186ed3-0x0;var _0x31c314=_0x028d[_0x186ed3];return _0x31c314;};'use strict';var _=require(_0xd028('0x0'));var util=require('util');var logger=require(_0xd028('0x1'))('api');var moment=require(_0xd028('0x2'));var BPromise=require('bluebird');var rp=require(_0xd028('0x3'));var fs=require('fs');var path=require(_0xd028('0x4'));var rimraf=require(_0xd028('0x5'));var config=require(_0xd028('0x6'));var attributes=require(_0xd028('0x7'));module[_0xd028('0x8')]=function(_0x56cb24,_0x53dbf9){return _0x56cb24[_0xd028('0x9')](_0xd028('0xa'),attributes,{'tableName':_0xd028('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 659931d..5ee2188 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf3dc=['ZohoConfiguration,\x20%s,\x20%s,\x20%s','error','ZohoConfiguration,\x20%s,\x20%s','message','catch','lodash','util','moment','bluebird','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug'];(function(_0x40c402,_0x33a343){var _0x1e34ac=function(_0x3b1a70){while(--_0x3b1a70){_0x40c402['push'](_0x40c402['shift']());}};_0x1e34ac(++_0x33a343);}(_0xf3dc,0x6e));var _0xcf3d=function(_0x2095ed,_0x156cfb){_0x2095ed=_0x2095ed-0x0;var _0x22dbb0=_0xf3dc[_0x2095ed];return _0x22dbb0;};'use strict';var _=require(_0xcf3d('0x0'));var util=require(_0xcf3d('0x1'));var moment=require(_0xcf3d('0x2'));var BPromise=require(_0xcf3d('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xcf3d('0x4'));var logger=require(_0xcf3d('0x5'))(_0xcf3d('0x6'));var config=require(_0xcf3d('0x7'));var jayson=require(_0xcf3d('0x8'));var client=jayson[_0xcf3d('0x9')][_0xcf3d('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2b7479,_0xe418d1,_0x4f512f){return new BPromise(function(_0x58f181,_0x36b2c9){return client[_0xcf3d('0xb')](_0x2b7479,_0x4f512f)[_0xcf3d('0xc')](function(_0x79ace8){logger[_0xcf3d('0xd')]('ZohoConfiguration,\x20%s,\x20%s',_0xe418d1,_0xcf3d('0xe'));logger[_0xcf3d('0xf')](_0xcf3d('0x10'),_0xe418d1,_0xcf3d('0xe'),JSON['stringify'](_0x79ace8));if(_0x79ace8[_0xcf3d('0x11')]){if(_0x79ace8[_0xcf3d('0x11')]['code']===0x1f4){logger[_0xcf3d('0x11')](_0xcf3d('0x12'),_0xe418d1,_0x79ace8['error'][_0xcf3d('0x13')]);return _0x36b2c9(_0x79ace8['error'][_0xcf3d('0x13')]);}logger['error'](_0xcf3d('0x12'),_0xe418d1,_0x79ace8[_0xcf3d('0x11')]['message']);return _0x58f181(_0x79ace8[_0xcf3d('0x11')][_0xcf3d('0x13')]);}else{logger[_0xcf3d('0xd')]('ZohoConfiguration,\x20%s,\x20%s',_0xe418d1,_0xcf3d('0xe'));_0x58f181(_0x79ace8['result']['message']);}})[_0xcf3d('0x14')](function(_0x15ab9e){logger[_0xcf3d('0x11')](_0xcf3d('0x12'),_0xe418d1,_0x15ab9e);_0x36b2c9(_0x15ab9e);});});}
\ No newline at end of file
+var _0xed52=['catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','debug','ZohoConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','ZohoConfiguration,\x20%s,\x20%s','message'];(function(_0x19ea54,_0x3687cd){var _0x62a49c=function(_0x2b2aac){while(--_0x2b2aac){_0x19ea54['push'](_0x19ea54['shift']());}};_0x62a49c(++_0x3687cd);}(_0xed52,0xc1));var _0x2ed5=function(_0x5b561d,_0x422b7c){_0x5b561d=_0x5b561d-0x0;var _0x431060=_0xed52[_0x5b561d];return _0x431060;};'use strict';var _=require(_0x2ed5('0x0'));var util=require(_0x2ed5('0x1'));var moment=require(_0x2ed5('0x2'));var BPromise=require(_0x2ed5('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2ed5('0x4'));var db=require(_0x2ed5('0x5'))['db'];var utils=require(_0x2ed5('0x6'));var logger=require(_0x2ed5('0x7'))(_0x2ed5('0x8'));var config=require(_0x2ed5('0x9'));var jayson=require(_0x2ed5('0xa'));var client=jayson['client'][_0x2ed5('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5e0c84,_0x463280,_0x3ef673){return new BPromise(function(_0x4b30ea,_0x9ad4c0){return client[_0x2ed5('0xc')](_0x5e0c84,_0x3ef673)[_0x2ed5('0xd')](function(_0x1d8045){logger[_0x2ed5('0xe')]('ZohoConfiguration,\x20%s,\x20%s',_0x463280,'request\x20sent');logger[_0x2ed5('0xf')](_0x2ed5('0x10'),_0x463280,_0x2ed5('0x11'),JSON[_0x2ed5('0x12')](_0x1d8045));if(_0x1d8045[_0x2ed5('0x13')]){if(_0x1d8045[_0x2ed5('0x13')][_0x2ed5('0x14')]===0x1f4){logger[_0x2ed5('0x13')](_0x2ed5('0x15'),_0x463280,_0x1d8045[_0x2ed5('0x13')][_0x2ed5('0x16')]);return _0x9ad4c0(_0x1d8045[_0x2ed5('0x13')][_0x2ed5('0x16')]);}logger[_0x2ed5('0x13')](_0x2ed5('0x15'),_0x463280,_0x1d8045[_0x2ed5('0x13')]['message']);return _0x4b30ea(_0x1d8045[_0x2ed5('0x13')][_0x2ed5('0x16')]);}else{logger[_0x2ed5('0xe')]('ZohoConfiguration,\x20%s,\x20%s',_0x463280,'request\x20sent');_0x4b30ea(_0x1d8045['result']['message']);}})[_0x2ed5('0x17')](function(_0x383fc2){logger['error'](_0x2ed5('0x15'),_0x463280,_0x383fc2);_0x9ad4c0(_0x383fc2);});});}
\ No newline at end of file
index f3abea8..8d9182e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1ce9=['delete','destroy','multer','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intZohoField.controller','/:id','isAuthenticated','show','post','create','put','update'];(function(_0x2dcf30,_0x232c89){var _0x3196ef=function(_0x59fd02){while(--_0x59fd02){_0x2dcf30['push'](_0x2dcf30['shift']());}};_0x3196ef(++_0x232c89);}(_0x1ce9,0x1a0));var _0x91ce=function(_0xaa225c,_0x66eefe){_0xaa225c=_0xaa225c-0x0;var _0x411bd3=_0x1ce9[_0xaa225c];return _0x411bd3;};'use strict';var multer=require(_0x91ce('0x0'));var util=require('util');var path=require(_0x91ce('0x1'));var timeout=require(_0x91ce('0x2'));var express=require(_0x91ce('0x3'));var router=express['Router']();var fs_extra=require(_0x91ce('0x4'));var auth=require(_0x91ce('0x5'));var interaction=require(_0x91ce('0x6'));var config=require(_0x91ce('0x7'));var controller=require(_0x91ce('0x8'));router['get']('/',auth['isAuthenticated'](),controller['index']);router['get'](_0x91ce('0x9'),auth[_0x91ce('0xa')](),controller[_0x91ce('0xb')]);router[_0x91ce('0xc')]('/',auth['isAuthenticated'](),controller[_0x91ce('0xd')]);router[_0x91ce('0xe')]('/:id',auth[_0x91ce('0xa')](),controller[_0x91ce('0xf')]);router[_0x91ce('0x10')]('/:id',auth[_0x91ce('0xa')](),controller[_0x91ce('0x11')]);module['exports']=router;
\ No newline at end of file
+var _0x06fe=['destroy','exports','multer','util','path','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intZohoField.controller','isAuthenticated','get','/:id','show','post','create','update','delete'];(function(_0x2abc3d,_0x48edca){var _0x252745=function(_0x32bb6f){while(--_0x32bb6f){_0x2abc3d['push'](_0x2abc3d['shift']());}};_0x252745(++_0x48edca);}(_0x06fe,0x1dd));var _0xe06f=function(_0x2d9c6a,_0x59393d){_0x2d9c6a=_0x2d9c6a-0x0;var _0xf3c918=_0x06fe[_0x2d9c6a];return _0xf3c918;};'use strict';var multer=require(_0xe06f('0x0'));var util=require(_0xe06f('0x1'));var path=require(_0xe06f('0x2'));var timeout=require('connect-timeout');var express=require(_0xe06f('0x3'));var router=express['Router']();var fs_extra=require(_0xe06f('0x4'));var auth=require(_0xe06f('0x5'));var interaction=require(_0xe06f('0x6'));var config=require(_0xe06f('0x7'));var controller=require(_0xe06f('0x8'));router['get']('/',auth[_0xe06f('0x9')](),controller['index']);router[_0xe06f('0xa')](_0xe06f('0xb'),auth[_0xe06f('0x9')](),controller[_0xe06f('0xc')]);router[_0xe06f('0xd')]('/',auth[_0xe06f('0x9')](),controller[_0xe06f('0xe')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0xe06f('0xf')]);router[_0xe06f('0x10')](_0xe06f('0xb'),auth['isAuthenticated'](),controller[_0xe06f('0x11')]);module[_0xe06f('0x12')]=router;
\ No newline at end of file
index bcbd771..1a6d7c1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbf70=['string','customVariable','keyValue','picklist','STRING','BOOLEAN','sequelize','exports','ENUM'];(function(_0x3ce82c,_0x57a08d){var _0x15f514=function(_0x403949){while(--_0x403949){_0x3ce82c['push'](_0x3ce82c['shift']());}};_0x15f514(++_0x57a08d);}(_0xbf70,0x11d));var _0x0bf7=function(_0x4bfb7e,_0x4e45ce){_0x4bfb7e=_0x4bfb7e-0x0;var _0x1fb56b=_0xbf70[_0x4bfb7e];return _0x1fb56b;};'use strict';var Sequelize=require(_0x0bf7('0x0'));module[_0x0bf7('0x1')]={'type':{'type':Sequelize[_0x0bf7('0x2')](_0x0bf7('0x3'),'variable',_0x0bf7('0x4'),_0x0bf7('0x5'),_0x0bf7('0x6')),'defaultValue':_0x0bf7('0x3')},'content':{'type':Sequelize[_0x0bf7('0x7')]},'key':{'type':Sequelize[_0x0bf7('0x7')]},'keyType':{'type':Sequelize[_0x0bf7('0x2')](_0x0bf7('0x3'),'variable',_0x0bf7('0x4'))},'keyContent':{'type':Sequelize[_0x0bf7('0x7')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize[_0x0bf7('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x0bf7('0x7')]}};
\ No newline at end of file
+var _0x727a=['BOOLEAN','sequelize','exports','ENUM','string','variable','picklist','STRING','customVariable'];(function(_0x17b0d4,_0x377add){var _0x2d02c7=function(_0x56e627){while(--_0x56e627){_0x17b0d4['push'](_0x17b0d4['shift']());}};_0x2d02c7(++_0x377add);}(_0x727a,0x1f0));var _0xa727=function(_0x3c3d15,_0x120d77){_0x3c3d15=_0x3c3d15-0x0;var _0x2145fa=_0x727a[_0x3c3d15];return _0x2145fa;};'use strict';var Sequelize=require(_0xa727('0x0'));module[_0xa727('0x1')]={'type':{'type':Sequelize[_0xa727('0x2')](_0xa727('0x3'),_0xa727('0x4'),'customVariable','keyValue',_0xa727('0x5')),'defaultValue':'string'},'content':{'type':Sequelize[_0xa727('0x6')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0xa727('0x2')](_0xa727('0x3'),_0xa727('0x4'),_0xa727('0x7'))},'keyContent':{'type':Sequelize[_0xa727('0x6')]},'idField':{'type':Sequelize[_0xa727('0x6')]},'nameField':{'type':Sequelize[_0xa727('0x6')]},'customField':{'type':Sequelize[_0xa727('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
index 3ab79fa..b4245e7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x172c=['../../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','error','name','send','index','map','rawAttributes','fieldName','type','key','model','keys','query','filters','attributes','fields','nolimit','sort','where','pick','filter','merge','include','ZohoField','findAll','catch','params','intersection','length','includeAll','options','find','create','body','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','fs-extra','lodash','squel','crypto','jsforce','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware'];(function(_0x5ddd36,_0xce10a0){var _0x477b73=function(_0x39d1ac){while(--_0x39d1ac){_0x5ddd36['push'](_0x5ddd36['shift']());}};_0x477b73(++_0xce10a0);}(_0x172c,0x1ad));var _0xc172=function(_0x30033a,_0x5ce4a6){_0x30033a=_0x30033a-0x0;var _0x5e3518=_0x172c[_0x30033a];return _0x5e3518;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xc172('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xc172('0x1'));var rp=require(_0xc172('0x2'));var moment=require(_0xc172('0x3'));var BPromise=require(_0xc172('0x4'));var Mustache=require(_0xc172('0x5'));var util=require(_0xc172('0x6'));var path=require('path');var sox=require(_0xc172('0x7'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xc172('0x8'));var _=require(_0xc172('0x9'));var squel=require(_0xc172('0xa'));var crypto=require(_0xc172('0xb'));var jsforce=require(_0xc172('0xc'));var deskjs=require('desk.js');var toCsv=require(_0xc172('0xd'));var querystring=require(_0xc172('0xe'));var Papa=require(_0xc172('0xf'));var Redis=require(_0xc172('0x10'));var authService=require(_0xc172('0x11'));var qs=require(_0xc172('0x12'));var as=require(_0xc172('0x13'));var hardwareService=require(_0xc172('0x14'));var logger=require(_0xc172('0x15'))(_0xc172('0x16'));var utils=require(_0xc172('0x17'));var config=require(_0xc172('0x18'));var licenseUtil=require(_0xc172('0x19'));var db=require(_0xc172('0x1a'))['db'];function respondWithStatusCode(_0x444fb0,_0x126406){_0x126406=_0x126406||0xcc;return function(_0x3a858f){if(_0x3a858f){return _0x444fb0['sendStatus'](_0x126406);}return _0x444fb0[_0xc172('0x1b')](_0x126406)['end']();};}function respondWithResult(_0x16ed1e,_0x54db7f){_0x54db7f=_0x54db7f||0xc8;return function(_0x195435){if(_0x195435){return _0x16ed1e['status'](_0x54db7f)[_0xc172('0x1c')](_0x195435);}};}function respondWithFilteredResult(_0x14a8a6,_0x3bf962){return function(_0x4d237c){if(_0x4d237c){var _0xe8e652=typeof _0x3bf962[_0xc172('0x1d')]===_0xc172('0x1e')&&typeof _0x3bf962[_0xc172('0x1f')]===_0xc172('0x1e');var _0x2a3caf=_0x4d237c[_0xc172('0x20')];var _0x324eef=_0xe8e652?0x0:_0x3bf962[_0xc172('0x1d')];var _0x5d8e5f=_0xe8e652?_0x4d237c['count']:_0x3bf962[_0xc172('0x1d')]+_0x3bf962['limit'];var _0x5b95df;if(_0x5d8e5f>=_0x2a3caf){_0x5d8e5f=_0x2a3caf;_0x5b95df=0xc8;}else{_0x5b95df=0xce;}_0x14a8a6['status'](_0x5b95df);return _0x14a8a6[_0xc172('0x21')](_0xc172('0x22'),_0x324eef+'-'+_0x5d8e5f+'/'+_0x2a3caf)[_0xc172('0x1c')](_0x4d237c);}return null;};}function patchUpdates(_0x292979){return function(_0x31e804){try{jsonpatch[_0xc172('0x23')](_0x31e804,_0x292979,!![]);}catch(_0x207219){return BPromise[_0xc172('0x24')](_0x207219);}return _0x31e804[_0xc172('0x25')]();};}function saveUpdates(_0x368e83,_0x61ceec){return function(_0x24eeec){if(_0x24eeec){return _0x24eeec[_0xc172('0x26')](_0x368e83)[_0xc172('0x27')](function(_0x29e25b){return _0x29e25b;});}return null;};}function removeEntity(_0x43d515,_0x1adba3){return function(_0x3fc135){if(_0x3fc135){return _0x3fc135[_0xc172('0x28')]()[_0xc172('0x27')](function(){_0x43d515[_0xc172('0x1b')](0xcc)[_0xc172('0x29')]();});}};}function handleEntityNotFound(_0x3052ba,_0x5ee658){return function(_0xa5f5fc){if(!_0xa5f5fc){_0x3052ba['sendStatus'](0x194);}return _0xa5f5fc;};}function handleError(_0x293f04,_0x394ff7){_0x394ff7=_0x394ff7||0x1f4;return function(_0x361cfb){logger[_0xc172('0x2a')](_0x361cfb['stack']);if(_0x361cfb[_0xc172('0x2b')]){delete _0x361cfb['name'];}_0x293f04[_0xc172('0x1b')](_0x394ff7)[_0xc172('0x2c')](_0x361cfb);};}exports[_0xc172('0x2d')]=function(_0x2fd2aa,_0xb6d298){var _0x1d87b2={},_0x2f917f={},_0xa15049={'count':0x0,'rows':[]};var _0x2f9485=_[_0xc172('0x2e')](db['ZohoField'][_0xc172('0x2f')],function(_0x48f16b){return{'name':_0x48f16b[_0xc172('0x30')],'type':_0x48f16b[_0xc172('0x31')][_0xc172('0x32')]};});_0x2f917f[_0xc172('0x33')]=_[_0xc172('0x2e')](_0x2f9485,_0xc172('0x2b'));_0x2f917f['query']=_[_0xc172('0x34')](_0x2fd2aa[_0xc172('0x35')]);_0x2f917f[_0xc172('0x36')]=_['intersection'](_0x2f917f[_0xc172('0x33')],_0x2f917f[_0xc172('0x35')]);_0x1d87b2[_0xc172('0x37')]=_['intersection'](_0x2f917f[_0xc172('0x33')],qs[_0xc172('0x38')](_0x2fd2aa[_0xc172('0x35')][_0xc172('0x38')]));_0x1d87b2[_0xc172('0x37')]=_0x1d87b2['attributes']['length']?_0x1d87b2[_0xc172('0x37')]:_0x2f917f[_0xc172('0x33')];if(!_0x2fd2aa[_0xc172('0x35')]['hasOwnProperty'](_0xc172('0x39'))){_0x1d87b2['limit']=qs[_0xc172('0x1f')](_0x2fd2aa['query'][_0xc172('0x1f')]);_0x1d87b2['offset']=qs[_0xc172('0x1d')](_0x2fd2aa[_0xc172('0x35')][_0xc172('0x1d')]);}_0x1d87b2['order']=qs[_0xc172('0x3a')](_0x2fd2aa[_0xc172('0x35')][_0xc172('0x3a')]);_0x1d87b2[_0xc172('0x3b')]=qs[_0xc172('0x36')](_[_0xc172('0x3c')](_0x2fd2aa[_0xc172('0x35')],_0x2f917f[_0xc172('0x36')]),_0x2f9485);if(_0x2fd2aa[_0xc172('0x35')][_0xc172('0x3d')]){_0x1d87b2[_0xc172('0x3b')]=_[_0xc172('0x3e')](_0x1d87b2[_0xc172('0x3b')],{'$or':_[_0xc172('0x2e')](_0x2f9485,function(_0x55c88d){if(_0x55c88d[_0xc172('0x31')]!=='VIRTUAL'){var _0x1a1227={};_0x1a1227[_0x55c88d['name']]={'$like':'%'+_0x2fd2aa[_0xc172('0x35')][_0xc172('0x3d')]+'%'};return _0x1a1227;}})});}_0x1d87b2=_[_0xc172('0x3e')]({},_0x1d87b2,_0x2fd2aa['options']);var _0x41143c={'where':_0x1d87b2['where']};return db['ZohoField'][_0xc172('0x20')](_0x41143c)[_0xc172('0x27')](function(_0x1fa236){_0xa15049[_0xc172('0x20')]=_0x1fa236;if(_0x2fd2aa[_0xc172('0x35')]['includeAll']){_0x1d87b2[_0xc172('0x3f')]=[{'all':!![]}];}return db[_0xc172('0x40')][_0xc172('0x41')](_0x1d87b2);})[_0xc172('0x27')](function(_0x20a595){_0xa15049['rows']=_0x20a595;return _0xa15049;})['then'](respondWithFilteredResult(_0xb6d298,_0x1d87b2))[_0xc172('0x42')](handleError(_0xb6d298,null));};exports['show']=function(_0x1f1f3d,_0x17b3a0){var _0x193006={'raw':!![],'where':{'id':_0x1f1f3d[_0xc172('0x43')]['id']}},_0x43c8c8={};_0x43c8c8['model']=_[_0xc172('0x34')](db[_0xc172('0x40')]['rawAttributes']);_0x43c8c8[_0xc172('0x35')]=_[_0xc172('0x34')](_0x1f1f3d[_0xc172('0x35')]);_0x43c8c8[_0xc172('0x36')]=_[_0xc172('0x44')](_0x43c8c8[_0xc172('0x33')],_0x43c8c8[_0xc172('0x35')]);_0x193006[_0xc172('0x37')]=_[_0xc172('0x44')](_0x43c8c8[_0xc172('0x33')],qs[_0xc172('0x38')](_0x1f1f3d[_0xc172('0x35')][_0xc172('0x38')]));_0x193006[_0xc172('0x37')]=_0x193006['attributes'][_0xc172('0x45')]?_0x193006['attributes']:_0x43c8c8[_0xc172('0x33')];if(_0x1f1f3d['query'][_0xc172('0x46')]){_0x193006[_0xc172('0x3f')]=[{'all':!![]}];}_0x193006=_[_0xc172('0x3e')]({},_0x193006,_0x1f1f3d[_0xc172('0x47')]);return db[_0xc172('0x40')][_0xc172('0x48')](_0x193006)[_0xc172('0x27')](handleEntityNotFound(_0x17b3a0,null))[_0xc172('0x27')](respondWithResult(_0x17b3a0,null))['catch'](handleError(_0x17b3a0,null));};exports[_0xc172('0x49')]=function(_0x4e6603,_0x3904ec){return db[_0xc172('0x40')]['create'](_0x4e6603[_0xc172('0x4a')],{})[_0xc172('0x27')](respondWithResult(_0x3904ec,0xc9))[_0xc172('0x42')](handleError(_0x3904ec,null));};exports[_0xc172('0x26')]=function(_0x23cf79,_0x5de016){if(_0x23cf79[_0xc172('0x4a')]['id']){delete _0x23cf79[_0xc172('0x4a')]['id'];}return db[_0xc172('0x40')]['find']({'where':{'id':_0x23cf79[_0xc172('0x43')]['id']}})[_0xc172('0x27')](handleEntityNotFound(_0x5de016,null))[_0xc172('0x27')](saveUpdates(_0x23cf79[_0xc172('0x4a')],null))['then'](respondWithResult(_0x5de016,null))[_0xc172('0x42')](handleError(_0x5de016,null));};exports[_0xc172('0x28')]=function(_0x29fc33,_0x482e70){return db[_0xc172('0x40')][_0xc172('0x48')]({'where':{'id':_0x29fc33[_0xc172('0x43')]['id']}})[_0xc172('0x27')](handleEntityNotFound(_0x482e70,null))[_0xc172('0x27')](removeEntity(_0x482e70,null))[_0xc172('0x42')](handleError(_0x482e70,null));};
\ No newline at end of file
+var _0xb8d5=['rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','fs-extra','lodash','crypto','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','apply','reject','update','destroy','then','end','name','map','ZohoField','rawAttributes','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','pick','filter','where','merge','type','VIRTUAL','options','includeAll','include','findAll','catch','create','body','find','params','eml-format'];(function(_0x43dc7e,_0x49a390){var _0x21e12d=function(_0x15cc1a){while(--_0x15cc1a){_0x43dc7e['push'](_0x43dc7e['shift']());}};_0x21e12d(++_0x49a390);}(_0xb8d5,0xd4));var _0x5b8d=function(_0x15ed0b,_0x3c6cd2){_0x15ed0b=_0x15ed0b-0x0;var _0x2d4431=_0xb8d5[_0x15ed0b];return _0x2d4431;};'use strict';var emlformat=require(_0x5b8d('0x0'));var rimraf=require(_0x5b8d('0x1'));var zipdir=require(_0x5b8d('0x2'));var jsonpatch=require(_0x5b8d('0x3'));var rp=require(_0x5b8d('0x4'));var moment=require(_0x5b8d('0x5'));var BPromise=require(_0x5b8d('0x6'));var Mustache=require('mustache');var util=require(_0x5b8d('0x7'));var path=require(_0x5b8d('0x8'));var sox=require(_0x5b8d('0x9'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x5b8d('0xa'));var _=require(_0x5b8d('0xb'));var squel=require('squel');var crypto=require(_0x5b8d('0xc'));var jsforce=require(_0x5b8d('0xd'));var deskjs=require(_0x5b8d('0xe'));var toCsv=require(_0x5b8d('0xf'));var querystring=require(_0x5b8d('0x10'));var Papa=require(_0x5b8d('0x11'));var Redis=require('ioredis');var authService=require(_0x5b8d('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x5b8d('0x13'));var hardwareService=require(_0x5b8d('0x14'));var logger=require(_0x5b8d('0x15'))('api');var utils=require(_0x5b8d('0x16'));var config=require(_0x5b8d('0x17'));var licenseUtil=require(_0x5b8d('0x18'));var db=require(_0x5b8d('0x19'))['db'];function respondWithStatusCode(_0x28140c,_0x4b333b){_0x4b333b=_0x4b333b||0xcc;return function(_0x3725eb){if(_0x3725eb){return _0x28140c[_0x5b8d('0x1a')](_0x4b333b);}return _0x28140c[_0x5b8d('0x1b')](_0x4b333b)['end']();};}function respondWithResult(_0x1e35f7,_0x34159d){_0x34159d=_0x34159d||0xc8;return function(_0x17bbb0){if(_0x17bbb0){return _0x1e35f7[_0x5b8d('0x1b')](_0x34159d)[_0x5b8d('0x1c')](_0x17bbb0);}};}function respondWithFilteredResult(_0x20a6b2,_0x4135ae){return function(_0xd20484){if(_0xd20484){var _0x332a17=typeof _0x4135ae[_0x5b8d('0x1d')]===_0x5b8d('0x1e')&&typeof _0x4135ae[_0x5b8d('0x1f')]==='undefined';var _0x30ec92=_0xd20484[_0x5b8d('0x20')];var _0x256f7a=_0x332a17?0x0:_0x4135ae[_0x5b8d('0x1d')];var _0x14c5b6=_0x332a17?_0xd20484['count']:_0x4135ae[_0x5b8d('0x1d')]+_0x4135ae[_0x5b8d('0x1f')];var _0x19663f;if(_0x14c5b6>=_0x30ec92){_0x14c5b6=_0x30ec92;_0x19663f=0xc8;}else{_0x19663f=0xce;}_0x20a6b2[_0x5b8d('0x1b')](_0x19663f);return _0x20a6b2[_0x5b8d('0x21')]('Content-Range',_0x256f7a+'-'+_0x14c5b6+'/'+_0x30ec92)[_0x5b8d('0x1c')](_0xd20484);}return null;};}function patchUpdates(_0x14a5c2){return function(_0x3c5e72){try{jsonpatch[_0x5b8d('0x22')](_0x3c5e72,_0x14a5c2,!![]);}catch(_0x5df0b3){return BPromise[_0x5b8d('0x23')](_0x5df0b3);}return _0x3c5e72['save']();};}function saveUpdates(_0x52868e,_0x398f48){return function(_0x1c80a8){if(_0x1c80a8){return _0x1c80a8[_0x5b8d('0x24')](_0x52868e)['then'](function(_0x41e094){return _0x41e094;});}return null;};}function removeEntity(_0x5d173a,_0x53158b){return function(_0x8ea4a6){if(_0x8ea4a6){return _0x8ea4a6[_0x5b8d('0x25')]()[_0x5b8d('0x26')](function(){_0x5d173a[_0x5b8d('0x1b')](0xcc)[_0x5b8d('0x27')]();});}};}function handleEntityNotFound(_0x18c6de,_0x4eee14){return function(_0x2e4493){if(!_0x2e4493){_0x18c6de[_0x5b8d('0x1a')](0x194);}return _0x2e4493;};}function handleError(_0x308a7d,_0x2cfe26){_0x2cfe26=_0x2cfe26||0x1f4;return function(_0x30877c){logger['error'](_0x30877c['stack']);if(_0x30877c[_0x5b8d('0x28')]){delete _0x30877c[_0x5b8d('0x28')];}_0x308a7d[_0x5b8d('0x1b')](_0x2cfe26)['send'](_0x30877c);};}exports['index']=function(_0x554ebf,_0x632016){var _0x3981bb={},_0x18b94c={},_0x39704b={'count':0x0,'rows':[]};var _0x2f3186=_[_0x5b8d('0x29')](db[_0x5b8d('0x2a')][_0x5b8d('0x2b')],function(_0x2a8ab6){return{'name':_0x2a8ab6['fieldName'],'type':_0x2a8ab6['type'][_0x5b8d('0x2c')]};});_0x18b94c[_0x5b8d('0x2d')]=_[_0x5b8d('0x29')](_0x2f3186,_0x5b8d('0x28'));_0x18b94c[_0x5b8d('0x2e')]=_[_0x5b8d('0x2f')](_0x554ebf[_0x5b8d('0x2e')]);_0x18b94c[_0x5b8d('0x30')]=_[_0x5b8d('0x31')](_0x18b94c[_0x5b8d('0x2d')],_0x18b94c[_0x5b8d('0x2e')]);_0x3981bb[_0x5b8d('0x32')]=_[_0x5b8d('0x31')](_0x18b94c[_0x5b8d('0x2d')],qs[_0x5b8d('0x33')](_0x554ebf[_0x5b8d('0x2e')][_0x5b8d('0x33')]));_0x3981bb[_0x5b8d('0x32')]=_0x3981bb['attributes'][_0x5b8d('0x34')]?_0x3981bb[_0x5b8d('0x32')]:_0x18b94c[_0x5b8d('0x2d')];if(!_0x554ebf[_0x5b8d('0x2e')][_0x5b8d('0x35')](_0x5b8d('0x36'))){_0x3981bb[_0x5b8d('0x1f')]=qs[_0x5b8d('0x1f')](_0x554ebf[_0x5b8d('0x2e')]['limit']);_0x3981bb['offset']=qs[_0x5b8d('0x1d')](_0x554ebf[_0x5b8d('0x2e')][_0x5b8d('0x1d')]);}_0x3981bb['order']=qs[_0x5b8d('0x37')](_0x554ebf['query'][_0x5b8d('0x37')]);_0x3981bb['where']=qs['filters'](_[_0x5b8d('0x38')](_0x554ebf[_0x5b8d('0x2e')],_0x18b94c['filters']),_0x2f3186);if(_0x554ebf['query'][_0x5b8d('0x39')]){_0x3981bb[_0x5b8d('0x3a')]=_[_0x5b8d('0x3b')](_0x3981bb[_0x5b8d('0x3a')],{'$or':_[_0x5b8d('0x29')](_0x2f3186,function(_0xb02533){if(_0xb02533[_0x5b8d('0x3c')]!==_0x5b8d('0x3d')){var _0x246dc6={};_0x246dc6[_0xb02533[_0x5b8d('0x28')]]={'$like':'%'+_0x554ebf['query'][_0x5b8d('0x39')]+'%'};return _0x246dc6;}})});}_0x3981bb=_['merge']({},_0x3981bb,_0x554ebf[_0x5b8d('0x3e')]);var _0x3ededd={'where':_0x3981bb[_0x5b8d('0x3a')]};return db['ZohoField'][_0x5b8d('0x20')](_0x3ededd)['then'](function(_0x5658f3){_0x39704b[_0x5b8d('0x20')]=_0x5658f3;if(_0x554ebf[_0x5b8d('0x2e')][_0x5b8d('0x3f')]){_0x3981bb[_0x5b8d('0x40')]=[{'all':!![]}];}return db[_0x5b8d('0x2a')][_0x5b8d('0x41')](_0x3981bb);})[_0x5b8d('0x26')](function(_0x1cde91){_0x39704b['rows']=_0x1cde91;return _0x39704b;})[_0x5b8d('0x26')](respondWithFilteredResult(_0x632016,_0x3981bb))[_0x5b8d('0x42')](handleError(_0x632016,null));};exports['show']=function(_0x4abb5e,_0x14776e){var _0x294761={'raw':!![],'where':{'id':_0x4abb5e['params']['id']}},_0x49a8a6={};_0x49a8a6[_0x5b8d('0x2d')]=_[_0x5b8d('0x2f')](db[_0x5b8d('0x2a')][_0x5b8d('0x2b')]);_0x49a8a6[_0x5b8d('0x2e')]=_[_0x5b8d('0x2f')](_0x4abb5e[_0x5b8d('0x2e')]);_0x49a8a6[_0x5b8d('0x30')]=_['intersection'](_0x49a8a6[_0x5b8d('0x2d')],_0x49a8a6[_0x5b8d('0x2e')]);_0x294761[_0x5b8d('0x32')]=_[_0x5b8d('0x31')](_0x49a8a6[_0x5b8d('0x2d')],qs[_0x5b8d('0x33')](_0x4abb5e[_0x5b8d('0x2e')][_0x5b8d('0x33')]));_0x294761[_0x5b8d('0x32')]=_0x294761['attributes']['length']?_0x294761[_0x5b8d('0x32')]:_0x49a8a6[_0x5b8d('0x2d')];if(_0x4abb5e[_0x5b8d('0x2e')][_0x5b8d('0x3f')]){_0x294761[_0x5b8d('0x40')]=[{'all':!![]}];}_0x294761=_['merge']({},_0x294761,_0x4abb5e[_0x5b8d('0x3e')]);return db[_0x5b8d('0x2a')]['find'](_0x294761)[_0x5b8d('0x26')](handleEntityNotFound(_0x14776e,null))[_0x5b8d('0x26')](respondWithResult(_0x14776e,null))[_0x5b8d('0x42')](handleError(_0x14776e,null));};exports['create']=function(_0x53eefb,_0x5281ac){return db[_0x5b8d('0x2a')][_0x5b8d('0x43')](_0x53eefb['body'],{})[_0x5b8d('0x26')](respondWithResult(_0x5281ac,0xc9))[_0x5b8d('0x42')](handleError(_0x5281ac,null));};exports[_0x5b8d('0x24')]=function(_0x3c37d9,_0x576f78){if(_0x3c37d9[_0x5b8d('0x44')]['id']){delete _0x3c37d9[_0x5b8d('0x44')]['id'];}return db[_0x5b8d('0x2a')][_0x5b8d('0x45')]({'where':{'id':_0x3c37d9[_0x5b8d('0x46')]['id']}})[_0x5b8d('0x26')](handleEntityNotFound(_0x576f78,null))[_0x5b8d('0x26')](saveUpdates(_0x3c37d9['body'],null))[_0x5b8d('0x26')](respondWithResult(_0x576f78,null))[_0x5b8d('0x42')](handleError(_0x576f78,null));};exports[_0x5b8d('0x25')]=function(_0x3df942,_0x391b96){return db[_0x5b8d('0x2a')][_0x5b8d('0x45')]({'where':{'id':_0x3df942[_0x5b8d('0x46')]['id']}})[_0x5b8d('0x26')](handleEntityNotFound(_0x391b96,null))['then'](removeEntity(_0x391b96,null))[_0x5b8d('0x42')](handleError(_0x391b96,null));};
\ No newline at end of file
index e1f1853..a186d59 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7ee1=['request-promise','rimraf','../../config/environment','./intZohoField.attributes','exports','define','int_zoho_fields','idField','FieldId','lodash','moment','bluebird'];(function(_0x40ec17,_0xfdfb8){var _0x4bd2a5=function(_0x5b1ec4){while(--_0x5b1ec4){_0x40ec17['push'](_0x40ec17['shift']());}};_0x4bd2a5(++_0xfdfb8);}(_0x7ee1,0x8d));var _0x17ee=function(_0x5560d0,_0x250a32){_0x5560d0=_0x5560d0-0x0;var _0x3e3211=_0x7ee1[_0x5560d0];return _0x3e3211;};'use strict';var _=require(_0x17ee('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0x17ee('0x1'));var BPromise=require(_0x17ee('0x2'));var rp=require(_0x17ee('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x17ee('0x4'));var config=require(_0x17ee('0x5'));var attributes=require(_0x17ee('0x6'));module[_0x17ee('0x7')]=function(_0x5c0617,_0x52b1db){return _0x5c0617[_0x17ee('0x8')]('ZohoField',attributes,{'tableName':_0x17ee('0x9'),'paranoid':![],'indexes':[{'name':'zoho_unique_index','fields':[_0x17ee('0xa'),_0x17ee('0xb')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x2a07=['api','moment','request-promise','path','rimraf','../../config/environment','./intZohoField.attributes','exports','define','ZohoField','int_zoho_fields','zoho_unique_index','idField','FieldId','lodash','util','../../config/logger'];(function(_0x247aab,_0x6d308){var _0x198cd0=function(_0x2bf3a4){while(--_0x2bf3a4){_0x247aab['push'](_0x247aab['shift']());}};_0x198cd0(++_0x6d308);}(_0x2a07,0x74));var _0x72a0=function(_0x1acefc,_0x5da0bf){_0x1acefc=_0x1acefc-0x0;var _0x543527=_0x2a07[_0x1acefc];return _0x543527;};'use strict';var _=require(_0x72a0('0x0'));var util=require(_0x72a0('0x1'));var logger=require(_0x72a0('0x2'))(_0x72a0('0x3'));var moment=require(_0x72a0('0x4'));var BPromise=require('bluebird');var rp=require(_0x72a0('0x5'));var fs=require('fs');var path=require(_0x72a0('0x6'));var rimraf=require(_0x72a0('0x7'));var config=require(_0x72a0('0x8'));var attributes=require(_0x72a0('0x9'));module[_0x72a0('0xa')]=function(_0x3ccf6d,_0x20dab9){return _0x3ccf6d[_0x72a0('0xb')](_0x72a0('0xc'),attributes,{'tableName':_0x72a0('0xd'),'paranoid':![],'indexes':[{'name':_0x72a0('0xe'),'fields':[_0x72a0('0xf'),_0x72a0('0x10')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index b1b21f5..1a9aea6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfb67=['rpc','client','http','request','then','request\x20sent','debug','ZohoField,\x20%s,\x20%s,\x20%s','stringify','error','ZohoField,\x20%s,\x20%s','message','info','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x37a3a4,_0x41cac1){var _0x4b9f0c=function(_0x1286c2){while(--_0x1286c2){_0x37a3a4['push'](_0x37a3a4['shift']());}};_0x4b9f0c(++_0x41cac1);}(_0xfb67,0xf4));var _0x7fb6=function(_0x2f0ecb,_0x5d739e){_0x2f0ecb=_0x2f0ecb-0x0;var _0x4aae3a=_0xfb67[_0x2f0ecb];return _0x4aae3a;};'use strict';var _=require(_0x7fb6('0x0'));var util=require(_0x7fb6('0x1'));var moment=require(_0x7fb6('0x2'));var BPromise=require(_0x7fb6('0x3'));var rs=require(_0x7fb6('0x4'));var fs=require('fs');var Redis=require(_0x7fb6('0x5'));var db=require(_0x7fb6('0x6'))['db'];var utils=require(_0x7fb6('0x7'));var logger=require(_0x7fb6('0x8'))(_0x7fb6('0x9'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x7fb6('0xa')][_0x7fb6('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x202bb0,_0x30cb6a,_0xe8067d){return new BPromise(function(_0x1a4e63,_0x36fcb8){return client[_0x7fb6('0xc')](_0x202bb0,_0xe8067d)[_0x7fb6('0xd')](function(_0x2f6ad2){logger['info']('ZohoField,\x20%s,\x20%s',_0x30cb6a,_0x7fb6('0xe'));logger[_0x7fb6('0xf')](_0x7fb6('0x10'),_0x30cb6a,'request\x20sent',JSON[_0x7fb6('0x11')](_0x2f6ad2));if(_0x2f6ad2['error']){if(_0x2f6ad2[_0x7fb6('0x12')]['code']===0x1f4){logger[_0x7fb6('0x12')](_0x7fb6('0x13'),_0x30cb6a,_0x2f6ad2[_0x7fb6('0x12')][_0x7fb6('0x14')]);return _0x36fcb8(_0x2f6ad2['error'][_0x7fb6('0x14')]);}logger[_0x7fb6('0x12')](_0x7fb6('0x13'),_0x30cb6a,_0x2f6ad2[_0x7fb6('0x12')]['message']);return _0x1a4e63(_0x2f6ad2['error'][_0x7fb6('0x14')]);}else{logger[_0x7fb6('0x15')](_0x7fb6('0x13'),_0x30cb6a,_0x7fb6('0xe'));_0x1a4e63(_0x2f6ad2['result'][_0x7fb6('0x14')]);}})[_0x7fb6('0x16')](function(_0x3c9479){logger[_0x7fb6('0x12')](_0x7fb6('0x13'),_0x30cb6a,_0x3c9479);_0x36fcb8(_0x3c9479);});});}
\ No newline at end of file
+var _0x4011=['error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','client','request','info','ZohoField,\x20%s,\x20%s','request\x20sent','debug','ZohoField,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x2a6809,_0x44edde){var _0x11c371=function(_0x1a4888){while(--_0x1a4888){_0x2a6809['push'](_0x2a6809['shift']());}};_0x11c371(++_0x44edde);}(_0x4011,0x89));var _0x1401=function(_0x111fec,_0x55932a){_0x111fec=_0x111fec-0x0;var _0x13b1a4=_0x4011[_0x111fec];return _0x13b1a4;};'use strict';var _=require(_0x1401('0x0'));var util=require(_0x1401('0x1'));var moment=require(_0x1401('0x2'));var BPromise=require(_0x1401('0x3'));var rs=require(_0x1401('0x4'));var fs=require('fs');var Redis=require(_0x1401('0x5'));var db=require(_0x1401('0x6'))['db'];var utils=require(_0x1401('0x7'));var logger=require('../../config/logger')('rpc');var config=require(_0x1401('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x1401('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2dfe27,_0x32c772,_0x37fe0c){return new BPromise(function(_0x5195e3,_0x170ae7){return client[_0x1401('0xa')](_0x2dfe27,_0x37fe0c)['then'](function(_0x1b7441){logger[_0x1401('0xb')](_0x1401('0xc'),_0x32c772,_0x1401('0xd'));logger[_0x1401('0xe')](_0x1401('0xf'),_0x32c772,'request\x20sent',JSON[_0x1401('0x10')](_0x1b7441));if(_0x1b7441['error']){if(_0x1b7441[_0x1401('0x11')][_0x1401('0x12')]===0x1f4){logger[_0x1401('0x11')]('ZohoField,\x20%s,\x20%s',_0x32c772,_0x1b7441[_0x1401('0x11')][_0x1401('0x13')]);return _0x170ae7(_0x1b7441['error'][_0x1401('0x13')]);}logger[_0x1401('0x11')](_0x1401('0xc'),_0x32c772,_0x1b7441['error'][_0x1401('0x13')]);return _0x5195e3(_0x1b7441[_0x1401('0x11')][_0x1401('0x13')]);}else{logger[_0x1401('0xb')](_0x1401('0xc'),_0x32c772,_0x1401('0xd'));_0x5195e3(_0x1b7441[_0x1401('0x14')][_0x1401('0x13')]);}})[_0x1401('0x15')](function(_0x113dfc){logger['error'](_0x1401('0xc'),_0x32c772,_0x113dfc);_0x170ae7(_0x113dfc);});});}
\ No newline at end of file
index 3bcd069..3979f68 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(_0x4d313e,_0x278f09){var _0x5bdea4=function(_0x2eaee3){while(--_0x2eaee3){_0x4d313e['push'](_0x4d313e['shift']());}};_0x5bdea4(++_0x278f09);}(_0xe706,0xa3));var _0x6e70=function(_0x26b8b5,_0xf5c2c1){_0x26b8b5=_0x26b8b5-0x0;var _0x2150a9=_0xe706[_0x26b8b5];return _0x2150a9;};'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 _0xd8b0=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','multer','util'];(function(_0x4dc7f5,_0x312c14){var _0x3e37db=function(_0x820d0e){while(--_0x820d0e){_0x4dc7f5['push'](_0x4dc7f5['shift']());}};_0x3e37db(++_0x312c14);}(_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
index e5bf605..82119f3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0418=['sequelize','exports','STRING','unique_name_and_version','INTEGER','BOOLEAN','state'];(function(_0x3f3bad,_0x193f06){var _0x4f0801=function(_0x5cfd32){while(--_0x5cfd32){_0x3f3bad['push'](_0x3f3bad['shift']());}};_0x4f0801(++_0x193f06);}(_0x0418,0x165));var _0x8041=function(_0x1ac595,_0x5d2081){_0x1ac595=_0x1ac595-0x0;var _0x455fff=_0x0418[_0x1ac595];return _0x455fff;};'use strict';var Sequelize=require(_0x8041('0x0'));module[_0x8041('0x1')]={'name':{'type':Sequelize[_0x8041('0x2')],'allowNull':![],'unique':'unique_name_and_version'},'version':{'type':Sequelize[_0x8041('0x2')],'allowNull':![],'unique':_0x8041('0x3')},'main':{'type':Sequelize[_0x8041('0x2')],'defaultValue':'app.js'},'filename':{'type':Sequelize['STRING']},'path':{'type':Sequelize[_0x8041('0x2')]},'type':{'type':Sequelize[_0x8041('0x2')]},'size':{'type':Sequelize[_0x8041('0x4')]},'active':{'type':Sequelize[_0x8041('0x5')],'defaultValue':![]},'author':{'type':Sequelize[_0x8041('0x2')]},'logo':{'type':Sequelize['STRING']},'state':{'type':Sequelize[_0x8041('0x2')],'unique':_0x8041('0x6')},'description':{'type':Sequelize['STRING']},'title':{'type':Sequelize[_0x8041('0x2')]},'remoteUri':{'type':Sequelize[_0x8041('0x2')]},'link':{'type':Sequelize[_0x8041('0x2')],'defaultValue':'#'}};
\ No newline at end of file
+var _0xf7f7=['STRING','unique_name_and_version','app.js','INTEGER','state','sequelize','exports'];(function(_0x20aa0f,_0x16368b){var _0x466faf=function(_0x3fa6f7){while(--_0x3fa6f7){_0x20aa0f['push'](_0x20aa0f['shift']());}};_0x466faf(++_0x16368b);}(_0xf7f7,0xf3));var _0x7f7f=function(_0x3be7ff,_0x12e714){_0x3be7ff=_0x3be7ff-0x0;var _0x186721=_0xf7f7[_0x3be7ff];return _0x186721;};'use strict';var Sequelize=require(_0x7f7f('0x0'));module[_0x7f7f('0x1')]={'name':{'type':Sequelize[_0x7f7f('0x2')],'allowNull':![],'unique':'unique_name_and_version'},'version':{'type':Sequelize[_0x7f7f('0x2')],'allowNull':![],'unique':_0x7f7f('0x3')},'main':{'type':Sequelize[_0x7f7f('0x2')],'defaultValue':_0x7f7f('0x4')},'filename':{'type':Sequelize[_0x7f7f('0x2')]},'path':{'type':Sequelize[_0x7f7f('0x2')]},'type':{'type':Sequelize[_0x7f7f('0x2')]},'size':{'type':Sequelize[_0x7f7f('0x5')]},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'author':{'type':Sequelize[_0x7f7f('0x2')]},'logo':{'type':Sequelize['STRING']},'state':{'type':Sequelize['STRING'],'unique':_0x7f7f('0x6')},'description':{'type':Sequelize[_0x7f7f('0x2')]},'title':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0x7f7f('0x2')]},'link':{'type':Sequelize['STRING'],'defaultValue':'#'}};
\ No newline at end of file
index 2b84707..84971dd 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(_0x5d2803,_0xf375bd){var _0xdcad2c=function(_0x3c3a98){while(--_0x3c3a98){_0x5d2803['push'](_0x5d2803['shift']());}};_0xdcad2c(++_0xf375bd);}(_0xadb5,0xad));var _0x5adb=function(_0x1b0849,_0x4cd609){_0x1b0849=_0x1b0849-0x0;var _0x564fcd=_0xadb5[_0x1b0849];return _0x564fcd;};'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 _0x57ca=['bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','status','json','offset','undefined','count','limit','set','apply','save','update','then','destroy','end','sendStatus','error','stack','name','index','map','Integration','type','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filter','merge','options','includeAll','include','findAll','params','find','catch','create','body','rimraf','zip-dir','request-promise','moment'];(function(_0x34628b,_0x25629d){var _0x366c7e=function(_0x46e380){while(--_0x46e380){_0x34628b['push'](_0x34628b['shift']());}};_0x366c7e(++_0x25629d);}(_0x57ca,0x108));var _0xa57c=function(_0x229a14,_0x1904c0){_0x229a14=_0x229a14-0x0;var _0x33c4f2=_0x57ca[_0x229a14];return _0x33c4f2;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xa57c('0x0'));var zipdir=require(_0xa57c('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xa57c('0x2'));var moment=require(_0xa57c('0x3'));var BPromise=require(_0xa57c('0x4'));var Mustache=require(_0xa57c('0x5'));var util=require(_0xa57c('0x6'));var path=require('path');var sox=require(_0xa57c('0x7'));var csv=require(_0xa57c('0x8'));var ejs=require(_0xa57c('0x9'));var fs=require('fs');var fs_extra=require(_0xa57c('0xa'));var _=require(_0xa57c('0xb'));var squel=require(_0xa57c('0xc'));var crypto=require(_0xa57c('0xd'));var jsforce=require(_0xa57c('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xa57c('0x8'));var querystring=require('querystring');var Papa=require(_0xa57c('0xf'));var Redis=require(_0xa57c('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xa57c('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xa57c('0x12'));var logger=require(_0xa57c('0x13'))('api');var utils=require(_0xa57c('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0xa57c('0x15'));var db=require(_0xa57c('0x16'))['db'];function respondWithStatusCode(_0x1f2bb5,_0x9e25bf){_0x9e25bf=_0x9e25bf||0xcc;return function(_0x205e72){if(_0x205e72){return _0x1f2bb5['sendStatus'](_0x9e25bf);}return _0x1f2bb5[_0xa57c('0x17')](_0x9e25bf)['end']();};}function respondWithResult(_0x30d23d,_0x3d5995){_0x3d5995=_0x3d5995||0xc8;return function(_0x30940d){if(_0x30940d){return _0x30d23d[_0xa57c('0x17')](_0x3d5995)[_0xa57c('0x18')](_0x30940d);}};}function respondWithFilteredResult(_0x37a323,_0x3f900a){return function(_0x4b4bdb){if(_0x4b4bdb){var _0x26607a=typeof _0x3f900a[_0xa57c('0x19')]===_0xa57c('0x1a')&&typeof _0x3f900a['limit']===_0xa57c('0x1a');var _0x5f33f1=_0x4b4bdb[_0xa57c('0x1b')];var _0x3d781d=_0x26607a?0x0:_0x3f900a[_0xa57c('0x19')];var _0xe3d505=_0x26607a?_0x4b4bdb[_0xa57c('0x1b')]:_0x3f900a[_0xa57c('0x19')]+_0x3f900a[_0xa57c('0x1c')];var _0x595c7a;if(_0xe3d505>=_0x5f33f1){_0xe3d505=_0x5f33f1;_0x595c7a=0xc8;}else{_0x595c7a=0xce;}_0x37a323['status'](_0x595c7a);return _0x37a323[_0xa57c('0x1d')]('Content-Range',_0x3d781d+'-'+_0xe3d505+'/'+_0x5f33f1)['json'](_0x4b4bdb);}return null;};}function patchUpdates(_0x418415){return function(_0xa5b314){try{jsonpatch[_0xa57c('0x1e')](_0xa5b314,_0x418415,!![]);}catch(_0x23bec0){return BPromise['reject'](_0x23bec0);}return _0xa5b314[_0xa57c('0x1f')]();};}function saveUpdates(_0x25715f,_0x34d1bc){return function(_0x2213b2){if(_0x2213b2){return _0x2213b2[_0xa57c('0x20')](_0x25715f)[_0xa57c('0x21')](function(_0x1e0192){return _0x1e0192;});}return null;};}function removeEntity(_0x42038e,_0x2e99ed){return function(_0xdf65dd){if(_0xdf65dd){return _0xdf65dd[_0xa57c('0x22')]()[_0xa57c('0x21')](function(){_0x42038e[_0xa57c('0x17')](0xcc)[_0xa57c('0x23')]();});}};}function handleEntityNotFound(_0x431bec,_0x511a26){return function(_0x2db443){if(!_0x2db443){_0x431bec[_0xa57c('0x24')](0x194);}return _0x2db443;};}function handleError(_0x27884d,_0x5228b9){_0x5228b9=_0x5228b9||0x1f4;return function(_0x315ad7){logger[_0xa57c('0x25')](_0x315ad7[_0xa57c('0x26')]);if(_0x315ad7[_0xa57c('0x27')]){delete _0x315ad7[_0xa57c('0x27')];}_0x27884d[_0xa57c('0x17')](_0x5228b9)['send'](_0x315ad7);};}exports[_0xa57c('0x28')]=function(_0x4c1478,_0x54a18b){var _0x257661={},_0x7d10ec={},_0x5a3e03={'count':0x0,'rows':[]};var _0x12898b=_[_0xa57c('0x29')](db[_0xa57c('0x2a')]['rawAttributes'],function(_0xd779f1){return{'name':_0xd779f1['fieldName'],'type':_0xd779f1[_0xa57c('0x2b')]['key']};});_0x7d10ec[_0xa57c('0x2c')]=_['map'](_0x12898b,_0xa57c('0x27'));_0x7d10ec['query']=_[_0xa57c('0x2d')](_0x4c1478[_0xa57c('0x2e')]);_0x7d10ec[_0xa57c('0x2f')]=_[_0xa57c('0x30')](_0x7d10ec[_0xa57c('0x2c')],_0x7d10ec[_0xa57c('0x2e')]);_0x257661[_0xa57c('0x31')]=_['intersection'](_0x7d10ec[_0xa57c('0x2c')],qs['fields'](_0x4c1478[_0xa57c('0x2e')][_0xa57c('0x32')]));_0x257661[_0xa57c('0x31')]=_0x257661['attributes'][_0xa57c('0x33')]?_0x257661['attributes']:_0x7d10ec[_0xa57c('0x2c')];if(!_0x4c1478['query'][_0xa57c('0x34')]('nolimit')){_0x257661[_0xa57c('0x1c')]=qs[_0xa57c('0x1c')](_0x4c1478['query'][_0xa57c('0x1c')]);_0x257661['offset']=qs[_0xa57c('0x19')](_0x4c1478['query'][_0xa57c('0x19')]);}_0x257661[_0xa57c('0x35')]=qs[_0xa57c('0x36')](_0x4c1478[_0xa57c('0x2e')][_0xa57c('0x36')]);_0x257661[_0xa57c('0x37')]=qs['filters'](_['pick'](_0x4c1478[_0xa57c('0x2e')],_0x7d10ec[_0xa57c('0x2f')]),_0x12898b);if(_0x4c1478[_0xa57c('0x2e')]['filter']){_0x257661[_0xa57c('0x37')]=_['merge'](_0x257661[_0xa57c('0x37')],{'$or':_[_0xa57c('0x29')](_0x12898b,function(_0x5c8256){if(_0x5c8256['type']!=='VIRTUAL'){var _0x3be888={};_0x3be888[_0x5c8256[_0xa57c('0x27')]]={'$like':'%'+_0x4c1478[_0xa57c('0x2e')][_0xa57c('0x38')]+'%'};return _0x3be888;}})});}_0x257661=_[_0xa57c('0x39')]({},_0x257661,_0x4c1478[_0xa57c('0x3a')]);var _0x5a444a={'where':_0x257661[_0xa57c('0x37')]};return db[_0xa57c('0x2a')]['count'](_0x5a444a)['then'](function(_0x5e10b){_0x5a3e03[_0xa57c('0x1b')]=_0x5e10b;if(_0x4c1478['query'][_0xa57c('0x3b')]){_0x257661[_0xa57c('0x3c')]=[{'all':!![]}];}return db[_0xa57c('0x2a')][_0xa57c('0x3d')](_0x257661);})[_0xa57c('0x21')](function(_0x43c1d7){_0x5a3e03['rows']=_0x43c1d7;return _0x5a3e03;})[_0xa57c('0x21')](respondWithFilteredResult(_0x54a18b,_0x257661))['catch'](handleError(_0x54a18b,null));};exports['show']=function(_0x5b3300,_0x520383){var _0x588199={'raw':![],'where':{'id':_0x5b3300[_0xa57c('0x3e')]['id']}},_0x39b20f={};_0x39b20f[_0xa57c('0x2c')]=_['keys'](db['Integration']['rawAttributes']);_0x39b20f[_0xa57c('0x2e')]=_[_0xa57c('0x2d')](_0x5b3300[_0xa57c('0x2e')]);_0x39b20f[_0xa57c('0x2f')]=_[_0xa57c('0x30')](_0x39b20f[_0xa57c('0x2c')],_0x39b20f['query']);_0x588199[_0xa57c('0x31')]=_[_0xa57c('0x30')](_0x39b20f[_0xa57c('0x2c')],qs[_0xa57c('0x32')](_0x5b3300[_0xa57c('0x2e')][_0xa57c('0x32')]));_0x588199['attributes']=_0x588199[_0xa57c('0x31')][_0xa57c('0x33')]?_0x588199[_0xa57c('0x31')]:_0x39b20f[_0xa57c('0x2c')];if(_0x5b3300[_0xa57c('0x2e')]['includeAll']){_0x588199[_0xa57c('0x3c')]=[{'all':!![]}];}_0x588199=_[_0xa57c('0x39')]({},_0x588199,_0x5b3300[_0xa57c('0x3a')]);return db[_0xa57c('0x2a')][_0xa57c('0x3f')](_0x588199)[_0xa57c('0x21')](handleEntityNotFound(_0x520383,null))['then'](respondWithResult(_0x520383,null))[_0xa57c('0x40')](handleError(_0x520383,null));};exports[_0xa57c('0x41')]=function(_0x247906,_0x44ea0a){return db[_0xa57c('0x2a')][_0xa57c('0x41')](_0x247906['body'],{})['then'](respondWithResult(_0x44ea0a,0xc9))['catch'](handleError(_0x44ea0a,null));};exports['update']=function(_0x232675,_0x49492f){if(_0x232675[_0xa57c('0x42')]['id']){delete _0x232675[_0xa57c('0x42')]['id'];}return db['Integration'][_0xa57c('0x3f')]({'where':{'id':_0x232675[_0xa57c('0x3e')]['id']}})[_0xa57c('0x21')](handleEntityNotFound(_0x49492f,null))[_0xa57c('0x21')](saveUpdates(_0x232675[_0xa57c('0x42')],null))['then'](respondWithResult(_0x49492f,null))[_0xa57c('0x40')](handleError(_0x49492f,null));};exports[_0xa57c('0x22')]=function(_0x4584e8,_0xd57bac){return db[_0xa57c('0x2a')]['find']({'where':{'id':_0x4584e8[_0xa57c('0x3e')]['id']}})['then'](handleEntityNotFound(_0xd57bac,null))['then'](removeEntity(_0xd57bac,null))[_0xa57c('0x40')](handleError(_0xd57bac,null));};
\ No newline at end of file
index b50dac9..21ab496 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x040f=['./integration.attributes','exports','define','Integration','integrations','util','../../config/logger','moment','request-promise','path','rimraf'];(function(_0x1e1b5d,_0x42e906){var _0xed683d=function(_0x5c04cb){while(--_0x5c04cb){_0x1e1b5d['push'](_0x1e1b5d['shift']());}};_0xed683d(++_0x42e906);}(_0x040f,0x9f));var _0xf040=function(_0x3e9b51,_0x146374){_0x3e9b51=_0x3e9b51-0x0;var _0x333349=_0x040f[_0x3e9b51];return _0x333349;};'use strict';var _=require('lodash');var util=require(_0xf040('0x0'));var logger=require(_0xf040('0x1'))('api');var moment=require(_0xf040('0x2'));var BPromise=require('bluebird');var rp=require(_0xf040('0x3'));var fs=require('fs');var path=require(_0xf040('0x4'));var rimraf=require(_0xf040('0x5'));var config=require('../../config/environment');var attributes=require(_0xf040('0x6'));module[_0xf040('0x7')]=function(_0x59ce30,_0x17fc66){return _0x59ce30[_0xf040('0x8')](_0xf040('0x9'),attributes,{'tableName':_0xf040('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x0bcd=['exports','define','Integration','integrations','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./integration.attributes'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x0bcd,0x1ee));var _0xd0bc=function(_0x1ad9a6,_0x6cb54c){_0x1ad9a6=_0x1ad9a6-0x0;var _0x4dffdb=_0x0bcd[_0x1ad9a6];return _0x4dffdb;};'use strict';var _=require(_0xd0bc('0x0'));var util=require(_0xd0bc('0x1'));var logger=require(_0xd0bc('0x2'))(_0xd0bc('0x3'));var moment=require(_0xd0bc('0x4'));var BPromise=require(_0xd0bc('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xd0bc('0x6'));var rimraf=require(_0xd0bc('0x7'));var config=require(_0xd0bc('0x8'));var attributes=require(_0xd0bc('0x9'));module[_0xd0bc('0xa')]=function(_0xa371e2,_0x4a5e6d){return _0xa371e2[_0xd0bc('0xb')](_0xd0bc('0xc'),attributes,{'tableName':_0xd0bc('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 8b06446..e70a4d6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a54=['info','Integration,\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(_0x18ea3e,_0x208ce4){_0x18ea3e=_0x18ea3e-0x0;var _0x383c18=_0x7a54[_0x18ea3e];return _0x383c18;};'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')]('Integration,\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 _0x0b0e=['Integration,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent','result','catch','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Integration,\x20%s,\x20%s','debug'];(function(_0x512f81,_0x4a7986){var _0xa15099=function(_0x1f7371){while(--_0x1f7371){_0x512f81['push'](_0x512f81['shift']());}};_0xa15099(++_0x4a7986);}(_0x0b0e,0x187));var _0xe0b0=function(_0x308a1d,_0x3d379d){_0x308a1d=_0x308a1d-0x0;var _0x5eb875=_0x0b0e[_0x308a1d];return _0x5eb875;};'use strict';var _=require(_0xe0b0('0x0'));var util=require('util');var moment=require(_0xe0b0('0x1'));var BPromise=require('bluebird');var rs=require(_0xe0b0('0x2'));var fs=require('fs');var Redis=require(_0xe0b0('0x3'));var db=require(_0xe0b0('0x4'))['db'];var utils=require(_0xe0b0('0x5'));var logger=require(_0xe0b0('0x6'))(_0xe0b0('0x7'));var config=require(_0xe0b0('0x8'));var jayson=require(_0xe0b0('0x9'));var client=jayson[_0xe0b0('0xa')][_0xe0b0('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x219b1c,_0x5cf9cc,_0x50be7f){return new BPromise(function(_0x11effc,_0x435060){return client[_0xe0b0('0xc')](_0x219b1c,_0x50be7f)[_0xe0b0('0xd')](function(_0x4c24f9){logger[_0xe0b0('0xe')](_0xe0b0('0xf'),_0x5cf9cc,'request\x20sent');logger[_0xe0b0('0x10')](_0xe0b0('0x11'),_0x5cf9cc,'request\x20sent',JSON[_0xe0b0('0x12')](_0x4c24f9));if(_0x4c24f9[_0xe0b0('0x13')]){if(_0x4c24f9[_0xe0b0('0x13')]['code']===0x1f4){logger[_0xe0b0('0x13')](_0xe0b0('0xf'),_0x5cf9cc,_0x4c24f9[_0xe0b0('0x13')][_0xe0b0('0x14')]);return _0x435060(_0x4c24f9[_0xe0b0('0x13')]['message']);}logger[_0xe0b0('0x13')](_0xe0b0('0xf'),_0x5cf9cc,_0x4c24f9[_0xe0b0('0x13')][_0xe0b0('0x14')]);return _0x11effc(_0x4c24f9[_0xe0b0('0x13')]['message']);}else{logger[_0xe0b0('0xe')]('Integration,\x20%s,\x20%s',_0x5cf9cc,_0xe0b0('0x15'));_0x11effc(_0x4c24f9[_0xe0b0('0x16')]['message']);}})[_0xe0b0('0x17')](function(_0x4a4cc0){logger[_0xe0b0('0x13')](_0xe0b0('0xf'),_0x5cf9cc,_0x4a4cc0);_0x435060(_0x4a4cc0);});});}
\ No newline at end of file
index f235981..4d6565b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0295=['isAuthenticated','index','post','create','put','/:id','update','delete','destroy','exports','multer','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./integrationReport.controller','get'];(function(_0x19b3f9,_0xade753){var _0x18c3f6=function(_0x21439f){while(--_0x21439f){_0x19b3f9['push'](_0x19b3f9['shift']());}};_0x18c3f6(++_0xade753);}(_0x0295,0x1f0));var _0x5029=function(_0x2967c1,_0x202a72){_0x2967c1=_0x2967c1-0x0;var _0x103397=_0x0295[_0x2967c1];return _0x103397;};'use strict';var multer=require(_0x5029('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x5029('0x1'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x5029('0x2'));var auth=require(_0x5029('0x3'));var interaction=require(_0x5029('0x4'));var config=require(_0x5029('0x5'));var controller=require(_0x5029('0x6'));router[_0x5029('0x7')]('/',auth[_0x5029('0x8')](),controller[_0x5029('0x9')]);router[_0x5029('0x7')]('/describe',auth['isAuthenticated'](),controller['describe']);router[_0x5029('0x7')]('/:id',auth[_0x5029('0x8')](),controller['show']);router[_0x5029('0xa')]('/',auth['isAuthenticated'](),controller[_0x5029('0xb')]);router[_0x5029('0xc')](_0x5029('0xd'),auth['isAuthenticated'](),controller[_0x5029('0xe')]);router[_0x5029('0xf')](_0x5029('0xd'),auth['isAuthenticated'](),controller[_0x5029('0x10')]);module[_0x5029('0x11')]=router;
\ No newline at end of file
+var _0x187d=['/:id','show','post','create','put','update','delete','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./integrationReport.controller','isAuthenticated','index','get','/describe','describe'];(function(_0x5aaadb,_0xeeab51){var _0x379c74=function(_0x10319a){while(--_0x10319a){_0x5aaadb['push'](_0x5aaadb['shift']());}};_0x379c74(++_0xeeab51);}(_0x187d,0x93));var _0xd187=function(_0x1cfa0d,_0x4391f2){_0x1cfa0d=_0x1cfa0d-0x0;var _0xe33279=_0x187d[_0x1cfa0d];return _0xe33279;};'use strict';var multer=require(_0xd187('0x0'));var util=require('util');var path=require(_0xd187('0x1'));var timeout=require(_0xd187('0x2'));var express=require(_0xd187('0x3'));var router=express[_0xd187('0x4')]();var fs_extra=require(_0xd187('0x5'));var auth=require(_0xd187('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xd187('0x7'));var controller=require(_0xd187('0x8'));router['get']('/',auth[_0xd187('0x9')](),controller[_0xd187('0xa')]);router[_0xd187('0xb')](_0xd187('0xc'),auth[_0xd187('0x9')](),controller[_0xd187('0xd')]);router[_0xd187('0xb')](_0xd187('0xe'),auth['isAuthenticated'](),controller[_0xd187('0xf')]);router[_0xd187('0x10')]('/',auth[_0xd187('0x9')](),controller[_0xd187('0x11')]);router[_0xd187('0x12')](_0xd187('0xe'),auth['isAuthenticated'](),controller[_0xd187('0x13')]);router[_0xd187('0x14')](_0xd187('0xe'),auth['isAuthenticated'](),controller[_0xd187('0x15')]);module[_0xd187('0x16')]=router;
\ No newline at end of file
index ee2fe43..b1b625e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcc1e=['exports','STRING','INTEGER','DATE','BOOLEAN','TEXT','ENUM','SENT','RECEIVED','sequelize'];(function(_0x24f326,_0x616a7){var _0x488e2d=function(_0x293d9a){while(--_0x293d9a){_0x24f326['push'](_0x24f326['shift']());}};_0x488e2d(++_0x616a7);}(_0xcc1e,0x1a3));var _0xecc1=function(_0x21aeed,_0x387040){_0x21aeed=_0x21aeed-0x0;var _0x12bad5=_0xcc1e[_0x21aeed];return _0x12bad5;};'use strict';var Sequelize=require(_0xecc1('0x0'));module[_0xecc1('0x1')]={'integration':{'type':Sequelize[_0xecc1('0x2')]},'eventChannel':{'type':Sequelize[_0xecc1('0x2')]},'exitStatus':{'type':Sequelize[_0xecc1('0x2')]},'ticketId':{'type':Sequelize[_0xecc1('0x2')]},'integrationId':{'type':Sequelize[_0xecc1('0x3')]},'contacts':{'type':Sequelize[_0xecc1('0x2')]},'uniqueid':{'type':Sequelize[_0xecc1('0x2')]},'calleridnum':{'type':Sequelize[_0xecc1('0x2')]},'calleridname':{'type':Sequelize[_0xecc1('0x2')]},'queue':{'type':Sequelize['STRING']},'interface':{'type':Sequelize['STRING']},'membername':{'type':Sequelize[_0xecc1('0x2')]},'agentcalledAt':{'type':Sequelize[_0xecc1('0x4')]},'agentconnectAt':{'type':Sequelize['DATE']},'holdtime':{'type':Sequelize['INTEGER']},'agentcomplete':{'type':Sequelize[_0xecc1('0x5')],'defaultValue':![]},'agentcompleteAt':{'type':Sequelize['DATE']},'talktime':{'type':Sequelize[_0xecc1('0x3')]},'agentacw':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'acwtime':{'type':Sequelize[_0xecc1('0x3')]},'reason':{'type':Sequelize[_0xecc1('0x2')]},'agentringnoanswer':{'type':Sequelize[_0xecc1('0x5')],'defaultValue':![]},'agentringnoanswerAt':{'type':Sequelize['DATE']},'agentdump':{'type':Sequelize[_0xecc1('0x5')],'defaultValue':![]},'agentdumpAt':{'type':Sequelize[_0xecc1('0x4')]},'lastevent':{'type':Sequelize[_0xecc1('0x2')]},'channel':{'type':Sequelize['STRING']},'channelstate':{'type':Sequelize[_0xecc1('0x3')]},'channelstatedesc':{'type':Sequelize[_0xecc1('0x2')]},'connectedlinenum':{'type':Sequelize[_0xecc1('0x2')]},'connectedlinename':{'type':Sequelize[_0xecc1('0x2')]},'language':{'type':Sequelize[_0xecc1('0x2')]},'accountcode':{'type':Sequelize[_0xecc1('0x2')]},'context':{'type':Sequelize[_0xecc1('0x2')]},'exten':{'type':Sequelize['STRING']},'priority':{'type':Sequelize[_0xecc1('0x2')]},'destchannel':{'type':Sequelize[_0xecc1('0x2')]},'destchannelstate':{'type':Sequelize['INTEGER']},'destchannelstatedesc':{'type':Sequelize[_0xecc1('0x2')]},'destcalleridnum':{'type':Sequelize[_0xecc1('0x2')]},'destcalleridname':{'type':Sequelize['STRING']},'destconnectedlinenum':{'type':Sequelize['STRING']},'destconnectedlinename':{'type':Sequelize[_0xecc1('0x2')]},'destlanguage':{'type':Sequelize[_0xecc1('0x2')]},'destaccountcode':{'type':Sequelize['STRING']},'destcontext':{'type':Sequelize[_0xecc1('0x2')]},'destexten':{'type':Sequelize['STRING']},'destpriority':{'type':Sequelize['STRING']},'destuniqueid':{'type':Sequelize[_0xecc1('0x2')]},'messageId':{'type':Sequelize[_0xecc1('0x2')]},'inReplyTo':{'type':Sequelize[_0xecc1('0x2')]},'subject':{'type':Sequelize['STRING']},'from':{'type':Sequelize[_0xecc1('0x2')]},'to':{'type':Sequelize[_0xecc1('0x2')]},'cc':{'type':Sequelize[_0xecc1('0x2')]},'attachment':{'type':Sequelize['TEXT']},'html':{'type':Sequelize[_0xecc1('0x6')]},'text':{'type':Sequelize[_0xecc1('0x6')]},'status':{'type':Sequelize[_0xecc1('0x7')](_0xecc1('0x8'),'SENDING',_0xecc1('0x9'),'FAILED')},'url':{'type':Sequelize[_0xecc1('0x2')]},'app':{'type':Sequelize[_0xecc1('0x2')]},'appdata':{'type':Sequelize[_0xecc1('0x2')]},'projectId':{'type':Sequelize[_0xecc1('0x3')]}};
\ No newline at end of file
+var _0xd324=['TEXT','ENUM','sequelize','exports','STRING','INTEGER','DATE','BOOLEAN'];(function(_0x28d1dc,_0x450cd8){var _0x357ee1=function(_0x45001b){while(--_0x45001b){_0x28d1dc['push'](_0x28d1dc['shift']());}};_0x357ee1(++_0x450cd8);}(_0xd324,0x172));var _0x4d32=function(_0x3efe87,_0x35ad48){_0x3efe87=_0x3efe87-0x0;var _0x56a4cc=_0xd324[_0x3efe87];return _0x56a4cc;};'use strict';var Sequelize=require(_0x4d32('0x0'));module[_0x4d32('0x1')]={'integration':{'type':Sequelize[_0x4d32('0x2')]},'eventChannel':{'type':Sequelize[_0x4d32('0x2')]},'exitStatus':{'type':Sequelize[_0x4d32('0x2')]},'ticketId':{'type':Sequelize[_0x4d32('0x2')]},'integrationId':{'type':Sequelize[_0x4d32('0x3')]},'contacts':{'type':Sequelize[_0x4d32('0x2')]},'uniqueid':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize[_0x4d32('0x2')]},'calleridname':{'type':Sequelize[_0x4d32('0x2')]},'queue':{'type':Sequelize[_0x4d32('0x2')]},'interface':{'type':Sequelize[_0x4d32('0x2')]},'membername':{'type':Sequelize[_0x4d32('0x2')]},'agentcalledAt':{'type':Sequelize['DATE']},'agentconnectAt':{'type':Sequelize[_0x4d32('0x4')]},'holdtime':{'type':Sequelize[_0x4d32('0x3')]},'agentcomplete':{'type':Sequelize[_0x4d32('0x5')],'defaultValue':![]},'agentcompleteAt':{'type':Sequelize[_0x4d32('0x4')]},'talktime':{'type':Sequelize[_0x4d32('0x3')]},'agentacw':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'acwtime':{'type':Sequelize[_0x4d32('0x3')]},'reason':{'type':Sequelize[_0x4d32('0x2')]},'agentringnoanswer':{'type':Sequelize[_0x4d32('0x5')],'defaultValue':![]},'agentringnoanswerAt':{'type':Sequelize[_0x4d32('0x4')]},'agentdump':{'type':Sequelize[_0x4d32('0x5')],'defaultValue':![]},'agentdumpAt':{'type':Sequelize[_0x4d32('0x4')]},'lastevent':{'type':Sequelize[_0x4d32('0x2')]},'channel':{'type':Sequelize[_0x4d32('0x2')]},'channelstate':{'type':Sequelize[_0x4d32('0x3')]},'channelstatedesc':{'type':Sequelize[_0x4d32('0x2')]},'connectedlinenum':{'type':Sequelize[_0x4d32('0x2')]},'connectedlinename':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0x4d32('0x2')]},'accountcode':{'type':Sequelize[_0x4d32('0x2')]},'context':{'type':Sequelize['STRING']},'exten':{'type':Sequelize[_0x4d32('0x2')]},'priority':{'type':Sequelize[_0x4d32('0x2')]},'destchannel':{'type':Sequelize[_0x4d32('0x2')]},'destchannelstate':{'type':Sequelize[_0x4d32('0x3')]},'destchannelstatedesc':{'type':Sequelize['STRING']},'destcalleridnum':{'type':Sequelize[_0x4d32('0x2')]},'destcalleridname':{'type':Sequelize['STRING']},'destconnectedlinenum':{'type':Sequelize[_0x4d32('0x2')]},'destconnectedlinename':{'type':Sequelize[_0x4d32('0x2')]},'destlanguage':{'type':Sequelize[_0x4d32('0x2')]},'destaccountcode':{'type':Sequelize[_0x4d32('0x2')]},'destcontext':{'type':Sequelize['STRING']},'destexten':{'type':Sequelize[_0x4d32('0x2')]},'destpriority':{'type':Sequelize['STRING']},'destuniqueid':{'type':Sequelize['STRING']},'messageId':{'type':Sequelize['STRING']},'inReplyTo':{'type':Sequelize['STRING']},'subject':{'type':Sequelize[_0x4d32('0x2')]},'from':{'type':Sequelize[_0x4d32('0x2')]},'to':{'type':Sequelize[_0x4d32('0x2')]},'cc':{'type':Sequelize['STRING']},'attachment':{'type':Sequelize[_0x4d32('0x6')]},'html':{'type':Sequelize['TEXT']},'text':{'type':Sequelize[_0x4d32('0x6')]},'status':{'type':Sequelize[_0x4d32('0x7')]('SENT','SENDING','RECEIVED','FAILED')},'url':{'type':Sequelize[_0x4d32('0x2')]},'app':{'type':Sequelize['STRING']},'appdata':{'type':Sequelize[_0x4d32('0x2')]},'projectId':{'type':Sequelize[_0x4d32('0x3')]}};
\ No newline at end of file
index 4f88e82..91602e4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8aa2=['catch','show','params','fields','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','offset','limit','undefined','count','Content-Range','json','apply','reject','save','update','then','error','stack','name','send','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','attributes','nolimit','order','sort','where','filter','merge','VIRTUAL','options','IntegrationReport','includeAll','include'];(function(_0x515ff0,_0x44a0b1){var _0x132616=function(_0x449772){while(--_0x449772){_0x515ff0['push'](_0x515ff0['shift']());}};_0x132616(++_0x44a0b1);}(_0x8aa2,0x1c4));var _0x28aa=function(_0x58918b,_0x123a6d){_0x58918b=_0x58918b-0x0;var _0x10ffe8=_0x8aa2[_0x58918b];return _0x10ffe8;};'use strict';var emlformat=require(_0x28aa('0x0'));var rimraf=require(_0x28aa('0x1'));var zipdir=require(_0x28aa('0x2'));var jsonpatch=require(_0x28aa('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x28aa('0x4'));var Mustache=require(_0x28aa('0x5'));var util=require(_0x28aa('0x6'));var path=require(_0x28aa('0x7'));var sox=require(_0x28aa('0x8'));var csv=require(_0x28aa('0x9'));var ejs=require(_0x28aa('0xa'));var fs=require('fs');var fs_extra=require(_0x28aa('0xb'));var _=require(_0x28aa('0xc'));var squel=require(_0x28aa('0xd'));var crypto=require(_0x28aa('0xe'));var jsforce=require(_0x28aa('0xf'));var deskjs=require('desk.js');var toCsv=require(_0x28aa('0x9'));var querystring=require(_0x28aa('0x10'));var Papa=require(_0x28aa('0x11'));var Redis=require(_0x28aa('0x12'));var authService=require(_0x28aa('0x13'));var qs=require(_0x28aa('0x14'));var as=require(_0x28aa('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x28aa('0x16'))(_0x28aa('0x17'));var utils=require(_0x28aa('0x18'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x28aa('0x19'))['db'];function respondWithStatusCode(_0x3dc168,_0x17a89b){_0x17a89b=_0x17a89b||0xcc;return function(_0x2a5779){if(_0x2a5779){return _0x3dc168[_0x28aa('0x1a')](_0x17a89b);}return _0x3dc168[_0x28aa('0x1b')](_0x17a89b)[_0x28aa('0x1c')]();};}function respondWithResult(_0x39e034,_0x57df2c){_0x57df2c=_0x57df2c||0xc8;return function(_0x4a4700){if(_0x4a4700){return _0x39e034[_0x28aa('0x1b')](_0x57df2c)['json'](_0x4a4700);}};}function respondWithFilteredResult(_0x315e2c,_0x369e4d){return function(_0x580b30){if(_0x580b30){var _0x305c94=typeof _0x369e4d[_0x28aa('0x1d')]==='undefined'&&typeof _0x369e4d[_0x28aa('0x1e')]===_0x28aa('0x1f');var _0x6cd81d=_0x580b30['count'];var _0x188bf1=_0x305c94?0x0:_0x369e4d[_0x28aa('0x1d')];var _0x88432b=_0x305c94?_0x580b30[_0x28aa('0x20')]:_0x369e4d[_0x28aa('0x1d')]+_0x369e4d['limit'];var _0x57f9b2;if(_0x88432b>=_0x6cd81d){_0x88432b=_0x6cd81d;_0x57f9b2=0xc8;}else{_0x57f9b2=0xce;}_0x315e2c[_0x28aa('0x1b')](_0x57f9b2);return _0x315e2c['set'](_0x28aa('0x21'),_0x188bf1+'-'+_0x88432b+'/'+_0x6cd81d)[_0x28aa('0x22')](_0x580b30);}return null;};}function patchUpdates(_0x284d1a){return function(_0x68fa72){try{jsonpatch[_0x28aa('0x23')](_0x68fa72,_0x284d1a,!![]);}catch(_0x44362b){return BPromise[_0x28aa('0x24')](_0x44362b);}return _0x68fa72[_0x28aa('0x25')]();};}function saveUpdates(_0x4e9417,_0x236a3e){return function(_0x1097c6){if(_0x1097c6){return _0x1097c6[_0x28aa('0x26')](_0x4e9417)[_0x28aa('0x27')](function(_0x4bd967){return _0x4bd967;});}return null;};}function removeEntity(_0xd897d4,_0x17184d){return function(_0x35750c){if(_0x35750c){return _0x35750c['destroy']()[_0x28aa('0x27')](function(){_0xd897d4['status'](0xcc)[_0x28aa('0x1c')]();});}};}function handleEntityNotFound(_0x4b38ce,_0x3bd4e3){return function(_0x506e72){if(!_0x506e72){_0x4b38ce['sendStatus'](0x194);}return _0x506e72;};}function handleError(_0x3c6e8a,_0x4e68d6){_0x4e68d6=_0x4e68d6||0x1f4;return function(_0x14443a){logger[_0x28aa('0x28')](_0x14443a[_0x28aa('0x29')]);if(_0x14443a[_0x28aa('0x2a')]){delete _0x14443a[_0x28aa('0x2a')];}_0x3c6e8a[_0x28aa('0x1b')](_0x4e68d6)[_0x28aa('0x2b')](_0x14443a);};}exports['index']=function(_0x10066b,_0x3a5a1f){var _0xe54aec={},_0x85dbc3={},_0x582c0c={'count':0x0,'rows':[]};var _0x6e28f5=_['map'](db['IntegrationReport'][_0x28aa('0x2c')],function(_0x34988d){return{'name':_0x34988d[_0x28aa('0x2d')],'type':_0x34988d[_0x28aa('0x2e')][_0x28aa('0x2f')]};});_0x85dbc3[_0x28aa('0x30')]=_[_0x28aa('0x31')](_0x6e28f5,'name');_0x85dbc3[_0x28aa('0x32')]=_[_0x28aa('0x33')](_0x10066b['query']);_0x85dbc3[_0x28aa('0x34')]=_[_0x28aa('0x35')](_0x85dbc3['model'],_0x85dbc3[_0x28aa('0x32')]);_0xe54aec['attributes']=_[_0x28aa('0x35')](_0x85dbc3[_0x28aa('0x30')],qs['fields'](_0x10066b[_0x28aa('0x32')]['fields']));_0xe54aec[_0x28aa('0x36')]=_0xe54aec[_0x28aa('0x36')]['length']?_0xe54aec['attributes']:_0x85dbc3['model'];if(!_0x10066b[_0x28aa('0x32')]['hasOwnProperty'](_0x28aa('0x37'))){_0xe54aec[_0x28aa('0x1e')]=qs['limit'](_0x10066b[_0x28aa('0x32')][_0x28aa('0x1e')]);_0xe54aec[_0x28aa('0x1d')]=qs['offset'](_0x10066b['query'][_0x28aa('0x1d')]);}_0xe54aec[_0x28aa('0x38')]=qs['sort'](_0x10066b[_0x28aa('0x32')][_0x28aa('0x39')]);_0xe54aec[_0x28aa('0x3a')]=qs[_0x28aa('0x34')](_['pick'](_0x10066b['query'],_0x85dbc3[_0x28aa('0x34')]),_0x6e28f5);if(_0x10066b[_0x28aa('0x32')][_0x28aa('0x3b')]){_0xe54aec['where']=_[_0x28aa('0x3c')](_0xe54aec[_0x28aa('0x3a')],{'$or':_[_0x28aa('0x31')](_0x6e28f5,function(_0x4fcb92){if(_0x4fcb92[_0x28aa('0x2e')]!==_0x28aa('0x3d')){var _0x2c33b5={};_0x2c33b5[_0x4fcb92[_0x28aa('0x2a')]]={'$like':'%'+_0x10066b['query'][_0x28aa('0x3b')]+'%'};return _0x2c33b5;}})});}_0xe54aec=_[_0x28aa('0x3c')]({},_0xe54aec,_0x10066b[_0x28aa('0x3e')]);var _0x13c6c3={'where':_0xe54aec[_0x28aa('0x3a')]};return db[_0x28aa('0x3f')]['count'](_0x13c6c3)[_0x28aa('0x27')](function(_0x82987f){_0x582c0c[_0x28aa('0x20')]=_0x82987f;if(_0x10066b[_0x28aa('0x32')][_0x28aa('0x40')]){_0xe54aec[_0x28aa('0x41')]=[{'all':!![]}];}return db[_0x28aa('0x3f')]['findAll'](_0xe54aec);})[_0x28aa('0x27')](function(_0x1ddb34){_0x582c0c['rows']=_0x1ddb34;return _0x582c0c;})[_0x28aa('0x27')](respondWithFilteredResult(_0x3a5a1f,_0xe54aec))[_0x28aa('0x42')](handleError(_0x3a5a1f,null));};exports[_0x28aa('0x43')]=function(_0xd60630,_0x5e7ce7){var _0x4044f0={'raw':![],'where':{'id':_0xd60630[_0x28aa('0x44')]['id']}},_0x346293={};_0x346293['model']=_[_0x28aa('0x33')](db['IntegrationReport'][_0x28aa('0x2c')]);_0x346293[_0x28aa('0x32')]=_[_0x28aa('0x33')](_0xd60630[_0x28aa('0x32')]);_0x346293['filters']=_[_0x28aa('0x35')](_0x346293[_0x28aa('0x30')],_0x346293[_0x28aa('0x32')]);_0x4044f0[_0x28aa('0x36')]=_[_0x28aa('0x35')](_0x346293[_0x28aa('0x30')],qs[_0x28aa('0x45')](_0xd60630[_0x28aa('0x32')]['fields']));_0x4044f0[_0x28aa('0x36')]=_0x4044f0[_0x28aa('0x36')]['length']?_0x4044f0['attributes']:_0x346293[_0x28aa('0x30')];if(_0xd60630['query']['includeAll']){_0x4044f0[_0x28aa('0x41')]=[{'all':!![]}];}_0x4044f0=_['merge']({},_0x4044f0,_0xd60630[_0x28aa('0x3e')]);return db['IntegrationReport'][_0x28aa('0x46')](_0x4044f0)[_0x28aa('0x27')](handleEntityNotFound(_0x5e7ce7,null))['then'](respondWithResult(_0x5e7ce7,null))['catch'](handleError(_0x5e7ce7,null));};exports[_0x28aa('0x47')]=function(_0x518752,_0x482041){return db[_0x28aa('0x3f')][_0x28aa('0x47')](_0x518752[_0x28aa('0x48')],{})[_0x28aa('0x27')](respondWithResult(_0x482041,0xc9))['catch'](handleError(_0x482041,null));};exports['update']=function(_0x58289d,_0x5a7ab9){if(_0x58289d[_0x28aa('0x48')]['id']){delete _0x58289d[_0x28aa('0x48')]['id'];}return db['IntegrationReport'][_0x28aa('0x46')]({'where':{'id':_0x58289d[_0x28aa('0x44')]['id']}})[_0x28aa('0x27')](handleEntityNotFound(_0x5a7ab9,null))[_0x28aa('0x27')](saveUpdates(_0x58289d['body'],null))['then'](respondWithResult(_0x5a7ab9,null))[_0x28aa('0x42')](handleError(_0x5a7ab9,null));};exports['destroy']=function(_0x1da1d0,_0x180392){return db[_0x28aa('0x3f')][_0x28aa('0x46')]({'where':{'id':_0x1da1d0[_0x28aa('0x44')]['id']}})[_0x28aa('0x27')](handleEntityNotFound(_0x180392,null))[_0x28aa('0x27')](removeEntity(_0x180392,null))['catch'](handleError(_0x180392,null));};exports[_0x28aa('0x49')]=function(_0x441d13,_0x55d5af){return db[_0x28aa('0x3f')][_0x28aa('0x49')]()['then'](respondWithResult(_0x55d5af,null))[_0x28aa('0x42')](handleError(_0x55d5af,null));};
\ No newline at end of file
+var _0x70cf=['where','merge','VIRTUAL','includeAll','include','rows','catch','params','intersection','options','find','create','update','body','describe','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','jsforce','querystring','ioredis','../../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','count','limit','set','Content-Range','apply','reject','save','then','sendStatus','name','IntegrationReport','rawAttributes','fieldName','type','key','model','map','keys','query','filters','attributes','fields','nolimit','order','sort','pick','filter'];(function(_0x2e0d05,_0x268558){var _0x5480f8=function(_0x3517b6){while(--_0x3517b6){_0x2e0d05['push'](_0x2e0d05['shift']());}};_0x5480f8(++_0x268558);}(_0x70cf,0xea));var _0xf70c=function(_0x2070da,_0x45e586){_0x2070da=_0x2070da-0x0;var _0x4f9fe1=_0x70cf[_0x2070da];return _0x4f9fe1;};'use strict';var emlformat=require(_0xf70c('0x0'));var rimraf=require(_0xf70c('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xf70c('0x2'));var rp=require(_0xf70c('0x3'));var moment=require(_0xf70c('0x4'));var BPromise=require(_0xf70c('0x5'));var Mustache=require(_0xf70c('0x6'));var util=require(_0xf70c('0x7'));var path=require(_0xf70c('0x8'));var sox=require(_0xf70c('0x9'));var csv=require(_0xf70c('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xf70c('0xb'));var _=require(_0xf70c('0xc'));var squel=require(_0xf70c('0xd'));var crypto=require('crypto');var jsforce=require(_0xf70c('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xf70c('0xa'));var querystring=require(_0xf70c('0xf'));var Papa=require('papaparse');var Redis=require(_0xf70c('0x10'));var authService=require(_0xf70c('0x11'));var qs=require(_0xf70c('0x12'));var as=require(_0xf70c('0x13'));var hardwareService=require(_0xf70c('0x14'));var logger=require(_0xf70c('0x15'))('api');var utils=require(_0xf70c('0x16'));var config=require(_0xf70c('0x17'));var licenseUtil=require(_0xf70c('0x18'));var db=require(_0xf70c('0x19'))['db'];function respondWithStatusCode(_0x46a684,_0x2b1c21){_0x2b1c21=_0x2b1c21||0xcc;return function(_0x5cc0f6){if(_0x5cc0f6){return _0x46a684['sendStatus'](_0x2b1c21);}return _0x46a684[_0xf70c('0x1a')](_0x2b1c21)[_0xf70c('0x1b')]();};}function respondWithResult(_0x348699,_0x44214e){_0x44214e=_0x44214e||0xc8;return function(_0x31067d){if(_0x31067d){return _0x348699['status'](_0x44214e)[_0xf70c('0x1c')](_0x31067d);}};}function respondWithFilteredResult(_0x238712,_0x2b0350){return function(_0x35fe2e){if(_0x35fe2e){var _0x4a07cc=typeof _0x2b0350[_0xf70c('0x1d')]===_0xf70c('0x1e')&&typeof _0x2b0350['limit']==='undefined';var _0x5d8dd9=_0x35fe2e[_0xf70c('0x1f')];var _0x4469c6=_0x4a07cc?0x0:_0x2b0350['offset'];var _0x4fb151=_0x4a07cc?_0x35fe2e[_0xf70c('0x1f')]:_0x2b0350[_0xf70c('0x1d')]+_0x2b0350[_0xf70c('0x20')];var _0x2d9726;if(_0x4fb151>=_0x5d8dd9){_0x4fb151=_0x5d8dd9;_0x2d9726=0xc8;}else{_0x2d9726=0xce;}_0x238712[_0xf70c('0x1a')](_0x2d9726);return _0x238712[_0xf70c('0x21')](_0xf70c('0x22'),_0x4469c6+'-'+_0x4fb151+'/'+_0x5d8dd9)[_0xf70c('0x1c')](_0x35fe2e);}return null;};}function patchUpdates(_0x1cbd9a){return function(_0x11c629){try{jsonpatch[_0xf70c('0x23')](_0x11c629,_0x1cbd9a,!![]);}catch(_0x5e5165){return BPromise[_0xf70c('0x24')](_0x5e5165);}return _0x11c629[_0xf70c('0x25')]();};}function saveUpdates(_0x58daa3,_0x5cb6f2){return function(_0x8ee679){if(_0x8ee679){return _0x8ee679['update'](_0x58daa3)[_0xf70c('0x26')](function(_0x4a9696){return _0x4a9696;});}return null;};}function removeEntity(_0x35a378,_0x4c3ce6){return function(_0x3de36b){if(_0x3de36b){return _0x3de36b['destroy']()[_0xf70c('0x26')](function(){_0x35a378[_0xf70c('0x1a')](0xcc)[_0xf70c('0x1b')]();});}};}function handleEntityNotFound(_0x32a1fb,_0x2c17d0){return function(_0x249b0b){if(!_0x249b0b){_0x32a1fb[_0xf70c('0x27')](0x194);}return _0x249b0b;};}function handleError(_0x11d6b2,_0x3eb71f){_0x3eb71f=_0x3eb71f||0x1f4;return function(_0x2b6e43){logger['error'](_0x2b6e43['stack']);if(_0x2b6e43[_0xf70c('0x28')]){delete _0x2b6e43['name'];}_0x11d6b2[_0xf70c('0x1a')](_0x3eb71f)['send'](_0x2b6e43);};}exports['index']=function(_0x55af5b,_0x33cd4a){var _0x3503bd={},_0x360521={},_0x40e42f={'count':0x0,'rows':[]};var _0x290ea5=_['map'](db[_0xf70c('0x29')][_0xf70c('0x2a')],function(_0x2afc6c){return{'name':_0x2afc6c[_0xf70c('0x2b')],'type':_0x2afc6c[_0xf70c('0x2c')][_0xf70c('0x2d')]};});_0x360521[_0xf70c('0x2e')]=_[_0xf70c('0x2f')](_0x290ea5,_0xf70c('0x28'));_0x360521['query']=_[_0xf70c('0x30')](_0x55af5b[_0xf70c('0x31')]);_0x360521[_0xf70c('0x32')]=_['intersection'](_0x360521[_0xf70c('0x2e')],_0x360521['query']);_0x3503bd[_0xf70c('0x33')]=_['intersection'](_0x360521[_0xf70c('0x2e')],qs[_0xf70c('0x34')](_0x55af5b[_0xf70c('0x31')][_0xf70c('0x34')]));_0x3503bd[_0xf70c('0x33')]=_0x3503bd[_0xf70c('0x33')]['length']?_0x3503bd['attributes']:_0x360521[_0xf70c('0x2e')];if(!_0x55af5b['query']['hasOwnProperty'](_0xf70c('0x35'))){_0x3503bd[_0xf70c('0x20')]=qs['limit'](_0x55af5b[_0xf70c('0x31')][_0xf70c('0x20')]);_0x3503bd[_0xf70c('0x1d')]=qs[_0xf70c('0x1d')](_0x55af5b['query'][_0xf70c('0x1d')]);}_0x3503bd[_0xf70c('0x36')]=qs[_0xf70c('0x37')](_0x55af5b['query']['sort']);_0x3503bd['where']=qs['filters'](_[_0xf70c('0x38')](_0x55af5b[_0xf70c('0x31')],_0x360521['filters']),_0x290ea5);if(_0x55af5b['query'][_0xf70c('0x39')]){_0x3503bd[_0xf70c('0x3a')]=_[_0xf70c('0x3b')](_0x3503bd['where'],{'$or':_[_0xf70c('0x2f')](_0x290ea5,function(_0x199c02){if(_0x199c02[_0xf70c('0x2c')]!==_0xf70c('0x3c')){var _0x368b0a={};_0x368b0a[_0x199c02[_0xf70c('0x28')]]={'$like':'%'+_0x55af5b[_0xf70c('0x31')][_0xf70c('0x39')]+'%'};return _0x368b0a;}})});}_0x3503bd=_[_0xf70c('0x3b')]({},_0x3503bd,_0x55af5b['options']);var _0x48418e={'where':_0x3503bd[_0xf70c('0x3a')]};return db[_0xf70c('0x29')][_0xf70c('0x1f')](_0x48418e)['then'](function(_0x47d77a){_0x40e42f['count']=_0x47d77a;if(_0x55af5b[_0xf70c('0x31')][_0xf70c('0x3d')]){_0x3503bd[_0xf70c('0x3e')]=[{'all':!![]}];}return db[_0xf70c('0x29')]['findAll'](_0x3503bd);})[_0xf70c('0x26')](function(_0xfc76c6){_0x40e42f[_0xf70c('0x3f')]=_0xfc76c6;return _0x40e42f;})[_0xf70c('0x26')](respondWithFilteredResult(_0x33cd4a,_0x3503bd))[_0xf70c('0x40')](handleError(_0x33cd4a,null));};exports['show']=function(_0x1477f0,_0x4f55bc){var _0x396f5d={'raw':![],'where':{'id':_0x1477f0[_0xf70c('0x41')]['id']}},_0x1cdc7f={};_0x1cdc7f['model']=_[_0xf70c('0x30')](db['IntegrationReport'][_0xf70c('0x2a')]);_0x1cdc7f['query']=_[_0xf70c('0x30')](_0x1477f0[_0xf70c('0x31')]);_0x1cdc7f[_0xf70c('0x32')]=_['intersection'](_0x1cdc7f[_0xf70c('0x2e')],_0x1cdc7f['query']);_0x396f5d[_0xf70c('0x33')]=_[_0xf70c('0x42')](_0x1cdc7f[_0xf70c('0x2e')],qs['fields'](_0x1477f0[_0xf70c('0x31')][_0xf70c('0x34')]));_0x396f5d[_0xf70c('0x33')]=_0x396f5d[_0xf70c('0x33')]['length']?_0x396f5d['attributes']:_0x1cdc7f['model'];if(_0x1477f0[_0xf70c('0x31')]['includeAll']){_0x396f5d['include']=[{'all':!![]}];}_0x396f5d=_[_0xf70c('0x3b')]({},_0x396f5d,_0x1477f0[_0xf70c('0x43')]);return db[_0xf70c('0x29')][_0xf70c('0x44')](_0x396f5d)[_0xf70c('0x26')](handleEntityNotFound(_0x4f55bc,null))[_0xf70c('0x26')](respondWithResult(_0x4f55bc,null))['catch'](handleError(_0x4f55bc,null));};exports[_0xf70c('0x45')]=function(_0x5eea1a,_0x46f414){return db[_0xf70c('0x29')]['create'](_0x5eea1a['body'],{})[_0xf70c('0x26')](respondWithResult(_0x46f414,0xc9))[_0xf70c('0x40')](handleError(_0x46f414,null));};exports[_0xf70c('0x46')]=function(_0xf60f49,_0x5cbb63){if(_0xf60f49[_0xf70c('0x47')]['id']){delete _0xf60f49[_0xf70c('0x47')]['id'];}return db[_0xf70c('0x29')][_0xf70c('0x44')]({'where':{'id':_0xf60f49[_0xf70c('0x41')]['id']}})[_0xf70c('0x26')](handleEntityNotFound(_0x5cbb63,null))[_0xf70c('0x26')](saveUpdates(_0xf60f49['body'],null))[_0xf70c('0x26')](respondWithResult(_0x5cbb63,null))[_0xf70c('0x40')](handleError(_0x5cbb63,null));};exports['destroy']=function(_0x4ba9ec,_0x520081){return db[_0xf70c('0x29')][_0xf70c('0x44')]({'where':{'id':_0x4ba9ec[_0xf70c('0x41')]['id']}})['then'](handleEntityNotFound(_0x520081,null))[_0xf70c('0x26')](removeEntity(_0x520081,null))[_0xf70c('0x40')](handleError(_0x520081,null));};exports['describe']=function(_0x15b60a,_0x44d7be){return db['IntegrationReport'][_0xf70c('0x48')]()[_0xf70c('0x26')](respondWithResult(_0x44d7be,null))[_0xf70c('0x40')](handleError(_0x44d7be,null));};
\ No newline at end of file
index e1b355f..10ba8a0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xad03=['request-promise','rimraf','../../config/environment','./integrationReport.attributes','define','IntegrationReport','report_integration','lodash','util','api','moment','bluebird'];(function(_0x5a6b28,_0x5fd642){var _0x1c0764=function(_0x12d3de){while(--_0x12d3de){_0x5a6b28['push'](_0x5a6b28['shift']());}};_0x1c0764(++_0x5fd642);}(_0xad03,0x8b));var _0x3ad0=function(_0x44ecf0,_0xeeabbd){_0x44ecf0=_0x44ecf0-0x0;var _0x5e8acd=_0xad03[_0x44ecf0];return _0x5e8acd;};'use strict';var _=require(_0x3ad0('0x0'));var util=require(_0x3ad0('0x1'));var logger=require('../../config/logger')(_0x3ad0('0x2'));var moment=require(_0x3ad0('0x3'));var BPromise=require(_0x3ad0('0x4'));var rp=require(_0x3ad0('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x3ad0('0x6'));var config=require(_0x3ad0('0x7'));var attributes=require(_0x3ad0('0x8'));module['exports']=function(_0x10bf1e,_0x550a37){return _0x10bf1e[_0x3ad0('0x9')](_0x3ad0('0xa'),attributes,{'tableName':_0x3ad0('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xaacb=['path','rimraf','../../config/environment','./integrationReport.attributes','exports','define','IntegrationReport','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x3fb903,_0x31fdea){var _0x3fbb09=function(_0x560e25){while(--_0x560e25){_0x3fb903['push'](_0x3fb903['shift']());}};_0x3fbb09(++_0x31fdea);}(_0xaacb,0x149));var _0xbaac=function(_0x515099,_0x46bdbd){_0x515099=_0x515099-0x0;var _0x26e0a7=_0xaacb[_0x515099];return _0x26e0a7;};'use strict';var _=require(_0xbaac('0x0'));var util=require(_0xbaac('0x1'));var logger=require(_0xbaac('0x2'))(_0xbaac('0x3'));var moment=require(_0xbaac('0x4'));var BPromise=require(_0xbaac('0x5'));var rp=require(_0xbaac('0x6'));var fs=require('fs');var path=require(_0xbaac('0x7'));var rimraf=require(_0xbaac('0x8'));var config=require(_0xbaac('0x9'));var attributes=require(_0xbaac('0xa'));module[_0xbaac('0xb')]=function(_0x2cbfa4,_0x50678c){return _0x2cbfa4[_0xbaac('0xc')](_0xbaac('0xd'),attributes,{'tableName':'report_integration','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 09156b5..334ffd4 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(_0x2559ed,_0x4d8534){var _0x4a5536=function(_0x3a0729){while(--_0x3a0729){_0x2559ed['push'](_0x2559ed['shift']());}};_0x4a5536(++_0x4d8534);}(_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 _0xabce=['util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','client','then','info','IntegrationReport,\x20%s,\x20%s','request\x20sent','debug','IntegrationReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash'];(function(_0x58f3e1,_0x11d328){var _0x5742c7=function(_0x5f0193){while(--_0x5f0193){_0x58f3e1['push'](_0x58f3e1['shift']());}};_0x5742c7(++_0x11d328);}(_0xabce,0x103));var _0xeabc=function(_0x31cb5f,_0x2df766){_0x31cb5f=_0x31cb5f-0x0;var _0x586042=_0xabce[_0x31cb5f];return _0x586042;};'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')]('IntegrationReport,\x20%s,\x20%s',_0x52ede8,_0xeabc('0xc'));_0x9417af(_0x341f16[_0xeabc('0x13')]['message']);}})['catch'](function(_0x10fa8e){logger['error'](_0xeabc('0xb'),_0x52ede8,_0x10fa8e);_0x8434c5(_0x10fa8e);});});}
\ No newline at end of file
index 5c632f7..1620c99 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3831=['destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','./interval.controller','get','isAuthenticated','show','/:id/sub_intervals','getIntervals','post','addInterval','addIntervals','put','update','delete','/:id'];(function(_0x5d6e30,_0xc21d51){var _0x3d3f3b=function(_0x33597b){while(--_0x33597b){_0x5d6e30['push'](_0x5d6e30['shift']());}};_0x3d3f3b(++_0xc21d51);}(_0x3831,0x14c));var _0x1383=function(_0x31a9d1,_0x283ae9){_0x31a9d1=_0x31a9d1-0x0;var _0x127d8e=_0x3831[_0x31a9d1];return _0x127d8e;};'use strict';var multer=require(_0x1383('0x0'));var util=require('util');var path=require(_0x1383('0x1'));var timeout=require(_0x1383('0x2'));var express=require(_0x1383('0x3'));var router=express[_0x1383('0x4')]();var fs_extra=require(_0x1383('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x1383('0x6'));var config=require('../../config/environment');var controller=require(_0x1383('0x7'));router['get']('/',auth['isAuthenticated'](),controller['index']);router[_0x1383('0x8')]('/:id',auth[_0x1383('0x9')](),controller[_0x1383('0xa')]);router[_0x1383('0x8')](_0x1383('0xb'),auth[_0x1383('0x9')](),controller[_0x1383('0xc')]);router[_0x1383('0xd')]('/',auth[_0x1383('0x9')](),controller['create']);router[_0x1383('0xd')](_0x1383('0xb'),auth[_0x1383('0x9')](),controller[_0x1383('0xe')]);router[_0x1383('0xd')]('/:id/sub_intervals/create_many',auth[_0x1383('0x9')](),controller[_0x1383('0xf')]);router[_0x1383('0x10')]('/:id',auth['isAuthenticated'](),controller[_0x1383('0x11')]);router[_0x1383('0x12')](_0x1383('0x13'),auth[_0x1383('0x9')](),controller[_0x1383('0x14')]);module[_0x1383('0x15')]=router;
\ No newline at end of file
+var _0xddd2=['addInterval','/:id/sub_intervals/create_many','addIntervals','put','update','delete','destroy','multer','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./interval.controller','isAuthenticated','index','get','/:id','show','/:id/sub_intervals','getIntervals','post','create'];(function(_0x4c32f5,_0x3dbbf1){var _0x19cae9=function(_0x3c77cd){while(--_0x3c77cd){_0x4c32f5['push'](_0x4c32f5['shift']());}};_0x19cae9(++_0x3dbbf1);}(_0xddd2,0x1e2));var _0x2ddd=function(_0x60305c,_0x229fb0){_0x60305c=_0x60305c-0x0;var _0x279236=_0xddd2[_0x60305c];return _0x279236;};'use strict';var multer=require(_0x2ddd('0x0'));var util=require('util');var path=require(_0x2ddd('0x1'));var timeout=require('connect-timeout');var express=require(_0x2ddd('0x2'));var router=express[_0x2ddd('0x3')]();var fs_extra=require(_0x2ddd('0x4'));var auth=require(_0x2ddd('0x5'));var interaction=require(_0x2ddd('0x6'));var config=require(_0x2ddd('0x7'));var controller=require(_0x2ddd('0x8'));router['get']('/',auth[_0x2ddd('0x9')](),controller[_0x2ddd('0xa')]);router[_0x2ddd('0xb')](_0x2ddd('0xc'),auth[_0x2ddd('0x9')](),controller[_0x2ddd('0xd')]);router['get'](_0x2ddd('0xe'),auth[_0x2ddd('0x9')](),controller[_0x2ddd('0xf')]);router[_0x2ddd('0x10')]('/',auth[_0x2ddd('0x9')](),controller[_0x2ddd('0x11')]);router[_0x2ddd('0x10')](_0x2ddd('0xe'),auth[_0x2ddd('0x9')](),controller[_0x2ddd('0x12')]);router['post'](_0x2ddd('0x13'),auth[_0x2ddd('0x9')](),controller[_0x2ddd('0x14')]);router[_0x2ddd('0x15')](_0x2ddd('0xc'),auth[_0x2ddd('0x9')](),controller[_0x2ddd('0x16')]);router[_0x2ddd('0x17')]('/:id',auth[_0x2ddd('0x9')](),controller[_0x2ddd('0x18')]);module['exports']=router;
\ No newline at end of file
index 1007d92..8acf34b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe44a=['exports','STRING'];(function(_0x16087e,_0x1f868e){var _0x443813=function(_0x101467){while(--_0x101467){_0x16087e['push'](_0x16087e['shift']());}};_0x443813(++_0x1f868e);}(_0xe44a,0x1e2));var _0xae44=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0xe44a[_0x3b380d];return _0x54502b;};'use strict';var Sequelize=require('sequelize');module[_0xae44('0x0')]={'name':{'type':Sequelize[_0xae44('0x1')]},'description':{'type':Sequelize[_0xae44('0x1')]},'interval':{'type':Sequelize['STRING'],'allowNull':!![]}};
\ No newline at end of file
+var _0xba72=['STRING','sequelize'];(function(_0x1f181f,_0x186d06){var _0xf11b8c=function(_0xbfde95){while(--_0xbfde95){_0x1f181f['push'](_0x1f181f['shift']());}};_0xf11b8c(++_0x186d06);}(_0xba72,0x1a9));var _0x2ba7=function(_0x533381,_0x8a69fa){_0x533381=_0x533381-0x0;var _0x2877ed=_0xba72[_0x533381];return _0x2877ed;};'use strict';var Sequelize=require(_0x2ba7('0x0'));module['exports']={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize[_0x2ba7('0x1')],'allowNull':!![]}};
\ No newline at end of file
index 1d406c0..96ed94d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x896f=['lodash','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','../../config/environment','../../config/license/util','../../components/extensions/rewrite','sendStatus','status','end','offset','undefined','limit','count','Content-Range','apply','reject','save','update','then','get','Intervals','destroy','name','send','index','fieldName','type','model','map','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','sort','where','pick','merge','VIRTUAL','Interval','includeAll','include','findAll','rows','show','rawAttributes','options','find','catch','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','addInterval','IntervalId','order','filter','getIntervals','addIntervals','sequelize','transaction','bulkCreate','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra'];(function(_0x2e4bb0,_0x282023){var _0x36a95d=function(_0x5a0367){while(--_0x5a0367){_0x2e4bb0['push'](_0x2e4bb0['shift']());}};_0x36a95d(++_0x282023);}(_0x896f,0x1b6));var _0xf896=function(_0x24237f,_0x4cf32c){_0x24237f=_0x24237f-0x0;var _0x48298e=_0x896f[_0x24237f];return _0x48298e;};'use strict';var emlformat=require(_0xf896('0x0'));var rimraf=require(_0xf896('0x1'));var zipdir=require(_0xf896('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xf896('0x3'));var moment=require(_0xf896('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xf896('0x5'));var util=require(_0xf896('0x6'));var path=require(_0xf896('0x7'));var sox=require(_0xf896('0x8'));var csv=require(_0xf896('0x9'));var ejs=require(_0xf896('0xa'));var fs=require('fs');var fs_extra=require(_0xf896('0xb'));var _=require(_0xf896('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xf896('0xd'));var deskjs=require(_0xf896('0xe'));var toCsv=require(_0xf896('0x9'));var querystring=require(_0xf896('0xf'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xf896('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0xf896('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xf896('0x12'))('api');var utils=require('../../config/utils');var config=require(_0xf896('0x13'));var licenseUtil=require(_0xf896('0x14'));var db=require('../../mysqldb')['db'];var extensions=require(_0xf896('0x15'));function respondWithStatusCode(_0x494de4,_0x52888f){_0x52888f=_0x52888f||0xcc;return function(_0x4214e1){if(_0x4214e1){return _0x494de4[_0xf896('0x16')](_0x52888f);}return _0x494de4[_0xf896('0x17')](_0x52888f)[_0xf896('0x18')]();};}function respondWithResult(_0x45c069,_0x54d54c){_0x54d54c=_0x54d54c||0xc8;return function(_0x59e49e){if(_0x59e49e){return _0x45c069[_0xf896('0x17')](_0x54d54c)['json'](_0x59e49e);}};}function respondWithFilteredResult(_0x5bf81e,_0xc94c48){return function(_0x2b6e51){if(_0x2b6e51){var _0x5f3b32=typeof _0xc94c48[_0xf896('0x19')]===_0xf896('0x1a')&&typeof _0xc94c48[_0xf896('0x1b')]===_0xf896('0x1a');var _0x5322e9=_0x2b6e51['count'];var _0x1caed3=_0x5f3b32?0x0:_0xc94c48['offset'];var _0x119fb6=_0x5f3b32?_0x2b6e51[_0xf896('0x1c')]:_0xc94c48[_0xf896('0x19')]+_0xc94c48['limit'];var _0x3ae247;if(_0x119fb6>=_0x5322e9){_0x119fb6=_0x5322e9;_0x3ae247=0xc8;}else{_0x3ae247=0xce;}_0x5bf81e[_0xf896('0x17')](_0x3ae247);return _0x5bf81e['set'](_0xf896('0x1d'),_0x1caed3+'-'+_0x119fb6+'/'+_0x5322e9)['json'](_0x2b6e51);}return null;};}function patchUpdates(_0x3e33f7){return function(_0x2169ec){try{jsonpatch[_0xf896('0x1e')](_0x2169ec,_0x3e33f7,!![]);}catch(_0x250257){return BPromise[_0xf896('0x1f')](_0x250257);}return _0x2169ec[_0xf896('0x20')]();};}function saveUpdates(_0x1b51cb,_0x5155c9){return function(_0x2981bf){if(_0x2981bf){return _0x2981bf[_0xf896('0x21')](_0x1b51cb)[_0xf896('0x22')](function(_0x1391c8){return _0x1391c8;});}return null;};}function removeEntity(_0x534689,_0x687457){return function(_0x4c1b25){if(_0x4c1b25){return _0x4c1b25['destroy']()['then'](function(){var _0x48461f=_0x4c1b25[_0xf896('0x23')]({'plain':!![]});var _0x3e0c33=_0xf896('0x24');return db['UserProfileResource'][_0xf896('0x25')]({'where':{'type':_0x3e0c33,'resourceId':_0x48461f['id']}})[_0xf896('0x22')](function(){return _0x4c1b25;});})[_0xf896('0x22')](function(){_0x534689[_0xf896('0x17')](0xcc)[_0xf896('0x18')]();});}};}function handleEntityNotFound(_0x52a843,_0x50dee7){return function(_0x44821b){if(!_0x44821b){_0x52a843[_0xf896('0x16')](0x194);}return _0x44821b;};}function handleError(_0x464267,_0x1f51b7){_0x1f51b7=_0x1f51b7||0x1f4;return function(_0x41a879){logger['error'](_0x41a879['stack']);if(_0x41a879['name']){delete _0x41a879[_0xf896('0x26')];}_0x464267[_0xf896('0x17')](_0x1f51b7)[_0xf896('0x27')](_0x41a879);};}exports[_0xf896('0x28')]=function(_0x400560,_0x386084){var _0x1a12a7={},_0x3f9494={},_0x4b3c46={'count':0x0,'rows':[]};var _0x4ebe68=_['map'](db['Interval']['rawAttributes'],function(_0x2b1877){return{'name':_0x2b1877[_0xf896('0x29')],'type':_0x2b1877[_0xf896('0x2a')]['key']};});_0x3f9494[_0xf896('0x2b')]=_[_0xf896('0x2c')](_0x4ebe68,_0xf896('0x26'));_0x3f9494[_0xf896('0x2d')]=_[_0xf896('0x2e')](_0x400560[_0xf896('0x2d')]);_0x3f9494[_0xf896('0x2f')]=_['intersection'](_0x3f9494[_0xf896('0x2b')],_0x3f9494[_0xf896('0x2d')]);_0x1a12a7[_0xf896('0x30')]=_[_0xf896('0x31')](_0x3f9494[_0xf896('0x2b')],qs[_0xf896('0x32')](_0x400560[_0xf896('0x2d')][_0xf896('0x32')]));_0x1a12a7['attributes']=_0x1a12a7[_0xf896('0x30')][_0xf896('0x33')]?_0x1a12a7['attributes']:_0x3f9494[_0xf896('0x2b')];if(!_0x400560['query'][_0xf896('0x34')](_0xf896('0x35'))){_0x1a12a7[_0xf896('0x1b')]=qs[_0xf896('0x1b')](_0x400560[_0xf896('0x2d')]['limit']);_0x1a12a7[_0xf896('0x19')]=qs[_0xf896('0x19')](_0x400560[_0xf896('0x2d')][_0xf896('0x19')]);}_0x1a12a7['order']=qs['sort'](_0x400560[_0xf896('0x2d')][_0xf896('0x36')]);_0x1a12a7[_0xf896('0x37')]=qs['filters'](_[_0xf896('0x38')](_0x400560[_0xf896('0x2d')],_0x3f9494[_0xf896('0x2f')]),_0x4ebe68);if(_0x400560[_0xf896('0x2d')]['filter']){_0x1a12a7[_0xf896('0x37')]=_[_0xf896('0x39')](_0x1a12a7['where'],{'$or':_['map'](_0x4ebe68,function(_0x226e47){if(_0x226e47[_0xf896('0x2a')]!==_0xf896('0x3a')){var _0x14745d={};_0x14745d[_0x226e47[_0xf896('0x26')]]={'$like':'%'+_0x400560[_0xf896('0x2d')]['filter']+'%'};return _0x14745d;}})});}_0x1a12a7=_[_0xf896('0x39')]({},_0x1a12a7,_0x400560['options']);var _0x41ba02={'where':_0x1a12a7[_0xf896('0x37')]};return db[_0xf896('0x3b')][_0xf896('0x1c')](_0x41ba02)[_0xf896('0x22')](function(_0x51d34a){_0x4b3c46[_0xf896('0x1c')]=_0x51d34a;if(_0x400560['query'][_0xf896('0x3c')]){_0x1a12a7[_0xf896('0x3d')]=[{'all':!![]}];}return db['Interval'][_0xf896('0x3e')](_0x1a12a7);})[_0xf896('0x22')](function(_0x1f7790){_0x4b3c46[_0xf896('0x3f')]=_0x1f7790;return _0x4b3c46;})['then'](respondWithFilteredResult(_0x386084,_0x1a12a7))['catch'](handleError(_0x386084,null));};exports[_0xf896('0x40')]=function(_0x410f13,_0x230947){var _0x431c4d={'raw':!![],'where':{'id':_0x410f13['params']['id']}},_0x3c819a={};_0x3c819a[_0xf896('0x2b')]=_[_0xf896('0x2e')](db[_0xf896('0x3b')][_0xf896('0x41')]);_0x3c819a['query']=_[_0xf896('0x2e')](_0x410f13[_0xf896('0x2d')]);_0x3c819a[_0xf896('0x2f')]=_['intersection'](_0x3c819a[_0xf896('0x2b')],_0x3c819a[_0xf896('0x2d')]);_0x431c4d[_0xf896('0x30')]=_[_0xf896('0x31')](_0x3c819a[_0xf896('0x2b')],qs[_0xf896('0x32')](_0x410f13[_0xf896('0x2d')][_0xf896('0x32')]));_0x431c4d['attributes']=_0x431c4d[_0xf896('0x30')][_0xf896('0x33')]?_0x431c4d[_0xf896('0x30')]:_0x3c819a[_0xf896('0x2b')];if(_0x410f13[_0xf896('0x2d')][_0xf896('0x3c')]){_0x431c4d[_0xf896('0x3d')]=[{'all':!![]}];}_0x431c4d=_['merge']({},_0x431c4d,_0x410f13[_0xf896('0x42')]);return db['Interval'][_0xf896('0x43')](_0x431c4d)['then'](handleEntityNotFound(_0x230947,null))['then'](respondWithResult(_0x230947,null))[_0xf896('0x44')](handleError(_0x230947,null));};exports['create']=function(_0x38e261,_0x431502){return db['Interval'][_0xf896('0x45')](_0x38e261['body'],{})['then'](function(_0x2369cd){var _0x2f48bd=_0x38e261['user'][_0xf896('0x23')]({'plain':!![]});if(!_0x2f48bd)throw new Error(_0xf896('0x46'));if(_0x2f48bd[_0xf896('0x47')]===_0xf896('0x48')){var _0x5b78d2=_0x2369cd[_0xf896('0x23')]({'plain':!![]});var _0x173854=_0xf896('0x24');return db[_0xf896('0x49')]['find']({'where':{'name':_0x173854,'userProfileId':_0x2f48bd[_0xf896('0x4a')]},'raw':!![]})[_0xf896('0x22')](function(_0x4d1306){if(_0x4d1306&&_0x4d1306[_0xf896('0x4b')]===0x0){return db[_0xf896('0x4c')][_0xf896('0x45')]({'name':_0x5b78d2['name'],'resourceId':_0x5b78d2['id'],'type':_0x4d1306[_0xf896('0x26')],'sectionId':_0x4d1306['id']},{})[_0xf896('0x22')](function(){return _0x2369cd;});}else{return _0x2369cd;}})[_0xf896('0x44')](function(_0x2dfa92){logger[_0xf896('0x4d')](_0xf896('0x4e'),_0x2dfa92);throw _0x2dfa92;});}return _0x2369cd;})['then'](respondWithResult(_0x431502,0xc9))[_0xf896('0x44')](handleError(_0x431502,null));};exports[_0xf896('0x21')]=function(_0x361853,_0x2be331){if(_0x361853[_0xf896('0x4f')]['id']){delete _0x361853[_0xf896('0x4f')]['id'];}return db[_0xf896('0x3b')][_0xf896('0x43')]({'where':{'id':_0x361853[_0xf896('0x50')]['id']}})[_0xf896('0x22')](handleEntityNotFound(_0x2be331,null))[_0xf896('0x22')](saveUpdates(_0x361853['body'],null))[_0xf896('0x22')](respondWithResult(_0x2be331,null))[_0xf896('0x44')](handleError(_0x2be331,null));};exports[_0xf896('0x25')]=function(_0xf33f6d,_0x4ddd13){return db[_0xf896('0x3b')][_0xf896('0x43')]({'where':{'id':_0xf33f6d[_0xf896('0x50')]['id']}})[_0xf896('0x22')](handleEntityNotFound(_0x4ddd13,null))[_0xf896('0x22')](removeEntity(_0x4ddd13,null))[_0xf896('0x44')](handleError(_0x4ddd13,null));};exports[_0xf896('0x51')]=function(_0x14e8c5,_0x750cc4,_0x167a07){if(_0x14e8c5[_0xf896('0x4f')]['id']){delete _0x14e8c5[_0xf896('0x4f')]['id'];}return db[_0xf896('0x3b')][_0xf896('0x43')]({'where':{'id':_0x14e8c5[_0xf896('0x50')]['id']}})[_0xf896('0x22')](handleEntityNotFound(_0x750cc4,null))[_0xf896('0x22')](function(_0x584b31){if(_0x584b31){_0x14e8c5[_0xf896('0x4f')][_0xf896('0x52')]=_0x584b31['id'];return db['Interval'][_0xf896('0x45')](_0x14e8c5[_0xf896('0x4f')]);}})[_0xf896('0x22')](respondWithResult(_0x750cc4,null))['catch'](handleError(_0x750cc4,null));};exports['getIntervals']=function(_0x2960a2,_0x248595,_0x4c2a1b){var _0x3b32c0={};var _0x4d3a82={};var _0x14e7f8;var _0x47b06f;return db[_0xf896('0x3b')]['findOne']({'where':{'id':_0x2960a2[_0xf896('0x50')]['id']}})[_0xf896('0x22')](handleEntityNotFound(_0x248595,null))['then'](function(_0x16e457){if(_0x16e457){_0x14e7f8=_0x16e457;_0x4d3a82['model']=_['keys'](db[_0xf896('0x3b')][_0xf896('0x41')]);_0x4d3a82[_0xf896('0x2d')]=_[_0xf896('0x2e')](_0x2960a2[_0xf896('0x2d')]);_0x4d3a82[_0xf896('0x2f')]=_[_0xf896('0x31')](_0x4d3a82[_0xf896('0x2b')],_0x4d3a82[_0xf896('0x2d')]);_0x3b32c0['attributes']=_[_0xf896('0x31')](_0x4d3a82[_0xf896('0x2b')],qs[_0xf896('0x32')](_0x2960a2[_0xf896('0x2d')][_0xf896('0x32')]));_0x3b32c0[_0xf896('0x30')]=_0x3b32c0['attributes'][_0xf896('0x33')]?_0x3b32c0[_0xf896('0x30')]:_0x4d3a82[_0xf896('0x2b')];_0x3b32c0[_0xf896('0x53')]=qs[_0xf896('0x36')](_0x2960a2[_0xf896('0x2d')][_0xf896('0x36')]);_0x3b32c0['where']=qs[_0xf896('0x2f')](_['pick'](_0x2960a2[_0xf896('0x2d')],_0x4d3a82[_0xf896('0x2f')]));if(_0x2960a2[_0xf896('0x2d')][_0xf896('0x54')]){_0x3b32c0[_0xf896('0x37')]=_[_0xf896('0x39')](_0x3b32c0[_0xf896('0x37')],{'$or':_[_0xf896('0x2c')](_0x3b32c0[_0xf896('0x30')],function(_0x3eef3b){var _0x4938d1={};_0x4938d1[_0x3eef3b]={'$like':'%'+_0x2960a2[_0xf896('0x2d')][_0xf896('0x54')]+'%'};return _0x4938d1;})});}_0x3b32c0=_[_0xf896('0x39')]({},_0x3b32c0,_0x2960a2[_0xf896('0x42')]);return _0x14e7f8[_0xf896('0x55')](_0x3b32c0);}})[_0xf896('0x22')](function(_0x1849e1){if(_0x1849e1){_0x47b06f=_0x1849e1[_0xf896('0x33')];if(!_0x2960a2['query'][_0xf896('0x34')](_0xf896('0x35'))){_0x3b32c0['limit']=qs[_0xf896('0x1b')](_0x2960a2[_0xf896('0x2d')][_0xf896('0x1b')]);_0x3b32c0[_0xf896('0x19')]=qs['offset'](_0x2960a2[_0xf896('0x2d')]['offset']);}return _0x14e7f8['getIntervals'](_0x3b32c0);}})[_0xf896('0x22')](function(_0x12ab22){if(_0x12ab22){return _0x12ab22?{'count':_0x47b06f,'rows':_0x12ab22}:null;}})['then'](respondWithResult(_0x248595,null))[_0xf896('0x44')](handleError(_0x248595,null));};exports[_0xf896('0x56')]=function(_0x76559b,_0x2e8fbd,_0x34376f){return db[_0xf896('0x3b')]['findOne']({'where':{'id':_0x76559b[_0xf896('0x50')]['id']}})[_0xf896('0x22')](handleEntityNotFound(_0x2e8fbd,null))[_0xf896('0x22')](function(_0x5d59e8){if(_0x5d59e8){return db[_0xf896('0x57')][_0xf896('0x58')](function(_0x4aaafe){return db[_0xf896('0x3b')]['destroy']({'where':{'IntervalId':_0x76559b[_0xf896('0x50')]['id']},'transaction':_0x4aaafe})[_0xf896('0x22')](function(_0x40c537){var _0x4c0b21=_[_0xf896('0x2c')](_0x76559b['body'],function(_0x54bde3){delete _0x54bde3['id'];_0x54bde3[_0xf896('0x52')]=_0x76559b[_0xf896('0x50')]['id'];return _0x54bde3;});return db[_0xf896('0x3b')][_0xf896('0x59')](_0x4c0b21,{'transaction':_0x4aaafe});});})[_0xf896('0x22')](function(){return db[_0xf896('0x3b')]['findAll']({'where':{'IntervalId':_0x76559b[_0xf896('0x50')]['id']}});});}})['then'](respondWithResult(_0x2e8fbd,null))['catch'](handleError(_0x2e8fbd,null));};
\ No newline at end of file
+var _0xfcf6=['addIntervals','findOne','transaction','IntervalId','bulkCreate','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/environment','../../config/license/util','../../mysqldb','../../components/extensions/rewrite','status','end','json','count','offset','limit','set','Content-Range','apply','reject','save','destroy','get','UserProfileResource','then','sendStatus','error','stack','send','index','map','Interval','rawAttributes','type','key','model','name','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','include','findAll','catch','show','params','includeAll','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','addInterval','getIntervals'];(function(_0x23a061,_0x503206){var _0x1371bd=function(_0x3c8b13){while(--_0x3c8b13){_0x23a061['push'](_0x23a061['shift']());}};_0x1371bd(++_0x503206);}(_0xfcf6,0x1bd));var _0x6fcf=function(_0x163db1,_0x1bd35a){_0x163db1=_0x163db1-0x0;var _0x5b105e=_0xfcf6[_0x163db1];return _0x5b105e;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x6fcf('0x0'));var zipdir=require(_0x6fcf('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x6fcf('0x2'));var moment=require('moment');var BPromise=require(_0x6fcf('0x3'));var Mustache=require(_0x6fcf('0x4'));var util=require(_0x6fcf('0x5'));var path=require(_0x6fcf('0x6'));var sox=require(_0x6fcf('0x7'));var csv=require(_0x6fcf('0x8'));var ejs=require(_0x6fcf('0x9'));var fs=require('fs');var fs_extra=require(_0x6fcf('0xa'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x6fcf('0xb'));var jsforce=require(_0x6fcf('0xc'));var deskjs=require(_0x6fcf('0xd'));var toCsv=require('to-csv');var querystring=require(_0x6fcf('0xe'));var Papa=require(_0x6fcf('0xf'));var Redis=require('ioredis');var authService=require(_0x6fcf('0x10'));var qs=require(_0x6fcf('0x11'));var as=require(_0x6fcf('0x12'));var hardwareService=require(_0x6fcf('0x13'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0x6fcf('0x14'));var licenseUtil=require(_0x6fcf('0x15'));var db=require(_0x6fcf('0x16'))['db'];var extensions=require(_0x6fcf('0x17'));function respondWithStatusCode(_0x4e06df,_0x3513ae){_0x3513ae=_0x3513ae||0xcc;return function(_0x200c0b){if(_0x200c0b){return _0x4e06df['sendStatus'](_0x3513ae);}return _0x4e06df[_0x6fcf('0x18')](_0x3513ae)[_0x6fcf('0x19')]();};}function respondWithResult(_0x265698,_0x30ec76){_0x30ec76=_0x30ec76||0xc8;return function(_0x2597ec){if(_0x2597ec){return _0x265698[_0x6fcf('0x18')](_0x30ec76)[_0x6fcf('0x1a')](_0x2597ec);}};}function respondWithFilteredResult(_0x38a2f8,_0x1cab4d){return function(_0x45bcb2){if(_0x45bcb2){var _0x580bdc=typeof _0x1cab4d['offset']==='undefined'&&typeof _0x1cab4d['limit']==='undefined';var _0xd43057=_0x45bcb2[_0x6fcf('0x1b')];var _0x40d356=_0x580bdc?0x0:_0x1cab4d['offset'];var _0x1ec427=_0x580bdc?_0x45bcb2[_0x6fcf('0x1b')]:_0x1cab4d[_0x6fcf('0x1c')]+_0x1cab4d[_0x6fcf('0x1d')];var _0x484a9b;if(_0x1ec427>=_0xd43057){_0x1ec427=_0xd43057;_0x484a9b=0xc8;}else{_0x484a9b=0xce;}_0x38a2f8[_0x6fcf('0x18')](_0x484a9b);return _0x38a2f8[_0x6fcf('0x1e')](_0x6fcf('0x1f'),_0x40d356+'-'+_0x1ec427+'/'+_0xd43057)[_0x6fcf('0x1a')](_0x45bcb2);}return null;};}function patchUpdates(_0x18c823){return function(_0x423e3a){try{jsonpatch[_0x6fcf('0x20')](_0x423e3a,_0x18c823,!![]);}catch(_0x17f1e3){return BPromise[_0x6fcf('0x21')](_0x17f1e3);}return _0x423e3a[_0x6fcf('0x22')]();};}function saveUpdates(_0xc650e8,_0x1ec4b5){return function(_0x49a91b){if(_0x49a91b){return _0x49a91b['update'](_0xc650e8)['then'](function(_0x12dc0a){return _0x12dc0a;});}return null;};}function removeEntity(_0x2a0749,_0x1d50e4){return function(_0xe4e204){if(_0xe4e204){return _0xe4e204[_0x6fcf('0x23')]()['then'](function(){var _0x35f80b=_0xe4e204[_0x6fcf('0x24')]({'plain':!![]});var _0x463be0='Intervals';return db[_0x6fcf('0x25')][_0x6fcf('0x23')]({'where':{'type':_0x463be0,'resourceId':_0x35f80b['id']}})['then'](function(){return _0xe4e204;});})[_0x6fcf('0x26')](function(){_0x2a0749[_0x6fcf('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3b9dbe,_0x5b1761){return function(_0x53e3ff){if(!_0x53e3ff){_0x3b9dbe[_0x6fcf('0x27')](0x194);}return _0x53e3ff;};}function handleError(_0x2fd23a,_0x33fdda){_0x33fdda=_0x33fdda||0x1f4;return function(_0x36f52f){logger[_0x6fcf('0x28')](_0x36f52f[_0x6fcf('0x29')]);if(_0x36f52f['name']){delete _0x36f52f['name'];}_0x2fd23a[_0x6fcf('0x18')](_0x33fdda)[_0x6fcf('0x2a')](_0x36f52f);};}exports[_0x6fcf('0x2b')]=function(_0x4a4297,_0x3ad87c){var _0x145cc4={},_0x31fa12={},_0x3e6ef6={'count':0x0,'rows':[]};var _0x1a4155=_[_0x6fcf('0x2c')](db[_0x6fcf('0x2d')][_0x6fcf('0x2e')],function(_0x123b57){return{'name':_0x123b57['fieldName'],'type':_0x123b57[_0x6fcf('0x2f')][_0x6fcf('0x30')]};});_0x31fa12[_0x6fcf('0x31')]=_[_0x6fcf('0x2c')](_0x1a4155,_0x6fcf('0x32'));_0x31fa12[_0x6fcf('0x33')]=_[_0x6fcf('0x34')](_0x4a4297[_0x6fcf('0x33')]);_0x31fa12[_0x6fcf('0x35')]=_['intersection'](_0x31fa12[_0x6fcf('0x31')],_0x31fa12[_0x6fcf('0x33')]);_0x145cc4[_0x6fcf('0x36')]=_[_0x6fcf('0x37')](_0x31fa12['model'],qs[_0x6fcf('0x38')](_0x4a4297[_0x6fcf('0x33')][_0x6fcf('0x38')]));_0x145cc4['attributes']=_0x145cc4[_0x6fcf('0x36')][_0x6fcf('0x39')]?_0x145cc4[_0x6fcf('0x36')]:_0x31fa12[_0x6fcf('0x31')];if(!_0x4a4297[_0x6fcf('0x33')][_0x6fcf('0x3a')](_0x6fcf('0x3b'))){_0x145cc4[_0x6fcf('0x1d')]=qs['limit'](_0x4a4297[_0x6fcf('0x33')][_0x6fcf('0x1d')]);_0x145cc4[_0x6fcf('0x1c')]=qs['offset'](_0x4a4297[_0x6fcf('0x33')][_0x6fcf('0x1c')]);}_0x145cc4['order']=qs[_0x6fcf('0x3c')](_0x4a4297['query'][_0x6fcf('0x3c')]);_0x145cc4[_0x6fcf('0x3d')]=qs[_0x6fcf('0x35')](_[_0x6fcf('0x3e')](_0x4a4297['query'],_0x31fa12[_0x6fcf('0x35')]),_0x1a4155);if(_0x4a4297[_0x6fcf('0x33')][_0x6fcf('0x3f')]){_0x145cc4['where']=_[_0x6fcf('0x40')](_0x145cc4['where'],{'$or':_['map'](_0x1a4155,function(_0x1e2780){if(_0x1e2780['type']!==_0x6fcf('0x41')){var _0x23c0b2={};_0x23c0b2[_0x1e2780['name']]={'$like':'%'+_0x4a4297[_0x6fcf('0x33')][_0x6fcf('0x3f')]+'%'};return _0x23c0b2;}})});}_0x145cc4=_[_0x6fcf('0x40')]({},_0x145cc4,_0x4a4297[_0x6fcf('0x42')]);var _0x5be435={'where':_0x145cc4['where']};return db[_0x6fcf('0x2d')]['count'](_0x5be435)['then'](function(_0x15e1fb){_0x3e6ef6[_0x6fcf('0x1b')]=_0x15e1fb;if(_0x4a4297[_0x6fcf('0x33')]['includeAll']){_0x145cc4[_0x6fcf('0x43')]=[{'all':!![]}];}return db['Interval'][_0x6fcf('0x44')](_0x145cc4);})[_0x6fcf('0x26')](function(_0x4af3b1){_0x3e6ef6['rows']=_0x4af3b1;return _0x3e6ef6;})[_0x6fcf('0x26')](respondWithFilteredResult(_0x3ad87c,_0x145cc4))[_0x6fcf('0x45')](handleError(_0x3ad87c,null));};exports[_0x6fcf('0x46')]=function(_0x433583,_0x196eb0){var _0x3b3bc7={'raw':!![],'where':{'id':_0x433583[_0x6fcf('0x47')]['id']}},_0x21f7e1={};_0x21f7e1[_0x6fcf('0x31')]=_[_0x6fcf('0x34')](db[_0x6fcf('0x2d')]['rawAttributes']);_0x21f7e1['query']=_[_0x6fcf('0x34')](_0x433583[_0x6fcf('0x33')]);_0x21f7e1['filters']=_[_0x6fcf('0x37')](_0x21f7e1[_0x6fcf('0x31')],_0x21f7e1[_0x6fcf('0x33')]);_0x3b3bc7[_0x6fcf('0x36')]=_[_0x6fcf('0x37')](_0x21f7e1[_0x6fcf('0x31')],qs[_0x6fcf('0x38')](_0x433583[_0x6fcf('0x33')][_0x6fcf('0x38')]));_0x3b3bc7[_0x6fcf('0x36')]=_0x3b3bc7[_0x6fcf('0x36')][_0x6fcf('0x39')]?_0x3b3bc7['attributes']:_0x21f7e1['model'];if(_0x433583[_0x6fcf('0x33')][_0x6fcf('0x48')]){_0x3b3bc7[_0x6fcf('0x43')]=[{'all':!![]}];}_0x3b3bc7=_[_0x6fcf('0x40')]({},_0x3b3bc7,_0x433583[_0x6fcf('0x42')]);return db[_0x6fcf('0x2d')][_0x6fcf('0x49')](_0x3b3bc7)[_0x6fcf('0x26')](handleEntityNotFound(_0x196eb0,null))[_0x6fcf('0x26')](respondWithResult(_0x196eb0,null))[_0x6fcf('0x45')](handleError(_0x196eb0,null));};exports[_0x6fcf('0x4a')]=function(_0x563c2d,_0x1e1d9b){return db[_0x6fcf('0x2d')][_0x6fcf('0x4a')](_0x563c2d[_0x6fcf('0x4b')],{})[_0x6fcf('0x26')](function(_0x42c778){var _0x1a5a76=_0x563c2d['user'][_0x6fcf('0x24')]({'plain':!![]});if(!_0x1a5a76)throw new Error(_0x6fcf('0x4c'));if(_0x1a5a76[_0x6fcf('0x4d')]===_0x6fcf('0x4e')){var _0x404a71=_0x42c778[_0x6fcf('0x24')]({'plain':!![]});var _0x3f06ff='Intervals';return db['UserProfileSection']['find']({'where':{'name':_0x3f06ff,'userProfileId':_0x1a5a76['userProfileId']},'raw':!![]})[_0x6fcf('0x26')](function(_0xeba3b6){if(_0xeba3b6&&_0xeba3b6[_0x6fcf('0x4f')]===0x0){return db[_0x6fcf('0x25')][_0x6fcf('0x4a')]({'name':_0x404a71[_0x6fcf('0x32')],'resourceId':_0x404a71['id'],'type':_0xeba3b6['name'],'sectionId':_0xeba3b6['id']},{})[_0x6fcf('0x26')](function(){return _0x42c778;});}else{return _0x42c778;}})[_0x6fcf('0x45')](function(_0x769821){logger[_0x6fcf('0x28')](_0x6fcf('0x50'),_0x769821);throw _0x769821;});}return _0x42c778;})[_0x6fcf('0x26')](respondWithResult(_0x1e1d9b,0xc9))[_0x6fcf('0x45')](handleError(_0x1e1d9b,null));};exports['update']=function(_0x2284af,_0x54d6c7){if(_0x2284af[_0x6fcf('0x4b')]['id']){delete _0x2284af[_0x6fcf('0x4b')]['id'];}return db[_0x6fcf('0x2d')][_0x6fcf('0x49')]({'where':{'id':_0x2284af[_0x6fcf('0x47')]['id']}})['then'](handleEntityNotFound(_0x54d6c7,null))['then'](saveUpdates(_0x2284af[_0x6fcf('0x4b')],null))[_0x6fcf('0x26')](respondWithResult(_0x54d6c7,null))['catch'](handleError(_0x54d6c7,null));};exports[_0x6fcf('0x23')]=function(_0x341493,_0x25f550){return db[_0x6fcf('0x2d')]['find']({'where':{'id':_0x341493[_0x6fcf('0x47')]['id']}})[_0x6fcf('0x26')](handleEntityNotFound(_0x25f550,null))[_0x6fcf('0x26')](removeEntity(_0x25f550,null))['catch'](handleError(_0x25f550,null));};exports[_0x6fcf('0x51')]=function(_0x3e7f27,_0x479cbd,_0x538882){if(_0x3e7f27[_0x6fcf('0x4b')]['id']){delete _0x3e7f27[_0x6fcf('0x4b')]['id'];}return db[_0x6fcf('0x2d')]['find']({'where':{'id':_0x3e7f27['params']['id']}})[_0x6fcf('0x26')](handleEntityNotFound(_0x479cbd,null))['then'](function(_0x49e305){if(_0x49e305){_0x3e7f27[_0x6fcf('0x4b')]['IntervalId']=_0x49e305['id'];return db[_0x6fcf('0x2d')][_0x6fcf('0x4a')](_0x3e7f27[_0x6fcf('0x4b')]);}})[_0x6fcf('0x26')](respondWithResult(_0x479cbd,null))['catch'](handleError(_0x479cbd,null));};exports['getIntervals']=function(_0x5d610b,_0x53c5de,_0x580c50){var _0x1eee21={};var _0x44386a={};var _0xe7e4cd;var _0x5dd282;return db[_0x6fcf('0x2d')]['findOne']({'where':{'id':_0x5d610b['params']['id']}})[_0x6fcf('0x26')](handleEntityNotFound(_0x53c5de,null))[_0x6fcf('0x26')](function(_0x44d0e6){if(_0x44d0e6){_0xe7e4cd=_0x44d0e6;_0x44386a['model']=_['keys'](db[_0x6fcf('0x2d')][_0x6fcf('0x2e')]);_0x44386a[_0x6fcf('0x33')]=_['keys'](_0x5d610b[_0x6fcf('0x33')]);_0x44386a[_0x6fcf('0x35')]=_['intersection'](_0x44386a[_0x6fcf('0x31')],_0x44386a['query']);_0x1eee21[_0x6fcf('0x36')]=_[_0x6fcf('0x37')](_0x44386a['model'],qs[_0x6fcf('0x38')](_0x5d610b['query'][_0x6fcf('0x38')]));_0x1eee21[_0x6fcf('0x36')]=_0x1eee21[_0x6fcf('0x36')][_0x6fcf('0x39')]?_0x1eee21['attributes']:_0x44386a[_0x6fcf('0x31')];_0x1eee21['order']=qs['sort'](_0x5d610b['query'][_0x6fcf('0x3c')]);_0x1eee21[_0x6fcf('0x3d')]=qs[_0x6fcf('0x35')](_['pick'](_0x5d610b['query'],_0x44386a[_0x6fcf('0x35')]));if(_0x5d610b[_0x6fcf('0x33')][_0x6fcf('0x3f')]){_0x1eee21[_0x6fcf('0x3d')]=_[_0x6fcf('0x40')](_0x1eee21[_0x6fcf('0x3d')],{'$or':_[_0x6fcf('0x2c')](_0x1eee21[_0x6fcf('0x36')],function(_0xcba8c0){var _0x20389e={};_0x20389e[_0xcba8c0]={'$like':'%'+_0x5d610b[_0x6fcf('0x33')][_0x6fcf('0x3f')]+'%'};return _0x20389e;})});}_0x1eee21=_[_0x6fcf('0x40')]({},_0x1eee21,_0x5d610b[_0x6fcf('0x42')]);return _0xe7e4cd[_0x6fcf('0x52')](_0x1eee21);}})[_0x6fcf('0x26')](function(_0x42eccc){if(_0x42eccc){_0x5dd282=_0x42eccc['length'];if(!_0x5d610b[_0x6fcf('0x33')][_0x6fcf('0x3a')]('nolimit')){_0x1eee21[_0x6fcf('0x1d')]=qs['limit'](_0x5d610b['query'][_0x6fcf('0x1d')]);_0x1eee21[_0x6fcf('0x1c')]=qs['offset'](_0x5d610b[_0x6fcf('0x33')][_0x6fcf('0x1c')]);}return _0xe7e4cd[_0x6fcf('0x52')](_0x1eee21);}})[_0x6fcf('0x26')](function(_0x4d8d9a){if(_0x4d8d9a){return _0x4d8d9a?{'count':_0x5dd282,'rows':_0x4d8d9a}:null;}})['then'](respondWithResult(_0x53c5de,null))[_0x6fcf('0x45')](handleError(_0x53c5de,null));};exports[_0x6fcf('0x53')]=function(_0x3844ca,_0x4309bc,_0x571de2){return db[_0x6fcf('0x2d')][_0x6fcf('0x54')]({'where':{'id':_0x3844ca[_0x6fcf('0x47')]['id']}})[_0x6fcf('0x26')](handleEntityNotFound(_0x4309bc,null))[_0x6fcf('0x26')](function(_0x33681f){if(_0x33681f){return db['sequelize'][_0x6fcf('0x55')](function(_0x4fac17){return db[_0x6fcf('0x2d')][_0x6fcf('0x23')]({'where':{'IntervalId':_0x3844ca[_0x6fcf('0x47')]['id']},'transaction':_0x4fac17})[_0x6fcf('0x26')](function(_0x229c18){var _0x59eb27=_[_0x6fcf('0x2c')](_0x3844ca[_0x6fcf('0x4b')],function(_0x3df18a){delete _0x3df18a['id'];_0x3df18a[_0x6fcf('0x56')]=_0x3844ca[_0x6fcf('0x47')]['id'];return _0x3df18a;});return db[_0x6fcf('0x2d')][_0x6fcf('0x57')](_0x59eb27,{'transaction':_0x4fac17});});})[_0x6fcf('0x26')](function(){return db[_0x6fcf('0x2d')][_0x6fcf('0x44')]({'where':{'IntervalId':_0x3844ca[_0x6fcf('0x47')]['id']}});});}})['then'](respondWithResult(_0x4309bc,null))[_0x6fcf('0x45')](handleError(_0x4309bc,null));};
\ No newline at end of file
index bd1af74..6a44ba7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x428c=['string','interval','getIntervals','then','map','ifTime','./interval.attributes','../../components/extensions/rewrite','exports','rewrite'];(function(_0xb0bc7c,_0x909c6c){var _0x3a7f2f=function(_0x503b1b){while(--_0x503b1b){_0xb0bc7c['push'](_0xb0bc7c['shift']());}};_0x3a7f2f(++_0x909c6c);}(_0x428c,0xb0));var _0xc428=function(_0x166842,_0x21a86c){_0x166842=_0x166842-0x0;var _0x102e2c=_0x428c[_0x166842];return _0x102e2c;};'use strict';var attributes=require(_0xc428('0x0'));var extensions=require(_0xc428('0x1'));var iftime=require('../../utils/iftime')['iftime'];module[_0xc428('0x2')]=function(_0x2427fa){return _0x2427fa['define']('Interval',attributes,{'tableName':'tools_intervals','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x11fa37){extensions[_0xc428('0x3')](_0x2427fa,_0x11fa37);},'afterBulkCreate':function(_0x4ce5aa,_0x5df7e9,_0xfc7b95){_0xfc7b95();extensions[_0xc428('0x3')](_0x2427fa,_0x4ce5aa[0x0]);},'afterUpdate':function(_0x54a8a5){extensions[_0xc428('0x3')](_0x2427fa,_0x54a8a5);},'afterDestroy':function(_0xef897){extensions['rewrite'](_0x2427fa,_0xef897);}},'instanceMethods':{'ifTime':function(_0x24421b=undefined,_0x2c00e=new Date()){if(typeof this['interval']===_0xc428('0x4')){return iftime(this[_0xc428('0x5')],_0x24421b,_0x2c00e);}else{return this[_0xc428('0x6')]()[_0xc428('0x7')](function(_0x2f8df7){return Promise['all'](_0x2f8df7[_0xc428('0x8')](function(_0x793482){return _0x793482[_0xc428('0x9')](_0x24421b,_0x2c00e);}));})[_0xc428('0x7')](function(_0x4820cb){return _0x4820cb['reduce'](function(_0x4123bd,_0xbbb18e){return _0x4123bd||_0xbbb18e;},![]);});}}}});};
\ No newline at end of file
+var _0xa38a=['then','all','map','ifTime','reduce','./interval.attributes','../../components/extensions/rewrite','../../utils/iftime','exports','define','Interval','rewrite','interval','string','getIntervals'];(function(_0x99f5d,_0x4aef98){var _0x21a3fa=function(_0x16e028){while(--_0x16e028){_0x99f5d['push'](_0x99f5d['shift']());}};_0x21a3fa(++_0x4aef98);}(_0xa38a,0x19a));var _0xaa38=function(_0x229b03,_0x2f249f){_0x229b03=_0x229b03-0x0;var _0x149731=_0xa38a[_0x229b03];return _0x149731;};'use strict';var attributes=require(_0xaa38('0x0'));var extensions=require(_0xaa38('0x1'));var iftime=require(_0xaa38('0x2'))['iftime'];module[_0xaa38('0x3')]=function(_0x2b32b0){return _0x2b32b0[_0xaa38('0x4')](_0xaa38('0x5'),attributes,{'tableName':'tools_intervals','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x29f42f){extensions[_0xaa38('0x6')](_0x2b32b0,_0x29f42f);},'afterBulkCreate':function(_0x30e8b4,_0x15cb92,_0x3c9293){_0x3c9293();extensions[_0xaa38('0x6')](_0x2b32b0,_0x30e8b4[0x0]);},'afterUpdate':function(_0x20e743){extensions[_0xaa38('0x6')](_0x2b32b0,_0x20e743);},'afterDestroy':function(_0x4d58c0){extensions[_0xaa38('0x6')](_0x2b32b0,_0x4d58c0);}},'instanceMethods':{'ifTime':function(_0x2a69e1=undefined,_0x2dfc64=new Date()){if(typeof this[_0xaa38('0x7')]===_0xaa38('0x8')){return iftime(this['interval'],_0x2a69e1,_0x2dfc64);}else{return this[_0xaa38('0x9')]()[_0xaa38('0xa')](function(_0x37dfc6){return Promise[_0xaa38('0xb')](_0x37dfc6[_0xaa38('0xc')](function(_0x4b45b3){return _0x4b45b3[_0xaa38('0xd')](_0x2a69e1,_0x2dfc64);}));})[_0xaa38('0xa')](function(_0x4837c7){return _0x4837c7[_0xaa38('0xe')](function(_0x32729a,_0x5242b0){return _0x32729a||_0x5242b0;},![]);});}}}});};
\ No newline at end of file
index 6030368..5ab212d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0263=['IntervalIftime','intervalIds','isArray','intervals','string','length','IntervalIftime:\x20timezone\x20=\x20%s','Iftime','silly','resolve','lodash','../../mysqldb','../../utils/iftime','iftime','../../config/logger','rpc','GetInterval','Interval','findAll','options','raw','where','attributes','limit','include','model','map','then','debug','stringify','catch','error','message','ShowInterval','find','all','reduce','info','format','IntervalIftime:\x20intervals\x20=\x20%s\x20(ids\x20=\x20%s)','join','findById','IntervalIftime:\x20interval\x20=\x20%s\x20(id\x20=\x20%s)','name'];(function(_0x5ec8ed,_0x743ebd){var _0x517d7e=function(_0x362df0){while(--_0x362df0){_0x5ec8ed['push'](_0x5ec8ed['shift']());}};_0x517d7e(++_0x743ebd);}(_0x0263,0xe6));var _0x3026=function(_0x3506e1,_0x24dabc){_0x3506e1=_0x3506e1-0x0;var _0xc87b29=_0x0263[_0x3506e1];return _0xc87b29;};'use strict';var _=require(_0x3026('0x0'));var util=require('util');var db=require(_0x3026('0x1'))['db'];var iftime=require(_0x3026('0x2'))[_0x3026('0x3')];var logger=require(_0x3026('0x4'))(_0x3026('0x5'));exports[_0x3026('0x6')]=function(_0x502159){var _0x51974e=this;return new Promise(function(_0x4aa318,_0xa3ac2d){return db[_0x3026('0x7')][_0x3026('0x8')]({'raw':_0x502159[_0x3026('0x9')]?_0x502159[_0x3026('0x9')][_0x3026('0xa')]===undefined?!![]:![]:!![],'where':_0x502159[_0x3026('0x9')]?_0x502159[_0x3026('0x9')][_0x3026('0xb')]||null:null,'attributes':_0x502159[_0x3026('0x9')]?_0x502159[_0x3026('0x9')][_0x3026('0xc')]||null:null,'limit':_0x502159['options']?_0x502159['options'][_0x3026('0xd')]||null:null,'include':_0x502159['options']?_0x502159[_0x3026('0x9')][_0x3026('0xe')]?_['map'](_0x502159['options'][_0x3026('0xe')],function(_0x4ad8b1){return{'model':db[_0x4ad8b1[_0x3026('0xf')]],'as':_0x4ad8b1['as'],'attributes':_0x4ad8b1[_0x3026('0xc')],'include':_0x4ad8b1[_0x3026('0xe')]?_[_0x3026('0x10')](_0x4ad8b1[_0x3026('0xe')],function(_0x51a719){return{'model':db[_0x51a719['model']],'as':_0x51a719['as'],'attributes':_0x51a719['attributes'],'include':_0x51a719[_0x3026('0xe')]?_[_0x3026('0x10')](_0x51a719[_0x3026('0xe')],function(_0x4405ec){return{'model':db[_0x4405ec['model']],'as':_0x4405ec['as'],'attributes':_0x4405ec[_0x3026('0xc')]};}):[]};}):[]};}):[]:[]})[_0x3026('0x11')](function(_0x580083){logger['info']('GetInterval',_0x502159);logger[_0x3026('0x12')]('GetInterval',_0x502159,JSON[_0x3026('0x13')](_0x580083));_0x4aa318(_0x580083);})[_0x3026('0x14')](function(_0x31f9d6){logger[_0x3026('0x15')](_0x3026('0x6'),_0x31f9d6[_0x3026('0x16')],_0x502159);_0xa3ac2d(_0x51974e[_0x3026('0x15')](0x1f4,_0x31f9d6['message']));});});};exports[_0x3026('0x17')]=function(_0xdc1c59){var _0x1e993b=this;return new Promise(function(_0x470f7d,_0x47e3a5){return db[_0x3026('0x7')][_0x3026('0x18')]({'raw':_0xdc1c59[_0x3026('0x9')]?_0xdc1c59[_0x3026('0x9')]['raw']===undefined?!![]:![]:!![],'where':_0xdc1c59[_0x3026('0x9')]?_0xdc1c59['options'][_0x3026('0xb')]||null:null,'attributes':_0xdc1c59[_0x3026('0x9')]?_0xdc1c59['options'][_0x3026('0xc')]||null:null,'include':_0xdc1c59[_0x3026('0x9')]?_0xdc1c59[_0x3026('0x9')]['include']?_[_0x3026('0x10')](_0xdc1c59[_0x3026('0x9')][_0x3026('0xe')],function(_0x3ada8c){return{'model':db[_0x3ada8c[_0x3026('0xf')]],'as':_0x3ada8c['as'],'attributes':_0x3ada8c['attributes'],'include':_0x3ada8c[_0x3026('0xe')]?_['map'](_0x3ada8c['include'],function(_0x451c5a){return{'model':db[_0x451c5a['model']],'as':_0x451c5a['as'],'attributes':_0x451c5a[_0x3026('0xc')],'include':_0x451c5a['include']?_[_0x3026('0x10')](_0x451c5a[_0x3026('0xe')],function(_0x446229){return{'model':db[_0x446229[_0x3026('0xf')]],'as':_0x446229['as'],'attributes':_0x446229[_0x3026('0xc')]};}):[]};}):[]};}):[]:[]})[_0x3026('0x11')](function(_0x504311){logger['info'](_0x3026('0x17'),_0xdc1c59);logger['debug']('ShowInterval',_0xdc1c59,JSON['stringify'](_0x504311));_0x470f7d(_0x504311);})[_0x3026('0x14')](function(_0x12bc9c){logger[_0x3026('0x15')](_0x3026('0x17'),_0x12bc9c[_0x3026('0x16')],_0xdc1c59);_0x47e3a5(_0x1e993b[_0x3026('0x15')](0x1f4,_0x12bc9c['message']));});});};function checkArrayOfIntervals(_0x199afd,_0x554de2){var _0x497e9c=[];return db['Interval'][_0x3026('0x8')]({'where':{'id':_0x199afd}})['then'](function(_0x11588c){_0x497e9c=_0x11588c;return Promise[_0x3026('0x19')](_0x497e9c['map'](function(_0x73f1ff){return _0x73f1ff['ifTime'](_0x554de2);}));})['then'](function(_0x2b5dfd){var _0xb805b8=_0x2b5dfd[_0x3026('0x1a')](function(_0x490a6e,_0x39e24b){return _0x490a6e||_0x39e24b;},![]);logger[_0x3026('0x1b')](util[_0x3026('0x1c')](_0x3026('0x1d'),_0x497e9c['map'](function(_0x25ca9d){return _0x25ca9d['name'];})[_0x3026('0x1e')](',\x20'),_0x497e9c[_0x3026('0x10')](function(_0xbbd7b4){return _0xbbd7b4['id'];})[_0x3026('0x1e')](',\x20')));return _0xb805b8;});}function checkSingleInterval(_0x24e78,_0x562713){return db[_0x3026('0x7')][_0x3026('0x1f')](_0x24e78)[_0x3026('0x11')](function(_0x39a1c3){if(_0x39a1c3){logger[_0x3026('0x1b')](util[_0x3026('0x1c')](_0x3026('0x20'),_0x39a1c3[_0x3026('0x21')],_0x39a1c3['id']));return _0x39a1c3['ifTime'](_0x562713);}});}exports[_0x3026('0x22')]=function(_0x4be9a5){var _0x380f09=_0x4be9a5[_0x3026('0x23')];var _0x48e884=Array[_0x3026('0x24')](_0x4be9a5['intervals'])?_0x4be9a5['intervals']:typeof _0x4be9a5[_0x3026('0x25')]===_0x3026('0x26')?[_0x4be9a5[_0x3026('0x25')]]:[];var _0x1390c9=_0x4be9a5['timezone']||undefined;var _0x46d9f9=![];if(_0x48e884[_0x3026('0x27')]){logger['info'](util[_0x3026('0x1c')]('IntervalIftime:\x20interval\x20strings\x20=\x20%s',_0x48e884[_0x3026('0x1e')](';\x20')));}if(_0x1390c9){logger[_0x3026('0x1b')](util[_0x3026('0x1c')](_0x3026('0x28'),_0x1390c9));}logger[_0x3026('0x12')](_0x3026('0x29'),_0x46d9f9);logger[_0x3026('0x2a')]('IntervalIftime',_0x4be9a5);return Promise[_0x3026('0x2b')]()[_0x3026('0x11')](function(){if(Array[_0x3026('0x24')](_0x380f09)){return checkArrayOfIntervals(_0x380f09,_0x1390c9);}else if(_0x380f09){return checkSingleInterval(_0x380f09,_0x1390c9);}})[_0x3026('0x11')](function(_0x4a487b){var _0x51a6c9=_0x48e884['reduce'](function(_0x1b12f1,_0xbae716){return _0x1b12f1||iftime(_0xbae716,_0x1390c9);},![]);_0x46d9f9=_0x4a487b||_0x51a6c9;return _0x46d9f9;})['catch'](function(_0x4609c7){logger[_0x3026('0x15')](_0x3026('0x22'),_0x4be9a5,_0x4609c7);throw this[_0x3026('0x15')](0x1f4,_0x4609c7[_0x3026('0x16')]);});};
\ No newline at end of file
+var _0xc046=['ifTime','reduce','format','IntervalIftime:\x20intervals\x20=\x20%s\x20(ids\x20=\x20%s)','join','findById','IntervalIftime:\x20interval\x20=\x20%s\x20(id\x20=\x20%s)','name','IntervalIftime','intervalIds','intervals','string','length','IntervalIftime:\x20interval\x20strings\x20=\x20%s','Iftime','resolve','util','../../mysqldb','../../utils/iftime','iftime','../../config/logger','rpc','GetInterval','Interval','findAll','options','raw','where','include','map','model','attributes','then','info','debug','stringify','error','message','ShowInterval','find','catch','all'];(function(_0x41428b,_0xe6dbc7){var _0x3d32df=function(_0x2cd3c9){while(--_0x2cd3c9){_0x41428b['push'](_0x41428b['shift']());}};_0x3d32df(++_0xe6dbc7);}(_0xc046,0x18a));var _0x6c04=function(_0x10d283,_0x4a73b9){_0x10d283=_0x10d283-0x0;var _0x5d95a3=_0xc046[_0x10d283];return _0x5d95a3;};'use strict';var _=require('lodash');var util=require(_0x6c04('0x0'));var db=require(_0x6c04('0x1'))['db'];var iftime=require(_0x6c04('0x2'))[_0x6c04('0x3')];var logger=require(_0x6c04('0x4'))(_0x6c04('0x5'));exports[_0x6c04('0x6')]=function(_0x41e2d8){var _0x46d3b5=this;return new Promise(function(_0xedfa75,_0x363b4d){return db[_0x6c04('0x7')][_0x6c04('0x8')]({'raw':_0x41e2d8[_0x6c04('0x9')]?_0x41e2d8[_0x6c04('0x9')][_0x6c04('0xa')]===undefined?!![]:![]:!![],'where':_0x41e2d8[_0x6c04('0x9')]?_0x41e2d8[_0x6c04('0x9')][_0x6c04('0xb')]||null:null,'attributes':_0x41e2d8[_0x6c04('0x9')]?_0x41e2d8[_0x6c04('0x9')]['attributes']||null:null,'limit':_0x41e2d8[_0x6c04('0x9')]?_0x41e2d8[_0x6c04('0x9')]['limit']||null:null,'include':_0x41e2d8['options']?_0x41e2d8[_0x6c04('0x9')][_0x6c04('0xc')]?_[_0x6c04('0xd')](_0x41e2d8['options']['include'],function(_0x5f5b31){return{'model':db[_0x5f5b31[_0x6c04('0xe')]],'as':_0x5f5b31['as'],'attributes':_0x5f5b31[_0x6c04('0xf')],'include':_0x5f5b31[_0x6c04('0xc')]?_[_0x6c04('0xd')](_0x5f5b31[_0x6c04('0xc')],function(_0x4dcbcb){return{'model':db[_0x4dcbcb[_0x6c04('0xe')]],'as':_0x4dcbcb['as'],'attributes':_0x4dcbcb[_0x6c04('0xf')],'include':_0x4dcbcb[_0x6c04('0xc')]?_[_0x6c04('0xd')](_0x4dcbcb[_0x6c04('0xc')],function(_0x19702d){return{'model':db[_0x19702d[_0x6c04('0xe')]],'as':_0x19702d['as'],'attributes':_0x19702d[_0x6c04('0xf')]};}):[]};}):[]};}):[]:[]})[_0x6c04('0x10')](function(_0x23bb66){logger[_0x6c04('0x11')](_0x6c04('0x6'),_0x41e2d8);logger[_0x6c04('0x12')](_0x6c04('0x6'),_0x41e2d8,JSON[_0x6c04('0x13')](_0x23bb66));_0xedfa75(_0x23bb66);})['catch'](function(_0x33d78d){logger[_0x6c04('0x14')](_0x6c04('0x6'),_0x33d78d[_0x6c04('0x15')],_0x41e2d8);_0x363b4d(_0x46d3b5[_0x6c04('0x14')](0x1f4,_0x33d78d[_0x6c04('0x15')]));});});};exports[_0x6c04('0x16')]=function(_0x19970d){var _0x2a7228=this;return new Promise(function(_0x2c7294,_0x31d60e){return db[_0x6c04('0x7')][_0x6c04('0x17')]({'raw':_0x19970d[_0x6c04('0x9')]?_0x19970d[_0x6c04('0x9')]['raw']===undefined?!![]:![]:!![],'where':_0x19970d[_0x6c04('0x9')]?_0x19970d['options'][_0x6c04('0xb')]||null:null,'attributes':_0x19970d[_0x6c04('0x9')]?_0x19970d[_0x6c04('0x9')][_0x6c04('0xf')]||null:null,'include':_0x19970d[_0x6c04('0x9')]?_0x19970d[_0x6c04('0x9')][_0x6c04('0xc')]?_[_0x6c04('0xd')](_0x19970d[_0x6c04('0x9')][_0x6c04('0xc')],function(_0x3ec95b){return{'model':db[_0x3ec95b[_0x6c04('0xe')]],'as':_0x3ec95b['as'],'attributes':_0x3ec95b[_0x6c04('0xf')],'include':_0x3ec95b[_0x6c04('0xc')]?_['map'](_0x3ec95b[_0x6c04('0xc')],function(_0x7a0259){return{'model':db[_0x7a0259['model']],'as':_0x7a0259['as'],'attributes':_0x7a0259[_0x6c04('0xf')],'include':_0x7a0259[_0x6c04('0xc')]?_[_0x6c04('0xd')](_0x7a0259[_0x6c04('0xc')],function(_0x36c615){return{'model':db[_0x36c615['model']],'as':_0x36c615['as'],'attributes':_0x36c615[_0x6c04('0xf')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2cf82b){logger[_0x6c04('0x11')]('ShowInterval',_0x19970d);logger[_0x6c04('0x12')](_0x6c04('0x16'),_0x19970d,JSON[_0x6c04('0x13')](_0x2cf82b));_0x2c7294(_0x2cf82b);})[_0x6c04('0x18')](function(_0x10bd27){logger[_0x6c04('0x14')](_0x6c04('0x16'),_0x10bd27[_0x6c04('0x15')],_0x19970d);_0x31d60e(_0x2a7228[_0x6c04('0x14')](0x1f4,_0x10bd27['message']));});});};function checkArrayOfIntervals(_0x19ea86,_0x3e4c79){var _0x4b8eae=[];return db[_0x6c04('0x7')]['findAll']({'where':{'id':_0x19ea86}})[_0x6c04('0x10')](function(_0xd4a5c8){_0x4b8eae=_0xd4a5c8;return Promise[_0x6c04('0x19')](_0x4b8eae[_0x6c04('0xd')](function(_0x52fa5d){return _0x52fa5d[_0x6c04('0x1a')](_0x3e4c79);}));})[_0x6c04('0x10')](function(_0x3df0c7){var _0x39f0e7=_0x3df0c7[_0x6c04('0x1b')](function(_0x2f3227,_0x321443){return _0x2f3227||_0x321443;},![]);logger['info'](util[_0x6c04('0x1c')](_0x6c04('0x1d'),_0x4b8eae[_0x6c04('0xd')](function(_0x409dd8){return _0x409dd8['name'];})[_0x6c04('0x1e')](',\x20'),_0x4b8eae[_0x6c04('0xd')](function(_0x4be77e){return _0x4be77e['id'];})[_0x6c04('0x1e')](',\x20')));return _0x39f0e7;});}function checkSingleInterval(_0x25f7e5,_0x3ecb80){return db[_0x6c04('0x7')][_0x6c04('0x1f')](_0x25f7e5)[_0x6c04('0x10')](function(_0xc607){if(_0xc607){logger[_0x6c04('0x11')](util[_0x6c04('0x1c')](_0x6c04('0x20'),_0xc607[_0x6c04('0x21')],_0xc607['id']));return _0xc607[_0x6c04('0x1a')](_0x3ecb80);}});}exports[_0x6c04('0x22')]=function(_0x476e2a){var _0x4dbdec=_0x476e2a[_0x6c04('0x23')];var _0x130638=Array['isArray'](_0x476e2a[_0x6c04('0x24')])?_0x476e2a[_0x6c04('0x24')]:typeof _0x476e2a[_0x6c04('0x24')]===_0x6c04('0x25')?[_0x476e2a[_0x6c04('0x24')]]:[];var _0x48dc5e=_0x476e2a['timezone']||undefined;var _0x53b273=![];if(_0x130638[_0x6c04('0x26')]){logger[_0x6c04('0x11')](util[_0x6c04('0x1c')](_0x6c04('0x27'),_0x130638[_0x6c04('0x1e')](';\x20')));}if(_0x48dc5e){logger['info'](util['format']('IntervalIftime:\x20timezone\x20=\x20%s',_0x48dc5e));}logger[_0x6c04('0x12')](_0x6c04('0x28'),_0x53b273);logger['silly']('IntervalIftime',_0x476e2a);return Promise[_0x6c04('0x29')]()[_0x6c04('0x10')](function(){if(Array['isArray'](_0x4dbdec)){return checkArrayOfIntervals(_0x4dbdec,_0x48dc5e);}else if(_0x4dbdec){return checkSingleInterval(_0x4dbdec,_0x48dc5e);}})[_0x6c04('0x10')](function(_0x4c955c){var _0x1f007f=_0x130638[_0x6c04('0x1b')](function(_0x4253b3,_0x5f4df8){return _0x4253b3||iftime(_0x5f4df8,_0x48dc5e);},![]);_0x53b273=_0x4c955c||_0x1f007f;return _0x53b273;})[_0x6c04('0x18')](function(_0x16090b){logger[_0x6c04('0x14')]('IntervalIftime',_0x476e2a,_0x16090b);throw this[_0x6c04('0x14')](0x1f4,_0x16090b['message']);});};
\ No newline at end of file
index a8733d6..669cfa7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2ef3=['./jira.controller','post','isAuthenticated','exports','express','Router','../../components/auth/service'];(function(_0x5d8dc5,_0x5da1c9){var _0x6eb9f5=function(_0x3c4068){while(--_0x3c4068){_0x5d8dc5['push'](_0x5d8dc5['shift']());}};_0x6eb9f5(++_0x5da1c9);}(_0x2ef3,0xba));var _0x32ef=function(_0xa941b0,_0x4ecab2){_0xa941b0=_0xa941b0-0x0;var _0x41ed69=_0x2ef3[_0xa941b0];return _0x41ed69;};'use strict';var express=require(_0x32ef('0x0'));var router=express[_0x32ef('0x1')]();var auth=require(_0x32ef('0x2'));var controller=require(_0x32ef('0x3'));router[_0x32ef('0x4')]('/',auth[_0x32ef('0x5')](),controller['send']);module[_0x32ef('0x6')]=router;
\ No newline at end of file
+var _0x2032=['isAuthenticated','send','Router','../../components/auth/service','./jira.controller'];(function(_0x4b2461,_0x23e6f8){var _0x32ffcb=function(_0x34bfc0){while(--_0x34bfc0){_0x4b2461['push'](_0x4b2461['shift']());}};_0x32ffcb(++_0x23e6f8);}(_0x2032,0xd9));var _0x2203=function(_0x5554db,_0x32937d){_0x5554db=_0x5554db-0x0;var _0x1b60e4=_0x2032[_0x5554db];return _0x1b60e4;};'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 007a065..f87476c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1f3e=['support','3eAmWpBVP0','key','MOTGUI','summary','\x20from\x20','issuetype','Bug','fields','email','oldToken','newToken','customfield_11503','name','customfield_11504','reason','customfield_10102','track.xcallymotion.com','POST','application/json','Basic\x20','base64','stringify','request','setEncoding','end','statusCode','json','parse','error','status','Error\x20during\x20license\x20request.\x20Please\x20contact\x20our\x20license\x20team\x20at\x20license@xcally.com\x20with\x20your\x20request','api.jira','write','openIssue','send','body','headers','connection','remoteAddress','socket','bluebird','api'];(function(_0x274638,_0x578968){var _0x5755df=function(_0x3227d5){while(--_0x3227d5){_0x274638['push'](_0x274638['shift']());}};_0x5755df(++_0x578968);}(_0x1f3e,0x181));var _0xe1f3=function(_0x2ec8d4,_0x386ddb){_0x2ec8d4=_0x2ec8d4-0x0;var _0x6007e7=_0x1f3e[_0x2ec8d4];return _0x6007e7;};'use strict';var BPromise=require(_0xe1f3('0x0'));var https=require('https');var logger=require('../../config/logger')(_0xe1f3('0x1'));var USERNAME=_0xe1f3('0x2');var PASSWORD=_0xe1f3('0x3');function openIssue(_0x34fc53,_0x3d835b){var _0x1153e9={'fields':{'project':{'key':_0x34fc53[_0xe1f3('0x4')]||_0xe1f3('0x5')},'summary':(_0x34fc53[_0xe1f3('0x6')]||'Report')+_0xe1f3('0x7')+_0x34fc53['ip'],'description':_0x34fc53['description']||JSON['stringify'](_0x34fc53),'issuetype':{'name':_0x34fc53[_0xe1f3('0x8')]||_0xe1f3('0x9')}}};_0x1153e9[_0xe1f3('0xa')]['customfield_11500']=_0x34fc53[_0xe1f3('0xb')];_0x1153e9[_0xe1f3('0xa')]['customfield_11501']=_0x34fc53[_0xe1f3('0xc')];_0x1153e9[_0xe1f3('0xa')]['customfield_11502']=_0x34fc53[_0xe1f3('0xd')];_0x1153e9['fields'][_0xe1f3('0xe')]=_0x34fc53[_0xe1f3('0xf')];_0x1153e9[_0xe1f3('0xa')][_0xe1f3('0x10')]=_0x34fc53[_0xe1f3('0x11')];_0x1153e9[_0xe1f3('0xa')][_0xe1f3('0x12')]=_0x34fc53['ip'];var _0x58b632={'host':_0xe1f3('0x13'),'port':0x1bb,'path':'/rest/api/2/issue','method':_0xe1f3('0x14'),'timeout':0x4e20,'headers':{'Content-Type':_0xe1f3('0x15'),'Authorization':_0xe1f3('0x16')+new Buffer(USERNAME+':'+PASSWORD)['toString'](_0xe1f3('0x17'))}};var _0x15c983=JSON[_0xe1f3('0x18')](_0x1153e9);var _0x283d70=https[_0xe1f3('0x19')](_0x58b632,function(_0x1b4343){_0x1b4343[_0xe1f3('0x1a')]('utf8');var _0x2661a1='';_0x1b4343['on']('data',function(_0x161146){_0x2661a1+=_0x161146;});_0x1b4343['on'](_0xe1f3('0x1b'),function(){if(_0x3d835b){return _0x3d835b['status'](_0x1b4343[_0xe1f3('0x1c')])[_0xe1f3('0x1d')](JSON[_0xe1f3('0x1e')](_0x2661a1));}});});_0x283d70['on'](_0xe1f3('0x1f'),function(_0x7da5d6){if(_0x3d835b){return _0x3d835b[_0xe1f3('0x20')](0x1f4)[_0xe1f3('0x1d')]({'errors':[{'message':_0xe1f3('0x21'),'type':_0xe1f3('0x22')}]});}});_0x283d70[_0xe1f3('0x23')](_0x15c983);_0x283d70[_0xe1f3('0x1b')]();}exports[_0xe1f3('0x24')]=openIssue;exports[_0xe1f3('0x25')]=function(_0x4a61b2,_0x5b312f){_0x4a61b2[_0xe1f3('0x26')]['ip']=_0x4a61b2[_0xe1f3('0x27')]['x-forwarded-for']||_0x4a61b2[_0xe1f3('0x28')][_0xe1f3('0x29')]||_0x4a61b2[_0xe1f3('0x2a')][_0xe1f3('0x29')]||_0x4a61b2[_0xe1f3('0x28')]['socket'][_0xe1f3('0x29')];return openIssue(_0x4a61b2[_0xe1f3('0x26')],_0x5b312f);};
\ No newline at end of file
+var _0xea32=['statusCode','json','parse','api.jira','send','headers','x-forwarded-for','connection','remoteAddress','socket','body','support','3eAmWpBVP0','key','MOTGUI','summary','Report','\x20from\x20','description','stringify','issuetype','Bug','email','oldToken','fields','customfield_11502','newToken','customfield_11503','name','customfield_11504','reason','track.xcallymotion.com','/rest/api/2/issue','POST','application/json','Basic\x20','toString','base64','utf8','end','status'];(function(_0x2dc252,_0x5decba){var _0x26bf1c=function(_0x55b99a){while(--_0x55b99a){_0x2dc252['push'](_0x2dc252['shift']());}};_0x26bf1c(++_0x5decba);}(_0xea32,0xaf));var _0x2ea3=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xea32[_0x20a584];return _0x4b41a8;};'use strict';var BPromise=require('bluebird');var https=require('https');var logger=require('../../config/logger')('api');var USERNAME=_0x2ea3('0x0');var PASSWORD=_0x2ea3('0x1');function openIssue(_0x40564c,_0x4c7b09){var _0x1af331={'fields':{'project':{'key':_0x40564c[_0x2ea3('0x2')]||_0x2ea3('0x3')},'summary':(_0x40564c[_0x2ea3('0x4')]||_0x2ea3('0x5'))+_0x2ea3('0x6')+_0x40564c['ip'],'description':_0x40564c[_0x2ea3('0x7')]||JSON[_0x2ea3('0x8')](_0x40564c),'issuetype':{'name':_0x40564c[_0x2ea3('0x9')]||_0x2ea3('0xa')}}};_0x1af331['fields']['customfield_11500']=_0x40564c[_0x2ea3('0xb')];_0x1af331['fields']['customfield_11501']=_0x40564c[_0x2ea3('0xc')];_0x1af331[_0x2ea3('0xd')][_0x2ea3('0xe')]=_0x40564c[_0x2ea3('0xf')];_0x1af331[_0x2ea3('0xd')][_0x2ea3('0x10')]=_0x40564c[_0x2ea3('0x11')];_0x1af331[_0x2ea3('0xd')][_0x2ea3('0x12')]=_0x40564c[_0x2ea3('0x13')];_0x1af331[_0x2ea3('0xd')]['customfield_10102']=_0x40564c['ip'];var _0x673c53={'host':_0x2ea3('0x14'),'port':0x1bb,'path':_0x2ea3('0x15'),'method':_0x2ea3('0x16'),'timeout':0x4e20,'headers':{'Content-Type':_0x2ea3('0x17'),'Authorization':_0x2ea3('0x18')+new Buffer(USERNAME+':'+PASSWORD)[_0x2ea3('0x19')](_0x2ea3('0x1a'))}};var _0xc76a5b=JSON[_0x2ea3('0x8')](_0x1af331);var _0x13db28=https['request'](_0x673c53,function(_0x50ea46){_0x50ea46['setEncoding'](_0x2ea3('0x1b'));var _0x416f9d='';_0x50ea46['on']('data',function(_0x409f0c){_0x416f9d+=_0x409f0c;});_0x50ea46['on'](_0x2ea3('0x1c'),function(){if(_0x4c7b09){return _0x4c7b09[_0x2ea3('0x1d')](_0x50ea46[_0x2ea3('0x1e')])[_0x2ea3('0x1f')](JSON[_0x2ea3('0x20')](_0x416f9d));}});});_0x13db28['on']('error',function(_0x19e622){if(_0x4c7b09){return _0x4c7b09[_0x2ea3('0x1d')](0x1f4)[_0x2ea3('0x1f')]({'errors':[{'message':'Error\x20during\x20license\x20request.\x20Please\x20contact\x20our\x20license\x20team\x20at\x20license@xcally.com\x20with\x20your\x20request','type':_0x2ea3('0x21')}]});}});_0x13db28['write'](_0xc76a5b);_0x13db28[_0x2ea3('0x1c')]();}exports['openIssue']=openIssue;exports[_0x2ea3('0x22')]=function(_0x8a3100,_0x268efe){_0x8a3100['body']['ip']=_0x8a3100[_0x2ea3('0x23')][_0x2ea3('0x24')]||_0x8a3100[_0x2ea3('0x25')][_0x2ea3('0x26')]||_0x8a3100[_0x2ea3('0x27')][_0x2ea3('0x26')]||_0x8a3100[_0x2ea3('0x25')]['socket'][_0x2ea3('0x26')];return openIssue(_0x8a3100[_0x2ea3('0x28')],_0x268efe);};
\ No newline at end of file
index ffd1822..b26d062 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x878f=['./jscriptyAnswerReport.controller','get','/describe','/:id','post','isAuthenticated','create','delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x5db99b,_0xdee23a){var _0x4b2d0e=function(_0x4deee1){while(--_0x4deee1){_0x5db99b['push'](_0x5db99b['shift']());}};_0x4b2d0e(++_0xdee23a);}(_0x878f,0x173));var _0xf878=function(_0x4f8df4,_0x1fc935){_0x4f8df4=_0x4f8df4-0x0;var _0x4ac595=_0x878f[_0x4f8df4];return _0x4ac595;};'use strict';var multer=require('multer');var util=require(_0xf878('0x0'));var path=require(_0xf878('0x1'));var timeout=require(_0xf878('0x2'));var express=require(_0xf878('0x3'));var router=express[_0xf878('0x4')]();var fs_extra=require(_0xf878('0x5'));var auth=require(_0xf878('0x6'));var interaction=require(_0xf878('0x7'));var config=require(_0xf878('0x8'));var controller=require(_0xf878('0x9'));router[_0xf878('0xa')]('/',auth['isAuthenticated'](),controller['index']);router[_0xf878('0xa')](_0xf878('0xb'),auth['isAuthenticated'](),controller['describe']);router['get'](_0xf878('0xc'),auth['isAuthenticated'](),controller['show']);router[_0xf878('0xd')]('/',auth[_0xf878('0xe')](),controller[_0xf878('0xf')]);router['put'](_0xf878('0xc'),auth[_0xf878('0xe')](),controller['update']);router[_0xf878('0x10')]('/:id',auth[_0xf878('0xe')](),controller[_0xf878('0x11')]);module[_0xf878('0x12')]=router;
\ No newline at end of file
+var _0xa8a8=['create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./jscriptyAnswerReport.controller','get','isAuthenticated','index','/describe','describe','/:id','post'];(function(_0x5a2285,_0x3212d1){var _0x48f6ed=function(_0x322127){while(--_0x322127){_0x5a2285['push'](_0x5a2285['shift']());}};_0x48f6ed(++_0x3212d1);}(_0xa8a8,0xec));var _0x8a8a=function(_0x31aa8f,_0x7179d7){_0x31aa8f=_0x31aa8f-0x0;var _0x5b1e14=_0xa8a8[_0x31aa8f];return _0x5b1e14;};'use strict';var multer=require(_0x8a8a('0x0'));var util=require(_0x8a8a('0x1'));var path=require(_0x8a8a('0x2'));var timeout=require(_0x8a8a('0x3'));var express=require('express');var router=express[_0x8a8a('0x4')]();var fs_extra=require(_0x8a8a('0x5'));var auth=require(_0x8a8a('0x6'));var interaction=require(_0x8a8a('0x7'));var config=require(_0x8a8a('0x8'));var controller=require(_0x8a8a('0x9'));router[_0x8a8a('0xa')]('/',auth[_0x8a8a('0xb')](),controller[_0x8a8a('0xc')]);router[_0x8a8a('0xa')](_0x8a8a('0xd'),auth[_0x8a8a('0xb')](),controller[_0x8a8a('0xe')]);router[_0x8a8a('0xa')](_0x8a8a('0xf'),auth['isAuthenticated'](),controller['show']);router[_0x8a8a('0x10')]('/',auth['isAuthenticated'](),controller[_0x8a8a('0x11')]);router[_0x8a8a('0x12')]('/:id',auth[_0x8a8a('0xb')](),controller[_0x8a8a('0x13')]);router[_0x8a8a('0x14')]('/:id',auth[_0x8a8a('0xb')](),controller[_0x8a8a('0x15')]);module[_0x8a8a('0x16')]=router;
\ No newline at end of file
index 04d2e03..7d275f3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a54=['long','STRING','sequelize','exports','TEXT'];(function(_0x2070da,_0x45e586){var _0x4f9fe1=function(_0x5b6f2a){while(--_0x5b6f2a){_0x2070da['push'](_0x2070da['shift']());}};_0x4f9fe1(++_0x45e586);}(_0x7a54,0x106));var _0x47a5=function(_0x4928df,_0xe409d6){_0x4928df=_0x4928df-0x0;var _0x4f46c9=_0x7a54[_0x4928df];return _0x4f46c9;};'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(_0x1b2ff7,_0x12a034){var _0x31656a=function(_0x1165a5){while(--_0x1165a5){_0x1b2ff7['push'](_0x1b2ff7['shift']());}};_0x31656a(++_0x12a034);}(_0x7a54,0x106));var _0x47a5=function(_0x2c0d76,_0x3e662f){_0x2c0d76=_0x2c0d76-0x0;var _0x425051=_0x7a54[_0x2c0d76];return _0x425051;};'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 aae3964..06d0fe3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3edc=['api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','undefined','limit','count','offset','set','Content-Range','json','save','then','destroy','status','error','stack','name','send','index','map','JscriptyAnswerReport','fieldName','type','model','query','keys','intersection','attributes','fields','length','nolimit','order','sort','filters','filter','where','merge','VIRTUAL','options','include','findAll','rows','catch','show','params','includeAll','find','create','update','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../config/logger'];(function(_0x57f7de,_0x1b1699){var _0x3d1dd9=function(_0x1e60cc){while(--_0x1e60cc){_0x57f7de['push'](_0x57f7de['shift']());}};_0x3d1dd9(++_0x1b1699);}(_0x3edc,0x1ae));var _0xc3ed=function(_0x4e0c31,_0x208e9f){_0x4e0c31=_0x4e0c31-0x0;var _0x3fd7df=_0x3edc[_0x4e0c31];return _0x3fd7df;};'use strict';var emlformat=require(_0xc3ed('0x0'));var rimraf=require(_0xc3ed('0x1'));var zipdir=require(_0xc3ed('0x2'));var jsonpatch=require(_0xc3ed('0x3'));var rp=require(_0xc3ed('0x4'));var moment=require('moment');var BPromise=require(_0xc3ed('0x5'));var Mustache=require('mustache');var util=require(_0xc3ed('0x6'));var path=require(_0xc3ed('0x7'));var sox=require(_0xc3ed('0x8'));var csv=require(_0xc3ed('0x9'));var ejs=require(_0xc3ed('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xc3ed('0xb'));var squel=require(_0xc3ed('0xc'));var crypto=require(_0xc3ed('0xd'));var jsforce=require(_0xc3ed('0xe'));var deskjs=require(_0xc3ed('0xf'));var toCsv=require(_0xc3ed('0x9'));var querystring=require('querystring');var Papa=require(_0xc3ed('0x10'));var Redis=require(_0xc3ed('0x11'));var authService=require(_0xc3ed('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xc3ed('0x13'))(_0xc3ed('0x14'));var utils=require(_0xc3ed('0x15'));var config=require(_0xc3ed('0x16'));var licenseUtil=require(_0xc3ed('0x17'));var db=require(_0xc3ed('0x18'))['db'];function respondWithStatusCode(_0x430db2,_0x394517){_0x394517=_0x394517||0xcc;return function(_0x3cc51e){if(_0x3cc51e){return _0x430db2[_0xc3ed('0x19')](_0x394517);}return _0x430db2['status'](_0x394517)[_0xc3ed('0x1a')]();};}function respondWithResult(_0x2fc82d,_0x12f718){_0x12f718=_0x12f718||0xc8;return function(_0x2eb6f3){if(_0x2eb6f3){return _0x2fc82d['status'](_0x12f718)['json'](_0x2eb6f3);}};}function respondWithFilteredResult(_0x59f603,_0x5a1715){return function(_0x30f93a){if(_0x30f93a){var _0x15a654=typeof _0x5a1715['offset']===_0xc3ed('0x1b')&&typeof _0x5a1715[_0xc3ed('0x1c')]==='undefined';var _0x498d53=_0x30f93a[_0xc3ed('0x1d')];var _0x3c3c7a=_0x15a654?0x0:_0x5a1715['offset'];var _0x64e548=_0x15a654?_0x30f93a[_0xc3ed('0x1d')]:_0x5a1715[_0xc3ed('0x1e')]+_0x5a1715[_0xc3ed('0x1c')];var _0x439a2e;if(_0x64e548>=_0x498d53){_0x64e548=_0x498d53;_0x439a2e=0xc8;}else{_0x439a2e=0xce;}_0x59f603['status'](_0x439a2e);return _0x59f603[_0xc3ed('0x1f')](_0xc3ed('0x20'),_0x3c3c7a+'-'+_0x64e548+'/'+_0x498d53)[_0xc3ed('0x21')](_0x30f93a);}return null;};}function patchUpdates(_0x17a727){return function(_0x1a4ad6){try{jsonpatch['apply'](_0x1a4ad6,_0x17a727,!![]);}catch(_0x2df14f){return BPromise['reject'](_0x2df14f);}return _0x1a4ad6[_0xc3ed('0x22')]();};}function saveUpdates(_0x80d2ca,_0x394aad){return function(_0x5e2b03){if(_0x5e2b03){return _0x5e2b03['update'](_0x80d2ca)[_0xc3ed('0x23')](function(_0x485707){return _0x485707;});}return null;};}function removeEntity(_0x5e818f,_0x2a6193){return function(_0x425c13){if(_0x425c13){return _0x425c13[_0xc3ed('0x24')]()['then'](function(){_0x5e818f[_0xc3ed('0x25')](0xcc)[_0xc3ed('0x1a')]();});}};}function handleEntityNotFound(_0x4f29ef,_0x4e7a55){return function(_0x16a7ed){if(!_0x16a7ed){_0x4f29ef[_0xc3ed('0x19')](0x194);}return _0x16a7ed;};}function handleError(_0x235262,_0x317a32){_0x317a32=_0x317a32||0x1f4;return function(_0x96d2de){logger[_0xc3ed('0x26')](_0x96d2de[_0xc3ed('0x27')]);if(_0x96d2de[_0xc3ed('0x28')]){delete _0x96d2de[_0xc3ed('0x28')];}_0x235262['status'](_0x317a32)[_0xc3ed('0x29')](_0x96d2de);};}exports[_0xc3ed('0x2a')]=function(_0x2ffb24,_0x568aa8){var _0x3682e3={},_0x48c131={},_0x12b0ff={'count':0x0,'rows':[]};var _0x26bd2a=_[_0xc3ed('0x2b')](db[_0xc3ed('0x2c')]['rawAttributes'],function(_0x5b029f){return{'name':_0x5b029f[_0xc3ed('0x2d')],'type':_0x5b029f[_0xc3ed('0x2e')]['key']};});_0x48c131[_0xc3ed('0x2f')]=_[_0xc3ed('0x2b')](_0x26bd2a,_0xc3ed('0x28'));_0x48c131[_0xc3ed('0x30')]=_[_0xc3ed('0x31')](_0x2ffb24[_0xc3ed('0x30')]);_0x48c131['filters']=_[_0xc3ed('0x32')](_0x48c131['model'],_0x48c131[_0xc3ed('0x30')]);_0x3682e3[_0xc3ed('0x33')]=_['intersection'](_0x48c131[_0xc3ed('0x2f')],qs[_0xc3ed('0x34')](_0x2ffb24[_0xc3ed('0x30')][_0xc3ed('0x34')]));_0x3682e3['attributes']=_0x3682e3[_0xc3ed('0x33')][_0xc3ed('0x35')]?_0x3682e3[_0xc3ed('0x33')]:_0x48c131[_0xc3ed('0x2f')];if(!_0x2ffb24[_0xc3ed('0x30')]['hasOwnProperty'](_0xc3ed('0x36'))){_0x3682e3[_0xc3ed('0x1c')]=qs[_0xc3ed('0x1c')](_0x2ffb24['query'][_0xc3ed('0x1c')]);_0x3682e3[_0xc3ed('0x1e')]=qs[_0xc3ed('0x1e')](_0x2ffb24['query'][_0xc3ed('0x1e')]);}_0x3682e3[_0xc3ed('0x37')]=qs[_0xc3ed('0x38')](_0x2ffb24['query']['sort']);_0x3682e3['where']=qs[_0xc3ed('0x39')](_['pick'](_0x2ffb24[_0xc3ed('0x30')],_0x48c131[_0xc3ed('0x39')]),_0x26bd2a);if(_0x2ffb24[_0xc3ed('0x30')][_0xc3ed('0x3a')]){_0x3682e3[_0xc3ed('0x3b')]=_[_0xc3ed('0x3c')](_0x3682e3[_0xc3ed('0x3b')],{'$or':_['map'](_0x26bd2a,function(_0x44404f){if(_0x44404f[_0xc3ed('0x2e')]!==_0xc3ed('0x3d')){var _0x18a2a0={};_0x18a2a0[_0x44404f[_0xc3ed('0x28')]]={'$like':'%'+_0x2ffb24[_0xc3ed('0x30')][_0xc3ed('0x3a')]+'%'};return _0x18a2a0;}})});}_0x3682e3=_[_0xc3ed('0x3c')]({},_0x3682e3,_0x2ffb24[_0xc3ed('0x3e')]);var _0x2b8c8c={'where':_0x3682e3['where']};return db[_0xc3ed('0x2c')]['count'](_0x2b8c8c)[_0xc3ed('0x23')](function(_0x28a3bd){_0x12b0ff[_0xc3ed('0x1d')]=_0x28a3bd;if(_0x2ffb24[_0xc3ed('0x30')]['includeAll']){_0x3682e3[_0xc3ed('0x3f')]=[{'all':!![]}];}return db[_0xc3ed('0x2c')][_0xc3ed('0x40')](_0x3682e3);})['then'](function(_0x30965d){_0x12b0ff[_0xc3ed('0x41')]=_0x30965d;return _0x12b0ff;})[_0xc3ed('0x23')](respondWithFilteredResult(_0x568aa8,_0x3682e3))[_0xc3ed('0x42')](handleError(_0x568aa8,null));};exports[_0xc3ed('0x43')]=function(_0x33c0ee,_0x4154d5){var _0x277982={'raw':!![],'where':{'id':_0x33c0ee[_0xc3ed('0x44')]['id']}},_0x36fea5={};_0x36fea5['model']=_[_0xc3ed('0x31')](db[_0xc3ed('0x2c')]['rawAttributes']);_0x36fea5['query']=_[_0xc3ed('0x31')](_0x33c0ee[_0xc3ed('0x30')]);_0x36fea5[_0xc3ed('0x39')]=_[_0xc3ed('0x32')](_0x36fea5[_0xc3ed('0x2f')],_0x36fea5['query']);_0x277982[_0xc3ed('0x33')]=_[_0xc3ed('0x32')](_0x36fea5[_0xc3ed('0x2f')],qs[_0xc3ed('0x34')](_0x33c0ee[_0xc3ed('0x30')][_0xc3ed('0x34')]));_0x277982[_0xc3ed('0x33')]=_0x277982[_0xc3ed('0x33')]['length']?_0x277982[_0xc3ed('0x33')]:_0x36fea5['model'];if(_0x33c0ee[_0xc3ed('0x30')][_0xc3ed('0x45')]){_0x277982[_0xc3ed('0x3f')]=[{'all':!![]}];}_0x277982=_[_0xc3ed('0x3c')]({},_0x277982,_0x33c0ee[_0xc3ed('0x3e')]);return db['JscriptyAnswerReport'][_0xc3ed('0x46')](_0x277982)[_0xc3ed('0x23')](handleEntityNotFound(_0x4154d5,null))[_0xc3ed('0x23')](respondWithResult(_0x4154d5,null))[_0xc3ed('0x42')](handleError(_0x4154d5,null));};exports[_0xc3ed('0x47')]=function(_0x5b71ac,_0x347d2a){return db[_0xc3ed('0x2c')]['create'](_0x5b71ac['body'],{})[_0xc3ed('0x23')](respondWithResult(_0x347d2a,0xc9))['catch'](handleError(_0x347d2a,null));};exports[_0xc3ed('0x48')]=function(_0x1effde,_0xcfc1d7){if(_0x1effde[_0xc3ed('0x49')]['id']){delete _0x1effde[_0xc3ed('0x49')]['id'];}return db[_0xc3ed('0x2c')][_0xc3ed('0x46')]({'where':{'id':_0x1effde[_0xc3ed('0x44')]['id']}})[_0xc3ed('0x23')](handleEntityNotFound(_0xcfc1d7,null))[_0xc3ed('0x23')](saveUpdates(_0x1effde[_0xc3ed('0x49')],null))[_0xc3ed('0x23')](respondWithResult(_0xcfc1d7,null))['catch'](handleError(_0xcfc1d7,null));};exports[_0xc3ed('0x24')]=function(_0x22e83f,_0x271e2b){return db[_0xc3ed('0x2c')][_0xc3ed('0x46')]({'where':{'id':_0x22e83f['params']['id']}})[_0xc3ed('0x23')](handleEntityNotFound(_0x271e2b,null))['then'](removeEntity(_0x271e2b,null))[_0xc3ed('0x42')](handleError(_0x271e2b,null));};exports['describe']=function(_0x29376b,_0x2cc20b){return db['JscriptyAnswerReport'][_0xc3ed('0x4a')]()['then'](respondWithResult(_0x2cc20b,null))[_0xc3ed('0x42')](handleError(_0x2cc20b,null));};
\ No newline at end of file
+var _0xfdcd=['body','catch','find','params','describe','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/license/util','../../mysqldb','sendStatus','status','json','undefined','limit','offset','count','Content-Range','apply','reject','save','update','then','destroy','stack','name','index','JscriptyAnswerReport','rawAttributes','fieldName','type','key','model','map','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filters','where','VIRTUAL','filter','includeAll','findAll','rows','show','keys','include','merge','options','create'];(function(_0x51dbbb,_0x2d6a59){var _0x4d16b0=function(_0x25b3c7){while(--_0x25b3c7){_0x51dbbb['push'](_0x51dbbb['shift']());}};_0x4d16b0(++_0x2d6a59);}(_0xfdcd,0xe9));var _0xdfdc=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0xfdcd[_0x2dafbe];return _0x58a45a;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xdfdc('0x0'));var zipdir=require(_0xdfdc('0x1'));var jsonpatch=require(_0xdfdc('0x2'));var rp=require('request-promise');var moment=require(_0xdfdc('0x3'));var BPromise=require(_0xdfdc('0x4'));var Mustache=require(_0xdfdc('0x5'));var util=require(_0xdfdc('0x6'));var path=require(_0xdfdc('0x7'));var sox=require(_0xdfdc('0x8'));var csv=require(_0xdfdc('0x9'));var ejs=require(_0xdfdc('0xa'));var fs=require('fs');var fs_extra=require(_0xdfdc('0xb'));var _=require(_0xdfdc('0xc'));var squel=require(_0xdfdc('0xd'));var crypto=require(_0xdfdc('0xe'));var jsforce=require(_0xdfdc('0xf'));var deskjs=require('desk.js');var toCsv=require(_0xdfdc('0x9'));var querystring=require(_0xdfdc('0x10'));var Papa=require('papaparse');var Redis=require(_0xdfdc('0x11'));var authService=require(_0xdfdc('0x12'));var qs=require(_0xdfdc('0x13'));var as=require(_0xdfdc('0x14'));var hardwareService=require(_0xdfdc('0x15'));var logger=require('../../config/logger')(_0xdfdc('0x16'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xdfdc('0x17'));var db=require(_0xdfdc('0x18'))['db'];function respondWithStatusCode(_0x2307b0,_0x382a49){_0x382a49=_0x382a49||0xcc;return function(_0x1d9e16){if(_0x1d9e16){return _0x2307b0[_0xdfdc('0x19')](_0x382a49);}return _0x2307b0[_0xdfdc('0x1a')](_0x382a49)['end']();};}function respondWithResult(_0x2f6e11,_0x33d8f0){_0x33d8f0=_0x33d8f0||0xc8;return function(_0x32451d){if(_0x32451d){return _0x2f6e11['status'](_0x33d8f0)[_0xdfdc('0x1b')](_0x32451d);}};}function respondWithFilteredResult(_0x1d90d3,_0x2b29bc){return function(_0x54a982){if(_0x54a982){var _0x1584a7=typeof _0x2b29bc['offset']===_0xdfdc('0x1c')&&typeof _0x2b29bc[_0xdfdc('0x1d')]==='undefined';var _0x137a48=_0x54a982['count'];var _0x32c616=_0x1584a7?0x0:_0x2b29bc[_0xdfdc('0x1e')];var _0x23a3be=_0x1584a7?_0x54a982[_0xdfdc('0x1f')]:_0x2b29bc['offset']+_0x2b29bc[_0xdfdc('0x1d')];var _0x97bbb7;if(_0x23a3be>=_0x137a48){_0x23a3be=_0x137a48;_0x97bbb7=0xc8;}else{_0x97bbb7=0xce;}_0x1d90d3[_0xdfdc('0x1a')](_0x97bbb7);return _0x1d90d3['set'](_0xdfdc('0x20'),_0x32c616+'-'+_0x23a3be+'/'+_0x137a48)[_0xdfdc('0x1b')](_0x54a982);}return null;};}function patchUpdates(_0x583c9d){return function(_0x4b0cb8){try{jsonpatch[_0xdfdc('0x21')](_0x4b0cb8,_0x583c9d,!![]);}catch(_0x55428a){return BPromise[_0xdfdc('0x22')](_0x55428a);}return _0x4b0cb8[_0xdfdc('0x23')]();};}function saveUpdates(_0x1d058a,_0x1bb542){return function(_0x1a2b57){if(_0x1a2b57){return _0x1a2b57[_0xdfdc('0x24')](_0x1d058a)[_0xdfdc('0x25')](function(_0x109017){return _0x109017;});}return null;};}function removeEntity(_0x588d8b,_0x3ebe2b){return function(_0x1b01b8){if(_0x1b01b8){return _0x1b01b8[_0xdfdc('0x26')]()[_0xdfdc('0x25')](function(){_0x588d8b[_0xdfdc('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x585494,_0x540cdf){return function(_0x28f124){if(!_0x28f124){_0x585494[_0xdfdc('0x19')](0x194);}return _0x28f124;};}function handleError(_0x108225,_0x1f44f1){_0x1f44f1=_0x1f44f1||0x1f4;return function(_0x3e3b93){logger['error'](_0x3e3b93[_0xdfdc('0x27')]);if(_0x3e3b93[_0xdfdc('0x28')]){delete _0x3e3b93[_0xdfdc('0x28')];}_0x108225['status'](_0x1f44f1)['send'](_0x3e3b93);};}exports[_0xdfdc('0x29')]=function(_0xc27517,_0x299528){var _0x223b48={},_0x3cfe49={},_0xbbb349={'count':0x0,'rows':[]};var _0x283df7=_['map'](db[_0xdfdc('0x2a')][_0xdfdc('0x2b')],function(_0x14d26a){return{'name':_0x14d26a[_0xdfdc('0x2c')],'type':_0x14d26a[_0xdfdc('0x2d')][_0xdfdc('0x2e')]};});_0x3cfe49[_0xdfdc('0x2f')]=_[_0xdfdc('0x30')](_0x283df7,_0xdfdc('0x28'));_0x3cfe49[_0xdfdc('0x31')]=_['keys'](_0xc27517['query']);_0x3cfe49['filters']=_[_0xdfdc('0x32')](_0x3cfe49[_0xdfdc('0x2f')],_0x3cfe49[_0xdfdc('0x31')]);_0x223b48[_0xdfdc('0x33')]=_[_0xdfdc('0x32')](_0x3cfe49[_0xdfdc('0x2f')],qs[_0xdfdc('0x34')](_0xc27517[_0xdfdc('0x31')][_0xdfdc('0x34')]));_0x223b48[_0xdfdc('0x33')]=_0x223b48[_0xdfdc('0x33')][_0xdfdc('0x35')]?_0x223b48[_0xdfdc('0x33')]:_0x3cfe49['model'];if(!_0xc27517[_0xdfdc('0x31')][_0xdfdc('0x36')](_0xdfdc('0x37'))){_0x223b48[_0xdfdc('0x1d')]=qs['limit'](_0xc27517[_0xdfdc('0x31')][_0xdfdc('0x1d')]);_0x223b48[_0xdfdc('0x1e')]=qs[_0xdfdc('0x1e')](_0xc27517['query'][_0xdfdc('0x1e')]);}_0x223b48[_0xdfdc('0x38')]=qs[_0xdfdc('0x39')](_0xc27517[_0xdfdc('0x31')]['sort']);_0x223b48['where']=qs[_0xdfdc('0x3a')](_['pick'](_0xc27517[_0xdfdc('0x31')],_0x3cfe49['filters']),_0x283df7);if(_0xc27517['query']['filter']){_0x223b48[_0xdfdc('0x3b')]=_['merge'](_0x223b48[_0xdfdc('0x3b')],{'$or':_[_0xdfdc('0x30')](_0x283df7,function(_0x136411){if(_0x136411[_0xdfdc('0x2d')]!==_0xdfdc('0x3c')){var _0x49bfd7={};_0x49bfd7[_0x136411[_0xdfdc('0x28')]]={'$like':'%'+_0xc27517['query'][_0xdfdc('0x3d')]+'%'};return _0x49bfd7;}})});}_0x223b48=_['merge']({},_0x223b48,_0xc27517['options']);var _0xb7142d={'where':_0x223b48['where']};return db['JscriptyAnswerReport'][_0xdfdc('0x1f')](_0xb7142d)[_0xdfdc('0x25')](function(_0x40e6b1){_0xbbb349[_0xdfdc('0x1f')]=_0x40e6b1;if(_0xc27517[_0xdfdc('0x31')][_0xdfdc('0x3e')]){_0x223b48['include']=[{'all':!![]}];}return db[_0xdfdc('0x2a')][_0xdfdc('0x3f')](_0x223b48);})[_0xdfdc('0x25')](function(_0x20dc1f){_0xbbb349[_0xdfdc('0x40')]=_0x20dc1f;return _0xbbb349;})['then'](respondWithFilteredResult(_0x299528,_0x223b48))['catch'](handleError(_0x299528,null));};exports[_0xdfdc('0x41')]=function(_0x227309,_0xac59e2){var _0x4a9f94={'raw':!![],'where':{'id':_0x227309['params']['id']}},_0x339e38={};_0x339e38[_0xdfdc('0x2f')]=_['keys'](db[_0xdfdc('0x2a')][_0xdfdc('0x2b')]);_0x339e38[_0xdfdc('0x31')]=_[_0xdfdc('0x42')](_0x227309['query']);_0x339e38['filters']=_[_0xdfdc('0x32')](_0x339e38[_0xdfdc('0x2f')],_0x339e38[_0xdfdc('0x31')]);_0x4a9f94['attributes']=_['intersection'](_0x339e38['model'],qs[_0xdfdc('0x34')](_0x227309[_0xdfdc('0x31')]['fields']));_0x4a9f94[_0xdfdc('0x33')]=_0x4a9f94[_0xdfdc('0x33')][_0xdfdc('0x35')]?_0x4a9f94[_0xdfdc('0x33')]:_0x339e38[_0xdfdc('0x2f')];if(_0x227309['query'][_0xdfdc('0x3e')]){_0x4a9f94[_0xdfdc('0x43')]=[{'all':!![]}];}_0x4a9f94=_[_0xdfdc('0x44')]({},_0x4a9f94,_0x227309[_0xdfdc('0x45')]);return db[_0xdfdc('0x2a')]['find'](_0x4a9f94)[_0xdfdc('0x25')](handleEntityNotFound(_0xac59e2,null))[_0xdfdc('0x25')](respondWithResult(_0xac59e2,null))['catch'](handleError(_0xac59e2,null));};exports[_0xdfdc('0x46')]=function(_0x185925,_0x5ee598){return db[_0xdfdc('0x2a')][_0xdfdc('0x46')](_0x185925[_0xdfdc('0x47')],{})[_0xdfdc('0x25')](respondWithResult(_0x5ee598,0xc9))[_0xdfdc('0x48')](handleError(_0x5ee598,null));};exports[_0xdfdc('0x24')]=function(_0x1a1456,_0x5e645c){if(_0x1a1456[_0xdfdc('0x47')]['id']){delete _0x1a1456[_0xdfdc('0x47')]['id'];}return db[_0xdfdc('0x2a')][_0xdfdc('0x49')]({'where':{'id':_0x1a1456[_0xdfdc('0x4a')]['id']}})[_0xdfdc('0x25')](handleEntityNotFound(_0x5e645c,null))[_0xdfdc('0x25')](saveUpdates(_0x1a1456[_0xdfdc('0x47')],null))[_0xdfdc('0x25')](respondWithResult(_0x5e645c,null))[_0xdfdc('0x48')](handleError(_0x5e645c,null));};exports[_0xdfdc('0x26')]=function(_0x1f6daa,_0xc186d4){return db['JscriptyAnswerReport'][_0xdfdc('0x49')]({'where':{'id':_0x1f6daa[_0xdfdc('0x4a')]['id']}})[_0xdfdc('0x25')](handleEntityNotFound(_0xc186d4,null))[_0xdfdc('0x25')](removeEntity(_0xc186d4,null))[_0xdfdc('0x48')](handleError(_0xc186d4,null));};exports[_0xdfdc('0x4b')]=function(_0x55c6d4,_0x31dff5){return db['JscriptyAnswerReport'][_0xdfdc('0x4b')]()[_0xdfdc('0x25')](respondWithResult(_0x31dff5,null))['catch'](handleError(_0x31dff5,null));};
\ No newline at end of file
index 50623b7..c5caaf2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa7a9=['util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','exports','JscriptyAnswerReport','report_jscripty_answers','lodash'];(function(_0x37e81f,_0x4de6ec){var _0x1fade0=function(_0x2eddea){while(--_0x2eddea){_0x37e81f['push'](_0x37e81f['shift']());}};_0x1fade0(++_0x4de6ec);}(_0xa7a9,0x1df));var _0x9a7a=function(_0x329b1c,_0x2a87d7){_0x329b1c=_0x329b1c-0x0;var _0x72bb76=_0xa7a9[_0x329b1c];return _0x72bb76;};'use strict';var _=require(_0x9a7a('0x0'));var util=require(_0x9a7a('0x1'));var logger=require(_0x9a7a('0x2'))(_0x9a7a('0x3'));var moment=require(_0x9a7a('0x4'));var BPromise=require(_0x9a7a('0x5'));var rp=require(_0x9a7a('0x6'));var fs=require('fs');var path=require(_0x9a7a('0x7'));var rimraf=require(_0x9a7a('0x8'));var config=require('../../config/environment');var attributes=require('./jscriptyAnswerReport.attributes');module[_0x9a7a('0x9')]=function(_0x343121,_0xe60bd8){return _0x343121['define'](_0x9a7a('0xa'),attributes,{'tableName':_0x9a7a('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xc96c=['rimraf','../../config/environment','./jscriptyAnswerReport.attributes','exports','define','JscriptyAnswerReport','report_jscripty_answers','util','api','moment','bluebird','request-promise','path'];(function(_0x3ce90e,_0x45392f){var _0x5bc63e=function(_0x5615f9){while(--_0x5615f9){_0x3ce90e['push'](_0x3ce90e['shift']());}};_0x5bc63e(++_0x45392f);}(_0xc96c,0x166));var _0xcc96=function(_0x46e5fc,_0x5db9aa){_0x46e5fc=_0x46e5fc-0x0;var _0x52f4e6=_0xc96c[_0x46e5fc];return _0x52f4e6;};'use strict';var _=require('lodash');var util=require(_0xcc96('0x0'));var logger=require('../../config/logger')(_0xcc96('0x1'));var moment=require(_0xcc96('0x2'));var BPromise=require(_0xcc96('0x3'));var rp=require(_0xcc96('0x4'));var fs=require('fs');var path=require(_0xcc96('0x5'));var rimraf=require(_0xcc96('0x6'));var config=require(_0xcc96('0x7'));var attributes=require(_0xcc96('0x8'));module[_0xcc96('0x9')]=function(_0x4c77e5,_0x226e30){return _0x4c77e5[_0xcc96('0xa')](_0xcc96('0xb'),attributes,{'tableName':_0xcc96('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 561e9bd..81e4166 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x128e=['debug','JscriptyAnswerReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','JscriptyAnswerReport,\x20%s,\x20%s','request\x20sent'];(function(_0x2b2c14,_0x1ae8f2){var _0x544072=function(_0x504ea0){while(--_0x504ea0){_0x2b2c14['push'](_0x2b2c14['shift']());}};_0x544072(++_0x1ae8f2);}(_0x128e,0x9e));var _0xe128=function(_0x2445dc,_0x386209){_0x2445dc=_0x2445dc-0x0;var _0x143dfd=_0x128e[_0x2445dc];return _0x143dfd;};'use strict';var _=require('lodash');var util=require(_0xe128('0x0'));var moment=require(_0xe128('0x1'));var BPromise=require(_0xe128('0x2'));var rs=require(_0xe128('0x3'));var fs=require('fs');var Redis=require(_0xe128('0x4'));var db=require(_0xe128('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xe128('0x6'))(_0xe128('0x7'));var config=require(_0xe128('0x8'));var jayson=require(_0xe128('0x9'));var client=jayson[_0xe128('0xa')][_0xe128('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3eeaa8,_0x22e23b,_0x38ea18){return new BPromise(function(_0x522c82,_0x3b3e27){return client[_0xe128('0xc')](_0x3eeaa8,_0x38ea18)[_0xe128('0xd')](function(_0x469c67){logger[_0xe128('0xe')](_0xe128('0xf'),_0x22e23b,_0xe128('0x10'));logger[_0xe128('0x11')](_0xe128('0x12'),_0x22e23b,'request\x20sent',JSON[_0xe128('0x13')](_0x469c67));if(_0x469c67[_0xe128('0x14')]){if(_0x469c67[_0xe128('0x14')][_0xe128('0x15')]===0x1f4){logger[_0xe128('0x14')](_0xe128('0xf'),_0x22e23b,_0x469c67[_0xe128('0x14')][_0xe128('0x16')]);return _0x3b3e27(_0x469c67[_0xe128('0x14')][_0xe128('0x16')]);}logger[_0xe128('0x14')](_0xe128('0xf'),_0x22e23b,_0x469c67['error'][_0xe128('0x16')]);return _0x522c82(_0x469c67[_0xe128('0x14')]['message']);}else{logger['info'](_0xe128('0xf'),_0x22e23b,_0xe128('0x10'));_0x522c82(_0x469c67[_0xe128('0x17')][_0xe128('0x16')]);}})[_0xe128('0x18')](function(_0x2dcc63){logger[_0xe128('0x14')]('JscriptyAnswerReport,\x20%s,\x20%s',_0x22e23b,_0x2dcc63);_0x3b3e27(_0x2dcc63);});});}
\ No newline at end of file
+var _0xd29d=['then','JscriptyAnswerReport,\x20%s,\x20%s','debug','stringify','error','code','message','info','request\x20sent','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','request'];(function(_0xfa9b9c,_0x5297f0){var _0x10c1a7=function(_0x20dcc1){while(--_0x20dcc1){_0xfa9b9c['push'](_0xfa9b9c['shift']());}};_0x10c1a7(++_0x5297f0);}(_0xd29d,0x145));var _0xdd29=function(_0x2f601e,_0x349f96){_0x2f601e=_0x2f601e-0x0;var _0x21a1f5=_0xd29d[_0x2f601e];return _0x21a1f5;};'use strict';var _=require('lodash');var util=require(_0xdd29('0x0'));var moment=require(_0xdd29('0x1'));var BPromise=require(_0xdd29('0x2'));var rs=require(_0xdd29('0x3'));var fs=require('fs');var Redis=require(_0xdd29('0x4'));var db=require(_0xdd29('0x5'))['db'];var utils=require(_0xdd29('0x6'));var logger=require(_0xdd29('0x7'))(_0xdd29('0x8'));var config=require('../../config/environment');var jayson=require(_0xdd29('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x2e001f,_0x37f187,_0x3ad449){return new BPromise(function(_0x426f62,_0x5007f4){return client[_0xdd29('0xa')](_0x2e001f,_0x3ad449)[_0xdd29('0xb')](function(_0x2cebb0){logger['info'](_0xdd29('0xc'),_0x37f187,'request\x20sent');logger[_0xdd29('0xd')]('JscriptyAnswerReport,\x20%s,\x20%s,\x20%s',_0x37f187,'request\x20sent',JSON[_0xdd29('0xe')](_0x2cebb0));if(_0x2cebb0[_0xdd29('0xf')]){if(_0x2cebb0['error'][_0xdd29('0x10')]===0x1f4){logger[_0xdd29('0xf')](_0xdd29('0xc'),_0x37f187,_0x2cebb0[_0xdd29('0xf')][_0xdd29('0x11')]);return _0x5007f4(_0x2cebb0[_0xdd29('0xf')]['message']);}logger[_0xdd29('0xf')](_0xdd29('0xc'),_0x37f187,_0x2cebb0[_0xdd29('0xf')][_0xdd29('0x11')]);return _0x426f62(_0x2cebb0[_0xdd29('0xf')][_0xdd29('0x11')]);}else{logger[_0xdd29('0x12')](_0xdd29('0xc'),_0x37f187,_0xdd29('0x13'));_0x426f62(_0x2cebb0['result'][_0xdd29('0x11')]);}})[_0xdd29('0x14')](function(_0x6dcefd){logger[_0xdd29('0xf')](_0xdd29('0xc'),_0x37f187,_0x6dcefd);_0x5007f4(_0x6dcefd);});});}
\ No newline at end of file
index 875054b..866a398 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbf5d=['create','clone','put','update','delete','destroy','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/:id','/:id/sessions','isAuthenticated','getSessions','/:id/answers','30s','getSummary'];(function(_0x2348ad,_0x12b8ca){var _0x38ff75=function(_0x45980b){while(--_0x45980b){_0x2348ad['push'](_0x2348ad['shift']());}};_0x38ff75(++_0x12b8ca);}(_0xbf5d,0xcf));var _0xdbf5=function(_0x51594d,_0x110073){_0x51594d=_0x51594d-0x0;var _0x107268=_0xbf5d[_0x51594d];return _0x107268;};'use strict';var multer=require(_0xdbf5('0x0'));var util=require(_0xdbf5('0x1'));var path=require('path');var timeout=require(_0xdbf5('0x2'));var express=require(_0xdbf5('0x3'));var router=express[_0xdbf5('0x4')]();var fs_extra=require(_0xdbf5('0x5'));var auth=require(_0xdbf5('0x6'));var interaction=require(_0xdbf5('0x7'));var config=require(_0xdbf5('0x8'));var controller=require('./jscriptyProject.controller');router[_0xdbf5('0x9')]('/',auth['isAuthenticated'](),controller[_0xdbf5('0xa')]);router[_0xdbf5('0x9')](_0xdbf5('0xb'),auth['isAuthenticated'](),controller['show']);router[_0xdbf5('0x9')](_0xdbf5('0xc'),auth[_0xdbf5('0xd')](),controller[_0xdbf5('0xe')]);router[_0xdbf5('0x9')](_0xdbf5('0xf'),auth['isAuthenticated'](),controller['getAnswers']);router[_0xdbf5('0x9')]('/:id/summary',auth[_0xdbf5('0xd')](),timeout(_0xdbf5('0x10')),controller[_0xdbf5('0x11')]);router['post']('/',auth[_0xdbf5('0xd')](),controller[_0xdbf5('0x12')]);router['post']('/:id/clone',auth[_0xdbf5('0xd')](),controller[_0xdbf5('0x13')]);router[_0xdbf5('0x14')](_0xdbf5('0xb'),auth['isAuthenticated'](),controller[_0xdbf5('0x15')]);router[_0xdbf5('0x16')](_0xdbf5('0xb'),auth[_0xdbf5('0xd')](),controller[_0xdbf5('0x17')]);module[_0xdbf5('0x18')]=router;
\ No newline at end of file
+var _0x74f0=['util','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./jscriptyProject.controller','get','isAuthenticated','index','show','/:id/sessions','getSessions','/:id/answers','getAnswers','30s','post','create','/:id/clone','clone','put','/:id','update','delete','destroy','exports','multer'];(function(_0x37c812,_0x2b830f){var _0x55261a=function(_0x5d9073){while(--_0x5d9073){_0x37c812['push'](_0x37c812['shift']());}};_0x55261a(++_0x2b830f);}(_0x74f0,0xa7));var _0x074f=function(_0x3e5f6d,_0x121db6){_0x3e5f6d=_0x3e5f6d-0x0;var _0x1bea6e=_0x74f0[_0x3e5f6d];return _0x1bea6e;};'use strict';var multer=require(_0x074f('0x0'));var util=require(_0x074f('0x1'));var path=require(_0x074f('0x2'));var timeout=require(_0x074f('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x074f('0x4'));var auth=require(_0x074f('0x5'));var interaction=require(_0x074f('0x6'));var config=require(_0x074f('0x7'));var controller=require(_0x074f('0x8'));router[_0x074f('0x9')]('/',auth[_0x074f('0xa')](),controller[_0x074f('0xb')]);router[_0x074f('0x9')]('/:id',auth[_0x074f('0xa')](),controller[_0x074f('0xc')]);router[_0x074f('0x9')](_0x074f('0xd'),auth[_0x074f('0xa')](),controller[_0x074f('0xe')]);router[_0x074f('0x9')](_0x074f('0xf'),auth[_0x074f('0xa')](),controller[_0x074f('0x10')]);router[_0x074f('0x9')]('/:id/summary',auth['isAuthenticated'](),timeout(_0x074f('0x11')),controller['getSummary']);router[_0x074f('0x12')]('/',auth['isAuthenticated'](),controller[_0x074f('0x13')]);router['post'](_0x074f('0x14'),auth[_0x074f('0xa')](),controller[_0x074f('0x15')]);router[_0x074f('0x16')](_0x074f('0x17'),auth[_0x074f('0xa')](),controller[_0x074f('0x18')]);router[_0x074f('0x19')](_0x074f('0x17'),auth[_0x074f('0xa')](),controller[_0x074f('0x1a')]);module[_0x074f('0x1b')]=router;
\ No newline at end of file
index 2310f0f..d88dcda 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7aca=['getDataValue','description','BOOLEAN','sequelize','lodash','util','name','STRING','TEXT','long','isObjectLike','setDataValue','stringify','isString','formData','format','{\x22name\x22:\x22%s\x22,\x22description\x22:\x22%s\x22,\x22pages\x22:[]}'];(function(_0x3e0112,_0x20a04b){var _0x259624=function(_0x149802){while(--_0x149802){_0x3e0112['push'](_0x3e0112['shift']());}};_0x259624(++_0x20a04b);}(_0x7aca,0xad));var _0xa7ac=function(_0x2fdadd,_0x6e157f){_0x2fdadd=_0x2fdadd-0x0;var _0x1c98a1=_0x7aca[_0x2fdadd];return _0x1c98a1;};'use strict';var Sequelize=require(_0xa7ac('0x0'));var _=require(_0xa7ac('0x1'));var util=require(_0xa7ac('0x2'));module['exports']={'name':{'type':Sequelize['STRING'],'unique':_0xa7ac('0x3')},'description':{'type':Sequelize[_0xa7ac('0x4')]},'formData':{'type':Sequelize[_0xa7ac('0x5')](_0xa7ac('0x6')),'set':function(_0x1a5a58){if(_[_0xa7ac('0x7')](_0x1a5a58)){this[_0xa7ac('0x8')]('formData',JSON[_0xa7ac('0x9')](_0x1a5a58));}else if(_[_0xa7ac('0xa')](_0x1a5a58)){this[_0xa7ac('0x8')](_0xa7ac('0xb'),_0x1a5a58);}else{this[_0xa7ac('0x8')](_0xa7ac('0xb'),util[_0xa7ac('0xc')](_0xa7ac('0xd'),this[_0xa7ac('0xe')](_0xa7ac('0x3'))||'',this[_0xa7ac('0xe')](_0xa7ac('0xf'))||''));}}},'enableUncompleteSave':{'type':Sequelize[_0xa7ac('0x10')],'defaultValue':!![]},'sendUnpauseOnSubmit':{'type':Sequelize[_0xa7ac('0x10')],'defaultValue':![]}};
\ No newline at end of file
+var _0x36f4=['description','BOOLEAN','util','exports','STRING','long','isObjectLike','setDataValue','formData','stringify','isString','format','{\x22name\x22:\x22%s\x22,\x22description\x22:\x22%s\x22,\x22pages\x22:[]}','getDataValue'];(function(_0x54382f,_0x3c2a85){var _0x3d6985=function(_0x2f7181){while(--_0x2f7181){_0x54382f['push'](_0x54382f['shift']());}};_0x3d6985(++_0x3c2a85);}(_0x36f4,0x160));var _0x436f=function(_0x572bbf,_0x505ef0){_0x572bbf=_0x572bbf-0x0;var _0x529787=_0x36f4[_0x572bbf];return _0x529787;};'use strict';var Sequelize=require('sequelize');var _=require('lodash');var util=require(_0x436f('0x0'));module[_0x436f('0x1')]={'name':{'type':Sequelize['STRING'],'unique':'name'},'description':{'type':Sequelize[_0x436f('0x2')]},'formData':{'type':Sequelize['TEXT'](_0x436f('0x3')),'set':function(_0x34bcd6){if(_[_0x436f('0x4')](_0x34bcd6)){this[_0x436f('0x5')](_0x436f('0x6'),JSON[_0x436f('0x7')](_0x34bcd6));}else if(_[_0x436f('0x8')](_0x34bcd6)){this[_0x436f('0x5')](_0x436f('0x6'),_0x34bcd6);}else{this['setDataValue']('formData',util[_0x436f('0x9')](_0x436f('0xa'),this[_0x436f('0xb')]('name')||'',this[_0x436f('0xb')](_0x436f('0xc'))||''));}}},'enableUncompleteSave':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'sendUnpauseOnSubmit':{'type':Sequelize[_0x436f('0xd')],'defaultValue':![]}};
\ No newline at end of file
index fdf78c1..f10145a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaf4c=['setHeader','Content-disposition','attachment;\x20filename=','Jscripty_Project_%d_Summary_%s.csv','text/csv','rimraf','zip-dir','request-promise','moment','bluebird','util','path','sox','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','offset','undefined','count','set','Content-Range','json','apply','save','update','destroy','then','get','Projects','UserProfileResource','end','stack','name','send','index','JscriptyProject','type','key','model','map','query','keys','intersection','attributes','length','hasOwnProperty','nolimit','limit','sort','where','filters','pick','filter','merge','options','includeAll','include','findAll','rows','show','params','rawAttributes','fields','catch','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','omit','createdAt','updatedAt','error','getSessions','JscriptySessionReport','order','ProjectId','getAnswers','findOne','JscriptyAnswerReport','number','fromCharCode','toString','indexOf','getSummary','starttime','parse','startTime','JscriptyQuestionReport','-createdAt','questionId','question','format','YYYY-MM-DD\x20HH:mm:ss','SessionId','answer','push','now','writeFileSync','/tmp/Jscripty_Project_%d_Summary_%s.csv'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0xaf4c,0x1ed));var _0xcaf4=function(_0x4ee00e,_0x21acce){_0x4ee00e=_0x4ee00e-0x0;var _0x4acec2=_0xaf4c[_0x4ee00e];return _0x4acec2;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xcaf4('0x0'));var zipdir=require(_0xcaf4('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xcaf4('0x2'));var moment=require(_0xcaf4('0x3'));var BPromise=require(_0xcaf4('0x4'));var Mustache=require('mustache');var util=require(_0xcaf4('0x5'));var path=require(_0xcaf4('0x6'));var sox=require(_0xcaf4('0x7'));var csv=require('to-csv');var ejs=require(_0xcaf4('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xcaf4('0x9'));var squel=require(_0xcaf4('0xa'));var crypto=require(_0xcaf4('0xb'));var jsforce=require(_0xcaf4('0xc'));var deskjs=require(_0xcaf4('0xd'));var toCsv=require(_0xcaf4('0xe'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xcaf4('0xf'));var authService=require(_0xcaf4('0x10'));var qs=require(_0xcaf4('0x11'));var as=require(_0xcaf4('0x12'));var hardwareService=require(_0xcaf4('0x13'));var logger=require(_0xcaf4('0x14'))(_0xcaf4('0x15'));var utils=require(_0xcaf4('0x16'));var config=require(_0xcaf4('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0xcaf4('0x18'))['db'];function respondWithStatusCode(_0x41486c,_0x4d270c){_0x4d270c=_0x4d270c||0xcc;return function(_0x308173){if(_0x308173){return _0x41486c[_0xcaf4('0x19')](_0x4d270c);}return _0x41486c[_0xcaf4('0x1a')](_0x4d270c)['end']();};}function respondWithResult(_0x3738b7,_0x2ad48b){_0x2ad48b=_0x2ad48b||0xc8;return function(_0x593c44){if(_0x593c44){return _0x3738b7[_0xcaf4('0x1a')](_0x2ad48b)['json'](_0x593c44);}};}function respondWithFilteredResult(_0x2a1243,_0x191f38){return function(_0x67532a){if(_0x67532a){var _0x1ec93e=typeof _0x191f38[_0xcaf4('0x1b')]===_0xcaf4('0x1c')&&typeof _0x191f38['limit']===_0xcaf4('0x1c');var _0x488bac=_0x67532a[_0xcaf4('0x1d')];var _0x5bb3b5=_0x1ec93e?0x0:_0x191f38[_0xcaf4('0x1b')];var _0x36c34c=_0x1ec93e?_0x67532a[_0xcaf4('0x1d')]:_0x191f38['offset']+_0x191f38['limit'];var _0x1ddae3;if(_0x36c34c>=_0x488bac){_0x36c34c=_0x488bac;_0x1ddae3=0xc8;}else{_0x1ddae3=0xce;}_0x2a1243[_0xcaf4('0x1a')](_0x1ddae3);return _0x2a1243[_0xcaf4('0x1e')](_0xcaf4('0x1f'),_0x5bb3b5+'-'+_0x36c34c+'/'+_0x488bac)[_0xcaf4('0x20')](_0x67532a);}return null;};}function patchUpdates(_0x596997){return function(_0x42d129){try{jsonpatch[_0xcaf4('0x21')](_0x42d129,_0x596997,!![]);}catch(_0x3f6172){return BPromise['reject'](_0x3f6172);}return _0x42d129[_0xcaf4('0x22')]();};}function saveUpdates(_0x2b500b,_0x39ff5d){return function(_0x5b6525){if(_0x5b6525){return _0x5b6525[_0xcaf4('0x23')](_0x2b500b)['then'](function(_0x2be740){return _0x2be740;});}return null;};}function removeEntity(_0x3fb28a,_0x1d9f77){return function(_0x5e4af3){if(_0x5e4af3){return _0x5e4af3[_0xcaf4('0x24')]()[_0xcaf4('0x25')](function(){var _0x116349=_0x5e4af3[_0xcaf4('0x26')]({'plain':!![]});var _0x4c3485=_0xcaf4('0x27');return db[_0xcaf4('0x28')]['destroy']({'where':{'type':_0x4c3485,'resourceId':_0x116349['id']}})[_0xcaf4('0x25')](function(){return _0x5e4af3;});})[_0xcaf4('0x25')](function(){_0x3fb28a[_0xcaf4('0x1a')](0xcc)[_0xcaf4('0x29')]();});}};}function handleEntityNotFound(_0x25beed,_0x1dbe80){return function(_0x10765c){if(!_0x10765c){_0x25beed['sendStatus'](0x194);}return _0x10765c;};}function handleError(_0x4183e2,_0x16b3b8){_0x16b3b8=_0x16b3b8||0x1f4;return function(_0x237077){logger['error'](_0x237077[_0xcaf4('0x2a')]);if(_0x237077[_0xcaf4('0x2b')]){delete _0x237077[_0xcaf4('0x2b')];}_0x4183e2[_0xcaf4('0x1a')](_0x16b3b8)[_0xcaf4('0x2c')](_0x237077);};}exports[_0xcaf4('0x2d')]=function(_0x31322d,_0x52ee2a){var _0x8126a7={},_0x5c355e={},_0x5af341={'count':0x0,'rows':[]};var _0x6f6cae=_['map'](db[_0xcaf4('0x2e')]['rawAttributes'],function(_0xf616c7){return{'name':_0xf616c7['fieldName'],'type':_0xf616c7[_0xcaf4('0x2f')][_0xcaf4('0x30')]};});_0x5c355e[_0xcaf4('0x31')]=_[_0xcaf4('0x32')](_0x6f6cae,_0xcaf4('0x2b'));_0x5c355e[_0xcaf4('0x33')]=_[_0xcaf4('0x34')](_0x31322d[_0xcaf4('0x33')]);_0x5c355e['filters']=_[_0xcaf4('0x35')](_0x5c355e[_0xcaf4('0x31')],_0x5c355e[_0xcaf4('0x33')]);_0x8126a7[_0xcaf4('0x36')]=_[_0xcaf4('0x35')](_0x5c355e['model'],qs['fields'](_0x31322d['query']['fields']));_0x8126a7['attributes']=_0x8126a7[_0xcaf4('0x36')][_0xcaf4('0x37')]?_0x8126a7[_0xcaf4('0x36')]:_0x5c355e['model'];if(!_0x31322d[_0xcaf4('0x33')][_0xcaf4('0x38')](_0xcaf4('0x39'))){_0x8126a7[_0xcaf4('0x3a')]=qs['limit'](_0x31322d['query']['limit']);_0x8126a7['offset']=qs['offset'](_0x31322d[_0xcaf4('0x33')][_0xcaf4('0x1b')]);}_0x8126a7['order']=qs[_0xcaf4('0x3b')](_0x31322d[_0xcaf4('0x33')]['sort']);_0x8126a7[_0xcaf4('0x3c')]=qs[_0xcaf4('0x3d')](_[_0xcaf4('0x3e')](_0x31322d['query'],_0x5c355e['filters']),_0x6f6cae);if(_0x31322d[_0xcaf4('0x33')][_0xcaf4('0x3f')]){_0x8126a7[_0xcaf4('0x3c')]=_[_0xcaf4('0x40')](_0x8126a7['where'],{'$or':_[_0xcaf4('0x32')](_0x6f6cae,function(_0x23c725){if(_0x23c725[_0xcaf4('0x2f')]!=='VIRTUAL'){var _0x3c4d63={};_0x3c4d63[_0x23c725[_0xcaf4('0x2b')]]={'$like':'%'+_0x31322d[_0xcaf4('0x33')][_0xcaf4('0x3f')]+'%'};return _0x3c4d63;}})});}_0x8126a7=_[_0xcaf4('0x40')]({},_0x8126a7,_0x31322d[_0xcaf4('0x41')]);var _0x4dccd1={'where':_0x8126a7['where']};return db[_0xcaf4('0x2e')][_0xcaf4('0x1d')](_0x4dccd1)['then'](function(_0xda0fde){_0x5af341[_0xcaf4('0x1d')]=_0xda0fde;if(_0x31322d[_0xcaf4('0x33')][_0xcaf4('0x42')]){_0x8126a7[_0xcaf4('0x43')]=[{'all':!![]}];}return db['JscriptyProject'][_0xcaf4('0x44')](_0x8126a7);})[_0xcaf4('0x25')](function(_0x340566){_0x5af341[_0xcaf4('0x45')]=_0x340566;return _0x5af341;})[_0xcaf4('0x25')](respondWithFilteredResult(_0x52ee2a,_0x8126a7))['catch'](handleError(_0x52ee2a,null));};exports[_0xcaf4('0x46')]=function(_0x35962e,_0x26c963){var _0x5bc6e2={'raw':![],'where':{'id':_0x35962e[_0xcaf4('0x47')]['id']}},_0x34d8ea={};_0x34d8ea['model']=_[_0xcaf4('0x34')](db[_0xcaf4('0x2e')][_0xcaf4('0x48')]);_0x34d8ea['query']=_[_0xcaf4('0x34')](_0x35962e[_0xcaf4('0x33')]);_0x34d8ea[_0xcaf4('0x3d')]=_[_0xcaf4('0x35')](_0x34d8ea[_0xcaf4('0x31')],_0x34d8ea[_0xcaf4('0x33')]);_0x5bc6e2[_0xcaf4('0x36')]=_['intersection'](_0x34d8ea[_0xcaf4('0x31')],qs[_0xcaf4('0x49')](_0x35962e[_0xcaf4('0x33')][_0xcaf4('0x49')]));_0x5bc6e2[_0xcaf4('0x36')]=_0x5bc6e2[_0xcaf4('0x36')][_0xcaf4('0x37')]?_0x5bc6e2[_0xcaf4('0x36')]:_0x34d8ea[_0xcaf4('0x31')];if(_0x35962e['query']['includeAll']){_0x5bc6e2[_0xcaf4('0x43')]=[{'all':!![]}];}_0x5bc6e2=_[_0xcaf4('0x40')]({},_0x5bc6e2,_0x35962e[_0xcaf4('0x41')]);return db[_0xcaf4('0x2e')]['find'](_0x5bc6e2)['then'](handleEntityNotFound(_0x26c963,null))[_0xcaf4('0x25')](respondWithResult(_0x26c963,null))[_0xcaf4('0x4a')](handleError(_0x26c963,null));};exports['create']=function(_0x179d26,_0x37a2ba){return db[_0xcaf4('0x2e')][_0xcaf4('0x4b')](_0x179d26[_0xcaf4('0x4c')],{})[_0xcaf4('0x25')](function(_0x6efd8d){var _0x3f32a5=_0x179d26['user']['get']({'plain':!![]});if(!_0x3f32a5)throw new Error(_0xcaf4('0x4d'));if(_0x3f32a5[_0xcaf4('0x4e')]===_0xcaf4('0x4f')){var _0x4f2e01=_0x6efd8d[_0xcaf4('0x26')]({'plain':!![]});var _0x2d35be='Projects';return db[_0xcaf4('0x50')][_0xcaf4('0x51')]({'where':{'name':_0x2d35be,'userProfileId':_0x3f32a5[_0xcaf4('0x52')]},'raw':!![]})[_0xcaf4('0x25')](function(_0x403922){if(_0x403922&&_0x403922[_0xcaf4('0x53')]===0x0){return db['UserProfileResource'][_0xcaf4('0x4b')]({'name':_0x4f2e01[_0xcaf4('0x2b')],'resourceId':_0x4f2e01['id'],'type':_0x403922['name'],'sectionId':_0x403922['id']},{})[_0xcaf4('0x25')](function(){return _0x6efd8d;});}else{return _0x6efd8d;}})['catch'](function(_0x51c928){logger['error'](_0xcaf4('0x54'),_0x51c928);throw _0x51c928;});}return _0x6efd8d;})[_0xcaf4('0x25')](respondWithResult(_0x37a2ba,0xc9))[_0xcaf4('0x4a')](handleError(_0x37a2ba,null));};exports[_0xcaf4('0x55')]=function(_0x35de1f,_0x2b1ee7){var _0x5d5b92={'where':{'id':_0x35de1f[_0xcaf4('0x47')]['id']}},_0x561864={};_0x561864[_0xcaf4('0x31')]=_['keys'](db[_0xcaf4('0x2e')][_0xcaf4('0x48')]);_0x5d5b92[_0xcaf4('0x36')]=_[_0xcaf4('0x35')](_0x561864[_0xcaf4('0x31')],qs[_0xcaf4('0x49')](_0x35de1f['query'][_0xcaf4('0x49')]));_0x5d5b92['attributes']=_0x5d5b92['attributes'][_0xcaf4('0x37')]?_0x5d5b92['attributes']:_0x561864[_0xcaf4('0x31')];if(_0x35de1f['query'][_0xcaf4('0x42')]){_0x5d5b92[_0xcaf4('0x43')]=[{'all':!![]}];}_0x5d5b92=_[_0xcaf4('0x40')]({},_0x5d5b92,_0x35de1f['options']);return db[_0xcaf4('0x2e')][_0xcaf4('0x51')](_0x5d5b92)[_0xcaf4('0x25')](handleEntityNotFound(_0x2b1ee7,null))[_0xcaf4('0x25')](function(_0x3ead01){if(_0x3ead01){var _0xae6cbc=_0x3ead01[_0xcaf4('0x26')]({'plain':!![]});_0xae6cbc=qs[_0xcaf4('0x56')](_0xae6cbc,['id',_0xcaf4('0x57'),'updatedAt']);_0x35de1f[_0xcaf4('0x4c')]=_['omit'](_0x35de1f[_0xcaf4('0x4c')],['id',_0xcaf4('0x57'),_0xcaf4('0x58')]);return db[_0xcaf4('0x2e')][_0xcaf4('0x4b')](_[_0xcaf4('0x40')](_0xae6cbc,_0x35de1f[_0xcaf4('0x4c')]),{'include':_0x35de1f[_0xcaf4('0x33')]['includeAll']?[{'all':!![]}]:undefined})[_0xcaf4('0x25')](function(_0x20448){var _0xb26e05=_0x35de1f[_0xcaf4('0x4f')][_0xcaf4('0x26')]({'plain':!![]});if(!_0xb26e05)throw new Error(_0xcaf4('0x4d'));if(_0xb26e05[_0xcaf4('0x4e')]===_0xcaf4('0x4f')){var _0x568e8c=_0x20448[_0xcaf4('0x26')]({'plain':!![]});var _0x386f09=_0xcaf4('0x27');return db[_0xcaf4('0x50')][_0xcaf4('0x51')]({'where':{'name':_0x386f09,'userProfileId':_0xb26e05[_0xcaf4('0x52')]},'raw':!![]})[_0xcaf4('0x25')](function(_0x2449d8){if(_0x2449d8&&_0x2449d8[_0xcaf4('0x53')]===0x0){return db[_0xcaf4('0x28')][_0xcaf4('0x4b')]({'name':_0x568e8c[_0xcaf4('0x2b')],'resourceId':_0x568e8c['id'],'type':_0x2449d8['name'],'sectionId':_0x2449d8['id']},{})[_0xcaf4('0x25')](function(){return _0x20448;});}else{return _0x20448;}})[_0xcaf4('0x4a')](function(_0x1b000b){logger[_0xcaf4('0x59')](_0xcaf4('0x54'),_0x1b000b);throw _0x1b000b;});}return _0x20448;});}})['then'](respondWithResult(_0x2b1ee7,0xc9))[_0xcaf4('0x4a')](handleError(_0x2b1ee7,null));};exports[_0xcaf4('0x23')]=function(_0x429b7a,_0x1a6f19){if(_0x429b7a[_0xcaf4('0x4c')]['id']){delete _0x429b7a['body']['id'];}return db['JscriptyProject'][_0xcaf4('0x51')]({'where':{'id':_0x429b7a[_0xcaf4('0x47')]['id']}})[_0xcaf4('0x25')](handleEntityNotFound(_0x1a6f19,null))['then'](saveUpdates(_0x429b7a[_0xcaf4('0x4c')],null))[_0xcaf4('0x25')](respondWithResult(_0x1a6f19,null))['catch'](handleError(_0x1a6f19,null));};exports[_0xcaf4('0x24')]=function(_0x4b50e0,_0x3e6417){return db['JscriptyProject'][_0xcaf4('0x51')]({'where':{'id':_0x4b50e0[_0xcaf4('0x47')]['id']}})['then'](handleEntityNotFound(_0x3e6417,null))[_0xcaf4('0x25')](removeEntity(_0x3e6417,null))['catch'](handleError(_0x3e6417,null));};exports[_0xcaf4('0x5a')]=function(_0x29eede,_0x23cac1,_0x5483e0){var _0x43a6a8={'raw':!![],'where':{}};var _0x492310={};var _0x435b23={'count':0x0,'rows':[]};return db['JscriptyProject']['findOne']({'where':{'id':_0x29eede['params']['id']}})[_0xcaf4('0x25')](handleEntityNotFound(_0x23cac1,null))[_0xcaf4('0x25')](function(_0x3c00b1){if(_0x3c00b1){_0x492310['model']=_[_0xcaf4('0x34')](db[_0xcaf4('0x5b')][_0xcaf4('0x48')]);_0x492310[_0xcaf4('0x33')]=_[_0xcaf4('0x34')](_0x29eede['query']);_0x492310['filters']=_[_0xcaf4('0x35')](_0x492310[_0xcaf4('0x31')],_0x492310[_0xcaf4('0x33')]);_0x43a6a8[_0xcaf4('0x36')]=_['intersection'](_0x492310[_0xcaf4('0x31')],qs[_0xcaf4('0x49')](_0x29eede[_0xcaf4('0x33')][_0xcaf4('0x49')]));_0x43a6a8[_0xcaf4('0x36')]=_0x43a6a8['attributes'][_0xcaf4('0x37')]?_0x43a6a8[_0xcaf4('0x36')]:_0x492310['model'];if(!_0x29eede[_0xcaf4('0x33')]['hasOwnProperty']('nolimit')){_0x43a6a8[_0xcaf4('0x3a')]=qs[_0xcaf4('0x3a')](_0x29eede[_0xcaf4('0x33')][_0xcaf4('0x3a')]);_0x43a6a8[_0xcaf4('0x1b')]=qs[_0xcaf4('0x1b')](_0x29eede[_0xcaf4('0x33')][_0xcaf4('0x1b')]);}_0x43a6a8[_0xcaf4('0x5c')]=qs['sort'](_0x29eede[_0xcaf4('0x33')][_0xcaf4('0x3b')]);_0x43a6a8['where']=qs[_0xcaf4('0x3d')](_[_0xcaf4('0x3e')](_0x29eede[_0xcaf4('0x33')],_0x492310[_0xcaf4('0x3d')]));_0x43a6a8[_0xcaf4('0x3c')][_0xcaf4('0x5d')]=_0x3c00b1['id'];if(_0x29eede['query'][_0xcaf4('0x3f')]){_0x43a6a8[_0xcaf4('0x3c')]=_[_0xcaf4('0x40')](_0x43a6a8[_0xcaf4('0x3c')],{'$or':_['map'](_0x43a6a8['attributes'],function(_0x418b8f){var _0x3c0a35={};_0x3c0a35[_0x418b8f]={'$like':'%'+_0x29eede[_0xcaf4('0x33')][_0xcaf4('0x3f')]+'%'};return _0x3c0a35;})});}_0x43a6a8=_[_0xcaf4('0x40')]({},_0x43a6a8,_0x29eede['options']);return db[_0xcaf4('0x5b')]['count']({'where':_0x43a6a8[_0xcaf4('0x3c')]})[_0xcaf4('0x25')](function(_0x207eb0){_0x435b23['count']=_0x207eb0;if(_0x29eede[_0xcaf4('0x33')][_0xcaf4('0x42')]){_0x43a6a8[_0xcaf4('0x43')]=[{'all':!![]}];}return db[_0xcaf4('0x5b')][_0xcaf4('0x44')](_0x43a6a8);})[_0xcaf4('0x25')](function(_0xe0196f){_0x435b23[_0xcaf4('0x45')]=_0xe0196f;return _0x435b23;});}})[_0xcaf4('0x25')](respondWithFilteredResult(_0x23cac1,_0x43a6a8))[_0xcaf4('0x4a')](handleError(_0x23cac1,null));};exports[_0xcaf4('0x5e')]=function(_0x2cc17d,_0x46f320,_0x59d266){var _0x149e4a={'raw':!![],'where':{}};var _0x1ecdb6={};var _0x4d7668={'count':0x0,'rows':[]};return db[_0xcaf4('0x2e')][_0xcaf4('0x5f')]({'where':{'id':_0x2cc17d['params']['id']}})['then'](handleEntityNotFound(_0x46f320,null))[_0xcaf4('0x25')](function(_0x21644f){if(_0x21644f){_0x1ecdb6[_0xcaf4('0x31')]=_['keys'](db[_0xcaf4('0x60')][_0xcaf4('0x48')]);_0x1ecdb6[_0xcaf4('0x33')]=_[_0xcaf4('0x34')](_0x2cc17d[_0xcaf4('0x33')]);_0x1ecdb6[_0xcaf4('0x3d')]=_[_0xcaf4('0x35')](_0x1ecdb6[_0xcaf4('0x31')],_0x1ecdb6[_0xcaf4('0x33')]);_0x149e4a[_0xcaf4('0x36')]=_[_0xcaf4('0x35')](_0x1ecdb6[_0xcaf4('0x31')],qs['fields'](_0x2cc17d[_0xcaf4('0x33')][_0xcaf4('0x49')]));_0x149e4a[_0xcaf4('0x36')]=_0x149e4a[_0xcaf4('0x36')][_0xcaf4('0x37')]?_0x149e4a[_0xcaf4('0x36')]:_0x1ecdb6[_0xcaf4('0x31')];if(!_0x2cc17d[_0xcaf4('0x33')][_0xcaf4('0x38')](_0xcaf4('0x39'))){_0x149e4a[_0xcaf4('0x3a')]=qs[_0xcaf4('0x3a')](_0x2cc17d[_0xcaf4('0x33')][_0xcaf4('0x3a')]);_0x149e4a[_0xcaf4('0x1b')]=qs[_0xcaf4('0x1b')](_0x2cc17d['query']['offset']);}_0x149e4a['order']=qs[_0xcaf4('0x3b')](_0x2cc17d['query'][_0xcaf4('0x3b')]);_0x149e4a['where']=qs[_0xcaf4('0x3d')](_[_0xcaf4('0x3e')](_0x2cc17d[_0xcaf4('0x33')],_0x1ecdb6['filters']));_0x149e4a[_0xcaf4('0x3c')][_0xcaf4('0x5d')]=_0x21644f['id'];if(_0x2cc17d[_0xcaf4('0x33')][_0xcaf4('0x3f')]){_0x149e4a['where']=_[_0xcaf4('0x40')](_0x149e4a[_0xcaf4('0x3c')],{'$or':_[_0xcaf4('0x32')](_0x149e4a[_0xcaf4('0x36')],function(_0x55dbdd){var _0x3cf7ea={};_0x3cf7ea[_0x55dbdd]={'$like':'%'+_0x2cc17d['query'][_0xcaf4('0x3f')]+'%'};return _0x3cf7ea;})});}_0x149e4a=_['merge']({},_0x149e4a,_0x2cc17d[_0xcaf4('0x41')]);return db[_0xcaf4('0x60')][_0xcaf4('0x1d')]({'where':_0x149e4a[_0xcaf4('0x3c')]})[_0xcaf4('0x25')](function(_0x176a40){_0x4d7668['count']=_0x176a40;if(_0x2cc17d[_0xcaf4('0x33')][_0xcaf4('0x42')]){_0x149e4a['include']=[{'all':!![]}];}return db[_0xcaf4('0x60')][_0xcaf4('0x44')](_0x149e4a);})[_0xcaf4('0x25')](function(_0x15db07){_0x4d7668[_0xcaf4('0x45')]=_0x15db07;return _0x4d7668;});}})['then'](respondWithFilteredResult(_0x46f320,_0x149e4a))[_0xcaf4('0x4a')](handleError(_0x46f320,null));};function char(_0xa920b3){return _0xcaf4('0x61')===typeof _0xa920b3?String[_0xcaf4('0x62')][_0xcaf4('0x21')](null,arguments):_0xa920b3;}function needsEncapsulation(_0x5b2008){return!!_0x5b2008&&(_0x5b2008[_0xcaf4('0x63')]()[_0xcaf4('0x64')](char(0xd))>=0x0||_0x5b2008[_0xcaf4('0x63')]()['indexOf'](char(0xa))>=0x0||_0x5b2008[_0xcaf4('0x63')]()[_0xcaf4('0x64')](char(0x2c))>=0x0||_0x5b2008[_0xcaf4('0x63')]()[_0xcaf4('0x64')](char(0x22))>=0x0);}function encapsulate(_0x780b78){var _0x482080=char(0x22),_0x31925f='\x5c'+char(0x22),_0x5f82ab=_0x780b78[_0xcaf4('0x63')]()['replace'](new RegExp(_0x482080,'g'),_0x31925f);return _0x482080+_0x5f82ab+_0x482080;}exports[_0xcaf4('0x65')]=function(_0x4c496a,_0x48b51b,_0x1b8e88){var _0x1a903f,_0x13edf0;var _0x2ecf55={'where':{'ProjectId':_0x4c496a[_0xcaf4('0x47')]['id']}};if(_0x4c496a[_0xcaf4('0x33')]['startTime']){_0x2ecf55[_0xcaf4('0x3c')][_0xcaf4('0x66')]=JSON[_0xcaf4('0x67')](_0x4c496a['query'][_0xcaf4('0x68')]);}return db[_0xcaf4('0x5b')][_0xcaf4('0x44')](_0x2ecf55)[_0xcaf4('0x25')](handleEntityNotFound(_0x48b51b,null))[_0xcaf4('0x25')](function(_0x261c8c){if(_0x261c8c){_0x1a903f=_0x261c8c;return db[_0xcaf4('0x69')]['findAll']({'where':{'SessionId':{'$in':_[_0xcaf4('0x32')](_0x1a903f,'id')},'ProjectId':_0x4c496a[_0xcaf4('0x47')]['id']},'order':_0xcaf4('0x6a')});}})[_0xcaf4('0x25')](handleEntityNotFound(_0x48b51b,null))['then'](function(_0xa01db1){if(_0xa01db1){_0x13edf0=_0xa01db1;var _0x39dfcb={};for(var _0x33ac7b=0x0,_0xa68ec3=_0x13edf0['length'];_0x33ac7b<_0xa68ec3;_0x33ac7b++){if(!_0x39dfcb[_0xcaf4('0x38')](_0x13edf0[_0x33ac7b]['questionId'])){_0x39dfcb[_0x13edf0[_0x33ac7b][_0xcaf4('0x6b')]]=needsEncapsulation(_0x13edf0[_0x33ac7b]['question'])?encapsulate(_0x13edf0[_0x33ac7b][_0xcaf4('0x6c')]):_0x13edf0[_0x33ac7b]['question'];}}var _0x3f49c4=[],_0x695bde={};for(var _0x30e4b1=0x0,_0x11b203=_0x1a903f[_0xcaf4('0x37')];_0x30e4b1<_0x11b203;_0x30e4b1++){_0x695bde={'ProjectId':_0x4c496a['params']['id'],'SessionId':_0x1a903f[_0x30e4b1]['id'],'StartTime':moment(_0x1a903f[_0x30e4b1][_0xcaf4('0x66')])[_0xcaf4('0x6d')](_0xcaf4('0x6e'))};for(var _0x2fcec0=0x0,_0x565fcf=_0x13edf0[_0xcaf4('0x37')];_0x2fcec0<_0x565fcf;_0x2fcec0++){if(_0x13edf0[_0x2fcec0][_0xcaf4('0x6f')]==_0x1a903f[_0x30e4b1]['id']&&_0x39dfcb[_0xcaf4('0x38')](_0x13edf0[_0x2fcec0][_0xcaf4('0x6b')])){_0x695bde[_0x39dfcb[_0x13edf0[_0x2fcec0]['questionId']]]=_0x13edf0[_0x2fcec0][_0xcaf4('0x70')];}}for(var _0x4edae1 in _0x39dfcb){if(!_0x695bde[_0xcaf4('0x38')](_0x39dfcb[_0x4edae1])){_0x695bde[_0x39dfcb[_0x4edae1]]=null;}}_0x3f49c4[_0xcaf4('0x71')](_0x695bde);}return _0x3f49c4;}})[_0xcaf4('0x25')](function(_0x128116){if(!_['isEmpty'](_0x128116)){var _0x1c50ed=toCsv(_0x128116);var _0x181936=Date[_0xcaf4('0x72')]();fs[_0xcaf4('0x73')](util[_0xcaf4('0x6d')](_0xcaf4('0x74'),_0x4c496a['params']['id'],_0x181936),_0x1c50ed);_0x48b51b[_0xcaf4('0x75')](_0xcaf4('0x76'),_0xcaf4('0x77')+util[_0xcaf4('0x6d')](_0xcaf4('0x78'),_0x4c496a['params']['id'],_0x181936));_0x48b51b[_0xcaf4('0x75')]('Content-type',_0xcaf4('0x79'));return _0x48b51b['download'](util[_0xcaf4('0x6d')](_0xcaf4('0x74'),_0x4c496a[_0xcaf4('0x47')]['id'],_0x181936));}else{return _0x48b51b['sendStatus'](0xcc);}})['catch'](handleError(_0x48b51b,null));};
\ No newline at end of file
+var _0x7582=['download','/tmp/Jscripty_Project_%d_Summary_%s.csv','rimraf','zip-dir','fast-json-patch','moment','mustache','util','path','sox','ejs','fs-extra','squel','crypto','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','count','limit','set','Content-Range','apply','reject','save','update','then','destroy','get','Projects','UserProfileResource','error','name','send','index','map','rawAttributes','fieldName','type','keys','filters','model','query','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','options','JscriptyProject','findAll','rows','catch','show','includeAll','include','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','params','createdAt','updatedAt','getSessions','findOne','ProjectId','JscriptySessionReport','getAnswers','JscriptyAnswerReport','number','toString','indexOf','replace','getSummary','starttime','parse','startTime','JscriptyQuestionReport','-createdAt','questionId','question','format','SessionId','answer','push','isEmpty','now','writeFileSync','setHeader','Content-disposition','Jscripty_Project_%d_Summary_%s.csv','Content-type','text/csv'];(function(_0x465028,_0x4570ac){var _0xb783d4=function(_0x5458c5){while(--_0x5458c5){_0x465028['push'](_0x465028['shift']());}};_0xb783d4(++_0x4570ac);}(_0x7582,0x167));var _0x2758=function(_0x5be795,_0x1cb1b8){_0x5be795=_0x5be795-0x0;var _0x4e8a3b=_0x7582[_0x5be795];return _0x4e8a3b;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x2758('0x0'));var zipdir=require(_0x2758('0x1'));var jsonpatch=require(_0x2758('0x2'));var rp=require('request-promise');var moment=require(_0x2758('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x2758('0x4'));var util=require(_0x2758('0x5'));var path=require(_0x2758('0x6'));var sox=require(_0x2758('0x7'));var csv=require('to-csv');var ejs=require(_0x2758('0x8'));var fs=require('fs');var fs_extra=require(_0x2758('0x9'));var _=require('lodash');var squel=require(_0x2758('0xa'));var crypto=require(_0x2758('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x2758('0xc'));var toCsv=require(_0x2758('0xd'));var querystring=require(_0x2758('0xe'));var Papa=require('papaparse');var Redis=require(_0x2758('0xf'));var authService=require(_0x2758('0x10'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x2758('0x11'));var logger=require(_0x2758('0x12'))(_0x2758('0x13'));var utils=require(_0x2758('0x14'));var config=require(_0x2758('0x15'));var licenseUtil=require(_0x2758('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x493357,_0x4caa8b){_0x4caa8b=_0x4caa8b||0xcc;return function(_0x1846cd){if(_0x1846cd){return _0x493357[_0x2758('0x17')](_0x4caa8b);}return _0x493357[_0x2758('0x18')](_0x4caa8b)[_0x2758('0x19')]();};}function respondWithResult(_0x3233af,_0x9db637){_0x9db637=_0x9db637||0xc8;return function(_0x3e1a7e){if(_0x3e1a7e){return _0x3233af[_0x2758('0x18')](_0x9db637)[_0x2758('0x1a')](_0x3e1a7e);}};}function respondWithFilteredResult(_0xad4346,_0x414a0b){return function(_0x361f14){if(_0x361f14){var _0x280ccc=typeof _0x414a0b[_0x2758('0x1b')]==='undefined'&&typeof _0x414a0b['limit']==='undefined';var _0x2b0ce0=_0x361f14[_0x2758('0x1c')];var _0x358358=_0x280ccc?0x0:_0x414a0b[_0x2758('0x1b')];var _0x1bccd9=_0x280ccc?_0x361f14[_0x2758('0x1c')]:_0x414a0b['offset']+_0x414a0b[_0x2758('0x1d')];var _0x4202e5;if(_0x1bccd9>=_0x2b0ce0){_0x1bccd9=_0x2b0ce0;_0x4202e5=0xc8;}else{_0x4202e5=0xce;}_0xad4346['status'](_0x4202e5);return _0xad4346[_0x2758('0x1e')](_0x2758('0x1f'),_0x358358+'-'+_0x1bccd9+'/'+_0x2b0ce0)[_0x2758('0x1a')](_0x361f14);}return null;};}function patchUpdates(_0x4100a0){return function(_0x50526b){try{jsonpatch[_0x2758('0x20')](_0x50526b,_0x4100a0,!![]);}catch(_0x4fa215){return BPromise[_0x2758('0x21')](_0x4fa215);}return _0x50526b[_0x2758('0x22')]();};}function saveUpdates(_0x27a887,_0x2797fe){return function(_0x4699c4){if(_0x4699c4){return _0x4699c4[_0x2758('0x23')](_0x27a887)[_0x2758('0x24')](function(_0x222601){return _0x222601;});}return null;};}function removeEntity(_0x38c483,_0x2ef395){return function(_0x1f645d){if(_0x1f645d){return _0x1f645d[_0x2758('0x25')]()['then'](function(){var _0x4f92f2=_0x1f645d[_0x2758('0x26')]({'plain':!![]});var _0x277f69=_0x2758('0x27');return db[_0x2758('0x28')][_0x2758('0x25')]({'where':{'type':_0x277f69,'resourceId':_0x4f92f2['id']}})[_0x2758('0x24')](function(){return _0x1f645d;});})['then'](function(){_0x38c483['status'](0xcc)[_0x2758('0x19')]();});}};}function handleEntityNotFound(_0x28c1f2,_0xee59e6){return function(_0x1d56cd){if(!_0x1d56cd){_0x28c1f2['sendStatus'](0x194);}return _0x1d56cd;};}function handleError(_0x47c969,_0x3e4cd7){_0x3e4cd7=_0x3e4cd7||0x1f4;return function(_0x230f28){logger[_0x2758('0x29')](_0x230f28['stack']);if(_0x230f28[_0x2758('0x2a')]){delete _0x230f28['name'];}_0x47c969[_0x2758('0x18')](_0x3e4cd7)[_0x2758('0x2b')](_0x230f28);};}exports[_0x2758('0x2c')]=function(_0x348d0d,_0x2e0613){var _0x2000de={},_0x2d44e4={},_0x11efa6={'count':0x0,'rows':[]};var _0x225f6f=_[_0x2758('0x2d')](db['JscriptyProject'][_0x2758('0x2e')],function(_0x89c340){return{'name':_0x89c340[_0x2758('0x2f')],'type':_0x89c340[_0x2758('0x30')]['key']};});_0x2d44e4['model']=_[_0x2758('0x2d')](_0x225f6f,_0x2758('0x2a'));_0x2d44e4['query']=_[_0x2758('0x31')](_0x348d0d['query']);_0x2d44e4[_0x2758('0x32')]=_['intersection'](_0x2d44e4[_0x2758('0x33')],_0x2d44e4[_0x2758('0x34')]);_0x2000de['attributes']=_[_0x2758('0x35')](_0x2d44e4[_0x2758('0x33')],qs[_0x2758('0x36')](_0x348d0d[_0x2758('0x34')][_0x2758('0x36')]));_0x2000de[_0x2758('0x37')]=_0x2000de[_0x2758('0x37')][_0x2758('0x38')]?_0x2000de['attributes']:_0x2d44e4[_0x2758('0x33')];if(!_0x348d0d[_0x2758('0x34')][_0x2758('0x39')](_0x2758('0x3a'))){_0x2000de[_0x2758('0x1d')]=qs[_0x2758('0x1d')](_0x348d0d[_0x2758('0x34')][_0x2758('0x1d')]);_0x2000de[_0x2758('0x1b')]=qs['offset'](_0x348d0d['query'][_0x2758('0x1b')]);}_0x2000de[_0x2758('0x3b')]=qs[_0x2758('0x3c')](_0x348d0d[_0x2758('0x34')][_0x2758('0x3c')]);_0x2000de[_0x2758('0x3d')]=qs['filters'](_[_0x2758('0x3e')](_0x348d0d[_0x2758('0x34')],_0x2d44e4['filters']),_0x225f6f);if(_0x348d0d['query']['filter']){_0x2000de[_0x2758('0x3d')]=_[_0x2758('0x3f')](_0x2000de[_0x2758('0x3d')],{'$or':_[_0x2758('0x2d')](_0x225f6f,function(_0x564462){if(_0x564462[_0x2758('0x30')]!==_0x2758('0x40')){var _0x276ca0={};_0x276ca0[_0x564462[_0x2758('0x2a')]]={'$like':'%'+_0x348d0d[_0x2758('0x34')][_0x2758('0x41')]+'%'};return _0x276ca0;}})});}_0x2000de=_['merge']({},_0x2000de,_0x348d0d[_0x2758('0x42')]);var _0x3ceab5={'where':_0x2000de[_0x2758('0x3d')]};return db[_0x2758('0x43')][_0x2758('0x1c')](_0x3ceab5)[_0x2758('0x24')](function(_0xf0df8e){_0x11efa6[_0x2758('0x1c')]=_0xf0df8e;if(_0x348d0d[_0x2758('0x34')]['includeAll']){_0x2000de['include']=[{'all':!![]}];}return db[_0x2758('0x43')][_0x2758('0x44')](_0x2000de);})['then'](function(_0x2d19d8){_0x11efa6[_0x2758('0x45')]=_0x2d19d8;return _0x11efa6;})['then'](respondWithFilteredResult(_0x2e0613,_0x2000de))[_0x2758('0x46')](handleError(_0x2e0613,null));};exports[_0x2758('0x47')]=function(_0x1a5d64,_0x372862){var _0x291344={'raw':![],'where':{'id':_0x1a5d64['params']['id']}},_0x5a98d5={};_0x5a98d5['model']=_[_0x2758('0x31')](db[_0x2758('0x43')][_0x2758('0x2e')]);_0x5a98d5[_0x2758('0x34')]=_[_0x2758('0x31')](_0x1a5d64[_0x2758('0x34')]);_0x5a98d5[_0x2758('0x32')]=_[_0x2758('0x35')](_0x5a98d5['model'],_0x5a98d5['query']);_0x291344[_0x2758('0x37')]=_[_0x2758('0x35')](_0x5a98d5[_0x2758('0x33')],qs['fields'](_0x1a5d64['query'][_0x2758('0x36')]));_0x291344[_0x2758('0x37')]=_0x291344['attributes'][_0x2758('0x38')]?_0x291344[_0x2758('0x37')]:_0x5a98d5[_0x2758('0x33')];if(_0x1a5d64[_0x2758('0x34')][_0x2758('0x48')]){_0x291344[_0x2758('0x49')]=[{'all':!![]}];}_0x291344=_[_0x2758('0x3f')]({},_0x291344,_0x1a5d64[_0x2758('0x42')]);return db[_0x2758('0x43')][_0x2758('0x4a')](_0x291344)['then'](handleEntityNotFound(_0x372862,null))['then'](respondWithResult(_0x372862,null))[_0x2758('0x46')](handleError(_0x372862,null));};exports[_0x2758('0x4b')]=function(_0x43af2b,_0x2121df){return db[_0x2758('0x43')]['create'](_0x43af2b[_0x2758('0x4c')],{})['then'](function(_0x451458){var _0x264a11=_0x43af2b[_0x2758('0x4d')][_0x2758('0x26')]({'plain':!![]});if(!_0x264a11)throw new Error(_0x2758('0x4e'));if(_0x264a11['role']===_0x2758('0x4d')){var _0x5704c6=_0x451458[_0x2758('0x26')]({'plain':!![]});var _0x2e5c51='Projects';return db[_0x2758('0x4f')][_0x2758('0x4a')]({'where':{'name':_0x2e5c51,'userProfileId':_0x264a11[_0x2758('0x50')]},'raw':!![]})[_0x2758('0x24')](function(_0x20649c){if(_0x20649c&&_0x20649c[_0x2758('0x51')]===0x0){return db[_0x2758('0x28')]['create']({'name':_0x5704c6[_0x2758('0x2a')],'resourceId':_0x5704c6['id'],'type':_0x20649c[_0x2758('0x2a')],'sectionId':_0x20649c['id']},{})[_0x2758('0x24')](function(){return _0x451458;});}else{return _0x451458;}})['catch'](function(_0x5b1b01){logger[_0x2758('0x29')](_0x2758('0x52'),_0x5b1b01);throw _0x5b1b01;});}return _0x451458;})[_0x2758('0x24')](respondWithResult(_0x2121df,0xc9))['catch'](handleError(_0x2121df,null));};exports[_0x2758('0x53')]=function(_0x191b3f,_0x52a01d){var _0x850f9b={'where':{'id':_0x191b3f[_0x2758('0x54')]['id']}},_0x3ee3ad={};_0x3ee3ad['model']=_[_0x2758('0x31')](db[_0x2758('0x43')][_0x2758('0x2e')]);_0x850f9b[_0x2758('0x37')]=_['intersection'](_0x3ee3ad['model'],qs[_0x2758('0x36')](_0x191b3f[_0x2758('0x34')][_0x2758('0x36')]));_0x850f9b[_0x2758('0x37')]=_0x850f9b[_0x2758('0x37')][_0x2758('0x38')]?_0x850f9b[_0x2758('0x37')]:_0x3ee3ad['model'];if(_0x191b3f[_0x2758('0x34')][_0x2758('0x48')]){_0x850f9b[_0x2758('0x49')]=[{'all':!![]}];}_0x850f9b=_[_0x2758('0x3f')]({},_0x850f9b,_0x191b3f[_0x2758('0x42')]);return db['JscriptyProject']['find'](_0x850f9b)['then'](handleEntityNotFound(_0x52a01d,null))['then'](function(_0x5396c3){if(_0x5396c3){var _0x43d0cb=_0x5396c3[_0x2758('0x26')]({'plain':!![]});_0x43d0cb=qs['omit'](_0x43d0cb,['id',_0x2758('0x55'),_0x2758('0x56')]);_0x191b3f[_0x2758('0x4c')]=_['omit'](_0x191b3f[_0x2758('0x4c')],['id',_0x2758('0x55'),_0x2758('0x56')]);return db[_0x2758('0x43')]['create'](_['merge'](_0x43d0cb,_0x191b3f['body']),{'include':_0x191b3f[_0x2758('0x34')][_0x2758('0x48')]?[{'all':!![]}]:undefined})[_0x2758('0x24')](function(_0x3a7b43){var _0x49eb53=_0x191b3f[_0x2758('0x4d')][_0x2758('0x26')]({'plain':!![]});if(!_0x49eb53)throw new Error(_0x2758('0x4e'));if(_0x49eb53['role']===_0x2758('0x4d')){var _0x22e389=_0x3a7b43[_0x2758('0x26')]({'plain':!![]});var _0x2f7591='Projects';return db[_0x2758('0x4f')][_0x2758('0x4a')]({'where':{'name':_0x2f7591,'userProfileId':_0x49eb53[_0x2758('0x50')]},'raw':!![]})[_0x2758('0x24')](function(_0x45302b){if(_0x45302b&&_0x45302b[_0x2758('0x51')]===0x0){return db[_0x2758('0x28')][_0x2758('0x4b')]({'name':_0x22e389[_0x2758('0x2a')],'resourceId':_0x22e389['id'],'type':_0x45302b[_0x2758('0x2a')],'sectionId':_0x45302b['id']},{})[_0x2758('0x24')](function(){return _0x3a7b43;});}else{return _0x3a7b43;}})[_0x2758('0x46')](function(_0x37ef08){logger[_0x2758('0x29')](_0x2758('0x52'),_0x37ef08);throw _0x37ef08;});}return _0x3a7b43;});}})['then'](respondWithResult(_0x52a01d,0xc9))[_0x2758('0x46')](handleError(_0x52a01d,null));};exports[_0x2758('0x23')]=function(_0x1e7853,_0x1e3ce5){if(_0x1e7853[_0x2758('0x4c')]['id']){delete _0x1e7853['body']['id'];}return db[_0x2758('0x43')][_0x2758('0x4a')]({'where':{'id':_0x1e7853[_0x2758('0x54')]['id']}})[_0x2758('0x24')](handleEntityNotFound(_0x1e3ce5,null))[_0x2758('0x24')](saveUpdates(_0x1e7853[_0x2758('0x4c')],null))[_0x2758('0x24')](respondWithResult(_0x1e3ce5,null))['catch'](handleError(_0x1e3ce5,null));};exports[_0x2758('0x25')]=function(_0x2e4db4,_0x2e1128){return db[_0x2758('0x43')][_0x2758('0x4a')]({'where':{'id':_0x2e4db4[_0x2758('0x54')]['id']}})[_0x2758('0x24')](handleEntityNotFound(_0x2e1128,null))[_0x2758('0x24')](removeEntity(_0x2e1128,null))['catch'](handleError(_0x2e1128,null));};exports[_0x2758('0x57')]=function(_0x228829,_0x475748,_0x41d3ff){var _0x47ddb5={'raw':!![],'where':{}};var _0x3ae88e={};var _0x3aebb0={'count':0x0,'rows':[]};return db['JscriptyProject'][_0x2758('0x58')]({'where':{'id':_0x228829[_0x2758('0x54')]['id']}})['then'](handleEntityNotFound(_0x475748,null))[_0x2758('0x24')](function(_0x111e49){if(_0x111e49){_0x3ae88e[_0x2758('0x33')]=_[_0x2758('0x31')](db['JscriptySessionReport'][_0x2758('0x2e')]);_0x3ae88e['query']=_['keys'](_0x228829[_0x2758('0x34')]);_0x3ae88e[_0x2758('0x32')]=_[_0x2758('0x35')](_0x3ae88e[_0x2758('0x33')],_0x3ae88e[_0x2758('0x34')]);_0x47ddb5['attributes']=_[_0x2758('0x35')](_0x3ae88e['model'],qs[_0x2758('0x36')](_0x228829[_0x2758('0x34')][_0x2758('0x36')]));_0x47ddb5[_0x2758('0x37')]=_0x47ddb5[_0x2758('0x37')][_0x2758('0x38')]?_0x47ddb5[_0x2758('0x37')]:_0x3ae88e[_0x2758('0x33')];if(!_0x228829['query']['hasOwnProperty']('nolimit')){_0x47ddb5['limit']=qs['limit'](_0x228829[_0x2758('0x34')][_0x2758('0x1d')]);_0x47ddb5[_0x2758('0x1b')]=qs[_0x2758('0x1b')](_0x228829[_0x2758('0x34')][_0x2758('0x1b')]);}_0x47ddb5[_0x2758('0x3b')]=qs[_0x2758('0x3c')](_0x228829['query'][_0x2758('0x3c')]);_0x47ddb5[_0x2758('0x3d')]=qs[_0x2758('0x32')](_[_0x2758('0x3e')](_0x228829[_0x2758('0x34')],_0x3ae88e[_0x2758('0x32')]));_0x47ddb5[_0x2758('0x3d')][_0x2758('0x59')]=_0x111e49['id'];if(_0x228829[_0x2758('0x34')][_0x2758('0x41')]){_0x47ddb5[_0x2758('0x3d')]=_[_0x2758('0x3f')](_0x47ddb5[_0x2758('0x3d')],{'$or':_['map'](_0x47ddb5[_0x2758('0x37')],function(_0x1b5aff){var _0x2e8cec={};_0x2e8cec[_0x1b5aff]={'$like':'%'+_0x228829['query'][_0x2758('0x41')]+'%'};return _0x2e8cec;})});}_0x47ddb5=_[_0x2758('0x3f')]({},_0x47ddb5,_0x228829[_0x2758('0x42')]);return db[_0x2758('0x5a')][_0x2758('0x1c')]({'where':_0x47ddb5[_0x2758('0x3d')]})[_0x2758('0x24')](function(_0x3932c3){_0x3aebb0[_0x2758('0x1c')]=_0x3932c3;if(_0x228829[_0x2758('0x34')][_0x2758('0x48')]){_0x47ddb5[_0x2758('0x49')]=[{'all':!![]}];}return db['JscriptySessionReport'][_0x2758('0x44')](_0x47ddb5);})[_0x2758('0x24')](function(_0x31292c){_0x3aebb0[_0x2758('0x45')]=_0x31292c;return _0x3aebb0;});}})['then'](respondWithFilteredResult(_0x475748,_0x47ddb5))[_0x2758('0x46')](handleError(_0x475748,null));};exports[_0x2758('0x5b')]=function(_0x515eae,_0xcda34b,_0x26fb03){var _0x398cab={'raw':!![],'where':{}};var _0x301fe5={};var _0x3a92d4={'count':0x0,'rows':[]};return db[_0x2758('0x43')][_0x2758('0x58')]({'where':{'id':_0x515eae[_0x2758('0x54')]['id']}})[_0x2758('0x24')](handleEntityNotFound(_0xcda34b,null))[_0x2758('0x24')](function(_0x4c816d){if(_0x4c816d){_0x301fe5[_0x2758('0x33')]=_[_0x2758('0x31')](db['JscriptyAnswerReport'][_0x2758('0x2e')]);_0x301fe5[_0x2758('0x34')]=_['keys'](_0x515eae[_0x2758('0x34')]);_0x301fe5[_0x2758('0x32')]=_[_0x2758('0x35')](_0x301fe5[_0x2758('0x33')],_0x301fe5[_0x2758('0x34')]);_0x398cab[_0x2758('0x37')]=_[_0x2758('0x35')](_0x301fe5[_0x2758('0x33')],qs[_0x2758('0x36')](_0x515eae[_0x2758('0x34')][_0x2758('0x36')]));_0x398cab[_0x2758('0x37')]=_0x398cab[_0x2758('0x37')][_0x2758('0x38')]?_0x398cab[_0x2758('0x37')]:_0x301fe5['model'];if(!_0x515eae[_0x2758('0x34')][_0x2758('0x39')](_0x2758('0x3a'))){_0x398cab[_0x2758('0x1d')]=qs[_0x2758('0x1d')](_0x515eae[_0x2758('0x34')][_0x2758('0x1d')]);_0x398cab['offset']=qs['offset'](_0x515eae[_0x2758('0x34')][_0x2758('0x1b')]);}_0x398cab[_0x2758('0x3b')]=qs[_0x2758('0x3c')](_0x515eae[_0x2758('0x34')]['sort']);_0x398cab[_0x2758('0x3d')]=qs[_0x2758('0x32')](_[_0x2758('0x3e')](_0x515eae['query'],_0x301fe5[_0x2758('0x32')]));_0x398cab['where'][_0x2758('0x59')]=_0x4c816d['id'];if(_0x515eae[_0x2758('0x34')][_0x2758('0x41')]){_0x398cab[_0x2758('0x3d')]=_[_0x2758('0x3f')](_0x398cab[_0x2758('0x3d')],{'$or':_[_0x2758('0x2d')](_0x398cab['attributes'],function(_0xa63291){var _0x247fa0={};_0x247fa0[_0xa63291]={'$like':'%'+_0x515eae[_0x2758('0x34')][_0x2758('0x41')]+'%'};return _0x247fa0;})});}_0x398cab=_['merge']({},_0x398cab,_0x515eae[_0x2758('0x42')]);return db[_0x2758('0x5c')][_0x2758('0x1c')]({'where':_0x398cab[_0x2758('0x3d')]})[_0x2758('0x24')](function(_0x222c8e){_0x3a92d4['count']=_0x222c8e;if(_0x515eae[_0x2758('0x34')][_0x2758('0x48')]){_0x398cab['include']=[{'all':!![]}];}return db[_0x2758('0x5c')][_0x2758('0x44')](_0x398cab);})[_0x2758('0x24')](function(_0x36c849){_0x3a92d4['rows']=_0x36c849;return _0x3a92d4;});}})[_0x2758('0x24')](respondWithFilteredResult(_0xcda34b,_0x398cab))[_0x2758('0x46')](handleError(_0xcda34b,null));};function char(_0x5cbff7){return _0x2758('0x5d')===typeof _0x5cbff7?String['fromCharCode'][_0x2758('0x20')](null,arguments):_0x5cbff7;}function needsEncapsulation(_0x530303){return!!_0x530303&&(_0x530303[_0x2758('0x5e')]()['indexOf'](char(0xd))>=0x0||_0x530303[_0x2758('0x5e')]()[_0x2758('0x5f')](char(0xa))>=0x0||_0x530303[_0x2758('0x5e')]()[_0x2758('0x5f')](char(0x2c))>=0x0||_0x530303[_0x2758('0x5e')]()[_0x2758('0x5f')](char(0x22))>=0x0);}function encapsulate(_0x6c65f5){var _0x3c58c2=char(0x22),_0x121d5c='\x5c'+char(0x22),_0x22e8bb=_0x6c65f5[_0x2758('0x5e')]()[_0x2758('0x60')](new RegExp(_0x3c58c2,'g'),_0x121d5c);return _0x3c58c2+_0x22e8bb+_0x3c58c2;}exports[_0x2758('0x61')]=function(_0x5ab9ab,_0x25897a,_0x1b862d){var _0x298203,_0x43a9ab;var _0x52520a={'where':{'ProjectId':_0x5ab9ab[_0x2758('0x54')]['id']}};if(_0x5ab9ab[_0x2758('0x34')]['startTime']){_0x52520a['where'][_0x2758('0x62')]=JSON[_0x2758('0x63')](_0x5ab9ab[_0x2758('0x34')][_0x2758('0x64')]);}return db[_0x2758('0x5a')][_0x2758('0x44')](_0x52520a)[_0x2758('0x24')](handleEntityNotFound(_0x25897a,null))[_0x2758('0x24')](function(_0x400cd1){if(_0x400cd1){_0x298203=_0x400cd1;return db[_0x2758('0x65')]['findAll']({'where':{'SessionId':{'$in':_[_0x2758('0x2d')](_0x298203,'id')},'ProjectId':_0x5ab9ab[_0x2758('0x54')]['id']},'order':_0x2758('0x66')});}})[_0x2758('0x24')](handleEntityNotFound(_0x25897a,null))[_0x2758('0x24')](function(_0x35b104){if(_0x35b104){_0x43a9ab=_0x35b104;var _0x5cb64d={};for(var _0x4920b6=0x0,_0x744491=_0x43a9ab[_0x2758('0x38')];_0x4920b6<_0x744491;_0x4920b6++){if(!_0x5cb64d[_0x2758('0x39')](_0x43a9ab[_0x4920b6][_0x2758('0x67')])){_0x5cb64d[_0x43a9ab[_0x4920b6][_0x2758('0x67')]]=needsEncapsulation(_0x43a9ab[_0x4920b6]['question'])?encapsulate(_0x43a9ab[_0x4920b6][_0x2758('0x68')]):_0x43a9ab[_0x4920b6][_0x2758('0x68')];}}var _0x317992=[],_0x372f9b={};for(var _0x542a3c=0x0,_0x549d7f=_0x298203[_0x2758('0x38')];_0x542a3c<_0x549d7f;_0x542a3c++){_0x372f9b={'ProjectId':_0x5ab9ab[_0x2758('0x54')]['id'],'SessionId':_0x298203[_0x542a3c]['id'],'StartTime':moment(_0x298203[_0x542a3c][_0x2758('0x62')])[_0x2758('0x69')]('YYYY-MM-DD\x20HH:mm:ss')};for(var _0x27ca4e=0x0,_0x5e90a1=_0x43a9ab[_0x2758('0x38')];_0x27ca4e<_0x5e90a1;_0x27ca4e++){if(_0x43a9ab[_0x27ca4e][_0x2758('0x6a')]==_0x298203[_0x542a3c]['id']&&_0x5cb64d[_0x2758('0x39')](_0x43a9ab[_0x27ca4e][_0x2758('0x67')])){_0x372f9b[_0x5cb64d[_0x43a9ab[_0x27ca4e][_0x2758('0x67')]]]=_0x43a9ab[_0x27ca4e][_0x2758('0x6b')];}}for(var _0x2d9282 in _0x5cb64d){if(!_0x372f9b[_0x2758('0x39')](_0x5cb64d[_0x2d9282])){_0x372f9b[_0x5cb64d[_0x2d9282]]=null;}}_0x317992[_0x2758('0x6c')](_0x372f9b);}return _0x317992;}})['then'](function(_0x1b3ddb){if(!_[_0x2758('0x6d')](_0x1b3ddb)){var _0x5d4611=toCsv(_0x1b3ddb);var _0x13a334=Date[_0x2758('0x6e')]();fs[_0x2758('0x6f')](util[_0x2758('0x69')]('/tmp/Jscripty_Project_%d_Summary_%s.csv',_0x5ab9ab[_0x2758('0x54')]['id'],_0x13a334),_0x5d4611);_0x25897a[_0x2758('0x70')](_0x2758('0x71'),'attachment;\x20filename='+util[_0x2758('0x69')](_0x2758('0x72'),_0x5ab9ab[_0x2758('0x54')]['id'],_0x13a334));_0x25897a['setHeader'](_0x2758('0x73'),_0x2758('0x74'));return _0x25897a[_0x2758('0x75')](util[_0x2758('0x69')](_0x2758('0x76'),_0x5ab9ab[_0x2758('0x54')]['id'],_0x13a334));}else{return _0x25897a[_0x2758('0x17')](0xcc);}})[_0x2758('0x46')](handleError(_0x25897a,null));};
\ No newline at end of file
index 956ee1e..c91f3a1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xab3f=['JscriptyProject','jscripty_projects','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./jscriptyProject.attributes','exports','define'];(function(_0x40318c,_0x2ac42f){var _0x5783b8=function(_0x2f95f0){while(--_0x2f95f0){_0x40318c['push'](_0x40318c['shift']());}};_0x5783b8(++_0x2ac42f);}(_0xab3f,0x72));var _0xfab3=function(_0x47e904,_0x5d809c){_0x47e904=_0x47e904-0x0;var _0x4df208=_0xab3f[_0x47e904];return _0x4df208;};'use strict';var _=require(_0xfab3('0x0'));var util=require('util');var logger=require(_0xfab3('0x1'))(_0xfab3('0x2'));var moment=require(_0xfab3('0x3'));var BPromise=require(_0xfab3('0x4'));var rp=require(_0xfab3('0x5'));var fs=require('fs');var path=require(_0xfab3('0x6'));var rimraf=require(_0xfab3('0x7'));var config=require(_0xfab3('0x8'));var attributes=require(_0xfab3('0x9'));module[_0xfab3('0xa')]=function(_0x2daeb4,_0x5ed108){return _0x2daeb4[_0xfab3('0xb')](_0xfab3('0xc'),attributes,{'tableName':_0xfab3('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x56a4=['./jscriptyProject.attributes','exports','jscripty_projects','lodash','util','api','moment','path','rimraf','../../config/environment'];(function(_0x25976c,_0x3c07c8){var _0x14f93a=function(_0x304eaa){while(--_0x304eaa){_0x25976c['push'](_0x25976c['shift']());}};_0x14f93a(++_0x3c07c8);}(_0x56a4,0x11b));var _0x456a=function(_0x441eab,_0x583ba5){_0x441eab=_0x441eab-0x0;var _0xe6ff41=_0x56a4[_0x441eab];return _0xe6ff41;};'use strict';var _=require(_0x456a('0x0'));var util=require(_0x456a('0x1'));var logger=require('../../config/logger')(_0x456a('0x2'));var moment=require(_0x456a('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x456a('0x4'));var rimraf=require(_0x456a('0x5'));var config=require(_0x456a('0x6'));var attributes=require(_0x456a('0x7'));module[_0x456a('0x8')]=function(_0x4b8eec,_0x3b0145){return _0x4b8eec['define']('JscriptyProject',attributes,{'tableName':_0x456a('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 9fa1355..7404892 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf4eb=['JscriptyProject,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','lodash','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info'];(function(_0xf3120,_0x80a54c){var _0x5aa549=function(_0x17ba5b){while(--_0x17ba5b){_0xf3120['push'](_0xf3120['shift']());}};_0x5aa549(++_0x80a54c);}(_0xf4eb,0xec));var _0xbf4e=function(_0x5a2022,_0x26b336){_0x5a2022=_0x5a2022-0x0;var _0x206727=_0xf4eb[_0x5a2022];return _0x206727;};'use strict';var _=require(_0xbf4e('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xbf4e('0x1'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xbf4e('0x2'))(_0xbf4e('0x3'));var config=require(_0xbf4e('0x4'));var jayson=require(_0xbf4e('0x5'));var client=jayson[_0xbf4e('0x6')][_0xbf4e('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x15b99f,_0x540736,_0x449d55){return new BPromise(function(_0x5013c2,_0x5e23d4){return client[_0xbf4e('0x8')](_0x15b99f,_0x449d55)[_0xbf4e('0x9')](function(_0xcc4097){logger[_0xbf4e('0xa')](_0xbf4e('0xb'),_0x540736,_0xbf4e('0xc'));logger[_0xbf4e('0xd')]('JscriptyProject,\x20%s,\x20%s,\x20%s',_0x540736,'request\x20sent',JSON[_0xbf4e('0xe')](_0xcc4097));if(_0xcc4097['error']){if(_0xcc4097[_0xbf4e('0xf')][_0xbf4e('0x10')]===0x1f4){logger['error'](_0xbf4e('0xb'),_0x540736,_0xcc4097['error']['message']);return _0x5e23d4(_0xcc4097[_0xbf4e('0xf')][_0xbf4e('0x11')]);}logger[_0xbf4e('0xf')](_0xbf4e('0xb'),_0x540736,_0xcc4097[_0xbf4e('0xf')][_0xbf4e('0x11')]);return _0x5013c2(_0xcc4097['error']['message']);}else{logger[_0xbf4e('0xa')](_0xbf4e('0xb'),_0x540736,_0xbf4e('0xc'));_0x5013c2(_0xcc4097['result'][_0xbf4e('0x11')]);}})[_0xbf4e('0x12')](function(_0x912fc0){logger[_0xbf4e('0xf')]('JscriptyProject,\x20%s,\x20%s',_0x540736,_0x912fc0);_0x5e23d4(_0x912fc0);});});}
\ 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','JscriptyProject,\x20%s,\x20%s','info','result','catch','moment','bluebird'];(function(_0x45bda0,_0x5a6ca9){var _0x367785=function(_0x41a4dc){while(--_0x41a4dc){_0x45bda0['push'](_0x45bda0['shift']());}};_0x367785(++_0x5a6ca9);}(_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']('JscriptyProject,\x20%s,\x20%s',_0x2c4e2e,_0x49c4('0xb'));logger[_0x49c4('0xc')]('JscriptyProject,\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')]('JscriptyProject,\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')]('JscriptyProject,\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 8a90d6c..93e3b3c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x22cc=['get','isAuthenticated','index','describe','show','put','update','delete','/:id','destroy','exports','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./jscriptyQuestionReport.controller'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x22cc,0x90));var _0xc22c=function(_0x5c5c52,_0x36d085){_0x5c5c52=_0x5c5c52-0x0;var _0x4229ff=_0x22cc[_0x5c5c52];return _0x4229ff;};'use strict';var multer=require('multer');var util=require(_0xc22c('0x0'));var path=require('path');var timeout=require(_0xc22c('0x1'));var express=require(_0xc22c('0x2'));var router=express[_0xc22c('0x3')]();var fs_extra=require(_0xc22c('0x4'));var auth=require(_0xc22c('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xc22c('0x6'));var controller=require(_0xc22c('0x7'));router[_0xc22c('0x8')]('/',auth[_0xc22c('0x9')](),controller[_0xc22c('0xa')]);router[_0xc22c('0x8')]('/describe',auth[_0xc22c('0x9')](),controller[_0xc22c('0xb')]);router[_0xc22c('0x8')]('/:id',auth[_0xc22c('0x9')](),controller[_0xc22c('0xc')]);router['post']('/',auth[_0xc22c('0x9')](),controller['create']);router[_0xc22c('0xd')]('/:id',auth[_0xc22c('0x9')](),controller[_0xc22c('0xe')]);router[_0xc22c('0xf')](_0xc22c('0x10'),auth['isAuthenticated'](),controller[_0xc22c('0x11')]);module[_0xc22c('0x12')]=router;
\ No newline at end of file
+var _0x5ce1=['/:id','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./jscriptyQuestionReport.controller','get','isAuthenticated','index','/describe','describe','show','create'];(function(_0x3a9661,_0x530b12){var _0x5bb119=function(_0x1278f){while(--_0x1278f){_0x3a9661['push'](_0x3a9661['shift']());}};_0x5bb119(++_0x530b12);}(_0x5ce1,0xf3));var _0x15ce=function(_0x146ede,_0x494728){_0x146ede=_0x146ede-0x0;var _0x1517dc=_0x5ce1[_0x146ede];return _0x1517dc;};'use strict';var multer=require(_0x15ce('0x0'));var util=require(_0x15ce('0x1'));var path=require(_0x15ce('0x2'));var timeout=require(_0x15ce('0x3'));var express=require(_0x15ce('0x4'));var router=express[_0x15ce('0x5')]();var fs_extra=require(_0x15ce('0x6'));var auth=require(_0x15ce('0x7'));var interaction=require(_0x15ce('0x8'));var config=require('../../config/environment');var controller=require(_0x15ce('0x9'));router[_0x15ce('0xa')]('/',auth[_0x15ce('0xb')](),controller[_0x15ce('0xc')]);router[_0x15ce('0xa')](_0x15ce('0xd'),auth[_0x15ce('0xb')](),controller[_0x15ce('0xe')]);router[_0x15ce('0xa')]('/:id',auth[_0x15ce('0xb')](),controller[_0x15ce('0xf')]);router['post']('/',auth[_0x15ce('0xb')](),controller[_0x15ce('0x10')]);router['put'](_0x15ce('0x11'),auth[_0x15ce('0xb')](),controller['update']);router['delete'](_0x15ce('0x11'),auth[_0x15ce('0xb')](),controller[_0x15ce('0x12')]);module[_0x15ce('0x13')]=router;
\ No newline at end of file
index f4f21c4..9ad1f32 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a54=['long','STRING','sequelize','exports','TEXT'];(function(_0x46698a,_0x8de1e4){var _0x356db0=function(_0x19e83c){while(--_0x19e83c){_0x46698a['push'](_0x46698a['shift']());}};_0x356db0(++_0x8de1e4);}(_0x7a54,0x106));var _0x47a5=function(_0x58febc,_0x22eec4){_0x58febc=_0x58febc-0x0;var _0x33ff24=_0x7a54[_0x58febc];return _0x33ff24;};'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(_0x5f1391,_0x19c132){var _0x50ebe3=function(_0x3d00a3){while(--_0x3d00a3){_0x5f1391['push'](_0x5f1391['shift']());}};_0x50ebe3(++_0x19c132);}(_0x7a54,0x106));var _0x47a5=function(_0x5aaa89,_0xbbbfb0){_0x5aaa89=_0x5aaa89-0x0;var _0x20d3a7=_0x7a54[_0x5aaa89];return _0x20d3a7;};'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 e7f0ef0..9fe49a6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd453=['count','set','Content-Range','update','then','destroy','end','error','stack','name','send','index','map','JscriptyQuestionReport','fieldName','type','key','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','sort','where','filters','pick','filter','VIRTUAL','merge','options','includeAll','include','findAll','rows','catch','show','params','rawAttributes','find','create','body','describe','zip-dir','request-promise','moment','mustache','path','sox','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','sendStatus','status','json','offset','undefined','limit'];(function(_0x38e622,_0x4ceded){var _0x5c8905=function(_0x59bf9e){while(--_0x59bf9e){_0x38e622['push'](_0x38e622['shift']());}};_0x5c8905(++_0x4ceded);}(_0xd453,0xc3));var _0x3d45=function(_0x153738,_0xe704c1){_0x153738=_0x153738-0x0;var _0x3028d9=_0xd453[_0x153738];return _0x3028d9;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x3d45('0x0'));var jsonpatch=require('fast-json-patch');var rp=require(_0x3d45('0x1'));var moment=require(_0x3d45('0x2'));var BPromise=require('bluebird');var Mustache=require(_0x3d45('0x3'));var util=require('util');var path=require(_0x3d45('0x4'));var sox=require(_0x3d45('0x5'));var csv=require(_0x3d45('0x6'));var ejs=require(_0x3d45('0x7'));var fs=require('fs');var fs_extra=require(_0x3d45('0x8'));var _=require(_0x3d45('0x9'));var squel=require(_0x3d45('0xa'));var crypto=require(_0x3d45('0xb'));var jsforce=require(_0x3d45('0xc'));var deskjs=require(_0x3d45('0xd'));var toCsv=require(_0x3d45('0x6'));var querystring=require('querystring');var Papa=require(_0x3d45('0xe'));var Redis=require(_0x3d45('0xf'));var authService=require(_0x3d45('0x10'));var qs=require(_0x3d45('0x11'));var as=require(_0x3d45('0x12'));var hardwareService=require(_0x3d45('0x13'));var logger=require(_0x3d45('0x14'))('api');var utils=require(_0x3d45('0x15'));var config=require(_0x3d45('0x16'));var licenseUtil=require(_0x3d45('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x202e9b,_0x194d8a){_0x194d8a=_0x194d8a||0xcc;return function(_0x187e84){if(_0x187e84){return _0x202e9b[_0x3d45('0x18')](_0x194d8a);}return _0x202e9b[_0x3d45('0x19')](_0x194d8a)['end']();};}function respondWithResult(_0x68d963,_0x10bb56){_0x10bb56=_0x10bb56||0xc8;return function(_0x5469c2){if(_0x5469c2){return _0x68d963['status'](_0x10bb56)[_0x3d45('0x1a')](_0x5469c2);}};}function respondWithFilteredResult(_0x258281,_0x244a82){return function(_0x4a0425){if(_0x4a0425){var _0x4e091d=typeof _0x244a82[_0x3d45('0x1b')]===_0x3d45('0x1c')&&typeof _0x244a82[_0x3d45('0x1d')]===_0x3d45('0x1c');var _0x2c0cf4=_0x4a0425[_0x3d45('0x1e')];var _0x41e1c8=_0x4e091d?0x0:_0x244a82[_0x3d45('0x1b')];var _0x992b05=_0x4e091d?_0x4a0425[_0x3d45('0x1e')]:_0x244a82[_0x3d45('0x1b')]+_0x244a82['limit'];var _0x3b76d2;if(_0x992b05>=_0x2c0cf4){_0x992b05=_0x2c0cf4;_0x3b76d2=0xc8;}else{_0x3b76d2=0xce;}_0x258281['status'](_0x3b76d2);return _0x258281[_0x3d45('0x1f')](_0x3d45('0x20'),_0x41e1c8+'-'+_0x992b05+'/'+_0x2c0cf4)[_0x3d45('0x1a')](_0x4a0425);}return null;};}function patchUpdates(_0x55ccc0){return function(_0x15902c){try{jsonpatch['apply'](_0x15902c,_0x55ccc0,!![]);}catch(_0x44ac16){return BPromise['reject'](_0x44ac16);}return _0x15902c['save']();};}function saveUpdates(_0x5467b9,_0x587e8d){return function(_0x2aeb99){if(_0x2aeb99){return _0x2aeb99[_0x3d45('0x21')](_0x5467b9)[_0x3d45('0x22')](function(_0x3acf30){return _0x3acf30;});}return null;};}function removeEntity(_0x4d19d8,_0x21cd2d){return function(_0x24b114){if(_0x24b114){return _0x24b114[_0x3d45('0x23')]()['then'](function(){_0x4d19d8[_0x3d45('0x19')](0xcc)[_0x3d45('0x24')]();});}};}function handleEntityNotFound(_0x4ebb89,_0x264860){return function(_0x147ee3){if(!_0x147ee3){_0x4ebb89[_0x3d45('0x18')](0x194);}return _0x147ee3;};}function handleError(_0x106edb,_0x313468){_0x313468=_0x313468||0x1f4;return function(_0x14f3ed){logger[_0x3d45('0x25')](_0x14f3ed[_0x3d45('0x26')]);if(_0x14f3ed[_0x3d45('0x27')]){delete _0x14f3ed['name'];}_0x106edb['status'](_0x313468)[_0x3d45('0x28')](_0x14f3ed);};}exports[_0x3d45('0x29')]=function(_0x261e37,_0x2ea7d1){var _0x3e230d={},_0x3915e7={},_0xdf77ac={'count':0x0,'rows':[]};var _0x5c706e=_[_0x3d45('0x2a')](db[_0x3d45('0x2b')]['rawAttributes'],function(_0x25d842){return{'name':_0x25d842[_0x3d45('0x2c')],'type':_0x25d842[_0x3d45('0x2d')][_0x3d45('0x2e')]};});_0x3915e7[_0x3d45('0x2f')]=_['map'](_0x5c706e,_0x3d45('0x27'));_0x3915e7[_0x3d45('0x30')]=_[_0x3d45('0x31')](_0x261e37['query']);_0x3915e7['filters']=_[_0x3d45('0x32')](_0x3915e7[_0x3d45('0x2f')],_0x3915e7[_0x3d45('0x30')]);_0x3e230d['attributes']=_[_0x3d45('0x32')](_0x3915e7[_0x3d45('0x2f')],qs[_0x3d45('0x33')](_0x261e37[_0x3d45('0x30')][_0x3d45('0x33')]));_0x3e230d[_0x3d45('0x34')]=_0x3e230d[_0x3d45('0x34')][_0x3d45('0x35')]?_0x3e230d[_0x3d45('0x34')]:_0x3915e7[_0x3d45('0x2f')];if(!_0x261e37[_0x3d45('0x30')][_0x3d45('0x36')]('nolimit')){_0x3e230d[_0x3d45('0x1d')]=qs[_0x3d45('0x1d')](_0x261e37[_0x3d45('0x30')][_0x3d45('0x1d')]);_0x3e230d[_0x3d45('0x1b')]=qs[_0x3d45('0x1b')](_0x261e37['query'][_0x3d45('0x1b')]);}_0x3e230d['order']=qs[_0x3d45('0x37')](_0x261e37['query'][_0x3d45('0x37')]);_0x3e230d[_0x3d45('0x38')]=qs[_0x3d45('0x39')](_[_0x3d45('0x3a')](_0x261e37[_0x3d45('0x30')],_0x3915e7[_0x3d45('0x39')]),_0x5c706e);if(_0x261e37[_0x3d45('0x30')][_0x3d45('0x3b')]){_0x3e230d[_0x3d45('0x38')]=_['merge'](_0x3e230d[_0x3d45('0x38')],{'$or':_[_0x3d45('0x2a')](_0x5c706e,function(_0x135b5a){if(_0x135b5a[_0x3d45('0x2d')]!==_0x3d45('0x3c')){var _0x25aaee={};_0x25aaee[_0x135b5a[_0x3d45('0x27')]]={'$like':'%'+_0x261e37[_0x3d45('0x30')][_0x3d45('0x3b')]+'%'};return _0x25aaee;}})});}_0x3e230d=_[_0x3d45('0x3d')]({},_0x3e230d,_0x261e37[_0x3d45('0x3e')]);var _0x161999={'where':_0x3e230d['where']};return db['JscriptyQuestionReport'][_0x3d45('0x1e')](_0x161999)[_0x3d45('0x22')](function(_0x1fe948){_0xdf77ac['count']=_0x1fe948;if(_0x261e37[_0x3d45('0x30')][_0x3d45('0x3f')]){_0x3e230d[_0x3d45('0x40')]=[{'all':!![]}];}return db[_0x3d45('0x2b')][_0x3d45('0x41')](_0x3e230d);})['then'](function(_0x1f8678){_0xdf77ac[_0x3d45('0x42')]=_0x1f8678;return _0xdf77ac;})[_0x3d45('0x22')](respondWithFilteredResult(_0x2ea7d1,_0x3e230d))[_0x3d45('0x43')](handleError(_0x2ea7d1,null));};exports[_0x3d45('0x44')]=function(_0x18178e,_0x172883){var _0x48795b={'raw':!![],'where':{'id':_0x18178e[_0x3d45('0x45')]['id']}},_0x31edbf={};_0x31edbf[_0x3d45('0x2f')]=_[_0x3d45('0x31')](db[_0x3d45('0x2b')][_0x3d45('0x46')]);_0x31edbf[_0x3d45('0x30')]=_[_0x3d45('0x31')](_0x18178e[_0x3d45('0x30')]);_0x31edbf[_0x3d45('0x39')]=_['intersection'](_0x31edbf[_0x3d45('0x2f')],_0x31edbf[_0x3d45('0x30')]);_0x48795b[_0x3d45('0x34')]=_[_0x3d45('0x32')](_0x31edbf[_0x3d45('0x2f')],qs['fields'](_0x18178e['query'][_0x3d45('0x33')]));_0x48795b['attributes']=_0x48795b[_0x3d45('0x34')][_0x3d45('0x35')]?_0x48795b[_0x3d45('0x34')]:_0x31edbf[_0x3d45('0x2f')];if(_0x18178e[_0x3d45('0x30')][_0x3d45('0x3f')]){_0x48795b[_0x3d45('0x40')]=[{'all':!![]}];}_0x48795b=_[_0x3d45('0x3d')]({},_0x48795b,_0x18178e['options']);return db['JscriptyQuestionReport'][_0x3d45('0x47')](_0x48795b)[_0x3d45('0x22')](handleEntityNotFound(_0x172883,null))[_0x3d45('0x22')](respondWithResult(_0x172883,null))['catch'](handleError(_0x172883,null));};exports[_0x3d45('0x48')]=function(_0x375a0a,_0x3af226){return db[_0x3d45('0x2b')][_0x3d45('0x48')](_0x375a0a[_0x3d45('0x49')],{})['then'](respondWithResult(_0x3af226,0xc9))[_0x3d45('0x43')](handleError(_0x3af226,null));};exports[_0x3d45('0x21')]=function(_0x29925e,_0x30902d){if(_0x29925e['body']['id']){delete _0x29925e[_0x3d45('0x49')]['id'];}return db[_0x3d45('0x2b')][_0x3d45('0x47')]({'where':{'id':_0x29925e[_0x3d45('0x45')]['id']}})['then'](handleEntityNotFound(_0x30902d,null))[_0x3d45('0x22')](saveUpdates(_0x29925e[_0x3d45('0x49')],null))[_0x3d45('0x22')](respondWithResult(_0x30902d,null))['catch'](handleError(_0x30902d,null));};exports[_0x3d45('0x23')]=function(_0x2211b6,_0x1c59ea){return db[_0x3d45('0x2b')][_0x3d45('0x47')]({'where':{'id':_0x2211b6[_0x3d45('0x45')]['id']}})[_0x3d45('0x22')](handleEntityNotFound(_0x1c59ea,null))[_0x3d45('0x22')](removeEntity(_0x1c59ea,null))[_0x3d45('0x43')](handleError(_0x1c59ea,null));};exports['describe']=function(_0x3eda75,_0x325fcd){return db[_0x3d45('0x2b')][_0x3d45('0x4a')]()[_0x3d45('0x22')](respondWithResult(_0x325fcd,null))[_0x3d45('0x43')](handleError(_0x325fcd,null));};
\ No newline at end of file
+var _0x0c3e=['to-csv','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','offset','limit','undefined','count','set','Content-Range','reject','update','destroy','error','stack','name','JscriptyQuestionReport','rawAttributes','type','map','query','filters','intersection','model','attributes','fields','order','sort','where','pick','filter','merge','options','then','includeAll','include','findAll','rows','catch','show','keys','length','find','create','body','params','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','sox'];(function(_0x4eafcf,_0x458eb5){var _0x431945=function(_0x2f2777){while(--_0x2f2777){_0x4eafcf['push'](_0x4eafcf['shift']());}};_0x431945(++_0x458eb5);}(_0x0c3e,0xc3));var _0xe0c3=function(_0x651f47,_0x104f63){_0x651f47=_0x651f47-0x0;var _0x4eed27=_0x0c3e[_0x651f47];return _0x4eed27;};'use strict';var emlformat=require(_0xe0c3('0x0'));var rimraf=require(_0xe0c3('0x1'));var zipdir=require(_0xe0c3('0x2'));var jsonpatch=require(_0xe0c3('0x3'));var rp=require(_0xe0c3('0x4'));var moment=require('moment');var BPromise=require(_0xe0c3('0x5'));var Mustache=require('mustache');var util=require(_0xe0c3('0x6'));var path=require(_0xe0c3('0x7'));var sox=require(_0xe0c3('0x8'));var csv=require(_0xe0c3('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xe0c3('0xa'));var _=require(_0xe0c3('0xb'));var squel=require(_0xe0c3('0xc'));var crypto=require(_0xe0c3('0xd'));var jsforce=require('jsforce');var deskjs=require(_0xe0c3('0xe'));var toCsv=require(_0xe0c3('0x9'));var querystring=require(_0xe0c3('0xf'));var Papa=require(_0xe0c3('0x10'));var Redis=require(_0xe0c3('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xe0c3('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xe0c3('0x13'))(_0xe0c3('0x14'));var utils=require('../../config/utils');var config=require(_0xe0c3('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0xe0c3('0x16'))['db'];function respondWithStatusCode(_0x19f2b7,_0x18e3c7){_0x18e3c7=_0x18e3c7||0xcc;return function(_0x4baaa1){if(_0x4baaa1){return _0x19f2b7[_0xe0c3('0x17')](_0x18e3c7);}return _0x19f2b7[_0xe0c3('0x18')](_0x18e3c7)['end']();};}function respondWithResult(_0xdac55b,_0x447dc6){_0x447dc6=_0x447dc6||0xc8;return function(_0x19cc91){if(_0x19cc91){return _0xdac55b[_0xe0c3('0x18')](_0x447dc6)['json'](_0x19cc91);}};}function respondWithFilteredResult(_0x184eb5,_0x417a29){return function(_0x530ef5){if(_0x530ef5){var _0x498d96=typeof _0x417a29[_0xe0c3('0x19')]==='undefined'&&typeof _0x417a29[_0xe0c3('0x1a')]===_0xe0c3('0x1b');var _0x28b5dd=_0x530ef5['count'];var _0x36352c=_0x498d96?0x0:_0x417a29['offset'];var _0x391610=_0x498d96?_0x530ef5[_0xe0c3('0x1c')]:_0x417a29[_0xe0c3('0x19')]+_0x417a29[_0xe0c3('0x1a')];var _0xba652f;if(_0x391610>=_0x28b5dd){_0x391610=_0x28b5dd;_0xba652f=0xc8;}else{_0xba652f=0xce;}_0x184eb5[_0xe0c3('0x18')](_0xba652f);return _0x184eb5[_0xe0c3('0x1d')](_0xe0c3('0x1e'),_0x36352c+'-'+_0x391610+'/'+_0x28b5dd)['json'](_0x530ef5);}return null;};}function patchUpdates(_0x1641bf){return function(_0x905840){try{jsonpatch['apply'](_0x905840,_0x1641bf,!![]);}catch(_0x6990e8){return BPromise[_0xe0c3('0x1f')](_0x6990e8);}return _0x905840['save']();};}function saveUpdates(_0x3bad96,_0x65e6b8){return function(_0x346488){if(_0x346488){return _0x346488[_0xe0c3('0x20')](_0x3bad96)['then'](function(_0x47e09b){return _0x47e09b;});}return null;};}function removeEntity(_0x540610,_0x8a3371){return function(_0x1a81f7){if(_0x1a81f7){return _0x1a81f7[_0xe0c3('0x21')]()['then'](function(){_0x540610['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0xda4189,_0x1552da){return function(_0x1dca6f){if(!_0x1dca6f){_0xda4189['sendStatus'](0x194);}return _0x1dca6f;};}function handleError(_0x539469,_0x482d06){_0x482d06=_0x482d06||0x1f4;return function(_0x1c3d02){logger[_0xe0c3('0x22')](_0x1c3d02[_0xe0c3('0x23')]);if(_0x1c3d02['name']){delete _0x1c3d02[_0xe0c3('0x24')];}_0x539469['status'](_0x482d06)['send'](_0x1c3d02);};}exports['index']=function(_0x38bb4f,_0x54fcae){var _0x58b6eb={},_0x1e843b={},_0x2750cc={'count':0x0,'rows':[]};var _0x30ebf6=_['map'](db[_0xe0c3('0x25')][_0xe0c3('0x26')],function(_0xf2cb06){return{'name':_0xf2cb06['fieldName'],'type':_0xf2cb06[_0xe0c3('0x27')]['key']};});_0x1e843b['model']=_[_0xe0c3('0x28')](_0x30ebf6,'name');_0x1e843b[_0xe0c3('0x29')]=_['keys'](_0x38bb4f[_0xe0c3('0x29')]);_0x1e843b[_0xe0c3('0x2a')]=_[_0xe0c3('0x2b')](_0x1e843b[_0xe0c3('0x2c')],_0x1e843b['query']);_0x58b6eb[_0xe0c3('0x2d')]=_[_0xe0c3('0x2b')](_0x1e843b['model'],qs[_0xe0c3('0x2e')](_0x38bb4f[_0xe0c3('0x29')][_0xe0c3('0x2e')]));_0x58b6eb['attributes']=_0x58b6eb[_0xe0c3('0x2d')]['length']?_0x58b6eb[_0xe0c3('0x2d')]:_0x1e843b['model'];if(!_0x38bb4f[_0xe0c3('0x29')]['hasOwnProperty']('nolimit')){_0x58b6eb[_0xe0c3('0x1a')]=qs[_0xe0c3('0x1a')](_0x38bb4f[_0xe0c3('0x29')][_0xe0c3('0x1a')]);_0x58b6eb[_0xe0c3('0x19')]=qs[_0xe0c3('0x19')](_0x38bb4f['query'][_0xe0c3('0x19')]);}_0x58b6eb[_0xe0c3('0x2f')]=qs[_0xe0c3('0x30')](_0x38bb4f[_0xe0c3('0x29')]['sort']);_0x58b6eb[_0xe0c3('0x31')]=qs['filters'](_[_0xe0c3('0x32')](_0x38bb4f['query'],_0x1e843b[_0xe0c3('0x2a')]),_0x30ebf6);if(_0x38bb4f['query'][_0xe0c3('0x33')]){_0x58b6eb[_0xe0c3('0x31')]=_['merge'](_0x58b6eb[_0xe0c3('0x31')],{'$or':_[_0xe0c3('0x28')](_0x30ebf6,function(_0x7ac214){if(_0x7ac214[_0xe0c3('0x27')]!=='VIRTUAL'){var _0x2a9260={};_0x2a9260[_0x7ac214[_0xe0c3('0x24')]]={'$like':'%'+_0x38bb4f[_0xe0c3('0x29')][_0xe0c3('0x33')]+'%'};return _0x2a9260;}})});}_0x58b6eb=_[_0xe0c3('0x34')]({},_0x58b6eb,_0x38bb4f[_0xe0c3('0x35')]);var _0x4e93d7={'where':_0x58b6eb[_0xe0c3('0x31')]};return db[_0xe0c3('0x25')][_0xe0c3('0x1c')](_0x4e93d7)[_0xe0c3('0x36')](function(_0x4361e2){_0x2750cc[_0xe0c3('0x1c')]=_0x4361e2;if(_0x38bb4f['query'][_0xe0c3('0x37')]){_0x58b6eb[_0xe0c3('0x38')]=[{'all':!![]}];}return db[_0xe0c3('0x25')][_0xe0c3('0x39')](_0x58b6eb);})[_0xe0c3('0x36')](function(_0x29bc56){_0x2750cc[_0xe0c3('0x3a')]=_0x29bc56;return _0x2750cc;})[_0xe0c3('0x36')](respondWithFilteredResult(_0x54fcae,_0x58b6eb))[_0xe0c3('0x3b')](handleError(_0x54fcae,null));};exports[_0xe0c3('0x3c')]=function(_0x281b2a,_0x27a57f){var _0x24d203={'raw':!![],'where':{'id':_0x281b2a['params']['id']}},_0x61ea2={};_0x61ea2[_0xe0c3('0x2c')]=_[_0xe0c3('0x3d')](db[_0xe0c3('0x25')][_0xe0c3('0x26')]);_0x61ea2['query']=_[_0xe0c3('0x3d')](_0x281b2a['query']);_0x61ea2['filters']=_[_0xe0c3('0x2b')](_0x61ea2[_0xe0c3('0x2c')],_0x61ea2[_0xe0c3('0x29')]);_0x24d203[_0xe0c3('0x2d')]=_[_0xe0c3('0x2b')](_0x61ea2[_0xe0c3('0x2c')],qs[_0xe0c3('0x2e')](_0x281b2a[_0xe0c3('0x29')]['fields']));_0x24d203[_0xe0c3('0x2d')]=_0x24d203[_0xe0c3('0x2d')][_0xe0c3('0x3e')]?_0x24d203[_0xe0c3('0x2d')]:_0x61ea2[_0xe0c3('0x2c')];if(_0x281b2a['query'][_0xe0c3('0x37')]){_0x24d203[_0xe0c3('0x38')]=[{'all':!![]}];}_0x24d203=_[_0xe0c3('0x34')]({},_0x24d203,_0x281b2a[_0xe0c3('0x35')]);return db[_0xe0c3('0x25')][_0xe0c3('0x3f')](_0x24d203)['then'](handleEntityNotFound(_0x27a57f,null))['then'](respondWithResult(_0x27a57f,null))[_0xe0c3('0x3b')](handleError(_0x27a57f,null));};exports[_0xe0c3('0x40')]=function(_0xd38bb9,_0x200e18){return db['JscriptyQuestionReport'][_0xe0c3('0x40')](_0xd38bb9[_0xe0c3('0x41')],{})[_0xe0c3('0x36')](respondWithResult(_0x200e18,0xc9))['catch'](handleError(_0x200e18,null));};exports[_0xe0c3('0x20')]=function(_0x3db853,_0x22903d){if(_0x3db853['body']['id']){delete _0x3db853[_0xe0c3('0x41')]['id'];}return db[_0xe0c3('0x25')]['find']({'where':{'id':_0x3db853[_0xe0c3('0x42')]['id']}})[_0xe0c3('0x36')](handleEntityNotFound(_0x22903d,null))[_0xe0c3('0x36')](saveUpdates(_0x3db853[_0xe0c3('0x41')],null))[_0xe0c3('0x36')](respondWithResult(_0x22903d,null))[_0xe0c3('0x3b')](handleError(_0x22903d,null));};exports[_0xe0c3('0x21')]=function(_0x230c3f,_0x3be222){return db[_0xe0c3('0x25')][_0xe0c3('0x3f')]({'where':{'id':_0x230c3f[_0xe0c3('0x42')]['id']}})[_0xe0c3('0x36')](handleEntityNotFound(_0x3be222,null))[_0xe0c3('0x36')](removeEntity(_0x3be222,null))[_0xe0c3('0x3b')](handleError(_0x3be222,null));};exports[_0xe0c3('0x43')]=function(_0x155643,_0x1d7e5f){return db[_0xe0c3('0x25')][_0xe0c3('0x43')]()['then'](respondWithResult(_0x1d7e5f,null))[_0xe0c3('0x3b')](handleError(_0x1d7e5f,null));};
\ No newline at end of file
index 4afbc80..7cf02f6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9c8c=['./jscriptyQuestionReport.attributes','exports','define','lodash','util','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x245e0e,_0xcab6db){var _0xafcff4=function(_0x3ec00c){while(--_0x3ec00c){_0x245e0e['push'](_0x245e0e['shift']());}};_0xafcff4(++_0xcab6db);}(_0x9c8c,0xd4));var _0xc9c8=function(_0x40c7fd,_0x451a08){_0x40c7fd=_0x40c7fd-0x0;var _0x9ecd50=_0x9c8c[_0x40c7fd];return _0x9ecd50;};'use strict';var _=require(_0xc9c8('0x0'));var util=require(_0xc9c8('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xc9c8('0x2'));var BPromise=require(_0xc9c8('0x3'));var rp=require(_0xc9c8('0x4'));var fs=require('fs');var path=require(_0xc9c8('0x5'));var rimraf=require(_0xc9c8('0x6'));var config=require(_0xc9c8('0x7'));var attributes=require(_0xc9c8('0x8'));module[_0xc9c8('0x9')]=function(_0x2087d9,_0x3ff2b6){return _0x2087d9[_0xc9c8('0xa')]('JscriptyQuestionReport',attributes,{'tableName':'report_jscripty_questions','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xa18d=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./jscriptyQuestionReport.attributes','JscriptyQuestionReport','report_jscripty_questions'];(function(_0x2517e7,_0x3da808){var _0x2d0b25=function(_0x2a5a4f){while(--_0x2a5a4f){_0x2517e7['push'](_0x2517e7['shift']());}};_0x2d0b25(++_0x3da808);}(_0xa18d,0x1ad));var _0xda18=function(_0x2d7fa8,_0x148b07){_0x2d7fa8=_0x2d7fa8-0x0;var _0x5d175d=_0xa18d[_0x2d7fa8];return _0x5d175d;};'use strict';var _=require(_0xda18('0x0'));var util=require(_0xda18('0x1'));var logger=require(_0xda18('0x2'))(_0xda18('0x3'));var moment=require(_0xda18('0x4'));var BPromise=require(_0xda18('0x5'));var rp=require(_0xda18('0x6'));var fs=require('fs');var path=require(_0xda18('0x7'));var rimraf=require(_0xda18('0x8'));var config=require(_0xda18('0x9'));var attributes=require(_0xda18('0xa'));module['exports']=function(_0x14b983,_0x18cad9){return _0x14b983['define'](_0xda18('0xb'),attributes,{'tableName':_0xda18('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 941d2bc..c0aab73 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4ef6=['request','info','JscriptyQuestionReport,\x20%s,\x20%s','request\x20sent','debug','JscriptyQuestionReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','rpc','jayson/promise','client'];(function(_0x497d44,_0xfd24ec){var _0x19f8a5=function(_0xb13bd2){while(--_0xb13bd2){_0x497d44['push'](_0x497d44['shift']());}};_0x19f8a5(++_0xfd24ec);}(_0x4ef6,0x1ef));var _0x64ef=function(_0x4a8418,_0x39078a){_0x4a8418=_0x4a8418-0x0;var _0x390174=_0x4ef6[_0x4a8418];return _0x390174;};'use strict';var _=require(_0x64ef('0x0'));var util=require(_0x64ef('0x1'));var moment=require(_0x64ef('0x2'));var BPromise=require(_0x64ef('0x3'));var rs=require(_0x64ef('0x4'));var fs=require('fs');var Redis=require(_0x64ef('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x64ef('0x6'));var config=require('../../config/environment');var jayson=require(_0x64ef('0x7'));var client=jayson[_0x64ef('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x211856,_0x5183b2,_0x3181d5){return new BPromise(function(_0x2c92e4,_0x263104){return client[_0x64ef('0x9')](_0x211856,_0x3181d5)['then'](function(_0x15661e){logger[_0x64ef('0xa')](_0x64ef('0xb'),_0x5183b2,_0x64ef('0xc'));logger[_0x64ef('0xd')](_0x64ef('0xe'),_0x5183b2,_0x64ef('0xc'),JSON[_0x64ef('0xf')](_0x15661e));if(_0x15661e[_0x64ef('0x10')]){if(_0x15661e[_0x64ef('0x10')][_0x64ef('0x11')]===0x1f4){logger['error'](_0x64ef('0xb'),_0x5183b2,_0x15661e[_0x64ef('0x10')][_0x64ef('0x12')]);return _0x263104(_0x15661e['error'][_0x64ef('0x12')]);}logger[_0x64ef('0x10')](_0x64ef('0xb'),_0x5183b2,_0x15661e[_0x64ef('0x10')][_0x64ef('0x12')]);return _0x2c92e4(_0x15661e['error'][_0x64ef('0x12')]);}else{logger[_0x64ef('0xa')]('JscriptyQuestionReport,\x20%s,\x20%s',_0x5183b2,_0x64ef('0xc'));_0x2c92e4(_0x15661e[_0x64ef('0x13')]['message']);}})[_0x64ef('0x14')](function(_0x3e3bcd){logger['error'](_0x64ef('0xb'),_0x5183b2,_0x3e3bcd);_0x263104(_0x3e3bcd);});});}
\ No newline at end of file
+var _0xa8b7=['util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','then','info','request\x20sent','debug','JscriptyQuestionReport,\x20%s,\x20%s,\x20%s','stringify','error','code','JscriptyQuestionReport,\x20%s,\x20%s','message','result','catch','lodash'];(function(_0x274638,_0x578968){var _0x5755df=function(_0x3227d5){while(--_0x3227d5){_0x274638['push'](_0x274638['shift']());}};_0x5755df(++_0x578968);}(_0xa8b7,0xa0));var _0x7a8b=function(_0x3cb07d,_0x11a783){_0x3cb07d=_0x3cb07d-0x0;var _0x50b2b4=_0xa8b7[_0x3cb07d];return _0x50b2b4;};'use strict';var _=require(_0x7a8b('0x0'));var util=require(_0x7a8b('0x1'));var moment=require(_0x7a8b('0x2'));var BPromise=require(_0x7a8b('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7a8b('0x4'));var db=require(_0x7a8b('0x5'))['db'];var utils=require(_0x7a8b('0x6'));var logger=require('../../config/logger')(_0x7a8b('0x7'));var config=require(_0x7a8b('0x8'));var jayson=require(_0x7a8b('0x9'));var client=jayson[_0x7a8b('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x40a03f,_0x4e9e15,_0x2022f3){return new BPromise(function(_0x956751,_0x33ab98){return client['request'](_0x40a03f,_0x2022f3)[_0x7a8b('0xb')](function(_0x384b49){logger[_0x7a8b('0xc')]('JscriptyQuestionReport,\x20%s,\x20%s',_0x4e9e15,_0x7a8b('0xd'));logger[_0x7a8b('0xe')](_0x7a8b('0xf'),_0x4e9e15,'request\x20sent',JSON[_0x7a8b('0x10')](_0x384b49));if(_0x384b49[_0x7a8b('0x11')]){if(_0x384b49[_0x7a8b('0x11')][_0x7a8b('0x12')]===0x1f4){logger['error'](_0x7a8b('0x13'),_0x4e9e15,_0x384b49[_0x7a8b('0x11')][_0x7a8b('0x14')]);return _0x33ab98(_0x384b49['error'][_0x7a8b('0x14')]);}logger['error'](_0x7a8b('0x13'),_0x4e9e15,_0x384b49[_0x7a8b('0x11')][_0x7a8b('0x14')]);return _0x956751(_0x384b49[_0x7a8b('0x11')][_0x7a8b('0x14')]);}else{logger[_0x7a8b('0xc')]('JscriptyQuestionReport,\x20%s,\x20%s',_0x4e9e15,_0x7a8b('0xd'));_0x956751(_0x384b49[_0x7a8b('0x15')][_0x7a8b('0x14')]);}})[_0x7a8b('0x16')](function(_0x5be1e0){logger[_0x7a8b('0x11')](_0x7a8b('0x13'),_0x4e9e15,_0x5be1e0);_0x33ab98(_0x5be1e0);});});}
\ No newline at end of file
index b2994ae..4ccd427 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd75d=['/:id','update','delete','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./jscriptySessionReport.controller','isAuthenticated','index','describe','get','show','getQuestions','post','create','put'];(function(_0x4ff09b,_0x53f67d){var _0x3f5c2e=function(_0x124592){while(--_0x124592){_0x4ff09b['push'](_0x4ff09b['shift']());}};_0x3f5c2e(++_0x53f67d);}(_0xd75d,0x1d1));var _0xdd75=function(_0x522dbf,_0x58071b){_0x522dbf=_0x522dbf-0x0;var _0x21d222=_0xd75d[_0x522dbf];return _0x21d222;};'use strict';var multer=require(_0xdd75('0x0'));var util=require(_0xdd75('0x1'));var path=require(_0xdd75('0x2'));var timeout=require(_0xdd75('0x3'));var express=require(_0xdd75('0x4'));var router=express[_0xdd75('0x5')]();var fs_extra=require(_0xdd75('0x6'));var auth=require(_0xdd75('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0xdd75('0x8'));var controller=require(_0xdd75('0x9'));router['get']('/',auth[_0xdd75('0xa')](),controller[_0xdd75('0xb')]);router['get']('/describe',auth[_0xdd75('0xa')](),controller[_0xdd75('0xc')]);router[_0xdd75('0xd')]('/:id',auth[_0xdd75('0xa')](),controller[_0xdd75('0xe')]);router[_0xdd75('0xd')]('/:id/questions',auth[_0xdd75('0xa')](),controller[_0xdd75('0xf')]);router[_0xdd75('0x10')]('/',auth[_0xdd75('0xa')](),controller[_0xdd75('0x11')]);router[_0xdd75('0x12')](_0xdd75('0x13'),auth[_0xdd75('0xa')](),controller[_0xdd75('0x14')]);router[_0xdd75('0x15')](_0xdd75('0x13'),auth[_0xdd75('0xa')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x0863=['exports','multer','util','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./jscriptySessionReport.controller','get','index','/describe','isAuthenticated','describe','/:id','getQuestions','post','create','put','delete'];(function(_0x4bc941,_0x30e0aa){var _0x72acc7=function(_0x278b0f){while(--_0x278b0f){_0x4bc941['push'](_0x4bc941['shift']());}};_0x72acc7(++_0x30e0aa);}(_0x0863,0x141));var _0x3086=function(_0x39a4e9,_0x23f05c){_0x39a4e9=_0x39a4e9-0x0;var _0x2823f0=_0x0863[_0x39a4e9];return _0x2823f0;};'use strict';var multer=require(_0x3086('0x0'));var util=require(_0x3086('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x3086('0x2'));var router=express[_0x3086('0x3')]();var fs_extra=require(_0x3086('0x4'));var auth=require(_0x3086('0x5'));var interaction=require(_0x3086('0x6'));var config=require('../../config/environment');var controller=require(_0x3086('0x7'));router[_0x3086('0x8')]('/',auth['isAuthenticated'](),controller[_0x3086('0x9')]);router[_0x3086('0x8')](_0x3086('0xa'),auth[_0x3086('0xb')](),controller[_0x3086('0xc')]);router[_0x3086('0x8')](_0x3086('0xd'),auth[_0x3086('0xb')](),controller['show']);router[_0x3086('0x8')]('/:id/questions',auth[_0x3086('0xb')](),controller[_0x3086('0xe')]);router[_0x3086('0xf')]('/',auth[_0x3086('0xb')](),controller[_0x3086('0x10')]);router[_0x3086('0x11')](_0x3086('0xd'),auth[_0x3086('0xb')](),controller['update']);router[_0x3086('0x12')](_0x3086('0xd'),auth[_0x3086('0xb')](),controller['destroy']);module[_0x3086('0x13')]=router;
\ No newline at end of file
index 835dbb5..ad51113 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xba87=['endtime','format','YYYY-MM-DD\x20HH:mm:ss','STRING','BOOLEAN','moment','exports','DATE','setDataValue','starttime'];(function(_0x2ce699,_0x43d507){var _0x4adac9=function(_0x1630e4){while(--_0x1630e4){_0x2ce699['push'](_0x2ce699['shift']());}};_0x4adac9(++_0x43d507);}(_0xba87,0xe1));var _0x7ba8=function(_0xa92013,_0x3b2577){_0xa92013=_0xa92013-0x0;var _0x49fdfa=_0xba87[_0xa92013];return _0x49fdfa;};'use strict';var moment=require(_0x7ba8('0x0'));var Sequelize=require('sequelize');module[_0x7ba8('0x1')]={'starttime':{'type':Sequelize[_0x7ba8('0x2')],'set':function(_0x119727){this[_0x7ba8('0x3')](_0x7ba8('0x4'),_0x119727);this['setDataValue'](_0x7ba8('0x5'),moment()[_0x7ba8('0x6')](_0x7ba8('0x7')));}},'endtime':{'type':Sequelize[_0x7ba8('0x2')]},'membername':{'type':Sequelize[_0x7ba8('0x8')]},'projectname':{'type':Sequelize[_0x7ba8('0x8')]},'queue':{'type':Sequelize[_0x7ba8('0x8')]},'uniqueid':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x7ba8('0x8')]},'calleridnum':{'type':Sequelize[_0x7ba8('0x8')]},'completed':{'type':Sequelize[_0x7ba8('0x9')],'defaultValue':![]}};
\ No newline at end of file
+var _0x1ae0=['format','YYYY-MM-DD\x20HH:mm:ss','STRING','BOOLEAN','sequelize','exports','DATE','setDataValue','endtime'];(function(_0x3a4938,_0x2d38bc){var _0x2ce7ca=function(_0x269969){while(--_0x269969){_0x3a4938['push'](_0x3a4938['shift']());}};_0x2ce7ca(++_0x2d38bc);}(_0x1ae0,0xb8));var _0x01ae=function(_0x172d2c,_0x9bb44a){_0x172d2c=_0x172d2c-0x0;var _0x41c113=_0x1ae0[_0x172d2c];return _0x41c113;};'use strict';var moment=require('moment');var Sequelize=require(_0x01ae('0x0'));module[_0x01ae('0x1')]={'starttime':{'type':Sequelize[_0x01ae('0x2')],'set':function(_0x26e264){this[_0x01ae('0x3')]('starttime',_0x26e264);this[_0x01ae('0x3')](_0x01ae('0x4'),moment()[_0x01ae('0x5')](_0x01ae('0x6')));}},'endtime':{'type':Sequelize[_0x01ae('0x2')]},'membername':{'type':Sequelize[_0x01ae('0x7')]},'projectname':{'type':Sequelize[_0x01ae('0x7')]},'queue':{'type':Sequelize[_0x01ae('0x7')]},'uniqueid':{'type':Sequelize[_0x01ae('0x7')]},'calleridname':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize[_0x01ae('0x7')]},'completed':{'type':Sequelize[_0x01ae('0x8')],'defaultValue':![]}};
\ No newline at end of file
index e4fbc79..d48d917 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9747=['hasOwnProperty','nolimit','order','sort','where','filters','filter','merge','options','includeAll','include','rows','catch','fields','find','create','body','params','describe','findOne','JscriptyQuestionReport','pick','SessionId','findAll','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','sox','to-csv','squel','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','limit','undefined','count','offset','set','Content-Range','apply','reject','save','then','destroy','error','stack','name','send','index','map','JscriptySessionReport','rawAttributes','fieldName','type','key','model','keys','intersection','attributes','query','length'];(function(_0x539724,_0x55a59b){var _0xeaab51=function(_0x3b1a14){while(--_0x3b1a14){_0x539724['push'](_0x539724['shift']());}};_0xeaab51(++_0x55a59b);}(_0x9747,0xff));var _0x7974=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x9747[_0x14add3];return _0x4a174f;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x7974('0x0'));var zipdir=require(_0x7974('0x1'));var jsonpatch=require(_0x7974('0x2'));var rp=require(_0x7974('0x3'));var moment=require('moment');var BPromise=require(_0x7974('0x4'));var Mustache=require('mustache');var util=require(_0x7974('0x5'));var path=require(_0x7974('0x6'));var sox=require(_0x7974('0x7'));var csv=require(_0x7974('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x7974('0x9'));var crypto=require('crypto');var jsforce=require(_0x7974('0xa'));var deskjs=require(_0x7974('0xb'));var toCsv=require('to-csv');var querystring=require(_0x7974('0xc'));var Papa=require('papaparse');var Redis=require(_0x7974('0xd'));var authService=require('../../components/auth/service');var qs=require(_0x7974('0xe'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x7974('0xf'))(_0x7974('0x10'));var utils=require(_0x7974('0x11'));var config=require(_0x7974('0x12'));var licenseUtil=require(_0x7974('0x13'));var db=require(_0x7974('0x14'))['db'];function respondWithStatusCode(_0x4da572,_0x5e7991){_0x5e7991=_0x5e7991||0xcc;return function(_0x38d91e){if(_0x38d91e){return _0x4da572[_0x7974('0x15')](_0x5e7991);}return _0x4da572[_0x7974('0x16')](_0x5e7991)[_0x7974('0x17')]();};}function respondWithResult(_0x48bd95,_0x4251a4){_0x4251a4=_0x4251a4||0xc8;return function(_0x56c440){if(_0x56c440){return _0x48bd95[_0x7974('0x16')](_0x4251a4)[_0x7974('0x18')](_0x56c440);}};}function respondWithFilteredResult(_0x22c8cd,_0x81d0de){return function(_0x167261){if(_0x167261){var _0x40c42b=typeof _0x81d0de['offset']==='undefined'&&typeof _0x81d0de[_0x7974('0x19')]===_0x7974('0x1a');var _0xf68ebf=_0x167261[_0x7974('0x1b')];var _0x42119a=_0x40c42b?0x0:_0x81d0de[_0x7974('0x1c')];var _0x57504b=_0x40c42b?_0x167261['count']:_0x81d0de[_0x7974('0x1c')]+_0x81d0de['limit'];var _0x5a6cc4;if(_0x57504b>=_0xf68ebf){_0x57504b=_0xf68ebf;_0x5a6cc4=0xc8;}else{_0x5a6cc4=0xce;}_0x22c8cd['status'](_0x5a6cc4);return _0x22c8cd[_0x7974('0x1d')](_0x7974('0x1e'),_0x42119a+'-'+_0x57504b+'/'+_0xf68ebf)[_0x7974('0x18')](_0x167261);}return null;};}function patchUpdates(_0x2e515c){return function(_0x161416){try{jsonpatch[_0x7974('0x1f')](_0x161416,_0x2e515c,!![]);}catch(_0x58dbcf){return BPromise[_0x7974('0x20')](_0x58dbcf);}return _0x161416[_0x7974('0x21')]();};}function saveUpdates(_0x595464,_0x727460){return function(_0x33c6a4){if(_0x33c6a4){return _0x33c6a4['update'](_0x595464)[_0x7974('0x22')](function(_0x5e42e7){return _0x5e42e7;});}return null;};}function removeEntity(_0x2fd799,_0x5e505c){return function(_0x1af9ee){if(_0x1af9ee){return _0x1af9ee[_0x7974('0x23')]()[_0x7974('0x22')](function(){_0x2fd799[_0x7974('0x16')](0xcc)[_0x7974('0x17')]();});}};}function handleEntityNotFound(_0x54aaba,_0xf06864){return function(_0x4ad6af){if(!_0x4ad6af){_0x54aaba[_0x7974('0x15')](0x194);}return _0x4ad6af;};}function handleError(_0x4b3fc5,_0x33df2f){_0x33df2f=_0x33df2f||0x1f4;return function(_0x482aaa){logger[_0x7974('0x24')](_0x482aaa[_0x7974('0x25')]);if(_0x482aaa[_0x7974('0x26')]){delete _0x482aaa['name'];}_0x4b3fc5[_0x7974('0x16')](_0x33df2f)[_0x7974('0x27')](_0x482aaa);};}exports[_0x7974('0x28')]=function(_0x41c946,_0x26e490){var _0x141fac={},_0x2a715a={},_0x1542b0={'count':0x0,'rows':[]};var _0xd1045f=_[_0x7974('0x29')](db[_0x7974('0x2a')][_0x7974('0x2b')],function(_0x2e330d){return{'name':_0x2e330d[_0x7974('0x2c')],'type':_0x2e330d[_0x7974('0x2d')][_0x7974('0x2e')]};});_0x2a715a[_0x7974('0x2f')]=_['map'](_0xd1045f,_0x7974('0x26'));_0x2a715a['query']=_[_0x7974('0x30')](_0x41c946['query']);_0x2a715a['filters']=_[_0x7974('0x31')](_0x2a715a[_0x7974('0x2f')],_0x2a715a['query']);_0x141fac[_0x7974('0x32')]=_[_0x7974('0x31')](_0x2a715a[_0x7974('0x2f')],qs['fields'](_0x41c946[_0x7974('0x33')]['fields']));_0x141fac[_0x7974('0x32')]=_0x141fac[_0x7974('0x32')][_0x7974('0x34')]?_0x141fac['attributes']:_0x2a715a['model'];if(!_0x41c946[_0x7974('0x33')][_0x7974('0x35')](_0x7974('0x36'))){_0x141fac[_0x7974('0x19')]=qs[_0x7974('0x19')](_0x41c946[_0x7974('0x33')]['limit']);_0x141fac['offset']=qs[_0x7974('0x1c')](_0x41c946[_0x7974('0x33')][_0x7974('0x1c')]);}_0x141fac[_0x7974('0x37')]=qs[_0x7974('0x38')](_0x41c946[_0x7974('0x33')][_0x7974('0x38')]);_0x141fac[_0x7974('0x39')]=qs[_0x7974('0x3a')](_['pick'](_0x41c946[_0x7974('0x33')],_0x2a715a[_0x7974('0x3a')]),_0xd1045f);if(_0x41c946['query'][_0x7974('0x3b')]){_0x141fac[_0x7974('0x39')]=_[_0x7974('0x3c')](_0x141fac['where'],{'$or':_[_0x7974('0x29')](_0xd1045f,function(_0x4fa528){if(_0x4fa528['type']!=='VIRTUAL'){var _0x2b0454={};_0x2b0454[_0x4fa528[_0x7974('0x26')]]={'$like':'%'+_0x41c946[_0x7974('0x33')]['filter']+'%'};return _0x2b0454;}})});}_0x141fac=_['merge']({},_0x141fac,_0x41c946[_0x7974('0x3d')]);var _0x3f6dec={'where':_0x141fac[_0x7974('0x39')]};return db[_0x7974('0x2a')][_0x7974('0x1b')](_0x3f6dec)[_0x7974('0x22')](function(_0x31e53f){_0x1542b0['count']=_0x31e53f;if(_0x41c946[_0x7974('0x33')][_0x7974('0x3e')]){_0x141fac[_0x7974('0x3f')]=[{'all':!![]}];}return db['JscriptySessionReport']['findAll'](_0x141fac);})[_0x7974('0x22')](function(_0x1855bf){_0x1542b0[_0x7974('0x40')]=_0x1855bf;return _0x1542b0;})[_0x7974('0x22')](respondWithFilteredResult(_0x26e490,_0x141fac))[_0x7974('0x41')](handleError(_0x26e490,null));};exports['show']=function(_0x405ed6,_0x1099df){var _0x36d332={'raw':!![],'where':{'id':_0x405ed6['params']['id']}},_0xc3b77d={};_0xc3b77d[_0x7974('0x2f')]=_['keys'](db['JscriptySessionReport'][_0x7974('0x2b')]);_0xc3b77d['query']=_[_0x7974('0x30')](_0x405ed6[_0x7974('0x33')]);_0xc3b77d[_0x7974('0x3a')]=_[_0x7974('0x31')](_0xc3b77d['model'],_0xc3b77d[_0x7974('0x33')]);_0x36d332['attributes']=_[_0x7974('0x31')](_0xc3b77d['model'],qs[_0x7974('0x42')](_0x405ed6[_0x7974('0x33')]['fields']));_0x36d332[_0x7974('0x32')]=_0x36d332['attributes'][_0x7974('0x34')]?_0x36d332[_0x7974('0x32')]:_0xc3b77d[_0x7974('0x2f')];if(_0x405ed6[_0x7974('0x33')][_0x7974('0x3e')]){_0x36d332[_0x7974('0x3f')]=[{'all':!![]}];}_0x36d332=_[_0x7974('0x3c')]({},_0x36d332,_0x405ed6[_0x7974('0x3d')]);return db[_0x7974('0x2a')][_0x7974('0x43')](_0x36d332)[_0x7974('0x22')](handleEntityNotFound(_0x1099df,null))[_0x7974('0x22')](respondWithResult(_0x1099df,null))['catch'](handleError(_0x1099df,null));};exports[_0x7974('0x44')]=function(_0x28268f,_0x39eb1){return db[_0x7974('0x2a')]['create'](_0x28268f[_0x7974('0x45')],{})['then'](respondWithResult(_0x39eb1,0xc9))['catch'](handleError(_0x39eb1,null));};exports['update']=function(_0x2b738c,_0x30b244){if(_0x2b738c['body']['id']){delete _0x2b738c['body']['id'];}return db[_0x7974('0x2a')][_0x7974('0x43')]({'where':{'id':_0x2b738c['params']['id']}})[_0x7974('0x22')](handleEntityNotFound(_0x30b244,null))[_0x7974('0x22')](saveUpdates(_0x2b738c[_0x7974('0x45')],null))['then'](respondWithResult(_0x30b244,null))['catch'](handleError(_0x30b244,null));};exports[_0x7974('0x23')]=function(_0x2d78fd,_0x3f1eaa){return db[_0x7974('0x2a')][_0x7974('0x43')]({'where':{'id':_0x2d78fd[_0x7974('0x46')]['id']}})['then'](handleEntityNotFound(_0x3f1eaa,null))[_0x7974('0x22')](removeEntity(_0x3f1eaa,null))[_0x7974('0x41')](handleError(_0x3f1eaa,null));};exports[_0x7974('0x47')]=function(_0x5be1e2,_0x4cf24c){return db[_0x7974('0x2a')][_0x7974('0x47')]()[_0x7974('0x22')](respondWithResult(_0x4cf24c,null))[_0x7974('0x41')](handleError(_0x4cf24c,null));};exports['getQuestions']=function(_0x4eda4b,_0x1e1964,_0x1c774f){var _0x2695ab={'raw':!![],'where':{}};var _0x4f9437={};var _0x5cbfc6={'count':0x0,'rows':[]};return db[_0x7974('0x2a')][_0x7974('0x48')]({'where':{'id':_0x4eda4b['params']['id']}})[_0x7974('0x22')](handleEntityNotFound(_0x1e1964,null))[_0x7974('0x22')](function(_0x12619c){if(_0x12619c){_0x4f9437['model']=_['keys'](db[_0x7974('0x49')]['rawAttributes']);_0x4f9437[_0x7974('0x33')]=_[_0x7974('0x30')](_0x4eda4b[_0x7974('0x33')]);_0x4f9437[_0x7974('0x3a')]=_[_0x7974('0x31')](_0x4f9437['model'],_0x4f9437[_0x7974('0x33')]);_0x2695ab['attributes']=_[_0x7974('0x31')](_0x4f9437['model'],qs[_0x7974('0x42')](_0x4eda4b[_0x7974('0x33')]['fields']));_0x2695ab[_0x7974('0x32')]=_0x2695ab[_0x7974('0x32')][_0x7974('0x34')]?_0x2695ab['attributes']:_0x4f9437['model'];if(!_0x4eda4b[_0x7974('0x33')][_0x7974('0x35')]('nolimit')){_0x2695ab['limit']=qs[_0x7974('0x19')](_0x4eda4b[_0x7974('0x33')][_0x7974('0x19')]);_0x2695ab[_0x7974('0x1c')]=qs[_0x7974('0x1c')](_0x4eda4b['query'][_0x7974('0x1c')]);}_0x2695ab[_0x7974('0x37')]=qs[_0x7974('0x38')](_0x4eda4b[_0x7974('0x33')][_0x7974('0x38')]);_0x2695ab[_0x7974('0x39')]=qs[_0x7974('0x3a')](_[_0x7974('0x4a')](_0x4eda4b[_0x7974('0x33')],_0x4f9437[_0x7974('0x3a')]));_0x2695ab['where'][_0x7974('0x4b')]=_0x12619c['id'];if(_0x4eda4b[_0x7974('0x33')]['filter']){_0x2695ab[_0x7974('0x39')]=_[_0x7974('0x3c')](_0x2695ab[_0x7974('0x39')],{'$or':_['map'](_0x2695ab[_0x7974('0x32')],function(_0x5c583e){var _0x153f61={};_0x153f61[_0x5c583e]={'$like':'%'+_0x4eda4b[_0x7974('0x33')][_0x7974('0x3b')]+'%'};return _0x153f61;})});}_0x2695ab=_[_0x7974('0x3c')]({},_0x2695ab,_0x4eda4b['options']);return db[_0x7974('0x49')][_0x7974('0x1b')]({'where':_0x2695ab['where']})[_0x7974('0x22')](function(_0x14c113){_0x5cbfc6['count']=_0x14c113;if(_0x4eda4b[_0x7974('0x33')][_0x7974('0x3e')]){_0x2695ab[_0x7974('0x3f')]=[{'all':!![]}];}return db[_0x7974('0x49')][_0x7974('0x4c')](_0x2695ab);})['then'](function(_0x2f1e36){_0x5cbfc6[_0x7974('0x40')]=_0x2f1e36;return _0x5cbfc6;});}})['then'](respondWithFilteredResult(_0x1e1964,_0x2695ab))[_0x7974('0x41')](handleError(_0x1e1964,null));};
\ No newline at end of file
+var _0xcf7b=['order','sort','filter','where','merge','VIRTUAL','includeAll','include','findAll','rows','catch','length','find','create','body','params','describe','getQuestions','findOne','nolimit','pick','SessionId','options','JscriptyQuestionReport','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','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/environment','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','update','destroy','then','stack','name','send','index','map','JscriptySessionReport','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty'];(function(_0x288478,_0x23303e){var _0x234c05=function(_0x4ff5a5){while(--_0x4ff5a5){_0x288478['push'](_0x288478['shift']());}};_0x234c05(++_0x23303e);}(_0xcf7b,0x160));var _0xbcf7=function(_0x45d55e,_0x2fede3){_0x45d55e=_0x45d55e-0x0;var _0x29812a=_0xcf7b[_0x45d55e];return _0x29812a;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xbcf7('0x0'));var zipdir=require(_0xbcf7('0x1'));var jsonpatch=require(_0xbcf7('0x2'));var rp=require(_0xbcf7('0x3'));var moment=require(_0xbcf7('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xbcf7('0x5'));var util=require(_0xbcf7('0x6'));var path=require(_0xbcf7('0x7'));var sox=require(_0xbcf7('0x8'));var csv=require(_0xbcf7('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xbcf7('0xa'));var squel=require('squel');var crypto=require(_0xbcf7('0xb'));var jsforce=require(_0xbcf7('0xc'));var deskjs=require(_0xbcf7('0xd'));var toCsv=require(_0xbcf7('0x9'));var querystring=require(_0xbcf7('0xe'));var Papa=require(_0xbcf7('0xf'));var Redis=require('ioredis');var authService=require(_0xbcf7('0x10'));var qs=require(_0xbcf7('0x11'));var as=require(_0xbcf7('0x12'));var hardwareService=require(_0xbcf7('0x13'));var logger=require(_0xbcf7('0x14'))(_0xbcf7('0x15'));var utils=require(_0xbcf7('0x16'));var config=require(_0xbcf7('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0xbcf7('0x18'))['db'];function respondWithStatusCode(_0x4ab929,_0x41f2d6){_0x41f2d6=_0x41f2d6||0xcc;return function(_0x43793e){if(_0x43793e){return _0x4ab929[_0xbcf7('0x19')](_0x41f2d6);}return _0x4ab929['status'](_0x41f2d6)[_0xbcf7('0x1a')]();};}function respondWithResult(_0x78b9d2,_0x2e36d5){_0x2e36d5=_0x2e36d5||0xc8;return function(_0xfb642c){if(_0xfb642c){return _0x78b9d2[_0xbcf7('0x1b')](_0x2e36d5)[_0xbcf7('0x1c')](_0xfb642c);}};}function respondWithFilteredResult(_0x44ad41,_0x40d28d){return function(_0x4ff2af){if(_0x4ff2af){var _0x5b034f=typeof _0x40d28d[_0xbcf7('0x1d')]===_0xbcf7('0x1e')&&typeof _0x40d28d[_0xbcf7('0x1f')]===_0xbcf7('0x1e');var _0x1462a5=_0x4ff2af[_0xbcf7('0x20')];var _0x5155e5=_0x5b034f?0x0:_0x40d28d[_0xbcf7('0x1d')];var _0x32f7e5=_0x5b034f?_0x4ff2af['count']:_0x40d28d[_0xbcf7('0x1d')]+_0x40d28d[_0xbcf7('0x1f')];var _0x39fda3;if(_0x32f7e5>=_0x1462a5){_0x32f7e5=_0x1462a5;_0x39fda3=0xc8;}else{_0x39fda3=0xce;}_0x44ad41[_0xbcf7('0x1b')](_0x39fda3);return _0x44ad41[_0xbcf7('0x21')](_0xbcf7('0x22'),_0x5155e5+'-'+_0x32f7e5+'/'+_0x1462a5)['json'](_0x4ff2af);}return null;};}function patchUpdates(_0x1ab51f){return function(_0x3ecedb){try{jsonpatch[_0xbcf7('0x23')](_0x3ecedb,_0x1ab51f,!![]);}catch(_0x184dc5){return BPromise[_0xbcf7('0x24')](_0x184dc5);}return _0x3ecedb['save']();};}function saveUpdates(_0x14a460,_0x24d32b){return function(_0x5267ff){if(_0x5267ff){return _0x5267ff[_0xbcf7('0x25')](_0x14a460)['then'](function(_0x1f7588){return _0x1f7588;});}return null;};}function removeEntity(_0x355506,_0xbf587){return function(_0xe4a370){if(_0xe4a370){return _0xe4a370[_0xbcf7('0x26')]()[_0xbcf7('0x27')](function(){_0x355506[_0xbcf7('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x58308d,_0x19e1ef){return function(_0x11d7c7){if(!_0x11d7c7){_0x58308d[_0xbcf7('0x19')](0x194);}return _0x11d7c7;};}function handleError(_0x2d3e94,_0x1aa6f2){_0x1aa6f2=_0x1aa6f2||0x1f4;return function(_0x7cc7a4){logger['error'](_0x7cc7a4[_0xbcf7('0x28')]);if(_0x7cc7a4[_0xbcf7('0x29')]){delete _0x7cc7a4[_0xbcf7('0x29')];}_0x2d3e94['status'](_0x1aa6f2)[_0xbcf7('0x2a')](_0x7cc7a4);};}exports[_0xbcf7('0x2b')]=function(_0x5b9ffd,_0x5ca61f){var _0xc221e4={},_0x288553={},_0x5133d4={'count':0x0,'rows':[]};var _0x3b1998=_[_0xbcf7('0x2c')](db[_0xbcf7('0x2d')][_0xbcf7('0x2e')],function(_0x54efc4){return{'name':_0x54efc4[_0xbcf7('0x2f')],'type':_0x54efc4[_0xbcf7('0x30')][_0xbcf7('0x31')]};});_0x288553[_0xbcf7('0x32')]=_[_0xbcf7('0x2c')](_0x3b1998,_0xbcf7('0x29'));_0x288553[_0xbcf7('0x33')]=_[_0xbcf7('0x34')](_0x5b9ffd[_0xbcf7('0x33')]);_0x288553[_0xbcf7('0x35')]=_[_0xbcf7('0x36')](_0x288553[_0xbcf7('0x32')],_0x288553[_0xbcf7('0x33')]);_0xc221e4[_0xbcf7('0x37')]=_[_0xbcf7('0x36')](_0x288553[_0xbcf7('0x32')],qs['fields'](_0x5b9ffd[_0xbcf7('0x33')][_0xbcf7('0x38')]));_0xc221e4['attributes']=_0xc221e4[_0xbcf7('0x37')]['length']?_0xc221e4['attributes']:_0x288553['model'];if(!_0x5b9ffd['query'][_0xbcf7('0x39')]('nolimit')){_0xc221e4[_0xbcf7('0x1f')]=qs[_0xbcf7('0x1f')](_0x5b9ffd['query'][_0xbcf7('0x1f')]);_0xc221e4[_0xbcf7('0x1d')]=qs[_0xbcf7('0x1d')](_0x5b9ffd[_0xbcf7('0x33')][_0xbcf7('0x1d')]);}_0xc221e4[_0xbcf7('0x3a')]=qs['sort'](_0x5b9ffd[_0xbcf7('0x33')][_0xbcf7('0x3b')]);_0xc221e4['where']=qs[_0xbcf7('0x35')](_['pick'](_0x5b9ffd['query'],_0x288553[_0xbcf7('0x35')]),_0x3b1998);if(_0x5b9ffd['query'][_0xbcf7('0x3c')]){_0xc221e4[_0xbcf7('0x3d')]=_[_0xbcf7('0x3e')](_0xc221e4[_0xbcf7('0x3d')],{'$or':_[_0xbcf7('0x2c')](_0x3b1998,function(_0xa26d79){if(_0xa26d79[_0xbcf7('0x30')]!==_0xbcf7('0x3f')){var _0x30e2ff={};_0x30e2ff[_0xa26d79[_0xbcf7('0x29')]]={'$like':'%'+_0x5b9ffd['query'][_0xbcf7('0x3c')]+'%'};return _0x30e2ff;}})});}_0xc221e4=_[_0xbcf7('0x3e')]({},_0xc221e4,_0x5b9ffd['options']);var _0x49ae83={'where':_0xc221e4[_0xbcf7('0x3d')]};return db[_0xbcf7('0x2d')]['count'](_0x49ae83)[_0xbcf7('0x27')](function(_0x232843){_0x5133d4[_0xbcf7('0x20')]=_0x232843;if(_0x5b9ffd[_0xbcf7('0x33')][_0xbcf7('0x40')]){_0xc221e4[_0xbcf7('0x41')]=[{'all':!![]}];}return db[_0xbcf7('0x2d')][_0xbcf7('0x42')](_0xc221e4);})['then'](function(_0x5b06dc){_0x5133d4[_0xbcf7('0x43')]=_0x5b06dc;return _0x5133d4;})[_0xbcf7('0x27')](respondWithFilteredResult(_0x5ca61f,_0xc221e4))[_0xbcf7('0x44')](handleError(_0x5ca61f,null));};exports['show']=function(_0x5f0420,_0x398b90){var _0x15b8e0={'raw':!![],'where':{'id':_0x5f0420['params']['id']}},_0xa5d0bc={};_0xa5d0bc['model']=_[_0xbcf7('0x34')](db[_0xbcf7('0x2d')][_0xbcf7('0x2e')]);_0xa5d0bc['query']=_[_0xbcf7('0x34')](_0x5f0420[_0xbcf7('0x33')]);_0xa5d0bc['filters']=_['intersection'](_0xa5d0bc[_0xbcf7('0x32')],_0xa5d0bc[_0xbcf7('0x33')]);_0x15b8e0[_0xbcf7('0x37')]=_[_0xbcf7('0x36')](_0xa5d0bc[_0xbcf7('0x32')],qs[_0xbcf7('0x38')](_0x5f0420[_0xbcf7('0x33')][_0xbcf7('0x38')]));_0x15b8e0[_0xbcf7('0x37')]=_0x15b8e0[_0xbcf7('0x37')][_0xbcf7('0x45')]?_0x15b8e0[_0xbcf7('0x37')]:_0xa5d0bc[_0xbcf7('0x32')];if(_0x5f0420[_0xbcf7('0x33')]['includeAll']){_0x15b8e0[_0xbcf7('0x41')]=[{'all':!![]}];}_0x15b8e0=_['merge']({},_0x15b8e0,_0x5f0420['options']);return db[_0xbcf7('0x2d')][_0xbcf7('0x46')](_0x15b8e0)[_0xbcf7('0x27')](handleEntityNotFound(_0x398b90,null))[_0xbcf7('0x27')](respondWithResult(_0x398b90,null))[_0xbcf7('0x44')](handleError(_0x398b90,null));};exports['create']=function(_0x180389,_0x48250d){return db['JscriptySessionReport'][_0xbcf7('0x47')](_0x180389[_0xbcf7('0x48')],{})[_0xbcf7('0x27')](respondWithResult(_0x48250d,0xc9))['catch'](handleError(_0x48250d,null));};exports[_0xbcf7('0x25')]=function(_0x5b0532,_0x23bdbf){if(_0x5b0532[_0xbcf7('0x48')]['id']){delete _0x5b0532[_0xbcf7('0x48')]['id'];}return db[_0xbcf7('0x2d')][_0xbcf7('0x46')]({'where':{'id':_0x5b0532[_0xbcf7('0x49')]['id']}})['then'](handleEntityNotFound(_0x23bdbf,null))[_0xbcf7('0x27')](saveUpdates(_0x5b0532[_0xbcf7('0x48')],null))[_0xbcf7('0x27')](respondWithResult(_0x23bdbf,null))[_0xbcf7('0x44')](handleError(_0x23bdbf,null));};exports['destroy']=function(_0x15b867,_0x3f46c3){return db['JscriptySessionReport'][_0xbcf7('0x46')]({'where':{'id':_0x15b867[_0xbcf7('0x49')]['id']}})[_0xbcf7('0x27')](handleEntityNotFound(_0x3f46c3,null))[_0xbcf7('0x27')](removeEntity(_0x3f46c3,null))['catch'](handleError(_0x3f46c3,null));};exports[_0xbcf7('0x4a')]=function(_0xa3de7f,_0xcf77f9){return db[_0xbcf7('0x2d')]['describe']()[_0xbcf7('0x27')](respondWithResult(_0xcf77f9,null))[_0xbcf7('0x44')](handleError(_0xcf77f9,null));};exports[_0xbcf7('0x4b')]=function(_0x12061c,_0x42bda8,_0x1371a4){var _0x20cc5f={'raw':!![],'where':{}};var _0x1cc4e3={};var _0x6d7fdb={'count':0x0,'rows':[]};return db[_0xbcf7('0x2d')][_0xbcf7('0x4c')]({'where':{'id':_0x12061c[_0xbcf7('0x49')]['id']}})[_0xbcf7('0x27')](handleEntityNotFound(_0x42bda8,null))[_0xbcf7('0x27')](function(_0x1dd93b){if(_0x1dd93b){_0x1cc4e3[_0xbcf7('0x32')]=_[_0xbcf7('0x34')](db['JscriptyQuestionReport'][_0xbcf7('0x2e')]);_0x1cc4e3[_0xbcf7('0x33')]=_['keys'](_0x12061c[_0xbcf7('0x33')]);_0x1cc4e3[_0xbcf7('0x35')]=_['intersection'](_0x1cc4e3[_0xbcf7('0x32')],_0x1cc4e3['query']);_0x20cc5f[_0xbcf7('0x37')]=_['intersection'](_0x1cc4e3['model'],qs[_0xbcf7('0x38')](_0x12061c[_0xbcf7('0x33')]['fields']));_0x20cc5f[_0xbcf7('0x37')]=_0x20cc5f[_0xbcf7('0x37')]['length']?_0x20cc5f[_0xbcf7('0x37')]:_0x1cc4e3[_0xbcf7('0x32')];if(!_0x12061c['query'][_0xbcf7('0x39')](_0xbcf7('0x4d'))){_0x20cc5f[_0xbcf7('0x1f')]=qs[_0xbcf7('0x1f')](_0x12061c[_0xbcf7('0x33')][_0xbcf7('0x1f')]);_0x20cc5f[_0xbcf7('0x1d')]=qs[_0xbcf7('0x1d')](_0x12061c[_0xbcf7('0x33')][_0xbcf7('0x1d')]);}_0x20cc5f[_0xbcf7('0x3a')]=qs[_0xbcf7('0x3b')](_0x12061c[_0xbcf7('0x33')]['sort']);_0x20cc5f['where']=qs[_0xbcf7('0x35')](_[_0xbcf7('0x4e')](_0x12061c['query'],_0x1cc4e3[_0xbcf7('0x35')]));_0x20cc5f[_0xbcf7('0x3d')][_0xbcf7('0x4f')]=_0x1dd93b['id'];if(_0x12061c[_0xbcf7('0x33')][_0xbcf7('0x3c')]){_0x20cc5f[_0xbcf7('0x3d')]=_['merge'](_0x20cc5f[_0xbcf7('0x3d')],{'$or':_['map'](_0x20cc5f['attributes'],function(_0xa409f9){var _0x15f725={};_0x15f725[_0xa409f9]={'$like':'%'+_0x12061c['query'][_0xbcf7('0x3c')]+'%'};return _0x15f725;})});}_0x20cc5f=_[_0xbcf7('0x3e')]({},_0x20cc5f,_0x12061c[_0xbcf7('0x50')]);return db[_0xbcf7('0x51')][_0xbcf7('0x20')]({'where':_0x20cc5f[_0xbcf7('0x3d')]})['then'](function(_0x372830){_0x6d7fdb[_0xbcf7('0x20')]=_0x372830;if(_0x12061c[_0xbcf7('0x33')]['includeAll']){_0x20cc5f['include']=[{'all':!![]}];}return db[_0xbcf7('0x51')][_0xbcf7('0x42')](_0x20cc5f);})[_0xbcf7('0x27')](function(_0x1cd2d4){_0x6d7fdb[_0xbcf7('0x43')]=_0x1cd2d4;return _0x6d7fdb;});}})[_0xbcf7('0x27')](respondWithFilteredResult(_0x42bda8,_0x20cc5f))[_0xbcf7('0x44')](handleError(_0x42bda8,null));};
\ No newline at end of file
index 7c71b64..606bc4d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xafc4=['path','exports','define','JscriptySessionReport','report_jscripty_sessions','lodash','../../config/logger','moment','bluebird','request-promise'];(function(_0x36c5b0,_0x5001da){var _0xf19333=function(_0x1e880a){while(--_0x1e880a){_0x36c5b0['push'](_0x36c5b0['shift']());}};_0xf19333(++_0x5001da);}(_0xafc4,0x69));var _0x4afc=function(_0x533b36,_0x1d82ea){_0x533b36=_0x533b36-0x0;var _0x33560d=_0xafc4[_0x533b36];return _0x33560d;};'use strict';var _=require(_0x4afc('0x0'));var util=require('util');var logger=require(_0x4afc('0x1'))('api');var moment=require(_0x4afc('0x2'));var BPromise=require(_0x4afc('0x3'));var rp=require(_0x4afc('0x4'));var fs=require('fs');var path=require(_0x4afc('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./jscriptySessionReport.attributes');module[_0x4afc('0x6')]=function(_0x471d45,_0x16953b){return _0x471d45[_0x4afc('0x7')](_0x4afc('0x8'),attributes,{'tableName':_0x4afc('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x326f=['report_jscripty_sessions','lodash','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./jscriptySessionReport.attributes','exports','define','JscriptySessionReport'];(function(_0x4ae2cf,_0x258e4b){var _0x59a0b3=function(_0x50cc83){while(--_0x50cc83){_0x4ae2cf['push'](_0x4ae2cf['shift']());}};_0x59a0b3(++_0x258e4b);}(_0x326f,0xd1));var _0xf326=function(_0x3651c0,_0x19f8a6){_0x3651c0=_0x3651c0-0x0;var _0x5058c9=_0x326f[_0x3651c0];return _0x5058c9;};'use strict';var _=require(_0xf326('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xf326('0x1'));var moment=require(_0xf326('0x2'));var BPromise=require(_0xf326('0x3'));var rp=require(_0xf326('0x4'));var fs=require('fs');var path=require(_0xf326('0x5'));var rimraf=require(_0xf326('0x6'));var config=require(_0xf326('0x7'));var attributes=require(_0xf326('0x8'));module[_0xf326('0x9')]=function(_0x3ace29,_0x4c2249){return _0x3ace29[_0xf326('0xa')](_0xf326('0xb'),attributes,{'tableName':_0xf326('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 6dac5ae..51fe3d0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x430c=['then','info','JscriptySessionReport,\x20%s,\x20%s','debug','JscriptySessionReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','lodash','bluebird','randomstring','ioredis','../../config/environment','jayson/promise','http','request'];(function(_0xae1a83,_0x1980d4){var _0xdb9da8=function(_0x36fc99){while(--_0x36fc99){_0xae1a83['push'](_0xae1a83['shift']());}};_0xdb9da8(++_0x1980d4);}(_0x430c,0x1a1));var _0xc430=function(_0x19f5fc,_0x4c658a){_0x19f5fc=_0x19f5fc-0x0;var _0x315fa3=_0x430c[_0x19f5fc];return _0x315fa3;};'use strict';var _=require(_0xc430('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xc430('0x1'));var rs=require(_0xc430('0x2'));var fs=require('fs');var Redis=require(_0xc430('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0xc430('0x4'));var jayson=require(_0xc430('0x5'));var client=jayson['client'][_0xc430('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x4de44f,_0x212354,_0x2e51c6){return new BPromise(function(_0x814a90,_0x13ae66){return client[_0xc430('0x7')](_0x4de44f,_0x2e51c6)[_0xc430('0x8')](function(_0x861581){logger[_0xc430('0x9')](_0xc430('0xa'),_0x212354,'request\x20sent');logger[_0xc430('0xb')](_0xc430('0xc'),_0x212354,'request\x20sent',JSON[_0xc430('0xd')](_0x861581));if(_0x861581['error']){if(_0x861581[_0xc430('0xe')]['code']===0x1f4){logger[_0xc430('0xe')](_0xc430('0xa'),_0x212354,_0x861581[_0xc430('0xe')][_0xc430('0xf')]);return _0x13ae66(_0x861581[_0xc430('0xe')][_0xc430('0xf')]);}logger[_0xc430('0xe')]('JscriptySessionReport,\x20%s,\x20%s',_0x212354,_0x861581['error'][_0xc430('0xf')]);return _0x814a90(_0x861581[_0xc430('0xe')][_0xc430('0xf')]);}else{logger[_0xc430('0x9')](_0xc430('0xa'),_0x212354,'request\x20sent');_0x814a90(_0x861581[_0xc430('0x10')]['message']);}})['catch'](function(_0x2e7987){logger[_0xc430('0xe')](_0xc430('0xa'),_0x212354,_0x2e7987);_0x13ae66(_0x2e7987);});});}
\ No newline at end of file
+var _0x25e7=['JscriptySessionReport,\x20%s,\x20%s','request\x20sent','debug','JscriptySessionReport,\x20%s,\x20%s,\x20%s','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','request','then','info'];(function(_0x39355e,_0x450619){var _0x4a495f=function(_0x287725){while(--_0x287725){_0x39355e['push'](_0x39355e['shift']());}};_0x4a495f(++_0x450619);}(_0x25e7,0x1d6));var _0x725e=function(_0x230bb8,_0xa1718){_0x230bb8=_0x230bb8-0x0;var _0x16cb9a=_0x25e7[_0x230bb8];return _0x16cb9a;};'use strict';var _=require(_0x725e('0x0'));var util=require(_0x725e('0x1'));var moment=require(_0x725e('0x2'));var BPromise=require(_0x725e('0x3'));var rs=require(_0x725e('0x4'));var fs=require('fs');var Redis=require(_0x725e('0x5'));var db=require(_0x725e('0x6'))['db'];var utils=require(_0x725e('0x7'));var logger=require(_0x725e('0x8'))(_0x725e('0x9'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x725e('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x481316,_0x111a50,_0x192c27){return new BPromise(function(_0x216b33,_0x67de0c){return client[_0x725e('0xb')](_0x481316,_0x192c27)[_0x725e('0xc')](function(_0x39858a){logger[_0x725e('0xd')](_0x725e('0xe'),_0x111a50,_0x725e('0xf'));logger[_0x725e('0x10')](_0x725e('0x11'),_0x111a50,'request\x20sent',JSON['stringify'](_0x39858a));if(_0x39858a[_0x725e('0x12')]){if(_0x39858a[_0x725e('0x12')]['code']===0x1f4){logger['error'](_0x725e('0xe'),_0x111a50,_0x39858a[_0x725e('0x12')]['message']);return _0x67de0c(_0x39858a[_0x725e('0x12')][_0x725e('0x13')]);}logger[_0x725e('0x12')]('JscriptySessionReport,\x20%s,\x20%s',_0x111a50,_0x39858a[_0x725e('0x12')][_0x725e('0x13')]);return _0x216b33(_0x39858a[_0x725e('0x12')][_0x725e('0x13')]);}else{logger[_0x725e('0xd')](_0x725e('0xe'),_0x111a50,'request\x20sent');_0x216b33(_0x39858a[_0x725e('0x14')][_0x725e('0x13')]);}})[_0x725e('0x15')](function(_0x54ac0f){logger[_0x725e('0x12')](_0x725e('0xe'),_0x111a50,_0x54ac0f);_0x67de0c(_0x54ac0f);});});}
\ No newline at end of file
index 0df90af..97c4032 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbc7a=['express','../../config/environment','get','put','/:id','isAuthenticated','update','/download_log_file','exports','multer','util','connect-timeout'];(function(_0x3c9916,_0x53f419){var _0x58cbaf=function(_0xa64a7b){while(--_0xa64a7b){_0x3c9916['push'](_0x3c9916['shift']());}};_0x58cbaf(++_0x53f419);}(_0xbc7a,0x171));var _0xabc7=function(_0x5c5b8b,_0x5ad9bc){_0x5c5b8b=_0x5c5b8b-0x0;var _0x5b5689=_0xbc7a[_0x5c5b8b];return _0x5b5689;};'use strict';var multer=require(_0xabc7('0x0'));var util=require(_0xabc7('0x1'));var path=require('path');var timeout=require(_0xabc7('0x2'));var express=require(_0xabc7('0x3'));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(_0xabc7('0x4'));var controller=require('./license.controller');router[_0xabc7('0x5')]('/',controller['index']);router[_0xabc7('0x6')](_0xabc7('0x7'),auth[_0xabc7('0x8')](),controller[_0xabc7('0x9')]);router[_0xabc7('0x5')](_0xabc7('0xa'),auth['isAuthenticated'](),controller['downloadLogFile']);module[_0xabc7('0xb')]=router;
\ No newline at end of file
+var _0xb469=['../../components/auth/service','../../components/interaction/service','get','index','put','/:id','isAuthenticated','update','/download_log_file','downloadLogFile','exports','multer','connect-timeout','express','Router','fs-extra'];(function(_0x4ddc46,_0x1bd808){var _0x3e903f=function(_0x2bf859){while(--_0x2bf859){_0x4ddc46['push'](_0x4ddc46['shift']());}};_0x3e903f(++_0x1bd808);}(_0xb469,0xab));var _0x9b46=function(_0x2e558d,_0x38762c){_0x2e558d=_0x2e558d-0x0;var _0x37ab86=_0xb469[_0x2e558d];return _0x37ab86;};'use strict';var multer=require(_0x9b46('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x9b46('0x1'));var express=require(_0x9b46('0x2'));var router=express[_0x9b46('0x3')]();var fs_extra=require(_0x9b46('0x4'));var auth=require(_0x9b46('0x5'));var interaction=require(_0x9b46('0x6'));var config=require('../../config/environment');var controller=require('./license.controller');router[_0x9b46('0x7')]('/',controller[_0x9b46('0x8')]);router[_0x9b46('0x9')](_0x9b46('0xa'),auth[_0x9b46('0xb')](),controller[_0x9b46('0xc')]);router[_0x9b46('0x7')](_0x9b46('0xd'),auth[_0x9b46('0xb')](),controller[_0x9b46('0xe')]);module[_0x9b46('0xf')]=router;
\ No newline at end of file
index 4860826..2e8c11b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc277=['INTEGER','sequelize','exports','STRING'];(function(_0x1c3e9c,_0x1e6694){var _0x2761b5=function(_0x5600a0){while(--_0x5600a0){_0x1c3e9c['push'](_0x1c3e9c['shift']());}};_0x2761b5(++_0x1e6694);}(_0xc277,0xb9));var _0x7c27=function(_0x4fb72f,_0x29566d){_0x4fb72f=_0x4fb72f-0x0;var _0x2fe429=_0xc277[_0x4fb72f];return _0x2fe429;};'use strict';var Sequelize=require(_0x7c27('0x0'));module[_0x7c27('0x1')]={'license':{'type':Sequelize['TEXT']},'data1':{'type':Sequelize[_0x7c27('0x2')]},'data2':{'type':Sequelize[_0x7c27('0x2')]},'chatLicenseExceeded':{'type':Sequelize[_0x7c27('0x3')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x973e=['TEXT','STRING','INTEGER','exports'];(function(_0x454e6d,_0x1e1f38){var _0x4bc294=function(_0x2c803a){while(--_0x2c803a){_0x454e6d['push'](_0x454e6d['shift']());}};_0x4bc294(++_0x1e1f38);}(_0x973e,0x9b));var _0xe973=function(_0x2580f4,_0x2016b5){_0x2580f4=_0x2580f4-0x0;var _0x5a8838=_0x973e[_0x2580f4];return _0x5a8838;};'use strict';var Sequelize=require('sequelize');module[_0xe973('0x0')]={'license':{'type':Sequelize[_0xe973('0x1')]},'data1':{'type':Sequelize[_0xe973('0x2')]},'data2':{'type':Sequelize[_0xe973('0x2')]},'chatLicenseExceeded':{'type':Sequelize[_0xe973('0x3')],'defaultValue':0x0}};
\ No newline at end of file
index 8a4974a..0fc62dd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8c94=['../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','Content-Range','apply','save','update','then','error','name','../../config/license/util','index','model','License','query','keys','filters','intersection','attributes','fields','length','merge','getLicense','body','find','params','checkLicense','demo','catch','downloadLogFile','license-info.log','/var','xcally','setHeader','Content-disposition','text/plain','download','eml-format','rimraf','fast-json-patch','request-promise','moment','mustache','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x8c94,0x186));var _0x48c9=function(_0x5c351c,_0x2046d8){_0x5c351c=_0x5c351c-0x0;var _0x26f3b3=_0x8c94[_0x5c351c];return _0x26f3b3;};'use strict';var emlformat=require(_0x48c9('0x0'));var rimraf=require(_0x48c9('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x48c9('0x2'));var rp=require(_0x48c9('0x3'));var moment=require(_0x48c9('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x48c9('0x5'));var util=require('util');var path=require(_0x48c9('0x6'));var sox=require('sox');var csv=require(_0x48c9('0x7'));var ejs=require(_0x48c9('0x8'));var fs=require('fs');var fs_extra=require(_0x48c9('0x9'));var _=require(_0x48c9('0xa'));var squel=require(_0x48c9('0xb'));var crypto=require(_0x48c9('0xc'));var jsforce=require(_0x48c9('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x48c9('0x7'));var querystring=require(_0x48c9('0xe'));var Papa=require(_0x48c9('0xf'));var Redis=require(_0x48c9('0x10'));var authService=require(_0x48c9('0x11'));var qs=require(_0x48c9('0x12'));var as=require(_0x48c9('0x13'));var hardwareService=require(_0x48c9('0x14'));var logger=require(_0x48c9('0x15'))(_0x48c9('0x16'));var utils=require(_0x48c9('0x17'));var config=require(_0x48c9('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0x48c9('0x19'))['db'];function respondWithStatusCode(_0x2ed089,_0x400ba3){_0x400ba3=_0x400ba3||0xcc;return function(_0x36b932){if(_0x36b932){return _0x2ed089[_0x48c9('0x1a')](_0x400ba3);}return _0x2ed089[_0x48c9('0x1b')](_0x400ba3)[_0x48c9('0x1c')]();};}function respondWithResult(_0x1abc6b,_0x46f607){_0x46f607=_0x46f607||0xc8;return function(_0x1a140f){if(_0x1a140f){return _0x1abc6b[_0x48c9('0x1b')](_0x46f607)[_0x48c9('0x1d')](_0x1a140f);}};}function respondWithFilteredResult(_0xe82eff,_0xf82bd0){return function(_0x21d286){if(_0x21d286){var _0x8aee52=typeof _0xf82bd0['offset']===_0x48c9('0x1e')&&typeof _0xf82bd0[_0x48c9('0x1f')]===_0x48c9('0x1e');var _0x1d42a6=_0x21d286[_0x48c9('0x20')];var _0x5b0286=_0x8aee52?0x0:_0xf82bd0[_0x48c9('0x21')];var _0x20ca79=_0x8aee52?_0x21d286[_0x48c9('0x20')]:_0xf82bd0[_0x48c9('0x21')]+_0xf82bd0[_0x48c9('0x1f')];var _0x5de38b;if(_0x20ca79>=_0x1d42a6){_0x20ca79=_0x1d42a6;_0x5de38b=0xc8;}else{_0x5de38b=0xce;}_0xe82eff[_0x48c9('0x1b')](_0x5de38b);return _0xe82eff['set'](_0x48c9('0x22'),_0x5b0286+'-'+_0x20ca79+'/'+_0x1d42a6)[_0x48c9('0x1d')](_0x21d286);}return null;};}function patchUpdates(_0x435820){return function(_0x2a5ebf){try{jsonpatch[_0x48c9('0x23')](_0x2a5ebf,_0x435820,!![]);}catch(_0x154457){return BPromise['reject'](_0x154457);}return _0x2a5ebf[_0x48c9('0x24')]();};}function saveUpdates(_0x354bfa,_0x20268b){return function(_0x191e35){if(_0x191e35){return _0x191e35[_0x48c9('0x25')](_0x354bfa)[_0x48c9('0x26')](function(_0x5bed8d){return _0x5bed8d;});}return null;};}function removeEntity(_0x327a86,_0x19a090){return function(_0x307919){if(_0x307919){return _0x307919['destroy']()[_0x48c9('0x26')](function(){_0x327a86[_0x48c9('0x1b')](0xcc)[_0x48c9('0x1c')]();});}};}function handleEntityNotFound(_0x1c391b,_0x59d248){return function(_0x33447e){if(!_0x33447e){_0x1c391b['sendStatus'](0x194);}return _0x33447e;};}function handleError(_0x52466a,_0x41b35f){_0x41b35f=_0x41b35f||0x1f4;return function(_0x1cb296){logger[_0x48c9('0x27')](_0x1cb296['stack']);if(_0x1cb296[_0x48c9('0x28')]){delete _0x1cb296['name'];}_0x52466a[_0x48c9('0x1b')](_0x41b35f)['send'](_0x1cb296);};}var utilLicense=require(_0x48c9('0x29'));exports[_0x48c9('0x2a')]=function(_0x111d07,_0x3268ac){var _0x2ead4c={'raw':!![],'where':{'id':0x1}},_0x5bf9ad={};_0x5bf9ad[_0x48c9('0x2b')]=_['keys'](db[_0x48c9('0x2c')]['rawAttributes']);_0x5bf9ad[_0x48c9('0x2d')]=_[_0x48c9('0x2e')](_0x111d07['query']);_0x5bf9ad[_0x48c9('0x2f')]=_[_0x48c9('0x30')](_0x5bf9ad[_0x48c9('0x2b')],_0x5bf9ad['query']);_0x2ead4c[_0x48c9('0x31')]=_[_0x48c9('0x30')](_0x5bf9ad[_0x48c9('0x2b')],qs['fields'](_0x111d07['query'][_0x48c9('0x32')]));_0x2ead4c['attributes']=_0x2ead4c['attributes'][_0x48c9('0x33')]?_0x2ead4c[_0x48c9('0x31')]:_0x5bf9ad[_0x48c9('0x2b')];_0x2ead4c=_[_0x48c9('0x34')]({},_0x2ead4c,_0x111d07['options']);return utilLicense[_0x48c9('0x35')](_0x2ead4c)[_0x48c9('0x26')](respondWithResult(_0x3268ac,null))['catch'](handleError(_0x3268ac,null));};exports['update']=function(_0x36c33d,_0x11dd7e){if(_0x36c33d[_0x48c9('0x36')]['id']){delete _0x36c33d[_0x48c9('0x36')]['id'];}return db[_0x48c9('0x2c')][_0x48c9('0x37')]({'where':{'id':_0x36c33d[_0x48c9('0x38')]['id']}})['then'](handleEntityNotFound(_0x11dd7e,null))[_0x48c9('0x26')](function(_0x2d3a6e){var _0x11b98d=_0x2d3a6e['get']({'plain':!![]});return utilLicense[_0x48c9('0x39')](_0x11b98d,_0x36c33d[_0x48c9('0x36')]['key']);})['then'](function(_0x352508){if(!_0x352508[_0x48c9('0x3a')]){return saveUpdates(_0x36c33d['body'],null);}return _0x352508;})[_0x48c9('0x26')](respondWithResult(_0x11dd7e,null))[_0x48c9('0x3b')](handleError(_0x11dd7e,null));};exports[_0x48c9('0x3c')]=function(_0x88dd4d,_0x578438){var _0x13c0c2=_0x48c9('0x3d');var _0x5e7005=path['join'](_0x48c9('0x3e'),'log',_0x48c9('0x3f'),_0x13c0c2);_0x578438[_0x48c9('0x40')](_0x48c9('0x41'),'attachment;\x20filename='+_0x13c0c2);_0x578438['set']('Content-Type',_0x48c9('0x42'));_0x578438[_0x48c9('0x43')](_0x5e7005);};
\ No newline at end of file
+var _0x9409=['intersection','attributes','fields','length','merge','options','getLicense','catch','body','find','params','get','checkLicense','demo','downloadLogFile','license-info.log','/var','log','Content-disposition','attachment;\x20filename=','Content-Type','text/plain','download','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../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','apply','reject','save','update','then','destroy','stack','name','model','keys','rawAttributes','query'];(function(_0x2f4e50,_0x3cbad7){var _0xfefb3f=function(_0xa8c8b){while(--_0xa8c8b){_0x2f4e50['push'](_0x2f4e50['shift']());}};_0xfefb3f(++_0x3cbad7);}(_0x9409,0x1af));var _0x9940=function(_0x6cfb8a,_0x53be6f){_0x6cfb8a=_0x6cfb8a-0x0;var _0x29ba1d=_0x9409[_0x6cfb8a];return _0x29ba1d;};'use strict';var emlformat=require(_0x9940('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x9940('0x1'));var jsonpatch=require(_0x9940('0x2'));var rp=require('request-promise');var moment=require(_0x9940('0x3'));var BPromise=require(_0x9940('0x4'));var Mustache=require(_0x9940('0x5'));var util=require('util');var path=require(_0x9940('0x6'));var sox=require(_0x9940('0x7'));var csv=require(_0x9940('0x8'));var ejs=require(_0x9940('0x9'));var fs=require('fs');var fs_extra=require(_0x9940('0xa'));var _=require(_0x9940('0xb'));var squel=require(_0x9940('0xc'));var crypto=require(_0x9940('0xd'));var jsforce=require(_0x9940('0xe'));var deskjs=require(_0x9940('0xf'));var toCsv=require(_0x9940('0x8'));var querystring=require(_0x9940('0x10'));var Papa=require(_0x9940('0x11'));var Redis=require('ioredis');var authService=require(_0x9940('0x12'));var qs=require(_0x9940('0x13'));var as=require(_0x9940('0x14'));var hardwareService=require(_0x9940('0x15'));var logger=require(_0x9940('0x16'))('api');var utils=require(_0x9940('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0x9940('0x18'));var db=require(_0x9940('0x19'))['db'];function respondWithStatusCode(_0x2d1d52,_0x572990){_0x572990=_0x572990||0xcc;return function(_0x34ee9c){if(_0x34ee9c){return _0x2d1d52[_0x9940('0x1a')](_0x572990);}return _0x2d1d52[_0x9940('0x1b')](_0x572990)[_0x9940('0x1c')]();};}function respondWithResult(_0x5b8464,_0x208be1){_0x208be1=_0x208be1||0xc8;return function(_0x51de2d){if(_0x51de2d){return _0x5b8464[_0x9940('0x1b')](_0x208be1)[_0x9940('0x1d')](_0x51de2d);}};}function respondWithFilteredResult(_0x2b7401,_0x37db7d){return function(_0x4e4684){if(_0x4e4684){var _0x1067db=typeof _0x37db7d[_0x9940('0x1e')]===_0x9940('0x1f')&&typeof _0x37db7d['limit']===_0x9940('0x1f');var _0x313fbd=_0x4e4684[_0x9940('0x20')];var _0x18ce12=_0x1067db?0x0:_0x37db7d[_0x9940('0x1e')];var _0x123f9a=_0x1067db?_0x4e4684['count']:_0x37db7d['offset']+_0x37db7d['limit'];var _0x115c37;if(_0x123f9a>=_0x313fbd){_0x123f9a=_0x313fbd;_0x115c37=0xc8;}else{_0x115c37=0xce;}_0x2b7401[_0x9940('0x1b')](_0x115c37);return _0x2b7401['set']('Content-Range',_0x18ce12+'-'+_0x123f9a+'/'+_0x313fbd)[_0x9940('0x1d')](_0x4e4684);}return null;};}function patchUpdates(_0x1ccec2){return function(_0x20b25a){try{jsonpatch[_0x9940('0x21')](_0x20b25a,_0x1ccec2,!![]);}catch(_0xbf7768){return BPromise[_0x9940('0x22')](_0xbf7768);}return _0x20b25a[_0x9940('0x23')]();};}function saveUpdates(_0x3b0fcd,_0x14123a){return function(_0x1f4adc){if(_0x1f4adc){return _0x1f4adc[_0x9940('0x24')](_0x3b0fcd)[_0x9940('0x25')](function(_0x3c33e1){return _0x3c33e1;});}return null;};}function removeEntity(_0x5f2049,_0x10cec3){return function(_0x25e893){if(_0x25e893){return _0x25e893[_0x9940('0x26')]()['then'](function(){_0x5f2049[_0x9940('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4c533c,_0x81ec53){return function(_0x40cc34){if(!_0x40cc34){_0x4c533c[_0x9940('0x1a')](0x194);}return _0x40cc34;};}function handleError(_0x184144,_0x475aae){_0x475aae=_0x475aae||0x1f4;return function(_0x1aed68){logger['error'](_0x1aed68[_0x9940('0x27')]);if(_0x1aed68[_0x9940('0x28')]){delete _0x1aed68['name'];}_0x184144[_0x9940('0x1b')](_0x475aae)['send'](_0x1aed68);};}var utilLicense=require(_0x9940('0x18'));exports['index']=function(_0x39ad5d,_0x51935e){var _0xcb2d40={'raw':!![],'where':{'id':0x1}},_0x3c1921={};_0x3c1921[_0x9940('0x29')]=_[_0x9940('0x2a')](db['License'][_0x9940('0x2b')]);_0x3c1921[_0x9940('0x2c')]=_['keys'](_0x39ad5d[_0x9940('0x2c')]);_0x3c1921['filters']=_[_0x9940('0x2d')](_0x3c1921[_0x9940('0x29')],_0x3c1921[_0x9940('0x2c')]);_0xcb2d40[_0x9940('0x2e')]=_['intersection'](_0x3c1921[_0x9940('0x29')],qs[_0x9940('0x2f')](_0x39ad5d[_0x9940('0x2c')][_0x9940('0x2f')]));_0xcb2d40[_0x9940('0x2e')]=_0xcb2d40[_0x9940('0x2e')][_0x9940('0x30')]?_0xcb2d40[_0x9940('0x2e')]:_0x3c1921[_0x9940('0x29')];_0xcb2d40=_[_0x9940('0x31')]({},_0xcb2d40,_0x39ad5d[_0x9940('0x32')]);return utilLicense[_0x9940('0x33')](_0xcb2d40)[_0x9940('0x25')](respondWithResult(_0x51935e,null))[_0x9940('0x34')](handleError(_0x51935e,null));};exports['update']=function(_0x95941,_0x4a1dff){if(_0x95941['body']['id']){delete _0x95941[_0x9940('0x35')]['id'];}return db['License'][_0x9940('0x36')]({'where':{'id':_0x95941[_0x9940('0x37')]['id']}})[_0x9940('0x25')](handleEntityNotFound(_0x4a1dff,null))[_0x9940('0x25')](function(_0x3defee){var _0x14d73a=_0x3defee[_0x9940('0x38')]({'plain':!![]});return utilLicense[_0x9940('0x39')](_0x14d73a,_0x95941[_0x9940('0x35')]['key']);})[_0x9940('0x25')](function(_0x34ba98){if(!_0x34ba98[_0x9940('0x3a')]){return saveUpdates(_0x95941[_0x9940('0x35')],null);}return _0x34ba98;})[_0x9940('0x25')](respondWithResult(_0x4a1dff,null))[_0x9940('0x34')](handleError(_0x4a1dff,null));};exports[_0x9940('0x3b')]=function(_0x38e4a1,_0x6b3549){var _0x597b69=_0x9940('0x3c');var _0x40006a=path['join'](_0x9940('0x3d'),_0x9940('0x3e'),'xcally',_0x597b69);_0x6b3549['setHeader'](_0x9940('0x3f'),_0x9940('0x40')+_0x597b69);_0x6b3549['set'](_0x9940('0x41'),_0x9940('0x42'));_0x6b3549[_0x9940('0x43')](_0x40006a);};
\ No newline at end of file
index cbed297..0c03d2e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf433=['define','License','lodash','util','api','bluebird','path','../../config/environment','./license.attributes'];(function(_0x4194d2,_0x22db8d){var _0x3a6415=function(_0x522413){while(--_0x522413){_0x4194d2['push'](_0x4194d2['shift']());}};_0x3a6415(++_0x22db8d);}(_0xf433,0x1cd));var _0x3f43=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xf433[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x3f43('0x0'));var util=require(_0x3f43('0x1'));var logger=require('../../config/logger')(_0x3f43('0x2'));var moment=require('moment');var BPromise=require(_0x3f43('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x3f43('0x4'));var rimraf=require('rimraf');var config=require(_0x3f43('0x5'));var attributes=require(_0x3f43('0x6'));module['exports']=function(_0x487dde,_0x307093){return _0x487dde[_0x3f43('0x7')](_0x3f43('0x8'),attributes,{'tableName':'license','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xe789=['License','license','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./license.attributes','define'];(function(_0x2631d5,_0x204bf4){var _0x36521f=function(_0x188f8f){while(--_0x188f8f){_0x2631d5['push'](_0x2631d5['shift']());}};_0x36521f(++_0x204bf4);}(_0xe789,0x1af));var _0x9e78=function(_0x3fc0d7,_0x10fc1d){_0x3fc0d7=_0x3fc0d7-0x0;var _0x1b2dcb=_0xe789[_0x3fc0d7];return _0x1b2dcb;};'use strict';var _=require(_0x9e78('0x0'));var util=require(_0x9e78('0x1'));var logger=require(_0x9e78('0x2'))(_0x9e78('0x3'));var moment=require(_0x9e78('0x4'));var BPromise=require(_0x9e78('0x5'));var rp=require(_0x9e78('0x6'));var fs=require('fs');var path=require(_0x9e78('0x7'));var rimraf=require('rimraf');var config=require(_0x9e78('0x8'));var attributes=require(_0x9e78('0x9'));module['exports']=function(_0x53af67,_0x38a8a7){return _0x53af67[_0x9e78('0xa')](_0x9e78('0xb'),attributes,{'tableName':_0x9e78('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index b1ee2b6..5ea46fc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x519a=['randomstring','jayson/promise','http','then','info','request\x20sent','License,\x20%s,\x20%s,\x20%s','stringify','error','License,\x20%s,\x20%s','message','catch','util','moment','bluebird'];(function(_0x1f5c77,_0x3821d8){var _0x36f69c=function(_0x373ca1){while(--_0x373ca1){_0x1f5c77['push'](_0x1f5c77['shift']());}};_0x36f69c(++_0x3821d8);}(_0x519a,0xc0));var _0xa519=function(_0x12ca5f,_0x223d98){_0x12ca5f=_0x12ca5f-0x0;var _0xfc3ae9=_0x519a[_0x12ca5f];return _0xfc3ae9;};'use strict';var _=require('lodash');var util=require(_0xa519('0x0'));var moment=require(_0xa519('0x1'));var BPromise=require(_0xa519('0x2'));var rs=require(_0xa519('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0xa519('0x4'));var client=jayson['client'][_0xa519('0x5')]({'port':0x232a});function respondWithRpcPromise(_0x56add2,_0xf91580,_0x4e4fc1){return new BPromise(function(_0x28d544,_0xd42592){return client['request'](_0x56add2,_0x4e4fc1)[_0xa519('0x6')](function(_0x5009dc){logger[_0xa519('0x7')]('License,\x20%s,\x20%s',_0xf91580,_0xa519('0x8'));logger['debug'](_0xa519('0x9'),_0xf91580,_0xa519('0x8'),JSON[_0xa519('0xa')](_0x5009dc));if(_0x5009dc[_0xa519('0xb')]){if(_0x5009dc['error']['code']===0x1f4){logger[_0xa519('0xb')](_0xa519('0xc'),_0xf91580,_0x5009dc[_0xa519('0xb')][_0xa519('0xd')]);return _0xd42592(_0x5009dc[_0xa519('0xb')][_0xa519('0xd')]);}logger[_0xa519('0xb')](_0xa519('0xc'),_0xf91580,_0x5009dc['error'][_0xa519('0xd')]);return _0x28d544(_0x5009dc['error']['message']);}else{logger[_0xa519('0x7')](_0xa519('0xc'),_0xf91580,_0xa519('0x8'));_0x28d544(_0x5009dc['result']['message']);}})[_0xa519('0xe')](function(_0x31ec60){logger[_0xa519('0xb')](_0xa519('0xc'),_0xf91580,_0x31ec60);_0xd42592(_0x31ec60);});});}
\ No newline at end of file
+var _0x673b=['client','http','request','then','info','License,\x20%s,\x20%s','request\x20sent','debug','License,\x20%s,\x20%s,\x20%s','error','code','message','catch','util','moment','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise'];(function(_0x5d2817,_0x18d475){var _0x30103b=function(_0x4f9d7f){while(--_0x4f9d7f){_0x5d2817['push'](_0x5d2817['shift']());}};_0x30103b(++_0x18d475);}(_0x673b,0x85));var _0xb673=function(_0x9f8c46,_0x40fed7){_0x9f8c46=_0x9f8c46-0x0;var _0x233e97=_0x673b[_0x9f8c46];return _0x233e97;};'use strict';var _=require('lodash');var util=require(_0xb673('0x0'));var moment=require(_0xb673('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb673('0x2'));var db=require(_0xb673('0x3'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xb673('0x4'));var config=require(_0xb673('0x5'));var jayson=require(_0xb673('0x6'));var client=jayson[_0xb673('0x7')][_0xb673('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x4adc24,_0x4e62a3,_0x3e5cd1){return new BPromise(function(_0x11ac90,_0x1c1171){return client[_0xb673('0x9')](_0x4adc24,_0x3e5cd1)[_0xb673('0xa')](function(_0x22a955){logger[_0xb673('0xb')](_0xb673('0xc'),_0x4e62a3,_0xb673('0xd'));logger[_0xb673('0xe')](_0xb673('0xf'),_0x4e62a3,'request\x20sent',JSON['stringify'](_0x22a955));if(_0x22a955[_0xb673('0x10')]){if(_0x22a955['error'][_0xb673('0x11')]===0x1f4){logger[_0xb673('0x10')]('License,\x20%s,\x20%s',_0x4e62a3,_0x22a955[_0xb673('0x10')][_0xb673('0x12')]);return _0x1c1171(_0x22a955[_0xb673('0x10')][_0xb673('0x12')]);}logger[_0xb673('0x10')](_0xb673('0xc'),_0x4e62a3,_0x22a955['error'][_0xb673('0x12')]);return _0x11ac90(_0x22a955['error'][_0xb673('0x12')]);}else{logger[_0xb673('0xb')](_0xb673('0xc'),_0x4e62a3,_0xb673('0xd'));_0x11ac90(_0x22a955['result'][_0xb673('0x12')]);}})[_0xb673('0x13')](function(_0x374c60){logger[_0xb673('0x10')](_0xb673('0xc'),_0x4e62a3,_0x374c60);_0x1c1171(_0x374c60);});});}
\ No newline at end of file
index 2cb3cb5..a0360d1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9674=['/:id/dispositions','addDisposition','/:id/canned_answers','addAnswer','create','addSmtp','/:id/interactions','addInteraction','addApplications','/:id/send','addAgents','put','update','delete','removeDispositions','removeAnswers','/:id/in_servers','removeImap','removeSmtp','destroy','/:id/users','removeAgents','multer','path','connect-timeout','express','Router','fs-extra','../../config/environment','get','isAuthenticated','index','/describe','describe','/:id','show','getDispositions','getAnswers','/:id/out_servers','getSmtp','getInteractions','/:id/applications','getApplications','/:id/messages','getMessages','/:id/verify','verifySmtp','getAgents','post'];(function(_0x471552,_0x27a000){var _0x186c68=function(_0x1dea7a){while(--_0x1dea7a){_0x471552['push'](_0x471552['shift']());}};_0x186c68(++_0x27a000);}(_0x9674,0x16d));var _0x4967=function(_0x53c493,_0x425909){_0x53c493=_0x53c493-0x0;var _0x1478ab=_0x9674[_0x53c493];return _0x1478ab;};'use strict';var multer=require(_0x4967('0x0'));var util=require('util');var path=require(_0x4967('0x1'));var timeout=require(_0x4967('0x2'));var express=require(_0x4967('0x3'));var router=express[_0x4967('0x4')]();var fs_extra=require(_0x4967('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x4967('0x6'));var controller=require('./mailAccount.controller');router[_0x4967('0x7')]('/',auth[_0x4967('0x8')](),controller[_0x4967('0x9')]);router[_0x4967('0x7')](_0x4967('0xa'),auth[_0x4967('0x8')](),controller[_0x4967('0xb')]);router[_0x4967('0x7')](_0x4967('0xc'),auth['isAuthenticated'](),controller[_0x4967('0xd')]);router[_0x4967('0x7')]('/:id/dispositions',auth[_0x4967('0x8')](),controller[_0x4967('0xe')]);router[_0x4967('0x7')]('/:id/canned_answers',auth[_0x4967('0x8')](),controller[_0x4967('0xf')]);router[_0x4967('0x7')]('/:id/in_servers',auth[_0x4967('0x8')](),controller['getImap']);router[_0x4967('0x7')](_0x4967('0x10'),auth[_0x4967('0x8')](),controller[_0x4967('0x11')]);router[_0x4967('0x7')]('/:id/interactions',auth[_0x4967('0x8')](),controller[_0x4967('0x12')]);router[_0x4967('0x7')](_0x4967('0x13'),auth[_0x4967('0x8')](),controller[_0x4967('0x14')]);router[_0x4967('0x7')](_0x4967('0x15'),auth['isAuthenticated'](),controller[_0x4967('0x16')]);router[_0x4967('0x7')](_0x4967('0x17'),auth['isAuthenticated'](),controller[_0x4967('0x18')]);router[_0x4967('0x7')]('/:id/users',auth['isAuthenticated'](),controller[_0x4967('0x19')]);router[_0x4967('0x1a')](_0x4967('0x1b'),auth[_0x4967('0x8')](),controller[_0x4967('0x1c')]);router[_0x4967('0x1a')](_0x4967('0x1d'),auth['isAuthenticated'](),controller[_0x4967('0x1e')]);router[_0x4967('0x1a')]('/',auth[_0x4967('0x8')](),controller[_0x4967('0x1f')]);router[_0x4967('0x1a')]('/:id/in_servers',auth[_0x4967('0x8')](),controller['addImap']);router['post'](_0x4967('0x10'),auth[_0x4967('0x8')](),controller[_0x4967('0x20')]);router[_0x4967('0x1a')](_0x4967('0x21'),auth[_0x4967('0x8')](),controller[_0x4967('0x22')]);router[_0x4967('0x1a')](_0x4967('0x13'),auth[_0x4967('0x8')](),controller[_0x4967('0x23')]);router[_0x4967('0x1a')](_0x4967('0x24'),auth[_0x4967('0x8')](),controller['send']);router['post']('/:id/users',auth[_0x4967('0x8')](),controller[_0x4967('0x25')]);router[_0x4967('0x26')](_0x4967('0xc'),auth[_0x4967('0x8')](),controller[_0x4967('0x27')]);router[_0x4967('0x28')](_0x4967('0x1b'),auth[_0x4967('0x8')](),controller[_0x4967('0x29')]);router[_0x4967('0x28')](_0x4967('0x1d'),auth[_0x4967('0x8')](),controller[_0x4967('0x2a')]);router[_0x4967('0x28')](_0x4967('0x2b'),auth[_0x4967('0x8')](),controller[_0x4967('0x2c')]);router[_0x4967('0x28')](_0x4967('0x10'),auth[_0x4967('0x8')](),controller[_0x4967('0x2d')]);router[_0x4967('0x28')](_0x4967('0xc'),auth[_0x4967('0x8')](),controller[_0x4967('0x2e')]);router[_0x4967('0x28')](_0x4967('0x2f'),auth[_0x4967('0x8')](),controller[_0x4967('0x30')]);module['exports']=router;
\ No newline at end of file
+var _0x4784=['addAnswer','create','addInteraction','addApplications','/:id/send','send','/:id/users','addAgents','put','update','delete','removeImap','destroy','removeAgents','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailAccount.controller','get','isAuthenticated','/describe','/:id','show','/:id/dispositions','/:id/canned_answers','getAnswers','/:id/in_servers','getImap','/:id/out_servers','getSmtp','/:id/interactions','getInteractions','/:id/applications','getApplications','getMessages','verifySmtp','post'];(function(_0x2894,_0x43bd89){var _0x2f7731=function(_0x36208d){while(--_0x36208d){_0x2894['push'](_0x2894['shift']());}};_0x2f7731(++_0x43bd89);}(_0x4784,0xbb));var _0x4478=function(_0x4c0bf0,_0x31253e){_0x4c0bf0=_0x4c0bf0-0x0;var _0xb092c0=_0x4784[_0x4c0bf0];return _0xb092c0;};'use strict';var multer=require(_0x4478('0x0'));var util=require('util');var path=require(_0x4478('0x1'));var timeout=require(_0x4478('0x2'));var express=require(_0x4478('0x3'));var router=express[_0x4478('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x4478('0x5'));var interaction=require(_0x4478('0x6'));var config=require(_0x4478('0x7'));var controller=require(_0x4478('0x8'));router[_0x4478('0x9')]('/',auth[_0x4478('0xa')](),controller['index']);router[_0x4478('0x9')](_0x4478('0xb'),auth[_0x4478('0xa')](),controller['describe']);router['get'](_0x4478('0xc'),auth[_0x4478('0xa')](),controller[_0x4478('0xd')]);router['get'](_0x4478('0xe'),auth[_0x4478('0xa')](),controller['getDispositions']);router[_0x4478('0x9')](_0x4478('0xf'),auth[_0x4478('0xa')](),controller[_0x4478('0x10')]);router['get'](_0x4478('0x11'),auth['isAuthenticated'](),controller[_0x4478('0x12')]);router['get'](_0x4478('0x13'),auth[_0x4478('0xa')](),controller[_0x4478('0x14')]);router[_0x4478('0x9')](_0x4478('0x15'),auth['isAuthenticated'](),controller[_0x4478('0x16')]);router[_0x4478('0x9')](_0x4478('0x17'),auth['isAuthenticated'](),controller[_0x4478('0x18')]);router[_0x4478('0x9')]('/:id/messages',auth[_0x4478('0xa')](),controller[_0x4478('0x19')]);router[_0x4478('0x9')]('/:id/verify',auth[_0x4478('0xa')](),controller[_0x4478('0x1a')]);router[_0x4478('0x9')]('/:id/users',auth['isAuthenticated'](),controller['getAgents']);router[_0x4478('0x1b')](_0x4478('0xe'),auth['isAuthenticated'](),controller['addDisposition']);router[_0x4478('0x1b')](_0x4478('0xf'),auth['isAuthenticated'](),controller[_0x4478('0x1c')]);router['post']('/',auth[_0x4478('0xa')](),controller[_0x4478('0x1d')]);router['post']('/:id/in_servers',auth[_0x4478('0xa')](),controller['addImap']);router[_0x4478('0x1b')](_0x4478('0x13'),auth[_0x4478('0xa')](),controller['addSmtp']);router['post'](_0x4478('0x15'),auth[_0x4478('0xa')](),controller[_0x4478('0x1e')]);router['post'](_0x4478('0x17'),auth[_0x4478('0xa')](),controller[_0x4478('0x1f')]);router[_0x4478('0x1b')](_0x4478('0x20'),auth[_0x4478('0xa')](),controller[_0x4478('0x21')]);router[_0x4478('0x1b')](_0x4478('0x22'),auth[_0x4478('0xa')](),controller[_0x4478('0x23')]);router[_0x4478('0x24')](_0x4478('0xc'),auth[_0x4478('0xa')](),controller[_0x4478('0x25')]);router[_0x4478('0x26')](_0x4478('0xe'),auth['isAuthenticated'](),controller['removeDispositions']);router[_0x4478('0x26')](_0x4478('0xf'),auth['isAuthenticated'](),controller['removeAnswers']);router[_0x4478('0x26')]('/:id/in_servers',auth[_0x4478('0xa')](),controller[_0x4478('0x27')]);router[_0x4478('0x26')](_0x4478('0x13'),auth['isAuthenticated'](),controller['removeSmtp']);router[_0x4478('0x26')](_0x4478('0xc'),auth[_0x4478('0xa')](),controller[_0x4478('0x28')]);router[_0x4478('0x26')]('/:id/users',auth[_0x4478('0xa')](),controller[_0x4478('0x29')]);module[_0x4478('0x2a')]=router;
\ No newline at end of file
index b1f6539..1ea8ea4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbfe7=['getDataValue','provider','custom','STRING','BOOLEAN','TEXT','Arial,Helvetica,sans-serif','Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}<br/>Subject\x20:\x20{{message.subject}}','INTEGER','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','setDataValue','mandatoryDisposition','gmail','hotmail','yahoo','outlook365'];(function(_0x31ced5,_0x5d5415){var _0x10d9e5=function(_0x2e51a5){while(--_0x2e51a5){_0x31ced5['push'](_0x31ced5['shift']());}};_0x10d9e5(++_0x5d5415);}(_0xbfe7,0x9c));var _0x7bfe=function(_0x100f20,_0x35fce9){_0x100f20=_0x100f20-0x0;var _0x24984d=_0xbfe7[_0x100f20];return _0x24984d;};'use strict';var Sequelize=require('sequelize');module['exports']={'description':{'type':Sequelize[_0x7bfe('0x0')]},'name':{'type':Sequelize[_0x7bfe('0x0')],'allowNull':![]},'service':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'email':{'type':Sequelize['STRING'],'validate':{'isEmail':!![]}},'active':{'type':Sequelize[_0x7bfe('0x1')],'defaultValue':!![]},'key':{'type':Sequelize[_0x7bfe('0x0')],'allowNull':![]},'template':{'type':Sequelize[_0x7bfe('0x2')]},'markAsUnread':{'type':Sequelize[_0x7bfe('0x1')],'defaultValue':![]},'fontFamily':{'type':Sequelize[_0x7bfe('0x0')],'allowNull':![],'defaultValue':_0x7bfe('0x3')},'fontSize':{'type':Sequelize['INTEGER'](0x2)['UNSIGNED'],'defaultValue':0xd,'validate':{'min':0x8,'max':0x48}},'notificationTemplate':{'type':Sequelize[_0x7bfe('0x2')],'defaultValue':function(){return _0x7bfe('0x4');}},'notificationSound':{'type':Sequelize[_0x7bfe('0x1')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x7bfe('0x1')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x7bfe('0x5')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x7bfe('0x1')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x7bfe('0x1')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x7bfe('0x5')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x7bfe('0x5')],'allowNull':!![],'defaultValue':null,'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':_0x7bfe('0x6'),'set':function(_0xce0bae){if(!_0xce0bae)this['setDataValue'](_0x7bfe('0x7'),null);this[_0x7bfe('0x8')](_0x7bfe('0x9'),_0xce0bae);}},'provider':{'type':Sequelize['ENUM'](_0x7bfe('0xa'),_0x7bfe('0xb'),_0x7bfe('0xc'),_0x7bfe('0xd')),'defaultValue':null,'get':function(){var _0x373aea=this[_0x7bfe('0xe')](_0x7bfe('0xf'));return _0x373aea||_0x7bfe('0x10');},'set':function(_0x1c7b6b){if(_0x1c7b6b===_0x7bfe('0x10')){_0x1c7b6b=null;}return this['setDataValue']('provider',_0x1c7b6b);}}};
\ No newline at end of file
+var _0x3776=['Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}<br/>Subject\x20:\x20{{message.subject}}','BOOLEAN','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','setDataValue','mandatoryDisposition','ENUM','gmail','hotmail','outlook365','getDataValue','provider','sequelize','exports','STRING','TEXT','Arial,Helvetica,sans-serif','INTEGER','UNSIGNED'];(function(_0x51e8e8,_0xed25d0){var _0x436a82=function(_0x2b775d){while(--_0x2b775d){_0x51e8e8['push'](_0x51e8e8['shift']());}};_0x436a82(++_0xed25d0);}(_0x3776,0x111));var _0x6377=function(_0x5c72ee,_0x5a8bf8){_0x5c72ee=_0x5c72ee-0x0;var _0x231876=_0x3776[_0x5c72ee];return _0x231876;};'use strict';var Sequelize=require(_0x6377('0x0'));module[_0x6377('0x1')]={'description':{'type':Sequelize[_0x6377('0x2')]},'name':{'type':Sequelize['STRING'],'allowNull':![]},'service':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'email':{'type':Sequelize[_0x6377('0x2')],'validate':{'isEmail':!![]}},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'key':{'type':Sequelize[_0x6377('0x2')],'allowNull':![]},'template':{'type':Sequelize[_0x6377('0x3')]},'markAsUnread':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'fontFamily':{'type':Sequelize[_0x6377('0x2')],'allowNull':![],'defaultValue':_0x6377('0x4')},'fontSize':{'type':Sequelize[_0x6377('0x5')](0x2)[_0x6377('0x6')],'defaultValue':0xd,'validate':{'min':0x8,'max':0x48}},'notificationTemplate':{'type':Sequelize['TEXT'],'defaultValue':function(){return _0x6377('0x7');}},'notificationSound':{'type':Sequelize[_0x6377('0x8')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x6377('0x8')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x6377('0x5')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0x6377('0x5')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x6377('0x8')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x6377('0x5')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x6377('0x8')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x6377('0x5')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x6377('0x5')],'allowNull':!![],'defaultValue':null,'comment':_0x6377('0x9')},'mandatoryDisposition':{'type':Sequelize[_0x6377('0x8')],'defaultValue':![],'comment':_0x6377('0xa'),'set':function(_0x3ea833){if(!_0x3ea833)this['setDataValue'](_0x6377('0xb'),null);this[_0x6377('0xc')](_0x6377('0xd'),_0x3ea833);}},'provider':{'type':Sequelize[_0x6377('0xe')](_0x6377('0xf'),_0x6377('0x10'),'yahoo',_0x6377('0x11')),'defaultValue':null,'get':function(){var _0x383aae=this[_0x6377('0x12')](_0x6377('0x13'));return _0x383aae||'custom';},'set':function(_0x315a1e){if(_0x315a1e==='custom'){_0x315a1e=null;}return this[_0x6377('0xc')](_0x6377('0x13'),_0x315a1e);}}};
\ No newline at end of file
index 8125b2b..0b3a02b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3e19=['show','find','body','provider','custom','params','Mail\x20Account\x20not\x20found','describe','MailAccountId','Disposition','create','getDispositions','findOne','hasOwnProperty','rows','removeDispositions','CannedAnswer','getAnswers','removeAnswers','ids','ListId','active','description','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','UserProfileResource','getImap','addImap','removeImap','setImap','getSmtp','addSmtp','removeSmtp','MailInteraction','addInteraction','omit','getInteractions','CmContact','Contact','User','fullname','internal','tag','sequelize','transaction','Transaction','ISOLATION_LEVELS','READ_COMMITTED','MailApplication','bulkCreate','findAndCountAll','priority','finally','getApplications','getMessages','MailMessage','$gte','split','YYYY-MM-DD\x20HH:mm:ss','inlineCss','true','CmList','List','Contacts','updatedAt','CloudProvider','Smtp\x20configuration\x20not\x20found','isNil','from','format','email','attachments','join','root','server/files/attachments','getSmtpOptions','SendMail','sendMail','List\x20not\x20found','messageId','subject','out','verifySmtp','ValidationError','You\x20can\x27t\x20remove\x20the\x20mail\x20service\x20account','addAgents','spread','userMailAccount:save','removeAgents','isArray','emit','userMailAccount:remove','getAgents','bluebird','path','lodash','juice','ioredis','../../components/parsers/qs','../../config/logger','api','../../mysqldb','redis','defaults','socket.io-emitter','./mailAccount.socket','jayson/promise','client','request','then','MailAccount,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','sendStatus','status','end','json','offset','limit','Content-Range','update','destroy','MailAccounts','stack','name','send','imap.gmail.com','yahoo','imap.mail.yahoo.com','imap-mail.outlook.com','outlook365','outlook.office365.com','smtp.gmail.com','hotmail','smtp.office365.com','Unknown\x20email\x20service\x20provider','user','username','password','pass','modernAuthentication','CloudProviderId','port','host','secure','service','authentication','Imap','Smtp','index','MailServerIn','MailServerOut','Pause','mandatoryDispositionPause','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','options','MailAccount','count','includeAll','include','findAll','catch'];(function(_0x313079,_0x2b9220){var _0x3f6cf8=function(_0x1d1dd8){while(--_0x1d1dd8){_0x313079['push'](_0x313079['shift']());}};_0x3f6cf8(++_0x2b9220);}(_0x3e19,0x1da));var _0x93e1=function(_0xa4f636,_0xaca1b6){_0xa4f636=_0xa4f636-0x0;var _0x37e02a=_0x3e19[_0xa4f636];return _0x37e02a;};'use strict';var moment=require('moment');var BPromise=require(_0x93e1('0x0'));var util=require('util');var path=require(_0x93e1('0x1'));var _=require(_0x93e1('0x2'));var juice=require(_0x93e1('0x3'));var Redis=require(_0x93e1('0x4'));var qs=require(_0x93e1('0x5'));var logger=require(_0x93e1('0x6'))(_0x93e1('0x7'));var config=require('../../config/environment');var db=require(_0x93e1('0x8'))['db'];config[_0x93e1('0x9')]=_[_0x93e1('0xa')](config[_0x93e1('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0x93e1('0xb'))(new Redis(config[_0x93e1('0x9')]));require(_0x93e1('0xc'))['register'](socket);var jayson=require(_0x93e1('0xd'));var client=jayson[_0x93e1('0xe')]['http']({'port':0x232b});function respondWithRpcPromise(_0x1f3b0c,_0xe67838,_0x3bb6db,_0x27b02d){return new BPromise(function(_0x1e2f08,_0x74c34b){var _0x216298=_0x27b02d||client;return _0x216298[_0x93e1('0xf')](_0x1f3b0c,_0x3bb6db)[_0x93e1('0x10')](function(_0x8480d6){logger['info'](_0x93e1('0x11'),_0xe67838,_0x93e1('0x12'));logger['debug']('MailAccount,\x20%s,\x20%s,\x20%s',_0xe67838,_0x93e1('0x12'),JSON[_0x93e1('0x13')](_0x8480d6));if(_0x8480d6[_0x93e1('0x14')]){if(_0x8480d6[_0x93e1('0x14')][_0x93e1('0x15')]===0x1f4){logger['error'](_0x93e1('0x11'),_0xe67838,_0x8480d6['error'][_0x93e1('0x16')]);return _0x74c34b(_0x8480d6[_0x93e1('0x14')][_0x93e1('0x16')]);}logger['error'](_0x93e1('0x11'),_0xe67838,_0x8480d6[_0x93e1('0x14')]['message']);return _0x1e2f08(_0x8480d6['error'][_0x93e1('0x16')]);}else{logger[_0x93e1('0x17')]('MailAccount,\x20%s,\x20%s',_0xe67838,_0x93e1('0x12'));_0x1e2f08(_0x8480d6['result'][_0x93e1('0x16')]);}})['catch'](function(_0x4ec6c0){logger['error'](_0x93e1('0x11'),_0xe67838,_0x4ec6c0);_0x74c34b(_0x4ec6c0);});});}function respondWithStatusCode(_0x1b9093,_0x53be61){_0x53be61=_0x53be61||0xcc;return function(_0x3db61e){if(_0x3db61e){return _0x1b9093[_0x93e1('0x18')](_0x53be61);}return _0x1b9093[_0x93e1('0x19')](_0x53be61)[_0x93e1('0x1a')]();};}function respondWithResult(_0x3ce920,_0x3b641){_0x3b641=_0x3b641||0xc8;return function(_0x225fa6){if(_0x225fa6){return _0x3ce920[_0x93e1('0x19')](_0x3b641)[_0x93e1('0x1b')](_0x225fa6);}};}function respondWithFilteredResult(_0x55abaa,_0x4ee840){return function(_0xe30bc1){if(_0xe30bc1){var _0x414b4b=typeof _0x4ee840[_0x93e1('0x1c')]==='undefined'&&typeof _0x4ee840['limit']==='undefined';var _0x2a5a3e=_0xe30bc1['count'];var _0x464882=_0x414b4b?0x0:_0x4ee840[_0x93e1('0x1c')];var _0x15be12=_0x414b4b?_0xe30bc1['count']:_0x4ee840[_0x93e1('0x1c')]+_0x4ee840[_0x93e1('0x1d')];var _0x308d7e;if(_0x15be12>=_0x2a5a3e){_0x15be12=_0x2a5a3e;_0x308d7e=0xc8;}else{_0x308d7e=0xce;}_0x55abaa['status'](_0x308d7e);return _0x55abaa['set'](_0x93e1('0x1e'),_0x464882+'-'+_0x15be12+'/'+_0x2a5a3e)['json'](_0xe30bc1);}return null;};}function saveUpdates(_0x29e9ba){return function(_0x33e525){if(_0x33e525){return _0x33e525[_0x93e1('0x1f')](_0x29e9ba)[_0x93e1('0x10')](function(_0xed549b){return _0xed549b;});}return null;};}function removeEntity(_0x4ab3a8){return function(_0x3697e9){if(_0x3697e9){return _0x3697e9[_0x93e1('0x20')]()[_0x93e1('0x10')](function(){var _0x2554c7=_0x3697e9['get']({'plain':!![]});var _0x3581c1=_0x93e1('0x21');return db['UserProfileResource'][_0x93e1('0x20')]({'where':{'type':_0x3581c1,'resourceId':_0x2554c7['id']}})[_0x93e1('0x10')](function(){return _0x3697e9;});})[_0x93e1('0x10')](function(){_0x4ab3a8[_0x93e1('0x19')](0xcc)[_0x93e1('0x1a')]();});}};}function handleEntityNotFound(_0x1426a2){return function(_0x3256df){if(!_0x3256df){_0x1426a2[_0x93e1('0x18')](0x194);}return _0x3256df;};}function handleError(_0x151455,_0x529dda){_0x529dda=_0x529dda||0x1f4;return function(_0x496092){logger['error'](_0x496092[_0x93e1('0x22')]);if(_0x496092[_0x93e1('0x23')]){delete _0x496092[_0x93e1('0x23')];}_0x151455['status'](_0x529dda)[_0x93e1('0x24')](_0x496092);};}function getImapHost(_0x3e84a4){switch(_0x3e84a4){case'gmail':return _0x93e1('0x25');case _0x93e1('0x26'):return _0x93e1('0x27');case'hotmail':return _0x93e1('0x28');case _0x93e1('0x29'):return _0x93e1('0x2a');}throw new Error('Unknown\x20email\x20service\x20provider',_0x3e84a4);}function getSmtpHost(_0x30b14d){switch(_0x30b14d){case'gmail':return _0x93e1('0x2b');case _0x93e1('0x26'):return'smtp.mail.yahoo.com';case _0x93e1('0x2c'):return'smtp-mail.outlook.com';case'outlook365':return _0x93e1('0x2d');}throw new Error(_0x93e1('0x2e'),_0x30b14d);}function getAuthenticationOptions(_0xf6a7f8,_0x459256){var _0x2cc931={};var _0x2bc714={};if(_0xf6a7f8){_0x2cc931[_0x93e1('0x2f')]=_0x2bc714[_0x93e1('0x2f')]=_0x459256[_0x93e1('0x30')];_0x2cc931[_0x93e1('0x31')]=_0x2bc714[_0x93e1('0x32')]=_0x459256['password'];if(_0x459256[_0x93e1('0x33')]){_0x2cc931[_0x93e1('0x33')]=_0x2bc714[_0x93e1('0x33')]=!![];_0x2cc931['CloudProviderId']=_0x2bc714['CloudProviderId']=_0x459256['CloudProviderId'];_0x2cc931[_0x93e1('0x31')]=_0x2bc714[_0x93e1('0x32')]=null;}else{_0x2cc931['CloudProviderId']=_0x2bc714[_0x93e1('0x34')]=null;}_0x2cc931['host']=getImapHost(_0xf6a7f8);_0x2cc931[_0x93e1('0x35')]=0x3e1;_0x2bc714[_0x93e1('0x36')]=getSmtpHost(_0xf6a7f8);_0x2bc714['port']=0x24b;_0x2bc714[_0x93e1('0x37')]=![];_0x2cc931[_0x93e1('0x38')]=_0x2bc714[_0x93e1('0x38')]=null;}else{if(_0x459256[_0x93e1('0x39')]){_0x2cc931['user']=_0x2bc714['user']=_0x459256[_0x93e1('0x30')];_0x2cc931[_0x93e1('0x31')]=_0x2bc714['pass']=_0x459256['password'];}else{_0x2cc931[_0x93e1('0x39')]=_0x2bc714[_0x93e1('0x39')]=![];_0x2cc931[_0x93e1('0x2f')]=_0x2bc714[_0x93e1('0x2f')]=null;_0x2cc931[_0x93e1('0x31')]=_0x2bc714[_0x93e1('0x32')]=null;}_0x2cc931[_0x93e1('0x36')]=_0x459256['Imap']['host'];_0x2cc931[_0x93e1('0x35')]=_0x459256[_0x93e1('0x3a')][_0x93e1('0x35')];_0x2bc714[_0x93e1('0x36')]=_0x459256[_0x93e1('0x3b')]['host'];_0x2bc714[_0x93e1('0x35')]=_0x459256[_0x93e1('0x3b')][_0x93e1('0x35')];}return{'Imap':_0x2cc931,'Smtp':_0x2bc714};}exports[_0x93e1('0x3c')]=function(_0x52b8bb,_0x5775d3){var _0x2364a8={'include':[{'model':db[_0x93e1('0x3d')],'as':_0x93e1('0x3a')},{'model':db[_0x93e1('0x3e')],'as':'Smtp'},{'model':db[_0x93e1('0x3f')],'as':_0x93e1('0x40')}]},_0x39b940={},_0x43377f={'count':0x0,'rows':[]};var _0x7bb971=_[_0x93e1('0x41')](db['MailAccount'][_0x93e1('0x42')],function(_0x26d5eb){return{'name':_0x26d5eb[_0x93e1('0x43')],'type':_0x26d5eb[_0x93e1('0x44')][_0x93e1('0x45')]};});_0x39b940[_0x93e1('0x46')]=_[_0x93e1('0x41')](_0x7bb971,_0x93e1('0x23'));_0x39b940[_0x93e1('0x47')]=_[_0x93e1('0x48')](_0x52b8bb[_0x93e1('0x47')]);_0x39b940[_0x93e1('0x49')]=_['intersection'](_0x39b940[_0x93e1('0x46')],_0x39b940[_0x93e1('0x47')]);_0x2364a8['attributes']=_[_0x93e1('0x4a')](_0x39b940[_0x93e1('0x46')],qs[_0x93e1('0x4b')](_0x52b8bb[_0x93e1('0x47')][_0x93e1('0x4b')]));_0x2364a8[_0x93e1('0x4c')]=_0x2364a8['attributes'][_0x93e1('0x4d')]?_0x2364a8[_0x93e1('0x4c')]:_0x39b940[_0x93e1('0x46')];if(!_0x52b8bb[_0x93e1('0x47')]['hasOwnProperty'](_0x93e1('0x4e'))){_0x2364a8[_0x93e1('0x1d')]=qs[_0x93e1('0x1d')](_0x52b8bb[_0x93e1('0x47')][_0x93e1('0x1d')]);_0x2364a8[_0x93e1('0x1c')]=qs[_0x93e1('0x1c')](_0x52b8bb[_0x93e1('0x47')]['offset']);}_0x2364a8[_0x93e1('0x4f')]=qs[_0x93e1('0x50')](_0x52b8bb[_0x93e1('0x47')]['sort']);_0x2364a8[_0x93e1('0x51')]=qs[_0x93e1('0x49')](_[_0x93e1('0x52')](_0x52b8bb[_0x93e1('0x47')],_0x39b940[_0x93e1('0x49')]),_0x7bb971);if(_0x52b8bb[_0x93e1('0x47')][_0x93e1('0x53')]){_0x2364a8['where']=_['merge'](_0x2364a8[_0x93e1('0x51')],{'$or':_['map'](_0x7bb971,function(_0x174508){if(_0x174508[_0x93e1('0x44')]!==_0x93e1('0x54')){var _0x339845={};_0x339845[_0x174508[_0x93e1('0x23')]]={'$like':'%'+_0x52b8bb[_0x93e1('0x47')][_0x93e1('0x53')]+'%'};return _0x339845;}})});}_0x2364a8=_[_0x93e1('0x55')]({},_0x2364a8,_0x52b8bb[_0x93e1('0x56')]);var _0x3253b2={'where':_0x2364a8[_0x93e1('0x51')]};return db[_0x93e1('0x57')][_0x93e1('0x58')](_0x3253b2)[_0x93e1('0x10')](function(_0x25c29f){_0x43377f[_0x93e1('0x58')]=_0x25c29f;if(_0x52b8bb['query'][_0x93e1('0x59')]){_0x2364a8[_0x93e1('0x5a')]=[{'all':!![]}];}return db[_0x93e1('0x57')][_0x93e1('0x5b')](_0x2364a8);})[_0x93e1('0x10')](function(_0x1e95aa){_0x43377f['rows']=_0x1e95aa;return _0x43377f;})[_0x93e1('0x10')](respondWithFilteredResult(_0x5775d3,_0x2364a8))[_0x93e1('0x5c')](handleError(_0x5775d3,null));};exports[_0x93e1('0x5d')]=function(_0x2c122c,_0x590c1d){var _0x36e645={'raw':![],'where':{'id':_0x2c122c['params']['id']},'include':[{'model':db[_0x93e1('0x3d')],'as':_0x93e1('0x3a')},{'model':db[_0x93e1('0x3e')],'as':'Smtp'},{'model':db[_0x93e1('0x3f')],'as':_0x93e1('0x40')}]},_0x3e9126={};_0x3e9126['model']=_[_0x93e1('0x48')](db[_0x93e1('0x57')][_0x93e1('0x42')]);_0x3e9126[_0x93e1('0x47')]=_[_0x93e1('0x48')](_0x2c122c['query']);_0x3e9126[_0x93e1('0x49')]=_['intersection'](_0x3e9126[_0x93e1('0x46')],_0x3e9126[_0x93e1('0x47')]);_0x36e645[_0x93e1('0x4c')]=_[_0x93e1('0x4a')](_0x3e9126['model'],qs[_0x93e1('0x4b')](_0x2c122c[_0x93e1('0x47')]['fields']));_0x36e645[_0x93e1('0x4c')]=_0x36e645[_0x93e1('0x4c')]['length']?_0x36e645['attributes']:_0x3e9126[_0x93e1('0x46')];if(_0x2c122c['query'][_0x93e1('0x59')]){_0x36e645[_0x93e1('0x5a')]=[{'all':!![]}];}_0x36e645=_[_0x93e1('0x55')]({},_0x36e645,_0x2c122c[_0x93e1('0x56')]);return db['MailAccount'][_0x93e1('0x5e')](_0x36e645)['then'](handleEntityNotFound(_0x590c1d,null))[_0x93e1('0x10')](respondWithResult(_0x590c1d,null))[_0x93e1('0x5c')](handleError(_0x590c1d,null));};exports[_0x93e1('0x1f')]=function(_0xc4cc9f,_0x10c7d8){if(_0xc4cc9f[_0x93e1('0x5f')]['id']){delete _0xc4cc9f['body']['id'];}var _0x59a723=_0xc4cc9f[_0x93e1('0x5f')][_0x93e1('0x60')]===_0x93e1('0x61')?null:_0xc4cc9f[_0x93e1('0x5f')][_0x93e1('0x60')];var _0x5635e5=_0xc4cc9f[_0x93e1('0x5f')]['Imap']||{};var _0x3679db=_0xc4cc9f['body'][_0x93e1('0x3b')]||{};if(_0x59a723){_0x5635e5['host']=getImapHost(_0x59a723);_0x5635e5[_0x93e1('0x35')]=0x3e1;_0x3679db['host']=getSmtpHost(_0x59a723);_0x3679db[_0x93e1('0x35')]=0x24b;_0x3679db[_0x93e1('0x37')]=![];}if(_0x3679db[_0x93e1('0x33')]){_0x3679db['secure']=![];}else{_0x3679db[_0x93e1('0x34')]=null;}if(!_0x5635e5[_0x93e1('0x33')])_0x5635e5[_0x93e1('0x34')]=null;_0xc4cc9f[_0x93e1('0x5f')]['Imap']=_0x5635e5;_0xc4cc9f[_0x93e1('0x5f')][_0x93e1('0x3b')]=_0x3679db;return db['MailAccount']['find']({'where':{'id':_0xc4cc9f[_0x93e1('0x62')]['id']},'include':[{'model':db['MailServerIn'],'as':_0x93e1('0x3a')},{'model':db[_0x93e1('0x3e')],'as':_0x93e1('0x3b')},{'model':db[_0x93e1('0x3f')],'as':_0x93e1('0x40')}]})[_0x93e1('0x10')](handleEntityNotFound(_0x10c7d8,null))[_0x93e1('0x10')](function(_0x7287be){if(!_0x7287be)throw new Error(_0x93e1('0x63'));if(_0x7287be['service'])delete _0xc4cc9f[_0x93e1('0x5f')][_0x93e1('0x3a')];return _0x7287be;})['then'](saveUpdates(_0xc4cc9f[_0x93e1('0x5f')],null))['then'](function(_0x27363b){if(!_0xc4cc9f[_0x93e1('0x5f')][_0x93e1('0x3a')])return _0x27363b;return db[_0x93e1('0x3d')][_0x93e1('0x1f')](_0xc4cc9f[_0x93e1('0x5f')][_0x93e1('0x3a')],{'where':{'MailAccountId':_0x27363b['id']}})[_0x93e1('0x10')](function(){return _0x27363b;});})[_0x93e1('0x10')](function(_0x59e1b7){if(!_0xc4cc9f[_0x93e1('0x5f')]['Smtp'])return _0x59e1b7;return db[_0x93e1('0x3e')]['update'](_0xc4cc9f['body'][_0x93e1('0x3b')],{'where':{'MailAccountId':_0x59e1b7['id']}})[_0x93e1('0x10')](function(){return _0x59e1b7;});})['then'](respondWithResult(_0x10c7d8,null))[_0x93e1('0x5c')](handleError(_0x10c7d8,null));};exports['describe']=function(_0x68d376,_0x2a2092){return db[_0x93e1('0x57')][_0x93e1('0x64')]()[_0x93e1('0x10')](respondWithResult(_0x2a2092,null))[_0x93e1('0x5c')](handleError(_0x2a2092,null));};exports['addDisposition']=function(_0x31bd75,_0x2cb7b7){if(_0x31bd75['body']['id']){delete _0x31bd75[_0x93e1('0x5f')]['id'];}return db[_0x93e1('0x57')]['find']({'where':{'id':_0x31bd75[_0x93e1('0x62')]['id']}})[_0x93e1('0x10')](handleEntityNotFound(_0x2cb7b7,null))[_0x93e1('0x10')](function(_0x13f463){if(_0x13f463){_0x31bd75[_0x93e1('0x5f')][_0x93e1('0x65')]=_0x13f463['id'];return db[_0x93e1('0x66')][_0x93e1('0x67')](_0x31bd75['body']);}})[_0x93e1('0x10')](respondWithResult(_0x2cb7b7,null))['catch'](handleError(_0x2cb7b7,null));};exports[_0x93e1('0x68')]=function(_0x3f8c93,_0xbc7b5b){var _0x37c2bc={'raw':![],'where':{}};var _0x525b01={};var _0x5c4879={'count':0x0,'rows':[]};return db[_0x93e1('0x57')][_0x93e1('0x69')]({'where':{'id':_0x3f8c93['params']['id']}})[_0x93e1('0x10')](handleEntityNotFound(_0xbc7b5b,null))['then'](function(_0x16bfbf){if(_0x16bfbf){_0x525b01[_0x93e1('0x46')]=_[_0x93e1('0x48')](db[_0x93e1('0x66')][_0x93e1('0x42')]);_0x525b01[_0x93e1('0x47')]=_['keys'](_0x3f8c93[_0x93e1('0x47')]);_0x525b01[_0x93e1('0x49')]=_[_0x93e1('0x4a')](_0x525b01[_0x93e1('0x46')],_0x525b01[_0x93e1('0x47')]);_0x37c2bc[_0x93e1('0x4c')]=_[_0x93e1('0x4a')](_0x525b01['model'],qs[_0x93e1('0x4b')](_0x3f8c93['query']['fields']));_0x37c2bc[_0x93e1('0x4c')]=_0x37c2bc['attributes'][_0x93e1('0x4d')]?_0x37c2bc[_0x93e1('0x4c')]:_0x525b01[_0x93e1('0x46')];if(!_0x3f8c93[_0x93e1('0x47')][_0x93e1('0x6a')](_0x93e1('0x4e'))){_0x37c2bc[_0x93e1('0x1d')]=qs['limit'](_0x3f8c93[_0x93e1('0x47')][_0x93e1('0x1d')]);_0x37c2bc[_0x93e1('0x1c')]=qs[_0x93e1('0x1c')](_0x3f8c93[_0x93e1('0x47')][_0x93e1('0x1c')]);}_0x37c2bc['order']=qs[_0x93e1('0x50')](_0x3f8c93['query'][_0x93e1('0x50')]);_0x37c2bc[_0x93e1('0x51')]=qs[_0x93e1('0x49')](_[_0x93e1('0x52')](_0x3f8c93[_0x93e1('0x47')],_0x525b01['filters']));_0x37c2bc['where'][_0x93e1('0x65')]=_0x16bfbf['id'];if(_0x3f8c93['query'][_0x93e1('0x53')]){_0x37c2bc[_0x93e1('0x51')]=_['merge'](_0x37c2bc['where'],{'$or':_[_0x93e1('0x41')](_0x37c2bc[_0x93e1('0x4c')],function(_0x1169b8){var _0x11111e={};_0x11111e[_0x1169b8]={'$like':'%'+_0x3f8c93[_0x93e1('0x47')]['filter']+'%'};return _0x11111e;})});}_0x37c2bc=_[_0x93e1('0x55')]({},_0x37c2bc,_0x3f8c93[_0x93e1('0x56')]);return db[_0x93e1('0x66')][_0x93e1('0x58')]({'where':_0x37c2bc[_0x93e1('0x51')]})[_0x93e1('0x10')](function(_0x5326e8){_0x5c4879[_0x93e1('0x58')]=_0x5326e8;if(_0x3f8c93['query'][_0x93e1('0x59')]){_0x37c2bc[_0x93e1('0x5a')]=[{'all':!![]}];}return db[_0x93e1('0x66')][_0x93e1('0x5b')](_0x37c2bc);})[_0x93e1('0x10')](function(_0x29e418){_0x5c4879[_0x93e1('0x6b')]=_0x29e418;return _0x5c4879;});}})[_0x93e1('0x10')](respondWithFilteredResult(_0xbc7b5b,_0x37c2bc))[_0x93e1('0x5c')](handleError(_0xbc7b5b,null));};exports['removeDispositions']=function(_0x66f37c,_0x1d8d80){return db[_0x93e1('0x57')][_0x93e1('0x5e')]({'where':{'id':_0x66f37c[_0x93e1('0x62')]['id']}})[_0x93e1('0x10')](handleEntityNotFound(_0x1d8d80,null))[_0x93e1('0x10')](function(_0x58b069){if(_0x58b069){return _0x58b069[_0x93e1('0x6c')](_0x66f37c[_0x93e1('0x47')]['ids']);}})[_0x93e1('0x10')](respondWithStatusCode(_0x1d8d80,null))[_0x93e1('0x5c')](handleError(_0x1d8d80,null));};exports['addAnswer']=function(_0x1ac56c,_0x539497){if(_0x1ac56c[_0x93e1('0x5f')]['id']){delete _0x1ac56c[_0x93e1('0x5f')]['id'];}return db[_0x93e1('0x57')][_0x93e1('0x5e')]({'where':{'id':_0x1ac56c[_0x93e1('0x62')]['id']}})['then'](handleEntityNotFound(_0x539497,null))['then'](function(_0x3445c7){if(_0x3445c7){_0x1ac56c[_0x93e1('0x5f')][_0x93e1('0x65')]=_0x3445c7['id'];return db[_0x93e1('0x6d')][_0x93e1('0x67')](_0x1ac56c[_0x93e1('0x5f')]);}})[_0x93e1('0x10')](respondWithResult(_0x539497,null))['catch'](handleError(_0x539497,null));};exports[_0x93e1('0x6e')]=function(_0x2cdf9d,_0x3ef76d){var _0x53c31a={'raw':![],'where':{}};var _0x1c963a={};var _0x4bbda7={'count':0x0,'rows':[]};return db[_0x93e1('0x57')]['findOne']({'where':{'id':_0x2cdf9d['params']['id']}})[_0x93e1('0x10')](handleEntityNotFound(_0x3ef76d,null))['then'](function(_0x4b84f7){if(_0x4b84f7){_0x1c963a[_0x93e1('0x46')]=_[_0x93e1('0x48')](db[_0x93e1('0x6d')][_0x93e1('0x42')]);_0x1c963a['query']=_[_0x93e1('0x48')](_0x2cdf9d[_0x93e1('0x47')]);_0x1c963a[_0x93e1('0x49')]=_[_0x93e1('0x4a')](_0x1c963a[_0x93e1('0x46')],_0x1c963a[_0x93e1('0x47')]);_0x53c31a['attributes']=_[_0x93e1('0x4a')](_0x1c963a[_0x93e1('0x46')],qs['fields'](_0x2cdf9d[_0x93e1('0x47')][_0x93e1('0x4b')]));_0x53c31a['attributes']=_0x53c31a[_0x93e1('0x4c')]['length']?_0x53c31a[_0x93e1('0x4c')]:_0x1c963a[_0x93e1('0x46')];if(!_0x2cdf9d[_0x93e1('0x47')][_0x93e1('0x6a')](_0x93e1('0x4e'))){_0x53c31a[_0x93e1('0x1d')]=qs[_0x93e1('0x1d')](_0x2cdf9d[_0x93e1('0x47')][_0x93e1('0x1d')]);_0x53c31a[_0x93e1('0x1c')]=qs['offset'](_0x2cdf9d['query']['offset']);}_0x53c31a[_0x93e1('0x4f')]=qs[_0x93e1('0x50')](_0x2cdf9d[_0x93e1('0x47')][_0x93e1('0x50')]);_0x53c31a['where']=qs[_0x93e1('0x49')](_['pick'](_0x2cdf9d['query'],_0x1c963a[_0x93e1('0x49')]));_0x53c31a[_0x93e1('0x51')][_0x93e1('0x65')]=_0x4b84f7['id'];if(_0x2cdf9d[_0x93e1('0x47')]['filter']){_0x53c31a['where']=_[_0x93e1('0x55')](_0x53c31a[_0x93e1('0x51')],{'$or':_[_0x93e1('0x41')](_0x53c31a[_0x93e1('0x4c')],function(_0x41a1c6){var _0x51e175={};_0x51e175[_0x41a1c6]={'$like':'%'+_0x2cdf9d['query'][_0x93e1('0x53')]+'%'};return _0x51e175;})});}_0x53c31a=_['merge']({},_0x53c31a,_0x2cdf9d[_0x93e1('0x56')]);return db[_0x93e1('0x6d')][_0x93e1('0x58')]({'where':_0x53c31a[_0x93e1('0x51')]})['then'](function(_0x3fb5e8){_0x4bbda7[_0x93e1('0x58')]=_0x3fb5e8;if(_0x2cdf9d[_0x93e1('0x47')][_0x93e1('0x59')]){_0x53c31a['include']=[{'all':!![]}];}return db[_0x93e1('0x6d')][_0x93e1('0x5b')](_0x53c31a);})[_0x93e1('0x10')](function(_0x54ac8e){_0x4bbda7['rows']=_0x54ac8e;return _0x4bbda7;});}})[_0x93e1('0x10')](respondWithFilteredResult(_0x3ef76d,_0x53c31a))[_0x93e1('0x5c')](handleError(_0x3ef76d,null));};exports[_0x93e1('0x6f')]=function(_0x1304f2,_0x4997e9){return db['MailAccount'][_0x93e1('0x5e')]({'where':{'id':_0x1304f2['params']['id']}})[_0x93e1('0x10')](handleEntityNotFound(_0x4997e9,null))[_0x93e1('0x10')](function(_0x397537){if(_0x397537){return _0x397537[_0x93e1('0x6f')](_0x1304f2[_0x93e1('0x47')][_0x93e1('0x70')]);}})[_0x93e1('0x10')](respondWithStatusCode(_0x4997e9,null))[_0x93e1('0x5c')](handleError(_0x4997e9,null));};exports['create']=function(_0x334e26,_0x2192ac){var _0x544fc2={'name':_0x334e26[_0x93e1('0x5f')][_0x93e1('0x23')],'key':_0x334e26[_0x93e1('0x5f')][_0x93e1('0x45')],'provider':_0x334e26[_0x93e1('0x5f')][_0x93e1('0x60')]===_0x93e1('0x61')?null:_0x334e26[_0x93e1('0x5f')][_0x93e1('0x60')],'email':_0x334e26[_0x93e1('0x5f')]['email'],'ListId':_0x334e26[_0x93e1('0x5f')][_0x93e1('0x71')],'active':!_['isNil'](_0x334e26[_0x93e1('0x5f')][_0x93e1('0x72')])?_0x334e26[_0x93e1('0x5f')][_0x93e1('0x72')]:!![],'description':_0x334e26[_0x93e1('0x5f')][_0x93e1('0x73')]||null};var _0x12ce6d=getAuthenticationOptions(_0x544fc2[_0x93e1('0x60')],_0x334e26[_0x93e1('0x5f')]);_0x544fc2[_0x93e1('0x3a')]=_0x12ce6d['Imap'];_0x544fc2[_0x93e1('0x3b')]=_0x12ce6d[_0x93e1('0x3b')];return db['MailAccount'][_0x93e1('0x67')](_0x544fc2,{'include':[{'model':db[_0x93e1('0x3e')],'as':'Smtp'},{'model':db[_0x93e1('0x3d')],'as':_0x93e1('0x3a')}]})['then'](function(_0xbaa25c){var _0x44fd31=_0x334e26[_0x93e1('0x2f')][_0x93e1('0x74')]({'plain':!![]});if(!_0x44fd31)throw new Error(_0x93e1('0x75'));if(_0x44fd31[_0x93e1('0x76')]===_0x93e1('0x2f')){var _0x404204=_0xbaa25c[_0x93e1('0x74')]({'plain':!![]});return db[_0x93e1('0x77')][_0x93e1('0x5e')]({'where':{'name':_0x93e1('0x21'),'userProfileId':_0x44fd31['userProfileId']},'raw':!![]})['then'](function(_0x401b3f){if(_0x401b3f&&_0x401b3f[_0x93e1('0x78')]===0x0){return db[_0x93e1('0x79')][_0x93e1('0x67')]({'name':_0x404204['name'],'resourceId':_0x404204['id'],'type':_0x401b3f[_0x93e1('0x23')],'sectionId':_0x401b3f['id']},{})[_0x93e1('0x10')](function(){return _0xbaa25c;});}else{return _0xbaa25c;}})[_0x93e1('0x5c')](function(_0x2776b2){logger[_0x93e1('0x14')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x2776b2);throw _0x2776b2;});}return _0xbaa25c;})[_0x93e1('0x10')](respondWithResult(_0x2192ac,0xc9))[_0x93e1('0x5c')](handleError(_0x2192ac,null));};exports[_0x93e1('0x7a')]=function(_0x47d0f4,_0x2223cb){return db[_0x93e1('0x57')]['findOne']({'where':{'id':_0x47d0f4['params']['id']}})[_0x93e1('0x10')](handleEntityNotFound(_0x2223cb,null))[_0x93e1('0x10')](function(_0x533492){if(_0x533492){return _0x533492[_0x93e1('0x7a')]();}return null;})[_0x93e1('0x10')](respondWithResult(_0x2223cb,null))['catch'](handleError(_0x2223cb,null));};exports[_0x93e1('0x7b')]=function(_0x2650dc,_0x5f4e93){if(_0x2650dc[_0x93e1('0x5f')]['id']){delete _0x2650dc[_0x93e1('0x5f')]['id'];}return db['MailAccount'][_0x93e1('0x5e')]({'where':{'id':_0x2650dc['params']['id']}})[_0x93e1('0x10')](handleEntityNotFound(_0x5f4e93,null))[_0x93e1('0x10')](function(_0x48dfed){if(_0x48dfed){_0x2650dc['body'][_0x93e1('0x65')]=_0x48dfed['id'];return db[_0x93e1('0x3d')][_0x93e1('0x67')](_0x2650dc[_0x93e1('0x5f')]);}})[_0x93e1('0x10')](respondWithResult(_0x5f4e93,null))[_0x93e1('0x5c')](handleError(_0x5f4e93,null));};exports[_0x93e1('0x7c')]=function(_0x276bd9,_0x529363){return db[_0x93e1('0x57')][_0x93e1('0x69')]({'where':{'id':_0x276bd9[_0x93e1('0x62')]['id']}})[_0x93e1('0x10')](handleEntityNotFound(_0x529363,null))['then'](function(_0x31b7fb){if(_0x31b7fb){return _0x31b7fb[_0x93e1('0x7d')](null);}return null;})['then'](respondWithStatusCode(_0x529363,null))[_0x93e1('0x5c')](handleError(_0x529363,null));};exports[_0x93e1('0x7e')]=function(_0x3176a9,_0x25f8f3){return db['MailAccount'][_0x93e1('0x69')]({'where':{'id':_0x3176a9['params']['id']}})[_0x93e1('0x10')](handleEntityNotFound(_0x25f8f3,null))['then'](function(_0x558451){if(_0x558451){return _0x558451[_0x93e1('0x7e')]();}return null;})[_0x93e1('0x10')](respondWithResult(_0x25f8f3,null))[_0x93e1('0x5c')](handleError(_0x25f8f3,null));};exports[_0x93e1('0x7f')]=function(_0x3c88ae,_0x191725){if(_0x3c88ae[_0x93e1('0x5f')]['id']){delete _0x3c88ae['body']['id'];}return db[_0x93e1('0x57')]['find']({'where':{'id':_0x3c88ae[_0x93e1('0x62')]['id']}})[_0x93e1('0x10')](handleEntityNotFound(_0x191725,null))[_0x93e1('0x10')](function(_0x212e70){if(_0x212e70){_0x3c88ae[_0x93e1('0x5f')]['MailAccountId']=_0x212e70['id'];return db[_0x93e1('0x3e')][_0x93e1('0x67')](_0x3c88ae[_0x93e1('0x5f')]);}})[_0x93e1('0x10')](respondWithResult(_0x191725,null))[_0x93e1('0x5c')](handleError(_0x191725,null));};exports[_0x93e1('0x80')]=function(_0x2389ab,_0x216685){return db[_0x93e1('0x57')][_0x93e1('0x69')]({'where':{'id':_0x2389ab[_0x93e1('0x62')]['id']}})['then'](handleEntityNotFound(_0x216685,null))[_0x93e1('0x10')](function(_0x1a948d){if(_0x1a948d){return _0x1a948d['setSmtp'](null);}return null;})[_0x93e1('0x10')](respondWithStatusCode(_0x216685,null))[_0x93e1('0x5c')](handleError(_0x216685,null));};exports['addInteraction']=function(_0x5a2a1c,_0x1d4836){return db[_0x93e1('0x81')][_0x93e1('0x5e')]({'where':{'id':_0x5a2a1c[_0x93e1('0x62')]['id']}})[_0x93e1('0x10')](handleEntityNotFound(_0x1d4836,null))[_0x93e1('0x10')](function(_0x16c935){if(_0x16c935){return _0x16c935[_0x93e1('0x82')](_0x5a2a1c[_0x93e1('0x5f')][_0x93e1('0x70')],_[_0x93e1('0x83')](_0x5a2a1c[_0x93e1('0x5f')],[_0x93e1('0x70'),'id'])||{});}})['then'](respondWithResult(_0x1d4836,null))[_0x93e1('0x5c')](handleError(_0x1d4836,null));};exports[_0x93e1('0x84')]=function(_0x576250,_0x3c483c){var _0x198902={'raw':![],'where':{}};var _0x4970c0={};var _0x762512={'count':0x0,'rows':[]};return db[_0x93e1('0x57')]['findOne']({'where':{'id':_0x576250[_0x93e1('0x62')]['id']}})[_0x93e1('0x10')](handleEntityNotFound(_0x3c483c,null))['then'](function(_0xdc53a5){if(_0xdc53a5){_0x4970c0['model']=_[_0x93e1('0x48')](db[_0x93e1('0x81')][_0x93e1('0x42')]);_0x4970c0['query']=_[_0x93e1('0x48')](_0x576250[_0x93e1('0x47')]);_0x4970c0[_0x93e1('0x49')]=_[_0x93e1('0x4a')](_0x4970c0[_0x93e1('0x46')],_0x4970c0['query']);_0x198902[_0x93e1('0x4c')]=_[_0x93e1('0x4a')](_0x4970c0[_0x93e1('0x46')],qs[_0x93e1('0x4b')](_0x576250[_0x93e1('0x47')][_0x93e1('0x4b')]));_0x198902[_0x93e1('0x4c')]=_0x198902[_0x93e1('0x4c')][_0x93e1('0x4d')]?_0x198902[_0x93e1('0x4c')]:_0x4970c0[_0x93e1('0x46')];if(!_0x576250['query']['hasOwnProperty']('nolimit')){_0x198902['limit']=qs[_0x93e1('0x1d')](_0x576250[_0x93e1('0x47')][_0x93e1('0x1d')]);_0x198902[_0x93e1('0x1c')]=qs[_0x93e1('0x1c')](_0x576250[_0x93e1('0x47')][_0x93e1('0x1c')]);}_0x198902[_0x93e1('0x4f')]=qs[_0x93e1('0x50')](_0x576250[_0x93e1('0x47')][_0x93e1('0x50')]);_0x198902[_0x93e1('0x51')]=qs[_0x93e1('0x49')](_['pick'](_0x576250[_0x93e1('0x47')],_0x4970c0[_0x93e1('0x49')]));_0x198902['where'][_0x93e1('0x65')]=_0xdc53a5['id'];if(_0x576250[_0x93e1('0x47')][_0x93e1('0x53')]){_0x198902['where']=_[_0x93e1('0x55')](_0x198902[_0x93e1('0x51')],{'$or':_['map'](_0x198902['attributes'],function(_0x496201){var _0x5b78c2={};_0x5b78c2[_0x496201]={'$like':'%'+_0x576250[_0x93e1('0x47')]['filter']+'%'};return _0x5b78c2;})});}_0x198902=_[_0x93e1('0x55')]({},_0x198902,_0x576250['options']);return db[_0x93e1('0x81')]['count']({'where':_0x198902[_0x93e1('0x51')]})[_0x93e1('0x10')](function(_0x1f2a9e){_0x762512[_0x93e1('0x58')]=_0x1f2a9e;if(_0x576250['query'][_0x93e1('0x59')]){_0x198902[_0x93e1('0x5a')]=[{'model':db[_0x93e1('0x85')],'as':_0x93e1('0x86'),'required':![]},{'model':db[_0x93e1('0x87')],'as':'Owner','attributes':[_0x93e1('0x23'),_0x93e1('0x88'),_0x93e1('0x89')],'required':![]},{'model':db['Tag'],'as':'Tags','attributes':['id','name','color'],'where':_0x576250[_0x93e1('0x47')]['tag']?{'id':_0x576250[_0x93e1('0x47')][_0x93e1('0x8a')]}:undefined,'required':_0x576250[_0x93e1('0x47')][_0x93e1('0x8a')]?!![]:![]}];}return db[_0x93e1('0x81')]['findAll'](_0x198902);})[_0x93e1('0x10')](function(_0x3e14a1){_0x762512[_0x93e1('0x6b')]=_0x3e14a1;return _0x762512;});}})[_0x93e1('0x10')](respondWithFilteredResult(_0x3c483c,_0x198902))[_0x93e1('0x5c')](handleError(_0x3c483c,null));};exports['addApplications']=function addApplications(_0x4a0b7b,_0x87058b){var _0x816c22=_0x4a0b7b[_0x93e1('0x62')]['id'];var _0x34f1c9=_0x4a0b7b[_0x93e1('0x5f')];var _0x242eb1=0xc8;var _0x13d676=null;return db[_0x93e1('0x8b')][_0x93e1('0x8c')]({'isolationLevel':db['sequelize'][_0x93e1('0x8d')][_0x93e1('0x8e')][_0x93e1('0x8f')]},function(_0x5684b9){return db[_0x93e1('0x57')][_0x93e1('0x69')]({'where':{'id':_0x816c22},'transaction':_0x5684b9})['then'](function(_0x33572a){if(_0x33572a){return db[_0x93e1('0x90')]['destroy']({'where':{'MailAccountId':_0x816c22},'transaction':_0x5684b9})[_0x93e1('0x10')](function(){var _0x4bc950=_[_0x93e1('0x41')](_0x34f1c9,function(_0x1858ce){_0x1858ce['MailAccountId']=_0x816c22;return _0x1858ce;});return db[_0x93e1('0x90')][_0x93e1('0x91')](_0x4bc950,{'transaction':_0x5684b9});});}else{_0x242eb1=0x194;_0x13d676=[];}});})[_0x93e1('0x10')](function(){if(_0x242eb1!==0x194){return db[_0x93e1('0x90')][_0x93e1('0x92')]({'where':{'MailAccountId':_0x816c22},'order':_0x93e1('0x93')})[_0x93e1('0x10')](function(_0x4a897e){_0x13d676=_0x4a897e;});}})['catch'](function(_0xd4bc21){_0x242eb1=0x1f4;logger[_0x93e1('0x14')](_0xd4bc21['stack']);if(_0xd4bc21[_0x93e1('0x23')]){delete _0xd4bc21['name'];}_0x13d676=_0xd4bc21;})[_0x93e1('0x94')](function(){if(_0x13d676===null){_0x87058b[_0x93e1('0x18')](_0x242eb1);}else{if(_0x242eb1===0x1f4){_0x87058b[_0x93e1('0x19')](_0x242eb1)[_0x93e1('0x24')](_0x13d676);}else{_0x87058b[_0x93e1('0x19')](_0x242eb1)['json'](_0x13d676);}}});};exports[_0x93e1('0x95')]=function(_0xde7b38,_0x5ab223){var _0x49af14={};var _0xd3e700={};var _0x31412b;var _0x7c5db7;return db[_0x93e1('0x57')][_0x93e1('0x69')]({'where':{'id':_0xde7b38[_0x93e1('0x62')]['id']}})[_0x93e1('0x10')](handleEntityNotFound(_0x5ab223,null))[_0x93e1('0x10')](function(_0x1e0561){if(_0x1e0561){_0x31412b=_0x1e0561;_0xd3e700[_0x93e1('0x46')]=_[_0x93e1('0x48')](db[_0x93e1('0x90')]['rawAttributes']);_0xd3e700[_0x93e1('0x47')]=_['keys'](_0xde7b38[_0x93e1('0x47')]);_0xd3e700[_0x93e1('0x49')]=_[_0x93e1('0x4a')](_0xd3e700['model'],_0xd3e700[_0x93e1('0x47')]);_0x49af14[_0x93e1('0x4c')]=_['intersection'](_0xd3e700[_0x93e1('0x46')],qs[_0x93e1('0x4b')](_0xde7b38[_0x93e1('0x47')]['fields']));_0x49af14['attributes']=_0x49af14[_0x93e1('0x4c')][_0x93e1('0x4d')]?_0x49af14[_0x93e1('0x4c')]:_0xd3e700[_0x93e1('0x46')];_0x49af14[_0x93e1('0x4f')]=qs[_0x93e1('0x50')](_0xde7b38['query'][_0x93e1('0x50')]);_0x49af14[_0x93e1('0x51')]=qs[_0x93e1('0x49')](_['pick'](_0xde7b38[_0x93e1('0x47')],_0xd3e700['filters']));if(_0xde7b38['query'][_0x93e1('0x53')]){_0x49af14[_0x93e1('0x51')]=_['merge'](_0x49af14['where'],{'$or':_[_0x93e1('0x41')](_0x49af14[_0x93e1('0x4c')],function(_0x21c246){var _0x452f8d={};_0x452f8d[_0x21c246]={'$like':'%'+_0xde7b38['query'][_0x93e1('0x53')]+'%'};return _0x452f8d;})});}_0x49af14=_[_0x93e1('0x55')]({},_0x49af14,_0xde7b38[_0x93e1('0x56')]);return _0x31412b['getApplications'](_0x49af14);}})[_0x93e1('0x10')](function(_0x2f7722){if(_0x2f7722){_0x7c5db7=_0x2f7722[_0x93e1('0x4d')];if(!_0xde7b38[_0x93e1('0x47')][_0x93e1('0x6a')](_0x93e1('0x4e'))){_0x49af14[_0x93e1('0x1d')]=qs[_0x93e1('0x1d')](_0xde7b38[_0x93e1('0x47')]['limit']);_0x49af14[_0x93e1('0x1c')]=qs[_0x93e1('0x1c')](_0xde7b38[_0x93e1('0x47')][_0x93e1('0x1c')]);}return _0x31412b[_0x93e1('0x95')](_0x49af14);}})[_0x93e1('0x10')](function(_0xc5ef4b){if(_0xc5ef4b){return _0xc5ef4b?{'count':_0x7c5db7,'rows':_0xc5ef4b}:null;}})['then'](respondWithResult(_0x5ab223,null))['catch'](handleError(_0x5ab223,null));};exports[_0x93e1('0x96')]=function(_0x56646c,_0x5b69f9){var _0x5cf7a1={'raw':!![],'where':{}};var _0x35c2ca={};var _0x25c10f={'count':0x0,'rows':[]};return db[_0x93e1('0x57')][_0x93e1('0x69')]({'where':{'id':_0x56646c[_0x93e1('0x62')]['id']}})[_0x93e1('0x10')](handleEntityNotFound(_0x5b69f9,null))[_0x93e1('0x10')](function(_0x582935){if(_0x582935){_0x35c2ca['model']=_['keys'](db[_0x93e1('0x97')][_0x93e1('0x42')]);_0x35c2ca[_0x93e1('0x47')]=_['keys'](_0x56646c[_0x93e1('0x47')]);_0x35c2ca[_0x93e1('0x49')]=_[_0x93e1('0x4a')](_0x35c2ca['model'],_0x35c2ca[_0x93e1('0x47')]);_0x5cf7a1[_0x93e1('0x4c')]=_['intersection'](_0x35c2ca[_0x93e1('0x46')],qs[_0x93e1('0x4b')](_0x56646c['query'][_0x93e1('0x4b')]));_0x5cf7a1[_0x93e1('0x4c')]=_0x5cf7a1[_0x93e1('0x4c')]['length']?_0x5cf7a1[_0x93e1('0x4c')]:_0x35c2ca[_0x93e1('0x46')];if(!_0x56646c[_0x93e1('0x47')][_0x93e1('0x6a')](_0x93e1('0x4e'))){_0x5cf7a1['limit']=qs[_0x93e1('0x1d')](_0x56646c[_0x93e1('0x47')][_0x93e1('0x1d')]);_0x5cf7a1[_0x93e1('0x1c')]=qs[_0x93e1('0x1c')](_0x56646c[_0x93e1('0x47')][_0x93e1('0x1c')]);}_0x5cf7a1[_0x93e1('0x4f')]=qs[_0x93e1('0x50')](_0x56646c['query'][_0x93e1('0x50')]);_0x5cf7a1[_0x93e1('0x51')]=qs[_0x93e1('0x49')](_[_0x93e1('0x52')](_0x56646c[_0x93e1('0x47')],_0x35c2ca[_0x93e1('0x49')]));_0x5cf7a1[_0x93e1('0x51')][_0x93e1('0x65')]=_0x582935['id'];if(_0x56646c[_0x93e1('0x47')]['filter']){_0x5cf7a1['where']=_[_0x93e1('0x55')](_0x5cf7a1['where'],{'$or':_[_0x93e1('0x41')](_0x5cf7a1[_0x93e1('0x4c')],function(_0x55679a){var _0x561f7b={};_0x561f7b[_0x55679a]={'$like':'%'+_0x56646c['query'][_0x93e1('0x53')]+'%'};return _0x561f7b;})});}if(_0x56646c[_0x93e1('0x47')]['$gte']){var _0x348cab=_0x56646c[_0x93e1('0x47')][_0x93e1('0x98')][_0x93e1('0x99')](',');var _0x4d331a={};_0x4d331a[_0x348cab[0x0]]={'$gte':moment(_0x348cab[0x1])['format'](_0x93e1('0x9a'))};_0x5cf7a1[_0x93e1('0x51')]=_[_0x93e1('0x55')](_0x5cf7a1['where'],_0x4d331a);}_0x5cf7a1=_[_0x93e1('0x55')]({},_0x5cf7a1,_0x56646c[_0x93e1('0x56')]);return db[_0x93e1('0x97')][_0x93e1('0x58')]({'where':_0x5cf7a1[_0x93e1('0x51')]})[_0x93e1('0x10')](function(_0x251ff3){_0x25c10f[_0x93e1('0x58')]=_0x251ff3;if(_0x56646c[_0x93e1('0x47')][_0x93e1('0x59')]){_0x5cf7a1[_0x93e1('0x5a')]=[{'all':!![]}];}return db[_0x93e1('0x97')][_0x93e1('0x5b')](_0x5cf7a1);})[_0x93e1('0x10')](function(_0x29929d){if(_0x56646c[_0x93e1('0x47')][_0x93e1('0x9b')]===_0x93e1('0x9c')){for(var _0x4d34f6=0x0;_0x4d34f6<_0x29929d[_0x93e1('0x4d')];_0x4d34f6++){_0x29929d[_0x4d34f6][_0x93e1('0x5f')]=juice(_0x29929d[_0x4d34f6][_0x93e1('0x5f')]);}}_0x25c10f['rows']=_0x29929d;return _0x25c10f;});}})[_0x93e1('0x10')](respondWithFilteredResult(_0x5b69f9,_0x5cf7a1))[_0x93e1('0x5c')](handleError(_0x5b69f9,null));};exports[_0x93e1('0x24')]=function(_0x4ae19d,_0x1f1256){var _0x3e6d99,_0xe5c726={},_0x404ddb;if(_0x4ae19d[_0x93e1('0x5f')]['to']){_0x404ddb=_0x4ae19d[_0x93e1('0x5f')]['to'][_0x93e1('0x99')](',')[0x0];}return db['MailAccount'][_0x93e1('0x5e')]({'where':{'id':_0x4ae19d[_0x93e1('0x62')]['id']},'include':[{'model':db[_0x93e1('0x9d')],'as':_0x93e1('0x9e'),'include':[{'model':db[_0x93e1('0x85')],'as':_0x93e1('0x9f'),'where':{'email':_0x404ddb},'limit':0x1,'order':[[_0x93e1('0xa0'),'DESC']]}]},{'model':db[_0x93e1('0x3e')],'as':'Smtp','raw':!![],'include':[{'model':db[_0x93e1('0xa1')],'as':_0x93e1('0xa1'),'raw':!![]}]}]})[_0x93e1('0x10')](handleEntityNotFound(_0x1f1256,null))[_0x93e1('0x10')](function(_0xd8efe8){if(!_0xd8efe8)return;_0x3e6d99=_0xd8efe8;if(!_0xd8efe8[_0x93e1('0x3b')])throw new Error(_0x93e1('0xa2'));if(_[_0x93e1('0xa3')](_0x4ae19d[_0x93e1('0x5f')][_0x93e1('0xa4')])){_0x4ae19d['body'][_0x93e1('0xa4')]=util[_0x93e1('0xa5')]('%s\x20<%s>',_0xd8efe8['name'],_0xd8efe8[_0x93e1('0xa6')]||_0xd8efe8[_0x93e1('0x3b')][_0x93e1('0x2f')]);}if(_0x4ae19d['body'][_0x93e1('0xa7')]&&_0x4ae19d[_0x93e1('0x5f')][_0x93e1('0xa7')][_0x93e1('0x4d')]){for(var _0xbba029=0x0;_0xbba029<_0x4ae19d['body'][_0x93e1('0xa7')][_0x93e1('0x4d')];_0xbba029+=0x1){_0x4ae19d['body']['attachments'][_0xbba029]={'filename':_0x4ae19d['body'][_0x93e1('0xa7')][_0xbba029][_0x93e1('0x23')],'path':path[_0x93e1('0xa8')](config[_0x93e1('0xa9')],_0x93e1('0xaa'),_0x4ae19d['body'][_0x93e1('0xa7')][_0xbba029]['basename'])};}}var _0x8a8153=_0xd8efe8[_0x93e1('0xab')]();return respondWithRpcPromise(_0x93e1('0xac'),_0x93e1('0xad'),{'account':_0x8a8153,'message':_0x4ae19d[_0x93e1('0x5f')]});})[_0x93e1('0x10')](function(_0x1ddd9b){if(!_0x1ddd9b)return;_0xe5c726=_0x1ddd9b;if(!_0x3e6d99['List'])throw new Error(_0x93e1('0xae'));if(_0x3e6d99['List'][_0x93e1('0x9f')][_0x93e1('0x4d')])return _0x3e6d99[_0x93e1('0x9e')][_0x93e1('0x9f')][0x0];return db[_0x93e1('0x85')]['create'](_[_0x93e1('0xa')](_0x4ae19d['body'],{'firstName':_0x4ae19d['body']['to'],'email':_0x4ae19d['body']['to'],'phone':_0x4ae19d[_0x93e1('0x5f')]['to'],'ListId':_0x3e6d99[_0x93e1('0x71')]}));})[_0x93e1('0x10')](function(_0x24d6f4){if(!_0x24d6f4)return;var _0x57012c={'UserId':_0x4ae19d['user']['id'],'ContactId':_0x24d6f4['id'],'MailAccountId':_0x3e6d99['id'],'inReplyTo':_0xe5c726[_0x93e1('0xaf')],'to':_0x4ae19d[_0x93e1('0x5f')][_0x93e1('0xa4')],'cc':_0x4ae19d[_0x93e1('0x5f')]['cc'],'subject':_0x4ae19d[_0x93e1('0x5f')][_0x93e1('0xb0')],'attach':_0x4ae19d[_0x93e1('0x5f')]['attach'],'firstMsgDirection':_0x93e1('0xb1'),'lastMsgAt':moment()[_0x93e1('0xa5')](_0x93e1('0x9a')),'lastMsgDirection':_0x93e1('0xb1'),'Messages':[_['merge'](_0x4ae19d['body'],{'messageId':_0xe5c726['messageId'],'sentAt':moment()['format'](_0x93e1('0x9a')),'read':!![],'MailAccountId':_0x3e6d99['id'],'UserId':_0x4ae19d[_0x93e1('0x2f')]['id'],'ContactId':_0x24d6f4['id']})]};if(_0x4ae19d['body']['Interaction']){_0x57012c=_[_0x93e1('0x55')](_0x57012c,_0x4ae19d[_0x93e1('0x5f')]['Interaction']);}return db[_0x93e1('0x81')]['create'](_0x57012c,{'include':[{'model':db[_0x93e1('0x97')],'as':'Messages'}]});})[_0x93e1('0x10')](respondWithResult(_0x1f1256,null))[_0x93e1('0x5c')](handleError(_0x1f1256,null));};exports['verifySmtp']=function(_0x18a39b,_0x20fbab){return db[_0x93e1('0x57')]['find']({'where':{'id':_0x18a39b[_0x93e1('0x62')]['id']},'include':[{'model':db[_0x93e1('0x3e')],'as':_0x93e1('0x3b'),'raw':!![],'include':[{'model':db['CloudProvider'],'as':_0x93e1('0xa1'),'raw':!![]}]}]})['then'](handleEntityNotFound(_0x20fbab,null))[_0x93e1('0x10')](function(_0x2a7ee6){if(!_0x2a7ee6[_0x93e1('0x3b')])return;var _0x4ce823=_0x2a7ee6[_0x93e1('0xab')]();return respondWithRpcPromise('VerifySmtp',_0x93e1('0xb2'),{'account':_0x4ce823});})[_0x93e1('0x10')](respondWithResult(_0x20fbab,null))['catch'](handleError(_0x20fbab,null));};exports[_0x93e1('0x20')]=function(_0x579994,_0x413c42){return db[_0x93e1('0x57')][_0x93e1('0x5e')]({'where':{'id':_0x579994[_0x93e1('0x62')]['id']}})[_0x93e1('0x10')](handleEntityNotFound(_0x413c42,null))['then'](function(_0x37da3d){if(_0x37da3d&&_0x37da3d[_0x93e1('0x38')]){throw new db['Sequelize'][(_0x93e1('0xb3'))](_0x93e1('0xb4'));}return _0x37da3d;})[_0x93e1('0x10')](removeEntity(_0x413c42,null))['catch'](handleError(_0x413c42,null));};exports['addAgents']=function(_0x3d85ba,_0x4d4408){return db[_0x93e1('0x57')][_0x93e1('0x5e')]({'where':{'id':_0x3d85ba[_0x93e1('0x62')]['id']}})[_0x93e1('0x10')](handleEntityNotFound(_0x4d4408,null))[_0x93e1('0x10')](function(_0x1d99aa){if(_0x1d99aa){return _0x1d99aa[_0x93e1('0xb5')](_0x3d85ba['body'][_0x93e1('0x70')],_['omit'](_0x3d85ba[_0x93e1('0x5f')],[_0x93e1('0x70'),'id'])||{})[_0x93e1('0xb6')](function(_0x22681d){for(var _0x3a6681=0x0;_0x3a6681<_0x3d85ba[_0x93e1('0x5f')][_0x93e1('0x70')][_0x93e1('0x4d')];_0x3a6681+=0x1){socket['emit'](_0x93e1('0xb7'),{'UserId':Number(_0x3d85ba['body'][_0x93e1('0x70')][_0x3a6681]),'MailAccountId':Number(_0x3d85ba[_0x93e1('0x62')]['id'])});}return _0x22681d;});}})['then'](respondWithResult(_0x4d4408,null))['catch'](handleError(_0x4d4408,null));};exports[_0x93e1('0xb8')]=function(_0x5ba0d9,_0x2cffa0){return db[_0x93e1('0x57')][_0x93e1('0x5e')]({'where':{'id':_0x5ba0d9[_0x93e1('0x62')]['id']}})['then'](handleEntityNotFound(_0x2cffa0,null))['then'](function(_0x1df07f){if(_0x1df07f){return _0x1df07f[_0x93e1('0xb8')](_0x5ba0d9[_0x93e1('0x47')][_0x93e1('0x70')])['then'](function(){if(_[_0x93e1('0xb9')](_0x5ba0d9[_0x93e1('0x47')]['ids'])){for(var _0x8d1c1b=0x0;_0x8d1c1b<_0x5ba0d9[_0x93e1('0x47')][_0x93e1('0x70')][_0x93e1('0x4d')];_0x8d1c1b+=0x1){socket[_0x93e1('0xba')](_0x93e1('0xbb'),{'UserId':Number(_0x5ba0d9[_0x93e1('0x47')][_0x93e1('0x70')][_0x8d1c1b]),'MailAccountId':Number(_0x5ba0d9[_0x93e1('0x62')]['id'])});}}else{socket[_0x93e1('0xba')]('userMailAccount:remove',{'UserId':Number(_0x5ba0d9[_0x93e1('0x47')][_0x93e1('0x70')]),'MailAccountId':Number(_0x5ba0d9[_0x93e1('0x62')]['id'])});}});}})[_0x93e1('0x10')](respondWithStatusCode(_0x2cffa0,null))[_0x93e1('0x5c')](handleError(_0x2cffa0,null));};exports['getAgents']=function(_0x371f67,_0x171513){var _0x46f4a1={};var _0x39315c={};var _0x58629f;var _0x38f18c;return db[_0x93e1('0x57')][_0x93e1('0x69')]({'where':{'id':_0x371f67[_0x93e1('0x62')]['id']}})[_0x93e1('0x10')](handleEntityNotFound(_0x171513,null))[_0x93e1('0x10')](function(_0x56487d){if(_0x56487d){_0x58629f=_0x56487d;_0x39315c[_0x93e1('0x46')]=_[_0x93e1('0x48')](db[_0x93e1('0x87')]['rawAttributes']);_0x39315c[_0x93e1('0x47')]=_[_0x93e1('0x48')](_0x371f67[_0x93e1('0x47')]);_0x39315c[_0x93e1('0x49')]=_['intersection'](_0x39315c[_0x93e1('0x46')],_0x39315c[_0x93e1('0x47')]);_0x46f4a1[_0x93e1('0x4c')]=_['intersection'](_0x39315c[_0x93e1('0x46')],qs[_0x93e1('0x4b')](_0x371f67[_0x93e1('0x47')][_0x93e1('0x4b')]));_0x46f4a1['attributes']=_0x46f4a1[_0x93e1('0x4c')][_0x93e1('0x4d')]?_0x46f4a1['attributes']:_0x39315c[_0x93e1('0x46')];_0x46f4a1[_0x93e1('0x4f')]=qs[_0x93e1('0x50')](_0x371f67[_0x93e1('0x47')][_0x93e1('0x50')]);_0x46f4a1['where']=qs[_0x93e1('0x49')](_[_0x93e1('0x52')](_0x371f67[_0x93e1('0x47')],_0x39315c['filters']));if(_0x371f67[_0x93e1('0x47')][_0x93e1('0x53')]){_0x46f4a1['where']=_[_0x93e1('0x55')](_0x46f4a1[_0x93e1('0x51')],{'$or':_[_0x93e1('0x41')](_0x46f4a1[_0x93e1('0x4c')],function(_0x3e125d){var _0x50b182={};_0x50b182[_0x3e125d]={'$like':'%'+_0x371f67[_0x93e1('0x47')][_0x93e1('0x53')]+'%'};return _0x50b182;})});}_0x46f4a1=_['merge']({},_0x46f4a1,_0x371f67[_0x93e1('0x56')]);return _0x58629f[_0x93e1('0xbc')](_0x46f4a1);}})[_0x93e1('0x10')](function(_0x599346){if(_0x599346){_0x38f18c=_0x599346[_0x93e1('0x4d')];if(!_0x371f67[_0x93e1('0x47')][_0x93e1('0x6a')]('nolimit')){_0x46f4a1[_0x93e1('0x1d')]=qs[_0x93e1('0x1d')](_0x371f67[_0x93e1('0x47')][_0x93e1('0x1d')]);_0x46f4a1[_0x93e1('0x1c')]=qs[_0x93e1('0x1c')](_0x371f67[_0x93e1('0x47')]['offset']);}return _0x58629f[_0x93e1('0xbc')](_0x46f4a1);}})[_0x93e1('0x10')](function(_0x29fdd4){if(_0x29fdd4){return _0x29fdd4?{'count':_0x38f18c,'rows':_0x29fdd4}:null;}})[_0x93e1('0x10')](respondWithResult(_0x171513,null))[_0x93e1('0x5c')](handleError(_0x171513,null));};
\ No newline at end of file
+var _0x544e=['merge','VIRTUAL','includeAll','findAll','show','MailServerIn','MailServerOut','options','find','update','body','provider','Mail\x20Account\x20not\x20found','describe','addDisposition','params','MailAccountId','findOne','Disposition','pick','include','rows','removeDispositions','addAnswer','CannedAnswer','create','getAnswers','removeAnswers','ids','custom','email','ListId','isNil','active','description','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getImap','addImap','removeImap','setImap','getSmtp','addSmtp','removeSmtp','addInteraction','MailInteraction','getInteractions','CmContact','User','fullname','internal','Tags','tag','sequelize','transaction','Transaction','ISOLATION_LEVELS','MailApplication','bulkCreate','priority','finally','getApplications','getMessages','MailMessage','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','true','CmList','Contacts','DESC','CloudProvider','Smtp\x20configuration\x20not\x20found','%s\x20<%s>','attachments','join','root','basename','getSmtpOptions','sendMail','List','messageId','subject','attach','out','Interaction','Messages','VerifySmtp','verifySmtp','Sequelize','ValidationError','addAgents','omit','emit','userMailAccount:save','removeAgents','isArray','userMailAccount:remove','getAgents','moment','bluebird','util','path','lodash','juice','ioredis','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./mailAccount.socket','register','jayson/promise','client','http','request','info','MailAccount,\x20%s,\x20%s','request\x20sent','MailAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','then','MailAccounts','UserProfileResource','destroy','end','stack','name','send','gmail','yahoo','imap-mail.outlook.com','outlook365','outlook.office365.com','Unknown\x20email\x20service\x20provider','smtp.gmail.com','hotmail','smtp-mail.outlook.com','smtp.office365.com','user','username','password','modernAuthentication','CloudProviderId','pass','port','host','secure','service','authentication','Smtp','index','Imap','Pause','mandatoryDispositionPause','MailAccount','rawAttributes','fieldName','type','key','map','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter'];(function(_0x45c02a,_0x486a46){var _0x5edbd7=function(_0x2fdb3b){while(--_0x2fdb3b){_0x45c02a['push'](_0x45c02a['shift']());}};_0x5edbd7(++_0x486a46);}(_0x544e,0x130));var _0xe544=function(_0x582e91,_0x3e7018){_0x582e91=_0x582e91-0x0;var _0x24752e=_0x544e[_0x582e91];return _0x24752e;};'use strict';var moment=require(_0xe544('0x0'));var BPromise=require(_0xe544('0x1'));var util=require(_0xe544('0x2'));var path=require(_0xe544('0x3'));var _=require(_0xe544('0x4'));var juice=require(_0xe544('0x5'));var Redis=require(_0xe544('0x6'));var qs=require('../../components/parsers/qs');var logger=require(_0xe544('0x7'))(_0xe544('0x8'));var config=require(_0xe544('0x9'));var db=require(_0xe544('0xa'))['db'];config[_0xe544('0xb')]=_[_0xe544('0xc')](config[_0xe544('0xb')],{'host':_0xe544('0xd'),'port':0x18eb});var socket=require(_0xe544('0xe'))(new Redis(config[_0xe544('0xb')]));require(_0xe544('0xf'))[_0xe544('0x10')](socket);var jayson=require(_0xe544('0x11'));var client=jayson[_0xe544('0x12')][_0xe544('0x13')]({'port':0x232b});function respondWithRpcPromise(_0x994747,_0x2cdaea,_0x2fd757,_0x1a6173){return new BPromise(function(_0x4ec65d,_0x4fa865){var _0x57be9d=_0x1a6173||client;return _0x57be9d[_0xe544('0x14')](_0x994747,_0x2fd757)['then'](function(_0x3ae2f6){logger[_0xe544('0x15')](_0xe544('0x16'),_0x2cdaea,_0xe544('0x17'));logger['debug'](_0xe544('0x18'),_0x2cdaea,_0xe544('0x17'),JSON[_0xe544('0x19')](_0x3ae2f6));if(_0x3ae2f6[_0xe544('0x1a')]){if(_0x3ae2f6[_0xe544('0x1a')][_0xe544('0x1b')]===0x1f4){logger['error'](_0xe544('0x16'),_0x2cdaea,_0x3ae2f6[_0xe544('0x1a')][_0xe544('0x1c')]);return _0x4fa865(_0x3ae2f6['error'][_0xe544('0x1c')]);}logger[_0xe544('0x1a')](_0xe544('0x16'),_0x2cdaea,_0x3ae2f6['error']['message']);return _0x4ec65d(_0x3ae2f6['error'][_0xe544('0x1c')]);}else{logger[_0xe544('0x15')](_0xe544('0x16'),_0x2cdaea,_0xe544('0x17'));_0x4ec65d(_0x3ae2f6[_0xe544('0x1d')]['message']);}})[_0xe544('0x1e')](function(_0x5d0d62){logger[_0xe544('0x1a')](_0xe544('0x16'),_0x2cdaea,_0x5d0d62);_0x4fa865(_0x5d0d62);});});}function respondWithStatusCode(_0x439c72,_0x8ed011){_0x8ed011=_0x8ed011||0xcc;return function(_0x9a3f46){if(_0x9a3f46){return _0x439c72[_0xe544('0x1f')](_0x8ed011);}return _0x439c72[_0xe544('0x20')](_0x8ed011)['end']();};}function respondWithResult(_0x112c89,_0x55c001){_0x55c001=_0x55c001||0xc8;return function(_0x29859f){if(_0x29859f){return _0x112c89[_0xe544('0x20')](_0x55c001)[_0xe544('0x21')](_0x29859f);}};}function respondWithFilteredResult(_0xf0875f,_0x24f955){return function(_0x1e3218){if(_0x1e3218){var _0x27cac3=typeof _0x24f955[_0xe544('0x22')]===_0xe544('0x23')&&typeof _0x24f955[_0xe544('0x24')]===_0xe544('0x23');var _0x9cf5ee=_0x1e3218[_0xe544('0x25')];var _0x2d6d92=_0x27cac3?0x0:_0x24f955[_0xe544('0x22')];var _0xfa43a0=_0x27cac3?_0x1e3218[_0xe544('0x25')]:_0x24f955[_0xe544('0x22')]+_0x24f955['limit'];var _0x29de86;if(_0xfa43a0>=_0x9cf5ee){_0xfa43a0=_0x9cf5ee;_0x29de86=0xc8;}else{_0x29de86=0xce;}_0xf0875f[_0xe544('0x20')](_0x29de86);return _0xf0875f[_0xe544('0x26')](_0xe544('0x27'),_0x2d6d92+'-'+_0xfa43a0+'/'+_0x9cf5ee)[_0xe544('0x21')](_0x1e3218);}return null;};}function saveUpdates(_0x2defe3){return function(_0x181e58){if(_0x181e58){return _0x181e58['update'](_0x2defe3)['then'](function(_0x2e75f5){return _0x2e75f5;});}return null;};}function removeEntity(_0x7a4818){return function(_0x573b25){if(_0x573b25){return _0x573b25['destroy']()[_0xe544('0x28')](function(){var _0x3aea41=_0x573b25['get']({'plain':!![]});var _0x5437d9=_0xe544('0x29');return db[_0xe544('0x2a')][_0xe544('0x2b')]({'where':{'type':_0x5437d9,'resourceId':_0x3aea41['id']}})[_0xe544('0x28')](function(){return _0x573b25;});})[_0xe544('0x28')](function(){_0x7a4818[_0xe544('0x20')](0xcc)[_0xe544('0x2c')]();});}};}function handleEntityNotFound(_0x5e763a){return function(_0x25db00){if(!_0x25db00){_0x5e763a[_0xe544('0x1f')](0x194);}return _0x25db00;};}function handleError(_0x5e2a9f,_0x25712f){_0x25712f=_0x25712f||0x1f4;return function(_0x4f531e){logger[_0xe544('0x1a')](_0x4f531e[_0xe544('0x2d')]);if(_0x4f531e['name']){delete _0x4f531e[_0xe544('0x2e')];}_0x5e2a9f[_0xe544('0x20')](_0x25712f)[_0xe544('0x2f')](_0x4f531e);};}function getImapHost(_0x52cdf4){switch(_0x52cdf4){case _0xe544('0x30'):return'imap.gmail.com';case _0xe544('0x31'):return'imap.mail.yahoo.com';case'hotmail':return _0xe544('0x32');case _0xe544('0x33'):return _0xe544('0x34');}throw new Error(_0xe544('0x35'),_0x52cdf4);}function getSmtpHost(_0x910b61){switch(_0x910b61){case _0xe544('0x30'):return _0xe544('0x36');case _0xe544('0x31'):return'smtp.mail.yahoo.com';case _0xe544('0x37'):return _0xe544('0x38');case _0xe544('0x33'):return _0xe544('0x39');}throw new Error(_0xe544('0x35'),_0x910b61);}function getAuthenticationOptions(_0x2b659b,_0x579ffe){var _0x379069={};var _0x3f6a40={};if(_0x2b659b){_0x379069[_0xe544('0x3a')]=_0x3f6a40[_0xe544('0x3a')]=_0x579ffe[_0xe544('0x3b')];_0x379069[_0xe544('0x3c')]=_0x3f6a40['pass']=_0x579ffe[_0xe544('0x3c')];if(_0x579ffe[_0xe544('0x3d')]){_0x379069['modernAuthentication']=_0x3f6a40[_0xe544('0x3d')]=!![];_0x379069[_0xe544('0x3e')]=_0x3f6a40[_0xe544('0x3e')]=_0x579ffe[_0xe544('0x3e')];_0x379069[_0xe544('0x3c')]=_0x3f6a40[_0xe544('0x3f')]=null;}else{_0x379069[_0xe544('0x3e')]=_0x3f6a40[_0xe544('0x3e')]=null;}_0x379069['host']=getImapHost(_0x2b659b);_0x379069[_0xe544('0x40')]=0x3e1;_0x3f6a40[_0xe544('0x41')]=getSmtpHost(_0x2b659b);_0x3f6a40[_0xe544('0x40')]=0x24b;_0x3f6a40[_0xe544('0x42')]=![];_0x379069[_0xe544('0x43')]=_0x3f6a40[_0xe544('0x43')]=null;}else{if(_0x579ffe[_0xe544('0x44')]){_0x379069[_0xe544('0x3a')]=_0x3f6a40[_0xe544('0x3a')]=_0x579ffe[_0xe544('0x3b')];_0x379069[_0xe544('0x3c')]=_0x3f6a40['pass']=_0x579ffe['password'];}else{_0x379069[_0xe544('0x44')]=_0x3f6a40['authentication']=![];_0x379069[_0xe544('0x3a')]=_0x3f6a40[_0xe544('0x3a')]=null;_0x379069[_0xe544('0x3c')]=_0x3f6a40[_0xe544('0x3f')]=null;}_0x379069[_0xe544('0x41')]=_0x579ffe['Imap']['host'];_0x379069['port']=_0x579ffe['Imap'][_0xe544('0x40')];_0x3f6a40['host']=_0x579ffe['Smtp']['host'];_0x3f6a40[_0xe544('0x40')]=_0x579ffe[_0xe544('0x45')][_0xe544('0x40')];}return{'Imap':_0x379069,'Smtp':_0x3f6a40};}exports[_0xe544('0x46')]=function(_0x10a8d6,_0x1c56a3){var _0xb7cc4b={'include':[{'model':db['MailServerIn'],'as':_0xe544('0x47')},{'model':db['MailServerOut'],'as':_0xe544('0x45')},{'model':db[_0xe544('0x48')],'as':_0xe544('0x49')}]},_0x1fd18b={},_0x5825e2={'count':0x0,'rows':[]};var _0x26acc9=_['map'](db[_0xe544('0x4a')][_0xe544('0x4b')],function(_0x575ba6){return{'name':_0x575ba6[_0xe544('0x4c')],'type':_0x575ba6[_0xe544('0x4d')][_0xe544('0x4e')]};});_0x1fd18b['model']=_[_0xe544('0x4f')](_0x26acc9,_0xe544('0x2e'));_0x1fd18b[_0xe544('0x50')]=_[_0xe544('0x51')](_0x10a8d6[_0xe544('0x50')]);_0x1fd18b[_0xe544('0x52')]=_[_0xe544('0x53')](_0x1fd18b[_0xe544('0x54')],_0x1fd18b[_0xe544('0x50')]);_0xb7cc4b[_0xe544('0x55')]=_[_0xe544('0x53')](_0x1fd18b[_0xe544('0x54')],qs[_0xe544('0x56')](_0x10a8d6[_0xe544('0x50')][_0xe544('0x56')]));_0xb7cc4b[_0xe544('0x55')]=_0xb7cc4b[_0xe544('0x55')][_0xe544('0x57')]?_0xb7cc4b[_0xe544('0x55')]:_0x1fd18b[_0xe544('0x54')];if(!_0x10a8d6['query'][_0xe544('0x58')](_0xe544('0x59'))){_0xb7cc4b[_0xe544('0x24')]=qs[_0xe544('0x24')](_0x10a8d6[_0xe544('0x50')][_0xe544('0x24')]);_0xb7cc4b['offset']=qs['offset'](_0x10a8d6[_0xe544('0x50')]['offset']);}_0xb7cc4b[_0xe544('0x5a')]=qs[_0xe544('0x5b')](_0x10a8d6[_0xe544('0x50')][_0xe544('0x5b')]);_0xb7cc4b[_0xe544('0x5c')]=qs['filters'](_['pick'](_0x10a8d6[_0xe544('0x50')],_0x1fd18b['filters']),_0x26acc9);if(_0x10a8d6[_0xe544('0x50')][_0xe544('0x5d')]){_0xb7cc4b[_0xe544('0x5c')]=_[_0xe544('0x5e')](_0xb7cc4b[_0xe544('0x5c')],{'$or':_['map'](_0x26acc9,function(_0xe7bd08){if(_0xe7bd08['type']!==_0xe544('0x5f')){var _0x4fbba3={};_0x4fbba3[_0xe7bd08[_0xe544('0x2e')]]={'$like':'%'+_0x10a8d6['query'][_0xe544('0x5d')]+'%'};return _0x4fbba3;}})});}_0xb7cc4b=_[_0xe544('0x5e')]({},_0xb7cc4b,_0x10a8d6['options']);var _0xb11bbe={'where':_0xb7cc4b[_0xe544('0x5c')]};return db['MailAccount'][_0xe544('0x25')](_0xb11bbe)[_0xe544('0x28')](function(_0x1b7c39){_0x5825e2[_0xe544('0x25')]=_0x1b7c39;if(_0x10a8d6['query'][_0xe544('0x60')]){_0xb7cc4b['include']=[{'all':!![]}];}return db['MailAccount'][_0xe544('0x61')](_0xb7cc4b);})[_0xe544('0x28')](function(_0x561a29){_0x5825e2['rows']=_0x561a29;return _0x5825e2;})[_0xe544('0x28')](respondWithFilteredResult(_0x1c56a3,_0xb7cc4b))['catch'](handleError(_0x1c56a3,null));};exports[_0xe544('0x62')]=function(_0x50bb0c,_0x4848a0){var _0x3860ee={'raw':![],'where':{'id':_0x50bb0c['params']['id']},'include':[{'model':db[_0xe544('0x63')],'as':_0xe544('0x47')},{'model':db[_0xe544('0x64')],'as':_0xe544('0x45')},{'model':db[_0xe544('0x48')],'as':'mandatoryDispositionPause'}]},_0x43b51a={};_0x43b51a[_0xe544('0x54')]=_[_0xe544('0x51')](db[_0xe544('0x4a')][_0xe544('0x4b')]);_0x43b51a[_0xe544('0x50')]=_[_0xe544('0x51')](_0x50bb0c[_0xe544('0x50')]);_0x43b51a[_0xe544('0x52')]=_[_0xe544('0x53')](_0x43b51a[_0xe544('0x54')],_0x43b51a[_0xe544('0x50')]);_0x3860ee[_0xe544('0x55')]=_['intersection'](_0x43b51a[_0xe544('0x54')],qs[_0xe544('0x56')](_0x50bb0c['query'][_0xe544('0x56')]));_0x3860ee[_0xe544('0x55')]=_0x3860ee[_0xe544('0x55')][_0xe544('0x57')]?_0x3860ee[_0xe544('0x55')]:_0x43b51a[_0xe544('0x54')];if(_0x50bb0c[_0xe544('0x50')][_0xe544('0x60')]){_0x3860ee['include']=[{'all':!![]}];}_0x3860ee=_['merge']({},_0x3860ee,_0x50bb0c[_0xe544('0x65')]);return db[_0xe544('0x4a')][_0xe544('0x66')](_0x3860ee)[_0xe544('0x28')](handleEntityNotFound(_0x4848a0,null))[_0xe544('0x28')](respondWithResult(_0x4848a0,null))[_0xe544('0x1e')](handleError(_0x4848a0,null));};exports[_0xe544('0x67')]=function(_0x2a29ff,_0x4a361c){if(_0x2a29ff['body']['id']){delete _0x2a29ff[_0xe544('0x68')]['id'];}var _0x17daf4=_0x2a29ff['body'][_0xe544('0x69')]==='custom'?null:_0x2a29ff[_0xe544('0x68')]['provider'];var _0x3b8f9b=_0x2a29ff[_0xe544('0x68')]['Imap']||{};var _0x665275=_0x2a29ff['body'][_0xe544('0x45')]||{};if(_0x17daf4){_0x3b8f9b[_0xe544('0x41')]=getImapHost(_0x17daf4);_0x3b8f9b['port']=0x3e1;_0x665275['host']=getSmtpHost(_0x17daf4);_0x665275[_0xe544('0x40')]=0x24b;_0x665275[_0xe544('0x42')]=![];}if(_0x665275[_0xe544('0x3d')]){_0x665275[_0xe544('0x42')]=![];}else{_0x665275[_0xe544('0x3e')]=null;}if(!_0x3b8f9b[_0xe544('0x3d')])_0x3b8f9b[_0xe544('0x3e')]=null;_0x2a29ff[_0xe544('0x68')][_0xe544('0x47')]=_0x3b8f9b;_0x2a29ff[_0xe544('0x68')][_0xe544('0x45')]=_0x665275;return db[_0xe544('0x4a')]['find']({'where':{'id':_0x2a29ff['params']['id']},'include':[{'model':db[_0xe544('0x63')],'as':_0xe544('0x47')},{'model':db[_0xe544('0x64')],'as':_0xe544('0x45')},{'model':db[_0xe544('0x48')],'as':_0xe544('0x49')}]})[_0xe544('0x28')](handleEntityNotFound(_0x4a361c,null))[_0xe544('0x28')](function(_0x44d2ee){if(!_0x44d2ee)throw new Error(_0xe544('0x6a'));if(_0x44d2ee['service'])delete _0x2a29ff[_0xe544('0x68')][_0xe544('0x47')];return _0x44d2ee;})['then'](saveUpdates(_0x2a29ff[_0xe544('0x68')],null))['then'](function(_0x29a3be){if(!_0x2a29ff[_0xe544('0x68')][_0xe544('0x47')])return _0x29a3be;return db[_0xe544('0x63')][_0xe544('0x67')](_0x2a29ff[_0xe544('0x68')][_0xe544('0x47')],{'where':{'MailAccountId':_0x29a3be['id']}})['then'](function(){return _0x29a3be;});})[_0xe544('0x28')](function(_0x28e3ae){if(!_0x2a29ff[_0xe544('0x68')][_0xe544('0x45')])return _0x28e3ae;return db[_0xe544('0x64')]['update'](_0x2a29ff[_0xe544('0x68')]['Smtp'],{'where':{'MailAccountId':_0x28e3ae['id']}})[_0xe544('0x28')](function(){return _0x28e3ae;});})[_0xe544('0x28')](respondWithResult(_0x4a361c,null))[_0xe544('0x1e')](handleError(_0x4a361c,null));};exports['describe']=function(_0xed330e,_0x5c1d8b){return db[_0xe544('0x4a')][_0xe544('0x6b')]()[_0xe544('0x28')](respondWithResult(_0x5c1d8b,null))[_0xe544('0x1e')](handleError(_0x5c1d8b,null));};exports[_0xe544('0x6c')]=function(_0x2e7957,_0xdd9cf3){if(_0x2e7957[_0xe544('0x68')]['id']){delete _0x2e7957[_0xe544('0x68')]['id'];}return db['MailAccount'][_0xe544('0x66')]({'where':{'id':_0x2e7957[_0xe544('0x6d')]['id']}})[_0xe544('0x28')](handleEntityNotFound(_0xdd9cf3,null))['then'](function(_0x3c5d07){if(_0x3c5d07){_0x2e7957[_0xe544('0x68')][_0xe544('0x6e')]=_0x3c5d07['id'];return db['Disposition']['create'](_0x2e7957[_0xe544('0x68')]);}})['then'](respondWithResult(_0xdd9cf3,null))[_0xe544('0x1e')](handleError(_0xdd9cf3,null));};exports['getDispositions']=function(_0x51ed88,_0x3cbab3){var _0x54569b={'raw':![],'where':{}};var _0x2e5553={};var _0x7b87c1={'count':0x0,'rows':[]};return db['MailAccount'][_0xe544('0x6f')]({'where':{'id':_0x51ed88[_0xe544('0x6d')]['id']}})[_0xe544('0x28')](handleEntityNotFound(_0x3cbab3,null))['then'](function(_0x4c5b3f){if(_0x4c5b3f){_0x2e5553[_0xe544('0x54')]=_['keys'](db[_0xe544('0x70')][_0xe544('0x4b')]);_0x2e5553[_0xe544('0x50')]=_[_0xe544('0x51')](_0x51ed88['query']);_0x2e5553[_0xe544('0x52')]=_[_0xe544('0x53')](_0x2e5553[_0xe544('0x54')],_0x2e5553['query']);_0x54569b[_0xe544('0x55')]=_['intersection'](_0x2e5553[_0xe544('0x54')],qs[_0xe544('0x56')](_0x51ed88[_0xe544('0x50')][_0xe544('0x56')]));_0x54569b['attributes']=_0x54569b['attributes']['length']?_0x54569b['attributes']:_0x2e5553['model'];if(!_0x51ed88['query'][_0xe544('0x58')](_0xe544('0x59'))){_0x54569b[_0xe544('0x24')]=qs[_0xe544('0x24')](_0x51ed88[_0xe544('0x50')][_0xe544('0x24')]);_0x54569b['offset']=qs['offset'](_0x51ed88[_0xe544('0x50')][_0xe544('0x22')]);}_0x54569b[_0xe544('0x5a')]=qs[_0xe544('0x5b')](_0x51ed88['query']['sort']);_0x54569b[_0xe544('0x5c')]=qs[_0xe544('0x52')](_[_0xe544('0x71')](_0x51ed88[_0xe544('0x50')],_0x2e5553['filters']));_0x54569b[_0xe544('0x5c')][_0xe544('0x6e')]=_0x4c5b3f['id'];if(_0x51ed88[_0xe544('0x50')]['filter']){_0x54569b[_0xe544('0x5c')]=_[_0xe544('0x5e')](_0x54569b['where'],{'$or':_[_0xe544('0x4f')](_0x54569b['attributes'],function(_0x43294c){var _0x1a78e4={};_0x1a78e4[_0x43294c]={'$like':'%'+_0x51ed88['query'][_0xe544('0x5d')]+'%'};return _0x1a78e4;})});}_0x54569b=_['merge']({},_0x54569b,_0x51ed88[_0xe544('0x65')]);return db[_0xe544('0x70')][_0xe544('0x25')]({'where':_0x54569b[_0xe544('0x5c')]})[_0xe544('0x28')](function(_0xb29991){_0x7b87c1[_0xe544('0x25')]=_0xb29991;if(_0x51ed88['query'][_0xe544('0x60')]){_0x54569b[_0xe544('0x72')]=[{'all':!![]}];}return db['Disposition'][_0xe544('0x61')](_0x54569b);})[_0xe544('0x28')](function(_0x38ceb8){_0x7b87c1[_0xe544('0x73')]=_0x38ceb8;return _0x7b87c1;});}})[_0xe544('0x28')](respondWithFilteredResult(_0x3cbab3,_0x54569b))[_0xe544('0x1e')](handleError(_0x3cbab3,null));};exports['removeDispositions']=function(_0x4dc68a,_0x141de9){return db['MailAccount'][_0xe544('0x66')]({'where':{'id':_0x4dc68a['params']['id']}})['then'](handleEntityNotFound(_0x141de9,null))[_0xe544('0x28')](function(_0x26562b){if(_0x26562b){return _0x26562b[_0xe544('0x74')](_0x4dc68a[_0xe544('0x50')]['ids']);}})[_0xe544('0x28')](respondWithStatusCode(_0x141de9,null))[_0xe544('0x1e')](handleError(_0x141de9,null));};exports[_0xe544('0x75')]=function(_0x173222,_0x1c11af){if(_0x173222['body']['id']){delete _0x173222['body']['id'];}return db[_0xe544('0x4a')][_0xe544('0x66')]({'where':{'id':_0x173222[_0xe544('0x6d')]['id']}})[_0xe544('0x28')](handleEntityNotFound(_0x1c11af,null))[_0xe544('0x28')](function(_0xf930cc){if(_0xf930cc){_0x173222[_0xe544('0x68')]['MailAccountId']=_0xf930cc['id'];return db[_0xe544('0x76')][_0xe544('0x77')](_0x173222['body']);}})[_0xe544('0x28')](respondWithResult(_0x1c11af,null))[_0xe544('0x1e')](handleError(_0x1c11af,null));};exports[_0xe544('0x78')]=function(_0x2c556a,_0x23a203){var _0x45abf8={'raw':![],'where':{}};var _0x5e9a56={};var _0x43910a={'count':0x0,'rows':[]};return db[_0xe544('0x4a')]['findOne']({'where':{'id':_0x2c556a[_0xe544('0x6d')]['id']}})['then'](handleEntityNotFound(_0x23a203,null))[_0xe544('0x28')](function(_0x2df5ca){if(_0x2df5ca){_0x5e9a56[_0xe544('0x54')]=_['keys'](db[_0xe544('0x76')][_0xe544('0x4b')]);_0x5e9a56[_0xe544('0x50')]=_[_0xe544('0x51')](_0x2c556a['query']);_0x5e9a56[_0xe544('0x52')]=_[_0xe544('0x53')](_0x5e9a56[_0xe544('0x54')],_0x5e9a56['query']);_0x45abf8['attributes']=_['intersection'](_0x5e9a56['model'],qs[_0xe544('0x56')](_0x2c556a[_0xe544('0x50')]['fields']));_0x45abf8[_0xe544('0x55')]=_0x45abf8[_0xe544('0x55')][_0xe544('0x57')]?_0x45abf8[_0xe544('0x55')]:_0x5e9a56[_0xe544('0x54')];if(!_0x2c556a['query'][_0xe544('0x58')](_0xe544('0x59'))){_0x45abf8[_0xe544('0x24')]=qs[_0xe544('0x24')](_0x2c556a['query'][_0xe544('0x24')]);_0x45abf8[_0xe544('0x22')]=qs[_0xe544('0x22')](_0x2c556a[_0xe544('0x50')][_0xe544('0x22')]);}_0x45abf8[_0xe544('0x5a')]=qs[_0xe544('0x5b')](_0x2c556a[_0xe544('0x50')][_0xe544('0x5b')]);_0x45abf8['where']=qs[_0xe544('0x52')](_[_0xe544('0x71')](_0x2c556a['query'],_0x5e9a56[_0xe544('0x52')]));_0x45abf8['where']['MailAccountId']=_0x2df5ca['id'];if(_0x2c556a[_0xe544('0x50')][_0xe544('0x5d')]){_0x45abf8['where']=_[_0xe544('0x5e')](_0x45abf8[_0xe544('0x5c')],{'$or':_[_0xe544('0x4f')](_0x45abf8[_0xe544('0x55')],function(_0x1e3ee7){var _0x2bff0b={};_0x2bff0b[_0x1e3ee7]={'$like':'%'+_0x2c556a[_0xe544('0x50')][_0xe544('0x5d')]+'%'};return _0x2bff0b;})});}_0x45abf8=_[_0xe544('0x5e')]({},_0x45abf8,_0x2c556a[_0xe544('0x65')]);return db['CannedAnswer'][_0xe544('0x25')]({'where':_0x45abf8[_0xe544('0x5c')]})[_0xe544('0x28')](function(_0xb6f543){_0x43910a[_0xe544('0x25')]=_0xb6f543;if(_0x2c556a[_0xe544('0x50')][_0xe544('0x60')]){_0x45abf8['include']=[{'all':!![]}];}return db[_0xe544('0x76')][_0xe544('0x61')](_0x45abf8);})[_0xe544('0x28')](function(_0x25584c){_0x43910a['rows']=_0x25584c;return _0x43910a;});}})['then'](respondWithFilteredResult(_0x23a203,_0x45abf8))['catch'](handleError(_0x23a203,null));};exports['removeAnswers']=function(_0x23cdcd,_0x4504c1){return db[_0xe544('0x4a')][_0xe544('0x66')]({'where':{'id':_0x23cdcd[_0xe544('0x6d')]['id']}})[_0xe544('0x28')](handleEntityNotFound(_0x4504c1,null))[_0xe544('0x28')](function(_0x57e151){if(_0x57e151){return _0x57e151[_0xe544('0x79')](_0x23cdcd[_0xe544('0x50')][_0xe544('0x7a')]);}})[_0xe544('0x28')](respondWithStatusCode(_0x4504c1,null))[_0xe544('0x1e')](handleError(_0x4504c1,null));};exports[_0xe544('0x77')]=function(_0x51c909,_0x189d14){var _0x5721e9={'name':_0x51c909[_0xe544('0x68')]['name'],'key':_0x51c909[_0xe544('0x68')][_0xe544('0x4e')],'provider':_0x51c909['body'][_0xe544('0x69')]===_0xe544('0x7b')?null:_0x51c909['body'][_0xe544('0x69')],'email':_0x51c909[_0xe544('0x68')][_0xe544('0x7c')],'ListId':_0x51c909[_0xe544('0x68')][_0xe544('0x7d')],'active':!_[_0xe544('0x7e')](_0x51c909['body'][_0xe544('0x7f')])?_0x51c909[_0xe544('0x68')][_0xe544('0x7f')]:!![],'description':_0x51c909['body'][_0xe544('0x80')]||null};var _0xc205d=getAuthenticationOptions(_0x5721e9[_0xe544('0x69')],_0x51c909[_0xe544('0x68')]);_0x5721e9[_0xe544('0x47')]=_0xc205d['Imap'];_0x5721e9[_0xe544('0x45')]=_0xc205d['Smtp'];return db[_0xe544('0x4a')]['create'](_0x5721e9,{'include':[{'model':db[_0xe544('0x64')],'as':_0xe544('0x45')},{'model':db[_0xe544('0x63')],'as':_0xe544('0x47')}]})['then'](function(_0x178ae7){var _0xa205ae=_0x51c909[_0xe544('0x3a')][_0xe544('0x81')]({'plain':!![]});if(!_0xa205ae)throw new Error(_0xe544('0x82'));if(_0xa205ae[_0xe544('0x83')]==='user'){var _0x2a486e=_0x178ae7[_0xe544('0x81')]({'plain':!![]});return db[_0xe544('0x84')][_0xe544('0x66')]({'where':{'name':'MailAccounts','userProfileId':_0xa205ae[_0xe544('0x85')]},'raw':!![]})[_0xe544('0x28')](function(_0x4c4b6b){if(_0x4c4b6b&&_0x4c4b6b[_0xe544('0x86')]===0x0){return db[_0xe544('0x2a')]['create']({'name':_0x2a486e['name'],'resourceId':_0x2a486e['id'],'type':_0x4c4b6b[_0xe544('0x2e')],'sectionId':_0x4c4b6b['id']},{})[_0xe544('0x28')](function(){return _0x178ae7;});}else{return _0x178ae7;}})['catch'](function(_0x56d030){logger[_0xe544('0x1a')](_0xe544('0x87'),_0x56d030);throw _0x56d030;});}return _0x178ae7;})[_0xe544('0x28')](respondWithResult(_0x189d14,0xc9))[_0xe544('0x1e')](handleError(_0x189d14,null));};exports['getImap']=function(_0x32af4f,_0x117ee9){return db[_0xe544('0x4a')][_0xe544('0x6f')]({'where':{'id':_0x32af4f[_0xe544('0x6d')]['id']}})[_0xe544('0x28')](handleEntityNotFound(_0x117ee9,null))['then'](function(_0x5ac70d){if(_0x5ac70d){return _0x5ac70d[_0xe544('0x88')]();}return null;})[_0xe544('0x28')](respondWithResult(_0x117ee9,null))[_0xe544('0x1e')](handleError(_0x117ee9,null));};exports[_0xe544('0x89')]=function(_0x147320,_0x162462){if(_0x147320[_0xe544('0x68')]['id']){delete _0x147320['body']['id'];}return db[_0xe544('0x4a')][_0xe544('0x66')]({'where':{'id':_0x147320[_0xe544('0x6d')]['id']}})[_0xe544('0x28')](handleEntityNotFound(_0x162462,null))['then'](function(_0xae999){if(_0xae999){_0x147320[_0xe544('0x68')][_0xe544('0x6e')]=_0xae999['id'];return db[_0xe544('0x63')][_0xe544('0x77')](_0x147320[_0xe544('0x68')]);}})[_0xe544('0x28')](respondWithResult(_0x162462,null))[_0xe544('0x1e')](handleError(_0x162462,null));};exports[_0xe544('0x8a')]=function(_0x1c7cb8,_0x22c8d){return db[_0xe544('0x4a')][_0xe544('0x6f')]({'where':{'id':_0x1c7cb8[_0xe544('0x6d')]['id']}})[_0xe544('0x28')](handleEntityNotFound(_0x22c8d,null))[_0xe544('0x28')](function(_0xb6576d){if(_0xb6576d){return _0xb6576d[_0xe544('0x8b')](null);}return null;})[_0xe544('0x28')](respondWithStatusCode(_0x22c8d,null))[_0xe544('0x1e')](handleError(_0x22c8d,null));};exports['getSmtp']=function(_0xc2d4fc,_0x177383){return db['MailAccount'][_0xe544('0x6f')]({'where':{'id':_0xc2d4fc[_0xe544('0x6d')]['id']}})[_0xe544('0x28')](handleEntityNotFound(_0x177383,null))[_0xe544('0x28')](function(_0x54034f){if(_0x54034f){return _0x54034f[_0xe544('0x8c')]();}return null;})[_0xe544('0x28')](respondWithResult(_0x177383,null))['catch'](handleError(_0x177383,null));};exports[_0xe544('0x8d')]=function(_0x15d65f,_0x4f0b37){if(_0x15d65f[_0xe544('0x68')]['id']){delete _0x15d65f[_0xe544('0x68')]['id'];}return db[_0xe544('0x4a')]['find']({'where':{'id':_0x15d65f[_0xe544('0x6d')]['id']}})[_0xe544('0x28')](handleEntityNotFound(_0x4f0b37,null))[_0xe544('0x28')](function(_0x232484){if(_0x232484){_0x15d65f[_0xe544('0x68')][_0xe544('0x6e')]=_0x232484['id'];return db[_0xe544('0x64')][_0xe544('0x77')](_0x15d65f[_0xe544('0x68')]);}})[_0xe544('0x28')](respondWithResult(_0x4f0b37,null))['catch'](handleError(_0x4f0b37,null));};exports[_0xe544('0x8e')]=function(_0x559aa9,_0x2015a4){return db['MailAccount']['findOne']({'where':{'id':_0x559aa9[_0xe544('0x6d')]['id']}})['then'](handleEntityNotFound(_0x2015a4,null))[_0xe544('0x28')](function(_0x1d4dde){if(_0x1d4dde){return _0x1d4dde['setSmtp'](null);}return null;})['then'](respondWithStatusCode(_0x2015a4,null))[_0xe544('0x1e')](handleError(_0x2015a4,null));};exports[_0xe544('0x8f')]=function(_0x3d8a17,_0x195825){return db[_0xe544('0x90')][_0xe544('0x66')]({'where':{'id':_0x3d8a17[_0xe544('0x6d')]['id']}})[_0xe544('0x28')](handleEntityNotFound(_0x195825,null))[_0xe544('0x28')](function(_0x4913da){if(_0x4913da){return _0x4913da[_0xe544('0x8f')](_0x3d8a17[_0xe544('0x68')][_0xe544('0x7a')],_['omit'](_0x3d8a17[_0xe544('0x68')],[_0xe544('0x7a'),'id'])||{});}})[_0xe544('0x28')](respondWithResult(_0x195825,null))[_0xe544('0x1e')](handleError(_0x195825,null));};exports[_0xe544('0x91')]=function(_0xd5b03c,_0x2f22a5){var _0x19542b={'raw':![],'where':{}};var _0x5c9838={};var _0x393eb7={'count':0x0,'rows':[]};return db['MailAccount'][_0xe544('0x6f')]({'where':{'id':_0xd5b03c[_0xe544('0x6d')]['id']}})[_0xe544('0x28')](handleEntityNotFound(_0x2f22a5,null))[_0xe544('0x28')](function(_0x36c71a){if(_0x36c71a){_0x5c9838[_0xe544('0x54')]=_[_0xe544('0x51')](db['MailInteraction']['rawAttributes']);_0x5c9838[_0xe544('0x50')]=_['keys'](_0xd5b03c['query']);_0x5c9838[_0xe544('0x52')]=_[_0xe544('0x53')](_0x5c9838[_0xe544('0x54')],_0x5c9838[_0xe544('0x50')]);_0x19542b[_0xe544('0x55')]=_[_0xe544('0x53')](_0x5c9838['model'],qs[_0xe544('0x56')](_0xd5b03c[_0xe544('0x50')][_0xe544('0x56')]));_0x19542b[_0xe544('0x55')]=_0x19542b[_0xe544('0x55')][_0xe544('0x57')]?_0x19542b['attributes']:_0x5c9838['model'];if(!_0xd5b03c[_0xe544('0x50')][_0xe544('0x58')]('nolimit')){_0x19542b[_0xe544('0x24')]=qs[_0xe544('0x24')](_0xd5b03c['query'][_0xe544('0x24')]);_0x19542b[_0xe544('0x22')]=qs[_0xe544('0x22')](_0xd5b03c[_0xe544('0x50')][_0xe544('0x22')]);}_0x19542b[_0xe544('0x5a')]=qs[_0xe544('0x5b')](_0xd5b03c['query'][_0xe544('0x5b')]);_0x19542b['where']=qs[_0xe544('0x52')](_[_0xe544('0x71')](_0xd5b03c[_0xe544('0x50')],_0x5c9838['filters']));_0x19542b['where']['MailAccountId']=_0x36c71a['id'];if(_0xd5b03c['query'][_0xe544('0x5d')]){_0x19542b[_0xe544('0x5c')]=_[_0xe544('0x5e')](_0x19542b['where'],{'$or':_[_0xe544('0x4f')](_0x19542b['attributes'],function(_0x7b9567){var _0x5dcb57={};_0x5dcb57[_0x7b9567]={'$like':'%'+_0xd5b03c['query']['filter']+'%'};return _0x5dcb57;})});}_0x19542b=_[_0xe544('0x5e')]({},_0x19542b,_0xd5b03c[_0xe544('0x65')]);return db[_0xe544('0x90')][_0xe544('0x25')]({'where':_0x19542b['where']})[_0xe544('0x28')](function(_0x10d932){_0x393eb7[_0xe544('0x25')]=_0x10d932;if(_0xd5b03c[_0xe544('0x50')]['includeAll']){_0x19542b[_0xe544('0x72')]=[{'model':db[_0xe544('0x92')],'as':'Contact','required':![]},{'model':db[_0xe544('0x93')],'as':'Owner','attributes':[_0xe544('0x2e'),_0xe544('0x94'),_0xe544('0x95')],'required':![]},{'model':db['Tag'],'as':_0xe544('0x96'),'attributes':['id','name','color'],'where':_0xd5b03c[_0xe544('0x50')][_0xe544('0x97')]?{'id':_0xd5b03c[_0xe544('0x50')]['tag']}:undefined,'required':_0xd5b03c[_0xe544('0x50')][_0xe544('0x97')]?!![]:![]}];}return db[_0xe544('0x90')]['findAll'](_0x19542b);})[_0xe544('0x28')](function(_0x1dbfcf){_0x393eb7[_0xe544('0x73')]=_0x1dbfcf;return _0x393eb7;});}})[_0xe544('0x28')](respondWithFilteredResult(_0x2f22a5,_0x19542b))['catch'](handleError(_0x2f22a5,null));};exports['addApplications']=function addApplications(_0xb82e5b,_0x1ed5ba){var _0x2a2979=_0xb82e5b['params']['id'];var _0x58637d=_0xb82e5b[_0xe544('0x68')];var _0x5812c1=0xc8;var _0x5a8491=null;return db[_0xe544('0x98')][_0xe544('0x99')]({'isolationLevel':db[_0xe544('0x98')][_0xe544('0x9a')][_0xe544('0x9b')]['READ_COMMITTED']},function(_0x224507){return db[_0xe544('0x4a')]['findOne']({'where':{'id':_0x2a2979},'transaction':_0x224507})['then'](function(_0x268264){if(_0x268264){return db[_0xe544('0x9c')][_0xe544('0x2b')]({'where':{'MailAccountId':_0x2a2979},'transaction':_0x224507})[_0xe544('0x28')](function(){var _0x3c01c7=_[_0xe544('0x4f')](_0x58637d,function(_0x443f5f){_0x443f5f[_0xe544('0x6e')]=_0x2a2979;return _0x443f5f;});return db[_0xe544('0x9c')][_0xe544('0x9d')](_0x3c01c7,{'transaction':_0x224507});});}else{_0x5812c1=0x194;_0x5a8491=[];}});})[_0xe544('0x28')](function(){if(_0x5812c1!==0x194){return db[_0xe544('0x9c')]['findAndCountAll']({'where':{'MailAccountId':_0x2a2979},'order':_0xe544('0x9e')})[_0xe544('0x28')](function(_0x124d9c){_0x5a8491=_0x124d9c;});}})[_0xe544('0x1e')](function(_0x3bef3d){_0x5812c1=0x1f4;logger[_0xe544('0x1a')](_0x3bef3d[_0xe544('0x2d')]);if(_0x3bef3d[_0xe544('0x2e')]){delete _0x3bef3d[_0xe544('0x2e')];}_0x5a8491=_0x3bef3d;})[_0xe544('0x9f')](function(){if(_0x5a8491===null){_0x1ed5ba['sendStatus'](_0x5812c1);}else{if(_0x5812c1===0x1f4){_0x1ed5ba[_0xe544('0x20')](_0x5812c1)[_0xe544('0x2f')](_0x5a8491);}else{_0x1ed5ba[_0xe544('0x20')](_0x5812c1)[_0xe544('0x21')](_0x5a8491);}}});};exports[_0xe544('0xa0')]=function(_0x178fb7,_0x53ef7a){var _0x476134={};var _0x4d1c55={};var _0xa8931a;var _0x2791fa;return db[_0xe544('0x4a')][_0xe544('0x6f')]({'where':{'id':_0x178fb7['params']['id']}})[_0xe544('0x28')](handleEntityNotFound(_0x53ef7a,null))[_0xe544('0x28')](function(_0x1e98df){if(_0x1e98df){_0xa8931a=_0x1e98df;_0x4d1c55['model']=_[_0xe544('0x51')](db['MailApplication'][_0xe544('0x4b')]);_0x4d1c55[_0xe544('0x50')]=_['keys'](_0x178fb7[_0xe544('0x50')]);_0x4d1c55['filters']=_[_0xe544('0x53')](_0x4d1c55[_0xe544('0x54')],_0x4d1c55[_0xe544('0x50')]);_0x476134[_0xe544('0x55')]=_['intersection'](_0x4d1c55['model'],qs['fields'](_0x178fb7[_0xe544('0x50')][_0xe544('0x56')]));_0x476134['attributes']=_0x476134['attributes'][_0xe544('0x57')]?_0x476134[_0xe544('0x55')]:_0x4d1c55['model'];_0x476134[_0xe544('0x5a')]=qs[_0xe544('0x5b')](_0x178fb7[_0xe544('0x50')][_0xe544('0x5b')]);_0x476134[_0xe544('0x5c')]=qs[_0xe544('0x52')](_[_0xe544('0x71')](_0x178fb7[_0xe544('0x50')],_0x4d1c55[_0xe544('0x52')]));if(_0x178fb7[_0xe544('0x50')][_0xe544('0x5d')]){_0x476134['where']=_[_0xe544('0x5e')](_0x476134['where'],{'$or':_[_0xe544('0x4f')](_0x476134[_0xe544('0x55')],function(_0x40cdee){var _0xa15b58={};_0xa15b58[_0x40cdee]={'$like':'%'+_0x178fb7['query'][_0xe544('0x5d')]+'%'};return _0xa15b58;})});}_0x476134=_[_0xe544('0x5e')]({},_0x476134,_0x178fb7[_0xe544('0x65')]);return _0xa8931a['getApplications'](_0x476134);}})[_0xe544('0x28')](function(_0x553725){if(_0x553725){_0x2791fa=_0x553725[_0xe544('0x57')];if(!_0x178fb7[_0xe544('0x50')][_0xe544('0x58')](_0xe544('0x59'))){_0x476134['limit']=qs['limit'](_0x178fb7[_0xe544('0x50')][_0xe544('0x24')]);_0x476134['offset']=qs[_0xe544('0x22')](_0x178fb7['query'][_0xe544('0x22')]);}return _0xa8931a[_0xe544('0xa0')](_0x476134);}})[_0xe544('0x28')](function(_0x47da86){if(_0x47da86){return _0x47da86?{'count':_0x2791fa,'rows':_0x47da86}:null;}})[_0xe544('0x28')](respondWithResult(_0x53ef7a,null))[_0xe544('0x1e')](handleError(_0x53ef7a,null));};exports[_0xe544('0xa1')]=function(_0xc337cc,_0xd4c3ff){var _0x49f616={'raw':!![],'where':{}};var _0xa08c88={};var _0x2b13e3={'count':0x0,'rows':[]};return db[_0xe544('0x4a')]['findOne']({'where':{'id':_0xc337cc[_0xe544('0x6d')]['id']}})[_0xe544('0x28')](handleEntityNotFound(_0xd4c3ff,null))['then'](function(_0x2e3080){if(_0x2e3080){_0xa08c88[_0xe544('0x54')]=_[_0xe544('0x51')](db[_0xe544('0xa2')][_0xe544('0x4b')]);_0xa08c88[_0xe544('0x50')]=_[_0xe544('0x51')](_0xc337cc[_0xe544('0x50')]);_0xa08c88[_0xe544('0x52')]=_['intersection'](_0xa08c88[_0xe544('0x54')],_0xa08c88[_0xe544('0x50')]);_0x49f616[_0xe544('0x55')]=_[_0xe544('0x53')](_0xa08c88[_0xe544('0x54')],qs[_0xe544('0x56')](_0xc337cc[_0xe544('0x50')][_0xe544('0x56')]));_0x49f616[_0xe544('0x55')]=_0x49f616[_0xe544('0x55')][_0xe544('0x57')]?_0x49f616[_0xe544('0x55')]:_0xa08c88['model'];if(!_0xc337cc[_0xe544('0x50')]['hasOwnProperty'](_0xe544('0x59'))){_0x49f616[_0xe544('0x24')]=qs[_0xe544('0x24')](_0xc337cc['query'][_0xe544('0x24')]);_0x49f616['offset']=qs[_0xe544('0x22')](_0xc337cc[_0xe544('0x50')][_0xe544('0x22')]);}_0x49f616[_0xe544('0x5a')]=qs[_0xe544('0x5b')](_0xc337cc[_0xe544('0x50')][_0xe544('0x5b')]);_0x49f616[_0xe544('0x5c')]=qs['filters'](_['pick'](_0xc337cc['query'],_0xa08c88[_0xe544('0x52')]));_0x49f616[_0xe544('0x5c')][_0xe544('0x6e')]=_0x2e3080['id'];if(_0xc337cc[_0xe544('0x50')][_0xe544('0x5d')]){_0x49f616[_0xe544('0x5c')]=_[_0xe544('0x5e')](_0x49f616[_0xe544('0x5c')],{'$or':_['map'](_0x49f616[_0xe544('0x55')],function(_0x32cbb8){var _0xd6e052={};_0xd6e052[_0x32cbb8]={'$like':'%'+_0xc337cc['query'][_0xe544('0x5d')]+'%'};return _0xd6e052;})});}if(_0xc337cc[_0xe544('0x50')][_0xe544('0xa3')]){var _0x1e149e=_0xc337cc['query'][_0xe544('0xa3')][_0xe544('0xa4')](',');var _0x131d1a={};_0x131d1a[_0x1e149e[0x0]]={'$gte':moment(_0x1e149e[0x1])[_0xe544('0xa5')](_0xe544('0xa6'))};_0x49f616[_0xe544('0x5c')]=_[_0xe544('0x5e')](_0x49f616[_0xe544('0x5c')],_0x131d1a);}_0x49f616=_['merge']({},_0x49f616,_0xc337cc[_0xe544('0x65')]);return db[_0xe544('0xa2')][_0xe544('0x25')]({'where':_0x49f616['where']})['then'](function(_0x333783){_0x2b13e3[_0xe544('0x25')]=_0x333783;if(_0xc337cc['query']['includeAll']){_0x49f616['include']=[{'all':!![]}];}return db[_0xe544('0xa2')][_0xe544('0x61')](_0x49f616);})['then'](function(_0xb3afd0){if(_0xc337cc[_0xe544('0x50')]['inlineCss']===_0xe544('0xa7')){for(var _0x5f20b5=0x0;_0x5f20b5<_0xb3afd0['length'];_0x5f20b5++){_0xb3afd0[_0x5f20b5][_0xe544('0x68')]=juice(_0xb3afd0[_0x5f20b5][_0xe544('0x68')]);}}_0x2b13e3[_0xe544('0x73')]=_0xb3afd0;return _0x2b13e3;});}})[_0xe544('0x28')](respondWithFilteredResult(_0xd4c3ff,_0x49f616))[_0xe544('0x1e')](handleError(_0xd4c3ff,null));};exports[_0xe544('0x2f')]=function(_0x290ae3,_0x52fd7f){var _0x39de39,_0x7b9ede={},_0x5683c6;if(_0x290ae3[_0xe544('0x68')]['to']){_0x5683c6=_0x290ae3[_0xe544('0x68')]['to'][_0xe544('0xa4')](',')[0x0];}return db[_0xe544('0x4a')][_0xe544('0x66')]({'where':{'id':_0x290ae3[_0xe544('0x6d')]['id']},'include':[{'model':db[_0xe544('0xa8')],'as':'List','include':[{'model':db[_0xe544('0x92')],'as':_0xe544('0xa9'),'where':{'email':_0x5683c6},'limit':0x1,'order':[['updatedAt',_0xe544('0xaa')]]}]},{'model':db[_0xe544('0x64')],'as':_0xe544('0x45'),'raw':!![],'include':[{'model':db[_0xe544('0xab')],'as':_0xe544('0xab'),'raw':!![]}]}]})['then'](handleEntityNotFound(_0x52fd7f,null))['then'](function(_0x478def){if(!_0x478def)return;_0x39de39=_0x478def;if(!_0x478def[_0xe544('0x45')])throw new Error(_0xe544('0xac'));if(_[_0xe544('0x7e')](_0x290ae3['body']['from'])){_0x290ae3[_0xe544('0x68')]['from']=util[_0xe544('0xa5')](_0xe544('0xad'),_0x478def['name'],_0x478def['email']||_0x478def[_0xe544('0x45')][_0xe544('0x3a')]);}if(_0x290ae3[_0xe544('0x68')][_0xe544('0xae')]&&_0x290ae3['body'][_0xe544('0xae')][_0xe544('0x57')]){for(var _0x57d97c=0x0;_0x57d97c<_0x290ae3[_0xe544('0x68')]['attachments'][_0xe544('0x57')];_0x57d97c+=0x1){_0x290ae3[_0xe544('0x68')][_0xe544('0xae')][_0x57d97c]={'filename':_0x290ae3[_0xe544('0x68')]['attachments'][_0x57d97c][_0xe544('0x2e')],'path':path[_0xe544('0xaf')](config[_0xe544('0xb0')],'server/files/attachments',_0x290ae3[_0xe544('0x68')]['attachments'][_0x57d97c][_0xe544('0xb1')])};}}var _0x32dfdd=_0x478def[_0xe544('0xb2')]();return respondWithRpcPromise('SendMail',_0xe544('0xb3'),{'account':_0x32dfdd,'message':_0x290ae3[_0xe544('0x68')]});})['then'](function(_0x4b6253){if(!_0x4b6253)return;_0x7b9ede=_0x4b6253;if(!_0x39de39['List'])throw new Error('List\x20not\x20found');if(_0x39de39[_0xe544('0xb4')][_0xe544('0xa9')][_0xe544('0x57')])return _0x39de39['List'][_0xe544('0xa9')][0x0];return db[_0xe544('0x92')]['create'](_[_0xe544('0xc')](_0x290ae3[_0xe544('0x68')],{'firstName':_0x290ae3[_0xe544('0x68')]['to'],'email':_0x290ae3[_0xe544('0x68')]['to'],'phone':_0x290ae3[_0xe544('0x68')]['to'],'ListId':_0x39de39[_0xe544('0x7d')]}));})[_0xe544('0x28')](function(_0x56581a){if(!_0x56581a)return;var _0x4c1343={'UserId':_0x290ae3[_0xe544('0x3a')]['id'],'ContactId':_0x56581a['id'],'MailAccountId':_0x39de39['id'],'inReplyTo':_0x7b9ede[_0xe544('0xb5')],'to':_0x290ae3[_0xe544('0x68')]['from'],'cc':_0x290ae3['body']['cc'],'subject':_0x290ae3[_0xe544('0x68')][_0xe544('0xb6')],'attach':_0x290ae3[_0xe544('0x68')][_0xe544('0xb7')],'firstMsgDirection':_0xe544('0xb8'),'lastMsgAt':moment()['format'](_0xe544('0xa6')),'lastMsgDirection':_0xe544('0xb8'),'Messages':[_[_0xe544('0x5e')](_0x290ae3[_0xe544('0x68')],{'messageId':_0x7b9ede['messageId'],'sentAt':moment()[_0xe544('0xa5')]('YYYY-MM-DD\x20HH:mm:ss'),'read':!![],'MailAccountId':_0x39de39['id'],'UserId':_0x290ae3['user']['id'],'ContactId':_0x56581a['id']})]};if(_0x290ae3[_0xe544('0x68')][_0xe544('0xb9')]){_0x4c1343=_[_0xe544('0x5e')](_0x4c1343,_0x290ae3[_0xe544('0x68')][_0xe544('0xb9')]);}return db[_0xe544('0x90')][_0xe544('0x77')](_0x4c1343,{'include':[{'model':db[_0xe544('0xa2')],'as':_0xe544('0xba')}]});})[_0xe544('0x28')](respondWithResult(_0x52fd7f,null))[_0xe544('0x1e')](handleError(_0x52fd7f,null));};exports['verifySmtp']=function(_0x2402ad,_0x12ad40){return db['MailAccount'][_0xe544('0x66')]({'where':{'id':_0x2402ad[_0xe544('0x6d')]['id']},'include':[{'model':db['MailServerOut'],'as':_0xe544('0x45'),'raw':!![],'include':[{'model':db[_0xe544('0xab')],'as':_0xe544('0xab'),'raw':!![]}]}]})[_0xe544('0x28')](handleEntityNotFound(_0x12ad40,null))[_0xe544('0x28')](function(_0x3e5eb3){if(!_0x3e5eb3[_0xe544('0x45')])return;var _0x3b24fa=_0x3e5eb3[_0xe544('0xb2')]();return respondWithRpcPromise(_0xe544('0xbb'),_0xe544('0xbc'),{'account':_0x3b24fa});})['then'](respondWithResult(_0x12ad40,null))[_0xe544('0x1e')](handleError(_0x12ad40,null));};exports[_0xe544('0x2b')]=function(_0xf7a111,_0x281cc2){return db[_0xe544('0x4a')][_0xe544('0x66')]({'where':{'id':_0xf7a111[_0xe544('0x6d')]['id']}})[_0xe544('0x28')](handleEntityNotFound(_0x281cc2,null))[_0xe544('0x28')](function(_0x14b19b){if(_0x14b19b&&_0x14b19b[_0xe544('0x43')]){throw new db[(_0xe544('0xbd'))][(_0xe544('0xbe'))]('You\x20can\x27t\x20remove\x20the\x20mail\x20service\x20account');}return _0x14b19b;})[_0xe544('0x28')](removeEntity(_0x281cc2,null))[_0xe544('0x1e')](handleError(_0x281cc2,null));};exports['addAgents']=function(_0x4f387f,_0x4200ed){return db[_0xe544('0x4a')][_0xe544('0x66')]({'where':{'id':_0x4f387f[_0xe544('0x6d')]['id']}})[_0xe544('0x28')](handleEntityNotFound(_0x4200ed,null))[_0xe544('0x28')](function(_0x152a4b){if(_0x152a4b){return _0x152a4b[_0xe544('0xbf')](_0x4f387f[_0xe544('0x68')][_0xe544('0x7a')],_[_0xe544('0xc0')](_0x4f387f[_0xe544('0x68')],[_0xe544('0x7a'),'id'])||{})['spread'](function(_0x399d65){for(var _0x1f3bcd=0x0;_0x1f3bcd<_0x4f387f[_0xe544('0x68')][_0xe544('0x7a')][_0xe544('0x57')];_0x1f3bcd+=0x1){socket[_0xe544('0xc1')](_0xe544('0xc2'),{'UserId':Number(_0x4f387f[_0xe544('0x68')][_0xe544('0x7a')][_0x1f3bcd]),'MailAccountId':Number(_0x4f387f[_0xe544('0x6d')]['id'])});}return _0x399d65;});}})[_0xe544('0x28')](respondWithResult(_0x4200ed,null))[_0xe544('0x1e')](handleError(_0x4200ed,null));};exports[_0xe544('0xc3')]=function(_0x2180f3,_0x37cdba){return db[_0xe544('0x4a')][_0xe544('0x66')]({'where':{'id':_0x2180f3['params']['id']}})[_0xe544('0x28')](handleEntityNotFound(_0x37cdba,null))['then'](function(_0x5a226e){if(_0x5a226e){return _0x5a226e[_0xe544('0xc3')](_0x2180f3[_0xe544('0x50')][_0xe544('0x7a')])[_0xe544('0x28')](function(){if(_[_0xe544('0xc4')](_0x2180f3[_0xe544('0x50')][_0xe544('0x7a')])){for(var _0x310a54=0x0;_0x310a54<_0x2180f3[_0xe544('0x50')][_0xe544('0x7a')][_0xe544('0x57')];_0x310a54+=0x1){socket[_0xe544('0xc1')](_0xe544('0xc5'),{'UserId':Number(_0x2180f3[_0xe544('0x50')]['ids'][_0x310a54]),'MailAccountId':Number(_0x2180f3[_0xe544('0x6d')]['id'])});}}else{socket[_0xe544('0xc1')](_0xe544('0xc5'),{'UserId':Number(_0x2180f3['query'][_0xe544('0x7a')]),'MailAccountId':Number(_0x2180f3[_0xe544('0x6d')]['id'])});}});}})[_0xe544('0x28')](respondWithStatusCode(_0x37cdba,null))[_0xe544('0x1e')](handleError(_0x37cdba,null));};exports['getAgents']=function(_0x5048ea,_0x12f938){var _0x4a83c5={};var _0x1142ed={};var _0x3bed04;var _0x474e85;return db[_0xe544('0x4a')]['findOne']({'where':{'id':_0x5048ea[_0xe544('0x6d')]['id']}})[_0xe544('0x28')](handleEntityNotFound(_0x12f938,null))[_0xe544('0x28')](function(_0x2f01ee){if(_0x2f01ee){_0x3bed04=_0x2f01ee;_0x1142ed[_0xe544('0x54')]=_[_0xe544('0x51')](db[_0xe544('0x93')][_0xe544('0x4b')]);_0x1142ed['query']=_[_0xe544('0x51')](_0x5048ea[_0xe544('0x50')]);_0x1142ed[_0xe544('0x52')]=_[_0xe544('0x53')](_0x1142ed[_0xe544('0x54')],_0x1142ed['query']);_0x4a83c5[_0xe544('0x55')]=_[_0xe544('0x53')](_0x1142ed[_0xe544('0x54')],qs['fields'](_0x5048ea[_0xe544('0x50')][_0xe544('0x56')]));_0x4a83c5[_0xe544('0x55')]=_0x4a83c5[_0xe544('0x55')][_0xe544('0x57')]?_0x4a83c5[_0xe544('0x55')]:_0x1142ed[_0xe544('0x54')];_0x4a83c5[_0xe544('0x5a')]=qs['sort'](_0x5048ea['query'][_0xe544('0x5b')]);_0x4a83c5[_0xe544('0x5c')]=qs[_0xe544('0x52')](_[_0xe544('0x71')](_0x5048ea['query'],_0x1142ed[_0xe544('0x52')]));if(_0x5048ea[_0xe544('0x50')][_0xe544('0x5d')]){_0x4a83c5['where']=_[_0xe544('0x5e')](_0x4a83c5[_0xe544('0x5c')],{'$or':_[_0xe544('0x4f')](_0x4a83c5[_0xe544('0x55')],function(_0x511043){var _0x210931={};_0x210931[_0x511043]={'$like':'%'+_0x5048ea[_0xe544('0x50')][_0xe544('0x5d')]+'%'};return _0x210931;})});}_0x4a83c5=_[_0xe544('0x5e')]({},_0x4a83c5,_0x5048ea[_0xe544('0x65')]);return _0x3bed04[_0xe544('0xc6')](_0x4a83c5);}})[_0xe544('0x28')](function(_0x3c153e){if(_0x3c153e){_0x474e85=_0x3c153e[_0xe544('0x57')];if(!_0x5048ea['query'][_0xe544('0x58')](_0xe544('0x59'))){_0x4a83c5[_0xe544('0x24')]=qs[_0xe544('0x24')](_0x5048ea[_0xe544('0x50')]['limit']);_0x4a83c5['offset']=qs[_0xe544('0x22')](_0x5048ea['query'][_0xe544('0x22')]);}return _0x3bed04[_0xe544('0xc6')](_0x4a83c5);}})[_0xe544('0x28')](function(_0x4140d2){if(_0x4140d2){return _0x4140d2?{'count':_0x474e85,'rows':_0x4140d2}:null;}})[_0xe544('0x28')](respondWithResult(_0x12f938,null))[_0xe544('0x1e')](handleError(_0x12f938,null));};
\ No newline at end of file
index 6ae0490..71b4c7d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa786=['exports','events','../../mysqldb','MailAccount','save','emit','hasOwnProperty'];(function(_0x224b2f,_0x192fc7){var _0x3e5ed4=function(_0x2a069e){while(--_0x2a069e){_0x224b2f['push'](_0x224b2f['shift']());}};_0x3e5ed4(++_0x192fc7);}(_0xa786,0x71));var _0x6a78=function(_0x22d577,_0x1cd3c6){_0x22d577=_0x22d577-0x0;var _0x317265=_0xa786[_0x22d577];return _0x317265;};'use strict';var EventEmitter=require(_0x6a78('0x0'));var MailAccount=require(_0x6a78('0x1'))['db'][_0x6a78('0x2')];var MailAccountEvents=new EventEmitter();MailAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x6a78('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x47d5d5){return function(_0x2b0fed,_0x3b3608,_0x19285c){MailAccountEvents[_0x6a78('0x4')](_0x47d5d5+':'+_0x2b0fed['id'],_0x2b0fed);MailAccountEvents[_0x6a78('0x4')](_0x47d5d5,_0x2b0fed);_0x19285c(null);};}for(var e in events){if(events[_0x6a78('0x5')](e)){var event=events[e];MailAccount['hook'](e,emitEvent(event));}}module[_0x6a78('0x6')]=MailAccountEvents;
\ No newline at end of file
+var _0xdfd2=['setMaxListeners','update','remove','emit','hook','exports','events','MailAccount'];(function(_0x454e6d,_0x1e1f38){var _0x4bc294=function(_0x2c803a){while(--_0x2c803a){_0x454e6d['push'](_0x454e6d['shift']());}};_0x4bc294(++_0x1e1f38);}(_0xdfd2,0xf6));var _0x2dfd=function(_0x2b865e,_0x262682){_0x2b865e=_0x2b865e-0x0;var _0x261051=_0xdfd2[_0x2b865e];return _0x261051;};'use strict';var EventEmitter=require(_0x2dfd('0x0'));var MailAccount=require('../../mysqldb')['db'][_0x2dfd('0x1')];var MailAccountEvents=new EventEmitter();MailAccountEvents[_0x2dfd('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x2dfd('0x3'),'afterDestroy':_0x2dfd('0x4')};function emitEvent(_0x57e414){return function(_0x4b7cca,_0x37c673,_0x4298a5){MailAccountEvents[_0x2dfd('0x5')](_0x57e414+':'+_0x4b7cca['id'],_0x4b7cca);MailAccountEvents['emit'](_0x57e414,_0x4b7cca);_0x4298a5(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailAccount[_0x2dfd('0x6')](e,emitEvent(event));}}module[_0x2dfd('0x7')]=MailAccountEvents;
\ No newline at end of file
index 4dfb952..39284f5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd6c7=['./mailAccount.attributes','exports','define','MailAccount','mail_accounts','provider','service','host','Smtp','port','secure','authentication','modernAuthentication','CloudProvider','Cloud\x20Provider\x20configuration\x20not\x20found','auth','data5','user','pass'];(function(_0x2a8926,_0x3c219e){var _0x35bd60=function(_0x3ccd3b){while(--_0x3ccd3b){_0x2a8926['push'](_0x2a8926['shift']());}};_0x35bd60(++_0x3c219e);}(_0xd6c7,0xab));var _0x7d6c=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0xd6c7[_0x2f5ac5];return _0x37c9a8;};'use strict';var attributes=require(_0x7d6c('0x0'));module[_0x7d6c('0x1')]=function(_0x1c618b){return _0x1c618b[_0x7d6c('0x2')](_0x7d6c('0x3'),attributes,{'tableName':_0x7d6c('0x4'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x3aebea=this;var _0x13b2b8={'id':_0x3aebea['id'],'tls':{'rejectUnauthorized':![]}};if(_0x3aebea[_0x7d6c('0x5')]!=='custom'){_0x13b2b8[_0x7d6c('0x6')]=_0x3aebea[_0x7d6c('0x5')];}else{_0x13b2b8[_0x7d6c('0x7')]=_0x3aebea[_0x7d6c('0x8')]['host'];_0x13b2b8[_0x7d6c('0x9')]=_0x3aebea[_0x7d6c('0x8')][_0x7d6c('0x9')];_0x13b2b8[_0x7d6c('0xa')]=_0x3aebea[_0x7d6c('0x8')][_0x7d6c('0xa')];}if(_0x3aebea[_0x7d6c('0x8')][_0x7d6c('0xb')]){if(_0x3aebea['Smtp'][_0x7d6c('0xc')]){if(!_0x3aebea[_0x7d6c('0x8')][_0x7d6c('0xd')])throw new Error(_0x7d6c('0xe'));_0x13b2b8[_0x7d6c('0xf')]={'type':'OAuth2','user':_0x3aebea[_0x7d6c('0x8')]['user'],'accessToken':_0x3aebea[_0x7d6c('0x8')][_0x7d6c('0xd')][_0x7d6c('0x10')]};}else{_0x13b2b8[_0x7d6c('0xf')]={'user':_0x3aebea['Smtp'][_0x7d6c('0x11')],'pass':_0x3aebea['Smtp'][_0x7d6c('0x12')]};}}return _0x13b2b8;}}});};
\ No newline at end of file
+var _0xdf8f=['data5','exports','define','MailAccount','mail_accounts','custom','service','host','Smtp','port','secure','authentication','modernAuthentication','CloudProvider','Cloud\x20Provider\x20configuration\x20not\x20found','auth','OAuth2','user'];(function(_0x192d32,_0x11324c){var _0x4cfd5e=function(_0x5b7aa3){while(--_0x5b7aa3){_0x192d32['push'](_0x192d32['shift']());}};_0x4cfd5e(++_0x11324c);}(_0xdf8f,0x7f));var _0xfdf8=function(_0x19950b,_0x53d0d7){_0x19950b=_0x19950b-0x0;var _0x3c6b41=_0xdf8f[_0x19950b];return _0x3c6b41;};'use strict';var attributes=require('./mailAccount.attributes');module[_0xfdf8('0x0')]=function(_0x421821){return _0x421821[_0xfdf8('0x1')](_0xfdf8('0x2'),attributes,{'tableName':_0xfdf8('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x7baade=this;var _0x4d155a={'id':_0x7baade['id'],'tls':{'rejectUnauthorized':![]}};if(_0x7baade['provider']!==_0xfdf8('0x4')){_0x4d155a[_0xfdf8('0x5')]=_0x7baade['provider'];}else{_0x4d155a[_0xfdf8('0x6')]=_0x7baade[_0xfdf8('0x7')]['host'];_0x4d155a[_0xfdf8('0x8')]=_0x7baade[_0xfdf8('0x7')][_0xfdf8('0x8')];_0x4d155a['secure']=_0x7baade[_0xfdf8('0x7')][_0xfdf8('0x9')];}if(_0x7baade[_0xfdf8('0x7')][_0xfdf8('0xa')]){if(_0x7baade[_0xfdf8('0x7')][_0xfdf8('0xb')]){if(!_0x7baade[_0xfdf8('0x7')][_0xfdf8('0xc')])throw new Error(_0xfdf8('0xd'));_0x4d155a[_0xfdf8('0xe')]={'type':_0xfdf8('0xf'),'user':_0x7baade['Smtp'][_0xfdf8('0x10')],'accessToken':_0x7baade['Smtp'][_0xfdf8('0xc')][_0xfdf8('0x11')]};}else{_0x4d155a[_0xfdf8('0xe')]={'user':_0x7baade['Smtp'][_0xfdf8('0x10')],'pass':_0x7baade['Smtp']['pass']};}}return _0x4d155a;}}});};
\ No newline at end of file
index 537d377..785d90f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf767=['MailQueue','queue','waitForTheAssignedQueue','Start','startRouting','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','./mailAccount.socket','register','request','then','info','MailAccount,\x20%s,\x20%s','request\x20sent','MailAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','GetMailAccount','MailAccount','options','where','limit','map','model','attributes','include','debug','ShowMailAccount','find','raw','smtp','setDataValue','getSmtpOptions','catch','NotifyMailAccount','body','mail','difference','keys','CmContact','rawAttributes','createdAt','updatedAt','CompanyId','ListId','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','account','List','Contacts','MailApplication','Applications','MailServerOut','Smtp','CloudProvider','get','omit','smtpOptions','applications','list','orderBy','priority','autoclose','push','close','*,*,*,*','length','create','contact','messageId','generate','format','YYYY-MM-DD\x20HH:mm:ss','MailInteraction','MailMessage','spread','update','subject','attach','interaction','created','originTo','originCc','bcc','ChatWebsiteId','originChannel','Email','ChatOfflineMessageId','Attachment','Attachments','UserId','unshift','name','queueId'];(function(_0x46b057,_0x25aa56){var _0x25cf84=function(_0x324ba6){while(--_0x324ba6){_0x46b057['push'](_0x46b057['shift']());}};_0x25cf84(++_0x25aa56);}(_0xf767,0x76));var _0x7f76=function(_0x8de54f,_0x271987){_0x8de54f=_0x8de54f-0x0;var _0x14cba4=_0xf767[_0x8de54f];return _0x14cba4;};'use strict';var _=require('lodash');var moment=require(_0x7f76('0x0'));var BPromise=require(_0x7f76('0x1'));var rs=require(_0x7f76('0x2'));var Redis=require(_0x7f76('0x3'));var db=require(_0x7f76('0x4'))['db'];var logger=require('../../config/logger')(_0x7f76('0x5'));var config=require(_0x7f76('0x6'));var jayson=require(_0x7f76('0x7'));var client=jayson[_0x7f76('0x8')]['http']({'port':0x232c});config[_0x7f76('0x9')]=_[_0x7f76('0xa')](config[_0x7f76('0x9')],{'host':_0x7f76('0xb'),'port':0x18eb});var socket=require(_0x7f76('0xc'))(new Redis(config['redis']));require(_0x7f76('0xd'))[_0x7f76('0xe')](socket);function respondWithRpcPromise(_0x35d28d,_0x15dcd9,_0x4c5f88){return new BPromise(function(_0x247403,_0x5dc8aa){return client[_0x7f76('0xf')](_0x35d28d,_0x4c5f88)[_0x7f76('0x10')](function(_0x4dbc83){logger[_0x7f76('0x11')](_0x7f76('0x12'),_0x15dcd9,_0x7f76('0x13'));logger['debug'](_0x7f76('0x14'),_0x15dcd9,_0x7f76('0x13'),JSON[_0x7f76('0x15')](_0x4dbc83));if(_0x4dbc83[_0x7f76('0x16')]){if(_0x4dbc83[_0x7f76('0x16')]['code']===0x1f4){logger[_0x7f76('0x16')]('MailAccount,\x20%s,\x20%s',_0x15dcd9,_0x4dbc83[_0x7f76('0x16')][_0x7f76('0x17')]);return _0x5dc8aa(_0x4dbc83['error']['message']);}logger['error'](_0x7f76('0x12'),_0x15dcd9,_0x4dbc83[_0x7f76('0x16')][_0x7f76('0x17')]);return _0x247403(_0x4dbc83['error'][_0x7f76('0x17')]);}else{logger['info'](_0x7f76('0x12'),_0x15dcd9,_0x7f76('0x13'));_0x247403(_0x4dbc83[_0x7f76('0x18')]['message']);}})['catch'](function(_0x494537){logger['error']('MailAccount,\x20%s,\x20%s',_0x15dcd9,_0x494537);_0x5dc8aa(_0x494537);});});}exports[_0x7f76('0x19')]=function(_0xdb1407){var _0x2b2e32=this;return new Promise(function(_0x21c2ca,_0x54610a){return db[_0x7f76('0x1a')]['findAll']({'raw':_0xdb1407[_0x7f76('0x1b')]?_0xdb1407[_0x7f76('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0xdb1407['options']?_0xdb1407[_0x7f76('0x1b')][_0x7f76('0x1c')]||null:null,'attributes':_0xdb1407['options']?_0xdb1407[_0x7f76('0x1b')]['attributes']||null:null,'limit':_0xdb1407[_0x7f76('0x1b')]?_0xdb1407[_0x7f76('0x1b')][_0x7f76('0x1d')]||null:null,'include':_0xdb1407[_0x7f76('0x1b')]?_0xdb1407[_0x7f76('0x1b')]['include']?_[_0x7f76('0x1e')](_0xdb1407['options']['include'],function(_0x197519){return{'model':db[_0x197519[_0x7f76('0x1f')]],'as':_0x197519['as'],'attributes':_0x197519[_0x7f76('0x20')],'include':_0x197519['include']?_[_0x7f76('0x1e')](_0x197519[_0x7f76('0x21')],function(_0x3e624d){return{'model':db[_0x3e624d[_0x7f76('0x1f')]],'as':_0x3e624d['as'],'attributes':_0x3e624d[_0x7f76('0x20')],'include':_0x3e624d['include']?_[_0x7f76('0x1e')](_0x3e624d[_0x7f76('0x21')],function(_0x523d7a){return{'model':db[_0x523d7a['model']],'as':_0x523d7a['as'],'attributes':_0x523d7a[_0x7f76('0x20')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1dd664){logger[_0x7f76('0x11')](_0x7f76('0x19'),_0xdb1407);logger[_0x7f76('0x22')](_0x7f76('0x19'),_0xdb1407,JSON[_0x7f76('0x15')](_0x1dd664));_0x21c2ca(_0x1dd664);})['catch'](function(_0x3570ec){logger[_0x7f76('0x16')](_0x7f76('0x19'),_0x3570ec[_0x7f76('0x17')],_0xdb1407);_0x54610a(_0x2b2e32['error'](0x1f4,_0x3570ec[_0x7f76('0x17')]));});});};exports[_0x7f76('0x23')]=function(_0x3aacba){var _0x4d7a2f=this;return new Promise(function(_0x208ced,_0x419dad){return db[_0x7f76('0x1a')][_0x7f76('0x24')]({'raw':_0x3aacba[_0x7f76('0x1b')]?_0x3aacba[_0x7f76('0x1b')][_0x7f76('0x25')]===undefined?!![]:![]:!![],'where':_0x3aacba[_0x7f76('0x1b')]?_0x3aacba[_0x7f76('0x1b')][_0x7f76('0x1c')]||null:null,'attributes':_0x3aacba[_0x7f76('0x1b')]?_0x3aacba[_0x7f76('0x1b')][_0x7f76('0x20')]||null:null,'include':_0x3aacba['options']?_0x3aacba[_0x7f76('0x1b')][_0x7f76('0x21')]?_[_0x7f76('0x1e')](_0x3aacba[_0x7f76('0x1b')][_0x7f76('0x21')],function(_0x20c260){return{'model':db[_0x20c260[_0x7f76('0x1f')]],'as':_0x20c260['as'],'attributes':_0x20c260[_0x7f76('0x20')],'include':_0x20c260['include']?_[_0x7f76('0x1e')](_0x20c260['include'],function(_0x5e9a68){return{'model':db[_0x5e9a68[_0x7f76('0x1f')]],'as':_0x5e9a68['as'],'attributes':_0x5e9a68['attributes'],'include':_0x5e9a68[_0x7f76('0x21')]?_[_0x7f76('0x1e')](_0x5e9a68['include'],function(_0x3dbcc3){return{'model':db[_0x3dbcc3['model']],'as':_0x3dbcc3['as'],'attributes':_0x3dbcc3['attributes']};}):[]};}):[]};}):[]:[]})[_0x7f76('0x10')](function(_0x205223){if(_0x3aacba[_0x7f76('0x1b')][_0x7f76('0x26')]===!![])_0x205223[_0x7f76('0x27')]('smtpOptions',_0x205223[_0x7f76('0x28')]());logger[_0x7f76('0x11')]('ShowMailAccount',_0x3aacba);logger['debug'](_0x7f76('0x23'),_0x3aacba,JSON['stringify'](_0x205223));_0x208ced(_0x205223);})[_0x7f76('0x29')](function(_0x17dfb3){logger[_0x7f76('0x16')]('ShowMailAccount',_0x17dfb3[_0x7f76('0x17')],_0x3aacba);_0x419dad(_0x4d7a2f[_0x7f76('0x16')](0x1f4,_0x17dfb3[_0x7f76('0x17')]));});});};exports[_0x7f76('0x2a')]=function(_0x1ed18a){var _0x438de8=this;return new Promise(function(_0x58649f,_0x518ced){var _0x218370={'body':_0x1ed18a[_0x7f76('0x2b')],'channel':_0x7f76('0x2c')};var _0x331f75=_[_0x7f76('0x2d')](_[_0x7f76('0x2e')](db[_0x7f76('0x2f')][_0x7f76('0x30')]),[_0x7f76('0x31'),_0x7f76('0x32'),_0x7f76('0x33'),_0x7f76('0x34')]);var _0x3229b9=![];if(_0x1ed18a[_0x7f76('0x2b')]['id']){delete _0x1ed18a[_0x7f76('0x2b')]['id'];}if(_[_0x7f76('0x35')](_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x36')])){return _0x518ced(_0x438de8['error'](0x1f4,_0x7f76('0x37')));}if(_[_0x7f76('0x35')](_0x1ed18a[_0x7f76('0x2b')]['body'])||_0x1ed18a['body'][_0x7f76('0x2b')]===''){return _0x518ced(_0x438de8['error'](0x1f4,_0x7f76('0x38')));}if(_['isNil'](_0x1ed18a['body'][_0x7f76('0x39')])){return _0x518ced(_0x438de8[_0x7f76('0x16')](0x1f4,_0x7f76('0x3a')+_0x331f75));}if(!_[_0x7f76('0x3b')](_0x331f75,_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x39')])){return _0x518ced(_0x438de8[_0x7f76('0x16')](0x1f4,_0x7f76('0x3c')+_0x331f75));}var _0x71f722={};_0x71f722[_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x39')]]=_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x36')];return db[_0x7f76('0x1a')]['find']({'where':{'id':_0x1ed18a[_0x7f76('0x3d')]['id']},'include':[{'model':db['CmList'],'as':_0x7f76('0x3e'),'include':[{'model':db[_0x7f76('0x2f')],'as':_0x7f76('0x3f'),'where':_0x71f722,'limit':0x1,'order':[[_0x7f76('0x32'),'DESC']]}]},{'model':db[_0x7f76('0x40')],'as':_0x7f76('0x41')},{'model':db[_0x7f76('0x42')],'as':_0x7f76('0x43'),'include':[{'model':db['CloudProvider'],'as':_0x7f76('0x44')}]}]})[_0x7f76('0x10')](function(_0x53f77a){if(_0x53f77a&&_0x53f77a[_0x7f76('0x3e')]){var _0x364fea=_0x53f77a[_0x7f76('0x45')]({'plain':!![]});_0x218370['account']=_[_0x7f76('0x46')](_0x364fea,[_0x7f76('0x41'),_0x7f76('0x3e')]);_0x218370[_0x7f76('0x3d')][_0x7f76('0x47')]=_0x53f77a[_0x7f76('0x28')]();_0x218370[_0x7f76('0x48')]=_0x364fea[_0x7f76('0x41')];_0x218370[_0x7f76('0x49')]=_0x364fea[_0x7f76('0x3e')];_0x218370[_0x7f76('0x48')]=_[_0x7f76('0x4a')](_0x218370['applications'],[_0x7f76('0x4b')],['asc']);if(_0x218370[_0x7f76('0x3d')]&&_0x218370[_0x7f76('0x3d')][_0x7f76('0x4c')]){_0x218370['applications'][_0x7f76('0x4d')]({'id':0x0,'priority':_0x218370[_0x7f76('0x48')]['length']+0x1,'app':_0x7f76('0x4e'),'appdata':_0x7f76('0x4c'),'interval':_0x7f76('0x4f')});}if(_0x218370[_0x7f76('0x3d')][_0x7f76('0x41')]){delete _0x218370[_0x7f76('0x3d')][_0x7f76('0x41')];}if(_0x218370[_0x7f76('0x3d')][_0x7f76('0x3e')]){delete _0x218370['account']['List'];}if(_0x364fea[_0x7f76('0x3e')][_0x7f76('0x3f')][_0x7f76('0x50')]){return _0x364fea[_0x7f76('0x3e')][_0x7f76('0x3f')][0x0];}var _0x33b0ae=_[_0x7f76('0xa')](_0x1ed18a[_0x7f76('0x2b')],{'firstName':_0x1ed18a[_0x7f76('0x2b')]['from'],'ListId':_0x364fea[_0x7f76('0x34')]});_0x33b0ae[_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x39')]]=_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x36')];return db[_0x7f76('0x2f')][_0x7f76('0x51')](_0x33b0ae);}else{throw new Error('List\x20not\x20found');}})[_0x7f76('0x10')](function(_0x52b523){_0x218370[_0x7f76('0x52')]=_0x52b523;if(_0x52b523){if(!_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x17')][_0x7f76('0x53')]){_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x17')][_0x7f76('0x53')]=rs[_0x7f76('0x54')]()+'\x20'+_0x1ed18a['body']['message'][_0x7f76('0x36')];}var _0x4529b0={'ContactId':_0x52b523['id'],'MailAccountId':_0x1ed18a[_0x7f76('0x3d')]['id'],'inReplyTo':_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x17')][_0x7f76('0x53')],'to':_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x17')]['from'],'cc':_0x1ed18a['body'][_0x7f76('0x17')]['cc'],'subject':_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x17')]['subject'],'attach':_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x17')]['attach'],'lastMsgAt':moment()[_0x7f76('0x55')](_0x7f76('0x56')),'lastMsgDirection':'in'};return db[_0x7f76('0x57')][_0x7f76('0x24')]({'where':{'closed':![],'MailAccountId':_0x1ed18a[_0x7f76('0x3d')]['id']},'include':[{'model':db[_0x7f76('0x58')],'as':'Messages','attributes':[_0x7f76('0x53')],'where':{'messageId':_0x1ed18a['body'][_0x7f76('0x17')]['inReplyTo']}}]})[_0x7f76('0x10')](function(_0x5f3db2){if(_0x5f3db2){return[_0x5f3db2,![]];}return db[_0x7f76('0x57')][_0x7f76('0x51')](_0x4529b0)[_0x7f76('0x10')](function(_0x3e83d2){return[_0x3e83d2,!![]];});});}else{throw new Error('Contact\x20not\x20found');}})[_0x7f76('0x59')](function(_0x20264e,_0x46b15b){if(_0x20264e){_0x3229b9=_0x46b15b;if(!_0x46b15b){return _0x20264e[_0x7f76('0x5a')]({'inReplyTo':_0x1ed18a[_0x7f76('0x2b')]['message'][_0x7f76('0x53')],'to':_0x1ed18a['body'][_0x7f76('0x17')]['from'],'cc':_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x17')]['cc'],'subject':_0x1ed18a['body'][_0x7f76('0x17')][_0x7f76('0x5b')],'attach':_0x20264e[_0x7f76('0x5c')]?_0x20264e[_0x7f76('0x5c')]:_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x17')][_0x7f76('0x5c')],'substatus':null,'substatusAt':moment()[_0x7f76('0x55')](_0x7f76('0x56')),'lastMsgAt':moment()[_0x7f76('0x55')](_0x7f76('0x56')),'lastMsgDirection':'in'});}else{return _0x20264e;}}})[_0x7f76('0x10')](function(_0xb0be79){_0x218370[_0x7f76('0x5d')]=_0xb0be79['get']({'plain':!![]});_0x218370[_0x7f76('0x5d')][_0x7f76('0x5e')]=_0x3229b9;return db['MailMessage'][_0x7f76('0x51')]({'body':_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x2b')],'MailAccountId':_0x1ed18a[_0x7f76('0x3d')]['id'],'MailInteractionId':_0xb0be79['id'],'direction':'in','ContactId':_0x218370[_0x7f76('0x52')]['id'],'messageId':_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x17')][_0x7f76('0x53')],'from':_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x17')][_0x7f76('0x36')],'to':_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x17')]['to'],'cc':_0x1ed18a[_0x7f76('0x2b')]['message']['cc'],'subject':_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x17')]['subject'],'attach':_0x1ed18a['body']['message'][_0x7f76('0x5c')],'Attachments':_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x17')]['attachments'],'originTo':_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x17')][_0x7f76('0x5f')],'originCc':_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x17')][_0x7f76('0x60')],'bcc':_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x17')][_0x7f76('0x61')],'ChatWebsiteId':_0x1ed18a['body'][_0x7f76('0x17')][_0x7f76('0x62')]||null,'originChannel':_0x1ed18a[_0x7f76('0x2b')][_0x7f76('0x17')][_0x7f76('0x63')]||_0x7f76('0x64'),'ChatOfflineMessageId':_0x1ed18a[_0x7f76('0x2b')]['message'][_0x7f76('0x65')]||null},{'include':[{'model':db[_0x7f76('0x66')],'as':_0x7f76('0x67')}]});})[_0x7f76('0x10')](function(_0x43d856){_0x218370['message']=_0x43d856;if(!_0x218370[_0x7f76('0x5d')][_0x7f76('0x68')]){return;}return db['User']['find']({'attributes':['id','name'],'where':{'id':_0x218370[_0x7f76('0x5d')][_0x7f76('0x68')]}});})[_0x7f76('0x10')](function(_0x8d6dec){if(_0x8d6dec){_0x218370[_0x7f76('0x48')][_0x7f76('0x69')]({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x8d6dec[_0x7f76('0x6a')]+','+(_0x218370[_0x7f76('0x3d')]['waitForTheAssignedAgent']||0xa),'interval':_0x7f76('0x4f')});}if(!_0x218370[_0x7f76('0x5d')][_0x7f76('0x6b')]){return;}return db[_0x7f76('0x6c')][_0x7f76('0x24')]({'attributes':['id',_0x7f76('0x6a')],'where':{'id':_0x218370[_0x7f76('0x5d')]['queueId']}});})[_0x7f76('0x10')](function(_0x428865){if(_0x428865){_0x218370['applications'][_0x7f76('0x69')]({'id':0x0,'priority':0x1,'app':_0x7f76('0x6d'),'appdata':_0x428865['name']+','+(_0x218370[_0x7f76('0x3d')][_0x7f76('0x6e')]||0x12c),'interval':_0x7f76('0x4f')});}return respondWithRpcPromise(_0x7f76('0x6f'),_0x7f76('0x70'),_0x218370);})[_0x7f76('0x10')](function(_0x37afb1){_0x58649f(_0x37afb1);})[_0x7f76('0x29')](function(_0x95d3a8){_0x518ced(_0x438de8[_0x7f76('0x16')](0x1f4,_0x95d3a8[_0x7f76('0x17')]));});});};
\ No newline at end of file
+var _0xec39=['catch','GetMailAccount','MailAccount','findAll','options','where','attributes','limit','include','map','model','find','raw','smtp','setDataValue','smtpOptions','ShowMailAccount','NotifyMailAccount','mail','difference','keys','CmContact','updatedAt','ListId','body','isNil','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','from','account','List','Contacts','DESC','MailApplication','Applications','MailServerOut','Smtp','CloudProvider','omit','getSmtpOptions','applications','orderBy','priority','asc','push','length','close','autoclose','*,*,*,*','create','contact','messageId','attach','format','YYYY-MM-DD\x20HH:mm:ss','MailInteraction','MailMessage','inReplyTo','spread','update','interaction','subject','attachments','originTo','originCc','bcc','ChatWebsiteId','originChannel','Email','Attachment','Attachments','UserId','User','name','unshift','agent','waitForTheAssignedAgent','queueId','MailQueue','queue','waitForTheAssignedQueue','Start','startRouting','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','redis','localhost','socket.io-emitter','./mailAccount.socket','register','then','info','MailAccount,\x20%s,\x20%s','request\x20sent','debug','MailAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result'];(function(_0x255f0d,_0x25f6e5){var _0x36b9d3=function(_0x450672){while(--_0x450672){_0x255f0d['push'](_0x255f0d['shift']());}};_0x36b9d3(++_0x25f6e5);}(_0xec39,0x19f));var _0x9ec3=function(_0x387f9a,_0x56659a){_0x387f9a=_0x387f9a-0x0;var _0x49f2ec=_0xec39[_0x387f9a];return _0x49f2ec;};'use strict';var _=require(_0x9ec3('0x0'));var moment=require(_0x9ec3('0x1'));var BPromise=require(_0x9ec3('0x2'));var rs=require(_0x9ec3('0x3'));var Redis=require(_0x9ec3('0x4'));var db=require(_0x9ec3('0x5'))['db'];var logger=require(_0x9ec3('0x6'))('rpc');var config=require(_0x9ec3('0x7'));var jayson=require(_0x9ec3('0x8'));var client=jayson[_0x9ec3('0x9')]['http']({'port':0x232c});config['redis']=_['defaults'](config[_0x9ec3('0xa')],{'host':_0x9ec3('0xb'),'port':0x18eb});var socket=require(_0x9ec3('0xc'))(new Redis(config['redis']));require(_0x9ec3('0xd'))[_0x9ec3('0xe')](socket);function respondWithRpcPromise(_0x2e49f3,_0x2d0c30,_0x11c3e9){return new BPromise(function(_0x3347b6,_0x1c492e){return client['request'](_0x2e49f3,_0x11c3e9)[_0x9ec3('0xf')](function(_0xaa1307){logger[_0x9ec3('0x10')](_0x9ec3('0x11'),_0x2d0c30,_0x9ec3('0x12'));logger[_0x9ec3('0x13')](_0x9ec3('0x14'),_0x2d0c30,'request\x20sent',JSON[_0x9ec3('0x15')](_0xaa1307));if(_0xaa1307[_0x9ec3('0x16')]){if(_0xaa1307[_0x9ec3('0x16')]['code']===0x1f4){logger[_0x9ec3('0x16')]('MailAccount,\x20%s,\x20%s',_0x2d0c30,_0xaa1307[_0x9ec3('0x16')][_0x9ec3('0x17')]);return _0x1c492e(_0xaa1307[_0x9ec3('0x16')][_0x9ec3('0x17')]);}logger[_0x9ec3('0x16')](_0x9ec3('0x11'),_0x2d0c30,_0xaa1307[_0x9ec3('0x16')][_0x9ec3('0x17')]);return _0x3347b6(_0xaa1307[_0x9ec3('0x16')]['message']);}else{logger[_0x9ec3('0x10')]('MailAccount,\x20%s,\x20%s',_0x2d0c30,'request\x20sent');_0x3347b6(_0xaa1307[_0x9ec3('0x18')][_0x9ec3('0x17')]);}})[_0x9ec3('0x19')](function(_0xa3bade){logger[_0x9ec3('0x16')]('MailAccount,\x20%s,\x20%s',_0x2d0c30,_0xa3bade);_0x1c492e(_0xa3bade);});});}exports[_0x9ec3('0x1a')]=function(_0x4a413c){var _0x38343b=this;return new Promise(function(_0x58a7d8,_0x477a59){return db[_0x9ec3('0x1b')][_0x9ec3('0x1c')]({'raw':_0x4a413c['options']?_0x4a413c[_0x9ec3('0x1d')]['raw']===undefined?!![]:![]:!![],'where':_0x4a413c[_0x9ec3('0x1d')]?_0x4a413c['options'][_0x9ec3('0x1e')]||null:null,'attributes':_0x4a413c[_0x9ec3('0x1d')]?_0x4a413c[_0x9ec3('0x1d')][_0x9ec3('0x1f')]||null:null,'limit':_0x4a413c[_0x9ec3('0x1d')]?_0x4a413c[_0x9ec3('0x1d')][_0x9ec3('0x20')]||null:null,'include':_0x4a413c['options']?_0x4a413c[_0x9ec3('0x1d')][_0x9ec3('0x21')]?_[_0x9ec3('0x22')](_0x4a413c[_0x9ec3('0x1d')][_0x9ec3('0x21')],function(_0x366392){return{'model':db[_0x366392[_0x9ec3('0x23')]],'as':_0x366392['as'],'attributes':_0x366392[_0x9ec3('0x1f')],'include':_0x366392[_0x9ec3('0x21')]?_[_0x9ec3('0x22')](_0x366392[_0x9ec3('0x21')],function(_0x58d6fe){return{'model':db[_0x58d6fe[_0x9ec3('0x23')]],'as':_0x58d6fe['as'],'attributes':_0x58d6fe[_0x9ec3('0x1f')],'include':_0x58d6fe[_0x9ec3('0x21')]?_[_0x9ec3('0x22')](_0x58d6fe['include'],function(_0x1f7089){return{'model':db[_0x1f7089[_0x9ec3('0x23')]],'as':_0x1f7089['as'],'attributes':_0x1f7089[_0x9ec3('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x9ec3('0xf')](function(_0x257269){logger[_0x9ec3('0x10')](_0x9ec3('0x1a'),_0x4a413c);logger[_0x9ec3('0x13')](_0x9ec3('0x1a'),_0x4a413c,JSON[_0x9ec3('0x15')](_0x257269));_0x58a7d8(_0x257269);})[_0x9ec3('0x19')](function(_0x1a702d){logger[_0x9ec3('0x16')](_0x9ec3('0x1a'),_0x1a702d[_0x9ec3('0x17')],_0x4a413c);_0x477a59(_0x38343b[_0x9ec3('0x16')](0x1f4,_0x1a702d[_0x9ec3('0x17')]));});});};exports['ShowMailAccount']=function(_0x5caa5a){var _0x4c50fd=this;return new Promise(function(_0x1e86a7,_0x3c18a7){return db[_0x9ec3('0x1b')][_0x9ec3('0x24')]({'raw':_0x5caa5a[_0x9ec3('0x1d')]?_0x5caa5a[_0x9ec3('0x1d')][_0x9ec3('0x25')]===undefined?!![]:![]:!![],'where':_0x5caa5a['options']?_0x5caa5a[_0x9ec3('0x1d')][_0x9ec3('0x1e')]||null:null,'attributes':_0x5caa5a[_0x9ec3('0x1d')]?_0x5caa5a['options'][_0x9ec3('0x1f')]||null:null,'include':_0x5caa5a[_0x9ec3('0x1d')]?_0x5caa5a['options'][_0x9ec3('0x21')]?_[_0x9ec3('0x22')](_0x5caa5a[_0x9ec3('0x1d')][_0x9ec3('0x21')],function(_0x81ac36){return{'model':db[_0x81ac36[_0x9ec3('0x23')]],'as':_0x81ac36['as'],'attributes':_0x81ac36[_0x9ec3('0x1f')],'include':_0x81ac36['include']?_[_0x9ec3('0x22')](_0x81ac36[_0x9ec3('0x21')],function(_0x515055){return{'model':db[_0x515055['model']],'as':_0x515055['as'],'attributes':_0x515055[_0x9ec3('0x1f')],'include':_0x515055['include']?_[_0x9ec3('0x22')](_0x515055[_0x9ec3('0x21')],function(_0x1b9704){return{'model':db[_0x1b9704[_0x9ec3('0x23')]],'as':_0x1b9704['as'],'attributes':_0x1b9704['attributes']};}):[]};}):[]};}):[]:[]})[_0x9ec3('0xf')](function(_0x9b06ff){if(_0x5caa5a[_0x9ec3('0x1d')][_0x9ec3('0x26')]===!![])_0x9b06ff[_0x9ec3('0x27')](_0x9ec3('0x28'),_0x9b06ff['getSmtpOptions']());logger['info']('ShowMailAccount',_0x5caa5a);logger[_0x9ec3('0x13')](_0x9ec3('0x29'),_0x5caa5a,JSON[_0x9ec3('0x15')](_0x9b06ff));_0x1e86a7(_0x9b06ff);})[_0x9ec3('0x19')](function(_0x2e0b54){logger[_0x9ec3('0x16')]('ShowMailAccount',_0x2e0b54[_0x9ec3('0x17')],_0x5caa5a);_0x3c18a7(_0x4c50fd[_0x9ec3('0x16')](0x1f4,_0x2e0b54['message']));});});};exports[_0x9ec3('0x2a')]=function(_0x1bc5b7){var _0x28b32c=this;return new Promise(function(_0x2bafea,_0x4cc99b){var _0xc41a94={'body':_0x1bc5b7['body'],'channel':_0x9ec3('0x2b')};var _0x3f6cbe=_[_0x9ec3('0x2c')](_[_0x9ec3('0x2d')](db[_0x9ec3('0x2e')]['rawAttributes']),['createdAt',_0x9ec3('0x2f'),'CompanyId',_0x9ec3('0x30')]);var _0x4c4144=![];if(_0x1bc5b7[_0x9ec3('0x31')]['id']){delete _0x1bc5b7['body']['id'];}if(_[_0x9ec3('0x32')](_0x1bc5b7[_0x9ec3('0x31')]['from'])){return _0x4cc99b(_0x28b32c[_0x9ec3('0x16')](0x1f4,'from\x20is\x20mandatory'));}if(_[_0x9ec3('0x32')](_0x1bc5b7[_0x9ec3('0x31')]['body'])||_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x31')]===''){return _0x4cc99b(_0x28b32c[_0x9ec3('0x16')](0x1f4,'body\x20is\x20mandatory\x20and\x20not\x20empty'));}if(_[_0x9ec3('0x32')](_0x1bc5b7[_0x9ec3('0x31')]['mapKey'])){return _0x4cc99b(_0x28b32c[_0x9ec3('0x16')](0x1f4,_0x9ec3('0x33')+_0x3f6cbe));}if(!_[_0x9ec3('0x34')](_0x3f6cbe,_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x35')])){return _0x4cc99b(_0x28b32c[_0x9ec3('0x16')](0x1f4,_0x9ec3('0x36')+_0x3f6cbe));}var _0x340d52={};_0x340d52[_0x1bc5b7['body']['mapKey']]=_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x37')];return db['MailAccount'][_0x9ec3('0x24')]({'where':{'id':_0x1bc5b7[_0x9ec3('0x38')]['id']},'include':[{'model':db['CmList'],'as':_0x9ec3('0x39'),'include':[{'model':db[_0x9ec3('0x2e')],'as':_0x9ec3('0x3a'),'where':_0x340d52,'limit':0x1,'order':[[_0x9ec3('0x2f'),_0x9ec3('0x3b')]]}]},{'model':db[_0x9ec3('0x3c')],'as':_0x9ec3('0x3d')},{'model':db[_0x9ec3('0x3e')],'as':_0x9ec3('0x3f'),'include':[{'model':db[_0x9ec3('0x40')],'as':_0x9ec3('0x40')}]}]})[_0x9ec3('0xf')](function(_0x284088){if(_0x284088&&_0x284088['List']){var _0x60ac46=_0x284088['get']({'plain':!![]});_0xc41a94[_0x9ec3('0x38')]=_[_0x9ec3('0x41')](_0x60ac46,[_0x9ec3('0x3d'),'List']);_0xc41a94['account']['smtpOptions']=_0x284088[_0x9ec3('0x42')]();_0xc41a94[_0x9ec3('0x43')]=_0x60ac46[_0x9ec3('0x3d')];_0xc41a94['list']=_0x60ac46['List'];_0xc41a94['applications']=_[_0x9ec3('0x44')](_0xc41a94[_0x9ec3('0x43')],[_0x9ec3('0x45')],[_0x9ec3('0x46')]);if(_0xc41a94[_0x9ec3('0x38')]&&_0xc41a94[_0x9ec3('0x38')]['autoclose']){_0xc41a94[_0x9ec3('0x43')][_0x9ec3('0x47')]({'id':0x0,'priority':_0xc41a94[_0x9ec3('0x43')][_0x9ec3('0x48')]+0x1,'app':_0x9ec3('0x49'),'appdata':_0x9ec3('0x4a'),'interval':_0x9ec3('0x4b')});}if(_0xc41a94[_0x9ec3('0x38')][_0x9ec3('0x3d')]){delete _0xc41a94[_0x9ec3('0x38')][_0x9ec3('0x3d')];}if(_0xc41a94['account']['List']){delete _0xc41a94[_0x9ec3('0x38')][_0x9ec3('0x39')];}if(_0x60ac46['List'][_0x9ec3('0x3a')]['length']){return _0x60ac46['List'][_0x9ec3('0x3a')][0x0];}var _0x59538a=_['defaults'](_0x1bc5b7[_0x9ec3('0x31')],{'firstName':_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x37')],'ListId':_0x60ac46[_0x9ec3('0x30')]});_0x59538a[_0x1bc5b7[_0x9ec3('0x31')]['mapKey']]=_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x37')];return db['CmContact'][_0x9ec3('0x4c')](_0x59538a);}else{throw new Error('List\x20not\x20found');}})[_0x9ec3('0xf')](function(_0x1d7b7d){_0xc41a94[_0x9ec3('0x4d')]=_0x1d7b7d;if(_0x1d7b7d){if(!_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x17')][_0x9ec3('0x4e')]){_0x1bc5b7[_0x9ec3('0x31')]['message']['messageId']=rs['generate']()+'\x20'+_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x17')][_0x9ec3('0x37')];}var _0x3f3856={'ContactId':_0x1d7b7d['id'],'MailAccountId':_0x1bc5b7[_0x9ec3('0x38')]['id'],'inReplyTo':_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x17')][_0x9ec3('0x4e')],'to':_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x17')][_0x9ec3('0x37')],'cc':_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x17')]['cc'],'subject':_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x17')]['subject'],'attach':_0x1bc5b7['body'][_0x9ec3('0x17')][_0x9ec3('0x4f')],'lastMsgAt':moment()[_0x9ec3('0x50')](_0x9ec3('0x51')),'lastMsgDirection':'in'};return db[_0x9ec3('0x52')][_0x9ec3('0x24')]({'where':{'closed':![],'MailAccountId':_0x1bc5b7['account']['id']},'include':[{'model':db[_0x9ec3('0x53')],'as':'Messages','attributes':[_0x9ec3('0x4e')],'where':{'messageId':_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x17')][_0x9ec3('0x54')]}}]})['then'](function(_0x49b882){if(_0x49b882){return[_0x49b882,![]];}return db[_0x9ec3('0x52')]['create'](_0x3f3856)[_0x9ec3('0xf')](function(_0x1aac06){return[_0x1aac06,!![]];});});}else{throw new Error('Contact\x20not\x20found');}})[_0x9ec3('0x55')](function(_0x4b4045,_0xbbfd0f){if(_0x4b4045){_0x4c4144=_0xbbfd0f;if(!_0xbbfd0f){return _0x4b4045[_0x9ec3('0x56')]({'inReplyTo':_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x17')][_0x9ec3('0x4e')],'to':_0x1bc5b7['body']['message'][_0x9ec3('0x37')],'cc':_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x17')]['cc'],'subject':_0x1bc5b7[_0x9ec3('0x31')]['message']['subject'],'attach':_0x4b4045[_0x9ec3('0x4f')]?_0x4b4045[_0x9ec3('0x4f')]:_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x17')][_0x9ec3('0x4f')],'substatus':null,'substatusAt':moment()[_0x9ec3('0x50')](_0x9ec3('0x51')),'lastMsgAt':moment()['format'](_0x9ec3('0x51')),'lastMsgDirection':'in'});}else{return _0x4b4045;}}})[_0x9ec3('0xf')](function(_0x4ad9e0){_0xc41a94[_0x9ec3('0x57')]=_0x4ad9e0['get']({'plain':!![]});_0xc41a94[_0x9ec3('0x57')]['created']=_0x4c4144;return db[_0x9ec3('0x53')][_0x9ec3('0x4c')]({'body':_0x1bc5b7[_0x9ec3('0x31')]['body'],'MailAccountId':_0x1bc5b7['account']['id'],'MailInteractionId':_0x4ad9e0['id'],'direction':'in','ContactId':_0xc41a94[_0x9ec3('0x4d')]['id'],'messageId':_0x1bc5b7[_0x9ec3('0x31')]['message'][_0x9ec3('0x4e')],'from':_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x17')][_0x9ec3('0x37')],'to':_0x1bc5b7[_0x9ec3('0x31')]['message']['to'],'cc':_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x17')]['cc'],'subject':_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x17')][_0x9ec3('0x58')],'attach':_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x17')][_0x9ec3('0x4f')],'Attachments':_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x17')][_0x9ec3('0x59')],'originTo':_0x1bc5b7[_0x9ec3('0x31')]['message'][_0x9ec3('0x5a')],'originCc':_0x1bc5b7[_0x9ec3('0x31')]['message'][_0x9ec3('0x5b')],'bcc':_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x17')][_0x9ec3('0x5c')],'ChatWebsiteId':_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x17')][_0x9ec3('0x5d')]||null,'originChannel':_0x1bc5b7[_0x9ec3('0x31')][_0x9ec3('0x17')][_0x9ec3('0x5e')]||_0x9ec3('0x5f'),'ChatOfflineMessageId':_0x1bc5b7['body']['message']['ChatOfflineMessageId']||null},{'include':[{'model':db[_0x9ec3('0x60')],'as':_0x9ec3('0x61')}]});})['then'](function(_0x9c149e){_0xc41a94[_0x9ec3('0x17')]=_0x9c149e;if(!_0xc41a94[_0x9ec3('0x57')][_0x9ec3('0x62')]){return;}return db[_0x9ec3('0x63')][_0x9ec3('0x24')]({'attributes':['id',_0x9ec3('0x64')],'where':{'id':_0xc41a94['interaction'][_0x9ec3('0x62')]}});})[_0x9ec3('0xf')](function(_0x1ac7fd){if(_0x1ac7fd){_0xc41a94['applications'][_0x9ec3('0x65')]({'id':0x0,'priority':0x0,'app':_0x9ec3('0x66'),'appdata':_0x1ac7fd[_0x9ec3('0x64')]+','+(_0xc41a94[_0x9ec3('0x38')][_0x9ec3('0x67')]||0xa),'interval':_0x9ec3('0x4b')});}if(!_0xc41a94[_0x9ec3('0x57')][_0x9ec3('0x68')]){return;}return db[_0x9ec3('0x69')][_0x9ec3('0x24')]({'attributes':['id',_0x9ec3('0x64')],'where':{'id':_0xc41a94[_0x9ec3('0x57')][_0x9ec3('0x68')]}});})[_0x9ec3('0xf')](function(_0xd43828){if(_0xd43828){_0xc41a94[_0x9ec3('0x43')]['unshift']({'id':0x0,'priority':0x1,'app':_0x9ec3('0x6a'),'appdata':_0xd43828[_0x9ec3('0x64')]+','+(_0xc41a94[_0x9ec3('0x38')][_0x9ec3('0x6b')]||0x12c),'interval':_0x9ec3('0x4b')});}return respondWithRpcPromise(_0x9ec3('0x6c'),_0x9ec3('0x6d'),_0xc41a94);})[_0x9ec3('0xf')](function(_0xe15edf){_0x2bafea(_0xe15edf);})['catch'](function(_0x4d890b){_0x4cc99b(_0x28b32c[_0x9ec3('0x16')](0x1f4,_0x4d890b[_0x9ec3('0x17')]));});});};
\ No newline at end of file
index 82052df..1aafbd8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xed3d=['register','mailAccount:','save','remove','update','emit'];(function(_0x216586,_0x2e9346){var _0x2c0807=function(_0x3ade09){while(--_0x3ade09){_0x216586['push'](_0x216586['shift']());}};_0x2c0807(++_0x2e9346);}(_0xed3d,0xe6));var _0xded3=function(_0x254f63,_0x240e06){_0x254f63=_0x254f63-0x0;var _0x252ada=_0xed3d[_0x254f63];return _0x252ada;};'use strict';var MailAccountEvents=require('./mailAccount.events');var events=[_0xded3('0x0'),_0xded3('0x1'),_0xded3('0x2')];function createListener(_0x4e3eda,_0x4ce1db){return function(_0x49f5bb){_0x4ce1db[_0xded3('0x3')](_0x4e3eda,_0x49f5bb);};}function removeListener(_0x3afba7,_0x4aa5f2){return function(){MailAccountEvents['removeListener'](_0x3afba7,_0x4aa5f2);};}exports[_0xded3('0x4')]=function(_0x538d65){for(var _0x126f88=0x0,_0x2522c1=events['length'];_0x126f88<_0x2522c1;_0x126f88++){var _0x14303f=events[_0x126f88];var _0x4bbde2=createListener(_0xded3('0x5')+_0x14303f,_0x538d65);MailAccountEvents['on'](_0x14303f,_0x4bbde2);}};
\ No newline at end of file
+var _0x3a22=['mailAccount:','./mailAccount.events','remove','update','removeListener','length'];(function(_0x4b60a7,_0x522143){var _0xfe1b8f=function(_0x1f1141){while(--_0x1f1141){_0x4b60a7['push'](_0x4b60a7['shift']());}};_0xfe1b8f(++_0x522143);}(_0x3a22,0xa9));var _0x23a2=function(_0x1edf87,_0x563a1e){_0x1edf87=_0x1edf87-0x0;var _0x2bc33b=_0x3a22[_0x1edf87];return _0x2bc33b;};'use strict';var MailAccountEvents=require(_0x23a2('0x0'));var events=['save',_0x23a2('0x1'),_0x23a2('0x2')];function createListener(_0x2a9de1,_0x30c251){return function(_0x35d0e4){_0x30c251['emit'](_0x2a9de1,_0x35d0e4);};}function removeListener(_0x196afc,_0x24affa){return function(){MailAccountEvents[_0x23a2('0x3')](_0x196afc,_0x24affa);};}exports['register']=function(_0x4c6398){for(var _0x488223=0x0,_0x8ac91d=events[_0x23a2('0x4')];_0x488223<_0x8ac91d;_0x488223++){var _0x29077b=events[_0x488223];var _0x46f002=createListener(_0x23a2('0x5')+_0x29077b,_0x4c6398);MailAccountEvents['on'](_0x29077b,_0x46f002);}};
\ No newline at end of file
index b5a0839..1b59c1b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa76e=['fs-extra','../../components/interaction/service','../../config/environment','./mailApplication.controller','/:id','isAuthenticated','put','delete','destroy','exports','multer','util','connect-timeout','Router'];(function(_0x211732,_0x257a3e){var _0x5eae81=function(_0x18a7f9){while(--_0x18a7f9){_0x211732['push'](_0x211732['shift']());}};_0x5eae81(++_0x257a3e);}(_0xa76e,0x6c));var _0xea76=function(_0x2c2980,_0x34282a){_0x2c2980=_0x2c2980-0x0;var _0x2a20a9=_0xa76e[_0x2c2980];return _0x2a20a9;};'use strict';var multer=require(_0xea76('0x0'));var util=require(_0xea76('0x1'));var path=require('path');var timeout=require(_0xea76('0x2'));var express=require('express');var router=express[_0xea76('0x3')]();var fs_extra=require(_0xea76('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0xea76('0x5'));var config=require(_0xea76('0x6'));var controller=require(_0xea76('0x7'));router['get'](_0xea76('0x8'),auth[_0xea76('0x9')](),controller['show']);router[_0xea76('0xa')](_0xea76('0x8'),auth[_0xea76('0x9')](),controller['update']);router[_0xea76('0xb')](_0xea76('0x8'),auth[_0xea76('0x9')](),controller[_0xea76('0xc')]);module[_0xea76('0xd')]=router;
\ No newline at end of file
+var _0x515f=['../../components/auth/service','../../components/interaction/service','../../config/environment','/:id','isAuthenticated','show','update','delete','exports','multer','util','path','express','Router','fs-extra'];(function(_0x2bb973,_0x17a18d){var _0x193933=function(_0x61145c){while(--_0x61145c){_0x2bb973['push'](_0x2bb973['shift']());}};_0x193933(++_0x17a18d);}(_0x515f,0x171));var _0xf515=function(_0x3c43f7,_0x1d6dd5){_0x3c43f7=_0x3c43f7-0x0;var _0xe770d2=_0x515f[_0x3c43f7];return _0xe770d2;};'use strict';var multer=require(_0xf515('0x0'));var util=require(_0xf515('0x1'));var path=require(_0xf515('0x2'));var timeout=require('connect-timeout');var express=require(_0xf515('0x3'));var router=express[_0xf515('0x4')]();var fs_extra=require(_0xf515('0x5'));var auth=require(_0xf515('0x6'));var interaction=require(_0xf515('0x7'));var config=require(_0xf515('0x8'));var controller=require('./mailApplication.controller');router['get'](_0xf515('0x9'),auth[_0xf515('0xa')](),controller[_0xf515('0xb')]);router['put'](_0xf515('0x9'),auth[_0xf515('0xa')](),controller[_0xf515('0xc')]);router[_0xf515('0xd')](_0xf515('0x9'),auth[_0xf515('0xa')](),controller['destroy']);module[_0xf515('0xe')]=router;
\ No newline at end of file
index f1bb1a5..436bab7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x064e=['STRING','*,*,*,*','sequelize','exports','INTEGER'];(function(_0x383620,_0x57b3aa){var _0x49293c=function(_0x1ae7ea){while(--_0x1ae7ea){_0x383620['push'](_0x383620['shift']());}};_0x49293c(++_0x57b3aa);}(_0x064e,0xe8));var _0xe064=function(_0x312d64,_0x2ae942){_0x312d64=_0x312d64-0x0;var _0x2bfb83=_0x064e[_0x312d64];return _0x2bfb83;};'use strict';var Sequelize=require(_0xe064('0x0'));module[_0xe064('0x1')]={'priority':{'type':Sequelize[_0xe064('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0xe064('0x3')],'allowNull':![],'defaultValue':'noop'},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize[_0xe064('0x3')]},'interval':{'type':Sequelize[_0xe064('0x3')],'defaultValue':_0xe064('0x4')}};
\ No newline at end of file
+var _0xe9e8=['STRING','noop','TEXT','*,*,*,*','sequelize','exports'];(function(_0x40220a,_0x22feb1){var _0x3903cc=function(_0x33a296){while(--_0x33a296){_0x40220a['push'](_0x40220a['shift']());}};_0x3903cc(++_0x22feb1);}(_0xe9e8,0x13c));var _0x8e9e=function(_0x3006fe,_0x3d6d0b){_0x3006fe=_0x3006fe-0x0;var _0x520dc4=_0xe9e8[_0x3006fe];return _0x520dc4;};'use strict';var Sequelize=require(_0x8e9e('0x0'));module[_0x8e9e('0x1')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0x8e9e('0x2')],'allowNull':![],'defaultValue':_0x8e9e('0x3')},'appdata':{'type':Sequelize[_0x8e9e('0x4')]()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize['STRING'],'defaultValue':_0x8e9e('0x5')}};
\ No newline at end of file
index b32cd16..cbd8992 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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(_0xed9c3b,_0x594a76){var _0x8df122=function(_0x220a9d){while(--_0x220a9d){_0xed9c3b['push'](_0xed9c3b['shift']());}};_0x8df122(++_0x594a76);}(_0xa9e0,0x123));var _0x0a9e=function(_0x92c450,_0x41f1e3){_0x92c450=_0x92c450-0x0;var _0x2a9599=_0xa9e0[_0x92c450];return _0x2a9599;};'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
+var _0xda3f=['includeAll','include','merge','find','catch','body','MailApplication','destroy','rimraf','zip-dir','bluebird','util','path','to-csv','ejs','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','../../mysqldb','sendStatus','status','offset','undefined','limit','count','set','Content-Range','json','apply','reject','update','then','end','stack','name','send','params','model','keys','query','filters','intersection','attributes','fields','length'];(function(_0x563f7d,_0x7bfbcb){var _0x5984dc=function(_0x41b6c1){while(--_0x41b6c1){_0x563f7d['push'](_0x563f7d['shift']());}};_0x5984dc(++_0x7bfbcb);}(_0xda3f,0xec));var _0xfda3=function(_0x27d2b5,_0x2a1c05){_0x27d2b5=_0x27d2b5-0x0;var _0x3f8463=_0xda3f[_0x27d2b5];return _0x3f8463;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xfda3('0x0'));var zipdir=require(_0xfda3('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xfda3('0x2'));var Mustache=require('mustache');var util=require(_0xfda3('0x3'));var path=require(_0xfda3('0x4'));var sox=require('sox');var csv=require(_0xfda3('0x5'));var ejs=require(_0xfda3('0x6'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xfda3('0x7'));var crypto=require(_0xfda3('0x8'));var jsforce=require(_0xfda3('0x9'));var deskjs=require(_0xfda3('0xa'));var toCsv=require(_0xfda3('0x5'));var querystring=require(_0xfda3('0xb'));var Papa=require(_0xfda3('0xc'));var Redis=require(_0xfda3('0xd'));var authService=require(_0xfda3('0xe'));var qs=require(_0xfda3('0xf'));var as=require(_0xfda3('0x10'));var hardwareService=require(_0xfda3('0x11'));var logger=require('../../config/logger')(_0xfda3('0x12'));var utils=require(_0xfda3('0x13'));var config=require(_0xfda3('0x14'));var licenseUtil=require(_0xfda3('0x15'));var db=require(_0xfda3('0x16'))['db'];function respondWithStatusCode(_0x4b77ea,_0x583125){_0x583125=_0x583125||0xcc;return function(_0x5d7d5b){if(_0x5d7d5b){return _0x4b77ea[_0xfda3('0x17')](_0x583125);}return _0x4b77ea[_0xfda3('0x18')](_0x583125)['end']();};}function respondWithResult(_0x501588,_0x587e9b){_0x587e9b=_0x587e9b||0xc8;return function(_0x227d72){if(_0x227d72){return _0x501588[_0xfda3('0x18')](_0x587e9b)['json'](_0x227d72);}};}function respondWithFilteredResult(_0x57a229,_0x533365){return function(_0x80ea80){if(_0x80ea80){var _0x474707=typeof _0x533365[_0xfda3('0x19')]===_0xfda3('0x1a')&&typeof _0x533365[_0xfda3('0x1b')]===_0xfda3('0x1a');var _0x2aadcb=_0x80ea80[_0xfda3('0x1c')];var _0x4680bf=_0x474707?0x0:_0x533365[_0xfda3('0x19')];var _0x54a7c6=_0x474707?_0x80ea80[_0xfda3('0x1c')]:_0x533365[_0xfda3('0x19')]+_0x533365[_0xfda3('0x1b')];var _0x32855a;if(_0x54a7c6>=_0x2aadcb){_0x54a7c6=_0x2aadcb;_0x32855a=0xc8;}else{_0x32855a=0xce;}_0x57a229['status'](_0x32855a);return _0x57a229[_0xfda3('0x1d')](_0xfda3('0x1e'),_0x4680bf+'-'+_0x54a7c6+'/'+_0x2aadcb)[_0xfda3('0x1f')](_0x80ea80);}return null;};}function patchUpdates(_0x51e731){return function(_0x5ad52a){try{jsonpatch[_0xfda3('0x20')](_0x5ad52a,_0x51e731,!![]);}catch(_0x38d428){return BPromise[_0xfda3('0x21')](_0x38d428);}return _0x5ad52a['save']();};}function saveUpdates(_0x3cf5a9,_0xef2535){return function(_0x1e15a8){if(_0x1e15a8){return _0x1e15a8[_0xfda3('0x22')](_0x3cf5a9)[_0xfda3('0x23')](function(_0x2b84b7){return _0x2b84b7;});}return null;};}function removeEntity(_0x2677f6,_0xc6fb9a){return function(_0x16eaa6){if(_0x16eaa6){return _0x16eaa6['destroy']()[_0xfda3('0x23')](function(){_0x2677f6[_0xfda3('0x18')](0xcc)[_0xfda3('0x24')]();});}};}function handleEntityNotFound(_0x4ae9b9,_0x45a977){return function(_0x39e246){if(!_0x39e246){_0x4ae9b9[_0xfda3('0x17')](0x194);}return _0x39e246;};}function handleError(_0x38946d,_0x1cb831){_0x1cb831=_0x1cb831||0x1f4;return function(_0xad9f7b){logger['error'](_0xad9f7b[_0xfda3('0x25')]);if(_0xad9f7b[_0xfda3('0x26')]){delete _0xad9f7b[_0xfda3('0x26')];}_0x38946d[_0xfda3('0x18')](_0x1cb831)[_0xfda3('0x27')](_0xad9f7b);};}exports['show']=function(_0x3c1549,_0x4101b1){var _0x301509={'raw':!![],'where':{'id':_0x3c1549[_0xfda3('0x28')]['id']}},_0x474992={};_0x474992[_0xfda3('0x29')]=_[_0xfda3('0x2a')](db['MailApplication']['rawAttributes']);_0x474992[_0xfda3('0x2b')]=_['keys'](_0x3c1549['query']);_0x474992[_0xfda3('0x2c')]=_[_0xfda3('0x2d')](_0x474992[_0xfda3('0x29')],_0x474992[_0xfda3('0x2b')]);_0x301509[_0xfda3('0x2e')]=_[_0xfda3('0x2d')](_0x474992[_0xfda3('0x29')],qs[_0xfda3('0x2f')](_0x3c1549[_0xfda3('0x2b')]['fields']));_0x301509[_0xfda3('0x2e')]=_0x301509[_0xfda3('0x2e')][_0xfda3('0x30')]?_0x301509[_0xfda3('0x2e')]:_0x474992[_0xfda3('0x29')];if(_0x3c1549[_0xfda3('0x2b')][_0xfda3('0x31')]){_0x301509[_0xfda3('0x32')]=[{'all':!![]}];}_0x301509=_[_0xfda3('0x33')]({},_0x301509,_0x3c1549['options']);return db['MailApplication'][_0xfda3('0x34')](_0x301509)[_0xfda3('0x23')](handleEntityNotFound(_0x4101b1,null))['then'](respondWithResult(_0x4101b1,null))[_0xfda3('0x35')](handleError(_0x4101b1,null));};exports[_0xfda3('0x22')]=function(_0x28ca96,_0x52ee98){if(_0x28ca96[_0xfda3('0x36')]['id']){delete _0x28ca96[_0xfda3('0x36')]['id'];}return db[_0xfda3('0x37')][_0xfda3('0x34')]({'where':{'id':_0x28ca96[_0xfda3('0x28')]['id']}})['then'](handleEntityNotFound(_0x52ee98,null))[_0xfda3('0x23')](saveUpdates(_0x28ca96[_0xfda3('0x36')],null))[_0xfda3('0x23')](respondWithResult(_0x52ee98,null))['catch'](handleError(_0x52ee98,null));};exports[_0xfda3('0x38')]=function(_0x4854b1,_0x2d9a3f){return db[_0xfda3('0x37')][_0xfda3('0x34')]({'where':{'id':_0x4854b1[_0xfda3('0x28')]['id']}})[_0xfda3('0x23')](handleEntityNotFound(_0x2d9a3f,null))[_0xfda3('0x23')](removeEntity(_0x2d9a3f,null))[_0xfda3('0x35')](handleError(_0x2d9a3f,null));};
\ No newline at end of file
index d6c372a..5e7e4d3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xee48=['rimraf','../../config/environment','./mailApplication.attributes','exports','mail_applications','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x39132b,_0x2ab32f){var _0x5ef904=function(_0x136b0a){while(--_0x136b0a){_0x39132b['push'](_0x39132b['shift']());}};_0x5ef904(++_0x2ab32f);}(_0xee48,0x18d));var _0x8ee4=function(_0x587fb5,_0x59cb3b){_0x587fb5=_0x587fb5-0x0;var _0x551105=_0xee48[_0x587fb5];return _0x551105;};'use strict';var _=require(_0x8ee4('0x0'));var util=require(_0x8ee4('0x1'));var logger=require(_0x8ee4('0x2'))(_0x8ee4('0x3'));var moment=require(_0x8ee4('0x4'));var BPromise=require(_0x8ee4('0x5'));var rp=require(_0x8ee4('0x6'));var fs=require('fs');var path=require(_0x8ee4('0x7'));var rimraf=require(_0x8ee4('0x8'));var config=require(_0x8ee4('0x9'));var attributes=require(_0x8ee4('0xa'));module[_0x8ee4('0xb')]=function(_0xbaadb1,_0x31ffab){return _0xbaadb1['define']('MailApplication',attributes,{'tableName':_0x8ee4('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x8ee4('0xd'),'collate':_0x8ee4('0xe')});};
\ No newline at end of file
+var _0x605d=['../../config/logger','api','request-promise','path','rimraf','../../config/environment','./mailApplication.attributes','exports','MailApplication','mail_applications','utf8mb4','utf8mb4_unicode_ci','lodash','util'];(function(_0xfab612,_0x4723da){var _0x1671b4=function(_0x32a24b){while(--_0x32a24b){_0xfab612['push'](_0xfab612['shift']());}};_0x1671b4(++_0x4723da);}(_0x605d,0xde));var _0xd605=function(_0x46884f,_0x2b5c5a){_0x46884f=_0x46884f-0x0;var _0x78c6c0=_0x605d[_0x46884f];return _0x78c6c0;};'use strict';var _=require(_0xd605('0x0'));var util=require(_0xd605('0x1'));var logger=require(_0xd605('0x2'))(_0xd605('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xd605('0x4'));var fs=require('fs');var path=require(_0xd605('0x5'));var rimraf=require(_0xd605('0x6'));var config=require(_0xd605('0x7'));var attributes=require(_0xd605('0x8'));module[_0xd605('0x9')]=function(_0x8b67af,_0x638497){return _0x8b67af['define'](_0xd605('0xa'),attributes,{'tableName':_0xd605('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xd605('0xc'),'collate':_0xd605('0xd')});};
\ No newline at end of file
index 9177374..85d8bb5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4f08=['error','code','MailApplication,\x20%s,\x20%s','message','info','catch','UpdateMailApplication','MailApplication','raw','options','where','limit','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','request','then','request\x20sent','debug','MailApplication,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x30e7f9,_0x2c2073){var _0x2d0590=function(_0x557023){while(--_0x557023){_0x30e7f9['push'](_0x30e7f9['shift']());}};_0x2d0590(++_0x2c2073);}(_0x4f08,0x194));var _0x84f0=function(_0x2abe54,_0x2e6fed){_0x2abe54=_0x2abe54-0x0;var _0x168961=_0x4f08[_0x2abe54];return _0x168961;};'use strict';var _=require(_0x84f0('0x0'));var util=require(_0x84f0('0x1'));var moment=require('moment');var BPromise=require(_0x84f0('0x2'));var rs=require(_0x84f0('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x84f0('0x4'))['db'];var utils=require(_0x84f0('0x5'));var logger=require(_0x84f0('0x6'))('rpc');var config=require(_0x84f0('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x84f0('0x8')][_0x84f0('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4548f3,_0x5a877f,_0x430993){return new BPromise(function(_0x42f42e,_0x15b01d){return client[_0x84f0('0xa')](_0x4548f3,_0x430993)[_0x84f0('0xb')](function(_0x1b256f){logger['info']('MailApplication,\x20%s,\x20%s',_0x5a877f,_0x84f0('0xc'));logger[_0x84f0('0xd')](_0x84f0('0xe'),_0x5a877f,_0x84f0('0xc'),JSON[_0x84f0('0xf')](_0x1b256f));if(_0x1b256f[_0x84f0('0x10')]){if(_0x1b256f[_0x84f0('0x10')][_0x84f0('0x11')]===0x1f4){logger[_0x84f0('0x10')]('MailApplication,\x20%s,\x20%s',_0x5a877f,_0x1b256f[_0x84f0('0x10')]['message']);return _0x15b01d(_0x1b256f[_0x84f0('0x10')]['message']);}logger[_0x84f0('0x10')](_0x84f0('0x12'),_0x5a877f,_0x1b256f[_0x84f0('0x10')][_0x84f0('0x13')]);return _0x42f42e(_0x1b256f[_0x84f0('0x10')][_0x84f0('0x13')]);}else{logger[_0x84f0('0x14')](_0x84f0('0x12'),_0x5a877f,_0x84f0('0xc'));_0x42f42e(_0x1b256f['result'][_0x84f0('0x13')]);}})[_0x84f0('0x15')](function(_0x9e40a8){logger['error']('MailApplication,\x20%s,\x20%s',_0x5a877f,_0x9e40a8);_0x15b01d(_0x9e40a8);});});}exports[_0x84f0('0x16')]=function(_0x295fe5){var _0x2906a8=this;return new Promise(function(_0x40f536,_0x46dc6e){return db[_0x84f0('0x17')]['update'](_0x295fe5['body'],{'raw':_0x295fe5['options']?_0x295fe5['options'][_0x84f0('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x295fe5['options']?_0x295fe5[_0x84f0('0x19')][_0x84f0('0x1a')]||null:null,'attributes':_0x295fe5[_0x84f0('0x19')]?_0x295fe5[_0x84f0('0x19')]['attributes']||null:null,'limit':_0x295fe5[_0x84f0('0x19')]?_0x295fe5[_0x84f0('0x19')][_0x84f0('0x1b')]||null:null})['then'](function(_0x5662e1){logger[_0x84f0('0x14')](_0x84f0('0x16'),_0x295fe5);logger[_0x84f0('0xd')](_0x84f0('0x16'),_0x295fe5,JSON[_0x84f0('0xf')](_0x5662e1));_0x40f536(_0x5662e1);})['catch'](function(_0x923f56){logger['error']('UpdateMailApplication',_0x923f56[_0x84f0('0x13')],_0x295fe5);_0x46dc6e(_0x2906a8[_0x84f0('0x10')](0x1f4,_0x923f56[_0x84f0('0x13')]));});});};
\ No newline at end of file
+var _0x0638=['moment','../../mysqldb','rpc','../../config/environment','client','http','request','then','MailApplication,\x20%s,\x20%s','MailApplication,\x20%s,\x20%s,\x20%s','error','code','message','info','request\x20sent','UpdateMailApplication','MailApplication','update','body','options','raw','where','attributes','limit','debug','lodash'];(function(_0x1d664a,_0x149a34){var _0x335345=function(_0x461fac){while(--_0x461fac){_0x1d664a['push'](_0x1d664a['shift']());}};_0x335345(++_0x149a34);}(_0x0638,0x1b9));var _0x8063=function(_0x1e93fa,_0x210f48){_0x1e93fa=_0x1e93fa-0x0;var _0xd4e1e6=_0x0638[_0x1e93fa];return _0xd4e1e6;};'use strict';var _=require(_0x8063('0x0'));var util=require('util');var moment=require(_0x8063('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8063('0x2'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x8063('0x3'));var config=require(_0x8063('0x4'));var jayson=require('jayson/promise');var client=jayson[_0x8063('0x5')][_0x8063('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x2775cd,_0x48a987,_0x198e08){return new BPromise(function(_0x39bea2,_0x22f069){return client[_0x8063('0x7')](_0x2775cd,_0x198e08)[_0x8063('0x8')](function(_0x245a0d){logger['info'](_0x8063('0x9'),_0x48a987,'request\x20sent');logger['debug'](_0x8063('0xa'),_0x48a987,'request\x20sent',JSON['stringify'](_0x245a0d));if(_0x245a0d[_0x8063('0xb')]){if(_0x245a0d[_0x8063('0xb')][_0x8063('0xc')]===0x1f4){logger[_0x8063('0xb')](_0x8063('0x9'),_0x48a987,_0x245a0d[_0x8063('0xb')][_0x8063('0xd')]);return _0x22f069(_0x245a0d[_0x8063('0xb')][_0x8063('0xd')]);}logger['error'](_0x8063('0x9'),_0x48a987,_0x245a0d[_0x8063('0xb')][_0x8063('0xd')]);return _0x39bea2(_0x245a0d[_0x8063('0xb')]['message']);}else{logger[_0x8063('0xe')](_0x8063('0x9'),_0x48a987,_0x8063('0xf'));_0x39bea2(_0x245a0d['result'][_0x8063('0xd')]);}})['catch'](function(_0x491cf7){logger['error'](_0x8063('0x9'),_0x48a987,_0x491cf7);_0x22f069(_0x491cf7);});});}exports[_0x8063('0x10')]=function(_0x102393){var _0x3de6e4=this;return new Promise(function(_0x554175,_0x50e58f){return db[_0x8063('0x11')][_0x8063('0x12')](_0x102393[_0x8063('0x13')],{'raw':_0x102393[_0x8063('0x14')]?_0x102393['options'][_0x8063('0x15')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x102393['options']?_0x102393[_0x8063('0x14')][_0x8063('0x16')]||null:null,'attributes':_0x102393[_0x8063('0x14')]?_0x102393[_0x8063('0x14')][_0x8063('0x17')]||null:null,'limit':_0x102393[_0x8063('0x14')]?_0x102393[_0x8063('0x14')][_0x8063('0x18')]||null:null})[_0x8063('0x8')](function(_0x5d1832){logger[_0x8063('0xe')]('UpdateMailApplication',_0x102393);logger[_0x8063('0x19')](_0x8063('0x10'),_0x102393,JSON['stringify'](_0x5d1832));_0x554175(_0x5d1832);})['catch'](function(_0x1c2d05){logger[_0x8063('0xb')](_0x8063('0x10'),_0x1c2d05['message'],_0x102393);_0x50e58f(_0x3de6e4[_0x8063('0xb')](0x1f4,_0x1c2d05[_0x8063('0xd')]));});});};
\ No newline at end of file
index d3bb73f..92bf821 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa48b=['create','addMessage','/:id/tags','mail','mailinteraction:addtags','addTags','put','/:id','tracked','update','delete','mailinteraction:destroy','Router','../../components/interaction/service','./mailInteraction.controller','get','isAuthenticated','index','/describe','describe','/:id/messages','/:id/download','download','post'];(function(_0x48e348,_0x3e7b30){var _0x29016a=function(_0x1fcfc4){while(--_0x1fcfc4){_0x48e348['push'](_0x48e348['shift']());}};_0x29016a(++_0x3e7b30);}(_0xa48b,0x1d4));var _0xba48=function(_0x35fbfb,_0x564ab8){_0x35fbfb=_0x35fbfb-0x0;var _0x293f82=_0xa48b[_0x35fbfb];return _0x293f82;};'use strict';var express=require('express');var router=express[_0xba48('0x0')]();var auth=require('../../components/auth/service');var interaction=require(_0xba48('0x1'));var controller=require(_0xba48('0x2'));router[_0xba48('0x3')]('/',auth[_0xba48('0x4')](),controller[_0xba48('0x5')]);router[_0xba48('0x3')](_0xba48('0x6'),auth[_0xba48('0x4')](),controller[_0xba48('0x7')]);router[_0xba48('0x3')]('/:id',auth['isAuthenticated'](),controller['show']);router[_0xba48('0x3')](_0xba48('0x8'),auth['isAuthenticated'](),controller['getMessages']);router[_0xba48('0x3')](_0xba48('0x9'),auth['isAuthenticated'](),controller[_0xba48('0xa')]);router[_0xba48('0xb')]('/',auth['isAuthenticated'](),controller[_0xba48('0xc')]);router[_0xba48('0xb')](_0xba48('0x8'),auth[_0xba48('0x4')](),controller[_0xba48('0xd')]);router[_0xba48('0xb')](_0xba48('0xe'),auth['isAuthenticated'](),interaction['tracked'](_0xba48('0xf'),_0xba48('0x10')),controller[_0xba48('0x11')]);router[_0xba48('0x12')](_0xba48('0x13'),auth[_0xba48('0x4')](),interaction[_0xba48('0x14')](_0xba48('0xf'),'mailinteraction:update'),controller[_0xba48('0x15')]);router[_0xba48('0x16')]('/:id',auth['isAuthenticated'](),interaction['tracked']('mail',_0xba48('0x17')),controller['destroy']);router[_0xba48('0x16')](_0xba48('0xe'),auth['isAuthenticated'](),controller['removeTags']);module['exports']=router;
\ No newline at end of file
+var _0x27ac=['exports','express','Router','../../components/auth/service','./mailInteraction.controller','get','isAuthenticated','index','/describe','describe','show','getMessages','/:id/download','download','post','create','/:id/tags','tracked','mail','mailinteraction:addtags','addTags','put','mailinteraction:update','delete','mailinteraction:destroy','removeTags'];(function(_0x4a2e12,_0x8b172b){var _0x2b8506=function(_0x5b9d30){while(--_0x5b9d30){_0x4a2e12['push'](_0x4a2e12['shift']());}};_0x2b8506(++_0x8b172b);}(_0x27ac,0xd1));var _0xc27a=function(_0x17f928,_0x5b3e05){_0x17f928=_0x17f928-0x0;var _0x35f22b=_0x27ac[_0x17f928];return _0x35f22b;};'use strict';var express=require(_0xc27a('0x0'));var router=express[_0xc27a('0x1')]();var auth=require(_0xc27a('0x2'));var interaction=require('../../components/interaction/service');var controller=require(_0xc27a('0x3'));router[_0xc27a('0x4')]('/',auth[_0xc27a('0x5')](),controller[_0xc27a('0x6')]);router['get'](_0xc27a('0x7'),auth['isAuthenticated'](),controller[_0xc27a('0x8')]);router['get']('/:id',auth[_0xc27a('0x5')](),controller[_0xc27a('0x9')]);router[_0xc27a('0x4')]('/:id/messages',auth['isAuthenticated'](),controller[_0xc27a('0xa')]);router[_0xc27a('0x4')](_0xc27a('0xb'),auth[_0xc27a('0x5')](),controller[_0xc27a('0xc')]);router[_0xc27a('0xd')]('/',auth[_0xc27a('0x5')](),controller[_0xc27a('0xe')]);router[_0xc27a('0xd')]('/:id/messages',auth[_0xc27a('0x5')](),controller['addMessage']);router[_0xc27a('0xd')](_0xc27a('0xf'),auth[_0xc27a('0x5')](),interaction[_0xc27a('0x10')](_0xc27a('0x11'),_0xc27a('0x12')),controller[_0xc27a('0x13')]);router[_0xc27a('0x14')]('/:id',auth['isAuthenticated'](),interaction[_0xc27a('0x10')](_0xc27a('0x11'),_0xc27a('0x15')),controller['update']);router[_0xc27a('0x16')]('/:id',auth[_0xc27a('0x5')](),interaction[_0xc27a('0x10')]('mail',_0xc27a('0x17')),controller['destroy']);router[_0xc27a('0x16')]('/:id/tags',auth[_0xc27a('0x5')](),controller[_0xc27a('0x18')]);module[_0xc27a('0x19')]=router;
\ No newline at end of file
index 20c2a52..6fc9d19 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbcfe=['DATE','STRING','long','out','INTEGER','sequelize','exports','BOOLEAN'];(function(_0x53cc00,_0x5e5117){var _0x562f09=function(_0x1e2086){while(--_0x1e2086){_0x53cc00['push'](_0x53cc00['shift']());}};_0x562f09(++_0x5e5117);}(_0xbcfe,0x195));var _0xebcf=function(_0x23d621,_0x519c50){_0x23d621=_0x23d621-0x0;var _0x2d5fa1=_0xbcfe[_0x23d621];return _0x2d5fa1;};'use strict';var Sequelize=require(_0xebcf('0x0'));var iconv=require('iconv');module[_0xebcf('0x1')]={'closed':{'type':Sequelize[_0xebcf('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0xebcf('0x3')]},'disposition':{'type':Sequelize[_0xebcf('0x4')]},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize[_0xebcf('0x4')]},'note':{'type':Sequelize[_0xebcf('0x4')]},'inReplyTo':{'type':Sequelize[_0xebcf('0x4')](0x1fe)},'to':{'type':Sequelize[_0xebcf('0x4')]},'cc':{'type':Sequelize['TEXT'](_0xebcf('0x5'))},'subject':{'type':Sequelize['TEXT']()},'attach':{'type':Sequelize[_0xebcf('0x2')],'defaultValue':![]},'read1stAt':{'type':Sequelize[_0xebcf('0x3')]},'substatus':{'type':Sequelize[_0xebcf('0x4')](0x3c)},'substatusAt':{'type':Sequelize[_0xebcf('0x3')]},'firstMsgDirection':{'type':Sequelize['ENUM']('in',_0xebcf('0x6')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0xebcf('0x3')]},'lastMsgDirection':{'type':Sequelize['ENUM']('in','out'),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0xebcf('0x2')],'defaultValue':![]},'queueId':{'type':Sequelize[_0xebcf('0x7')]}};
\ No newline at end of file
+var _0x9d31=['out','sequelize','iconv','exports','BOOLEAN','DATE','STRING','TEXT','ENUM'];(function(_0x2d1324,_0x30d790){var _0x1e18b9=function(_0x43a2b2){while(--_0x43a2b2){_0x2d1324['push'](_0x2d1324['shift']());}};_0x1e18b9(++_0x30d790);}(_0x9d31,0x106));var _0x19d3=function(_0x4892d5,_0x383be1){_0x4892d5=_0x4892d5-0x0;var _0x5ab5b3=_0x9d31[_0x4892d5];return _0x5ab5b3;};'use strict';var Sequelize=require(_0x19d3('0x0'));var iconv=require(_0x19d3('0x1'));module[_0x19d3('0x2')]={'closed':{'type':Sequelize[_0x19d3('0x3')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x19d3('0x4')]},'disposition':{'type':Sequelize[_0x19d3('0x5')]},'secondDisposition':{'type':Sequelize[_0x19d3('0x5')]},'thirdDisposition':{'type':Sequelize[_0x19d3('0x5')]},'note':{'type':Sequelize[_0x19d3('0x5')]},'inReplyTo':{'type':Sequelize[_0x19d3('0x5')](0x1fe)},'to':{'type':Sequelize[_0x19d3('0x5')]},'cc':{'type':Sequelize[_0x19d3('0x6')]('long')},'subject':{'type':Sequelize['TEXT']()},'attach':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'read1stAt':{'type':Sequelize[_0x19d3('0x4')]},'substatus':{'type':Sequelize[_0x19d3('0x5')](0x3c)},'substatusAt':{'type':Sequelize[_0x19d3('0x4')]},'firstMsgDirection':{'type':Sequelize[_0x19d3('0x7')]('in',_0x19d3('0x8')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x19d3('0x4')]},'lastMsgDirection':{'type':Sequelize[_0x19d3('0x7')]('in',_0x19d3('0x8')),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0x19d3('0x3')],'defaultValue':![]},'queueId':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
index 4392b77..c79b277 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xae75=['sort','where','pick','filter','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','true','rows','addTags','spread','emit','mailInteractionTags:save','removeTags','download','unix','toString','join','root','server','files','tmp','attachments','push','Attachment','Attachments','Messages','from','bcc','createdAt','get','each','decode','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','Bcc','basename','existsSync','readFileSync','build','writeFileSync','eml-format','bluebird','util','path','lodash','juice','ioredis','../../components/interaction/service','../../mysqldb','html-entities','redis','defaults','socket.io-emitter','./mailInteraction.socket','sendStatus','status','end','json','undefined','count','offset','set','update','then','destroy','error','stack','name','send','map','MailInteraction','rawAttributes','fieldName','type','key','getOptions','findAll','query','user','show','params','keys','filters','intersection','model','attributes','fields','length','include','merge','options','find','catch','create','body','addMessage','ids','omit','getMessages','findOne','MailMessage','hasOwnProperty','nolimit','limit','order'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xae75,0x1d6));var _0x5ae7=function(_0x16a994,_0x3a9cb2){_0x16a994=_0x16a994-0x0;var _0x1d3e8d=_0xae75[_0x16a994];return _0x1d3e8d;};'use strict';var emlformat=require(_0x5ae7('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var moment=require('moment');var BPromise=require(_0x5ae7('0x1'));var util=require(_0x5ae7('0x2'));var path=require(_0x5ae7('0x3'));var fs=require('fs');var _=require(_0x5ae7('0x4'));var juice=require(_0x5ae7('0x5'));var Redis=require(_0x5ae7('0x6'));var interaction=require(_0x5ae7('0x7'));var qs=require('../../components/parsers/qs');var logger=require('../../config/logger')('api');var config=require('../../config/environment');var db=require(_0x5ae7('0x8'))['db'];var htmlEntities=require(_0x5ae7('0x9'));config[_0x5ae7('0xa')]=_[_0x5ae7('0xb')](config[_0x5ae7('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x5ae7('0xc'))(new Redis(config[_0x5ae7('0xa')]));require(_0x5ae7('0xd'))['register'](socket);function respondWithStatusCode(_0x2831b6,_0x349b57){_0x349b57=_0x349b57||0xcc;return function(_0x2e72b4){if(_0x2e72b4){return _0x2831b6[_0x5ae7('0xe')](_0x349b57);}return _0x2831b6[_0x5ae7('0xf')](_0x349b57)[_0x5ae7('0x10')]();};}function respondWithResult(_0x1961cf,_0x492f5f){_0x492f5f=_0x492f5f||0xc8;return function(_0x305f57){if(_0x305f57){return _0x1961cf['status'](_0x492f5f)[_0x5ae7('0x11')](_0x305f57);}};}function respondWithFilteredResult(_0x3f6b07,_0x54ef0d){return function(_0x5f5016){if(_0x5f5016){var _0x355fc7=typeof _0x54ef0d['offset']===_0x5ae7('0x12')&&typeof _0x54ef0d['limit']===_0x5ae7('0x12');var _0x5e7244=_0x5f5016[_0x5ae7('0x13')];var _0x547940=_0x355fc7?0x0:_0x54ef0d[_0x5ae7('0x14')];var _0x576466=_0x355fc7?_0x5f5016[_0x5ae7('0x13')]:_0x54ef0d[_0x5ae7('0x14')]+_0x54ef0d['limit'];var _0x837e38;if(_0x576466>=_0x5e7244){_0x576466=_0x5e7244;_0x837e38=0xc8;}else{_0x837e38=0xce;}_0x3f6b07['status'](_0x837e38);return _0x3f6b07[_0x5ae7('0x15')]('Content-Range',_0x547940+'-'+_0x576466+'/'+_0x5e7244)[_0x5ae7('0x11')](_0x5f5016);}return null;};}function saveUpdates(_0x1d3c5b){return function(_0x8e25ca){if(_0x8e25ca){return _0x8e25ca[_0x5ae7('0x16')](_0x1d3c5b)[_0x5ae7('0x17')](function(_0x4cb60e){return _0x4cb60e;});}return null;};}function removeEntity(_0x49945a){return function(_0x16e188){if(_0x16e188){return _0x16e188[_0x5ae7('0x18')]()[_0x5ae7('0x17')](function(){_0x49945a[_0x5ae7('0xf')](0xcc)[_0x5ae7('0x10')]();});}};}function handleEntityNotFound(_0x23bc97){return function(_0x18f91f){if(!_0x18f91f){_0x23bc97['sendStatus'](0x194);}return _0x18f91f;};}function handleError(_0x2808ca,_0x109344){_0x109344=_0x109344||0x1f4;return function(_0x5c7ae6){logger[_0x5ae7('0x19')](_0x5c7ae6[_0x5ae7('0x1a')]);if(_0x5c7ae6[_0x5ae7('0x1b')]){delete _0x5c7ae6['name'];}_0x2808ca['status'](_0x109344)[_0x5ae7('0x1c')](_0x5c7ae6);};}exports['index']=function(_0x39ba71,_0x3ed55f){var _0x48e05e={};var _0x479720=_[_0x5ae7('0x1d')](db[_0x5ae7('0x1e')][_0x5ae7('0x1f')],function(_0x441bec){return{'name':_0x441bec[_0x5ae7('0x20')],'type':_0x441bec[_0x5ae7('0x21')][_0x5ae7('0x22')]};});_0x48e05e=qs[_0x5ae7('0x23')](_0x479720,_0x39ba71);return interaction[_0x5ae7('0x24')]('mail',_0x39ba71[_0x5ae7('0x25')],_0x39ba71[_0x5ae7('0x26')],_0x48e05e,_0x479720)[_0x5ae7('0x17')](respondWithFilteredResult(_0x3ed55f,_0x48e05e))['catch'](handleError(_0x3ed55f,null));};exports[_0x5ae7('0x27')]=function(_0x6050a0,_0x2bc077){var _0x4910ca={'raw':![],'where':{'id':_0x6050a0[_0x5ae7('0x28')]['id']}},_0x5ef362={};_0x5ef362['model']=_[_0x5ae7('0x29')](db[_0x5ae7('0x1e')][_0x5ae7('0x1f')]);_0x5ef362[_0x5ae7('0x25')]=_[_0x5ae7('0x29')](_0x6050a0[_0x5ae7('0x25')]);_0x5ef362[_0x5ae7('0x2a')]=_[_0x5ae7('0x2b')](_0x5ef362[_0x5ae7('0x2c')],_0x5ef362[_0x5ae7('0x25')]);_0x4910ca[_0x5ae7('0x2d')]=_[_0x5ae7('0x2b')](_0x5ef362[_0x5ae7('0x2c')],qs[_0x5ae7('0x2e')](_0x6050a0['query'][_0x5ae7('0x2e')]));_0x4910ca[_0x5ae7('0x2d')]=_0x4910ca[_0x5ae7('0x2d')][_0x5ae7('0x2f')]?_0x4910ca['attributes']:_0x5ef362['model'];if(_0x6050a0[_0x5ae7('0x25')]['includeAll']){_0x4910ca[_0x5ae7('0x30')]=[{'all':!![]}];}_0x4910ca=_[_0x5ae7('0x31')]({},_0x4910ca,_0x6050a0[_0x5ae7('0x32')]);return db[_0x5ae7('0x1e')][_0x5ae7('0x33')](_0x4910ca)[_0x5ae7('0x17')](handleEntityNotFound(_0x2bc077,null))[_0x5ae7('0x17')](respondWithResult(_0x2bc077,null))[_0x5ae7('0x34')](handleError(_0x2bc077,null));};exports[_0x5ae7('0x35')]=function(_0x40f696,_0x66f606){return db['MailInteraction'][_0x5ae7('0x35')](_0x40f696[_0x5ae7('0x36')],{})['then'](respondWithResult(_0x66f606,0xc9))[_0x5ae7('0x34')](handleError(_0x66f606,null));};exports[_0x5ae7('0x16')]=function(_0x19ff27,_0x3c0db1){if(_0x19ff27[_0x5ae7('0x36')]['id']){delete _0x19ff27[_0x5ae7('0x36')]['id'];}return db[_0x5ae7('0x1e')][_0x5ae7('0x33')]({'where':{'id':_0x19ff27[_0x5ae7('0x28')]['id']}})[_0x5ae7('0x17')](handleEntityNotFound(_0x3c0db1,null))[_0x5ae7('0x17')](saveUpdates(_0x19ff27['body'],null))[_0x5ae7('0x17')](respondWithResult(_0x3c0db1,null))[_0x5ae7('0x34')](handleError(_0x3c0db1,null));};exports[_0x5ae7('0x18')]=function(_0x26c03c,_0x2d5150){return db[_0x5ae7('0x1e')]['find']({'where':{'id':_0x26c03c[_0x5ae7('0x28')]['id']}})[_0x5ae7('0x17')](handleEntityNotFound(_0x2d5150,null))[_0x5ae7('0x17')](removeEntity(_0x2d5150,null))[_0x5ae7('0x34')](handleError(_0x2d5150,null));};exports['describe']=function(_0x25223c,_0x47fabd){return db['MailInteraction']['describe']()[_0x5ae7('0x17')](respondWithResult(_0x47fabd,null))[_0x5ae7('0x34')](handleError(_0x47fabd,null));};exports[_0x5ae7('0x37')]=function(_0xfb57a0,_0x5aad69){return db['MailMessage']['find']({'where':{'id':_0xfb57a0[_0x5ae7('0x28')]['id']}})[_0x5ae7('0x17')](handleEntityNotFound(_0x5aad69,null))[_0x5ae7('0x17')](function(_0x44ca05){if(_0x44ca05){return _0x44ca05[_0x5ae7('0x37')](_0xfb57a0[_0x5ae7('0x36')][_0x5ae7('0x38')],_[_0x5ae7('0x39')](_0xfb57a0[_0x5ae7('0x36')],[_0x5ae7('0x38'),'id'])||{});}})[_0x5ae7('0x17')](respondWithResult(_0x5aad69,null))[_0x5ae7('0x34')](handleError(_0x5aad69,null));};exports[_0x5ae7('0x3a')]=function(_0x77c203,_0x2537d2){var _0x790b5a={'raw':![],'where':{}};var _0x51f042={};var _0x2a4ebe={'count':0x0,'rows':[]};return db[_0x5ae7('0x1e')][_0x5ae7('0x3b')]({'where':{'id':_0x77c203[_0x5ae7('0x28')]['id']}})[_0x5ae7('0x17')](handleEntityNotFound(_0x2537d2,null))[_0x5ae7('0x17')](function(_0x27dc8b){if(_0x27dc8b){_0x51f042[_0x5ae7('0x2c')]=_[_0x5ae7('0x29')](db[_0x5ae7('0x3c')]['rawAttributes']);_0x51f042['query']=_[_0x5ae7('0x29')](_0x77c203[_0x5ae7('0x25')]);_0x51f042['filters']=_[_0x5ae7('0x2b')](_0x51f042['model'],_0x51f042[_0x5ae7('0x25')]);_0x790b5a[_0x5ae7('0x2d')]=_['intersection'](_0x51f042[_0x5ae7('0x2c')],qs[_0x5ae7('0x2e')](_0x77c203[_0x5ae7('0x25')]['fields']));_0x790b5a[_0x5ae7('0x2d')]=_0x790b5a['attributes']['length']?_0x790b5a[_0x5ae7('0x2d')]:_0x51f042[_0x5ae7('0x2c')];if(!_0x77c203[_0x5ae7('0x25')][_0x5ae7('0x3d')](_0x5ae7('0x3e'))){_0x790b5a['limit']=qs[_0x5ae7('0x3f')](_0x77c203['query'][_0x5ae7('0x3f')]);_0x790b5a['offset']=qs[_0x5ae7('0x14')](_0x77c203[_0x5ae7('0x25')][_0x5ae7('0x14')]);}_0x790b5a[_0x5ae7('0x40')]=qs['sort'](_0x77c203['query'][_0x5ae7('0x41')]);_0x790b5a[_0x5ae7('0x42')]=qs['filters'](_[_0x5ae7('0x43')](_0x77c203[_0x5ae7('0x25')],_0x51f042[_0x5ae7('0x2a')]));_0x790b5a[_0x5ae7('0x42')]['MailInteractionId']=_0x27dc8b['id'];if(_0x77c203[_0x5ae7('0x25')]['filter']){_0x790b5a[_0x5ae7('0x42')]=_['merge'](_0x790b5a[_0x5ae7('0x42')],{'$or':_[_0x5ae7('0x1d')](_0x790b5a[_0x5ae7('0x2d')],function(_0x3cfbd3){var _0x532773={};_0x532773[_0x3cfbd3]={'$like':'%'+_0x77c203[_0x5ae7('0x25')][_0x5ae7('0x44')]+'%'};return _0x532773;})});}if(_0x77c203[_0x5ae7('0x25')][_0x5ae7('0x45')]){var _0x3af2cc=_0x77c203['query'][_0x5ae7('0x45')][_0x5ae7('0x46')](',');var _0x3b355d={};_0x3b355d[_0x3af2cc[0x0]]={'$gte':moment(_0x3af2cc[0x1])[_0x5ae7('0x47')](_0x5ae7('0x48'))};_0x790b5a['where']=_['merge'](_0x790b5a[_0x5ae7('0x42')],_0x3b355d);}_0x790b5a=_[_0x5ae7('0x31')]({},_0x790b5a,_0x77c203[_0x5ae7('0x32')]);return db[_0x5ae7('0x3c')][_0x5ae7('0x13')]({'where':_0x790b5a['where']})[_0x5ae7('0x17')](function(_0x53ec69){_0x2a4ebe[_0x5ae7('0x13')]=_0x53ec69;if(_0x77c203[_0x5ae7('0x25')]['includeAll']){_0x790b5a[_0x5ae7('0x30')]=[{'all':!![]}];}return db['MailMessage'][_0x5ae7('0x24')](_0x790b5a);})[_0x5ae7('0x17')](function(_0x542c51){if(_0x77c203[_0x5ae7('0x25')]['inlineCss']===_0x5ae7('0x49')){for(var _0x2c8d73=0x0;_0x2c8d73<_0x542c51[_0x5ae7('0x2f')];_0x2c8d73++){_0x542c51[_0x2c8d73][_0x5ae7('0x36')]=juice(_0x542c51[_0x2c8d73][_0x5ae7('0x36')]);}}_0x2a4ebe[_0x5ae7('0x4a')]=_0x542c51;return _0x2a4ebe;});}})['then'](respondWithFilteredResult(_0x2537d2,_0x790b5a))[_0x5ae7('0x34')](handleError(_0x2537d2,null));};exports[_0x5ae7('0x4b')]=function(_0x27eaa6,_0x39b6fd){return db[_0x5ae7('0x1e')][_0x5ae7('0x33')]({'where':{'id':_0x27eaa6[_0x5ae7('0x28')]['id']}})[_0x5ae7('0x17')](handleEntityNotFound(_0x39b6fd,null))[_0x5ae7('0x17')](function(_0xc8e34c){if(_0xc8e34c){return _0xc8e34c['setTags'](_0x27eaa6[_0x5ae7('0x36')][_0x5ae7('0x38')],_['omit'](_0x27eaa6[_0x5ae7('0x36')],['ids','id'])||{})[_0x5ae7('0x4c')](function(){return db['Tag']['findAll']({'attributes':['id','name','color'],'where':{'id':_0x27eaa6['body'][_0x5ae7('0x38')]}});})[_0x5ae7('0x17')](function(_0x2a861d){socket[_0x5ae7('0x4d')](_0x5ae7('0x4e'),{'id':Number(_0x27eaa6['params']['id']),'tags':_0x2a861d||[]});return{'id':Number(_0x27eaa6[_0x5ae7('0x28')]['id']),'tags':_0x2a861d||[]};});}})['then'](respondWithResult(_0x39b6fd,null))[_0x5ae7('0x34')](handleError(_0x39b6fd,null));};exports['removeTags']=function(_0x79fcbd,_0xc55815){return db[_0x5ae7('0x1e')][_0x5ae7('0x33')]({'where':{'id':_0x79fcbd[_0x5ae7('0x28')]['id']}})[_0x5ae7('0x17')](handleEntityNotFound(_0xc55815,null))[_0x5ae7('0x17')](function(_0x39bf09){if(_0x39bf09){return _0x39bf09[_0x5ae7('0x4f')](_0x79fcbd['query'][_0x5ae7('0x38')]);}})[_0x5ae7('0x17')](respondWithStatusCode(_0xc55815,null))[_0x5ae7('0x34')](handleError(_0xc55815,null));};exports[_0x5ae7('0x50')]=function(_0x5541b4,_0x39f89f){var _0x23263a=moment()[_0x5ae7('0x51')]()[_0x5ae7('0x52')]();var _0x19e958=path[_0x5ae7('0x53')](config[_0x5ae7('0x54')],_0x5ae7('0x55'),_0x5ae7('0x56'),_0x5ae7('0x57'));var _0x5d0589=path[_0x5ae7('0x53')](config[_0x5ae7('0x54')],_0x5ae7('0x55'),_0x5ae7('0x56'),_0x5ae7('0x58'));var _0x854a58=path[_0x5ae7('0x53')](_0x19e958,_0x23263a);var _0x4b17a1=util[_0x5ae7('0x47')]('transcript-%d-%s.zip',_0x5541b4[_0x5ae7('0x28')]['id'],_0x23263a);var _0x1c309d=path[_0x5ae7('0x53')](_0x19e958,_0x4b17a1);var _0x4a0fab=[];if(_0x5541b4[_0x5ae7('0x25')][_0x5ae7('0x58')]){_0x4a0fab[_0x5ae7('0x59')]({'model':db[_0x5ae7('0x5a')],'as':_0x5ae7('0x5b'),'raw':!![]});}var _0x668af9=[{'model':db[_0x5ae7('0x3c')],'as':_0x5ae7('0x5c'),'attributes':['id',_0x5ae7('0x36'),_0x5ae7('0x5d'),'to','cc',_0x5ae7('0x5e'),'subject',_0x5ae7('0x5f')],'where':{'secret':![]},'order':qs[_0x5ae7('0x41')]('id'),'include':_0x4a0fab}];return db[_0x5ae7('0x1e')]['find']({'where':{'id':_0x5541b4[_0x5ae7('0x28')]['id']},'include':_0x668af9})[_0x5ae7('0x17')](handleEntityNotFound(_0x39f89f,null))[_0x5ae7('0x17')](function(_0x4f90df){if(_0x4f90df&&_0x4f90df[_0x5ae7('0x5c')]){var _0xa66a1f=_0x4f90df[_0x5ae7('0x60')]({'plain':!![]});fs['mkdirSync'](_0x854a58);return BPromise[_0x5ae7('0x61')](_0xa66a1f[_0x5ae7('0x5c')],function(_0x547918,_0x2c6d5e){var _0x3717cb={'from':_0x547918[_0x5ae7('0x5d')],'to':_0x547918['to']||'missing.recipient@your.company.com','subject':_0x547918['subject'],'html':htmlEntities[_0x5ae7('0x62')](_0x547918['body']),'headers':{'Date':moment(_0x547918[_0x5ae7('0x5f')])[_0x5ae7('0x47')](_0x5ae7('0x63'))},'attachments':[]};if(_0x547918['cc']){_0x3717cb['headers']['Cc']=_0x547918['cc'];}if(_0x547918[_0x5ae7('0x5e')]){_0x3717cb[_0x5ae7('0x64')][_0x5ae7('0x65')]=_0x547918[_0x5ae7('0x5e')];}return new BPromise(function(_0x60be16,_0x369428){if(_0x547918['Attachments']){for(var _0x427562=0x0;_0x427562<_0x547918[_0x5ae7('0x5b')][_0x5ae7('0x2f')];_0x427562++){var _0x562511=_0x547918['Attachments'][_0x427562];var _0x58e59f=path[_0x5ae7('0x53')](_0x5d0589,_0x562511[_0x5ae7('0x66')]);if(fs[_0x5ae7('0x67')](_0x58e59f)){_0x3717cb[_0x5ae7('0x58')]['push']({'name':_0x562511[_0x5ae7('0x1b')],'contentType':_0x562511[_0x5ae7('0x21')],'data':fs[_0x5ae7('0x68')](_0x58e59f)});}}}emlformat[_0x5ae7('0x69')](_0x3717cb,function(_0x5cd5e7,_0xfac9f2){if(_0x5cd5e7)return _0x369428(_0x5cd5e7);fs[_0x5ae7('0x6a')](path[_0x5ae7('0x53')](_0x854a58,util['format']('message%d.eml',_0x2c6d5e)),_0xfac9f2);return _0x60be16(_0xfac9f2);});});})[_0x5ae7('0x17')](function(){return new BPromise(function(_0x2148d7,_0x3c2c76){zipdir(_0x854a58,{'saveTo':_0x1c309d},function(_0x30e0b7,_0x450feb){if(_0x30e0b7)return _0x3c2c76(_0x30e0b7);return _0x2148d7(_0x450feb);});})[_0x5ae7('0x17')](function(){return new BPromise(function(_0x102d2b,_0x19def6){rimraf(_0x854a58,function(_0x39758c){if(_0x39758c)_0x19def6(_0x39758c);return _0x102d2b();});});})[_0x5ae7('0x17')](function(){return _0x39f89f[_0x5ae7('0x50')](_0x1c309d,_0x4b17a1,function(_0x3b224f){if(!_0x3b224f)fs['unlinkSync'](_0x1c309d);});});});}else{return _0x39f89f[_0x5ae7('0xe')](0xc8);}})['catch'](handleError(_0x39f89f,null));};
\ No newline at end of file
+var _0x3c58=['filters','hasOwnProperty','order','sort','where','pick','MailInteractionId','filter','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','inlineCss','true','rows','addTags','setTags','Tag','color','emit','download','unix','toString','join','files','tmp','server','transcript-%d-%s.zip','attachments','Attachment','Attachments','from','subject','createdAt','Messages','get','mkdirSync','each','missing.recipient@your.company.com','decode','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','bcc','Bcc','basename','existsSync','push','type','build','message%d.eml','unlinkSync','eml-format','rimraf','zip-dir','bluebird','path','lodash','juice','../../components/interaction/service','../../components/parsers/qs','../../config/logger','api','../../config/environment','redis','defaults','localhost','./mailInteraction.socket','register','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','update','then','destroy','error','stack','name','map','MailInteraction','fieldName','getOptions','findAll','query','user','catch','model','keys','rawAttributes','attributes','intersection','fields','length','merge','options','find','create','body','params','describe','MailMessage','addMessage','ids','omit','getMessages','findOne'];(function(_0x5f2a73,_0x4fd55b){var _0x5517df=function(_0x110b73){while(--_0x110b73){_0x5f2a73['push'](_0x5f2a73['shift']());}};_0x5517df(++_0x4fd55b);}(_0x3c58,0x1f3));var _0x83c5=function(_0x37cff4,_0x926504){_0x37cff4=_0x37cff4-0x0;var _0x15a4f7=_0x3c58[_0x37cff4];return _0x15a4f7;};'use strict';var emlformat=require(_0x83c5('0x0'));var rimraf=require(_0x83c5('0x1'));var zipdir=require(_0x83c5('0x2'));var moment=require('moment');var BPromise=require(_0x83c5('0x3'));var util=require('util');var path=require(_0x83c5('0x4'));var fs=require('fs');var _=require(_0x83c5('0x5'));var juice=require(_0x83c5('0x6'));var Redis=require('ioredis');var interaction=require(_0x83c5('0x7'));var qs=require(_0x83c5('0x8'));var logger=require(_0x83c5('0x9'))(_0x83c5('0xa'));var config=require(_0x83c5('0xb'));var db=require('../../mysqldb')['db'];var htmlEntities=require('html-entities');config[_0x83c5('0xc')]=_[_0x83c5('0xd')](config[_0x83c5('0xc')],{'host':_0x83c5('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x83c5('0xc')]));require(_0x83c5('0xf'))[_0x83c5('0x10')](socket);function respondWithStatusCode(_0x1a773c,_0x3a7f11){_0x3a7f11=_0x3a7f11||0xcc;return function(_0x452eb6){if(_0x452eb6){return _0x1a773c[_0x83c5('0x11')](_0x3a7f11);}return _0x1a773c[_0x83c5('0x12')](_0x3a7f11)[_0x83c5('0x13')]();};}function respondWithResult(_0x3b8d39,_0x9ba35c){_0x9ba35c=_0x9ba35c||0xc8;return function(_0x1638b5){if(_0x1638b5){return _0x3b8d39[_0x83c5('0x12')](_0x9ba35c)[_0x83c5('0x14')](_0x1638b5);}};}function respondWithFilteredResult(_0x48b908,_0x2b7633){return function(_0x4fb69f){if(_0x4fb69f){var _0x188364=typeof _0x2b7633['offset']===_0x83c5('0x15')&&typeof _0x2b7633[_0x83c5('0x16')]===_0x83c5('0x15');var _0x1fb4d2=_0x4fb69f[_0x83c5('0x17')];var _0x295e07=_0x188364?0x0:_0x2b7633['offset'];var _0x1fd104=_0x188364?_0x4fb69f[_0x83c5('0x17')]:_0x2b7633[_0x83c5('0x18')]+_0x2b7633[_0x83c5('0x16')];var _0x2f696d;if(_0x1fd104>=_0x1fb4d2){_0x1fd104=_0x1fb4d2;_0x2f696d=0xc8;}else{_0x2f696d=0xce;}_0x48b908[_0x83c5('0x12')](_0x2f696d);return _0x48b908[_0x83c5('0x19')](_0x83c5('0x1a'),_0x295e07+'-'+_0x1fd104+'/'+_0x1fb4d2)['json'](_0x4fb69f);}return null;};}function saveUpdates(_0x1f4fba){return function(_0x29b2c2){if(_0x29b2c2){return _0x29b2c2[_0x83c5('0x1b')](_0x1f4fba)[_0x83c5('0x1c')](function(_0x5210b4){return _0x5210b4;});}return null;};}function removeEntity(_0xa66480){return function(_0x2c4ad0){if(_0x2c4ad0){return _0x2c4ad0[_0x83c5('0x1d')]()['then'](function(){_0xa66480[_0x83c5('0x12')](0xcc)['end']();});}};}function handleEntityNotFound(_0xa0ff87){return function(_0x5e3f62){if(!_0x5e3f62){_0xa0ff87['sendStatus'](0x194);}return _0x5e3f62;};}function handleError(_0x5d602a,_0x3fa6ed){_0x3fa6ed=_0x3fa6ed||0x1f4;return function(_0x55f1ae){logger[_0x83c5('0x1e')](_0x55f1ae[_0x83c5('0x1f')]);if(_0x55f1ae[_0x83c5('0x20')]){delete _0x55f1ae[_0x83c5('0x20')];}_0x5d602a[_0x83c5('0x12')](_0x3fa6ed)['send'](_0x55f1ae);};}exports['index']=function(_0x3557b8,_0x2d9ba8){var _0x51707c={};var _0x25009f=_[_0x83c5('0x21')](db[_0x83c5('0x22')]['rawAttributes'],function(_0x540372){return{'name':_0x540372[_0x83c5('0x23')],'type':_0x540372['type']['key']};});_0x51707c=qs[_0x83c5('0x24')](_0x25009f,_0x3557b8);return interaction[_0x83c5('0x25')]('mail',_0x3557b8[_0x83c5('0x26')],_0x3557b8[_0x83c5('0x27')],_0x51707c,_0x25009f)[_0x83c5('0x1c')](respondWithFilteredResult(_0x2d9ba8,_0x51707c))[_0x83c5('0x28')](handleError(_0x2d9ba8,null));};exports['show']=function(_0x2b4bf3,_0x8614e9){var _0x36abc7={'raw':![],'where':{'id':_0x2b4bf3['params']['id']}},_0x526835={};_0x526835[_0x83c5('0x29')]=_[_0x83c5('0x2a')](db[_0x83c5('0x22')][_0x83c5('0x2b')]);_0x526835[_0x83c5('0x26')]=_[_0x83c5('0x2a')](_0x2b4bf3[_0x83c5('0x26')]);_0x526835['filters']=_['intersection'](_0x526835[_0x83c5('0x29')],_0x526835['query']);_0x36abc7[_0x83c5('0x2c')]=_[_0x83c5('0x2d')](_0x526835[_0x83c5('0x29')],qs[_0x83c5('0x2e')](_0x2b4bf3['query'][_0x83c5('0x2e')]));_0x36abc7['attributes']=_0x36abc7[_0x83c5('0x2c')][_0x83c5('0x2f')]?_0x36abc7[_0x83c5('0x2c')]:_0x526835[_0x83c5('0x29')];if(_0x2b4bf3[_0x83c5('0x26')]['includeAll']){_0x36abc7['include']=[{'all':!![]}];}_0x36abc7=_[_0x83c5('0x30')]({},_0x36abc7,_0x2b4bf3[_0x83c5('0x31')]);return db[_0x83c5('0x22')][_0x83c5('0x32')](_0x36abc7)[_0x83c5('0x1c')](handleEntityNotFound(_0x8614e9,null))[_0x83c5('0x1c')](respondWithResult(_0x8614e9,null))['catch'](handleError(_0x8614e9,null));};exports[_0x83c5('0x33')]=function(_0x349f34,_0x217249){return db[_0x83c5('0x22')][_0x83c5('0x33')](_0x349f34[_0x83c5('0x34')],{})[_0x83c5('0x1c')](respondWithResult(_0x217249,0xc9))[_0x83c5('0x28')](handleError(_0x217249,null));};exports['update']=function(_0x2440a7,_0x2b2442){if(_0x2440a7[_0x83c5('0x34')]['id']){delete _0x2440a7['body']['id'];}return db['MailInteraction']['find']({'where':{'id':_0x2440a7[_0x83c5('0x35')]['id']}})[_0x83c5('0x1c')](handleEntityNotFound(_0x2b2442,null))['then'](saveUpdates(_0x2440a7[_0x83c5('0x34')],null))[_0x83c5('0x1c')](respondWithResult(_0x2b2442,null))[_0x83c5('0x28')](handleError(_0x2b2442,null));};exports[_0x83c5('0x1d')]=function(_0x4af8c4,_0x39be13){return db[_0x83c5('0x22')]['find']({'where':{'id':_0x4af8c4['params']['id']}})[_0x83c5('0x1c')](handleEntityNotFound(_0x39be13,null))[_0x83c5('0x1c')](removeEntity(_0x39be13,null))[_0x83c5('0x28')](handleError(_0x39be13,null));};exports[_0x83c5('0x36')]=function(_0x271148,_0x21fa63){return db[_0x83c5('0x22')][_0x83c5('0x36')]()['then'](respondWithResult(_0x21fa63,null))['catch'](handleError(_0x21fa63,null));};exports['addMessage']=function(_0x1b803d,_0x593712){return db[_0x83c5('0x37')]['find']({'where':{'id':_0x1b803d[_0x83c5('0x35')]['id']}})[_0x83c5('0x1c')](handleEntityNotFound(_0x593712,null))['then'](function(_0x9c9c3b){if(_0x9c9c3b){return _0x9c9c3b[_0x83c5('0x38')](_0x1b803d[_0x83c5('0x34')][_0x83c5('0x39')],_[_0x83c5('0x3a')](_0x1b803d[_0x83c5('0x34')],['ids','id'])||{});}})['then'](respondWithResult(_0x593712,null))[_0x83c5('0x28')](handleError(_0x593712,null));};exports[_0x83c5('0x3b')]=function(_0x4d89fe,_0x328690){var _0x2716d6={'raw':![],'where':{}};var _0x2f6436={};var _0x3ab96a={'count':0x0,'rows':[]};return db['MailInteraction'][_0x83c5('0x3c')]({'where':{'id':_0x4d89fe[_0x83c5('0x35')]['id']}})[_0x83c5('0x1c')](handleEntityNotFound(_0x328690,null))[_0x83c5('0x1c')](function(_0x15535d){if(_0x15535d){_0x2f6436[_0x83c5('0x29')]=_['keys'](db[_0x83c5('0x37')][_0x83c5('0x2b')]);_0x2f6436[_0x83c5('0x26')]=_[_0x83c5('0x2a')](_0x4d89fe['query']);_0x2f6436[_0x83c5('0x3d')]=_['intersection'](_0x2f6436[_0x83c5('0x29')],_0x2f6436[_0x83c5('0x26')]);_0x2716d6[_0x83c5('0x2c')]=_[_0x83c5('0x2d')](_0x2f6436['model'],qs['fields'](_0x4d89fe[_0x83c5('0x26')][_0x83c5('0x2e')]));_0x2716d6[_0x83c5('0x2c')]=_0x2716d6[_0x83c5('0x2c')]['length']?_0x2716d6[_0x83c5('0x2c')]:_0x2f6436[_0x83c5('0x29')];if(!_0x4d89fe['query'][_0x83c5('0x3e')]('nolimit')){_0x2716d6[_0x83c5('0x16')]=qs[_0x83c5('0x16')](_0x4d89fe['query'][_0x83c5('0x16')]);_0x2716d6[_0x83c5('0x18')]=qs[_0x83c5('0x18')](_0x4d89fe[_0x83c5('0x26')][_0x83c5('0x18')]);}_0x2716d6[_0x83c5('0x3f')]=qs['sort'](_0x4d89fe[_0x83c5('0x26')][_0x83c5('0x40')]);_0x2716d6[_0x83c5('0x41')]=qs[_0x83c5('0x3d')](_[_0x83c5('0x42')](_0x4d89fe[_0x83c5('0x26')],_0x2f6436[_0x83c5('0x3d')]));_0x2716d6['where'][_0x83c5('0x43')]=_0x15535d['id'];if(_0x4d89fe[_0x83c5('0x26')]['filter']){_0x2716d6[_0x83c5('0x41')]=_['merge'](_0x2716d6['where'],{'$or':_[_0x83c5('0x21')](_0x2716d6[_0x83c5('0x2c')],function(_0x17d135){var _0xba9e7d={};_0xba9e7d[_0x17d135]={'$like':'%'+_0x4d89fe[_0x83c5('0x26')][_0x83c5('0x44')]+'%'};return _0xba9e7d;})});}if(_0x4d89fe['query'][_0x83c5('0x45')]){var _0x3a9437=_0x4d89fe[_0x83c5('0x26')]['$gte'][_0x83c5('0x46')](',');var _0x233441={};_0x233441[_0x3a9437[0x0]]={'$gte':moment(_0x3a9437[0x1])[_0x83c5('0x47')](_0x83c5('0x48'))};_0x2716d6[_0x83c5('0x41')]=_[_0x83c5('0x30')](_0x2716d6['where'],_0x233441);}_0x2716d6=_['merge']({},_0x2716d6,_0x4d89fe[_0x83c5('0x31')]);return db[_0x83c5('0x37')]['count']({'where':_0x2716d6['where']})[_0x83c5('0x1c')](function(_0x3da202){_0x3ab96a[_0x83c5('0x17')]=_0x3da202;if(_0x4d89fe['query']['includeAll']){_0x2716d6['include']=[{'all':!![]}];}return db[_0x83c5('0x37')][_0x83c5('0x25')](_0x2716d6);})[_0x83c5('0x1c')](function(_0x515234){if(_0x4d89fe['query'][_0x83c5('0x49')]===_0x83c5('0x4a')){for(var _0x7266d7=0x0;_0x7266d7<_0x515234[_0x83c5('0x2f')];_0x7266d7++){_0x515234[_0x7266d7][_0x83c5('0x34')]=juice(_0x515234[_0x7266d7][_0x83c5('0x34')]);}}_0x3ab96a[_0x83c5('0x4b')]=_0x515234;return _0x3ab96a;});}})[_0x83c5('0x1c')](respondWithFilteredResult(_0x328690,_0x2716d6))[_0x83c5('0x28')](handleError(_0x328690,null));};exports[_0x83c5('0x4c')]=function(_0x439f6b,_0x2cc2ca){return db[_0x83c5('0x22')][_0x83c5('0x32')]({'where':{'id':_0x439f6b[_0x83c5('0x35')]['id']}})[_0x83c5('0x1c')](handleEntityNotFound(_0x2cc2ca,null))['then'](function(_0x3d32cc){if(_0x3d32cc){return _0x3d32cc[_0x83c5('0x4d')](_0x439f6b[_0x83c5('0x34')][_0x83c5('0x39')],_[_0x83c5('0x3a')](_0x439f6b[_0x83c5('0x34')],[_0x83c5('0x39'),'id'])||{})['spread'](function(){return db[_0x83c5('0x4e')][_0x83c5('0x25')]({'attributes':['id',_0x83c5('0x20'),_0x83c5('0x4f')],'where':{'id':_0x439f6b[_0x83c5('0x34')][_0x83c5('0x39')]}});})['then'](function(_0x5bd0ac){socket[_0x83c5('0x50')]('mailInteractionTags:save',{'id':Number(_0x439f6b[_0x83c5('0x35')]['id']),'tags':_0x5bd0ac||[]});return{'id':Number(_0x439f6b[_0x83c5('0x35')]['id']),'tags':_0x5bd0ac||[]};});}})[_0x83c5('0x1c')](respondWithResult(_0x2cc2ca,null))[_0x83c5('0x28')](handleError(_0x2cc2ca,null));};exports['removeTags']=function(_0x1ff5da,_0x458b1a){return db[_0x83c5('0x22')][_0x83c5('0x32')]({'where':{'id':_0x1ff5da[_0x83c5('0x35')]['id']}})[_0x83c5('0x1c')](handleEntityNotFound(_0x458b1a,null))[_0x83c5('0x1c')](function(_0x593f6b){if(_0x593f6b){return _0x593f6b['removeTags'](_0x1ff5da['query']['ids']);}})['then'](respondWithStatusCode(_0x458b1a,null))['catch'](handleError(_0x458b1a,null));};exports[_0x83c5('0x51')]=function(_0xa98284,_0x263b39){var _0x142ad7=moment()[_0x83c5('0x52')]()[_0x83c5('0x53')]();var _0x3e7d40=path[_0x83c5('0x54')](config['root'],'server',_0x83c5('0x55'),_0x83c5('0x56'));var _0x3bde9f=path[_0x83c5('0x54')](config['root'],_0x83c5('0x57'),_0x83c5('0x55'),'attachments');var _0xd60490=path[_0x83c5('0x54')](_0x3e7d40,_0x142ad7);var _0x4bfe8a=util['format'](_0x83c5('0x58'),_0xa98284['params']['id'],_0x142ad7);var _0x38fc4a=path[_0x83c5('0x54')](_0x3e7d40,_0x4bfe8a);var _0x1835bd=[];if(_0xa98284[_0x83c5('0x26')][_0x83c5('0x59')]){_0x1835bd['push']({'model':db[_0x83c5('0x5a')],'as':_0x83c5('0x5b'),'raw':!![]});}var _0x508454=[{'model':db[_0x83c5('0x37')],'as':'Messages','attributes':['id',_0x83c5('0x34'),_0x83c5('0x5c'),'to','cc','bcc',_0x83c5('0x5d'),_0x83c5('0x5e')],'where':{'secret':![]},'order':qs[_0x83c5('0x40')]('id'),'include':_0x1835bd}];return db[_0x83c5('0x22')]['find']({'where':{'id':_0xa98284['params']['id']},'include':_0x508454})[_0x83c5('0x1c')](handleEntityNotFound(_0x263b39,null))[_0x83c5('0x1c')](function(_0x2cc414){if(_0x2cc414&&_0x2cc414[_0x83c5('0x5f')]){var _0x41ccc5=_0x2cc414[_0x83c5('0x60')]({'plain':!![]});fs[_0x83c5('0x61')](_0xd60490);return BPromise[_0x83c5('0x62')](_0x41ccc5[_0x83c5('0x5f')],function(_0x558aa7,_0x175449){var _0x579a9c={'from':_0x558aa7[_0x83c5('0x5c')],'to':_0x558aa7['to']||_0x83c5('0x63'),'subject':_0x558aa7[_0x83c5('0x5d')],'html':htmlEntities[_0x83c5('0x64')](_0x558aa7[_0x83c5('0x34')]),'headers':{'Date':moment(_0x558aa7[_0x83c5('0x5e')])[_0x83c5('0x47')](_0x83c5('0x65'))},'attachments':[]};if(_0x558aa7['cc']){_0x579a9c[_0x83c5('0x66')]['Cc']=_0x558aa7['cc'];}if(_0x558aa7[_0x83c5('0x67')]){_0x579a9c['headers'][_0x83c5('0x68')]=_0x558aa7[_0x83c5('0x67')];}return new BPromise(function(_0x4bd6e0,_0x3d8b13){if(_0x558aa7[_0x83c5('0x5b')]){for(var _0x57b2fb=0x0;_0x57b2fb<_0x558aa7[_0x83c5('0x5b')][_0x83c5('0x2f')];_0x57b2fb++){var _0x19e6bd=_0x558aa7[_0x83c5('0x5b')][_0x57b2fb];var _0x2a40fd=path['join'](_0x3bde9f,_0x19e6bd[_0x83c5('0x69')]);if(fs[_0x83c5('0x6a')](_0x2a40fd)){_0x579a9c[_0x83c5('0x59')][_0x83c5('0x6b')]({'name':_0x19e6bd['name'],'contentType':_0x19e6bd[_0x83c5('0x6c')],'data':fs['readFileSync'](_0x2a40fd)});}}}emlformat[_0x83c5('0x6d')](_0x579a9c,function(_0x5a48a1,_0x568d39){if(_0x5a48a1)return _0x3d8b13(_0x5a48a1);fs['writeFileSync'](path[_0x83c5('0x54')](_0xd60490,util[_0x83c5('0x47')](_0x83c5('0x6e'),_0x175449)),_0x568d39);return _0x4bd6e0(_0x568d39);});});})[_0x83c5('0x1c')](function(){return new BPromise(function(_0x58e08e,_0x535677){zipdir(_0xd60490,{'saveTo':_0x38fc4a},function(_0x380e97,_0x4e013d){if(_0x380e97)return _0x535677(_0x380e97);return _0x58e08e(_0x4e013d);});})[_0x83c5('0x1c')](function(){return new BPromise(function(_0x5aaa8b,_0x522672){rimraf(_0xd60490,function(_0x3d25ac){if(_0x3d25ac)_0x522672(_0x3d25ac);return _0x5aaa8b();});});})[_0x83c5('0x1c')](function(){return _0x263b39['download'](_0x38fc4a,_0x4bfe8a,function(_0x26eb8a){if(!_0x26eb8a)fs[_0x83c5('0x6f')](_0x38fc4a);});});});}else{return _0x263b39[_0x83c5('0x11')](0xc8);}})['catch'](handleError(_0x263b39,null));};
\ No newline at end of file
index 45d433c..b6fcfd8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf1c9=['map','unreadMessages','length','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb','MailInteraction','MailMessage','setMaxListeners','save','update','remove','getUsers','setDataValue','Users'];(function(_0x53f017,_0x1a394c){var _0x2d8aa7=function(_0x4b2d47){while(--_0x4b2d47){_0x53f017['push'](_0x53f017['shift']());}};_0x2d8aa7(++_0x1a394c);}(_0xf1c9,0xa0));var _0x9f1c=function(_0x545a6c,_0x28b254){_0x545a6c=_0x545a6c-0x0;var _0x48d3f8=_0xf1c9[_0x545a6c];return _0x48d3f8;};'use strict';var EventEmitter=require(_0x9f1c('0x0'));var MailInteraction=require(_0x9f1c('0x1'))['db'][_0x9f1c('0x2')];var MailMessage=require(_0x9f1c('0x1'))['db'][_0x9f1c('0x3')];var MailInteractionEvents=new EventEmitter();MailInteractionEvents[_0x9f1c('0x4')](0x0);var events={'afterCreate':_0x9f1c('0x5'),'afterUpdate':_0x9f1c('0x6'),'afterDestroy':_0x9f1c('0x7')};function emitEvent(_0x682c2f){return function(_0x47fa4b,_0x5cca81,_0x57086d){_0x47fa4b[_0x9f1c('0x8')]({'attributes':['id'],'raw':!![]})['then'](function(_0x2be1f9){_0x47fa4b[_0x9f1c('0x9')](_0x9f1c('0xa'),_0x2be1f9[_0x9f1c('0xb')](function(_0x5d6843){return{'id':_0x5d6843['id']};}));return MailMessage['findAll']({'where':{'MailInteractionId':_0x47fa4b['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0xc99fb6){_0x47fa4b[_0x9f1c('0x9')](_0x9f1c('0xc'),_0xc99fb6[_0x9f1c('0xd')]);MailInteractionEvents['emit'](_0x682c2f+':'+_0x47fa4b['id'],_0x47fa4b);MailInteractionEvents[_0x9f1c('0xe')](_0x682c2f,_0x47fa4b);_0x57086d(null);})[_0x9f1c('0xf')](_0x57086d(null));};}for(var e in events){if(events[_0x9f1c('0x10')](e)){var event=events[e];MailInteraction[_0x9f1c('0x11')](e,emitEvent(event));}}module[_0x9f1c('0x12')]=MailInteractionEvents;
\ No newline at end of file
+var _0xbcdc=['getUsers','setDataValue','Users','map','then','length','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb','MailMessage','setMaxListeners','save','update'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xbcdc,0x1c5));var _0xcbcd=function(_0x8a4ab0,_0x3f6a07){_0x8a4ab0=_0x8a4ab0-0x0;var _0x374065=_0xbcdc[_0x8a4ab0];return _0x374065;};'use strict';var EventEmitter=require(_0xcbcd('0x0'));var MailInteraction=require('../../mysqldb')['db']['MailInteraction'];var MailMessage=require(_0xcbcd('0x1'))['db'][_0xcbcd('0x2')];var MailInteractionEvents=new EventEmitter();MailInteractionEvents[_0xcbcd('0x3')](0x0);var events={'afterCreate':_0xcbcd('0x4'),'afterUpdate':_0xcbcd('0x5'),'afterDestroy':'remove'};function emitEvent(_0x5e4e4b){return function(_0x313b05,_0x2ef093,_0x4a04b8){_0x313b05[_0xcbcd('0x6')]({'attributes':['id'],'raw':!![]})['then'](function(_0x598935){_0x313b05[_0xcbcd('0x7')](_0xcbcd('0x8'),_0x598935[_0xcbcd('0x9')](function(_0x568177){return{'id':_0x568177['id']};}));return MailMessage['findAll']({'where':{'MailInteractionId':_0x313b05['id'],'direction':'in','read':![]},'raw':!![]});})[_0xcbcd('0xa')](function(_0x5c33d6){_0x313b05[_0xcbcd('0x7')]('unreadMessages',_0x5c33d6[_0xcbcd('0xb')]);MailInteractionEvents[_0xcbcd('0xc')](_0x5e4e4b+':'+_0x313b05['id'],_0x313b05);MailInteractionEvents[_0xcbcd('0xc')](_0x5e4e4b,_0x313b05);_0x4a04b8(null);})[_0xcbcd('0xd')](_0x4a04b8(null));};}for(var e in events){if(events[_0xcbcd('0xe')](e)){var event=events[e];MailInteraction[_0xcbcd('0xf')](e,emitEvent(event));}}module[_0xcbcd('0x10')]=MailInteractionEvents;
\ No newline at end of file
index 1b4ce0a..d394a8e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb673=['MailInteraction','mail_interactions','subject','FULLTEXT','substatus','YYYY-MM-DD\x20HH:mm:ss','closed','closedAt','format','changed','models','get','catch','utf8mb4','../../config/logger','moment','rimraf','./mailInteraction.attributes','define'];(function(_0x30033a,_0x5ce4a6){var _0x5e3518=function(_0x11494a){while(--_0x11494a){_0x30033a['push'](_0x30033a['shift']());}};_0x5e3518(++_0x5ce4a6);}(_0xb673,0x1c3));var _0x3b67=function(_0x41c13f,_0x506b99){_0x41c13f=_0x41c13f-0x0;var _0x32415f=_0xb673[_0x41c13f];return _0x32415f;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x3b67('0x0'))('api');var moment=require(_0x3b67('0x1'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x3b67('0x2'));var config=require('../../config/environment');var attributes=require(_0x3b67('0x3'));module['exports']=function(_0x5af63c,_0x562836){return _0x5af63c[_0x3b67('0x4')](_0x3b67('0x5'),attributes,{'tableName':_0x3b67('0x6'),'paranoid':![],'indexes':[{'name':'fti_mail_interactions','fields':[_0x3b67('0x7'),'to'],'type':_0x3b67('0x8')}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x20f200,_0x49a032,_0x5609b9){if(_0x20f200[_0x3b67('0x9')]){_0x20f200['substatusAt']=moment()['format'](_0x3b67('0xa'));}if(_0x20f200[_0x3b67('0xb')]){_0x20f200[_0x3b67('0xc')]=moment()[_0x3b67('0xd')](_0x3b67('0xa'));}_0x5609b9(null,_0x49a032);},'beforeUpdate':function(_0x4e800f,_0x13e8b4,_0x22056d){if(_0x4e800f[_0x3b67('0xe')](_0x3b67('0x9'))){_0x4e800f['substatusAt']=_0x4e800f[_0x3b67('0x9')]?moment()['format'](_0x3b67('0xa')):null;}if(_0x4e800f[_0x3b67('0xe')](_0x3b67('0xb'))){_0x4e800f[_0x3b67('0xc')]=moment()[_0x3b67('0xd')](_0x3b67('0xa'));_0x4e800f[_0x3b67('0x9')]=null;_0x4e800f['substatusAt']=null;}_0x22056d(null,_0x4e800f);},'afterUpdate':function(_0x4afd7d,_0x5d2565,_0x4a71ba){var _0x527f51=_0x5af63c[_0x3b67('0xf')];var _0x132548=_0x4afd7d[_0x3b67('0x10')]({'plain':!![]});if(_0x132548[_0x3b67('0xb')]){return _0x527f51['MailMessage']['update']({'read':!![]},{'where':{'MailInteractionId':_0x132548['id']}})['then'](function(){_0x4a71ba();})[_0x3b67('0x11')](function(_0x1bb915){_0x4a71ba(_0x1bb915);});}else{_0x4a71ba();}}},'charset':_0x3b67('0x12'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0x0779=['MailInteraction','mail_interactions','fti_mail_interactions','subject','FULLTEXT','substatus','substatusAt','format','closed','YYYY-MM-DD\x20HH:mm:ss','changed','closedAt','models','get','update','then','catch','util','../../config/logger','api','moment','path','rimraf','./mailInteraction.attributes','exports'];(function(_0x43f524,_0x3fc876){var _0xd677ff=function(_0x54ae19){while(--_0x54ae19){_0x43f524['push'](_0x43f524['shift']());}};_0xd677ff(++_0x3fc876);}(_0x0779,0x156));var _0x9077=function(_0xce5c01,_0x2ff936){_0xce5c01=_0xce5c01-0x0;var _0x20c98f=_0x0779[_0xce5c01];return _0x20c98f;};'use strict';var _=require('lodash');var util=require(_0x9077('0x0'));var logger=require(_0x9077('0x1'))(_0x9077('0x2'));var moment=require(_0x9077('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x9077('0x4'));var rimraf=require(_0x9077('0x5'));var config=require('../../config/environment');var attributes=require(_0x9077('0x6'));module[_0x9077('0x7')]=function(_0x102066,_0x46acb6){return _0x102066['define'](_0x9077('0x8'),attributes,{'tableName':_0x9077('0x9'),'paranoid':![],'indexes':[{'name':_0x9077('0xa'),'fields':[_0x9077('0xb'),'to'],'type':_0x9077('0xc')}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x2b85fd,_0x11a5a4,_0x22db07){if(_0x2b85fd[_0x9077('0xd')]){_0x2b85fd[_0x9077('0xe')]=moment()[_0x9077('0xf')]('YYYY-MM-DD\x20HH:mm:ss');}if(_0x2b85fd[_0x9077('0x10')]){_0x2b85fd['closedAt']=moment()['format'](_0x9077('0x11'));}_0x22db07(null,_0x11a5a4);},'beforeUpdate':function(_0x38c71a,_0x191e9d,_0x1ccdf6){if(_0x38c71a[_0x9077('0x12')](_0x9077('0xd'))){_0x38c71a['substatusAt']=_0x38c71a['substatus']?moment()[_0x9077('0xf')](_0x9077('0x11')):null;}if(_0x38c71a[_0x9077('0x12')](_0x9077('0x10'))){_0x38c71a[_0x9077('0x13')]=moment()[_0x9077('0xf')](_0x9077('0x11'));_0x38c71a[_0x9077('0xd')]=null;_0x38c71a[_0x9077('0xe')]=null;}_0x1ccdf6(null,_0x38c71a);},'afterUpdate':function(_0xb59c2e,_0xca538b,_0xd83ad){var _0x25a145=_0x102066[_0x9077('0x14')];var _0x542934=_0xb59c2e[_0x9077('0x15')]({'plain':!![]});if(_0x542934[_0x9077('0x10')]){return _0x25a145['MailMessage'][_0x9077('0x16')]({'read':!![]},{'where':{'MailInteractionId':_0x542934['id']}})[_0x9077('0x17')](function(){_0xd83ad();})[_0x9077('0x18')](function(_0x3a186f){_0xd83ad(_0x3a186f);});}else{_0xd83ad();}}},'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
index 0de4bf3..161c8b9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa84f=['localhost','socket.io-emitter','register','info','MailInteraction,\x20%s,\x20%s','request\x20sent','debug','MailInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','MailInteraction','body','options','raw','where','attributes','limit','then','UpdateMailInteraction','find','omit','spread','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults'];(function(_0x307d86,_0x9264f2){var _0x361745=function(_0x1b64e1){while(--_0x1b64e1){_0x307d86['push'](_0x307d86['shift']());}};_0x361745(++_0x9264f2);}(_0xa84f,0x1dd));var _0xfa84=function(_0xfafe54,_0x23c9a6){_0xfafe54=_0xfafe54-0x0;var _0x4ab8e6=_0xa84f[_0xfafe54];return _0x4ab8e6;};'use strict';var _=require(_0xfa84('0x0'));var util=require(_0xfa84('0x1'));var moment=require(_0xfa84('0x2'));var BPromise=require(_0xfa84('0x3'));var rs=require(_0xfa84('0x4'));var fs=require('fs');var Redis=require(_0xfa84('0x5'));var db=require(_0xfa84('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xfa84('0x7'))(_0xfa84('0x8'));var config=require(_0xfa84('0x9'));var jayson=require(_0xfa84('0xa'));var client=jayson[_0xfa84('0xb')][_0xfa84('0xc')]({'port':0x232a});config[_0xfa84('0xd')]=_[_0xfa84('0xe')](config[_0xfa84('0xd')],{'host':_0xfa84('0xf'),'port':0x18eb});var socket=require(_0xfa84('0x10'))(new Redis(config[_0xfa84('0xd')]));require('./mailInteraction.socket')[_0xfa84('0x11')](socket);function respondWithRpcPromise(_0x156a4c,_0x504c54,_0x3f0153){return new BPromise(function(_0x1fe5f2,_0x47534d){return client['request'](_0x156a4c,_0x3f0153)['then'](function(_0x19c769){logger[_0xfa84('0x12')](_0xfa84('0x13'),_0x504c54,_0xfa84('0x14'));logger[_0xfa84('0x15')](_0xfa84('0x16'),_0x504c54,_0xfa84('0x14'),JSON[_0xfa84('0x17')](_0x19c769));if(_0x19c769[_0xfa84('0x18')]){if(_0x19c769[_0xfa84('0x18')][_0xfa84('0x19')]===0x1f4){logger[_0xfa84('0x18')](_0xfa84('0x13'),_0x504c54,_0x19c769[_0xfa84('0x18')][_0xfa84('0x1a')]);return _0x47534d(_0x19c769['error'][_0xfa84('0x1a')]);}logger['error'](_0xfa84('0x13'),_0x504c54,_0x19c769[_0xfa84('0x18')][_0xfa84('0x1a')]);return _0x1fe5f2(_0x19c769[_0xfa84('0x18')][_0xfa84('0x1a')]);}else{logger[_0xfa84('0x12')](_0xfa84('0x13'),_0x504c54,_0xfa84('0x14'));_0x1fe5f2(_0x19c769[_0xfa84('0x1b')][_0xfa84('0x1a')]);}})[_0xfa84('0x1c')](function(_0x135d39){logger[_0xfa84('0x18')](_0xfa84('0x13'),_0x504c54,_0x135d39);_0x47534d(_0x135d39);});});}exports['UpdateMailInteraction']=function(_0x3f34f1){var _0x40e6e8=this;return new Promise(function(_0x3151ad,_0x2113d0){return db[_0xfa84('0x1d')]['update'](_0x3f34f1[_0xfa84('0x1e')],{'raw':_0x3f34f1[_0xfa84('0x1f')]?_0x3f34f1[_0xfa84('0x1f')][_0xfa84('0x20')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3f34f1[_0xfa84('0x1f')]?_0x3f34f1[_0xfa84('0x1f')][_0xfa84('0x21')]||null:null,'attributes':_0x3f34f1[_0xfa84('0x1f')]?_0x3f34f1[_0xfa84('0x1f')][_0xfa84('0x22')]||null:null,'limit':_0x3f34f1[_0xfa84('0x1f')]?_0x3f34f1[_0xfa84('0x1f')][_0xfa84('0x23')]||null:null})[_0xfa84('0x24')](function(_0x11a9da){logger['info']('UpdateMailInteraction',_0x3f34f1);logger[_0xfa84('0x15')]('UpdateMailInteraction',_0x3f34f1,JSON[_0xfa84('0x17')](_0x11a9da));_0x3151ad(_0x11a9da);})['catch'](function(_0x35a146){logger[_0xfa84('0x18')](_0xfa84('0x25'),_0x35a146[_0xfa84('0x1a')],_0x3f34f1);_0x2113d0(_0x40e6e8['error'](0x1f4,_0x35a146['message']));});});};exports['AddTagsToMailInteraction']=function(_0x20dbb2){return new Promise(function(_0x2b124a,_0xc9af8a){return db[_0xfa84('0x1d')][_0xfa84('0x26')]({'where':_0x20dbb2[_0xfa84('0x1f')]?_0x20dbb2[_0xfa84('0x1f')][_0xfa84('0x21')]||null:null})[_0xfa84('0x24')](function(_0x4ef64d){if(_0x4ef64d){return _0x4ef64d['addTags'](_0x20dbb2['body']['ids'],_[_0xfa84('0x27')](_0x20dbb2[_0xfa84('0x1e')],['ids','id'])||{});}})[_0xfa84('0x28')](function(_0x255c98){logger[_0xfa84('0x12')]('AddTags',_0x20dbb2);logger[_0xfa84('0x15')]('AddTags',_0x20dbb2,JSON[_0xfa84('0x17')](_0x255c98));_0x2b124a(_0x255c98);})[_0xfa84('0x1c')](function(_0x3fe04e){logger[_0xfa84('0x18')]('AddTags',_0x3fe04e['message'],_0x20dbb2);_0xc9af8a(_this['error'](0x1f4,_0x3fe04e[_0xfa84('0x1a')]));});});};
\ No newline at end of file
+var _0x8825=['client','http','redis','defaults','socket.io-emitter','./mailInteraction.socket','register','then','info','debug','MailInteraction,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','MailInteraction,\x20%s,\x20%s','message','result','catch','UpdateMailInteraction','MailInteraction','update','options','raw','where','attributes','limit','addTags','ids','omit','body','AddTags','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x3bda5f,_0x10f5c0){var _0x22c607=function(_0x4a01f0){while(--_0x4a01f0){_0x3bda5f['push'](_0x3bda5f['shift']());}};_0x22c607(++_0x10f5c0);}(_0x8825,0x9e));var _0x5882=function(_0x366484,_0x4805bc){_0x366484=_0x366484-0x0;var _0x347366=_0x8825[_0x366484];return _0x347366;};'use strict';var _=require('lodash');var util=require(_0x5882('0x0'));var moment=require(_0x5882('0x1'));var BPromise=require(_0x5882('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x5882('0x3'));var db=require(_0x5882('0x4'))['db'];var utils=require(_0x5882('0x5'));var logger=require(_0x5882('0x6'))(_0x5882('0x7'));var config=require(_0x5882('0x8'));var jayson=require(_0x5882('0x9'));var client=jayson[_0x5882('0xa')][_0x5882('0xb')]({'port':0x232a});config[_0x5882('0xc')]=_[_0x5882('0xd')](config[_0x5882('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0x5882('0xe'))(new Redis(config['redis']));require(_0x5882('0xf'))[_0x5882('0x10')](socket);function respondWithRpcPromise(_0x1bbb66,_0x5d3929,_0x3db51a){return new BPromise(function(_0x436958,_0x2a8a1){return client['request'](_0x1bbb66,_0x3db51a)[_0x5882('0x11')](function(_0x4d30d6){logger[_0x5882('0x12')]('MailInteraction,\x20%s,\x20%s',_0x5d3929,'request\x20sent');logger[_0x5882('0x13')](_0x5882('0x14'),_0x5d3929,_0x5882('0x15'),JSON[_0x5882('0x16')](_0x4d30d6));if(_0x4d30d6['error']){if(_0x4d30d6[_0x5882('0x17')][_0x5882('0x18')]===0x1f4){logger[_0x5882('0x17')](_0x5882('0x19'),_0x5d3929,_0x4d30d6[_0x5882('0x17')][_0x5882('0x1a')]);return _0x2a8a1(_0x4d30d6['error'][_0x5882('0x1a')]);}logger[_0x5882('0x17')](_0x5882('0x19'),_0x5d3929,_0x4d30d6[_0x5882('0x17')]['message']);return _0x436958(_0x4d30d6[_0x5882('0x17')][_0x5882('0x1a')]);}else{logger['info'](_0x5882('0x19'),_0x5d3929,_0x5882('0x15'));_0x436958(_0x4d30d6[_0x5882('0x1b')][_0x5882('0x1a')]);}})[_0x5882('0x1c')](function(_0x1f6553){logger['error'](_0x5882('0x19'),_0x5d3929,_0x1f6553);_0x2a8a1(_0x1f6553);});});}exports[_0x5882('0x1d')]=function(_0x7d40eb){var _0xaa6563=this;return new Promise(function(_0xd3cd7b,_0x282809){return db[_0x5882('0x1e')][_0x5882('0x1f')](_0x7d40eb['body'],{'raw':_0x7d40eb[_0x5882('0x20')]?_0x7d40eb[_0x5882('0x20')][_0x5882('0x21')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x7d40eb[_0x5882('0x20')]?_0x7d40eb['options'][_0x5882('0x22')]||null:null,'attributes':_0x7d40eb[_0x5882('0x20')]?_0x7d40eb['options'][_0x5882('0x23')]||null:null,'limit':_0x7d40eb[_0x5882('0x20')]?_0x7d40eb[_0x5882('0x20')][_0x5882('0x24')]||null:null})[_0x5882('0x11')](function(_0x261569){logger[_0x5882('0x12')](_0x5882('0x1d'),_0x7d40eb);logger['debug'](_0x5882('0x1d'),_0x7d40eb,JSON[_0x5882('0x16')](_0x261569));_0xd3cd7b(_0x261569);})[_0x5882('0x1c')](function(_0x4ae25b){logger[_0x5882('0x17')](_0x5882('0x1d'),_0x4ae25b[_0x5882('0x1a')],_0x7d40eb);_0x282809(_0xaa6563['error'](0x1f4,_0x4ae25b[_0x5882('0x1a')]));});});};exports['AddTagsToMailInteraction']=function(_0x2c9eee){return new Promise(function(_0x3c21f2,_0x677e59){return db[_0x5882('0x1e')]['find']({'where':_0x2c9eee[_0x5882('0x20')]?_0x2c9eee[_0x5882('0x20')][_0x5882('0x22')]||null:null})[_0x5882('0x11')](function(_0x3db3b8){if(_0x3db3b8){return _0x3db3b8[_0x5882('0x25')](_0x2c9eee['body'][_0x5882('0x26')],_[_0x5882('0x27')](_0x2c9eee[_0x5882('0x28')],[_0x5882('0x26'),'id'])||{});}})['spread'](function(_0x2c4671){logger[_0x5882('0x12')]('AddTags',_0x2c9eee);logger[_0x5882('0x13')](_0x5882('0x29'),_0x2c9eee,JSON[_0x5882('0x16')](_0x2c4671));_0x3c21f2(_0x2c4671);})[_0x5882('0x1c')](function(_0x4ec2ea){logger[_0x5882('0x17')](_0x5882('0x29'),_0x4ec2ea[_0x5882('0x1a')],_0x2c9eee);_0x677e59(_this['error'](0x1f4,_0x4ec2ea[_0x5882('0x1a')]));});});};
\ No newline at end of file
index 1b1ad66..091a3cd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7682=['remove','emit','removeListener','register','length','mailInteraction:','./mailInteraction.events','save'];(function(_0x2f635e,_0x1f899d){var _0x2169a8=function(_0x40ed60){while(--_0x40ed60){_0x2f635e['push'](_0x2f635e['shift']());}};_0x2169a8(++_0x1f899d);}(_0x7682,0x116));var _0x2768=function(_0x4e8fb5,_0x5bb89a){_0x4e8fb5=_0x4e8fb5-0x0;var _0x198b65=_0x7682[_0x4e8fb5];return _0x198b65;};'use strict';var MailInteractionEvents=require(_0x2768('0x0'));var events=[_0x2768('0x1'),_0x2768('0x2'),'update'];function createListener(_0x3b8121,_0x518793){return function(_0x3445b9){_0x518793[_0x2768('0x3')](_0x3b8121,_0x3445b9);};}function removeListener(_0x26ab35,_0x582ef1){return function(){MailInteractionEvents[_0x2768('0x4')](_0x26ab35,_0x582ef1);};}exports[_0x2768('0x5')]=function(_0x2b03fe){for(var _0x2d2849=0x0,_0x1258be=events[_0x2768('0x6')];_0x2d2849<_0x1258be;_0x2d2849++){var _0xf664a=events[_0x2d2849];var _0x51c77a=createListener(_0x2768('0x7')+_0xf664a,_0x2b03fe);MailInteractionEvents['on'](_0xf664a,_0x51c77a);}};
\ No newline at end of file
+var _0x9256=['update','removeListener','length','mailInteraction:','./mailInteraction.events','remove'];(function(_0x3d37c5,_0x1d848e){var _0x4ec30a=function(_0x3c459b){while(--_0x3c459b){_0x3d37c5['push'](_0x3d37c5['shift']());}};_0x4ec30a(++_0x1d848e);}(_0x9256,0xa6));var _0x6925=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x9256[_0x3dd15e];return _0x231fd0;};'use strict';var MailInteractionEvents=require(_0x6925('0x0'));var events=['save',_0x6925('0x1'),_0x6925('0x2')];function createListener(_0x48f842,_0x4e39fa){return function(_0x214790){_0x4e39fa['emit'](_0x48f842,_0x214790);};}function removeListener(_0x369097,_0x36d3ab){return function(){MailInteractionEvents[_0x6925('0x3')](_0x369097,_0x36d3ab);};}exports['register']=function(_0x23a9f3){for(var _0x444bb4=0x0,_0x3afba0=events[_0x6925('0x4')];_0x444bb4<_0x3afba0;_0x444bb4++){var _0x32c003=events[_0x444bb4];var _0x1374fb=createListener(_0x6925('0x5')+_0x32c003,_0x23a9f3);MailInteractionEvents['on'](_0x32c003,_0x1374fb);}};
\ No newline at end of file
index 5565a5c..e3ea2df 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdebe=['express','Router','../../components/auth/service','./mailInteractionHasTag.controller','/describe','describe','exports'];(function(_0x869333,_0xf50143){var _0x420377=function(_0xde5b0d){while(--_0xde5b0d){_0x869333['push'](_0x869333['shift']());}};_0x420377(++_0xf50143);}(_0xdebe,0x142));var _0xedeb=function(_0x518acd,_0x43c0c7){_0x518acd=_0x518acd-0x0;var _0x2faa0d=_0xdebe[_0x518acd];return _0x2faa0d;};'use strict';var express=require(_0xedeb('0x0'));var router=express[_0xedeb('0x1')]();var auth=require(_0xedeb('0x2'));var controller=require(_0xedeb('0x3'));router['get'](_0xedeb('0x4'),auth['isAuthenticated'](),controller[_0xedeb('0x5')]);module[_0xedeb('0x6')]=router;
\ No newline at end of file
+var _0xc0e1=['Router','../../components/auth/service','get','/describe','isAuthenticated','describe','exports','express'];(function(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0xc0e1,0x147));var _0x1c0e=function(_0x1c5950,_0x49e128){_0x1c5950=_0x1c5950-0x0;var _0x2b720a=_0xc0e1[_0x1c5950];return _0x2b720a;};'use strict';var express=require(_0x1c0e('0x0'));var router=express[_0x1c0e('0x1')]();var auth=require(_0x1c0e('0x2'));var controller=require('./mailInteractionHasTag.controller');router[_0x1c0e('0x3')](_0x1c0e('0x4'),auth[_0x1c0e('0x5')](),controller[_0x1c0e('0x6')]);module[_0x1c0e('0x7')]=router;
\ No newline at end of file
index 8ca96d9..9fd3bfe 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['catch','../../config/logger','api','../../mysqldb','json','error','name','status','describe','then'];(function(_0x510eb6,_0x1c22ce){var _0x3168a6=function(_0x21ef33){while(--_0x21ef33){_0x510eb6['push'](_0x510eb6['shift']());}};_0x3168a6(++_0x1c22ce);}(_0xa9e0,0x123));var _0x0a9e=function(_0x49ca18,_0x5e6d05){_0x49ca18=_0x49ca18-0x0;var _0x145d54=_0xa9e0[_0x49ca18];return _0x145d54;};'use strict';var logger=require(_0x0a9e('0x0'))(_0x0a9e('0x1'));var db=require(_0x0a9e('0x2'))['db'];function respondWithResult(_0x5dd881,_0x550fbc){_0x550fbc=_0x550fbc||0xc8;return function(_0x18d5c9){if(_0x18d5c9){return _0x5dd881['status'](_0x550fbc)[_0x0a9e('0x3')](_0x18d5c9);}};}function handleError(_0x432180,_0x2ab90b){_0x2ab90b=_0x2ab90b||0x1f4;return function(_0x991246){logger[_0x0a9e('0x4')](_0x991246['stack']);if(_0x991246[_0x0a9e('0x5')]){delete _0x991246[_0x0a9e('0x5')];}_0x432180[_0x0a9e('0x6')](_0x2ab90b)['send'](_0x991246);};}exports['describe']=function(_0xe42b77,_0x56465b){return db['MailInteractionHasTag'][_0x0a9e('0x7')]()[_0x0a9e('0x8')](respondWithResult(_0x56465b,null))[_0x0a9e('0x9')](handleError(_0x56465b,null));};
\ No newline at end of file
+var _0xa9e0=['catch','../../config/logger','api','../../mysqldb','json','error','name','status','describe','then'];(function(_0x3b395a,_0xf8e390){var _0x33570f=function(_0x4e8e66){while(--_0x4e8e66){_0x3b395a['push'](_0x3b395a['shift']());}};_0x33570f(++_0xf8e390);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0xa9e0[_0x5b644e];return _0x49c6bf;};'use strict';var logger=require(_0x0a9e('0x0'))(_0x0a9e('0x1'));var db=require(_0x0a9e('0x2'))['db'];function respondWithResult(_0x5dd881,_0x550fbc){_0x550fbc=_0x550fbc||0xc8;return function(_0x18d5c9){if(_0x18d5c9){return _0x5dd881['status'](_0x550fbc)[_0x0a9e('0x3')](_0x18d5c9);}};}function handleError(_0x432180,_0x2ab90b){_0x2ab90b=_0x2ab90b||0x1f4;return function(_0x991246){logger[_0x0a9e('0x4')](_0x991246['stack']);if(_0x991246[_0x0a9e('0x5')]){delete _0x991246[_0x0a9e('0x5')];}_0x432180[_0x0a9e('0x6')](_0x2ab90b)['send'](_0x991246);};}exports['describe']=function(_0xe42b77,_0x56465b){return db['MailInteractionHasTag'][_0x0a9e('0x7')]()[_0x0a9e('0x8')](respondWithResult(_0x56465b,null))[_0x0a9e('0x9')](handleError(_0x56465b,null));};
\ No newline at end of file
index 4b453c8..cce3d14 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x57bf=['exports','INTEGER','sequelize'];(function(_0x2c7018,_0xae875e){var _0x3a29c8=function(_0x502f9c){while(--_0x502f9c){_0x2c7018['push'](_0x2c7018['shift']());}};_0x3a29c8(++_0xae875e);}(_0x57bf,0x1e8));var _0xf57b=function(_0x24104f,_0x2fbb92){_0x24104f=_0x24104f-0x0;var _0x524d2b=_0x57bf[_0x24104f];return _0x524d2b;};'use strict';var Sequelize=require(_0xf57b('0x0'));module[_0xf57b('0x1')]={'MailInteractionId':{'type':Sequelize[_0xf57b('0x2')],'primaryKey':!![]},'TagId':{'type':Sequelize[_0xf57b('0x2')],'defaultValue':null}};
\ No newline at end of file
+var _0x140a=['sequelize','exports'];(function(_0x3f2a52,_0x1aef1d){var _0x142c89=function(_0x241d2b){while(--_0x241d2b){_0x3f2a52['push'](_0x3f2a52['shift']());}};_0x142c89(++_0x1aef1d);}(_0x140a,0xfc));var _0xa140=function(_0x15bc81,_0x4d4f77){_0x15bc81=_0x15bc81-0x0;var _0x59440e=_0x140a[_0x15bc81];return _0x59440e;};'use strict';var Sequelize=require(_0xa140('0x0'));module[_0xa140('0x1')]={'MailInteractionId':{'type':Sequelize['INTEGER'],'primaryKey':!![]},'TagId':{'type':Sequelize['INTEGER'],'defaultValue':null}};
\ No newline at end of file
index 28337e4..7e040d8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x658d=['./mailInteractionHasTag','exports','define','MailInteractionHasTag','mail_interaction_has_tags'];(function(_0x43e2e4,_0x4ad3b4){var _0x1b71d0=function(_0x45812a){while(--_0x45812a){_0x43e2e4['push'](_0x43e2e4['shift']());}};_0x1b71d0(++_0x4ad3b4);}(_0x658d,0x7d));var _0xd658=function(_0x231e16,_0x67347b){_0x231e16=_0x231e16-0x0;var _0x570a7c=_0x658d[_0x231e16];return _0x570a7c;};'use strict';var attributes=require(_0xd658('0x0'));module[_0xd658('0x1')]=function(_0x3a8615){return _0x3a8615[_0xd658('0x2')](_0xd658('0x3'),attributes,{'tableName':_0xd658('0x4'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x020b=['MailInteractionHasTag','mail_interaction_has_tags','./mailInteractionHasTag','exports','define'];(function(_0x1b819b,_0x1ff86b){var _0x178051=function(_0x154021){while(--_0x154021){_0x1b819b['push'](_0x1b819b['shift']());}};_0x178051(++_0x1ff86b);}(_0x020b,0x197));var _0xb020=function(_0x571455,_0x2456f6){_0x571455=_0x571455-0x0;var _0x3849c9=_0x020b[_0x571455];return _0x3849c9;};'use strict';var attributes=require(_0xb020('0x0'));module[_0xb020('0x1')]=function(_0x207df2){return _0x207df2[_0xb020('0x2')](_0xb020('0x3'),attributes,{'tableName':_0xb020('0x4'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 88b57fc..5115b64 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5a68=['express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailMessage.controller','isAuthenticated','index','get','describe','/:id','show','/:id/download','post','mailmessage:create','update','put','/:id/accept','accept','/:id/reject','reject','delete','destroy','exports','path','connect-timeout'];(function(_0x36d203,_0x3653f3){var _0x2f9e62=function(_0x461a77){while(--_0x461a77){_0x36d203['push'](_0x36d203['shift']());}};_0x2f9e62(++_0x3653f3);}(_0x5a68,0x1ae));var _0x85a6=function(_0x8589d2,_0x189461){_0x8589d2=_0x8589d2-0x0;var _0x4f2d62=_0x5a68[_0x8589d2];return _0x4f2d62;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x85a6('0x0'));var timeout=require(_0x85a6('0x1'));var express=require(_0x85a6('0x2'));var router=express[_0x85a6('0x3')]();var fs_extra=require(_0x85a6('0x4'));var auth=require(_0x85a6('0x5'));var interaction=require(_0x85a6('0x6'));var config=require(_0x85a6('0x7'));var controller=require(_0x85a6('0x8'));router['get']('/',auth[_0x85a6('0x9')](),controller[_0x85a6('0xa')]);router[_0x85a6('0xb')]('/describe',auth[_0x85a6('0x9')](),controller[_0x85a6('0xc')]);router[_0x85a6('0xb')](_0x85a6('0xd'),auth[_0x85a6('0x9')](),controller[_0x85a6('0xe')]);router[_0x85a6('0xb')](_0x85a6('0xf'),auth[_0x85a6('0x9')](),controller['download']);router[_0x85a6('0x10')]('/',auth['isAuthenticated'](),interaction['tracked']('mail',_0x85a6('0x11')),controller['create']);router['put']('/:id',auth['isAuthenticated'](),controller[_0x85a6('0x12')]);router[_0x85a6('0x13')](_0x85a6('0x14'),auth['isAuthenticated'](),controller[_0x85a6('0x15')]);router[_0x85a6('0x13')](_0x85a6('0x16'),auth[_0x85a6('0x9')](),controller[_0x85a6('0x17')]);router[_0x85a6('0x18')](_0x85a6('0xd'),auth[_0x85a6('0x9')](),controller[_0x85a6('0x19')]);module[_0x85a6('0x1a')]=router;
\ No newline at end of file
+var _0x01bb=['index','/describe','describe','show','/:id/download','post','tracked','mail','create','put','update','/:id/accept','accept','/:id/reject','reject','delete','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/interaction/service','get','isAuthenticated'];(function(_0x13dfef,_0xd52392){var _0x6ed896=function(_0x118184){while(--_0x118184){_0x13dfef['push'](_0x13dfef['shift']());}};_0x6ed896(++_0xd52392);}(_0x01bb,0x171));var _0xb01b=function(_0x523b7b,_0x425d30){_0x523b7b=_0x523b7b-0x0;var _0x108a85=_0x01bb[_0x523b7b];return _0x108a85;};'use strict';var multer=require(_0xb01b('0x0'));var util=require(_0xb01b('0x1'));var path=require(_0xb01b('0x2'));var timeout=require(_0xb01b('0x3'));var express=require(_0xb01b('0x4'));var router=express['Router']();var fs_extra=require(_0xb01b('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xb01b('0x6'));var config=require('../../config/environment');var controller=require('./mailMessage.controller');router[_0xb01b('0x7')]('/',auth[_0xb01b('0x8')](),controller[_0xb01b('0x9')]);router[_0xb01b('0x7')](_0xb01b('0xa'),auth[_0xb01b('0x8')](),controller[_0xb01b('0xb')]);router[_0xb01b('0x7')]('/:id',auth[_0xb01b('0x8')](),controller[_0xb01b('0xc')]);router[_0xb01b('0x7')](_0xb01b('0xd'),auth[_0xb01b('0x8')](),controller['download']);router[_0xb01b('0xe')]('/',auth[_0xb01b('0x8')](),interaction[_0xb01b('0xf')](_0xb01b('0x10'),'mailmessage:create'),controller[_0xb01b('0x11')]);router[_0xb01b('0x12')]('/:id',auth['isAuthenticated'](),controller[_0xb01b('0x13')]);router[_0xb01b('0x12')](_0xb01b('0x14'),auth[_0xb01b('0x8')](),controller[_0xb01b('0x15')]);router[_0xb01b('0x12')](_0xb01b('0x16'),auth[_0xb01b('0x8')](),controller[_0xb01b('0x17')]);router[_0xb01b('0x18')]('/:id',auth[_0xb01b('0x8')](),controller[_0xb01b('0x19')]);module[_0xb01b('0x1a')]=router;
\ No newline at end of file
index fad6d3d..9fefdfa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x163e=['ENUM','Email','Chat','sequelize','lodash','exports','TEXT','long','medium','out','STRING','DATE','INTEGER','BOOLEAN'];(function(_0xf56b46,_0x4e32e8){var _0x583cea=function(_0x4ce708){while(--_0x4ce708){_0xf56b46['push'](_0xf56b46['shift']());}};_0x583cea(++_0x4e32e8);}(_0x163e,0x9d));var _0xe163=function(_0xd2a568,_0x4e8606){_0xd2a568=_0xd2a568-0x0;var _0x4cf0ba=_0x163e[_0xd2a568];return _0x4cf0ba;};'use strict';var Sequelize=require(_0xe163('0x0'));var _=require(_0xe163('0x1'));module[_0xe163('0x2')]={'body':{'type':Sequelize[_0xe163('0x3')](_0xe163('0x4')),'allowNull':![]},'plainBody':{'type':Sequelize[_0xe163('0x3')](_0xe163('0x5'))},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in',_0xe163('0x6')),'defaultValue':'out','allowNull':![]},'messageId':{'type':Sequelize['STRING'](0x1fe)},'from':{'type':Sequelize[_0xe163('0x7')]},'to':{'type':Sequelize[_0xe163('0x3')]('long')},'cc':{'type':Sequelize[_0xe163('0x3')](_0xe163('0x4'))},'bcc':{'type':Sequelize['TEXT']('long')},'subject':{'type':Sequelize[_0xe163('0x3')]},'sentAt':{'type':Sequelize[_0xe163('0x8')]},'attach':{'type':Sequelize[_0xe163('0x9')],'defaultValue':0x0},'secret':{'type':Sequelize[_0xe163('0xa')],'defaultValue':![]},'readAt':{'type':Sequelize[_0xe163('0x8')]},'originTo':{'type':Sequelize[_0xe163('0x3')](_0xe163('0x4'))},'originCc':{'type':Sequelize[_0xe163('0x3')](_0xe163('0x4'))},'originChannel':{'type':Sequelize[_0xe163('0xb')](_0xe163('0xc'),_0xe163('0xd')),'defaultValue':_0xe163('0xc'),'allowNull':![]}};
\ No newline at end of file
+var _0xdc9c=['STRING','long','DATE','INTEGER','Chat','Email','TEXT','medium','BOOLEAN','ENUM','out'];(function(_0x59e0ef,_0x1b80e2){var _0x27c014=function(_0xdb0adc){while(--_0xdb0adc){_0x59e0ef['push'](_0x59e0ef['shift']());}};_0x27c014(++_0x1b80e2);}(_0xdc9c,0xe2));var _0xcdc9=function(_0x42f345,_0x2a2576){_0x42f345=_0x42f345-0x0;var _0xdd14bd=_0xdc9c[_0x42f345];return _0xdd14bd;};'use strict';var Sequelize=require('sequelize');var _=require('lodash');module['exports']={'body':{'type':Sequelize[_0xcdc9('0x0')]('long'),'allowNull':![]},'plainBody':{'type':Sequelize[_0xcdc9('0x0')](_0xcdc9('0x1'))},'read':{'type':Sequelize[_0xcdc9('0x2')],'defaultValue':![]},'direction':{'type':Sequelize[_0xcdc9('0x3')]('in','out'),'defaultValue':_0xcdc9('0x4'),'allowNull':![]},'messageId':{'type':Sequelize['STRING'](0x1fe)},'from':{'type':Sequelize[_0xcdc9('0x5')]},'to':{'type':Sequelize[_0xcdc9('0x0')](_0xcdc9('0x6'))},'cc':{'type':Sequelize[_0xcdc9('0x0')]('long')},'bcc':{'type':Sequelize['TEXT']('long')},'subject':{'type':Sequelize['TEXT']},'sentAt':{'type':Sequelize[_0xcdc9('0x7')]},'attach':{'type':Sequelize[_0xcdc9('0x8')],'defaultValue':0x0},'secret':{'type':Sequelize[_0xcdc9('0x2')],'defaultValue':![]},'readAt':{'type':Sequelize[_0xcdc9('0x7')]},'originTo':{'type':Sequelize[_0xcdc9('0x0')](_0xcdc9('0x6'))},'originCc':{'type':Sequelize[_0xcdc9('0x0')](_0xcdc9('0x6'))},'originChannel':{'type':Sequelize[_0xcdc9('0x3')]('Email',_0xcdc9('0x9')),'defaultValue':_0xcdc9('0xa'),'allowNull':![]}};
\ No newline at end of file
index 1f97603..0471e09 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa922=['name','send','index','map','MailMessage','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','VIRTUAL','filter','merge','options','includeAll','include','findAll','show','params','find','body','destroy','describe','create','direction','secret','split','MailAccount','MailAccountId','CmList','List','CmContact','Contacts','updatedAt','DESC','MailServerOut','CloudProvider','Smtp','getSmtpOptions','attachments','join','root','ListId','List\x20not\x20found','SendMail','messageId','format','YYYY-MM-DD\x20HH:mm:ss','accept','mail','read','readAt','UserId','user','get','MailInteraction','MailInteractionId','interaction','role','stringify','null','AcceptMessage','acceptMessage','ContactId','sequelize','Sequelize','QueryTypes','SELECT','contact','agent','fullname','email','internal','manual','interface','channel','event','fromString','EventManager','acceptmessage','reject','[MAILMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','motionChannel','unix','toString','server','files','tmp','message-%s.eml','from','bcc','subject','createdAt','Attachment','Attachments','decode','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','existsSync','push','build','download','moment','bluebird','util','path','lodash','ioredis','api','../../config/logger','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','html-entities','./mailMessage.socket','jayson/promise','client','then','info','MailMessage,\x20%s,\x20%s','debug','request\x20sent','error','code','message','result','catch','status','json','offset','undefined','limit','count','update','end','stack'];(function(_0x338a2b,_0x498662){var _0xebfc3b=function(_0x535de0){while(--_0x535de0){_0x338a2b['push'](_0x338a2b['shift']());}};_0xebfc3b(++_0x498662);}(_0xa922,0x1a6));var _0x2a92=function(_0x32124e,_0x491dc3){_0x32124e=_0x32124e-0x0;var _0x9ea410=_0xa922[_0x32124e];return _0x9ea410;};'use strict';var emlformat=require('eml-format');var moment=require(_0x2a92('0x0'));var BPromise=require(_0x2a92('0x1'));var util=require(_0x2a92('0x2'));var path=require(_0x2a92('0x3'));var fs=require('fs');var _=require(_0x2a92('0x4'));var Redis=require(_0x2a92('0x5'));var htmlToText=require('html-to-text');var qs=require('../../components/parsers/qs');var logger=require('../../config/logger')(_0x2a92('0x6'));var interaction_log=require(_0x2a92('0x7'))('mail-interactions');var config=require(_0x2a92('0x8'));var db=require(_0x2a92('0x9'))['db'];config[_0x2a92('0xa')]=_[_0x2a92('0xb')](config[_0x2a92('0xa')],{'host':_0x2a92('0xc'),'port':0x18eb});var socket=require(_0x2a92('0xd'))(new Redis(config[_0x2a92('0xa')]));var htmlEntities=require(_0x2a92('0xe'));require(_0x2a92('0xf'))['register'](socket);var jayson=require(_0x2a92('0x10'));var client=jayson[_0x2a92('0x11')]['http']({'port':0x232c});var client9003=jayson[_0x2a92('0x11')]['http']({'port':0x232b});var client9002=jayson[_0x2a92('0x11')]['http']({'port':0x232a});function respondWithRpcPromise(_0x836f8d,_0x23fb9f,_0x56f145,_0x310a5b){return new BPromise(function(_0x3bb527,_0x40a68f){var _0x1791f3=_0x310a5b||client;return _0x1791f3['request'](_0x836f8d,_0x56f145)[_0x2a92('0x12')](function(_0x567566){logger[_0x2a92('0x13')](_0x2a92('0x14'),_0x23fb9f,'request\x20sent');logger[_0x2a92('0x15')]('MailMessage,\x20%s,\x20%s,\x20%s',_0x23fb9f,_0x2a92('0x16'),JSON['stringify'](_0x567566));if(_0x567566[_0x2a92('0x17')]){if(_0x567566[_0x2a92('0x17')][_0x2a92('0x18')]===0x1f4){logger[_0x2a92('0x17')](_0x2a92('0x14'),_0x23fb9f,_0x567566[_0x2a92('0x17')][_0x2a92('0x19')]);return _0x40a68f(_0x567566[_0x2a92('0x17')][_0x2a92('0x19')]);}logger[_0x2a92('0x17')](_0x2a92('0x14'),_0x23fb9f,_0x567566[_0x2a92('0x17')][_0x2a92('0x19')]);return _0x3bb527(_0x567566[_0x2a92('0x17')][_0x2a92('0x19')]);}else{logger[_0x2a92('0x13')](_0x2a92('0x14'),_0x23fb9f,'request\x20sent');_0x3bb527(_0x567566[_0x2a92('0x1a')]['message']);}})[_0x2a92('0x1b')](function(_0x66aacd){logger[_0x2a92('0x17')]('MailMessage,\x20%s,\x20%s',_0x23fb9f,_0x66aacd);_0x40a68f(_0x66aacd);});});}function respondWithResult(_0x3b5820,_0x546fc1){_0x546fc1=_0x546fc1||0xc8;return function(_0x2b7602){if(_0x2b7602){return _0x3b5820[_0x2a92('0x1c')](_0x546fc1)[_0x2a92('0x1d')](_0x2b7602);}};}function respondWithFilteredResult(_0x1c5444,_0xb6d358){return function(_0x2439e8){if(_0x2439e8){var _0x4ab4a4=typeof _0xb6d358[_0x2a92('0x1e')]===_0x2a92('0x1f')&&typeof _0xb6d358[_0x2a92('0x20')]===_0x2a92('0x1f');var _0x52f3e1=_0x2439e8[_0x2a92('0x21')];var _0x4cead5=_0x4ab4a4?0x0:_0xb6d358['offset'];var _0x46a566=_0x4ab4a4?_0x2439e8[_0x2a92('0x21')]:_0xb6d358[_0x2a92('0x1e')]+_0xb6d358[_0x2a92('0x20')];var _0x21118c;if(_0x46a566>=_0x52f3e1){_0x46a566=_0x52f3e1;_0x21118c=0xc8;}else{_0x21118c=0xce;}_0x1c5444[_0x2a92('0x1c')](_0x21118c);return _0x1c5444['set']('Content-Range',_0x4cead5+'-'+_0x46a566+'/'+_0x52f3e1)[_0x2a92('0x1d')](_0x2439e8);}return null;};}function saveUpdates(_0xa8f572){return function(_0x57c5d0){if(_0x57c5d0){return _0x57c5d0[_0x2a92('0x22')](_0xa8f572)['then'](function(_0x368c08){return _0x368c08;});}return null;};}function removeEntity(_0x3dcb35){return function(_0x3004b4){if(_0x3004b4){return _0x3004b4['destroy']()['then'](function(){_0x3dcb35[_0x2a92('0x1c')](0xcc)[_0x2a92('0x23')]();});}};}function handleEntityNotFound(_0x1f56fa){return function(_0x2734a0){if(!_0x2734a0){_0x1f56fa['sendStatus'](0x194);}return _0x2734a0;};}function handleError(_0x5d9917,_0x192da8){_0x192da8=_0x192da8||0x1f4;return function(_0x89b9a2){logger[_0x2a92('0x17')](_0x89b9a2[_0x2a92('0x24')]);if(_0x89b9a2['name']){delete _0x89b9a2[_0x2a92('0x25')];}_0x5d9917[_0x2a92('0x1c')](_0x192da8)[_0x2a92('0x26')](_0x89b9a2);};}exports[_0x2a92('0x27')]=function(_0x135fbf,_0x150318){var _0x1d3e1c={},_0xef40f4={},_0x68f3f8={'count':0x0,'rows':[]};var _0x4a5494=_[_0x2a92('0x28')](db[_0x2a92('0x29')][_0x2a92('0x2a')],function(_0x1ee8a3){return{'name':_0x1ee8a3[_0x2a92('0x2b')],'type':_0x1ee8a3[_0x2a92('0x2c')][_0x2a92('0x2d')]};});_0xef40f4[_0x2a92('0x2e')]=_[_0x2a92('0x28')](_0x4a5494,_0x2a92('0x25'));_0xef40f4[_0x2a92('0x2f')]=_[_0x2a92('0x30')](_0x135fbf[_0x2a92('0x2f')]);_0xef40f4[_0x2a92('0x31')]=_[_0x2a92('0x32')](_0xef40f4[_0x2a92('0x2e')],_0xef40f4['query']);_0x1d3e1c[_0x2a92('0x33')]=_['intersection'](_0xef40f4[_0x2a92('0x2e')],qs[_0x2a92('0x34')](_0x135fbf[_0x2a92('0x2f')]['fields']));_0x1d3e1c[_0x2a92('0x33')]=_0x1d3e1c[_0x2a92('0x33')][_0x2a92('0x35')]?_0x1d3e1c[_0x2a92('0x33')]:_0xef40f4[_0x2a92('0x2e')];if(!_0x135fbf[_0x2a92('0x2f')][_0x2a92('0x36')]('nolimit')){_0x1d3e1c[_0x2a92('0x20')]=qs[_0x2a92('0x20')](_0x135fbf[_0x2a92('0x2f')][_0x2a92('0x20')]);_0x1d3e1c[_0x2a92('0x1e')]=qs[_0x2a92('0x1e')](_0x135fbf[_0x2a92('0x2f')][_0x2a92('0x1e')]);}_0x1d3e1c[_0x2a92('0x37')]=qs[_0x2a92('0x38')](_0x135fbf[_0x2a92('0x2f')][_0x2a92('0x38')]);_0x1d3e1c[_0x2a92('0x39')]=qs[_0x2a92('0x31')](_[_0x2a92('0x3a')](_0x135fbf[_0x2a92('0x2f')],_0xef40f4[_0x2a92('0x31')]),_0x4a5494);if(_0x135fbf['query']['filter']){_0x1d3e1c[_0x2a92('0x39')]=_['merge'](_0x1d3e1c['where'],{'$or':_[_0x2a92('0x28')](_0x4a5494,function(_0x42beec){if(_0x42beec['type']!==_0x2a92('0x3b')){var _0x49051d={};_0x49051d[_0x42beec[_0x2a92('0x25')]]={'$like':'%'+_0x135fbf[_0x2a92('0x2f')][_0x2a92('0x3c')]+'%'};return _0x49051d;}})});}_0x1d3e1c=_[_0x2a92('0x3d')]({},_0x1d3e1c,_0x135fbf[_0x2a92('0x3e')]);var _0x2d7dda={'where':_0x1d3e1c[_0x2a92('0x39')]};return db['MailMessage'][_0x2a92('0x21')](_0x2d7dda)[_0x2a92('0x12')](function(_0x46564d){_0x68f3f8[_0x2a92('0x21')]=_0x46564d;if(_0x135fbf['query'][_0x2a92('0x3f')]){_0x1d3e1c[_0x2a92('0x40')]=[{'all':!![]}];}return db[_0x2a92('0x29')][_0x2a92('0x41')](_0x1d3e1c);})[_0x2a92('0x12')](function(_0x54f0fd){_0x68f3f8['rows']=_0x54f0fd;return _0x68f3f8;})['then'](respondWithFilteredResult(_0x150318,_0x1d3e1c))[_0x2a92('0x1b')](handleError(_0x150318,null));};exports[_0x2a92('0x42')]=function(_0x1ff996,_0x16a852){var _0x5aee53={'raw':!![],'where':{'id':_0x1ff996[_0x2a92('0x43')]['id']}},_0x2d1b4b={};_0x2d1b4b[_0x2a92('0x2e')]=_['keys'](db[_0x2a92('0x29')][_0x2a92('0x2a')]);_0x2d1b4b[_0x2a92('0x2f')]=_[_0x2a92('0x30')](_0x1ff996[_0x2a92('0x2f')]);_0x2d1b4b[_0x2a92('0x31')]=_['intersection'](_0x2d1b4b[_0x2a92('0x2e')],_0x2d1b4b[_0x2a92('0x2f')]);_0x5aee53['attributes']=_[_0x2a92('0x32')](_0x2d1b4b[_0x2a92('0x2e')],qs[_0x2a92('0x34')](_0x1ff996[_0x2a92('0x2f')]['fields']));_0x5aee53[_0x2a92('0x33')]=_0x5aee53[_0x2a92('0x33')][_0x2a92('0x35')]?_0x5aee53['attributes']:_0x2d1b4b['model'];if(_0x1ff996[_0x2a92('0x2f')]['includeAll']){_0x5aee53[_0x2a92('0x40')]=[{'all':!![]}];}_0x5aee53=_[_0x2a92('0x3d')]({},_0x5aee53,_0x1ff996[_0x2a92('0x3e')]);return db['MailMessage'][_0x2a92('0x44')](_0x5aee53)[_0x2a92('0x12')](handleEntityNotFound(_0x16a852,null))[_0x2a92('0x12')](respondWithResult(_0x16a852,null))[_0x2a92('0x1b')](handleError(_0x16a852,null));};exports[_0x2a92('0x22')]=function(_0x593812,_0x342ef3){if(_0x593812[_0x2a92('0x45')]['id']){delete _0x593812[_0x2a92('0x45')]['id'];}return db[_0x2a92('0x29')]['find']({'where':{'id':_0x593812[_0x2a92('0x43')]['id']}})[_0x2a92('0x12')](handleEntityNotFound(_0x342ef3,null))[_0x2a92('0x12')](saveUpdates(_0x593812[_0x2a92('0x45')],null))['then'](respondWithResult(_0x342ef3,null))[_0x2a92('0x1b')](handleError(_0x342ef3,null));};exports[_0x2a92('0x46')]=function(_0x525086,_0x5bf4f2){return db[_0x2a92('0x29')][_0x2a92('0x44')]({'where':{'id':_0x525086[_0x2a92('0x43')]['id']}})[_0x2a92('0x12')](handleEntityNotFound(_0x5bf4f2,null))[_0x2a92('0x12')](removeEntity(_0x5bf4f2,null))[_0x2a92('0x1b')](handleError(_0x5bf4f2,null));};exports[_0x2a92('0x47')]=function(_0x5a17e2,_0x12fe6e){return db['MailMessage'][_0x2a92('0x47')]()['then'](respondWithResult(_0x12fe6e,null))[_0x2a92('0x1b')](handleError(_0x12fe6e,null));};exports[_0x2a92('0x48')]=function(_0x39df77,_0x11fd2c){return db[_0x2a92('0x29')][_0x2a92('0x48')](_0x39df77['body'])[_0x2a92('0x12')](function(_0x720920){if(_0x720920){if(_0x720920[_0x2a92('0x49')]==='out'&&!_0x720920[_0x2a92('0x4a')]){var _0x12ade4,_0xefcc78,_0x2dcaa9;if(_0x39df77[_0x2a92('0x45')]['to']){_0xefcc78=_0x39df77[_0x2a92('0x45')]['to'][_0x2a92('0x4b')](',')[0x0];}return db[_0x2a92('0x4c')]['findOne']({'where':{'id':_0x720920[_0x2a92('0x4d')]},'include':[{'model':db[_0x2a92('0x4e')],'as':_0x2a92('0x4f'),'include':[{'model':db[_0x2a92('0x50')],'as':_0x2a92('0x51'),'where':{'email':_0xefcc78},'limit':0x1,'order':[[_0x2a92('0x52'),_0x2a92('0x53')]]}]},{'model':db[_0x2a92('0x54')],'as':'Smtp','raw':!![],'include':[{'model':db[_0x2a92('0x55')],'as':'CloudProvider','raw':!![]}]}]})[_0x2a92('0x12')](function(_0x4c34ec){_0x12ade4=_0x4c34ec;if(!_0x12ade4||!_0x12ade4[_0x2a92('0x56')])return;var _0x1ffa04=_0x12ade4[_0x2a92('0x57')]();if(_0x39df77[_0x2a92('0x45')][_0x2a92('0x58')]&&_0x39df77[_0x2a92('0x45')]['attachments'][_0x2a92('0x35')]){for(var _0x3ff2ae=0x0;_0x3ff2ae<_0x39df77[_0x2a92('0x45')][_0x2a92('0x58')][_0x2a92('0x35')];_0x3ff2ae+=0x1){_0x39df77[_0x2a92('0x45')][_0x2a92('0x58')][_0x3ff2ae]={'filename':_0x39df77[_0x2a92('0x45')][_0x2a92('0x58')][_0x3ff2ae][_0x2a92('0x25')],'path':path[_0x2a92('0x59')](config[_0x2a92('0x5a')],'server/files/attachments',_0x39df77['body'][_0x2a92('0x58')][_0x3ff2ae]['basename'])};}}_0x2dcaa9={'account':_0x1ffa04,'message':_0x39df77[_0x2a92('0x45')]};return;})[_0x2a92('0x12')](function(){if(_0x12ade4[_0x2a92('0x4f')]){if(_0x12ade4[_0x2a92('0x4f')][_0x2a92('0x51')][_0x2a92('0x35')]){return _0x12ade4[_0x2a92('0x4f')]['Contacts'][0x0];}else{return db[_0x2a92('0x50')]['create'](_['defaults'](_0x39df77['body'],{'firstName':_0x39df77[_0x2a92('0x45')]['to'],'email':_0x39df77['body']['to'],'phone':_0x39df77[_0x2a92('0x45')]['to'],'ListId':_0x12ade4[_0x2a92('0x5b')]}));}}else{throw new Error(_0x2a92('0x5c'));}})[_0x2a92('0x12')](function(){if(_0x2dcaa9){return respondWithRpcPromise(_0x2a92('0x5d'),'sendMail',_0x2dcaa9,client9003)['then'](function(_0x11b122){return _0x720920[_0x2a92('0x22')]({'read':!![],'messageId':_0x11b122[_0x2a92('0x5e')],'sentAt':moment()[_0x2a92('0x5f')](_0x2a92('0x60'))});})[_0x2a92('0x1b')](function(_0x3a2200){logger[_0x2a92('0x17')]('%s',JSON['stringify'](_0x3a2200));return _0x720920;});}return _0x720920;});}return _0x720920;}})[_0x2a92('0x12')](respondWithResult(_0x11fd2c,0xc9))[_0x2a92('0x1b')](handleError(_0x11fd2c,null));};exports[_0x2a92('0x61')]=function(_0x2943ab,_0x3e366f){var _0x21b9c6={'agent':{},'channel':_0x2a92('0x62')};if(_0x2943ab[_0x2a92('0x45')]['id']){delete _0x2943ab[_0x2a92('0x45')]['id'];}_0x2943ab[_0x2a92('0x45')][_0x2a92('0x63')]=!![];_0x2943ab[_0x2a92('0x45')][_0x2a92('0x64')]=moment()[_0x2a92('0x5f')](_0x2a92('0x60'));_0x2943ab[_0x2a92('0x45')]['UserId']=_0x2943ab['body'][_0x2a92('0x65')]||_0x2943ab[_0x2a92('0x66')]['id'];_0x21b9c6['agent']['id']=_0x2943ab[_0x2a92('0x45')][_0x2a92('0x65')];return db[_0x2a92('0x29')]['find']({'where':{'id':_0x2943ab[_0x2a92('0x43')]['id'],'UserId':null}})[_0x2a92('0x12')](handleEntityNotFound(_0x3e366f,null))[_0x2a92('0x12')](saveUpdates(_0x2943ab[_0x2a92('0x45')],null))[_0x2a92('0x12')](function(_0xd1f908){if(_0xd1f908){_0x21b9c6['message']=_0xd1f908[_0x2a92('0x67')]({'plain':!![]});return db[_0x2a92('0x68')][_0x2a92('0x44')]({'where':{'id':_0xd1f908[_0x2a92('0x69')]}});}return null;})[_0x2a92('0x12')](handleEntityNotFound(_0x3e366f,null))[_0x2a92('0x12')](function(_0x20c1ba){if(_0x20c1ba){return _0x20c1ba['update']({'UserId':_0x2943ab[_0x2a92('0x45')][_0x2a92('0x65')],'read1stAt':_['isNil'](_0x20c1ba['read1stAt'])?moment()[_0x2a92('0x5f')](_0x2a92('0x60')):undefined});}return null;})[_0x2a92('0x12')](function(_0x1dfa71){if(_0x1dfa71){_0x21b9c6[_0x2a92('0x6a')]=_0x1dfa71[_0x2a92('0x67')]({'plain':!![]});interaction_log[_0x2a92('0x13')]('[MAILMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x2943ab['user']['id'],_0x2943ab[_0x2a92('0x66')][_0x2a92('0x25')],_0x2943ab[_0x2a92('0x66')][_0x2a92('0x6b')],_0x21b9c6[_0x2a92('0x6a')]['id'],_0x2943ab[_0x2a92('0x45')]?JSON[_0x2a92('0x6c')](_0x2943ab['body']):_0x2a92('0x6d'));return respondWithRpcPromise(_0x2a92('0x6e'),_0x2a92('0x6f'),_0x21b9c6);}return null;})[_0x2a92('0x12')](function(_0x3dc823){var _0xe0089e='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x3dc823['message'][_0x2a92('0x70')];return db[_0x2a92('0x71')]['query'](_0xe0089e,{'type':db[_0x2a92('0x72')][_0x2a92('0x73')][_0x2a92('0x74')],'raw':!![]})[_0x2a92('0x12')](function(_0x1f8f66){return _0x1f8f66;});})['then'](function(_0x22eef7){if(_0x22eef7){_0x21b9c6[_0x2a92('0x19')][_0x2a92('0x75')]=_0x22eef7[0x0];if(!_0x2943ab[_0x2a92('0x45')][_0x2a92('0x65')])return;return db['User'][_0x2a92('0x44')]({'where':{'id':_0x2943ab['body'][_0x2a92('0x65')],'role':_0x2a92('0x76')},'attributes':['id','name',_0x2a92('0x77'),_0x2a92('0x78'),_0x2a92('0x79')],'raw':!![]});}return null;})['then'](function(_0x1c9773){if(!_0x1c9773)return null;_0x21b9c6['message'][_0x2a92('0x76')]=_0x1c9773;return _0x21b9c6;})[_0x2a92('0x12')](function(_0x459979){if(_0x459979){if(_0x2943ab[_0x2a92('0x45')][_0x2a92('0x7a')]){_0x21b9c6['message'][_0x2a92('0x7b')]=util[_0x2a92('0x5f')]('SIP/%s',_0x2943ab[_0x2a92('0x66')][_0x2a92('0x25')]);_0x21b9c6['message'][_0x2a92('0x7c')]=_0x21b9c6[_0x2a92('0x7c')];_0x21b9c6[_0x2a92('0x19')]['motionChannel']=_0x21b9c6[_0x2a92('0x7c')];_0x21b9c6[_0x2a92('0x19')][_0x2a92('0x7d')]=_0x2a92('0x61');_0x21b9c6[_0x2a92('0x19')][_0x2a92('0x45')]=htmlToText[_0x2a92('0x7e')](_0x21b9c6['message'][_0x2a92('0x45')]);return respondWithRpcPromise(_0x2a92('0x7f'),'EventManager',{'event':_0x2a92('0x80'),'message':_0x21b9c6['message']},client9002)[_0x2a92('0x12')](function(){return _0x21b9c6;});}return _0x21b9c6;}return null;})['then'](respondWithResult(_0x3e366f,null))['catch'](handleError(_0x3e366f,null));};exports[_0x2a92('0x81')]=function(_0x5aa8c8,_0x1f8017){var _0x4a76b3={'agent':{},'channel':_0x2a92('0x62')};if(_0x5aa8c8[_0x2a92('0x45')]['id']){delete _0x5aa8c8['body']['id'];}_0x5aa8c8['body'][_0x2a92('0x65')]=_0x5aa8c8['body'][_0x2a92('0x65')]||_0x5aa8c8[_0x2a92('0x66')]['id'];_0x4a76b3['agent']['id']=_0x5aa8c8[_0x2a92('0x45')][_0x2a92('0x65')];return db['MailMessage'][_0x2a92('0x44')]({'where':{'id':_0x5aa8c8['params']['id'],'UserId':null}})['then'](handleEntityNotFound(_0x1f8017,null))['then'](function(_0x5af988){if(_0x5af988){_0x4a76b3['message']=_0x5af988[_0x2a92('0x67')]({'plain':!![]});return db[_0x2a92('0x68')][_0x2a92('0x44')]({'where':{'id':_0x5af988['MailInteractionId']}});}return null;})[_0x2a92('0x12')](handleEntityNotFound(_0x1f8017,null))[_0x2a92('0x12')](function(_0x2820c0){if(_0x2820c0){_0x4a76b3[_0x2a92('0x6a')]=_0x2820c0[_0x2a92('0x67')]({'plain':!![]});interaction_log[_0x2a92('0x13')](_0x2a92('0x82'),_0x5aa8c8[_0x2a92('0x66')]['id'],_0x5aa8c8[_0x2a92('0x66')]['name'],_0x5aa8c8['user'][_0x2a92('0x6b')],_0x4a76b3[_0x2a92('0x6a')]['id'],_0x5aa8c8[_0x2a92('0x45')]?JSON[_0x2a92('0x6c')](_0x5aa8c8[_0x2a92('0x45')]):_0x2a92('0x6d'));return respondWithRpcPromise(_0x2a92('0x83'),_0x2a92('0x84'),_0x4a76b3);}return null;})[_0x2a92('0x12')](function(_0x52f5ab){var _0x94a1a='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x52f5ab['message'][_0x2a92('0x70')];return db[_0x2a92('0x71')][_0x2a92('0x2f')](_0x94a1a,{'type':db[_0x2a92('0x72')][_0x2a92('0x73')][_0x2a92('0x74')],'raw':!![]})[_0x2a92('0x12')](function(_0xf3a949){return _0xf3a949;});})[_0x2a92('0x12')](function(_0x51fb1b){if(_0x51fb1b){_0x4a76b3[_0x2a92('0x19')][_0x2a92('0x75')]=_0x51fb1b[0x0];if(!_0x5aa8c8[_0x2a92('0x45')][_0x2a92('0x65')])return;return db['User'][_0x2a92('0x44')]({'where':{'id':_0x5aa8c8[_0x2a92('0x45')][_0x2a92('0x65')],'role':_0x2a92('0x76')},'attributes':['id',_0x2a92('0x25'),'fullname',_0x2a92('0x78'),_0x2a92('0x79')],'raw':!![]});}return null;})[_0x2a92('0x12')](function(_0x1030cd){if(!_0x1030cd)return null;_0x4a76b3[_0x2a92('0x19')][_0x2a92('0x76')]=_0x1030cd;return _0x4a76b3;})['then'](function(_0x28b87a){if(_0x28b87a){_0x28b87a['message'][_0x2a92('0x7b')]=util['format']('SIP/%s',_0x5aa8c8[_0x2a92('0x66')][_0x2a92('0x25')]);_0x28b87a[_0x2a92('0x19')][_0x2a92('0x7c')]=_0x4a76b3[_0x2a92('0x7c')];_0x28b87a[_0x2a92('0x19')][_0x2a92('0x85')]=_0x4a76b3[_0x2a92('0x7c')];_0x28b87a[_0x2a92('0x19')][_0x2a92('0x7d')]=_0x2a92('0x81');_0x28b87a[_0x2a92('0x19')][_0x2a92('0x45')]=htmlToText[_0x2a92('0x7e')](_0x4a76b3[_0x2a92('0x19')][_0x2a92('0x45')]);respondWithRpcPromise(_0x2a92('0x7f'),_0x2a92('0x7f'),{'event':'rejectmessage','message':_0x28b87a[_0x2a92('0x19')]},client9002);return _0x4a76b3;}return null;})[_0x2a92('0x12')](respondWithResult(_0x1f8017,null))[_0x2a92('0x1b')](handleError(_0x1f8017,null));};exports['download']=function(_0x46c6d1,_0x2acbf1){var _0x4f2314=moment()[_0x2a92('0x86')]()[_0x2a92('0x87')]();var _0x148256=path['join'](config[_0x2a92('0x5a')],_0x2a92('0x88'),_0x2a92('0x89'),_0x2a92('0x8a'));var _0x40ec5d=path[_0x2a92('0x59')](config[_0x2a92('0x5a')],'server','files',_0x2a92('0x58'));var _0x3d2da4=util[_0x2a92('0x5f')](_0x2a92('0x8b'),_0x4f2314);return db['MailMessage'][_0x2a92('0x44')]({'where':{'id':_0x46c6d1[_0x2a92('0x43')]['id']},'attributes':['id','body',_0x2a92('0x8c'),'to','cc',_0x2a92('0x8d'),_0x2a92('0x8e'),_0x2a92('0x8f')],'include':_0x46c6d1[_0x2a92('0x2f')]['attachments']?[{'model':db[_0x2a92('0x90')],'as':_0x2a92('0x91')}]:undefined})[_0x2a92('0x12')](handleEntityNotFound(_0x2acbf1,null))['then'](function(_0x4c06d2){if(_0x4c06d2){var _0x4c7b4a=_0x4c06d2;var _0x11133d={'from':_0x4c7b4a[_0x2a92('0x8c')],'to':_0x4c7b4a['to'],'subject':_0x4c7b4a[_0x2a92('0x8e')],'html':htmlEntities[_0x2a92('0x92')](_0x4c7b4a[_0x2a92('0x45')]),'headers':{'Date':moment(_0x4c7b4a[_0x2a92('0x8f')])['format'](_0x2a92('0x93'))},'attachments':[]};if(_0x4c06d2['cc']){_0x11133d[_0x2a92('0x94')]['Cc']=_0x4c06d2['cc'];}if(_0x4c06d2[_0x2a92('0x8d')]){_0x11133d[_0x2a92('0x94')]['Bcc']=_0x4c06d2[_0x2a92('0x8d')];}return new BPromise(function(_0x1b518c,_0x28a481){if(_0x4c06d2[_0x2a92('0x91')]){for(var _0x9d88a8=0x0;_0x9d88a8<_0x4c06d2[_0x2a92('0x91')][_0x2a92('0x35')];_0x9d88a8++){var _0x346641=_0x4c06d2['Attachments'][_0x9d88a8];var _0x19a06c=path[_0x2a92('0x59')](_0x40ec5d,_0x346641['basename']);if(fs[_0x2a92('0x95')](_0x19a06c)){_0x11133d[_0x2a92('0x58')][_0x2a92('0x96')]({'name':_0x346641['name'],'contentType':_0x346641[_0x2a92('0x2c')],'data':fs['readFileSync'](_0x19a06c)});}}}emlformat[_0x2a92('0x97')](_0x11133d,function(_0x2d8977,_0x363771){if(_0x2d8977)return _0x28a481(_0x2d8977);fs['writeFileSync'](path[_0x2a92('0x59')](_0x148256,_0x3d2da4),_0x363771);return _0x1b518c(_0x363771);});});}})['then'](function(_0x5dd4c2){if(_0x5dd4c2){return _0x2acbf1[_0x2a92('0x98')](path[_0x2a92('0x59')](_0x148256,_0x3d2da4),_0x3d2da4,function(_0x55f98f){if(!_0x55f98f)fs['unlinkSync'](path[_0x2a92('0x59')](_0x148256,_0x3d2da4));});}})[_0x2a92('0x1b')](handleError(_0x2acbf1,null));};
\ No newline at end of file
+var _0xc8e6=['status','set','json','update','destroy','end','stack','name','index','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filter','map','merge','options','MailMessage','show','params','includeAll','include','find','body','describe','create','direction','out','MailAccount','findOne','CmList','CmContact','Contacts','updatedAt','DESC','MailServerOut','Smtp','CloudProvider','getSmtpOptions','attachments','join','root','server/files/attachments','basename','List','ListId','SendMail','sendMail','messageId','YYYY-MM-DD\x20HH:mm:ss','stringify','accept','readAt','format','UserId','user','agent','get','MailInteraction','MailInteractionId','isNil','read1stAt','interaction','role','null','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','Sequelize','SELECT','contact','User','email','internal','manual','interface','SIP/%s','channel','motionChannel','event','fromString','EventManager','acceptmessage','reject','[MAILMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','fullname','rejectmessage','download','unix','tmp','server','files','message-%s.eml','from','createdAt','subject','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','bcc','Bcc','Attachments','existsSync','push','readFileSync','build','writeFileSync','unlinkSync','eml-format','moment','bluebird','util','path','lodash','ioredis','html-to-text','../../components/parsers/qs','../../config/logger','api','mail-interactions','defaults','socket.io-emitter','redis','html-entities','./mailMessage.socket','jayson/promise','client','http','request','then','MailMessage,\x20%s,\x20%s','request\x20sent','debug','error','code','message','info','result','catch','offset','undefined','limit','count'];(function(_0x409171,_0x279383){var _0x499c2f=function(_0x173d40){while(--_0x173d40){_0x409171['push'](_0x409171['shift']());}};_0x499c2f(++_0x279383);}(_0xc8e6,0x78));var _0x6c8e=function(_0x200aa5,_0x197802){_0x200aa5=_0x200aa5-0x0;var _0x458200=_0xc8e6[_0x200aa5];return _0x458200;};'use strict';var emlformat=require(_0x6c8e('0x0'));var moment=require(_0x6c8e('0x1'));var BPromise=require(_0x6c8e('0x2'));var util=require(_0x6c8e('0x3'));var path=require(_0x6c8e('0x4'));var fs=require('fs');var _=require(_0x6c8e('0x5'));var Redis=require(_0x6c8e('0x6'));var htmlToText=require(_0x6c8e('0x7'));var qs=require(_0x6c8e('0x8'));var logger=require(_0x6c8e('0x9'))(_0x6c8e('0xa'));var interaction_log=require(_0x6c8e('0x9'))(_0x6c8e('0xb'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config['redis']=_[_0x6c8e('0xc')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x6c8e('0xd'))(new Redis(config[_0x6c8e('0xe')]));var htmlEntities=require(_0x6c8e('0xf'));require(_0x6c8e('0x10'))['register'](socket);var jayson=require(_0x6c8e('0x11'));var client=jayson[_0x6c8e('0x12')][_0x6c8e('0x13')]({'port':0x232c});var client9003=jayson[_0x6c8e('0x12')]['http']({'port':0x232b});var client9002=jayson[_0x6c8e('0x12')][_0x6c8e('0x13')]({'port':0x232a});function respondWithRpcPromise(_0x1eba98,_0x3e7f76,_0x33ee86,_0x5116c2){return new BPromise(function(_0x5efa67,_0x1bbcc6){var _0x2fcf65=_0x5116c2||client;return _0x2fcf65[_0x6c8e('0x14')](_0x1eba98,_0x33ee86)[_0x6c8e('0x15')](function(_0x3e9230){logger['info'](_0x6c8e('0x16'),_0x3e7f76,_0x6c8e('0x17'));logger[_0x6c8e('0x18')]('MailMessage,\x20%s,\x20%s,\x20%s',_0x3e7f76,_0x6c8e('0x17'),JSON['stringify'](_0x3e9230));if(_0x3e9230[_0x6c8e('0x19')]){if(_0x3e9230[_0x6c8e('0x19')][_0x6c8e('0x1a')]===0x1f4){logger['error']('MailMessage,\x20%s,\x20%s',_0x3e7f76,_0x3e9230['error']['message']);return _0x1bbcc6(_0x3e9230['error'][_0x6c8e('0x1b')]);}logger['error'](_0x6c8e('0x16'),_0x3e7f76,_0x3e9230[_0x6c8e('0x19')][_0x6c8e('0x1b')]);return _0x5efa67(_0x3e9230[_0x6c8e('0x19')][_0x6c8e('0x1b')]);}else{logger[_0x6c8e('0x1c')](_0x6c8e('0x16'),_0x3e7f76,_0x6c8e('0x17'));_0x5efa67(_0x3e9230[_0x6c8e('0x1d')][_0x6c8e('0x1b')]);}})[_0x6c8e('0x1e')](function(_0x554e17){logger[_0x6c8e('0x19')]('MailMessage,\x20%s,\x20%s',_0x3e7f76,_0x554e17);_0x1bbcc6(_0x554e17);});});}function respondWithResult(_0x52c2a4,_0x43695f){_0x43695f=_0x43695f||0xc8;return function(_0xf26daa){if(_0xf26daa){return _0x52c2a4['status'](_0x43695f)['json'](_0xf26daa);}};}function respondWithFilteredResult(_0x1601fc,_0x267bf7){return function(_0x36e5a9){if(_0x36e5a9){var _0x175fad=typeof _0x267bf7[_0x6c8e('0x1f')]===_0x6c8e('0x20')&&typeof _0x267bf7[_0x6c8e('0x21')]===_0x6c8e('0x20');var _0x7db58b=_0x36e5a9[_0x6c8e('0x22')];var _0x20a270=_0x175fad?0x0:_0x267bf7['offset'];var _0x1ca7a6=_0x175fad?_0x36e5a9[_0x6c8e('0x22')]:_0x267bf7[_0x6c8e('0x1f')]+_0x267bf7['limit'];var _0x29c572;if(_0x1ca7a6>=_0x7db58b){_0x1ca7a6=_0x7db58b;_0x29c572=0xc8;}else{_0x29c572=0xce;}_0x1601fc[_0x6c8e('0x23')](_0x29c572);return _0x1601fc[_0x6c8e('0x24')]('Content-Range',_0x20a270+'-'+_0x1ca7a6+'/'+_0x7db58b)[_0x6c8e('0x25')](_0x36e5a9);}return null;};}function saveUpdates(_0x4afd91){return function(_0x1e2b5b){if(_0x1e2b5b){return _0x1e2b5b[_0x6c8e('0x26')](_0x4afd91)[_0x6c8e('0x15')](function(_0x433045){return _0x433045;});}return null;};}function removeEntity(_0x272a2b){return function(_0x330a15){if(_0x330a15){return _0x330a15[_0x6c8e('0x27')]()[_0x6c8e('0x15')](function(){_0x272a2b[_0x6c8e('0x23')](0xcc)[_0x6c8e('0x28')]();});}};}function handleEntityNotFound(_0x29c57f){return function(_0x1b75dc){if(!_0x1b75dc){_0x29c57f['sendStatus'](0x194);}return _0x1b75dc;};}function handleError(_0x33bb4c,_0x48770c){_0x48770c=_0x48770c||0x1f4;return function(_0x505837){logger[_0x6c8e('0x19')](_0x505837[_0x6c8e('0x29')]);if(_0x505837[_0x6c8e('0x2a')]){delete _0x505837[_0x6c8e('0x2a')];}_0x33bb4c[_0x6c8e('0x23')](_0x48770c)['send'](_0x505837);};}exports[_0x6c8e('0x2b')]=function(_0x4e6a7e,_0x166b3a){var _0x4116dc={},_0x405288={},_0x2cb604={'count':0x0,'rows':[]};var _0x31f47c=_['map'](db['MailMessage'][_0x6c8e('0x2c')],function(_0x1c0749){return{'name':_0x1c0749[_0x6c8e('0x2d')],'type':_0x1c0749[_0x6c8e('0x2e')][_0x6c8e('0x2f')]};});_0x405288[_0x6c8e('0x30')]=_['map'](_0x31f47c,'name');_0x405288[_0x6c8e('0x31')]=_[_0x6c8e('0x32')](_0x4e6a7e[_0x6c8e('0x31')]);_0x405288[_0x6c8e('0x33')]=_[_0x6c8e('0x34')](_0x405288[_0x6c8e('0x30')],_0x405288['query']);_0x4116dc[_0x6c8e('0x35')]=_[_0x6c8e('0x34')](_0x405288[_0x6c8e('0x30')],qs[_0x6c8e('0x36')](_0x4e6a7e[_0x6c8e('0x31')][_0x6c8e('0x36')]));_0x4116dc['attributes']=_0x4116dc[_0x6c8e('0x35')][_0x6c8e('0x37')]?_0x4116dc[_0x6c8e('0x35')]:_0x405288[_0x6c8e('0x30')];if(!_0x4e6a7e['query'][_0x6c8e('0x38')]('nolimit')){_0x4116dc[_0x6c8e('0x21')]=qs[_0x6c8e('0x21')](_0x4e6a7e[_0x6c8e('0x31')]['limit']);_0x4116dc[_0x6c8e('0x1f')]=qs[_0x6c8e('0x1f')](_0x4e6a7e['query']['offset']);}_0x4116dc[_0x6c8e('0x39')]=qs[_0x6c8e('0x3a')](_0x4e6a7e[_0x6c8e('0x31')]['sort']);_0x4116dc[_0x6c8e('0x3b')]=qs[_0x6c8e('0x33')](_['pick'](_0x4e6a7e[_0x6c8e('0x31')],_0x405288[_0x6c8e('0x33')]),_0x31f47c);if(_0x4e6a7e[_0x6c8e('0x31')][_0x6c8e('0x3c')]){_0x4116dc[_0x6c8e('0x3b')]=_['merge'](_0x4116dc[_0x6c8e('0x3b')],{'$or':_[_0x6c8e('0x3d')](_0x31f47c,function(_0x2512ff){if(_0x2512ff[_0x6c8e('0x2e')]!=='VIRTUAL'){var _0x563c1f={};_0x563c1f[_0x2512ff[_0x6c8e('0x2a')]]={'$like':'%'+_0x4e6a7e[_0x6c8e('0x31')][_0x6c8e('0x3c')]+'%'};return _0x563c1f;}})});}_0x4116dc=_[_0x6c8e('0x3e')]({},_0x4116dc,_0x4e6a7e[_0x6c8e('0x3f')]);var _0x4d6b0d={'where':_0x4116dc[_0x6c8e('0x3b')]};return db[_0x6c8e('0x40')][_0x6c8e('0x22')](_0x4d6b0d)['then'](function(_0x1d8e55){_0x2cb604[_0x6c8e('0x22')]=_0x1d8e55;if(_0x4e6a7e['query']['includeAll']){_0x4116dc['include']=[{'all':!![]}];}return db[_0x6c8e('0x40')]['findAll'](_0x4116dc);})[_0x6c8e('0x15')](function(_0x5a69c5){_0x2cb604['rows']=_0x5a69c5;return _0x2cb604;})[_0x6c8e('0x15')](respondWithFilteredResult(_0x166b3a,_0x4116dc))['catch'](handleError(_0x166b3a,null));};exports[_0x6c8e('0x41')]=function(_0x429543,_0x10d496){var _0x25d5ea={'raw':!![],'where':{'id':_0x429543[_0x6c8e('0x42')]['id']}},_0x216a56={};_0x216a56[_0x6c8e('0x30')]=_[_0x6c8e('0x32')](db[_0x6c8e('0x40')][_0x6c8e('0x2c')]);_0x216a56[_0x6c8e('0x31')]=_[_0x6c8e('0x32')](_0x429543[_0x6c8e('0x31')]);_0x216a56[_0x6c8e('0x33')]=_[_0x6c8e('0x34')](_0x216a56[_0x6c8e('0x30')],_0x216a56[_0x6c8e('0x31')]);_0x25d5ea[_0x6c8e('0x35')]=_[_0x6c8e('0x34')](_0x216a56[_0x6c8e('0x30')],qs[_0x6c8e('0x36')](_0x429543[_0x6c8e('0x31')][_0x6c8e('0x36')]));_0x25d5ea[_0x6c8e('0x35')]=_0x25d5ea[_0x6c8e('0x35')][_0x6c8e('0x37')]?_0x25d5ea['attributes']:_0x216a56[_0x6c8e('0x30')];if(_0x429543[_0x6c8e('0x31')][_0x6c8e('0x43')]){_0x25d5ea[_0x6c8e('0x44')]=[{'all':!![]}];}_0x25d5ea=_[_0x6c8e('0x3e')]({},_0x25d5ea,_0x429543['options']);return db[_0x6c8e('0x40')][_0x6c8e('0x45')](_0x25d5ea)['then'](handleEntityNotFound(_0x10d496,null))[_0x6c8e('0x15')](respondWithResult(_0x10d496,null))[_0x6c8e('0x1e')](handleError(_0x10d496,null));};exports[_0x6c8e('0x26')]=function(_0x1c08e9,_0x40b205){if(_0x1c08e9[_0x6c8e('0x46')]['id']){delete _0x1c08e9[_0x6c8e('0x46')]['id'];}return db[_0x6c8e('0x40')][_0x6c8e('0x45')]({'where':{'id':_0x1c08e9[_0x6c8e('0x42')]['id']}})[_0x6c8e('0x15')](handleEntityNotFound(_0x40b205,null))[_0x6c8e('0x15')](saveUpdates(_0x1c08e9[_0x6c8e('0x46')],null))['then'](respondWithResult(_0x40b205,null))['catch'](handleError(_0x40b205,null));};exports['destroy']=function(_0x55c53b,_0x78ee4b){return db[_0x6c8e('0x40')][_0x6c8e('0x45')]({'where':{'id':_0x55c53b[_0x6c8e('0x42')]['id']}})['then'](handleEntityNotFound(_0x78ee4b,null))[_0x6c8e('0x15')](removeEntity(_0x78ee4b,null))['catch'](handleError(_0x78ee4b,null));};exports[_0x6c8e('0x47')]=function(_0x336d39,_0x5b0ccf){return db[_0x6c8e('0x40')]['describe']()['then'](respondWithResult(_0x5b0ccf,null))[_0x6c8e('0x1e')](handleError(_0x5b0ccf,null));};exports[_0x6c8e('0x48')]=function(_0x188946,_0x31ca79){return db[_0x6c8e('0x40')][_0x6c8e('0x48')](_0x188946[_0x6c8e('0x46')])[_0x6c8e('0x15')](function(_0x20f016){if(_0x20f016){if(_0x20f016[_0x6c8e('0x49')]===_0x6c8e('0x4a')&&!_0x20f016['secret']){var _0x2460f3,_0x230da9,_0x3a2558;if(_0x188946[_0x6c8e('0x46')]['to']){_0x230da9=_0x188946[_0x6c8e('0x46')]['to']['split'](',')[0x0];}return db[_0x6c8e('0x4b')][_0x6c8e('0x4c')]({'where':{'id':_0x20f016['MailAccountId']},'include':[{'model':db[_0x6c8e('0x4d')],'as':'List','include':[{'model':db[_0x6c8e('0x4e')],'as':_0x6c8e('0x4f'),'where':{'email':_0x230da9},'limit':0x1,'order':[[_0x6c8e('0x50'),_0x6c8e('0x51')]]}]},{'model':db[_0x6c8e('0x52')],'as':_0x6c8e('0x53'),'raw':!![],'include':[{'model':db['CloudProvider'],'as':_0x6c8e('0x54'),'raw':!![]}]}]})['then'](function(_0x55a630){_0x2460f3=_0x55a630;if(!_0x2460f3||!_0x2460f3[_0x6c8e('0x53')])return;var _0xc75c1a=_0x2460f3[_0x6c8e('0x55')]();if(_0x188946['body'][_0x6c8e('0x56')]&&_0x188946['body'][_0x6c8e('0x56')][_0x6c8e('0x37')]){for(var _0x5b4d80=0x0;_0x5b4d80<_0x188946[_0x6c8e('0x46')][_0x6c8e('0x56')][_0x6c8e('0x37')];_0x5b4d80+=0x1){_0x188946[_0x6c8e('0x46')][_0x6c8e('0x56')][_0x5b4d80]={'filename':_0x188946[_0x6c8e('0x46')]['attachments'][_0x5b4d80][_0x6c8e('0x2a')],'path':path[_0x6c8e('0x57')](config[_0x6c8e('0x58')],_0x6c8e('0x59'),_0x188946[_0x6c8e('0x46')]['attachments'][_0x5b4d80][_0x6c8e('0x5a')])};}}_0x3a2558={'account':_0xc75c1a,'message':_0x188946[_0x6c8e('0x46')]};return;})[_0x6c8e('0x15')](function(){if(_0x2460f3[_0x6c8e('0x5b')]){if(_0x2460f3[_0x6c8e('0x5b')][_0x6c8e('0x4f')]['length']){return _0x2460f3[_0x6c8e('0x5b')]['Contacts'][0x0];}else{return db['CmContact'][_0x6c8e('0x48')](_[_0x6c8e('0xc')](_0x188946[_0x6c8e('0x46')],{'firstName':_0x188946['body']['to'],'email':_0x188946[_0x6c8e('0x46')]['to'],'phone':_0x188946[_0x6c8e('0x46')]['to'],'ListId':_0x2460f3[_0x6c8e('0x5c')]}));}}else{throw new Error('List\x20not\x20found');}})[_0x6c8e('0x15')](function(){if(_0x3a2558){return respondWithRpcPromise(_0x6c8e('0x5d'),_0x6c8e('0x5e'),_0x3a2558,client9003)[_0x6c8e('0x15')](function(_0x3d37e0){return _0x20f016[_0x6c8e('0x26')]({'read':!![],'messageId':_0x3d37e0[_0x6c8e('0x5f')],'sentAt':moment()['format'](_0x6c8e('0x60'))});})[_0x6c8e('0x1e')](function(_0x5f3256){logger[_0x6c8e('0x19')]('%s',JSON[_0x6c8e('0x61')](_0x5f3256));return _0x20f016;});}return _0x20f016;});}return _0x20f016;}})[_0x6c8e('0x15')](respondWithResult(_0x31ca79,0xc9))[_0x6c8e('0x1e')](handleError(_0x31ca79,null));};exports[_0x6c8e('0x62')]=function(_0x346984,_0x43947e){var _0x2c3dcf={'agent':{},'channel':'mail'};if(_0x346984[_0x6c8e('0x46')]['id']){delete _0x346984[_0x6c8e('0x46')]['id'];}_0x346984['body']['read']=!![];_0x346984[_0x6c8e('0x46')][_0x6c8e('0x63')]=moment()[_0x6c8e('0x64')](_0x6c8e('0x60'));_0x346984['body'][_0x6c8e('0x65')]=_0x346984['body'][_0x6c8e('0x65')]||_0x346984[_0x6c8e('0x66')]['id'];_0x2c3dcf[_0x6c8e('0x67')]['id']=_0x346984[_0x6c8e('0x46')][_0x6c8e('0x65')];return db[_0x6c8e('0x40')][_0x6c8e('0x45')]({'where':{'id':_0x346984[_0x6c8e('0x42')]['id'],'UserId':null}})[_0x6c8e('0x15')](handleEntityNotFound(_0x43947e,null))[_0x6c8e('0x15')](saveUpdates(_0x346984[_0x6c8e('0x46')],null))[_0x6c8e('0x15')](function(_0x2fcef1){if(_0x2fcef1){_0x2c3dcf[_0x6c8e('0x1b')]=_0x2fcef1[_0x6c8e('0x68')]({'plain':!![]});return db[_0x6c8e('0x69')][_0x6c8e('0x45')]({'where':{'id':_0x2fcef1[_0x6c8e('0x6a')]}});}return null;})[_0x6c8e('0x15')](handleEntityNotFound(_0x43947e,null))[_0x6c8e('0x15')](function(_0x42ee04){if(_0x42ee04){return _0x42ee04[_0x6c8e('0x26')]({'UserId':_0x346984[_0x6c8e('0x46')][_0x6c8e('0x65')],'read1stAt':_[_0x6c8e('0x6b')](_0x42ee04[_0x6c8e('0x6c')])?moment()[_0x6c8e('0x64')]('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})[_0x6c8e('0x15')](function(_0x3248c6){if(_0x3248c6){_0x2c3dcf[_0x6c8e('0x6d')]=_0x3248c6['get']({'plain':!![]});interaction_log[_0x6c8e('0x1c')]('[MAILMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x346984['user']['id'],_0x346984[_0x6c8e('0x66')][_0x6c8e('0x2a')],_0x346984['user'][_0x6c8e('0x6e')],_0x2c3dcf[_0x6c8e('0x6d')]['id'],_0x346984[_0x6c8e('0x46')]?JSON['stringify'](_0x346984[_0x6c8e('0x46')]):_0x6c8e('0x6f'));return respondWithRpcPromise('AcceptMessage','acceptMessage',_0x2c3dcf);}return null;})[_0x6c8e('0x15')](function(_0x37f9bd){var _0xe34ec8=_0x6c8e('0x70')+_0x37f9bd['message'][_0x6c8e('0x71')];return db[_0x6c8e('0x72')][_0x6c8e('0x31')](_0xe34ec8,{'type':db[_0x6c8e('0x73')]['QueryTypes'][_0x6c8e('0x74')],'raw':!![]})[_0x6c8e('0x15')](function(_0x185ed7){return _0x185ed7;});})[_0x6c8e('0x15')](function(_0x1faed0){if(_0x1faed0){_0x2c3dcf[_0x6c8e('0x1b')][_0x6c8e('0x75')]=_0x1faed0[0x0];if(!_0x346984[_0x6c8e('0x46')][_0x6c8e('0x65')])return;return db[_0x6c8e('0x76')][_0x6c8e('0x45')]({'where':{'id':_0x346984[_0x6c8e('0x46')][_0x6c8e('0x65')],'role':_0x6c8e('0x67')},'attributes':['id',_0x6c8e('0x2a'),'fullname',_0x6c8e('0x77'),_0x6c8e('0x78')],'raw':!![]});}return null;})['then'](function(_0x1040c4){if(!_0x1040c4)return null;_0x2c3dcf[_0x6c8e('0x1b')][_0x6c8e('0x67')]=_0x1040c4;return _0x2c3dcf;})[_0x6c8e('0x15')](function(_0x42ac98){if(_0x42ac98){if(_0x346984[_0x6c8e('0x46')][_0x6c8e('0x79')]){_0x2c3dcf[_0x6c8e('0x1b')][_0x6c8e('0x7a')]=util[_0x6c8e('0x64')](_0x6c8e('0x7b'),_0x346984[_0x6c8e('0x66')]['name']);_0x2c3dcf[_0x6c8e('0x1b')][_0x6c8e('0x7c')]=_0x2c3dcf[_0x6c8e('0x7c')];_0x2c3dcf[_0x6c8e('0x1b')][_0x6c8e('0x7d')]=_0x2c3dcf[_0x6c8e('0x7c')];_0x2c3dcf['message'][_0x6c8e('0x7e')]='accept';_0x2c3dcf['message'][_0x6c8e('0x46')]=htmlToText[_0x6c8e('0x7f')](_0x2c3dcf['message'][_0x6c8e('0x46')]);return respondWithRpcPromise(_0x6c8e('0x80'),_0x6c8e('0x80'),{'event':_0x6c8e('0x81'),'message':_0x2c3dcf['message']},client9002)['then'](function(){return _0x2c3dcf;});}return _0x2c3dcf;}return null;})[_0x6c8e('0x15')](respondWithResult(_0x43947e,null))['catch'](handleError(_0x43947e,null));};exports[_0x6c8e('0x82')]=function(_0xebe5f5,_0xef8f6){var _0x3c40ee={'agent':{},'channel':'mail'};if(_0xebe5f5[_0x6c8e('0x46')]['id']){delete _0xebe5f5[_0x6c8e('0x46')]['id'];}_0xebe5f5[_0x6c8e('0x46')][_0x6c8e('0x65')]=_0xebe5f5[_0x6c8e('0x46')][_0x6c8e('0x65')]||_0xebe5f5[_0x6c8e('0x66')]['id'];_0x3c40ee[_0x6c8e('0x67')]['id']=_0xebe5f5['body'][_0x6c8e('0x65')];return db[_0x6c8e('0x40')][_0x6c8e('0x45')]({'where':{'id':_0xebe5f5[_0x6c8e('0x42')]['id'],'UserId':null}})[_0x6c8e('0x15')](handleEntityNotFound(_0xef8f6,null))[_0x6c8e('0x15')](function(_0x1e6f8e){if(_0x1e6f8e){_0x3c40ee['message']=_0x1e6f8e[_0x6c8e('0x68')]({'plain':!![]});return db[_0x6c8e('0x69')][_0x6c8e('0x45')]({'where':{'id':_0x1e6f8e[_0x6c8e('0x6a')]}});}return null;})[_0x6c8e('0x15')](handleEntityNotFound(_0xef8f6,null))[_0x6c8e('0x15')](function(_0x5a85da){if(_0x5a85da){_0x3c40ee[_0x6c8e('0x6d')]=_0x5a85da['get']({'plain':!![]});interaction_log['info'](_0x6c8e('0x83'),_0xebe5f5[_0x6c8e('0x66')]['id'],_0xebe5f5['user']['name'],_0xebe5f5[_0x6c8e('0x66')]['role'],_0x3c40ee[_0x6c8e('0x6d')]['id'],_0xebe5f5['body']?JSON[_0x6c8e('0x61')](_0xebe5f5[_0x6c8e('0x46')]):_0x6c8e('0x6f'));return respondWithRpcPromise(_0x6c8e('0x84'),'rejectMessage',_0x3c40ee);}return null;})['then'](function(_0x19c2a8){var _0x53a5c0=_0x6c8e('0x70')+_0x19c2a8[_0x6c8e('0x1b')][_0x6c8e('0x71')];return db[_0x6c8e('0x72')][_0x6c8e('0x31')](_0x53a5c0,{'type':db[_0x6c8e('0x73')]['QueryTypes']['SELECT'],'raw':!![]})[_0x6c8e('0x15')](function(_0x5a46cc){return _0x5a46cc;});})[_0x6c8e('0x15')](function(_0xb186b5){if(_0xb186b5){_0x3c40ee['message'][_0x6c8e('0x75')]=_0xb186b5[0x0];if(!_0xebe5f5['body'][_0x6c8e('0x65')])return;return db['User']['find']({'where':{'id':_0xebe5f5[_0x6c8e('0x46')]['UserId'],'role':_0x6c8e('0x67')},'attributes':['id','name',_0x6c8e('0x85'),_0x6c8e('0x77'),_0x6c8e('0x78')],'raw':!![]});}return null;})['then'](function(_0x394105){if(!_0x394105)return null;_0x3c40ee[_0x6c8e('0x1b')][_0x6c8e('0x67')]=_0x394105;return _0x3c40ee;})[_0x6c8e('0x15')](function(_0x3b3e28){if(_0x3b3e28){_0x3b3e28[_0x6c8e('0x1b')]['interface']=util[_0x6c8e('0x64')](_0x6c8e('0x7b'),_0xebe5f5[_0x6c8e('0x66')][_0x6c8e('0x2a')]);_0x3b3e28[_0x6c8e('0x1b')]['channel']=_0x3c40ee[_0x6c8e('0x7c')];_0x3b3e28[_0x6c8e('0x1b')][_0x6c8e('0x7d')]=_0x3c40ee[_0x6c8e('0x7c')];_0x3b3e28[_0x6c8e('0x1b')][_0x6c8e('0x7e')]='reject';_0x3b3e28[_0x6c8e('0x1b')][_0x6c8e('0x46')]=htmlToText[_0x6c8e('0x7f')](_0x3c40ee[_0x6c8e('0x1b')][_0x6c8e('0x46')]);respondWithRpcPromise(_0x6c8e('0x80'),_0x6c8e('0x80'),{'event':_0x6c8e('0x86'),'message':_0x3b3e28[_0x6c8e('0x1b')]},client9002);return _0x3c40ee;}return null;})[_0x6c8e('0x15')](respondWithResult(_0xef8f6,null))[_0x6c8e('0x1e')](handleError(_0xef8f6,null));};exports[_0x6c8e('0x87')]=function(_0x234e7f,_0x1c91b3){var _0x47fdb1=moment()[_0x6c8e('0x88')]()['toString']();var _0x4b367d=path[_0x6c8e('0x57')](config[_0x6c8e('0x58')],'server','files',_0x6c8e('0x89'));var _0x4ba8d0=path[_0x6c8e('0x57')](config[_0x6c8e('0x58')],_0x6c8e('0x8a'),_0x6c8e('0x8b'),'attachments');var _0x19e4d9=util['format'](_0x6c8e('0x8c'),_0x47fdb1);return db[_0x6c8e('0x40')][_0x6c8e('0x45')]({'where':{'id':_0x234e7f[_0x6c8e('0x42')]['id']},'attributes':['id',_0x6c8e('0x46'),_0x6c8e('0x8d'),'to','cc','bcc','subject',_0x6c8e('0x8e')],'include':_0x234e7f[_0x6c8e('0x31')][_0x6c8e('0x56')]?[{'model':db['Attachment'],'as':'Attachments'}]:undefined})[_0x6c8e('0x15')](handleEntityNotFound(_0x1c91b3,null))[_0x6c8e('0x15')](function(_0x4dea52){if(_0x4dea52){var _0x505646=_0x4dea52;var _0xa3039d={'from':_0x505646[_0x6c8e('0x8d')],'to':_0x505646['to'],'subject':_0x505646[_0x6c8e('0x8f')],'html':htmlEntities['decode'](_0x505646[_0x6c8e('0x46')]),'headers':{'Date':moment(_0x505646[_0x6c8e('0x8e')])[_0x6c8e('0x64')](_0x6c8e('0x90'))},'attachments':[]};if(_0x4dea52['cc']){_0xa3039d[_0x6c8e('0x91')]['Cc']=_0x4dea52['cc'];}if(_0x4dea52[_0x6c8e('0x92')]){_0xa3039d[_0x6c8e('0x91')][_0x6c8e('0x93')]=_0x4dea52['bcc'];}return new BPromise(function(_0x40a596,_0x29d536){if(_0x4dea52[_0x6c8e('0x94')]){for(var _0x427c23=0x0;_0x427c23<_0x4dea52[_0x6c8e('0x94')]['length'];_0x427c23++){var _0x128782=_0x4dea52[_0x6c8e('0x94')][_0x427c23];var _0x2c94e5=path['join'](_0x4ba8d0,_0x128782['basename']);if(fs[_0x6c8e('0x95')](_0x2c94e5)){_0xa3039d[_0x6c8e('0x56')][_0x6c8e('0x96')]({'name':_0x128782[_0x6c8e('0x2a')],'contentType':_0x128782[_0x6c8e('0x2e')],'data':fs[_0x6c8e('0x97')](_0x2c94e5)});}}}emlformat[_0x6c8e('0x98')](_0xa3039d,function(_0x528d18,_0x28b9c7){if(_0x528d18)return _0x29d536(_0x528d18);fs[_0x6c8e('0x99')](path[_0x6c8e('0x57')](_0x4b367d,_0x19e4d9),_0x28b9c7);return _0x40a596(_0x28b9c7);});});}})[_0x6c8e('0x15')](function(_0x4b4494){if(_0x4b4494){return _0x1c91b3[_0x6c8e('0x87')](path[_0x6c8e('0x57')](_0x4b367d,_0x19e4d9),_0x19e4d9,function(_0x32d62e){if(!_0x32d62e)fs[_0x6c8e('0x9a')](path[_0x6c8e('0x57')](_0x4b367d,_0x19e4d9));});}})['catch'](handleError(_0x1c91b3,null));};
\ No newline at end of file
index 394e410..3f2a77e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1513=['save','update','remove','emit','hasOwnProperty','hook','events','../../mysqldb','MailMessage','setMaxListeners'];(function(_0x2b93a5,_0x31934c){var _0x4111dc=function(_0x3d4f71){while(--_0x3d4f71){_0x2b93a5['push'](_0x2b93a5['shift']());}};_0x4111dc(++_0x31934c);}(_0x1513,0x88));var _0x3151=function(_0xdf1c76,_0x3bf317){_0xdf1c76=_0xdf1c76-0x0;var _0x5779db=_0x1513[_0xdf1c76];return _0x5779db;};'use strict';var EventEmitter=require(_0x3151('0x0'));var MailMessage=require(_0x3151('0x1'))['db'][_0x3151('0x2')];var MailMessageEvents=new EventEmitter();MailMessageEvents[_0x3151('0x3')](0x0);var events={'afterCreate':_0x3151('0x4'),'afterUpdate':_0x3151('0x5'),'afterDestroy':_0x3151('0x6')};function emitEvent(_0x27383c){return function(_0x5c3994,_0x5cae17,_0x41aa69){MailMessageEvents[_0x3151('0x7')](_0x27383c+':'+_0x5c3994['id'],_0x5c3994);MailMessageEvents['emit'](_0x27383c,_0x5c3994);_0x41aa69(null);};}for(var e in events){if(events[_0x3151('0x8')](e)){var event=events[e];MailMessage[_0x3151('0x9')](e,emitEvent(event));}}module['exports']=MailMessageEvents;
\ No newline at end of file
+var _0x1861=['update','remove','emit','hasOwnProperty','hook','events','MailMessage','setMaxListeners'];(function(_0x5be4a2,_0x13b83a){var _0x4ca6e7=function(_0x11ea8b){while(--_0x11ea8b){_0x5be4a2['push'](_0x5be4a2['shift']());}};_0x4ca6e7(++_0x13b83a);}(_0x1861,0x1ad));var _0x1186=function(_0x47e88f,_0x505f68){_0x47e88f=_0x47e88f-0x0;var _0x2fea1d=_0x1861[_0x47e88f];return _0x2fea1d;};'use strict';var EventEmitter=require(_0x1186('0x0'));var MailMessage=require('../../mysqldb')['db'][_0x1186('0x1')];var MailMessageEvents=new EventEmitter();MailMessageEvents[_0x1186('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x1186('0x3'),'afterDestroy':_0x1186('0x4')};function emitEvent(_0x48ad53){return function(_0x1a7c93,_0x540d2a,_0x450915){MailMessageEvents['emit'](_0x48ad53+':'+_0x1a7c93['id'],_0x1a7c93);MailMessageEvents[_0x1186('0x5')](_0x48ad53,_0x1a7c93);_0x450915(null);};}for(var e in events){if(events[_0x1186('0x6')](e)){var event=events[e];MailMessage[_0x1186('0x7')](e,emitEvent(event));}}module['exports']=MailMessageEvents;
\ No newline at end of file
index e069261..83c61a2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4824=['MailMessage','mail_messages','messageId','fti_mail_messages','plainBody','subject','FULLTEXT','body','fromString','models','get','direction','toLowerCase','out','isNil','UserId','MailInteraction','findOne','update','createdAt','error','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','moment','bluebird','html-to-text','path','rimraf','../../config/environment','exports','define'];(function(_0x54a354,_0x34cc60){var _0x5a9b34=function(_0x2d1c24){while(--_0x2d1c24){_0x54a354['push'](_0x54a354['shift']());}};_0x5a9b34(++_0x34cc60);}(_0x4824,0x18d));var _0x4482=function(_0x4a1921,_0x3d1bed){_0x4a1921=_0x4a1921-0x0;var _0x134e34=_0x4824[_0x4a1921];return _0x134e34;};'use strict';var _=require(_0x4482('0x0'));var util=require(_0x4482('0x1'));var logger=require(_0x4482('0x2'))('api');var moment=require(_0x4482('0x3'));var BPromise=require(_0x4482('0x4'));var rp=require('request-promise');var htmlToText=require(_0x4482('0x5'));var fs=require('fs');var path=require(_0x4482('0x6'));var rimraf=require(_0x4482('0x7'));var config=require(_0x4482('0x8'));var attributes=require('./mailMessage.attributes');module[_0x4482('0x9')]=function(_0x1058d9,_0x3dfd41){return _0x1058d9[_0x4482('0xa')](_0x4482('0xb'),attributes,{'tableName':_0x4482('0xc'),'paranoid':![],'indexes':[{'name':_0x4482('0xd'),'fields':[_0x4482('0xd')]},{'name':_0x4482('0xe'),'fields':[_0x4482('0xf'),_0x4482('0x10')],'type':_0x4482('0x11')}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x4cf63f,_0xdc48aa,_0x2a8c93){if(_0x4cf63f[_0x4482('0x12')]){_0x4cf63f['plainBody']=htmlToText[_0x4482('0x13')](_0x4cf63f[_0x4482('0x12')],{'preserveNewlines':!![],'singleNewLineParagraphs':!![],'uppercaseHeadings':![],'noLinkBrackets':!![],'ignoreImage':!![]});}_0x2a8c93(null,_0xdc48aa);},'afterCreate':function(_0x2026f3,_0x226831,_0x34d4d0){var _0x49be73=_0x1058d9[_0x4482('0x14')];var _0x17424a=_0x2026f3[_0x4482('0x15')]({'plain':!![]});if(_0x17424a[_0x4482('0x16')][_0x4482('0x17')]()==='in'||_0x17424a['direction'][_0x4482('0x17')]()===_0x4482('0x18')&&!_0x17424a['secret']&&!_[_0x4482('0x19')](_0x17424a[_0x4482('0x1a')])){_0x49be73[_0x4482('0x1b')][_0x4482('0x1c')]({'where':{'id':_0x17424a['MailInteractionId']}})['then'](function(_0x1c22ac){if(_0x1c22ac){_0x1c22ac[_0x4482('0x1d')]({'lastMsgAt':_0x17424a[_0x4482('0x1e')],'lastMsgDirection':_0x17424a[_0x4482('0x16')][_0x4482('0x17')]()});}})['catch'](function(_0x4fe40e){console[_0x4482('0x1f')](_0x4fe40e);});}_0x34d4d0();}},'charset':_0x4482('0x20'),'collate':_0x4482('0x21')});};
\ No newline at end of file
+var _0xc562=['api','bluebird','path','rimraf','../../config/environment','./mailMessage.attributes','exports','mail_messages','messageId','fti_mail_messages','plainBody','FULLTEXT','body','get','direction','toLowerCase','secret','UserId','MailInteraction','findOne','then','update','createdAt','catch','utf8mb4_unicode_ci','lodash','util','../../config/logger'];(function(_0x8d5672,_0x39c930){var _0x31e54f=function(_0x1a4d8d){while(--_0x1a4d8d){_0x8d5672['push'](_0x8d5672['shift']());}};_0x31e54f(++_0x39c930);}(_0xc562,0xdd));var _0x2c56=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0xc562[_0x3ab51d];return _0x29a04e;};'use strict';var _=require(_0x2c56('0x0'));var util=require(_0x2c56('0x1'));var logger=require(_0x2c56('0x2'))(_0x2c56('0x3'));var moment=require('moment');var BPromise=require(_0x2c56('0x4'));var rp=require('request-promise');var htmlToText=require('html-to-text');var fs=require('fs');var path=require(_0x2c56('0x5'));var rimraf=require(_0x2c56('0x6'));var config=require(_0x2c56('0x7'));var attributes=require(_0x2c56('0x8'));module[_0x2c56('0x9')]=function(_0x27101b,_0x37bf6c){return _0x27101b['define']('MailMessage',attributes,{'tableName':_0x2c56('0xa'),'paranoid':![],'indexes':[{'name':'messageId','fields':[_0x2c56('0xb')]},{'name':_0x2c56('0xc'),'fields':[_0x2c56('0xd'),'subject'],'type':_0x2c56('0xe')}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x43946f,_0x24a314,_0x4b491c){if(_0x43946f[_0x2c56('0xf')]){_0x43946f[_0x2c56('0xd')]=htmlToText['fromString'](_0x43946f[_0x2c56('0xf')],{'preserveNewlines':!![],'singleNewLineParagraphs':!![],'uppercaseHeadings':![],'noLinkBrackets':!![],'ignoreImage':!![]});}_0x4b491c(null,_0x24a314);},'afterCreate':function(_0x536e00,_0x30aabc,_0x250e57){var _0x441b01=_0x27101b['models'];var _0x2e4ef0=_0x536e00[_0x2c56('0x10')]({'plain':!![]});if(_0x2e4ef0[_0x2c56('0x11')]['toLowerCase']()==='in'||_0x2e4ef0['direction'][_0x2c56('0x12')]()==='out'&&!_0x2e4ef0[_0x2c56('0x13')]&&!_['isNil'](_0x2e4ef0[_0x2c56('0x14')])){_0x441b01[_0x2c56('0x15')][_0x2c56('0x16')]({'where':{'id':_0x2e4ef0['MailInteractionId']}})[_0x2c56('0x17')](function(_0x1c7031){if(_0x1c7031){_0x1c7031[_0x2c56('0x18')]({'lastMsgAt':_0x2e4ef0[_0x2c56('0x19')],'lastMsgDirection':_0x2e4ef0[_0x2c56('0x11')][_0x2c56('0x12')]()});}})[_0x2c56('0x1a')](function(_0x1742f4){console['error'](_0x1742f4);});}_0x250e57();}},'charset':'utf8mb4','collate':_0x2c56('0x1b')});};
\ No newline at end of file
index a2289ab..e2470ad 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x236c=['http','defaults','redis','./mailMessage.socket','then','MailMessage,\x20%s,\x20%s','request\x20sent','MailMessage,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','CreateMailMessage','MailMessage','create','body','options','info','debug','stringify','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x34ad72,_0x1e43f6){var _0x5c9aa8=function(_0x144388){while(--_0x144388){_0x34ad72['push'](_0x34ad72['shift']());}};_0x5c9aa8(++_0x1e43f6);}(_0x236c,0x155));var _0xc236=function(_0x27cf8f,_0x230508){_0x27cf8f=_0x27cf8f-0x0;var _0x3c7cd7=_0x236c[_0x27cf8f];return _0x3c7cd7;};'use strict';var _=require(_0xc236('0x0'));var util=require('util');var moment=require(_0xc236('0x1'));var BPromise=require(_0xc236('0x2'));var rs=require(_0xc236('0x3'));var fs=require('fs');var Redis=require(_0xc236('0x4'));var db=require(_0xc236('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xc236('0x6'))(_0xc236('0x7'));var config=require(_0xc236('0x8'));var jayson=require(_0xc236('0x9'));var client=jayson[_0xc236('0xa')][_0xc236('0xb')]({'port':0x232a});config['redis']=_[_0xc236('0xc')](config[_0xc236('0xd')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0xc236('0xe'))['register'](socket);function respondWithRpcPromise(_0x30a28d,_0x381ed1,_0x18f33b){return new BPromise(function(_0x2f8b72,_0xaf651b){return client['request'](_0x30a28d,_0x18f33b)[_0xc236('0xf')](function(_0x3311f7){logger['info'](_0xc236('0x10'),_0x381ed1,_0xc236('0x11'));logger['debug'](_0xc236('0x12'),_0x381ed1,'request\x20sent',JSON['stringify'](_0x3311f7));if(_0x3311f7[_0xc236('0x13')]){if(_0x3311f7[_0xc236('0x13')][_0xc236('0x14')]===0x1f4){logger[_0xc236('0x13')]('MailMessage,\x20%s,\x20%s',_0x381ed1,_0x3311f7[_0xc236('0x13')]['message']);return _0xaf651b(_0x3311f7['error'][_0xc236('0x15')]);}logger[_0xc236('0x13')](_0xc236('0x10'),_0x381ed1,_0x3311f7[_0xc236('0x13')][_0xc236('0x15')]);return _0x2f8b72(_0x3311f7['error']['message']);}else{logger['info'](_0xc236('0x10'),_0x381ed1,_0xc236('0x11'));_0x2f8b72(_0x3311f7[_0xc236('0x16')]['message']);}})[_0xc236('0x17')](function(_0x506974){logger['error'](_0xc236('0x10'),_0x381ed1,_0x506974);_0xaf651b(_0x506974);});});}exports[_0xc236('0x18')]=function(_0x3a6183){var _0x46bc69=this;return new Promise(function(_0x2b6d3f,_0x27c6ab){return db[_0xc236('0x19')][_0xc236('0x1a')](_0x3a6183[_0xc236('0x1b')],{'raw':_0x3a6183[_0xc236('0x1c')]?_0x3a6183[_0xc236('0x1c')]['raw']===undefined?!![]:![]:!![]})[_0xc236('0xf')](function(_0x34d73a){logger[_0xc236('0x1d')](_0xc236('0x18'),_0x3a6183);logger[_0xc236('0x1e')](_0xc236('0x18'),_0x3a6183,JSON[_0xc236('0x1f')](_0x34d73a));_0x2b6d3f(_0x34d73a);})[_0xc236('0x17')](function(_0x1d65e2){logger[_0xc236('0x13')](_0xc236('0x18'),_0x1d65e2['message'],_0x3a6183);_0x27c6ab(_0x46bc69[_0xc236('0x13')](0x1f4,_0x1d65e2[_0xc236('0x15')]));});});};
\ No newline at end of file
+var _0x2032=['register','request','MailMessage,\x20%s,\x20%s','request\x20sent','error','message','info','result','CreateMailMessage','create','options','then','stringify','catch','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0x2032,0xd9));var _0x2203=function(_0xbeca1a,_0x10f7ce){_0xbeca1a=_0xbeca1a-0x0;var _0x1e00c0=_0x2032[_0xbeca1a];return _0x1e00c0;};'use strict';var _=require('lodash');var util=require(_0x2203('0x0'));var moment=require(_0x2203('0x1'));var BPromise=require(_0x2203('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2203('0x3'));var db=require(_0x2203('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x2203('0x5'))(_0x2203('0x6'));var config=require(_0x2203('0x7'));var jayson=require(_0x2203('0x8'));var client=jayson[_0x2203('0x9')][_0x2203('0xa')]({'port':0x232a});config[_0x2203('0xb')]=_[_0x2203('0xc')](config[_0x2203('0xb')],{'host':_0x2203('0xd'),'port':0x18eb});var socket=require(_0x2203('0xe'))(new Redis(config['redis']));require('./mailMessage.socket')[_0x2203('0xf')](socket);function respondWithRpcPromise(_0x549908,_0x27081c,_0x2972f3){return new BPromise(function(_0x6339c4,_0x5b19df){return client[_0x2203('0x10')](_0x549908,_0x2972f3)['then'](function(_0x3f690a){logger['info'](_0x2203('0x11'),_0x27081c,_0x2203('0x12'));logger['debug']('MailMessage,\x20%s,\x20%s,\x20%s',_0x27081c,'request\x20sent',JSON['stringify'](_0x3f690a));if(_0x3f690a['error']){if(_0x3f690a[_0x2203('0x13')]['code']===0x1f4){logger['error'](_0x2203('0x11'),_0x27081c,_0x3f690a[_0x2203('0x13')][_0x2203('0x14')]);return _0x5b19df(_0x3f690a[_0x2203('0x13')][_0x2203('0x14')]);}logger[_0x2203('0x13')](_0x2203('0x11'),_0x27081c,_0x3f690a[_0x2203('0x13')][_0x2203('0x14')]);return _0x6339c4(_0x3f690a[_0x2203('0x13')]['message']);}else{logger[_0x2203('0x15')](_0x2203('0x11'),_0x27081c,'request\x20sent');_0x6339c4(_0x3f690a[_0x2203('0x16')][_0x2203('0x14')]);}})['catch'](function(_0x30c6f7){logger['error'](_0x2203('0x11'),_0x27081c,_0x30c6f7);_0x5b19df(_0x30c6f7);});});}exports[_0x2203('0x17')]=function(_0x3c8c34){var _0x3b4034=this;return new Promise(function(_0x15cb1a,_0x449039){return db['MailMessage'][_0x2203('0x18')](_0x3c8c34['body'],{'raw':_0x3c8c34['options']?_0x3c8c34[_0x2203('0x19')]['raw']===undefined?!![]:![]:!![]})[_0x2203('0x1a')](function(_0x5bfe61){logger['info'](_0x2203('0x17'),_0x3c8c34);logger['debug']('CreateMailMessage',_0x3c8c34,JSON[_0x2203('0x1b')](_0x5bfe61));_0x15cb1a(_0x5bfe61);})[_0x2203('0x1c')](function(_0x21f930){logger[_0x2203('0x13')](_0x2203('0x17'),_0x21f930[_0x2203('0x14')],_0x3c8c34);_0x449039(_0x3b4034[_0x2203('0x13')](0x1f4,_0x21f930[_0x2203('0x14')]));});});};
\ No newline at end of file
index 5d6585d..9880ffe 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1a54=['update','removeListener','register','length','mailMessage:','save'];(function(_0x2f0e43,_0x28ca2c){var _0x179741=function(_0x5e5541){while(--_0x5e5541){_0x2f0e43['push'](_0x2f0e43['shift']());}};_0x179741(++_0x28ca2c);}(_0x1a54,0x14f));var _0x41a5=function(_0x17d7ef,_0x1d0d3b){_0x17d7ef=_0x17d7ef-0x0;var _0x29ff99=_0x1a54[_0x17d7ef];return _0x29ff99;};'use strict';var MailMessageEvents=require('./mailMessage.events');var events=[_0x41a5('0x0'),'remove',_0x41a5('0x1')];function createListener(_0x1ca2ac,_0x502798){return function(_0x30feb7){_0x502798['emit'](_0x1ca2ac,_0x30feb7);};}function removeListener(_0x940b5d,_0x4a477f){return function(){MailMessageEvents[_0x41a5('0x2')](_0x940b5d,_0x4a477f);};}exports[_0x41a5('0x3')]=function(_0x11d8de){for(var _0x5ef0aa=0x0,_0x11f22c=events[_0x41a5('0x4')];_0x5ef0aa<_0x11f22c;_0x5ef0aa++){var _0x1440c4=events[_0x5ef0aa];var _0xbeb528=createListener(_0x41a5('0x5')+_0x1440c4,_0x11d8de);MailMessageEvents['on'](_0x1440c4,_0xbeb528);}};
\ No newline at end of file
+var _0x4aca=['mailMessage:','save','update','emit','removeListener','register','length'];(function(_0x379e79,_0x39a5a8){var _0x545fea=function(_0x129b12){while(--_0x129b12){_0x379e79['push'](_0x379e79['shift']());}};_0x545fea(++_0x39a5a8);}(_0x4aca,0x1dd));var _0xa4ac=function(_0x3d87a0,_0x7c8a7a){_0x3d87a0=_0x3d87a0-0x0;var _0x4ea445=_0x4aca[_0x3d87a0];return _0x4ea445;};'use strict';var MailMessageEvents=require('./mailMessage.events');var events=[_0xa4ac('0x0'),'remove',_0xa4ac('0x1')];function createListener(_0x208527,_0x492f5f){return function(_0x7c7490){_0x492f5f[_0xa4ac('0x2')](_0x208527,_0x7c7490);};}function removeListener(_0x3982f4,_0x5a36cd){return function(){MailMessageEvents[_0xa4ac('0x3')](_0x3982f4,_0x5a36cd);};}exports[_0xa4ac('0x4')]=function(_0x565525){for(var _0x552405=0x0,_0x26ca6f=events[_0xa4ac('0x5')];_0x552405<_0x26ca6f;_0x552405++){var _0x1b5380=events[_0x552405];var _0x3797b0=createListener(_0xa4ac('0x6')+_0x1b5380,_0x565525);MailMessageEvents['on'](_0x1b5380,_0x3797b0);}};
\ No newline at end of file
index 01c5e07..570b0ca 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2f6c=['getMembers','/:id/teams','getTeams','/:id/users','post','create','addTeams','addAgents','put','update','destroy','delete','removeTeams','removeAgents','exports','multer','util','express','Router','fs-extra','../../components/auth/service','../../config/environment','./mailQueue.controller','isAuthenticated','index','get','/describe','describe','/:id','show','/:id/members'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0x2f6c,0x126));var _0xc2f6=function(_0x519756,_0x288785){_0x519756=_0x519756-0x0;var _0x37047e=_0x2f6c[_0x519756];return _0x37047e;};'use strict';var multer=require(_0xc2f6('0x0'));var util=require(_0xc2f6('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xc2f6('0x2'));var router=express[_0xc2f6('0x3')]();var fs_extra=require(_0xc2f6('0x4'));var auth=require(_0xc2f6('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xc2f6('0x6'));var controller=require(_0xc2f6('0x7'));router['get']('/',auth[_0xc2f6('0x8')](),controller[_0xc2f6('0x9')]);router[_0xc2f6('0xa')](_0xc2f6('0xb'),auth[_0xc2f6('0x8')](),controller[_0xc2f6('0xc')]);router[_0xc2f6('0xa')](_0xc2f6('0xd'),auth['isAuthenticated'](),controller[_0xc2f6('0xe')]);router[_0xc2f6('0xa')](_0xc2f6('0xf'),auth[_0xc2f6('0x8')](),controller[_0xc2f6('0x10')]);router[_0xc2f6('0xa')](_0xc2f6('0x11'),auth[_0xc2f6('0x8')](),controller[_0xc2f6('0x12')]);router[_0xc2f6('0xa')](_0xc2f6('0x13'),auth['isAuthenticated'](),controller['getAgents']);router[_0xc2f6('0x14')]('/',auth[_0xc2f6('0x8')](),controller[_0xc2f6('0x15')]);router[_0xc2f6('0x14')](_0xc2f6('0x11'),auth['isAuthenticated'](),controller[_0xc2f6('0x16')]);router[_0xc2f6('0x14')](_0xc2f6('0x13'),auth['isAuthenticated'](),controller[_0xc2f6('0x17')]);router[_0xc2f6('0x18')](_0xc2f6('0xd'),auth[_0xc2f6('0x8')](),controller[_0xc2f6('0x19')]);router['delete'](_0xc2f6('0xd'),auth[_0xc2f6('0x8')](),controller[_0xc2f6('0x1a')]);router[_0xc2f6('0x1b')](_0xc2f6('0x11'),auth['isAuthenticated'](),controller[_0xc2f6('0x1c')]);router[_0xc2f6('0x1b')](_0xc2f6('0x13'),auth[_0xc2f6('0x8')](),controller[_0xc2f6('0x1d')]);module[_0xc2f6('0x1e')]=router;
\ No newline at end of file
+var _0x381c=['isAuthenticated','describe','/:id','show','/:id/members','getMembers','/:id/teams','getTeams','/:id/users','getAgents','post','create','addTeams','addAgents','put','delete','destroy','removeTeams','removeAgents','exports','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index'];(function(_0x24df34,_0x50aa1a){var _0x3980e8=function(_0x24c43f){while(--_0x24c43f){_0x24df34['push'](_0x24df34['shift']());}};_0x3980e8(++_0x50aa1a);}(_0x381c,0x6b));var _0xc381=function(_0x33189c,_0x1035ef){_0x33189c=_0x33189c-0x0;var _0x2885fb=_0x381c[_0x33189c];return _0x2885fb;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xc381('0x0'));var timeout=require('connect-timeout');var express=require(_0xc381('0x1'));var router=express[_0xc381('0x2')]();var fs_extra=require(_0xc381('0x3'));var auth=require(_0xc381('0x4'));var interaction=require(_0xc381('0x5'));var config=require(_0xc381('0x6'));var controller=require('./mailQueue.controller');router[_0xc381('0x7')]('/',auth['isAuthenticated'](),controller[_0xc381('0x8')]);router[_0xc381('0x7')]('/describe',auth[_0xc381('0x9')](),controller[_0xc381('0xa')]);router[_0xc381('0x7')](_0xc381('0xb'),auth[_0xc381('0x9')](),controller[_0xc381('0xc')]);router[_0xc381('0x7')](_0xc381('0xd'),auth[_0xc381('0x9')](),controller[_0xc381('0xe')]);router[_0xc381('0x7')](_0xc381('0xf'),auth[_0xc381('0x9')](),controller[_0xc381('0x10')]);router[_0xc381('0x7')](_0xc381('0x11'),auth[_0xc381('0x9')](),controller[_0xc381('0x12')]);router[_0xc381('0x13')]('/',auth['isAuthenticated'](),controller[_0xc381('0x14')]);router[_0xc381('0x13')]('/:id/teams',auth[_0xc381('0x9')](),controller[_0xc381('0x15')]);router[_0xc381('0x13')]('/:id/users',auth[_0xc381('0x9')](),controller[_0xc381('0x16')]);router[_0xc381('0x17')](_0xc381('0xb'),auth[_0xc381('0x9')](),controller['update']);router[_0xc381('0x18')](_0xc381('0xb'),auth[_0xc381('0x9')](),controller[_0xc381('0x19')]);router[_0xc381('0x18')]('/:id/teams',auth[_0xc381('0x9')](),controller[_0xc381('0x1a')]);router['delete'](_0xc381('0x11'),auth[_0xc381('0x9')](),controller[_0xc381('0x1b')]);module[_0xc381('0x1c')]=router;
\ No newline at end of file
index 4b9101b..7ad803e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4461=['STRING','ENUM','rrmemory','beepall','roundrobin','sequelize','exports'];(function(_0x3eb2a2,_0x1af0c9){var _0x159cc5=function(_0x45d935){while(--_0x45d935){_0x3eb2a2['push'](_0x3eb2a2['shift']());}};_0x159cc5(++_0x1af0c9);}(_0x4461,0x12b));var _0x1446=function(_0x35ffc7,_0x568d1d){_0x35ffc7=_0x35ffc7-0x0;var _0x21ca6a=_0x4461[_0x35ffc7];return _0x21ca6a;};'use strict';var Sequelize=require(_0x1446('0x0'));module[_0x1446('0x1')]={'name':{'type':Sequelize[_0x1446('0x2')],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x1446('0x3')](_0x1446('0x4'),_0x1446('0x5'),_0x1446('0x6'))}};
\ No newline at end of file
+var _0x38dd=['INTEGER','ENUM','rrmemory','sequelize','exports','STRING','name'];(function(_0x2d7f0e,_0x3e6fbd){var _0x110b07=function(_0x557b00){while(--_0x557b00){_0x2d7f0e['push'](_0x2d7f0e['shift']());}};_0x110b07(++_0x3e6fbd);}(_0x38dd,0x168));var _0xd38d=function(_0x470bfb,_0x389787){_0x470bfb=_0x470bfb-0x0;var _0x2f5d97=_0x38dd[_0x470bfb];return _0x2f5d97;};'use strict';var Sequelize=require(_0xd38d('0x0'));module[_0xd38d('0x1')]={'name':{'type':Sequelize[_0xd38d('0x2')],'unique':_0xd38d('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0xd38d('0x2')]},'timeout':{'type':Sequelize[_0xd38d('0x4')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0xd38d('0x5')](_0xd38d('0x6'),'beepall','roundrobin')}};
\ No newline at end of file
index 45bff6b..6d89144 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x82f5=['offset','undefined','limit','count','set','Content-Range','json','then','destroy','MailQueues','UserProfileResource','sendStatus','error','stack','name','send','map','MailQueue','rawAttributes','fieldName','type','key','getOptions','where','include','query','rows','show','params','keys','filters','intersection','model','attributes','fields','length','includeAll','merge','options','find','catch','create','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','findOne','UserMailQueue','hasOwnProperty','nolimit','sort','MailQueueId','filter','findAll','findAndCountAll','UserId','agent','format','%s/%s','SIP','mailPause','createdAt','updatedAt','getTeams','order','pick','addTeams','ids','Agents','online','interface','sequelize','each','forEach','emit','userMailQueue:save','removeTeams','Team','User','select','tq.TeamId','team_has_mail_queues','join','ut.TeamId\x20=\x20tq.TeamId','MailQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push','toString','QueryTypes','every','includes','all','union','compact','value','transaction','isEmpty','removeAgents','addAgents','omit','userMailQueue:remove','bluebird','util','lodash','squel','ioredis','../../components/parsers/qs','../../config/logger','api','../../mysqldb','defaults','localhost','socket.io-emitter','redis','./mailQueue.socket','register','end','status'];(function(_0x92713a,_0x68f8b0){var _0x1893e1=function(_0xe49768){while(--_0xe49768){_0x92713a['push'](_0x92713a['shift']());}};_0x1893e1(++_0x68f8b0);}(_0x82f5,0x1e3));var _0x582f=function(_0x6e4cd7,_0x3975ba){_0x6e4cd7=_0x6e4cd7-0x0;var _0x53998f=_0x82f5[_0x6e4cd7];return _0x53998f;};'use strict';var BPromise=require(_0x582f('0x0'));var util=require(_0x582f('0x1'));var _=require(_0x582f('0x2'));var squel=require(_0x582f('0x3'));var Redis=require(_0x582f('0x4'));var qs=require(_0x582f('0x5'));var logger=require(_0x582f('0x6'))(_0x582f('0x7'));var config=require('../../config/environment');var db=require(_0x582f('0x8'))['db'];config['redis']=_[_0x582f('0x9')](config['redis'],{'host':_0x582f('0xa'),'port':0x18eb});var socket=require(_0x582f('0xb'))(new Redis(config[_0x582f('0xc')]));require(_0x582f('0xd'))[_0x582f('0xe')](socket);function respondWithStatusCode(_0x48437e,_0x143bed){_0x143bed=_0x143bed||0xcc;return function(_0x12a42d){if(_0x12a42d){return _0x48437e['sendStatus'](_0x143bed);}return _0x48437e['status'](_0x143bed)[_0x582f('0xf')]();};}function respondWithResult(_0x3c68b9,_0x5a9a65){_0x5a9a65=_0x5a9a65||0xc8;return function(_0x3f9275){if(_0x3f9275){return _0x3c68b9[_0x582f('0x10')](_0x5a9a65)['json'](_0x3f9275);}};}function respondWithFilteredResult(_0x1ebfc1,_0x13b109){return function(_0x1bce3){if(_0x1bce3){var _0xd9fe86=typeof _0x13b109[_0x582f('0x11')]===_0x582f('0x12')&&typeof _0x13b109[_0x582f('0x13')]===_0x582f('0x12');var _0x210f56=_0x1bce3[_0x582f('0x14')];var _0x16deb9=_0xd9fe86?0x0:_0x13b109[_0x582f('0x11')];var _0x26a7b3=_0xd9fe86?_0x1bce3['count']:_0x13b109['offset']+_0x13b109['limit'];var _0x4253cf;if(_0x26a7b3>=_0x210f56){_0x26a7b3=_0x210f56;_0x4253cf=0xc8;}else{_0x4253cf=0xce;}_0x1ebfc1['status'](_0x4253cf);return _0x1ebfc1[_0x582f('0x15')](_0x582f('0x16'),_0x16deb9+'-'+_0x26a7b3+'/'+_0x210f56)[_0x582f('0x17')](_0x1bce3);}return null;};}function saveUpdates(_0xc4aec8){return function(_0x42f078){if(_0x42f078){return _0x42f078['update'](_0xc4aec8)[_0x582f('0x18')](function(_0x2bd1f3){return _0x2bd1f3;});}return null;};}function removeEntity(_0x1b23f2){return function(_0x1ff58b){if(_0x1ff58b){return _0x1ff58b[_0x582f('0x19')]()[_0x582f('0x18')](function(){var _0xe910d3=_0x1ff58b['get']({'plain':!![]});var _0x48079b=_0x582f('0x1a');return db[_0x582f('0x1b')][_0x582f('0x19')]({'where':{'type':_0x48079b,'resourceId':_0xe910d3['id']}})[_0x582f('0x18')](function(){return _0x1ff58b;});})[_0x582f('0x18')](function(){_0x1b23f2['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x536456){return function(_0x4cefbf){if(!_0x4cefbf){_0x536456[_0x582f('0x1c')](0x194);}return _0x4cefbf;};}function handleError(_0x2c9316,_0x2c231d){_0x2c231d=_0x2c231d||0x1f4;return function(_0x2a505c){logger[_0x582f('0x1d')](_0x2a505c[_0x582f('0x1e')]);if(_0x2a505c[_0x582f('0x1f')]){delete _0x2a505c[_0x582f('0x1f')];}_0x2c9316[_0x582f('0x10')](_0x2c231d)[_0x582f('0x20')](_0x2a505c);};}exports['index']=function(_0x285ab4,_0x36e9db){var _0x4ce031={};var _0x24f124={'count':0x0,'rows':[]};var _0x3f1bb6=_[_0x582f('0x21')](db[_0x582f('0x22')][_0x582f('0x23')],function(_0x341e26){return{'name':_0x341e26[_0x582f('0x24')],'type':_0x341e26[_0x582f('0x25')][_0x582f('0x26')]};});_0x4ce031=qs[_0x582f('0x27')](_0x3f1bb6,_0x285ab4);var _0x42fce0={'where':_0x4ce031[_0x582f('0x28')]};return db['MailQueue'][_0x582f('0x14')](_0x42fce0)[_0x582f('0x18')](function(_0x404f33){_0x24f124['count']=_0x404f33;_0x4ce031[_0x582f('0x29')]=qs[_0x582f('0x29')](_0x285ab4[_0x582f('0x2a')]);return db[_0x582f('0x22')]['findAll'](_0x4ce031);})[_0x582f('0x18')](function(_0x3cd340){_0x24f124[_0x582f('0x2b')]=_0x3cd340;return _0x24f124;})[_0x582f('0x18')](respondWithFilteredResult(_0x36e9db,_0x4ce031))['catch'](handleError(_0x36e9db,null));};exports[_0x582f('0x2c')]=function(_0x1e0fc9,_0x13dcfd){var _0x219512={'raw':!![],'where':{'id':_0x1e0fc9[_0x582f('0x2d')]['id']}},_0x257010={};_0x257010['model']=_[_0x582f('0x2e')](db[_0x582f('0x22')][_0x582f('0x23')]);_0x257010['query']=_[_0x582f('0x2e')](_0x1e0fc9[_0x582f('0x2a')]);_0x257010[_0x582f('0x2f')]=_[_0x582f('0x30')](_0x257010[_0x582f('0x31')],_0x257010[_0x582f('0x2a')]);_0x219512[_0x582f('0x32')]=_[_0x582f('0x30')](_0x257010[_0x582f('0x31')],qs[_0x582f('0x33')](_0x1e0fc9[_0x582f('0x2a')][_0x582f('0x33')]));_0x219512[_0x582f('0x32')]=_0x219512[_0x582f('0x32')][_0x582f('0x34')]?_0x219512[_0x582f('0x32')]:_0x257010[_0x582f('0x31')];if(_0x1e0fc9[_0x582f('0x2a')][_0x582f('0x35')]){_0x219512[_0x582f('0x29')]=[{'all':!![]}];}_0x219512=_[_0x582f('0x36')]({},_0x219512,_0x1e0fc9[_0x582f('0x37')]);return db[_0x582f('0x22')][_0x582f('0x38')](_0x219512)[_0x582f('0x18')](handleEntityNotFound(_0x13dcfd,null))[_0x582f('0x18')](respondWithResult(_0x13dcfd,null))[_0x582f('0x39')](handleError(_0x13dcfd,null));};exports['create']=function(_0x4fc866,_0x58bd65){return db[_0x582f('0x22')][_0x582f('0x3a')](_0x4fc866['body'],{})['then'](function(_0x2ae34f){var _0x13863a=_0x4fc866[_0x582f('0x3b')][_0x582f('0x3c')]({'plain':!![]});if(!_0x13863a)throw new Error(_0x582f('0x3d'));if(_0x13863a[_0x582f('0x3e')]===_0x582f('0x3b')){var _0x458af0=_0x2ae34f[_0x582f('0x3c')]({'plain':!![]});var _0x213fcb=_0x582f('0x1a');return db[_0x582f('0x3f')]['find']({'where':{'name':_0x213fcb,'userProfileId':_0x13863a[_0x582f('0x40')]},'raw':!![]})[_0x582f('0x18')](function(_0x55ec5f){if(_0x55ec5f&&_0x55ec5f[_0x582f('0x41')]===0x0){return db[_0x582f('0x1b')][_0x582f('0x3a')]({'name':_0x458af0[_0x582f('0x1f')],'resourceId':_0x458af0['id'],'type':_0x55ec5f['name'],'sectionId':_0x55ec5f['id']},{})['then'](function(){return _0x2ae34f;});}else{return _0x2ae34f;}})[_0x582f('0x39')](function(_0x4b52a4){logger[_0x582f('0x1d')](_0x582f('0x42'),_0x4b52a4);throw _0x4b52a4;});}return _0x2ae34f;})[_0x582f('0x18')](respondWithResult(_0x58bd65,0xc9))[_0x582f('0x39')](handleError(_0x58bd65,null));};exports['update']=function(_0x439dd8,_0x3f7449){if(_0x439dd8[_0x582f('0x43')]['id']){delete _0x439dd8[_0x582f('0x43')]['id'];}return db[_0x582f('0x22')]['find']({'where':{'id':_0x439dd8[_0x582f('0x2d')]['id']}})[_0x582f('0x18')](handleEntityNotFound(_0x3f7449,null))[_0x582f('0x18')](saveUpdates(_0x439dd8['body'],null))[_0x582f('0x18')](respondWithResult(_0x3f7449,null))[_0x582f('0x39')](handleError(_0x3f7449,null));};exports[_0x582f('0x19')]=function(_0x452521,_0x349b18){return db[_0x582f('0x22')][_0x582f('0x38')]({'where':{'id':_0x452521['params']['id']}})[_0x582f('0x18')](handleEntityNotFound(_0x349b18,null))[_0x582f('0x18')](removeEntity(_0x349b18,null))[_0x582f('0x39')](handleError(_0x349b18,null));};exports[_0x582f('0x44')]=function(_0x4cf2a7,_0x3f6f43){return db[_0x582f('0x22')][_0x582f('0x44')]()[_0x582f('0x18')](respondWithResult(_0x3f6f43,null))[_0x582f('0x39')](handleError(_0x3f6f43,null));};exports['getMembers']=function(_0x1c87ca,_0x49b13b){var _0x281d9d={'raw':!![],'where':{}},_0x1489ee={},_0x1e6a16;return db['MailQueue'][_0x582f('0x45')]({'where':{'id':_0x1c87ca[_0x582f('0x2d')]['id']}})[_0x582f('0x18')](handleEntityNotFound(_0x49b13b,null))['then'](function(_0x777cfd){if(_0x777cfd){_0x1e6a16=_0x777cfd[_0x582f('0x3c')]({'plain':!![]});_0x1489ee[_0x582f('0x31')]=_['keys'](db[_0x582f('0x46')][_0x582f('0x23')]);_0x1489ee[_0x582f('0x2a')]=_[_0x582f('0x2e')](_0x1c87ca['query']);_0x1489ee['filters']=_['intersection'](_0x1489ee[_0x582f('0x31')],_0x1489ee[_0x582f('0x2a')]);_0x281d9d[_0x582f('0x32')]=_[_0x582f('0x30')](_0x1489ee[_0x582f('0x31')],qs[_0x582f('0x33')](_0x1c87ca[_0x582f('0x2a')][_0x582f('0x33')]));_0x281d9d['attributes']=_0x281d9d[_0x582f('0x32')]['length']?_0x281d9d[_0x582f('0x32')]:_0x1489ee[_0x582f('0x31')];if(!_0x1c87ca[_0x582f('0x2a')][_0x582f('0x47')](_0x582f('0x48'))){_0x281d9d[_0x582f('0x13')]=qs[_0x582f('0x13')](_0x1c87ca['query'][_0x582f('0x13')]);_0x281d9d[_0x582f('0x11')]=qs[_0x582f('0x11')](_0x1c87ca[_0x582f('0x2a')][_0x582f('0x11')]);}_0x281d9d['order']=qs['sort'](_0x1c87ca['query'][_0x582f('0x49')]);_0x281d9d[_0x582f('0x28')]=qs[_0x582f('0x2f')](_['pick'](_0x1c87ca[_0x582f('0x2a')],_0x1489ee[_0x582f('0x2f')]));_0x281d9d[_0x582f('0x28')][_0x582f('0x4a')]=_0x777cfd['id'];if(_0x1c87ca[_0x582f('0x2a')][_0x582f('0x4b')]){_0x281d9d[_0x582f('0x28')]=_[_0x582f('0x36')](_0x281d9d[_0x582f('0x28')],{'$or':_[_0x582f('0x21')](_0x281d9d[_0x582f('0x32')],function(_0x5ea111){var _0x439e4c={};_0x439e4c[_0x5ea111]={'$like':'%'+_0x1c87ca[_0x582f('0x2a')][_0x582f('0x4b')]+'%'};return _0x439e4c;})});}_0x281d9d=_[_0x582f('0x36')]({},_0x281d9d,_0x1c87ca[_0x582f('0x37')]);return db[_0x582f('0x46')][_0x582f('0x4c')](_0x281d9d);}})['then'](function(_0x3df17e){if(_0x3df17e){return db['User'][_0x582f('0x4d')]({'where':{'id':_['map'](_0x3df17e,_0x582f('0x4e')),'role':_0x582f('0x4f')},'attributes':['id',_0x582f('0x1f'),'mailPause','updatedAt','createdAt']});}})[_0x582f('0x18')](function(_0x518180){if(_0x518180){return{'count':_0x518180[_0x582f('0x14')],'rows':_[_0x582f('0x21')](_0x518180[_0x582f('0x2b')],function(_0x30196d){return{'membername':_0x30196d[_0x582f('0x1f')],'UserId':_0x30196d['id'],'queue_name':_0x1e6a16[_0x582f('0x1f')],'MailQueueId':_0x1e6a16['id'],'interface':util[_0x582f('0x50')](_0x582f('0x51'),_0x582f('0x52'),_0x30196d['name']),'penalty':0x0,'paused':_0x30196d[_0x582f('0x53')],'createdAt':_0x30196d[_0x582f('0x54')],'updatedAt':_0x30196d[_0x582f('0x55')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x582f('0x18')](respondWithFilteredResult(_0x49b13b,_0x281d9d))['catch'](handleError(_0x49b13b,null));};exports[_0x582f('0x56')]=function(_0x48146a,_0x5ef9c2){var _0x113773={};var _0x5bdbb9={};var _0x4fd6e0;var _0x4e5a86;return db[_0x582f('0x22')][_0x582f('0x45')]({'where':{'id':_0x48146a[_0x582f('0x2d')]['id']}})[_0x582f('0x18')](handleEntityNotFound(_0x5ef9c2,null))[_0x582f('0x18')](function(_0x58d23b){if(_0x58d23b){_0x4fd6e0=_0x58d23b;_0x5bdbb9[_0x582f('0x31')]=_['keys'](db['Team'][_0x582f('0x23')]);_0x5bdbb9[_0x582f('0x2a')]=_[_0x582f('0x2e')](_0x48146a[_0x582f('0x2a')]);_0x5bdbb9[_0x582f('0x2f')]=_[_0x582f('0x30')](_0x5bdbb9['model'],_0x5bdbb9[_0x582f('0x2a')]);_0x113773[_0x582f('0x32')]=_[_0x582f('0x30')](_0x5bdbb9['model'],qs[_0x582f('0x33')](_0x48146a['query'][_0x582f('0x33')]));_0x113773[_0x582f('0x32')]=_0x113773[_0x582f('0x32')]['length']?_0x113773[_0x582f('0x32')]:_0x5bdbb9[_0x582f('0x31')];_0x113773[_0x582f('0x57')]=qs[_0x582f('0x49')](_0x48146a['query']['sort']);_0x113773[_0x582f('0x28')]=qs[_0x582f('0x2f')](_[_0x582f('0x58')](_0x48146a[_0x582f('0x2a')],_0x5bdbb9[_0x582f('0x2f')]));if(_0x48146a[_0x582f('0x2a')]['filter']){_0x113773[_0x582f('0x28')]=_['merge'](_0x113773[_0x582f('0x28')],{'$or':_[_0x582f('0x21')](_0x113773[_0x582f('0x32')],function(_0x21650e){var _0x4c3aa2={};_0x4c3aa2[_0x21650e]={'$like':'%'+_0x48146a['query'][_0x582f('0x4b')]+'%'};return _0x4c3aa2;})});}_0x113773=_['merge']({},_0x113773,_0x48146a['options']);return _0x4fd6e0[_0x582f('0x56')](_0x113773);}})[_0x582f('0x18')](function(_0x4c2354){if(_0x4c2354){_0x4e5a86=_0x4c2354[_0x582f('0x34')];if(!_0x48146a['query'][_0x582f('0x47')]('nolimit')){_0x113773[_0x582f('0x13')]=qs[_0x582f('0x13')](_0x48146a[_0x582f('0x2a')][_0x582f('0x13')]);_0x113773[_0x582f('0x11')]=qs['offset'](_0x48146a[_0x582f('0x2a')][_0x582f('0x11')]);}return _0x4fd6e0[_0x582f('0x56')](_0x113773);}})[_0x582f('0x18')](function(_0x1328f6){if(_0x1328f6){return _0x1328f6?{'count':_0x4e5a86,'rows':_0x1328f6}:null;}})[_0x582f('0x18')](respondWithResult(_0x5ef9c2,null))[_0x582f('0x39')](handleError(_0x5ef9c2,null));};exports[_0x582f('0x59')]=function(_0x7bf921,_0x29eb75){var _0x375047=_0x7bf921[_0x582f('0x43')][_0x582f('0x5a')];return db['Team'][_0x582f('0x4c')]({'where':{'id':_0x375047},'attributes':['id'],'include':[{'model':db['User'],'as':_0x582f('0x5b'),'attributes':['id','name',_0x582f('0x5c'),'voicePause',_0x582f('0x5d')],'raw':!![]}]})[_0x582f('0x18')](function(_0x3e35a0){if(_0x3e35a0){var _0x1128e4=_['flatMap'](_0x3e35a0,function(_0x3e1fbf){var _0x2b32ad=_0x3e1fbf[_0x582f('0x3c')]({'plain':!![]});return _0x2b32ad['Agents'];});return db['MailQueue']['find']({'where':{'id':_0x7bf921[_0x582f('0x2d')]['id']}})[_0x582f('0x18')](function(_0xddd4){return db[_0x582f('0x5e')]['transaction'](function(_0x12e2ea){return _0xddd4['addTeams'](_0x375047,{'transaction':_0x12e2ea})[_0x582f('0x18')](function(){return BPromise[_0x582f('0x5f')](_0x1128e4,function(_0x15f38d){return db[_0x582f('0x46')]['findOrCreate']({'where':{'UserId':_0x15f38d['id'],'MailQueueId':_0x7bf921[_0x582f('0x2d')]['id']},'transaction':_0x12e2ea});});})['then'](function(){_0x1128e4[_0x582f('0x60')](function(_0x2d5fc4){socket[_0x582f('0x61')](_0x582f('0x62'),{'UserId':_0x2d5fc4['id'],'MailQueueId':_0xddd4['id']});});});});});}})[_0x582f('0x18')](respondWithStatusCode(_0x29eb75,null))[_0x582f('0x39')](handleError(_0x29eb75,null));};exports[_0x582f('0x63')]=function(_0x298197,_0x666fe1){return db[_0x582f('0x64')][_0x582f('0x4c')]({'where':{'id':_0x298197[_0x582f('0x2a')][_0x582f('0x5a')]},'attributes':['id'],'include':[{'model':db[_0x582f('0x65')],'as':_0x582f('0x5b'),'attributes':['id'],'raw':!![]}]})[_0x582f('0x18')](handleEntityNotFound(_0x666fe1,null))['then'](function(_0x415781){var _0xb83928=_['map'](_0x415781,'id');var _0x398937=[];var _0x4e708b=[];var _0x44a53a=squel[_0x582f('0x66')]();_0x44a53a['field'](_0x582f('0x67'))['from'](_0x582f('0x68'),'tq')[_0x582f('0x69')]('user_has_teams','ut',_0x582f('0x6a'))[_0x582f('0x28')](_0x582f('0x6b'),_0x298197[_0x582f('0x2d')]['id']);for(var _0x1f3abf=0x0;_0x1f3abf<_0x415781[_0x582f('0x34')];_0x1f3abf+=0x1){let _0x58874d=_0x415781[_0x1f3abf];for(var _0xb770b6=0x0;_0xb770b6<_0x58874d['Agents'][_0x582f('0x34')];_0xb770b6+=0x1){let _0x6cb5a6=_0x58874d[_0x582f('0x5b')][_0xb770b6];var _0xdbf916=_0x44a53a[_0x582f('0x6c')]();_0xdbf916[_0x582f('0x28')](_0x582f('0x6d'),_0x6cb5a6['id']);_0x4e708b[_0x582f('0x6e')](db[_0x582f('0x5e')][_0x582f('0x2a')](_0xdbf916[_0x582f('0x6f')](),{'type':db['sequelize'][_0x582f('0x70')]['SELECT']})['then'](function(_0xc8a01c){if(_0xc8a01c[_0x582f('0x34')]===0x1){return _0x6cb5a6['id'];}else{var _0x32dbb7=_[_0x582f('0x71')](_['map'](_0xc8a01c,'TeamId'),function(_0x2edbc5){return _[_0x582f('0x72')](_0xb83928,_0x2edbc5);});if(_0x32dbb7){return _0x6cb5a6['id'];}}}));}}return BPromise[_0x582f('0x73')](_0x4e708b)[_0x582f('0x18')](function(_0x5f1559){_0x398937=_(_0x398937)[_0x582f('0x74')](_0x5f1559)[_0x582f('0x75')]()[_0x582f('0x76')]();return db[_0x582f('0x22')]['find']({'where':{'id':_0x298197[_0x582f('0x2d')]['id']}})[_0x582f('0x18')](function(_0x502fca){return db[_0x582f('0x5e')][_0x582f('0x77')](function(_0x182410){return _0x502fca[_0x582f('0x63')](_0x298197[_0x582f('0x2a')][_0x582f('0x5a')],{'transaction':_0x182410})['then'](function(){if(!_[_0x582f('0x78')](_0x398937)){return _0x502fca[_0x582f('0x79')](_0x398937,{'transaction':_0x182410});}})['then'](function(){_0x398937['forEach'](function(_0x171f88){socket[_0x582f('0x61')]('userMailQueue:remove',{'UserId':_0x171f88,'MailQueueId':_0x502fca['id']});});});});});});})[_0x582f('0x18')](respondWithStatusCode(_0x666fe1,null))[_0x582f('0x39')](handleError(_0x666fe1,null));};exports[_0x582f('0x7a')]=function(_0x1abb39,_0x5871e8){return db['MailQueue']['find']({'where':{'id':_0x1abb39[_0x582f('0x2d')]['id']}})[_0x582f('0x18')](handleEntityNotFound(_0x5871e8,null))[_0x582f('0x18')](function(_0x156b1f){if(_0x156b1f){return _0x156b1f[_0x582f('0x7a')](_0x1abb39['body'][_0x582f('0x5a')],_[_0x582f('0x7b')](_0x1abb39['body'],[_0x582f('0x5a'),'id'])||{})['spread'](function(_0x5a4ac5){for(var _0x3c536f=0x0;_0x3c536f<_0x1abb39[_0x582f('0x43')][_0x582f('0x5a')][_0x582f('0x34')];_0x3c536f+=0x1){socket['emit'](_0x582f('0x62'),{'UserId':Number(_0x1abb39[_0x582f('0x43')][_0x582f('0x5a')][_0x3c536f]),'MailQueueId':Number(_0x1abb39[_0x582f('0x2d')]['id'])});}return _0x5a4ac5;});}})[_0x582f('0x18')](respondWithResult(_0x5871e8,null))[_0x582f('0x39')](handleError(_0x5871e8,null));};exports['removeAgents']=function(_0x2b2dd4,_0x1c04bf){return db[_0x582f('0x22')][_0x582f('0x38')]({'where':{'id':_0x2b2dd4[_0x582f('0x2d')]['id']}})[_0x582f('0x18')](handleEntityNotFound(_0x1c04bf,null))[_0x582f('0x18')](function(_0x35a309){if(_0x35a309){return _0x35a309[_0x582f('0x79')](_0x2b2dd4['query'][_0x582f('0x5a')])[_0x582f('0x18')](function(){if(_['isArray'](_0x2b2dd4[_0x582f('0x2a')][_0x582f('0x5a')])){for(var _0x12d2bc=0x0;_0x12d2bc<_0x2b2dd4['query']['ids'][_0x582f('0x34')];_0x12d2bc+=0x1){socket['emit'](_0x582f('0x7c'),{'UserId':Number(_0x2b2dd4[_0x582f('0x2a')][_0x582f('0x5a')][_0x12d2bc]),'MailQueueId':Number(_0x2b2dd4[_0x582f('0x2d')]['id'])});}}else{socket[_0x582f('0x61')](_0x582f('0x7c'),{'UserId':Number(_0x2b2dd4['query'][_0x582f('0x5a')]),'MailQueueId':Number(_0x2b2dd4[_0x582f('0x2d')]['id'])});}});}})['then'](respondWithStatusCode(_0x1c04bf,null))[_0x582f('0x39')](handleError(_0x1c04bf,null));};exports['getAgents']=function(_0x192ac2,_0x1f109){var _0x1faaf7={};var _0x4089f1={};var _0x3f1d8d;var _0x3decd9;return db[_0x582f('0x22')]['findOne']({'where':{'id':_0x192ac2[_0x582f('0x2d')]['id']}})['then'](handleEntityNotFound(_0x1f109,null))[_0x582f('0x18')](function(_0x1273f9){if(_0x1273f9){_0x3f1d8d=_0x1273f9;_0x4089f1[_0x582f('0x31')]=_['keys'](db[_0x582f('0x65')]['rawAttributes']);_0x4089f1['query']=_['keys'](_0x192ac2[_0x582f('0x2a')]);_0x4089f1[_0x582f('0x2f')]=_[_0x582f('0x30')](_0x4089f1[_0x582f('0x31')],_0x4089f1[_0x582f('0x2a')]);_0x1faaf7[_0x582f('0x32')]=_[_0x582f('0x30')](_0x4089f1[_0x582f('0x31')],qs[_0x582f('0x33')](_0x192ac2['query'][_0x582f('0x33')]));_0x1faaf7[_0x582f('0x32')]=_0x1faaf7[_0x582f('0x32')][_0x582f('0x34')]?_0x1faaf7[_0x582f('0x32')]:_0x4089f1[_0x582f('0x31')];_0x1faaf7[_0x582f('0x57')]=qs[_0x582f('0x49')](_0x192ac2[_0x582f('0x2a')]['sort']);_0x1faaf7[_0x582f('0x28')]=qs[_0x582f('0x2f')](_[_0x582f('0x58')](_0x192ac2['query'],_0x4089f1[_0x582f('0x2f')]));if(_0x192ac2[_0x582f('0x2a')][_0x582f('0x4b')]){_0x1faaf7[_0x582f('0x28')]=_[_0x582f('0x36')](_0x1faaf7['where'],{'$or':_['map'](_0x1faaf7[_0x582f('0x32')],function(_0x54aa48){var _0x5ba235={};_0x5ba235[_0x54aa48]={'$like':'%'+_0x192ac2[_0x582f('0x2a')][_0x582f('0x4b')]+'%'};return _0x5ba235;})});}_0x1faaf7=_[_0x582f('0x36')]({},_0x1faaf7,_0x192ac2[_0x582f('0x37')]);return _0x3f1d8d['getAgents'](_0x1faaf7);}})[_0x582f('0x18')](function(_0x1f6a67){if(_0x1f6a67){_0x3decd9=_0x1f6a67[_0x582f('0x34')];if(!_0x192ac2[_0x582f('0x2a')]['hasOwnProperty'](_0x582f('0x48'))){_0x1faaf7[_0x582f('0x13')]=qs[_0x582f('0x13')](_0x192ac2[_0x582f('0x2a')][_0x582f('0x13')]);_0x1faaf7[_0x582f('0x11')]=qs[_0x582f('0x11')](_0x192ac2[_0x582f('0x2a')][_0x582f('0x11')]);}return _0x3f1d8d['getAgents'](_0x1faaf7);}})['then'](function(_0x33777c){if(_0x33777c){return _0x33777c?{'count':_0x3decd9,'rows':_0x33777c}:null;}})[_0x582f('0x18')](respondWithResult(_0x1f109,null))['catch'](handleError(_0x1f109,null));};
\ No newline at end of file
+var _0x144e=['getOptions','MailQueue','include','findAll','rows','catch','show','model','keys','query','intersection','attributes','fields','length','merge','options','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','params','describe','findOne','UserMailQueue','filters','hasOwnProperty','nolimit','order','sort','pick','where','filter','User','findAndCountAll','map','UserId','mailPause','updatedAt','createdAt','%s/%s','SIP','Team','getTeams','ids','Agents','voicePause','interface','flatMap','sequelize','transaction','addTeams','findOrCreate','forEach','emit','userMailQueue:save','select','field','tq.TeamId','from','team_has_mail_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','push','QueryTypes','SELECT','every','TeamId','includes','all','compact','value','removeTeams','isEmpty','removeAgents','userMailQueue:remove','addAgents','omit','spread','isArray','getAgents','bluebird','util','squel','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','redis','localhost','socket.io-emitter','./mailQueue.socket','register','sendStatus','status','end','json','offset','undefined','count','limit','set','then','get','MailQueues','UserProfileResource','destroy','name','send','index','rawAttributes','type','key'];(function(_0x14c69c,_0x4754f2){var _0x47fcb5=function(_0x379470){while(--_0x379470){_0x14c69c['push'](_0x14c69c['shift']());}};_0x47fcb5(++_0x4754f2);}(_0x144e,0x1c6));var _0xe144=function(_0x557c43,_0x385f43){_0x557c43=_0x557c43-0x0;var _0x3fecda=_0x144e[_0x557c43];return _0x3fecda;};'use strict';var BPromise=require(_0xe144('0x0'));var util=require(_0xe144('0x1'));var _=require('lodash');var squel=require(_0xe144('0x2'));var Redis=require(_0xe144('0x3'));var qs=require(_0xe144('0x4'));var logger=require(_0xe144('0x5'))(_0xe144('0x6'));var config=require(_0xe144('0x7'));var db=require(_0xe144('0x8'))['db'];config['redis']=_['defaults'](config[_0xe144('0x9')],{'host':_0xe144('0xa'),'port':0x18eb});var socket=require(_0xe144('0xb'))(new Redis(config[_0xe144('0x9')]));require(_0xe144('0xc'))[_0xe144('0xd')](socket);function respondWithStatusCode(_0x43fdf0,_0x310b07){_0x310b07=_0x310b07||0xcc;return function(_0x350622){if(_0x350622){return _0x43fdf0[_0xe144('0xe')](_0x310b07);}return _0x43fdf0[_0xe144('0xf')](_0x310b07)[_0xe144('0x10')]();};}function respondWithResult(_0x14f1d2,_0xea8de8){_0xea8de8=_0xea8de8||0xc8;return function(_0x3cca7f){if(_0x3cca7f){return _0x14f1d2[_0xe144('0xf')](_0xea8de8)[_0xe144('0x11')](_0x3cca7f);}};}function respondWithFilteredResult(_0x494128,_0x1b0119){return function(_0x4fd91d){if(_0x4fd91d){var _0x1b40f2=typeof _0x1b0119[_0xe144('0x12')]===_0xe144('0x13')&&typeof _0x1b0119['limit']===_0xe144('0x13');var _0x2f1b0d=_0x4fd91d[_0xe144('0x14')];var _0x3f7b19=_0x1b40f2?0x0:_0x1b0119[_0xe144('0x12')];var _0xf23ca2=_0x1b40f2?_0x4fd91d[_0xe144('0x14')]:_0x1b0119[_0xe144('0x12')]+_0x1b0119[_0xe144('0x15')];var _0x235f3a;if(_0xf23ca2>=_0x2f1b0d){_0xf23ca2=_0x2f1b0d;_0x235f3a=0xc8;}else{_0x235f3a=0xce;}_0x494128['status'](_0x235f3a);return _0x494128[_0xe144('0x16')]('Content-Range',_0x3f7b19+'-'+_0xf23ca2+'/'+_0x2f1b0d)[_0xe144('0x11')](_0x4fd91d);}return null;};}function saveUpdates(_0xa7f517){return function(_0x2448a0){if(_0x2448a0){return _0x2448a0['update'](_0xa7f517)[_0xe144('0x17')](function(_0x564cbb){return _0x564cbb;});}return null;};}function removeEntity(_0x5392ba){return function(_0x22a438){if(_0x22a438){return _0x22a438['destroy']()[_0xe144('0x17')](function(){var _0x485946=_0x22a438[_0xe144('0x18')]({'plain':!![]});var _0x5c2ef0=_0xe144('0x19');return db[_0xe144('0x1a')][_0xe144('0x1b')]({'where':{'type':_0x5c2ef0,'resourceId':_0x485946['id']}})['then'](function(){return _0x22a438;});})[_0xe144('0x17')](function(){_0x5392ba[_0xe144('0xf')](0xcc)[_0xe144('0x10')]();});}};}function handleEntityNotFound(_0x1eb8d4){return function(_0x1c2cf6){if(!_0x1c2cf6){_0x1eb8d4[_0xe144('0xe')](0x194);}return _0x1c2cf6;};}function handleError(_0x396b19,_0x42519b){_0x42519b=_0x42519b||0x1f4;return function(_0x557c4d){logger['error'](_0x557c4d['stack']);if(_0x557c4d[_0xe144('0x1c')]){delete _0x557c4d[_0xe144('0x1c')];}_0x396b19[_0xe144('0xf')](_0x42519b)[_0xe144('0x1d')](_0x557c4d);};}exports[_0xe144('0x1e')]=function(_0x3feabc,_0x5e4913){var _0x5d0e9c={};var _0x3ede4a={'count':0x0,'rows':[]};var _0x13ffd3=_['map'](db['MailQueue'][_0xe144('0x1f')],function(_0x2ea90f){return{'name':_0x2ea90f['fieldName'],'type':_0x2ea90f[_0xe144('0x20')][_0xe144('0x21')]};});_0x5d0e9c=qs[_0xe144('0x22')](_0x13ffd3,_0x3feabc);var _0x3fe1f9={'where':_0x5d0e9c['where']};return db[_0xe144('0x23')][_0xe144('0x14')](_0x3fe1f9)[_0xe144('0x17')](function(_0x584ebd){_0x3ede4a['count']=_0x584ebd;_0x5d0e9c[_0xe144('0x24')]=qs[_0xe144('0x24')](_0x3feabc['query']);return db['MailQueue'][_0xe144('0x25')](_0x5d0e9c);})['then'](function(_0x1d7b97){_0x3ede4a[_0xe144('0x26')]=_0x1d7b97;return _0x3ede4a;})[_0xe144('0x17')](respondWithFilteredResult(_0x5e4913,_0x5d0e9c))[_0xe144('0x27')](handleError(_0x5e4913,null));};exports[_0xe144('0x28')]=function(_0x355498,_0x28daf0){var _0x16236c={'raw':!![],'where':{'id':_0x355498['params']['id']}},_0x47ec0d={};_0x47ec0d[_0xe144('0x29')]=_[_0xe144('0x2a')](db['MailQueue'][_0xe144('0x1f')]);_0x47ec0d[_0xe144('0x2b')]=_[_0xe144('0x2a')](_0x355498[_0xe144('0x2b')]);_0x47ec0d['filters']=_[_0xe144('0x2c')](_0x47ec0d[_0xe144('0x29')],_0x47ec0d['query']);_0x16236c[_0xe144('0x2d')]=_['intersection'](_0x47ec0d['model'],qs['fields'](_0x355498[_0xe144('0x2b')][_0xe144('0x2e')]));_0x16236c[_0xe144('0x2d')]=_0x16236c[_0xe144('0x2d')][_0xe144('0x2f')]?_0x16236c['attributes']:_0x47ec0d[_0xe144('0x29')];if(_0x355498['query']['includeAll']){_0x16236c[_0xe144('0x24')]=[{'all':!![]}];}_0x16236c=_[_0xe144('0x30')]({},_0x16236c,_0x355498[_0xe144('0x31')]);return db['MailQueue'][_0xe144('0x32')](_0x16236c)[_0xe144('0x17')](handleEntityNotFound(_0x28daf0,null))[_0xe144('0x17')](respondWithResult(_0x28daf0,null))[_0xe144('0x27')](handleError(_0x28daf0,null));};exports[_0xe144('0x33')]=function(_0x506fda,_0x2d168a){return db[_0xe144('0x23')][_0xe144('0x33')](_0x506fda[_0xe144('0x34')],{})[_0xe144('0x17')](function(_0x385f8f){var _0x4790fc=_0x506fda['user'][_0xe144('0x18')]({'plain':!![]});if(!_0x4790fc)throw new Error(_0xe144('0x35'));if(_0x4790fc['role']===_0xe144('0x36')){var _0x55e6ac=_0x385f8f[_0xe144('0x18')]({'plain':!![]});var _0x41d9fd=_0xe144('0x19');return db[_0xe144('0x37')][_0xe144('0x32')]({'where':{'name':_0x41d9fd,'userProfileId':_0x4790fc[_0xe144('0x38')]},'raw':!![]})['then'](function(_0x5e3751){if(_0x5e3751&&_0x5e3751[_0xe144('0x39')]===0x0){return db[_0xe144('0x1a')][_0xe144('0x33')]({'name':_0x55e6ac[_0xe144('0x1c')],'resourceId':_0x55e6ac['id'],'type':_0x5e3751[_0xe144('0x1c')],'sectionId':_0x5e3751['id']},{})[_0xe144('0x17')](function(){return _0x385f8f;});}else{return _0x385f8f;}})['catch'](function(_0x258dd6){logger[_0xe144('0x3a')](_0xe144('0x3b'),_0x258dd6);throw _0x258dd6;});}return _0x385f8f;})[_0xe144('0x17')](respondWithResult(_0x2d168a,0xc9))[_0xe144('0x27')](handleError(_0x2d168a,null));};exports[_0xe144('0x3c')]=function(_0x9822e9,_0x48cb43){if(_0x9822e9[_0xe144('0x34')]['id']){delete _0x9822e9[_0xe144('0x34')]['id'];}return db[_0xe144('0x23')][_0xe144('0x32')]({'where':{'id':_0x9822e9[_0xe144('0x3d')]['id']}})[_0xe144('0x17')](handleEntityNotFound(_0x48cb43,null))[_0xe144('0x17')](saveUpdates(_0x9822e9[_0xe144('0x34')],null))[_0xe144('0x17')](respondWithResult(_0x48cb43,null))['catch'](handleError(_0x48cb43,null));};exports['destroy']=function(_0x1324ea,_0x2f1d3b){return db[_0xe144('0x23')][_0xe144('0x32')]({'where':{'id':_0x1324ea[_0xe144('0x3d')]['id']}})[_0xe144('0x17')](handleEntityNotFound(_0x2f1d3b,null))['then'](removeEntity(_0x2f1d3b,null))[_0xe144('0x27')](handleError(_0x2f1d3b,null));};exports['describe']=function(_0x4d33b3,_0x159c15){return db[_0xe144('0x23')][_0xe144('0x3e')]()[_0xe144('0x17')](respondWithResult(_0x159c15,null))[_0xe144('0x27')](handleError(_0x159c15,null));};exports['getMembers']=function(_0x2c3f9f,_0xda276d){var _0x46a100={'raw':!![],'where':{}},_0x567c00={},_0x38a8e8;return db[_0xe144('0x23')][_0xe144('0x3f')]({'where':{'id':_0x2c3f9f[_0xe144('0x3d')]['id']}})[_0xe144('0x17')](handleEntityNotFound(_0xda276d,null))[_0xe144('0x17')](function(_0x271610){if(_0x271610){_0x38a8e8=_0x271610[_0xe144('0x18')]({'plain':!![]});_0x567c00[_0xe144('0x29')]=_['keys'](db[_0xe144('0x40')][_0xe144('0x1f')]);_0x567c00['query']=_[_0xe144('0x2a')](_0x2c3f9f[_0xe144('0x2b')]);_0x567c00[_0xe144('0x41')]=_['intersection'](_0x567c00[_0xe144('0x29')],_0x567c00[_0xe144('0x2b')]);_0x46a100[_0xe144('0x2d')]=_[_0xe144('0x2c')](_0x567c00[_0xe144('0x29')],qs[_0xe144('0x2e')](_0x2c3f9f[_0xe144('0x2b')][_0xe144('0x2e')]));_0x46a100[_0xe144('0x2d')]=_0x46a100[_0xe144('0x2d')][_0xe144('0x2f')]?_0x46a100[_0xe144('0x2d')]:_0x567c00[_0xe144('0x29')];if(!_0x2c3f9f[_0xe144('0x2b')][_0xe144('0x42')](_0xe144('0x43'))){_0x46a100['limit']=qs[_0xe144('0x15')](_0x2c3f9f[_0xe144('0x2b')][_0xe144('0x15')]);_0x46a100['offset']=qs['offset'](_0x2c3f9f[_0xe144('0x2b')]['offset']);}_0x46a100[_0xe144('0x44')]=qs['sort'](_0x2c3f9f[_0xe144('0x2b')][_0xe144('0x45')]);_0x46a100['where']=qs[_0xe144('0x41')](_[_0xe144('0x46')](_0x2c3f9f[_0xe144('0x2b')],_0x567c00[_0xe144('0x41')]));_0x46a100[_0xe144('0x47')]['MailQueueId']=_0x271610['id'];if(_0x2c3f9f['query']['filter']){_0x46a100[_0xe144('0x47')]=_[_0xe144('0x30')](_0x46a100[_0xe144('0x47')],{'$or':_['map'](_0x46a100['attributes'],function(_0x329723){var _0x41b73d={};_0x41b73d[_0x329723]={'$like':'%'+_0x2c3f9f[_0xe144('0x2b')][_0xe144('0x48')]+'%'};return _0x41b73d;})});}_0x46a100=_['merge']({},_0x46a100,_0x2c3f9f['options']);return db[_0xe144('0x40')]['findAll'](_0x46a100);}})[_0xe144('0x17')](function(_0x62b859){if(_0x62b859){return db[_0xe144('0x49')][_0xe144('0x4a')]({'where':{'id':_[_0xe144('0x4b')](_0x62b859,_0xe144('0x4c')),'role':'agent'},'attributes':['id',_0xe144('0x1c'),_0xe144('0x4d'),_0xe144('0x4e'),_0xe144('0x4f')]});}})['then'](function(_0x4fcc92){if(_0x4fcc92){return{'count':_0x4fcc92['count'],'rows':_['map'](_0x4fcc92[_0xe144('0x26')],function(_0x13e4fc){return{'membername':_0x13e4fc['name'],'UserId':_0x13e4fc['id'],'queue_name':_0x38a8e8[_0xe144('0x1c')],'MailQueueId':_0x38a8e8['id'],'interface':util['format'](_0xe144('0x50'),_0xe144('0x51'),_0x13e4fc[_0xe144('0x1c')]),'penalty':0x0,'paused':_0x13e4fc['mailPause'],'createdAt':_0x13e4fc[_0xe144('0x4f')],'updatedAt':_0x13e4fc[_0xe144('0x4e')]};})};}else{return{'count':0x0,'rows':[]};}})[_0xe144('0x17')](respondWithFilteredResult(_0xda276d,_0x46a100))[_0xe144('0x27')](handleError(_0xda276d,null));};exports['getTeams']=function(_0x708eed,_0x2be380){var _0x4c8553={};var _0x516cf0={};var _0x31ac2a;var _0x27e0f2;return db[_0xe144('0x23')][_0xe144('0x3f')]({'where':{'id':_0x708eed[_0xe144('0x3d')]['id']}})['then'](handleEntityNotFound(_0x2be380,null))[_0xe144('0x17')](function(_0x3eb469){if(_0x3eb469){_0x31ac2a=_0x3eb469;_0x516cf0[_0xe144('0x29')]=_[_0xe144('0x2a')](db[_0xe144('0x52')][_0xe144('0x1f')]);_0x516cf0[_0xe144('0x2b')]=_[_0xe144('0x2a')](_0x708eed[_0xe144('0x2b')]);_0x516cf0[_0xe144('0x41')]=_[_0xe144('0x2c')](_0x516cf0[_0xe144('0x29')],_0x516cf0[_0xe144('0x2b')]);_0x4c8553[_0xe144('0x2d')]=_[_0xe144('0x2c')](_0x516cf0[_0xe144('0x29')],qs['fields'](_0x708eed[_0xe144('0x2b')][_0xe144('0x2e')]));_0x4c8553[_0xe144('0x2d')]=_0x4c8553['attributes'][_0xe144('0x2f')]?_0x4c8553[_0xe144('0x2d')]:_0x516cf0[_0xe144('0x29')];_0x4c8553['order']=qs['sort'](_0x708eed['query']['sort']);_0x4c8553[_0xe144('0x47')]=qs[_0xe144('0x41')](_[_0xe144('0x46')](_0x708eed[_0xe144('0x2b')],_0x516cf0[_0xe144('0x41')]));if(_0x708eed[_0xe144('0x2b')][_0xe144('0x48')]){_0x4c8553[_0xe144('0x47')]=_[_0xe144('0x30')](_0x4c8553[_0xe144('0x47')],{'$or':_[_0xe144('0x4b')](_0x4c8553[_0xe144('0x2d')],function(_0x2c1d54){var _0x4e25b0={};_0x4e25b0[_0x2c1d54]={'$like':'%'+_0x708eed[_0xe144('0x2b')]['filter']+'%'};return _0x4e25b0;})});}_0x4c8553=_[_0xe144('0x30')]({},_0x4c8553,_0x708eed[_0xe144('0x31')]);return _0x31ac2a['getTeams'](_0x4c8553);}})['then'](function(_0x4fad17){if(_0x4fad17){_0x27e0f2=_0x4fad17[_0xe144('0x2f')];if(!_0x708eed[_0xe144('0x2b')][_0xe144('0x42')](_0xe144('0x43'))){_0x4c8553[_0xe144('0x15')]=qs[_0xe144('0x15')](_0x708eed['query'][_0xe144('0x15')]);_0x4c8553[_0xe144('0x12')]=qs['offset'](_0x708eed[_0xe144('0x2b')]['offset']);}return _0x31ac2a[_0xe144('0x53')](_0x4c8553);}})[_0xe144('0x17')](function(_0x3bae19){if(_0x3bae19){return _0x3bae19?{'count':_0x27e0f2,'rows':_0x3bae19}:null;}})['then'](respondWithResult(_0x2be380,null))['catch'](handleError(_0x2be380,null));};exports['addTeams']=function(_0x3cb622,_0x5dcb58){var _0x11c1de=_0x3cb622[_0xe144('0x34')][_0xe144('0x54')];return db['Team'][_0xe144('0x25')]({'where':{'id':_0x11c1de},'attributes':['id'],'include':[{'model':db[_0xe144('0x49')],'as':_0xe144('0x55'),'attributes':['id',_0xe144('0x1c'),'online',_0xe144('0x56'),_0xe144('0x57')],'raw':!![]}]})[_0xe144('0x17')](function(_0x3c09c6){if(_0x3c09c6){var _0x41857a=_[_0xe144('0x58')](_0x3c09c6,function(_0x153442){var _0x2ea4ab=_0x153442[_0xe144('0x18')]({'plain':!![]});return _0x2ea4ab[_0xe144('0x55')];});return db['MailQueue'][_0xe144('0x32')]({'where':{'id':_0x3cb622[_0xe144('0x3d')]['id']}})[_0xe144('0x17')](function(_0x4fdd90){return db[_0xe144('0x59')][_0xe144('0x5a')](function(_0x1f44aa){return _0x4fdd90[_0xe144('0x5b')](_0x11c1de,{'transaction':_0x1f44aa})['then'](function(){return BPromise['each'](_0x41857a,function(_0x1dbb9b){return db[_0xe144('0x40')][_0xe144('0x5c')]({'where':{'UserId':_0x1dbb9b['id'],'MailQueueId':_0x3cb622[_0xe144('0x3d')]['id']},'transaction':_0x1f44aa});});})[_0xe144('0x17')](function(){_0x41857a[_0xe144('0x5d')](function(_0x360fcc){socket[_0xe144('0x5e')](_0xe144('0x5f'),{'UserId':_0x360fcc['id'],'MailQueueId':_0x4fdd90['id']});});});});});}})[_0xe144('0x17')](respondWithStatusCode(_0x5dcb58,null))[_0xe144('0x27')](handleError(_0x5dcb58,null));};exports['removeTeams']=function(_0x206308,_0x11216a){return db[_0xe144('0x52')]['findAll']({'where':{'id':_0x206308[_0xe144('0x2b')][_0xe144('0x54')]},'attributes':['id'],'include':[{'model':db[_0xe144('0x49')],'as':'Agents','attributes':['id'],'raw':!![]}]})[_0xe144('0x17')](handleEntityNotFound(_0x11216a,null))[_0xe144('0x17')](function(_0x2766ad){var _0x54919b=_[_0xe144('0x4b')](_0x2766ad,'id');var _0x1de994=[];var _0x5b5274=[];var _0x194527=squel[_0xe144('0x60')]();_0x194527[_0xe144('0x61')](_0xe144('0x62'))[_0xe144('0x63')](_0xe144('0x64'),'tq')[_0xe144('0x65')](_0xe144('0x66'),'ut',_0xe144('0x67'))[_0xe144('0x47')]('MailQueueId\x20=\x20?',_0x206308[_0xe144('0x3d')]['id']);for(var _0x1fb697=0x0;_0x1fb697<_0x2766ad[_0xe144('0x2f')];_0x1fb697+=0x1){let _0x17a364=_0x2766ad[_0x1fb697];for(var _0x5b5438=0x0;_0x5b5438<_0x17a364['Agents'][_0xe144('0x2f')];_0x5b5438+=0x1){let _0x507643=_0x17a364[_0xe144('0x55')][_0x5b5438];var _0x5dcbc5=_0x194527['clone']();_0x5dcbc5[_0xe144('0x47')]('ut.UserId\x20=\x20?',_0x507643['id']);_0x5b5274[_0xe144('0x68')](db[_0xe144('0x59')][_0xe144('0x2b')](_0x5dcbc5['toString'](),{'type':db[_0xe144('0x59')][_0xe144('0x69')][_0xe144('0x6a')]})[_0xe144('0x17')](function(_0x320014){if(_0x320014['length']===0x1){return _0x507643['id'];}else{var _0x49557d=_[_0xe144('0x6b')](_['map'](_0x320014,_0xe144('0x6c')),function(_0x1dce21){return _[_0xe144('0x6d')](_0x54919b,_0x1dce21);});if(_0x49557d){return _0x507643['id'];}}}));}}return BPromise[_0xe144('0x6e')](_0x5b5274)[_0xe144('0x17')](function(_0x1a45cf){_0x1de994=_(_0x1de994)['union'](_0x1a45cf)[_0xe144('0x6f')]()[_0xe144('0x70')]();return db[_0xe144('0x23')][_0xe144('0x32')]({'where':{'id':_0x206308[_0xe144('0x3d')]['id']}})[_0xe144('0x17')](function(_0x5955d5){return db[_0xe144('0x59')][_0xe144('0x5a')](function(_0x54e3f0){return _0x5955d5[_0xe144('0x71')](_0x206308['query']['ids'],{'transaction':_0x54e3f0})[_0xe144('0x17')](function(){if(!_[_0xe144('0x72')](_0x1de994)){return _0x5955d5[_0xe144('0x73')](_0x1de994,{'transaction':_0x54e3f0});}})['then'](function(){_0x1de994['forEach'](function(_0x509946){socket[_0xe144('0x5e')](_0xe144('0x74'),{'UserId':_0x509946,'MailQueueId':_0x5955d5['id']});});});});});});})[_0xe144('0x17')](respondWithStatusCode(_0x11216a,null))['catch'](handleError(_0x11216a,null));};exports[_0xe144('0x75')]=function(_0x2dc3a9,_0x4e172e){return db[_0xe144('0x23')]['find']({'where':{'id':_0x2dc3a9[_0xe144('0x3d')]['id']}})[_0xe144('0x17')](handleEntityNotFound(_0x4e172e,null))['then'](function(_0x5d6207){if(_0x5d6207){return _0x5d6207[_0xe144('0x75')](_0x2dc3a9[_0xe144('0x34')]['ids'],_[_0xe144('0x76')](_0x2dc3a9['body'],[_0xe144('0x54'),'id'])||{})[_0xe144('0x77')](function(_0xafe113){for(var _0x3202df=0x0;_0x3202df<_0x2dc3a9['body'][_0xe144('0x54')]['length'];_0x3202df+=0x1){socket[_0xe144('0x5e')](_0xe144('0x5f'),{'UserId':Number(_0x2dc3a9[_0xe144('0x34')][_0xe144('0x54')][_0x3202df]),'MailQueueId':Number(_0x2dc3a9[_0xe144('0x3d')]['id'])});}return _0xafe113;});}})['then'](respondWithResult(_0x4e172e,null))[_0xe144('0x27')](handleError(_0x4e172e,null));};exports['removeAgents']=function(_0x12914d,_0x18b7c1){return db[_0xe144('0x23')]['find']({'where':{'id':_0x12914d['params']['id']}})[_0xe144('0x17')](handleEntityNotFound(_0x18b7c1,null))[_0xe144('0x17')](function(_0x1b1789){if(_0x1b1789){return _0x1b1789[_0xe144('0x73')](_0x12914d[_0xe144('0x2b')][_0xe144('0x54')])['then'](function(){if(_[_0xe144('0x78')](_0x12914d[_0xe144('0x2b')][_0xe144('0x54')])){for(var _0x2f3adb=0x0;_0x2f3adb<_0x12914d['query'][_0xe144('0x54')][_0xe144('0x2f')];_0x2f3adb+=0x1){socket[_0xe144('0x5e')](_0xe144('0x74'),{'UserId':Number(_0x12914d[_0xe144('0x2b')][_0xe144('0x54')][_0x2f3adb]),'MailQueueId':Number(_0x12914d[_0xe144('0x3d')]['id'])});}}else{socket[_0xe144('0x5e')](_0xe144('0x74'),{'UserId':Number(_0x12914d[_0xe144('0x2b')]['ids']),'MailQueueId':Number(_0x12914d[_0xe144('0x3d')]['id'])});}});}})['then'](respondWithStatusCode(_0x18b7c1,null))[_0xe144('0x27')](handleError(_0x18b7c1,null));};exports[_0xe144('0x79')]=function(_0x40f4ff,_0x2f2978){var _0x454da2={};var _0x58be8f={};var _0x525ae6;var _0x260445;return db[_0xe144('0x23')][_0xe144('0x3f')]({'where':{'id':_0x40f4ff[_0xe144('0x3d')]['id']}})[_0xe144('0x17')](handleEntityNotFound(_0x2f2978,null))[_0xe144('0x17')](function(_0x5e05ba){if(_0x5e05ba){_0x525ae6=_0x5e05ba;_0x58be8f[_0xe144('0x29')]=_[_0xe144('0x2a')](db[_0xe144('0x49')]['rawAttributes']);_0x58be8f[_0xe144('0x2b')]=_[_0xe144('0x2a')](_0x40f4ff[_0xe144('0x2b')]);_0x58be8f[_0xe144('0x41')]=_[_0xe144('0x2c')](_0x58be8f[_0xe144('0x29')],_0x58be8f[_0xe144('0x2b')]);_0x454da2[_0xe144('0x2d')]=_['intersection'](_0x58be8f['model'],qs[_0xe144('0x2e')](_0x40f4ff[_0xe144('0x2b')][_0xe144('0x2e')]));_0x454da2[_0xe144('0x2d')]=_0x454da2[_0xe144('0x2d')][_0xe144('0x2f')]?_0x454da2[_0xe144('0x2d')]:_0x58be8f[_0xe144('0x29')];_0x454da2[_0xe144('0x44')]=qs[_0xe144('0x45')](_0x40f4ff[_0xe144('0x2b')]['sort']);_0x454da2[_0xe144('0x47')]=qs[_0xe144('0x41')](_[_0xe144('0x46')](_0x40f4ff[_0xe144('0x2b')],_0x58be8f[_0xe144('0x41')]));if(_0x40f4ff[_0xe144('0x2b')][_0xe144('0x48')]){_0x454da2[_0xe144('0x47')]=_[_0xe144('0x30')](_0x454da2[_0xe144('0x47')],{'$or':_['map'](_0x454da2['attributes'],function(_0x564157){var _0x3172bd={};_0x3172bd[_0x564157]={'$like':'%'+_0x40f4ff[_0xe144('0x2b')][_0xe144('0x48')]+'%'};return _0x3172bd;})});}_0x454da2=_[_0xe144('0x30')]({},_0x454da2,_0x40f4ff[_0xe144('0x31')]);return _0x525ae6['getAgents'](_0x454da2);}})['then'](function(_0x5f3121){if(_0x5f3121){_0x260445=_0x5f3121[_0xe144('0x2f')];if(!_0x40f4ff[_0xe144('0x2b')][_0xe144('0x42')](_0xe144('0x43'))){_0x454da2[_0xe144('0x15')]=qs[_0xe144('0x15')](_0x40f4ff[_0xe144('0x2b')]['limit']);_0x454da2[_0xe144('0x12')]=qs['offset'](_0x40f4ff[_0xe144('0x2b')][_0xe144('0x12')]);}return _0x525ae6[_0xe144('0x79')](_0x454da2);}})[_0xe144('0x17')](function(_0x146dbb){if(_0x146dbb){return _0x146dbb?{'count':_0x260445,'rows':_0x146dbb}:null;}})[_0xe144('0x17')](respondWithResult(_0x2f2978,null))[_0xe144('0x27')](handleError(_0x2f2978,null));};
\ No newline at end of file
index bf20df3..e085aff 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6a3a=['update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','MailQueue','setMaxListeners','save'];(function(_0x3a788d,_0x5ab075){var _0x47956a=function(_0x97f79d){while(--_0x97f79d){_0x3a788d['push'](_0x3a788d['shift']());}};_0x47956a(++_0x5ab075);}(_0x6a3a,0x69));var _0xa6a3=function(_0x1a7846,_0x59723e){_0x1a7846=_0x1a7846-0x0;var _0x48049=_0x6a3a[_0x1a7846];return _0x48049;};'use strict';var EventEmitter=require(_0xa6a3('0x0'));var MailQueue=require(_0xa6a3('0x1'))['db'][_0xa6a3('0x2')];var MailQueueEvents=new EventEmitter();MailQueueEvents[_0xa6a3('0x3')](0x0);var events={'afterCreate':_0xa6a3('0x4'),'afterUpdate':_0xa6a3('0x5'),'afterDestroy':_0xa6a3('0x6')};function emitEvent(_0x33f213){return function(_0x39cc3f,_0xcde649,_0x571527){MailQueueEvents[_0xa6a3('0x7')](_0x33f213+':'+_0x39cc3f['id'],_0x39cc3f);MailQueueEvents['emit'](_0x33f213,_0x39cc3f);_0x571527(null);};}for(var e in events){if(events[_0xa6a3('0x8')](e)){var event=events[e];MailQueue[_0xa6a3('0x9')](e,emitEvent(event));}}module[_0xa6a3('0xa')]=MailQueueEvents;
\ No newline at end of file
+var _0x58c5=['save','remove','emit','hasOwnProperty','exports','events','../../mysqldb','MailQueue','setMaxListeners'];(function(_0x5183eb,_0x39f364){var _0x2aed19=function(_0x139d84){while(--_0x139d84){_0x5183eb['push'](_0x5183eb['shift']());}};_0x2aed19(++_0x39f364);}(_0x58c5,0x101));var _0x558c=function(_0x5d84fe,_0x3d268f){_0x5d84fe=_0x5d84fe-0x0;var _0x36053b=_0x58c5[_0x5d84fe];return _0x36053b;};'use strict';var EventEmitter=require(_0x558c('0x0'));var MailQueue=require(_0x558c('0x1'))['db'][_0x558c('0x2')];var MailQueueEvents=new EventEmitter();MailQueueEvents[_0x558c('0x3')](0x0);var events={'afterCreate':_0x558c('0x4'),'afterUpdate':'update','afterDestroy':_0x558c('0x5')};function emitEvent(_0x4e9e2b){return function(_0x541d22,_0x3e4a65,_0x2896cb){MailQueueEvents['emit'](_0x4e9e2b+':'+_0x541d22['id'],_0x541d22);MailQueueEvents[_0x558c('0x6')](_0x4e9e2b,_0x541d22);_0x2896cb(null);};}for(var e in events){if(events[_0x558c('0x7')](e)){var event=events[e];MailQueue['hook'](e,emitEvent(event));}}module[_0x558c('0x8')]=MailQueueEvents;
\ No newline at end of file
index 707c553..4ae8a3b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfd9f=['bluebird','path','rimraf','../../config/environment','./mailQueue.attributes','exports','define','MailQueue','util','api','moment'];(function(_0x58044c,_0x14a89a){var _0xda7e=function(_0x41fc4b){while(--_0x41fc4b){_0x58044c['push'](_0x58044c['shift']());}};_0xda7e(++_0x14a89a);}(_0xfd9f,0x1aa));var _0xffd9=function(_0x39414d,_0x26b932){_0x39414d=_0x39414d-0x0;var _0x5e2c82=_0xfd9f[_0x39414d];return _0x5e2c82;};'use strict';var _=require('lodash');var util=require(_0xffd9('0x0'));var logger=require('../../config/logger')(_0xffd9('0x1'));var moment=require(_0xffd9('0x2'));var BPromise=require(_0xffd9('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xffd9('0x4'));var rimraf=require(_0xffd9('0x5'));var config=require(_0xffd9('0x6'));var attributes=require(_0xffd9('0x7'));module[_0xffd9('0x8')]=function(_0x148c76,_0x2da9e1){return _0x148c76[_0xffd9('0x9')](_0xffd9('0xa'),attributes,{'tableName':'mail_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x3b12=['rimraf','./mailQueue.attributes','exports','define','MailQueue','mail_queues','lodash','util','../../config/logger','api','bluebird','path'];(function(_0xaa0309,_0x1c8008){var _0x5de7ce=function(_0x3aa6ae){while(--_0x3aa6ae){_0xaa0309['push'](_0xaa0309['shift']());}};_0x5de7ce(++_0x1c8008);}(_0x3b12,0xa2));var _0x23b1=function(_0x511028,_0x3ec7ef){_0x511028=_0x511028-0x0;var _0x25c6b6=_0x3b12[_0x511028];return _0x25c6b6;};'use strict';var _=require(_0x23b1('0x0'));var util=require(_0x23b1('0x1'));var logger=require(_0x23b1('0x2'))(_0x23b1('0x3'));var moment=require('moment');var BPromise=require(_0x23b1('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x23b1('0x5'));var rimraf=require(_0x23b1('0x6'));var config=require('../../config/environment');var attributes=require(_0x23b1('0x7'));module[_0x23b1('0x8')]=function(_0x5dfc38,_0xae591e){return _0x5dfc38[_0x23b1('0x9')](_0x23b1('0xa'),attributes,{'tableName':_0x23b1('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 06a5895..dce0a7b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x62e4=['stringify','code','error','message','info','result','catch','MailQueue','findAll','options','where','attributes','limit','include','model','map','GetMailQueue','ShowMailQueue','raw','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','redis','defaults','localhost','socket.io-emitter','./mailQueue.socket','request','then','MailQueue,\x20%s,\x20%s','request\x20sent','debug'];(function(_0xc0018e,_0x4f51a6){var _0xbcae25=function(_0x5b64c7){while(--_0x5b64c7){_0xc0018e['push'](_0xc0018e['shift']());}};_0xbcae25(++_0x4f51a6);}(_0x62e4,0x12b));var _0x462e=function(_0x570869,_0x20481f){_0x570869=_0x570869-0x0;var _0x39629c=_0x62e4[_0x570869];return _0x39629c;};'use strict';var _=require(_0x462e('0x0'));var util=require(_0x462e('0x1'));var moment=require(_0x462e('0x2'));var BPromise=require('bluebird');var rs=require(_0x462e('0x3'));var fs=require('fs');var Redis=require(_0x462e('0x4'));var db=require(_0x462e('0x5'))['db'];var utils=require(_0x462e('0x6'));var logger=require(_0x462e('0x7'))(_0x462e('0x8'));var config=require(_0x462e('0x9'));var jayson=require(_0x462e('0xa'));var client=jayson['client']['http']({'port':0x232a});config[_0x462e('0xb')]=_[_0x462e('0xc')](config[_0x462e('0xb')],{'host':_0x462e('0xd'),'port':0x18eb});var socket=require(_0x462e('0xe'))(new Redis(config['redis']));require(_0x462e('0xf'))['register'](socket);function respondWithRpcPromise(_0x26820f,_0x3ea257,_0x363685){return new BPromise(function(_0x156543,_0x261186){return client[_0x462e('0x10')](_0x26820f,_0x363685)[_0x462e('0x11')](function(_0x4e9446){logger['info'](_0x462e('0x12'),_0x3ea257,_0x462e('0x13'));logger[_0x462e('0x14')]('MailQueue,\x20%s,\x20%s,\x20%s',_0x3ea257,'request\x20sent',JSON[_0x462e('0x15')](_0x4e9446));if(_0x4e9446['error']){if(_0x4e9446['error'][_0x462e('0x16')]===0x1f4){logger['error'](_0x462e('0x12'),_0x3ea257,_0x4e9446[_0x462e('0x17')][_0x462e('0x18')]);return _0x261186(_0x4e9446[_0x462e('0x17')][_0x462e('0x18')]);}logger[_0x462e('0x17')]('MailQueue,\x20%s,\x20%s',_0x3ea257,_0x4e9446['error'][_0x462e('0x18')]);return _0x156543(_0x4e9446[_0x462e('0x17')][_0x462e('0x18')]);}else{logger[_0x462e('0x19')](_0x462e('0x12'),_0x3ea257,'request\x20sent');_0x156543(_0x4e9446[_0x462e('0x1a')][_0x462e('0x18')]);}})[_0x462e('0x1b')](function(_0x524cc8){logger[_0x462e('0x17')](_0x462e('0x12'),_0x3ea257,_0x524cc8);_0x261186(_0x524cc8);});});}exports['GetMailQueue']=function(_0x457827){var _0xb6256e=this;return new Promise(function(_0x55101d,_0x5a3393){return db[_0x462e('0x1c')][_0x462e('0x1d')]({'raw':_0x457827[_0x462e('0x1e')]?_0x457827['options']['raw']===undefined?!![]:![]:!![],'where':_0x457827[_0x462e('0x1e')]?_0x457827[_0x462e('0x1e')][_0x462e('0x1f')]||null:null,'attributes':_0x457827['options']?_0x457827['options'][_0x462e('0x20')]||null:null,'limit':_0x457827[_0x462e('0x1e')]?_0x457827[_0x462e('0x1e')][_0x462e('0x21')]||null:null,'include':_0x457827[_0x462e('0x1e')]?_0x457827['options'][_0x462e('0x22')]?_['map'](_0x457827[_0x462e('0x1e')]['include'],function(_0x46a1cf){return{'model':db[_0x46a1cf['model']],'as':_0x46a1cf['as'],'attributes':_0x46a1cf[_0x462e('0x20')],'include':_0x46a1cf[_0x462e('0x22')]?_['map'](_0x46a1cf[_0x462e('0x22')],function(_0xf74972){return{'model':db[_0xf74972[_0x462e('0x23')]],'as':_0xf74972['as'],'attributes':_0xf74972['attributes'],'include':_0xf74972[_0x462e('0x22')]?_[_0x462e('0x24')](_0xf74972[_0x462e('0x22')],function(_0x3eaa25){return{'model':db[_0x3eaa25[_0x462e('0x23')]],'as':_0x3eaa25['as'],'attributes':_0x3eaa25[_0x462e('0x20')]};}):[]};}):[]};}):[]:[]})[_0x462e('0x11')](function(_0x4aa176){logger[_0x462e('0x19')]('GetMailQueue',_0x457827);logger[_0x462e('0x14')](_0x462e('0x25'),_0x457827,JSON[_0x462e('0x15')](_0x4aa176));_0x55101d(_0x4aa176);})['catch'](function(_0x141a89){logger[_0x462e('0x17')]('GetMailQueue',_0x141a89[_0x462e('0x18')],_0x457827);_0x5a3393(_0xb6256e[_0x462e('0x17')](0x1f4,_0x141a89[_0x462e('0x18')]));});});};exports[_0x462e('0x26')]=function(_0x5101ba){var _0x1806cc=this;return new Promise(function(_0x2a28e1,_0x15d74f){return db['MailQueue']['find']({'raw':_0x5101ba[_0x462e('0x1e')]?_0x5101ba[_0x462e('0x1e')][_0x462e('0x27')]===undefined?!![]:![]:!![],'where':_0x5101ba[_0x462e('0x1e')]?_0x5101ba[_0x462e('0x1e')][_0x462e('0x1f')]||null:null,'attributes':_0x5101ba[_0x462e('0x1e')]?_0x5101ba[_0x462e('0x1e')][_0x462e('0x20')]||null:null,'include':_0x5101ba[_0x462e('0x1e')]?_0x5101ba[_0x462e('0x1e')][_0x462e('0x22')]?_[_0x462e('0x24')](_0x5101ba[_0x462e('0x1e')]['include'],function(_0x1fbc88){return{'model':db[_0x1fbc88[_0x462e('0x23')]],'as':_0x1fbc88['as'],'attributes':_0x1fbc88['attributes'],'include':_0x1fbc88[_0x462e('0x22')]?_['map'](_0x1fbc88[_0x462e('0x22')],function(_0x46c2da){return{'model':db[_0x46c2da[_0x462e('0x23')]],'as':_0x46c2da['as'],'attributes':_0x46c2da[_0x462e('0x20')],'include':_0x46c2da[_0x462e('0x22')]?_[_0x462e('0x24')](_0x46c2da[_0x462e('0x22')],function(_0x15a52a){return{'model':db[_0x15a52a['model']],'as':_0x15a52a['as'],'attributes':_0x15a52a[_0x462e('0x20')]};}):[]};}):[]};}):[]:[]})[_0x462e('0x11')](function(_0xded2f){logger[_0x462e('0x19')](_0x462e('0x26'),_0x5101ba);logger[_0x462e('0x14')]('ShowMailQueue',_0x5101ba,JSON[_0x462e('0x15')](_0xded2f));_0x2a28e1(_0xded2f);})['catch'](function(_0x592883){logger[_0x462e('0x17')]('ShowMailQueue',_0x592883[_0x462e('0x18')],_0x5101ba);_0x15d74f(_0x1806cc['error'](0x1f4,_0x592883[_0x462e('0x18')]));});});};
\ No newline at end of file
+var _0x78d2=['MailQueue,\x20%s,\x20%s','request\x20sent','debug','MailQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','GetMailQueue','MailQueue','findAll','options','where','limit','include','model','attributes','map','catch','ShowMailQueue','find','lodash','util','moment','bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./mailQueue.socket','register','request','then','info'];(function(_0x568ed6,_0x25787e){var _0x21da92=function(_0x520eec){while(--_0x520eec){_0x568ed6['push'](_0x568ed6['shift']());}};_0x21da92(++_0x25787e);}(_0x78d2,0x1c4));var _0x278d=function(_0x5ca9b4,_0x2bfd14){_0x5ca9b4=_0x5ca9b4-0x0;var _0x42731a=_0x78d2[_0x5ca9b4];return _0x42731a;};'use strict';var _=require(_0x278d('0x0'));var util=require(_0x278d('0x1'));var moment=require(_0x278d('0x2'));var BPromise=require(_0x278d('0x3'));var rs=require(_0x278d('0x4'));var fs=require('fs');var Redis=require(_0x278d('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x278d('0x6'))(_0x278d('0x7'));var config=require(_0x278d('0x8'));var jayson=require(_0x278d('0x9'));var client=jayson[_0x278d('0xa')][_0x278d('0xb')]({'port':0x232a});config[_0x278d('0xc')]=_[_0x278d('0xd')](config[_0x278d('0xc')],{'host':_0x278d('0xe'),'port':0x18eb});var socket=require(_0x278d('0xf'))(new Redis(config['redis']));require(_0x278d('0x10'))[_0x278d('0x11')](socket);function respondWithRpcPromise(_0x54de68,_0x2beb6e,_0x2ea522){return new BPromise(function(_0x38e299,_0x340db5){return client[_0x278d('0x12')](_0x54de68,_0x2ea522)[_0x278d('0x13')](function(_0x473a5e){logger[_0x278d('0x14')](_0x278d('0x15'),_0x2beb6e,_0x278d('0x16'));logger[_0x278d('0x17')](_0x278d('0x18'),_0x2beb6e,_0x278d('0x16'),JSON[_0x278d('0x19')](_0x473a5e));if(_0x473a5e[_0x278d('0x1a')]){if(_0x473a5e[_0x278d('0x1a')][_0x278d('0x1b')]===0x1f4){logger[_0x278d('0x1a')](_0x278d('0x15'),_0x2beb6e,_0x473a5e[_0x278d('0x1a')][_0x278d('0x1c')]);return _0x340db5(_0x473a5e[_0x278d('0x1a')][_0x278d('0x1c')]);}logger[_0x278d('0x1a')](_0x278d('0x15'),_0x2beb6e,_0x473a5e[_0x278d('0x1a')][_0x278d('0x1c')]);return _0x38e299(_0x473a5e[_0x278d('0x1a')][_0x278d('0x1c')]);}else{logger['info']('MailQueue,\x20%s,\x20%s',_0x2beb6e,_0x278d('0x16'));_0x38e299(_0x473a5e[_0x278d('0x1d')][_0x278d('0x1c')]);}})['catch'](function(_0x1bffa7){logger['error'](_0x278d('0x15'),_0x2beb6e,_0x1bffa7);_0x340db5(_0x1bffa7);});});}exports[_0x278d('0x1e')]=function(_0x3789e1){var _0x28bd2f=this;return new Promise(function(_0x1f9d3c,_0x323edc){return db[_0x278d('0x1f')][_0x278d('0x20')]({'raw':_0x3789e1[_0x278d('0x21')]?_0x3789e1[_0x278d('0x21')]['raw']===undefined?!![]:![]:!![],'where':_0x3789e1[_0x278d('0x21')]?_0x3789e1[_0x278d('0x21')][_0x278d('0x22')]||null:null,'attributes':_0x3789e1[_0x278d('0x21')]?_0x3789e1[_0x278d('0x21')]['attributes']||null:null,'limit':_0x3789e1['options']?_0x3789e1[_0x278d('0x21')][_0x278d('0x23')]||null:null,'include':_0x3789e1[_0x278d('0x21')]?_0x3789e1[_0x278d('0x21')][_0x278d('0x24')]?_['map'](_0x3789e1[_0x278d('0x21')][_0x278d('0x24')],function(_0x4674ef){return{'model':db[_0x4674ef[_0x278d('0x25')]],'as':_0x4674ef['as'],'attributes':_0x4674ef[_0x278d('0x26')],'include':_0x4674ef[_0x278d('0x24')]?_[_0x278d('0x27')](_0x4674ef[_0x278d('0x24')],function(_0x5b8b71){return{'model':db[_0x5b8b71[_0x278d('0x25')]],'as':_0x5b8b71['as'],'attributes':_0x5b8b71['attributes'],'include':_0x5b8b71[_0x278d('0x24')]?_[_0x278d('0x27')](_0x5b8b71[_0x278d('0x24')],function(_0x13f2f4){return{'model':db[_0x13f2f4['model']],'as':_0x13f2f4['as'],'attributes':_0x13f2f4['attributes']};}):[]};}):[]};}):[]:[]})[_0x278d('0x13')](function(_0x26d106){logger[_0x278d('0x14')](_0x278d('0x1e'),_0x3789e1);logger[_0x278d('0x17')]('GetMailQueue',_0x3789e1,JSON[_0x278d('0x19')](_0x26d106));_0x1f9d3c(_0x26d106);})[_0x278d('0x28')](function(_0x3dc590){logger['error']('GetMailQueue',_0x3dc590[_0x278d('0x1c')],_0x3789e1);_0x323edc(_0x28bd2f['error'](0x1f4,_0x3dc590[_0x278d('0x1c')]));});});};exports[_0x278d('0x29')]=function(_0xadc0d4){var _0x21dbe9=this;return new Promise(function(_0x476905,_0x5468b4){return db[_0x278d('0x1f')][_0x278d('0x2a')]({'raw':_0xadc0d4['options']?_0xadc0d4[_0x278d('0x21')]['raw']===undefined?!![]:![]:!![],'where':_0xadc0d4['options']?_0xadc0d4['options'][_0x278d('0x22')]||null:null,'attributes':_0xadc0d4[_0x278d('0x21')]?_0xadc0d4['options'][_0x278d('0x26')]||null:null,'include':_0xadc0d4[_0x278d('0x21')]?_0xadc0d4[_0x278d('0x21')][_0x278d('0x24')]?_[_0x278d('0x27')](_0xadc0d4[_0x278d('0x21')][_0x278d('0x24')],function(_0x37aaf1){return{'model':db[_0x37aaf1[_0x278d('0x25')]],'as':_0x37aaf1['as'],'attributes':_0x37aaf1[_0x278d('0x26')],'include':_0x37aaf1[_0x278d('0x24')]?_['map'](_0x37aaf1[_0x278d('0x24')],function(_0x37dcb8){return{'model':db[_0x37dcb8['model']],'as':_0x37dcb8['as'],'attributes':_0x37dcb8['attributes'],'include':_0x37dcb8['include']?_[_0x278d('0x27')](_0x37dcb8[_0x278d('0x24')],function(_0x373e3a){return{'model':db[_0x373e3a['model']],'as':_0x373e3a['as'],'attributes':_0x373e3a[_0x278d('0x26')]};}):[]};}):[]};}):[]:[]})[_0x278d('0x13')](function(_0x463daf){logger[_0x278d('0x14')](_0x278d('0x29'),_0xadc0d4);logger[_0x278d('0x17')](_0x278d('0x29'),_0xadc0d4,JSON[_0x278d('0x19')](_0x463daf));_0x476905(_0x463daf);})[_0x278d('0x28')](function(_0x15c953){logger[_0x278d('0x1a')]('ShowMailQueue',_0x15c953[_0x278d('0x1c')],_0xadc0d4);_0x5468b4(_0x21dbe9['error'](0x1f4,_0x15c953[_0x278d('0x1c')]));});});};
\ No newline at end of file
index 152c4ff..b3482f2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa264=['remove','update','emit','removeListener','register','length','./mailQueue.events'];(function(_0x5dca17,_0x43cdb8){var _0xcc7f0c=function(_0x3c0ca2){while(--_0x3c0ca2){_0x5dca17['push'](_0x5dca17['shift']());}};_0xcc7f0c(++_0x43cdb8);}(_0xa264,0x148));var _0x4a26=function(_0x411017,_0x4a8117){_0x411017=_0x411017-0x0;var _0x2adeea=_0xa264[_0x411017];return _0x2adeea;};'use strict';var MailQueueEvents=require(_0x4a26('0x0'));var events=['save',_0x4a26('0x1'),_0x4a26('0x2')];function createListener(_0x411121,_0x1946e7){return function(_0x2cfc52){_0x1946e7[_0x4a26('0x3')](_0x411121,_0x2cfc52);};}function removeListener(_0x511409,_0x9084fe){return function(){MailQueueEvents[_0x4a26('0x4')](_0x511409,_0x9084fe);};}exports[_0x4a26('0x5')]=function(_0x449d3d){for(var _0x204ec0=0x0,_0x38f0dd=events[_0x4a26('0x6')];_0x204ec0<_0x38f0dd;_0x204ec0++){var _0x5f3886=events[_0x204ec0];var _0x6c431b=createListener('mailQueue:'+_0x5f3886,_0x449d3d);MailQueueEvents['on'](_0x5f3886,_0x6c431b);}};
\ No newline at end of file
+var _0x3dde=['mailQueue:','save','remove','update','removeListener','length'];(function(_0x10b94c,_0x2d4010){var _0x3d845d=function(_0x59c9d9){while(--_0x59c9d9){_0x10b94c['push'](_0x10b94c['shift']());}};_0x3d845d(++_0x2d4010);}(_0x3dde,0x14b));var _0xe3dd=function(_0x59ecd1,_0x4dc7dd){_0x59ecd1=_0x59ecd1-0x0;var _0x266580=_0x3dde[_0x59ecd1];return _0x266580;};'use strict';var MailQueueEvents=require('./mailQueue.events');var events=[_0xe3dd('0x0'),_0xe3dd('0x1'),_0xe3dd('0x2')];function createListener(_0x105845,_0x20c008){return function(_0x4c67a5){_0x20c008['emit'](_0x105845,_0x4c67a5);};}function removeListener(_0x424e52,_0x18678e){return function(){MailQueueEvents[_0xe3dd('0x3')](_0x424e52,_0x18678e);};}exports['register']=function(_0x1e3b98){for(var _0x46b52e=0x0,_0x118b65=events[_0xe3dd('0x4')];_0x46b52e<_0x118b65;_0x46b52e++){var _0x47993f=events[_0x46b52e];var _0x4b90fb=createListener(_0xe3dd('0x5')+_0x47993f,_0x1e3b98);MailQueueEvents['on'](_0x47993f,_0x4b90fb);}};
\ No newline at end of file
index 476f8d6..30f77ce 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xea1d=['isAuthenticated','index','/describe','describe','/:id','show','post','put','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get'];(function(_0x49f916,_0x3819ed){var _0x1bdaa5=function(_0x5c265c){while(--_0x5c265c){_0x49f916['push'](_0x49f916['shift']());}};_0x1bdaa5(++_0x3819ed);}(_0xea1d,0x90));var _0xdea1=function(_0x31647c,_0x42fb69){_0x31647c=_0x31647c-0x0;var _0x5a30dd=_0xea1d[_0x31647c];return _0x5a30dd;};'use strict';var multer=require(_0xdea1('0x0'));var util=require(_0xdea1('0x1'));var path=require(_0xdea1('0x2'));var timeout=require(_0xdea1('0x3'));var express=require('express');var router=express[_0xdea1('0x4')]();var fs_extra=require(_0xdea1('0x5'));var auth=require(_0xdea1('0x6'));var interaction=require(_0xdea1('0x7'));var config=require(_0xdea1('0x8'));var controller=require('./mailQueueReport.controller');router[_0xdea1('0x9')]('/',auth[_0xdea1('0xa')](),controller[_0xdea1('0xb')]);router[_0xdea1('0x9')](_0xdea1('0xc'),auth[_0xdea1('0xa')](),controller[_0xdea1('0xd')]);router[_0xdea1('0x9')](_0xdea1('0xe'),auth[_0xdea1('0xa')](),controller[_0xdea1('0xf')]);router[_0xdea1('0x10')]('/',auth['isAuthenticated'](),controller['create']);router[_0xdea1('0x11')](_0xdea1('0xe'),auth['isAuthenticated'](),controller[_0xdea1('0x12')]);router[_0xdea1('0x13')]('/:id',auth['isAuthenticated'](),controller[_0xdea1('0x14')]);module[_0xdea1('0x15')]=router;
\ No newline at end of file
+var _0x1363=['put','update','delete','destroy','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../config/environment','./mailQueueReport.controller','get','isAuthenticated','index','/describe','describe','/:id','show','post'];(function(_0x2bf999,_0x4645b1){var _0x4cf8f8=function(_0x5a4cf8){while(--_0x5a4cf8){_0x2bf999['push'](_0x2bf999['shift']());}};_0x4cf8f8(++_0x4645b1);}(_0x1363,0x73));var _0x3136=function(_0x363c59,_0x4a8ce6){_0x363c59=_0x363c59-0x0;var _0x3efb44=_0x1363[_0x363c59];return _0x3efb44;};'use strict';var multer=require(_0x3136('0x0'));var util=require(_0x3136('0x1'));var path=require(_0x3136('0x2'));var timeout=require('connect-timeout');var express=require(_0x3136('0x3'));var router=express[_0x3136('0x4')]();var fs_extra=require(_0x3136('0x5'));var auth=require(_0x3136('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x3136('0x7'));var controller=require(_0x3136('0x8'));router[_0x3136('0x9')]('/',auth[_0x3136('0xa')](),controller[_0x3136('0xb')]);router[_0x3136('0x9')](_0x3136('0xc'),auth[_0x3136('0xa')](),controller[_0x3136('0xd')]);router[_0x3136('0x9')](_0x3136('0xe'),auth[_0x3136('0xa')](),controller[_0x3136('0xf')]);router[_0x3136('0x10')]('/',auth['isAuthenticated'](),controller['create']);router[_0x3136('0x11')]('/:id',auth['isAuthenticated'](),controller[_0x3136('0x12')]);router[_0x3136('0x13')]('/:id',auth[_0x3136('0xa')](),controller[_0x3136('0x14')]);module[_0x3136('0x15')]=router;
\ No newline at end of file
index 7c2ca74..7b46b88 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3561=['moment','exports','STRING','DATE'];(function(_0x20183c,_0x3789a8){var _0xb1c1f2=function(_0x21a6e2){while(--_0x21a6e2){_0x20183c['push'](_0x20183c['shift']());}};_0xb1c1f2(++_0x3789a8);}(_0x3561,0x94));var _0x1356=function(_0x198d00,_0x392f9c){_0x198d00=_0x198d00-0x0;var _0x66c697=_0x3561[_0x198d00];return _0x66c697;};'use strict';var moment=require(_0x1356('0x0'));var Sequelize=require('sequelize');module[_0x1356('0x1')]={'uniqueid':{'type':Sequelize[_0x1356('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0x1356('0x2')]},'joinAt':{'type':Sequelize[_0x1356('0x3')]},'leaveAt':{'type':Sequelize[_0x1356('0x3')]},'acceptAt':{'type':Sequelize[_0x1356('0x3')]},'exitAt':{'type':Sequelize[_0x1356('0x3')]},'reason':{'type':Sequelize[_0x1356('0x2')]}};
\ No newline at end of file
+var _0x56a6=['sequelize','exports','STRING','DATE','moment'];(function(_0x5839db,_0x501c84){var _0x4a0a4f=function(_0x485366){while(--_0x485366){_0x5839db['push'](_0x5839db['shift']());}};_0x4a0a4f(++_0x501c84);}(_0x56a6,0x17b));var _0x656a=function(_0x111aa4,_0xf6c801){_0x111aa4=_0x111aa4-0x0;var _0x431e18=_0x56a6[_0x111aa4];return _0x431e18;};'use strict';var moment=require(_0x656a('0x0'));var Sequelize=require(_0x656a('0x1'));module[_0x656a('0x2')]={'uniqueid':{'type':Sequelize[_0x656a('0x3')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0x656a('0x4')]},'acceptAt':{'type':Sequelize[_0x656a('0x4')]},'exitAt':{'type':Sequelize[_0x656a('0x4')]},'reason':{'type':Sequelize['STRING']}};
\ No newline at end of file
index 03b6793..cd582f5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a54=['set','Content-Range','reject','save','update','then','destroy','error','stack','name','send','index','MailQueueReport','fieldName','type','model','map','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','includeAll','include','findAll','rows','show','params','length','merge','options','find','catch','body','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'];(function(_0x41d902,_0x29d0b){var _0x360fb1=function(_0x2517ae){while(--_0x2517ae){_0x41d902['push'](_0x41d902['shift']());}};_0x360fb1(++_0x29d0b);}(_0x7a54,0x106));var _0x47a5=function(_0x42a249,_0x4d4375){_0x42a249=_0x42a249-0x0;var _0x19dbd5=_0x7a54[_0x42a249];return _0x19dbd5;};'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['MailQueueReport'][_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['MailQueueReport']['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['MailQueueReport']['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('0x2a')][_0x47a5('0x45')]({'where':{'id':_0x2dd1db[_0x47a5('0x41')]['id']}})[_0x47a5('0x23')](handleEntityNotFound(_0x411230,null))[_0x47a5('0x23')](removeEntity(_0x411230,null))['catch'](handleError(_0x411230,null));};exports[_0x47a5('0x48')]=function(_0x1c9a62,_0x5f6a){return db['MailQueueReport'][_0x47a5('0x48')]()['then'](respondWithResult(_0x5f6a,null))[_0x47a5('0x46')](handleError(_0x5f6a,null));};
\ No newline at end of file
+var _0x7b84=['sendStatus','status','end','json','offset','undefined','count','Content-Range','reject','save','then','destroy','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','limit','where','pick','merge','VIRTUAL','filter','MailQueueReport','includeAll','findAll','rows','catch','show','params','include','options','create','body','update','find','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','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'];(function(_0x39153c,_0x293109){var _0x246bac=function(_0xe01010){while(--_0xe01010){_0x39153c['push'](_0x39153c['shift']());}};_0x246bac(++_0x293109);}(_0x7b84,0x17c));var _0x47b8=function(_0x23dd2a,_0x4dcc42){_0x23dd2a=_0x23dd2a-0x0;var _0x5752c1=_0x7b84[_0x23dd2a];return _0x5752c1;};'use strict';var emlformat=require(_0x47b8('0x0'));var rimraf=require(_0x47b8('0x1'));var zipdir=require(_0x47b8('0x2'));var jsonpatch=require(_0x47b8('0x3'));var rp=require(_0x47b8('0x4'));var moment=require(_0x47b8('0x5'));var BPromise=require(_0x47b8('0x6'));var Mustache=require('mustache');var util=require(_0x47b8('0x7'));var path=require(_0x47b8('0x8'));var sox=require(_0x47b8('0x9'));var csv=require(_0x47b8('0xa'));var ejs=require(_0x47b8('0xb'));var fs=require('fs');var fs_extra=require(_0x47b8('0xc'));var _=require('lodash');var squel=require(_0x47b8('0xd'));var crypto=require(_0x47b8('0xe'));var jsforce=require(_0x47b8('0xf'));var deskjs=require(_0x47b8('0x10'));var toCsv=require(_0x47b8('0xa'));var querystring=require(_0x47b8('0x11'));var Papa=require(_0x47b8('0x12'));var Redis=require(_0x47b8('0x13'));var authService=require(_0x47b8('0x14'));var qs=require(_0x47b8('0x15'));var as=require(_0x47b8('0x16'));var hardwareService=require(_0x47b8('0x17'));var logger=require(_0x47b8('0x18'))(_0x47b8('0x19'));var utils=require(_0x47b8('0x1a'));var config=require(_0x47b8('0x1b'));var licenseUtil=require(_0x47b8('0x1c'));var db=require(_0x47b8('0x1d'))['db'];function respondWithStatusCode(_0x25a224,_0x289ac7){_0x289ac7=_0x289ac7||0xcc;return function(_0x1edb4b){if(_0x1edb4b){return _0x25a224[_0x47b8('0x1e')](_0x289ac7);}return _0x25a224[_0x47b8('0x1f')](_0x289ac7)[_0x47b8('0x20')]();};}function respondWithResult(_0x173015,_0x223121){_0x223121=_0x223121||0xc8;return function(_0xf66dd6){if(_0xf66dd6){return _0x173015['status'](_0x223121)[_0x47b8('0x21')](_0xf66dd6);}};}function respondWithFilteredResult(_0x340da0,_0x3e760a){return function(_0x1217a4){if(_0x1217a4){var _0x34d5a5=typeof _0x3e760a[_0x47b8('0x22')]===_0x47b8('0x23')&&typeof _0x3e760a['limit']===_0x47b8('0x23');var _0x5c2b2c=_0x1217a4['count'];var _0x4f7317=_0x34d5a5?0x0:_0x3e760a[_0x47b8('0x22')];var _0x36faf1=_0x34d5a5?_0x1217a4[_0x47b8('0x24')]:_0x3e760a['offset']+_0x3e760a['limit'];var _0x4f6716;if(_0x36faf1>=_0x5c2b2c){_0x36faf1=_0x5c2b2c;_0x4f6716=0xc8;}else{_0x4f6716=0xce;}_0x340da0[_0x47b8('0x1f')](_0x4f6716);return _0x340da0['set'](_0x47b8('0x25'),_0x4f7317+'-'+_0x36faf1+'/'+_0x5c2b2c)[_0x47b8('0x21')](_0x1217a4);}return null;};}function patchUpdates(_0x303f19){return function(_0xfccf56){try{jsonpatch['apply'](_0xfccf56,_0x303f19,!![]);}catch(_0xc20df1){return BPromise[_0x47b8('0x26')](_0xc20df1);}return _0xfccf56[_0x47b8('0x27')]();};}function saveUpdates(_0x2f75d2,_0x168cde){return function(_0x232708){if(_0x232708){return _0x232708['update'](_0x2f75d2)[_0x47b8('0x28')](function(_0x2a22e3){return _0x2a22e3;});}return null;};}function removeEntity(_0x5301f8,_0x22e7dd){return function(_0x247429){if(_0x247429){return _0x247429[_0x47b8('0x29')]()[_0x47b8('0x28')](function(){_0x5301f8['status'](0xcc)[_0x47b8('0x20')]();});}};}function handleEntityNotFound(_0x332c23,_0x319d17){return function(_0x3e3de0){if(!_0x3e3de0){_0x332c23[_0x47b8('0x1e')](0x194);}return _0x3e3de0;};}function handleError(_0xbf5ce9,_0x40918f){_0x40918f=_0x40918f||0x1f4;return function(_0x568c1e){logger[_0x47b8('0x2a')](_0x568c1e[_0x47b8('0x2b')]);if(_0x568c1e['name']){delete _0x568c1e[_0x47b8('0x2c')];}_0xbf5ce9[_0x47b8('0x1f')](_0x40918f)[_0x47b8('0x2d')](_0x568c1e);};}exports[_0x47b8('0x2e')]=function(_0x4da0e0,_0x162d96){var _0x5c347f={},_0x2c89fc={},_0x2255ab={'count':0x0,'rows':[]};var _0x33e653=_[_0x47b8('0x2f')](db['MailQueueReport'][_0x47b8('0x30')],function(_0x264dd9){return{'name':_0x264dd9[_0x47b8('0x31')],'type':_0x264dd9[_0x47b8('0x32')][_0x47b8('0x33')]};});_0x2c89fc[_0x47b8('0x34')]=_['map'](_0x33e653,'name');_0x2c89fc['query']=_[_0x47b8('0x35')](_0x4da0e0[_0x47b8('0x36')]);_0x2c89fc[_0x47b8('0x37')]=_['intersection'](_0x2c89fc['model'],_0x2c89fc['query']);_0x5c347f['attributes']=_[_0x47b8('0x38')](_0x2c89fc[_0x47b8('0x34')],qs[_0x47b8('0x39')](_0x4da0e0[_0x47b8('0x36')][_0x47b8('0x39')]));_0x5c347f[_0x47b8('0x3a')]=_0x5c347f[_0x47b8('0x3a')][_0x47b8('0x3b')]?_0x5c347f[_0x47b8('0x3a')]:_0x2c89fc['model'];if(!_0x4da0e0['query'][_0x47b8('0x3c')](_0x47b8('0x3d'))){_0x5c347f['limit']=qs['limit'](_0x4da0e0[_0x47b8('0x36')][_0x47b8('0x3e')]);_0x5c347f[_0x47b8('0x22')]=qs['offset'](_0x4da0e0[_0x47b8('0x36')][_0x47b8('0x22')]);}_0x5c347f['order']=qs['sort'](_0x4da0e0['query']['sort']);_0x5c347f[_0x47b8('0x3f')]=qs[_0x47b8('0x37')](_[_0x47b8('0x40')](_0x4da0e0[_0x47b8('0x36')],_0x2c89fc[_0x47b8('0x37')]),_0x33e653);if(_0x4da0e0[_0x47b8('0x36')]['filter']){_0x5c347f['where']=_[_0x47b8('0x41')](_0x5c347f[_0x47b8('0x3f')],{'$or':_[_0x47b8('0x2f')](_0x33e653,function(_0x4a9ed6){if(_0x4a9ed6['type']!==_0x47b8('0x42')){var _0x2c89bc={};_0x2c89bc[_0x4a9ed6['name']]={'$like':'%'+_0x4da0e0[_0x47b8('0x36')][_0x47b8('0x43')]+'%'};return _0x2c89bc;}})});}_0x5c347f=_['merge']({},_0x5c347f,_0x4da0e0['options']);var _0x493b69={'where':_0x5c347f['where']};return db[_0x47b8('0x44')][_0x47b8('0x24')](_0x493b69)[_0x47b8('0x28')](function(_0x28cf2c){_0x2255ab[_0x47b8('0x24')]=_0x28cf2c;if(_0x4da0e0['query'][_0x47b8('0x45')]){_0x5c347f['include']=[{'all':!![]}];}return db[_0x47b8('0x44')][_0x47b8('0x46')](_0x5c347f);})[_0x47b8('0x28')](function(_0x5bede8){_0x2255ab[_0x47b8('0x47')]=_0x5bede8;return _0x2255ab;})[_0x47b8('0x28')](respondWithFilteredResult(_0x162d96,_0x5c347f))[_0x47b8('0x48')](handleError(_0x162d96,null));};exports[_0x47b8('0x49')]=function(_0x3eaf01,_0x15b9a1){var _0x2d2971={'raw':!![],'where':{'id':_0x3eaf01[_0x47b8('0x4a')]['id']}},_0x569d29={};_0x569d29['model']=_[_0x47b8('0x35')](db[_0x47b8('0x44')][_0x47b8('0x30')]);_0x569d29[_0x47b8('0x36')]=_[_0x47b8('0x35')](_0x3eaf01[_0x47b8('0x36')]);_0x569d29['filters']=_['intersection'](_0x569d29[_0x47b8('0x34')],_0x569d29[_0x47b8('0x36')]);_0x2d2971[_0x47b8('0x3a')]=_['intersection'](_0x569d29[_0x47b8('0x34')],qs['fields'](_0x3eaf01[_0x47b8('0x36')][_0x47b8('0x39')]));_0x2d2971[_0x47b8('0x3a')]=_0x2d2971[_0x47b8('0x3a')][_0x47b8('0x3b')]?_0x2d2971['attributes']:_0x569d29[_0x47b8('0x34')];if(_0x3eaf01[_0x47b8('0x36')][_0x47b8('0x45')]){_0x2d2971[_0x47b8('0x4b')]=[{'all':!![]}];}_0x2d2971=_[_0x47b8('0x41')]({},_0x2d2971,_0x3eaf01[_0x47b8('0x4c')]);return db[_0x47b8('0x44')]['find'](_0x2d2971)[_0x47b8('0x28')](handleEntityNotFound(_0x15b9a1,null))['then'](respondWithResult(_0x15b9a1,null))[_0x47b8('0x48')](handleError(_0x15b9a1,null));};exports[_0x47b8('0x4d')]=function(_0x4a46eb,_0x132e9a){return db[_0x47b8('0x44')][_0x47b8('0x4d')](_0x4a46eb[_0x47b8('0x4e')],{})[_0x47b8('0x28')](respondWithResult(_0x132e9a,0xc9))[_0x47b8('0x48')](handleError(_0x132e9a,null));};exports[_0x47b8('0x4f')]=function(_0x381d3a,_0x4ad8a8){if(_0x381d3a[_0x47b8('0x4e')]['id']){delete _0x381d3a[_0x47b8('0x4e')]['id'];}return db[_0x47b8('0x44')]['find']({'where':{'id':_0x381d3a[_0x47b8('0x4a')]['id']}})[_0x47b8('0x28')](handleEntityNotFound(_0x4ad8a8,null))[_0x47b8('0x28')](saveUpdates(_0x381d3a[_0x47b8('0x4e')],null))['then'](respondWithResult(_0x4ad8a8,null))[_0x47b8('0x48')](handleError(_0x4ad8a8,null));};exports[_0x47b8('0x29')]=function(_0x51ac62,_0x270054){return db[_0x47b8('0x44')][_0x47b8('0x50')]({'where':{'id':_0x51ac62['params']['id']}})[_0x47b8('0x28')](handleEntityNotFound(_0x270054,null))['then'](removeEntity(_0x270054,null))[_0x47b8('0x48')](handleError(_0x270054,null));};exports['describe']=function(_0x2a03c2,_0x498512){return db[_0x47b8('0x44')][_0x47b8('0x51')]()[_0x47b8('0x28')](respondWithResult(_0x498512,null))[_0x47b8('0x48')](handleError(_0x498512,null));};
\ No newline at end of file
index ff00bf1..2a96dfd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa875=['MailQueueReport','uniqueid','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./mailQueueReport.attributes','exports'];(function(_0xd55a05,_0x2a2030){var _0x1e7679=function(_0x48a93a){while(--_0x48a93a){_0xd55a05['push'](_0xd55a05['shift']());}};_0x1e7679(++_0x2a2030);}(_0xa875,0x176));var _0x5a87=function(_0x26fc81,_0x57fc19){_0x26fc81=_0x26fc81-0x0;var _0x9feece=_0xa875[_0x26fc81];return _0x9feece;};'use strict';var _=require('lodash');var util=require(_0x5a87('0x0'));var logger=require(_0x5a87('0x1'))(_0x5a87('0x2'));var moment=require(_0x5a87('0x3'));var BPromise=require(_0x5a87('0x4'));var rp=require(_0x5a87('0x5'));var fs=require('fs');var path=require(_0x5a87('0x6'));var rimraf=require(_0x5a87('0x7'));var config=require('../../config/environment');var attributes=require(_0x5a87('0x8'));module[_0x5a87('0x9')]=function(_0x1707cc,_0x42fe59){return _0x1707cc['define'](_0x5a87('0xa'),attributes,{'tableName':'report_mail_queue','paranoid':![],'indexes':[{'name':_0x5a87('0xb'),'fields':[_0x5a87('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x404f=['util','../../config/logger','bluebird','request-promise','rimraf','../../config/environment','define','MailQueueReport','report_mail_queue','uniqueid','lodash'];(function(_0xec92ff,_0x6ff1f4){var _0x17fea7=function(_0x75e36d){while(--_0x75e36d){_0xec92ff['push'](_0xec92ff['shift']());}};_0x17fea7(++_0x6ff1f4);}(_0x404f,0x83));var _0xf404=function(_0x27439a,_0x197db5){_0x27439a=_0x27439a-0x0;var _0x5c6b9a=_0x404f[_0x27439a];return _0x5c6b9a;};'use strict';var _=require(_0xf404('0x0'));var util=require(_0xf404('0x1'));var logger=require(_0xf404('0x2'))('api');var moment=require('moment');var BPromise=require(_0xf404('0x3'));var rp=require(_0xf404('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xf404('0x5'));var config=require(_0xf404('0x6'));var attributes=require('./mailQueueReport.attributes');module['exports']=function(_0x2ae313,_0x484b58){return _0x2ae313[_0xf404('0x7')](_0xf404('0x8'),attributes,{'tableName':_0xf404('0x9'),'paranoid':![],'indexes':[{'name':_0xf404('0xa'),'fields':[_0xf404('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
index bde7ed3..6cb0f14 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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(_0x4e6c17,_0x34f0e5){var _0x539f2e=function(_0x2ff44a){while(--_0x2ff44a){_0x4e6c17['push'](_0x4e6c17['shift']());}};_0x539f2e(++_0x34f0e5);}(_0x7a54,0x106));var _0x47a5=function(_0x13ae75,_0x323376){_0x13ae75=_0x13ae75-0x0;var _0x350ef6=_0x7a54[_0x13ae75];return _0x350ef6;};'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
+var _0xdb28=['UpdateMailQueueReport','MailQueueReport','update','raw','where','limit','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','then','MailQueueReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','catch','CreateMailQueueReport','create','body','options'];(function(_0x260e07,_0x2dd0e4){var _0x28ba4e=function(_0x237146){while(--_0x237146){_0x260e07['push'](_0x260e07['shift']());}};_0x28ba4e(++_0x2dd0e4);}(_0xdb28,0x106));var _0x8db2=function(_0xc3cff6,_0x22ec28){_0xc3cff6=_0xc3cff6-0x0;var _0xfec03f=_0xdb28[_0xc3cff6];return _0xfec03f;};'use strict';var _=require(_0x8db2('0x0'));var util=require(_0x8db2('0x1'));var moment=require(_0x8db2('0x2'));var BPromise=require(_0x8db2('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8db2('0x4'));var db=require(_0x8db2('0x5'))['db'];var utils=require(_0x8db2('0x6'));var logger=require(_0x8db2('0x7'))(_0x8db2('0x8'));var config=require('../../config/environment');var jayson=require(_0x8db2('0x9'));var client=jayson[_0x8db2('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x494b40,_0x477f50,_0x46932f){return new BPromise(function(_0x131537,_0x29f698){return client[_0x8db2('0xb')](_0x494b40,_0x46932f)[_0x8db2('0xc')](function(_0x126c78){logger['info'](_0x8db2('0xd'),_0x477f50,_0x8db2('0xe'));logger[_0x8db2('0xf')]('MailQueueReport,\x20%s,\x20%s,\x20%s',_0x477f50,_0x8db2('0xe'),JSON[_0x8db2('0x10')](_0x126c78));if(_0x126c78['error']){if(_0x126c78[_0x8db2('0x11')][_0x8db2('0x12')]===0x1f4){logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x126c78[_0x8db2('0x11')]['message']);return _0x29f698(_0x126c78['error'][_0x8db2('0x13')]);}logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x126c78[_0x8db2('0x11')][_0x8db2('0x13')]);return _0x131537(_0x126c78[_0x8db2('0x11')][_0x8db2('0x13')]);}else{logger[_0x8db2('0x14')](_0x8db2('0xd'),_0x477f50,_0x8db2('0xe'));_0x131537(_0x126c78['result'][_0x8db2('0x13')]);}})[_0x8db2('0x15')](function(_0x48101e){logger[_0x8db2('0x11')](_0x8db2('0xd'),_0x477f50,_0x48101e);_0x29f698(_0x48101e);});});}exports[_0x8db2('0x16')]=function(_0x3fddc2){var _0x2efd06=this;return new Promise(function(_0x46ce14,_0x51d60d){return db['MailQueueReport'][_0x8db2('0x17')](_0x3fddc2[_0x8db2('0x18')],{'raw':_0x3fddc2[_0x8db2('0x19')]?_0x3fddc2[_0x8db2('0x19')]['raw']===undefined?!![]:![]:!![]})[_0x8db2('0xc')](function(_0x36a9ff){logger[_0x8db2('0x14')](_0x8db2('0x16'),_0x3fddc2);logger[_0x8db2('0xf')]('CreateMailQueueReport',_0x3fddc2,JSON[_0x8db2('0x10')](_0x36a9ff));_0x46ce14(_0x36a9ff);})[_0x8db2('0x15')](function(_0x18f69c){logger[_0x8db2('0x11')](_0x8db2('0x16'),_0x18f69c[_0x8db2('0x13')],_0x3fddc2);_0x51d60d(_0x2efd06[_0x8db2('0x11')](0x1f4,_0x18f69c['message']));});});};exports[_0x8db2('0x1a')]=function(_0x4f6516){var _0x5725f0=this;return new Promise(function(_0x52a9ca,_0x4d923c){return db[_0x8db2('0x1b')][_0x8db2('0x1c')](_0x4f6516[_0x8db2('0x18')],{'raw':_0x4f6516[_0x8db2('0x19')]?_0x4f6516[_0x8db2('0x19')][_0x8db2('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4f6516['options']?_0x4f6516[_0x8db2('0x19')][_0x8db2('0x1e')]||null:null,'attributes':_0x4f6516[_0x8db2('0x19')]?_0x4f6516[_0x8db2('0x19')]['attributes']||null:null,'limit':_0x4f6516[_0x8db2('0x19')]?_0x4f6516[_0x8db2('0x19')][_0x8db2('0x1f')]||null:null})[_0x8db2('0xc')](function(_0xbe5ece){logger[_0x8db2('0x14')](_0x8db2('0x1a'),_0x4f6516);logger[_0x8db2('0xf')](_0x8db2('0x1a'),_0x4f6516,JSON['stringify'](_0xbe5ece));_0x52a9ca(_0xbe5ece);})[_0x8db2('0x15')](function(_0x50b28d){logger['error'](_0x8db2('0x1a'),_0x50b28d[_0x8db2('0x13')],_0x4f6516);_0x4d923c(_0x5725f0[_0x8db2('0x11')](0x1f4,_0x50b28d['message']));});});};
\ No newline at end of file
index 2b40596..e08523d 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(_0x435411,_0x6c15bf){var _0x1d207e=function(_0x1b8da4){while(--_0x1b8da4){_0x435411['push'](_0x435411['shift']());}};_0x1d207e(++_0x6c15bf);}(_0xd8b0,0xad));var _0x0d8b=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xd8b0[_0xa464c9];return _0x3d73c4;};'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 _0xcb91=['express','Router','../../components/auth/service','../../components/interaction/service','exports','path','connect-timeout'];(function(_0x344b89,_0x2b3fbd){var _0xbfff34=function(_0x42cb7c){while(--_0x42cb7c){_0x344b89['push'](_0x344b89['shift']());}};_0xbfff34(++_0x2b3fbd);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x2caaef,_0x3c19ed){_0x2caaef=_0x2caaef-0x0;var _0xd011f8=_0xcb91[_0x2caaef];return _0xd011f8;};'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 c2edf03..9f198ba 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6a02=['BOOLEAN','INTEGER','INBOX','sequelize','STRING'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x6a02,0x99));var _0x26a0=function(_0x2cf048,_0x5eb0e5){_0x2cf048=_0x2cf048-0x0;var _0x20d612=_0x6a02[_0x2cf048];return _0x20d612;};'use strict';var Sequelize=require(_0x26a0('0x0'));module['exports']={'description':{'type':Sequelize['STRING']},'host':{'type':Sequelize[_0x26a0('0x1')]},'authentication':{'type':Sequelize[_0x26a0('0x2')],'defaultValue':!![]},'user':{'type':Sequelize[_0x26a0('0x1')]},'password':{'type':Sequelize[_0x26a0('0x1')]},'port':{'type':Sequelize[_0x26a0('0x3')]},'tls':{'type':Sequelize[_0x26a0('0x2')],'defaultValue':!![]},'mailbox':{'type':Sequelize[_0x26a0('0x1')],'defaultValue':_0x26a0('0x4')},'connTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0xa},'authTimeout':{'type':Sequelize[_0x26a0('0x3')],'defaultValue':0x5},'service':{'type':Sequelize[_0x26a0('0x1')]},'modernAuthentication':{'type':Sequelize[_0x26a0('0x2')],'defaultValue':![]}};
\ No newline at end of file
+var _0xb8b2=['sequelize','exports','STRING','BOOLEAN','INTEGER','INBOX'];(function(_0x690a67,_0x28cc0d){var _0x509bb6=function(_0x59eadd){while(--_0x59eadd){_0x690a67['push'](_0x690a67['shift']());}};_0x509bb6(++_0x28cc0d);}(_0xb8b2,0x162));var _0x2b8b=function(_0x3b5250,_0x7a0b2c){_0x3b5250=_0x3b5250-0x0;var _0xc844a1=_0xb8b2[_0x3b5250];return _0xc844a1;};'use strict';var Sequelize=require(_0x2b8b('0x0'));module[_0x2b8b('0x1')]={'description':{'type':Sequelize[_0x2b8b('0x2')]},'host':{'type':Sequelize[_0x2b8b('0x2')]},'authentication':{'type':Sequelize[_0x2b8b('0x3')],'defaultValue':!![]},'user':{'type':Sequelize['STRING']},'password':{'type':Sequelize[_0x2b8b('0x2')]},'port':{'type':Sequelize[_0x2b8b('0x4')]},'tls':{'type':Sequelize[_0x2b8b('0x3')],'defaultValue':!![]},'mailbox':{'type':Sequelize[_0x2b8b('0x2')],'defaultValue':_0x2b8b('0x5')},'connTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0xa},'authTimeout':{'type':Sequelize[_0x2b8b('0x4')],'defaultValue':0x5},'service':{'type':Sequelize[_0x2b8b('0x2')]},'modernAuthentication':{'type':Sequelize[_0x2b8b('0x3')],'defaultValue':![]}};
\ No newline at end of file
index cc74b12..cf6586c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeff3=['./mailServerIn.attributes','exports','define','MailServerIn','mail_servers_in','lodash','../../config/logger','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x14cfa9,_0x2a805f){var _0x32be38=function(_0x51860d){while(--_0x51860d){_0x14cfa9['push'](_0x14cfa9['shift']());}};_0x32be38(++_0x2a805f);}(_0xeff3,0xe9));var _0x3eff=function(_0x3124f8,_0x1a8b23){_0x3124f8=_0x3124f8-0x0;var _0x5bab5f=_0xeff3[_0x3124f8];return _0x5bab5f;};'use strict';var _=require(_0x3eff('0x0'));var util=require('util');var logger=require(_0x3eff('0x1'))('api');var moment=require('moment');var BPromise=require(_0x3eff('0x2'));var rp=require(_0x3eff('0x3'));var fs=require('fs');var path=require(_0x3eff('0x4'));var rimraf=require(_0x3eff('0x5'));var config=require(_0x3eff('0x6'));var attributes=require(_0x3eff('0x7'));module[_0x3eff('0x8')]=function(_0x390b5d,_0x1bd158){return _0x390b5d[_0x3eff('0x9')](_0x3eff('0xa'),attributes,{'tableName':_0x3eff('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xca65=['bluebird','request-promise','path','rimraf','../../config/environment','./mailServerIn.attributes','exports','define','MailServerIn','lodash','util','../../config/logger','api','moment'];(function(_0x18bbe0,_0x233092){var _0x33a85e=function(_0x451ece){while(--_0x451ece){_0x18bbe0['push'](_0x18bbe0['shift']());}};_0x33a85e(++_0x233092);}(_0xca65,0xcd));var _0x5ca6=function(_0x4bd40b,_0x259d78){_0x4bd40b=_0x4bd40b-0x0;var _0x4a2093=_0xca65[_0x4bd40b];return _0x4a2093;};'use strict';var _=require(_0x5ca6('0x0'));var util=require(_0x5ca6('0x1'));var logger=require(_0x5ca6('0x2'))(_0x5ca6('0x3'));var moment=require(_0x5ca6('0x4'));var BPromise=require(_0x5ca6('0x5'));var rp=require(_0x5ca6('0x6'));var fs=require('fs');var path=require(_0x5ca6('0x7'));var rimraf=require(_0x5ca6('0x8'));var config=require(_0x5ca6('0x9'));var attributes=require(_0x5ca6('0xa'));module[_0x5ca6('0xb')]=function(_0x41cf59,_0x50f7e0){return _0x41cf59[_0x5ca6('0xc')](_0x5ca6('0xd'),attributes,{'tableName':'mail_servers_in','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 26b85d4..d396664 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa6f0=['code','message','info','request\x20sent','result','GetMailServerIn','findAll','options','raw','where','attributes','limit','include','map','then','stringify','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','client','http','request','MailServerIn,\x20%s,\x20%s','debug','error'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0xa6f0,0xea));var _0x0a6f=function(_0x40cfb4,_0x15c502){_0x40cfb4=_0x40cfb4-0x0;var _0x339ad2=_0xa6f0[_0x40cfb4];return _0x339ad2;};'use strict';var _=require(_0x0a6f('0x0'));var util=require(_0x0a6f('0x1'));var moment=require(_0x0a6f('0x2'));var BPromise=require(_0x0a6f('0x3'));var rs=require(_0x0a6f('0x4'));var fs=require('fs');var Redis=require(_0x0a6f('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x0a6f('0x6'));var logger=require(_0x0a6f('0x7'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x0a6f('0x8')][_0x0a6f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x29bfc0,_0x4a5db0,_0x3269c9){return new BPromise(function(_0x7632be,_0x21e578){return client[_0x0a6f('0xa')](_0x29bfc0,_0x3269c9)['then'](function(_0x434512){logger['info'](_0x0a6f('0xb'),_0x4a5db0,'request\x20sent');logger[_0x0a6f('0xc')]('MailServerIn,\x20%s,\x20%s,\x20%s',_0x4a5db0,'request\x20sent',JSON['stringify'](_0x434512));if(_0x434512[_0x0a6f('0xd')]){if(_0x434512[_0x0a6f('0xd')][_0x0a6f('0xe')]===0x1f4){logger[_0x0a6f('0xd')](_0x0a6f('0xb'),_0x4a5db0,_0x434512['error'][_0x0a6f('0xf')]);return _0x21e578(_0x434512[_0x0a6f('0xd')]['message']);}logger['error'](_0x0a6f('0xb'),_0x4a5db0,_0x434512[_0x0a6f('0xd')][_0x0a6f('0xf')]);return _0x7632be(_0x434512[_0x0a6f('0xd')][_0x0a6f('0xf')]);}else{logger[_0x0a6f('0x10')]('MailServerIn,\x20%s,\x20%s',_0x4a5db0,_0x0a6f('0x11'));_0x7632be(_0x434512[_0x0a6f('0x12')][_0x0a6f('0xf')]);}})['catch'](function(_0x2edefd){logger[_0x0a6f('0xd')]('MailServerIn,\x20%s,\x20%s',_0x4a5db0,_0x2edefd);_0x21e578(_0x2edefd);});});}exports[_0x0a6f('0x13')]=function(_0x19fbff){var _0x3a5125=this;return new Promise(function(_0x539413,_0xb35e3a){return db['MailServerIn'][_0x0a6f('0x14')]({'raw':_0x19fbff['options']?_0x19fbff[_0x0a6f('0x15')][_0x0a6f('0x16')]===undefined?!![]:![]:!![],'where':_0x19fbff[_0x0a6f('0x15')]?_0x19fbff[_0x0a6f('0x15')][_0x0a6f('0x17')]||null:null,'attributes':_0x19fbff[_0x0a6f('0x15')]?_0x19fbff[_0x0a6f('0x15')][_0x0a6f('0x18')]||null:null,'limit':_0x19fbff[_0x0a6f('0x15')]?_0x19fbff[_0x0a6f('0x15')][_0x0a6f('0x19')]||null:null,'include':_0x19fbff['options']?_0x19fbff[_0x0a6f('0x15')][_0x0a6f('0x1a')]?_[_0x0a6f('0x1b')](_0x19fbff[_0x0a6f('0x15')][_0x0a6f('0x1a')],function(_0x5e4b61){return{'model':db[_0x5e4b61['model']],'as':_0x5e4b61['as'],'attributes':_0x5e4b61[_0x0a6f('0x18')],'include':_0x5e4b61[_0x0a6f('0x1a')]?_['map'](_0x5e4b61['include'],function(_0x109bb0){return{'model':db[_0x109bb0['model']],'as':_0x109bb0['as'],'attributes':_0x109bb0[_0x0a6f('0x18')],'include':_0x109bb0[_0x0a6f('0x1a')]?_[_0x0a6f('0x1b')](_0x109bb0[_0x0a6f('0x1a')],function(_0x183503){return{'model':db[_0x183503['model']],'as':_0x183503['as'],'attributes':_0x183503[_0x0a6f('0x18')]};}):[]};}):[]};}):[]:[]})[_0x0a6f('0x1c')](function(_0x5dcc2a){logger[_0x0a6f('0x10')](_0x0a6f('0x13'),_0x19fbff);logger[_0x0a6f('0xc')]('GetMailServerIn',_0x19fbff,JSON[_0x0a6f('0x1d')](_0x5dcc2a));_0x539413(_0x5dcc2a);})[_0x0a6f('0x1e')](function(_0x250bf1){logger[_0x0a6f('0xd')](_0x0a6f('0x13'),_0x250bf1[_0x0a6f('0xf')],_0x19fbff);_0xb35e3a(_0x3a5125['error'](0x1f4,_0x250bf1[_0x0a6f('0xf')]));});});};
\ No newline at end of file
+var _0x7aa0=['util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','MailServerIn,\x20%s,\x20%s','request\x20sent','MailServerIn,\x20%s,\x20%s,\x20%s','error','message','result','catch','GetMailServerIn','MailServerIn','findAll','options','raw','where','attributes','limit','include','map','model','stringify','lodash'];(function(_0x1b5aea,_0x3f04b7){var _0x15cfc6=function(_0x204e92){while(--_0x204e92){_0x1b5aea['push'](_0x1b5aea['shift']());}};_0x15cfc6(++_0x3f04b7);}(_0x7aa0,0x1b9));var _0x07aa=function(_0x57381e,_0x13d465){_0x57381e=_0x57381e-0x0;var _0x416c19=_0x7aa0[_0x57381e];return _0x416c19;};'use strict';var _=require(_0x07aa('0x0'));var util=require(_0x07aa('0x1'));var moment=require(_0x07aa('0x2'));var BPromise=require(_0x07aa('0x3'));var rs=require(_0x07aa('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x07aa('0x5'))['db'];var utils=require(_0x07aa('0x6'));var logger=require(_0x07aa('0x7'))(_0x07aa('0x8'));var config=require(_0x07aa('0x9'));var jayson=require(_0x07aa('0xa'));var client=jayson['client'][_0x07aa('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x113b21,_0x159618,_0x14f952){return new BPromise(function(_0x3ee606,_0xb4481b){return client[_0x07aa('0xc')](_0x113b21,_0x14f952)[_0x07aa('0xd')](function(_0x5e2813){logger[_0x07aa('0xe')](_0x07aa('0xf'),_0x159618,_0x07aa('0x10'));logger['debug'](_0x07aa('0x11'),_0x159618,_0x07aa('0x10'),JSON['stringify'](_0x5e2813));if(_0x5e2813['error']){if(_0x5e2813[_0x07aa('0x12')]['code']===0x1f4){logger[_0x07aa('0x12')](_0x07aa('0xf'),_0x159618,_0x5e2813['error'][_0x07aa('0x13')]);return _0xb4481b(_0x5e2813['error'][_0x07aa('0x13')]);}logger[_0x07aa('0x12')]('MailServerIn,\x20%s,\x20%s',_0x159618,_0x5e2813[_0x07aa('0x12')]['message']);return _0x3ee606(_0x5e2813['error'][_0x07aa('0x13')]);}else{logger[_0x07aa('0xe')](_0x07aa('0xf'),_0x159618,_0x07aa('0x10'));_0x3ee606(_0x5e2813[_0x07aa('0x14')]['message']);}})[_0x07aa('0x15')](function(_0x3d6704){logger[_0x07aa('0x12')](_0x07aa('0xf'),_0x159618,_0x3d6704);_0xb4481b(_0x3d6704);});});}exports[_0x07aa('0x16')]=function(_0x34a89f){var _0x51d51a=this;return new Promise(function(_0x228c1f,_0xdbbd95){return db[_0x07aa('0x17')][_0x07aa('0x18')]({'raw':_0x34a89f[_0x07aa('0x19')]?_0x34a89f[_0x07aa('0x19')][_0x07aa('0x1a')]===undefined?!![]:![]:!![],'where':_0x34a89f[_0x07aa('0x19')]?_0x34a89f[_0x07aa('0x19')][_0x07aa('0x1b')]||null:null,'attributes':_0x34a89f[_0x07aa('0x19')]?_0x34a89f[_0x07aa('0x19')][_0x07aa('0x1c')]||null:null,'limit':_0x34a89f['options']?_0x34a89f['options'][_0x07aa('0x1d')]||null:null,'include':_0x34a89f[_0x07aa('0x19')]?_0x34a89f[_0x07aa('0x19')][_0x07aa('0x1e')]?_[_0x07aa('0x1f')](_0x34a89f[_0x07aa('0x19')][_0x07aa('0x1e')],function(_0x5ed7fd){return{'model':db[_0x5ed7fd[_0x07aa('0x20')]],'as':_0x5ed7fd['as'],'attributes':_0x5ed7fd[_0x07aa('0x1c')],'include':_0x5ed7fd[_0x07aa('0x1e')]?_[_0x07aa('0x1f')](_0x5ed7fd['include'],function(_0x5175c8){return{'model':db[_0x5175c8['model']],'as':_0x5175c8['as'],'attributes':_0x5175c8['attributes'],'include':_0x5175c8[_0x07aa('0x1e')]?_[_0x07aa('0x1f')](_0x5175c8[_0x07aa('0x1e')],function(_0x412674){return{'model':db[_0x412674[_0x07aa('0x20')]],'as':_0x412674['as'],'attributes':_0x412674['attributes']};}):[]};}):[]};}):[]:[]})[_0x07aa('0xd')](function(_0x1f1db2){logger[_0x07aa('0xe')](_0x07aa('0x16'),_0x34a89f);logger['debug']('GetMailServerIn',_0x34a89f,JSON[_0x07aa('0x21')](_0x1f1db2));_0x228c1f(_0x1f1db2);})[_0x07aa('0x15')](function(_0x5712ed){logger['error'](_0x07aa('0x16'),_0x5712ed[_0x07aa('0x13')],_0x34a89f);_0xdbbd95(_0x51d51a[_0x07aa('0x12')](0x1f4,_0x5712ed[_0x07aa('0x13')]));});});};
\ No newline at end of file
index 2e4740f..f2324b6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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(_0x28fee9,_0x483ab2){_0x28fee9=_0x28fee9-0x0;var _0x3fb94a=_0x7a54[_0x28fee9];return _0x3fb94a;};'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
+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(_0xbb091,_0x3fe7ee){var _0x467a04=function(_0x3a978d){while(--_0x3a978d){_0xbb091['push'](_0xbb091['shift']());}};_0x467a04(++_0x3fe7ee);}(_0x7a54,0x106));var _0x47a5=function(_0x99b4ef,_0xeb8ce9){_0x99b4ef=_0x99b4ef-0x0;var _0x3eb27c=_0x7a54[_0x99b4ef];return _0x3eb27c;};'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 3e50cda..afbe4c4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x96cc=['sequelize','STRING','INTEGER','BOOLEAN'];(function(_0xe62388,_0x20a8dc){var _0x364a83=function(_0x3c3718){while(--_0x3c3718){_0xe62388['push'](_0xe62388['shift']());}};_0x364a83(++_0x20a8dc);}(_0x96cc,0x16c));var _0xc96c=function(_0x3b29b7,_0x31831e){_0x3b29b7=_0x3b29b7-0x0;var _0x2b2669=_0x96cc[_0x3b29b7];return _0x2b2669;};'use strict';var Sequelize=require(_0xc96c('0x0'));module['exports']={'description':{'type':Sequelize[_0xc96c('0x1')]},'host':{'type':Sequelize['STRING']},'user':{'type':Sequelize[_0xc96c('0x1')]},'pass':{'type':Sequelize[_0xc96c('0x1')]},'port':{'type':Sequelize[_0xc96c('0x2')]},'secure':{'type':Sequelize[_0xc96c('0x3')],'defaultValue':![]},'service':{'type':Sequelize[_0xc96c('0x1')]},'authentication':{'type':Sequelize[_0xc96c('0x3')],'defaultValue':!![]},'modernAuthentication':{'type':Sequelize[_0xc96c('0x3')],'defaultValue':![]}};
\ No newline at end of file
+var _0xa902=['BOOLEAN','sequelize','exports','STRING','INTEGER'];(function(_0xe7ccb5,_0x4908a9){var _0x5a2ca8=function(_0x54875f){while(--_0x54875f){_0xe7ccb5['push'](_0xe7ccb5['shift']());}};_0x5a2ca8(++_0x4908a9);}(_0xa902,0x8d));var _0x2a90=function(_0xe1b9c0,_0x37f2d3){_0xe1b9c0=_0xe1b9c0-0x0;var _0x27d7eb=_0xa902[_0xe1b9c0];return _0x27d7eb;};'use strict';var Sequelize=require(_0x2a90('0x0'));module[_0x2a90('0x1')]={'description':{'type':Sequelize[_0x2a90('0x2')]},'host':{'type':Sequelize[_0x2a90('0x2')]},'user':{'type':Sequelize[_0x2a90('0x2')]},'pass':{'type':Sequelize['STRING']},'port':{'type':Sequelize[_0x2a90('0x3')]},'secure':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'service':{'type':Sequelize['STRING']},'authentication':{'type':Sequelize[_0x2a90('0x4')],'defaultValue':!![]},'modernAuthentication':{'type':Sequelize[_0x2a90('0x4')],'defaultValue':![]}};
\ No newline at end of file
index 575c0ef..a828703 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1c33=['papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../mysqldb','sendStatus','status','end','json','undefined','count','offset','limit','set','Content-Range','reject','then','destroy','stack','name','send','index','map','rawAttributes','type','key','model','query','intersection','attributes','fields','length','order','sort','where','pick','filters','filter','merge','options','MailServerOut','includeAll','findAll','rows','show','keys','include','find','create','body','catch','update','params','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','ejs','fs-extra','squel','crypto','jsforce'];(function(_0x30e467,_0x48c36f){var _0x157c71=function(_0x59a326){while(--_0x59a326){_0x30e467['push'](_0x30e467['shift']());}};_0x157c71(++_0x48c36f);}(_0x1c33,0x1e9));var _0x31c3=function(_0x184a2d,_0x461b69){_0x184a2d=_0x184a2d-0x0;var _0x52d40f=_0x1c33[_0x184a2d];return _0x52d40f;};'use strict';var emlformat=require(_0x31c3('0x0'));var rimraf=require(_0x31c3('0x1'));var zipdir=require(_0x31c3('0x2'));var jsonpatch=require(_0x31c3('0x3'));var rp=require(_0x31c3('0x4'));var moment=require(_0x31c3('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x31c3('0x6'));var util=require(_0x31c3('0x7'));var path=require(_0x31c3('0x8'));var sox=require('sox');var csv=require(_0x31c3('0x9'));var ejs=require(_0x31c3('0xa'));var fs=require('fs');var fs_extra=require(_0x31c3('0xb'));var _=require('lodash');var squel=require(_0x31c3('0xc'));var crypto=require(_0x31c3('0xd'));var jsforce=require(_0x31c3('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x31c3('0x9'));var querystring=require('querystring');var Papa=require(_0x31c3('0xf'));var Redis=require(_0x31c3('0x10'));var authService=require(_0x31c3('0x11'));var qs=require(_0x31c3('0x12'));var as=require(_0x31c3('0x13'));var hardwareService=require(_0x31c3('0x14'));var logger=require('../../config/logger')(_0x31c3('0x15'));var utils=require('../../config/utils');var config=require(_0x31c3('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0x31c3('0x17'))['db'];function respondWithStatusCode(_0x528200,_0x3cd18f){_0x3cd18f=_0x3cd18f||0xcc;return function(_0x5331a6){if(_0x5331a6){return _0x528200[_0x31c3('0x18')](_0x3cd18f);}return _0x528200[_0x31c3('0x19')](_0x3cd18f)[_0x31c3('0x1a')]();};}function respondWithResult(_0x52076b,_0x2217a){_0x2217a=_0x2217a||0xc8;return function(_0x587ebd){if(_0x587ebd){return _0x52076b[_0x31c3('0x19')](_0x2217a)[_0x31c3('0x1b')](_0x587ebd);}};}function respondWithFilteredResult(_0x2e7291,_0x2afce3){return function(_0x4b37f9){if(_0x4b37f9){var _0xa53175=typeof _0x2afce3['offset']===_0x31c3('0x1c')&&typeof _0x2afce3['limit']===_0x31c3('0x1c');var _0x3c9f64=_0x4b37f9[_0x31c3('0x1d')];var _0x2b653b=_0xa53175?0x0:_0x2afce3[_0x31c3('0x1e')];var _0x9af21f=_0xa53175?_0x4b37f9[_0x31c3('0x1d')]:_0x2afce3[_0x31c3('0x1e')]+_0x2afce3[_0x31c3('0x1f')];var _0x54126e;if(_0x9af21f>=_0x3c9f64){_0x9af21f=_0x3c9f64;_0x54126e=0xc8;}else{_0x54126e=0xce;}_0x2e7291['status'](_0x54126e);return _0x2e7291[_0x31c3('0x20')](_0x31c3('0x21'),_0x2b653b+'-'+_0x9af21f+'/'+_0x3c9f64)['json'](_0x4b37f9);}return null;};}function patchUpdates(_0x31743b){return function(_0x4bba6d){try{jsonpatch['apply'](_0x4bba6d,_0x31743b,!![]);}catch(_0x8bcdf8){return BPromise[_0x31c3('0x22')](_0x8bcdf8);}return _0x4bba6d['save']();};}function saveUpdates(_0x5bd37b,_0x10bb31){return function(_0x704541){if(_0x704541){return _0x704541['update'](_0x5bd37b)[_0x31c3('0x23')](function(_0xf38645){return _0xf38645;});}return null;};}function removeEntity(_0x1b40fd,_0x1de9d2){return function(_0x9811b9){if(_0x9811b9){return _0x9811b9[_0x31c3('0x24')]()[_0x31c3('0x23')](function(){_0x1b40fd['status'](0xcc)[_0x31c3('0x1a')]();});}};}function handleEntityNotFound(_0x2e2bdd,_0x32ea7c){return function(_0x56ec36){if(!_0x56ec36){_0x2e2bdd[_0x31c3('0x18')](0x194);}return _0x56ec36;};}function handleError(_0x26be24,_0x2338db){_0x2338db=_0x2338db||0x1f4;return function(_0x5e3be4){logger['error'](_0x5e3be4[_0x31c3('0x25')]);if(_0x5e3be4[_0x31c3('0x26')]){delete _0x5e3be4[_0x31c3('0x26')];}_0x26be24['status'](_0x2338db)[_0x31c3('0x27')](_0x5e3be4);};}exports[_0x31c3('0x28')]=function(_0x12a531,_0x142e1b){var _0x1ea860={},_0x20a894={},_0xa22d99={'count':0x0,'rows':[]};var _0x267d44=_[_0x31c3('0x29')](db['MailServerOut'][_0x31c3('0x2a')],function(_0x73ec8f){return{'name':_0x73ec8f['fieldName'],'type':_0x73ec8f[_0x31c3('0x2b')][_0x31c3('0x2c')]};});_0x20a894[_0x31c3('0x2d')]=_['map'](_0x267d44,_0x31c3('0x26'));_0x20a894[_0x31c3('0x2e')]=_['keys'](_0x12a531[_0x31c3('0x2e')]);_0x20a894['filters']=_[_0x31c3('0x2f')](_0x20a894['model'],_0x20a894['query']);_0x1ea860[_0x31c3('0x30')]=_['intersection'](_0x20a894[_0x31c3('0x2d')],qs[_0x31c3('0x31')](_0x12a531[_0x31c3('0x2e')][_0x31c3('0x31')]));_0x1ea860['attributes']=_0x1ea860[_0x31c3('0x30')][_0x31c3('0x32')]?_0x1ea860[_0x31c3('0x30')]:_0x20a894[_0x31c3('0x2d')];if(!_0x12a531[_0x31c3('0x2e')]['hasOwnProperty']('nolimit')){_0x1ea860['limit']=qs[_0x31c3('0x1f')](_0x12a531[_0x31c3('0x2e')][_0x31c3('0x1f')]);_0x1ea860[_0x31c3('0x1e')]=qs[_0x31c3('0x1e')](_0x12a531[_0x31c3('0x2e')][_0x31c3('0x1e')]);}_0x1ea860[_0x31c3('0x33')]=qs[_0x31c3('0x34')](_0x12a531['query'][_0x31c3('0x34')]);_0x1ea860[_0x31c3('0x35')]=qs['filters'](_[_0x31c3('0x36')](_0x12a531[_0x31c3('0x2e')],_0x20a894[_0x31c3('0x37')]),_0x267d44);if(_0x12a531[_0x31c3('0x2e')][_0x31c3('0x38')]){_0x1ea860['where']=_[_0x31c3('0x39')](_0x1ea860[_0x31c3('0x35')],{'$or':_[_0x31c3('0x29')](_0x267d44,function(_0x2922f1){if(_0x2922f1[_0x31c3('0x2b')]!=='VIRTUAL'){var _0x1bca1c={};_0x1bca1c[_0x2922f1[_0x31c3('0x26')]]={'$like':'%'+_0x12a531[_0x31c3('0x2e')][_0x31c3('0x38')]+'%'};return _0x1bca1c;}})});}_0x1ea860=_[_0x31c3('0x39')]({},_0x1ea860,_0x12a531[_0x31c3('0x3a')]);var _0x5c1268={'where':_0x1ea860[_0x31c3('0x35')]};return db[_0x31c3('0x3b')]['count'](_0x5c1268)[_0x31c3('0x23')](function(_0x2351bb){_0xa22d99['count']=_0x2351bb;if(_0x12a531[_0x31c3('0x2e')][_0x31c3('0x3c')]){_0x1ea860['include']=[{'all':!![]}];}return db[_0x31c3('0x3b')][_0x31c3('0x3d')](_0x1ea860);})[_0x31c3('0x23')](function(_0x2a222a){_0xa22d99[_0x31c3('0x3e')]=_0x2a222a;return _0xa22d99;})[_0x31c3('0x23')](respondWithFilteredResult(_0x142e1b,_0x1ea860))['catch'](handleError(_0x142e1b,null));};exports[_0x31c3('0x3f')]=function(_0x23c71e,_0xd589d9){var _0x44e2a4={'raw':!![],'where':{'id':_0x23c71e['params']['id']}},_0x4e4538={};_0x4e4538[_0x31c3('0x2d')]=_['keys'](db[_0x31c3('0x3b')][_0x31c3('0x2a')]);_0x4e4538[_0x31c3('0x2e')]=_[_0x31c3('0x40')](_0x23c71e[_0x31c3('0x2e')]);_0x4e4538['filters']=_[_0x31c3('0x2f')](_0x4e4538[_0x31c3('0x2d')],_0x4e4538['query']);_0x44e2a4['attributes']=_[_0x31c3('0x2f')](_0x4e4538[_0x31c3('0x2d')],qs['fields'](_0x23c71e['query'][_0x31c3('0x31')]));_0x44e2a4[_0x31c3('0x30')]=_0x44e2a4['attributes']['length']?_0x44e2a4[_0x31c3('0x30')]:_0x4e4538[_0x31c3('0x2d')];if(_0x23c71e[_0x31c3('0x2e')][_0x31c3('0x3c')]){_0x44e2a4[_0x31c3('0x41')]=[{'all':!![]}];}_0x44e2a4=_[_0x31c3('0x39')]({},_0x44e2a4,_0x23c71e[_0x31c3('0x3a')]);return db[_0x31c3('0x3b')][_0x31c3('0x42')](_0x44e2a4)[_0x31c3('0x23')](handleEntityNotFound(_0xd589d9,null))[_0x31c3('0x23')](respondWithResult(_0xd589d9,null))['catch'](handleError(_0xd589d9,null));};exports[_0x31c3('0x43')]=function(_0x37933e,_0x12e641){return db[_0x31c3('0x3b')][_0x31c3('0x43')](_0x37933e[_0x31c3('0x44')],{})[_0x31c3('0x23')](respondWithResult(_0x12e641,0xc9))[_0x31c3('0x45')](handleError(_0x12e641,null));};exports[_0x31c3('0x46')]=function(_0x1748e3,_0x66bccd){if(_0x1748e3[_0x31c3('0x44')]['id']){delete _0x1748e3[_0x31c3('0x44')]['id'];}return db['MailServerOut'][_0x31c3('0x42')]({'where':{'id':_0x1748e3[_0x31c3('0x47')]['id']}})[_0x31c3('0x23')](handleEntityNotFound(_0x66bccd,null))[_0x31c3('0x23')](saveUpdates(_0x1748e3['body'],null))[_0x31c3('0x23')](respondWithResult(_0x66bccd,null))['catch'](handleError(_0x66bccd,null));};exports[_0x31c3('0x24')]=function(_0x240bb0,_0x19462b){return db[_0x31c3('0x3b')]['find']({'where':{'id':_0x240bb0[_0x31c3('0x47')]['id']}})[_0x31c3('0x23')](handleEntityNotFound(_0x19462b,null))[_0x31c3('0x23')](removeEntity(_0x19462b,null))[_0x31c3('0x45')](handleError(_0x19462b,null));};
\ No newline at end of file
+var _0xfff6=['rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','order','where','merge','filter','options','includeAll','include','MailServerOut','findAll','rows','catch','show','params','length','create','body','find','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','sox','fs-extra','lodash','jsforce','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','offset','undefined','limit','count','set','Content-Range','apply','save','update','then','destroy','error','name','index','map'];(function(_0x4a305a,_0x2a9a1a){var _0x1f2457=function(_0x5045b8){while(--_0x5045b8){_0x4a305a['push'](_0x4a305a['shift']());}};_0x1f2457(++_0x2a9a1a);}(_0xfff6,0x13d));var _0x6fff=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0xfff6[_0x21a9d9];return _0x46adce;};'use strict';var emlformat=require(_0x6fff('0x0'));var rimraf=require(_0x6fff('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x6fff('0x2'));var rp=require('request-promise');var moment=require(_0x6fff('0x3'));var BPromise=require(_0x6fff('0x4'));var Mustache=require(_0x6fff('0x5'));var util=require(_0x6fff('0x6'));var path=require(_0x6fff('0x7'));var sox=require(_0x6fff('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x6fff('0x9'));var _=require(_0x6fff('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x6fff('0xb'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x6fff('0xc'));var Papa=require(_0x6fff('0xd'));var Redis=require(_0x6fff('0xe'));var authService=require(_0x6fff('0xf'));var qs=require(_0x6fff('0x10'));var as=require(_0x6fff('0x11'));var hardwareService=require(_0x6fff('0x12'));var logger=require(_0x6fff('0x13'))(_0x6fff('0x14'));var utils=require(_0x6fff('0x15'));var config=require(_0x6fff('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0x6fff('0x17'))['db'];function respondWithStatusCode(_0x2ea4ea,_0x9d47a8){_0x9d47a8=_0x9d47a8||0xcc;return function(_0x575962){if(_0x575962){return _0x2ea4ea[_0x6fff('0x18')](_0x9d47a8);}return _0x2ea4ea['status'](_0x9d47a8)[_0x6fff('0x19')]();};}function respondWithResult(_0x3493ef,_0x4d28f9){_0x4d28f9=_0x4d28f9||0xc8;return function(_0x19aa84){if(_0x19aa84){return _0x3493ef[_0x6fff('0x1a')](_0x4d28f9)[_0x6fff('0x1b')](_0x19aa84);}};}function respondWithFilteredResult(_0x3df2fa,_0x129dc3){return function(_0x31d256){if(_0x31d256){var _0x57f359=typeof _0x129dc3[_0x6fff('0x1c')]===_0x6fff('0x1d')&&typeof _0x129dc3[_0x6fff('0x1e')]==='undefined';var _0x3bd0d4=_0x31d256[_0x6fff('0x1f')];var _0x506c58=_0x57f359?0x0:_0x129dc3['offset'];var _0x76e140=_0x57f359?_0x31d256[_0x6fff('0x1f')]:_0x129dc3[_0x6fff('0x1c')]+_0x129dc3[_0x6fff('0x1e')];var _0x28e43f;if(_0x76e140>=_0x3bd0d4){_0x76e140=_0x3bd0d4;_0x28e43f=0xc8;}else{_0x28e43f=0xce;}_0x3df2fa['status'](_0x28e43f);return _0x3df2fa[_0x6fff('0x20')](_0x6fff('0x21'),_0x506c58+'-'+_0x76e140+'/'+_0x3bd0d4)[_0x6fff('0x1b')](_0x31d256);}return null;};}function patchUpdates(_0xef9338){return function(_0x2cd083){try{jsonpatch[_0x6fff('0x22')](_0x2cd083,_0xef9338,!![]);}catch(_0x7c0deb){return BPromise['reject'](_0x7c0deb);}return _0x2cd083[_0x6fff('0x23')]();};}function saveUpdates(_0x5be152,_0x41e468){return function(_0x4ea5e6){if(_0x4ea5e6){return _0x4ea5e6[_0x6fff('0x24')](_0x5be152)[_0x6fff('0x25')](function(_0x97ca26){return _0x97ca26;});}return null;};}function removeEntity(_0x551111,_0x4b9ace){return function(_0x4ef787){if(_0x4ef787){return _0x4ef787[_0x6fff('0x26')]()[_0x6fff('0x25')](function(){_0x551111[_0x6fff('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x199786,_0x205053){return function(_0x3cfdaa){if(!_0x3cfdaa){_0x199786[_0x6fff('0x18')](0x194);}return _0x3cfdaa;};}function handleError(_0x7f023e,_0x463921){_0x463921=_0x463921||0x1f4;return function(_0x40eb27){logger[_0x6fff('0x27')](_0x40eb27['stack']);if(_0x40eb27['name']){delete _0x40eb27[_0x6fff('0x28')];}_0x7f023e[_0x6fff('0x1a')](_0x463921)['send'](_0x40eb27);};}exports[_0x6fff('0x29')]=function(_0x3aa494,_0x2a762e){var _0x23d528={},_0x5a6fad={},_0x1fb5fc={'count':0x0,'rows':[]};var _0x489b20=_[_0x6fff('0x2a')](db['MailServerOut'][_0x6fff('0x2b')],function(_0x2d2adf){return{'name':_0x2d2adf[_0x6fff('0x2c')],'type':_0x2d2adf[_0x6fff('0x2d')][_0x6fff('0x2e')]};});_0x5a6fad[_0x6fff('0x2f')]=_['map'](_0x489b20,'name');_0x5a6fad[_0x6fff('0x30')]=_[_0x6fff('0x31')](_0x3aa494['query']);_0x5a6fad[_0x6fff('0x32')]=_[_0x6fff('0x33')](_0x5a6fad[_0x6fff('0x2f')],_0x5a6fad['query']);_0x23d528[_0x6fff('0x34')]=_['intersection'](_0x5a6fad[_0x6fff('0x2f')],qs[_0x6fff('0x35')](_0x3aa494[_0x6fff('0x30')][_0x6fff('0x35')]));_0x23d528[_0x6fff('0x34')]=_0x23d528[_0x6fff('0x34')]['length']?_0x23d528['attributes']:_0x5a6fad['model'];if(!_0x3aa494[_0x6fff('0x30')][_0x6fff('0x36')]('nolimit')){_0x23d528['limit']=qs[_0x6fff('0x1e')](_0x3aa494[_0x6fff('0x30')][_0x6fff('0x1e')]);_0x23d528['offset']=qs[_0x6fff('0x1c')](_0x3aa494[_0x6fff('0x30')][_0x6fff('0x1c')]);}_0x23d528[_0x6fff('0x37')]=qs['sort'](_0x3aa494[_0x6fff('0x30')]['sort']);_0x23d528[_0x6fff('0x38')]=qs[_0x6fff('0x32')](_['pick'](_0x3aa494[_0x6fff('0x30')],_0x5a6fad[_0x6fff('0x32')]),_0x489b20);if(_0x3aa494[_0x6fff('0x30')]['filter']){_0x23d528[_0x6fff('0x38')]=_[_0x6fff('0x39')](_0x23d528[_0x6fff('0x38')],{'$or':_[_0x6fff('0x2a')](_0x489b20,function(_0xec8049){if(_0xec8049[_0x6fff('0x2d')]!=='VIRTUAL'){var _0x2e1c11={};_0x2e1c11[_0xec8049[_0x6fff('0x28')]]={'$like':'%'+_0x3aa494['query'][_0x6fff('0x3a')]+'%'};return _0x2e1c11;}})});}_0x23d528=_[_0x6fff('0x39')]({},_0x23d528,_0x3aa494[_0x6fff('0x3b')]);var _0x2d566b={'where':_0x23d528[_0x6fff('0x38')]};return db['MailServerOut'][_0x6fff('0x1f')](_0x2d566b)[_0x6fff('0x25')](function(_0x152aa0){_0x1fb5fc['count']=_0x152aa0;if(_0x3aa494['query'][_0x6fff('0x3c')]){_0x23d528[_0x6fff('0x3d')]=[{'all':!![]}];}return db[_0x6fff('0x3e')][_0x6fff('0x3f')](_0x23d528);})[_0x6fff('0x25')](function(_0x44f502){_0x1fb5fc[_0x6fff('0x40')]=_0x44f502;return _0x1fb5fc;})[_0x6fff('0x25')](respondWithFilteredResult(_0x2a762e,_0x23d528))[_0x6fff('0x41')](handleError(_0x2a762e,null));};exports[_0x6fff('0x42')]=function(_0x4d381d,_0x3a394e){var _0x1dfcbe={'raw':!![],'where':{'id':_0x4d381d[_0x6fff('0x43')]['id']}},_0x395df2={};_0x395df2[_0x6fff('0x2f')]=_[_0x6fff('0x31')](db[_0x6fff('0x3e')]['rawAttributes']);_0x395df2[_0x6fff('0x30')]=_[_0x6fff('0x31')](_0x4d381d[_0x6fff('0x30')]);_0x395df2[_0x6fff('0x32')]=_[_0x6fff('0x33')](_0x395df2[_0x6fff('0x2f')],_0x395df2[_0x6fff('0x30')]);_0x1dfcbe[_0x6fff('0x34')]=_['intersection'](_0x395df2[_0x6fff('0x2f')],qs[_0x6fff('0x35')](_0x4d381d[_0x6fff('0x30')][_0x6fff('0x35')]));_0x1dfcbe[_0x6fff('0x34')]=_0x1dfcbe[_0x6fff('0x34')][_0x6fff('0x44')]?_0x1dfcbe[_0x6fff('0x34')]:_0x395df2[_0x6fff('0x2f')];if(_0x4d381d[_0x6fff('0x30')][_0x6fff('0x3c')]){_0x1dfcbe[_0x6fff('0x3d')]=[{'all':!![]}];}_0x1dfcbe=_[_0x6fff('0x39')]({},_0x1dfcbe,_0x4d381d[_0x6fff('0x3b')]);return db[_0x6fff('0x3e')]['find'](_0x1dfcbe)[_0x6fff('0x25')](handleEntityNotFound(_0x3a394e,null))[_0x6fff('0x25')](respondWithResult(_0x3a394e,null))[_0x6fff('0x41')](handleError(_0x3a394e,null));};exports[_0x6fff('0x45')]=function(_0x2b69aa,_0x136c5f){return db[_0x6fff('0x3e')][_0x6fff('0x45')](_0x2b69aa['body'],{})[_0x6fff('0x25')](respondWithResult(_0x136c5f,0xc9))[_0x6fff('0x41')](handleError(_0x136c5f,null));};exports['update']=function(_0x4032ef,_0x241e7d){if(_0x4032ef[_0x6fff('0x46')]['id']){delete _0x4032ef[_0x6fff('0x46')]['id'];}return db['MailServerOut'][_0x6fff('0x47')]({'where':{'id':_0x4032ef[_0x6fff('0x43')]['id']}})['then'](handleEntityNotFound(_0x241e7d,null))['then'](saveUpdates(_0x4032ef[_0x6fff('0x46')],null))['then'](respondWithResult(_0x241e7d,null))[_0x6fff('0x41')](handleError(_0x241e7d,null));};exports['destroy']=function(_0x20f1cc,_0x5e90db){return db[_0x6fff('0x3e')]['find']({'where':{'id':_0x20f1cc['params']['id']}})[_0x6fff('0x25')](handleEntityNotFound(_0x5e90db,null))['then'](removeEntity(_0x5e90db,null))[_0x6fff('0x41')](handleError(_0x5e90db,null));};
\ No newline at end of file
index 9c4d4f2..d505806 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1d8a=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./mailServerOut.attributes','exports','MailServerOut','mail_servers_out'];(function(_0x290137,_0x26c160){var _0x356555=function(_0x8ce1f0){while(--_0x8ce1f0){_0x290137['push'](_0x290137['shift']());}};_0x356555(++_0x26c160);}(_0x1d8a,0x142));var _0xa1d8=function(_0x18ec5f,_0x5a8010){_0x18ec5f=_0x18ec5f-0x0;var _0x283981=_0x1d8a[_0x18ec5f];return _0x283981;};'use strict';var _=require(_0xa1d8('0x0'));var util=require(_0xa1d8('0x1'));var logger=require(_0xa1d8('0x2'))(_0xa1d8('0x3'));var moment=require(_0xa1d8('0x4'));var BPromise=require(_0xa1d8('0x5'));var rp=require(_0xa1d8('0x6'));var fs=require('fs');var path=require(_0xa1d8('0x7'));var rimraf=require(_0xa1d8('0x8'));var config=require(_0xa1d8('0x9'));var attributes=require(_0xa1d8('0xa'));module[_0xa1d8('0xb')]=function(_0x1fe1d5,_0x2b0895){return _0x1fe1d5['define'](_0xa1d8('0xc'),attributes,{'tableName':_0xa1d8('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x1909=['moment','bluebird','path','rimraf','../../config/environment','./mailServerOut.attributes','exports','define','MailServerOut','util','../../config/logger'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x1909,0x6c));var _0x9190=function(_0x18c417,_0x586063){_0x18c417=_0x18c417-0x0;var _0x471d4d=_0x1909[_0x18c417];return _0x471d4d;};'use strict';var _=require('lodash');var util=require(_0x9190('0x0'));var logger=require(_0x9190('0x1'))('api');var moment=require(_0x9190('0x2'));var BPromise=require(_0x9190('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x9190('0x4'));var rimraf=require(_0x9190('0x5'));var config=require(_0x9190('0x6'));var attributes=require(_0x9190('0x7'));module[_0x9190('0x8')]=function(_0x3761d7,_0x1ead98){return _0x3761d7[_0x9190('0x9')](_0x9190('0xa'),attributes,{'tableName':'mail_servers_out','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 08ec870..6e75b16 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a54=['info','MailServerOut,\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(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0x7a54,0x106));var _0x47a5=function(_0x490eb3,_0x3c96be){_0x490eb3=_0x490eb3-0x0;var _0x27b837=_0x7a54[_0x490eb3];return _0x27b837;};'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')]('MailServerOut,\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 _0x7a54=['info','MailServerOut,\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(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x7a54,0x106));var _0x47a5=function(_0x35a022,_0x4a952d){_0x35a022=_0x35a022-0x0;var _0x4ce723=_0x7a54[_0x35a022];return _0x4ce723;};'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')]('MailServerOut,\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
index 8a7989e..9ce7e50 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3ccf=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','describe','/:id','show','create','put','delete','destroy','exports','multer','util','path','connect-timeout','express'];(function(_0x134374,_0xa30e6e){var _0x336abf=function(_0x3165dd){while(--_0x3165dd){_0x134374['push'](_0x134374['shift']());}};_0x336abf(++_0xa30e6e);}(_0x3ccf,0x87));var _0xf3cc=function(_0x5cac2a,_0xfeeebb){_0x5cac2a=_0x5cac2a-0x0;var _0x3c5c86=_0x3ccf[_0x5cac2a];return _0x3c5c86;};'use strict';var multer=require(_0xf3cc('0x0'));var util=require(_0xf3cc('0x1'));var path=require(_0xf3cc('0x2'));var timeout=require(_0xf3cc('0x3'));var express=require(_0xf3cc('0x4'));var router=express[_0xf3cc('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xf3cc('0x6'));var interaction=require(_0xf3cc('0x7'));var config=require(_0xf3cc('0x8'));var controller=require('./mailSubstatus.controller');router[_0xf3cc('0x9')]('/',auth[_0xf3cc('0xa')](),controller[_0xf3cc('0xb')]);router[_0xf3cc('0x9')]('/describe',auth[_0xf3cc('0xa')](),controller[_0xf3cc('0xc')]);router[_0xf3cc('0x9')](_0xf3cc('0xd'),auth[_0xf3cc('0xa')](),controller[_0xf3cc('0xe')]);router['post']('/',auth[_0xf3cc('0xa')](),controller[_0xf3cc('0xf')]);router[_0xf3cc('0x10')](_0xf3cc('0xd'),auth[_0xf3cc('0xa')](),controller['update']);router[_0xf3cc('0x11')](_0xf3cc('0xd'),auth[_0xf3cc('0xa')](),controller[_0xf3cc('0x12')]);module[_0xf3cc('0x13')]=router;
\ No newline at end of file
+var _0xe1d8=['path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailSubstatus.controller','get','index','isAuthenticated','describe','/:id','show','post','put','update','delete','destroy','exports'];(function(_0x25fc41,_0x250864){var _0x1371d1=function(_0x8ab2e3){while(--_0x8ab2e3){_0x25fc41['push'](_0x25fc41['shift']());}};_0x1371d1(++_0x250864);}(_0xe1d8,0x168));var _0x8e1d=function(_0x2ca65a,_0x99bfdb){_0x2ca65a=_0x2ca65a-0x0;var _0x577c5e=_0xe1d8[_0x2ca65a];return _0x577c5e;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x8e1d('0x0'));var timeout=require(_0x8e1d('0x1'));var express=require(_0x8e1d('0x2'));var router=express[_0x8e1d('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x8e1d('0x4'));var interaction=require(_0x8e1d('0x5'));var config=require(_0x8e1d('0x6'));var controller=require(_0x8e1d('0x7'));router[_0x8e1d('0x8')]('/',auth['isAuthenticated'](),controller[_0x8e1d('0x9')]);router['get']('/describe',auth[_0x8e1d('0xa')](),controller[_0x8e1d('0xb')]);router[_0x8e1d('0x8')](_0x8e1d('0xc'),auth[_0x8e1d('0xa')](),controller[_0x8e1d('0xd')]);router[_0x8e1d('0xe')]('/',auth['isAuthenticated'](),controller['create']);router[_0x8e1d('0xf')](_0x8e1d('0xc'),auth[_0x8e1d('0xa')](),controller[_0x8e1d('0x10')]);router[_0x8e1d('0x11')](_0x8e1d('0xc'),auth[_0x8e1d('0xa')](),controller[_0x8e1d('0x12')]);module[_0x8e1d('0x13')]=router;
\ No newline at end of file
index 2e64204..c8df3d4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3831=['STRING','name','sequelize'];(function(_0x308fbc,_0x805091){var _0x268f1e=function(_0xbf85ad){while(--_0xbf85ad){_0x308fbc['push'](_0x308fbc['shift']());}};_0x268f1e(++_0x805091);}(_0x3831,0x14c));var _0x1383=function(_0x131585,_0x1abd33){_0x131585=_0x131585-0x0;var _0x1fcca2=_0x3831[_0x131585];return _0x1fcca2;};'use strict';var Sequelize=require(_0x1383('0x0'));module['exports']={'name':{'type':Sequelize[_0x1383('0x1')],'unique':_0x1383('0x2'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x1383('0x1')]}};
\ No newline at end of file
+var _0x7d9f=['sequelize','exports','STRING','name'];(function(_0x599f41,_0x4db732){var _0x2e4d58=function(_0x14c882){while(--_0x14c882){_0x599f41['push'](_0x599f41['shift']());}};_0x2e4d58(++_0x4db732);}(_0x7d9f,0x15c));var _0xf7d9=function(_0x4884a7,_0x18e38a){_0x4884a7=_0x4884a7-0x0;var _0x56b60e=_0x7d9f[_0x4884a7];return _0x56b60e;};'use strict';var Sequelize=require(_0xf7d9('0x0'));module[_0xf7d9('0x1')]={'name':{'type':Sequelize[_0xf7d9('0x2')],'unique':_0xf7d9('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0xf7d9('0x2')]}};
\ No newline at end of file
index 5d6009d..dd26773 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xab85=['../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','update','then','destroy','sendStatus','error','stack','name','index','map','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','nolimit','sort','where','filters','pick','VIRTUAL','merge','options','MailSubstatus','includeAll','include','findAll','rows','catch','show','length','find','create','body','params','describe','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','squel','crypto','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware'];(function(_0x284863,_0x346c0d){var _0x3688f5=function(_0x2bfb95){while(--_0x2bfb95){_0x284863['push'](_0x284863['shift']());}};_0x3688f5(++_0x346c0d);}(_0xab85,0x1ed));var _0x5ab8=function(_0x4e6ed0,_0x22ed4a){_0x4e6ed0=_0x4e6ed0-0x0;var _0x2e0e84=_0xab85[_0x4e6ed0];return _0x2e0e84;};'use strict';var emlformat=require(_0x5ab8('0x0'));var rimraf=require(_0x5ab8('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x5ab8('0x2'));var rp=require(_0x5ab8('0x3'));var moment=require(_0x5ab8('0x4'));var BPromise=require(_0x5ab8('0x5'));var Mustache=require(_0x5ab8('0x6'));var util=require(_0x5ab8('0x7'));var path=require(_0x5ab8('0x8'));var sox=require('sox');var csv=require(_0x5ab8('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x5ab8('0xa'));var crypto=require(_0x5ab8('0xb'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x5ab8('0xc'));var Papa=require(_0x5ab8('0xd'));var Redis=require(_0x5ab8('0xe'));var authService=require('../../components/auth/service');var qs=require(_0x5ab8('0xf'));var as=require(_0x5ab8('0x10'));var hardwareService=require(_0x5ab8('0x11'));var logger=require(_0x5ab8('0x12'))(_0x5ab8('0x13'));var utils=require('../../config/utils');var config=require(_0x5ab8('0x14'));var licenseUtil=require(_0x5ab8('0x15'));var db=require(_0x5ab8('0x16'))['db'];function respondWithStatusCode(_0x4327c3,_0x1c2ef1){_0x1c2ef1=_0x1c2ef1||0xcc;return function(_0x4cea03){if(_0x4cea03){return _0x4327c3['sendStatus'](_0x1c2ef1);}return _0x4327c3[_0x5ab8('0x17')](_0x1c2ef1)[_0x5ab8('0x18')]();};}function respondWithResult(_0x40ed82,_0x49880f){_0x49880f=_0x49880f||0xc8;return function(_0x5c6d21){if(_0x5c6d21){return _0x40ed82[_0x5ab8('0x17')](_0x49880f)[_0x5ab8('0x19')](_0x5c6d21);}};}function respondWithFilteredResult(_0x2ac531,_0x5d8617){return function(_0x5e68f2){if(_0x5e68f2){var _0x452e9d=typeof _0x5d8617[_0x5ab8('0x1a')]===_0x5ab8('0x1b')&&typeof _0x5d8617[_0x5ab8('0x1c')]===_0x5ab8('0x1b');var _0x537058=_0x5e68f2['count'];var _0x232819=_0x452e9d?0x0:_0x5d8617[_0x5ab8('0x1a')];var _0x29054c=_0x452e9d?_0x5e68f2[_0x5ab8('0x1d')]:_0x5d8617[_0x5ab8('0x1a')]+_0x5d8617[_0x5ab8('0x1c')];var _0x34e87d;if(_0x29054c>=_0x537058){_0x29054c=_0x537058;_0x34e87d=0xc8;}else{_0x34e87d=0xce;}_0x2ac531[_0x5ab8('0x17')](_0x34e87d);return _0x2ac531[_0x5ab8('0x1e')](_0x5ab8('0x1f'),_0x232819+'-'+_0x29054c+'/'+_0x537058)[_0x5ab8('0x19')](_0x5e68f2);}return null;};}function patchUpdates(_0x23f367){return function(_0x31f60a){try{jsonpatch[_0x5ab8('0x20')](_0x31f60a,_0x23f367,!![]);}catch(_0x2aa5fe){return BPromise['reject'](_0x2aa5fe);}return _0x31f60a['save']();};}function saveUpdates(_0x51f4eb,_0x56fd05){return function(_0x5f59de){if(_0x5f59de){return _0x5f59de[_0x5ab8('0x21')](_0x51f4eb)[_0x5ab8('0x22')](function(_0x49e444){return _0x49e444;});}return null;};}function removeEntity(_0x405687,_0x280391){return function(_0x408a85){if(_0x408a85){return _0x408a85[_0x5ab8('0x23')]()[_0x5ab8('0x22')](function(){_0x405687[_0x5ab8('0x17')](0xcc)[_0x5ab8('0x18')]();});}};}function handleEntityNotFound(_0x4758bf,_0x236b29){return function(_0x3ba5ed){if(!_0x3ba5ed){_0x4758bf[_0x5ab8('0x24')](0x194);}return _0x3ba5ed;};}function handleError(_0x33a7c0,_0x2bafd9){_0x2bafd9=_0x2bafd9||0x1f4;return function(_0x4a0b05){logger[_0x5ab8('0x25')](_0x4a0b05[_0x5ab8('0x26')]);if(_0x4a0b05[_0x5ab8('0x27')]){delete _0x4a0b05['name'];}_0x33a7c0[_0x5ab8('0x17')](_0x2bafd9)['send'](_0x4a0b05);};}exports[_0x5ab8('0x28')]=function(_0x55da46,_0x34f2de){var _0x33b290={},_0x23bfb7={},_0x45b661={'count':0x0,'rows':[]};var _0x5f19ef=_[_0x5ab8('0x29')](db['MailSubstatus'][_0x5ab8('0x2a')],function(_0x38958c){return{'name':_0x38958c[_0x5ab8('0x2b')],'type':_0x38958c[_0x5ab8('0x2c')][_0x5ab8('0x2d')]};});_0x23bfb7[_0x5ab8('0x2e')]=_['map'](_0x5f19ef,'name');_0x23bfb7[_0x5ab8('0x2f')]=_[_0x5ab8('0x30')](_0x55da46[_0x5ab8('0x2f')]);_0x23bfb7['filters']=_[_0x5ab8('0x31')](_0x23bfb7[_0x5ab8('0x2e')],_0x23bfb7[_0x5ab8('0x2f')]);_0x33b290[_0x5ab8('0x32')]=_[_0x5ab8('0x31')](_0x23bfb7[_0x5ab8('0x2e')],qs[_0x5ab8('0x33')](_0x55da46[_0x5ab8('0x2f')][_0x5ab8('0x33')]));_0x33b290[_0x5ab8('0x32')]=_0x33b290[_0x5ab8('0x32')]['length']?_0x33b290['attributes']:_0x23bfb7[_0x5ab8('0x2e')];if(!_0x55da46[_0x5ab8('0x2f')]['hasOwnProperty'](_0x5ab8('0x34'))){_0x33b290[_0x5ab8('0x1c')]=qs[_0x5ab8('0x1c')](_0x55da46[_0x5ab8('0x2f')][_0x5ab8('0x1c')]);_0x33b290[_0x5ab8('0x1a')]=qs[_0x5ab8('0x1a')](_0x55da46[_0x5ab8('0x2f')][_0x5ab8('0x1a')]);}_0x33b290['order']=qs[_0x5ab8('0x35')](_0x55da46['query'][_0x5ab8('0x35')]);_0x33b290[_0x5ab8('0x36')]=qs[_0x5ab8('0x37')](_[_0x5ab8('0x38')](_0x55da46[_0x5ab8('0x2f')],_0x23bfb7[_0x5ab8('0x37')]),_0x5f19ef);if(_0x55da46[_0x5ab8('0x2f')]['filter']){_0x33b290[_0x5ab8('0x36')]=_['merge'](_0x33b290[_0x5ab8('0x36')],{'$or':_[_0x5ab8('0x29')](_0x5f19ef,function(_0x13dbc2){if(_0x13dbc2['type']!==_0x5ab8('0x39')){var _0x162d94={};_0x162d94[_0x13dbc2['name']]={'$like':'%'+_0x55da46[_0x5ab8('0x2f')]['filter']+'%'};return _0x162d94;}})});}_0x33b290=_[_0x5ab8('0x3a')]({},_0x33b290,_0x55da46[_0x5ab8('0x3b')]);var _0x55c203={'where':_0x33b290[_0x5ab8('0x36')]};return db[_0x5ab8('0x3c')][_0x5ab8('0x1d')](_0x55c203)['then'](function(_0x3dc575){_0x45b661[_0x5ab8('0x1d')]=_0x3dc575;if(_0x55da46[_0x5ab8('0x2f')][_0x5ab8('0x3d')]){_0x33b290[_0x5ab8('0x3e')]=[{'all':!![]}];}return db[_0x5ab8('0x3c')][_0x5ab8('0x3f')](_0x33b290);})[_0x5ab8('0x22')](function(_0x5ca497){_0x45b661[_0x5ab8('0x40')]=_0x5ca497;return _0x45b661;})[_0x5ab8('0x22')](respondWithFilteredResult(_0x34f2de,_0x33b290))[_0x5ab8('0x41')](handleError(_0x34f2de,null));};exports[_0x5ab8('0x42')]=function(_0x1a26d1,_0x5e928a){var _0x4be0c3={'raw':!![],'where':{'id':_0x1a26d1['params']['id']}},_0x4d1587={};_0x4d1587[_0x5ab8('0x2e')]=_[_0x5ab8('0x30')](db[_0x5ab8('0x3c')][_0x5ab8('0x2a')]);_0x4d1587[_0x5ab8('0x2f')]=_[_0x5ab8('0x30')](_0x1a26d1[_0x5ab8('0x2f')]);_0x4d1587['filters']=_[_0x5ab8('0x31')](_0x4d1587[_0x5ab8('0x2e')],_0x4d1587[_0x5ab8('0x2f')]);_0x4be0c3['attributes']=_[_0x5ab8('0x31')](_0x4d1587[_0x5ab8('0x2e')],qs[_0x5ab8('0x33')](_0x1a26d1['query'][_0x5ab8('0x33')]));_0x4be0c3[_0x5ab8('0x32')]=_0x4be0c3[_0x5ab8('0x32')][_0x5ab8('0x43')]?_0x4be0c3['attributes']:_0x4d1587['model'];if(_0x1a26d1['query'][_0x5ab8('0x3d')]){_0x4be0c3[_0x5ab8('0x3e')]=[{'all':!![]}];}_0x4be0c3=_['merge']({},_0x4be0c3,_0x1a26d1[_0x5ab8('0x3b')]);return db['MailSubstatus'][_0x5ab8('0x44')](_0x4be0c3)[_0x5ab8('0x22')](handleEntityNotFound(_0x5e928a,null))[_0x5ab8('0x22')](respondWithResult(_0x5e928a,null))[_0x5ab8('0x41')](handleError(_0x5e928a,null));};exports[_0x5ab8('0x45')]=function(_0x3476c6,_0x1db87e){return db[_0x5ab8('0x3c')]['create'](_0x3476c6[_0x5ab8('0x46')],{})[_0x5ab8('0x22')](respondWithResult(_0x1db87e,0xc9))[_0x5ab8('0x41')](handleError(_0x1db87e,null));};exports[_0x5ab8('0x21')]=function(_0xfd20d6,_0x2dbd39){if(_0xfd20d6[_0x5ab8('0x46')]['id']){delete _0xfd20d6[_0x5ab8('0x46')]['id'];}return db['MailSubstatus'][_0x5ab8('0x44')]({'where':{'id':_0xfd20d6['params']['id']}})[_0x5ab8('0x22')](handleEntityNotFound(_0x2dbd39,null))[_0x5ab8('0x22')](saveUpdates(_0xfd20d6['body'],null))[_0x5ab8('0x22')](respondWithResult(_0x2dbd39,null))[_0x5ab8('0x41')](handleError(_0x2dbd39,null));};exports[_0x5ab8('0x23')]=function(_0x219d29,_0xa65bd5){return db[_0x5ab8('0x3c')][_0x5ab8('0x44')]({'where':{'id':_0x219d29[_0x5ab8('0x47')]['id']}})[_0x5ab8('0x22')](handleEntityNotFound(_0xa65bd5,null))[_0x5ab8('0x22')](removeEntity(_0xa65bd5,null))['catch'](handleError(_0xa65bd5,null));};exports[_0x5ab8('0x48')]=function(_0x2c1529,_0x4a9c03){return db[_0x5ab8('0x3c')][_0x5ab8('0x48')]()[_0x5ab8('0x22')](respondWithResult(_0x4a9c03,null))[_0x5ab8('0x41')](handleError(_0x4a9c03,null));};
\ No newline at end of file
+var _0x2321=['findAll','rows','show','params','keys','includeAll','options','find','catch','create','body','describe','eml-format','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../mysqldb','sendStatus','status','end','undefined','limit','count','offset','set','json','apply','save','update','then','destroy','error','stack','name','send','index','map','MailSubstatus','fieldName','type','key','intersection','model','query','fields','attributes','hasOwnProperty','nolimit','sort','where','filters','pick','filter','merge','VIRTUAL','include'];(function(_0x3698eb,_0x597db2){var _0x18d64e=function(_0x4d6798){while(--_0x4d6798){_0x3698eb['push'](_0x3698eb['shift']());}};_0x18d64e(++_0x597db2);}(_0x2321,0xe4));var _0x1232=function(_0x1c8c28,_0x3ee093){_0x1c8c28=_0x1c8c28-0x0;var _0x1f59b4=_0x2321[_0x1c8c28];return _0x1f59b4;};'use strict';var emlformat=require(_0x1232('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x1232('0x1'));var rp=require(_0x1232('0x2'));var moment=require(_0x1232('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x1232('0x4'));var util=require(_0x1232('0x5'));var path=require(_0x1232('0x6'));var sox=require('sox');var csv=require(_0x1232('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x1232('0x8'));var _=require(_0x1232('0x9'));var squel=require(_0x1232('0xa'));var crypto=require(_0x1232('0xb'));var jsforce=require(_0x1232('0xc'));var deskjs=require(_0x1232('0xd'));var toCsv=require(_0x1232('0x7'));var querystring=require(_0x1232('0xe'));var Papa=require('papaparse');var Redis=require(_0x1232('0xf'));var authService=require(_0x1232('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x1232('0x11'));var hardwareService=require(_0x1232('0x12'));var logger=require(_0x1232('0x13'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x1232('0x14'))['db'];function respondWithStatusCode(_0x4f762c,_0x222ab0){_0x222ab0=_0x222ab0||0xcc;return function(_0x436eba){if(_0x436eba){return _0x4f762c[_0x1232('0x15')](_0x222ab0);}return _0x4f762c[_0x1232('0x16')](_0x222ab0)[_0x1232('0x17')]();};}function respondWithResult(_0x74c414,_0x40ce1d){_0x40ce1d=_0x40ce1d||0xc8;return function(_0x340e2a){if(_0x340e2a){return _0x74c414[_0x1232('0x16')](_0x40ce1d)['json'](_0x340e2a);}};}function respondWithFilteredResult(_0x32e8e7,_0x34464f){return function(_0x586a7d){if(_0x586a7d){var _0x568980=typeof _0x34464f['offset']===_0x1232('0x18')&&typeof _0x34464f[_0x1232('0x19')]===_0x1232('0x18');var _0x1aefaa=_0x586a7d[_0x1232('0x1a')];var _0x2512b6=_0x568980?0x0:_0x34464f[_0x1232('0x1b')];var _0x53d505=_0x568980?_0x586a7d[_0x1232('0x1a')]:_0x34464f[_0x1232('0x1b')]+_0x34464f[_0x1232('0x19')];var _0x2e8860;if(_0x53d505>=_0x1aefaa){_0x53d505=_0x1aefaa;_0x2e8860=0xc8;}else{_0x2e8860=0xce;}_0x32e8e7[_0x1232('0x16')](_0x2e8860);return _0x32e8e7[_0x1232('0x1c')]('Content-Range',_0x2512b6+'-'+_0x53d505+'/'+_0x1aefaa)[_0x1232('0x1d')](_0x586a7d);}return null;};}function patchUpdates(_0x464803){return function(_0x45408a){try{jsonpatch[_0x1232('0x1e')](_0x45408a,_0x464803,!![]);}catch(_0x9b6755){return BPromise['reject'](_0x9b6755);}return _0x45408a[_0x1232('0x1f')]();};}function saveUpdates(_0x35f09a,_0x75fa1c){return function(_0x397d76){if(_0x397d76){return _0x397d76[_0x1232('0x20')](_0x35f09a)[_0x1232('0x21')](function(_0xf78725){return _0xf78725;});}return null;};}function removeEntity(_0x1e1c4d,_0x284978){return function(_0x69a1ed){if(_0x69a1ed){return _0x69a1ed[_0x1232('0x22')]()[_0x1232('0x21')](function(){_0x1e1c4d[_0x1232('0x16')](0xcc)[_0x1232('0x17')]();});}};}function handleEntityNotFound(_0x15248f,_0x2beef7){return function(_0x22696f){if(!_0x22696f){_0x15248f[_0x1232('0x15')](0x194);}return _0x22696f;};}function handleError(_0x54cbb7,_0x53ab91){_0x53ab91=_0x53ab91||0x1f4;return function(_0x3ba142){logger[_0x1232('0x23')](_0x3ba142[_0x1232('0x24')]);if(_0x3ba142[_0x1232('0x25')]){delete _0x3ba142[_0x1232('0x25')];}_0x54cbb7[_0x1232('0x16')](_0x53ab91)[_0x1232('0x26')](_0x3ba142);};}exports[_0x1232('0x27')]=function(_0x575def,_0x15a114){var _0x991a13={},_0x2d101f={},_0x5d7652={'count':0x0,'rows':[]};var _0x27ae2f=_[_0x1232('0x28')](db[_0x1232('0x29')]['rawAttributes'],function(_0x12b35e){return{'name':_0x12b35e[_0x1232('0x2a')],'type':_0x12b35e[_0x1232('0x2b')][_0x1232('0x2c')]};});_0x2d101f['model']=_[_0x1232('0x28')](_0x27ae2f,_0x1232('0x25'));_0x2d101f['query']=_['keys'](_0x575def['query']);_0x2d101f['filters']=_[_0x1232('0x2d')](_0x2d101f[_0x1232('0x2e')],_0x2d101f[_0x1232('0x2f')]);_0x991a13['attributes']=_[_0x1232('0x2d')](_0x2d101f[_0x1232('0x2e')],qs[_0x1232('0x30')](_0x575def[_0x1232('0x2f')][_0x1232('0x30')]));_0x991a13[_0x1232('0x31')]=_0x991a13[_0x1232('0x31')]['length']?_0x991a13[_0x1232('0x31')]:_0x2d101f[_0x1232('0x2e')];if(!_0x575def['query'][_0x1232('0x32')](_0x1232('0x33'))){_0x991a13[_0x1232('0x19')]=qs[_0x1232('0x19')](_0x575def[_0x1232('0x2f')][_0x1232('0x19')]);_0x991a13[_0x1232('0x1b')]=qs[_0x1232('0x1b')](_0x575def[_0x1232('0x2f')][_0x1232('0x1b')]);}_0x991a13['order']=qs[_0x1232('0x34')](_0x575def[_0x1232('0x2f')][_0x1232('0x34')]);_0x991a13[_0x1232('0x35')]=qs[_0x1232('0x36')](_[_0x1232('0x37')](_0x575def[_0x1232('0x2f')],_0x2d101f['filters']),_0x27ae2f);if(_0x575def['query'][_0x1232('0x38')]){_0x991a13[_0x1232('0x35')]=_[_0x1232('0x39')](_0x991a13[_0x1232('0x35')],{'$or':_['map'](_0x27ae2f,function(_0x34f503){if(_0x34f503['type']!==_0x1232('0x3a')){var _0x42c973={};_0x42c973[_0x34f503['name']]={'$like':'%'+_0x575def[_0x1232('0x2f')][_0x1232('0x38')]+'%'};return _0x42c973;}})});}_0x991a13=_[_0x1232('0x39')]({},_0x991a13,_0x575def['options']);var _0x26f60e={'where':_0x991a13[_0x1232('0x35')]};return db[_0x1232('0x29')]['count'](_0x26f60e)[_0x1232('0x21')](function(_0x51ebe6){_0x5d7652[_0x1232('0x1a')]=_0x51ebe6;if(_0x575def[_0x1232('0x2f')]['includeAll']){_0x991a13[_0x1232('0x3b')]=[{'all':!![]}];}return db[_0x1232('0x29')][_0x1232('0x3c')](_0x991a13);})[_0x1232('0x21')](function(_0x507064){_0x5d7652[_0x1232('0x3d')]=_0x507064;return _0x5d7652;})[_0x1232('0x21')](respondWithFilteredResult(_0x15a114,_0x991a13))['catch'](handleError(_0x15a114,null));};exports[_0x1232('0x3e')]=function(_0xe80ac5,_0x20fadc){var _0x26f451={'raw':!![],'where':{'id':_0xe80ac5[_0x1232('0x3f')]['id']}},_0x43c8b8={};_0x43c8b8['model']=_[_0x1232('0x40')](db[_0x1232('0x29')]['rawAttributes']);_0x43c8b8[_0x1232('0x2f')]=_[_0x1232('0x40')](_0xe80ac5[_0x1232('0x2f')]);_0x43c8b8[_0x1232('0x36')]=_[_0x1232('0x2d')](_0x43c8b8['model'],_0x43c8b8[_0x1232('0x2f')]);_0x26f451[_0x1232('0x31')]=_[_0x1232('0x2d')](_0x43c8b8[_0x1232('0x2e')],qs[_0x1232('0x30')](_0xe80ac5[_0x1232('0x2f')][_0x1232('0x30')]));_0x26f451[_0x1232('0x31')]=_0x26f451['attributes']['length']?_0x26f451[_0x1232('0x31')]:_0x43c8b8[_0x1232('0x2e')];if(_0xe80ac5[_0x1232('0x2f')][_0x1232('0x41')]){_0x26f451[_0x1232('0x3b')]=[{'all':!![]}];}_0x26f451=_['merge']({},_0x26f451,_0xe80ac5[_0x1232('0x42')]);return db[_0x1232('0x29')][_0x1232('0x43')](_0x26f451)[_0x1232('0x21')](handleEntityNotFound(_0x20fadc,null))['then'](respondWithResult(_0x20fadc,null))[_0x1232('0x44')](handleError(_0x20fadc,null));};exports[_0x1232('0x45')]=function(_0x59cccd,_0x3036ed){return db[_0x1232('0x29')][_0x1232('0x45')](_0x59cccd[_0x1232('0x46')],{})[_0x1232('0x21')](respondWithResult(_0x3036ed,0xc9))['catch'](handleError(_0x3036ed,null));};exports['update']=function(_0x12fbad,_0x17ab2a){if(_0x12fbad['body']['id']){delete _0x12fbad[_0x1232('0x46')]['id'];}return db[_0x1232('0x29')][_0x1232('0x43')]({'where':{'id':_0x12fbad[_0x1232('0x3f')]['id']}})['then'](handleEntityNotFound(_0x17ab2a,null))['then'](saveUpdates(_0x12fbad[_0x1232('0x46')],null))['then'](respondWithResult(_0x17ab2a,null))[_0x1232('0x44')](handleError(_0x17ab2a,null));};exports[_0x1232('0x22')]=function(_0x335324,_0x16e057){return db[_0x1232('0x29')][_0x1232('0x43')]({'where':{'id':_0x335324['params']['id']}})[_0x1232('0x21')](handleEntityNotFound(_0x16e057,null))[_0x1232('0x21')](removeEntity(_0x16e057,null))['catch'](handleError(_0x16e057,null));};exports[_0x1232('0x47')]=function(_0x48f466,_0x15cb90){return db[_0x1232('0x29')][_0x1232('0x47')]()['then'](respondWithResult(_0x15cb90,null))['catch'](handleError(_0x15cb90,null));};
\ No newline at end of file
index 82719de..7062fd3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb1e0=['MailSubstatus','setMaxListeners','update','emit','hook','exports','events'];(function(_0x484f8a,_0x5eb358){var _0x83631d=function(_0x2c3eeb){while(--_0x2c3eeb){_0x484f8a['push'](_0x484f8a['shift']());}};_0x83631d(++_0x5eb358);}(_0xb1e0,0xb5));var _0x0b1e=function(_0xa12236,_0x4d37b0){_0xa12236=_0xa12236-0x0;var _0x45091b=_0xb1e0[_0xa12236];return _0x45091b;};'use strict';var EventEmitter=require(_0x0b1e('0x0'));var MailSubstatus=require('../../mysqldb')['db'][_0x0b1e('0x1')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x0b1e('0x2')](0x0);var events={'afterUpdate':_0x0b1e('0x3')};function emitEvent(_0x42b180){return function(_0x2d7047,_0x3fa572,_0x48756c){MailSubstatusEvents[_0x0b1e('0x4')](_0x42b180+':'+_0x2d7047['id'],_0x2d7047);MailSubstatusEvents['emit'](_0x42b180,_0x2d7047);_0x48756c(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailSubstatus[_0x0b1e('0x5')](e,emitEvent(event));}}module[_0x0b1e('0x6')]=MailSubstatusEvents;
\ No newline at end of file
+var _0x3493=['emit','hook','exports','events','../../mysqldb','MailSubstatus','setMaxListeners','update'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0x3493,0x1e3));var _0x3349=function(_0x34cbbb,_0x144152){_0x34cbbb=_0x34cbbb-0x0;var _0x21f083=_0x3493[_0x34cbbb];return _0x21f083;};'use strict';var EventEmitter=require(_0x3349('0x0'));var MailSubstatus=require(_0x3349('0x1'))['db'][_0x3349('0x2')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x3349('0x3')](0x0);var events={'afterUpdate':_0x3349('0x4')};function emitEvent(_0x28c291){return function(_0x550a94,_0x152775,_0x179306){MailSubstatusEvents[_0x3349('0x5')](_0x28c291+':'+_0x550a94['id'],_0x550a94);MailSubstatusEvents['emit'](_0x28c291,_0x550a94);_0x179306(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailSubstatus[_0x3349('0x6')](e,emitEvent(event));}}module[_0x3349('0x7')]=MailSubstatusEvents;
\ No newline at end of file
index efc6a93..da54e64 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1534=['then','catch','./mailSubstatus.attributes','exports','models','define','mail_substatuses','Condition','update','name','mailSubstatus','_previousDataValues'];(function(_0x4a8a48,_0x2c4409){var _0x4e6c45=function(_0x4aa716){while(--_0x4aa716){_0x4a8a48['push'](_0x4a8a48['shift']());}};_0x4e6c45(++_0x2c4409);}(_0x1534,0xda));var _0x4153=function(_0xa808d9,_0x186110){_0xa808d9=_0xa808d9-0x0;var _0x2ae6af=_0x1534[_0xa808d9];return _0x2ae6af;};'use strict';var attributes=require(_0x4153('0x0'));module[_0x4153('0x1')]=function(_0xa85771){var _0x50cd35=_0xa85771[_0x4153('0x2')];return _0xa85771[_0x4153('0x3')]('MailSubstatus',attributes,{'tableName':_0x4153('0x4'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0xb1b5f7,_0x4fbdd2,_0x308068){return _0x50cd35[_0x4153('0x5')][_0x4153('0x6')]({'value':_0xb1b5f7[_0x4153('0x7')]},{'where':{'field':_0x4153('0x8'),'value':_0xb1b5f7[_0x4153('0x9')][_0x4153('0x7')]}})[_0x4153('0xa')](function(){_0x308068();})[_0x4153('0xb')](function(_0x71fcb9){_0x308068(_0x71fcb9);});}}});};
\ No newline at end of file
+var _0x976c=['define','MailSubstatus','mail_substatuses','Condition','update','name','then','catch','./mailSubstatus.attributes','exports','models'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x976c,0xb8));var _0xc976=function(_0x30c8fd,_0x414be){_0x30c8fd=_0x30c8fd-0x0;var _0xe75ae2=_0x976c[_0x30c8fd];return _0xe75ae2;};'use strict';var attributes=require(_0xc976('0x0'));module[_0xc976('0x1')]=function(_0x498470){var _0x3c3598=_0x498470[_0xc976('0x2')];return _0x498470[_0xc976('0x3')](_0xc976('0x4'),attributes,{'tableName':_0xc976('0x5'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x204ad0,_0x523cfb,_0x2a6b4f){return _0x3c3598[_0xc976('0x6')][_0xc976('0x7')]({'value':_0x204ad0[_0xc976('0x8')]},{'where':{'field':'mailSubstatus','value':_0x204ad0['_previousDataValues'][_0xc976('0x8')]}})[_0xc976('0x9')](function(){_0x2a6b4f();})[_0xc976('0xa')](function(_0x74f875){_0x2a6b4f(_0x74f875);});}}});};
\ No newline at end of file
index b798f2d..49bee5b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd48a=['debug','MailSubstatus,\x20%s,\x20%s,\x20%s','error','code','message','info','result','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','jayson/promise','client','http','then','MailSubstatus,\x20%s,\x20%s','request\x20sent'];(function(_0x47d493,_0x3bedfb){var _0x50242a=function(_0x473bd6){while(--_0x473bd6){_0x47d493['push'](_0x47d493['shift']());}};_0x50242a(++_0x3bedfb);}(_0xd48a,0x8c));var _0xad48=function(_0x58017c,_0x1fb63a){_0x58017c=_0x58017c-0x0;var _0x1cb5d7=_0xd48a[_0x58017c];return _0x1cb5d7;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xad48('0x0'));var BPromise=require(_0xad48('0x1'));var rs=require(_0xad48('0x2'));var fs=require('fs');var Redis=require(_0xad48('0x3'));var db=require(_0xad48('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xad48('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0xad48('0x6'));var client=jayson[_0xad48('0x7')][_0xad48('0x8')]({'port':0x232a});function respondWithRpcPromise(_0xb8b3bf,_0x3d13b7,_0x2511c4){return new BPromise(function(_0x26b9fd,_0x164a02){return client['request'](_0xb8b3bf,_0x2511c4)[_0xad48('0x9')](function(_0x2511a1){logger['info'](_0xad48('0xa'),_0x3d13b7,_0xad48('0xb'));logger[_0xad48('0xc')](_0xad48('0xd'),_0x3d13b7,_0xad48('0xb'),JSON['stringify'](_0x2511a1));if(_0x2511a1[_0xad48('0xe')]){if(_0x2511a1['error'][_0xad48('0xf')]===0x1f4){logger[_0xad48('0xe')](_0xad48('0xa'),_0x3d13b7,_0x2511a1[_0xad48('0xe')][_0xad48('0x10')]);return _0x164a02(_0x2511a1[_0xad48('0xe')][_0xad48('0x10')]);}logger[_0xad48('0xe')](_0xad48('0xa'),_0x3d13b7,_0x2511a1[_0xad48('0xe')][_0xad48('0x10')]);return _0x26b9fd(_0x2511a1[_0xad48('0xe')][_0xad48('0x10')]);}else{logger[_0xad48('0x11')](_0xad48('0xa'),_0x3d13b7,_0xad48('0xb'));_0x26b9fd(_0x2511a1[_0xad48('0x12')]['message']);}})['catch'](function(_0x12b025){logger[_0xad48('0xe')](_0xad48('0xa'),_0x3d13b7,_0x12b025);_0x164a02(_0x12b025);});});}
\ No newline at end of file
+var _0x9dae=['result','util','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','info','MailSubstatus,\x20%s,\x20%s','request\x20sent','MailSubstatus,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x9dae,0xac));var _0xe9da=function(_0xdd2e4f,_0x4388b6){_0xdd2e4f=_0xdd2e4f-0x0;var _0x55a445=_0x9dae[_0xdd2e4f];return _0x55a445;};'use strict';var _=require('lodash');var util=require(_0xe9da('0x0'));var moment=require('moment');var BPromise=require(_0xe9da('0x1'));var rs=require(_0xe9da('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xe9da('0x3'));var logger=require(_0xe9da('0x4'))(_0xe9da('0x5'));var config=require(_0xe9da('0x6'));var jayson=require(_0xe9da('0x7'));var client=jayson[_0xe9da('0x8')][_0xe9da('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3ec6df,_0x56cffb,_0x4a8c3b){return new BPromise(function(_0xda137f,_0x4c8119){return client['request'](_0x3ec6df,_0x4a8c3b)['then'](function(_0x296283){logger[_0xe9da('0xa')](_0xe9da('0xb'),_0x56cffb,_0xe9da('0xc'));logger['debug'](_0xe9da('0xd'),_0x56cffb,_0xe9da('0xc'),JSON[_0xe9da('0xe')](_0x296283));if(_0x296283['error']){if(_0x296283[_0xe9da('0xf')][_0xe9da('0x10')]===0x1f4){logger['error'](_0xe9da('0xb'),_0x56cffb,_0x296283[_0xe9da('0xf')][_0xe9da('0x11')]);return _0x4c8119(_0x296283[_0xe9da('0xf')][_0xe9da('0x11')]);}logger[_0xe9da('0xf')](_0xe9da('0xb'),_0x56cffb,_0x296283['error'][_0xe9da('0x11')]);return _0xda137f(_0x296283[_0xe9da('0xf')][_0xe9da('0x11')]);}else{logger['info'](_0xe9da('0xb'),_0x56cffb,_0xe9da('0xc'));_0xda137f(_0x296283[_0xe9da('0x12')][_0xe9da('0x11')]);}})['catch'](function(_0x1019ec){logger[_0xe9da('0xf')](_0xe9da('0xb'),_0x56cffb,_0x1019ec);_0x4c8119(_0x1019ec);});});}
\ No newline at end of file
index ea3de80..1f31e95 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa8a5=['express','fs-extra','../../components/auth/service','../../components/interaction/service','./mailTransferReport.controller','get','isAuthenticated','/describe','describe','/:id','show','post','create','delete','destroy','exports','multer','path'];(function(_0x51e178,_0x13aa7f){var _0x3e778b=function(_0x29bfce){while(--_0x29bfce){_0x51e178['push'](_0x51e178['shift']());}};_0x3e778b(++_0x13aa7f);}(_0xa8a5,0x1d2));var _0x5a8a=function(_0x39772f,_0x5605cb){_0x39772f=_0x39772f-0x0;var _0xc9edbf=_0xa8a5[_0x39772f];return _0xc9edbf;};'use strict';var multer=require(_0x5a8a('0x0'));var util=require('util');var path=require(_0x5a8a('0x1'));var timeout=require('connect-timeout');var express=require(_0x5a8a('0x2'));var router=express['Router']();var fs_extra=require(_0x5a8a('0x3'));var auth=require(_0x5a8a('0x4'));var interaction=require(_0x5a8a('0x5'));var config=require('../../config/environment');var controller=require(_0x5a8a('0x6'));router[_0x5a8a('0x7')]('/',auth[_0x5a8a('0x8')](),controller['index']);router[_0x5a8a('0x7')](_0x5a8a('0x9'),auth[_0x5a8a('0x8')](),controller[_0x5a8a('0xa')]);router['get'](_0x5a8a('0xb'),auth[_0x5a8a('0x8')](),controller[_0x5a8a('0xc')]);router[_0x5a8a('0xd')]('/',auth[_0x5a8a('0x8')](),controller[_0x5a8a('0xe')]);router['put'](_0x5a8a('0xb'),auth['isAuthenticated'](),controller['update']);router[_0x5a8a('0xf')](_0x5a8a('0xb'),auth[_0x5a8a('0x8')](),controller[_0x5a8a('0x10')]);module[_0x5a8a('0x11')]=router;
\ No newline at end of file
+var _0x892f=['delete','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/describe','describe','/:id','isAuthenticated','create','update'];(function(_0x36a4f9,_0x3f5506){var _0x479588=function(_0x19eac0){while(--_0x19eac0){_0x36a4f9['push'](_0x36a4f9['shift']());}};_0x479588(++_0x3f5506);}(_0x892f,0x10c));var _0xf892=function(_0x2469b3,_0x2055c2){_0x2469b3=_0x2469b3-0x0;var _0x588b86=_0x892f[_0x2469b3];return _0x588b86;};'use strict';var multer=require(_0xf892('0x0'));var util=require(_0xf892('0x1'));var path=require('path');var timeout=require(_0xf892('0x2'));var express=require(_0xf892('0x3'));var router=express[_0xf892('0x4')]();var fs_extra=require(_0xf892('0x5'));var auth=require(_0xf892('0x6'));var interaction=require(_0xf892('0x7'));var config=require(_0xf892('0x8'));var controller=require('./mailTransferReport.controller');router[_0xf892('0x9')]('/',auth['isAuthenticated'](),controller[_0xf892('0xa')]);router[_0xf892('0x9')](_0xf892('0xb'),auth['isAuthenticated'](),controller[_0xf892('0xc')]);router['get'](_0xf892('0xd'),auth[_0xf892('0xe')](),controller['show']);router['post']('/',auth['isAuthenticated'](),controller[_0xf892('0xf')]);router['put'](_0xf892('0xd'),auth['isAuthenticated'](),controller[_0xf892('0x10')]);router[_0xf892('0x11')]('/:id',auth[_0xf892('0xe')](),controller['destroy']);module[_0xf892('0x12')]=router;
\ No newline at end of file
index 1cc3b90..e5c89c6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf4eb=['NOW','moment','account','queue','DATE'];(function(_0x56ebb4,_0x19cacb){var _0x1fbb7f=function(_0x5354ce){while(--_0x5354ce){_0x56ebb4['push'](_0x56ebb4['shift']());}};_0x1fbb7f(++_0x19cacb);}(_0xf4eb,0xec));var _0xbf4e=function(_0x54858c,_0x4aa170){_0x54858c=_0x54858c-0x0;var _0x4466d0=_0xf4eb[_0x54858c];return _0x4466d0;};'use strict';var moment=require(_0xbf4e('0x0'));var Sequelize=require('sequelize');module['exports']={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0xbf4e('0x1'),'agent','queue'),'allowNull':![],'defaultValue':_0xbf4e('0x2')},'transferredAt':{'type':Sequelize[_0xbf4e('0x3')],'allowNull':![],'defaultValue':Sequelize[_0xbf4e('0x4')]}};
\ No newline at end of file
+var _0xb43b=['DATE','NOW','moment','sequelize','STRING','ENUM','account','queue'];(function(_0x2c69a1,_0x201903){var _0x24bb91=function(_0x3131ac){while(--_0x3131ac){_0x2c69a1['push'](_0x2c69a1['shift']());}};_0x24bb91(++_0x201903);}(_0xb43b,0x1b2));var _0xbb43=function(_0x4674ae,_0x55ff05){_0x4674ae=_0x4674ae-0x0;var _0x2b052a=_0xb43b[_0x4674ae];return _0x2b052a;};'use strict';var moment=require(_0xbb43('0x0'));var Sequelize=require(_0xbb43('0x1'));module['exports']={'uniqueid':{'type':Sequelize[_0xbb43('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0xbb43('0x3')](_0xbb43('0x4'),'agent',_0xbb43('0x5')),'allowNull':![],'defaultValue':_0xbb43('0x5')},'transferredAt':{'type':Sequelize[_0xbb43('0x6')],'allowNull':![],'defaultValue':Sequelize[_0xbb43('0x7')]}};
\ No newline at end of file
index 4ddaacb..120c242 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0444=['where','type','VIRTUAL','merge','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','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/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','reject','save','update','then','destroy','error','stack','name','send','index','map','MailTransferReport','rawAttributes','key','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','pick','filter'];(function(_0x45812c,_0x5442eb){var _0x234115=function(_0x2e4dfe){while(--_0x2e4dfe){_0x45812c['push'](_0x45812c['shift']());}};_0x234115(++_0x5442eb);}(_0x0444,0xaa));var _0x4044=function(_0x408de0,_0x3c5b89){_0x408de0=_0x408de0-0x0;var _0x21e649=_0x0444[_0x408de0];return _0x21e649;};'use strict';var emlformat=require(_0x4044('0x0'));var rimraf=require(_0x4044('0x1'));var zipdir=require(_0x4044('0x2'));var jsonpatch=require(_0x4044('0x3'));var rp=require('request-promise');var moment=require(_0x4044('0x4'));var BPromise=require(_0x4044('0x5'));var Mustache=require(_0x4044('0x6'));var util=require(_0x4044('0x7'));var path=require('path');var sox=require(_0x4044('0x8'));var csv=require(_0x4044('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x4044('0xa'));var _=require('lodash');var squel=require(_0x4044('0xb'));var crypto=require(_0x4044('0xc'));var jsforce=require(_0x4044('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x4044('0x9'));var querystring=require(_0x4044('0xe'));var Papa=require(_0x4044('0xf'));var Redis=require(_0x4044('0x10'));var authService=require(_0x4044('0x11'));var qs=require(_0x4044('0x12'));var as=require(_0x4044('0x13'));var hardwareService=require(_0x4044('0x14'));var logger=require('../../config/logger')(_0x4044('0x15'));var utils=require('../../config/utils');var config=require(_0x4044('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0x4044('0x17'))['db'];function respondWithStatusCode(_0x38a10a,_0x42a16c){_0x42a16c=_0x42a16c||0xcc;return function(_0x3b46be){if(_0x3b46be){return _0x38a10a[_0x4044('0x18')](_0x42a16c);}return _0x38a10a[_0x4044('0x19')](_0x42a16c)[_0x4044('0x1a')]();};}function respondWithResult(_0x1ad916,_0x53289d){_0x53289d=_0x53289d||0xc8;return function(_0xe85daf){if(_0xe85daf){return _0x1ad916['status'](_0x53289d)[_0x4044('0x1b')](_0xe85daf);}};}function respondWithFilteredResult(_0x13762d,_0x4f2691){return function(_0x5dfb61){if(_0x5dfb61){var _0x2ed2ea=typeof _0x4f2691[_0x4044('0x1c')]===_0x4044('0x1d')&&typeof _0x4f2691['limit']===_0x4044('0x1d');var _0x25182c=_0x5dfb61[_0x4044('0x1e')];var _0x532989=_0x2ed2ea?0x0:_0x4f2691['offset'];var _0x335e21=_0x2ed2ea?_0x5dfb61[_0x4044('0x1e')]:_0x4f2691['offset']+_0x4f2691[_0x4044('0x1f')];var _0x31c100;if(_0x335e21>=_0x25182c){_0x335e21=_0x25182c;_0x31c100=0xc8;}else{_0x31c100=0xce;}_0x13762d['status'](_0x31c100);return _0x13762d[_0x4044('0x20')](_0x4044('0x21'),_0x532989+'-'+_0x335e21+'/'+_0x25182c)[_0x4044('0x1b')](_0x5dfb61);}return null;};}function patchUpdates(_0x1f18d1){return function(_0x4844fc){try{jsonpatch['apply'](_0x4844fc,_0x1f18d1,!![]);}catch(_0x427f49){return BPromise[_0x4044('0x22')](_0x427f49);}return _0x4844fc[_0x4044('0x23')]();};}function saveUpdates(_0x1da435,_0x15709b){return function(_0x18c93e){if(_0x18c93e){return _0x18c93e[_0x4044('0x24')](_0x1da435)[_0x4044('0x25')](function(_0x14131d){return _0x14131d;});}return null;};}function removeEntity(_0x43c788,_0xdb9548){return function(_0x2592f6){if(_0x2592f6){return _0x2592f6[_0x4044('0x26')]()[_0x4044('0x25')](function(){_0x43c788[_0x4044('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5cbb5b,_0x1dfd26){return function(_0x51079e){if(!_0x51079e){_0x5cbb5b[_0x4044('0x18')](0x194);}return _0x51079e;};}function handleError(_0x41e755,_0x275a1f){_0x275a1f=_0x275a1f||0x1f4;return function(_0x46159a){logger[_0x4044('0x27')](_0x46159a[_0x4044('0x28')]);if(_0x46159a[_0x4044('0x29')]){delete _0x46159a[_0x4044('0x29')];}_0x41e755[_0x4044('0x19')](_0x275a1f)[_0x4044('0x2a')](_0x46159a);};}exports[_0x4044('0x2b')]=function(_0x184fff,_0x5d5c24){var _0x3c3c9d={},_0x1f6d5e={},_0x2a7ae8={'count':0x0,'rows':[]};var _0x352c30=_[_0x4044('0x2c')](db[_0x4044('0x2d')][_0x4044('0x2e')],function(_0x303d01){return{'name':_0x303d01['fieldName'],'type':_0x303d01['type'][_0x4044('0x2f')]};});_0x1f6d5e[_0x4044('0x30')]=_[_0x4044('0x2c')](_0x352c30,'name');_0x1f6d5e['query']=_[_0x4044('0x31')](_0x184fff[_0x4044('0x32')]);_0x1f6d5e[_0x4044('0x33')]=_[_0x4044('0x34')](_0x1f6d5e[_0x4044('0x30')],_0x1f6d5e[_0x4044('0x32')]);_0x3c3c9d[_0x4044('0x35')]=_[_0x4044('0x34')](_0x1f6d5e[_0x4044('0x30')],qs[_0x4044('0x36')](_0x184fff[_0x4044('0x32')][_0x4044('0x36')]));_0x3c3c9d[_0x4044('0x35')]=_0x3c3c9d['attributes'][_0x4044('0x37')]?_0x3c3c9d[_0x4044('0x35')]:_0x1f6d5e[_0x4044('0x30')];if(!_0x184fff[_0x4044('0x32')][_0x4044('0x38')](_0x4044('0x39'))){_0x3c3c9d[_0x4044('0x1f')]=qs['limit'](_0x184fff[_0x4044('0x32')][_0x4044('0x1f')]);_0x3c3c9d['offset']=qs[_0x4044('0x1c')](_0x184fff[_0x4044('0x32')][_0x4044('0x1c')]);}_0x3c3c9d['order']=qs['sort'](_0x184fff[_0x4044('0x32')][_0x4044('0x3a')]);_0x3c3c9d['where']=qs['filters'](_[_0x4044('0x3b')](_0x184fff[_0x4044('0x32')],_0x1f6d5e[_0x4044('0x33')]),_0x352c30);if(_0x184fff[_0x4044('0x32')][_0x4044('0x3c')]){_0x3c3c9d[_0x4044('0x3d')]=_['merge'](_0x3c3c9d[_0x4044('0x3d')],{'$or':_[_0x4044('0x2c')](_0x352c30,function(_0x416b66){if(_0x416b66[_0x4044('0x3e')]!==_0x4044('0x3f')){var _0x18e38d={};_0x18e38d[_0x416b66[_0x4044('0x29')]]={'$like':'%'+_0x184fff[_0x4044('0x32')]['filter']+'%'};return _0x18e38d;}})});}_0x3c3c9d=_[_0x4044('0x40')]({},_0x3c3c9d,_0x184fff[_0x4044('0x41')]);var _0x112153={'where':_0x3c3c9d[_0x4044('0x3d')]};return db[_0x4044('0x2d')]['count'](_0x112153)['then'](function(_0x2fd49d){_0x2a7ae8[_0x4044('0x1e')]=_0x2fd49d;if(_0x184fff[_0x4044('0x32')][_0x4044('0x42')]){_0x3c3c9d[_0x4044('0x43')]=[{'all':!![]}];}return db[_0x4044('0x2d')][_0x4044('0x44')](_0x3c3c9d);})[_0x4044('0x25')](function(_0x281194){_0x2a7ae8[_0x4044('0x45')]=_0x281194;return _0x2a7ae8;})['then'](respondWithFilteredResult(_0x5d5c24,_0x3c3c9d))[_0x4044('0x46')](handleError(_0x5d5c24,null));};exports[_0x4044('0x47')]=function(_0x4bed68,_0x372820){var _0x35be11={'raw':!![],'where':{'id':_0x4bed68[_0x4044('0x48')]['id']}},_0x4bd812={};_0x4bd812[_0x4044('0x30')]=_[_0x4044('0x31')](db['MailTransferReport']['rawAttributes']);_0x4bd812[_0x4044('0x32')]=_[_0x4044('0x31')](_0x4bed68[_0x4044('0x32')]);_0x4bd812[_0x4044('0x33')]=_['intersection'](_0x4bd812[_0x4044('0x30')],_0x4bd812[_0x4044('0x32')]);_0x35be11[_0x4044('0x35')]=_[_0x4044('0x34')](_0x4bd812[_0x4044('0x30')],qs['fields'](_0x4bed68['query']['fields']));_0x35be11[_0x4044('0x35')]=_0x35be11[_0x4044('0x35')][_0x4044('0x37')]?_0x35be11['attributes']:_0x4bd812[_0x4044('0x30')];if(_0x4bed68[_0x4044('0x32')]['includeAll']){_0x35be11[_0x4044('0x43')]=[{'all':!![]}];}_0x35be11=_['merge']({},_0x35be11,_0x4bed68[_0x4044('0x41')]);return db[_0x4044('0x2d')][_0x4044('0x49')](_0x35be11)[_0x4044('0x25')](handleEntityNotFound(_0x372820,null))[_0x4044('0x25')](respondWithResult(_0x372820,null))[_0x4044('0x46')](handleError(_0x372820,null));};exports[_0x4044('0x4a')]=function(_0x205861,_0x53cd02){return db[_0x4044('0x2d')][_0x4044('0x4a')](_0x205861[_0x4044('0x4b')],{})['then'](respondWithResult(_0x53cd02,0xc9))['catch'](handleError(_0x53cd02,null));};exports[_0x4044('0x24')]=function(_0x332469,_0xfca6b6){if(_0x332469[_0x4044('0x4b')]['id']){delete _0x332469[_0x4044('0x4b')]['id'];}return db[_0x4044('0x2d')][_0x4044('0x49')]({'where':{'id':_0x332469[_0x4044('0x48')]['id']}})[_0x4044('0x25')](handleEntityNotFound(_0xfca6b6,null))['then'](saveUpdates(_0x332469[_0x4044('0x4b')],null))[_0x4044('0x25')](respondWithResult(_0xfca6b6,null))[_0x4044('0x46')](handleError(_0xfca6b6,null));};exports[_0x4044('0x26')]=function(_0x556fd8,_0x3dba99){return db['MailTransferReport'][_0x4044('0x49')]({'where':{'id':_0x556fd8[_0x4044('0x48')]['id']}})[_0x4044('0x25')](handleEntityNotFound(_0x3dba99,null))[_0x4044('0x25')](removeEntity(_0x3dba99,null))[_0x4044('0x46')](handleError(_0x3dba99,null));};exports['describe']=function(_0x30574a,_0x2a07fa){return db['MailTransferReport'][_0x4044('0x4c')]()['then'](respondWithResult(_0x2a07fa,null))[_0x4044('0x46')](handleError(_0x2a07fa,null));};
\ No newline at end of file
+var _0xb209=['set','reject','save','update','then','destroy','error','stack','name','send','map','MailTransferReport','rawAttributes','fieldName','type','key','model','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','options','includeAll','include','findAll','show','keys','find','catch','create','body','params','describe','eml-format','rimraf','zip-dir','moment','bluebird','util','sox','ejs','fs-extra','lodash','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit'];(function(_0x39ff78,_0x4c2640){var _0x323ee3=function(_0x34417d){while(--_0x34417d){_0x39ff78['push'](_0x39ff78['shift']());}};_0x323ee3(++_0x4c2640);}(_0xb209,0x105));var _0x9b20=function(_0xb32c3f,_0x3fff3b){_0xb32c3f=_0xb32c3f-0x0;var _0x55eb6e=_0xb209[_0xb32c3f];return _0x55eb6e;};'use strict';var emlformat=require(_0x9b20('0x0'));var rimraf=require(_0x9b20('0x1'));var zipdir=require(_0x9b20('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x9b20('0x3'));var BPromise=require(_0x9b20('0x4'));var Mustache=require('mustache');var util=require(_0x9b20('0x5'));var path=require('path');var sox=require(_0x9b20('0x6'));var csv=require('to-csv');var ejs=require(_0x9b20('0x7'));var fs=require('fs');var fs_extra=require(_0x9b20('0x8'));var _=require(_0x9b20('0x9'));var squel=require('squel');var crypto=require(_0x9b20('0xa'));var jsforce=require(_0x9b20('0xb'));var deskjs=require(_0x9b20('0xc'));var toCsv=require(_0x9b20('0xd'));var querystring=require('querystring');var Papa=require(_0x9b20('0xe'));var Redis=require(_0x9b20('0xf'));var authService=require(_0x9b20('0x10'));var qs=require(_0x9b20('0x11'));var as=require(_0x9b20('0x12'));var hardwareService=require(_0x9b20('0x13'));var logger=require('../../config/logger')('api');var utils=require(_0x9b20('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0x9b20('0x15'));var db=require(_0x9b20('0x16'))['db'];function respondWithStatusCode(_0x195904,_0x3a9b49){_0x3a9b49=_0x3a9b49||0xcc;return function(_0x23eefc){if(_0x23eefc){return _0x195904[_0x9b20('0x17')](_0x3a9b49);}return _0x195904[_0x9b20('0x18')](_0x3a9b49)[_0x9b20('0x19')]();};}function respondWithResult(_0x54f500,_0x396d68){_0x396d68=_0x396d68||0xc8;return function(_0xc028c9){if(_0xc028c9){return _0x54f500[_0x9b20('0x18')](_0x396d68)[_0x9b20('0x1a')](_0xc028c9);}};}function respondWithFilteredResult(_0x561b9f,_0x3d5fa2){return function(_0x45482c){if(_0x45482c){var _0x59bc32=typeof _0x3d5fa2[_0x9b20('0x1b')]===_0x9b20('0x1c')&&typeof _0x3d5fa2['limit']===_0x9b20('0x1c');var _0x29f84e=_0x45482c[_0x9b20('0x1d')];var _0x3f0bb6=_0x59bc32?0x0:_0x3d5fa2['offset'];var _0x3f9821=_0x59bc32?_0x45482c['count']:_0x3d5fa2[_0x9b20('0x1b')]+_0x3d5fa2[_0x9b20('0x1e')];var _0xc1f723;if(_0x3f9821>=_0x29f84e){_0x3f9821=_0x29f84e;_0xc1f723=0xc8;}else{_0xc1f723=0xce;}_0x561b9f[_0x9b20('0x18')](_0xc1f723);return _0x561b9f[_0x9b20('0x1f')]('Content-Range',_0x3f0bb6+'-'+_0x3f9821+'/'+_0x29f84e)[_0x9b20('0x1a')](_0x45482c);}return null;};}function patchUpdates(_0x35b746){return function(_0x4afac8){try{jsonpatch['apply'](_0x4afac8,_0x35b746,!![]);}catch(_0x49a474){return BPromise[_0x9b20('0x20')](_0x49a474);}return _0x4afac8[_0x9b20('0x21')]();};}function saveUpdates(_0x4a7bb8,_0x5ac6e4){return function(_0x16b562){if(_0x16b562){return _0x16b562[_0x9b20('0x22')](_0x4a7bb8)[_0x9b20('0x23')](function(_0x43aa8f){return _0x43aa8f;});}return null;};}function removeEntity(_0x5ae0ab,_0x46266e){return function(_0x13fd88){if(_0x13fd88){return _0x13fd88[_0x9b20('0x24')]()[_0x9b20('0x23')](function(){_0x5ae0ab[_0x9b20('0x18')](0xcc)[_0x9b20('0x19')]();});}};}function handleEntityNotFound(_0x4fe55c,_0x251865){return function(_0x2f44b0){if(!_0x2f44b0){_0x4fe55c['sendStatus'](0x194);}return _0x2f44b0;};}function handleError(_0x462e4e,_0x546448){_0x546448=_0x546448||0x1f4;return function(_0x2604b1){logger[_0x9b20('0x25')](_0x2604b1[_0x9b20('0x26')]);if(_0x2604b1[_0x9b20('0x27')]){delete _0x2604b1[_0x9b20('0x27')];}_0x462e4e[_0x9b20('0x18')](_0x546448)[_0x9b20('0x28')](_0x2604b1);};}exports['index']=function(_0x1d49d0,_0x450960){var _0x1cad4c={},_0xcfe102={},_0x5623d9={'count':0x0,'rows':[]};var _0x19d675=_[_0x9b20('0x29')](db[_0x9b20('0x2a')][_0x9b20('0x2b')],function(_0x171dd9){return{'name':_0x171dd9[_0x9b20('0x2c')],'type':_0x171dd9[_0x9b20('0x2d')][_0x9b20('0x2e')]};});_0xcfe102[_0x9b20('0x2f')]=_[_0x9b20('0x29')](_0x19d675,_0x9b20('0x27'));_0xcfe102['query']=_['keys'](_0x1d49d0[_0x9b20('0x30')]);_0xcfe102[_0x9b20('0x31')]=_[_0x9b20('0x32')](_0xcfe102[_0x9b20('0x2f')],_0xcfe102['query']);_0x1cad4c['attributes']=_[_0x9b20('0x32')](_0xcfe102['model'],qs['fields'](_0x1d49d0['query'][_0x9b20('0x33')]));_0x1cad4c[_0x9b20('0x34')]=_0x1cad4c[_0x9b20('0x34')][_0x9b20('0x35')]?_0x1cad4c['attributes']:_0xcfe102[_0x9b20('0x2f')];if(!_0x1d49d0[_0x9b20('0x30')][_0x9b20('0x36')](_0x9b20('0x37'))){_0x1cad4c[_0x9b20('0x1e')]=qs[_0x9b20('0x1e')](_0x1d49d0[_0x9b20('0x30')][_0x9b20('0x1e')]);_0x1cad4c[_0x9b20('0x1b')]=qs[_0x9b20('0x1b')](_0x1d49d0[_0x9b20('0x30')][_0x9b20('0x1b')]);}_0x1cad4c[_0x9b20('0x38')]=qs['sort'](_0x1d49d0[_0x9b20('0x30')][_0x9b20('0x39')]);_0x1cad4c[_0x9b20('0x3a')]=qs[_0x9b20('0x31')](_['pick'](_0x1d49d0['query'],_0xcfe102[_0x9b20('0x31')]),_0x19d675);if(_0x1d49d0[_0x9b20('0x30')][_0x9b20('0x3b')]){_0x1cad4c[_0x9b20('0x3a')]=_[_0x9b20('0x3c')](_0x1cad4c[_0x9b20('0x3a')],{'$or':_[_0x9b20('0x29')](_0x19d675,function(_0x341157){if(_0x341157[_0x9b20('0x2d')]!=='VIRTUAL'){var _0x313db9={};_0x313db9[_0x341157[_0x9b20('0x27')]]={'$like':'%'+_0x1d49d0[_0x9b20('0x30')]['filter']+'%'};return _0x313db9;}})});}_0x1cad4c=_[_0x9b20('0x3c')]({},_0x1cad4c,_0x1d49d0[_0x9b20('0x3d')]);var _0x2eb158={'where':_0x1cad4c[_0x9b20('0x3a')]};return db[_0x9b20('0x2a')][_0x9b20('0x1d')](_0x2eb158)['then'](function(_0x2d1827){_0x5623d9[_0x9b20('0x1d')]=_0x2d1827;if(_0x1d49d0['query'][_0x9b20('0x3e')]){_0x1cad4c[_0x9b20('0x3f')]=[{'all':!![]}];}return db[_0x9b20('0x2a')][_0x9b20('0x40')](_0x1cad4c);})['then'](function(_0x11612d){_0x5623d9['rows']=_0x11612d;return _0x5623d9;})[_0x9b20('0x23')](respondWithFilteredResult(_0x450960,_0x1cad4c))['catch'](handleError(_0x450960,null));};exports[_0x9b20('0x41')]=function(_0x5f4f5b,_0x5b6856){var _0x34c585={'raw':!![],'where':{'id':_0x5f4f5b['params']['id']}},_0x4e1ef5={};_0x4e1ef5[_0x9b20('0x2f')]=_[_0x9b20('0x42')](db[_0x9b20('0x2a')]['rawAttributes']);_0x4e1ef5[_0x9b20('0x30')]=_[_0x9b20('0x42')](_0x5f4f5b[_0x9b20('0x30')]);_0x4e1ef5[_0x9b20('0x31')]=_['intersection'](_0x4e1ef5[_0x9b20('0x2f')],_0x4e1ef5[_0x9b20('0x30')]);_0x34c585[_0x9b20('0x34')]=_[_0x9b20('0x32')](_0x4e1ef5[_0x9b20('0x2f')],qs[_0x9b20('0x33')](_0x5f4f5b['query'][_0x9b20('0x33')]));_0x34c585[_0x9b20('0x34')]=_0x34c585['attributes'][_0x9b20('0x35')]?_0x34c585[_0x9b20('0x34')]:_0x4e1ef5[_0x9b20('0x2f')];if(_0x5f4f5b[_0x9b20('0x30')][_0x9b20('0x3e')]){_0x34c585[_0x9b20('0x3f')]=[{'all':!![]}];}_0x34c585=_[_0x9b20('0x3c')]({},_0x34c585,_0x5f4f5b['options']);return db[_0x9b20('0x2a')][_0x9b20('0x43')](_0x34c585)[_0x9b20('0x23')](handleEntityNotFound(_0x5b6856,null))[_0x9b20('0x23')](respondWithResult(_0x5b6856,null))[_0x9b20('0x44')](handleError(_0x5b6856,null));};exports[_0x9b20('0x45')]=function(_0x316f49,_0x5a9e3a){return db[_0x9b20('0x2a')][_0x9b20('0x45')](_0x316f49[_0x9b20('0x46')],{})[_0x9b20('0x23')](respondWithResult(_0x5a9e3a,0xc9))[_0x9b20('0x44')](handleError(_0x5a9e3a,null));};exports[_0x9b20('0x22')]=function(_0x2d9393,_0x42089a){if(_0x2d9393[_0x9b20('0x46')]['id']){delete _0x2d9393['body']['id'];}return db['MailTransferReport'][_0x9b20('0x43')]({'where':{'id':_0x2d9393[_0x9b20('0x47')]['id']}})[_0x9b20('0x23')](handleEntityNotFound(_0x42089a,null))[_0x9b20('0x23')](saveUpdates(_0x2d9393[_0x9b20('0x46')],null))['then'](respondWithResult(_0x42089a,null))[_0x9b20('0x44')](handleError(_0x42089a,null));};exports['destroy']=function(_0x16842a,_0x289132){return db[_0x9b20('0x2a')][_0x9b20('0x43')]({'where':{'id':_0x16842a[_0x9b20('0x47')]['id']}})[_0x9b20('0x23')](handleEntityNotFound(_0x289132,null))['then'](removeEntity(_0x289132,null))[_0x9b20('0x44')](handleError(_0x289132,null));};exports[_0x9b20('0x48')]=function(_0x25a386,_0x308300){return db[_0x9b20('0x2a')][_0x9b20('0x48')]()[_0x9b20('0x23')](respondWithResult(_0x308300,null))[_0x9b20('0x44')](handleError(_0x308300,null));};
\ No newline at end of file
index 1cc37f6..9eff841 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x79d3=['../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./mailTransferReport.attributes','exports','MailTransferReport','uniqueid','lodash'];(function(_0x22f8ab,_0x15d8ff){var _0x2a70e5=function(_0x5e6895){while(--_0x5e6895){_0x22f8ab['push'](_0x22f8ab['shift']());}};_0x2a70e5(++_0x15d8ff);}(_0x79d3,0x15f));var _0x379d=function(_0xfc8faf,_0x86244a){_0xfc8faf=_0xfc8faf-0x0;var _0x48c40b=_0x79d3[_0xfc8faf];return _0x48c40b;};'use strict';var _=require(_0x379d('0x0'));var util=require('util');var logger=require(_0x379d('0x1'))('api');var moment=require(_0x379d('0x2'));var BPromise=require(_0x379d('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x379d('0x4'));var rimraf=require(_0x379d('0x5'));var config=require(_0x379d('0x6'));var attributes=require(_0x379d('0x7'));module[_0x379d('0x8')]=function(_0x2078a6,_0x2a1b43){return _0x2078a6['define'](_0x379d('0x9'),attributes,{'tableName':'report_mail_transfer','paranoid':![],'indexes':[{'name':_0x379d('0xa'),'fields':[_0x379d('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x45aa=['../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./mailTransferReport.attributes','exports','define','MailTransferReport','report_mail_transfer','uniqueid','util'];(function(_0x323749,_0x1f9fe7){var _0xa1ba97=function(_0x5436df){while(--_0x5436df){_0x323749['push'](_0x323749['shift']());}};_0xa1ba97(++_0x1f9fe7);}(_0x45aa,0xdf));var _0xa45a=function(_0x467e63,_0x1c85e8){_0x467e63=_0x467e63-0x0;var _0x54cbce=_0x45aa[_0x467e63];return _0x54cbce;};'use strict';var _=require('lodash');var util=require(_0xa45a('0x0'));var logger=require(_0xa45a('0x1'))(_0xa45a('0x2'));var moment=require(_0xa45a('0x3'));var BPromise=require('bluebird');var rp=require(_0xa45a('0x4'));var fs=require('fs');var path=require(_0xa45a('0x5'));var rimraf=require(_0xa45a('0x6'));var config=require(_0xa45a('0x7'));var attributes=require(_0xa45a('0x8'));module[_0xa45a('0x9')]=function(_0x38cd0c,_0x527758){return _0x38cd0c[_0xa45a('0xa')](_0xa45a('0xb'),attributes,{'tableName':_0xa45a('0xc'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0xa45a('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
index 0f987a7..0879b02 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x522e=['message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','info','debug','MailTransferReport,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','MailTransferReport,\x20%s,\x20%s'];(function(_0x2c45c4,_0x4bb43b){var _0x34540a=function(_0x3398f4){while(--_0x3398f4){_0x2c45c4['push'](_0x2c45c4['shift']());}};_0x34540a(++_0x4bb43b);}(_0x522e,0xff));var _0xe522=function(_0x338c70,_0x3f1c09){_0x338c70=_0x338c70-0x0;var _0x165103=_0x522e[_0x338c70];return _0x165103;};'use strict';var _=require(_0xe522('0x0'));var util=require(_0xe522('0x1'));var moment=require(_0xe522('0x2'));var BPromise=require(_0xe522('0x3'));var rs=require(_0xe522('0x4'));var fs=require('fs');var Redis=require(_0xe522('0x5'));var db=require(_0xe522('0x6'))['db'];var utils=require(_0xe522('0x7'));var logger=require(_0xe522('0x8'))('rpc');var config=require(_0xe522('0x9'));var jayson=require(_0xe522('0xa'));var client=jayson[_0xe522('0xb')][_0xe522('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x30803a,_0x2f8152,_0x559fdb){return new BPromise(function(_0x2abf67,_0x486214){return client[_0xe522('0xd')](_0x30803a,_0x559fdb)['then'](function(_0x2460d2){logger[_0xe522('0xe')]('MailTransferReport,\x20%s,\x20%s',_0x2f8152,'request\x20sent');logger[_0xe522('0xf')](_0xe522('0x10'),_0x2f8152,_0xe522('0x11'),JSON['stringify'](_0x2460d2));if(_0x2460d2[_0xe522('0x12')]){if(_0x2460d2[_0xe522('0x12')][_0xe522('0x13')]===0x1f4){logger[_0xe522('0x12')](_0xe522('0x14'),_0x2f8152,_0x2460d2[_0xe522('0x12')][_0xe522('0x15')]);return _0x486214(_0x2460d2[_0xe522('0x12')]['message']);}logger[_0xe522('0x12')](_0xe522('0x14'),_0x2f8152,_0x2460d2[_0xe522('0x12')]['message']);return _0x2abf67(_0x2460d2['error'][_0xe522('0x15')]);}else{logger['info'](_0xe522('0x14'),_0x2f8152,_0xe522('0x11'));_0x2abf67(_0x2460d2[_0xe522('0x16')][_0xe522('0x15')]);}})['catch'](function(_0x1cf562){logger[_0xe522('0x12')](_0xe522('0x14'),_0x2f8152,_0x1cf562);_0x486214(_0x1cf562);});});}
\ No newline at end of file
+var _0x35fd=['code','MailTransferReport,\x20%s,\x20%s','message','result','catch','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','request\x20sent','debug','MailTransferReport,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x531d15,_0x599af5){var _0x271a18=function(_0x31284d){while(--_0x31284d){_0x531d15['push'](_0x531d15['shift']());}};_0x271a18(++_0x599af5);}(_0x35fd,0x65));var _0xd35f=function(_0x289e1a,_0x50acdd){_0x289e1a=_0x289e1a-0x0;var _0x391c45=_0x35fd[_0x289e1a];return _0x391c45;};'use strict';var _=require(_0xd35f('0x0'));var util=require('util');var moment=require(_0xd35f('0x1'));var BPromise=require('bluebird');var rs=require(_0xd35f('0x2'));var fs=require('fs');var Redis=require(_0xd35f('0x3'));var db=require(_0xd35f('0x4'))['db'];var utils=require(_0xd35f('0x5'));var logger=require(_0xd35f('0x6'))(_0xd35f('0x7'));var config=require(_0xd35f('0x8'));var jayson=require(_0xd35f('0x9'));var client=jayson['client'][_0xd35f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2e3476,_0x25a950,_0x2e7ccd){return new BPromise(function(_0x201abc,_0x28a8e6){return client[_0xd35f('0xb')](_0x2e3476,_0x2e7ccd)[_0xd35f('0xc')](function(_0x35e23c){logger[_0xd35f('0xd')]('MailTransferReport,\x20%s,\x20%s',_0x25a950,_0xd35f('0xe'));logger[_0xd35f('0xf')](_0xd35f('0x10'),_0x25a950,'request\x20sent',JSON[_0xd35f('0x11')](_0x35e23c));if(_0x35e23c[_0xd35f('0x12')]){if(_0x35e23c[_0xd35f('0x12')][_0xd35f('0x13')]===0x1f4){logger[_0xd35f('0x12')](_0xd35f('0x14'),_0x25a950,_0x35e23c['error']['message']);return _0x28a8e6(_0x35e23c[_0xd35f('0x12')][_0xd35f('0x15')]);}logger['error'](_0xd35f('0x14'),_0x25a950,_0x35e23c[_0xd35f('0x12')][_0xd35f('0x15')]);return _0x201abc(_0x35e23c[_0xd35f('0x12')][_0xd35f('0x15')]);}else{logger['info']('MailTransferReport,\x20%s,\x20%s',_0x25a950,'request\x20sent');_0x201abc(_0x35e23c[_0xd35f('0x16')][_0xd35f('0x15')]);}})[_0xd35f('0x17')](function(_0x5b1fc2){logger[_0xd35f('0x12')](_0xd35f('0x14'),_0x25a950,_0x5b1fc2);_0x28a8e6(_0x5b1fc2);});});}
\ No newline at end of file
index 372c4ca..cefea35 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x685b=['destroy','exports','multer','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/describe','describe','/:id','show','update'];(function(_0x3ee8fc,_0x25babf){var _0x525fb6=function(_0x14e4b2){while(--_0x14e4b2){_0x3ee8fc['push'](_0x3ee8fc['shift']());}};_0x525fb6(++_0x25babf);}(_0x685b,0xbd));var _0xb685=function(_0x1af577,_0x1bd440){_0x1af577=_0x1af577-0x0;var _0x18ec4f=_0x685b[_0x1af577];return _0x18ec4f;};'use strict';var multer=require(_0xb685('0x0'));var util=require('util');var path=require(_0xb685('0x1'));var timeout=require(_0xb685('0x2'));var express=require('express');var router=express[_0xb685('0x3')]();var fs_extra=require(_0xb685('0x4'));var auth=require(_0xb685('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xb685('0x6'));var controller=require('./memberReport.controller');router[_0xb685('0x7')]('/',auth[_0xb685('0x8')](),controller[_0xb685('0x9')]);router[_0xb685('0x7')](_0xb685('0xa'),auth['isAuthenticated'](),controller[_0xb685('0xb')]);router['get'](_0xb685('0xc'),auth[_0xb685('0x8')](),controller[_0xb685('0xd')]);router['post']('/',auth[_0xb685('0x8')](),controller['create']);router['put'](_0xb685('0xc'),auth[_0xb685('0x8')](),controller[_0xb685('0xe')]);router['delete'](_0xb685('0xc'),auth[_0xb685('0x8')](),controller[_0xb685('0xf')]);module[_0xb685('0x10')]=router;
\ No newline at end of file
+var _0x964c=['show','post','create','update','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./memberReport.controller','isAuthenticated','index','get','/describe','describe','/:id'];(function(_0x5cf2eb,_0x47306a){var _0x5f3804=function(_0x4546f1){while(--_0x4546f1){_0x5cf2eb['push'](_0x5cf2eb['shift']());}};_0x5f3804(++_0x47306a);}(_0x964c,0x15f));var _0xc964=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x964c[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0xc964('0x0'));var util=require(_0xc964('0x1'));var path=require(_0xc964('0x2'));var timeout=require(_0xc964('0x3'));var express=require(_0xc964('0x4'));var router=express[_0xc964('0x5')]();var fs_extra=require(_0xc964('0x6'));var auth=require(_0xc964('0x7'));var interaction=require(_0xc964('0x8'));var config=require(_0xc964('0x9'));var controller=require(_0xc964('0xa'));router['get']('/',auth[_0xc964('0xb')](),controller[_0xc964('0xc')]);router[_0xc964('0xd')](_0xc964('0xe'),auth[_0xc964('0xb')](),controller[_0xc964('0xf')]);router[_0xc964('0xd')](_0xc964('0x10'),auth['isAuthenticated'](),controller[_0xc964('0x11')]);router[_0xc964('0x12')]('/',auth['isAuthenticated'](),controller[_0xc964('0x13')]);router['put'](_0xc964('0x10'),auth[_0xc964('0xb')](),controller[_0xc964('0x14')]);router['delete'](_0xc964('0x10'),auth[_0xc964('0xb')](),controller[_0xc964('0x15')]);module[_0xc964('0x16')]=router;
\ No newline at end of file
index 075bd4e..d04f422 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaa11=['duration','talk:[inbound,\x20outbound],\x20pause:[reason]','talk:[start]','talk:[destination]','talk:[dial\x20string]','talk:[queue]','sequelize','exports','STRING','DEFAULT\x20PAUSE','LOGIN,\x20PAUSE,\x20TALKING','INTEGER','DATE','getDataValue','enterAt','diff','seconds','setDataValue','exitAt'];(function(_0x44747b,_0x25f797){var _0x14c42b=function(_0x1f7293){while(--_0x1f7293){_0x44747b['push'](_0x44747b['shift']());}};_0x14c42b(++_0x25f797);}(_0xaa11,0x110));var _0x1aa1=function(_0xf44d98,_0x12a472){_0xf44d98=_0xf44d98-0x0;var _0x5ebb04=_0xaa11[_0xf44d98];return _0x5ebb04;};'use strict';var Sequelize=require(_0x1aa1('0x0'));var moment=require('moment');module[_0x1aa1('0x1')]={'channel':{'type':Sequelize[_0x1aa1('0x2')]},'membername':{'type':Sequelize[_0x1aa1('0x2')]},'interface':{'type':Sequelize[_0x1aa1('0x2')]},'type':{'type':Sequelize[_0x1aa1('0x2')],'defaultValue':_0x1aa1('0x3'),'comment':_0x1aa1('0x4')},'duration':{'type':Sequelize[_0x1aa1('0x5')]},'enterAt':{'type':Sequelize[_0x1aa1('0x6')]},'exitAt':{'type':Sequelize[_0x1aa1('0x6')],'set':function(_0x4b299e){var _0x34fe52=moment(_0x4b299e);var _0x30f9b1=moment(this[_0x1aa1('0x7')](_0x1aa1('0x8')));var _0x26fe94=_0x34fe52[_0x1aa1('0x9')](_0x30f9b1,_0x1aa1('0xa'));this[_0x1aa1('0xb')](_0x1aa1('0xc'),_0x4b299e);this[_0x1aa1('0xb')](_0x1aa1('0xd'),_0x26fe94>=0x0?_0x26fe94:null);}},'data1':{'type':Sequelize['STRING'],'comment':_0x1aa1('0xe')},'data2':{'type':Sequelize[_0x1aa1('0x2')],'comment':_0x1aa1('0xf')},'data3':{'type':Sequelize[_0x1aa1('0x2')],'comment':_0x1aa1('0x10')},'data4':{'type':Sequelize[_0x1aa1('0x2')],'comment':_0x1aa1('0x11')},'data5':{'type':Sequelize['STRING'],'comment':_0x1aa1('0x12')},'role':{'type':Sequelize[_0x1aa1('0x2')]},'internal':{'type':Sequelize['INTEGER']},'uniqueid':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xb815=['DEFAULT\x20PAUSE','LOGIN,\x20PAUSE,\x20TALKING','DATE','enterAt','seconds','setDataValue','exitAt','talk:[inbound,\x20outbound],\x20pause:[reason]','talk:[start]','talk:[destination]','talk:[dial\x20string]','talk:[queue]','INTEGER','moment','exports','STRING'];(function(_0x178e48,_0x3c9509){var _0x440d7e=function(_0xc2f8a0){while(--_0xc2f8a0){_0x178e48['push'](_0x178e48['shift']());}};_0x440d7e(++_0x3c9509);}(_0xb815,0x1ed));var _0x5b81=function(_0x5b04ac,_0x14b9b5){_0x5b04ac=_0x5b04ac-0x0;var _0x106281=_0xb815[_0x5b04ac];return _0x106281;};'use strict';var Sequelize=require('sequelize');var moment=require(_0x5b81('0x0'));module[_0x5b81('0x1')]={'channel':{'type':Sequelize[_0x5b81('0x2')]},'membername':{'type':Sequelize[_0x5b81('0x2')]},'interface':{'type':Sequelize[_0x5b81('0x2')]},'type':{'type':Sequelize[_0x5b81('0x2')],'defaultValue':_0x5b81('0x3'),'comment':_0x5b81('0x4')},'duration':{'type':Sequelize['INTEGER']},'enterAt':{'type':Sequelize[_0x5b81('0x5')]},'exitAt':{'type':Sequelize['DATE'],'set':function(_0x2cbe8c){var _0x3b70da=moment(_0x2cbe8c);var _0x3fa5e7=moment(this['getDataValue'](_0x5b81('0x6')));var _0x356065=_0x3b70da['diff'](_0x3fa5e7,_0x5b81('0x7'));this[_0x5b81('0x8')](_0x5b81('0x9'),_0x2cbe8c);this['setDataValue']('duration',_0x356065>=0x0?_0x356065:null);}},'data1':{'type':Sequelize[_0x5b81('0x2')],'comment':_0x5b81('0xa')},'data2':{'type':Sequelize['STRING'],'comment':_0x5b81('0xb')},'data3':{'type':Sequelize[_0x5b81('0x2')],'comment':_0x5b81('0xc')},'data4':{'type':Sequelize[_0x5b81('0x2')],'comment':_0x5b81('0xd')},'data5':{'type':Sequelize[_0x5b81('0x2')],'comment':_0x5b81('0xe')},'role':{'type':Sequelize[_0x5b81('0x2')]},'internal':{'type':Sequelize[_0x5b81('0xf')]},'uniqueid':{'type':Sequelize[_0x5b81('0x2')]}};
\ No newline at end of file
index 90df263..cab7cf2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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(_0x3b42cb,_0x68fc26){var _0x264413=function(_0x484070){while(--_0x484070){_0x3b42cb['push'](_0x3b42cb['shift']());}};_0x264413(++_0x68fc26);}(_0x9c44,0x178));var _0x49c4=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0x9c44[_0x3bf83f];return _0x22c4a9;};'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
+var _0x7217=['query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','sort','where','pick','merge','filter','includeAll','include','rows','catch','show','params','rawAttributes','length','find','create','body','describe','eml-format','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/advancedSearch','../../config/license/hardware','../../config/logger','api','../../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','stack','send','index','map','MemberReport','fieldName','type','model','name','keys'];(function(_0x2bdcab,_0x43bf){var _0x4802e9=function(_0x169efb){while(--_0x169efb){_0x2bdcab['push'](_0x2bdcab['shift']());}};_0x4802e9(++_0x43bf);}(_0x7217,0x19e));var _0x7721=function(_0xa1e3e3,_0x29fe0e){_0xa1e3e3=_0xa1e3e3-0x0;var _0xc980e9=_0x7217[_0xa1e3e3];return _0xc980e9;};'use strict';var emlformat=require(_0x7721('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x7721('0x1'));var jsonpatch=require(_0x7721('0x2'));var rp=require(_0x7721('0x3'));var moment=require(_0x7721('0x4'));var BPromise=require(_0x7721('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x7721('0x6'));var sox=require(_0x7721('0x7'));var csv=require(_0x7721('0x8'));var ejs=require(_0x7721('0x9'));var fs=require('fs');var fs_extra=require(_0x7721('0xa'));var _=require(_0x7721('0xb'));var squel=require(_0x7721('0xc'));var crypto=require(_0x7721('0xd'));var jsforce=require(_0x7721('0xe'));var deskjs=require(_0x7721('0xf'));var toCsv=require(_0x7721('0x8'));var querystring=require(_0x7721('0x10'));var Papa=require(_0x7721('0x11'));var Redis=require(_0x7721('0x12'));var authService=require(_0x7721('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x7721('0x14'));var hardwareService=require(_0x7721('0x15'));var logger=require(_0x7721('0x16'))(_0x7721('0x17'));var utils=require(_0x7721('0x18'));var config=require(_0x7721('0x19'));var licenseUtil=require(_0x7721('0x1a'));var db=require(_0x7721('0x1b'))['db'];function respondWithStatusCode(_0x55b4ca,_0x2911ec){_0x2911ec=_0x2911ec||0xcc;return function(_0x199930){if(_0x199930){return _0x55b4ca['sendStatus'](_0x2911ec);}return _0x55b4ca[_0x7721('0x1c')](_0x2911ec)[_0x7721('0x1d')]();};}function respondWithResult(_0x3f01c5,_0x2e9752){_0x2e9752=_0x2e9752||0xc8;return function(_0x5069da){if(_0x5069da){return _0x3f01c5[_0x7721('0x1c')](_0x2e9752)[_0x7721('0x1e')](_0x5069da);}};}function respondWithFilteredResult(_0x534f1b,_0x4e199a){return function(_0x4b183e){if(_0x4b183e){var _0x5ed54=typeof _0x4e199a[_0x7721('0x1f')]===_0x7721('0x20')&&typeof _0x4e199a[_0x7721('0x21')]==='undefined';var _0x20f669=_0x4b183e['count'];var _0x3fc09e=_0x5ed54?0x0:_0x4e199a['offset'];var _0xfec626=_0x5ed54?_0x4b183e[_0x7721('0x22')]:_0x4e199a[_0x7721('0x1f')]+_0x4e199a[_0x7721('0x21')];var _0x2286e5;if(_0xfec626>=_0x20f669){_0xfec626=_0x20f669;_0x2286e5=0xc8;}else{_0x2286e5=0xce;}_0x534f1b[_0x7721('0x1c')](_0x2286e5);return _0x534f1b[_0x7721('0x23')](_0x7721('0x24'),_0x3fc09e+'-'+_0xfec626+'/'+_0x20f669)[_0x7721('0x1e')](_0x4b183e);}return null;};}function patchUpdates(_0xaeccc4){return function(_0x4ce1db){try{jsonpatch[_0x7721('0x25')](_0x4ce1db,_0xaeccc4,!![]);}catch(_0x2c1583){return BPromise[_0x7721('0x26')](_0x2c1583);}return _0x4ce1db[_0x7721('0x27')]();};}function saveUpdates(_0x57140c,_0x28f5a6){return function(_0x512f31){if(_0x512f31){return _0x512f31[_0x7721('0x28')](_0x57140c)[_0x7721('0x29')](function(_0x3e8a4e){return _0x3e8a4e;});}return null;};}function removeEntity(_0x1caad8,_0x121cc4){return function(_0x395b15){if(_0x395b15){return _0x395b15[_0x7721('0x2a')]()['then'](function(){_0x1caad8[_0x7721('0x1c')](0xcc)[_0x7721('0x1d')]();});}};}function handleEntityNotFound(_0x125564,_0x1f67c7){return function(_0x40d550){if(!_0x40d550){_0x125564[_0x7721('0x2b')](0x194);}return _0x40d550;};}function handleError(_0x424e05,_0xf753f1){_0xf753f1=_0xf753f1||0x1f4;return function(_0x40f367){logger['error'](_0x40f367[_0x7721('0x2c')]);if(_0x40f367['name']){delete _0x40f367['name'];}_0x424e05[_0x7721('0x1c')](_0xf753f1)[_0x7721('0x2d')](_0x40f367);};}exports[_0x7721('0x2e')]=function(_0x158d98,_0x1ea4d){var _0x37b9f0={},_0xd7d703={},_0x1da2d8={'count':0x0,'rows':[]};var _0x5c54f0=_[_0x7721('0x2f')](db[_0x7721('0x30')]['rawAttributes'],function(_0x4a25c9){return{'name':_0x4a25c9[_0x7721('0x31')],'type':_0x4a25c9[_0x7721('0x32')]['key']};});_0xd7d703[_0x7721('0x33')]=_[_0x7721('0x2f')](_0x5c54f0,_0x7721('0x34'));_0xd7d703['query']=_[_0x7721('0x35')](_0x158d98[_0x7721('0x36')]);_0xd7d703[_0x7721('0x37')]=_[_0x7721('0x38')](_0xd7d703[_0x7721('0x33')],_0xd7d703['query']);_0x37b9f0[_0x7721('0x39')]=_[_0x7721('0x38')](_0xd7d703[_0x7721('0x33')],qs['fields'](_0x158d98[_0x7721('0x36')][_0x7721('0x3a')]));_0x37b9f0['attributes']=_0x37b9f0[_0x7721('0x39')]['length']?_0x37b9f0[_0x7721('0x39')]:_0xd7d703[_0x7721('0x33')];if(!_0x158d98[_0x7721('0x36')][_0x7721('0x3b')](_0x7721('0x3c'))){_0x37b9f0[_0x7721('0x21')]=qs[_0x7721('0x21')](_0x158d98[_0x7721('0x36')][_0x7721('0x21')]);_0x37b9f0[_0x7721('0x1f')]=qs[_0x7721('0x1f')](_0x158d98['query'][_0x7721('0x1f')]);}_0x37b9f0['order']=qs[_0x7721('0x3d')](_0x158d98[_0x7721('0x36')][_0x7721('0x3d')]);_0x37b9f0[_0x7721('0x3e')]=qs[_0x7721('0x37')](_[_0x7721('0x3f')](_0x158d98['query'],_0xd7d703['filters']),_0x5c54f0);if(_0x158d98['query']['filter']){_0x37b9f0[_0x7721('0x3e')]=_[_0x7721('0x40')](_0x37b9f0[_0x7721('0x3e')],{'$or':_[_0x7721('0x2f')](_0x5c54f0,function(_0x4a90ce){if(_0x4a90ce[_0x7721('0x32')]!=='VIRTUAL'){var _0xfab37b={};_0xfab37b[_0x4a90ce[_0x7721('0x34')]]={'$like':'%'+_0x158d98['query'][_0x7721('0x41')]+'%'};return _0xfab37b;}})});}_0x37b9f0=_[_0x7721('0x40')]({},_0x37b9f0,_0x158d98['options']);var _0x4d0111={'where':_0x37b9f0[_0x7721('0x3e')]};return db[_0x7721('0x30')][_0x7721('0x22')](_0x4d0111)[_0x7721('0x29')](function(_0x577af9){_0x1da2d8[_0x7721('0x22')]=_0x577af9;if(_0x158d98[_0x7721('0x36')][_0x7721('0x42')]){_0x37b9f0[_0x7721('0x43')]=[{'all':!![]}];}return db[_0x7721('0x30')]['findAll'](_0x37b9f0);})[_0x7721('0x29')](function(_0x4a2c28){_0x1da2d8[_0x7721('0x44')]=_0x4a2c28;return _0x1da2d8;})['then'](respondWithFilteredResult(_0x1ea4d,_0x37b9f0))[_0x7721('0x45')](handleError(_0x1ea4d,null));};exports[_0x7721('0x46')]=function(_0x231dad,_0x49e0c5){var _0x1453d4={'raw':!![],'where':{'id':_0x231dad[_0x7721('0x47')]['id']}},_0x11d853={};_0x11d853['model']=_[_0x7721('0x35')](db[_0x7721('0x30')][_0x7721('0x48')]);_0x11d853[_0x7721('0x36')]=_[_0x7721('0x35')](_0x231dad[_0x7721('0x36')]);_0x11d853[_0x7721('0x37')]=_['intersection'](_0x11d853['model'],_0x11d853[_0x7721('0x36')]);_0x1453d4[_0x7721('0x39')]=_[_0x7721('0x38')](_0x11d853[_0x7721('0x33')],qs[_0x7721('0x3a')](_0x231dad[_0x7721('0x36')][_0x7721('0x3a')]));_0x1453d4[_0x7721('0x39')]=_0x1453d4[_0x7721('0x39')][_0x7721('0x49')]?_0x1453d4['attributes']:_0x11d853['model'];if(_0x231dad[_0x7721('0x36')][_0x7721('0x42')]){_0x1453d4[_0x7721('0x43')]=[{'all':!![]}];}_0x1453d4=_[_0x7721('0x40')]({},_0x1453d4,_0x231dad['options']);return db[_0x7721('0x30')][_0x7721('0x4a')](_0x1453d4)['then'](handleEntityNotFound(_0x49e0c5,null))[_0x7721('0x29')](respondWithResult(_0x49e0c5,null))['catch'](handleError(_0x49e0c5,null));};exports[_0x7721('0x4b')]=function(_0x5c6922,_0x334f23){return db[_0x7721('0x30')][_0x7721('0x4b')](_0x5c6922['body'],{})[_0x7721('0x29')](respondWithResult(_0x334f23,0xc9))[_0x7721('0x45')](handleError(_0x334f23,null));};exports['update']=function(_0x223d93,_0x1196c2){if(_0x223d93[_0x7721('0x4c')]['id']){delete _0x223d93['body']['id'];}return db[_0x7721('0x30')]['find']({'where':{'id':_0x223d93[_0x7721('0x47')]['id']}})[_0x7721('0x29')](handleEntityNotFound(_0x1196c2,null))[_0x7721('0x29')](saveUpdates(_0x223d93[_0x7721('0x4c')],null))[_0x7721('0x29')](respondWithResult(_0x1196c2,null))[_0x7721('0x45')](handleError(_0x1196c2,null));};exports[_0x7721('0x2a')]=function(_0x7fbb73,_0x694d2f){return db[_0x7721('0x30')][_0x7721('0x4a')]({'where':{'id':_0x7fbb73[_0x7721('0x47')]['id']}})[_0x7721('0x29')](handleEntityNotFound(_0x694d2f,null))[_0x7721('0x29')](removeEntity(_0x694d2f,null))[_0x7721('0x45')](handleError(_0x694d2f,null));};exports['describe']=function(_0x474f32,_0x2f6f30){return db[_0x7721('0x30')][_0x7721('0x4d')]()[_0x7721('0x29')](respondWithResult(_0x2f6f30,null))[_0x7721('0x45')](handleError(_0x2f6f30,null));};
\ No newline at end of file
index 2f207b7..b83d74e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x44f2=['lodash','util','../../config/logger','moment','bluebird','request-promise','path','../../config/environment','./memberReport.attributes','exports','define','MemberReport','membername_interface','membername'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x44f2,0xc4));var _0x244f=function(_0x114f87,_0x128e6e){_0x114f87=_0x114f87-0x0;var _0xbf0eb8=_0x44f2[_0x114f87];return _0xbf0eb8;};'use strict';var _=require(_0x244f('0x0'));var util=require(_0x244f('0x1'));var logger=require(_0x244f('0x2'))('api');var moment=require(_0x244f('0x3'));var BPromise=require(_0x244f('0x4'));var rp=require(_0x244f('0x5'));var fs=require('fs');var path=require(_0x244f('0x6'));var rimraf=require('rimraf');var config=require(_0x244f('0x7'));var attributes=require(_0x244f('0x8'));module[_0x244f('0x9')]=function(_0x1ff6ec,_0x4edcbd){return _0x1ff6ec[_0x244f('0xa')](_0x244f('0xb'),attributes,{'tableName':'report_member','paranoid':![],'indexes':[{'name':_0x244f('0xc'),'fields':[_0x244f('0xd'),'interface']}],'timestamps':!![]});};
\ No newline at end of file
+var _0x5f6b=['path','rimraf','./memberReport.attributes','exports','define','MemberReport','report_member','membername_interface','membername','../../config/logger','api','moment'];(function(_0x5d1044,_0x18f656){var _0x3cd90e=function(_0x3c40be){while(--_0x3c40be){_0x5d1044['push'](_0x5d1044['shift']());}};_0x3cd90e(++_0x18f656);}(_0x5f6b,0x81));var _0xb5f6=function(_0x27583f,_0x466f35){_0x27583f=_0x27583f-0x0;var _0x50d98f=_0x5f6b[_0x27583f];return _0x50d98f;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xb5f6('0x0'))(_0xb5f6('0x1'));var moment=require(_0xb5f6('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xb5f6('0x3'));var rimraf=require(_0xb5f6('0x4'));var config=require('../../config/environment');var attributes=require(_0xb5f6('0x5'));module[_0xb5f6('0x6')]=function(_0x56f55b,_0x587b9a){return _0x56f55b[_0xb5f6('0x7')](_0xb5f6('0x8'),attributes,{'tableName':_0xb5f6('0x9'),'paranoid':![],'indexes':[{'name':_0xb5f6('0xa'),'fields':[_0xb5f6('0xb'),'interface']}],'timestamps':!![]});};
\ No newline at end of file
index 6b20b71..8072db1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb138=['bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','request','then','MemberReport,\x20%s,\x20%s','request\x20sent','debug','MemberReport,\x20%s,\x20%s,\x20%s','error','code','message','info','catch','GetMemberReport','MemberReport','findAll','options','raw','where','limit','include','map','model','attributes','stringify','CreateMemberReport','create','body','UpdateMemberReport','update','lodash','util','moment'];(function(_0x581013,_0x1d85af){var _0x11de02=function(_0x34de89){while(--_0x34de89){_0x581013['push'](_0x581013['shift']());}};_0x11de02(++_0x1d85af);}(_0xb138,0x1dd));var _0x8b13=function(_0x32a3de,_0x4cea7a){_0x32a3de=_0x32a3de-0x0;var _0x30f1f8=_0xb138[_0x32a3de];return _0x30f1f8;};'use strict';var _=require(_0x8b13('0x0'));var util=require(_0x8b13('0x1'));var moment=require(_0x8b13('0x2'));var BPromise=require(_0x8b13('0x3'));var rs=require(_0x8b13('0x4'));var fs=require('fs');var Redis=require(_0x8b13('0x5'));var db=require(_0x8b13('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x8b13('0x7'))(_0x8b13('0x8'));var config=require(_0x8b13('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x8b13('0xa')][_0x8b13('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5d51b1,_0x3fdf4d,_0x33d1a7){return new BPromise(function(_0x22e157,_0x498832){return client[_0x8b13('0xc')](_0x5d51b1,_0x33d1a7)[_0x8b13('0xd')](function(_0x58683a){logger['info'](_0x8b13('0xe'),_0x3fdf4d,_0x8b13('0xf'));logger[_0x8b13('0x10')](_0x8b13('0x11'),_0x3fdf4d,_0x8b13('0xf'),JSON['stringify'](_0x58683a));if(_0x58683a[_0x8b13('0x12')]){if(_0x58683a[_0x8b13('0x12')][_0x8b13('0x13')]===0x1f4){logger[_0x8b13('0x12')](_0x8b13('0xe'),_0x3fdf4d,_0x58683a[_0x8b13('0x12')]['message']);return _0x498832(_0x58683a['error'][_0x8b13('0x14')]);}logger[_0x8b13('0x12')]('MemberReport,\x20%s,\x20%s',_0x3fdf4d,_0x58683a['error']['message']);return _0x22e157(_0x58683a[_0x8b13('0x12')][_0x8b13('0x14')]);}else{logger[_0x8b13('0x15')](_0x8b13('0xe'),_0x3fdf4d,_0x8b13('0xf'));_0x22e157(_0x58683a['result'][_0x8b13('0x14')]);}})[_0x8b13('0x16')](function(_0x393bc1){logger[_0x8b13('0x12')](_0x8b13('0xe'),_0x3fdf4d,_0x393bc1);_0x498832(_0x393bc1);});});}exports[_0x8b13('0x17')]=function(_0x10fbde){var _0x441ddc=this;return new Promise(function(_0x4989d3,_0x4dac71){return db[_0x8b13('0x18')][_0x8b13('0x19')]({'raw':_0x10fbde[_0x8b13('0x1a')]?_0x10fbde[_0x8b13('0x1a')][_0x8b13('0x1b')]===undefined?!![]:![]:!![],'where':_0x10fbde[_0x8b13('0x1a')]?_0x10fbde['options'][_0x8b13('0x1c')]||null:null,'attributes':_0x10fbde[_0x8b13('0x1a')]?_0x10fbde[_0x8b13('0x1a')]['attributes']||null:null,'limit':_0x10fbde['options']?_0x10fbde[_0x8b13('0x1a')][_0x8b13('0x1d')]||null:null,'include':_0x10fbde['options']?_0x10fbde[_0x8b13('0x1a')][_0x8b13('0x1e')]?_[_0x8b13('0x1f')](_0x10fbde[_0x8b13('0x1a')][_0x8b13('0x1e')],function(_0x583639){return{'model':db[_0x583639[_0x8b13('0x20')]],'as':_0x583639['as'],'attributes':_0x583639[_0x8b13('0x21')],'include':_0x583639['include']?_[_0x8b13('0x1f')](_0x583639['include'],function(_0x420772){return{'model':db[_0x420772[_0x8b13('0x20')]],'as':_0x420772['as'],'attributes':_0x420772['attributes'],'include':_0x420772[_0x8b13('0x1e')]?_[_0x8b13('0x1f')](_0x420772['include'],function(_0x134c5e){return{'model':db[_0x134c5e[_0x8b13('0x20')]],'as':_0x134c5e['as'],'attributes':_0x134c5e[_0x8b13('0x21')]};}):[]};}):[]};}):[]:[]})[_0x8b13('0xd')](function(_0x27fef3){logger['info'](_0x8b13('0x17'),_0x10fbde);logger[_0x8b13('0x10')](_0x8b13('0x17'),_0x10fbde,JSON[_0x8b13('0x22')](_0x27fef3));_0x4989d3(_0x27fef3);})[_0x8b13('0x16')](function(_0x2bb51d){logger['error'](_0x8b13('0x17'),_0x2bb51d[_0x8b13('0x14')],_0x10fbde);_0x4dac71(_0x441ddc[_0x8b13('0x12')](0x1f4,_0x2bb51d[_0x8b13('0x14')]));});});};exports[_0x8b13('0x23')]=function(_0x29946e){var _0x3304bd=this;return new Promise(function(_0x44bce2,_0x36f732){return db['MemberReport'][_0x8b13('0x24')](_0x29946e[_0x8b13('0x25')],{'raw':_0x29946e[_0x8b13('0x1a')]?_0x29946e[_0x8b13('0x1a')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0xb7771d){logger['info']('CreateMemberReport',_0x29946e);logger[_0x8b13('0x10')]('CreateMemberReport',_0x29946e,JSON[_0x8b13('0x22')](_0xb7771d));_0x44bce2(_0xb7771d);})[_0x8b13('0x16')](function(_0x40fc29){logger[_0x8b13('0x12')](_0x8b13('0x23'),_0x40fc29[_0x8b13('0x14')],_0x29946e);_0x36f732(_0x3304bd[_0x8b13('0x12')](0x1f4,_0x40fc29[_0x8b13('0x14')]));});});};exports[_0x8b13('0x26')]=function(_0x1b313d){var _0x4d45bc=this;return new Promise(function(_0xa07850,_0x31f5bd){return db[_0x8b13('0x18')][_0x8b13('0x27')](_0x1b313d[_0x8b13('0x25')],{'raw':_0x1b313d[_0x8b13('0x1a')]?_0x1b313d[_0x8b13('0x1a')][_0x8b13('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1b313d['options']?_0x1b313d[_0x8b13('0x1a')]['where']||null:null,'attributes':_0x1b313d[_0x8b13('0x1a')]?_0x1b313d[_0x8b13('0x1a')][_0x8b13('0x21')]||null:null,'limit':_0x1b313d[_0x8b13('0x1a')]?_0x1b313d[_0x8b13('0x1a')][_0x8b13('0x1d')]||null:null})['then'](function(_0x499ccf){logger[_0x8b13('0x15')]('UpdateMemberReport',_0x1b313d);logger[_0x8b13('0x10')]('UpdateMemberReport',_0x1b313d,JSON[_0x8b13('0x22')](_0x499ccf));_0xa07850(_0x499ccf);})[_0x8b13('0x16')](function(_0x29a359){logger[_0x8b13('0x12')](_0x8b13('0x26'),_0x29a359['message'],_0x1b313d);_0x31f5bd(_0x4d45bc['error'](0x1f4,_0x29a359[_0x8b13('0x14')]));});});};
\ No newline at end of file
+var _0x3cb7=['catch','GetMemberReport','MemberReport','findAll','options','raw','where','attributes','map','model','include','CreateMemberReport','create','body','update','limit','UpdateMemberReport','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','MemberReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result'];(function(_0x53a8dd,_0x1d9173){var _0x4e7e1c=function(_0x4ee0c0){while(--_0x4ee0c0){_0x53a8dd['push'](_0x53a8dd['shift']());}};_0x4e7e1c(++_0x1d9173);}(_0x3cb7,0xcf));var _0x73cb=function(_0x26659f,_0x32f426){_0x26659f=_0x26659f-0x0;var _0x42667f=_0x3cb7[_0x26659f];return _0x42667f;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x73cb('0x0'));var BPromise=require('bluebird');var rs=require(_0x73cb('0x1'));var fs=require('fs');var Redis=require(_0x73cb('0x2'));var db=require(_0x73cb('0x3'))['db'];var utils=require(_0x73cb('0x4'));var logger=require(_0x73cb('0x5'))(_0x73cb('0x6'));var config=require(_0x73cb('0x7'));var jayson=require(_0x73cb('0x8'));var client=jayson['client'][_0x73cb('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x28c95e,_0x1a3637,_0x2319d0){return new BPromise(function(_0x40d9d2,_0x4aab5e){return client[_0x73cb('0xa')](_0x28c95e,_0x2319d0)[_0x73cb('0xb')](function(_0x680a54){logger[_0x73cb('0xc')](_0x73cb('0xd'),_0x1a3637,_0x73cb('0xe'));logger[_0x73cb('0xf')]('MemberReport,\x20%s,\x20%s,\x20%s',_0x1a3637,_0x73cb('0xe'),JSON[_0x73cb('0x10')](_0x680a54));if(_0x680a54[_0x73cb('0x11')]){if(_0x680a54[_0x73cb('0x11')][_0x73cb('0x12')]===0x1f4){logger[_0x73cb('0x11')]('MemberReport,\x20%s,\x20%s',_0x1a3637,_0x680a54[_0x73cb('0x11')][_0x73cb('0x13')]);return _0x4aab5e(_0x680a54[_0x73cb('0x11')][_0x73cb('0x13')]);}logger[_0x73cb('0x11')](_0x73cb('0xd'),_0x1a3637,_0x680a54[_0x73cb('0x11')][_0x73cb('0x13')]);return _0x40d9d2(_0x680a54[_0x73cb('0x11')][_0x73cb('0x13')]);}else{logger['info']('MemberReport,\x20%s,\x20%s',_0x1a3637,'request\x20sent');_0x40d9d2(_0x680a54[_0x73cb('0x14')][_0x73cb('0x13')]);}})[_0x73cb('0x15')](function(_0x199988){logger[_0x73cb('0x11')]('MemberReport,\x20%s,\x20%s',_0x1a3637,_0x199988);_0x4aab5e(_0x199988);});});}exports[_0x73cb('0x16')]=function(_0x3df436){var _0x2dfb8e=this;return new Promise(function(_0x25c26b,_0x3a27ac){return db[_0x73cb('0x17')][_0x73cb('0x18')]({'raw':_0x3df436[_0x73cb('0x19')]?_0x3df436[_0x73cb('0x19')][_0x73cb('0x1a')]===undefined?!![]:![]:!![],'where':_0x3df436['options']?_0x3df436[_0x73cb('0x19')][_0x73cb('0x1b')]||null:null,'attributes':_0x3df436['options']?_0x3df436['options'][_0x73cb('0x1c')]||null:null,'limit':_0x3df436[_0x73cb('0x19')]?_0x3df436[_0x73cb('0x19')]['limit']||null:null,'include':_0x3df436[_0x73cb('0x19')]?_0x3df436['options']['include']?_[_0x73cb('0x1d')](_0x3df436[_0x73cb('0x19')]['include'],function(_0x57da9f){return{'model':db[_0x57da9f[_0x73cb('0x1e')]],'as':_0x57da9f['as'],'attributes':_0x57da9f[_0x73cb('0x1c')],'include':_0x57da9f['include']?_[_0x73cb('0x1d')](_0x57da9f[_0x73cb('0x1f')],function(_0x191990){return{'model':db[_0x191990[_0x73cb('0x1e')]],'as':_0x191990['as'],'attributes':_0x191990[_0x73cb('0x1c')],'include':_0x191990[_0x73cb('0x1f')]?_[_0x73cb('0x1d')](_0x191990[_0x73cb('0x1f')],function(_0x12a837){return{'model':db[_0x12a837['model']],'as':_0x12a837['as'],'attributes':_0x12a837[_0x73cb('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1e5c7b){logger[_0x73cb('0xc')](_0x73cb('0x16'),_0x3df436);logger[_0x73cb('0xf')](_0x73cb('0x16'),_0x3df436,JSON[_0x73cb('0x10')](_0x1e5c7b));_0x25c26b(_0x1e5c7b);})['catch'](function(_0x3ab710){logger['error'](_0x73cb('0x16'),_0x3ab710['message'],_0x3df436);_0x3a27ac(_0x2dfb8e[_0x73cb('0x11')](0x1f4,_0x3ab710[_0x73cb('0x13')]));});});};exports[_0x73cb('0x20')]=function(_0x2291fc){var _0x5b5557=this;return new Promise(function(_0x5c7117,_0x211d29){return db[_0x73cb('0x17')][_0x73cb('0x21')](_0x2291fc[_0x73cb('0x22')],{'raw':_0x2291fc['options']?_0x2291fc[_0x73cb('0x19')][_0x73cb('0x1a')]===undefined?!![]:![]:!![]})[_0x73cb('0xb')](function(_0x20f9d8){logger[_0x73cb('0xc')](_0x73cb('0x20'),_0x2291fc);logger[_0x73cb('0xf')](_0x73cb('0x20'),_0x2291fc,JSON[_0x73cb('0x10')](_0x20f9d8));_0x5c7117(_0x20f9d8);})[_0x73cb('0x15')](function(_0x5b39ad){logger['error']('CreateMemberReport',_0x5b39ad[_0x73cb('0x13')],_0x2291fc);_0x211d29(_0x5b5557[_0x73cb('0x11')](0x1f4,_0x5b39ad[_0x73cb('0x13')]));});});};exports['UpdateMemberReport']=function(_0x28637f){var _0x40496a=this;return new Promise(function(_0x47cbb1,_0x413a03){return db['MemberReport'][_0x73cb('0x23')](_0x28637f[_0x73cb('0x22')],{'raw':_0x28637f[_0x73cb('0x19')]?_0x28637f[_0x73cb('0x19')][_0x73cb('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x28637f[_0x73cb('0x19')]?_0x28637f[_0x73cb('0x19')][_0x73cb('0x1b')]||null:null,'attributes':_0x28637f['options']?_0x28637f['options'][_0x73cb('0x1c')]||null:null,'limit':_0x28637f['options']?_0x28637f[_0x73cb('0x19')][_0x73cb('0x24')]||null:null})[_0x73cb('0xb')](function(_0x6b7cd8){logger[_0x73cb('0xc')]('UpdateMemberReport',_0x28637f);logger[_0x73cb('0xf')](_0x73cb('0x25'),_0x28637f,JSON[_0x73cb('0x10')](_0x6b7cd8));_0x47cbb1(_0x6b7cd8);})[_0x73cb('0x15')](function(_0x4f7ac4){logger['error'](_0x73cb('0x25'),_0x4f7ac4['message'],_0x28637f);_0x413a03(_0x40496a[_0x73cb('0x11')](0x1f4,_0x4f7ac4[_0x73cb('0x13')]));});});};
\ No newline at end of file
index 099b900..7b6d534 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x85d3=['connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','./migration.controller','util','path'];(function(_0x30a31e,_0x31f766){var _0x170879=function(_0x313ee7){while(--_0x313ee7){_0x30a31e['push'](_0x30a31e['shift']());}};_0x170879(++_0x31f766);}(_0x85d3,0x1a9));var _0x385d=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0x85d3[_0xbca1b1];return _0x4e1686;};'use strict';var multer=require('multer');var util=require(_0x385d('0x0'));var path=require(_0x385d('0x1'));var timeout=require(_0x385d('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x385d('0x3'));var auth=require(_0x385d('0x4'));var interaction=require(_0x385d('0x5'));var config=require('../../config/environment');var controller=require(_0x385d('0x6'));router['get']('/',controller['index']);module['exports']=router;
\ No newline at end of file
+var _0x671a=['../../components/interaction/service','../../config/environment','./migration.controller','get','index','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service'];(function(_0x22c01a,_0x6c304f){var _0xa9eb8c=function(_0x1bc4d8){while(--_0x1bc4d8){_0x22c01a['push'](_0x22c01a['shift']());}};_0xa9eb8c(++_0x6c304f);}(_0x671a,0x7a));var _0xa671=function(_0x3130b5,_0x23faf7){_0x3130b5=_0x3130b5-0x0;var _0xa6d8a3=_0x671a[_0x3130b5];return _0xa6d8a3;};'use strict';var multer=require(_0xa671('0x0'));var util=require(_0xa671('0x1'));var path=require(_0xa671('0x2'));var timeout=require(_0xa671('0x3'));var express=require(_0xa671('0x4'));var router=express[_0xa671('0x5')]();var fs_extra=require(_0xa671('0x6'));var auth=require(_0xa671('0x7'));var interaction=require(_0xa671('0x8'));var config=require(_0xa671('0x9'));var controller=require(_0xa671('0xa'));router[_0xa671('0xb')]('/',controller[_0xa671('0xc')]);module['exports']=router;
\ No newline at end of file
index 5320b2d..592e6eb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x72b6=['exports','STRING','version','sequelize'];(function(_0x5bd426,_0x4878e5){var _0x23a7eb=function(_0x594b42){while(--_0x594b42){_0x5bd426['push'](_0x5bd426['shift']());}};_0x23a7eb(++_0x4878e5);}(_0x72b6,0x103));var _0x672b=function(_0x291a5e,_0x461392){_0x291a5e=_0x291a5e-0x0;var _0x5ac624=_0x72b6[_0x291a5e];return _0x5ac624;};'use strict';var Sequelize=require(_0x672b('0x0'));module[_0x672b('0x1')]={'version':{'type':Sequelize[_0x672b('0x2')],'unique':_0x672b('0x3')}};
\ No newline at end of file
+var _0xe96e=['exports','version','sequelize'];(function(_0x38f060,_0x3243f8){var _0x45950c=function(_0xca5a0){while(--_0xca5a0){_0x38f060['push'](_0x38f060['shift']());}};_0x45950c(++_0x3243f8);}(_0xe96e,0xe0));var _0xee96=function(_0x3fa90b,_0x52bf1d){_0x3fa90b=_0x3fa90b-0x0;var _0x33ebff=_0xe96e[_0x3fa90b];return _0x33ebff;};'use strict';var Sequelize=require(_0xee96('0x0'));module[_0xee96('0x1')]={'version':{'type':Sequelize['STRING'],'unique':_0xee96('0x2')}};
\ No newline at end of file
index 678aa72..d626287 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9540=['merge','include','rows','catch','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','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/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','then','destroy','stack','send','map','Migration','rawAttributes','type','key','query','keys','filters','intersection','attributes','model','fields','hasOwnProperty','order','sort','where','pick','filter'];(function(_0x287479,_0x531889){var _0x1ae903=function(_0x1d5901){while(--_0x1d5901){_0x287479['push'](_0x287479['shift']());}};_0x1ae903(++_0x531889);}(_0x9540,0x10c));var _0x0954=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x9540[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0x0954('0x0'));var rimraf=require(_0x0954('0x1'));var zipdir=require(_0x0954('0x2'));var jsonpatch=require(_0x0954('0x3'));var rp=require(_0x0954('0x4'));var moment=require(_0x0954('0x5'));var BPromise=require(_0x0954('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0x0954('0x7'));var sox=require(_0x0954('0x8'));var csv=require(_0x0954('0x9'));var ejs=require(_0x0954('0xa'));var fs=require('fs');var fs_extra=require(_0x0954('0xb'));var _=require(_0x0954('0xc'));var squel=require('squel');var crypto=require(_0x0954('0xd'));var jsforce=require(_0x0954('0xe'));var deskjs=require(_0x0954('0xf'));var toCsv=require(_0x0954('0x9'));var querystring=require(_0x0954('0x10'));var Papa=require(_0x0954('0x11'));var Redis=require(_0x0954('0x12'));var authService=require(_0x0954('0x13'));var qs=require(_0x0954('0x14'));var as=require(_0x0954('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x0954('0x16'))(_0x0954('0x17'));var utils=require('../../config/utils');var config=require(_0x0954('0x18'));var licenseUtil=require(_0x0954('0x19'));var db=require(_0x0954('0x1a'))['db'];function respondWithStatusCode(_0x22f5f7,_0x3acfe8){_0x3acfe8=_0x3acfe8||0xcc;return function(_0x4a37ce){if(_0x4a37ce){return _0x22f5f7[_0x0954('0x1b')](_0x3acfe8);}return _0x22f5f7[_0x0954('0x1c')](_0x3acfe8)[_0x0954('0x1d')]();};}function respondWithResult(_0x391b4f,_0x27f6d4){_0x27f6d4=_0x27f6d4||0xc8;return function(_0x36fee7){if(_0x36fee7){return _0x391b4f['status'](_0x27f6d4)[_0x0954('0x1e')](_0x36fee7);}};}function respondWithFilteredResult(_0x5b47e6,_0x5daefd){return function(_0x95080d){if(_0x95080d){var _0x2b66b6=typeof _0x5daefd[_0x0954('0x1f')]===_0x0954('0x20')&&typeof _0x5daefd[_0x0954('0x21')]===_0x0954('0x20');var _0x124f94=_0x95080d[_0x0954('0x22')];var _0x534d98=_0x2b66b6?0x0:_0x5daefd[_0x0954('0x1f')];var _0x470291=_0x2b66b6?_0x95080d[_0x0954('0x22')]:_0x5daefd[_0x0954('0x1f')]+_0x5daefd[_0x0954('0x21')];var _0x516233;if(_0x470291>=_0x124f94){_0x470291=_0x124f94;_0x516233=0xc8;}else{_0x516233=0xce;}_0x5b47e6[_0x0954('0x1c')](_0x516233);return _0x5b47e6['set'](_0x0954('0x23'),_0x534d98+'-'+_0x470291+'/'+_0x124f94)[_0x0954('0x1e')](_0x95080d);}return null;};}function patchUpdates(_0x1a1f2d){return function(_0x4a7bc4){try{jsonpatch[_0x0954('0x24')](_0x4a7bc4,_0x1a1f2d,!![]);}catch(_0x3626aa){return BPromise[_0x0954('0x25')](_0x3626aa);}return _0x4a7bc4[_0x0954('0x26')]();};}function saveUpdates(_0x5dd29f,_0x36bdae){return function(_0x50c498){if(_0x50c498){return _0x50c498[_0x0954('0x27')](_0x5dd29f)[_0x0954('0x28')](function(_0x2cb497){return _0x2cb497;});}return null;};}function removeEntity(_0x36bb06,_0x274420){return function(_0x5041f2){if(_0x5041f2){return _0x5041f2[_0x0954('0x29')]()[_0x0954('0x28')](function(){_0x36bb06[_0x0954('0x1c')](0xcc)[_0x0954('0x1d')]();});}};}function handleEntityNotFound(_0x729e86,_0x1f26dd){return function(_0x4d7e05){if(!_0x4d7e05){_0x729e86[_0x0954('0x1b')](0x194);}return _0x4d7e05;};}function handleError(_0x20c37b,_0x102be1){_0x102be1=_0x102be1||0x1f4;return function(_0x2120e3){logger['error'](_0x2120e3[_0x0954('0x2a')]);if(_0x2120e3['name']){delete _0x2120e3['name'];}_0x20c37b['status'](_0x102be1)[_0x0954('0x2b')](_0x2120e3);};}exports['index']=function(_0x1be3aa,_0x2939fc){var _0x452006={},_0x383ce1={},_0x18e378={'count':0x0,'rows':[]};var _0x365ab6=_[_0x0954('0x2c')](db[_0x0954('0x2d')][_0x0954('0x2e')],function(_0x124eee){return{'name':_0x124eee['fieldName'],'type':_0x124eee[_0x0954('0x2f')][_0x0954('0x30')]};});_0x383ce1['model']=_['map'](_0x365ab6,'name');_0x383ce1[_0x0954('0x31')]=_[_0x0954('0x32')](_0x1be3aa[_0x0954('0x31')]);_0x383ce1[_0x0954('0x33')]=_[_0x0954('0x34')](_0x383ce1['model'],_0x383ce1[_0x0954('0x31')]);_0x452006[_0x0954('0x35')]=_[_0x0954('0x34')](_0x383ce1[_0x0954('0x36')],qs['fields'](_0x1be3aa[_0x0954('0x31')][_0x0954('0x37')]));_0x452006[_0x0954('0x35')]=_0x452006['attributes']['length']?_0x452006[_0x0954('0x35')]:_0x383ce1[_0x0954('0x36')];if(!_0x1be3aa[_0x0954('0x31')][_0x0954('0x38')]('nolimit')){_0x452006[_0x0954('0x21')]=qs[_0x0954('0x21')](_0x1be3aa[_0x0954('0x31')][_0x0954('0x21')]);_0x452006[_0x0954('0x1f')]=qs[_0x0954('0x1f')](_0x1be3aa['query']['offset']);}_0x452006[_0x0954('0x39')]=qs[_0x0954('0x3a')](_0x1be3aa[_0x0954('0x31')][_0x0954('0x3a')]);_0x452006[_0x0954('0x3b')]=qs[_0x0954('0x33')](_[_0x0954('0x3c')](_0x1be3aa[_0x0954('0x31')],_0x383ce1[_0x0954('0x33')]),_0x365ab6);if(_0x1be3aa[_0x0954('0x31')][_0x0954('0x3d')]){_0x452006[_0x0954('0x3b')]=_[_0x0954('0x3e')](_0x452006[_0x0954('0x3b')],{'$or':_[_0x0954('0x2c')](_0x365ab6,function(_0x2727eb){if(_0x2727eb[_0x0954('0x2f')]!=='VIRTUAL'){var _0x15d3db={};_0x15d3db[_0x2727eb['name']]={'$like':'%'+_0x1be3aa['query'][_0x0954('0x3d')]+'%'};return _0x15d3db;}})});}_0x452006=_[_0x0954('0x3e')]({},_0x452006,_0x1be3aa['options']);var _0xfec149={'where':_0x452006[_0x0954('0x3b')]};return db[_0x0954('0x2d')][_0x0954('0x22')](_0xfec149)[_0x0954('0x28')](function(_0x1475b4){_0x18e378[_0x0954('0x22')]=_0x1475b4;if(_0x1be3aa[_0x0954('0x31')]['includeAll']){_0x452006[_0x0954('0x3f')]=[{'all':!![]}];}return db[_0x0954('0x2d')]['findAll'](_0x452006);})[_0x0954('0x28')](function(_0x267a37){_0x18e378[_0x0954('0x40')]=_0x267a37;return _0x18e378;})[_0x0954('0x28')](respondWithFilteredResult(_0x2939fc,_0x452006))[_0x0954('0x41')](handleError(_0x2939fc,null));};
\ No newline at end of file
+var _0xf74e=['fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','type','VIRTUAL','includeAll','include','catch','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','reject','save','update','destroy','then','end','stack','name','index','map','Migration','rawAttributes','fieldName','key','model','query','keys','filters','attributes','intersection'];(function(_0xc4b59f,_0x598746){var _0x3b7029=function(_0xbeda0f){while(--_0xbeda0f){_0xc4b59f['push'](_0xc4b59f['shift']());}};_0x3b7029(++_0x598746);}(_0xf74e,0x98));var _0xef74=function(_0x38321d,_0x3cfdf0){_0x38321d=_0x38321d-0x0;var _0x553c0f=_0xf74e[_0x38321d];return _0x553c0f;};'use strict';var emlformat=require(_0xef74('0x0'));var rimraf=require(_0xef74('0x1'));var zipdir=require(_0xef74('0x2'));var jsonpatch=require(_0xef74('0x3'));var rp=require(_0xef74('0x4'));var moment=require(_0xef74('0x5'));var BPromise=require(_0xef74('0x6'));var Mustache=require('mustache');var util=require(_0xef74('0x7'));var path=require(_0xef74('0x8'));var sox=require(_0xef74('0x9'));var csv=require(_0xef74('0xa'));var ejs=require(_0xef74('0xb'));var fs=require('fs');var fs_extra=require(_0xef74('0xc'));var _=require(_0xef74('0xd'));var squel=require(_0xef74('0xe'));var crypto=require(_0xef74('0xf'));var jsforce=require(_0xef74('0x10'));var deskjs=require(_0xef74('0x11'));var toCsv=require('to-csv');var querystring=require(_0xef74('0x12'));var Papa=require('papaparse');var Redis=require(_0xef74('0x13'));var authService=require('../../components/auth/service');var qs=require(_0xef74('0x14'));var as=require(_0xef74('0x15'));var hardwareService=require(_0xef74('0x16'));var logger=require(_0xef74('0x17'))('api');var utils=require(_0xef74('0x18'));var config=require(_0xef74('0x19'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2571d8,_0xf44f10){_0xf44f10=_0xf44f10||0xcc;return function(_0x1e7597){if(_0x1e7597){return _0x2571d8[_0xef74('0x1a')](_0xf44f10);}return _0x2571d8[_0xef74('0x1b')](_0xf44f10)['end']();};}function respondWithResult(_0x1782e7,_0xd57ca9){_0xd57ca9=_0xd57ca9||0xc8;return function(_0x4b0545){if(_0x4b0545){return _0x1782e7['status'](_0xd57ca9)[_0xef74('0x1c')](_0x4b0545);}};}function respondWithFilteredResult(_0x1b7dcd,_0x2347ba){return function(_0x501d53){if(_0x501d53){var _0x1e8798=typeof _0x2347ba[_0xef74('0x1d')]===_0xef74('0x1e')&&typeof _0x2347ba[_0xef74('0x1f')]===_0xef74('0x1e');var _0x1516df=_0x501d53[_0xef74('0x20')];var _0x525a63=_0x1e8798?0x0:_0x2347ba['offset'];var _0x3cf2c8=_0x1e8798?_0x501d53[_0xef74('0x20')]:_0x2347ba[_0xef74('0x1d')]+_0x2347ba[_0xef74('0x1f')];var _0xdbc21f;if(_0x3cf2c8>=_0x1516df){_0x3cf2c8=_0x1516df;_0xdbc21f=0xc8;}else{_0xdbc21f=0xce;}_0x1b7dcd['status'](_0xdbc21f);return _0x1b7dcd[_0xef74('0x21')](_0xef74('0x22'),_0x525a63+'-'+_0x3cf2c8+'/'+_0x1516df)['json'](_0x501d53);}return null;};}function patchUpdates(_0x2d11f7){return function(_0x20e8f5){try{jsonpatch['apply'](_0x20e8f5,_0x2d11f7,!![]);}catch(_0x265da7){return BPromise[_0xef74('0x23')](_0x265da7);}return _0x20e8f5[_0xef74('0x24')]();};}function saveUpdates(_0x37959d,_0x5e4f1e){return function(_0x15af15){if(_0x15af15){return _0x15af15[_0xef74('0x25')](_0x37959d)['then'](function(_0x1fde0b){return _0x1fde0b;});}return null;};}function removeEntity(_0x470fdb,_0x54e213){return function(_0x5e9a7c){if(_0x5e9a7c){return _0x5e9a7c[_0xef74('0x26')]()[_0xef74('0x27')](function(){_0x470fdb[_0xef74('0x1b')](0xcc)[_0xef74('0x28')]();});}};}function handleEntityNotFound(_0x414300,_0x1c7528){return function(_0x5b4be5){if(!_0x5b4be5){_0x414300[_0xef74('0x1a')](0x194);}return _0x5b4be5;};}function handleError(_0x40cfc5,_0xb02f30){_0xb02f30=_0xb02f30||0x1f4;return function(_0x28a803){logger['error'](_0x28a803[_0xef74('0x29')]);if(_0x28a803[_0xef74('0x2a')]){delete _0x28a803['name'];}_0x40cfc5[_0xef74('0x1b')](_0xb02f30)['send'](_0x28a803);};}exports[_0xef74('0x2b')]=function(_0x1b2603,_0x36bab2){var _0x3fc603={},_0x591bea={},_0x5415d5={'count':0x0,'rows':[]};var _0x3240b7=_[_0xef74('0x2c')](db[_0xef74('0x2d')][_0xef74('0x2e')],function(_0x28ac6c){return{'name':_0x28ac6c[_0xef74('0x2f')],'type':_0x28ac6c['type'][_0xef74('0x30')]};});_0x591bea[_0xef74('0x31')]=_[_0xef74('0x2c')](_0x3240b7,_0xef74('0x2a'));_0x591bea[_0xef74('0x32')]=_[_0xef74('0x33')](_0x1b2603[_0xef74('0x32')]);_0x591bea[_0xef74('0x34')]=_['intersection'](_0x591bea[_0xef74('0x31')],_0x591bea['query']);_0x3fc603[_0xef74('0x35')]=_[_0xef74('0x36')](_0x591bea[_0xef74('0x31')],qs[_0xef74('0x37')](_0x1b2603[_0xef74('0x32')]['fields']));_0x3fc603[_0xef74('0x35')]=_0x3fc603[_0xef74('0x35')][_0xef74('0x38')]?_0x3fc603['attributes']:_0x591bea[_0xef74('0x31')];if(!_0x1b2603[_0xef74('0x32')][_0xef74('0x39')](_0xef74('0x3a'))){_0x3fc603['limit']=qs[_0xef74('0x1f')](_0x1b2603[_0xef74('0x32')][_0xef74('0x1f')]);_0x3fc603['offset']=qs[_0xef74('0x1d')](_0x1b2603[_0xef74('0x32')][_0xef74('0x1d')]);}_0x3fc603['order']=qs[_0xef74('0x3b')](_0x1b2603[_0xef74('0x32')][_0xef74('0x3b')]);_0x3fc603[_0xef74('0x3c')]=qs['filters'](_[_0xef74('0x3d')](_0x1b2603[_0xef74('0x32')],_0x591bea[_0xef74('0x34')]),_0x3240b7);if(_0x1b2603[_0xef74('0x32')][_0xef74('0x3e')]){_0x3fc603['where']=_[_0xef74('0x3f')](_0x3fc603[_0xef74('0x3c')],{'$or':_[_0xef74('0x2c')](_0x3240b7,function(_0x4c12f3){if(_0x4c12f3[_0xef74('0x40')]!==_0xef74('0x41')){var _0x26a1c3={};_0x26a1c3[_0x4c12f3[_0xef74('0x2a')]]={'$like':'%'+_0x1b2603[_0xef74('0x32')][_0xef74('0x3e')]+'%'};return _0x26a1c3;}})});}_0x3fc603=_[_0xef74('0x3f')]({},_0x3fc603,_0x1b2603['options']);var _0x5e569c={'where':_0x3fc603['where']};return db[_0xef74('0x2d')][_0xef74('0x20')](_0x5e569c)['then'](function(_0x1f60bf){_0x5415d5['count']=_0x1f60bf;if(_0x1b2603[_0xef74('0x32')][_0xef74('0x42')]){_0x3fc603[_0xef74('0x43')]=[{'all':!![]}];}return db[_0xef74('0x2d')]['findAll'](_0x3fc603);})['then'](function(_0x16c07a){_0x5415d5['rows']=_0x16c07a;return _0x5415d5;})[_0xef74('0x27')](respondWithFilteredResult(_0x36bab2,_0x3fc603))[_0xef74('0x44')](handleError(_0x36bab2,null));};
\ No newline at end of file
index 3639f6a..07cad21 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8f96=['define','Migration','migrations','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./migration.attributes','exports'];(function(_0x45974d,_0x16fd32){var _0x7a059e=function(_0x47af46){while(--_0x47af46){_0x45974d['push'](_0x45974d['shift']());}};_0x7a059e(++_0x16fd32);}(_0x8f96,0xc7));var _0x68f9=function(_0x4cb230,_0x4296fb){_0x4cb230=_0x4cb230-0x0;var _0x149000=_0x8f96[_0x4cb230];return _0x149000;};'use strict';var _=require(_0x68f9('0x0'));var util=require(_0x68f9('0x1'));var logger=require(_0x68f9('0x2'))(_0x68f9('0x3'));var moment=require(_0x68f9('0x4'));var BPromise=require(_0x68f9('0x5'));var rp=require(_0x68f9('0x6'));var fs=require('fs');var path=require(_0x68f9('0x7'));var rimraf=require('rimraf');var config=require(_0x68f9('0x8'));var attributes=require(_0x68f9('0x9'));module[_0x68f9('0xa')]=function(_0x5c7c50,_0x3c0b34){return _0x5c7c50[_0x68f9('0xb')](_0x68f9('0xc'),attributes,{'tableName':_0x68f9('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x5bc6=['define','Migration','lodash','util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./migration.attributes'];(function(_0x465437,_0xeaa60f){var _0x409378=function(_0x15a267){while(--_0x15a267){_0x465437['push'](_0x465437['shift']());}};_0x409378(++_0xeaa60f);}(_0x5bc6,0x18e));var _0x65bc=function(_0x8f10f2,_0x33a7e4){_0x8f10f2=_0x8f10f2-0x0;var _0x1690c8=_0x5bc6[_0x8f10f2];return _0x1690c8;};'use strict';var _=require(_0x65bc('0x0'));var util=require(_0x65bc('0x1'));var logger=require('../../config/logger')(_0x65bc('0x2'));var moment=require(_0x65bc('0x3'));var BPromise=require(_0x65bc('0x4'));var rp=require(_0x65bc('0x5'));var fs=require('fs');var path=require(_0x65bc('0x6'));var rimraf=require(_0x65bc('0x7'));var config=require(_0x65bc('0x8'));var attributes=require(_0x65bc('0x9'));module['exports']=function(_0x4c0743,_0x2ba8cc){return _0x4c0743[_0x65bc('0xa')](_0x65bc('0xb'),attributes,{'tableName':'migrations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index b007a32..342b852 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf151=['message','info','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','request','then','Migration,\x20%s,\x20%s','request\x20sent','debug','Migration,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x4c734e,_0x405b0e){var _0x167c17=function(_0xf7cd19){while(--_0xf7cd19){_0x4c734e['push'](_0x4c734e['shift']());}};_0x167c17(++_0x405b0e);}(_0xf151,0xab));var _0x1f15=function(_0x56bbd0,_0x4be5b8){_0x56bbd0=_0x56bbd0-0x0;var _0x32c8ce=_0xf151[_0x56bbd0];return _0x32c8ce;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x1f15('0x0'));var BPromise=require(_0x1f15('0x1'));var rs=require(_0x1f15('0x2'));var fs=require('fs');var Redis=require(_0x1f15('0x3'));var db=require(_0x1f15('0x4'))['db'];var utils=require(_0x1f15('0x5'));var logger=require(_0x1f15('0x6'))(_0x1f15('0x7'));var config=require('../../config/environment');var jayson=require(_0x1f15('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x5ecda5,_0x1a1c65,_0x166156){return new BPromise(function(_0xc7ae4b,_0x5d0bc8){return client[_0x1f15('0x9')](_0x5ecda5,_0x166156)[_0x1f15('0xa')](function(_0x590e7c){logger['info'](_0x1f15('0xb'),_0x1a1c65,_0x1f15('0xc'));logger[_0x1f15('0xd')](_0x1f15('0xe'),_0x1a1c65,'request\x20sent',JSON[_0x1f15('0xf')](_0x590e7c));if(_0x590e7c[_0x1f15('0x10')]){if(_0x590e7c[_0x1f15('0x10')][_0x1f15('0x11')]===0x1f4){logger['error']('Migration,\x20%s,\x20%s',_0x1a1c65,_0x590e7c[_0x1f15('0x10')][_0x1f15('0x12')]);return _0x5d0bc8(_0x590e7c[_0x1f15('0x10')][_0x1f15('0x12')]);}logger[_0x1f15('0x10')](_0x1f15('0xb'),_0x1a1c65,_0x590e7c['error'][_0x1f15('0x12')]);return _0xc7ae4b(_0x590e7c[_0x1f15('0x10')][_0x1f15('0x12')]);}else{logger[_0x1f15('0x13')]('Migration,\x20%s,\x20%s',_0x1a1c65,_0x1f15('0xc'));_0xc7ae4b(_0x590e7c['result'][_0x1f15('0x12')]);}})[_0x1f15('0x14')](function(_0x2960d2){logger['error']('Migration,\x20%s,\x20%s',_0x1a1c65,_0x2960d2);_0x5d0bc8(_0x2960d2);});});}
\ No newline at end of file
+var _0x65b3=['lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','info','Migration,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch'];(function(_0x4e6e8f,_0x5aa5b0){var _0x1dfe8a=function(_0x5bf755){while(--_0x5bf755){_0x4e6e8f['push'](_0x4e6e8f['shift']());}};_0x1dfe8a(++_0x5aa5b0);}(_0x65b3,0xc6));var _0x365b=function(_0x4eaa4c,_0x2f7422){_0x4eaa4c=_0x4eaa4c-0x0;var _0x15aec6=_0x65b3[_0x4eaa4c];return _0x15aec6;};'use strict';var _=require(_0x365b('0x0'));var util=require(_0x365b('0x1'));var moment=require(_0x365b('0x2'));var BPromise=require(_0x365b('0x3'));var rs=require(_0x365b('0x4'));var fs=require('fs');var Redis=require(_0x365b('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x365b('0x6'));var logger=require(_0x365b('0x7'))(_0x365b('0x8'));var config=require('../../config/environment');var jayson=require(_0x365b('0x9'));var client=jayson[_0x365b('0xa')][_0x365b('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5b7869,_0x160565,_0xe6670a){return new BPromise(function(_0x2ed50a,_0x3f95c1){return client[_0x365b('0xc')](_0x5b7869,_0xe6670a)['then'](function(_0x36afc2){logger[_0x365b('0xd')](_0x365b('0xe'),_0x160565,_0x365b('0xf'));logger[_0x365b('0x10')]('Migration,\x20%s,\x20%s,\x20%s',_0x160565,_0x365b('0xf'),JSON[_0x365b('0x11')](_0x36afc2));if(_0x36afc2[_0x365b('0x12')]){if(_0x36afc2[_0x365b('0x12')]['code']===0x1f4){logger['error'](_0x365b('0xe'),_0x160565,_0x36afc2[_0x365b('0x12')][_0x365b('0x13')]);return _0x3f95c1(_0x36afc2['error'][_0x365b('0x13')]);}logger['error'](_0x365b('0xe'),_0x160565,_0x36afc2[_0x365b('0x12')][_0x365b('0x13')]);return _0x2ed50a(_0x36afc2[_0x365b('0x12')][_0x365b('0x13')]);}else{logger[_0x365b('0xd')](_0x365b('0xe'),_0x160565,_0x365b('0xf'));_0x2ed50a(_0x36afc2[_0x365b('0x14')][_0x365b('0x13')]);}})[_0x365b('0x15')](function(_0x13403b){logger[_0x365b('0x12')](_0x365b('0xe'),_0x160565,_0x13403b);_0x3f95c1(_0x13403b);});});}
\ No newline at end of file
index b4ff6a5..44b4536 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe714=['connect-timeout','express','Router','../../components/auth/service','../../config/environment','./network.controller','get','isAuthenticated','index','show','post','create','/:id','update','delete','destroy','exports','multer','path'];(function(_0x34308c,_0x216cba){var _0x5770c1=function(_0x18d428){while(--_0x18d428){_0x34308c['push'](_0x34308c['shift']());}};_0x5770c1(++_0x216cba);}(_0xe714,0xe2));var _0x4e71=function(_0x4f28b7,_0x526514){_0x4f28b7=_0x4f28b7-0x0;var _0x4de36f=_0xe714[_0x4f28b7];return _0x4de36f;};'use strict';var multer=require(_0x4e71('0x0'));var util=require('util');var path=require(_0x4e71('0x1'));var timeout=require(_0x4e71('0x2'));var express=require(_0x4e71('0x3'));var router=express[_0x4e71('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x4e71('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x4e71('0x6'));var controller=require(_0x4e71('0x7'));router[_0x4e71('0x8')]('/',auth[_0x4e71('0x9')](),controller[_0x4e71('0xa')]);router[_0x4e71('0x8')]('/:id',auth[_0x4e71('0x9')](),controller[_0x4e71('0xb')]);router[_0x4e71('0xc')]('/',auth['isAuthenticated'](),controller[_0x4e71('0xd')]);router['put'](_0x4e71('0xe'),auth[_0x4e71('0x9')](),controller[_0x4e71('0xf')]);router[_0x4e71('0x10')](_0x4e71('0xe'),auth[_0x4e71('0x9')](),controller[_0x4e71('0x11')]);module[_0x4e71('0x12')]=router;
\ No newline at end of file
+var _0x8969=['update','delete','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./network.controller','index','get','/:id','show','post','isAuthenticated','put'];(function(_0x1e8f9e,_0x148061){var _0x2cec83=function(_0x55d9ee){while(--_0x55d9ee){_0x1e8f9e['push'](_0x1e8f9e['shift']());}};_0x2cec83(++_0x148061);}(_0x8969,0x130));var _0x9896=function(_0x493d55,_0x2c9ebc){_0x493d55=_0x493d55-0x0;var _0x4cf64f=_0x8969[_0x493d55];return _0x4cf64f;};'use strict';var multer=require(_0x9896('0x0'));var util=require('util');var path=require(_0x9896('0x1'));var timeout=require(_0x9896('0x2'));var express=require(_0x9896('0x3'));var router=express[_0x9896('0x4')]();var fs_extra=require(_0x9896('0x5'));var auth=require(_0x9896('0x6'));var interaction=require(_0x9896('0x7'));var config=require('../../config/environment');var controller=require(_0x9896('0x8'));router['get']('/',auth['isAuthenticated'](),controller[_0x9896('0x9')]);router[_0x9896('0xa')](_0x9896('0xb'),auth['isAuthenticated'](),controller[_0x9896('0xc')]);router[_0x9896('0xd')]('/',auth[_0x9896('0xe')](),controller['create']);router[_0x9896('0xf')](_0x9896('0xb'),auth['isAuthenticated'](),controller[_0x9896('0x10')]);router[_0x9896('0x11')]('/:id',auth[_0x9896('0xe')](),controller[_0x9896('0x12')]);module[_0x9896('0x13')]=router;
\ No newline at end of file
index 1f17fea..458fdf9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2976=['externip','STRING','sequelize','exports'];(function(_0x2331f8,_0x446a3a){var _0x244773=function(_0x2accba){while(--_0x2accba){_0x2331f8['push'](_0x2331f8['shift']());}};_0x244773(++_0x446a3a);}(_0x2976,0x12e));var _0x6297=function(_0x27b616,_0x4e3351){_0x27b616=_0x27b616-0x0;var _0x197f05=_0x2976[_0x27b616];return _0x197f05;};'use strict';var Sequelize=require(_0x6297('0x0'));module[_0x6297('0x1')]={'type':{'type':Sequelize['ENUM']('localnet',_0x6297('0x2'),'stun','turn')},'value':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0x6297('0x3')]},'password':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xce38=['ENUM','localnet','externip','stun','STRING','sequelize','exports'];(function(_0x3a2d9f,_0x4f25c8){var _0x378d5d=function(_0x401c37){while(--_0x401c37){_0x3a2d9f['push'](_0x3a2d9f['shift']());}};_0x378d5d(++_0x4f25c8);}(_0xce38,0x7c));var _0x8ce3=function(_0x1829c6,_0x4d98fd){_0x1829c6=_0x1829c6-0x0;var _0x19a7a0=_0xce38[_0x1829c6];return _0x19a7a0;};'use strict';var Sequelize=require(_0x8ce3('0x0'));module[_0x8ce3('0x1')]={'type':{'type':Sequelize[_0x8ce3('0x2')](_0x8ce3('0x3'),_0x8ce3('0x4'),_0x8ce3('0x5'),'turn')},'value':{'type':Sequelize[_0x8ce3('0x6')]},'username':{'type':Sequelize[_0x8ce3('0x6')]},'password':{'type':Sequelize['STRING']}};
\ No newline at end of file
index ba6eea5..a40ca08 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xee95=['merge','includeAll','findAll','rows','show','params','keys','options','Network','create','body','toUpperCase','STUN','readFileSync','join','root','render','/etc/asterisk/stun_xcally.conf','Reload','TURN','server/files/templates/turn_multiple.ejs','writeFileSync','/etc/asterisk/turn_xcally.conf','res_stun_monitor.so','server/files/templates/network.ejs','format','/etc/asterisk/sip_xcally_%s.conf','toLowerCase','chan_sip.so','find','server/files/templates/stun_multiple.ejs','utf8','destroy','path','ejs','lodash','../../components/parsers/qs','../../config/logger','../../config/environment','../../mysqldb','jayson/promise','http','request','Network,\x20%s,\x20%s','request\x20sent','Network,\x20%s,\x20%s,\x20%s','error','code','message','info','catch','status','offset','undefined','limit','count','set','json','update','then','end','sendStatus','stack','name','send','index','rawAttributes','fieldName','key','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filter','type','VIRTUAL'];(function(_0x4f5127,_0x30c028){var _0x234778=function(_0x1df8f6){while(--_0x1df8f6){_0x4f5127['push'](_0x4f5127['shift']());}};_0x234778(++_0x30c028);}(_0xee95,0x1c5));var _0x5ee9=function(_0x85e00e,_0x5b89b4){_0x85e00e=_0x85e00e-0x0;var _0x167e86=_0xee95[_0x85e00e];return _0x167e86;};'use strict';var util=require('util');var path=require(_0x5ee9('0x0'));var ejs=require(_0x5ee9('0x1'));var fs=require('fs');var _=require(_0x5ee9('0x2'));var qs=require(_0x5ee9('0x3'));var logger=require(_0x5ee9('0x4'))('api');var config=require(_0x5ee9('0x5'));var db=require(_0x5ee9('0x6'))['db'];var jayson=require(_0x5ee9('0x7'));var client=jayson['client'][_0x5ee9('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x535a83,_0x2768fa,_0x4b64d0,_0x11583e){return new Promise(function(_0x19c16a,_0x616928){var _0x2a3614=_0x11583e||client;return _0x2a3614[_0x5ee9('0x9')](_0x535a83,_0x4b64d0)['then'](function(_0x193d89){logger['info'](_0x5ee9('0xa'),_0x2768fa,_0x5ee9('0xb'));logger['debug'](_0x5ee9('0xc'),_0x2768fa,_0x5ee9('0xb'),JSON['stringify'](_0x193d89));if(_0x193d89[_0x5ee9('0xd')]){if(_0x193d89[_0x5ee9('0xd')][_0x5ee9('0xe')]===0x1f4){logger[_0x5ee9('0xd')](_0x5ee9('0xa'),_0x2768fa,_0x193d89[_0x5ee9('0xd')]['message']);return _0x616928(_0x193d89[_0x5ee9('0xd')][_0x5ee9('0xf')]);}logger[_0x5ee9('0xd')](_0x5ee9('0xa'),_0x2768fa,_0x193d89['error'][_0x5ee9('0xf')]);return _0x19c16a(_0x193d89[_0x5ee9('0xd')][_0x5ee9('0xf')]);}else{logger[_0x5ee9('0x10')]('Network,\x20%s,\x20%s',_0x2768fa,_0x5ee9('0xb'));_0x19c16a(_0x193d89['result'][_0x5ee9('0xf')]);}})[_0x5ee9('0x11')](function(_0x47e55e){logger['error'](_0x5ee9('0xa'),_0x2768fa,_0x47e55e);_0x616928(_0x47e55e);});});}function respondWithResult(_0x1a8315,_0x201fe4){_0x201fe4=_0x201fe4||0xc8;return function(_0x1915b4){if(_0x1915b4){return _0x1a8315[_0x5ee9('0x12')](_0x201fe4)['json'](_0x1915b4);}};}function respondWithFilteredResult(_0x524eb7,_0x385a99){return function(_0x5f4038){if(_0x5f4038){var _0x3bb8e6=typeof _0x385a99[_0x5ee9('0x13')]===_0x5ee9('0x14')&&typeof _0x385a99[_0x5ee9('0x15')]===_0x5ee9('0x14');var _0x13be3b=_0x5f4038[_0x5ee9('0x16')];var _0x19df2f=_0x3bb8e6?0x0:_0x385a99[_0x5ee9('0x13')];var _0x3b56a0=_0x3bb8e6?_0x5f4038[_0x5ee9('0x16')]:_0x385a99['offset']+_0x385a99[_0x5ee9('0x15')];var _0x22d921;if(_0x3b56a0>=_0x13be3b){_0x3b56a0=_0x13be3b;_0x22d921=0xc8;}else{_0x22d921=0xce;}_0x524eb7[_0x5ee9('0x12')](_0x22d921);return _0x524eb7[_0x5ee9('0x17')]('Content-Range',_0x19df2f+'-'+_0x3b56a0+'/'+_0x13be3b)[_0x5ee9('0x18')](_0x5f4038);}return null;};}function saveUpdates(_0x4fc4aa){return function(_0x5a0b54){if(_0x5a0b54){return _0x5a0b54[_0x5ee9('0x19')](_0x4fc4aa)[_0x5ee9('0x1a')](function(_0x39ab1a){return _0x39ab1a;});}return null;};}function removeEntity(_0x121e59){return function(_0x59df30){if(_0x59df30){return _0x59df30['destroy']()[_0x5ee9('0x1a')](function(){_0x121e59[_0x5ee9('0x12')](0xcc)[_0x5ee9('0x1b')]();});}};}function handleEntityNotFound(_0xf4383a){return function(_0x31bb01){if(!_0x31bb01){_0xf4383a[_0x5ee9('0x1c')](0x194);}return _0x31bb01;};}function handleError(_0x41cea3,_0x1f4860){_0x1f4860=_0x1f4860||0x1f4;return function(_0x52f7fe){logger[_0x5ee9('0xd')](_0x52f7fe[_0x5ee9('0x1d')]);if(_0x52f7fe[_0x5ee9('0x1e')]){delete _0x52f7fe['name'];}_0x41cea3[_0x5ee9('0x12')](_0x1f4860)[_0x5ee9('0x1f')](_0x52f7fe);};}exports[_0x5ee9('0x20')]=function(_0x5037cb,_0x3ca81e){var _0x3da947={},_0x2b9ef0={},_0x5f29ea={'count':0x0,'rows':[]};var _0x4797aa=_['map'](db['Network'][_0x5ee9('0x21')],function(_0x394e00){return{'name':_0x394e00[_0x5ee9('0x22')],'type':_0x394e00['type'][_0x5ee9('0x23')]};});_0x2b9ef0[_0x5ee9('0x24')]=_[_0x5ee9('0x25')](_0x4797aa,'name');_0x2b9ef0[_0x5ee9('0x26')]=_['keys'](_0x5037cb[_0x5ee9('0x26')]);_0x2b9ef0[_0x5ee9('0x27')]=_[_0x5ee9('0x28')](_0x2b9ef0[_0x5ee9('0x24')],_0x2b9ef0['query']);_0x3da947[_0x5ee9('0x29')]=_[_0x5ee9('0x28')](_0x2b9ef0[_0x5ee9('0x24')],qs[_0x5ee9('0x2a')](_0x5037cb[_0x5ee9('0x26')][_0x5ee9('0x2a')]));_0x3da947['attributes']=_0x3da947[_0x5ee9('0x29')][_0x5ee9('0x2b')]?_0x3da947['attributes']:_0x2b9ef0[_0x5ee9('0x24')];if(!_0x5037cb['query'][_0x5ee9('0x2c')]('nolimit')){_0x3da947['limit']=qs[_0x5ee9('0x15')](_0x5037cb[_0x5ee9('0x26')]['limit']);_0x3da947[_0x5ee9('0x13')]=qs[_0x5ee9('0x13')](_0x5037cb['query'][_0x5ee9('0x13')]);}_0x3da947[_0x5ee9('0x2d')]=qs[_0x5ee9('0x2e')](_0x5037cb[_0x5ee9('0x26')]['sort']);_0x3da947[_0x5ee9('0x2f')]=qs['filters'](_['pick'](_0x5037cb['query'],_0x2b9ef0[_0x5ee9('0x27')]),_0x4797aa);if(_0x5037cb['query'][_0x5ee9('0x30')]){_0x3da947[_0x5ee9('0x2f')]=_['merge'](_0x3da947[_0x5ee9('0x2f')],{'$or':_[_0x5ee9('0x25')](_0x4797aa,function(_0x34a2f9){if(_0x34a2f9[_0x5ee9('0x31')]!==_0x5ee9('0x32')){var _0x1305d2={};_0x1305d2[_0x34a2f9['name']]={'$like':'%'+_0x5037cb[_0x5ee9('0x26')][_0x5ee9('0x30')]+'%'};return _0x1305d2;}})});}_0x3da947=_[_0x5ee9('0x33')]({},_0x3da947,_0x5037cb['options']);var _0x3d02cf={'where':_0x3da947[_0x5ee9('0x2f')]};return db['Network'][_0x5ee9('0x16')](_0x3d02cf)['then'](function(_0x38d5d3){_0x5f29ea[_0x5ee9('0x16')]=_0x38d5d3;if(_0x5037cb[_0x5ee9('0x26')][_0x5ee9('0x34')]){_0x3da947['include']=[{'all':!![]}];}return db['Network'][_0x5ee9('0x35')](_0x3da947);})[_0x5ee9('0x1a')](function(_0x1e637c){_0x5f29ea[_0x5ee9('0x36')]=_0x1e637c;return _0x5f29ea;})[_0x5ee9('0x1a')](respondWithFilteredResult(_0x3ca81e,_0x3da947))[_0x5ee9('0x11')](handleError(_0x3ca81e,null));};exports[_0x5ee9('0x37')]=function(_0x50eca1,_0x4e1945){var _0x2817f5={'raw':!![],'where':{'id':_0x50eca1[_0x5ee9('0x38')]['id']}},_0x5e58ec={};_0x5e58ec[_0x5ee9('0x24')]=_[_0x5ee9('0x39')](db['Network']['rawAttributes']);_0x5e58ec[_0x5ee9('0x26')]=_[_0x5ee9('0x39')](_0x50eca1[_0x5ee9('0x26')]);_0x5e58ec[_0x5ee9('0x27')]=_['intersection'](_0x5e58ec[_0x5ee9('0x24')],_0x5e58ec[_0x5ee9('0x26')]);_0x2817f5[_0x5ee9('0x29')]=_['intersection'](_0x5e58ec['model'],qs[_0x5ee9('0x2a')](_0x50eca1[_0x5ee9('0x26')][_0x5ee9('0x2a')]));_0x2817f5[_0x5ee9('0x29')]=_0x2817f5[_0x5ee9('0x29')]['length']?_0x2817f5[_0x5ee9('0x29')]:_0x5e58ec[_0x5ee9('0x24')];if(_0x50eca1[_0x5ee9('0x26')][_0x5ee9('0x34')]){_0x2817f5['include']=[{'all':!![]}];}_0x2817f5=_[_0x5ee9('0x33')]({},_0x2817f5,_0x50eca1[_0x5ee9('0x3a')]);return db[_0x5ee9('0x3b')]['find'](_0x2817f5)[_0x5ee9('0x1a')](handleEntityNotFound(_0x4e1945,null))[_0x5ee9('0x1a')](respondWithResult(_0x4e1945,null))[_0x5ee9('0x11')](handleError(_0x4e1945,null));};exports[_0x5ee9('0x3c')]=function(_0x37f08e,_0x25ff28){var _0x2a68d2;return db[_0x5ee9('0x3b')][_0x5ee9('0x3c')](_0x37f08e[_0x5ee9('0x3d')],{'raw':!![]})[_0x5ee9('0x1a')](function(_0x3590ec){_0x2a68d2=_0x3590ec;return db[_0x5ee9('0x3b')]['findAll']({'where':{'type':_0x37f08e[_0x5ee9('0x3d')][_0x5ee9('0x31')]},'raw':!![]});})[_0x5ee9('0x1a')](function(_0x2de51b){if(_0x2a68d2[_0x5ee9('0x31')][_0x5ee9('0x3e')]()==_0x5ee9('0x3f')){var _0x3daafd=fs[_0x5ee9('0x40')](path[_0x5ee9('0x41')](config[_0x5ee9('0x42')],'server/files/templates/stun_multiple.ejs'),'utf8');var _0x18f1ab=ejs[_0x5ee9('0x43')](_0x3daafd,{'networks':_0x2de51b||[]});fs['writeFileSync'](_0x5ee9('0x44'),_0x18f1ab);return respondWithRpcPromise(_0x5ee9('0x45'),_0x5ee9('0x3c'),{'module':'res_stun_monitor.so'});}else if(_0x2a68d2[_0x5ee9('0x31')][_0x5ee9('0x3e')]()==_0x5ee9('0x46')){var _0x4b2c30=fs[_0x5ee9('0x40')](path[_0x5ee9('0x41')](config[_0x5ee9('0x42')],_0x5ee9('0x47')),'utf8');var _0x2fabf5=ejs[_0x5ee9('0x43')](_0x4b2c30,{'networks':_0x2de51b||[]});fs[_0x5ee9('0x48')](_0x5ee9('0x49'),_0x2fabf5);return respondWithRpcPromise(_0x5ee9('0x45'),_0x5ee9('0x3c'),{'module':_0x5ee9('0x4a')});}else{var _0x48c191=fs[_0x5ee9('0x40')](path[_0x5ee9('0x41')](config[_0x5ee9('0x42')],_0x5ee9('0x4b')),'utf8');var _0x18ad5a=ejs[_0x5ee9('0x43')](_0x48c191,{'networks':_0x2de51b||[]});fs[_0x5ee9('0x48')](util[_0x5ee9('0x4c')](_0x5ee9('0x4d'),_0x37f08e[_0x5ee9('0x3d')][_0x5ee9('0x31')][_0x5ee9('0x4e')]()),_0x18ad5a);return respondWithRpcPromise(_0x5ee9('0x45'),_0x5ee9('0x3c'),{'module':_0x5ee9('0x4f')});}})['then'](function(){return _0x2a68d2;})[_0x5ee9('0x1a')](respondWithResult(_0x25ff28,0xc9))[_0x5ee9('0x11')](handleError(_0x25ff28,null));};exports[_0x5ee9('0x19')]=function(_0x410ad0,_0x1d1838){var _0x135e28;return db[_0x5ee9('0x3b')][_0x5ee9('0x50')]({'where':{'id':_0x410ad0[_0x5ee9('0x38')]['id']}})[_0x5ee9('0x1a')](handleEntityNotFound(_0x1d1838,null))[_0x5ee9('0x1a')](saveUpdates(_0x410ad0[_0x5ee9('0x3d')],null))['then'](function(_0xbcdc96){if(_0xbcdc96){_0x135e28=_0xbcdc96;return db[_0x5ee9('0x3b')][_0x5ee9('0x35')]({'where':{'type':_0x135e28[_0x5ee9('0x31')]},'raw':!![]});}return null;})[_0x5ee9('0x1a')](function(_0x4573fb){if(_0x135e28[_0x5ee9('0x31')][_0x5ee9('0x3e')]()==_0x5ee9('0x3f')){var _0x54f517=fs['readFileSync'](path['join'](config[_0x5ee9('0x42')],_0x5ee9('0x51')),_0x5ee9('0x52'));var _0x3f5fa2=ejs[_0x5ee9('0x43')](_0x54f517,{'networks':_0x4573fb||[]});fs['writeFileSync'](_0x5ee9('0x44'),_0x3f5fa2);return respondWithRpcPromise(_0x5ee9('0x45'),_0x5ee9('0x19'),{'module':'res_stun_monitor.so'});}else if(_0x135e28[_0x5ee9('0x31')]['toUpperCase']()=='TURN'){var _0x11964b=fs['readFileSync'](path[_0x5ee9('0x41')](config[_0x5ee9('0x42')],'server/files/templates/turn_multiple.ejs'),_0x5ee9('0x52'));var _0x33ede2=ejs[_0x5ee9('0x43')](_0x11964b,{'networks':_0x4573fb||[]});fs[_0x5ee9('0x48')]('/etc/asterisk/turn_xcally.conf',_0x33ede2);return respondWithRpcPromise(_0x5ee9('0x45'),_0x5ee9('0x19'),{'module':_0x5ee9('0x4a')});}else{var _0x3e5c1c=fs[_0x5ee9('0x40')](path[_0x5ee9('0x41')](config['root'],'server/files/templates/network.ejs'),'utf8');var _0x31b60e=ejs[_0x5ee9('0x43')](_0x3e5c1c,{'networks':_0x4573fb||[]});fs['writeFileSync'](util[_0x5ee9('0x4c')](_0x5ee9('0x4d'),_0x410ad0[_0x5ee9('0x3d')]['type']['toLowerCase']()),_0x31b60e);return respondWithRpcPromise(_0x5ee9('0x45'),'update',{'module':_0x5ee9('0x4f')});}})[_0x5ee9('0x1a')](function(_0x5cc29e){if(_0x5cc29e){return _0x135e28;}return null;})[_0x5ee9('0x1a')](respondWithResult(_0x1d1838,null))[_0x5ee9('0x11')](handleError(_0x1d1838,null));};exports[_0x5ee9('0x53')]=function(_0x21de2e,_0x1ffe50){var _0x47d236;return db[_0x5ee9('0x3b')][_0x5ee9('0x50')]({'where':{'id':_0x21de2e[_0x5ee9('0x38')]['id']}})[_0x5ee9('0x1a')](function(_0x595263){_0x47d236=_0x595263;return _0x595263;})[_0x5ee9('0x1a')](handleEntityNotFound(_0x1ffe50,null))['then'](removeEntity(_0x1ffe50,null))[_0x5ee9('0x1a')](function(){if(_0x47d236){return db[_0x5ee9('0x3b')][_0x5ee9('0x35')]({'where':{'type':_0x47d236[_0x5ee9('0x31')]},'raw':!![]});}})[_0x5ee9('0x1a')](function(_0x98dbe0){if(_0x47d236['type'][_0x5ee9('0x3e')]()==_0x5ee9('0x3f')){var _0xbeff6a=fs['readFileSync'](path['join'](config[_0x5ee9('0x42')],_0x5ee9('0x51')),_0x5ee9('0x52'));var _0x2b81ff=ejs[_0x5ee9('0x43')](_0xbeff6a,{'networks':_0x98dbe0||[]});fs['writeFileSync'](_0x5ee9('0x44'),_0x2b81ff);return respondWithRpcPromise('Reload',_0x5ee9('0x53'),{'module':_0x5ee9('0x4a')});}else if(_0x47d236[_0x5ee9('0x31')][_0x5ee9('0x3e')]()==_0x5ee9('0x46')){var _0x1761f6=fs['readFileSync'](path[_0x5ee9('0x41')](config[_0x5ee9('0x42')],_0x5ee9('0x47')),_0x5ee9('0x52'));var _0x3c7e87=ejs['render'](_0x1761f6,{'networks':_0x98dbe0||[]});fs[_0x5ee9('0x48')](_0x5ee9('0x49'),_0x3c7e87);return respondWithRpcPromise('Reload',_0x5ee9('0x53'),{'module':_0x5ee9('0x4a')});}else{var _0x4fcdd5=fs['readFileSync'](path[_0x5ee9('0x41')](config[_0x5ee9('0x42')],_0x5ee9('0x4b')),_0x5ee9('0x52'));var _0x4293dc=ejs[_0x5ee9('0x43')](_0x4fcdd5,{'networks':_0x98dbe0||[]});fs[_0x5ee9('0x48')](util[_0x5ee9('0x4c')]('/etc/asterisk/sip_xcally_%s.conf',_0x47d236[_0x5ee9('0x31')][_0x5ee9('0x4e')]()),_0x4293dc);return respondWithRpcPromise('Reload',_0x5ee9('0x53'),{'module':_0x5ee9('0x4f')});}})[_0x5ee9('0x11')](handleError(_0x1ffe50,null));};
\ No newline at end of file
+var _0x37f2=['util','../../components/parsers/qs','../../config/logger','api','jayson/promise','request','then','info','Network,\x20%s,\x20%s','Network,\x20%s,\x20%s,\x20%s','error','code','message','request\x20sent','result','catch','status','json','undefined','count','offset','limit','set','update','destroy','end','stack','name','send','index','Network','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','filter','where','merge','map','VIRTUAL','options','rows','show','includeAll','include','create','body','findAll','toUpperCase','STUN','readFileSync','root','utf8','writeFileSync','/etc/asterisk/stun_xcally.conf','Reload','res_stun_monitor.so','TURN','server/files/templates/turn_multiple.ejs','render','/etc/asterisk/turn_xcally.conf','join','server/files/templates/network.ejs','format','/etc/asterisk/sip_xcally_%s.conf','toLowerCase','chan_sip.so','find','params','server/files/templates/stun_multiple.ejs'];(function(_0x725b8e,_0xc22b48){var _0x43ac45=function(_0x46bb4a){while(--_0x46bb4a){_0x725b8e['push'](_0x725b8e['shift']());}};_0x43ac45(++_0xc22b48);}(_0x37f2,0x1ec));var _0x237f=function(_0xb48347,_0x2a3fd9){_0xb48347=_0xb48347-0x0;var _0x1c1a99=_0x37f2[_0xb48347];return _0x1c1a99;};'use strict';var util=require(_0x237f('0x0'));var path=require('path');var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var qs=require(_0x237f('0x1'));var logger=require(_0x237f('0x2'))(_0x237f('0x3'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];var jayson=require(_0x237f('0x4'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x1b9011,_0x322879,_0x119069,_0x12f9e9){return new Promise(function(_0x42e0c2,_0x270f75){var _0x2614be=_0x12f9e9||client;return _0x2614be[_0x237f('0x5')](_0x1b9011,_0x119069)[_0x237f('0x6')](function(_0x2a6482){logger[_0x237f('0x7')](_0x237f('0x8'),_0x322879,'request\x20sent');logger['debug'](_0x237f('0x9'),_0x322879,'request\x20sent',JSON['stringify'](_0x2a6482));if(_0x2a6482['error']){if(_0x2a6482[_0x237f('0xa')][_0x237f('0xb')]===0x1f4){logger[_0x237f('0xa')]('Network,\x20%s,\x20%s',_0x322879,_0x2a6482[_0x237f('0xa')][_0x237f('0xc')]);return _0x270f75(_0x2a6482['error']['message']);}logger['error'](_0x237f('0x8'),_0x322879,_0x2a6482[_0x237f('0xa')][_0x237f('0xc')]);return _0x42e0c2(_0x2a6482[_0x237f('0xa')][_0x237f('0xc')]);}else{logger[_0x237f('0x7')](_0x237f('0x8'),_0x322879,_0x237f('0xd'));_0x42e0c2(_0x2a6482[_0x237f('0xe')][_0x237f('0xc')]);}})[_0x237f('0xf')](function(_0x49f920){logger[_0x237f('0xa')](_0x237f('0x8'),_0x322879,_0x49f920);_0x270f75(_0x49f920);});});}function respondWithResult(_0x2a11e0,_0x7af897){_0x7af897=_0x7af897||0xc8;return function(_0x4f59bd){if(_0x4f59bd){return _0x2a11e0[_0x237f('0x10')](_0x7af897)[_0x237f('0x11')](_0x4f59bd);}};}function respondWithFilteredResult(_0x5db588,_0x20c62c){return function(_0x232b17){if(_0x232b17){var _0x400c56=typeof _0x20c62c['offset']===_0x237f('0x12')&&typeof _0x20c62c['limit']===_0x237f('0x12');var _0x19b70c=_0x232b17[_0x237f('0x13')];var _0x4110b0=_0x400c56?0x0:_0x20c62c[_0x237f('0x14')];var _0x3b7903=_0x400c56?_0x232b17[_0x237f('0x13')]:_0x20c62c['offset']+_0x20c62c[_0x237f('0x15')];var _0x3660b8;if(_0x3b7903>=_0x19b70c){_0x3b7903=_0x19b70c;_0x3660b8=0xc8;}else{_0x3660b8=0xce;}_0x5db588[_0x237f('0x10')](_0x3660b8);return _0x5db588[_0x237f('0x16')]('Content-Range',_0x4110b0+'-'+_0x3b7903+'/'+_0x19b70c)[_0x237f('0x11')](_0x232b17);}return null;};}function saveUpdates(_0x388556){return function(_0x5f4d4e){if(_0x5f4d4e){return _0x5f4d4e[_0x237f('0x17')](_0x388556)[_0x237f('0x6')](function(_0x2727ba){return _0x2727ba;});}return null;};}function removeEntity(_0x224bf9){return function(_0x1ff058){if(_0x1ff058){return _0x1ff058[_0x237f('0x18')]()[_0x237f('0x6')](function(){_0x224bf9[_0x237f('0x10')](0xcc)[_0x237f('0x19')]();});}};}function handleEntityNotFound(_0x5bc3c8){return function(_0x2decae){if(!_0x2decae){_0x5bc3c8['sendStatus'](0x194);}return _0x2decae;};}function handleError(_0x71f4c1,_0x46e9d2){_0x46e9d2=_0x46e9d2||0x1f4;return function(_0xcb963a){logger[_0x237f('0xa')](_0xcb963a[_0x237f('0x1a')]);if(_0xcb963a[_0x237f('0x1b')]){delete _0xcb963a[_0x237f('0x1b')];}_0x71f4c1['status'](_0x46e9d2)[_0x237f('0x1c')](_0xcb963a);};}exports[_0x237f('0x1d')]=function(_0xf7f8b2,_0x1366aa){var _0x4fe715={},_0x5360cd={},_0x23834b={'count':0x0,'rows':[]};var _0x3eb4e4=_['map'](db[_0x237f('0x1e')][_0x237f('0x1f')],function(_0x2c5860){return{'name':_0x2c5860[_0x237f('0x20')],'type':_0x2c5860[_0x237f('0x21')][_0x237f('0x22')]};});_0x5360cd[_0x237f('0x23')]=_['map'](_0x3eb4e4,_0x237f('0x1b'));_0x5360cd[_0x237f('0x24')]=_[_0x237f('0x25')](_0xf7f8b2[_0x237f('0x24')]);_0x5360cd[_0x237f('0x26')]=_[_0x237f('0x27')](_0x5360cd[_0x237f('0x23')],_0x5360cd[_0x237f('0x24')]);_0x4fe715['attributes']=_[_0x237f('0x27')](_0x5360cd[_0x237f('0x23')],qs[_0x237f('0x28')](_0xf7f8b2[_0x237f('0x24')][_0x237f('0x28')]));_0x4fe715[_0x237f('0x29')]=_0x4fe715[_0x237f('0x29')][_0x237f('0x2a')]?_0x4fe715['attributes']:_0x5360cd[_0x237f('0x23')];if(!_0xf7f8b2['query'][_0x237f('0x2b')](_0x237f('0x2c'))){_0x4fe715['limit']=qs[_0x237f('0x15')](_0xf7f8b2[_0x237f('0x24')]['limit']);_0x4fe715[_0x237f('0x14')]=qs[_0x237f('0x14')](_0xf7f8b2[_0x237f('0x24')]['offset']);}_0x4fe715[_0x237f('0x2d')]=qs[_0x237f('0x2e')](_0xf7f8b2['query'][_0x237f('0x2e')]);_0x4fe715['where']=qs[_0x237f('0x26')](_['pick'](_0xf7f8b2[_0x237f('0x24')],_0x5360cd[_0x237f('0x26')]),_0x3eb4e4);if(_0xf7f8b2[_0x237f('0x24')][_0x237f('0x2f')]){_0x4fe715[_0x237f('0x30')]=_[_0x237f('0x31')](_0x4fe715['where'],{'$or':_[_0x237f('0x32')](_0x3eb4e4,function(_0x4eb11e){if(_0x4eb11e[_0x237f('0x21')]!==_0x237f('0x33')){var _0x551ae5={};_0x551ae5[_0x4eb11e[_0x237f('0x1b')]]={'$like':'%'+_0xf7f8b2[_0x237f('0x24')][_0x237f('0x2f')]+'%'};return _0x551ae5;}})});}_0x4fe715=_[_0x237f('0x31')]({},_0x4fe715,_0xf7f8b2[_0x237f('0x34')]);var _0x369ad9={'where':_0x4fe715[_0x237f('0x30')]};return db['Network'][_0x237f('0x13')](_0x369ad9)[_0x237f('0x6')](function(_0x33eba4){_0x23834b[_0x237f('0x13')]=_0x33eba4;if(_0xf7f8b2[_0x237f('0x24')]['includeAll']){_0x4fe715['include']=[{'all':!![]}];}return db['Network']['findAll'](_0x4fe715);})[_0x237f('0x6')](function(_0x162625){_0x23834b[_0x237f('0x35')]=_0x162625;return _0x23834b;})[_0x237f('0x6')](respondWithFilteredResult(_0x1366aa,_0x4fe715))[_0x237f('0xf')](handleError(_0x1366aa,null));};exports[_0x237f('0x36')]=function(_0x436509,_0x6a6c7a){var _0x5b6134={'raw':!![],'where':{'id':_0x436509['params']['id']}},_0x47ade3={};_0x47ade3['model']=_[_0x237f('0x25')](db[_0x237f('0x1e')][_0x237f('0x1f')]);_0x47ade3[_0x237f('0x24')]=_[_0x237f('0x25')](_0x436509[_0x237f('0x24')]);_0x47ade3[_0x237f('0x26')]=_[_0x237f('0x27')](_0x47ade3[_0x237f('0x23')],_0x47ade3[_0x237f('0x24')]);_0x5b6134[_0x237f('0x29')]=_[_0x237f('0x27')](_0x47ade3['model'],qs['fields'](_0x436509[_0x237f('0x24')][_0x237f('0x28')]));_0x5b6134[_0x237f('0x29')]=_0x5b6134['attributes'][_0x237f('0x2a')]?_0x5b6134['attributes']:_0x47ade3[_0x237f('0x23')];if(_0x436509[_0x237f('0x24')][_0x237f('0x37')]){_0x5b6134[_0x237f('0x38')]=[{'all':!![]}];}_0x5b6134=_[_0x237f('0x31')]({},_0x5b6134,_0x436509[_0x237f('0x34')]);return db[_0x237f('0x1e')]['find'](_0x5b6134)['then'](handleEntityNotFound(_0x6a6c7a,null))['then'](respondWithResult(_0x6a6c7a,null))[_0x237f('0xf')](handleError(_0x6a6c7a,null));};exports['create']=function(_0x3bc3de,_0x30cc12){var _0x30469c;return db[_0x237f('0x1e')][_0x237f('0x39')](_0x3bc3de[_0x237f('0x3a')],{'raw':!![]})[_0x237f('0x6')](function(_0x1919a2){_0x30469c=_0x1919a2;return db['Network'][_0x237f('0x3b')]({'where':{'type':_0x3bc3de[_0x237f('0x3a')]['type']},'raw':!![]});})[_0x237f('0x6')](function(_0x513448){if(_0x30469c[_0x237f('0x21')][_0x237f('0x3c')]()==_0x237f('0x3d')){var _0x5f07f7=fs[_0x237f('0x3e')](path['join'](config[_0x237f('0x3f')],'server/files/templates/stun_multiple.ejs'),_0x237f('0x40'));var _0x49afd6=ejs['render'](_0x5f07f7,{'networks':_0x513448||[]});fs[_0x237f('0x41')](_0x237f('0x42'),_0x49afd6);return respondWithRpcPromise(_0x237f('0x43'),_0x237f('0x39'),{'module':_0x237f('0x44')});}else if(_0x30469c['type'][_0x237f('0x3c')]()==_0x237f('0x45')){var _0x36f328=fs[_0x237f('0x3e')](path['join'](config[_0x237f('0x3f')],_0x237f('0x46')),_0x237f('0x40'));var _0x2015d2=ejs[_0x237f('0x47')](_0x36f328,{'networks':_0x513448||[]});fs['writeFileSync'](_0x237f('0x48'),_0x2015d2);return respondWithRpcPromise(_0x237f('0x43'),_0x237f('0x39'),{'module':_0x237f('0x44')});}else{var _0xbc7ce9=fs[_0x237f('0x3e')](path[_0x237f('0x49')](config[_0x237f('0x3f')],_0x237f('0x4a')),_0x237f('0x40'));var _0x55944b=ejs[_0x237f('0x47')](_0xbc7ce9,{'networks':_0x513448||[]});fs[_0x237f('0x41')](util[_0x237f('0x4b')](_0x237f('0x4c'),_0x3bc3de[_0x237f('0x3a')][_0x237f('0x21')][_0x237f('0x4d')]()),_0x55944b);return respondWithRpcPromise('Reload',_0x237f('0x39'),{'module':_0x237f('0x4e')});}})['then'](function(){return _0x30469c;})[_0x237f('0x6')](respondWithResult(_0x30cc12,0xc9))[_0x237f('0xf')](handleError(_0x30cc12,null));};exports[_0x237f('0x17')]=function(_0x59b454,_0x2ce5ce){var _0x13f063;return db[_0x237f('0x1e')][_0x237f('0x4f')]({'where':{'id':_0x59b454[_0x237f('0x50')]['id']}})[_0x237f('0x6')](handleEntityNotFound(_0x2ce5ce,null))[_0x237f('0x6')](saveUpdates(_0x59b454['body'],null))[_0x237f('0x6')](function(_0x10ce11){if(_0x10ce11){_0x13f063=_0x10ce11;return db['Network'][_0x237f('0x3b')]({'where':{'type':_0x13f063[_0x237f('0x21')]},'raw':!![]});}return null;})[_0x237f('0x6')](function(_0x45ea6f){if(_0x13f063[_0x237f('0x21')][_0x237f('0x3c')]()==_0x237f('0x3d')){var _0x3e22d2=fs[_0x237f('0x3e')](path[_0x237f('0x49')](config[_0x237f('0x3f')],_0x237f('0x51')),'utf8');var _0x1a0ccf=ejs['render'](_0x3e22d2,{'networks':_0x45ea6f||[]});fs['writeFileSync'](_0x237f('0x42'),_0x1a0ccf);return respondWithRpcPromise(_0x237f('0x43'),_0x237f('0x17'),{'module':_0x237f('0x44')});}else if(_0x13f063['type'][_0x237f('0x3c')]()==_0x237f('0x45')){var _0x3f2fdf=fs['readFileSync'](path['join'](config[_0x237f('0x3f')],_0x237f('0x46')),_0x237f('0x40'));var _0x2a3304=ejs['render'](_0x3f2fdf,{'networks':_0x45ea6f||[]});fs[_0x237f('0x41')](_0x237f('0x48'),_0x2a3304);return respondWithRpcPromise(_0x237f('0x43'),_0x237f('0x17'),{'module':'res_stun_monitor.so'});}else{var _0x223e05=fs[_0x237f('0x3e')](path['join'](config['root'],_0x237f('0x4a')),_0x237f('0x40'));var _0x31bc73=ejs[_0x237f('0x47')](_0x223e05,{'networks':_0x45ea6f||[]});fs[_0x237f('0x41')](util[_0x237f('0x4b')](_0x237f('0x4c'),_0x59b454[_0x237f('0x3a')][_0x237f('0x21')][_0x237f('0x4d')]()),_0x31bc73);return respondWithRpcPromise('Reload',_0x237f('0x17'),{'module':_0x237f('0x4e')});}})[_0x237f('0x6')](function(_0x37989a){if(_0x37989a){return _0x13f063;}return null;})['then'](respondWithResult(_0x2ce5ce,null))[_0x237f('0xf')](handleError(_0x2ce5ce,null));};exports[_0x237f('0x18')]=function(_0x2817f4,_0x125214){var _0x2a3196;return db[_0x237f('0x1e')][_0x237f('0x4f')]({'where':{'id':_0x2817f4['params']['id']}})[_0x237f('0x6')](function(_0x115d0c){_0x2a3196=_0x115d0c;return _0x115d0c;})[_0x237f('0x6')](handleEntityNotFound(_0x125214,null))[_0x237f('0x6')](removeEntity(_0x125214,null))[_0x237f('0x6')](function(){if(_0x2a3196){return db[_0x237f('0x1e')][_0x237f('0x3b')]({'where':{'type':_0x2a3196[_0x237f('0x21')]},'raw':!![]});}})[_0x237f('0x6')](function(_0x24a540){if(_0x2a3196[_0x237f('0x21')]['toUpperCase']()=='STUN'){var _0x1efadd=fs[_0x237f('0x3e')](path[_0x237f('0x49')](config[_0x237f('0x3f')],'server/files/templates/stun_multiple.ejs'),_0x237f('0x40'));var _0x1475e6=ejs[_0x237f('0x47')](_0x1efadd,{'networks':_0x24a540||[]});fs['writeFileSync']('/etc/asterisk/stun_xcally.conf',_0x1475e6);return respondWithRpcPromise('Reload',_0x237f('0x18'),{'module':'res_stun_monitor.so'});}else if(_0x2a3196[_0x237f('0x21')][_0x237f('0x3c')]()==_0x237f('0x45')){var _0x5affba=fs[_0x237f('0x3e')](path[_0x237f('0x49')](config['root'],_0x237f('0x46')),_0x237f('0x40'));var _0x99a48c=ejs['render'](_0x5affba,{'networks':_0x24a540||[]});fs[_0x237f('0x41')](_0x237f('0x48'),_0x99a48c);return respondWithRpcPromise(_0x237f('0x43'),_0x237f('0x18'),{'module':'res_stun_monitor.so'});}else{var _0x151bdd=fs[_0x237f('0x3e')](path[_0x237f('0x49')](config['root'],'server/files/templates/network.ejs'),'utf8');var _0x1ef6c6=ejs[_0x237f('0x47')](_0x151bdd,{'networks':_0x24a540||[]});fs[_0x237f('0x41')](util['format'](_0x237f('0x4c'),_0x2a3196['type'][_0x237f('0x4d')]()),_0x1ef6c6);return respondWithRpcPromise(_0x237f('0x43'),_0x237f('0x18'),{'module':_0x237f('0x4e')});}})[_0x237f('0xf')](handleError(_0x125214,null));};
\ No newline at end of file
index dd82c98..acf064f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x22fb=['define','Network','../../config/logger','moment','bluebird','request-promise','path','rimraf','./network.attributes','exports'];(function(_0x2f07ea,_0x467418){var _0x42836c=function(_0x10879b){while(--_0x10879b){_0x2f07ea['push'](_0x2f07ea['shift']());}};_0x42836c(++_0x467418);}(_0x22fb,0x192));var _0xb22f=function(_0x3aeb76,_0xe47d32){_0x3aeb76=_0x3aeb76-0x0;var _0x4808ff=_0x22fb[_0x3aeb76];return _0x4808ff;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xb22f('0x0'))('api');var moment=require(_0xb22f('0x1'));var BPromise=require(_0xb22f('0x2'));var rp=require(_0xb22f('0x3'));var fs=require('fs');var path=require(_0xb22f('0x4'));var rimraf=require(_0xb22f('0x5'));var config=require('../../config/environment');var attributes=require(_0xb22f('0x6'));module[_0xb22f('0x7')]=function(_0x2d1fb3,_0xc3ffcc){return _0x2d1fb3[_0xb22f('0x8')](_0xb22f('0x9'),attributes,{'tableName':'network','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x91a7=['bluebird','path','./network.attributes','exports','Network','network','util','../../config/logger','api'];(function(_0x1c79a7,_0x38220e){var _0x4de69f=function(_0x569582){while(--_0x569582){_0x1c79a7['push'](_0x1c79a7['shift']());}};_0x4de69f(++_0x38220e);}(_0x91a7,0xe7));var _0x791a=function(_0x5b1d0b,_0x5cf1e2){_0x5b1d0b=_0x5b1d0b-0x0;var _0x340ae1=_0x91a7[_0x5b1d0b];return _0x340ae1;};'use strict';var _=require('lodash');var util=require(_0x791a('0x0'));var logger=require(_0x791a('0x1'))(_0x791a('0x2'));var moment=require('moment');var BPromise=require(_0x791a('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x791a('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x791a('0x5'));module[_0x791a('0x6')]=function(_0x49a9b7,_0x361f53){return _0x49a9b7['define'](_0x791a('0x7'),attributes,{'tableName':_0x791a('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index b49be6b..62333aa 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(_0xba9ec5,_0x19dff4){_0xba9ec5=_0xba9ec5-0x0;var _0x6e2e48=_0x7a54[_0xba9ec5];return _0x6e2e48;};'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 _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(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0x7a54,0x106));var _0x47a5=function(_0x1d24f7,_0x10340a){_0x1d24f7=_0x1d24f7-0x0;var _0x590469=_0x7a54[_0x1d24f7];return _0x590469;};'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
index a52f3fa..75f3fa0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xda2d=['getDispositions','/:id/canned_answers','getAnswers','/:id/interactions','getInteractions','/:id/users','post','create','addDisposition','/:id/notify','notify','/:id/applications','addApplications','addAgents','put','/:id','delete','destroy','removeDispositions','removeAnswers','util','path','connect-timeout','express','Router','../../config/environment','./openchannelAccount.controller','get','isAuthenticated','index','/describe','describe','show','/:id/dispositions'];(function(_0x597009,_0x254949){var _0x4e88bd=function(_0x33832e){while(--_0x33832e){_0x597009['push'](_0x597009['shift']());}};_0x4e88bd(++_0x254949);}(_0xda2d,0x102));var _0xdda2=function(_0x2a4402,_0x39ec90){_0x2a4402=_0x2a4402-0x0;var _0x5afd6b=_0xda2d[_0x2a4402];return _0x5afd6b;};'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('0x7')]('/:id',auth[_0xdda2('0x8')](),controller[_0xdda2('0xc')]);router['get'](_0xdda2('0xd'),auth[_0xdda2('0x8')](),controller[_0xdda2('0xe')]);router[_0xdda2('0x7')](_0xdda2('0xf'),auth[_0xdda2('0x8')](),controller[_0xdda2('0x10')]);router[_0xdda2('0x7')]('/:id/applications',auth['isAuthenticated'](),controller['getApplications']);router[_0xdda2('0x7')](_0xdda2('0x11'),auth[_0xdda2('0x8')](),controller[_0xdda2('0x12')]);router[_0xdda2('0x7')](_0xdda2('0x13'),auth[_0xdda2('0x8')](),controller['getAgents']);router[_0xdda2('0x14')]('/',auth['isAuthenticated'](),controller[_0xdda2('0x15')]);router[_0xdda2('0x14')](_0xdda2('0xd'),auth[_0xdda2('0x8')](),controller[_0xdda2('0x16')]);router['post']('/:id/canned_answers',auth[_0xdda2('0x8')](),controller['addAnswer']);router[_0xdda2('0x14')](_0xdda2('0x17'),controller[_0xdda2('0x18')]);router[_0xdda2('0x14')](_0xdda2('0x19'),auth[_0xdda2('0x8')](),controller[_0xdda2('0x1a')]);router[_0xdda2('0x14')](_0xdda2('0x13'),auth[_0xdda2('0x8')](),controller[_0xdda2('0x1b')]);router[_0xdda2('0x14')]('/:id/send',auth[_0xdda2('0x8')](),controller['send']);router[_0xdda2('0x1c')](_0xdda2('0x1d'),auth[_0xdda2('0x8')](),controller['update']);router[_0xdda2('0x1e')]('/:id',auth[_0xdda2('0x8')](),controller[_0xdda2('0x1f')]);router['delete'](_0xdda2('0xd'),auth[_0xdda2('0x8')](),controller[_0xdda2('0x20')]);router[_0xdda2('0x1e')](_0xdda2('0xf'),auth['isAuthenticated'](),controller[_0xdda2('0x21')]);router[_0xdda2('0x1e')](_0xdda2('0x13'),auth[_0xdda2('0x8')](),controller['removeAgents']);module['exports']=router;
\ No newline at end of file
+var _0x14a0=['connect-timeout','express','Router','fs-extra','../../components/auth/service','./openchannelAccount.controller','get','isAuthenticated','/describe','describe','getDispositions','/:id/canned_answers','/:id/applications','getApplications','/:id/interactions','getInteractions','/:id/users','getAgents','create','/:id/dispositions','post','addAnswer','/:id/notify','notify','addApplications','/:id/send','send','put','/:id','update','delete','removeDispositions','removeAnswers','exports','util','path'];(function(_0x72129f,_0x3d52e2){var _0xc0c836=function(_0xd26a50){while(--_0xd26a50){_0x72129f['push'](_0x72129f['shift']());}};_0xc0c836(++_0x3d52e2);}(_0x14a0,0x8e));var _0x014a=function(_0x2443d9,_0x32d420){_0x2443d9=_0x2443d9-0x0;var _0x12f606=_0x14a0[_0x2443d9];return _0x12f606;};'use strict';var multer=require('multer');var util=require(_0x014a('0x0'));var path=require(_0x014a('0x1'));var timeout=require(_0x014a('0x2'));var express=require(_0x014a('0x3'));var router=express[_0x014a('0x4')]();var fs_extra=require(_0x014a('0x5'));var auth=require(_0x014a('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x014a('0x7'));router[_0x014a('0x8')]('/',auth[_0x014a('0x9')](),controller['index']);router['get'](_0x014a('0xa'),auth[_0x014a('0x9')](),controller[_0x014a('0xb')]);router['get']('/:id',auth[_0x014a('0x9')](),controller['show']);router['get']('/:id/dispositions',auth['isAuthenticated'](),controller[_0x014a('0xc')]);router['get'](_0x014a('0xd'),auth[_0x014a('0x9')](),controller['getAnswers']);router[_0x014a('0x8')](_0x014a('0xe'),auth[_0x014a('0x9')](),controller[_0x014a('0xf')]);router[_0x014a('0x8')](_0x014a('0x10'),auth[_0x014a('0x9')](),controller[_0x014a('0x11')]);router[_0x014a('0x8')](_0x014a('0x12'),auth[_0x014a('0x9')](),controller[_0x014a('0x13')]);router['post']('/',auth[_0x014a('0x9')](),controller[_0x014a('0x14')]);router['post'](_0x014a('0x15'),auth[_0x014a('0x9')](),controller['addDisposition']);router[_0x014a('0x16')](_0x014a('0xd'),auth[_0x014a('0x9')](),controller[_0x014a('0x17')]);router[_0x014a('0x16')](_0x014a('0x18'),controller[_0x014a('0x19')]);router[_0x014a('0x16')](_0x014a('0xe'),auth[_0x014a('0x9')](),controller[_0x014a('0x1a')]);router[_0x014a('0x16')](_0x014a('0x12'),auth[_0x014a('0x9')](),controller['addAgents']);router[_0x014a('0x16')](_0x014a('0x1b'),auth[_0x014a('0x9')](),controller[_0x014a('0x1c')]);router[_0x014a('0x1d')](_0x014a('0x1e'),auth[_0x014a('0x9')](),controller[_0x014a('0x1f')]);router[_0x014a('0x20')]('/:id',auth[_0x014a('0x9')](),controller['destroy']);router[_0x014a('0x20')](_0x014a('0x15'),auth[_0x014a('0x9')](),controller[_0x014a('0x21')]);router[_0x014a('0x20')](_0x014a('0xd'),auth[_0x014a('0x9')](),controller[_0x014a('0x22')]);router[_0x014a('0x20')]('/:id/users',auth[_0x014a('0x9')](),controller['removeAgents']);module[_0x014a('0x23')]=router;
\ No newline at end of file
index fbff35a..d65af07 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdf24=['sequelize','STRING','name','TEXT','Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}','BOOLEAN','INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDisposition'];(function(_0x35ad1d,_0x139af2){var _0x178bde=function(_0x3a3fb6){while(--_0x3a3fb6){_0x35ad1d['push'](_0x35ad1d['shift']());}};_0x178bde(++_0x139af2);}(_0xdf24,0x197));var _0x4df2=function(_0x44c6d3,_0x8107ad){_0x44c6d3=_0x44c6d3-0x0;var _0x1c1b7d=_0xdf24[_0x44c6d3];return _0x1c1b7d;};'use strict';var Sequelize=require(_0x4df2('0x0'));var rs=require('randomstring');module['exports']={'name':{'type':Sequelize[_0x4df2('0x1')],'unique':_0x4df2('0x2'),'allowNull':![]},'description':{'type':Sequelize['STRING']},'token':{'type':Sequelize[_0x4df2('0x1')],'defaultValue':function(){return rs['generate']();}},'replyUri':{'type':Sequelize[_0x4df2('0x1')],'validate':{'isUrl':!![]}},'key':{'type':Sequelize[_0x4df2('0x1')],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0x4df2('0x3')],'defaultValue':function(){return _0x4df2('0x4');}},'notificationSound':{'type':Sequelize[_0x4df2('0x5')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x4df2('0x5')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'mapKey':{'type':Sequelize[_0x4df2('0x1')]},'queueTransfer':{'type':Sequelize[_0x4df2('0x5')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x4df2('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x4df2('0x6')],'allowNull':!![],'defaultValue':null,'comment':_0x4df2('0x7')},'mandatoryDisposition':{'type':Sequelize[_0x4df2('0x5')],'defaultValue':![],'comment':_0x4df2('0x8'),'set':function(_0x304a9a){if(!_0x304a9a)this[_0x4df2('0x9')]('mandatoryDispositionPauseId',null);this['setDataValue'](_0x4df2('0xa'),_0x304a9a);}}};
\ No newline at end of file
+var _0xb749=['INTEGER','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','randomstring','STRING','TEXT','BOOLEAN'];(function(_0xd34131,_0x154367){var _0x11bcf0=function(_0x3631e6){while(--_0x3631e6){_0xd34131['push'](_0xd34131['shift']());}};_0x11bcf0(++_0x154367);}(_0xb749,0xf7));var _0x9b74=function(_0x8de54f,_0x271987){_0x8de54f=_0x8de54f-0x0;var _0x14cba4=_0xb749[_0x8de54f];return _0x14cba4;};'use strict';var Sequelize=require(_0x9b74('0x0'));var rs=require(_0x9b74('0x1'));module['exports']={'name':{'type':Sequelize['STRING'],'unique':'name','allowNull':![]},'description':{'type':Sequelize[_0x9b74('0x2')]},'token':{'type':Sequelize['STRING'],'defaultValue':function(){return rs['generate']();}},'replyUri':{'type':Sequelize['STRING'],'validate':{'isUrl':!![]}},'key':{'type':Sequelize[_0x9b74('0x2')],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0x9b74('0x3')],'defaultValue':function(){return'Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}';}},'notificationSound':{'type':Sequelize[_0x9b74('0x4')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x9b74('0x4')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'mapKey':{'type':Sequelize['STRING']},'queueTransfer':{'type':Sequelize[_0x9b74('0x4')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x9b74('0x5')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x9b74('0x4')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x9b74('0x5')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x9b74('0x5')],'allowNull':!![],'defaultValue':null,'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0x9b74('0x4')],'defaultValue':![],'comment':_0x9b74('0x6'),'set':function(_0x10e9f3){if(!_0x10e9f3)this['setDataValue'](_0x9b74('0x7'),null);this['setDataValue'](_0x9b74('0x8'),_0x10e9f3);}}};
\ No newline at end of file
index 33ffd1c..3058fa1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb51e=['hasOwnProperty','order','sort','pick','filter','where','merge','VIRTUAL','options','includeAll','findAll','rows','show','params','mandatoryDispositionPause','include','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','describe','addDisposition','OpenchannelAccountId','getDispositions','findOne','Disposition','removeDispositions','CannedAnswer','getAnswers','nolimit','removeAnswers','openchannel','Sequelize','ValidationError','createdAt','difference','CompanyId','isNil','from','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','List','Contacts','DESC','OpenchannelApplication','Applications','applications','priority','asc','account','ListId','CmContact','contact','firstName','lastName','threadId','OpenchannelInteraction','externalUrl','ContactId','spread','messageId','interaction','get','created','push','*,*,*,*','UserId','User','unshift','agent','queueId','OpenchannelQueue','queue','waitForTheAssignedQueue','Start','startRouting','EventManager','notify','transaction','sequelize','Transaction','ISOLATION_LEVELS','READ_COMMITTED','bulkCreate','findAndCountAll','getApplications','getInteractions','Contact','fullname','internal','color','tag','addAgents','ids','emit','userOpenchannelAccount:save','removeAgents','isArray','userOpenchannelAccount:remove','getAgents','updatedAt','out','OpenchannelMessage','dataValues','Messages','eml-format','rimraf','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','redis','defaults','localhost','socket.io-emitter','./openchannelAccount.socket','register','jayson/promise','client','http','then','info','OpenchannelAccount,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','sendStatus','status','json','offset','undefined','count','limit','set','reject','save','update','OpenchannelAccounts','destroy','end','stack','name','send','index','Pause','map','OpenchannelAccount','rawAttributes','fieldName','key','query','keys','filters','model','attributes','intersection','fields','length'];(function(_0x50c16c,_0x43b99e){var _0x24dc5f=function(_0x39b90f){while(--_0x39b90f){_0x50c16c['push'](_0x50c16c['shift']());}};_0x24dc5f(++_0x43b99e);}(_0xb51e,0x12f));var _0xeb51=function(_0x8f61fe,_0x1ad7a2){_0x8f61fe=_0x8f61fe-0x0;var _0x2b9d7d=_0xb51e[_0x8f61fe];return _0x2b9d7d;};'use strict';var emlformat=require(_0xeb51('0x0'));var rimraf=require(_0xeb51('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xeb51('0x2'));var moment=require(_0xeb51('0x3'));var BPromise=require(_0xeb51('0x4'));var Mustache=require(_0xeb51('0x5'));var util=require(_0xeb51('0x6'));var path=require(_0xeb51('0x7'));var sox=require(_0xeb51('0x8'));var csv=require(_0xeb51('0x9'));var ejs=require(_0xeb51('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xeb51('0xb'));var squel=require('squel');var crypto=require(_0xeb51('0xc'));var jsforce=require(_0xeb51('0xd'));var deskjs=require(_0xeb51('0xe'));var toCsv=require(_0xeb51('0x9'));var querystring=require(_0xeb51('0xf'));var Papa=require('papaparse');var Redis=require(_0xeb51('0x10'));var authService=require(_0xeb51('0x11'));var qs=require(_0xeb51('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xeb51('0x13'));var logger=require(_0xeb51('0x14'))(_0xeb51('0x15'));var utils=require(_0xeb51('0x16'));var config=require(_0xeb51('0x17'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];config[_0xeb51('0x18')]=_[_0xeb51('0x19')](config[_0xeb51('0x18')],{'host':_0xeb51('0x1a'),'port':0x18eb});var socket=require(_0xeb51('0x1b'))(new Redis(config[_0xeb51('0x18')]));require(_0xeb51('0x1c'))[_0xeb51('0x1d')](socket);var jayson=require(_0xeb51('0x1e'));var client=jayson[_0xeb51('0x1f')]['http']({'port':0x232c});var client9002=jayson[_0xeb51('0x1f')][_0xeb51('0x20')]({'port':0x232a});function respondWithRpcPromise(_0x2b0ee2,_0x1c6748,_0x2eead5,_0x36dfdf){return new BPromise(function(_0xa19fea,_0x2f09a8){var _0x412a9e=_0x36dfdf||client;return _0x412a9e['request'](_0x2b0ee2,_0x2eead5)[_0xeb51('0x21')](function(_0xeb6d0e){logger[_0xeb51('0x22')](_0xeb51('0x23'),_0x1c6748,_0xeb51('0x24'));logger['debug']('OpenchannelAccount,\x20%s,\x20%s,\x20%s',_0x1c6748,'request\x20sent',JSON[_0xeb51('0x25')](_0xeb6d0e));if(_0xeb6d0e[_0xeb51('0x26')]){if(_0xeb6d0e[_0xeb51('0x26')][_0xeb51('0x27')]===0x1f4){logger[_0xeb51('0x26')]('OpenchannelAccount,\x20%s,\x20%s',_0x1c6748,_0xeb6d0e[_0xeb51('0x26')][_0xeb51('0x28')]);return _0x2f09a8(_0xeb6d0e[_0xeb51('0x26')][_0xeb51('0x28')]);}logger[_0xeb51('0x26')](_0xeb51('0x23'),_0x1c6748,_0xeb6d0e[_0xeb51('0x26')][_0xeb51('0x28')]);return _0xa19fea(_0xeb6d0e[_0xeb51('0x26')][_0xeb51('0x28')]);}else{logger[_0xeb51('0x22')]('OpenchannelAccount,\x20%s,\x20%s',_0x1c6748,_0xeb51('0x24'));_0xa19fea(_0xeb6d0e[_0xeb51('0x29')]['message']);}})[_0xeb51('0x2a')](function(_0x2afddd){logger[_0xeb51('0x26')](_0xeb51('0x23'),_0x1c6748,_0x2afddd);_0x2f09a8(_0x2afddd);});});}function respondWithStatusCode(_0x3cbb0d,_0x24f7fc){_0x24f7fc=_0x24f7fc||0xcc;return function(_0x3b8cf1){if(_0x3b8cf1){return _0x3cbb0d[_0xeb51('0x2b')](_0x24f7fc);}return _0x3cbb0d[_0xeb51('0x2c')](_0x24f7fc)['end']();};}function respondWithResult(_0x265d60,_0x404b3c){_0x404b3c=_0x404b3c||0xc8;return function(_0x2e323b){if(_0x2e323b){return _0x265d60[_0xeb51('0x2c')](_0x404b3c)[_0xeb51('0x2d')](_0x2e323b);}};}function respondWithFilteredResult(_0x1c48fc,_0xaa433){return function(_0x321b67){if(_0x321b67){var _0x28933f=typeof _0xaa433[_0xeb51('0x2e')]===_0xeb51('0x2f')&&typeof _0xaa433['limit']===_0xeb51('0x2f');var _0x3df529=_0x321b67[_0xeb51('0x30')];var _0x2661f4=_0x28933f?0x0:_0xaa433[_0xeb51('0x2e')];var _0xd24f92=_0x28933f?_0x321b67[_0xeb51('0x30')]:_0xaa433[_0xeb51('0x2e')]+_0xaa433[_0xeb51('0x31')];var _0x1306b8;if(_0xd24f92>=_0x3df529){_0xd24f92=_0x3df529;_0x1306b8=0xc8;}else{_0x1306b8=0xce;}_0x1c48fc[_0xeb51('0x2c')](_0x1306b8);return _0x1c48fc[_0xeb51('0x32')]('Content-Range',_0x2661f4+'-'+_0xd24f92+'/'+_0x3df529)[_0xeb51('0x2d')](_0x321b67);}return null;};}function patchUpdates(_0xaaac40){return function(_0x873a3a){try{jsonpatch['apply'](_0x873a3a,_0xaaac40,!![]);}catch(_0x448c3a){return BPromise[_0xeb51('0x33')](_0x448c3a);}return _0x873a3a[_0xeb51('0x34')]();};}function saveUpdates(_0x4877de,_0x30cf91){return function(_0x26ffac){if(_0x26ffac){return _0x26ffac[_0xeb51('0x35')](_0x4877de)[_0xeb51('0x21')](function(_0x333b1f){return _0x333b1f;});}return null;};}function removeEntity(_0x2c63f6,_0x1f9968){return function(_0x389f93){if(_0x389f93){return _0x389f93['destroy']()[_0xeb51('0x21')](function(){var _0x17b2bc=_0x389f93['get']({'plain':!![]});var _0x5a9ab9=_0xeb51('0x36');return db['UserProfileResource'][_0xeb51('0x37')]({'where':{'type':_0x5a9ab9,'resourceId':_0x17b2bc['id']}})[_0xeb51('0x21')](function(){return _0x389f93;});})[_0xeb51('0x21')](function(){_0x2c63f6[_0xeb51('0x2c')](0xcc)[_0xeb51('0x38')]();});}};}function handleEntityNotFound(_0x8a1489,_0x4eeb3c){return function(_0x56e132){if(!_0x56e132){_0x8a1489[_0xeb51('0x2b')](0x194);}return _0x56e132;};}function handleError(_0x2f9623,_0x7d0036){_0x7d0036=_0x7d0036||0x1f4;return function(_0x4f1712){logger['error'](_0x4f1712[_0xeb51('0x39')]);if(_0x4f1712[_0xeb51('0x3a')]){delete _0x4f1712[_0xeb51('0x3a')];}_0x2f9623[_0xeb51('0x2c')](_0x7d0036)[_0xeb51('0x3b')](_0x4f1712);};}exports[_0xeb51('0x3c')]=function(_0x4599da,_0x157c64){var _0x448dca={'include':[{'model':db[_0xeb51('0x3d')],'as':'mandatoryDispositionPause'}]},_0x468a39={},_0x4dc138={'count':0x0,'rows':[]};var _0x36af07=_[_0xeb51('0x3e')](db[_0xeb51('0x3f')][_0xeb51('0x40')],function(_0x3a7d6b){return{'name':_0x3a7d6b[_0xeb51('0x41')],'type':_0x3a7d6b['type'][_0xeb51('0x42')]};});_0x468a39['model']=_[_0xeb51('0x3e')](_0x36af07,_0xeb51('0x3a'));_0x468a39[_0xeb51('0x43')]=_[_0xeb51('0x44')](_0x4599da[_0xeb51('0x43')]);_0x468a39[_0xeb51('0x45')]=_['intersection'](_0x468a39[_0xeb51('0x46')],_0x468a39[_0xeb51('0x43')]);_0x448dca[_0xeb51('0x47')]=_[_0xeb51('0x48')](_0x468a39[_0xeb51('0x46')],qs['fields'](_0x4599da[_0xeb51('0x43')][_0xeb51('0x49')]));_0x448dca[_0xeb51('0x47')]=_0x448dca['attributes'][_0xeb51('0x4a')]?_0x448dca[_0xeb51('0x47')]:_0x468a39[_0xeb51('0x46')];if(!_0x4599da['query'][_0xeb51('0x4b')]('nolimit')){_0x448dca[_0xeb51('0x31')]=qs['limit'](_0x4599da[_0xeb51('0x43')][_0xeb51('0x31')]);_0x448dca[_0xeb51('0x2e')]=qs[_0xeb51('0x2e')](_0x4599da[_0xeb51('0x43')][_0xeb51('0x2e')]);}_0x448dca[_0xeb51('0x4c')]=qs[_0xeb51('0x4d')](_0x4599da[_0xeb51('0x43')][_0xeb51('0x4d')]);_0x448dca['where']=qs[_0xeb51('0x45')](_[_0xeb51('0x4e')](_0x4599da[_0xeb51('0x43')],_0x468a39[_0xeb51('0x45')]),_0x36af07);if(_0x4599da['query'][_0xeb51('0x4f')]){_0x448dca[_0xeb51('0x50')]=_[_0xeb51('0x51')](_0x448dca[_0xeb51('0x50')],{'$or':_[_0xeb51('0x3e')](_0x36af07,function(_0x1a9be4){if(_0x1a9be4['type']!==_0xeb51('0x52')){var _0x1f78dc={};_0x1f78dc[_0x1a9be4[_0xeb51('0x3a')]]={'$like':'%'+_0x4599da[_0xeb51('0x43')]['filter']+'%'};return _0x1f78dc;}})});}_0x448dca=_[_0xeb51('0x51')]({},_0x448dca,_0x4599da[_0xeb51('0x53')]);var _0x108dd2={'where':_0x448dca['where']};return db[_0xeb51('0x3f')][_0xeb51('0x30')](_0x108dd2)[_0xeb51('0x21')](function(_0x16461c){_0x4dc138[_0xeb51('0x30')]=_0x16461c;if(_0x4599da[_0xeb51('0x43')][_0xeb51('0x54')]){_0x448dca['include']=[{'all':!![]}];}return db['OpenchannelAccount'][_0xeb51('0x55')](_0x448dca);})['then'](function(_0x5d596a){_0x4dc138[_0xeb51('0x56')]=_0x5d596a;return _0x4dc138;})['then'](respondWithFilteredResult(_0x157c64,_0x448dca))[_0xeb51('0x2a')](handleError(_0x157c64,null));};exports[_0xeb51('0x57')]=function(_0x28c7b0,_0x18d25d){var _0x4bf6fe={'raw':![],'where':{'id':_0x28c7b0[_0xeb51('0x58')]['id']},'include':[{'model':db[_0xeb51('0x3d')],'as':_0xeb51('0x59')}]},_0x128872={};_0x128872['model']=_[_0xeb51('0x44')](db[_0xeb51('0x3f')]['rawAttributes']);_0x128872['query']=_[_0xeb51('0x44')](_0x28c7b0[_0xeb51('0x43')]);_0x128872[_0xeb51('0x45')]=_[_0xeb51('0x48')](_0x128872['model'],_0x128872[_0xeb51('0x43')]);_0x4bf6fe['attributes']=_[_0xeb51('0x48')](_0x128872[_0xeb51('0x46')],qs['fields'](_0x28c7b0[_0xeb51('0x43')][_0xeb51('0x49')]));_0x4bf6fe[_0xeb51('0x47')]=_0x4bf6fe[_0xeb51('0x47')][_0xeb51('0x4a')]?_0x4bf6fe[_0xeb51('0x47')]:_0x128872[_0xeb51('0x46')];if(_0x28c7b0['query']['includeAll']){_0x4bf6fe[_0xeb51('0x5a')]=[{'all':!![]}];}_0x4bf6fe=_['merge']({},_0x4bf6fe,_0x28c7b0[_0xeb51('0x53')]);return db[_0xeb51('0x3f')][_0xeb51('0x5b')](_0x4bf6fe)[_0xeb51('0x21')](handleEntityNotFound(_0x18d25d,null))[_0xeb51('0x21')](respondWithResult(_0x18d25d,null))[_0xeb51('0x2a')](handleError(_0x18d25d,null));};exports[_0xeb51('0x5c')]=function(_0x54a3ca,_0x42516e){return db[_0xeb51('0x3f')][_0xeb51('0x5c')](_0x54a3ca[_0xeb51('0x5d')],{})[_0xeb51('0x21')](function(_0x49d54a){var _0x46564b=_0x54a3ca[_0xeb51('0x5e')]['get']({'plain':!![]});if(!_0x46564b)throw new Error(_0xeb51('0x5f'));if(_0x46564b[_0xeb51('0x60')]===_0xeb51('0x5e')){var _0x4b6974=_0x49d54a['get']({'plain':!![]});var _0x1f3c9b='OpenchannelAccounts';return db[_0xeb51('0x61')][_0xeb51('0x5b')]({'where':{'name':_0x1f3c9b,'userProfileId':_0x46564b[_0xeb51('0x62')]},'raw':!![]})[_0xeb51('0x21')](function(_0x4bb88a){if(_0x4bb88a&&_0x4bb88a[_0xeb51('0x63')]===0x0){return db['UserProfileResource'][_0xeb51('0x5c')]({'name':_0x4b6974['name'],'resourceId':_0x4b6974['id'],'type':_0x4bb88a[_0xeb51('0x3a')],'sectionId':_0x4bb88a['id']},{})[_0xeb51('0x21')](function(){return _0x49d54a;});}else{return _0x49d54a;}})['catch'](function(_0x2e9d11){logger[_0xeb51('0x26')](_0xeb51('0x64'),_0x2e9d11);throw _0x2e9d11;});}return _0x49d54a;})[_0xeb51('0x21')](respondWithResult(_0x42516e,0xc9))['catch'](handleError(_0x42516e,null));};exports[_0xeb51('0x35')]=function(_0x1e4845,_0x4543d7){if(_0x1e4845[_0xeb51('0x5d')]['id']){delete _0x1e4845[_0xeb51('0x5d')]['id'];}return db['OpenchannelAccount'][_0xeb51('0x5b')]({'where':{'id':_0x1e4845[_0xeb51('0x58')]['id']},'include':[{'model':db[_0xeb51('0x3d')],'as':'mandatoryDispositionPause'}]})[_0xeb51('0x21')](handleEntityNotFound(_0x4543d7,null))[_0xeb51('0x21')](saveUpdates(_0x1e4845['body'],null))[_0xeb51('0x21')](respondWithResult(_0x4543d7,null))[_0xeb51('0x2a')](handleError(_0x4543d7,null));};exports[_0xeb51('0x37')]=function(_0x2d5825,_0x237c5a){return db[_0xeb51('0x3f')][_0xeb51('0x5b')]({'where':{'id':_0x2d5825[_0xeb51('0x58')]['id']}})['then'](handleEntityNotFound(_0x237c5a,null))['then'](removeEntity(_0x237c5a,null))[_0xeb51('0x2a')](handleError(_0x237c5a,null));};exports[_0xeb51('0x65')]=function(_0x975742,_0x5accda){return db[_0xeb51('0x3f')]['describe']()[_0xeb51('0x21')](respondWithResult(_0x5accda,null))[_0xeb51('0x2a')](handleError(_0x5accda,null));};exports[_0xeb51('0x66')]=function(_0x429a2d,_0xc88762,_0x26bc2e){if(_0x429a2d[_0xeb51('0x5d')]['id']){delete _0x429a2d['body']['id'];}return db[_0xeb51('0x3f')][_0xeb51('0x5b')]({'where':{'id':_0x429a2d[_0xeb51('0x58')]['id']}})[_0xeb51('0x21')](handleEntityNotFound(_0xc88762,null))[_0xeb51('0x21')](function(_0x1f4b64){if(_0x1f4b64){_0x429a2d[_0xeb51('0x5d')][_0xeb51('0x67')]=_0x1f4b64['id'];return db['Disposition']['create'](_0x429a2d[_0xeb51('0x5d')]);}})[_0xeb51('0x21')](respondWithResult(_0xc88762,null))['catch'](handleError(_0xc88762,null));};exports[_0xeb51('0x68')]=function(_0x5b22b3,_0x430a9d,_0x5ea71a){var _0xf7e86a={'raw':![],'where':{}};var _0x1f432a={};var _0x6346a={'count':0x0,'rows':[]};return db[_0xeb51('0x3f')][_0xeb51('0x69')]({'where':{'id':_0x5b22b3[_0xeb51('0x58')]['id']}})[_0xeb51('0x21')](handleEntityNotFound(_0x430a9d,null))['then'](function(_0x4ec422){if(_0x4ec422){_0x1f432a[_0xeb51('0x46')]=_[_0xeb51('0x44')](db['Disposition'][_0xeb51('0x40')]);_0x1f432a[_0xeb51('0x43')]=_['keys'](_0x5b22b3['query']);_0x1f432a[_0xeb51('0x45')]=_[_0xeb51('0x48')](_0x1f432a[_0xeb51('0x46')],_0x1f432a[_0xeb51('0x43')]);_0xf7e86a[_0xeb51('0x47')]=_[_0xeb51('0x48')](_0x1f432a[_0xeb51('0x46')],qs[_0xeb51('0x49')](_0x5b22b3[_0xeb51('0x43')]['fields']));_0xf7e86a[_0xeb51('0x47')]=_0xf7e86a[_0xeb51('0x47')][_0xeb51('0x4a')]?_0xf7e86a[_0xeb51('0x47')]:_0x1f432a[_0xeb51('0x46')];if(!_0x5b22b3['query'][_0xeb51('0x4b')]('nolimit')){_0xf7e86a['limit']=qs[_0xeb51('0x31')](_0x5b22b3[_0xeb51('0x43')][_0xeb51('0x31')]);_0xf7e86a[_0xeb51('0x2e')]=qs[_0xeb51('0x2e')](_0x5b22b3['query'][_0xeb51('0x2e')]);}_0xf7e86a['order']=qs['sort'](_0x5b22b3[_0xeb51('0x43')][_0xeb51('0x4d')]);_0xf7e86a[_0xeb51('0x50')]=qs['filters'](_['pick'](_0x5b22b3[_0xeb51('0x43')],_0x1f432a[_0xeb51('0x45')]));_0xf7e86a[_0xeb51('0x50')][_0xeb51('0x67')]=_0x4ec422['id'];if(_0x5b22b3['query']['filter']){_0xf7e86a[_0xeb51('0x50')]=_[_0xeb51('0x51')](_0xf7e86a[_0xeb51('0x50')],{'$or':_[_0xeb51('0x3e')](_0xf7e86a['attributes'],function(_0x1ab675){var _0x7e9a3d={};_0x7e9a3d[_0x1ab675]={'$like':'%'+_0x5b22b3['query'][_0xeb51('0x4f')]+'%'};return _0x7e9a3d;})});}_0xf7e86a=_[_0xeb51('0x51')]({},_0xf7e86a,_0x5b22b3['options']);return db[_0xeb51('0x6a')][_0xeb51('0x30')]({'where':_0xf7e86a['where']})[_0xeb51('0x21')](function(_0x3c59af){_0x6346a['count']=_0x3c59af;if(_0x5b22b3[_0xeb51('0x43')]['includeAll']){_0xf7e86a[_0xeb51('0x5a')]=[{'all':!![]}];}return db[_0xeb51('0x6a')][_0xeb51('0x55')](_0xf7e86a);})['then'](function(_0xf7a1bb){_0x6346a['rows']=_0xf7a1bb;return _0x6346a;});}})[_0xeb51('0x21')](respondWithFilteredResult(_0x430a9d,_0xf7e86a))['catch'](handleError(_0x430a9d,null));};exports[_0xeb51('0x6b')]=function(_0x12c863,_0x450ca3,_0x519ea4){return db['OpenchannelAccount'][_0xeb51('0x5b')]({'where':{'id':_0x12c863['params']['id']}})[_0xeb51('0x21')](handleEntityNotFound(_0x450ca3,null))['then'](function(_0x4db968){if(_0x4db968){return _0x4db968[_0xeb51('0x6b')](_0x12c863[_0xeb51('0x43')]['ids']);}})[_0xeb51('0x21')](respondWithStatusCode(_0x450ca3,null))[_0xeb51('0x2a')](handleError(_0x450ca3,null));};exports['addAnswer']=function(_0x110f73,_0x49047b,_0xba2ee2){if(_0x110f73[_0xeb51('0x5d')]['id']){delete _0x110f73[_0xeb51('0x5d')]['id'];}return db['OpenchannelAccount'][_0xeb51('0x5b')]({'where':{'id':_0x110f73['params']['id']}})['then'](handleEntityNotFound(_0x49047b,null))['then'](function(_0x165426){if(_0x165426){_0x110f73[_0xeb51('0x5d')][_0xeb51('0x67')]=_0x165426['id'];return db[_0xeb51('0x6c')][_0xeb51('0x5c')](_0x110f73[_0xeb51('0x5d')]);}})[_0xeb51('0x21')](respondWithResult(_0x49047b,null))['catch'](handleError(_0x49047b,null));};exports[_0xeb51('0x6d')]=function(_0x18391d,_0x901c70,_0x32e6df){var _0x3db0f1={'raw':![],'where':{}};var _0x207144={};var _0x4691c2={'count':0x0,'rows':[]};return db[_0xeb51('0x3f')][_0xeb51('0x69')]({'where':{'id':_0x18391d[_0xeb51('0x58')]['id']}})[_0xeb51('0x21')](handleEntityNotFound(_0x901c70,null))['then'](function(_0x510a4c){if(_0x510a4c){_0x207144[_0xeb51('0x46')]=_['keys'](db[_0xeb51('0x6c')]['rawAttributes']);_0x207144[_0xeb51('0x43')]=_['keys'](_0x18391d['query']);_0x207144['filters']=_['intersection'](_0x207144[_0xeb51('0x46')],_0x207144[_0xeb51('0x43')]);_0x3db0f1['attributes']=_['intersection'](_0x207144[_0xeb51('0x46')],qs[_0xeb51('0x49')](_0x18391d[_0xeb51('0x43')][_0xeb51('0x49')]));_0x3db0f1['attributes']=_0x3db0f1[_0xeb51('0x47')][_0xeb51('0x4a')]?_0x3db0f1[_0xeb51('0x47')]:_0x207144[_0xeb51('0x46')];if(!_0x18391d['query']['hasOwnProperty'](_0xeb51('0x6e'))){_0x3db0f1[_0xeb51('0x31')]=qs['limit'](_0x18391d[_0xeb51('0x43')][_0xeb51('0x31')]);_0x3db0f1[_0xeb51('0x2e')]=qs[_0xeb51('0x2e')](_0x18391d[_0xeb51('0x43')]['offset']);}_0x3db0f1[_0xeb51('0x4c')]=qs[_0xeb51('0x4d')](_0x18391d[_0xeb51('0x43')][_0xeb51('0x4d')]);_0x3db0f1['where']=qs[_0xeb51('0x45')](_['pick'](_0x18391d[_0xeb51('0x43')],_0x207144[_0xeb51('0x45')]));_0x3db0f1[_0xeb51('0x50')][_0xeb51('0x67')]=_0x510a4c['id'];if(_0x18391d['query'][_0xeb51('0x4f')]){_0x3db0f1['where']=_[_0xeb51('0x51')](_0x3db0f1['where'],{'$or':_[_0xeb51('0x3e')](_0x3db0f1[_0xeb51('0x47')],function(_0x5570fc){var _0x140cc9={};_0x140cc9[_0x5570fc]={'$like':'%'+_0x18391d[_0xeb51('0x43')][_0xeb51('0x4f')]+'%'};return _0x140cc9;})});}_0x3db0f1=_[_0xeb51('0x51')]({},_0x3db0f1,_0x18391d[_0xeb51('0x53')]);return db[_0xeb51('0x6c')][_0xeb51('0x30')]({'where':_0x3db0f1[_0xeb51('0x50')]})[_0xeb51('0x21')](function(_0x294d97){_0x4691c2[_0xeb51('0x30')]=_0x294d97;if(_0x18391d[_0xeb51('0x43')][_0xeb51('0x54')]){_0x3db0f1[_0xeb51('0x5a')]=[{'all':!![]}];}return db['CannedAnswer'][_0xeb51('0x55')](_0x3db0f1);})['then'](function(_0x44e849){_0x4691c2[_0xeb51('0x56')]=_0x44e849;return _0x4691c2;});}})[_0xeb51('0x21')](respondWithFilteredResult(_0x901c70,_0x3db0f1))[_0xeb51('0x2a')](handleError(_0x901c70,null));};exports[_0xeb51('0x6f')]=function(_0x360897,_0x3873e5,_0x35b32e){return db['OpenchannelAccount'][_0xeb51('0x5b')]({'where':{'id':_0x360897[_0xeb51('0x58')]['id']}})['then'](handleEntityNotFound(_0x3873e5,null))['then'](function(_0x26639e){if(_0x26639e){return _0x26639e['removeAnswers'](_0x360897[_0xeb51('0x43')]['ids']);}})['then'](respondWithStatusCode(_0x3873e5,null))[_0xeb51('0x2a')](handleError(_0x3873e5,null));};exports['notify']=function(_0x48b97c,_0x2dc370,_0x1098fc){var _0x3de866={'body':_0x48b97c['body'],'channel':_0xeb51('0x70')};var _0x3a2825=[];var _0x1b2348=[];var _0x2137ff={};var _0x41669f=![];return db['CmContact']['describe']()[_0xeb51('0x21')](function(_0x564751){if(!_0x564751){throw new db[(_0xeb51('0x71'))][(_0xeb51('0x72'))]('no\x20available\x20attributes');}_0x3a2825=_['difference'](_['keys'](_0x564751),[_0xeb51('0x73'),'updatedAt']);_0x1b2348=_[_0xeb51('0x74')](_[_0xeb51('0x44')](_0x564751),['createdAt','updatedAt',_0xeb51('0x75'),'ListId']);if(_0x48b97c[_0xeb51('0x5d')]['id']){delete _0x48b97c['body']['id'];}if(_[_0xeb51('0x76')](_0x48b97c[_0xeb51('0x5d')][_0xeb51('0x77')])){throw new db[(_0xeb51('0x71'))][(_0xeb51('0x72'))](_0xeb51('0x78'));}if(_[_0xeb51('0x76')](_0x48b97c[_0xeb51('0x5d')][_0xeb51('0x5d')])||_0x48b97c[_0xeb51('0x5d')][_0xeb51('0x5d')]===''){throw new db[(_0xeb51('0x71'))][(_0xeb51('0x72'))](_0xeb51('0x79'));}if(_['isNil'](_0x48b97c['body']['mapKey'])){throw new db[(_0xeb51('0x71'))]['ValidationError']('mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x1b2348);}if(!_['includes'](_0x1b2348,_0x48b97c[_0xeb51('0x5d')][_0xeb51('0x7a')])){throw new db[(_0xeb51('0x71'))][(_0xeb51('0x72'))](_0xeb51('0x7b')+_0x1b2348);}_0x2137ff[_0x48b97c['body'][_0xeb51('0x7a')]]=_0x48b97c['body'][_0xeb51('0x77')];})[_0xeb51('0x21')](function(){return db['OpenchannelAccount'][_0xeb51('0x5b')]({'where':{'id':_0x48b97c[_0xeb51('0x58')]['id']},'include':[{'model':db[_0xeb51('0x7c')],'as':_0xeb51('0x7d'),'include':[{'model':db['CmContact'],'as':_0xeb51('0x7e'),'where':_0x2137ff,'limit':0x1,'order':[['updatedAt',_0xeb51('0x7f')]]}]},{'model':db[_0xeb51('0x80')],'as':_0xeb51('0x81')}]});})['then'](handleEntityNotFound(_0x2dc370,null))[_0xeb51('0x21')](function(_0x5016b2){if(_0x5016b2&&_0x5016b2['List']){_0x3de866['account']=_0x5016b2;_0x3de866[_0xeb51('0x82')]=_0x5016b2[_0xeb51('0x81')];_0x3de866['list']=_0x5016b2[_0xeb51('0x7d')];_0x3de866[_0xeb51('0x82')]=_['orderBy'](_0x3de866[_0xeb51('0x82')],[_0xeb51('0x83')],[_0xeb51('0x84')]);if(_0x3de866[_0xeb51('0x85')][_0xeb51('0x81')]){delete _0x3de866[_0xeb51('0x85')]['Applications'];}if(_0x3de866['account']['List']&&_0x3de866[_0xeb51('0x85')]['List'][_0xeb51('0x7e')][_0xeb51('0x4a')]){return _0x3de866[_0xeb51('0x85')]['List'][_0xeb51('0x7e')][0x0];}var _0x36e37d=_[_0xeb51('0x19')](_0x48b97c[_0xeb51('0x5d')],{'firstName':_0x48b97c[_0xeb51('0x5d')][_0xeb51('0x77')],'ListId':_0x5016b2[_0xeb51('0x86')]});_0x36e37d[_0x48b97c['body'][_0xeb51('0x7a')]]=_0x48b97c['body'][_0xeb51('0x77')];return db[_0xeb51('0x87')][_0xeb51('0x5c')](_0x36e37d,{'fields':_0x3a2825,'raw':!![]});}})[_0xeb51('0x21')](handleEntityNotFound(_0x2dc370,null))[_0xeb51('0x21')](function(_0x28028e){_0x3de866[_0xeb51('0x88')]=_0x28028e;if(_0x28028e){var _0x13b910={'ContactId':_0x28028e['id'],'OpenchannelAccountId':_0x48b97c[_0xeb51('0x58')]['id'],'from':(_0x28028e[_0xeb51('0x89')]||'')+'\x20'+(_0x28028e[_0xeb51('0x8a')]||'')};var _0x30d78d={'OpenchannelAccountId':_0x48b97c[_0xeb51('0x58')]['id'],'closed':![]};if(_0x48b97c['body'][_0xeb51('0x8b')]){_0x30d78d[_0xeb51('0x8b')]=_0x48b97c[_0xeb51('0x5d')][_0xeb51('0x8b')];return db[_0xeb51('0x8c')]['find']({'where':_0x30d78d})[_0xeb51('0x21')](function(_0x345be7){if(_0x345be7){return[_0x345be7,![]];}_0x13b910['threadId']=_0x48b97c[_0xeb51('0x5d')][_0xeb51('0x8b')];_0x13b910[_0xeb51('0x8d')]=_0x48b97c[_0xeb51('0x5d')][_0xeb51('0x8d')];return db[_0xeb51('0x8c')][_0xeb51('0x5c')](_0x13b910)[_0xeb51('0x21')](function(_0x126827){return[_0x126827,!![]];});});}else{_0x30d78d[_0xeb51('0x8b')]=null;}_0x30d78d[_0xeb51('0x8e')]=_0x28028e['id'];return db[_0xeb51('0x8c')][_0xeb51('0x5b')]({'where':_0x30d78d})['then'](function(_0x5ce6d2){if(_0x5ce6d2){return[_0x5ce6d2,![]];}return db[_0xeb51('0x8c')]['create'](_0x13b910)[_0xeb51('0x21')](function(_0x1edb38){return[_0x1edb38,!![]];});});}})[_0xeb51('0x8f')](function(_0x596b58,_0x1f17c5){if(_0x596b58){_0x41669f=_0x1f17c5;if(!_0x1f17c5){var _0x4139aa={'from':(_0x3de866[_0xeb51('0x88')][_0xeb51('0x89')]||'')+'\x20'+(_0x3de866['contact'][_0xeb51('0x8a')]||'')};if(_0x48b97c[_0xeb51('0x5d')][_0xeb51('0x8b')]&&_0x48b97c[_0xeb51('0x5d')]['messageId']&&_0x48b97c[_0xeb51('0x5d')][_0xeb51('0x8b')]!=_0x48b97c[_0xeb51('0x5d')]['messageId']){_0x4139aa[_0xeb51('0x8b')]=_0x48b97c[_0xeb51('0x5d')][_0xeb51('0x90')];}return _0x596b58[_0xeb51('0x35')](_0x4139aa);}else{return _0x596b58;}}})[_0xeb51('0x21')](function(_0x2f312d){_0x3de866[_0xeb51('0x91')]=_0x2f312d[_0xeb51('0x92')]({'plain':!![]});_0x3de866[_0xeb51('0x91')][_0xeb51('0x93')]=_0x41669f;if(_0x3de866[_0xeb51('0x91')]['created']){if(_0x3de866['account']['autoclose']){_0x3de866['applications'][_0xeb51('0x94')]({'id':0x0,'priority':_0x3de866['applications']['length']+0x1,'app':'close','appdata':'unmanaged','interval':_0xeb51('0x95')});}}return db['OpenchannelMessage']['create']({'body':_0x48b97c[_0xeb51('0x5d')]['body'],'OpenchannelAccountId':_0x48b97c['params']['id'],'OpenchannelInteractionId':_0x2f312d['id'],'direction':'in','ContactId':_0x3de866[_0xeb51('0x88')]['id'],'AttachmentId':_0x48b97c[_0xeb51('0x5d')]['AttachmentId']});})[_0xeb51('0x21')](function(_0x9ac077){_0x3de866[_0xeb51('0x28')]=_0x9ac077;if(!_0x3de866[_0xeb51('0x91')][_0xeb51('0x96')])return;return db[_0xeb51('0x97')][_0xeb51('0x5b')]({'attributes':['id',_0xeb51('0x3a')],'where':{'id':_0x3de866['interaction'][_0xeb51('0x96')]}});})[_0xeb51('0x21')](function(_0x3f1a01){if(_0x3f1a01){_0x3de866[_0xeb51('0x82')][_0xeb51('0x98')]({'id':0x0,'priority':0x0,'app':_0xeb51('0x99'),'appdata':_0x3f1a01['name']+','+(_0x3de866[_0xeb51('0x85')]['waitForTheAssignedAgent']||0xa),'interval':_0xeb51('0x95')});}if(!_0x3de866[_0xeb51('0x91')][_0xeb51('0x9a')])return;return db[_0xeb51('0x9b')][_0xeb51('0x5b')]({'attributes':['id',_0xeb51('0x3a')],'where':{'id':_0x3de866[_0xeb51('0x91')]['queueId']}});})[_0xeb51('0x21')](function(_0x16c55c){if(_0x16c55c){_0x3de866['applications'][_0xeb51('0x98')]({'id':0x0,'priority':0x1,'app':_0xeb51('0x9c'),'appdata':_0x16c55c[_0xeb51('0x3a')]+','+(_0x3de866[_0xeb51('0x85')][_0xeb51('0x9d')]||0x12c),'interval':_0xeb51('0x95')});}return respondWithRpcPromise(_0xeb51('0x9e'),_0xeb51('0x9f'),_0x3de866);})[_0xeb51('0x21')](function(_0x41345b){respondWithRpcPromise(_0xeb51('0xa0'),_0xeb51('0xa0'),{'event':_0xeb51('0xa1'),'message':_0x41345b},client9002);return _0x41345b;})[_0xeb51('0x21')](respondWithResult(_0x2dc370,null))[_0xeb51('0x2a')](handleError(_0x2dc370,null));};exports['addApplications']=function(_0x2e7152,_0x2d208c){var _0x41efc1=_0x2e7152[_0xeb51('0x58')]['id'];var _0x10578d=_0x2e7152[_0xeb51('0x5d')];var _0x54cd31=0xc8;var _0x3838c5=null;return db['sequelize'][_0xeb51('0xa2')]({'isolationLevel':db[_0xeb51('0xa3')][_0xeb51('0xa4')][_0xeb51('0xa5')][_0xeb51('0xa6')]},function(_0x3e3cba){return db[_0xeb51('0x3f')][_0xeb51('0x69')]({'where':{'id':_0x41efc1},'transaction':_0x3e3cba})['then'](function(_0x5abf4a){if(_0x5abf4a){return db[_0xeb51('0x80')][_0xeb51('0x37')]({'where':{'OpenchannelAccountId':_0x41efc1},'transaction':_0x3e3cba})[_0xeb51('0x21')](function(){var _0x3ac3cc=_[_0xeb51('0x3e')](_0x10578d,function(_0x124277){_0x124277[_0xeb51('0x67')]=_0x41efc1;return _0x124277;});return db[_0xeb51('0x80')][_0xeb51('0xa7')](_0x3ac3cc,{'transaction':_0x3e3cba});});}else{_0x54cd31=0x194;_0x3838c5=[];}});})[_0xeb51('0x21')](function(){if(_0x54cd31!==0x194){return db[_0xeb51('0x80')][_0xeb51('0xa8')]({'where':{'OpenchannelAccountId':_0x41efc1},'order':'priority'})[_0xeb51('0x21')](function(_0x2a9b2e){_0x3838c5=_0x2a9b2e;});}})[_0xeb51('0x2a')](function(_0x40d817){_0x54cd31=0x1f4;logger['error'](_0x40d817[_0xeb51('0x39')]);if(_0x40d817[_0xeb51('0x3a')]){delete _0x40d817[_0xeb51('0x3a')];}_0x3838c5=_0x40d817;})['finally'](function(){if(_0x3838c5===null){_0x2d208c[_0xeb51('0x2b')](_0x54cd31);}else{if(_0x54cd31===0x1f4){_0x2d208c['status'](_0x54cd31)[_0xeb51('0x3b')](_0x3838c5);}else{_0x2d208c['status'](_0x54cd31)['json'](_0x3838c5);}}});};exports[_0xeb51('0xa9')]=function(_0xcebaf8,_0xc69bda,_0xa1ad47){var _0x1d218a={};var _0x3570b6={};var _0x5d753d;var _0x1fbbf7;return db[_0xeb51('0x3f')][_0xeb51('0x69')]({'where':{'id':_0xcebaf8[_0xeb51('0x58')]['id']}})[_0xeb51('0x21')](handleEntityNotFound(_0xc69bda,null))[_0xeb51('0x21')](function(_0x2d4cd5){if(_0x2d4cd5){_0x5d753d=_0x2d4cd5;_0x3570b6[_0xeb51('0x46')]=_[_0xeb51('0x44')](db[_0xeb51('0x80')][_0xeb51('0x40')]);_0x3570b6[_0xeb51('0x43')]=_[_0xeb51('0x44')](_0xcebaf8[_0xeb51('0x43')]);_0x3570b6[_0xeb51('0x45')]=_[_0xeb51('0x48')](_0x3570b6[_0xeb51('0x46')],_0x3570b6['query']);_0x1d218a[_0xeb51('0x47')]=_[_0xeb51('0x48')](_0x3570b6[_0xeb51('0x46')],qs[_0xeb51('0x49')](_0xcebaf8[_0xeb51('0x43')][_0xeb51('0x49')]));_0x1d218a['attributes']=_0x1d218a[_0xeb51('0x47')]['length']?_0x1d218a['attributes']:_0x3570b6['model'];_0x1d218a[_0xeb51('0x4c')]=qs[_0xeb51('0x4d')](_0xcebaf8[_0xeb51('0x43')][_0xeb51('0x4d')]);_0x1d218a[_0xeb51('0x50')]=qs['filters'](_['pick'](_0xcebaf8[_0xeb51('0x43')],_0x3570b6[_0xeb51('0x45')]));if(_0xcebaf8['query'][_0xeb51('0x4f')]){_0x1d218a[_0xeb51('0x50')]=_['merge'](_0x1d218a[_0xeb51('0x50')],{'$or':_[_0xeb51('0x3e')](_0x1d218a[_0xeb51('0x47')],function(_0x390700){var _0x24315a={};_0x24315a[_0x390700]={'$like':'%'+_0xcebaf8[_0xeb51('0x43')][_0xeb51('0x4f')]+'%'};return _0x24315a;})});}_0x1d218a=_[_0xeb51('0x51')]({},_0x1d218a,_0xcebaf8[_0xeb51('0x53')]);return _0x5d753d[_0xeb51('0xa9')](_0x1d218a);}})['then'](function(_0x5e0e94){if(_0x5e0e94){_0x1fbbf7=_0x5e0e94['length'];if(!_0xcebaf8[_0xeb51('0x43')][_0xeb51('0x4b')](_0xeb51('0x6e'))){_0x1d218a[_0xeb51('0x31')]=qs['limit'](_0xcebaf8[_0xeb51('0x43')][_0xeb51('0x31')]);_0x1d218a[_0xeb51('0x2e')]=qs['offset'](_0xcebaf8[_0xeb51('0x43')][_0xeb51('0x2e')]);}return _0x5d753d[_0xeb51('0xa9')](_0x1d218a);}})[_0xeb51('0x21')](function(_0x5d5335){if(_0x5d5335){return _0x5d5335?{'count':_0x1fbbf7,'rows':_0x5d5335}:null;}})[_0xeb51('0x21')](respondWithResult(_0xc69bda,null))[_0xeb51('0x2a')](handleError(_0xc69bda,null));};exports[_0xeb51('0xaa')]=function(_0x2aa41d,_0x3427b6,_0x59bde2){var _0x23f644={'raw':![],'where':{}};var _0x5ce59d={};var _0x3fb149={'count':0x0,'rows':[]};return db[_0xeb51('0x3f')][_0xeb51('0x69')]({'where':{'id':_0x2aa41d['params']['id']}})['then'](handleEntityNotFound(_0x3427b6,null))[_0xeb51('0x21')](function(_0x2dcefb){if(_0x2dcefb){_0x5ce59d[_0xeb51('0x46')]=_[_0xeb51('0x44')](db[_0xeb51('0x8c')][_0xeb51('0x40')]);_0x5ce59d['query']=_[_0xeb51('0x44')](_0x2aa41d[_0xeb51('0x43')]);_0x5ce59d[_0xeb51('0x45')]=_[_0xeb51('0x48')](_0x5ce59d[_0xeb51('0x46')],_0x5ce59d[_0xeb51('0x43')]);_0x23f644[_0xeb51('0x47')]=_[_0xeb51('0x48')](_0x5ce59d['model'],qs[_0xeb51('0x49')](_0x2aa41d[_0xeb51('0x43')][_0xeb51('0x49')]));_0x23f644[_0xeb51('0x47')]=_0x23f644[_0xeb51('0x47')][_0xeb51('0x4a')]?_0x23f644[_0xeb51('0x47')]:_0x5ce59d[_0xeb51('0x46')];if(!_0x2aa41d[_0xeb51('0x43')][_0xeb51('0x4b')]('nolimit')){_0x23f644[_0xeb51('0x31')]=qs[_0xeb51('0x31')](_0x2aa41d['query'][_0xeb51('0x31')]);_0x23f644['offset']=qs[_0xeb51('0x2e')](_0x2aa41d['query'][_0xeb51('0x2e')]);}_0x23f644[_0xeb51('0x4c')]=qs[_0xeb51('0x4d')](_0x2aa41d[_0xeb51('0x43')][_0xeb51('0x4d')]);_0x23f644[_0xeb51('0x50')]=qs[_0xeb51('0x45')](_[_0xeb51('0x4e')](_0x2aa41d[_0xeb51('0x43')],_0x5ce59d[_0xeb51('0x45')]));_0x23f644[_0xeb51('0x50')][_0xeb51('0x67')]=_0x2dcefb['id'];if(_0x2aa41d[_0xeb51('0x43')][_0xeb51('0x4f')]){_0x23f644[_0xeb51('0x50')]=_[_0xeb51('0x51')](_0x23f644[_0xeb51('0x50')],{'$or':_[_0xeb51('0x3e')](_0x23f644[_0xeb51('0x47')],function(_0x18f73e){var _0x1222fa={};_0x1222fa[_0x18f73e]={'$like':'%'+_0x2aa41d['query'][_0xeb51('0x4f')]+'%'};return _0x1222fa;})});}_0x23f644=_[_0xeb51('0x51')]({},_0x23f644,_0x2aa41d['options']);return db['OpenchannelInteraction']['count']({'where':_0x23f644[_0xeb51('0x50')]})[_0xeb51('0x21')](function(_0xc0f248){_0x3fb149['count']=_0xc0f248;if(_0x2aa41d[_0xeb51('0x43')][_0xeb51('0x54')]){_0x23f644[_0xeb51('0x5a')]=[{'model':db[_0xeb51('0x87')],'as':_0xeb51('0xab'),'required':![]},{'model':db[_0xeb51('0x97')],'as':'Owner','attributes':[_0xeb51('0x3a'),_0xeb51('0xac'),_0xeb51('0xad')],'required':![]},{'model':db['Tag'],'as':'Tags','attributes':['id',_0xeb51('0x3a'),_0xeb51('0xae')],'where':_0x2aa41d[_0xeb51('0x43')][_0xeb51('0xaf')]?{'id':_0x2aa41d[_0xeb51('0x43')][_0xeb51('0xaf')]}:undefined,'required':_0x2aa41d[_0xeb51('0x43')]['tag']?!![]:![]}];}return db[_0xeb51('0x8c')]['findAll'](_0x23f644);})[_0xeb51('0x21')](function(_0x3656ed){_0x3fb149[_0xeb51('0x56')]=_0x3656ed;return _0x3fb149;});}})[_0xeb51('0x21')](respondWithFilteredResult(_0x3427b6,_0x23f644))['catch'](handleError(_0x3427b6,null));};exports[_0xeb51('0xb0')]=function(_0x32fddf,_0x49290e,_0x74b19){return db['OpenchannelAccount'][_0xeb51('0x5b')]({'where':{'id':_0x32fddf[_0xeb51('0x58')]['id']}})[_0xeb51('0x21')](handleEntityNotFound(_0x49290e,null))[_0xeb51('0x21')](function(_0x17fb07){if(_0x17fb07){return _0x17fb07[_0xeb51('0xb0')](_0x32fddf[_0xeb51('0x5d')]['ids'],_['omit'](_0x32fddf[_0xeb51('0x5d')],[_0xeb51('0xb1'),'id'])||{})['spread'](function(_0x48d1bc){for(var _0x228d3b=0x0;_0x228d3b<_0x32fddf[_0xeb51('0x5d')][_0xeb51('0xb1')][_0xeb51('0x4a')];_0x228d3b+=0x1){socket[_0xeb51('0xb2')](_0xeb51('0xb3'),{'UserId':Number(_0x32fddf[_0xeb51('0x5d')][_0xeb51('0xb1')][_0x228d3b]),'OpenchannelAccountId':Number(_0x32fddf[_0xeb51('0x58')]['id'])});}return _0x48d1bc;});}})[_0xeb51('0x21')](respondWithResult(_0x49290e,null))['catch'](handleError(_0x49290e,null));};exports['removeAgents']=function(_0x1d7313,_0x276aa4,_0x1f1305){return db[_0xeb51('0x3f')][_0xeb51('0x5b')]({'where':{'id':_0x1d7313[_0xeb51('0x58')]['id']}})[_0xeb51('0x21')](handleEntityNotFound(_0x276aa4,null))[_0xeb51('0x21')](function(_0x5ec8bf){if(_0x5ec8bf){return _0x5ec8bf[_0xeb51('0xb4')](_0x1d7313[_0xeb51('0x43')][_0xeb51('0xb1')])[_0xeb51('0x21')](function(){if(_[_0xeb51('0xb5')](_0x1d7313[_0xeb51('0x43')][_0xeb51('0xb1')])){for(var _0x5bde17=0x0;_0x5bde17<_0x1d7313[_0xeb51('0x43')][_0xeb51('0xb1')]['length'];_0x5bde17+=0x1){socket[_0xeb51('0xb2')](_0xeb51('0xb6'),{'UserId':Number(_0x1d7313['query']['ids'][_0x5bde17]),'OpenchannelAccountId':Number(_0x1d7313[_0xeb51('0x58')]['id'])});}}else{socket[_0xeb51('0xb2')](_0xeb51('0xb6'),{'UserId':Number(_0x1d7313[_0xeb51('0x43')][_0xeb51('0xb1')]),'OpenchannelAccountId':Number(_0x1d7313[_0xeb51('0x58')]['id'])});}});}})[_0xeb51('0x21')](respondWithStatusCode(_0x276aa4,null))[_0xeb51('0x2a')](handleError(_0x276aa4,null));};exports[_0xeb51('0xb7')]=function(_0x586d85,_0x39cbcb,_0x57527d){var _0x243baa={};var _0x1d2e04={};var _0x50ff98;var _0x1e37be;return db[_0xeb51('0x3f')][_0xeb51('0x69')]({'where':{'id':_0x586d85['params']['id']}})[_0xeb51('0x21')](handleEntityNotFound(_0x39cbcb,null))[_0xeb51('0x21')](function(_0x246db4){if(_0x246db4){_0x50ff98=_0x246db4;_0x1d2e04[_0xeb51('0x46')]=_[_0xeb51('0x44')](db[_0xeb51('0x97')][_0xeb51('0x40')]);_0x1d2e04[_0xeb51('0x43')]=_['keys'](_0x586d85['query']);_0x1d2e04[_0xeb51('0x45')]=_[_0xeb51('0x48')](_0x1d2e04[_0xeb51('0x46')],_0x1d2e04[_0xeb51('0x43')]);_0x243baa['attributes']=_[_0xeb51('0x48')](_0x1d2e04[_0xeb51('0x46')],qs['fields'](_0x586d85['query']['fields']));_0x243baa[_0xeb51('0x47')]=_0x243baa[_0xeb51('0x47')][_0xeb51('0x4a')]?_0x243baa[_0xeb51('0x47')]:_0x1d2e04[_0xeb51('0x46')];_0x243baa[_0xeb51('0x4c')]=qs['sort'](_0x586d85[_0xeb51('0x43')][_0xeb51('0x4d')]);_0x243baa['where']=qs[_0xeb51('0x45')](_[_0xeb51('0x4e')](_0x586d85['query'],_0x1d2e04[_0xeb51('0x45')]));if(_0x586d85[_0xeb51('0x43')][_0xeb51('0x4f')]){_0x243baa[_0xeb51('0x50')]=_[_0xeb51('0x51')](_0x243baa[_0xeb51('0x50')],{'$or':_[_0xeb51('0x3e')](_0x243baa[_0xeb51('0x47')],function(_0x4159c9){var _0x29d692={};_0x29d692[_0x4159c9]={'$like':'%'+_0x586d85['query'][_0xeb51('0x4f')]+'%'};return _0x29d692;})});}_0x243baa=_['merge']({},_0x243baa,_0x586d85[_0xeb51('0x53')]);return _0x50ff98[_0xeb51('0xb7')](_0x243baa);}})[_0xeb51('0x21')](function(_0x37c7f8){if(_0x37c7f8){_0x1e37be=_0x37c7f8['length'];if(!_0x586d85[_0xeb51('0x43')][_0xeb51('0x4b')](_0xeb51('0x6e'))){_0x243baa[_0xeb51('0x31')]=qs['limit'](_0x586d85['query'][_0xeb51('0x31')]);_0x243baa[_0xeb51('0x2e')]=qs[_0xeb51('0x2e')](_0x586d85['query'][_0xeb51('0x2e')]);}return _0x50ff98[_0xeb51('0xb7')](_0x243baa);}})[_0xeb51('0x21')](function(_0x5b93db){if(_0x5b93db){return _0x5b93db?{'count':_0x1e37be,'rows':_0x5b93db}:null;}})[_0xeb51('0x21')](respondWithResult(_0x39cbcb,null))[_0xeb51('0x2a')](handleError(_0x39cbcb,null));};exports[_0xeb51('0x3b')]=function(_0x1a36ae,_0x1757c8,_0x456685){var _0x3deeaf,_0x4f7776,_0x422b0e;if(_['isNil'](_0x1a36ae[_0xeb51('0x5d')][_0xeb51('0x5d')])||_0x1a36ae[_0xeb51('0x5d')][_0xeb51('0x5d')]===''){throw new db[(_0xeb51('0x71'))][(_0xeb51('0x72'))]('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0xeb51('0x76')](_0x1a36ae[_0xeb51('0x5d')]['to'])){}_0x3deeaf=_0x1a36ae['body']['to'];return db[_0xeb51('0x3f')][_0xeb51('0x69')]({'where':{'id':_0x1a36ae[_0xeb51('0x58')]['id']}})[_0xeb51('0x21')](handleEntityNotFound(_0x1757c8,null))[_0xeb51('0x21')](function(_0x2e67bc){if(_0x2e67bc){return db[_0xeb51('0x3f')][_0xeb51('0x5b')]({'where':{'id':_0x2e67bc['id']},'include':[{'model':db['CmList'],'as':'List','include':[{'model':db[_0xeb51('0x87')],'as':_0xeb51('0x7e'),'where':{[_0x2e67bc[_0xeb51('0x7a')]]:_0x3deeaf},'limit':0x1,'order':[[_0xeb51('0xb8'),_0xeb51('0x7f')]]}]}]})[_0xeb51('0x21')](handleEntityNotFound(_0x1757c8,null))[_0xeb51('0x21')](function(_0x14f1ac){if(_0x14f1ac&&_0x14f1ac[_0xeb51('0x7d')]){_0x4f7776=_0x14f1ac['get']({'plain':!![]});if(_0x4f7776[_0xeb51('0x7d')]&&_0x4f7776[_0xeb51('0x7d')]['Contacts'][_0xeb51('0x4a')]){return _0x4f7776['List'][_0xeb51('0x7e')][0x0];}return db[_0xeb51('0x87')][_0xeb51('0x5c')](_[_0xeb51('0x19')](_0x1a36ae[_0xeb51('0x5d')],{'firstName':_0x3deeaf,[_0x14f1ac[_0xeb51('0x7a')]]:_0x3deeaf,'phone':_0x3deeaf,'ListId':_0x4f7776['ListId']}));}})[_0xeb51('0x21')](handleEntityNotFound(_0x1757c8,null))[_0xeb51('0x21')](function(_0x37ef0f){if(_0x37ef0f){_0x422b0e=_0x37ef0f;return db[_0xeb51('0x8c')][_0xeb51('0x5b')]({'where':{'ContactId':_0x422b0e['id'],'closed':![],'OpenchannelAccountId':_0x4f7776['id']}})[_0xeb51('0x21')](function(_0x1306a8){if(_0x1306a8){return[_0x1306a8,![]];}return db[_0xeb51('0x8c')][_0xeb51('0x5c')]({'UserId':_0x1a36ae[_0xeb51('0x5e')]['id'],'ContactId':_0x422b0e['id'],'OpenchannelAccountId':_0x4f7776['id'],'lastMsgDirection':_0xeb51('0xb9'),'firstMsgDirection':_0xeb51('0xb9'),'Messages':[_['merge'](_0x1a36ae[_0xeb51('0x5d')],{'read':![],'body':_0x1a36ae[_0xeb51('0x5d')][_0xeb51('0x5d')],'OpenchannelAccountId':_0x4f7776['id'],'UserId':_0x1a36ae['user']['id'],'ContactId':_0x422b0e['id']})]},{'include':[{'model':db[_0xeb51('0xba')],'as':'Messages'}]})[_0xeb51('0x21')](function(_0x147ef9){return[_0x147ef9,!![]];});});}})['spread'](function(_0x591103,_0x14b1a3){if(_0x14b1a3){return _0x591103;}return db[_0xeb51('0xba')][_0xeb51('0x5c')](_['merge'](_0x1a36ae['body'],{'read':![],'body':_0x1a36ae[_0xeb51('0x5d')][_0xeb51('0x5d')],'OpenchannelAccountId':_0x4f7776['id'],'OpenchannelInteractionId':_0x591103['id'],'UserId':_0x1a36ae[_0xeb51('0x5e')]['id'],'ContactId':_0x422b0e['id']}))['then'](function(_0xbb3dd2){_0x591103[_0xeb51('0xbb')][_0xeb51('0xbc')]=[];_0x591103['dataValues']['Messages'][_0xeb51('0x94')](_0xbb3dd2[_0xeb51('0xbb')]);return _0x591103;});});}})[_0xeb51('0x21')](respondWithResult(_0x1757c8,null))[_0xeb51('0x2a')](handleError(_0x1757c8,null));};
\ No newline at end of file
+var _0x727a=['json','undefined','limit','count','offset','set','apply','save','update','destroy','get','UserProfileResource','end','stack','name','send','index','Pause','mandatoryDispositionPause','map','OpenchannelAccount','rawAttributes','type','key','query','filters','intersection','model','fields','attributes','length','hasOwnProperty','sort','where','pick','filter','VIRTUAL','merge','options','includeAll','include','rows','show','params','keys','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','OpenchannelAccounts','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','addDisposition','OpenchannelAccountId','Disposition','findOne','nolimit','order','removeDispositions','ids','CannedAnswer','getAnswers','findAll','removeAnswers','openchannel','CmContact','Sequelize','no\x20available\x20attributes','difference','createdAt','CompanyId','from','ValidationError','isNil','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','List','updatedAt','OpenchannelApplication','Applications','applications','orderBy','account','Contacts','ListId','contact','firstName','lastName','threadId','OpenchannelInteraction','externalUrl','ContactId','spread','messageId','interaction','created','autoclose','push','close','unmanaged','OpenchannelMessage','User','UserId','unshift','waitForTheAssignedAgent','*,*,*,*','queueId','OpenchannelQueue','waitForTheAssignedQueue','Start','startRouting','notify','addApplications','transaction','sequelize','Transaction','READ_COMMITTED','bulkCreate','findAndCountAll','priority','finally','getApplications','getInteractions','Contact','Owner','fullname','internal','Tag','color','tag','addAgents','omit','emit','userOpenchannelAccount:save','removeAgents','isArray','userOpenchannelAccount:remove','getAgents','DESC','out','Messages','dataValues','eml-format','rimraf','zip-dir','fast-json-patch','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','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./openchannelAccount.socket','register','jayson/promise','client','http','request','then','info','OpenchannelAccount,\x20%s,\x20%s','request\x20sent','debug','OpenchannelAccount,\x20%s,\x20%s,\x20%s','error','message','result','catch','sendStatus','status'];(function(_0x269ee8,_0x477226){var _0x4d98bd=function(_0x20d4c4){while(--_0x20d4c4){_0x269ee8['push'](_0x269ee8['shift']());}};_0x4d98bd(++_0x477226);}(_0x727a,0x95));var _0xa727=function(_0x477ffc,_0x58d9db){_0x477ffc=_0x477ffc-0x0;var _0x1fe1c3=_0x727a[_0x477ffc];return _0x1fe1c3;};'use strict';var emlformat=require(_0xa727('0x0'));var rimraf=require(_0xa727('0x1'));var zipdir=require(_0xa727('0x2'));var jsonpatch=require(_0xa727('0x3'));var rp=require(_0xa727('0x4'));var moment=require(_0xa727('0x5'));var BPromise=require(_0xa727('0x6'));var Mustache=require('mustache');var util=require(_0xa727('0x7'));var path=require(_0xa727('0x8'));var sox=require(_0xa727('0x9'));var csv=require(_0xa727('0xa'));var ejs=require(_0xa727('0xb'));var fs=require('fs');var fs_extra=require(_0xa727('0xc'));var _=require(_0xa727('0xd'));var squel=require(_0xa727('0xe'));var crypto=require(_0xa727('0xf'));var jsforce=require(_0xa727('0x10'));var deskjs=require(_0xa727('0x11'));var toCsv=require(_0xa727('0xa'));var querystring=require(_0xa727('0x12'));var Papa=require(_0xa727('0x13'));var Redis=require(_0xa727('0x14'));var authService=require(_0xa727('0x15'));var qs=require(_0xa727('0x16'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xa727('0x17'));var logger=require(_0xa727('0x18'))(_0xa727('0x19'));var utils=require(_0xa727('0x1a'));var config=require(_0xa727('0x1b'));var licenseUtil=require(_0xa727('0x1c'));var db=require(_0xa727('0x1d'))['db'];config[_0xa727('0x1e')]=_[_0xa727('0x1f')](config[_0xa727('0x1e')],{'host':_0xa727('0x20'),'port':0x18eb});var socket=require(_0xa727('0x21'))(new Redis(config[_0xa727('0x1e')]));require(_0xa727('0x22'))[_0xa727('0x23')](socket);var jayson=require(_0xa727('0x24'));var client=jayson[_0xa727('0x25')][_0xa727('0x26')]({'port':0x232c});var client9002=jayson[_0xa727('0x25')][_0xa727('0x26')]({'port':0x232a});function respondWithRpcPromise(_0x21d054,_0x3b5d48,_0x12a3a1,_0x2bc42e){return new BPromise(function(_0x690abb,_0x1dc547){var _0x4a242a=_0x2bc42e||client;return _0x4a242a[_0xa727('0x27')](_0x21d054,_0x12a3a1)[_0xa727('0x28')](function(_0x430b15){logger[_0xa727('0x29')](_0xa727('0x2a'),_0x3b5d48,_0xa727('0x2b'));logger[_0xa727('0x2c')](_0xa727('0x2d'),_0x3b5d48,'request\x20sent',JSON['stringify'](_0x430b15));if(_0x430b15[_0xa727('0x2e')]){if(_0x430b15['error']['code']===0x1f4){logger['error'](_0xa727('0x2a'),_0x3b5d48,_0x430b15['error'][_0xa727('0x2f')]);return _0x1dc547(_0x430b15['error']['message']);}logger[_0xa727('0x2e')](_0xa727('0x2a'),_0x3b5d48,_0x430b15[_0xa727('0x2e')]['message']);return _0x690abb(_0x430b15[_0xa727('0x2e')][_0xa727('0x2f')]);}else{logger['info'](_0xa727('0x2a'),_0x3b5d48,_0xa727('0x2b'));_0x690abb(_0x430b15[_0xa727('0x30')][_0xa727('0x2f')]);}})[_0xa727('0x31')](function(_0x2d2c27){logger[_0xa727('0x2e')](_0xa727('0x2a'),_0x3b5d48,_0x2d2c27);_0x1dc547(_0x2d2c27);});});}function respondWithStatusCode(_0xd210d9,_0x5a9af5){_0x5a9af5=_0x5a9af5||0xcc;return function(_0x120c4c){if(_0x120c4c){return _0xd210d9[_0xa727('0x32')](_0x5a9af5);}return _0xd210d9['status'](_0x5a9af5)['end']();};}function respondWithResult(_0x76e540,_0x15a898){_0x15a898=_0x15a898||0xc8;return function(_0x5044ab){if(_0x5044ab){return _0x76e540[_0xa727('0x33')](_0x15a898)[_0xa727('0x34')](_0x5044ab);}};}function respondWithFilteredResult(_0x25dce3,_0x1a245b){return function(_0x17a0e6){if(_0x17a0e6){var _0x39d0b1=typeof _0x1a245b['offset']===_0xa727('0x35')&&typeof _0x1a245b[_0xa727('0x36')]===_0xa727('0x35');var _0x466506=_0x17a0e6[_0xa727('0x37')];var _0x29b0cd=_0x39d0b1?0x0:_0x1a245b[_0xa727('0x38')];var _0x44a8a0=_0x39d0b1?_0x17a0e6[_0xa727('0x37')]:_0x1a245b['offset']+_0x1a245b[_0xa727('0x36')];var _0x268df9;if(_0x44a8a0>=_0x466506){_0x44a8a0=_0x466506;_0x268df9=0xc8;}else{_0x268df9=0xce;}_0x25dce3[_0xa727('0x33')](_0x268df9);return _0x25dce3[_0xa727('0x39')]('Content-Range',_0x29b0cd+'-'+_0x44a8a0+'/'+_0x466506)[_0xa727('0x34')](_0x17a0e6);}return null;};}function patchUpdates(_0x2a2e4d){return function(_0x4d0f59){try{jsonpatch[_0xa727('0x3a')](_0x4d0f59,_0x2a2e4d,!![]);}catch(_0x474f12){return BPromise['reject'](_0x474f12);}return _0x4d0f59[_0xa727('0x3b')]();};}function saveUpdates(_0x4d5934,_0x54640d){return function(_0xeb6036){if(_0xeb6036){return _0xeb6036[_0xa727('0x3c')](_0x4d5934)[_0xa727('0x28')](function(_0x58d816){return _0x58d816;});}return null;};}function removeEntity(_0x1f92f3,_0x1c04aa){return function(_0x1b3aa2){if(_0x1b3aa2){return _0x1b3aa2[_0xa727('0x3d')]()['then'](function(){var _0x194a9f=_0x1b3aa2[_0xa727('0x3e')]({'plain':!![]});var _0x24a8f6='OpenchannelAccounts';return db[_0xa727('0x3f')]['destroy']({'where':{'type':_0x24a8f6,'resourceId':_0x194a9f['id']}})[_0xa727('0x28')](function(){return _0x1b3aa2;});})[_0xa727('0x28')](function(){_0x1f92f3[_0xa727('0x33')](0xcc)[_0xa727('0x40')]();});}};}function handleEntityNotFound(_0x779251,_0x587865){return function(_0x5205c5){if(!_0x5205c5){_0x779251[_0xa727('0x32')](0x194);}return _0x5205c5;};}function handleError(_0x1d7a4b,_0x4b4457){_0x4b4457=_0x4b4457||0x1f4;return function(_0xc5be3){logger['error'](_0xc5be3[_0xa727('0x41')]);if(_0xc5be3[_0xa727('0x42')]){delete _0xc5be3[_0xa727('0x42')];}_0x1d7a4b[_0xa727('0x33')](_0x4b4457)[_0xa727('0x43')](_0xc5be3);};}exports[_0xa727('0x44')]=function(_0x5e6c18,_0x1da0ba){var _0xde3a0={'include':[{'model':db[_0xa727('0x45')],'as':_0xa727('0x46')}]},_0x1a1bc1={},_0x279ef9={'count':0x0,'rows':[]};var _0x4f9f57=_[_0xa727('0x47')](db[_0xa727('0x48')][_0xa727('0x49')],function(_0x7d7e37){return{'name':_0x7d7e37['fieldName'],'type':_0x7d7e37[_0xa727('0x4a')][_0xa727('0x4b')]};});_0x1a1bc1['model']=_['map'](_0x4f9f57,_0xa727('0x42'));_0x1a1bc1[_0xa727('0x4c')]=_['keys'](_0x5e6c18[_0xa727('0x4c')]);_0x1a1bc1[_0xa727('0x4d')]=_[_0xa727('0x4e')](_0x1a1bc1[_0xa727('0x4f')],_0x1a1bc1[_0xa727('0x4c')]);_0xde3a0['attributes']=_[_0xa727('0x4e')](_0x1a1bc1[_0xa727('0x4f')],qs[_0xa727('0x50')](_0x5e6c18['query'][_0xa727('0x50')]));_0xde3a0[_0xa727('0x51')]=_0xde3a0[_0xa727('0x51')][_0xa727('0x52')]?_0xde3a0['attributes']:_0x1a1bc1[_0xa727('0x4f')];if(!_0x5e6c18[_0xa727('0x4c')][_0xa727('0x53')]('nolimit')){_0xde3a0['limit']=qs['limit'](_0x5e6c18['query'][_0xa727('0x36')]);_0xde3a0[_0xa727('0x38')]=qs[_0xa727('0x38')](_0x5e6c18[_0xa727('0x4c')][_0xa727('0x38')]);}_0xde3a0['order']=qs[_0xa727('0x54')](_0x5e6c18[_0xa727('0x4c')][_0xa727('0x54')]);_0xde3a0[_0xa727('0x55')]=qs[_0xa727('0x4d')](_[_0xa727('0x56')](_0x5e6c18['query'],_0x1a1bc1[_0xa727('0x4d')]),_0x4f9f57);if(_0x5e6c18[_0xa727('0x4c')][_0xa727('0x57')]){_0xde3a0[_0xa727('0x55')]=_['merge'](_0xde3a0['where'],{'$or':_[_0xa727('0x47')](_0x4f9f57,function(_0x1d03d2){if(_0x1d03d2[_0xa727('0x4a')]!==_0xa727('0x58')){var _0x23bc14={};_0x23bc14[_0x1d03d2[_0xa727('0x42')]]={'$like':'%'+_0x5e6c18[_0xa727('0x4c')]['filter']+'%'};return _0x23bc14;}})});}_0xde3a0=_[_0xa727('0x59')]({},_0xde3a0,_0x5e6c18[_0xa727('0x5a')]);var _0x24ad4f={'where':_0xde3a0[_0xa727('0x55')]};return db['OpenchannelAccount'][_0xa727('0x37')](_0x24ad4f)[_0xa727('0x28')](function(_0x2545f0){_0x279ef9[_0xa727('0x37')]=_0x2545f0;if(_0x5e6c18[_0xa727('0x4c')][_0xa727('0x5b')]){_0xde3a0[_0xa727('0x5c')]=[{'all':!![]}];}return db[_0xa727('0x48')]['findAll'](_0xde3a0);})['then'](function(_0x1f3f50){_0x279ef9[_0xa727('0x5d')]=_0x1f3f50;return _0x279ef9;})[_0xa727('0x28')](respondWithFilteredResult(_0x1da0ba,_0xde3a0))[_0xa727('0x31')](handleError(_0x1da0ba,null));};exports[_0xa727('0x5e')]=function(_0x2181d3,_0x3c795a){var _0x2d2fba={'raw':![],'where':{'id':_0x2181d3[_0xa727('0x5f')]['id']},'include':[{'model':db['Pause'],'as':_0xa727('0x46')}]},_0x37f010={};_0x37f010['model']=_[_0xa727('0x60')](db[_0xa727('0x48')]['rawAttributes']);_0x37f010[_0xa727('0x4c')]=_[_0xa727('0x60')](_0x2181d3[_0xa727('0x4c')]);_0x37f010['filters']=_[_0xa727('0x4e')](_0x37f010['model'],_0x37f010['query']);_0x2d2fba['attributes']=_[_0xa727('0x4e')](_0x37f010[_0xa727('0x4f')],qs['fields'](_0x2181d3[_0xa727('0x4c')][_0xa727('0x50')]));_0x2d2fba[_0xa727('0x51')]=_0x2d2fba[_0xa727('0x51')]['length']?_0x2d2fba[_0xa727('0x51')]:_0x37f010['model'];if(_0x2181d3[_0xa727('0x4c')]['includeAll']){_0x2d2fba['include']=[{'all':!![]}];}_0x2d2fba=_['merge']({},_0x2d2fba,_0x2181d3[_0xa727('0x5a')]);return db[_0xa727('0x48')][_0xa727('0x61')](_0x2d2fba)[_0xa727('0x28')](handleEntityNotFound(_0x3c795a,null))['then'](respondWithResult(_0x3c795a,null))[_0xa727('0x31')](handleError(_0x3c795a,null));};exports[_0xa727('0x62')]=function(_0x1c6491,_0x1a8d5c){return db[_0xa727('0x48')][_0xa727('0x62')](_0x1c6491[_0xa727('0x63')],{})[_0xa727('0x28')](function(_0x1daa92){var _0x572822=_0x1c6491[_0xa727('0x64')]['get']({'plain':!![]});if(!_0x572822)throw new Error(_0xa727('0x65'));if(_0x572822[_0xa727('0x66')]==='user'){var _0x374d03=_0x1daa92['get']({'plain':!![]});var _0x120106=_0xa727('0x67');return db[_0xa727('0x68')][_0xa727('0x61')]({'where':{'name':_0x120106,'userProfileId':_0x572822['userProfileId']},'raw':!![]})[_0xa727('0x28')](function(_0x42f58b){if(_0x42f58b&&_0x42f58b[_0xa727('0x69')]===0x0){return db['UserProfileResource'][_0xa727('0x62')]({'name':_0x374d03[_0xa727('0x42')],'resourceId':_0x374d03['id'],'type':_0x42f58b['name'],'sectionId':_0x42f58b['id']},{})['then'](function(){return _0x1daa92;});}else{return _0x1daa92;}})[_0xa727('0x31')](function(_0x341a27){logger[_0xa727('0x2e')](_0xa727('0x6a'),_0x341a27);throw _0x341a27;});}return _0x1daa92;})['then'](respondWithResult(_0x1a8d5c,0xc9))[_0xa727('0x31')](handleError(_0x1a8d5c,null));};exports[_0xa727('0x3c')]=function(_0x5697bb,_0x216706){if(_0x5697bb['body']['id']){delete _0x5697bb[_0xa727('0x63')]['id'];}return db['OpenchannelAccount'][_0xa727('0x61')]({'where':{'id':_0x5697bb[_0xa727('0x5f')]['id']},'include':[{'model':db[_0xa727('0x45')],'as':_0xa727('0x46')}]})[_0xa727('0x28')](handleEntityNotFound(_0x216706,null))[_0xa727('0x28')](saveUpdates(_0x5697bb[_0xa727('0x63')],null))[_0xa727('0x28')](respondWithResult(_0x216706,null))[_0xa727('0x31')](handleError(_0x216706,null));};exports[_0xa727('0x3d')]=function(_0x4cac10,_0x474fa0){return db[_0xa727('0x48')][_0xa727('0x61')]({'where':{'id':_0x4cac10[_0xa727('0x5f')]['id']}})[_0xa727('0x28')](handleEntityNotFound(_0x474fa0,null))[_0xa727('0x28')](removeEntity(_0x474fa0,null))[_0xa727('0x31')](handleError(_0x474fa0,null));};exports[_0xa727('0x6b')]=function(_0x359c1e,_0x360c21){return db[_0xa727('0x48')]['describe']()[_0xa727('0x28')](respondWithResult(_0x360c21,null))[_0xa727('0x31')](handleError(_0x360c21,null));};exports[_0xa727('0x6c')]=function(_0x4ee7cb,_0x45383a,_0x31d40b){if(_0x4ee7cb[_0xa727('0x63')]['id']){delete _0x4ee7cb[_0xa727('0x63')]['id'];}return db[_0xa727('0x48')][_0xa727('0x61')]({'where':{'id':_0x4ee7cb['params']['id']}})[_0xa727('0x28')](handleEntityNotFound(_0x45383a,null))[_0xa727('0x28')](function(_0x16446c){if(_0x16446c){_0x4ee7cb[_0xa727('0x63')][_0xa727('0x6d')]=_0x16446c['id'];return db[_0xa727('0x6e')]['create'](_0x4ee7cb['body']);}})[_0xa727('0x28')](respondWithResult(_0x45383a,null))[_0xa727('0x31')](handleError(_0x45383a,null));};exports['getDispositions']=function(_0x1fba5d,_0x1f1976,_0x58b4f8){var _0x5c851b={'raw':![],'where':{}};var _0x543bd6={};var _0x34e854={'count':0x0,'rows':[]};return db['OpenchannelAccount'][_0xa727('0x6f')]({'where':{'id':_0x1fba5d['params']['id']}})[_0xa727('0x28')](handleEntityNotFound(_0x1f1976,null))[_0xa727('0x28')](function(_0x401221){if(_0x401221){_0x543bd6[_0xa727('0x4f')]=_[_0xa727('0x60')](db[_0xa727('0x6e')][_0xa727('0x49')]);_0x543bd6[_0xa727('0x4c')]=_[_0xa727('0x60')](_0x1fba5d['query']);_0x543bd6[_0xa727('0x4d')]=_[_0xa727('0x4e')](_0x543bd6[_0xa727('0x4f')],_0x543bd6['query']);_0x5c851b[_0xa727('0x51')]=_[_0xa727('0x4e')](_0x543bd6['model'],qs[_0xa727('0x50')](_0x1fba5d[_0xa727('0x4c')][_0xa727('0x50')]));_0x5c851b[_0xa727('0x51')]=_0x5c851b[_0xa727('0x51')][_0xa727('0x52')]?_0x5c851b[_0xa727('0x51')]:_0x543bd6[_0xa727('0x4f')];if(!_0x1fba5d[_0xa727('0x4c')][_0xa727('0x53')](_0xa727('0x70'))){_0x5c851b['limit']=qs['limit'](_0x1fba5d[_0xa727('0x4c')][_0xa727('0x36')]);_0x5c851b[_0xa727('0x38')]=qs['offset'](_0x1fba5d[_0xa727('0x4c')][_0xa727('0x38')]);}_0x5c851b[_0xa727('0x71')]=qs[_0xa727('0x54')](_0x1fba5d[_0xa727('0x4c')][_0xa727('0x54')]);_0x5c851b[_0xa727('0x55')]=qs[_0xa727('0x4d')](_['pick'](_0x1fba5d[_0xa727('0x4c')],_0x543bd6[_0xa727('0x4d')]));_0x5c851b[_0xa727('0x55')][_0xa727('0x6d')]=_0x401221['id'];if(_0x1fba5d[_0xa727('0x4c')][_0xa727('0x57')]){_0x5c851b[_0xa727('0x55')]=_[_0xa727('0x59')](_0x5c851b[_0xa727('0x55')],{'$or':_[_0xa727('0x47')](_0x5c851b['attributes'],function(_0x54a922){var _0x19b61a={};_0x19b61a[_0x54a922]={'$like':'%'+_0x1fba5d[_0xa727('0x4c')][_0xa727('0x57')]+'%'};return _0x19b61a;})});}_0x5c851b=_[_0xa727('0x59')]({},_0x5c851b,_0x1fba5d[_0xa727('0x5a')]);return db[_0xa727('0x6e')][_0xa727('0x37')]({'where':_0x5c851b[_0xa727('0x55')]})[_0xa727('0x28')](function(_0x153253){_0x34e854[_0xa727('0x37')]=_0x153253;if(_0x1fba5d[_0xa727('0x4c')]['includeAll']){_0x5c851b['include']=[{'all':!![]}];}return db['Disposition']['findAll'](_0x5c851b);})[_0xa727('0x28')](function(_0x2667d2){_0x34e854['rows']=_0x2667d2;return _0x34e854;});}})[_0xa727('0x28')](respondWithFilteredResult(_0x1f1976,_0x5c851b))[_0xa727('0x31')](handleError(_0x1f1976,null));};exports['removeDispositions']=function(_0x278c7e,_0x353f1c,_0x151846){return db[_0xa727('0x48')][_0xa727('0x61')]({'where':{'id':_0x278c7e[_0xa727('0x5f')]['id']}})[_0xa727('0x28')](handleEntityNotFound(_0x353f1c,null))[_0xa727('0x28')](function(_0x81b9eb){if(_0x81b9eb){return _0x81b9eb[_0xa727('0x72')](_0x278c7e[_0xa727('0x4c')][_0xa727('0x73')]);}})[_0xa727('0x28')](respondWithStatusCode(_0x353f1c,null))[_0xa727('0x31')](handleError(_0x353f1c,null));};exports['addAnswer']=function(_0x45224e,_0x37398e,_0x18748b){if(_0x45224e[_0xa727('0x63')]['id']){delete _0x45224e['body']['id'];}return db[_0xa727('0x48')][_0xa727('0x61')]({'where':{'id':_0x45224e[_0xa727('0x5f')]['id']}})[_0xa727('0x28')](handleEntityNotFound(_0x37398e,null))[_0xa727('0x28')](function(_0x35a8f7){if(_0x35a8f7){_0x45224e[_0xa727('0x63')][_0xa727('0x6d')]=_0x35a8f7['id'];return db[_0xa727('0x74')][_0xa727('0x62')](_0x45224e[_0xa727('0x63')]);}})[_0xa727('0x28')](respondWithResult(_0x37398e,null))['catch'](handleError(_0x37398e,null));};exports[_0xa727('0x75')]=function(_0xdde33a,_0x74d4f4,_0x1f99c4){var _0x583b17={'raw':![],'where':{}};var _0x5da245={};var _0x427e0d={'count':0x0,'rows':[]};return db['OpenchannelAccount'][_0xa727('0x6f')]({'where':{'id':_0xdde33a['params']['id']}})[_0xa727('0x28')](handleEntityNotFound(_0x74d4f4,null))[_0xa727('0x28')](function(_0x579a72){if(_0x579a72){_0x5da245[_0xa727('0x4f')]=_['keys'](db[_0xa727('0x74')]['rawAttributes']);_0x5da245['query']=_[_0xa727('0x60')](_0xdde33a[_0xa727('0x4c')]);_0x5da245['filters']=_[_0xa727('0x4e')](_0x5da245[_0xa727('0x4f')],_0x5da245['query']);_0x583b17[_0xa727('0x51')]=_[_0xa727('0x4e')](_0x5da245['model'],qs[_0xa727('0x50')](_0xdde33a[_0xa727('0x4c')]['fields']));_0x583b17[_0xa727('0x51')]=_0x583b17[_0xa727('0x51')][_0xa727('0x52')]?_0x583b17[_0xa727('0x51')]:_0x5da245['model'];if(!_0xdde33a[_0xa727('0x4c')][_0xa727('0x53')](_0xa727('0x70'))){_0x583b17['limit']=qs[_0xa727('0x36')](_0xdde33a['query'][_0xa727('0x36')]);_0x583b17[_0xa727('0x38')]=qs[_0xa727('0x38')](_0xdde33a[_0xa727('0x4c')]['offset']);}_0x583b17['order']=qs[_0xa727('0x54')](_0xdde33a[_0xa727('0x4c')][_0xa727('0x54')]);_0x583b17[_0xa727('0x55')]=qs[_0xa727('0x4d')](_[_0xa727('0x56')](_0xdde33a['query'],_0x5da245[_0xa727('0x4d')]));_0x583b17[_0xa727('0x55')][_0xa727('0x6d')]=_0x579a72['id'];if(_0xdde33a[_0xa727('0x4c')][_0xa727('0x57')]){_0x583b17['where']=_[_0xa727('0x59')](_0x583b17[_0xa727('0x55')],{'$or':_[_0xa727('0x47')](_0x583b17[_0xa727('0x51')],function(_0x38320b){var _0x8b6d97={};_0x8b6d97[_0x38320b]={'$like':'%'+_0xdde33a[_0xa727('0x4c')][_0xa727('0x57')]+'%'};return _0x8b6d97;})});}_0x583b17=_[_0xa727('0x59')]({},_0x583b17,_0xdde33a[_0xa727('0x5a')]);return db[_0xa727('0x74')]['count']({'where':_0x583b17[_0xa727('0x55')]})[_0xa727('0x28')](function(_0x1b6b75){_0x427e0d[_0xa727('0x37')]=_0x1b6b75;if(_0xdde33a[_0xa727('0x4c')][_0xa727('0x5b')]){_0x583b17[_0xa727('0x5c')]=[{'all':!![]}];}return db[_0xa727('0x74')][_0xa727('0x76')](_0x583b17);})[_0xa727('0x28')](function(_0x47d482){_0x427e0d['rows']=_0x47d482;return _0x427e0d;});}})[_0xa727('0x28')](respondWithFilteredResult(_0x74d4f4,_0x583b17))[_0xa727('0x31')](handleError(_0x74d4f4,null));};exports[_0xa727('0x77')]=function(_0x50150f,_0x5146c8,_0x13b5a5){return db[_0xa727('0x48')][_0xa727('0x61')]({'where':{'id':_0x50150f['params']['id']}})[_0xa727('0x28')](handleEntityNotFound(_0x5146c8,null))[_0xa727('0x28')](function(_0x59abc7){if(_0x59abc7){return _0x59abc7[_0xa727('0x77')](_0x50150f['query']['ids']);}})[_0xa727('0x28')](respondWithStatusCode(_0x5146c8,null))[_0xa727('0x31')](handleError(_0x5146c8,null));};exports['notify']=function(_0x463753,_0x3ff83a,_0x38571c){var _0x56384a={'body':_0x463753[_0xa727('0x63')],'channel':_0xa727('0x78')};var _0x2651db=[];var _0x27b430=[];var _0x36ed09={};var _0x2b7c35=![];return db[_0xa727('0x79')][_0xa727('0x6b')]()[_0xa727('0x28')](function(_0x372ed6){if(!_0x372ed6){throw new db[(_0xa727('0x7a'))]['ValidationError'](_0xa727('0x7b'));}_0x2651db=_[_0xa727('0x7c')](_['keys'](_0x372ed6),[_0xa727('0x7d'),'updatedAt']);_0x27b430=_[_0xa727('0x7c')](_[_0xa727('0x60')](_0x372ed6),['createdAt','updatedAt',_0xa727('0x7e'),'ListId']);if(_0x463753[_0xa727('0x63')]['id']){delete _0x463753[_0xa727('0x63')]['id'];}if(_['isNil'](_0x463753[_0xa727('0x63')][_0xa727('0x7f')])){throw new db[(_0xa727('0x7a'))][(_0xa727('0x80'))]('from\x20is\x20mandatory');}if(_[_0xa727('0x81')](_0x463753[_0xa727('0x63')][_0xa727('0x63')])||_0x463753[_0xa727('0x63')]['body']===''){throw new db[(_0xa727('0x7a'))]['ValidationError'](_0xa727('0x82'));}if(_[_0xa727('0x81')](_0x463753[_0xa727('0x63')][_0xa727('0x83')])){throw new db[(_0xa727('0x7a'))][(_0xa727('0x80'))]('mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x27b430);}if(!_[_0xa727('0x84')](_0x27b430,_0x463753[_0xa727('0x63')]['mapKey'])){throw new db[(_0xa727('0x7a'))][(_0xa727('0x80'))](_0xa727('0x85')+_0x27b430);}_0x36ed09[_0x463753['body'][_0xa727('0x83')]]=_0x463753[_0xa727('0x63')][_0xa727('0x7f')];})[_0xa727('0x28')](function(){return db[_0xa727('0x48')]['find']({'where':{'id':_0x463753['params']['id']},'include':[{'model':db[_0xa727('0x86')],'as':_0xa727('0x87'),'include':[{'model':db[_0xa727('0x79')],'as':'Contacts','where':_0x36ed09,'limit':0x1,'order':[[_0xa727('0x88'),'DESC']]}]},{'model':db[_0xa727('0x89')],'as':_0xa727('0x8a')}]});})['then'](handleEntityNotFound(_0x3ff83a,null))['then'](function(_0x66e5f1){if(_0x66e5f1&&_0x66e5f1[_0xa727('0x87')]){_0x56384a['account']=_0x66e5f1;_0x56384a[_0xa727('0x8b')]=_0x66e5f1['Applications'];_0x56384a['list']=_0x66e5f1[_0xa727('0x87')];_0x56384a[_0xa727('0x8b')]=_[_0xa727('0x8c')](_0x56384a[_0xa727('0x8b')],['priority'],['asc']);if(_0x56384a['account']['Applications']){delete _0x56384a[_0xa727('0x8d')]['Applications'];}if(_0x56384a[_0xa727('0x8d')]['List']&&_0x56384a[_0xa727('0x8d')]['List'][_0xa727('0x8e')][_0xa727('0x52')]){return _0x56384a[_0xa727('0x8d')][_0xa727('0x87')]['Contacts'][0x0];}var _0x3a3bad=_['defaults'](_0x463753[_0xa727('0x63')],{'firstName':_0x463753[_0xa727('0x63')][_0xa727('0x7f')],'ListId':_0x66e5f1[_0xa727('0x8f')]});_0x3a3bad[_0x463753['body'][_0xa727('0x83')]]=_0x463753['body'][_0xa727('0x7f')];return db[_0xa727('0x79')]['create'](_0x3a3bad,{'fields':_0x2651db,'raw':!![]});}})[_0xa727('0x28')](handleEntityNotFound(_0x3ff83a,null))[_0xa727('0x28')](function(_0xad2448){_0x56384a[_0xa727('0x90')]=_0xad2448;if(_0xad2448){var _0x115d4d={'ContactId':_0xad2448['id'],'OpenchannelAccountId':_0x463753[_0xa727('0x5f')]['id'],'from':(_0xad2448[_0xa727('0x91')]||'')+'\x20'+(_0xad2448[_0xa727('0x92')]||'')};var _0x5a367d={'OpenchannelAccountId':_0x463753[_0xa727('0x5f')]['id'],'closed':![]};if(_0x463753[_0xa727('0x63')][_0xa727('0x93')]){_0x5a367d['threadId']=_0x463753[_0xa727('0x63')][_0xa727('0x93')];return db[_0xa727('0x94')][_0xa727('0x61')]({'where':_0x5a367d})[_0xa727('0x28')](function(_0x12c88c){if(_0x12c88c){return[_0x12c88c,![]];}_0x115d4d[_0xa727('0x93')]=_0x463753['body'][_0xa727('0x93')];_0x115d4d[_0xa727('0x95')]=_0x463753['body'][_0xa727('0x95')];return db[_0xa727('0x94')][_0xa727('0x62')](_0x115d4d)[_0xa727('0x28')](function(_0x2e17d8){return[_0x2e17d8,!![]];});});}else{_0x5a367d[_0xa727('0x93')]=null;}_0x5a367d[_0xa727('0x96')]=_0xad2448['id'];return db[_0xa727('0x94')][_0xa727('0x61')]({'where':_0x5a367d})['then'](function(_0x46639d){if(_0x46639d){return[_0x46639d,![]];}return db[_0xa727('0x94')][_0xa727('0x62')](_0x115d4d)['then'](function(_0x53bf68){return[_0x53bf68,!![]];});});}})[_0xa727('0x97')](function(_0x30b98d,_0x1037ba){if(_0x30b98d){_0x2b7c35=_0x1037ba;if(!_0x1037ba){var _0x187820={'from':(_0x56384a[_0xa727('0x90')]['firstName']||'')+'\x20'+(_0x56384a[_0xa727('0x90')][_0xa727('0x92')]||'')};if(_0x463753['body'][_0xa727('0x93')]&&_0x463753[_0xa727('0x63')][_0xa727('0x98')]&&_0x463753[_0xa727('0x63')][_0xa727('0x93')]!=_0x463753[_0xa727('0x63')][_0xa727('0x98')]){_0x187820['threadId']=_0x463753[_0xa727('0x63')][_0xa727('0x98')];}return _0x30b98d[_0xa727('0x3c')](_0x187820);}else{return _0x30b98d;}}})[_0xa727('0x28')](function(_0x48e009){_0x56384a[_0xa727('0x99')]=_0x48e009[_0xa727('0x3e')]({'plain':!![]});_0x56384a[_0xa727('0x99')][_0xa727('0x9a')]=_0x2b7c35;if(_0x56384a[_0xa727('0x99')]['created']){if(_0x56384a[_0xa727('0x8d')][_0xa727('0x9b')]){_0x56384a['applications'][_0xa727('0x9c')]({'id':0x0,'priority':_0x56384a['applications'][_0xa727('0x52')]+0x1,'app':_0xa727('0x9d'),'appdata':_0xa727('0x9e'),'interval':'*,*,*,*'});}}return db[_0xa727('0x9f')][_0xa727('0x62')]({'body':_0x463753[_0xa727('0x63')]['body'],'OpenchannelAccountId':_0x463753[_0xa727('0x5f')]['id'],'OpenchannelInteractionId':_0x48e009['id'],'direction':'in','ContactId':_0x56384a[_0xa727('0x90')]['id'],'AttachmentId':_0x463753['body']['AttachmentId']});})[_0xa727('0x28')](function(_0x151175){_0x56384a[_0xa727('0x2f')]=_0x151175;if(!_0x56384a[_0xa727('0x99')]['UserId'])return;return db[_0xa727('0xa0')][_0xa727('0x61')]({'attributes':['id',_0xa727('0x42')],'where':{'id':_0x56384a['interaction'][_0xa727('0xa1')]}});})[_0xa727('0x28')](function(_0x124529){if(_0x124529){_0x56384a[_0xa727('0x8b')][_0xa727('0xa2')]({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x124529[_0xa727('0x42')]+','+(_0x56384a[_0xa727('0x8d')][_0xa727('0xa3')]||0xa),'interval':_0xa727('0xa4')});}if(!_0x56384a['interaction'][_0xa727('0xa5')])return;return db[_0xa727('0xa6')]['find']({'attributes':['id','name'],'where':{'id':_0x56384a[_0xa727('0x99')][_0xa727('0xa5')]}});})[_0xa727('0x28')](function(_0x2dc64e){if(_0x2dc64e){_0x56384a[_0xa727('0x8b')][_0xa727('0xa2')]({'id':0x0,'priority':0x1,'app':'queue','appdata':_0x2dc64e[_0xa727('0x42')]+','+(_0x56384a[_0xa727('0x8d')][_0xa727('0xa7')]||0x12c),'interval':_0xa727('0xa4')});}return respondWithRpcPromise(_0xa727('0xa8'),_0xa727('0xa9'),_0x56384a);})[_0xa727('0x28')](function(_0x187365){respondWithRpcPromise('EventManager','EventManager',{'event':_0xa727('0xaa'),'message':_0x187365},client9002);return _0x187365;})[_0xa727('0x28')](respondWithResult(_0x3ff83a,null))[_0xa727('0x31')](handleError(_0x3ff83a,null));};exports[_0xa727('0xab')]=function(_0x5df989,_0x4fc4dd){var _0x1cee51=_0x5df989[_0xa727('0x5f')]['id'];var _0x51eb9d=_0x5df989['body'];var _0x1c39c9=0xc8;var _0x294035=null;return db['sequelize'][_0xa727('0xac')]({'isolationLevel':db[_0xa727('0xad')][_0xa727('0xae')]['ISOLATION_LEVELS'][_0xa727('0xaf')]},function(_0x354eec){return db[_0xa727('0x48')][_0xa727('0x6f')]({'where':{'id':_0x1cee51},'transaction':_0x354eec})[_0xa727('0x28')](function(_0x48616c){if(_0x48616c){return db[_0xa727('0x89')][_0xa727('0x3d')]({'where':{'OpenchannelAccountId':_0x1cee51},'transaction':_0x354eec})[_0xa727('0x28')](function(){var _0x405d13=_['map'](_0x51eb9d,function(_0x40c829){_0x40c829[_0xa727('0x6d')]=_0x1cee51;return _0x40c829;});return db[_0xa727('0x89')][_0xa727('0xb0')](_0x405d13,{'transaction':_0x354eec});});}else{_0x1c39c9=0x194;_0x294035=[];}});})[_0xa727('0x28')](function(){if(_0x1c39c9!==0x194){return db['OpenchannelApplication'][_0xa727('0xb1')]({'where':{'OpenchannelAccountId':_0x1cee51},'order':_0xa727('0xb2')})[_0xa727('0x28')](function(_0x40d2f1){_0x294035=_0x40d2f1;});}})[_0xa727('0x31')](function(_0x56641c){_0x1c39c9=0x1f4;logger[_0xa727('0x2e')](_0x56641c['stack']);if(_0x56641c[_0xa727('0x42')]){delete _0x56641c['name'];}_0x294035=_0x56641c;})[_0xa727('0xb3')](function(){if(_0x294035===null){_0x4fc4dd[_0xa727('0x32')](_0x1c39c9);}else{if(_0x1c39c9===0x1f4){_0x4fc4dd[_0xa727('0x33')](_0x1c39c9)[_0xa727('0x43')](_0x294035);}else{_0x4fc4dd[_0xa727('0x33')](_0x1c39c9)[_0xa727('0x34')](_0x294035);}}});};exports['getApplications']=function(_0x1e33a8,_0x10f9bf,_0x32434d){var _0x4fa4db={};var _0x295af8={};var _0x3595c3;var _0x470540;return db[_0xa727('0x48')][_0xa727('0x6f')]({'where':{'id':_0x1e33a8[_0xa727('0x5f')]['id']}})['then'](handleEntityNotFound(_0x10f9bf,null))['then'](function(_0x1aeb26){if(_0x1aeb26){_0x3595c3=_0x1aeb26;_0x295af8['model']=_[_0xa727('0x60')](db[_0xa727('0x89')][_0xa727('0x49')]);_0x295af8[_0xa727('0x4c')]=_[_0xa727('0x60')](_0x1e33a8[_0xa727('0x4c')]);_0x295af8[_0xa727('0x4d')]=_[_0xa727('0x4e')](_0x295af8[_0xa727('0x4f')],_0x295af8[_0xa727('0x4c')]);_0x4fa4db['attributes']=_[_0xa727('0x4e')](_0x295af8[_0xa727('0x4f')],qs[_0xa727('0x50')](_0x1e33a8[_0xa727('0x4c')][_0xa727('0x50')]));_0x4fa4db[_0xa727('0x51')]=_0x4fa4db['attributes']['length']?_0x4fa4db[_0xa727('0x51')]:_0x295af8[_0xa727('0x4f')];_0x4fa4db['order']=qs[_0xa727('0x54')](_0x1e33a8[_0xa727('0x4c')][_0xa727('0x54')]);_0x4fa4db[_0xa727('0x55')]=qs[_0xa727('0x4d')](_[_0xa727('0x56')](_0x1e33a8[_0xa727('0x4c')],_0x295af8[_0xa727('0x4d')]));if(_0x1e33a8[_0xa727('0x4c')]['filter']){_0x4fa4db[_0xa727('0x55')]=_['merge'](_0x4fa4db[_0xa727('0x55')],{'$or':_[_0xa727('0x47')](_0x4fa4db[_0xa727('0x51')],function(_0x3fa9dd){var _0x29d323={};_0x29d323[_0x3fa9dd]={'$like':'%'+_0x1e33a8['query'][_0xa727('0x57')]+'%'};return _0x29d323;})});}_0x4fa4db=_[_0xa727('0x59')]({},_0x4fa4db,_0x1e33a8[_0xa727('0x5a')]);return _0x3595c3[_0xa727('0xb4')](_0x4fa4db);}})[_0xa727('0x28')](function(_0x64c55a){if(_0x64c55a){_0x470540=_0x64c55a[_0xa727('0x52')];if(!_0x1e33a8[_0xa727('0x4c')][_0xa727('0x53')]('nolimit')){_0x4fa4db['limit']=qs[_0xa727('0x36')](_0x1e33a8[_0xa727('0x4c')]['limit']);_0x4fa4db[_0xa727('0x38')]=qs[_0xa727('0x38')](_0x1e33a8['query'][_0xa727('0x38')]);}return _0x3595c3['getApplications'](_0x4fa4db);}})[_0xa727('0x28')](function(_0x27b9d2){if(_0x27b9d2){return _0x27b9d2?{'count':_0x470540,'rows':_0x27b9d2}:null;}})[_0xa727('0x28')](respondWithResult(_0x10f9bf,null))[_0xa727('0x31')](handleError(_0x10f9bf,null));};exports[_0xa727('0xb5')]=function(_0x45e866,_0x457352,_0x1c3c61){var _0x1d15e4={'raw':![],'where':{}};var _0x4f7f3a={};var _0x349961={'count':0x0,'rows':[]};return db[_0xa727('0x48')][_0xa727('0x6f')]({'where':{'id':_0x45e866[_0xa727('0x5f')]['id']}})[_0xa727('0x28')](handleEntityNotFound(_0x457352,null))['then'](function(_0x36006c){if(_0x36006c){_0x4f7f3a[_0xa727('0x4f')]=_[_0xa727('0x60')](db['OpenchannelInteraction']['rawAttributes']);_0x4f7f3a[_0xa727('0x4c')]=_[_0xa727('0x60')](_0x45e866['query']);_0x4f7f3a[_0xa727('0x4d')]=_[_0xa727('0x4e')](_0x4f7f3a['model'],_0x4f7f3a['query']);_0x1d15e4['attributes']=_[_0xa727('0x4e')](_0x4f7f3a[_0xa727('0x4f')],qs[_0xa727('0x50')](_0x45e866[_0xa727('0x4c')][_0xa727('0x50')]));_0x1d15e4[_0xa727('0x51')]=_0x1d15e4[_0xa727('0x51')][_0xa727('0x52')]?_0x1d15e4[_0xa727('0x51')]:_0x4f7f3a[_0xa727('0x4f')];if(!_0x45e866['query'][_0xa727('0x53')](_0xa727('0x70'))){_0x1d15e4[_0xa727('0x36')]=qs[_0xa727('0x36')](_0x45e866[_0xa727('0x4c')][_0xa727('0x36')]);_0x1d15e4['offset']=qs['offset'](_0x45e866[_0xa727('0x4c')]['offset']);}_0x1d15e4[_0xa727('0x71')]=qs[_0xa727('0x54')](_0x45e866[_0xa727('0x4c')]['sort']);_0x1d15e4[_0xa727('0x55')]=qs[_0xa727('0x4d')](_[_0xa727('0x56')](_0x45e866[_0xa727('0x4c')],_0x4f7f3a[_0xa727('0x4d')]));_0x1d15e4['where'][_0xa727('0x6d')]=_0x36006c['id'];if(_0x45e866[_0xa727('0x4c')]['filter']){_0x1d15e4[_0xa727('0x55')]=_['merge'](_0x1d15e4['where'],{'$or':_[_0xa727('0x47')](_0x1d15e4['attributes'],function(_0x4cbbd4){var _0x4e27c2={};_0x4e27c2[_0x4cbbd4]={'$like':'%'+_0x45e866[_0xa727('0x4c')][_0xa727('0x57')]+'%'};return _0x4e27c2;})});}_0x1d15e4=_[_0xa727('0x59')]({},_0x1d15e4,_0x45e866[_0xa727('0x5a')]);return db[_0xa727('0x94')][_0xa727('0x37')]({'where':_0x1d15e4[_0xa727('0x55')]})[_0xa727('0x28')](function(_0xf05493){_0x349961['count']=_0xf05493;if(_0x45e866['query'][_0xa727('0x5b')]){_0x1d15e4['include']=[{'model':db[_0xa727('0x79')],'as':_0xa727('0xb6'),'required':![]},{'model':db[_0xa727('0xa0')],'as':_0xa727('0xb7'),'attributes':[_0xa727('0x42'),_0xa727('0xb8'),_0xa727('0xb9')],'required':![]},{'model':db[_0xa727('0xba')],'as':'Tags','attributes':['id',_0xa727('0x42'),_0xa727('0xbb')],'where':_0x45e866['query'][_0xa727('0xbc')]?{'id':_0x45e866[_0xa727('0x4c')][_0xa727('0xbc')]}:undefined,'required':_0x45e866[_0xa727('0x4c')][_0xa727('0xbc')]?!![]:![]}];}return db[_0xa727('0x94')][_0xa727('0x76')](_0x1d15e4);})[_0xa727('0x28')](function(_0x4e8e94){_0x349961[_0xa727('0x5d')]=_0x4e8e94;return _0x349961;});}})[_0xa727('0x28')](respondWithFilteredResult(_0x457352,_0x1d15e4))[_0xa727('0x31')](handleError(_0x457352,null));};exports['addAgents']=function(_0x2c1e35,_0xced1d,_0x104b89){return db[_0xa727('0x48')][_0xa727('0x61')]({'where':{'id':_0x2c1e35[_0xa727('0x5f')]['id']}})[_0xa727('0x28')](handleEntityNotFound(_0xced1d,null))[_0xa727('0x28')](function(_0x5747eb){if(_0x5747eb){return _0x5747eb[_0xa727('0xbd')](_0x2c1e35[_0xa727('0x63')][_0xa727('0x73')],_[_0xa727('0xbe')](_0x2c1e35[_0xa727('0x63')],[_0xa727('0x73'),'id'])||{})['spread'](function(_0x49ee2e){for(var _0x519641=0x0;_0x519641<_0x2c1e35['body']['ids'][_0xa727('0x52')];_0x519641+=0x1){socket[_0xa727('0xbf')](_0xa727('0xc0'),{'UserId':Number(_0x2c1e35[_0xa727('0x63')][_0xa727('0x73')][_0x519641]),'OpenchannelAccountId':Number(_0x2c1e35[_0xa727('0x5f')]['id'])});}return _0x49ee2e;});}})[_0xa727('0x28')](respondWithResult(_0xced1d,null))['catch'](handleError(_0xced1d,null));};exports[_0xa727('0xc1')]=function(_0x53b9d0,_0x49f9b5,_0x41047f){return db['OpenchannelAccount'][_0xa727('0x61')]({'where':{'id':_0x53b9d0[_0xa727('0x5f')]['id']}})[_0xa727('0x28')](handleEntityNotFound(_0x49f9b5,null))[_0xa727('0x28')](function(_0x1f45fb){if(_0x1f45fb){return _0x1f45fb['removeAgents'](_0x53b9d0[_0xa727('0x4c')][_0xa727('0x73')])[_0xa727('0x28')](function(){if(_[_0xa727('0xc2')](_0x53b9d0['query'][_0xa727('0x73')])){for(var _0x47b58f=0x0;_0x47b58f<_0x53b9d0[_0xa727('0x4c')][_0xa727('0x73')]['length'];_0x47b58f+=0x1){socket[_0xa727('0xbf')](_0xa727('0xc3'),{'UserId':Number(_0x53b9d0[_0xa727('0x4c')][_0xa727('0x73')][_0x47b58f]),'OpenchannelAccountId':Number(_0x53b9d0[_0xa727('0x5f')]['id'])});}}else{socket[_0xa727('0xbf')](_0xa727('0xc3'),{'UserId':Number(_0x53b9d0[_0xa727('0x4c')][_0xa727('0x73')]),'OpenchannelAccountId':Number(_0x53b9d0[_0xa727('0x5f')]['id'])});}});}})['then'](respondWithStatusCode(_0x49f9b5,null))[_0xa727('0x31')](handleError(_0x49f9b5,null));};exports[_0xa727('0xc4')]=function(_0x2c1cdc,_0x207ec7,_0x18e1aa){var _0x6f3c07={};var _0x2c96c3={};var _0x5148de;var _0x5c2c3d;return db[_0xa727('0x48')]['findOne']({'where':{'id':_0x2c1cdc[_0xa727('0x5f')]['id']}})['then'](handleEntityNotFound(_0x207ec7,null))[_0xa727('0x28')](function(_0x46298e){if(_0x46298e){_0x5148de=_0x46298e;_0x2c96c3[_0xa727('0x4f')]=_[_0xa727('0x60')](db[_0xa727('0xa0')][_0xa727('0x49')]);_0x2c96c3[_0xa727('0x4c')]=_[_0xa727('0x60')](_0x2c1cdc[_0xa727('0x4c')]);_0x2c96c3[_0xa727('0x4d')]=_[_0xa727('0x4e')](_0x2c96c3['model'],_0x2c96c3[_0xa727('0x4c')]);_0x6f3c07[_0xa727('0x51')]=_[_0xa727('0x4e')](_0x2c96c3[_0xa727('0x4f')],qs[_0xa727('0x50')](_0x2c1cdc['query'][_0xa727('0x50')]));_0x6f3c07[_0xa727('0x51')]=_0x6f3c07[_0xa727('0x51')][_0xa727('0x52')]?_0x6f3c07['attributes']:_0x2c96c3[_0xa727('0x4f')];_0x6f3c07[_0xa727('0x71')]=qs[_0xa727('0x54')](_0x2c1cdc[_0xa727('0x4c')]['sort']);_0x6f3c07[_0xa727('0x55')]=qs[_0xa727('0x4d')](_[_0xa727('0x56')](_0x2c1cdc['query'],_0x2c96c3[_0xa727('0x4d')]));if(_0x2c1cdc['query']['filter']){_0x6f3c07[_0xa727('0x55')]=_[_0xa727('0x59')](_0x6f3c07[_0xa727('0x55')],{'$or':_[_0xa727('0x47')](_0x6f3c07['attributes'],function(_0x5bb43c){var _0x5b5f06={};_0x5b5f06[_0x5bb43c]={'$like':'%'+_0x2c1cdc[_0xa727('0x4c')][_0xa727('0x57')]+'%'};return _0x5b5f06;})});}_0x6f3c07=_['merge']({},_0x6f3c07,_0x2c1cdc[_0xa727('0x5a')]);return _0x5148de[_0xa727('0xc4')](_0x6f3c07);}})['then'](function(_0x3c149a){if(_0x3c149a){_0x5c2c3d=_0x3c149a[_0xa727('0x52')];if(!_0x2c1cdc[_0xa727('0x4c')][_0xa727('0x53')](_0xa727('0x70'))){_0x6f3c07[_0xa727('0x36')]=qs[_0xa727('0x36')](_0x2c1cdc[_0xa727('0x4c')][_0xa727('0x36')]);_0x6f3c07[_0xa727('0x38')]=qs['offset'](_0x2c1cdc['query'][_0xa727('0x38')]);}return _0x5148de[_0xa727('0xc4')](_0x6f3c07);}})[_0xa727('0x28')](function(_0x202ff4){if(_0x202ff4){return _0x202ff4?{'count':_0x5c2c3d,'rows':_0x202ff4}:null;}})['then'](respondWithResult(_0x207ec7,null))[_0xa727('0x31')](handleError(_0x207ec7,null));};exports[_0xa727('0x43')]=function(_0x380913,_0x7b723,_0x550e93){var _0x48c222,_0x5b3965,_0x5ccb55;if(_[_0xa727('0x81')](_0x380913['body']['body'])||_0x380913[_0xa727('0x63')]['body']===''){throw new db['Sequelize'][(_0xa727('0x80'))](_0xa727('0x82'));}if(_[_0xa727('0x81')](_0x380913['body']['to'])){}_0x48c222=_0x380913[_0xa727('0x63')]['to'];return db[_0xa727('0x48')][_0xa727('0x6f')]({'where':{'id':_0x380913['params']['id']}})[_0xa727('0x28')](handleEntityNotFound(_0x7b723,null))[_0xa727('0x28')](function(_0x227de4){if(_0x227de4){return db[_0xa727('0x48')]['find']({'where':{'id':_0x227de4['id']},'include':[{'model':db[_0xa727('0x86')],'as':_0xa727('0x87'),'include':[{'model':db[_0xa727('0x79')],'as':_0xa727('0x8e'),'where':{[_0x227de4[_0xa727('0x83')]]:_0x48c222},'limit':0x1,'order':[[_0xa727('0x88'),_0xa727('0xc5')]]}]}]})[_0xa727('0x28')](handleEntityNotFound(_0x7b723,null))[_0xa727('0x28')](function(_0x3d1984){if(_0x3d1984&&_0x3d1984[_0xa727('0x87')]){_0x5b3965=_0x3d1984[_0xa727('0x3e')]({'plain':!![]});if(_0x5b3965['List']&&_0x5b3965[_0xa727('0x87')][_0xa727('0x8e')][_0xa727('0x52')]){return _0x5b3965[_0xa727('0x87')][_0xa727('0x8e')][0x0];}return db[_0xa727('0x79')][_0xa727('0x62')](_['defaults'](_0x380913[_0xa727('0x63')],{'firstName':_0x48c222,[_0x3d1984[_0xa727('0x83')]]:_0x48c222,'phone':_0x48c222,'ListId':_0x5b3965[_0xa727('0x8f')]}));}})[_0xa727('0x28')](handleEntityNotFound(_0x7b723,null))['then'](function(_0x1d172a){if(_0x1d172a){_0x5ccb55=_0x1d172a;return db[_0xa727('0x94')][_0xa727('0x61')]({'where':{'ContactId':_0x5ccb55['id'],'closed':![],'OpenchannelAccountId':_0x5b3965['id']}})[_0xa727('0x28')](function(_0x7c0056){if(_0x7c0056){return[_0x7c0056,![]];}return db[_0xa727('0x94')][_0xa727('0x62')]({'UserId':_0x380913[_0xa727('0x64')]['id'],'ContactId':_0x5ccb55['id'],'OpenchannelAccountId':_0x5b3965['id'],'lastMsgDirection':'out','firstMsgDirection':_0xa727('0xc6'),'Messages':[_[_0xa727('0x59')](_0x380913[_0xa727('0x63')],{'read':![],'body':_0x380913[_0xa727('0x63')][_0xa727('0x63')],'OpenchannelAccountId':_0x5b3965['id'],'UserId':_0x380913[_0xa727('0x64')]['id'],'ContactId':_0x5ccb55['id']})]},{'include':[{'model':db[_0xa727('0x9f')],'as':_0xa727('0xc7')}]})[_0xa727('0x28')](function(_0x415bab){return[_0x415bab,!![]];});});}})['spread'](function(_0x5ee8a6,_0x446c06){if(_0x446c06){return _0x5ee8a6;}return db['OpenchannelMessage'][_0xa727('0x62')](_['merge'](_0x380913[_0xa727('0x63')],{'read':![],'body':_0x380913[_0xa727('0x63')][_0xa727('0x63')],'OpenchannelAccountId':_0x5b3965['id'],'OpenchannelInteractionId':_0x5ee8a6['id'],'UserId':_0x380913[_0xa727('0x64')]['id'],'ContactId':_0x5ccb55['id']}))['then'](function(_0x3c2852){_0x5ee8a6[_0xa727('0xc8')][_0xa727('0xc7')]=[];_0x5ee8a6[_0xa727('0xc8')]['Messages']['push'](_0x3c2852[_0xa727('0xc8')]);return _0x5ee8a6;});});}})['then'](respondWithResult(_0x7b723,null))[_0xa727('0x31')](handleError(_0x7b723,null));};
\ No newline at end of file
index c3a0567..b1a2303 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0bb5=['events','../../mysqldb','save','update','remove','emit','hook','exports'];(function(_0x538c70,_0x35531f){var _0x42ae01=function(_0x5c7368){while(--_0x5c7368){_0x538c70['push'](_0x538c70['shift']());}};_0x42ae01(++_0x35531f);}(_0x0bb5,0x148));var _0x50bb=function(_0x5ec9d4,_0x274ca4){_0x5ec9d4=_0x5ec9d4-0x0;var _0x16562f=_0x0bb5[_0x5ec9d4];return _0x16562f;};'use strict';var EventEmitter=require(_0x50bb('0x0'));var OpenchannelAccount=require(_0x50bb('0x1'))['db']['OpenchannelAccount'];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x50bb('0x2'),'afterUpdate':_0x50bb('0x3'),'afterDestroy':_0x50bb('0x4')};function emitEvent(_0x117e36){return function(_0x29c72b,_0xfdc9d4,_0x451b4c){OpenchannelAccountEvents[_0x50bb('0x5')](_0x117e36+':'+_0x29c72b['id'],_0x29c72b);OpenchannelAccountEvents['emit'](_0x117e36,_0x29c72b);_0x451b4c(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelAccount[_0x50bb('0x6')](e,emitEvent(event));}}module[_0x50bb('0x7')]=OpenchannelAccountEvents;
\ No newline at end of file
+var _0x750a=['../../mysqldb','save','update','remove','emit','hasOwnProperty','hook','exports'];(function(_0x168120,_0x4e19de){var _0x5c827e=function(_0x47b472){while(--_0x47b472){_0x168120['push'](_0x168120['shift']());}};_0x5c827e(++_0x4e19de);}(_0x750a,0x140));var _0xa750=function(_0x4dc153,_0x4061cd){_0x4dc153=_0x4dc153-0x0;var _0x315858=_0x750a[_0x4dc153];return _0x315858;};'use strict';var EventEmitter=require('events');var OpenchannelAccount=require(_0xa750('0x0'))['db']['OpenchannelAccount'];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xa750('0x1'),'afterUpdate':_0xa750('0x2'),'afterDestroy':_0xa750('0x3')};function emitEvent(_0x19bd5f){return function(_0x457cae,_0x43d704,_0x562911){OpenchannelAccountEvents[_0xa750('0x4')](_0x19bd5f+':'+_0x457cae['id'],_0x457cae);OpenchannelAccountEvents[_0xa750('0x4')](_0x19bd5f,_0x457cae);_0x562911(null);};}for(var e in events){if(events[_0xa750('0x5')](e)){var event=events[e];OpenchannelAccount[_0xa750('0x6')](e,emitEvent(event));}}module[_0xa750('0x7')]=OpenchannelAccountEvents;
\ No newline at end of file
index fedf64b..977cadc 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(_0x4ca973,_0x3c4fba){var _0x1b8e0a=function(_0x36c463){while(--_0x36c463){_0x4ca973['push'](_0x4ca973['shift']());}};_0x1b8e0a(++_0x3c4fba);}(_0xa9e0,0x123));var _0x0a9e=function(_0x34bc30,_0x177cb0){_0x34bc30=_0x34bc30-0x0;var _0x5706de=_0xa9e0[_0x34bc30];return _0x5706de;};'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(_0x34977b,_0x53ba6a){var _0x5cf0c4=function(_0x3a2f14){while(--_0x3a2f14){_0x34977b['push'](_0x34977b['shift']());}};_0x5cf0c4(++_0x53ba6a);}(_0xa9e0,0x123));var _0x0a9e=function(_0x311c35,_0x534915){_0x311c35=_0x311c35-0x0;var _0x5cc50c=_0xa9e0[_0x311c35];return _0x5cc50c;};'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 079bdfc..34c22a9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9354=['util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','register','request\x20sent','debug','OpenchannelAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','OpenchannelAccount,\x20%s,\x20%s','message','info','catch'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x9354,0x96));var _0x4935=function(_0x17249c,_0x168d62){_0x17249c=_0x17249c-0x0;var _0x324e7b=_0x9354[_0x17249c];return _0x324e7b;};'use strict';var _=require('lodash');var util=require(_0x4935('0x0'));var moment=require(_0x4935('0x1'));var BPromise=require('bluebird');var rs=require(_0x4935('0x2'));var fs=require('fs');var Redis=require(_0x4935('0x3'));var db=require(_0x4935('0x4'))['db'];var utils=require(_0x4935('0x5'));var logger=require('../../config/logger')(_0x4935('0x6'));var config=require(_0x4935('0x7'));var jayson=require(_0x4935('0x8'));var client=jayson[_0x4935('0x9')][_0x4935('0xa')]({'port':0x232a});config[_0x4935('0xb')]=_[_0x4935('0xc')](config[_0x4935('0xb')],{'host':_0x4935('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x4935('0xb')]));require('./openchannelAccount.socket')[_0x4935('0xe')](socket);function respondWithRpcPromise(_0x38de96,_0xd5b117,_0x22a83f){return new BPromise(function(_0x261462,_0x319b72){return client['request'](_0x38de96,_0x22a83f)['then'](function(_0x2ebd4c){logger['info']('OpenchannelAccount,\x20%s,\x20%s',_0xd5b117,_0x4935('0xf'));logger[_0x4935('0x10')](_0x4935('0x11'),_0xd5b117,_0x4935('0xf'),JSON[_0x4935('0x12')](_0x2ebd4c));if(_0x2ebd4c[_0x4935('0x13')]){if(_0x2ebd4c[_0x4935('0x13')][_0x4935('0x14')]===0x1f4){logger[_0x4935('0x13')](_0x4935('0x15'),_0xd5b117,_0x2ebd4c[_0x4935('0x13')][_0x4935('0x16')]);return _0x319b72(_0x2ebd4c[_0x4935('0x13')][_0x4935('0x16')]);}logger[_0x4935('0x13')](_0x4935('0x15'),_0xd5b117,_0x2ebd4c['error'][_0x4935('0x16')]);return _0x261462(_0x2ebd4c[_0x4935('0x13')][_0x4935('0x16')]);}else{logger[_0x4935('0x17')](_0x4935('0x15'),_0xd5b117,_0x4935('0xf'));_0x261462(_0x2ebd4c['result'][_0x4935('0x16')]);}})[_0x4935('0x18')](function(_0x4fe356){logger[_0x4935('0x13')](_0x4935('0x15'),_0xd5b117,_0x4fe356);_0x319b72(_0x4fe356);});});}
\ No newline at end of file
+var _0x4af8=['request','OpenchannelAccount,\x20%s,\x20%s','request\x20sent','OpenchannelAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','defaults','redis','./openchannelAccount.socket'];(function(_0x1521ba,_0x391f4d){var _0x182299=function(_0xa8a1de){while(--_0xa8a1de){_0x1521ba['push'](_0x1521ba['shift']());}};_0x182299(++_0x391f4d);}(_0x4af8,0x1ad));var _0x84af=function(_0x4e9628,_0x250573){_0x4e9628=_0x4e9628-0x0;var _0x27bc8c=_0x4af8[_0x4e9628];return _0x27bc8c;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x84af('0x0'));var fs=require('fs');var Redis=require(_0x84af('0x1'));var db=require(_0x84af('0x2'))['db'];var utils=require(_0x84af('0x3'));var logger=require('../../config/logger')(_0x84af('0x4'));var config=require(_0x84af('0x5'));var jayson=require('jayson/promise');var client=jayson[_0x84af('0x6')][_0x84af('0x7')]({'port':0x232a});config['redis']=_[_0x84af('0x8')](config[_0x84af('0x9')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x84af('0x9')]));require(_0x84af('0xa'))['register'](socket);function respondWithRpcPromise(_0xc9f91b,_0x535556,_0x1623f6){return new BPromise(function(_0x21e634,_0x34aa9e){return client[_0x84af('0xb')](_0xc9f91b,_0x1623f6)['then'](function(_0x31f283){logger['info'](_0x84af('0xc'),_0x535556,_0x84af('0xd'));logger['debug'](_0x84af('0xe'),_0x535556,_0x84af('0xd'),JSON[_0x84af('0xf')](_0x31f283));if(_0x31f283[_0x84af('0x10')]){if(_0x31f283['error'][_0x84af('0x11')]===0x1f4){logger['error'](_0x84af('0xc'),_0x535556,_0x31f283[_0x84af('0x10')]['message']);return _0x34aa9e(_0x31f283[_0x84af('0x10')][_0x84af('0x12')]);}logger['error'](_0x84af('0xc'),_0x535556,_0x31f283['error'][_0x84af('0x12')]);return _0x21e634(_0x31f283[_0x84af('0x10')]['message']);}else{logger['info'](_0x84af('0xc'),_0x535556,_0x84af('0xd'));_0x21e634(_0x31f283[_0x84af('0x13')]['message']);}})['catch'](function(_0x187195){logger[_0x84af('0x10')](_0x84af('0xc'),_0x535556,_0x187195);_0x34aa9e(_0x187195);});});}
\ No newline at end of file
index b4a3f8a..1ff0f81 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2083=['save','update','emit','length','openchannelAccount:','./openchannelAccount.events'];(function(_0x23e5f7,_0x531677){var _0x5411d1=function(_0xe5625b){while(--_0xe5625b){_0x23e5f7['push'](_0x23e5f7['shift']());}};_0x5411d1(++_0x531677);}(_0x2083,0x137));var _0x3208=function(_0x388d4c,_0x278500){_0x388d4c=_0x388d4c-0x0;var _0x3e2f5d=_0x2083[_0x388d4c];return _0x3e2f5d;};'use strict';var OpenchannelAccountEvents=require(_0x3208('0x0'));var events=[_0x3208('0x1'),'remove',_0x3208('0x2')];function createListener(_0x3c185a,_0x8e8849){return function(_0x9f4a1){_0x8e8849[_0x3208('0x3')](_0x3c185a,_0x9f4a1);};}function removeListener(_0x3ba273,_0x1535fb){return function(){OpenchannelAccountEvents['removeListener'](_0x3ba273,_0x1535fb);};}exports['register']=function(_0x5c8d7f){for(var _0x152b81=0x0,_0x3d837d=events[_0x3208('0x4')];_0x152b81<_0x3d837d;_0x152b81++){var _0x17972f=events[_0x152b81];var _0x564ff6=createListener(_0x3208('0x5')+_0x17972f,_0x5c8d7f);OpenchannelAccountEvents['on'](_0x17972f,_0x564ff6);}};
\ No newline at end of file
+var _0xd0d5=['register','length','openchannelAccount:','emit','removeListener'];(function(_0x2cc8bb,_0x5f2607){var _0x140e40=function(_0x80d96d){while(--_0x80d96d){_0x2cc8bb['push'](_0x2cc8bb['shift']());}};_0x140e40(++_0x5f2607);}(_0xd0d5,0x1ed));var _0x5d0d=function(_0x12a610,_0x3f2453){_0x12a610=_0x12a610-0x0;var _0x4e69ae=_0xd0d5[_0x12a610];return _0x4e69ae;};'use strict';var OpenchannelAccountEvents=require('./openchannelAccount.events');var events=['save','remove','update'];function createListener(_0x58f3ab,_0x2c7013){return function(_0x3d99f8){_0x2c7013[_0x5d0d('0x0')](_0x58f3ab,_0x3d99f8);};}function removeListener(_0x514434,_0x555b49){return function(){OpenchannelAccountEvents[_0x5d0d('0x1')](_0x514434,_0x555b49);};}exports[_0x5d0d('0x2')]=function(_0xd79a02){for(var _0x4259ce=0x0,_0x5ace89=events[_0x5d0d('0x3')];_0x4259ce<_0x5ace89;_0x4259ce++){var _0xcfec38=events[_0x4259ce];var _0x11c549=createListener(_0x5d0d('0x4')+_0xcfec38,_0xd79a02);OpenchannelAccountEvents['on'](_0xcfec38,_0x11c549);}};
\ No newline at end of file
index 2686719..23253fe 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4cce=['../../components/auth/service','isAuthenticated','index','get','show','create','put','/:id','update','delete','destroy','util','path','connect-timeout','fs-extra'];(function(_0x2b0f7d,_0x1a71e3){var _0x3af0b9=function(_0x286111){while(--_0x286111){_0x2b0f7d['push'](_0x2b0f7d['shift']());}};_0x3af0b9(++_0x1a71e3);}(_0x4cce,0x128));var _0xe4cc=function(_0x1d73fe,_0x4ba414){_0x1d73fe=_0x1d73fe-0x0;var _0x40998b=_0x4cce[_0x1d73fe];return _0x40998b;};'use strict';var multer=require('multer');var util=require(_0xe4cc('0x0'));var path=require(_0xe4cc('0x1'));var timeout=require(_0xe4cc('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0xe4cc('0x3'));var auth=require(_0xe4cc('0x4'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./openchannelApplication.controller');router['get']('/',auth[_0xe4cc('0x5')](),controller[_0xe4cc('0x6')]);router[_0xe4cc('0x7')]('/:id',auth[_0xe4cc('0x5')](),controller[_0xe4cc('0x8')]);router['post']('/',auth[_0xe4cc('0x5')](),controller[_0xe4cc('0x9')]);router[_0xe4cc('0xa')](_0xe4cc('0xb'),auth[_0xe4cc('0x5')](),controller[_0xe4cc('0xc')]);router[_0xe4cc('0xd')](_0xe4cc('0xb'),auth[_0xe4cc('0x5')](),controller[_0xe4cc('0xe')]);module['exports']=router;
\ No newline at end of file
+var _0xdf36=['put','update','/:id','isAuthenticated','destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelApplication.controller','index','get','show','post','create'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0xdf36,0x180));var _0x6df3=function(_0x557383,_0x4007e6){_0x557383=_0x557383-0x0;var _0x2fd68d=_0xdf36[_0x557383];return _0x2fd68d;};'use strict';var multer=require(_0x6df3('0x0'));var util=require(_0x6df3('0x1'));var path=require(_0x6df3('0x2'));var timeout=require(_0x6df3('0x3'));var express=require('express');var router=express[_0x6df3('0x4')]();var fs_extra=require(_0x6df3('0x5'));var auth=require(_0x6df3('0x6'));var interaction=require(_0x6df3('0x7'));var config=require(_0x6df3('0x8'));var controller=require(_0x6df3('0x9'));router['get']('/',auth['isAuthenticated'](),controller[_0x6df3('0xa')]);router[_0x6df3('0xb')]('/:id',auth['isAuthenticated'](),controller[_0x6df3('0xc')]);router[_0x6df3('0xd')]('/',auth['isAuthenticated'](),controller[_0x6df3('0xe')]);router[_0x6df3('0xf')]('/:id',auth['isAuthenticated'](),controller[_0x6df3('0x10')]);router['delete'](_0x6df3('0x11'),auth[_0x6df3('0x12')](),controller[_0x6df3('0x13')]);module[_0x6df3('0x14')]=router;
\ No newline at end of file
index f5bd540..0832ea8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7666=['exports','INTEGER','STRING','noop','TEXT','*,*,*,*','sequelize'];(function(_0x39a31c,_0x350438){var _0x4c27a6=function(_0x30c9dc){while(--_0x30c9dc){_0x39a31c['push'](_0x39a31c['shift']());}};_0x4c27a6(++_0x350438);}(_0x7666,0x1c6));var _0x6766=function(_0x1842df,_0x223e04){_0x1842df=_0x1842df-0x0;var _0x1d4584=_0x7666[_0x1842df];return _0x1d4584;};'use strict';var Sequelize=require(_0x6766('0x0'));module[_0x6766('0x1')]={'priority':{'type':Sequelize[_0x6766('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x6766('0x3')],'allowNull':![],'defaultValue':_0x6766('0x4')},'appdata':{'type':Sequelize[_0x6766('0x5')]()},'description':{'type':Sequelize[_0x6766('0x3')]},'interval':{'type':Sequelize[_0x6766('0x3')],'defaultValue':_0x6766('0x6')}};
\ No newline at end of file
+var _0x1a9c=['sequelize','INTEGER','noop','TEXT','STRING','*,*,*,*'];(function(_0x5447fd,_0x52a6b5){var _0x15b28a=function(_0x370d4f){while(--_0x370d4f){_0x5447fd['push'](_0x5447fd['shift']());}};_0x15b28a(++_0x52a6b5);}(_0x1a9c,0x11a));var _0xc1a9=function(_0x8df9a1,_0xcd0067){_0x8df9a1=_0x8df9a1-0x0;var _0x12c60e=_0x1a9c[_0x8df9a1];return _0x12c60e;};'use strict';var Sequelize=require(_0xc1a9('0x0'));module['exports']={'priority':{'type':Sequelize[_0xc1a9('0x1')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xc1a9('0x2')},'appdata':{'type':Sequelize[_0xc1a9('0x3')]()},'description':{'type':Sequelize[_0xc1a9('0x4')]},'interval':{'type':Sequelize[_0xc1a9('0x4')],'defaultValue':_0xc1a9('0x5')}};
\ No newline at end of file
index 55f8bd2..55965dc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1eae=['name','send','index','map','OpenchannelApplication','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','nolimit','order','sort','where','pick','filter','merge','options','findAll','catch','show','params','length','includeAll','include','find','create','body','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','status','end','offset','count','limit','Content-Range','json','apply','reject','save','update','then','destroy','sendStatus','error','stack'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x1eae,0xb8));var _0xe1ea=function(_0x4fbed7,_0x2a33b7){_0x4fbed7=_0x4fbed7-0x0;var _0x1ecc07=_0x1eae[_0x4fbed7];return _0x1ecc07;};'use strict';var emlformat=require(_0xe1ea('0x0'));var rimraf=require(_0xe1ea('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xe1ea('0x2'));var rp=require(_0xe1ea('0x3'));var moment=require(_0xe1ea('0x4'));var BPromise=require(_0xe1ea('0x5'));var Mustache=require(_0xe1ea('0x6'));var util=require(_0xe1ea('0x7'));var path=require('path');var sox=require(_0xe1ea('0x8'));var csv=require(_0xe1ea('0x9'));var ejs=require(_0xe1ea('0xa'));var fs=require('fs');var fs_extra=require(_0xe1ea('0xb'));var _=require(_0xe1ea('0xc'));var squel=require(_0xe1ea('0xd'));var crypto=require('crypto');var jsforce=require(_0xe1ea('0xe'));var deskjs=require(_0xe1ea('0xf'));var toCsv=require(_0xe1ea('0x9'));var querystring=require(_0xe1ea('0x10'));var Papa=require('papaparse');var Redis=require(_0xe1ea('0x11'));var authService=require(_0xe1ea('0x12'));var qs=require(_0xe1ea('0x13'));var as=require(_0xe1ea('0x14'));var hardwareService=require(_0xe1ea('0x15'));var logger=require(_0xe1ea('0x16'))('api');var utils=require(_0xe1ea('0x17'));var config=require(_0xe1ea('0x18'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x262b86,_0x4d6f13){_0x4d6f13=_0x4d6f13||0xcc;return function(_0x581797){if(_0x581797){return _0x262b86['sendStatus'](_0x4d6f13);}return _0x262b86[_0xe1ea('0x19')](_0x4d6f13)[_0xe1ea('0x1a')]();};}function respondWithResult(_0x1acd06,_0x1f2e55){_0x1f2e55=_0x1f2e55||0xc8;return function(_0xee2401){if(_0xee2401){return _0x1acd06[_0xe1ea('0x19')](_0x1f2e55)['json'](_0xee2401);}};}function respondWithFilteredResult(_0x29070f,_0x4d77a5){return function(_0x5b859b){if(_0x5b859b){var _0x5bbafb=typeof _0x4d77a5[_0xe1ea('0x1b')]==='undefined'&&typeof _0x4d77a5['limit']==='undefined';var _0x1b3190=_0x5b859b[_0xe1ea('0x1c')];var _0x306d0c=_0x5bbafb?0x0:_0x4d77a5[_0xe1ea('0x1b')];var _0x16d6e1=_0x5bbafb?_0x5b859b['count']:_0x4d77a5[_0xe1ea('0x1b')]+_0x4d77a5[_0xe1ea('0x1d')];var _0xab2527;if(_0x16d6e1>=_0x1b3190){_0x16d6e1=_0x1b3190;_0xab2527=0xc8;}else{_0xab2527=0xce;}_0x29070f[_0xe1ea('0x19')](_0xab2527);return _0x29070f['set'](_0xe1ea('0x1e'),_0x306d0c+'-'+_0x16d6e1+'/'+_0x1b3190)[_0xe1ea('0x1f')](_0x5b859b);}return null;};}function patchUpdates(_0xaab892){return function(_0x47d6e4){try{jsonpatch[_0xe1ea('0x20')](_0x47d6e4,_0xaab892,!![]);}catch(_0x483d30){return BPromise[_0xe1ea('0x21')](_0x483d30);}return _0x47d6e4[_0xe1ea('0x22')]();};}function saveUpdates(_0x5b62c3,_0x2304c1){return function(_0x339a61){if(_0x339a61){return _0x339a61[_0xe1ea('0x23')](_0x5b62c3)[_0xe1ea('0x24')](function(_0x983151){return _0x983151;});}return null;};}function removeEntity(_0x4742ba,_0x20d31f){return function(_0xbd159b){if(_0xbd159b){return _0xbd159b[_0xe1ea('0x25')]()[_0xe1ea('0x24')](function(){_0x4742ba[_0xe1ea('0x19')](0xcc)[_0xe1ea('0x1a')]();});}};}function handleEntityNotFound(_0x323adc,_0xc0af3d){return function(_0x1acde9){if(!_0x1acde9){_0x323adc[_0xe1ea('0x26')](0x194);}return _0x1acde9;};}function handleError(_0x389345,_0x4e044c){_0x4e044c=_0x4e044c||0x1f4;return function(_0x25cd58){logger[_0xe1ea('0x27')](_0x25cd58[_0xe1ea('0x28')]);if(_0x25cd58[_0xe1ea('0x29')]){delete _0x25cd58[_0xe1ea('0x29')];}_0x389345[_0xe1ea('0x19')](_0x4e044c)[_0xe1ea('0x2a')](_0x25cd58);};}exports[_0xe1ea('0x2b')]=function(_0x1874cb,_0x383a0c){var _0x4031b8={},_0x49cdcd={},_0x39d042={'count':0x0,'rows':[]};var _0x19d626=_[_0xe1ea('0x2c')](db[_0xe1ea('0x2d')][_0xe1ea('0x2e')],function(_0x46df29){return{'name':_0x46df29[_0xe1ea('0x2f')],'type':_0x46df29[_0xe1ea('0x30')][_0xe1ea('0x31')]};});_0x49cdcd[_0xe1ea('0x32')]=_[_0xe1ea('0x2c')](_0x19d626,'name');_0x49cdcd[_0xe1ea('0x33')]=_[_0xe1ea('0x34')](_0x1874cb[_0xe1ea('0x33')]);_0x49cdcd[_0xe1ea('0x35')]=_[_0xe1ea('0x36')](_0x49cdcd[_0xe1ea('0x32')],_0x49cdcd[_0xe1ea('0x33')]);_0x4031b8[_0xe1ea('0x37')]=_[_0xe1ea('0x36')](_0x49cdcd[_0xe1ea('0x32')],qs[_0xe1ea('0x38')](_0x1874cb['query']['fields']));_0x4031b8[_0xe1ea('0x37')]=_0x4031b8[_0xe1ea('0x37')]['length']?_0x4031b8[_0xe1ea('0x37')]:_0x49cdcd[_0xe1ea('0x32')];if(!_0x1874cb[_0xe1ea('0x33')]['hasOwnProperty'](_0xe1ea('0x39'))){_0x4031b8[_0xe1ea('0x1d')]=qs['limit'](_0x1874cb[_0xe1ea('0x33')][_0xe1ea('0x1d')]);_0x4031b8[_0xe1ea('0x1b')]=qs[_0xe1ea('0x1b')](_0x1874cb[_0xe1ea('0x33')]['offset']);}_0x4031b8[_0xe1ea('0x3a')]=qs[_0xe1ea('0x3b')](_0x1874cb[_0xe1ea('0x33')]['sort']);_0x4031b8[_0xe1ea('0x3c')]=qs[_0xe1ea('0x35')](_[_0xe1ea('0x3d')](_0x1874cb[_0xe1ea('0x33')],_0x49cdcd['filters']),_0x19d626);if(_0x1874cb[_0xe1ea('0x33')][_0xe1ea('0x3e')]){_0x4031b8[_0xe1ea('0x3c')]=_[_0xe1ea('0x3f')](_0x4031b8[_0xe1ea('0x3c')],{'$or':_[_0xe1ea('0x2c')](_0x19d626,function(_0x27adf2){if(_0x27adf2[_0xe1ea('0x30')]!=='VIRTUAL'){var _0x4067ad={};_0x4067ad[_0x27adf2['name']]={'$like':'%'+_0x1874cb[_0xe1ea('0x33')]['filter']+'%'};return _0x4067ad;}})});}_0x4031b8=_[_0xe1ea('0x3f')]({},_0x4031b8,_0x1874cb[_0xe1ea('0x40')]);var _0x2120cf={'where':_0x4031b8[_0xe1ea('0x3c')]};return db[_0xe1ea('0x2d')][_0xe1ea('0x1c')](_0x2120cf)[_0xe1ea('0x24')](function(_0x42ef09){_0x39d042[_0xe1ea('0x1c')]=_0x42ef09;if(_0x1874cb[_0xe1ea('0x33')]['includeAll']){_0x4031b8['include']=[{'all':!![]}];}return db[_0xe1ea('0x2d')][_0xe1ea('0x41')](_0x4031b8);})['then'](function(_0x26b1b5){_0x39d042['rows']=_0x26b1b5;return _0x39d042;})[_0xe1ea('0x24')](respondWithFilteredResult(_0x383a0c,_0x4031b8))[_0xe1ea('0x42')](handleError(_0x383a0c,null));};exports[_0xe1ea('0x43')]=function(_0x220228,_0x343f69){var _0x3f9970={'raw':!![],'where':{'id':_0x220228[_0xe1ea('0x44')]['id']}},_0x1d1551={};_0x1d1551[_0xe1ea('0x32')]=_[_0xe1ea('0x34')](db[_0xe1ea('0x2d')][_0xe1ea('0x2e')]);_0x1d1551[_0xe1ea('0x33')]=_[_0xe1ea('0x34')](_0x220228[_0xe1ea('0x33')]);_0x1d1551[_0xe1ea('0x35')]=_['intersection'](_0x1d1551[_0xe1ea('0x32')],_0x1d1551[_0xe1ea('0x33')]);_0x3f9970[_0xe1ea('0x37')]=_['intersection'](_0x1d1551[_0xe1ea('0x32')],qs['fields'](_0x220228[_0xe1ea('0x33')]['fields']));_0x3f9970[_0xe1ea('0x37')]=_0x3f9970['attributes'][_0xe1ea('0x45')]?_0x3f9970[_0xe1ea('0x37')]:_0x1d1551[_0xe1ea('0x32')];if(_0x220228[_0xe1ea('0x33')][_0xe1ea('0x46')]){_0x3f9970[_0xe1ea('0x47')]=[{'all':!![]}];}_0x3f9970=_[_0xe1ea('0x3f')]({},_0x3f9970,_0x220228['options']);return db[_0xe1ea('0x2d')][_0xe1ea('0x48')](_0x3f9970)[_0xe1ea('0x24')](handleEntityNotFound(_0x343f69,null))[_0xe1ea('0x24')](respondWithResult(_0x343f69,null))['catch'](handleError(_0x343f69,null));};exports[_0xe1ea('0x49')]=function(_0x46b2af,_0x32dcef){return db[_0xe1ea('0x2d')]['create'](_0x46b2af[_0xe1ea('0x4a')],{})[_0xe1ea('0x24')](respondWithResult(_0x32dcef,0xc9))[_0xe1ea('0x42')](handleError(_0x32dcef,null));};exports['update']=function(_0x54bddd,_0x569e34){if(_0x54bddd['body']['id']){delete _0x54bddd['body']['id'];}return db[_0xe1ea('0x2d')][_0xe1ea('0x48')]({'where':{'id':_0x54bddd[_0xe1ea('0x44')]['id']}})['then'](handleEntityNotFound(_0x569e34,null))[_0xe1ea('0x24')](saveUpdates(_0x54bddd['body'],null))[_0xe1ea('0x24')](respondWithResult(_0x569e34,null))[_0xe1ea('0x42')](handleError(_0x569e34,null));};exports[_0xe1ea('0x25')]=function(_0x2412aa,_0x2e08ab){return db[_0xe1ea('0x2d')][_0xe1ea('0x48')]({'where':{'id':_0x2412aa[_0xe1ea('0x44')]['id']}})[_0xe1ea('0x24')](handleEntityNotFound(_0x2e08ab,null))[_0xe1ea('0x24')](removeEntity(_0x2e08ab,null))['catch'](handleError(_0x2e08ab,null));};
\ No newline at end of file
+var _0x65ef=['type','VIRTUAL','includeAll','include','findAll','rows','params','options','find','catch','create','body','destroy','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','ejs','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','sendStatus','end','json','offset','undefined','limit','count','status','set','Content-Range','reject','save','update','then','error','stack','name','send','index','map','OpenchannelApplication','rawAttributes','fieldName','model','query','keys','filters','intersection','attributes','fields','length','order','sort','where','pick','filter','merge'];(function(_0x39c393,_0x46800d){var _0x4f7d6e=function(_0x2cdfa2){while(--_0x2cdfa2){_0x39c393['push'](_0x39c393['shift']());}};_0x4f7d6e(++_0x46800d);}(_0x65ef,0xeb));var _0xf65e=function(_0x5a75df,_0x40eaa2){_0x5a75df=_0x5a75df-0x0;var _0x1f0d2a=_0x65ef[_0x5a75df];return _0x1f0d2a;};'use strict';var emlformat=require(_0xf65e('0x0'));var rimraf=require(_0xf65e('0x1'));var zipdir=require(_0xf65e('0x2'));var jsonpatch=require(_0xf65e('0x3'));var rp=require(_0xf65e('0x4'));var moment=require(_0xf65e('0x5'));var BPromise=require(_0xf65e('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0xf65e('0x7'));var sox=require(_0xf65e('0x8'));var csv=require(_0xf65e('0x9'));var ejs=require(_0xf65e('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require('squel');var crypto=require(_0xf65e('0xb'));var jsforce=require(_0xf65e('0xc'));var deskjs=require(_0xf65e('0xd'));var toCsv=require(_0xf65e('0x9'));var querystring=require(_0xf65e('0xe'));var Papa=require(_0xf65e('0xf'));var Redis=require(_0xf65e('0x10'));var authService=require(_0xf65e('0x11'));var qs=require(_0xf65e('0x12'));var as=require(_0xf65e('0x13'));var hardwareService=require(_0xf65e('0x14'));var logger=require(_0xf65e('0x15'))(_0xf65e('0x16'));var utils=require('../../config/utils');var config=require(_0xf65e('0x17'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x64fc8f,_0x43fbde){_0x43fbde=_0x43fbde||0xcc;return function(_0x1d8513){if(_0x1d8513){return _0x64fc8f[_0xf65e('0x18')](_0x43fbde);}return _0x64fc8f['status'](_0x43fbde)[_0xf65e('0x19')]();};}function respondWithResult(_0x465e85,_0x4d2060){_0x4d2060=_0x4d2060||0xc8;return function(_0x3ffc6b){if(_0x3ffc6b){return _0x465e85['status'](_0x4d2060)[_0xf65e('0x1a')](_0x3ffc6b);}};}function respondWithFilteredResult(_0x43a055,_0x41ee32){return function(_0x2661d2){if(_0x2661d2){var _0x55d668=typeof _0x41ee32[_0xf65e('0x1b')]===_0xf65e('0x1c')&&typeof _0x41ee32[_0xf65e('0x1d')]===_0xf65e('0x1c');var _0x3700ae=_0x2661d2[_0xf65e('0x1e')];var _0x4cc2ec=_0x55d668?0x0:_0x41ee32['offset'];var _0x3d9da0=_0x55d668?_0x2661d2[_0xf65e('0x1e')]:_0x41ee32['offset']+_0x41ee32[_0xf65e('0x1d')];var _0x5b079d;if(_0x3d9da0>=_0x3700ae){_0x3d9da0=_0x3700ae;_0x5b079d=0xc8;}else{_0x5b079d=0xce;}_0x43a055[_0xf65e('0x1f')](_0x5b079d);return _0x43a055[_0xf65e('0x20')](_0xf65e('0x21'),_0x4cc2ec+'-'+_0x3d9da0+'/'+_0x3700ae)[_0xf65e('0x1a')](_0x2661d2);}return null;};}function patchUpdates(_0x245779){return function(_0x2512ac){try{jsonpatch['apply'](_0x2512ac,_0x245779,!![]);}catch(_0x1c9e5b){return BPromise[_0xf65e('0x22')](_0x1c9e5b);}return _0x2512ac[_0xf65e('0x23')]();};}function saveUpdates(_0x1cbc7e,_0x2b8805){return function(_0x51a662){if(_0x51a662){return _0x51a662[_0xf65e('0x24')](_0x1cbc7e)['then'](function(_0x3f0042){return _0x3f0042;});}return null;};}function removeEntity(_0x27b52b,_0x1759fd){return function(_0x53fac3){if(_0x53fac3){return _0x53fac3['destroy']()[_0xf65e('0x25')](function(){_0x27b52b[_0xf65e('0x1f')](0xcc)[_0xf65e('0x19')]();});}};}function handleEntityNotFound(_0x7746ce,_0x56c405){return function(_0x3c5788){if(!_0x3c5788){_0x7746ce['sendStatus'](0x194);}return _0x3c5788;};}function handleError(_0x8fad27,_0x270dd7){_0x270dd7=_0x270dd7||0x1f4;return function(_0x2d728){logger[_0xf65e('0x26')](_0x2d728[_0xf65e('0x27')]);if(_0x2d728[_0xf65e('0x28')]){delete _0x2d728[_0xf65e('0x28')];}_0x8fad27['status'](_0x270dd7)[_0xf65e('0x29')](_0x2d728);};}exports[_0xf65e('0x2a')]=function(_0x131bf1,_0x5e1fc2){var _0x2870cd={},_0x4523d9={},_0x31acc5={'count':0x0,'rows':[]};var _0x3fe975=_[_0xf65e('0x2b')](db[_0xf65e('0x2c')][_0xf65e('0x2d')],function(_0x331f5f){return{'name':_0x331f5f[_0xf65e('0x2e')],'type':_0x331f5f['type']['key']};});_0x4523d9[_0xf65e('0x2f')]=_[_0xf65e('0x2b')](_0x3fe975,'name');_0x4523d9[_0xf65e('0x30')]=_[_0xf65e('0x31')](_0x131bf1[_0xf65e('0x30')]);_0x4523d9[_0xf65e('0x32')]=_[_0xf65e('0x33')](_0x4523d9[_0xf65e('0x2f')],_0x4523d9[_0xf65e('0x30')]);_0x2870cd[_0xf65e('0x34')]=_[_0xf65e('0x33')](_0x4523d9[_0xf65e('0x2f')],qs[_0xf65e('0x35')](_0x131bf1[_0xf65e('0x30')][_0xf65e('0x35')]));_0x2870cd[_0xf65e('0x34')]=_0x2870cd[_0xf65e('0x34')][_0xf65e('0x36')]?_0x2870cd[_0xf65e('0x34')]:_0x4523d9[_0xf65e('0x2f')];if(!_0x131bf1[_0xf65e('0x30')]['hasOwnProperty']('nolimit')){_0x2870cd['limit']=qs[_0xf65e('0x1d')](_0x131bf1[_0xf65e('0x30')][_0xf65e('0x1d')]);_0x2870cd[_0xf65e('0x1b')]=qs[_0xf65e('0x1b')](_0x131bf1[_0xf65e('0x30')][_0xf65e('0x1b')]);}_0x2870cd[_0xf65e('0x37')]=qs['sort'](_0x131bf1[_0xf65e('0x30')][_0xf65e('0x38')]);_0x2870cd[_0xf65e('0x39')]=qs[_0xf65e('0x32')](_[_0xf65e('0x3a')](_0x131bf1[_0xf65e('0x30')],_0x4523d9[_0xf65e('0x32')]),_0x3fe975);if(_0x131bf1['query'][_0xf65e('0x3b')]){_0x2870cd['where']=_[_0xf65e('0x3c')](_0x2870cd[_0xf65e('0x39')],{'$or':_[_0xf65e('0x2b')](_0x3fe975,function(_0x3dbdac){if(_0x3dbdac[_0xf65e('0x3d')]!==_0xf65e('0x3e')){var _0x4e1edc={};_0x4e1edc[_0x3dbdac[_0xf65e('0x28')]]={'$like':'%'+_0x131bf1[_0xf65e('0x30')]['filter']+'%'};return _0x4e1edc;}})});}_0x2870cd=_[_0xf65e('0x3c')]({},_0x2870cd,_0x131bf1['options']);var _0x180297={'where':_0x2870cd['where']};return db[_0xf65e('0x2c')][_0xf65e('0x1e')](_0x180297)[_0xf65e('0x25')](function(_0x50a7b6){_0x31acc5[_0xf65e('0x1e')]=_0x50a7b6;if(_0x131bf1['query'][_0xf65e('0x3f')]){_0x2870cd[_0xf65e('0x40')]=[{'all':!![]}];}return db[_0xf65e('0x2c')][_0xf65e('0x41')](_0x2870cd);})[_0xf65e('0x25')](function(_0x27340f){_0x31acc5[_0xf65e('0x42')]=_0x27340f;return _0x31acc5;})[_0xf65e('0x25')](respondWithFilteredResult(_0x5e1fc2,_0x2870cd))['catch'](handleError(_0x5e1fc2,null));};exports['show']=function(_0x5d266b,_0x8b735f){var _0x9143c5={'raw':!![],'where':{'id':_0x5d266b[_0xf65e('0x43')]['id']}},_0x36ec1c={};_0x36ec1c['model']=_['keys'](db[_0xf65e('0x2c')][_0xf65e('0x2d')]);_0x36ec1c[_0xf65e('0x30')]=_[_0xf65e('0x31')](_0x5d266b[_0xf65e('0x30')]);_0x36ec1c[_0xf65e('0x32')]=_[_0xf65e('0x33')](_0x36ec1c[_0xf65e('0x2f')],_0x36ec1c[_0xf65e('0x30')]);_0x9143c5[_0xf65e('0x34')]=_['intersection'](_0x36ec1c[_0xf65e('0x2f')],qs['fields'](_0x5d266b[_0xf65e('0x30')][_0xf65e('0x35')]));_0x9143c5[_0xf65e('0x34')]=_0x9143c5['attributes']['length']?_0x9143c5[_0xf65e('0x34')]:_0x36ec1c[_0xf65e('0x2f')];if(_0x5d266b['query'][_0xf65e('0x3f')]){_0x9143c5['include']=[{'all':!![]}];}_0x9143c5=_['merge']({},_0x9143c5,_0x5d266b[_0xf65e('0x44')]);return db['OpenchannelApplication'][_0xf65e('0x45')](_0x9143c5)[_0xf65e('0x25')](handleEntityNotFound(_0x8b735f,null))[_0xf65e('0x25')](respondWithResult(_0x8b735f,null))[_0xf65e('0x46')](handleError(_0x8b735f,null));};exports[_0xf65e('0x47')]=function(_0x2edc3d,_0x3c1c75){return db[_0xf65e('0x2c')][_0xf65e('0x47')](_0x2edc3d[_0xf65e('0x48')],{})[_0xf65e('0x25')](respondWithResult(_0x3c1c75,0xc9))[_0xf65e('0x46')](handleError(_0x3c1c75,null));};exports[_0xf65e('0x24')]=function(_0x33965f,_0x1d1fdc){if(_0x33965f[_0xf65e('0x48')]['id']){delete _0x33965f[_0xf65e('0x48')]['id'];}return db[_0xf65e('0x2c')][_0xf65e('0x45')]({'where':{'id':_0x33965f['params']['id']}})[_0xf65e('0x25')](handleEntityNotFound(_0x1d1fdc,null))[_0xf65e('0x25')](saveUpdates(_0x33965f['body'],null))[_0xf65e('0x25')](respondWithResult(_0x1d1fdc,null))[_0xf65e('0x46')](handleError(_0x1d1fdc,null));};exports[_0xf65e('0x49')]=function(_0xdb91d8,_0x55e7b6){return db['OpenchannelApplication']['find']({'where':{'id':_0xdb91d8[_0xf65e('0x43')]['id']}})[_0xf65e('0x25')](handleEntityNotFound(_0x55e7b6,null))[_0xf65e('0x25')](removeEntity(_0x55e7b6,null))['catch'](handleError(_0x55e7b6,null));};
\ No newline at end of file
index 09f4940..6d5a3c2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x360a=['rimraf','../../config/environment','./openchannelApplication.attributes','exports','define','utf8mb4','utf8mb4_unicode_ci','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x4532c7,_0x108452){var _0x5c6cad=function(_0x39621a){while(--_0x39621a){_0x4532c7['push'](_0x4532c7['shift']());}};_0x5c6cad(++_0x108452);}(_0x360a,0x13f));var _0xa360=function(_0x413feb,_0x10477f){_0x413feb=_0x413feb-0x0;var _0x40ee88=_0x360a[_0x413feb];return _0x40ee88;};'use strict';var _=require('lodash');var util=require(_0xa360('0x0'));var logger=require(_0xa360('0x1'))(_0xa360('0x2'));var moment=require(_0xa360('0x3'));var BPromise=require(_0xa360('0x4'));var rp=require(_0xa360('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xa360('0x6'));var config=require(_0xa360('0x7'));var attributes=require(_0xa360('0x8'));module[_0xa360('0x9')]=function(_0x2f1fc6,_0x527e31){return _0x2f1fc6[_0xa360('0xa')]('OpenchannelApplication',attributes,{'tableName':'openchannel_applications','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xa360('0xb'),'collate':_0xa360('0xc')});};
\ No newline at end of file
+var _0x6d7f=['exports','define','OpenchannelApplication','openchannel_applications','utf8mb4_unicode_ci','api','moment','bluebird','rimraf'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x6d7f,0xb0));var _0xf6d7=function(_0x1cfff1,_0x564189){_0x1cfff1=_0x1cfff1-0x0;var _0x2ad67e=_0x6d7f[_0x1cfff1];return _0x2ad67e;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')(_0xf6d7('0x0'));var moment=require(_0xf6d7('0x1'));var BPromise=require(_0xf6d7('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xf6d7('0x3'));var config=require('../../config/environment');var attributes=require('./openchannelApplication.attributes');module[_0xf6d7('0x4')]=function(_0x39c481,_0x2c0b0c){return _0x39c481[_0xf6d7('0x5')](_0xf6d7('0x6'),attributes,{'tableName':_0xf6d7('0x7'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0xf6d7('0x8')});};
\ No newline at end of file
index 7633fe0..29415fc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc613=['../../config/logger','rpc','../../config/environment','jayson/promise','request','request\x20sent','debug','OpenchannelApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','OpenchannelApplication,\x20%s,\x20%s','message','result','catch','OpenchannelApplication','body','options','attributes','limit','then','info','UpdateOpenchannelApplication','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x2589ee,_0x539491){var _0x3b0dea=function(_0x31977a){while(--_0x31977a){_0x2589ee['push'](_0x2589ee['shift']());}};_0x3b0dea(++_0x539491);}(_0xc613,0x161));var _0x3c61=function(_0x3435ac,_0x280230){_0x3435ac=_0x3435ac-0x0;var _0x3c7261=_0xc613[_0x3435ac];return _0x3c7261;};'use strict';var _=require('lodash');var util=require(_0x3c61('0x0'));var moment=require(_0x3c61('0x1'));var BPromise=require(_0x3c61('0x2'));var rs=require(_0x3c61('0x3'));var fs=require('fs');var Redis=require(_0x3c61('0x4'));var db=require(_0x3c61('0x5'))['db'];var utils=require(_0x3c61('0x6'));var logger=require(_0x3c61('0x7'))(_0x3c61('0x8'));var config=require(_0x3c61('0x9'));var jayson=require(_0x3c61('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x4f7853,_0x50adb6,_0x318f28){return new BPromise(function(_0x170741,_0x3cf0e5){return client[_0x3c61('0xb')](_0x4f7853,_0x318f28)['then'](function(_0xaf9462){logger['info']('OpenchannelApplication,\x20%s,\x20%s',_0x50adb6,_0x3c61('0xc'));logger[_0x3c61('0xd')](_0x3c61('0xe'),_0x50adb6,'request\x20sent',JSON[_0x3c61('0xf')](_0xaf9462));if(_0xaf9462[_0x3c61('0x10')]){if(_0xaf9462[_0x3c61('0x10')][_0x3c61('0x11')]===0x1f4){logger[_0x3c61('0x10')](_0x3c61('0x12'),_0x50adb6,_0xaf9462[_0x3c61('0x10')][_0x3c61('0x13')]);return _0x3cf0e5(_0xaf9462['error'][_0x3c61('0x13')]);}logger['error']('OpenchannelApplication,\x20%s,\x20%s',_0x50adb6,_0xaf9462[_0x3c61('0x10')][_0x3c61('0x13')]);return _0x170741(_0xaf9462['error'][_0x3c61('0x13')]);}else{logger['info'](_0x3c61('0x12'),_0x50adb6,_0x3c61('0xc'));_0x170741(_0xaf9462[_0x3c61('0x14')][_0x3c61('0x13')]);}})[_0x3c61('0x15')](function(_0x48e0cc){logger['error'](_0x3c61('0x12'),_0x50adb6,_0x48e0cc);_0x3cf0e5(_0x48e0cc);});});}exports['UpdateOpenchannelApplication']=function(_0x59f327){var _0x38638b=this;return new Promise(function(_0x4d0257,_0x334add){return db[_0x3c61('0x16')]['update'](_0x59f327[_0x3c61('0x17')],{'raw':_0x59f327['options']?_0x59f327[_0x3c61('0x18')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x59f327['options']?_0x59f327[_0x3c61('0x18')]['where']||null:null,'attributes':_0x59f327[_0x3c61('0x18')]?_0x59f327[_0x3c61('0x18')][_0x3c61('0x19')]||null:null,'limit':_0x59f327['options']?_0x59f327[_0x3c61('0x18')][_0x3c61('0x1a')]||null:null})[_0x3c61('0x1b')](function(_0x400a1d){logger[_0x3c61('0x1c')](_0x3c61('0x1d'),_0x59f327);logger[_0x3c61('0xd')]('UpdateOpenchannelApplication',_0x59f327,JSON[_0x3c61('0xf')](_0x400a1d));_0x4d0257(_0x400a1d);})[_0x3c61('0x15')](function(_0xae9aad){logger[_0x3c61('0x10')](_0x3c61('0x1d'),_0xae9aad[_0x3c61('0x13')],_0x59f327);_0x334add(_0x38638b['error'](0x1f4,_0xae9aad[_0x3c61('0x13')]));});});};
\ No newline at end of file
+var _0xd7a3=['options','raw','attributes','limit','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','request','then','info','request\x20sent','debug','stringify','error','code','OpenchannelApplication,\x20%s,\x20%s','message','result','catch','UpdateOpenchannelApplication','OpenchannelApplication','update'];(function(_0x2eb67c,_0x35d41e){var _0x376228=function(_0xc2b8a0){while(--_0xc2b8a0){_0x2eb67c['push'](_0x2eb67c['shift']());}};_0x376228(++_0x35d41e);}(_0xd7a3,0xac));var _0x3d7a=function(_0x32d457,_0x1a39c9){_0x32d457=_0x32d457-0x0;var _0x338386=_0xd7a3[_0x32d457];return _0x338386;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x3d7a('0x0'));var BPromise=require(_0x3d7a('0x1'));var rs=require(_0x3d7a('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x3d7a('0x3'))['db'];var utils=require(_0x3d7a('0x4'));var logger=require(_0x3d7a('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0x3d7a('0x6'));var client=jayson[_0x3d7a('0x7')][_0x3d7a('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x22a2d2,_0x4a1d8e,_0x12490b){return new BPromise(function(_0x76d701,_0x1219c4){return client[_0x3d7a('0x9')](_0x22a2d2,_0x12490b)[_0x3d7a('0xa')](function(_0x21168b){logger[_0x3d7a('0xb')]('OpenchannelApplication,\x20%s,\x20%s',_0x4a1d8e,_0x3d7a('0xc'));logger[_0x3d7a('0xd')]('OpenchannelApplication,\x20%s,\x20%s,\x20%s',_0x4a1d8e,_0x3d7a('0xc'),JSON[_0x3d7a('0xe')](_0x21168b));if(_0x21168b[_0x3d7a('0xf')]){if(_0x21168b[_0x3d7a('0xf')][_0x3d7a('0x10')]===0x1f4){logger['error'](_0x3d7a('0x11'),_0x4a1d8e,_0x21168b[_0x3d7a('0xf')]['message']);return _0x1219c4(_0x21168b[_0x3d7a('0xf')][_0x3d7a('0x12')]);}logger[_0x3d7a('0xf')](_0x3d7a('0x11'),_0x4a1d8e,_0x21168b[_0x3d7a('0xf')]['message']);return _0x76d701(_0x21168b[_0x3d7a('0xf')][_0x3d7a('0x12')]);}else{logger[_0x3d7a('0xb')](_0x3d7a('0x11'),_0x4a1d8e,_0x3d7a('0xc'));_0x76d701(_0x21168b[_0x3d7a('0x13')][_0x3d7a('0x12')]);}})[_0x3d7a('0x14')](function(_0x4542f2){logger['error'](_0x3d7a('0x11'),_0x4a1d8e,_0x4542f2);_0x1219c4(_0x4542f2);});});}exports[_0x3d7a('0x15')]=function(_0xc1384e){var _0x37fbb1=this;return new Promise(function(_0x4c21cc,_0x330abc){return db[_0x3d7a('0x16')][_0x3d7a('0x17')](_0xc1384e['body'],{'raw':_0xc1384e['options']?_0xc1384e[_0x3d7a('0x18')][_0x3d7a('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xc1384e[_0x3d7a('0x18')]?_0xc1384e[_0x3d7a('0x18')]['where']||null:null,'attributes':_0xc1384e[_0x3d7a('0x18')]?_0xc1384e[_0x3d7a('0x18')][_0x3d7a('0x1a')]||null:null,'limit':_0xc1384e[_0x3d7a('0x18')]?_0xc1384e[_0x3d7a('0x18')][_0x3d7a('0x1b')]||null:null})[_0x3d7a('0xa')](function(_0x41f6d7){logger[_0x3d7a('0xb')](_0x3d7a('0x15'),_0xc1384e);logger['debug'](_0x3d7a('0x15'),_0xc1384e,JSON[_0x3d7a('0xe')](_0x41f6d7));_0x4c21cc(_0x41f6d7);})[_0x3d7a('0x14')](function(_0xaf11f5){logger['error']('UpdateOpenchannelApplication',_0xaf11f5[_0x3d7a('0x12')],_0xc1384e);_0x330abc(_0x37fbb1['error'](0x1f4,_0xaf11f5[_0x3d7a('0x12')]));});});};
\ No newline at end of file
index 67a7101..73cfe10 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6b0a=['/:id/messages','getMessages','/:id/download','download','addMessage','/:id/tags','tracked','openchannel','openchannelinteraction:addtags','put','openchannelinteraction:update','delete','openchannelinteraction:destroy','destroy','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./openchannelInteraction.controller','get','isAuthenticated','describe','/:id'];(function(_0x1fc1f9,_0x454fb2){var _0x4987ca=function(_0x5e90dd){while(--_0x5e90dd){_0x1fc1f9['push'](_0x1fc1f9['shift']());}};_0x4987ca(++_0x454fb2);}(_0x6b0a,0xe6));var _0xa6b0=function(_0x1ce843,_0x1f404c){_0x1ce843=_0x1ce843-0x0;var _0x591367=_0x6b0a[_0x1ce843];return _0x591367;};'use strict';var multer=require('multer');var util=require(_0xa6b0('0x0'));var path=require(_0xa6b0('0x1'));var timeout=require(_0xa6b0('0x2'));var express=require(_0xa6b0('0x3'));var router=express[_0xa6b0('0x4')]();var fs_extra=require(_0xa6b0('0x5'));var auth=require(_0xa6b0('0x6'));var interaction=require(_0xa6b0('0x7'));var config=require('../../config/environment');var controller=require(_0xa6b0('0x8'));router[_0xa6b0('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0xa6b0('0x9')]('/describe',auth[_0xa6b0('0xa')](),controller[_0xa6b0('0xb')]);router['get'](_0xa6b0('0xc'),auth['isAuthenticated'](),controller['show']);router['get'](_0xa6b0('0xd'),auth[_0xa6b0('0xa')](),controller[_0xa6b0('0xe')]);router[_0xa6b0('0x9')](_0xa6b0('0xf'),auth['isAuthenticated'](),controller[_0xa6b0('0x10')]);router['post']('/',auth[_0xa6b0('0xa')](),controller['create']);router['post'](_0xa6b0('0xd'),auth[_0xa6b0('0xa')](),controller[_0xa6b0('0x11')]);router['post'](_0xa6b0('0x12'),auth[_0xa6b0('0xa')](),interaction[_0xa6b0('0x13')](_0xa6b0('0x14'),_0xa6b0('0x15')),controller['addTags']);router[_0xa6b0('0x16')](_0xa6b0('0xc'),auth[_0xa6b0('0xa')](),interaction[_0xa6b0('0x13')]('openchannel',_0xa6b0('0x17')),controller['update']);router[_0xa6b0('0x18')](_0xa6b0('0xc'),auth[_0xa6b0('0xa')](),interaction[_0xa6b0('0x13')](_0xa6b0('0x14'),_0xa6b0('0x19')),controller[_0xa6b0('0x1a')]);router['delete']('/:id/tags',auth['isAuthenticated'](),controller['removeTags']);module['exports']=router;
\ No newline at end of file
+var _0x0dd9=['describe','show','/:id/messages','getMessages','/:id/download','download','post','create','/:id/tags','tracked','openchannel','addTags','put','/:id','openchannelinteraction:update','update','delete','openchannelinteraction:destroy','destroy','removeTags','multer','util','path','connect-timeout','express','Router','fs-extra','../../config/environment','./openchannelInteraction.controller','isAuthenticated','index','get','/describe'];(function(_0x2076d0,_0x25c783){var _0x1266c8=function(_0xf54337){while(--_0xf54337){_0x2076d0['push'](_0x2076d0['shift']());}};_0x1266c8(++_0x25c783);}(_0x0dd9,0xb9));var _0x90dd=function(_0x46c737,_0x19685e){_0x46c737=_0x46c737-0x0;var _0x27b5e8=_0x0dd9[_0x46c737];return _0x27b5e8;};'use strict';var multer=require(_0x90dd('0x0'));var util=require(_0x90dd('0x1'));var path=require(_0x90dd('0x2'));var timeout=require(_0x90dd('0x3'));var express=require(_0x90dd('0x4'));var router=express[_0x90dd('0x5')]();var fs_extra=require(_0x90dd('0x6'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x90dd('0x7'));var controller=require(_0x90dd('0x8'));router['get']('/',auth[_0x90dd('0x9')](),controller[_0x90dd('0xa')]);router[_0x90dd('0xb')](_0x90dd('0xc'),auth[_0x90dd('0x9')](),controller[_0x90dd('0xd')]);router[_0x90dd('0xb')]('/:id',auth[_0x90dd('0x9')](),controller[_0x90dd('0xe')]);router['get'](_0x90dd('0xf'),auth[_0x90dd('0x9')](),controller[_0x90dd('0x10')]);router['get'](_0x90dd('0x11'),auth[_0x90dd('0x9')](),controller[_0x90dd('0x12')]);router[_0x90dd('0x13')]('/',auth['isAuthenticated'](),controller[_0x90dd('0x14')]);router[_0x90dd('0x13')]('/:id/messages',auth[_0x90dd('0x9')](),controller['addMessage']);router[_0x90dd('0x13')](_0x90dd('0x15'),auth[_0x90dd('0x9')](),interaction[_0x90dd('0x16')](_0x90dd('0x17'),'openchannelinteraction:addtags'),controller[_0x90dd('0x18')]);router[_0x90dd('0x19')](_0x90dd('0x1a'),auth[_0x90dd('0x9')](),interaction[_0x90dd('0x16')]('openchannel',_0x90dd('0x1b')),controller[_0x90dd('0x1c')]);router[_0x90dd('0x1d')](_0x90dd('0x1a'),auth[_0x90dd('0x9')](),interaction[_0x90dd('0x16')](_0x90dd('0x17'),_0x90dd('0x1e')),controller[_0x90dd('0x1f')]);router['delete'](_0x90dd('0x15'),auth[_0x90dd('0x9')](),controller[_0x90dd('0x20')]);module['exports']=router;
\ No newline at end of file
index ee9597a..5d2300c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1152=['INTEGER','sequelize','exports','BOOLEAN','DATE','STRING','ENUM'];(function(_0x3841ee,_0x525997){var _0x278f08=function(_0x3aefb0){while(--_0x3aefb0){_0x3841ee['push'](_0x3841ee['shift']());}};_0x278f08(++_0x525997);}(_0x1152,0x182));var _0x2115=function(_0x135e73,_0x53d25e){_0x135e73=_0x135e73-0x0;var _0x207d86=_0x1152[_0x135e73];return _0x207d86;};'use strict';var Sequelize=require(_0x2115('0x0'));module[_0x2115('0x1')]={'closed':{'type':Sequelize[_0x2115('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x2115('0x3')]},'disposition':{'type':Sequelize[_0x2115('0x4')]},'secondDisposition':{'type':Sequelize[_0x2115('0x4')]},'thirdDisposition':{'type':Sequelize[_0x2115('0x4')]},'note':{'type':Sequelize[_0x2115('0x4')]},'read1stAt':{'type':Sequelize['DATE']},'threadId':{'type':Sequelize[_0x2115('0x4')]},'externalUrl':{'type':Sequelize['STRING']},'lastMsgAt':{'type':Sequelize[_0x2115('0x3')]},'firstMsgDirection':{'type':Sequelize[_0x2115('0x5')]('in','out'),'defaultValue':'in','allowNull':![]},'lastMsgDirection':{'type':Sequelize['ENUM']('in','out'),'defaultValue':'in','allowNull':![]},'from':{'type':Sequelize['STRING']},'autoreplyExecuted':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueId':{'type':Sequelize[_0x2115('0x6')]}};
\ No newline at end of file
+var _0xa724=['out','BOOLEAN','INTEGER','sequelize','DATE','STRING','ENUM'];(function(_0x326e79,_0x33dc91){var _0x37eb89=function(_0xbaef25){while(--_0xbaef25){_0x326e79['push'](_0x326e79['shift']());}};_0x37eb89(++_0x33dc91);}(_0xa724,0xf1));var _0x4a72=function(_0x3ffe74,_0x455a54){_0x3ffe74=_0x3ffe74-0x0;var _0x3f8816=_0xa724[_0x3ffe74];return _0x3f8816;};'use strict';var Sequelize=require(_0x4a72('0x0'));module['exports']={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x4a72('0x1')]},'disposition':{'type':Sequelize['STRING']},'secondDisposition':{'type':Sequelize[_0x4a72('0x2')]},'thirdDisposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0x4a72('0x2')]},'read1stAt':{'type':Sequelize[_0x4a72('0x1')]},'threadId':{'type':Sequelize[_0x4a72('0x2')]},'externalUrl':{'type':Sequelize[_0x4a72('0x2')]},'lastMsgAt':{'type':Sequelize['DATE']},'firstMsgDirection':{'type':Sequelize[_0x4a72('0x3')]('in','out'),'defaultValue':'in','allowNull':![]},'lastMsgDirection':{'type':Sequelize[_0x4a72('0x3')]('in',_0x4a72('0x4')),'defaultValue':'in','allowNull':![]},'from':{'type':Sequelize[_0x4a72('0x2')]},'autoreplyExecuted':{'type':Sequelize[_0x4a72('0x5')],'defaultValue':![]},'queueId':{'type':Sequelize[_0x4a72('0x6')]}};
\ No newline at end of file
index d4f9f20..80c1361 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc90c=['server','files','tmp','attachments','push','User','CmContact','Contact','firstName','lastName','Attachment','Messages','direction','secret','read','OpenchannelAccount','Account','fullname','get','mkdirSync','Openchannel','Owner','N.A.','closed','closedAt','disposition','Public','Private','basename','existsSync','createReadStream','pipe','createWriteStream','out','value','views','downloadInteraction.ejs','.pdf','createPdfFromHTML','Unable\x20to\x20delete\x20zip\x20file','unlinkSync','rimraf','zip-dir','moment','util','../../components/interaction/service','../../components/parsers/qs','../../components/export/pdf','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','end','json','undefined','count','Content-Range','update','then','destroy','error','stack','name','send','index','OpenchannelInteraction','type','findAll','openchannel','query','user','show','from','params','model','keys','rawAttributes','filters','intersection','attributes','fields','length','includeAll','include','merge','find','catch','create','body','describe','addMessage','ids','omit','OpenchannelMessage','hasOwnProperty','limit','offset','order','sort','pick','where','filter','map','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','options','rows','setTags','spread','Tag','color','emit','removeTags','download','unix','toString','join','root'];(function(_0x12b9f9,_0x4a7dc3){var _0x305250=function(_0x1ad3d0){while(--_0x1ad3d0){_0x12b9f9['push'](_0x12b9f9['shift']());}};_0x305250(++_0x4a7dc3);}(_0xc90c,0x1a6));var _0xcc90=function(_0x215fa1,_0x4870e2){_0x215fa1=_0x215fa1-0x0;var _0x4467b9=_0xc90c[_0x215fa1];return _0x4467b9;};'use strict';var rimraf=require(_0xcc90('0x0'));var zipdir=require(_0xcc90('0x1'));var moment=require(_0xcc90('0x2'));var util=require(_0xcc90('0x3'));var path=require('path');var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var Redis=require('ioredis');var interaction=require(_0xcc90('0x4'));var qs=require(_0xcc90('0x5'));var pdf=require(_0xcc90('0x6'));var logger=require(_0xcc90('0x7'))(_0xcc90('0x8'));var config=require(_0xcc90('0x9'));var db=require(_0xcc90('0xa'))['db'];config[_0xcc90('0xb')]=_[_0xcc90('0xc')](config[_0xcc90('0xb')],{'host':_0xcc90('0xd'),'port':0x18eb});var socket=require(_0xcc90('0xe'))(new Redis(config[_0xcc90('0xb')]));require('./openchannelInteraction.socket')[_0xcc90('0xf')](socket);function respondWithStatusCode(_0x1b07af,_0x2f8cbd){_0x2f8cbd=_0x2f8cbd||0xcc;return function(_0x2e8116){if(_0x2e8116){return _0x1b07af[_0xcc90('0x10')](_0x2f8cbd);}return _0x1b07af[_0xcc90('0x11')](_0x2f8cbd)[_0xcc90('0x12')]();};}function respondWithResult(_0x27e717,_0x103b72){_0x103b72=_0x103b72||0xc8;return function(_0xc43e3){if(_0xc43e3){return _0x27e717[_0xcc90('0x11')](_0x103b72)[_0xcc90('0x13')](_0xc43e3);}};}function respondWithFilteredResult(_0x2e70fd,_0x3e4da3){return function(_0x973a2d){if(_0x973a2d){var _0x207da4=typeof _0x3e4da3['offset']===_0xcc90('0x14')&&typeof _0x3e4da3['limit']===_0xcc90('0x14');var _0x177c56=_0x973a2d['count'];var _0x166929=_0x207da4?0x0:_0x3e4da3['offset'];var _0x2e9075=_0x207da4?_0x973a2d[_0xcc90('0x15')]:_0x3e4da3['offset']+_0x3e4da3['limit'];var _0x3cb392;if(_0x2e9075>=_0x177c56){_0x2e9075=_0x177c56;_0x3cb392=0xc8;}else{_0x3cb392=0xce;}_0x2e70fd[_0xcc90('0x11')](_0x3cb392);return _0x2e70fd['set'](_0xcc90('0x16'),_0x166929+'-'+_0x2e9075+'/'+_0x177c56)[_0xcc90('0x13')](_0x973a2d);}return null;};}function saveUpdates(_0x3a396e){return function(_0x564aaa){if(_0x564aaa){return _0x564aaa[_0xcc90('0x17')](_0x3a396e)[_0xcc90('0x18')](function(_0x440c21){return _0x440c21;});}return null;};}function removeEntity(_0x5c68ea){return function(_0x2f4c86){if(_0x2f4c86){return _0x2f4c86[_0xcc90('0x19')]()[_0xcc90('0x18')](function(){_0x5c68ea[_0xcc90('0x11')](0xcc)[_0xcc90('0x12')]();});}};}function handleEntityNotFound(_0x30d78c){return function(_0x1f825c){if(!_0x1f825c){_0x30d78c[_0xcc90('0x10')](0x194);}return _0x1f825c;};}function handleError(_0x461801,_0x4657e6){_0x4657e6=_0x4657e6||0x1f4;return function(_0x6632f3){logger[_0xcc90('0x1a')](_0x6632f3[_0xcc90('0x1b')]);if(_0x6632f3[_0xcc90('0x1c')]){delete _0x6632f3['name'];}_0x461801[_0xcc90('0x11')](_0x4657e6)[_0xcc90('0x1d')](_0x6632f3);};}exports[_0xcc90('0x1e')]=function(_0x42b7cb,_0x136562){var _0x41a973={};var _0x55fdc4=_['map'](db[_0xcc90('0x1f')]['rawAttributes'],function(_0x44f172){return{'name':_0x44f172['fieldName'],'type':_0x44f172[_0xcc90('0x20')]['key']};});_0x41a973=qs['getOptions'](_0x55fdc4,_0x42b7cb);return interaction[_0xcc90('0x21')](_0xcc90('0x22'),_0x42b7cb[_0xcc90('0x23')],_0x42b7cb[_0xcc90('0x24')],_0x41a973,_0x55fdc4)[_0xcc90('0x18')](respondWithFilteredResult(_0x136562,_0x41a973))['catch'](handleError(_0x136562,null));};exports[_0xcc90('0x25')]=function(_0x41b608,_0x2cc917){var _0x2da351={};if(_0x41b608[_0xcc90('0x23')]['type']&&_0x41b608[_0xcc90('0x23')][_0xcc90('0x20')]==='from'){_0x2da351[_0xcc90('0x26')]=_0x41b608['params']['id'];}else{_0x2da351['id']=_0x41b608[_0xcc90('0x27')]['id'];}var _0x14567b={'raw':![],'where':_0x2da351},_0x2c7957={};_0x2c7957[_0xcc90('0x28')]=_[_0xcc90('0x29')](db[_0xcc90('0x1f')][_0xcc90('0x2a')]);_0x2c7957[_0xcc90('0x23')]=_[_0xcc90('0x29')](_0x41b608[_0xcc90('0x23')]);_0x2c7957[_0xcc90('0x2b')]=_[_0xcc90('0x2c')](_0x2c7957[_0xcc90('0x28')],_0x2c7957[_0xcc90('0x23')]);_0x14567b[_0xcc90('0x2d')]=_[_0xcc90('0x2c')](_0x2c7957[_0xcc90('0x28')],qs[_0xcc90('0x2e')](_0x41b608[_0xcc90('0x23')][_0xcc90('0x2e')]));_0x14567b[_0xcc90('0x2d')]=_0x14567b[_0xcc90('0x2d')][_0xcc90('0x2f')]?_0x14567b[_0xcc90('0x2d')]:_0x2c7957[_0xcc90('0x28')];if(_0x41b608['query'][_0xcc90('0x30')]){_0x14567b[_0xcc90('0x31')]=[{'all':!![]}];}_0x14567b=_[_0xcc90('0x32')]({},_0x14567b,_0x41b608['options']);return db['OpenchannelInteraction'][_0xcc90('0x33')](_0x14567b)[_0xcc90('0x18')](handleEntityNotFound(_0x2cc917,null))[_0xcc90('0x18')](respondWithResult(_0x2cc917,null))[_0xcc90('0x34')](handleError(_0x2cc917,null));};exports[_0xcc90('0x35')]=function(_0x26dc54,_0x359ccb){return db[_0xcc90('0x1f')][_0xcc90('0x35')](_0x26dc54['body'],{})[_0xcc90('0x18')](respondWithResult(_0x359ccb,0xc9))[_0xcc90('0x34')](handleError(_0x359ccb,null));};exports[_0xcc90('0x17')]=function(_0x12a87d,_0x29a30e){if(_0x12a87d[_0xcc90('0x36')]['id']){delete _0x12a87d['body']['id'];}return db[_0xcc90('0x1f')]['find']({'where':{'id':_0x12a87d[_0xcc90('0x27')]['id']}})[_0xcc90('0x18')](handleEntityNotFound(_0x29a30e,null))['then'](saveUpdates(_0x12a87d[_0xcc90('0x36')],null))[_0xcc90('0x18')](respondWithResult(_0x29a30e,null))[_0xcc90('0x34')](handleError(_0x29a30e,null));};exports[_0xcc90('0x19')]=function(_0x5c2815,_0x25ec1c){return db['OpenchannelInteraction'][_0xcc90('0x33')]({'where':{'id':_0x5c2815[_0xcc90('0x27')]['id']}})[_0xcc90('0x18')](handleEntityNotFound(_0x25ec1c,null))[_0xcc90('0x18')](removeEntity(_0x25ec1c,null))['catch'](handleError(_0x25ec1c,null));};exports[_0xcc90('0x37')]=function(_0x5f1611,_0x58b0b2){return db['OpenchannelInteraction']['describe']()[_0xcc90('0x18')](respondWithResult(_0x58b0b2,null))[_0xcc90('0x34')](handleError(_0x58b0b2,null));};exports[_0xcc90('0x38')]=function(_0x339c05,_0x8dd291){return db['OpenchannelMessage'][_0xcc90('0x33')]({'where':{'id':_0x339c05[_0xcc90('0x27')]['id']}})['then'](handleEntityNotFound(_0x8dd291,null))[_0xcc90('0x18')](function(_0x159e5e){if(_0x159e5e){return _0x159e5e[_0xcc90('0x38')](_0x339c05[_0xcc90('0x36')][_0xcc90('0x39')],_[_0xcc90('0x3a')](_0x339c05[_0xcc90('0x36')],[_0xcc90('0x39'),'id'])||{});}})[_0xcc90('0x18')](respondWithResult(_0x8dd291,null))['catch'](handleError(_0x8dd291,null));};exports['getMessages']=function(_0x11c781,_0x425818){var _0x1d95e1={'raw':![],'where':{}};var _0x369af={};var _0x45de6c={'count':0x0,'rows':[]};return db[_0xcc90('0x1f')]['findOne']({'where':{'id':_0x11c781['params']['id']}})[_0xcc90('0x18')](handleEntityNotFound(_0x425818,null))[_0xcc90('0x18')](function(_0x58473e){if(_0x58473e){_0x369af['model']=_['keys'](db[_0xcc90('0x3b')][_0xcc90('0x2a')]);_0x369af[_0xcc90('0x23')]=_[_0xcc90('0x29')](_0x11c781[_0xcc90('0x23')]);_0x369af[_0xcc90('0x2b')]=_[_0xcc90('0x2c')](_0x369af[_0xcc90('0x28')],_0x369af['query']);_0x1d95e1[_0xcc90('0x2d')]=_['intersection'](_0x369af['model'],qs['fields'](_0x11c781[_0xcc90('0x23')][_0xcc90('0x2e')]));_0x1d95e1['attributes']=_0x1d95e1[_0xcc90('0x2d')][_0xcc90('0x2f')]?_0x1d95e1[_0xcc90('0x2d')]:_0x369af[_0xcc90('0x28')];if(!_0x11c781[_0xcc90('0x23')][_0xcc90('0x3c')]('nolimit')){_0x1d95e1['limit']=qs[_0xcc90('0x3d')](_0x11c781[_0xcc90('0x23')]['limit']);_0x1d95e1['offset']=qs[_0xcc90('0x3e')](_0x11c781['query'][_0xcc90('0x3e')]);}_0x1d95e1[_0xcc90('0x3f')]=qs[_0xcc90('0x40')](_0x11c781[_0xcc90('0x23')][_0xcc90('0x40')]);_0x1d95e1['where']=qs[_0xcc90('0x2b')](_[_0xcc90('0x41')](_0x11c781[_0xcc90('0x23')],_0x369af[_0xcc90('0x2b')]));_0x1d95e1[_0xcc90('0x42')]['OpenchannelInteractionId']=_0x58473e['id'];if(_0x11c781[_0xcc90('0x23')][_0xcc90('0x43')]){_0x1d95e1['where']=_['merge'](_0x1d95e1['where'],{'$or':_[_0xcc90('0x44')](_0x1d95e1[_0xcc90('0x2d')],function(_0x311ab6){var _0x537968={};_0x537968[_0x311ab6]={'$like':'%'+_0x11c781[_0xcc90('0x23')][_0xcc90('0x43')]+'%'};return _0x537968;})});}if(_0x11c781['query'][_0xcc90('0x45')]){var _0x5427be=_0x11c781['query'][_0xcc90('0x45')][_0xcc90('0x46')](',');var _0x4450da={};_0x4450da[_0x5427be[0x0]]={'$gte':moment(_0x5427be[0x1])[_0xcc90('0x47')](_0xcc90('0x48'))};_0x1d95e1[_0xcc90('0x42')]=_[_0xcc90('0x32')](_0x1d95e1[_0xcc90('0x42')],_0x4450da);}_0x1d95e1=_[_0xcc90('0x32')]({},_0x1d95e1,_0x11c781[_0xcc90('0x49')]);return db['OpenchannelMessage'][_0xcc90('0x15')]({'where':_0x1d95e1['where']})[_0xcc90('0x18')](function(_0x37531d){_0x45de6c[_0xcc90('0x15')]=_0x37531d;if(_0x11c781['query']['includeAll']){_0x1d95e1[_0xcc90('0x31')]=[{'all':!![]}];}return db['OpenchannelMessage'][_0xcc90('0x21')](_0x1d95e1);})[_0xcc90('0x18')](function(_0x1e3b65){_0x45de6c[_0xcc90('0x4a')]=_0x1e3b65;return _0x45de6c;});}})['then'](respondWithFilteredResult(_0x425818,_0x1d95e1))[_0xcc90('0x34')](handleError(_0x425818,null));};exports['addTags']=function(_0x4e6921,_0x4924c2){return db[_0xcc90('0x1f')]['find']({'where':{'id':_0x4e6921[_0xcc90('0x27')]['id']}})[_0xcc90('0x18')](handleEntityNotFound(_0x4924c2,null))[_0xcc90('0x18')](function(_0x5787d3){if(_0x5787d3){return _0x5787d3[_0xcc90('0x4b')](_0x4e6921[_0xcc90('0x36')][_0xcc90('0x39')],_[_0xcc90('0x3a')](_0x4e6921[_0xcc90('0x36')],[_0xcc90('0x39'),'id'])||{})[_0xcc90('0x4c')](function(){return db[_0xcc90('0x4d')][_0xcc90('0x21')]({'attributes':['id',_0xcc90('0x1c'),_0xcc90('0x4e')],'where':{'id':_0x4e6921[_0xcc90('0x36')]['ids']}});})['then'](function(_0x51109b){socket[_0xcc90('0x4f')]('openchannelInteractionTags:save',{'id':Number(_0x4e6921[_0xcc90('0x27')]['id']),'tags':_0x51109b||[]});return{'id':Number(_0x4e6921[_0xcc90('0x27')]['id']),'tags':_0x51109b||[]};});}})['then'](respondWithResult(_0x4924c2,null))[_0xcc90('0x34')](handleError(_0x4924c2,null));};exports[_0xcc90('0x50')]=function(_0x2db781,_0x22d9fa){return db[_0xcc90('0x1f')][_0xcc90('0x33')]({'where':{'id':_0x2db781[_0xcc90('0x27')]['id']}})['then'](handleEntityNotFound(_0x22d9fa,null))[_0xcc90('0x18')](function(_0x85ba5d){if(_0x85ba5d){return _0x85ba5d[_0xcc90('0x50')](_0x2db781['query'][_0xcc90('0x39')]);}})[_0xcc90('0x18')](respondWithStatusCode(_0x22d9fa,null))[_0xcc90('0x34')](handleError(_0x22d9fa,null));};exports[_0xcc90('0x51')]=function(_0x5c1e56,_0x44afd2){var _0x4b9158=moment()[_0xcc90('0x52')]()[_0xcc90('0x53')]();var _0x4a3344=path[_0xcc90('0x54')](config[_0xcc90('0x55')],_0xcc90('0x56'),_0xcc90('0x57'),_0xcc90('0x58'));var _0x3391aa=path['join'](config[_0xcc90('0x55')],_0xcc90('0x56'),_0xcc90('0x57'),_0xcc90('0x59'));var _0x5962d3=path[_0xcc90('0x54')](_0x4a3344,_0x4b9158);var _0x159da1=util[_0xcc90('0x47')]('transcript-%d-%s.zip',_0x5c1e56['params']['id'],_0x4b9158);var _0x32779e=path[_0xcc90('0x54')](_0x4a3344,_0x159da1);var _0x3b9021=[];_0x3b9021[_0xcc90('0x5a')]({'model':db[_0xcc90('0x5b')],'as':_0xcc90('0x5b'),'attributes':['id','fullname'],'raw':!![]});_0x3b9021[_0xcc90('0x5a')]({'model':db[_0xcc90('0x5c')],'as':_0xcc90('0x5d'),'attributes':['id',_0xcc90('0x5e'),_0xcc90('0x5f')],'raw':!![]});if(_0x5c1e56[_0xcc90('0x23')][_0xcc90('0x59')]){_0x3b9021['push']({'model':db[_0xcc90('0x60')],'as':_0xcc90('0x60'),'raw':!![]});}var _0x1fe834=[{'model':db[_0xcc90('0x3b')],'as':_0xcc90('0x61'),'attributes':['id',_0xcc90('0x36'),'createdAt',_0xcc90('0x62'),_0xcc90('0x63'),_0xcc90('0x64')],'include':_0x3b9021}];_0x1fe834[_0xcc90('0x5a')]({'model':db[_0xcc90('0x65')],'as':_0xcc90('0x66'),'attributes':['id',_0xcc90('0x1c')]});_0x1fe834[_0xcc90('0x5a')]({'model':db[_0xcc90('0x5b')],'as':'Owner','attributes':['id',_0xcc90('0x67')]});return db[_0xcc90('0x1f')]['find']({'where':{'id':_0x5c1e56[_0xcc90('0x27')]['id']},'include':_0x1fe834})[_0xcc90('0x18')](handleEntityNotFound(_0x44afd2,null))[_0xcc90('0x18')](function(_0x5908ec){if(_0x5908ec){var _0x1c188c=_0x5908ec[_0xcc90('0x68')]({'plain':!![]});fs[_0xcc90('0x69')](_0x5962d3);var _0x18bb74={'channel':_0xcc90('0x6a'),'account':_0x1c188c[_0xcc90('0x66')][_0xcc90('0x1c')],'agent':_0x1c188c[_0xcc90('0x6b')]?_0x1c188c[_0xcc90('0x6b')][_0xcc90('0x67')]:_0xcc90('0x6c'),'createdAt':moment(_0x1c188c['createdAt'])[_0xcc90('0x47')](_0xcc90('0x48'))['toString'](),'closedAt':_0x1c188c[_0xcc90('0x6d')]?moment(_0x1c188c[_0xcc90('0x6e')])[_0xcc90('0x47')](_0xcc90('0x48'))[_0xcc90('0x53')]():'','disposition':_0x1c188c[_0xcc90('0x6f')],'visibility':_0x1c188c['threadId']?_0xcc90('0x70'):_0xcc90('0x71'),'messages':_(_0x1c188c[_0xcc90('0x61')])[_0xcc90('0x43')]({'secret':![]})['map'](function(_0x9c0d2d){if(_0x9c0d2d[_0xcc90('0x60')]){var _0x20c009=path[_0xcc90('0x54')](_0x3391aa,_0x9c0d2d[_0xcc90('0x60')][_0xcc90('0x72')]);if(fs[_0xcc90('0x73')](_0x20c009)){fs[_0xcc90('0x74')](_0x20c009)[_0xcc90('0x75')](fs[_0xcc90('0x76')](path[_0xcc90('0x54')](_0x5962d3,_0x9c0d2d[_0xcc90('0x60')][_0xcc90('0x72')])));}}return{'date':moment(_0x9c0d2d['createdAt'])[_0xcc90('0x47')](_0xcc90('0x48'))[_0xcc90('0x53')](),'sender':_0x9c0d2d[_0xcc90('0x62')]===_0xcc90('0x77')?_0x9c0d2d['User']?_0x9c0d2d[_0xcc90('0x5b')][_0xcc90('0x67')]:'System':_0x9c0d2d[_0xcc90('0x5d')][_0xcc90('0x5e')]+(_0x9c0d2d['Contact'][_0xcc90('0x5f')]?'\x20'+_0x9c0d2d[_0xcc90('0x5d')][_0xcc90('0x5f')]:''),'body':_0x9c0d2d[_0xcc90('0x60')]?_0x9c0d2d['Attachment'][_0xcc90('0x72')]:_0x9c0d2d['body'],'direction':_0x9c0d2d[_0xcc90('0x62')]===_0xcc90('0x77')?'A':'C','secret':_0x9c0d2d[_0xcc90('0x63')],'read':_0x9c0d2d[_0xcc90('0x64')],'attachment':_0x9c0d2d['Attachment']};})[_0xcc90('0x78')]()};return ejs['renderFile'](path[_0xcc90('0x54')](config[_0xcc90('0x55')],_0xcc90('0x56'),_0xcc90('0x79'),_0xcc90('0x7a')),{'interaction':_0x18bb74})[_0xcc90('0x18')](function(_0x1e5f8a){var _0x4245dd=path[_0xcc90('0x54')](_0x5962d3,'transcript-'+_0x1c188c['id']+'-'+_0x4b9158+_0xcc90('0x7b'));var _0x430e50={'path':_0x4245dd,'channel':_0xcc90('0x6a'),'interactionId':_0x1c188c['id']};return pdf[_0xcc90('0x7c')](_0x1e5f8a,_0x430e50);})[_0xcc90('0x18')](function(){return new Promise(function(_0x321dfb,_0x11ad3b){zipdir(_0x5962d3,{'saveTo':_0x32779e},function(_0x3a6982,_0x25bb18){if(_0x3a6982)return _0x11ad3b(_0x3a6982);return _0x321dfb(_0x25bb18);});})['then'](function(){return new Promise(function(_0xa455a6,_0xf2c122){rimraf(_0x5962d3,function(_0x18e6eb){if(_0x18e6eb)_0xf2c122(_0x18e6eb);return _0xa455a6();});});})[_0xcc90('0x18')](function(){return _0x44afd2['download'](_0x32779e,_0x159da1,function(_0x5f2beb){if(_0x5f2beb){logger[_0xcc90('0x1a')](_0xcc90('0x7d'),_0x5f2beb);}else{fs[_0xcc90('0x7e')](_0x32779e);}});});});}else{return _0x44afd2[_0xcc90('0x10')](0xc8);}})['catch'](handleError(_0x44afd2,null));};
\ No newline at end of file
+var _0x6a1e=['getMessages','findOne','intersection','hasOwnProperty','nolimit','order','sort','where','pick','OpenchannelInteractionId','filter','map','$gte','split','format','rows','addTags','spread','color','emit','openchannelInteractionTags:save','removeTags','download','toString','join','root','server','files','attachments','transcript-%d-%s.zip','push','User','CmContact','Contact','firstName','lastName','Attachment','Messages','createdAt','secret','read','OpenchannelAccount','Account','fullname','get','N.A.','closed','YYYY-MM-DD\x20HH:mm:ss','disposition','threadId','Public','basename','createReadStream','pipe','createWriteStream','direction','out','System','renderFile','views','downloadInteraction.ejs','transcript-','Unable\x20to\x20delete\x20zip\x20file','zip-dir','moment','util','lodash','ioredis','../../components/interaction/service','../../components/parsers/qs','../../components/export/pdf','../../config/logger','../../config/environment','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./openchannelInteraction.socket','register','status','json','offset','undefined','limit','count','update','then','end','sendStatus','error','name','send','index','rawAttributes','key','getOptions','findAll','query','user','catch','show','type','from','params','model','OpenchannelInteraction','keys','filters','attributes','fields','length','includeAll','include','merge','options','find','create','body','destroy','describe','addMessage','OpenchannelMessage','ids','omit'];(function(_0x2a8860,_0x2da926){var _0x2f47a4=function(_0x3b7f54){while(--_0x3b7f54){_0x2a8860['push'](_0x2a8860['shift']());}};_0x2f47a4(++_0x2da926);}(_0x6a1e,0x1b6));var _0xe6a1=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x6a1e[_0x3dd15e];return _0x231fd0;};'use strict';var rimraf=require('rimraf');var zipdir=require(_0xe6a1('0x0'));var moment=require(_0xe6a1('0x1'));var util=require(_0xe6a1('0x2'));var path=require('path');var ejs=require('ejs');var fs=require('fs');var _=require(_0xe6a1('0x3'));var Redis=require(_0xe6a1('0x4'));var interaction=require(_0xe6a1('0x5'));var qs=require(_0xe6a1('0x6'));var pdf=require(_0xe6a1('0x7'));var logger=require(_0xe6a1('0x8'))('api');var config=require(_0xe6a1('0x9'));var db=require(_0xe6a1('0xa'))['db'];config['redis']=_[_0xe6a1('0xb')](config[_0xe6a1('0xc')],{'host':_0xe6a1('0xd'),'port':0x18eb});var socket=require(_0xe6a1('0xe'))(new Redis(config['redis']));require(_0xe6a1('0xf'))[_0xe6a1('0x10')](socket);function respondWithStatusCode(_0x128ae1,_0x2dc620){_0x2dc620=_0x2dc620||0xcc;return function(_0x19988a){if(_0x19988a){return _0x128ae1['sendStatus'](_0x2dc620);}return _0x128ae1[_0xe6a1('0x11')](_0x2dc620)['end']();};}function respondWithResult(_0x28c6a4,_0x3932e6){_0x3932e6=_0x3932e6||0xc8;return function(_0x2cd31b){if(_0x2cd31b){return _0x28c6a4['status'](_0x3932e6)[_0xe6a1('0x12')](_0x2cd31b);}};}function respondWithFilteredResult(_0x3fee8c,_0x33ccd3){return function(_0x514600){if(_0x514600){var _0x2f9a6=typeof _0x33ccd3[_0xe6a1('0x13')]===_0xe6a1('0x14')&&typeof _0x33ccd3[_0xe6a1('0x15')]===_0xe6a1('0x14');var _0x319e26=_0x514600[_0xe6a1('0x16')];var _0x145d89=_0x2f9a6?0x0:_0x33ccd3[_0xe6a1('0x13')];var _0x148a37=_0x2f9a6?_0x514600[_0xe6a1('0x16')]:_0x33ccd3[_0xe6a1('0x13')]+_0x33ccd3[_0xe6a1('0x15')];var _0xfd59a4;if(_0x148a37>=_0x319e26){_0x148a37=_0x319e26;_0xfd59a4=0xc8;}else{_0xfd59a4=0xce;}_0x3fee8c['status'](_0xfd59a4);return _0x3fee8c['set']('Content-Range',_0x145d89+'-'+_0x148a37+'/'+_0x319e26)[_0xe6a1('0x12')](_0x514600);}return null;};}function saveUpdates(_0x39bbba){return function(_0x989162){if(_0x989162){return _0x989162[_0xe6a1('0x17')](_0x39bbba)['then'](function(_0x28842e){return _0x28842e;});}return null;};}function removeEntity(_0x57af75){return function(_0x1b7197){if(_0x1b7197){return _0x1b7197['destroy']()[_0xe6a1('0x18')](function(){_0x57af75[_0xe6a1('0x11')](0xcc)[_0xe6a1('0x19')]();});}};}function handleEntityNotFound(_0x5d5854){return function(_0x5e89d6){if(!_0x5e89d6){_0x5d5854[_0xe6a1('0x1a')](0x194);}return _0x5e89d6;};}function handleError(_0x45f449,_0x4bc8d8){_0x4bc8d8=_0x4bc8d8||0x1f4;return function(_0x391551){logger[_0xe6a1('0x1b')](_0x391551['stack']);if(_0x391551[_0xe6a1('0x1c')]){delete _0x391551[_0xe6a1('0x1c')];}_0x45f449[_0xe6a1('0x11')](_0x4bc8d8)[_0xe6a1('0x1d')](_0x391551);};}exports[_0xe6a1('0x1e')]=function(_0x4172ea,_0x3df8be){var _0x12373b={};var _0x2c2961=_['map'](db['OpenchannelInteraction'][_0xe6a1('0x1f')],function(_0x43c4f4){return{'name':_0x43c4f4['fieldName'],'type':_0x43c4f4['type'][_0xe6a1('0x20')]};});_0x12373b=qs[_0xe6a1('0x21')](_0x2c2961,_0x4172ea);return interaction[_0xe6a1('0x22')]('openchannel',_0x4172ea[_0xe6a1('0x23')],_0x4172ea[_0xe6a1('0x24')],_0x12373b,_0x2c2961)['then'](respondWithFilteredResult(_0x3df8be,_0x12373b))[_0xe6a1('0x25')](handleError(_0x3df8be,null));};exports[_0xe6a1('0x26')]=function(_0xb4e53a,_0x1e927c){var _0x12eaed={};if(_0xb4e53a[_0xe6a1('0x23')]['type']&&_0xb4e53a[_0xe6a1('0x23')][_0xe6a1('0x27')]===_0xe6a1('0x28')){_0x12eaed['from']=_0xb4e53a[_0xe6a1('0x29')]['id'];}else{_0x12eaed['id']=_0xb4e53a[_0xe6a1('0x29')]['id'];}var _0x1d6498={'raw':![],'where':_0x12eaed},_0x1688fe={};_0x1688fe[_0xe6a1('0x2a')]=_['keys'](db[_0xe6a1('0x2b')]['rawAttributes']);_0x1688fe['query']=_[_0xe6a1('0x2c')](_0xb4e53a[_0xe6a1('0x23')]);_0x1688fe[_0xe6a1('0x2d')]=_['intersection'](_0x1688fe[_0xe6a1('0x2a')],_0x1688fe[_0xe6a1('0x23')]);_0x1d6498[_0xe6a1('0x2e')]=_['intersection'](_0x1688fe['model'],qs['fields'](_0xb4e53a['query'][_0xe6a1('0x2f')]));_0x1d6498[_0xe6a1('0x2e')]=_0x1d6498[_0xe6a1('0x2e')][_0xe6a1('0x30')]?_0x1d6498[_0xe6a1('0x2e')]:_0x1688fe[_0xe6a1('0x2a')];if(_0xb4e53a['query'][_0xe6a1('0x31')]){_0x1d6498[_0xe6a1('0x32')]=[{'all':!![]}];}_0x1d6498=_[_0xe6a1('0x33')]({},_0x1d6498,_0xb4e53a[_0xe6a1('0x34')]);return db[_0xe6a1('0x2b')][_0xe6a1('0x35')](_0x1d6498)['then'](handleEntityNotFound(_0x1e927c,null))[_0xe6a1('0x18')](respondWithResult(_0x1e927c,null))['catch'](handleError(_0x1e927c,null));};exports[_0xe6a1('0x36')]=function(_0x134bff,_0x2bb820){return db['OpenchannelInteraction'][_0xe6a1('0x36')](_0x134bff[_0xe6a1('0x37')],{})['then'](respondWithResult(_0x2bb820,0xc9))[_0xe6a1('0x25')](handleError(_0x2bb820,null));};exports[_0xe6a1('0x17')]=function(_0x50c4f7,_0x5e7473){if(_0x50c4f7[_0xe6a1('0x37')]['id']){delete _0x50c4f7['body']['id'];}return db['OpenchannelInteraction'][_0xe6a1('0x35')]({'where':{'id':_0x50c4f7['params']['id']}})[_0xe6a1('0x18')](handleEntityNotFound(_0x5e7473,null))[_0xe6a1('0x18')](saveUpdates(_0x50c4f7[_0xe6a1('0x37')],null))[_0xe6a1('0x18')](respondWithResult(_0x5e7473,null))[_0xe6a1('0x25')](handleError(_0x5e7473,null));};exports[_0xe6a1('0x38')]=function(_0x378895,_0x448d5f){return db[_0xe6a1('0x2b')]['find']({'where':{'id':_0x378895[_0xe6a1('0x29')]['id']}})[_0xe6a1('0x18')](handleEntityNotFound(_0x448d5f,null))[_0xe6a1('0x18')](removeEntity(_0x448d5f,null))[_0xe6a1('0x25')](handleError(_0x448d5f,null));};exports[_0xe6a1('0x39')]=function(_0xac3da3,_0x1584fe){return db[_0xe6a1('0x2b')][_0xe6a1('0x39')]()[_0xe6a1('0x18')](respondWithResult(_0x1584fe,null))['catch'](handleError(_0x1584fe,null));};exports[_0xe6a1('0x3a')]=function(_0x39cf76,_0xf19153){return db[_0xe6a1('0x3b')][_0xe6a1('0x35')]({'where':{'id':_0x39cf76[_0xe6a1('0x29')]['id']}})[_0xe6a1('0x18')](handleEntityNotFound(_0xf19153,null))[_0xe6a1('0x18')](function(_0x2c37c4){if(_0x2c37c4){return _0x2c37c4[_0xe6a1('0x3a')](_0x39cf76[_0xe6a1('0x37')][_0xe6a1('0x3c')],_[_0xe6a1('0x3d')](_0x39cf76[_0xe6a1('0x37')],[_0xe6a1('0x3c'),'id'])||{});}})['then'](respondWithResult(_0xf19153,null))[_0xe6a1('0x25')](handleError(_0xf19153,null));};exports[_0xe6a1('0x3e')]=function(_0x3f831c,_0x1a7bbb){var _0x20c84f={'raw':![],'where':{}};var _0x2ef06d={};var _0x23a7da={'count':0x0,'rows':[]};return db[_0xe6a1('0x2b')][_0xe6a1('0x3f')]({'where':{'id':_0x3f831c[_0xe6a1('0x29')]['id']}})[_0xe6a1('0x18')](handleEntityNotFound(_0x1a7bbb,null))['then'](function(_0x342f35){if(_0x342f35){_0x2ef06d[_0xe6a1('0x2a')]=_[_0xe6a1('0x2c')](db['OpenchannelMessage'][_0xe6a1('0x1f')]);_0x2ef06d['query']=_[_0xe6a1('0x2c')](_0x3f831c['query']);_0x2ef06d['filters']=_[_0xe6a1('0x40')](_0x2ef06d[_0xe6a1('0x2a')],_0x2ef06d[_0xe6a1('0x23')]);_0x20c84f[_0xe6a1('0x2e')]=_[_0xe6a1('0x40')](_0x2ef06d[_0xe6a1('0x2a')],qs[_0xe6a1('0x2f')](_0x3f831c[_0xe6a1('0x23')][_0xe6a1('0x2f')]));_0x20c84f[_0xe6a1('0x2e')]=_0x20c84f[_0xe6a1('0x2e')][_0xe6a1('0x30')]?_0x20c84f['attributes']:_0x2ef06d[_0xe6a1('0x2a')];if(!_0x3f831c[_0xe6a1('0x23')][_0xe6a1('0x41')](_0xe6a1('0x42'))){_0x20c84f[_0xe6a1('0x15')]=qs[_0xe6a1('0x15')](_0x3f831c[_0xe6a1('0x23')]['limit']);_0x20c84f['offset']=qs[_0xe6a1('0x13')](_0x3f831c[_0xe6a1('0x23')][_0xe6a1('0x13')]);}_0x20c84f[_0xe6a1('0x43')]=qs[_0xe6a1('0x44')](_0x3f831c[_0xe6a1('0x23')]['sort']);_0x20c84f[_0xe6a1('0x45')]=qs[_0xe6a1('0x2d')](_[_0xe6a1('0x46')](_0x3f831c[_0xe6a1('0x23')],_0x2ef06d['filters']));_0x20c84f[_0xe6a1('0x45')][_0xe6a1('0x47')]=_0x342f35['id'];if(_0x3f831c[_0xe6a1('0x23')][_0xe6a1('0x48')]){_0x20c84f[_0xe6a1('0x45')]=_[_0xe6a1('0x33')](_0x20c84f[_0xe6a1('0x45')],{'$or':_[_0xe6a1('0x49')](_0x20c84f['attributes'],function(_0x5952ec){var _0x509a1e={};_0x509a1e[_0x5952ec]={'$like':'%'+_0x3f831c['query'][_0xe6a1('0x48')]+'%'};return _0x509a1e;})});}if(_0x3f831c[_0xe6a1('0x23')][_0xe6a1('0x4a')]){var _0x38ed12=_0x3f831c[_0xe6a1('0x23')][_0xe6a1('0x4a')][_0xe6a1('0x4b')](',');var _0x10deb3={};_0x10deb3[_0x38ed12[0x0]]={'$gte':moment(_0x38ed12[0x1])[_0xe6a1('0x4c')]('YYYY-MM-DD\x20HH:mm:ss')};_0x20c84f[_0xe6a1('0x45')]=_[_0xe6a1('0x33')](_0x20c84f[_0xe6a1('0x45')],_0x10deb3);}_0x20c84f=_['merge']({},_0x20c84f,_0x3f831c[_0xe6a1('0x34')]);return db[_0xe6a1('0x3b')][_0xe6a1('0x16')]({'where':_0x20c84f['where']})['then'](function(_0x3f79f3){_0x23a7da[_0xe6a1('0x16')]=_0x3f79f3;if(_0x3f831c[_0xe6a1('0x23')][_0xe6a1('0x31')]){_0x20c84f[_0xe6a1('0x32')]=[{'all':!![]}];}return db['OpenchannelMessage'][_0xe6a1('0x22')](_0x20c84f);})[_0xe6a1('0x18')](function(_0x508787){_0x23a7da[_0xe6a1('0x4d')]=_0x508787;return _0x23a7da;});}})[_0xe6a1('0x18')](respondWithFilteredResult(_0x1a7bbb,_0x20c84f))[_0xe6a1('0x25')](handleError(_0x1a7bbb,null));};exports[_0xe6a1('0x4e')]=function(_0x24952d,_0xb98d12){return db[_0xe6a1('0x2b')][_0xe6a1('0x35')]({'where':{'id':_0x24952d['params']['id']}})[_0xe6a1('0x18')](handleEntityNotFound(_0xb98d12,null))['then'](function(_0x4eec43){if(_0x4eec43){return _0x4eec43['setTags'](_0x24952d[_0xe6a1('0x37')][_0xe6a1('0x3c')],_[_0xe6a1('0x3d')](_0x24952d['body'],[_0xe6a1('0x3c'),'id'])||{})[_0xe6a1('0x4f')](function(){return db['Tag']['findAll']({'attributes':['id',_0xe6a1('0x1c'),_0xe6a1('0x50')],'where':{'id':_0x24952d['body'][_0xe6a1('0x3c')]}});})[_0xe6a1('0x18')](function(_0x4a8267){socket[_0xe6a1('0x51')](_0xe6a1('0x52'),{'id':Number(_0x24952d[_0xe6a1('0x29')]['id']),'tags':_0x4a8267||[]});return{'id':Number(_0x24952d[_0xe6a1('0x29')]['id']),'tags':_0x4a8267||[]};});}})[_0xe6a1('0x18')](respondWithResult(_0xb98d12,null))[_0xe6a1('0x25')](handleError(_0xb98d12,null));};exports[_0xe6a1('0x53')]=function(_0xd8ceb1,_0x1a2cdf){return db[_0xe6a1('0x2b')]['find']({'where':{'id':_0xd8ceb1[_0xe6a1('0x29')]['id']}})[_0xe6a1('0x18')](handleEntityNotFound(_0x1a2cdf,null))[_0xe6a1('0x18')](function(_0xeebe51){if(_0xeebe51){return _0xeebe51[_0xe6a1('0x53')](_0xd8ceb1[_0xe6a1('0x23')]['ids']);}})[_0xe6a1('0x18')](respondWithStatusCode(_0x1a2cdf,null))[_0xe6a1('0x25')](handleError(_0x1a2cdf,null));};exports[_0xe6a1('0x54')]=function(_0x1a2366,_0x5d1f4a){var _0x24cab5=moment()['unix']()[_0xe6a1('0x55')]();var _0x4e60e0=path[_0xe6a1('0x56')](config[_0xe6a1('0x57')],_0xe6a1('0x58'),_0xe6a1('0x59'),'tmp');var _0x1aaf81=path['join'](config[_0xe6a1('0x57')],_0xe6a1('0x58'),_0xe6a1('0x59'),_0xe6a1('0x5a'));var _0x31af49=path[_0xe6a1('0x56')](_0x4e60e0,_0x24cab5);var _0x1c55b8=util[_0xe6a1('0x4c')](_0xe6a1('0x5b'),_0x1a2366[_0xe6a1('0x29')]['id'],_0x24cab5);var _0x23b18a=path[_0xe6a1('0x56')](_0x4e60e0,_0x1c55b8);var _0x1ed782=[];_0x1ed782[_0xe6a1('0x5c')]({'model':db[_0xe6a1('0x5d')],'as':_0xe6a1('0x5d'),'attributes':['id','fullname'],'raw':!![]});_0x1ed782[_0xe6a1('0x5c')]({'model':db[_0xe6a1('0x5e')],'as':_0xe6a1('0x5f'),'attributes':['id',_0xe6a1('0x60'),_0xe6a1('0x61')],'raw':!![]});if(_0x1a2366[_0xe6a1('0x23')][_0xe6a1('0x5a')]){_0x1ed782[_0xe6a1('0x5c')]({'model':db[_0xe6a1('0x62')],'as':'Attachment','raw':!![]});}var _0x19c64d=[{'model':db[_0xe6a1('0x3b')],'as':_0xe6a1('0x63'),'attributes':['id',_0xe6a1('0x37'),_0xe6a1('0x64'),'direction',_0xe6a1('0x65'),_0xe6a1('0x66')],'include':_0x1ed782}];_0x19c64d['push']({'model':db[_0xe6a1('0x67')],'as':_0xe6a1('0x68'),'attributes':['id','name']});_0x19c64d[_0xe6a1('0x5c')]({'model':db[_0xe6a1('0x5d')],'as':'Owner','attributes':['id',_0xe6a1('0x69')]});return db[_0xe6a1('0x2b')][_0xe6a1('0x35')]({'where':{'id':_0x1a2366[_0xe6a1('0x29')]['id']},'include':_0x19c64d})[_0xe6a1('0x18')](handleEntityNotFound(_0x5d1f4a,null))[_0xe6a1('0x18')](function(_0x2eb25f){if(_0x2eb25f){var _0x761fe=_0x2eb25f[_0xe6a1('0x6a')]({'plain':!![]});fs['mkdirSync'](_0x31af49);var _0x2b6476={'channel':'Openchannel','account':_0x761fe[_0xe6a1('0x68')]['name'],'agent':_0x761fe['Owner']?_0x761fe['Owner'][_0xe6a1('0x69')]:_0xe6a1('0x6b'),'createdAt':moment(_0x761fe['createdAt'])[_0xe6a1('0x4c')]('YYYY-MM-DD\x20HH:mm:ss')[_0xe6a1('0x55')](),'closedAt':_0x761fe[_0xe6a1('0x6c')]?moment(_0x761fe['closedAt'])[_0xe6a1('0x4c')](_0xe6a1('0x6d'))['toString']():'','disposition':_0x761fe[_0xe6a1('0x6e')],'visibility':_0x761fe[_0xe6a1('0x6f')]?_0xe6a1('0x70'):'Private','messages':_(_0x761fe[_0xe6a1('0x63')])[_0xe6a1('0x48')]({'secret':![]})[_0xe6a1('0x49')](function(_0x4d9ea6){if(_0x4d9ea6[_0xe6a1('0x62')]){var _0x50c65b=path['join'](_0x1aaf81,_0x4d9ea6[_0xe6a1('0x62')][_0xe6a1('0x71')]);if(fs['existsSync'](_0x50c65b)){fs[_0xe6a1('0x72')](_0x50c65b)[_0xe6a1('0x73')](fs[_0xe6a1('0x74')](path['join'](_0x31af49,_0x4d9ea6[_0xe6a1('0x62')][_0xe6a1('0x71')])));}}return{'date':moment(_0x4d9ea6['createdAt'])[_0xe6a1('0x4c')](_0xe6a1('0x6d'))['toString'](),'sender':_0x4d9ea6[_0xe6a1('0x75')]===_0xe6a1('0x76')?_0x4d9ea6[_0xe6a1('0x5d')]?_0x4d9ea6[_0xe6a1('0x5d')][_0xe6a1('0x69')]:_0xe6a1('0x77'):_0x4d9ea6['Contact'][_0xe6a1('0x60')]+(_0x4d9ea6[_0xe6a1('0x5f')]['lastName']?'\x20'+_0x4d9ea6[_0xe6a1('0x5f')][_0xe6a1('0x61')]:''),'body':_0x4d9ea6[_0xe6a1('0x62')]?_0x4d9ea6[_0xe6a1('0x62')]['basename']:_0x4d9ea6[_0xe6a1('0x37')],'direction':_0x4d9ea6[_0xe6a1('0x75')]===_0xe6a1('0x76')?'A':'C','secret':_0x4d9ea6[_0xe6a1('0x65')],'read':_0x4d9ea6['read'],'attachment':_0x4d9ea6[_0xe6a1('0x62')]};})['value']()};return ejs[_0xe6a1('0x78')](path[_0xe6a1('0x56')](config['root'],'server',_0xe6a1('0x79'),_0xe6a1('0x7a')),{'interaction':_0x2b6476})[_0xe6a1('0x18')](function(_0x377e60){var _0x195978=path[_0xe6a1('0x56')](_0x31af49,_0xe6a1('0x7b')+_0x761fe['id']+'-'+_0x24cab5+'.pdf');var _0xb06dd={'path':_0x195978,'channel':'Openchannel','interactionId':_0x761fe['id']};return pdf['createPdfFromHTML'](_0x377e60,_0xb06dd);})[_0xe6a1('0x18')](function(){return new Promise(function(_0x573949,_0x3c8240){zipdir(_0x31af49,{'saveTo':_0x23b18a},function(_0x39e748,_0x4eea6b){if(_0x39e748)return _0x3c8240(_0x39e748);return _0x573949(_0x4eea6b);});})['then'](function(){return new Promise(function(_0x3cdc56,_0x3978eb){rimraf(_0x31af49,function(_0x5d61e5){if(_0x5d61e5)_0x3978eb(_0x5d61e5);return _0x3cdc56();});});})[_0xe6a1('0x18')](function(){return _0x5d1f4a[_0xe6a1('0x54')](_0x23b18a,_0x1c55b8,function(_0x441b19){if(_0x441b19){logger[_0xe6a1('0x1b')](_0xe6a1('0x7c'),_0x441b19);}else{fs['unlinkSync'](_0x23b18a);}});});});}else{return _0x5d1f4a['sendStatus'](0xc8);}})[_0xe6a1('0x25')](handleError(_0x5d1f4a,null));};
\ No newline at end of file
index e46ed2d..fcddb93 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xab40=['remove','getUsers','then','setDataValue','Users','findAll','unreadMessages','length','emit','hasOwnProperty','hook','exports','events','../../mysqldb','OpenchannelMessage','setMaxListeners','save','update'];(function(_0x1479f4,_0x1db6a1){var _0x4cf01a=function(_0x2ce6e5){while(--_0x2ce6e5){_0x1479f4['push'](_0x1479f4['shift']());}};_0x4cf01a(++_0x1db6a1);}(_0xab40,0x186));var _0x0ab4=function(_0x1a8f4e,_0x3e5bef){_0x1a8f4e=_0x1a8f4e-0x0;var _0x493c67=_0xab40[_0x1a8f4e];return _0x493c67;};'use strict';var EventEmitter=require(_0x0ab4('0x0'));var OpenchannelInteraction=require('../../mysqldb')['db']['OpenchannelInteraction'];var OpenchannelMessage=require(_0x0ab4('0x1'))['db'][_0x0ab4('0x2')];var OpenchannelInteractionEvents=new EventEmitter();OpenchannelInteractionEvents[_0x0ab4('0x3')](0x0);var events={'afterCreate':_0x0ab4('0x4'),'afterUpdate':_0x0ab4('0x5'),'afterDestroy':_0x0ab4('0x6')};function emitEvent(_0x38b4b0){return function(_0x595cdd,_0x27a563,_0x28e19d){_0x595cdd[_0x0ab4('0x7')]({'attributes':['id'],'raw':!![]})[_0x0ab4('0x8')](function(_0x103002){_0x595cdd[_0x0ab4('0x9')](_0x0ab4('0xa'),_0x103002['map'](function(_0x2063af){return{'id':_0x2063af['id']};}));return OpenchannelMessage[_0x0ab4('0xb')]({'where':{'OpenchannelInteractionId':_0x595cdd['id'],'direction':'in','read':![]},'raw':!![]});})[_0x0ab4('0x8')](function(_0x334b0c){_0x595cdd[_0x0ab4('0x9')](_0x0ab4('0xc'),_0x334b0c[_0x0ab4('0xd')]);OpenchannelInteractionEvents[_0x0ab4('0xe')](_0x38b4b0+':'+_0x595cdd['id'],_0x595cdd);OpenchannelInteractionEvents['emit'](_0x38b4b0,_0x595cdd);_0x28e19d(null);})['catch'](_0x28e19d(null));};}for(var e in events){if(events[_0x0ab4('0xf')](e)){var event=events[e];OpenchannelInteraction[_0x0ab4('0x10')](e,emitEvent(event));}}module[_0x0ab4('0x11')]=OpenchannelInteractionEvents;
\ No newline at end of file
+var _0x3098=['OpenchannelMessage','setMaxListeners','save','update','remove','getUsers','then','setDataValue','Users','map','findAll','unreadMessages','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb','OpenchannelInteraction'];(function(_0x1ed4bc,_0x3fabc5){var _0x115458=function(_0x2cb6e7){while(--_0x2cb6e7){_0x1ed4bc['push'](_0x1ed4bc['shift']());}};_0x115458(++_0x3fabc5);}(_0x3098,0xb1));var _0x8309=function(_0x4629ee,_0x5802d8){_0x4629ee=_0x4629ee-0x0;var _0x47fb5b=_0x3098[_0x4629ee];return _0x47fb5b;};'use strict';var EventEmitter=require(_0x8309('0x0'));var OpenchannelInteraction=require(_0x8309('0x1'))['db'][_0x8309('0x2')];var OpenchannelMessage=require(_0x8309('0x1'))['db'][_0x8309('0x3')];var OpenchannelInteractionEvents=new EventEmitter();OpenchannelInteractionEvents[_0x8309('0x4')](0x0);var events={'afterCreate':_0x8309('0x5'),'afterUpdate':_0x8309('0x6'),'afterDestroy':_0x8309('0x7')};function emitEvent(_0x17b6bc){return function(_0x42c37e,_0xe75282,_0xce00a8){_0x42c37e[_0x8309('0x8')]({'attributes':['id'],'raw':!![]})[_0x8309('0x9')](function(_0x376dfd){_0x42c37e[_0x8309('0xa')](_0x8309('0xb'),_0x376dfd[_0x8309('0xc')](function(_0x3eeb91){return{'id':_0x3eeb91['id']};}));return OpenchannelMessage[_0x8309('0xd')]({'where':{'OpenchannelInteractionId':_0x42c37e['id'],'direction':'in','read':![]},'raw':!![]});})[_0x8309('0x9')](function(_0x4c296d){_0x42c37e[_0x8309('0xa')](_0x8309('0xe'),_0x4c296d['length']);OpenchannelInteractionEvents[_0x8309('0xf')](_0x17b6bc+':'+_0x42c37e['id'],_0x42c37e);OpenchannelInteractionEvents[_0x8309('0xf')](_0x17b6bc,_0x42c37e);_0xce00a8(null);})[_0x8309('0x10')](_0xce00a8(null));};}for(var e in events){if(events[_0x8309('0x11')](e)){var event=events[e];OpenchannelInteraction[_0x8309('0x12')](e,emitEvent(event));}}module[_0x8309('0x13')]=OpenchannelInteractionEvents;
\ No newline at end of file
index b02998e..4a29047 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8675=['path','../../config/environment','./openchannelInteraction.attributes','exports','define','utf8mb4_unicode_ci','changed','closed','closedAt','format','lodash','util','../../config/logger','api','bluebird'];(function(_0x512654,_0x3abeee){var _0x2e3a69=function(_0x3ccc0f){while(--_0x3ccc0f){_0x512654['push'](_0x512654['shift']());}};_0x2e3a69(++_0x3abeee);}(_0x8675,0x1ae));var _0x5867=function(_0x39bc4a,_0x595147){_0x39bc4a=_0x39bc4a-0x0;var _0x436b0d=_0x8675[_0x39bc4a];return _0x436b0d;};'use strict';var _=require(_0x5867('0x0'));var util=require(_0x5867('0x1'));var logger=require(_0x5867('0x2'))(_0x5867('0x3'));var moment=require('moment');var BPromise=require(_0x5867('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x5867('0x5'));var rimraf=require('rimraf');var config=require(_0x5867('0x6'));var attributes=require(_0x5867('0x7'));module[_0x5867('0x8')]=function(_0x43adca,_0x3e90f5){return _0x43adca[_0x5867('0x9')]('OpenchannelInteraction',attributes,{'tableName':'openchannel_interactions','paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x5867('0xa'),'hooks':{'beforeUpdate':function(_0x2085c3,_0x37a9d0,_0x2520f0){if(_0x2085c3[_0x5867('0xb')](_0x5867('0xc'))){_0x2085c3[_0x5867('0xd')]=moment()[_0x5867('0xe')]('YYYY-MM-DD\x20HH:mm:ss');}_0x2520f0(null,_0x2085c3);}}});};
\ No newline at end of file
+var _0x8532=['utf8mb4','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','api','moment','bluebird','path','./openchannelInteraction.attributes','exports','define','OpenchannelInteraction','openchannel_interactions'];(function(_0x783e5c,_0x217c15){var _0x6d9ba1=function(_0x456ddf){while(--_0x456ddf){_0x783e5c['push'](_0x783e5c['shift']());}};_0x6d9ba1(++_0x217c15);}(_0x8532,0xf6));var _0x2853=function(_0x19a63d,_0x30c41e){_0x19a63d=_0x19a63d-0x0;var _0x3c6a25=_0x8532[_0x19a63d];return _0x3c6a25;};'use strict';var _=require(_0x2853('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x2853('0x1'));var moment=require(_0x2853('0x2'));var BPromise=require(_0x2853('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2853('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x2853('0x5'));module[_0x2853('0x6')]=function(_0x162f3,_0x3a154b){return _0x162f3[_0x2853('0x7')](_0x2853('0x8'),attributes,{'tableName':_0x2853('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x2853('0xa'),'collate':'utf8mb4_unicode_ci','hooks':{'beforeUpdate':function(_0x24ed31,_0xb43942,_0x4081f4){if(_0x24ed31[_0x2853('0xb')](_0x2853('0xc'))){_0x24ed31[_0x2853('0xd')]=moment()[_0x2853('0xe')](_0x2853('0xf'));}_0x4081f4(null,_0x24ed31);}}});};
\ No newline at end of file
index 566b869..1ae7afe 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xed5c=['rpc','../../config/environment','jayson/promise','client','http','defaults','socket.io-emitter','redis','request','then','info','OpenchannelInteraction,\x20%s,\x20%s','request\x20sent','debug','OpenchannelInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','UpdateOpenchannelInteraction','OpenchannelInteraction','update','body','options','raw','where','limit','catch','AddTagsToOpenchannelInteraction','find','ids','spread','AddTags','util','moment','bluebird','randomstring','ioredis','../../config/utils'];(function(_0x2d7f0e,_0x3e6fbd){var _0x110b07=function(_0x557b00){while(--_0x557b00){_0x2d7f0e['push'](_0x2d7f0e['shift']());}};_0x110b07(++_0x3e6fbd);}(_0xed5c,0x162));var _0xced5=function(_0x5b5058,_0xf6c8b3){_0x5b5058=_0x5b5058-0x0;var _0x189ba9=_0xed5c[_0x5b5058];return _0x189ba9;};'use strict';var _=require('lodash');var util=require(_0xced5('0x0'));var moment=require(_0xced5('0x1'));var BPromise=require(_0xced5('0x2'));var rs=require(_0xced5('0x3'));var fs=require('fs');var Redis=require(_0xced5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xced5('0x5'));var logger=require('../../config/logger')(_0xced5('0x6'));var config=require(_0xced5('0x7'));var jayson=require(_0xced5('0x8'));var client=jayson[_0xced5('0x9')][_0xced5('0xa')]({'port':0x232a});config['redis']=_[_0xced5('0xb')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xced5('0xc'))(new Redis(config[_0xced5('0xd')]));require('./openchannelInteraction.socket')['register'](socket);function respondWithRpcPromise(_0x4fe043,_0x1d2afd,_0x3deba0){return new BPromise(function(_0x2e073d,_0x2ea1ad){return client[_0xced5('0xe')](_0x4fe043,_0x3deba0)[_0xced5('0xf')](function(_0x9b35fe){logger[_0xced5('0x10')](_0xced5('0x11'),_0x1d2afd,_0xced5('0x12'));logger[_0xced5('0x13')](_0xced5('0x14'),_0x1d2afd,'request\x20sent',JSON[_0xced5('0x15')](_0x9b35fe));if(_0x9b35fe[_0xced5('0x16')]){if(_0x9b35fe[_0xced5('0x16')][_0xced5('0x17')]===0x1f4){logger[_0xced5('0x16')]('OpenchannelInteraction,\x20%s,\x20%s',_0x1d2afd,_0x9b35fe[_0xced5('0x16')]['message']);return _0x2ea1ad(_0x9b35fe['error'][_0xced5('0x18')]);}logger['error'](_0xced5('0x11'),_0x1d2afd,_0x9b35fe[_0xced5('0x16')][_0xced5('0x18')]);return _0x2e073d(_0x9b35fe['error'][_0xced5('0x18')]);}else{logger['info'](_0xced5('0x11'),_0x1d2afd,_0xced5('0x12'));_0x2e073d(_0x9b35fe[_0xced5('0x19')][_0xced5('0x18')]);}})['catch'](function(_0x3f6fd0){logger[_0xced5('0x16')](_0xced5('0x11'),_0x1d2afd,_0x3f6fd0);_0x2ea1ad(_0x3f6fd0);});});}exports[_0xced5('0x1a')]=function(_0x2229f8){var _0x530ec3=this;return new Promise(function(_0x540aef,_0x258fb1){return db[_0xced5('0x1b')][_0xced5('0x1c')](_0x2229f8[_0xced5('0x1d')],{'raw':_0x2229f8[_0xced5('0x1e')]?_0x2229f8[_0xced5('0x1e')][_0xced5('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2229f8[_0xced5('0x1e')]?_0x2229f8['options'][_0xced5('0x20')]||null:null,'attributes':_0x2229f8[_0xced5('0x1e')]?_0x2229f8[_0xced5('0x1e')]['attributes']||null:null,'limit':_0x2229f8[_0xced5('0x1e')]?_0x2229f8[_0xced5('0x1e')][_0xced5('0x21')]||null:null})['then'](function(_0x384d02){logger[_0xced5('0x10')](_0xced5('0x1a'),_0x2229f8);logger[_0xced5('0x13')](_0xced5('0x1a'),_0x2229f8,JSON[_0xced5('0x15')](_0x384d02));_0x540aef(_0x384d02);})[_0xced5('0x22')](function(_0x3f952e){logger['error'](_0xced5('0x1a'),_0x3f952e[_0xced5('0x18')],_0x2229f8);_0x258fb1(_0x530ec3[_0xced5('0x16')](0x1f4,_0x3f952e[_0xced5('0x18')]));});});};exports[_0xced5('0x23')]=function(_0x52b794){return new Promise(function(_0x23c78f,_0x2341be){return db[_0xced5('0x1b')][_0xced5('0x24')]({'where':_0x52b794['options']?_0x52b794['options'][_0xced5('0x20')]||null:null})[_0xced5('0xf')](function(_0xb2d7e5){if(_0xb2d7e5){return _0xb2d7e5['addTags'](_0x52b794[_0xced5('0x1d')][_0xced5('0x25')],_['omit'](_0x52b794['body'],['ids','id'])||{});}})[_0xced5('0x26')](function(_0x477207){logger[_0xced5('0x10')](_0xced5('0x27'),_0x52b794);logger['debug'](_0xced5('0x27'),_0x52b794,JSON['stringify'](_0x477207));_0x23c78f(_0x477207);})[_0xced5('0x22')](function(_0x368fad){logger[_0xced5('0x16')](_0xced5('0x27'),_0x368fad[_0xced5('0x18')],_0x52b794);_0x2341be(_this[_0xced5('0x16')](0x1f4,_0x368fad[_0xced5('0x18')]));});});};
\ No newline at end of file
+var _0xa0d6=['randomstring','ioredis','../../config/logger','http','redis','defaults','localhost','socket.io-emitter','./openchannelInteraction.socket','register','request','then','info','OpenchannelInteraction,\x20%s,\x20%s','request\x20sent','debug','OpenchannelInteraction,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','UpdateOpenchannelInteraction','OpenchannelInteraction','update','options','raw','where','attributes','limit','find','addTags','body','ids','omit','spread','AddTags','util','moment','bluebird'];(function(_0x5e3b7f,_0x42382f){var _0xe42764=function(_0x534695){while(--_0x534695){_0x5e3b7f['push'](_0x5e3b7f['shift']());}};_0xe42764(++_0x42382f);}(_0xa0d6,0x1d1));var _0x6a0d=function(_0x4afc5f,_0x79a19f){_0x4afc5f=_0x4afc5f-0x0;var _0x539eeb=_0xa0d6[_0x4afc5f];return _0x539eeb;};'use strict';var _=require('lodash');var util=require(_0x6a0d('0x0'));var moment=require(_0x6a0d('0x1'));var BPromise=require(_0x6a0d('0x2'));var rs=require(_0x6a0d('0x3'));var fs=require('fs');var Redis=require(_0x6a0d('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x6a0d('0x5'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x6a0d('0x6')]({'port':0x232a});config[_0x6a0d('0x7')]=_[_0x6a0d('0x8')](config['redis'],{'host':_0x6a0d('0x9'),'port':0x18eb});var socket=require(_0x6a0d('0xa'))(new Redis(config['redis']));require(_0x6a0d('0xb'))[_0x6a0d('0xc')](socket);function respondWithRpcPromise(_0x9268c9,_0x121599,_0x291de1){return new BPromise(function(_0x432c54,_0x377214){return client[_0x6a0d('0xd')](_0x9268c9,_0x291de1)[_0x6a0d('0xe')](function(_0x5321fd){logger[_0x6a0d('0xf')](_0x6a0d('0x10'),_0x121599,_0x6a0d('0x11'));logger[_0x6a0d('0x12')](_0x6a0d('0x13'),_0x121599,_0x6a0d('0x11'),JSON[_0x6a0d('0x14')](_0x5321fd));if(_0x5321fd[_0x6a0d('0x15')]){if(_0x5321fd[_0x6a0d('0x15')]['code']===0x1f4){logger[_0x6a0d('0x15')](_0x6a0d('0x10'),_0x121599,_0x5321fd[_0x6a0d('0x15')][_0x6a0d('0x16')]);return _0x377214(_0x5321fd[_0x6a0d('0x15')][_0x6a0d('0x16')]);}logger['error'](_0x6a0d('0x10'),_0x121599,_0x5321fd[_0x6a0d('0x15')]['message']);return _0x432c54(_0x5321fd[_0x6a0d('0x15')][_0x6a0d('0x16')]);}else{logger[_0x6a0d('0xf')](_0x6a0d('0x10'),_0x121599,'request\x20sent');_0x432c54(_0x5321fd['result'][_0x6a0d('0x16')]);}})[_0x6a0d('0x17')](function(_0x19a863){logger[_0x6a0d('0x15')](_0x6a0d('0x10'),_0x121599,_0x19a863);_0x377214(_0x19a863);});});}exports[_0x6a0d('0x18')]=function(_0xddd562){var _0x4a7f49=this;return new Promise(function(_0x1d4fae,_0x1e8281){return db[_0x6a0d('0x19')][_0x6a0d('0x1a')](_0xddd562['body'],{'raw':_0xddd562[_0x6a0d('0x1b')]?_0xddd562[_0x6a0d('0x1b')][_0x6a0d('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xddd562[_0x6a0d('0x1b')]?_0xddd562[_0x6a0d('0x1b')][_0x6a0d('0x1d')]||null:null,'attributes':_0xddd562[_0x6a0d('0x1b')]?_0xddd562[_0x6a0d('0x1b')][_0x6a0d('0x1e')]||null:null,'limit':_0xddd562[_0x6a0d('0x1b')]?_0xddd562[_0x6a0d('0x1b')][_0x6a0d('0x1f')]||null:null})[_0x6a0d('0xe')](function(_0x17d77a){logger['info'](_0x6a0d('0x18'),_0xddd562);logger[_0x6a0d('0x12')]('UpdateOpenchannelInteraction',_0xddd562,JSON[_0x6a0d('0x14')](_0x17d77a));_0x1d4fae(_0x17d77a);})[_0x6a0d('0x17')](function(_0x15959a){logger['error']('UpdateOpenchannelInteraction',_0x15959a[_0x6a0d('0x16')],_0xddd562);_0x1e8281(_0x4a7f49[_0x6a0d('0x15')](0x1f4,_0x15959a[_0x6a0d('0x16')]));});});};exports['AddTagsToOpenchannelInteraction']=function(_0x1991f0){return new Promise(function(_0x5e7d23,_0x2d61e0){return db[_0x6a0d('0x19')][_0x6a0d('0x20')]({'where':_0x1991f0['options']?_0x1991f0[_0x6a0d('0x1b')][_0x6a0d('0x1d')]||null:null})[_0x6a0d('0xe')](function(_0x160dd8){if(_0x160dd8){return _0x160dd8[_0x6a0d('0x21')](_0x1991f0[_0x6a0d('0x22')][_0x6a0d('0x23')],_[_0x6a0d('0x24')](_0x1991f0[_0x6a0d('0x22')],[_0x6a0d('0x23'),'id'])||{});}})[_0x6a0d('0x25')](function(_0x14907c){logger[_0x6a0d('0xf')](_0x6a0d('0x26'),_0x1991f0);logger[_0x6a0d('0x12')](_0x6a0d('0x26'),_0x1991f0,JSON['stringify'](_0x14907c));_0x5e7d23(_0x14907c);})['catch'](function(_0x50af3e){logger[_0x6a0d('0x15')](_0x6a0d('0x26'),_0x50af3e[_0x6a0d('0x16')],_0x1991f0);_0x2d61e0(_this['error'](0x1f4,_0x50af3e[_0x6a0d('0x16')]));});});};
\ No newline at end of file
index bc6e4e7..8a909b1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf8f6=['register','length','openchannelInteraction:','./openchannelInteraction.events','save','emit'];(function(_0x14712f,_0x52f18b){var _0x269303=function(_0x5885d7){while(--_0x5885d7){_0x14712f['push'](_0x14712f['shift']());}};_0x269303(++_0x52f18b);}(_0xf8f6,0x1d7));var _0x6f8f=function(_0x3bea3c,_0x1b509f){_0x3bea3c=_0x3bea3c-0x0;var _0x5935d2=_0xf8f6[_0x3bea3c];return _0x5935d2;};'use strict';var OpenchannelInteractionEvents=require(_0x6f8f('0x0'));var events=[_0x6f8f('0x1'),'remove','update'];function createListener(_0xe7dd3d,_0x577410){return function(_0x46a626){_0x577410[_0x6f8f('0x2')](_0xe7dd3d,_0x46a626);};}function removeListener(_0xa988ba,_0x1761aa){return function(){OpenchannelInteractionEvents['removeListener'](_0xa988ba,_0x1761aa);};}exports[_0x6f8f('0x3')]=function(_0x1884ee){for(var _0x1944da=0x0,_0x151a28=events[_0x6f8f('0x4')];_0x1944da<_0x151a28;_0x1944da++){var _0x194b5f=events[_0x1944da];var _0x5f2416=createListener(_0x6f8f('0x5')+_0x194b5f,_0x1884ee);OpenchannelInteractionEvents['on'](_0x194b5f,_0x5f2416);}};
\ No newline at end of file
+var _0x6446=['length','remove','update','emit'];(function(_0x4c9fb9,_0xd7a385){var _0x36b14c=function(_0x35d0d5){while(--_0x35d0d5){_0x4c9fb9['push'](_0x4c9fb9['shift']());}};_0x36b14c(++_0xd7a385);}(_0x6446,0x149));var _0x6644=function(_0x392e1d,_0x125aed){_0x392e1d=_0x392e1d-0x0;var _0x486d9b=_0x6446[_0x392e1d];return _0x486d9b;};'use strict';var OpenchannelInteractionEvents=require('./openchannelInteraction.events');var events=['save',_0x6644('0x0'),_0x6644('0x1')];function createListener(_0x32400c,_0x3dca3d){return function(_0x1a0c0d){_0x3dca3d[_0x6644('0x2')](_0x32400c,_0x1a0c0d);};}function removeListener(_0x425516,_0x33a15c){return function(){OpenchannelInteractionEvents['removeListener'](_0x425516,_0x33a15c);};}exports['register']=function(_0x4f831a){for(var _0x3fe9c0=0x0,_0x2c16d3=events[_0x6644('0x3')];_0x3fe9c0<_0x2c16d3;_0x3fe9c0++){var _0x4f594e=events[_0x3fe9c0];var _0x4ca14b=createListener('openchannelInteraction:'+_0x4f594e,_0x4f831a);OpenchannelInteractionEvents['on'](_0x4f594e,_0x4ca14b);}};
\ No newline at end of file
index af0324a..9b970a4 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','isAuthenticated','index','get','describe','/:id','show','post','tracked','openchannel','openchannelmessage:create','put','update','/:id/accept','accept','/:id/reject','reject','delete','destroy','multer','util'];(function(_0x5f3d7e,_0x40bf7b){var _0x1a4919=function(_0x171dd4){while(--_0x171dd4){_0x5f3d7e['push'](_0x5f3d7e['shift']());}};_0x1a4919(++_0x40bf7b);}(_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('./openchannelMessage.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')](),interaction[_0x0d8b('0xe')](_0x0d8b('0xf'),_0x0d8b('0x10')),controller['create']);router[_0x0d8b('0x11')]('/:id',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x12')]);router[_0x0d8b('0x11')](_0x0d8b('0x13'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x14')]);router[_0x0d8b('0x11')](_0x0d8b('0x15'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x16')]);router[_0x0d8b('0x17')](_0x0d8b('0xb'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x18')]);module['exports']=router;
\ No newline at end of file
+var _0xe706=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelMessage.controller','get','isAuthenticated','index','/describe','describe','/:id','show','post','tracked','openchannel','openchannelmessage:create','create','update','put','/:id/accept','accept','/:id/reject','exports','multer','util','path','express','Router'];(function(_0x3e1266,_0xc50d38){var _0x29e7a8=function(_0x562da2){while(--_0x562da2){_0x3e1266['push'](_0x3e1266['shift']());}};_0x29e7a8(++_0xc50d38);}(_0xe706,0xa3));var _0x6e70=function(_0x5da0d9,_0x49ee54){_0x5da0d9=_0x5da0d9-0x0;var _0x4b6d2f=_0xe706[_0x5da0d9];return _0x4b6d2f;};'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')](),interaction[_0x6e70('0x12')](_0x6e70('0x13'),_0x6e70('0x14')),controller[_0x6e70('0x15')]);router['put']('/:id',auth[_0x6e70('0xb')](),controller[_0x6e70('0x16')]);router[_0x6e70('0x17')](_0x6e70('0x18'),auth[_0x6e70('0xb')](),controller[_0x6e70('0x19')]);router[_0x6e70('0x17')](_0x6e70('0x1a'),auth['isAuthenticated'](),controller['reject']);router['delete'](_0x6e70('0xf'),auth['isAuthenticated'](),controller['destroy']);module[_0x6e70('0x1b')]=router;
\ No newline at end of file
index f5aee15..e746836 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x915a=['DATE','STRING','sequelize','exports','TEXT','medium','BOOLEAN','ENUM'];(function(_0x3c155f,_0x193642){var _0x4ba095=function(_0x2260ef){while(--_0x2260ef){_0x3c155f['push'](_0x3c155f['shift']());}};_0x4ba095(++_0x193642);}(_0x915a,0x1d2));var _0xa915=function(_0xe295bf,_0x456157){_0xe295bf=_0xe295bf-0x0;var _0xc419fa=_0x915a[_0xe295bf];return _0xc419fa;};'use strict';var Sequelize=require(_0xa915('0x0'));module[_0xa915('0x1')]={'body':{'type':Sequelize[_0xa915('0x2')](_0xa915('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0xa915('0x4')],'defaultValue':![]},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize[_0xa915('0x5')]('in','out'),'defaultValue':'out','allowNull':![]},'readAt':{'type':Sequelize[_0xa915('0x6')]},'providerName':{'type':Sequelize[_0xa915('0x7')]},'providerResponse':{'type':Sequelize[_0xa915('0x2')]}};
\ No newline at end of file
+var _0x7df3=['out','DATE','STRING','TEXT','sequelize','exports','medium','BOOLEAN'];(function(_0xc0d9bc,_0x2bd6be){var _0x32ff73=function(_0x28c592){while(--_0x28c592){_0xc0d9bc['push'](_0xc0d9bc['shift']());}};_0x32ff73(++_0x2bd6be);}(_0x7df3,0x1cc));var _0x37df=function(_0x297fd3,_0x115406){_0x297fd3=_0x297fd3-0x0;var _0x2af381=_0x7df3[_0x297fd3];return _0x2af381;};'use strict';var Sequelize=require(_0x37df('0x0'));module[_0x37df('0x1')]={'body':{'type':Sequelize['TEXT'](_0x37df('0x2')),'allowNull':![]},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'secret':{'type':Sequelize[_0x37df('0x3')],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in',_0x37df('0x4')),'defaultValue':'out','allowNull':![]},'readAt':{'type':Sequelize[_0x37df('0x5')]},'providerName':{'type':Sequelize[_0x37df('0x6')]},'providerResponse':{'type':Sequelize[_0x37df('0x7')]}};
\ No newline at end of file
index 2ce666d..c264173 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x36b2=['api','../../config/utils','../../config/license/util','defaults','localhost','socket.io-emitter','redis','./openchannelMessage.socket','register','jayson/promise','client','http','then','request\x20sent','OpenchannelMessage,\x20%s,\x20%s,\x20%s','error','code','OpenchannelMessage,\x20%s,\x20%s','message','result','catch','status','end','json','offset','undefined','limit','set','Content-Range','apply','reject','save','update','destroy','sendStatus','name','send','index','map','OpenchannelMessage','rawAttributes','fieldName','type','key','model','filters','intersection','query','attributes','fields','nolimit','sort','where','pick','VIRTUAL','filter','options','count','include','findAll','keys','length','merge','find','create','body','params','describe','openchannel-interactions','accept','openchannel','format','UserId','user','agent','get','OpenchannelInteraction','OpenchannelInteractionId','isNil','read1stAt','YYYY-MM-DD\x20HH:mm:ss','interaction','info','role','AcceptMessage','sequelize','Sequelize','SELECT','User','fullname','email','manual','interface','SIP/%s','channel','event','EventManager','acceptmessage','stringify','null','RejectMessage','rejectMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','QueryTypes','internal','motionChannel','rejectmessage','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger'];(function(_0x3f6910,_0x285aa5){var _0x12c29a=function(_0x5ab272){while(--_0x5ab272){_0x3f6910['push'](_0x3f6910['shift']());}};_0x12c29a(++_0x285aa5);}(_0x36b2,0x6b));var _0x236b=function(_0x2c4287,_0x11b7fe){_0x2c4287=_0x2c4287-0x0;var _0xa177a9=_0x36b2[_0x2c4287];return _0xa177a9;};'use strict';var emlformat=require(_0x236b('0x0'));var rimraf=require(_0x236b('0x1'));var zipdir=require(_0x236b('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x236b('0x3'));var moment=require(_0x236b('0x4'));var BPromise=require(_0x236b('0x5'));var Mustache=require('mustache');var util=require(_0x236b('0x6'));var path=require(_0x236b('0x7'));var sox=require('sox');var csv=require(_0x236b('0x8'));var ejs=require(_0x236b('0x9'));var fs=require('fs');var fs_extra=require(_0x236b('0xa'));var _=require(_0x236b('0xb'));var squel=require(_0x236b('0xc'));var crypto=require(_0x236b('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x236b('0xe'));var toCsv=require(_0x236b('0x8'));var querystring=require(_0x236b('0xf'));var Papa=require(_0x236b('0x10'));var Redis=require('ioredis');var authService=require(_0x236b('0x11'));var qs=require(_0x236b('0x12'));var as=require(_0x236b('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x236b('0x14'))(_0x236b('0x15'));var utils=require(_0x236b('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x236b('0x17'));var db=require('../../mysqldb')['db'];config['redis']=_[_0x236b('0x18')](config['redis'],{'host':_0x236b('0x19'),'port':0x18eb});var socket=require(_0x236b('0x1a'))(new Redis(config[_0x236b('0x1b')]));require(_0x236b('0x1c'))[_0x236b('0x1d')](socket);var jayson=require(_0x236b('0x1e'));var client=jayson[_0x236b('0x1f')]['http']({'port':0x232c});var client9002=jayson['client'][_0x236b('0x20')]({'port':0x232a});function respondWithRpcPromise(_0x13248a,_0x258935,_0x1436f2,_0x20bdbd){return new BPromise(function(_0x4f0152,_0x4e54c2){var _0xab13f4=_0x20bdbd||client;return _0xab13f4['request'](_0x13248a,_0x1436f2)[_0x236b('0x21')](function(_0x183191){logger['info']('OpenchannelMessage,\x20%s,\x20%s',_0x258935,_0x236b('0x22'));logger['debug'](_0x236b('0x23'),_0x258935,'request\x20sent',JSON['stringify'](_0x183191));if(_0x183191[_0x236b('0x24')]){if(_0x183191[_0x236b('0x24')][_0x236b('0x25')]===0x1f4){logger[_0x236b('0x24')](_0x236b('0x26'),_0x258935,_0x183191[_0x236b('0x24')][_0x236b('0x27')]);return _0x4e54c2(_0x183191[_0x236b('0x24')][_0x236b('0x27')]);}logger[_0x236b('0x24')](_0x236b('0x26'),_0x258935,_0x183191[_0x236b('0x24')]['message']);return _0x4f0152(_0x183191[_0x236b('0x24')][_0x236b('0x27')]);}else{logger['info'](_0x236b('0x26'),_0x258935,_0x236b('0x22'));_0x4f0152(_0x183191[_0x236b('0x28')]['message']);}})[_0x236b('0x29')](function(_0x1617f8){logger[_0x236b('0x24')](_0x236b('0x26'),_0x258935,_0x1617f8);_0x4e54c2(_0x1617f8);});});}function respondWithStatusCode(_0x198fba,_0x29e0ec){_0x29e0ec=_0x29e0ec||0xcc;return function(_0x9702b2){if(_0x9702b2){return _0x198fba['sendStatus'](_0x29e0ec);}return _0x198fba[_0x236b('0x2a')](_0x29e0ec)[_0x236b('0x2b')]();};}function respondWithResult(_0xe73dbc,_0x462eea){_0x462eea=_0x462eea||0xc8;return function(_0x8ef628){if(_0x8ef628){return _0xe73dbc[_0x236b('0x2a')](_0x462eea)[_0x236b('0x2c')](_0x8ef628);}};}function respondWithFilteredResult(_0x1b5a50,_0x1de15f){return function(_0x2e7fc5){if(_0x2e7fc5){var _0x15a520=typeof _0x1de15f[_0x236b('0x2d')]===_0x236b('0x2e')&&typeof _0x1de15f[_0x236b('0x2f')]===_0x236b('0x2e');var _0x1ba9bf=_0x2e7fc5['count'];var _0x1795cc=_0x15a520?0x0:_0x1de15f[_0x236b('0x2d')];var _0x3d18b7=_0x15a520?_0x2e7fc5['count']:_0x1de15f[_0x236b('0x2d')]+_0x1de15f[_0x236b('0x2f')];var _0x292a33;if(_0x3d18b7>=_0x1ba9bf){_0x3d18b7=_0x1ba9bf;_0x292a33=0xc8;}else{_0x292a33=0xce;}_0x1b5a50[_0x236b('0x2a')](_0x292a33);return _0x1b5a50[_0x236b('0x30')](_0x236b('0x31'),_0x1795cc+'-'+_0x3d18b7+'/'+_0x1ba9bf)[_0x236b('0x2c')](_0x2e7fc5);}return null;};}function patchUpdates(_0x34317e){return function(_0x32fee6){try{jsonpatch[_0x236b('0x32')](_0x32fee6,_0x34317e,!![]);}catch(_0x2ed529){return BPromise[_0x236b('0x33')](_0x2ed529);}return _0x32fee6[_0x236b('0x34')]();};}function saveUpdates(_0x3e5910,_0x146f6a){return function(_0x5d129a){if(_0x5d129a){return _0x5d129a[_0x236b('0x35')](_0x3e5910)['then'](function(_0x53a906){return _0x53a906;});}return null;};}function removeEntity(_0x14f700,_0x9391b1){return function(_0x11806d){if(_0x11806d){return _0x11806d[_0x236b('0x36')]()[_0x236b('0x21')](function(){_0x14f700[_0x236b('0x2a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x218762,_0x560089){return function(_0x563a29){if(!_0x563a29){_0x218762[_0x236b('0x37')](0x194);}return _0x563a29;};}function handleError(_0x40adf4,_0x3aa16b){_0x3aa16b=_0x3aa16b||0x1f4;return function(_0x38664d){logger[_0x236b('0x24')](_0x38664d['stack']);if(_0x38664d[_0x236b('0x38')]){delete _0x38664d[_0x236b('0x38')];}_0x40adf4[_0x236b('0x2a')](_0x3aa16b)[_0x236b('0x39')](_0x38664d);};}exports[_0x236b('0x3a')]=function(_0x34ee17,_0x2e96ac){var _0x45d1c8={},_0x362cb7={},_0x3c80cc={'count':0x0,'rows':[]};var _0x19d202=_[_0x236b('0x3b')](db[_0x236b('0x3c')][_0x236b('0x3d')],function(_0x2423e5){return{'name':_0x2423e5[_0x236b('0x3e')],'type':_0x2423e5[_0x236b('0x3f')][_0x236b('0x40')]};});_0x362cb7[_0x236b('0x41')]=_[_0x236b('0x3b')](_0x19d202,_0x236b('0x38'));_0x362cb7['query']=_['keys'](_0x34ee17['query']);_0x362cb7[_0x236b('0x42')]=_[_0x236b('0x43')](_0x362cb7[_0x236b('0x41')],_0x362cb7[_0x236b('0x44')]);_0x45d1c8[_0x236b('0x45')]=_[_0x236b('0x43')](_0x362cb7[_0x236b('0x41')],qs[_0x236b('0x46')](_0x34ee17[_0x236b('0x44')][_0x236b('0x46')]));_0x45d1c8['attributes']=_0x45d1c8[_0x236b('0x45')]['length']?_0x45d1c8[_0x236b('0x45')]:_0x362cb7['model'];if(!_0x34ee17[_0x236b('0x44')]['hasOwnProperty'](_0x236b('0x47'))){_0x45d1c8[_0x236b('0x2f')]=qs[_0x236b('0x2f')](_0x34ee17[_0x236b('0x44')][_0x236b('0x2f')]);_0x45d1c8['offset']=qs[_0x236b('0x2d')](_0x34ee17['query'][_0x236b('0x2d')]);}_0x45d1c8['order']=qs[_0x236b('0x48')](_0x34ee17[_0x236b('0x44')]['sort']);_0x45d1c8[_0x236b('0x49')]=qs[_0x236b('0x42')](_[_0x236b('0x4a')](_0x34ee17[_0x236b('0x44')],_0x362cb7['filters']),_0x19d202);if(_0x34ee17[_0x236b('0x44')]['filter']){_0x45d1c8[_0x236b('0x49')]=_['merge'](_0x45d1c8[_0x236b('0x49')],{'$or':_['map'](_0x19d202,function(_0x3846a9){if(_0x3846a9[_0x236b('0x3f')]!==_0x236b('0x4b')){var _0x735960={};_0x735960[_0x3846a9[_0x236b('0x38')]]={'$like':'%'+_0x34ee17['query'][_0x236b('0x4c')]+'%'};return _0x735960;}})});}_0x45d1c8=_['merge']({},_0x45d1c8,_0x34ee17[_0x236b('0x4d')]);var _0x62617c={'where':_0x45d1c8['where']};return db[_0x236b('0x3c')][_0x236b('0x4e')](_0x62617c)['then'](function(_0x2510e7){_0x3c80cc['count']=_0x2510e7;if(_0x34ee17['query']['includeAll']){_0x45d1c8[_0x236b('0x4f')]=[{'all':!![]}];}return db[_0x236b('0x3c')][_0x236b('0x50')](_0x45d1c8);})['then'](function(_0xcb554e){_0x3c80cc['rows']=_0xcb554e;return _0x3c80cc;})[_0x236b('0x21')](respondWithFilteredResult(_0x2e96ac,_0x45d1c8))[_0x236b('0x29')](handleError(_0x2e96ac,null));};exports['show']=function(_0x50881d,_0x527c16){var _0x5713cb={'raw':!![],'where':{'id':_0x50881d['params']['id']}},_0x16030d={};_0x16030d[_0x236b('0x41')]=_[_0x236b('0x51')](db[_0x236b('0x3c')]['rawAttributes']);_0x16030d[_0x236b('0x44')]=_[_0x236b('0x51')](_0x50881d['query']);_0x16030d['filters']=_[_0x236b('0x43')](_0x16030d[_0x236b('0x41')],_0x16030d[_0x236b('0x44')]);_0x5713cb[_0x236b('0x45')]=_[_0x236b('0x43')](_0x16030d[_0x236b('0x41')],qs['fields'](_0x50881d[_0x236b('0x44')][_0x236b('0x46')]));_0x5713cb[_0x236b('0x45')]=_0x5713cb[_0x236b('0x45')][_0x236b('0x52')]?_0x5713cb[_0x236b('0x45')]:_0x16030d[_0x236b('0x41')];if(_0x50881d[_0x236b('0x44')]['includeAll']){_0x5713cb[_0x236b('0x4f')]=[{'all':!![]}];}_0x5713cb=_[_0x236b('0x53')]({},_0x5713cb,_0x50881d[_0x236b('0x4d')]);return db[_0x236b('0x3c')][_0x236b('0x54')](_0x5713cb)[_0x236b('0x21')](handleEntityNotFound(_0x527c16,null))[_0x236b('0x21')](respondWithResult(_0x527c16,null))['catch'](handleError(_0x527c16,null));};exports[_0x236b('0x55')]=function(_0x15e195,_0x41920d){return db[_0x236b('0x3c')][_0x236b('0x55')](_0x15e195[_0x236b('0x56')],{})['then'](respondWithResult(_0x41920d,0xc9))['catch'](handleError(_0x41920d,null));};exports[_0x236b('0x35')]=function(_0x2e81b1,_0x8ae11c){if(_0x2e81b1[_0x236b('0x56')]['id']){delete _0x2e81b1[_0x236b('0x56')]['id'];}return db[_0x236b('0x3c')]['find']({'where':{'id':_0x2e81b1[_0x236b('0x57')]['id']}})[_0x236b('0x21')](handleEntityNotFound(_0x8ae11c,null))[_0x236b('0x21')](saveUpdates(_0x2e81b1[_0x236b('0x56')],null))[_0x236b('0x21')](respondWithResult(_0x8ae11c,null))[_0x236b('0x29')](handleError(_0x8ae11c,null));};exports[_0x236b('0x36')]=function(_0x140305,_0x44affc){return db[_0x236b('0x3c')][_0x236b('0x54')]({'where':{'id':_0x140305[_0x236b('0x57')]['id']}})[_0x236b('0x21')](handleEntityNotFound(_0x44affc,null))['then'](removeEntity(_0x44affc,null))[_0x236b('0x29')](handleError(_0x44affc,null));};exports[_0x236b('0x58')]=function(_0x335176,_0xb67ed8){return db[_0x236b('0x3c')]['describe']()['then'](respondWithResult(_0xb67ed8,null))[_0x236b('0x29')](handleError(_0xb67ed8,null));};var interaction_log=require('../../config/logger')(_0x236b('0x59'));exports[_0x236b('0x5a')]=function(_0xc88394,_0x3910b0,_0xefe33f){var _0x4db17={'agent':{},'channel':_0x236b('0x5b')};if(_0xc88394[_0x236b('0x56')]['id']){delete _0xc88394['body']['id'];}_0xc88394[_0x236b('0x56')]['read']=!![];_0xc88394[_0x236b('0x56')]['readAt']=moment()[_0x236b('0x5c')]('YYYY-MM-DD\x20HH:mm:ss');_0xc88394[_0x236b('0x56')][_0x236b('0x5d')]=_0xc88394[_0x236b('0x56')][_0x236b('0x5d')]||_0xc88394[_0x236b('0x5e')]['id'];_0x4db17[_0x236b('0x5f')]['id']=_0xc88394['body'][_0x236b('0x5d')];return db[_0x236b('0x3c')][_0x236b('0x54')]({'where':{'id':_0xc88394[_0x236b('0x57')]['id'],'UserId':null}})[_0x236b('0x21')](handleEntityNotFound(_0x3910b0,null))[_0x236b('0x21')](saveUpdates(_0xc88394['body'],null))['then'](function(_0x603d91){if(_0x603d91){_0x4db17[_0x236b('0x27')]=_0x603d91[_0x236b('0x60')]({'plain':!![]});return db[_0x236b('0x61')][_0x236b('0x54')]({'where':{'id':_0x603d91[_0x236b('0x62')]}});}return null;})[_0x236b('0x21')](handleEntityNotFound(_0x3910b0,null))['then'](function(_0x1999b6){if(_0x1999b6){return _0x1999b6[_0x236b('0x35')]({'UserId':_0xc88394[_0x236b('0x56')]['UserId'],'read1stAt':_[_0x236b('0x63')](_0x1999b6[_0x236b('0x64')])?moment()[_0x236b('0x5c')](_0x236b('0x65')):undefined});}return null;})[_0x236b('0x21')](function(_0x842889){if(_0x842889){_0x4db17[_0x236b('0x66')]=_0x842889['get']({'plain':!![]});interaction_log[_0x236b('0x67')]('[OPENCHANNELMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0xc88394[_0x236b('0x5e')]['id'],_0xc88394[_0x236b('0x5e')][_0x236b('0x38')],_0xc88394[_0x236b('0x5e')][_0x236b('0x68')],_0x4db17[_0x236b('0x66')]['id'],_0xc88394[_0x236b('0x56')]?JSON['stringify'](_0xc88394[_0x236b('0x56')]):'null');return respondWithRpcPromise(_0x236b('0x69'),'acceptMessage',_0x4db17);}return null;})[_0x236b('0x21')](function(_0x5760ee){var _0x52eef3='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x5760ee[_0x236b('0x27')]['ContactId'];return db[_0x236b('0x6a')][_0x236b('0x44')](_0x52eef3,{'type':db[_0x236b('0x6b')]['QueryTypes'][_0x236b('0x6c')],'raw':!![]})[_0x236b('0x21')](function(_0x31087b){return _0x31087b;});})[_0x236b('0x21')](function(_0x4a02d1){if(_0x4a02d1){_0x4db17[_0x236b('0x27')]['contact']=_0x4a02d1[0x0];if(!_0xc88394[_0x236b('0x56')][_0x236b('0x5d')])return;return db[_0x236b('0x6d')][_0x236b('0x54')]({'where':{'id':_0xc88394[_0x236b('0x56')][_0x236b('0x5d')],'role':_0x236b('0x5f')},'attributes':['id',_0x236b('0x38'),_0x236b('0x6e'),_0x236b('0x6f'),'internal'],'raw':!![]});}return null;})[_0x236b('0x21')](function(_0x4e7f57){if(!_0x4e7f57)return null;_0x4db17[_0x236b('0x27')][_0x236b('0x5f')]=_0x4e7f57;return _0x4db17;})[_0x236b('0x21')](function(_0x34ea41){if(_0x34ea41){if(_0xc88394[_0x236b('0x56')][_0x236b('0x70')]){_0x4db17[_0x236b('0x27')][_0x236b('0x71')]=util['format'](_0x236b('0x72'),_0xc88394[_0x236b('0x5e')]['name']);_0x4db17[_0x236b('0x27')][_0x236b('0x73')]=_0x4db17[_0x236b('0x73')];_0x4db17[_0x236b('0x27')]['motionChannel']=_0x4db17[_0x236b('0x73')];_0x4db17[_0x236b('0x27')][_0x236b('0x74')]=_0x236b('0x5a');return respondWithRpcPromise(_0x236b('0x75'),_0x236b('0x75'),{'event':_0x236b('0x76'),'message':_0x4db17[_0x236b('0x27')]},client9002)[_0x236b('0x21')](function(){return _0x4db17;});}return _0x4db17;}return null;})[_0x236b('0x21')](respondWithResult(_0x3910b0,null))[_0x236b('0x29')](handleError(_0x3910b0,null));};var interaction_log=require(_0x236b('0x14'))(_0x236b('0x59'));exports[_0x236b('0x33')]=function(_0x3bf682,_0x59d9da,_0xa583f8){var _0x198216={'agent':{},'channel':'openchannel'};if(_0x3bf682[_0x236b('0x56')]['id']){delete _0x3bf682[_0x236b('0x56')]['id'];}_0x3bf682[_0x236b('0x56')][_0x236b('0x5d')]=_0x3bf682['body'][_0x236b('0x5d')]||_0x3bf682['user']['id'];_0x198216[_0x236b('0x5f')]['id']=_0x3bf682['body']['UserId'];return db['OpenchannelMessage'][_0x236b('0x54')]({'where':{'id':_0x3bf682['params']['id'],'UserId':null}})[_0x236b('0x21')](handleEntityNotFound(_0x59d9da,null))[_0x236b('0x21')](function(_0x11a22e){if(_0x11a22e){_0x198216[_0x236b('0x27')]=_0x11a22e['get']({'plain':!![]});return db[_0x236b('0x61')][_0x236b('0x54')]({'where':{'id':_0x11a22e[_0x236b('0x62')]}});}return null;})[_0x236b('0x21')](handleEntityNotFound(_0x59d9da,null))[_0x236b('0x21')](function(_0x4d39a1){if(_0x4d39a1){_0x198216[_0x236b('0x66')]=_0x4d39a1[_0x236b('0x60')]({'plain':!![]});interaction_log[_0x236b('0x67')]('[OPENCHANNELMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x3bf682[_0x236b('0x5e')]['id'],_0x3bf682[_0x236b('0x5e')][_0x236b('0x38')],_0x3bf682[_0x236b('0x5e')][_0x236b('0x68')],_0x198216['interaction']['id'],_0x3bf682[_0x236b('0x56')]?JSON[_0x236b('0x77')](_0x3bf682[_0x236b('0x56')]):_0x236b('0x78'));return respondWithRpcPromise(_0x236b('0x79'),_0x236b('0x7a'),_0x198216);}return null;})[_0x236b('0x21')](function(_0x66bb52){var _0x4fcac6=_0x236b('0x7b')+_0x66bb52['message']['ContactId'];return db['sequelize']['query'](_0x4fcac6,{'type':db[_0x236b('0x6b')][_0x236b('0x7c')]['SELECT'],'raw':!![]})['then'](function(_0x4adf8a){return _0x4adf8a;});})[_0x236b('0x21')](function(_0x435522){if(_0x435522){_0x198216['message']['contact']=_0x435522[0x0];if(!_0x3bf682['body'][_0x236b('0x5d')])return;return db[_0x236b('0x6d')][_0x236b('0x54')]({'where':{'id':_0x3bf682['body'][_0x236b('0x5d')],'role':_0x236b('0x5f')},'attributes':['id','name','fullname',_0x236b('0x6f'),_0x236b('0x7d')],'raw':!![]});}return null;})['then'](function(_0x54ca6a){if(!_0x54ca6a)return null;_0x198216[_0x236b('0x27')][_0x236b('0x5f')]=_0x54ca6a;return _0x198216;})[_0x236b('0x21')](function(_0x37808e){if(_0x37808e){_0x37808e[_0x236b('0x27')][_0x236b('0x71')]=util[_0x236b('0x5c')](_0x236b('0x72'),_0x3bf682[_0x236b('0x5e')][_0x236b('0x38')]);_0x37808e[_0x236b('0x27')][_0x236b('0x73')]=_0x198216['channel'];_0x37808e[_0x236b('0x27')][_0x236b('0x7e')]=_0x198216[_0x236b('0x73')];_0x37808e['message'][_0x236b('0x74')]=_0x236b('0x33');respondWithRpcPromise(_0x236b('0x75'),_0x236b('0x75'),{'event':_0x236b('0x7f'),'message':_0x37808e[_0x236b('0x27')]},client9002);return _0x198216;}return null;})[_0x236b('0x21')](respondWithResult(_0x59d9da,null))[_0x236b('0x29')](handleError(_0x59d9da,null));};
\ No newline at end of file
+var _0x4dbc=['result','catch','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','reject','save','update','destroy','stack','name','send','index','map','OpenchannelMessage','rawAttributes','fieldName','type','query','keys','intersection','model','fields','attributes','hasOwnProperty','where','filters','pick','filter','VIRTUAL','merge','options','includeAll','include','findAll','rows','find','create','body','params','describe','../../config/logger','openchannel-interactions','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','agent','get','OpenchannelInteraction','OpenchannelInteractionId','isNil','read1stAt','interaction','[OPENCHANNELMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','stringify','null','AcceptMessage','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','sequelize','Sequelize','QueryTypes','SELECT','contact','User','fullname','email','internal','manual','interface','motionChannel','event','EventManager','acceptmessage','RejectMessage','ContactId','SIP/%s','channel','rejectmessage','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./openchannelMessage.socket','register','jayson/promise','client','http','request','then','info','OpenchannelMessage,\x20%s,\x20%s','request\x20sent','error','code','message'];(function(_0x53bcfa,_0x20eb6e){var _0x25e64e=function(_0x1d9515){while(--_0x1d9515){_0x53bcfa['push'](_0x53bcfa['shift']());}};_0x25e64e(++_0x20eb6e);}(_0x4dbc,0x1df));var _0xc4db=function(_0x12f422,_0x41b8bc){_0x12f422=_0x12f422-0x0;var _0x5f5de3=_0x4dbc[_0x12f422];return _0x5f5de3;};'use strict';var emlformat=require(_0xc4db('0x0'));var rimraf=require(_0xc4db('0x1'));var zipdir=require(_0xc4db('0x2'));var jsonpatch=require(_0xc4db('0x3'));var rp=require(_0xc4db('0x4'));var moment=require(_0xc4db('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xc4db('0x6'));var util=require(_0xc4db('0x7'));var path=require('path');var sox=require(_0xc4db('0x8'));var csv=require(_0xc4db('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xc4db('0xa'));var squel=require(_0xc4db('0xb'));var crypto=require(_0xc4db('0xc'));var jsforce=require(_0xc4db('0xd'));var deskjs=require(_0xc4db('0xe'));var toCsv=require('to-csv');var querystring=require(_0xc4db('0xf'));var Papa=require(_0xc4db('0x10'));var Redis=require(_0xc4db('0x11'));var authService=require(_0xc4db('0x12'));var qs=require(_0xc4db('0x13'));var as=require(_0xc4db('0x14'));var hardwareService=require(_0xc4db('0x15'));var logger=require('../../config/logger')(_0xc4db('0x16'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xc4db('0x17'))['db'];config[_0xc4db('0x18')]=_[_0xc4db('0x19')](config[_0xc4db('0x18')],{'host':_0xc4db('0x1a'),'port':0x18eb});var socket=require(_0xc4db('0x1b'))(new Redis(config['redis']));require(_0xc4db('0x1c'))[_0xc4db('0x1d')](socket);var jayson=require(_0xc4db('0x1e'));var client=jayson[_0xc4db('0x1f')][_0xc4db('0x20')]({'port':0x232c});var client9002=jayson[_0xc4db('0x1f')][_0xc4db('0x20')]({'port':0x232a});function respondWithRpcPromise(_0x402b8f,_0x2c2b00,_0x100b83,_0x30c603){return new BPromise(function(_0x2d318c,_0x16b34e){var _0x6f2c4e=_0x30c603||client;return _0x6f2c4e[_0xc4db('0x21')](_0x402b8f,_0x100b83)[_0xc4db('0x22')](function(_0x13a73b){logger[_0xc4db('0x23')](_0xc4db('0x24'),_0x2c2b00,_0xc4db('0x25'));logger['debug']('OpenchannelMessage,\x20%s,\x20%s,\x20%s',_0x2c2b00,_0xc4db('0x25'),JSON['stringify'](_0x13a73b));if(_0x13a73b['error']){if(_0x13a73b[_0xc4db('0x26')][_0xc4db('0x27')]===0x1f4){logger[_0xc4db('0x26')](_0xc4db('0x24'),_0x2c2b00,_0x13a73b[_0xc4db('0x26')][_0xc4db('0x28')]);return _0x16b34e(_0x13a73b['error'][_0xc4db('0x28')]);}logger[_0xc4db('0x26')](_0xc4db('0x24'),_0x2c2b00,_0x13a73b['error'][_0xc4db('0x28')]);return _0x2d318c(_0x13a73b[_0xc4db('0x26')][_0xc4db('0x28')]);}else{logger[_0xc4db('0x23')](_0xc4db('0x24'),_0x2c2b00,_0xc4db('0x25'));_0x2d318c(_0x13a73b[_0xc4db('0x29')]['message']);}})[_0xc4db('0x2a')](function(_0x1aab94){logger[_0xc4db('0x26')](_0xc4db('0x24'),_0x2c2b00,_0x1aab94);_0x16b34e(_0x1aab94);});});}function respondWithStatusCode(_0x287453,_0x14f235){_0x14f235=_0x14f235||0xcc;return function(_0xc34471){if(_0xc34471){return _0x287453[_0xc4db('0x2b')](_0x14f235);}return _0x287453[_0xc4db('0x2c')](_0x14f235)[_0xc4db('0x2d')]();};}function respondWithResult(_0x4e334e,_0x5686bd){_0x5686bd=_0x5686bd||0xc8;return function(_0x56ab40){if(_0x56ab40){return _0x4e334e[_0xc4db('0x2c')](_0x5686bd)[_0xc4db('0x2e')](_0x56ab40);}};}function respondWithFilteredResult(_0x2adcb1,_0x3129c8){return function(_0x571c7c){if(_0x571c7c){var _0x5a7bd0=typeof _0x3129c8[_0xc4db('0x2f')]===_0xc4db('0x30')&&typeof _0x3129c8[_0xc4db('0x31')]===_0xc4db('0x30');var _0x36d18a=_0x571c7c[_0xc4db('0x32')];var _0x59c9d7=_0x5a7bd0?0x0:_0x3129c8[_0xc4db('0x2f')];var _0x5c0501=_0x5a7bd0?_0x571c7c[_0xc4db('0x32')]:_0x3129c8[_0xc4db('0x2f')]+_0x3129c8['limit'];var _0x5d415c;if(_0x5c0501>=_0x36d18a){_0x5c0501=_0x36d18a;_0x5d415c=0xc8;}else{_0x5d415c=0xce;}_0x2adcb1['status'](_0x5d415c);return _0x2adcb1[_0xc4db('0x33')]('Content-Range',_0x59c9d7+'-'+_0x5c0501+'/'+_0x36d18a)[_0xc4db('0x2e')](_0x571c7c);}return null;};}function patchUpdates(_0x4e05fb){return function(_0x20ffd1){try{jsonpatch[_0xc4db('0x34')](_0x20ffd1,_0x4e05fb,!![]);}catch(_0x291da6){return BPromise[_0xc4db('0x35')](_0x291da6);}return _0x20ffd1[_0xc4db('0x36')]();};}function saveUpdates(_0x5852a4,_0x2bc6b6){return function(_0x567817){if(_0x567817){return _0x567817[_0xc4db('0x37')](_0x5852a4)[_0xc4db('0x22')](function(_0x526141){return _0x526141;});}return null;};}function removeEntity(_0x11e682,_0x179056){return function(_0x5e333e){if(_0x5e333e){return _0x5e333e[_0xc4db('0x38')]()[_0xc4db('0x22')](function(){_0x11e682[_0xc4db('0x2c')](0xcc)[_0xc4db('0x2d')]();});}};}function handleEntityNotFound(_0x460e0e,_0x26dfbd){return function(_0xe7f98e){if(!_0xe7f98e){_0x460e0e[_0xc4db('0x2b')](0x194);}return _0xe7f98e;};}function handleError(_0x404b09,_0x10abc6){_0x10abc6=_0x10abc6||0x1f4;return function(_0x3cf3bb){logger[_0xc4db('0x26')](_0x3cf3bb[_0xc4db('0x39')]);if(_0x3cf3bb[_0xc4db('0x3a')]){delete _0x3cf3bb[_0xc4db('0x3a')];}_0x404b09[_0xc4db('0x2c')](_0x10abc6)[_0xc4db('0x3b')](_0x3cf3bb);};}exports[_0xc4db('0x3c')]=function(_0x3580ab,_0x45a04b){var _0x35f822={},_0x15e3cd={},_0x599702={'count':0x0,'rows':[]};var _0x1d6a53=_[_0xc4db('0x3d')](db[_0xc4db('0x3e')][_0xc4db('0x3f')],function(_0x4a587b){return{'name':_0x4a587b[_0xc4db('0x40')],'type':_0x4a587b[_0xc4db('0x41')]['key']};});_0x15e3cd['model']=_['map'](_0x1d6a53,'name');_0x15e3cd[_0xc4db('0x42')]=_[_0xc4db('0x43')](_0x3580ab[_0xc4db('0x42')]);_0x15e3cd['filters']=_[_0xc4db('0x44')](_0x15e3cd[_0xc4db('0x45')],_0x15e3cd[_0xc4db('0x42')]);_0x35f822['attributes']=_[_0xc4db('0x44')](_0x15e3cd[_0xc4db('0x45')],qs[_0xc4db('0x46')](_0x3580ab['query']['fields']));_0x35f822[_0xc4db('0x47')]=_0x35f822[_0xc4db('0x47')]['length']?_0x35f822[_0xc4db('0x47')]:_0x15e3cd[_0xc4db('0x45')];if(!_0x3580ab[_0xc4db('0x42')][_0xc4db('0x48')]('nolimit')){_0x35f822[_0xc4db('0x31')]=qs[_0xc4db('0x31')](_0x3580ab[_0xc4db('0x42')][_0xc4db('0x31')]);_0x35f822[_0xc4db('0x2f')]=qs[_0xc4db('0x2f')](_0x3580ab[_0xc4db('0x42')][_0xc4db('0x2f')]);}_0x35f822['order']=qs['sort'](_0x3580ab['query']['sort']);_0x35f822[_0xc4db('0x49')]=qs[_0xc4db('0x4a')](_[_0xc4db('0x4b')](_0x3580ab['query'],_0x15e3cd[_0xc4db('0x4a')]),_0x1d6a53);if(_0x3580ab[_0xc4db('0x42')][_0xc4db('0x4c')]){_0x35f822[_0xc4db('0x49')]=_['merge'](_0x35f822[_0xc4db('0x49')],{'$or':_[_0xc4db('0x3d')](_0x1d6a53,function(_0x4bc620){if(_0x4bc620[_0xc4db('0x41')]!==_0xc4db('0x4d')){var _0x7ef9b3={};_0x7ef9b3[_0x4bc620[_0xc4db('0x3a')]]={'$like':'%'+_0x3580ab[_0xc4db('0x42')][_0xc4db('0x4c')]+'%'};return _0x7ef9b3;}})});}_0x35f822=_[_0xc4db('0x4e')]({},_0x35f822,_0x3580ab[_0xc4db('0x4f')]);var _0x38ed7f={'where':_0x35f822[_0xc4db('0x49')]};return db[_0xc4db('0x3e')][_0xc4db('0x32')](_0x38ed7f)[_0xc4db('0x22')](function(_0x78365d){_0x599702[_0xc4db('0x32')]=_0x78365d;if(_0x3580ab[_0xc4db('0x42')][_0xc4db('0x50')]){_0x35f822[_0xc4db('0x51')]=[{'all':!![]}];}return db[_0xc4db('0x3e')][_0xc4db('0x52')](_0x35f822);})[_0xc4db('0x22')](function(_0x37e270){_0x599702[_0xc4db('0x53')]=_0x37e270;return _0x599702;})[_0xc4db('0x22')](respondWithFilteredResult(_0x45a04b,_0x35f822))['catch'](handleError(_0x45a04b,null));};exports['show']=function(_0x5c2148,_0x34cd3d){var _0x251590={'raw':!![],'where':{'id':_0x5c2148['params']['id']}},_0x31467d={};_0x31467d[_0xc4db('0x45')]=_[_0xc4db('0x43')](db['OpenchannelMessage'][_0xc4db('0x3f')]);_0x31467d[_0xc4db('0x42')]=_[_0xc4db('0x43')](_0x5c2148[_0xc4db('0x42')]);_0x31467d[_0xc4db('0x4a')]=_[_0xc4db('0x44')](_0x31467d[_0xc4db('0x45')],_0x31467d['query']);_0x251590[_0xc4db('0x47')]=_['intersection'](_0x31467d['model'],qs['fields'](_0x5c2148[_0xc4db('0x42')][_0xc4db('0x46')]));_0x251590['attributes']=_0x251590[_0xc4db('0x47')]['length']?_0x251590[_0xc4db('0x47')]:_0x31467d[_0xc4db('0x45')];if(_0x5c2148[_0xc4db('0x42')][_0xc4db('0x50')]){_0x251590[_0xc4db('0x51')]=[{'all':!![]}];}_0x251590=_['merge']({},_0x251590,_0x5c2148['options']);return db[_0xc4db('0x3e')][_0xc4db('0x54')](_0x251590)[_0xc4db('0x22')](handleEntityNotFound(_0x34cd3d,null))[_0xc4db('0x22')](respondWithResult(_0x34cd3d,null))[_0xc4db('0x2a')](handleError(_0x34cd3d,null));};exports['create']=function(_0xa4b543,_0x4b492b){return db[_0xc4db('0x3e')][_0xc4db('0x55')](_0xa4b543[_0xc4db('0x56')],{})[_0xc4db('0x22')](respondWithResult(_0x4b492b,0xc9))['catch'](handleError(_0x4b492b,null));};exports[_0xc4db('0x37')]=function(_0x1f342f,_0x5d665b){if(_0x1f342f[_0xc4db('0x56')]['id']){delete _0x1f342f[_0xc4db('0x56')]['id'];}return db[_0xc4db('0x3e')][_0xc4db('0x54')]({'where':{'id':_0x1f342f[_0xc4db('0x57')]['id']}})[_0xc4db('0x22')](handleEntityNotFound(_0x5d665b,null))[_0xc4db('0x22')](saveUpdates(_0x1f342f['body'],null))[_0xc4db('0x22')](respondWithResult(_0x5d665b,null))[_0xc4db('0x2a')](handleError(_0x5d665b,null));};exports[_0xc4db('0x38')]=function(_0x7e369b,_0xcb392){return db[_0xc4db('0x3e')][_0xc4db('0x54')]({'where':{'id':_0x7e369b[_0xc4db('0x57')]['id']}})[_0xc4db('0x22')](handleEntityNotFound(_0xcb392,null))['then'](removeEntity(_0xcb392,null))[_0xc4db('0x2a')](handleError(_0xcb392,null));};exports[_0xc4db('0x58')]=function(_0x54c2cd,_0x353753){return db[_0xc4db('0x3e')][_0xc4db('0x58')]()[_0xc4db('0x22')](respondWithResult(_0x353753,null))[_0xc4db('0x2a')](handleError(_0x353753,null));};var interaction_log=require(_0xc4db('0x59'))(_0xc4db('0x5a'));exports['accept']=function(_0x402ce2,_0x16852d,_0x4ffbf8){var _0x1c72e6={'agent':{},'channel':'openchannel'};if(_0x402ce2[_0xc4db('0x56')]['id']){delete _0x402ce2[_0xc4db('0x56')]['id'];}_0x402ce2['body'][_0xc4db('0x5b')]=!![];_0x402ce2[_0xc4db('0x56')][_0xc4db('0x5c')]=moment()[_0xc4db('0x5d')](_0xc4db('0x5e'));_0x402ce2['body'][_0xc4db('0x5f')]=_0x402ce2[_0xc4db('0x56')][_0xc4db('0x5f')]||_0x402ce2[_0xc4db('0x60')]['id'];_0x1c72e6[_0xc4db('0x61')]['id']=_0x402ce2['body'][_0xc4db('0x5f')];return db[_0xc4db('0x3e')]['find']({'where':{'id':_0x402ce2['params']['id'],'UserId':null}})['then'](handleEntityNotFound(_0x16852d,null))['then'](saveUpdates(_0x402ce2[_0xc4db('0x56')],null))[_0xc4db('0x22')](function(_0xdbf476){if(_0xdbf476){_0x1c72e6[_0xc4db('0x28')]=_0xdbf476[_0xc4db('0x62')]({'plain':!![]});return db[_0xc4db('0x63')][_0xc4db('0x54')]({'where':{'id':_0xdbf476[_0xc4db('0x64')]}});}return null;})[_0xc4db('0x22')](handleEntityNotFound(_0x16852d,null))[_0xc4db('0x22')](function(_0x37f3e9){if(_0x37f3e9){return _0x37f3e9['update']({'UserId':_0x402ce2[_0xc4db('0x56')]['UserId'],'read1stAt':_[_0xc4db('0x65')](_0x37f3e9[_0xc4db('0x66')])?moment()[_0xc4db('0x5d')](_0xc4db('0x5e')):undefined});}return null;})[_0xc4db('0x22')](function(_0x54eb30){if(_0x54eb30){_0x1c72e6[_0xc4db('0x67')]=_0x54eb30['get']({'plain':!![]});interaction_log['info'](_0xc4db('0x68'),_0x402ce2[_0xc4db('0x60')]['id'],_0x402ce2['user'][_0xc4db('0x3a')],_0x402ce2[_0xc4db('0x60')]['role'],_0x1c72e6['interaction']['id'],_0x402ce2[_0xc4db('0x56')]?JSON[_0xc4db('0x69')](_0x402ce2[_0xc4db('0x56')]):_0xc4db('0x6a'));return respondWithRpcPromise(_0xc4db('0x6b'),_0xc4db('0x6c'),_0x1c72e6);}return null;})[_0xc4db('0x22')](function(_0x3fdb0d){var _0x5e2b9c=_0xc4db('0x6d')+_0x3fdb0d[_0xc4db('0x28')]['ContactId'];return db[_0xc4db('0x6e')][_0xc4db('0x42')](_0x5e2b9c,{'type':db[_0xc4db('0x6f')][_0xc4db('0x70')][_0xc4db('0x71')],'raw':!![]})['then'](function(_0xd3ef48){return _0xd3ef48;});})[_0xc4db('0x22')](function(_0x2201fd){if(_0x2201fd){_0x1c72e6[_0xc4db('0x28')][_0xc4db('0x72')]=_0x2201fd[0x0];if(!_0x402ce2['body'][_0xc4db('0x5f')])return;return db[_0xc4db('0x73')][_0xc4db('0x54')]({'where':{'id':_0x402ce2[_0xc4db('0x56')][_0xc4db('0x5f')],'role':'agent'},'attributes':['id',_0xc4db('0x3a'),_0xc4db('0x74'),_0xc4db('0x75'),_0xc4db('0x76')],'raw':!![]});}return null;})[_0xc4db('0x22')](function(_0x18af2f){if(!_0x18af2f)return null;_0x1c72e6[_0xc4db('0x28')][_0xc4db('0x61')]=_0x18af2f;return _0x1c72e6;})[_0xc4db('0x22')](function(_0x123fc5){if(_0x123fc5){if(_0x402ce2[_0xc4db('0x56')][_0xc4db('0x77')]){_0x1c72e6['message'][_0xc4db('0x78')]=util[_0xc4db('0x5d')]('SIP/%s',_0x402ce2[_0xc4db('0x60')]['name']);_0x1c72e6[_0xc4db('0x28')]['channel']=_0x1c72e6['channel'];_0x1c72e6[_0xc4db('0x28')][_0xc4db('0x79')]=_0x1c72e6['channel'];_0x1c72e6['message'][_0xc4db('0x7a')]='accept';return respondWithRpcPromise(_0xc4db('0x7b'),_0xc4db('0x7b'),{'event':_0xc4db('0x7c'),'message':_0x1c72e6[_0xc4db('0x28')]},client9002)[_0xc4db('0x22')](function(){return _0x1c72e6;});}return _0x1c72e6;}return null;})[_0xc4db('0x22')](respondWithResult(_0x16852d,null))[_0xc4db('0x2a')](handleError(_0x16852d,null));};var interaction_log=require(_0xc4db('0x59'))(_0xc4db('0x5a'));exports[_0xc4db('0x35')]=function(_0x495ac2,_0x32bf33,_0x48ac6c){var _0x5b1d55={'agent':{},'channel':'openchannel'};if(_0x495ac2[_0xc4db('0x56')]['id']){delete _0x495ac2['body']['id'];}_0x495ac2[_0xc4db('0x56')]['UserId']=_0x495ac2['body'][_0xc4db('0x5f')]||_0x495ac2[_0xc4db('0x60')]['id'];_0x5b1d55[_0xc4db('0x61')]['id']=_0x495ac2['body'][_0xc4db('0x5f')];return db[_0xc4db('0x3e')][_0xc4db('0x54')]({'where':{'id':_0x495ac2['params']['id'],'UserId':null}})[_0xc4db('0x22')](handleEntityNotFound(_0x32bf33,null))['then'](function(_0x52028f){if(_0x52028f){_0x5b1d55[_0xc4db('0x28')]=_0x52028f[_0xc4db('0x62')]({'plain':!![]});return db['OpenchannelInteraction']['find']({'where':{'id':_0x52028f[_0xc4db('0x64')]}});}return null;})['then'](handleEntityNotFound(_0x32bf33,null))[_0xc4db('0x22')](function(_0x27214d){if(_0x27214d){_0x5b1d55['interaction']=_0x27214d[_0xc4db('0x62')]({'plain':!![]});interaction_log['info']('[OPENCHANNELMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x495ac2[_0xc4db('0x60')]['id'],_0x495ac2[_0xc4db('0x60')][_0xc4db('0x3a')],_0x495ac2[_0xc4db('0x60')]['role'],_0x5b1d55[_0xc4db('0x67')]['id'],_0x495ac2[_0xc4db('0x56')]?JSON[_0xc4db('0x69')](_0x495ac2[_0xc4db('0x56')]):'null');return respondWithRpcPromise(_0xc4db('0x7d'),'rejectMessage',_0x5b1d55);}return null;})['then'](function(_0x3d26a5){var _0x174547='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x3d26a5['message'][_0xc4db('0x7e')];return db[_0xc4db('0x6e')][_0xc4db('0x42')](_0x174547,{'type':db[_0xc4db('0x6f')][_0xc4db('0x70')][_0xc4db('0x71')],'raw':!![]})[_0xc4db('0x22')](function(_0xed4120){return _0xed4120;});})[_0xc4db('0x22')](function(_0x175db0){if(_0x175db0){_0x5b1d55[_0xc4db('0x28')][_0xc4db('0x72')]=_0x175db0[0x0];if(!_0x495ac2[_0xc4db('0x56')][_0xc4db('0x5f')])return;return db['User'][_0xc4db('0x54')]({'where':{'id':_0x495ac2[_0xc4db('0x56')][_0xc4db('0x5f')],'role':_0xc4db('0x61')},'attributes':['id','name',_0xc4db('0x74'),_0xc4db('0x75'),_0xc4db('0x76')],'raw':!![]});}return null;})[_0xc4db('0x22')](function(_0x10ac7a){if(!_0x10ac7a)return null;_0x5b1d55['message']['agent']=_0x10ac7a;return _0x5b1d55;})[_0xc4db('0x22')](function(_0x40cacf){if(_0x40cacf){_0x40cacf[_0xc4db('0x28')][_0xc4db('0x78')]=util[_0xc4db('0x5d')](_0xc4db('0x7f'),_0x495ac2[_0xc4db('0x60')][_0xc4db('0x3a')]);_0x40cacf[_0xc4db('0x28')][_0xc4db('0x80')]=_0x5b1d55['channel'];_0x40cacf['message'][_0xc4db('0x79')]=_0x5b1d55['channel'];_0x40cacf[_0xc4db('0x28')][_0xc4db('0x7a')]=_0xc4db('0x35');respondWithRpcPromise(_0xc4db('0x7b'),_0xc4db('0x7b'),{'event':_0xc4db('0x81'),'message':_0x40cacf[_0xc4db('0x28')]},client9002);return _0x5b1d55;}return null;})['then'](respondWithResult(_0x32bf33,null))[_0xc4db('0x2a')](handleError(_0x32bf33,null));};
\ No newline at end of file
index 93e53e3..1dfcbaa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x96f3=['OpenchannelMessage','setMaxListeners','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x1d7046,_0x39792d){var _0x4f4e3f=function(_0xc50645){while(--_0xc50645){_0x1d7046['push'](_0x1d7046['shift']());}};_0x4f4e3f(++_0x39792d);}(_0x96f3,0x80));var _0x396f=function(_0x42cc45,_0x40d55f){_0x42cc45=_0x42cc45-0x0;var _0x40a10a=_0x96f3[_0x42cc45];return _0x40a10a;};'use strict';var EventEmitter=require(_0x396f('0x0'));var OpenchannelMessage=require(_0x396f('0x1'))['db'][_0x396f('0x2')];var OpenchannelMessageEvents=new EventEmitter();OpenchannelMessageEvents[_0x396f('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x396f('0x4'),'afterDestroy':_0x396f('0x5')};function emitEvent(_0x45fdc4){return function(_0x566321,_0x42158c,_0x14afc3){OpenchannelMessageEvents[_0x396f('0x6')](_0x45fdc4+':'+_0x566321['id'],_0x566321);OpenchannelMessageEvents['emit'](_0x45fdc4,_0x566321);_0x14afc3(null);};}for(var e in events){if(events[_0x396f('0x7')](e)){var event=events[e];OpenchannelMessage[_0x396f('0x8')](e,emitEvent(event));}}module[_0x396f('0x9')]=OpenchannelMessageEvents;
\ No newline at end of file
+var _0x6337=['setMaxListeners','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','OpenchannelMessage'];(function(_0xa5e1e0,_0x2764d2){var _0x5d442b=function(_0x4ffd51){while(--_0x4ffd51){_0xa5e1e0['push'](_0xa5e1e0['shift']());}};_0x5d442b(++_0x2764d2);}(_0x6337,0x1ab));var _0x7633=function(_0x226648,_0x295cd2){_0x226648=_0x226648-0x0;var _0x26a98d=_0x6337[_0x226648];return _0x26a98d;};'use strict';var EventEmitter=require(_0x7633('0x0'));var OpenchannelMessage=require(_0x7633('0x1'))['db'][_0x7633('0x2')];var OpenchannelMessageEvents=new EventEmitter();OpenchannelMessageEvents[_0x7633('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x7633('0x4'),'afterDestroy':_0x7633('0x5')};function emitEvent(_0x33c4aa){return function(_0x2b6856,_0x2f756d,_0x764af3){OpenchannelMessageEvents[_0x7633('0x6')](_0x33c4aa+':'+_0x2b6856['id'],_0x2b6856);OpenchannelMessageEvents[_0x7633('0x6')](_0x33c4aa,_0x2b6856);_0x764af3(null);};}for(var e in events){if(events[_0x7633('0x7')](e)){var event=events[e];OpenchannelMessage[_0x7633('0x8')](e,emitEvent(event));}}module[_0x7633('0x9')]=OpenchannelMessageEvents;
\ No newline at end of file
index beb1af9..b21fc81 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1747=['update','OpenchannelMessage,\x20%s,\x20%s','inspect','finally','utf8mb4','utf8mb4_unicode_ci','util','api','bluebird','request-promise','path','../../config/environment','exports','define','OpenchannelMessage','fti_openchannel_messages','get','direction','toLowerCase','secret','UserId','OpenchannelInteraction','findOne','createdAt','catch','error','out','then','find','OpenchannelAccountId','OpenchannelInteractionId','CmContact','keys','replyUri','info','Forwarding\x20message\x20%d\x20to\x20%s','Interactions','length','Contact','POST','method','body','afterCreate','format','Message\x20%d\x20forwarded\x20to\x20%s','threadId','Interaction'];(function(_0x5027b1,_0x1409a5){var _0x4a46cf=function(_0x121920){while(--_0x121920){_0x5027b1['push'](_0x5027b1['shift']());}};_0x4a46cf(++_0x1409a5);}(_0x1747,0x1ad));var _0x7174=function(_0x82129b,_0x484ae9){_0x82129b=_0x82129b-0x0;var _0x2ae5dc=_0x1747[_0x82129b];return _0x2ae5dc;};'use strict';var _=require('lodash');var util=require(_0x7174('0x0'));var logger=require('../../config/logger')(_0x7174('0x1'));var moment=require('moment');var BPromise=require(_0x7174('0x2'));var rp=require(_0x7174('0x3'));var fs=require('fs');var path=require(_0x7174('0x4'));var rimraf=require('rimraf');var config=require(_0x7174('0x5'));var attributes=require('./openchannelMessage.attributes');module[_0x7174('0x6')]=function(_0x495171,_0x5f3d50){return _0x495171[_0x7174('0x7')](_0x7174('0x8'),attributes,{'tableName':'openchannel_messages','paranoid':![],'indexes':[{'name':_0x7174('0x9'),'fields':['body'],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'afterCreate':function(_0x329e9d,_0x5a5195,_0x4f93b2){var _0x4c2121=_0x495171['models'];var _0xc98184=_0x329e9d[_0x7174('0xa')]({'plain':!![]});if(_0xc98184[_0x7174('0xb')][_0x7174('0xc')]()==='in'||_0xc98184[_0x7174('0xb')][_0x7174('0xc')]()==='out'&&!_0xc98184[_0x7174('0xd')]&&!_['isNil'](_0xc98184[_0x7174('0xe')])){_0x4c2121[_0x7174('0xf')][_0x7174('0x10')]({'where':{'id':_0xc98184['OpenchannelInteractionId']}})['then'](function(_0x534bf4){if(_0x534bf4){_0x534bf4['update']({'lastMsgAt':_0xc98184[_0x7174('0x11')],'lastMsgDirection':_0xc98184['direction'][_0x7174('0xc')]()});}})[_0x7174('0x12')](function(_0x52ce82){console[_0x7174('0x13')](_0x52ce82);});}if(_0xc98184[_0x7174('0xb')]===_0x7174('0x14')&&!_0xc98184[_0x7174('0xd')]){var _0x3450cb;_0x4c2121['CmContact']['describe']()[_0x7174('0x15')](function(_0x128062){return _0x4c2121['OpenchannelAccount'][_0x7174('0x16')]({'where':{'id':_0xc98184[_0x7174('0x17')]},'include':[{'model':_0x4c2121[_0x7174('0xf')],'as':'Interactions','where':{'id':_0xc98184[_0x7174('0x18')]},'limit':0x1,'include':[{'model':_0x4c2121[_0x7174('0x19')],'as':'Contact','attributes':_[_0x7174('0x1a')](_0x128062)}]}]});})['then'](function(_0x519bae){_0x3450cb=_0x519bae[_0x7174('0xa')]({'plain':!![]});if(_0x3450cb&&_0x3450cb[_0x7174('0x1b')]){logger[_0x7174('0x1c')]('OpenchannelMessage,\x20%s,\x20%s','afterCreate',util['format'](_0x7174('0x1d'),_0xc98184['id'],_0x3450cb['replyUri']));if(_0x3450cb['Interactions']&&_0x3450cb[_0x7174('0x1e')][_0x7174('0x1f')]){_0xc98184['Interaction']=_['omit'](_0x3450cb[_0x7174('0x1e')][0x0],_0x7174('0x20'));_0xc98184[_0x7174('0x20')]=_0x3450cb[_0x7174('0x1e')][0x0][_0x7174('0x20')];}var _0x5a5195={'method':_0x7174('0x21'),'uri':encodeURI(_0x3450cb['replyUri']),'json':!![],'resolveWithFullResponse':!![]};switch(_0x5a5195[_0x7174('0x22')]){case'GET':_0x5a5195['qs']=_0xc98184;break;case _0x7174('0x21'):_0x5a5195[_0x7174('0x23')]=_0xc98184;break;}return rp(_0x5a5195)[_0x7174('0x15')](function(_0x1e81f3){logger[_0x7174('0x1c')]('OpenchannelMessage,\x20%s,\x20%s',_0x7174('0x24'),util[_0x7174('0x25')](_0x7174('0x26'),_0xc98184['id'],_0x3450cb[_0x7174('0x1b')]));if(_0x1e81f3[_0x7174('0x23')][_0x7174('0x27')]&&_0x1e81f3[_0x7174('0x23')][_0x7174('0x27')]!=_0xc98184[_0x7174('0x28')][_0x7174('0x27')]){return _0x4c2121[_0x7174('0xf')]['update']({'threadId':_0x1e81f3[_0x7174('0x23')][_0x7174('0x27')]},{'where':{'id':_0xc98184[_0x7174('0x28')]['id']}});}else{return;}})[_0x7174('0x15')](function(){return _0x329e9d[_0x7174('0x29')]({'read':!![]});})[_0x7174('0x12')](function(_0x3df6c5){logger[_0x7174('0x13')](_0x7174('0x2a'),_0x7174('0x24'),util[_0x7174('0x2b')](_0x3df6c5,{'showHidden':![],'depth':null}));_0x4f93b2();});}else{_0x4f93b2();}})[_0x7174('0x2c')](function(){_0x4f93b2();});}else{_0x4f93b2();}}},'charset':_0x7174('0x2d'),'collate':_0x7174('0x2e')});};
\ No newline at end of file
+var _0x3d74=['Interactions','OpenchannelInteractionId','CmContact','Contact','keys','replyUri','OpenchannelMessage,\x20%s,\x20%s','afterCreate','length','Interaction','POST','method','GET','info','Message\x20%d\x20forwarded\x20to\x20%s','threadId','error','inspect','utf8mb4_unicode_ci','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./openchannelMessage.attributes','OpenchannelMessage','openchannel_messages','body','models','get','direction','out','secret','isNil','UserId','OpenchannelInteraction','then','update','createdAt','toLowerCase','describe','OpenchannelAccount','find','OpenchannelAccountId'];(function(_0x33c2af,_0x163198){var _0x13c04a=function(_0x4de68e){while(--_0x4de68e){_0x33c2af['push'](_0x33c2af['shift']());}};_0x13c04a(++_0x163198);}(_0x3d74,0xa0));var _0x43d7=function(_0x4667f4,_0x3d6455){_0x4667f4=_0x4667f4-0x0;var _0x2ceacf=_0x3d74[_0x4667f4];return _0x2ceacf;};'use strict';var _=require('lodash');var util=require(_0x43d7('0x0'));var logger=require(_0x43d7('0x1'))(_0x43d7('0x2'));var moment=require(_0x43d7('0x3'));var BPromise=require(_0x43d7('0x4'));var rp=require(_0x43d7('0x5'));var fs=require('fs');var path=require(_0x43d7('0x6'));var rimraf=require(_0x43d7('0x7'));var config=require('../../config/environment');var attributes=require(_0x43d7('0x8'));module['exports']=function(_0x1062a6,_0x82caa5){return _0x1062a6['define'](_0x43d7('0x9'),attributes,{'tableName':_0x43d7('0xa'),'paranoid':![],'indexes':[{'name':'fti_openchannel_messages','fields':[_0x43d7('0xb')],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'afterCreate':function(_0x441d75,_0x458ff4,_0x4d372f){var _0x2561e8=_0x1062a6[_0x43d7('0xc')];var _0xba365=_0x441d75[_0x43d7('0xd')]({'plain':!![]});if(_0xba365[_0x43d7('0xe')]['toLowerCase']()==='in'||_0xba365[_0x43d7('0xe')]['toLowerCase']()===_0x43d7('0xf')&&!_0xba365[_0x43d7('0x10')]&&!_[_0x43d7('0x11')](_0xba365[_0x43d7('0x12')])){_0x2561e8[_0x43d7('0x13')]['findOne']({'where':{'id':_0xba365['OpenchannelInteractionId']}})[_0x43d7('0x14')](function(_0x449d2f){if(_0x449d2f){_0x449d2f[_0x43d7('0x15')]({'lastMsgAt':_0xba365[_0x43d7('0x16')],'lastMsgDirection':_0xba365['direction'][_0x43d7('0x17')]()});}})['catch'](function(_0x19e9ad){console['error'](_0x19e9ad);});}if(_0xba365['direction']===_0x43d7('0xf')&&!_0xba365[_0x43d7('0x10')]){var _0x4be067;_0x2561e8['CmContact'][_0x43d7('0x18')]()[_0x43d7('0x14')](function(_0x379be3){return _0x2561e8[_0x43d7('0x19')][_0x43d7('0x1a')]({'where':{'id':_0xba365[_0x43d7('0x1b')]},'include':[{'model':_0x2561e8[_0x43d7('0x13')],'as':_0x43d7('0x1c'),'where':{'id':_0xba365[_0x43d7('0x1d')]},'limit':0x1,'include':[{'model':_0x2561e8[_0x43d7('0x1e')],'as':_0x43d7('0x1f'),'attributes':_[_0x43d7('0x20')](_0x379be3)}]}]});})[_0x43d7('0x14')](function(_0x34138b){_0x4be067=_0x34138b['get']({'plain':!![]});if(_0x4be067&&_0x4be067[_0x43d7('0x21')]){logger['info'](_0x43d7('0x22'),_0x43d7('0x23'),util['format']('Forwarding\x20message\x20%d\x20to\x20%s',_0xba365['id'],_0x4be067[_0x43d7('0x21')]));if(_0x4be067[_0x43d7('0x1c')]&&_0x4be067[_0x43d7('0x1c')][_0x43d7('0x24')]){_0xba365[_0x43d7('0x25')]=_['omit'](_0x4be067[_0x43d7('0x1c')][0x0],_0x43d7('0x1f'));_0xba365[_0x43d7('0x1f')]=_0x4be067[_0x43d7('0x1c')][0x0]['Contact'];}var _0x458ff4={'method':_0x43d7('0x26'),'uri':encodeURI(_0x4be067['replyUri']),'json':!![],'resolveWithFullResponse':!![]};switch(_0x458ff4[_0x43d7('0x27')]){case _0x43d7('0x28'):_0x458ff4['qs']=_0xba365;break;case _0x43d7('0x26'):_0x458ff4[_0x43d7('0xb')]=_0xba365;break;}return rp(_0x458ff4)[_0x43d7('0x14')](function(_0x1f5a50){logger[_0x43d7('0x29')]('OpenchannelMessage,\x20%s,\x20%s',_0x43d7('0x23'),util['format'](_0x43d7('0x2a'),_0xba365['id'],_0x4be067[_0x43d7('0x21')]));if(_0x1f5a50[_0x43d7('0xb')][_0x43d7('0x2b')]&&_0x1f5a50['body']['threadId']!=_0xba365[_0x43d7('0x25')][_0x43d7('0x2b')]){return _0x2561e8[_0x43d7('0x13')][_0x43d7('0x15')]({'threadId':_0x1f5a50['body'][_0x43d7('0x2b')]},{'where':{'id':_0xba365[_0x43d7('0x25')]['id']}});}else{return;}})[_0x43d7('0x14')](function(){return _0x441d75[_0x43d7('0x15')]({'read':!![]});})['catch'](function(_0x5998f8){logger[_0x43d7('0x2c')](_0x43d7('0x22'),_0x43d7('0x23'),util[_0x43d7('0x2d')](_0x5998f8,{'showHidden':![],'depth':null}));_0x4d372f();});}else{_0x4d372f();}})['finally'](function(){_0x4d372f();});}else{_0x4d372f();}}},'charset':'utf8mb4','collate':_0x43d7('0x2e')});};
\ No newline at end of file
index d1647d9..e86c321 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(_0xfb081d,_0x775fb){var _0x3c3bad=function(_0x130e5e){while(--_0x130e5e){_0xfb081d['push'](_0xfb081d['shift']());}};_0x3c3bad(++_0x775fb);}(_0x5f66,0x1a0));var _0x65f6=function(_0x3e5086,_0x48f4a2){_0x3e5086=_0x3e5086-0x0;var _0xfeb102=_0x5f66[_0x3e5086];return _0xfeb102;};'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 _0x7a54=['../../config/environment','jayson/promise','http','defaults','redis','socket.io-emitter','then','info','OpenchannelMessage,\x20%s,\x20%s','request\x20sent','debug','OpenchannelMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateOpenchannelMessage','OpenchannelMessage','body','options','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc'];(function(_0x590b5a,_0x51acd6){var _0x2e7a9a=function(_0x296067){while(--_0x296067){_0x590b5a['push'](_0x590b5a['shift']());}};_0x2e7a9a(++_0x51acd6);}(_0x7a54,0x106));var _0x47a5=function(_0x3a3a88,_0x2fe978){_0x3a3a88=_0x3a3a88-0x0;var _0x343e84=_0x7a54[_0x3a3a88];return _0x343e84;};'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});config['redis']=_[_0x47a5('0xb')](config[_0x47a5('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0x47a5('0xd'))(new Redis(config['redis']));require('./openchannelMessage.socket')['register'](socket);function respondWithRpcPromise(_0x2a0e98,_0x2baee7,_0x5e31dd){return new BPromise(function(_0x2eb0dd,_0x49e844){return client['request'](_0x2a0e98,_0x5e31dd)[_0x47a5('0xe')](function(_0x69e4d4){logger[_0x47a5('0xf')](_0x47a5('0x10'),_0x2baee7,_0x47a5('0x11'));logger[_0x47a5('0x12')](_0x47a5('0x13'),_0x2baee7,'request\x20sent',JSON[_0x47a5('0x14')](_0x69e4d4));if(_0x69e4d4[_0x47a5('0x15')]){if(_0x69e4d4[_0x47a5('0x15')][_0x47a5('0x16')]===0x1f4){logger[_0x47a5('0x15')](_0x47a5('0x10'),_0x2baee7,_0x69e4d4[_0x47a5('0x15')][_0x47a5('0x17')]);return _0x49e844(_0x69e4d4['error'][_0x47a5('0x17')]);}logger[_0x47a5('0x15')](_0x47a5('0x10'),_0x2baee7,_0x69e4d4[_0x47a5('0x15')][_0x47a5('0x17')]);return _0x2eb0dd(_0x69e4d4['error']['message']);}else{logger[_0x47a5('0xf')]('OpenchannelMessage,\x20%s,\x20%s',_0x2baee7,'request\x20sent');_0x2eb0dd(_0x69e4d4[_0x47a5('0x18')][_0x47a5('0x17')]);}})[_0x47a5('0x19')](function(_0x1ef371){logger[_0x47a5('0x15')](_0x47a5('0x10'),_0x2baee7,_0x1ef371);_0x49e844(_0x1ef371);});});}exports[_0x47a5('0x1a')]=function(_0xe3c618){var _0x3aed38=this;return new Promise(function(_0x4a9fcb,_0x1570bc){return db[_0x47a5('0x1b')]['create'](_0xe3c618[_0x47a5('0x1c')],{'raw':_0xe3c618[_0x47a5('0x1d')]?_0xe3c618[_0x47a5('0x1d')]['raw']===undefined?!![]:![]:!![]})[_0x47a5('0xe')](function(_0x2f142b){logger[_0x47a5('0xf')](_0x47a5('0x1a'),_0xe3c618);logger['debug'](_0x47a5('0x1a'),_0xe3c618,JSON[_0x47a5('0x14')](_0x2f142b));_0x4a9fcb(_0x2f142b);})['catch'](function(_0x28747d){logger[_0x47a5('0x15')](_0x47a5('0x1a'),_0x28747d[_0x47a5('0x17')],_0xe3c618);_0x1570bc(_0x3aed38[_0x47a5('0x15')](0x1f4,_0x28747d['message']));});});};
\ No newline at end of file
index b3321fc..44abb02 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xee55=['register','length','./openchannelMessage.events','remove','emit','removeListener'];(function(_0x2aa747,_0x14a00d){var _0x811f93=function(_0x5ca30d){while(--_0x5ca30d){_0x2aa747['push'](_0x2aa747['shift']());}};_0x811f93(++_0x14a00d);}(_0xee55,0x1a0));var _0x5ee5=function(_0xf9a6cf,_0x11870e){_0xf9a6cf=_0xf9a6cf-0x0;var _0x59e2bc=_0xee55[_0xf9a6cf];return _0x59e2bc;};'use strict';var OpenchannelMessageEvents=require(_0x5ee5('0x0'));var events=['save',_0x5ee5('0x1'),'update'];function createListener(_0x36b757,_0x537936){return function(_0x8d4be8){_0x537936[_0x5ee5('0x2')](_0x36b757,_0x8d4be8);};}function removeListener(_0x4e5f9b,_0x394334){return function(){OpenchannelMessageEvents[_0x5ee5('0x3')](_0x4e5f9b,_0x394334);};}exports[_0x5ee5('0x4')]=function(_0x392a8e){for(var _0x684992=0x0,_0x42950c=events[_0x5ee5('0x5')];_0x684992<_0x42950c;_0x684992++){var _0x5e0eb2=events[_0x684992];var _0x168427=createListener('openchannelMessage:'+_0x5e0eb2,_0x392a8e);OpenchannelMessageEvents['on'](_0x5e0eb2,_0x168427);}};
\ No newline at end of file
+var _0xb242=['register','length','save','remove','update','emit','removeListener'];(function(_0x31401f,_0x55ce53){var _0x435c59=function(_0x2ed1be){while(--_0x2ed1be){_0x31401f['push'](_0x31401f['shift']());}};_0x435c59(++_0x55ce53);}(_0xb242,0x1f3));var _0x2b24=function(_0x237da8,_0x37b77a){_0x237da8=_0x237da8-0x0;var _0x558825=_0xb242[_0x237da8];return _0x558825;};'use strict';var OpenchannelMessageEvents=require('./openchannelMessage.events');var events=[_0x2b24('0x0'),_0x2b24('0x1'),_0x2b24('0x2')];function createListener(_0x23d2ef,_0x2ae747){return function(_0x24b99d){_0x2ae747[_0x2b24('0x3')](_0x23d2ef,_0x24b99d);};}function removeListener(_0x481806,_0x494b43){return function(){OpenchannelMessageEvents[_0x2b24('0x4')](_0x481806,_0x494b43);};}exports[_0x2b24('0x5')]=function(_0x5c1f57){for(var _0x341c66=0x0,_0x477e45=events[_0x2b24('0x6')];_0x341c66<_0x477e45;_0x341c66++){var _0x53345b=events[_0x341c66];var _0x475271=createListener('openchannelMessage:'+_0x53345b,_0x5c1f57);OpenchannelMessageEvents['on'](_0x53345b,_0x475271);}};
\ No newline at end of file
index 5fc9b0e..182c197 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe65b=['fs-extra','../../components/auth/service','../../config/environment','./openchannelQueue.controller','get','index','/describe','isAuthenticated','describe','show','/:id/members','getMembers','getTeams','/:id/users','getAgents','create','addTeams','addAgents','put','/:id','delete','/:id/teams','removeTeams','removeAgents','exports','multer','util','path','connect-timeout','express','Router'];(function(_0x57c219,_0x28adb0){var _0x41eda0=function(_0x53c3bb){while(--_0x53c3bb){_0x57c219['push'](_0x57c219['shift']());}};_0x41eda0(++_0x28adb0);}(_0xe65b,0x111));var _0xbe65=function(_0x3e5086,_0x48f4a2){_0x3e5086=_0x3e5086-0x0;var _0xfeb102=_0xe65b[_0x3e5086];return _0xfeb102;};'use strict';var multer=require(_0xbe65('0x0'));var util=require(_0xbe65('0x1'));var path=require(_0xbe65('0x2'));var timeout=require(_0xbe65('0x3'));var express=require(_0xbe65('0x4'));var router=express[_0xbe65('0x5')]();var fs_extra=require(_0xbe65('0x6'));var auth=require(_0xbe65('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0xbe65('0x8'));var controller=require(_0xbe65('0x9'));router[_0xbe65('0xa')]('/',auth['isAuthenticated'](),controller[_0xbe65('0xb')]);router[_0xbe65('0xa')](_0xbe65('0xc'),auth[_0xbe65('0xd')](),controller[_0xbe65('0xe')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0xbe65('0xf')]);router[_0xbe65('0xa')](_0xbe65('0x10'),auth['isAuthenticated'](),controller[_0xbe65('0x11')]);router[_0xbe65('0xa')]('/:id/teams',auth[_0xbe65('0xd')](),controller[_0xbe65('0x12')]);router['get'](_0xbe65('0x13'),auth[_0xbe65('0xd')](),controller[_0xbe65('0x14')]);router['post']('/',auth[_0xbe65('0xd')](),controller[_0xbe65('0x15')]);router['post']('/:id/teams',auth[_0xbe65('0xd')](),controller[_0xbe65('0x16')]);router['post'](_0xbe65('0x13'),auth['isAuthenticated'](),controller[_0xbe65('0x17')]);router[_0xbe65('0x18')](_0xbe65('0x19'),auth['isAuthenticated'](),controller['update']);router[_0xbe65('0x1a')]('/:id',auth['isAuthenticated'](),controller['destroy']);router[_0xbe65('0x1a')](_0xbe65('0x1b'),auth['isAuthenticated'](),controller[_0xbe65('0x1c')]);router[_0xbe65('0x1a')](_0xbe65('0x13'),auth[_0xbe65('0xd')](),controller[_0xbe65('0x1d')]);module[_0xbe65('0x1e')]=router;
\ No newline at end of file
+var _0xab4d=['getTeams','/:id/users','create','post','addTeams','addAgents','put','delete','destroy','removeTeams','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelQueue.controller','get','isAuthenticated','index','describe','/:id','getMembers','/:id/teams'];(function(_0x456b45,_0x273834){var _0xe3627d=function(_0x3a6f59){while(--_0x3a6f59){_0x456b45['push'](_0x456b45['shift']());}};_0xe3627d(++_0x273834);}(_0xab4d,0x1f0));var _0xdab4=function(_0x5bf2b3,_0xfcd364){_0x5bf2b3=_0x5bf2b3-0x0;var _0x5e8a9b=_0xab4d[_0x5bf2b3];return _0x5e8a9b;};'use strict';var multer=require(_0xdab4('0x0'));var util=require(_0xdab4('0x1'));var path=require('path');var timeout=require(_0xdab4('0x2'));var express=require(_0xdab4('0x3'));var router=express[_0xdab4('0x4')]();var fs_extra=require(_0xdab4('0x5'));var auth=require(_0xdab4('0x6'));var interaction=require(_0xdab4('0x7'));var config=require(_0xdab4('0x8'));var controller=require(_0xdab4('0x9'));router[_0xdab4('0xa')]('/',auth[_0xdab4('0xb')](),controller[_0xdab4('0xc')]);router['get']('/describe',auth['isAuthenticated'](),controller[_0xdab4('0xd')]);router['get'](_0xdab4('0xe'),auth['isAuthenticated'](),controller['show']);router[_0xdab4('0xa')]('/:id/members',auth['isAuthenticated'](),controller[_0xdab4('0xf')]);router[_0xdab4('0xa')](_0xdab4('0x10'),auth[_0xdab4('0xb')](),controller[_0xdab4('0x11')]);router[_0xdab4('0xa')](_0xdab4('0x12'),auth[_0xdab4('0xb')](),controller['getAgents']);router['post']('/',auth[_0xdab4('0xb')](),controller[_0xdab4('0x13')]);router[_0xdab4('0x14')]('/:id/teams',auth[_0xdab4('0xb')](),controller[_0xdab4('0x15')]);router[_0xdab4('0x14')](_0xdab4('0x12'),auth[_0xdab4('0xb')](),controller[_0xdab4('0x16')]);router[_0xdab4('0x17')](_0xdab4('0xe'),auth['isAuthenticated'](),controller['update']);router[_0xdab4('0x18')](_0xdab4('0xe'),auth[_0xdab4('0xb')](),controller[_0xdab4('0x19')]);router[_0xdab4('0x18')]('/:id/teams',auth[_0xdab4('0xb')](),controller[_0xdab4('0x1a')]);router['delete'](_0xdab4('0x12'),auth[_0xdab4('0xb')](),controller['removeAgents']);module['exports']=router;
\ No newline at end of file
index 88f10a0..a5c46c0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x285b=['name','INTEGER','beepall','exports','STRING'];(function(_0x4016fb,_0x9ab704){var _0x5d7d3a=function(_0x16c5ad){while(--_0x16c5ad){_0x4016fb['push'](_0x4016fb['shift']());}};_0x5d7d3a(++_0x9ab704);}(_0x285b,0xd5));var _0xb285=function(_0x4230ee,_0xc48832){_0x4230ee=_0x4230ee-0x0;var _0x2b7c73=_0x285b[_0x4230ee];return _0x2b7c73;};'use strict';var Sequelize=require('sequelize');module[_0xb285('0x0')]={'name':{'type':Sequelize[_0xb285('0x1')],'unique':_0xb285('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0xb285('0x1')]},'timeout':{'type':Sequelize[_0xb285('0x3')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize['ENUM']('rrmemory',_0xb285('0x4'),'roundrobin')}};
\ No newline at end of file
+var _0xa21d=['exports','STRING','name','INTEGER','ENUM','rrmemory','beepall','roundrobin','sequelize'];(function(_0x5d8fae,_0x5bdc36){var _0x44118a=function(_0x40cff9){while(--_0x40cff9){_0x5d8fae['push'](_0x5d8fae['shift']());}};_0x44118a(++_0x5bdc36);}(_0xa21d,0x1c1));var _0xda21=function(_0x3181d4,_0x5bcfbd){_0x3181d4=_0x3181d4-0x0;var _0x1306db=_0xa21d[_0x3181d4];return _0x1306db;};'use strict';var Sequelize=require(_0xda21('0x0'));module[_0xda21('0x1')]={'name':{'type':Sequelize[_0xda21('0x2')],'unique':_0xda21('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0xda21('0x2')]},'timeout':{'type':Sequelize[_0xda21('0x4')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0xda21('0x5')](_0xda21('0x6'),_0xda21('0x7'),_0xda21('0x8'))}};
\ No newline at end of file
index cb488f6..24b3dff 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xceb3=['../../config/environment','redis','socket.io-emitter','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','update','destroy','then','get','OpenchannelQueues','UserProfileResource','stack','send','index','map','rawAttributes','fieldName','type','key','where','OpenchannelQueue','query','catch','show','params','model','keys','intersection','fields','length','attributes','includeAll','include','options','find','create','user','UserProfileSection','autoAssociation','name','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','getMembers','findOne','UserOpenchannelQueue','filters','hasOwnProperty','nolimit','order','sort','OpenchannelQueueId','filter','merge','findAll','User','findAndCountAll','UserId','agent','openchannelPause','updatedAt','createdAt','format','%s/%s','SIP','getTeams','addTeams','ids','Team','Agents','voicePause','interface','flatMap','sequelize','transaction','findOrCreate','forEach','emit','userOpenchannelQueue:save','field','tq.TeamId','from','team_has_openchannel_queues','join','ut.TeamId\x20=\x20tq.TeamId','clone','push','toString','QueryTypes','all','union','compact','value','removeTeams','removeAgents','userOpenchannelQueue:remove','addAgents','omit','spread','isArray','getAgents','pick','util','lodash','ioredis','../../components/parsers/qs','../../config/logger'];(function(_0x4fa892,_0x4e66a0){var _0x260ef6=function(_0x3ac4a5){while(--_0x3ac4a5){_0x4fa892['push'](_0x4fa892['shift']());}};_0x260ef6(++_0x4e66a0);}(_0xceb3,0x154));var _0x3ceb=function(_0x47cfa0,_0x176b87){_0x47cfa0=_0x47cfa0-0x0;var _0x386b1d=_0xceb3[_0x47cfa0];return _0x386b1d;};'use strict';var BPromise=require('bluebird');var util=require(_0x3ceb('0x0'));var _=require(_0x3ceb('0x1'));var squel=require('squel');var Redis=require(_0x3ceb('0x2'));var qs=require(_0x3ceb('0x3'));var logger=require(_0x3ceb('0x4'))('api');var config=require(_0x3ceb('0x5'));var db=require('../../mysqldb')['db'];config[_0x3ceb('0x6')]=_['defaults'](config[_0x3ceb('0x6')],{'host':'localhost','port':0x18eb});var socket=require(_0x3ceb('0x7'))(new Redis(config[_0x3ceb('0x6')]));require('./openchannelQueue.socket')['register'](socket);function respondWithStatusCode(_0x4452a4,_0x5dfb17){_0x5dfb17=_0x5dfb17||0xcc;return function(_0x4a7a4b){if(_0x4a7a4b){return _0x4452a4[_0x3ceb('0x8')](_0x5dfb17);}return _0x4452a4[_0x3ceb('0x9')](_0x5dfb17)[_0x3ceb('0xa')]();};}function respondWithResult(_0x1bca8e,_0x109791){_0x109791=_0x109791||0xc8;return function(_0xbcb697){if(_0xbcb697){return _0x1bca8e[_0x3ceb('0x9')](_0x109791)[_0x3ceb('0xb')](_0xbcb697);}};}function respondWithFilteredResult(_0x1de49a,_0x133242){return function(_0x38236a){if(_0x38236a){var _0x591146=typeof _0x133242[_0x3ceb('0xc')]===_0x3ceb('0xd')&&typeof _0x133242[_0x3ceb('0xe')]===_0x3ceb('0xd');var _0x2ed163=_0x38236a[_0x3ceb('0xf')];var _0x76a479=_0x591146?0x0:_0x133242[_0x3ceb('0xc')];var _0x4a6e50=_0x591146?_0x38236a['count']:_0x133242[_0x3ceb('0xc')]+_0x133242[_0x3ceb('0xe')];var _0x4c0858;if(_0x4a6e50>=_0x2ed163){_0x4a6e50=_0x2ed163;_0x4c0858=0xc8;}else{_0x4c0858=0xce;}_0x1de49a[_0x3ceb('0x9')](_0x4c0858);return _0x1de49a['set'](_0x3ceb('0x10'),_0x76a479+'-'+_0x4a6e50+'/'+_0x2ed163)[_0x3ceb('0xb')](_0x38236a);}return null;};}function saveUpdates(_0x369b39){return function(_0x555820){if(_0x555820){return _0x555820[_0x3ceb('0x11')](_0x369b39)['then'](function(_0x5be77c){return _0x5be77c;});}return null;};}function removeEntity(_0x5b1df5){return function(_0x1ca095){if(_0x1ca095){return _0x1ca095[_0x3ceb('0x12')]()[_0x3ceb('0x13')](function(){var _0x46069c=_0x1ca095[_0x3ceb('0x14')]({'plain':!![]});var _0x51277c=_0x3ceb('0x15');return db[_0x3ceb('0x16')]['destroy']({'where':{'type':_0x51277c,'resourceId':_0x46069c['id']}})['then'](function(){return _0x1ca095;});})[_0x3ceb('0x13')](function(){_0x5b1df5[_0x3ceb('0x9')](0xcc)[_0x3ceb('0xa')]();});}};}function handleEntityNotFound(_0x156cc9){return function(_0x4b8b6f){if(!_0x4b8b6f){_0x156cc9[_0x3ceb('0x8')](0x194);}return _0x4b8b6f;};}function handleError(_0x1073db,_0x141348){_0x141348=_0x141348||0x1f4;return function(_0xb7e13f){logger['error'](_0xb7e13f[_0x3ceb('0x17')]);if(_0xb7e13f['name']){delete _0xb7e13f['name'];}_0x1073db[_0x3ceb('0x9')](_0x141348)[_0x3ceb('0x18')](_0xb7e13f);};}exports[_0x3ceb('0x19')]=function(_0x6cc1d1,_0xe66fdd){var _0x40ad2d={};var _0x3aaf1f={'count':0x0,'rows':[]};var _0x2aaa32=_[_0x3ceb('0x1a')](db['OpenchannelQueue'][_0x3ceb('0x1b')],function(_0xa78529){return{'name':_0xa78529[_0x3ceb('0x1c')],'type':_0xa78529[_0x3ceb('0x1d')][_0x3ceb('0x1e')]};});_0x40ad2d=qs['getOptions'](_0x2aaa32,_0x6cc1d1);var _0x1d02ed={'where':_0x40ad2d[_0x3ceb('0x1f')]};return db[_0x3ceb('0x20')][_0x3ceb('0xf')](_0x1d02ed)[_0x3ceb('0x13')](function(_0x15f644){_0x3aaf1f['count']=_0x15f644;_0x40ad2d['include']=qs['include'](_0x6cc1d1[_0x3ceb('0x21')]);return db[_0x3ceb('0x20')]['findAll'](_0x40ad2d);})[_0x3ceb('0x13')](function(_0x24cee1){_0x3aaf1f['rows']=_0x24cee1;return _0x3aaf1f;})[_0x3ceb('0x13')](respondWithFilteredResult(_0xe66fdd,_0x40ad2d))[_0x3ceb('0x22')](handleError(_0xe66fdd,null));};exports[_0x3ceb('0x23')]=function(_0x5906d5,_0x11fdc8){var _0x3e6def={'raw':!![],'where':{'id':_0x5906d5[_0x3ceb('0x24')]['id']}},_0x5674a0={};_0x5674a0[_0x3ceb('0x25')]=_['keys'](db[_0x3ceb('0x20')][_0x3ceb('0x1b')]);_0x5674a0[_0x3ceb('0x21')]=_[_0x3ceb('0x26')](_0x5906d5[_0x3ceb('0x21')]);_0x5674a0['filters']=_[_0x3ceb('0x27')](_0x5674a0[_0x3ceb('0x25')],_0x5674a0[_0x3ceb('0x21')]);_0x3e6def['attributes']=_['intersection'](_0x5674a0[_0x3ceb('0x25')],qs[_0x3ceb('0x28')](_0x5906d5[_0x3ceb('0x21')][_0x3ceb('0x28')]));_0x3e6def['attributes']=_0x3e6def['attributes'][_0x3ceb('0x29')]?_0x3e6def[_0x3ceb('0x2a')]:_0x5674a0[_0x3ceb('0x25')];if(_0x5906d5['query'][_0x3ceb('0x2b')]){_0x3e6def[_0x3ceb('0x2c')]=[{'all':!![]}];}_0x3e6def=_['merge']({},_0x3e6def,_0x5906d5[_0x3ceb('0x2d')]);return db[_0x3ceb('0x20')][_0x3ceb('0x2e')](_0x3e6def)['then'](handleEntityNotFound(_0x11fdc8,null))['then'](respondWithResult(_0x11fdc8,null))['catch'](handleError(_0x11fdc8,null));};exports['create']=function(_0x4d9f28,_0x54128){return db[_0x3ceb('0x20')][_0x3ceb('0x2f')](_0x4d9f28['body'],{})['then'](function(_0x45a6e3){var _0x2c1088=_0x4d9f28[_0x3ceb('0x30')][_0x3ceb('0x14')]({'plain':!![]});if(!_0x2c1088)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x2c1088['role']==='user'){var _0x5c53e7=_0x45a6e3[_0x3ceb('0x14')]({'plain':!![]});var _0x3d68b1=_0x3ceb('0x15');return db[_0x3ceb('0x31')][_0x3ceb('0x2e')]({'where':{'name':_0x3d68b1,'userProfileId':_0x2c1088['userProfileId']},'raw':!![]})[_0x3ceb('0x13')](function(_0xf353fa){if(_0xf353fa&&_0xf353fa[_0x3ceb('0x32')]===0x0){return db[_0x3ceb('0x16')][_0x3ceb('0x2f')]({'name':_0x5c53e7[_0x3ceb('0x33')],'resourceId':_0x5c53e7['id'],'type':_0xf353fa[_0x3ceb('0x33')],'sectionId':_0xf353fa['id']},{})[_0x3ceb('0x13')](function(){return _0x45a6e3;});}else{return _0x45a6e3;}})[_0x3ceb('0x22')](function(_0x4715e7){logger[_0x3ceb('0x34')](_0x3ceb('0x35'),_0x4715e7);throw _0x4715e7;});}return _0x45a6e3;})[_0x3ceb('0x13')](respondWithResult(_0x54128,0xc9))[_0x3ceb('0x22')](handleError(_0x54128,null));};exports[_0x3ceb('0x11')]=function(_0x1b9e8c,_0x4d7738){if(_0x1b9e8c[_0x3ceb('0x36')]['id']){delete _0x1b9e8c['body']['id'];}return db['OpenchannelQueue'][_0x3ceb('0x2e')]({'where':{'id':_0x1b9e8c['params']['id']}})[_0x3ceb('0x13')](handleEntityNotFound(_0x4d7738,null))['then'](saveUpdates(_0x1b9e8c[_0x3ceb('0x36')],null))['then'](respondWithResult(_0x4d7738,null))[_0x3ceb('0x22')](handleError(_0x4d7738,null));};exports[_0x3ceb('0x12')]=function(_0xb69637,_0x5526fc){return db[_0x3ceb('0x20')][_0x3ceb('0x2e')]({'where':{'id':_0xb69637[_0x3ceb('0x24')]['id']}})[_0x3ceb('0x13')](handleEntityNotFound(_0x5526fc,null))[_0x3ceb('0x13')](removeEntity(_0x5526fc,null))[_0x3ceb('0x22')](handleError(_0x5526fc,null));};exports[_0x3ceb('0x37')]=function(_0x2a0e83,_0x2f804c){return db[_0x3ceb('0x20')][_0x3ceb('0x37')]()[_0x3ceb('0x13')](respondWithResult(_0x2f804c,null))[_0x3ceb('0x22')](handleError(_0x2f804c,null));};exports[_0x3ceb('0x38')]=function(_0x56e55b,_0x2c0d3f){var _0x9651ca={'raw':!![],'where':{}},_0x1f2084={},_0x5b2dcb;return db[_0x3ceb('0x20')][_0x3ceb('0x39')]({'where':{'id':_0x56e55b[_0x3ceb('0x24')]['id']}})[_0x3ceb('0x13')](handleEntityNotFound(_0x2c0d3f,null))[_0x3ceb('0x13')](function(_0x1684f8){if(_0x1684f8){_0x5b2dcb=_0x1684f8[_0x3ceb('0x14')]({'plain':!![]});_0x1f2084[_0x3ceb('0x25')]=_[_0x3ceb('0x26')](db[_0x3ceb('0x3a')]['rawAttributes']);_0x1f2084[_0x3ceb('0x21')]=_[_0x3ceb('0x26')](_0x56e55b[_0x3ceb('0x21')]);_0x1f2084[_0x3ceb('0x3b')]=_['intersection'](_0x1f2084[_0x3ceb('0x25')],_0x1f2084['query']);_0x9651ca[_0x3ceb('0x2a')]=_[_0x3ceb('0x27')](_0x1f2084[_0x3ceb('0x25')],qs[_0x3ceb('0x28')](_0x56e55b[_0x3ceb('0x21')][_0x3ceb('0x28')]));_0x9651ca[_0x3ceb('0x2a')]=_0x9651ca[_0x3ceb('0x2a')][_0x3ceb('0x29')]?_0x9651ca[_0x3ceb('0x2a')]:_0x1f2084['model'];if(!_0x56e55b['query'][_0x3ceb('0x3c')](_0x3ceb('0x3d'))){_0x9651ca[_0x3ceb('0xe')]=qs[_0x3ceb('0xe')](_0x56e55b[_0x3ceb('0x21')][_0x3ceb('0xe')]);_0x9651ca[_0x3ceb('0xc')]=qs[_0x3ceb('0xc')](_0x56e55b[_0x3ceb('0x21')][_0x3ceb('0xc')]);}_0x9651ca[_0x3ceb('0x3e')]=qs[_0x3ceb('0x3f')](_0x56e55b[_0x3ceb('0x21')][_0x3ceb('0x3f')]);_0x9651ca[_0x3ceb('0x1f')]=qs[_0x3ceb('0x3b')](_['pick'](_0x56e55b[_0x3ceb('0x21')],_0x1f2084[_0x3ceb('0x3b')]));_0x9651ca[_0x3ceb('0x1f')][_0x3ceb('0x40')]=_0x1684f8['id'];if(_0x56e55b[_0x3ceb('0x21')][_0x3ceb('0x41')]){_0x9651ca['where']=_[_0x3ceb('0x42')](_0x9651ca[_0x3ceb('0x1f')],{'$or':_['map'](_0x9651ca[_0x3ceb('0x2a')],function(_0x446a0d){var _0x571d45={};_0x571d45[_0x446a0d]={'$like':'%'+_0x56e55b['query'][_0x3ceb('0x41')]+'%'};return _0x571d45;})});}_0x9651ca=_['merge']({},_0x9651ca,_0x56e55b[_0x3ceb('0x2d')]);return db[_0x3ceb('0x3a')][_0x3ceb('0x43')](_0x9651ca);}})[_0x3ceb('0x13')](function(_0xcd0fb9){if(_0xcd0fb9){return db[_0x3ceb('0x44')][_0x3ceb('0x45')]({'where':{'id':_[_0x3ceb('0x1a')](_0xcd0fb9,_0x3ceb('0x46')),'role':_0x3ceb('0x47')},'attributes':['id',_0x3ceb('0x33'),_0x3ceb('0x48'),_0x3ceb('0x49'),_0x3ceb('0x4a')]});}})['then'](function(_0x37441f){if(_0x37441f){return{'count':_0x37441f[_0x3ceb('0xf')],'rows':_[_0x3ceb('0x1a')](_0x37441f['rows'],function(_0x4b7a2b){return{'membername':_0x4b7a2b[_0x3ceb('0x33')],'UserId':_0x4b7a2b['id'],'queue_name':_0x5b2dcb[_0x3ceb('0x33')],'OpenchannelQueueId':_0x5b2dcb['id'],'interface':util[_0x3ceb('0x4b')](_0x3ceb('0x4c'),_0x3ceb('0x4d'),_0x4b7a2b[_0x3ceb('0x33')]),'penalty':0x0,'paused':_0x4b7a2b['openchannelPause'],'createdAt':_0x4b7a2b[_0x3ceb('0x4a')],'updatedAt':_0x4b7a2b['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})[_0x3ceb('0x13')](respondWithFilteredResult(_0x2c0d3f,_0x9651ca))[_0x3ceb('0x22')](handleError(_0x2c0d3f,null));};exports['getTeams']=function(_0x54db1a,_0x21e87a){var _0xd4d36b={};var _0x5b2eff={};var _0x5d5e08;var _0x577d84;return db[_0x3ceb('0x20')][_0x3ceb('0x39')]({'where':{'id':_0x54db1a['params']['id']}})[_0x3ceb('0x13')](handleEntityNotFound(_0x21e87a,null))['then'](function(_0x59564f){if(_0x59564f){_0x5d5e08=_0x59564f;_0x5b2eff[_0x3ceb('0x25')]=_[_0x3ceb('0x26')](db['Team'][_0x3ceb('0x1b')]);_0x5b2eff[_0x3ceb('0x21')]=_[_0x3ceb('0x26')](_0x54db1a[_0x3ceb('0x21')]);_0x5b2eff[_0x3ceb('0x3b')]=_[_0x3ceb('0x27')](_0x5b2eff[_0x3ceb('0x25')],_0x5b2eff[_0x3ceb('0x21')]);_0xd4d36b[_0x3ceb('0x2a')]=_[_0x3ceb('0x27')](_0x5b2eff[_0x3ceb('0x25')],qs['fields'](_0x54db1a[_0x3ceb('0x21')][_0x3ceb('0x28')]));_0xd4d36b[_0x3ceb('0x2a')]=_0xd4d36b[_0x3ceb('0x2a')][_0x3ceb('0x29')]?_0xd4d36b['attributes']:_0x5b2eff[_0x3ceb('0x25')];_0xd4d36b[_0x3ceb('0x3e')]=qs[_0x3ceb('0x3f')](_0x54db1a[_0x3ceb('0x21')][_0x3ceb('0x3f')]);_0xd4d36b['where']=qs[_0x3ceb('0x3b')](_['pick'](_0x54db1a[_0x3ceb('0x21')],_0x5b2eff['filters']));if(_0x54db1a['query']['filter']){_0xd4d36b[_0x3ceb('0x1f')]=_[_0x3ceb('0x42')](_0xd4d36b['where'],{'$or':_[_0x3ceb('0x1a')](_0xd4d36b[_0x3ceb('0x2a')],function(_0x2d393f){var _0x1ddb80={};_0x1ddb80[_0x2d393f]={'$like':'%'+_0x54db1a[_0x3ceb('0x21')][_0x3ceb('0x41')]+'%'};return _0x1ddb80;})});}_0xd4d36b=_[_0x3ceb('0x42')]({},_0xd4d36b,_0x54db1a[_0x3ceb('0x2d')]);return _0x5d5e08[_0x3ceb('0x4e')](_0xd4d36b);}})[_0x3ceb('0x13')](function(_0x5165d1){if(_0x5165d1){_0x577d84=_0x5165d1[_0x3ceb('0x29')];if(!_0x54db1a[_0x3ceb('0x21')][_0x3ceb('0x3c')](_0x3ceb('0x3d'))){_0xd4d36b['limit']=qs[_0x3ceb('0xe')](_0x54db1a[_0x3ceb('0x21')][_0x3ceb('0xe')]);_0xd4d36b[_0x3ceb('0xc')]=qs[_0x3ceb('0xc')](_0x54db1a[_0x3ceb('0x21')]['offset']);}return _0x5d5e08[_0x3ceb('0x4e')](_0xd4d36b);}})['then'](function(_0x2e0051){if(_0x2e0051){return _0x2e0051?{'count':_0x577d84,'rows':_0x2e0051}:null;}})['then'](respondWithResult(_0x21e87a,null))[_0x3ceb('0x22')](handleError(_0x21e87a,null));};exports[_0x3ceb('0x4f')]=function(_0x4cf5c1,_0x494313){var _0x34b5e3=_0x4cf5c1[_0x3ceb('0x36')][_0x3ceb('0x50')];return db[_0x3ceb('0x51')][_0x3ceb('0x43')]({'where':{'id':_0x34b5e3},'attributes':['id'],'include':[{'model':db['User'],'as':_0x3ceb('0x52'),'attributes':['id',_0x3ceb('0x33'),'online',_0x3ceb('0x53'),_0x3ceb('0x54')],'raw':!![]}]})[_0x3ceb('0x13')](function(_0x1c858f){if(_0x1c858f){var _0xa3aee=_[_0x3ceb('0x55')](_0x1c858f,function(_0x1cd65a){var _0x2b6f35=_0x1cd65a[_0x3ceb('0x14')]({'plain':!![]});return _0x2b6f35['Agents'];});return db[_0x3ceb('0x20')][_0x3ceb('0x2e')]({'where':{'id':_0x4cf5c1[_0x3ceb('0x24')]['id']}})[_0x3ceb('0x13')](function(_0x416e9e){return db[_0x3ceb('0x56')][_0x3ceb('0x57')](function(_0x47dd84){return _0x416e9e[_0x3ceb('0x4f')](_0x34b5e3,{'transaction':_0x47dd84})[_0x3ceb('0x13')](function(){return BPromise['each'](_0xa3aee,function(_0x6a0c81){return db['UserOpenchannelQueue'][_0x3ceb('0x58')]({'where':{'UserId':_0x6a0c81['id'],'OpenchannelQueueId':_0x4cf5c1['params']['id']},'transaction':_0x47dd84});});})['then'](function(){_0xa3aee[_0x3ceb('0x59')](function(_0x34d0e8){socket[_0x3ceb('0x5a')](_0x3ceb('0x5b'),{'UserId':_0x34d0e8['id'],'OpenchannelQueueId':_0x416e9e['id']});});});});});}})[_0x3ceb('0x13')](respondWithStatusCode(_0x494313,null))[_0x3ceb('0x22')](handleError(_0x494313,null));};exports['removeTeams']=function(_0x4e32f2,_0x557f78){return db[_0x3ceb('0x51')][_0x3ceb('0x43')]({'where':{'id':_0x4e32f2['query'][_0x3ceb('0x50')]},'attributes':['id'],'include':[{'model':db[_0x3ceb('0x44')],'as':'Agents','attributes':['id'],'raw':!![]}]})[_0x3ceb('0x13')](handleEntityNotFound(_0x557f78,null))[_0x3ceb('0x13')](function(_0x22780a){var _0x57d0f9=_['map'](_0x22780a,'id');var _0x1890f0=[];var _0x351d04=[];var _0x2d608e=squel['select']();_0x2d608e[_0x3ceb('0x5c')](_0x3ceb('0x5d'))[_0x3ceb('0x5e')](_0x3ceb('0x5f'),'tq')[_0x3ceb('0x60')]('user_has_teams','ut',_0x3ceb('0x61'))[_0x3ceb('0x1f')]('OpenchannelQueueId\x20=\x20?',_0x4e32f2['params']['id']);for(var _0x5acf42=0x0;_0x5acf42<_0x22780a['length'];_0x5acf42+=0x1){let _0x590ab7=_0x22780a[_0x5acf42];for(var _0x4f72b8=0x0;_0x4f72b8<_0x590ab7[_0x3ceb('0x52')][_0x3ceb('0x29')];_0x4f72b8+=0x1){let _0x48103c=_0x590ab7[_0x3ceb('0x52')][_0x4f72b8];var _0x4d1e42=_0x2d608e[_0x3ceb('0x62')]();_0x4d1e42[_0x3ceb('0x1f')]('ut.UserId\x20=\x20?',_0x48103c['id']);_0x351d04[_0x3ceb('0x63')](db[_0x3ceb('0x56')][_0x3ceb('0x21')](_0x4d1e42[_0x3ceb('0x64')](),{'type':db[_0x3ceb('0x56')][_0x3ceb('0x65')]['SELECT']})['then'](function(_0x242794){if(_0x242794[_0x3ceb('0x29')]===0x1){return _0x48103c['id'];}else{var _0x1780df=_['every'](_[_0x3ceb('0x1a')](_0x242794,'TeamId'),function(_0x5e428b){return _['includes'](_0x57d0f9,_0x5e428b);});if(_0x1780df){return _0x48103c['id'];}}}));}}return BPromise[_0x3ceb('0x66')](_0x351d04)[_0x3ceb('0x13')](function(_0x27eb60){_0x1890f0=_(_0x1890f0)[_0x3ceb('0x67')](_0x27eb60)[_0x3ceb('0x68')]()[_0x3ceb('0x69')]();return db[_0x3ceb('0x20')]['find']({'where':{'id':_0x4e32f2[_0x3ceb('0x24')]['id']}})[_0x3ceb('0x13')](function(_0x65554d){return db[_0x3ceb('0x56')][_0x3ceb('0x57')](function(_0x29d4ff){return _0x65554d[_0x3ceb('0x6a')](_0x4e32f2[_0x3ceb('0x21')][_0x3ceb('0x50')],{'transaction':_0x29d4ff})[_0x3ceb('0x13')](function(){if(!_['isEmpty'](_0x1890f0)){return _0x65554d[_0x3ceb('0x6b')](_0x1890f0,{'transaction':_0x29d4ff});}})[_0x3ceb('0x13')](function(){_0x1890f0[_0x3ceb('0x59')](function(_0x7f6c64){socket['emit'](_0x3ceb('0x6c'),{'UserId':_0x7f6c64,'OpenchannelQueueId':_0x65554d['id']});});});});});});})[_0x3ceb('0x13')](respondWithStatusCode(_0x557f78,null))[_0x3ceb('0x22')](handleError(_0x557f78,null));};exports[_0x3ceb('0x6d')]=function(_0x3e3f9c,_0x285e93){return db['OpenchannelQueue'][_0x3ceb('0x2e')]({'where':{'id':_0x3e3f9c[_0x3ceb('0x24')]['id']}})[_0x3ceb('0x13')](handleEntityNotFound(_0x285e93,null))[_0x3ceb('0x13')](function(_0x49d2f1){if(_0x49d2f1){return _0x49d2f1[_0x3ceb('0x6d')](_0x3e3f9c[_0x3ceb('0x36')][_0x3ceb('0x50')],_[_0x3ceb('0x6e')](_0x3e3f9c[_0x3ceb('0x36')],['ids','id'])||{})[_0x3ceb('0x6f')](function(_0x3bfd45){for(var _0x42d909=0x0;_0x42d909<_0x3e3f9c['body'][_0x3ceb('0x50')]['length'];_0x42d909+=0x1){socket['emit'](_0x3ceb('0x5b'),{'UserId':Number(_0x3e3f9c[_0x3ceb('0x36')][_0x3ceb('0x50')][_0x42d909]),'OpenchannelQueueId':Number(_0x3e3f9c[_0x3ceb('0x24')]['id'])});}return _0x3bfd45;});}})[_0x3ceb('0x13')](respondWithResult(_0x285e93,null))['catch'](handleError(_0x285e93,null));};exports[_0x3ceb('0x6b')]=function(_0x32aeda,_0x472751){return db['OpenchannelQueue'][_0x3ceb('0x2e')]({'where':{'id':_0x32aeda[_0x3ceb('0x24')]['id']}})[_0x3ceb('0x13')](handleEntityNotFound(_0x472751,null))[_0x3ceb('0x13')](function(_0x1a8ada){if(_0x1a8ada){return _0x1a8ada[_0x3ceb('0x6b')](_0x32aeda[_0x3ceb('0x21')][_0x3ceb('0x50')])[_0x3ceb('0x13')](function(){if(_[_0x3ceb('0x70')](_0x32aeda[_0x3ceb('0x21')][_0x3ceb('0x50')])){for(var _0x5a256c=0x0;_0x5a256c<_0x32aeda[_0x3ceb('0x21')][_0x3ceb('0x50')][_0x3ceb('0x29')];_0x5a256c+=0x1){socket[_0x3ceb('0x5a')]('userOpenchannelQueue:remove',{'UserId':Number(_0x32aeda[_0x3ceb('0x21')][_0x3ceb('0x50')][_0x5a256c]),'OpenchannelQueueId':Number(_0x32aeda[_0x3ceb('0x24')]['id'])});}}else{socket[_0x3ceb('0x5a')]('userOpenchannelQueue:remove',{'UserId':Number(_0x32aeda[_0x3ceb('0x21')][_0x3ceb('0x50')]),'OpenchannelQueueId':Number(_0x32aeda['params']['id'])});}});}})[_0x3ceb('0x13')](respondWithStatusCode(_0x472751,null))[_0x3ceb('0x22')](handleError(_0x472751,null));};exports[_0x3ceb('0x71')]=function(_0x77ee36,_0x398a2f){var _0x199982={};var _0x44f5be={};var _0x48a7cf;var _0x487533;return db[_0x3ceb('0x20')][_0x3ceb('0x39')]({'where':{'id':_0x77ee36['params']['id']}})[_0x3ceb('0x13')](handleEntityNotFound(_0x398a2f,null))[_0x3ceb('0x13')](function(_0x148e69){if(_0x148e69){_0x48a7cf=_0x148e69;_0x44f5be[_0x3ceb('0x25')]=_[_0x3ceb('0x26')](db['User'][_0x3ceb('0x1b')]);_0x44f5be[_0x3ceb('0x21')]=_[_0x3ceb('0x26')](_0x77ee36[_0x3ceb('0x21')]);_0x44f5be[_0x3ceb('0x3b')]=_['intersection'](_0x44f5be[_0x3ceb('0x25')],_0x44f5be[_0x3ceb('0x21')]);_0x199982[_0x3ceb('0x2a')]=_[_0x3ceb('0x27')](_0x44f5be[_0x3ceb('0x25')],qs[_0x3ceb('0x28')](_0x77ee36['query']['fields']));_0x199982[_0x3ceb('0x2a')]=_0x199982['attributes'][_0x3ceb('0x29')]?_0x199982[_0x3ceb('0x2a')]:_0x44f5be['model'];_0x199982[_0x3ceb('0x3e')]=qs['sort'](_0x77ee36[_0x3ceb('0x21')][_0x3ceb('0x3f')]);_0x199982['where']=qs['filters'](_[_0x3ceb('0x72')](_0x77ee36[_0x3ceb('0x21')],_0x44f5be['filters']));if(_0x77ee36[_0x3ceb('0x21')]['filter']){_0x199982[_0x3ceb('0x1f')]=_[_0x3ceb('0x42')](_0x199982[_0x3ceb('0x1f')],{'$or':_[_0x3ceb('0x1a')](_0x199982['attributes'],function(_0x3d7115){var _0xcbbd4e={};_0xcbbd4e[_0x3d7115]={'$like':'%'+_0x77ee36[_0x3ceb('0x21')]['filter']+'%'};return _0xcbbd4e;})});}_0x199982=_['merge']({},_0x199982,_0x77ee36[_0x3ceb('0x2d')]);return _0x48a7cf[_0x3ceb('0x71')](_0x199982);}})['then'](function(_0x11ff38){if(_0x11ff38){_0x487533=_0x11ff38[_0x3ceb('0x29')];if(!_0x77ee36[_0x3ceb('0x21')][_0x3ceb('0x3c')]('nolimit')){_0x199982[_0x3ceb('0xe')]=qs[_0x3ceb('0xe')](_0x77ee36[_0x3ceb('0x21')][_0x3ceb('0xe')]);_0x199982[_0x3ceb('0xc')]=qs[_0x3ceb('0xc')](_0x77ee36[_0x3ceb('0x21')][_0x3ceb('0xc')]);}return _0x48a7cf[_0x3ceb('0x71')](_0x199982);}})[_0x3ceb('0x13')](function(_0x3523c3){if(_0x3523c3){return _0x3523c3?{'count':_0x487533,'rows':_0x3523c3}:null;}})['then'](respondWithResult(_0x398a2f,null))[_0x3ceb('0x22')](handleError(_0x398a2f,null));};
\ No newline at end of file
+var _0xf2c0=['register','end','status','json','offset','limit','count','set','update','then','destroy','get','OpenchannelQueues','sendStatus','error','name','send','index','rawAttributes','fieldName','type','getOptions','OpenchannelQueue','include','query','findAll','rows','catch','show','params','model','keys','intersection','attributes','fields','length','includeAll','merge','options','find','create','user','role','userProfileId','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','getMembers','UserOpenchannelQueue','filters','hasOwnProperty','nolimit','order','sort','where','OpenchannelQueueId','filter','map','User','findAndCountAll','UserId','openchannelPause','updatedAt','createdAt','format','SIP','getTeams','findOne','Team','pick','addTeams','ids','online','voicePause','interface','flatMap','Agents','sequelize','each','findOrCreate','emit','userOpenchannelQueue:save','removeTeams','select','tq.TeamId','from','join','user_has_teams','OpenchannelQueueId\x20=\x20?','ut.UserId\x20=\x20?','toString','SELECT','every','TeamId','includes','all','compact','value','removeAgents','forEach','userOpenchannelQueue:remove','addAgents','omit','spread','isArray','getAgents','bluebird','util','lodash','ioredis','../../components/parsers/qs','../../config/logger','../../config/environment','localhost','socket.io-emitter','redis'];(function(_0x4dbba7,_0x34d6d1){var _0x43ef83=function(_0x27acf1){while(--_0x27acf1){_0x4dbba7['push'](_0x4dbba7['shift']());}};_0x43ef83(++_0x34d6d1);}(_0xf2c0,0x6b));var _0x0f2c=function(_0x3fceb6,_0x387928){_0x3fceb6=_0x3fceb6-0x0;var _0x1be7d1=_0xf2c0[_0x3fceb6];return _0x1be7d1;};'use strict';var BPromise=require(_0x0f2c('0x0'));var util=require(_0x0f2c('0x1'));var _=require(_0x0f2c('0x2'));var squel=require('squel');var Redis=require(_0x0f2c('0x3'));var qs=require(_0x0f2c('0x4'));var logger=require(_0x0f2c('0x5'))('api');var config=require(_0x0f2c('0x6'));var db=require('../../mysqldb')['db'];config['redis']=_['defaults'](config['redis'],{'host':_0x0f2c('0x7'),'port':0x18eb});var socket=require(_0x0f2c('0x8'))(new Redis(config[_0x0f2c('0x9')]));require('./openchannelQueue.socket')[_0x0f2c('0xa')](socket);function respondWithStatusCode(_0x3736bc,_0xa5d287){_0xa5d287=_0xa5d287||0xcc;return function(_0x1b196a){if(_0x1b196a){return _0x3736bc['sendStatus'](_0xa5d287);}return _0x3736bc['status'](_0xa5d287)[_0x0f2c('0xb')]();};}function respondWithResult(_0x454b7f,_0x5c6ddd){_0x5c6ddd=_0x5c6ddd||0xc8;return function(_0x4b1fd6){if(_0x4b1fd6){return _0x454b7f[_0x0f2c('0xc')](_0x5c6ddd)[_0x0f2c('0xd')](_0x4b1fd6);}};}function respondWithFilteredResult(_0x9e9ba6,_0x5274bd){return function(_0x26c8ae){if(_0x26c8ae){var _0x436215=typeof _0x5274bd[_0x0f2c('0xe')]==='undefined'&&typeof _0x5274bd[_0x0f2c('0xf')]==='undefined';var _0x2005cf=_0x26c8ae[_0x0f2c('0x10')];var _0x2ede30=_0x436215?0x0:_0x5274bd[_0x0f2c('0xe')];var _0x420d2c=_0x436215?_0x26c8ae[_0x0f2c('0x10')]:_0x5274bd[_0x0f2c('0xe')]+_0x5274bd[_0x0f2c('0xf')];var _0xaef1ef;if(_0x420d2c>=_0x2005cf){_0x420d2c=_0x2005cf;_0xaef1ef=0xc8;}else{_0xaef1ef=0xce;}_0x9e9ba6[_0x0f2c('0xc')](_0xaef1ef);return _0x9e9ba6[_0x0f2c('0x11')]('Content-Range',_0x2ede30+'-'+_0x420d2c+'/'+_0x2005cf)['json'](_0x26c8ae);}return null;};}function saveUpdates(_0x59f586){return function(_0x1d4b71){if(_0x1d4b71){return _0x1d4b71[_0x0f2c('0x12')](_0x59f586)[_0x0f2c('0x13')](function(_0x16dc01){return _0x16dc01;});}return null;};}function removeEntity(_0x93ae49){return function(_0x50133a){if(_0x50133a){return _0x50133a[_0x0f2c('0x14')]()[_0x0f2c('0x13')](function(){var _0x4fc4b2=_0x50133a[_0x0f2c('0x15')]({'plain':!![]});var _0x3626ce=_0x0f2c('0x16');return db['UserProfileResource']['destroy']({'where':{'type':_0x3626ce,'resourceId':_0x4fc4b2['id']}})[_0x0f2c('0x13')](function(){return _0x50133a;});})[_0x0f2c('0x13')](function(){_0x93ae49[_0x0f2c('0xc')](0xcc)[_0x0f2c('0xb')]();});}};}function handleEntityNotFound(_0x4c1f01){return function(_0x2eaae3){if(!_0x2eaae3){_0x4c1f01[_0x0f2c('0x17')](0x194);}return _0x2eaae3;};}function handleError(_0xabb45d,_0x207928){_0x207928=_0x207928||0x1f4;return function(_0x383044){logger[_0x0f2c('0x18')](_0x383044['stack']);if(_0x383044[_0x0f2c('0x19')]){delete _0x383044[_0x0f2c('0x19')];}_0xabb45d['status'](_0x207928)[_0x0f2c('0x1a')](_0x383044);};}exports[_0x0f2c('0x1b')]=function(_0x21fbae,_0x2fee5b){var _0x2f52f2={};var _0x5aeeda={'count':0x0,'rows':[]};var _0x4b47f6=_['map'](db['OpenchannelQueue'][_0x0f2c('0x1c')],function(_0x331b40){return{'name':_0x331b40[_0x0f2c('0x1d')],'type':_0x331b40[_0x0f2c('0x1e')]['key']};});_0x2f52f2=qs[_0x0f2c('0x1f')](_0x4b47f6,_0x21fbae);var _0x3e02bd={'where':_0x2f52f2['where']};return db[_0x0f2c('0x20')][_0x0f2c('0x10')](_0x3e02bd)['then'](function(_0x36605a){_0x5aeeda[_0x0f2c('0x10')]=_0x36605a;_0x2f52f2['include']=qs[_0x0f2c('0x21')](_0x21fbae[_0x0f2c('0x22')]);return db[_0x0f2c('0x20')][_0x0f2c('0x23')](_0x2f52f2);})[_0x0f2c('0x13')](function(_0x19ad7c){_0x5aeeda[_0x0f2c('0x24')]=_0x19ad7c;return _0x5aeeda;})[_0x0f2c('0x13')](respondWithFilteredResult(_0x2fee5b,_0x2f52f2))[_0x0f2c('0x25')](handleError(_0x2fee5b,null));};exports[_0x0f2c('0x26')]=function(_0x1ec083,_0x3410b0){var _0x42b0fd={'raw':!![],'where':{'id':_0x1ec083[_0x0f2c('0x27')]['id']}},_0x313525={};_0x313525[_0x0f2c('0x28')]=_[_0x0f2c('0x29')](db[_0x0f2c('0x20')]['rawAttributes']);_0x313525[_0x0f2c('0x22')]=_[_0x0f2c('0x29')](_0x1ec083['query']);_0x313525['filters']=_[_0x0f2c('0x2a')](_0x313525[_0x0f2c('0x28')],_0x313525[_0x0f2c('0x22')]);_0x42b0fd[_0x0f2c('0x2b')]=_['intersection'](_0x313525[_0x0f2c('0x28')],qs[_0x0f2c('0x2c')](_0x1ec083[_0x0f2c('0x22')][_0x0f2c('0x2c')]));_0x42b0fd[_0x0f2c('0x2b')]=_0x42b0fd['attributes'][_0x0f2c('0x2d')]?_0x42b0fd[_0x0f2c('0x2b')]:_0x313525['model'];if(_0x1ec083[_0x0f2c('0x22')][_0x0f2c('0x2e')]){_0x42b0fd[_0x0f2c('0x21')]=[{'all':!![]}];}_0x42b0fd=_[_0x0f2c('0x2f')]({},_0x42b0fd,_0x1ec083[_0x0f2c('0x30')]);return db['OpenchannelQueue'][_0x0f2c('0x31')](_0x42b0fd)[_0x0f2c('0x13')](handleEntityNotFound(_0x3410b0,null))[_0x0f2c('0x13')](respondWithResult(_0x3410b0,null))['catch'](handleError(_0x3410b0,null));};exports['create']=function(_0x185a28,_0x57a9a0){return db['OpenchannelQueue'][_0x0f2c('0x32')](_0x185a28['body'],{})[_0x0f2c('0x13')](function(_0x202877){var _0x59a51c=_0x185a28[_0x0f2c('0x33')]['get']({'plain':!![]});if(!_0x59a51c)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x59a51c[_0x0f2c('0x34')]===_0x0f2c('0x33')){var _0x1bd501=_0x202877['get']({'plain':!![]});var _0x30db98=_0x0f2c('0x16');return db['UserProfileSection'][_0x0f2c('0x31')]({'where':{'name':_0x30db98,'userProfileId':_0x59a51c[_0x0f2c('0x35')]},'raw':!![]})[_0x0f2c('0x13')](function(_0x21ddfb){if(_0x21ddfb&&_0x21ddfb['autoAssociation']===0x0){return db[_0x0f2c('0x36')][_0x0f2c('0x32')]({'name':_0x1bd501[_0x0f2c('0x19')],'resourceId':_0x1bd501['id'],'type':_0x21ddfb['name'],'sectionId':_0x21ddfb['id']},{})[_0x0f2c('0x13')](function(){return _0x202877;});}else{return _0x202877;}})[_0x0f2c('0x25')](function(_0x25ba16){logger[_0x0f2c('0x18')](_0x0f2c('0x37'),_0x25ba16);throw _0x25ba16;});}return _0x202877;})['then'](respondWithResult(_0x57a9a0,0xc9))['catch'](handleError(_0x57a9a0,null));};exports[_0x0f2c('0x12')]=function(_0x4c384f,_0x317049){if(_0x4c384f[_0x0f2c('0x38')]['id']){delete _0x4c384f[_0x0f2c('0x38')]['id'];}return db[_0x0f2c('0x20')][_0x0f2c('0x31')]({'where':{'id':_0x4c384f[_0x0f2c('0x27')]['id']}})['then'](handleEntityNotFound(_0x317049,null))[_0x0f2c('0x13')](saveUpdates(_0x4c384f[_0x0f2c('0x38')],null))[_0x0f2c('0x13')](respondWithResult(_0x317049,null))[_0x0f2c('0x25')](handleError(_0x317049,null));};exports['destroy']=function(_0x25278a,_0x2a7a5c){return db[_0x0f2c('0x20')][_0x0f2c('0x31')]({'where':{'id':_0x25278a[_0x0f2c('0x27')]['id']}})[_0x0f2c('0x13')](handleEntityNotFound(_0x2a7a5c,null))['then'](removeEntity(_0x2a7a5c,null))[_0x0f2c('0x25')](handleError(_0x2a7a5c,null));};exports[_0x0f2c('0x39')]=function(_0x211349,_0x1aa371){return db['OpenchannelQueue']['describe']()[_0x0f2c('0x13')](respondWithResult(_0x1aa371,null))['catch'](handleError(_0x1aa371,null));};exports[_0x0f2c('0x3a')]=function(_0x1e6b71,_0x3f1431){var _0xbf7223={'raw':!![],'where':{}},_0x23655d={},_0x2cb42a;return db[_0x0f2c('0x20')]['findOne']({'where':{'id':_0x1e6b71['params']['id']}})['then'](handleEntityNotFound(_0x3f1431,null))['then'](function(_0x192a8f){if(_0x192a8f){_0x2cb42a=_0x192a8f[_0x0f2c('0x15')]({'plain':!![]});_0x23655d[_0x0f2c('0x28')]=_[_0x0f2c('0x29')](db[_0x0f2c('0x3b')][_0x0f2c('0x1c')]);_0x23655d[_0x0f2c('0x22')]=_['keys'](_0x1e6b71['query']);_0x23655d[_0x0f2c('0x3c')]=_[_0x0f2c('0x2a')](_0x23655d[_0x0f2c('0x28')],_0x23655d[_0x0f2c('0x22')]);_0xbf7223['attributes']=_[_0x0f2c('0x2a')](_0x23655d['model'],qs[_0x0f2c('0x2c')](_0x1e6b71['query'][_0x0f2c('0x2c')]));_0xbf7223['attributes']=_0xbf7223[_0x0f2c('0x2b')][_0x0f2c('0x2d')]?_0xbf7223['attributes']:_0x23655d[_0x0f2c('0x28')];if(!_0x1e6b71['query'][_0x0f2c('0x3d')](_0x0f2c('0x3e'))){_0xbf7223[_0x0f2c('0xf')]=qs[_0x0f2c('0xf')](_0x1e6b71[_0x0f2c('0x22')][_0x0f2c('0xf')]);_0xbf7223['offset']=qs['offset'](_0x1e6b71['query']['offset']);}_0xbf7223[_0x0f2c('0x3f')]=qs['sort'](_0x1e6b71[_0x0f2c('0x22')][_0x0f2c('0x40')]);_0xbf7223['where']=qs[_0x0f2c('0x3c')](_['pick'](_0x1e6b71[_0x0f2c('0x22')],_0x23655d['filters']));_0xbf7223[_0x0f2c('0x41')][_0x0f2c('0x42')]=_0x192a8f['id'];if(_0x1e6b71['query'][_0x0f2c('0x43')]){_0xbf7223['where']=_[_0x0f2c('0x2f')](_0xbf7223[_0x0f2c('0x41')],{'$or':_[_0x0f2c('0x44')](_0xbf7223[_0x0f2c('0x2b')],function(_0xba205f){var _0x36080f={};_0x36080f[_0xba205f]={'$like':'%'+_0x1e6b71[_0x0f2c('0x22')][_0x0f2c('0x43')]+'%'};return _0x36080f;})});}_0xbf7223=_['merge']({},_0xbf7223,_0x1e6b71[_0x0f2c('0x30')]);return db['UserOpenchannelQueue'][_0x0f2c('0x23')](_0xbf7223);}})[_0x0f2c('0x13')](function(_0xb1858d){if(_0xb1858d){return db[_0x0f2c('0x45')][_0x0f2c('0x46')]({'where':{'id':_[_0x0f2c('0x44')](_0xb1858d,_0x0f2c('0x47')),'role':'agent'},'attributes':['id',_0x0f2c('0x19'),_0x0f2c('0x48'),_0x0f2c('0x49'),_0x0f2c('0x4a')]});}})[_0x0f2c('0x13')](function(_0x4e16e1){if(_0x4e16e1){return{'count':_0x4e16e1[_0x0f2c('0x10')],'rows':_[_0x0f2c('0x44')](_0x4e16e1['rows'],function(_0x577cb1){return{'membername':_0x577cb1[_0x0f2c('0x19')],'UserId':_0x577cb1['id'],'queue_name':_0x2cb42a[_0x0f2c('0x19')],'OpenchannelQueueId':_0x2cb42a['id'],'interface':util[_0x0f2c('0x4b')]('%s/%s',_0x0f2c('0x4c'),_0x577cb1[_0x0f2c('0x19')]),'penalty':0x0,'paused':_0x577cb1[_0x0f2c('0x48')],'createdAt':_0x577cb1[_0x0f2c('0x4a')],'updatedAt':_0x577cb1[_0x0f2c('0x49')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x0f2c('0x13')](respondWithFilteredResult(_0x3f1431,_0xbf7223))[_0x0f2c('0x25')](handleError(_0x3f1431,null));};exports[_0x0f2c('0x4d')]=function(_0x5175ab,_0x2910d7){var _0x4d286a={};var _0x52408c={};var _0x4d1d96;var _0x500c25;return db['OpenchannelQueue'][_0x0f2c('0x4e')]({'where':{'id':_0x5175ab['params']['id']}})['then'](handleEntityNotFound(_0x2910d7,null))[_0x0f2c('0x13')](function(_0xb8ad0a){if(_0xb8ad0a){_0x4d1d96=_0xb8ad0a;_0x52408c['model']=_[_0x0f2c('0x29')](db[_0x0f2c('0x4f')][_0x0f2c('0x1c')]);_0x52408c['query']=_[_0x0f2c('0x29')](_0x5175ab[_0x0f2c('0x22')]);_0x52408c[_0x0f2c('0x3c')]=_[_0x0f2c('0x2a')](_0x52408c[_0x0f2c('0x28')],_0x52408c['query']);_0x4d286a['attributes']=_[_0x0f2c('0x2a')](_0x52408c[_0x0f2c('0x28')],qs['fields'](_0x5175ab['query']['fields']));_0x4d286a[_0x0f2c('0x2b')]=_0x4d286a[_0x0f2c('0x2b')]['length']?_0x4d286a[_0x0f2c('0x2b')]:_0x52408c[_0x0f2c('0x28')];_0x4d286a[_0x0f2c('0x3f')]=qs['sort'](_0x5175ab[_0x0f2c('0x22')][_0x0f2c('0x40')]);_0x4d286a[_0x0f2c('0x41')]=qs[_0x0f2c('0x3c')](_[_0x0f2c('0x50')](_0x5175ab[_0x0f2c('0x22')],_0x52408c[_0x0f2c('0x3c')]));if(_0x5175ab[_0x0f2c('0x22')][_0x0f2c('0x43')]){_0x4d286a[_0x0f2c('0x41')]=_[_0x0f2c('0x2f')](_0x4d286a['where'],{'$or':_[_0x0f2c('0x44')](_0x4d286a[_0x0f2c('0x2b')],function(_0x8b6e2){var _0x418ae8={};_0x418ae8[_0x8b6e2]={'$like':'%'+_0x5175ab[_0x0f2c('0x22')][_0x0f2c('0x43')]+'%'};return _0x418ae8;})});}_0x4d286a=_['merge']({},_0x4d286a,_0x5175ab[_0x0f2c('0x30')]);return _0x4d1d96[_0x0f2c('0x4d')](_0x4d286a);}})['then'](function(_0xc20a3c){if(_0xc20a3c){_0x500c25=_0xc20a3c['length'];if(!_0x5175ab[_0x0f2c('0x22')]['hasOwnProperty'](_0x0f2c('0x3e'))){_0x4d286a[_0x0f2c('0xf')]=qs['limit'](_0x5175ab[_0x0f2c('0x22')]['limit']);_0x4d286a[_0x0f2c('0xe')]=qs[_0x0f2c('0xe')](_0x5175ab[_0x0f2c('0x22')][_0x0f2c('0xe')]);}return _0x4d1d96[_0x0f2c('0x4d')](_0x4d286a);}})['then'](function(_0x35e07a){if(_0x35e07a){return _0x35e07a?{'count':_0x500c25,'rows':_0x35e07a}:null;}})[_0x0f2c('0x13')](respondWithResult(_0x2910d7,null))[_0x0f2c('0x25')](handleError(_0x2910d7,null));};exports[_0x0f2c('0x51')]=function(_0x593026,_0x4cdd12){var _0x5a5e3f=_0x593026[_0x0f2c('0x38')][_0x0f2c('0x52')];return db['Team'][_0x0f2c('0x23')]({'where':{'id':_0x5a5e3f},'attributes':['id'],'include':[{'model':db[_0x0f2c('0x45')],'as':'Agents','attributes':['id',_0x0f2c('0x19'),_0x0f2c('0x53'),_0x0f2c('0x54'),_0x0f2c('0x55')],'raw':!![]}]})[_0x0f2c('0x13')](function(_0x48a9ed){if(_0x48a9ed){var _0x48d640=_[_0x0f2c('0x56')](_0x48a9ed,function(_0x2a6868){var _0x1688c7=_0x2a6868[_0x0f2c('0x15')]({'plain':!![]});return _0x1688c7[_0x0f2c('0x57')];});return db[_0x0f2c('0x20')]['find']({'where':{'id':_0x593026['params']['id']}})['then'](function(_0x38cf96){return db[_0x0f2c('0x58')]['transaction'](function(_0x2f8ff5){return _0x38cf96[_0x0f2c('0x51')](_0x5a5e3f,{'transaction':_0x2f8ff5})[_0x0f2c('0x13')](function(){return BPromise[_0x0f2c('0x59')](_0x48d640,function(_0x49d9ff){return db['UserOpenchannelQueue'][_0x0f2c('0x5a')]({'where':{'UserId':_0x49d9ff['id'],'OpenchannelQueueId':_0x593026[_0x0f2c('0x27')]['id']},'transaction':_0x2f8ff5});});})[_0x0f2c('0x13')](function(){_0x48d640['forEach'](function(_0x1cabad){socket[_0x0f2c('0x5b')](_0x0f2c('0x5c'),{'UserId':_0x1cabad['id'],'OpenchannelQueueId':_0x38cf96['id']});});});});});}})[_0x0f2c('0x13')](respondWithStatusCode(_0x4cdd12,null))['catch'](handleError(_0x4cdd12,null));};exports[_0x0f2c('0x5d')]=function(_0x50faa2,_0xefc13a){return db['Team'][_0x0f2c('0x23')]({'where':{'id':_0x50faa2['query'][_0x0f2c('0x52')]},'attributes':['id'],'include':[{'model':db[_0x0f2c('0x45')],'as':_0x0f2c('0x57'),'attributes':['id'],'raw':!![]}]})[_0x0f2c('0x13')](handleEntityNotFound(_0xefc13a,null))['then'](function(_0x32c36c){var _0x348238=_[_0x0f2c('0x44')](_0x32c36c,'id');var _0x5bcab3=[];var _0x335144=[];var _0x25111f=squel[_0x0f2c('0x5e')]();_0x25111f['field'](_0x0f2c('0x5f'))[_0x0f2c('0x60')]('team_has_openchannel_queues','tq')[_0x0f2c('0x61')](_0x0f2c('0x62'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0x0f2c('0x41')](_0x0f2c('0x63'),_0x50faa2[_0x0f2c('0x27')]['id']);for(var _0x3869a2=0x0;_0x3869a2<_0x32c36c[_0x0f2c('0x2d')];_0x3869a2+=0x1){let _0x2190cd=_0x32c36c[_0x3869a2];for(var _0x522483=0x0;_0x522483<_0x2190cd[_0x0f2c('0x57')]['length'];_0x522483+=0x1){let _0x5709d4=_0x2190cd['Agents'][_0x522483];var _0x1c3f4b=_0x25111f['clone']();_0x1c3f4b['where'](_0x0f2c('0x64'),_0x5709d4['id']);_0x335144['push'](db[_0x0f2c('0x58')][_0x0f2c('0x22')](_0x1c3f4b[_0x0f2c('0x65')](),{'type':db[_0x0f2c('0x58')]['QueryTypes'][_0x0f2c('0x66')]})[_0x0f2c('0x13')](function(_0x1377c9){if(_0x1377c9[_0x0f2c('0x2d')]===0x1){return _0x5709d4['id'];}else{var _0x48b117=_[_0x0f2c('0x67')](_[_0x0f2c('0x44')](_0x1377c9,_0x0f2c('0x68')),function(_0x5eaca5){return _[_0x0f2c('0x69')](_0x348238,_0x5eaca5);});if(_0x48b117){return _0x5709d4['id'];}}}));}}return BPromise[_0x0f2c('0x6a')](_0x335144)[_0x0f2c('0x13')](function(_0x34ba92){_0x5bcab3=_(_0x5bcab3)['union'](_0x34ba92)[_0x0f2c('0x6b')]()[_0x0f2c('0x6c')]();return db[_0x0f2c('0x20')][_0x0f2c('0x31')]({'where':{'id':_0x50faa2[_0x0f2c('0x27')]['id']}})[_0x0f2c('0x13')](function(_0x338145){return db[_0x0f2c('0x58')]['transaction'](function(_0x845a52){return _0x338145[_0x0f2c('0x5d')](_0x50faa2[_0x0f2c('0x22')]['ids'],{'transaction':_0x845a52})['then'](function(){if(!_['isEmpty'](_0x5bcab3)){return _0x338145[_0x0f2c('0x6d')](_0x5bcab3,{'transaction':_0x845a52});}})[_0x0f2c('0x13')](function(){_0x5bcab3[_0x0f2c('0x6e')](function(_0x5d248a){socket[_0x0f2c('0x5b')](_0x0f2c('0x6f'),{'UserId':_0x5d248a,'OpenchannelQueueId':_0x338145['id']});});});});});});})[_0x0f2c('0x13')](respondWithStatusCode(_0xefc13a,null))[_0x0f2c('0x25')](handleError(_0xefc13a,null));};exports[_0x0f2c('0x70')]=function(_0x550f7c,_0x227892){return db[_0x0f2c('0x20')][_0x0f2c('0x31')]({'where':{'id':_0x550f7c[_0x0f2c('0x27')]['id']}})[_0x0f2c('0x13')](handleEntityNotFound(_0x227892,null))[_0x0f2c('0x13')](function(_0x204998){if(_0x204998){return _0x204998[_0x0f2c('0x70')](_0x550f7c[_0x0f2c('0x38')][_0x0f2c('0x52')],_[_0x0f2c('0x71')](_0x550f7c[_0x0f2c('0x38')],[_0x0f2c('0x52'),'id'])||{})[_0x0f2c('0x72')](function(_0xfb4db1){for(var _0xfe0f5e=0x0;_0xfe0f5e<_0x550f7c[_0x0f2c('0x38')][_0x0f2c('0x52')][_0x0f2c('0x2d')];_0xfe0f5e+=0x1){socket[_0x0f2c('0x5b')]('userOpenchannelQueue:save',{'UserId':Number(_0x550f7c[_0x0f2c('0x38')][_0x0f2c('0x52')][_0xfe0f5e]),'OpenchannelQueueId':Number(_0x550f7c['params']['id'])});}return _0xfb4db1;});}})[_0x0f2c('0x13')](respondWithResult(_0x227892,null))[_0x0f2c('0x25')](handleError(_0x227892,null));};exports['removeAgents']=function(_0x595c06,_0x1f211d){return db[_0x0f2c('0x20')]['find']({'where':{'id':_0x595c06['params']['id']}})['then'](handleEntityNotFound(_0x1f211d,null))[_0x0f2c('0x13')](function(_0x56134f){if(_0x56134f){return _0x56134f['removeAgents'](_0x595c06['query'][_0x0f2c('0x52')])[_0x0f2c('0x13')](function(){if(_[_0x0f2c('0x73')](_0x595c06['query'][_0x0f2c('0x52')])){for(var _0x5cc0f3=0x0;_0x5cc0f3<_0x595c06[_0x0f2c('0x22')]['ids'][_0x0f2c('0x2d')];_0x5cc0f3+=0x1){socket[_0x0f2c('0x5b')](_0x0f2c('0x6f'),{'UserId':Number(_0x595c06[_0x0f2c('0x22')]['ids'][_0x5cc0f3]),'OpenchannelQueueId':Number(_0x595c06[_0x0f2c('0x27')]['id'])});}}else{socket['emit']('userOpenchannelQueue:remove',{'UserId':Number(_0x595c06[_0x0f2c('0x22')][_0x0f2c('0x52')]),'OpenchannelQueueId':Number(_0x595c06[_0x0f2c('0x27')]['id'])});}});}})['then'](respondWithStatusCode(_0x1f211d,null))[_0x0f2c('0x25')](handleError(_0x1f211d,null));};exports[_0x0f2c('0x74')]=function(_0xcd993b,_0x2d20f7){var _0x2b5b63={};var _0x24d794={};var _0x4d4812;var _0x33aee7;return db[_0x0f2c('0x20')][_0x0f2c('0x4e')]({'where':{'id':_0xcd993b[_0x0f2c('0x27')]['id']}})['then'](handleEntityNotFound(_0x2d20f7,null))[_0x0f2c('0x13')](function(_0x360850){if(_0x360850){_0x4d4812=_0x360850;_0x24d794[_0x0f2c('0x28')]=_['keys'](db[_0x0f2c('0x45')][_0x0f2c('0x1c')]);_0x24d794[_0x0f2c('0x22')]=_[_0x0f2c('0x29')](_0xcd993b[_0x0f2c('0x22')]);_0x24d794['filters']=_['intersection'](_0x24d794[_0x0f2c('0x28')],_0x24d794['query']);_0x2b5b63[_0x0f2c('0x2b')]=_[_0x0f2c('0x2a')](_0x24d794[_0x0f2c('0x28')],qs[_0x0f2c('0x2c')](_0xcd993b[_0x0f2c('0x22')]['fields']));_0x2b5b63[_0x0f2c('0x2b')]=_0x2b5b63[_0x0f2c('0x2b')][_0x0f2c('0x2d')]?_0x2b5b63['attributes']:_0x24d794[_0x0f2c('0x28')];_0x2b5b63['order']=qs[_0x0f2c('0x40')](_0xcd993b[_0x0f2c('0x22')][_0x0f2c('0x40')]);_0x2b5b63[_0x0f2c('0x41')]=qs['filters'](_[_0x0f2c('0x50')](_0xcd993b[_0x0f2c('0x22')],_0x24d794['filters']));if(_0xcd993b['query'][_0x0f2c('0x43')]){_0x2b5b63[_0x0f2c('0x41')]=_[_0x0f2c('0x2f')](_0x2b5b63[_0x0f2c('0x41')],{'$or':_['map'](_0x2b5b63[_0x0f2c('0x2b')],function(_0x2c2da9){var _0x21abf4={};_0x21abf4[_0x2c2da9]={'$like':'%'+_0xcd993b[_0x0f2c('0x22')][_0x0f2c('0x43')]+'%'};return _0x21abf4;})});}_0x2b5b63=_[_0x0f2c('0x2f')]({},_0x2b5b63,_0xcd993b[_0x0f2c('0x30')]);return _0x4d4812['getAgents'](_0x2b5b63);}})['then'](function(_0x4cffbe){if(_0x4cffbe){_0x33aee7=_0x4cffbe[_0x0f2c('0x2d')];if(!_0xcd993b[_0x0f2c('0x22')][_0x0f2c('0x3d')]('nolimit')){_0x2b5b63[_0x0f2c('0xf')]=qs[_0x0f2c('0xf')](_0xcd993b['query'][_0x0f2c('0xf')]);_0x2b5b63[_0x0f2c('0xe')]=qs[_0x0f2c('0xe')](_0xcd993b['query'][_0x0f2c('0xe')]);}return _0x4d4812[_0x0f2c('0x74')](_0x2b5b63);}})[_0x0f2c('0x13')](function(_0x56c583){if(_0x56c583){return _0x56c583?{'count':_0x33aee7,'rows':_0x56c583}:null;}})[_0x0f2c('0x13')](respondWithResult(_0x2d20f7,null))[_0x0f2c('0x25')](handleError(_0x2d20f7,null));};
\ No newline at end of file
index ee5b0f3..8ed38c0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfd0a=['update','remove','emit','hasOwnProperty','hook','../../mysqldb','OpenchannelQueue','setMaxListeners','save'];(function(_0x431e58,_0x464075){var _0x3b608b=function(_0x413c4f){while(--_0x413c4f){_0x431e58['push'](_0x431e58['shift']());}};_0x3b608b(++_0x464075);}(_0xfd0a,0xe6));var _0xafd0=function(_0x3d1187,_0x2a8e79){_0x3d1187=_0x3d1187-0x0;var _0x3ceb4d=_0xfd0a[_0x3d1187];return _0x3ceb4d;};'use strict';var EventEmitter=require('events');var OpenchannelQueue=require(_0xafd0('0x0'))['db'][_0xafd0('0x1')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents[_0xafd0('0x2')](0x0);var events={'afterCreate':_0xafd0('0x3'),'afterUpdate':_0xafd0('0x4'),'afterDestroy':_0xafd0('0x5')};function emitEvent(_0x4b6b11){return function(_0x1a0b0c,_0x306718,_0x327b56){OpenchannelQueueEvents[_0xafd0('0x6')](_0x4b6b11+':'+_0x1a0b0c['id'],_0x1a0b0c);OpenchannelQueueEvents[_0xafd0('0x6')](_0x4b6b11,_0x1a0b0c);_0x327b56(null);};}for(var e in events){if(events[_0xafd0('0x7')](e)){var event=events[e];OpenchannelQueue[_0xafd0('0x8')](e,emitEvent(event));}}module['exports']=OpenchannelQueueEvents;
\ No newline at end of file
+var _0x2d12=['save','remove','emit','hasOwnProperty','hook','exports','../../mysqldb','setMaxListeners'];(function(_0x3959bc,_0x368811){var _0x6027e1=function(_0xdc9062){while(--_0xdc9062){_0x3959bc['push'](_0x3959bc['shift']());}};_0x6027e1(++_0x368811);}(_0x2d12,0x156));var _0x22d1=function(_0x5310d6,_0x3d8813){_0x5310d6=_0x5310d6-0x0;var _0x41cf06=_0x2d12[_0x5310d6];return _0x41cf06;};'use strict';var EventEmitter=require('events');var OpenchannelQueue=require(_0x22d1('0x0'))['db']['OpenchannelQueue'];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents[_0x22d1('0x1')](0x0);var events={'afterCreate':_0x22d1('0x2'),'afterUpdate':'update','afterDestroy':_0x22d1('0x3')};function emitEvent(_0x21c783){return function(_0x55a09b,_0x181cec,_0x52838f){OpenchannelQueueEvents[_0x22d1('0x4')](_0x21c783+':'+_0x55a09b['id'],_0x55a09b);OpenchannelQueueEvents[_0x22d1('0x4')](_0x21c783,_0x55a09b);_0x52838f(null);};}for(var e in events){if(events[_0x22d1('0x5')](e)){var event=events[e];OpenchannelQueue[_0x22d1('0x6')](e,emitEvent(event));}}module[_0x22d1('0x7')]=OpenchannelQueueEvents;
\ No newline at end of file
index ca7e13f..f75d47d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5b9e=['exports','OpenchannelQueue','../../config/logger','api','moment','path','rimraf','./openchannelQueue.attributes'];(function(_0x529296,_0x1a6a23){var _0x1796bf=function(_0x3cae53){while(--_0x3cae53){_0x529296['push'](_0x529296['shift']());}};_0x1796bf(++_0x1a6a23);}(_0x5b9e,0x122));var _0xe5b9=function(_0x580d1e,_0x2062d1){_0x580d1e=_0x580d1e-0x0;var _0x475c21=_0x5b9e[_0x580d1e];return _0x475c21;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xe5b9('0x0'))(_0xe5b9('0x1'));var moment=require(_0xe5b9('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xe5b9('0x3'));var rimraf=require(_0xe5b9('0x4'));var config=require('../../config/environment');var attributes=require(_0xe5b9('0x5'));module[_0xe5b9('0x6')]=function(_0x5c7543,_0x1a69ef){return _0x5c7543['define'](_0xe5b9('0x7'),attributes,{'tableName':'openchannel_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xb8bb=['bluebird','request-promise','path','rimraf','../../config/environment','./openchannelQueue.attributes','exports','define','OpenchannelQueue','lodash','util','moment'];(function(_0x1a014b,_0x48acae){var _0x462258=function(_0x1473be){while(--_0x1473be){_0x1a014b['push'](_0x1a014b['shift']());}};_0x462258(++_0x48acae);}(_0xb8bb,0x1ad));var _0xbb8b=function(_0x200341,_0x3b5b5b){_0x200341=_0x200341-0x0;var _0x453bd4=_0xb8bb[_0x200341];return _0x453bd4;};'use strict';var _=require(_0xbb8b('0x0'));var util=require(_0xbb8b('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xbb8b('0x2'));var BPromise=require(_0xbb8b('0x3'));var rp=require(_0xbb8b('0x4'));var fs=require('fs');var path=require(_0xbb8b('0x5'));var rimraf=require(_0xbb8b('0x6'));var config=require(_0xbb8b('0x7'));var attributes=require(_0xbb8b('0x8'));module[_0xbb8b('0x9')]=function(_0x279cca,_0x369bb4){return _0x279cca[_0xbb8b('0xa')](_0xbb8b('0xb'),attributes,{'tableName':'openchannel_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 936fc23..b19ec8f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9c41=['code','message','OpenchannelQueue,\x20%s,\x20%s','GetOpenchannelQueue','findAll','options','raw','limit','include','model','attributes','map','catch','ShowOpenchannelQueue','OpenchannelQueue','find','where','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','redis','localhost','./openchannelQueue.socket','request','then','info','request\x20sent','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0xbec237,_0x444d0f){var _0x57ba82=function(_0xc9dda3){while(--_0xc9dda3){_0xbec237['push'](_0xbec237['shift']());}};_0x57ba82(++_0x444d0f);}(_0x9c41,0x183));var _0x19c4=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x9c41[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x19c4('0x0'));var util=require('util');var moment=require(_0x19c4('0x1'));var BPromise=require(_0x19c4('0x2'));var rs=require(_0x19c4('0x3'));var fs=require('fs');var Redis=require(_0x19c4('0x4'));var db=require(_0x19c4('0x5'))['db'];var utils=require(_0x19c4('0x6'));var logger=require('../../config/logger')(_0x19c4('0x7'));var config=require(_0x19c4('0x8'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});config[_0x19c4('0x9')]=_['defaults'](config[_0x19c4('0x9')],{'host':_0x19c4('0xa'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x19c4('0x9')]));require(_0x19c4('0xb'))['register'](socket);function respondWithRpcPromise(_0x2606fe,_0x136376,_0x760471){return new BPromise(function(_0x3ce9df,_0xf61ada){return client[_0x19c4('0xc')](_0x2606fe,_0x760471)[_0x19c4('0xd')](function(_0x349f67){logger[_0x19c4('0xe')]('OpenchannelQueue,\x20%s,\x20%s',_0x136376,_0x19c4('0xf'));logger[_0x19c4('0x10')](_0x19c4('0x11'),_0x136376,_0x19c4('0xf'),JSON[_0x19c4('0x12')](_0x349f67));if(_0x349f67['error']){if(_0x349f67[_0x19c4('0x13')][_0x19c4('0x14')]===0x1f4){logger[_0x19c4('0x13')]('OpenchannelQueue,\x20%s,\x20%s',_0x136376,_0x349f67[_0x19c4('0x13')][_0x19c4('0x15')]);return _0xf61ada(_0x349f67[_0x19c4('0x13')][_0x19c4('0x15')]);}logger[_0x19c4('0x13')](_0x19c4('0x16'),_0x136376,_0x349f67[_0x19c4('0x13')]['message']);return _0x3ce9df(_0x349f67[_0x19c4('0x13')][_0x19c4('0x15')]);}else{logger[_0x19c4('0xe')](_0x19c4('0x16'),_0x136376,_0x19c4('0xf'));_0x3ce9df(_0x349f67['result'][_0x19c4('0x15')]);}})['catch'](function(_0x4ce993){logger['error']('OpenchannelQueue,\x20%s,\x20%s',_0x136376,_0x4ce993);_0xf61ada(_0x4ce993);});});}exports[_0x19c4('0x17')]=function(_0xb3a84f){var _0x14d29c=this;return new Promise(function(_0x4a0ad,_0x11572b){return db['OpenchannelQueue'][_0x19c4('0x18')]({'raw':_0xb3a84f[_0x19c4('0x19')]?_0xb3a84f[_0x19c4('0x19')][_0x19c4('0x1a')]===undefined?!![]:![]:!![],'where':_0xb3a84f[_0x19c4('0x19')]?_0xb3a84f[_0x19c4('0x19')]['where']||null:null,'attributes':_0xb3a84f[_0x19c4('0x19')]?_0xb3a84f['options']['attributes']||null:null,'limit':_0xb3a84f[_0x19c4('0x19')]?_0xb3a84f['options'][_0x19c4('0x1b')]||null:null,'include':_0xb3a84f[_0x19c4('0x19')]?_0xb3a84f[_0x19c4('0x19')][_0x19c4('0x1c')]?_['map'](_0xb3a84f['options']['include'],function(_0x10b097){return{'model':db[_0x10b097[_0x19c4('0x1d')]],'as':_0x10b097['as'],'attributes':_0x10b097[_0x19c4('0x1e')],'include':_0x10b097[_0x19c4('0x1c')]?_[_0x19c4('0x1f')](_0x10b097[_0x19c4('0x1c')],function(_0x3f2ca1){return{'model':db[_0x3f2ca1[_0x19c4('0x1d')]],'as':_0x3f2ca1['as'],'attributes':_0x3f2ca1[_0x19c4('0x1e')],'include':_0x3f2ca1[_0x19c4('0x1c')]?_[_0x19c4('0x1f')](_0x3f2ca1[_0x19c4('0x1c')],function(_0xcd2f5c){return{'model':db[_0xcd2f5c['model']],'as':_0xcd2f5c['as'],'attributes':_0xcd2f5c['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x4cf883){logger['info']('GetOpenchannelQueue',_0xb3a84f);logger[_0x19c4('0x10')](_0x19c4('0x17'),_0xb3a84f,JSON['stringify'](_0x4cf883));_0x4a0ad(_0x4cf883);})[_0x19c4('0x20')](function(_0x30aa68){logger[_0x19c4('0x13')]('GetOpenchannelQueue',_0x30aa68[_0x19c4('0x15')],_0xb3a84f);_0x11572b(_0x14d29c[_0x19c4('0x13')](0x1f4,_0x30aa68[_0x19c4('0x15')]));});});};exports[_0x19c4('0x21')]=function(_0x412b39){var _0x4bd109=this;return new Promise(function(_0x345042,_0x2818d9){return db[_0x19c4('0x22')][_0x19c4('0x23')]({'raw':_0x412b39['options']?_0x412b39[_0x19c4('0x19')]['raw']===undefined?!![]:![]:!![],'where':_0x412b39[_0x19c4('0x19')]?_0x412b39[_0x19c4('0x19')][_0x19c4('0x24')]||null:null,'attributes':_0x412b39['options']?_0x412b39['options'][_0x19c4('0x1e')]||null:null,'include':_0x412b39[_0x19c4('0x19')]?_0x412b39[_0x19c4('0x19')][_0x19c4('0x1c')]?_[_0x19c4('0x1f')](_0x412b39['options'][_0x19c4('0x1c')],function(_0x21f029){return{'model':db[_0x21f029[_0x19c4('0x1d')]],'as':_0x21f029['as'],'attributes':_0x21f029[_0x19c4('0x1e')],'include':_0x21f029['include']?_[_0x19c4('0x1f')](_0x21f029[_0x19c4('0x1c')],function(_0x1f9281){return{'model':db[_0x1f9281['model']],'as':_0x1f9281['as'],'attributes':_0x1f9281[_0x19c4('0x1e')],'include':_0x1f9281[_0x19c4('0x1c')]?_[_0x19c4('0x1f')](_0x1f9281['include'],function(_0x596f8c){return{'model':db[_0x596f8c[_0x19c4('0x1d')]],'as':_0x596f8c['as'],'attributes':_0x596f8c[_0x19c4('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x19c4('0xd')](function(_0x42065d){logger['info'](_0x19c4('0x21'),_0x412b39);logger['debug']('ShowOpenchannelQueue',_0x412b39,JSON['stringify'](_0x42065d));_0x345042(_0x42065d);})[_0x19c4('0x20')](function(_0x446099){logger['error'](_0x19c4('0x21'),_0x446099[_0x19c4('0x15')],_0x412b39);_0x2818d9(_0x4bd109[_0x19c4('0x13')](0x1f4,_0x446099['message']));});});};
\ No newline at end of file
+var _0x3922=['info','OpenchannelQueue,\x20%s,\x20%s','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','GetOpenchannelQueue','OpenchannelQueue','findAll','options','raw','where','include','map','model','attributes','find','ShowOpenchannelQueue','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter','./openchannelQueue.socket','register','request','then'];(function(_0x566dd5,_0x491250){var _0x184612=function(_0xe8a501){while(--_0xe8a501){_0x566dd5['push'](_0x566dd5['shift']());}};_0x184612(++_0x491250);}(_0x3922,0x15e));var _0x2392=function(_0xdea652,_0x3d74b4){_0xdea652=_0xdea652-0x0;var _0x1335ae=_0x3922[_0xdea652];return _0x1335ae;};'use strict';var _=require(_0x2392('0x0'));var util=require(_0x2392('0x1'));var moment=require(_0x2392('0x2'));var BPromise=require(_0x2392('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x2392('0x4'))['db'];var utils=require(_0x2392('0x5'));var logger=require(_0x2392('0x6'))(_0x2392('0x7'));var config=require(_0x2392('0x8'));var jayson=require(_0x2392('0x9'));var client=jayson[_0x2392('0xa')][_0x2392('0xb')]({'port':0x232a});config[_0x2392('0xc')]=_['defaults'](config[_0x2392('0xc')],{'host':_0x2392('0xd'),'port':0x18eb});var socket=require(_0x2392('0xe'))(new Redis(config[_0x2392('0xc')]));require(_0x2392('0xf'))[_0x2392('0x10')](socket);function respondWithRpcPromise(_0xb2364,_0x4fafff,_0x20ac91){return new BPromise(function(_0x303ac4,_0x23dd2c){return client[_0x2392('0x11')](_0xb2364,_0x20ac91)[_0x2392('0x12')](function(_0x19e301){logger[_0x2392('0x13')](_0x2392('0x14'),_0x4fafff,'request\x20sent');logger[_0x2392('0x15')](_0x2392('0x16'),_0x4fafff,_0x2392('0x17'),JSON[_0x2392('0x18')](_0x19e301));if(_0x19e301[_0x2392('0x19')]){if(_0x19e301[_0x2392('0x19')]['code']===0x1f4){logger[_0x2392('0x19')](_0x2392('0x14'),_0x4fafff,_0x19e301[_0x2392('0x19')]['message']);return _0x23dd2c(_0x19e301[_0x2392('0x19')][_0x2392('0x1a')]);}logger['error'](_0x2392('0x14'),_0x4fafff,_0x19e301['error'][_0x2392('0x1a')]);return _0x303ac4(_0x19e301[_0x2392('0x19')][_0x2392('0x1a')]);}else{logger[_0x2392('0x13')]('OpenchannelQueue,\x20%s,\x20%s',_0x4fafff,_0x2392('0x17'));_0x303ac4(_0x19e301[_0x2392('0x1b')][_0x2392('0x1a')]);}})[_0x2392('0x1c')](function(_0x517464){logger[_0x2392('0x19')](_0x2392('0x14'),_0x4fafff,_0x517464);_0x23dd2c(_0x517464);});});}exports[_0x2392('0x1d')]=function(_0x44cd13){var _0x9366e2=this;return new Promise(function(_0x133500,_0x102243){return db[_0x2392('0x1e')][_0x2392('0x1f')]({'raw':_0x44cd13[_0x2392('0x20')]?_0x44cd13['options'][_0x2392('0x21')]===undefined?!![]:![]:!![],'where':_0x44cd13['options']?_0x44cd13[_0x2392('0x20')][_0x2392('0x22')]||null:null,'attributes':_0x44cd13[_0x2392('0x20')]?_0x44cd13[_0x2392('0x20')]['attributes']||null:null,'limit':_0x44cd13[_0x2392('0x20')]?_0x44cd13['options']['limit']||null:null,'include':_0x44cd13[_0x2392('0x20')]?_0x44cd13[_0x2392('0x20')][_0x2392('0x23')]?_[_0x2392('0x24')](_0x44cd13['options'][_0x2392('0x23')],function(_0x4cacd0){return{'model':db[_0x4cacd0[_0x2392('0x25')]],'as':_0x4cacd0['as'],'attributes':_0x4cacd0['attributes'],'include':_0x4cacd0[_0x2392('0x23')]?_[_0x2392('0x24')](_0x4cacd0['include'],function(_0x549825){return{'model':db[_0x549825['model']],'as':_0x549825['as'],'attributes':_0x549825[_0x2392('0x26')],'include':_0x549825[_0x2392('0x23')]?_[_0x2392('0x24')](_0x549825[_0x2392('0x23')],function(_0x197080){return{'model':db[_0x197080['model']],'as':_0x197080['as'],'attributes':_0x197080[_0x2392('0x26')]};}):[]};}):[]};}):[]:[]})[_0x2392('0x12')](function(_0x2bbece){logger[_0x2392('0x13')](_0x2392('0x1d'),_0x44cd13);logger[_0x2392('0x15')](_0x2392('0x1d'),_0x44cd13,JSON[_0x2392('0x18')](_0x2bbece));_0x133500(_0x2bbece);})[_0x2392('0x1c')](function(_0xd9fbd0){logger[_0x2392('0x19')]('GetOpenchannelQueue',_0xd9fbd0[_0x2392('0x1a')],_0x44cd13);_0x102243(_0x9366e2[_0x2392('0x19')](0x1f4,_0xd9fbd0[_0x2392('0x1a')]));});});};exports['ShowOpenchannelQueue']=function(_0x59c012){var _0x3caecc=this;return new Promise(function(_0x3f240a,_0x56011e){return db[_0x2392('0x1e')][_0x2392('0x27')]({'raw':_0x59c012[_0x2392('0x20')]?_0x59c012['options'][_0x2392('0x21')]===undefined?!![]:![]:!![],'where':_0x59c012[_0x2392('0x20')]?_0x59c012[_0x2392('0x20')][_0x2392('0x22')]||null:null,'attributes':_0x59c012[_0x2392('0x20')]?_0x59c012['options'][_0x2392('0x26')]||null:null,'include':_0x59c012[_0x2392('0x20')]?_0x59c012[_0x2392('0x20')][_0x2392('0x23')]?_[_0x2392('0x24')](_0x59c012[_0x2392('0x20')][_0x2392('0x23')],function(_0x29879a){return{'model':db[_0x29879a[_0x2392('0x25')]],'as':_0x29879a['as'],'attributes':_0x29879a[_0x2392('0x26')],'include':_0x29879a['include']?_[_0x2392('0x24')](_0x29879a['include'],function(_0x1fc841){return{'model':db[_0x1fc841['model']],'as':_0x1fc841['as'],'attributes':_0x1fc841[_0x2392('0x26')],'include':_0x1fc841[_0x2392('0x23')]?_[_0x2392('0x24')](_0x1fc841[_0x2392('0x23')],function(_0x416884){return{'model':db[_0x416884[_0x2392('0x25')]],'as':_0x416884['as'],'attributes':_0x416884['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x518017){logger['info']('ShowOpenchannelQueue',_0x59c012);logger[_0x2392('0x15')](_0x2392('0x28'),_0x59c012,JSON['stringify'](_0x518017));_0x3f240a(_0x518017);})[_0x2392('0x1c')](function(_0x3ecab1){logger['error']('ShowOpenchannelQueue',_0x3ecab1[_0x2392('0x1a')],_0x59c012);_0x56011e(_0x3caecc['error'](0x1f4,_0x3ecab1[_0x2392('0x1a')]));});});};
\ No newline at end of file
index 735578d..cd29971 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xde75=['register','length','./openchannelQueue.events','emit','removeListener'];(function(_0x51c082,_0x429269){var _0xf0b7b9=function(_0x172a3e){while(--_0x172a3e){_0x51c082['push'](_0x51c082['shift']());}};_0xf0b7b9(++_0x429269);}(_0xde75,0x1d3));var _0x5de7=function(_0x5a390a,_0x53cefd){_0x5a390a=_0x5a390a-0x0;var _0x179bc8=_0xde75[_0x5a390a];return _0x179bc8;};'use strict';var OpenchannelQueueEvents=require(_0x5de7('0x0'));var events=['save','remove','update'];function createListener(_0x491370,_0x2ba3a3){return function(_0xfea812){_0x2ba3a3[_0x5de7('0x1')](_0x491370,_0xfea812);};}function removeListener(_0x531cc8,_0x79f5bc){return function(){OpenchannelQueueEvents[_0x5de7('0x2')](_0x531cc8,_0x79f5bc);};}exports[_0x5de7('0x3')]=function(_0x411517){for(var _0x6d1218=0x0,_0xcfa00e=events[_0x5de7('0x4')];_0x6d1218<_0xcfa00e;_0x6d1218++){var _0x16dd0e=events[_0x6d1218];var _0x4439ad=createListener('openchannelQueue:'+_0x16dd0e,_0x411517);OpenchannelQueueEvents['on'](_0x16dd0e,_0x4439ad);}};
\ No newline at end of file
+var _0xb227=['register','length','openchannelQueue:','./openchannelQueue.events','save','update','removeListener'];(function(_0x496574,_0x58240b){var _0x19a728=function(_0x39d4c0){while(--_0x39d4c0){_0x496574['push'](_0x496574['shift']());}};_0x19a728(++_0x58240b);}(_0xb227,0x130));var _0x7b22=function(_0x21141d,_0x1b7429){_0x21141d=_0x21141d-0x0;var _0x22896c=_0xb227[_0x21141d];return _0x22896c;};'use strict';var OpenchannelQueueEvents=require(_0x7b22('0x0'));var events=[_0x7b22('0x1'),'remove',_0x7b22('0x2')];function createListener(_0x1f6a49,_0x5a6d86){return function(_0x4c76be){_0x5a6d86['emit'](_0x1f6a49,_0x4c76be);};}function removeListener(_0x6a979a,_0x3bb56d){return function(){OpenchannelQueueEvents[_0x7b22('0x3')](_0x6a979a,_0x3bb56d);};}exports[_0x7b22('0x4')]=function(_0x509249){for(var _0x548a26=0x0,_0x2a5e48=events[_0x7b22('0x5')];_0x548a26<_0x2a5e48;_0x548a26++){var _0x15eb7a=events[_0x548a26];var _0xc35456=createListener(_0x7b22('0x6')+_0x15eb7a,_0x509249);OpenchannelQueueEvents['on'](_0x15eb7a,_0xc35456);}};
\ No newline at end of file
index fd3574f..ebbf456 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x44c9=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelQueueReport.controller','get','isAuthenticated','/describe','describe','/:id','create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router'];(function(_0x90e9ab,_0x426802){var _0xdfa58b=function(_0x3d760e){while(--_0x3d760e){_0x90e9ab['push'](_0x90e9ab['shift']());}};_0xdfa58b(++_0x426802);}(_0x44c9,0x15a));var _0x944c=function(_0x508d16,_0x3e5c76){_0x508d16=_0x508d16-0x0;var _0x169e38=_0x44c9[_0x508d16];return _0x169e38;};'use strict';var multer=require(_0x944c('0x0'));var util=require(_0x944c('0x1'));var path=require(_0x944c('0x2'));var timeout=require(_0x944c('0x3'));var express=require(_0x944c('0x4'));var router=express[_0x944c('0x5')]();var fs_extra=require(_0x944c('0x6'));var auth=require(_0x944c('0x7'));var interaction=require(_0x944c('0x8'));var config=require(_0x944c('0x9'));var controller=require(_0x944c('0xa'));router[_0x944c('0xb')]('/',auth[_0x944c('0xc')](),controller['index']);router['get'](_0x944c('0xd'),auth[_0x944c('0xc')](),controller[_0x944c('0xe')]);router['get'](_0x944c('0xf'),auth['isAuthenticated'](),controller['show']);router['post']('/',auth[_0x944c('0xc')](),controller[_0x944c('0x10')]);router[_0x944c('0x11')](_0x944c('0xf'),auth[_0x944c('0xc')](),controller[_0x944c('0x12')]);router[_0x944c('0x13')]('/:id',auth['isAuthenticated'](),controller[_0x944c('0x14')]);module[_0x944c('0x15')]=router;
\ No newline at end of file
+var _0x13b7=['show','post','create','delete','destroy','exports','multer','connect-timeout','express','fs-extra','../../components/auth/service','../../config/environment','./openchannelQueueReport.controller','index','get','isAuthenticated','describe'];(function(_0x1fbbd4,_0x4cf942){var _0x41b784=function(_0xcc77ca){while(--_0xcc77ca){_0x1fbbd4['push'](_0x1fbbd4['shift']());}};_0x41b784(++_0x4cf942);}(_0x13b7,0x138));var _0x713b=function(_0x49fac0,_0x39a9c3){_0x49fac0=_0x49fac0-0x0;var _0x387b0b=_0x13b7[_0x49fac0];return _0x387b0b;};'use strict';var multer=require(_0x713b('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x713b('0x1'));var express=require(_0x713b('0x2'));var router=express['Router']();var fs_extra=require(_0x713b('0x3'));var auth=require(_0x713b('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x713b('0x5'));var controller=require(_0x713b('0x6'));router['get']('/',auth['isAuthenticated'](),controller[_0x713b('0x7')]);router[_0x713b('0x8')]('/describe',auth[_0x713b('0x9')](),controller[_0x713b('0xa')]);router['get']('/:id',auth[_0x713b('0x9')](),controller[_0x713b('0xb')]);router[_0x713b('0xc')]('/',auth['isAuthenticated'](),controller[_0x713b('0xd')]);router['put']('/:id',auth[_0x713b('0x9')](),controller['update']);router[_0x713b('0xe')]('/:id',auth[_0x713b('0x9')](),controller[_0x713b('0xf')]);module[_0x713b('0x10')]=router;
\ No newline at end of file
index b07a55e..0879840 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd4d4=['DATE','STRING','moment','sequelize','exports'];(function(_0x5aad23,_0x3c4989){var _0x5260e3=function(_0x37b65f){while(--_0x37b65f){_0x5aad23['push'](_0x5aad23['shift']());}};_0x5260e3(++_0x3c4989);}(_0xd4d4,0x7a));var _0x4d4d=function(_0x2185e0,_0x18b07e){_0x2185e0=_0x2185e0-0x0;var _0x785257=_0xd4d4[_0x2185e0];return _0x785257;};'use strict';var moment=require(_0x4d4d('0x0'));var Sequelize=require(_0x4d4d('0x1'));module[_0x4d4d('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize[_0x4d4d('0x3')]},'leaveAt':{'type':Sequelize[_0x4d4d('0x3')]},'acceptAt':{'type':Sequelize[_0x4d4d('0x3')]},'exitAt':{'type':Sequelize[_0x4d4d('0x3')]},'reason':{'type':Sequelize[_0x4d4d('0x4')]}};
\ No newline at end of file
+var _0x3810=['DATE','moment','sequelize','exports','STRING'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x3810,0x12d));var _0x0381=function(_0x143a91,_0x235332){_0x143a91=_0x143a91-0x0;var _0x1906f5=_0x3810[_0x143a91];return _0x1906f5;};'use strict';var moment=require(_0x0381('0x0'));var Sequelize=require(_0x0381('0x1'));module[_0x0381('0x2')]={'uniqueid':{'type':Sequelize[_0x0381('0x3')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize[_0x0381('0x4')]},'leaveAt':{'type':Sequelize['DATE']},'acceptAt':{'type':Sequelize[_0x0381('0x4')]},'exitAt':{'type':Sequelize[_0x0381('0x4')]},'reason':{'type':Sequelize[_0x0381('0x3')]}};
\ No newline at end of file
index cb4e6e8..62793f2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x404a=['moment','bluebird','mustache','util','path','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','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','save','update','destroy','then','end','error','stack','name','send','index','type','key','model','map','query','keys','intersection','fields','attributes','length','hasOwnProperty','order','sort','where','filters','filter','merge','VIRTUAL','OpenchannelQueueReport','includeAll','include','findAll','rows','show','rawAttributes','options','find','catch','create','body','params','describe','eml-format','zip-dir','fast-json-patch','request-promise'];(function(_0x1c34a6,_0x1108e1){var _0x48fe79=function(_0x163e66){while(--_0x163e66){_0x1c34a6['push'](_0x1c34a6['shift']());}};_0x48fe79(++_0x1108e1);}(_0x404a,0x182));var _0xa404=function(_0x175e3c,_0x464ee6){_0x175e3c=_0x175e3c-0x0;var _0x1f1e5d=_0x404a[_0x175e3c];return _0x1f1e5d;};'use strict';var emlformat=require(_0xa404('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xa404('0x1'));var jsonpatch=require(_0xa404('0x2'));var rp=require(_0xa404('0x3'));var moment=require(_0xa404('0x4'));var BPromise=require(_0xa404('0x5'));var Mustache=require(_0xa404('0x6'));var util=require(_0xa404('0x7'));var path=require(_0xa404('0x8'));var sox=require('sox');var csv=require(_0xa404('0x9'));var ejs=require(_0xa404('0xa'));var fs=require('fs');var fs_extra=require(_0xa404('0xb'));var _=require(_0xa404('0xc'));var squel=require(_0xa404('0xd'));var crypto=require(_0xa404('0xe'));var jsforce=require(_0xa404('0xf'));var deskjs=require(_0xa404('0x10'));var toCsv=require(_0xa404('0x9'));var querystring=require(_0xa404('0x11'));var Papa=require('papaparse');var Redis=require(_0xa404('0x12'));var authService=require(_0xa404('0x13'));var qs=require(_0xa404('0x14'));var as=require(_0xa404('0x15'));var hardwareService=require(_0xa404('0x16'));var logger=require(_0xa404('0x17'))('api');var utils=require(_0xa404('0x18'));var config=require(_0xa404('0x19'));var licenseUtil=require(_0xa404('0x1a'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4c1fcd,_0x35daa8){_0x35daa8=_0x35daa8||0xcc;return function(_0x373127){if(_0x373127){return _0x4c1fcd[_0xa404('0x1b')](_0x35daa8);}return _0x4c1fcd[_0xa404('0x1c')](_0x35daa8)['end']();};}function respondWithResult(_0x54e178,_0x595a26){_0x595a26=_0x595a26||0xc8;return function(_0x456f8a){if(_0x456f8a){return _0x54e178[_0xa404('0x1c')](_0x595a26)[_0xa404('0x1d')](_0x456f8a);}};}function respondWithFilteredResult(_0x10a7c2,_0x467a01){return function(_0x74e08a){if(_0x74e08a){var _0xe3bc94=typeof _0x467a01[_0xa404('0x1e')]===_0xa404('0x1f')&&typeof _0x467a01[_0xa404('0x20')]===_0xa404('0x1f');var _0x2c8a5b=_0x74e08a[_0xa404('0x21')];var _0x3d611b=_0xe3bc94?0x0:_0x467a01[_0xa404('0x1e')];var _0x3378d6=_0xe3bc94?_0x74e08a[_0xa404('0x21')]:_0x467a01[_0xa404('0x1e')]+_0x467a01[_0xa404('0x20')];var _0x269841;if(_0x3378d6>=_0x2c8a5b){_0x3378d6=_0x2c8a5b;_0x269841=0xc8;}else{_0x269841=0xce;}_0x10a7c2[_0xa404('0x1c')](_0x269841);return _0x10a7c2[_0xa404('0x22')](_0xa404('0x23'),_0x3d611b+'-'+_0x3378d6+'/'+_0x2c8a5b)['json'](_0x74e08a);}return null;};}function patchUpdates(_0x5aa2e2){return function(_0x321c22){try{jsonpatch['apply'](_0x321c22,_0x5aa2e2,!![]);}catch(_0x272a3c){return BPromise['reject'](_0x272a3c);}return _0x321c22[_0xa404('0x24')]();};}function saveUpdates(_0x6fe253,_0x304acc){return function(_0xf3d468){if(_0xf3d468){return _0xf3d468[_0xa404('0x25')](_0x6fe253)['then'](function(_0x27ab3e){return _0x27ab3e;});}return null;};}function removeEntity(_0x1bd395,_0x25c665){return function(_0x22ab36){if(_0x22ab36){return _0x22ab36[_0xa404('0x26')]()[_0xa404('0x27')](function(){_0x1bd395['status'](0xcc)[_0xa404('0x28')]();});}};}function handleEntityNotFound(_0x220ca7,_0x26a97c){return function(_0x2fe8eb){if(!_0x2fe8eb){_0x220ca7[_0xa404('0x1b')](0x194);}return _0x2fe8eb;};}function handleError(_0x342399,_0x12cf2f){_0x12cf2f=_0x12cf2f||0x1f4;return function(_0x496ed8){logger[_0xa404('0x29')](_0x496ed8[_0xa404('0x2a')]);if(_0x496ed8[_0xa404('0x2b')]){delete _0x496ed8[_0xa404('0x2b')];}_0x342399[_0xa404('0x1c')](_0x12cf2f)[_0xa404('0x2c')](_0x496ed8);};}exports[_0xa404('0x2d')]=function(_0xcc222d,_0x58debb){var _0x2b9cab={},_0x4fe152={},_0x3194cf={'count':0x0,'rows':[]};var _0x518686=_['map'](db['OpenchannelQueueReport']['rawAttributes'],function(_0x381f46){return{'name':_0x381f46['fieldName'],'type':_0x381f46[_0xa404('0x2e')][_0xa404('0x2f')]};});_0x4fe152[_0xa404('0x30')]=_[_0xa404('0x31')](_0x518686,_0xa404('0x2b'));_0x4fe152[_0xa404('0x32')]=_[_0xa404('0x33')](_0xcc222d[_0xa404('0x32')]);_0x4fe152['filters']=_['intersection'](_0x4fe152[_0xa404('0x30')],_0x4fe152[_0xa404('0x32')]);_0x2b9cab['attributes']=_[_0xa404('0x34')](_0x4fe152[_0xa404('0x30')],qs['fields'](_0xcc222d[_0xa404('0x32')][_0xa404('0x35')]));_0x2b9cab[_0xa404('0x36')]=_0x2b9cab['attributes'][_0xa404('0x37')]?_0x2b9cab[_0xa404('0x36')]:_0x4fe152['model'];if(!_0xcc222d[_0xa404('0x32')][_0xa404('0x38')]('nolimit')){_0x2b9cab[_0xa404('0x20')]=qs[_0xa404('0x20')](_0xcc222d[_0xa404('0x32')][_0xa404('0x20')]);_0x2b9cab['offset']=qs[_0xa404('0x1e')](_0xcc222d['query'][_0xa404('0x1e')]);}_0x2b9cab[_0xa404('0x39')]=qs[_0xa404('0x3a')](_0xcc222d[_0xa404('0x32')][_0xa404('0x3a')]);_0x2b9cab[_0xa404('0x3b')]=qs[_0xa404('0x3c')](_['pick'](_0xcc222d[_0xa404('0x32')],_0x4fe152[_0xa404('0x3c')]),_0x518686);if(_0xcc222d['query'][_0xa404('0x3d')]){_0x2b9cab[_0xa404('0x3b')]=_[_0xa404('0x3e')](_0x2b9cab[_0xa404('0x3b')],{'$or':_[_0xa404('0x31')](_0x518686,function(_0x34f00b){if(_0x34f00b[_0xa404('0x2e')]!==_0xa404('0x3f')){var _0x23791d={};_0x23791d[_0x34f00b[_0xa404('0x2b')]]={'$like':'%'+_0xcc222d[_0xa404('0x32')][_0xa404('0x3d')]+'%'};return _0x23791d;}})});}_0x2b9cab=_[_0xa404('0x3e')]({},_0x2b9cab,_0xcc222d['options']);var _0xea6238={'where':_0x2b9cab['where']};return db[_0xa404('0x40')][_0xa404('0x21')](_0xea6238)[_0xa404('0x27')](function(_0x3bcab5){_0x3194cf[_0xa404('0x21')]=_0x3bcab5;if(_0xcc222d[_0xa404('0x32')][_0xa404('0x41')]){_0x2b9cab[_0xa404('0x42')]=[{'all':!![]}];}return db['OpenchannelQueueReport'][_0xa404('0x43')](_0x2b9cab);})[_0xa404('0x27')](function(_0x1894ef){_0x3194cf[_0xa404('0x44')]=_0x1894ef;return _0x3194cf;})[_0xa404('0x27')](respondWithFilteredResult(_0x58debb,_0x2b9cab))['catch'](handleError(_0x58debb,null));};exports[_0xa404('0x45')]=function(_0x585b3a,_0x526e8c){var _0x119049={'raw':!![],'where':{'id':_0x585b3a['params']['id']}},_0x4205bc={};_0x4205bc[_0xa404('0x30')]=_[_0xa404('0x33')](db[_0xa404('0x40')][_0xa404('0x46')]);_0x4205bc[_0xa404('0x32')]=_['keys'](_0x585b3a[_0xa404('0x32')]);_0x4205bc[_0xa404('0x3c')]=_[_0xa404('0x34')](_0x4205bc[_0xa404('0x30')],_0x4205bc[_0xa404('0x32')]);_0x119049[_0xa404('0x36')]=_[_0xa404('0x34')](_0x4205bc[_0xa404('0x30')],qs['fields'](_0x585b3a[_0xa404('0x32')][_0xa404('0x35')]));_0x119049[_0xa404('0x36')]=_0x119049['attributes'][_0xa404('0x37')]?_0x119049[_0xa404('0x36')]:_0x4205bc['model'];if(_0x585b3a[_0xa404('0x32')]['includeAll']){_0x119049['include']=[{'all':!![]}];}_0x119049=_[_0xa404('0x3e')]({},_0x119049,_0x585b3a[_0xa404('0x47')]);return db[_0xa404('0x40')][_0xa404('0x48')](_0x119049)[_0xa404('0x27')](handleEntityNotFound(_0x526e8c,null))['then'](respondWithResult(_0x526e8c,null))[_0xa404('0x49')](handleError(_0x526e8c,null));};exports['create']=function(_0x4f0e50,_0x49f72b){return db['OpenchannelQueueReport'][_0xa404('0x4a')](_0x4f0e50[_0xa404('0x4b')],{})[_0xa404('0x27')](respondWithResult(_0x49f72b,0xc9))['catch'](handleError(_0x49f72b,null));};exports[_0xa404('0x25')]=function(_0x1ec416,_0x4881b8){if(_0x1ec416['body']['id']){delete _0x1ec416['body']['id'];}return db[_0xa404('0x40')][_0xa404('0x48')]({'where':{'id':_0x1ec416['params']['id']}})[_0xa404('0x27')](handleEntityNotFound(_0x4881b8,null))[_0xa404('0x27')](saveUpdates(_0x1ec416['body'],null))['then'](respondWithResult(_0x4881b8,null))[_0xa404('0x49')](handleError(_0x4881b8,null));};exports[_0xa404('0x26')]=function(_0xc27c8c,_0x2d6490){return db[_0xa404('0x40')][_0xa404('0x48')]({'where':{'id':_0xc27c8c[_0xa404('0x4c')]['id']}})['then'](handleEntityNotFound(_0x2d6490,null))['then'](removeEntity(_0x2d6490,null))['catch'](handleError(_0x2d6490,null));};exports[_0xa404('0x4d')]=function(_0x305e0b,_0x58c65c){return db[_0xa404('0x40')][_0xa404('0x4d')]()[_0xa404('0x27')](respondWithResult(_0x58c65c,null))[_0xa404('0x49')](handleError(_0x58c65c,null));};
\ No newline at end of file
+var _0x81fc=['order','sort','where','pick','filter','merge','VIRTUAL','name','options','includeAll','include','findAll','catch','params','find','create','body','describe','eml-format','rimraf','zip-dir','moment','bluebird','mustache','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','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','set','apply','reject','save','update','then','destroy','error','stack','send','index','OpenchannelQueueReport','rawAttributes','type','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit'];(function(_0x4fc9e6,_0xc51915){var _0x551d28=function(_0x1a603b){while(--_0x1a603b){_0x4fc9e6['push'](_0x4fc9e6['shift']());}};_0x551d28(++_0xc51915);}(_0x81fc,0x193));var _0xc81f=function(_0x4af3ac,_0x240022){_0x4af3ac=_0x4af3ac-0x0;var _0x3234a6=_0x81fc[_0x4af3ac];return _0x3234a6;};'use strict';var emlformat=require(_0xc81f('0x0'));var rimraf=require(_0xc81f('0x1'));var zipdir=require(_0xc81f('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xc81f('0x3'));var BPromise=require(_0xc81f('0x4'));var Mustache=require(_0xc81f('0x5'));var util=require('util');var path=require('path');var sox=require(_0xc81f('0x6'));var csv=require(_0xc81f('0x7'));var ejs=require(_0xc81f('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xc81f('0x9'));var squel=require(_0xc81f('0xa'));var crypto=require(_0xc81f('0xb'));var jsforce=require(_0xc81f('0xc'));var deskjs=require(_0xc81f('0xd'));var toCsv=require('to-csv');var querystring=require(_0xc81f('0xe'));var Papa=require(_0xc81f('0xf'));var Redis=require(_0xc81f('0x10'));var authService=require(_0xc81f('0x11'));var qs=require(_0xc81f('0x12'));var as=require(_0xc81f('0x13'));var hardwareService=require(_0xc81f('0x14'));var logger=require('../../config/logger')(_0xc81f('0x15'));var utils=require(_0xc81f('0x16'));var config=require(_0xc81f('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0xc81f('0x18'))['db'];function respondWithStatusCode(_0xbdbe23,_0x5359ed){_0x5359ed=_0x5359ed||0xcc;return function(_0x3ea4f3){if(_0x3ea4f3){return _0xbdbe23[_0xc81f('0x19')](_0x5359ed);}return _0xbdbe23[_0xc81f('0x1a')](_0x5359ed)[_0xc81f('0x1b')]();};}function respondWithResult(_0x4a8e0a,_0x480bca){_0x480bca=_0x480bca||0xc8;return function(_0x320334){if(_0x320334){return _0x4a8e0a['status'](_0x480bca)[_0xc81f('0x1c')](_0x320334);}};}function respondWithFilteredResult(_0x435d9f,_0x54168a){return function(_0x4b92ef){if(_0x4b92ef){var _0xf7e815=typeof _0x54168a['offset']===_0xc81f('0x1d')&&typeof _0x54168a[_0xc81f('0x1e')]===_0xc81f('0x1d');var _0x55164c=_0x4b92ef[_0xc81f('0x1f')];var _0x3952d4=_0xf7e815?0x0:_0x54168a[_0xc81f('0x20')];var _0x562f02=_0xf7e815?_0x4b92ef[_0xc81f('0x1f')]:_0x54168a[_0xc81f('0x20')]+_0x54168a[_0xc81f('0x1e')];var _0x2153a4;if(_0x562f02>=_0x55164c){_0x562f02=_0x55164c;_0x2153a4=0xc8;}else{_0x2153a4=0xce;}_0x435d9f[_0xc81f('0x1a')](_0x2153a4);return _0x435d9f[_0xc81f('0x21')]('Content-Range',_0x3952d4+'-'+_0x562f02+'/'+_0x55164c)[_0xc81f('0x1c')](_0x4b92ef);}return null;};}function patchUpdates(_0x54ff9c){return function(_0x62b042){try{jsonpatch[_0xc81f('0x22')](_0x62b042,_0x54ff9c,!![]);}catch(_0x4bf11e){return BPromise[_0xc81f('0x23')](_0x4bf11e);}return _0x62b042[_0xc81f('0x24')]();};}function saveUpdates(_0x4d4ecd,_0x29f235){return function(_0x5cd1aa){if(_0x5cd1aa){return _0x5cd1aa[_0xc81f('0x25')](_0x4d4ecd)[_0xc81f('0x26')](function(_0x11c1ab){return _0x11c1ab;});}return null;};}function removeEntity(_0x184626,_0x28eb18){return function(_0x326809){if(_0x326809){return _0x326809[_0xc81f('0x27')]()[_0xc81f('0x26')](function(){_0x184626[_0xc81f('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5bc19e,_0x2fc82a){return function(_0x4f2443){if(!_0x4f2443){_0x5bc19e[_0xc81f('0x19')](0x194);}return _0x4f2443;};}function handleError(_0x3dcb27,_0xf4069a){_0xf4069a=_0xf4069a||0x1f4;return function(_0x3b9f17){logger[_0xc81f('0x28')](_0x3b9f17[_0xc81f('0x29')]);if(_0x3b9f17['name']){delete _0x3b9f17['name'];}_0x3dcb27['status'](_0xf4069a)[_0xc81f('0x2a')](_0x3b9f17);};}exports[_0xc81f('0x2b')]=function(_0x29b877,_0x4e2ba7){var _0x298425={},_0xeb57ad={},_0x4d9e94={'count':0x0,'rows':[]};var _0x3562bf=_['map'](db[_0xc81f('0x2c')][_0xc81f('0x2d')],function(_0xf9ecb1){return{'name':_0xf9ecb1['fieldName'],'type':_0xf9ecb1[_0xc81f('0x2e')][_0xc81f('0x2f')]};});_0xeb57ad[_0xc81f('0x30')]=_[_0xc81f('0x31')](_0x3562bf,'name');_0xeb57ad[_0xc81f('0x32')]=_[_0xc81f('0x33')](_0x29b877[_0xc81f('0x32')]);_0xeb57ad[_0xc81f('0x34')]=_[_0xc81f('0x35')](_0xeb57ad[_0xc81f('0x30')],_0xeb57ad[_0xc81f('0x32')]);_0x298425[_0xc81f('0x36')]=_[_0xc81f('0x35')](_0xeb57ad[_0xc81f('0x30')],qs[_0xc81f('0x37')](_0x29b877['query'][_0xc81f('0x37')]));_0x298425[_0xc81f('0x36')]=_0x298425[_0xc81f('0x36')][_0xc81f('0x38')]?_0x298425['attributes']:_0xeb57ad[_0xc81f('0x30')];if(!_0x29b877[_0xc81f('0x32')][_0xc81f('0x39')](_0xc81f('0x3a'))){_0x298425[_0xc81f('0x1e')]=qs[_0xc81f('0x1e')](_0x29b877['query']['limit']);_0x298425['offset']=qs['offset'](_0x29b877['query']['offset']);}_0x298425[_0xc81f('0x3b')]=qs[_0xc81f('0x3c')](_0x29b877['query']['sort']);_0x298425[_0xc81f('0x3d')]=qs[_0xc81f('0x34')](_[_0xc81f('0x3e')](_0x29b877['query'],_0xeb57ad['filters']),_0x3562bf);if(_0x29b877[_0xc81f('0x32')][_0xc81f('0x3f')]){_0x298425['where']=_[_0xc81f('0x40')](_0x298425[_0xc81f('0x3d')],{'$or':_['map'](_0x3562bf,function(_0x475584){if(_0x475584[_0xc81f('0x2e')]!==_0xc81f('0x41')){var _0x57a01b={};_0x57a01b[_0x475584[_0xc81f('0x42')]]={'$like':'%'+_0x29b877[_0xc81f('0x32')][_0xc81f('0x3f')]+'%'};return _0x57a01b;}})});}_0x298425=_['merge']({},_0x298425,_0x29b877[_0xc81f('0x43')]);var _0x4aecbb={'where':_0x298425[_0xc81f('0x3d')]};return db['OpenchannelQueueReport'][_0xc81f('0x1f')](_0x4aecbb)[_0xc81f('0x26')](function(_0x4862fa){_0x4d9e94[_0xc81f('0x1f')]=_0x4862fa;if(_0x29b877[_0xc81f('0x32')][_0xc81f('0x44')]){_0x298425[_0xc81f('0x45')]=[{'all':!![]}];}return db[_0xc81f('0x2c')][_0xc81f('0x46')](_0x298425);})[_0xc81f('0x26')](function(_0x334e7b){_0x4d9e94['rows']=_0x334e7b;return _0x4d9e94;})[_0xc81f('0x26')](respondWithFilteredResult(_0x4e2ba7,_0x298425))[_0xc81f('0x47')](handleError(_0x4e2ba7,null));};exports['show']=function(_0x474226,_0x13368f){var _0x392eb1={'raw':!![],'where':{'id':_0x474226[_0xc81f('0x48')]['id']}},_0x5662b6={};_0x5662b6['model']=_[_0xc81f('0x33')](db['OpenchannelQueueReport']['rawAttributes']);_0x5662b6['query']=_['keys'](_0x474226['query']);_0x5662b6['filters']=_[_0xc81f('0x35')](_0x5662b6[_0xc81f('0x30')],_0x5662b6[_0xc81f('0x32')]);_0x392eb1[_0xc81f('0x36')]=_[_0xc81f('0x35')](_0x5662b6[_0xc81f('0x30')],qs[_0xc81f('0x37')](_0x474226[_0xc81f('0x32')]['fields']));_0x392eb1[_0xc81f('0x36')]=_0x392eb1['attributes'][_0xc81f('0x38')]?_0x392eb1[_0xc81f('0x36')]:_0x5662b6['model'];if(_0x474226[_0xc81f('0x32')][_0xc81f('0x44')]){_0x392eb1[_0xc81f('0x45')]=[{'all':!![]}];}_0x392eb1=_[_0xc81f('0x40')]({},_0x392eb1,_0x474226[_0xc81f('0x43')]);return db['OpenchannelQueueReport'][_0xc81f('0x49')](_0x392eb1)[_0xc81f('0x26')](handleEntityNotFound(_0x13368f,null))[_0xc81f('0x26')](respondWithResult(_0x13368f,null))[_0xc81f('0x47')](handleError(_0x13368f,null));};exports[_0xc81f('0x4a')]=function(_0x23d385,_0x533d52){return db['OpenchannelQueueReport'][_0xc81f('0x4a')](_0x23d385[_0xc81f('0x4b')],{})[_0xc81f('0x26')](respondWithResult(_0x533d52,0xc9))[_0xc81f('0x47')](handleError(_0x533d52,null));};exports['update']=function(_0x4b1c19,_0x1506b8){if(_0x4b1c19[_0xc81f('0x4b')]['id']){delete _0x4b1c19[_0xc81f('0x4b')]['id'];}return db[_0xc81f('0x2c')][_0xc81f('0x49')]({'where':{'id':_0x4b1c19[_0xc81f('0x48')]['id']}})[_0xc81f('0x26')](handleEntityNotFound(_0x1506b8,null))[_0xc81f('0x26')](saveUpdates(_0x4b1c19[_0xc81f('0x4b')],null))[_0xc81f('0x26')](respondWithResult(_0x1506b8,null))[_0xc81f('0x47')](handleError(_0x1506b8,null));};exports[_0xc81f('0x27')]=function(_0x2df82d,_0x205924){return db[_0xc81f('0x2c')][_0xc81f('0x49')]({'where':{'id':_0x2df82d[_0xc81f('0x48')]['id']}})['then'](handleEntityNotFound(_0x205924,null))[_0xc81f('0x26')](removeEntity(_0x205924,null))[_0xc81f('0x47')](handleError(_0x205924,null));};exports[_0xc81f('0x4c')]=function(_0x5a30cc,_0x493645){return db['OpenchannelQueueReport'][_0xc81f('0x4c')]()['then'](respondWithResult(_0x493645,null))[_0xc81f('0x47')](handleError(_0x493645,null));};
\ No newline at end of file
index 7ef6959..733c1d1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x814b=['../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./openchannelQueueReport.attributes','exports','define','OpenchannelQueueReport','uniqueid','lodash','util'];(function(_0x363b81,_0x81e6ca){var _0x1d92fb=function(_0x129644){while(--_0x129644){_0x363b81['push'](_0x363b81['shift']());}};_0x1d92fb(++_0x81e6ca);}(_0x814b,0x1a2));var _0xb814=function(_0x3c2b2e,_0x3e6e53){_0x3c2b2e=_0x3c2b2e-0x0;var _0x27a338=_0x814b[_0x3c2b2e];return _0x27a338;};'use strict';var _=require(_0xb814('0x0'));var util=require(_0xb814('0x1'));var logger=require(_0xb814('0x2'))(_0xb814('0x3'));var moment=require(_0xb814('0x4'));var BPromise=require(_0xb814('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb814('0x6'));var rimraf=require(_0xb814('0x7'));var config=require(_0xb814('0x8'));var attributes=require(_0xb814('0x9'));module[_0xb814('0xa')]=function(_0x322a70,_0x53e507){return _0x322a70[_0xb814('0xb')](_0xb814('0xc'),attributes,{'tableName':'report_openchannel_queue','paranoid':![],'indexes':[{'name':_0xb814('0xd'),'fields':[_0xb814('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x7a54=['report_openchannel_queue','uniqueid','lodash','util','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./openchannelQueueReport.attributes','exports','OpenchannelQueueReport'];(function(_0x2a2982,_0x45247b){var _0x4120a1=function(_0x1665a5){while(--_0x1665a5){_0x2a2982['push'](_0x2a2982['shift']());}};_0x4120a1(++_0x45247b);}(_0x7a54,0x106));var _0x47a5=function(_0x104e4a,_0x5548cb){_0x104e4a=_0x104e4a-0x0;var _0x151975=_0x7a54[_0x104e4a];return _0x151975;};'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':'uniqueid','fields':[_0x47a5('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
index d3d00fb..79a0aab 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbb59=['then','info','OpenchannelQueueReport,\x20%s,\x20%s','debug','OpenchannelQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','CreateOpenchannelQueueReport','body','options','catch','UpdateOpenchannelQueueReport','update','where','attributes','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request'];(function(_0x2aee2f,_0xad9887){var _0x19337f=function(_0x2e62d){while(--_0x2e62d){_0x2aee2f['push'](_0x2aee2f['shift']());}};_0x19337f(++_0xad9887);}(_0xbb59,0xec));var _0x9bb5=function(_0xf83757,_0x15e41c){_0xf83757=_0xf83757-0x0;var _0x5552c1=_0xbb59[_0xf83757];return _0x5552c1;};'use strict';var _=require(_0x9bb5('0x0'));var util=require(_0x9bb5('0x1'));var moment=require(_0x9bb5('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9bb5('0x3'));var db=require(_0x9bb5('0x4'))['db'];var utils=require(_0x9bb5('0x5'));var logger=require(_0x9bb5('0x6'))(_0x9bb5('0x7'));var config=require('../../config/environment');var jayson=require(_0x9bb5('0x8'));var client=jayson[_0x9bb5('0x9')][_0x9bb5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2df722,_0xe362e0,_0x83fd10){return new BPromise(function(_0x2d6cce,_0x4e3857){return client[_0x9bb5('0xb')](_0x2df722,_0x83fd10)[_0x9bb5('0xc')](function(_0x2fdbcb){logger[_0x9bb5('0xd')](_0x9bb5('0xe'),_0xe362e0,'request\x20sent');logger[_0x9bb5('0xf')](_0x9bb5('0x10'),_0xe362e0,_0x9bb5('0x11'),JSON[_0x9bb5('0x12')](_0x2fdbcb));if(_0x2fdbcb[_0x9bb5('0x13')]){if(_0x2fdbcb[_0x9bb5('0x13')][_0x9bb5('0x14')]===0x1f4){logger[_0x9bb5('0x13')](_0x9bb5('0xe'),_0xe362e0,_0x2fdbcb[_0x9bb5('0x13')][_0x9bb5('0x15')]);return _0x4e3857(_0x2fdbcb[_0x9bb5('0x13')][_0x9bb5('0x15')]);}logger[_0x9bb5('0x13')]('OpenchannelQueueReport,\x20%s,\x20%s',_0xe362e0,_0x2fdbcb['error'][_0x9bb5('0x15')]);return _0x2d6cce(_0x2fdbcb['error']['message']);}else{logger[_0x9bb5('0xd')]('OpenchannelQueueReport,\x20%s,\x20%s',_0xe362e0,_0x9bb5('0x11'));_0x2d6cce(_0x2fdbcb[_0x9bb5('0x16')][_0x9bb5('0x15')]);}})['catch'](function(_0xb471e){logger[_0x9bb5('0x13')](_0x9bb5('0xe'),_0xe362e0,_0xb471e);_0x4e3857(_0xb471e);});});}exports[_0x9bb5('0x17')]=function(_0xba8392){var _0x19d1e9=this;return new Promise(function(_0x162815,_0xe44bdd){return db['OpenchannelQueueReport']['create'](_0xba8392[_0x9bb5('0x18')],{'raw':_0xba8392[_0x9bb5('0x19')]?_0xba8392['options']['raw']===undefined?!![]:![]:!![]})[_0x9bb5('0xc')](function(_0x182966){logger[_0x9bb5('0xd')]('CreateOpenchannelQueueReport',_0xba8392);logger[_0x9bb5('0xf')](_0x9bb5('0x17'),_0xba8392,JSON[_0x9bb5('0x12')](_0x182966));_0x162815(_0x182966);})[_0x9bb5('0x1a')](function(_0x51fa34){logger[_0x9bb5('0x13')](_0x9bb5('0x17'),_0x51fa34['message'],_0xba8392);_0xe44bdd(_0x19d1e9[_0x9bb5('0x13')](0x1f4,_0x51fa34['message']));});});};exports[_0x9bb5('0x1b')]=function(_0x5357e9){var _0x4be52b=this;return new Promise(function(_0x1d7195,_0x16db23){return db['OpenchannelQueueReport'][_0x9bb5('0x1c')](_0x5357e9[_0x9bb5('0x18')],{'raw':_0x5357e9[_0x9bb5('0x19')]?_0x5357e9['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5357e9[_0x9bb5('0x19')]?_0x5357e9[_0x9bb5('0x19')][_0x9bb5('0x1d')]||null:null,'attributes':_0x5357e9['options']?_0x5357e9[_0x9bb5('0x19')][_0x9bb5('0x1e')]||null:null,'limit':_0x5357e9[_0x9bb5('0x19')]?_0x5357e9['options']['limit']||null:null})['then'](function(_0x1ad67b){logger[_0x9bb5('0xd')](_0x9bb5('0x1b'),_0x5357e9);logger[_0x9bb5('0xf')](_0x9bb5('0x1b'),_0x5357e9,JSON['stringify'](_0x1ad67b));_0x1d7195(_0x1ad67b);})['catch'](function(_0x59ef00){logger[_0x9bb5('0x13')](_0x9bb5('0x1b'),_0x59ef00[_0x9bb5('0x15')],_0x5357e9);_0x16db23(_0x4be52b['error'](0x1f4,_0x59ef00['message']));});});};
\ No newline at end of file
+var _0x9ccd=['OpenchannelQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','CreateOpenchannelQueueReport','create','body','options','raw','UpdateOpenchannelQueueReport','OpenchannelQueueReport','where','limit','lodash','moment','bluebird','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','OpenchannelQueueReport,\x20%s,\x20%s','debug'];(function(_0x1d7098,_0x44e493){var _0xc40223=function(_0x2d7f0f){while(--_0x2d7f0f){_0x1d7098['push'](_0x1d7098['shift']());}};_0xc40223(++_0x44e493);}(_0x9ccd,0x1a3));var _0xd9cc=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x9ccd[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0xd9cc('0x0'));var util=require('util');var moment=require(_0xd9cc('0x1'));var BPromise=require(_0xd9cc('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xd9cc('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xd9cc('0x4'))(_0xd9cc('0x5'));var config=require(_0xd9cc('0x6'));var jayson=require(_0xd9cc('0x7'));var client=jayson[_0xd9cc('0x8')][_0xd9cc('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1f7b2b,_0x23b70a,_0x9e1e10){return new BPromise(function(_0x1a1bd1,_0x20282c){return client[_0xd9cc('0xa')](_0x1f7b2b,_0x9e1e10)[_0xd9cc('0xb')](function(_0x1737e5){logger[_0xd9cc('0xc')](_0xd9cc('0xd'),_0x23b70a,'request\x20sent');logger[_0xd9cc('0xe')](_0xd9cc('0xf'),_0x23b70a,_0xd9cc('0x10'),JSON[_0xd9cc('0x11')](_0x1737e5));if(_0x1737e5[_0xd9cc('0x12')]){if(_0x1737e5[_0xd9cc('0x12')][_0xd9cc('0x13')]===0x1f4){logger[_0xd9cc('0x12')]('OpenchannelQueueReport,\x20%s,\x20%s',_0x23b70a,_0x1737e5[_0xd9cc('0x12')]['message']);return _0x20282c(_0x1737e5['error']['message']);}logger['error']('OpenchannelQueueReport,\x20%s,\x20%s',_0x23b70a,_0x1737e5[_0xd9cc('0x12')][_0xd9cc('0x14')]);return _0x1a1bd1(_0x1737e5[_0xd9cc('0x12')][_0xd9cc('0x14')]);}else{logger[_0xd9cc('0xc')](_0xd9cc('0xd'),_0x23b70a,_0xd9cc('0x10'));_0x1a1bd1(_0x1737e5['result'][_0xd9cc('0x14')]);}})[_0xd9cc('0x15')](function(_0x513635){logger[_0xd9cc('0x12')](_0xd9cc('0xd'),_0x23b70a,_0x513635);_0x20282c(_0x513635);});});}exports[_0xd9cc('0x16')]=function(_0x2e2baa){var _0x5a4b50=this;return new Promise(function(_0x37b745,_0x32df89){return db['OpenchannelQueueReport'][_0xd9cc('0x17')](_0x2e2baa[_0xd9cc('0x18')],{'raw':_0x2e2baa[_0xd9cc('0x19')]?_0x2e2baa[_0xd9cc('0x19')][_0xd9cc('0x1a')]===undefined?!![]:![]:!![]})[_0xd9cc('0xb')](function(_0x59f00d){logger['info'](_0xd9cc('0x16'),_0x2e2baa);logger[_0xd9cc('0xe')](_0xd9cc('0x16'),_0x2e2baa,JSON[_0xd9cc('0x11')](_0x59f00d));_0x37b745(_0x59f00d);})[_0xd9cc('0x15')](function(_0x426a5c){logger[_0xd9cc('0x12')](_0xd9cc('0x16'),_0x426a5c[_0xd9cc('0x14')],_0x2e2baa);_0x32df89(_0x5a4b50[_0xd9cc('0x12')](0x1f4,_0x426a5c[_0xd9cc('0x14')]));});});};exports[_0xd9cc('0x1b')]=function(_0x45b05a){var _0x35fb49=this;return new Promise(function(_0x503451,_0xc74622){return db[_0xd9cc('0x1c')]['update'](_0x45b05a[_0xd9cc('0x18')],{'raw':_0x45b05a[_0xd9cc('0x19')]?_0x45b05a[_0xd9cc('0x19')][_0xd9cc('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x45b05a[_0xd9cc('0x19')]?_0x45b05a[_0xd9cc('0x19')][_0xd9cc('0x1d')]||null:null,'attributes':_0x45b05a[_0xd9cc('0x19')]?_0x45b05a[_0xd9cc('0x19')]['attributes']||null:null,'limit':_0x45b05a[_0xd9cc('0x19')]?_0x45b05a[_0xd9cc('0x19')][_0xd9cc('0x1e')]||null:null})[_0xd9cc('0xb')](function(_0xfcd78c){logger[_0xd9cc('0xc')](_0xd9cc('0x1b'),_0x45b05a);logger[_0xd9cc('0xe')]('UpdateOpenchannelQueueReport',_0x45b05a,JSON[_0xd9cc('0x11')](_0xfcd78c));_0x503451(_0xfcd78c);})[_0xd9cc('0x15')](function(_0x42d185){logger[_0xd9cc('0x12')](_0xd9cc('0x1b'),_0x42d185[_0xd9cc('0x14')],_0x45b05a);_0xc74622(_0x35fb49['error'](0x1f4,_0x42d185[_0xd9cc('0x14')]));});});};
\ No newline at end of file
index 77cf265..22a9d96 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd415=['express','Router','fs-extra','../../components/interaction/service','../../config/environment','./openchannelTransferReport.controller','get','index','/describe','isAuthenticated','describe','/:id','show','post','create','put','update','destroy','exports','multer','util','path','connect-timeout'];(function(_0x2e9b87,_0xc828f){var _0x34889a=function(_0x478ff5){while(--_0x478ff5){_0x2e9b87['push'](_0x2e9b87['shift']());}};_0x34889a(++_0xc828f);}(_0xd415,0xf9));var _0x5d41=function(_0x318f52,_0x4dd664){_0x318f52=_0x318f52-0x0;var _0x55c506=_0xd415[_0x318f52];return _0x55c506;};'use strict';var multer=require(_0x5d41('0x0'));var util=require(_0x5d41('0x1'));var path=require(_0x5d41('0x2'));var timeout=require(_0x5d41('0x3'));var express=require(_0x5d41('0x4'));var router=express[_0x5d41('0x5')]();var fs_extra=require(_0x5d41('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0x5d41('0x7'));var config=require(_0x5d41('0x8'));var controller=require(_0x5d41('0x9'));router[_0x5d41('0xa')]('/',auth['isAuthenticated'](),controller[_0x5d41('0xb')]);router[_0x5d41('0xa')](_0x5d41('0xc'),auth[_0x5d41('0xd')](),controller[_0x5d41('0xe')]);router['get'](_0x5d41('0xf'),auth[_0x5d41('0xd')](),controller[_0x5d41('0x10')]);router[_0x5d41('0x11')]('/',auth['isAuthenticated'](),controller[_0x5d41('0x12')]);router[_0x5d41('0x13')]('/:id',auth[_0x5d41('0xd')](),controller[_0x5d41('0x14')]);router['delete'](_0x5d41('0xf'),auth[_0x5d41('0xd')](),controller[_0x5d41('0x15')]);module[_0x5d41('0x16')]=router;
\ No newline at end of file
+var _0x7b7a=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelTransferReport.controller','get','isAuthenticated','index','describe','/:id','post','create','put','update','delete','multer','util','path','connect-timeout'];(function(_0x5e9bd0,_0x228267){var _0x1795b9=function(_0x433e93){while(--_0x433e93){_0x5e9bd0['push'](_0x5e9bd0['shift']());}};_0x1795b9(++_0x228267);}(_0x7b7a,0x74));var _0xa7b7=function(_0x2d7f0e,_0x3e6fbd){_0x2d7f0e=_0x2d7f0e-0x0;var _0x110b07=_0x7b7a[_0x2d7f0e];return _0x110b07;};'use strict';var multer=require(_0xa7b7('0x0'));var util=require(_0xa7b7('0x1'));var path=require(_0xa7b7('0x2'));var timeout=require(_0xa7b7('0x3'));var express=require('express');var router=express[_0xa7b7('0x4')]();var fs_extra=require(_0xa7b7('0x5'));var auth=require(_0xa7b7('0x6'));var interaction=require(_0xa7b7('0x7'));var config=require(_0xa7b7('0x8'));var controller=require(_0xa7b7('0x9'));router[_0xa7b7('0xa')]('/',auth[_0xa7b7('0xb')](),controller[_0xa7b7('0xc')]);router[_0xa7b7('0xa')]('/describe',auth[_0xa7b7('0xb')](),controller[_0xa7b7('0xd')]);router[_0xa7b7('0xa')](_0xa7b7('0xe'),auth[_0xa7b7('0xb')](),controller['show']);router[_0xa7b7('0xf')]('/',auth['isAuthenticated'](),controller[_0xa7b7('0x10')]);router[_0xa7b7('0x11')](_0xa7b7('0xe'),auth['isAuthenticated'](),controller[_0xa7b7('0x12')]);router[_0xa7b7('0x13')](_0xa7b7('0xe'),auth[_0xa7b7('0xb')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
index 83dc12d..d86245c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf4eb=['NOW','moment','account','queue','DATE'];(function(_0x262e3e,_0x4de374){var _0x2f97a0=function(_0x275a37){while(--_0x275a37){_0x262e3e['push'](_0x262e3e['shift']());}};_0x2f97a0(++_0x4de374);}(_0xf4eb,0xec));var _0xbf4e=function(_0x567ba9,_0x87d1d1){_0x567ba9=_0x567ba9-0x0;var _0x1f9dae=_0xf4eb[_0x567ba9];return _0x1f9dae;};'use strict';var moment=require(_0xbf4e('0x0'));var Sequelize=require('sequelize');module['exports']={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0xbf4e('0x1'),'agent','queue'),'allowNull':![],'defaultValue':_0xbf4e('0x2')},'transferredAt':{'type':Sequelize[_0xbf4e('0x3')],'allowNull':![],'defaultValue':Sequelize[_0xbf4e('0x4')]}};
\ No newline at end of file
+var _0xedd9=['account','agent','queue','NOW','sequelize','exports','STRING','ENUM'];(function(_0x4f0f25,_0x289cca){var _0x8ecd2a=function(_0x15047f){while(--_0x15047f){_0x4f0f25['push'](_0x4f0f25['shift']());}};_0x8ecd2a(++_0x289cca);}(_0xedd9,0xfc));var _0x9edd=function(_0x461521,_0x3950c8){_0x461521=_0x461521-0x0;var _0x14bb04=_0xedd9[_0x461521];return _0x14bb04;};'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
index b0a9d1b..4cb7267 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x61e4=['fs-extra','squel','crypto','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','error','stack','index','map','OpenchannelTransferReport','rawAttributes','key','model','name','query','filters','intersection','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','type','VIRTUAL','includeAll','include','catch','params','keys','attributes','merge','options','find','create','body','destroy','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','path','sox','to-csv'];(function(_0xbfec58,_0x5f4153){var _0x3dc84d=function(_0x498ef6){while(--_0x498ef6){_0xbfec58['push'](_0xbfec58['shift']());}};_0x3dc84d(++_0x5f4153);}(_0x61e4,0x112));var _0x461e=function(_0x275804,_0x1690bb){_0x275804=_0x275804-0x0;var _0x5cf3a4=_0x61e4[_0x275804];return _0x5cf3a4;};'use strict';var emlformat=require(_0x461e('0x0'));var rimraf=require(_0x461e('0x1'));var zipdir=require(_0x461e('0x2'));var jsonpatch=require(_0x461e('0x3'));var rp=require('request-promise');var moment=require(_0x461e('0x4'));var BPromise=require(_0x461e('0x5'));var Mustache=require(_0x461e('0x6'));var util=require('util');var path=require(_0x461e('0x7'));var sox=require(_0x461e('0x8'));var csv=require(_0x461e('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x461e('0xa'));var _=require('lodash');var squel=require(_0x461e('0xb'));var crypto=require(_0x461e('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x461e('0x9'));var querystring=require(_0x461e('0xd'));var Papa=require(_0x461e('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x461e('0xf'));var as=require(_0x461e('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x461e('0x11'))('api');var utils=require(_0x461e('0x12'));var config=require('../../config/environment');var licenseUtil=require(_0x461e('0x13'));var db=require(_0x461e('0x14'))['db'];function respondWithStatusCode(_0x2d25e3,_0x428ab3){_0x428ab3=_0x428ab3||0xcc;return function(_0x5866d7){if(_0x5866d7){return _0x2d25e3[_0x461e('0x15')](_0x428ab3);}return _0x2d25e3[_0x461e('0x16')](_0x428ab3)[_0x461e('0x17')]();};}function respondWithResult(_0x49f9d0,_0xd3d40b){_0xd3d40b=_0xd3d40b||0xc8;return function(_0x1568d6){if(_0x1568d6){return _0x49f9d0[_0x461e('0x16')](_0xd3d40b)[_0x461e('0x18')](_0x1568d6);}};}function respondWithFilteredResult(_0x4f196b,_0x40b134){return function(_0x2c61d9){if(_0x2c61d9){var _0x31b6ae=typeof _0x40b134[_0x461e('0x19')]===_0x461e('0x1a')&&typeof _0x40b134[_0x461e('0x1b')]===_0x461e('0x1a');var _0x349b5e=_0x2c61d9[_0x461e('0x1c')];var _0x453573=_0x31b6ae?0x0:_0x40b134[_0x461e('0x19')];var _0x3ba12c=_0x31b6ae?_0x2c61d9[_0x461e('0x1c')]:_0x40b134[_0x461e('0x19')]+_0x40b134[_0x461e('0x1b')];var _0x10ddcb;if(_0x3ba12c>=_0x349b5e){_0x3ba12c=_0x349b5e;_0x10ddcb=0xc8;}else{_0x10ddcb=0xce;}_0x4f196b[_0x461e('0x16')](_0x10ddcb);return _0x4f196b[_0x461e('0x1d')](_0x461e('0x1e'),_0x453573+'-'+_0x3ba12c+'/'+_0x349b5e)[_0x461e('0x18')](_0x2c61d9);}return null;};}function patchUpdates(_0x6ee51d){return function(_0x300749){try{jsonpatch[_0x461e('0x1f')](_0x300749,_0x6ee51d,!![]);}catch(_0x33f72e){return BPromise[_0x461e('0x20')](_0x33f72e);}return _0x300749[_0x461e('0x21')]();};}function saveUpdates(_0x2fc217,_0x1190b7){return function(_0x48e8a9){if(_0x48e8a9){return _0x48e8a9[_0x461e('0x22')](_0x2fc217)[_0x461e('0x23')](function(_0x1fcdd8){return _0x1fcdd8;});}return null;};}function removeEntity(_0x79e9e2,_0x4b8f73){return function(_0x1152c0){if(_0x1152c0){return _0x1152c0['destroy']()[_0x461e('0x23')](function(){_0x79e9e2['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x25c8fd,_0x1b04dd){return function(_0xc0ec1a){if(!_0xc0ec1a){_0x25c8fd[_0x461e('0x15')](0x194);}return _0xc0ec1a;};}function handleError(_0x363453,_0x5a4788){_0x5a4788=_0x5a4788||0x1f4;return function(_0x448e77){logger[_0x461e('0x24')](_0x448e77[_0x461e('0x25')]);if(_0x448e77['name']){delete _0x448e77['name'];}_0x363453[_0x461e('0x16')](_0x5a4788)['send'](_0x448e77);};}exports[_0x461e('0x26')]=function(_0x5e23ec,_0x281eaf){var _0x368b57={},_0x4e5e21={},_0x4109e7={'count':0x0,'rows':[]};var _0x12035b=_[_0x461e('0x27')](db[_0x461e('0x28')][_0x461e('0x29')],function(_0x1e7b94){return{'name':_0x1e7b94['fieldName'],'type':_0x1e7b94['type'][_0x461e('0x2a')]};});_0x4e5e21[_0x461e('0x2b')]=_[_0x461e('0x27')](_0x12035b,_0x461e('0x2c'));_0x4e5e21[_0x461e('0x2d')]=_['keys'](_0x5e23ec[_0x461e('0x2d')]);_0x4e5e21[_0x461e('0x2e')]=_[_0x461e('0x2f')](_0x4e5e21[_0x461e('0x2b')],_0x4e5e21[_0x461e('0x2d')]);_0x368b57['attributes']=_['intersection'](_0x4e5e21[_0x461e('0x2b')],qs['fields'](_0x5e23ec['query'][_0x461e('0x30')]));_0x368b57['attributes']=_0x368b57['attributes'][_0x461e('0x31')]?_0x368b57['attributes']:_0x4e5e21[_0x461e('0x2b')];if(!_0x5e23ec[_0x461e('0x2d')][_0x461e('0x32')](_0x461e('0x33'))){_0x368b57[_0x461e('0x1b')]=qs[_0x461e('0x1b')](_0x5e23ec[_0x461e('0x2d')][_0x461e('0x1b')]);_0x368b57[_0x461e('0x19')]=qs[_0x461e('0x19')](_0x5e23ec['query'][_0x461e('0x19')]);}_0x368b57['order']=qs[_0x461e('0x34')](_0x5e23ec[_0x461e('0x2d')]['sort']);_0x368b57[_0x461e('0x35')]=qs[_0x461e('0x2e')](_[_0x461e('0x36')](_0x5e23ec[_0x461e('0x2d')],_0x4e5e21[_0x461e('0x2e')]),_0x12035b);if(_0x5e23ec['query'][_0x461e('0x37')]){_0x368b57[_0x461e('0x35')]=_['merge'](_0x368b57['where'],{'$or':_[_0x461e('0x27')](_0x12035b,function(_0x29f25c){if(_0x29f25c[_0x461e('0x38')]!==_0x461e('0x39')){var _0x2aab39={};_0x2aab39[_0x29f25c[_0x461e('0x2c')]]={'$like':'%'+_0x5e23ec[_0x461e('0x2d')][_0x461e('0x37')]+'%'};return _0x2aab39;}})});}_0x368b57=_['merge']({},_0x368b57,_0x5e23ec['options']);var _0x142ed4={'where':_0x368b57[_0x461e('0x35')]};return db[_0x461e('0x28')][_0x461e('0x1c')](_0x142ed4)[_0x461e('0x23')](function(_0x41932a){_0x4109e7[_0x461e('0x1c')]=_0x41932a;if(_0x5e23ec[_0x461e('0x2d')][_0x461e('0x3a')]){_0x368b57[_0x461e('0x3b')]=[{'all':!![]}];}return db['OpenchannelTransferReport']['findAll'](_0x368b57);})[_0x461e('0x23')](function(_0x4bcd2b){_0x4109e7['rows']=_0x4bcd2b;return _0x4109e7;})[_0x461e('0x23')](respondWithFilteredResult(_0x281eaf,_0x368b57))[_0x461e('0x3c')](handleError(_0x281eaf,null));};exports['show']=function(_0x5634f4,_0x3c1d45){var _0x3a8c67={'raw':!![],'where':{'id':_0x5634f4[_0x461e('0x3d')]['id']}},_0x4abc38={};_0x4abc38[_0x461e('0x2b')]=_[_0x461e('0x3e')](db[_0x461e('0x28')][_0x461e('0x29')]);_0x4abc38[_0x461e('0x2d')]=_[_0x461e('0x3e')](_0x5634f4[_0x461e('0x2d')]);_0x4abc38[_0x461e('0x2e')]=_[_0x461e('0x2f')](_0x4abc38[_0x461e('0x2b')],_0x4abc38[_0x461e('0x2d')]);_0x3a8c67[_0x461e('0x3f')]=_[_0x461e('0x2f')](_0x4abc38[_0x461e('0x2b')],qs[_0x461e('0x30')](_0x5634f4[_0x461e('0x2d')][_0x461e('0x30')]));_0x3a8c67[_0x461e('0x3f')]=_0x3a8c67[_0x461e('0x3f')]['length']?_0x3a8c67[_0x461e('0x3f')]:_0x4abc38['model'];if(_0x5634f4[_0x461e('0x2d')][_0x461e('0x3a')]){_0x3a8c67['include']=[{'all':!![]}];}_0x3a8c67=_[_0x461e('0x40')]({},_0x3a8c67,_0x5634f4[_0x461e('0x41')]);return db[_0x461e('0x28')][_0x461e('0x42')](_0x3a8c67)[_0x461e('0x23')](handleEntityNotFound(_0x3c1d45,null))['then'](respondWithResult(_0x3c1d45,null))[_0x461e('0x3c')](handleError(_0x3c1d45,null));};exports[_0x461e('0x43')]=function(_0x1301b1,_0x4af962){return db['OpenchannelTransferReport']['create'](_0x1301b1[_0x461e('0x44')],{})[_0x461e('0x23')](respondWithResult(_0x4af962,0xc9))[_0x461e('0x3c')](handleError(_0x4af962,null));};exports[_0x461e('0x22')]=function(_0x59d9bd,_0x3a0cdf){if(_0x59d9bd[_0x461e('0x44')]['id']){delete _0x59d9bd[_0x461e('0x44')]['id'];}return db[_0x461e('0x28')][_0x461e('0x42')]({'where':{'id':_0x59d9bd['params']['id']}})[_0x461e('0x23')](handleEntityNotFound(_0x3a0cdf,null))['then'](saveUpdates(_0x59d9bd[_0x461e('0x44')],null))[_0x461e('0x23')](respondWithResult(_0x3a0cdf,null))['catch'](handleError(_0x3a0cdf,null));};exports[_0x461e('0x45')]=function(_0x5bad35,_0x455ac4){return db['OpenchannelTransferReport']['find']({'where':{'id':_0x5bad35[_0x461e('0x3d')]['id']}})[_0x461e('0x23')](handleEntityNotFound(_0x455ac4,null))[_0x461e('0x23')](removeEntity(_0x455ac4,null))[_0x461e('0x3c')](handleError(_0x455ac4,null));};exports[_0x461e('0x46')]=function(_0x42a5fd,_0x573dd2){return db[_0x461e('0x28')]['describe']()[_0x461e('0x23')](respondWithResult(_0x573dd2,null))[_0x461e('0x3c')](handleError(_0x573dd2,null));};
\ No newline at end of file
+var _0x1c69=['catch','params','find','create','update','body','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','path','sox','to-csv','ejs','lodash','squel','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','apply','save','then','destroy','end','error','stack','name','send','index','map','OpenchannelTransferReport','rawAttributes','fieldName','type','key','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','where','VIRTUAL','filter','options','includeAll','include','rows'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x1c69,0x1c2));var _0x91c6=function(_0x11005e,_0x20c3d2){_0x11005e=_0x11005e-0x0;var _0x29338f=_0x1c69[_0x11005e];return _0x29338f;};'use strict';var emlformat=require(_0x91c6('0x0'));var rimraf=require(_0x91c6('0x1'));var zipdir=require(_0x91c6('0x2'));var jsonpatch=require(_0x91c6('0x3'));var rp=require('request-promise');var moment=require(_0x91c6('0x4'));var BPromise=require(_0x91c6('0x5'));var Mustache=require('mustache');var util=require(_0x91c6('0x6'));var path=require(_0x91c6('0x7'));var sox=require(_0x91c6('0x8'));var csv=require(_0x91c6('0x9'));var ejs=require(_0x91c6('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x91c6('0xb'));var squel=require(_0x91c6('0xc'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x91c6('0xd'));var toCsv=require(_0x91c6('0x9'));var querystring=require(_0x91c6('0xe'));var Papa=require('papaparse');var Redis=require(_0x91c6('0xf'));var authService=require(_0x91c6('0x10'));var qs=require(_0x91c6('0x11'));var as=require(_0x91c6('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x91c6('0x13'))(_0x91c6('0x14'));var utils=require(_0x91c6('0x15'));var config=require(_0x91c6('0x16'));var licenseUtil=require(_0x91c6('0x17'));var db=require(_0x91c6('0x18'))['db'];function respondWithStatusCode(_0x4831e2,_0x931560){_0x931560=_0x931560||0xcc;return function(_0x46ffe8){if(_0x46ffe8){return _0x4831e2[_0x91c6('0x19')](_0x931560);}return _0x4831e2[_0x91c6('0x1a')](_0x931560)['end']();};}function respondWithResult(_0x4a564f,_0x36d8a2){_0x36d8a2=_0x36d8a2||0xc8;return function(_0x465ae9){if(_0x465ae9){return _0x4a564f[_0x91c6('0x1a')](_0x36d8a2)[_0x91c6('0x1b')](_0x465ae9);}};}function respondWithFilteredResult(_0x2ddfff,_0x3a9fcb){return function(_0x51974b){if(_0x51974b){var _0x1ca7ff=typeof _0x3a9fcb[_0x91c6('0x1c')]===_0x91c6('0x1d')&&typeof _0x3a9fcb[_0x91c6('0x1e')]===_0x91c6('0x1d');var _0x47a4e3=_0x51974b[_0x91c6('0x1f')];var _0x408321=_0x1ca7ff?0x0:_0x3a9fcb[_0x91c6('0x1c')];var _0x265494=_0x1ca7ff?_0x51974b[_0x91c6('0x1f')]:_0x3a9fcb['offset']+_0x3a9fcb[_0x91c6('0x1e')];var _0x4e169a;if(_0x265494>=_0x47a4e3){_0x265494=_0x47a4e3;_0x4e169a=0xc8;}else{_0x4e169a=0xce;}_0x2ddfff[_0x91c6('0x1a')](_0x4e169a);return _0x2ddfff['set']('Content-Range',_0x408321+'-'+_0x265494+'/'+_0x47a4e3)[_0x91c6('0x1b')](_0x51974b);}return null;};}function patchUpdates(_0x485e1e){return function(_0x2d120d){try{jsonpatch[_0x91c6('0x20')](_0x2d120d,_0x485e1e,!![]);}catch(_0x7a7bbe){return BPromise['reject'](_0x7a7bbe);}return _0x2d120d[_0x91c6('0x21')]();};}function saveUpdates(_0x2b490a,_0x460dfe){return function(_0x7e5d45){if(_0x7e5d45){return _0x7e5d45['update'](_0x2b490a)[_0x91c6('0x22')](function(_0x11c3f6){return _0x11c3f6;});}return null;};}function removeEntity(_0xded2db,_0x3e7c96){return function(_0x50fec9){if(_0x50fec9){return _0x50fec9[_0x91c6('0x23')]()[_0x91c6('0x22')](function(){_0xded2db[_0x91c6('0x1a')](0xcc)[_0x91c6('0x24')]();});}};}function handleEntityNotFound(_0x4e98c4,_0x2a74cc){return function(_0x478ce3){if(!_0x478ce3){_0x4e98c4[_0x91c6('0x19')](0x194);}return _0x478ce3;};}function handleError(_0x2c4ac3,_0x2e2a13){_0x2e2a13=_0x2e2a13||0x1f4;return function(_0x8dc26a){logger[_0x91c6('0x25')](_0x8dc26a[_0x91c6('0x26')]);if(_0x8dc26a[_0x91c6('0x27')]){delete _0x8dc26a[_0x91c6('0x27')];}_0x2c4ac3[_0x91c6('0x1a')](_0x2e2a13)[_0x91c6('0x28')](_0x8dc26a);};}exports[_0x91c6('0x29')]=function(_0x4c9727,_0x297ecd){var _0x476afc={},_0x26841c={},_0xa5533a={'count':0x0,'rows':[]};var _0x2d92be=_[_0x91c6('0x2a')](db[_0x91c6('0x2b')][_0x91c6('0x2c')],function(_0x398481){return{'name':_0x398481[_0x91c6('0x2d')],'type':_0x398481[_0x91c6('0x2e')][_0x91c6('0x2f')]};});_0x26841c['model']=_['map'](_0x2d92be,'name');_0x26841c['query']=_[_0x91c6('0x30')](_0x4c9727[_0x91c6('0x31')]);_0x26841c[_0x91c6('0x32')]=_[_0x91c6('0x33')](_0x26841c[_0x91c6('0x34')],_0x26841c[_0x91c6('0x31')]);_0x476afc[_0x91c6('0x35')]=_[_0x91c6('0x33')](_0x26841c[_0x91c6('0x34')],qs[_0x91c6('0x36')](_0x4c9727[_0x91c6('0x31')][_0x91c6('0x36')]));_0x476afc[_0x91c6('0x35')]=_0x476afc[_0x91c6('0x35')][_0x91c6('0x37')]?_0x476afc[_0x91c6('0x35')]:_0x26841c[_0x91c6('0x34')];if(!_0x4c9727[_0x91c6('0x31')][_0x91c6('0x38')](_0x91c6('0x39'))){_0x476afc['limit']=qs['limit'](_0x4c9727[_0x91c6('0x31')]['limit']);_0x476afc[_0x91c6('0x1c')]=qs[_0x91c6('0x1c')](_0x4c9727[_0x91c6('0x31')]['offset']);}_0x476afc[_0x91c6('0x3a')]=qs[_0x91c6('0x3b')](_0x4c9727[_0x91c6('0x31')][_0x91c6('0x3b')]);_0x476afc['where']=qs[_0x91c6('0x32')](_[_0x91c6('0x3c')](_0x4c9727[_0x91c6('0x31')],_0x26841c['filters']),_0x2d92be);if(_0x4c9727['query']['filter']){_0x476afc[_0x91c6('0x3d')]=_['merge'](_0x476afc['where'],{'$or':_[_0x91c6('0x2a')](_0x2d92be,function(_0x8aac5a){if(_0x8aac5a['type']!==_0x91c6('0x3e')){var _0x75ab9e={};_0x75ab9e[_0x8aac5a[_0x91c6('0x27')]]={'$like':'%'+_0x4c9727[_0x91c6('0x31')][_0x91c6('0x3f')]+'%'};return _0x75ab9e;}})});}_0x476afc=_['merge']({},_0x476afc,_0x4c9727[_0x91c6('0x40')]);var _0x3d29ab={'where':_0x476afc[_0x91c6('0x3d')]};return db[_0x91c6('0x2b')][_0x91c6('0x1f')](_0x3d29ab)[_0x91c6('0x22')](function(_0x2c332c){_0xa5533a['count']=_0x2c332c;if(_0x4c9727[_0x91c6('0x31')][_0x91c6('0x41')]){_0x476afc[_0x91c6('0x42')]=[{'all':!![]}];}return db[_0x91c6('0x2b')]['findAll'](_0x476afc);})['then'](function(_0x5edaf2){_0xa5533a[_0x91c6('0x43')]=_0x5edaf2;return _0xa5533a;})[_0x91c6('0x22')](respondWithFilteredResult(_0x297ecd,_0x476afc))[_0x91c6('0x44')](handleError(_0x297ecd,null));};exports['show']=function(_0x5c3aaf,_0x40c6bb){var _0x32f640={'raw':!![],'where':{'id':_0x5c3aaf[_0x91c6('0x45')]['id']}},_0x5cc8bc={};_0x5cc8bc[_0x91c6('0x34')]=_[_0x91c6('0x30')](db[_0x91c6('0x2b')][_0x91c6('0x2c')]);_0x5cc8bc['query']=_[_0x91c6('0x30')](_0x5c3aaf[_0x91c6('0x31')]);_0x5cc8bc['filters']=_[_0x91c6('0x33')](_0x5cc8bc[_0x91c6('0x34')],_0x5cc8bc['query']);_0x32f640['attributes']=_[_0x91c6('0x33')](_0x5cc8bc[_0x91c6('0x34')],qs['fields'](_0x5c3aaf['query'][_0x91c6('0x36')]));_0x32f640[_0x91c6('0x35')]=_0x32f640[_0x91c6('0x35')][_0x91c6('0x37')]?_0x32f640['attributes']:_0x5cc8bc['model'];if(_0x5c3aaf[_0x91c6('0x31')]['includeAll']){_0x32f640[_0x91c6('0x42')]=[{'all':!![]}];}_0x32f640=_['merge']({},_0x32f640,_0x5c3aaf[_0x91c6('0x40')]);return db[_0x91c6('0x2b')][_0x91c6('0x46')](_0x32f640)['then'](handleEntityNotFound(_0x40c6bb,null))[_0x91c6('0x22')](respondWithResult(_0x40c6bb,null))[_0x91c6('0x44')](handleError(_0x40c6bb,null));};exports[_0x91c6('0x47')]=function(_0x465cbb,_0x10f5f8){return db[_0x91c6('0x2b')][_0x91c6('0x47')](_0x465cbb['body'],{})[_0x91c6('0x22')](respondWithResult(_0x10f5f8,0xc9))[_0x91c6('0x44')](handleError(_0x10f5f8,null));};exports[_0x91c6('0x48')]=function(_0x3928d5,_0x1af0b5){if(_0x3928d5[_0x91c6('0x49')]['id']){delete _0x3928d5[_0x91c6('0x49')]['id'];}return db['OpenchannelTransferReport'][_0x91c6('0x46')]({'where':{'id':_0x3928d5[_0x91c6('0x45')]['id']}})['then'](handleEntityNotFound(_0x1af0b5,null))[_0x91c6('0x22')](saveUpdates(_0x3928d5[_0x91c6('0x49')],null))[_0x91c6('0x22')](respondWithResult(_0x1af0b5,null))[_0x91c6('0x44')](handleError(_0x1af0b5,null));};exports[_0x91c6('0x23')]=function(_0x4a604c,_0xd6dfb8){return db['OpenchannelTransferReport'][_0x91c6('0x46')]({'where':{'id':_0x4a604c[_0x91c6('0x45')]['id']}})['then'](handleEntityNotFound(_0xd6dfb8,null))[_0x91c6('0x22')](removeEntity(_0xd6dfb8,null))[_0x91c6('0x44')](handleError(_0xd6dfb8,null));};exports['describe']=function(_0x4eb476,_0x5571af){return db['OpenchannelTransferReport']['describe']()[_0x91c6('0x22')](respondWithResult(_0x5571af,null))[_0x91c6('0x44')](handleError(_0x5571af,null));};
\ No newline at end of file
index 515ba64..0ca47bc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfdf1=['../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','exports','define','OpenchannelTransferReport','report_openchannel_transfer','uniqueid','lodash','util'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0xfdf1,0x116));var _0x1fdf=function(_0xb63923,_0x5df3bb){_0xb63923=_0xb63923-0x0;var _0x35d5ac=_0xfdf1[_0xb63923];return _0x35d5ac;};'use strict';var _=require(_0x1fdf('0x0'));var util=require(_0x1fdf('0x1'));var logger=require(_0x1fdf('0x2'))(_0x1fdf('0x3'));var moment=require(_0x1fdf('0x4'));var BPromise=require(_0x1fdf('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x1fdf('0x6'));var rimraf=require(_0x1fdf('0x7'));var config=require(_0x1fdf('0x8'));var attributes=require('./openchannelTransferReport.attributes');module[_0x1fdf('0x9')]=function(_0x1a80cb,_0x3c814a){return _0x1a80cb[_0x1fdf('0xa')](_0x1fdf('0xb'),attributes,{'tableName':_0x1fdf('0xc'),'paranoid':![],'indexes':[{'name':_0x1fdf('0xd'),'fields':[_0x1fdf('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xd8e8=['./openchannelTransferReport.attributes','exports','define','uniqueid','../../config/logger','moment','bluebird','request-promise','path','rimraf'];(function(_0x2b0fda,_0x4cfaec){var _0x3acf71=function(_0x2448c2){while(--_0x2448c2){_0x2b0fda['push'](_0x2b0fda['shift']());}};_0x3acf71(++_0x4cfaec);}(_0xd8e8,0x16c));var _0x8d8e=function(_0x659dc1,_0x1b9820){_0x659dc1=_0x659dc1-0x0;var _0x11e921=_0xd8e8[_0x659dc1];return _0x11e921;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x8d8e('0x0'))('api');var moment=require(_0x8d8e('0x1'));var BPromise=require(_0x8d8e('0x2'));var rp=require(_0x8d8e('0x3'));var fs=require('fs');var path=require(_0x8d8e('0x4'));var rimraf=require(_0x8d8e('0x5'));var config=require('../../config/environment');var attributes=require(_0x8d8e('0x6'));module[_0x8d8e('0x7')]=function(_0x58d988,_0x29186a){return _0x58d988[_0x8d8e('0x8')]('OpenchannelTransferReport',attributes,{'tableName':'report_openchannel_transfer','paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0x8d8e('0x9')]}],'timestamps':!![]});};
\ No newline at end of file
index 6bb2408..2b6de7a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2975=['http','request','then','info','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','OpenchannelTransferReport,\x20%s,\x20%s','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/environment','jayson/promise','client'];(function(_0xc489d8,_0x562c9b){var _0x17dc03=function(_0x774be0){while(--_0x774be0){_0xc489d8['push'](_0xc489d8['shift']());}};_0x17dc03(++_0x562c9b);}(_0x2975,0x1c5));var _0x5297=function(_0x47b464,_0x448ef1){_0x47b464=_0x47b464-0x0;var _0x1cd888=_0x2975[_0x47b464];return _0x1cd888;};'use strict';var _=require('lodash');var util=require(_0x5297('0x0'));var moment=require(_0x5297('0x1'));var BPromise=require(_0x5297('0x2'));var rs=require(_0x5297('0x3'));var fs=require('fs');var Redis=require(_0x5297('0x4'));var db=require(_0x5297('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x5297('0x6'));var jayson=require(_0x5297('0x7'));var client=jayson[_0x5297('0x8')][_0x5297('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4d1d2c,_0x1f6762,_0x1b72a7){return new BPromise(function(_0x4f12b0,_0x2c015c){return client[_0x5297('0xa')](_0x4d1d2c,_0x1b72a7)[_0x5297('0xb')](function(_0x2f3b24){logger[_0x5297('0xc')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x1f6762,_0x5297('0xd'));logger[_0x5297('0xe')](_0x5297('0xf'),_0x1f6762,'request\x20sent',JSON[_0x5297('0x10')](_0x2f3b24));if(_0x2f3b24[_0x5297('0x11')]){if(_0x2f3b24[_0x5297('0x11')]['code']===0x1f4){logger[_0x5297('0x11')](_0x5297('0x12'),_0x1f6762,_0x2f3b24['error']['message']);return _0x2c015c(_0x2f3b24[_0x5297('0x11')][_0x5297('0x13')]);}logger['error'](_0x5297('0x12'),_0x1f6762,_0x2f3b24['error'][_0x5297('0x13')]);return _0x4f12b0(_0x2f3b24[_0x5297('0x11')]['message']);}else{logger[_0x5297('0xc')](_0x5297('0x12'),_0x1f6762,_0x5297('0xd'));_0x4f12b0(_0x2f3b24[_0x5297('0x14')][_0x5297('0x13')]);}})[_0x5297('0x15')](function(_0x1fb138){logger[_0x5297('0x11')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x1f6762,_0x1fb138);_0x2c015c(_0x1fb138);});});}
\ No newline at end of file
+var _0x3fa4=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','then','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','OpenchannelTransferReport,\x20%s,\x20%s','result','catch','lodash','randomstring'];(function(_0x1c443f,_0x51319d){var _0x4a4a71=function(_0x355b73){while(--_0x355b73){_0x1c443f['push'](_0x1c443f['shift']());}};_0x4a4a71(++_0x51319d);}(_0x3fa4,0xf0));var _0x43fa=function(_0x459d45,_0x26908d){_0x459d45=_0x459d45-0x0;var _0x322980=_0x3fa4[_0x459d45];return _0x322980;};'use strict';var _=require(_0x43fa('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x43fa('0x1'));var fs=require('fs');var Redis=require(_0x43fa('0x2'));var db=require(_0x43fa('0x3'))['db'];var utils=require(_0x43fa('0x4'));var logger=require(_0x43fa('0x5'))(_0x43fa('0x6'));var config=require(_0x43fa('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x43fa('0x8')][_0x43fa('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x6df71c,_0x584209,_0x3dc891){return new BPromise(function(_0x46adc7,_0x1dc401){return client['request'](_0x6df71c,_0x3dc891)[_0x43fa('0xa')](function(_0x36d40d){logger['info']('OpenchannelTransferReport,\x20%s,\x20%s',_0x584209,_0x43fa('0xb'));logger[_0x43fa('0xc')](_0x43fa('0xd'),_0x584209,_0x43fa('0xb'),JSON[_0x43fa('0xe')](_0x36d40d));if(_0x36d40d['error']){if(_0x36d40d[_0x43fa('0xf')][_0x43fa('0x10')]===0x1f4){logger[_0x43fa('0xf')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x584209,_0x36d40d[_0x43fa('0xf')][_0x43fa('0x11')]);return _0x1dc401(_0x36d40d[_0x43fa('0xf')]['message']);}logger[_0x43fa('0xf')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x584209,_0x36d40d['error']['message']);return _0x46adc7(_0x36d40d[_0x43fa('0xf')]['message']);}else{logger[_0x43fa('0x12')](_0x43fa('0x13'),_0x584209,'request\x20sent');_0x46adc7(_0x36d40d[_0x43fa('0x14')][_0x43fa('0x11')]);}})[_0x43fa('0x15')](function(_0x2439d4){logger[_0x43fa('0xf')](_0x43fa('0x13'),_0x584209,_0x2439d4);_0x1dc401(_0x2439d4);});});}
\ No newline at end of file
index 9c121c4..5784292 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x301c=['../../config/environment','index','get','/:id','show','post','put','update','isAuthenticated','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x5e1e25,_0xdc1421){var _0x548e5f=function(_0x576360){while(--_0x576360){_0x5e1e25['push'](_0x5e1e25['shift']());}};_0x548e5f(++_0xdc1421);}(_0x301c,0x83));var _0xc301=function(_0x2e8889,_0xcd72f9){_0x2e8889=_0x2e8889-0x0;var _0x19dae6=_0x301c[_0x2e8889];return _0x19dae6;};'use strict';var multer=require(_0xc301('0x0'));var util=require(_0xc301('0x1'));var path=require(_0xc301('0x2'));var timeout=require(_0xc301('0x3'));var express=require(_0xc301('0x4'));var router=express[_0xc301('0x5')]();var fs_extra=require(_0xc301('0x6'));var auth=require(_0xc301('0x7'));var interaction=require(_0xc301('0x8'));var config=require(_0xc301('0x9'));var controller=require('./pause.controller');router['get']('/',auth['isAuthenticated'](),controller[_0xc301('0xa')]);router[_0xc301('0xb')](_0xc301('0xc'),auth['isAuthenticated'](),controller[_0xc301('0xd')]);router[_0xc301('0xe')]('/',auth['isAuthenticated'](),controller['create']);router[_0xc301('0xf')](_0xc301('0xc'),auth['isAuthenticated'](),controller[_0xc301('0x10')]);router['delete'](_0xc301('0xc'),auth[_0xc301('0x11')](),controller[_0xc301('0x12')]);module[_0xc301('0x13')]=router;
\ No newline at end of file
+var _0xa4c7=['/:id','show','post','create','delete','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./pause.controller','get','isAuthenticated','index'];(function(_0x22d4b8,_0x12a78c){var _0x2d4848=function(_0x2fb969){while(--_0x2fb969){_0x22d4b8['push'](_0x22d4b8['shift']());}};_0x2d4848(++_0x12a78c);}(_0xa4c7,0x182));var _0x7a4c=function(_0x22dd5a,_0xa5da5d){_0x22dd5a=_0x22dd5a-0x0;var _0x21a1f3=_0xa4c7[_0x22dd5a];return _0x21a1f3;};'use strict';var multer=require(_0x7a4c('0x0'));var util=require(_0x7a4c('0x1'));var path=require(_0x7a4c('0x2'));var timeout=require(_0x7a4c('0x3'));var express=require(_0x7a4c('0x4'));var router=express[_0x7a4c('0x5')]();var fs_extra=require(_0x7a4c('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0x7a4c('0x7'));var config=require(_0x7a4c('0x8'));var controller=require(_0x7a4c('0x9'));router[_0x7a4c('0xa')]('/',auth[_0x7a4c('0xb')](),controller[_0x7a4c('0xc')]);router[_0x7a4c('0xa')](_0x7a4c('0xd'),auth[_0x7a4c('0xb')](),controller[_0x7a4c('0xe')]);router[_0x7a4c('0xf')]('/',auth[_0x7a4c('0xb')](),controller[_0x7a4c('0x10')]);router['put'](_0x7a4c('0xd'),auth['isAuthenticated'](),controller['update']);router[_0x7a4c('0x11')]('/:id',auth['isAuthenticated'](),controller['destroy']);module[_0x7a4c('0x12')]=router;
\ No newline at end of file
index 3ed3df9..4624ce5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x407b=['name','STRING'];(function(_0x5a8f92,_0x3721f0){var _0x3f94a5=function(_0x5482eb){while(--_0x5482eb){_0x5a8f92['push'](_0x5a8f92['shift']());}};_0x3f94a5(++_0x3721f0);}(_0x407b,0xd1));var _0xb407=function(_0x358647,_0x5a50a3){_0x358647=_0x358647-0x0;var _0x4d176d=_0x407b[_0x358647];return _0x4d176d;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0xb407('0x0')],'unique':_0xb407('0x1'),'allowNull':![]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x629a=['STRING','name','sequelize'];(function(_0xdbd3af,_0x13ba95){var _0x43ae68=function(_0x2d7bf7){while(--_0x2d7bf7){_0xdbd3af['push'](_0xdbd3af['shift']());}};_0x43ae68(++_0x13ba95);}(_0x629a,0x185));var _0xa629=function(_0x5a90b3,_0x59fcba){_0x5a90b3=_0x5a90b3-0x0;var _0x533973=_0x629a[_0x5a90b3];return _0x533973;};'use strict';var Sequelize=require(_0xa629('0x0'));module['exports']={'name':{'type':Sequelize[_0xa629('0x1')],'unique':_0xa629('0x2'),'allowNull':![]},'description':{'type':Sequelize[_0xa629('0x1')]}};
\ No newline at end of file
index 62212f8..7b53bfa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6138=['rawAttributes','fieldName','type','key','model','map','keys','query','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','filters','filter','merge','includeAll','include','findAll','rows','options','find','catch','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','to-csv','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','apply','reject','save','update','then','destroy','get','UserProfileResource','error','stack','name','send','Pause'];(function(_0x2802e4,_0xc318b8){var _0x101a9b=function(_0x260f58){while(--_0x260f58){_0x2802e4['push'](_0x2802e4['shift']());}};_0x101a9b(++_0xc318b8);}(_0x6138,0x72));var _0x8613=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0x6138[_0x17d9e3];return _0x14192d;};'use strict';var emlformat=require(_0x8613('0x0'));var rimraf=require(_0x8613('0x1'));var zipdir=require(_0x8613('0x2'));var jsonpatch=require(_0x8613('0x3'));var rp=require('request-promise');var moment=require(_0x8613('0x4'));var BPromise=require(_0x8613('0x5'));var Mustache=require(_0x8613('0x6'));var util=require(_0x8613('0x7'));var path=require(_0x8613('0x8'));var sox=require('sox');var csv=require(_0x8613('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x8613('0xa'));var squel=require(_0x8613('0xb'));var crypto=require(_0x8613('0xc'));var jsforce=require(_0x8613('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x8613('0xe'));var Papa=require(_0x8613('0xf'));var Redis=require(_0x8613('0x10'));var authService=require(_0x8613('0x11'));var qs=require(_0x8613('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x8613('0x13'));var logger=require('../../config/logger')('api');var utils=require(_0x8613('0x14'));var config=require(_0x8613('0x15'));var licenseUtil=require(_0x8613('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4509ec,_0xfcfb98){_0xfcfb98=_0xfcfb98||0xcc;return function(_0x1fe292){if(_0x1fe292){return _0x4509ec[_0x8613('0x17')](_0xfcfb98);}return _0x4509ec[_0x8613('0x18')](_0xfcfb98)[_0x8613('0x19')]();};}function respondWithResult(_0x28fa01,_0x190d15){_0x190d15=_0x190d15||0xc8;return function(_0x3b40b1){if(_0x3b40b1){return _0x28fa01[_0x8613('0x18')](_0x190d15)[_0x8613('0x1a')](_0x3b40b1);}};}function respondWithFilteredResult(_0x4d3e0c,_0x2ff246){return function(_0x2986ce){if(_0x2986ce){var _0x1ba4ec=typeof _0x2ff246[_0x8613('0x1b')]===_0x8613('0x1c')&&typeof _0x2ff246['limit']===_0x8613('0x1c');var _0x55c1a7=_0x2986ce[_0x8613('0x1d')];var _0x169976=_0x1ba4ec?0x0:_0x2ff246['offset'];var _0xd1af24=_0x1ba4ec?_0x2986ce[_0x8613('0x1d')]:_0x2ff246[_0x8613('0x1b')]+_0x2ff246[_0x8613('0x1e')];var _0x3e0051;if(_0xd1af24>=_0x55c1a7){_0xd1af24=_0x55c1a7;_0x3e0051=0xc8;}else{_0x3e0051=0xce;}_0x4d3e0c['status'](_0x3e0051);return _0x4d3e0c[_0x8613('0x1f')](_0x8613('0x20'),_0x169976+'-'+_0xd1af24+'/'+_0x55c1a7)[_0x8613('0x1a')](_0x2986ce);}return null;};}function patchUpdates(_0x50c30b){return function(_0x32b62f){try{jsonpatch[_0x8613('0x21')](_0x32b62f,_0x50c30b,!![]);}catch(_0x27ae61){return BPromise[_0x8613('0x22')](_0x27ae61);}return _0x32b62f[_0x8613('0x23')]();};}function saveUpdates(_0x56e26b,_0x1f23a5){return function(_0x1a7c5f){if(_0x1a7c5f){return _0x1a7c5f[_0x8613('0x24')](_0x56e26b)[_0x8613('0x25')](function(_0x184b49){return _0x184b49;});}return null;};}function removeEntity(_0x141ac8,_0x66aab4){return function(_0x4072af){if(_0x4072af){return _0x4072af[_0x8613('0x26')]()['then'](function(){var _0x2b04a5=_0x4072af[_0x8613('0x27')]({'plain':!![]});var _0x284dc6='Pauses';return db[_0x8613('0x28')]['destroy']({'where':{'type':_0x284dc6,'resourceId':_0x2b04a5['id']}})['then'](function(){return _0x4072af;});})[_0x8613('0x25')](function(){_0x141ac8[_0x8613('0x18')](0xcc)[_0x8613('0x19')]();});}};}function handleEntityNotFound(_0x191515,_0x3aa9a1){return function(_0x40ebbd){if(!_0x40ebbd){_0x191515[_0x8613('0x17')](0x194);}return _0x40ebbd;};}function handleError(_0x505d56,_0x116913){_0x116913=_0x116913||0x1f4;return function(_0x19f9d1){logger[_0x8613('0x29')](_0x19f9d1[_0x8613('0x2a')]);if(_0x19f9d1[_0x8613('0x2b')]){delete _0x19f9d1[_0x8613('0x2b')];}_0x505d56[_0x8613('0x18')](_0x116913)[_0x8613('0x2c')](_0x19f9d1);};}exports['index']=function(_0x4d7a1f,_0x4e2401){var _0x678fe6={},_0x62fb46={},_0x52a3f8={'count':0x0,'rows':[]};var _0x3977c9=_['map'](db[_0x8613('0x2d')][_0x8613('0x2e')],function(_0x1b15e0){return{'name':_0x1b15e0[_0x8613('0x2f')],'type':_0x1b15e0[_0x8613('0x30')][_0x8613('0x31')]};});_0x62fb46[_0x8613('0x32')]=_[_0x8613('0x33')](_0x3977c9,'name');_0x62fb46['query']=_[_0x8613('0x34')](_0x4d7a1f[_0x8613('0x35')]);_0x62fb46['filters']=_['intersection'](_0x62fb46['model'],_0x62fb46[_0x8613('0x35')]);_0x678fe6['attributes']=_[_0x8613('0x36')](_0x62fb46['model'],qs[_0x8613('0x37')](_0x4d7a1f[_0x8613('0x35')]['fields']));_0x678fe6[_0x8613('0x38')]=_0x678fe6[_0x8613('0x38')][_0x8613('0x39')]?_0x678fe6[_0x8613('0x38')]:_0x62fb46[_0x8613('0x32')];if(!_0x4d7a1f[_0x8613('0x35')][_0x8613('0x3a')](_0x8613('0x3b'))){_0x678fe6['limit']=qs['limit'](_0x4d7a1f['query'][_0x8613('0x1e')]);_0x678fe6['offset']=qs[_0x8613('0x1b')](_0x4d7a1f[_0x8613('0x35')][_0x8613('0x1b')]);}_0x678fe6['order']=qs[_0x8613('0x3c')](_0x4d7a1f[_0x8613('0x35')][_0x8613('0x3c')]);_0x678fe6[_0x8613('0x3d')]=qs['filters'](_['pick'](_0x4d7a1f[_0x8613('0x35')],_0x62fb46[_0x8613('0x3e')]),_0x3977c9);if(_0x4d7a1f[_0x8613('0x35')][_0x8613('0x3f')]){_0x678fe6[_0x8613('0x3d')]=_['merge'](_0x678fe6[_0x8613('0x3d')],{'$or':_[_0x8613('0x33')](_0x3977c9,function(_0x5c8062){if(_0x5c8062[_0x8613('0x30')]!=='VIRTUAL'){var _0x22218e={};_0x22218e[_0x5c8062[_0x8613('0x2b')]]={'$like':'%'+_0x4d7a1f[_0x8613('0x35')][_0x8613('0x3f')]+'%'};return _0x22218e;}})});}_0x678fe6=_[_0x8613('0x40')]({},_0x678fe6,_0x4d7a1f['options']);var _0xaf032b={'where':_0x678fe6[_0x8613('0x3d')]};return db['Pause'][_0x8613('0x1d')](_0xaf032b)[_0x8613('0x25')](function(_0x2b597a){_0x52a3f8[_0x8613('0x1d')]=_0x2b597a;if(_0x4d7a1f[_0x8613('0x35')][_0x8613('0x41')]){_0x678fe6[_0x8613('0x42')]=[{'all':!![]}];}return db[_0x8613('0x2d')][_0x8613('0x43')](_0x678fe6);})[_0x8613('0x25')](function(_0x4ec05e){_0x52a3f8[_0x8613('0x44')]=_0x4ec05e;return _0x52a3f8;})[_0x8613('0x25')](respondWithFilteredResult(_0x4e2401,_0x678fe6))['catch'](handleError(_0x4e2401,null));};exports['show']=function(_0x3b2250,_0x4b9b75){var _0x58cb73={'raw':!![],'where':{'id':_0x3b2250['params']['id']}},_0x49286b={};_0x49286b[_0x8613('0x32')]=_[_0x8613('0x34')](db[_0x8613('0x2d')][_0x8613('0x2e')]);_0x49286b[_0x8613('0x35')]=_['keys'](_0x3b2250[_0x8613('0x35')]);_0x49286b[_0x8613('0x3e')]=_['intersection'](_0x49286b[_0x8613('0x32')],_0x49286b[_0x8613('0x35')]);_0x58cb73[_0x8613('0x38')]=_['intersection'](_0x49286b[_0x8613('0x32')],qs[_0x8613('0x37')](_0x3b2250['query']['fields']));_0x58cb73[_0x8613('0x38')]=_0x58cb73[_0x8613('0x38')]['length']?_0x58cb73['attributes']:_0x49286b['model'];if(_0x3b2250[_0x8613('0x35')][_0x8613('0x41')]){_0x58cb73[_0x8613('0x42')]=[{'all':!![]}];}_0x58cb73=_[_0x8613('0x40')]({},_0x58cb73,_0x3b2250[_0x8613('0x45')]);return db['Pause'][_0x8613('0x46')](_0x58cb73)[_0x8613('0x25')](handleEntityNotFound(_0x4b9b75,null))[_0x8613('0x25')](respondWithResult(_0x4b9b75,null))[_0x8613('0x47')](handleError(_0x4b9b75,null));};exports[_0x8613('0x48')]=function(_0x88def5,_0x214419){return db[_0x8613('0x2d')][_0x8613('0x48')](_0x88def5['body'],{})[_0x8613('0x25')](function(_0x4a587c){var _0x5deb16=_0x88def5[_0x8613('0x49')]['get']({'plain':!![]});if(!_0x5deb16)throw new Error(_0x8613('0x4a'));if(_0x5deb16[_0x8613('0x4b')]===_0x8613('0x49')){var _0x40eef6=_0x4a587c['get']({'plain':!![]});var _0x3191a8='Pauses';return db[_0x8613('0x4c')][_0x8613('0x46')]({'where':{'name':_0x3191a8,'userProfileId':_0x5deb16['userProfileId']},'raw':!![]})[_0x8613('0x25')](function(_0x563ef1){if(_0x563ef1&&_0x563ef1['autoAssociation']===0x0){return db[_0x8613('0x28')][_0x8613('0x48')]({'name':_0x40eef6[_0x8613('0x2b')],'resourceId':_0x40eef6['id'],'type':_0x563ef1[_0x8613('0x2b')],'sectionId':_0x563ef1['id']},{})['then'](function(){return _0x4a587c;});}else{return _0x4a587c;}})['catch'](function(_0x3122a2){logger[_0x8613('0x29')](_0x8613('0x4d'),_0x3122a2);throw _0x3122a2;});}return _0x4a587c;})['then'](respondWithResult(_0x214419,0xc9))[_0x8613('0x47')](handleError(_0x214419,null));};exports[_0x8613('0x24')]=function(_0x97c9a9,_0x4b3888){if(_0x97c9a9[_0x8613('0x4e')]['id']){delete _0x97c9a9['body']['id'];}return db[_0x8613('0x2d')][_0x8613('0x46')]({'where':{'id':_0x97c9a9[_0x8613('0x4f')]['id']}})['then'](handleEntityNotFound(_0x4b3888,null))[_0x8613('0x25')](saveUpdates(_0x97c9a9['body'],null))[_0x8613('0x25')](respondWithResult(_0x4b3888,null))[_0x8613('0x47')](handleError(_0x4b3888,null));};exports[_0x8613('0x26')]=function(_0x10a324,_0x48b7ab){return db[_0x8613('0x2d')]['find']({'where':{'id':_0x10a324[_0x8613('0x4f')]['id']}})[_0x8613('0x25')](handleEntityNotFound(_0x48b7ab,null))[_0x8613('0x25')](removeEntity(_0x48b7ab,null))['catch'](handleError(_0x48b7ab,null));};
\ No newline at end of file
+var _0x81ca=['zip-dir','fast-json-patch','request-promise','bluebird','mustache','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','update','then','destroy','get','Pauses','error','stack','name','Pause','fieldName','type','model','map','keys','intersection','query','fields','attributes','length','order','where','filters','filter','merge','includeAll','include','findAll','rows','catch','show','options','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','find','userProfileId','autoAssociation','UserProfileResource','params','eml-format','rimraf'];(function(_0x13b8f3,_0x442821){var _0x1a6d06=function(_0x5126f2){while(--_0x5126f2){_0x13b8f3['push'](_0x13b8f3['shift']());}};_0x1a6d06(++_0x442821);}(_0x81ca,0x17a));var _0xa81c=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x81ca[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0xa81c('0x0'));var rimraf=require(_0xa81c('0x1'));var zipdir=require(_0xa81c('0x2'));var jsonpatch=require(_0xa81c('0x3'));var rp=require(_0xa81c('0x4'));var moment=require('moment');var BPromise=require(_0xa81c('0x5'));var Mustache=require(_0xa81c('0x6'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0xa81c('0x7'));var ejs=require(_0xa81c('0x8'));var fs=require('fs');var fs_extra=require(_0xa81c('0x9'));var _=require(_0xa81c('0xa'));var squel=require(_0xa81c('0xb'));var crypto=require(_0xa81c('0xc'));var jsforce=require(_0xa81c('0xd'));var deskjs=require(_0xa81c('0xe'));var toCsv=require(_0xa81c('0x7'));var querystring=require('querystring');var Papa=require(_0xa81c('0xf'));var Redis=require(_0xa81c('0x10'));var authService=require(_0xa81c('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0xa81c('0x12'));var hardwareService=require(_0xa81c('0x13'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0xa81c('0x14'));var licenseUtil=require(_0xa81c('0x15'));var db=require(_0xa81c('0x16'))['db'];function respondWithStatusCode(_0x27bd5a,_0x266218){_0x266218=_0x266218||0xcc;return function(_0x2fd4cb){if(_0x2fd4cb){return _0x27bd5a[_0xa81c('0x17')](_0x266218);}return _0x27bd5a[_0xa81c('0x18')](_0x266218)[_0xa81c('0x19')]();};}function respondWithResult(_0x63536a,_0xc4b43d){_0xc4b43d=_0xc4b43d||0xc8;return function(_0x5b364d){if(_0x5b364d){return _0x63536a[_0xa81c('0x18')](_0xc4b43d)[_0xa81c('0x1a')](_0x5b364d);}};}function respondWithFilteredResult(_0x2c2c4c,_0x3ecded){return function(_0x5a864f){if(_0x5a864f){var _0x12fd3e=typeof _0x3ecded[_0xa81c('0x1b')]===_0xa81c('0x1c')&&typeof _0x3ecded[_0xa81c('0x1d')]===_0xa81c('0x1c');var _0x6694ea=_0x5a864f[_0xa81c('0x1e')];var _0x208003=_0x12fd3e?0x0:_0x3ecded['offset'];var _0x39ed42=_0x12fd3e?_0x5a864f[_0xa81c('0x1e')]:_0x3ecded[_0xa81c('0x1b')]+_0x3ecded[_0xa81c('0x1d')];var _0x269b7f;if(_0x39ed42>=_0x6694ea){_0x39ed42=_0x6694ea;_0x269b7f=0xc8;}else{_0x269b7f=0xce;}_0x2c2c4c[_0xa81c('0x18')](_0x269b7f);return _0x2c2c4c[_0xa81c('0x1f')](_0xa81c('0x20'),_0x208003+'-'+_0x39ed42+'/'+_0x6694ea)['json'](_0x5a864f);}return null;};}function patchUpdates(_0x214942){return function(_0x3125b1){try{jsonpatch[_0xa81c('0x21')](_0x3125b1,_0x214942,!![]);}catch(_0x2b819c){return BPromise['reject'](_0x2b819c);}return _0x3125b1['save']();};}function saveUpdates(_0x15ef8b,_0x3c5093){return function(_0x52a4d1){if(_0x52a4d1){return _0x52a4d1[_0xa81c('0x22')](_0x15ef8b)[_0xa81c('0x23')](function(_0x33a13e){return _0x33a13e;});}return null;};}function removeEntity(_0x5a8e8f,_0x51da70){return function(_0xf47888){if(_0xf47888){return _0xf47888[_0xa81c('0x24')]()['then'](function(){var _0xcfe847=_0xf47888[_0xa81c('0x25')]({'plain':!![]});var _0x125025=_0xa81c('0x26');return db['UserProfileResource'][_0xa81c('0x24')]({'where':{'type':_0x125025,'resourceId':_0xcfe847['id']}})[_0xa81c('0x23')](function(){return _0xf47888;});})[_0xa81c('0x23')](function(){_0x5a8e8f['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x37f8b9,_0x594b69){return function(_0xa897e){if(!_0xa897e){_0x37f8b9[_0xa81c('0x17')](0x194);}return _0xa897e;};}function handleError(_0x31dd21,_0x528c02){_0x528c02=_0x528c02||0x1f4;return function(_0x125d6e){logger[_0xa81c('0x27')](_0x125d6e[_0xa81c('0x28')]);if(_0x125d6e[_0xa81c('0x29')]){delete _0x125d6e[_0xa81c('0x29')];}_0x31dd21['status'](_0x528c02)['send'](_0x125d6e);};}exports['index']=function(_0x590cc9,_0x4adedf){var _0x25e6b9={},_0x1c0ad2={},_0x1450ea={'count':0x0,'rows':[]};var _0x1d8aa0=_['map'](db[_0xa81c('0x2a')]['rawAttributes'],function(_0x37d1bf){return{'name':_0x37d1bf[_0xa81c('0x2b')],'type':_0x37d1bf[_0xa81c('0x2c')]['key']};});_0x1c0ad2[_0xa81c('0x2d')]=_[_0xa81c('0x2e')](_0x1d8aa0,'name');_0x1c0ad2['query']=_[_0xa81c('0x2f')](_0x590cc9['query']);_0x1c0ad2['filters']=_[_0xa81c('0x30')](_0x1c0ad2['model'],_0x1c0ad2[_0xa81c('0x31')]);_0x25e6b9['attributes']=_[_0xa81c('0x30')](_0x1c0ad2['model'],qs[_0xa81c('0x32')](_0x590cc9['query']['fields']));_0x25e6b9[_0xa81c('0x33')]=_0x25e6b9[_0xa81c('0x33')][_0xa81c('0x34')]?_0x25e6b9[_0xa81c('0x33')]:_0x1c0ad2[_0xa81c('0x2d')];if(!_0x590cc9['query']['hasOwnProperty']('nolimit')){_0x25e6b9['limit']=qs[_0xa81c('0x1d')](_0x590cc9['query'][_0xa81c('0x1d')]);_0x25e6b9[_0xa81c('0x1b')]=qs[_0xa81c('0x1b')](_0x590cc9[_0xa81c('0x31')][_0xa81c('0x1b')]);}_0x25e6b9[_0xa81c('0x35')]=qs['sort'](_0x590cc9[_0xa81c('0x31')]['sort']);_0x25e6b9[_0xa81c('0x36')]=qs['filters'](_['pick'](_0x590cc9[_0xa81c('0x31')],_0x1c0ad2[_0xa81c('0x37')]),_0x1d8aa0);if(_0x590cc9[_0xa81c('0x31')][_0xa81c('0x38')]){_0x25e6b9[_0xa81c('0x36')]=_[_0xa81c('0x39')](_0x25e6b9[_0xa81c('0x36')],{'$or':_['map'](_0x1d8aa0,function(_0x59ed50){if(_0x59ed50[_0xa81c('0x2c')]!=='VIRTUAL'){var _0x347511={};_0x347511[_0x59ed50['name']]={'$like':'%'+_0x590cc9[_0xa81c('0x31')][_0xa81c('0x38')]+'%'};return _0x347511;}})});}_0x25e6b9=_[_0xa81c('0x39')]({},_0x25e6b9,_0x590cc9['options']);var _0x23f82b={'where':_0x25e6b9['where']};return db['Pause']['count'](_0x23f82b)['then'](function(_0x498c88){_0x1450ea['count']=_0x498c88;if(_0x590cc9['query'][_0xa81c('0x3a')]){_0x25e6b9[_0xa81c('0x3b')]=[{'all':!![]}];}return db[_0xa81c('0x2a')][_0xa81c('0x3c')](_0x25e6b9);})['then'](function(_0x2af23d){_0x1450ea[_0xa81c('0x3d')]=_0x2af23d;return _0x1450ea;})['then'](respondWithFilteredResult(_0x4adedf,_0x25e6b9))[_0xa81c('0x3e')](handleError(_0x4adedf,null));};exports[_0xa81c('0x3f')]=function(_0x52bdea,_0xb81785){var _0x21453b={'raw':!![],'where':{'id':_0x52bdea['params']['id']}},_0x37f87e={};_0x37f87e[_0xa81c('0x2d')]=_[_0xa81c('0x2f')](db['Pause']['rawAttributes']);_0x37f87e[_0xa81c('0x31')]=_['keys'](_0x52bdea[_0xa81c('0x31')]);_0x37f87e['filters']=_['intersection'](_0x37f87e[_0xa81c('0x2d')],_0x37f87e[_0xa81c('0x31')]);_0x21453b['attributes']=_[_0xa81c('0x30')](_0x37f87e['model'],qs[_0xa81c('0x32')](_0x52bdea['query'][_0xa81c('0x32')]));_0x21453b['attributes']=_0x21453b['attributes'][_0xa81c('0x34')]?_0x21453b['attributes']:_0x37f87e[_0xa81c('0x2d')];if(_0x52bdea[_0xa81c('0x31')]['includeAll']){_0x21453b[_0xa81c('0x3b')]=[{'all':!![]}];}_0x21453b=_[_0xa81c('0x39')]({},_0x21453b,_0x52bdea[_0xa81c('0x40')]);return db[_0xa81c('0x2a')]['find'](_0x21453b)[_0xa81c('0x23')](handleEntityNotFound(_0xb81785,null))[_0xa81c('0x23')](respondWithResult(_0xb81785,null))[_0xa81c('0x3e')](handleError(_0xb81785,null));};exports['create']=function(_0x376cd5,_0x55d8c5){return db['Pause'][_0xa81c('0x41')](_0x376cd5[_0xa81c('0x42')],{})[_0xa81c('0x23')](function(_0x2b5965){var _0x4922c4=_0x376cd5['user'][_0xa81c('0x25')]({'plain':!![]});if(!_0x4922c4)throw new Error(_0xa81c('0x43'));if(_0x4922c4[_0xa81c('0x44')]===_0xa81c('0x45')){var _0x5291da=_0x2b5965[_0xa81c('0x25')]({'plain':!![]});var _0x51a287=_0xa81c('0x26');return db[_0xa81c('0x46')][_0xa81c('0x47')]({'where':{'name':_0x51a287,'userProfileId':_0x4922c4[_0xa81c('0x48')]},'raw':!![]})[_0xa81c('0x23')](function(_0x85249){if(_0x85249&&_0x85249[_0xa81c('0x49')]===0x0){return db[_0xa81c('0x4a')][_0xa81c('0x41')]({'name':_0x5291da['name'],'resourceId':_0x5291da['id'],'type':_0x85249[_0xa81c('0x29')],'sectionId':_0x85249['id']},{})['then'](function(){return _0x2b5965;});}else{return _0x2b5965;}})[_0xa81c('0x3e')](function(_0x1b4313){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x1b4313);throw _0x1b4313;});}return _0x2b5965;})[_0xa81c('0x23')](respondWithResult(_0x55d8c5,0xc9))[_0xa81c('0x3e')](handleError(_0x55d8c5,null));};exports[_0xa81c('0x22')]=function(_0x57b189,_0x7295fe){if(_0x57b189[_0xa81c('0x42')]['id']){delete _0x57b189[_0xa81c('0x42')]['id'];}return db[_0xa81c('0x2a')][_0xa81c('0x47')]({'where':{'id':_0x57b189[_0xa81c('0x4b')]['id']}})[_0xa81c('0x23')](handleEntityNotFound(_0x7295fe,null))[_0xa81c('0x23')](saveUpdates(_0x57b189[_0xa81c('0x42')],null))[_0xa81c('0x23')](respondWithResult(_0x7295fe,null))[_0xa81c('0x3e')](handleError(_0x7295fe,null));};exports[_0xa81c('0x24')]=function(_0x3128b9,_0x310b46){return db[_0xa81c('0x2a')][_0xa81c('0x47')]({'where':{'id':_0x3128b9[_0xa81c('0x4b')]['id']}})[_0xa81c('0x23')](handleEntityNotFound(_0x310b46,null))['then'](removeEntity(_0x310b46,null))['catch'](handleError(_0x310b46,null));};
\ No newline at end of file
index 0012477..c36cf08 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe14b=['bluebird','path','./pause.attributes','exports','define','Pause','tools_pauses','lodash','util','moment'];(function(_0x347f9e,_0x1cc08f){var _0x5f1d60=function(_0x26987c){while(--_0x26987c){_0x347f9e['push'](_0x347f9e['shift']());}};_0x5f1d60(++_0x1cc08f);}(_0xe14b,0x93));var _0xbe14=function(_0x3be7d4,_0x2a412f){_0x3be7d4=_0x3be7d4-0x0;var _0x49acbc=_0xe14b[_0x3be7d4];return _0x49acbc;};'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
+var _0x7fbe=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./pause.attributes','exports','define','Pause'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x7fbe,0x1ec));var _0xe7fb=function(_0x1cffe2,_0x5383e8){_0x1cffe2=_0x1cffe2-0x0;var _0x57030e=_0x7fbe[_0x1cffe2];return _0x57030e;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xe7fb('0x0'))(_0xe7fb('0x1'));var moment=require(_0xe7fb('0x2'));var BPromise=require(_0xe7fb('0x3'));var rp=require(_0xe7fb('0x4'));var fs=require('fs');var path=require(_0xe7fb('0x5'));var rimraf=require(_0xe7fb('0x6'));var config=require(_0xe7fb('0x7'));var attributes=require(_0xe7fb('0x8'));module[_0xe7fb('0x9')]=function(_0x290172,_0x12d1b0){return _0x290172[_0xe7fb('0xa')](_0xe7fb('0xb'),attributes,{'tableName':'tools_pauses','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index a95a08d..474235b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a54=['message','request\x20sent','result','catch','Pause','find','options','raw','where','attributes','map','include','model','ShowPause','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','info','Pause,\x20%s,\x20%s','debug','stringify','error','code'];(function(_0x4ad095,_0x5f4d18){var _0x168ddf=function(_0x3600af){while(--_0x3600af){_0x4ad095['push'](_0x4ad095['shift']());}};_0x168ddf(++_0x5f4d18);}(_0x7a54,0x106));var _0x47a5=function(_0x32f9ab,_0x363c2b){_0x32f9ab=_0x32f9ab-0x0;var _0x2be6df=_0x7a54[_0x32f9ab];return _0x2be6df;};'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')]('Pause,\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['ShowPause']=function(_0x5247fd){var _0x423a81=this;return new Promise(function(_0xaf70a6,_0x2ce454){return db[_0x47a5('0x15')][_0x47a5('0x16')]({'raw':_0x5247fd[_0x47a5('0x17')]?_0x5247fd[_0x47a5('0x17')][_0x47a5('0x18')]===undefined?!![]:![]:!![],'where':_0x5247fd[_0x47a5('0x17')]?_0x5247fd['options'][_0x47a5('0x19')]||null:null,'attributes':_0x5247fd[_0x47a5('0x17')]?_0x5247fd['options'][_0x47a5('0x1a')]||null:null,'include':_0x5247fd[_0x47a5('0x17')]?_0x5247fd[_0x47a5('0x17')]['include']?_[_0x47a5('0x1b')](_0x5247fd[_0x47a5('0x17')][_0x47a5('0x1c')],function(_0x7a9f9e){return{'model':db[_0x7a9f9e['model']],'as':_0x7a9f9e['as'],'attributes':_0x7a9f9e[_0x47a5('0x1a')],'include':_0x7a9f9e[_0x47a5('0x1c')]?_['map'](_0x7a9f9e[_0x47a5('0x1c')],function(_0xc4cd63){return{'model':db[_0xc4cd63[_0x47a5('0x1d')]],'as':_0xc4cd63['as'],'attributes':_0xc4cd63[_0x47a5('0x1a')],'include':_0xc4cd63[_0x47a5('0x1c')]?_['map'](_0xc4cd63['include'],function(_0x136745){return{'model':db[_0x136745['model']],'as':_0x136745['as'],'attributes':_0x136745[_0x47a5('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x23cb77){logger[_0x47a5('0xb')](_0x47a5('0x1e'),_0x5247fd);logger[_0x47a5('0xd')](_0x47a5('0x1e'),_0x5247fd,JSON[_0x47a5('0xe')](_0x23cb77));_0xaf70a6(_0x23cb77);})[_0x47a5('0x14')](function(_0x136b14){logger[_0x47a5('0xf')](_0x47a5('0x1e'),_0x136b14[_0x47a5('0x11')],_0x5247fd);_0x2ce454(_0x423a81[_0x47a5('0xf')](0x1f4,_0x136b14[_0x47a5('0x11')]));});});};
\ 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(_0x3a4ff0,_0x4aefbf){var _0x1486c5=function(_0x385f32){while(--_0x385f32){_0x3a4ff0['push'](_0x3a4ff0['shift']());}};_0x1486c5(++_0x4aefbf);}(_0xb10b,0x12a));var _0xbb10=function(_0x1c1777,_0x4f345b){_0x1c1777=_0x1c1777-0x0;var _0x1e634c=_0xb10b[_0x1c1777];return _0x1e634c;};'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 b284440..b1de9c8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x55e0=['webhookPost','update','delete','multer','util','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./plugin.controller','get','webhookGet','/:id','isAuthenticated','show','/:id/download','download','diskStorage','join','server/files/plugins','originalname','replace','%s-%s%s','basename','extname','post','file','upload','/webhook'];(function(_0x2b6644,_0x5c9b7e){var _0x9a9674=function(_0x5c2139){while(--_0x5c2139){_0x2b6644['push'](_0x2b6644['shift']());}};_0x9a9674(++_0x5c9b7e);}(_0x55e0,0xdc));var _0x055e=function(_0x6c40ba,_0x5e39fa){_0x6c40ba=_0x6c40ba-0x0;var _0x7a54dd=_0x55e0[_0x6c40ba];return _0x7a54dd;};'use strict';var multer=require(_0x055e('0x0'));var util=require(_0x055e('0x1'));var path=require(_0x055e('0x2'));var timeout=require(_0x055e('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x055e('0x4'));var auth=require(_0x055e('0x5'));var interaction=require(_0x055e('0x6'));var config=require(_0x055e('0x7'));var controller=require(_0x055e('0x8'));router[_0x055e('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0x055e('0x9')]('/webhook',controller[_0x055e('0xa')]);router[_0x055e('0x9')](_0x055e('0xb'),auth[_0x055e('0xc')](),controller[_0x055e('0xd')]);router['get'](_0x055e('0xe'),auth[_0x055e('0xc')](),controller[_0x055e('0xf')]);var upload=multer({'storage':multer[_0x055e('0x10')]({'destination':function(_0x238068,_0x5237d9,_0x56c78a){_0x56c78a(null,path[_0x055e('0x11')](config['root'],_0x055e('0x12')));},'filename':function(_0x466da3,_0x72d424,_0x101bc3){_0x72d424[_0x055e('0x13')]=_0x72d424[_0x055e('0x13')][_0x055e('0x14')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x101bc3(null,util['format'](_0x055e('0x15'),path[_0x055e('0x16')](_0x72d424[_0x055e('0x13')],path[_0x055e('0x17')](_0x72d424[_0x055e('0x13')])),Date['now'](),path[_0x055e('0x17')](_0x72d424[_0x055e('0x13')])));}})});router[_0x055e('0x18')]('/',upload['single'](_0x055e('0x19')),controller[_0x055e('0x1a')]);router[_0x055e('0x18')](_0x055e('0x1b'),controller[_0x055e('0x1c')]);router['put'](_0x055e('0xb'),auth[_0x055e('0xc')](),controller[_0x055e('0x1d')]);router[_0x055e('0x1e')]('/:id',auth[_0x055e('0xc')](),controller[_0x055e('0x1e')]);module['exports']=router;
\ No newline at end of file
+var _0xac31=['path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','/webhook','webhookGet','/:id','show','/:id/download','download','diskStorage','join','server/files/plugins','originalname','replace','format','%s-%s%s','extname','now','single','file','upload','put','update','delete','exports','multer','util'];(function(_0x5958d2,_0x550300){var _0x2a4809=function(_0x48048b){while(--_0x48048b){_0x5958d2['push'](_0x5958d2['shift']());}};_0x2a4809(++_0x550300);}(_0xac31,0xca));var _0x1ac3=function(_0x48fdbc,_0xc84b44){_0x48fdbc=_0x48fdbc-0x0;var _0x2b8b15=_0xac31[_0x48fdbc];return _0x2b8b15;};'use strict';var multer=require(_0x1ac3('0x0'));var util=require(_0x1ac3('0x1'));var path=require(_0x1ac3('0x2'));var timeout=require(_0x1ac3('0x3'));var express=require(_0x1ac3('0x4'));var router=express[_0x1ac3('0x5')]();var fs_extra=require(_0x1ac3('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0x1ac3('0x7'));var config=require(_0x1ac3('0x8'));var controller=require('./plugin.controller');router['get']('/',auth[_0x1ac3('0x9')](),controller[_0x1ac3('0xa')]);router[_0x1ac3('0xb')](_0x1ac3('0xc'),controller[_0x1ac3('0xd')]);router['get'](_0x1ac3('0xe'),auth['isAuthenticated'](),controller[_0x1ac3('0xf')]);router[_0x1ac3('0xb')](_0x1ac3('0x10'),auth['isAuthenticated'](),controller[_0x1ac3('0x11')]);var upload=multer({'storage':multer[_0x1ac3('0x12')]({'destination':function(_0x3e835b,_0x24f0d2,_0x2a8dc7){_0x2a8dc7(null,path[_0x1ac3('0x13')](config['root'],_0x1ac3('0x14')));},'filename':function(_0x376814,_0x2eeabf,_0x2338b9){_0x2eeabf['originalname']=_0x2eeabf[_0x1ac3('0x15')][_0x1ac3('0x16')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x2338b9(null,util[_0x1ac3('0x17')](_0x1ac3('0x18'),path['basename'](_0x2eeabf[_0x1ac3('0x15')],path[_0x1ac3('0x19')](_0x2eeabf['originalname'])),Date[_0x1ac3('0x1a')](),path[_0x1ac3('0x19')](_0x2eeabf[_0x1ac3('0x15')])));}})});router['post']('/',upload[_0x1ac3('0x1b')](_0x1ac3('0x1c')),controller[_0x1ac3('0x1d')]);router['post'](_0x1ac3('0xc'),controller['webhookPost']);router[_0x1ac3('0x1e')](_0x1ac3('0xe'),auth[_0x1ac3('0x9')](),controller[_0x1ac3('0x1f')]);router[_0x1ac3('0x20')]('/:id',auth[_0x1ac3('0x9')](),controller[_0x1ac3('0x20')]);module[_0x1ac3('0x21')]=router;
\ No newline at end of file
index aaf8664..465993e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x24d6=['ENUM','adminOnly','agentOnly','always','never','Indicates\x20whether\x20to\x20display\x20the\x20plugin\x20in\x20the\x20sidebar.','exports','STRING','html','TEXT','Indicates\x20whether\x20the\x20plugin\x20is\x20installed.\x20Updated\x20when\x20the\x20plugin\x20is\x20installed/uninstalled.'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x24d6,0xc1));var _0x624d=function(_0xd1d19a,_0x1933f0){_0xd1d19a=_0xd1d19a-0x0;var _0x52a79d=_0x24d6[_0xd1d19a];return _0x52a79d;};'use strict';var Sequelize=require('sequelize');module[_0x624d('0x0')]={'name':{'type':Sequelize[_0x624d('0x1')]},'type':{'type':Sequelize['ENUM'](_0x624d('0x2'),'script')},'description':{'type':Sequelize['TEXT']},'version':{'type':Sequelize[_0x624d('0x3')]},'path':{'type':Sequelize[_0x624d('0x1')],'comment':'The\x20physical\x20path\x20where\x20the\x20plugin\x20is\x20stored.'},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':_0x624d('0x4')},'sidebar':{'type':Sequelize[_0x624d('0x5')](_0x624d('0x6'),_0x624d('0x7'),_0x624d('0x8'),_0x624d('0x9')),'defaultValue':'always','comment':_0x624d('0xa')},'icon':{'type':Sequelize['STRING']},'adminUrl':{'type':Sequelize[_0x624d('0x1')]},'agentUrl':{'type':Sequelize[_0x624d('0x1')]},'scriptName':{'type':Sequelize[_0x624d('0x1')]},'scriptPath':{'type':Sequelize[_0x624d('0x1')]}};
\ No newline at end of file
+var _0x604c=['ENUM','agentOnly','never','always','Indicates\x20whether\x20to\x20display\x20the\x20plugin\x20in\x20the\x20sidebar.','sequelize','exports','html','TEXT','STRING','BOOLEAN','Indicates\x20whether\x20the\x20plugin\x20is\x20installed.\x20Updated\x20when\x20the\x20plugin\x20is\x20installed/uninstalled.'];(function(_0x2fee96,_0x2f735d){var _0x2e6ad1=function(_0x2c55ad){while(--_0x2c55ad){_0x2fee96['push'](_0x2fee96['shift']());}};_0x2e6ad1(++_0x2f735d);}(_0x604c,0x65));var _0xc604=function(_0x3f54f4,_0xf6ba5){_0x3f54f4=_0x3f54f4-0x0;var _0x412fc9=_0x604c[_0x3f54f4];return _0x412fc9;};'use strict';var Sequelize=require(_0xc604('0x0'));module[_0xc604('0x1')]={'name':{'type':Sequelize['STRING']},'type':{'type':Sequelize['ENUM'](_0xc604('0x2'),'script')},'description':{'type':Sequelize['TEXT']},'version':{'type':Sequelize[_0xc604('0x3')]},'path':{'type':Sequelize[_0xc604('0x4')],'comment':'The\x20physical\x20path\x20where\x20the\x20plugin\x20is\x20stored.'},'active':{'type':Sequelize[_0xc604('0x5')],'defaultValue':0x0,'comment':_0xc604('0x6')},'sidebar':{'type':Sequelize[_0xc604('0x7')]('adminOnly',_0xc604('0x8'),'always',_0xc604('0x9')),'defaultValue':_0xc604('0xa'),'comment':_0xc604('0xb')},'icon':{'type':Sequelize[_0xc604('0x4')]},'adminUrl':{'type':Sequelize[_0xc604('0x4')]},'agentUrl':{'type':Sequelize[_0xc604('0x4')]},'scriptName':{'type':Sequelize['STRING']},'scriptPath':{'type':Sequelize[_0xc604('0x4')]}};
\ No newline at end of file
index 6b45ef0..76408dd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa6b0=['options','includeAll','findAll','catch','include','find','join','root','server/files/plugins','format','%s.zip','basename','createWriteStream','zip','warning','ENOENT','Sequelize','Error','Error\x20while\x20generating\x20the\x20zip\x20archive','pipe','**/*','dirname','attachments/**/*','finalize','close','existsSync','Plugin\x20not\x20found','Error\x20while\x20downloading\x20the\x20plugin','Download\x20completed','Temporary\x20file\x20removed','upload','file','filename','info','Plugin\x20upload\x20filepath:\x20%s','Plugin\x20upload\x20destination:\x20%s','chmodSync','readdirSync','Invalid\x20plugin\x20structure','lstatSync','isFile','isDirectory','readFileSync','manifest.json','parse','Invalid\x20manifest:\x20name\x20missing','Invalid\x20manifest:\x20type\x20missing','version','Invalid\x20manifest:\x20version\x20not\x20specified','Invalid\x20manifest:\x20parameters\x20missing','html','parameters','Invalid\x20manifest:\x20views\x20missing','views','admin','agent','Invalid\x20manifest:\x20no\x20view\x20specified','script','Invalid\x20manifest:\x20script\x20name\x20missing','scriptPath','Invalid\x20manifest:\x20script\x20path\x20missing','description','sidebar','icon','icon-apps','test','Warning:\x20admin\x20view\x20not\x20specified','plugins','Warning:\x20agent\x20view\x20not\x20specified','create','body','userProfileId','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','unlinkSync','Zip\x20archive\x20removed','params','delete','webhookGet','resolve','\x27PATH\x27\x20parameter\x20not\x20specified','port','hostname','http://localhost:','encoding','method','%s%s','headers','content-length','content-type','endsWith','download','statusCode','\x27PORT\x27\x20parameter\x20not\x20specified','rimraf','fast-json-patch','moment','mustache','path','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','extract-zip','archiver','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./plugin.socket','register','sendStatus','end','status','json','offset','limit','undefined','count','set','Content-Range','reject','save','then','destroy','get','Plugins','UserProfileResource','error','stack','name','send','map','Plugin','rawAttributes','fieldName','type','model','query','keys','attributes','intersection','fields','length','hasOwnProperty','filters','filter','where','merge','VIRTUAL'];(function(_0x55e08b,_0x421620){var _0xd1a7ff=function(_0x58c7ff){while(--_0x58c7ff){_0x55e08b['push'](_0x55e08b['shift']());}};_0xd1a7ff(++_0x421620);}(_0xa6b0,0x10a));var _0x0a6b=function(_0x371e0c,_0x4c7107){_0x371e0c=_0x371e0c-0x0;var _0x21db9f=_0xa6b0[_0x371e0c];return _0x21db9f;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x0a6b('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x0a6b('0x1'));var rp=require('request-promise');var moment=require(_0x0a6b('0x2'));var BPromise=require('bluebird');var Mustache=require(_0x0a6b('0x3'));var util=require('util');var path=require(_0x0a6b('0x4'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x0a6b('0x5'));var fs=require('fs');var fs_extra=require(_0x0a6b('0x6'));var _=require(_0x0a6b('0x7'));var squel=require(_0x0a6b('0x8'));var crypto=require(_0x0a6b('0x9'));var jsforce=require(_0x0a6b('0xa'));var deskjs=require(_0x0a6b('0xb'));var toCsv=require(_0x0a6b('0xc'));var querystring=require(_0x0a6b('0xd'));var Papa=require(_0x0a6b('0xe'));var extract=require(_0x0a6b('0xf'));var rimraf=require(_0x0a6b('0x0'));var archiver=require(_0x0a6b('0x10'));var Redis=require(_0x0a6b('0x11'));var authService=require(_0x0a6b('0x12'));var qs=require(_0x0a6b('0x13'));var as=require(_0x0a6b('0x14'));var hardwareService=require(_0x0a6b('0x15'));var logger=require(_0x0a6b('0x16'))(_0x0a6b('0x17'));var utils=require(_0x0a6b('0x18'));var config=require(_0x0a6b('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0x0a6b('0x1a'))['db'];config[_0x0a6b('0x1b')]=_[_0x0a6b('0x1c')](config[_0x0a6b('0x1b')],{'host':_0x0a6b('0x1d'),'port':0x18eb});var socket=require(_0x0a6b('0x1e'))(new Redis(config['redis']));require(_0x0a6b('0x1f'))[_0x0a6b('0x20')](socket);function respondWithStatusCode(_0x4166a5,_0x44a3c0){_0x44a3c0=_0x44a3c0||0xcc;return function(_0xfe0540){if(_0xfe0540){return _0x4166a5[_0x0a6b('0x21')](_0x44a3c0);}return _0x4166a5['status'](_0x44a3c0)[_0x0a6b('0x22')]();};}function respondWithResult(_0x31bb7b,_0x39a8ef){_0x39a8ef=_0x39a8ef||0xc8;return function(_0x57bc2b){if(_0x57bc2b){return _0x31bb7b[_0x0a6b('0x23')](_0x39a8ef)[_0x0a6b('0x24')](_0x57bc2b);}};}function respondWithFilteredResult(_0x230a5e,_0x177c55){return function(_0x67b951){if(_0x67b951){var _0x563797=typeof _0x177c55[_0x0a6b('0x25')]==='undefined'&&typeof _0x177c55[_0x0a6b('0x26')]===_0x0a6b('0x27');var _0x34a43a=_0x67b951['count'];var _0x4de3e1=_0x563797?0x0:_0x177c55[_0x0a6b('0x25')];var _0x274d09=_0x563797?_0x67b951[_0x0a6b('0x28')]:_0x177c55[_0x0a6b('0x25')]+_0x177c55[_0x0a6b('0x26')];var _0x1c0c74;if(_0x274d09>=_0x34a43a){_0x274d09=_0x34a43a;_0x1c0c74=0xc8;}else{_0x1c0c74=0xce;}_0x230a5e[_0x0a6b('0x23')](_0x1c0c74);return _0x230a5e[_0x0a6b('0x29')](_0x0a6b('0x2a'),_0x4de3e1+'-'+_0x274d09+'/'+_0x34a43a)[_0x0a6b('0x24')](_0x67b951);}return null;};}function patchUpdates(_0x4f9467){return function(_0x137f5b){try{jsonpatch['apply'](_0x137f5b,_0x4f9467,!![]);}catch(_0x253654){return BPromise[_0x0a6b('0x2b')](_0x253654);}return _0x137f5b[_0x0a6b('0x2c')]();};}function saveUpdates(_0x5ae767,_0x4de9cf){return function(_0x117e9b){if(_0x117e9b){return _0x117e9b['update'](_0x5ae767)[_0x0a6b('0x2d')](function(_0x3e911a){return _0x3e911a;});}return null;};}function removeEntity(_0x5c5e41,_0x2db552){return function(_0x2a73db){if(_0x2a73db){return _0x2a73db[_0x0a6b('0x2e')]()['then'](function(){var _0x255b28=_0x2a73db[_0x0a6b('0x2f')]({'plain':!![]});var _0x828de8=_0x0a6b('0x30');return db[_0x0a6b('0x31')]['destroy']({'where':{'type':_0x828de8,'resourceId':_0x255b28['id']}})[_0x0a6b('0x2d')](function(){return _0x2a73db;});})['then'](function(){_0x5c5e41[_0x0a6b('0x23')](0xcc)[_0x0a6b('0x22')]();});}};}function handleEntityNotFound(_0x333283,_0x9b04d6){return function(_0x2cef58){if(!_0x2cef58){_0x333283[_0x0a6b('0x21')](0x194);}return _0x2cef58;};}function handleError(_0x48ad3c,_0x550dbd){_0x550dbd=_0x550dbd||0x1f4;return function(_0x560453){logger[_0x0a6b('0x32')](_0x560453[_0x0a6b('0x33')]);if(_0x560453[_0x0a6b('0x34')]){delete _0x560453['name'];}_0x48ad3c['status'](_0x550dbd)[_0x0a6b('0x35')](_0x560453);};}exports['index']=function(_0x557038,_0x4463da){var _0x6ed2b2={},_0x154c0e={},_0x3e1317={'count':0x0,'rows':[]};var _0x468dad=_[_0x0a6b('0x36')](db[_0x0a6b('0x37')][_0x0a6b('0x38')],function(_0x293897){return{'name':_0x293897[_0x0a6b('0x39')],'type':_0x293897[_0x0a6b('0x3a')]['key']};});_0x154c0e[_0x0a6b('0x3b')]=_[_0x0a6b('0x36')](_0x468dad,_0x0a6b('0x34'));_0x154c0e[_0x0a6b('0x3c')]=_[_0x0a6b('0x3d')](_0x557038[_0x0a6b('0x3c')]);_0x154c0e['filters']=_['intersection'](_0x154c0e[_0x0a6b('0x3b')],_0x154c0e[_0x0a6b('0x3c')]);_0x6ed2b2[_0x0a6b('0x3e')]=_[_0x0a6b('0x3f')](_0x154c0e[_0x0a6b('0x3b')],qs[_0x0a6b('0x40')](_0x557038[_0x0a6b('0x3c')][_0x0a6b('0x40')]));_0x6ed2b2[_0x0a6b('0x3e')]=_0x6ed2b2[_0x0a6b('0x3e')][_0x0a6b('0x41')]?_0x6ed2b2[_0x0a6b('0x3e')]:_0x154c0e['model'];if(!_0x557038[_0x0a6b('0x3c')][_0x0a6b('0x42')]('nolimit')){_0x6ed2b2['limit']=qs[_0x0a6b('0x26')](_0x557038['query'][_0x0a6b('0x26')]);_0x6ed2b2[_0x0a6b('0x25')]=qs[_0x0a6b('0x25')](_0x557038[_0x0a6b('0x3c')][_0x0a6b('0x25')]);}_0x6ed2b2['order']=qs['sort'](_0x557038[_0x0a6b('0x3c')]['sort']);_0x6ed2b2['where']=qs[_0x0a6b('0x43')](_['pick'](_0x557038['query'],_0x154c0e['filters']),_0x468dad);if(_0x557038['query'][_0x0a6b('0x44')]){_0x6ed2b2[_0x0a6b('0x45')]=_[_0x0a6b('0x46')](_0x6ed2b2['where'],{'$or':_['map'](_0x468dad,function(_0x59d70f){if(_0x59d70f[_0x0a6b('0x3a')]!==_0x0a6b('0x47')){var _0x4f425a={};_0x4f425a[_0x59d70f['name']]={'$like':'%'+_0x557038[_0x0a6b('0x3c')][_0x0a6b('0x44')]+'%'};return _0x4f425a;}})});}_0x6ed2b2=_[_0x0a6b('0x46')]({},_0x6ed2b2,_0x557038[_0x0a6b('0x48')]);var _0x45382a={'where':_0x6ed2b2['where']};return db[_0x0a6b('0x37')][_0x0a6b('0x28')](_0x45382a)[_0x0a6b('0x2d')](function(_0x5756c4){_0x3e1317[_0x0a6b('0x28')]=_0x5756c4;if(_0x557038[_0x0a6b('0x3c')][_0x0a6b('0x49')]){_0x6ed2b2['include']=[{'all':!![]}];}return db['Plugin'][_0x0a6b('0x4a')](_0x6ed2b2);})['then'](function(_0x25a838){_0x3e1317['rows']=_0x25a838;return _0x3e1317;})['then'](respondWithFilteredResult(_0x4463da,_0x6ed2b2))[_0x0a6b('0x4b')](handleError(_0x4463da,null));};exports['show']=function(_0x33c648,_0x3b453d){var _0x4c55be={'raw':!![],'where':{'id':_0x33c648['params']['id']}},_0x5c94c6={};_0x5c94c6[_0x0a6b('0x3b')]=_[_0x0a6b('0x3d')](db[_0x0a6b('0x37')][_0x0a6b('0x38')]);_0x5c94c6['query']=_[_0x0a6b('0x3d')](_0x33c648['query']);_0x5c94c6[_0x0a6b('0x43')]=_[_0x0a6b('0x3f')](_0x5c94c6[_0x0a6b('0x3b')],_0x5c94c6[_0x0a6b('0x3c')]);_0x4c55be[_0x0a6b('0x3e')]=_['intersection'](_0x5c94c6['model'],qs[_0x0a6b('0x40')](_0x33c648['query'][_0x0a6b('0x40')]));_0x4c55be['attributes']=_0x4c55be[_0x0a6b('0x3e')][_0x0a6b('0x41')]?_0x4c55be[_0x0a6b('0x3e')]:_0x5c94c6[_0x0a6b('0x3b')];if(_0x33c648['query'][_0x0a6b('0x49')]){_0x4c55be[_0x0a6b('0x4c')]=[{'all':!![]}];}_0x4c55be=_[_0x0a6b('0x46')]({},_0x4c55be,_0x33c648[_0x0a6b('0x48')]);return db[_0x0a6b('0x37')][_0x0a6b('0x4d')](_0x4c55be)['then'](handleEntityNotFound(_0x3b453d,null))[_0x0a6b('0x2d')](respondWithResult(_0x3b453d,null))[_0x0a6b('0x4b')](handleError(_0x3b453d,null));};exports['download']=function(_0xfe32c5,_0x3bdba5,_0x200e44){return db[_0x0a6b('0x37')][_0x0a6b('0x4d')]({'where':{'id':_0xfe32c5['params']['id']},'attributes':[_0x0a6b('0x34'),'path'],'raw':!![]})[_0x0a6b('0x2d')](handleEntityNotFound(_0x3bdba5,null))['then'](function(_0x1ed037){if(_0x1ed037){var _0x18c861=path[_0x0a6b('0x4e')](config[_0x0a6b('0x4f')],_0x0a6b('0x50'),util[_0x0a6b('0x51')](_0x0a6b('0x52'),path[_0x0a6b('0x53')](_0x1ed037['path'])));var _0x55c52b=fs[_0x0a6b('0x54')](_0x18c861);var _0x58aea8=archiver(_0x0a6b('0x55'),{'zlib':{'level':0x9}});_0x58aea8['on'](_0x0a6b('0x56'),function(_0x39507c){if(_0x39507c['code']===_0x0a6b('0x57')){logger[_0x0a6b('0x32')](_0x39507c);}else{throw new db[(_0x0a6b('0x58'))][(_0x0a6b('0x59'))](_0x0a6b('0x5a'));}});_0x58aea8['on'](_0x0a6b('0x32'),function(_0x43824a){throw new db[(_0x0a6b('0x58'))][(_0x0a6b('0x59'))](_0x0a6b('0x5a'));});_0x58aea8[_0x0a6b('0x5b')](_0x55c52b);_0x58aea8['glob'](_0x0a6b('0x5c'),{'cwd':path['join'](config[_0x0a6b('0x4f')],_0x0a6b('0x50'),path[_0x0a6b('0x5d')](_0x1ed037['path'])),'ignore':[path['join'](path[_0x0a6b('0x53')](_0x1ed037[_0x0a6b('0x4')]),'node_modules/**/*'),path[_0x0a6b('0x4e')](path[_0x0a6b('0x53')](_0x1ed037['path']),_0x0a6b('0x5e'))],'nodir':!![]})[_0x0a6b('0x5f')]();_0x55c52b['on'](_0x0a6b('0x60'),function(){if(!fs[_0x0a6b('0x61')](_0x18c861)){throw new db[(_0x0a6b('0x58'))][(_0x0a6b('0x59'))](_0x0a6b('0x62'));}return _0x3bdba5['download'](_0x18c861,util[_0x0a6b('0x51')](_0x0a6b('0x52'),path['basename'](_0x1ed037[_0x0a6b('0x4')])),function(_0x395e61){if(_0x395e61){throw new db[(_0x0a6b('0x58'))][(_0x0a6b('0x59'))](_0x0a6b('0x63'));}fs['unlinkSync'](_0x18c861);logger['info'](_0x0a6b('0x64'));logger['info'](_0x0a6b('0x65'));});});}return null;})[_0x0a6b('0x4b')](handleError(_0x3bdba5,null));};exports[_0x0a6b('0x66')]=function(_0x575bb0,_0x426000,_0x121bc5){var _0x3331a7=path['basename'](_0x575bb0[_0x0a6b('0x67')][_0x0a6b('0x68')],path['extname'](_0x575bb0[_0x0a6b('0x67')][_0x0a6b('0x68')]));var _0x3564c1=path[_0x0a6b('0x4e')](config['root'],_0x0a6b('0x50'),_0x575bb0['file'][_0x0a6b('0x68')]);var _0x81063a=path['join'](config[_0x0a6b('0x4f')],'server/files/plugins',_0x3331a7);logger[_0x0a6b('0x69')](_0x0a6b('0x6a'),_0x3564c1);logger[_0x0a6b('0x69')](_0x0a6b('0x6b'),_0x81063a);try{fs[_0x0a6b('0x6c')](_0x3564c1,parseInt('0777',0x8));extract(_0x3564c1,{'dir':_0x81063a},function(_0x498f4b){if(_0x498f4b){logger[_0x0a6b('0x32')](_0x498f4b);handleError(_0x498f4b,!![]);};var _0x23846b=fs[_0x0a6b('0x6d')](_0x81063a);if(_0x23846b['length']>0x1){removeReferences(_0x3564c1,_0x81063a);logger[_0x0a6b('0x32')](_0x0a6b('0x6e'));return _0x121bc5(new Error('Invalid\x20plugin\x20structure'));}var _0x17c95f=fs[_0x0a6b('0x6f')](path['join'](_0x81063a,_0x23846b[0x0]));if(_0x17c95f[_0x0a6b('0x70')]()){removeReferences(_0x3564c1,_0x81063a);logger[_0x0a6b('0x32')]('Invalid\x20plugin\x20structure');return _0x121bc5(new Error(_0x0a6b('0x6e')));}if(_0x17c95f[_0x0a6b('0x71')]()){var _0x4815f6=fs[_0x0a6b('0x6d')](path[_0x0a6b('0x4e')](_0x81063a,_0x23846b[0x0]));if(_0x4815f6[_0x0a6b('0x41')]===0x0){removeReferences(_0x3564c1,_0x81063a);logger[_0x0a6b('0x32')](_0x0a6b('0x6e'));return _0x121bc5(new Error(_0x0a6b('0x6e')));}var _0x58e6b8=_0x4815f6['some'](function(_0x3d66d5){return _0x3d66d5==='manifest.json';});if(!_0x58e6b8){return _0x121bc5(new Error('Plugin\x20manifest\x20missing'));}var _0x1f8ddd=fs[_0x0a6b('0x72')](path[_0x0a6b('0x4e')](_0x81063a,_0x23846b[0x0],_0x0a6b('0x73')));var _0x2a43b5=JSON[_0x0a6b('0x74')](_0x1f8ddd);if(_0x0a6b('0x27')==typeof _0x2a43b5[_0x0a6b('0x34')]){return _0x121bc5(new Error(_0x0a6b('0x75')));}if(_0x0a6b('0x27')==typeof _0x2a43b5['type']){return _0x121bc5(new Error(_0x0a6b('0x76')));}if(_0x0a6b('0x27')==typeof _0x2a43b5[_0x0a6b('0x77')]){return _0x121bc5(new Error(_0x0a6b('0x78')));}if(_0x0a6b('0x27')==typeof _0x2a43b5['parameters']){return _0x121bc5(new Error(_0x0a6b('0x79')));}if(_0x2a43b5[_0x0a6b('0x3a')]===_0x0a6b('0x7a')){if(_0x0a6b('0x27')==typeof _0x2a43b5[_0x0a6b('0x7b')]['views']){return _0x121bc5(new Error(_0x0a6b('0x7c')));}if(_0x0a6b('0x27')==typeof _0x2a43b5[_0x0a6b('0x7b')][_0x0a6b('0x7d')][_0x0a6b('0x7e')]&&_0x0a6b('0x27')==typeof _0x2a43b5['parameters'][_0x0a6b('0x7d')][_0x0a6b('0x7f')]){return _0x121bc5(new Error(_0x0a6b('0x80')));}}else if(_0x2a43b5[_0x0a6b('0x3a')]===_0x0a6b('0x81')){if(_0x0a6b('0x27')==typeof _0x2a43b5[_0x0a6b('0x7b')]['scriptName']){return _0x121bc5(new Error(_0x0a6b('0x82')));}if(_0x0a6b('0x27')==typeof _0x2a43b5[_0x0a6b('0x7b')][_0x0a6b('0x83')]){return _0x121bc5(new Error(_0x0a6b('0x84')));}}else{return _0x121bc5(new Error('Invalid\x20manifest:\x20invalid\x20type'));}var _0xc619ab=_0x2a43b5[_0x0a6b('0x34')];var _0x396e3d=_0x2a43b5[_0x0a6b('0x85')];var _0x2d6f0f=_0x2a43b5['type'];var _0x260428=_0x2a43b5[_0x0a6b('0x86')]?_0x2a43b5[_0x0a6b('0x86')]:'always';var _0x3e79ee=_0x2a43b5[_0x0a6b('0x87')]?_0x2a43b5[_0x0a6b('0x87')]:_0x0a6b('0x88');var _0x36df0f='';var _0x235336='';var _0x30a520='';var _0x2aa61a='';var _0x37c154=_0x2a43b5['version'];if(_0x2d6f0f==='html'){if(_0x0a6b('0x27')!=typeof _0x2a43b5[_0x0a6b('0x7b')]['views'][_0x0a6b('0x7e')]){var _0x28c582=_0x2a43b5[_0x0a6b('0x7b')][_0x0a6b('0x7d')][_0x0a6b('0x7e')];if(!/^(f|ht)tps?:\/\//i[_0x0a6b('0x89')](_0x28c582)){_0x36df0f=path[_0x0a6b('0x4e')]('plugins',_0x3331a7,_0x23846b[0x0],_0x28c582);}else{_0x36df0f=_0x28c582;}}else{logger[_0x0a6b('0x69')](_0x0a6b('0x8a'));}if('undefined'!=typeof _0x2a43b5[_0x0a6b('0x7b')][_0x0a6b('0x7d')][_0x0a6b('0x7f')]){var _0x4e24d2=_0x2a43b5['parameters'][_0x0a6b('0x7d')][_0x0a6b('0x7f')];if(!/^(f|ht)tps?:\/\//i[_0x0a6b('0x89')](_0x4e24d2)){_0x235336=path[_0x0a6b('0x4e')](_0x0a6b('0x8b'),_0x3331a7,_0x23846b[0x0],_0x4e24d2);}else{_0x235336=_0x4e24d2;}}else{logger[_0x0a6b('0x69')](_0x0a6b('0x8c'));}}else if(_0x2d6f0f==='script'){_0x30a520=_0x2a43b5[_0x0a6b('0x7b')]['scriptName'];_0x2aa61a=_0x2a43b5[_0x0a6b('0x7b')]['scriptPath'];if(_0x0a6b('0x27')!=typeof _0x2a43b5[_0x0a6b('0x7b')]['views']){if(_0x0a6b('0x27')!=typeof _0x2a43b5[_0x0a6b('0x7b')][_0x0a6b('0x7d')][_0x0a6b('0x7e')]){var _0x28c582=_0x2a43b5[_0x0a6b('0x7b')][_0x0a6b('0x7d')][_0x0a6b('0x7e')];if(!/^(f|ht)tps?:\/\//i['test'](_0x28c582)){_0x36df0f=path['join'](_0x0a6b('0x8b'),_0x3331a7,_0x23846b[0x0],_0x28c582);}else{_0x36df0f=_0x28c582;}}if('undefined'!=typeof _0x2a43b5[_0x0a6b('0x7b')]['views']['agent']){var _0x4e24d2=_0x2a43b5[_0x0a6b('0x7b')]['views'][_0x0a6b('0x7f')];if(!/^(f|ht)tps?:\/\//i['test'](_0x4e24d2)){_0x235336=path[_0x0a6b('0x4e')](_0x0a6b('0x8b'),_0x3331a7,_0x23846b[0x0],_0x4e24d2);}else{_0x235336=_0x4e24d2;}}}}var _0x2b79cb={'name':_0xc619ab,'description':_0x396e3d,'path':path['join'](_0x3331a7,_0x23846b[0x0]),'type':_0x2d6f0f,'sidebar':_0x260428,'icon':_0x3e79ee,'adminUrl':_0x36df0f,'agentUrl':_0x235336,'scriptName':_0x30a520,'scriptPath':_0x2aa61a,'version':_0x37c154};removeReferences(_0x3564c1,null);return db['Plugin'][_0x0a6b('0x8d')](_0x2b79cb)['then'](function(_0x113d97){var _0x114b2f={'role':_0x575bb0[_0x0a6b('0x8e')]['role'],'userProfileId':_0x575bb0[_0x0a6b('0x8e')][_0x0a6b('0x8f')]};if(!_0x114b2f)throw new Error(_0x0a6b('0x90'));if(_0x114b2f['role']===_0x0a6b('0x91')){var _0x21fe2d=_0x113d97[_0x0a6b('0x2f')]({'plain':!![]});return db[_0x0a6b('0x92')]['find']({'where':{'name':_0x0a6b('0x30'),'userProfileId':_0x114b2f['userProfileId']},'raw':!![]})['then'](function(_0x3aa155){if(_0x3aa155&&_0x3aa155[_0x0a6b('0x93')]===0x0){return db[_0x0a6b('0x31')][_0x0a6b('0x8d')]({'name':_0x21fe2d[_0x0a6b('0x34')],'resourceId':_0x21fe2d['id'],'type':_0x3aa155[_0x0a6b('0x34')],'sectionId':_0x3aa155['id']},{})['then'](function(){return _0x113d97;});}else{return _0x113d97;}})[_0x0a6b('0x4b')](function(_0x1c7896){logger[_0x0a6b('0x32')](_0x0a6b('0x94'),_0x1c7896);throw _0x1c7896;});}return _0x113d97;})['then'](respondWithResult(_0x426000,null))[_0x0a6b('0x4b')](handleError(_0x426000,null));}});}catch(_0x489282){_0x426000[_0x0a6b('0x23')](0x1f4)[_0x0a6b('0x35')](_0x489282);}};function removeReferences(_0xfdc13c,_0xb7022){try{if(_0xfdc13c){fs[_0x0a6b('0x95')](_0xfdc13c);logger[_0x0a6b('0x69')](_0x0a6b('0x96'));}if(_0xb7022){rimraf(_0xb7022,function(){});logger[_0x0a6b('0x69')]('Extracted\x20folder\x20removed');}}catch(_0x4629d6){logger[_0x0a6b('0x32')](_0x4629d6);}}exports['update']=function(_0x52e3d4,_0x35793a,_0x58c424){return db['Plugin'][_0x0a6b('0x4d')]({'where':{'id':_0x52e3d4[_0x0a6b('0x97')]['id']}})[_0x0a6b('0x2d')](handleEntityNotFound(_0x35793a,null))[_0x0a6b('0x2d')](saveUpdates(_0x52e3d4[_0x0a6b('0x8e')],null))[_0x0a6b('0x2d')](respondWithResult(_0x35793a,null))['catch'](handleError(_0x35793a,null));};exports[_0x0a6b('0x98')]=function(_0x44a491,_0x452d7c,_0x3740d1){return db[_0x0a6b('0x37')][_0x0a6b('0x4d')]({'where':{'id':_0x44a491[_0x0a6b('0x97')]['id']}})[_0x0a6b('0x2d')](function(_0x4d48ec){if(_0x4d48ec){return _0x4d48ec['destroy']();}})[_0x0a6b('0x2d')](function(_0x4bc67b){rimraf(path['join'](config[_0x0a6b('0x4f')],_0x0a6b('0x50'),path[_0x0a6b('0x5d')](_0x4bc67b['path'])),function(){});return _0x4bc67b;})[_0x0a6b('0x2d')](handleEntityNotFound(_0x452d7c,null))[_0x0a6b('0x2d')](respondWithStatusCode(_0x452d7c,null))['catch'](handleError(_0x452d7c,null));};exports[_0x0a6b('0x99')]=function(_0x3a15a8,_0x1438f8,_0x4a9554){return BPromise[_0x0a6b('0x9a')]()['then'](function(){if(!_0x3a15a8['query']['path']){throw new Error(_0x0a6b('0x9b'));}if(!_0x3a15a8[_0x0a6b('0x3c')][_0x0a6b('0x9c')]){throw new Error('\x27PORT\x27\x20parameter\x20not\x20specified');}var _0x3a3898=_0x3a15a8[_0x0a6b('0x3c')][_0x0a6b('0x9d')]?_0x3a15a8['query'][_0x0a6b('0x9d')]+':'+_0x3a15a8[_0x0a6b('0x3c')][_0x0a6b('0x9c')]:_0x0a6b('0x9e')+_0x3a15a8['query']['port'];var _0x2bebe0=_0x3a15a8[_0x0a6b('0x3c')][_0x0a6b('0x24')]?_0x3a15a8[_0x0a6b('0x3c')][_0x0a6b('0x24')]:!![];var _0x47a7f=_0x3a15a8[_0x0a6b('0x3c')][_0x0a6b('0x9f')]?_0x3a15a8[_0x0a6b('0x3c')][_0x0a6b('0x9f')]:null;var _0x36ecfc={'method':_0x3a15a8[_0x0a6b('0xa0')],'uri':util['format'](_0x0a6b('0xa1'),_0x3a3898,_0x3a15a8[_0x0a6b('0x3c')][_0x0a6b('0x4')]),'json':_0x2bebe0,'resolveWithFullResponse':!![],'encoding':_0x47a7f,'qs':_0x3a15a8[_0x0a6b('0x3c')]};if(_0x3a15a8[_0x0a6b('0xa2')]){_0x36ecfc[_0x0a6b('0xa2')]=_0x3a15a8[_0x0a6b('0xa2')];if(_0x36ecfc[_0x0a6b('0xa2')][_0x0a6b('0xa3')]){delete _0x36ecfc[_0x0a6b('0xa2')][_0x0a6b('0xa3')];}}if(_0x36ecfc[_0x0a6b('0xa2')][_0x0a6b('0xa4')]){delete _0x36ecfc[_0x0a6b('0xa2')][_0x0a6b('0xa4')];}return rp(_0x36ecfc);})[_0x0a6b('0x2d')](function(_0xdd4874){if(_0xdd4874){_0x1438f8['set'](_0xdd4874[_0x0a6b('0xa2')]);logger[_0x0a6b('0x69')](_0xdd4874[_0x0a6b('0x8e')]);if(_[_0x0a6b('0xa5')](_0x3a15a8[_0x0a6b('0x3c')]['path'],_0x0a6b('0xa6'))&&_0xdd4874['statusCode']==0x1f4){return _0x1438f8[_0x0a6b('0x21')](_0xdd4874['statusCode']);}else{return _0x1438f8[_0x0a6b('0x23')](_0xdd4874[_0x0a6b('0xa7')])[_0x0a6b('0x35')](_0xdd4874[_0x0a6b('0x8e')]);}}else{return _0x1438f8['sendStatus'](0xc8);}})[_0x0a6b('0x4b')](handleError(_0x1438f8,null));};exports['webhookPost']=function(_0x77b245,_0x10ae9f,_0x4e1c6a){return BPromise[_0x0a6b('0x9a')]()['then'](function(){if(!_0x77b245[_0x0a6b('0x3c')][_0x0a6b('0x4')]){throw new Error(_0x0a6b('0x9b'));}if(!_0x77b245['query']['port']){throw new Error(_0x0a6b('0xa8'));}var _0x4b871b=_0x77b245[_0x0a6b('0x3c')][_0x0a6b('0x9d')]?_0x77b245[_0x0a6b('0x3c')][_0x0a6b('0x9d')]+':'+_0x77b245[_0x0a6b('0x3c')][_0x0a6b('0x9c')]:_0x0a6b('0x9e')+_0x77b245[_0x0a6b('0x3c')][_0x0a6b('0x9c')];var _0x2efd87=_0x77b245['query'][_0x0a6b('0x24')]?_0x77b245['query'][_0x0a6b('0x24')]:!![];var _0x2bb895=_0x77b245['query'][_0x0a6b('0x9f')]?_0x77b245[_0x0a6b('0x3c')][_0x0a6b('0x9f')]:null;var _0x3da4cb={'method':_0x77b245['method'],'uri':util[_0x0a6b('0x51')]('%s%s',_0x4b871b,_0x77b245[_0x0a6b('0x3c')][_0x0a6b('0x4')]),'json':_0x2efd87,'resolveWithFullResponse':!![],'encoding':_0x2bb895,'body':_0x77b245[_0x0a6b('0x8e')]};if(_0x77b245['headers']){_0x3da4cb['headers']=_0x77b245['headers'];if(_0x3da4cb[_0x0a6b('0xa2')][_0x0a6b('0xa3')]){delete _0x3da4cb[_0x0a6b('0xa2')]['content-length'];}}if(_0x3da4cb[_0x0a6b('0xa2')][_0x0a6b('0xa4')]){delete _0x3da4cb['headers']['content-type'];}return rp(_0x3da4cb);})[_0x0a6b('0x2d')](function(_0x1c0ce4){if(_0x1c0ce4){_0x10ae9f['set'](_0x1c0ce4[_0x0a6b('0xa2')]);logger[_0x0a6b('0x69')](_0x1c0ce4[_0x0a6b('0x8e')]);return _0x10ae9f['status'](_0x1c0ce4[_0x0a6b('0xa7')])[_0x0a6b('0x35')](_0x1c0ce4[_0x0a6b('0x8e')]);}else{return _0x10ae9f[_0x0a6b('0x21')](0xc8);}})['catch'](handleError(_0x10ae9f,null));};
\ No newline at end of file
+var _0x600b=['Error','Sequelize','**/*','node_modules/**/*','attachments/**/*','close','existsSync','Error\x20while\x20downloading\x20the\x20plugin','info','Download\x20completed','Temporary\x20file\x20removed','upload','filename','extname','file','Plugin\x20upload\x20filepath:\x20%s','Plugin\x20upload\x20destination:\x20%s','readdirSync','Invalid\x20plugin\x20structure','lstatSync','isDirectory','Plugin\x20manifest\x20missing','readFileSync','manifest.json','parse','Invalid\x20manifest:\x20name\x20missing','Invalid\x20manifest:\x20type\x20missing','version','Invalid\x20manifest:\x20version\x20not\x20specified','parameters','html','views','Invalid\x20manifest:\x20views\x20missing','admin','Invalid\x20manifest:\x20no\x20view\x20specified','scriptName','Invalid\x20manifest:\x20script\x20name\x20missing','scriptPath','Invalid\x20manifest:\x20invalid\x20type','description','sidebar','icon','test','plugins','Warning:\x20admin\x20view\x20not\x20specified','agent','Warning:\x20agent\x20view\x20not\x20specified','script','role','body','userProfileId','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','find','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','unlinkSync','Zip\x20archive\x20removed','Extracted\x20folder\x20removed','dirname','webhookGet','resolve','\x27PATH\x27\x20parameter\x20not\x20specified','port','hostname','http://localhost:','encoding','method','%s%s','headers','content-length','content-type','statusCode','webhookPost','\x27PORT\x27\x20parameter\x20not\x20specified','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','jsforce','desk.js','querystring','papaparse','extract-zip','archiver','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./plugin.socket','register','sendStatus','end','status','json','undefined','limit','count','offset','set','Content-Range','apply','reject','save','then','destroy','get','Plugins','UserProfileResource','error','stack','name','send','index','map','Plugin','rawAttributes','type','key','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','order','where','VIRTUAL','filter','options','includeAll','include','rows','catch','show','params','download','join','root','server/files/plugins','format','%s.zip','basename','zip','warning','code','ENOENT'];(function(_0x1871bb,_0xb8d5fb){var _0x53be8f=function(_0x388c9e){while(--_0x388c9e){_0x1871bb['push'](_0x1871bb['shift']());}};_0x53be8f(++_0xb8d5fb);}(_0x600b,0x1a5));var _0xb600=function(_0x5817e6,_0x44a2d0){_0x5817e6=_0x5817e6-0x0;var _0x51916a=_0x600b[_0x5817e6];return _0x51916a;};'use strict';var emlformat=require(_0xb600('0x0'));var rimraf=require(_0xb600('0x1'));var zipdir=require(_0xb600('0x2'));var jsonpatch=require(_0xb600('0x3'));var rp=require(_0xb600('0x4'));var moment=require(_0xb600('0x5'));var BPromise=require(_0xb600('0x6'));var Mustache=require(_0xb600('0x7'));var util=require(_0xb600('0x8'));var path=require(_0xb600('0x9'));var sox=require(_0xb600('0xa'));var csv=require(_0xb600('0xb'));var ejs=require(_0xb600('0xc'));var fs=require('fs');var fs_extra=require(_0xb600('0xd'));var _=require('lodash');var squel=require(_0xb600('0xe'));var crypto=require('crypto');var jsforce=require(_0xb600('0xf'));var deskjs=require(_0xb600('0x10'));var toCsv=require(_0xb600('0xb'));var querystring=require(_0xb600('0x11'));var Papa=require(_0xb600('0x12'));var extract=require(_0xb600('0x13'));var rimraf=require('rimraf');var archiver=require(_0xb600('0x14'));var Redis=require('ioredis');var authService=require(_0xb600('0x15'));var qs=require(_0xb600('0x16'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xb600('0x17'));var logger=require(_0xb600('0x18'))(_0xb600('0x19'));var utils=require(_0xb600('0x1a'));var config=require(_0xb600('0x1b'));var licenseUtil=require(_0xb600('0x1c'));var db=require(_0xb600('0x1d'))['db'];config[_0xb600('0x1e')]=_[_0xb600('0x1f')](config['redis'],{'host':_0xb600('0x20'),'port':0x18eb});var socket=require(_0xb600('0x21'))(new Redis(config[_0xb600('0x1e')]));require(_0xb600('0x22'))[_0xb600('0x23')](socket);function respondWithStatusCode(_0x2ec44d,_0x4cc0e0){_0x4cc0e0=_0x4cc0e0||0xcc;return function(_0x27667b){if(_0x27667b){return _0x2ec44d[_0xb600('0x24')](_0x4cc0e0);}return _0x2ec44d['status'](_0x4cc0e0)[_0xb600('0x25')]();};}function respondWithResult(_0x29675a,_0x21252f){_0x21252f=_0x21252f||0xc8;return function(_0x5592c9){if(_0x5592c9){return _0x29675a[_0xb600('0x26')](_0x21252f)[_0xb600('0x27')](_0x5592c9);}};}function respondWithFilteredResult(_0x298079,_0x2b8a4d){return function(_0x41ec69){if(_0x41ec69){var _0x149502=typeof _0x2b8a4d['offset']===_0xb600('0x28')&&typeof _0x2b8a4d[_0xb600('0x29')]===_0xb600('0x28');var _0x55fe7c=_0x41ec69[_0xb600('0x2a')];var _0x884751=_0x149502?0x0:_0x2b8a4d[_0xb600('0x2b')];var _0x169cfe=_0x149502?_0x41ec69[_0xb600('0x2a')]:_0x2b8a4d[_0xb600('0x2b')]+_0x2b8a4d['limit'];var _0x2cbe1a;if(_0x169cfe>=_0x55fe7c){_0x169cfe=_0x55fe7c;_0x2cbe1a=0xc8;}else{_0x2cbe1a=0xce;}_0x298079['status'](_0x2cbe1a);return _0x298079[_0xb600('0x2c')](_0xb600('0x2d'),_0x884751+'-'+_0x169cfe+'/'+_0x55fe7c)[_0xb600('0x27')](_0x41ec69);}return null;};}function patchUpdates(_0x596892){return function(_0x4e68b8){try{jsonpatch[_0xb600('0x2e')](_0x4e68b8,_0x596892,!![]);}catch(_0x414ce8){return BPromise[_0xb600('0x2f')](_0x414ce8);}return _0x4e68b8[_0xb600('0x30')]();};}function saveUpdates(_0x100d65,_0x2a7a66){return function(_0x2e12aa){if(_0x2e12aa){return _0x2e12aa['update'](_0x100d65)[_0xb600('0x31')](function(_0x1fb097){return _0x1fb097;});}return null;};}function removeEntity(_0x392bde,_0x554687){return function(_0x1f7e22){if(_0x1f7e22){return _0x1f7e22[_0xb600('0x32')]()['then'](function(){var _0x26e5fa=_0x1f7e22[_0xb600('0x33')]({'plain':!![]});var _0x47d7de=_0xb600('0x34');return db[_0xb600('0x35')][_0xb600('0x32')]({'where':{'type':_0x47d7de,'resourceId':_0x26e5fa['id']}})['then'](function(){return _0x1f7e22;});})[_0xb600('0x31')](function(){_0x392bde[_0xb600('0x26')](0xcc)[_0xb600('0x25')]();});}};}function handleEntityNotFound(_0x219963,_0x614371){return function(_0x5f57f6){if(!_0x5f57f6){_0x219963[_0xb600('0x24')](0x194);}return _0x5f57f6;};}function handleError(_0x2d5fa7,_0x414587){_0x414587=_0x414587||0x1f4;return function(_0x59f153){logger[_0xb600('0x36')](_0x59f153[_0xb600('0x37')]);if(_0x59f153[_0xb600('0x38')]){delete _0x59f153[_0xb600('0x38')];}_0x2d5fa7['status'](_0x414587)[_0xb600('0x39')](_0x59f153);};}exports[_0xb600('0x3a')]=function(_0x777030,_0x5a091f){var _0x39650a={},_0x5c1682={},_0x537815={'count':0x0,'rows':[]};var _0x230d26=_[_0xb600('0x3b')](db[_0xb600('0x3c')][_0xb600('0x3d')],function(_0x4d26b6){return{'name':_0x4d26b6['fieldName'],'type':_0x4d26b6[_0xb600('0x3e')][_0xb600('0x3f')]};});_0x5c1682['model']=_[_0xb600('0x3b')](_0x230d26,_0xb600('0x38'));_0x5c1682['query']=_[_0xb600('0x40')](_0x777030[_0xb600('0x41')]);_0x5c1682[_0xb600('0x42')]=_[_0xb600('0x43')](_0x5c1682[_0xb600('0x44')],_0x5c1682[_0xb600('0x41')]);_0x39650a[_0xb600('0x45')]=_[_0xb600('0x43')](_0x5c1682['model'],qs[_0xb600('0x46')](_0x777030[_0xb600('0x41')][_0xb600('0x46')]));_0x39650a['attributes']=_0x39650a['attributes'][_0xb600('0x47')]?_0x39650a['attributes']:_0x5c1682[_0xb600('0x44')];if(!_0x777030[_0xb600('0x41')][_0xb600('0x48')]('nolimit')){_0x39650a[_0xb600('0x29')]=qs['limit'](_0x777030[_0xb600('0x41')][_0xb600('0x29')]);_0x39650a[_0xb600('0x2b')]=qs[_0xb600('0x2b')](_0x777030[_0xb600('0x41')][_0xb600('0x2b')]);}_0x39650a[_0xb600('0x49')]=qs['sort'](_0x777030[_0xb600('0x41')]['sort']);_0x39650a[_0xb600('0x4a')]=qs[_0xb600('0x42')](_['pick'](_0x777030[_0xb600('0x41')],_0x5c1682[_0xb600('0x42')]),_0x230d26);if(_0x777030[_0xb600('0x41')]['filter']){_0x39650a[_0xb600('0x4a')]=_['merge'](_0x39650a[_0xb600('0x4a')],{'$or':_[_0xb600('0x3b')](_0x230d26,function(_0x36bb8f){if(_0x36bb8f['type']!==_0xb600('0x4b')){var _0x5cf306={};_0x5cf306[_0x36bb8f[_0xb600('0x38')]]={'$like':'%'+_0x777030['query'][_0xb600('0x4c')]+'%'};return _0x5cf306;}})});}_0x39650a=_['merge']({},_0x39650a,_0x777030[_0xb600('0x4d')]);var _0x38fa10={'where':_0x39650a[_0xb600('0x4a')]};return db['Plugin']['count'](_0x38fa10)['then'](function(_0x23f198){_0x537815[_0xb600('0x2a')]=_0x23f198;if(_0x777030[_0xb600('0x41')][_0xb600('0x4e')]){_0x39650a[_0xb600('0x4f')]=[{'all':!![]}];}return db[_0xb600('0x3c')]['findAll'](_0x39650a);})[_0xb600('0x31')](function(_0x3ba7e6){_0x537815[_0xb600('0x50')]=_0x3ba7e6;return _0x537815;})[_0xb600('0x31')](respondWithFilteredResult(_0x5a091f,_0x39650a))[_0xb600('0x51')](handleError(_0x5a091f,null));};exports[_0xb600('0x52')]=function(_0x5566a9,_0x5cc3c4){var _0x5d22e9={'raw':!![],'where':{'id':_0x5566a9[_0xb600('0x53')]['id']}},_0x42415d={};_0x42415d[_0xb600('0x44')]=_[_0xb600('0x40')](db[_0xb600('0x3c')][_0xb600('0x3d')]);_0x42415d['query']=_['keys'](_0x5566a9[_0xb600('0x41')]);_0x42415d[_0xb600('0x42')]=_[_0xb600('0x43')](_0x42415d[_0xb600('0x44')],_0x42415d[_0xb600('0x41')]);_0x5d22e9[_0xb600('0x45')]=_[_0xb600('0x43')](_0x42415d[_0xb600('0x44')],qs[_0xb600('0x46')](_0x5566a9['query'][_0xb600('0x46')]));_0x5d22e9[_0xb600('0x45')]=_0x5d22e9[_0xb600('0x45')][_0xb600('0x47')]?_0x5d22e9['attributes']:_0x42415d[_0xb600('0x44')];if(_0x5566a9['query'][_0xb600('0x4e')]){_0x5d22e9[_0xb600('0x4f')]=[{'all':!![]}];}_0x5d22e9=_['merge']({},_0x5d22e9,_0x5566a9[_0xb600('0x4d')]);return db[_0xb600('0x3c')]['find'](_0x5d22e9)['then'](handleEntityNotFound(_0x5cc3c4,null))['then'](respondWithResult(_0x5cc3c4,null))[_0xb600('0x51')](handleError(_0x5cc3c4,null));};exports[_0xb600('0x54')]=function(_0x3c8c24,_0x31549a,_0x1f93a0){return db['Plugin']['find']({'where':{'id':_0x3c8c24['params']['id']},'attributes':['name','path'],'raw':!![]})[_0xb600('0x31')](handleEntityNotFound(_0x31549a,null))[_0xb600('0x31')](function(_0x584137){if(_0x584137){var _0x1b8acd=path[_0xb600('0x55')](config[_0xb600('0x56')],_0xb600('0x57'),util[_0xb600('0x58')](_0xb600('0x59'),path[_0xb600('0x5a')](_0x584137[_0xb600('0x9')])));var _0xacadc9=fs['createWriteStream'](_0x1b8acd);var _0x57d631=archiver(_0xb600('0x5b'),{'zlib':{'level':0x9}});_0x57d631['on'](_0xb600('0x5c'),function(_0x5b9501){if(_0x5b9501[_0xb600('0x5d')]===_0xb600('0x5e')){logger['error'](_0x5b9501);}else{throw new db['Sequelize'][(_0xb600('0x5f'))]('Error\x20while\x20generating\x20the\x20zip\x20archive');}});_0x57d631['on'](_0xb600('0x36'),function(_0x20ba72){throw new db[(_0xb600('0x60'))][(_0xb600('0x5f'))]('Error\x20while\x20generating\x20the\x20zip\x20archive');});_0x57d631['pipe'](_0xacadc9);_0x57d631['glob'](_0xb600('0x61'),{'cwd':path[_0xb600('0x55')](config[_0xb600('0x56')],_0xb600('0x57'),path['dirname'](_0x584137[_0xb600('0x9')])),'ignore':[path['join'](path[_0xb600('0x5a')](_0x584137[_0xb600('0x9')]),_0xb600('0x62')),path[_0xb600('0x55')](path[_0xb600('0x5a')](_0x584137[_0xb600('0x9')]),_0xb600('0x63'))],'nodir':!![]})['finalize']();_0xacadc9['on'](_0xb600('0x64'),function(){if(!fs[_0xb600('0x65')](_0x1b8acd)){throw new db[(_0xb600('0x60'))]['Error']('Plugin\x20not\x20found');}return _0x31549a[_0xb600('0x54')](_0x1b8acd,util[_0xb600('0x58')](_0xb600('0x59'),path[_0xb600('0x5a')](_0x584137[_0xb600('0x9')])),function(_0x12a0ae){if(_0x12a0ae){throw new db[(_0xb600('0x60'))][(_0xb600('0x5f'))](_0xb600('0x66'));}fs['unlinkSync'](_0x1b8acd);logger[_0xb600('0x67')](_0xb600('0x68'));logger[_0xb600('0x67')](_0xb600('0x69'));});});}return null;})['catch'](handleError(_0x31549a,null));};exports[_0xb600('0x6a')]=function(_0x160a67,_0x375ec1,_0x2210f3){var _0x252d90=path[_0xb600('0x5a')](_0x160a67['file'][_0xb600('0x6b')],path[_0xb600('0x6c')](_0x160a67[_0xb600('0x6d')][_0xb600('0x6b')]));var _0x3c734a=path[_0xb600('0x55')](config[_0xb600('0x56')],_0xb600('0x57'),_0x160a67['file']['filename']);var _0x24ec81=path[_0xb600('0x55')](config[_0xb600('0x56')],'server/files/plugins',_0x252d90);logger[_0xb600('0x67')](_0xb600('0x6e'),_0x3c734a);logger['info'](_0xb600('0x6f'),_0x24ec81);try{fs['chmodSync'](_0x3c734a,parseInt('0777',0x8));extract(_0x3c734a,{'dir':_0x24ec81},function(_0x2582fc){if(_0x2582fc){logger[_0xb600('0x36')](_0x2582fc);handleError(_0x2582fc,!![]);};var _0xb8227d=fs[_0xb600('0x70')](_0x24ec81);if(_0xb8227d[_0xb600('0x47')]>0x1){removeReferences(_0x3c734a,_0x24ec81);logger[_0xb600('0x36')]('Invalid\x20plugin\x20structure');return _0x2210f3(new Error(_0xb600('0x71')));}var _0x2b15f0=fs[_0xb600('0x72')](path[_0xb600('0x55')](_0x24ec81,_0xb8227d[0x0]));if(_0x2b15f0['isFile']()){removeReferences(_0x3c734a,_0x24ec81);logger[_0xb600('0x36')](_0xb600('0x71'));return _0x2210f3(new Error(_0xb600('0x71')));}if(_0x2b15f0[_0xb600('0x73')]()){var _0x35a3fc=fs[_0xb600('0x70')](path[_0xb600('0x55')](_0x24ec81,_0xb8227d[0x0]));if(_0x35a3fc[_0xb600('0x47')]===0x0){removeReferences(_0x3c734a,_0x24ec81);logger[_0xb600('0x36')](_0xb600('0x71'));return _0x2210f3(new Error(_0xb600('0x71')));}var _0x2ce175=_0x35a3fc['some'](function(_0x31d09e){return _0x31d09e==='manifest.json';});if(!_0x2ce175){return _0x2210f3(new Error(_0xb600('0x74')));}var _0x2fe8f2=fs[_0xb600('0x75')](path[_0xb600('0x55')](_0x24ec81,_0xb8227d[0x0],_0xb600('0x76')));var _0x4ad84b=JSON[_0xb600('0x77')](_0x2fe8f2);if(_0xb600('0x28')==typeof _0x4ad84b[_0xb600('0x38')]){return _0x2210f3(new Error(_0xb600('0x78')));}if(_0xb600('0x28')==typeof _0x4ad84b['type']){return _0x2210f3(new Error(_0xb600('0x79')));}if(_0xb600('0x28')==typeof _0x4ad84b[_0xb600('0x7a')]){return _0x2210f3(new Error(_0xb600('0x7b')));}if(_0xb600('0x28')==typeof _0x4ad84b[_0xb600('0x7c')]){return _0x2210f3(new Error('Invalid\x20manifest:\x20parameters\x20missing'));}if(_0x4ad84b[_0xb600('0x3e')]===_0xb600('0x7d')){if(_0xb600('0x28')==typeof _0x4ad84b[_0xb600('0x7c')][_0xb600('0x7e')]){return _0x2210f3(new Error(_0xb600('0x7f')));}if(_0xb600('0x28')==typeof _0x4ad84b[_0xb600('0x7c')]['views'][_0xb600('0x80')]&&_0xb600('0x28')==typeof _0x4ad84b[_0xb600('0x7c')]['views']['agent']){return _0x2210f3(new Error(_0xb600('0x81')));}}else if(_0x4ad84b[_0xb600('0x3e')]==='script'){if(_0xb600('0x28')==typeof _0x4ad84b[_0xb600('0x7c')][_0xb600('0x82')]){return _0x2210f3(new Error(_0xb600('0x83')));}if(_0xb600('0x28')==typeof _0x4ad84b['parameters'][_0xb600('0x84')]){return _0x2210f3(new Error('Invalid\x20manifest:\x20script\x20path\x20missing'));}}else{return _0x2210f3(new Error(_0xb600('0x85')));}var _0x38cbbf=_0x4ad84b[_0xb600('0x38')];var _0x13736a=_0x4ad84b[_0xb600('0x86')];var _0x31a732=_0x4ad84b[_0xb600('0x3e')];var _0x2a7e9e=_0x4ad84b[_0xb600('0x87')]?_0x4ad84b[_0xb600('0x87')]:'always';var _0x48fc41=_0x4ad84b[_0xb600('0x88')]?_0x4ad84b[_0xb600('0x88')]:'icon-apps';var _0x2b6ff0='';var _0x3082d9='';var _0x129040='';var _0x278c6d='';var _0x522929=_0x4ad84b[_0xb600('0x7a')];if(_0x31a732===_0xb600('0x7d')){if('undefined'!=typeof _0x4ad84b[_0xb600('0x7c')]['views'][_0xb600('0x80')]){var _0x171b46=_0x4ad84b[_0xb600('0x7c')]['views']['admin'];if(!/^(f|ht)tps?:\/\//i[_0xb600('0x89')](_0x171b46)){_0x2b6ff0=path[_0xb600('0x55')](_0xb600('0x8a'),_0x252d90,_0xb8227d[0x0],_0x171b46);}else{_0x2b6ff0=_0x171b46;}}else{logger['info'](_0xb600('0x8b'));}if(_0xb600('0x28')!=typeof _0x4ad84b[_0xb600('0x7c')]['views']['agent']){var _0x42b470=_0x4ad84b['parameters'][_0xb600('0x7e')][_0xb600('0x8c')];if(!/^(f|ht)tps?:\/\//i[_0xb600('0x89')](_0x42b470)){_0x3082d9=path[_0xb600('0x55')](_0xb600('0x8a'),_0x252d90,_0xb8227d[0x0],_0x42b470);}else{_0x3082d9=_0x42b470;}}else{logger['info'](_0xb600('0x8d'));}}else if(_0x31a732===_0xb600('0x8e')){_0x129040=_0x4ad84b['parameters'][_0xb600('0x82')];_0x278c6d=_0x4ad84b[_0xb600('0x7c')][_0xb600('0x84')];if(_0xb600('0x28')!=typeof _0x4ad84b[_0xb600('0x7c')]['views']){if(_0xb600('0x28')!=typeof _0x4ad84b[_0xb600('0x7c')]['views'][_0xb600('0x80')]){var _0x171b46=_0x4ad84b[_0xb600('0x7c')]['views'][_0xb600('0x80')];if(!/^(f|ht)tps?:\/\//i[_0xb600('0x89')](_0x171b46)){_0x2b6ff0=path[_0xb600('0x55')](_0xb600('0x8a'),_0x252d90,_0xb8227d[0x0],_0x171b46);}else{_0x2b6ff0=_0x171b46;}}if(_0xb600('0x28')!=typeof _0x4ad84b[_0xb600('0x7c')][_0xb600('0x7e')]['agent']){var _0x42b470=_0x4ad84b[_0xb600('0x7c')]['views'][_0xb600('0x8c')];if(!/^(f|ht)tps?:\/\//i[_0xb600('0x89')](_0x42b470)){_0x3082d9=path[_0xb600('0x55')](_0xb600('0x8a'),_0x252d90,_0xb8227d[0x0],_0x42b470);}else{_0x3082d9=_0x42b470;}}}}var _0x368d3a={'name':_0x38cbbf,'description':_0x13736a,'path':path[_0xb600('0x55')](_0x252d90,_0xb8227d[0x0]),'type':_0x31a732,'sidebar':_0x2a7e9e,'icon':_0x48fc41,'adminUrl':_0x2b6ff0,'agentUrl':_0x3082d9,'scriptName':_0x129040,'scriptPath':_0x278c6d,'version':_0x522929};removeReferences(_0x3c734a,null);return db[_0xb600('0x3c')]['create'](_0x368d3a)['then'](function(_0x53915f){var _0x512ccb={'role':_0x160a67['body'][_0xb600('0x8f')],'userProfileId':_0x160a67[_0xb600('0x90')][_0xb600('0x91')]};if(!_0x512ccb)throw new Error(_0xb600('0x92'));if(_0x512ccb['role']===_0xb600('0x93')){var _0x5dbfcd=_0x53915f['get']({'plain':!![]});return db[_0xb600('0x94')][_0xb600('0x95')]({'where':{'name':_0xb600('0x34'),'userProfileId':_0x512ccb[_0xb600('0x91')]},'raw':!![]})[_0xb600('0x31')](function(_0xa40c45){if(_0xa40c45&&_0xa40c45[_0xb600('0x96')]===0x0){return db[_0xb600('0x35')][_0xb600('0x97')]({'name':_0x5dbfcd[_0xb600('0x38')],'resourceId':_0x5dbfcd['id'],'type':_0xa40c45[_0xb600('0x38')],'sectionId':_0xa40c45['id']},{})['then'](function(){return _0x53915f;});}else{return _0x53915f;}})[_0xb600('0x51')](function(_0x391fa6){logger[_0xb600('0x36')](_0xb600('0x98'),_0x391fa6);throw _0x391fa6;});}return _0x53915f;})['then'](respondWithResult(_0x375ec1,null))[_0xb600('0x51')](handleError(_0x375ec1,null));}});}catch(_0x186faa){_0x375ec1['status'](0x1f4)[_0xb600('0x39')](_0x186faa);}};function removeReferences(_0x3545ef,_0x4b33ea){try{if(_0x3545ef){fs[_0xb600('0x99')](_0x3545ef);logger['info'](_0xb600('0x9a'));}if(_0x4b33ea){rimraf(_0x4b33ea,function(){});logger[_0xb600('0x67')](_0xb600('0x9b'));}}catch(_0x554d03){logger[_0xb600('0x36')](_0x554d03);}}exports['update']=function(_0x2ffe5c,_0x1e2296,_0x6ec2f3){return db[_0xb600('0x3c')][_0xb600('0x95')]({'where':{'id':_0x2ffe5c[_0xb600('0x53')]['id']}})['then'](handleEntityNotFound(_0x1e2296,null))[_0xb600('0x31')](saveUpdates(_0x2ffe5c[_0xb600('0x90')],null))['then'](respondWithResult(_0x1e2296,null))[_0xb600('0x51')](handleError(_0x1e2296,null));};exports['delete']=function(_0x4e7b82,_0x1024ff,_0x3513f9){return db[_0xb600('0x3c')][_0xb600('0x95')]({'where':{'id':_0x4e7b82[_0xb600('0x53')]['id']}})[_0xb600('0x31')](function(_0x3ad34d){if(_0x3ad34d){return _0x3ad34d['destroy']();}})['then'](function(_0x29027e){rimraf(path['join'](config['root'],_0xb600('0x57'),path[_0xb600('0x9c')](_0x29027e[_0xb600('0x9')])),function(){});return _0x29027e;})['then'](handleEntityNotFound(_0x1024ff,null))[_0xb600('0x31')](respondWithStatusCode(_0x1024ff,null))[_0xb600('0x51')](handleError(_0x1024ff,null));};exports[_0xb600('0x9d')]=function(_0xd3ced7,_0x829a70,_0x273709){return BPromise[_0xb600('0x9e')]()[_0xb600('0x31')](function(){if(!_0xd3ced7[_0xb600('0x41')][_0xb600('0x9')]){throw new Error(_0xb600('0x9f'));}if(!_0xd3ced7[_0xb600('0x41')][_0xb600('0xa0')]){throw new Error('\x27PORT\x27\x20parameter\x20not\x20specified');}var _0x3d1d77=_0xd3ced7[_0xb600('0x41')][_0xb600('0xa1')]?_0xd3ced7[_0xb600('0x41')][_0xb600('0xa1')]+':'+_0xd3ced7['query'][_0xb600('0xa0')]:_0xb600('0xa2')+_0xd3ced7['query'][_0xb600('0xa0')];var _0x4f23ac=_0xd3ced7['query'][_0xb600('0x27')]?_0xd3ced7[_0xb600('0x41')][_0xb600('0x27')]:!![];var _0x3b258d=_0xd3ced7[_0xb600('0x41')][_0xb600('0xa3')]?_0xd3ced7[_0xb600('0x41')][_0xb600('0xa3')]:null;var _0x527c99={'method':_0xd3ced7[_0xb600('0xa4')],'uri':util[_0xb600('0x58')](_0xb600('0xa5'),_0x3d1d77,_0xd3ced7['query'][_0xb600('0x9')]),'json':_0x4f23ac,'resolveWithFullResponse':!![],'encoding':_0x3b258d,'qs':_0xd3ced7[_0xb600('0x41')]};if(_0xd3ced7[_0xb600('0xa6')]){_0x527c99[_0xb600('0xa6')]=_0xd3ced7[_0xb600('0xa6')];if(_0x527c99[_0xb600('0xa6')]['content-length']){delete _0x527c99[_0xb600('0xa6')][_0xb600('0xa7')];}}if(_0x527c99[_0xb600('0xa6')][_0xb600('0xa8')]){delete _0x527c99[_0xb600('0xa6')]['content-type'];}return rp(_0x527c99);})[_0xb600('0x31')](function(_0x1ff1a9){if(_0x1ff1a9){_0x829a70[_0xb600('0x2c')](_0x1ff1a9[_0xb600('0xa6')]);logger[_0xb600('0x67')](_0x1ff1a9[_0xb600('0x90')]);if(_['endsWith'](_0xd3ced7['query'][_0xb600('0x9')],_0xb600('0x54'))&&_0x1ff1a9[_0xb600('0xa9')]==0x1f4){return _0x829a70[_0xb600('0x24')](_0x1ff1a9['statusCode']);}else{return _0x829a70['status'](_0x1ff1a9['statusCode'])['send'](_0x1ff1a9[_0xb600('0x90')]);}}else{return _0x829a70[_0xb600('0x24')](0xc8);}})['catch'](handleError(_0x829a70,null));};exports[_0xb600('0xaa')]=function(_0x5bd35c,_0x188dc1,_0x5d7c97){return BPromise[_0xb600('0x9e')]()[_0xb600('0x31')](function(){if(!_0x5bd35c[_0xb600('0x41')][_0xb600('0x9')]){throw new Error(_0xb600('0x9f'));}if(!_0x5bd35c[_0xb600('0x41')][_0xb600('0xa0')]){throw new Error(_0xb600('0xab'));}var _0xb3c09e=_0x5bd35c[_0xb600('0x41')]['hostname']?_0x5bd35c[_0xb600('0x41')][_0xb600('0xa1')]+':'+_0x5bd35c[_0xb600('0x41')][_0xb600('0xa0')]:_0xb600('0xa2')+_0x5bd35c['query'][_0xb600('0xa0')];var _0x5e5bd8=_0x5bd35c[_0xb600('0x41')]['json']?_0x5bd35c[_0xb600('0x41')][_0xb600('0x27')]:!![];var _0x41fda3=_0x5bd35c[_0xb600('0x41')][_0xb600('0xa3')]?_0x5bd35c[_0xb600('0x41')][_0xb600('0xa3')]:null;var _0x5009ca={'method':_0x5bd35c[_0xb600('0xa4')],'uri':util[_0xb600('0x58')](_0xb600('0xa5'),_0xb3c09e,_0x5bd35c[_0xb600('0x41')]['path']),'json':_0x5e5bd8,'resolveWithFullResponse':!![],'encoding':_0x41fda3,'body':_0x5bd35c[_0xb600('0x90')]};if(_0x5bd35c[_0xb600('0xa6')]){_0x5009ca[_0xb600('0xa6')]=_0x5bd35c['headers'];if(_0x5009ca['headers']['content-length']){delete _0x5009ca[_0xb600('0xa6')][_0xb600('0xa7')];}}if(_0x5009ca['headers'][_0xb600('0xa8')]){delete _0x5009ca[_0xb600('0xa6')][_0xb600('0xa8')];}return rp(_0x5009ca);})[_0xb600('0x31')](function(_0x2d386e){if(_0x2d386e){_0x188dc1['set'](_0x2d386e[_0xb600('0xa6')]);logger[_0xb600('0x67')](_0x2d386e[_0xb600('0x90')]);return _0x188dc1['status'](_0x2d386e['statusCode'])['send'](_0x2d386e[_0xb600('0x90')]);}else{return _0x188dc1['sendStatus'](0xc8);}})[_0xb600('0x51')](handleError(_0x188dc1,null));};
\ No newline at end of file
index 9cd5e9c..2b67247 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x647c=['Plugin','setMaxListeners','update','remove','emit','hasOwnProperty','hook','exports','events'];(function(_0x156ce4,_0x355350){var _0x37f36a=function(_0x2681d8){while(--_0x2681d8){_0x156ce4['push'](_0x156ce4['shift']());}};_0x37f36a(++_0x355350);}(_0x647c,0x1d3));var _0xc647=function(_0x56c5c0,_0x2901e6){_0x56c5c0=_0x56c5c0-0x0;var _0x3610b8=_0x647c[_0x56c5c0];return _0x3610b8;};'use strict';var EventEmitter=require(_0xc647('0x0'));var Plugin=require('../../mysqldb')['db'][_0xc647('0x1')];var PluginEvents=new EventEmitter();PluginEvents[_0xc647('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xc647('0x3'),'afterDestroy':_0xc647('0x4')};function emitEvent(_0x12bd28){return function(_0x339174,_0x2719dc,_0x535407){PluginEvents[_0xc647('0x5')](_0x12bd28+':'+_0x339174['id'],_0x339174);PluginEvents[_0xc647('0x5')](_0x12bd28,_0x339174);_0x535407(null);};}for(var e in events){if(events[_0xc647('0x6')](e)){var event=events[e];Plugin[_0xc647('0x7')](e,emitEvent(event));}}module[_0xc647('0x8')]=PluginEvents;
\ No newline at end of file
+var _0x7a3e=['Plugin','save','update','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0xf20838,_0x4f0be9){var _0x37ec00=function(_0x37239b){while(--_0x37239b){_0xf20838['push'](_0xf20838['shift']());}};_0x37ec00(++_0x4f0be9);}(_0x7a3e,0x18a));var _0xe7a3=function(_0x36f9d0,_0x12f155){_0x36f9d0=_0x36f9d0-0x0;var _0xfcea6a=_0x7a3e[_0x36f9d0];return _0xfcea6a;};'use strict';var EventEmitter=require(_0xe7a3('0x0'));var Plugin=require(_0xe7a3('0x1'))['db'][_0xe7a3('0x2')];var PluginEvents=new EventEmitter();PluginEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xe7a3('0x3'),'afterUpdate':_0xe7a3('0x4'),'afterDestroy':'remove'};function emitEvent(_0x522203){return function(_0x9d97ac,_0x4053f3,_0x11d8bf){PluginEvents['emit'](_0x522203+':'+_0x9d97ac['id'],_0x9d97ac);PluginEvents[_0xe7a3('0x5')](_0x522203,_0x9d97ac);_0x11d8bf(null);};}for(var e in events){if(events[_0xe7a3('0x6')](e)){var event=events[e];Plugin[_0xe7a3('0x7')](e,emitEvent(event));}}module[_0xe7a3('0x8')]=PluginEvents;
\ No newline at end of file
index 9e5e1e2..802b52e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd199=['lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./plugin.attributes','define','Plugin','plugins'];(function(_0x4a8e14,_0x519668){var _0x28be98=function(_0x147116){while(--_0x147116){_0x4a8e14['push'](_0x4a8e14['shift']());}};_0x28be98(++_0x519668);}(_0xd199,0x75));var _0x9d19=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd199[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x9d19('0x0'));var util=require('util');var logger=require(_0x9d19('0x1'))(_0x9d19('0x2'));var moment=require(_0x9d19('0x3'));var BPromise=require(_0x9d19('0x4'));var rp=require(_0x9d19('0x5'));var fs=require('fs');var path=require(_0x9d19('0x6'));var rimraf=require(_0x9d19('0x7'));var config=require(_0x9d19('0x8'));var attributes=require(_0x9d19('0x9'));module['exports']=function(_0x42856a,_0x2a453f){return _0x42856a[_0x9d19('0xa')](_0x9d19('0xb'),attributes,{'tableName':_0x9d19('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x2308=['exports','define','plugins','lodash','util','moment','bluebird','rimraf','../../config/environment','./plugin.attributes'];(function(_0x54f336,_0x171826){var _0x3fea0c=function(_0x43fa58){while(--_0x43fa58){_0x54f336['push'](_0x54f336['shift']());}};_0x3fea0c(++_0x171826);}(_0x2308,0x193));var _0x8230=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x2308[_0x2dafbe];return _0x58a45a;};'use strict';var _=require(_0x8230('0x0'));var util=require(_0x8230('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x8230('0x2'));var BPromise=require(_0x8230('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x8230('0x4'));var config=require(_0x8230('0x5'));var attributes=require(_0x8230('0x6'));module[_0x8230('0x7')]=function(_0x4d71bd,_0x236364){return _0x4d71bd[_0x8230('0x8')]('Plugin',attributes,{'tableName':_0x8230('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index fd44f6f..6efd2d5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5eda=['Plugin,\x20%s,\x20%s,\x20%s','stringify','error','code','Plugin,\x20%s,\x20%s','message','result','catch','CreatePlugin','Plugin','create','body','options','raw','then','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','jayson/promise','client','http','defaults','redis','localhost','register','request','info','request\x20sent','debug'];(function(_0x18488e,_0x6c138){var _0x451896=function(_0x3ac076){while(--_0x3ac076){_0x18488e['push'](_0x18488e['shift']());}};_0x451896(++_0x6c138);}(_0x5eda,0x1af));var _0xa5ed=function(_0x34192a,_0x306455){_0x34192a=_0x34192a-0x0;var _0x36257b=_0x5eda[_0x34192a];return _0x36257b;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xa5ed('0x0'));var BPromise=require(_0xa5ed('0x1'));var rs=require(_0xa5ed('0x2'));var fs=require('fs');var Redis=require(_0xa5ed('0x3'));var db=require(_0xa5ed('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xa5ed('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0xa5ed('0x6'));var client=jayson[_0xa5ed('0x7')][_0xa5ed('0x8')]({'port':0x232a});config['redis']=_[_0xa5ed('0x9')](config[_0xa5ed('0xa')],{'host':_0xa5ed('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xa5ed('0xa')]));require('./plugin.socket')[_0xa5ed('0xc')](socket);function respondWithRpcPromise(_0x45aae0,_0x3d8179,_0x2014ae){return new BPromise(function(_0x5dc35c,_0x18f444){return client[_0xa5ed('0xd')](_0x45aae0,_0x2014ae)['then'](function(_0xe17e31){logger[_0xa5ed('0xe')]('Plugin,\x20%s,\x20%s',_0x3d8179,_0xa5ed('0xf'));logger[_0xa5ed('0x10')](_0xa5ed('0x11'),_0x3d8179,_0xa5ed('0xf'),JSON[_0xa5ed('0x12')](_0xe17e31));if(_0xe17e31[_0xa5ed('0x13')]){if(_0xe17e31['error'][_0xa5ed('0x14')]===0x1f4){logger['error'](_0xa5ed('0x15'),_0x3d8179,_0xe17e31[_0xa5ed('0x13')]['message']);return _0x18f444(_0xe17e31[_0xa5ed('0x13')][_0xa5ed('0x16')]);}logger[_0xa5ed('0x13')](_0xa5ed('0x15'),_0x3d8179,_0xe17e31[_0xa5ed('0x13')]['message']);return _0x5dc35c(_0xe17e31['error'][_0xa5ed('0x16')]);}else{logger[_0xa5ed('0xe')](_0xa5ed('0x15'),_0x3d8179,_0xa5ed('0xf'));_0x5dc35c(_0xe17e31[_0xa5ed('0x17')][_0xa5ed('0x16')]);}})[_0xa5ed('0x18')](function(_0x233e15){logger[_0xa5ed('0x13')](_0xa5ed('0x15'),_0x3d8179,_0x233e15);_0x18f444(_0x233e15);});});}exports[_0xa5ed('0x19')]=function(_0xaeb373){var _0x1ea203=this;return new Promise(function(_0xabd3cf,_0x713b89){return db[_0xa5ed('0x1a')][_0xa5ed('0x1b')](_0xaeb373[_0xa5ed('0x1c')],{'raw':_0xaeb373['options']?_0xaeb373[_0xa5ed('0x1d')][_0xa5ed('0x1e')]===undefined?!![]:![]:!![]})[_0xa5ed('0x1f')](function(_0x425be0){logger[_0xa5ed('0xe')]('CreatePlugin',_0xaeb373);logger[_0xa5ed('0x10')](_0xa5ed('0x19'),_0xaeb373,JSON['stringify'](_0x425be0));_0xabd3cf(_0x425be0);})[_0xa5ed('0x18')](function(_0x2516ae){logger[_0xa5ed('0x13')](_0xa5ed('0x19'),_0x2516ae[_0xa5ed('0x16')],_0xaeb373);_0x713b89(_0x1ea203['error'](0x1f4,_0x2516ae[_0xa5ed('0x16')]));});});};
\ No newline at end of file
+var _0x1ae4=['redis','defaults','localhost','./plugin.socket','request','info','request\x20sent','Plugin,\x20%s,\x20%s,\x20%s','stringify','error','Plugin,\x20%s,\x20%s','message','result','catch','create','options','raw','then','debug','CreatePlugin','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http'];(function(_0x3dce98,_0x588617){var _0x3f3cb5=function(_0x161cfe){while(--_0x161cfe){_0x3dce98['push'](_0x3dce98['shift']());}};_0x3f3cb5(++_0x588617);}(_0x1ae4,0x114));var _0x41ae=function(_0xdec3b7,_0x5742b1){_0xdec3b7=_0xdec3b7-0x0;var _0x15a00f=_0x1ae4[_0xdec3b7];return _0x15a00f;};'use strict';var _=require(_0x41ae('0x0'));var util=require(_0x41ae('0x1'));var moment=require(_0x41ae('0x2'));var BPromise=require('bluebird');var rs=require(_0x41ae('0x3'));var fs=require('fs');var Redis=require(_0x41ae('0x4'));var db=require(_0x41ae('0x5'))['db'];var utils=require(_0x41ae('0x6'));var logger=require(_0x41ae('0x7'))(_0x41ae('0x8'));var config=require(_0x41ae('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x41ae('0xa')][_0x41ae('0xb')]({'port':0x232a});config[_0x41ae('0xc')]=_[_0x41ae('0xd')](config['redis'],{'host':_0x41ae('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x41ae('0xc')]));require(_0x41ae('0xf'))['register'](socket);function respondWithRpcPromise(_0x5c5cd8,_0x138347,_0x5bedd6){return new BPromise(function(_0x151268,_0x4b5a3c){return client[_0x41ae('0x10')](_0x5c5cd8,_0x5bedd6)['then'](function(_0x16c7b0){logger[_0x41ae('0x11')]('Plugin,\x20%s,\x20%s',_0x138347,_0x41ae('0x12'));logger['debug'](_0x41ae('0x13'),_0x138347,_0x41ae('0x12'),JSON[_0x41ae('0x14')](_0x16c7b0));if(_0x16c7b0[_0x41ae('0x15')]){if(_0x16c7b0[_0x41ae('0x15')]['code']===0x1f4){logger[_0x41ae('0x15')](_0x41ae('0x16'),_0x138347,_0x16c7b0[_0x41ae('0x15')]['message']);return _0x4b5a3c(_0x16c7b0['error']['message']);}logger['error']('Plugin,\x20%s,\x20%s',_0x138347,_0x16c7b0[_0x41ae('0x15')][_0x41ae('0x17')]);return _0x151268(_0x16c7b0[_0x41ae('0x15')][_0x41ae('0x17')]);}else{logger[_0x41ae('0x11')](_0x41ae('0x16'),_0x138347,_0x41ae('0x12'));_0x151268(_0x16c7b0[_0x41ae('0x18')][_0x41ae('0x17')]);}})[_0x41ae('0x19')](function(_0x24f11c){logger[_0x41ae('0x15')](_0x41ae('0x16'),_0x138347,_0x24f11c);_0x4b5a3c(_0x24f11c);});});}exports['CreatePlugin']=function(_0x4551be){var _0x5b981a=this;return new Promise(function(_0x2b07ec,_0x1c6cf2){return db['Plugin'][_0x41ae('0x1a')](_0x4551be['body'],{'raw':_0x4551be[_0x41ae('0x1b')]?_0x4551be['options'][_0x41ae('0x1c')]===undefined?!![]:![]:!![]})[_0x41ae('0x1d')](function(_0x4fb38a){logger[_0x41ae('0x11')]('CreatePlugin',_0x4551be);logger[_0x41ae('0x1e')](_0x41ae('0x1f'),_0x4551be,JSON[_0x41ae('0x14')](_0x4fb38a));_0x2b07ec(_0x4fb38a);})[_0x41ae('0x19')](function(_0x2f7ea5){logger[_0x41ae('0x15')](_0x41ae('0x1f'),_0x2f7ea5[_0x41ae('0x17')],_0x4551be);_0x1c6cf2(_0x5b981a[_0x41ae('0x15')](0x1f4,_0x2f7ea5['message']));});});};
\ No newline at end of file
index c235baf..0ba9626 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1bbb=['remove','update','removeListener','register','length','plugin:','./plugin.events'];(function(_0x248e67,_0x1da42f){var _0x39aaa7=function(_0x1849a9){while(--_0x1849a9){_0x248e67['push'](_0x248e67['shift']());}};_0x39aaa7(++_0x1da42f);}(_0x1bbb,0xbc));var _0xb1bb=function(_0x1c6af8,_0x4c96de){_0x1c6af8=_0x1c6af8-0x0;var _0x4b99b6=_0x1bbb[_0x1c6af8];return _0x4b99b6;};'use strict';var PluginEvents=require(_0xb1bb('0x0'));var events=['save',_0xb1bb('0x1'),_0xb1bb('0x2')];function createListener(_0x10f7f7,_0x3adc95){return function(_0x5823d5){_0x3adc95['emit'](_0x10f7f7,_0x5823d5);};}function removeListener(_0x5d60c5,_0x36d208){return function(){PluginEvents[_0xb1bb('0x3')](_0x5d60c5,_0x36d208);};}exports[_0xb1bb('0x4')]=function(_0x5706d9){for(var _0x322542=0x0,_0x2eab5e=events[_0xb1bb('0x5')];_0x322542<_0x2eab5e;_0x322542++){var _0x30ec83=events[_0x322542];var _0x2a3bd2=createListener(_0xb1bb('0x6')+_0x30ec83,_0x5706d9);PluginEvents['on'](_0x30ec83,_0x2a3bd2);}};
\ No newline at end of file
+var _0x053f=['length','plugin:','save','remove','update','removeListener','register'];(function(_0x36ed3c,_0x44a00a){var _0x52a2e0=function(_0x3f7af9){while(--_0x3f7af9){_0x36ed3c['push'](_0x36ed3c['shift']());}};_0x52a2e0(++_0x44a00a);}(_0x053f,0x198));var _0xf053=function(_0x187335,_0x36baf1){_0x187335=_0x187335-0x0;var _0x5e603b=_0x053f[_0x187335];return _0x5e603b;};'use strict';var PluginEvents=require('./plugin.events');var events=[_0xf053('0x0'),_0xf053('0x1'),_0xf053('0x2')];function createListener(_0x452f85,_0x2db903){return function(_0x9a2b01){_0x2db903['emit'](_0x452f85,_0x9a2b01);};}function removeListener(_0x1710e1,_0x6ae0f2){return function(){PluginEvents[_0xf053('0x3')](_0x1710e1,_0x6ae0f2);};}exports[_0xf053('0x4')]=function(_0x1f8ead){for(var _0x41c890=0x0,_0x18df1d=events[_0xf053('0x5')];_0x41c890<_0x18df1d;_0x41c890++){var _0xf58fbf=events[_0x41c890];var _0xad97ea=createListener(_0xf053('0x6')+_0xf58fbf,_0x1f8ead);PluginEvents['on'](_0xf58fbf,_0xad97ea);}};
\ No newline at end of file
index 14141f0..df7753e 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(_0x3b13a1,_0x2d7f26){var _0x26faff=function(_0x58516e){while(--_0x58516e){_0x3b13a1['push'](_0x3b13a1['shift']());}};_0x26faff(++_0x2d7f26);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2bf141,_0x31eac7){_0x2bf141=_0x2bf141-0x0;var _0x48277b=_0xa9e0[_0x2bf141];return _0x48277b;};'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(_0x11a7f3,_0x299f5a){var _0x3d2054=function(_0x57f4bf){while(--_0x57f4bf){_0x11a7f3['push'](_0x11a7f3['shift']());}};_0x3d2054(++_0x299f5a);}(_0xa9e0,0x123));var _0x0a9e=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0xa9e0[_0xbca1b1];return _0x4e1686;};'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 d5f8f70..0b45b69 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcea2=['then','express','motion2','length','catch','show','describe','params','create','body','script','join','../../files/plugins','cwd','chdir','dump','update','restart','stop','Unknown\x20status','delete','Unknown\x20id','lodash','../../config/logger','path','child_process','exec','status','json','stack','name','send','npm\x20install','info','index','list'];(function(_0x3a50fd,_0x275987){var _0x167328=function(_0x35c723){while(--_0x35c723){_0x3a50fd['push'](_0x3a50fd['shift']());}};_0x167328(++_0x275987);}(_0xcea2,0x15a));var _0x2cea=function(_0x173441,_0x26b0d9){_0x173441=_0x173441-0x0;var _0x2423a8=_0xcea2[_0x173441];return _0x2423a8;};'use strict';var _=require(_0x2cea('0x0'));var pm2=require('../../config/pm2');var logger=require(_0x2cea('0x1'))('api');var path=require(_0x2cea('0x2'));var exec=require(_0x2cea('0x3'))[_0x2cea('0x4')];var BPromise=require('bluebird');function handleEntityNotFound(_0x3ff73f,_0x46060b){return function(_0x11596e){if(!_0x11596e){_0x3ff73f['sendStatus'](0x194);;}return _0x11596e;};}function respondWithResult(_0x34f0f2,_0x485c26){_0x485c26=_0x485c26||0xc8;return function(_0x2d69ff){if(_0x2d69ff){return _0x34f0f2[_0x2cea('0x5')](_0x485c26)[_0x2cea('0x6')](_0x2d69ff);}return null;};}function handleError(_0x160cca,_0x11c5c0){_0x11c5c0=_0x11c5c0||0x1f4;return function(_0x1519f6){logger['error'](_0x1519f6[_0x2cea('0x7')]);if(_0x1519f6[_0x2cea('0x8')]){delete _0x1519f6[_0x2cea('0x8')];}_0x160cca[_0x2cea('0x5')](_0x11c5c0)[_0x2cea('0x9')](_0x1519f6);};}function execChildProcess(){return new BPromise(function(_0x439c4d,_0x4298a4){exec(_0x2cea('0xa'),function(_0x58a102,_0x5724b0,_0x2fe9cd){logger[_0x2cea('0xb')](_0x5724b0);logger['info'](_0x2fe9cd);if(_0x58a102){logger['error'](_0x58a102);return _0x4298a4(_0x58a102);}return _0x439c4d(_0x5724b0);});});}exports[_0x2cea('0xc')]=function(_0x4e0da7,_0xa4ce3d){return pm2[_0x2cea('0xd')]()[_0x2cea('0xe')](function(_0x5cf805){if(_0x5cf805){var _0x4d7f8b=_['reject'](_0x5cf805,function(_0x369c72){return _0x369c72['name']===_0x2cea('0xf')||_0x369c72[_0x2cea('0x8')]===_0x2cea('0x10');});return{'rows':_0x4d7f8b,'count':_0x4d7f8b[_0x2cea('0x11')]};}return null;})[_0x2cea('0xe')](respondWithResult(_0xa4ce3d,null))[_0x2cea('0x12')](handleError(_0xa4ce3d,null));};exports[_0x2cea('0x13')]=function(_0x1ead4c,_0x5eee09){return pm2[_0x2cea('0x14')](_0x1ead4c[_0x2cea('0x15')]['id'])[_0x2cea('0xe')](respondWithResult(_0x5eee09,null))[_0x2cea('0xe')](handleEntityNotFound(_0x5eee09,null))[_0x2cea('0x12')](handleError(_0x5eee09,null));};exports[_0x2cea('0x16')]=function(_0x5d75c4,_0x27375b){if(_0x5d75c4['body'][_0x2cea('0x8')]&&_0x5d75c4[_0x2cea('0x17')][_0x2cea('0x18')]){var _0x4fd3d5=path[_0x2cea('0x19')](__dirname,_0x2cea('0x1a'),_0x5d75c4[_0x2cea('0x17')][_0x2cea('0x18')]);var _0x3246bc=process[_0x2cea('0x1b')]();process[_0x2cea('0x1c')](path['dirname'](_0x4fd3d5));return execChildProcess()[_0x2cea('0xe')](function(_0x5e5b46){process[_0x2cea('0x1c')](_0x3246bc);return pm2['start']({'name':_0x5d75c4[_0x2cea('0x17')][_0x2cea('0x8')],'script':_0x4fd3d5});})['then'](function(_0x41d272){pm2[_0x2cea('0x1d')]();return _0x41d272[0x0];})[_0x2cea('0xe')](respondWithResult(_0x27375b,0xc9))[_0x2cea('0x12')](handleError(_0x27375b,null));}else{return _0x27375b[_0x2cea('0x5')](0x1f4)[_0x2cea('0x9')]({'message':'Missing\x20name\x20and/or\x20path'});}};exports[_0x2cea('0x1e')]=function(_0x32b6a3,_0x2bbe9b){if(_0x32b6a3[_0x2cea('0x17')]['id']){delete _0x32b6a3[_0x2cea('0x17')]['id'];}var _0x3ea40c={'online':_0x2cea('0x1f'),'stopped':_0x2cea('0x20')};if(_0x3ea40c['hasOwnProperty'](_0x32b6a3[_0x2cea('0x17')][_0x2cea('0x5')])){return pm2[_0x3ea40c[_0x32b6a3['body'][_0x2cea('0x5')]]](_0x32b6a3[_0x2cea('0x15')]['id'])[_0x2cea('0xe')](respondWithResult(_0x2bbe9b,0xc8))[_0x2cea('0x12')](handleError(_0x2bbe9b,null));}else{return _0x2bbe9b['status'](0x1f4)[_0x2cea('0x9')]({'message':_0x2cea('0x21')});}};exports['destroy']=function(_0x2bf4e9,_0x2e3d44){if(_0x2bf4e9[_0x2cea('0x17')]['id']){delete _0x2bf4e9[_0x2cea('0x17')]['id'];}if(_0x2bf4e9[_0x2cea('0x15')]['id']){return pm2[_0x2cea('0x22')](_0x2bf4e9[_0x2cea('0x15')]['id'])[_0x2cea('0xe')](function(_0x2e1cd6){pm2[_0x2cea('0x1d')]();return _0x2e1cd6[0x0];})[_0x2cea('0xe')](respondWithResult(_0x2e3d44,null))['catch'](handleError(_0x2e3d44,null));}else{return _0x2e3d44[_0x2cea('0x5')](0x1f4)[_0x2cea('0x9')]({'message':_0x2cea('0x23')});}};
\ No newline at end of file
+var _0xc788=['body','script','join','../../files/plugins','chdir','dirname','start','dump','send','update','stop','hasOwnProperty','Unknown\x20status','params','delete','Unknown\x20id','lodash','../../config/pm2','../../config/logger','child_process','exec','bluebird','sendStatus','status','error','stack','name','info','index','list','then','reject','motion2','catch','show','describe'];(function(_0x2b8388,_0x246b8f){var _0x3ba12a=function(_0x848995){while(--_0x848995){_0x2b8388['push'](_0x2b8388['shift']());}};_0x3ba12a(++_0x246b8f);}(_0xc788,0xc4));var _0x8c78=function(_0x4b40de,_0x3efe59){_0x4b40de=_0x4b40de-0x0;var _0x5c9460=_0xc788[_0x4b40de];return _0x5c9460;};'use strict';var _=require(_0x8c78('0x0'));var pm2=require(_0x8c78('0x1'));var logger=require(_0x8c78('0x2'))('api');var path=require('path');var exec=require(_0x8c78('0x3'))[_0x8c78('0x4')];var BPromise=require(_0x8c78('0x5'));function handleEntityNotFound(_0x1d0670,_0x386f0a){return function(_0x5498f9){if(!_0x5498f9){_0x1d0670[_0x8c78('0x6')](0x194);;}return _0x5498f9;};}function respondWithResult(_0x4555da,_0x329152){_0x329152=_0x329152||0xc8;return function(_0x1ac27f){if(_0x1ac27f){return _0x4555da[_0x8c78('0x7')](_0x329152)['json'](_0x1ac27f);}return null;};}function handleError(_0x247188,_0x299d9d){_0x299d9d=_0x299d9d||0x1f4;return function(_0x9bc075){logger[_0x8c78('0x8')](_0x9bc075[_0x8c78('0x9')]);if(_0x9bc075[_0x8c78('0xa')]){delete _0x9bc075['name'];}_0x247188[_0x8c78('0x7')](_0x299d9d)['send'](_0x9bc075);};}function execChildProcess(){return new BPromise(function(_0x3d55f0,_0x45935a){exec('npm\x20install',function(_0x1a05a7,_0x95e78e,_0x5ee642){logger[_0x8c78('0xb')](_0x95e78e);logger['info'](_0x5ee642);if(_0x1a05a7){logger['error'](_0x1a05a7);return _0x45935a(_0x1a05a7);}return _0x3d55f0(_0x95e78e);});});}exports[_0x8c78('0xc')]=function(_0x1b1d0e,_0x26178c){return pm2[_0x8c78('0xd')]()[_0x8c78('0xe')](function(_0x3d1306){if(_0x3d1306){var _0xe5f8ae=_[_0x8c78('0xf')](_0x3d1306,function(_0x2f44af){return _0x2f44af[_0x8c78('0xa')]==='express'||_0x2f44af[_0x8c78('0xa')]===_0x8c78('0x10');});return{'rows':_0xe5f8ae,'count':_0xe5f8ae['length']};}return null;})[_0x8c78('0xe')](respondWithResult(_0x26178c,null))[_0x8c78('0x11')](handleError(_0x26178c,null));};exports[_0x8c78('0x12')]=function(_0x23824e,_0x2a982c){return pm2[_0x8c78('0x13')](_0x23824e['params']['id'])['then'](respondWithResult(_0x2a982c,null))[_0x8c78('0xe')](handleEntityNotFound(_0x2a982c,null))['catch'](handleError(_0x2a982c,null));};exports['create']=function(_0xece4f0,_0x56c191){if(_0xece4f0[_0x8c78('0x14')][_0x8c78('0xa')]&&_0xece4f0['body'][_0x8c78('0x15')]){var _0x5b111b=path[_0x8c78('0x16')](__dirname,_0x8c78('0x17'),_0xece4f0['body'][_0x8c78('0x15')]);var _0x188cc3=process['cwd']();process[_0x8c78('0x18')](path[_0x8c78('0x19')](_0x5b111b));return execChildProcess()[_0x8c78('0xe')](function(_0x9581c6){process[_0x8c78('0x18')](_0x188cc3);return pm2[_0x8c78('0x1a')]({'name':_0xece4f0[_0x8c78('0x14')][_0x8c78('0xa')],'script':_0x5b111b});})[_0x8c78('0xe')](function(_0x4a7d20){pm2[_0x8c78('0x1b')]();return _0x4a7d20[0x0];})[_0x8c78('0xe')](respondWithResult(_0x56c191,0xc9))[_0x8c78('0x11')](handleError(_0x56c191,null));}else{return _0x56c191['status'](0x1f4)[_0x8c78('0x1c')]({'message':'Missing\x20name\x20and/or\x20path'});}};exports[_0x8c78('0x1d')]=function(_0x24f9a7,_0x8d9ff9){if(_0x24f9a7['body']['id']){delete _0x24f9a7[_0x8c78('0x14')]['id'];}var _0x2568d5={'online':'restart','stopped':_0x8c78('0x1e')};if(_0x2568d5[_0x8c78('0x1f')](_0x24f9a7[_0x8c78('0x14')][_0x8c78('0x7')])){return pm2[_0x2568d5[_0x24f9a7[_0x8c78('0x14')][_0x8c78('0x7')]]](_0x24f9a7['params']['id'])[_0x8c78('0xe')](respondWithResult(_0x8d9ff9,0xc8))['catch'](handleError(_0x8d9ff9,null));}else{return _0x8d9ff9[_0x8c78('0x7')](0x1f4)[_0x8c78('0x1c')]({'message':_0x8c78('0x20')});}};exports['destroy']=function(_0x1f1a0c,_0x3816d2){if(_0x1f1a0c['body']['id']){delete _0x1f1a0c[_0x8c78('0x14')]['id'];}if(_0x1f1a0c[_0x8c78('0x21')]['id']){return pm2[_0x8c78('0x22')](_0x1f1a0c['params']['id'])[_0x8c78('0xe')](function(_0x63307e){pm2[_0x8c78('0x1b')]();return _0x63307e[0x0];})['then'](respondWithResult(_0x3816d2,null))[_0x8c78('0x11')](handleError(_0x3816d2,null));}else{return _0x3816d2[_0x8c78('0x7')](0x1f4)['send']({'message':_0x8c78('0x23')});}};
\ No newline at end of file
index 913a546..aed2d33 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf638=['get','/agents','isAuthenticated','/queues','exports','express','../../components/auth/service','./realtime.controller'];(function(_0x4b91c4,_0x23f35f){var _0x25cb80=function(_0x48e283){while(--_0x48e283){_0x4b91c4['push'](_0x4b91c4['shift']());}};_0x25cb80(++_0x23f35f);}(_0xf638,0x135));var _0x8f63=function(_0x1388c4,_0x2ba6d9){_0x1388c4=_0x1388c4-0x0;var _0xbe0331=_0xf638[_0x1388c4];return _0xbe0331;};'use strict';var express=require(_0x8f63('0x0'));var router=express['Router']();var auth=require(_0x8f63('0x1'));var controller=require(_0x8f63('0x2'));router[_0x8f63('0x3')](_0x8f63('0x4'),auth[_0x8f63('0x5')](),controller['getAgents']);router[_0x8f63('0x3')](_0x8f63('0x6'),auth['isAuthenticated'](),controller['getQueues']);module[_0x8f63('0x7')]=router;
\ No newline at end of file
+var _0x41e8=['/queues','getQueues','express','Router','../../components/auth/service','get','/agents','isAuthenticated','getAgents'];(function(_0x16d10f,_0x2ba2d5){var _0x50c823=function(_0x44e43f){while(--_0x44e43f){_0x16d10f['push'](_0x16d10f['shift']());}};_0x50c823(++_0x2ba2d5);}(_0x41e8,0x119));var _0x841e=function(_0x55f8b4,_0x43f30d){_0x55f8b4=_0x55f8b4-0x0;var _0x2475f9=_0x41e8[_0x55f8b4];return _0x2475f9;};'use strict';var express=require(_0x841e('0x0'));var router=express[_0x841e('0x1')]();var auth=require(_0x841e('0x2'));var controller=require('./realtime.controller');router[_0x841e('0x3')](_0x841e('0x4'),auth[_0x841e('0x5')](),controller[_0x841e('0x6')]);router[_0x841e('0x3')](_0x841e('0x7'),auth[_0x841e('0x5')](),controller[_0x841e('0x8')]);module['exports']=router;
\ No newline at end of file
index 3d9b2c4..589a9aa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4922=['sequelize','literal','forEach','*pause','merge','where','user','userProfileId','Agents','online','extraQueryConditions','assign','UserProfile','getResources','findAndCountAll','find','filterAgentAttributes','globalStatus','getAgentStatus','talking','Status','getRealtimeAgentsQueryFields','pick','catch','getQueues','startCase','Queue','name','voice','outbound','dialActive','dialMethod','QueueCampaigns','Queues','filter','getRealtimeQueues','util','../../components/realtime/agents','../../components/realtime/queues','../../components/parsers/qs','../../errors/api','handleError','offset','limit','undefined','count','status','set','getChannels','query','globalQueueFilter','pauseTypeFilter','pause','resolve','then','channel','isValidChannel','format','Channel\x20parameter\x20%s\x20is\x20invalid','toLowerCase','sort','getUpdatedSortOptions','fields','join','order','getAgentIdsByQueues','rows','getSortedAgentsIdsByStatus','length','map','User','rawAttributes','fieldName','type','role','agent','getOptions','raw','push'];(function(_0x5ddaac,_0x2697a8){var _0x2a9c58=function(_0x851032){while(--_0x851032){_0x5ddaac['push'](_0x5ddaac['shift']());}};_0x2a9c58(++_0x2697a8);}(_0x4922,0x111));var _0x2492=function(_0x347541,_0x137cf){_0x347541=_0x347541-0x0;var _0x5c0e38=_0x4922[_0x347541];return _0x5c0e38;};'use strict';var _=require('lodash');var util=require(_0x2492('0x0'));var rta=require(_0x2492('0x1'));var rtq=require(_0x2492('0x2'));var qs=require(_0x2492('0x3'));var utils=require('../../config/utils');var db=require('../../mysqldb')['db'];var APIBadRequestError=require(_0x2492('0x4'))['APIBadRequestError'];var APIHandleError=require(_0x2492('0x4'))[_0x2492('0x5')];function respondWithFilteredResult(_0x121239,_0x2529d0){return function(_0x54c62a){if(_0x54c62a){var _0x1dcb0a=typeof _0x2529d0[_0x2492('0x6')]==='undefined'&&typeof _0x2529d0[_0x2492('0x7')]===_0x2492('0x8');var _0x4adc61=_0x54c62a[_0x2492('0x9')];var _0x25dd63=_0x1dcb0a?0x0:_0x2529d0[_0x2492('0x6')];var _0x56f686=_0x1dcb0a?_0x54c62a['count']:_0x2529d0[_0x2492('0x6')]+_0x2529d0[_0x2492('0x7')];var _0x57e170;if(_0x56f686>=_0x4adc61){_0x56f686=_0x4adc61;_0x57e170=0xc8;}else{_0x57e170=0xce;}_0x121239[_0x2492('0xa')](_0x57e170);return _0x121239[_0x2492('0xb')]('Content-Range',_0x25dd63+'-'+_0x56f686+'/'+_0x4adc61)['json'](_0x54c62a);}return null;};}exports['getAgents']=function(_0x3d1d96,_0x1005f0){var _0x4d3bd6={'count':0x0,'rows':[]};var _0x34c48c={};var _0x165bbe;var _0x14b4d8=utils[_0x2492('0xc')]();var _0x482241;var _0x59e668;var _0x5414e0=_0x3d1d96[_0x2492('0xd')][_0x2492('0xe')];var _0x48eda5=_0x3d1d96[_0x2492('0xd')]['globalStatusFilter'];var _0x459d43=_0x3d1d96[_0x2492('0xd')][_0x2492('0xf')];var _0x47e914=_0x48eda5===_0x2492('0x10')||_0x48eda5==='*pause'?!![]:![];var _0x21db92=[];var _0x54e826;var _0x605d0e;Promise[_0x2492('0x11')]()[_0x2492('0x12')](function(){if(_0x3d1d96[_0x2492('0xd')][_0x2492('0x13')]){if(!utils[_0x2492('0x14')](_0x3d1d96[_0x2492('0xd')][_0x2492('0x13')])){throw new APIBadRequestError(util[_0x2492('0x15')](_0x2492('0x16'),_0x3d1d96[_0x2492('0xd')][_0x2492('0x13')]));}_0x165bbe=_0x3d1d96[_0x2492('0xd')][_0x2492('0x13')][_0x2492('0x17')]();}if(!_0x3d1d96[_0x2492('0xd')][_0x2492('0x18')]||!_0x3d1d96['query']['sort']['includes']('globalStatus')){_0x3d1d96[_0x2492('0xd')][_0x2492('0x18')]=rta['validateSortParameter'](_0x3d1d96['query'][_0x2492('0x18')]);return;}var _0x3e71fb=rta[_0x2492('0x19')](_0x3d1d96[_0x2492('0xd')][_0x2492('0x18')]);_0x3d1d96[_0x2492('0xd')][_0x2492('0x18')]=_0x3e71fb[_0x2492('0x1a')][_0x2492('0x1b')](',');_0x54e826=_0x3e71fb[_0x2492('0x1c')];})['then'](function(){if(!_0x5414e0){return[];}return rta[_0x2492('0x1d')](_0x5414e0,_0x165bbe);})[_0x2492('0x12')](function(_0x2c13af){_0x21db92=_0x2c13af;return rta['getRealtimeAgents']();})['then'](function(_0x172725){_0x59e668=_0x172725[_0x2492('0x1e')];if((!_0x48eda5||_0x47e914)&&!_0x54e826){return _0x21db92;}if(_0x54e826&&!_0x48eda5){return rta[_0x2492('0x1f')](_0x59e668,_0x21db92,_0x54e826);}else{return rta['getAgentIdsByStatus'](_0x59e668,_0x21db92,_0x48eda5);}})['then'](function(_0x594b8d){_0x21db92=_0x594b8d;var _0x3279cb=![];if(_0x21db92[_0x2492('0x20')]===0x0){if(_0x5414e0||_0x48eda5){_0x3279cb=!![];}if(_0x47e914){_0x3279cb=![];}}if(_0x3279cb){return _0x4d3bd6;}var _0x4e2619=_[_0x2492('0x21')](db[_0x2492('0x22')][_0x2492('0x23')],function(_0x479530){return{'name':_0x479530[_0x2492('0x24')],'type':_0x479530[_0x2492('0x25')]['key']};});_0x3d1d96[_0x2492('0xd')][_0x2492('0x26')]=_0x2492('0x27');_0x34c48c=qs[_0x2492('0x28')](_0x4e2619,_0x3d1d96);_0x34c48c[_0x2492('0x29')]=!![];var _0x5748fb=[];if(_0x21db92[_0x2492('0x20')]>0x0){_0x5748fb[_0x2492('0x2a')]({'id':{'$in':_0x21db92}});if(_0x54e826&&!_0x48eda5){_0x605d0e=[db[_0x2492('0x2b')][_0x2492('0x2c')]('FIELD(id,'+_0x21db92+')')];_0x34c48c[_0x2492('0x1c')]=_0x605d0e;}}if(_0x47e914){_0x14b4d8[_0x2492('0x2d')](function(_0x241e07){var _0x2f73dc=!![];if(_0x48eda5===_0x2492('0x2e')&&_0x165bbe!==_0x241e07){_0x2f73dc=![];}_0x5748fb[_0x2492('0x2a')]({[_0x241e07+'Pause']:_0x2f73dc});});if(_0x459d43){_0x5748fb[_0x2492('0x2a')]({'pauseType':_0x459d43});}}else if(_0x48eda5){_0x14b4d8['forEach'](function(_0x104eec){_0x5748fb[_0x2492('0x2a')]({[_0x104eec+'Pause']:![]});});}_0x34c48c['where']=_[_0x2492('0x2f')](_0x34c48c[_0x2492('0x30')],{'$and':_0x5748fb});if(_0x3d1d96['user'][_0x2492('0x26')]===_0x2492('0x31')){var _0x527cf2={'params':{'id':_0x3d1d96[_0x2492('0x31')][_0x2492('0x32')]},'query':{'section':_0x2492('0x33'),'role':'agent','raw':!![],'ids':_0x21db92,'customSorting':_0x605d0e}};if(_0x3d1d96['query'][_0x2492('0x34')]){_0x527cf2[_0x2492('0xd')][_0x2492('0x34')]=!![];}if(_0x47e914){_0x527cf2[_0x2492('0xd')][_0x2492('0x35')]=_0x5748fb;}_0x527cf2[_0x2492('0xd')]=Object[_0x2492('0x36')](_0x527cf2[_0x2492('0xd')],_0x3d1d96[_0x2492('0xd')]);return db[_0x2492('0x37')][_0x2492('0x38')](_0x527cf2);}return db[_0x2492('0x22')][_0x2492('0x39')](_0x34c48c);})[_0x2492('0x12')](function(_0x1d637e){_0x4d3bd6[_0x2492('0x9')]=_0x1d637e[_0x2492('0x9')];_0x482241=_0x1d637e[_0x2492('0x1e')];return _0x482241[_0x2492('0x21')](function(_0x3131cf){var _0x5014cb=_[_0x2492('0x3a')](_0x59e668,['id',_0x3131cf['id']]);if(_0x5014cb){var _0x1dc2d2=rta[_0x2492('0x3b')](_0x5014cb);_[_0x2492('0x2f')](_0x3131cf,_0x1dc2d2);}_0x3131cf[_0x2492('0x3c')]=rta[_0x2492('0x3d')](_0x3131cf);if(_0x3131cf['globalStatus']['includes'](_0x2492('0x10'))){_0x14b4d8['forEach'](function(_0x2fd459){if(_0x3131cf[_0x2fd459+'Pause']){if(_0x2fd459==='voice'){if(_0x3131cf['voiceStatus']!==_0x2492('0x3e')){_0x3131cf['voiceStatus']=_0x2492('0x10');}}else{_0x3131cf[_0x2fd459+_0x2492('0x3f')]=_0x2492('0x10');}}});}return _0x3131cf;});})[_0x2492('0x12')](function(_0x1509a3){if(!_0x54e826||_0x605d0e){return _0x1509a3;}return rta['sortAgentsByStatus'](_0x1509a3,_0x54e826);})[_0x2492('0x12')](function(_0x7f56a6){var _0x291be9=rta[_0x2492('0x40')]();_0x4d3bd6['rows']=_0x7f56a6[_0x2492('0x21')](function(_0x5498a1){return _[_0x2492('0x41')](_0x5498a1,_0x291be9);});return _0x4d3bd6;})[_0x2492('0x12')](respondWithFilteredResult(_0x1005f0,_0x34c48c))[_0x2492('0x42')](APIHandleError(_0x1005f0));};exports[_0x2492('0x43')]=function(_0x3553d4,_0x317518){var _0x4cdc1d={'count':0x0,'rows':[]};var _0x304b4c={};var _0x157291;var _0x154c16;var _0x3842d5;Promise[_0x2492('0x11')]()[_0x2492('0x12')](function(){if(_0x3553d4[_0x2492('0xd')][_0x2492('0x13')]){if(!utils[_0x2492('0x14')](_0x3553d4['query']['channel'])){throw new APIBadRequestError(util[_0x2492('0x15')](_0x2492('0x16'),_0x3553d4['query'][_0x2492('0x13')]));}_0x157291=_0x3553d4['query']['channel'][_0x2492('0x17')]();}var _0x3e3097=_[_0x2492('0x44')](_0x157291)+_0x2492('0x45');var _0x3e90ae=_[_0x2492('0x21')](db[_0x3e3097][_0x2492('0x23')],function(_0x46d563){return{'name':_0x46d563[_0x2492('0x24')],'type':_0x46d563['type']['key']};});if(!_0x3553d4['query']['fields']){var _0x28e98a=['id',_0x2492('0x46')];if(_0x157291===_0x2492('0x47')){_0x28e98a[_0x2492('0x2a')](_0x2492('0x25'));if(_0x3553d4[_0x2492('0xd')]['type']===_0x2492('0x48')){_0x28e98a[_0x2492('0x2a')]([_0x2492('0x49'),_0x2492('0x4a')]);}}_0x3553d4[_0x2492('0xd')][_0x2492('0x1a')]=_0x28e98a[_0x2492('0x1b')](',');}_0x304b4c=qs[_0x2492('0x28')](_0x3e90ae,_0x3553d4);if(_0x3553d4[_0x2492('0x31')]['role']==='user'){var _0x1266ff={'params':{'id':_0x3553d4[_0x2492('0x31')][_0x2492('0x32')]},'query':{'section':_0x157291===_0x2492('0x47')&&_0x3553d4[_0x2492('0xd')]['type']===_0x2492('0x48')?_0x2492('0x4b'):_[_0x2492('0x44')](_0x157291)+_0x2492('0x4c'),'type':_0x3553d4[_0x2492('0xd')][_0x2492('0x25')],'nolimit':!![],'sort':_0x2492('0x46'),'filter':_0x3553d4[_0x2492('0xd')][_0x2492('0x4d')]}};_0x1266ff[_0x2492('0xd')]=Object['assign'](_0x1266ff['query'],_0x3553d4['query']);delete _0x1266ff['query']['id'];return db[_0x2492('0x37')][_0x2492('0x38')](_0x1266ff);}return db[_0x3e3097][_0x2492('0x39')](_0x304b4c);})[_0x2492('0x12')](function(_0x21bfd3){_0x4cdc1d[_0x2492('0x9')]=_0x21bfd3[_0x2492('0x9')];_0x154c16=_0x21bfd3['rows'];return rtq[_0x2492('0x4e')](_0x3553d4,_0x157291);})[_0x2492('0x12')](function(_0x1841f3){_0x3842d5=_0x1841f3[_0x2492('0x1e')];return rtq['initializeQueues'](_0x154c16,_0x3842d5,_0x157291,_0x3553d4['query'][_0x2492('0x25')]);})[_0x2492('0x12')](function(_0x3de1c2){_0x4cdc1d[_0x2492('0x1e')]=_0x3de1c2;return _0x4cdc1d;})[_0x2492('0x12')](respondWithFilteredResult(_0x317518,_0x304b4c))[_0x2492('0x42')](APIHandleError(_0x317518));};
\ No newline at end of file
+var _0xdf78=['globalStatusFilter','pauseTypeFilter','pause','*pause','resolve','channel','format','Channel\x20parameter\x20%s\x20is\x20invalid','toLowerCase','sort','includes','globalStatus','validateSortParameter','fields','join','getAgentIdsByQueues','then','rows','getSortedAgentsIdsByStatus','length','map','rawAttributes','fieldName','key','role','agent','raw','push','sequelize','order','forEach','Pause','where','merge','user','userProfileId','online','assign','omit','getResources','User','findAndCountAll','filterAgentAttributes','getAgentStatus','voiceStatus','talking','Status','sortAgentsByStatus','getRealtimeAgentsQueryFields','pick','startCase','type','name','voice','outbound','dialMethod','getOptions','QueueCampaigns','Queues','filter','UserProfile','initializeQueues','util','../../components/realtime/queues','../../components/parsers/qs','../../config/utils','../../mysqldb','../../errors/api','APIBadRequestError','offset','undefined','count','limit','status','set','Content-Range','json','getAgents','getChannels','query'];(function(_0x5b1394,_0x17f08d){var _0x483150=function(_0x1d9539){while(--_0x1d9539){_0x5b1394['push'](_0x5b1394['shift']());}};_0x483150(++_0x17f08d);}(_0xdf78,0x17e));var _0x8df7=function(_0x2f2b64,_0x37427c){_0x2f2b64=_0x2f2b64-0x0;var _0x42242d=_0xdf78[_0x2f2b64];return _0x42242d;};'use strict';var _=require('lodash');var util=require(_0x8df7('0x0'));var rta=require('../../components/realtime/agents');var rtq=require(_0x8df7('0x1'));var qs=require(_0x8df7('0x2'));var utils=require(_0x8df7('0x3'));var db=require(_0x8df7('0x4'))['db'];var APIBadRequestError=require(_0x8df7('0x5'))[_0x8df7('0x6')];var APIHandleError=require(_0x8df7('0x5'))['handleError'];function respondWithFilteredResult(_0x546c9e,_0x3b4f2c){return function(_0x501362){if(_0x501362){var _0x220da3=typeof _0x3b4f2c[_0x8df7('0x7')]===_0x8df7('0x8')&&typeof _0x3b4f2c['limit']===_0x8df7('0x8');var _0x44c080=_0x501362[_0x8df7('0x9')];var _0x1e8ea4=_0x220da3?0x0:_0x3b4f2c['offset'];var _0x477de1=_0x220da3?_0x501362[_0x8df7('0x9')]:_0x3b4f2c[_0x8df7('0x7')]+_0x3b4f2c[_0x8df7('0xa')];var _0x247299;if(_0x477de1>=_0x44c080){_0x477de1=_0x44c080;_0x247299=0xc8;}else{_0x247299=0xce;}_0x546c9e[_0x8df7('0xb')](_0x247299);return _0x546c9e[_0x8df7('0xc')](_0x8df7('0xd'),_0x1e8ea4+'-'+_0x477de1+'/'+_0x44c080)[_0x8df7('0xe')](_0x501362);}return null;};}exports[_0x8df7('0xf')]=function(_0x3bbefa,_0x17c7dc){var _0x78fe97={'count':0x0,'rows':[]};var _0x375bce={};var _0x49ed06;var _0x302f5b=utils[_0x8df7('0x10')]();var _0x5c6ffa;var _0x437427;var _0x2db041=_0x3bbefa[_0x8df7('0x11')]['globalQueueFilter'];var _0x62ed42=_0x3bbefa[_0x8df7('0x11')][_0x8df7('0x12')];var _0xc102ae=_0x3bbefa[_0x8df7('0x11')][_0x8df7('0x13')];var _0x5bd3f9=_0x62ed42===_0x8df7('0x14')||_0x62ed42===_0x8df7('0x15')?!![]:![];var _0x35ecea=[];var _0x55a391;var _0x4e42b1;Promise[_0x8df7('0x16')]()['then'](function(){if(_0x3bbefa[_0x8df7('0x11')][_0x8df7('0x17')]){if(!utils['isValidChannel'](_0x3bbefa[_0x8df7('0x11')][_0x8df7('0x17')])){throw new APIBadRequestError(util[_0x8df7('0x18')](_0x8df7('0x19'),_0x3bbefa[_0x8df7('0x11')]['channel']));}_0x49ed06=_0x3bbefa[_0x8df7('0x11')][_0x8df7('0x17')][_0x8df7('0x1a')]();}if(!_0x3bbefa['query'][_0x8df7('0x1b')]||!_0x3bbefa[_0x8df7('0x11')]['sort'][_0x8df7('0x1c')](_0x8df7('0x1d'))){_0x3bbefa['query'][_0x8df7('0x1b')]=rta[_0x8df7('0x1e')](_0x3bbefa[_0x8df7('0x11')]['sort']);return;}var _0x43f6b2=rta['getUpdatedSortOptions'](_0x3bbefa[_0x8df7('0x11')][_0x8df7('0x1b')]);_0x3bbefa[_0x8df7('0x11')]['sort']=_0x43f6b2[_0x8df7('0x1f')][_0x8df7('0x20')](',');_0x55a391=_0x43f6b2['order'];})['then'](function(){if(!_0x2db041){return[];}return rta[_0x8df7('0x21')](_0x2db041,_0x49ed06);})[_0x8df7('0x22')](function(_0x1b2261){_0x35ecea=_0x1b2261;return rta['getRealtimeAgents']();})[_0x8df7('0x22')](function(_0x1de26a){_0x437427=_0x1de26a[_0x8df7('0x23')];if((!_0x62ed42||_0x5bd3f9)&&!_0x55a391){return _0x35ecea;}if(_0x55a391&&!_0x62ed42){return rta[_0x8df7('0x24')](_0x437427,_0x35ecea,_0x55a391);}else{return rta['getAgentIdsByStatus'](_0x437427,_0x35ecea,_0x62ed42);}})[_0x8df7('0x22')](function(_0x11a65f){_0x35ecea=_0x11a65f;var _0x4431fe=![];if(_0x35ecea[_0x8df7('0x25')]===0x0){if(_0x2db041||_0x62ed42){_0x4431fe=!![];}if(_0x5bd3f9){_0x4431fe=![];}}if(_0x4431fe){return _0x78fe97;}var _0x25a822=_[_0x8df7('0x26')](db['User'][_0x8df7('0x27')],function(_0x2acc19){return{'name':_0x2acc19[_0x8df7('0x28')],'type':_0x2acc19['type'][_0x8df7('0x29')]};});_0x3bbefa['query'][_0x8df7('0x2a')]=_0x8df7('0x2b');_0x375bce=qs['getOptions'](_0x25a822,_0x3bbefa);_0x375bce[_0x8df7('0x2c')]=!![];var _0x2af7a0=[];if(_0x35ecea['length']>0x0){_0x2af7a0[_0x8df7('0x2d')]({'id':{'$in':_0x35ecea}});if(_0x55a391&&!_0x62ed42){_0x4e42b1=[db[_0x8df7('0x2e')]['literal']('FIELD(id,'+_0x35ecea+')')];_0x375bce[_0x8df7('0x2f')]=_0x4e42b1;}}if(_0x5bd3f9){_0x302f5b[_0x8df7('0x30')](function(_0x15dfbe){var _0x3a1fe2=!![];if(_0x62ed42==='*pause'&&_0x49ed06!==_0x15dfbe){_0x3a1fe2=![];}_0x2af7a0[_0x8df7('0x2d')]({[_0x15dfbe+_0x8df7('0x31')]:_0x3a1fe2});});if(_0xc102ae){_0x2af7a0[_0x8df7('0x2d')]({'pauseType':_0xc102ae});}}else if(_0x62ed42){_0x302f5b[_0x8df7('0x30')](function(_0x1fcef9){_0x2af7a0[_0x8df7('0x2d')]({[_0x1fcef9+_0x8df7('0x31')]:![]});});}_0x375bce[_0x8df7('0x32')]=_[_0x8df7('0x33')](_0x375bce['where'],{'$and':_0x2af7a0});if(_0x3bbefa['user'][_0x8df7('0x2a')]==='user'){var _0x147d10={'params':{'id':_0x3bbefa[_0x8df7('0x34')][_0x8df7('0x35')]},'query':{'section':'Agents','role':_0x8df7('0x2b'),'raw':!![],'ids':_0x35ecea,'customSorting':_0x4e42b1}};if(_0x3bbefa[_0x8df7('0x11')][_0x8df7('0x36')]){_0x147d10[_0x8df7('0x11')][_0x8df7('0x36')]=!![];}if(_0x5bd3f9){_0x147d10[_0x8df7('0x11')]['extraQueryConditions']=_0x2af7a0;}_0x147d10['query']=Object[_0x8df7('0x37')](_0x147d10['query'],_[_0x8df7('0x38')](_0x3bbefa['query'],'id'));return db['UserProfile'][_0x8df7('0x39')](_0x147d10);}return db[_0x8df7('0x3a')][_0x8df7('0x3b')](_0x375bce);})[_0x8df7('0x22')](function(_0x4c8e40){_0x78fe97[_0x8df7('0x9')]=_0x4c8e40[_0x8df7('0x9')];_0x5c6ffa=_0x4c8e40[_0x8df7('0x23')];return _0x5c6ffa[_0x8df7('0x26')](function(_0x49277c){var _0x266ce5=_['find'](_0x437427,['id',_0x49277c['id']]);if(_0x266ce5){var _0x2dc98a=rta[_0x8df7('0x3c')](_0x266ce5);_[_0x8df7('0x33')](_0x49277c,_0x2dc98a);}_0x49277c[_0x8df7('0x1d')]=rta[_0x8df7('0x3d')](_0x49277c);if(_0x49277c[_0x8df7('0x1d')][_0x8df7('0x1c')]('pause')){_0x302f5b['forEach'](function(_0x260784){if(_0x49277c[_0x260784+_0x8df7('0x31')]){if(_0x260784==='voice'){if(_0x49277c[_0x8df7('0x3e')]!==_0x8df7('0x3f')){_0x49277c[_0x8df7('0x3e')]=_0x8df7('0x14');}}else{_0x49277c[_0x260784+_0x8df7('0x40')]='pause';}}});}return _0x49277c;});})[_0x8df7('0x22')](function(_0x3de967){if(!_0x55a391||_0x4e42b1){return _0x3de967;}return rta[_0x8df7('0x41')](_0x3de967,_0x55a391);})[_0x8df7('0x22')](function(_0x3ea408){var _0x1ea21c=rta[_0x8df7('0x42')]();_0x78fe97[_0x8df7('0x23')]=_0x3ea408[_0x8df7('0x26')](function(_0x200138){return _[_0x8df7('0x43')](_0x200138,_0x1ea21c);});return _0x78fe97;})['then'](respondWithFilteredResult(_0x17c7dc,_0x375bce))['catch'](APIHandleError(_0x17c7dc));};exports['getQueues']=function(_0x21156a,_0x24e4b9){var _0x243040={'count':0x0,'rows':[]};var _0x1da8ba={};var _0x46be2d;var _0x33ca8c;var _0x2792e9;Promise[_0x8df7('0x16')]()[_0x8df7('0x22')](function(){if(_0x21156a[_0x8df7('0x11')][_0x8df7('0x17')]){if(!utils['isValidChannel'](_0x21156a[_0x8df7('0x11')][_0x8df7('0x17')])){throw new APIBadRequestError(util[_0x8df7('0x18')]('Channel\x20parameter\x20%s\x20is\x20invalid',_0x21156a[_0x8df7('0x11')][_0x8df7('0x17')]));}_0x46be2d=_0x21156a[_0x8df7('0x11')]['channel'][_0x8df7('0x1a')]();}var _0x5e31b9=_[_0x8df7('0x44')](_0x46be2d)+'Queue';var _0x3be5c6=_['map'](db[_0x5e31b9][_0x8df7('0x27')],function(_0x2606ac){return{'name':_0x2606ac[_0x8df7('0x28')],'type':_0x2606ac[_0x8df7('0x45')][_0x8df7('0x29')]};});if(!_0x21156a[_0x8df7('0x11')][_0x8df7('0x1f')]){var _0x39378d=['id',_0x8df7('0x46')];if(_0x46be2d===_0x8df7('0x47')){_0x39378d[_0x8df7('0x2d')](_0x8df7('0x45'));if(_0x21156a[_0x8df7('0x11')][_0x8df7('0x45')]===_0x8df7('0x48')){_0x39378d[_0x8df7('0x2d')](['dialActive',_0x8df7('0x49')]);}}_0x21156a[_0x8df7('0x11')][_0x8df7('0x1f')]=_0x39378d['join'](',');}_0x1da8ba=qs[_0x8df7('0x4a')](_0x3be5c6,_0x21156a);if(_0x21156a[_0x8df7('0x34')][_0x8df7('0x2a')]===_0x8df7('0x34')){var _0x3d7095={'params':{'id':_0x21156a[_0x8df7('0x34')][_0x8df7('0x35')]},'query':{'section':_0x46be2d===_0x8df7('0x47')&&_0x21156a[_0x8df7('0x11')][_0x8df7('0x45')]===_0x8df7('0x48')?_0x8df7('0x4b'):_[_0x8df7('0x44')](_0x46be2d)+_0x8df7('0x4c'),'type':_0x21156a['query'][_0x8df7('0x45')],'nolimit':!![],'sort':_0x8df7('0x46'),'filter':_0x21156a['query'][_0x8df7('0x4d')]}};_0x3d7095['query']=Object['assign'](_0x3d7095[_0x8df7('0x11')],_0x21156a[_0x8df7('0x11')]);delete _0x3d7095[_0x8df7('0x11')]['id'];return db[_0x8df7('0x4e')]['getResources'](_0x3d7095);}return db[_0x5e31b9][_0x8df7('0x3b')](_0x1da8ba);})['then'](function(_0x2c10e1){_0x243040['count']=_0x2c10e1[_0x8df7('0x9')];_0x33ca8c=_0x2c10e1['rows'];return rtq['getRealtimeQueues'](_0x21156a,_0x46be2d);})[_0x8df7('0x22')](function(_0x4c833a){_0x2792e9=_0x4c833a[_0x8df7('0x23')];return rtq[_0x8df7('0x4f')](_0x33ca8c,_0x2792e9,_0x46be2d,_0x21156a[_0x8df7('0x11')][_0x8df7('0x45')]);})[_0x8df7('0x22')](function(_0x2288a4){_0x243040['rows']=_0x2288a4;return _0x243040;})[_0x8df7('0x22')](respondWithFilteredResult(_0x24e4b9,_0x1da8ba))['catch'](APIHandleError(_0x24e4b9));};
\ No newline at end of file
index 1667cf8..623a555 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(_0x20a938,_0x2a7f99){var _0x43f26b=function(_0x44a378){while(--_0x44a378){_0x20a938['push'](_0x20a938['shift']());}};_0x43f26b(++_0x2a7f99);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x28aea5,_0x3bb12e){_0x28aea5=_0x28aea5-0x0;var _0x6a55f9=_0xcb91[_0x28aea5];return _0x6a55f9;};'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 _0x0713=['../../config/environment','exports','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service'];(function(_0x5294c2,_0x3d0fe6){var _0x3d1eac=function(_0x407db6){while(--_0x407db6){_0x5294c2['push'](_0x5294c2['shift']());}};_0x3d1eac(++_0x3d0fe6);}(_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 cd73a92..444ea0d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xab3f=['STRING','DATE','sequelize','INTEGER'];(function(_0xa651d4,_0x5df6cb){var _0x1301be=function(_0x5aa409){while(--_0x5aa409){_0xa651d4['push'](_0xa651d4['shift']());}};_0x1301be(++_0x5df6cb);}(_0xab3f,0x72));var _0xfab3=function(_0x1454bb,_0x2b6dc6){_0x1454bb=_0x1454bb-0x0;var _0x1cf1f0=_0xab3f[_0x1454bb];return _0x1cf1f0;};'use strict';var Sequelize=require(_0xfab3('0x0'));module['exports']={'state':{'type':Sequelize[_0xfab3('0x1')](0x2)},'statedesc':{'type':Sequelize[_0xfab3('0x2')]},'scheduledat':{'type':Sequelize[_0xfab3('0x3')]},'uniqueid':{'type':Sequelize[_0xfab3('0x2')]},'starttime':{'type':Sequelize[_0xfab3('0x3')]},'responsetime':{'type':Sequelize[_0xfab3('0x3')]},'ringtime':{'type':Sequelize[_0xfab3('0x1')],'defaultValue':0x0},'campaign':{'type':Sequelize[_0xfab3('0x2')]},'campaigntype':{'type':Sequelize[_0xfab3('0x2')]},'membername':{'type':Sequelize[_0xfab3('0x2')]}};
\ No newline at end of file
+var _0x8ac9=['exports','INTEGER','STRING','DATE','sequelize'];(function(_0x4f0e68,_0x211f12){var _0x5d2d17=function(_0x60fda8){while(--_0x60fda8){_0x4f0e68['push'](_0x4f0e68['shift']());}};_0x5d2d17(++_0x211f12);}(_0x8ac9,0x199));var _0x98ac=function(_0x24697f,_0x19c823){_0x24697f=_0x24697f-0x0;var _0x1e4243=_0x8ac9[_0x24697f];return _0x1e4243;};'use strict';var Sequelize=require(_0x98ac('0x0'));module[_0x98ac('0x1')]={'state':{'type':Sequelize[_0x98ac('0x2')](0x2)},'statedesc':{'type':Sequelize['STRING']},'scheduledat':{'type':Sequelize['DATE']},'uniqueid':{'type':Sequelize[_0x98ac('0x3')]},'starttime':{'type':Sequelize[_0x98ac('0x4')]},'responsetime':{'type':Sequelize[_0x98ac('0x4')]},'ringtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'campaign':{'type':Sequelize['STRING']},'campaigntype':{'type':Sequelize[_0x98ac('0x3')]},'membername':{'type':Sequelize[_0x98ac('0x3')]}};
\ No newline at end of file
index 7fe1b71..1574269 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe914=['report_agent_preview','lodash','util','../../config/logger','path','rimraf','../../config/environment','exports','define','ReportAgentPreview'];(function(_0x327c6c,_0x1c578e){var _0x276ccd=function(_0x42b66f){while(--_0x42b66f){_0x327c6c['push'](_0x327c6c['shift']());}};_0x276ccd(++_0x1c578e);}(_0xe914,0x1d7));var _0x4e91=function(_0x1ace72,_0x274a09){_0x1ace72=_0x1ace72-0x0;var _0x38e16e=_0xe914[_0x1ace72];return _0x38e16e;};'use strict';var _=require(_0x4e91('0x0'));var util=require(_0x4e91('0x1'));var logger=require(_0x4e91('0x2'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x4e91('0x3'));var rimraf=require(_0x4e91('0x4'));var config=require(_0x4e91('0x5'));var attributes=require('./reportAgentPreview.attributes');module[_0x4e91('0x6')]=function(_0x4d0390,_0x1ccf0c){return _0x4d0390[_0x4e91('0x7')](_0x4e91('0x8'),attributes,{'tableName':_0x4e91('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xcf4d=['request-promise','path','rimraf','../../config/environment','exports','ReportAgentPreview','report_agent_preview','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x57aa59,_0x45a587){var _0xaac506=function(_0x5b9ef4){while(--_0x5b9ef4){_0x57aa59['push'](_0x57aa59['shift']());}};_0xaac506(++_0x45a587);}(_0xcf4d,0xe4));var _0xdcf4=function(_0x4d631f,_0x1ef8d6){_0x4d631f=_0x4d631f-0x0;var _0x5cb5c8=_0xcf4d[_0x4d631f];return _0x5cb5c8;};'use strict';var _=require(_0xdcf4('0x0'));var util=require(_0xdcf4('0x1'));var logger=require(_0xdcf4('0x2'))(_0xdcf4('0x3'));var moment=require(_0xdcf4('0x4'));var BPromise=require(_0xdcf4('0x5'));var rp=require(_0xdcf4('0x6'));var fs=require('fs');var path=require(_0xdcf4('0x7'));var rimraf=require(_0xdcf4('0x8'));var config=require(_0xdcf4('0x9'));var attributes=require('./reportAgentPreview.attributes');module[_0xdcf4('0xa')]=function(_0x111705,_0x5a2384){return _0x111705['define'](_0xdcf4('0xb'),attributes,{'tableName':_0xdcf4('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index eaeb3cd..b4a1d03 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe47c=['CreateReportAgentPreview','ReportAgentPreview','create','body','options','raw','lodash','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','info','debug','ReportAgentPreview,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','ReportAgentPreview,\x20%s,\x20%s'];(function(_0x31ff15,_0x98116d){var _0x1435e2=function(_0x8764b7){while(--_0x8764b7){_0x31ff15['push'](_0x31ff15['shift']());}};_0x1435e2(++_0x98116d);}(_0xe47c,0x97));var _0xce47=function(_0x41ceb5,_0x30a19a){_0x41ceb5=_0x41ceb5-0x0;var _0xc3e44f=_0xe47c[_0x41ceb5];return _0xc3e44f;};'use strict';var _=require(_0xce47('0x0'));var util=require(_0xce47('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xce47('0x2'));var fs=require('fs');var Redis=require(_0xce47('0x3'));var db=require(_0xce47('0x4'))['db'];var utils=require(_0xce47('0x5'));var logger=require(_0xce47('0x6'))(_0xce47('0x7'));var config=require(_0xce47('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xce47('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x45c837,_0x341ba9,_0x1e3241){return new BPromise(function(_0x3651fd,_0x2df39f){return client[_0xce47('0xa')](_0x45c837,_0x1e3241)[_0xce47('0xb')](function(_0x291e8a){logger[_0xce47('0xc')]('ReportAgentPreview,\x20%s,\x20%s',_0x341ba9,'request\x20sent');logger[_0xce47('0xd')](_0xce47('0xe'),_0x341ba9,_0xce47('0xf'),JSON[_0xce47('0x10')](_0x291e8a));if(_0x291e8a['error']){if(_0x291e8a[_0xce47('0x11')][_0xce47('0x12')]===0x1f4){logger[_0xce47('0x11')]('ReportAgentPreview,\x20%s,\x20%s',_0x341ba9,_0x291e8a['error']['message']);return _0x2df39f(_0x291e8a[_0xce47('0x11')][_0xce47('0x13')]);}logger['error']('ReportAgentPreview,\x20%s,\x20%s',_0x341ba9,_0x291e8a[_0xce47('0x11')][_0xce47('0x13')]);return _0x3651fd(_0x291e8a['error'][_0xce47('0x13')]);}else{logger[_0xce47('0xc')]('ReportAgentPreview,\x20%s,\x20%s',_0x341ba9,'request\x20sent');_0x3651fd(_0x291e8a[_0xce47('0x14')][_0xce47('0x13')]);}})[_0xce47('0x15')](function(_0x2f31dc){logger['error'](_0xce47('0x16'),_0x341ba9,_0x2f31dc);_0x2df39f(_0x2f31dc);});});}exports[_0xce47('0x17')]=function(_0x297857){var _0x53c6e2=this;return new Promise(function(_0x1369b2,_0x3cb717){return db[_0xce47('0x18')][_0xce47('0x19')](_0x297857[_0xce47('0x1a')],{'raw':_0x297857[_0xce47('0x1b')]?_0x297857[_0xce47('0x1b')][_0xce47('0x1c')]===undefined?!![]:![]:!![]})['then'](function(_0x1b5dc5){logger[_0xce47('0xc')](_0xce47('0x17'),_0x297857);logger[_0xce47('0xd')](_0xce47('0x17'),_0x297857,JSON[_0xce47('0x10')](_0x1b5dc5));_0x1369b2(_0x1b5dc5);})['catch'](function(_0x5ee9ed){logger[_0xce47('0x11')]('CreateReportAgentPreview',_0x5ee9ed[_0xce47('0x13')],_0x297857);_0x3cb717(_0x53c6e2[_0xce47('0x11')](0x1f4,_0x5ee9ed['message']));});});};
\ No newline at end of file
+var _0x0f20=['util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','ReportAgentPreview,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','catch','CreateReportAgentPreview','create','body','options','raw'];(function(_0x5b47d9,_0x1327ce){var _0x4151f0=function(_0x24bda2){while(--_0x24bda2){_0x5b47d9['push'](_0x5b47d9['shift']());}};_0x4151f0(++_0x1327ce);}(_0x0f20,0x195));var _0x00f2=function(_0x3559bc,_0x4921b7){_0x3559bc=_0x3559bc-0x0;var _0x561294=_0x0f20[_0x3559bc];return _0x561294;};'use strict';var _=require('lodash');var util=require(_0x00f2('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x00f2('0x1'));var fs=require('fs');var Redis=require(_0x00f2('0x2'));var db=require(_0x00f2('0x3'))['db'];var utils=require(_0x00f2('0x4'));var logger=require(_0x00f2('0x5'))('rpc');var config=require(_0x00f2('0x6'));var jayson=require(_0x00f2('0x7'));var client=jayson[_0x00f2('0x8')][_0x00f2('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2b4ae7,_0xfd593b,_0x118d62){return new BPromise(function(_0x103f31,_0x2ee8f4){return client[_0x00f2('0xa')](_0x2b4ae7,_0x118d62)[_0x00f2('0xb')](function(_0x1723bc){logger[_0x00f2('0xc')](_0x00f2('0xd'),_0xfd593b,'request\x20sent');logger[_0x00f2('0xe')]('ReportAgentPreview,\x20%s,\x20%s,\x20%s',_0xfd593b,_0x00f2('0xf'),JSON[_0x00f2('0x10')](_0x1723bc));if(_0x1723bc[_0x00f2('0x11')]){if(_0x1723bc[_0x00f2('0x11')][_0x00f2('0x12')]===0x1f4){logger[_0x00f2('0x11')](_0x00f2('0xd'),_0xfd593b,_0x1723bc['error']['message']);return _0x2ee8f4(_0x1723bc['error'][_0x00f2('0x13')]);}logger[_0x00f2('0x11')](_0x00f2('0xd'),_0xfd593b,_0x1723bc[_0x00f2('0x11')]['message']);return _0x103f31(_0x1723bc[_0x00f2('0x11')][_0x00f2('0x13')]);}else{logger['info'](_0x00f2('0xd'),_0xfd593b,_0x00f2('0xf'));_0x103f31(_0x1723bc[_0x00f2('0x14')]['message']);}})[_0x00f2('0x15')](function(_0x5ac4e8){logger[_0x00f2('0x11')](_0x00f2('0xd'),_0xfd593b,_0x5ac4e8);_0x2ee8f4(_0x5ac4e8);});});}exports[_0x00f2('0x16')]=function(_0x1e5c97){var _0x39c69f=this;return new Promise(function(_0x36ecbb,_0x4820ad){return db['ReportAgentPreview'][_0x00f2('0x17')](_0x1e5c97[_0x00f2('0x18')],{'raw':_0x1e5c97[_0x00f2('0x19')]?_0x1e5c97[_0x00f2('0x19')][_0x00f2('0x1a')]===undefined?!![]:![]:!![]})[_0x00f2('0xb')](function(_0x2bfa25){logger[_0x00f2('0xc')](_0x00f2('0x16'),_0x1e5c97);logger[_0x00f2('0xe')]('CreateReportAgentPreview',_0x1e5c97,JSON[_0x00f2('0x10')](_0x2bfa25));_0x36ecbb(_0x2bfa25);})[_0x00f2('0x15')](function(_0x3ab6d8){logger[_0x00f2('0x11')](_0x00f2('0x16'),_0x3ab6d8[_0x00f2('0x13')],_0x1e5c97);_0x4820ad(_0x39c69f[_0x00f2('0x11')](0x1f4,_0x3ab6d8[_0x00f2('0x13')]));});});};
\ No newline at end of file
index 52e72ad..a71cf07 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5c01=['/mail/queues','mailQueues','/mail/accounts','mailAccounts','/openchannel/queues','smsQueues','/whatsapp/queues','/fax/queues','/voice/queues/preview/:id','voiceQueuesPreview','/voice/queues/channels','voiceQueuesChannels','voiceQueuesChannel','/voice/queues/channels/:uniqueid/hangup','voiceQueuesChannelHangup','/voice/queues/channels/:uniqueid/redirect/:exten','voiceQueuesChannelRedirect','/voice/queues/:id','showVoiceQueues','put','/outbound','outbound','/outbound/channels','outboundChannels','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','/sms/queues/waitinginteractions','smsQueuesWaitingInteractions','/whatsapp/queues/waitinginteractions','whatsappQueuesWaitingInteractions','/fax/queues/waitinginteractions','post','queueNotify','mail','showMailQueues','/chat/queues/:id/notify','chat','fax','/fax/queues/:id','/openchannel/queues/:id/notify','openchannel','showOpenchannelQueues','/sms/queues/:id/notify','/whatsapp/queues/:id/notify','whatsapp','/sms/queues/:id','showSmsQueues','/whatsapp/queues/:id','showWhatsappQueues','/agents/:id/notify','agentNotify','exports','multer','util','path','express','../../components/auth/service','./rpc.controller','get','isAuthenticated','voiceChannelMixMonitor','/voice/channels/:uniqueid/stopmixmonitor','voiceChannelStopMixMonitor','/voice/queues','voiceQueues','/chat/queues','chatQueues'];(function(_0x5d2803,_0xf375bd){var _0xdcad2c=function(_0x3c3a98){while(--_0x3c3a98){_0x5d2803['push'](_0x5d2803['shift']());}};_0xdcad2c(++_0xf375bd);}(_0x5c01,0x135));var _0x15c0=function(_0x63db28,_0x630301){_0x63db28=_0x63db28-0x0;var _0x3b91d0=_0x5c01[_0x63db28];return _0x3b91d0;};'use strict';var multer=require(_0x15c0('0x0'));var util=require(_0x15c0('0x1'));var path=require(_0x15c0('0x2'));var express=require(_0x15c0('0x3'));var router=express['Router']();var auth=require(_0x15c0('0x4'));var controller=require(_0x15c0('0x5'));router[_0x15c0('0x6')]('/voice/channels',auth['isAuthenticated'](),controller['voiceChannels']);router[_0x15c0('0x6')]('/voice/channels/:uniqueid/mixmonitor',auth[_0x15c0('0x7')](),controller[_0x15c0('0x8')]);router[_0x15c0('0x6')](_0x15c0('0x9'),auth[_0x15c0('0x7')](),controller[_0x15c0('0xa')]);router[_0x15c0('0x6')](_0x15c0('0xb'),auth[_0x15c0('0x7')](),controller[_0x15c0('0xc')]);router[_0x15c0('0x6')](_0x15c0('0xd'),auth['isAuthenticated'](),controller[_0x15c0('0xe')]);router[_0x15c0('0x6')](_0x15c0('0xf'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x10')]);router[_0x15c0('0x6')](_0x15c0('0x11'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x12')]);router[_0x15c0('0x6')](_0x15c0('0x13'),auth[_0x15c0('0x7')](),controller['openchannelQueues']);router[_0x15c0('0x6')]('/sms/queues',auth[_0x15c0('0x7')](),controller[_0x15c0('0x14')]);router[_0x15c0('0x6')](_0x15c0('0x15'),auth[_0x15c0('0x7')](),controller['whatsappQueues']);router[_0x15c0('0x6')](_0x15c0('0x16'),auth[_0x15c0('0x7')](),controller['faxQueues']);router[_0x15c0('0x6')](_0x15c0('0x17'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x18')]);router[_0x15c0('0x6')](_0x15c0('0x19'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x1a')]);router[_0x15c0('0x6')]('/voice/queues/channels/:uniqueid',auth[_0x15c0('0x7')](),controller[_0x15c0('0x1b')]);router['get'](_0x15c0('0x1c'),auth['isAuthenticated'](),controller[_0x15c0('0x1d')]);router[_0x15c0('0x6')](_0x15c0('0x1e'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x1f')]);router['get'](_0x15c0('0x20'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x21')]);router[_0x15c0('0x22')](_0x15c0('0x20'),auth[_0x15c0('0x7')](),controller['updateVoiceQueue']);router[_0x15c0('0x6')](_0x15c0('0x23'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x24')]);router['get'](_0x15c0('0x25'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x26')]);router[_0x15c0('0x6')]('/agents',auth['isAuthenticated'](),controller[_0x15c0('0x27')]);router['put'](_0x15c0('0x28'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x29')]);router[_0x15c0('0x6')](_0x15c0('0x2a'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x2b')]);router[_0x15c0('0x6')]('/trunks',auth[_0x15c0('0x7')](),controller[_0x15c0('0x2c')]);router['get'](_0x15c0('0x2d'),auth[_0x15c0('0x7')](),controller['campaigns']);router['get'](_0x15c0('0x2e'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x2f')]);router['get'](_0x15c0('0x30'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x31')]);router['get'](_0x15c0('0x32'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x33')]);router['get'](_0x15c0('0x34'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x35')]);router[_0x15c0('0x6')](_0x15c0('0x36'),auth[_0x15c0('0x7')](),controller['openchannelQueuesIdWaitingInteractions']);router[_0x15c0('0x6')](_0x15c0('0x37'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x38')]);router[_0x15c0('0x6')](_0x15c0('0x39'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x3a')]);router[_0x15c0('0x6')](_0x15c0('0x3b'),auth[_0x15c0('0x7')](),controller['faxQueuesWaitingInteractions']);router[_0x15c0('0x3c')]('/mail/queues/:id/notify',auth[_0x15c0('0x7')](),controller[_0x15c0('0x3d')](_0x15c0('0x3e')));router[_0x15c0('0x6')]('/mail/queues/:id',auth[_0x15c0('0x7')](),controller[_0x15c0('0x3f')]);router[_0x15c0('0x3c')](_0x15c0('0x40'),auth['isAuthenticated'](),controller[_0x15c0('0x3d')](_0x15c0('0x41')));router[_0x15c0('0x6')]('/chat/queues/:id',auth[_0x15c0('0x7')](),controller['showChatQueues']);router[_0x15c0('0x3c')]('/fax/queues/:id/notify',auth[_0x15c0('0x7')](),controller[_0x15c0('0x3d')](_0x15c0('0x42')));router[_0x15c0('0x6')](_0x15c0('0x43'),auth[_0x15c0('0x7')](),controller['showFaxQueues']);router[_0x15c0('0x3c')](_0x15c0('0x44'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x3d')](_0x15c0('0x45')));router[_0x15c0('0x6')]('/openchannel/queues/:id',auth[_0x15c0('0x7')](),controller[_0x15c0('0x46')]);router['post'](_0x15c0('0x47'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x3d')]('sms'));router[_0x15c0('0x3c')](_0x15c0('0x48'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x3d')](_0x15c0('0x49')));router[_0x15c0('0x6')](_0x15c0('0x4a'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x4b')]);router[_0x15c0('0x6')](_0x15c0('0x4c'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x4d')]);router[_0x15c0('0x3c')](_0x15c0('0x4e'),auth[_0x15c0('0x7')](),controller[_0x15c0('0x4f')]);module[_0x15c0('0x50')]=router;
\ No newline at end of file
+var _0xb31b=['/agents/:id/notify','agentNotify','exports','multer','util','path','Router','../../components/auth/service','./rpc.controller','get','/voice/channels','voiceChannels','isAuthenticated','/voice/channels/:uniqueid/stopmixmonitor','voiceChannelStopMixMonitor','/voice/queues','voiceQueues','/chat/queues','chatQueues','/mail/queues','/mail/accounts','mailAccounts','/openchannel/queues','openchannelQueues','/sms/queues','/fax/queues','faxQueues','/voice/queues/preview/:id','voiceQueuesPreview','/voice/queues/channels','voiceQueuesChannels','/voice/queues/channels/:uniqueid','/voice/queues/channels/:uniqueid/hangup','voiceQueuesChannelHangup','/voice/queues/channels/:uniqueid/redirect/:exten','voiceQueuesChannelRedirect','/voice/queues/:id','showVoiceQueues','outbound','/outbound/channels','outboundChannels','/agents','agents','put','/agents/:id/capacity','agentCapacity','/telephones','telephones','/campaigns','campaigns','/chat/queues/waitinginteractions','chatQueuesWaitingInteractions','/openchannel/queues/waitinginteractions','/openchannel/queues/:id/waitinginteractions','/sms/queues/waitinginteractions','whatsappQueuesWaitingInteractions','/fax/queues/waitinginteractions','post','/mail/queues/:id/notify','queueNotify','mail','showMailQueues','/chat/queues/:id','showChatQueues','/fax/queues/:id/notify','fax','/fax/queues/:id','showFaxQueues','/openchannel/queues/:id/notify','openchannel','/openchannel/queues/:id','showOpenchannelQueues','/sms/queues/:id/notify','sms','/sms/queues/:id','showSmsQueues','/whatsapp/queues/:id','showWhatsappQueues'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0xb31b,0x9f));var _0xbb31=function(_0x3c5379,_0x4eff18){_0x3c5379=_0x3c5379-0x0;var _0x1442a9=_0xb31b[_0x3c5379];return _0x1442a9;};'use strict';var multer=require(_0xbb31('0x0'));var util=require(_0xbb31('0x1'));var path=require(_0xbb31('0x2'));var express=require('express');var router=express[_0xbb31('0x3')]();var auth=require(_0xbb31('0x4'));var controller=require(_0xbb31('0x5'));router[_0xbb31('0x6')](_0xbb31('0x7'),auth['isAuthenticated'](),controller[_0xbb31('0x8')]);router[_0xbb31('0x6')]('/voice/channels/:uniqueid/mixmonitor',auth[_0xbb31('0x9')](),controller['voiceChannelMixMonitor']);router['get'](_0xbb31('0xa'),auth[_0xbb31('0x9')](),controller[_0xbb31('0xb')]);router[_0xbb31('0x6')](_0xbb31('0xc'),auth[_0xbb31('0x9')](),controller[_0xbb31('0xd')]);router[_0xbb31('0x6')](_0xbb31('0xe'),auth[_0xbb31('0x9')](),controller[_0xbb31('0xf')]);router[_0xbb31('0x6')](_0xbb31('0x10'),auth['isAuthenticated'](),controller['mailQueues']);router[_0xbb31('0x6')](_0xbb31('0x11'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x12')]);router['get'](_0xbb31('0x13'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x14')]);router[_0xbb31('0x6')](_0xbb31('0x15'),auth[_0xbb31('0x9')](),controller['smsQueues']);router[_0xbb31('0x6')]('/whatsapp/queues',auth[_0xbb31('0x9')](),controller['whatsappQueues']);router['get'](_0xbb31('0x16'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x17')]);router[_0xbb31('0x6')](_0xbb31('0x18'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x19')]);router[_0xbb31('0x6')](_0xbb31('0x1a'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x1b')]);router[_0xbb31('0x6')](_0xbb31('0x1c'),auth[_0xbb31('0x9')](),controller['voiceQueuesChannel']);router[_0xbb31('0x6')](_0xbb31('0x1d'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x1e')]);router[_0xbb31('0x6')](_0xbb31('0x1f'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x20')]);router[_0xbb31('0x6')](_0xbb31('0x21'),auth['isAuthenticated'](),controller[_0xbb31('0x22')]);router['put'](_0xbb31('0x21'),auth[_0xbb31('0x9')](),controller['updateVoiceQueue']);router[_0xbb31('0x6')]('/outbound',auth[_0xbb31('0x9')](),controller[_0xbb31('0x23')]);router['get'](_0xbb31('0x24'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x25')]);router[_0xbb31('0x6')](_0xbb31('0x26'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x27')]);router[_0xbb31('0x28')](_0xbb31('0x29'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x2a')]);router[_0xbb31('0x6')](_0xbb31('0x2b'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x2c')]);router[_0xbb31('0x6')]('/trunks',auth[_0xbb31('0x9')](),controller['trunks']);router[_0xbb31('0x6')](_0xbb31('0x2d'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x2e')]);router[_0xbb31('0x6')]('/fax/accounts',auth[_0xbb31('0x9')](),controller['faxAccounts']);router[_0xbb31('0x6')](_0xbb31('0x2f'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x30')]);router[_0xbb31('0x6')]('/mail/queues/waitinginteractions',auth[_0xbb31('0x9')](),controller['mailQueuesWaitingInteractions']);router['get'](_0xbb31('0x31'),auth[_0xbb31('0x9')](),controller['openchannelQueuesWaitingInteractions']);router['get'](_0xbb31('0x32'),auth['isAuthenticated'](),controller['openchannelQueuesIdWaitingInteractions']);router['get'](_0xbb31('0x33'),auth[_0xbb31('0x9')](),controller['smsQueuesWaitingInteractions']);router[_0xbb31('0x6')]('/whatsapp/queues/waitinginteractions',auth[_0xbb31('0x9')](),controller[_0xbb31('0x34')]);router[_0xbb31('0x6')](_0xbb31('0x35'),auth[_0xbb31('0x9')](),controller['faxQueuesWaitingInteractions']);router[_0xbb31('0x36')](_0xbb31('0x37'),auth['isAuthenticated'](),controller[_0xbb31('0x38')](_0xbb31('0x39')));router[_0xbb31('0x6')]('/mail/queues/:id',auth[_0xbb31('0x9')](),controller[_0xbb31('0x3a')]);router['post']('/chat/queues/:id/notify',auth[_0xbb31('0x9')](),controller['queueNotify']('chat'));router[_0xbb31('0x6')](_0xbb31('0x3b'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x3c')]);router[_0xbb31('0x36')](_0xbb31('0x3d'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x38')](_0xbb31('0x3e')));router[_0xbb31('0x6')](_0xbb31('0x3f'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x40')]);router['post'](_0xbb31('0x41'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x38')](_0xbb31('0x42')));router[_0xbb31('0x6')](_0xbb31('0x43'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x44')]);router[_0xbb31('0x36')](_0xbb31('0x45'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x38')](_0xbb31('0x46')));router[_0xbb31('0x36')]('/whatsapp/queues/:id/notify',auth[_0xbb31('0x9')](),controller[_0xbb31('0x38')]('whatsapp'));router['get'](_0xbb31('0x47'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x48')]);router[_0xbb31('0x6')](_0xbb31('0x49'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x4a')]);router[_0xbb31('0x36')](_0xbb31('0x4b'),auth[_0xbb31('0x9')](),controller[_0xbb31('0x4c')]);module[_0xbb31('0x4d')]=router;
\ No newline at end of file
index c75538f..84088f0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd8b0=['showSmsQueues','whatsappQueues','WhatsappQueues','showWhatsappQueues','faxQueues','FaxQueues','FaxAccounts','ChatQueuesWaitingInteractions','mailQueuesWaitingInteractions','MailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','OpenchannelQueuesWaitingInteractions','openchannelQueuesIdWaitingInteractions','type','map','queue_id','uniq','value','filter','indexOf','smsQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','WhatsappQueuesWaitingInteractions','faxQueuesWaitingInteractions','Website','Account','Queue','findOne','\x20Queue\x20not\x20found','messageId','Interaction','\x20Message\x20not\x20found','update','MessageId','InteractionId','From','QueueId','TransferReport','queueTransferTimeout','*,*,*,*','agentNotify','channel','Channel\x20field\x20is\x20mandatory','capitalize','chat','agent','Message','create','Start','agentTransferTimeout','bluebird','moment','../../config/logger','api','jayson/promise','client','http','request','then','error','code','result','catch','status','json','sendStatus','stack','name','send','isNil','rows','find','voiceChannels','VoiceChannels','query','voiceChannelMixMonitor','VoiceChannelMixMonitor','params','VoiceChannelStopMixMonitor','merge','voiceQueues','VoiceQueues','showVoiceQueues','UpdateVoiceQueue','body','voiceQueuesPreview','VoiceQueuesChannels','voiceQueuesChannel','voiceQueuesChannelHangup','VoiceQueuesChannelHangup','voiceQueuesChannelRedirect','VoiceQueuesChannelRedirect','outbound','Outbound','outboundChannels','OutboundChannels','agents','Agents','agentCapacity','interaction','findAll','user','length','format','updateAttributes','MemberReport','findOrCreate','INTERACTION','interface','SIP/%s','internal','capacity','campaigns','showChatQueues','ChatQueues','MailQueues','showMailQueues','mailAccounts','openchannelQueues','OpenchannelQueues','showOpenchannelQueues','smsQueues','SmsQueues'];(function(_0x91fc86,_0x2ad31b){var _0x3579cf=function(_0x1b4fce){while(--_0x1b4fce){_0x91fc86['push'](_0x91fc86['shift']());}};_0x3579cf(++_0x2ad31b);}(_0xd8b0,0xad));var _0x0d8b=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xd8b0[_0x122ef9];return _0x42fba0;};'use strict';var BPromise=require(_0x0d8b('0x0'));var moment=require(_0x0d8b('0x1'));var _=require('lodash');var util=require('util');var db=require('../../mysqldb')['db'];var logger=require(_0x0d8b('0x2'))(_0x0d8b('0x3'));var jayson=require(_0x0d8b('0x4'));var amiClient=jayson[_0x0d8b('0x5')][_0x0d8b('0x6')]({'port':0x232a});var mailClient=jayson['client']['http']({'port':0x232b});var routingClient=jayson[_0x0d8b('0x5')][_0x0d8b('0x6')]({'port':0x232c});function respondWithRpcPromise(_0x39f43a,_0x4a4470,_0x413284){return new BPromise(function(_0x284169,_0x58e4e2){var _0x129310=_0x413284?_0x413284:amiClient;return _0x129310[_0x0d8b('0x7')](_0x39f43a,_0x4a4470)[_0x0d8b('0x8')](function(_0x1f4800){if(_0x1f4800[_0x0d8b('0x9')]){if(_0x1f4800[_0x0d8b('0x9')][_0x0d8b('0xa')]===0x1f4){return _0x58e4e2(_0x1f4800[_0x0d8b('0x9')]['message']);}return _0x284169(_0x1f4800[_0x0d8b('0x9')]['message']);}else{_0x284169(_0x1f4800[_0x0d8b('0xb')]);}})[_0x0d8b('0xc')](function(_0x340cc4){_0x58e4e2(_0x340cc4);});});}function respondWithResult(_0x92cdd8,_0x35a07b){_0x35a07b=_0x35a07b||0xc8;return function(_0x32bb1a){if(_0x32bb1a){return _0x92cdd8[_0x0d8b('0xd')](_0x35a07b)[_0x0d8b('0xe')](_0x32bb1a);}return _0x92cdd8[_0x0d8b('0xf')](0x194);};}function handleError(_0x2ce75e,_0x5ad086){_0x5ad086=_0x5ad086||0x1f4;return function(_0xe65334){logger[_0x0d8b('0x9')](_0xe65334[_0x0d8b('0x10')]);if(_0xe65334['name']){delete _0xe65334[_0x0d8b('0x11')];}_0x2ce75e[_0x0d8b('0xd')](_0x5ad086)[_0x0d8b('0x12')](_0xe65334);};}function findById(_0xe2e167){return function(_0x2cb03c){if(!_['isNil'](_0xe2e167)&&!_[_0x0d8b('0x13')](_0x2cb03c)&&!_[_0x0d8b('0x13')](_0x2cb03c[_0x0d8b('0x14')])){return _[_0x0d8b('0x15')](_0x2cb03c[_0x0d8b('0x14')],function(_0x18dd2d){return _0x18dd2d['id']==_0xe2e167;});}return null;};}exports[_0x0d8b('0x16')]=function(_0xa3612a,_0x4a15bf){return respondWithRpcPromise(_0x0d8b('0x17'),_0xa3612a[_0x0d8b('0x18')])[_0x0d8b('0x8')](respondWithResult(_0x4a15bf,null))[_0x0d8b('0xc')](handleError(_0x4a15bf,null));};exports[_0x0d8b('0x19')]=function(_0x5b709c,_0x393beb){return respondWithRpcPromise(_0x0d8b('0x1a'),_['merge'](_0x5b709c['query'],_0x5b709c[_0x0d8b('0x1b')]))['then'](respondWithResult(_0x393beb,null))['catch'](handleError(_0x393beb,null));};exports['voiceChannelStopMixMonitor']=function(_0x238728,_0x2b924f){return respondWithRpcPromise(_0x0d8b('0x1c'),_[_0x0d8b('0x1d')](_0x238728[_0x0d8b('0x18')],_0x238728[_0x0d8b('0x1b')]))[_0x0d8b('0x8')](respondWithResult(_0x2b924f,null))[_0x0d8b('0xc')](handleError(_0x2b924f,null));};exports[_0x0d8b('0x1e')]=function(_0x5e5bc3,_0xe8bbee){return respondWithRpcPromise(_0x0d8b('0x1f'),_0x5e5bc3['query'])[_0x0d8b('0x8')](respondWithResult(_0xe8bbee,null))['catch'](handleError(_0xe8bbee,null));};exports[_0x0d8b('0x20')]=function(_0x234bdd,_0xa2af02){return respondWithRpcPromise('VoiceQueues',_0x234bdd['query'])[_0x0d8b('0x8')](findById(_0x234bdd[_0x0d8b('0x1b')]['id']))['then'](respondWithResult(_0xa2af02,null))[_0x0d8b('0xc')](handleError(_0xa2af02,null));};exports['updateVoiceQueue']=function(_0x1b2b59,_0x4b59e5){return respondWithRpcPromise(_0x0d8b('0x21'),_['merge'](_0x1b2b59[_0x0d8b('0x22')],_0x1b2b59['params']))[_0x0d8b('0x8')](respondWithResult(_0x4b59e5,null))['catch'](handleError(_0x4b59e5,null));};exports[_0x0d8b('0x23')]=function(_0x106e4c,_0x2c058d){return respondWithRpcPromise('VoiceQueuesPreview',_['merge'](_0x106e4c['query'],_0x106e4c[_0x0d8b('0x1b')]))['then'](respondWithResult(_0x2c058d,null))[_0x0d8b('0xc')](handleError(_0x2c058d,null));};exports['voiceQueuesChannels']=function(_0x5d05fc,_0x36017a){return respondWithRpcPromise(_0x0d8b('0x24'),_0x5d05fc[_0x0d8b('0x18')])[_0x0d8b('0x8')](respondWithResult(_0x36017a,null))[_0x0d8b('0xc')](handleError(_0x36017a,null));};exports[_0x0d8b('0x25')]=function(_0x4a99d3,_0x6f93c7){return respondWithRpcPromise('VoiceQueuesChannel',_[_0x0d8b('0x1d')](_0x4a99d3[_0x0d8b('0x18')],_0x4a99d3['params']))[_0x0d8b('0x8')](respondWithResult(_0x6f93c7,null))[_0x0d8b('0xc')](handleError(_0x6f93c7,null));};exports[_0x0d8b('0x26')]=function(_0x4f2ed2,_0x113318){return respondWithRpcPromise(_0x0d8b('0x27'),_[_0x0d8b('0x1d')](_0x4f2ed2[_0x0d8b('0x18')],_0x4f2ed2[_0x0d8b('0x1b')]))['then'](respondWithResult(_0x113318,null))[_0x0d8b('0xc')](handleError(_0x113318,null));};exports[_0x0d8b('0x28')]=function(_0x5ad0fe,_0x1180ac){return respondWithRpcPromise(_0x0d8b('0x29'),_[_0x0d8b('0x1d')](_0x5ad0fe[_0x0d8b('0x18')],_0x5ad0fe[_0x0d8b('0x1b')]))['then'](respondWithResult(_0x1180ac,null))['catch'](handleError(_0x1180ac,null));};exports[_0x0d8b('0x2a')]=function(_0x5c2c04,_0x531c55){return respondWithRpcPromise(_0x0d8b('0x2b'),_0x5c2c04[_0x0d8b('0x18')])[_0x0d8b('0x8')](respondWithResult(_0x531c55,null))[_0x0d8b('0xc')](handleError(_0x531c55,null));};exports[_0x0d8b('0x2c')]=function(_0x24c789,_0x579324){return respondWithRpcPromise(_0x0d8b('0x2d'),_0x24c789[_0x0d8b('0x18')])[_0x0d8b('0x8')](respondWithResult(_0x579324,null))[_0x0d8b('0xc')](handleError(_0x579324,null));};exports[_0x0d8b('0x2e')]=function(_0x1a39ad,_0xf1680e){var _0x5c980b;return respondWithRpcPromise(_0x0d8b('0x2f'),_0x1a39ad[_0x0d8b('0x18')])[_0x0d8b('0x8')](function(_0x1f196d){_0x5c980b=_0x1f196d;return respondWithRpcPromise('Agents',_0x1a39ad[_0x0d8b('0x18')],routingClient);})['then'](function(_0x37b26c){return _[_0x0d8b('0x1d')]({},_0x37b26c,_0x5c980b);})[_0x0d8b('0x8')](respondWithResult(_0xf1680e,null))[_0x0d8b('0xc')](handleError(_0xf1680e,null));};exports[_0x0d8b('0x30')]=function(_0x3e632e,_0x1ff17d){if(_0x3e632e[_0x0d8b('0x22')]&&_0x3e632e[_0x0d8b('0x22')][_0x0d8b('0x31')]&&_0x3e632e['user']&&_0x3e632e['user']['name']){for(var _0x4d0811 in _0x3e632e['body'][_0x0d8b('0x31')]){if(_0x3e632e[_0x0d8b('0x22')][_0x0d8b('0x31')]['hasOwnProperty'](_0x4d0811)){db['MemberReport'][_0x0d8b('0x32')]({'where':{'channel':_0x4d0811,'membername':_0x3e632e[_0x0d8b('0x33')][_0x0d8b('0x11')],'type':'INTERACTION','exitAt':null,'uniqueid':_0x3e632e[_0x0d8b('0x22')][_0x0d8b('0x31')][_0x4d0811]&&_0x3e632e['body']['interaction'][_0x4d0811][_0x0d8b('0x34')]?{'$notIn':_0x3e632e['body'][_0x0d8b('0x31')][_0x4d0811]}:{'$ne':null}}})['then'](function(_0x53f643){var _0x30ccee=moment()[_0x0d8b('0x35')]('YYYY-MM-DD\x20HH:mm:ss');for(var _0x5ebe8a=0x0,_0x59b8e9=_0x53f643['length'];_0x5ebe8a<_0x59b8e9;_0x5ebe8a+=0x1){_0x53f643[_0x5ebe8a][_0x0d8b('0x36')]({'exitAt':_0x30ccee});}});for(var _0x1e0498=0x0;_0x1e0498<_0x3e632e[_0x0d8b('0x22')]['interaction'][_0x4d0811][_0x0d8b('0x34')];_0x1e0498+=0x1){db[_0x0d8b('0x37')][_0x0d8b('0x38')]({'where':{'channel':_0x4d0811,'membername':_0x3e632e[_0x0d8b('0x33')][_0x0d8b('0x11')],'type':_0x0d8b('0x39'),'uniqueid':_0x3e632e[_0x0d8b('0x22')][_0x0d8b('0x31')][_0x4d0811][_0x1e0498],'exitAt':null},'defaults':{'channel':_0x4d0811,'membername':_0x3e632e[_0x0d8b('0x33')][_0x0d8b('0x11')],'interface':_[_0x0d8b('0x13')](_0x3e632e[_0x0d8b('0x33')][_0x0d8b('0x3a')])?util[_0x0d8b('0x35')](_0x0d8b('0x3b'),_0x3e632e[_0x0d8b('0x33')][_0x0d8b('0x11')]):_0x3e632e[_0x0d8b('0x33')][_0x0d8b('0x3a')],'type':'INTERACTION','enterAt':moment()[_0x0d8b('0x35')]('YYYY-MM-DD\x20HH:mm:ss'),'role':'agent','internal':_0x3e632e[_0x0d8b('0x33')][_0x0d8b('0x3c')],'uniqueid':_0x3e632e[_0x0d8b('0x22')][_0x0d8b('0x31')][_0x4d0811][_0x1e0498]}});}}}}return respondWithRpcPromise('AgentCapacity',{'id':_0x3e632e[_0x0d8b('0x1b')]['id'],'capacity':_0x3e632e[_0x0d8b('0x22')][_0x0d8b('0x3d')]},routingClient)[_0x0d8b('0x8')](respondWithResult(_0x1ff17d,null))[_0x0d8b('0xc')](handleError(_0x1ff17d,null));};exports['telephones']=function(_0x5c0824,_0x4e4d5f){return respondWithRpcPromise('Telephones',_0x5c0824[_0x0d8b('0x18')])[_0x0d8b('0x8')](respondWithResult(_0x4e4d5f,null))['catch'](handleError(_0x4e4d5f,null));};exports['trunks']=function(_0x44c5c1,_0x3d3cb6){return respondWithRpcPromise('Trunks',_0x44c5c1['query'])[_0x0d8b('0x8')](respondWithResult(_0x3d3cb6,null))[_0x0d8b('0xc')](handleError(_0x3d3cb6,null));};exports[_0x0d8b('0x3e')]=function(_0x346c0d,_0x2d5519){return respondWithRpcPromise('Campaigns',_0x346c0d[_0x0d8b('0x18')])[_0x0d8b('0x8')](respondWithResult(_0x2d5519,null))['catch'](handleError(_0x2d5519,null));};exports['chatQueues']=function(_0xf6a773,_0x3f2d95){return respondWithRpcPromise('ChatQueues',_0xf6a773['query'],routingClient)[_0x0d8b('0x8')](respondWithResult(_0x3f2d95,null))[_0x0d8b('0xc')](handleError(_0x3f2d95,null));};exports[_0x0d8b('0x3f')]=function(_0xb58818,_0x4a2989){return respondWithRpcPromise(_0x0d8b('0x40'),_0xb58818['query'],routingClient)['then'](findById(_0xb58818[_0x0d8b('0x1b')]['id']))[_0x0d8b('0x8')](respondWithResult(_0x4a2989,null))['catch'](handleError(_0x4a2989,null));};exports['mailQueues']=function(_0x44ed23,_0x3d7161){return respondWithRpcPromise(_0x0d8b('0x41'),_0x44ed23[_0x0d8b('0x18')],routingClient)[_0x0d8b('0x8')](respondWithResult(_0x3d7161,null))[_0x0d8b('0xc')](handleError(_0x3d7161,null));};exports[_0x0d8b('0x42')]=function(_0x3bead7,_0x5418d8){return respondWithRpcPromise(_0x0d8b('0x41'),_0x3bead7[_0x0d8b('0x18')],routingClient)[_0x0d8b('0x8')](findById(_0x3bead7[_0x0d8b('0x1b')]['id']))[_0x0d8b('0x8')](respondWithResult(_0x5418d8,null))[_0x0d8b('0xc')](handleError(_0x5418d8,null));};exports[_0x0d8b('0x43')]=function(_0x1c78b6,_0x375684){return respondWithRpcPromise('MailAccounts',_0x1c78b6[_0x0d8b('0x18')],mailClient)[_0x0d8b('0x8')](respondWithResult(_0x375684,null))[_0x0d8b('0xc')](handleError(_0x375684,null));};exports[_0x0d8b('0x44')]=function(_0x43ad22,_0x577951){return respondWithRpcPromise(_0x0d8b('0x45'),_0x43ad22[_0x0d8b('0x18')],routingClient)[_0x0d8b('0x8')](respondWithResult(_0x577951,null))[_0x0d8b('0xc')](handleError(_0x577951,null));};exports[_0x0d8b('0x46')]=function(_0x59ada2,_0x4d0e7c){return respondWithRpcPromise(_0x0d8b('0x45'),_0x59ada2[_0x0d8b('0x18')],routingClient)[_0x0d8b('0x8')](findById(_0x59ada2[_0x0d8b('0x1b')]['id']))['then'](respondWithResult(_0x4d0e7c,null))[_0x0d8b('0xc')](handleError(_0x4d0e7c,null));};exports[_0x0d8b('0x47')]=function(_0x8c0bbe,_0x5952dd){return respondWithRpcPromise(_0x0d8b('0x48'),_0x8c0bbe['query'],routingClient)[_0x0d8b('0x8')](respondWithResult(_0x5952dd,null))[_0x0d8b('0xc')](handleError(_0x5952dd,null));};exports[_0x0d8b('0x49')]=function(_0x26ccf0,_0x2b6eb6){return respondWithRpcPromise(_0x0d8b('0x48'),_0x26ccf0['query'],routingClient)[_0x0d8b('0x8')](findById(_0x26ccf0['params']['id']))[_0x0d8b('0x8')](respondWithResult(_0x2b6eb6,null))[_0x0d8b('0xc')](handleError(_0x2b6eb6,null));};exports[_0x0d8b('0x4a')]=function(_0x33a614,_0x48025e){return respondWithRpcPromise(_0x0d8b('0x4b'),_0x33a614[_0x0d8b('0x18')],routingClient)[_0x0d8b('0x8')](respondWithResult(_0x48025e,null))[_0x0d8b('0xc')](handleError(_0x48025e,null));};exports[_0x0d8b('0x4c')]=function(_0x273aef,_0x223fd8){return respondWithRpcPromise(_0x0d8b('0x4b'),_0x273aef[_0x0d8b('0x18')],routingClient)[_0x0d8b('0x8')](findById(_0x273aef['params']['id']))['then'](respondWithResult(_0x223fd8,null))[_0x0d8b('0xc')](handleError(_0x223fd8,null));};exports[_0x0d8b('0x4d')]=function(_0x53e399,_0xb1aa96){return respondWithRpcPromise('FaxQueues',_0x53e399['query'],routingClient)[_0x0d8b('0x8')](respondWithResult(_0xb1aa96,null))[_0x0d8b('0xc')](handleError(_0xb1aa96,null));};exports['showFaxQueues']=function(_0x587128,_0x1900e3){return respondWithRpcPromise(_0x0d8b('0x4e'),_0x587128[_0x0d8b('0x18')],routingClient)[_0x0d8b('0x8')](findById(_0x587128[_0x0d8b('0x1b')]['id']))[_0x0d8b('0x8')](respondWithResult(_0x1900e3,null))[_0x0d8b('0xc')](handleError(_0x1900e3,null));};exports['faxAccounts']=function(_0x1ca60c,_0x5878c2){return respondWithRpcPromise(_0x0d8b('0x4f'),_0x1ca60c[_0x0d8b('0x18')])[_0x0d8b('0x8')](respondWithResult(_0x5878c2,null))[_0x0d8b('0xc')](handleError(_0x5878c2,null));};exports['chatQueuesWaitingInteractions']=function(_0x3fe47d,_0x4a1c4a){return respondWithRpcPromise(_0x0d8b('0x50'),_0x3fe47d[_0x0d8b('0x18')],routingClient)[_0x0d8b('0x8')](respondWithResult(_0x4a1c4a,null))[_0x0d8b('0xc')](handleError(_0x4a1c4a,null));};exports[_0x0d8b('0x51')]=function(_0x2b44e5,_0x3e927c){return respondWithRpcPromise(_0x0d8b('0x52'),_0x2b44e5[_0x0d8b('0x18')],routingClient)[_0x0d8b('0x8')](respondWithResult(_0x3e927c,null))['catch'](handleError(_0x3e927c,null));};exports[_0x0d8b('0x53')]=function(_0x54c28b,_0x3e4121){return respondWithRpcPromise(_0x0d8b('0x54'),_0x54c28b['query'],routingClient)[_0x0d8b('0x8')](respondWithResult(_0x3e4121,null))['catch'](handleError(_0x3e4121,null));};exports[_0x0d8b('0x55')]=function(_0x445a00,_0x24f75){return respondWithRpcPromise(_0x0d8b('0x54'),_0x445a00[_0x0d8b('0x18')],routingClient)[_0x0d8b('0x8')](function(_0x3a073b){if(_0x445a00[_0x0d8b('0x18')]['type']!==undefined){var _0x10eca6=_(_0x3a073b[_0x0d8b('0x14')])['filter']([_0x445a00[_0x0d8b('0x18')][_0x0d8b('0x56')],_0x445a00[_0x0d8b('0x1b')]['id']])[_0x0d8b('0x57')](_0x0d8b('0x58'))[_0x0d8b('0x59')]()[_0x0d8b('0x5a')]();return _0x3a073b[_0x0d8b('0x14')][_0x0d8b('0x5b')](function(_0x5007c0){return _0x10eca6[_0x0d8b('0x5c')](_0x5007c0[_0x0d8b('0x58')])>-0x1;});}else{return _0x3a073b['rows'][_0x0d8b('0x5b')](function(_0x93fc55){return _0x93fc55[_0x0d8b('0x58')]===parseInt(_0x445a00['params']['id']);});}})['then'](respondWithResult(_0x24f75,null))[_0x0d8b('0xc')](handleError(_0x24f75,null));};exports[_0x0d8b('0x5d')]=function(_0x2c55bc,_0x5b76af){return respondWithRpcPromise('SmsQueuesWaitingInteractions',_0x2c55bc[_0x0d8b('0x18')],routingClient)[_0x0d8b('0x8')](respondWithResult(_0x5b76af,null))[_0x0d8b('0xc')](handleError(_0x5b76af,null));};exports[_0x0d8b('0x5e')]=function(_0x2a2b58,_0x3f7895){return respondWithRpcPromise(_0x0d8b('0x5f'),_0x2a2b58[_0x0d8b('0x18')],routingClient)[_0x0d8b('0x8')](respondWithResult(_0x3f7895,null))[_0x0d8b('0xc')](handleError(_0x3f7895,null));};exports[_0x0d8b('0x60')]=function(_0x291336,_0x3b060e){return respondWithRpcPromise('FaxQueuesWaitingInteractions',_0x291336[_0x0d8b('0x18')],routingClient)[_0x0d8b('0x8')](respondWithResult(_0x3b060e,null))['catch'](handleError(_0x3b060e,null));};exports['queueNotify']=function(_0x1a1029){return function(_0x1dad9f,_0x3573b4){var _0x14b1b8,_0x23e2e0;var _0x354208=_['capitalize'](_0x1a1029);var _0x502715=_0x1a1029==='chat'?_0x0d8b('0x61'):_0x0d8b('0x62');return db[_0x354208+_0x0d8b('0x63')][_0x0d8b('0x64')]({'raw':!![],'where':{'id':_0x1dad9f[_0x0d8b('0x1b')]['id']}})[_0x0d8b('0x8')](function(_0x5ef461){if(_[_0x0d8b('0x13')](_0x5ef461)){throw new Error(_0x354208+_0x0d8b('0x65'));}_0x14b1b8=_0x5ef461;return db[_0x354208+'Message'][_0x0d8b('0x64')]({'where':{'id':_0x1dad9f['body'][_0x0d8b('0x66')]},'include':[{'model':db[_0x354208+_0x0d8b('0x67')],'as':_0x0d8b('0x67')},{'model':db[_0x354208+_0x502715],'as':_0x0d8b('0x62')}]});})[_0x0d8b('0x8')](function(_0x8fae7f){if(_[_0x0d8b('0x13')](_0x8fae7f)){throw new Error(_0x354208+_0x0d8b('0x68'));}_0x23e2e0=_0x8fae7f;return _0x8fae7f[_0x0d8b('0x69')]({'read':0x0,'readAt':null,'UserId':null});})[_0x0d8b('0x8')](function(){var _0x276558={'uniqueid':_0x1a1029+'.'+_0x23e2e0['id']+'.'+_0x23e2e0[_0x0d8b('0x67')]['id'],'FromUserId':_0x1dad9f['user']['id'],'type':'queue'};_0x276558[_0x354208+_0x0d8b('0x6a')]=_0x23e2e0['id'];_0x276558[_0x354208+_0x0d8b('0x6b')]=_0x23e2e0[_0x0d8b('0x67')]['id'];_0x276558[_0x0d8b('0x6c')+_0x354208+_0x502715+'Id']=_0x23e2e0[_0x0d8b('0x62')]['id'];_0x276558['To'+_0x354208+_0x0d8b('0x6d')]=_0x14b1b8['id'];return db[_0x354208+_0x0d8b('0x6e')]['create'](_0x276558);})[_0x0d8b('0x8')](function(){return respondWithRpcPromise('Start',{'channel':_0x1a1029,'interaction':_0x23e2e0[_0x0d8b('0x67')],'message':_0x23e2e0,'account':_0x23e2e0['Account'],'applications':[{'id':0x0,'priority':0x1,'app':'queue','appdata':_0x14b1b8[_0x0d8b('0x11')]+','+(_0x23e2e0[_0x0d8b('0x62')][_0x0d8b('0x6f')]||0x12c),'interval':_0x0d8b('0x70')}],'transfer':!![]},routingClient);})[_0x0d8b('0x8')](respondWithResult(_0x3573b4,null))[_0x0d8b('0xc')](handleError(_0x3573b4,null));};};exports[_0x0d8b('0x71')]=function(_0x180eda,_0x35267a){var _0x20a8b6,_0x3a6014;if(_[_0x0d8b('0x13')](_0x180eda['body'][_0x0d8b('0x72')])){throw new Error(_0x0d8b('0x73'));}var _0x8be77c=_0x180eda['body']['channel'];var _0x2db144=_[_0x0d8b('0x74')](_0x8be77c);var _0x36d6ca=_0x8be77c===_0x0d8b('0x75')?_0x0d8b('0x61'):_0x0d8b('0x62');return db['User'][_0x0d8b('0x64')]({'raw':!![],'where':{'id':_0x180eda[_0x0d8b('0x1b')]['id'],'role':_0x0d8b('0x76')}})[_0x0d8b('0x8')](function(_0x4350ee){if(_['isNil'](_0x4350ee)){throw new Error('Agent\x20not\x20found');}_0x20a8b6=_0x4350ee;return db[_0x2db144+_0x0d8b('0x77')][_0x0d8b('0x64')]({'where':{'id':_0x180eda[_0x0d8b('0x22')]['messageId']},'include':[{'model':db[_0x2db144+_0x0d8b('0x67')],'as':_0x0d8b('0x67')},{'model':db[_0x2db144+_0x36d6ca],'as':_0x0d8b('0x62')}]});})['then'](function(_0xb61d4b){if(_[_0x0d8b('0x13')](_0xb61d4b)){throw new Error(_0x2db144+_0x0d8b('0x68'));}_0x3a6014=_0xb61d4b;return _0xb61d4b[_0x0d8b('0x69')]({'read':0x0,'readAt':null,'UserId':null});})[_0x0d8b('0x8')](function(){var _0x150e9f={'uniqueid':_0x8be77c+'.'+_0x3a6014['id']+'.'+_0x3a6014[_0x0d8b('0x67')]['id'],'FromUserId':_0x180eda[_0x0d8b('0x33')]['id'],'type':_0x0d8b('0x76'),'ToUserId':_0x20a8b6['id']};_0x150e9f[_0x2db144+'MessageId']=_0x3a6014['id'];_0x150e9f[_0x2db144+_0x0d8b('0x6b')]=_0x3a6014[_0x0d8b('0x67')]['id'];_0x150e9f[_0x0d8b('0x6c')+_0x2db144+_0x36d6ca+'Id']=_0x3a6014[_0x0d8b('0x62')]['id'];return db[_0x2db144+_0x0d8b('0x6e')][_0x0d8b('0x78')](_0x150e9f);})[_0x0d8b('0x8')](function(){return respondWithRpcPromise(_0x0d8b('0x79'),{'channel':_0x8be77c,'interaction':_0x3a6014[_0x0d8b('0x67')],'message':_0x3a6014,'account':_0x3a6014['Account'],'applications':[{'id':0x0,'priority':0x1,'app':'agent','appdata':_0x20a8b6[_0x0d8b('0x11')]+','+(_0x3a6014[_0x0d8b('0x62')][_0x0d8b('0x7a')]||0x12c),'interval':_0x0d8b('0x70')}],'transfer':!![]},routingClient);})['then'](respondWithResult(_0x35267a,null))[_0x0d8b('0xc')](handleError(_0x35267a,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(_0xd31205,_0x101c58){var _0x20effe=function(_0x4a2604){while(--_0x4a2604){_0xd31205['push'](_0xd31205['shift']());}};_0x20effe(++_0x101c58);}(_0xe706,0xa3));var _0x6e70=function(_0x5ea82f,_0x41ef96){_0x5ea82f=_0x5ea82f-0x0;var _0x2f38b6=_0xe706[_0x5ea82f];return _0x2f38b6;};'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 31fd014..c906181 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3442=['post','create','put','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./schedule.controller','get','index','/:id','isAuthenticated','show','/:id/run','run'];(function(_0x5181cf,_0x25b5c7){var _0x246901=function(_0x3084a5){while(--_0x3084a5){_0x5181cf['push'](_0x5181cf['shift']());}};_0x246901(++_0x25b5c7);}(_0x3442,0x166));var _0x2344=function(_0x5dbd9d,_0x24d438){_0x5dbd9d=_0x5dbd9d-0x0;var _0x225ccf=_0x3442[_0x5dbd9d];return _0x225ccf;};'use strict';var multer=require(_0x2344('0x0'));var util=require(_0x2344('0x1'));var path=require(_0x2344('0x2'));var timeout=require(_0x2344('0x3'));var express=require(_0x2344('0x4'));var router=express[_0x2344('0x5')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x2344('0x6'));var config=require(_0x2344('0x7'));var controller=require(_0x2344('0x8'));router[_0x2344('0x9')]('/',auth['isAuthenticated'](),controller[_0x2344('0xa')]);router[_0x2344('0x9')](_0x2344('0xb'),auth[_0x2344('0xc')](),controller[_0x2344('0xd')]);router[_0x2344('0x9')](_0x2344('0xe'),auth[_0x2344('0xc')](),controller[_0x2344('0xf')]);router[_0x2344('0x10')]('/',auth['isAuthenticated'](),controller[_0x2344('0x11')]);router[_0x2344('0x12')](_0x2344('0xb'),auth[_0x2344('0xc')](),controller['update']);router[_0x2344('0x13')](_0x2344('0xb'),auth[_0x2344('0xc')](),controller[_0x2344('0x14')]);module[_0x2344('0x15')]=router;
\ No newline at end of file
+var _0xda0d=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./schedule.controller','get','isAuthenticated','index','/:id','show','run','post','put','update','exports','multer','util','connect-timeout','express','Router'];(function(_0x269bcd,_0x2ba47b){var _0x37ff11=function(_0x353daf){while(--_0x353daf){_0x269bcd['push'](_0x269bcd['shift']());}};_0x37ff11(++_0x2ba47b);}(_0xda0d,0x13b));var _0xdda0=function(_0x378312,_0x407da2){_0x378312=_0x378312-0x0;var _0x1214db=_0xda0d[_0x378312];return _0x1214db;};'use strict';var multer=require(_0xdda0('0x0'));var util=require(_0xdda0('0x1'));var path=require('path');var timeout=require(_0xdda0('0x2'));var express=require(_0xdda0('0x3'));var router=express[_0xdda0('0x4')]();var fs_extra=require(_0xdda0('0x5'));var auth=require(_0xdda0('0x6'));var interaction=require(_0xdda0('0x7'));var config=require(_0xdda0('0x8'));var controller=require(_0xdda0('0x9'));router[_0xdda0('0xa')]('/',auth[_0xdda0('0xb')](),controller[_0xdda0('0xc')]);router[_0xdda0('0xa')](_0xdda0('0xd'),auth['isAuthenticated'](),controller[_0xdda0('0xe')]);router[_0xdda0('0xa')]('/:id/run',auth['isAuthenticated'](),controller[_0xdda0('0xf')]);router[_0xdda0('0x10')]('/',auth[_0xdda0('0xb')](),controller['create']);router[_0xdda0('0x11')]('/:id',auth[_0xdda0('0xb')](),controller[_0xdda0('0x12')]);router['delete']('/:id',auth[_0xdda0('0xb')](),controller['destroy']);module[_0xdda0('0x13')]=router;
\ No newline at end of file
index 688cbf3..88c2685 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc518=['weeks','days','hours','minutes','pdf','xlsx','csv','custom','TEXT','sequelize','STRING','BOOLEAN','0\x200\x20*\x20*\x20*','DATE','INTEGER','ENUM','quarters'];(function(_0xfc67,_0x4f5357){var _0x24ad9b=function(_0x3b6e6f){while(--_0x3b6e6f){_0xfc67['push'](_0xfc67['shift']());}};_0x24ad9b(++_0x4f5357);}(_0xc518,0x1a1));var _0x8c51=function(_0x1cfad3,_0x16fda0){_0x1cfad3=_0x1cfad3-0x0;var _0x16ab1c=_0xc518[_0x1cfad3];return _0x16ab1c;};'use strict';var Sequelize=require(_0x8c51('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize[_0x8c51('0x1')]},'active':{'type':Sequelize[_0x8c51('0x2')],'allowNull':![],'defaultValue':![]},'cron':{'type':Sequelize[_0x8c51('0x1')],'allowNull':![],'defaultValue':_0x8c51('0x3')},'startAt':{'type':Sequelize[_0x8c51('0x4')],'allowNull':![]},'endAt':{'type':Sequelize['DATE'],'allowNull':![]},'subtractNumber':{'type':Sequelize[_0x8c51('0x5')],'allowNull':![],'defaultValue':0x1,'validate':{'min':0x1}},'subtractUnit':{'type':Sequelize[_0x8c51('0x6')]('years',_0x8c51('0x7'),'months',_0x8c51('0x8'),_0x8c51('0x9'),_0x8c51('0xa'),_0x8c51('0xb')),'allowNull':![],'defaultValue':_0x8c51('0x9')},'output':{'type':Sequelize[_0x8c51('0x6')]('csv',_0x8c51('0xc'),_0x8c51('0xd')),'allowNull':![],'defaultValue':_0x8c51('0xe')},'type':{'type':Sequelize['ENUM'](_0x8c51('0xf'),'default'),'allowNull':![],'defaultValue':'custom'},'sendMail':{'type':Sequelize[_0x8c51('0x2')],'defaultValue':![]},'email':{'type':Sequelize['STRING']},'cc':{'type':Sequelize[_0x8c51('0x10')]},'bcc':{'type':Sequelize[_0x8c51('0x10')]},'sendIfEmpty':{'type':Sequelize[_0x8c51('0x2')],'defaultValue':!![]}};
\ No newline at end of file
+var _0x9ca6=['sequelize','exports','STRING','BOOLEAN','DATE','ENUM','years','quarters','months','days','hours','minutes','csv','pdf','xlsx','custom','default','TEXT'];(function(_0x36884e,_0x48008f){var _0x1cc367=function(_0x388a78){while(--_0x388a78){_0x36884e['push'](_0x36884e['shift']());}};_0x1cc367(++_0x48008f);}(_0x9ca6,0xc6));var _0x69ca=function(_0x1791b6,_0x5f077f){_0x1791b6=_0x1791b6-0x0;var _0x2dda84=_0x9ca6[_0x1791b6];return _0x2dda84;};'use strict';var Sequelize=require(_0x69ca('0x0'));module[_0x69ca('0x1')]={'name':{'type':Sequelize[_0x69ca('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0x69ca('0x2')]},'active':{'type':Sequelize[_0x69ca('0x3')],'allowNull':![],'defaultValue':![]},'cron':{'type':Sequelize[_0x69ca('0x2')],'allowNull':![],'defaultValue':'0\x200\x20*\x20*\x20*'},'startAt':{'type':Sequelize[_0x69ca('0x4')],'allowNull':![]},'endAt':{'type':Sequelize['DATE'],'allowNull':![]},'subtractNumber':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x1,'validate':{'min':0x1}},'subtractUnit':{'type':Sequelize[_0x69ca('0x5')](_0x69ca('0x6'),_0x69ca('0x7'),_0x69ca('0x8'),'weeks',_0x69ca('0x9'),_0x69ca('0xa'),_0x69ca('0xb')),'allowNull':![],'defaultValue':_0x69ca('0x9')},'output':{'type':Sequelize[_0x69ca('0x5')](_0x69ca('0xc'),_0x69ca('0xd'),_0x69ca('0xe')),'allowNull':![],'defaultValue':'csv'},'type':{'type':Sequelize[_0x69ca('0x5')](_0x69ca('0xf'),_0x69ca('0x10')),'allowNull':![],'defaultValue':_0x69ca('0xf')},'sendMail':{'type':Sequelize[_0x69ca('0x3')],'defaultValue':![]},'email':{'type':Sequelize['STRING']},'cc':{'type':Sequelize[_0x69ca('0x11')]},'bcc':{'type':Sequelize['TEXT']},'sendIfEmpty':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]}};
\ No newline at end of file
index 44be60c..bf5fd38 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x95ba=['intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','merge','where','includeAll','findAll','catch','show','params','rawAttributes','options','find','create','user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','run','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','reject','save','update','then','destroy','get','Scheduler','UserProfileResource','stack','name','send','index','map','Schedule','fieldName','type','key','model','query','keys','filters'];(function(_0xcfc44,_0x179bc1){var _0x307a25=function(_0x2b64de){while(--_0x2b64de){_0xcfc44['push'](_0xcfc44['shift']());}};_0x307a25(++_0x179bc1);}(_0x95ba,0x11e));var _0xa95b=function(_0x5560b5,_0x56fb64){_0x5560b5=_0x5560b5-0x0;var _0x31d8f7=_0x95ba[_0x5560b5];return _0x31d8f7;};'use strict';var emlformat=require(_0xa95b('0x0'));var rimraf=require(_0xa95b('0x1'));var zipdir=require(_0xa95b('0x2'));var jsonpatch=require(_0xa95b('0x3'));var rp=require(_0xa95b('0x4'));var moment=require(_0xa95b('0x5'));var BPromise=require(_0xa95b('0x6'));var Mustache=require(_0xa95b('0x7'));var util=require(_0xa95b('0x8'));var path=require(_0xa95b('0x9'));var sox=require(_0xa95b('0xa'));var csv=require(_0xa95b('0xb'));var ejs=require(_0xa95b('0xc'));var fs=require('fs');var fs_extra=require(_0xa95b('0xd'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xa95b('0xe'));var jsforce=require(_0xa95b('0xf'));var deskjs=require('desk.js');var toCsv=require(_0xa95b('0xb'));var querystring=require(_0xa95b('0x10'));var Papa=require(_0xa95b('0x11'));var Redis=require(_0xa95b('0x12'));var authService=require(_0xa95b('0x13'));var qs=require(_0xa95b('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xa95b('0x15'));var logger=require(_0xa95b('0x16'))(_0xa95b('0x17'));var utils=require(_0xa95b('0x18'));var config=require(_0xa95b('0x19'));var licenseUtil=require(_0xa95b('0x1a'));var db=require(_0xa95b('0x1b'))['db'];function respondWithStatusCode(_0x288a7f,_0x574086){_0x574086=_0x574086||0xcc;return function(_0x21427f){if(_0x21427f){return _0x288a7f[_0xa95b('0x1c')](_0x574086);}return _0x288a7f['status'](_0x574086)['end']();};}function respondWithResult(_0x10d3d0,_0x5a3220){_0x5a3220=_0x5a3220||0xc8;return function(_0x4b2203){if(_0x4b2203){return _0x10d3d0[_0xa95b('0x1d')](_0x5a3220)[_0xa95b('0x1e')](_0x4b2203);}};}function respondWithFilteredResult(_0x1ef915,_0x458d87){return function(_0x1d6ebb){if(_0x1d6ebb){var _0x4d0b27=typeof _0x458d87[_0xa95b('0x1f')]===_0xa95b('0x20')&&typeof _0x458d87[_0xa95b('0x21')]==='undefined';var _0x18f7fa=_0x1d6ebb[_0xa95b('0x22')];var _0x2e6624=_0x4d0b27?0x0:_0x458d87['offset'];var _0x586710=_0x4d0b27?_0x1d6ebb[_0xa95b('0x22')]:_0x458d87[_0xa95b('0x1f')]+_0x458d87[_0xa95b('0x21')];var _0x56829d;if(_0x586710>=_0x18f7fa){_0x586710=_0x18f7fa;_0x56829d=0xc8;}else{_0x56829d=0xce;}_0x1ef915[_0xa95b('0x1d')](_0x56829d);return _0x1ef915[_0xa95b('0x23')](_0xa95b('0x24'),_0x2e6624+'-'+_0x586710+'/'+_0x18f7fa)['json'](_0x1d6ebb);}return null;};}function patchUpdates(_0x25f0b9){return function(_0xdf7148){try{jsonpatch['apply'](_0xdf7148,_0x25f0b9,!![]);}catch(_0x401266){return BPromise[_0xa95b('0x25')](_0x401266);}return _0xdf7148[_0xa95b('0x26')]();};}function saveUpdates(_0x299e5c,_0x39a337){return function(_0x5499d4){if(_0x5499d4){return _0x5499d4[_0xa95b('0x27')](_0x299e5c)[_0xa95b('0x28')](function(_0x3ec08e){return _0x3ec08e;});}return null;};}function removeEntity(_0x56312b,_0x5044f6){return function(_0x276b28){if(_0x276b28){return _0x276b28[_0xa95b('0x29')]()[_0xa95b('0x28')](function(){var _0x372e60=_0x276b28[_0xa95b('0x2a')]({'plain':!![]});var _0xda2e0d=_0xa95b('0x2b');return db[_0xa95b('0x2c')][_0xa95b('0x29')]({'where':{'type':_0xda2e0d,'resourceId':_0x372e60['id']}})[_0xa95b('0x28')](function(){return _0x276b28;});})[_0xa95b('0x28')](function(){_0x56312b[_0xa95b('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2cc3b9,_0x258028){return function(_0x26431d){if(!_0x26431d){_0x2cc3b9[_0xa95b('0x1c')](0x194);}return _0x26431d;};}function handleError(_0x5306c1,_0x505aa2){_0x505aa2=_0x505aa2||0x1f4;return function(_0x49fe9f){logger['error'](_0x49fe9f[_0xa95b('0x2d')]);if(_0x49fe9f[_0xa95b('0x2e')]){delete _0x49fe9f['name'];}_0x5306c1[_0xa95b('0x1d')](_0x505aa2)[_0xa95b('0x2f')](_0x49fe9f);};}exports[_0xa95b('0x30')]=function(_0x154931,_0x199ebb){var _0x4e6a80={},_0x76b7a2={},_0x896dbf={'count':0x0,'rows':[]};var _0x48da25=_[_0xa95b('0x31')](db[_0xa95b('0x32')]['rawAttributes'],function(_0x3df2ff){return{'name':_0x3df2ff[_0xa95b('0x33')],'type':_0x3df2ff[_0xa95b('0x34')][_0xa95b('0x35')]};});_0x76b7a2[_0xa95b('0x36')]=_['map'](_0x48da25,_0xa95b('0x2e'));_0x76b7a2[_0xa95b('0x37')]=_[_0xa95b('0x38')](_0x154931[_0xa95b('0x37')]);_0x76b7a2[_0xa95b('0x39')]=_[_0xa95b('0x3a')](_0x76b7a2[_0xa95b('0x36')],_0x76b7a2[_0xa95b('0x37')]);_0x4e6a80[_0xa95b('0x3b')]=_[_0xa95b('0x3a')](_0x76b7a2[_0xa95b('0x36')],qs[_0xa95b('0x3c')](_0x154931[_0xa95b('0x37')]['fields']));_0x4e6a80[_0xa95b('0x3b')]=_0x4e6a80[_0xa95b('0x3b')][_0xa95b('0x3d')]?_0x4e6a80[_0xa95b('0x3b')]:_0x76b7a2[_0xa95b('0x36')];if(!_0x154931[_0xa95b('0x37')][_0xa95b('0x3e')](_0xa95b('0x3f'))){_0x4e6a80['limit']=qs[_0xa95b('0x21')](_0x154931[_0xa95b('0x37')][_0xa95b('0x21')]);_0x4e6a80['offset']=qs['offset'](_0x154931['query']['offset']);}_0x4e6a80[_0xa95b('0x40')]=qs[_0xa95b('0x41')](_0x154931[_0xa95b('0x37')]['sort']);_0x4e6a80['where']=qs[_0xa95b('0x39')](_[_0xa95b('0x42')](_0x154931[_0xa95b('0x37')],_0x76b7a2[_0xa95b('0x39')]),_0x48da25);if(_0x154931[_0xa95b('0x37')][_0xa95b('0x43')]){_0x4e6a80['where']=_[_0xa95b('0x44')](_0x4e6a80[_0xa95b('0x45')],{'$or':_[_0xa95b('0x31')](_0x48da25,function(_0x29130e){if(_0x29130e[_0xa95b('0x34')]!=='VIRTUAL'){var _0x3999b0={};_0x3999b0[_0x29130e[_0xa95b('0x2e')]]={'$like':'%'+_0x154931[_0xa95b('0x37')][_0xa95b('0x43')]+'%'};return _0x3999b0;}})});}_0x4e6a80=_[_0xa95b('0x44')]({},_0x4e6a80,_0x154931['options']);var _0x1429dd={'where':_0x4e6a80[_0xa95b('0x45')]};return db[_0xa95b('0x32')][_0xa95b('0x22')](_0x1429dd)[_0xa95b('0x28')](function(_0x2f07d0){_0x896dbf[_0xa95b('0x22')]=_0x2f07d0;if(_0x154931[_0xa95b('0x37')][_0xa95b('0x46')]){_0x4e6a80['include']=[{'all':!![]}];}return db['Schedule'][_0xa95b('0x47')](_0x4e6a80);})[_0xa95b('0x28')](function(_0x4f04ee){_0x896dbf['rows']=_0x4f04ee;return _0x896dbf;})[_0xa95b('0x28')](respondWithFilteredResult(_0x199ebb,_0x4e6a80))[_0xa95b('0x48')](handleError(_0x199ebb,null));};exports[_0xa95b('0x49')]=function(_0x456cde,_0x4c4a5d){var _0x529324={'raw':![],'where':{'id':_0x456cde[_0xa95b('0x4a')]['id']}},_0x5a024b={};_0x5a024b[_0xa95b('0x36')]=_[_0xa95b('0x38')](db[_0xa95b('0x32')][_0xa95b('0x4b')]);_0x5a024b[_0xa95b('0x37')]=_[_0xa95b('0x38')](_0x456cde[_0xa95b('0x37')]);_0x5a024b[_0xa95b('0x39')]=_[_0xa95b('0x3a')](_0x5a024b[_0xa95b('0x36')],_0x5a024b[_0xa95b('0x37')]);_0x529324[_0xa95b('0x3b')]=_[_0xa95b('0x3a')](_0x5a024b[_0xa95b('0x36')],qs[_0xa95b('0x3c')](_0x456cde[_0xa95b('0x37')][_0xa95b('0x3c')]));_0x529324[_0xa95b('0x3b')]=_0x529324[_0xa95b('0x3b')][_0xa95b('0x3d')]?_0x529324[_0xa95b('0x3b')]:_0x5a024b[_0xa95b('0x36')];if(_0x456cde[_0xa95b('0x37')][_0xa95b('0x46')]){_0x529324['include']=[{'all':!![]}];}_0x529324=_['merge']({},_0x529324,_0x456cde[_0xa95b('0x4c')]);return db[_0xa95b('0x32')][_0xa95b('0x4d')](_0x529324)[_0xa95b('0x28')](handleEntityNotFound(_0x4c4a5d,null))['then'](respondWithResult(_0x4c4a5d,null))['catch'](handleError(_0x4c4a5d,null));};exports[_0xa95b('0x4e')]=function(_0x317b6b,_0x5ef1ce){return db[_0xa95b('0x32')]['create'](_0x317b6b['body'],{})[_0xa95b('0x28')](function(_0x251552){var _0x3b1fca=_0x317b6b[_0xa95b('0x4f')][_0xa95b('0x2a')]({'plain':!![]});if(!_0x3b1fca)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x3b1fca['role']===_0xa95b('0x4f')){var _0x34fdde=_0x251552[_0xa95b('0x2a')]({'plain':!![]});var _0x310184=_0xa95b('0x2b');return db[_0xa95b('0x50')]['find']({'where':{'name':_0x310184,'userProfileId':_0x3b1fca[_0xa95b('0x51')]},'raw':!![]})[_0xa95b('0x28')](function(_0x5c182a){if(_0x5c182a&&_0x5c182a[_0xa95b('0x52')]===0x0){return db[_0xa95b('0x2c')][_0xa95b('0x4e')]({'name':_0x34fdde[_0xa95b('0x2e')],'resourceId':_0x34fdde['id'],'type':_0x5c182a[_0xa95b('0x2e')],'sectionId':_0x5c182a['id']},{})['then'](function(){return _0x251552;});}else{return _0x251552;}})[_0xa95b('0x48')](function(_0xa6768){logger['error'](_0xa95b('0x53'),_0xa6768);throw _0xa6768;});}return _0x251552;})[_0xa95b('0x28')](respondWithResult(_0x5ef1ce,0xc9))[_0xa95b('0x48')](handleError(_0x5ef1ce,null));};exports['update']=function(_0x418d34,_0x2a8135){if(_0x418d34[_0xa95b('0x54')]['id']){delete _0x418d34[_0xa95b('0x54')]['id'];}return db[_0xa95b('0x32')][_0xa95b('0x4d')]({'where':{'id':_0x418d34['params']['id']}})[_0xa95b('0x28')](handleEntityNotFound(_0x2a8135,null))['then'](saveUpdates(_0x418d34[_0xa95b('0x54')],null))[_0xa95b('0x28')](respondWithResult(_0x2a8135,null))['catch'](handleError(_0x2a8135,null));};exports[_0xa95b('0x29')]=function(_0x39e6e7,_0x3cc297){return db[_0xa95b('0x32')]['find']({'where':{'id':_0x39e6e7['params']['id']}})[_0xa95b('0x28')](handleEntityNotFound(_0x3cc297,null))[_0xa95b('0x28')](removeEntity(_0x3cc297,null))['catch'](handleError(_0x3cc297,null));};exports[_0xa95b('0x55')]=function(_0x569487,_0x379fd8,_0x9cd856){var _0x41324b=require('../../config/schedule');return db[_0xa95b('0x32')][_0xa95b('0x4d')]({'where':{'id':_0x569487[_0xa95b('0x4a')]['id']},'raw':!![]})[_0xa95b('0x28')](handleEntityNotFound(_0x379fd8,null))[_0xa95b('0x28')](function(){_0x41324b[_0xa95b('0x55')](_0x569487[_0xa95b('0x4a')]['id']);})[_0xa95b('0x28')](respondWithStatusCode(_0x379fd8,null))['catch'](handleError(_0x379fd8,null));};
\ No newline at end of file
+var _0xd93c=['zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','ejs','lodash','squel','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','reject','save','update','then','destroy','Scheduler','UserProfileResource','error','stack','send','Schedule','type','key','map','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','merge','VIRTUAL','name','filter','include','findAll','rows','catch','show','params','rawAttributes','find','create','body','user','get','UserProfileSection','userProfileId','autoAssociation','run','../../config/schedule','rimraf'];(function(_0x2ae2ad,_0xac5b0c){var _0x26dbd7=function(_0x5e685b){while(--_0x5e685b){_0x2ae2ad['push'](_0x2ae2ad['shift']());}};_0x26dbd7(++_0xac5b0c);}(_0xd93c,0x18a));var _0xcd93=function(_0x3a8e45,_0x4cc81e){_0x3a8e45=_0x3a8e45-0x0;var _0x58bf31=_0xd93c[_0x3a8e45];return _0x58bf31;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xcd93('0x0'));var zipdir=require(_0xcd93('0x1'));var jsonpatch=require(_0xcd93('0x2'));var rp=require(_0xcd93('0x3'));var moment=require(_0xcd93('0x4'));var BPromise=require(_0xcd93('0x5'));var Mustache=require(_0xcd93('0x6'));var util=require(_0xcd93('0x7'));var path=require('path');var sox=require(_0xcd93('0x8'));var csv=require('to-csv');var ejs=require(_0xcd93('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xcd93('0xa'));var squel=require(_0xcd93('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xcd93('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xcd93('0xd'));var authService=require(_0xcd93('0xe'));var qs=require(_0xcd93('0xf'));var as=require(_0xcd93('0x10'));var hardwareService=require(_0xcd93('0x11'));var logger=require('../../config/logger')('api');var utils=require(_0xcd93('0x12'));var config=require(_0xcd93('0x13'));var licenseUtil=require('../../config/license/util');var db=require(_0xcd93('0x14'))['db'];function respondWithStatusCode(_0x43189f,_0x1eb845){_0x1eb845=_0x1eb845||0xcc;return function(_0x586bc6){if(_0x586bc6){return _0x43189f[_0xcd93('0x15')](_0x1eb845);}return _0x43189f[_0xcd93('0x16')](_0x1eb845)[_0xcd93('0x17')]();};}function respondWithResult(_0x119df4,_0x1428e0){_0x1428e0=_0x1428e0||0xc8;return function(_0x38c0a5){if(_0x38c0a5){return _0x119df4[_0xcd93('0x16')](_0x1428e0)[_0xcd93('0x18')](_0x38c0a5);}};}function respondWithFilteredResult(_0x3b3bd3,_0x18eea7){return function(_0x53d8fe){if(_0x53d8fe){var _0x1c9341=typeof _0x18eea7[_0xcd93('0x19')]===_0xcd93('0x1a')&&typeof _0x18eea7[_0xcd93('0x1b')]===_0xcd93('0x1a');var _0x46f0ff=_0x53d8fe[_0xcd93('0x1c')];var _0x580f87=_0x1c9341?0x0:_0x18eea7['offset'];var _0x176c88=_0x1c9341?_0x53d8fe['count']:_0x18eea7[_0xcd93('0x19')]+_0x18eea7[_0xcd93('0x1b')];var _0x588ba4;if(_0x176c88>=_0x46f0ff){_0x176c88=_0x46f0ff;_0x588ba4=0xc8;}else{_0x588ba4=0xce;}_0x3b3bd3['status'](_0x588ba4);return _0x3b3bd3[_0xcd93('0x1d')]('Content-Range',_0x580f87+'-'+_0x176c88+'/'+_0x46f0ff)[_0xcd93('0x18')](_0x53d8fe);}return null;};}function patchUpdates(_0x1e5e69){return function(_0x29cf36){try{jsonpatch[_0xcd93('0x1e')](_0x29cf36,_0x1e5e69,!![]);}catch(_0x4ff6b5){return BPromise[_0xcd93('0x1f')](_0x4ff6b5);}return _0x29cf36[_0xcd93('0x20')]();};}function saveUpdates(_0x7edb34,_0x1cb16d){return function(_0x138810){if(_0x138810){return _0x138810[_0xcd93('0x21')](_0x7edb34)[_0xcd93('0x22')](function(_0x4a103a){return _0x4a103a;});}return null;};}function removeEntity(_0x5ba6f2,_0x4bd1c1){return function(_0x5b4229){if(_0x5b4229){return _0x5b4229[_0xcd93('0x23')]()[_0xcd93('0x22')](function(){var _0x1d9e6c=_0x5b4229['get']({'plain':!![]});var _0x3269d8=_0xcd93('0x24');return db[_0xcd93('0x25')][_0xcd93('0x23')]({'where':{'type':_0x3269d8,'resourceId':_0x1d9e6c['id']}})[_0xcd93('0x22')](function(){return _0x5b4229;});})[_0xcd93('0x22')](function(){_0x5ba6f2[_0xcd93('0x16')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4adf97,_0x43aace){return function(_0x5cf2b8){if(!_0x5cf2b8){_0x4adf97['sendStatus'](0x194);}return _0x5cf2b8;};}function handleError(_0x2aa8d2,_0x5b56c0){_0x5b56c0=_0x5b56c0||0x1f4;return function(_0x4949d6){logger[_0xcd93('0x26')](_0x4949d6[_0xcd93('0x27')]);if(_0x4949d6['name']){delete _0x4949d6['name'];}_0x2aa8d2[_0xcd93('0x16')](_0x5b56c0)[_0xcd93('0x28')](_0x4949d6);};}exports['index']=function(_0x554c20,_0x5a21c3){var _0x52b7af={},_0x59a7ce={},_0x4a67c5={'count':0x0,'rows':[]};var _0x4a194e=_['map'](db[_0xcd93('0x29')]['rawAttributes'],function(_0x50eca2){return{'name':_0x50eca2['fieldName'],'type':_0x50eca2[_0xcd93('0x2a')][_0xcd93('0x2b')]};});_0x59a7ce['model']=_[_0xcd93('0x2c')](_0x4a194e,'name');_0x59a7ce[_0xcd93('0x2d')]=_[_0xcd93('0x2e')](_0x554c20['query']);_0x59a7ce[_0xcd93('0x2f')]=_[_0xcd93('0x30')](_0x59a7ce[_0xcd93('0x31')],_0x59a7ce[_0xcd93('0x2d')]);_0x52b7af[_0xcd93('0x32')]=_[_0xcd93('0x30')](_0x59a7ce[_0xcd93('0x31')],qs[_0xcd93('0x33')](_0x554c20['query'][_0xcd93('0x33')]));_0x52b7af['attributes']=_0x52b7af[_0xcd93('0x32')][_0xcd93('0x34')]?_0x52b7af[_0xcd93('0x32')]:_0x59a7ce[_0xcd93('0x31')];if(!_0x554c20[_0xcd93('0x2d')][_0xcd93('0x35')](_0xcd93('0x36'))){_0x52b7af['limit']=qs[_0xcd93('0x1b')](_0x554c20[_0xcd93('0x2d')][_0xcd93('0x1b')]);_0x52b7af[_0xcd93('0x19')]=qs[_0xcd93('0x19')](_0x554c20[_0xcd93('0x2d')]['offset']);}_0x52b7af['order']=qs['sort'](_0x554c20[_0xcd93('0x2d')][_0xcd93('0x37')]);_0x52b7af[_0xcd93('0x38')]=qs['filters'](_[_0xcd93('0x39')](_0x554c20[_0xcd93('0x2d')],_0x59a7ce[_0xcd93('0x2f')]),_0x4a194e);if(_0x554c20[_0xcd93('0x2d')]['filter']){_0x52b7af[_0xcd93('0x38')]=_[_0xcd93('0x3a')](_0x52b7af[_0xcd93('0x38')],{'$or':_[_0xcd93('0x2c')](_0x4a194e,function(_0x344734){if(_0x344734[_0xcd93('0x2a')]!==_0xcd93('0x3b')){var _0x14c4cf={};_0x14c4cf[_0x344734[_0xcd93('0x3c')]]={'$like':'%'+_0x554c20[_0xcd93('0x2d')][_0xcd93('0x3d')]+'%'};return _0x14c4cf;}})});}_0x52b7af=_[_0xcd93('0x3a')]({},_0x52b7af,_0x554c20['options']);var _0x1b8051={'where':_0x52b7af[_0xcd93('0x38')]};return db[_0xcd93('0x29')]['count'](_0x1b8051)[_0xcd93('0x22')](function(_0x34a3c7){_0x4a67c5[_0xcd93('0x1c')]=_0x34a3c7;if(_0x554c20[_0xcd93('0x2d')]['includeAll']){_0x52b7af[_0xcd93('0x3e')]=[{'all':!![]}];}return db['Schedule'][_0xcd93('0x3f')](_0x52b7af);})[_0xcd93('0x22')](function(_0x36b076){_0x4a67c5[_0xcd93('0x40')]=_0x36b076;return _0x4a67c5;})[_0xcd93('0x22')](respondWithFilteredResult(_0x5a21c3,_0x52b7af))[_0xcd93('0x41')](handleError(_0x5a21c3,null));};exports[_0xcd93('0x42')]=function(_0x194523,_0x2d57ad){var _0x6061c3={'raw':![],'where':{'id':_0x194523[_0xcd93('0x43')]['id']}},_0x2b44e8={};_0x2b44e8['model']=_[_0xcd93('0x2e')](db[_0xcd93('0x29')][_0xcd93('0x44')]);_0x2b44e8[_0xcd93('0x2d')]=_[_0xcd93('0x2e')](_0x194523[_0xcd93('0x2d')]);_0x2b44e8[_0xcd93('0x2f')]=_['intersection'](_0x2b44e8[_0xcd93('0x31')],_0x2b44e8[_0xcd93('0x2d')]);_0x6061c3[_0xcd93('0x32')]=_['intersection'](_0x2b44e8[_0xcd93('0x31')],qs[_0xcd93('0x33')](_0x194523[_0xcd93('0x2d')]['fields']));_0x6061c3[_0xcd93('0x32')]=_0x6061c3[_0xcd93('0x32')][_0xcd93('0x34')]?_0x6061c3['attributes']:_0x2b44e8['model'];if(_0x194523[_0xcd93('0x2d')]['includeAll']){_0x6061c3[_0xcd93('0x3e')]=[{'all':!![]}];}_0x6061c3=_['merge']({},_0x6061c3,_0x194523['options']);return db[_0xcd93('0x29')][_0xcd93('0x45')](_0x6061c3)[_0xcd93('0x22')](handleEntityNotFound(_0x2d57ad,null))[_0xcd93('0x22')](respondWithResult(_0x2d57ad,null))[_0xcd93('0x41')](handleError(_0x2d57ad,null));};exports[_0xcd93('0x46')]=function(_0x6ca3fc,_0x95dc46){return db[_0xcd93('0x29')]['create'](_0x6ca3fc[_0xcd93('0x47')],{})[_0xcd93('0x22')](function(_0x2ea69c){var _0x1786a5=_0x6ca3fc[_0xcd93('0x48')][_0xcd93('0x49')]({'plain':!![]});if(!_0x1786a5)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x1786a5['role']==='user'){var _0x39b6d1=_0x2ea69c[_0xcd93('0x49')]({'plain':!![]});var _0x574e98=_0xcd93('0x24');return db[_0xcd93('0x4a')][_0xcd93('0x45')]({'where':{'name':_0x574e98,'userProfileId':_0x1786a5[_0xcd93('0x4b')]},'raw':!![]})[_0xcd93('0x22')](function(_0x389cd4){if(_0x389cd4&&_0x389cd4[_0xcd93('0x4c')]===0x0){return db[_0xcd93('0x25')][_0xcd93('0x46')]({'name':_0x39b6d1['name'],'resourceId':_0x39b6d1['id'],'type':_0x389cd4[_0xcd93('0x3c')],'sectionId':_0x389cd4['id']},{})['then'](function(){return _0x2ea69c;});}else{return _0x2ea69c;}})['catch'](function(_0xd6b7c9){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0xd6b7c9);throw _0xd6b7c9;});}return _0x2ea69c;})['then'](respondWithResult(_0x95dc46,0xc9))['catch'](handleError(_0x95dc46,null));};exports[_0xcd93('0x21')]=function(_0x112043,_0x188449){if(_0x112043[_0xcd93('0x47')]['id']){delete _0x112043[_0xcd93('0x47')]['id'];}return db[_0xcd93('0x29')][_0xcd93('0x45')]({'where':{'id':_0x112043[_0xcd93('0x43')]['id']}})[_0xcd93('0x22')](handleEntityNotFound(_0x188449,null))[_0xcd93('0x22')](saveUpdates(_0x112043[_0xcd93('0x47')],null))[_0xcd93('0x22')](respondWithResult(_0x188449,null))[_0xcd93('0x41')](handleError(_0x188449,null));};exports[_0xcd93('0x23')]=function(_0x11348b,_0x3246b6){return db['Schedule'][_0xcd93('0x45')]({'where':{'id':_0x11348b[_0xcd93('0x43')]['id']}})[_0xcd93('0x22')](handleEntityNotFound(_0x3246b6,null))[_0xcd93('0x22')](removeEntity(_0x3246b6,null))['catch'](handleError(_0x3246b6,null));};exports[_0xcd93('0x4d')]=function(_0x1558a1,_0x18293a,_0x2a998a){var _0x458765=require(_0xcd93('0x4e'));return db[_0xcd93('0x29')][_0xcd93('0x45')]({'where':{'id':_0x1558a1[_0xcd93('0x43')]['id']},'raw':!![]})['then'](handleEntityNotFound(_0x18293a,null))[_0xcd93('0x22')](function(){_0x458765['run'](_0x1558a1[_0xcd93('0x43')]['id']);})[_0xcd93('0x22')](respondWithStatusCode(_0x18293a,null))[_0xcd93('0x41')](handleError(_0x18293a,null));};
\ No newline at end of file
index 4c44f83..8157563 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2c90=['request-promise','path','rimraf','../../config/environment','./schedule.attributes','exports','define','Schedule','lodash','util','../../config/logger','api','bluebird'];(function(_0x5e4f7c,_0x4a990a){var _0x55a20b=function(_0x1bd3eb){while(--_0x1bd3eb){_0x5e4f7c['push'](_0x5e4f7c['shift']());}};_0x55a20b(++_0x4a990a);}(_0x2c90,0x181));var _0x02c9=function(_0x326ad1,_0x289898){_0x326ad1=_0x326ad1-0x0;var _0x4683d1=_0x2c90[_0x326ad1];return _0x4683d1;};'use strict';var _=require(_0x02c9('0x0'));var util=require(_0x02c9('0x1'));var logger=require(_0x02c9('0x2'))(_0x02c9('0x3'));var moment=require('moment');var BPromise=require(_0x02c9('0x4'));var rp=require(_0x02c9('0x5'));var fs=require('fs');var path=require(_0x02c9('0x6'));var rimraf=require(_0x02c9('0x7'));var config=require(_0x02c9('0x8'));var attributes=require(_0x02c9('0x9'));module[_0x02c9('0xa')]=function(_0x5316b5,_0x4cc415){return _0x5316b5[_0x02c9('0xb')](_0x02c9('0xc'),attributes,{'tableName':'tools_schedules','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xe21d=['bluebird','request-promise','path','rimraf','../../config/environment','./schedule.attributes','exports','define','Schedule','tools_schedules','lodash','../../config/logger','api','moment'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xe21d,0x1a0));var _0xde21=function(_0x55cdb2,_0x251fc2){_0x55cdb2=_0x55cdb2-0x0;var _0x1408b2=_0xe21d[_0x55cdb2];return _0x1408b2;};'use strict';var _=require(_0xde21('0x0'));var util=require('util');var logger=require(_0xde21('0x1'))(_0xde21('0x2'));var moment=require(_0xde21('0x3'));var BPromise=require(_0xde21('0x4'));var rp=require(_0xde21('0x5'));var fs=require('fs');var path=require(_0xde21('0x6'));var rimraf=require(_0xde21('0x7'));var config=require(_0xde21('0x8'));var attributes=require(_0xde21('0x9'));module[_0xde21('0xa')]=function(_0x4c0be2,_0x38d953){return _0x4c0be2[_0xde21('0xb')](_0xde21('0xc'),attributes,{'tableName':_0xde21('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index d7307e3..51faff8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe6d9=['message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','request','then','info','Schedule,\x20%s,\x20%s','request\x20sent','stringify','error'];(function(_0x5f2fea,_0x9fde07){var _0x198a0c=function(_0x2bb11a){while(--_0x2bb11a){_0x5f2fea['push'](_0x5f2fea['shift']());}};_0x198a0c(++_0x9fde07);}(_0xe6d9,0x9d));var _0x9e6d=function(_0x243c52,_0x496529){_0x243c52=_0x243c52-0x0;var _0x492280=_0xe6d9[_0x243c52];return _0x492280;};'use strict';var _=require(_0x9e6d('0x0'));var util=require(_0x9e6d('0x1'));var moment=require(_0x9e6d('0x2'));var BPromise=require(_0x9e6d('0x3'));var rs=require(_0x9e6d('0x4'));var fs=require('fs');var Redis=require(_0x9e6d('0x5'));var db=require(_0x9e6d('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x9e6d('0x7'))(_0x9e6d('0x8'));var config=require('../../config/environment');var jayson=require(_0x9e6d('0x9'));var client=jayson[_0x9e6d('0xa')][_0x9e6d('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x9dc81,_0x5f25fa,_0x1b58ba){return new BPromise(function(_0x18e8fa,_0x1c6bb4){return client[_0x9e6d('0xc')](_0x9dc81,_0x1b58ba)[_0x9e6d('0xd')](function(_0x4c0bad){logger[_0x9e6d('0xe')](_0x9e6d('0xf'),_0x5f25fa,'request\x20sent');logger['debug']('Schedule,\x20%s,\x20%s,\x20%s',_0x5f25fa,_0x9e6d('0x10'),JSON[_0x9e6d('0x11')](_0x4c0bad));if(_0x4c0bad[_0x9e6d('0x12')]){if(_0x4c0bad['error']['code']===0x1f4){logger['error'](_0x9e6d('0xf'),_0x5f25fa,_0x4c0bad[_0x9e6d('0x12')][_0x9e6d('0x13')]);return _0x1c6bb4(_0x4c0bad[_0x9e6d('0x12')][_0x9e6d('0x13')]);}logger['error'](_0x9e6d('0xf'),_0x5f25fa,_0x4c0bad[_0x9e6d('0x12')][_0x9e6d('0x13')]);return _0x18e8fa(_0x4c0bad['error']['message']);}else{logger['info']('Schedule,\x20%s,\x20%s',_0x5f25fa,_0x9e6d('0x10'));_0x18e8fa(_0x4c0bad[_0x9e6d('0x14')][_0x9e6d('0x13')]);}})[_0x9e6d('0x15')](function(_0x295031){logger[_0x9e6d('0x12')](_0x9e6d('0xf'),_0x5f25fa,_0x295031);_0x1c6bb4(_0x295031);});});}
\ No newline at end of file
+var _0xfcff=['then','request\x20sent','debug','Schedule,\x20%s,\x20%s,\x20%s','stringify','error','code','Schedule,\x20%s,\x20%s','message','info','result','catch','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request'];(function(_0x57e35c,_0x427579){var _0x1b8e3f=function(_0x4bdfc4){while(--_0x4bdfc4){_0x57e35c['push'](_0x57e35c['shift']());}};_0x1b8e3f(++_0x427579);}(_0xfcff,0x18c));var _0xffcf=function(_0x170f4f,_0x504af6){_0x170f4f=_0x170f4f-0x0;var _0xe7748c=_0xfcff[_0x170f4f];return _0xe7748c;};'use strict';var _=require(_0xffcf('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xffcf('0x1'));var rs=require(_0xffcf('0x2'));var fs=require('fs');var Redis=require(_0xffcf('0x3'));var db=require(_0xffcf('0x4'))['db'];var utils=require(_0xffcf('0x5'));var logger=require(_0xffcf('0x6'))(_0xffcf('0x7'));var config=require('../../config/environment');var jayson=require(_0xffcf('0x8'));var client=jayson[_0xffcf('0x9')][_0xffcf('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x26af16,_0x5ad5c0,_0x8771c){return new BPromise(function(_0xe095e1,_0x1f7ec9){return client[_0xffcf('0xb')](_0x26af16,_0x8771c)[_0xffcf('0xc')](function(_0x5cedc8){logger['info']('Schedule,\x20%s,\x20%s',_0x5ad5c0,_0xffcf('0xd'));logger[_0xffcf('0xe')](_0xffcf('0xf'),_0x5ad5c0,'request\x20sent',JSON[_0xffcf('0x10')](_0x5cedc8));if(_0x5cedc8[_0xffcf('0x11')]){if(_0x5cedc8['error'][_0xffcf('0x12')]===0x1f4){logger['error'](_0xffcf('0x13'),_0x5ad5c0,_0x5cedc8[_0xffcf('0x11')][_0xffcf('0x14')]);return _0x1f7ec9(_0x5cedc8[_0xffcf('0x11')][_0xffcf('0x14')]);}logger[_0xffcf('0x11')](_0xffcf('0x13'),_0x5ad5c0,_0x5cedc8[_0xffcf('0x11')][_0xffcf('0x14')]);return _0xe095e1(_0x5cedc8['error'][_0xffcf('0x14')]);}else{logger[_0xffcf('0x15')](_0xffcf('0x13'),_0x5ad5c0,'request\x20sent');_0xe095e1(_0x5cedc8[_0xffcf('0x16')][_0xffcf('0x14')]);}})[_0xffcf('0x17')](function(_0x4bd3e8){logger['error'](_0xffcf('0x13'),_0x5ad5c0,_0x4bd3e8);_0x1f7ec9(_0x4bd3e8);});});}
\ No newline at end of file
index 9cc68a8..e6c280f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xff3f=['multer','util','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./screenRecording.controller','get','isAuthenticated','index','/describe','/:id','show','post','create','put','delete','exports'];(function(_0x1f74e7,_0x5efe6b){var _0x139a69=function(_0x3ab5da){while(--_0x3ab5da){_0x1f74e7['push'](_0x1f74e7['shift']());}};_0x139a69(++_0x5efe6b);}(_0xff3f,0x190));var _0xfff3=function(_0x2d4421,_0x15a84f){_0x2d4421=_0x2d4421-0x0;var _0x2d3b01=_0xff3f[_0x2d4421];return _0x2d3b01;};'use strict';var multer=require(_0xfff3('0x0'));var util=require(_0xfff3('0x1'));var path=require(_0xfff3('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xfff3('0x3')]();var fs_extra=require(_0xfff3('0x4'));var auth=require(_0xfff3('0x5'));var interaction=require(_0xfff3('0x6'));var config=require(_0xfff3('0x7'));var controller=require(_0xfff3('0x8'));router[_0xfff3('0x9')]('/',auth[_0xfff3('0xa')](),controller[_0xfff3('0xb')]);router['get'](_0xfff3('0xc'),auth[_0xfff3('0xa')](),controller['describe']);router[_0xfff3('0x9')](_0xfff3('0xd'),auth[_0xfff3('0xa')](),controller[_0xfff3('0xe')]);router[_0xfff3('0x9')]('/:id/download',auth[_0xfff3('0xa')](),controller['download']);router[_0xfff3('0xf')]('/',auth[_0xfff3('0xa')](),controller[_0xfff3('0x10')]);router[_0xfff3('0x11')](_0xfff3('0xd'),auth[_0xfff3('0xa')](),controller['update']);router[_0xfff3('0x12')](_0xfff3('0xd'),auth[_0xfff3('0xa')](),controller['destroy']);module[_0xfff3('0x13')]=router;
\ No newline at end of file
+var _0x5bae=['/:id/download','download','post','create','put','exports','multer','util','express','../../components/auth/service','../../config/environment','./screenRecording.controller','get','index','/describe','isAuthenticated','describe','/:id','show'];(function(_0x5693dc,_0x21b148){var _0x1067aa=function(_0x2f513f){while(--_0x2f513f){_0x5693dc['push'](_0x5693dc['shift']());}};_0x1067aa(++_0x21b148);}(_0x5bae,0x195));var _0xe5ba=function(_0x2368ab,_0x35932d){_0x2368ab=_0x2368ab-0x0;var _0x5f1789=_0x5bae[_0x2368ab];return _0x5f1789;};'use strict';var multer=require(_0xe5ba('0x0'));var util=require(_0xe5ba('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xe5ba('0x2'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xe5ba('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0xe5ba('0x4'));var controller=require(_0xe5ba('0x5'));router[_0xe5ba('0x6')]('/',auth['isAuthenticated'](),controller[_0xe5ba('0x7')]);router[_0xe5ba('0x6')](_0xe5ba('0x8'),auth[_0xe5ba('0x9')](),controller[_0xe5ba('0xa')]);router['get'](_0xe5ba('0xb'),auth[_0xe5ba('0x9')](),controller[_0xe5ba('0xc')]);router[_0xe5ba('0x6')](_0xe5ba('0xd'),auth['isAuthenticated'](),controller[_0xe5ba('0xe')]);router[_0xe5ba('0xf')]('/',auth['isAuthenticated'](),controller[_0xe5ba('0x10')]);router[_0xe5ba('0x11')](_0xe5ba('0xb'),auth[_0xe5ba('0x9')](),controller['update']);router['delete'](_0xe5ba('0xb'),auth[_0xe5ba('0x9')](),controller['destroy']);module[_0xe5ba('0x12')]=router;
\ No newline at end of file
index 588109a..8e43be1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x236c=['DATE','format','toString','MM-DD-YYYY\x20HH:mm','updatedAt','sequelize','path','../../config/environment','exports','VIRTUAL','getDataValue','extname','value','STRING','replace','INTEGER','setDataValue','startedAt','subtract','closedAt','duration'];(function(_0x16c1a5,_0x17dfb0){var _0x421b5e=function(_0x2813d2){while(--_0x2813d2){_0x16c1a5['push'](_0x16c1a5['shift']());}};_0x421b5e(++_0x17dfb0);}(_0x236c,0x155));var _0xc236=function(_0x5ac8e6,_0x1983c8){_0x5ac8e6=_0x5ac8e6-0x0;var _0x52a564=_0x236c[_0x5ac8e6];return _0x52a564;};'use strict';var Sequelize=require(_0xc236('0x0'));var moment=require('moment');var path=require(_0xc236('0x1'));var config=require(_0xc236('0x2'));module[_0xc236('0x3')]={'format':{'type':Sequelize[_0xc236('0x4')],'get':function(){return this[_0xc236('0x5')]('value')?path[_0xc236('0x6')](this[_0xc236('0x5')](_0xc236('0x7'))):undefined;}},'interactionid':{'type':Sequelize[_0xc236('0x8')]},'channel':{'type':Sequelize[_0xc236('0x8')]},'value':{'type':Sequelize[_0xc236('0x8')],'set':function(_0x5abd65){var _0xd612c6=_0x5abd65[_0xc236('0x9')](/\\/g,'/');this['setDataValue']('value',_0xd612c6);}},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0xc236('0xa')],'set':function(_0x4b8dc6){this[_0xc236('0xb')](_0xc236('0xc'),moment()[_0xc236('0xd')](_0x4b8dc6,'ms'));this[_0xc236('0xb')](_0xc236('0xe'),moment());this['setDataValue'](_0xc236('0xf'),_0x4b8dc6);}},'startedAt':{'type':Sequelize[_0xc236('0x10')],'get':function(){return moment(this['getDataValue'](_0xc236('0xc')))[_0xc236('0x11')]('MM-DD-YYYY\x20HH:mm')[_0xc236('0x12')]();}},'closedAt':{'type':Sequelize['DATE'],'get':function(){return moment(this['getDataValue'](_0xc236('0xe')))[_0xc236('0x11')](_0xc236('0x13'))[_0xc236('0x12')]();}},'createdAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0xc236('0x5')]('createdAt'))['format'](_0xc236('0x13'))[_0xc236('0x12')]();}},'updatedAt':{'type':Sequelize[_0xc236('0x10')],'get':function(){return moment(this[_0xc236('0x5')](_0xc236('0x14')))['format']('MM-DD-YYYY\x20HH:mm')['toString']();}}};
\ No newline at end of file
+var _0xc893=['format','MM-DD-YYYY\x20HH:mm','toString','createdAt','updatedAt','moment','path','VIRTUAL','getDataValue','value','extname','STRING','replace','startedAt','subtract','closedAt','setDataValue','duration','DATE'];(function(_0x14a0a0,_0x45d0cf){var _0x56b651=function(_0x1fae09){while(--_0x1fae09){_0x14a0a0['push'](_0x14a0a0['shift']());}};_0x56b651(++_0x45d0cf);}(_0xc893,0x194));var _0x3c89=function(_0x92b5e3,_0x5e880f){_0x92b5e3=_0x92b5e3-0x0;var _0x13d015=_0xc893[_0x92b5e3];return _0x13d015;};'use strict';var Sequelize=require('sequelize');var moment=require(_0x3c89('0x0'));var path=require(_0x3c89('0x1'));var config=require('../../config/environment');module['exports']={'format':{'type':Sequelize[_0x3c89('0x2')],'get':function(){return this[_0x3c89('0x3')](_0x3c89('0x4'))?path[_0x3c89('0x5')](this[_0x3c89('0x3')](_0x3c89('0x4'))):undefined;}},'interactionid':{'type':Sequelize[_0x3c89('0x6')]},'channel':{'type':Sequelize['STRING']},'value':{'type':Sequelize[_0x3c89('0x6')],'set':function(_0x1a0ec4){var _0x189b7=_0x1a0ec4[_0x3c89('0x7')](/\\/g,'/');this['setDataValue'](_0x3c89('0x4'),_0x189b7);}},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize['INTEGER'],'set':function(_0x3cfe79){this['setDataValue'](_0x3c89('0x8'),moment()[_0x3c89('0x9')](_0x3cfe79,'ms'));this['setDataValue'](_0x3c89('0xa'),moment());this[_0x3c89('0xb')](_0x3c89('0xc'),_0x3cfe79);}},'startedAt':{'type':Sequelize[_0x3c89('0xd')],'get':function(){return moment(this[_0x3c89('0x3')](_0x3c89('0x8')))[_0x3c89('0xe')](_0x3c89('0xf'))[_0x3c89('0x10')]();}},'closedAt':{'type':Sequelize[_0x3c89('0xd')],'get':function(){return moment(this[_0x3c89('0x3')](_0x3c89('0xa')))[_0x3c89('0xe')](_0x3c89('0xf'))['toString']();}},'createdAt':{'type':Sequelize[_0x3c89('0xd')],'get':function(){return moment(this[_0x3c89('0x3')](_0x3c89('0x11')))[_0x3c89('0xe')](_0x3c89('0xf'))[_0x3c89('0x10')]();}},'updatedAt':{'type':Sequelize[_0x3c89('0xd')],'get':function(){return moment(this[_0x3c89('0x3')](_0x3c89('0x12')))[_0x3c89('0xe')](_0x3c89('0xf'))['toString']();}}};
\ No newline at end of file
index b0e6782..ed29dd5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x032e=['status','json','offset','undefined','limit','count','Content-Range','apply','reject','update','then','error','name','send','rawAttributes','fieldName','type','model','differenceBy','map','format','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','ScreenRecording','rows','catch','show','find','create','body','createdAt','closedAt','value','params','describe','download','../../components/encryptor','uniqueid','join','root','server/files/screen_recordings','%s.cypher','existsSync','decryptFile','secrets','recording','ValidationError','ScreenRecording\x20not\x20found','filename','extname','unlink','message','Not\x20found','isNil','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','.cypher','unlinkSync','destroy','eml-format','zip-dir','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','ejs','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','../../config/license/util','sendStatus','end'];(function(_0xf617bf,_0x47a280){var _0x26722a=function(_0x451cda){while(--_0x451cda){_0xf617bf['push'](_0xf617bf['shift']());}};_0x26722a(++_0x47a280);}(_0x032e,0x124));var _0xe032=function(_0x29b609,_0x19d388){_0x29b609=_0x29b609-0x0;var _0x54c952=_0x032e[_0x29b609];return _0x54c952;};'use strict';var emlformat=require(_0xe032('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xe032('0x1'));var jsonpatch=require(_0xe032('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xe032('0x3'));var Mustache=require(_0xe032('0x4'));var util=require(_0xe032('0x5'));var path=require(_0xe032('0x6'));var sox=require(_0xe032('0x7'));var csv=require(_0xe032('0x8'));var ejs=require(_0xe032('0x9'));var fs=require('fs');var fs_extra=require(_0xe032('0xa'));var _=require(_0xe032('0xb'));var squel=require(_0xe032('0xc'));var crypto=require(_0xe032('0xd'));var jsforce=require(_0xe032('0xe'));var deskjs=require(_0xe032('0xf'));var toCsv=require(_0xe032('0x8'));var querystring=require(_0xe032('0x10'));var Papa=require(_0xe032('0x11'));var Redis=require(_0xe032('0x12'));var authService=require(_0xe032('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0xe032('0x14'));var hardwareService=require(_0xe032('0x15'));var logger=require(_0xe032('0x16'))(_0xe032('0x17'));var utils=require(_0xe032('0x18'));var config=require(_0xe032('0x19'));var licenseUtil=require(_0xe032('0x1a'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x646979,_0x266d71){_0x266d71=_0x266d71||0xcc;return function(_0x28c2b6){if(_0x28c2b6){return _0x646979[_0xe032('0x1b')](_0x266d71);}return _0x646979['status'](_0x266d71)[_0xe032('0x1c')]();};}function respondWithResult(_0x2e267b,_0x176547){_0x176547=_0x176547||0xc8;return function(_0x422e96){if(_0x422e96){return _0x2e267b[_0xe032('0x1d')](_0x176547)[_0xe032('0x1e')](_0x422e96);}};}function respondWithFilteredResult(_0x2bf528,_0x4da5b7){return function(_0x231c35){if(_0x231c35){var _0x749018=typeof _0x4da5b7[_0xe032('0x1f')]===_0xe032('0x20')&&typeof _0x4da5b7[_0xe032('0x21')]===_0xe032('0x20');var _0x4cdab3=_0x231c35[_0xe032('0x22')];var _0x25cedb=_0x749018?0x0:_0x4da5b7[_0xe032('0x1f')];var _0x41d2a5=_0x749018?_0x231c35[_0xe032('0x22')]:_0x4da5b7['offset']+_0x4da5b7['limit'];var _0x484e6c;if(_0x41d2a5>=_0x4cdab3){_0x41d2a5=_0x4cdab3;_0x484e6c=0xc8;}else{_0x484e6c=0xce;}_0x2bf528[_0xe032('0x1d')](_0x484e6c);return _0x2bf528['set'](_0xe032('0x23'),_0x25cedb+'-'+_0x41d2a5+'/'+_0x4cdab3)[_0xe032('0x1e')](_0x231c35);}return null;};}function patchUpdates(_0x3f0257){return function(_0x2aa342){try{jsonpatch[_0xe032('0x24')](_0x2aa342,_0x3f0257,!![]);}catch(_0x256f71){return BPromise[_0xe032('0x25')](_0x256f71);}return _0x2aa342['save']();};}function saveUpdates(_0x32f8b6,_0x866c81){return function(_0x232e8f){if(_0x232e8f){return _0x232e8f[_0xe032('0x26')](_0x32f8b6)[_0xe032('0x27')](function(_0x33d89a){return _0x33d89a;});}return null;};}function removeEntity(_0x22831a,_0xe89aa7){return function(_0x499da5){if(_0x499da5){return _0x499da5['destroy']()['then'](function(){_0x22831a[_0xe032('0x1d')](0xcc)[_0xe032('0x1c')]();});}};}function handleEntityNotFound(_0x302559,_0x2a56e5){return function(_0x2bfe8f){if(!_0x2bfe8f){_0x302559[_0xe032('0x1b')](0x194);}return _0x2bfe8f;};}function handleError(_0x36ece7,_0x2b6ffa){_0x2b6ffa=_0x2b6ffa||0x1f4;return function(_0x4dcbf1){logger[_0xe032('0x28')](_0x4dcbf1['stack']);if(_0x4dcbf1[_0xe032('0x29')]){delete _0x4dcbf1[_0xe032('0x29')];}_0x36ece7[_0xe032('0x1d')](_0x2b6ffa)[_0xe032('0x2a')](_0x4dcbf1);};}exports['index']=function(_0x5573e4,_0x3e2575){var _0x38e7ea={},_0x469290={},_0xae116e={'count':0x0,'rows':[]};var _0x4e8b72=_['map'](db['ScreenRecording'][_0xe032('0x2b')],function(_0x1dd34f){return{'name':_0x1dd34f[_0xe032('0x2c')],'type':_0x1dd34f[_0xe032('0x2d')]['key']};});_0x469290[_0xe032('0x2e')]=_[_0xe032('0x2f')](_[_0xe032('0x30')](_0x4e8b72,_0xe032('0x29')),[_0xe032('0x31')]);_0x469290['query']=_[_0xe032('0x32')](_0x5573e4[_0xe032('0x33')]);_0x469290[_0xe032('0x34')]=_[_0xe032('0x35')](_0x469290['model'],_0x469290[_0xe032('0x33')]);_0x38e7ea['attributes']=_[_0xe032('0x35')](_0x469290['model'],qs[_0xe032('0x36')](_0x5573e4['query'][_0xe032('0x36')]));_0x38e7ea['attributes']=_0x38e7ea[_0xe032('0x37')][_0xe032('0x38')]?_0x38e7ea['attributes']:_0x469290[_0xe032('0x2e')];if(!_0x5573e4[_0xe032('0x33')][_0xe032('0x39')](_0xe032('0x3a'))){_0x38e7ea['limit']=qs[_0xe032('0x21')](_0x5573e4['query'][_0xe032('0x21')]);_0x38e7ea[_0xe032('0x1f')]=qs['offset'](_0x5573e4[_0xe032('0x33')][_0xe032('0x1f')]);}_0x38e7ea['order']=qs[_0xe032('0x3b')](_0x5573e4[_0xe032('0x33')][_0xe032('0x3b')]);_0x38e7ea[_0xe032('0x3c')]=qs[_0xe032('0x34')](_[_0xe032('0x3d')](_0x5573e4[_0xe032('0x33')],_0x469290[_0xe032('0x34')]),_0x4e8b72);if(_0x5573e4[_0xe032('0x33')][_0xe032('0x3e')]){_0x38e7ea[_0xe032('0x3c')]=_[_0xe032('0x3f')](_0x38e7ea[_0xe032('0x3c')],{'$or':_[_0xe032('0x30')](_0x4e8b72,function(_0x39af44){if(_0x39af44[_0xe032('0x2d')]!==_0xe032('0x40')){var _0x555914={};_0x555914[_0x39af44[_0xe032('0x29')]]={'$like':'%'+_0x5573e4['query'][_0xe032('0x3e')]+'%'};return _0x555914;}})});}_0x38e7ea=_[_0xe032('0x3f')]({},_0x38e7ea,_0x5573e4[_0xe032('0x41')]);var _0x119790={'where':_0x38e7ea[_0xe032('0x3c')]};return db['ScreenRecording'][_0xe032('0x22')](_0x119790)['then'](function(_0x46ea84){_0xae116e['count']=_0x46ea84;if(_0x5573e4[_0xe032('0x33')][_0xe032('0x42')]){_0x38e7ea[_0xe032('0x43')]=[{'all':!![]}];}return db[_0xe032('0x44')]['findAll'](_0x38e7ea);})[_0xe032('0x27')](function(_0x5a6450){_0xae116e[_0xe032('0x45')]=_0x5a6450;return _0xae116e;})[_0xe032('0x27')](respondWithFilteredResult(_0x3e2575,_0x38e7ea))[_0xe032('0x46')](handleError(_0x3e2575,null));};exports[_0xe032('0x47')]=function(_0x4b58eb,_0x513b0c){var _0x45345d={'raw':![],'where':{'id':_0x4b58eb['params']['id']}},_0x203021={};_0x203021[_0xe032('0x2e')]=_[_0xe032('0x32')](db[_0xe032('0x44')][_0xe032('0x2b')]);_0x203021[_0xe032('0x33')]=_['keys'](_0x4b58eb[_0xe032('0x33')]);_0x203021[_0xe032('0x34')]=_[_0xe032('0x35')](_0x203021[_0xe032('0x2e')],_0x203021[_0xe032('0x33')]);_0x45345d[_0xe032('0x37')]=_[_0xe032('0x35')](_0x203021[_0xe032('0x2e')],qs['fields'](_0x4b58eb['query'][_0xe032('0x36')]));_0x45345d['attributes']=_0x45345d[_0xe032('0x37')][_0xe032('0x38')]?_0x45345d[_0xe032('0x37')]:_0x203021[_0xe032('0x2e')];if(_0x4b58eb[_0xe032('0x33')][_0xe032('0x42')]){_0x45345d[_0xe032('0x43')]=[{'all':!![]}];}_0x45345d=_[_0xe032('0x3f')]({},_0x45345d,_0x4b58eb[_0xe032('0x41')]);return db['ScreenRecording'][_0xe032('0x48')](_0x45345d)['then'](handleEntityNotFound(_0x513b0c,null))['then'](respondWithResult(_0x513b0c,null))[_0xe032('0x46')](handleError(_0x513b0c,null));};exports[_0xe032('0x49')]=function(_0x62bfc8,_0x1e54d3){return db['ScreenRecording'][_0xe032('0x49')](_0x62bfc8[_0xe032('0x4a')],{})[_0xe032('0x27')](respondWithResult(_0x1e54d3,0xc9))[_0xe032('0x46')](handleError(_0x1e54d3,null));};exports[_0xe032('0x26')]=function(_0x233d9e,_0x3774bc){if(_0x233d9e['body']['id']){delete _0x233d9e[_0xe032('0x4a')]['id'];}delete _0x233d9e[_0xe032('0x4a')]['duration'];delete _0x233d9e[_0xe032('0x4a')][_0xe032('0x4b')];delete _0x233d9e[_0xe032('0x4a')][_0xe032('0x4c')];delete _0x233d9e[_0xe032('0x4a')][_0xe032('0x4d')];return db[_0xe032('0x44')][_0xe032('0x48')]({'where':{'id':_0x233d9e[_0xe032('0x4e')]['id']}})[_0xe032('0x27')](handleEntityNotFound(_0x3774bc,null))[_0xe032('0x27')](saveUpdates(_0x233d9e[_0xe032('0x4a')],null))[_0xe032('0x27')](respondWithResult(_0x3774bc,null))[_0xe032('0x46')](handleError(_0x3774bc,null));};exports['describe']=function(_0x1c8b32,_0x53c8b2){return db[_0xe032('0x44')][_0xe032('0x4f')]()[_0xe032('0x27')](respondWithResult(_0x53c8b2,null))[_0xe032('0x46')](handleError(_0x53c8b2,null));};exports[_0xe032('0x50')]=function(_0x1b7a91,_0x2e29d3,_0xa98ee6){var _0x16c91e=require(_0xe032('0x51'));var _0x1b9012=![];var _0x564fe0={};if(_0x1b7a91[_0xe032('0x33')][_0xe032('0x2d')]&&_0x1b7a91['query'][_0xe032('0x2d')]==='uniqueid'){_0x564fe0[_0xe032('0x52')]=_0x1b7a91[_0xe032('0x4e')]['id'];}else{_0x564fe0['id']=_0x1b7a91[_0xe032('0x4e')]['id'];}return db[_0xe032('0x44')][_0xe032('0x48')]({'where':_0x564fe0,'attributes':['id','value'],'raw':!![]})[_0xe032('0x27')](handleEntityNotFound(_0x2e29d3,null))[_0xe032('0x27')](function(_0x1e1277){if(_0x1e1277){var _0x21a32f=path[_0xe032('0x53')](config[_0xe032('0x54')],_0xe032('0x55'),_0x1e1277['value']);var _0x3f46c0=util[_0xe032('0x31')](_0xe032('0x56'),_0x21a32f);if(fs[_0xe032('0x57')](_0x3f46c0)){_0x1b9012=!![];return _0x16c91e[_0xe032('0x58')](_0x3f46c0,_0x21a32f,config[_0xe032('0x59')][_0xe032('0x5a')])[_0xe032('0x27')](function(){return _0x1e1277;});}return _0x1e1277;}})[_0xe032('0x27')](function(_0x54c0b0){if(_0x54c0b0){var _0x795a58=path[_0xe032('0x53')](config[_0xe032('0x54')],'server/files/screen_recordings',_0x54c0b0[_0xe032('0x4d')]);if(!fs[_0xe032('0x57')](_0x795a58)){throw new db['Sequelize'][(_0xe032('0x5b'))](_0xe032('0x5c'));}if(_0x54c0b0[_0xe032('0x5d')]){return _0x2e29d3[_0xe032('0x50')](_0x795a58,_0x54c0b0[_0xe032('0x5d')]+path[_0xe032('0x5e')](_0x795a58),function(){if(_0x1b9012){fs[_0xe032('0x5f')](_0x795a58);}});}else{return _0x2e29d3[_0xe032('0x50')](_0x795a58,function(_0x1aa18e){if(_0x1b9012){fs[_0xe032('0x5f')](_0x795a58);}});}}})[_0xe032('0x46')](function(_0x505986){if(_0x505986[_0xe032('0x60')]===_0xe032('0x5c')){_0x2e29d3[_0xe032('0x1d')](0x194)[_0xe032('0x2a')](_0xe032('0x61'));}else{return handleError(_0x2e29d3,null);}});};exports['destroy']=function(_0x2b6ef8,_0x55e6b0){return db[_0xe032('0x44')][_0xe032('0x48')]({'where':{'id':_0x2b6ef8[_0xe032('0x4e')]['id']}})[_0xe032('0x27')](function(_0x3c5eb8){if(_[_0xe032('0x62')](_0x3c5eb8)){throw new ReferenceError(_0xe032('0x63'));}return _0x3c5eb8;})[_0xe032('0x27')](function(_0x22fd01){var _0x536510=path['join'](config['root'],_0xe032('0x55'),_0x22fd01[_0xe032('0x4d')]);logger[_0xe032('0x64')](_0xe032('0x65'),_0x536510);if(!_[_0xe032('0x62')](_0x22fd01[_0xe032('0x4d')])&&fs['existsSync'](_0x536510)){logger[_0xe032('0x64')](_0xe032('0x66')+_0x536510+_0xe032('0x67'));fs['unlinkSync'](_0x536510);}_0x536510=_0x536510+_0xe032('0x68');if(!_['isNil'](_0x22fd01[_0xe032('0x4d')])&&fs[_0xe032('0x57')](_0x536510)){logger['info']('File:\x20\x22'+_0x536510+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione');fs[_0xe032('0x69')](_0x536510);}return _0x22fd01;})['then'](function(_0x5157f7){if(!_0x5157f7)throw new InternalError();return _0x5157f7[_0xe032('0x6a')]();})[_0xe032('0x27')](function(){_0x55e6b0[_0xe032('0x1d')](0xcc)['end']();})[_0xe032('0x46')](handleError(_0x55e6b0,null));};
\ No newline at end of file
+var _0x008c=['papaparse','ioredis','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','end','status','json','offset','undefined','limit','count','save','update','then','destroy','sendStatus','send','index','ScreenRecording','rawAttributes','key','model','differenceBy','map','name','format','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','pick','where','type','VIRTUAL','filter','merge','options','include','findAll','catch','show','params','includeAll','find','create','body','duration','createdAt','closedAt','describe','../../components/encryptor','uniqueid','value','join','root','server/files/screen_recordings','decryptFile','secrets','recording','existsSync','ValidationError','filename','download','extname','unlink','message','ScreenRecording\x20not\x20found','Not\x20found','isNil','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','File:\x20\x22','unlinkSync','.cypher','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','desk.js'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0x008c,0x188));var _0xc008=function(_0x20961b,_0x121bba){_0x20961b=_0x20961b-0x0;var _0x48ad1c=_0x008c[_0x20961b];return _0x48ad1c;};'use strict';var emlformat=require(_0xc008('0x0'));var rimraf=require(_0xc008('0x1'));var zipdir=require(_0xc008('0x2'));var jsonpatch=require(_0xc008('0x3'));var rp=require(_0xc008('0x4'));var moment=require('moment');var BPromise=require(_0xc008('0x5'));var Mustache=require(_0xc008('0x6'));var util=require(_0xc008('0x7'));var path=require(_0xc008('0x8'));var sox=require(_0xc008('0x9'));var csv=require(_0xc008('0xa'));var ejs=require(_0xc008('0xb'));var fs=require('fs');var fs_extra=require(_0xc008('0xc'));var _=require(_0xc008('0xd'));var squel=require('squel');var crypto=require(_0xc008('0xe'));var jsforce=require('jsforce');var deskjs=require(_0xc008('0xf'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xc008('0x10'));var Redis=require(_0xc008('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc008('0x12'));var logger=require(_0xc008('0x13'))('api');var utils=require(_0xc008('0x14'));var config=require(_0xc008('0x15'));var licenseUtil=require(_0xc008('0x16'));var db=require(_0xc008('0x17'))['db'];function respondWithStatusCode(_0x9ffa93,_0x1819c6){_0x1819c6=_0x1819c6||0xcc;return function(_0x69726e){if(_0x69726e){return _0x9ffa93['sendStatus'](_0x1819c6);}return _0x9ffa93['status'](_0x1819c6)[_0xc008('0x18')]();};}function respondWithResult(_0x50c1ab,_0x25e13f){_0x25e13f=_0x25e13f||0xc8;return function(_0x4584e1){if(_0x4584e1){return _0x50c1ab[_0xc008('0x19')](_0x25e13f)[_0xc008('0x1a')](_0x4584e1);}};}function respondWithFilteredResult(_0x3f0ecf,_0x5ee00b){return function(_0x5e894e){if(_0x5e894e){var _0x4bd0f4=typeof _0x5ee00b[_0xc008('0x1b')]===_0xc008('0x1c')&&typeof _0x5ee00b[_0xc008('0x1d')]===_0xc008('0x1c');var _0x4fe771=_0x5e894e['count'];var _0x540e45=_0x4bd0f4?0x0:_0x5ee00b['offset'];var _0x46042b=_0x4bd0f4?_0x5e894e[_0xc008('0x1e')]:_0x5ee00b['offset']+_0x5ee00b[_0xc008('0x1d')];var _0x5906e6;if(_0x46042b>=_0x4fe771){_0x46042b=_0x4fe771;_0x5906e6=0xc8;}else{_0x5906e6=0xce;}_0x3f0ecf['status'](_0x5906e6);return _0x3f0ecf['set']('Content-Range',_0x540e45+'-'+_0x46042b+'/'+_0x4fe771)[_0xc008('0x1a')](_0x5e894e);}return null;};}function patchUpdates(_0x4b9726){return function(_0x5560b1){try{jsonpatch['apply'](_0x5560b1,_0x4b9726,!![]);}catch(_0x4a582d){return BPromise['reject'](_0x4a582d);}return _0x5560b1[_0xc008('0x1f')]();};}function saveUpdates(_0x4777a6,_0x251db2){return function(_0x415af3){if(_0x415af3){return _0x415af3[_0xc008('0x20')](_0x4777a6)[_0xc008('0x21')](function(_0x4f43e2){return _0x4f43e2;});}return null;};}function removeEntity(_0x459fd9,_0x5c85f2){return function(_0x58a6ea){if(_0x58a6ea){return _0x58a6ea[_0xc008('0x22')]()[_0xc008('0x21')](function(){_0x459fd9[_0xc008('0x19')](0xcc)[_0xc008('0x18')]();});}};}function handleEntityNotFound(_0x5410f5,_0x48582b){return function(_0x5de1e9){if(!_0x5de1e9){_0x5410f5[_0xc008('0x23')](0x194);}return _0x5de1e9;};}function handleError(_0x15dade,_0x92c582){_0x92c582=_0x92c582||0x1f4;return function(_0x2e31c2){logger['error'](_0x2e31c2['stack']);if(_0x2e31c2['name']){delete _0x2e31c2['name'];}_0x15dade['status'](_0x92c582)[_0xc008('0x24')](_0x2e31c2);};}exports[_0xc008('0x25')]=function(_0x25eae4,_0x529961){var _0x24c14c={},_0x32390d={},_0x209591={'count':0x0,'rows':[]};var _0x2a7d4f=_['map'](db[_0xc008('0x26')][_0xc008('0x27')],function(_0x53ed35){return{'name':_0x53ed35['fieldName'],'type':_0x53ed35['type'][_0xc008('0x28')]};});_0x32390d[_0xc008('0x29')]=_[_0xc008('0x2a')](_[_0xc008('0x2b')](_0x2a7d4f,_0xc008('0x2c')),[_0xc008('0x2d')]);_0x32390d[_0xc008('0x2e')]=_[_0xc008('0x2f')](_0x25eae4[_0xc008('0x2e')]);_0x32390d[_0xc008('0x30')]=_[_0xc008('0x31')](_0x32390d[_0xc008('0x29')],_0x32390d['query']);_0x24c14c[_0xc008('0x32')]=_[_0xc008('0x31')](_0x32390d['model'],qs[_0xc008('0x33')](_0x25eae4[_0xc008('0x2e')][_0xc008('0x33')]));_0x24c14c[_0xc008('0x32')]=_0x24c14c[_0xc008('0x32')][_0xc008('0x34')]?_0x24c14c[_0xc008('0x32')]:_0x32390d[_0xc008('0x29')];if(!_0x25eae4[_0xc008('0x2e')]['hasOwnProperty'](_0xc008('0x35'))){_0x24c14c[_0xc008('0x1d')]=qs[_0xc008('0x1d')](_0x25eae4[_0xc008('0x2e')][_0xc008('0x1d')]);_0x24c14c[_0xc008('0x1b')]=qs[_0xc008('0x1b')](_0x25eae4['query'][_0xc008('0x1b')]);}_0x24c14c[_0xc008('0x36')]=qs['sort'](_0x25eae4[_0xc008('0x2e')][_0xc008('0x37')]);_0x24c14c['where']=qs[_0xc008('0x30')](_[_0xc008('0x38')](_0x25eae4[_0xc008('0x2e')],_0x32390d['filters']),_0x2a7d4f);if(_0x25eae4['query']['filter']){_0x24c14c[_0xc008('0x39')]=_['merge'](_0x24c14c[_0xc008('0x39')],{'$or':_[_0xc008('0x2b')](_0x2a7d4f,function(_0x6a4ccb){if(_0x6a4ccb[_0xc008('0x3a')]!==_0xc008('0x3b')){var _0xa381d1={};_0xa381d1[_0x6a4ccb[_0xc008('0x2c')]]={'$like':'%'+_0x25eae4[_0xc008('0x2e')][_0xc008('0x3c')]+'%'};return _0xa381d1;}})});}_0x24c14c=_[_0xc008('0x3d')]({},_0x24c14c,_0x25eae4[_0xc008('0x3e')]);var _0xdfca2e={'where':_0x24c14c[_0xc008('0x39')]};return db[_0xc008('0x26')]['count'](_0xdfca2e)[_0xc008('0x21')](function(_0x23c4db){_0x209591[_0xc008('0x1e')]=_0x23c4db;if(_0x25eae4[_0xc008('0x2e')]['includeAll']){_0x24c14c[_0xc008('0x3f')]=[{'all':!![]}];}return db[_0xc008('0x26')][_0xc008('0x40')](_0x24c14c);})[_0xc008('0x21')](function(_0x2d142d){_0x209591['rows']=_0x2d142d;return _0x209591;})[_0xc008('0x21')](respondWithFilteredResult(_0x529961,_0x24c14c))[_0xc008('0x41')](handleError(_0x529961,null));};exports[_0xc008('0x42')]=function(_0x3e9a99,_0x7279e8){var _0x4f93a4={'raw':![],'where':{'id':_0x3e9a99[_0xc008('0x43')]['id']}},_0xf4cc4b={};_0xf4cc4b[_0xc008('0x29')]=_[_0xc008('0x2f')](db['ScreenRecording'][_0xc008('0x27')]);_0xf4cc4b[_0xc008('0x2e')]=_[_0xc008('0x2f')](_0x3e9a99['query']);_0xf4cc4b[_0xc008('0x30')]=_['intersection'](_0xf4cc4b[_0xc008('0x29')],_0xf4cc4b['query']);_0x4f93a4[_0xc008('0x32')]=_[_0xc008('0x31')](_0xf4cc4b['model'],qs[_0xc008('0x33')](_0x3e9a99[_0xc008('0x2e')][_0xc008('0x33')]));_0x4f93a4['attributes']=_0x4f93a4[_0xc008('0x32')][_0xc008('0x34')]?_0x4f93a4[_0xc008('0x32')]:_0xf4cc4b[_0xc008('0x29')];if(_0x3e9a99[_0xc008('0x2e')][_0xc008('0x44')]){_0x4f93a4['include']=[{'all':!![]}];}_0x4f93a4=_['merge']({},_0x4f93a4,_0x3e9a99['options']);return db[_0xc008('0x26')][_0xc008('0x45')](_0x4f93a4)[_0xc008('0x21')](handleEntityNotFound(_0x7279e8,null))[_0xc008('0x21')](respondWithResult(_0x7279e8,null))[_0xc008('0x41')](handleError(_0x7279e8,null));};exports[_0xc008('0x46')]=function(_0x2cf641,_0x33be4f){return db['ScreenRecording']['create'](_0x2cf641['body'],{})[_0xc008('0x21')](respondWithResult(_0x33be4f,0xc9))[_0xc008('0x41')](handleError(_0x33be4f,null));};exports[_0xc008('0x20')]=function(_0x511383,_0x28bc33){if(_0x511383[_0xc008('0x47')]['id']){delete _0x511383[_0xc008('0x47')]['id'];}delete _0x511383[_0xc008('0x47')][_0xc008('0x48')];delete _0x511383[_0xc008('0x47')][_0xc008('0x49')];delete _0x511383[_0xc008('0x47')][_0xc008('0x4a')];delete _0x511383[_0xc008('0x47')]['value'];return db['ScreenRecording'][_0xc008('0x45')]({'where':{'id':_0x511383['params']['id']}})[_0xc008('0x21')](handleEntityNotFound(_0x28bc33,null))[_0xc008('0x21')](saveUpdates(_0x511383[_0xc008('0x47')],null))['then'](respondWithResult(_0x28bc33,null))[_0xc008('0x41')](handleError(_0x28bc33,null));};exports[_0xc008('0x4b')]=function(_0xee64,_0x8b9775){return db[_0xc008('0x26')]['describe']()[_0xc008('0x21')](respondWithResult(_0x8b9775,null))[_0xc008('0x41')](handleError(_0x8b9775,null));};exports['download']=function(_0x24f775,_0xfd6d1d,_0x5b5fbf){var _0x51d3dc=require(_0xc008('0x4c'));var _0xd47b74=![];var _0x20947b={};if(_0x24f775[_0xc008('0x2e')][_0xc008('0x3a')]&&_0x24f775['query']['type']===_0xc008('0x4d')){_0x20947b['uniqueid']=_0x24f775[_0xc008('0x43')]['id'];}else{_0x20947b['id']=_0x24f775[_0xc008('0x43')]['id'];}return db[_0xc008('0x26')][_0xc008('0x45')]({'where':_0x20947b,'attributes':['id',_0xc008('0x4e')],'raw':!![]})[_0xc008('0x21')](handleEntityNotFound(_0xfd6d1d,null))['then'](function(_0x2ea742){if(_0x2ea742){var _0xbd7422=path[_0xc008('0x4f')](config[_0xc008('0x50')],_0xc008('0x51'),_0x2ea742['value']);var _0x41fae3=util['format']('%s.cypher',_0xbd7422);if(fs['existsSync'](_0x41fae3)){_0xd47b74=!![];return _0x51d3dc[_0xc008('0x52')](_0x41fae3,_0xbd7422,config[_0xc008('0x53')][_0xc008('0x54')])['then'](function(){return _0x2ea742;});}return _0x2ea742;}})[_0xc008('0x21')](function(_0x2d8361){if(_0x2d8361){var _0x3dda82=path['join'](config[_0xc008('0x50')],_0xc008('0x51'),_0x2d8361[_0xc008('0x4e')]);if(!fs[_0xc008('0x55')](_0x3dda82)){throw new db['Sequelize'][(_0xc008('0x56'))]('ScreenRecording\x20not\x20found');}if(_0x2d8361[_0xc008('0x57')]){return _0xfd6d1d[_0xc008('0x58')](_0x3dda82,_0x2d8361[_0xc008('0x57')]+path[_0xc008('0x59')](_0x3dda82),function(){if(_0xd47b74){fs[_0xc008('0x5a')](_0x3dda82);}});}else{return _0xfd6d1d[_0xc008('0x58')](_0x3dda82,function(_0x4818c7){if(_0xd47b74){fs[_0xc008('0x5a')](_0x3dda82);}});}}})['catch'](function(_0x5bf4a9){if(_0x5bf4a9[_0xc008('0x5b')]===_0xc008('0x5c')){_0xfd6d1d['status'](0x194)[_0xc008('0x24')](_0xc008('0x5d'));}else{return handleError(_0xfd6d1d,null);}});};exports[_0xc008('0x22')]=function(_0x4517c0,_0x21ee6d){return db[_0xc008('0x26')][_0xc008('0x45')]({'where':{'id':_0x4517c0['params']['id']}})[_0xc008('0x21')](function(_0x462e1e){if(_[_0xc008('0x5e')](_0x462e1e)){throw new ReferenceError(_0xc008('0x5f'));}return _0x462e1e;})[_0xc008('0x21')](function(_0x167425){var _0x249898=path[_0xc008('0x4f')](config[_0xc008('0x50')],_0xc008('0x51'),_0x167425[_0xc008('0x4e')]);logger[_0xc008('0x60')](_0xc008('0x61'),_0x249898);if(!_[_0xc008('0x5e')](_0x167425['value'])&&fs[_0xc008('0x55')](_0x249898)){logger[_0xc008('0x60')](_0xc008('0x62')+_0x249898+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione');fs[_0xc008('0x63')](_0x249898);}_0x249898=_0x249898+_0xc008('0x64');if(!_['isNil'](_0x167425['value'])&&fs[_0xc008('0x55')](_0x249898)){logger[_0xc008('0x60')](_0xc008('0x62')+_0x249898+_0xc008('0x65'));fs[_0xc008('0x63')](_0x249898);}return _0x167425;})[_0xc008('0x21')](function(_0x238852){if(!_0x238852)throw new InternalError();return _0x238852[_0xc008('0x22')]();})[_0xc008('0x21')](function(){_0x21ee6d[_0xc008('0x19')](0xcc)[_0xc008('0x18')]();})['catch'](handleError(_0x21ee6d,null));};
\ No newline at end of file
index 91d0bca..4e9f13d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x68b8=['interactionid','lodash','../../config/logger','api','request-promise','path','rimraf','../../config/environment','./screenRecording.attributes','exports','define','ScreenRecording','screen_recordings'];(function(_0x38188a,_0x967439){var _0x4ca70d=function(_0x203707){while(--_0x203707){_0x38188a['push'](_0x38188a['shift']());}};_0x4ca70d(++_0x967439);}(_0x68b8,0x1c8));var _0x868b=function(_0x368fb9,_0x1a9895){_0x368fb9=_0x368fb9-0x0;var _0x4892fb=_0x68b8[_0x368fb9];return _0x4892fb;};'use strict';var _=require(_0x868b('0x0'));var util=require('util');var logger=require(_0x868b('0x1'))(_0x868b('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x868b('0x3'));var fs=require('fs');var path=require(_0x868b('0x4'));var rimraf=require(_0x868b('0x5'));var config=require(_0x868b('0x6'));var attributes=require(_0x868b('0x7'));module[_0x868b('0x8')]=function(_0x34eab1,_0x336a11){return _0x34eab1[_0x868b('0x9')](_0x868b('0xa'),attributes,{'tableName':_0x868b('0xb'),'paranoid':![],'indexes':[{'name':_0x868b('0xc'),'fields':['interactionid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0xf21d=['./screenRecording.attributes','exports','define','ScreenRecording','screen_recordings','interactionid','lodash','util','api','moment','bluebird','request-promise','path','rimraf'];(function(_0x168605,_0x3910b3){var _0x185662=function(_0x52c830){while(--_0x52c830){_0x168605['push'](_0x168605['shift']());}};_0x185662(++_0x3910b3);}(_0xf21d,0x76));var _0xdf21=function(_0x47af5a,_0x103ffa){_0x47af5a=_0x47af5a-0x0;var _0x22ea1c=_0xf21d[_0x47af5a];return _0x22ea1c;};'use strict';var _=require(_0xdf21('0x0'));var util=require(_0xdf21('0x1'));var logger=require('../../config/logger')(_0xdf21('0x2'));var moment=require(_0xdf21('0x3'));var BPromise=require(_0xdf21('0x4'));var rp=require(_0xdf21('0x5'));var fs=require('fs');var path=require(_0xdf21('0x6'));var rimraf=require(_0xdf21('0x7'));var config=require('../../config/environment');var attributes=require(_0xdf21('0x8'));module[_0xdf21('0x9')]=function(_0x2fbe90,_0x1c5a9e){return _0x2fbe90[_0xdf21('0xa')](_0xdf21('0xb'),attributes,{'tableName':_0xdf21('0xc'),'paranoid':![],'indexes':[{'name':'interactionid','fields':[_0xdf21('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
index d1a1895..bbdbcd9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x68ad=['bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','request','then','info','ScreenRecording,\x20%s,\x20%s','debug','ScreenRecording,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent','result','catch','lodash','util','moment'];(function(_0xb9f87c,_0x13669a){var _0x54d8b5=function(_0x16b5fa){while(--_0x16b5fa){_0xb9f87c['push'](_0xb9f87c['shift']());}};_0x54d8b5(++_0x13669a);}(_0x68ad,0x1b2));var _0xd68a=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x68ad[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xd68a('0x0'));var util=require(_0xd68a('0x1'));var moment=require(_0xd68a('0x2'));var BPromise=require(_0xd68a('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xd68a('0x4'));var db=require(_0xd68a('0x5'))['db'];var utils=require(_0xd68a('0x6'));var logger=require('../../config/logger')(_0xd68a('0x7'));var config=require(_0xd68a('0x8'));var jayson=require(_0xd68a('0x9'));var client=jayson['client'][_0xd68a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xadd940,_0xe32e17,_0x2c9742){return new BPromise(function(_0x44d751,_0x13da2a){return client[_0xd68a('0xb')](_0xadd940,_0x2c9742)[_0xd68a('0xc')](function(_0x754b5f){logger[_0xd68a('0xd')](_0xd68a('0xe'),_0xe32e17,'request\x20sent');logger[_0xd68a('0xf')](_0xd68a('0x10'),_0xe32e17,'request\x20sent',JSON[_0xd68a('0x11')](_0x754b5f));if(_0x754b5f[_0xd68a('0x12')]){if(_0x754b5f[_0xd68a('0x12')]['code']===0x1f4){logger[_0xd68a('0x12')]('ScreenRecording,\x20%s,\x20%s',_0xe32e17,_0x754b5f[_0xd68a('0x12')]['message']);return _0x13da2a(_0x754b5f[_0xd68a('0x12')]['message']);}logger[_0xd68a('0x12')](_0xd68a('0xe'),_0xe32e17,_0x754b5f['error']['message']);return _0x44d751(_0x754b5f[_0xd68a('0x12')][_0xd68a('0x13')]);}else{logger['info'](_0xd68a('0xe'),_0xe32e17,_0xd68a('0x14'));_0x44d751(_0x754b5f[_0xd68a('0x15')][_0xd68a('0x13')]);}})[_0xd68a('0x16')](function(_0x565e37){logger[_0xd68a('0x12')]('ScreenRecording,\x20%s,\x20%s',_0xe32e17,_0x565e37);_0x13da2a(_0x565e37);});});}
\ No newline at end of file
+var _0x027d=['then','info','debug','ScreenRecording,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','ScreenRecording,\x20%s,\x20%s','message','result','catch','lodash','util','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request'];(function(_0x46cf08,_0x489118){var _0x46df90=function(_0x3ca0da){while(--_0x3ca0da){_0x46cf08['push'](_0x46cf08['shift']());}};_0x46df90(++_0x489118);}(_0x027d,0x14e));var _0xd027=function(_0xae6ce6,_0x2bde46){_0xae6ce6=_0xae6ce6-0x0;var _0x159d04=_0x027d[_0xae6ce6];return _0x159d04;};'use strict';var _=require(_0xd027('0x0'));var util=require(_0xd027('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xd027('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xd027('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xd027('0x4'))(_0xd027('0x5'));var config=require(_0xd027('0x6'));var jayson=require(_0xd027('0x7'));var client=jayson[_0xd027('0x8')][_0xd027('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x269df3,_0x11317d,_0x390255){return new BPromise(function(_0x4351b2,_0x31e7a1){return client[_0xd027('0xa')](_0x269df3,_0x390255)[_0xd027('0xb')](function(_0x3ac614){logger[_0xd027('0xc')]('ScreenRecording,\x20%s,\x20%s',_0x11317d,'request\x20sent');logger[_0xd027('0xd')](_0xd027('0xe'),_0x11317d,_0xd027('0xf'),JSON[_0xd027('0x10')](_0x3ac614));if(_0x3ac614[_0xd027('0x11')]){if(_0x3ac614[_0xd027('0x11')][_0xd027('0x12')]===0x1f4){logger[_0xd027('0x11')](_0xd027('0x13'),_0x11317d,_0x3ac614[_0xd027('0x11')]['message']);return _0x31e7a1(_0x3ac614['error']['message']);}logger[_0xd027('0x11')](_0xd027('0x13'),_0x11317d,_0x3ac614[_0xd027('0x11')][_0xd027('0x14')]);return _0x4351b2(_0x3ac614[_0xd027('0x11')][_0xd027('0x14')]);}else{logger[_0xd027('0xc')](_0xd027('0x13'),_0x11317d,_0xd027('0xf'));_0x4351b2(_0x3ac614[_0xd027('0x15')][_0xd027('0x14')]);}})[_0xd027('0x16')](function(_0x585840){logger[_0xd027('0x11')](_0xd027('0x13'),_0x11317d,_0x585840);_0x31e7a1(_0x585840);});});}
\ No newline at end of file
index 6d7eaac..146f424 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0914=['exports','multer','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','/now','getDate','/:id','/:id/logo','/:id/logo_login','/:id/gdpr','gdpr','/:id/preferred','getPreferred','/:id/favicon','getFavicon','diskStorage','join','root','format','logo','extname','originalname','post','single','file','addLogo','server/files/images/logos/','logologin','addLogoLogin','%s%s','preferred','addPreferred','favicon','addFavicon','update'];(function(_0x3ff322,_0x5d61b1){var _0x1be859=function(_0x1bd0f3){while(--_0x1bd0f3){_0x3ff322['push'](_0x3ff322['shift']());}};_0x1be859(++_0x5d61b1);}(_0x0914,0x1af));var _0x4091=function(_0xb99b7a,_0x239e96){_0xb99b7a=_0xb99b7a-0x0;var _0xba8b5c=_0x0914[_0xb99b7a];return _0xba8b5c;};'use strict';var multer=require(_0x4091('0x0'));var util=require('util');var path=require(_0x4091('0x1'));var timeout=require('connect-timeout');var express=require(_0x4091('0x2'));var router=express[_0x4091('0x3')]();var fs_extra=require(_0x4091('0x4'));var auth=require(_0x4091('0x5'));var interaction=require(_0x4091('0x6'));var config=require(_0x4091('0x7'));var controller=require('./setting.controller');router['get']('/',auth[_0x4091('0x8')](),controller[_0x4091('0x9')]);router[_0x4091('0xa')](_0x4091('0xb'),controller[_0x4091('0xc')]);router[_0x4091('0xa')](_0x4091('0xd'),controller['show']);router[_0x4091('0xa')](_0x4091('0xe'),controller['getLogo']);router[_0x4091('0xa')](_0x4091('0xf'),controller['getLogoLogin']);router[_0x4091('0xa')](_0x4091('0x10'),controller[_0x4091('0x11')]);router[_0x4091('0xa')](_0x4091('0x12'),controller[_0x4091('0x13')]);router[_0x4091('0xa')](_0x4091('0x14'),controller[_0x4091('0x15')]);var upload=multer({'storage':multer[_0x4091('0x16')]({'destination':function(_0x5a604c,_0x50108f,_0x3a90f3){_0x3a90f3(null,path[_0x4091('0x17')](config[_0x4091('0x18')],'server/files/images/logos/'));},'filename':function(_0x22f1c9,_0x4b990e,_0x293e91){_0x293e91(null,util[_0x4091('0x19')]('%s%s',_0x4091('0x1a'),path[_0x4091('0x1b')](_0x4b990e[_0x4091('0x1c')])));}})});router[_0x4091('0x1d')](_0x4091('0xe'),upload[_0x4091('0x1e')](_0x4091('0x1f')),controller[_0x4091('0x20')]);var upload=multer({'storage':multer[_0x4091('0x16')]({'destination':function(_0x25dfd8,_0x41e346,_0x287e19){_0x287e19(null,path['join'](config[_0x4091('0x18')],_0x4091('0x21')));},'filename':function(_0x6b5f0b,_0x31b6ce,_0x5dad51){_0x5dad51(null,util['format']('%s%s',_0x4091('0x22'),path[_0x4091('0x1b')](_0x31b6ce[_0x4091('0x1c')])));}})});router[_0x4091('0x1d')](_0x4091('0xf'),upload[_0x4091('0x1e')](_0x4091('0x1f')),controller[_0x4091('0x23')]);var upload=multer({'storage':multer[_0x4091('0x16')]({'destination':function(_0x217312,_0x9b802a,_0x496d68){_0x496d68(null,path[_0x4091('0x17')](config[_0x4091('0x18')],_0x4091('0x21')));},'filename':function(_0x9518e6,_0x3bccdd,_0x3dca71){_0x3dca71(null,util['format'](_0x4091('0x24'),_0x4091('0x25'),path[_0x4091('0x1b')](_0x3bccdd[_0x4091('0x1c')])));}})});router[_0x4091('0x1d')](_0x4091('0x12'),upload[_0x4091('0x1e')](_0x4091('0x1f')),controller[_0x4091('0x26')]);var upload=multer({'storage':multer[_0x4091('0x16')]({'destination':function(_0x34820d,_0x319003,_0x1f6e15){_0x1f6e15(null,path[_0x4091('0x17')](config[_0x4091('0x18')],_0x4091('0x21')));},'filename':function(_0x405187,_0x2fcaeb,_0x520ef0){_0x520ef0(null,util[_0x4091('0x19')](_0x4091('0x24'),_0x4091('0x27'),path[_0x4091('0x1b')](_0x2fcaeb['originalname'])));}})});router[_0x4091('0x1d')]('/:id/favicon',upload[_0x4091('0x1e')](_0x4091('0x1f')),controller[_0x4091('0x28')]);router['put'](_0x4091('0xd'),auth['isAuthenticated'](),controller[_0x4091('0x29')]);module[_0x4091('0x2a')]=router;
\ No newline at end of file
+var _0x5a03=['post','addLogo','logologin','extname','originalname','single','file','addLogoLogin','server/files/images/logos/','addFavicon','put','update','exports','multer','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/now','getDate','/:id','show','/:id/logo','getLogo','/:id/logo_login','getLogoLogin','/:id/gdpr','/:id/preferred','getPreferred','getFavicon','diskStorage','join','root','format','%s%s','logo'];(function(_0x36365e,_0x29f9f5){var _0x5901b8=function(_0x2b4195){while(--_0x2b4195){_0x36365e['push'](_0x36365e['shift']());}};_0x5901b8(++_0x29f9f5);}(_0x5a03,0xda));var _0x35a0=function(_0x49a371,_0x5f5fe3){_0x49a371=_0x49a371-0x0;var _0x341b8a=_0x5a03[_0x49a371];return _0x341b8a;};'use strict';var multer=require(_0x35a0('0x0'));var util=require('util');var path=require(_0x35a0('0x1'));var timeout=require('connect-timeout');var express=require(_0x35a0('0x2'));var router=express[_0x35a0('0x3')]();var fs_extra=require(_0x35a0('0x4'));var auth=require(_0x35a0('0x5'));var interaction=require(_0x35a0('0x6'));var config=require('../../config/environment');var controller=require('./setting.controller');router[_0x35a0('0x7')]('/',auth[_0x35a0('0x8')](),controller[_0x35a0('0x9')]);router[_0x35a0('0x7')](_0x35a0('0xa'),controller[_0x35a0('0xb')]);router['get'](_0x35a0('0xc'),controller[_0x35a0('0xd')]);router['get'](_0x35a0('0xe'),controller[_0x35a0('0xf')]);router[_0x35a0('0x7')](_0x35a0('0x10'),controller[_0x35a0('0x11')]);router[_0x35a0('0x7')](_0x35a0('0x12'),controller['gdpr']);router[_0x35a0('0x7')](_0x35a0('0x13'),controller[_0x35a0('0x14')]);router[_0x35a0('0x7')]('/:id/favicon',controller[_0x35a0('0x15')]);var upload=multer({'storage':multer[_0x35a0('0x16')]({'destination':function(_0x57f37c,_0x3857c2,_0x480181){_0x480181(null,path[_0x35a0('0x17')](config[_0x35a0('0x18')],'server/files/images/logos/'));},'filename':function(_0x584b58,_0x5f4179,_0x250466){_0x250466(null,util[_0x35a0('0x19')](_0x35a0('0x1a'),_0x35a0('0x1b'),path['extname'](_0x5f4179['originalname'])));}})});router[_0x35a0('0x1c')](_0x35a0('0xe'),upload['single']('file'),controller[_0x35a0('0x1d')]);var upload=multer({'storage':multer[_0x35a0('0x16')]({'destination':function(_0x43a497,_0x47cf76,_0x373a53){_0x373a53(null,path[_0x35a0('0x17')](config[_0x35a0('0x18')],'server/files/images/logos/'));},'filename':function(_0x302747,_0x1e4b22,_0x2e6ca0){_0x2e6ca0(null,util[_0x35a0('0x19')](_0x35a0('0x1a'),_0x35a0('0x1e'),path[_0x35a0('0x1f')](_0x1e4b22[_0x35a0('0x20')])));}})});router['post'](_0x35a0('0x10'),upload[_0x35a0('0x21')](_0x35a0('0x22')),controller[_0x35a0('0x23')]);var upload=multer({'storage':multer[_0x35a0('0x16')]({'destination':function(_0x496b4d,_0x572d43,_0x1e76f0){_0x1e76f0(null,path[_0x35a0('0x17')](config[_0x35a0('0x18')],'server/files/images/logos/'));},'filename':function(_0x31dac0,_0x1ff46b,_0x49d142){_0x49d142(null,util[_0x35a0('0x19')](_0x35a0('0x1a'),'preferred',path[_0x35a0('0x1f')](_0x1ff46b[_0x35a0('0x20')])));}})});router[_0x35a0('0x1c')](_0x35a0('0x13'),upload[_0x35a0('0x21')](_0x35a0('0x22')),controller['addPreferred']);var upload=multer({'storage':multer[_0x35a0('0x16')]({'destination':function(_0x4435ff,_0x2acc17,_0x12cfa0){_0x12cfa0(null,path['join'](config[_0x35a0('0x18')],_0x35a0('0x24')));},'filename':function(_0x567699,_0x588969,_0x1a743a){_0x1a743a(null,util[_0x35a0('0x19')](_0x35a0('0x1a'),'favicon',path[_0x35a0('0x1f')](_0x588969[_0x35a0('0x20')])));}})});router[_0x35a0('0x1c')]('/:id/favicon',upload[_0x35a0('0x21')](_0x35a0('0x22')),controller[_0x35a0('0x25')]);router[_0x35a0('0x26')]('/:id',auth['isAuthenticated'](),controller[_0x35a0('0x27')]);module[_0x35a0('0x28')]=router;
\ No newline at end of file
index b98b5c7..7825885 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xccd4=['UNSIGNED','sequelize','exports','INTEGER','min_internal','min_mailbox','STRING','BOOLEAN'];(function(_0x133803,_0x152948){var _0xd6b9e6=function(_0x56711c){while(--_0x56711c){_0x133803['push'](_0x133803['shift']());}};_0xd6b9e6(++_0x152948);}(_0xccd4,0x1b1));var _0x4ccd=function(_0xc67528,_0x24e2fb){_0xc67528=_0xc67528-0x0;var _0x38e26d=_0xccd4[_0xc67528];return _0x38e26d;};'use strict';var Sequelize=require(_0x4ccd('0x0'));module[_0x4ccd('0x1')]={'min_internal':{'type':Sequelize[_0x4ccd('0x2')](0xb),'unique':_0x4ccd('0x3'),'defaultValue':0x3e8},'min_mailbox':{'type':Sequelize[_0x4ccd('0x2')](0xb),'unique':_0x4ccd('0x4'),'defaultValue':0x3e8},'agi_port':{'type':Sequelize[_0x4ccd('0x2')](0xb),'defaultValue':0x11dd},'soundPath':{'type':Sequelize[_0x4ccd('0x5')],'defaultValue':'/var/opt/motion2/server/files/sounds/converted'},'logo':{'type':Sequelize[_0x4ccd('0x5')]},'defaultLogo':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'loginLogo':{'type':Sequelize[_0x4ccd('0x5')]},'defaultLoginLogo':{'type':Sequelize[_0x4ccd('0x6')],'defaultValue':!![]},'headerWhiteLabel':{'type':Sequelize[_0x4ccd('0x5')]},'defaultHeaderWhiteLabel':{'type':Sequelize[_0x4ccd('0x6')],'defaultValue':!![]},'securePassword':{'type':Sequelize[_0x4ccd('0x6')],'defaultValue':!![]},'firstSetup':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'stunaddr':{'type':Sequelize['STRING']},'turnaddr':{'type':Sequelize[_0x4ccd('0x5')]},'turnusername':{'type':Sequelize[_0x4ccd('0x5')]},'turnpassword':{'type':Sequelize[_0x4ccd('0x5')]},'pageTitle':{'type':Sequelize[_0x4ccd('0x5')]},'defaultPageTitle':{'type':Sequelize[_0x4ccd('0x6')],'defaultValue':!![]},'callRecordingEncryption':{'type':Sequelize[_0x4ccd('0x6')],'defaultValue':![]},'passwordExpiresDays':{'type':Sequelize[_0x4ccd('0x2')](0xb),'defaultValue':0x5a},'phoneBarAutoUpdater':{'type':Sequelize[_0x4ccd('0x6')],'defaultValue':!![]},'phoneBarAutoUpdaterUrl':{'type':Sequelize[_0x4ccd('0x5')],'defaultValue':'https://www.xcally.com/bar/phonebar/autoupdater.xml'},'enableEmailPreview':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'split':{'type':Sequelize[_0x4ccd('0x6')],'defaultValue':!![]},'splitSizeCsv':{'type':Sequelize[_0x4ccd('0x2')],'defaultValue':0x1388},'splitSizePdf':{'type':Sequelize[_0x4ccd('0x2')],'defaultValue':0x1388},'splitSizeXlsx':{'type':Sequelize[_0x4ccd('0x2')],'defaultValue':0x1388},'messagesAlignment':{'type':Sequelize[_0x4ccd('0x5')],'defaultValue':'alternate'},'chatTimeout':{'type':Sequelize[_0x4ccd('0x2')],'defaultValue':0x1e},'phoneBarRememberMeEnabled':{'type':Sequelize[_0x4ccd('0x6')],'defaultValue':!![]},'preferred':{'type':Sequelize[_0x4ccd('0x5')]},'defaultPreferred':{'type':Sequelize[_0x4ccd('0x6')],'defaultValue':!![]},'rtlSupport':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'defaultScreenRecordingPath':{'type':Sequelize['STRING']},'allowedLoginAttempts':{'type':Sequelize[_0x4ccd('0x2')],'defaultValue':0x5},'blockDuration':{'type':Sequelize[_0x4ccd('0x2')],'defaultValue':0xa},'favicon':{'type':Sequelize[_0x4ccd('0x5')]},'defaultFavicon':{'type':Sequelize[_0x4ccd('0x6')],'defaultValue':!![]},'loginMailFrequency':{'type':Sequelize[_0x4ccd('0x2')],'defaultValue':0xa,'validate':{'min':0xa}},'transcribe':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'automaticTranscribe':{'type':Sequelize[_0x4ccd('0x6')],'defaultValue':![]},'transcribeAccountId':{'type':Sequelize[_0x4ccd('0x2')]},'transcribeRegion':{'type':Sequelize[_0x4ccd('0x5')]},'sentiment':{'type':Sequelize[_0x4ccd('0x6')],'defaultValue':![]},'automaticSentiment':{'type':Sequelize[_0x4ccd('0x6')],'defaultValue':![]},'sentimentAccountId':{'type':Sequelize[_0x4ccd('0x2')]},'sentimentRegion':{'type':Sequelize[_0x4ccd('0x5')]},'language':{'type':Sequelize[_0x4ccd('0x5')]},'bucket':{'type':Sequelize[_0x4ccd('0x5')]},'googleSsoEnabled':{'type':Sequelize[_0x4ccd('0x6')],'defaultValue':![]},'adSsoEnabled':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enforcePasswordHistory':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'passwordHistoryLimit':{'type':Sequelize[_0x4ccd('0x2')](0x2)[_0x4ccd('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5}},'privacyPolicyEmail':{'type':Sequelize[_0x4ccd('0x2')](0x2)[_0x4ccd('0x7')],'defaultValue':0x0},'privacyPolicyName':{'type':Sequelize[_0x4ccd('0x2')](0x2)[_0x4ccd('0x7')],'defaultValue':0x0},'privacyPolicyNumber':{'type':Sequelize[_0x4ccd('0x2')](0x2)[_0x4ccd('0x7')],'defaultValue':0x0},'searchOnEnterKey':{'type':Sequelize[_0x4ccd('0x6')],'defaultValue':!![]},'chatInteractionsReloadTimeout':{'type':Sequelize[_0x4ccd('0x2')],'defaultValue':0x0},'mailInteractionsReloadTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'openchannelInteractionsReloadTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'smsInteractionsReloadTimeout':{'type':Sequelize[_0x4ccd('0x2')],'defaultValue':0x0},'whatsappInteractionsReloadTimeout':{'type':Sequelize[_0x4ccd('0x2')],'defaultValue':0x0},'stopRecordingOnTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'secureCookieEnabled':{'type':Sequelize[_0x4ccd('0x6')],'defaultValue':!![]},'viewHelpSection':{'type':Sequelize[_0x4ccd('0x6')],'defaultValue':!![]},'previewRecallmeReminderInterval':{'type':Sequelize['INTEGER'],'defaultValue':0x5,'validate':{'min':0x1}},'disabledCookie':{'type':Sequelize[_0x4ccd('0x6')],'defaultValue':![]},'limitTabs':{'type':Sequelize[_0x4ccd('0x2')],'defaultValue':0x14},'filterFullName':{'type':Sequelize[_0x4ccd('0x6')],'defaultValue':![]}};
\ No newline at end of file
+var _0xac29=['/var/opt/motion2/server/files/sounds/converted','BOOLEAN','INTEGER','https://www.xcally.com/bar/phonebar/autoupdater.xml','alternate','UNSIGNED','sequelize','exports','min_internal','min_mailbox','STRING'];(function(_0x11bb5c,_0x3bc172){var _0x24f1b2=function(_0x5e4da9){while(--_0x5e4da9){_0x11bb5c['push'](_0x11bb5c['shift']());}};_0x24f1b2(++_0x3bc172);}(_0xac29,0x17c));var _0x9ac2=function(_0x367dff,_0xd200aa){_0x367dff=_0x367dff-0x0;var _0x3bb13e=_0xac29[_0x367dff];return _0x3bb13e;};'use strict';var Sequelize=require(_0x9ac2('0x0'));module[_0x9ac2('0x1')]={'min_internal':{'type':Sequelize['INTEGER'](0xb),'unique':_0x9ac2('0x2'),'defaultValue':0x3e8},'min_mailbox':{'type':Sequelize['INTEGER'](0xb),'unique':_0x9ac2('0x3'),'defaultValue':0x3e8},'agi_port':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x11dd},'soundPath':{'type':Sequelize[_0x9ac2('0x4')],'defaultValue':_0x9ac2('0x5')},'logo':{'type':Sequelize[_0x9ac2('0x4')]},'defaultLogo':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'loginLogo':{'type':Sequelize[_0x9ac2('0x4')]},'defaultLoginLogo':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'headerWhiteLabel':{'type':Sequelize[_0x9ac2('0x4')]},'defaultHeaderWhiteLabel':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':!![]},'securePassword':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':!![]},'firstSetup':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':!![]},'stunaddr':{'type':Sequelize[_0x9ac2('0x4')]},'turnaddr':{'type':Sequelize[_0x9ac2('0x4')]},'turnusername':{'type':Sequelize[_0x9ac2('0x4')]},'turnpassword':{'type':Sequelize['STRING']},'pageTitle':{'type':Sequelize['STRING']},'defaultPageTitle':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':!![]},'callRecordingEncryption':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':![]},'passwordExpiresDays':{'type':Sequelize[_0x9ac2('0x7')](0xb),'defaultValue':0x5a},'phoneBarAutoUpdater':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':!![]},'phoneBarAutoUpdaterUrl':{'type':Sequelize['STRING'],'defaultValue':_0x9ac2('0x8')},'enableEmailPreview':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'split':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':!![]},'splitSizeCsv':{'type':Sequelize['INTEGER'],'defaultValue':0x1388},'splitSizePdf':{'type':Sequelize[_0x9ac2('0x7')],'defaultValue':0x1388},'splitSizeXlsx':{'type':Sequelize[_0x9ac2('0x7')],'defaultValue':0x1388},'messagesAlignment':{'type':Sequelize['STRING'],'defaultValue':_0x9ac2('0x9')},'chatTimeout':{'type':Sequelize[_0x9ac2('0x7')],'defaultValue':0x1e},'phoneBarRememberMeEnabled':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':!![]},'preferred':{'type':Sequelize[_0x9ac2('0x4')]},'defaultPreferred':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':!![]},'rtlSupport':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':![]},'defaultScreenRecordingPath':{'type':Sequelize['STRING']},'allowedLoginAttempts':{'type':Sequelize[_0x9ac2('0x7')],'defaultValue':0x5},'blockDuration':{'type':Sequelize[_0x9ac2('0x7')],'defaultValue':0xa},'favicon':{'type':Sequelize[_0x9ac2('0x4')]},'defaultFavicon':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':!![]},'loginMailFrequency':{'type':Sequelize[_0x9ac2('0x7')],'defaultValue':0xa,'validate':{'min':0xa}},'transcribe':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':![]},'automaticTranscribe':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':![]},'transcribeAccountId':{'type':Sequelize[_0x9ac2('0x7')]},'transcribeRegion':{'type':Sequelize[_0x9ac2('0x4')]},'sentiment':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':![]},'automaticSentiment':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':![]},'sentimentAccountId':{'type':Sequelize['INTEGER']},'sentimentRegion':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0x9ac2('0x4')]},'bucket':{'type':Sequelize[_0x9ac2('0x4')]},'googleSsoEnabled':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'adSsoEnabled':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':![]},'enforcePasswordHistory':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'passwordHistoryLimit':{'type':Sequelize[_0x9ac2('0x7')](0x2)[_0x9ac2('0xa')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5}},'privacyPolicyEmail':{'type':Sequelize[_0x9ac2('0x7')](0x2)[_0x9ac2('0xa')],'defaultValue':0x0},'privacyPolicyName':{'type':Sequelize[_0x9ac2('0x7')](0x2)['UNSIGNED'],'defaultValue':0x0},'privacyPolicyNumber':{'type':Sequelize[_0x9ac2('0x7')](0x2)[_0x9ac2('0xa')],'defaultValue':0x0},'searchOnEnterKey':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':!![]},'chatInteractionsReloadTimeout':{'type':Sequelize[_0x9ac2('0x7')],'defaultValue':0x0},'mailInteractionsReloadTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'openchannelInteractionsReloadTimeout':{'type':Sequelize[_0x9ac2('0x7')],'defaultValue':0x0},'smsInteractionsReloadTimeout':{'type':Sequelize[_0x9ac2('0x7')],'defaultValue':0x0},'whatsappInteractionsReloadTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'stopRecordingOnTransfer':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':![]},'secureCookieEnabled':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':!![]},'viewHelpSection':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'previewRecallmeReminderInterval':{'type':Sequelize['INTEGER'],'defaultValue':0x5,'validate':{'min':0x1}},'disabledCookie':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':![]},'limitTabs':{'type':Sequelize[_0x9ac2('0x7')],'defaultValue':0x14},'filterFullName':{'type':Sequelize[_0x9ac2('0x6')],'defaultValue':![]}};
\ No newline at end of file
index 25d5095..0f94536 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0506=['../../mysqldb','client','request','then','info','Setting,\x20%s,\x20%s','request\x20sent','debug','Setting,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','save','update','destroy','stack','name','send','index','map','Setting','rawAttributes','type','key','query','filters','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','rows','show','params','keys','includeAll','include','body','find','addLogo','file','logo','filename','addLogoLogin','getLogo','getLicense','preferred','favicon','defaultLogo','defaultLoginLogo','defaultPreferred','defaultFavicon','join','root','toLower','default','upperFirst','custom','default_logo.svg','existsSync','Sequelize','ValidationError','\x20not\x20found','getLogoLogin','server/files/images/logos','loginLogo','default_loginLogo.svg','gdpr','addPreferred','getPreferred','default_preferred.png','default_favicon.ico','download','getDate','utcOffset','format','eml-format','rimraf','zip-dir','mustache','path','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util'];(function(_0x2dadb9,_0x42cfe6){var _0x2f0097=function(_0x21163f){while(--_0x21163f){_0x2dadb9['push'](_0x2dadb9['shift']());}};_0x2f0097(++_0x42cfe6);}(_0x0506,0x1d1));var _0x6050=function(_0x1d3984,_0x1a6db0){_0x1d3984=_0x1d3984-0x0;var _0x381d6=_0x0506[_0x1d3984];return _0x381d6;};'use strict';var emlformat=require(_0x6050('0x0'));var rimraf=require(_0x6050('0x1'));var zipdir=require(_0x6050('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x6050('0x3'));var util=require('util');var path=require(_0x6050('0x4'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x6050('0x5'));var fs=require('fs');var fs_extra=require(_0x6050('0x6'));var _=require(_0x6050('0x7'));var squel=require(_0x6050('0x8'));var crypto=require(_0x6050('0x9'));var jsforce=require(_0x6050('0xa'));var deskjs=require(_0x6050('0xb'));var toCsv=require(_0x6050('0xc'));var querystring=require('querystring');var Papa=require(_0x6050('0xd'));var Redis=require('ioredis');var authService=require(_0x6050('0xe'));var qs=require(_0x6050('0xf'));var as=require(_0x6050('0x10'));var hardwareService=require(_0x6050('0x11'));var logger=require(_0x6050('0x12'))(_0x6050('0x13'));var utils=require(_0x6050('0x14'));var config=require(_0x6050('0x15'));var licenseUtil=require(_0x6050('0x16'));var db=require(_0x6050('0x17'))['db'];var jayson=require('jayson/promise');var client=jayson[_0x6050('0x18')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2fbd8a,_0x98b3ef,_0x2e404b,_0x248431){return new BPromise(function(_0x4b5503,_0x223a06){var _0x5d0a25=_0x248431||client;return _0x5d0a25[_0x6050('0x19')](_0x2fbd8a,_0x2e404b)[_0x6050('0x1a')](function(_0x465e2b){logger[_0x6050('0x1b')](_0x6050('0x1c'),_0x98b3ef,_0x6050('0x1d'));logger[_0x6050('0x1e')](_0x6050('0x1f'),_0x98b3ef,_0x6050('0x1d'),JSON[_0x6050('0x20')](_0x465e2b));if(_0x465e2b[_0x6050('0x21')]){if(_0x465e2b[_0x6050('0x21')]['code']===0x1f4){logger[_0x6050('0x21')](_0x6050('0x1c'),_0x98b3ef,_0x465e2b[_0x6050('0x21')]['message']);return _0x223a06(_0x465e2b['error']['message']);}logger['error'](_0x6050('0x1c'),_0x98b3ef,_0x465e2b[_0x6050('0x21')]['message']);return _0x4b5503(_0x465e2b[_0x6050('0x21')][_0x6050('0x22')]);}else{logger[_0x6050('0x1b')](_0x6050('0x1c'),_0x98b3ef,_0x6050('0x1d'));_0x4b5503(_0x465e2b[_0x6050('0x23')]['message']);}})[_0x6050('0x24')](function(_0x4018c2){logger[_0x6050('0x21')](_0x6050('0x1c'),_0x98b3ef,_0x4018c2);_0x223a06(_0x4018c2);});});}function respondWithStatusCode(_0x19602f,_0x178d58){_0x178d58=_0x178d58||0xcc;return function(_0x2c76ba){if(_0x2c76ba){return _0x19602f[_0x6050('0x25')](_0x178d58);}return _0x19602f['status'](_0x178d58)[_0x6050('0x26')]();};}function respondWithResult(_0x48d9fd,_0x2a991b){_0x2a991b=_0x2a991b||0xc8;return function(_0x411dc9){if(_0x411dc9){return _0x48d9fd[_0x6050('0x27')](_0x2a991b)[_0x6050('0x28')](_0x411dc9);}};}function respondWithFilteredResult(_0x29eed8,_0x45ba65){return function(_0x4b46e0){if(_0x4b46e0){var _0x2345d2=typeof _0x45ba65[_0x6050('0x29')]===_0x6050('0x2a')&&typeof _0x45ba65[_0x6050('0x2b')]==='undefined';var _0x1527ea=_0x4b46e0[_0x6050('0x2c')];var _0x1698fa=_0x2345d2?0x0:_0x45ba65[_0x6050('0x29')];var _0x46769f=_0x2345d2?_0x4b46e0[_0x6050('0x2c')]:_0x45ba65[_0x6050('0x29')]+_0x45ba65['limit'];var _0x29069d;if(_0x46769f>=_0x1527ea){_0x46769f=_0x1527ea;_0x29069d=0xc8;}else{_0x29069d=0xce;}_0x29eed8[_0x6050('0x27')](_0x29069d);return _0x29eed8[_0x6050('0x2d')](_0x6050('0x2e'),_0x1698fa+'-'+_0x46769f+'/'+_0x1527ea)[_0x6050('0x28')](_0x4b46e0);}return null;};}function patchUpdates(_0x182137){return function(_0x2a5313){try{jsonpatch[_0x6050('0x2f')](_0x2a5313,_0x182137,!![]);}catch(_0x252ebb){return BPromise['reject'](_0x252ebb);}return _0x2a5313[_0x6050('0x30')]();};}function saveUpdates(_0x5c6e90,_0x5542fa){return function(_0x31fd3b){if(_0x31fd3b){return _0x31fd3b[_0x6050('0x31')](_0x5c6e90)[_0x6050('0x1a')](function(_0x536f51){return _0x536f51;});}return null;};}function removeEntity(_0x36eb96,_0x5295ad){return function(_0x486527){if(_0x486527){return _0x486527[_0x6050('0x32')]()[_0x6050('0x1a')](function(){_0x36eb96['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x2888ae,_0x42a545){return function(_0x5e6025){if(!_0x5e6025){_0x2888ae[_0x6050('0x25')](0x194);}return _0x5e6025;};}function handleError(_0x110818,_0x360a34){_0x360a34=_0x360a34||0x1f4;return function(_0x6912ac){logger['error'](_0x6912ac[_0x6050('0x33')]);if(_0x6912ac['name']){delete _0x6912ac[_0x6050('0x34')];}_0x110818['status'](_0x360a34)[_0x6050('0x35')](_0x6912ac);};}exports[_0x6050('0x36')]=function(_0x162941,_0x50f014){var _0x35f347={},_0x5b94f0={},_0x16e74e={'count':0x0,'rows':[]};var _0x5f24f1=_[_0x6050('0x37')](db[_0x6050('0x38')][_0x6050('0x39')],function(_0x30b11f){return{'name':_0x30b11f['fieldName'],'type':_0x30b11f[_0x6050('0x3a')][_0x6050('0x3b')]};});_0x5b94f0['model']=_[_0x6050('0x37')](_0x5f24f1,_0x6050('0x34'));_0x5b94f0[_0x6050('0x3c')]=_['keys'](_0x162941[_0x6050('0x3c')]);_0x5b94f0[_0x6050('0x3d')]=_[_0x6050('0x3e')](_0x5b94f0['model'],_0x5b94f0[_0x6050('0x3c')]);_0x35f347[_0x6050('0x3f')]=_['intersection'](_0x5b94f0[_0x6050('0x40')],qs[_0x6050('0x41')](_0x162941[_0x6050('0x3c')][_0x6050('0x41')]));_0x35f347[_0x6050('0x3f')]=_0x35f347[_0x6050('0x3f')][_0x6050('0x42')]?_0x35f347[_0x6050('0x3f')]:_0x5b94f0['model'];if(!_0x162941['query'][_0x6050('0x43')](_0x6050('0x44'))){_0x35f347['limit']=qs[_0x6050('0x2b')](_0x162941['query'][_0x6050('0x2b')]);_0x35f347[_0x6050('0x29')]=qs[_0x6050('0x29')](_0x162941[_0x6050('0x3c')][_0x6050('0x29')]);}_0x35f347[_0x6050('0x45')]=qs[_0x6050('0x46')](_0x162941[_0x6050('0x3c')]['sort']);_0x35f347['where']=qs['filters'](_[_0x6050('0x47')](_0x162941[_0x6050('0x3c')],_0x5b94f0[_0x6050('0x3d')]),_0x5f24f1);if(_0x162941[_0x6050('0x3c')][_0x6050('0x48')]){_0x35f347[_0x6050('0x49')]=_[_0x6050('0x4a')](_0x35f347[_0x6050('0x49')],{'$or':_[_0x6050('0x37')](_0x5f24f1,function(_0x16283f){if(_0x16283f[_0x6050('0x3a')]!==_0x6050('0x4b')){var _0x57e2ed={};_0x57e2ed[_0x16283f['name']]={'$like':'%'+_0x162941[_0x6050('0x3c')][_0x6050('0x48')]+'%'};return _0x57e2ed;}})});}_0x35f347=_[_0x6050('0x4a')]({},_0x35f347,_0x162941[_0x6050('0x4c')]);var _0x4ff116={'where':_0x35f347['where']};return db[_0x6050('0x38')][_0x6050('0x2c')](_0x4ff116)['then'](function(_0x3dac47){_0x16e74e[_0x6050('0x2c')]=_0x3dac47;if(_0x162941[_0x6050('0x3c')]['includeAll']){_0x35f347['include']=[{'all':!![]}];}return db['Setting']['findAll'](_0x35f347);})[_0x6050('0x1a')](function(_0x1752ee){_0x16e74e[_0x6050('0x4d')]=_0x1752ee;return _0x16e74e;})[_0x6050('0x1a')](respondWithFilteredResult(_0x50f014,_0x35f347))[_0x6050('0x24')](handleError(_0x50f014,null));};exports[_0x6050('0x4e')]=function(_0x28f971,_0x2fec17){var _0x42471f={'raw':![],'where':{'id':_0x28f971[_0x6050('0x4f')]['id']}},_0x52580d={};_0x52580d[_0x6050('0x40')]=_[_0x6050('0x50')](db[_0x6050('0x38')][_0x6050('0x39')]);_0x52580d[_0x6050('0x3c')]=_[_0x6050('0x50')](_0x28f971[_0x6050('0x3c')]);_0x52580d['filters']=_['intersection'](_0x52580d['model'],_0x52580d[_0x6050('0x3c')]);_0x42471f[_0x6050('0x3f')]=_[_0x6050('0x3e')](_0x52580d[_0x6050('0x40')],qs[_0x6050('0x41')](_0x28f971['query'][_0x6050('0x41')]));_0x42471f[_0x6050('0x3f')]=_0x42471f[_0x6050('0x3f')]['length']?_0x42471f[_0x6050('0x3f')]:_0x52580d[_0x6050('0x40')];if(_0x28f971[_0x6050('0x3c')][_0x6050('0x51')]){_0x42471f[_0x6050('0x52')]=[{'all':!![]}];}_0x42471f=_['merge']({},_0x42471f,_0x28f971[_0x6050('0x4c')]);return db[_0x6050('0x38')]['find'](_0x42471f)[_0x6050('0x1a')](handleEntityNotFound(_0x2fec17,null))[_0x6050('0x1a')](respondWithResult(_0x2fec17,null))['catch'](handleError(_0x2fec17,null));};exports[_0x6050('0x31')]=function(_0x135a9d,_0x3e2861){if(_0x135a9d[_0x6050('0x53')]['id']){delete _0x135a9d['body']['id'];}return db['Setting'][_0x6050('0x54')]({'where':{'id':_0x135a9d[_0x6050('0x4f')]['id']}})[_0x6050('0x1a')](handleEntityNotFound(_0x3e2861,null))[_0x6050('0x1a')](saveUpdates(_0x135a9d[_0x6050('0x53')],null))[_0x6050('0x1a')](respondWithResult(_0x3e2861,null))[_0x6050('0x24')](handleError(_0x3e2861,null));};exports[_0x6050('0x55')]=function(_0xe4df85,_0x232c9f,_0x3ba734){if(_0xe4df85[_0x6050('0x56')]&&_0xe4df85[_0x6050('0x56')]['filename']){_0xe4df85['body'][_0x6050('0x57')]=_0xe4df85['file'][_0x6050('0x58')];}return db['Setting'][_0x6050('0x54')]({'where':{'id':_0xe4df85[_0x6050('0x4f')]['id']}})['then'](handleEntityNotFound(_0x232c9f,null))[_0x6050('0x1a')](saveUpdates(_0xe4df85[_0x6050('0x53')],null))[_0x6050('0x1a')](respondWithResult(_0x232c9f,null))[_0x6050('0x24')](handleError(_0x232c9f,null));};exports[_0x6050('0x59')]=function(_0x230d1a,_0x228b8c,_0x5aba76){if(_0x230d1a[_0x6050('0x56')]&&_0x230d1a['file']['filename']){_0x230d1a[_0x6050('0x53')]['loginLogo']=_0x230d1a[_0x6050('0x56')][_0x6050('0x58')];}return db[_0x6050('0x38')][_0x6050('0x54')]({'where':{'id':_0x230d1a['params']['id']}})[_0x6050('0x1a')](handleEntityNotFound(_0x228b8c,null))['then'](saveUpdates(_0x230d1a[_0x6050('0x53')],null))[_0x6050('0x1a')](respondWithResult(_0x228b8c,null))['catch'](handleError(_0x228b8c,null));};var utilLicense=require(_0x6050('0x16'));exports[_0x6050('0x5a')]=function(_0x412112,_0x15f415,_0x19b81b){var _0xe62909='server/files/images/logos';var _0x78fd3b={'custom':![]};return utilLicense[_0x6050('0x5b')]()[_0x6050('0x1a')](function(_0x3f8aac){if(_0x3f8aac){_0x78fd3b=_0x3f8aac;}return db[_0x6050('0x38')][_0x6050('0x54')]({'where':{'id':_0x412112[_0x6050('0x4f')]['id']},'attributes':[_0x6050('0x57'),'loginLogo',_0x6050('0x5c'),_0x6050('0x5d'),_0x6050('0x5e'),_0x6050('0x5f'),_0x6050('0x60'),_0x6050('0x61')],'raw':!![]});})[_0x6050('0x1a')](handleEntityNotFound(_0x15f415,null))[_0x6050('0x1a')](function(_0x55b1a2){if(_0x55b1a2){var _0x5c8122=_0x55b1a2['logo']&&fs['existsSync'](path[_0x6050('0x62')](config[_0x6050('0x63')],_0xe62909,_[_0x6050('0x64')](_0x55b1a2['logo'])))?path[_0x6050('0x62')](config[_0x6050('0x63')],_0xe62909,_['toLower'](_0x55b1a2[_0x6050('0x57')])):path['join'](config[_0x6050('0x63')],_0xe62909,_[_0x6050('0x64')]('default_logo.svg'));var _0x3a0945=_0x6050('0x65')+_[_0x6050('0x66')](_0x6050('0x57'));if(_0x55b1a2[_0x3a0945]||!_0x78fd3b[_0x6050('0x67')]){_0x5c8122=path['join'](config[_0x6050('0x63')],_0xe62909,_['toLower'](_0x6050('0x68')));}if(!fs[_0x6050('0x69')](_0x5c8122)){throw new db[(_0x6050('0x6a'))][(_0x6050('0x6b'))](_['upperFirst'](_0x6050('0x57'))+_0x6050('0x6c'));}return _0x15f415['download'](_0x5c8122);}})['catch'](handleError(_0x15f415,null));};var utilLicense=require(_0x6050('0x16'));exports[_0x6050('0x6d')]=function(_0x416195,_0x216aff,_0x172b7e){var _0x59873b=_0x6050('0x6e');var _0x5ad031={'custom':![]};return utilLicense[_0x6050('0x5b')]()[_0x6050('0x1a')](function(_0x400945){if(_0x400945){_0x5ad031=_0x400945;}return db['Setting'][_0x6050('0x54')]({'where':{'id':_0x416195[_0x6050('0x4f')]['id']},'attributes':[_0x6050('0x57'),_0x6050('0x6f'),_0x6050('0x5c'),_0x6050('0x5d'),'defaultLogo',_0x6050('0x5f'),_0x6050('0x60'),_0x6050('0x61')],'raw':!![]});})['then'](handleEntityNotFound(_0x216aff,null))['then'](function(_0x17b765){if(_0x17b765){var _0x9105fe=_0x17b765[_0x6050('0x6f')]&&fs[_0x6050('0x69')](path[_0x6050('0x62')](config[_0x6050('0x63')],_0x59873b,_[_0x6050('0x64')](_0x17b765[_0x6050('0x6f')])))?path[_0x6050('0x62')](config[_0x6050('0x63')],_0x59873b,_[_0x6050('0x64')](_0x17b765[_0x6050('0x6f')])):path['join'](config[_0x6050('0x63')],_0x59873b,_[_0x6050('0x64')](_0x6050('0x70')));var _0x5a2b0d='default'+_['upperFirst']('loginLogo');if(_0x17b765[_0x5a2b0d]||!_0x5ad031['custom']){_0x9105fe=path[_0x6050('0x62')](config['root'],_0x59873b,_[_0x6050('0x64')](_0x6050('0x70')));}if(!fs['existsSync'](_0x9105fe)){throw new db['Sequelize'][(_0x6050('0x6b'))](_[_0x6050('0x66')](_0x6050('0x6f'))+_0x6050('0x6c'));}return _0x216aff['download'](_0x9105fe);}})[_0x6050('0x24')](handleError(_0x216aff,null));};exports[_0x6050('0x71')]=function(_0x5aaca5,_0x33e975){return db['Setting'][_0x6050('0x54')]({'where':{'id':_0x5aaca5[_0x6050('0x4f')]['id']},'attributes':['securePassword']})['then'](respondWithResult(_0x33e975,null))[_0x6050('0x24')](handleError(_0x33e975,null));};exports[_0x6050('0x72')]=function(_0x26d37d,_0x56d712,_0x6257ca){if(_0x26d37d['file']&&_0x26d37d[_0x6050('0x56')][_0x6050('0x58')]){_0x26d37d[_0x6050('0x53')]['preferred']=_0x26d37d[_0x6050('0x56')][_0x6050('0x58')];}return db[_0x6050('0x38')]['find']({'where':{'id':_0x26d37d[_0x6050('0x4f')]['id']}})[_0x6050('0x1a')](handleEntityNotFound(_0x56d712,null))['then'](saveUpdates(_0x26d37d[_0x6050('0x53')],null))['then'](respondWithResult(_0x56d712,null))[_0x6050('0x24')](handleError(_0x56d712,null));};var utilLicense=require(_0x6050('0x16'));exports[_0x6050('0x73')]=function(_0x69cfb5,_0x4c6a0b,_0x4c7a42){var _0x39d139='server/files/images/logos';var _0x249a80={'custom':![]};return utilLicense[_0x6050('0x5b')]()[_0x6050('0x1a')](function(_0x3c147e){if(_0x3c147e){_0x249a80=_0x3c147e;}return db[_0x6050('0x38')]['find']({'where':{'id':_0x69cfb5[_0x6050('0x4f')]['id']},'attributes':[_0x6050('0x57'),_0x6050('0x6f'),'preferred',_0x6050('0x5d'),'defaultLogo','defaultLoginLogo',_0x6050('0x60'),'defaultFavicon'],'raw':!![]});})[_0x6050('0x1a')](handleEntityNotFound(_0x4c6a0b,null))['then'](function(_0x2f14f3){if(_0x2f14f3){var _0x3aaa63=_0x2f14f3[_0x6050('0x5c')]&&fs[_0x6050('0x69')](path['join'](config[_0x6050('0x63')],_0x39d139,_[_0x6050('0x64')](_0x2f14f3[_0x6050('0x5c')])))?path[_0x6050('0x62')](config[_0x6050('0x63')],_0x39d139,_[_0x6050('0x64')](_0x2f14f3['preferred'])):path[_0x6050('0x62')](config[_0x6050('0x63')],_0x39d139,_['toLower'](_0x6050('0x74')));var _0x10694c=_0x6050('0x65')+_[_0x6050('0x66')](_0x6050('0x5c'));if(_0x2f14f3[_0x10694c]||!_0x249a80[_0x6050('0x67')]||!_0x249a80['preferred']){_0x3aaa63=path[_0x6050('0x62')](config[_0x6050('0x63')],_0x39d139,_[_0x6050('0x64')](_0x6050('0x74')));}if(!fs['existsSync'](_0x3aaa63)){throw new db[(_0x6050('0x6a'))][(_0x6050('0x6b'))](_[_0x6050('0x66')](_0x6050('0x5c'))+_0x6050('0x6c'));}return _0x4c6a0b['download'](_0x3aaa63);}})[_0x6050('0x24')](handleError(_0x4c6a0b,null));};exports['addFavicon']=function(_0xc2d8de,_0xadc45e,_0x295689){if(_0xc2d8de[_0x6050('0x56')]&&_0xc2d8de[_0x6050('0x56')]['filename']){_0xc2d8de[_0x6050('0x53')][_0x6050('0x5d')]=_0xc2d8de[_0x6050('0x56')][_0x6050('0x58')];}return db[_0x6050('0x38')][_0x6050('0x54')]({'where':{'id':_0xc2d8de[_0x6050('0x4f')]['id']}})[_0x6050('0x1a')](handleEntityNotFound(_0xadc45e,null))[_0x6050('0x1a')](saveUpdates(_0xc2d8de[_0x6050('0x53')],null))[_0x6050('0x1a')](respondWithResult(_0xadc45e,null))[_0x6050('0x24')](handleError(_0xadc45e,null));};var utilLicense=require(_0x6050('0x16'));exports['getFavicon']=function(_0x1932a1,_0xc910f7,_0x32da97){var _0x19dab6='server/files/images/logos';var _0x5f7012={'custom':![]};return utilLicense[_0x6050('0x5b')]()[_0x6050('0x1a')](function(_0x125c0d){if(_0x125c0d){_0x5f7012=_0x125c0d;}return db['Setting'][_0x6050('0x54')]({'where':{'id':_0x1932a1[_0x6050('0x4f')]['id']},'attributes':[_0x6050('0x57'),_0x6050('0x6f'),_0x6050('0x5c'),_0x6050('0x5d'),_0x6050('0x5e'),_0x6050('0x5f'),'defaultPreferred',_0x6050('0x61')],'raw':!![]});})[_0x6050('0x1a')](handleEntityNotFound(_0xc910f7,null))[_0x6050('0x1a')](function(_0xb625ed){if(_0xb625ed){var _0x31b44c=_0xb625ed['favicon']&&fs['existsSync'](path[_0x6050('0x62')](config[_0x6050('0x63')],_0x19dab6,_[_0x6050('0x64')](_0xb625ed[_0x6050('0x5d')])))?path[_0x6050('0x62')](config['root'],_0x19dab6,_['toLower'](_0xb625ed[_0x6050('0x5d')])):path[_0x6050('0x62')](config['root'],_0x19dab6,_[_0x6050('0x64')](_0x6050('0x75')));var _0x51855c=_0x6050('0x65')+_[_0x6050('0x66')](_0x6050('0x5d'));if(_0xb625ed[_0x51855c]||!_0x5f7012['custom']){_0x31b44c=path[_0x6050('0x62')](config[_0x6050('0x63')],_0x19dab6,_['toLower'](_0x6050('0x75')));}if(!fs[_0x6050('0x69')](_0x31b44c)){throw new db[(_0x6050('0x6a'))][(_0x6050('0x6b'))](_[_0x6050('0x66')](_0x6050('0x5d'))+_0x6050('0x6c'));}return _0xc910f7[_0x6050('0x76')](_0x31b44c);}})[_0x6050('0x24')](handleError(_0xc910f7,null));};exports[_0x6050('0x77')]=function(_0x7a9455,_0x484ce9){var _0x40346e={'offset':moment()[_0x6050('0x78')]()};_0x40346e['now']=moment()[_0x6050('0x78')](_0x40346e['offset'])[_0x6050('0x79')]('YYYY-MM-DD\x20HH:mm:ss:SSS');return _0x484ce9[_0x6050('0x27')](0xc8)[_0x6050('0x35')](_0x40346e);};
\ No newline at end of file
+var _0x61ea=['addLogoLogin','loginLogo','getLogo','server/files/images/logos','getLicense','preferred','favicon','defaultLogo','defaultLoginLogo','defaultPreferred','defaultFavicon','existsSync','join','root','toLower','default_logo.svg','default','upperFirst','Sequelize','\x20not\x20found','download','default_loginLogo.svg','ValidationError','gdpr','securePassword','getPreferred','custom','addFavicon','getFavicon','default_favicon.ico','getDate','utcOffset','now','format','YYYY-MM-DD\x20HH:mm:ss:SSS','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','jayson/promise','client','request','info','Setting,\x20%s,\x20%s','debug','Setting,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','reject','update','then','stack','name','send','map','Setting','rawAttributes','fieldName','type','key','query','filters','intersection','model','attributes','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','include','findAll','rows','show','params','keys','length','includeAll','find','body','addLogo','file','logo','filename'];(function(_0x26a3b2,_0x2aa487){var _0x226b5e=function(_0x4c4f27){while(--_0x4c4f27){_0x26a3b2['push'](_0x26a3b2['shift']());}};_0x226b5e(++_0x2aa487);}(_0x61ea,0x1a0));var _0xa61e=function(_0x2810a5,_0x348415){_0x2810a5=_0x2810a5-0x0;var _0x278816=_0x61ea[_0x2810a5];return _0x278816;};'use strict';var emlformat=require(_0xa61e('0x0'));var rimraf=require(_0xa61e('0x1'));var zipdir=require(_0xa61e('0x2'));var jsonpatch=require(_0xa61e('0x3'));var rp=require(_0xa61e('0x4'));var moment=require(_0xa61e('0x5'));var BPromise=require(_0xa61e('0x6'));var Mustache=require(_0xa61e('0x7'));var util=require(_0xa61e('0x8'));var path=require(_0xa61e('0x9'));var sox=require(_0xa61e('0xa'));var csv=require('to-csv');var ejs=require(_0xa61e('0xb'));var fs=require('fs');var fs_extra=require(_0xa61e('0xc'));var _=require(_0xa61e('0xd'));var squel=require(_0xa61e('0xe'));var crypto=require(_0xa61e('0xf'));var jsforce=require(_0xa61e('0x10'));var deskjs=require(_0xa61e('0x11'));var toCsv=require(_0xa61e('0x12'));var querystring=require(_0xa61e('0x13'));var Papa=require(_0xa61e('0x14'));var Redis=require('ioredis');var authService=require(_0xa61e('0x15'));var qs=require(_0xa61e('0x16'));var as=require(_0xa61e('0x17'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xa61e('0x18'))(_0xa61e('0x19'));var utils=require(_0xa61e('0x1a'));var config=require('../../config/environment');var licenseUtil=require(_0xa61e('0x1b'));var db=require(_0xa61e('0x1c'))['db'];var jayson=require(_0xa61e('0x1d'));var client=jayson[_0xa61e('0x1e')]['http']({'port':0x232a});function respondWithRpcPromise(_0x89f6bd,_0x1b04af,_0x251e51,_0x2666bc){return new BPromise(function(_0x15d9dc,_0x7d8884){var _0x5751fb=_0x2666bc||client;return _0x5751fb[_0xa61e('0x1f')](_0x89f6bd,_0x251e51)['then'](function(_0x4d8e23){logger[_0xa61e('0x20')](_0xa61e('0x21'),_0x1b04af,'request\x20sent');logger[_0xa61e('0x22')](_0xa61e('0x23'),_0x1b04af,_0xa61e('0x24'),JSON[_0xa61e('0x25')](_0x4d8e23));if(_0x4d8e23[_0xa61e('0x26')]){if(_0x4d8e23[_0xa61e('0x26')][_0xa61e('0x27')]===0x1f4){logger[_0xa61e('0x26')](_0xa61e('0x21'),_0x1b04af,_0x4d8e23['error'][_0xa61e('0x28')]);return _0x7d8884(_0x4d8e23['error'][_0xa61e('0x28')]);}logger['error'](_0xa61e('0x21'),_0x1b04af,_0x4d8e23[_0xa61e('0x26')][_0xa61e('0x28')]);return _0x15d9dc(_0x4d8e23[_0xa61e('0x26')]['message']);}else{logger[_0xa61e('0x20')](_0xa61e('0x21'),_0x1b04af,_0xa61e('0x24'));_0x15d9dc(_0x4d8e23['result']['message']);}})[_0xa61e('0x29')](function(_0x4b8827){logger['error'](_0xa61e('0x21'),_0x1b04af,_0x4b8827);_0x7d8884(_0x4b8827);});});}function respondWithStatusCode(_0x3fa7dd,_0x47e2fd){_0x47e2fd=_0x47e2fd||0xcc;return function(_0x4d4fe6){if(_0x4d4fe6){return _0x3fa7dd[_0xa61e('0x2a')](_0x47e2fd);}return _0x3fa7dd[_0xa61e('0x2b')](_0x47e2fd)[_0xa61e('0x2c')]();};}function respondWithResult(_0x48eabe,_0x299cb5){_0x299cb5=_0x299cb5||0xc8;return function(_0x18f9c4){if(_0x18f9c4){return _0x48eabe[_0xa61e('0x2b')](_0x299cb5)[_0xa61e('0x2d')](_0x18f9c4);}};}function respondWithFilteredResult(_0x437f8f,_0x2fa2a1){return function(_0x6e9064){if(_0x6e9064){var _0xa7ff5b=typeof _0x2fa2a1[_0xa61e('0x2e')]===_0xa61e('0x2f')&&typeof _0x2fa2a1[_0xa61e('0x30')]==='undefined';var _0x2940b3=_0x6e9064[_0xa61e('0x31')];var _0x2f864e=_0xa7ff5b?0x0:_0x2fa2a1[_0xa61e('0x2e')];var _0x2f2305=_0xa7ff5b?_0x6e9064['count']:_0x2fa2a1['offset']+_0x2fa2a1['limit'];var _0x6ed1b5;if(_0x2f2305>=_0x2940b3){_0x2f2305=_0x2940b3;_0x6ed1b5=0xc8;}else{_0x6ed1b5=0xce;}_0x437f8f[_0xa61e('0x2b')](_0x6ed1b5);return _0x437f8f[_0xa61e('0x32')]('Content-Range',_0x2f864e+'-'+_0x2f2305+'/'+_0x2940b3)['json'](_0x6e9064);}return null;};}function patchUpdates(_0x4ea855){return function(_0x7e2e08){try{jsonpatch[_0xa61e('0x33')](_0x7e2e08,_0x4ea855,!![]);}catch(_0x3ff315){return BPromise[_0xa61e('0x34')](_0x3ff315);}return _0x7e2e08['save']();};}function saveUpdates(_0x1beadb,_0x37711a){return function(_0x2b37e4){if(_0x2b37e4){return _0x2b37e4[_0xa61e('0x35')](_0x1beadb)['then'](function(_0x4f5d28){return _0x4f5d28;});}return null;};}function removeEntity(_0x3cf146,_0x550686){return function(_0x4d353e){if(_0x4d353e){return _0x4d353e['destroy']()[_0xa61e('0x36')](function(){_0x3cf146[_0xa61e('0x2b')](0xcc)[_0xa61e('0x2c')]();});}};}function handleEntityNotFound(_0x1d5ee7,_0x2dd53c){return function(_0x123410){if(!_0x123410){_0x1d5ee7[_0xa61e('0x2a')](0x194);}return _0x123410;};}function handleError(_0x148240,_0x28480f){_0x28480f=_0x28480f||0x1f4;return function(_0x2a42fa){logger['error'](_0x2a42fa[_0xa61e('0x37')]);if(_0x2a42fa[_0xa61e('0x38')]){delete _0x2a42fa[_0xa61e('0x38')];}_0x148240[_0xa61e('0x2b')](_0x28480f)[_0xa61e('0x39')](_0x2a42fa);};}exports['index']=function(_0x533137,_0x5cb1ef){var _0x58250e={},_0x314d6e={},_0x50ce43={'count':0x0,'rows':[]};var _0x303d5e=_[_0xa61e('0x3a')](db[_0xa61e('0x3b')][_0xa61e('0x3c')],function(_0x4edd3e){return{'name':_0x4edd3e[_0xa61e('0x3d')],'type':_0x4edd3e[_0xa61e('0x3e')][_0xa61e('0x3f')]};});_0x314d6e['model']=_[_0xa61e('0x3a')](_0x303d5e,_0xa61e('0x38'));_0x314d6e[_0xa61e('0x40')]=_['keys'](_0x533137[_0xa61e('0x40')]);_0x314d6e[_0xa61e('0x41')]=_[_0xa61e('0x42')](_0x314d6e['model'],_0x314d6e['query']);_0x58250e['attributes']=_[_0xa61e('0x42')](_0x314d6e[_0xa61e('0x43')],qs['fields'](_0x533137[_0xa61e('0x40')]['fields']));_0x58250e[_0xa61e('0x44')]=_0x58250e[_0xa61e('0x44')]['length']?_0x58250e[_0xa61e('0x44')]:_0x314d6e[_0xa61e('0x43')];if(!_0x533137[_0xa61e('0x40')][_0xa61e('0x45')]('nolimit')){_0x58250e[_0xa61e('0x30')]=qs['limit'](_0x533137['query']['limit']);_0x58250e[_0xa61e('0x2e')]=qs[_0xa61e('0x2e')](_0x533137[_0xa61e('0x40')][_0xa61e('0x2e')]);}_0x58250e[_0xa61e('0x46')]=qs[_0xa61e('0x47')](_0x533137[_0xa61e('0x40')][_0xa61e('0x47')]);_0x58250e[_0xa61e('0x48')]=qs[_0xa61e('0x41')](_[_0xa61e('0x49')](_0x533137[_0xa61e('0x40')],_0x314d6e[_0xa61e('0x41')]),_0x303d5e);if(_0x533137['query'][_0xa61e('0x4a')]){_0x58250e[_0xa61e('0x48')]=_[_0xa61e('0x4b')](_0x58250e[_0xa61e('0x48')],{'$or':_[_0xa61e('0x3a')](_0x303d5e,function(_0x5936a9){if(_0x5936a9['type']!==_0xa61e('0x4c')){var _0x3e140e={};_0x3e140e[_0x5936a9['name']]={'$like':'%'+_0x533137['query'][_0xa61e('0x4a')]+'%'};return _0x3e140e;}})});}_0x58250e=_['merge']({},_0x58250e,_0x533137[_0xa61e('0x4d')]);var _0x55ad1a={'where':_0x58250e['where']};return db['Setting'][_0xa61e('0x31')](_0x55ad1a)[_0xa61e('0x36')](function(_0x544357){_0x50ce43[_0xa61e('0x31')]=_0x544357;if(_0x533137[_0xa61e('0x40')]['includeAll']){_0x58250e[_0xa61e('0x4e')]=[{'all':!![]}];}return db[_0xa61e('0x3b')][_0xa61e('0x4f')](_0x58250e);})[_0xa61e('0x36')](function(_0x5565f3){_0x50ce43[_0xa61e('0x50')]=_0x5565f3;return _0x50ce43;})[_0xa61e('0x36')](respondWithFilteredResult(_0x5cb1ef,_0x58250e))['catch'](handleError(_0x5cb1ef,null));};exports[_0xa61e('0x51')]=function(_0x2acf43,_0x116b00){var _0x13789f={'raw':![],'where':{'id':_0x2acf43[_0xa61e('0x52')]['id']}},_0x282e7b={};_0x282e7b['model']=_[_0xa61e('0x53')](db[_0xa61e('0x3b')][_0xa61e('0x3c')]);_0x282e7b['query']=_[_0xa61e('0x53')](_0x2acf43['query']);_0x282e7b[_0xa61e('0x41')]=_[_0xa61e('0x42')](_0x282e7b[_0xa61e('0x43')],_0x282e7b['query']);_0x13789f[_0xa61e('0x44')]=_[_0xa61e('0x42')](_0x282e7b[_0xa61e('0x43')],qs['fields'](_0x2acf43[_0xa61e('0x40')]['fields']));_0x13789f[_0xa61e('0x44')]=_0x13789f[_0xa61e('0x44')][_0xa61e('0x54')]?_0x13789f[_0xa61e('0x44')]:_0x282e7b[_0xa61e('0x43')];if(_0x2acf43[_0xa61e('0x40')][_0xa61e('0x55')]){_0x13789f['include']=[{'all':!![]}];}_0x13789f=_['merge']({},_0x13789f,_0x2acf43[_0xa61e('0x4d')]);return db[_0xa61e('0x3b')][_0xa61e('0x56')](_0x13789f)[_0xa61e('0x36')](handleEntityNotFound(_0x116b00,null))[_0xa61e('0x36')](respondWithResult(_0x116b00,null))[_0xa61e('0x29')](handleError(_0x116b00,null));};exports[_0xa61e('0x35')]=function(_0x1da8c1,_0x12e82b){if(_0x1da8c1[_0xa61e('0x57')]['id']){delete _0x1da8c1[_0xa61e('0x57')]['id'];}return db[_0xa61e('0x3b')][_0xa61e('0x56')]({'where':{'id':_0x1da8c1[_0xa61e('0x52')]['id']}})[_0xa61e('0x36')](handleEntityNotFound(_0x12e82b,null))[_0xa61e('0x36')](saveUpdates(_0x1da8c1[_0xa61e('0x57')],null))[_0xa61e('0x36')](respondWithResult(_0x12e82b,null))[_0xa61e('0x29')](handleError(_0x12e82b,null));};exports[_0xa61e('0x58')]=function(_0x1ce70a,_0x58f9b0,_0x1514a8){if(_0x1ce70a[_0xa61e('0x59')]&&_0x1ce70a[_0xa61e('0x59')]['filename']){_0x1ce70a[_0xa61e('0x57')][_0xa61e('0x5a')]=_0x1ce70a['file'][_0xa61e('0x5b')];}return db[_0xa61e('0x3b')][_0xa61e('0x56')]({'where':{'id':_0x1ce70a[_0xa61e('0x52')]['id']}})['then'](handleEntityNotFound(_0x58f9b0,null))[_0xa61e('0x36')](saveUpdates(_0x1ce70a[_0xa61e('0x57')],null))[_0xa61e('0x36')](respondWithResult(_0x58f9b0,null))['catch'](handleError(_0x58f9b0,null));};exports[_0xa61e('0x5c')]=function(_0x57f2ea,_0x35735b,_0x563e08){if(_0x57f2ea[_0xa61e('0x59')]&&_0x57f2ea[_0xa61e('0x59')][_0xa61e('0x5b')]){_0x57f2ea['body'][_0xa61e('0x5d')]=_0x57f2ea[_0xa61e('0x59')][_0xa61e('0x5b')];}return db[_0xa61e('0x3b')]['find']({'where':{'id':_0x57f2ea['params']['id']}})['then'](handleEntityNotFound(_0x35735b,null))['then'](saveUpdates(_0x57f2ea['body'],null))[_0xa61e('0x36')](respondWithResult(_0x35735b,null))[_0xa61e('0x29')](handleError(_0x35735b,null));};var utilLicense=require(_0xa61e('0x1b'));exports[_0xa61e('0x5e')]=function(_0x23878c,_0x5c583d,_0x4a7bca){var _0x3712fb=_0xa61e('0x5f');var _0x368096={'custom':![]};return utilLicense[_0xa61e('0x60')]()[_0xa61e('0x36')](function(_0x3de667){if(_0x3de667){_0x368096=_0x3de667;}return db[_0xa61e('0x3b')][_0xa61e('0x56')]({'where':{'id':_0x23878c[_0xa61e('0x52')]['id']},'attributes':[_0xa61e('0x5a'),_0xa61e('0x5d'),_0xa61e('0x61'),_0xa61e('0x62'),_0xa61e('0x63'),_0xa61e('0x64'),_0xa61e('0x65'),_0xa61e('0x66')],'raw':!![]});})[_0xa61e('0x36')](handleEntityNotFound(_0x5c583d,null))['then'](function(_0x4ee08a){if(_0x4ee08a){var _0x80c17c=_0x4ee08a[_0xa61e('0x5a')]&&fs[_0xa61e('0x67')](path[_0xa61e('0x68')](config[_0xa61e('0x69')],_0x3712fb,_[_0xa61e('0x6a')](_0x4ee08a[_0xa61e('0x5a')])))?path[_0xa61e('0x68')](config[_0xa61e('0x69')],_0x3712fb,_['toLower'](_0x4ee08a['logo'])):path[_0xa61e('0x68')](config['root'],_0x3712fb,_[_0xa61e('0x6a')](_0xa61e('0x6b')));var _0xa15ff=_0xa61e('0x6c')+_[_0xa61e('0x6d')](_0xa61e('0x5a'));if(_0x4ee08a[_0xa15ff]||!_0x368096['custom']){_0x80c17c=path[_0xa61e('0x68')](config[_0xa61e('0x69')],_0x3712fb,_[_0xa61e('0x6a')](_0xa61e('0x6b')));}if(!fs[_0xa61e('0x67')](_0x80c17c)){throw new db[(_0xa61e('0x6e'))]['ValidationError'](_[_0xa61e('0x6d')]('logo')+_0xa61e('0x6f'));}return _0x5c583d[_0xa61e('0x70')](_0x80c17c);}})[_0xa61e('0x29')](handleError(_0x5c583d,null));};var utilLicense=require('../../config/license/util');exports['getLogoLogin']=function(_0x1cfee7,_0x5b6157,_0xd556d3){var _0x2b0f4e=_0xa61e('0x5f');var _0x57541d={'custom':![]};return utilLicense[_0xa61e('0x60')]()['then'](function(_0x492e83){if(_0x492e83){_0x57541d=_0x492e83;}return db[_0xa61e('0x3b')]['find']({'where':{'id':_0x1cfee7[_0xa61e('0x52')]['id']},'attributes':['logo',_0xa61e('0x5d'),'preferred','favicon',_0xa61e('0x63'),_0xa61e('0x64'),_0xa61e('0x65'),_0xa61e('0x66')],'raw':!![]});})['then'](handleEntityNotFound(_0x5b6157,null))[_0xa61e('0x36')](function(_0x27794e){if(_0x27794e){var _0x11e6cc=_0x27794e[_0xa61e('0x5d')]&&fs[_0xa61e('0x67')](path[_0xa61e('0x68')](config[_0xa61e('0x69')],_0x2b0f4e,_[_0xa61e('0x6a')](_0x27794e[_0xa61e('0x5d')])))?path[_0xa61e('0x68')](config[_0xa61e('0x69')],_0x2b0f4e,_[_0xa61e('0x6a')](_0x27794e[_0xa61e('0x5d')])):path['join'](config[_0xa61e('0x69')],_0x2b0f4e,_['toLower']('default_loginLogo.svg'));var _0x2392ef='default'+_['upperFirst'](_0xa61e('0x5d'));if(_0x27794e[_0x2392ef]||!_0x57541d['custom']){_0x11e6cc=path[_0xa61e('0x68')](config['root'],_0x2b0f4e,_['toLower'](_0xa61e('0x71')));}if(!fs[_0xa61e('0x67')](_0x11e6cc)){throw new db[(_0xa61e('0x6e'))][(_0xa61e('0x72'))](_[_0xa61e('0x6d')]('loginLogo')+'\x20not\x20found');}return _0x5b6157['download'](_0x11e6cc);}})['catch'](handleError(_0x5b6157,null));};exports[_0xa61e('0x73')]=function(_0x4d554a,_0x420c57){return db[_0xa61e('0x3b')][_0xa61e('0x56')]({'where':{'id':_0x4d554a['params']['id']},'attributes':[_0xa61e('0x74')]})[_0xa61e('0x36')](respondWithResult(_0x420c57,null))['catch'](handleError(_0x420c57,null));};exports['addPreferred']=function(_0x1465f3,_0x54ae89,_0x4178fd){if(_0x1465f3['file']&&_0x1465f3[_0xa61e('0x59')][_0xa61e('0x5b')]){_0x1465f3[_0xa61e('0x57')][_0xa61e('0x61')]=_0x1465f3[_0xa61e('0x59')][_0xa61e('0x5b')];}return db[_0xa61e('0x3b')]['find']({'where':{'id':_0x1465f3['params']['id']}})[_0xa61e('0x36')](handleEntityNotFound(_0x54ae89,null))[_0xa61e('0x36')](saveUpdates(_0x1465f3[_0xa61e('0x57')],null))[_0xa61e('0x36')](respondWithResult(_0x54ae89,null))[_0xa61e('0x29')](handleError(_0x54ae89,null));};var utilLicense=require('../../config/license/util');exports[_0xa61e('0x75')]=function(_0x5a8e52,_0x10ea71,_0x15f9fb){var _0x492e9a=_0xa61e('0x5f');var _0x5072cd={'custom':![]};return utilLicense[_0xa61e('0x60')]()[_0xa61e('0x36')](function(_0x697847){if(_0x697847){_0x5072cd=_0x697847;}return db[_0xa61e('0x3b')][_0xa61e('0x56')]({'where':{'id':_0x5a8e52[_0xa61e('0x52')]['id']},'attributes':['logo',_0xa61e('0x5d'),_0xa61e('0x61'),_0xa61e('0x62'),_0xa61e('0x63'),_0xa61e('0x64'),_0xa61e('0x65'),_0xa61e('0x66')],'raw':!![]});})[_0xa61e('0x36')](handleEntityNotFound(_0x10ea71,null))[_0xa61e('0x36')](function(_0x2744e7){if(_0x2744e7){var _0x11e01d=_0x2744e7[_0xa61e('0x61')]&&fs[_0xa61e('0x67')](path['join'](config[_0xa61e('0x69')],_0x492e9a,_['toLower'](_0x2744e7[_0xa61e('0x61')])))?path[_0xa61e('0x68')](config[_0xa61e('0x69')],_0x492e9a,_[_0xa61e('0x6a')](_0x2744e7[_0xa61e('0x61')])):path[_0xa61e('0x68')](config[_0xa61e('0x69')],_0x492e9a,_[_0xa61e('0x6a')]('default_preferred.png'));var _0x359542=_0xa61e('0x6c')+_[_0xa61e('0x6d')](_0xa61e('0x61'));if(_0x2744e7[_0x359542]||!_0x5072cd[_0xa61e('0x76')]||!_0x5072cd[_0xa61e('0x61')]){_0x11e01d=path['join'](config['root'],_0x492e9a,_[_0xa61e('0x6a')]('default_preferred.png'));}if(!fs[_0xa61e('0x67')](_0x11e01d)){throw new db[(_0xa61e('0x6e'))][(_0xa61e('0x72'))](_['upperFirst']('preferred')+_0xa61e('0x6f'));}return _0x10ea71[_0xa61e('0x70')](_0x11e01d);}})[_0xa61e('0x29')](handleError(_0x10ea71,null));};exports[_0xa61e('0x77')]=function(_0x189bd9,_0x222b71,_0x3e3b33){if(_0x189bd9[_0xa61e('0x59')]&&_0x189bd9['file']['filename']){_0x189bd9[_0xa61e('0x57')][_0xa61e('0x62')]=_0x189bd9[_0xa61e('0x59')][_0xa61e('0x5b')];}return db['Setting']['find']({'where':{'id':_0x189bd9[_0xa61e('0x52')]['id']}})[_0xa61e('0x36')](handleEntityNotFound(_0x222b71,null))[_0xa61e('0x36')](saveUpdates(_0x189bd9[_0xa61e('0x57')],null))[_0xa61e('0x36')](respondWithResult(_0x222b71,null))['catch'](handleError(_0x222b71,null));};var utilLicense=require(_0xa61e('0x1b'));exports[_0xa61e('0x78')]=function(_0x33348d,_0x2c22f8,_0x38ef7b){var _0x24fbfe=_0xa61e('0x5f');var _0x17fbcc={'custom':![]};return utilLicense[_0xa61e('0x60')]()['then'](function(_0x111430){if(_0x111430){_0x17fbcc=_0x111430;}return db[_0xa61e('0x3b')]['find']({'where':{'id':_0x33348d[_0xa61e('0x52')]['id']},'attributes':[_0xa61e('0x5a'),_0xa61e('0x5d'),_0xa61e('0x61'),_0xa61e('0x62'),_0xa61e('0x63'),'defaultLoginLogo',_0xa61e('0x65'),_0xa61e('0x66')],'raw':!![]});})[_0xa61e('0x36')](handleEntityNotFound(_0x2c22f8,null))[_0xa61e('0x36')](function(_0x1b5b37){if(_0x1b5b37){var _0x21d86f=_0x1b5b37[_0xa61e('0x62')]&&fs[_0xa61e('0x67')](path[_0xa61e('0x68')](config['root'],_0x24fbfe,_[_0xa61e('0x6a')](_0x1b5b37[_0xa61e('0x62')])))?path[_0xa61e('0x68')](config[_0xa61e('0x69')],_0x24fbfe,_[_0xa61e('0x6a')](_0x1b5b37[_0xa61e('0x62')])):path[_0xa61e('0x68')](config['root'],_0x24fbfe,_[_0xa61e('0x6a')](_0xa61e('0x79')));var _0xc703c5=_0xa61e('0x6c')+_[_0xa61e('0x6d')](_0xa61e('0x62'));if(_0x1b5b37[_0xc703c5]||!_0x17fbcc[_0xa61e('0x76')]){_0x21d86f=path[_0xa61e('0x68')](config[_0xa61e('0x69')],_0x24fbfe,_['toLower'](_0xa61e('0x79')));}if(!fs[_0xa61e('0x67')](_0x21d86f)){throw new db['Sequelize'][(_0xa61e('0x72'))](_[_0xa61e('0x6d')](_0xa61e('0x62'))+'\x20not\x20found');}return _0x2c22f8[_0xa61e('0x70')](_0x21d86f);}})[_0xa61e('0x29')](handleError(_0x2c22f8,null));};exports[_0xa61e('0x7a')]=function(_0x2606da,_0x14e19f){var _0x2b2188={'offset':moment()[_0xa61e('0x7b')]()};_0x2b2188[_0xa61e('0x7c')]=moment()[_0xa61e('0x7b')](_0x2b2188[_0xa61e('0x2e')])[_0xa61e('0x7d')](_0xa61e('0x7e'));return _0x14e19f['status'](0xc8)[_0xa61e('0x39')](_0x2b2188);};
\ No newline at end of file
index 05a88ad..1593d3f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x34e8=['settings','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./setting.attributes','exports','Setting'];(function(_0x41f567,_0x3eb995){var _0x51dd07=function(_0x26694e){while(--_0x26694e){_0x41f567['push'](_0x41f567['shift']());}};_0x51dd07(++_0x3eb995);}(_0x34e8,0x12c));var _0x834e=function(_0x46004f,_0x5e5b0d){_0x46004f=_0x46004f-0x0;var _0x1c183b=_0x34e8[_0x46004f];return _0x1c183b;};'use strict';var _=require(_0x834e('0x0'));var util=require(_0x834e('0x1'));var logger=require(_0x834e('0x2'))(_0x834e('0x3'));var moment=require('moment');var BPromise=require(_0x834e('0x4'));var rp=require(_0x834e('0x5'));var fs=require('fs');var path=require(_0x834e('0x6'));var rimraf=require(_0x834e('0x7'));var config=require(_0x834e('0x8'));var attributes=require(_0x834e('0x9'));module[_0x834e('0xa')]=function(_0x4a2018,_0x858aa1){return _0x4a2018['define'](_0x834e('0xb'),attributes,{'tableName':_0x834e('0xc'),'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(_0x11005e,_0x20c3d2){var _0x29338f=function(_0x3384e9){while(--_0x3384e9){_0x11005e['push'](_0x11005e['shift']());}};_0x29338f(++_0x20c3d2);}(_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 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 95285f4..fc1e7d0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7dc9=['request\x20sent','stringify','error','code','message','result','catch','ShowSetting','Setting','options','raw','where','attributes','include','model','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Setting,\x20%s,\x20%s','debug','Setting,\x20%s,\x20%s,\x20%s'];(function(_0x18ab2a,_0x4debcd){var _0x16dcee=function(_0x10107a){while(--_0x10107a){_0x18ab2a['push'](_0x18ab2a['shift']());}};_0x16dcee(++_0x4debcd);}(_0x7dc9,0x16f));var _0x97dc=function(_0x30eda9,_0x7ef14e){_0x30eda9=_0x30eda9-0x0;var _0x208ae3=_0x7dc9[_0x30eda9];return _0x208ae3;};'use strict';var _=require('lodash');var util=require(_0x97dc('0x0'));var moment=require('moment');var BPromise=require(_0x97dc('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x97dc('0x2'));var db=require(_0x97dc('0x3'))['db'];var utils=require(_0x97dc('0x4'));var logger=require(_0x97dc('0x5'))(_0x97dc('0x6'));var config=require(_0x97dc('0x7'));var jayson=require(_0x97dc('0x8'));var client=jayson[_0x97dc('0x9')][_0x97dc('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1a7981,_0x411028,_0x448366){return new BPromise(function(_0x3c9ab4,_0x147ec5){return client[_0x97dc('0xb')](_0x1a7981,_0x448366)[_0x97dc('0xc')](function(_0x3e75b1){logger[_0x97dc('0xd')](_0x97dc('0xe'),_0x411028,'request\x20sent');logger[_0x97dc('0xf')](_0x97dc('0x10'),_0x411028,_0x97dc('0x11'),JSON[_0x97dc('0x12')](_0x3e75b1));if(_0x3e75b1['error']){if(_0x3e75b1[_0x97dc('0x13')][_0x97dc('0x14')]===0x1f4){logger['error']('Setting,\x20%s,\x20%s',_0x411028,_0x3e75b1[_0x97dc('0x13')]['message']);return _0x147ec5(_0x3e75b1[_0x97dc('0x13')][_0x97dc('0x15')]);}logger[_0x97dc('0x13')]('Setting,\x20%s,\x20%s',_0x411028,_0x3e75b1[_0x97dc('0x13')][_0x97dc('0x15')]);return _0x3c9ab4(_0x3e75b1[_0x97dc('0x13')][_0x97dc('0x15')]);}else{logger[_0x97dc('0xd')](_0x97dc('0xe'),_0x411028,_0x97dc('0x11'));_0x3c9ab4(_0x3e75b1[_0x97dc('0x16')][_0x97dc('0x15')]);}})[_0x97dc('0x17')](function(_0x474e80){logger[_0x97dc('0x13')](_0x97dc('0xe'),_0x411028,_0x474e80);_0x147ec5(_0x474e80);});});}exports[_0x97dc('0x18')]=function(_0x2b6837){var _0x4e00f2=this;return new Promise(function(_0x54a3dc,_0x2ce918){return db[_0x97dc('0x19')]['find']({'raw':_0x2b6837[_0x97dc('0x1a')]?_0x2b6837[_0x97dc('0x1a')][_0x97dc('0x1b')]===undefined?!![]:![]:!![],'where':_0x2b6837[_0x97dc('0x1a')]?_0x2b6837[_0x97dc('0x1a')][_0x97dc('0x1c')]||null:null,'attributes':_0x2b6837[_0x97dc('0x1a')]?_0x2b6837['options'][_0x97dc('0x1d')]||null:null,'include':_0x2b6837[_0x97dc('0x1a')]?_0x2b6837[_0x97dc('0x1a')][_0x97dc('0x1e')]?_['map'](_0x2b6837[_0x97dc('0x1a')]['include'],function(_0x26c3cb){return{'model':db[_0x26c3cb[_0x97dc('0x1f')]],'as':_0x26c3cb['as'],'attributes':_0x26c3cb[_0x97dc('0x1d')],'include':_0x26c3cb[_0x97dc('0x1e')]?_['map'](_0x26c3cb[_0x97dc('0x1e')],function(_0x490ebc){return{'model':db[_0x490ebc['model']],'as':_0x490ebc['as'],'attributes':_0x490ebc[_0x97dc('0x1d')],'include':_0x490ebc[_0x97dc('0x1e')]?_['map'](_0x490ebc['include'],function(_0x514fd8){return{'model':db[_0x514fd8[_0x97dc('0x1f')]],'as':_0x514fd8['as'],'attributes':_0x514fd8[_0x97dc('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x97dc('0xc')](function(_0xa896ed){logger[_0x97dc('0xd')](_0x97dc('0x18'),_0x2b6837);logger[_0x97dc('0xf')](_0x97dc('0x18'),_0x2b6837,JSON[_0x97dc('0x12')](_0xa896ed));_0x54a3dc(_0xa896ed);})[_0x97dc('0x17')](function(_0x25816a){logger['error']('ShowSetting',_0x25816a[_0x97dc('0x15')],_0x2b6837);_0x2ce918(_0x4e00f2['error'](0x1f4,_0x25816a[_0x97dc('0x15')]));});});};
\ No newline at end of file
+var _0xc25c=['map','model','attributes','ShowSetting','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request','then','Setting,\x20%s,\x20%s','request\x20sent','Setting,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','find','options','raw','where','include'];(function(_0x4fde08,_0x463a36){var _0x12e725=function(_0x2670c5){while(--_0x2670c5){_0x4fde08['push'](_0x4fde08['shift']());}};_0x12e725(++_0x463a36);}(_0xc25c,0xfc));var _0xcc25=function(_0x30c221,_0x31ec55){_0x30c221=_0x30c221-0x0;var _0x581b70=_0xc25c[_0x30c221];return _0x581b70;};'use strict';var _=require('lodash');var util=require(_0xcc25('0x0'));var moment=require(_0xcc25('0x1'));var BPromise=require(_0xcc25('0x2'));var rs=require(_0xcc25('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xcc25('0x4'))['db'];var utils=require(_0xcc25('0x5'));var logger=require(_0xcc25('0x6'))('rpc');var config=require(_0xcc25('0x7'));var jayson=require(_0xcc25('0x8'));var client=jayson[_0xcc25('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0xba4996,_0x35faae,_0x51b0f9){return new BPromise(function(_0x2faf1f,_0x487bd4){return client[_0xcc25('0xa')](_0xba4996,_0x51b0f9)[_0xcc25('0xb')](function(_0x556833){logger['info'](_0xcc25('0xc'),_0x35faae,_0xcc25('0xd'));logger['debug'](_0xcc25('0xe'),_0x35faae,_0xcc25('0xd'),JSON[_0xcc25('0xf')](_0x556833));if(_0x556833['error']){if(_0x556833[_0xcc25('0x10')][_0xcc25('0x11')]===0x1f4){logger[_0xcc25('0x10')](_0xcc25('0xc'),_0x35faae,_0x556833[_0xcc25('0x10')]['message']);return _0x487bd4(_0x556833[_0xcc25('0x10')]['message']);}logger[_0xcc25('0x10')](_0xcc25('0xc'),_0x35faae,_0x556833[_0xcc25('0x10')][_0xcc25('0x12')]);return _0x2faf1f(_0x556833[_0xcc25('0x10')][_0xcc25('0x12')]);}else{logger[_0xcc25('0x13')](_0xcc25('0xc'),_0x35faae,_0xcc25('0xd'));_0x2faf1f(_0x556833[_0xcc25('0x14')][_0xcc25('0x12')]);}})[_0xcc25('0x15')](function(_0x44567a){logger[_0xcc25('0x10')]('Setting,\x20%s,\x20%s',_0x35faae,_0x44567a);_0x487bd4(_0x44567a);});});}exports['ShowSetting']=function(_0x455220){var _0x3350d7=this;return new Promise(function(_0x1f5315,_0x19be69){return db['Setting'][_0xcc25('0x16')]({'raw':_0x455220[_0xcc25('0x17')]?_0x455220[_0xcc25('0x17')][_0xcc25('0x18')]===undefined?!![]:![]:!![],'where':_0x455220[_0xcc25('0x17')]?_0x455220['options'][_0xcc25('0x19')]||null:null,'attributes':_0x455220['options']?_0x455220[_0xcc25('0x17')]['attributes']||null:null,'include':_0x455220[_0xcc25('0x17')]?_0x455220[_0xcc25('0x17')][_0xcc25('0x1a')]?_[_0xcc25('0x1b')](_0x455220['options']['include'],function(_0x2f1bfa){return{'model':db[_0x2f1bfa[_0xcc25('0x1c')]],'as':_0x2f1bfa['as'],'attributes':_0x2f1bfa[_0xcc25('0x1d')],'include':_0x2f1bfa[_0xcc25('0x1a')]?_[_0xcc25('0x1b')](_0x2f1bfa[_0xcc25('0x1a')],function(_0x3b9f31){return{'model':db[_0x3b9f31[_0xcc25('0x1c')]],'as':_0x3b9f31['as'],'attributes':_0x3b9f31[_0xcc25('0x1d')],'include':_0x3b9f31[_0xcc25('0x1a')]?_[_0xcc25('0x1b')](_0x3b9f31['include'],function(_0x133566){return{'model':db[_0x133566[_0xcc25('0x1c')]],'as':_0x133566['as'],'attributes':_0x133566[_0xcc25('0x1d')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x76a75c){logger[_0xcc25('0x13')]('ShowSetting',_0x455220);logger['debug'](_0xcc25('0x1e'),_0x455220,JSON[_0xcc25('0xf')](_0x76a75c));_0x1f5315(_0x76a75c);})[_0xcc25('0x15')](function(_0xaa915d){logger[_0xcc25('0x10')](_0xcc25('0x1e'),_0xaa915d['message'],_0x455220);_0x19be69(_0x3350d7[_0xcc25('0x10')](0x1f4,_0xaa915d[_0xcc25('0x12')]));});});};
\ No newline at end of file
index 7423971..07888ba 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(_0x3a58fc,_0x4787a9){var _0x5211fd=function(_0x55f5bf){while(--_0x55f5bf){_0x3a58fc['push'](_0x3a58fc['shift']());}};_0x5211fd(++_0x4787a9);}(_0x7a54,0x106));var _0x47a5=function(_0x391a45,_0x1296a8){_0x391a45=_0x391a45-0x0;var _0x5be5ea=_0x7a54[_0x391a45];return _0x5be5ea;};'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(_0x32e44f,_0x20542c){var _0x5d3ae8=function(_0x4311a4){while(--_0x4311a4){_0x32e44f['push'](_0x32e44f['shift']());}};_0x5d3ae8(++_0x20542c);}(_0x9957,0x93));var _0x7995=function(_0x6131cd,_0x4c26a1){_0x6131cd=_0x6131cd-0x0;var _0x47e916=_0x9957[_0x6131cd];return _0x47e916;};'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 0fc41f0..dd2ffc3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4aff=['bandwidth','infobip','intelepeer','BOOLEAN','TEXT','INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','sequelize','randomstring','exports','STRING','name','generate','ENUM','twilio','skebby','connectel','clicksend','clickatell'];(function(_0x24c194,_0xad42b5){var _0x46e37f=function(_0x9982d3){while(--_0x9982d3){_0x24c194['push'](_0x24c194['shift']());}};_0x46e37f(++_0xad42b5);}(_0x4aff,0x80));var _0xf4af=function(_0x51679b,_0x2d621c){_0x51679b=_0x51679b-0x0;var _0x4085f3=_0x4aff[_0x51679b];return _0x4085f3;};'use strict';var Sequelize=require(_0xf4af('0x0'));var rs=require(_0xf4af('0x1'));module[_0xf4af('0x2')]={'name':{'type':Sequelize[_0xf4af('0x3')],'unique':_0xf4af('0x4'),'allowNull':![]},'key':{'type':Sequelize[_0xf4af('0x3')],'allowNull':![]},'remote':{'type':Sequelize[_0xf4af('0x3')],'allowNull':![]},'token':{'type':Sequelize[_0xf4af('0x3')],'defaultValue':function(){return rs[_0xf4af('0x5')]();}},'phone':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0xf4af('0x6')](_0xf4af('0x7'),_0xf4af('0x8'),_0xf4af('0x9'),_0xf4af('0xa'),'plivo',_0xf4af('0xb'),_0xf4af('0xc'),'csc',_0xf4af('0xd'),_0xf4af('0xe'))},'accountSid':{'type':Sequelize[_0xf4af('0x3')]},'authId':{'type':Sequelize[_0xf4af('0x3')]},'authToken':{'type':Sequelize[_0xf4af('0x3')]},'smsMethod':{'type':Sequelize[_0xf4af('0x6')]('SI','TI','GP')},'username':{'type':Sequelize['STRING']},'password':{'type':Sequelize[_0xf4af('0x3')]},'apiKey':{'type':Sequelize[_0xf4af('0x3')]},'applicationId':{'type':Sequelize[_0xf4af('0x3')]},'accountId':{'type':Sequelize[_0xf4af('0x3')]},'senderString':{'type':Sequelize['STRING']},'deliveryReport':{'type':Sequelize[_0xf4af('0xf')],'defaultValue':![]},'description':{'type':Sequelize['STRING']},'notificationTemplate':{'type':Sequelize[_0xf4af('0x10')],'defaultValue':function(){return'Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}';}},'notificationSound':{'type':Sequelize[_0xf4af('0xf')],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0xf4af('0x11')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0xf4af('0x11')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0xf4af('0xf')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0xf4af('0x11')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'baseUrl':{'type':Sequelize[_0xf4af('0x3')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0xf4af('0x11')],'comment':_0xf4af('0x12')},'mandatoryDisposition':{'type':Sequelize[_0xf4af('0xf')],'defaultValue':![],'comment':_0xf4af('0x13'),'set':function(_0xb078aa){if(!_0xb078aa)this['setDataValue']('mandatoryDispositionPauseId',null);this['setDataValue']('mandatoryDisposition',_0xb078aa);}}};
\ No newline at end of file
+var _0x2513=['mandatoryDispositionPauseId','mandatoryDisposition','sequelize','randomstring','exports','STRING','name','generate','twilio','skebby','connectel','clicksend','plivo','clickatell','bandwidth','csc','infobip','ENUM','Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}','BOOLEAN','INTEGER','setDataValue'];(function(_0x28ccdc,_0x40b0e6){var _0x3099ad=function(_0x38fe3b){while(--_0x38fe3b){_0x28ccdc['push'](_0x28ccdc['shift']());}};_0x3099ad(++_0x40b0e6);}(_0x2513,0xde));var _0x3251=function(_0x2c0aa0,_0x342ea4){_0x2c0aa0=_0x2c0aa0-0x0;var _0x192edb=_0x2513[_0x2c0aa0];return _0x192edb;};'use strict';var Sequelize=require(_0x3251('0x0'));var rs=require(_0x3251('0x1'));module[_0x3251('0x2')]={'name':{'type':Sequelize[_0x3251('0x3')],'unique':_0x3251('0x4'),'allowNull':![]},'key':{'type':Sequelize['STRING'],'allowNull':![]},'remote':{'type':Sequelize[_0x3251('0x3')],'allowNull':![]},'token':{'type':Sequelize[_0x3251('0x3')],'defaultValue':function(){return rs[_0x3251('0x5')]();}},'phone':{'type':Sequelize[_0x3251('0x3')]},'type':{'type':Sequelize['ENUM'](_0x3251('0x6'),_0x3251('0x7'),_0x3251('0x8'),_0x3251('0x9'),_0x3251('0xa'),_0x3251('0xb'),_0x3251('0xc'),_0x3251('0xd'),_0x3251('0xe'),'intelepeer')},'accountSid':{'type':Sequelize[_0x3251('0x3')]},'authId':{'type':Sequelize[_0x3251('0x3')]},'authToken':{'type':Sequelize['STRING']},'smsMethod':{'type':Sequelize[_0x3251('0xf')]('SI','TI','GP')},'username':{'type':Sequelize[_0x3251('0x3')]},'password':{'type':Sequelize[_0x3251('0x3')]},'apiKey':{'type':Sequelize['STRING']},'applicationId':{'type':Sequelize[_0x3251('0x3')]},'accountId':{'type':Sequelize[_0x3251('0x3')]},'senderString':{'type':Sequelize['STRING']},'deliveryReport':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'description':{'type':Sequelize['STRING']},'notificationTemplate':{'type':Sequelize['TEXT'],'defaultValue':function(){return _0x3251('0x10');}},'notificationSound':{'type':Sequelize[_0x3251('0x11')],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x3251('0x12')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0x3251('0x12')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x3251('0x11')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x3251('0x11')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x3251('0x12')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'baseUrl':{'type':Sequelize[_0x3251('0x3')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0x3251('0x12')],'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0x3251('0x11')],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x33a5d0){if(!_0x33a5d0)this[_0x3251('0x13')](_0x3251('0x14'),null);this['setDataValue'](_0x3251('0x15'),_0x33a5d0);}}};
\ No newline at end of file
index 4c77b7c..866a3b7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x03e1=['type','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','include','rows','show','params','find','create','user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','addDisposition','SmsAccountId','Disposition','getDispositions','findOne','removeDispositions','addAnswer','CannedAnswer','getAnswers','findAll','removeAnswers','ids','SmsApplication','Applications','account','orderBy','priority','asc','CmContact','Sequelize','no\x20available\x20attributes','createdAt','updatedAt','difference','ListId','twilio','From','Body','messageId','MessageSid','skebby','from','sender','text','clicksend','message_id','plivo','infobip','results','originatingAddress','clickatell','fromNumber','bandwidth','intelepeer','refid','isNil','ValidationError','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','CmList','Contacts','DESC','list','SmsInteraction','spread','interaction','autoclose','applications','push','close','unmanaged','*,*,*,*','created','SmsMessage','AttachmentId','UserId','unshift','agent','waitForTheAssignedAgent','queueId','SmsQueue','queue','Start','startRouting','receiveMessage','SmsAccount,\x20%s,\x20%s,\x20%s,\x20%s','Content-Type','text/xml','<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22?>\x0a<Response></Response>','addApplications','sequelize','transaction','Transaction','ISOLATION_LEVELS','READ_COMMITTED','bulkCreate','findAndCountAll','finally','getApplications','Contact','User','fullname','internal','Tag','Tags','color','tag','to\x20is\x20mandatory','List','out','Messages','dataValues','debug','received\x20delivery\x20report\x20from','inspect','skebby_dispatch_id','connectel','statusInt','status_code','groupName','redif','DELIVERED','error_code','RECEIVED_BY_RECIPIENT','DELIVRD','ACCEPTD','csc','state','message-id','addAgents','omit','emit','userSmsAccount:save','removeAgents','isArray','userSmsAccount:remove','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','sox','to-csv','fs-extra','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./smsAccount.socket','register','jayson/promise','client','http','request','then','SmsAccount,\x20%s,\x20%s','request\x20sent','SmsAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','sendStatus','status','json','offset','undefined','count','limit','set','Content-Range','apply','save','update','get','SmsAccounts','UserProfileResource','destroy','end','stack','name','send','Pause','mandatoryDispositionPause','map','SmsAccount','rawAttributes','fieldName'];(function(_0x4a28a6,_0x4bac1c){var _0x2b2af6=function(_0x1244f2){while(--_0x1244f2){_0x4a28a6['push'](_0x4a28a6['shift']());}};_0x2b2af6(++_0x4bac1c);}(_0x03e1,0x188));var _0x103e=function(_0x104ebf,_0x406211){_0x104ebf=_0x104ebf-0x0;var _0x2312f7=_0x03e1[_0x104ebf];return _0x2312f7;};'use strict';var emlformat=require(_0x103e('0x0'));var rimraf=require(_0x103e('0x1'));var zipdir=require(_0x103e('0x2'));var jsonpatch=require(_0x103e('0x3'));var rp=require('request-promise');var moment=require(_0x103e('0x4'));var BPromise=require(_0x103e('0x5'));var Mustache=require(_0x103e('0x6'));var util=require('util');var path=require('path');var sox=require(_0x103e('0x7'));var csv=require(_0x103e('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x103e('0x9'));var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x103e('0xa'));var deskjs=require(_0x103e('0xb'));var toCsv=require(_0x103e('0x8'));var querystring=require(_0x103e('0xc'));var Papa=require(_0x103e('0xd'));var Redis=require('ioredis');var authService=require(_0x103e('0xe'));var qs=require(_0x103e('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x103e('0x10'));var logger=require(_0x103e('0x11'))(_0x103e('0x12'));var utils=require('../../config/utils');var config=require(_0x103e('0x13'));var licenseUtil=require('../../config/license/util');var db=require(_0x103e('0x14'))['db'];config['redis']=_[_0x103e('0x15')](config[_0x103e('0x16')],{'host':_0x103e('0x17'),'port':0x18eb});var socket=require(_0x103e('0x18'))(new Redis(config[_0x103e('0x16')]));require(_0x103e('0x19'))[_0x103e('0x1a')](socket);var jayson=require(_0x103e('0x1b'));var client=jayson[_0x103e('0x1c')][_0x103e('0x1d')]({'port':0x232c});function respondWithRpcPromise(_0x3d7cb3,_0x1c986c,_0x4aae60,_0xf050bf){return new BPromise(function(_0x93c26b,_0xc69b2d){var _0x5cbce7=_0xf050bf||client;return _0x5cbce7[_0x103e('0x1e')](_0x3d7cb3,_0x4aae60)[_0x103e('0x1f')](function(_0xe083a5){logger['info'](_0x103e('0x20'),_0x1c986c,_0x103e('0x21'));logger['debug'](_0x103e('0x22'),_0x1c986c,'request\x20sent',JSON[_0x103e('0x23')](_0xe083a5));if(_0xe083a5['error']){if(_0xe083a5[_0x103e('0x24')][_0x103e('0x25')]===0x1f4){logger[_0x103e('0x24')](_0x103e('0x20'),_0x1c986c,_0xe083a5[_0x103e('0x24')][_0x103e('0x26')]);return _0xc69b2d(_0xe083a5['error'][_0x103e('0x26')]);}logger[_0x103e('0x24')](_0x103e('0x20'),_0x1c986c,_0xe083a5['error'][_0x103e('0x26')]);return _0x93c26b(_0xe083a5[_0x103e('0x24')][_0x103e('0x26')]);}else{logger[_0x103e('0x27')](_0x103e('0x20'),_0x1c986c,_0x103e('0x21'));_0x93c26b(_0xe083a5[_0x103e('0x28')][_0x103e('0x26')]);}})[_0x103e('0x29')](function(_0x2dd1e6){logger[_0x103e('0x24')](_0x103e('0x20'),_0x1c986c,_0x2dd1e6);_0xc69b2d(_0x2dd1e6);});});}function respondWithStatusCode(_0x349a1f,_0x499954){_0x499954=_0x499954||0xcc;return function(_0x1e6f58){if(_0x1e6f58){return _0x349a1f[_0x103e('0x2a')](_0x499954);}return _0x349a1f[_0x103e('0x2b')](_0x499954)['end']();};}function respondWithResult(_0x4f23e5,_0x1b6672){_0x1b6672=_0x1b6672||0xc8;return function(_0x31e403){if(_0x31e403){return _0x4f23e5[_0x103e('0x2b')](_0x1b6672)[_0x103e('0x2c')](_0x31e403);}};}function respondWithFilteredResult(_0x12cd9b,_0x4993bf){return function(_0x829ccd){if(_0x829ccd){var _0xe6ab32=typeof _0x4993bf[_0x103e('0x2d')]===_0x103e('0x2e')&&typeof _0x4993bf['limit']==='undefined';var _0x40d772=_0x829ccd[_0x103e('0x2f')];var _0x5e5bd4=_0xe6ab32?0x0:_0x4993bf[_0x103e('0x2d')];var _0x21303a=_0xe6ab32?_0x829ccd[_0x103e('0x2f')]:_0x4993bf['offset']+_0x4993bf[_0x103e('0x30')];var _0x468b74;if(_0x21303a>=_0x40d772){_0x21303a=_0x40d772;_0x468b74=0xc8;}else{_0x468b74=0xce;}_0x12cd9b[_0x103e('0x2b')](_0x468b74);return _0x12cd9b[_0x103e('0x31')](_0x103e('0x32'),_0x5e5bd4+'-'+_0x21303a+'/'+_0x40d772)[_0x103e('0x2c')](_0x829ccd);}return null;};}function patchUpdates(_0x1779c1){return function(_0x1249ec){try{jsonpatch[_0x103e('0x33')](_0x1249ec,_0x1779c1,!![]);}catch(_0x1dacce){return BPromise['reject'](_0x1dacce);}return _0x1249ec[_0x103e('0x34')]();};}function saveUpdates(_0x4a99ee,_0x2e81d8){return function(_0x4c2e61){if(_0x4c2e61){return _0x4c2e61[_0x103e('0x35')](_0x4a99ee)['then'](function(_0x21656b){return _0x21656b;});}return null;};}function removeEntity(_0x319480,_0x6b36a8){return function(_0x2fd673){if(_0x2fd673){return _0x2fd673['destroy']()[_0x103e('0x1f')](function(){var _0x2f84ca=_0x2fd673[_0x103e('0x36')]({'plain':!![]});var _0x32f349=_0x103e('0x37');return db[_0x103e('0x38')][_0x103e('0x39')]({'where':{'type':_0x32f349,'resourceId':_0x2f84ca['id']}})[_0x103e('0x1f')](function(){return _0x2fd673;});})[_0x103e('0x1f')](function(){_0x319480[_0x103e('0x2b')](0xcc)[_0x103e('0x3a')]();});}};}function handleEntityNotFound(_0x1a0d97,_0xbbc0a3){return function(_0x675139){if(!_0x675139){_0x1a0d97[_0x103e('0x2a')](0x194);}return _0x675139;};}function handleError(_0x13819c,_0x211d20){_0x211d20=_0x211d20||0x1f4;return function(_0x1efdda){logger[_0x103e('0x24')](_0x1efdda[_0x103e('0x3b')]);if(_0x1efdda[_0x103e('0x3c')]){delete _0x1efdda[_0x103e('0x3c')];}_0x13819c['status'](_0x211d20)[_0x103e('0x3d')](_0x1efdda);};}exports['index']=function(_0x475e7f,_0x5dbba6){var _0x54d3c9={'include':[{'model':db[_0x103e('0x3e')],'as':_0x103e('0x3f')}]},_0x3489c0={},_0x2d61ea={'count':0x0,'rows':[]};var _0x39aa91=_[_0x103e('0x40')](db[_0x103e('0x41')][_0x103e('0x42')],function(_0x2d36cd){return{'name':_0x2d36cd[_0x103e('0x43')],'type':_0x2d36cd[_0x103e('0x44')]['key']};});_0x3489c0[_0x103e('0x45')]=_[_0x103e('0x40')](_0x39aa91,'name');_0x3489c0[_0x103e('0x46')]=_[_0x103e('0x47')](_0x475e7f[_0x103e('0x46')]);_0x3489c0['filters']=_[_0x103e('0x48')](_0x3489c0[_0x103e('0x45')],_0x3489c0[_0x103e('0x46')]);_0x54d3c9['attributes']=_[_0x103e('0x48')](_0x3489c0['model'],qs[_0x103e('0x49')](_0x475e7f['query'][_0x103e('0x49')]));_0x54d3c9[_0x103e('0x4a')]=_0x54d3c9[_0x103e('0x4a')][_0x103e('0x4b')]?_0x54d3c9['attributes']:_0x3489c0[_0x103e('0x45')];if(!_0x475e7f[_0x103e('0x46')][_0x103e('0x4c')](_0x103e('0x4d'))){_0x54d3c9[_0x103e('0x30')]=qs[_0x103e('0x30')](_0x475e7f[_0x103e('0x46')][_0x103e('0x30')]);_0x54d3c9[_0x103e('0x2d')]=qs[_0x103e('0x2d')](_0x475e7f[_0x103e('0x46')][_0x103e('0x2d')]);}_0x54d3c9[_0x103e('0x4e')]=qs['sort'](_0x475e7f[_0x103e('0x46')][_0x103e('0x4f')]);_0x54d3c9[_0x103e('0x50')]=qs[_0x103e('0x51')](_[_0x103e('0x52')](_0x475e7f['query'],_0x3489c0['filters']),_0x39aa91);if(_0x475e7f['query'][_0x103e('0x53')]){_0x54d3c9[_0x103e('0x50')]=_[_0x103e('0x54')](_0x54d3c9[_0x103e('0x50')],{'$or':_[_0x103e('0x40')](_0x39aa91,function(_0x672bd9){if(_0x672bd9['type']!==_0x103e('0x55')){var _0x1ef18e={};_0x1ef18e[_0x672bd9[_0x103e('0x3c')]]={'$like':'%'+_0x475e7f[_0x103e('0x46')][_0x103e('0x53')]+'%'};return _0x1ef18e;}})});}_0x54d3c9=_[_0x103e('0x54')]({},_0x54d3c9,_0x475e7f[_0x103e('0x56')]);var _0x52b32a={'where':_0x54d3c9[_0x103e('0x50')]};return db['SmsAccount'][_0x103e('0x2f')](_0x52b32a)[_0x103e('0x1f')](function(_0x46079a){_0x2d61ea[_0x103e('0x2f')]=_0x46079a;if(_0x475e7f[_0x103e('0x46')][_0x103e('0x57')]){_0x54d3c9[_0x103e('0x58')]=[{'all':!![]}];}return db['SmsAccount']['findAll'](_0x54d3c9);})[_0x103e('0x1f')](function(_0x4ed6fd){_0x2d61ea[_0x103e('0x59')]=_0x4ed6fd;return _0x2d61ea;})['then'](respondWithFilteredResult(_0x5dbba6,_0x54d3c9))['catch'](handleError(_0x5dbba6,null));};exports[_0x103e('0x5a')]=function(_0x1f0ff3,_0x3facba){var _0x248eac={'raw':![],'where':{'id':_0x1f0ff3[_0x103e('0x5b')]['id']},'include':[{'model':db[_0x103e('0x3e')],'as':_0x103e('0x3f')}]},_0x493aed={};_0x493aed['model']=_[_0x103e('0x47')](db[_0x103e('0x41')][_0x103e('0x42')]);_0x493aed[_0x103e('0x46')]=_['keys'](_0x1f0ff3[_0x103e('0x46')]);_0x493aed['filters']=_[_0x103e('0x48')](_0x493aed[_0x103e('0x45')],_0x493aed[_0x103e('0x46')]);_0x248eac['attributes']=_[_0x103e('0x48')](_0x493aed['model'],qs[_0x103e('0x49')](_0x1f0ff3[_0x103e('0x46')]['fields']));_0x248eac['attributes']=_0x248eac[_0x103e('0x4a')][_0x103e('0x4b')]?_0x248eac['attributes']:_0x493aed[_0x103e('0x45')];if(_0x1f0ff3['query'][_0x103e('0x57')]){_0x248eac['include']=[{'all':!![]}];}_0x248eac=_[_0x103e('0x54')]({},_0x248eac,_0x1f0ff3[_0x103e('0x56')]);return db['SmsAccount'][_0x103e('0x5c')](_0x248eac)['then'](handleEntityNotFound(_0x3facba,null))[_0x103e('0x1f')](respondWithResult(_0x3facba,null))[_0x103e('0x29')](handleError(_0x3facba,null));};exports['create']=function(_0x4e239b,_0x4cca64){return db[_0x103e('0x41')][_0x103e('0x5d')](_0x4e239b['body'],{})['then'](function(_0x2a8e97){var _0x42f36a=_0x4e239b[_0x103e('0x5e')]['get']({'plain':!![]});if(!_0x42f36a)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x42f36a[_0x103e('0x5f')]==='user'){var _0x3a7548=_0x2a8e97[_0x103e('0x36')]({'plain':!![]});var _0x10e2c5=_0x103e('0x37');return db[_0x103e('0x60')][_0x103e('0x5c')]({'where':{'name':_0x10e2c5,'userProfileId':_0x42f36a[_0x103e('0x61')]},'raw':!![]})[_0x103e('0x1f')](function(_0x3ffdb6){if(_0x3ffdb6&&_0x3ffdb6['autoAssociation']===0x0){return db[_0x103e('0x38')][_0x103e('0x5d')]({'name':_0x3a7548[_0x103e('0x3c')],'resourceId':_0x3a7548['id'],'type':_0x3ffdb6[_0x103e('0x3c')],'sectionId':_0x3ffdb6['id']},{})[_0x103e('0x1f')](function(){return _0x2a8e97;});}else{return _0x2a8e97;}})['catch'](function(_0x262304){logger['error'](_0x103e('0x62'),_0x262304);throw _0x262304;});}return _0x2a8e97;})[_0x103e('0x1f')](respondWithResult(_0x4cca64,0xc9))[_0x103e('0x29')](handleError(_0x4cca64,null));};exports['update']=function(_0x7b61cf,_0x283c8e){if(_0x7b61cf[_0x103e('0x63')]['id']){delete _0x7b61cf[_0x103e('0x63')]['id'];}return db['SmsAccount'][_0x103e('0x5c')]({'where':{'id':_0x7b61cf['params']['id']},'include':[{'model':db[_0x103e('0x3e')],'as':_0x103e('0x3f')}]})[_0x103e('0x1f')](handleEntityNotFound(_0x283c8e,null))[_0x103e('0x1f')](saveUpdates(_0x7b61cf[_0x103e('0x63')],null))[_0x103e('0x1f')](respondWithResult(_0x283c8e,null))['catch'](handleError(_0x283c8e,null));};exports[_0x103e('0x39')]=function(_0x1b504a,_0x5776da){return db['SmsAccount'][_0x103e('0x5c')]({'where':{'id':_0x1b504a[_0x103e('0x5b')]['id']}})[_0x103e('0x1f')](handleEntityNotFound(_0x5776da,null))[_0x103e('0x1f')](removeEntity(_0x5776da,null))[_0x103e('0x29')](handleError(_0x5776da,null));};exports[_0x103e('0x64')]=function(_0x1ad666,_0x11a268){return db[_0x103e('0x41')][_0x103e('0x64')]()[_0x103e('0x1f')](respondWithResult(_0x11a268,null))['catch'](handleError(_0x11a268,null));};exports[_0x103e('0x65')]=function(_0x5f09f7,_0xae2bce,_0x4eb0f2){if(_0x5f09f7[_0x103e('0x63')]['id']){delete _0x5f09f7[_0x103e('0x63')]['id'];}return db[_0x103e('0x41')][_0x103e('0x5c')]({'where':{'id':_0x5f09f7[_0x103e('0x5b')]['id']}})[_0x103e('0x1f')](handleEntityNotFound(_0xae2bce,null))[_0x103e('0x1f')](function(_0x5d44a4){if(_0x5d44a4){_0x5f09f7[_0x103e('0x63')][_0x103e('0x66')]=_0x5d44a4['id'];return db[_0x103e('0x67')]['create'](_0x5f09f7['body']);}})['then'](respondWithResult(_0xae2bce,null))[_0x103e('0x29')](handleError(_0xae2bce,null));};exports[_0x103e('0x68')]=function(_0x1d1acf,_0x16ef52,_0x2473fc){var _0x5b5905={'raw':![],'where':{}};var _0x5ead58={};var _0x1f6d17={'count':0x0,'rows':[]};return db['SmsAccount'][_0x103e('0x69')]({'where':{'id':_0x1d1acf['params']['id']}})[_0x103e('0x1f')](handleEntityNotFound(_0x16ef52,null))[_0x103e('0x1f')](function(_0x32b409){if(_0x32b409){_0x5ead58[_0x103e('0x45')]=_[_0x103e('0x47')](db[_0x103e('0x67')][_0x103e('0x42')]);_0x5ead58[_0x103e('0x46')]=_['keys'](_0x1d1acf[_0x103e('0x46')]);_0x5ead58['filters']=_[_0x103e('0x48')](_0x5ead58['model'],_0x5ead58[_0x103e('0x46')]);_0x5b5905['attributes']=_[_0x103e('0x48')](_0x5ead58[_0x103e('0x45')],qs['fields'](_0x1d1acf[_0x103e('0x46')][_0x103e('0x49')]));_0x5b5905[_0x103e('0x4a')]=_0x5b5905[_0x103e('0x4a')][_0x103e('0x4b')]?_0x5b5905[_0x103e('0x4a')]:_0x5ead58['model'];if(!_0x1d1acf[_0x103e('0x46')][_0x103e('0x4c')](_0x103e('0x4d'))){_0x5b5905[_0x103e('0x30')]=qs[_0x103e('0x30')](_0x1d1acf['query']['limit']);_0x5b5905[_0x103e('0x2d')]=qs[_0x103e('0x2d')](_0x1d1acf[_0x103e('0x46')][_0x103e('0x2d')]);}_0x5b5905[_0x103e('0x4e')]=qs[_0x103e('0x4f')](_0x1d1acf[_0x103e('0x46')][_0x103e('0x4f')]);_0x5b5905[_0x103e('0x50')]=qs[_0x103e('0x51')](_[_0x103e('0x52')](_0x1d1acf[_0x103e('0x46')],_0x5ead58[_0x103e('0x51')]));_0x5b5905[_0x103e('0x50')][_0x103e('0x66')]=_0x32b409['id'];if(_0x1d1acf[_0x103e('0x46')][_0x103e('0x53')]){_0x5b5905[_0x103e('0x50')]=_[_0x103e('0x54')](_0x5b5905['where'],{'$or':_[_0x103e('0x40')](_0x5b5905[_0x103e('0x4a')],function(_0x493389){var _0x5bda31={};_0x5bda31[_0x493389]={'$like':'%'+_0x1d1acf['query']['filter']+'%'};return _0x5bda31;})});}_0x5b5905=_[_0x103e('0x54')]({},_0x5b5905,_0x1d1acf['options']);return db[_0x103e('0x67')][_0x103e('0x2f')]({'where':_0x5b5905[_0x103e('0x50')]})[_0x103e('0x1f')](function(_0x4283eb){_0x1f6d17[_0x103e('0x2f')]=_0x4283eb;if(_0x1d1acf[_0x103e('0x46')][_0x103e('0x57')]){_0x5b5905[_0x103e('0x58')]=[{'all':!![]}];}return db[_0x103e('0x67')]['findAll'](_0x5b5905);})[_0x103e('0x1f')](function(_0x4f2fac){_0x1f6d17[_0x103e('0x59')]=_0x4f2fac;return _0x1f6d17;});}})[_0x103e('0x1f')](respondWithFilteredResult(_0x16ef52,_0x5b5905))[_0x103e('0x29')](handleError(_0x16ef52,null));};exports[_0x103e('0x6a')]=function(_0xae1c09,_0x297ca2,_0x7259d8){return db[_0x103e('0x41')][_0x103e('0x5c')]({'where':{'id':_0xae1c09[_0x103e('0x5b')]['id']}})[_0x103e('0x1f')](handleEntityNotFound(_0x297ca2,null))[_0x103e('0x1f')](function(_0x36851d){if(_0x36851d){return _0x36851d[_0x103e('0x6a')](_0xae1c09[_0x103e('0x46')]['ids']);}})[_0x103e('0x1f')](respondWithStatusCode(_0x297ca2,null))[_0x103e('0x29')](handleError(_0x297ca2,null));};exports[_0x103e('0x6b')]=function(_0x50db4b,_0x1dcd23,_0x1d1103){if(_0x50db4b[_0x103e('0x63')]['id']){delete _0x50db4b['body']['id'];}return db[_0x103e('0x41')][_0x103e('0x5c')]({'where':{'id':_0x50db4b[_0x103e('0x5b')]['id']}})[_0x103e('0x1f')](handleEntityNotFound(_0x1dcd23,null))['then'](function(_0x287dee){if(_0x287dee){_0x50db4b[_0x103e('0x63')]['SmsAccountId']=_0x287dee['id'];return db[_0x103e('0x6c')][_0x103e('0x5d')](_0x50db4b['body']);}})[_0x103e('0x1f')](respondWithResult(_0x1dcd23,null))[_0x103e('0x29')](handleError(_0x1dcd23,null));};exports[_0x103e('0x6d')]=function(_0x225432,_0xad0bc0,_0x69c0aa){var _0x2f7d4f={'raw':![],'where':{}};var _0x2986f8={};var _0x1bd64d={'count':0x0,'rows':[]};return db['SmsAccount'][_0x103e('0x69')]({'where':{'id':_0x225432[_0x103e('0x5b')]['id']}})['then'](handleEntityNotFound(_0xad0bc0,null))[_0x103e('0x1f')](function(_0x4d854c){if(_0x4d854c){_0x2986f8[_0x103e('0x45')]=_['keys'](db[_0x103e('0x6c')][_0x103e('0x42')]);_0x2986f8[_0x103e('0x46')]=_[_0x103e('0x47')](_0x225432['query']);_0x2986f8[_0x103e('0x51')]=_[_0x103e('0x48')](_0x2986f8['model'],_0x2986f8['query']);_0x2f7d4f['attributes']=_['intersection'](_0x2986f8[_0x103e('0x45')],qs[_0x103e('0x49')](_0x225432[_0x103e('0x46')]['fields']));_0x2f7d4f[_0x103e('0x4a')]=_0x2f7d4f[_0x103e('0x4a')][_0x103e('0x4b')]?_0x2f7d4f[_0x103e('0x4a')]:_0x2986f8[_0x103e('0x45')];if(!_0x225432[_0x103e('0x46')]['hasOwnProperty'](_0x103e('0x4d'))){_0x2f7d4f['limit']=qs[_0x103e('0x30')](_0x225432[_0x103e('0x46')]['limit']);_0x2f7d4f[_0x103e('0x2d')]=qs['offset'](_0x225432[_0x103e('0x46')][_0x103e('0x2d')]);}_0x2f7d4f[_0x103e('0x4e')]=qs[_0x103e('0x4f')](_0x225432[_0x103e('0x46')][_0x103e('0x4f')]);_0x2f7d4f[_0x103e('0x50')]=qs[_0x103e('0x51')](_[_0x103e('0x52')](_0x225432[_0x103e('0x46')],_0x2986f8[_0x103e('0x51')]));_0x2f7d4f['where'][_0x103e('0x66')]=_0x4d854c['id'];if(_0x225432[_0x103e('0x46')][_0x103e('0x53')]){_0x2f7d4f['where']=_['merge'](_0x2f7d4f[_0x103e('0x50')],{'$or':_[_0x103e('0x40')](_0x2f7d4f[_0x103e('0x4a')],function(_0x567aab){var _0x449c5e={};_0x449c5e[_0x567aab]={'$like':'%'+_0x225432[_0x103e('0x46')]['filter']+'%'};return _0x449c5e;})});}_0x2f7d4f=_[_0x103e('0x54')]({},_0x2f7d4f,_0x225432[_0x103e('0x56')]);return db[_0x103e('0x6c')][_0x103e('0x2f')]({'where':_0x2f7d4f[_0x103e('0x50')]})['then'](function(_0x28fe09){_0x1bd64d['count']=_0x28fe09;if(_0x225432[_0x103e('0x46')][_0x103e('0x57')]){_0x2f7d4f[_0x103e('0x58')]=[{'all':!![]}];}return db[_0x103e('0x6c')][_0x103e('0x6e')](_0x2f7d4f);})[_0x103e('0x1f')](function(_0x1bfeb7){_0x1bd64d['rows']=_0x1bfeb7;return _0x1bd64d;});}})['then'](respondWithFilteredResult(_0xad0bc0,_0x2f7d4f))['catch'](handleError(_0xad0bc0,null));};exports[_0x103e('0x6f')]=function(_0x4e03a9,_0x14321a,_0x287a86){return db[_0x103e('0x41')][_0x103e('0x5c')]({'where':{'id':_0x4e03a9['params']['id']}})[_0x103e('0x1f')](handleEntityNotFound(_0x14321a,null))['then'](function(_0x377672){if(_0x377672){return _0x377672[_0x103e('0x6f')](_0x4e03a9[_0x103e('0x46')][_0x103e('0x70')]);}})['then'](respondWithStatusCode(_0x14321a,null))['catch'](handleError(_0x14321a,null));};exports['notify']=function(_0x5a6b49,_0x2ce3e1,_0x26c801){var _0x35fa80={'channel':'sms'};var _0x5d7b23=[];var _0x3ea6da=[];var _0xfae397={};return db[_0x103e('0x41')][_0x103e('0x5c')]({'where':{'id':_0x5a6b49[_0x103e('0x5b')]['id']},'include':[{'model':db[_0x103e('0x71')],'as':_0x103e('0x72')}]})[_0x103e('0x1f')](handleEntityNotFound(_0x2ce3e1,null))[_0x103e('0x1f')](function(_0x2c550e){_0x35fa80[_0x103e('0x73')]=_0x2c550e;_0x35fa80['applications']=_[_0x103e('0x74')](_0x2c550e['Applications'],[_0x103e('0x75')],[_0x103e('0x76')]);if(_0x35fa80['account'][_0x103e('0x72')]){delete _0x35fa80[_0x103e('0x73')]['Applications'];}return db[_0x103e('0x77')]['describe']();})[_0x103e('0x1f')](function(_0x33317d){if(!_0x33317d){throw new db[(_0x103e('0x78'))]['ValidationError'](_0x103e('0x79'));}_0x5d7b23=_['difference'](_[_0x103e('0x47')](_0x33317d),[_0x103e('0x7a'),_0x103e('0x7b')]);_0x3ea6da=_[_0x103e('0x7c')](_['keys'](_0x33317d),[_0x103e('0x7a'),_0x103e('0x7b'),'CompanyId',_0x103e('0x7d')]);_0x35fa80[_0x103e('0x63')]={'mapKey':'mobile'};if(_0x35fa80[_0x103e('0x73')][_0x103e('0x44')]){switch(_0x35fa80['account'][_0x103e('0x44')]){case _0x103e('0x7e'):_0x35fa80[_0x103e('0x63')]['from']=_0x5a6b49[_0x103e('0x63')][_0x103e('0x7f')];_0x35fa80[_0x103e('0x63')]['body']=_0x5a6b49[_0x103e('0x63')][_0x103e('0x80')];_0x35fa80[_0x103e('0x63')][_0x103e('0x81')]=_0x5a6b49[_0x103e('0x63')][_0x103e('0x82')];break;case _0x103e('0x83'):_0x35fa80[_0x103e('0x63')][_0x103e('0x84')]='+'+_0x5a6b49[_0x103e('0x63')][_0x103e('0x85')];_0x35fa80['body']['body']=_0x5a6b49[_0x103e('0x63')][_0x103e('0x86')];break;case'connectel':_0x35fa80[_0x103e('0x63')][_0x103e('0x84')]=_0x5a6b49['body'][_0x103e('0x84')];_0x35fa80[_0x103e('0x63')][_0x103e('0x63')]=_0x5a6b49[_0x103e('0x63')][_0x103e('0x26')];break;case _0x103e('0x87'):_0x35fa80[_0x103e('0x63')][_0x103e('0x84')]=_0x5a6b49[_0x103e('0x63')][_0x103e('0x84')];_0x35fa80['body'][_0x103e('0x63')]=_0x5a6b49[_0x103e('0x63')][_0x103e('0x63')];_0x35fa80[_0x103e('0x63')][_0x103e('0x81')]=_0x5a6b49[_0x103e('0x63')][_0x103e('0x88')];break;case _0x103e('0x89'):_0x35fa80[_0x103e('0x63')][_0x103e('0x84')]=_0x5a6b49[_0x103e('0x63')][_0x103e('0x7f')];_0x35fa80[_0x103e('0x63')][_0x103e('0x63')]=_0x5a6b49['body']['Text'];_0x35fa80[_0x103e('0x63')][_0x103e('0x81')]=_0x5a6b49[_0x103e('0x63')]['MessageUUID'];break;case _0x103e('0x8a'):_0x35fa80[_0x103e('0x63')][_0x103e('0x84')]='+'+_0x5a6b49[_0x103e('0x63')][_0x103e('0x8b')][0x0][_0x103e('0x84')];_0x35fa80[_0x103e('0x63')][_0x103e('0x63')]=_0x5a6b49[_0x103e('0x63')][_0x103e('0x8b')][0x0][_0x103e('0x86')];_0x35fa80[_0x103e('0x63')]['messageId']=_0x5a6b49['body'][_0x103e('0x8b')][0x0][_0x103e('0x81')];break;case'csc':_0x35fa80[_0x103e('0x63')][_0x103e('0x84')]=_0x5a6b49[_0x103e('0x63')][_0x103e('0x8c')];_0x35fa80['body'][_0x103e('0x63')]=_0x5a6b49[_0x103e('0x63')]['segmentedMessage'][_0x103e('0x26')];break;case _0x103e('0x8d'):_0x35fa80['body'][_0x103e('0x84')]=_0x5a6b49[_0x103e('0x63')][_0x103e('0x8e')];_0x35fa80[_0x103e('0x63')][_0x103e('0x63')]=_0x5a6b49[_0x103e('0x63')][_0x103e('0x86')];_0x35fa80[_0x103e('0x63')][_0x103e('0x81')]=_0x5a6b49[_0x103e('0x63')]['replyMessageId'];break;case _0x103e('0x8f'):_0x35fa80['body']['messageId']=_0x5a6b49[_0x103e('0x63')][0x0][_0x103e('0x26')]['id'];_0x35fa80[_0x103e('0x63')][_0x103e('0x84')]=_0x5a6b49[_0x103e('0x63')][0x0][_0x103e('0x26')]['from'];_0x35fa80['body'][_0x103e('0x63')]=_0x5a6b49[_0x103e('0x63')][0x0]['message']['text'];break;case _0x103e('0x90'):_0x35fa80[_0x103e('0x63')][_0x103e('0x84')]=_0x5a6b49[_0x103e('0x63')][_0x103e('0x84')];_0x35fa80[_0x103e('0x63')][_0x103e('0x63')]=_0x5a6b49[_0x103e('0x63')]['message'];_0x35fa80[_0x103e('0x63')][_0x103e('0x81')]=_0x5a6b49[_0x103e('0x63')][_0x103e('0x91')];break;}}if(_0x35fa80[_0x103e('0x63')]['id']){delete _0x35fa80[_0x103e('0x63')]['id'];}if(_[_0x103e('0x92')](_0x35fa80['body'][_0x103e('0x84')])){throw new db['Sequelize']['ValidationError']('from\x20is\x20mandatory');}if(_[_0x103e('0x92')](_0x35fa80[_0x103e('0x63')]['body'])||_0x35fa80['body'][_0x103e('0x63')]===''){throw new db['Sequelize'][(_0x103e('0x93'))](_0x103e('0x94'));}if(_[_0x103e('0x92')](_0x35fa80[_0x103e('0x63')][_0x103e('0x95')])){throw new db[(_0x103e('0x78'))][(_0x103e('0x93'))](_0x103e('0x96')+_0x3ea6da);}if(!_[_0x103e('0x97')](_0x3ea6da,_0x35fa80['body'][_0x103e('0x95')])){throw new db[(_0x103e('0x78'))]['ValidationError']('mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x3ea6da);}_0xfae397[_0x35fa80[_0x103e('0x63')][_0x103e('0x95')]]=_0x35fa80['body'][_0x103e('0x84')];return db[_0x103e('0x98')][_0x103e('0x5c')]({'where':{'id':_0x35fa80[_0x103e('0x73')][_0x103e('0x7d')]},'include':[{'model':db[_0x103e('0x77')],'as':_0x103e('0x99'),'where':_0xfae397,'limit':0x1,'order':[[_0x103e('0x7b'),_0x103e('0x9a')]]}]});})[_0x103e('0x1f')](handleEntityNotFound(_0x2ce3e1,null))['then'](function(_0x31b411){if(_0x31b411){_0x35fa80[_0x103e('0x9b')]=_['omit'](_0x31b411,[_0x103e('0x99')]);if(_0x31b411[_0x103e('0x99')]['length']){return _0x31b411[_0x103e('0x99')][0x0];}var _0x33b2ba=_[_0x103e('0x15')](_0x35fa80[_0x103e('0x63')],{'firstName':_0x35fa80[_0x103e('0x63')]['from'],'ListId':_0x31b411['id']});_0x33b2ba[_0x35fa80['body'][_0x103e('0x95')]]=_0x35fa80[_0x103e('0x63')][_0x103e('0x84')];return db['CmContact'][_0x103e('0x5d')](_0x33b2ba,{'fields':_0x5d7b23,'raw':!![]});}})['then'](handleEntityNotFound(_0x2ce3e1,null))[_0x103e('0x1f')](function(_0x56b948){if(_0x56b948){_0x35fa80['contact']=_0x56b948;var _0x207ce4={'ContactId':_0x56b948['id'],'phone':_0x35fa80[_0x103e('0x63')][_0x103e('0x84')],'SmsAccountId':_0x5a6b49[_0x103e('0x5b')]['id']};var _0x571279={'ContactId':_0x56b948['id'],'SmsAccountId':_0x5a6b49[_0x103e('0x5b')]['id'],'closed':![]};return db[_0x103e('0x9c')]['find']({'where':_0x571279})[_0x103e('0x1f')](function(_0x4271af){if(_0x4271af){return[_0x4271af,![]];}return db[_0x103e('0x9c')][_0x103e('0x5d')](_0x207ce4)[_0x103e('0x1f')](function(_0x3d1ca7){return[_0x3d1ca7,!![]];});});}})[_0x103e('0x9d')](function(_0x4ef248,_0x21c14b){_0x35fa80[_0x103e('0x9e')]=_0x4ef248[_0x103e('0x36')]({'plain':!![]});_0x35fa80[_0x103e('0x9e')]['created']=![];if(_0x21c14b){if(_0x35fa80[_0x103e('0x73')][_0x103e('0x9f')]){_0x35fa80[_0x103e('0xa0')][_0x103e('0xa1')]({'id':0x0,'priority':_0x35fa80[_0x103e('0xa0')][_0x103e('0x4b')]+0x1,'app':_0x103e('0xa2'),'appdata':_0x103e('0xa3'),'interval':_0x103e('0xa4')});}_0x35fa80[_0x103e('0x9e')][_0x103e('0xa5')]=!![];}return db[_0x103e('0xa6')][_0x103e('0x5d')]({'phone':_0x35fa80[_0x103e('0x63')][_0x103e('0x84')],'messageId':_0x35fa80[_0x103e('0x63')][_0x103e('0x81')],'body':_0x35fa80[_0x103e('0x63')][_0x103e('0x63')],'SmsAccountId':_0x5a6b49[_0x103e('0x5b')]['id'],'SmsInteractionId':_0x4ef248['id'],'direction':'in','ContactId':_0x4ef248['ContactId'],'AttachmentId':_0x35fa80['body'][_0x103e('0xa7')]});})[_0x103e('0x1f')](function(_0x35c7a3){_0x35fa80[_0x103e('0x26')]=_0x35c7a3;if(!_0x35fa80[_0x103e('0x9e')][_0x103e('0xa8')])return;return db['User'][_0x103e('0x5c')]({'attributes':['id','name'],'where':{'id':_0x35fa80[_0x103e('0x9e')][_0x103e('0xa8')]}});})['then'](function(_0x478533){if(_0x478533){_0x35fa80[_0x103e('0xa0')][_0x103e('0xa9')]({'id':0x0,'priority':0x0,'app':_0x103e('0xaa'),'appdata':_0x478533['name']+','+(_0x35fa80[_0x103e('0x73')][_0x103e('0xab')]||0xa),'interval':_0x103e('0xa4')});}if(!_0x35fa80[_0x103e('0x9e')][_0x103e('0xac')])return;return db[_0x103e('0xad')][_0x103e('0x5c')]({'attributes':['id','name'],'where':{'id':_0x35fa80[_0x103e('0x9e')][_0x103e('0xac')]}});})[_0x103e('0x1f')](function(_0x319c59){if(_0x319c59){_0x35fa80[_0x103e('0xa0')][_0x103e('0xa9')]({'id':0x0,'priority':0x1,'app':_0x103e('0xae'),'appdata':_0x319c59[_0x103e('0x3c')]+','+(_0x35fa80[_0x103e('0x73')]['waitForTheAssignedQueue']||0x12c),'interval':_0x103e('0xa4')});}return respondWithRpcPromise(_0x103e('0xaf'),_0x103e('0xb0'),_0x35fa80);})[_0x103e('0x1f')](function(_0x4ec1b3){if(_0x4ec1b3){var _0x4d40b2=0xc8;var _0x5908ba=_0x103e('0xb1');logger[_0x103e('0x27')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x5908ba,_0x4d40b2,'entity\x20found');logger['debug'](_0x103e('0xb2'),_0x5908ba,_0x4d40b2,'entity\x20found',JSON[_0x103e('0x23')](_0x4ec1b3));if(_0x35fa80[_0x103e('0x73')][_0x103e('0x44')]===_0x103e('0x7e')){return _0x2ce3e1['status'](_0x4d40b2)[_0x103e('0x31')](_0x103e('0xb3'),_0x103e('0xb4'))[_0x103e('0x3d')](_0x103e('0xb5'));}else{return _0x2ce3e1[_0x103e('0x2b')](_0x4d40b2)[_0x103e('0x2c')](_0x4ec1b3);}}})['catch'](handleError(_0x2ce3e1,null));};exports[_0x103e('0xb6')]=function(_0x1a55fc,_0xc04b54){var _0x3a16f2=_0x1a55fc[_0x103e('0x5b')]['id'];var _0x318393=_0x1a55fc[_0x103e('0x63')];var _0x4b5352=0xc8;var _0x519de8=null;return db[_0x103e('0xb7')][_0x103e('0xb8')]({'isolationLevel':db[_0x103e('0xb7')][_0x103e('0xb9')][_0x103e('0xba')][_0x103e('0xbb')]},function(_0x31c7ea){return db[_0x103e('0x41')][_0x103e('0x69')]({'where':{'id':_0x3a16f2},'transaction':_0x31c7ea})[_0x103e('0x1f')](function(_0x1dc4e1){if(_0x1dc4e1){return db[_0x103e('0x71')][_0x103e('0x39')]({'where':{'SmsAccountId':_0x3a16f2},'transaction':_0x31c7ea})[_0x103e('0x1f')](function(){var _0x21ecf6=_['map'](_0x318393,function(_0x1fec35){_0x1fec35[_0x103e('0x66')]=_0x3a16f2;return _0x1fec35;});return db[_0x103e('0x71')][_0x103e('0xbc')](_0x21ecf6,{'transaction':_0x31c7ea});});}else{_0x4b5352=0x194;_0x519de8=[];}});})[_0x103e('0x1f')](function(){if(_0x4b5352!==0x194){return db[_0x103e('0x71')][_0x103e('0xbd')]({'where':{'SmsAccountId':_0x3a16f2},'order':_0x103e('0x75')})[_0x103e('0x1f')](function(_0x576def){_0x519de8=_0x576def;});}})[_0x103e('0x29')](function(_0x36e9fc){_0x4b5352=0x1f4;logger['error'](_0x36e9fc[_0x103e('0x3b')]);if(_0x36e9fc[_0x103e('0x3c')]){delete _0x36e9fc[_0x103e('0x3c')];}_0x519de8=_0x36e9fc;})[_0x103e('0xbe')](function(){if(_0x519de8===null){_0xc04b54[_0x103e('0x2a')](_0x4b5352);}else{if(_0x4b5352===0x1f4){_0xc04b54[_0x103e('0x2b')](_0x4b5352)[_0x103e('0x3d')](_0x519de8);}else{_0xc04b54[_0x103e('0x2b')](_0x4b5352)[_0x103e('0x2c')](_0x519de8);}}});};exports[_0x103e('0xbf')]=function(_0x205747,_0x3cd3f5,_0x323157){var _0x5342dc={};var _0x5bb4eb={};var _0x5e776f;var _0x3c0832;return db['SmsAccount'][_0x103e('0x69')]({'where':{'id':_0x205747[_0x103e('0x5b')]['id']}})[_0x103e('0x1f')](handleEntityNotFound(_0x3cd3f5,null))[_0x103e('0x1f')](function(_0x86cc4){if(_0x86cc4){_0x5e776f=_0x86cc4;_0x5bb4eb[_0x103e('0x45')]=_[_0x103e('0x47')](db[_0x103e('0x71')][_0x103e('0x42')]);_0x5bb4eb[_0x103e('0x46')]=_[_0x103e('0x47')](_0x205747[_0x103e('0x46')]);_0x5bb4eb['filters']=_[_0x103e('0x48')](_0x5bb4eb[_0x103e('0x45')],_0x5bb4eb[_0x103e('0x46')]);_0x5342dc[_0x103e('0x4a')]=_[_0x103e('0x48')](_0x5bb4eb[_0x103e('0x45')],qs[_0x103e('0x49')](_0x205747['query'][_0x103e('0x49')]));_0x5342dc[_0x103e('0x4a')]=_0x5342dc[_0x103e('0x4a')][_0x103e('0x4b')]?_0x5342dc[_0x103e('0x4a')]:_0x5bb4eb[_0x103e('0x45')];_0x5342dc[_0x103e('0x4e')]=qs[_0x103e('0x4f')](_0x205747[_0x103e('0x46')][_0x103e('0x4f')]);_0x5342dc[_0x103e('0x50')]=qs['filters'](_[_0x103e('0x52')](_0x205747['query'],_0x5bb4eb[_0x103e('0x51')]));if(_0x205747[_0x103e('0x46')]['filter']){_0x5342dc[_0x103e('0x50')]=_[_0x103e('0x54')](_0x5342dc[_0x103e('0x50')],{'$or':_[_0x103e('0x40')](_0x5342dc['attributes'],function(_0x24a9a0){var _0x441c22={};_0x441c22[_0x24a9a0]={'$like':'%'+_0x205747[_0x103e('0x46')][_0x103e('0x53')]+'%'};return _0x441c22;})});}_0x5342dc=_[_0x103e('0x54')]({},_0x5342dc,_0x205747[_0x103e('0x56')]);return _0x5e776f[_0x103e('0xbf')](_0x5342dc);}})[_0x103e('0x1f')](function(_0x18ddeb){if(_0x18ddeb){_0x3c0832=_0x18ddeb[_0x103e('0x4b')];if(!_0x205747['query'][_0x103e('0x4c')](_0x103e('0x4d'))){_0x5342dc[_0x103e('0x30')]=qs[_0x103e('0x30')](_0x205747[_0x103e('0x46')]['limit']);_0x5342dc[_0x103e('0x2d')]=qs[_0x103e('0x2d')](_0x205747[_0x103e('0x46')][_0x103e('0x2d')]);}return _0x5e776f[_0x103e('0xbf')](_0x5342dc);}})[_0x103e('0x1f')](function(_0x6e15d4){if(_0x6e15d4){return _0x6e15d4?{'count':_0x3c0832,'rows':_0x6e15d4}:null;}})[_0x103e('0x1f')](respondWithResult(_0x3cd3f5,null))[_0x103e('0x29')](handleError(_0x3cd3f5,null));};exports['getInteractions']=function(_0x526a0c,_0x391ed8,_0xa4cfa6){var _0x49287c={'raw':![],'where':{}};var _0x373aff={};var _0x26418c={'count':0x0,'rows':[]};return db[_0x103e('0x41')][_0x103e('0x69')]({'where':{'id':_0x526a0c['params']['id']}})[_0x103e('0x1f')](handleEntityNotFound(_0x391ed8,null))[_0x103e('0x1f')](function(_0x53b058){if(_0x53b058){_0x373aff[_0x103e('0x45')]=_[_0x103e('0x47')](db[_0x103e('0x9c')][_0x103e('0x42')]);_0x373aff[_0x103e('0x46')]=_[_0x103e('0x47')](_0x526a0c[_0x103e('0x46')]);_0x373aff['filters']=_[_0x103e('0x48')](_0x373aff[_0x103e('0x45')],_0x373aff[_0x103e('0x46')]);_0x49287c[_0x103e('0x4a')]=_[_0x103e('0x48')](_0x373aff[_0x103e('0x45')],qs[_0x103e('0x49')](_0x526a0c[_0x103e('0x46')][_0x103e('0x49')]));_0x49287c[_0x103e('0x4a')]=_0x49287c[_0x103e('0x4a')][_0x103e('0x4b')]?_0x49287c[_0x103e('0x4a')]:_0x373aff['model'];if(!_0x526a0c[_0x103e('0x46')]['hasOwnProperty']('nolimit')){_0x49287c['limit']=qs[_0x103e('0x30')](_0x526a0c[_0x103e('0x46')][_0x103e('0x30')]);_0x49287c[_0x103e('0x2d')]=qs[_0x103e('0x2d')](_0x526a0c[_0x103e('0x46')][_0x103e('0x2d')]);}_0x49287c[_0x103e('0x4e')]=qs[_0x103e('0x4f')](_0x526a0c[_0x103e('0x46')]['sort']);_0x49287c['where']=qs[_0x103e('0x51')](_[_0x103e('0x52')](_0x526a0c['query'],_0x373aff[_0x103e('0x51')]));_0x49287c[_0x103e('0x50')][_0x103e('0x66')]=_0x53b058['id'];if(_0x526a0c['query'][_0x103e('0x53')]){_0x49287c[_0x103e('0x50')]=_[_0x103e('0x54')](_0x49287c[_0x103e('0x50')],{'$or':_['map'](_0x49287c[_0x103e('0x4a')],function(_0x10a3fd){var _0x2cf002={};_0x2cf002[_0x10a3fd]={'$like':'%'+_0x526a0c[_0x103e('0x46')][_0x103e('0x53')]+'%'};return _0x2cf002;})});}_0x49287c=_[_0x103e('0x54')]({},_0x49287c,_0x526a0c['options']);return db['SmsInteraction'][_0x103e('0x2f')]({'where':_0x49287c[_0x103e('0x50')]})['then'](function(_0x12c244){_0x26418c['count']=_0x12c244;if(_0x526a0c['query'][_0x103e('0x57')]){_0x49287c['include']=[{'model':db[_0x103e('0x77')],'as':_0x103e('0xc0'),'required':![]},{'model':db[_0x103e('0xc1')],'as':'Owner','attributes':[_0x103e('0x3c'),_0x103e('0xc2'),_0x103e('0xc3')],'required':![]},{'model':db[_0x103e('0xc4')],'as':_0x103e('0xc5'),'attributes':['id',_0x103e('0x3c'),_0x103e('0xc6')],'where':_0x526a0c['query']['tag']?{'id':_0x526a0c[_0x103e('0x46')][_0x103e('0xc7')]}:undefined,'required':_0x526a0c[_0x103e('0x46')][_0x103e('0xc7')]?!![]:![]}];}return db['SmsInteraction'][_0x103e('0x6e')](_0x49287c);})[_0x103e('0x1f')](function(_0x4abfb7){_0x26418c[_0x103e('0x59')]=_0x4abfb7;return _0x26418c;});}})['then'](respondWithFilteredResult(_0x391ed8,_0x49287c))[_0x103e('0x29')](handleError(_0x391ed8,null));};exports['send']=function(_0x27a3d5,_0x3aed2b,_0x5166ba){var _0x93cb45,_0x47e02e,_0x3f2805;if(_[_0x103e('0x92')](_0x27a3d5['body']['body'])||_0x27a3d5['body'][_0x103e('0x63')]===''){throw new db[(_0x103e('0x78'))][(_0x103e('0x93'))]('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0x103e('0x92')](_0x27a3d5[_0x103e('0x63')]['to'])){throw new db['Sequelize'][(_0x103e('0x93'))](_0x103e('0xc8'));}_0x93cb45=_0x27a3d5['body']['to'];return db[_0x103e('0x41')]['find']({'where':{'id':_0x27a3d5[_0x103e('0x5b')]['id']},'include':[{'model':db[_0x103e('0x98')],'as':_0x103e('0xc9'),'include':[{'model':db['CmContact'],'as':'Contacts','where':{'mobile':_0x93cb45},'limit':0x1,'order':[[_0x103e('0x7b'),_0x103e('0x9a')]]}]}]})['then'](handleEntityNotFound(_0x3aed2b,null))[_0x103e('0x1f')](function(_0x33215a){if(_0x33215a&&_0x33215a[_0x103e('0xc9')]){_0x47e02e=_0x33215a[_0x103e('0x36')]({'plain':!![]});if(_0x47e02e['List']&&_0x47e02e[_0x103e('0xc9')]['Contacts'][_0x103e('0x4b')]){return _0x47e02e[_0x103e('0xc9')][_0x103e('0x99')][0x0];}return db[_0x103e('0x77')]['create'](_[_0x103e('0x15')](_0x27a3d5[_0x103e('0x63')],{'firstName':_0x93cb45,'mobile':_0x93cb45,'phone':_0x93cb45,'ListId':_0x47e02e[_0x103e('0x7d')]}));}})['then'](handleEntityNotFound(_0x3aed2b,null))['then'](function(_0x38208e){if(_0x38208e){_0x3f2805=_0x38208e;return db[_0x103e('0x9c')][_0x103e('0x5c')]({'where':{'ContactId':_0x3f2805['id'],'closed':![],'SmsAccountId':_0x47e02e['id']}})[_0x103e('0x1f')](function(_0x4eb005){if(_0x4eb005){return[_0x4eb005,![]];}return db[_0x103e('0x9c')][_0x103e('0x5d')]({'UserId':_0x27a3d5[_0x103e('0x5e')]['id'],'ContactId':_0x3f2805['id'],'SmsAccountId':_0x47e02e['id'],'phone':_0x93cb45,'firstMsgDirection':_0x103e('0xca'),'Messages':[_[_0x103e('0x54')](_0x27a3d5[_0x103e('0x63')],{'read':![],'body':_0x27a3d5['body']['body'],'phone':_0x93cb45,'SmsAccountId':_0x47e02e['id'],'UserId':_0x27a3d5[_0x103e('0x5e')]['id'],'ContactId':_0x3f2805['id']})]},{'include':[{'model':db[_0x103e('0xa6')],'as':_0x103e('0xcb')}]})[_0x103e('0x1f')](function(_0xacd497){return[_0xacd497,!![]];});});}})[_0x103e('0x9d')](function(_0x37af93,_0x13f920){if(_0x13f920){return _0x37af93;}return db[_0x103e('0xa6')][_0x103e('0x5d')](_[_0x103e('0x54')](_0x27a3d5['body'],{'read':![],'body':_0x27a3d5[_0x103e('0x63')]['body'],'phone':_0x93cb45,'SmsAccountId':_0x47e02e['id'],'SmsInteractionId':_0x37af93['id'],'UserId':_0x27a3d5[_0x103e('0x5e')]['id'],'ContactId':_0x3f2805['id']}))[_0x103e('0x1f')](function(_0x4f7f9a){_0x37af93[_0x103e('0xcc')][_0x103e('0xcb')]=[];_0x37af93[_0x103e('0xcc')][_0x103e('0xcb')][_0x103e('0xa1')](_0x4f7f9a[_0x103e('0xcc')]);return _0x37af93;});})['then'](respondWithResult(_0x3aed2b,null))[_0x103e('0x29')](handleError(_0x3aed2b,null));};exports[_0x103e('0x2b')]=function(_0x5f2bf3,_0x4bf53c,_0x4cec18){if(_0x5f2bf3[_0x103e('0x63')]['id']){delete _0x5f2bf3[_0x103e('0x63')]['id'];}var _0x37ead5,_0x148163,_0x1f9565;return db[_0x103e('0x41')]['find']({'where':{'id':_0x5f2bf3[_0x103e('0x5b')]['id']}})[_0x103e('0x1f')](handleEntityNotFound(_0x4bf53c,null))[_0x103e('0x1f')](function(_0x2a5b6e){if(_0x2a5b6e){_0x1f9565=_0x2a5b6e;logger[_0x103e('0xcd')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x103e('0x2b'),_0x103e('0xce'),_0x2a5b6e[_0x103e('0x44')],util[_0x103e('0xcf')](_0x5f2bf3[_0x103e('0x63')],{'showHidden':![],'depth':null}));switch(_0x2a5b6e[_0x103e('0x44')]){case _0x103e('0x83'):if(_0x5f2bf3[_0x103e('0x63')][_0x103e('0xd0')]&&_0x5f2bf3[_0x103e('0x63')][_0x103e('0x2b')]){_0x148163=_0x5f2bf3[_0x103e('0x63')][_0x103e('0x2b')];return db[_0x103e('0xa6')]['find']({'where':{'messageId':_0x5f2bf3[_0x103e('0x63')]['skebby_dispatch_id']}});}break;case _0x103e('0xd1'):if(_0x5f2bf3['body']['requestid']&&_0x5f2bf3[_0x103e('0x63')]['statusInt']){_0x148163=_0x5f2bf3[_0x103e('0x63')][_0x103e('0xd2')];return db[_0x103e('0xa6')][_0x103e('0x5c')]({'where':{'messageId':_0x5f2bf3['body']['requestid']}});}break;case'clicksend':if(_0x5f2bf3[_0x103e('0x63')]['message_id']&&_0x5f2bf3[_0x103e('0x63')][_0x103e('0xd3')]){_0x148163=_0x5f2bf3[_0x103e('0x63')][_0x103e('0xd3')];return db[_0x103e('0xa6')]['find']({'where':{'messageId':_0x5f2bf3[_0x103e('0x63')][_0x103e('0x88')]}});}break;case _0x103e('0x8a'):var _0x5a11af=_0x5f2bf3[_0x103e('0x63')][_0x103e('0x8b')][0x0];if(_0x5a11af[_0x103e('0x81')]&&_0x5a11af[_0x103e('0x2b')][_0x103e('0xd4')]==='DELIVERED'){_0x148163=_0x5a11af[_0x103e('0x2b')][_0x103e('0xd4')];return db[_0x103e('0xa6')]['find']({'where':{'messageId':_0x5a11af[_0x103e('0x81')]}});}break;case _0x103e('0x8d'):if(_0x5f2bf3[_0x103e('0x63')][_0x103e('0x81')]&&_0x5f2bf3[_0x103e('0x63')][_0x103e('0x2b')]){_0x148163=_0x5f2bf3[_0x103e('0x63')][_0x103e('0x2b')];return db[_0x103e('0xa6')][_0x103e('0x5c')]({'where':{'messageId':_0x5f2bf3['body'][_0x103e('0x81')]}});}break;case'bandwidth':if(_0x5f2bf3['body'][0x0][_0x103e('0x26')]['id']){_0x148163=_0x5f2bf3[_0x103e('0x63')][0x0][_0x103e('0x44')];return db[_0x103e('0xa6')][_0x103e('0x5c')]({'where':{'messageId':_0x5f2bf3[_0x103e('0x63')][0x0]['message']['id']}});}break;case _0x103e('0x90'):if(_0x5f2bf3[_0x103e('0x63')][_0x103e('0xd5')]&&_0x5f2bf3['body'][_0x103e('0x2b')]){_0x148163=_0x5f2bf3[_0x103e('0x63')][_0x103e('0x2b')];return db[_0x103e('0xa6')]['find']({'where':{'messageId':_0x5f2bf3[_0x103e('0x63')]['redif']}});}break;}}})[_0x103e('0x1f')](handleEntityNotFound(_0x4bf53c,null))[_0x103e('0x1f')](function(_0x2e1d63){if(_0x2e1d63){_0x37ead5=_0x2e1d63;switch(_0x1f9565[_0x103e('0x44')]){case _0x103e('0x83'):if(_0x148163===_0x103e('0xd6')){return _0x37ead5[_0x103e('0x35')]({'read':!![]});}else{logger['error'](_0x103e('0x22'),'status',_0x103e('0x83'),util[_0x103e('0xcf')](_0x5f2bf3[_0x103e('0x63')],{'showHidden':![],'depth':null}));}break;case _0x103e('0xd1'):if(_0x148163==='1'){return _0x37ead5[_0x103e('0x35')]({'read':!![]});}else{logger[_0x103e('0x24')](_0x103e('0x22'),_0x103e('0x2b'),_0x103e('0x83'),util[_0x103e('0xcf')](_0x5f2bf3[_0x103e('0x63')],{'showHidden':![],'depth':null}));}break;case _0x103e('0x87'):if(!_0x5f2bf3[_0x103e('0x63')][_0x103e('0xd7')]&&_0x148163>=0xc8&&_0x148163<=0xce){return _0x37ead5['update']({'read':!![]});}else{logger[_0x103e('0x24')](_0x103e('0x22'),'status',_0x103e('0x87'),util['inspect'](_0x5f2bf3[_0x103e('0x63')],{'showHidden':![],'depth':null}));}break;case'infobip':var _0xf11fc2=_0x5f2bf3[_0x103e('0x63')]['results'][0x0];if(_0xf11fc2[_0x103e('0x2b')][_0x103e('0xd4')]==='DELIVERED'){return _0x37ead5[_0x103e('0x35')]({'read':!![]});}else{logger[_0x103e('0x24')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x103e('0x2b'),_0x103e('0x8a'),util[_0x103e('0xcf')](_0x5f2bf3[_0x103e('0x63')],{'showHidden':![],'depth':null}));}break;case'clickatell':if(_0x148163=='DELIVERED_TO_GATEWAY'||_0x148163==_0x103e('0xd8')){return _0x37ead5['update']({'read':!![]});}else{logger['error'](_0x103e('0x22'),_0x103e('0x2b'),_0x103e('0x8d'),util['inspect'](_0x5f2bf3['body'],{'showHidden':![],'depth':null}));}break;case'bandwidth':if(_0x148163=='message-delivered'){return _0x37ead5['update']({'read':!![]});}else{logger[_0x103e('0x24')](_0x103e('0x22'),_0x103e('0x2b'),_0x103e('0x8f'),util['inspect'](_0x5f2bf3[_0x103e('0x63')],{'showHidden':![],'depth':null}));}break;case _0x103e('0x90'):if(_0x148163===_0x103e('0xd9')||_0x148163===_0x103e('0xda')){return _0x37ead5[_0x103e('0x35')]({'read':!![]});}else{logger['error'](_0x103e('0x22'),_0x103e('0x2b'),_0x103e('0x90'),util[_0x103e('0xcf')](_0x5f2bf3['body'],{'showHidden':![],'depth':null}));}break;}return _0x37ead5;}})[_0x103e('0x1f')](respondWithResult(_0x4bf53c,null))[_0x103e('0x29')](handleError(_0x4bf53c,null));};exports['statusGet']=function(_0x6d2993,_0x584502,_0x570c5b){var _0x1cbdc2,_0x2208b2,_0x1ccd72;return db[_0x103e('0x41')][_0x103e('0x5c')]({'where':{'id':_0x6d2993[_0x103e('0x5b')]['id']}})['then'](handleEntityNotFound(_0x584502,null))[_0x103e('0x1f')](function(_0x1a3902){if(_0x1a3902){_0x1ccd72=_0x1a3902;logger[_0x103e('0xcd')](_0x103e('0x22'),_0x103e('0x2b'),_0x103e('0xce'),_0x1a3902[_0x103e('0x44')],util[_0x103e('0xcf')](_0x6d2993[_0x103e('0x46')],{'showHidden':![],'depth':null}));switch(_0x1a3902[_0x103e('0x44')]){case _0x103e('0xdb'):if(_0x6d2993[_0x103e('0x46')]['message-id']&&_0x6d2993[_0x103e('0x46')][_0x103e('0xdc')]){_0x2208b2=_0x6d2993['query'][_0x103e('0xdc')];return db[_0x103e('0xa6')]['find']({'where':{'messageId':_0x6d2993[_0x103e('0x46')][_0x103e('0xdd')]}});}break;}}})[_0x103e('0x1f')](handleEntityNotFound(_0x584502,null))['then'](function(_0x5b8dae){if(_0x5b8dae){_0x1cbdc2=_0x5b8dae;switch(_0x1ccd72[_0x103e('0x44')]){case _0x103e('0xdb'):if(_0x2208b2==='2'||_0x2208b2==='6'){return _0x1cbdc2[_0x103e('0x35')]({'read':!![]});}else{logger[_0x103e('0x24')](_0x103e('0x22'),_0x103e('0x2b'),_0x103e('0xdb'),util['inspect'](_0x6d2993['query'],{'showHidden':![],'depth':null}));};break;}return _0x1cbdc2;}})[_0x103e('0x1f')](respondWithResult(_0x584502,null))[_0x103e('0x29')](handleError(_0x584502,null));};exports[_0x103e('0xde')]=function(_0x3c37ef,_0x23cc0e,_0x2746d9){return db['SmsAccount'][_0x103e('0x5c')]({'where':{'id':_0x3c37ef[_0x103e('0x5b')]['id']}})[_0x103e('0x1f')](handleEntityNotFound(_0x23cc0e,null))[_0x103e('0x1f')](function(_0x16fdc4){if(_0x16fdc4){return _0x16fdc4[_0x103e('0xde')](_0x3c37ef[_0x103e('0x63')][_0x103e('0x70')],_[_0x103e('0xdf')](_0x3c37ef[_0x103e('0x63')],[_0x103e('0x70'),'id'])||{})[_0x103e('0x9d')](function(_0x5a7cb5){for(var _0x5d7a79=0x0;_0x5d7a79<_0x3c37ef[_0x103e('0x63')]['ids'][_0x103e('0x4b')];_0x5d7a79+=0x1){socket[_0x103e('0xe0')](_0x103e('0xe1'),{'UserId':Number(_0x3c37ef[_0x103e('0x63')][_0x103e('0x70')][_0x5d7a79]),'SmsAccountId':Number(_0x3c37ef[_0x103e('0x5b')]['id'])});}return _0x5a7cb5;});}})['then'](respondWithResult(_0x23cc0e,null))[_0x103e('0x29')](handleError(_0x23cc0e,null));};exports[_0x103e('0xe2')]=function(_0x1561e8,_0x58230a,_0x3903cb){return db[_0x103e('0x41')]['find']({'where':{'id':_0x1561e8[_0x103e('0x5b')]['id']}})[_0x103e('0x1f')](handleEntityNotFound(_0x58230a,null))[_0x103e('0x1f')](function(_0x28822d){if(_0x28822d){return _0x28822d[_0x103e('0xe2')](_0x1561e8[_0x103e('0x46')][_0x103e('0x70')])[_0x103e('0x1f')](function(){if(_[_0x103e('0xe3')](_0x1561e8['query']['ids'])){for(var _0x32bcf6=0x0;_0x32bcf6<_0x1561e8[_0x103e('0x46')][_0x103e('0x70')][_0x103e('0x4b')];_0x32bcf6+=0x1){socket[_0x103e('0xe0')](_0x103e('0xe4'),{'UserId':Number(_0x1561e8[_0x103e('0x46')][_0x103e('0x70')][_0x32bcf6]),'SmsAccountId':Number(_0x1561e8[_0x103e('0x5b')]['id'])});}}else{socket['emit']('userSmsAccount:remove',{'UserId':Number(_0x1561e8[_0x103e('0x46')][_0x103e('0x70')]),'SmsAccountId':Number(_0x1561e8[_0x103e('0x5b')]['id'])});}});}})[_0x103e('0x1f')](respondWithStatusCode(_0x58230a,null))[_0x103e('0x29')](handleError(_0x58230a,null));};exports['getAgents']=function(_0x4a5043,_0x140c58,_0x107e27){var _0x5ee605={};var _0x4833de={};var _0x359282;var _0x46d8db;return db['SmsAccount'][_0x103e('0x69')]({'where':{'id':_0x4a5043[_0x103e('0x5b')]['id']}})['then'](handleEntityNotFound(_0x140c58,null))['then'](function(_0x528361){if(_0x528361){_0x359282=_0x528361;_0x4833de[_0x103e('0x45')]=_[_0x103e('0x47')](db[_0x103e('0xc1')]['rawAttributes']);_0x4833de[_0x103e('0x46')]=_[_0x103e('0x47')](_0x4a5043['query']);_0x4833de[_0x103e('0x51')]=_[_0x103e('0x48')](_0x4833de[_0x103e('0x45')],_0x4833de['query']);_0x5ee605[_0x103e('0x4a')]=_[_0x103e('0x48')](_0x4833de[_0x103e('0x45')],qs[_0x103e('0x49')](_0x4a5043[_0x103e('0x46')][_0x103e('0x49')]));_0x5ee605[_0x103e('0x4a')]=_0x5ee605[_0x103e('0x4a')]['length']?_0x5ee605[_0x103e('0x4a')]:_0x4833de[_0x103e('0x45')];_0x5ee605[_0x103e('0x4e')]=qs[_0x103e('0x4f')](_0x4a5043[_0x103e('0x46')][_0x103e('0x4f')]);_0x5ee605['where']=qs[_0x103e('0x51')](_['pick'](_0x4a5043[_0x103e('0x46')],_0x4833de[_0x103e('0x51')]));if(_0x4a5043[_0x103e('0x46')][_0x103e('0x53')]){_0x5ee605['where']=_['merge'](_0x5ee605['where'],{'$or':_[_0x103e('0x40')](_0x5ee605[_0x103e('0x4a')],function(_0x4d6625){var _0x106064={};_0x106064[_0x4d6625]={'$like':'%'+_0x4a5043['query'][_0x103e('0x53')]+'%'};return _0x106064;})});}_0x5ee605=_[_0x103e('0x54')]({},_0x5ee605,_0x4a5043[_0x103e('0x56')]);return _0x359282[_0x103e('0xe5')](_0x5ee605);}})[_0x103e('0x1f')](function(_0x3f8a12){if(_0x3f8a12){_0x46d8db=_0x3f8a12[_0x103e('0x4b')];if(!_0x4a5043[_0x103e('0x46')][_0x103e('0x4c')](_0x103e('0x4d'))){_0x5ee605[_0x103e('0x30')]=qs[_0x103e('0x30')](_0x4a5043[_0x103e('0x46')][_0x103e('0x30')]);_0x5ee605[_0x103e('0x2d')]=qs[_0x103e('0x2d')](_0x4a5043[_0x103e('0x46')]['offset']);}return _0x359282[_0x103e('0xe5')](_0x5ee605);}})[_0x103e('0x1f')](function(_0x11758e){if(_0x11758e){return _0x11758e?{'count':_0x46d8db,'rows':_0x11758e}:null;}})['then'](respondWithResult(_0x140c58,null))[_0x103e('0x29')](handleError(_0x140c58,null));};
\ No newline at end of file
+var _0x3cfd=['updatedAt','CompanyId','ListId','mobile','twilio','from','From','skebby','sender','text','clicksend','messageId','message_id','plivo','Text','infobip','results','originatingAddress','segmentedMessage','clickatell','fromNumber','replyMessageId','bandwidth','intelepeer','refid','isNil','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','CmList','Contacts','DESC','omit','contact','SmsInteraction','spread','interaction','created','autoclose','applications','push','close','unmanaged','*,*,*,*','SmsMessage','ContactId','AttachmentId','UserId','User','unshift','agent','waitForTheAssignedAgent','queueId','SmsQueue','waitForTheAssignedQueue','Start','startRouting','receiveMessage','SmsAccount,\x20%s,\x20%s,\x20%s,\x20%s','text/xml','send','<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22?>\x0a<Response></Response>','addApplications','sequelize','READ_COMMITTED','findAndCountAll','finally','getInteractions','Owner','fullname','internal','Tag','Tags','tag','List','out','Messages','dataValues','received\x20delivery\x20report\x20from','skebby_dispatch_id','connectel','requestid','status_code','groupName','DELIVERED','redif','inspect','error_code','RECEIVED_BY_RECIPIENT','message-delivered','DELIVRD','ACCEPTD','statusGet','csc','state','emit','userSmsAccount:save','removeAgents','isArray','userSmsAccount:remove','getAgents','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./smsAccount.socket','client','info','SmsAccount,\x20%s,\x20%s','request\x20sent','debug','SmsAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','sendStatus','status','end','undefined','limit','offset','count','set','Content-Range','json','apply','reject','update','then','destroy','get','SmsAccounts','UserProfileResource','stack','name','index','Pause','mandatoryDispositionPause','SmsAccount','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','VIRTUAL','filter','merge','options','includeAll','include','findAll','catch','show','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','describe','Disposition','findOne','SmsAccountId','rows','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','removeAnswers','sms','SmsApplication','orderBy','Applications','priority','asc','account','CmContact','Sequelize','ValidationError','no\x20available\x20attributes','difference','createdAt'];(function(_0x45a996,_0x5c6265){var _0x3c6073=function(_0x1d787d){while(--_0x1d787d){_0x45a996['push'](_0x45a996['shift']());}};_0x3c6073(++_0x5c6265);}(_0x3cfd,0x14c));var _0xd3cf=function(_0x62a295,_0x22e756){_0x62a295=_0x62a295-0x0;var _0xb1b3a6=_0x3cfd[_0x62a295];return _0xb1b3a6;};'use strict';var emlformat=require(_0xd3cf('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xd3cf('0x1'));var jsonpatch=require(_0xd3cf('0x2'));var rp=require(_0xd3cf('0x3'));var moment=require(_0xd3cf('0x4'));var BPromise=require(_0xd3cf('0x5'));var Mustache=require(_0xd3cf('0x6'));var util=require('util');var path=require(_0xd3cf('0x7'));var sox=require('sox');var csv=require(_0xd3cf('0x8'));var ejs=require(_0xd3cf('0x9'));var fs=require('fs');var fs_extra=require(_0xd3cf('0xa'));var _=require('lodash');var squel=require(_0xd3cf('0xb'));var crypto=require(_0xd3cf('0xc'));var jsforce=require(_0xd3cf('0xd'));var deskjs=require(_0xd3cf('0xe'));var toCsv=require('to-csv');var querystring=require(_0xd3cf('0xf'));var Papa=require(_0xd3cf('0x10'));var Redis=require(_0xd3cf('0x11'));var authService=require(_0xd3cf('0x12'));var qs=require(_0xd3cf('0x13'));var as=require(_0xd3cf('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xd3cf('0x15'))(_0xd3cf('0x16'));var utils=require(_0xd3cf('0x17'));var config=require(_0xd3cf('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0xd3cf('0x19'))['db'];config[_0xd3cf('0x1a')]=_[_0xd3cf('0x1b')](config[_0xd3cf('0x1a')],{'host':_0xd3cf('0x1c'),'port':0x18eb});var socket=require(_0xd3cf('0x1d'))(new Redis(config['redis']));require(_0xd3cf('0x1e'))['register'](socket);var jayson=require('jayson/promise');var client=jayson[_0xd3cf('0x1f')]['http']({'port':0x232c});function respondWithRpcPromise(_0x82b131,_0x1d5454,_0x2670c5,_0x1004ae){return new BPromise(function(_0x2fe191,_0x3504b4){var _0x319c16=_0x1004ae||client;return _0x319c16['request'](_0x82b131,_0x2670c5)['then'](function(_0x15a4d5){logger[_0xd3cf('0x20')](_0xd3cf('0x21'),_0x1d5454,_0xd3cf('0x22'));logger[_0xd3cf('0x23')](_0xd3cf('0x24'),_0x1d5454,_0xd3cf('0x22'),JSON[_0xd3cf('0x25')](_0x15a4d5));if(_0x15a4d5[_0xd3cf('0x26')]){if(_0x15a4d5[_0xd3cf('0x26')][_0xd3cf('0x27')]===0x1f4){logger[_0xd3cf('0x26')](_0xd3cf('0x21'),_0x1d5454,_0x15a4d5['error']['message']);return _0x3504b4(_0x15a4d5[_0xd3cf('0x26')][_0xd3cf('0x28')]);}logger['error']('SmsAccount,\x20%s,\x20%s',_0x1d5454,_0x15a4d5[_0xd3cf('0x26')]['message']);return _0x2fe191(_0x15a4d5[_0xd3cf('0x26')][_0xd3cf('0x28')]);}else{logger[_0xd3cf('0x20')](_0xd3cf('0x21'),_0x1d5454,_0xd3cf('0x22'));_0x2fe191(_0x15a4d5[_0xd3cf('0x29')]['message']);}})['catch'](function(_0x2742af){logger['error'](_0xd3cf('0x21'),_0x1d5454,_0x2742af);_0x3504b4(_0x2742af);});});}function respondWithStatusCode(_0x23dabc,_0x5772a5){_0x5772a5=_0x5772a5||0xcc;return function(_0x5be34b){if(_0x5be34b){return _0x23dabc[_0xd3cf('0x2a')](_0x5772a5);}return _0x23dabc[_0xd3cf('0x2b')](_0x5772a5)[_0xd3cf('0x2c')]();};}function respondWithResult(_0x19d170,_0x489dc5){_0x489dc5=_0x489dc5||0xc8;return function(_0x4d4775){if(_0x4d4775){return _0x19d170[_0xd3cf('0x2b')](_0x489dc5)['json'](_0x4d4775);}};}function respondWithFilteredResult(_0x2ca12a,_0x397023){return function(_0x5703a4){if(_0x5703a4){var _0x559af3=typeof _0x397023['offset']===_0xd3cf('0x2d')&&typeof _0x397023[_0xd3cf('0x2e')]==='undefined';var _0x27f239=_0x5703a4['count'];var _0x291e3a=_0x559af3?0x0:_0x397023[_0xd3cf('0x2f')];var _0x20f646=_0x559af3?_0x5703a4[_0xd3cf('0x30')]:_0x397023[_0xd3cf('0x2f')]+_0x397023[_0xd3cf('0x2e')];var _0x41b200;if(_0x20f646>=_0x27f239){_0x20f646=_0x27f239;_0x41b200=0xc8;}else{_0x41b200=0xce;}_0x2ca12a['status'](_0x41b200);return _0x2ca12a[_0xd3cf('0x31')](_0xd3cf('0x32'),_0x291e3a+'-'+_0x20f646+'/'+_0x27f239)[_0xd3cf('0x33')](_0x5703a4);}return null;};}function patchUpdates(_0x1cacf2){return function(_0xb07d3e){try{jsonpatch[_0xd3cf('0x34')](_0xb07d3e,_0x1cacf2,!![]);}catch(_0x5e36bc){return BPromise[_0xd3cf('0x35')](_0x5e36bc);}return _0xb07d3e['save']();};}function saveUpdates(_0x58f305,_0x1ef7f7){return function(_0x458907){if(_0x458907){return _0x458907[_0xd3cf('0x36')](_0x58f305)[_0xd3cf('0x37')](function(_0x51347a){return _0x51347a;});}return null;};}function removeEntity(_0x318936,_0x4666c4){return function(_0x269c97){if(_0x269c97){return _0x269c97[_0xd3cf('0x38')]()['then'](function(){var _0x268ee3=_0x269c97[_0xd3cf('0x39')]({'plain':!![]});var _0x3062e3=_0xd3cf('0x3a');return db[_0xd3cf('0x3b')][_0xd3cf('0x38')]({'where':{'type':_0x3062e3,'resourceId':_0x268ee3['id']}})[_0xd3cf('0x37')](function(){return _0x269c97;});})[_0xd3cf('0x37')](function(){_0x318936[_0xd3cf('0x2b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5c7950,_0x1bcbd8){return function(_0x218ebf){if(!_0x218ebf){_0x5c7950['sendStatus'](0x194);}return _0x218ebf;};}function handleError(_0x5205cf,_0x3bc8bd){_0x3bc8bd=_0x3bc8bd||0x1f4;return function(_0x12cde7){logger[_0xd3cf('0x26')](_0x12cde7[_0xd3cf('0x3c')]);if(_0x12cde7[_0xd3cf('0x3d')]){delete _0x12cde7['name'];}_0x5205cf[_0xd3cf('0x2b')](_0x3bc8bd)['send'](_0x12cde7);};}exports[_0xd3cf('0x3e')]=function(_0x37a20f,_0x3760cd){var _0x1a443f={'include':[{'model':db[_0xd3cf('0x3f')],'as':_0xd3cf('0x40')}]},_0x4e0f01={},_0x1eec1e={'count':0x0,'rows':[]};var _0x1d02ca=_['map'](db[_0xd3cf('0x41')][_0xd3cf('0x42')],function(_0x3d420c){return{'name':_0x3d420c[_0xd3cf('0x43')],'type':_0x3d420c[_0xd3cf('0x44')][_0xd3cf('0x45')]};});_0x4e0f01[_0xd3cf('0x46')]=_[_0xd3cf('0x47')](_0x1d02ca,_0xd3cf('0x3d'));_0x4e0f01[_0xd3cf('0x48')]=_[_0xd3cf('0x49')](_0x37a20f[_0xd3cf('0x48')]);_0x4e0f01[_0xd3cf('0x4a')]=_[_0xd3cf('0x4b')](_0x4e0f01[_0xd3cf('0x46')],_0x4e0f01[_0xd3cf('0x48')]);_0x1a443f[_0xd3cf('0x4c')]=_[_0xd3cf('0x4b')](_0x4e0f01['model'],qs[_0xd3cf('0x4d')](_0x37a20f[_0xd3cf('0x48')]['fields']));_0x1a443f[_0xd3cf('0x4c')]=_0x1a443f[_0xd3cf('0x4c')][_0xd3cf('0x4e')]?_0x1a443f[_0xd3cf('0x4c')]:_0x4e0f01[_0xd3cf('0x46')];if(!_0x37a20f['query'][_0xd3cf('0x4f')](_0xd3cf('0x50'))){_0x1a443f['limit']=qs[_0xd3cf('0x2e')](_0x37a20f[_0xd3cf('0x48')][_0xd3cf('0x2e')]);_0x1a443f['offset']=qs[_0xd3cf('0x2f')](_0x37a20f[_0xd3cf('0x48')][_0xd3cf('0x2f')]);}_0x1a443f[_0xd3cf('0x51')]=qs[_0xd3cf('0x52')](_0x37a20f[_0xd3cf('0x48')][_0xd3cf('0x52')]);_0x1a443f[_0xd3cf('0x53')]=qs[_0xd3cf('0x4a')](_[_0xd3cf('0x54')](_0x37a20f[_0xd3cf('0x48')],_0x4e0f01[_0xd3cf('0x4a')]),_0x1d02ca);if(_0x37a20f[_0xd3cf('0x48')]['filter']){_0x1a443f[_0xd3cf('0x53')]=_['merge'](_0x1a443f[_0xd3cf('0x53')],{'$or':_[_0xd3cf('0x47')](_0x1d02ca,function(_0x1e5fc1){if(_0x1e5fc1[_0xd3cf('0x44')]!==_0xd3cf('0x55')){var _0x1878fa={};_0x1878fa[_0x1e5fc1['name']]={'$like':'%'+_0x37a20f['query'][_0xd3cf('0x56')]+'%'};return _0x1878fa;}})});}_0x1a443f=_[_0xd3cf('0x57')]({},_0x1a443f,_0x37a20f[_0xd3cf('0x58')]);var _0x479e2b={'where':_0x1a443f['where']};return db[_0xd3cf('0x41')]['count'](_0x479e2b)[_0xd3cf('0x37')](function(_0x5eb5a3){_0x1eec1e['count']=_0x5eb5a3;if(_0x37a20f['query'][_0xd3cf('0x59')]){_0x1a443f[_0xd3cf('0x5a')]=[{'all':!![]}];}return db[_0xd3cf('0x41')][_0xd3cf('0x5b')](_0x1a443f);})[_0xd3cf('0x37')](function(_0x502c3d){_0x1eec1e['rows']=_0x502c3d;return _0x1eec1e;})[_0xd3cf('0x37')](respondWithFilteredResult(_0x3760cd,_0x1a443f))[_0xd3cf('0x5c')](handleError(_0x3760cd,null));};exports[_0xd3cf('0x5d')]=function(_0x26ce87,_0x5c2bba){var _0x5c6b8b={'raw':![],'where':{'id':_0x26ce87['params']['id']},'include':[{'model':db['Pause'],'as':'mandatoryDispositionPause'}]},_0x27364c={};_0x27364c[_0xd3cf('0x46')]=_['keys'](db[_0xd3cf('0x41')][_0xd3cf('0x42')]);_0x27364c[_0xd3cf('0x48')]=_[_0xd3cf('0x49')](_0x26ce87[_0xd3cf('0x48')]);_0x27364c[_0xd3cf('0x4a')]=_[_0xd3cf('0x4b')](_0x27364c['model'],_0x27364c[_0xd3cf('0x48')]);_0x5c6b8b['attributes']=_[_0xd3cf('0x4b')](_0x27364c[_0xd3cf('0x46')],qs['fields'](_0x26ce87['query'][_0xd3cf('0x4d')]));_0x5c6b8b['attributes']=_0x5c6b8b[_0xd3cf('0x4c')][_0xd3cf('0x4e')]?_0x5c6b8b[_0xd3cf('0x4c')]:_0x27364c[_0xd3cf('0x46')];if(_0x26ce87[_0xd3cf('0x48')][_0xd3cf('0x59')]){_0x5c6b8b[_0xd3cf('0x5a')]=[{'all':!![]}];}_0x5c6b8b=_['merge']({},_0x5c6b8b,_0x26ce87[_0xd3cf('0x58')]);return db['SmsAccount'][_0xd3cf('0x5e')](_0x5c6b8b)['then'](handleEntityNotFound(_0x5c2bba,null))[_0xd3cf('0x37')](respondWithResult(_0x5c2bba,null))[_0xd3cf('0x5c')](handleError(_0x5c2bba,null));};exports[_0xd3cf('0x5f')]=function(_0x4dee48,_0x403dda){return db['SmsAccount'][_0xd3cf('0x5f')](_0x4dee48[_0xd3cf('0x60')],{})[_0xd3cf('0x37')](function(_0x3a45a5){var _0x262176=_0x4dee48[_0xd3cf('0x61')][_0xd3cf('0x39')]({'plain':!![]});if(!_0x262176)throw new Error(_0xd3cf('0x62'));if(_0x262176[_0xd3cf('0x63')]===_0xd3cf('0x61')){var _0x5c0de5=_0x3a45a5[_0xd3cf('0x39')]({'plain':!![]});var _0x5d64ac='SmsAccounts';return db['UserProfileSection'][_0xd3cf('0x5e')]({'where':{'name':_0x5d64ac,'userProfileId':_0x262176[_0xd3cf('0x64')]},'raw':!![]})[_0xd3cf('0x37')](function(_0x175187){if(_0x175187&&_0x175187[_0xd3cf('0x65')]===0x0){return db[_0xd3cf('0x3b')]['create']({'name':_0x5c0de5[_0xd3cf('0x3d')],'resourceId':_0x5c0de5['id'],'type':_0x175187[_0xd3cf('0x3d')],'sectionId':_0x175187['id']},{})[_0xd3cf('0x37')](function(){return _0x3a45a5;});}else{return _0x3a45a5;}})['catch'](function(_0x4c4dce){logger[_0xd3cf('0x26')](_0xd3cf('0x66'),_0x4c4dce);throw _0x4c4dce;});}return _0x3a45a5;})[_0xd3cf('0x37')](respondWithResult(_0x403dda,0xc9))['catch'](handleError(_0x403dda,null));};exports[_0xd3cf('0x36')]=function(_0x5323e6,_0x53ed99){if(_0x5323e6[_0xd3cf('0x60')]['id']){delete _0x5323e6[_0xd3cf('0x60')]['id'];}return db['SmsAccount'][_0xd3cf('0x5e')]({'where':{'id':_0x5323e6[_0xd3cf('0x67')]['id']},'include':[{'model':db[_0xd3cf('0x3f')],'as':'mandatoryDispositionPause'}]})[_0xd3cf('0x37')](handleEntityNotFound(_0x53ed99,null))['then'](saveUpdates(_0x5323e6[_0xd3cf('0x60')],null))[_0xd3cf('0x37')](respondWithResult(_0x53ed99,null))[_0xd3cf('0x5c')](handleError(_0x53ed99,null));};exports['destroy']=function(_0x3a97c6,_0x2e8faa){return db[_0xd3cf('0x41')][_0xd3cf('0x5e')]({'where':{'id':_0x3a97c6[_0xd3cf('0x67')]['id']}})[_0xd3cf('0x37')](handleEntityNotFound(_0x2e8faa,null))['then'](removeEntity(_0x2e8faa,null))['catch'](handleError(_0x2e8faa,null));};exports[_0xd3cf('0x68')]=function(_0x346c76,_0xe4538){return db['SmsAccount'][_0xd3cf('0x68')]()[_0xd3cf('0x37')](respondWithResult(_0xe4538,null))[_0xd3cf('0x5c')](handleError(_0xe4538,null));};exports['addDisposition']=function(_0x2f20e4,_0x141c01,_0xea672a){if(_0x2f20e4[_0xd3cf('0x60')]['id']){delete _0x2f20e4[_0xd3cf('0x60')]['id'];}return db['SmsAccount'][_0xd3cf('0x5e')]({'where':{'id':_0x2f20e4['params']['id']}})[_0xd3cf('0x37')](handleEntityNotFound(_0x141c01,null))['then'](function(_0x476c7f){if(_0x476c7f){_0x2f20e4[_0xd3cf('0x60')]['SmsAccountId']=_0x476c7f['id'];return db[_0xd3cf('0x69')][_0xd3cf('0x5f')](_0x2f20e4[_0xd3cf('0x60')]);}})['then'](respondWithResult(_0x141c01,null))[_0xd3cf('0x5c')](handleError(_0x141c01,null));};exports['getDispositions']=function(_0x8ff96b,_0x5ab7a0,_0x3d0839){var _0x3044ae={'raw':![],'where':{}};var _0x4ec232={};var _0x5e4b30={'count':0x0,'rows':[]};return db[_0xd3cf('0x41')][_0xd3cf('0x6a')]({'where':{'id':_0x8ff96b['params']['id']}})[_0xd3cf('0x37')](handleEntityNotFound(_0x5ab7a0,null))[_0xd3cf('0x37')](function(_0x392b9d){if(_0x392b9d){_0x4ec232[_0xd3cf('0x46')]=_[_0xd3cf('0x49')](db['Disposition']['rawAttributes']);_0x4ec232[_0xd3cf('0x48')]=_['keys'](_0x8ff96b['query']);_0x4ec232[_0xd3cf('0x4a')]=_[_0xd3cf('0x4b')](_0x4ec232[_0xd3cf('0x46')],_0x4ec232[_0xd3cf('0x48')]);_0x3044ae[_0xd3cf('0x4c')]=_[_0xd3cf('0x4b')](_0x4ec232[_0xd3cf('0x46')],qs['fields'](_0x8ff96b['query'][_0xd3cf('0x4d')]));_0x3044ae[_0xd3cf('0x4c')]=_0x3044ae[_0xd3cf('0x4c')][_0xd3cf('0x4e')]?_0x3044ae[_0xd3cf('0x4c')]:_0x4ec232[_0xd3cf('0x46')];if(!_0x8ff96b[_0xd3cf('0x48')][_0xd3cf('0x4f')]('nolimit')){_0x3044ae['limit']=qs[_0xd3cf('0x2e')](_0x8ff96b[_0xd3cf('0x48')][_0xd3cf('0x2e')]);_0x3044ae[_0xd3cf('0x2f')]=qs[_0xd3cf('0x2f')](_0x8ff96b['query'][_0xd3cf('0x2f')]);}_0x3044ae[_0xd3cf('0x51')]=qs['sort'](_0x8ff96b['query']['sort']);_0x3044ae[_0xd3cf('0x53')]=qs['filters'](_[_0xd3cf('0x54')](_0x8ff96b[_0xd3cf('0x48')],_0x4ec232[_0xd3cf('0x4a')]));_0x3044ae['where'][_0xd3cf('0x6b')]=_0x392b9d['id'];if(_0x8ff96b[_0xd3cf('0x48')]['filter']){_0x3044ae['where']=_[_0xd3cf('0x57')](_0x3044ae[_0xd3cf('0x53')],{'$or':_[_0xd3cf('0x47')](_0x3044ae[_0xd3cf('0x4c')],function(_0x209940){var _0x3b0940={};_0x3b0940[_0x209940]={'$like':'%'+_0x8ff96b[_0xd3cf('0x48')][_0xd3cf('0x56')]+'%'};return _0x3b0940;})});}_0x3044ae=_[_0xd3cf('0x57')]({},_0x3044ae,_0x8ff96b['options']);return db[_0xd3cf('0x69')]['count']({'where':_0x3044ae['where']})['then'](function(_0x256e9a){_0x5e4b30[_0xd3cf('0x30')]=_0x256e9a;if(_0x8ff96b['query']['includeAll']){_0x3044ae[_0xd3cf('0x5a')]=[{'all':!![]}];}return db['Disposition'][_0xd3cf('0x5b')](_0x3044ae);})[_0xd3cf('0x37')](function(_0x4602ec){_0x5e4b30[_0xd3cf('0x6c')]=_0x4602ec;return _0x5e4b30;});}})[_0xd3cf('0x37')](respondWithFilteredResult(_0x5ab7a0,_0x3044ae))['catch'](handleError(_0x5ab7a0,null));};exports[_0xd3cf('0x6d')]=function(_0x5b9bcd,_0x3befca,_0x59c22e){return db['SmsAccount'][_0xd3cf('0x5e')]({'where':{'id':_0x5b9bcd[_0xd3cf('0x67')]['id']}})[_0xd3cf('0x37')](handleEntityNotFound(_0x3befca,null))[_0xd3cf('0x37')](function(_0x5967ec){if(_0x5967ec){return _0x5967ec['removeDispositions'](_0x5b9bcd[_0xd3cf('0x48')][_0xd3cf('0x6e')]);}})[_0xd3cf('0x37')](respondWithStatusCode(_0x3befca,null))[_0xd3cf('0x5c')](handleError(_0x3befca,null));};exports[_0xd3cf('0x6f')]=function(_0x3a0067,_0x227a15,_0x31998f){if(_0x3a0067[_0xd3cf('0x60')]['id']){delete _0x3a0067[_0xd3cf('0x60')]['id'];}return db[_0xd3cf('0x41')][_0xd3cf('0x5e')]({'where':{'id':_0x3a0067[_0xd3cf('0x67')]['id']}})['then'](handleEntityNotFound(_0x227a15,null))['then'](function(_0x265748){if(_0x265748){_0x3a0067['body']['SmsAccountId']=_0x265748['id'];return db[_0xd3cf('0x70')][_0xd3cf('0x5f')](_0x3a0067[_0xd3cf('0x60')]);}})[_0xd3cf('0x37')](respondWithResult(_0x227a15,null))[_0xd3cf('0x5c')](handleError(_0x227a15,null));};exports[_0xd3cf('0x71')]=function(_0x1dfedd,_0x44f6c4,_0x2b2721){var _0x1292c4={'raw':![],'where':{}};var _0x2d7a63={};var _0x131f61={'count':0x0,'rows':[]};return db[_0xd3cf('0x41')]['findOne']({'where':{'id':_0x1dfedd[_0xd3cf('0x67')]['id']}})[_0xd3cf('0x37')](handleEntityNotFound(_0x44f6c4,null))[_0xd3cf('0x37')](function(_0x3eb679){if(_0x3eb679){_0x2d7a63[_0xd3cf('0x46')]=_[_0xd3cf('0x49')](db['CannedAnswer'][_0xd3cf('0x42')]);_0x2d7a63[_0xd3cf('0x48')]=_[_0xd3cf('0x49')](_0x1dfedd[_0xd3cf('0x48')]);_0x2d7a63['filters']=_[_0xd3cf('0x4b')](_0x2d7a63[_0xd3cf('0x46')],_0x2d7a63['query']);_0x1292c4[_0xd3cf('0x4c')]=_[_0xd3cf('0x4b')](_0x2d7a63['model'],qs[_0xd3cf('0x4d')](_0x1dfedd[_0xd3cf('0x48')]['fields']));_0x1292c4[_0xd3cf('0x4c')]=_0x1292c4[_0xd3cf('0x4c')]['length']?_0x1292c4['attributes']:_0x2d7a63[_0xd3cf('0x46')];if(!_0x1dfedd[_0xd3cf('0x48')][_0xd3cf('0x4f')](_0xd3cf('0x50'))){_0x1292c4['limit']=qs[_0xd3cf('0x2e')](_0x1dfedd[_0xd3cf('0x48')][_0xd3cf('0x2e')]);_0x1292c4[_0xd3cf('0x2f')]=qs[_0xd3cf('0x2f')](_0x1dfedd['query'][_0xd3cf('0x2f')]);}_0x1292c4[_0xd3cf('0x51')]=qs[_0xd3cf('0x52')](_0x1dfedd['query'][_0xd3cf('0x52')]);_0x1292c4[_0xd3cf('0x53')]=qs[_0xd3cf('0x4a')](_[_0xd3cf('0x54')](_0x1dfedd[_0xd3cf('0x48')],_0x2d7a63['filters']));_0x1292c4[_0xd3cf('0x53')]['SmsAccountId']=_0x3eb679['id'];if(_0x1dfedd['query'][_0xd3cf('0x56')]){_0x1292c4[_0xd3cf('0x53')]=_[_0xd3cf('0x57')](_0x1292c4[_0xd3cf('0x53')],{'$or':_[_0xd3cf('0x47')](_0x1292c4[_0xd3cf('0x4c')],function(_0x245a7d){var _0x590952={};_0x590952[_0x245a7d]={'$like':'%'+_0x1dfedd[_0xd3cf('0x48')]['filter']+'%'};return _0x590952;})});}_0x1292c4=_['merge']({},_0x1292c4,_0x1dfedd[_0xd3cf('0x58')]);return db[_0xd3cf('0x70')]['count']({'where':_0x1292c4['where']})[_0xd3cf('0x37')](function(_0x4fc34c){_0x131f61[_0xd3cf('0x30')]=_0x4fc34c;if(_0x1dfedd[_0xd3cf('0x48')]['includeAll']){_0x1292c4[_0xd3cf('0x5a')]=[{'all':!![]}];}return db[_0xd3cf('0x70')][_0xd3cf('0x5b')](_0x1292c4);})[_0xd3cf('0x37')](function(_0x558e5e){_0x131f61[_0xd3cf('0x6c')]=_0x558e5e;return _0x131f61;});}})[_0xd3cf('0x37')](respondWithFilteredResult(_0x44f6c4,_0x1292c4))[_0xd3cf('0x5c')](handleError(_0x44f6c4,null));};exports[_0xd3cf('0x72')]=function(_0x233a45,_0x189c1a,_0x13378f){return db[_0xd3cf('0x41')][_0xd3cf('0x5e')]({'where':{'id':_0x233a45[_0xd3cf('0x67')]['id']}})[_0xd3cf('0x37')](handleEntityNotFound(_0x189c1a,null))['then'](function(_0x2258b8){if(_0x2258b8){return _0x2258b8[_0xd3cf('0x72')](_0x233a45['query'][_0xd3cf('0x6e')]);}})[_0xd3cf('0x37')](respondWithStatusCode(_0x189c1a,null))[_0xd3cf('0x5c')](handleError(_0x189c1a,null));};exports['notify']=function(_0x3c8b86,_0x3a723a,_0x1ff767){var _0xee0117={'channel':_0xd3cf('0x73')};var _0xcff9fe=[];var _0x475bfc=[];var _0x30ebc3={};return db['SmsAccount']['find']({'where':{'id':_0x3c8b86['params']['id']},'include':[{'model':db[_0xd3cf('0x74')],'as':'Applications'}]})['then'](handleEntityNotFound(_0x3a723a,null))['then'](function(_0x5bc9a6){_0xee0117['account']=_0x5bc9a6;_0xee0117['applications']=_[_0xd3cf('0x75')](_0x5bc9a6[_0xd3cf('0x76')],[_0xd3cf('0x77')],[_0xd3cf('0x78')]);if(_0xee0117[_0xd3cf('0x79')][_0xd3cf('0x76')]){delete _0xee0117[_0xd3cf('0x79')]['Applications'];}return db[_0xd3cf('0x7a')][_0xd3cf('0x68')]();})[_0xd3cf('0x37')](function(_0x33eb11){if(!_0x33eb11){throw new db[(_0xd3cf('0x7b'))][(_0xd3cf('0x7c'))](_0xd3cf('0x7d'));}_0xcff9fe=_[_0xd3cf('0x7e')](_[_0xd3cf('0x49')](_0x33eb11),[_0xd3cf('0x7f'),_0xd3cf('0x80')]);_0x475bfc=_[_0xd3cf('0x7e')](_[_0xd3cf('0x49')](_0x33eb11),['createdAt',_0xd3cf('0x80'),_0xd3cf('0x81'),_0xd3cf('0x82')]);_0xee0117[_0xd3cf('0x60')]={'mapKey':_0xd3cf('0x83')};if(_0xee0117[_0xd3cf('0x79')][_0xd3cf('0x44')]){switch(_0xee0117[_0xd3cf('0x79')][_0xd3cf('0x44')]){case _0xd3cf('0x84'):_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x85')]=_0x3c8b86[_0xd3cf('0x60')][_0xd3cf('0x86')];_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x60')]=_0x3c8b86[_0xd3cf('0x60')]['Body'];_0xee0117['body']['messageId']=_0x3c8b86[_0xd3cf('0x60')]['MessageSid'];break;case _0xd3cf('0x87'):_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x85')]='+'+_0x3c8b86[_0xd3cf('0x60')][_0xd3cf('0x88')];_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x60')]=_0x3c8b86[_0xd3cf('0x60')][_0xd3cf('0x89')];break;case'connectel':_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x85')]=_0x3c8b86[_0xd3cf('0x60')][_0xd3cf('0x85')];_0xee0117[_0xd3cf('0x60')]['body']=_0x3c8b86[_0xd3cf('0x60')][_0xd3cf('0x28')];break;case _0xd3cf('0x8a'):_0xee0117[_0xd3cf('0x60')]['from']=_0x3c8b86[_0xd3cf('0x60')][_0xd3cf('0x85')];_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x60')]=_0x3c8b86['body']['body'];_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x8b')]=_0x3c8b86[_0xd3cf('0x60')][_0xd3cf('0x8c')];break;case _0xd3cf('0x8d'):_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x85')]=_0x3c8b86[_0xd3cf('0x60')][_0xd3cf('0x86')];_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x60')]=_0x3c8b86['body'][_0xd3cf('0x8e')];_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x8b')]=_0x3c8b86[_0xd3cf('0x60')]['MessageUUID'];break;case _0xd3cf('0x8f'):_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x85')]='+'+_0x3c8b86[_0xd3cf('0x60')][_0xd3cf('0x90')][0x0][_0xd3cf('0x85')];_0xee0117['body'][_0xd3cf('0x60')]=_0x3c8b86['body'][_0xd3cf('0x90')][0x0]['text'];_0xee0117[_0xd3cf('0x60')]['messageId']=_0x3c8b86[_0xd3cf('0x60')][_0xd3cf('0x90')][0x0][_0xd3cf('0x8b')];break;case'csc':_0xee0117[_0xd3cf('0x60')]['from']=_0x3c8b86[_0xd3cf('0x60')][_0xd3cf('0x91')];_0xee0117[_0xd3cf('0x60')]['body']=_0x3c8b86[_0xd3cf('0x60')][_0xd3cf('0x92')][_0xd3cf('0x28')];break;case _0xd3cf('0x93'):_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x85')]=_0x3c8b86[_0xd3cf('0x60')][_0xd3cf('0x94')];_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x60')]=_0x3c8b86['body'][_0xd3cf('0x89')];_0xee0117[_0xd3cf('0x60')]['messageId']=_0x3c8b86['body'][_0xd3cf('0x95')];break;case _0xd3cf('0x96'):_0xee0117[_0xd3cf('0x60')]['messageId']=_0x3c8b86['body'][0x0]['message']['id'];_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x85')]=_0x3c8b86[_0xd3cf('0x60')][0x0][_0xd3cf('0x28')]['from'];_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x60')]=_0x3c8b86['body'][0x0][_0xd3cf('0x28')][_0xd3cf('0x89')];break;case _0xd3cf('0x97'):_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x85')]=_0x3c8b86[_0xd3cf('0x60')]['from'];_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x60')]=_0x3c8b86['body'][_0xd3cf('0x28')];_0xee0117['body']['messageId']=_0x3c8b86[_0xd3cf('0x60')][_0xd3cf('0x98')];break;}}if(_0xee0117[_0xd3cf('0x60')]['id']){delete _0xee0117[_0xd3cf('0x60')]['id'];}if(_[_0xd3cf('0x99')](_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x85')])){throw new db['Sequelize']['ValidationError']('from\x20is\x20mandatory');}if(_[_0xd3cf('0x99')](_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x60')])||_0xee0117[_0xd3cf('0x60')]['body']===''){throw new db[(_0xd3cf('0x7b'))][(_0xd3cf('0x7c'))](_0xd3cf('0x9a'));}if(_[_0xd3cf('0x99')](_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x9b')])){throw new db[(_0xd3cf('0x7b'))][(_0xd3cf('0x7c'))](_0xd3cf('0x9c')+_0x475bfc);}if(!_[_0xd3cf('0x9d')](_0x475bfc,_0xee0117[_0xd3cf('0x60')]['mapKey'])){throw new db[(_0xd3cf('0x7b'))]['ValidationError']('mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x475bfc);}_0x30ebc3[_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x9b')]]=_0xee0117['body'][_0xd3cf('0x85')];return db[_0xd3cf('0x9e')][_0xd3cf('0x5e')]({'where':{'id':_0xee0117['account'][_0xd3cf('0x82')]},'include':[{'model':db['CmContact'],'as':_0xd3cf('0x9f'),'where':_0x30ebc3,'limit':0x1,'order':[[_0xd3cf('0x80'),_0xd3cf('0xa0')]]}]});})[_0xd3cf('0x37')](handleEntityNotFound(_0x3a723a,null))[_0xd3cf('0x37')](function(_0x57ffcd){if(_0x57ffcd){_0xee0117['list']=_[_0xd3cf('0xa1')](_0x57ffcd,[_0xd3cf('0x9f')]);if(_0x57ffcd[_0xd3cf('0x9f')][_0xd3cf('0x4e')]){return _0x57ffcd[_0xd3cf('0x9f')][0x0];}var _0x199096=_['defaults'](_0xee0117[_0xd3cf('0x60')],{'firstName':_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x85')],'ListId':_0x57ffcd['id']});_0x199096[_0xee0117['body'][_0xd3cf('0x9b')]]=_0xee0117['body'][_0xd3cf('0x85')];return db[_0xd3cf('0x7a')][_0xd3cf('0x5f')](_0x199096,{'fields':_0xcff9fe,'raw':!![]});}})[_0xd3cf('0x37')](handleEntityNotFound(_0x3a723a,null))[_0xd3cf('0x37')](function(_0x9d509f){if(_0x9d509f){_0xee0117[_0xd3cf('0xa2')]=_0x9d509f;var _0xd3b0cf={'ContactId':_0x9d509f['id'],'phone':_0xee0117['body'][_0xd3cf('0x85')],'SmsAccountId':_0x3c8b86[_0xd3cf('0x67')]['id']};var _0x57f776={'ContactId':_0x9d509f['id'],'SmsAccountId':_0x3c8b86[_0xd3cf('0x67')]['id'],'closed':![]};return db[_0xd3cf('0xa3')]['find']({'where':_0x57f776})['then'](function(_0x3faf91){if(_0x3faf91){return[_0x3faf91,![]];}return db['SmsInteraction']['create'](_0xd3b0cf)['then'](function(_0x142848){return[_0x142848,!![]];});});}})[_0xd3cf('0xa4')](function(_0x9e3986,_0x2e36fb){_0xee0117[_0xd3cf('0xa5')]=_0x9e3986[_0xd3cf('0x39')]({'plain':!![]});_0xee0117['interaction'][_0xd3cf('0xa6')]=![];if(_0x2e36fb){if(_0xee0117[_0xd3cf('0x79')][_0xd3cf('0xa7')]){_0xee0117[_0xd3cf('0xa8')][_0xd3cf('0xa9')]({'id':0x0,'priority':_0xee0117[_0xd3cf('0xa8')][_0xd3cf('0x4e')]+0x1,'app':_0xd3cf('0xaa'),'appdata':_0xd3cf('0xab'),'interval':_0xd3cf('0xac')});}_0xee0117[_0xd3cf('0xa5')][_0xd3cf('0xa6')]=!![];}return db[_0xd3cf('0xad')][_0xd3cf('0x5f')]({'phone':_0xee0117[_0xd3cf('0x60')]['from'],'messageId':_0xee0117[_0xd3cf('0x60')][_0xd3cf('0x8b')],'body':_0xee0117['body']['body'],'SmsAccountId':_0x3c8b86['params']['id'],'SmsInteractionId':_0x9e3986['id'],'direction':'in','ContactId':_0x9e3986[_0xd3cf('0xae')],'AttachmentId':_0xee0117[_0xd3cf('0x60')][_0xd3cf('0xaf')]});})[_0xd3cf('0x37')](function(_0x2cc64e){_0xee0117[_0xd3cf('0x28')]=_0x2cc64e;if(!_0xee0117['interaction'][_0xd3cf('0xb0')])return;return db[_0xd3cf('0xb1')][_0xd3cf('0x5e')]({'attributes':['id',_0xd3cf('0x3d')],'where':{'id':_0xee0117[_0xd3cf('0xa5')][_0xd3cf('0xb0')]}});})['then'](function(_0x5eef62){if(_0x5eef62){_0xee0117[_0xd3cf('0xa8')][_0xd3cf('0xb2')]({'id':0x0,'priority':0x0,'app':_0xd3cf('0xb3'),'appdata':_0x5eef62[_0xd3cf('0x3d')]+','+(_0xee0117['account'][_0xd3cf('0xb4')]||0xa),'interval':_0xd3cf('0xac')});}if(!_0xee0117[_0xd3cf('0xa5')][_0xd3cf('0xb5')])return;return db[_0xd3cf('0xb6')][_0xd3cf('0x5e')]({'attributes':['id',_0xd3cf('0x3d')],'where':{'id':_0xee0117[_0xd3cf('0xa5')]['queueId']}});})[_0xd3cf('0x37')](function(_0x3961e6){if(_0x3961e6){_0xee0117[_0xd3cf('0xa8')][_0xd3cf('0xb2')]({'id':0x0,'priority':0x1,'app':'queue','appdata':_0x3961e6[_0xd3cf('0x3d')]+','+(_0xee0117['account'][_0xd3cf('0xb7')]||0x12c),'interval':'*,*,*,*'});}return respondWithRpcPromise(_0xd3cf('0xb8'),_0xd3cf('0xb9'),_0xee0117);})['then'](function(_0x1361ac){if(_0x1361ac){var _0xdca611=0xc8;var _0x40a4ab=_0xd3cf('0xba');logger[_0xd3cf('0x20')](_0xd3cf('0x24'),_0x40a4ab,_0xdca611,'entity\x20found');logger['debug'](_0xd3cf('0xbb'),_0x40a4ab,_0xdca611,'entity\x20found',JSON[_0xd3cf('0x25')](_0x1361ac));if(_0xee0117[_0xd3cf('0x79')]['type']===_0xd3cf('0x84')){return _0x3a723a['status'](_0xdca611)[_0xd3cf('0x31')]('Content-Type',_0xd3cf('0xbc'))[_0xd3cf('0xbd')](_0xd3cf('0xbe'));}else{return _0x3a723a['status'](_0xdca611)[_0xd3cf('0x33')](_0x1361ac);}}})[_0xd3cf('0x5c')](handleError(_0x3a723a,null));};exports[_0xd3cf('0xbf')]=function(_0x4af58a,_0x2e8fa2){var _0x33751a=_0x4af58a[_0xd3cf('0x67')]['id'];var _0x2e9f71=_0x4af58a['body'];var _0x50b560=0xc8;var _0x44879a=null;return db[_0xd3cf('0xc0')]['transaction']({'isolationLevel':db[_0xd3cf('0xc0')]['Transaction']['ISOLATION_LEVELS'][_0xd3cf('0xc1')]},function(_0x1a2a84){return db[_0xd3cf('0x41')][_0xd3cf('0x6a')]({'where':{'id':_0x33751a},'transaction':_0x1a2a84})[_0xd3cf('0x37')](function(_0x405d87){if(_0x405d87){return db['SmsApplication']['destroy']({'where':{'SmsAccountId':_0x33751a},'transaction':_0x1a2a84})['then'](function(){var _0x57fd6a=_['map'](_0x2e9f71,function(_0x4467fa){_0x4467fa['SmsAccountId']=_0x33751a;return _0x4467fa;});return db[_0xd3cf('0x74')]['bulkCreate'](_0x57fd6a,{'transaction':_0x1a2a84});});}else{_0x50b560=0x194;_0x44879a=[];}});})[_0xd3cf('0x37')](function(){if(_0x50b560!==0x194){return db['SmsApplication'][_0xd3cf('0xc2')]({'where':{'SmsAccountId':_0x33751a},'order':_0xd3cf('0x77')})[_0xd3cf('0x37')](function(_0x588ce6){_0x44879a=_0x588ce6;});}})[_0xd3cf('0x5c')](function(_0x1e8c66){_0x50b560=0x1f4;logger[_0xd3cf('0x26')](_0x1e8c66[_0xd3cf('0x3c')]);if(_0x1e8c66[_0xd3cf('0x3d')]){delete _0x1e8c66['name'];}_0x44879a=_0x1e8c66;})[_0xd3cf('0xc3')](function(){if(_0x44879a===null){_0x2e8fa2[_0xd3cf('0x2a')](_0x50b560);}else{if(_0x50b560===0x1f4){_0x2e8fa2[_0xd3cf('0x2b')](_0x50b560)[_0xd3cf('0xbd')](_0x44879a);}else{_0x2e8fa2[_0xd3cf('0x2b')](_0x50b560)[_0xd3cf('0x33')](_0x44879a);}}});};exports['getApplications']=function(_0x5217c7,_0x52a48b,_0x37761e){var _0xdf63b9={};var _0x31145a={};var _0x5ddbe5;var _0x54013b;return db[_0xd3cf('0x41')][_0xd3cf('0x6a')]({'where':{'id':_0x5217c7[_0xd3cf('0x67')]['id']}})[_0xd3cf('0x37')](handleEntityNotFound(_0x52a48b,null))[_0xd3cf('0x37')](function(_0x3da099){if(_0x3da099){_0x5ddbe5=_0x3da099;_0x31145a['model']=_[_0xd3cf('0x49')](db[_0xd3cf('0x74')][_0xd3cf('0x42')]);_0x31145a[_0xd3cf('0x48')]=_[_0xd3cf('0x49')](_0x5217c7[_0xd3cf('0x48')]);_0x31145a[_0xd3cf('0x4a')]=_['intersection'](_0x31145a[_0xd3cf('0x46')],_0x31145a['query']);_0xdf63b9['attributes']=_[_0xd3cf('0x4b')](_0x31145a['model'],qs['fields'](_0x5217c7[_0xd3cf('0x48')][_0xd3cf('0x4d')]));_0xdf63b9['attributes']=_0xdf63b9[_0xd3cf('0x4c')][_0xd3cf('0x4e')]?_0xdf63b9[_0xd3cf('0x4c')]:_0x31145a[_0xd3cf('0x46')];_0xdf63b9[_0xd3cf('0x51')]=qs[_0xd3cf('0x52')](_0x5217c7['query'][_0xd3cf('0x52')]);_0xdf63b9[_0xd3cf('0x53')]=qs[_0xd3cf('0x4a')](_[_0xd3cf('0x54')](_0x5217c7[_0xd3cf('0x48')],_0x31145a[_0xd3cf('0x4a')]));if(_0x5217c7[_0xd3cf('0x48')]['filter']){_0xdf63b9[_0xd3cf('0x53')]=_[_0xd3cf('0x57')](_0xdf63b9[_0xd3cf('0x53')],{'$or':_['map'](_0xdf63b9[_0xd3cf('0x4c')],function(_0x394731){var _0x17dfc8={};_0x17dfc8[_0x394731]={'$like':'%'+_0x5217c7[_0xd3cf('0x48')][_0xd3cf('0x56')]+'%'};return _0x17dfc8;})});}_0xdf63b9=_[_0xd3cf('0x57')]({},_0xdf63b9,_0x5217c7[_0xd3cf('0x58')]);return _0x5ddbe5['getApplications'](_0xdf63b9);}})[_0xd3cf('0x37')](function(_0x3e2d29){if(_0x3e2d29){_0x54013b=_0x3e2d29[_0xd3cf('0x4e')];if(!_0x5217c7[_0xd3cf('0x48')][_0xd3cf('0x4f')](_0xd3cf('0x50'))){_0xdf63b9[_0xd3cf('0x2e')]=qs['limit'](_0x5217c7[_0xd3cf('0x48')]['limit']);_0xdf63b9[_0xd3cf('0x2f')]=qs[_0xd3cf('0x2f')](_0x5217c7[_0xd3cf('0x48')]['offset']);}return _0x5ddbe5['getApplications'](_0xdf63b9);}})[_0xd3cf('0x37')](function(_0x594e1c){if(_0x594e1c){return _0x594e1c?{'count':_0x54013b,'rows':_0x594e1c}:null;}})[_0xd3cf('0x37')](respondWithResult(_0x52a48b,null))[_0xd3cf('0x5c')](handleError(_0x52a48b,null));};exports[_0xd3cf('0xc4')]=function(_0x39823f,_0x3abd0c,_0x15f1d3){var _0x3204a7={'raw':![],'where':{}};var _0x21df3d={};var _0x868025={'count':0x0,'rows':[]};return db[_0xd3cf('0x41')][_0xd3cf('0x6a')]({'where':{'id':_0x39823f['params']['id']}})['then'](handleEntityNotFound(_0x3abd0c,null))[_0xd3cf('0x37')](function(_0xdfac5e){if(_0xdfac5e){_0x21df3d[_0xd3cf('0x46')]=_[_0xd3cf('0x49')](db[_0xd3cf('0xa3')][_0xd3cf('0x42')]);_0x21df3d[_0xd3cf('0x48')]=_[_0xd3cf('0x49')](_0x39823f['query']);_0x21df3d['filters']=_[_0xd3cf('0x4b')](_0x21df3d[_0xd3cf('0x46')],_0x21df3d[_0xd3cf('0x48')]);_0x3204a7[_0xd3cf('0x4c')]=_[_0xd3cf('0x4b')](_0x21df3d[_0xd3cf('0x46')],qs[_0xd3cf('0x4d')](_0x39823f['query'][_0xd3cf('0x4d')]));_0x3204a7[_0xd3cf('0x4c')]=_0x3204a7[_0xd3cf('0x4c')][_0xd3cf('0x4e')]?_0x3204a7[_0xd3cf('0x4c')]:_0x21df3d[_0xd3cf('0x46')];if(!_0x39823f[_0xd3cf('0x48')]['hasOwnProperty']('nolimit')){_0x3204a7[_0xd3cf('0x2e')]=qs[_0xd3cf('0x2e')](_0x39823f['query'][_0xd3cf('0x2e')]);_0x3204a7['offset']=qs[_0xd3cf('0x2f')](_0x39823f[_0xd3cf('0x48')][_0xd3cf('0x2f')]);}_0x3204a7[_0xd3cf('0x51')]=qs[_0xd3cf('0x52')](_0x39823f[_0xd3cf('0x48')][_0xd3cf('0x52')]);_0x3204a7[_0xd3cf('0x53')]=qs['filters'](_[_0xd3cf('0x54')](_0x39823f[_0xd3cf('0x48')],_0x21df3d[_0xd3cf('0x4a')]));_0x3204a7['where']['SmsAccountId']=_0xdfac5e['id'];if(_0x39823f['query']['filter']){_0x3204a7[_0xd3cf('0x53')]=_[_0xd3cf('0x57')](_0x3204a7[_0xd3cf('0x53')],{'$or':_[_0xd3cf('0x47')](_0x3204a7['attributes'],function(_0x26a791){var _0x311e9d={};_0x311e9d[_0x26a791]={'$like':'%'+_0x39823f['query'][_0xd3cf('0x56')]+'%'};return _0x311e9d;})});}_0x3204a7=_[_0xd3cf('0x57')]({},_0x3204a7,_0x39823f[_0xd3cf('0x58')]);return db['SmsInteraction'][_0xd3cf('0x30')]({'where':_0x3204a7[_0xd3cf('0x53')]})[_0xd3cf('0x37')](function(_0x46b17d){_0x868025[_0xd3cf('0x30')]=_0x46b17d;if(_0x39823f['query'][_0xd3cf('0x59')]){_0x3204a7[_0xd3cf('0x5a')]=[{'model':db['CmContact'],'as':'Contact','required':![]},{'model':db[_0xd3cf('0xb1')],'as':_0xd3cf('0xc5'),'attributes':[_0xd3cf('0x3d'),_0xd3cf('0xc6'),_0xd3cf('0xc7')],'required':![]},{'model':db[_0xd3cf('0xc8')],'as':_0xd3cf('0xc9'),'attributes':['id',_0xd3cf('0x3d'),'color'],'where':_0x39823f['query'][_0xd3cf('0xca')]?{'id':_0x39823f['query'][_0xd3cf('0xca')]}:undefined,'required':_0x39823f[_0xd3cf('0x48')]['tag']?!![]:![]}];}return db[_0xd3cf('0xa3')][_0xd3cf('0x5b')](_0x3204a7);})[_0xd3cf('0x37')](function(_0x4df387){_0x868025[_0xd3cf('0x6c')]=_0x4df387;return _0x868025;});}})[_0xd3cf('0x37')](respondWithFilteredResult(_0x3abd0c,_0x3204a7))[_0xd3cf('0x5c')](handleError(_0x3abd0c,null));};exports[_0xd3cf('0xbd')]=function(_0x17f343,_0x29a280,_0x5ea439){var _0x4628c8,_0x388a0c,_0x4b6b34;if(_[_0xd3cf('0x99')](_0x17f343[_0xd3cf('0x60')][_0xd3cf('0x60')])||_0x17f343['body'][_0xd3cf('0x60')]===''){throw new db['Sequelize'][(_0xd3cf('0x7c'))](_0xd3cf('0x9a'));}if(_[_0xd3cf('0x99')](_0x17f343['body']['to'])){throw new db['Sequelize'][(_0xd3cf('0x7c'))]('to\x20is\x20mandatory');}_0x4628c8=_0x17f343['body']['to'];return db[_0xd3cf('0x41')]['find']({'where':{'id':_0x17f343[_0xd3cf('0x67')]['id']},'include':[{'model':db[_0xd3cf('0x9e')],'as':_0xd3cf('0xcb'),'include':[{'model':db[_0xd3cf('0x7a')],'as':_0xd3cf('0x9f'),'where':{'mobile':_0x4628c8},'limit':0x1,'order':[[_0xd3cf('0x80'),_0xd3cf('0xa0')]]}]}]})[_0xd3cf('0x37')](handleEntityNotFound(_0x29a280,null))['then'](function(_0x36379c){if(_0x36379c&&_0x36379c[_0xd3cf('0xcb')]){_0x388a0c=_0x36379c[_0xd3cf('0x39')]({'plain':!![]});if(_0x388a0c[_0xd3cf('0xcb')]&&_0x388a0c[_0xd3cf('0xcb')][_0xd3cf('0x9f')][_0xd3cf('0x4e')]){return _0x388a0c[_0xd3cf('0xcb')][_0xd3cf('0x9f')][0x0];}return db[_0xd3cf('0x7a')][_0xd3cf('0x5f')](_[_0xd3cf('0x1b')](_0x17f343[_0xd3cf('0x60')],{'firstName':_0x4628c8,'mobile':_0x4628c8,'phone':_0x4628c8,'ListId':_0x388a0c[_0xd3cf('0x82')]}));}})[_0xd3cf('0x37')](handleEntityNotFound(_0x29a280,null))[_0xd3cf('0x37')](function(_0x1c5f9e){if(_0x1c5f9e){_0x4b6b34=_0x1c5f9e;return db[_0xd3cf('0xa3')][_0xd3cf('0x5e')]({'where':{'ContactId':_0x4b6b34['id'],'closed':![],'SmsAccountId':_0x388a0c['id']}})[_0xd3cf('0x37')](function(_0x135baa){if(_0x135baa){return[_0x135baa,![]];}return db['SmsInteraction'][_0xd3cf('0x5f')]({'UserId':_0x17f343[_0xd3cf('0x61')]['id'],'ContactId':_0x4b6b34['id'],'SmsAccountId':_0x388a0c['id'],'phone':_0x4628c8,'firstMsgDirection':_0xd3cf('0xcc'),'Messages':[_[_0xd3cf('0x57')](_0x17f343[_0xd3cf('0x60')],{'read':![],'body':_0x17f343[_0xd3cf('0x60')][_0xd3cf('0x60')],'phone':_0x4628c8,'SmsAccountId':_0x388a0c['id'],'UserId':_0x17f343['user']['id'],'ContactId':_0x4b6b34['id']})]},{'include':[{'model':db[_0xd3cf('0xad')],'as':_0xd3cf('0xcd')}]})['then'](function(_0x405d20){return[_0x405d20,!![]];});});}})[_0xd3cf('0xa4')](function(_0x21d433,_0x51be06){if(_0x51be06){return _0x21d433;}return db[_0xd3cf('0xad')]['create'](_[_0xd3cf('0x57')](_0x17f343['body'],{'read':![],'body':_0x17f343[_0xd3cf('0x60')][_0xd3cf('0x60')],'phone':_0x4628c8,'SmsAccountId':_0x388a0c['id'],'SmsInteractionId':_0x21d433['id'],'UserId':_0x17f343[_0xd3cf('0x61')]['id'],'ContactId':_0x4b6b34['id']}))[_0xd3cf('0x37')](function(_0x28b594){_0x21d433[_0xd3cf('0xce')][_0xd3cf('0xcd')]=[];_0x21d433[_0xd3cf('0xce')][_0xd3cf('0xcd')][_0xd3cf('0xa9')](_0x28b594[_0xd3cf('0xce')]);return _0x21d433;});})[_0xd3cf('0x37')](respondWithResult(_0x29a280,null))['catch'](handleError(_0x29a280,null));};exports[_0xd3cf('0x2b')]=function(_0x527a1d,_0x1b8185,_0x2b8ebe){if(_0x527a1d[_0xd3cf('0x60')]['id']){delete _0x527a1d['body']['id'];}var _0x245c5e,_0x467fa7,_0x4ed827;return db['SmsAccount'][_0xd3cf('0x5e')]({'where':{'id':_0x527a1d[_0xd3cf('0x67')]['id']}})['then'](handleEntityNotFound(_0x1b8185,null))['then'](function(_0x1122bf){if(_0x1122bf){_0x4ed827=_0x1122bf;logger[_0xd3cf('0x23')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0xd3cf('0x2b'),_0xd3cf('0xcf'),_0x1122bf['type'],util['inspect'](_0x527a1d[_0xd3cf('0x60')],{'showHidden':![],'depth':null}));switch(_0x1122bf[_0xd3cf('0x44')]){case _0xd3cf('0x87'):if(_0x527a1d[_0xd3cf('0x60')][_0xd3cf('0xd0')]&&_0x527a1d[_0xd3cf('0x60')]['status']){_0x467fa7=_0x527a1d[_0xd3cf('0x60')][_0xd3cf('0x2b')];return db['SmsMessage'][_0xd3cf('0x5e')]({'where':{'messageId':_0x527a1d[_0xd3cf('0x60')][_0xd3cf('0xd0')]}});}break;case _0xd3cf('0xd1'):if(_0x527a1d['body'][_0xd3cf('0xd2')]&&_0x527a1d[_0xd3cf('0x60')]['statusInt']){_0x467fa7=_0x527a1d['body']['statusInt'];return db[_0xd3cf('0xad')]['find']({'where':{'messageId':_0x527a1d[_0xd3cf('0x60')][_0xd3cf('0xd2')]}});}break;case'clicksend':if(_0x527a1d[_0xd3cf('0x60')]['message_id']&&_0x527a1d[_0xd3cf('0x60')][_0xd3cf('0xd3')]){_0x467fa7=_0x527a1d['body'][_0xd3cf('0xd3')];return db[_0xd3cf('0xad')][_0xd3cf('0x5e')]({'where':{'messageId':_0x527a1d[_0xd3cf('0x60')][_0xd3cf('0x8c')]}});}break;case _0xd3cf('0x8f'):var _0x332d2c=_0x527a1d[_0xd3cf('0x60')][_0xd3cf('0x90')][0x0];if(_0x332d2c['messageId']&&_0x332d2c['status'][_0xd3cf('0xd4')]===_0xd3cf('0xd5')){_0x467fa7=_0x332d2c[_0xd3cf('0x2b')]['groupName'];return db[_0xd3cf('0xad')][_0xd3cf('0x5e')]({'where':{'messageId':_0x332d2c['messageId']}});}break;case _0xd3cf('0x93'):if(_0x527a1d[_0xd3cf('0x60')]['messageId']&&_0x527a1d[_0xd3cf('0x60')]['status']){_0x467fa7=_0x527a1d['body'][_0xd3cf('0x2b')];return db[_0xd3cf('0xad')][_0xd3cf('0x5e')]({'where':{'messageId':_0x527a1d[_0xd3cf('0x60')]['messageId']}});}break;case'bandwidth':if(_0x527a1d[_0xd3cf('0x60')][0x0]['message']['id']){_0x467fa7=_0x527a1d[_0xd3cf('0x60')][0x0][_0xd3cf('0x44')];return db['SmsMessage'][_0xd3cf('0x5e')]({'where':{'messageId':_0x527a1d[_0xd3cf('0x60')][0x0][_0xd3cf('0x28')]['id']}});}break;case'intelepeer':if(_0x527a1d[_0xd3cf('0x60')][_0xd3cf('0xd6')]&&_0x527a1d['body'][_0xd3cf('0x2b')]){_0x467fa7=_0x527a1d[_0xd3cf('0x60')]['status'];return db['SmsMessage'][_0xd3cf('0x5e')]({'where':{'messageId':_0x527a1d[_0xd3cf('0x60')][_0xd3cf('0xd6')]}});}break;}}})['then'](handleEntityNotFound(_0x1b8185,null))['then'](function(_0x3c4b86){if(_0x3c4b86){_0x245c5e=_0x3c4b86;switch(_0x4ed827[_0xd3cf('0x44')]){case _0xd3cf('0x87'):if(_0x467fa7===_0xd3cf('0xd5')){return _0x245c5e[_0xd3cf('0x36')]({'read':!![]});}else{logger[_0xd3cf('0x26')](_0xd3cf('0x24'),_0xd3cf('0x2b'),_0xd3cf('0x87'),util[_0xd3cf('0xd7')](_0x527a1d[_0xd3cf('0x60')],{'showHidden':![],'depth':null}));}break;case _0xd3cf('0xd1'):if(_0x467fa7==='1'){return _0x245c5e[_0xd3cf('0x36')]({'read':!![]});}else{logger[_0xd3cf('0x26')](_0xd3cf('0x24'),'status',_0xd3cf('0x87'),util[_0xd3cf('0xd7')](_0x527a1d['body'],{'showHidden':![],'depth':null}));}break;case _0xd3cf('0x8a'):if(!_0x527a1d[_0xd3cf('0x60')][_0xd3cf('0xd8')]&&_0x467fa7>=0xc8&&_0x467fa7<=0xce){return _0x245c5e[_0xd3cf('0x36')]({'read':!![]});}else{logger['error']('SmsAccount,\x20%s,\x20%s,\x20%s',_0xd3cf('0x2b'),_0xd3cf('0x8a'),util['inspect'](_0x527a1d[_0xd3cf('0x60')],{'showHidden':![],'depth':null}));}break;case _0xd3cf('0x8f'):var _0x50fce1=_0x527a1d[_0xd3cf('0x60')][_0xd3cf('0x90')][0x0];if(_0x50fce1[_0xd3cf('0x2b')][_0xd3cf('0xd4')]===_0xd3cf('0xd5')){return _0x245c5e[_0xd3cf('0x36')]({'read':!![]});}else{logger[_0xd3cf('0x26')](_0xd3cf('0x24'),_0xd3cf('0x2b'),_0xd3cf('0x8f'),util[_0xd3cf('0xd7')](_0x527a1d['body'],{'showHidden':![],'depth':null}));}break;case _0xd3cf('0x93'):if(_0x467fa7=='DELIVERED_TO_GATEWAY'||_0x467fa7==_0xd3cf('0xd9')){return _0x245c5e[_0xd3cf('0x36')]({'read':!![]});}else{logger['error'](_0xd3cf('0x24'),'status',_0xd3cf('0x93'),util['inspect'](_0x527a1d['body'],{'showHidden':![],'depth':null}));}break;case _0xd3cf('0x96'):if(_0x467fa7==_0xd3cf('0xda')){return _0x245c5e[_0xd3cf('0x36')]({'read':!![]});}else{logger[_0xd3cf('0x26')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0xd3cf('0x2b'),_0xd3cf('0x96'),util[_0xd3cf('0xd7')](_0x527a1d[_0xd3cf('0x60')],{'showHidden':![],'depth':null}));}break;case _0xd3cf('0x97'):if(_0x467fa7===_0xd3cf('0xdb')||_0x467fa7===_0xd3cf('0xdc')){return _0x245c5e[_0xd3cf('0x36')]({'read':!![]});}else{logger[_0xd3cf('0x26')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0xd3cf('0x2b'),_0xd3cf('0x97'),util['inspect'](_0x527a1d[_0xd3cf('0x60')],{'showHidden':![],'depth':null}));}break;}return _0x245c5e;}})[_0xd3cf('0x37')](respondWithResult(_0x1b8185,null))[_0xd3cf('0x5c')](handleError(_0x1b8185,null));};exports[_0xd3cf('0xdd')]=function(_0x5be0fa,_0x15d4e6,_0x34d3e5){var _0x1c9c85,_0x48a553,_0x404349;return db[_0xd3cf('0x41')][_0xd3cf('0x5e')]({'where':{'id':_0x5be0fa[_0xd3cf('0x67')]['id']}})[_0xd3cf('0x37')](handleEntityNotFound(_0x15d4e6,null))['then'](function(_0x233424){if(_0x233424){_0x404349=_0x233424;logger['debug'](_0xd3cf('0x24'),_0xd3cf('0x2b'),'received\x20delivery\x20report\x20from',_0x233424['type'],util['inspect'](_0x5be0fa['query'],{'showHidden':![],'depth':null}));switch(_0x233424[_0xd3cf('0x44')]){case _0xd3cf('0xde'):if(_0x5be0fa[_0xd3cf('0x48')]['message-id']&&_0x5be0fa[_0xd3cf('0x48')][_0xd3cf('0xdf')]){_0x48a553=_0x5be0fa[_0xd3cf('0x48')]['state'];return db['SmsMessage'][_0xd3cf('0x5e')]({'where':{'messageId':_0x5be0fa[_0xd3cf('0x48')]['message-id']}});}break;}}})['then'](handleEntityNotFound(_0x15d4e6,null))[_0xd3cf('0x37')](function(_0x5ef002){if(_0x5ef002){_0x1c9c85=_0x5ef002;switch(_0x404349['type']){case _0xd3cf('0xde'):if(_0x48a553==='2'||_0x48a553==='6'){return _0x1c9c85[_0xd3cf('0x36')]({'read':!![]});}else{logger['error'](_0xd3cf('0x24'),_0xd3cf('0x2b'),_0xd3cf('0xde'),util[_0xd3cf('0xd7')](_0x5be0fa[_0xd3cf('0x48')],{'showHidden':![],'depth':null}));};break;}return _0x1c9c85;}})['then'](respondWithResult(_0x15d4e6,null))[_0xd3cf('0x5c')](handleError(_0x15d4e6,null));};exports['addAgents']=function(_0x3fbe45,_0x30eddb,_0xec9f7){return db[_0xd3cf('0x41')][_0xd3cf('0x5e')]({'where':{'id':_0x3fbe45[_0xd3cf('0x67')]['id']}})['then'](handleEntityNotFound(_0x30eddb,null))[_0xd3cf('0x37')](function(_0x1f6841){if(_0x1f6841){return _0x1f6841['addAgents'](_0x3fbe45[_0xd3cf('0x60')][_0xd3cf('0x6e')],_[_0xd3cf('0xa1')](_0x3fbe45[_0xd3cf('0x60')],[_0xd3cf('0x6e'),'id'])||{})[_0xd3cf('0xa4')](function(_0x42a441){for(var _0x4c7605=0x0;_0x4c7605<_0x3fbe45[_0xd3cf('0x60')][_0xd3cf('0x6e')][_0xd3cf('0x4e')];_0x4c7605+=0x1){socket[_0xd3cf('0xe0')](_0xd3cf('0xe1'),{'UserId':Number(_0x3fbe45['body']['ids'][_0x4c7605]),'SmsAccountId':Number(_0x3fbe45['params']['id'])});}return _0x42a441;});}})['then'](respondWithResult(_0x30eddb,null))[_0xd3cf('0x5c')](handleError(_0x30eddb,null));};exports[_0xd3cf('0xe2')]=function(_0xc64375,_0x553b14,_0x4ca58a){return db[_0xd3cf('0x41')][_0xd3cf('0x5e')]({'where':{'id':_0xc64375['params']['id']}})[_0xd3cf('0x37')](handleEntityNotFound(_0x553b14,null))[_0xd3cf('0x37')](function(_0x4ac2c8){if(_0x4ac2c8){return _0x4ac2c8[_0xd3cf('0xe2')](_0xc64375[_0xd3cf('0x48')][_0xd3cf('0x6e')])['then'](function(){if(_[_0xd3cf('0xe3')](_0xc64375[_0xd3cf('0x48')][_0xd3cf('0x6e')])){for(var _0xf67adf=0x0;_0xf67adf<_0xc64375[_0xd3cf('0x48')]['ids'][_0xd3cf('0x4e')];_0xf67adf+=0x1){socket['emit'](_0xd3cf('0xe4'),{'UserId':Number(_0xc64375[_0xd3cf('0x48')]['ids'][_0xf67adf]),'SmsAccountId':Number(_0xc64375[_0xd3cf('0x67')]['id'])});}}else{socket[_0xd3cf('0xe0')](_0xd3cf('0xe4'),{'UserId':Number(_0xc64375['query'][_0xd3cf('0x6e')]),'SmsAccountId':Number(_0xc64375[_0xd3cf('0x67')]['id'])});}});}})[_0xd3cf('0x37')](respondWithStatusCode(_0x553b14,null))[_0xd3cf('0x5c')](handleError(_0x553b14,null));};exports[_0xd3cf('0xe5')]=function(_0x451f40,_0x3cb449,_0x4003a6){var _0x289b7b={};var _0x44d432={};var _0x3043ed;var _0x6a4c4d;return db[_0xd3cf('0x41')][_0xd3cf('0x6a')]({'where':{'id':_0x451f40[_0xd3cf('0x67')]['id']}})[_0xd3cf('0x37')](handleEntityNotFound(_0x3cb449,null))['then'](function(_0x515725){if(_0x515725){_0x3043ed=_0x515725;_0x44d432[_0xd3cf('0x46')]=_[_0xd3cf('0x49')](db[_0xd3cf('0xb1')][_0xd3cf('0x42')]);_0x44d432[_0xd3cf('0x48')]=_[_0xd3cf('0x49')](_0x451f40[_0xd3cf('0x48')]);_0x44d432[_0xd3cf('0x4a')]=_['intersection'](_0x44d432['model'],_0x44d432[_0xd3cf('0x48')]);_0x289b7b[_0xd3cf('0x4c')]=_[_0xd3cf('0x4b')](_0x44d432[_0xd3cf('0x46')],qs[_0xd3cf('0x4d')](_0x451f40['query']['fields']));_0x289b7b[_0xd3cf('0x4c')]=_0x289b7b[_0xd3cf('0x4c')][_0xd3cf('0x4e')]?_0x289b7b[_0xd3cf('0x4c')]:_0x44d432['model'];_0x289b7b['order']=qs[_0xd3cf('0x52')](_0x451f40['query'][_0xd3cf('0x52')]);_0x289b7b[_0xd3cf('0x53')]=qs[_0xd3cf('0x4a')](_[_0xd3cf('0x54')](_0x451f40[_0xd3cf('0x48')],_0x44d432[_0xd3cf('0x4a')]));if(_0x451f40[_0xd3cf('0x48')][_0xd3cf('0x56')]){_0x289b7b[_0xd3cf('0x53')]=_[_0xd3cf('0x57')](_0x289b7b[_0xd3cf('0x53')],{'$or':_[_0xd3cf('0x47')](_0x289b7b['attributes'],function(_0x9493e9){var _0x5726fb={};_0x5726fb[_0x9493e9]={'$like':'%'+_0x451f40['query'][_0xd3cf('0x56')]+'%'};return _0x5726fb;})});}_0x289b7b=_[_0xd3cf('0x57')]({},_0x289b7b,_0x451f40[_0xd3cf('0x58')]);return _0x3043ed[_0xd3cf('0xe5')](_0x289b7b);}})['then'](function(_0x224b77){if(_0x224b77){_0x6a4c4d=_0x224b77[_0xd3cf('0x4e')];if(!_0x451f40['query']['hasOwnProperty'](_0xd3cf('0x50'))){_0x289b7b[_0xd3cf('0x2e')]=qs[_0xd3cf('0x2e')](_0x451f40['query'][_0xd3cf('0x2e')]);_0x289b7b['offset']=qs[_0xd3cf('0x2f')](_0x451f40[_0xd3cf('0x48')][_0xd3cf('0x2f')]);}return _0x3043ed[_0xd3cf('0xe5')](_0x289b7b);}})['then'](function(_0x2a9273){if(_0x2a9273){return _0x2a9273?{'count':_0x6a4c4d,'rows':_0x2a9273}:null;}})[_0xd3cf('0x37')](respondWithResult(_0x3cb449,null))[_0xd3cf('0x5c')](handleError(_0x3cb449,null));};
\ No newline at end of file
index 56e6332..6f3e37b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe926=['hook','exports','events','../../mysqldb','SmsAccount','setMaxListeners','update','remove','emit','hasOwnProperty'];(function(_0x37672b,_0x372b6f){var _0xc022b2=function(_0x1175fc){while(--_0x1175fc){_0x37672b['push'](_0x37672b['shift']());}};_0xc022b2(++_0x372b6f);}(_0xe926,0x16a));var _0x6e92=function(_0x32cf96,_0x7502d5){_0x32cf96=_0x32cf96-0x0;var _0x125cc1=_0xe926[_0x32cf96];return _0x125cc1;};'use strict';var EventEmitter=require(_0x6e92('0x0'));var SmsAccount=require(_0x6e92('0x1'))['db'][_0x6e92('0x2')];var SmsAccountEvents=new EventEmitter();SmsAccountEvents[_0x6e92('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x6e92('0x4'),'afterDestroy':_0x6e92('0x5')};function emitEvent(_0x51de1b){return function(_0x5380a9,_0x14080e,_0x584806){SmsAccountEvents[_0x6e92('0x6')](_0x51de1b+':'+_0x5380a9['id'],_0x5380a9);SmsAccountEvents['emit'](_0x51de1b,_0x5380a9);_0x584806(null);};}for(var e in events){if(events[_0x6e92('0x7')](e)){var event=events[e];SmsAccount[_0x6e92('0x8')](e,emitEvent(event));}}module[_0x6e92('0x9')]=SmsAccountEvents;
\ No newline at end of file
+var _0x589c=['update','emit','hasOwnProperty','hook','exports','events','../../mysqldb','SmsAccount','save'];(function(_0x13b088,_0x4d981b){var _0x1e9229=function(_0x41f446){while(--_0x41f446){_0x13b088['push'](_0x13b088['shift']());}};_0x1e9229(++_0x4d981b);}(_0x589c,0x149));var _0xc589=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x589c[_0xa464c9];return _0x3d73c4;};'use strict';var EventEmitter=require(_0xc589('0x0'));var SmsAccount=require(_0xc589('0x1'))['db'][_0xc589('0x2')];var SmsAccountEvents=new EventEmitter();SmsAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xc589('0x3'),'afterUpdate':_0xc589('0x4'),'afterDestroy':'remove'};function emitEvent(_0xc3dda8){return function(_0x77fbd2,_0x5d44ca,_0x4af8c5){SmsAccountEvents[_0xc589('0x5')](_0xc3dda8+':'+_0x77fbd2['id'],_0x77fbd2);SmsAccountEvents[_0xc589('0x5')](_0xc3dda8,_0x77fbd2);_0x4af8c5(null);};}for(var e in events){if(events[_0xc589('0x6')](e)){var event=events[e];SmsAccount[_0xc589('0x7')](e,emitEvent(event));}}module[_0xc589('0x8')]=SmsAccountEvents;
\ No newline at end of file
index 149e5b1..d585057 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xacb4=['lodash','util','api','moment','request-promise','path','rimraf','../../config/environment','./smsAccount.attributes','exports','sms_accounts'];(function(_0x31939f,_0x41f91f){var _0x362cb9=function(_0xec91d9){while(--_0xec91d9){_0x31939f['push'](_0x31939f['shift']());}};_0x362cb9(++_0x41f91f);}(_0xacb4,0xfd));var _0x4acb=function(_0x587dd0,_0x273922){_0x587dd0=_0x587dd0-0x0;var _0x56f153=_0xacb4[_0x587dd0];return _0x56f153;};'use strict';var _=require(_0x4acb('0x0'));var util=require(_0x4acb('0x1'));var logger=require('../../config/logger')(_0x4acb('0x2'));var moment=require(_0x4acb('0x3'));var BPromise=require('bluebird');var rp=require(_0x4acb('0x4'));var fs=require('fs');var path=require(_0x4acb('0x5'));var rimraf=require(_0x4acb('0x6'));var config=require(_0x4acb('0x7'));var attributes=require(_0x4acb('0x8'));module[_0x4acb('0x9')]=function(_0x4279a0,_0x2fee55){return _0x4279a0['define']('SmsAccount',attributes,{'tableName':_0x4acb('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xbcdd=['moment','bluebird','path','../../config/environment','./smsAccount.attributes','exports','SmsAccount','../../config/logger','api'];(function(_0x2b722a,_0x296059){var _0x3259e1=function(_0x1f6ce2){while(--_0x1f6ce2){_0x2b722a['push'](_0x2b722a['shift']());}};_0x3259e1(++_0x296059);}(_0xbcdd,0x142));var _0xdbcd=function(_0x27c068,_0x342981){_0x27c068=_0x27c068-0x0;var _0xe5a67f=_0xbcdd[_0x27c068];return _0xe5a67f;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xdbcd('0x0'))(_0xdbcd('0x1'));var moment=require(_0xdbcd('0x2'));var BPromise=require(_0xdbcd('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xdbcd('0x4'));var rimraf=require('rimraf');var config=require(_0xdbcd('0x5'));var attributes=require(_0xdbcd('0x6'));module[_0xdbcd('0x7')]=function(_0x1e4715,_0x16db5c){return _0x1e4715['define'](_0xdbcd('0x8'),attributes,{'tableName':'sms_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index c1e7576..ad57438 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0d5b=['map','model','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','redis','localhost','socket.io-emitter','register','request','then','info','SmsAccount,\x20%s,\x20%s','request\x20sent','debug','SmsAccount,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','ShowSmsAccount','SmsAccount','find','options','raw','where','attributes','include'];(function(_0x288f5e,_0x205edd){var _0x476cc9=function(_0x796f53){while(--_0x796f53){_0x288f5e['push'](_0x288f5e['shift']());}};_0x476cc9(++_0x205edd);}(_0x0d5b,0x1d6));var _0xb0d5=function(_0x24f31b,_0x44b8f3){_0x24f31b=_0x24f31b-0x0;var _0x488401=_0x0d5b[_0x24f31b];return _0x488401;};'use strict';var _=require('lodash');var util=require(_0xb0d5('0x0'));var moment=require('moment');var BPromise=require(_0xb0d5('0x1'));var rs=require(_0xb0d5('0x2'));var fs=require('fs');var Redis=require(_0xb0d5('0x3'));var db=require(_0xb0d5('0x4'))['db'];var utils=require(_0xb0d5('0x5'));var logger=require('../../config/logger')(_0xb0d5('0x6'));var config=require(_0xb0d5('0x7'));var jayson=require(_0xb0d5('0x8'));var client=jayson['client'][_0xb0d5('0x9')]({'port':0x232a});config[_0xb0d5('0xa')]=_['defaults'](config['redis'],{'host':_0xb0d5('0xb'),'port':0x18eb});var socket=require(_0xb0d5('0xc'))(new Redis(config[_0xb0d5('0xa')]));require('./smsAccount.socket')[_0xb0d5('0xd')](socket);function respondWithRpcPromise(_0x41da25,_0x40c9d8,_0x3e4a2c){return new BPromise(function(_0x182cec,_0x2529c9){return client[_0xb0d5('0xe')](_0x41da25,_0x3e4a2c)[_0xb0d5('0xf')](function(_0x54b90f){logger[_0xb0d5('0x10')](_0xb0d5('0x11'),_0x40c9d8,_0xb0d5('0x12'));logger[_0xb0d5('0x13')](_0xb0d5('0x14'),_0x40c9d8,'request\x20sent',JSON['stringify'](_0x54b90f));if(_0x54b90f[_0xb0d5('0x15')]){if(_0x54b90f[_0xb0d5('0x15')][_0xb0d5('0x16')]===0x1f4){logger['error'](_0xb0d5('0x11'),_0x40c9d8,_0x54b90f[_0xb0d5('0x15')][_0xb0d5('0x17')]);return _0x2529c9(_0x54b90f[_0xb0d5('0x15')][_0xb0d5('0x17')]);}logger['error'](_0xb0d5('0x11'),_0x40c9d8,_0x54b90f['error'][_0xb0d5('0x17')]);return _0x182cec(_0x54b90f[_0xb0d5('0x15')]['message']);}else{logger[_0xb0d5('0x10')]('SmsAccount,\x20%s,\x20%s',_0x40c9d8,_0xb0d5('0x12'));_0x182cec(_0x54b90f[_0xb0d5('0x18')][_0xb0d5('0x17')]);}})[_0xb0d5('0x19')](function(_0x49dd7a){logger[_0xb0d5('0x15')](_0xb0d5('0x11'),_0x40c9d8,_0x49dd7a);_0x2529c9(_0x49dd7a);});});}exports[_0xb0d5('0x1a')]=function(_0x4ad95f){var _0x510853=this;return new Promise(function(_0x407c30,_0x297f6f){return db[_0xb0d5('0x1b')][_0xb0d5('0x1c')]({'raw':_0x4ad95f[_0xb0d5('0x1d')]?_0x4ad95f[_0xb0d5('0x1d')][_0xb0d5('0x1e')]===undefined?!![]:![]:!![],'where':_0x4ad95f['options']?_0x4ad95f[_0xb0d5('0x1d')][_0xb0d5('0x1f')]||null:null,'attributes':_0x4ad95f[_0xb0d5('0x1d')]?_0x4ad95f[_0xb0d5('0x1d')][_0xb0d5('0x20')]||null:null,'include':_0x4ad95f[_0xb0d5('0x1d')]?_0x4ad95f[_0xb0d5('0x1d')][_0xb0d5('0x21')]?_[_0xb0d5('0x22')](_0x4ad95f[_0xb0d5('0x1d')]['include'],function(_0x33e5c8){return{'model':db[_0x33e5c8[_0xb0d5('0x23')]],'as':_0x33e5c8['as'],'attributes':_0x33e5c8[_0xb0d5('0x20')],'include':_0x33e5c8['include']?_['map'](_0x33e5c8[_0xb0d5('0x21')],function(_0x4e89e7){return{'model':db[_0x4e89e7['model']],'as':_0x4e89e7['as'],'attributes':_0x4e89e7[_0xb0d5('0x20')],'include':_0x4e89e7[_0xb0d5('0x21')]?_[_0xb0d5('0x22')](_0x4e89e7[_0xb0d5('0x21')],function(_0x22ed89){return{'model':db[_0x22ed89[_0xb0d5('0x23')]],'as':_0x22ed89['as'],'attributes':_0x22ed89['attributes']};}):[]};}):[]};}):[]:[]})[_0xb0d5('0xf')](function(_0x229ffd){logger[_0xb0d5('0x10')](_0xb0d5('0x1a'),_0x4ad95f);logger[_0xb0d5('0x13')]('ShowSmsAccount',_0x4ad95f,JSON['stringify'](_0x229ffd));_0x407c30(_0x229ffd);})[_0xb0d5('0x19')](function(_0x236084){logger[_0xb0d5('0x15')](_0xb0d5('0x1a'),_0x236084['message'],_0x4ad95f);_0x297f6f(_0x510853[_0xb0d5('0x15')](0x1f4,_0x236084[_0xb0d5('0x17')]));});});};
\ No newline at end of file
+var _0xb4f5=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','register','request','then','info','SmsAccount,\x20%s,\x20%s','debug','SmsAccount,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','SmsAccount','find','options','raw','attributes','include','model','map','catch','ShowSmsAccount','lodash'];(function(_0x19c1f8,_0x29140b){var _0x421a55=function(_0x39b3c5){while(--_0x39b3c5){_0x19c1f8['push'](_0x19c1f8['shift']());}};_0x421a55(++_0x29140b);}(_0xb4f5,0xb8));var _0x5b4f=function(_0x2cacef,_0xba1573){_0x2cacef=_0x2cacef-0x0;var _0x289ba6=_0xb4f5[_0x2cacef];return _0x289ba6;};'use strict';var _=require(_0x5b4f('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x5b4f('0x1'));var rs=require(_0x5b4f('0x2'));var fs=require('fs');var Redis=require(_0x5b4f('0x3'));var db=require(_0x5b4f('0x4'))['db'];var utils=require(_0x5b4f('0x5'));var logger=require(_0x5b4f('0x6'))(_0x5b4f('0x7'));var config=require(_0x5b4f('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x5b4f('0x9')][_0x5b4f('0xa')]({'port':0x232a});config[_0x5b4f('0xb')]=_[_0x5b4f('0xc')](config[_0x5b4f('0xb')],{'host':_0x5b4f('0xd'),'port':0x18eb});var socket=require(_0x5b4f('0xe'))(new Redis(config[_0x5b4f('0xb')]));require('./smsAccount.socket')[_0x5b4f('0xf')](socket);function respondWithRpcPromise(_0x1ff894,_0x133f48,_0x5efefd){return new BPromise(function(_0x120ce8,_0x597330){return client[_0x5b4f('0x10')](_0x1ff894,_0x5efefd)[_0x5b4f('0x11')](function(_0x541a10){logger[_0x5b4f('0x12')](_0x5b4f('0x13'),_0x133f48,'request\x20sent');logger[_0x5b4f('0x14')](_0x5b4f('0x15'),_0x133f48,'request\x20sent',JSON[_0x5b4f('0x16')](_0x541a10));if(_0x541a10['error']){if(_0x541a10['error'][_0x5b4f('0x17')]===0x1f4){logger[_0x5b4f('0x18')](_0x5b4f('0x13'),_0x133f48,_0x541a10[_0x5b4f('0x18')][_0x5b4f('0x19')]);return _0x597330(_0x541a10[_0x5b4f('0x18')][_0x5b4f('0x19')]);}logger[_0x5b4f('0x18')](_0x5b4f('0x13'),_0x133f48,_0x541a10['error']['message']);return _0x120ce8(_0x541a10[_0x5b4f('0x18')]['message']);}else{logger['info']('SmsAccount,\x20%s,\x20%s',_0x133f48,'request\x20sent');_0x120ce8(_0x541a10[_0x5b4f('0x1a')]['message']);}})['catch'](function(_0x4ce879){logger['error']('SmsAccount,\x20%s,\x20%s',_0x133f48,_0x4ce879);_0x597330(_0x4ce879);});});}exports['ShowSmsAccount']=function(_0x42dbaf){var _0x1d20e3=this;return new Promise(function(_0x3b17c3,_0x34745d){return db[_0x5b4f('0x1b')][_0x5b4f('0x1c')]({'raw':_0x42dbaf[_0x5b4f('0x1d')]?_0x42dbaf[_0x5b4f('0x1d')][_0x5b4f('0x1e')]===undefined?!![]:![]:!![],'where':_0x42dbaf[_0x5b4f('0x1d')]?_0x42dbaf['options']['where']||null:null,'attributes':_0x42dbaf[_0x5b4f('0x1d')]?_0x42dbaf['options'][_0x5b4f('0x1f')]||null:null,'include':_0x42dbaf[_0x5b4f('0x1d')]?_0x42dbaf[_0x5b4f('0x1d')][_0x5b4f('0x20')]?_['map'](_0x42dbaf[_0x5b4f('0x1d')]['include'],function(_0x200792){return{'model':db[_0x200792[_0x5b4f('0x21')]],'as':_0x200792['as'],'attributes':_0x200792[_0x5b4f('0x1f')],'include':_0x200792[_0x5b4f('0x20')]?_[_0x5b4f('0x22')](_0x200792['include'],function(_0x25a79d){return{'model':db[_0x25a79d[_0x5b4f('0x21')]],'as':_0x25a79d['as'],'attributes':_0x25a79d['attributes'],'include':_0x25a79d[_0x5b4f('0x20')]?_[_0x5b4f('0x22')](_0x25a79d[_0x5b4f('0x20')],function(_0x5d3749){return{'model':db[_0x5d3749['model']],'as':_0x5d3749['as'],'attributes':_0x5d3749[_0x5b4f('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x5b4f('0x11')](function(_0x1fa149){logger['info']('ShowSmsAccount',_0x42dbaf);logger[_0x5b4f('0x14')]('ShowSmsAccount',_0x42dbaf,JSON['stringify'](_0x1fa149));_0x3b17c3(_0x1fa149);})[_0x5b4f('0x23')](function(_0x1b5e3a){logger[_0x5b4f('0x18')](_0x5b4f('0x24'),_0x1b5e3a[_0x5b4f('0x19')],_0x42dbaf);_0x34745d(_0x1d20e3[_0x5b4f('0x18')](0x1f4,_0x1b5e3a[_0x5b4f('0x19')]));});});};
\ No newline at end of file
index aba9157..0fb83e9 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(_0x3a6efd,_0x2a5102){_0x3a6efd=_0x3a6efd-0x0;var _0x487b9a=_0xa9e0[_0x3a6efd];return _0x487b9a;};'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(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0xa9e0,0x123));var _0x0a9e=function(_0x12d033,_0x25fa2f){_0x12d033=_0x12d033-0x0;var _0x3b4e80=_0xa9e0[_0x12d033];return _0x3b4e80;};'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 4aaa80b..5b300de 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x34e8=['../../config/environment','./smsApplication.controller','get','index','/:id','isAuthenticated','show','post','create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x3d2345,_0x1fc9ac){var _0x3d1f0f=function(_0x529e28){while(--_0x529e28){_0x3d2345['push'](_0x3d2345['shift']());}};_0x3d1f0f(++_0x1fc9ac);}(_0x34e8,0x12c));var _0x834e=function(_0x4ca941,_0x3d93d7){_0x4ca941=_0x4ca941-0x0;var _0x1dc50c=_0x34e8[_0x4ca941];return _0x1dc50c;};'use strict';var multer=require(_0x834e('0x0'));var util=require(_0x834e('0x1'));var path=require(_0x834e('0x2'));var timeout=require(_0x834e('0x3'));var express=require('express');var router=express[_0x834e('0x4')]();var fs_extra=require(_0x834e('0x5'));var auth=require(_0x834e('0x6'));var interaction=require(_0x834e('0x7'));var config=require(_0x834e('0x8'));var controller=require(_0x834e('0x9'));router[_0x834e('0xa')]('/',auth['isAuthenticated'](),controller[_0x834e('0xb')]);router['get'](_0x834e('0xc'),auth[_0x834e('0xd')](),controller[_0x834e('0xe')]);router[_0x834e('0xf')]('/',auth[_0x834e('0xd')](),controller[_0x834e('0x10')]);router[_0x834e('0x11')](_0x834e('0xc'),auth[_0x834e('0xd')](),controller[_0x834e('0x12')]);router[_0x834e('0x13')](_0x834e('0xc'),auth[_0x834e('0xd')](),controller[_0x834e('0x14')]);module[_0x834e('0x15')]=router;
\ No newline at end of file
+var _0x008c=['exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsApplication.controller','get','isAuthenticated','index','post','put','/:id'];(function(_0xd53c58,_0x2df2d6){var _0xbde786=function(_0x2c0c40){while(--_0x2c0c40){_0xd53c58['push'](_0xd53c58['shift']());}};_0xbde786(++_0x2df2d6);}(_0x008c,0x188));var _0xc008=function(_0x3b1bba,_0x220536){_0x3b1bba=_0x3b1bba-0x0;var _0x4ca374=_0x008c[_0x3b1bba];return _0x4ca374;};'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('0xd')]('/',auth['isAuthenticated'](),controller['create']);router[_0xc008('0xe')](_0xc008('0xf'),auth['isAuthenticated'](),controller['update']);router['delete'](_0xc008('0xf'),auth[_0xc008('0xb')](),controller['destroy']);module[_0xc008('0x10')]=router;
\ No newline at end of file
index 604b04f..b73b37f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc21f=['*,*,*,*','sequelize','exports','INTEGER','STRING'];(function(_0x4c3a36,_0xdba60f){var _0x40f945=function(_0x4efdb2){while(--_0x4efdb2){_0x4c3a36['push'](_0x4c3a36['shift']());}};_0x40f945(++_0xdba60f);}(_0xc21f,0x114));var _0xfc21=function(_0x134c96,_0x41e92c){_0x134c96=_0x134c96-0x0;var _0x3d86d6=_0xc21f[_0x134c96];return _0x3d86d6;};'use strict';var Sequelize=require(_0xfc21('0x0'));module[_0xfc21('0x1')]={'priority':{'type':Sequelize[_0xfc21('0x2')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'noop'},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize[_0xfc21('0x3')]},'interval':{'type':Sequelize[_0xfc21('0x3')],'defaultValue':_0xfc21('0x4')}};
\ No newline at end of file
+var _0x3208=['TEXT','*,*,*,*','sequelize','exports','INTEGER','STRING','noop'];(function(_0x168944,_0x519239){var _0x3a9fdd=function(_0x1f9bf2){while(--_0x1f9bf2){_0x168944['push'](_0x168944['shift']());}};_0x3a9fdd(++_0x519239);}(_0x3208,0x121));var _0x8320=function(_0x465a0c,_0x19d4d5){_0x465a0c=_0x465a0c-0x0;var _0x1e202e=_0x3208[_0x465a0c];return _0x1e202e;};'use strict';var Sequelize=require(_0x8320('0x0'));module[_0x8320('0x1')]={'priority':{'type':Sequelize[_0x8320('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x8320('0x3')],'allowNull':![],'defaultValue':_0x8320('0x4')},'appdata':{'type':Sequelize[_0x8320('0x5')]()},'description':{'type':Sequelize[_0x8320('0x3')]},'interval':{'type':Sequelize[_0x8320('0x3')],'defaultValue':_0x8320('0x6')}};
\ No newline at end of file
index 0d11144..9083212 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbe3d=['then','sendStatus','error','stack','name','send','rawAttributes','fieldName','key','model','map','query','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','include','SmsApplication','findAll','catch','params','keys','create','body','update','find','eml-format','rimraf','request-promise','mustache','util','path','sox','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','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','end','status','offset','undefined','limit','count','Content-Range','json','reject','destroy'];(function(_0x251fde,_0x384469){var _0x350af6=function(_0x15a6a3){while(--_0x15a6a3){_0x251fde['push'](_0x251fde['shift']());}};_0x350af6(++_0x384469);}(_0xbe3d,0x1e8));var _0xdbe3=function(_0x123b14,_0x916a25){_0x123b14=_0x123b14-0x0;var _0x5722d2=_0xbe3d[_0x123b14];return _0x5722d2;};'use strict';var emlformat=require(_0xdbe3('0x0'));var rimraf=require(_0xdbe3('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xdbe3('0x2'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xdbe3('0x3'));var util=require(_0xdbe3('0x4'));var path=require(_0xdbe3('0x5'));var sox=require(_0xdbe3('0x6'));var csv=require(_0xdbe3('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xdbe3('0x8'));var _=require(_0xdbe3('0x9'));var squel=require(_0xdbe3('0xa'));var crypto=require(_0xdbe3('0xb'));var jsforce=require(_0xdbe3('0xc'));var deskjs=require(_0xdbe3('0xd'));var toCsv=require(_0xdbe3('0x7'));var querystring=require(_0xdbe3('0xe'));var Papa=require(_0xdbe3('0xf'));var Redis=require(_0xdbe3('0x10'));var authService=require(_0xdbe3('0x11'));var qs=require(_0xdbe3('0x12'));var as=require(_0xdbe3('0x13'));var hardwareService=require(_0xdbe3('0x14'));var logger=require(_0xdbe3('0x15'))(_0xdbe3('0x16'));var utils=require(_0xdbe3('0x17'));var config=require(_0xdbe3('0x18'));var licenseUtil=require(_0xdbe3('0x19'));var db=require(_0xdbe3('0x1a'))['db'];function respondWithStatusCode(_0x3de77e,_0x59fcc3){_0x59fcc3=_0x59fcc3||0xcc;return function(_0x4a69df){if(_0x4a69df){return _0x3de77e['sendStatus'](_0x59fcc3);}return _0x3de77e['status'](_0x59fcc3)[_0xdbe3('0x1b')]();};}function respondWithResult(_0x567282,_0x1c76df){_0x1c76df=_0x1c76df||0xc8;return function(_0x36b95c){if(_0x36b95c){return _0x567282[_0xdbe3('0x1c')](_0x1c76df)['json'](_0x36b95c);}};}function respondWithFilteredResult(_0x5bfb30,_0x37a863){return function(_0x46b57b){if(_0x46b57b){var _0x64f246=typeof _0x37a863[_0xdbe3('0x1d')]===_0xdbe3('0x1e')&&typeof _0x37a863[_0xdbe3('0x1f')]===_0xdbe3('0x1e');var _0x482f07=_0x46b57b[_0xdbe3('0x20')];var _0x2fb457=_0x64f246?0x0:_0x37a863['offset'];var _0x2707e8=_0x64f246?_0x46b57b[_0xdbe3('0x20')]:_0x37a863[_0xdbe3('0x1d')]+_0x37a863[_0xdbe3('0x1f')];var _0x27b139;if(_0x2707e8>=_0x482f07){_0x2707e8=_0x482f07;_0x27b139=0xc8;}else{_0x27b139=0xce;}_0x5bfb30[_0xdbe3('0x1c')](_0x27b139);return _0x5bfb30['set'](_0xdbe3('0x21'),_0x2fb457+'-'+_0x2707e8+'/'+_0x482f07)[_0xdbe3('0x22')](_0x46b57b);}return null;};}function patchUpdates(_0x35a9a5){return function(_0xaaacd0){try{jsonpatch['apply'](_0xaaacd0,_0x35a9a5,!![]);}catch(_0x4a9a38){return BPromise[_0xdbe3('0x23')](_0x4a9a38);}return _0xaaacd0['save']();};}function saveUpdates(_0x4bb4d4,_0x173ca3){return function(_0x3b1d32){if(_0x3b1d32){return _0x3b1d32['update'](_0x4bb4d4)['then'](function(_0x5a3a93){return _0x5a3a93;});}return null;};}function removeEntity(_0x2f9d25,_0x3dba95){return function(_0x3a2826){if(_0x3a2826){return _0x3a2826[_0xdbe3('0x24')]()[_0xdbe3('0x25')](function(){_0x2f9d25[_0xdbe3('0x1c')](0xcc)[_0xdbe3('0x1b')]();});}};}function handleEntityNotFound(_0x2279ff,_0x4932ca){return function(_0x417ad9){if(!_0x417ad9){_0x2279ff[_0xdbe3('0x26')](0x194);}return _0x417ad9;};}function handleError(_0x3a104b,_0x4fea66){_0x4fea66=_0x4fea66||0x1f4;return function(_0x1cd04a){logger[_0xdbe3('0x27')](_0x1cd04a[_0xdbe3('0x28')]);if(_0x1cd04a[_0xdbe3('0x29')]){delete _0x1cd04a[_0xdbe3('0x29')];}_0x3a104b[_0xdbe3('0x1c')](_0x4fea66)[_0xdbe3('0x2a')](_0x1cd04a);};}exports['index']=function(_0x3cb79f,_0x8735c2){var _0x5ef0cc={},_0x5934b0={},_0x3393b6={'count':0x0,'rows':[]};var _0x23fd84=_['map'](db['SmsApplication'][_0xdbe3('0x2b')],function(_0x3c8ed9){return{'name':_0x3c8ed9[_0xdbe3('0x2c')],'type':_0x3c8ed9['type'][_0xdbe3('0x2d')]};});_0x5934b0[_0xdbe3('0x2e')]=_[_0xdbe3('0x2f')](_0x23fd84,'name');_0x5934b0[_0xdbe3('0x30')]=_['keys'](_0x3cb79f[_0xdbe3('0x30')]);_0x5934b0['filters']=_['intersection'](_0x5934b0['model'],_0x5934b0[_0xdbe3('0x30')]);_0x5ef0cc[_0xdbe3('0x31')]=_[_0xdbe3('0x32')](_0x5934b0['model'],qs[_0xdbe3('0x33')](_0x3cb79f['query']['fields']));_0x5ef0cc[_0xdbe3('0x31')]=_0x5ef0cc['attributes'][_0xdbe3('0x34')]?_0x5ef0cc[_0xdbe3('0x31')]:_0x5934b0[_0xdbe3('0x2e')];if(!_0x3cb79f[_0xdbe3('0x30')][_0xdbe3('0x35')](_0xdbe3('0x36'))){_0x5ef0cc[_0xdbe3('0x1f')]=qs[_0xdbe3('0x1f')](_0x3cb79f[_0xdbe3('0x30')][_0xdbe3('0x1f')]);_0x5ef0cc[_0xdbe3('0x1d')]=qs[_0xdbe3('0x1d')](_0x3cb79f[_0xdbe3('0x30')][_0xdbe3('0x1d')]);}_0x5ef0cc[_0xdbe3('0x37')]=qs[_0xdbe3('0x38')](_0x3cb79f[_0xdbe3('0x30')][_0xdbe3('0x38')]);_0x5ef0cc[_0xdbe3('0x39')]=qs[_0xdbe3('0x3a')](_[_0xdbe3('0x3b')](_0x3cb79f[_0xdbe3('0x30')],_0x5934b0[_0xdbe3('0x3a')]),_0x23fd84);if(_0x3cb79f[_0xdbe3('0x30')][_0xdbe3('0x3c')]){_0x5ef0cc['where']=_[_0xdbe3('0x3d')](_0x5ef0cc[_0xdbe3('0x39')],{'$or':_[_0xdbe3('0x2f')](_0x23fd84,function(_0x32ba0d){if(_0x32ba0d['type']!==_0xdbe3('0x3e')){var _0x40e705={};_0x40e705[_0x32ba0d['name']]={'$like':'%'+_0x3cb79f[_0xdbe3('0x30')][_0xdbe3('0x3c')]+'%'};return _0x40e705;}})});}_0x5ef0cc=_[_0xdbe3('0x3d')]({},_0x5ef0cc,_0x3cb79f[_0xdbe3('0x3f')]);var _0x7470a1={'where':_0x5ef0cc[_0xdbe3('0x39')]};return db['SmsApplication'][_0xdbe3('0x20')](_0x7470a1)[_0xdbe3('0x25')](function(_0x560516){_0x3393b6[_0xdbe3('0x20')]=_0x560516;if(_0x3cb79f[_0xdbe3('0x30')][_0xdbe3('0x40')]){_0x5ef0cc[_0xdbe3('0x41')]=[{'all':!![]}];}return db[_0xdbe3('0x42')][_0xdbe3('0x43')](_0x5ef0cc);})[_0xdbe3('0x25')](function(_0x44abb8){_0x3393b6['rows']=_0x44abb8;return _0x3393b6;})[_0xdbe3('0x25')](respondWithFilteredResult(_0x8735c2,_0x5ef0cc))[_0xdbe3('0x44')](handleError(_0x8735c2,null));};exports['show']=function(_0x578247,_0x4148ee){var _0x1a86ae={'raw':!![],'where':{'id':_0x578247[_0xdbe3('0x45')]['id']}},_0x2a9e22={};_0x2a9e22[_0xdbe3('0x2e')]=_['keys'](db[_0xdbe3('0x42')][_0xdbe3('0x2b')]);_0x2a9e22['query']=_[_0xdbe3('0x46')](_0x578247[_0xdbe3('0x30')]);_0x2a9e22[_0xdbe3('0x3a')]=_['intersection'](_0x2a9e22['model'],_0x2a9e22[_0xdbe3('0x30')]);_0x1a86ae[_0xdbe3('0x31')]=_[_0xdbe3('0x32')](_0x2a9e22['model'],qs[_0xdbe3('0x33')](_0x578247[_0xdbe3('0x30')][_0xdbe3('0x33')]));_0x1a86ae[_0xdbe3('0x31')]=_0x1a86ae['attributes'][_0xdbe3('0x34')]?_0x1a86ae[_0xdbe3('0x31')]:_0x2a9e22[_0xdbe3('0x2e')];if(_0x578247['query']['includeAll']){_0x1a86ae[_0xdbe3('0x41')]=[{'all':!![]}];}_0x1a86ae=_[_0xdbe3('0x3d')]({},_0x1a86ae,_0x578247['options']);return db[_0xdbe3('0x42')]['find'](_0x1a86ae)[_0xdbe3('0x25')](handleEntityNotFound(_0x4148ee,null))[_0xdbe3('0x25')](respondWithResult(_0x4148ee,null))[_0xdbe3('0x44')](handleError(_0x4148ee,null));};exports[_0xdbe3('0x47')]=function(_0x1aed3e,_0x546aac){return db[_0xdbe3('0x42')][_0xdbe3('0x47')](_0x1aed3e[_0xdbe3('0x48')],{})['then'](respondWithResult(_0x546aac,0xc9))['catch'](handleError(_0x546aac,null));};exports[_0xdbe3('0x49')]=function(_0x613cea,_0x5e5be4){if(_0x613cea[_0xdbe3('0x48')]['id']){delete _0x613cea[_0xdbe3('0x48')]['id'];}return db[_0xdbe3('0x42')][_0xdbe3('0x4a')]({'where':{'id':_0x613cea[_0xdbe3('0x45')]['id']}})['then'](handleEntityNotFound(_0x5e5be4,null))[_0xdbe3('0x25')](saveUpdates(_0x613cea['body'],null))['then'](respondWithResult(_0x5e5be4,null))[_0xdbe3('0x44')](handleError(_0x5e5be4,null));};exports[_0xdbe3('0x24')]=function(_0x49f217,_0x317db3){return db['SmsApplication'][_0xdbe3('0x4a')]({'where':{'id':_0x49f217[_0xdbe3('0x45')]['id']}})[_0xdbe3('0x25')](handleEntityNotFound(_0x317db3,null))['then'](removeEntity(_0x317db3,null))[_0xdbe3('0x44')](handleError(_0x317db3,null));};
\ No newline at end of file
+var _0x7f28=['save','then','destroy','error','stack','name','index','SmsApplication','type','key','model','map','intersection','query','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','VIRTUAL','merge','options','include','rows','params','keys','rawAttributes','includeAll','find','catch','create','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','squel','jsforce','ioredis','../../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','Content-Range'];(function(_0x1c5976,_0x409f3d){var _0x350ea1=function(_0x3f7658){while(--_0x3f7658){_0x1c5976['push'](_0x1c5976['shift']());}};_0x350ea1(++_0x409f3d);}(_0x7f28,0xae));var _0x87f2=function(_0x13d07a,_0x41efc3){_0x13d07a=_0x13d07a-0x0;var _0x5ee0ee=_0x7f28[_0x13d07a];return _0x5ee0ee;};'use strict';var emlformat=require(_0x87f2('0x0'));var rimraf=require(_0x87f2('0x1'));var zipdir=require(_0x87f2('0x2'));var jsonpatch=require(_0x87f2('0x3'));var rp=require(_0x87f2('0x4'));var moment=require(_0x87f2('0x5'));var BPromise=require(_0x87f2('0x6'));var Mustache=require(_0x87f2('0x7'));var util=require('util');var path=require(_0x87f2('0x8'));var sox=require(_0x87f2('0x9'));var csv=require(_0x87f2('0xa'));var ejs=require(_0x87f2('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x87f2('0xc'));var crypto=require('crypto');var jsforce=require(_0x87f2('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x87f2('0xa'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x87f2('0xe'));var authService=require('../../components/auth/service');var qs=require(_0x87f2('0xf'));var as=require(_0x87f2('0x10'));var hardwareService=require(_0x87f2('0x11'));var logger=require('../../config/logger')(_0x87f2('0x12'));var utils=require(_0x87f2('0x13'));var config=require(_0x87f2('0x14'));var licenseUtil=require(_0x87f2('0x15'));var db=require(_0x87f2('0x16'))['db'];function respondWithStatusCode(_0x316bdc,_0x2026c5){_0x2026c5=_0x2026c5||0xcc;return function(_0x4abe41){if(_0x4abe41){return _0x316bdc[_0x87f2('0x17')](_0x2026c5);}return _0x316bdc[_0x87f2('0x18')](_0x2026c5)[_0x87f2('0x19')]();};}function respondWithResult(_0x5c3eca,_0x1226be){_0x1226be=_0x1226be||0xc8;return function(_0x318267){if(_0x318267){return _0x5c3eca[_0x87f2('0x18')](_0x1226be)[_0x87f2('0x1a')](_0x318267);}};}function respondWithFilteredResult(_0x544910,_0x195550){return function(_0x356d47){if(_0x356d47){var _0x39ca18=typeof _0x195550['offset']===_0x87f2('0x1b')&&typeof _0x195550[_0x87f2('0x1c')]===_0x87f2('0x1b');var _0x323f9a=_0x356d47[_0x87f2('0x1d')];var _0x26018a=_0x39ca18?0x0:_0x195550[_0x87f2('0x1e')];var _0x6546dc=_0x39ca18?_0x356d47[_0x87f2('0x1d')]:_0x195550[_0x87f2('0x1e')]+_0x195550[_0x87f2('0x1c')];var _0x2dcc42;if(_0x6546dc>=_0x323f9a){_0x6546dc=_0x323f9a;_0x2dcc42=0xc8;}else{_0x2dcc42=0xce;}_0x544910['status'](_0x2dcc42);return _0x544910[_0x87f2('0x1f')](_0x87f2('0x20'),_0x26018a+'-'+_0x6546dc+'/'+_0x323f9a)[_0x87f2('0x1a')](_0x356d47);}return null;};}function patchUpdates(_0x69c628){return function(_0x178853){try{jsonpatch['apply'](_0x178853,_0x69c628,!![]);}catch(_0x1fe6cb){return BPromise['reject'](_0x1fe6cb);}return _0x178853[_0x87f2('0x21')]();};}function saveUpdates(_0x1a3885,_0x9d0d9e){return function(_0x555bb0){if(_0x555bb0){return _0x555bb0['update'](_0x1a3885)[_0x87f2('0x22')](function(_0x3c42e1){return _0x3c42e1;});}return null;};}function removeEntity(_0x4dd6e2,_0x51d34f){return function(_0x347e53){if(_0x347e53){return _0x347e53[_0x87f2('0x23')]()[_0x87f2('0x22')](function(){_0x4dd6e2['status'](0xcc)[_0x87f2('0x19')]();});}};}function handleEntityNotFound(_0x270c20,_0x414510){return function(_0xc6b064){if(!_0xc6b064){_0x270c20[_0x87f2('0x17')](0x194);}return _0xc6b064;};}function handleError(_0x3e92c4,_0x5bc402){_0x5bc402=_0x5bc402||0x1f4;return function(_0x1b16b7){logger[_0x87f2('0x24')](_0x1b16b7[_0x87f2('0x25')]);if(_0x1b16b7[_0x87f2('0x26')]){delete _0x1b16b7['name'];}_0x3e92c4['status'](_0x5bc402)['send'](_0x1b16b7);};}exports[_0x87f2('0x27')]=function(_0x3547c1,_0x2d9f87){var _0xed763={},_0x6b57eb={},_0x439bf1={'count':0x0,'rows':[]};var _0x351913=_['map'](db[_0x87f2('0x28')]['rawAttributes'],function(_0x252dc3){return{'name':_0x252dc3['fieldName'],'type':_0x252dc3[_0x87f2('0x29')][_0x87f2('0x2a')]};});_0x6b57eb[_0x87f2('0x2b')]=_[_0x87f2('0x2c')](_0x351913,'name');_0x6b57eb['query']=_['keys'](_0x3547c1['query']);_0x6b57eb['filters']=_[_0x87f2('0x2d')](_0x6b57eb[_0x87f2('0x2b')],_0x6b57eb[_0x87f2('0x2e')]);_0xed763[_0x87f2('0x2f')]=_[_0x87f2('0x2d')](_0x6b57eb[_0x87f2('0x2b')],qs[_0x87f2('0x30')](_0x3547c1['query'][_0x87f2('0x30')]));_0xed763[_0x87f2('0x2f')]=_0xed763['attributes'][_0x87f2('0x31')]?_0xed763[_0x87f2('0x2f')]:_0x6b57eb['model'];if(!_0x3547c1[_0x87f2('0x2e')][_0x87f2('0x32')](_0x87f2('0x33'))){_0xed763[_0x87f2('0x1c')]=qs[_0x87f2('0x1c')](_0x3547c1[_0x87f2('0x2e')][_0x87f2('0x1c')]);_0xed763[_0x87f2('0x1e')]=qs[_0x87f2('0x1e')](_0x3547c1[_0x87f2('0x2e')][_0x87f2('0x1e')]);}_0xed763[_0x87f2('0x34')]=qs[_0x87f2('0x35')](_0x3547c1[_0x87f2('0x2e')][_0x87f2('0x35')]);_0xed763[_0x87f2('0x36')]=qs[_0x87f2('0x37')](_[_0x87f2('0x38')](_0x3547c1[_0x87f2('0x2e')],_0x6b57eb['filters']),_0x351913);if(_0x3547c1[_0x87f2('0x2e')]['filter']){_0xed763[_0x87f2('0x36')]=_['merge'](_0xed763[_0x87f2('0x36')],{'$or':_['map'](_0x351913,function(_0x5e9f10){if(_0x5e9f10[_0x87f2('0x29')]!==_0x87f2('0x39')){var _0x142c95={};_0x142c95[_0x5e9f10[_0x87f2('0x26')]]={'$like':'%'+_0x3547c1[_0x87f2('0x2e')]['filter']+'%'};return _0x142c95;}})});}_0xed763=_[_0x87f2('0x3a')]({},_0xed763,_0x3547c1[_0x87f2('0x3b')]);var _0x46d9d9={'where':_0xed763[_0x87f2('0x36')]};return db[_0x87f2('0x28')][_0x87f2('0x1d')](_0x46d9d9)['then'](function(_0x436c6f){_0x439bf1[_0x87f2('0x1d')]=_0x436c6f;if(_0x3547c1['query']['includeAll']){_0xed763[_0x87f2('0x3c')]=[{'all':!![]}];}return db[_0x87f2('0x28')]['findAll'](_0xed763);})[_0x87f2('0x22')](function(_0x2ee325){_0x439bf1[_0x87f2('0x3d')]=_0x2ee325;return _0x439bf1;})['then'](respondWithFilteredResult(_0x2d9f87,_0xed763))['catch'](handleError(_0x2d9f87,null));};exports['show']=function(_0x318341,_0x3b45a0){var _0x292228={'raw':!![],'where':{'id':_0x318341[_0x87f2('0x3e')]['id']}},_0x2614d6={};_0x2614d6[_0x87f2('0x2b')]=_[_0x87f2('0x3f')](db[_0x87f2('0x28')][_0x87f2('0x40')]);_0x2614d6[_0x87f2('0x2e')]=_[_0x87f2('0x3f')](_0x318341[_0x87f2('0x2e')]);_0x2614d6[_0x87f2('0x37')]=_[_0x87f2('0x2d')](_0x2614d6[_0x87f2('0x2b')],_0x2614d6[_0x87f2('0x2e')]);_0x292228[_0x87f2('0x2f')]=_['intersection'](_0x2614d6[_0x87f2('0x2b')],qs[_0x87f2('0x30')](_0x318341[_0x87f2('0x2e')]['fields']));_0x292228[_0x87f2('0x2f')]=_0x292228[_0x87f2('0x2f')][_0x87f2('0x31')]?_0x292228[_0x87f2('0x2f')]:_0x2614d6[_0x87f2('0x2b')];if(_0x318341[_0x87f2('0x2e')][_0x87f2('0x41')]){_0x292228[_0x87f2('0x3c')]=[{'all':!![]}];}_0x292228=_[_0x87f2('0x3a')]({},_0x292228,_0x318341[_0x87f2('0x3b')]);return db['SmsApplication'][_0x87f2('0x42')](_0x292228)[_0x87f2('0x22')](handleEntityNotFound(_0x3b45a0,null))[_0x87f2('0x22')](respondWithResult(_0x3b45a0,null))[_0x87f2('0x43')](handleError(_0x3b45a0,null));};exports[_0x87f2('0x44')]=function(_0x59e90d,_0x1f1a6a){return db[_0x87f2('0x28')][_0x87f2('0x44')](_0x59e90d['body'],{})[_0x87f2('0x22')](respondWithResult(_0x1f1a6a,0xc9))[_0x87f2('0x43')](handleError(_0x1f1a6a,null));};exports['update']=function(_0x1906d3,_0x20b547){if(_0x1906d3['body']['id']){delete _0x1906d3['body']['id'];}return db[_0x87f2('0x28')][_0x87f2('0x42')]({'where':{'id':_0x1906d3[_0x87f2('0x3e')]['id']}})[_0x87f2('0x22')](handleEntityNotFound(_0x20b547,null))[_0x87f2('0x22')](saveUpdates(_0x1906d3['body'],null))['then'](respondWithResult(_0x20b547,null))[_0x87f2('0x43')](handleError(_0x20b547,null));};exports['destroy']=function(_0x37d435,_0x20667f){return db[_0x87f2('0x28')][_0x87f2('0x42')]({'where':{'id':_0x37d435['params']['id']}})['then'](handleEntityNotFound(_0x20667f,null))['then'](removeEntity(_0x20667f,null))['catch'](handleError(_0x20667f,null));};
\ No newline at end of file
index 8522a65..dabb559 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3525=['utf8mb4','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./smsApplication.attributes','exports','define','sms_applications'];(function(_0x3c77f9,_0x2abb07){var _0x41790a=function(_0x363994){while(--_0x363994){_0x3c77f9['push'](_0x3c77f9['shift']());}};_0x41790a(++_0x2abb07);}(_0x3525,0x143));var _0x5352=function(_0x5944e9,_0xf3da60){_0x5944e9=_0x5944e9-0x0;var _0x1098b8=_0x3525[_0x5944e9];return _0x1098b8;};'use strict';var _=require(_0x5352('0x0'));var util=require(_0x5352('0x1'));var logger=require(_0x5352('0x2'))(_0x5352('0x3'));var moment=require(_0x5352('0x4'));var BPromise=require(_0x5352('0x5'));var rp=require(_0x5352('0x6'));var fs=require('fs');var path=require(_0x5352('0x7'));var rimraf=require('rimraf');var config=require(_0x5352('0x8'));var attributes=require(_0x5352('0x9'));module[_0x5352('0xa')]=function(_0x2c2596,_0x39d6b6){return _0x2c2596[_0x5352('0xb')]('SmsApplication',attributes,{'tableName':_0x5352('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x5352('0xd'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0x5034=['utf8mb4_unicode_ci','lodash','util','../../config/logger','moment','bluebird','request-promise','rimraf','../../config/environment','./smsApplication.attributes','exports','SmsApplication','sms_applications','utf8mb4'];(function(_0x57fc05,_0x31e7f4){var _0x5c78e8=function(_0x2c7bad){while(--_0x2c7bad){_0x57fc05['push'](_0x57fc05['shift']());}};_0x5c78e8(++_0x31e7f4);}(_0x5034,0x8d));var _0x4503=function(_0x20753,_0x31272a){_0x20753=_0x20753-0x0;var _0x5913c7=_0x5034[_0x20753];return _0x5913c7;};'use strict';var _=require(_0x4503('0x0'));var util=require(_0x4503('0x1'));var logger=require(_0x4503('0x2'))('api');var moment=require(_0x4503('0x3'));var BPromise=require(_0x4503('0x4'));var rp=require(_0x4503('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x4503('0x6'));var config=require(_0x4503('0x7'));var attributes=require(_0x4503('0x8'));module[_0x4503('0x9')]=function(_0x217cd4,_0x516a40){return _0x217cd4['define'](_0x4503('0xa'),attributes,{'tableName':_0x4503('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x4503('0xc'),'collate':_0x4503('0xd')});};
\ No newline at end of file
index 3fb763a..0f9ca34 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb4d9=['client','http','request','SmsApplication,\x20%s,\x20%s','request\x20sent','debug','SmsApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x128b18,_0x817f20){var _0x2d1e7d=function(_0x142c1e){while(--_0x142c1e){_0x128b18['push'](_0x128b18['shift']());}};_0x2d1e7d(++_0x817f20);}(_0xb4d9,0xce));var _0x9b4d=function(_0xc4001c,_0x1bf8f0){_0xc4001c=_0xc4001c-0x0;var _0x49f7bc=_0xb4d9[_0xc4001c];return _0x49f7bc;};'use strict';var _=require(_0x9b4d('0x0'));var util=require(_0x9b4d('0x1'));var moment=require('moment');var BPromise=require(_0x9b4d('0x2'));var rs=require(_0x9b4d('0x3'));var fs=require('fs');var Redis=require(_0x9b4d('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x9b4d('0x5'));var logger=require(_0x9b4d('0x6'))(_0x9b4d('0x7'));var config=require(_0x9b4d('0x8'));var jayson=require(_0x9b4d('0x9'));var client=jayson[_0x9b4d('0xa')][_0x9b4d('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x429cc5,_0x461cb1,_0x14cb0b){return new BPromise(function(_0x156c68,_0x48832a){return client[_0x9b4d('0xc')](_0x429cc5,_0x14cb0b)['then'](function(_0x340b21){logger['info'](_0x9b4d('0xd'),_0x461cb1,_0x9b4d('0xe'));logger[_0x9b4d('0xf')](_0x9b4d('0x10'),_0x461cb1,_0x9b4d('0xe'),JSON[_0x9b4d('0x11')](_0x340b21));if(_0x340b21[_0x9b4d('0x12')]){if(_0x340b21[_0x9b4d('0x12')][_0x9b4d('0x13')]===0x1f4){logger[_0x9b4d('0x12')](_0x9b4d('0xd'),_0x461cb1,_0x340b21[_0x9b4d('0x12')]['message']);return _0x48832a(_0x340b21[_0x9b4d('0x12')][_0x9b4d('0x14')]);}logger[_0x9b4d('0x12')](_0x9b4d('0xd'),_0x461cb1,_0x340b21['error'][_0x9b4d('0x14')]);return _0x156c68(_0x340b21['error']['message']);}else{logger[_0x9b4d('0x15')](_0x9b4d('0xd'),_0x461cb1,_0x9b4d('0xe'));_0x156c68(_0x340b21[_0x9b4d('0x16')][_0x9b4d('0x14')]);}})[_0x9b4d('0x17')](function(_0x5d23f3){logger['error'](_0x9b4d('0xd'),_0x461cb1,_0x5d23f3);_0x48832a(_0x5d23f3);});});}
\ No newline at end of file
+var _0x1219=['http','then','info','SmsApplication,\x20%s,\x20%s','debug','SmsApplication,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x4ae3ce,_0x160110){var _0x4fdf9f=function(_0x5177e5){while(--_0x5177e5){_0x4ae3ce['push'](_0x4ae3ce['shift']());}};_0x4fdf9f(++_0x160110);}(_0x1219,0x17c));var _0x9121=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x1219[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x9121('0x0'));var util=require(_0x9121('0x1'));var moment=require(_0x9121('0x2'));var BPromise=require(_0x9121('0x3'));var rs=require(_0x9121('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9121('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x9121('0x6'))(_0x9121('0x7'));var config=require(_0x9121('0x8'));var jayson=require(_0x9121('0x9'));var client=jayson[_0x9121('0xa')][_0x9121('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x437bac,_0x1387b7,_0x262520){return new BPromise(function(_0x409a74,_0x2c55eb){return client['request'](_0x437bac,_0x262520)[_0x9121('0xc')](function(_0x2bf1d6){logger[_0x9121('0xd')](_0x9121('0xe'),_0x1387b7,'request\x20sent');logger[_0x9121('0xf')](_0x9121('0x10'),_0x1387b7,_0x9121('0x11'),JSON[_0x9121('0x12')](_0x2bf1d6));if(_0x2bf1d6[_0x9121('0x13')]){if(_0x2bf1d6[_0x9121('0x13')][_0x9121('0x14')]===0x1f4){logger[_0x9121('0x13')](_0x9121('0xe'),_0x1387b7,_0x2bf1d6[_0x9121('0x13')][_0x9121('0x15')]);return _0x2c55eb(_0x2bf1d6[_0x9121('0x13')][_0x9121('0x15')]);}logger[_0x9121('0x13')](_0x9121('0xe'),_0x1387b7,_0x2bf1d6['error'][_0x9121('0x15')]);return _0x409a74(_0x2bf1d6[_0x9121('0x13')][_0x9121('0x15')]);}else{logger[_0x9121('0xd')](_0x9121('0xe'),_0x1387b7,_0x9121('0x11'));_0x409a74(_0x2bf1d6['result']['message']);}})[_0x9121('0x16')](function(_0x200a28){logger[_0x9121('0x13')](_0x9121('0xe'),_0x1387b7,_0x200a28);_0x2c55eb(_0x200a28);});});}
\ No newline at end of file
index b8cd620..a73db91 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb62e=['removeTags','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsInteraction.controller','isAuthenticated','index','get','describe','/:id','/:id/messages','getMessages','/:id/download','download','post','addMessage','/:id/tags','tracked','smsinteraction:addtags','addTags','put','sms','smsinteraction:update','update','delete','smsinteraction:destroy','destroy'];(function(_0x454043,_0x124652){var _0x183c52=function(_0x1432d4){while(--_0x1432d4){_0x454043['push'](_0x454043['shift']());}};_0x183c52(++_0x124652);}(_0xb62e,0x1de));var _0xeb62=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0xb62e[_0xbca1b1];return _0x4e1686;};'use strict';var multer=require(_0xeb62('0x0'));var util=require(_0xeb62('0x1'));var path=require(_0xeb62('0x2'));var timeout=require(_0xeb62('0x3'));var express=require('express');var router=express[_0xeb62('0x4')]();var fs_extra=require(_0xeb62('0x5'));var auth=require(_0xeb62('0x6'));var interaction=require(_0xeb62('0x7'));var config=require(_0xeb62('0x8'));var controller=require(_0xeb62('0x9'));router['get']('/',auth[_0xeb62('0xa')](),controller[_0xeb62('0xb')]);router[_0xeb62('0xc')]('/describe',auth[_0xeb62('0xa')](),controller[_0xeb62('0xd')]);router[_0xeb62('0xc')](_0xeb62('0xe'),auth['isAuthenticated'](),controller['show']);router[_0xeb62('0xc')](_0xeb62('0xf'),auth[_0xeb62('0xa')](),controller[_0xeb62('0x10')]);router[_0xeb62('0xc')](_0xeb62('0x11'),auth[_0xeb62('0xa')](),controller[_0xeb62('0x12')]);router[_0xeb62('0x13')]('/',auth[_0xeb62('0xa')](),controller['create']);router[_0xeb62('0x13')](_0xeb62('0xf'),auth[_0xeb62('0xa')](),controller[_0xeb62('0x14')]);router['post'](_0xeb62('0x15'),auth[_0xeb62('0xa')](),interaction[_0xeb62('0x16')]('sms',_0xeb62('0x17')),controller[_0xeb62('0x18')]);router[_0xeb62('0x19')]('/:id',auth[_0xeb62('0xa')](),interaction[_0xeb62('0x16')](_0xeb62('0x1a'),_0xeb62('0x1b')),controller[_0xeb62('0x1c')]);router[_0xeb62('0x1d')](_0xeb62('0xe'),auth[_0xeb62('0xa')](),interaction[_0xeb62('0x16')](_0xeb62('0x1a'),_0xeb62('0x1e')),controller[_0xeb62('0x1f')]);router[_0xeb62('0x1d')]('/:id/tags',auth[_0xeb62('0xa')](),controller[_0xeb62('0x20')]);module[_0xeb62('0x21')]=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(_0x4f774b,_0x53f31e){var _0x5148f0=function(_0x524202){while(--_0x524202){_0x4f774b['push'](_0x4f774b['shift']());}};_0x5148f0(++_0x53f31e);}(_0x4fc2,0x111));var _0x24fc=function(_0x4ff2bc,_0xedd1df){_0x4ff2bc=_0x4ff2bc-0x0;var _0x21751c=_0x4fc2[_0x4ff2bc];return _0x21751c;};'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 6e2175a..f76e3a5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc4e1=['out','INTEGER','sequelize','moment','exports','BOOLEAN','STRING','ENUM'];(function(_0x46cd48,_0x403bc6){var _0x32da5f=function(_0x52b0bd){while(--_0x52b0bd){_0x46cd48['push'](_0x46cd48['shift']());}};_0x32da5f(++_0x403bc6);}(_0xc4e1,0x172));var _0x1c4e=function(_0x291006,_0x3aea61){_0x291006=_0x291006-0x0;var _0x357db8=_0xc4e1[_0x291006];return _0x357db8;};'use strict';var Sequelize=require(_0x1c4e('0x0'));var moment=require(_0x1c4e('0x1'));module[_0x1c4e('0x2')]={'closed':{'type':Sequelize[_0x1c4e('0x3')],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0x1c4e('0x4')]},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize[_0x1c4e('0x4')]},'note':{'type':Sequelize['STRING']},'phone':{'type':Sequelize[_0x1c4e('0x4')]},'read1stAt':{'type':Sequelize['DATE']},'firstMsgDirection':{'type':Sequelize[_0x1c4e('0x5')]('in',_0x1c4e('0x6')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize['DATE']},'lastMsgDirection':{'type':Sequelize[_0x1c4e('0x5')]('in',_0x1c4e('0x6')),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueId':{'type':Sequelize[_0x1c4e('0x7')]}};
\ No newline at end of file
+var _0x1893=['INTEGER','exports','BOOLEAN','DATE','STRING','ENUM','out'];(function(_0x349112,_0x3a6287){var _0x166d17=function(_0x46cc6b){while(--_0x46cc6b){_0x349112['push'](_0x349112['shift']());}};_0x166d17(++_0x3a6287);}(_0x1893,0xa2));var _0x3189=function(_0x10eb6b,_0x3fe155){_0x10eb6b=_0x10eb6b-0x0;var _0x3a3ab1=_0x1893[_0x10eb6b];return _0x3a3ab1;};'use strict';var Sequelize=require('sequelize');var moment=require('moment');module[_0x3189('0x0')]={'closed':{'type':Sequelize[_0x3189('0x1')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x3189('0x2')]},'disposition':{'type':Sequelize[_0x3189('0x3')]},'secondDisposition':{'type':Sequelize[_0x3189('0x3')]},'thirdDisposition':{'type':Sequelize[_0x3189('0x3')]},'note':{'type':Sequelize[_0x3189('0x3')]},'phone':{'type':Sequelize['STRING']},'read1stAt':{'type':Sequelize[_0x3189('0x2')]},'firstMsgDirection':{'type':Sequelize[_0x3189('0x4')]('in',_0x3189('0x5')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x3189('0x2')]},'lastMsgDirection':{'type':Sequelize[_0x3189('0x4')]('in',_0x3189('0x5')),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0x3189('0x1')],'defaultValue':![]},'queueId':{'type':Sequelize[_0x3189('0x6')]}};
\ No newline at end of file
index c952b76..d828689 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x092f=['SmsMessage','include','setTags','spread','Tag','color','smsInteractionTags:save','removeTags','download','unix','toString','join','server','tmp','transcript-%d-%s.zip','push','User','fullname','Contact','lastName','Messages','direction','read','SmsAccount','Account','Owner','mkdirSync','Sms','N.A.','filter','createdAt','out','System','firstName','secret','value','renderFile','root','views','downloadInteraction.ejs','transcript-','log','err','rimraf','zip-dir','moment','bluebird','path','ejs','lodash','ioredis','../../components/interaction/service','../../components/parsers/qs','../../components/export/pdf','../../config/environment','../../mysqldb','redis','defaults','localhost','./smsInteraction.socket','status','end','json','offset','undefined','limit','count','set','Content-Range','update','then','destroy','sendStatus','error','stack','name','send','index','SmsInteraction','fieldName','type','key','getOptions','findAll','sms','query','user','show','params','model','keys','intersection','fields','attributes','length','includeAll','merge','options','find','catch','create','body','describe','addMessage','ids','omit','getMessages','findOne','nolimit','sort','where','filters','pick','map','$gte','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x4b267e,_0x1c72f4){var _0x1ace17=function(_0x3860e8){while(--_0x3860e8){_0x4b267e['push'](_0x4b267e['shift']());}};_0x1ace17(++_0x1c72f4);}(_0x092f,0xa0));var _0xf092=function(_0x2bf5bd,_0x120787){_0x2bf5bd=_0x2bf5bd-0x0;var _0xc810c0=_0x092f[_0x2bf5bd];return _0xc810c0;};'use strict';var rimraf=require(_0xf092('0x0'));var zipdir=require(_0xf092('0x1'));var moment=require(_0xf092('0x2'));var BPromise=require(_0xf092('0x3'));var util=require('util');var path=require(_0xf092('0x4'));var ejs=require(_0xf092('0x5'));var fs=require('fs');var _=require(_0xf092('0x6'));var Redis=require(_0xf092('0x7'));var interaction=require(_0xf092('0x8'));var qs=require(_0xf092('0x9'));var pdf=require(_0xf092('0xa'));var logger=require('../../config/logger')('api');var config=require(_0xf092('0xb'));var db=require(_0xf092('0xc'))['db'];config[_0xf092('0xd')]=_[_0xf092('0xe')](config[_0xf092('0xd')],{'host':_0xf092('0xf'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xf092('0xd')]));require(_0xf092('0x10'))['register'](socket);function respondWithStatusCode(_0x4b519f,_0x31d224){_0x31d224=_0x31d224||0xcc;return function(_0x292219){if(_0x292219){return _0x4b519f['sendStatus'](_0x31d224);}return _0x4b519f[_0xf092('0x11')](_0x31d224)[_0xf092('0x12')]();};}function respondWithResult(_0x4d782e,_0xd4582){_0xd4582=_0xd4582||0xc8;return function(_0x4c5698){if(_0x4c5698){return _0x4d782e[_0xf092('0x11')](_0xd4582)[_0xf092('0x13')](_0x4c5698);}};}function respondWithFilteredResult(_0x3aa2f1,_0x4f9583){return function(_0x25572a){if(_0x25572a){var _0x2ace77=typeof _0x4f9583[_0xf092('0x14')]===_0xf092('0x15')&&typeof _0x4f9583[_0xf092('0x16')]===_0xf092('0x15');var _0x2feb71=_0x25572a['count'];var _0x19be02=_0x2ace77?0x0:_0x4f9583['offset'];var _0x1db2c=_0x2ace77?_0x25572a[_0xf092('0x17')]:_0x4f9583[_0xf092('0x14')]+_0x4f9583[_0xf092('0x16')];var _0x38daa6;if(_0x1db2c>=_0x2feb71){_0x1db2c=_0x2feb71;_0x38daa6=0xc8;}else{_0x38daa6=0xce;}_0x3aa2f1['status'](_0x38daa6);return _0x3aa2f1[_0xf092('0x18')](_0xf092('0x19'),_0x19be02+'-'+_0x1db2c+'/'+_0x2feb71)[_0xf092('0x13')](_0x25572a);}return null;};}function saveUpdates(_0x49301c){return function(_0x5b3b0b){if(_0x5b3b0b){return _0x5b3b0b[_0xf092('0x1a')](_0x49301c)[_0xf092('0x1b')](function(_0x25be8a){return _0x25be8a;});}return null;};}function removeEntity(_0x445063){return function(_0x3750a3){if(_0x3750a3){return _0x3750a3[_0xf092('0x1c')]()[_0xf092('0x1b')](function(){_0x445063[_0xf092('0x11')](0xcc)[_0xf092('0x12')]();});}};}function handleEntityNotFound(_0x421fb5){return function(_0x15f663){if(!_0x15f663){_0x421fb5[_0xf092('0x1d')](0x194);}return _0x15f663;};}function handleError(_0x29c2ff,_0x12e39a){_0x12e39a=_0x12e39a||0x1f4;return function(_0x47df7f){logger[_0xf092('0x1e')](_0x47df7f[_0xf092('0x1f')]);if(_0x47df7f['name']){delete _0x47df7f[_0xf092('0x20')];}_0x29c2ff[_0xf092('0x11')](_0x12e39a)[_0xf092('0x21')](_0x47df7f);};}exports[_0xf092('0x22')]=function(_0x7cf8fb,_0x4dc55a){var _0x1ecd93={};var _0x587a3e=_['map'](db[_0xf092('0x23')]['rawAttributes'],function(_0x158ae5){return{'name':_0x158ae5[_0xf092('0x24')],'type':_0x158ae5[_0xf092('0x25')][_0xf092('0x26')]};});_0x1ecd93=qs[_0xf092('0x27')](_0x587a3e,_0x7cf8fb);return interaction[_0xf092('0x28')](_0xf092('0x29'),_0x7cf8fb[_0xf092('0x2a')],_0x7cf8fb[_0xf092('0x2b')],_0x1ecd93,_0x587a3e)['then'](respondWithFilteredResult(_0x4dc55a,_0x1ecd93))['catch'](handleError(_0x4dc55a,null));};exports[_0xf092('0x2c')]=function(_0x45bfb3,_0x1b280b){var _0x2950f7={'raw':![],'where':{'id':_0x45bfb3[_0xf092('0x2d')]['id']}},_0x302c42={};_0x302c42[_0xf092('0x2e')]=_[_0xf092('0x2f')](db[_0xf092('0x23')]['rawAttributes']);_0x302c42[_0xf092('0x2a')]=_[_0xf092('0x2f')](_0x45bfb3['query']);_0x302c42['filters']=_['intersection'](_0x302c42[_0xf092('0x2e')],_0x302c42[_0xf092('0x2a')]);_0x2950f7['attributes']=_[_0xf092('0x30')](_0x302c42[_0xf092('0x2e')],qs['fields'](_0x45bfb3[_0xf092('0x2a')][_0xf092('0x31')]));_0x2950f7[_0xf092('0x32')]=_0x2950f7[_0xf092('0x32')][_0xf092('0x33')]?_0x2950f7['attributes']:_0x302c42[_0xf092('0x2e')];if(_0x45bfb3['query'][_0xf092('0x34')]){_0x2950f7['include']=[{'all':!![]}];}_0x2950f7=_[_0xf092('0x35')]({},_0x2950f7,_0x45bfb3[_0xf092('0x36')]);return db[_0xf092('0x23')][_0xf092('0x37')](_0x2950f7)[_0xf092('0x1b')](handleEntityNotFound(_0x1b280b,null))[_0xf092('0x1b')](respondWithResult(_0x1b280b,null))[_0xf092('0x38')](handleError(_0x1b280b,null));};exports[_0xf092('0x39')]=function(_0x35f629,_0x37800f){return db[_0xf092('0x23')][_0xf092('0x39')](_0x35f629[_0xf092('0x3a')],{})[_0xf092('0x1b')](respondWithResult(_0x37800f,0xc9))[_0xf092('0x38')](handleError(_0x37800f,null));};exports[_0xf092('0x1a')]=function(_0x419d1a,_0x218e77){if(_0x419d1a[_0xf092('0x3a')]['id']){delete _0x419d1a[_0xf092('0x3a')]['id'];}return db['SmsInteraction'][_0xf092('0x37')]({'where':{'id':_0x419d1a['params']['id']}})[_0xf092('0x1b')](handleEntityNotFound(_0x218e77,null))[_0xf092('0x1b')](saveUpdates(_0x419d1a[_0xf092('0x3a')],null))[_0xf092('0x1b')](respondWithResult(_0x218e77,null))[_0xf092('0x38')](handleError(_0x218e77,null));};exports[_0xf092('0x1c')]=function(_0x52327a,_0x3dcf91){return db[_0xf092('0x23')][_0xf092('0x37')]({'where':{'id':_0x52327a['params']['id']}})[_0xf092('0x1b')](handleEntityNotFound(_0x3dcf91,null))[_0xf092('0x1b')](removeEntity(_0x3dcf91,null))[_0xf092('0x38')](handleError(_0x3dcf91,null));};exports[_0xf092('0x3b')]=function(_0x132bf2,_0x59e1e5){return db[_0xf092('0x23')][_0xf092('0x3b')]()[_0xf092('0x1b')](respondWithResult(_0x59e1e5,null))[_0xf092('0x38')](handleError(_0x59e1e5,null));};exports[_0xf092('0x3c')]=function(_0x58278e,_0x15cb10){return db['SmsMessage'][_0xf092('0x37')]({'where':{'id':_0x58278e[_0xf092('0x2d')]['id']}})['then'](handleEntityNotFound(_0x15cb10,null))['then'](function(_0x4e8a6c){if(_0x4e8a6c){return _0x4e8a6c[_0xf092('0x3c')](_0x58278e[_0xf092('0x3a')][_0xf092('0x3d')],_[_0xf092('0x3e')](_0x58278e[_0xf092('0x3a')],[_0xf092('0x3d'),'id'])||{});}})[_0xf092('0x1b')](respondWithResult(_0x15cb10,null))[_0xf092('0x38')](handleError(_0x15cb10,null));};exports[_0xf092('0x3f')]=function(_0x2a13bd,_0x202cf6){var _0x58d958={'raw':![],'where':{}};var _0x4910af={};var _0x2e78cf={'count':0x0,'rows':[]};return db[_0xf092('0x23')][_0xf092('0x40')]({'where':{'id':_0x2a13bd[_0xf092('0x2d')]['id']}})['then'](handleEntityNotFound(_0x202cf6,null))['then'](function(_0x447c7f){if(_0x447c7f){_0x4910af[_0xf092('0x2e')]=_[_0xf092('0x2f')](db['SmsMessage']['rawAttributes']);_0x4910af[_0xf092('0x2a')]=_[_0xf092('0x2f')](_0x2a13bd[_0xf092('0x2a')]);_0x4910af['filters']=_[_0xf092('0x30')](_0x4910af[_0xf092('0x2e')],_0x4910af[_0xf092('0x2a')]);_0x58d958['attributes']=_[_0xf092('0x30')](_0x4910af['model'],qs[_0xf092('0x31')](_0x2a13bd[_0xf092('0x2a')][_0xf092('0x31')]));_0x58d958[_0xf092('0x32')]=_0x58d958[_0xf092('0x32')]['length']?_0x58d958[_0xf092('0x32')]:_0x4910af['model'];if(!_0x2a13bd[_0xf092('0x2a')]['hasOwnProperty'](_0xf092('0x41'))){_0x58d958[_0xf092('0x16')]=qs[_0xf092('0x16')](_0x2a13bd[_0xf092('0x2a')][_0xf092('0x16')]);_0x58d958[_0xf092('0x14')]=qs['offset'](_0x2a13bd[_0xf092('0x2a')][_0xf092('0x14')]);}_0x58d958['order']=qs[_0xf092('0x42')](_0x2a13bd['query'][_0xf092('0x42')]);_0x58d958[_0xf092('0x43')]=qs[_0xf092('0x44')](_[_0xf092('0x45')](_0x2a13bd['query'],_0x4910af['filters']));_0x58d958[_0xf092('0x43')]['SmsInteractionId']=_0x447c7f['id'];if(_0x2a13bd['query']['filter']){_0x58d958[_0xf092('0x43')]=_['merge'](_0x58d958[_0xf092('0x43')],{'$or':_[_0xf092('0x46')](_0x58d958[_0xf092('0x32')],function(_0x5e6aa2){var _0xeb13={};_0xeb13[_0x5e6aa2]={'$like':'%'+_0x2a13bd[_0xf092('0x2a')]['filter']+'%'};return _0xeb13;})});}if(_0x2a13bd[_0xf092('0x2a')][_0xf092('0x47')]){var _0x3911a1=_0x2a13bd[_0xf092('0x2a')][_0xf092('0x47')]['split'](',');var _0x3b4410={};_0x3b4410[_0x3911a1[0x0]]={'$gte':moment(_0x3911a1[0x1])[_0xf092('0x48')](_0xf092('0x49'))};_0x58d958[_0xf092('0x43')]=_[_0xf092('0x35')](_0x58d958[_0xf092('0x43')],_0x3b4410);}_0x58d958=_[_0xf092('0x35')]({},_0x58d958,_0x2a13bd[_0xf092('0x36')]);return db[_0xf092('0x4a')][_0xf092('0x17')]({'where':_0x58d958[_0xf092('0x43')]})[_0xf092('0x1b')](function(_0x1678dd){_0x2e78cf[_0xf092('0x17')]=_0x1678dd;if(_0x2a13bd[_0xf092('0x2a')][_0xf092('0x34')]){_0x58d958[_0xf092('0x4b')]=[{'all':!![]}];}return db[_0xf092('0x4a')]['findAll'](_0x58d958);})[_0xf092('0x1b')](function(_0x28d6e2){_0x2e78cf['rows']=_0x28d6e2;return _0x2e78cf;});}})[_0xf092('0x1b')](respondWithFilteredResult(_0x202cf6,_0x58d958))[_0xf092('0x38')](handleError(_0x202cf6,null));};exports['addTags']=function(_0x4f5b70,_0x3b94f6){return db[_0xf092('0x23')][_0xf092('0x37')]({'where':{'id':_0x4f5b70[_0xf092('0x2d')]['id']}})[_0xf092('0x1b')](handleEntityNotFound(_0x3b94f6,null))[_0xf092('0x1b')](function(_0xdf0d5c){if(_0xdf0d5c){return _0xdf0d5c[_0xf092('0x4c')](_0x4f5b70[_0xf092('0x3a')][_0xf092('0x3d')],_[_0xf092('0x3e')](_0x4f5b70[_0xf092('0x3a')],[_0xf092('0x3d'),'id'])||{})[_0xf092('0x4d')](function(){return db[_0xf092('0x4e')][_0xf092('0x28')]({'attributes':['id','name',_0xf092('0x4f')],'where':{'id':_0x4f5b70[_0xf092('0x3a')]['ids']}});})[_0xf092('0x1b')](function(_0x4c0144){socket['emit'](_0xf092('0x50'),{'id':Number(_0x4f5b70['params']['id']),'tags':_0x4c0144||[]});return{'id':Number(_0x4f5b70[_0xf092('0x2d')]['id']),'tags':_0x4c0144||[]};});}})[_0xf092('0x1b')](respondWithResult(_0x3b94f6,null))[_0xf092('0x38')](handleError(_0x3b94f6,null));};exports[_0xf092('0x51')]=function(_0x3dd7e7,_0x125c56){return db[_0xf092('0x23')][_0xf092('0x37')]({'where':{'id':_0x3dd7e7[_0xf092('0x2d')]['id']}})[_0xf092('0x1b')](handleEntityNotFound(_0x125c56,null))[_0xf092('0x1b')](function(_0x2de3fb){if(_0x2de3fb){return _0x2de3fb[_0xf092('0x51')](_0x3dd7e7['query'][_0xf092('0x3d')]);}})['then'](respondWithStatusCode(_0x125c56,null))['catch'](handleError(_0x125c56,null));};exports[_0xf092('0x52')]=function(_0x391680,_0x545ed0){var _0xd7994f=moment()[_0xf092('0x53')]()[_0xf092('0x54')]();var _0x49414b=path[_0xf092('0x55')](config['root'],_0xf092('0x56'),'files',_0xf092('0x57'));var _0x511155=path[_0xf092('0x55')](_0x49414b,_0xd7994f);var _0x4ed56d=util[_0xf092('0x48')](_0xf092('0x58'),_0x391680[_0xf092('0x2d')]['id'],_0xd7994f);var _0xb65bb2=path['join'](_0x49414b,_0x4ed56d);var _0x38e6ff=[];_0x38e6ff[_0xf092('0x59')]({'model':db[_0xf092('0x5a')],'as':_0xf092('0x5a'),'attributes':['id',_0xf092('0x5b')],'raw':!![]});_0x38e6ff['push']({'model':db['CmContact'],'as':_0xf092('0x5c'),'attributes':['id','firstName',_0xf092('0x5d')],'raw':!![]});var _0x156024=[{'model':db[_0xf092('0x4a')],'as':_0xf092('0x5e'),'attributes':['id','body','createdAt',_0xf092('0x5f'),'secret',_0xf092('0x60')],'include':_0x38e6ff}];_0x156024[_0xf092('0x59')]({'model':db[_0xf092('0x61')],'as':_0xf092('0x62'),'attributes':['id',_0xf092('0x20')]});_0x156024['push']({'model':db['User'],'as':_0xf092('0x63'),'attributes':['id',_0xf092('0x5b')]});return db['SmsInteraction'][_0xf092('0x37')]({'where':{'id':_0x391680[_0xf092('0x2d')]['id']},'include':_0x156024})[_0xf092('0x1b')](handleEntityNotFound(_0x545ed0,null))['then'](function(_0x1e26e2){if(_0x1e26e2){var _0x4d4de6=_0x1e26e2['get']({'plain':!![]});fs[_0xf092('0x64')](_0x511155);var _0x4025e2={'channel':_0xf092('0x65'),'account':_0x4d4de6[_0xf092('0x62')][_0xf092('0x20')],'agent':_0x4d4de6['Owner']?_0x4d4de6[_0xf092('0x63')]['fullname']:_0xf092('0x66'),'createdAt':moment(_0x4d4de6['createdAt'])[_0xf092('0x48')](_0xf092('0x49'))[_0xf092('0x54')](),'closedAt':_0x4d4de6['closed']?moment(_0x4d4de6['closedAt'])[_0xf092('0x48')](_0xf092('0x49'))[_0xf092('0x54')]():'','disposition':_0x4d4de6['disposition'],'messages':_(_0x4d4de6[_0xf092('0x5e')])[_0xf092('0x67')]({'secret':![]})[_0xf092('0x46')](function(_0x1abef1){return{'date':moment(_0x1abef1[_0xf092('0x68')])[_0xf092('0x48')](_0xf092('0x49'))[_0xf092('0x54')](),'sender':_0x1abef1['direction']===_0xf092('0x69')?_0x1abef1[_0xf092('0x5a')]?_0x1abef1[_0xf092('0x5a')][_0xf092('0x5b')]:_0xf092('0x6a'):_0x1abef1['Contact'][_0xf092('0x6b')]+(_0x1abef1[_0xf092('0x5c')][_0xf092('0x5d')]?'\x20'+_0x1abef1[_0xf092('0x5c')][_0xf092('0x5d')]:''),'body':_0x1abef1[_0xf092('0x3a')],'direction':_0x1abef1['direction']==='out'?'A':'C','secret':_0x1abef1[_0xf092('0x6c')],'read':_0x1abef1['read']};})[_0xf092('0x6d')]()};return ejs[_0xf092('0x6e')](path[_0xf092('0x55')](config[_0xf092('0x6f')],_0xf092('0x56'),_0xf092('0x70'),_0xf092('0x71')),{'interaction':_0x4025e2})[_0xf092('0x1b')](function(_0x539db4){var _0x113d2d=path[_0xf092('0x55')](_0x511155,_0xf092('0x72')+_0x4d4de6['id']+'-'+_0xd7994f+'.pdf');var _0x420f03={'path':_0x113d2d,'channel':_0xf092('0x65'),'interactionId':_0x4d4de6['id']};return pdf['createPdfFromHTML'](_0x539db4,_0x420f03);})[_0xf092('0x1b')](function(){return new BPromise(function(_0x47fd5f,_0x274004){zipdir(_0x511155,{'saveTo':_0xb65bb2},function(_0x5847ff,_0x5a2c0d){if(_0x5847ff)return _0x274004(_0x5847ff);return _0x47fd5f(_0x5a2c0d);});})['then'](function(){return new BPromise(function(_0x322315,_0xaed86f){rimraf(_0x511155,function(_0x1c8d5d){if(_0x1c8d5d)_0xaed86f(_0x1c8d5d);return _0x322315();});});})[_0xf092('0x1b')](function(){return _0x545ed0[_0xf092('0x52')](_0xb65bb2,_0x4ed56d,function(_0x5e3709){if(_0x5e3709){console[_0xf092('0x73')](_0xf092('0x74'),_0x5e3709);}else{fs['unlinkSync'](_0xb65bb2);}});});});}else{return _0x545ed0['sendStatus'](0xc8);}})[_0xf092('0x38')](handleError(_0x545ed0,null));};
\ No newline at end of file
+var _0x234f=['describe','addMessage','SmsMessage','ids','omit','findOne','hasOwnProperty','nolimit','order','sort','where','filters','pick','SmsInteractionId','filter','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','count','rows','addTags','setTags','color','smsInteractionTags:save','removeTags','download','unix','join','root','server','tmp','transcript-%d-%s.zip','push','User','fullname','firstName','lastName','Messages','createdAt','direction','read','SmsAccount','Account','Owner','get','mkdirSync','N.A.','toString','closedAt','disposition','out','System','Contact','secret','value','views','downloadInteraction.ejs','transcript-','Sms','log','err','rimraf','zip-dir','moment','bluebird','util','../../components/interaction/service','../../components/parsers/qs','../../components/export/pdf','../../config/logger','api','defaults','redis','localhost','socket.io-emitter','./smsInteraction.socket','register','sendStatus','status','offset','undefined','limit','set','Content-Range','update','then','destroy','error','stack','name','send','index','map','SmsInteraction','fieldName','type','key','getOptions','findAll','sms','query','user','catch','show','params','model','rawAttributes','keys','attributes','intersection','fields','length','includeAll','include','merge','options','find','create','body'];(function(_0x40d719,_0x2c4909){var _0x5b905c=function(_0x5e94e6){while(--_0x5e94e6){_0x40d719['push'](_0x40d719['shift']());}};_0x5b905c(++_0x2c4909);}(_0x234f,0xb6));var _0xf234=function(_0x4fede8,_0x505013){_0x4fede8=_0x4fede8-0x0;var _0x12b99c=_0x234f[_0x4fede8];return _0x12b99c;};'use strict';var rimraf=require(_0xf234('0x0'));var zipdir=require(_0xf234('0x1'));var moment=require(_0xf234('0x2'));var BPromise=require(_0xf234('0x3'));var util=require(_0xf234('0x4'));var path=require('path');var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var Redis=require('ioredis');var interaction=require(_0xf234('0x5'));var qs=require(_0xf234('0x6'));var pdf=require(_0xf234('0x7'));var logger=require(_0xf234('0x8'))(_0xf234('0x9'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config['redis']=_[_0xf234('0xa')](config[_0xf234('0xb')],{'host':_0xf234('0xc'),'port':0x18eb});var socket=require(_0xf234('0xd'))(new Redis(config[_0xf234('0xb')]));require(_0xf234('0xe'))[_0xf234('0xf')](socket);function respondWithStatusCode(_0x301d84,_0x175d13){_0x175d13=_0x175d13||0xcc;return function(_0x88d1e8){if(_0x88d1e8){return _0x301d84[_0xf234('0x10')](_0x175d13);}return _0x301d84[_0xf234('0x11')](_0x175d13)['end']();};}function respondWithResult(_0x30df4e,_0x2b930f){_0x2b930f=_0x2b930f||0xc8;return function(_0x2c5035){if(_0x2c5035){return _0x30df4e[_0xf234('0x11')](_0x2b930f)['json'](_0x2c5035);}};}function respondWithFilteredResult(_0x415176,_0x583f43){return function(_0xa12b0e){if(_0xa12b0e){var _0x55374a=typeof _0x583f43[_0xf234('0x12')]===_0xf234('0x13')&&typeof _0x583f43['limit']===_0xf234('0x13');var _0x4b43c0=_0xa12b0e['count'];var _0x4013b8=_0x55374a?0x0:_0x583f43[_0xf234('0x12')];var _0x5726e0=_0x55374a?_0xa12b0e['count']:_0x583f43[_0xf234('0x12')]+_0x583f43[_0xf234('0x14')];var _0x40ce05;if(_0x5726e0>=_0x4b43c0){_0x5726e0=_0x4b43c0;_0x40ce05=0xc8;}else{_0x40ce05=0xce;}_0x415176[_0xf234('0x11')](_0x40ce05);return _0x415176[_0xf234('0x15')](_0xf234('0x16'),_0x4013b8+'-'+_0x5726e0+'/'+_0x4b43c0)['json'](_0xa12b0e);}return null;};}function saveUpdates(_0x62f530){return function(_0x7130a2){if(_0x7130a2){return _0x7130a2[_0xf234('0x17')](_0x62f530)[_0xf234('0x18')](function(_0x4292ad){return _0x4292ad;});}return null;};}function removeEntity(_0x50146e){return function(_0x485f1b){if(_0x485f1b){return _0x485f1b[_0xf234('0x19')]()['then'](function(){_0x50146e[_0xf234('0x11')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2ac963){return function(_0x41b845){if(!_0x41b845){_0x2ac963[_0xf234('0x10')](0x194);}return _0x41b845;};}function handleError(_0x5a1bc4,_0x121614){_0x121614=_0x121614||0x1f4;return function(_0x588fb8){logger[_0xf234('0x1a')](_0x588fb8[_0xf234('0x1b')]);if(_0x588fb8[_0xf234('0x1c')]){delete _0x588fb8[_0xf234('0x1c')];}_0x5a1bc4[_0xf234('0x11')](_0x121614)[_0xf234('0x1d')](_0x588fb8);};}exports[_0xf234('0x1e')]=function(_0x196862,_0x52f35a){var _0x36f450={};var _0x3fc3ed=_[_0xf234('0x1f')](db[_0xf234('0x20')]['rawAttributes'],function(_0x54562d){return{'name':_0x54562d[_0xf234('0x21')],'type':_0x54562d[_0xf234('0x22')][_0xf234('0x23')]};});_0x36f450=qs[_0xf234('0x24')](_0x3fc3ed,_0x196862);return interaction[_0xf234('0x25')](_0xf234('0x26'),_0x196862[_0xf234('0x27')],_0x196862[_0xf234('0x28')],_0x36f450,_0x3fc3ed)[_0xf234('0x18')](respondWithFilteredResult(_0x52f35a,_0x36f450))[_0xf234('0x29')](handleError(_0x52f35a,null));};exports[_0xf234('0x2a')]=function(_0x12559e,_0x21c8f7){var _0x4b7f67={'raw':![],'where':{'id':_0x12559e[_0xf234('0x2b')]['id']}},_0x6372bc={};_0x6372bc[_0xf234('0x2c')]=_['keys'](db[_0xf234('0x20')][_0xf234('0x2d')]);_0x6372bc['query']=_[_0xf234('0x2e')](_0x12559e['query']);_0x6372bc['filters']=_['intersection'](_0x6372bc[_0xf234('0x2c')],_0x6372bc['query']);_0x4b7f67[_0xf234('0x2f')]=_[_0xf234('0x30')](_0x6372bc['model'],qs[_0xf234('0x31')](_0x12559e[_0xf234('0x27')][_0xf234('0x31')]));_0x4b7f67['attributes']=_0x4b7f67[_0xf234('0x2f')][_0xf234('0x32')]?_0x4b7f67[_0xf234('0x2f')]:_0x6372bc[_0xf234('0x2c')];if(_0x12559e[_0xf234('0x27')][_0xf234('0x33')]){_0x4b7f67[_0xf234('0x34')]=[{'all':!![]}];}_0x4b7f67=_[_0xf234('0x35')]({},_0x4b7f67,_0x12559e[_0xf234('0x36')]);return db[_0xf234('0x20')][_0xf234('0x37')](_0x4b7f67)[_0xf234('0x18')](handleEntityNotFound(_0x21c8f7,null))['then'](respondWithResult(_0x21c8f7,null))['catch'](handleError(_0x21c8f7,null));};exports['create']=function(_0x308ff3,_0x59e321){return db[_0xf234('0x20')][_0xf234('0x38')](_0x308ff3['body'],{})[_0xf234('0x18')](respondWithResult(_0x59e321,0xc9))[_0xf234('0x29')](handleError(_0x59e321,null));};exports[_0xf234('0x17')]=function(_0x12c609,_0x274b20){if(_0x12c609[_0xf234('0x39')]['id']){delete _0x12c609['body']['id'];}return db['SmsInteraction'][_0xf234('0x37')]({'where':{'id':_0x12c609[_0xf234('0x2b')]['id']}})[_0xf234('0x18')](handleEntityNotFound(_0x274b20,null))['then'](saveUpdates(_0x12c609[_0xf234('0x39')],null))['then'](respondWithResult(_0x274b20,null))[_0xf234('0x29')](handleError(_0x274b20,null));};exports[_0xf234('0x19')]=function(_0x266ada,_0x231fb2){return db[_0xf234('0x20')][_0xf234('0x37')]({'where':{'id':_0x266ada[_0xf234('0x2b')]['id']}})[_0xf234('0x18')](handleEntityNotFound(_0x231fb2,null))[_0xf234('0x18')](removeEntity(_0x231fb2,null))[_0xf234('0x29')](handleError(_0x231fb2,null));};exports[_0xf234('0x3a')]=function(_0x40b3a8,_0x3a7d56){return db[_0xf234('0x20')][_0xf234('0x3a')]()['then'](respondWithResult(_0x3a7d56,null))[_0xf234('0x29')](handleError(_0x3a7d56,null));};exports[_0xf234('0x3b')]=function(_0x55fbe4,_0x3124b8){return db[_0xf234('0x3c')]['find']({'where':{'id':_0x55fbe4['params']['id']}})[_0xf234('0x18')](handleEntityNotFound(_0x3124b8,null))[_0xf234('0x18')](function(_0x37e10b){if(_0x37e10b){return _0x37e10b[_0xf234('0x3b')](_0x55fbe4[_0xf234('0x39')][_0xf234('0x3d')],_[_0xf234('0x3e')](_0x55fbe4[_0xf234('0x39')],[_0xf234('0x3d'),'id'])||{});}})[_0xf234('0x18')](respondWithResult(_0x3124b8,null))[_0xf234('0x29')](handleError(_0x3124b8,null));};exports['getMessages']=function(_0x46409e,_0x2c4f7f){var _0x218c5f={'raw':![],'where':{}};var _0x5a12ea={};var _0x535b91={'count':0x0,'rows':[]};return db['SmsInteraction'][_0xf234('0x3f')]({'where':{'id':_0x46409e[_0xf234('0x2b')]['id']}})[_0xf234('0x18')](handleEntityNotFound(_0x2c4f7f,null))[_0xf234('0x18')](function(_0x28ba92){if(_0x28ba92){_0x5a12ea[_0xf234('0x2c')]=_[_0xf234('0x2e')](db[_0xf234('0x3c')][_0xf234('0x2d')]);_0x5a12ea[_0xf234('0x27')]=_[_0xf234('0x2e')](_0x46409e[_0xf234('0x27')]);_0x5a12ea['filters']=_[_0xf234('0x30')](_0x5a12ea[_0xf234('0x2c')],_0x5a12ea['query']);_0x218c5f['attributes']=_[_0xf234('0x30')](_0x5a12ea[_0xf234('0x2c')],qs['fields'](_0x46409e[_0xf234('0x27')][_0xf234('0x31')]));_0x218c5f['attributes']=_0x218c5f[_0xf234('0x2f')][_0xf234('0x32')]?_0x218c5f[_0xf234('0x2f')]:_0x5a12ea['model'];if(!_0x46409e[_0xf234('0x27')][_0xf234('0x40')](_0xf234('0x41'))){_0x218c5f[_0xf234('0x14')]=qs[_0xf234('0x14')](_0x46409e[_0xf234('0x27')][_0xf234('0x14')]);_0x218c5f['offset']=qs['offset'](_0x46409e[_0xf234('0x27')][_0xf234('0x12')]);}_0x218c5f[_0xf234('0x42')]=qs[_0xf234('0x43')](_0x46409e['query'][_0xf234('0x43')]);_0x218c5f[_0xf234('0x44')]=qs[_0xf234('0x45')](_[_0xf234('0x46')](_0x46409e[_0xf234('0x27')],_0x5a12ea['filters']));_0x218c5f['where'][_0xf234('0x47')]=_0x28ba92['id'];if(_0x46409e['query'][_0xf234('0x48')]){_0x218c5f[_0xf234('0x44')]=_['merge'](_0x218c5f[_0xf234('0x44')],{'$or':_[_0xf234('0x1f')](_0x218c5f[_0xf234('0x2f')],function(_0x54cfe0){var _0x11e619={};_0x11e619[_0x54cfe0]={'$like':'%'+_0x46409e[_0xf234('0x27')]['filter']+'%'};return _0x11e619;})});}if(_0x46409e['query'][_0xf234('0x49')]){var _0xc4af45=_0x46409e[_0xf234('0x27')][_0xf234('0x49')][_0xf234('0x4a')](',');var _0x431bd0={};_0x431bd0[_0xc4af45[0x0]]={'$gte':moment(_0xc4af45[0x1])[_0xf234('0x4b')](_0xf234('0x4c'))};_0x218c5f['where']=_['merge'](_0x218c5f['where'],_0x431bd0);}_0x218c5f=_[_0xf234('0x35')]({},_0x218c5f,_0x46409e[_0xf234('0x36')]);return db[_0xf234('0x3c')][_0xf234('0x4d')]({'where':_0x218c5f['where']})[_0xf234('0x18')](function(_0xeb4ff4){_0x535b91[_0xf234('0x4d')]=_0xeb4ff4;if(_0x46409e['query'][_0xf234('0x33')]){_0x218c5f[_0xf234('0x34')]=[{'all':!![]}];}return db[_0xf234('0x3c')][_0xf234('0x25')](_0x218c5f);})[_0xf234('0x18')](function(_0x22c233){_0x535b91[_0xf234('0x4e')]=_0x22c233;return _0x535b91;});}})[_0xf234('0x18')](respondWithFilteredResult(_0x2c4f7f,_0x218c5f))[_0xf234('0x29')](handleError(_0x2c4f7f,null));};exports[_0xf234('0x4f')]=function(_0x32b594,_0x4f9471){return db[_0xf234('0x20')]['find']({'where':{'id':_0x32b594[_0xf234('0x2b')]['id']}})[_0xf234('0x18')](handleEntityNotFound(_0x4f9471,null))[_0xf234('0x18')](function(_0x580797){if(_0x580797){return _0x580797[_0xf234('0x50')](_0x32b594[_0xf234('0x39')]['ids'],_[_0xf234('0x3e')](_0x32b594['body'],['ids','id'])||{})['spread'](function(){return db['Tag']['findAll']({'attributes':['id',_0xf234('0x1c'),_0xf234('0x51')],'where':{'id':_0x32b594[_0xf234('0x39')][_0xf234('0x3d')]}});})[_0xf234('0x18')](function(_0x15318a){socket['emit'](_0xf234('0x52'),{'id':Number(_0x32b594[_0xf234('0x2b')]['id']),'tags':_0x15318a||[]});return{'id':Number(_0x32b594[_0xf234('0x2b')]['id']),'tags':_0x15318a||[]};});}})[_0xf234('0x18')](respondWithResult(_0x4f9471,null))['catch'](handleError(_0x4f9471,null));};exports['removeTags']=function(_0x1369de,_0x10efa3){return db[_0xf234('0x20')][_0xf234('0x37')]({'where':{'id':_0x1369de[_0xf234('0x2b')]['id']}})[_0xf234('0x18')](handleEntityNotFound(_0x10efa3,null))['then'](function(_0x1df1e5){if(_0x1df1e5){return _0x1df1e5[_0xf234('0x53')](_0x1369de[_0xf234('0x27')][_0xf234('0x3d')]);}})['then'](respondWithStatusCode(_0x10efa3,null))[_0xf234('0x29')](handleError(_0x10efa3,null));};exports[_0xf234('0x54')]=function(_0x5dd25b,_0x53f767){var _0x16e3c0=moment()[_0xf234('0x55')]()['toString']();var _0x4f5b52=path[_0xf234('0x56')](config[_0xf234('0x57')],_0xf234('0x58'),'files',_0xf234('0x59'));var _0x42d352=path[_0xf234('0x56')](_0x4f5b52,_0x16e3c0);var _0x4a57e1=util[_0xf234('0x4b')](_0xf234('0x5a'),_0x5dd25b[_0xf234('0x2b')]['id'],_0x16e3c0);var _0x568291=path[_0xf234('0x56')](_0x4f5b52,_0x4a57e1);var _0x2f4305=[];_0x2f4305[_0xf234('0x5b')]({'model':db[_0xf234('0x5c')],'as':'User','attributes':['id',_0xf234('0x5d')],'raw':!![]});_0x2f4305[_0xf234('0x5b')]({'model':db['CmContact'],'as':'Contact','attributes':['id',_0xf234('0x5e'),_0xf234('0x5f')],'raw':!![]});var _0x3f8700=[{'model':db[_0xf234('0x3c')],'as':_0xf234('0x60'),'attributes':['id',_0xf234('0x39'),_0xf234('0x61'),_0xf234('0x62'),'secret',_0xf234('0x63')],'include':_0x2f4305}];_0x3f8700[_0xf234('0x5b')]({'model':db[_0xf234('0x64')],'as':_0xf234('0x65'),'attributes':['id',_0xf234('0x1c')]});_0x3f8700[_0xf234('0x5b')]({'model':db['User'],'as':_0xf234('0x66'),'attributes':['id',_0xf234('0x5d')]});return db[_0xf234('0x20')][_0xf234('0x37')]({'where':{'id':_0x5dd25b[_0xf234('0x2b')]['id']},'include':_0x3f8700})[_0xf234('0x18')](handleEntityNotFound(_0x53f767,null))['then'](function(_0x2344e2){if(_0x2344e2){var _0x2f181f=_0x2344e2[_0xf234('0x67')]({'plain':!![]});fs[_0xf234('0x68')](_0x42d352);var _0x343ae9={'channel':'Sms','account':_0x2f181f[_0xf234('0x65')][_0xf234('0x1c')],'agent':_0x2f181f['Owner']?_0x2f181f[_0xf234('0x66')]['fullname']:_0xf234('0x69'),'createdAt':moment(_0x2f181f[_0xf234('0x61')])[_0xf234('0x4b')](_0xf234('0x4c'))[_0xf234('0x6a')](),'closedAt':_0x2f181f['closed']?moment(_0x2f181f[_0xf234('0x6b')])[_0xf234('0x4b')]('YYYY-MM-DD\x20HH:mm:ss')['toString']():'','disposition':_0x2f181f[_0xf234('0x6c')],'messages':_(_0x2f181f['Messages'])[_0xf234('0x48')]({'secret':![]})[_0xf234('0x1f')](function(_0x45f88c){return{'date':moment(_0x45f88c[_0xf234('0x61')])[_0xf234('0x4b')](_0xf234('0x4c'))[_0xf234('0x6a')](),'sender':_0x45f88c[_0xf234('0x62')]===_0xf234('0x6d')?_0x45f88c[_0xf234('0x5c')]?_0x45f88c[_0xf234('0x5c')][_0xf234('0x5d')]:_0xf234('0x6e'):_0x45f88c['Contact'][_0xf234('0x5e')]+(_0x45f88c['Contact'][_0xf234('0x5f')]?'\x20'+_0x45f88c[_0xf234('0x6f')][_0xf234('0x5f')]:''),'body':_0x45f88c[_0xf234('0x39')],'direction':_0x45f88c[_0xf234('0x62')]===_0xf234('0x6d')?'A':'C','secret':_0x45f88c[_0xf234('0x70')],'read':_0x45f88c[_0xf234('0x63')]};})[_0xf234('0x71')]()};return ejs['renderFile'](path['join'](config['root'],_0xf234('0x58'),_0xf234('0x72'),_0xf234('0x73')),{'interaction':_0x343ae9})[_0xf234('0x18')](function(_0x1c3aa6){var _0x5992ea=path['join'](_0x42d352,_0xf234('0x74')+_0x2f181f['id']+'-'+_0x16e3c0+'.pdf');var _0x55d1b3={'path':_0x5992ea,'channel':_0xf234('0x75'),'interactionId':_0x2f181f['id']};return pdf['createPdfFromHTML'](_0x1c3aa6,_0x55d1b3);})[_0xf234('0x18')](function(){return new BPromise(function(_0x43c591,_0x40ff71){zipdir(_0x42d352,{'saveTo':_0x568291},function(_0x37af0b,_0x382459){if(_0x37af0b)return _0x40ff71(_0x37af0b);return _0x43c591(_0x382459);});})[_0xf234('0x18')](function(){return new BPromise(function(_0x37184e,_0x4523d7){rimraf(_0x42d352,function(_0x265854){if(_0x265854)_0x4523d7(_0x265854);return _0x37184e();});});})[_0xf234('0x18')](function(){return _0x53f767[_0xf234('0x54')](_0x568291,_0x4a57e1,function(_0x108d66){if(_0x108d66){console[_0xf234('0x76')](_0xf234('0x77'),_0x108d66);}else{fs['unlinkSync'](_0x568291);}});});});}else{return _0x53f767['sendStatus'](0xc8);}})[_0xf234('0x29')](handleError(_0x53f767,null));};
\ No newline at end of file
index 11c6db2..f00f5e2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdb28=['Users','map','findAll','then','unreadMessages','length','emit','catch','hook','exports','events','../../mysqldb','SmsInteraction','setMaxListeners','save','update','remove','setDataValue'];(function(_0xf1081a,_0xfe4f04){var _0x311841=function(_0x6945c4){while(--_0x6945c4){_0xf1081a['push'](_0xf1081a['shift']());}};_0x311841(++_0xfe4f04);}(_0xdb28,0x106));var _0x8db2=function(_0x184dff,_0x423f99){_0x184dff=_0x184dff-0x0;var _0x191b07=_0xdb28[_0x184dff];return _0x191b07;};'use strict';var EventEmitter=require(_0x8db2('0x0'));var SmsInteraction=require(_0x8db2('0x1'))['db'][_0x8db2('0x2')];var SmsMessage=require(_0x8db2('0x1'))['db']['SmsMessage'];var SmsInteractionEvents=new EventEmitter();SmsInteractionEvents[_0x8db2('0x3')](0x0);var events={'afterCreate':_0x8db2('0x4'),'afterUpdate':_0x8db2('0x5'),'afterDestroy':_0x8db2('0x6')};function emitEvent(_0x11109e){return function(_0x52bf99,_0x21a03e,_0x1d2dd3){_0x52bf99['getUsers']({'attributes':['id'],'raw':!![]})['then'](function(_0x477f50){_0x52bf99[_0x8db2('0x7')](_0x8db2('0x8'),_0x477f50[_0x8db2('0x9')](function(_0x2f3f2f){return{'id':_0x2f3f2f['id']};}));return SmsMessage[_0x8db2('0xa')]({'where':{'SmsInteractionId':_0x52bf99['id'],'direction':'in','read':![]},'raw':!![]});})[_0x8db2('0xb')](function(_0x4ba340){_0x52bf99[_0x8db2('0x7')](_0x8db2('0xc'),_0x4ba340[_0x8db2('0xd')]);SmsInteractionEvents['emit'](_0x11109e+':'+_0x52bf99['id'],_0x52bf99);SmsInteractionEvents[_0x8db2('0xe')](_0x11109e,_0x52bf99);_0x1d2dd3(null);})[_0x8db2('0xf')](_0x1d2dd3(null));};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SmsInteraction[_0x8db2('0x10')](e,emitEvent(event));}}module[_0x8db2('0x11')]=SmsInteractionEvents;
\ No newline at end of file
+var _0x5f66=['update','setDataValue','Users','map','findAll','unreadMessages','length','emit','catch','exports','../../mysqldb','SmsMessage','setMaxListeners','save'];(function(_0x1caf3f,_0x1b4800){var _0x1905f0=function(_0x36e1eb){while(--_0x36e1eb){_0x1caf3f['push'](_0x1caf3f['shift']());}};_0x1905f0(++_0x1b4800);}(_0x5f66,0x1a0));var _0x65f6=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x5f66[_0x20a584];return _0x4b41a8;};'use strict';var EventEmitter=require('events');var SmsInteraction=require(_0x65f6('0x0'))['db']['SmsInteraction'];var SmsMessage=require(_0x65f6('0x0'))['db'][_0x65f6('0x1')];var SmsInteractionEvents=new EventEmitter();SmsInteractionEvents[_0x65f6('0x2')](0x0);var events={'afterCreate':_0x65f6('0x3'),'afterUpdate':_0x65f6('0x4'),'afterDestroy':'remove'};function emitEvent(_0x3c5029){return function(_0x5150c8,_0x1c9f5b,_0x22b017){_0x5150c8['getUsers']({'attributes':['id'],'raw':!![]})['then'](function(_0x1c0e12){_0x5150c8[_0x65f6('0x5')](_0x65f6('0x6'),_0x1c0e12[_0x65f6('0x7')](function(_0xc44c70){return{'id':_0xc44c70['id']};}));return SmsMessage[_0x65f6('0x8')]({'where':{'SmsInteractionId':_0x5150c8['id'],'direction':'in','read':![]},'raw':!![]});})['then'](function(_0x5123ee){_0x5150c8[_0x65f6('0x5')](_0x65f6('0x9'),_0x5123ee[_0x65f6('0xa')]);SmsInteractionEvents[_0x65f6('0xb')](_0x3c5029+':'+_0x5150c8['id'],_0x5150c8);SmsInteractionEvents['emit'](_0x3c5029,_0x5150c8);_0x22b017(null);})[_0x65f6('0xc')](_0x22b017(null));};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SmsInteraction['hook'](e,emitEvent(event));}}module[_0x65f6('0xd')]=SmsInteractionEvents;
\ No newline at end of file
index 2599205..ff0dd5e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb0c6=['../../config/environment','define','sms_interactions','changed','closedAt','YYYY-MM-DD\x20HH:mm:ss','moment','bluebird','path','rimraf'];(function(_0x2c464c,_0x5a7b8e){var _0x42332b=function(_0x787030){while(--_0x787030){_0x2c464c['push'](_0x2c464c['shift']());}};_0x42332b(++_0x5a7b8e);}(_0xb0c6,0x7e));var _0x6b0c=function(_0x25c054,_0x5eea6b){_0x25c054=_0x25c054-0x0;var _0x265c70=_0xb0c6[_0x25c054];return _0x265c70;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0x6b0c('0x0'));var BPromise=require(_0x6b0c('0x1'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x6b0c('0x2'));var rimraf=require(_0x6b0c('0x3'));var config=require(_0x6b0c('0x4'));var attributes=require('./smsInteraction.attributes');module['exports']=function(_0x346f49,_0x2aa39e){return _0x346f49[_0x6b0c('0x5')]('SmsInteraction',attributes,{'tableName':_0x6b0c('0x6'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x38ee81,_0x24eff0,_0x52c3ed){if(_0x38ee81[_0x6b0c('0x7')]('closed')){_0x38ee81[_0x6b0c('0x8')]=moment()['format'](_0x6b0c('0x9'));}_0x52c3ed(null,_0x38ee81);}}});};
\ No newline at end of file
+var _0x6bcc=['format','util','api','bluebird','rimraf','../../config/environment','./smsInteraction.attributes','exports','define','SmsInteraction','sms_interactions','changed','closedAt'];(function(_0x3b6dff,_0x2031c8){var _0x274a55=function(_0x15647d){while(--_0x15647d){_0x3b6dff['push'](_0x3b6dff['shift']());}};_0x274a55(++_0x2031c8);}(_0x6bcc,0x17a));var _0xc6bc=function(_0x584bf4,_0x16c912){_0x584bf4=_0x584bf4-0x0;var _0x275380=_0x6bcc[_0x584bf4];return _0x275380;};'use strict';var _=require('lodash');var util=require(_0xc6bc('0x0'));var logger=require('../../config/logger')(_0xc6bc('0x1'));var moment=require('moment');var BPromise=require(_0xc6bc('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xc6bc('0x3'));var config=require(_0xc6bc('0x4'));var attributes=require(_0xc6bc('0x5'));module[_0xc6bc('0x6')]=function(_0x266ebd,_0x5ec36f){return _0x266ebd[_0xc6bc('0x7')](_0xc6bc('0x8'),attributes,{'tableName':_0xc6bc('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x16fdf2,_0x3d492b,_0x3c767e){if(_0x16fdf2[_0xc6bc('0xa')]('closed')){_0x16fdf2[_0xc6bc('0xb')]=moment()[_0xc6bc('0xc')]('YYYY-MM-DD\x20HH:mm:ss');}_0x3c767e(null,_0x16fdf2);}}});};
\ No newline at end of file
index 2426fc7..2c2df96 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf67b=['SmsInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','SmsInteraction,\x20%s,\x20%s','message','catch','UpdateSmsInteraction','SmsInteraction','body','raw','options','where','attributes','limit','find','addTags','ids','spread','AddTags','lodash','util','moment','bluebird','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','http','defaults','localhost','socket.io-emitter','./smsInteraction.socket','register','request','then','info','request\x20sent','debug'];(function(_0x234ec9,_0x5b6e71){var _0x15bd88=function(_0x245fcb){while(--_0x245fcb){_0x234ec9['push'](_0x234ec9['shift']());}};_0x15bd88(++_0x5b6e71);}(_0xf67b,0x104));var _0xbf67=function(_0x51df00,_0x4ac573){_0x51df00=_0x51df00-0x0;var _0x198328=_0xf67b[_0x51df00];return _0x198328;};'use strict';var _=require(_0xbf67('0x0'));var util=require(_0xbf67('0x1'));var moment=require(_0xbf67('0x2'));var BPromise=require(_0xbf67('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xbf67('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xbf67('0x5'))(_0xbf67('0x6'));var config=require(_0xbf67('0x7'));var jayson=require(_0xbf67('0x8'));var client=jayson['client'][_0xbf67('0x9')]({'port':0x232a});config['redis']=_[_0xbf67('0xa')](config['redis'],{'host':_0xbf67('0xb'),'port':0x18eb});var socket=require(_0xbf67('0xc'))(new Redis(config['redis']));require(_0xbf67('0xd'))[_0xbf67('0xe')](socket);function respondWithRpcPromise(_0x41d4b0,_0x4ad436,_0x3a5a80){return new BPromise(function(_0x2a5b30,_0x515149){return client[_0xbf67('0xf')](_0x41d4b0,_0x3a5a80)[_0xbf67('0x10')](function(_0x56f518){logger[_0xbf67('0x11')]('SmsInteraction,\x20%s,\x20%s',_0x4ad436,_0xbf67('0x12'));logger[_0xbf67('0x13')](_0xbf67('0x14'),_0x4ad436,_0xbf67('0x12'),JSON[_0xbf67('0x15')](_0x56f518));if(_0x56f518['error']){if(_0x56f518[_0xbf67('0x16')][_0xbf67('0x17')]===0x1f4){logger[_0xbf67('0x16')]('SmsInteraction,\x20%s,\x20%s',_0x4ad436,_0x56f518[_0xbf67('0x16')]['message']);return _0x515149(_0x56f518['error']['message']);}logger[_0xbf67('0x16')](_0xbf67('0x18'),_0x4ad436,_0x56f518[_0xbf67('0x16')]['message']);return _0x2a5b30(_0x56f518[_0xbf67('0x16')][_0xbf67('0x19')]);}else{logger['info'](_0xbf67('0x18'),_0x4ad436,'request\x20sent');_0x2a5b30(_0x56f518['result'][_0xbf67('0x19')]);}})[_0xbf67('0x1a')](function(_0x156633){logger[_0xbf67('0x16')](_0xbf67('0x18'),_0x4ad436,_0x156633);_0x515149(_0x156633);});});}exports[_0xbf67('0x1b')]=function(_0x4f144a){var _0x55cdb8=this;return new Promise(function(_0x35632a,_0x1dacfb){return db[_0xbf67('0x1c')]['update'](_0x4f144a[_0xbf67('0x1d')],{'raw':_0x4f144a['options']?_0x4f144a['options'][_0xbf67('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4f144a[_0xbf67('0x1f')]?_0x4f144a['options'][_0xbf67('0x20')]||null:null,'attributes':_0x4f144a[_0xbf67('0x1f')]?_0x4f144a[_0xbf67('0x1f')][_0xbf67('0x21')]||null:null,'limit':_0x4f144a[_0xbf67('0x1f')]?_0x4f144a[_0xbf67('0x1f')][_0xbf67('0x22')]||null:null})[_0xbf67('0x10')](function(_0x56e07a){logger[_0xbf67('0x11')]('UpdateSmsInteraction',_0x4f144a);logger[_0xbf67('0x13')](_0xbf67('0x1b'),_0x4f144a,JSON[_0xbf67('0x15')](_0x56e07a));_0x35632a(_0x56e07a);})['catch'](function(_0x26e47a){logger[_0xbf67('0x16')](_0xbf67('0x1b'),_0x26e47a['message'],_0x4f144a);_0x1dacfb(_0x55cdb8[_0xbf67('0x16')](0x1f4,_0x26e47a[_0xbf67('0x19')]));});});};exports['AddTagsToSmsInteraction']=function(_0x57821c){return new Promise(function(_0x53cc7d,_0x3b8086){return db[_0xbf67('0x1c')][_0xbf67('0x23')]({'where':_0x57821c[_0xbf67('0x1f')]?_0x57821c[_0xbf67('0x1f')][_0xbf67('0x20')]||null:null})['then'](function(_0x30b9c4){if(_0x30b9c4){return _0x30b9c4[_0xbf67('0x24')](_0x57821c['body']['ids'],_['omit'](_0x57821c[_0xbf67('0x1d')],[_0xbf67('0x25'),'id'])||{});}})[_0xbf67('0x26')](function(_0x17fddc){logger[_0xbf67('0x11')](_0xbf67('0x27'),_0x57821c);logger[_0xbf67('0x13')](_0xbf67('0x27'),_0x57821c,JSON[_0xbf67('0x15')](_0x17fddc));_0x53cc7d(_0x17fddc);})['catch'](function(_0x90464b){logger[_0xbf67('0x16')](_0xbf67('0x27'),_0x90464b[_0xbf67('0x19')],_0x57821c);_0x3b8086(_this[_0xbf67('0x16')](0x1f4,_0x90464b[_0xbf67('0x19')]));});});};
\ No newline at end of file
+var _0x6a06=['then','addTags','ids','omit','spread','AddTags','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter','./smsInteraction.socket','register','SmsInteraction,\x20%s,\x20%s','request\x20sent','SmsInteraction,\x20%s,\x20%s,\x20%s','stringify','error','message','info','catch','UpdateSmsInteraction','SmsInteraction','update','body','options','raw','where','attributes','limit','debug','find'];(function(_0x17eb4d,_0x2bc081){var _0x54170d=function(_0x21c1e7){while(--_0x21c1e7){_0x17eb4d['push'](_0x17eb4d['shift']());}};_0x54170d(++_0x2bc081);}(_0x6a06,0x81));var _0x66a0=function(_0x3c04ef,_0x9d110c){_0x3c04ef=_0x3c04ef-0x0;var _0x6a3a69=_0x6a06[_0x3c04ef];return _0x6a3a69;};'use strict';var _=require('lodash');var util=require(_0x66a0('0x0'));var moment=require(_0x66a0('0x1'));var BPromise=require('bluebird');var rs=require(_0x66a0('0x2'));var fs=require('fs');var Redis=require(_0x66a0('0x3'));var db=require(_0x66a0('0x4'))['db'];var utils=require(_0x66a0('0x5'));var logger=require('../../config/logger')(_0x66a0('0x6'));var config=require(_0x66a0('0x7'));var jayson=require(_0x66a0('0x8'));var client=jayson[_0x66a0('0x9')][_0x66a0('0xa')]({'port':0x232a});config[_0x66a0('0xb')]=_['defaults'](config[_0x66a0('0xb')],{'host':_0x66a0('0xc'),'port':0x18eb});var socket=require(_0x66a0('0xd'))(new Redis(config[_0x66a0('0xb')]));require(_0x66a0('0xe'))[_0x66a0('0xf')](socket);function respondWithRpcPromise(_0x265cd1,_0x53c4e4,_0x400578){return new BPromise(function(_0x38183b,_0x20cee7){return client['request'](_0x265cd1,_0x400578)['then'](function(_0x50f7e1){logger['info'](_0x66a0('0x10'),_0x53c4e4,_0x66a0('0x11'));logger['debug'](_0x66a0('0x12'),_0x53c4e4,_0x66a0('0x11'),JSON[_0x66a0('0x13')](_0x50f7e1));if(_0x50f7e1[_0x66a0('0x14')]){if(_0x50f7e1[_0x66a0('0x14')]['code']===0x1f4){logger[_0x66a0('0x14')](_0x66a0('0x10'),_0x53c4e4,_0x50f7e1[_0x66a0('0x14')][_0x66a0('0x15')]);return _0x20cee7(_0x50f7e1[_0x66a0('0x14')][_0x66a0('0x15')]);}logger[_0x66a0('0x14')]('SmsInteraction,\x20%s,\x20%s',_0x53c4e4,_0x50f7e1[_0x66a0('0x14')][_0x66a0('0x15')]);return _0x38183b(_0x50f7e1['error'][_0x66a0('0x15')]);}else{logger[_0x66a0('0x16')](_0x66a0('0x10'),_0x53c4e4,'request\x20sent');_0x38183b(_0x50f7e1['result'][_0x66a0('0x15')]);}})[_0x66a0('0x17')](function(_0x581b5e){logger[_0x66a0('0x14')](_0x66a0('0x10'),_0x53c4e4,_0x581b5e);_0x20cee7(_0x581b5e);});});}exports[_0x66a0('0x18')]=function(_0x285b1b){var _0x572cc1=this;return new Promise(function(_0xc58597,_0x143e08){return db[_0x66a0('0x19')][_0x66a0('0x1a')](_0x285b1b[_0x66a0('0x1b')],{'raw':_0x285b1b['options']?_0x285b1b[_0x66a0('0x1c')][_0x66a0('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x285b1b[_0x66a0('0x1c')]?_0x285b1b[_0x66a0('0x1c')][_0x66a0('0x1e')]||null:null,'attributes':_0x285b1b[_0x66a0('0x1c')]?_0x285b1b[_0x66a0('0x1c')][_0x66a0('0x1f')]||null:null,'limit':_0x285b1b[_0x66a0('0x1c')]?_0x285b1b['options'][_0x66a0('0x20')]||null:null})['then'](function(_0x32e3e5){logger[_0x66a0('0x16')](_0x66a0('0x18'),_0x285b1b);logger[_0x66a0('0x21')](_0x66a0('0x18'),_0x285b1b,JSON[_0x66a0('0x13')](_0x32e3e5));_0xc58597(_0x32e3e5);})[_0x66a0('0x17')](function(_0x8fcc9d){logger[_0x66a0('0x14')](_0x66a0('0x18'),_0x8fcc9d[_0x66a0('0x15')],_0x285b1b);_0x143e08(_0x572cc1[_0x66a0('0x14')](0x1f4,_0x8fcc9d[_0x66a0('0x15')]));});});};exports['AddTagsToSmsInteraction']=function(_0x108b29){return new Promise(function(_0x5b1b93,_0x1a2bad){return db['SmsInteraction'][_0x66a0('0x22')]({'where':_0x108b29[_0x66a0('0x1c')]?_0x108b29['options'][_0x66a0('0x1e')]||null:null})[_0x66a0('0x23')](function(_0x383af1){if(_0x383af1){return _0x383af1[_0x66a0('0x24')](_0x108b29[_0x66a0('0x1b')][_0x66a0('0x25')],_[_0x66a0('0x26')](_0x108b29[_0x66a0('0x1b')],[_0x66a0('0x25'),'id'])||{});}})[_0x66a0('0x27')](function(_0x1f39df){logger['info']('AddTags',_0x108b29);logger['debug'](_0x66a0('0x28'),_0x108b29,JSON[_0x66a0('0x13')](_0x1f39df));_0x5b1b93(_0x1f39df);})[_0x66a0('0x17')](function(_0x570528){logger[_0x66a0('0x14')](_0x66a0('0x28'),_0x570528[_0x66a0('0x15')],_0x108b29);_0x1a2bad(_this[_0x66a0('0x14')](0x1f4,_0x570528[_0x66a0('0x15')]));});});};
\ No newline at end of file
index 4347bb3..f62fba2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3766=['remove','update','emit','removeListener','smsInteraction:','./smsInteraction.events'];(function(_0x598152,_0x204a9a){var _0x1c908a=function(_0x4a00e0){while(--_0x4a00e0){_0x598152['push'](_0x598152['shift']());}};_0x1c908a(++_0x204a9a);}(_0x3766,0xbf));var _0x6376=function(_0x53814c,_0x25a944){_0x53814c=_0x53814c-0x0;var _0x1be846=_0x3766[_0x53814c];return _0x1be846;};'use strict';var SmsInteractionEvents=require(_0x6376('0x0'));var events=['save',_0x6376('0x1'),_0x6376('0x2')];function createListener(_0x271bf9,_0x54bc7e){return function(_0x3bd439){_0x54bc7e[_0x6376('0x3')](_0x271bf9,_0x3bd439);};}function removeListener(_0x2e2e2c,_0x58a4a4){return function(){SmsInteractionEvents[_0x6376('0x4')](_0x2e2e2c,_0x58a4a4);};}exports['register']=function(_0x1e1dc0){for(var _0x2b2a32=0x0,_0x47b1f5=events['length'];_0x2b2a32<_0x47b1f5;_0x2b2a32++){var _0x1e0306=events[_0x2b2a32];var _0x977516=createListener(_0x6376('0x5')+_0x1e0306,_0x1e1dc0);SmsInteractionEvents['on'](_0x1e0306,_0x977516);}};
\ No newline at end of file
+var _0xad26=['removeListener','length','smsInteraction:','./smsInteraction.events','remove','update','emit'];(function(_0x1770af,_0x468922){var _0x2fac82=function(_0x31e3d5){while(--_0x31e3d5){_0x1770af['push'](_0x1770af['shift']());}};_0x2fac82(++_0x468922);}(_0xad26,0x1b5));var _0x6ad2=function(_0x5416db,_0x55683a){_0x5416db=_0x5416db-0x0;var _0x243e35=_0xad26[_0x5416db];return _0x243e35;};'use strict';var SmsInteractionEvents=require(_0x6ad2('0x0'));var events=['save',_0x6ad2('0x1'),_0x6ad2('0x2')];function createListener(_0x1f75db,_0x503454){return function(_0x5cefcb){_0x503454[_0x6ad2('0x3')](_0x1f75db,_0x5cefcb);};}function removeListener(_0x33b065,_0x364f7f){return function(){SmsInteractionEvents[_0x6ad2('0x4')](_0x33b065,_0x364f7f);};}exports['register']=function(_0x3362df){for(var _0xc29058=0x0,_0x1f88a9=events[_0x6ad2('0x5')];_0xc29058<_0x1f88a9;_0xc29058++){var _0xa226b4=events[_0xc29058];var _0x46731c=createListener(_0x6ad2('0x6')+_0xa226b4,_0x3362df);SmsInteractionEvents['on'](_0xa226b4,_0x46731c);}};
\ No newline at end of file
index 0b55115..f72c619 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8b78=['destroy','exports','multer','path','express','Router','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/describe','describe','/:id','post','tracked','sms','create','/:id/status','put','/:id/accept','reject','delete'];(function(_0x1064bc,_0x206f12){var _0x5edc45=function(_0x5087bd){while(--_0x5087bd){_0x1064bc['push'](_0x1064bc['shift']());}};_0x5edc45(++_0x206f12);}(_0x8b78,0xaa));var _0x88b7=function(_0xa2ea9b,_0x107abe){_0xa2ea9b=_0xa2ea9b-0x0;var _0x12119b=_0x8b78[_0xa2ea9b];return _0x12119b;};'use strict';var multer=require(_0x88b7('0x0'));var util=require('util');var path=require(_0x88b7('0x1'));var timeout=require('connect-timeout');var express=require(_0x88b7('0x2'));var router=express[_0x88b7('0x3')]();var fs_extra=require(_0x88b7('0x4'));var auth=require(_0x88b7('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x88b7('0x6'));var controller=require('./smsMessage.controller');router[_0x88b7('0x7')]('/',auth[_0x88b7('0x8')](),controller[_0x88b7('0x9')]);router['get'](_0x88b7('0xa'),auth[_0x88b7('0x8')](),controller[_0x88b7('0xb')]);router['get'](_0x88b7('0xc'),auth[_0x88b7('0x8')](),controller['show']);router[_0x88b7('0xd')]('/',auth[_0x88b7('0x8')](),interaction[_0x88b7('0xe')](_0x88b7('0xf'),'smsmessage:create'),controller[_0x88b7('0x10')]);router['post'](_0x88b7('0x11'),controller['status']);router[_0x88b7('0x12')](_0x88b7('0xc'),auth['isAuthenticated'](),controller['update']);router['put'](_0x88b7('0x13'),auth[_0x88b7('0x8')](),controller['accept']);router[_0x88b7('0x12')]('/:id/reject',auth['isAuthenticated'](),controller[_0x88b7('0x14')]);router[_0x88b7('0x15')]('/:id',auth[_0x88b7('0x8')](),controller[_0x88b7('0x16')]);module[_0x88b7('0x17')]=router;
\ No newline at end of file
+var _0x1fc2=['status','put','/:id/accept','accept','exports','multer','util','connect-timeout','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','describe','/:id','show','post','sms','create','/:id/status'];(function(_0x7048b0,_0x218a7e){var _0x3063bd=function(_0x92bc79){while(--_0x92bc79){_0x7048b0['push'](_0x7048b0['shift']());}};_0x3063bd(++_0x218a7e);}(_0x1fc2,0x123));var _0x21fc=function(_0x49b207,_0x408ade){_0x49b207=_0x49b207-0x0;var _0x2dc8fa=_0x1fc2[_0x49b207];return _0x2dc8fa;};'use strict';var multer=require(_0x21fc('0x0'));var util=require(_0x21fc('0x1'));var path=require('path');var timeout=require(_0x21fc('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x21fc('0x3'));var interaction=require(_0x21fc('0x4'));var config=require(_0x21fc('0x5'));var controller=require('./smsMessage.controller');router[_0x21fc('0x6')]('/',auth[_0x21fc('0x7')](),controller[_0x21fc('0x8')]);router[_0x21fc('0x6')](_0x21fc('0x9'),auth[_0x21fc('0x7')](),controller[_0x21fc('0xa')]);router[_0x21fc('0x6')](_0x21fc('0xb'),auth['isAuthenticated'](),controller[_0x21fc('0xc')]);router[_0x21fc('0xd')]('/',auth[_0x21fc('0x7')](),interaction['tracked'](_0x21fc('0xe'),'smsmessage:create'),controller[_0x21fc('0xf')]);router[_0x21fc('0xd')](_0x21fc('0x10'),controller[_0x21fc('0x11')]);router[_0x21fc('0x12')]('/:id',auth['isAuthenticated'](),controller['update']);router[_0x21fc('0x12')](_0x21fc('0x13'),auth[_0x21fc('0x7')](),controller[_0x21fc('0x14')]);router['put']('/:id/reject',auth[_0x21fc('0x7')](),controller['reject']);router['delete'](_0x21fc('0xb'),auth[_0x21fc('0x7')](),controller['destroy']);module[_0x21fc('0x15')]=router;
\ No newline at end of file
index 40356df..9c4f48a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdd11=['DATE','sequelize','exports','TEXT','medium','BOOLEAN','out','STRING'];(function(_0x8f4ba5,_0x135638){var _0x65fe3b=function(_0x5b2484){while(--_0x5b2484){_0x8f4ba5['push'](_0x8f4ba5['shift']());}};_0x65fe3b(++_0x135638);}(_0xdd11,0xf1));var _0x1dd1=function(_0x58bce9,_0x3c41e5){_0x58bce9=_0x58bce9-0x0;var _0x1b4eaf=_0xdd11[_0x58bce9];return _0x1b4eaf;};'use strict';var Sequelize=require(_0x1dd1('0x0'));module[_0x1dd1('0x1')]={'body':{'type':Sequelize[_0x1dd1('0x2')](_0x1dd1('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0x1dd1('0x4')],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in',_0x1dd1('0x5')),'defaultValue':'out','allowNull':![]},'messageId':{'type':Sequelize[_0x1dd1('0x6')](0xbe)},'phone':{'type':Sequelize['STRING']},'readAt':{'type':Sequelize[_0x1dd1('0x7')]},'secret':{'type':Sequelize[_0x1dd1('0x4')],'defaultValue':![]},'providerName':{'type':Sequelize['STRING']},'providerResponse':{'type':Sequelize[_0x1dd1('0x2')]}};
\ No newline at end of file
+var _0xf685=['exports','TEXT','medium','BOOLEAN','ENUM','out','STRING','sequelize'];(function(_0x176329,_0x568c84){var _0x31997c=function(_0x3d64df){while(--_0x3d64df){_0x176329['push'](_0x176329['shift']());}};_0x31997c(++_0x568c84);}(_0xf685,0x117));var _0x5f68=function(_0x53bc4f,_0x4fcc7d){_0x53bc4f=_0x53bc4f-0x0;var _0x1886aa=_0xf685[_0x53bc4f];return _0x1886aa;};'use strict';var Sequelize=require(_0x5f68('0x0'));module[_0x5f68('0x1')]={'body':{'type':Sequelize[_0x5f68('0x2')](_0x5f68('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0x5f68('0x4')],'defaultValue':![]},'direction':{'type':Sequelize[_0x5f68('0x5')]('in',_0x5f68('0x6')),'defaultValue':'out','allowNull':![]},'messageId':{'type':Sequelize[_0x5f68('0x7')](0xbe)},'phone':{'type':Sequelize['STRING']},'readAt':{'type':Sequelize['DATE']},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'providerName':{'type':Sequelize[_0x5f68('0x7')]},'providerResponse':{'type':Sequelize[_0x5f68('0x2')]}};
\ No newline at end of file
index ee994a9..1fdd734 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfa75=['attributes','fields','length','hasOwnProperty','sort','where','merge','includeAll','include','findAll','catch','show','options','find','body','update','params','destroy','describe','../../config/logger','sms-interactions','sms','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','agent','SmsInteraction','isNil','read1stAt','interaction','get','[SMSMESSAGE: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','Sequelize','fullname','internal','manual','SIP/%s','channel','motionChannel','event','accept','EventManager','acceptmessage','SmsInteractionId','RejectMessage','QueryTypes','SELECT','User','rejectmessage','SmsAccount','SmsAccountId','SmsMessage,\x20%s,\x20%s,\x20%s','type','inspect','twilio','plivo','MessageUUID','messageId','indexOf','sent','delivered','SmsAccount,\x20%s,\x20%s,\x20%s','plivio','results','DELIVERED','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','squel','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../config/license/hardware','api','../../config/environment','../../config/license/util','redis','defaults','localhost','socket.io-emitter','./smsMessage.socket','register','jayson/promise','client','http','request','then','SmsMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','sendStatus','status','end','offset','undefined','limit','count','set','json','apply','reject','save','stack','name','send','map','SmsMessage','rawAttributes','fieldName','key','model','keys','query','filters','intersection'];(function(_0x565c49,_0x54acd0){var _0x20ca34=function(_0x42f7e1){while(--_0x42f7e1){_0x565c49['push'](_0x565c49['shift']());}};_0x20ca34(++_0x54acd0);}(_0xfa75,0x1ef));var _0x5fa7=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xfa75[_0x20a584];return _0x4b41a8;};'use strict';var emlformat=require(_0x5fa7('0x0'));var rimraf=require(_0x5fa7('0x1'));var zipdir=require(_0x5fa7('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x5fa7('0x3'));var moment=require(_0x5fa7('0x4'));var BPromise=require(_0x5fa7('0x5'));var Mustache=require(_0x5fa7('0x6'));var util=require('util');var path=require(_0x5fa7('0x7'));var sox=require(_0x5fa7('0x8'));var csv=require(_0x5fa7('0x9'));var ejs=require(_0x5fa7('0xa'));var fs=require('fs');var fs_extra=require(_0x5fa7('0xb'));var _=require('lodash');var squel=require(_0x5fa7('0xc'));var crypto=require('crypto');var jsforce=require(_0x5fa7('0xd'));var deskjs=require(_0x5fa7('0xe'));var toCsv=require(_0x5fa7('0x9'));var querystring=require(_0x5fa7('0xf'));var Papa=require(_0x5fa7('0x10'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x5fa7('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x5fa7('0x12'));var logger=require('../../config/logger')(_0x5fa7('0x13'));var utils=require('../../config/utils');var config=require(_0x5fa7('0x14'));var licenseUtil=require(_0x5fa7('0x15'));var db=require('../../mysqldb')['db'];config[_0x5fa7('0x16')]=_[_0x5fa7('0x17')](config[_0x5fa7('0x16')],{'host':_0x5fa7('0x18'),'port':0x18eb});var socket=require(_0x5fa7('0x19'))(new Redis(config[_0x5fa7('0x16')]));require(_0x5fa7('0x1a'))[_0x5fa7('0x1b')](socket);var jayson=require(_0x5fa7('0x1c'));var client=jayson[_0x5fa7('0x1d')][_0x5fa7('0x1e')]({'port':0x232c});var client9002=jayson[_0x5fa7('0x1d')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4b725a,_0x6b21bd,_0x42fc74,_0x3d196e){return new BPromise(function(_0x6999a0,_0x4a9fd7){var _0x5c1ec0=_0x3d196e||client;return _0x5c1ec0[_0x5fa7('0x1f')](_0x4b725a,_0x42fc74)[_0x5fa7('0x20')](function(_0x212f13){logger['info'](_0x5fa7('0x21'),_0x6b21bd,_0x5fa7('0x22'));logger[_0x5fa7('0x23')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x6b21bd,_0x5fa7('0x22'),JSON[_0x5fa7('0x24')](_0x212f13));if(_0x212f13[_0x5fa7('0x25')]){if(_0x212f13['error']['code']===0x1f4){logger[_0x5fa7('0x25')](_0x5fa7('0x21'),_0x6b21bd,_0x212f13[_0x5fa7('0x25')][_0x5fa7('0x26')]);return _0x4a9fd7(_0x212f13[_0x5fa7('0x25')]['message']);}logger['error'](_0x5fa7('0x21'),_0x6b21bd,_0x212f13[_0x5fa7('0x25')][_0x5fa7('0x26')]);return _0x6999a0(_0x212f13[_0x5fa7('0x25')][_0x5fa7('0x26')]);}else{logger['info']('SmsMessage,\x20%s,\x20%s',_0x6b21bd,_0x5fa7('0x22'));_0x6999a0(_0x212f13[_0x5fa7('0x27')][_0x5fa7('0x26')]);}})['catch'](function(_0x52f35){logger['error'](_0x5fa7('0x21'),_0x6b21bd,_0x52f35);_0x4a9fd7(_0x52f35);});});}function respondWithStatusCode(_0x14203b,_0x19e40c){_0x19e40c=_0x19e40c||0xcc;return function(_0x48f090){if(_0x48f090){return _0x14203b[_0x5fa7('0x28')](_0x19e40c);}return _0x14203b[_0x5fa7('0x29')](_0x19e40c)[_0x5fa7('0x2a')]();};}function respondWithResult(_0x15111e,_0xcf9bd4){_0xcf9bd4=_0xcf9bd4||0xc8;return function(_0x50a7e0){if(_0x50a7e0){return _0x15111e[_0x5fa7('0x29')](_0xcf9bd4)['json'](_0x50a7e0);}};}function respondWithFilteredResult(_0x2bac5e,_0x31d7c9){return function(_0x1b1157){if(_0x1b1157){var _0x337d6f=typeof _0x31d7c9[_0x5fa7('0x2b')]===_0x5fa7('0x2c')&&typeof _0x31d7c9[_0x5fa7('0x2d')]===_0x5fa7('0x2c');var _0x283f26=_0x1b1157[_0x5fa7('0x2e')];var _0x11df17=_0x337d6f?0x0:_0x31d7c9[_0x5fa7('0x2b')];var _0x2e6fc6=_0x337d6f?_0x1b1157['count']:_0x31d7c9[_0x5fa7('0x2b')]+_0x31d7c9[_0x5fa7('0x2d')];var _0x5b9441;if(_0x2e6fc6>=_0x283f26){_0x2e6fc6=_0x283f26;_0x5b9441=0xc8;}else{_0x5b9441=0xce;}_0x2bac5e[_0x5fa7('0x29')](_0x5b9441);return _0x2bac5e[_0x5fa7('0x2f')]('Content-Range',_0x11df17+'-'+_0x2e6fc6+'/'+_0x283f26)[_0x5fa7('0x30')](_0x1b1157);}return null;};}function patchUpdates(_0x297c67){return function(_0x24a492){try{jsonpatch[_0x5fa7('0x31')](_0x24a492,_0x297c67,!![]);}catch(_0x38ec1d){return BPromise[_0x5fa7('0x32')](_0x38ec1d);}return _0x24a492[_0x5fa7('0x33')]();};}function saveUpdates(_0x14bfca,_0x553073){return function(_0x1bdcf5){if(_0x1bdcf5){return _0x1bdcf5['update'](_0x14bfca)['then'](function(_0x588d61){return _0x588d61;});}return null;};}function removeEntity(_0xd85c6d,_0x5d180f){return function(_0x5e63c8){if(_0x5e63c8){return _0x5e63c8['destroy']()[_0x5fa7('0x20')](function(){_0xd85c6d[_0x5fa7('0x29')](0xcc)[_0x5fa7('0x2a')]();});}};}function handleEntityNotFound(_0x5a6f03,_0x2ebbf8){return function(_0x3aec54){if(!_0x3aec54){_0x5a6f03[_0x5fa7('0x28')](0x194);}return _0x3aec54;};}function handleError(_0x33b1b5,_0x5002e8){_0x5002e8=_0x5002e8||0x1f4;return function(_0x3b8e87){logger[_0x5fa7('0x25')](_0x3b8e87[_0x5fa7('0x34')]);if(_0x3b8e87['name']){delete _0x3b8e87[_0x5fa7('0x35')];}_0x33b1b5[_0x5fa7('0x29')](_0x5002e8)[_0x5fa7('0x36')](_0x3b8e87);};}exports['index']=function(_0x3c7a29,_0xd09630){var _0x3a18e5={},_0x377ea4={},_0xb0f640={'count':0x0,'rows':[]};var _0x5dd4f6=_[_0x5fa7('0x37')](db[_0x5fa7('0x38')][_0x5fa7('0x39')],function(_0x14ab87){return{'name':_0x14ab87[_0x5fa7('0x3a')],'type':_0x14ab87['type'][_0x5fa7('0x3b')]};});_0x377ea4[_0x5fa7('0x3c')]=_[_0x5fa7('0x37')](_0x5dd4f6,_0x5fa7('0x35'));_0x377ea4['query']=_[_0x5fa7('0x3d')](_0x3c7a29[_0x5fa7('0x3e')]);_0x377ea4[_0x5fa7('0x3f')]=_[_0x5fa7('0x40')](_0x377ea4[_0x5fa7('0x3c')],_0x377ea4[_0x5fa7('0x3e')]);_0x3a18e5[_0x5fa7('0x41')]=_[_0x5fa7('0x40')](_0x377ea4['model'],qs['fields'](_0x3c7a29[_0x5fa7('0x3e')][_0x5fa7('0x42')]));_0x3a18e5[_0x5fa7('0x41')]=_0x3a18e5['attributes'][_0x5fa7('0x43')]?_0x3a18e5[_0x5fa7('0x41')]:_0x377ea4[_0x5fa7('0x3c')];if(!_0x3c7a29[_0x5fa7('0x3e')][_0x5fa7('0x44')]('nolimit')){_0x3a18e5[_0x5fa7('0x2d')]=qs[_0x5fa7('0x2d')](_0x3c7a29[_0x5fa7('0x3e')][_0x5fa7('0x2d')]);_0x3a18e5[_0x5fa7('0x2b')]=qs['offset'](_0x3c7a29[_0x5fa7('0x3e')]['offset']);}_0x3a18e5['order']=qs[_0x5fa7('0x45')](_0x3c7a29[_0x5fa7('0x3e')][_0x5fa7('0x45')]);_0x3a18e5[_0x5fa7('0x46')]=qs[_0x5fa7('0x3f')](_['pick'](_0x3c7a29[_0x5fa7('0x3e')],_0x377ea4[_0x5fa7('0x3f')]),_0x5dd4f6);if(_0x3c7a29[_0x5fa7('0x3e')]['filter']){_0x3a18e5[_0x5fa7('0x46')]=_['merge'](_0x3a18e5[_0x5fa7('0x46')],{'$or':_[_0x5fa7('0x37')](_0x5dd4f6,function(_0xc2d2f1){if(_0xc2d2f1['type']!=='VIRTUAL'){var _0x2ece77={};_0x2ece77[_0xc2d2f1[_0x5fa7('0x35')]]={'$like':'%'+_0x3c7a29[_0x5fa7('0x3e')]['filter']+'%'};return _0x2ece77;}})});}_0x3a18e5=_[_0x5fa7('0x47')]({},_0x3a18e5,_0x3c7a29['options']);var _0x103992={'where':_0x3a18e5['where']};return db[_0x5fa7('0x38')][_0x5fa7('0x2e')](_0x103992)[_0x5fa7('0x20')](function(_0x4e823b){_0xb0f640[_0x5fa7('0x2e')]=_0x4e823b;if(_0x3c7a29[_0x5fa7('0x3e')][_0x5fa7('0x48')]){_0x3a18e5[_0x5fa7('0x49')]=[{'all':!![]}];}return db['SmsMessage'][_0x5fa7('0x4a')](_0x3a18e5);})[_0x5fa7('0x20')](function(_0xff86f9){_0xb0f640['rows']=_0xff86f9;return _0xb0f640;})['then'](respondWithFilteredResult(_0xd09630,_0x3a18e5))[_0x5fa7('0x4b')](handleError(_0xd09630,null));};exports[_0x5fa7('0x4c')]=function(_0x1ba4c6,_0x1bf985){var _0x1f5f56={'raw':!![],'where':{'id':_0x1ba4c6['params']['id']}},_0x44c879={};_0x44c879[_0x5fa7('0x3c')]=_[_0x5fa7('0x3d')](db[_0x5fa7('0x38')]['rawAttributes']);_0x44c879['query']=_[_0x5fa7('0x3d')](_0x1ba4c6[_0x5fa7('0x3e')]);_0x44c879[_0x5fa7('0x3f')]=_[_0x5fa7('0x40')](_0x44c879[_0x5fa7('0x3c')],_0x44c879[_0x5fa7('0x3e')]);_0x1f5f56['attributes']=_['intersection'](_0x44c879[_0x5fa7('0x3c')],qs[_0x5fa7('0x42')](_0x1ba4c6[_0x5fa7('0x3e')]['fields']));_0x1f5f56['attributes']=_0x1f5f56[_0x5fa7('0x41')][_0x5fa7('0x43')]?_0x1f5f56[_0x5fa7('0x41')]:_0x44c879[_0x5fa7('0x3c')];if(_0x1ba4c6[_0x5fa7('0x3e')][_0x5fa7('0x48')]){_0x1f5f56[_0x5fa7('0x49')]=[{'all':!![]}];}_0x1f5f56=_['merge']({},_0x1f5f56,_0x1ba4c6[_0x5fa7('0x4d')]);return db[_0x5fa7('0x38')][_0x5fa7('0x4e')](_0x1f5f56)[_0x5fa7('0x20')](handleEntityNotFound(_0x1bf985,null))[_0x5fa7('0x20')](respondWithResult(_0x1bf985,null))['catch'](handleError(_0x1bf985,null));};exports['create']=function(_0x5babe4,_0x31ce3d){return db[_0x5fa7('0x38')]['create'](_0x5babe4[_0x5fa7('0x4f')],{})[_0x5fa7('0x20')](respondWithResult(_0x31ce3d,0xc9))[_0x5fa7('0x4b')](handleError(_0x31ce3d,null));};exports[_0x5fa7('0x50')]=function(_0x38a261,_0x4e9f2f){if(_0x38a261[_0x5fa7('0x4f')]['id']){delete _0x38a261[_0x5fa7('0x4f')]['id'];}return db[_0x5fa7('0x38')][_0x5fa7('0x4e')]({'where':{'id':_0x38a261[_0x5fa7('0x51')]['id']}})[_0x5fa7('0x20')](handleEntityNotFound(_0x4e9f2f,null))[_0x5fa7('0x20')](saveUpdates(_0x38a261[_0x5fa7('0x4f')],null))[_0x5fa7('0x20')](respondWithResult(_0x4e9f2f,null))['catch'](handleError(_0x4e9f2f,null));};exports[_0x5fa7('0x52')]=function(_0x16ab7a,_0x2435b3){return db[_0x5fa7('0x38')][_0x5fa7('0x4e')]({'where':{'id':_0x16ab7a[_0x5fa7('0x51')]['id']}})['then'](handleEntityNotFound(_0x2435b3,null))['then'](removeEntity(_0x2435b3,null))[_0x5fa7('0x4b')](handleError(_0x2435b3,null));};exports['describe']=function(_0x3d1d9d,_0x34818f){return db[_0x5fa7('0x38')][_0x5fa7('0x53')]()[_0x5fa7('0x20')](respondWithResult(_0x34818f,null))[_0x5fa7('0x4b')](handleError(_0x34818f,null));};var interaction_log=require(_0x5fa7('0x54'))(_0x5fa7('0x55'));exports['accept']=function(_0x265f49,_0x2966cb,_0x2cc3eb){var _0x468d7b={'agent':{},'channel':_0x5fa7('0x56')};if(_0x265f49[_0x5fa7('0x4f')]['id']){delete _0x265f49[_0x5fa7('0x4f')]['id'];}_0x265f49[_0x5fa7('0x4f')][_0x5fa7('0x57')]=!![];_0x265f49[_0x5fa7('0x4f')][_0x5fa7('0x58')]=moment()[_0x5fa7('0x59')](_0x5fa7('0x5a'));_0x265f49[_0x5fa7('0x4f')][_0x5fa7('0x5b')]=_0x265f49[_0x5fa7('0x4f')][_0x5fa7('0x5b')]||_0x265f49[_0x5fa7('0x5c')]['id'];_0x468d7b[_0x5fa7('0x5d')]['id']=_0x265f49[_0x5fa7('0x4f')]['UserId'];return db['SmsMessage'][_0x5fa7('0x4e')]({'where':{'id':_0x265f49[_0x5fa7('0x51')]['id'],'UserId':null}})[_0x5fa7('0x20')](handleEntityNotFound(_0x2966cb,null))['then'](saveUpdates(_0x265f49['body'],null))[_0x5fa7('0x20')](function(_0x469e50){if(_0x469e50){_0x468d7b[_0x5fa7('0x26')]=_0x469e50['get']({'plain':!![]});return db[_0x5fa7('0x5e')]['find']({'where':{'id':_0x469e50['SmsInteractionId']}});}return null;})['then'](handleEntityNotFound(_0x2966cb,null))['then'](function(_0x185d08){if(_0x185d08){return _0x185d08[_0x5fa7('0x50')]({'UserId':_0x265f49['body'][_0x5fa7('0x5b')],'read1stAt':_[_0x5fa7('0x5f')](_0x185d08[_0x5fa7('0x60')])?moment()[_0x5fa7('0x59')](_0x5fa7('0x5a')):undefined});}return null;})[_0x5fa7('0x20')](function(_0x1080ec){if(_0x1080ec){_0x468d7b[_0x5fa7('0x61')]=_0x1080ec[_0x5fa7('0x62')]({'plain':!![]});interaction_log['info'](_0x5fa7('0x63'),_0x265f49['user']['id'],_0x265f49[_0x5fa7('0x5c')]['name'],_0x265f49[_0x5fa7('0x5c')][_0x5fa7('0x64')],_0x468d7b[_0x5fa7('0x61')]['id'],_0x265f49[_0x5fa7('0x4f')]?JSON[_0x5fa7('0x24')](_0x265f49[_0x5fa7('0x4f')]):_0x5fa7('0x65'));return respondWithRpcPromise(_0x5fa7('0x66'),_0x5fa7('0x67'),_0x468d7b);}return null;})['then'](function(_0x144c69){var _0x2dd214=_0x5fa7('0x68')+_0x144c69[_0x5fa7('0x26')][_0x5fa7('0x69')];return db[_0x5fa7('0x6a')][_0x5fa7('0x3e')](_0x2dd214,{'type':db[_0x5fa7('0x6b')]['QueryTypes']['SELECT'],'raw':!![]})[_0x5fa7('0x20')](function(_0x58fa71){return _0x58fa71;});})['then'](function(_0x4d5674){if(_0x4d5674){_0x468d7b[_0x5fa7('0x26')]['contact']=_0x4d5674[0x0];if(!_0x265f49[_0x5fa7('0x4f')][_0x5fa7('0x5b')])return;return db['User'][_0x5fa7('0x4e')]({'where':{'id':_0x265f49[_0x5fa7('0x4f')][_0x5fa7('0x5b')],'role':_0x5fa7('0x5d')},'attributes':['id','name',_0x5fa7('0x6c'),'email',_0x5fa7('0x6d')],'raw':!![]});}return null;})['then'](function(_0x4830a7){if(!_0x4830a7)return null;_0x468d7b['message'][_0x5fa7('0x5d')]=_0x4830a7;return _0x468d7b;})[_0x5fa7('0x20')](function(_0x42c79a){if(_0x42c79a){if(_0x265f49[_0x5fa7('0x4f')][_0x5fa7('0x6e')]){_0x468d7b[_0x5fa7('0x26')]['interface']=util[_0x5fa7('0x59')](_0x5fa7('0x6f'),_0x265f49[_0x5fa7('0x5c')]['name']);_0x468d7b[_0x5fa7('0x26')]['channel']=_0x468d7b[_0x5fa7('0x70')];_0x468d7b[_0x5fa7('0x26')][_0x5fa7('0x71')]=_0x468d7b['channel'];_0x468d7b[_0x5fa7('0x26')][_0x5fa7('0x72')]=_0x5fa7('0x73');return respondWithRpcPromise(_0x5fa7('0x74'),'EventManager',{'event':_0x5fa7('0x75'),'message':_0x468d7b[_0x5fa7('0x26')]},client9002)[_0x5fa7('0x20')](function(){return _0x468d7b;});}return _0x468d7b;}return null;})[_0x5fa7('0x20')](respondWithResult(_0x2966cb,null))[_0x5fa7('0x4b')](handleError(_0x2966cb,null));};var interaction_log=require(_0x5fa7('0x54'))(_0x5fa7('0x55'));exports[_0x5fa7('0x32')]=function(_0x5c33d7,_0x3369d8,_0x4f7aec){var _0x2f1fb0={'agent':{},'channel':_0x5fa7('0x56')};if(_0x5c33d7[_0x5fa7('0x4f')]['id']){delete _0x5c33d7[_0x5fa7('0x4f')]['id'];}_0x5c33d7[_0x5fa7('0x4f')][_0x5fa7('0x5b')]=_0x5c33d7[_0x5fa7('0x4f')][_0x5fa7('0x5b')]||_0x5c33d7['user']['id'];_0x2f1fb0[_0x5fa7('0x5d')]['id']=_0x5c33d7[_0x5fa7('0x4f')][_0x5fa7('0x5b')];return db['SmsMessage'][_0x5fa7('0x4e')]({'where':{'id':_0x5c33d7[_0x5fa7('0x51')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x3369d8,null))[_0x5fa7('0x20')](function(_0x2fa9e6){if(_0x2fa9e6){_0x2f1fb0['message']=_0x2fa9e6[_0x5fa7('0x62')]({'plain':!![]});return db[_0x5fa7('0x5e')]['find']({'where':{'id':_0x2fa9e6[_0x5fa7('0x76')]}});}return null;})['then'](handleEntityNotFound(_0x3369d8,null))[_0x5fa7('0x20')](function(_0x42b9d6){if(_0x42b9d6){_0x2f1fb0[_0x5fa7('0x61')]=_0x42b9d6['get']({'plain':!![]});interaction_log['info']('[SMSMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x5c33d7[_0x5fa7('0x5c')]['id'],_0x5c33d7[_0x5fa7('0x5c')][_0x5fa7('0x35')],_0x5c33d7['user'][_0x5fa7('0x64')],_0x2f1fb0['interaction']['id'],_0x5c33d7[_0x5fa7('0x4f')]?JSON[_0x5fa7('0x24')](_0x5c33d7[_0x5fa7('0x4f')]):_0x5fa7('0x65'));return respondWithRpcPromise(_0x5fa7('0x77'),'rejectMessage',_0x2f1fb0);}return null;})[_0x5fa7('0x20')](function(_0x23fa34){var _0x27691a=_0x5fa7('0x68')+_0x23fa34[_0x5fa7('0x26')][_0x5fa7('0x69')];return db['sequelize'][_0x5fa7('0x3e')](_0x27691a,{'type':db[_0x5fa7('0x6b')][_0x5fa7('0x78')][_0x5fa7('0x79')],'raw':!![]})[_0x5fa7('0x20')](function(_0x3eb6a9){return _0x3eb6a9;});})['then'](function(_0x341ba5){if(_0x341ba5){_0x2f1fb0[_0x5fa7('0x26')]['contact']=_0x341ba5[0x0];if(!_0x5c33d7['body']['UserId'])return;return db[_0x5fa7('0x7a')][_0x5fa7('0x4e')]({'where':{'id':_0x5c33d7[_0x5fa7('0x4f')]['UserId'],'role':_0x5fa7('0x5d')},'attributes':['id',_0x5fa7('0x35'),'fullname','email','internal'],'raw':!![]});}return null;})[_0x5fa7('0x20')](function(_0x529ee0){if(!_0x529ee0)return null;_0x2f1fb0[_0x5fa7('0x26')][_0x5fa7('0x5d')]=_0x529ee0;return _0x2f1fb0;})[_0x5fa7('0x20')](function(_0x2580d5){if(_0x2580d5){_0x2580d5[_0x5fa7('0x26')]['interface']=util[_0x5fa7('0x59')](_0x5fa7('0x6f'),_0x5c33d7['user'][_0x5fa7('0x35')]);_0x2580d5[_0x5fa7('0x26')][_0x5fa7('0x70')]=_0x2f1fb0['channel'];_0x2580d5['message']['motionChannel']=_0x2f1fb0[_0x5fa7('0x70')];_0x2580d5[_0x5fa7('0x26')][_0x5fa7('0x72')]='reject';respondWithRpcPromise(_0x5fa7('0x74'),_0x5fa7('0x74'),{'event':_0x5fa7('0x7b'),'message':_0x2580d5['message']},client9002);return _0x2f1fb0;}return null;})['then'](respondWithResult(_0x3369d8,null))[_0x5fa7('0x4b')](handleError(_0x3369d8,null));};exports[_0x5fa7('0x29')]=function(_0x8f82f8,_0x5b4196,_0x1c8be5){if(_0x8f82f8[_0x5fa7('0x4f')]['id']){delete _0x8f82f8['body']['id'];}var _0x41d627;return db['SmsMessage'][_0x5fa7('0x4e')]({'where':{'id':_0x8f82f8[_0x5fa7('0x51')]['id']}})['then'](handleEntityNotFound(_0x5b4196,null))[_0x5fa7('0x20')](function(_0x5def41){if(_0x5def41){_0x41d627=_0x5def41;return db[_0x5fa7('0x7c')]['find']({'where':{'id':_0x5def41[_0x5fa7('0x7d')]}});}})[_0x5fa7('0x20')](handleEntityNotFound(_0x5b4196,null))['then'](function(_0x4436f7){if(_0x4436f7){logger['debug'](_0x5fa7('0x7e'),'status','received\x20delivery\x20report\x20from',_0x4436f7[_0x5fa7('0x7f')],util[_0x5fa7('0x80')](_0x8f82f8[_0x5fa7('0x4f')],{'showHidden':![],'depth':null}));switch(_0x4436f7[_0x5fa7('0x7f')]){case _0x5fa7('0x81'):if(_0x8f82f8[_0x5fa7('0x4f')]['MessageSid']&&_0x8f82f8[_0x5fa7('0x4f')]['MessageSid']===_0x41d627['messageId']){return _0x41d627[_0x5fa7('0x50')]({'read':!![]});}else{logger[_0x5fa7('0x25')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x5fa7('0x29'),_0x5fa7('0x81'),util[_0x5fa7('0x80')](_0x8f82f8[_0x5fa7('0x4f')],{'showHidden':![],'depth':null}));}break;case _0x5fa7('0x82'):if(_0x8f82f8[_0x5fa7('0x4f')]['MessageUUID']&&_0x8f82f8[_0x5fa7('0x4f')][_0x5fa7('0x83')]===_0x41d627[_0x5fa7('0x84')]&&_[_0x5fa7('0x85')]([_0x5fa7('0x86'),_0x5fa7('0x87')],_0x8f82f8[_0x5fa7('0x4f')]['Status'])>=0x0){return _0x41d627['update']({'read':!![]});}else{logger['error'](_0x5fa7('0x88'),_0x5fa7('0x29'),_0x5fa7('0x89'),util[_0x5fa7('0x80')](_0x8f82f8[_0x5fa7('0x4f')],{'showHidden':![],'depth':null}));}break;case'infobip':var _0x51197f=_0x8f82f8[_0x5fa7('0x4f')][_0x5fa7('0x8a')][0x0];if(_0x51197f[_0x5fa7('0x29')]['groupName']===_0x5fa7('0x8b')){return _0x41d627[_0x5fa7('0x50')]({'read':!![]});}else{logger[_0x5fa7('0x25')]('SmsAccount,\x20%s,\x20%s,\x20%s','status','infobip',util[_0x5fa7('0x80')](_0x8f82f8[_0x5fa7('0x4f')],{'showHidden':![],'depth':null}));}break;}return _0x41d627;}})[_0x5fa7('0x20')](respondWithResult(_0x5b4196,null))[_0x5fa7('0x4b')](handleError(_0x5b4196,null));};
\ No newline at end of file
+var _0x52aa=['redis','defaults','localhost','socket.io-emitter','./smsMessage.socket','client','http','request','then','info','SmsMessage,\x20%s,\x20%s','request\x20sent','debug','SmsMessage,\x20%s,\x20%s,\x20%s','error','code','message','result','sendStatus','status','end','json','undefined','limit','offset','set','Content-Range','apply','save','update','destroy','stack','name','map','SmsMessage','rawAttributes','type','key','query','keys','filters','model','attributes','intersection','fields','length','hasOwnProperty','order','where','pick','filter','merge','VIRTUAL','options','count','includeAll','include','findAll','rows','show','params','catch','create','body','find','describe','accept','sms','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','agent','SmsInteraction','read1stAt','interaction','user','role','stringify','null','AcceptMessage','acceptMessage','ContactId','sequelize','Sequelize','QueryTypes','SELECT','fullname','email','manual','interface','channel','motionChannel','event','EventManager','acceptmessage','reject','SmsInteractionId','get','[SMSMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','contact','User','internal','SIP/%s','rejectmessage','SmsAccountId','inspect','twilio','MessageSid','messageId','SmsAccount,\x20%s,\x20%s,\x20%s','plivo','MessageUUID','indexOf','sent','delivered','Status','plivio','infobip','results','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','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'];(function(_0x527cc4,_0x30e676){var _0x8b8ed8=function(_0x544378){while(--_0x544378){_0x527cc4['push'](_0x527cc4['shift']());}};_0x8b8ed8(++_0x30e676);}(_0x52aa,0x113));var _0xa52a=function(_0x49aa23,_0x479060){_0x49aa23=_0x49aa23-0x0;var _0x343f82=_0x52aa[_0x49aa23];return _0x343f82;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xa52a('0x0'));var zipdir=require(_0xa52a('0x1'));var jsonpatch=require(_0xa52a('0x2'));var rp=require(_0xa52a('0x3'));var moment=require(_0xa52a('0x4'));var BPromise=require(_0xa52a('0x5'));var Mustache=require(_0xa52a('0x6'));var util=require(_0xa52a('0x7'));var path=require(_0xa52a('0x8'));var sox=require(_0xa52a('0x9'));var csv=require(_0xa52a('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xa52a('0xb'));var squel=require(_0xa52a('0xc'));var crypto=require(_0xa52a('0xd'));var jsforce=require(_0xa52a('0xe'));var deskjs=require(_0xa52a('0xf'));var toCsv=require(_0xa52a('0xa'));var querystring=require(_0xa52a('0x10'));var Papa=require(_0xa52a('0x11'));var Redis=require(_0xa52a('0x12'));var authService=require(_0xa52a('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0xa52a('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xa52a('0x15'))(_0xa52a('0x16'));var utils=require(_0xa52a('0x17'));var config=require(_0xa52a('0x18'));var licenseUtil=require(_0xa52a('0x19'));var db=require(_0xa52a('0x1a'))['db'];config[_0xa52a('0x1b')]=_[_0xa52a('0x1c')](config[_0xa52a('0x1b')],{'host':_0xa52a('0x1d'),'port':0x18eb});var socket=require(_0xa52a('0x1e'))(new Redis(config[_0xa52a('0x1b')]));require(_0xa52a('0x1f'))['register'](socket);var jayson=require('jayson/promise');var client=jayson[_0xa52a('0x20')][_0xa52a('0x21')]({'port':0x232c});var client9002=jayson['client'][_0xa52a('0x21')]({'port':0x232a});function respondWithRpcPromise(_0x24cffa,_0x1380b1,_0x3b6cf7,_0xa0faac){return new BPromise(function(_0x3ec21a,_0x6e2ef1){var _0x243230=_0xa0faac||client;return _0x243230[_0xa52a('0x22')](_0x24cffa,_0x3b6cf7)[_0xa52a('0x23')](function(_0x5e0018){logger[_0xa52a('0x24')](_0xa52a('0x25'),_0x1380b1,_0xa52a('0x26'));logger[_0xa52a('0x27')](_0xa52a('0x28'),_0x1380b1,_0xa52a('0x26'),JSON['stringify'](_0x5e0018));if(_0x5e0018[_0xa52a('0x29')]){if(_0x5e0018[_0xa52a('0x29')][_0xa52a('0x2a')]===0x1f4){logger[_0xa52a('0x29')]('SmsMessage,\x20%s,\x20%s',_0x1380b1,_0x5e0018[_0xa52a('0x29')][_0xa52a('0x2b')]);return _0x6e2ef1(_0x5e0018[_0xa52a('0x29')][_0xa52a('0x2b')]);}logger[_0xa52a('0x29')]('SmsMessage,\x20%s,\x20%s',_0x1380b1,_0x5e0018[_0xa52a('0x29')]['message']);return _0x3ec21a(_0x5e0018['error'][_0xa52a('0x2b')]);}else{logger[_0xa52a('0x24')]('SmsMessage,\x20%s,\x20%s',_0x1380b1,'request\x20sent');_0x3ec21a(_0x5e0018[_0xa52a('0x2c')][_0xa52a('0x2b')]);}})['catch'](function(_0x1fbdc5){logger[_0xa52a('0x29')](_0xa52a('0x25'),_0x1380b1,_0x1fbdc5);_0x6e2ef1(_0x1fbdc5);});});}function respondWithStatusCode(_0x443c38,_0x286280){_0x286280=_0x286280||0xcc;return function(_0x269431){if(_0x269431){return _0x443c38[_0xa52a('0x2d')](_0x286280);}return _0x443c38[_0xa52a('0x2e')](_0x286280)[_0xa52a('0x2f')]();};}function respondWithResult(_0x1e8ff6,_0x2fd577){_0x2fd577=_0x2fd577||0xc8;return function(_0x2bae56){if(_0x2bae56){return _0x1e8ff6[_0xa52a('0x2e')](_0x2fd577)[_0xa52a('0x30')](_0x2bae56);}};}function respondWithFilteredResult(_0x15867e,_0x3bb4f7){return function(_0x1a82c4){if(_0x1a82c4){var _0x950f7e=typeof _0x3bb4f7['offset']===_0xa52a('0x31')&&typeof _0x3bb4f7[_0xa52a('0x32')]===_0xa52a('0x31');var _0x55418e=_0x1a82c4['count'];var _0x30449c=_0x950f7e?0x0:_0x3bb4f7[_0xa52a('0x33')];var _0x3c8c7d=_0x950f7e?_0x1a82c4['count']:_0x3bb4f7[_0xa52a('0x33')]+_0x3bb4f7[_0xa52a('0x32')];var _0x552fc5;if(_0x3c8c7d>=_0x55418e){_0x3c8c7d=_0x55418e;_0x552fc5=0xc8;}else{_0x552fc5=0xce;}_0x15867e[_0xa52a('0x2e')](_0x552fc5);return _0x15867e[_0xa52a('0x34')](_0xa52a('0x35'),_0x30449c+'-'+_0x3c8c7d+'/'+_0x55418e)[_0xa52a('0x30')](_0x1a82c4);}return null;};}function patchUpdates(_0x15a2a4){return function(_0x2d12f3){try{jsonpatch[_0xa52a('0x36')](_0x2d12f3,_0x15a2a4,!![]);}catch(_0x3282be){return BPromise['reject'](_0x3282be);}return _0x2d12f3[_0xa52a('0x37')]();};}function saveUpdates(_0x59b22f,_0x4897df){return function(_0x8cbdac){if(_0x8cbdac){return _0x8cbdac[_0xa52a('0x38')](_0x59b22f)[_0xa52a('0x23')](function(_0x11de63){return _0x11de63;});}return null;};}function removeEntity(_0x556d88,_0x4dcd3c){return function(_0x556e0e){if(_0x556e0e){return _0x556e0e[_0xa52a('0x39')]()['then'](function(){_0x556d88[_0xa52a('0x2e')](0xcc)[_0xa52a('0x2f')]();});}};}function handleEntityNotFound(_0xb977e,_0x493306){return function(_0x55b60f){if(!_0x55b60f){_0xb977e[_0xa52a('0x2d')](0x194);}return _0x55b60f;};}function handleError(_0x42cfb4,_0x3636f1){_0x3636f1=_0x3636f1||0x1f4;return function(_0x1660cf){logger[_0xa52a('0x29')](_0x1660cf[_0xa52a('0x3a')]);if(_0x1660cf[_0xa52a('0x3b')]){delete _0x1660cf[_0xa52a('0x3b')];}_0x42cfb4['status'](_0x3636f1)['send'](_0x1660cf);};}exports['index']=function(_0xbd41c1,_0xe71454){var _0x5aba37={},_0x55dbeb={},_0x455c28={'count':0x0,'rows':[]};var _0x4e0e16=_[_0xa52a('0x3c')](db[_0xa52a('0x3d')][_0xa52a('0x3e')],function(_0x27264b){return{'name':_0x27264b['fieldName'],'type':_0x27264b[_0xa52a('0x3f')][_0xa52a('0x40')]};});_0x55dbeb['model']=_['map'](_0x4e0e16,_0xa52a('0x3b'));_0x55dbeb[_0xa52a('0x41')]=_[_0xa52a('0x42')](_0xbd41c1['query']);_0x55dbeb[_0xa52a('0x43')]=_['intersection'](_0x55dbeb[_0xa52a('0x44')],_0x55dbeb[_0xa52a('0x41')]);_0x5aba37[_0xa52a('0x45')]=_[_0xa52a('0x46')](_0x55dbeb[_0xa52a('0x44')],qs[_0xa52a('0x47')](_0xbd41c1[_0xa52a('0x41')][_0xa52a('0x47')]));_0x5aba37['attributes']=_0x5aba37[_0xa52a('0x45')][_0xa52a('0x48')]?_0x5aba37[_0xa52a('0x45')]:_0x55dbeb[_0xa52a('0x44')];if(!_0xbd41c1['query'][_0xa52a('0x49')]('nolimit')){_0x5aba37[_0xa52a('0x32')]=qs['limit'](_0xbd41c1['query'][_0xa52a('0x32')]);_0x5aba37['offset']=qs[_0xa52a('0x33')](_0xbd41c1[_0xa52a('0x41')][_0xa52a('0x33')]);}_0x5aba37[_0xa52a('0x4a')]=qs['sort'](_0xbd41c1[_0xa52a('0x41')]['sort']);_0x5aba37[_0xa52a('0x4b')]=qs[_0xa52a('0x43')](_[_0xa52a('0x4c')](_0xbd41c1[_0xa52a('0x41')],_0x55dbeb[_0xa52a('0x43')]),_0x4e0e16);if(_0xbd41c1[_0xa52a('0x41')][_0xa52a('0x4d')]){_0x5aba37['where']=_[_0xa52a('0x4e')](_0x5aba37[_0xa52a('0x4b')],{'$or':_['map'](_0x4e0e16,function(_0x5f5a9e){if(_0x5f5a9e['type']!==_0xa52a('0x4f')){var _0x1fad81={};_0x1fad81[_0x5f5a9e[_0xa52a('0x3b')]]={'$like':'%'+_0xbd41c1['query'][_0xa52a('0x4d')]+'%'};return _0x1fad81;}})});}_0x5aba37=_[_0xa52a('0x4e')]({},_0x5aba37,_0xbd41c1[_0xa52a('0x50')]);var _0x4b3242={'where':_0x5aba37[_0xa52a('0x4b')]};return db[_0xa52a('0x3d')][_0xa52a('0x51')](_0x4b3242)[_0xa52a('0x23')](function(_0x324fc2){_0x455c28[_0xa52a('0x51')]=_0x324fc2;if(_0xbd41c1[_0xa52a('0x41')][_0xa52a('0x52')]){_0x5aba37[_0xa52a('0x53')]=[{'all':!![]}];}return db['SmsMessage'][_0xa52a('0x54')](_0x5aba37);})[_0xa52a('0x23')](function(_0x3c91bf){_0x455c28[_0xa52a('0x55')]=_0x3c91bf;return _0x455c28;})[_0xa52a('0x23')](respondWithFilteredResult(_0xe71454,_0x5aba37))['catch'](handleError(_0xe71454,null));};exports[_0xa52a('0x56')]=function(_0x17ff83,_0x1dc8a0){var _0x436ade={'raw':!![],'where':{'id':_0x17ff83[_0xa52a('0x57')]['id']}},_0x2f443c={};_0x2f443c[_0xa52a('0x44')]=_[_0xa52a('0x42')](db['SmsMessage'][_0xa52a('0x3e')]);_0x2f443c[_0xa52a('0x41')]=_['keys'](_0x17ff83['query']);_0x2f443c[_0xa52a('0x43')]=_['intersection'](_0x2f443c['model'],_0x2f443c['query']);_0x436ade[_0xa52a('0x45')]=_[_0xa52a('0x46')](_0x2f443c['model'],qs[_0xa52a('0x47')](_0x17ff83[_0xa52a('0x41')][_0xa52a('0x47')]));_0x436ade[_0xa52a('0x45')]=_0x436ade[_0xa52a('0x45')][_0xa52a('0x48')]?_0x436ade[_0xa52a('0x45')]:_0x2f443c[_0xa52a('0x44')];if(_0x17ff83[_0xa52a('0x41')][_0xa52a('0x52')]){_0x436ade['include']=[{'all':!![]}];}_0x436ade=_[_0xa52a('0x4e')]({},_0x436ade,_0x17ff83[_0xa52a('0x50')]);return db[_0xa52a('0x3d')]['find'](_0x436ade)['then'](handleEntityNotFound(_0x1dc8a0,null))[_0xa52a('0x23')](respondWithResult(_0x1dc8a0,null))[_0xa52a('0x58')](handleError(_0x1dc8a0,null));};exports[_0xa52a('0x59')]=function(_0x5b82c2,_0x128cee){return db[_0xa52a('0x3d')]['create'](_0x5b82c2['body'],{})[_0xa52a('0x23')](respondWithResult(_0x128cee,0xc9))[_0xa52a('0x58')](handleError(_0x128cee,null));};exports[_0xa52a('0x38')]=function(_0x2cdd4f,_0x28e920){if(_0x2cdd4f[_0xa52a('0x5a')]['id']){delete _0x2cdd4f[_0xa52a('0x5a')]['id'];}return db[_0xa52a('0x3d')][_0xa52a('0x5b')]({'where':{'id':_0x2cdd4f[_0xa52a('0x57')]['id']}})[_0xa52a('0x23')](handleEntityNotFound(_0x28e920,null))['then'](saveUpdates(_0x2cdd4f[_0xa52a('0x5a')],null))[_0xa52a('0x23')](respondWithResult(_0x28e920,null))[_0xa52a('0x58')](handleError(_0x28e920,null));};exports[_0xa52a('0x39')]=function(_0xeb80cf,_0x3bea59){return db['SmsMessage']['find']({'where':{'id':_0xeb80cf[_0xa52a('0x57')]['id']}})['then'](handleEntityNotFound(_0x3bea59,null))[_0xa52a('0x23')](removeEntity(_0x3bea59,null))[_0xa52a('0x58')](handleError(_0x3bea59,null));};exports[_0xa52a('0x5c')]=function(_0x27efc5,_0xae9d37){return db['SmsMessage'][_0xa52a('0x5c')]()[_0xa52a('0x23')](respondWithResult(_0xae9d37,null))[_0xa52a('0x58')](handleError(_0xae9d37,null));};var interaction_log=require('../../config/logger')('sms-interactions');exports[_0xa52a('0x5d')]=function(_0x149461,_0xb5678f,_0x598326){var _0x1358f6={'agent':{},'channel':_0xa52a('0x5e')};if(_0x149461[_0xa52a('0x5a')]['id']){delete _0x149461[_0xa52a('0x5a')]['id'];}_0x149461[_0xa52a('0x5a')][_0xa52a('0x5f')]=!![];_0x149461[_0xa52a('0x5a')][_0xa52a('0x60')]=moment()[_0xa52a('0x61')](_0xa52a('0x62'));_0x149461[_0xa52a('0x5a')][_0xa52a('0x63')]=_0x149461[_0xa52a('0x5a')][_0xa52a('0x63')]||_0x149461['user']['id'];_0x1358f6[_0xa52a('0x64')]['id']=_0x149461[_0xa52a('0x5a')][_0xa52a('0x63')];return db[_0xa52a('0x3d')][_0xa52a('0x5b')]({'where':{'id':_0x149461[_0xa52a('0x57')]['id'],'UserId':null}})[_0xa52a('0x23')](handleEntityNotFound(_0xb5678f,null))[_0xa52a('0x23')](saveUpdates(_0x149461[_0xa52a('0x5a')],null))['then'](function(_0x4a06ac){if(_0x4a06ac){_0x1358f6[_0xa52a('0x2b')]=_0x4a06ac['get']({'plain':!![]});return db[_0xa52a('0x65')][_0xa52a('0x5b')]({'where':{'id':_0x4a06ac['SmsInteractionId']}});}return null;})[_0xa52a('0x23')](handleEntityNotFound(_0xb5678f,null))[_0xa52a('0x23')](function(_0x577a03){if(_0x577a03){return _0x577a03[_0xa52a('0x38')]({'UserId':_0x149461[_0xa52a('0x5a')][_0xa52a('0x63')],'read1stAt':_['isNil'](_0x577a03[_0xa52a('0x66')])?moment()[_0xa52a('0x61')](_0xa52a('0x62')):undefined});}return null;})['then'](function(_0x4960f8){if(_0x4960f8){_0x1358f6[_0xa52a('0x67')]=_0x4960f8['get']({'plain':!![]});interaction_log[_0xa52a('0x24')]('[SMSMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x149461[_0xa52a('0x68')]['id'],_0x149461[_0xa52a('0x68')][_0xa52a('0x3b')],_0x149461['user'][_0xa52a('0x69')],_0x1358f6['interaction']['id'],_0x149461[_0xa52a('0x5a')]?JSON[_0xa52a('0x6a')](_0x149461['body']):_0xa52a('0x6b'));return respondWithRpcPromise(_0xa52a('0x6c'),_0xa52a('0x6d'),_0x1358f6);}return null;})[_0xa52a('0x23')](function(_0x19bf8c){var _0x10446d='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x19bf8c[_0xa52a('0x2b')][_0xa52a('0x6e')];return db[_0xa52a('0x6f')][_0xa52a('0x41')](_0x10446d,{'type':db[_0xa52a('0x70')][_0xa52a('0x71')][_0xa52a('0x72')],'raw':!![]})['then'](function(_0x4a6ec3){return _0x4a6ec3;});})['then'](function(_0xfb83b){if(_0xfb83b){_0x1358f6[_0xa52a('0x2b')]['contact']=_0xfb83b[0x0];if(!_0x149461[_0xa52a('0x5a')][_0xa52a('0x63')])return;return db['User']['find']({'where':{'id':_0x149461[_0xa52a('0x5a')]['UserId'],'role':_0xa52a('0x64')},'attributes':['id',_0xa52a('0x3b'),_0xa52a('0x73'),_0xa52a('0x74'),'internal'],'raw':!![]});}return null;})[_0xa52a('0x23')](function(_0x19f6fe){if(!_0x19f6fe)return null;_0x1358f6['message'][_0xa52a('0x64')]=_0x19f6fe;return _0x1358f6;})[_0xa52a('0x23')](function(_0x1ec979){if(_0x1ec979){if(_0x149461[_0xa52a('0x5a')][_0xa52a('0x75')]){_0x1358f6[_0xa52a('0x2b')][_0xa52a('0x76')]=util[_0xa52a('0x61')]('SIP/%s',_0x149461[_0xa52a('0x68')][_0xa52a('0x3b')]);_0x1358f6[_0xa52a('0x2b')][_0xa52a('0x77')]=_0x1358f6[_0xa52a('0x77')];_0x1358f6[_0xa52a('0x2b')][_0xa52a('0x78')]=_0x1358f6[_0xa52a('0x77')];_0x1358f6[_0xa52a('0x2b')][_0xa52a('0x79')]=_0xa52a('0x5d');return respondWithRpcPromise(_0xa52a('0x7a'),'EventManager',{'event':_0xa52a('0x7b'),'message':_0x1358f6[_0xa52a('0x2b')]},client9002)['then'](function(){return _0x1358f6;});}return _0x1358f6;}return null;})[_0xa52a('0x23')](respondWithResult(_0xb5678f,null))['catch'](handleError(_0xb5678f,null));};var interaction_log=require('../../config/logger')('sms-interactions');exports[_0xa52a('0x7c')]=function(_0x506f61,_0xc44217,_0x499e0e){var _0xbb4dde={'agent':{},'channel':_0xa52a('0x5e')};if(_0x506f61[_0xa52a('0x5a')]['id']){delete _0x506f61['body']['id'];}_0x506f61['body'][_0xa52a('0x63')]=_0x506f61['body'][_0xa52a('0x63')]||_0x506f61[_0xa52a('0x68')]['id'];_0xbb4dde['agent']['id']=_0x506f61['body'][_0xa52a('0x63')];return db[_0xa52a('0x3d')][_0xa52a('0x5b')]({'where':{'id':_0x506f61[_0xa52a('0x57')]['id'],'UserId':null}})[_0xa52a('0x23')](handleEntityNotFound(_0xc44217,null))[_0xa52a('0x23')](function(_0x726f1e){if(_0x726f1e){_0xbb4dde[_0xa52a('0x2b')]=_0x726f1e['get']({'plain':!![]});return db[_0xa52a('0x65')][_0xa52a('0x5b')]({'where':{'id':_0x726f1e[_0xa52a('0x7d')]}});}return null;})[_0xa52a('0x23')](handleEntityNotFound(_0xc44217,null))[_0xa52a('0x23')](function(_0x45cafd){if(_0x45cafd){_0xbb4dde[_0xa52a('0x67')]=_0x45cafd[_0xa52a('0x7e')]({'plain':!![]});interaction_log[_0xa52a('0x24')](_0xa52a('0x7f'),_0x506f61['user']['id'],_0x506f61[_0xa52a('0x68')][_0xa52a('0x3b')],_0x506f61['user']['role'],_0xbb4dde[_0xa52a('0x67')]['id'],_0x506f61[_0xa52a('0x5a')]?JSON[_0xa52a('0x6a')](_0x506f61[_0xa52a('0x5a')]):_0xa52a('0x6b'));return respondWithRpcPromise(_0xa52a('0x80'),_0xa52a('0x81'),_0xbb4dde);}return null;})['then'](function(_0x1daec0){var _0x55908d=_0xa52a('0x82')+_0x1daec0[_0xa52a('0x2b')][_0xa52a('0x6e')];return db[_0xa52a('0x6f')][_0xa52a('0x41')](_0x55908d,{'type':db[_0xa52a('0x70')][_0xa52a('0x71')]['SELECT'],'raw':!![]})[_0xa52a('0x23')](function(_0x557117){return _0x557117;});})['then'](function(_0x221022){if(_0x221022){_0xbb4dde['message'][_0xa52a('0x83')]=_0x221022[0x0];if(!_0x506f61[_0xa52a('0x5a')][_0xa52a('0x63')])return;return db[_0xa52a('0x84')][_0xa52a('0x5b')]({'where':{'id':_0x506f61[_0xa52a('0x5a')][_0xa52a('0x63')],'role':'agent'},'attributes':['id',_0xa52a('0x3b'),'fullname',_0xa52a('0x74'),_0xa52a('0x85')],'raw':!![]});}return null;})['then'](function(_0x4bfc64){if(!_0x4bfc64)return null;_0xbb4dde['message'][_0xa52a('0x64')]=_0x4bfc64;return _0xbb4dde;})[_0xa52a('0x23')](function(_0x45fc3b){if(_0x45fc3b){_0x45fc3b['message'][_0xa52a('0x76')]=util['format'](_0xa52a('0x86'),_0x506f61[_0xa52a('0x68')][_0xa52a('0x3b')]);_0x45fc3b[_0xa52a('0x2b')][_0xa52a('0x77')]=_0xbb4dde[_0xa52a('0x77')];_0x45fc3b[_0xa52a('0x2b')][_0xa52a('0x78')]=_0xbb4dde['channel'];_0x45fc3b[_0xa52a('0x2b')][_0xa52a('0x79')]=_0xa52a('0x7c');respondWithRpcPromise('EventManager',_0xa52a('0x7a'),{'event':_0xa52a('0x87'),'message':_0x45fc3b[_0xa52a('0x2b')]},client9002);return _0xbb4dde;}return null;})[_0xa52a('0x23')](respondWithResult(_0xc44217,null))[_0xa52a('0x58')](handleError(_0xc44217,null));};exports[_0xa52a('0x2e')]=function(_0x3fbc79,_0x5f3fc5,_0x274eb3){if(_0x3fbc79[_0xa52a('0x5a')]['id']){delete _0x3fbc79[_0xa52a('0x5a')]['id'];}var _0x6ac804;return db[_0xa52a('0x3d')][_0xa52a('0x5b')]({'where':{'id':_0x3fbc79[_0xa52a('0x57')]['id']}})['then'](handleEntityNotFound(_0x5f3fc5,null))['then'](function(_0x3f2f61){if(_0x3f2f61){_0x6ac804=_0x3f2f61;return db['SmsAccount'][_0xa52a('0x5b')]({'where':{'id':_0x3f2f61[_0xa52a('0x88')]}});}})[_0xa52a('0x23')](handleEntityNotFound(_0x5f3fc5,null))['then'](function(_0x44885b){if(_0x44885b){logger[_0xa52a('0x27')](_0xa52a('0x28'),_0xa52a('0x2e'),'received\x20delivery\x20report\x20from',_0x44885b[_0xa52a('0x3f')],util[_0xa52a('0x89')](_0x3fbc79[_0xa52a('0x5a')],{'showHidden':![],'depth':null}));switch(_0x44885b['type']){case _0xa52a('0x8a'):if(_0x3fbc79[_0xa52a('0x5a')][_0xa52a('0x8b')]&&_0x3fbc79[_0xa52a('0x5a')][_0xa52a('0x8b')]===_0x6ac804[_0xa52a('0x8c')]){return _0x6ac804['update']({'read':!![]});}else{logger[_0xa52a('0x29')](_0xa52a('0x8d'),_0xa52a('0x2e'),'twilio',util[_0xa52a('0x89')](_0x3fbc79[_0xa52a('0x5a')],{'showHidden':![],'depth':null}));}break;case _0xa52a('0x8e'):if(_0x3fbc79[_0xa52a('0x5a')][_0xa52a('0x8f')]&&_0x3fbc79['body'][_0xa52a('0x8f')]===_0x6ac804[_0xa52a('0x8c')]&&_[_0xa52a('0x90')]([_0xa52a('0x91'),_0xa52a('0x92')],_0x3fbc79['body'][_0xa52a('0x93')])>=0x0){return _0x6ac804[_0xa52a('0x38')]({'read':!![]});}else{logger['error']('SmsAccount,\x20%s,\x20%s,\x20%s',_0xa52a('0x2e'),_0xa52a('0x94'),util[_0xa52a('0x89')](_0x3fbc79['body'],{'showHidden':![],'depth':null}));}break;case _0xa52a('0x95'):var _0x4f997f=_0x3fbc79['body'][_0xa52a('0x96')][0x0];if(_0x4f997f[_0xa52a('0x2e')]['groupName']==='DELIVERED'){return _0x6ac804[_0xa52a('0x38')]({'read':!![]});}else{logger[_0xa52a('0x29')](_0xa52a('0x8d'),_0xa52a('0x2e'),_0xa52a('0x95'),util[_0xa52a('0x89')](_0x3fbc79[_0xa52a('0x5a')],{'showHidden':![],'depth':null}));}break;}return _0x6ac804;}})[_0xa52a('0x23')](respondWithResult(_0x5f3fc5,null))[_0xa52a('0x58')](handleError(_0x5f3fc5,null));};
\ No newline at end of file
index 091a36b..f65ac76 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb876=['emit','hasOwnProperty','hook','exports','events','SmsMessage','setMaxListeners','save','update'];(function(_0x3a8bb8,_0x5aae01){var _0x13a3e3=function(_0x1aefa6){while(--_0x1aefa6){_0x3a8bb8['push'](_0x3a8bb8['shift']());}};_0x13a3e3(++_0x5aae01);}(_0xb876,0x175));var _0x6b87=function(_0xf364c1,_0x4b4bd1){_0xf364c1=_0xf364c1-0x0;var _0xdd0940=_0xb876[_0xf364c1];return _0xdd0940;};'use strict';var EventEmitter=require(_0x6b87('0x0'));var SmsMessage=require('../../mysqldb')['db'][_0x6b87('0x1')];var SmsMessageEvents=new EventEmitter();SmsMessageEvents[_0x6b87('0x2')](0x0);var events={'afterCreate':_0x6b87('0x3'),'afterUpdate':_0x6b87('0x4'),'afterDestroy':'remove'};function emitEvent(_0x8db2e5){return function(_0x2d2124,_0x163ba8,_0x1c5122){SmsMessageEvents[_0x6b87('0x5')](_0x8db2e5+':'+_0x2d2124['id'],_0x2d2124);SmsMessageEvents[_0x6b87('0x5')](_0x8db2e5,_0x2d2124);_0x1c5122(null);};}for(var e in events){if(events[_0x6b87('0x6')](e)){var event=events[e];SmsMessage[_0x6b87('0x7')](e,emitEvent(event));}}module[_0x6b87('0x8')]=SmsMessageEvents;
\ No newline at end of file
+var _0xdab4=['SmsMessage','setMaxListeners','save','emit','hasOwnProperty','hook','exports','../../mysqldb'];(function(_0x27f17b,_0x4d416a){var _0x5b04f8=function(_0xef00fb){while(--_0xef00fb){_0x27f17b['push'](_0x27f17b['shift']());}};_0x5b04f8(++_0x4d416a);}(_0xdab4,0x117));var _0x4dab=function(_0x7f1d23,_0x2a883a){_0x7f1d23=_0x7f1d23-0x0;var _0xe6a945=_0xdab4[_0x7f1d23];return _0xe6a945;};'use strict';var EventEmitter=require('events');var SmsMessage=require(_0x4dab('0x0'))['db'][_0x4dab('0x1')];var SmsMessageEvents=new EventEmitter();SmsMessageEvents[_0x4dab('0x2')](0x0);var events={'afterCreate':_0x4dab('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x112fde){return function(_0x5e8a84,_0x389674,_0x4578ea){SmsMessageEvents['emit'](_0x112fde+':'+_0x5e8a84['id'],_0x5e8a84);SmsMessageEvents[_0x4dab('0x4')](_0x112fde,_0x5e8a84);_0x4578ea(null);};}for(var e in events){if(events[_0x4dab('0x5')](e)){var event=events[e];SmsMessage[_0x4dab('0x6')](e,emitEvent(event));}}module[_0x4dab('0x7')]=SmsMessageEvents;
\ No newline at end of file
index 68a684f..ba653c6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x28e6=['intelepeer','https://api.intelepeer.com/_rest/v4/app/sms/send','Bearer\x20','code','https://api.intelepeer.com/_rest/v4/app/sms/mdr','message','refid','status','Token\x20not\x20received','utf8mb4_unicode_ci','lodash','util','api','bluebird','request-promise','path','rimraf','../../config/environment','./smsMessage.attributes','exports','define','SmsMessage','sms_messages','messageId','fti_sms_messages','body','FULLTEXT','models','get','direction','toLowerCase','secret','isNil','SmsInteractionId','SmsInteraction','findOne','then','catch','out','find','SmsAccountId','type','twilio','authToken','accountSid','create','phone','remote','/api/sms/messages/','/status?token=','token','update','SmsMessage,\x20%s,\x20%s,\x20%s','username','password','smsMethod','GET','sms','POST','total_sent','internal_order_id','deliveryReport','read','error','afterCreate','skebby','inspect','connectel','senderString','https://smsapi.connectel.se/api/v2/send/','requestid','Missing\x20parameters:\x20authToken','clicksend','format','%s:%s','toString','base64','http_code','data','head','clickSend','Missing\x20parameters:\x20username,\x20password','plivo','authId','https://api.plivo.com/v1/Account/%s/Message/','Basic\x20%s','message_uuid','baseUrl','/auth/1/session','/sms/2/text/advanced','application/json','IBSSO\x20','messages','infobip','csc','crypto','apiKey','login','sender','text','timestamp','sort','createHash','digest','hex','signature=','/external/get/send.php?','id_sms','Missing\x20parameters:\x20apiKey','UTF-8','apiMessageId','clickatell','https://messaging.bandwidth.com/api/v2/users/','accountId','/messages','bandwidth'];(function(_0x9980cb,_0x4579dc){var _0x511557=function(_0xcda812){while(--_0xcda812){_0x9980cb['push'](_0x9980cb['shift']());}};_0x511557(++_0x4579dc);}(_0x28e6,0xf2));var _0x628e=function(_0x638d4a,_0x51b9d0){_0x638d4a=_0x638d4a-0x0;var _0x15ac5a=_0x28e6[_0x638d4a];return _0x15ac5a;};'use strict';var _=require(_0x628e('0x0'));var util=require(_0x628e('0x1'));var logger=require('../../config/logger')(_0x628e('0x2'));var moment=require('moment');var BPromise=require(_0x628e('0x3'));var rp=require(_0x628e('0x4'));var fs=require('fs');var path=require(_0x628e('0x5'));var rimraf=require(_0x628e('0x6'));var config=require(_0x628e('0x7'));var attributes=require(_0x628e('0x8'));module[_0x628e('0x9')]=function(_0x32d9e4,_0x13f6cd){return _0x32d9e4[_0x628e('0xa')](_0x628e('0xb'),attributes,{'tableName':_0x628e('0xc'),'paranoid':![],'indexes':[{'name':_0x628e('0xd'),'fields':[_0x628e('0xd')]},{'name':_0x628e('0xe'),'fields':[_0x628e('0xf')],'type':_0x628e('0x10')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x17c7fb,_0x19912a,_0x53393a){var _0x29eba8=_0x32d9e4[_0x628e('0x11')];var _0x3e6afc=_0x17c7fb[_0x628e('0x12')]({'plain':!![]});if(_0x3e6afc[_0x628e('0x13')][_0x628e('0x14')]()==='in'||_0x3e6afc[_0x628e('0x13')][_0x628e('0x14')]()==='out'&&!_0x3e6afc[_0x628e('0x15')]&&!_[_0x628e('0x16')](_0x3e6afc['UserId'])&&!_[_0x628e('0x16')](_0x3e6afc[_0x628e('0x17')])){_0x29eba8[_0x628e('0x18')][_0x628e('0x19')]({'where':{'id':_0x3e6afc['SmsInteractionId']}})[_0x628e('0x1a')](function(_0x113867){if(_0x113867){_0x113867['update']({'lastMsgAt':_0x3e6afc['createdAt'],'lastMsgDirection':_0x3e6afc['direction'][_0x628e('0x14')]()});}})[_0x628e('0x1b')](function(_0x360ed2){console['error'](_0x360ed2);});}if(_0x3e6afc[_0x628e('0x13')]===_0x628e('0x1c')&&!_0x3e6afc['secret']){var _0x3254d4;_0x29eba8['SmsAccount'][_0x628e('0x1d')]({'where':{'id':_0x3e6afc[_0x628e('0x1e')]},'raw':!![]})[_0x628e('0x1a')](function(_0xe0079c){_0x3254d4=_0xe0079c;if(_0x3254d4&&_0x3254d4[_0x628e('0x1f')]){switch(_0x3254d4[_0x628e('0x1f')]){case _0x628e('0x20'):var _0x3ba04d=require(_0x628e('0x20'));if(_0x3254d4['accountSid']&&_0x3254d4[_0x628e('0x21')]&&_0x3254d4['phone']){var _0x13b226=new _0x3ba04d(_0x3254d4[_0x628e('0x22')],_0x3254d4[_0x628e('0x21')]);_0x13b226['messages'][_0x628e('0x23')]({'body':_0x3e6afc['body'],'to':_0x3e6afc[_0x628e('0x24')],'from':_0x3254d4[_0x628e('0x24')],'statusCallback':_0x3254d4[_0x628e('0x25')]+_0x628e('0x26')+_0x3e6afc['id']+_0x628e('0x27')+_0x3254d4[_0x628e('0x28')]})['then'](function(_0xf2f8d5){if(_0xf2f8d5['sid']){return _0x17c7fb[_0x628e('0x29')]({'messageId':_0xf2f8d5['sid']});}})[_0x628e('0x1b')](function(_0x37367d){logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','twilio',util['inspect'](_0x37367d,{'showHidden':![],'depth':null}));});}else{logger['error'](_0x628e('0x2a'),'afterCreate',_0x628e('0x20'),'Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken');}break;case'skebby':var _0x2c3643='https://api.skebby.it/API/v1.0/REST/';if(_0x3254d4[_0x628e('0x2b')]&&_0x3254d4[_0x628e('0x2c')]){var _0x3d892f={'recipient':[_0x3e6afc[_0x628e('0x24')]],'message':_0x3e6afc[_0x628e('0xf')],'message_type':_0x3254d4['smsMethod']};if(_0x3254d4['smsMethod']&&_0x3254d4[_0x628e('0x2d')]!=='SI'){_0x3d892f['sender']=_0x3254d4[_0x628e('0x24')];}var _0x2b48c4={'url':_0x2c3643+'login?username='+_0x3254d4[_0x628e('0x2b')]+'&password='+_0x3254d4[_0x628e('0x2c')],'method':_0x628e('0x2e')};rp(_0x2b48c4)[_0x628e('0x1a')](function(_0x9d61da){var _0x264dc7=_0x9d61da['split'](';');var _0xd94351={'user_key':_0x264dc7[0x0],'session_key':_0x264dc7[0x1]};_0x2b48c4={'url':_0x2c3643+_0x628e('0x2f'),'method':_0x628e('0x30'),'headers':{'user_key':_0xd94351['user_key'],'Session_key':_0xd94351['session_key']},'json':!![],'body':_0x3d892f};return rp(_0x2b48c4);})[_0x628e('0x1a')](function(_0x560863){if(_0x560863[_0x628e('0x31')]>=0x1){var _0x2ae1ad={'messageId':_0x560863[_0x628e('0x32')]};if(_0x3254d4[_0x628e('0x2d')]!=='GP'||!_0x3254d4[_0x628e('0x33')]){_0x2ae1ad[_0x628e('0x34')]=!![];}return _0x17c7fb[_0x628e('0x29')](_0x2ae1ad);}else{return logger[_0x628e('0x35')](_0x628e('0x2a'),_0x628e('0x36'),_0x628e('0x37'),util[_0x628e('0x38')](_0x560863,{'showHidden':![],'depth':null}));}})[_0x628e('0x1b')](function(_0x969e46){return logger[_0x628e('0x35')](_0x628e('0x2a'),_0x628e('0x36'),_0x628e('0x37'),util[_0x628e('0x38')](_0x969e46,{'showHidden':![],'depth':null}));});}else{logger[_0x628e('0x35')](_0x628e('0x2a'),_0x628e('0x36'),'skebby','Missing\x20parameters:\x20username,\x20password');}break;case _0x628e('0x39'):if(_0x3254d4[_0x628e('0x21')]){var _0xd42f03={'recipient':_0x3e6afc[_0x628e('0x24')],'message':_0x3e6afc[_0x628e('0xf')],'sender':_0x3254d4[_0x628e('0x3a')]||_0x3254d4['phone'],'authorization':_0x3254d4[_0x628e('0x21')]};var _0x19912a={'method':_0x628e('0x30'),'uri':_0x628e('0x3b'),'body':_0xd42f03,'json':!![]};rp(_0x19912a)['then'](function(_0x170cc7){var _0x300302={'messageId':_0x170cc7[_0x628e('0x3c')]};if(!_0x3254d4[_0x628e('0x33')]){_0x300302[_0x628e('0x34')]=!![];}return _0x17c7fb[_0x628e('0x29')](_0x300302);})[_0x628e('0x1b')](function(_0x10e362){logger[_0x628e('0x35')](_0x628e('0x2a'),_0x628e('0x36'),_0x628e('0x39'),util[_0x628e('0x38')](_0x10e362,{'showHidden':![],'depth':null}));});}else{logger[_0x628e('0x35')](_0x628e('0x2a'),_0x628e('0x36'),_0x628e('0x39'),_0x628e('0x3d'));}break;case _0x628e('0x3e'):if(_0x3254d4[_0x628e('0x2b')]&&_0x3254d4['password']){var _0xd42f03={'messages':[{'source':'xCALLY\x20Motion','to':_0x3e6afc[_0x628e('0x24')],'body':_0x3e6afc[_0x628e('0xf')],'from':_0x3254d4[_0x628e('0x3a')]||_0x3254d4[_0x628e('0x24')]}]};var _0x348d18=util[_0x628e('0x3f')](_0x628e('0x40'),_0x3254d4[_0x628e('0x2b')],_0x3254d4[_0x628e('0x2c')]);var _0x19912a={'method':_0x628e('0x30'),'uri':'https://rest.clicksend.com/v3/sms/send','body':_0xd42f03,'headers':{'Authorization':util[_0x628e('0x3f')]('Basic\x20%s',new Buffer(_0x348d18)[_0x628e('0x41')](_0x628e('0x42')))},'json':!![]};rp(_0x19912a)[_0x628e('0x1a')](function(_0x37f394){if(_0x37f394['http_code']>=0xc8&&_0x37f394[_0x628e('0x43')]<=0xce){if(_0x37f394[_0x628e('0x44')]&&_0x37f394[_0x628e('0x44')]['queued_count']>0x0){var _0x3b8b2c=_[_0x628e('0x45')](_0x37f394[_0x628e('0x44')]['messages']);var _0x273b03={'messageId':_0x3b8b2c['message_id']};if(!_0x3254d4[_0x628e('0x33')]){_0x273b03['read']=!![];}return _0x17c7fb[_0x628e('0x29')](_0x273b03);}else{logger[_0x628e('0x35')](_0x628e('0x2a'),_0x628e('0x36'),_0x628e('0x46'),util['inspect'](_0x37f394,{'showHidden':![],'depth':null}));}}else{logger[_0x628e('0x35')](_0x628e('0x2a'),_0x628e('0x36'),_0x628e('0x46'),util['inspect'](_0x37f394,{'showHidden':![],'depth':null}));}})[_0x628e('0x1b')](function(_0x194f1b){logger[_0x628e('0x35')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0x628e('0x46'),util[_0x628e('0x38')](_0x194f1b,{'showHidden':![],'depth':null}));});}else{logger[_0x628e('0x35')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x628e('0x36'),_0x628e('0x46'),_0x628e('0x47'));}break;case _0x628e('0x48'):if(_0x3254d4[_0x628e('0x49')]&&_0x3254d4[_0x628e('0x21')]){var _0xd42f03={'dst':_0x3e6afc['phone'],'text':_0x3e6afc[_0x628e('0xf')],'src':_0x3254d4[_0x628e('0x3a')]||_0x3254d4[_0x628e('0x24')],'url':_0x3254d4[_0x628e('0x25')]+_0x628e('0x26')+_0x3e6afc['id']+_0x628e('0x27')+_0x3254d4[_0x628e('0x28')]};var _0x348d18=util['format'](_0x628e('0x40'),_0x3254d4[_0x628e('0x49')],_0x3254d4[_0x628e('0x21')]);var _0x19912a={'method':_0x628e('0x30'),'uri':util['format'](_0x628e('0x4a'),_0x3254d4[_0x628e('0x49')]),'body':_0xd42f03,'headers':{'Authorization':util[_0x628e('0x3f')](_0x628e('0x4b'),new Buffer(_0x348d18)[_0x628e('0x41')](_0x628e('0x42')))},'json':!![]};rp(_0x19912a)[_0x628e('0x1a')](function(_0x4510d1){var _0x4dade3={'messageId':_0x4510d1[_0x628e('0x4c')][0x0]};return _0x17c7fb[_0x628e('0x29')](_0x4dade3);})['catch'](function(_0x57b54e){logger['error'](_0x628e('0x2a'),'afterCreate',_0x628e('0x48'),util['inspect'](_0x57b54e,{'showHidden':![],'depth':null}));});}else{logger[_0x628e('0x35')](_0x628e('0x2a'),'afterCreate',_0x628e('0x48'),'Missing\x20parameters:\x20authId,\x20authToken');}break;case'infobip':if(_0x3254d4['username']&&_0x3254d4[_0x628e('0x2c')]){if(_0x3254d4[_0x628e('0x4d')]){var _0x1e61f9={'method':'POST','uri':_0x3254d4[_0x628e('0x4d')]+_0x628e('0x4e'),'body':{'username':_0x3254d4[_0x628e('0x2b')],'password':_0x3254d4['password']},'json':!![]};return rp(_0x1e61f9)[_0x628e('0x1a')](function(_0x35058e){var _0x5965c2={'method':_0x628e('0x30'),'uri':_0x3254d4[_0x628e('0x4d')]+_0x628e('0x4f'),'body':{'messages':[{'from':_0x3254d4[_0x628e('0x24')],'destinations':[{'to':_0x3e6afc['phone']}],'text':_0x3e6afc[_0x628e('0xf')],'notifyUrl':_0x3254d4[_0x628e('0x25')]+_0x628e('0x26')+_0x3e6afc['id']+_0x628e('0x27')+_0x3254d4[_0x628e('0x28')],'notifyContentType':_0x628e('0x50'),'callbackData':_0x3254d4['phone']+';'+_0x3e6afc[_0x628e('0xf')]}]},'headers':{'Authorization':_0x628e('0x51')+_0x35058e[_0x628e('0x28')]},'json':!![]};return rp(_0x5965c2)[_0x628e('0x1a')](function(_0x51805d){if(_0x51805d[_0x628e('0x52')]){var _0x45235b={'messageId':_0x51805d[_0x628e('0x52')][0x0][_0x628e('0xd')]};if(!_0x3254d4[_0x628e('0x33')]){_0x45235b[_0x628e('0x34')]=!![];}return _0x17c7fb[_0x628e('0x29')](_0x45235b);}else{return logger[_0x628e('0x35')](_0x628e('0x2a'),'afterCreate',_0x628e('0x53'),util[_0x628e('0x38')](_0x51805d,{'showHidden':![],'depth':null}));}});})['catch'](function(_0x564f57){return logger['error'](_0x628e('0x2a'),_0x628e('0x36'),_0x628e('0x53'),util['inspect'](_0x564f57,{'showHidden':![],'depth':null}));});}else{logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0x628e('0x36'),'infobip','Missing\x20parameters:\x20base_url');}}else{logger[_0x628e('0x35')](_0x628e('0x2a'),_0x628e('0x36'),_0x628e('0x53'),_0x628e('0x47'));}break;case _0x628e('0x54'):var _0x257043=require(_0x628e('0x55'));if(_0x3254d4[_0x628e('0x56')]){var _0x29ec4d={};_0x29ec4d[_0x628e('0x57')]=_0x3254d4['username'];_0x29ec4d['phone']=_0x3e6afc[_0x628e('0x24')];_0x29ec4d[_0x628e('0x58')]=_0x3254d4[_0x628e('0x24')];_0x29ec4d[_0x628e('0x59')]=_0x3e6afc[_0x628e('0xf')];_0x29ec4d[_0x628e('0x5a')]=+new Date();var _0x2ed018='';var _0x1fd6eb='';var _0x2b956b=Object['keys'](_0x29ec4d);_0x2b956b[_0x628e('0x5b')]();for(var _0x148bdb=0x0;_0x148bdb<_0x2b956b['length'];_0x148bdb++){if(_0x2ed018!=''){_0x2ed018+='&';}_0x2ed018+=_0x2b956b[_0x148bdb]+'='+encodeURIComponent(_0x29ec4d[_0x2b956b[_0x148bdb]]);_0x1fd6eb+=_0x29ec4d[_0x2b956b[_0x148bdb]];}_0x1fd6eb+=_0x3254d4['apiKey'];_0x1fd6eb=_0x257043[_0x628e('0x5c')]('md5')['update'](_0x1fd6eb)[_0x628e('0x5d')](_0x628e('0x5e'));if(_0x2ed018!==''){_0x2ed018+='&';}_0x2ed018+=_0x628e('0x5f')+_0x1fd6eb;var _0x2b48c4={'method':_0x628e('0x2e'),'uri':_0x3254d4[_0x628e('0x4d')]+_0x628e('0x60')+_0x2ed018,'json':!![]};return rp(_0x2b48c4)[_0x628e('0x1a')](function(_0x3afbc5){var _0x50d386=Object['keys'](_0x3afbc5);if(_0x3afbc5[_0x50d386[0x0]][_0x628e('0x35')]&&parseInt(_0x3afbc5[_0x50d386[0x0]][_0x628e('0x35')])===0x0){var _0x115aff={'messageId':_0x3afbc5[_0x50d386[0x0]][_0x628e('0x61')]};if(!_0x3254d4[_0x628e('0x33')]){_0x115aff['read']=!![];}return _0x17c7fb['update'](_0x115aff);}else{return logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0x628e('0x36'),'csc',util[_0x628e('0x38')](_0x3afbc5[_0x628e('0x35')],{'showHidden':![],'depth':null}));}})[_0x628e('0x1b')](function(_0x209b12){return logger[_0x628e('0x35')](_0x628e('0x2a'),_0x628e('0x36'),_0x628e('0x54'),util[_0x628e('0x38')](_0x209b12,{'showHidden':![],'depth':null}));});}else{logger[_0x628e('0x35')](_0x628e('0x2a'),'afterCreate',_0x628e('0x54'),_0x628e('0x62'));}break;case'clickatell':if(_0x3254d4['apiKey']){var _0x2a254d={'method':_0x628e('0x30'),'uri':'https://platform.clickatell.com/messages','headers':{'Authorization':_0x3254d4['apiKey']},'body':{'content':_0x3e6afc[_0x628e('0xf')],'to':[_0x3e6afc[_0x628e('0x24')]],'from':_0x3254d4[_0x628e('0x24')],'binary':![],'clientMessageId':'uuid','charset':_0x628e('0x63')},'json':!![]};rp(_0x2a254d)[_0x628e('0x1a')](function(_0x5341df){if(!_0x5341df[_0x628e('0x35')]){var _0x2f7738={'messageId':_0x5341df[_0x628e('0x52')][0x0][_0x628e('0x64')]};if(!_0x3254d4['deliveryReport']){_0x2f7738[_0x628e('0x34')]=!![];}return _0x17c7fb[_0x628e('0x29')](_0x2f7738);}else{return logger[_0x628e('0x35')](_0x628e('0x2a'),_0x628e('0x36'),_0x628e('0x65'),util['inspect'](_0x5341df['error'],{'showHidden':![],'depth':null}));}})[_0x628e('0x1b')](function(_0x5af86e){return logger[_0x628e('0x35')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x628e('0x36'),_0x628e('0x65'),util[_0x628e('0x38')](_0x5af86e,{'showHidden':![],'depth':null}));});}else{logger[_0x628e('0x35')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x628e('0x36'),_0x628e('0x65'),_0x628e('0x62'));}break;case'bandwidth':if(_0x3254d4[_0x628e('0x2b')]&&_0x3254d4[_0x628e('0x2c')]){var _0x348d18=util[_0x628e('0x3f')]('%s:%s',_0x3254d4[_0x628e('0x2b')],_0x3254d4['password']);var _0x19912a={'method':'POST','uri':_0x628e('0x66')+_0x3254d4[_0x628e('0x67')]+_0x628e('0x68'),'body':{'to':[_0x3e6afc[_0x628e('0x24')]],'text':_0x3e6afc[_0x628e('0xf')],'from':_0x3254d4[_0x628e('0x24')],'applicationId':_0x3254d4['applicationId']},'headers':{'Authorization':util[_0x628e('0x3f')](_0x628e('0x4b'),new Buffer(_0x348d18)[_0x628e('0x41')](_0x628e('0x42')))},'json':!![]};rp(_0x19912a)['then'](function(_0x347ed8){if(_0x347ed8['id']){var _0x569d46={'messageId':_0x347ed8['id']};return _0x17c7fb[_0x628e('0x29')](_0x569d46);}else{logger[_0x628e('0x35')](_0x628e('0x2a'),_0x628e('0x36'),'bandwidth',util[_0x628e('0x38')](_0x347ed8,{'showHidden':![],'depth':null}));}})[_0x628e('0x1b')](function(_0x55d644){logger['error'](_0x628e('0x2a'),_0x628e('0x36'),_0x628e('0x69'),util[_0x628e('0x38')](_0x55d644,{'showHidden':![],'depth':null}));});}else{logger[_0x628e('0x35')](_0x628e('0x2a'),_0x628e('0x36'),_0x628e('0x69'),_0x628e('0x47'));}break;case _0x628e('0x6a'):if(_0x3254d4[_0x628e('0x56')]){var _0x141b6c={};var _0x2b48c4={'method':_0x628e('0x30'),'uri':_0x628e('0x6b'),'headers':{'Authorization':_0x628e('0x6c')+_0x3254d4[_0x628e('0x56')],'Content-Type':'application/json'},'body':{'from':_0x3254d4['phone'],'to':_0x3e6afc[_0x628e('0x24')],'text':_0x3e6afc[_0x628e('0xf')]},'json':!![]};return rp(_0x2b48c4)['then'](function(_0x2d4da5){if(_0x2d4da5[_0x628e('0x6d')]==0xca){_0x141b6c['message']=_0x2d4da5;var _0x2cad73={'method':_0x628e('0x30'),'uri':_0x628e('0x6e'),'headers':{'Authorization':_0x628e('0x6c')+_0x3254d4[_0x628e('0x56')],'Content-Type':'application/json'},'body':{'refid':_0x141b6c[_0x628e('0x6f')][_0x628e('0x70')]},'json':!![]};return rp(_0x2cad73)[_0x628e('0x1a')](function(_0x64a0b9){_0x141b6c[_0x628e('0x71')]=_0x64a0b9;var _0x398fa8={'messageId':_0x141b6c['message'][_0x628e('0x70')],'read':!![]};return _0x17c7fb[_0x628e('0x29')](_0x398fa8);});}else{return logger[_0x628e('0x35')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x628e('0x36'),_0x628e('0x6a'),util[_0x628e('0x38')](_0x2d4da5,{'showHidden':![],'depth':null}));}})[_0x628e('0x1b')](function(_0xc26e7b){return logger[_0x628e('0x35')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x628e('0x36'),_0x628e('0x6a'),util['inspect'](_0xc26e7b,{'showHidden':![],'depth':null}));});}else{return logger[_0x628e('0x35')](_0x628e('0x2a'),'afterCreate','intelepeer',_0x628e('0x72'));}break;}}})['finally'](function(){_0x53393a();});}else{_0x53393a();}}},'charset':'utf8mb4','collate':_0x628e('0x73')});};
\ No newline at end of file
+var _0xb4af=['bandwidth','https://messaging.bandwidth.com/api/v2/users/','accountId','toString','https://api.intelepeer.com/_rest/v4/app/sms/send','Bearer\x20','code','https://api.intelepeer.com/_rest/v4/app/sms/mdr','message','refid','intelepeer','Token\x20not\x20received','finally','lodash','util','api','moment','bluebird','request-promise','path','../../config/environment','./smsMessage.attributes','exports','messageId','body','models','get','direction','toLowerCase','out','secret','isNil','UserId','SmsInteractionId','findOne','update','createdAt','catch','SmsAccount','find','then','type','twilio','accountSid','authToken','phone','messages','create','remote','/api/sms/messages/','token','sid','error','SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken','skebby','https://api.skebby.it/API/v1.0/REST/','username','password','smsMethod','sender','login?username=','&password=','GET','split','POST','user_key','session_key','internal_order_id','deliveryReport','read','inspect','Missing\x20parameters:\x20username,\x20password','connectel','senderString','https://smsapi.connectel.se/api/v2/send/','requestid','Missing\x20parameters:\x20authToken','clicksend','https://rest.clicksend.com/v3/sms/send','Basic\x20%s','base64','http_code','data','message_id','clickSend','plivo','authId','format','%s:%s','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','keys','sort','length','md5','hex','signature=','/external/get/send.php?','id_sms','Missing\x20parameters:\x20apiKey','clickatell','UTF-8','apiMessageId'];(function(_0x2d3ec4,_0x119362){var _0x6d0b5=function(_0xd6d7da){while(--_0xd6d7da){_0x2d3ec4['push'](_0x2d3ec4['shift']());}};_0x6d0b5(++_0x119362);}(_0xb4af,0xf9));var _0xfb4a=function(_0x2b4411,_0x2625ed){_0x2b4411=_0x2b4411-0x0;var _0x8e41ef=_0xb4af[_0x2b4411];return _0x8e41ef;};'use strict';var _=require(_0xfb4a('0x0'));var util=require(_0xfb4a('0x1'));var logger=require('../../config/logger')(_0xfb4a('0x2'));var moment=require(_0xfb4a('0x3'));var BPromise=require(_0xfb4a('0x4'));var rp=require(_0xfb4a('0x5'));var fs=require('fs');var path=require(_0xfb4a('0x6'));var rimraf=require('rimraf');var config=require(_0xfb4a('0x7'));var attributes=require(_0xfb4a('0x8'));module[_0xfb4a('0x9')]=function(_0x3752a5,_0x2aed2b){return _0x3752a5['define']('SmsMessage',attributes,{'tableName':'sms_messages','paranoid':![],'indexes':[{'name':_0xfb4a('0xa'),'fields':['messageId']},{'name':'fti_sms_messages','fields':[_0xfb4a('0xb')],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'afterCreate':function(_0x492f40,_0x35c9b6,_0xb133d9){var _0x15777f=_0x3752a5[_0xfb4a('0xc')];var _0x48206a=_0x492f40[_0xfb4a('0xd')]({'plain':!![]});if(_0x48206a[_0xfb4a('0xe')][_0xfb4a('0xf')]()==='in'||_0x48206a['direction'][_0xfb4a('0xf')]()===_0xfb4a('0x10')&&!_0x48206a[_0xfb4a('0x11')]&&!_[_0xfb4a('0x12')](_0x48206a[_0xfb4a('0x13')])&&!_[_0xfb4a('0x12')](_0x48206a[_0xfb4a('0x14')])){_0x15777f['SmsInteraction'][_0xfb4a('0x15')]({'where':{'id':_0x48206a[_0xfb4a('0x14')]}})['then'](function(_0x3d56e5){if(_0x3d56e5){_0x3d56e5[_0xfb4a('0x16')]({'lastMsgAt':_0x48206a[_0xfb4a('0x17')],'lastMsgDirection':_0x48206a[_0xfb4a('0xe')][_0xfb4a('0xf')]()});}})[_0xfb4a('0x18')](function(_0x5f0dc1){console['error'](_0x5f0dc1);});}if(_0x48206a[_0xfb4a('0xe')]==='out'&&!_0x48206a[_0xfb4a('0x11')]){var _0x3368cf;_0x15777f[_0xfb4a('0x19')][_0xfb4a('0x1a')]({'where':{'id':_0x48206a['SmsAccountId']},'raw':!![]})[_0xfb4a('0x1b')](function(_0x5565e0){_0x3368cf=_0x5565e0;if(_0x3368cf&&_0x3368cf[_0xfb4a('0x1c')]){switch(_0x3368cf['type']){case _0xfb4a('0x1d'):var _0x2976b5=require(_0xfb4a('0x1d'));if(_0x3368cf[_0xfb4a('0x1e')]&&_0x3368cf[_0xfb4a('0x1f')]&&_0x3368cf[_0xfb4a('0x20')]){var _0x3e28cb=new _0x2976b5(_0x3368cf[_0xfb4a('0x1e')],_0x3368cf[_0xfb4a('0x1f')]);_0x3e28cb[_0xfb4a('0x21')][_0xfb4a('0x22')]({'body':_0x48206a[_0xfb4a('0xb')],'to':_0x48206a[_0xfb4a('0x20')],'from':_0x3368cf['phone'],'statusCallback':_0x3368cf[_0xfb4a('0x23')]+_0xfb4a('0x24')+_0x48206a['id']+'/status?token='+_0x3368cf[_0xfb4a('0x25')]})[_0xfb4a('0x1b')](function(_0x89aad7){if(_0x89aad7[_0xfb4a('0x26')]){return _0x492f40[_0xfb4a('0x16')]({'messageId':_0x89aad7[_0xfb4a('0x26')]});}})[_0xfb4a('0x18')](function(_0x3b7d6b){logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','twilio',util['inspect'](_0x3b7d6b,{'showHidden':![],'depth':null}));});}else{logger[_0xfb4a('0x27')](_0xfb4a('0x28'),_0xfb4a('0x29'),_0xfb4a('0x1d'),_0xfb4a('0x2a'));}break;case _0xfb4a('0x2b'):var _0x5564ef=_0xfb4a('0x2c');if(_0x3368cf[_0xfb4a('0x2d')]&&_0x3368cf[_0xfb4a('0x2e')]){var _0x366ff9={'recipient':[_0x48206a[_0xfb4a('0x20')]],'message':_0x48206a['body'],'message_type':_0x3368cf[_0xfb4a('0x2f')]};if(_0x3368cf[_0xfb4a('0x2f')]&&_0x3368cf[_0xfb4a('0x2f')]!=='SI'){_0x366ff9[_0xfb4a('0x30')]=_0x3368cf[_0xfb4a('0x20')];}var _0x438ed3={'url':_0x5564ef+_0xfb4a('0x31')+_0x3368cf[_0xfb4a('0x2d')]+_0xfb4a('0x32')+_0x3368cf[_0xfb4a('0x2e')],'method':_0xfb4a('0x33')};rp(_0x438ed3)[_0xfb4a('0x1b')](function(_0xe75583){var _0xa24b88=_0xe75583[_0xfb4a('0x34')](';');var _0x9cc6a0={'user_key':_0xa24b88[0x0],'session_key':_0xa24b88[0x1]};_0x438ed3={'url':_0x5564ef+'sms','method':_0xfb4a('0x35'),'headers':{'user_key':_0x9cc6a0[_0xfb4a('0x36')],'Session_key':_0x9cc6a0[_0xfb4a('0x37')]},'json':!![],'body':_0x366ff9};return rp(_0x438ed3);})[_0xfb4a('0x1b')](function(_0x14899c){if(_0x14899c['total_sent']>=0x1){var _0x4c6688={'messageId':_0x14899c[_0xfb4a('0x38')]};if(_0x3368cf[_0xfb4a('0x2f')]!=='GP'||!_0x3368cf[_0xfb4a('0x39')]){_0x4c6688[_0xfb4a('0x3a')]=!![];}return _0x492f40[_0xfb4a('0x16')](_0x4c6688);}else{return logger[_0xfb4a('0x27')](_0xfb4a('0x28'),_0xfb4a('0x29'),_0xfb4a('0x2b'),util[_0xfb4a('0x3b')](_0x14899c,{'showHidden':![],'depth':null}));}})['catch'](function(_0x5b4be3){return logger[_0xfb4a('0x27')](_0xfb4a('0x28'),_0xfb4a('0x29'),_0xfb4a('0x2b'),util[_0xfb4a('0x3b')](_0x5b4be3,{'showHidden':![],'depth':null}));});}else{logger[_0xfb4a('0x27')](_0xfb4a('0x28'),'afterCreate',_0xfb4a('0x2b'),_0xfb4a('0x3c'));}break;case _0xfb4a('0x3d'):if(_0x3368cf['authToken']){var _0x3961b8={'recipient':_0x48206a[_0xfb4a('0x20')],'message':_0x48206a[_0xfb4a('0xb')],'sender':_0x3368cf[_0xfb4a('0x3e')]||_0x3368cf['phone'],'authorization':_0x3368cf[_0xfb4a('0x1f')]};var _0x35c9b6={'method':'POST','uri':_0xfb4a('0x3f'),'body':_0x3961b8,'json':!![]};rp(_0x35c9b6)[_0xfb4a('0x1b')](function(_0x2afabe){var _0x52d27e={'messageId':_0x2afabe[_0xfb4a('0x40')]};if(!_0x3368cf[_0xfb4a('0x39')]){_0x52d27e['read']=!![];}return _0x492f40[_0xfb4a('0x16')](_0x52d27e);})[_0xfb4a('0x18')](function(_0x3a7fd0){logger['error'](_0xfb4a('0x28'),_0xfb4a('0x29'),'connectel',util[_0xfb4a('0x3b')](_0x3a7fd0,{'showHidden':![],'depth':null}));});}else{logger[_0xfb4a('0x27')](_0xfb4a('0x28'),'afterCreate',_0xfb4a('0x3d'),_0xfb4a('0x41'));}break;case _0xfb4a('0x42'):if(_0x3368cf['username']&&_0x3368cf[_0xfb4a('0x2e')]){var _0x3961b8={'messages':[{'source':'xCALLY\x20Motion','to':_0x48206a['phone'],'body':_0x48206a[_0xfb4a('0xb')],'from':_0x3368cf[_0xfb4a('0x3e')]||_0x3368cf['phone']}]};var _0x12e940=util['format']('%s:%s',_0x3368cf['username'],_0x3368cf[_0xfb4a('0x2e')]);var _0x35c9b6={'method':_0xfb4a('0x35'),'uri':_0xfb4a('0x43'),'body':_0x3961b8,'headers':{'Authorization':util['format'](_0xfb4a('0x44'),new Buffer(_0x12e940)['toString'](_0xfb4a('0x45')))},'json':!![]};rp(_0x35c9b6)[_0xfb4a('0x1b')](function(_0x42e3de){if(_0x42e3de['http_code']>=0xc8&&_0x42e3de[_0xfb4a('0x46')]<=0xce){if(_0x42e3de['data']&&_0x42e3de[_0xfb4a('0x47')]['queued_count']>0x0){var _0x3ad771=_['head'](_0x42e3de[_0xfb4a('0x47')][_0xfb4a('0x21')]);var _0x4dd9e3={'messageId':_0x3ad771[_0xfb4a('0x48')]};if(!_0x3368cf[_0xfb4a('0x39')]){_0x4dd9e3[_0xfb4a('0x3a')]=!![];}return _0x492f40['update'](_0x4dd9e3);}else{logger[_0xfb4a('0x27')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xfb4a('0x29'),'clickSend',util[_0xfb4a('0x3b')](_0x42e3de,{'showHidden':![],'depth':null}));}}else{logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0xfb4a('0x29'),_0xfb4a('0x49'),util[_0xfb4a('0x3b')](_0x42e3de,{'showHidden':![],'depth':null}));}})['catch'](function(_0x572494){logger[_0xfb4a('0x27')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xfb4a('0x29'),_0xfb4a('0x49'),util[_0xfb4a('0x3b')](_0x572494,{'showHidden':![],'depth':null}));});}else{logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0xfb4a('0x29'),_0xfb4a('0x49'),_0xfb4a('0x3c'));}break;case _0xfb4a('0x4a'):if(_0x3368cf[_0xfb4a('0x4b')]&&_0x3368cf[_0xfb4a('0x1f')]){var _0x3961b8={'dst':_0x48206a[_0xfb4a('0x20')],'text':_0x48206a['body'],'src':_0x3368cf[_0xfb4a('0x3e')]||_0x3368cf[_0xfb4a('0x20')],'url':_0x3368cf[_0xfb4a('0x23')]+_0xfb4a('0x24')+_0x48206a['id']+'/status?token='+_0x3368cf[_0xfb4a('0x25')]};var _0x12e940=util[_0xfb4a('0x4c')](_0xfb4a('0x4d'),_0x3368cf[_0xfb4a('0x4b')],_0x3368cf[_0xfb4a('0x1f')]);var _0x35c9b6={'method':_0xfb4a('0x35'),'uri':util[_0xfb4a('0x4c')](_0xfb4a('0x4e'),_0x3368cf[_0xfb4a('0x4b')]),'body':_0x3961b8,'headers':{'Authorization':util[_0xfb4a('0x4c')](_0xfb4a('0x44'),new Buffer(_0x12e940)['toString'](_0xfb4a('0x45')))},'json':!![]};rp(_0x35c9b6)['then'](function(_0x29a73d){var _0x65d666={'messageId':_0x29a73d[_0xfb4a('0x4f')][0x0]};return _0x492f40[_0xfb4a('0x16')](_0x65d666);})[_0xfb4a('0x18')](function(_0x513ea7){logger[_0xfb4a('0x27')](_0xfb4a('0x28'),_0xfb4a('0x29'),_0xfb4a('0x4a'),util[_0xfb4a('0x3b')](_0x513ea7,{'showHidden':![],'depth':null}));});}else{logger[_0xfb4a('0x27')](_0xfb4a('0x28'),_0xfb4a('0x29'),'plivo',_0xfb4a('0x50'));}break;case _0xfb4a('0x51'):if(_0x3368cf[_0xfb4a('0x2d')]&&_0x3368cf['password']){if(_0x3368cf[_0xfb4a('0x52')]){var _0xe7d2c9={'method':_0xfb4a('0x35'),'uri':_0x3368cf[_0xfb4a('0x52')]+_0xfb4a('0x53'),'body':{'username':_0x3368cf[_0xfb4a('0x2d')],'password':_0x3368cf[_0xfb4a('0x2e')]},'json':!![]};return rp(_0xe7d2c9)[_0xfb4a('0x1b')](function(_0x352de4){var _0x49e240={'method':_0xfb4a('0x35'),'uri':_0x3368cf['baseUrl']+_0xfb4a('0x54'),'body':{'messages':[{'from':_0x3368cf[_0xfb4a('0x20')],'destinations':[{'to':_0x48206a[_0xfb4a('0x20')]}],'text':_0x48206a['body'],'notifyUrl':_0x3368cf[_0xfb4a('0x23')]+'/api/sms/messages/'+_0x48206a['id']+'/status?token='+_0x3368cf[_0xfb4a('0x25')],'notifyContentType':_0xfb4a('0x55'),'callbackData':_0x3368cf['phone']+';'+_0x48206a[_0xfb4a('0xb')]}]},'headers':{'Authorization':_0xfb4a('0x56')+_0x352de4[_0xfb4a('0x25')]},'json':!![]};return rp(_0x49e240)[_0xfb4a('0x1b')](function(_0x85eb4b){if(_0x85eb4b[_0xfb4a('0x21')]){var _0x50c637={'messageId':_0x85eb4b[_0xfb4a('0x21')][0x0][_0xfb4a('0xa')]};if(!_0x3368cf[_0xfb4a('0x39')]){_0x50c637[_0xfb4a('0x3a')]=!![];}return _0x492f40[_0xfb4a('0x16')](_0x50c637);}else{return logger[_0xfb4a('0x27')](_0xfb4a('0x28'),_0xfb4a('0x29'),'infobip',util[_0xfb4a('0x3b')](_0x85eb4b,{'showHidden':![],'depth':null}));}});})[_0xfb4a('0x18')](function(_0x4dd9de){return logger[_0xfb4a('0x27')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xfb4a('0x29'),_0xfb4a('0x51'),util[_0xfb4a('0x3b')](_0x4dd9de,{'showHidden':![],'depth':null}));});}else{logger[_0xfb4a('0x27')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0xfb4a('0x51'),_0xfb4a('0x57'));}}else{logger[_0xfb4a('0x27')](_0xfb4a('0x28'),_0xfb4a('0x29'),_0xfb4a('0x51'),'Missing\x20parameters:\x20username,\x20password');}break;case _0xfb4a('0x58'):var _0x3d6052=require(_0xfb4a('0x59'));if(_0x3368cf[_0xfb4a('0x5a')]){var _0x2bad6a={};_0x2bad6a[_0xfb4a('0x5b')]=_0x3368cf['username'];_0x2bad6a[_0xfb4a('0x20')]=_0x48206a[_0xfb4a('0x20')];_0x2bad6a['sender']=_0x3368cf['phone'];_0x2bad6a[_0xfb4a('0x5c')]=_0x48206a['body'];_0x2bad6a['timestamp']=+new Date();var _0x366260='';var _0x29c8f6='';var _0x1de949=Object[_0xfb4a('0x5d')](_0x2bad6a);_0x1de949[_0xfb4a('0x5e')]();for(var _0x144fe3=0x0;_0x144fe3<_0x1de949[_0xfb4a('0x5f')];_0x144fe3++){if(_0x366260!=''){_0x366260+='&';}_0x366260+=_0x1de949[_0x144fe3]+'='+encodeURIComponent(_0x2bad6a[_0x1de949[_0x144fe3]]);_0x29c8f6+=_0x2bad6a[_0x1de949[_0x144fe3]];}_0x29c8f6+=_0x3368cf[_0xfb4a('0x5a')];_0x29c8f6=_0x3d6052['createHash'](_0xfb4a('0x60'))['update'](_0x29c8f6)['digest'](_0xfb4a('0x61'));if(_0x366260!==''){_0x366260+='&';}_0x366260+=_0xfb4a('0x62')+_0x29c8f6;var _0x438ed3={'method':_0xfb4a('0x33'),'uri':_0x3368cf['baseUrl']+_0xfb4a('0x63')+_0x366260,'json':!![]};return rp(_0x438ed3)[_0xfb4a('0x1b')](function(_0x1c8f48){var _0x3c6f97=Object[_0xfb4a('0x5d')](_0x1c8f48);if(_0x1c8f48[_0x3c6f97[0x0]][_0xfb4a('0x27')]&&parseInt(_0x1c8f48[_0x3c6f97[0x0]][_0xfb4a('0x27')])===0x0){var _0x512f75={'messageId':_0x1c8f48[_0x3c6f97[0x0]][_0xfb4a('0x64')]};if(!_0x3368cf[_0xfb4a('0x39')]){_0x512f75['read']=!![];}return _0x492f40[_0xfb4a('0x16')](_0x512f75);}else{return logger[_0xfb4a('0x27')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xfb4a('0x29'),_0xfb4a('0x58'),util[_0xfb4a('0x3b')](_0x1c8f48[_0xfb4a('0x27')],{'showHidden':![],'depth':null}));}})[_0xfb4a('0x18')](function(_0x39c6d2){return logger[_0xfb4a('0x27')](_0xfb4a('0x28'),'afterCreate',_0xfb4a('0x58'),util[_0xfb4a('0x3b')](_0x39c6d2,{'showHidden':![],'depth':null}));});}else{logger[_0xfb4a('0x27')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xfb4a('0x29'),_0xfb4a('0x58'),_0xfb4a('0x65'));}break;case _0xfb4a('0x66'):if(_0x3368cf[_0xfb4a('0x5a')]){var _0x2410ab={'method':'POST','uri':'https://platform.clickatell.com/messages','headers':{'Authorization':_0x3368cf[_0xfb4a('0x5a')]},'body':{'content':_0x48206a['body'],'to':[_0x48206a[_0xfb4a('0x20')]],'from':_0x3368cf[_0xfb4a('0x20')],'binary':![],'clientMessageId':'uuid','charset':_0xfb4a('0x67')},'json':!![]};rp(_0x2410ab)[_0xfb4a('0x1b')](function(_0x4d2630){if(!_0x4d2630['error']){var _0x391f27={'messageId':_0x4d2630['messages'][0x0][_0xfb4a('0x68')]};if(!_0x3368cf[_0xfb4a('0x39')]){_0x391f27['read']=!![];}return _0x492f40[_0xfb4a('0x16')](_0x391f27);}else{return logger[_0xfb4a('0x27')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0xfb4a('0x66'),util[_0xfb4a('0x3b')](_0x4d2630[_0xfb4a('0x27')],{'showHidden':![],'depth':null}));}})[_0xfb4a('0x18')](function(_0x5d9268){return logger[_0xfb4a('0x27')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xfb4a('0x29'),'clickatell',util[_0xfb4a('0x3b')](_0x5d9268,{'showHidden':![],'depth':null}));});}else{logger[_0xfb4a('0x27')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xfb4a('0x29'),_0xfb4a('0x66'),_0xfb4a('0x65'));}break;case _0xfb4a('0x69'):if(_0x3368cf[_0xfb4a('0x2d')]&&_0x3368cf[_0xfb4a('0x2e')]){var _0x12e940=util[_0xfb4a('0x4c')](_0xfb4a('0x4d'),_0x3368cf[_0xfb4a('0x2d')],_0x3368cf['password']);var _0x35c9b6={'method':_0xfb4a('0x35'),'uri':_0xfb4a('0x6a')+_0x3368cf[_0xfb4a('0x6b')]+'/messages','body':{'to':[_0x48206a[_0xfb4a('0x20')]],'text':_0x48206a[_0xfb4a('0xb')],'from':_0x3368cf[_0xfb4a('0x20')],'applicationId':_0x3368cf['applicationId']},'headers':{'Authorization':util[_0xfb4a('0x4c')](_0xfb4a('0x44'),new Buffer(_0x12e940)[_0xfb4a('0x6c')](_0xfb4a('0x45')))},'json':!![]};rp(_0x35c9b6)[_0xfb4a('0x1b')](function(_0x5e21c2){if(_0x5e21c2['id']){var _0x3e4297={'messageId':_0x5e21c2['id']};return _0x492f40['update'](_0x3e4297);}else{logger[_0xfb4a('0x27')](_0xfb4a('0x28'),'afterCreate',_0xfb4a('0x69'),util['inspect'](_0x5e21c2,{'showHidden':![],'depth':null}));}})['catch'](function(_0x4aa060){logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0xfb4a('0x29'),_0xfb4a('0x69'),util[_0xfb4a('0x3b')](_0x4aa060,{'showHidden':![],'depth':null}));});}else{logger[_0xfb4a('0x27')](_0xfb4a('0x28'),'afterCreate',_0xfb4a('0x69'),'Missing\x20parameters:\x20username,\x20password');}break;case'intelepeer':if(_0x3368cf[_0xfb4a('0x5a')]){var _0x50d85e={};var _0x438ed3={'method':_0xfb4a('0x35'),'uri':_0xfb4a('0x6d'),'headers':{'Authorization':_0xfb4a('0x6e')+_0x3368cf[_0xfb4a('0x5a')],'Content-Type':_0xfb4a('0x55')},'body':{'from':_0x3368cf[_0xfb4a('0x20')],'to':_0x48206a[_0xfb4a('0x20')],'text':_0x48206a['body']},'json':!![]};return rp(_0x438ed3)[_0xfb4a('0x1b')](function(_0x24931a){if(_0x24931a[_0xfb4a('0x6f')]==0xca){_0x50d85e['message']=_0x24931a;var _0x3a522b={'method':_0xfb4a('0x35'),'uri':_0xfb4a('0x70'),'headers':{'Authorization':_0xfb4a('0x6e')+_0x3368cf[_0xfb4a('0x5a')],'Content-Type':_0xfb4a('0x55')},'body':{'refid':_0x50d85e[_0xfb4a('0x71')][_0xfb4a('0x72')]},'json':!![]};return rp(_0x3a522b)['then'](function(_0x420f12){_0x50d85e['status']=_0x420f12;var _0x99e932={'messageId':_0x50d85e[_0xfb4a('0x71')][_0xfb4a('0x72')],'read':!![]};return _0x492f40[_0xfb4a('0x16')](_0x99e932);});}else{return logger[_0xfb4a('0x27')](_0xfb4a('0x28'),_0xfb4a('0x29'),_0xfb4a('0x73'),util[_0xfb4a('0x3b')](_0x24931a,{'showHidden':![],'depth':null}));}})[_0xfb4a('0x18')](function(_0x3f7cc6){return logger[_0xfb4a('0x27')](_0xfb4a('0x28'),_0xfb4a('0x29'),_0xfb4a('0x73'),util[_0xfb4a('0x3b')](_0x3f7cc6,{'showHidden':![],'depth':null}));});}else{return logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0xfb4a('0x29'),_0xfb4a('0x73'),_0xfb4a('0x74'));}break;}}})[_0xfb4a('0x75')](function(){_0xb133d9();});}else{_0xb133d9();}}},'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
index 4cdf99b..5da92cf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x787e=['message','info','catch','CreateSmsMessage','SmsMessage','then','debug','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','http','redis','defaults','localhost','./smsMessage.socket','register','SmsMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','SmsMessage,\x20%s,\x20%s'];(function(_0x5f1391,_0x19c132){var _0x50ebe3=function(_0x3d00a3){while(--_0x3d00a3){_0x5f1391['push'](_0x5f1391['shift']());}};_0x50ebe3(++_0x19c132);}(_0x787e,0x11f));var _0xe787=function(_0x26d241,_0xc598af){_0x26d241=_0x26d241-0x0;var _0x1f1385=_0x787e[_0x26d241];return _0x1f1385;};'use strict';var _=require(_0xe787('0x0'));var util=require(_0xe787('0x1'));var moment=require(_0xe787('0x2'));var BPromise=require(_0xe787('0x3'));var rs=require(_0xe787('0x4'));var fs=require('fs');var Redis=require(_0xe787('0x5'));var db=require(_0xe787('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xe787('0x7'));var config=require(_0xe787('0x8'));var jayson=require(_0xe787('0x9'));var client=jayson['client'][_0xe787('0xa')]({'port':0x232a});config[_0xe787('0xb')]=_[_0xe787('0xc')](config[_0xe787('0xb')],{'host':_0xe787('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xe787('0xb')]));require(_0xe787('0xe'))[_0xe787('0xf')](socket);function respondWithRpcPromise(_0x398a02,_0x5688b9,_0x3e578b){return new BPromise(function(_0x59ca64,_0x1a58e6){return client['request'](_0x398a02,_0x3e578b)['then'](function(_0x242108){logger['info']('SmsMessage,\x20%s,\x20%s',_0x5688b9,'request\x20sent');logger['debug'](_0xe787('0x10'),_0x5688b9,_0xe787('0x11'),JSON[_0xe787('0x12')](_0x242108));if(_0x242108[_0xe787('0x13')]){if(_0x242108[_0xe787('0x13')]['code']===0x1f4){logger[_0xe787('0x13')](_0xe787('0x14'),_0x5688b9,_0x242108[_0xe787('0x13')]['message']);return _0x1a58e6(_0x242108[_0xe787('0x13')][_0xe787('0x15')]);}logger[_0xe787('0x13')]('SmsMessage,\x20%s,\x20%s',_0x5688b9,_0x242108[_0xe787('0x13')]['message']);return _0x59ca64(_0x242108[_0xe787('0x13')][_0xe787('0x15')]);}else{logger[_0xe787('0x16')](_0xe787('0x14'),_0x5688b9,_0xe787('0x11'));_0x59ca64(_0x242108['result']['message']);}})[_0xe787('0x17')](function(_0x2772a6){logger[_0xe787('0x13')](_0xe787('0x14'),_0x5688b9,_0x2772a6);_0x1a58e6(_0x2772a6);});});}exports[_0xe787('0x18')]=function(_0x514b78){var _0x5e7c64=this;return new Promise(function(_0x39ae6b,_0xca8492){return db[_0xe787('0x19')]['create'](_0x514b78['body'],{'raw':_0x514b78['options']?_0x514b78['options']['raw']===undefined?!![]:![]:!![]})[_0xe787('0x1a')](function(_0x313098){logger[_0xe787('0x16')](_0xe787('0x18'),_0x514b78);logger[_0xe787('0x1b')](_0xe787('0x18'),_0x514b78,JSON[_0xe787('0x12')](_0x313098));_0x39ae6b(_0x313098);})['catch'](function(_0x9e18c6){logger[_0xe787('0x13')](_0xe787('0x18'),_0x9e18c6[_0xe787('0x15')],_0x514b78);_0xca8492(_0x5e7c64[_0xe787('0x13')](0x1f4,_0x9e18c6[_0xe787('0x15')]));});});};
\ No newline at end of file
+var _0x5301=['info','SmsMessage,\x20%s,\x20%s','request\x20sent','debug','SmsMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateSmsMessage','SmsMessage','create','body','options','raw','bluebird','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','redis','defaults','request','then'];(function(_0x1ad8c1,_0xfb07c5){var _0x349050=function(_0xff5e1d){while(--_0xff5e1d){_0x1ad8c1['push'](_0x1ad8c1['shift']());}};_0x349050(++_0xfb07c5);}(_0x5301,0x11f));var _0x1530=function(_0x211aa7,_0x70aa04){_0x211aa7=_0x211aa7-0x0;var _0x745d2a=_0x5301[_0x211aa7];return _0x745d2a;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0x1530('0x0'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x1530('0x1'))['db'];var utils=require(_0x1530('0x2'));var logger=require(_0x1530('0x3'))('rpc');var config=require(_0x1530('0x4'));var jayson=require(_0x1530('0x5'));var client=jayson['client']['http']({'port':0x232a});config[_0x1530('0x6')]=_[_0x1530('0x7')](config[_0x1530('0x6')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x1530('0x6')]));require('./smsMessage.socket')['register'](socket);function respondWithRpcPromise(_0x435ef3,_0x393a19,_0x26150c){return new BPromise(function(_0x1240a9,_0x2b1be2){return client[_0x1530('0x8')](_0x435ef3,_0x26150c)[_0x1530('0x9')](function(_0x3c34d3){logger[_0x1530('0xa')](_0x1530('0xb'),_0x393a19,_0x1530('0xc'));logger[_0x1530('0xd')](_0x1530('0xe'),_0x393a19,_0x1530('0xc'),JSON[_0x1530('0xf')](_0x3c34d3));if(_0x3c34d3['error']){if(_0x3c34d3[_0x1530('0x10')][_0x1530('0x11')]===0x1f4){logger['error'](_0x1530('0xb'),_0x393a19,_0x3c34d3[_0x1530('0x10')][_0x1530('0x12')]);return _0x2b1be2(_0x3c34d3['error'][_0x1530('0x12')]);}logger[_0x1530('0x10')]('SmsMessage,\x20%s,\x20%s',_0x393a19,_0x3c34d3[_0x1530('0x10')][_0x1530('0x12')]);return _0x1240a9(_0x3c34d3['error'][_0x1530('0x12')]);}else{logger[_0x1530('0xa')]('SmsMessage,\x20%s,\x20%s',_0x393a19,_0x1530('0xc'));_0x1240a9(_0x3c34d3[_0x1530('0x13')][_0x1530('0x12')]);}})[_0x1530('0x14')](function(_0x1cbfb3){logger[_0x1530('0x10')](_0x1530('0xb'),_0x393a19,_0x1cbfb3);_0x2b1be2(_0x1cbfb3);});});}exports[_0x1530('0x15')]=function(_0x5caa12){var _0x2198e4=this;return new Promise(function(_0xf3cbbe,_0x40ec24){return db[_0x1530('0x16')][_0x1530('0x17')](_0x5caa12[_0x1530('0x18')],{'raw':_0x5caa12[_0x1530('0x19')]?_0x5caa12[_0x1530('0x19')][_0x1530('0x1a')]===undefined?!![]:![]:!![]})['then'](function(_0x6b8aa4){logger[_0x1530('0xa')]('CreateSmsMessage',_0x5caa12);logger['debug'](_0x1530('0x15'),_0x5caa12,JSON[_0x1530('0xf')](_0x6b8aa4));_0xf3cbbe(_0x6b8aa4);})[_0x1530('0x14')](function(_0x3f137e){logger[_0x1530('0x10')]('CreateSmsMessage',_0x3f137e[_0x1530('0x12')],_0x5caa12);_0x40ec24(_0x2198e4[_0x1530('0x10')](0x1f4,_0x3f137e[_0x1530('0x12')]));});});};
\ No newline at end of file
index 6e8d7ab..48a5295 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7679=['length','smsMessage:','./smsMessage.events','save','remove','update','emit','register'];(function(_0xcfd89f,_0x106e8f){var _0x59acd4=function(_0x2e187c){while(--_0x2e187c){_0xcfd89f['push'](_0xcfd89f['shift']());}};_0x59acd4(++_0x106e8f);}(_0x7679,0x1b2));var _0x9767=function(_0x2dc0d4,_0x9e84da){_0x2dc0d4=_0x2dc0d4-0x0;var _0x997a9c=_0x7679[_0x2dc0d4];return _0x997a9c;};'use strict';var SmsMessageEvents=require(_0x9767('0x0'));var events=[_0x9767('0x1'),_0x9767('0x2'),_0x9767('0x3')];function createListener(_0x46d2c0,_0x243949){return function(_0x2a99b8){_0x243949[_0x9767('0x4')](_0x46d2c0,_0x2a99b8);};}function removeListener(_0x5750a8,_0x5768a1){return function(){SmsMessageEvents['removeListener'](_0x5750a8,_0x5768a1);};}exports[_0x9767('0x5')]=function(_0x30fe07){for(var _0x37454b=0x0,_0x2cfbbf=events[_0x9767('0x6')];_0x37454b<_0x2cfbbf;_0x37454b++){var _0x140266=events[_0x37454b];var _0x53c485=createListener(_0x9767('0x7')+_0x140266,_0x30fe07);SmsMessageEvents['on'](_0x140266,_0x53c485);}};
\ No newline at end of file
+var _0x86d9=['register','save','remove','update','emit','removeListener'];(function(_0x7cf923,_0x2a21f7){var _0x48f48b=function(_0x520e22){while(--_0x520e22){_0x7cf923['push'](_0x7cf923['shift']());}};_0x48f48b(++_0x2a21f7);}(_0x86d9,0xfd));var _0x986d=function(_0x261b45,_0x143542){_0x261b45=_0x261b45-0x0;var _0x7975b4=_0x86d9[_0x261b45];return _0x7975b4;};'use strict';var SmsMessageEvents=require('./smsMessage.events');var events=[_0x986d('0x0'),_0x986d('0x1'),_0x986d('0x2')];function createListener(_0x23bbbe,_0x408b00){return function(_0x4e5206){_0x408b00[_0x986d('0x3')](_0x23bbbe,_0x4e5206);};}function removeListener(_0x824c69,_0x53acbe){return function(){SmsMessageEvents[_0x986d('0x4')](_0x824c69,_0x53acbe);};}exports[_0x986d('0x5')]=function(_0x3e8f7c){for(var _0x1bd382=0x0,_0x3f9f48=events['length'];_0x1bd382<_0x3f9f48;_0x1bd382++){var _0x4b4341=events[_0x1bd382];var _0xd730ba=createListener('smsMessage:'+_0x4b4341,_0x3e8f7c);SmsMessageEvents['on'](_0x4b4341,_0xd730ba);}};
\ No newline at end of file
index 45ee518..8841674 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4a0f=['/:id/teams','getTeams','/:id/users','post','addTeams','addAgents','update','delete','destroy','removeTeams','removeAgents','multer','connect-timeout','express','Router','fs-extra','../../config/environment','./smsQueue.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/members'];(function(_0x22bfc1,_0x235e2b){var _0x19abe8=function(_0x2f7e56){while(--_0x2f7e56){_0x22bfc1['push'](_0x22bfc1['shift']());}};_0x19abe8(++_0x235e2b);}(_0x4a0f,0x191));var _0xf4a0=function(_0x25b943,_0x561f21){_0x25b943=_0x25b943-0x0;var _0xd315ad=_0x4a0f[_0x25b943];return _0xd315ad;};'use strict';var multer=require(_0xf4a0('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xf4a0('0x1'));var express=require(_0xf4a0('0x2'));var router=express[_0xf4a0('0x3')]();var fs_extra=require(_0xf4a0('0x4'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xf4a0('0x5'));var controller=require(_0xf4a0('0x6'));router[_0xf4a0('0x7')]('/',auth[_0xf4a0('0x8')](),controller[_0xf4a0('0x9')]);router[_0xf4a0('0x7')](_0xf4a0('0xa'),auth[_0xf4a0('0x8')](),controller[_0xf4a0('0xb')]);router[_0xf4a0('0x7')](_0xf4a0('0xc'),auth[_0xf4a0('0x8')](),controller[_0xf4a0('0xd')]);router[_0xf4a0('0x7')](_0xf4a0('0xe'),auth[_0xf4a0('0x8')](),controller['getMembers']);router[_0xf4a0('0x7')](_0xf4a0('0xf'),auth['isAuthenticated'](),controller[_0xf4a0('0x10')]);router['get'](_0xf4a0('0x11'),auth[_0xf4a0('0x8')](),controller['getAgents']);router[_0xf4a0('0x12')]('/',auth[_0xf4a0('0x8')](),controller['create']);router[_0xf4a0('0x12')](_0xf4a0('0xf'),auth[_0xf4a0('0x8')](),controller[_0xf4a0('0x13')]);router['post'](_0xf4a0('0x11'),auth[_0xf4a0('0x8')](),controller[_0xf4a0('0x14')]);router['put'](_0xf4a0('0xc'),auth['isAuthenticated'](),controller[_0xf4a0('0x15')]);router[_0xf4a0('0x16')](_0xf4a0('0xc'),auth[_0xf4a0('0x8')](),controller[_0xf4a0('0x17')]);router[_0xf4a0('0x16')]('/:id/teams',auth[_0xf4a0('0x8')](),controller[_0xf4a0('0x18')]);router[_0xf4a0('0x16')]('/:id/users',auth['isAuthenticated'](),controller[_0xf4a0('0x19')]);module['exports']=router;
\ No newline at end of file
+var _0xe4fe=['fs-extra','../../components/auth/service','../../components/interaction/service','./smsQueue.controller','get','isAuthenticated','index','/:id','show','/:id/members','getMembers','/:id/teams','getTeams','/:id/users','getAgents','post','addTeams','addAgents','put','update','delete','destroy','removeTeams','removeAgents','exports','util','path','express','Router'];(function(_0x2c1ad0,_0x5c2efb){var _0x22da92=function(_0x104fb5){while(--_0x104fb5){_0x2c1ad0['push'](_0x2c1ad0['shift']());}};_0x22da92(++_0x5c2efb);}(_0xe4fe,0x1cc));var _0xee4f=function(_0x34cc9f,_0x4d891a){_0x34cc9f=_0x34cc9f-0x0;var _0x1991d3=_0xe4fe[_0x34cc9f];return _0x1991d3;};'use strict';var multer=require('multer');var util=require(_0xee4f('0x0'));var path=require(_0xee4f('0x1'));var timeout=require('connect-timeout');var express=require(_0xee4f('0x2'));var router=express[_0xee4f('0x3')]();var fs_extra=require(_0xee4f('0x4'));var auth=require(_0xee4f('0x5'));var interaction=require(_0xee4f('0x6'));var config=require('../../config/environment');var controller=require(_0xee4f('0x7'));router[_0xee4f('0x8')]('/',auth[_0xee4f('0x9')](),controller[_0xee4f('0xa')]);router[_0xee4f('0x8')]('/describe',auth['isAuthenticated'](),controller['describe']);router[_0xee4f('0x8')](_0xee4f('0xb'),auth[_0xee4f('0x9')](),controller[_0xee4f('0xc')]);router[_0xee4f('0x8')](_0xee4f('0xd'),auth[_0xee4f('0x9')](),controller[_0xee4f('0xe')]);router[_0xee4f('0x8')](_0xee4f('0xf'),auth[_0xee4f('0x9')](),controller[_0xee4f('0x10')]);router[_0xee4f('0x8')](_0xee4f('0x11'),auth[_0xee4f('0x9')](),controller[_0xee4f('0x12')]);router[_0xee4f('0x13')]('/',auth[_0xee4f('0x9')](),controller['create']);router[_0xee4f('0x13')](_0xee4f('0xf'),auth[_0xee4f('0x9')](),controller[_0xee4f('0x14')]);router[_0xee4f('0x13')](_0xee4f('0x11'),auth[_0xee4f('0x9')](),controller[_0xee4f('0x15')]);router[_0xee4f('0x16')](_0xee4f('0xb'),auth[_0xee4f('0x9')](),controller[_0xee4f('0x17')]);router[_0xee4f('0x18')](_0xee4f('0xb'),auth[_0xee4f('0x9')](),controller[_0xee4f('0x19')]);router[_0xee4f('0x18')]('/:id/teams',auth['isAuthenticated'](),controller[_0xee4f('0x1a')]);router[_0xee4f('0x18')](_0xee4f('0x11'),auth[_0xee4f('0x9')](),controller[_0xee4f('0x1b')]);module[_0xee4f('0x1c')]=router;
\ No newline at end of file
index c86885a..bda3a97 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0cef=['STRING','INTEGER','ENUM','rrmemory','roundrobin','sequelize','exports'];(function(_0xf48e50,_0x2431d4){var _0x19c779=function(_0xe19450){while(--_0xe19450){_0xf48e50['push'](_0xf48e50['shift']());}};_0x19c779(++_0x2431d4);}(_0x0cef,0x1ef));var _0xf0ce=function(_0x36d1c1,_0x4e6866){_0x36d1c1=_0x36d1c1-0x0;var _0x19883d=_0x0cef[_0x36d1c1];return _0x19883d;};'use strict';var Sequelize=require(_0xf0ce('0x0'));module[_0xf0ce('0x1')]={'name':{'type':Sequelize['STRING'],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0xf0ce('0x2')]},'timeout':{'type':Sequelize[_0xf0ce('0x3')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0xf0ce('0x4')](_0xf0ce('0x5'),'beepall',_0xf0ce('0x6'))}};
\ No newline at end of file
+var _0xf318=['INTEGER','ENUM','rrmemory','beepall','roundrobin','sequelize','exports','name','STRING'];(function(_0x301dab,_0x38050a){var _0x2500a2=function(_0x4d3dff){while(--_0x4d3dff){_0x301dab['push'](_0x301dab['shift']());}};_0x2500a2(++_0x38050a);}(_0xf318,0x113));var _0x8f31=function(_0x26a970,_0x102e71){_0x26a970=_0x26a970-0x0;var _0x1a5076=_0xf318[_0x26a970];return _0x1a5076;};'use strict';var Sequelize=require(_0x8f31('0x0'));module[_0x8f31('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x8f31('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x8f31('0x3')]},'timeout':{'type':Sequelize[_0x8f31('0x4')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x8f31('0x5')](_0x8f31('0x6'),_0x8f31('0x7'),_0x8f31('0x8'))}};
\ No newline at end of file
index d851119..36a1083 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a54=['transaction','addTeams','each','findOrCreate','userSmsQueue:save','removeTeams','Team','select','field','from','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','SmsQueueId\x20=\x20?','QueryTypes','SELECT','every','includes','all','compact','isEmpty','forEach','userSmsQueue:remove','addAgents','omit','emit','removeAgents','isArray','getAgents','bluebird','util','lodash','ioredis','../../components/parsers/qs','api','../../config/environment','../../mysqldb','redis','defaults','localhost','./smsQueue.socket','status','end','json','offset','undefined','count','set','Content-Range','update','destroy','then','get','SmsQueues','UserProfileResource','error','name','send','index','map','rawAttributes','fieldName','type','key','getOptions','where','SmsQueue','include','rows','catch','show','params','model','query','intersection','fields','attributes','includeAll','merge','options','find','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','getMembers','findOne','UserSmsQueue','length','hasOwnProperty','limit','order','sort','filters','pick','filter','User','UserId','createdAt','format','%s/%s','smsPause','getTeams','keys','nolimit','ids','findAll','Agents','online','voicePause','interface','flatMap','sequelize'];(function(_0x34c607,_0x1394ee){var _0x310707=function(_0x23cab5){while(--_0x23cab5){_0x34c607['push'](_0x34c607['shift']());}};_0x310707(++_0x1394ee);}(_0x7a54,0x106));var _0x47a5=function(_0x37badf,_0x309429){_0x37badf=_0x37badf-0x0;var _0x4ec9e6=_0x7a54[_0x37badf];return _0x4ec9e6;};'use strict';var BPromise=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var _=require(_0x47a5('0x2'));var squel=require('squel');var Redis=require(_0x47a5('0x3'));var qs=require(_0x47a5('0x4'));var logger=require('../../config/logger')(_0x47a5('0x5'));var config=require(_0x47a5('0x6'));var db=require(_0x47a5('0x7'))['db'];config[_0x47a5('0x8')]=_[_0x47a5('0x9')](config['redis'],{'host':_0x47a5('0xa'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x47a5('0x8')]));require(_0x47a5('0xb'))['register'](socket);function respondWithStatusCode(_0x194fb0,_0x5077f3){_0x5077f3=_0x5077f3||0xcc;return function(_0x5d90b3){if(_0x5d90b3){return _0x194fb0['sendStatus'](_0x5077f3);}return _0x194fb0[_0x47a5('0xc')](_0x5077f3)[_0x47a5('0xd')]();};}function respondWithResult(_0x5e31dd,_0x2eb0dd){_0x2eb0dd=_0x2eb0dd||0xc8;return function(_0x49e844){if(_0x49e844){return _0x5e31dd['status'](_0x2eb0dd)[_0x47a5('0xe')](_0x49e844);}};}function respondWithFilteredResult(_0x69e4d4,_0x2f399b){return function(_0x250fad){if(_0x250fad){var _0xd612dd=typeof _0x2f399b[_0x47a5('0xf')]===_0x47a5('0x10')&&typeof _0x2f399b['limit']===_0x47a5('0x10');var _0x221b54=_0x250fad[_0x47a5('0x11')];var _0x711793=_0xd612dd?0x0:_0x2f399b[_0x47a5('0xf')];var _0x620ee9=_0xd612dd?_0x250fad[_0x47a5('0x11')]:_0x2f399b[_0x47a5('0xf')]+_0x2f399b['limit'];var _0x362359;if(_0x620ee9>=_0x221b54){_0x620ee9=_0x221b54;_0x362359=0xc8;}else{_0x362359=0xce;}_0x69e4d4[_0x47a5('0xc')](_0x362359);return _0x69e4d4[_0x47a5('0x12')](_0x47a5('0x13'),_0x711793+'-'+_0x620ee9+'/'+_0x221b54)[_0x47a5('0xe')](_0x250fad);}return null;};}function saveUpdates(_0x574af6){return function(_0x549de3){if(_0x549de3){return _0x549de3[_0x47a5('0x14')](_0x574af6)['then'](function(_0x5247fd){return _0x5247fd;});}return null;};}function removeEntity(_0x423a81){return function(_0xaf70a6){if(_0xaf70a6){return _0xaf70a6[_0x47a5('0x15')]()[_0x47a5('0x16')](function(){var _0x477b1d=_0xaf70a6[_0x47a5('0x17')]({'plain':!![]});var _0x2763d6=_0x47a5('0x18');return db[_0x47a5('0x19')]['destroy']({'where':{'type':_0x2763d6,'resourceId':_0x477b1d['id']}})[_0x47a5('0x16')](function(){return _0xaf70a6;});})[_0x47a5('0x16')](function(){_0x423a81['status'](0xcc)[_0x47a5('0xd')]();});}};}function handleEntityNotFound(_0x1f03f7){return function(_0x36874d){if(!_0x36874d){_0x1f03f7['sendStatus'](0x194);}return _0x36874d;};}function handleError(_0xb8ae6c,_0x2f142b){_0x2f142b=_0x2f142b||0x1f4;return function(_0x23db32){logger[_0x47a5('0x1a')](_0x23db32['stack']);if(_0x23db32[_0x47a5('0x1b')]){delete _0x23db32[_0x47a5('0x1b')];}_0xb8ae6c['status'](_0x2f142b)[_0x47a5('0x1c')](_0x23db32);};}exports[_0x47a5('0x1d')]=function(_0x4437f1,_0x129ce5){var _0x3abd6a={};var _0x50bf17={'count':0x0,'rows':[]};var _0x53078a=_[_0x47a5('0x1e')](db['SmsQueue'][_0x47a5('0x1f')],function(_0x5b6c4e){return{'name':_0x5b6c4e[_0x47a5('0x20')],'type':_0x5b6c4e[_0x47a5('0x21')][_0x47a5('0x22')]};});_0x3abd6a=qs[_0x47a5('0x23')](_0x53078a,_0x4437f1);var _0x21f296={'where':_0x3abd6a[_0x47a5('0x24')]};return db[_0x47a5('0x25')][_0x47a5('0x11')](_0x21f296)[_0x47a5('0x16')](function(_0x361bfa){_0x50bf17[_0x47a5('0x11')]=_0x361bfa;_0x3abd6a[_0x47a5('0x26')]=qs[_0x47a5('0x26')](_0x4437f1['query']);return db[_0x47a5('0x25')]['findAll'](_0x3abd6a);})[_0x47a5('0x16')](function(_0x9ac908){_0x50bf17[_0x47a5('0x27')]=_0x9ac908;return _0x50bf17;})['then'](respondWithFilteredResult(_0x129ce5,_0x3abd6a))[_0x47a5('0x28')](handleError(_0x129ce5,null));};exports[_0x47a5('0x29')]=function(_0x39b50b,_0x1f1c68){var _0x51cc81={'raw':!![],'where':{'id':_0x39b50b[_0x47a5('0x2a')]['id']}},_0x50d875={};_0x50d875[_0x47a5('0x2b')]=_['keys'](db['SmsQueue'][_0x47a5('0x1f')]);_0x50d875[_0x47a5('0x2c')]=_['keys'](_0x39b50b[_0x47a5('0x2c')]);_0x50d875['filters']=_[_0x47a5('0x2d')](_0x50d875[_0x47a5('0x2b')],_0x50d875['query']);_0x51cc81['attributes']=_[_0x47a5('0x2d')](_0x50d875['model'],qs[_0x47a5('0x2e')](_0x39b50b[_0x47a5('0x2c')][_0x47a5('0x2e')]));_0x51cc81['attributes']=_0x51cc81[_0x47a5('0x2f')]['length']?_0x51cc81['attributes']:_0x50d875[_0x47a5('0x2b')];if(_0x39b50b['query'][_0x47a5('0x30')]){_0x51cc81['include']=[{'all':!![]}];}_0x51cc81=_[_0x47a5('0x31')]({},_0x51cc81,_0x39b50b[_0x47a5('0x32')]);return db[_0x47a5('0x25')][_0x47a5('0x33')](_0x51cc81)[_0x47a5('0x16')](handleEntityNotFound(_0x1f1c68,null))[_0x47a5('0x16')](respondWithResult(_0x1f1c68,null))[_0x47a5('0x28')](handleError(_0x1f1c68,null));};exports[_0x47a5('0x34')]=function(_0x1a0d23,_0x4caed5){return db[_0x47a5('0x25')][_0x47a5('0x34')](_0x1a0d23['body'],{})[_0x47a5('0x16')](function(_0x2bf53d){var _0x1d4348=_0x1a0d23['user'][_0x47a5('0x17')]({'plain':!![]});if(!_0x1d4348)throw new Error(_0x47a5('0x35'));if(_0x1d4348['role']===_0x47a5('0x36')){var _0x19218a=_0x2bf53d['get']({'plain':!![]});var _0x55c5eb='SmsQueues';return db[_0x47a5('0x37')]['find']({'where':{'name':_0x55c5eb,'userProfileId':_0x1d4348[_0x47a5('0x38')]},'raw':!![]})[_0x47a5('0x16')](function(_0x301a85){if(_0x301a85&&_0x301a85[_0x47a5('0x39')]===0x0){return db[_0x47a5('0x19')][_0x47a5('0x34')]({'name':_0x19218a[_0x47a5('0x1b')],'resourceId':_0x19218a['id'],'type':_0x301a85[_0x47a5('0x1b')],'sectionId':_0x301a85['id']},{})[_0x47a5('0x16')](function(){return _0x2bf53d;});}else{return _0x2bf53d;}})[_0x47a5('0x28')](function(_0x280500){logger[_0x47a5('0x1a')](_0x47a5('0x3a'),_0x280500);throw _0x280500;});}return _0x2bf53d;})['then'](respondWithResult(_0x4caed5,0xc9))[_0x47a5('0x28')](handleError(_0x4caed5,null));};exports[_0x47a5('0x14')]=function(_0x331474,_0x23bd8d){if(_0x331474['body']['id']){delete _0x331474[_0x47a5('0x3b')]['id'];}return db['SmsQueue']['find']({'where':{'id':_0x331474['params']['id']}})['then'](handleEntityNotFound(_0x23bd8d,null))[_0x47a5('0x16')](saveUpdates(_0x331474['body'],null))[_0x47a5('0x16')](respondWithResult(_0x23bd8d,null))[_0x47a5('0x28')](handleError(_0x23bd8d,null));};exports[_0x47a5('0x15')]=function(_0x494526,_0x3805fd){return db[_0x47a5('0x25')]['find']({'where':{'id':_0x494526['params']['id']}})[_0x47a5('0x16')](handleEntityNotFound(_0x3805fd,null))['then'](removeEntity(_0x3805fd,null))[_0x47a5('0x28')](handleError(_0x3805fd,null));};exports[_0x47a5('0x3c')]=function(_0x188614,_0xd75ca3){return db[_0x47a5('0x25')][_0x47a5('0x3c')]()[_0x47a5('0x16')](respondWithResult(_0xd75ca3,null))[_0x47a5('0x28')](handleError(_0xd75ca3,null));};exports[_0x47a5('0x3d')]=function(_0x162fa0,_0x24ecb1){var _0x3c3ebf={'raw':!![],'where':{}},_0xe28d76={},_0x3574d4;return db[_0x47a5('0x25')][_0x47a5('0x3e')]({'where':{'id':_0x162fa0['params']['id']}})[_0x47a5('0x16')](handleEntityNotFound(_0x24ecb1,null))[_0x47a5('0x16')](function(_0x49eab1){if(_0x49eab1){_0x3574d4=_0x49eab1['get']({'plain':!![]});_0xe28d76[_0x47a5('0x2b')]=_['keys'](db[_0x47a5('0x3f')][_0x47a5('0x1f')]);_0xe28d76['query']=_['keys'](_0x162fa0[_0x47a5('0x2c')]);_0xe28d76['filters']=_[_0x47a5('0x2d')](_0xe28d76[_0x47a5('0x2b')],_0xe28d76[_0x47a5('0x2c')]);_0x3c3ebf[_0x47a5('0x2f')]=_[_0x47a5('0x2d')](_0xe28d76[_0x47a5('0x2b')],qs[_0x47a5('0x2e')](_0x162fa0['query']['fields']));_0x3c3ebf[_0x47a5('0x2f')]=_0x3c3ebf[_0x47a5('0x2f')][_0x47a5('0x40')]?_0x3c3ebf[_0x47a5('0x2f')]:_0xe28d76[_0x47a5('0x2b')];if(!_0x162fa0[_0x47a5('0x2c')][_0x47a5('0x41')]('nolimit')){_0x3c3ebf[_0x47a5('0x42')]=qs[_0x47a5('0x42')](_0x162fa0[_0x47a5('0x2c')]['limit']);_0x3c3ebf[_0x47a5('0xf')]=qs['offset'](_0x162fa0[_0x47a5('0x2c')][_0x47a5('0xf')]);}_0x3c3ebf[_0x47a5('0x43')]=qs[_0x47a5('0x44')](_0x162fa0['query'][_0x47a5('0x44')]);_0x3c3ebf[_0x47a5('0x24')]=qs[_0x47a5('0x45')](_[_0x47a5('0x46')](_0x162fa0[_0x47a5('0x2c')],_0xe28d76[_0x47a5('0x45')]));_0x3c3ebf[_0x47a5('0x24')]['SmsQueueId']=_0x49eab1['id'];if(_0x162fa0[_0x47a5('0x2c')][_0x47a5('0x47')]){_0x3c3ebf[_0x47a5('0x24')]=_[_0x47a5('0x31')](_0x3c3ebf[_0x47a5('0x24')],{'$or':_[_0x47a5('0x1e')](_0x3c3ebf['attributes'],function(_0x1ad6a9){var _0x245a15={};_0x245a15[_0x1ad6a9]={'$like':'%'+_0x162fa0[_0x47a5('0x2c')]['filter']+'%'};return _0x245a15;})});}_0x3c3ebf=_[_0x47a5('0x31')]({},_0x3c3ebf,_0x162fa0[_0x47a5('0x32')]);return db[_0x47a5('0x3f')]['findAll'](_0x3c3ebf);}})['then'](function(_0x274e38){if(_0x274e38){return db[_0x47a5('0x48')]['findAndCountAll']({'where':{'id':_['map'](_0x274e38,_0x47a5('0x49')),'role':'agent'},'attributes':['id',_0x47a5('0x1b'),'smsPause','updatedAt',_0x47a5('0x4a')]});}})[_0x47a5('0x16')](function(_0x53eedf){if(_0x53eedf){return{'count':_0x53eedf[_0x47a5('0x11')],'rows':_[_0x47a5('0x1e')](_0x53eedf['rows'],function(_0x5b6127){return{'membername':_0x5b6127[_0x47a5('0x1b')],'UserId':_0x5b6127['id'],'queue_name':_0x3574d4[_0x47a5('0x1b')],'SmsQueueId':_0x3574d4['id'],'interface':util[_0x47a5('0x4b')](_0x47a5('0x4c'),'SIP',_0x5b6127[_0x47a5('0x1b')]),'penalty':0x0,'paused':_0x5b6127[_0x47a5('0x4d')],'createdAt':_0x5b6127[_0x47a5('0x4a')],'updatedAt':_0x5b6127['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})[_0x47a5('0x16')](respondWithFilteredResult(_0x24ecb1,_0x3c3ebf))['catch'](handleError(_0x24ecb1,null));};exports[_0x47a5('0x4e')]=function(_0x470da6,_0x943a15){var _0x1c485b={};var _0x3603b7={};var _0x4966af;var _0x144af9;return db['SmsQueue']['findOne']({'where':{'id':_0x470da6['params']['id']}})['then'](handleEntityNotFound(_0x943a15,null))[_0x47a5('0x16')](function(_0x6cd4ea){if(_0x6cd4ea){_0x4966af=_0x6cd4ea;_0x3603b7[_0x47a5('0x2b')]=_['keys'](db['Team'][_0x47a5('0x1f')]);_0x3603b7[_0x47a5('0x2c')]=_[_0x47a5('0x4f')](_0x470da6[_0x47a5('0x2c')]);_0x3603b7[_0x47a5('0x45')]=_['intersection'](_0x3603b7[_0x47a5('0x2b')],_0x3603b7['query']);_0x1c485b[_0x47a5('0x2f')]=_[_0x47a5('0x2d')](_0x3603b7['model'],qs[_0x47a5('0x2e')](_0x470da6[_0x47a5('0x2c')][_0x47a5('0x2e')]));_0x1c485b[_0x47a5('0x2f')]=_0x1c485b[_0x47a5('0x2f')][_0x47a5('0x40')]?_0x1c485b[_0x47a5('0x2f')]:_0x3603b7[_0x47a5('0x2b')];_0x1c485b['order']=qs[_0x47a5('0x44')](_0x470da6[_0x47a5('0x2c')][_0x47a5('0x44')]);_0x1c485b[_0x47a5('0x24')]=qs[_0x47a5('0x45')](_['pick'](_0x470da6[_0x47a5('0x2c')],_0x3603b7[_0x47a5('0x45')]));if(_0x470da6[_0x47a5('0x2c')][_0x47a5('0x47')]){_0x1c485b[_0x47a5('0x24')]=_[_0x47a5('0x31')](_0x1c485b[_0x47a5('0x24')],{'$or':_[_0x47a5('0x1e')](_0x1c485b[_0x47a5('0x2f')],function(_0x44cb90){var _0x1d56f3={};_0x1d56f3[_0x44cb90]={'$like':'%'+_0x470da6[_0x47a5('0x2c')][_0x47a5('0x47')]+'%'};return _0x1d56f3;})});}_0x1c485b=_[_0x47a5('0x31')]({},_0x1c485b,_0x470da6[_0x47a5('0x32')]);return _0x4966af['getTeams'](_0x1c485b);}})[_0x47a5('0x16')](function(_0x284fb8){if(_0x284fb8){_0x144af9=_0x284fb8[_0x47a5('0x40')];if(!_0x470da6['query'][_0x47a5('0x41')](_0x47a5('0x50'))){_0x1c485b[_0x47a5('0x42')]=qs[_0x47a5('0x42')](_0x470da6['query'][_0x47a5('0x42')]);_0x1c485b['offset']=qs[_0x47a5('0xf')](_0x470da6['query'][_0x47a5('0xf')]);}return _0x4966af['getTeams'](_0x1c485b);}})[_0x47a5('0x16')](function(_0x2f27c3){if(_0x2f27c3){return _0x2f27c3?{'count':_0x144af9,'rows':_0x2f27c3}:null;}})[_0x47a5('0x16')](respondWithResult(_0x943a15,null))['catch'](handleError(_0x943a15,null));};exports['addTeams']=function(_0x4b8084,_0x4164a3){var _0x2b1303=_0x4b8084[_0x47a5('0x3b')][_0x47a5('0x51')];return db['Team'][_0x47a5('0x52')]({'where':{'id':_0x2b1303},'attributes':['id'],'include':[{'model':db[_0x47a5('0x48')],'as':_0x47a5('0x53'),'attributes':['id',_0x47a5('0x1b'),_0x47a5('0x54'),_0x47a5('0x55'),_0x47a5('0x56')],'raw':!![]}]})[_0x47a5('0x16')](function(_0x4618a0){if(_0x4618a0){var _0xc69a68=_[_0x47a5('0x57')](_0x4618a0,function(_0x463e5e){var _0x49d3dc=_0x463e5e[_0x47a5('0x17')]({'plain':!![]});return _0x49d3dc['Agents'];});return db[_0x47a5('0x25')][_0x47a5('0x33')]({'where':{'id':_0x4b8084[_0x47a5('0x2a')]['id']}})[_0x47a5('0x16')](function(_0x40e584){return db[_0x47a5('0x58')][_0x47a5('0x59')](function(_0x448981){return _0x40e584[_0x47a5('0x5a')](_0x2b1303,{'transaction':_0x448981})[_0x47a5('0x16')](function(){return BPromise[_0x47a5('0x5b')](_0xc69a68,function(_0x1f07ac){return db[_0x47a5('0x3f')][_0x47a5('0x5c')]({'where':{'UserId':_0x1f07ac['id'],'SmsQueueId':_0x4b8084[_0x47a5('0x2a')]['id']},'transaction':_0x448981});});})['then'](function(){_0xc69a68['forEach'](function(_0x5ccc89){socket['emit'](_0x47a5('0x5d'),{'UserId':_0x5ccc89['id'],'SmsQueueId':_0x40e584['id']});});});});});}})[_0x47a5('0x16')](respondWithStatusCode(_0x4164a3,null))['catch'](handleError(_0x4164a3,null));};exports[_0x47a5('0x5e')]=function(_0x44dda2,_0x1baa5a){return db[_0x47a5('0x5f')][_0x47a5('0x52')]({'where':{'id':_0x44dda2[_0x47a5('0x2c')][_0x47a5('0x51')]},'attributes':['id'],'include':[{'model':db[_0x47a5('0x48')],'as':_0x47a5('0x53'),'attributes':['id'],'raw':!![]}]})[_0x47a5('0x16')](handleEntityNotFound(_0x1baa5a,null))[_0x47a5('0x16')](function(_0x5e5f16){var _0x18fa31=_[_0x47a5('0x1e')](_0x5e5f16,'id');var _0x420671=[];var _0x4f35ff=[];var _0x340846=squel[_0x47a5('0x60')]();_0x340846[_0x47a5('0x61')]('tq.TeamId')[_0x47a5('0x62')]('team_has_sms_queues','tq')['join'](_0x47a5('0x63'),'ut',_0x47a5('0x64'))[_0x47a5('0x24')](_0x47a5('0x65'),_0x44dda2[_0x47a5('0x2a')]['id']);for(var _0xea50f3=0x0;_0xea50f3<_0x5e5f16['length'];_0xea50f3+=0x1){let _0x592322=_0x5e5f16[_0xea50f3];for(var _0x3e0dbd=0x0;_0x3e0dbd<_0x592322['Agents'][_0x47a5('0x40')];_0x3e0dbd+=0x1){let _0x3fffd1=_0x592322[_0x47a5('0x53')][_0x3e0dbd];var _0xb16bdd=_0x340846['clone']();_0xb16bdd[_0x47a5('0x24')]('ut.UserId\x20=\x20?',_0x3fffd1['id']);_0x4f35ff['push'](db[_0x47a5('0x58')][_0x47a5('0x2c')](_0xb16bdd['toString'](),{'type':db[_0x47a5('0x58')][_0x47a5('0x66')][_0x47a5('0x67')]})['then'](function(_0x280372){if(_0x280372['length']===0x1){return _0x3fffd1['id'];}else{var _0x2307da=_[_0x47a5('0x68')](_[_0x47a5('0x1e')](_0x280372,'TeamId'),function(_0x2e0af1){return _[_0x47a5('0x69')](_0x18fa31,_0x2e0af1);});if(_0x2307da){return _0x3fffd1['id'];}}}));}}return BPromise[_0x47a5('0x6a')](_0x4f35ff)['then'](function(_0x3525e7){_0x420671=_(_0x420671)['union'](_0x3525e7)[_0x47a5('0x6b')]()['value']();return db[_0x47a5('0x25')][_0x47a5('0x33')]({'where':{'id':_0x44dda2[_0x47a5('0x2a')]['id']}})[_0x47a5('0x16')](function(_0x51738b){return db[_0x47a5('0x58')][_0x47a5('0x59')](function(_0x23c393){return _0x51738b[_0x47a5('0x5e')](_0x44dda2[_0x47a5('0x2c')]['ids'],{'transaction':_0x23c393})['then'](function(){if(!_[_0x47a5('0x6c')](_0x420671)){return _0x51738b['removeAgents'](_0x420671,{'transaction':_0x23c393});}})[_0x47a5('0x16')](function(){_0x420671[_0x47a5('0x6d')](function(_0x216402){socket['emit'](_0x47a5('0x6e'),{'UserId':_0x216402,'SmsQueueId':_0x51738b['id']});});});});});});})[_0x47a5('0x16')](respondWithStatusCode(_0x1baa5a,null))['catch'](handleError(_0x1baa5a,null));};exports[_0x47a5('0x6f')]=function(_0x8a9dea,_0x19acfa){return db[_0x47a5('0x25')]['find']({'where':{'id':_0x8a9dea['params']['id']}})[_0x47a5('0x16')](handleEntityNotFound(_0x19acfa,null))[_0x47a5('0x16')](function(_0x48e7f3){if(_0x48e7f3){return _0x48e7f3[_0x47a5('0x6f')](_0x8a9dea[_0x47a5('0x3b')]['ids'],_[_0x47a5('0x70')](_0x8a9dea[_0x47a5('0x3b')],[_0x47a5('0x51'),'id'])||{})['spread'](function(_0x3f2ad9){for(var _0x59b4a5=0x0;_0x59b4a5<_0x8a9dea[_0x47a5('0x3b')]['ids'][_0x47a5('0x40')];_0x59b4a5+=0x1){socket[_0x47a5('0x71')]('userSmsQueue:save',{'UserId':Number(_0x8a9dea[_0x47a5('0x3b')]['ids'][_0x59b4a5]),'SmsQueueId':Number(_0x8a9dea[_0x47a5('0x2a')]['id'])});}return _0x3f2ad9;});}})[_0x47a5('0x16')](respondWithResult(_0x19acfa,null))[_0x47a5('0x28')](handleError(_0x19acfa,null));};exports[_0x47a5('0x72')]=function(_0x49b76a,_0x3eb5c1){return db['SmsQueue']['find']({'where':{'id':_0x49b76a[_0x47a5('0x2a')]['id']}})[_0x47a5('0x16')](handleEntityNotFound(_0x3eb5c1,null))[_0x47a5('0x16')](function(_0x96fb22){if(_0x96fb22){return _0x96fb22[_0x47a5('0x72')](_0x49b76a['query'][_0x47a5('0x51')])[_0x47a5('0x16')](function(){if(_[_0x47a5('0x73')](_0x49b76a[_0x47a5('0x2c')]['ids'])){for(var _0x240db9=0x0;_0x240db9<_0x49b76a['query'][_0x47a5('0x51')][_0x47a5('0x40')];_0x240db9+=0x1){socket[_0x47a5('0x71')](_0x47a5('0x6e'),{'UserId':Number(_0x49b76a[_0x47a5('0x2c')][_0x47a5('0x51')][_0x240db9]),'SmsQueueId':Number(_0x49b76a[_0x47a5('0x2a')]['id'])});}}else{socket[_0x47a5('0x71')](_0x47a5('0x6e'),{'UserId':Number(_0x49b76a['query'][_0x47a5('0x51')]),'SmsQueueId':Number(_0x49b76a[_0x47a5('0x2a')]['id'])});}});}})['then'](respondWithStatusCode(_0x3eb5c1,null))[_0x47a5('0x28')](handleError(_0x3eb5c1,null));};exports[_0x47a5('0x74')]=function(_0x6d6a5,_0x5b85cd){var _0x4bf1f5={};var _0x126bb1={};var _0x3d7371;var _0x47fbb6;return db['SmsQueue'][_0x47a5('0x3e')]({'where':{'id':_0x6d6a5[_0x47a5('0x2a')]['id']}})['then'](handleEntityNotFound(_0x5b85cd,null))[_0x47a5('0x16')](function(_0x269ff6){if(_0x269ff6){_0x3d7371=_0x269ff6;_0x126bb1['model']=_[_0x47a5('0x4f')](db[_0x47a5('0x48')][_0x47a5('0x1f')]);_0x126bb1[_0x47a5('0x2c')]=_[_0x47a5('0x4f')](_0x6d6a5[_0x47a5('0x2c')]);_0x126bb1['filters']=_['intersection'](_0x126bb1['model'],_0x126bb1[_0x47a5('0x2c')]);_0x4bf1f5[_0x47a5('0x2f')]=_['intersection'](_0x126bb1[_0x47a5('0x2b')],qs[_0x47a5('0x2e')](_0x6d6a5[_0x47a5('0x2c')][_0x47a5('0x2e')]));_0x4bf1f5[_0x47a5('0x2f')]=_0x4bf1f5['attributes'][_0x47a5('0x40')]?_0x4bf1f5['attributes']:_0x126bb1['model'];_0x4bf1f5['order']=qs[_0x47a5('0x44')](_0x6d6a5['query'][_0x47a5('0x44')]);_0x4bf1f5[_0x47a5('0x24')]=qs[_0x47a5('0x45')](_['pick'](_0x6d6a5[_0x47a5('0x2c')],_0x126bb1[_0x47a5('0x45')]));if(_0x6d6a5[_0x47a5('0x2c')][_0x47a5('0x47')]){_0x4bf1f5[_0x47a5('0x24')]=_['merge'](_0x4bf1f5[_0x47a5('0x24')],{'$or':_[_0x47a5('0x1e')](_0x4bf1f5['attributes'],function(_0x42ba59){var _0x419870={};_0x419870[_0x42ba59]={'$like':'%'+_0x6d6a5[_0x47a5('0x2c')][_0x47a5('0x47')]+'%'};return _0x419870;})});}_0x4bf1f5=_[_0x47a5('0x31')]({},_0x4bf1f5,_0x6d6a5[_0x47a5('0x32')]);return _0x3d7371['getAgents'](_0x4bf1f5);}})[_0x47a5('0x16')](function(_0x2e418d){if(_0x2e418d){_0x47fbb6=_0x2e418d['length'];if(!_0x6d6a5[_0x47a5('0x2c')][_0x47a5('0x41')](_0x47a5('0x50'))){_0x4bf1f5[_0x47a5('0x42')]=qs['limit'](_0x6d6a5['query']['limit']);_0x4bf1f5['offset']=qs[_0x47a5('0xf')](_0x6d6a5[_0x47a5('0x2c')][_0x47a5('0xf')]);}return _0x3d7371[_0x47a5('0x74')](_0x4bf1f5);}})[_0x47a5('0x16')](function(_0x6bc37b){if(_0x6bc37b){return _0x6bc37b?{'count':_0x47fbb6,'rows':_0x6bc37b}:null;}})[_0x47a5('0x16')](respondWithResult(_0x5b85cd,null))[_0x47a5('0x28')](handleError(_0x5b85cd,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(_0xc14df7,_0x163f90){var _0x34a445=function(_0x1bbf28){while(--_0x1bbf28){_0xc14df7['push'](_0xc14df7['shift']());}};_0x34a445(++_0x163f90);}(_0xadb5,0xad));var _0x5adb=function(_0x34595d,_0x5d7771){_0x34595d=_0x34595d-0x0;var _0x534031=_0xadb5[_0x34595d];return _0x534031;};'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 157fdf8..18fa289 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5952=['events','../../mysqldb','setMaxListeners','save','update','emit','hasOwnProperty','hook','exports'];(function(_0x10a212,_0x579d85){var _0x23c82b=function(_0x412ea9){while(--_0x412ea9){_0x10a212['push'](_0x10a212['shift']());}};_0x23c82b(++_0x579d85);}(_0x5952,0x1b0));var _0x2595=function(_0x4f3719,_0x1e2dff){_0x4f3719=_0x4f3719-0x0;var _0x51ecfa=_0x5952[_0x4f3719];return _0x51ecfa;};'use strict';var EventEmitter=require(_0x2595('0x0'));var SmsQueue=require(_0x2595('0x1'))['db']['SmsQueue'];var SmsQueueEvents=new EventEmitter();SmsQueueEvents[_0x2595('0x2')](0x0);var events={'afterCreate':_0x2595('0x3'),'afterUpdate':_0x2595('0x4'),'afterDestroy':'remove'};function emitEvent(_0x1d9a04){return function(_0x2267b7,_0x11430c,_0x76dae2){SmsQueueEvents[_0x2595('0x5')](_0x1d9a04+':'+_0x2267b7['id'],_0x2267b7);SmsQueueEvents[_0x2595('0x5')](_0x1d9a04,_0x2267b7);_0x76dae2(null);};}for(var e in events){if(events[_0x2595('0x6')](e)){var event=events[e];SmsQueue[_0x2595('0x7')](e,emitEvent(event));}}module[_0x2595('0x8')]=SmsQueueEvents;
\ No newline at end of file
+var _0x98d0=['hook','events','../../mysqldb','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0x1dc122,_0x5c27aa){var _0x3dbe93=function(_0xd613cd){while(--_0xd613cd){_0x1dc122['push'](_0x1dc122['shift']());}};_0x3dbe93(++_0x5c27aa);}(_0x98d0,0xd0));var _0x098d=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x98d0[_0x14add3];return _0x4a174f;};'use strict';var EventEmitter=require(_0x098d('0x0'));var SmsQueue=require(_0x098d('0x1'))['db']['SmsQueue'];var SmsQueueEvents=new EventEmitter();SmsQueueEvents[_0x098d('0x2')](0x0);var events={'afterCreate':_0x098d('0x3'),'afterUpdate':_0x098d('0x4'),'afterDestroy':_0x098d('0x5')};function emitEvent(_0x559f4a){return function(_0x3e0348,_0x175a64,_0x27614c){SmsQueueEvents[_0x098d('0x6')](_0x559f4a+':'+_0x3e0348['id'],_0x3e0348);SmsQueueEvents[_0x098d('0x6')](_0x559f4a,_0x3e0348);_0x27614c(null);};}for(var e in events){if(events[_0x098d('0x7')](e)){var event=events[e];SmsQueue[_0x098d('0x8')](e,emitEvent(event));}}module['exports']=SmsQueueEvents;
\ No newline at end of file
index 6950ac4..34ee340 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7b67=['define','SmsQueue','sms_queues','util','moment','rimraf','../../config/environment','./smsQueue.attributes'];(function(_0x564e00,_0x23d1c5){var _0x437fb5=function(_0x2c10b5){while(--_0x2c10b5){_0x564e00['push'](_0x564e00['shift']());}};_0x437fb5(++_0x23d1c5);}(_0x7b67,0xab));var _0x77b6=function(_0x1e33de,_0x452628){_0x1e33de=_0x1e33de-0x0;var _0x15114e=_0x7b67[_0x1e33de];return _0x15114e;};'use strict';var _=require('lodash');var util=require(_0x77b6('0x0'));var logger=require('../../config/logger')('api');var moment=require(_0x77b6('0x1'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x77b6('0x2'));var config=require(_0x77b6('0x3'));var attributes=require(_0x77b6('0x4'));module['exports']=function(_0x234f1d,_0x934640){return _0x234f1d[_0x77b6('0x5')](_0x77b6('0x6'),attributes,{'tableName':_0x77b6('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x45c8=['bluebird','request-promise','rimraf','./smsQueue.attributes','define','SmsQueue','sms_queues','lodash','util','../../config/logger','api','moment'];(function(_0x1e4360,_0x930b9b){var _0x31e6b4=function(_0x49dd8e){while(--_0x49dd8e){_0x1e4360['push'](_0x1e4360['shift']());}};_0x31e6b4(++_0x930b9b);}(_0x45c8,0x8b));var _0x845c=function(_0x527a17,_0x5500bb){_0x527a17=_0x527a17-0x0;var _0x1a6ae7=_0x45c8[_0x527a17];return _0x1a6ae7;};'use strict';var _=require(_0x845c('0x0'));var util=require(_0x845c('0x1'));var logger=require(_0x845c('0x2'))(_0x845c('0x3'));var moment=require(_0x845c('0x4'));var BPromise=require(_0x845c('0x5'));var rp=require(_0x845c('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x845c('0x7'));var config=require('../../config/environment');var attributes=require(_0x845c('0x8'));module['exports']=function(_0x546795,_0x4211ae){return _0x546795[_0x845c('0x9')](_0x845c('0xa'),attributes,{'tableName':_0x845c('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 0d85759..6405ac6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeaef=['SmsQueue','findAll','options','raw','attributes','limit','include','map','model','debug','ShowSmsQueue','find','where','stringify','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','register','request','then','request\x20sent','SmsQueue,\x20%s,\x20%s,\x20%s','error','code','SmsQueue,\x20%s,\x20%s','message','info','result','catch','GetSmsQueue'];(function(_0x2a8841,_0x355633){var _0x164f64=function(_0x5f29e2){while(--_0x5f29e2){_0x2a8841['push'](_0x2a8841['shift']());}};_0x164f64(++_0x355633);}(_0xeaef,0xfe));var _0xfeae=function(_0x19e71c,_0x237f22){_0x19e71c=_0x19e71c-0x0;var _0x1791a3=_0xeaef[_0x19e71c];return _0x1791a3;};'use strict';var _=require(_0xfeae('0x0'));var util=require('util');var moment=require(_0xfeae('0x1'));var BPromise=require('bluebird');var rs=require(_0xfeae('0x2'));var fs=require('fs');var Redis=require(_0xfeae('0x3'));var db=require(_0xfeae('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xfeae('0x5'))(_0xfeae('0x6'));var config=require(_0xfeae('0x7'));var jayson=require(_0xfeae('0x8'));var client=jayson[_0xfeae('0x9')][_0xfeae('0xa')]({'port':0x232a});config[_0xfeae('0xb')]=_[_0xfeae('0xc')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xfeae('0xb')]));require('./smsQueue.socket')[_0xfeae('0xd')](socket);function respondWithRpcPromise(_0x46f4b6,_0x4d27f4,_0xc9ee55){return new BPromise(function(_0x11be3a,_0xcd8486){return client[_0xfeae('0xe')](_0x46f4b6,_0xc9ee55)[_0xfeae('0xf')](function(_0x299986){logger['info']('SmsQueue,\x20%s,\x20%s',_0x4d27f4,_0xfeae('0x10'));logger['debug'](_0xfeae('0x11'),_0x4d27f4,_0xfeae('0x10'),JSON['stringify'](_0x299986));if(_0x299986[_0xfeae('0x12')]){if(_0x299986['error'][_0xfeae('0x13')]===0x1f4){logger[_0xfeae('0x12')](_0xfeae('0x14'),_0x4d27f4,_0x299986[_0xfeae('0x12')]['message']);return _0xcd8486(_0x299986['error'][_0xfeae('0x15')]);}logger[_0xfeae('0x12')]('SmsQueue,\x20%s,\x20%s',_0x4d27f4,_0x299986[_0xfeae('0x12')][_0xfeae('0x15')]);return _0x11be3a(_0x299986[_0xfeae('0x12')][_0xfeae('0x15')]);}else{logger[_0xfeae('0x16')](_0xfeae('0x14'),_0x4d27f4,'request\x20sent');_0x11be3a(_0x299986[_0xfeae('0x17')][_0xfeae('0x15')]);}})[_0xfeae('0x18')](function(_0x17bbd0){logger['error'](_0xfeae('0x14'),_0x4d27f4,_0x17bbd0);_0xcd8486(_0x17bbd0);});});}exports[_0xfeae('0x19')]=function(_0x24d820){var _0x9b6230=this;return new Promise(function(_0x51ca0e,_0x3ddc56){return db[_0xfeae('0x1a')][_0xfeae('0x1b')]({'raw':_0x24d820[_0xfeae('0x1c')]?_0x24d820['options'][_0xfeae('0x1d')]===undefined?!![]:![]:!![],'where':_0x24d820[_0xfeae('0x1c')]?_0x24d820[_0xfeae('0x1c')]['where']||null:null,'attributes':_0x24d820['options']?_0x24d820[_0xfeae('0x1c')][_0xfeae('0x1e')]||null:null,'limit':_0x24d820[_0xfeae('0x1c')]?_0x24d820[_0xfeae('0x1c')][_0xfeae('0x1f')]||null:null,'include':_0x24d820['options']?_0x24d820[_0xfeae('0x1c')][_0xfeae('0x20')]?_[_0xfeae('0x21')](_0x24d820[_0xfeae('0x1c')][_0xfeae('0x20')],function(_0x906681){return{'model':db[_0x906681['model']],'as':_0x906681['as'],'attributes':_0x906681['attributes'],'include':_0x906681[_0xfeae('0x20')]?_['map'](_0x906681[_0xfeae('0x20')],function(_0x26118d){return{'model':db[_0x26118d['model']],'as':_0x26118d['as'],'attributes':_0x26118d[_0xfeae('0x1e')],'include':_0x26118d[_0xfeae('0x20')]?_[_0xfeae('0x21')](_0x26118d['include'],function(_0x3d92bb){return{'model':db[_0x3d92bb[_0xfeae('0x22')]],'as':_0x3d92bb['as'],'attributes':_0x3d92bb['attributes']};}):[]};}):[]};}):[]:[]})[_0xfeae('0xf')](function(_0x19df1b){logger[_0xfeae('0x16')](_0xfeae('0x19'),_0x24d820);logger[_0xfeae('0x23')](_0xfeae('0x19'),_0x24d820,JSON['stringify'](_0x19df1b));_0x51ca0e(_0x19df1b);})['catch'](function(_0x42baaa){logger[_0xfeae('0x12')](_0xfeae('0x19'),_0x42baaa[_0xfeae('0x15')],_0x24d820);_0x3ddc56(_0x9b6230['error'](0x1f4,_0x42baaa[_0xfeae('0x15')]));});});};exports[_0xfeae('0x24')]=function(_0x15e9b6){var _0x2d19a9=this;return new Promise(function(_0x693add,_0x12fc4b){return db[_0xfeae('0x1a')][_0xfeae('0x25')]({'raw':_0x15e9b6[_0xfeae('0x1c')]?_0x15e9b6['options']['raw']===undefined?!![]:![]:!![],'where':_0x15e9b6['options']?_0x15e9b6[_0xfeae('0x1c')][_0xfeae('0x26')]||null:null,'attributes':_0x15e9b6[_0xfeae('0x1c')]?_0x15e9b6[_0xfeae('0x1c')][_0xfeae('0x1e')]||null:null,'include':_0x15e9b6['options']?_0x15e9b6['options'][_0xfeae('0x20')]?_[_0xfeae('0x21')](_0x15e9b6['options'][_0xfeae('0x20')],function(_0x588425){return{'model':db[_0x588425[_0xfeae('0x22')]],'as':_0x588425['as'],'attributes':_0x588425[_0xfeae('0x1e')],'include':_0x588425[_0xfeae('0x20')]?_[_0xfeae('0x21')](_0x588425[_0xfeae('0x20')],function(_0x498490){return{'model':db[_0x498490[_0xfeae('0x22')]],'as':_0x498490['as'],'attributes':_0x498490['attributes'],'include':_0x498490[_0xfeae('0x20')]?_[_0xfeae('0x21')](_0x498490['include'],function(_0x1bd93d){return{'model':db[_0x1bd93d['model']],'as':_0x1bd93d['as'],'attributes':_0x1bd93d[_0xfeae('0x1e')]};}):[]};}):[]};}):[]:[]})[_0xfeae('0xf')](function(_0x3089ec){logger['info'](_0xfeae('0x24'),_0x15e9b6);logger[_0xfeae('0x23')]('ShowSmsQueue',_0x15e9b6,JSON[_0xfeae('0x27')](_0x3089ec));_0x693add(_0x3089ec);})[_0xfeae('0x18')](function(_0x22cae3){logger[_0xfeae('0x12')](_0xfeae('0x24'),_0x22cae3[_0xfeae('0x15')],_0x15e9b6);_0x12fc4b(_0x2d19a9[_0xfeae('0x12')](0x1f4,_0x22cae3['message']));});});};
\ No newline at end of file
+var _0x0a52=['raw','where','limit','include','map','model','attributes','GetSmsQueue','catch','find','ShowSmsQueue','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','localhost','socket.io-emitter','./smsQueue.socket','register','request','then','info','SmsQueue,\x20%s,\x20%s','request\x20sent','debug','SmsQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','SmsQueue','findAll','options'];(function(_0x2b7f97,_0x3fe5c6){var _0x3c2339=function(_0x12e36c){while(--_0x12e36c){_0x2b7f97['push'](_0x2b7f97['shift']());}};_0x3c2339(++_0x3fe5c6);}(_0x0a52,0x153));var _0x20a5=function(_0x3a7cd4,_0x3e8374){_0x3a7cd4=_0x3a7cd4-0x0;var _0x58bb88=_0x0a52[_0x3a7cd4];return _0x58bb88;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x20a5('0x0'));var BPromise=require('bluebird');var rs=require(_0x20a5('0x1'));var fs=require('fs');var Redis=require(_0x20a5('0x2'));var db=require(_0x20a5('0x3'))['db'];var utils=require(_0x20a5('0x4'));var logger=require(_0x20a5('0x5'))(_0x20a5('0x6'));var config=require(_0x20a5('0x7'));var jayson=require(_0x20a5('0x8'));var client=jayson['client'][_0x20a5('0x9')]({'port':0x232a});config[_0x20a5('0xa')]=_['defaults'](config[_0x20a5('0xa')],{'host':_0x20a5('0xb'),'port':0x18eb});var socket=require(_0x20a5('0xc'))(new Redis(config[_0x20a5('0xa')]));require(_0x20a5('0xd'))[_0x20a5('0xe')](socket);function respondWithRpcPromise(_0x22988a,_0x492f5f,_0x5121cd){return new BPromise(function(_0x295bbf,_0x594f29){return client[_0x20a5('0xf')](_0x22988a,_0x5121cd)[_0x20a5('0x10')](function(_0x2efb70){logger[_0x20a5('0x11')](_0x20a5('0x12'),_0x492f5f,_0x20a5('0x13'));logger[_0x20a5('0x14')](_0x20a5('0x15'),_0x492f5f,_0x20a5('0x13'),JSON[_0x20a5('0x16')](_0x2efb70));if(_0x2efb70[_0x20a5('0x17')]){if(_0x2efb70['error'][_0x20a5('0x18')]===0x1f4){logger[_0x20a5('0x17')](_0x20a5('0x12'),_0x492f5f,_0x2efb70['error']['message']);return _0x594f29(_0x2efb70[_0x20a5('0x17')][_0x20a5('0x19')]);}logger[_0x20a5('0x17')](_0x20a5('0x12'),_0x492f5f,_0x2efb70[_0x20a5('0x17')]['message']);return _0x295bbf(_0x2efb70[_0x20a5('0x17')][_0x20a5('0x19')]);}else{logger[_0x20a5('0x11')](_0x20a5('0x12'),_0x492f5f,_0x20a5('0x13'));_0x295bbf(_0x2efb70[_0x20a5('0x1a')][_0x20a5('0x19')]);}})['catch'](function(_0x1f43c1){logger[_0x20a5('0x17')](_0x20a5('0x12'),_0x492f5f,_0x1f43c1);_0x594f29(_0x1f43c1);});});}exports['GetSmsQueue']=function(_0x17f0e1){var _0x16506c=this;return new Promise(function(_0x540e87,_0x427c01){return db[_0x20a5('0x1b')][_0x20a5('0x1c')]({'raw':_0x17f0e1['options']?_0x17f0e1[_0x20a5('0x1d')][_0x20a5('0x1e')]===undefined?!![]:![]:!![],'where':_0x17f0e1[_0x20a5('0x1d')]?_0x17f0e1[_0x20a5('0x1d')][_0x20a5('0x1f')]||null:null,'attributes':_0x17f0e1[_0x20a5('0x1d')]?_0x17f0e1[_0x20a5('0x1d')]['attributes']||null:null,'limit':_0x17f0e1[_0x20a5('0x1d')]?_0x17f0e1[_0x20a5('0x1d')][_0x20a5('0x20')]||null:null,'include':_0x17f0e1['options']?_0x17f0e1['options'][_0x20a5('0x21')]?_[_0x20a5('0x22')](_0x17f0e1['options'][_0x20a5('0x21')],function(_0x39a818){return{'model':db[_0x39a818[_0x20a5('0x23')]],'as':_0x39a818['as'],'attributes':_0x39a818['attributes'],'include':_0x39a818[_0x20a5('0x21')]?_[_0x20a5('0x22')](_0x39a818[_0x20a5('0x21')],function(_0x377216){return{'model':db[_0x377216['model']],'as':_0x377216['as'],'attributes':_0x377216[_0x20a5('0x24')],'include':_0x377216[_0x20a5('0x21')]?_[_0x20a5('0x22')](_0x377216[_0x20a5('0x21')],function(_0x42ffe3){return{'model':db[_0x42ffe3[_0x20a5('0x23')]],'as':_0x42ffe3['as'],'attributes':_0x42ffe3[_0x20a5('0x24')]};}):[]};}):[]};}):[]:[]})[_0x20a5('0x10')](function(_0x4c3e41){logger['info'](_0x20a5('0x25'),_0x17f0e1);logger[_0x20a5('0x14')](_0x20a5('0x25'),_0x17f0e1,JSON[_0x20a5('0x16')](_0x4c3e41));_0x540e87(_0x4c3e41);})[_0x20a5('0x26')](function(_0x3b6b9e){logger[_0x20a5('0x17')]('GetSmsQueue',_0x3b6b9e[_0x20a5('0x19')],_0x17f0e1);_0x427c01(_0x16506c[_0x20a5('0x17')](0x1f4,_0x3b6b9e[_0x20a5('0x19')]));});});};exports['ShowSmsQueue']=function(_0xb3b747){var _0x27bcf7=this;return new Promise(function(_0x40a0af,_0x38f178){return db[_0x20a5('0x1b')][_0x20a5('0x27')]({'raw':_0xb3b747[_0x20a5('0x1d')]?_0xb3b747['options']['raw']===undefined?!![]:![]:!![],'where':_0xb3b747[_0x20a5('0x1d')]?_0xb3b747[_0x20a5('0x1d')][_0x20a5('0x1f')]||null:null,'attributes':_0xb3b747[_0x20a5('0x1d')]?_0xb3b747[_0x20a5('0x1d')][_0x20a5('0x24')]||null:null,'include':_0xb3b747[_0x20a5('0x1d')]?_0xb3b747['options'][_0x20a5('0x21')]?_[_0x20a5('0x22')](_0xb3b747['options'][_0x20a5('0x21')],function(_0x4d6330){return{'model':db[_0x4d6330[_0x20a5('0x23')]],'as':_0x4d6330['as'],'attributes':_0x4d6330[_0x20a5('0x24')],'include':_0x4d6330['include']?_[_0x20a5('0x22')](_0x4d6330[_0x20a5('0x21')],function(_0x488e49){return{'model':db[_0x488e49[_0x20a5('0x23')]],'as':_0x488e49['as'],'attributes':_0x488e49[_0x20a5('0x24')],'include':_0x488e49[_0x20a5('0x21')]?_[_0x20a5('0x22')](_0x488e49[_0x20a5('0x21')],function(_0x180a2f){return{'model':db[_0x180a2f[_0x20a5('0x23')]],'as':_0x180a2f['as'],'attributes':_0x180a2f[_0x20a5('0x24')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x33ed34){logger['info']('ShowSmsQueue',_0xb3b747);logger[_0x20a5('0x14')](_0x20a5('0x28'),_0xb3b747,JSON[_0x20a5('0x16')](_0x33ed34));_0x40a0af(_0x33ed34);})[_0x20a5('0x26')](function(_0x5c2778){logger[_0x20a5('0x17')]('ShowSmsQueue',_0x5c2778[_0x20a5('0x19')],_0xb3b747);_0x38f178(_0x27bcf7[_0x20a5('0x17')](0x1f4,_0x5c2778[_0x20a5('0x19')]));});});};
\ No newline at end of file
index a95ec28..f246816 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7b36=['emit','removeListener','register','length','smsQueue:','./smsQueue.events','remove','update'];(function(_0x4814a4,_0x12bf20){var _0x40b835=function(_0x25a7a0){while(--_0x25a7a0){_0x4814a4['push'](_0x4814a4['shift']());}};_0x40b835(++_0x12bf20);}(_0x7b36,0x135));var _0x67b3=function(_0x337905,_0x281480){_0x337905=_0x337905-0x0;var _0x286d6d=_0x7b36[_0x337905];return _0x286d6d;};'use strict';var SmsQueueEvents=require(_0x67b3('0x0'));var events=['save',_0x67b3('0x1'),_0x67b3('0x2')];function createListener(_0x20690a,_0x1bd631){return function(_0x4ac7ef){_0x1bd631[_0x67b3('0x3')](_0x20690a,_0x4ac7ef);};}function removeListener(_0x3caa5f,_0x258308){return function(){SmsQueueEvents[_0x67b3('0x4')](_0x3caa5f,_0x258308);};}exports[_0x67b3('0x5')]=function(_0x5bab6f){for(var _0x18d8b5=0x0,_0x45aba6=events[_0x67b3('0x6')];_0x18d8b5<_0x45aba6;_0x18d8b5++){var _0x143e5f=events[_0x18d8b5];var _0x1ecab6=createListener(_0x67b3('0x7')+_0x143e5f,_0x5bab6f);SmsQueueEvents['on'](_0x143e5f,_0x1ecab6);}};
\ No newline at end of file
+var _0x1904=['save','remove','update','emit','removeListener','register','length','./smsQueue.events'];(function(_0x5445fe,_0x17a013){var _0x3e78ae=function(_0x4caa07){while(--_0x4caa07){_0x5445fe['push'](_0x5445fe['shift']());}};_0x3e78ae(++_0x17a013);}(_0x1904,0xa7));var _0x4190=function(_0x3f888d,_0x205212){_0x3f888d=_0x3f888d-0x0;var _0x2c4295=_0x1904[_0x3f888d];return _0x2c4295;};'use strict';var SmsQueueEvents=require(_0x4190('0x0'));var events=[_0x4190('0x1'),_0x4190('0x2'),_0x4190('0x3')];function createListener(_0x28e30c,_0x4b172e){return function(_0x41a565){_0x4b172e[_0x4190('0x4')](_0x28e30c,_0x41a565);};}function removeListener(_0x2b9cf0,_0x3f6ff8){return function(){SmsQueueEvents[_0x4190('0x5')](_0x2b9cf0,_0x3f6ff8);};}exports[_0x4190('0x6')]=function(_0x54f4b2){for(var _0x37f0e9=0x0,_0x4dedf5=events[_0x4190('0x7')];_0x37f0e9<_0x4dedf5;_0x37f0e9++){var _0xe429b7=events[_0x37f0e9];var _0x29e7b1=createListener('smsQueue:'+_0xe429b7,_0x54f4b2);SmsQueueEvents['on'](_0xe429b7,_0x29e7b1);}};
\ No newline at end of file
index 8aa19ab..820df42 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe13a=['exports','multer','util','path','express','../../components/auth/service','../../components/interaction/service','./smsQueueReport.controller','get','isAuthenticated','/:id','show','post','put','update','delete','destroy'];(function(_0x196104,_0x12c704){var _0x5e627f=function(_0x4e68f8){while(--_0x4e68f8){_0x196104['push'](_0x196104['shift']());}};_0x5e627f(++_0x12c704);}(_0xe13a,0x1ee));var _0xae13=function(_0x21d64e,_0x1e1532){_0x21d64e=_0x21d64e-0x0;var _0x4c74bb=_0xe13a[_0x21d64e];return _0x4c74bb;};'use strict';var multer=require(_0xae13('0x0'));var util=require(_0xae13('0x1'));var path=require(_0xae13('0x2'));var timeout=require('connect-timeout');var express=require(_0xae13('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xae13('0x4'));var interaction=require(_0xae13('0x5'));var config=require('../../config/environment');var controller=require(_0xae13('0x6'));router[_0xae13('0x7')]('/',auth[_0xae13('0x8')](),controller['index']);router[_0xae13('0x7')]('/describe',auth[_0xae13('0x8')](),controller['describe']);router[_0xae13('0x7')](_0xae13('0x9'),auth[_0xae13('0x8')](),controller[_0xae13('0xa')]);router[_0xae13('0xb')]('/',auth[_0xae13('0x8')](),controller['create']);router[_0xae13('0xc')](_0xae13('0x9'),auth[_0xae13('0x8')](),controller[_0xae13('0xd')]);router[_0xae13('0xe')](_0xae13('0x9'),auth['isAuthenticated'](),controller[_0xae13('0xf')]);module[_0xae13('0x10')]=router;
\ No newline at end of file
+var _0x04b6=['multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsQueueReport.controller','get','index','/describe','describe','/:id','isAuthenticated','show','post','create','update'];(function(_0x1e2324,_0x300764){var _0x214aea=function(_0x2367b4){while(--_0x2367b4){_0x1e2324['push'](_0x1e2324['shift']());}};_0x214aea(++_0x300764);}(_0x04b6,0x1e0));var _0x604b=function(_0x53c256,_0x382a24){_0x53c256=_0x53c256-0x0;var _0x25feb6=_0x04b6[_0x53c256];return _0x25feb6;};'use strict';var multer=require(_0x604b('0x0'));var util=require('util');var path=require(_0x604b('0x1'));var timeout=require(_0x604b('0x2'));var express=require(_0x604b('0x3'));var router=express[_0x604b('0x4')]();var fs_extra=require(_0x604b('0x5'));var auth=require(_0x604b('0x6'));var interaction=require(_0x604b('0x7'));var config=require(_0x604b('0x8'));var controller=require(_0x604b('0x9'));router[_0x604b('0xa')]('/',auth['isAuthenticated'](),controller[_0x604b('0xb')]);router[_0x604b('0xa')](_0x604b('0xc'),auth['isAuthenticated'](),controller[_0x604b('0xd')]);router[_0x604b('0xa')](_0x604b('0xe'),auth[_0x604b('0xf')](),controller[_0x604b('0x10')]);router[_0x604b('0x11')]('/',auth[_0x604b('0xf')](),controller[_0x604b('0x12')]);router['put'](_0x604b('0xe'),auth[_0x604b('0xf')](),controller[_0x604b('0x13')]);router['delete'](_0x604b('0xe'),auth[_0x604b('0xf')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
index 42dbc2e..d5ee0f6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0de7=['STRING','DATE','moment','sequelize','exports'];(function(_0x3e44fa,_0x75ed2a){var _0x2a0aba=function(_0x1db6a7){while(--_0x1db6a7){_0x3e44fa['push'](_0x3e44fa['shift']());}};_0x2a0aba(++_0x75ed2a);}(_0x0de7,0xca));var _0x70de=function(_0x1c777d,_0x42fd6d){_0x1c777d=_0x1c777d-0x0;var _0xaadde0=_0x0de7[_0x1c777d];return _0xaadde0;};'use strict';var moment=require(_0x70de('0x0'));var Sequelize=require(_0x70de('0x1'));module[_0x70de('0x2')]={'uniqueid':{'type':Sequelize[_0x70de('0x3')],'allowNull':![]},'from':{'type':Sequelize[_0x70de('0x3')]},'joinAt':{'type':Sequelize[_0x70de('0x4')]},'leaveAt':{'type':Sequelize[_0x70de('0x4')]},'acceptAt':{'type':Sequelize[_0x70de('0x4')]},'exitAt':{'type':Sequelize[_0x70de('0x4')]},'reason':{'type':Sequelize[_0x70de('0x3')]}};
\ No newline at end of file
+var _0xeecc=['DATE','moment','sequelize','exports','STRING'];(function(_0x3a030e,_0x2621aa){var _0x572255=function(_0x5e23cf){while(--_0x5e23cf){_0x3a030e['push'](_0x3a030e['shift']());}};_0x572255(++_0x2621aa);}(_0xeecc,0x12d));var _0xceec=function(_0x33799f,_0x40daf6){_0x33799f=_0x33799f-0x0;var _0x5ab434=_0xeecc[_0x33799f];return _0x5ab434;};'use strict';var moment=require(_0xceec('0x0'));var Sequelize=require(_0xceec('0x1'));module[_0xceec('0x2')]={'uniqueid':{'type':Sequelize[_0xceec('0x3')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize[_0xceec('0x4')]},'leaveAt':{'type':Sequelize['DATE']},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize['DATE']},'reason':{'type':Sequelize[_0xceec('0x3')]}};
\ No newline at end of file
index e7c1135..e48b023 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x646a=['destroy','then','end','sendStatus','stack','name','index','map','fieldName','type','key','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','filters','pick','filter','where','merge','VIRTUAL','options','count','includeAll','include','SmsQueueReport','findAll','rows','params','rawAttributes','catch','create','body','find','describe','eml-format','zip-dir','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','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','offset','undefined','limit','set','Content-Range','json','apply','save','update'];(function(_0x25add6,_0x112f9f){var _0x8388a3=function(_0xaa3172){while(--_0xaa3172){_0x25add6['push'](_0x25add6['shift']());}};_0x8388a3(++_0x112f9f);}(_0x646a,0x1bf));var _0xa646=function(_0x411017,_0x4a8117){_0x411017=_0x411017-0x0;var _0x2adeea=_0x646a[_0x411017];return _0x2adeea;};'use strict';var emlformat=require(_0xa646('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xa646('0x1'));var jsonpatch=require(_0xa646('0x2'));var rp=require(_0xa646('0x3'));var moment=require(_0xa646('0x4'));var BPromise=require(_0xa646('0x5'));var Mustache=require(_0xa646('0x6'));var util=require(_0xa646('0x7'));var path=require('path');var sox=require(_0xa646('0x8'));var csv=require(_0xa646('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xa646('0xa'));var _=require(_0xa646('0xb'));var squel=require(_0xa646('0xc'));var crypto=require(_0xa646('0xd'));var jsforce=require(_0xa646('0xe'));var deskjs=require(_0xa646('0xf'));var toCsv=require(_0xa646('0x9'));var querystring=require(_0xa646('0x10'));var Papa=require(_0xa646('0x11'));var Redis=require(_0xa646('0x12'));var authService=require(_0xa646('0x13'));var qs=require(_0xa646('0x14'));var as=require(_0xa646('0x15'));var hardwareService=require(_0xa646('0x16'));var logger=require(_0xa646('0x17'))(_0xa646('0x18'));var utils=require(_0xa646('0x19'));var config=require(_0xa646('0x1a'));var licenseUtil=require(_0xa646('0x1b'));var db=require(_0xa646('0x1c'))['db'];function respondWithStatusCode(_0x4476fd,_0x582546){_0x582546=_0x582546||0xcc;return function(_0x1e8242){if(_0x1e8242){return _0x4476fd['sendStatus'](_0x582546);}return _0x4476fd[_0xa646('0x1d')](_0x582546)['end']();};}function respondWithResult(_0x502f83,_0x1c60d1){_0x1c60d1=_0x1c60d1||0xc8;return function(_0x1c22d9){if(_0x1c22d9){return _0x502f83['status'](_0x1c60d1)['json'](_0x1c22d9);}};}function respondWithFilteredResult(_0x53355e,_0x29314d){return function(_0x59af1a){if(_0x59af1a){var _0x1e5195=typeof _0x29314d[_0xa646('0x1e')]===_0xa646('0x1f')&&typeof _0x29314d[_0xa646('0x20')]===_0xa646('0x1f');var _0x3f599c=_0x59af1a['count'];var _0x3e709b=_0x1e5195?0x0:_0x29314d[_0xa646('0x1e')];var _0x587b19=_0x1e5195?_0x59af1a['count']:_0x29314d['offset']+_0x29314d['limit'];var _0x4f858c;if(_0x587b19>=_0x3f599c){_0x587b19=_0x3f599c;_0x4f858c=0xc8;}else{_0x4f858c=0xce;}_0x53355e[_0xa646('0x1d')](_0x4f858c);return _0x53355e[_0xa646('0x21')](_0xa646('0x22'),_0x3e709b+'-'+_0x587b19+'/'+_0x3f599c)[_0xa646('0x23')](_0x59af1a);}return null;};}function patchUpdates(_0xf4ae2a){return function(_0xe0b458){try{jsonpatch[_0xa646('0x24')](_0xe0b458,_0xf4ae2a,!![]);}catch(_0x17e635){return BPromise['reject'](_0x17e635);}return _0xe0b458[_0xa646('0x25')]();};}function saveUpdates(_0x1d6644,_0x3e63d4){return function(_0x304ada){if(_0x304ada){return _0x304ada[_0xa646('0x26')](_0x1d6644)['then'](function(_0x1b2e47){return _0x1b2e47;});}return null;};}function removeEntity(_0x5df50f,_0x5b4f33){return function(_0x388e5f){if(_0x388e5f){return _0x388e5f[_0xa646('0x27')]()[_0xa646('0x28')](function(){_0x5df50f[_0xa646('0x1d')](0xcc)[_0xa646('0x29')]();});}};}function handleEntityNotFound(_0x199a49,_0x181607){return function(_0x8e52a8){if(!_0x8e52a8){_0x199a49[_0xa646('0x2a')](0x194);}return _0x8e52a8;};}function handleError(_0x3b9bf3,_0xa0e109){_0xa0e109=_0xa0e109||0x1f4;return function(_0x1822ca){logger['error'](_0x1822ca[_0xa646('0x2b')]);if(_0x1822ca[_0xa646('0x2c')]){delete _0x1822ca[_0xa646('0x2c')];}_0x3b9bf3[_0xa646('0x1d')](_0xa0e109)['send'](_0x1822ca);};}exports[_0xa646('0x2d')]=function(_0x136280,_0x3944e2){var _0x1f93d4={},_0x5b42b1={},_0x2af135={'count':0x0,'rows':[]};var _0x304c20=_[_0xa646('0x2e')](db['SmsQueueReport']['rawAttributes'],function(_0x118e53){return{'name':_0x118e53[_0xa646('0x2f')],'type':_0x118e53[_0xa646('0x30')][_0xa646('0x31')]};});_0x5b42b1[_0xa646('0x32')]=_['map'](_0x304c20,'name');_0x5b42b1[_0xa646('0x33')]=_[_0xa646('0x34')](_0x136280['query']);_0x5b42b1['filters']=_[_0xa646('0x35')](_0x5b42b1[_0xa646('0x32')],_0x5b42b1[_0xa646('0x33')]);_0x1f93d4['attributes']=_[_0xa646('0x35')](_0x5b42b1[_0xa646('0x32')],qs['fields'](_0x136280[_0xa646('0x33')][_0xa646('0x36')]));_0x1f93d4[_0xa646('0x37')]=_0x1f93d4[_0xa646('0x37')][_0xa646('0x38')]?_0x1f93d4[_0xa646('0x37')]:_0x5b42b1[_0xa646('0x32')];if(!_0x136280[_0xa646('0x33')][_0xa646('0x39')](_0xa646('0x3a'))){_0x1f93d4[_0xa646('0x20')]=qs[_0xa646('0x20')](_0x136280[_0xa646('0x33')][_0xa646('0x20')]);_0x1f93d4[_0xa646('0x1e')]=qs['offset'](_0x136280[_0xa646('0x33')]['offset']);}_0x1f93d4[_0xa646('0x3b')]=qs['sort'](_0x136280['query'][_0xa646('0x3c')]);_0x1f93d4['where']=qs[_0xa646('0x3d')](_[_0xa646('0x3e')](_0x136280['query'],_0x5b42b1['filters']),_0x304c20);if(_0x136280[_0xa646('0x33')][_0xa646('0x3f')]){_0x1f93d4[_0xa646('0x40')]=_[_0xa646('0x41')](_0x1f93d4[_0xa646('0x40')],{'$or':_[_0xa646('0x2e')](_0x304c20,function(_0x42d232){if(_0x42d232['type']!==_0xa646('0x42')){var _0x3bca0a={};_0x3bca0a[_0x42d232[_0xa646('0x2c')]]={'$like':'%'+_0x136280[_0xa646('0x33')]['filter']+'%'};return _0x3bca0a;}})});}_0x1f93d4=_[_0xa646('0x41')]({},_0x1f93d4,_0x136280[_0xa646('0x43')]);var _0x525941={'where':_0x1f93d4['where']};return db['SmsQueueReport'][_0xa646('0x44')](_0x525941)[_0xa646('0x28')](function(_0x17dd18){_0x2af135[_0xa646('0x44')]=_0x17dd18;if(_0x136280['query'][_0xa646('0x45')]){_0x1f93d4[_0xa646('0x46')]=[{'all':!![]}];}return db[_0xa646('0x47')][_0xa646('0x48')](_0x1f93d4);})['then'](function(_0x55a3c8){_0x2af135[_0xa646('0x49')]=_0x55a3c8;return _0x2af135;})['then'](respondWithFilteredResult(_0x3944e2,_0x1f93d4))['catch'](handleError(_0x3944e2,null));};exports['show']=function(_0x40c39e,_0x6f3406){var _0x79de0d={'raw':!![],'where':{'id':_0x40c39e[_0xa646('0x4a')]['id']}},_0x2ebeeb={};_0x2ebeeb['model']=_['keys'](db['SmsQueueReport'][_0xa646('0x4b')]);_0x2ebeeb[_0xa646('0x33')]=_[_0xa646('0x34')](_0x40c39e['query']);_0x2ebeeb[_0xa646('0x3d')]=_[_0xa646('0x35')](_0x2ebeeb[_0xa646('0x32')],_0x2ebeeb['query']);_0x79de0d[_0xa646('0x37')]=_[_0xa646('0x35')](_0x2ebeeb[_0xa646('0x32')],qs[_0xa646('0x36')](_0x40c39e[_0xa646('0x33')][_0xa646('0x36')]));_0x79de0d['attributes']=_0x79de0d['attributes']['length']?_0x79de0d[_0xa646('0x37')]:_0x2ebeeb[_0xa646('0x32')];if(_0x40c39e['query'][_0xa646('0x45')]){_0x79de0d[_0xa646('0x46')]=[{'all':!![]}];}_0x79de0d=_[_0xa646('0x41')]({},_0x79de0d,_0x40c39e['options']);return db[_0xa646('0x47')]['find'](_0x79de0d)[_0xa646('0x28')](handleEntityNotFound(_0x6f3406,null))[_0xa646('0x28')](respondWithResult(_0x6f3406,null))[_0xa646('0x4c')](handleError(_0x6f3406,null));};exports['create']=function(_0x501260,_0x4d2f9a){return db[_0xa646('0x47')][_0xa646('0x4d')](_0x501260['body'],{})['then'](respondWithResult(_0x4d2f9a,0xc9))['catch'](handleError(_0x4d2f9a,null));};exports[_0xa646('0x26')]=function(_0x1c63f1,_0x5afd64){if(_0x1c63f1['body']['id']){delete _0x1c63f1[_0xa646('0x4e')]['id'];}return db[_0xa646('0x47')]['find']({'where':{'id':_0x1c63f1[_0xa646('0x4a')]['id']}})[_0xa646('0x28')](handleEntityNotFound(_0x5afd64,null))[_0xa646('0x28')](saveUpdates(_0x1c63f1[_0xa646('0x4e')],null))['then'](respondWithResult(_0x5afd64,null))[_0xa646('0x4c')](handleError(_0x5afd64,null));};exports[_0xa646('0x27')]=function(_0x55ec53,_0x18cce5){return db[_0xa646('0x47')][_0xa646('0x4f')]({'where':{'id':_0x55ec53[_0xa646('0x4a')]['id']}})[_0xa646('0x28')](handleEntityNotFound(_0x18cce5,null))[_0xa646('0x28')](removeEntity(_0x18cce5,null))['catch'](handleError(_0x18cce5,null));};exports[_0xa646('0x50')]=function(_0x123192,_0x26d690){return db[_0xa646('0x47')][_0xa646('0x50')]()[_0xa646('0x28')](respondWithResult(_0x26d690,null))[_0xa646('0x4c')](handleError(_0x26d690,null));};
\ No newline at end of file
+var _0xf928=['model','query','keys','filters','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','includeAll','rows','catch','rawAttributes','intersection','find','create','body','params','describe','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','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/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','stack','name','index','map','SmsQueueReport','fieldName','type'];(function(_0x7325f3,_0x4c8836){var _0x4f5b5c=function(_0x265b3b){while(--_0x265b3b){_0x7325f3['push'](_0x7325f3['shift']());}};_0x4f5b5c(++_0x4c8836);}(_0xf928,0x14e));var _0x8f92=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xf928[_0x14add3];return _0x4a174f;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x8f92('0x0'));var zipdir=require(_0x8f92('0x1'));var jsonpatch=require(_0x8f92('0x2'));var rp=require(_0x8f92('0x3'));var moment=require(_0x8f92('0x4'));var BPromise=require(_0x8f92('0x5'));var Mustache=require(_0x8f92('0x6'));var util=require(_0x8f92('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0x8f92('0x8'));var ejs=require(_0x8f92('0x9'));var fs=require('fs');var fs_extra=require(_0x8f92('0xa'));var _=require(_0x8f92('0xb'));var squel=require(_0x8f92('0xc'));var crypto=require(_0x8f92('0xd'));var jsforce=require(_0x8f92('0xe'));var deskjs=require(_0x8f92('0xf'));var toCsv=require(_0x8f92('0x8'));var querystring=require(_0x8f92('0x10'));var Papa=require(_0x8f92('0x11'));var Redis=require(_0x8f92('0x12'));var authService=require('../../components/auth/service');var qs=require(_0x8f92('0x13'));var as=require(_0x8f92('0x14'));var hardwareService=require(_0x8f92('0x15'));var logger=require(_0x8f92('0x16'))(_0x8f92('0x17'));var utils=require(_0x8f92('0x18'));var config=require(_0x8f92('0x19'));var licenseUtil=require(_0x8f92('0x1a'));var db=require(_0x8f92('0x1b'))['db'];function respondWithStatusCode(_0x47ca99,_0x50ed83){_0x50ed83=_0x50ed83||0xcc;return function(_0x2f4e12){if(_0x2f4e12){return _0x47ca99[_0x8f92('0x1c')](_0x50ed83);}return _0x47ca99[_0x8f92('0x1d')](_0x50ed83)[_0x8f92('0x1e')]();};}function respondWithResult(_0x2cb4ae,_0x9347d6){_0x9347d6=_0x9347d6||0xc8;return function(_0x47b1fe){if(_0x47b1fe){return _0x2cb4ae['status'](_0x9347d6)[_0x8f92('0x1f')](_0x47b1fe);}};}function respondWithFilteredResult(_0x1477d3,_0x1373ff){return function(_0xf7e788){if(_0xf7e788){var _0xf32fa0=typeof _0x1373ff[_0x8f92('0x20')]===_0x8f92('0x21')&&typeof _0x1373ff[_0x8f92('0x22')]===_0x8f92('0x21');var _0x307609=_0xf7e788[_0x8f92('0x23')];var _0x5c4e76=_0xf32fa0?0x0:_0x1373ff[_0x8f92('0x20')];var _0x30f7d3=_0xf32fa0?_0xf7e788[_0x8f92('0x23')]:_0x1373ff['offset']+_0x1373ff[_0x8f92('0x22')];var _0x1ccc1c;if(_0x30f7d3>=_0x307609){_0x30f7d3=_0x307609;_0x1ccc1c=0xc8;}else{_0x1ccc1c=0xce;}_0x1477d3[_0x8f92('0x1d')](_0x1ccc1c);return _0x1477d3[_0x8f92('0x24')](_0x8f92('0x25'),_0x5c4e76+'-'+_0x30f7d3+'/'+_0x307609)[_0x8f92('0x1f')](_0xf7e788);}return null;};}function patchUpdates(_0xef5652){return function(_0x2215f2){try{jsonpatch[_0x8f92('0x26')](_0x2215f2,_0xef5652,!![]);}catch(_0x426364){return BPromise[_0x8f92('0x27')](_0x426364);}return _0x2215f2[_0x8f92('0x28')]();};}function saveUpdates(_0x2b250d,_0x49560d){return function(_0x4531ec){if(_0x4531ec){return _0x4531ec[_0x8f92('0x29')](_0x2b250d)[_0x8f92('0x2a')](function(_0x24e895){return _0x24e895;});}return null;};}function removeEntity(_0x3f0460,_0xba703d){return function(_0x21b8d4){if(_0x21b8d4){return _0x21b8d4[_0x8f92('0x2b')]()[_0x8f92('0x2a')](function(){_0x3f0460['status'](0xcc)[_0x8f92('0x1e')]();});}};}function handleEntityNotFound(_0x29b307,_0x5c3b22){return function(_0x9f7b08){if(!_0x9f7b08){_0x29b307[_0x8f92('0x1c')](0x194);}return _0x9f7b08;};}function handleError(_0xd0b069,_0x30d157){_0x30d157=_0x30d157||0x1f4;return function(_0x234281){logger['error'](_0x234281[_0x8f92('0x2c')]);if(_0x234281[_0x8f92('0x2d')]){delete _0x234281[_0x8f92('0x2d')];}_0xd0b069[_0x8f92('0x1d')](_0x30d157)['send'](_0x234281);};}exports[_0x8f92('0x2e')]=function(_0x1aed7b,_0x4bdbd1){var _0x14c7ce={},_0x4e180d={},_0x58c875={'count':0x0,'rows':[]};var _0x4b4c23=_[_0x8f92('0x2f')](db[_0x8f92('0x30')]['rawAttributes'],function(_0x268890){return{'name':_0x268890[_0x8f92('0x31')],'type':_0x268890[_0x8f92('0x32')]['key']};});_0x4e180d[_0x8f92('0x33')]=_[_0x8f92('0x2f')](_0x4b4c23,_0x8f92('0x2d'));_0x4e180d[_0x8f92('0x34')]=_[_0x8f92('0x35')](_0x1aed7b[_0x8f92('0x34')]);_0x4e180d[_0x8f92('0x36')]=_['intersection'](_0x4e180d[_0x8f92('0x33')],_0x4e180d['query']);_0x14c7ce[_0x8f92('0x37')]=_['intersection'](_0x4e180d['model'],qs[_0x8f92('0x38')](_0x1aed7b[_0x8f92('0x34')]['fields']));_0x14c7ce[_0x8f92('0x37')]=_0x14c7ce[_0x8f92('0x37')][_0x8f92('0x39')]?_0x14c7ce['attributes']:_0x4e180d[_0x8f92('0x33')];if(!_0x1aed7b[_0x8f92('0x34')][_0x8f92('0x3a')](_0x8f92('0x3b'))){_0x14c7ce['limit']=qs[_0x8f92('0x22')](_0x1aed7b[_0x8f92('0x34')][_0x8f92('0x22')]);_0x14c7ce[_0x8f92('0x20')]=qs['offset'](_0x1aed7b['query'][_0x8f92('0x20')]);}_0x14c7ce[_0x8f92('0x3c')]=qs[_0x8f92('0x3d')](_0x1aed7b[_0x8f92('0x34')][_0x8f92('0x3d')]);_0x14c7ce[_0x8f92('0x3e')]=qs[_0x8f92('0x36')](_[_0x8f92('0x3f')](_0x1aed7b[_0x8f92('0x34')],_0x4e180d['filters']),_0x4b4c23);if(_0x1aed7b['query']['filter']){_0x14c7ce['where']=_[_0x8f92('0x40')](_0x14c7ce[_0x8f92('0x3e')],{'$or':_[_0x8f92('0x2f')](_0x4b4c23,function(_0x1cda3b){if(_0x1cda3b['type']!==_0x8f92('0x41')){var _0x489e4e={};_0x489e4e[_0x1cda3b['name']]={'$like':'%'+_0x1aed7b[_0x8f92('0x34')][_0x8f92('0x42')]+'%'};return _0x489e4e;}})});}_0x14c7ce=_[_0x8f92('0x40')]({},_0x14c7ce,_0x1aed7b['options']);var _0x30a749={'where':_0x14c7ce[_0x8f92('0x3e')]};return db['SmsQueueReport'][_0x8f92('0x23')](_0x30a749)['then'](function(_0x5557fb){_0x58c875[_0x8f92('0x23')]=_0x5557fb;if(_0x1aed7b[_0x8f92('0x34')][_0x8f92('0x43')]){_0x14c7ce['include']=[{'all':!![]}];}return db[_0x8f92('0x30')]['findAll'](_0x14c7ce);})['then'](function(_0x36cd44){_0x58c875[_0x8f92('0x44')]=_0x36cd44;return _0x58c875;})[_0x8f92('0x2a')](respondWithFilteredResult(_0x4bdbd1,_0x14c7ce))[_0x8f92('0x45')](handleError(_0x4bdbd1,null));};exports['show']=function(_0x3b2830,_0x4c8549){var _0x1447ac={'raw':!![],'where':{'id':_0x3b2830['params']['id']}},_0x5e8d3f={};_0x5e8d3f[_0x8f92('0x33')]=_[_0x8f92('0x35')](db['SmsQueueReport'][_0x8f92('0x46')]);_0x5e8d3f[_0x8f92('0x34')]=_['keys'](_0x3b2830[_0x8f92('0x34')]);_0x5e8d3f[_0x8f92('0x36')]=_[_0x8f92('0x47')](_0x5e8d3f[_0x8f92('0x33')],_0x5e8d3f['query']);_0x1447ac[_0x8f92('0x37')]=_[_0x8f92('0x47')](_0x5e8d3f[_0x8f92('0x33')],qs[_0x8f92('0x38')](_0x3b2830[_0x8f92('0x34')][_0x8f92('0x38')]));_0x1447ac[_0x8f92('0x37')]=_0x1447ac[_0x8f92('0x37')][_0x8f92('0x39')]?_0x1447ac['attributes']:_0x5e8d3f[_0x8f92('0x33')];if(_0x3b2830[_0x8f92('0x34')]['includeAll']){_0x1447ac['include']=[{'all':!![]}];}_0x1447ac=_['merge']({},_0x1447ac,_0x3b2830['options']);return db[_0x8f92('0x30')][_0x8f92('0x48')](_0x1447ac)[_0x8f92('0x2a')](handleEntityNotFound(_0x4c8549,null))[_0x8f92('0x2a')](respondWithResult(_0x4c8549,null))[_0x8f92('0x45')](handleError(_0x4c8549,null));};exports['create']=function(_0x2e884c,_0x5b56ec){return db['SmsQueueReport'][_0x8f92('0x49')](_0x2e884c[_0x8f92('0x4a')],{})[_0x8f92('0x2a')](respondWithResult(_0x5b56ec,0xc9))[_0x8f92('0x45')](handleError(_0x5b56ec,null));};exports[_0x8f92('0x29')]=function(_0x4aa3a0,_0x25608e){if(_0x4aa3a0[_0x8f92('0x4a')]['id']){delete _0x4aa3a0[_0x8f92('0x4a')]['id'];}return db['SmsQueueReport']['find']({'where':{'id':_0x4aa3a0['params']['id']}})['then'](handleEntityNotFound(_0x25608e,null))[_0x8f92('0x2a')](saveUpdates(_0x4aa3a0[_0x8f92('0x4a')],null))[_0x8f92('0x2a')](respondWithResult(_0x25608e,null))[_0x8f92('0x45')](handleError(_0x25608e,null));};exports[_0x8f92('0x2b')]=function(_0x55d90e,_0x1c43a3){return db[_0x8f92('0x30')][_0x8f92('0x48')]({'where':{'id':_0x55d90e[_0x8f92('0x4b')]['id']}})[_0x8f92('0x2a')](handleEntityNotFound(_0x1c43a3,null))['then'](removeEntity(_0x1c43a3,null))['catch'](handleError(_0x1c43a3,null));};exports[_0x8f92('0x4c')]=function(_0x2f3306,_0x5d6508){return db[_0x8f92('0x30')][_0x8f92('0x4c')]()[_0x8f92('0x2a')](respondWithResult(_0x5d6508,null))[_0x8f92('0x45')](handleError(_0x5d6508,null));};
\ No newline at end of file
index 4aa0291..1cc71f4 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(_0x1ce575,_0xbcf48f){var _0x20118a=function(_0x2a44e4){while(--_0x2a44e4){_0x1ce575['push'](_0x1ce575['shift']());}};_0x20118a(++_0xbcf48f);}(_0xe706,0xa3));var _0x6e70=function(_0x3ed1c1,_0x45fe0a){_0x3ed1c1=_0x3ed1c1-0x0;var _0x11797d=_0xe706[_0x3ed1c1];return _0x11797d;};'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(_0x14f69a,_0x13a0c9){var _0x2bbe09=function(_0x360963){while(--_0x360963){_0x14f69a['push'](_0x14f69a['shift']());}};_0x2bbe09(++_0x13a0c9);}(_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('./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 3431c9e..3c90660 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3762=['catch','CreateSmsQueueReport','create','options','raw','SmsQueueReport','update','body','where','attributes','limit','debug','UpdateSmsQueueReport','lodash','util','moment','bluebird','../../mysqldb','../../config/environment','jayson/promise','client','then','SmsQueueReport,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result'];(function(_0x4858fe,_0x39e96c){var _0x38cda9=function(_0x23472d){while(--_0x23472d){_0x4858fe['push'](_0x4858fe['shift']());}};_0x38cda9(++_0x39e96c);}(_0x3762,0x85));var _0x2376=function(_0x132578,_0x2a62ee){_0x132578=_0x132578-0x0;var _0x8dccab=_0x3762[_0x132578];return _0x8dccab;};'use strict';var _=require(_0x2376('0x0'));var util=require(_0x2376('0x1'));var moment=require(_0x2376('0x2'));var BPromise=require(_0x2376('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x2376('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x2376('0x5'));var jayson=require(_0x2376('0x6'));var client=jayson[_0x2376('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4befe5,_0x2178e6,_0x2857c1){return new BPromise(function(_0x1cce6b,_0x2f5d18){return client['request'](_0x4befe5,_0x2857c1)[_0x2376('0x8')](function(_0x1668d0){logger['info'](_0x2376('0x9'),_0x2178e6,_0x2376('0xa'));logger['debug']('SmsQueueReport,\x20%s,\x20%s,\x20%s',_0x2178e6,_0x2376('0xa'),JSON[_0x2376('0xb')](_0x1668d0));if(_0x1668d0[_0x2376('0xc')]){if(_0x1668d0[_0x2376('0xc')][_0x2376('0xd')]===0x1f4){logger[_0x2376('0xc')]('SmsQueueReport,\x20%s,\x20%s',_0x2178e6,_0x1668d0[_0x2376('0xc')][_0x2376('0xe')]);return _0x2f5d18(_0x1668d0['error'][_0x2376('0xe')]);}logger['error']('SmsQueueReport,\x20%s,\x20%s',_0x2178e6,_0x1668d0[_0x2376('0xc')][_0x2376('0xe')]);return _0x1cce6b(_0x1668d0[_0x2376('0xc')]['message']);}else{logger[_0x2376('0xf')](_0x2376('0x9'),_0x2178e6,_0x2376('0xa'));_0x1cce6b(_0x1668d0[_0x2376('0x10')][_0x2376('0xe')]);}})[_0x2376('0x11')](function(_0x1e312c){logger['error'](_0x2376('0x9'),_0x2178e6,_0x1e312c);_0x2f5d18(_0x1e312c);});});}exports[_0x2376('0x12')]=function(_0x772cdf){var _0x54717b=this;return new Promise(function(_0x5bf401,_0x173fc2){return db['SmsQueueReport'][_0x2376('0x13')](_0x772cdf['body'],{'raw':_0x772cdf[_0x2376('0x14')]?_0x772cdf[_0x2376('0x14')][_0x2376('0x15')]===undefined?!![]:![]:!![]})[_0x2376('0x8')](function(_0x255514){logger[_0x2376('0xf')](_0x2376('0x12'),_0x772cdf);logger['debug']('CreateSmsQueueReport',_0x772cdf,JSON['stringify'](_0x255514));_0x5bf401(_0x255514);})[_0x2376('0x11')](function(_0x59bbbb){logger[_0x2376('0xc')]('CreateSmsQueueReport',_0x59bbbb[_0x2376('0xe')],_0x772cdf);_0x173fc2(_0x54717b['error'](0x1f4,_0x59bbbb[_0x2376('0xe')]));});});};exports['UpdateSmsQueueReport']=function(_0x298b6b){var _0x58f0d7=this;return new Promise(function(_0x181373,_0x40f305){return db[_0x2376('0x16')][_0x2376('0x17')](_0x298b6b[_0x2376('0x18')],{'raw':_0x298b6b['options']?_0x298b6b[_0x2376('0x14')][_0x2376('0x15')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x298b6b[_0x2376('0x14')]?_0x298b6b[_0x2376('0x14')][_0x2376('0x19')]||null:null,'attributes':_0x298b6b[_0x2376('0x14')]?_0x298b6b[_0x2376('0x14')][_0x2376('0x1a')]||null:null,'limit':_0x298b6b[_0x2376('0x14')]?_0x298b6b[_0x2376('0x14')][_0x2376('0x1b')]||null:null})['then'](function(_0x1693b5){logger[_0x2376('0xf')]('UpdateSmsQueueReport',_0x298b6b);logger[_0x2376('0x1c')](_0x2376('0x1d'),_0x298b6b,JSON[_0x2376('0xb')](_0x1693b5));_0x181373(_0x1693b5);})[_0x2376('0x11')](function(_0x34f89c){logger['error'](_0x2376('0x1d'),_0x34f89c[_0x2376('0xe')],_0x298b6b);_0x40f305(_0x58f0d7['error'](0x1f4,_0x34f89c[_0x2376('0xe')]));});});};
\ No newline at end of file
+var _0x9346=['randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','SmsQueueReport,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch','SmsQueueReport','create','options','raw','CreateSmsQueueReport','update','body','where','attributes','limit','UpdateSmsQueueReport','util','moment','bluebird'];(function(_0x66808a,_0x60f3bd){var _0x760006=function(_0x520c41){while(--_0x520c41){_0x66808a['push'](_0x66808a['shift']());}};_0x760006(++_0x60f3bd);}(_0x9346,0x85));var _0x6934=function(_0x9785e8,_0x3615b4){_0x9785e8=_0x9785e8-0x0;var _0x2007ec=_0x9346[_0x9785e8];return _0x2007ec;};'use strict';var _=require('lodash');var util=require(_0x6934('0x0'));var moment=require(_0x6934('0x1'));var BPromise=require(_0x6934('0x2'));var rs=require(_0x6934('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6934('0x4'))['db'];var utils=require(_0x6934('0x5'));var logger=require(_0x6934('0x6'))('rpc');var config=require(_0x6934('0x7'));var jayson=require(_0x6934('0x8'));var client=jayson[_0x6934('0x9')][_0x6934('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x42fe74,_0x1c1add,_0x1851d6){return new BPromise(function(_0x316b69,_0x231d7e){return client[_0x6934('0xb')](_0x42fe74,_0x1851d6)[_0x6934('0xc')](function(_0x149977){logger[_0x6934('0xd')](_0x6934('0xe'),_0x1c1add,'request\x20sent');logger[_0x6934('0xf')]('SmsQueueReport,\x20%s,\x20%s,\x20%s',_0x1c1add,'request\x20sent',JSON[_0x6934('0x10')](_0x149977));if(_0x149977[_0x6934('0x11')]){if(_0x149977[_0x6934('0x11')][_0x6934('0x12')]===0x1f4){logger[_0x6934('0x11')](_0x6934('0xe'),_0x1c1add,_0x149977['error'][_0x6934('0x13')]);return _0x231d7e(_0x149977[_0x6934('0x11')][_0x6934('0x13')]);}logger['error'](_0x6934('0xe'),_0x1c1add,_0x149977[_0x6934('0x11')]['message']);return _0x316b69(_0x149977[_0x6934('0x11')][_0x6934('0x13')]);}else{logger['info'](_0x6934('0xe'),_0x1c1add,_0x6934('0x14'));_0x316b69(_0x149977[_0x6934('0x15')][_0x6934('0x13')]);}})[_0x6934('0x16')](function(_0x575e22){logger['error'](_0x6934('0xe'),_0x1c1add,_0x575e22);_0x231d7e(_0x575e22);});});}exports['CreateSmsQueueReport']=function(_0x25efd3){var _0x326fd2=this;return new Promise(function(_0x5924c3,_0x185c82){return db[_0x6934('0x17')][_0x6934('0x18')](_0x25efd3['body'],{'raw':_0x25efd3[_0x6934('0x19')]?_0x25efd3[_0x6934('0x19')][_0x6934('0x1a')]===undefined?!![]:![]:!![]})[_0x6934('0xc')](function(_0x5b15ed){logger[_0x6934('0xd')](_0x6934('0x1b'),_0x25efd3);logger[_0x6934('0xf')]('CreateSmsQueueReport',_0x25efd3,JSON[_0x6934('0x10')](_0x5b15ed));_0x5924c3(_0x5b15ed);})[_0x6934('0x16')](function(_0x1c5685){logger['error'](_0x6934('0x1b'),_0x1c5685[_0x6934('0x13')],_0x25efd3);_0x185c82(_0x326fd2[_0x6934('0x11')](0x1f4,_0x1c5685['message']));});});};exports['UpdateSmsQueueReport']=function(_0x4faf55){var _0x1e3b3b=this;return new Promise(function(_0x546112,_0xaeb546){return db['SmsQueueReport'][_0x6934('0x1c')](_0x4faf55[_0x6934('0x1d')],{'raw':_0x4faf55[_0x6934('0x19')]?_0x4faf55[_0x6934('0x19')][_0x6934('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4faf55[_0x6934('0x19')]?_0x4faf55['options'][_0x6934('0x1e')]||null:null,'attributes':_0x4faf55['options']?_0x4faf55[_0x6934('0x19')][_0x6934('0x1f')]||null:null,'limit':_0x4faf55[_0x6934('0x19')]?_0x4faf55['options'][_0x6934('0x20')]||null:null})[_0x6934('0xc')](function(_0x2d8fe2){logger['info'](_0x6934('0x21'),_0x4faf55);logger[_0x6934('0xf')](_0x6934('0x21'),_0x4faf55,JSON[_0x6934('0x10')](_0x2d8fe2));_0x546112(_0x2d8fe2);})['catch'](function(_0x3f04f3){logger[_0x6934('0x11')]('UpdateSmsQueueReport',_0x3f04f3[_0x6934('0x13')],_0x4faf55);_0xaeb546(_0x1e3b3b[_0x6934('0x11')](0x1f4,_0x3f04f3[_0x6934('0x13')]));});});};
\ No newline at end of file
index f9c970a..a885de9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfd87=['delete','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsTransferReport.controller','isAuthenticated','index','/describe','describe','get','/:id','show','post'];(function(_0x193cdb,_0x52d2f0){var _0x12aedb=function(_0x15746a){while(--_0x15746a){_0x193cdb['push'](_0x193cdb['shift']());}};_0x12aedb(++_0x52d2f0);}(_0xfd87,0x80));var _0x7fd8=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xfd87[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0x7fd8('0x0'));var util=require(_0x7fd8('0x1'));var path=require(_0x7fd8('0x2'));var timeout=require(_0x7fd8('0x3'));var express=require(_0x7fd8('0x4'));var router=express[_0x7fd8('0x5')]();var fs_extra=require(_0x7fd8('0x6'));var auth=require(_0x7fd8('0x7'));var interaction=require(_0x7fd8('0x8'));var config=require(_0x7fd8('0x9'));var controller=require(_0x7fd8('0xa'));router['get']('/',auth[_0x7fd8('0xb')](),controller[_0x7fd8('0xc')]);router['get'](_0x7fd8('0xd'),auth[_0x7fd8('0xb')](),controller[_0x7fd8('0xe')]);router[_0x7fd8('0xf')](_0x7fd8('0x10'),auth['isAuthenticated'](),controller[_0x7fd8('0x11')]);router[_0x7fd8('0x12')]('/',auth[_0x7fd8('0xb')](),controller['create']);router['put']('/:id',auth[_0x7fd8('0xb')](),controller['update']);router[_0x7fd8('0x13')](_0x7fd8('0x10'),auth[_0x7fd8('0xb')](),controller['destroy']);module[_0x7fd8('0x14')]=router;
\ No newline at end of file
+var _0xc978=['/:id','show','create','put','update','delete','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsTransferReport.controller','get','isAuthenticated','index','/describe','describe'];(function(_0x2f9e84,_0x3f0f8a){var _0x3549e9=function(_0x5caf50){while(--_0x5caf50){_0x2f9e84['push'](_0x2f9e84['shift']());}};_0x3549e9(++_0x3f0f8a);}(_0xc978,0xcd));var _0x8c97=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xc978[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0x8c97('0x0'));var util=require(_0x8c97('0x1'));var path=require(_0x8c97('0x2'));var timeout=require(_0x8c97('0x3'));var express=require(_0x8c97('0x4'));var router=express[_0x8c97('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x8c97('0x6'));var interaction=require(_0x8c97('0x7'));var config=require(_0x8c97('0x8'));var controller=require(_0x8c97('0x9'));router[_0x8c97('0xa')]('/',auth[_0x8c97('0xb')](),controller[_0x8c97('0xc')]);router['get'](_0x8c97('0xd'),auth[_0x8c97('0xb')](),controller[_0x8c97('0xe')]);router[_0x8c97('0xa')](_0x8c97('0xf'),auth[_0x8c97('0xb')](),controller[_0x8c97('0x10')]);router['post']('/',auth[_0x8c97('0xb')](),controller[_0x8c97('0x11')]);router[_0x8c97('0x12')](_0x8c97('0xf'),auth[_0x8c97('0xb')](),controller[_0x8c97('0x13')]);router[_0x8c97('0x14')](_0x8c97('0xf'),auth[_0x8c97('0xb')](),controller['destroy']);module[_0x8c97('0x15')]=router;
\ No newline at end of file
index 662fb37..784dce5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe706=['NOW','moment','sequelize','exports','ENUM','account','agent','queue','DATE'];(function(_0x18843a,_0x5bbc55){var _0x28797b=function(_0x58aa24){while(--_0x58aa24){_0x18843a['push'](_0x18843a['shift']());}};_0x28797b(++_0x5bbc55);}(_0xe706,0xa3));var _0x6e70=function(_0x322efb,_0x539552){_0x322efb=_0x322efb-0x0;var _0x4245ca=_0xe706[_0x322efb];return _0x4245ca;};'use strict';var moment=require(_0x6e70('0x0'));var Sequelize=require(_0x6e70('0x1'));module[_0x6e70('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0x6e70('0x3')](_0x6e70('0x4'),_0x6e70('0x5'),_0x6e70('0x6')),'allowNull':![],'defaultValue':_0x6e70('0x6')},'transferredAt':{'type':Sequelize[_0x6e70('0x7')],'allowNull':![],'defaultValue':Sequelize[_0x6e70('0x8')]}};
\ No newline at end of file
+var _0xcb91=['STRING','ENUM','account','queue','NOW','exports'];(function(_0x4956ff,_0x133ed8){var _0x47b801=function(_0xa38e3c){while(--_0xa38e3c){_0x4956ff['push'](_0x4956ff['shift']());}};_0x47b801(++_0x133ed8);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x4b5813,_0x5769de){_0x4b5813=_0x4b5813-0x0;var _0x423465=_0xcb91[_0x4b5813];return _0x423465;};'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 c9710ee..ce89418 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4329=['rimraf','request-promise','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','sendStatus','status','end','json','limit','count','offset','set','Content-Range','apply','save','update','then','name','send','index','map','SmsTransferReport','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','destroy','describe','eml-format'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x4329,0x1f0));var _0x9432=function(_0x46aff0,_0x122890){_0x46aff0=_0x46aff0-0x0;var _0x9d78cf=_0x4329[_0x46aff0];return _0x9d78cf;};'use strict';var emlformat=require(_0x9432('0x0'));var rimraf=require(_0x9432('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x9432('0x2'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x9432('0x3'));var util=require(_0x9432('0x4'));var path=require(_0x9432('0x5'));var sox=require(_0x9432('0x6'));var csv=require(_0x9432('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x9432('0x8'));var _=require(_0x9432('0x9'));var squel=require(_0x9432('0xa'));var crypto=require(_0x9432('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x9432('0xc'));var toCsv=require('to-csv');var querystring=require(_0x9432('0xd'));var Papa=require(_0x9432('0xe'));var Redis=require(_0x9432('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x9432('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x9432('0x11'));var logger=require(_0x9432('0x12'))(_0x9432('0x13'));var utils=require('../../config/utils');var config=require(_0x9432('0x14'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4e5779,_0x54570e){_0x54570e=_0x54570e||0xcc;return function(_0xeb4085){if(_0xeb4085){return _0x4e5779[_0x9432('0x15')](_0x54570e);}return _0x4e5779[_0x9432('0x16')](_0x54570e)[_0x9432('0x17')]();};}function respondWithResult(_0x27a5ab,_0x4edcb6){_0x4edcb6=_0x4edcb6||0xc8;return function(_0x310765){if(_0x310765){return _0x27a5ab[_0x9432('0x16')](_0x4edcb6)[_0x9432('0x18')](_0x310765);}};}function respondWithFilteredResult(_0x4d0430,_0x32af6a){return function(_0x3a7926){if(_0x3a7926){var _0x47e1ac=typeof _0x32af6a['offset']==='undefined'&&typeof _0x32af6a[_0x9432('0x19')]==='undefined';var _0x2ac8bf=_0x3a7926[_0x9432('0x1a')];var _0x192928=_0x47e1ac?0x0:_0x32af6a[_0x9432('0x1b')];var _0x23988e=_0x47e1ac?_0x3a7926['count']:_0x32af6a['offset']+_0x32af6a[_0x9432('0x19')];var _0x255dc2;if(_0x23988e>=_0x2ac8bf){_0x23988e=_0x2ac8bf;_0x255dc2=0xc8;}else{_0x255dc2=0xce;}_0x4d0430[_0x9432('0x16')](_0x255dc2);return _0x4d0430[_0x9432('0x1c')](_0x9432('0x1d'),_0x192928+'-'+_0x23988e+'/'+_0x2ac8bf)[_0x9432('0x18')](_0x3a7926);}return null;};}function patchUpdates(_0x2e8640){return function(_0x3bb895){try{jsonpatch[_0x9432('0x1e')](_0x3bb895,_0x2e8640,!![]);}catch(_0x4df648){return BPromise['reject'](_0x4df648);}return _0x3bb895[_0x9432('0x1f')]();};}function saveUpdates(_0x148e25,_0x116115){return function(_0x100324){if(_0x100324){return _0x100324[_0x9432('0x20')](_0x148e25)[_0x9432('0x21')](function(_0x3816f3){return _0x3816f3;});}return null;};}function removeEntity(_0x218a85,_0xbff322){return function(_0x2e30f0){if(_0x2e30f0){return _0x2e30f0['destroy']()[_0x9432('0x21')](function(){_0x218a85[_0x9432('0x16')](0xcc)[_0x9432('0x17')]();});}};}function handleEntityNotFound(_0x398dde,_0x3ca6b2){return function(_0x1a3508){if(!_0x1a3508){_0x398dde['sendStatus'](0x194);}return _0x1a3508;};}function handleError(_0x453a69,_0x47a32f){_0x47a32f=_0x47a32f||0x1f4;return function(_0x33abde){logger['error'](_0x33abde['stack']);if(_0x33abde[_0x9432('0x22')]){delete _0x33abde['name'];}_0x453a69['status'](_0x47a32f)[_0x9432('0x23')](_0x33abde);};}exports[_0x9432('0x24')]=function(_0x2dfc32,_0x23f82d){var _0x3129a6={},_0x39f059={},_0x23ac16={'count':0x0,'rows':[]};var _0x51e0fd=_[_0x9432('0x25')](db[_0x9432('0x26')]['rawAttributes'],function(_0x1bc0ed){return{'name':_0x1bc0ed[_0x9432('0x27')],'type':_0x1bc0ed['type'][_0x9432('0x28')]};});_0x39f059[_0x9432('0x29')]=_[_0x9432('0x25')](_0x51e0fd,_0x9432('0x22'));_0x39f059[_0x9432('0x2a')]=_[_0x9432('0x2b')](_0x2dfc32['query']);_0x39f059[_0x9432('0x2c')]=_[_0x9432('0x2d')](_0x39f059[_0x9432('0x29')],_0x39f059[_0x9432('0x2a')]);_0x3129a6[_0x9432('0x2e')]=_['intersection'](_0x39f059[_0x9432('0x29')],qs[_0x9432('0x2f')](_0x2dfc32[_0x9432('0x2a')][_0x9432('0x2f')]));_0x3129a6[_0x9432('0x2e')]=_0x3129a6[_0x9432('0x2e')][_0x9432('0x30')]?_0x3129a6['attributes']:_0x39f059['model'];if(!_0x2dfc32['query'][_0x9432('0x31')](_0x9432('0x32'))){_0x3129a6['limit']=qs[_0x9432('0x19')](_0x2dfc32['query'][_0x9432('0x19')]);_0x3129a6[_0x9432('0x1b')]=qs[_0x9432('0x1b')](_0x2dfc32[_0x9432('0x2a')][_0x9432('0x1b')]);}_0x3129a6['order']=qs[_0x9432('0x33')](_0x2dfc32[_0x9432('0x2a')][_0x9432('0x33')]);_0x3129a6[_0x9432('0x34')]=qs['filters'](_[_0x9432('0x35')](_0x2dfc32['query'],_0x39f059[_0x9432('0x2c')]),_0x51e0fd);if(_0x2dfc32[_0x9432('0x2a')][_0x9432('0x36')]){_0x3129a6['where']=_[_0x9432('0x37')](_0x3129a6[_0x9432('0x34')],{'$or':_[_0x9432('0x25')](_0x51e0fd,function(_0x10d497){if(_0x10d497[_0x9432('0x38')]!==_0x9432('0x39')){var _0x58a95f={};_0x58a95f[_0x10d497[_0x9432('0x22')]]={'$like':'%'+_0x2dfc32['query']['filter']+'%'};return _0x58a95f;}})});}_0x3129a6=_[_0x9432('0x37')]({},_0x3129a6,_0x2dfc32[_0x9432('0x3a')]);var _0x2557b5={'where':_0x3129a6['where']};return db[_0x9432('0x26')][_0x9432('0x1a')](_0x2557b5)[_0x9432('0x21')](function(_0x1aee4b){_0x23ac16[_0x9432('0x1a')]=_0x1aee4b;if(_0x2dfc32[_0x9432('0x2a')][_0x9432('0x3b')]){_0x3129a6[_0x9432('0x3c')]=[{'all':!![]}];}return db[_0x9432('0x26')][_0x9432('0x3d')](_0x3129a6);})[_0x9432('0x21')](function(_0x3091fc){_0x23ac16[_0x9432('0x3e')]=_0x3091fc;return _0x23ac16;})['then'](respondWithFilteredResult(_0x23f82d,_0x3129a6))[_0x9432('0x3f')](handleError(_0x23f82d,null));};exports[_0x9432('0x40')]=function(_0x4bf74a,_0x123ed9){var _0x410fd9={'raw':!![],'where':{'id':_0x4bf74a[_0x9432('0x41')]['id']}},_0x336f2f={};_0x336f2f[_0x9432('0x29')]=_['keys'](db[_0x9432('0x26')]['rawAttributes']);_0x336f2f[_0x9432('0x2a')]=_[_0x9432('0x2b')](_0x4bf74a[_0x9432('0x2a')]);_0x336f2f[_0x9432('0x2c')]=_[_0x9432('0x2d')](_0x336f2f[_0x9432('0x29')],_0x336f2f[_0x9432('0x2a')]);_0x410fd9[_0x9432('0x2e')]=_[_0x9432('0x2d')](_0x336f2f['model'],qs[_0x9432('0x2f')](_0x4bf74a[_0x9432('0x2a')][_0x9432('0x2f')]));_0x410fd9[_0x9432('0x2e')]=_0x410fd9[_0x9432('0x2e')][_0x9432('0x30')]?_0x410fd9[_0x9432('0x2e')]:_0x336f2f[_0x9432('0x29')];if(_0x4bf74a[_0x9432('0x2a')][_0x9432('0x3b')]){_0x410fd9[_0x9432('0x3c')]=[{'all':!![]}];}_0x410fd9=_[_0x9432('0x37')]({},_0x410fd9,_0x4bf74a[_0x9432('0x3a')]);return db[_0x9432('0x26')][_0x9432('0x42')](_0x410fd9)[_0x9432('0x21')](handleEntityNotFound(_0x123ed9,null))[_0x9432('0x21')](respondWithResult(_0x123ed9,null))[_0x9432('0x3f')](handleError(_0x123ed9,null));};exports[_0x9432('0x43')]=function(_0x1fe313,_0x2161e9){return db[_0x9432('0x26')][_0x9432('0x43')](_0x1fe313[_0x9432('0x44')],{})['then'](respondWithResult(_0x2161e9,0xc9))[_0x9432('0x3f')](handleError(_0x2161e9,null));};exports[_0x9432('0x20')]=function(_0x2b96ac,_0x8af4be){if(_0x2b96ac[_0x9432('0x44')]['id']){delete _0x2b96ac['body']['id'];}return db[_0x9432('0x26')][_0x9432('0x42')]({'where':{'id':_0x2b96ac['params']['id']}})['then'](handleEntityNotFound(_0x8af4be,null))[_0x9432('0x21')](saveUpdates(_0x2b96ac[_0x9432('0x44')],null))[_0x9432('0x21')](respondWithResult(_0x8af4be,null))[_0x9432('0x3f')](handleError(_0x8af4be,null));};exports[_0x9432('0x45')]=function(_0x4c6878,_0x5000be){return db[_0x9432('0x26')][_0x9432('0x42')]({'where':{'id':_0x4c6878[_0x9432('0x41')]['id']}})[_0x9432('0x21')](handleEntityNotFound(_0x5000be,null))[_0x9432('0x21')](removeEntity(_0x5000be,null))[_0x9432('0x3f')](handleError(_0x5000be,null));};exports[_0x9432('0x46')]=function(_0x3aa69f,_0x51dfd9){return db[_0x9432('0x26')]['describe']()[_0x9432('0x21')](respondWithResult(_0x51dfd9,null))[_0x9432('0x3f')](handleError(_0x51dfd9,null));};
\ No newline at end of file
+var _0x5b6d=['papaparse','../../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','offset','undefined','limit','count','set','apply','then','destroy','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','intersection','attributes','fields','length','hasOwnProperty','order','sort','filters','pick','filter','where','merge','VIRTUAL','options','SmsTransferReport','includeAll','findAll','rows','show','params','keys','include','find','catch','create','update','body','describe','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','crypto','jsforce','desk.js','querystring'];(function(_0x1f5f0d,_0x1d5da6){var _0x407342=function(_0x46f487){while(--_0x46f487){_0x1f5f0d['push'](_0x1f5f0d['shift']());}};_0x407342(++_0x1d5da6);}(_0x5b6d,0x8c));var _0xd5b6=function(_0x11c032,_0x4ca503){_0x11c032=_0x11c032-0x0;var _0x55919f=_0x5b6d[_0x11c032];return _0x55919f;};'use strict';var emlformat=require(_0xd5b6('0x0'));var rimraf=require(_0xd5b6('0x1'));var zipdir=require(_0xd5b6('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xd5b6('0x3'));var moment=require(_0xd5b6('0x4'));var BPromise=require(_0xd5b6('0x5'));var Mustache=require(_0xd5b6('0x6'));var util=require(_0xd5b6('0x7'));var path=require(_0xd5b6('0x8'));var sox=require(_0xd5b6('0x9'));var csv=require(_0xd5b6('0xa'));var ejs=require(_0xd5b6('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require('squel');var crypto=require(_0xd5b6('0xc'));var jsforce=require(_0xd5b6('0xd'));var deskjs=require(_0xd5b6('0xe'));var toCsv=require(_0xd5b6('0xa'));var querystring=require(_0xd5b6('0xf'));var Papa=require(_0xd5b6('0x10'));var Redis=require('ioredis');var authService=require(_0xd5b6('0x11'));var qs=require(_0xd5b6('0x12'));var as=require(_0xd5b6('0x13'));var hardwareService=require(_0xd5b6('0x14'));var logger=require(_0xd5b6('0x15'))(_0xd5b6('0x16'));var utils=require(_0xd5b6('0x17'));var config=require(_0xd5b6('0x18'));var licenseUtil=require(_0xd5b6('0x19'));var db=require(_0xd5b6('0x1a'))['db'];function respondWithStatusCode(_0x2062d4,_0x48bd88){_0x48bd88=_0x48bd88||0xcc;return function(_0x3c98a0){if(_0x3c98a0){return _0x2062d4['sendStatus'](_0x48bd88);}return _0x2062d4[_0xd5b6('0x1b')](_0x48bd88)[_0xd5b6('0x1c')]();};}function respondWithResult(_0x590050,_0x313ecf){_0x313ecf=_0x313ecf||0xc8;return function(_0x1cc5a5){if(_0x1cc5a5){return _0x590050[_0xd5b6('0x1b')](_0x313ecf)[_0xd5b6('0x1d')](_0x1cc5a5);}};}function respondWithFilteredResult(_0x388be0,_0x3cba0a){return function(_0x411858){if(_0x411858){var _0x3d26a7=typeof _0x3cba0a[_0xd5b6('0x1e')]===_0xd5b6('0x1f')&&typeof _0x3cba0a[_0xd5b6('0x20')]===_0xd5b6('0x1f');var _0x208806=_0x411858[_0xd5b6('0x21')];var _0x117995=_0x3d26a7?0x0:_0x3cba0a[_0xd5b6('0x1e')];var _0x34ffba=_0x3d26a7?_0x411858[_0xd5b6('0x21')]:_0x3cba0a[_0xd5b6('0x1e')]+_0x3cba0a[_0xd5b6('0x20')];var _0x4cf6a6;if(_0x34ffba>=_0x208806){_0x34ffba=_0x208806;_0x4cf6a6=0xc8;}else{_0x4cf6a6=0xce;}_0x388be0[_0xd5b6('0x1b')](_0x4cf6a6);return _0x388be0[_0xd5b6('0x22')]('Content-Range',_0x117995+'-'+_0x34ffba+'/'+_0x208806)[_0xd5b6('0x1d')](_0x411858);}return null;};}function patchUpdates(_0x58a968){return function(_0x22e46d){try{jsonpatch[_0xd5b6('0x23')](_0x22e46d,_0x58a968,!![]);}catch(_0x2cf730){return BPromise['reject'](_0x2cf730);}return _0x22e46d['save']();};}function saveUpdates(_0x9e0789,_0x28506f){return function(_0x244f8b){if(_0x244f8b){return _0x244f8b['update'](_0x9e0789)[_0xd5b6('0x24')](function(_0x396731){return _0x396731;});}return null;};}function removeEntity(_0x736c3c,_0x2345b9){return function(_0x28bbbd){if(_0x28bbbd){return _0x28bbbd[_0xd5b6('0x25')]()[_0xd5b6('0x24')](function(){_0x736c3c[_0xd5b6('0x1b')](0xcc)[_0xd5b6('0x1c')]();});}};}function handleEntityNotFound(_0x3b056f,_0x4fc21e){return function(_0x4493b7){if(!_0x4493b7){_0x3b056f['sendStatus'](0x194);}return _0x4493b7;};}function handleError(_0x3ae297,_0x16140b){_0x16140b=_0x16140b||0x1f4;return function(_0x4c2375){logger[_0xd5b6('0x26')](_0x4c2375[_0xd5b6('0x27')]);if(_0x4c2375[_0xd5b6('0x28')]){delete _0x4c2375[_0xd5b6('0x28')];}_0x3ae297[_0xd5b6('0x1b')](_0x16140b)[_0xd5b6('0x29')](_0x4c2375);};}exports[_0xd5b6('0x2a')]=function(_0x4893a4,_0x38c902){var _0x42c810={},_0x279c2a={},_0x392d28={'count':0x0,'rows':[]};var _0x3250d1=_[_0xd5b6('0x2b')](db['SmsTransferReport'][_0xd5b6('0x2c')],function(_0x6ad960){return{'name':_0x6ad960[_0xd5b6('0x2d')],'type':_0x6ad960[_0xd5b6('0x2e')][_0xd5b6('0x2f')]};});_0x279c2a[_0xd5b6('0x30')]=_[_0xd5b6('0x2b')](_0x3250d1,_0xd5b6('0x28'));_0x279c2a[_0xd5b6('0x31')]=_['keys'](_0x4893a4[_0xd5b6('0x31')]);_0x279c2a['filters']=_[_0xd5b6('0x32')](_0x279c2a[_0xd5b6('0x30')],_0x279c2a['query']);_0x42c810[_0xd5b6('0x33')]=_[_0xd5b6('0x32')](_0x279c2a[_0xd5b6('0x30')],qs[_0xd5b6('0x34')](_0x4893a4[_0xd5b6('0x31')][_0xd5b6('0x34')]));_0x42c810[_0xd5b6('0x33')]=_0x42c810[_0xd5b6('0x33')][_0xd5b6('0x35')]?_0x42c810[_0xd5b6('0x33')]:_0x279c2a[_0xd5b6('0x30')];if(!_0x4893a4['query'][_0xd5b6('0x36')]('nolimit')){_0x42c810[_0xd5b6('0x20')]=qs[_0xd5b6('0x20')](_0x4893a4[_0xd5b6('0x31')][_0xd5b6('0x20')]);_0x42c810[_0xd5b6('0x1e')]=qs[_0xd5b6('0x1e')](_0x4893a4[_0xd5b6('0x31')][_0xd5b6('0x1e')]);}_0x42c810[_0xd5b6('0x37')]=qs[_0xd5b6('0x38')](_0x4893a4[_0xd5b6('0x31')][_0xd5b6('0x38')]);_0x42c810['where']=qs[_0xd5b6('0x39')](_[_0xd5b6('0x3a')](_0x4893a4[_0xd5b6('0x31')],_0x279c2a[_0xd5b6('0x39')]),_0x3250d1);if(_0x4893a4[_0xd5b6('0x31')][_0xd5b6('0x3b')]){_0x42c810[_0xd5b6('0x3c')]=_[_0xd5b6('0x3d')](_0x42c810[_0xd5b6('0x3c')],{'$or':_[_0xd5b6('0x2b')](_0x3250d1,function(_0x31b5e3){if(_0x31b5e3['type']!==_0xd5b6('0x3e')){var _0x83eebf={};_0x83eebf[_0x31b5e3[_0xd5b6('0x28')]]={'$like':'%'+_0x4893a4[_0xd5b6('0x31')][_0xd5b6('0x3b')]+'%'};return _0x83eebf;}})});}_0x42c810=_[_0xd5b6('0x3d')]({},_0x42c810,_0x4893a4[_0xd5b6('0x3f')]);var _0x21956b={'where':_0x42c810['where']};return db[_0xd5b6('0x40')][_0xd5b6('0x21')](_0x21956b)['then'](function(_0x3cec51){_0x392d28[_0xd5b6('0x21')]=_0x3cec51;if(_0x4893a4[_0xd5b6('0x31')][_0xd5b6('0x41')]){_0x42c810['include']=[{'all':!![]}];}return db['SmsTransferReport'][_0xd5b6('0x42')](_0x42c810);})[_0xd5b6('0x24')](function(_0x5c3027){_0x392d28[_0xd5b6('0x43')]=_0x5c3027;return _0x392d28;})[_0xd5b6('0x24')](respondWithFilteredResult(_0x38c902,_0x42c810))['catch'](handleError(_0x38c902,null));};exports[_0xd5b6('0x44')]=function(_0x46b0cb,_0x1bc943){var _0x100ef4={'raw':!![],'where':{'id':_0x46b0cb[_0xd5b6('0x45')]['id']}},_0x4cbd26={};_0x4cbd26[_0xd5b6('0x30')]=_[_0xd5b6('0x46')](db[_0xd5b6('0x40')][_0xd5b6('0x2c')]);_0x4cbd26[_0xd5b6('0x31')]=_[_0xd5b6('0x46')](_0x46b0cb[_0xd5b6('0x31')]);_0x4cbd26['filters']=_[_0xd5b6('0x32')](_0x4cbd26[_0xd5b6('0x30')],_0x4cbd26[_0xd5b6('0x31')]);_0x100ef4[_0xd5b6('0x33')]=_[_0xd5b6('0x32')](_0x4cbd26[_0xd5b6('0x30')],qs[_0xd5b6('0x34')](_0x46b0cb['query']['fields']));_0x100ef4['attributes']=_0x100ef4[_0xd5b6('0x33')][_0xd5b6('0x35')]?_0x100ef4[_0xd5b6('0x33')]:_0x4cbd26[_0xd5b6('0x30')];if(_0x46b0cb[_0xd5b6('0x31')][_0xd5b6('0x41')]){_0x100ef4[_0xd5b6('0x47')]=[{'all':!![]}];}_0x100ef4=_[_0xd5b6('0x3d')]({},_0x100ef4,_0x46b0cb['options']);return db[_0xd5b6('0x40')][_0xd5b6('0x48')](_0x100ef4)[_0xd5b6('0x24')](handleEntityNotFound(_0x1bc943,null))[_0xd5b6('0x24')](respondWithResult(_0x1bc943,null))[_0xd5b6('0x49')](handleError(_0x1bc943,null));};exports[_0xd5b6('0x4a')]=function(_0x472888,_0x58ae6d){return db['SmsTransferReport']['create'](_0x472888['body'],{})[_0xd5b6('0x24')](respondWithResult(_0x58ae6d,0xc9))[_0xd5b6('0x49')](handleError(_0x58ae6d,null));};exports[_0xd5b6('0x4b')]=function(_0x2964d4,_0x41a7f9){if(_0x2964d4[_0xd5b6('0x4c')]['id']){delete _0x2964d4[_0xd5b6('0x4c')]['id'];}return db[_0xd5b6('0x40')][_0xd5b6('0x48')]({'where':{'id':_0x2964d4[_0xd5b6('0x45')]['id']}})[_0xd5b6('0x24')](handleEntityNotFound(_0x41a7f9,null))[_0xd5b6('0x24')](saveUpdates(_0x2964d4[_0xd5b6('0x4c')],null))[_0xd5b6('0x24')](respondWithResult(_0x41a7f9,null))[_0xd5b6('0x49')](handleError(_0x41a7f9,null));};exports[_0xd5b6('0x25')]=function(_0x2891c1,_0x30ad18){return db[_0xd5b6('0x40')][_0xd5b6('0x48')]({'where':{'id':_0x2891c1[_0xd5b6('0x45')]['id']}})['then'](handleEntityNotFound(_0x30ad18,null))[_0xd5b6('0x24')](removeEntity(_0x30ad18,null))[_0xd5b6('0x49')](handleError(_0x30ad18,null));};exports[_0xd5b6('0x4d')]=function(_0x17ec42,_0xb57ddb){return db['SmsTransferReport'][_0xd5b6('0x4d')]()['then'](respondWithResult(_0xb57ddb,null))[_0xd5b6('0x49')](handleError(_0xb57ddb,null));};
\ No newline at end of file
index 0d9562e..4a39c24 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaa65=['lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','define','SmsTransferReport','uniqueid'];(function(_0x5cc7d0,_0x2cc3da){var _0x1bc4b3=function(_0x3ad2a9){while(--_0x3ad2a9){_0x5cc7d0['push'](_0x5cc7d0['shift']());}};_0x1bc4b3(++_0x2cc3da);}(_0xaa65,0x90));var _0x5aa6=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xaa65[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0x5aa6('0x0'));var util=require(_0x5aa6('0x1'));var logger=require(_0x5aa6('0x2'))(_0x5aa6('0x3'));var moment=require('moment');var BPromise=require(_0x5aa6('0x4'));var rp=require(_0x5aa6('0x5'));var fs=require('fs');var path=require(_0x5aa6('0x6'));var rimraf=require(_0x5aa6('0x7'));var config=require(_0x5aa6('0x8'));var attributes=require('./smsTransferReport.attributes');module['exports']=function(_0x2cad25,_0x3161f3){return _0x2cad25[_0x5aa6('0x9')](_0x5aa6('0xa'),attributes,{'tableName':'report_sms_transfer','paranoid':![],'indexes':[{'name':_0x5aa6('0xb'),'fields':[_0x5aa6('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x4fd7=['util','../../config/logger','api','request-promise','path','../../config/environment','exports','define','report_sms_transfer','uniqueid','lodash'];(function(_0x2bd35e,_0xc6c574){var _0x2af201=function(_0x28c2ff){while(--_0x28c2ff){_0x2bd35e['push'](_0x2bd35e['shift']());}};_0x2af201(++_0xc6c574);}(_0x4fd7,0xe6));var _0x74fd=function(_0x2e9c79,_0x2d6aef){_0x2e9c79=_0x2e9c79-0x0;var _0x16797a=_0x4fd7[_0x2e9c79];return _0x16797a;};'use strict';var _=require(_0x74fd('0x0'));var util=require(_0x74fd('0x1'));var logger=require(_0x74fd('0x2'))(_0x74fd('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x74fd('0x4'));var fs=require('fs');var path=require(_0x74fd('0x5'));var rimraf=require('rimraf');var config=require(_0x74fd('0x6'));var attributes=require('./smsTransferReport.attributes');module[_0x74fd('0x7')]=function(_0x480ec2,_0x1959e1){return _0x480ec2[_0x74fd('0x8')]('SmsTransferReport',attributes,{'tableName':_0x74fd('0x9'),'paranoid':![],'indexes':[{'name':_0x74fd('0xa'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
index 8d16454..f796d2e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe015=['stringify','error','code','message','info','result','catch','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','SmsTransferReport,\x20%s,\x20%s','debug','request\x20sent'];(function(_0x532bc6,_0x130bb6){var _0x5c2cdf=function(_0x531270){while(--_0x531270){_0x532bc6['push'](_0x532bc6['shift']());}};_0x5c2cdf(++_0x130bb6);}(_0xe015,0x13b));var _0x5e01=function(_0x2be8c2,_0x14a4b5){_0x2be8c2=_0x2be8c2-0x0;var _0x97f531=_0xe015[_0x2be8c2];return _0x97f531;};'use strict';var _=require(_0x5e01('0x0'));var util=require(_0x5e01('0x1'));var moment=require(_0x5e01('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x5e01('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x5e01('0x4'));var logger=require(_0x5e01('0x5'))(_0x5e01('0x6'));var config=require(_0x5e01('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x5e01('0x8')][_0x5e01('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4de678,_0x48b05c,_0x414f73){return new BPromise(function(_0x3aeaef,_0x1420c2){return client[_0x5e01('0xa')](_0x4de678,_0x414f73)[_0x5e01('0xb')](function(_0x36bd7e){logger['info'](_0x5e01('0xc'),_0x48b05c,'request\x20sent');logger[_0x5e01('0xd')]('SmsTransferReport,\x20%s,\x20%s,\x20%s',_0x48b05c,_0x5e01('0xe'),JSON[_0x5e01('0xf')](_0x36bd7e));if(_0x36bd7e['error']){if(_0x36bd7e[_0x5e01('0x10')][_0x5e01('0x11')]===0x1f4){logger['error']('SmsTransferReport,\x20%s,\x20%s',_0x48b05c,_0x36bd7e[_0x5e01('0x10')][_0x5e01('0x12')]);return _0x1420c2(_0x36bd7e[_0x5e01('0x10')][_0x5e01('0x12')]);}logger[_0x5e01('0x10')](_0x5e01('0xc'),_0x48b05c,_0x36bd7e['error'][_0x5e01('0x12')]);return _0x3aeaef(_0x36bd7e['error']['message']);}else{logger[_0x5e01('0x13')](_0x5e01('0xc'),_0x48b05c,'request\x20sent');_0x3aeaef(_0x36bd7e[_0x5e01('0x14')]['message']);}})[_0x5e01('0x15')](function(_0x5e4058){logger[_0x5e01('0x10')]('SmsTransferReport,\x20%s,\x20%s',_0x48b05c,_0x5e4058);_0x1420c2(_0x5e4058);});});}
\ No newline at end of file
+var _0x7266=['request\x20sent','stringify','error','message','result','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','jayson/promise','client','http','request','then','info','SmsTransferReport,\x20%s,\x20%s','debug','SmsTransferReport,\x20%s,\x20%s,\x20%s'];(function(_0x18f5b0,_0x2fe6e7){var _0x2ceb90=function(_0x4e554c){while(--_0x4e554c){_0x18f5b0['push'](_0x18f5b0['shift']());}};_0x2ceb90(++_0x2fe6e7);}(_0x7266,0xec));var _0x6726=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0x7266[_0x4cf98e];return _0x1623ac;};'use strict';var _=require(_0x6726('0x0'));var util=require(_0x6726('0x1'));var moment=require(_0x6726('0x2'));var BPromise=require(_0x6726('0x3'));var rs=require(_0x6726('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x6726('0x5'));var logger=require(_0x6726('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x6726('0x7'));var client=jayson[_0x6726('0x8')][_0x6726('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x180502,_0x217972,_0x3c8020){return new BPromise(function(_0x126ba7,_0x3d9f0f){return client[_0x6726('0xa')](_0x180502,_0x3c8020)[_0x6726('0xb')](function(_0x9f993){logger[_0x6726('0xc')](_0x6726('0xd'),_0x217972,'request\x20sent');logger[_0x6726('0xe')](_0x6726('0xf'),_0x217972,_0x6726('0x10'),JSON[_0x6726('0x11')](_0x9f993));if(_0x9f993['error']){if(_0x9f993[_0x6726('0x12')]['code']===0x1f4){logger[_0x6726('0x12')](_0x6726('0xd'),_0x217972,_0x9f993['error'][_0x6726('0x13')]);return _0x3d9f0f(_0x9f993[_0x6726('0x12')][_0x6726('0x13')]);}logger[_0x6726('0x12')]('SmsTransferReport,\x20%s,\x20%s',_0x217972,_0x9f993[_0x6726('0x12')][_0x6726('0x13')]);return _0x126ba7(_0x9f993['error'][_0x6726('0x13')]);}else{logger['info'](_0x6726('0xd'),_0x217972,_0x6726('0x10'));_0x126ba7(_0x9f993[_0x6726('0x14')][_0x6726('0x13')]);}})['catch'](function(_0x8323b2){logger[_0x6726('0x12')]('SmsTransferReport,\x20%s,\x20%s',_0x217972,_0x8323b2);_0x3d9f0f(_0x8323b2);});});}
\ No newline at end of file
index 9f2281f..3d6e9e9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x491d=['now','post','single','update','delete','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./sound.controller','get','index','/:id','show','isAuthenticated','download','join','root','server/files/sounds/original/','originalname','%s-%s%s','extname'];(function(_0x4636b5,_0x626e56){var _0x27a912=function(_0x1bd07d){while(--_0x1bd07d){_0x4636b5['push'](_0x4636b5['shift']());}};_0x27a912(++_0x626e56);}(_0x491d,0xe6));var _0xd491=function(_0x220ca2,_0x424fae){_0x220ca2=_0x220ca2-0x0;var _0x1ce38c=_0x491d[_0x220ca2];return _0x1ce38c;};'use strict';var multer=require(_0xd491('0x0'));var util=require(_0xd491('0x1'));var path=require(_0xd491('0x2'));var timeout=require(_0xd491('0x3'));var express=require(_0xd491('0x4'));var router=express['Router']();var fs_extra=require(_0xd491('0x5'));var auth=require(_0xd491('0x6'));var interaction=require(_0xd491('0x7'));var config=require(_0xd491('0x8'));var controller=require(_0xd491('0x9'));router[_0xd491('0xa')]('/',auth['isAuthenticated'](),controller[_0xd491('0xb')]);router['get'](_0xd491('0xc'),auth['isAuthenticated'](),controller[_0xd491('0xd')]);router['get']('/:id/download',auth[_0xd491('0xe')](),controller[_0xd491('0xf')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x3e3b17,_0x5f177d,_0x497003){_0x497003(null,path[_0xd491('0x10')](config[_0xd491('0x11')],_0xd491('0x12')));},'filename':function(_0x44554d,_0x50fce2,_0x579c67){_0x50fce2[_0xd491('0x13')]=_0x50fce2[_0xd491('0x13')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x579c67(null,util['format'](_0xd491('0x14'),path['basename'](_0x50fce2[_0xd491('0x13')],path[_0xd491('0x15')](_0x50fce2[_0xd491('0x13')])),Date[_0xd491('0x16')](),path[_0xd491('0x15')](_0x50fce2['originalname'])));}})});router[_0xd491('0x17')]('/',upload[_0xd491('0x18')]('file'),controller['create']);router['put'](_0xd491('0xc'),auth['isAuthenticated'](),controller[_0xd491('0x19')]);router[_0xd491('0x1a')](_0xd491('0xc'),auth[_0xd491('0xe')](),controller[_0xd491('0x1a')]);module[_0xd491('0x1b')]=router;
\ No newline at end of file
+var _0xd1b8=['basename','extname','now','post','file','create','update','delete','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./sound.controller','get','index','/:id','isAuthenticated','/:id/download','download','join','originalname','replace','format','%s-%s%s'];(function(_0x530bef,_0x1f4cb6){var _0x8fd7e5=function(_0x201e8a){while(--_0x201e8a){_0x530bef['push'](_0x530bef['shift']());}};_0x8fd7e5(++_0x1f4cb6);}(_0xd1b8,0x117));var _0x8d1b=function(_0x279368,_0x41c002){_0x279368=_0x279368-0x0;var _0x40b6d0=_0xd1b8[_0x279368];return _0x40b6d0;};'use strict';var multer=require(_0x8d1b('0x0'));var util=require(_0x8d1b('0x1'));var path=require(_0x8d1b('0x2'));var timeout=require(_0x8d1b('0x3'));var express=require(_0x8d1b('0x4'));var router=express[_0x8d1b('0x5')]();var fs_extra=require(_0x8d1b('0x6'));var auth=require(_0x8d1b('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0x8d1b('0x8'));var controller=require(_0x8d1b('0x9'));router[_0x8d1b('0xa')]('/',auth['isAuthenticated'](),controller[_0x8d1b('0xb')]);router[_0x8d1b('0xa')](_0x8d1b('0xc'),auth[_0x8d1b('0xd')](),controller['show']);router[_0x8d1b('0xa')](_0x8d1b('0xe'),auth[_0x8d1b('0xd')](),controller[_0x8d1b('0xf')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x1057ed,_0x59358e,_0x5119ba){_0x5119ba(null,path[_0x8d1b('0x10')](config['root'],'server/files/sounds/original/'));},'filename':function(_0x490d20,_0xf71785,_0x3e7c5e){_0xf71785['originalname']=_0xf71785[_0x8d1b('0x11')][_0x8d1b('0x12')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x3e7c5e(null,util[_0x8d1b('0x13')](_0x8d1b('0x14'),path[_0x8d1b('0x15')](_0xf71785[_0x8d1b('0x11')],path[_0x8d1b('0x16')](_0xf71785[_0x8d1b('0x11')])),Date[_0x8d1b('0x17')](),path[_0x8d1b('0x16')](_0xf71785[_0x8d1b('0x11')])));}})});router[_0x8d1b('0x18')]('/',upload['single'](_0x8d1b('0x19')),controller[_0x8d1b('0x1a')]);router['put'](_0x8d1b('0xc'),auth[_0x8d1b('0xd')](),controller[_0x8d1b('0x1b')]);router[_0x8d1b('0x1c')](_0x8d1b('0xc'),auth[_0x8d1b('0xd')](),controller['delete']);module[_0x8d1b('0x1d')]=router;
\ No newline at end of file
index 32d4aed..5fe71fd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1629=['FLOAT','BIGINT','INTEGER','sequelize','exports','STRING','name'];(function(_0x4fe496,_0x1d8673){var _0x422b24=function(_0x27a644){while(--_0x27a644){_0x4fe496['push'](_0x4fe496['shift']());}};_0x422b24(++_0x1d8673);}(_0x1629,0x1d8));var _0x9162=function(_0x471c4d,_0x297910){_0x471c4d=_0x471c4d-0x0;var _0x29c188=_0x1629[_0x471c4d];return _0x29c188;};'use strict';var Sequelize=require(_0x9162('0x0'));module[_0x9162('0x1')]={'name':{'type':Sequelize[_0x9162('0x2')],'unique':_0x9162('0x3'),'allowNull':![]},'save_name':{'type':Sequelize['STRING']},'display_name':{'type':Sequelize[_0x9162('0x2')],'defaultValue':''},'description':{'type':Sequelize['STRING']},'original_format':{'type':Sequelize['STRING']},'original_duration':{'type':Sequelize[_0x9162('0x4')]},'original_sampleCount':{'type':Sequelize[_0x9162('0x5')]},'original_channelCount':{'type':Sequelize['INTEGER']},'original_bitRate':{'type':Sequelize['BIGINT']},'original_sampleRate':{'type':Sequelize[_0x9162('0x6')]},'converted_format':{'type':Sequelize[_0x9162('0x2')]},'converted_duration':{'type':Sequelize[_0x9162('0x4')]},'converted_sampleCount':{'type':Sequelize[_0x9162('0x5')]},'converted_channelCount':{'type':Sequelize[_0x9162('0x6')]},'converted_bitRate':{'type':Sequelize[_0x9162('0x5')]},'converted_sampleRate':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
+var _0x0793=['sequelize','STRING','name','FLOAT','BIGINT','INTEGER'];(function(_0x325260,_0x3fc854){var _0x23253f=function(_0x53018c){while(--_0x53018c){_0x325260['push'](_0x325260['shift']());}};_0x23253f(++_0x3fc854);}(_0x0793,0x1aa));var _0x3079=function(_0x35a3e4,_0x26b109){_0x35a3e4=_0x35a3e4-0x0;var _0x567beb=_0x0793[_0x35a3e4];return _0x567beb;};'use strict';var Sequelize=require(_0x3079('0x0'));module['exports']={'name':{'type':Sequelize[_0x3079('0x1')],'unique':_0x3079('0x2'),'allowNull':![]},'save_name':{'type':Sequelize['STRING']},'display_name':{'type':Sequelize['STRING'],'defaultValue':''},'description':{'type':Sequelize[_0x3079('0x1')]},'original_format':{'type':Sequelize[_0x3079('0x1')]},'original_duration':{'type':Sequelize[_0x3079('0x3')]},'original_sampleCount':{'type':Sequelize[_0x3079('0x4')]},'original_channelCount':{'type':Sequelize['INTEGER']},'original_bitRate':{'type':Sequelize[_0x3079('0x4')]},'original_sampleRate':{'type':Sequelize[_0x3079('0x5')]},'converted_format':{'type':Sequelize[_0x3079('0x1')]},'converted_duration':{'type':Sequelize[_0x3079('0x3')]},'converted_sampleCount':{'type':Sequelize['BIGINT']},'converted_channelCount':{'type':Sequelize['INTEGER']},'converted_bitRate':{'type':Sequelize[_0x3079('0x4')]},'converted_sampleRate':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
index ab0676a..218850b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfa50=['apply','reject','update','then','get','Sounds','UserProfileResource','end','error','stack','index','map','Sound','rawAttributes','key','model','name','keys','intersection','attributes','fields','query','length','hasOwnProperty','nolimit','sort','filters','filter','where','type','VIRTUAL','merge','options','count','includeAll','findAll','rows','catch','download','find','params','existsSync','root','server/files/sounds/converted','save_name','converted_format','Sequelize','ValidationError','Sound\x20not\x20found','join','%s.%s','create','originalname','file','basename','filename','extname','substring','wav','server/files/sounds/original','Sound\x20upload\x20filepath:\x20%s','info','0777','transcode','unlinkSync','send','src','original_duration','duration','sampleCount','original_channelCount','channelCount','bitRate','sampleRate','converted_sampleCount','converted_channelCount','converted_bitRate','body','role','userProfileId','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','start','pick','description','original_format','format','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','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','../../mysqldb','sendStatus','status','json','undefined','limit','offset','set','Content-Range'];(function(_0x582d9c,_0x28e6ab){var _0x3baea6=function(_0x1ff1da){while(--_0x1ff1da){_0x582d9c['push'](_0x582d9c['shift']());}};_0x3baea6(++_0x28e6ab);}(_0xfa50,0x152));var _0x0fa5=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xfa50[_0x321bb2];return _0x9c12ed;};'use strict';var emlformat=require(_0x0fa5('0x0'));var rimraf=require(_0x0fa5('0x1'));var zipdir=require(_0x0fa5('0x2'));var jsonpatch=require(_0x0fa5('0x3'));var rp=require(_0x0fa5('0x4'));var moment=require(_0x0fa5('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x0fa5('0x6'));var util=require(_0x0fa5('0x7'));var path=require(_0x0fa5('0x8'));var sox=require(_0x0fa5('0x9'));var csv=require(_0x0fa5('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x0fa5('0xb'));var squel=require(_0x0fa5('0xc'));var crypto=require(_0x0fa5('0xd'));var jsforce=require(_0x0fa5('0xe'));var deskjs=require(_0x0fa5('0xf'));var toCsv=require(_0x0fa5('0xa'));var querystring=require('querystring');var Papa=require(_0x0fa5('0x10'));var Redis=require(_0x0fa5('0x11'));var authService=require(_0x0fa5('0x12'));var qs=require(_0x0fa5('0x13'));var as=require(_0x0fa5('0x14'));var hardwareService=require(_0x0fa5('0x15'));var logger=require(_0x0fa5('0x16'))('api');var utils=require(_0x0fa5('0x17'));var config=require(_0x0fa5('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0x0fa5('0x19'))['db'];function respondWithStatusCode(_0x3c6928,_0x22e561){_0x22e561=_0x22e561||0xcc;return function(_0xd3d0ae){if(_0xd3d0ae){return _0x3c6928[_0x0fa5('0x1a')](_0x22e561);}return _0x3c6928[_0x0fa5('0x1b')](_0x22e561)['end']();};}function respondWithResult(_0xc61427,_0x125fbf){_0x125fbf=_0x125fbf||0xc8;return function(_0x38a6ba){if(_0x38a6ba){return _0xc61427[_0x0fa5('0x1b')](_0x125fbf)[_0x0fa5('0x1c')](_0x38a6ba);}};}function respondWithFilteredResult(_0x228a59,_0x1b0afa){return function(_0x1c5873){if(_0x1c5873){var _0x351c65=typeof _0x1b0afa['offset']===_0x0fa5('0x1d')&&typeof _0x1b0afa[_0x0fa5('0x1e')]===_0x0fa5('0x1d');var _0x1c0932=_0x1c5873['count'];var _0x8c792=_0x351c65?0x0:_0x1b0afa[_0x0fa5('0x1f')];var _0x53f295=_0x351c65?_0x1c5873['count']:_0x1b0afa[_0x0fa5('0x1f')]+_0x1b0afa[_0x0fa5('0x1e')];var _0x5d4864;if(_0x53f295>=_0x1c0932){_0x53f295=_0x1c0932;_0x5d4864=0xc8;}else{_0x5d4864=0xce;}_0x228a59[_0x0fa5('0x1b')](_0x5d4864);return _0x228a59[_0x0fa5('0x20')](_0x0fa5('0x21'),_0x8c792+'-'+_0x53f295+'/'+_0x1c0932)[_0x0fa5('0x1c')](_0x1c5873);}return null;};}function patchUpdates(_0x39a9aa){return function(_0x449b5c){try{jsonpatch[_0x0fa5('0x22')](_0x449b5c,_0x39a9aa,!![]);}catch(_0x418cfc){return BPromise[_0x0fa5('0x23')](_0x418cfc);}return _0x449b5c['save']();};}function saveUpdates(_0x5a3137,_0x16f795){return function(_0x10b14c){if(_0x10b14c){return _0x10b14c[_0x0fa5('0x24')](_0x5a3137)[_0x0fa5('0x25')](function(_0xed0e84){return _0xed0e84;});}return null;};}function removeEntity(_0x18c313,_0x5f3649){return function(_0x1b075c){if(_0x1b075c){return _0x1b075c['destroy']()[_0x0fa5('0x25')](function(){var _0x878258=_0x1b075c[_0x0fa5('0x26')]({'plain':!![]});var _0x1c8768=_0x0fa5('0x27');return db[_0x0fa5('0x28')]['destroy']({'where':{'type':_0x1c8768,'resourceId':_0x878258['id']}})[_0x0fa5('0x25')](function(){return _0x1b075c;});})[_0x0fa5('0x25')](function(){_0x18c313[_0x0fa5('0x1b')](0xcc)[_0x0fa5('0x29')]();});}};}function handleEntityNotFound(_0x2df6e7,_0x5e7383){return function(_0x570062){if(!_0x570062){_0x2df6e7[_0x0fa5('0x1a')](0x194);}return _0x570062;};}function handleError(_0x2d1447,_0x160680){_0x160680=_0x160680||0x1f4;return function(_0x4899f2){logger[_0x0fa5('0x2a')](_0x4899f2[_0x0fa5('0x2b')]);if(_0x4899f2['name']){delete _0x4899f2['name'];}_0x2d1447[_0x0fa5('0x1b')](_0x160680)['send'](_0x4899f2);};}exports[_0x0fa5('0x2c')]=function(_0x550a97,_0x12c372){var _0x2c353f={},_0x1d3ad4={},_0x3406bf={'count':0x0,'rows':[]};var _0x30dec6=_[_0x0fa5('0x2d')](db[_0x0fa5('0x2e')][_0x0fa5('0x2f')],function(_0x1ff8ec){return{'name':_0x1ff8ec['fieldName'],'type':_0x1ff8ec['type'][_0x0fa5('0x30')]};});_0x1d3ad4[_0x0fa5('0x31')]=_[_0x0fa5('0x2d')](_0x30dec6,_0x0fa5('0x32'));_0x1d3ad4['query']=_[_0x0fa5('0x33')](_0x550a97['query']);_0x1d3ad4['filters']=_[_0x0fa5('0x34')](_0x1d3ad4[_0x0fa5('0x31')],_0x1d3ad4['query']);_0x2c353f[_0x0fa5('0x35')]=_['intersection'](_0x1d3ad4[_0x0fa5('0x31')],qs[_0x0fa5('0x36')](_0x550a97[_0x0fa5('0x37')][_0x0fa5('0x36')]));_0x2c353f[_0x0fa5('0x35')]=_0x2c353f[_0x0fa5('0x35')][_0x0fa5('0x38')]?_0x2c353f[_0x0fa5('0x35')]:_0x1d3ad4[_0x0fa5('0x31')];if(!_0x550a97[_0x0fa5('0x37')][_0x0fa5('0x39')](_0x0fa5('0x3a'))){_0x2c353f[_0x0fa5('0x1e')]=qs[_0x0fa5('0x1e')](_0x550a97['query'][_0x0fa5('0x1e')]);_0x2c353f[_0x0fa5('0x1f')]=qs[_0x0fa5('0x1f')](_0x550a97[_0x0fa5('0x37')][_0x0fa5('0x1f')]);}_0x2c353f['order']=qs[_0x0fa5('0x3b')](_0x550a97[_0x0fa5('0x37')][_0x0fa5('0x3b')]);_0x2c353f['where']=qs[_0x0fa5('0x3c')](_['pick'](_0x550a97['query'],_0x1d3ad4[_0x0fa5('0x3c')]),_0x30dec6);if(_0x550a97[_0x0fa5('0x37')][_0x0fa5('0x3d')]){_0x2c353f[_0x0fa5('0x3e')]=_['merge'](_0x2c353f[_0x0fa5('0x3e')],{'$or':_['map'](_0x30dec6,function(_0x50cea8){if(_0x50cea8[_0x0fa5('0x3f')]!==_0x0fa5('0x40')){var _0x3561be={};_0x3561be[_0x50cea8[_0x0fa5('0x32')]]={'$like':'%'+_0x550a97[_0x0fa5('0x37')][_0x0fa5('0x3d')]+'%'};return _0x3561be;}})});}_0x2c353f=_[_0x0fa5('0x41')]({},_0x2c353f,_0x550a97[_0x0fa5('0x42')]);var _0x21e6f6={'where':_0x2c353f[_0x0fa5('0x3e')]};return db[_0x0fa5('0x2e')][_0x0fa5('0x43')](_0x21e6f6)['then'](function(_0x59690e){_0x3406bf[_0x0fa5('0x43')]=_0x59690e;if(_0x550a97[_0x0fa5('0x37')][_0x0fa5('0x44')]){_0x2c353f['include']=[{'all':!![]}];}return db[_0x0fa5('0x2e')][_0x0fa5('0x45')](_0x2c353f);})[_0x0fa5('0x25')](function(_0xb02217){_0x3406bf[_0x0fa5('0x46')]=_0xb02217;return _0x3406bf;})[_0x0fa5('0x25')](respondWithFilteredResult(_0x12c372,_0x2c353f))[_0x0fa5('0x47')](handleError(_0x12c372,null));};exports['show']=function(_0x366287,_0x1a0416){var _0x3b79e5={'raw':!![],'where':{'id':_0x366287['params']['id']}},_0x37c7c7={};_0x37c7c7[_0x0fa5('0x31')]=_[_0x0fa5('0x33')](db['Sound'][_0x0fa5('0x2f')]);_0x37c7c7[_0x0fa5('0x37')]=_[_0x0fa5('0x33')](_0x366287[_0x0fa5('0x37')]);_0x37c7c7[_0x0fa5('0x3c')]=_['intersection'](_0x37c7c7[_0x0fa5('0x31')],_0x37c7c7['query']);_0x3b79e5[_0x0fa5('0x35')]=_[_0x0fa5('0x34')](_0x37c7c7[_0x0fa5('0x31')],qs[_0x0fa5('0x36')](_0x366287[_0x0fa5('0x37')]['fields']));_0x3b79e5[_0x0fa5('0x35')]=_0x3b79e5['attributes'][_0x0fa5('0x38')]?_0x3b79e5['attributes']:_0x37c7c7[_0x0fa5('0x31')];if(_0x366287[_0x0fa5('0x37')][_0x0fa5('0x44')]){_0x3b79e5['include']=[{'all':!![]}];}_0x3b79e5=_['merge']({},_0x3b79e5,_0x366287[_0x0fa5('0x42')]);return db[_0x0fa5('0x2e')]['find'](_0x3b79e5)[_0x0fa5('0x25')](handleEntityNotFound(_0x1a0416,null))[_0x0fa5('0x25')](respondWithResult(_0x1a0416,null))[_0x0fa5('0x47')](handleError(_0x1a0416,null));};exports[_0x0fa5('0x48')]=function(_0x42596e,_0x105f87,_0xf14259){return db[_0x0fa5('0x2e')][_0x0fa5('0x49')]({'where':{'id':_0x42596e[_0x0fa5('0x4a')]['id']},'attributes':[_0x0fa5('0x32'),'save_name','converted_format'],'raw':!![]})[_0x0fa5('0x25')](handleEntityNotFound(_0x105f87,null))[_0x0fa5('0x25')](function(_0x4f9f86){if(_0x4f9f86){if(!fs[_0x0fa5('0x4b')](path['join'](config[_0x0fa5('0x4c')],_0x0fa5('0x4d'),_0x4f9f86[_0x0fa5('0x4e')]+'.'+_0x4f9f86[_0x0fa5('0x4f')]))){throw new db[(_0x0fa5('0x50'))][(_0x0fa5('0x51'))](_0x0fa5('0x52'));}return _0x105f87[_0x0fa5('0x48')](path[_0x0fa5('0x53')](config['root'],_0x0fa5('0x4d'),util['format'](_0x0fa5('0x54'),_0x4f9f86[_0x0fa5('0x4e')],_0x4f9f86[_0x0fa5('0x4f')])),util['format'](_0x0fa5('0x54'),_0x4f9f86[_0x0fa5('0x32')],_0x4f9f86[_0x0fa5('0x4f')]));}return null;})[_0x0fa5('0x47')](handleError(_0x105f87,null));};exports[_0x0fa5('0x55')]=function(_0x1b97ed,_0x54b73c,_0x1e6e9a){var _0x46eb89={'name':path['basename'](_0x1b97ed['file'][_0x0fa5('0x56')],path['extname'](_0x1b97ed[_0x0fa5('0x57')][_0x0fa5('0x56')])),'save_name':path[_0x0fa5('0x58')](_0x1b97ed[_0x0fa5('0x57')][_0x0fa5('0x59')],path['extname'](_0x1b97ed[_0x0fa5('0x57')][_0x0fa5('0x59')])),'original_format':path[_0x0fa5('0x5a')](_0x1b97ed[_0x0fa5('0x57')][_0x0fa5('0x56')])[_0x0fa5('0x5b')](0x1),'converted_format':_0x0fa5('0x5c')};var _0x4a053d=path[_0x0fa5('0x53')](config[_0x0fa5('0x4c')],_0x0fa5('0x5d'),_0x1b97ed['file'][_0x0fa5('0x59')]);var _0x5e1f9f=path['join'](config[_0x0fa5('0x4c')],_0x0fa5('0x4d'),util['format'](_0x0fa5('0x54'),path['basename'](_0x1b97ed[_0x0fa5('0x57')][_0x0fa5('0x59')],path[_0x0fa5('0x5a')](_0x1b97ed['file'][_0x0fa5('0x59')])),_0x46eb89[_0x0fa5('0x4f')]));logger['info'](_0x0fa5('0x5e'),_0x4a053d);logger[_0x0fa5('0x5f')]('Sound\x20upload\x20destination:\x20%s',_0x5e1f9f);try{fs['chmodSync'](_0x4a053d,parseInt(_0x0fa5('0x60'),0x8));var _0x514eea=sox[_0x0fa5('0x61')](_0x4a053d,_0x5e1f9f,{'sampleRate':0x1f40,'format':'wav','channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x514eea['on']('error',function(_0x32f056){fs[_0x0fa5('0x62')](_0x4a053d);_0x54b73c[_0x0fa5('0x1b')](0x1f4)[_0x0fa5('0x63')](_0x32f056);});_0x514eea['on'](_0x0fa5('0x64'),function(_0x38cc5f){_0x46eb89[_0x0fa5('0x65')]=isNaN(_0x38cc5f[_0x0fa5('0x66')])?null:_0x38cc5f[_0x0fa5('0x66')]*0x3e8;_0x46eb89['original_sampleCount']=isNaN(_0x38cc5f[_0x0fa5('0x67')])?null:_0x38cc5f['sampleCount'];_0x46eb89[_0x0fa5('0x68')]=isNaN(_0x38cc5f[_0x0fa5('0x69')])?null:_0x38cc5f['channelCount'];_0x46eb89['original_bitRate']=isNaN(_0x38cc5f[_0x0fa5('0x6a')])?null:_0x38cc5f['bitRate'];_0x46eb89['original_sampleRate']=isNaN(_0x38cc5f[_0x0fa5('0x6b')])?null:_0x38cc5f['sampleRate'];});_0x514eea['on']('dest',function(_0x2ef087){_0x46eb89['converted_duration']=isNaN(_0x2ef087[_0x0fa5('0x66')])?null:_0x2ef087['duration']*0x3e8;_0x46eb89[_0x0fa5('0x6c')]=isNaN(_0x2ef087[_0x0fa5('0x67')])?null:_0x2ef087[_0x0fa5('0x67')];_0x46eb89[_0x0fa5('0x6d')]=isNaN(_0x2ef087[_0x0fa5('0x69')])?null:_0x2ef087[_0x0fa5('0x69')];_0x46eb89[_0x0fa5('0x6e')]=isNaN(_0x2ef087[_0x0fa5('0x6a')])?null:_0x2ef087[_0x0fa5('0x6a')];_0x46eb89['converted_sampleRate']=isNaN(_0x2ef087['sampleRate'])?null:_0x2ef087['sampleRate'];});_0x514eea['on'](_0x0fa5('0x29'),function(){fs['chmodSync'](_0x5e1f9f,parseInt(_0x0fa5('0x60'),0x8));return db['Sound']['create'](_0x46eb89)[_0x0fa5('0x25')](function(_0x2ee8d7){var _0x4288dc={'role':_0x1b97ed[_0x0fa5('0x6f')][_0x0fa5('0x70')],'userProfileId':_0x1b97ed['body'][_0x0fa5('0x71')]};if(!_0x4288dc)throw new Error(_0x0fa5('0x72'));if(_0x4288dc['role']===_0x0fa5('0x73')){var _0x35630f=_0x2ee8d7['get']({'plain':!![]});return db[_0x0fa5('0x74')]['find']({'where':{'name':'Sounds','userProfileId':_0x4288dc[_0x0fa5('0x71')]},'raw':!![]})[_0x0fa5('0x25')](function(_0x3958e3){if(_0x3958e3&&_0x3958e3[_0x0fa5('0x75')]===0x0){return db['UserProfileResource'][_0x0fa5('0x55')]({'name':_0x35630f[_0x0fa5('0x32')],'resourceId':_0x35630f['id'],'type':_0x3958e3['name'],'sectionId':_0x3958e3['id']},{})[_0x0fa5('0x25')](function(){return _0x2ee8d7;});}else{return _0x2ee8d7;}})['catch'](function(_0x47521e){logger[_0x0fa5('0x2a')](_0x0fa5('0x76'),_0x47521e);throw _0x47521e;});}return _0x2ee8d7;})[_0x0fa5('0x25')](respondWithResult(_0x54b73c,null))['catch'](handleError(_0x54b73c,null));});_0x514eea[_0x0fa5('0x77')]();}catch(_0x159480){_0x54b73c[_0x0fa5('0x1b')](0x1f4)[_0x0fa5('0x63')](_0x159480);}};exports['update']=function(_0x4ebb9b,_0x4e7d1a,_0x355bc1){return db[_0x0fa5('0x2e')]['find']({'where':{'id':_0x4ebb9b['params']['id']}})['then'](handleEntityNotFound(_0x4e7d1a,null))[_0x0fa5('0x25')](saveUpdates(_[_0x0fa5('0x78')](_0x4ebb9b[_0x0fa5('0x6f')],[_0x0fa5('0x32'),_0x0fa5('0x79')]),null))[_0x0fa5('0x25')](respondWithResult(_0x4e7d1a,null))[_0x0fa5('0x47')](handleError(_0x4e7d1a,null));};exports['delete']=function(_0x31fb9d,_0x872ba6,_0xbfc764){return db['Sound']['find']({'where':{'id':_0x31fb9d['params']['id']}})[_0x0fa5('0x25')](function(_0x5b4ae1){if(_0x5b4ae1){return _0x5b4ae1['destroy']();}})[_0x0fa5('0x25')](function(_0x27444f){var _0x3a29b5=path[_0x0fa5('0x53')](config[_0x0fa5('0x4c')],_0x0fa5('0x5d'),util['format'](_0x0fa5('0x54'),_0x27444f[_0x0fa5('0x4e')],_0x27444f[_0x0fa5('0x7a')]));var _0x16bf83=path[_0x0fa5('0x53')](config[_0x0fa5('0x4c')],_0x0fa5('0x4d'),util[_0x0fa5('0x7b')](_0x0fa5('0x54'),_0x27444f[_0x0fa5('0x4e')],_0x27444f[_0x0fa5('0x4f')]));fs['unlinkSync'](_0x3a29b5);fs[_0x0fa5('0x62')](_0x16bf83);return _0x27444f;})[_0x0fa5('0x25')](function(_0x579b7e){if(_0x579b7e){return _0x872ba6[_0x0fa5('0x1b')](0xcc)[_0x0fa5('0x29')]();}})[_0x0fa5('0x25')](handleEntityNotFound(_0x872ba6,null))[_0x0fa5('0x47')](handleError(_0x872ba6,null));};
\ No newline at end of file
+var _0xccee=['sampleRate','dest','converted_duration','converted_channelCount','converted_bitRate','bitRate','converted_sampleRate','body','role','userProfileId','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','start','description','delete','original_format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','desk.js','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','end','json','undefined','limit','count','offset','status','set','Content-Range','apply','reject','save','update','then','destroy','get','UserProfileResource','sendStatus','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','query','keys','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','Sound','includeAll','include','findAll','rows','catch','show','params','length','find','download','save_name','existsSync','join','root','server/files/sounds/converted','converted_format','Sequelize','ValidationError','Sound\x20not\x20found','format','%s.%s','create','file','originalname','extname','basename','filename','substring','wav','server/files/sounds/original','info','Sound\x20upload\x20filepath:\x20%s','Sound\x20upload\x20destination:\x20%s','chmodSync','0777','transcode','unlinkSync','src','original_duration','duration','original_sampleCount','sampleCount','channelCount'];(function(_0x178e48,_0x3c9509){var _0x440d7e=function(_0xc2f8a0){while(--_0xc2f8a0){_0x178e48['push'](_0x178e48['shift']());}};_0x440d7e(++_0x3c9509);}(_0xccee,0x93));var _0xecce=function(_0xca8e72,_0x1c16a2){_0xca8e72=_0xca8e72-0x0;var _0x45414a=_0xccee[_0xca8e72];return _0x45414a;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xecce('0x0'));var zipdir=require(_0xecce('0x1'));var jsonpatch=require(_0xecce('0x2'));var rp=require(_0xecce('0x3'));var moment=require(_0xecce('0x4'));var BPromise=require(_0xecce('0x5'));var Mustache=require('mustache');var util=require(_0xecce('0x6'));var path=require(_0xecce('0x7'));var sox=require(_0xecce('0x8'));var csv=require(_0xecce('0x9'));var ejs=require(_0xecce('0xa'));var fs=require('fs');var fs_extra=require(_0xecce('0xb'));var _=require('lodash');var squel=require(_0xecce('0xc'));var crypto=require(_0xecce('0xd'));var jsforce=require('jsforce');var deskjs=require(_0xecce('0xe'));var toCsv=require(_0xecce('0x9'));var querystring=require('querystring');var Papa=require(_0xecce('0xf'));var Redis=require('ioredis');var authService=require(_0xecce('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0xecce('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xecce('0x12'))(_0xecce('0x13'));var utils=require(_0xecce('0x14'));var config=require(_0xecce('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0xecce('0x16'))['db'];function respondWithStatusCode(_0xaa628,_0x2cbdab){_0x2cbdab=_0x2cbdab||0xcc;return function(_0x2e943e){if(_0x2e943e){return _0xaa628['sendStatus'](_0x2cbdab);}return _0xaa628['status'](_0x2cbdab)[_0xecce('0x17')]();};}function respondWithResult(_0x5971dc,_0x14d232){_0x14d232=_0x14d232||0xc8;return function(_0x46ac7b){if(_0x46ac7b){return _0x5971dc['status'](_0x14d232)[_0xecce('0x18')](_0x46ac7b);}};}function respondWithFilteredResult(_0x1697af,_0x20bc25){return function(_0x4e983d){if(_0x4e983d){var _0x39274e=typeof _0x20bc25['offset']===_0xecce('0x19')&&typeof _0x20bc25[_0xecce('0x1a')]==='undefined';var _0x4e32c6=_0x4e983d[_0xecce('0x1b')];var _0x17f213=_0x39274e?0x0:_0x20bc25[_0xecce('0x1c')];var _0x2338b4=_0x39274e?_0x4e983d['count']:_0x20bc25['offset']+_0x20bc25[_0xecce('0x1a')];var _0x28c133;if(_0x2338b4>=_0x4e32c6){_0x2338b4=_0x4e32c6;_0x28c133=0xc8;}else{_0x28c133=0xce;}_0x1697af[_0xecce('0x1d')](_0x28c133);return _0x1697af[_0xecce('0x1e')](_0xecce('0x1f'),_0x17f213+'-'+_0x2338b4+'/'+_0x4e32c6)[_0xecce('0x18')](_0x4e983d);}return null;};}function patchUpdates(_0x42e79b){return function(_0x2f4114){try{jsonpatch[_0xecce('0x20')](_0x2f4114,_0x42e79b,!![]);}catch(_0x5bf16d){return BPromise[_0xecce('0x21')](_0x5bf16d);}return _0x2f4114[_0xecce('0x22')]();};}function saveUpdates(_0x284da1,_0x38c29a){return function(_0x8ed7af){if(_0x8ed7af){return _0x8ed7af[_0xecce('0x23')](_0x284da1)[_0xecce('0x24')](function(_0x457fde){return _0x457fde;});}return null;};}function removeEntity(_0x172505,_0x34baee){return function(_0x31cd6e){if(_0x31cd6e){return _0x31cd6e[_0xecce('0x25')]()['then'](function(){var _0x2eaea0=_0x31cd6e[_0xecce('0x26')]({'plain':!![]});var _0x15bbb3='Sounds';return db[_0xecce('0x27')][_0xecce('0x25')]({'where':{'type':_0x15bbb3,'resourceId':_0x2eaea0['id']}})[_0xecce('0x24')](function(){return _0x31cd6e;});})[_0xecce('0x24')](function(){_0x172505[_0xecce('0x1d')](0xcc)[_0xecce('0x17')]();});}};}function handleEntityNotFound(_0xb41669,_0x5e80f4){return function(_0x4b04fd){if(!_0x4b04fd){_0xb41669[_0xecce('0x28')](0x194);}return _0x4b04fd;};}function handleError(_0x2d1fa3,_0x23cdab){_0x23cdab=_0x23cdab||0x1f4;return function(_0x5ebd1e){logger[_0xecce('0x29')](_0x5ebd1e[_0xecce('0x2a')]);if(_0x5ebd1e['name']){delete _0x5ebd1e[_0xecce('0x2b')];}_0x2d1fa3[_0xecce('0x1d')](_0x23cdab)[_0xecce('0x2c')](_0x5ebd1e);};}exports[_0xecce('0x2d')]=function(_0x9fb0c1,_0x5e8fb5){var _0x4167fb={},_0x5286f9={},_0x4406f6={'count':0x0,'rows':[]};var _0x436b4d=_[_0xecce('0x2e')](db['Sound'][_0xecce('0x2f')],function(_0x2486ab){return{'name':_0x2486ab[_0xecce('0x30')],'type':_0x2486ab[_0xecce('0x31')][_0xecce('0x32')]};});_0x5286f9['model']=_[_0xecce('0x2e')](_0x436b4d,_0xecce('0x2b'));_0x5286f9[_0xecce('0x33')]=_[_0xecce('0x34')](_0x9fb0c1['query']);_0x5286f9[_0xecce('0x35')]=_[_0xecce('0x36')](_0x5286f9[_0xecce('0x37')],_0x5286f9[_0xecce('0x33')]);_0x4167fb[_0xecce('0x38')]=_[_0xecce('0x36')](_0x5286f9['model'],qs[_0xecce('0x39')](_0x9fb0c1[_0xecce('0x33')]['fields']));_0x4167fb[_0xecce('0x38')]=_0x4167fb[_0xecce('0x38')]['length']?_0x4167fb[_0xecce('0x38')]:_0x5286f9[_0xecce('0x37')];if(!_0x9fb0c1[_0xecce('0x33')][_0xecce('0x3a')](_0xecce('0x3b'))){_0x4167fb[_0xecce('0x1a')]=qs[_0xecce('0x1a')](_0x9fb0c1[_0xecce('0x33')][_0xecce('0x1a')]);_0x4167fb[_0xecce('0x1c')]=qs[_0xecce('0x1c')](_0x9fb0c1[_0xecce('0x33')]['offset']);}_0x4167fb[_0xecce('0x3c')]=qs[_0xecce('0x3d')](_0x9fb0c1[_0xecce('0x33')]['sort']);_0x4167fb[_0xecce('0x3e')]=qs[_0xecce('0x35')](_[_0xecce('0x3f')](_0x9fb0c1[_0xecce('0x33')],_0x5286f9[_0xecce('0x35')]),_0x436b4d);if(_0x9fb0c1[_0xecce('0x33')][_0xecce('0x40')]){_0x4167fb[_0xecce('0x3e')]=_[_0xecce('0x41')](_0x4167fb['where'],{'$or':_[_0xecce('0x2e')](_0x436b4d,function(_0x4b67eb){if(_0x4b67eb[_0xecce('0x31')]!=='VIRTUAL'){var _0x15911a={};_0x15911a[_0x4b67eb[_0xecce('0x2b')]]={'$like':'%'+_0x9fb0c1[_0xecce('0x33')][_0xecce('0x40')]+'%'};return _0x15911a;}})});}_0x4167fb=_['merge']({},_0x4167fb,_0x9fb0c1[_0xecce('0x42')]);var _0x19b758={'where':_0x4167fb[_0xecce('0x3e')]};return db[_0xecce('0x43')]['count'](_0x19b758)[_0xecce('0x24')](function(_0x4b4281){_0x4406f6[_0xecce('0x1b')]=_0x4b4281;if(_0x9fb0c1['query'][_0xecce('0x44')]){_0x4167fb[_0xecce('0x45')]=[{'all':!![]}];}return db[_0xecce('0x43')][_0xecce('0x46')](_0x4167fb);})[_0xecce('0x24')](function(_0x2c9e7b){_0x4406f6[_0xecce('0x47')]=_0x2c9e7b;return _0x4406f6;})['then'](respondWithFilteredResult(_0x5e8fb5,_0x4167fb))[_0xecce('0x48')](handleError(_0x5e8fb5,null));};exports[_0xecce('0x49')]=function(_0x593425,_0x581899){var _0x23dad5={'raw':!![],'where':{'id':_0x593425[_0xecce('0x4a')]['id']}},_0x397dc3={};_0x397dc3[_0xecce('0x37')]=_[_0xecce('0x34')](db['Sound'][_0xecce('0x2f')]);_0x397dc3['query']=_[_0xecce('0x34')](_0x593425[_0xecce('0x33')]);_0x397dc3[_0xecce('0x35')]=_[_0xecce('0x36')](_0x397dc3['model'],_0x397dc3[_0xecce('0x33')]);_0x23dad5[_0xecce('0x38')]=_[_0xecce('0x36')](_0x397dc3[_0xecce('0x37')],qs['fields'](_0x593425[_0xecce('0x33')]['fields']));_0x23dad5[_0xecce('0x38')]=_0x23dad5[_0xecce('0x38')][_0xecce('0x4b')]?_0x23dad5[_0xecce('0x38')]:_0x397dc3['model'];if(_0x593425[_0xecce('0x33')][_0xecce('0x44')]){_0x23dad5[_0xecce('0x45')]=[{'all':!![]}];}_0x23dad5=_['merge']({},_0x23dad5,_0x593425[_0xecce('0x42')]);return db[_0xecce('0x43')][_0xecce('0x4c')](_0x23dad5)[_0xecce('0x24')](handleEntityNotFound(_0x581899,null))['then'](respondWithResult(_0x581899,null))[_0xecce('0x48')](handleError(_0x581899,null));};exports[_0xecce('0x4d')]=function(_0x307177,_0x2774cf,_0x6a1b40){return db[_0xecce('0x43')]['find']({'where':{'id':_0x307177[_0xecce('0x4a')]['id']},'attributes':[_0xecce('0x2b'),_0xecce('0x4e'),'converted_format'],'raw':!![]})[_0xecce('0x24')](handleEntityNotFound(_0x2774cf,null))[_0xecce('0x24')](function(_0x1be14e){if(_0x1be14e){if(!fs[_0xecce('0x4f')](path[_0xecce('0x50')](config[_0xecce('0x51')],_0xecce('0x52'),_0x1be14e[_0xecce('0x4e')]+'.'+_0x1be14e[_0xecce('0x53')]))){throw new db[(_0xecce('0x54'))][(_0xecce('0x55'))](_0xecce('0x56'));}return _0x2774cf[_0xecce('0x4d')](path[_0xecce('0x50')](config[_0xecce('0x51')],'server/files/sounds/converted',util[_0xecce('0x57')](_0xecce('0x58'),_0x1be14e[_0xecce('0x4e')],_0x1be14e[_0xecce('0x53')])),util[_0xecce('0x57')](_0xecce('0x58'),_0x1be14e[_0xecce('0x2b')],_0x1be14e[_0xecce('0x53')]));}return null;})[_0xecce('0x48')](handleError(_0x2774cf,null));};exports[_0xecce('0x59')]=function(_0x2e9126,_0x372c8c,_0xd4276e){var _0x4bc2e5={'name':path['basename'](_0x2e9126[_0xecce('0x5a')][_0xecce('0x5b')],path[_0xecce('0x5c')](_0x2e9126[_0xecce('0x5a')]['originalname'])),'save_name':path[_0xecce('0x5d')](_0x2e9126[_0xecce('0x5a')][_0xecce('0x5e')],path['extname'](_0x2e9126[_0xecce('0x5a')][_0xecce('0x5e')])),'original_format':path[_0xecce('0x5c')](_0x2e9126[_0xecce('0x5a')][_0xecce('0x5b')])[_0xecce('0x5f')](0x1),'converted_format':_0xecce('0x60')};var _0x5c66da=path[_0xecce('0x50')](config[_0xecce('0x51')],_0xecce('0x61'),_0x2e9126['file'][_0xecce('0x5e')]);var _0x321c97=path[_0xecce('0x50')](config[_0xecce('0x51')],_0xecce('0x52'),util['format'](_0xecce('0x58'),path[_0xecce('0x5d')](_0x2e9126[_0xecce('0x5a')][_0xecce('0x5e')],path[_0xecce('0x5c')](_0x2e9126[_0xecce('0x5a')][_0xecce('0x5e')])),_0x4bc2e5['converted_format']));logger[_0xecce('0x62')](_0xecce('0x63'),_0x5c66da);logger[_0xecce('0x62')](_0xecce('0x64'),_0x321c97);try{fs[_0xecce('0x65')](_0x5c66da,parseInt(_0xecce('0x66'),0x8));var _0x4a5f5c=sox[_0xecce('0x67')](_0x5c66da,_0x321c97,{'sampleRate':0x1f40,'format':_0xecce('0x60'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x4a5f5c['on'](_0xecce('0x29'),function(_0x4c4996){fs[_0xecce('0x68')](_0x5c66da);_0x372c8c[_0xecce('0x1d')](0x1f4)['send'](_0x4c4996);});_0x4a5f5c['on'](_0xecce('0x69'),function(_0x5c0755){_0x4bc2e5[_0xecce('0x6a')]=isNaN(_0x5c0755[_0xecce('0x6b')])?null:_0x5c0755[_0xecce('0x6b')]*0x3e8;_0x4bc2e5[_0xecce('0x6c')]=isNaN(_0x5c0755[_0xecce('0x6d')])?null:_0x5c0755[_0xecce('0x6d')];_0x4bc2e5['original_channelCount']=isNaN(_0x5c0755[_0xecce('0x6e')])?null:_0x5c0755[_0xecce('0x6e')];_0x4bc2e5['original_bitRate']=isNaN(_0x5c0755['bitRate'])?null:_0x5c0755['bitRate'];_0x4bc2e5['original_sampleRate']=isNaN(_0x5c0755[_0xecce('0x6f')])?null:_0x5c0755[_0xecce('0x6f')];});_0x4a5f5c['on'](_0xecce('0x70'),function(_0x14b878){_0x4bc2e5[_0xecce('0x71')]=isNaN(_0x14b878['duration'])?null:_0x14b878['duration']*0x3e8;_0x4bc2e5['converted_sampleCount']=isNaN(_0x14b878[_0xecce('0x6d')])?null:_0x14b878[_0xecce('0x6d')];_0x4bc2e5[_0xecce('0x72')]=isNaN(_0x14b878[_0xecce('0x6e')])?null:_0x14b878[_0xecce('0x6e')];_0x4bc2e5[_0xecce('0x73')]=isNaN(_0x14b878[_0xecce('0x74')])?null:_0x14b878[_0xecce('0x74')];_0x4bc2e5[_0xecce('0x75')]=isNaN(_0x14b878[_0xecce('0x6f')])?null:_0x14b878['sampleRate'];});_0x4a5f5c['on'](_0xecce('0x17'),function(){fs[_0xecce('0x65')](_0x321c97,parseInt(_0xecce('0x66'),0x8));return db[_0xecce('0x43')]['create'](_0x4bc2e5)[_0xecce('0x24')](function(_0x2e5ac9){var _0x167000={'role':_0x2e9126[_0xecce('0x76')][_0xecce('0x77')],'userProfileId':_0x2e9126[_0xecce('0x76')][_0xecce('0x78')]};if(!_0x167000)throw new Error(_0xecce('0x79'));if(_0x167000['role']==='user'){var _0x39d0e4=_0x2e5ac9[_0xecce('0x26')]({'plain':!![]});return db[_0xecce('0x7a')][_0xecce('0x4c')]({'where':{'name':'Sounds','userProfileId':_0x167000[_0xecce('0x78')]},'raw':!![]})[_0xecce('0x24')](function(_0x582f25){if(_0x582f25&&_0x582f25[_0xecce('0x7b')]===0x0){return db[_0xecce('0x27')][_0xecce('0x59')]({'name':_0x39d0e4[_0xecce('0x2b')],'resourceId':_0x39d0e4['id'],'type':_0x582f25['name'],'sectionId':_0x582f25['id']},{})['then'](function(){return _0x2e5ac9;});}else{return _0x2e5ac9;}})[_0xecce('0x48')](function(_0x17b9e3){logger['error'](_0xecce('0x7c'),_0x17b9e3);throw _0x17b9e3;});}return _0x2e5ac9;})['then'](respondWithResult(_0x372c8c,null))[_0xecce('0x48')](handleError(_0x372c8c,null));});_0x4a5f5c[_0xecce('0x7d')]();}catch(_0x278bde){_0x372c8c['status'](0x1f4)[_0xecce('0x2c')](_0x278bde);}};exports[_0xecce('0x23')]=function(_0x1d5f27,_0x2efdca,_0x3681be){return db[_0xecce('0x43')][_0xecce('0x4c')]({'where':{'id':_0x1d5f27[_0xecce('0x4a')]['id']}})[_0xecce('0x24')](handleEntityNotFound(_0x2efdca,null))[_0xecce('0x24')](saveUpdates(_[_0xecce('0x3f')](_0x1d5f27[_0xecce('0x76')],[_0xecce('0x2b'),_0xecce('0x7e')]),null))['then'](respondWithResult(_0x2efdca,null))[_0xecce('0x48')](handleError(_0x2efdca,null));};exports[_0xecce('0x7f')]=function(_0x239c8,_0x180dd0,_0x4e6c08){return db[_0xecce('0x43')]['find']({'where':{'id':_0x239c8['params']['id']}})['then'](function(_0x2ea570){if(_0x2ea570){return _0x2ea570[_0xecce('0x25')]();}})['then'](function(_0x2d494a){var _0x397912=path[_0xecce('0x50')](config[_0xecce('0x51')],_0xecce('0x61'),util[_0xecce('0x57')](_0xecce('0x58'),_0x2d494a['save_name'],_0x2d494a[_0xecce('0x80')]));var _0x2ee656=path[_0xecce('0x50')](config[_0xecce('0x51')],_0xecce('0x52'),util[_0xecce('0x57')](_0xecce('0x58'),_0x2d494a[_0xecce('0x4e')],_0x2d494a[_0xecce('0x53')]));fs[_0xecce('0x68')](_0x397912);fs['unlinkSync'](_0x2ee656);return _0x2d494a;})[_0xecce('0x24')](function(_0x3ef394){if(_0x3ef394){return _0x180dd0[_0xecce('0x1d')](0xcc)[_0xecce('0x17')]();}})[_0xecce('0x24')](handleEntityNotFound(_0x180dd0,null))[_0xecce('0x48')](handleError(_0x180dd0,null));};
\ No newline at end of file
index 7a7de1e..293d78f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x725c=['api','moment','bluebird','path','rimraf','../../config/environment','./sound.attributes','tools_sounds','util','../../config/logger'];(function(_0x616290,_0x280b7f){var _0x453879=function(_0x27bda7){while(--_0x27bda7){_0x616290['push'](_0x616290['shift']());}};_0x453879(++_0x280b7f);}(_0x725c,0xa8));var _0xc725=function(_0x20d290,_0x40fc11){_0x20d290=_0x20d290-0x0;var _0x2bfa8f=_0x725c[_0x20d290];return _0x2bfa8f;};'use strict';var _=require('lodash');var util=require(_0xc725('0x0'));var logger=require(_0xc725('0x1'))(_0xc725('0x2'));var moment=require(_0xc725('0x3'));var BPromise=require(_0xc725('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xc725('0x5'));var rimraf=require(_0xc725('0x6'));var config=require(_0xc725('0x7'));var attributes=require(_0xc725('0x8'));module['exports']=function(_0x1f379e,_0x272a83){return _0x1f379e['define']('Sound',attributes,{'tableName':_0xc725('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xc529=['bluebird','request-promise','../../config/environment','./sound.attributes','exports','define','Sound','lodash','util','api','moment'];(function(_0x8968fc,_0x2b1fee){var _0x273828=function(_0x3ab518){while(--_0x3ab518){_0x8968fc['push'](_0x8968fc['shift']());}};_0x273828(++_0x2b1fee);}(_0xc529,0x193));var _0x9c52=function(_0x3a7258,_0x4f9d4f){_0x3a7258=_0x3a7258-0x0;var _0x2f6012=_0xc529[_0x3a7258];return _0x2f6012;};'use strict';var _=require(_0x9c52('0x0'));var util=require(_0x9c52('0x1'));var logger=require('../../config/logger')(_0x9c52('0x2'));var moment=require(_0x9c52('0x3'));var BPromise=require(_0x9c52('0x4'));var rp=require(_0x9c52('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x9c52('0x6'));var attributes=require(_0x9c52('0x7'));module[_0x9c52('0x8')]=function(_0x24900f,_0x232e47){return _0x24900f[_0x9c52('0x9')](_0x9c52('0xa'),attributes,{'tableName':'tools_sounds','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 6d5e4b0..5093d1a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x935d=['then','info','Sound,\x20%s,\x20%s','request\x20sent','debug','Sound,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','Sound','options','raw','where','attributes','include','model','map','ShowSound','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http'];(function(_0x5eb39a,_0x392f2e){var _0x5c3c75=function(_0x388b41){while(--_0x388b41){_0x5eb39a['push'](_0x5eb39a['shift']());}};_0x5c3c75(++_0x392f2e);}(_0x935d,0x1b5));var _0xd935=function(_0x725a4c,_0x102507){_0x725a4c=_0x725a4c-0x0;var _0x37b2cc=_0x935d[_0x725a4c];return _0x37b2cc;};'use strict';var _=require('lodash');var util=require(_0xd935('0x0'));var moment=require(_0xd935('0x1'));var BPromise=require(_0xd935('0x2'));var rs=require(_0xd935('0x3'));var fs=require('fs');var Redis=require(_0xd935('0x4'));var db=require(_0xd935('0x5'))['db'];var utils=require(_0xd935('0x6'));var logger=require(_0xd935('0x7'))('rpc');var config=require(_0xd935('0x8'));var jayson=require(_0xd935('0x9'));var client=jayson['client'][_0xd935('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1c642d,_0x377cfc,_0x20a573){return new BPromise(function(_0x1d1259,_0x59ed94){return client['request'](_0x1c642d,_0x20a573)[_0xd935('0xb')](function(_0x30c4bd){logger[_0xd935('0xc')](_0xd935('0xd'),_0x377cfc,_0xd935('0xe'));logger[_0xd935('0xf')](_0xd935('0x10'),_0x377cfc,_0xd935('0xe'),JSON[_0xd935('0x11')](_0x30c4bd));if(_0x30c4bd[_0xd935('0x12')]){if(_0x30c4bd['error'][_0xd935('0x13')]===0x1f4){logger['error'](_0xd935('0xd'),_0x377cfc,_0x30c4bd[_0xd935('0x12')][_0xd935('0x14')]);return _0x59ed94(_0x30c4bd[_0xd935('0x12')][_0xd935('0x14')]);}logger['error'](_0xd935('0xd'),_0x377cfc,_0x30c4bd[_0xd935('0x12')][_0xd935('0x14')]);return _0x1d1259(_0x30c4bd[_0xd935('0x12')]['message']);}else{logger['info'](_0xd935('0xd'),_0x377cfc,_0xd935('0xe'));_0x1d1259(_0x30c4bd[_0xd935('0x15')][_0xd935('0x14')]);}})[_0xd935('0x16')](function(_0xe3a73a){logger[_0xd935('0x12')](_0xd935('0xd'),_0x377cfc,_0xe3a73a);_0x59ed94(_0xe3a73a);});});}exports['ShowSound']=function(_0x44cb50){var _0x59daf5=this;return new Promise(function(_0x9d780,_0x40773a){return db[_0xd935('0x17')]['find']({'raw':_0x44cb50[_0xd935('0x18')]?_0x44cb50[_0xd935('0x18')][_0xd935('0x19')]===undefined?!![]:![]:!![],'where':_0x44cb50[_0xd935('0x18')]?_0x44cb50['options'][_0xd935('0x1a')]||null:null,'attributes':_0x44cb50[_0xd935('0x18')]?_0x44cb50[_0xd935('0x18')][_0xd935('0x1b')]||null:null,'include':_0x44cb50[_0xd935('0x18')]?_0x44cb50[_0xd935('0x18')][_0xd935('0x1c')]?_['map'](_0x44cb50[_0xd935('0x18')][_0xd935('0x1c')],function(_0x4992b1){return{'model':db[_0x4992b1[_0xd935('0x1d')]],'as':_0x4992b1['as'],'attributes':_0x4992b1[_0xd935('0x1b')],'include':_0x4992b1['include']?_[_0xd935('0x1e')](_0x4992b1[_0xd935('0x1c')],function(_0x266f28){return{'model':db[_0x266f28[_0xd935('0x1d')]],'as':_0x266f28['as'],'attributes':_0x266f28[_0xd935('0x1b')],'include':_0x266f28['include']?_[_0xd935('0x1e')](_0x266f28['include'],function(_0x1b6cd2){return{'model':db[_0x1b6cd2['model']],'as':_0x1b6cd2['as'],'attributes':_0x1b6cd2['attributes']};}):[]};}):[]};}):[]:[]})[_0xd935('0xb')](function(_0xa4a3ac){logger['info'](_0xd935('0x1f'),_0x44cb50);logger[_0xd935('0xf')](_0xd935('0x1f'),_0x44cb50,JSON['stringify'](_0xa4a3ac));_0x9d780(_0xa4a3ac);})['catch'](function(_0x522ead){logger['error'](_0xd935('0x1f'),_0x522ead[_0xd935('0x14')],_0x44cb50);_0x40773a(_0x59daf5[_0xd935('0x12')](0x1f4,_0x522ead[_0xd935('0x14')]));});});};
\ No newline at end of file
+var _0x2690=['message','catch','ShowSound','Sound','find','options','where','include','map','attributes','model','stringify','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','request','then','Sound,\x20%s,\x20%s','request\x20sent','debug','Sound,\x20%s,\x20%s,\x20%s','error'];(function(_0x2cecd4,_0x33dc5c){var _0x4e2d20=function(_0x50ba58){while(--_0x50ba58){_0x2cecd4['push'](_0x2cecd4['shift']());}};_0x4e2d20(++_0x33dc5c);}(_0x2690,0x185));var _0x0269=function(_0x455f19,_0x4f8f3a){_0x455f19=_0x455f19-0x0;var _0x422f21=_0x2690[_0x455f19];return _0x422f21;};'use strict';var _=require(_0x0269('0x0'));var util=require(_0x0269('0x1'));var moment=require(_0x0269('0x2'));var BPromise=require(_0x0269('0x3'));var rs=require(_0x0269('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0269('0x5'))['db'];var utils=require(_0x0269('0x6'));var logger=require(_0x0269('0x7'))('rpc');var config=require(_0x0269('0x8'));var jayson=require(_0x0269('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x46b29c,_0x1c8bf2,_0x70a059){return new BPromise(function(_0x3e7ccb,_0x429612){return client[_0x0269('0xa')](_0x46b29c,_0x70a059)[_0x0269('0xb')](function(_0x473066){logger['info'](_0x0269('0xc'),_0x1c8bf2,_0x0269('0xd'));logger[_0x0269('0xe')](_0x0269('0xf'),_0x1c8bf2,_0x0269('0xd'),JSON['stringify'](_0x473066));if(_0x473066['error']){if(_0x473066[_0x0269('0x10')]['code']===0x1f4){logger[_0x0269('0x10')]('Sound,\x20%s,\x20%s',_0x1c8bf2,_0x473066['error']['message']);return _0x429612(_0x473066[_0x0269('0x10')][_0x0269('0x11')]);}logger[_0x0269('0x10')]('Sound,\x20%s,\x20%s',_0x1c8bf2,_0x473066['error']['message']);return _0x3e7ccb(_0x473066['error']['message']);}else{logger['info'](_0x0269('0xc'),_0x1c8bf2,'request\x20sent');_0x3e7ccb(_0x473066['result'][_0x0269('0x11')]);}})[_0x0269('0x12')](function(_0x3c82df){logger['error'](_0x0269('0xc'),_0x1c8bf2,_0x3c82df);_0x429612(_0x3c82df);});});}exports[_0x0269('0x13')]=function(_0x19afea){var _0x2fb440=this;return new Promise(function(_0x92a615,_0x15f4d8){return db[_0x0269('0x14')][_0x0269('0x15')]({'raw':_0x19afea[_0x0269('0x16')]?_0x19afea[_0x0269('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x19afea['options']?_0x19afea['options'][_0x0269('0x17')]||null:null,'attributes':_0x19afea[_0x0269('0x16')]?_0x19afea['options']['attributes']||null:null,'include':_0x19afea['options']?_0x19afea[_0x0269('0x16')][_0x0269('0x18')]?_[_0x0269('0x19')](_0x19afea['options']['include'],function(_0x4d15a4){return{'model':db[_0x4d15a4['model']],'as':_0x4d15a4['as'],'attributes':_0x4d15a4[_0x0269('0x1a')],'include':_0x4d15a4['include']?_[_0x0269('0x19')](_0x4d15a4[_0x0269('0x18')],function(_0x2ff81c){return{'model':db[_0x2ff81c[_0x0269('0x1b')]],'as':_0x2ff81c['as'],'attributes':_0x2ff81c['attributes'],'include':_0x2ff81c[_0x0269('0x18')]?_[_0x0269('0x19')](_0x2ff81c[_0x0269('0x18')],function(_0x1e39c2){return{'model':db[_0x1e39c2[_0x0269('0x1b')]],'as':_0x1e39c2['as'],'attributes':_0x1e39c2[_0x0269('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x181368){logger['info'](_0x0269('0x13'),_0x19afea);logger[_0x0269('0xe')](_0x0269('0x13'),_0x19afea,JSON[_0x0269('0x1c')](_0x181368));_0x92a615(_0x181368);})['catch'](function(_0xe2aed5){logger['error'](_0x0269('0x13'),_0xe2aed5[_0x0269('0x11')],_0x19afea);_0x15f4d8(_0x2fb440[_0x0269('0x10')](0x1f4,_0xe2aed5[_0x0269('0x11')]));});});};
\ No newline at end of file
index 80d267f..7c2243b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xda3f=['../../config/environment','get','isAuthenticated','/:id','show','post','create','put','update','delete','destroy','exports','util','path','fs-extra','../../components/interaction/service'];(function(_0x41e10,_0x17657d){var _0x4efe10=function(_0x5dacde){while(--_0x5dacde){_0x41e10['push'](_0x41e10['shift']());}};_0x4efe10(++_0x17657d);}(_0xda3f,0xec));var _0xfda3=function(_0x55f068,_0x21128a){_0x55f068=_0x55f068-0x0;var _0xbc516d=_0xda3f[_0x55f068];return _0xbc516d;};'use strict';var multer=require('multer');var util=require(_0xfda3('0x0'));var path=require(_0xfda3('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0xfda3('0x2'));var auth=require('../../components/auth/service');var interaction=require(_0xfda3('0x3'));var config=require(_0xfda3('0x4'));var controller=require('./squareMessage.controller');router[_0xfda3('0x5')]('/',auth[_0xfda3('0x6')](),controller['index']);router['get'](_0xfda3('0x7'),auth[_0xfda3('0x6')](),controller[_0xfda3('0x8')]);router[_0xfda3('0x9')]('/',auth[_0xfda3('0x6')](),controller[_0xfda3('0xa')]);router[_0xfda3('0xb')](_0xfda3('0x7'),auth[_0xfda3('0x6')](),controller[_0xfda3('0xc')]);router[_0xfda3('0xd')](_0xfda3('0x7'),auth['isAuthenticated'](),controller[_0xfda3('0xe')]);module[_0xfda3('0xf')]=router;
\ No newline at end of file
+var _0xda3f=['../../config/environment','get','isAuthenticated','/:id','show','post','create','put','update','delete','destroy','exports','util','path','fs-extra','../../components/interaction/service'];(function(_0x10d0f0,_0x1eba3d){var _0x93e308=function(_0x388548){while(--_0x388548){_0x10d0f0['push'](_0x10d0f0['shift']());}};_0x93e308(++_0x1eba3d);}(_0xda3f,0xec));var _0xfda3=function(_0x3910c8,_0xc063c8){_0x3910c8=_0x3910c8-0x0;var _0x596df2=_0xda3f[_0x3910c8];return _0x596df2;};'use strict';var multer=require('multer');var util=require(_0xfda3('0x0'));var path=require(_0xfda3('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0xfda3('0x2'));var auth=require('../../components/auth/service');var interaction=require(_0xfda3('0x3'));var config=require(_0xfda3('0x4'));var controller=require('./squareMessage.controller');router[_0xfda3('0x5')]('/',auth[_0xfda3('0x6')](),controller['index']);router['get'](_0xfda3('0x7'),auth[_0xfda3('0x6')](),controller[_0xfda3('0x8')]);router[_0xfda3('0x9')]('/',auth[_0xfda3('0x6')](),controller[_0xfda3('0xa')]);router[_0xfda3('0xb')](_0xfda3('0x7'),auth[_0xfda3('0x6')](),controller[_0xfda3('0xc')]);router[_0xfda3('0xd')](_0xfda3('0x7'),auth['isAuthenticated'](),controller[_0xfda3('0xe')]);module[_0xfda3('0xf')]=router;
\ No newline at end of file
index e371641..70eb027 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7c06=['STRING','TEXT','medium','out','sequelize'];(function(_0xaf7d7f,_0x3fad2e){var _0x263731=function(_0x4c68fd){while(--_0x4c68fd){_0xaf7d7f['push'](_0xaf7d7f['shift']());}};_0x263731(++_0x3fad2e);}(_0x7c06,0x1da));var _0x67c0=function(_0x5ce268,_0x1835b6){_0x5ce268=_0x5ce268-0x0;var _0x28c96a=_0x7c06[_0x5ce268];return _0x28c96a;};'use strict';var Sequelize=require(_0x67c0('0x0'));module['exports']={'uniqueid':{'type':Sequelize[_0x67c0('0x1')]},'body':{'type':Sequelize[_0x67c0('0x2')](_0x67c0('0x3')),'allowNull':![]},'direction':{'type':Sequelize['ENUM']('in','out'),'defaultValue':_0x67c0('0x4'),'allowNull':![]},'providerName':{'type':Sequelize['STRING']},'providerResponse':{'type':Sequelize[_0x67c0('0x2')]}};
\ No newline at end of file
+var _0xba44=['STRING','TEXT','medium','ENUM','out','sequelize'];(function(_0x39748b,_0x303463){var _0x341bad=function(_0x15161c){while(--_0x15161c){_0x39748b['push'](_0x39748b['shift']());}};_0x341bad(++_0x303463);}(_0xba44,0xbf));var _0x4ba4=function(_0x24f7e0,_0x210411){_0x24f7e0=_0x24f7e0-0x0;var _0x49f0d0=_0xba44[_0x24f7e0];return _0x49f0d0;};'use strict';var Sequelize=require(_0x4ba4('0x0'));module['exports']={'uniqueid':{'type':Sequelize[_0x4ba4('0x1')]},'body':{'type':Sequelize[_0x4ba4('0x2')](_0x4ba4('0x3')),'allowNull':![]},'direction':{'type':Sequelize[_0x4ba4('0x4')]('in',_0x4ba4('0x5')),'defaultValue':_0x4ba4('0x5'),'allowNull':![]},'providerName':{'type':Sequelize['STRING']},'providerResponse':{'type':Sequelize[_0x4ba4('0x2')]}};
\ No newline at end of file
index 0bbd538..61a2480 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5829=['VIRTUAL','include','findAll','rows','catch','show','params','includeAll','options','find','create','body','destroy','eml-format','rimraf','zip-dir','request-promise','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','error','stack','name','send','index','SquareMessage','rawAttributes','fieldName','type','key','map','keys','filters','intersection','model','attributes','fields','length','query','hasOwnProperty','nolimit','sort','where','pick','filter','merge'];(function(_0x42127d,_0x319f25){var _0x338b8c=function(_0x2360c5){while(--_0x2360c5){_0x42127d['push'](_0x42127d['shift']());}};_0x338b8c(++_0x319f25);}(_0x5829,0xf4));var _0x9582=function(_0x288f5e,_0x205edd){_0x288f5e=_0x288f5e-0x0;var _0x476cc9=_0x5829[_0x288f5e];return _0x476cc9;};'use strict';var emlformat=require(_0x9582('0x0'));var rimraf=require(_0x9582('0x1'));var zipdir=require(_0x9582('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x9582('0x3'));var moment=require('moment');var BPromise=require(_0x9582('0x4'));var Mustache=require('mustache');var util=require(_0x9582('0x5'));var path=require(_0x9582('0x6'));var sox=require(_0x9582('0x7'));var csv=require(_0x9582('0x8'));var ejs=require(_0x9582('0x9'));var fs=require('fs');var fs_extra=require(_0x9582('0xa'));var _=require(_0x9582('0xb'));var squel=require(_0x9582('0xc'));var crypto=require(_0x9582('0xd'));var jsforce=require(_0x9582('0xe'));var deskjs=require(_0x9582('0xf'));var toCsv=require('to-csv');var querystring=require(_0x9582('0x10'));var Papa=require('papaparse');var Redis=require(_0x9582('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x9582('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x9582('0x13'))(_0x9582('0x14'));var utils=require(_0x9582('0x15'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x9582('0x16'))['db'];function respondWithStatusCode(_0x373352,_0x1d3890){_0x1d3890=_0x1d3890||0xcc;return function(_0x4141f0){if(_0x4141f0){return _0x373352[_0x9582('0x17')](_0x1d3890);}return _0x373352[_0x9582('0x18')](_0x1d3890)[_0x9582('0x19')]();};}function respondWithResult(_0xec997c,_0x3b696a){_0x3b696a=_0x3b696a||0xc8;return function(_0x82e6b8){if(_0x82e6b8){return _0xec997c[_0x9582('0x18')](_0x3b696a)[_0x9582('0x1a')](_0x82e6b8);}};}function respondWithFilteredResult(_0x54b881,_0x1b568b){return function(_0x5ade93){if(_0x5ade93){var _0x2029eb=typeof _0x1b568b[_0x9582('0x1b')]===_0x9582('0x1c')&&typeof _0x1b568b[_0x9582('0x1d')]==='undefined';var _0x42f583=_0x5ade93[_0x9582('0x1e')];var _0x5bff08=_0x2029eb?0x0:_0x1b568b['offset'];var _0x3bb84d=_0x2029eb?_0x5ade93[_0x9582('0x1e')]:_0x1b568b[_0x9582('0x1b')]+_0x1b568b[_0x9582('0x1d')];var _0x53178b;if(_0x3bb84d>=_0x42f583){_0x3bb84d=_0x42f583;_0x53178b=0xc8;}else{_0x53178b=0xce;}_0x54b881[_0x9582('0x18')](_0x53178b);return _0x54b881[_0x9582('0x1f')](_0x9582('0x20'),_0x5bff08+'-'+_0x3bb84d+'/'+_0x42f583)[_0x9582('0x1a')](_0x5ade93);}return null;};}function patchUpdates(_0x7d50bc){return function(_0x521f7f){try{jsonpatch[_0x9582('0x21')](_0x521f7f,_0x7d50bc,!![]);}catch(_0x3587cc){return BPromise[_0x9582('0x22')](_0x3587cc);}return _0x521f7f[_0x9582('0x23')]();};}function saveUpdates(_0x3afe26,_0x4e249a){return function(_0x382908){if(_0x382908){return _0x382908[_0x9582('0x24')](_0x3afe26)[_0x9582('0x25')](function(_0x41af22){return _0x41af22;});}return null;};}function removeEntity(_0x33b3e5,_0x42f217){return function(_0x181d95){if(_0x181d95){return _0x181d95['destroy']()[_0x9582('0x25')](function(){_0x33b3e5[_0x9582('0x18')](0xcc)[_0x9582('0x19')]();});}};}function handleEntityNotFound(_0x3a3ada,_0x1ad277){return function(_0xe6484b){if(!_0xe6484b){_0x3a3ada[_0x9582('0x17')](0x194);}return _0xe6484b;};}function handleError(_0x2f2b8d,_0x271334){_0x271334=_0x271334||0x1f4;return function(_0x538e80){logger[_0x9582('0x26')](_0x538e80[_0x9582('0x27')]);if(_0x538e80[_0x9582('0x28')]){delete _0x538e80['name'];}_0x2f2b8d['status'](_0x271334)[_0x9582('0x29')](_0x538e80);};}exports[_0x9582('0x2a')]=function(_0x4d1710,_0x307325){var _0x588841={},_0x354eec={},_0x3d1c5a={'count':0x0,'rows':[]};var _0x8c5c40=_['map'](db[_0x9582('0x2b')][_0x9582('0x2c')],function(_0x4d2bc4){return{'name':_0x4d2bc4[_0x9582('0x2d')],'type':_0x4d2bc4[_0x9582('0x2e')][_0x9582('0x2f')]};});_0x354eec['model']=_[_0x9582('0x30')](_0x8c5c40,_0x9582('0x28'));_0x354eec['query']=_[_0x9582('0x31')](_0x4d1710['query']);_0x354eec[_0x9582('0x32')]=_[_0x9582('0x33')](_0x354eec[_0x9582('0x34')],_0x354eec['query']);_0x588841[_0x9582('0x35')]=_[_0x9582('0x33')](_0x354eec[_0x9582('0x34')],qs[_0x9582('0x36')](_0x4d1710['query'][_0x9582('0x36')]));_0x588841['attributes']=_0x588841[_0x9582('0x35')][_0x9582('0x37')]?_0x588841[_0x9582('0x35')]:_0x354eec[_0x9582('0x34')];if(!_0x4d1710[_0x9582('0x38')][_0x9582('0x39')](_0x9582('0x3a'))){_0x588841[_0x9582('0x1d')]=qs[_0x9582('0x1d')](_0x4d1710[_0x9582('0x38')][_0x9582('0x1d')]);_0x588841['offset']=qs[_0x9582('0x1b')](_0x4d1710[_0x9582('0x38')][_0x9582('0x1b')]);}_0x588841['order']=qs[_0x9582('0x3b')](_0x4d1710['query'][_0x9582('0x3b')]);_0x588841[_0x9582('0x3c')]=qs[_0x9582('0x32')](_[_0x9582('0x3d')](_0x4d1710[_0x9582('0x38')],_0x354eec[_0x9582('0x32')]),_0x8c5c40);if(_0x4d1710['query'][_0x9582('0x3e')]){_0x588841[_0x9582('0x3c')]=_[_0x9582('0x3f')](_0x588841[_0x9582('0x3c')],{'$or':_[_0x9582('0x30')](_0x8c5c40,function(_0x25aaaf){if(_0x25aaaf[_0x9582('0x2e')]!==_0x9582('0x40')){var _0x4d4260={};_0x4d4260[_0x25aaaf[_0x9582('0x28')]]={'$like':'%'+_0x4d1710[_0x9582('0x38')][_0x9582('0x3e')]+'%'};return _0x4d4260;}})});}_0x588841=_[_0x9582('0x3f')]({},_0x588841,_0x4d1710['options']);var _0x4deb62={'where':_0x588841[_0x9582('0x3c')]};return db[_0x9582('0x2b')][_0x9582('0x1e')](_0x4deb62)['then'](function(_0x6044ed){_0x3d1c5a[_0x9582('0x1e')]=_0x6044ed;if(_0x4d1710[_0x9582('0x38')]['includeAll']){_0x588841[_0x9582('0x41')]=[{'all':!![]}];}return db[_0x9582('0x2b')][_0x9582('0x42')](_0x588841);})[_0x9582('0x25')](function(_0x1bfc4b){_0x3d1c5a[_0x9582('0x43')]=_0x1bfc4b;return _0x3d1c5a;})['then'](respondWithFilteredResult(_0x307325,_0x588841))[_0x9582('0x44')](handleError(_0x307325,null));};exports[_0x9582('0x45')]=function(_0x2c3899,_0x46a6f4){var _0x4d8937={'raw':!![],'where':{'id':_0x2c3899[_0x9582('0x46')]['id']}},_0x33c8df={};_0x33c8df[_0x9582('0x34')]=_[_0x9582('0x31')](db[_0x9582('0x2b')][_0x9582('0x2c')]);_0x33c8df[_0x9582('0x38')]=_[_0x9582('0x31')](_0x2c3899['query']);_0x33c8df['filters']=_[_0x9582('0x33')](_0x33c8df[_0x9582('0x34')],_0x33c8df[_0x9582('0x38')]);_0x4d8937[_0x9582('0x35')]=_[_0x9582('0x33')](_0x33c8df[_0x9582('0x34')],qs[_0x9582('0x36')](_0x2c3899[_0x9582('0x38')]['fields']));_0x4d8937[_0x9582('0x35')]=_0x4d8937[_0x9582('0x35')][_0x9582('0x37')]?_0x4d8937['attributes']:_0x33c8df[_0x9582('0x34')];if(_0x2c3899[_0x9582('0x38')][_0x9582('0x47')]){_0x4d8937['include']=[{'all':!![]}];}_0x4d8937=_[_0x9582('0x3f')]({},_0x4d8937,_0x2c3899[_0x9582('0x48')]);return db[_0x9582('0x2b')][_0x9582('0x49')](_0x4d8937)[_0x9582('0x25')](handleEntityNotFound(_0x46a6f4,null))[_0x9582('0x25')](respondWithResult(_0x46a6f4,null))[_0x9582('0x44')](handleError(_0x46a6f4,null));};exports[_0x9582('0x4a')]=function(_0x4f5a10,_0xf78b34){return db[_0x9582('0x2b')]['create'](_0x4f5a10[_0x9582('0x4b')],{})[_0x9582('0x25')](respondWithResult(_0xf78b34,0xc9))[_0x9582('0x44')](handleError(_0xf78b34,null));};exports[_0x9582('0x24')]=function(_0x27de32,_0x363b6e){if(_0x27de32[_0x9582('0x4b')]['id']){delete _0x27de32[_0x9582('0x4b')]['id'];}return db[_0x9582('0x2b')][_0x9582('0x49')]({'where':{'id':_0x27de32[_0x9582('0x46')]['id']}})[_0x9582('0x25')](handleEntityNotFound(_0x363b6e,null))[_0x9582('0x25')](saveUpdates(_0x27de32['body'],null))[_0x9582('0x25')](respondWithResult(_0x363b6e,null))[_0x9582('0x44')](handleError(_0x363b6e,null));};exports[_0x9582('0x4c')]=function(_0x8a7a0f,_0x3d2653){return db[_0x9582('0x2b')][_0x9582('0x49')]({'where':{'id':_0x8a7a0f[_0x9582('0x46')]['id']}})[_0x9582('0x25')](handleEntityNotFound(_0x3d2653,null))[_0x9582('0x25')](removeEntity(_0x3d2653,null))['catch'](handleError(_0x3d2653,null));};
\ No newline at end of file
+var _0x945e=['../../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','apply','save','update','destroy','then','stack','name','index','map','SquareMessage','rawAttributes','fieldName','type','key','model','query','keys','filters','length','attributes','nolimit','sort','where','pick','merge','VIRTUAL','includeAll','include','findAll','rows','intersection','fields','find','create','body','catch','params','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service'];(function(_0x136a60,_0x5bb51b){var _0xc72bc2=function(_0xdc9201){while(--_0xdc9201){_0x136a60['push'](_0x136a60['shift']());}};_0xc72bc2(++_0x5bb51b);}(_0x945e,0xca));var _0xe945=function(_0xd0b415,_0x149675){_0xd0b415=_0xd0b415-0x0;var _0x2bdf2c=_0x945e[_0xd0b415];return _0x2bdf2c;};'use strict';var emlformat=require(_0xe945('0x0'));var rimraf=require(_0xe945('0x1'));var zipdir=require(_0xe945('0x2'));var jsonpatch=require(_0xe945('0x3'));var rp=require(_0xe945('0x4'));var moment=require(_0xe945('0x5'));var BPromise=require(_0xe945('0x6'));var Mustache=require(_0xe945('0x7'));var util=require(_0xe945('0x8'));var path=require('path');var sox=require(_0xe945('0x9'));var csv=require(_0xe945('0xa'));var ejs=require(_0xe945('0xb'));var fs=require('fs');var fs_extra=require(_0xe945('0xc'));var _=require(_0xe945('0xd'));var squel=require(_0xe945('0xe'));var crypto=require(_0xe945('0xf'));var jsforce=require(_0xe945('0x10'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xe945('0x11'));var Redis=require(_0xe945('0x12'));var authService=require(_0xe945('0x13'));var qs=require(_0xe945('0x14'));var as=require(_0xe945('0x15'));var hardwareService=require(_0xe945('0x16'));var logger=require(_0xe945('0x17'))(_0xe945('0x18'));var utils=require(_0xe945('0x19'));var config=require(_0xe945('0x1a'));var licenseUtil=require(_0xe945('0x1b'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x54266d,_0xb9b789){_0xb9b789=_0xb9b789||0xcc;return function(_0x5d9731){if(_0x5d9731){return _0x54266d[_0xe945('0x1c')](_0xb9b789);}return _0x54266d[_0xe945('0x1d')](_0xb9b789)[_0xe945('0x1e')]();};}function respondWithResult(_0x277a80,_0x123362){_0x123362=_0x123362||0xc8;return function(_0x477827){if(_0x477827){return _0x277a80['status'](_0x123362)[_0xe945('0x1f')](_0x477827);}};}function respondWithFilteredResult(_0x1b0130,_0x4fe162){return function(_0x11d1c3){if(_0x11d1c3){var _0x20042f=typeof _0x4fe162[_0xe945('0x20')]===_0xe945('0x21')&&typeof _0x4fe162[_0xe945('0x22')]===_0xe945('0x21');var _0x5c82f9=_0x11d1c3[_0xe945('0x23')];var _0xfbf1f5=_0x20042f?0x0:_0x4fe162[_0xe945('0x20')];var _0x5c438d=_0x20042f?_0x11d1c3[_0xe945('0x23')]:_0x4fe162[_0xe945('0x20')]+_0x4fe162[_0xe945('0x22')];var _0x23d833;if(_0x5c438d>=_0x5c82f9){_0x5c438d=_0x5c82f9;_0x23d833=0xc8;}else{_0x23d833=0xce;}_0x1b0130[_0xe945('0x1d')](_0x23d833);return _0x1b0130[_0xe945('0x24')]('Content-Range',_0xfbf1f5+'-'+_0x5c438d+'/'+_0x5c82f9)['json'](_0x11d1c3);}return null;};}function patchUpdates(_0x194a4a){return function(_0x4572ab){try{jsonpatch[_0xe945('0x25')](_0x4572ab,_0x194a4a,!![]);}catch(_0x4b3507){return BPromise['reject'](_0x4b3507);}return _0x4572ab[_0xe945('0x26')]();};}function saveUpdates(_0x5bd12e,_0x432d7e){return function(_0x3b1a2c){if(_0x3b1a2c){return _0x3b1a2c[_0xe945('0x27')](_0x5bd12e)['then'](function(_0x4d927c){return _0x4d927c;});}return null;};}function removeEntity(_0x10e890,_0x231673){return function(_0x71fc74){if(_0x71fc74){return _0x71fc74[_0xe945('0x28')]()[_0xe945('0x29')](function(){_0x10e890[_0xe945('0x1d')](0xcc)[_0xe945('0x1e')]();});}};}function handleEntityNotFound(_0x55efc5,_0x260fbc){return function(_0x1aee5b){if(!_0x1aee5b){_0x55efc5[_0xe945('0x1c')](0x194);}return _0x1aee5b;};}function handleError(_0x19307b,_0x246fc2){_0x246fc2=_0x246fc2||0x1f4;return function(_0xc58f1f){logger['error'](_0xc58f1f[_0xe945('0x2a')]);if(_0xc58f1f[_0xe945('0x2b')]){delete _0xc58f1f[_0xe945('0x2b')];}_0x19307b[_0xe945('0x1d')](_0x246fc2)['send'](_0xc58f1f);};}exports[_0xe945('0x2c')]=function(_0x5c0ec9,_0x108868){var _0x3ade55={},_0x5e76f3={},_0x5b002d={'count':0x0,'rows':[]};var _0x430e2f=_[_0xe945('0x2d')](db[_0xe945('0x2e')][_0xe945('0x2f')],function(_0x3d16f7){return{'name':_0x3d16f7[_0xe945('0x30')],'type':_0x3d16f7[_0xe945('0x31')][_0xe945('0x32')]};});_0x5e76f3[_0xe945('0x33')]=_[_0xe945('0x2d')](_0x430e2f,'name');_0x5e76f3[_0xe945('0x34')]=_[_0xe945('0x35')](_0x5c0ec9['query']);_0x5e76f3[_0xe945('0x36')]=_['intersection'](_0x5e76f3[_0xe945('0x33')],_0x5e76f3[_0xe945('0x34')]);_0x3ade55['attributes']=_['intersection'](_0x5e76f3['model'],qs['fields'](_0x5c0ec9[_0xe945('0x34')]['fields']));_0x3ade55['attributes']=_0x3ade55['attributes'][_0xe945('0x37')]?_0x3ade55[_0xe945('0x38')]:_0x5e76f3[_0xe945('0x33')];if(!_0x5c0ec9[_0xe945('0x34')]['hasOwnProperty'](_0xe945('0x39'))){_0x3ade55[_0xe945('0x22')]=qs[_0xe945('0x22')](_0x5c0ec9[_0xe945('0x34')]['limit']);_0x3ade55['offset']=qs[_0xe945('0x20')](_0x5c0ec9[_0xe945('0x34')][_0xe945('0x20')]);}_0x3ade55['order']=qs[_0xe945('0x3a')](_0x5c0ec9[_0xe945('0x34')][_0xe945('0x3a')]);_0x3ade55[_0xe945('0x3b')]=qs[_0xe945('0x36')](_[_0xe945('0x3c')](_0x5c0ec9[_0xe945('0x34')],_0x5e76f3[_0xe945('0x36')]),_0x430e2f);if(_0x5c0ec9[_0xe945('0x34')]['filter']){_0x3ade55['where']=_[_0xe945('0x3d')](_0x3ade55[_0xe945('0x3b')],{'$or':_[_0xe945('0x2d')](_0x430e2f,function(_0x465c5e){if(_0x465c5e[_0xe945('0x31')]!==_0xe945('0x3e')){var _0x18a917={};_0x18a917[_0x465c5e[_0xe945('0x2b')]]={'$like':'%'+_0x5c0ec9[_0xe945('0x34')]['filter']+'%'};return _0x18a917;}})});}_0x3ade55=_['merge']({},_0x3ade55,_0x5c0ec9['options']);var _0x17cc66={'where':_0x3ade55['where']};return db[_0xe945('0x2e')][_0xe945('0x23')](_0x17cc66)['then'](function(_0x3e1ed3){_0x5b002d[_0xe945('0x23')]=_0x3e1ed3;if(_0x5c0ec9[_0xe945('0x34')][_0xe945('0x3f')]){_0x3ade55[_0xe945('0x40')]=[{'all':!![]}];}return db[_0xe945('0x2e')][_0xe945('0x41')](_0x3ade55);})[_0xe945('0x29')](function(_0x11ce99){_0x5b002d[_0xe945('0x42')]=_0x11ce99;return _0x5b002d;})[_0xe945('0x29')](respondWithFilteredResult(_0x108868,_0x3ade55))['catch'](handleError(_0x108868,null));};exports['show']=function(_0x557513,_0x5aa681){var _0x4ca906={'raw':!![],'where':{'id':_0x557513['params']['id']}},_0x19f448={};_0x19f448[_0xe945('0x33')]=_[_0xe945('0x35')](db['SquareMessage'][_0xe945('0x2f')]);_0x19f448[_0xe945('0x34')]=_[_0xe945('0x35')](_0x557513[_0xe945('0x34')]);_0x19f448['filters']=_['intersection'](_0x19f448['model'],_0x19f448['query']);_0x4ca906[_0xe945('0x38')]=_[_0xe945('0x43')](_0x19f448[_0xe945('0x33')],qs[_0xe945('0x44')](_0x557513[_0xe945('0x34')][_0xe945('0x44')]));_0x4ca906[_0xe945('0x38')]=_0x4ca906[_0xe945('0x38')][_0xe945('0x37')]?_0x4ca906['attributes']:_0x19f448[_0xe945('0x33')];if(_0x557513[_0xe945('0x34')][_0xe945('0x3f')]){_0x4ca906[_0xe945('0x40')]=[{'all':!![]}];}_0x4ca906=_[_0xe945('0x3d')]({},_0x4ca906,_0x557513['options']);return db[_0xe945('0x2e')][_0xe945('0x45')](_0x4ca906)[_0xe945('0x29')](handleEntityNotFound(_0x5aa681,null))[_0xe945('0x29')](respondWithResult(_0x5aa681,null))['catch'](handleError(_0x5aa681,null));};exports[_0xe945('0x46')]=function(_0x4c59e4,_0x402017){return db['SquareMessage'][_0xe945('0x46')](_0x4c59e4[_0xe945('0x47')],{})[_0xe945('0x29')](respondWithResult(_0x402017,0xc9))[_0xe945('0x48')](handleError(_0x402017,null));};exports[_0xe945('0x27')]=function(_0x327d07,_0x5671ee){if(_0x327d07[_0xe945('0x47')]['id']){delete _0x327d07[_0xe945('0x47')]['id'];}return db[_0xe945('0x2e')][_0xe945('0x45')]({'where':{'id':_0x327d07[_0xe945('0x49')]['id']}})[_0xe945('0x29')](handleEntityNotFound(_0x5671ee,null))['then'](saveUpdates(_0x327d07[_0xe945('0x47')],null))[_0xe945('0x29')](respondWithResult(_0x5671ee,null))[_0xe945('0x48')](handleError(_0x5671ee,null));};exports['destroy']=function(_0x571ec4,_0x2dd372){return db[_0xe945('0x2e')][_0xe945('0x45')]({'where':{'id':_0x571ec4[_0xe945('0x49')]['id']}})[_0xe945('0x29')](handleEntityNotFound(_0x2dd372,null))[_0xe945('0x29')](removeEntity(_0x2dd372,null))[_0xe945('0x48')](handleError(_0x2dd372,null));};
\ No newline at end of file
index 7c960b7..cb58a60 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8f86=['rimraf','exports','define','SquareMessage','square_messages','lodash','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x5416db,_0x55683a){var _0x243e35=function(_0x1eb623){while(--_0x1eb623){_0x5416db['push'](_0x5416db['shift']());}};_0x243e35(++_0x55683a);}(_0x8f86,0x1b2));var _0x68f8=function(_0x53b13c,_0x30a404){_0x53b13c=_0x53b13c-0x0;var _0x1910d1=_0x8f86[_0x53b13c];return _0x1910d1;};'use strict';var _=require(_0x68f8('0x0'));var util=require('util');var logger=require(_0x68f8('0x1'))(_0x68f8('0x2'));var moment=require(_0x68f8('0x3'));var BPromise=require(_0x68f8('0x4'));var rp=require(_0x68f8('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x68f8('0x6'));var config=require('../../config/environment');var attributes=require('./squareMessage.attributes');module[_0x68f8('0x7')]=function(_0x2c31ca,_0xb86be4){return _0x2c31ca[_0x68f8('0x8')](_0x68f8('0x9'),attributes,{'tableName':_0x68f8('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xff2c=['SquareMessage','square_messages','util','../../config/logger','api','bluebird','path','rimraf','../../config/environment','./squareMessage.attributes','exports'];(function(_0xb1fda4,_0x2a544c){var _0x416f5d=function(_0x130a89){while(--_0x130a89){_0xb1fda4['push'](_0xb1fda4['shift']());}};_0x416f5d(++_0x2a544c);}(_0xff2c,0x18e));var _0xcff2=function(_0x220dbb,_0x99328d){_0x220dbb=_0x220dbb-0x0;var _0x2b77de=_0xff2c[_0x220dbb];return _0x2b77de;};'use strict';var _=require('lodash');var util=require(_0xcff2('0x0'));var logger=require(_0xcff2('0x1'))(_0xcff2('0x2'));var moment=require('moment');var BPromise=require(_0xcff2('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xcff2('0x4'));var rimraf=require(_0xcff2('0x5'));var config=require(_0xcff2('0x6'));var attributes=require(_0xcff2('0x7'));module[_0xcff2('0x8')]=function(_0x1904d3,_0x18fa37){return _0x1904d3['define'](_0xcff2('0x9'),attributes,{'tableName':_0xcff2('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 005b57a..40b4cb9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1820=['info','SquareMessage,\x20%s,\x20%s','request\x20sent','debug','SquareMessage,\x20%s,\x20%s,\x20%s','error','code','message','result','CreateSquareMessage','SquareMessage','body','options','catch','lodash','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then'];(function(_0x5c3c30,_0x5d3ce9){var _0x5b77dc=function(_0x4d21b1){while(--_0x4d21b1){_0x5c3c30['push'](_0x5c3c30['shift']());}};_0x5b77dc(++_0x5d3ce9);}(_0x1820,0x188));var _0x0182=function(_0xbb091,_0x3fe7ee){_0xbb091=_0xbb091-0x0;var _0x467a04=_0x1820[_0xbb091];return _0x467a04;};'use strict';var _=require(_0x0182('0x0'));var util=require(_0x0182('0x1'));var moment=require('moment');var BPromise=require(_0x0182('0x2'));var rs=require(_0x0182('0x3'));var fs=require('fs');var Redis=require(_0x0182('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x0182('0x5'));var logger=require(_0x0182('0x6'))(_0x0182('0x7'));var config=require(_0x0182('0x8'));var jayson=require(_0x0182('0x9'));var client=jayson[_0x0182('0xa')][_0x0182('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1e02c5,_0x33d656,_0x8cd44f){return new BPromise(function(_0x465e3a,_0x4d1cef){return client['request'](_0x1e02c5,_0x8cd44f)[_0x0182('0xc')](function(_0x184e34){logger[_0x0182('0xd')](_0x0182('0xe'),_0x33d656,_0x0182('0xf'));logger[_0x0182('0x10')](_0x0182('0x11'),_0x33d656,'request\x20sent',JSON['stringify'](_0x184e34));if(_0x184e34[_0x0182('0x12')]){if(_0x184e34[_0x0182('0x12')][_0x0182('0x13')]===0x1f4){logger['error'](_0x0182('0xe'),_0x33d656,_0x184e34['error'][_0x0182('0x14')]);return _0x4d1cef(_0x184e34[_0x0182('0x12')][_0x0182('0x14')]);}logger[_0x0182('0x12')](_0x0182('0xe'),_0x33d656,_0x184e34['error']['message']);return _0x465e3a(_0x184e34['error']['message']);}else{logger[_0x0182('0xd')](_0x0182('0xe'),_0x33d656,_0x0182('0xf'));_0x465e3a(_0x184e34[_0x0182('0x15')]['message']);}})['catch'](function(_0x354c20){logger[_0x0182('0x12')](_0x0182('0xe'),_0x33d656,_0x354c20);_0x4d1cef(_0x354c20);});});}exports[_0x0182('0x16')]=function(_0x384729){var _0x2dcb2f=this;return new Promise(function(_0x3976ba,_0x55941a){return db[_0x0182('0x17')]['create'](_0x384729[_0x0182('0x18')],{'raw':_0x384729[_0x0182('0x19')]?_0x384729[_0x0182('0x19')]['raw']===undefined?!![]:![]:!![]})[_0x0182('0xc')](function(_0x3a5ddd){logger[_0x0182('0xd')](_0x0182('0x16'),_0x384729);logger[_0x0182('0x10')](_0x0182('0x16'),_0x384729,JSON['stringify'](_0x3a5ddd));_0x3976ba(_0x3a5ddd);})[_0x0182('0x1a')](function(_0x144c62){logger[_0x0182('0x12')](_0x0182('0x16'),_0x144c62['message'],_0x384729);_0x55941a(_0x2dcb2f['error'](0x1f4,_0x144c62[_0x0182('0x14')]));});});};
\ No newline at end of file
+var _0xb5d4=['../../config/environment','client','http','request','info','SquareMessage,\x20%s,\x20%s','request\x20sent','SquareMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','create','body','options','CreateSquareMessage','debug','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x80d733,_0x266211){var _0x435868=function(_0x2ae0f0){while(--_0x2ae0f0){_0x80d733['push'](_0x80d733['shift']());}};_0x435868(++_0x266211);}(_0xb5d4,0x156));var _0x4b5d=function(_0x5b08dc,_0x4a8a21){_0x5b08dc=_0x5b08dc-0x0;var _0x3b57c4=_0xb5d4[_0x5b08dc];return _0x3b57c4;};'use strict';var _=require('lodash');var util=require(_0x4b5d('0x0'));var moment=require(_0x4b5d('0x1'));var BPromise=require(_0x4b5d('0x2'));var rs=require(_0x4b5d('0x3'));var fs=require('fs');var Redis=require(_0x4b5d('0x4'));var db=require(_0x4b5d('0x5'))['db'];var utils=require(_0x4b5d('0x6'));var logger=require(_0x4b5d('0x7'))(_0x4b5d('0x8'));var config=require(_0x4b5d('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x4b5d('0xa')][_0x4b5d('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x24e349,_0xdb78da,_0x1c6ff5){return new BPromise(function(_0x3794fc,_0x296b91){return client[_0x4b5d('0xc')](_0x24e349,_0x1c6ff5)['then'](function(_0x4dc94e){logger[_0x4b5d('0xd')](_0x4b5d('0xe'),_0xdb78da,_0x4b5d('0xf'));logger['debug'](_0x4b5d('0x10'),_0xdb78da,_0x4b5d('0xf'),JSON[_0x4b5d('0x11')](_0x4dc94e));if(_0x4dc94e[_0x4b5d('0x12')]){if(_0x4dc94e[_0x4b5d('0x12')][_0x4b5d('0x13')]===0x1f4){logger[_0x4b5d('0x12')]('SquareMessage,\x20%s,\x20%s',_0xdb78da,_0x4dc94e[_0x4b5d('0x12')][_0x4b5d('0x14')]);return _0x296b91(_0x4dc94e[_0x4b5d('0x12')]['message']);}logger['error'](_0x4b5d('0xe'),_0xdb78da,_0x4dc94e[_0x4b5d('0x12')]['message']);return _0x3794fc(_0x4dc94e['error']['message']);}else{logger[_0x4b5d('0xd')](_0x4b5d('0xe'),_0xdb78da,_0x4b5d('0xf'));_0x3794fc(_0x4dc94e['result'][_0x4b5d('0x14')]);}})[_0x4b5d('0x15')](function(_0x46306d){logger[_0x4b5d('0x12')](_0x4b5d('0xe'),_0xdb78da,_0x46306d);_0x296b91(_0x46306d);});});}exports['CreateSquareMessage']=function(_0x5500fc){var _0x298b9f=this;return new Promise(function(_0x3fe9e5,_0x117521){return db['SquareMessage'][_0x4b5d('0x16')](_0x5500fc[_0x4b5d('0x17')],{'raw':_0x5500fc['options']?_0x5500fc[_0x4b5d('0x18')]['raw']===undefined?!![]:![]:!![]})['then'](function(_0x13dc9f){logger['info'](_0x4b5d('0x19'),_0x5500fc);logger[_0x4b5d('0x1a')](_0x4b5d('0x19'),_0x5500fc,JSON[_0x4b5d('0x11')](_0x13dc9f));_0x3fe9e5(_0x13dc9f);})[_0x4b5d('0x15')](function(_0x4ace1e){logger[_0x4b5d('0x12')](_0x4b5d('0x19'),_0x4ace1e[_0x4b5d('0x14')],_0x5500fc);_0x117521(_0x298b9f[_0x4b5d('0x12')](0x1f4,_0x4ace1e[_0x4b5d('0x14')]));});});};
\ No newline at end of file
index e8b1287..528b8b5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x45a8=['../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','/:id/test','15s','test','post','create','put','update','destroy','multer','path','connect-timeout','express','Router'];(function(_0x401184,_0x3fa43d){var _0xd7804c=function(_0x170779){while(--_0x170779){_0x401184['push'](_0x401184['shift']());}};_0xd7804c(++_0x3fa43d);}(_0x45a8,0x1db));var _0x845a=function(_0x4c4626,_0x5e6fcc){_0x4c4626=_0x4c4626-0x0;var _0x48ccac=_0x45a8[_0x4c4626];return _0x48ccac;};'use strict';var multer=require(_0x845a('0x0'));var util=require('util');var path=require(_0x845a('0x1'));var timeout=require(_0x845a('0x2'));var express=require(_0x845a('0x3'));var router=express[_0x845a('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x845a('0x5'));var interaction=require(_0x845a('0x6'));var config=require(_0x845a('0x7'));var controller=require('./squareOdbc.controller');router[_0x845a('0x8')]('/',auth[_0x845a('0x9')](),controller[_0x845a('0xa')]);router[_0x845a('0x8')](_0x845a('0xb'),auth[_0x845a('0x9')](),controller['show']);router['get'](_0x845a('0xc'),auth[_0x845a('0x9')](),timeout(_0x845a('0xd')),controller[_0x845a('0xe')]);router[_0x845a('0xf')]('/',auth[_0x845a('0x9')](),controller[_0x845a('0x10')]);router[_0x845a('0x11')](_0x845a('0xb'),auth['isAuthenticated'](),controller[_0x845a('0x12')]);router['delete'](_0x845a('0xb'),auth['isAuthenticated'](),controller[_0x845a('0x13')]);module['exports']=router;
\ No newline at end of file
+var _0x6d7f=['multer','util','path','connect-timeout','Router','fs-extra','../../components/interaction/service','../../config/environment','./squareOdbc.controller','get','isAuthenticated','index','show','/:id/test','post','create','put','/:id','delete','destroy','exports'];(function(_0x3314cc,_0x158c72){var _0x2ef318=function(_0x280ff7){while(--_0x280ff7){_0x3314cc['push'](_0x3314cc['shift']());}};_0x2ef318(++_0x158c72);}(_0x6d7f,0x93));var _0xf6d7=function(_0x37e089,_0x563882){_0x37e089=_0x37e089-0x0;var _0xed3344=_0x6d7f[_0x37e089];return _0xed3344;};'use strict';var multer=require(_0xf6d7('0x0'));var util=require(_0xf6d7('0x1'));var path=require(_0xf6d7('0x2'));var timeout=require(_0xf6d7('0x3'));var express=require('express');var router=express[_0xf6d7('0x4')]();var fs_extra=require(_0xf6d7('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xf6d7('0x6'));var config=require(_0xf6d7('0x7'));var controller=require(_0xf6d7('0x8'));router[_0xf6d7('0x9')]('/',auth[_0xf6d7('0xa')](),controller[_0xf6d7('0xb')]);router['get']('/:id',auth[_0xf6d7('0xa')](),controller[_0xf6d7('0xc')]);router[_0xf6d7('0x9')](_0xf6d7('0xd'),auth['isAuthenticated'](),timeout('15s'),controller['test']);router[_0xf6d7('0xe')]('/',auth[_0xf6d7('0xa')](),controller[_0xf6d7('0xf')]);router[_0xf6d7('0x10')](_0xf6d7('0x11'),auth['isAuthenticated'](),controller['update']);router[_0xf6d7('0x12')](_0xf6d7('0x11'),auth[_0xf6d7('0xa')](),controller[_0xf6d7('0x13')]);module[_0xf6d7('0x14')]=router;
\ No newline at end of file
index 018dce1..281d9a5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x520f=['exports','STRING'];(function(_0xe262fc,_0x24774e){var _0x597955=function(_0x4463ff){while(--_0x4463ff){_0xe262fc['push'](_0xe262fc['shift']());}};_0x597955(++_0x24774e);}(_0x520f,0x15e));var _0xf520=function(_0x4becb8,_0x4ad3d3){_0x4becb8=_0x4becb8-0x0;var _0x5c8a37=_0x520f[_0x4becb8];return _0x5c8a37;};'use strict';var Sequelize=require('sequelize');module[_0xf520('0x0')]={'name':{'type':Sequelize[_0xf520('0x1')],'unique':'name','allowNull':![]},'dsn':{'type':Sequelize[_0xf520('0x1')]},'description':{'type':Sequelize[_0xf520('0x1')]}};
\ No newline at end of file
+var _0x87b4=['name','sequelize','exports','STRING'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x87b4,0x79));var _0x487b=function(_0x3f0e85,_0x211117){_0x3f0e85=_0x3f0e85-0x0;var _0x43821f=_0x87b4[_0x3f0e85];return _0x43821f;};'use strict';var Sequelize=require(_0x487b('0x0'));module[_0x487b('0x1')]={'name':{'type':Sequelize[_0x487b('0x2')],'unique':_0x487b('0x3'),'allowNull':![]},'dsn':{'type':Sequelize[_0x487b('0x2')]},'description':{'type':Sequelize[_0x487b('0x2')]}};
\ No newline at end of file
index 02b8521..a97be52 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x89a8=['Content-Range','apply','save','update','then','destroy','get','ODBC','error','name','send','index','map','SquareOdbc','rawAttributes','type','model','keys','query','filters','intersection','attributes','fields','length','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','catch','show','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','find','userProfileId','body','params','test','dsn','odbc','openSync','closeSync','eml-format','request-promise','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','api','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count'];(function(_0x11f1d7,_0x232d9f){var _0x41b43f=function(_0x2ce8c7){while(--_0x2ce8c7){_0x11f1d7['push'](_0x11f1d7['shift']());}};_0x41b43f(++_0x232d9f);}(_0x89a8,0x81));var _0x889a=function(_0x20a761,_0x2ffd85){_0x20a761=_0x20a761-0x0;var _0x284a38=_0x89a8[_0x20a761];return _0x284a38;};'use strict';var emlformat=require(_0x889a('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x889a('0x1'));var moment=require(_0x889a('0x2'));var BPromise=require(_0x889a('0x3'));var Mustache=require(_0x889a('0x4'));var util=require(_0x889a('0x5'));var path=require(_0x889a('0x6'));var sox=require(_0x889a('0x7'));var csv=require('to-csv');var ejs=require(_0x889a('0x8'));var fs=require('fs');var fs_extra=require(_0x889a('0x9'));var _=require('lodash');var squel=require(_0x889a('0xa'));var crypto=require('crypto');var jsforce=require(_0x889a('0xb'));var deskjs=require(_0x889a('0xc'));var toCsv=require(_0x889a('0xd'));var querystring=require(_0x889a('0xe'));var Papa=require(_0x889a('0xf'));var Redis=require(_0x889a('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x889a('0x11'));var as=require(_0x889a('0x12'));var hardwareService=require(_0x889a('0x13'));var logger=require('../../config/logger')(_0x889a('0x14'));var utils=require('../../config/utils');var config=require(_0x889a('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x889a('0x16'))['db'];function respondWithStatusCode(_0x43d62d,_0xbace6e){_0xbace6e=_0xbace6e||0xcc;return function(_0x172d12){if(_0x172d12){return _0x43d62d[_0x889a('0x17')](_0xbace6e);}return _0x43d62d[_0x889a('0x18')](_0xbace6e)[_0x889a('0x19')]();};}function respondWithResult(_0x1e7127,_0xda1c88){_0xda1c88=_0xda1c88||0xc8;return function(_0x3081c7){if(_0x3081c7){return _0x1e7127['status'](_0xda1c88)[_0x889a('0x1a')](_0x3081c7);}};}function respondWithFilteredResult(_0x300086,_0x3c759e){return function(_0x4c2497){if(_0x4c2497){var _0x136a7b=typeof _0x3c759e[_0x889a('0x1b')]===_0x889a('0x1c')&&typeof _0x3c759e[_0x889a('0x1d')]==='undefined';var _0x16d0df=_0x4c2497[_0x889a('0x1e')];var _0x3540df=_0x136a7b?0x0:_0x3c759e[_0x889a('0x1b')];var _0x3050f6=_0x136a7b?_0x4c2497['count']:_0x3c759e[_0x889a('0x1b')]+_0x3c759e[_0x889a('0x1d')];var _0x348f9;if(_0x3050f6>=_0x16d0df){_0x3050f6=_0x16d0df;_0x348f9=0xc8;}else{_0x348f9=0xce;}_0x300086[_0x889a('0x18')](_0x348f9);return _0x300086['set'](_0x889a('0x1f'),_0x3540df+'-'+_0x3050f6+'/'+_0x16d0df)[_0x889a('0x1a')](_0x4c2497);}return null;};}function patchUpdates(_0x76bb65){return function(_0x49e032){try{jsonpatch[_0x889a('0x20')](_0x49e032,_0x76bb65,!![]);}catch(_0x6c3853){return BPromise['reject'](_0x6c3853);}return _0x49e032[_0x889a('0x21')]();};}function saveUpdates(_0x15e02c,_0x5cc698){return function(_0x4e137e){if(_0x4e137e){return _0x4e137e[_0x889a('0x22')](_0x15e02c)[_0x889a('0x23')](function(_0x52e1e9){return _0x52e1e9;});}return null;};}function removeEntity(_0x3c38c6,_0x368ebe){return function(_0x1e41b4){if(_0x1e41b4){return _0x1e41b4[_0x889a('0x24')]()['then'](function(){var _0x1854df=_0x1e41b4[_0x889a('0x25')]({'plain':!![]});var _0x14eb0d=_0x889a('0x26');return db['UserProfileResource']['destroy']({'where':{'type':_0x14eb0d,'resourceId':_0x1854df['id']}})[_0x889a('0x23')](function(){return _0x1e41b4;});})[_0x889a('0x23')](function(){_0x3c38c6[_0x889a('0x18')](0xcc)[_0x889a('0x19')]();});}};}function handleEntityNotFound(_0x34adaa,_0x45a63b){return function(_0x494230){if(!_0x494230){_0x34adaa[_0x889a('0x17')](0x194);}return _0x494230;};}function handleError(_0x59f651,_0x2fcb16){_0x2fcb16=_0x2fcb16||0x1f4;return function(_0x3c08f3){logger[_0x889a('0x27')](_0x3c08f3['stack']);if(_0x3c08f3['name']){delete _0x3c08f3[_0x889a('0x28')];}_0x59f651['status'](_0x2fcb16)[_0x889a('0x29')](_0x3c08f3);};}exports[_0x889a('0x2a')]=function(_0x10db4a,_0x54a395){var _0x30896e={},_0x3b560f={},_0x11ea37={'count':0x0,'rows':[]};var _0x7b48b7=_[_0x889a('0x2b')](db[_0x889a('0x2c')][_0x889a('0x2d')],function(_0x16bc25){return{'name':_0x16bc25['fieldName'],'type':_0x16bc25[_0x889a('0x2e')]['key']};});_0x3b560f[_0x889a('0x2f')]=_[_0x889a('0x2b')](_0x7b48b7,_0x889a('0x28'));_0x3b560f['query']=_[_0x889a('0x30')](_0x10db4a[_0x889a('0x31')]);_0x3b560f[_0x889a('0x32')]=_[_0x889a('0x33')](_0x3b560f[_0x889a('0x2f')],_0x3b560f[_0x889a('0x31')]);_0x30896e[_0x889a('0x34')]=_[_0x889a('0x33')](_0x3b560f[_0x889a('0x2f')],qs[_0x889a('0x35')](_0x10db4a[_0x889a('0x31')][_0x889a('0x35')]));_0x30896e['attributes']=_0x30896e[_0x889a('0x34')][_0x889a('0x36')]?_0x30896e[_0x889a('0x34')]:_0x3b560f[_0x889a('0x2f')];if(!_0x10db4a[_0x889a('0x31')]['hasOwnProperty'](_0x889a('0x37'))){_0x30896e[_0x889a('0x1d')]=qs['limit'](_0x10db4a[_0x889a('0x31')][_0x889a('0x1d')]);_0x30896e['offset']=qs[_0x889a('0x1b')](_0x10db4a[_0x889a('0x31')][_0x889a('0x1b')]);}_0x30896e['order']=qs[_0x889a('0x38')](_0x10db4a[_0x889a('0x31')][_0x889a('0x38')]);_0x30896e[_0x889a('0x39')]=qs[_0x889a('0x32')](_[_0x889a('0x3a')](_0x10db4a['query'],_0x3b560f['filters']),_0x7b48b7);if(_0x10db4a[_0x889a('0x31')][_0x889a('0x3b')]){_0x30896e[_0x889a('0x39')]=_[_0x889a('0x3c')](_0x30896e[_0x889a('0x39')],{'$or':_['map'](_0x7b48b7,function(_0x2f6bd2){if(_0x2f6bd2[_0x889a('0x2e')]!==_0x889a('0x3d')){var _0x2ba3d6={};_0x2ba3d6[_0x2f6bd2[_0x889a('0x28')]]={'$like':'%'+_0x10db4a['query']['filter']+'%'};return _0x2ba3d6;}})});}_0x30896e=_[_0x889a('0x3c')]({},_0x30896e,_0x10db4a[_0x889a('0x3e')]);var _0x2976d6={'where':_0x30896e[_0x889a('0x39')]};return db[_0x889a('0x2c')]['count'](_0x2976d6)[_0x889a('0x23')](function(_0x47c53b){_0x11ea37[_0x889a('0x1e')]=_0x47c53b;if(_0x10db4a[_0x889a('0x31')][_0x889a('0x3f')]){_0x30896e[_0x889a('0x40')]=[{'all':!![]}];}return db[_0x889a('0x2c')]['findAll'](_0x30896e);})[_0x889a('0x23')](function(_0x359180){_0x11ea37['rows']=_0x359180;return _0x11ea37;})[_0x889a('0x23')](respondWithFilteredResult(_0x54a395,_0x30896e))[_0x889a('0x41')](handleError(_0x54a395,null));};exports[_0x889a('0x42')]=function(_0x5b9df3,_0x4982c3){var _0x404298={'raw':!![],'where':{'id':_0x5b9df3['params']['id']}},_0x45efde={};_0x45efde['model']=_[_0x889a('0x30')](db[_0x889a('0x2c')][_0x889a('0x2d')]);_0x45efde[_0x889a('0x31')]=_['keys'](_0x5b9df3[_0x889a('0x31')]);_0x45efde[_0x889a('0x32')]=_['intersection'](_0x45efde['model'],_0x45efde[_0x889a('0x31')]);_0x404298[_0x889a('0x34')]=_[_0x889a('0x33')](_0x45efde[_0x889a('0x2f')],qs[_0x889a('0x35')](_0x5b9df3[_0x889a('0x31')]['fields']));_0x404298[_0x889a('0x34')]=_0x404298[_0x889a('0x34')]['length']?_0x404298[_0x889a('0x34')]:_0x45efde[_0x889a('0x2f')];if(_0x5b9df3['query'][_0x889a('0x3f')]){_0x404298[_0x889a('0x40')]=[{'all':!![]}];}_0x404298=_[_0x889a('0x3c')]({},_0x404298,_0x5b9df3[_0x889a('0x3e')]);return db[_0x889a('0x2c')]['find'](_0x404298)[_0x889a('0x23')](handleEntityNotFound(_0x4982c3,null))[_0x889a('0x23')](respondWithResult(_0x4982c3,null))[_0x889a('0x41')](handleError(_0x4982c3,null));};exports[_0x889a('0x43')]=function(_0x35eff6,_0x2b2397){return db[_0x889a('0x2c')][_0x889a('0x43')](_0x35eff6['body'],{})[_0x889a('0x23')](function(_0x1e20e4){var _0x1da57f=_0x35eff6[_0x889a('0x44')]['get']({'plain':!![]});if(!_0x1da57f)throw new Error(_0x889a('0x45'));if(_0x1da57f[_0x889a('0x46')]==='user'){var _0x658767=_0x1e20e4['get']({'plain':!![]});var _0x3a3858=_0x889a('0x26');return db['UserProfileSection'][_0x889a('0x47')]({'where':{'name':_0x3a3858,'userProfileId':_0x1da57f[_0x889a('0x48')]},'raw':!![]})[_0x889a('0x23')](function(_0x4d3128){if(_0x4d3128&&_0x4d3128['autoAssociation']===0x0){return db['UserProfileResource']['create']({'name':_0x658767[_0x889a('0x28')],'resourceId':_0x658767['id'],'type':_0x4d3128[_0x889a('0x28')],'sectionId':_0x4d3128['id']},{})[_0x889a('0x23')](function(){return _0x1e20e4;});}else{return _0x1e20e4;}})[_0x889a('0x41')](function(_0x6430eb){logger[_0x889a('0x27')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x6430eb);throw _0x6430eb;});}return _0x1e20e4;})['then'](respondWithResult(_0x2b2397,0xc9))['catch'](handleError(_0x2b2397,null));};exports[_0x889a('0x22')]=function(_0x2cab13,_0x3551d8){if(_0x2cab13[_0x889a('0x49')]['id']){delete _0x2cab13[_0x889a('0x49')]['id'];}return db[_0x889a('0x2c')][_0x889a('0x47')]({'where':{'id':_0x2cab13[_0x889a('0x4a')]['id']}})[_0x889a('0x23')](handleEntityNotFound(_0x3551d8,null))['then'](saveUpdates(_0x2cab13[_0x889a('0x49')],null))['then'](respondWithResult(_0x3551d8,null))[_0x889a('0x41')](handleError(_0x3551d8,null));};exports['destroy']=function(_0x585476,_0x1ea5d5){return db['SquareOdbc'][_0x889a('0x47')]({'where':{'id':_0x585476[_0x889a('0x4a')]['id']}})[_0x889a('0x23')](handleEntityNotFound(_0x1ea5d5,null))[_0x889a('0x23')](removeEntity(_0x1ea5d5,null))[_0x889a('0x41')](handleError(_0x1ea5d5,null));};exports[_0x889a('0x4b')]=function(_0x571d05,_0x29e3a5,_0x47b8cd){var _0x228d05;return db[_0x889a('0x2c')]['find']({'where':{'id':_0x571d05[_0x889a('0x4a')]['id']},'attributes':['id',_0x889a('0x4c')]})[_0x889a('0x23')](handleEntityNotFound(_0x29e3a5,null))[_0x889a('0x23')](function(_0x4b5a2c){if(_0x4b5a2c){var _0x14ee95=require(_0x889a('0x4d'))();_0x14ee95[_0x889a('0x4e')](_0x4b5a2c[_0x889a('0x4c')]);_0x14ee95[_0x889a('0x4f')]();return _0x4b5a2c;}})[_0x889a('0x23')](respondWithResult(_0x29e3a5,null))[_0x889a('0x41')](handleError(_0x29e3a5,null));};
\ No newline at end of file
+var _0x0af5=['fast-json-patch','moment','bluebird','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','set','apply','reject','save','update','then','destroy','get','UserProfileResource','end','error','stack','name','send','map','SquareOdbc','fieldName','type','key','query','keys','filters','model','attributes','intersection','fields','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','count','includeAll','include','findAll','show','params','rawAttributes','length','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','dsn','closeSync','rimraf','zip-dir'];(function(_0x19d4f7,_0x41145f){var _0x3772fa=function(_0x2b1cbc){while(--_0x2b1cbc){_0x19d4f7['push'](_0x19d4f7['shift']());}};_0x3772fa(++_0x41145f);}(_0x0af5,0xa8));var _0x50af=function(_0x110d47,_0xa70e64){_0x110d47=_0x110d47-0x0;var _0x10c084=_0x0af5[_0x110d47];return _0x10c084;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x50af('0x0'));var zipdir=require(_0x50af('0x1'));var jsonpatch=require(_0x50af('0x2'));var rp=require('request-promise');var moment=require(_0x50af('0x3'));var BPromise=require(_0x50af('0x4'));var Mustache=require('mustache');var util=require('util');var path=require(_0x50af('0x5'));var sox=require('sox');var csv=require(_0x50af('0x6'));var ejs=require(_0x50af('0x7'));var fs=require('fs');var fs_extra=require(_0x50af('0x8'));var _=require(_0x50af('0x9'));var squel=require(_0x50af('0xa'));var crypto=require(_0x50af('0xb'));var jsforce=require(_0x50af('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x50af('0x6'));var querystring=require(_0x50af('0xd'));var Papa=require(_0x50af('0xe'));var Redis=require('ioredis');var authService=require(_0x50af('0xf'));var qs=require(_0x50af('0x10'));var as=require(_0x50af('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x50af('0x12'))('api');var utils=require(_0x50af('0x13'));var config=require(_0x50af('0x14'));var licenseUtil=require(_0x50af('0x15'));var db=require(_0x50af('0x16'))['db'];function respondWithStatusCode(_0x41978e,_0x5e0d43){_0x5e0d43=_0x5e0d43||0xcc;return function(_0x36f4d0){if(_0x36f4d0){return _0x41978e[_0x50af('0x17')](_0x5e0d43);}return _0x41978e[_0x50af('0x18')](_0x5e0d43)['end']();};}function respondWithResult(_0x4f9e4b,_0x3f33f2){_0x3f33f2=_0x3f33f2||0xc8;return function(_0x165971){if(_0x165971){return _0x4f9e4b['status'](_0x3f33f2)[_0x50af('0x19')](_0x165971);}};}function respondWithFilteredResult(_0x35e35b,_0x2b0040){return function(_0x23ff2c){if(_0x23ff2c){var _0xb77ccb=typeof _0x2b0040[_0x50af('0x1a')]===_0x50af('0x1b')&&typeof _0x2b0040[_0x50af('0x1c')]==='undefined';var _0x4a99bd=_0x23ff2c['count'];var _0x178806=_0xb77ccb?0x0:_0x2b0040[_0x50af('0x1a')];var _0x2bbfb9=_0xb77ccb?_0x23ff2c['count']:_0x2b0040['offset']+_0x2b0040[_0x50af('0x1c')];var _0x807a3b;if(_0x2bbfb9>=_0x4a99bd){_0x2bbfb9=_0x4a99bd;_0x807a3b=0xc8;}else{_0x807a3b=0xce;}_0x35e35b['status'](_0x807a3b);return _0x35e35b[_0x50af('0x1d')]('Content-Range',_0x178806+'-'+_0x2bbfb9+'/'+_0x4a99bd)[_0x50af('0x19')](_0x23ff2c);}return null;};}function patchUpdates(_0x7744a){return function(_0x784e22){try{jsonpatch[_0x50af('0x1e')](_0x784e22,_0x7744a,!![]);}catch(_0x106b14){return BPromise[_0x50af('0x1f')](_0x106b14);}return _0x784e22[_0x50af('0x20')]();};}function saveUpdates(_0xc208f7,_0x41a00a){return function(_0x35708c){if(_0x35708c){return _0x35708c[_0x50af('0x21')](_0xc208f7)[_0x50af('0x22')](function(_0x2b6892){return _0x2b6892;});}return null;};}function removeEntity(_0x2447b0,_0x2afea2){return function(_0x42c14e){if(_0x42c14e){return _0x42c14e[_0x50af('0x23')]()[_0x50af('0x22')](function(){var _0x1e8eb1=_0x42c14e[_0x50af('0x24')]({'plain':!![]});var _0x2d4add='ODBC';return db[_0x50af('0x25')][_0x50af('0x23')]({'where':{'type':_0x2d4add,'resourceId':_0x1e8eb1['id']}})[_0x50af('0x22')](function(){return _0x42c14e;});})[_0x50af('0x22')](function(){_0x2447b0[_0x50af('0x18')](0xcc)[_0x50af('0x26')]();});}};}function handleEntityNotFound(_0x4d001e,_0x4cab40){return function(_0x19ca89){if(!_0x19ca89){_0x4d001e[_0x50af('0x17')](0x194);}return _0x19ca89;};}function handleError(_0x362889,_0x27f75b){_0x27f75b=_0x27f75b||0x1f4;return function(_0x464bb3){logger[_0x50af('0x27')](_0x464bb3[_0x50af('0x28')]);if(_0x464bb3[_0x50af('0x29')]){delete _0x464bb3[_0x50af('0x29')];}_0x362889[_0x50af('0x18')](_0x27f75b)[_0x50af('0x2a')](_0x464bb3);};}exports['index']=function(_0x361b82,_0x51fd04){var _0x2dc8c1={},_0x17e28b={},_0xf9488={'count':0x0,'rows':[]};var _0x2cc277=_[_0x50af('0x2b')](db[_0x50af('0x2c')]['rawAttributes'],function(_0x20e983){return{'name':_0x20e983[_0x50af('0x2d')],'type':_0x20e983[_0x50af('0x2e')][_0x50af('0x2f')]};});_0x17e28b['model']=_[_0x50af('0x2b')](_0x2cc277,'name');_0x17e28b[_0x50af('0x30')]=_[_0x50af('0x31')](_0x361b82['query']);_0x17e28b[_0x50af('0x32')]=_['intersection'](_0x17e28b[_0x50af('0x33')],_0x17e28b[_0x50af('0x30')]);_0x2dc8c1[_0x50af('0x34')]=_[_0x50af('0x35')](_0x17e28b[_0x50af('0x33')],qs[_0x50af('0x36')](_0x361b82[_0x50af('0x30')]['fields']));_0x2dc8c1[_0x50af('0x34')]=_0x2dc8c1[_0x50af('0x34')]['length']?_0x2dc8c1[_0x50af('0x34')]:_0x17e28b['model'];if(!_0x361b82[_0x50af('0x30')]['hasOwnProperty'](_0x50af('0x37'))){_0x2dc8c1['limit']=qs[_0x50af('0x1c')](_0x361b82[_0x50af('0x30')]['limit']);_0x2dc8c1[_0x50af('0x1a')]=qs[_0x50af('0x1a')](_0x361b82[_0x50af('0x30')][_0x50af('0x1a')]);}_0x2dc8c1[_0x50af('0x38')]=qs[_0x50af('0x39')](_0x361b82['query']['sort']);_0x2dc8c1[_0x50af('0x3a')]=qs[_0x50af('0x32')](_[_0x50af('0x3b')](_0x361b82[_0x50af('0x30')],_0x17e28b[_0x50af('0x32')]),_0x2cc277);if(_0x361b82[_0x50af('0x30')][_0x50af('0x3c')]){_0x2dc8c1['where']=_[_0x50af('0x3d')](_0x2dc8c1[_0x50af('0x3a')],{'$or':_[_0x50af('0x2b')](_0x2cc277,function(_0x5aa382){if(_0x5aa382['type']!==_0x50af('0x3e')){var _0x1cbbad={};_0x1cbbad[_0x5aa382[_0x50af('0x29')]]={'$like':'%'+_0x361b82['query'][_0x50af('0x3c')]+'%'};return _0x1cbbad;}})});}_0x2dc8c1=_[_0x50af('0x3d')]({},_0x2dc8c1,_0x361b82[_0x50af('0x3f')]);var _0x131b05={'where':_0x2dc8c1[_0x50af('0x3a')]};return db[_0x50af('0x2c')][_0x50af('0x40')](_0x131b05)[_0x50af('0x22')](function(_0x4c2cc0){_0xf9488[_0x50af('0x40')]=_0x4c2cc0;if(_0x361b82[_0x50af('0x30')][_0x50af('0x41')]){_0x2dc8c1[_0x50af('0x42')]=[{'all':!![]}];}return db[_0x50af('0x2c')][_0x50af('0x43')](_0x2dc8c1);})[_0x50af('0x22')](function(_0x2b5a5c){_0xf9488['rows']=_0x2b5a5c;return _0xf9488;})[_0x50af('0x22')](respondWithFilteredResult(_0x51fd04,_0x2dc8c1))['catch'](handleError(_0x51fd04,null));};exports[_0x50af('0x44')]=function(_0x1a6ad2,_0x41aae1){var _0x5c6dd4={'raw':!![],'where':{'id':_0x1a6ad2[_0x50af('0x45')]['id']}},_0x48781e={};_0x48781e[_0x50af('0x33')]=_[_0x50af('0x31')](db[_0x50af('0x2c')][_0x50af('0x46')]);_0x48781e[_0x50af('0x30')]=_[_0x50af('0x31')](_0x1a6ad2[_0x50af('0x30')]);_0x48781e['filters']=_['intersection'](_0x48781e[_0x50af('0x33')],_0x48781e['query']);_0x5c6dd4[_0x50af('0x34')]=_['intersection'](_0x48781e['model'],qs[_0x50af('0x36')](_0x1a6ad2[_0x50af('0x30')][_0x50af('0x36')]));_0x5c6dd4[_0x50af('0x34')]=_0x5c6dd4[_0x50af('0x34')][_0x50af('0x47')]?_0x5c6dd4['attributes']:_0x48781e['model'];if(_0x1a6ad2['query'][_0x50af('0x41')]){_0x5c6dd4[_0x50af('0x42')]=[{'all':!![]}];}_0x5c6dd4=_[_0x50af('0x3d')]({},_0x5c6dd4,_0x1a6ad2[_0x50af('0x3f')]);return db[_0x50af('0x2c')][_0x50af('0x48')](_0x5c6dd4)[_0x50af('0x22')](handleEntityNotFound(_0x41aae1,null))[_0x50af('0x22')](respondWithResult(_0x41aae1,null))[_0x50af('0x49')](handleError(_0x41aae1,null));};exports['create']=function(_0x275f71,_0x271c91){return db[_0x50af('0x2c')][_0x50af('0x4a')](_0x275f71[_0x50af('0x4b')],{})[_0x50af('0x22')](function(_0x2ca0ee){var _0x46136a=_0x275f71[_0x50af('0x4c')][_0x50af('0x24')]({'plain':!![]});if(!_0x46136a)throw new Error(_0x50af('0x4d'));if(_0x46136a[_0x50af('0x4e')]==='user'){var _0xae8c41=_0x2ca0ee['get']({'plain':!![]});var _0x4d1e1c='ODBC';return db[_0x50af('0x4f')][_0x50af('0x48')]({'where':{'name':_0x4d1e1c,'userProfileId':_0x46136a[_0x50af('0x50')]},'raw':!![]})['then'](function(_0x5a3e56){if(_0x5a3e56&&_0x5a3e56[_0x50af('0x51')]===0x0){return db[_0x50af('0x25')][_0x50af('0x4a')]({'name':_0xae8c41['name'],'resourceId':_0xae8c41['id'],'type':_0x5a3e56[_0x50af('0x29')],'sectionId':_0x5a3e56['id']},{})[_0x50af('0x22')](function(){return _0x2ca0ee;});}else{return _0x2ca0ee;}})['catch'](function(_0x130315){logger['error'](_0x50af('0x52'),_0x130315);throw _0x130315;});}return _0x2ca0ee;})[_0x50af('0x22')](respondWithResult(_0x271c91,0xc9))[_0x50af('0x49')](handleError(_0x271c91,null));};exports[_0x50af('0x21')]=function(_0x23a63f,_0x221c18){if(_0x23a63f['body']['id']){delete _0x23a63f[_0x50af('0x4b')]['id'];}return db[_0x50af('0x2c')]['find']({'where':{'id':_0x23a63f[_0x50af('0x45')]['id']}})[_0x50af('0x22')](handleEntityNotFound(_0x221c18,null))[_0x50af('0x22')](saveUpdates(_0x23a63f[_0x50af('0x4b')],null))[_0x50af('0x22')](respondWithResult(_0x221c18,null))['catch'](handleError(_0x221c18,null));};exports[_0x50af('0x23')]=function(_0x46f62a,_0x38a787){return db['SquareOdbc'][_0x50af('0x48')]({'where':{'id':_0x46f62a[_0x50af('0x45')]['id']}})[_0x50af('0x22')](handleEntityNotFound(_0x38a787,null))[_0x50af('0x22')](removeEntity(_0x38a787,null))[_0x50af('0x49')](handleError(_0x38a787,null));};exports['test']=function(_0x186a40,_0x2e18b0,_0x4ebedf){var _0x2c8588;return db[_0x50af('0x2c')][_0x50af('0x48')]({'where':{'id':_0x186a40[_0x50af('0x45')]['id']},'attributes':['id','dsn']})[_0x50af('0x22')](handleEntityNotFound(_0x2e18b0,null))[_0x50af('0x22')](function(_0x418b47){if(_0x418b47){var _0x44da16=require('odbc')();_0x44da16['openSync'](_0x418b47[_0x50af('0x53')]);_0x44da16[_0x50af('0x54')]();return _0x418b47;}})[_0x50af('0x22')](respondWithResult(_0x2e18b0,null))['catch'](handleError(_0x2e18b0,null));};
\ No newline at end of file
index 3affe90..52e2a62 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdcbc=['square_odbc','lodash','util','../../config/logger','moment','bluebird','path','rimraf','./squareOdbc.attributes','define','SquareOdbc'];(function(_0x367050,_0x357afe){var _0x2aab7f=function(_0x2d7fb1){while(--_0x2d7fb1){_0x367050['push'](_0x367050['shift']());}};_0x2aab7f(++_0x357afe);}(_0xdcbc,0x16c));var _0xcdcb=function(_0x53f38d,_0x5ec720){_0x53f38d=_0x53f38d-0x0;var _0xdd4bca=_0xdcbc[_0x53f38d];return _0xdd4bca;};'use strict';var _=require(_0xcdcb('0x0'));var util=require(_0xcdcb('0x1'));var logger=require(_0xcdcb('0x2'))('api');var moment=require(_0xcdcb('0x3'));var BPromise=require(_0xcdcb('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xcdcb('0x5'));var rimraf=require(_0xcdcb('0x6'));var config=require('../../config/environment');var attributes=require(_0xcdcb('0x7'));module['exports']=function(_0x210ca6,_0x4ebdf1){return _0x210ca6[_0xcdcb('0x8')](_0xcdcb('0x9'),attributes,{'tableName':_0xcdcb('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x971e=['api','bluebird','request-promise','rimraf','../../config/environment','exports','SquareOdbc','square_odbc','util','../../config/logger'];(function(_0x513aa5,_0x1fba79){var _0x1a1a7c=function(_0x240e3f){while(--_0x240e3f){_0x513aa5['push'](_0x513aa5['shift']());}};_0x1a1a7c(++_0x1fba79);}(_0x971e,0x80));var _0xe971=function(_0x376d68,_0x309ddf){_0x376d68=_0x376d68-0x0;var _0x10bf62=_0x971e[_0x376d68];return _0x10bf62;};'use strict';var _=require('lodash');var util=require(_0xe971('0x0'));var logger=require(_0xe971('0x1'))(_0xe971('0x2'));var moment=require('moment');var BPromise=require(_0xe971('0x3'));var rp=require(_0xe971('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xe971('0x5'));var config=require(_0xe971('0x6'));var attributes=require('./squareOdbc.attributes');module[_0xe971('0x7')]=function(_0xa2d66,_0x10f484){return _0xa2d66['define'](_0xe971('0x8'),attributes,{'tableName':_0xe971('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 35ce2c8..49c8a9d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x636d=['stringify','error','code','message','catch','ShowSquareOdbc','find','options','raw','where','attributes','include','map','model','then','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','info','SquareOdbc,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x56fe98,_0x43dc16){var _0x212f4f=function(_0xc3427d){while(--_0xc3427d){_0x56fe98['push'](_0x56fe98['shift']());}};_0x212f4f(++_0x43dc16);}(_0x636d,0x164));var _0xd636=function(_0x3ff085,_0x27c92e){_0x3ff085=_0x3ff085-0x0;var _0x2b68c3=_0x636d[_0x3ff085];return _0x2b68c3;};'use strict';var _=require(_0xd636('0x0'));var util=require(_0xd636('0x1'));var moment=require(_0xd636('0x2'));var BPromise=require('bluebird');var rs=require(_0xd636('0x3'));var fs=require('fs');var Redis=require(_0xd636('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xd636('0x5'));var logger=require(_0xd636('0x6'))(_0xd636('0x7'));var config=require('../../config/environment');var jayson=require(_0xd636('0x8'));var client=jayson[_0xd636('0x9')][_0xd636('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1b7418,_0x748176,_0x63924b){return new BPromise(function(_0x2ad630,_0x512463){return client[_0xd636('0xb')](_0x1b7418,_0x63924b)['then'](function(_0x5258e6){logger[_0xd636('0xc')](_0xd636('0xd'),_0x748176,_0xd636('0xe'));logger[_0xd636('0xf')]('SquareOdbc,\x20%s,\x20%s,\x20%s',_0x748176,'request\x20sent',JSON[_0xd636('0x10')](_0x5258e6));if(_0x5258e6['error']){if(_0x5258e6[_0xd636('0x11')][_0xd636('0x12')]===0x1f4){logger[_0xd636('0x11')](_0xd636('0xd'),_0x748176,_0x5258e6['error'][_0xd636('0x13')]);return _0x512463(_0x5258e6[_0xd636('0x11')][_0xd636('0x13')]);}logger[_0xd636('0x11')](_0xd636('0xd'),_0x748176,_0x5258e6[_0xd636('0x11')][_0xd636('0x13')]);return _0x2ad630(_0x5258e6[_0xd636('0x11')][_0xd636('0x13')]);}else{logger[_0xd636('0xc')]('SquareOdbc,\x20%s,\x20%s',_0x748176,_0xd636('0xe'));_0x2ad630(_0x5258e6['result'][_0xd636('0x13')]);}})[_0xd636('0x14')](function(_0xade61e){logger[_0xd636('0x11')](_0xd636('0xd'),_0x748176,_0xade61e);_0x512463(_0xade61e);});});}exports[_0xd636('0x15')]=function(_0x1925fb){var _0x46bfcd=this;return new Promise(function(_0x2518e3,_0x370821){return db['SquareOdbc'][_0xd636('0x16')]({'raw':_0x1925fb['options']?_0x1925fb[_0xd636('0x17')][_0xd636('0x18')]===undefined?!![]:![]:!![],'where':_0x1925fb['options']?_0x1925fb[_0xd636('0x17')][_0xd636('0x19')]||null:null,'attributes':_0x1925fb[_0xd636('0x17')]?_0x1925fb['options'][_0xd636('0x1a')]||null:null,'include':_0x1925fb[_0xd636('0x17')]?_0x1925fb['options'][_0xd636('0x1b')]?_[_0xd636('0x1c')](_0x1925fb[_0xd636('0x17')][_0xd636('0x1b')],function(_0x263a10){return{'model':db[_0x263a10[_0xd636('0x1d')]],'as':_0x263a10['as'],'attributes':_0x263a10[_0xd636('0x1a')],'include':_0x263a10[_0xd636('0x1b')]?_['map'](_0x263a10[_0xd636('0x1b')],function(_0x1b1ee5){return{'model':db[_0x1b1ee5[_0xd636('0x1d')]],'as':_0x1b1ee5['as'],'attributes':_0x1b1ee5[_0xd636('0x1a')],'include':_0x1b1ee5[_0xd636('0x1b')]?_[_0xd636('0x1c')](_0x1b1ee5[_0xd636('0x1b')],function(_0x5c6095){return{'model':db[_0x5c6095[_0xd636('0x1d')]],'as':_0x5c6095['as'],'attributes':_0x5c6095[_0xd636('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xd636('0x1e')](function(_0x27164a){logger[_0xd636('0xc')](_0xd636('0x15'),_0x1925fb);logger[_0xd636('0xf')]('ShowSquareOdbc',_0x1925fb,JSON[_0xd636('0x10')](_0x27164a));_0x2518e3(_0x27164a);})[_0xd636('0x14')](function(_0xfc9542){logger[_0xd636('0x11')]('ShowSquareOdbc',_0xfc9542[_0xd636('0x13')],_0x1925fb);_0x370821(_0x46bfcd[_0xd636('0x11')](0x1f4,_0xfc9542[_0xd636('0x13')]));});});};
\ No newline at end of file
+var _0xa40b=['SquareOdbc,\x20%s,\x20%s','request\x20sent','debug','SquareOdbc,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','ShowSquareOdbc','find','options','attributes','model','include','map','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info'];(function(_0x4e1911,_0x3139fc){var _0x47baf5=function(_0x522a2d){while(--_0x522a2d){_0x4e1911['push'](_0x4e1911['shift']());}};_0x47baf5(++_0x3139fc);}(_0xa40b,0x1b1));var _0xba40=function(_0x369934,_0x2a68a5){_0x369934=_0x369934-0x0;var _0x36c2c1=_0xa40b[_0x369934];return _0x36c2c1;};'use strict';var _=require(_0xba40('0x0'));var util=require(_0xba40('0x1'));var moment=require(_0xba40('0x2'));var BPromise=require(_0xba40('0x3'));var rs=require(_0xba40('0x4'));var fs=require('fs');var Redis=require(_0xba40('0x5'));var db=require(_0xba40('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xba40('0x7'))(_0xba40('0x8'));var config=require(_0xba40('0x9'));var jayson=require(_0xba40('0xa'));var client=jayson[_0xba40('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3b0c89,_0x5ad0e4,_0x184058){return new BPromise(function(_0xc48d35,_0x596628){return client[_0xba40('0xc')](_0x3b0c89,_0x184058)[_0xba40('0xd')](function(_0x7e840){logger[_0xba40('0xe')](_0xba40('0xf'),_0x5ad0e4,_0xba40('0x10'));logger[_0xba40('0x11')](_0xba40('0x12'),_0x5ad0e4,_0xba40('0x10'),JSON[_0xba40('0x13')](_0x7e840));if(_0x7e840[_0xba40('0x14')]){if(_0x7e840[_0xba40('0x14')][_0xba40('0x15')]===0x1f4){logger[_0xba40('0x14')](_0xba40('0xf'),_0x5ad0e4,_0x7e840[_0xba40('0x14')][_0xba40('0x16')]);return _0x596628(_0x7e840[_0xba40('0x14')][_0xba40('0x16')]);}logger['error'](_0xba40('0xf'),_0x5ad0e4,_0x7e840[_0xba40('0x14')][_0xba40('0x16')]);return _0xc48d35(_0x7e840[_0xba40('0x14')][_0xba40('0x16')]);}else{logger['info'](_0xba40('0xf'),_0x5ad0e4,_0xba40('0x10'));_0xc48d35(_0x7e840[_0xba40('0x17')][_0xba40('0x16')]);}})[_0xba40('0x18')](function(_0x5e23ce){logger[_0xba40('0x14')](_0xba40('0xf'),_0x5ad0e4,_0x5e23ce);_0x596628(_0x5e23ce);});});}exports[_0xba40('0x19')]=function(_0x3d8272){var _0x5844a4=this;return new Promise(function(_0x8207c5,_0x5de7d8){return db['SquareOdbc'][_0xba40('0x1a')]({'raw':_0x3d8272[_0xba40('0x1b')]?_0x3d8272[_0xba40('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x3d8272[_0xba40('0x1b')]?_0x3d8272[_0xba40('0x1b')]['where']||null:null,'attributes':_0x3d8272[_0xba40('0x1b')]?_0x3d8272[_0xba40('0x1b')][_0xba40('0x1c')]||null:null,'include':_0x3d8272[_0xba40('0x1b')]?_0x3d8272[_0xba40('0x1b')]['include']?_['map'](_0x3d8272[_0xba40('0x1b')]['include'],function(_0xdbc35c){return{'model':db[_0xdbc35c[_0xba40('0x1d')]],'as':_0xdbc35c['as'],'attributes':_0xdbc35c[_0xba40('0x1c')],'include':_0xdbc35c[_0xba40('0x1e')]?_[_0xba40('0x1f')](_0xdbc35c['include'],function(_0x152624){return{'model':db[_0x152624['model']],'as':_0x152624['as'],'attributes':_0x152624[_0xba40('0x1c')],'include':_0x152624['include']?_[_0xba40('0x1f')](_0x152624[_0xba40('0x1e')],function(_0x2c1ef0){return{'model':db[_0x2c1ef0[_0xba40('0x1d')]],'as':_0x2c1ef0['as'],'attributes':_0x2c1ef0['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x2ff549){logger[_0xba40('0xe')](_0xba40('0x19'),_0x3d8272);logger[_0xba40('0x11')](_0xba40('0x19'),_0x3d8272,JSON[_0xba40('0x13')](_0x2ff549));_0x8207c5(_0x2ff549);})[_0xba40('0x18')](function(_0xa25ed6){logger['error'](_0xba40('0x19'),_0xa25ed6[_0xba40('0x16')],_0x3d8272);_0x5de7d8(_0x5844a4['error'](0x1f4,_0xa25ed6[_0xba40('0x16')]));});});};
\ No newline at end of file
index 0db8b95..09b01b2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4df5=['fs-extra','../../components/interaction/service','./squareProject.controller','get','isAuthenticated','index','/:id','show','post','put','update','delete','destroy','util','path','express','Router'];(function(_0x2fb453,_0x37fa88){var _0x290bc0=function(_0x266486){while(--_0x266486){_0x2fb453['push'](_0x2fb453['shift']());}};_0x290bc0(++_0x37fa88);}(_0x4df5,0x13f));var _0x54df=function(_0x1ebe2e,_0x301e32){_0x1ebe2e=_0x1ebe2e-0x0;var _0x59dfdc=_0x4df5[_0x1ebe2e];return _0x59dfdc;};'use strict';var multer=require('multer');var util=require(_0x54df('0x0'));var path=require(_0x54df('0x1'));var timeout=require('connect-timeout');var express=require(_0x54df('0x2'));var router=express[_0x54df('0x3')]();var fs_extra=require(_0x54df('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x54df('0x5'));var config=require('../../config/environment');var controller=require(_0x54df('0x6'));router[_0x54df('0x7')]('/',auth[_0x54df('0x8')](),controller[_0x54df('0x9')]);router['get'](_0x54df('0xa'),auth['isAuthenticated'](),controller[_0x54df('0xb')]);router[_0x54df('0xc')]('/',auth[_0x54df('0x8')](),controller['create']);router[_0x54df('0xd')](_0x54df('0xa'),auth['isAuthenticated'](),controller[_0x54df('0xe')]);router[_0x54df('0xf')](_0x54df('0xa'),auth['isAuthenticated'](),controller[_0x54df('0x10')]);module['exports']=router;
\ No newline at end of file
+var _0x2f15=['express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./squareProject.controller','get','isAuthenticated','index','/:id','post','create','update','destroy','multer','path','connect-timeout'];(function(_0x31f9e4,_0x44ac4e){var _0x501874=function(_0x4493e1){while(--_0x4493e1){_0x31f9e4['push'](_0x31f9e4['shift']());}};_0x501874(++_0x44ac4e);}(_0x2f15,0x1b7));var _0x52f1=function(_0x1d5e0e,_0x40f9eb){_0x1d5e0e=_0x1d5e0e-0x0;var _0x1acedc=_0x2f15[_0x1d5e0e];return _0x1acedc;};'use strict';var multer=require(_0x52f1('0x0'));var util=require('util');var path=require(_0x52f1('0x1'));var timeout=require(_0x52f1('0x2'));var express=require(_0x52f1('0x3'));var router=express[_0x52f1('0x4')]();var fs_extra=require(_0x52f1('0x5'));var auth=require(_0x52f1('0x6'));var interaction=require(_0x52f1('0x7'));var config=require('../../config/environment');var controller=require(_0x52f1('0x8'));router[_0x52f1('0x9')]('/',auth[_0x52f1('0xa')](),controller[_0x52f1('0xb')]);router[_0x52f1('0x9')](_0x52f1('0xc'),auth['isAuthenticated'](),controller['show']);router[_0x52f1('0xd')]('/',auth[_0x52f1('0xa')](),controller[_0x52f1('0xe')]);router['put']('/:id',auth[_0x52f1('0xa')](),controller[_0x52f1('0xf')]);router['delete']('/:id',auth[_0x52f1('0xa')](),controller[_0x52f1('0x10')]);module['exports']=router;
\ No newline at end of file
index e186ce7..aa407d4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5df4=['STRING','name','TEXT','BLOB','long','getDataValue','preproduction','toString','utf8','production','DATE'];(function(_0x439fc4,_0x31c91e){var _0x33aed4=function(_0x5153d7){while(--_0x5153d7){_0x439fc4['push'](_0x439fc4['shift']());}};_0x33aed4(++_0x31c91e);}(_0x5df4,0x1a2));var _0x45df=function(_0x342184,_0x5ab1e4){_0x342184=_0x342184-0x0;var _0x1833ed=_0x5df4[_0x342184];return _0x1833ed;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x45df('0x0')],'unique':_0x45df('0x1'),'allowNull':![]},'description':{'type':Sequelize['STRING']},'notes':{'type':Sequelize[_0x45df('0x2')]},'preproduction':{'type':Sequelize[_0x45df('0x3')](_0x45df('0x4')),'get':function(){if(this[_0x45df('0x5')](_0x45df('0x6'))){return this[_0x45df('0x5')](_0x45df('0x6'))[_0x45df('0x7')](_0x45df('0x8'));}}},'production':{'type':Sequelize[_0x45df('0x3')](_0x45df('0x4')),'get':function(){if(this[_0x45df('0x5')](_0x45df('0x9'))){return this[_0x45df('0x5')]('production')['toString'](_0x45df('0x8'));}}},'savedAt':{'type':Sequelize['DATE']},'publishedAt':{'type':Sequelize[_0x45df('0xa')]}};
\ No newline at end of file
+var _0x2c37=['DATE','sequelize','STRING','name','BLOB','preproduction','getDataValue','toString','utf8','long','production'];(function(_0x3d14d1,_0x23aa69){var _0xc78d1f=function(_0x40edbe){while(--_0x40edbe){_0x3d14d1['push'](_0x3d14d1['shift']());}};_0xc78d1f(++_0x23aa69);}(_0x2c37,0x135));var _0x72c3=function(_0x3ccec7,_0x180123){_0x3ccec7=_0x3ccec7-0x0;var _0x3e91c1=_0x2c37[_0x3ccec7];return _0x3e91c1;};'use strict';var Sequelize=require(_0x72c3('0x0'));module['exports']={'name':{'type':Sequelize[_0x72c3('0x1')],'unique':_0x72c3('0x2'),'allowNull':![]},'description':{'type':Sequelize[_0x72c3('0x1')]},'notes':{'type':Sequelize['TEXT']},'preproduction':{'type':Sequelize[_0x72c3('0x3')]('long'),'get':function(){if(this['getDataValue'](_0x72c3('0x4'))){return this[_0x72c3('0x5')](_0x72c3('0x4'))[_0x72c3('0x6')](_0x72c3('0x7'));}}},'production':{'type':Sequelize[_0x72c3('0x3')](_0x72c3('0x8')),'get':function(){if(this['getDataValue']('production')){return this[_0x72c3('0x5')](_0x72c3('0x9'))[_0x72c3('0x6')]('utf8');}}},'savedAt':{'type':Sequelize['DATE']},'publishedAt':{'type':Sequelize[_0x72c3('0xa')]}};
\ No newline at end of file
index 7cc8cfe..ef952c5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdf8b=['catch','length','user','find','userProfileId','autoAssociation','create','body','params','publish','production','lodash','ioredis','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./squareProject.socket','register','json','undefined','limit','offset','count','status','set','Content-Range','update','destroy','then','get','SquareProjects','UserProfileResource','agi','stringify','sendStatus','error','stack','name','map','rawAttributes','fieldName','type','model','keys','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','VIRTUAL','filter','merge','options','SquareProject','includeAll','include','findAll','rows'];(function(_0x3460d1,_0x479b96){var _0x451f0f=function(_0x17ac54){while(--_0x17ac54){_0x3460d1['push'](_0x3460d1['shift']());}};_0x451f0f(++_0x479b96);}(_0xdf8b,0x93));var _0xbdf8=function(_0x27ebe8,_0x21dd01){_0x27ebe8=_0x27ebe8-0x0;var _0x431778=_0xdf8b[_0x27ebe8];return _0x431778;};'use strict';var _=require(_0xbdf8('0x0'));var Redis=require(_0xbdf8('0x1'));var qs=require('../../components/parsers/qs');var logger=require('../../config/logger')(_0xbdf8('0x2'));var config=require(_0xbdf8('0x3'));var db=require(_0xbdf8('0x4'))['db'];config[_0xbdf8('0x5')]=_[_0xbdf8('0x6')](config[_0xbdf8('0x5')],{'host':_0xbdf8('0x7'),'port':0x18eb});var socket=require(_0xbdf8('0x8'))(new Redis(config[_0xbdf8('0x5')]));require(_0xbdf8('0x9'))[_0xbdf8('0xa')](socket);function respondWithResult(_0x59d53b,_0x136c4e){_0x136c4e=_0x136c4e||0xc8;return function(_0x5d219b){if(_0x5d219b){return _0x59d53b['status'](_0x136c4e)[_0xbdf8('0xb')](_0x5d219b);}};}function respondWithFilteredResult(_0x1943d9,_0x5a87c7){return function(_0xd5b7c7){if(_0xd5b7c7){var _0x18b1b5=typeof _0x5a87c7['offset']===_0xbdf8('0xc')&&typeof _0x5a87c7[_0xbdf8('0xd')]==='undefined';var _0x36a573=_0xd5b7c7['count'];var _0x57e719=_0x18b1b5?0x0:_0x5a87c7[_0xbdf8('0xe')];var _0x589f65=_0x18b1b5?_0xd5b7c7[_0xbdf8('0xf')]:_0x5a87c7[_0xbdf8('0xe')]+_0x5a87c7[_0xbdf8('0xd')];var _0x34eb3d;if(_0x589f65>=_0x36a573){_0x589f65=_0x36a573;_0x34eb3d=0xc8;}else{_0x34eb3d=0xce;}_0x1943d9[_0xbdf8('0x10')](_0x34eb3d);return _0x1943d9[_0xbdf8('0x11')](_0xbdf8('0x12'),_0x57e719+'-'+_0x589f65+'/'+_0x36a573)['json'](_0xd5b7c7);}return null;};}function saveUpdates(_0x47980f){return function(_0x3a0770){if(_0x3a0770){return _0x3a0770[_0xbdf8('0x13')](_0x47980f)['then'](function(_0x4b8a21){return _0x4b8a21;});}return null;};}function removeEntity(_0x405ee4){return function(_0x4740b0){if(_0x4740b0){return _0x4740b0[_0xbdf8('0x14')]()[_0xbdf8('0x15')](function(){var _0x4d0c3d=_0x4740b0[_0xbdf8('0x16')]({'plain':!![]});var _0x44b45c=_0xbdf8('0x17');return db[_0xbdf8('0x18')][_0xbdf8('0x14')]({'where':{'type':_0x44b45c,'resourceId':_0x4d0c3d['id']}})['then'](function(){return _0x4740b0;});})[_0xbdf8('0x15')](function(){var _0x40cf3c=new Redis(config[_0xbdf8('0x5')]);_0x40cf3c['publish'](_0xbdf8('0x19'),JSON[_0xbdf8('0x1a')]({'id':_0x4740b0['id'],'deleted':!![]}));})[_0xbdf8('0x15')](function(){_0x405ee4[_0xbdf8('0x10')](0xcc)['end']();});}};}function handleEntityNotFound(_0x521312){return function(_0x2d9ccd){if(!_0x2d9ccd){_0x521312[_0xbdf8('0x1b')](0x194);}return _0x2d9ccd;};}function handleError(_0x74d46,_0x3e8948){_0x3e8948=_0x3e8948||0x1f4;return function(_0x21f266){logger[_0xbdf8('0x1c')](_0x21f266[_0xbdf8('0x1d')]);if(_0x21f266['name']){delete _0x21f266[_0xbdf8('0x1e')];}_0x74d46[_0xbdf8('0x10')](_0x3e8948)['send'](_0x21f266);};}exports['index']=function(_0x67c6d3,_0x5eb246){var _0xcb2203={},_0x161a7e={},_0x518e2d={'count':0x0,'rows':[]};var _0xa0862f=_[_0xbdf8('0x1f')](db['SquareProject'][_0xbdf8('0x20')],function(_0x50aaec){return{'name':_0x50aaec[_0xbdf8('0x21')],'type':_0x50aaec[_0xbdf8('0x22')]['key']};});_0x161a7e[_0xbdf8('0x23')]=_[_0xbdf8('0x1f')](_0xa0862f,_0xbdf8('0x1e'));_0x161a7e['query']=_[_0xbdf8('0x24')](_0x67c6d3[_0xbdf8('0x25')]);_0x161a7e[_0xbdf8('0x26')]=_[_0xbdf8('0x27')](_0x161a7e[_0xbdf8('0x23')],_0x161a7e[_0xbdf8('0x25')]);_0xcb2203[_0xbdf8('0x28')]=_[_0xbdf8('0x27')](_0x161a7e[_0xbdf8('0x23')],qs[_0xbdf8('0x29')](_0x67c6d3[_0xbdf8('0x25')][_0xbdf8('0x29')]));_0xcb2203[_0xbdf8('0x28')]=_0xcb2203['attributes']['length']?_0xcb2203['attributes']:_0x161a7e['model'];if(!_0x67c6d3[_0xbdf8('0x25')][_0xbdf8('0x2a')](_0xbdf8('0x2b'))){_0xcb2203['limit']=qs[_0xbdf8('0xd')](_0x67c6d3[_0xbdf8('0x25')][_0xbdf8('0xd')]);_0xcb2203['offset']=qs[_0xbdf8('0xe')](_0x67c6d3['query'][_0xbdf8('0xe')]);}_0xcb2203[_0xbdf8('0x2c')]=qs['sort'](_0x67c6d3[_0xbdf8('0x25')][_0xbdf8('0x2d')]);_0xcb2203[_0xbdf8('0x2e')]=qs[_0xbdf8('0x26')](_[_0xbdf8('0x2f')](_0x67c6d3[_0xbdf8('0x25')],_0x161a7e['filters']),_0xa0862f);if(_0x67c6d3[_0xbdf8('0x25')]['filter']){_0xcb2203[_0xbdf8('0x2e')]=_['merge'](_0xcb2203[_0xbdf8('0x2e')],{'$or':_['map'](_0xa0862f,function(_0x2c21d4){if(_0x2c21d4[_0xbdf8('0x22')]!==_0xbdf8('0x30')){var _0x321638={};_0x321638[_0x2c21d4['name']]={'$like':'%'+_0x67c6d3['query'][_0xbdf8('0x31')]+'%'};return _0x321638;}})});}_0xcb2203=_[_0xbdf8('0x32')]({},_0xcb2203,_0x67c6d3[_0xbdf8('0x33')]);var _0x2389f9={'where':_0xcb2203['where']};return db[_0xbdf8('0x34')][_0xbdf8('0xf')](_0x2389f9)[_0xbdf8('0x15')](function(_0xa6dbe9){_0x518e2d[_0xbdf8('0xf')]=_0xa6dbe9;if(_0x67c6d3[_0xbdf8('0x25')][_0xbdf8('0x35')]){_0xcb2203[_0xbdf8('0x36')]=[{'all':!![]}];}return db[_0xbdf8('0x34')][_0xbdf8('0x37')](_0xcb2203);})['then'](function(_0x2340fa){_0x518e2d[_0xbdf8('0x38')]=_0x2340fa;return _0x518e2d;})[_0xbdf8('0x15')](respondWithFilteredResult(_0x5eb246,_0xcb2203))[_0xbdf8('0x39')](handleError(_0x5eb246,null));};exports['show']=function(_0xcb97bb,_0x12a0b5){var _0x34067e={'raw':![],'where':{'id':_0xcb97bb['params']['id']}},_0x2285e3={};_0x2285e3['model']=_[_0xbdf8('0x24')](db[_0xbdf8('0x34')]['rawAttributes']);_0x2285e3[_0xbdf8('0x25')]=_[_0xbdf8('0x24')](_0xcb97bb['query']);_0x2285e3[_0xbdf8('0x26')]=_[_0xbdf8('0x27')](_0x2285e3[_0xbdf8('0x23')],_0x2285e3[_0xbdf8('0x25')]);_0x34067e[_0xbdf8('0x28')]=_[_0xbdf8('0x27')](_0x2285e3[_0xbdf8('0x23')],qs[_0xbdf8('0x29')](_0xcb97bb['query']['fields']));_0x34067e[_0xbdf8('0x28')]=_0x34067e[_0xbdf8('0x28')][_0xbdf8('0x3a')]?_0x34067e[_0xbdf8('0x28')]:_0x2285e3['model'];if(_0xcb97bb[_0xbdf8('0x25')][_0xbdf8('0x35')]){_0x34067e[_0xbdf8('0x36')]=[{'all':!![]}];}_0x34067e=_['merge']({},_0x34067e,_0xcb97bb[_0xbdf8('0x33')]);return db['SquareProject']['find'](_0x34067e)[_0xbdf8('0x15')](handleEntityNotFound(_0x12a0b5,null))['then'](respondWithResult(_0x12a0b5,null))[_0xbdf8('0x39')](handleError(_0x12a0b5,null));};exports['create']=function(_0x4a31e6,_0x19560f){return db['SquareProject']['create'](_0x4a31e6['body'],{})[_0xbdf8('0x15')](function(_0x4bc92a){var _0xeca4b1=_0x4a31e6[_0xbdf8('0x3b')][_0xbdf8('0x16')]({'plain':!![]});if(!_0xeca4b1)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0xeca4b1['role']===_0xbdf8('0x3b')){var _0x9b6253=_0x4bc92a[_0xbdf8('0x16')]({'plain':!![]});var _0xaeee25=_0xbdf8('0x17');return db['UserProfileSection'][_0xbdf8('0x3c')]({'where':{'name':_0xaeee25,'userProfileId':_0xeca4b1[_0xbdf8('0x3d')]},'raw':!![]})[_0xbdf8('0x15')](function(_0x14df8b){if(_0x14df8b&&_0x14df8b[_0xbdf8('0x3e')]===0x0){return db[_0xbdf8('0x18')][_0xbdf8('0x3f')]({'name':_0x9b6253[_0xbdf8('0x1e')],'resourceId':_0x9b6253['id'],'type':_0x14df8b[_0xbdf8('0x1e')],'sectionId':_0x14df8b['id']},{})[_0xbdf8('0x15')](function(){return _0x4bc92a;});}else{return _0x4bc92a;}})[_0xbdf8('0x39')](function(_0x1206e3){logger[_0xbdf8('0x1c')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x1206e3);throw _0x1206e3;});}return _0x4bc92a;})[_0xbdf8('0x15')](respondWithResult(_0x19560f,0xc9))[_0xbdf8('0x39')](handleError(_0x19560f,null));};exports[_0xbdf8('0x13')]=function(_0x494d19,_0x55bf68){if(_0x494d19[_0xbdf8('0x40')]['id']){delete _0x494d19[_0xbdf8('0x40')]['id'];}return db[_0xbdf8('0x34')][_0xbdf8('0x3c')]({'where':{'id':_0x494d19[_0xbdf8('0x41')]['id']}})[_0xbdf8('0x15')](handleEntityNotFound(_0x55bf68,null))[_0xbdf8('0x15')](saveUpdates(_0x494d19[_0xbdf8('0x40')],null))[_0xbdf8('0x15')](function(_0x166809){if(!_0x166809)return;var _0x24c064=_0x166809[_0xbdf8('0x16')]({'plain':!![]});return _0x24c064;})[_0xbdf8('0x15')](function(_0x5e06b2){var _0x325439=new Redis(config['redis']);_0x325439[_0xbdf8('0x42')](_0xbdf8('0x19'),JSON[_0xbdf8('0x1a')](_[_0xbdf8('0x2f')](_0x5e06b2,['id','name',_0xbdf8('0x43')])));return _0x5e06b2;})[_0xbdf8('0x15')](respondWithResult(_0x55bf68,null))[_0xbdf8('0x39')](handleError(_0x55bf68,null));};exports[_0xbdf8('0x14')]=function(_0xff5e19,_0x580c7a){return db['SquareProject'][_0xbdf8('0x3c')]({'where':{'id':_0xff5e19[_0xbdf8('0x41')]['id']}})[_0xbdf8('0x15')](handleEntityNotFound(_0x580c7a,null))[_0xbdf8('0x15')](removeEntity(_0x580c7a,null))[_0xbdf8('0x39')](handleError(_0x580c7a,null));};
\ No newline at end of file
+var _0x5cbb=['filters','filter','VIRTUAL','merge','options','SquareProject','findAll','rows','catch','show','params','keys','include','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','update','pick','production','lodash','../../config/logger','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./squareProject.socket','register','status','json','offset','undefined','limit','count','set','Content-Range','then','destroy','get','SquareProjects','UserProfileResource','publish','agi','stringify','end','sendStatus','error','stack','name','index','map','rawAttributes','fieldName','type','query','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','sort','where'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5cbb,0x1b6));var _0xb5cb=function(_0x31e9ce,_0x15e360){_0x31e9ce=_0x31e9ce-0x0;var _0x119708=_0x5cbb[_0x31e9ce];return _0x119708;};'use strict';var _=require(_0xb5cb('0x0'));var Redis=require('ioredis');var qs=require('../../components/parsers/qs');var logger=require(_0xb5cb('0x1'))('api');var config=require('../../config/environment');var db=require(_0xb5cb('0x2'))['db'];config[_0xb5cb('0x3')]=_[_0xb5cb('0x4')](config[_0xb5cb('0x3')],{'host':_0xb5cb('0x5'),'port':0x18eb});var socket=require(_0xb5cb('0x6'))(new Redis(config[_0xb5cb('0x3')]));require(_0xb5cb('0x7'))[_0xb5cb('0x8')](socket);function respondWithResult(_0x526d98,_0x46764b){_0x46764b=_0x46764b||0xc8;return function(_0x11bf64){if(_0x11bf64){return _0x526d98[_0xb5cb('0x9')](_0x46764b)[_0xb5cb('0xa')](_0x11bf64);}};}function respondWithFilteredResult(_0xa87145,_0x1df5c3){return function(_0x54d19f){if(_0x54d19f){var _0x484baa=typeof _0x1df5c3[_0xb5cb('0xb')]===_0xb5cb('0xc')&&typeof _0x1df5c3[_0xb5cb('0xd')]===_0xb5cb('0xc');var _0x284e6e=_0x54d19f[_0xb5cb('0xe')];var _0x511236=_0x484baa?0x0:_0x1df5c3[_0xb5cb('0xb')];var _0xe21f4e=_0x484baa?_0x54d19f['count']:_0x1df5c3[_0xb5cb('0xb')]+_0x1df5c3[_0xb5cb('0xd')];var _0x28c4a9;if(_0xe21f4e>=_0x284e6e){_0xe21f4e=_0x284e6e;_0x28c4a9=0xc8;}else{_0x28c4a9=0xce;}_0xa87145[_0xb5cb('0x9')](_0x28c4a9);return _0xa87145[_0xb5cb('0xf')](_0xb5cb('0x10'),_0x511236+'-'+_0xe21f4e+'/'+_0x284e6e)[_0xb5cb('0xa')](_0x54d19f);}return null;};}function saveUpdates(_0x431c85){return function(_0x5d6b3b){if(_0x5d6b3b){return _0x5d6b3b['update'](_0x431c85)[_0xb5cb('0x11')](function(_0x1b6498){return _0x1b6498;});}return null;};}function removeEntity(_0x3c165a){return function(_0x938923){if(_0x938923){return _0x938923[_0xb5cb('0x12')]()[_0xb5cb('0x11')](function(){var _0x1c78b3=_0x938923[_0xb5cb('0x13')]({'plain':!![]});var _0x529990=_0xb5cb('0x14');return db[_0xb5cb('0x15')][_0xb5cb('0x12')]({'where':{'type':_0x529990,'resourceId':_0x1c78b3['id']}})['then'](function(){return _0x938923;});})[_0xb5cb('0x11')](function(){var _0x1745b0=new Redis(config[_0xb5cb('0x3')]);_0x1745b0[_0xb5cb('0x16')](_0xb5cb('0x17'),JSON[_0xb5cb('0x18')]({'id':_0x938923['id'],'deleted':!![]}));})[_0xb5cb('0x11')](function(){_0x3c165a['status'](0xcc)[_0xb5cb('0x19')]();});}};}function handleEntityNotFound(_0x530a8e){return function(_0x101ecd){if(!_0x101ecd){_0x530a8e[_0xb5cb('0x1a')](0x194);}return _0x101ecd;};}function handleError(_0x445d21,_0x53080a){_0x53080a=_0x53080a||0x1f4;return function(_0x10a991){logger[_0xb5cb('0x1b')](_0x10a991[_0xb5cb('0x1c')]);if(_0x10a991[_0xb5cb('0x1d')]){delete _0x10a991[_0xb5cb('0x1d')];}_0x445d21['status'](_0x53080a)['send'](_0x10a991);};}exports[_0xb5cb('0x1e')]=function(_0x2249f5,_0x436b62){var _0x9641f2={},_0xc0c0e0={},_0x2023cd={'count':0x0,'rows':[]};var _0x2523dc=_[_0xb5cb('0x1f')](db['SquareProject'][_0xb5cb('0x20')],function(_0x20b8ad){return{'name':_0x20b8ad[_0xb5cb('0x21')],'type':_0x20b8ad[_0xb5cb('0x22')]['key']};});_0xc0c0e0['model']=_[_0xb5cb('0x1f')](_0x2523dc,_0xb5cb('0x1d'));_0xc0c0e0[_0xb5cb('0x23')]=_['keys'](_0x2249f5['query']);_0xc0c0e0['filters']=_[_0xb5cb('0x24')](_0xc0c0e0[_0xb5cb('0x25')],_0xc0c0e0['query']);_0x9641f2[_0xb5cb('0x26')]=_[_0xb5cb('0x24')](_0xc0c0e0[_0xb5cb('0x25')],qs[_0xb5cb('0x27')](_0x2249f5[_0xb5cb('0x23')][_0xb5cb('0x27')]));_0x9641f2[_0xb5cb('0x26')]=_0x9641f2[_0xb5cb('0x26')][_0xb5cb('0x28')]?_0x9641f2['attributes']:_0xc0c0e0[_0xb5cb('0x25')];if(!_0x2249f5[_0xb5cb('0x23')][_0xb5cb('0x29')](_0xb5cb('0x2a'))){_0x9641f2['limit']=qs[_0xb5cb('0xd')](_0x2249f5[_0xb5cb('0x23')][_0xb5cb('0xd')]);_0x9641f2[_0xb5cb('0xb')]=qs[_0xb5cb('0xb')](_0x2249f5[_0xb5cb('0x23')][_0xb5cb('0xb')]);}_0x9641f2['order']=qs[_0xb5cb('0x2b')](_0x2249f5[_0xb5cb('0x23')][_0xb5cb('0x2b')]);_0x9641f2[_0xb5cb('0x2c')]=qs[_0xb5cb('0x2d')](_['pick'](_0x2249f5['query'],_0xc0c0e0['filters']),_0x2523dc);if(_0x2249f5[_0xb5cb('0x23')][_0xb5cb('0x2e')]){_0x9641f2[_0xb5cb('0x2c')]=_['merge'](_0x9641f2[_0xb5cb('0x2c')],{'$or':_[_0xb5cb('0x1f')](_0x2523dc,function(_0x8219f7){if(_0x8219f7[_0xb5cb('0x22')]!==_0xb5cb('0x2f')){var _0x8f475={};_0x8f475[_0x8219f7[_0xb5cb('0x1d')]]={'$like':'%'+_0x2249f5[_0xb5cb('0x23')][_0xb5cb('0x2e')]+'%'};return _0x8f475;}})});}_0x9641f2=_[_0xb5cb('0x30')]({},_0x9641f2,_0x2249f5[_0xb5cb('0x31')]);var _0x31f9fa={'where':_0x9641f2[_0xb5cb('0x2c')]};return db[_0xb5cb('0x32')]['count'](_0x31f9fa)[_0xb5cb('0x11')](function(_0x5e4fac){_0x2023cd[_0xb5cb('0xe')]=_0x5e4fac;if(_0x2249f5[_0xb5cb('0x23')]['includeAll']){_0x9641f2['include']=[{'all':!![]}];}return db[_0xb5cb('0x32')][_0xb5cb('0x33')](_0x9641f2);})['then'](function(_0x382670){_0x2023cd[_0xb5cb('0x34')]=_0x382670;return _0x2023cd;})[_0xb5cb('0x11')](respondWithFilteredResult(_0x436b62,_0x9641f2))[_0xb5cb('0x35')](handleError(_0x436b62,null));};exports[_0xb5cb('0x36')]=function(_0xccd06,_0x35fb00){var _0x9000f7={'raw':![],'where':{'id':_0xccd06[_0xb5cb('0x37')]['id']}},_0x228ca9={};_0x228ca9[_0xb5cb('0x25')]=_[_0xb5cb('0x38')](db[_0xb5cb('0x32')][_0xb5cb('0x20')]);_0x228ca9['query']=_[_0xb5cb('0x38')](_0xccd06[_0xb5cb('0x23')]);_0x228ca9[_0xb5cb('0x2d')]=_['intersection'](_0x228ca9[_0xb5cb('0x25')],_0x228ca9[_0xb5cb('0x23')]);_0x9000f7['attributes']=_[_0xb5cb('0x24')](_0x228ca9[_0xb5cb('0x25')],qs[_0xb5cb('0x27')](_0xccd06[_0xb5cb('0x23')][_0xb5cb('0x27')]));_0x9000f7[_0xb5cb('0x26')]=_0x9000f7[_0xb5cb('0x26')][_0xb5cb('0x28')]?_0x9000f7[_0xb5cb('0x26')]:_0x228ca9[_0xb5cb('0x25')];if(_0xccd06[_0xb5cb('0x23')]['includeAll']){_0x9000f7[_0xb5cb('0x39')]=[{'all':!![]}];}_0x9000f7=_[_0xb5cb('0x30')]({},_0x9000f7,_0xccd06[_0xb5cb('0x31')]);return db[_0xb5cb('0x32')][_0xb5cb('0x3a')](_0x9000f7)[_0xb5cb('0x11')](handleEntityNotFound(_0x35fb00,null))[_0xb5cb('0x11')](respondWithResult(_0x35fb00,null))[_0xb5cb('0x35')](handleError(_0x35fb00,null));};exports[_0xb5cb('0x3b')]=function(_0x4d5af8,_0x1db1fd){return db[_0xb5cb('0x32')][_0xb5cb('0x3b')](_0x4d5af8[_0xb5cb('0x3c')],{})['then'](function(_0x251931){var _0x2564c7=_0x4d5af8[_0xb5cb('0x3d')][_0xb5cb('0x13')]({'plain':!![]});if(!_0x2564c7)throw new Error(_0xb5cb('0x3e'));if(_0x2564c7[_0xb5cb('0x3f')]===_0xb5cb('0x3d')){var _0x3e62c2=_0x251931[_0xb5cb('0x13')]({'plain':!![]});var _0x128e15=_0xb5cb('0x14');return db['UserProfileSection']['find']({'where':{'name':_0x128e15,'userProfileId':_0x2564c7[_0xb5cb('0x40')]},'raw':!![]})['then'](function(_0x3aef2a){if(_0x3aef2a&&_0x3aef2a[_0xb5cb('0x41')]===0x0){return db['UserProfileResource'][_0xb5cb('0x3b')]({'name':_0x3e62c2[_0xb5cb('0x1d')],'resourceId':_0x3e62c2['id'],'type':_0x3aef2a[_0xb5cb('0x1d')],'sectionId':_0x3aef2a['id']},{})[_0xb5cb('0x11')](function(){return _0x251931;});}else{return _0x251931;}})[_0xb5cb('0x35')](function(_0x11969a){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x11969a);throw _0x11969a;});}return _0x251931;})[_0xb5cb('0x11')](respondWithResult(_0x1db1fd,0xc9))['catch'](handleError(_0x1db1fd,null));};exports[_0xb5cb('0x42')]=function(_0x378d88,_0x55ca7b){if(_0x378d88[_0xb5cb('0x3c')]['id']){delete _0x378d88[_0xb5cb('0x3c')]['id'];}return db[_0xb5cb('0x32')]['find']({'where':{'id':_0x378d88[_0xb5cb('0x37')]['id']}})[_0xb5cb('0x11')](handleEntityNotFound(_0x55ca7b,null))['then'](saveUpdates(_0x378d88[_0xb5cb('0x3c')],null))[_0xb5cb('0x11')](function(_0x425276){if(!_0x425276)return;var _0x4558f4=_0x425276['get']({'plain':!![]});return _0x4558f4;})[_0xb5cb('0x11')](function(_0x569e20){var _0x1a493a=new Redis(config[_0xb5cb('0x3')]);_0x1a493a[_0xb5cb('0x16')](_0xb5cb('0x17'),JSON[_0xb5cb('0x18')](_[_0xb5cb('0x43')](_0x569e20,['id',_0xb5cb('0x1d'),_0xb5cb('0x44')])));return _0x569e20;})[_0xb5cb('0x11')](respondWithResult(_0x55ca7b,null))[_0xb5cb('0x35')](handleError(_0x55ca7b,null));};exports[_0xb5cb('0x12')]=function(_0x13c872,_0x12de42){return db[_0xb5cb('0x32')]['find']({'where':{'id':_0x13c872[_0xb5cb('0x37')]['id']}})[_0xb5cb('0x11')](handleEntityNotFound(_0x12de42,null))[_0xb5cb('0x11')](removeEntity(_0x12de42,null))[_0xb5cb('0x35')](handleError(_0x12de42,null));};
\ No newline at end of file
index 1e95893..c95c523 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x780e=['hook','../../mysqldb','save','update','remove','emit','hasOwnProperty'];(function(_0x13c1aa,_0x56fa69){var _0x1c6974=function(_0x2264bb){while(--_0x2264bb){_0x13c1aa['push'](_0x13c1aa['shift']());}};_0x1c6974(++_0x56fa69);}(_0x780e,0xb7));var _0xe780=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x780e[_0x2641f9];return _0x585741;};'use strict';var EventEmitter=require('events');var SquareProject=require(_0xe780('0x0'))['db']['SquareProject'];var SquareProjectEvents=new EventEmitter();SquareProjectEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xe780('0x1'),'afterUpdate':_0xe780('0x2'),'afterDestroy':_0xe780('0x3')};function emitEvent(_0x5e15ad){return function(_0x23120e,_0x2f9c99,_0x1b58d2){SquareProjectEvents[_0xe780('0x4')](_0x5e15ad+':'+_0x23120e['id'],_0x23120e);SquareProjectEvents[_0xe780('0x4')](_0x5e15ad,_0x23120e);_0x1b58d2(null);};}for(var e in events){if(events[_0xe780('0x5')](e)){var event=events[e];SquareProject[_0xe780('0x6')](e,emitEvent(event));}}module['exports']=SquareProjectEvents;
\ No newline at end of file
+var _0x5479=['../../mysqldb','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','events'];(function(_0x4e8bcd,_0x232ffe){var _0x339018=function(_0x52153a){while(--_0x52153a){_0x4e8bcd['push'](_0x4e8bcd['shift']());}};_0x339018(++_0x232ffe);}(_0x5479,0x117));var _0x9547=function(_0x53b824,_0xe366b4){_0x53b824=_0x53b824-0x0;var _0x1f02a0=_0x5479[_0x53b824];return _0x1f02a0;};'use strict';var EventEmitter=require(_0x9547('0x0'));var SquareProject=require(_0x9547('0x1'))['db']['SquareProject'];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0x9547('0x2')](0x0);var events={'afterCreate':_0x9547('0x3'),'afterUpdate':_0x9547('0x4'),'afterDestroy':_0x9547('0x5')};function emitEvent(_0xa42b43){return function(_0x1502ab,_0x15ad2d,_0x102244){SquareProjectEvents[_0x9547('0x6')](_0xa42b43+':'+_0x1502ab['id'],_0x1502ab);SquareProjectEvents[_0x9547('0x6')](_0xa42b43,_0x1502ab);_0x102244(null);};}for(var e in events){if(events[_0x9547('0x7')](e)){var event=events[e];SquareProject[_0x9547('0x8')](e,emitEvent(event));}}module[_0x9547('0x9')]=SquareProjectEvents;
\ No newline at end of file
index 65ced49..0348b71 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6e03=['savedAt','YYYY-MM-DD\x20HH:mm:ss','production','publishedAt','format','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./squareProject.attributes','exports','define','SquareProject','square_projects','changed','preproduction'];(function(_0x206ca8,_0x34739a){var _0x508d10=function(_0x3a27a7){while(--_0x3a27a7){_0x206ca8['push'](_0x206ca8['shift']());}};_0x508d10(++_0x34739a);}(_0x6e03,0x98));var _0x36e0=function(_0x10e722,_0x297a74){_0x10e722=_0x10e722-0x0;var _0x39243a=_0x6e03[_0x10e722];return _0x39243a;};'use strict';var _=require(_0x36e0('0x0'));var util=require(_0x36e0('0x1'));var logger=require(_0x36e0('0x2'))(_0x36e0('0x3'));var moment=require(_0x36e0('0x4'));var BPromise=require(_0x36e0('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x36e0('0x6'));var rimraf=require(_0x36e0('0x7'));var config=require(_0x36e0('0x8'));var attributes=require(_0x36e0('0x9'));module[_0x36e0('0xa')]=function(_0x2c5525,_0x128d4a){return _0x2c5525[_0x36e0('0xb')](_0x36e0('0xc'),attributes,{'tableName':_0x36e0('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x4d16be,_0x2aee78,_0x5e30e3){if(_0x4d16be[_0x36e0('0xe')](_0x36e0('0xf'))){_0x4d16be[_0x36e0('0x10')]=moment()['format'](_0x36e0('0x11'));}if(_0x4d16be[_0x36e0('0xe')](_0x36e0('0x12'))){_0x4d16be[_0x36e0('0x13')]=moment()[_0x36e0('0x14')]('YYYY-MM-DD\x20HH:mm:ss');}_0x5e30e3(null,_0x4d16be);}}});};
\ No newline at end of file
+var _0xd92b=['lodash','util','../../config/logger','api','request-promise','path','rimraf','../../config/environment','./squareProject.attributes','exports','define','changed','savedAt','publishedAt','format'];(function(_0xcd6db4,_0x1bfb50){var _0x3ef0ff=function(_0x11decb){while(--_0x11decb){_0xcd6db4['push'](_0xcd6db4['shift']());}};_0x3ef0ff(++_0x1bfb50);}(_0xd92b,0x1c2));var _0xbd92=function(_0x1f8492,_0x1b3f9b){_0x1f8492=_0x1f8492-0x0;var _0x43b7b3=_0xd92b[_0x1f8492];return _0x43b7b3;};'use strict';var _=require(_0xbd92('0x0'));var util=require(_0xbd92('0x1'));var logger=require(_0xbd92('0x2'))(_0xbd92('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xbd92('0x4'));var fs=require('fs');var path=require(_0xbd92('0x5'));var rimraf=require(_0xbd92('0x6'));var config=require(_0xbd92('0x7'));var attributes=require(_0xbd92('0x8'));module[_0xbd92('0x9')]=function(_0x368d0f,_0x49b876){return _0x368d0f[_0xbd92('0xa')]('SquareProject',attributes,{'tableName':'square_projects','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x515b49,_0x482ddc,_0x46dc94){if(_0x515b49[_0xbd92('0xb')]('preproduction')){_0x515b49[_0xbd92('0xc')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}if(_0x515b49[_0xbd92('0xb')]('production')){_0x515b49[_0xbd92('0xd')]=moment()[_0xbd92('0xe')]('YYYY-MM-DD\x20HH:mm:ss');}_0x46dc94(null,_0x515b49);}}});};
\ No newline at end of file
index 93e365e..791a85c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbde2=['ioredis','../../mysqldb','../../config/environment','redis','defaults','localhost','socket.io-emitter','./squareProject.socket','register','GetSquareProjects','findAll','raw','options','attributes','include','map','model','then','info','stringify','error','message','ShowSquareProject','SquareProject','find','where','debug','lodash'];(function(_0x6131cd,_0x4c26a1){var _0x47e916=function(_0x1f2bce){while(--_0x1f2bce){_0x6131cd['push'](_0x6131cd['shift']());}};_0x47e916(++_0x4c26a1);}(_0xbde2,0xa7));var _0x2bde=function(_0x4524dc,_0x4c1a2c){_0x4524dc=_0x4524dc-0x0;var _0x952d7d=_0xbde2[_0x4524dc];return _0x952d7d;};'use strict';var _=require(_0x2bde('0x0'));var Redis=require(_0x2bde('0x1'));var db=require(_0x2bde('0x2'))['db'];var logger=require('../../config/logger')('rpc');var config=require(_0x2bde('0x3'));config[_0x2bde('0x4')]=_[_0x2bde('0x5')](config[_0x2bde('0x4')],{'host':_0x2bde('0x6'),'port':0x18eb});var socket=require(_0x2bde('0x7'))(new Redis(config['redis']));require(_0x2bde('0x8'))[_0x2bde('0x9')](socket);exports[_0x2bde('0xa')]=function(_0x54d7da){var _0x3a8ccd=this;return new Promise(function(_0x319993,_0x7b4b11){return db['SquareProject'][_0x2bde('0xb')]({'raw':_0x54d7da['options']?_0x54d7da['options'][_0x2bde('0xc')]===undefined?!![]:![]:!![],'where':_0x54d7da['options']?_0x54d7da[_0x2bde('0xd')]['where']||null:null,'attributes':_0x54d7da[_0x2bde('0xd')]?_0x54d7da['options'][_0x2bde('0xe')]||null:null,'limit':_0x54d7da[_0x2bde('0xd')]?_0x54d7da['options']['limit']||null:null,'include':_0x54d7da[_0x2bde('0xd')]?_0x54d7da[_0x2bde('0xd')][_0x2bde('0xf')]?_[_0x2bde('0x10')](_0x54d7da[_0x2bde('0xd')][_0x2bde('0xf')],function(_0x47df39){return{'model':db[_0x47df39[_0x2bde('0x11')]],'as':_0x47df39['as'],'attributes':_0x47df39[_0x2bde('0xe')],'include':_0x47df39[_0x2bde('0xf')]?_[_0x2bde('0x10')](_0x47df39[_0x2bde('0xf')],function(_0x2fa4c5){return{'model':db[_0x2fa4c5[_0x2bde('0x11')]],'as':_0x2fa4c5['as'],'attributes':_0x2fa4c5[_0x2bde('0xe')],'include':_0x2fa4c5[_0x2bde('0xf')]?_[_0x2bde('0x10')](_0x2fa4c5[_0x2bde('0xf')],function(_0x3e3f4a){return{'model':db[_0x3e3f4a[_0x2bde('0x11')]],'as':_0x3e3f4a['as'],'attributes':_0x3e3f4a['attributes']};}):[]};}):[]};}):[]:[]})[_0x2bde('0x12')](function(_0x2e5fe5){logger[_0x2bde('0x13')]('GetSquareProjects',_0x54d7da);logger['debug'](_0x2bde('0xa'),_0x54d7da,JSON[_0x2bde('0x14')](_0x2e5fe5));_0x319993(_0x2e5fe5);})['catch'](function(_0x4ed9c0){logger[_0x2bde('0x15')]('GetSquareProjects',_0x4ed9c0[_0x2bde('0x16')],_0x54d7da);_0x7b4b11(_0x3a8ccd['error'](0x1f4,_0x4ed9c0[_0x2bde('0x16')]));});});};exports[_0x2bde('0x17')]=function(_0x221b24){var _0xc4db49=this;return new Promise(function(_0x3533bd,_0x21e793){return db[_0x2bde('0x18')][_0x2bde('0x19')]({'raw':_0x221b24['options']?_0x221b24[_0x2bde('0xd')]['raw']===undefined?!![]:![]:!![],'where':_0x221b24[_0x2bde('0xd')]?_0x221b24[_0x2bde('0xd')][_0x2bde('0x1a')]||null:null,'attributes':_0x221b24[_0x2bde('0xd')]?_0x221b24[_0x2bde('0xd')]['attributes']||null:null,'include':_0x221b24[_0x2bde('0xd')]?_0x221b24[_0x2bde('0xd')][_0x2bde('0xf')]?_[_0x2bde('0x10')](_0x221b24['options'][_0x2bde('0xf')],function(_0x16612d){return{'model':db[_0x16612d[_0x2bde('0x11')]],'as':_0x16612d['as'],'attributes':_0x16612d['attributes'],'include':_0x16612d['include']?_[_0x2bde('0x10')](_0x16612d['include'],function(_0x3d8060){return{'model':db[_0x3d8060[_0x2bde('0x11')]],'as':_0x3d8060['as'],'attributes':_0x3d8060[_0x2bde('0xe')],'include':_0x3d8060['include']?_[_0x2bde('0x10')](_0x3d8060[_0x2bde('0xf')],function(_0x4e47ef){return{'model':db[_0x4e47ef[_0x2bde('0x11')]],'as':_0x4e47ef['as'],'attributes':_0x4e47ef['attributes']};}):[]};}):[]};}):[]:[]})[_0x2bde('0x12')](function(_0x4d9d42){logger['info']('ShowSquareProject',_0x221b24);logger[_0x2bde('0x1b')](_0x2bde('0x17'),_0x221b24,JSON[_0x2bde('0x14')](_0x4d9d42));_0x3533bd(_0x4d9d42);})['catch'](function(_0x4d2ceb){logger[_0x2bde('0x15')]('ShowSquareProject',_0x4d2ceb[_0x2bde('0x16')],_0x221b24);_0x21e793(_0xc4db49[_0x2bde('0x15')](0x1f4,_0x4d2ceb[_0x2bde('0x16')]));});});};
\ No newline at end of file
+var _0x9dc6=['SquareProject','find','where','catch','message','lodash','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','redis','localhost','socket.io-emitter','./squareProject.socket','GetSquareProjects','findAll','options','attributes','include','map','model','then','info','debug','stringify','error','ShowSquareProject'];(function(_0x5ec60c,_0x110775){var _0x511af0=function(_0x25e9b0){while(--_0x25e9b0){_0x5ec60c['push'](_0x5ec60c['shift']());}};_0x511af0(++_0x110775);}(_0x9dc6,0x1c5));var _0x69dc=function(_0x3a27ca,_0x5f07c0){_0x3a27ca=_0x3a27ca-0x0;var _0x1faaf1=_0x9dc6[_0x3a27ca];return _0x1faaf1;};'use strict';var _=require(_0x69dc('0x0'));var Redis=require(_0x69dc('0x1'));var db=require(_0x69dc('0x2'))['db'];var logger=require(_0x69dc('0x3'))(_0x69dc('0x4'));var config=require(_0x69dc('0x5'));config[_0x69dc('0x6')]=_['defaults'](config[_0x69dc('0x6')],{'host':_0x69dc('0x7'),'port':0x18eb});var socket=require(_0x69dc('0x8'))(new Redis(config['redis']));require(_0x69dc('0x9'))['register'](socket);exports[_0x69dc('0xa')]=function(_0x3ba48c){var _0x1f8c56=this;return new Promise(function(_0x59d68a,_0x319742){return db['SquareProject'][_0x69dc('0xb')]({'raw':_0x3ba48c['options']?_0x3ba48c['options']['raw']===undefined?!![]:![]:!![],'where':_0x3ba48c[_0x69dc('0xc')]?_0x3ba48c[_0x69dc('0xc')]['where']||null:null,'attributes':_0x3ba48c[_0x69dc('0xc')]?_0x3ba48c['options'][_0x69dc('0xd')]||null:null,'limit':_0x3ba48c['options']?_0x3ba48c[_0x69dc('0xc')]['limit']||null:null,'include':_0x3ba48c['options']?_0x3ba48c['options'][_0x69dc('0xe')]?_[_0x69dc('0xf')](_0x3ba48c[_0x69dc('0xc')]['include'],function(_0x1495e6){return{'model':db[_0x1495e6[_0x69dc('0x10')]],'as':_0x1495e6['as'],'attributes':_0x1495e6[_0x69dc('0xd')],'include':_0x1495e6[_0x69dc('0xe')]?_[_0x69dc('0xf')](_0x1495e6[_0x69dc('0xe')],function(_0x35013d){return{'model':db[_0x35013d[_0x69dc('0x10')]],'as':_0x35013d['as'],'attributes':_0x35013d['attributes'],'include':_0x35013d['include']?_[_0x69dc('0xf')](_0x35013d[_0x69dc('0xe')],function(_0x24c65a){return{'model':db[_0x24c65a[_0x69dc('0x10')]],'as':_0x24c65a['as'],'attributes':_0x24c65a[_0x69dc('0xd')]};}):[]};}):[]};}):[]:[]})[_0x69dc('0x11')](function(_0x2e8693){logger[_0x69dc('0x12')](_0x69dc('0xa'),_0x3ba48c);logger[_0x69dc('0x13')](_0x69dc('0xa'),_0x3ba48c,JSON[_0x69dc('0x14')](_0x2e8693));_0x59d68a(_0x2e8693);})['catch'](function(_0x4db100){logger[_0x69dc('0x15')](_0x69dc('0xa'),_0x4db100['message'],_0x3ba48c);_0x319742(_0x1f8c56['error'](0x1f4,_0x4db100['message']));});});};exports[_0x69dc('0x16')]=function(_0x839345){var _0x464e94=this;return new Promise(function(_0x21d8c7,_0x49f344){return db[_0x69dc('0x17')][_0x69dc('0x18')]({'raw':_0x839345[_0x69dc('0xc')]?_0x839345[_0x69dc('0xc')]['raw']===undefined?!![]:![]:!![],'where':_0x839345[_0x69dc('0xc')]?_0x839345['options'][_0x69dc('0x19')]||null:null,'attributes':_0x839345['options']?_0x839345[_0x69dc('0xc')][_0x69dc('0xd')]||null:null,'include':_0x839345['options']?_0x839345[_0x69dc('0xc')][_0x69dc('0xe')]?_[_0x69dc('0xf')](_0x839345[_0x69dc('0xc')][_0x69dc('0xe')],function(_0x30c3ff){return{'model':db[_0x30c3ff[_0x69dc('0x10')]],'as':_0x30c3ff['as'],'attributes':_0x30c3ff[_0x69dc('0xd')],'include':_0x30c3ff[_0x69dc('0xe')]?_[_0x69dc('0xf')](_0x30c3ff[_0x69dc('0xe')],function(_0x163693){return{'model':db[_0x163693[_0x69dc('0x10')]],'as':_0x163693['as'],'attributes':_0x163693['attributes'],'include':_0x163693[_0x69dc('0xe')]?_[_0x69dc('0xf')](_0x163693[_0x69dc('0xe')],function(_0x125faa){return{'model':db[_0x125faa[_0x69dc('0x10')]],'as':_0x125faa['as'],'attributes':_0x125faa[_0x69dc('0xd')]};}):[]};}):[]};}):[]:[]})[_0x69dc('0x11')](function(_0x596a14){logger[_0x69dc('0x12')](_0x69dc('0x16'),_0x839345);logger[_0x69dc('0x13')](_0x69dc('0x16'),_0x839345,JSON[_0x69dc('0x14')](_0x596a14));_0x21d8c7(_0x596a14);})[_0x69dc('0x1a')](function(_0x4647b7){logger[_0x69dc('0x15')](_0x69dc('0x16'),_0x4647b7[_0x69dc('0x1b')],_0x839345);_0x49f344(_0x464e94[_0x69dc('0x15')](0x1f4,_0x4647b7[_0x69dc('0x1b')]));});});};
\ No newline at end of file
index fd91059..0e10f39 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3b7a=['squareProject:','./squareProject.events','remove','update','emit','removeListener','register','length'];(function(_0x30d73b,_0x88d9a3){var _0x4e72d1=function(_0x160631){while(--_0x160631){_0x30d73b['push'](_0x30d73b['shift']());}};_0x4e72d1(++_0x88d9a3);}(_0x3b7a,0x1b1));var _0xa3b7=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0x3b7a[_0x17d9e3];return _0x14192d;};'use strict';var SquareProjectEvents=require(_0xa3b7('0x0'));var events=['save',_0xa3b7('0x1'),_0xa3b7('0x2')];function createListener(_0x50adfb,_0x3cfed5){return function(_0x423556){_0x3cfed5[_0xa3b7('0x3')](_0x50adfb,_0x423556);};}function removeListener(_0x3447d9,_0x189e1f){return function(){SquareProjectEvents[_0xa3b7('0x4')](_0x3447d9,_0x189e1f);};}exports[_0xa3b7('0x5')]=function(_0x39ba27){for(var _0x1fe18c=0x0,_0x18843b=events[_0xa3b7('0x6')];_0x1fe18c<_0x18843b;_0x1fe18c++){var _0x28c02d=events[_0x1fe18c];var _0x1f4422=createListener(_0xa3b7('0x7')+_0x28c02d,_0x39ba27);SquareProjectEvents['on'](_0x28c02d,_0x1f4422);}};
\ No newline at end of file
+var _0xdc01=['./squareProject.events','save','update','emit','removeListener','squareProject:'];(function(_0x4413d0,_0x113254){var _0x109c4b=function(_0x1f93a5){while(--_0x1f93a5){_0x4413d0['push'](_0x4413d0['shift']());}};_0x109c4b(++_0x113254);}(_0xdc01,0x66));var _0x1dc0=function(_0x11e0f0,_0x443a2b){_0x11e0f0=_0x11e0f0-0x0;var _0x568de9=_0xdc01[_0x11e0f0];return _0x568de9;};'use strict';var SquareProjectEvents=require(_0x1dc0('0x0'));var events=[_0x1dc0('0x1'),'remove',_0x1dc0('0x2')];function createListener(_0x5ef198,_0x2223d1){return function(_0x4b9c5f){_0x2223d1[_0x1dc0('0x3')](_0x5ef198,_0x4b9c5f);};}function removeListener(_0x8411b6,_0x5c3c80){return function(){SquareProjectEvents[_0x1dc0('0x4')](_0x8411b6,_0x5c3c80);};}exports['register']=function(_0x181e6e){for(var _0x1fc95d=0x0,_0x1b4c73=events['length'];_0x1fc95d<_0x1b4c73;_0x1fc95d++){var _0x1862fe=events[_0x1fc95d];var _0x5e66d8=createListener(_0x1dc0('0x5')+_0x1862fe,_0x181e6e);SquareProjectEvents['on'](_0x1862fe,_0x5e66d8);}};
\ No newline at end of file
index bd83a73..b42b15d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x814b=['multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareRecording.controller','get','isAuthenticated','/:id','show','/:id/download','download','post','create','put','delete','destroy','exports'];(function(_0x5511f2,_0x90ec21){var _0x2f2727=function(_0x2befe3){while(--_0x2befe3){_0x5511f2['push'](_0x5511f2['shift']());}};_0x2f2727(++_0x90ec21);}(_0x814b,0x1a2));var _0xb814=function(_0x1cb18a,_0x33167a){_0x1cb18a=_0x1cb18a-0x0;var _0x22442e=_0x814b[_0x1cb18a];return _0x22442e;};'use strict';var multer=require(_0xb814('0x0'));var util=require(_0xb814('0x1'));var path=require(_0xb814('0x2'));var timeout=require(_0xb814('0x3'));var express=require(_0xb814('0x4'));var router=express[_0xb814('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xb814('0x6'));var interaction=require(_0xb814('0x7'));var config=require(_0xb814('0x8'));var controller=require(_0xb814('0x9'));router[_0xb814('0xa')]('/',auth[_0xb814('0xb')](),controller['index']);router[_0xb814('0xa')](_0xb814('0xc'),auth['isAuthenticated'](),controller[_0xb814('0xd')]);router[_0xb814('0xa')](_0xb814('0xe'),auth[_0xb814('0xb')](),controller[_0xb814('0xf')]);router[_0xb814('0x10')]('/',auth[_0xb814('0xb')](),controller[_0xb814('0x11')]);router[_0xb814('0x12')](_0xb814('0xc'),auth[_0xb814('0xb')](),controller['update']);router[_0xb814('0x13')]('/:id',auth[_0xb814('0xb')](),controller[_0xb814('0x14')]);module[_0xb814('0x15')]=router;
\ No newline at end of file
+var _0x1261=['isAuthenticated','show','/:id/download','post','create','/:id','delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareRecording.controller','index','get'];(function(_0x4d9f8f,_0x61de47){var _0x1809df=function(_0x5eceb2){while(--_0x5eceb2){_0x4d9f8f['push'](_0x4d9f8f['shift']());}};_0x1809df(++_0x61de47);}(_0x1261,0x144));var _0x1126=function(_0x4687df,_0x12099c){_0x4687df=_0x4687df-0x0;var _0x32eaef=_0x1261[_0x4687df];return _0x32eaef;};'use strict';var multer=require('multer');var util=require(_0x1126('0x0'));var path=require(_0x1126('0x1'));var timeout=require(_0x1126('0x2'));var express=require(_0x1126('0x3'));var router=express[_0x1126('0x4')]();var fs_extra=require(_0x1126('0x5'));var auth=require(_0x1126('0x6'));var interaction=require(_0x1126('0x7'));var config=require(_0x1126('0x8'));var controller=require(_0x1126('0x9'));router['get']('/',auth['isAuthenticated'](),controller[_0x1126('0xa')]);router[_0x1126('0xb')]('/:id',auth[_0x1126('0xc')](),controller[_0x1126('0xd')]);router[_0x1126('0xb')](_0x1126('0xe'),auth[_0x1126('0xc')](),controller['download']);router[_0x1126('0xf')]('/',auth[_0x1126('0xc')](),controller[_0x1126('0x10')]);router['put'](_0x1126('0x11'),auth['isAuthenticated'](),controller['update']);router[_0x1126('0x12')]('/:id',auth[_0x1126('0xc')](),controller[_0x1126('0x13')]);module[_0x1126('0x14')]=router;
\ No newline at end of file
index 89cca41..30ebca2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa630=['substring','sequelize','exports','STRING','VIRTUAL','getDataValue','savePath'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xa630,0xbe));var _0x0a63=function(_0x212887,_0x310a3b){_0x212887=_0x212887-0x0;var _0x17e91e=_0xa630[_0x212887];return _0x17e91e;};'use strict';var Sequelize=require(_0x0a63('0x0'));module[_0x0a63('0x1')]={'uniqueid':{'type':Sequelize['STRING']},'callerid':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x0a63('0x2')]},'context':{'type':Sequelize['STRING']},'extension':{'type':Sequelize[_0x0a63('0x2')]},'priority':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize[_0x0a63('0x2')]},'dnid':{'type':Sequelize[_0x0a63('0x2')]},'projectName':{'type':Sequelize[_0x0a63('0x2')]},'saveName':{'type':Sequelize[_0x0a63('0x2')]},'filename':{'type':Sequelize[_0x0a63('0x2')]},'savePath':{'type':Sequelize['STRING']},'format':{'type':Sequelize[_0x0a63('0x3')],'get':function(){var _0x3d5f0b='';var _0xc2dcd7=this[_0x0a63('0x4')](_0x0a63('0x5'));if(_0xc2dcd7){_0x3d5f0b=_0xc2dcd7[_0x0a63('0x6')](_0xc2dcd7['lastIndexOf']('.'));}return _0x3d5f0b;}}};
\ No newline at end of file
+var _0xf2ca=['getDataValue','substring','sequelize','exports','STRING','VIRTUAL'];(function(_0x5f31a8,_0x28246c){var _0x28a9ea=function(_0x179cb7){while(--_0x179cb7){_0x5f31a8['push'](_0x5f31a8['shift']());}};_0x28a9ea(++_0x28246c);}(_0xf2ca,0x16a));var _0xaf2c=function(_0x10791d,_0x2562b6){_0x10791d=_0x10791d-0x0;var _0x1b4f9c=_0xf2ca[_0x10791d];return _0x1b4f9c;};'use strict';var Sequelize=require(_0xaf2c('0x0'));module[_0xaf2c('0x1')]={'uniqueid':{'type':Sequelize[_0xaf2c('0x2')]},'callerid':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0xaf2c('0x2')]},'context':{'type':Sequelize[_0xaf2c('0x2')]},'extension':{'type':Sequelize[_0xaf2c('0x2')]},'priority':{'type':Sequelize[_0xaf2c('0x2')]},'accountcode':{'type':Sequelize[_0xaf2c('0x2')]},'dnid':{'type':Sequelize[_0xaf2c('0x2')]},'projectName':{'type':Sequelize['STRING']},'saveName':{'type':Sequelize[_0xaf2c('0x2')]},'filename':{'type':Sequelize[_0xaf2c('0x2')]},'savePath':{'type':Sequelize[_0xaf2c('0x2')]},'format':{'type':Sequelize[_0xaf2c('0x3')],'get':function(){var _0x58351f='';var _0x37fedd=this[_0xaf2c('0x4')]('savePath');if(_0x37fedd){_0x58351f=_0x37fedd[_0xaf2c('0x5')](_0x37fedd['lastIndexOf']('.'));}return _0x58351f;}}};
\ No newline at end of file
index 189b081..d41822a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfea5=['order','sort','where','VIRTUAL','filter','options','SquareRecording','includeAll','include','findAll','rows','catch','show','rawAttributes','find','create','update','body','download','../../components/encryptor','uniqueid','params','savePath','filename','format','existsSync','decryptFile','secrets','recording','Sequelize','extname','unlink','message','SquareRecording\x20not\x20found','Not\x20found','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','isNil','unlinkSync','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','zip-dir','fast-json-patch','request-promise','bluebird','util','path','sox','fs-extra','lodash','squel','crypto','jsforce','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','end','json','offset','limit','undefined','count','status','set','Content-Range','apply','reject','save','destroy','then','sendStatus','error','stack','name','send','index','map','fieldName','type','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0xfea5,0x8d));var _0x5fea=function(_0x5141a2,_0x3d81e5){_0x5141a2=_0x5141a2-0x0;var _0x9d6b28=_0xfea5[_0x5141a2];return _0x9d6b28;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x5fea('0x0'));var jsonpatch=require(_0x5fea('0x1'));var rp=require(_0x5fea('0x2'));var moment=require('moment');var BPromise=require(_0x5fea('0x3'));var Mustache=require('mustache');var util=require(_0x5fea('0x4'));var path=require(_0x5fea('0x5'));var sox=require(_0x5fea('0x6'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x5fea('0x7'));var _=require(_0x5fea('0x8'));var squel=require(_0x5fea('0x9'));var crypto=require(_0x5fea('0xa'));var jsforce=require(_0x5fea('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x5fea('0xc'));var querystring=require(_0x5fea('0xd'));var Papa=require(_0x5fea('0xe'));var Redis=require(_0x5fea('0xf'));var authService=require(_0x5fea('0x10'));var qs=require(_0x5fea('0x11'));var as=require(_0x5fea('0x12'));var hardwareService=require(_0x5fea('0x13'));var logger=require('../../config/logger')('api');var utils=require(_0x5fea('0x14'));var config=require(_0x5fea('0x15'));var licenseUtil=require(_0x5fea('0x16'));var db=require(_0x5fea('0x17'))['db'];function respondWithStatusCode(_0xb43291,_0x183eac){_0x183eac=_0x183eac||0xcc;return function(_0x5dd2bf){if(_0x5dd2bf){return _0xb43291['sendStatus'](_0x183eac);}return _0xb43291['status'](_0x183eac)[_0x5fea('0x18')]();};}function respondWithResult(_0x3a9c92,_0x28d09c){_0x28d09c=_0x28d09c||0xc8;return function(_0x132c9b){if(_0x132c9b){return _0x3a9c92['status'](_0x28d09c)[_0x5fea('0x19')](_0x132c9b);}};}function respondWithFilteredResult(_0x3f31c5,_0xdb0372){return function(_0x565497){if(_0x565497){var _0x3cc130=typeof _0xdb0372[_0x5fea('0x1a')]==='undefined'&&typeof _0xdb0372[_0x5fea('0x1b')]===_0x5fea('0x1c');var _0x4db19f=_0x565497[_0x5fea('0x1d')];var _0x10d90d=_0x3cc130?0x0:_0xdb0372[_0x5fea('0x1a')];var _0x4723b2=_0x3cc130?_0x565497[_0x5fea('0x1d')]:_0xdb0372[_0x5fea('0x1a')]+_0xdb0372[_0x5fea('0x1b')];var _0xb26577;if(_0x4723b2>=_0x4db19f){_0x4723b2=_0x4db19f;_0xb26577=0xc8;}else{_0xb26577=0xce;}_0x3f31c5[_0x5fea('0x1e')](_0xb26577);return _0x3f31c5[_0x5fea('0x1f')](_0x5fea('0x20'),_0x10d90d+'-'+_0x4723b2+'/'+_0x4db19f)[_0x5fea('0x19')](_0x565497);}return null;};}function patchUpdates(_0x148e03){return function(_0x13dc09){try{jsonpatch[_0x5fea('0x21')](_0x13dc09,_0x148e03,!![]);}catch(_0x5089ca){return BPromise[_0x5fea('0x22')](_0x5089ca);}return _0x13dc09[_0x5fea('0x23')]();};}function saveUpdates(_0x4780ea,_0x2576ec){return function(_0x548778){if(_0x548778){return _0x548778['update'](_0x4780ea)['then'](function(_0x1866de){return _0x1866de;});}return null;};}function removeEntity(_0x22a6dc,_0x4a9f3f){return function(_0x379896){if(_0x379896){return _0x379896[_0x5fea('0x24')]()[_0x5fea('0x25')](function(){_0x22a6dc['status'](0xcc)[_0x5fea('0x18')]();});}};}function handleEntityNotFound(_0x462bec,_0xa0f361){return function(_0x337825){if(!_0x337825){_0x462bec[_0x5fea('0x26')](0x194);}return _0x337825;};}function handleError(_0x962ada,_0x3e52af){_0x3e52af=_0x3e52af||0x1f4;return function(_0x402f60){logger[_0x5fea('0x27')](_0x402f60[_0x5fea('0x28')]);if(_0x402f60['name']){delete _0x402f60[_0x5fea('0x29')];}_0x962ada[_0x5fea('0x1e')](_0x3e52af)[_0x5fea('0x2a')](_0x402f60);};}exports[_0x5fea('0x2b')]=function(_0xce60b4,_0x2fc7f5){var _0x30c07e={},_0x3840ea={},_0x3be256={'count':0x0,'rows':[]};var _0x21973f=_[_0x5fea('0x2c')](db['SquareRecording']['rawAttributes'],function(_0x1aa69b){return{'name':_0x1aa69b[_0x5fea('0x2d')],'type':_0x1aa69b[_0x5fea('0x2e')]['key']};});_0x3840ea[_0x5fea('0x2f')]=_[_0x5fea('0x2c')](_0x21973f,_0x5fea('0x29'));_0x3840ea['query']=_[_0x5fea('0x30')](_0xce60b4[_0x5fea('0x31')]);_0x3840ea[_0x5fea('0x32')]=_[_0x5fea('0x33')](_0x3840ea[_0x5fea('0x2f')],_0x3840ea[_0x5fea('0x31')]);_0x30c07e[_0x5fea('0x34')]=_['intersection'](_0x3840ea[_0x5fea('0x2f')],qs[_0x5fea('0x35')](_0xce60b4[_0x5fea('0x31')][_0x5fea('0x35')]));_0x30c07e['attributes']=_0x30c07e['attributes'][_0x5fea('0x36')]?_0x30c07e['attributes']:_0x3840ea[_0x5fea('0x2f')];if(!_0xce60b4['query'][_0x5fea('0x37')](_0x5fea('0x38'))){_0x30c07e[_0x5fea('0x1b')]=qs['limit'](_0xce60b4[_0x5fea('0x31')][_0x5fea('0x1b')]);_0x30c07e[_0x5fea('0x1a')]=qs['offset'](_0xce60b4['query'][_0x5fea('0x1a')]);}_0x30c07e[_0x5fea('0x39')]=qs[_0x5fea('0x3a')](_0xce60b4[_0x5fea('0x31')][_0x5fea('0x3a')]);_0x30c07e[_0x5fea('0x3b')]=qs[_0x5fea('0x32')](_['pick'](_0xce60b4[_0x5fea('0x31')],_0x3840ea[_0x5fea('0x32')]),_0x21973f);if(_0xce60b4[_0x5fea('0x31')]['filter']){_0x30c07e[_0x5fea('0x3b')]=_['merge'](_0x30c07e[_0x5fea('0x3b')],{'$or':_[_0x5fea('0x2c')](_0x21973f,function(_0x507760){if(_0x507760[_0x5fea('0x2e')]!==_0x5fea('0x3c')){var _0x6cf766={};_0x6cf766[_0x507760[_0x5fea('0x29')]]={'$like':'%'+_0xce60b4[_0x5fea('0x31')][_0x5fea('0x3d')]+'%'};return _0x6cf766;}})});}_0x30c07e=_['merge']({},_0x30c07e,_0xce60b4[_0x5fea('0x3e')]);var _0x52c1fa={'where':_0x30c07e[_0x5fea('0x3b')]};return db[_0x5fea('0x3f')][_0x5fea('0x1d')](_0x52c1fa)[_0x5fea('0x25')](function(_0x40374b){_0x3be256[_0x5fea('0x1d')]=_0x40374b;if(_0xce60b4[_0x5fea('0x31')][_0x5fea('0x40')]){_0x30c07e[_0x5fea('0x41')]=[{'all':!![]}];}return db[_0x5fea('0x3f')][_0x5fea('0x42')](_0x30c07e);})[_0x5fea('0x25')](function(_0x4024cd){_0x3be256[_0x5fea('0x43')]=_0x4024cd;return _0x3be256;})[_0x5fea('0x25')](respondWithFilteredResult(_0x2fc7f5,_0x30c07e))[_0x5fea('0x44')](handleError(_0x2fc7f5,null));};exports[_0x5fea('0x45')]=function(_0x51377a,_0x1ea7d2){var _0x5b91ee={'raw':!![],'where':{'id':_0x51377a['params']['id']}},_0xe0039f={};_0xe0039f[_0x5fea('0x2f')]=_[_0x5fea('0x30')](db[_0x5fea('0x3f')][_0x5fea('0x46')]);_0xe0039f[_0x5fea('0x31')]=_[_0x5fea('0x30')](_0x51377a[_0x5fea('0x31')]);_0xe0039f[_0x5fea('0x32')]=_[_0x5fea('0x33')](_0xe0039f[_0x5fea('0x2f')],_0xe0039f['query']);_0x5b91ee['attributes']=_['intersection'](_0xe0039f[_0x5fea('0x2f')],qs[_0x5fea('0x35')](_0x51377a[_0x5fea('0x31')]['fields']));_0x5b91ee[_0x5fea('0x34')]=_0x5b91ee['attributes'][_0x5fea('0x36')]?_0x5b91ee[_0x5fea('0x34')]:_0xe0039f[_0x5fea('0x2f')];if(_0x51377a[_0x5fea('0x31')][_0x5fea('0x40')]){_0x5b91ee[_0x5fea('0x41')]=[{'all':!![]}];}_0x5b91ee=_['merge']({},_0x5b91ee,_0x51377a[_0x5fea('0x3e')]);return db[_0x5fea('0x3f')][_0x5fea('0x47')](_0x5b91ee)[_0x5fea('0x25')](handleEntityNotFound(_0x1ea7d2,null))[_0x5fea('0x25')](respondWithResult(_0x1ea7d2,null))['catch'](handleError(_0x1ea7d2,null));};exports['create']=function(_0x3ab8aa,_0x3d741a){return db[_0x5fea('0x3f')][_0x5fea('0x48')](_0x3ab8aa['body'],{})['then'](respondWithResult(_0x3d741a,0xc9))[_0x5fea('0x44')](handleError(_0x3d741a,null));};exports[_0x5fea('0x49')]=function(_0x5b4917,_0x126b50){if(_0x5b4917['body']['id']){delete _0x5b4917[_0x5fea('0x4a')]['id'];}return db[_0x5fea('0x3f')][_0x5fea('0x47')]({'where':{'id':_0x5b4917['params']['id']}})[_0x5fea('0x25')](handleEntityNotFound(_0x126b50,null))[_0x5fea('0x25')](saveUpdates(_0x5b4917[_0x5fea('0x4a')],null))[_0x5fea('0x25')](respondWithResult(_0x126b50,null))[_0x5fea('0x44')](handleError(_0x126b50,null));};exports[_0x5fea('0x4b')]=function(_0x22eac7,_0x589616,_0xccbc43){var _0x550f65=require(_0x5fea('0x4c'));var _0x3796bd=![];var _0xc75414={};if(_0x22eac7['query']['type']&&_0x22eac7['query'][_0x5fea('0x2e')]==='uniqueid'){_0xc75414[_0x5fea('0x4d')]=_0x22eac7[_0x5fea('0x4e')]['id'];}else{_0xc75414['id']=_0x22eac7['params']['id'];}return db['SquareRecording'][_0x5fea('0x47')]({'where':_0xc75414,'attributes':['id',_0x5fea('0x4f'),_0x5fea('0x50')],'raw':!![]})[_0x5fea('0x25')](handleEntityNotFound(_0x589616,null))[_0x5fea('0x25')](function(_0x5f23f7){if(_0x5f23f7){var _0xb4d96e=_0x5f23f7[_0x5fea('0x4f')];var _0x4fa088=util[_0x5fea('0x51')]('%s.cypher',_0xb4d96e);if(fs[_0x5fea('0x52')](_0x4fa088)){_0x3796bd=!![];return _0x550f65[_0x5fea('0x53')](_0x4fa088,_0xb4d96e,config[_0x5fea('0x54')][_0x5fea('0x55')])[_0x5fea('0x25')](function(){return _0x5f23f7;});}return _0x5f23f7;}})[_0x5fea('0x25')](function(_0x2d5b74){if(_0x2d5b74){var _0x5da802=_0x2d5b74[_0x5fea('0x4f')];if(!fs[_0x5fea('0x52')](_0x5da802)){throw new db[(_0x5fea('0x56'))]['ValidationError']('SquareRecording\x20not\x20found');}if(_0x2d5b74[_0x5fea('0x50')]){return _0x589616[_0x5fea('0x4b')](_0x5da802,_0x2d5b74['filename']+path[_0x5fea('0x57')](_0x5da802),function(){if(_0x3796bd){fs['unlink'](_0x5da802);}});}else{return _0x589616[_0x5fea('0x4b')](_0x5da802,function(_0x5a3bcd){if(_0x3796bd){fs[_0x5fea('0x58')](_0x5da802);}});}}})[_0x5fea('0x44')](function(_0x3f9c6e){if(_0x3f9c6e[_0x5fea('0x59')]===_0x5fea('0x5a')){_0x589616['status'](0x194)[_0x5fea('0x2a')](_0x5fea('0x5b'));}else{return handleError(_0x589616,null);}});};exports[_0x5fea('0x24')]=function(_0x2930d6,_0x20acb7){return db[_0x5fea('0x3f')][_0x5fea('0x47')]({'where':{'id':_0x2930d6[_0x5fea('0x4e')]['id']}})[_0x5fea('0x25')](function(_0x2e3499){if(_['isNil'](_0x2e3499)){throw new ReferenceError(_0x5fea('0x5c'));}return _0x2e3499;})[_0x5fea('0x25')](function(_0x59b830){var _0x2a1775=_0x59b830[_0x5fea('0x4f')];logger[_0x5fea('0x5d')](_0x5fea('0x5e'),_0x2a1775);if(!_[_0x5fea('0x5f')](_0x59b830[_0x5fea('0x4f')])&&fs['existsSync'](_0x2a1775)){logger[_0x5fea('0x5d')]('File:\x20\x22'+_0x2a1775+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione');fs[_0x5fea('0x60')](_0x2a1775);}_0x2a1775=_0x2a1775+'.cypher';if(!_[_0x5fea('0x5f')](_0x59b830[_0x5fea('0x4f')])&&fs[_0x5fea('0x52')](_0x2a1775)){logger[_0x5fea('0x5d')](_0x5fea('0x61')+_0x2a1775+_0x5fea('0x62'));fs[_0x5fea('0x60')](_0x2a1775);}return _0x59b830;})['then'](function(_0x48f333){if(!_0x48f333)throw new InternalError();return _0x48f333[_0x5fea('0x24')]();})[_0x5fea('0x25')](function(){_0x20acb7[_0x5fea('0x1e')](0xcc)[_0x5fea('0x18')]();})['catch'](handleError(_0x20acb7,null));};
\ No newline at end of file
+var _0xe436=['where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','find','create','body','download','../../components/encryptor','uniqueid','savePath','format','%s.cypher','existsSync','decryptFile','secrets','recording','ValidationError','SquareRecording\x20not\x20found','filename','unlink','message','Not\x20found','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','isNil','File:\x20\x22','unlinkSync','.cypher','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','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','undefined','limit','count','offset','set','Content-Range','json','apply','update','then','destroy','end','sendStatus','error','stack','name','send','map','SquareRecording','rawAttributes','type','key','model','query','keys','filters','intersection','fields','attributes','length','nolimit','order'];(function(_0xdc9add,_0x59f59f){var _0x3ab401=function(_0x5406cb){while(--_0x5406cb){_0xdc9add['push'](_0xdc9add['shift']());}};_0x3ab401(++_0x59f59f);}(_0xe436,0x89));var _0x6e43=function(_0xd406bd,_0x1f516e){_0xd406bd=_0xd406bd-0x0;var _0x57422b=_0xe436[_0xd406bd];return _0x57422b;};'use strict';var emlformat=require(_0x6e43('0x0'));var rimraf=require(_0x6e43('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x6e43('0x2'));var rp=require(_0x6e43('0x3'));var moment=require(_0x6e43('0x4'));var BPromise=require(_0x6e43('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x6e43('0x6'));var sox=require(_0x6e43('0x7'));var csv=require(_0x6e43('0x8'));var ejs=require(_0x6e43('0x9'));var fs=require('fs');var fs_extra=require(_0x6e43('0xa'));var _=require(_0x6e43('0xb'));var squel=require('squel');var crypto=require(_0x6e43('0xc'));var jsforce=require(_0x6e43('0xd'));var deskjs=require(_0x6e43('0xe'));var toCsv=require(_0x6e43('0x8'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x6e43('0xf'));var authService=require(_0x6e43('0x10'));var qs=require(_0x6e43('0x11'));var as=require(_0x6e43('0x12'));var hardwareService=require(_0x6e43('0x13'));var logger=require(_0x6e43('0x14'))(_0x6e43('0x15'));var utils=require(_0x6e43('0x16'));var config=require(_0x6e43('0x17'));var licenseUtil=require(_0x6e43('0x18'));var db=require(_0x6e43('0x19'))['db'];function respondWithStatusCode(_0x417484,_0x226b4f){_0x226b4f=_0x226b4f||0xcc;return function(_0x5b6777){if(_0x5b6777){return _0x417484['sendStatus'](_0x226b4f);}return _0x417484[_0x6e43('0x1a')](_0x226b4f)['end']();};}function respondWithResult(_0x20451b,_0x17e046){_0x17e046=_0x17e046||0xc8;return function(_0x3a23bd){if(_0x3a23bd){return _0x20451b[_0x6e43('0x1a')](_0x17e046)['json'](_0x3a23bd);}};}function respondWithFilteredResult(_0x1b7e1d,_0x4b512a){return function(_0x37fb6a){if(_0x37fb6a){var _0x67d191=typeof _0x4b512a['offset']===_0x6e43('0x1b')&&typeof _0x4b512a[_0x6e43('0x1c')]===_0x6e43('0x1b');var _0x14d3b5=_0x37fb6a[_0x6e43('0x1d')];var _0x1da9d5=_0x67d191?0x0:_0x4b512a[_0x6e43('0x1e')];var _0x245cc4=_0x67d191?_0x37fb6a[_0x6e43('0x1d')]:_0x4b512a[_0x6e43('0x1e')]+_0x4b512a['limit'];var _0x1f6f05;if(_0x245cc4>=_0x14d3b5){_0x245cc4=_0x14d3b5;_0x1f6f05=0xc8;}else{_0x1f6f05=0xce;}_0x1b7e1d[_0x6e43('0x1a')](_0x1f6f05);return _0x1b7e1d[_0x6e43('0x1f')](_0x6e43('0x20'),_0x1da9d5+'-'+_0x245cc4+'/'+_0x14d3b5)[_0x6e43('0x21')](_0x37fb6a);}return null;};}function patchUpdates(_0xaf0fc4){return function(_0x35db81){try{jsonpatch[_0x6e43('0x22')](_0x35db81,_0xaf0fc4,!![]);}catch(_0x9341a){return BPromise['reject'](_0x9341a);}return _0x35db81['save']();};}function saveUpdates(_0x34aa24,_0x3ae1c4){return function(_0x3137aa){if(_0x3137aa){return _0x3137aa[_0x6e43('0x23')](_0x34aa24)[_0x6e43('0x24')](function(_0x1e6920){return _0x1e6920;});}return null;};}function removeEntity(_0x47c6eb,_0x21e374){return function(_0x502f14){if(_0x502f14){return _0x502f14[_0x6e43('0x25')]()[_0x6e43('0x24')](function(){_0x47c6eb['status'](0xcc)[_0x6e43('0x26')]();});}};}function handleEntityNotFound(_0x895dbd,_0x526fc5){return function(_0xd785b3){if(!_0xd785b3){_0x895dbd[_0x6e43('0x27')](0x194);}return _0xd785b3;};}function handleError(_0x14fc53,_0x5ac431){_0x5ac431=_0x5ac431||0x1f4;return function(_0x15e76e){logger[_0x6e43('0x28')](_0x15e76e[_0x6e43('0x29')]);if(_0x15e76e[_0x6e43('0x2a')]){delete _0x15e76e[_0x6e43('0x2a')];}_0x14fc53[_0x6e43('0x1a')](_0x5ac431)[_0x6e43('0x2b')](_0x15e76e);};}exports['index']=function(_0x227513,_0x503c40){var _0x2c73d4={},_0x3fd446={},_0x386ff1={'count':0x0,'rows':[]};var _0x31e005=_[_0x6e43('0x2c')](db[_0x6e43('0x2d')][_0x6e43('0x2e')],function(_0x470a5b){return{'name':_0x470a5b['fieldName'],'type':_0x470a5b[_0x6e43('0x2f')][_0x6e43('0x30')]};});_0x3fd446[_0x6e43('0x31')]=_['map'](_0x31e005,_0x6e43('0x2a'));_0x3fd446[_0x6e43('0x32')]=_[_0x6e43('0x33')](_0x227513[_0x6e43('0x32')]);_0x3fd446[_0x6e43('0x34')]=_[_0x6e43('0x35')](_0x3fd446[_0x6e43('0x31')],_0x3fd446[_0x6e43('0x32')]);_0x2c73d4['attributes']=_[_0x6e43('0x35')](_0x3fd446[_0x6e43('0x31')],qs['fields'](_0x227513[_0x6e43('0x32')][_0x6e43('0x36')]));_0x2c73d4[_0x6e43('0x37')]=_0x2c73d4['attributes'][_0x6e43('0x38')]?_0x2c73d4[_0x6e43('0x37')]:_0x3fd446[_0x6e43('0x31')];if(!_0x227513[_0x6e43('0x32')]['hasOwnProperty'](_0x6e43('0x39'))){_0x2c73d4[_0x6e43('0x1c')]=qs[_0x6e43('0x1c')](_0x227513[_0x6e43('0x32')][_0x6e43('0x1c')]);_0x2c73d4['offset']=qs[_0x6e43('0x1e')](_0x227513[_0x6e43('0x32')]['offset']);}_0x2c73d4[_0x6e43('0x3a')]=qs['sort'](_0x227513[_0x6e43('0x32')]['sort']);_0x2c73d4[_0x6e43('0x3b')]=qs[_0x6e43('0x34')](_[_0x6e43('0x3c')](_0x227513[_0x6e43('0x32')],_0x3fd446[_0x6e43('0x34')]),_0x31e005);if(_0x227513[_0x6e43('0x32')][_0x6e43('0x3d')]){_0x2c73d4['where']=_[_0x6e43('0x3e')](_0x2c73d4[_0x6e43('0x3b')],{'$or':_[_0x6e43('0x2c')](_0x31e005,function(_0x1cea43){if(_0x1cea43[_0x6e43('0x2f')]!==_0x6e43('0x3f')){var _0x3deebc={};_0x3deebc[_0x1cea43[_0x6e43('0x2a')]]={'$like':'%'+_0x227513[_0x6e43('0x32')][_0x6e43('0x3d')]+'%'};return _0x3deebc;}})});}_0x2c73d4=_[_0x6e43('0x3e')]({},_0x2c73d4,_0x227513[_0x6e43('0x40')]);var _0x3f1c9e={'where':_0x2c73d4[_0x6e43('0x3b')]};return db[_0x6e43('0x2d')]['count'](_0x3f1c9e)[_0x6e43('0x24')](function(_0x549ecf){_0x386ff1[_0x6e43('0x1d')]=_0x549ecf;if(_0x227513['query'][_0x6e43('0x41')]){_0x2c73d4[_0x6e43('0x42')]=[{'all':!![]}];}return db[_0x6e43('0x2d')][_0x6e43('0x43')](_0x2c73d4);})[_0x6e43('0x24')](function(_0x56cb91){_0x386ff1[_0x6e43('0x44')]=_0x56cb91;return _0x386ff1;})[_0x6e43('0x24')](respondWithFilteredResult(_0x503c40,_0x2c73d4))[_0x6e43('0x45')](handleError(_0x503c40,null));};exports['show']=function(_0x5cc5e2,_0x5ca9ad){var _0x2745ac={'raw':!![],'where':{'id':_0x5cc5e2[_0x6e43('0x46')]['id']}},_0x566798={};_0x566798['model']=_[_0x6e43('0x33')](db['SquareRecording'][_0x6e43('0x2e')]);_0x566798[_0x6e43('0x32')]=_[_0x6e43('0x33')](_0x5cc5e2[_0x6e43('0x32')]);_0x566798[_0x6e43('0x34')]=_['intersection'](_0x566798['model'],_0x566798[_0x6e43('0x32')]);_0x2745ac[_0x6e43('0x37')]=_[_0x6e43('0x35')](_0x566798[_0x6e43('0x31')],qs[_0x6e43('0x36')](_0x5cc5e2[_0x6e43('0x32')][_0x6e43('0x36')]));_0x2745ac[_0x6e43('0x37')]=_0x2745ac[_0x6e43('0x37')][_0x6e43('0x38')]?_0x2745ac[_0x6e43('0x37')]:_0x566798[_0x6e43('0x31')];if(_0x5cc5e2['query']['includeAll']){_0x2745ac[_0x6e43('0x42')]=[{'all':!![]}];}_0x2745ac=_['merge']({},_0x2745ac,_0x5cc5e2[_0x6e43('0x40')]);return db[_0x6e43('0x2d')][_0x6e43('0x47')](_0x2745ac)['then'](handleEntityNotFound(_0x5ca9ad,null))[_0x6e43('0x24')](respondWithResult(_0x5ca9ad,null))['catch'](handleError(_0x5ca9ad,null));};exports[_0x6e43('0x48')]=function(_0x3fe576,_0x4820e3){return db[_0x6e43('0x2d')][_0x6e43('0x48')](_0x3fe576[_0x6e43('0x49')],{})[_0x6e43('0x24')](respondWithResult(_0x4820e3,0xc9))[_0x6e43('0x45')](handleError(_0x4820e3,null));};exports[_0x6e43('0x23')]=function(_0x5557e1,_0x449329){if(_0x5557e1['body']['id']){delete _0x5557e1[_0x6e43('0x49')]['id'];}return db[_0x6e43('0x2d')][_0x6e43('0x47')]({'where':{'id':_0x5557e1[_0x6e43('0x46')]['id']}})[_0x6e43('0x24')](handleEntityNotFound(_0x449329,null))[_0x6e43('0x24')](saveUpdates(_0x5557e1[_0x6e43('0x49')],null))[_0x6e43('0x24')](respondWithResult(_0x449329,null))[_0x6e43('0x45')](handleError(_0x449329,null));};exports[_0x6e43('0x4a')]=function(_0x4c7a9f,_0x6cfbb4,_0x247449){var _0x25b6e9=require(_0x6e43('0x4b'));var _0x158e82=![];var _0x1a2e55={};if(_0x4c7a9f[_0x6e43('0x32')][_0x6e43('0x2f')]&&_0x4c7a9f[_0x6e43('0x32')][_0x6e43('0x2f')]===_0x6e43('0x4c')){_0x1a2e55[_0x6e43('0x4c')]=_0x4c7a9f['params']['id'];}else{_0x1a2e55['id']=_0x4c7a9f[_0x6e43('0x46')]['id'];}return db[_0x6e43('0x2d')][_0x6e43('0x47')]({'where':_0x1a2e55,'attributes':['id','savePath','filename'],'raw':!![]})['then'](handleEntityNotFound(_0x6cfbb4,null))[_0x6e43('0x24')](function(_0x30ca4e){if(_0x30ca4e){var _0x24ee5d=_0x30ca4e[_0x6e43('0x4d')];var _0x533193=util[_0x6e43('0x4e')](_0x6e43('0x4f'),_0x24ee5d);if(fs[_0x6e43('0x50')](_0x533193)){_0x158e82=!![];return _0x25b6e9[_0x6e43('0x51')](_0x533193,_0x24ee5d,config[_0x6e43('0x52')][_0x6e43('0x53')])[_0x6e43('0x24')](function(){return _0x30ca4e;});}return _0x30ca4e;}})[_0x6e43('0x24')](function(_0x4185d6){if(_0x4185d6){var _0x492d01=_0x4185d6[_0x6e43('0x4d')];if(!fs[_0x6e43('0x50')](_0x492d01)){throw new db['Sequelize'][(_0x6e43('0x54'))](_0x6e43('0x55'));}if(_0x4185d6[_0x6e43('0x56')]){return _0x6cfbb4[_0x6e43('0x4a')](_0x492d01,_0x4185d6[_0x6e43('0x56')]+path['extname'](_0x492d01),function(){if(_0x158e82){fs[_0x6e43('0x57')](_0x492d01);}});}else{return _0x6cfbb4[_0x6e43('0x4a')](_0x492d01,function(_0x77abde){if(_0x158e82){fs[_0x6e43('0x57')](_0x492d01);}});}}})[_0x6e43('0x45')](function(_0x4bfe40){if(_0x4bfe40[_0x6e43('0x58')]===_0x6e43('0x55')){_0x6cfbb4[_0x6e43('0x1a')](0x194)[_0x6e43('0x2b')](_0x6e43('0x59'));}else{return handleError(_0x6cfbb4,null);}});};exports[_0x6e43('0x25')]=function(_0x2052d9,_0x3ba006){return db[_0x6e43('0x2d')][_0x6e43('0x47')]({'where':{'id':_0x2052d9['params']['id']}})[_0x6e43('0x24')](function(_0x3f94a5){if(_['isNil'](_0x3f94a5)){throw new ReferenceError(_0x6e43('0x5a'));}return _0x3f94a5;})[_0x6e43('0x24')](function(_0x3d13bf){var _0x38a253=_0x3d13bf[_0x6e43('0x4d')];logger[_0x6e43('0x5b')](_0x6e43('0x5c'),_0x38a253);if(!_[_0x6e43('0x5d')](_0x3d13bf['savePath'])&&fs['existsSync'](_0x38a253)){logger[_0x6e43('0x5b')](_0x6e43('0x5e')+_0x38a253+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione');fs[_0x6e43('0x5f')](_0x38a253);}_0x38a253=_0x38a253+_0x6e43('0x60');if(!_['isNil'](_0x3d13bf[_0x6e43('0x4d')])&&fs[_0x6e43('0x50')](_0x38a253)){logger[_0x6e43('0x5b')](_0x6e43('0x5e')+_0x38a253+_0x6e43('0x61'));fs[_0x6e43('0x5f')](_0x38a253);}return _0x3d13bf;})[_0x6e43('0x24')](function(_0x3e51){if(!_0x3e51)throw new InternalError();return _0x3e51[_0x6e43('0x25')]();})[_0x6e43('0x24')](function(){_0x3ba006[_0x6e43('0x1a')](0xcc)[_0x6e43('0x26')]();})['catch'](handleError(_0x3ba006,null));};
\ No newline at end of file
index cc3bdb9..11f49a5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5078=['rimraf','../../config/environment','./squareRecording.attributes','exports','define','SquareRecording','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x1b2ff7,_0x12a034){var _0x31656a=function(_0x1165a5){while(--_0x1165a5){_0x1b2ff7['push'](_0x1b2ff7['shift']());}};_0x31656a(++_0x12a034);}(_0x5078,0x148));var _0x8507=function(_0x5e8bfa,_0x1e83d1){_0x5e8bfa=_0x5e8bfa-0x0;var _0x10b312=_0x5078[_0x5e8bfa];return _0x10b312;};'use strict';var _=require(_0x8507('0x0'));var util=require(_0x8507('0x1'));var logger=require(_0x8507('0x2'))(_0x8507('0x3'));var moment=require(_0x8507('0x4'));var BPromise=require(_0x8507('0x5'));var rp=require(_0x8507('0x6'));var fs=require('fs');var path=require(_0x8507('0x7'));var rimraf=require(_0x8507('0x8'));var config=require(_0x8507('0x9'));var attributes=require(_0x8507('0xa'));module[_0x8507('0xb')]=function(_0x37519c,_0x5a359c){return _0x37519c[_0x8507('0xc')](_0x8507('0xd'),attributes,{'tableName':'square_recordings','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x21cd=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','exports','define','SquareRecording','lodash','util'];(function(_0x3cf5a3,_0x5a4492){var _0x39ba2d=function(_0x3ed989){while(--_0x3ed989){_0x3cf5a3['push'](_0x3cf5a3['shift']());}};_0x39ba2d(++_0x5a4492);}(_0x21cd,0x6a));var _0xd21c=function(_0x255d5b,_0x4f6f35){_0x255d5b=_0x255d5b-0x0;var _0x3e141a=_0x21cd[_0x255d5b];return _0x3e141a;};'use strict';var _=require(_0xd21c('0x0'));var util=require(_0xd21c('0x1'));var logger=require(_0xd21c('0x2'))(_0xd21c('0x3'));var moment=require(_0xd21c('0x4'));var BPromise=require(_0xd21c('0x5'));var rp=require(_0xd21c('0x6'));var fs=require('fs');var path=require(_0xd21c('0x7'));var rimraf=require(_0xd21c('0x8'));var config=require('../../config/environment');var attributes=require('./squareRecording.attributes');module[_0xd21c('0x9')]=function(_0x1ff4bd,_0x1ce1e6){return _0x1ff4bd[_0xd21c('0xa')](_0xd21c('0xb'),attributes,{'tableName':'square_recordings','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 667f2ff..c30a96b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xef19=['options','raw','stringify','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','client','request','then','request\x20sent','debug','SquareRecording,\x20%s,\x20%s,\x20%s','error','code','SquareRecording,\x20%s,\x20%s','message','result','catch','CreateSquareRecording','SquareRecording','create','body'];(function(_0x2cf8be,_0x53cbc9){var _0x861a04=function(_0x15623b){while(--_0x15623b){_0x2cf8be['push'](_0x2cf8be['shift']());}};_0x861a04(++_0x53cbc9);}(_0xef19,0xb9));var _0x9ef1=function(_0x43b584,_0x20a6bd){_0x43b584=_0x43b584-0x0;var _0x48f27b=_0xef19[_0x43b584];return _0x48f27b;};'use strict';var _=require(_0x9ef1('0x0'));var util=require('util');var moment=require(_0x9ef1('0x1'));var BPromise=require(_0x9ef1('0x2'));var rs=require(_0x9ef1('0x3'));var fs=require('fs');var Redis=require(_0x9ef1('0x4'));var db=require(_0x9ef1('0x5'))['db'];var utils=require(_0x9ef1('0x6'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x9ef1('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x456601,_0x1dcfd8,_0x3ea5c2){return new BPromise(function(_0x2ad394,_0x155872){return client[_0x9ef1('0x8')](_0x456601,_0x3ea5c2)[_0x9ef1('0x9')](function(_0xf1fe94){logger['info']('SquareRecording,\x20%s,\x20%s',_0x1dcfd8,_0x9ef1('0xa'));logger[_0x9ef1('0xb')](_0x9ef1('0xc'),_0x1dcfd8,_0x9ef1('0xa'),JSON['stringify'](_0xf1fe94));if(_0xf1fe94['error']){if(_0xf1fe94[_0x9ef1('0xd')][_0x9ef1('0xe')]===0x1f4){logger['error'](_0x9ef1('0xf'),_0x1dcfd8,_0xf1fe94[_0x9ef1('0xd')]['message']);return _0x155872(_0xf1fe94[_0x9ef1('0xd')][_0x9ef1('0x10')]);}logger['error'](_0x9ef1('0xf'),_0x1dcfd8,_0xf1fe94[_0x9ef1('0xd')][_0x9ef1('0x10')]);return _0x2ad394(_0xf1fe94[_0x9ef1('0xd')][_0x9ef1('0x10')]);}else{logger['info'](_0x9ef1('0xf'),_0x1dcfd8,_0x9ef1('0xa'));_0x2ad394(_0xf1fe94[_0x9ef1('0x11')]['message']);}})[_0x9ef1('0x12')](function(_0x192c1f){logger[_0x9ef1('0xd')]('SquareRecording,\x20%s,\x20%s',_0x1dcfd8,_0x192c1f);_0x155872(_0x192c1f);});});}exports[_0x9ef1('0x13')]=function(_0x218119){var _0x45bff2=this;return new Promise(function(_0xb45df9,_0x7e17bd){return db[_0x9ef1('0x14')][_0x9ef1('0x15')](_0x218119[_0x9ef1('0x16')],{'raw':_0x218119[_0x9ef1('0x17')]?_0x218119[_0x9ef1('0x17')][_0x9ef1('0x18')]===undefined?!![]:![]:!![]})['then'](function(_0x30edf8){logger['info'](_0x9ef1('0x13'),_0x218119);logger[_0x9ef1('0xb')](_0x9ef1('0x13'),_0x218119,JSON[_0x9ef1('0x19')](_0x30edf8));_0xb45df9(_0x30edf8);})[_0x9ef1('0x12')](function(_0x2da98e){logger[_0x9ef1('0xd')](_0x9ef1('0x13'),_0x2da98e[_0x9ef1('0x10')],_0x218119);_0x7e17bd(_0x45bff2[_0x9ef1('0xd')](0x1f4,_0x2da98e[_0x9ef1('0x10')]));});});};
\ No newline at end of file
+var _0xe205=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','SquareRecording,\x20%s,\x20%s','request\x20sent','SquareRecording,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','CreateSquareRecording','SquareRecording','options','raw','debug','catch','lodash'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0xe205,0x1ec));var _0x5e20=function(_0x1ed388,_0x4c1474){_0x1ed388=_0x1ed388-0x0;var _0x356c7f=_0xe205[_0x1ed388];return _0x356c7f;};'use strict';var _=require(_0x5e20('0x0'));var util=require(_0x5e20('0x1'));var moment=require(_0x5e20('0x2'));var BPromise=require(_0x5e20('0x3'));var rs=require(_0x5e20('0x4'));var fs=require('fs');var Redis=require(_0x5e20('0x5'));var db=require(_0x5e20('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x5e20('0x7'))(_0x5e20('0x8'));var config=require(_0x5e20('0x9'));var jayson=require(_0x5e20('0xa'));var client=jayson[_0x5e20('0xb')][_0x5e20('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x2542dc,_0x4b61c4,_0x5e8575){return new BPromise(function(_0x858b34,_0x2ec575){return client['request'](_0x2542dc,_0x5e8575)[_0x5e20('0xd')](function(_0xe65b65){logger[_0x5e20('0xe')](_0x5e20('0xf'),_0x4b61c4,_0x5e20('0x10'));logger['debug'](_0x5e20('0x11'),_0x4b61c4,'request\x20sent',JSON[_0x5e20('0x12')](_0xe65b65));if(_0xe65b65[_0x5e20('0x13')]){if(_0xe65b65['error'][_0x5e20('0x14')]===0x1f4){logger['error'](_0x5e20('0xf'),_0x4b61c4,_0xe65b65['error'][_0x5e20('0x15')]);return _0x2ec575(_0xe65b65[_0x5e20('0x13')][_0x5e20('0x15')]);}logger[_0x5e20('0x13')]('SquareRecording,\x20%s,\x20%s',_0x4b61c4,_0xe65b65[_0x5e20('0x13')]['message']);return _0x858b34(_0xe65b65[_0x5e20('0x13')][_0x5e20('0x15')]);}else{logger[_0x5e20('0xe')](_0x5e20('0xf'),_0x4b61c4,_0x5e20('0x10'));_0x858b34(_0xe65b65[_0x5e20('0x16')][_0x5e20('0x15')]);}})['catch'](function(_0x1d7adf){logger['error']('SquareRecording,\x20%s,\x20%s',_0x4b61c4,_0x1d7adf);_0x2ec575(_0x1d7adf);});});}exports[_0x5e20('0x17')]=function(_0x5b76bb){var _0x5c02b0=this;return new Promise(function(_0x5e7135,_0x8728d8){return db[_0x5e20('0x18')]['create'](_0x5b76bb['body'],{'raw':_0x5b76bb['options']?_0x5b76bb[_0x5e20('0x19')][_0x5e20('0x1a')]===undefined?!![]:![]:!![]})[_0x5e20('0xd')](function(_0x5a61df){logger['info'](_0x5e20('0x17'),_0x5b76bb);logger[_0x5e20('0x1b')](_0x5e20('0x17'),_0x5b76bb,JSON[_0x5e20('0x12')](_0x5a61df));_0x5e7135(_0x5a61df);})[_0x5e20('0x1c')](function(_0x1f1e6a){logger[_0x5e20('0x13')](_0x5e20('0x17'),_0x1f1e6a[_0x5e20('0x15')],_0x5b76bb);_0x8728d8(_0x5c02b0[_0x5e20('0x13')](0x1f4,_0x1f1e6a[_0x5e20('0x15')]));});});};
\ No newline at end of file
index c72923a..924989e 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(_0x86f71f,_0x461c14){var _0x247124=function(_0x2b662a){while(--_0x2b662a){_0x86f71f['push'](_0x86f71f['shift']());}};_0x247124(++_0x461c14);}(_0xe706,0xa3));var _0x6e70=function(_0x30c7c5,_0x168208){_0x30c7c5=_0x30c7c5-0x0;var _0x29e24e=_0xe706[_0x30c7c5];return _0x29e24e;};'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(_0x31295c,_0x2f2b82){var _0x2c150e=function(_0x957f1){while(--_0x957f1){_0x31295c['push'](_0x31295c['shift']());}};_0x2c150e(++_0x2f2b82);}(_0xd8b0,0xad));var _0x0d8b=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xd8b0[_0xa464c9];return _0x3d73c4;};'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 95a2f6b..499e209 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaa23=['BOOLEAN','exports','STRING','DATE'];(function(_0x497ee9,_0x287e96){var _0x4783b5=function(_0x29b632){while(--_0x29b632){_0x497ee9['push'](_0x497ee9['shift']());}};_0x4783b5(++_0x287e96);}(_0xaa23,0x1a9));var _0x3aa2=function(_0x495054,_0x304104){_0x495054=_0x495054-0x0;var _0x146d2e=_0xaa23[_0x495054];return _0x146d2e;};'use strict';var Sequelize=require('sequelize');module[_0x3aa2('0x0')]={'network':{'type':Sequelize['STRING']},'network_script':{'type':Sequelize['STRING']},'request':{'type':Sequelize[_0x3aa2('0x1')]},'channel':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0x3aa2('0x1')]},'type':{'type':Sequelize[_0x3aa2('0x1')]},'uniqueid':{'type':Sequelize[_0x3aa2('0x1')]},'version':{'type':Sequelize[_0x3aa2('0x1')]},'callerid':{'type':Sequelize[_0x3aa2('0x1')]},'calleridname':{'type':Sequelize[_0x3aa2('0x1')]},'callingpres':{'type':Sequelize[_0x3aa2('0x1')]},'callingani2':{'type':Sequelize[_0x3aa2('0x1')]},'callington':{'type':Sequelize[_0x3aa2('0x1')]},'callingtns':{'type':Sequelize[_0x3aa2('0x1')]},'dnid':{'type':Sequelize['STRING']},'rdnis':{'type':Sequelize['STRING']},'context':{'type':Sequelize[_0x3aa2('0x1')]},'extension':{'type':Sequelize[_0x3aa2('0x1')]},'priority':{'type':Sequelize[_0x3aa2('0x1')]},'enhanced':{'type':Sequelize[_0x3aa2('0x1')]},'accountcode':{'type':Sequelize[_0x3aa2('0x1')]},'threadid':{'type':Sequelize[_0x3aa2('0x1')]},'project_name':{'type':Sequelize[_0x3aa2('0x1')]},'joinAt':{'type':Sequelize[_0x3aa2('0x2')]},'leaveAt':{'type':Sequelize[_0x3aa2('0x2')]},'bot':{'type':Sequelize[_0x3aa2('0x3')],'defaultValue':![]}};
\ No newline at end of file
+var _0x2c92=['DATE','sequelize','exports','STRING'];(function(_0x4a12c7,_0x26e667){var _0x48dac7=function(_0x2d5eed){while(--_0x2d5eed){_0x4a12c7['push'](_0x4a12c7['shift']());}};_0x48dac7(++_0x26e667);}(_0x2c92,0xd9));var _0x22c9=function(_0x5cc8,_0x1faa02){_0x5cc8=_0x5cc8-0x0;var _0x450661=_0x2c92[_0x5cc8];return _0x450661;};'use strict';var Sequelize=require(_0x22c9('0x0'));module[_0x22c9('0x1')]={'network':{'type':Sequelize['STRING']},'network_script':{'type':Sequelize['STRING']},'request':{'type':Sequelize[_0x22c9('0x2')]},'channel':{'type':Sequelize[_0x22c9('0x2')]},'language':{'type':Sequelize[_0x22c9('0x2')]},'type':{'type':Sequelize[_0x22c9('0x2')]},'uniqueid':{'type':Sequelize['STRING']},'version':{'type':Sequelize[_0x22c9('0x2')]},'callerid':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize['STRING']},'callingpres':{'type':Sequelize['STRING']},'callingani2':{'type':Sequelize[_0x22c9('0x2')]},'callington':{'type':Sequelize[_0x22c9('0x2')]},'callingtns':{'type':Sequelize[_0x22c9('0x2')]},'dnid':{'type':Sequelize[_0x22c9('0x2')]},'rdnis':{'type':Sequelize[_0x22c9('0x2')]},'context':{'type':Sequelize[_0x22c9('0x2')]},'extension':{'type':Sequelize[_0x22c9('0x2')]},'priority':{'type':Sequelize[_0x22c9('0x2')]},'enhanced':{'type':Sequelize[_0x22c9('0x2')]},'accountcode':{'type':Sequelize[_0x22c9('0x2')]},'threadid':{'type':Sequelize[_0x22c9('0x2')]},'project_name':{'type':Sequelize[_0x22c9('0x2')]},'joinAt':{'type':Sequelize[_0x22c9('0x3')]},'leaveAt':{'type':Sequelize[_0x22c9('0x3')]},'bot':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}};
\ No newline at end of file
index 872bc58..279e13e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1941=['offset','undefined','limit','count','Content-Range','reject','update','name','send','index','map','SquareReport','fieldName','key','model','query','keys','intersection','attributes','fields','nolimit','order','sort','filters','pick','filter','where','merge','type','options','includeAll','findAll','then','rows','include','catch','create','body','destroy','find','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','end','status','json'];(function(_0x1fb1ad,_0x3a5c57){var _0x62f4ab=function(_0x2f1ee4){while(--_0x2f1ee4){_0x1fb1ad['push'](_0x1fb1ad['shift']());}};_0x62f4ab(++_0x3a5c57);}(_0x1941,0xfb));var _0x1194=function(_0x284852,_0xd3b275){_0x284852=_0x284852-0x0;var _0x3a54b9=_0x1941[_0x284852];return _0x3a54b9;};'use strict';var emlformat=require(_0x1194('0x0'));var rimraf=require(_0x1194('0x1'));var zipdir=require(_0x1194('0x2'));var jsonpatch=require(_0x1194('0x3'));var rp=require(_0x1194('0x4'));var moment=require(_0x1194('0x5'));var BPromise=require(_0x1194('0x6'));var Mustache=require(_0x1194('0x7'));var util=require('util');var path=require(_0x1194('0x8'));var sox=require(_0x1194('0x9'));var csv=require(_0x1194('0xa'));var ejs=require(_0x1194('0xb'));var fs=require('fs');var fs_extra=require(_0x1194('0xc'));var _=require(_0x1194('0xd'));var squel=require(_0x1194('0xe'));var crypto=require(_0x1194('0xf'));var jsforce=require(_0x1194('0x10'));var deskjs=require('desk.js');var toCsv=require(_0x1194('0xa'));var querystring=require('querystring');var Papa=require(_0x1194('0x11'));var Redis=require('ioredis');var authService=require(_0x1194('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x1194('0x13'));var hardwareService=require(_0x1194('0x14'));var logger=require(_0x1194('0x15'))('api');var utils=require(_0x1194('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x1194('0x17'));var db=require(_0x1194('0x18'))['db'];function respondWithStatusCode(_0x40213c,_0x2014b4){_0x2014b4=_0x2014b4||0xcc;return function(_0x188edc){if(_0x188edc){return _0x40213c[_0x1194('0x19')](_0x2014b4);}return _0x40213c['status'](_0x2014b4)[_0x1194('0x1a')]();};}function respondWithResult(_0x3fa8be,_0x43e760){_0x43e760=_0x43e760||0xc8;return function(_0x4bf749){if(_0x4bf749){return _0x3fa8be[_0x1194('0x1b')](_0x43e760)[_0x1194('0x1c')](_0x4bf749);}};}function respondWithFilteredResult(_0x538321,_0x55315e){return function(_0x17a092){if(_0x17a092){var _0x433cb9=typeof _0x55315e[_0x1194('0x1d')]===_0x1194('0x1e')&&typeof _0x55315e[_0x1194('0x1f')]===_0x1194('0x1e');var _0x3c5c39=_0x17a092[_0x1194('0x20')];var _0x45e2df=_0x433cb9?0x0:_0x55315e[_0x1194('0x1d')];var _0x16aa8d=_0x433cb9?_0x17a092['count']:_0x55315e[_0x1194('0x1d')]+_0x55315e['limit'];var _0x4c3bf4;if(_0x16aa8d>=_0x3c5c39){_0x16aa8d=_0x3c5c39;_0x4c3bf4=0xc8;}else{_0x4c3bf4=0xce;}_0x538321[_0x1194('0x1b')](_0x4c3bf4);return _0x538321['set'](_0x1194('0x21'),_0x45e2df+'-'+_0x16aa8d+'/'+_0x3c5c39)[_0x1194('0x1c')](_0x17a092);}return null;};}function patchUpdates(_0xc82b15){return function(_0x47b15a){try{jsonpatch['apply'](_0x47b15a,_0xc82b15,!![]);}catch(_0x4e4642){return BPromise[_0x1194('0x22')](_0x4e4642);}return _0x47b15a['save']();};}function saveUpdates(_0x1e9b3d,_0x35c4d6){return function(_0x75617f){if(_0x75617f){return _0x75617f[_0x1194('0x23')](_0x1e9b3d)['then'](function(_0x4ba99b){return _0x4ba99b;});}return null;};}function removeEntity(_0x3aaf5a,_0x2b0689){return function(_0xb265f3){if(_0xb265f3){return _0xb265f3['destroy']()['then'](function(){_0x3aaf5a[_0x1194('0x1b')](0xcc)[_0x1194('0x1a')]();});}};}function handleEntityNotFound(_0x7183c6,_0x1b9ea8){return function(_0x3dfc4b){if(!_0x3dfc4b){_0x7183c6[_0x1194('0x19')](0x194);}return _0x3dfc4b;};}function handleError(_0x3ce76d,_0x19b003){_0x19b003=_0x19b003||0x1f4;return function(_0x32e281){logger['error'](_0x32e281['stack']);if(_0x32e281[_0x1194('0x24')]){delete _0x32e281['name'];}_0x3ce76d[_0x1194('0x1b')](_0x19b003)[_0x1194('0x25')](_0x32e281);};}exports[_0x1194('0x26')]=function(_0x4afb7e,_0x95b1c0){var _0x1bd220={},_0x4872b2={},_0x4a1073={'count':0x0,'rows':[]};var _0x54bf03=_[_0x1194('0x27')](db[_0x1194('0x28')]['rawAttributes'],function(_0x2a74fa){return{'name':_0x2a74fa[_0x1194('0x29')],'type':_0x2a74fa['type'][_0x1194('0x2a')]};});_0x4872b2[_0x1194('0x2b')]=_[_0x1194('0x27')](_0x54bf03,'name');_0x4872b2[_0x1194('0x2c')]=_[_0x1194('0x2d')](_0x4afb7e['query']);_0x4872b2['filters']=_[_0x1194('0x2e')](_0x4872b2[_0x1194('0x2b')],_0x4872b2[_0x1194('0x2c')]);_0x1bd220[_0x1194('0x2f')]=_[_0x1194('0x2e')](_0x4872b2[_0x1194('0x2b')],qs[_0x1194('0x30')](_0x4afb7e[_0x1194('0x2c')]['fields']));_0x1bd220[_0x1194('0x2f')]=_0x1bd220['attributes']['length']?_0x1bd220['attributes']:_0x4872b2[_0x1194('0x2b')];if(!_0x4afb7e['query']['hasOwnProperty'](_0x1194('0x31'))){_0x1bd220[_0x1194('0x1f')]=qs[_0x1194('0x1f')](_0x4afb7e[_0x1194('0x2c')][_0x1194('0x1f')]);_0x1bd220[_0x1194('0x1d')]=qs[_0x1194('0x1d')](_0x4afb7e[_0x1194('0x2c')]['offset']);}_0x1bd220[_0x1194('0x32')]=qs['sort'](_0x4afb7e[_0x1194('0x2c')][_0x1194('0x33')]);_0x1bd220['where']=qs[_0x1194('0x34')](_[_0x1194('0x35')](_0x4afb7e[_0x1194('0x2c')],_0x4872b2['filters']),_0x54bf03);if(_0x4afb7e['query'][_0x1194('0x36')]){_0x1bd220[_0x1194('0x37')]=_[_0x1194('0x38')](_0x1bd220['where'],{'$or':_[_0x1194('0x27')](_0x54bf03,function(_0x350116){if(_0x350116[_0x1194('0x39')]!=='VIRTUAL'){var _0x418d35={};_0x418d35[_0x350116[_0x1194('0x24')]]={'$like':'%'+_0x4afb7e['query'][_0x1194('0x36')]+'%'};return _0x418d35;}})});}_0x1bd220=_[_0x1194('0x38')]({},_0x1bd220,_0x4afb7e[_0x1194('0x3a')]);var _0xa9b562={'where':_0x1bd220['where']};return db[_0x1194('0x28')]['count'](_0xa9b562)['then'](function(_0x379fa4){_0x4a1073['count']=_0x379fa4;if(_0x4afb7e[_0x1194('0x2c')][_0x1194('0x3b')]){_0x1bd220['include']=[{'all':!![]}];}return db[_0x1194('0x28')][_0x1194('0x3c')](_0x1bd220);})[_0x1194('0x3d')](function(_0xb53316){_0x4a1073[_0x1194('0x3e')]=_0xb53316;return _0x4a1073;})[_0x1194('0x3d')](respondWithFilteredResult(_0x95b1c0,_0x1bd220))['catch'](handleError(_0x95b1c0,null));};exports['show']=function(_0x1827a0,_0x26fae2){var _0x2c7e4a={'raw':!![],'where':{'id':_0x1827a0['params']['id']}},_0x202b07={};_0x202b07[_0x1194('0x2b')]=_[_0x1194('0x2d')](db[_0x1194('0x28')]['rawAttributes']);_0x202b07['query']=_['keys'](_0x1827a0[_0x1194('0x2c')]);_0x202b07['filters']=_[_0x1194('0x2e')](_0x202b07['model'],_0x202b07[_0x1194('0x2c')]);_0x2c7e4a[_0x1194('0x2f')]=_[_0x1194('0x2e')](_0x202b07[_0x1194('0x2b')],qs[_0x1194('0x30')](_0x1827a0[_0x1194('0x2c')][_0x1194('0x30')]));_0x2c7e4a[_0x1194('0x2f')]=_0x2c7e4a[_0x1194('0x2f')]['length']?_0x2c7e4a['attributes']:_0x202b07['model'];if(_0x1827a0['query'][_0x1194('0x3b')]){_0x2c7e4a[_0x1194('0x3f')]=[{'all':!![]}];}_0x2c7e4a=_[_0x1194('0x38')]({},_0x2c7e4a,_0x1827a0[_0x1194('0x3a')]);return db[_0x1194('0x28')]['find'](_0x2c7e4a)[_0x1194('0x3d')](handleEntityNotFound(_0x26fae2,null))[_0x1194('0x3d')](respondWithResult(_0x26fae2,null))[_0x1194('0x40')](handleError(_0x26fae2,null));};exports['create']=function(_0x5943bb,_0x6cd790){return db[_0x1194('0x28')][_0x1194('0x41')](_0x5943bb['body'],{})[_0x1194('0x3d')](respondWithResult(_0x6cd790,0xc9))[_0x1194('0x40')](handleError(_0x6cd790,null));};exports[_0x1194('0x23')]=function(_0x5b59fe,_0x6452b6){if(_0x5b59fe[_0x1194('0x42')]['id']){delete _0x5b59fe['body']['id'];}return db[_0x1194('0x28')]['find']({'where':{'id':_0x5b59fe['params']['id']}})[_0x1194('0x3d')](handleEntityNotFound(_0x6452b6,null))[_0x1194('0x3d')](saveUpdates(_0x5b59fe[_0x1194('0x42')],null))[_0x1194('0x3d')](respondWithResult(_0x6452b6,null))[_0x1194('0x40')](handleError(_0x6452b6,null));};exports[_0x1194('0x43')]=function(_0xb8ddf5,_0xb052ca){return db[_0x1194('0x28')][_0x1194('0x44')]({'where':{'id':_0xb8ddf5['params']['id']}})[_0x1194('0x3d')](handleEntityNotFound(_0xb052ca,null))['then'](removeEntity(_0xb052ca,null))['catch'](handleError(_0xb052ca,null));};exports[_0x1194('0x45')]=function(_0x3cfc2c,_0x23a847){return db[_0x1194('0x28')][_0x1194('0x45')]()[_0x1194('0x3d')](respondWithResult(_0x23a847,null))[_0x1194('0x40')](handleError(_0x23a847,null));};
\ No newline at end of file
+var _0xd265=['error','stack','name','index','map','rawAttributes','fieldName','key','query','intersection','attributes','fields','length','model','order','sort','where','filters','pick','filter','merge','SquareReport','includeAll','include','findAll','rows','show','params','options','find','catch','create','body','describe','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','reject','save','update','then','destroy'];(function(_0x24b5d8,_0x203128){var _0x54908d=function(_0x3b0db0){while(--_0x3b0db0){_0x24b5d8['push'](_0x24b5d8['shift']());}};_0x54908d(++_0x203128);}(_0xd265,0x194));var _0x5d26=function(_0x3b690e,_0x2aa32b){_0x3b690e=_0x3b690e-0x0;var _0x5e0bfe=_0xd265[_0x3b690e];return _0x5e0bfe;};'use strict';var emlformat=require(_0x5d26('0x0'));var rimraf=require(_0x5d26('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x5d26('0x2'));var rp=require(_0x5d26('0x3'));var moment=require(_0x5d26('0x4'));var BPromise=require(_0x5d26('0x5'));var Mustache=require('mustache');var util=require(_0x5d26('0x6'));var path=require(_0x5d26('0x7'));var sox=require(_0x5d26('0x8'));var csv=require(_0x5d26('0x9'));var ejs=require(_0x5d26('0xa'));var fs=require('fs');var fs_extra=require(_0x5d26('0xb'));var _=require('lodash');var squel=require(_0x5d26('0xc'));var crypto=require(_0x5d26('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x5d26('0xe'));var toCsv=require('to-csv');var querystring=require(_0x5d26('0xf'));var Papa=require(_0x5d26('0x10'));var Redis=require('ioredis');var authService=require(_0x5d26('0x11'));var qs=require(_0x5d26('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x5d26('0x13'));var logger=require(_0x5d26('0x14'))(_0x5d26('0x15'));var utils=require('../../config/utils');var config=require(_0x5d26('0x16'));var licenseUtil=require(_0x5d26('0x17'));var db=require(_0x5d26('0x18'))['db'];function respondWithStatusCode(_0x56ec24,_0x18fab6){_0x18fab6=_0x18fab6||0xcc;return function(_0x16bf36){if(_0x16bf36){return _0x56ec24[_0x5d26('0x19')](_0x18fab6);}return _0x56ec24[_0x5d26('0x1a')](_0x18fab6)[_0x5d26('0x1b')]();};}function respondWithResult(_0x426ca7,_0x49f81a){_0x49f81a=_0x49f81a||0xc8;return function(_0x2f0584){if(_0x2f0584){return _0x426ca7[_0x5d26('0x1a')](_0x49f81a)['json'](_0x2f0584);}};}function respondWithFilteredResult(_0x3f124c,_0xbb04d9){return function(_0x2fdc64){if(_0x2fdc64){var _0x57aba7=typeof _0xbb04d9[_0x5d26('0x1c')]===_0x5d26('0x1d')&&typeof _0xbb04d9[_0x5d26('0x1e')]===_0x5d26('0x1d');var _0x372114=_0x2fdc64[_0x5d26('0x1f')];var _0x441f1b=_0x57aba7?0x0:_0xbb04d9['offset'];var _0x201ce2=_0x57aba7?_0x2fdc64[_0x5d26('0x1f')]:_0xbb04d9[_0x5d26('0x1c')]+_0xbb04d9[_0x5d26('0x1e')];var _0x398622;if(_0x201ce2>=_0x372114){_0x201ce2=_0x372114;_0x398622=0xc8;}else{_0x398622=0xce;}_0x3f124c[_0x5d26('0x1a')](_0x398622);return _0x3f124c[_0x5d26('0x20')](_0x5d26('0x21'),_0x441f1b+'-'+_0x201ce2+'/'+_0x372114)[_0x5d26('0x22')](_0x2fdc64);}return null;};}function patchUpdates(_0x3821f2){return function(_0x1c5e5c){try{jsonpatch['apply'](_0x1c5e5c,_0x3821f2,!![]);}catch(_0x3e914a){return BPromise[_0x5d26('0x23')](_0x3e914a);}return _0x1c5e5c[_0x5d26('0x24')]();};}function saveUpdates(_0x45a76f,_0x5a639f){return function(_0x1835ab){if(_0x1835ab){return _0x1835ab[_0x5d26('0x25')](_0x45a76f)[_0x5d26('0x26')](function(_0x4c0f7e){return _0x4c0f7e;});}return null;};}function removeEntity(_0x1b636b,_0x5b5a6e){return function(_0x5b034f){if(_0x5b034f){return _0x5b034f[_0x5d26('0x27')]()[_0x5d26('0x26')](function(){_0x1b636b[_0x5d26('0x1a')](0xcc)[_0x5d26('0x1b')]();});}};}function handleEntityNotFound(_0x363a10,_0x28615b){return function(_0x462e3f){if(!_0x462e3f){_0x363a10[_0x5d26('0x19')](0x194);}return _0x462e3f;};}function handleError(_0x2ec4e5,_0x3e0182){_0x3e0182=_0x3e0182||0x1f4;return function(_0x4f11ea){logger[_0x5d26('0x28')](_0x4f11ea[_0x5d26('0x29')]);if(_0x4f11ea[_0x5d26('0x2a')]){delete _0x4f11ea['name'];}_0x2ec4e5['status'](_0x3e0182)['send'](_0x4f11ea);};}exports[_0x5d26('0x2b')]=function(_0x196b62,_0xbea930){var _0x29d5de={},_0x53ad8f={},_0xf8b92b={'count':0x0,'rows':[]};var _0x1783e2=_[_0x5d26('0x2c')](db['SquareReport'][_0x5d26('0x2d')],function(_0x300207){return{'name':_0x300207[_0x5d26('0x2e')],'type':_0x300207['type'][_0x5d26('0x2f')]};});_0x53ad8f['model']=_[_0x5d26('0x2c')](_0x1783e2,_0x5d26('0x2a'));_0x53ad8f[_0x5d26('0x30')]=_['keys'](_0x196b62[_0x5d26('0x30')]);_0x53ad8f['filters']=_[_0x5d26('0x31')](_0x53ad8f['model'],_0x53ad8f[_0x5d26('0x30')]);_0x29d5de[_0x5d26('0x32')]=_['intersection'](_0x53ad8f['model'],qs['fields'](_0x196b62[_0x5d26('0x30')][_0x5d26('0x33')]));_0x29d5de['attributes']=_0x29d5de[_0x5d26('0x32')][_0x5d26('0x34')]?_0x29d5de['attributes']:_0x53ad8f[_0x5d26('0x35')];if(!_0x196b62[_0x5d26('0x30')]['hasOwnProperty']('nolimit')){_0x29d5de[_0x5d26('0x1e')]=qs[_0x5d26('0x1e')](_0x196b62[_0x5d26('0x30')][_0x5d26('0x1e')]);_0x29d5de[_0x5d26('0x1c')]=qs[_0x5d26('0x1c')](_0x196b62['query'][_0x5d26('0x1c')]);}_0x29d5de[_0x5d26('0x36')]=qs[_0x5d26('0x37')](_0x196b62['query'][_0x5d26('0x37')]);_0x29d5de[_0x5d26('0x38')]=qs[_0x5d26('0x39')](_[_0x5d26('0x3a')](_0x196b62[_0x5d26('0x30')],_0x53ad8f['filters']),_0x1783e2);if(_0x196b62[_0x5d26('0x30')][_0x5d26('0x3b')]){_0x29d5de[_0x5d26('0x38')]=_[_0x5d26('0x3c')](_0x29d5de[_0x5d26('0x38')],{'$or':_['map'](_0x1783e2,function(_0x28d3c7){if(_0x28d3c7['type']!=='VIRTUAL'){var _0x3b5f5e={};_0x3b5f5e[_0x28d3c7['name']]={'$like':'%'+_0x196b62[_0x5d26('0x30')][_0x5d26('0x3b')]+'%'};return _0x3b5f5e;}})});}_0x29d5de=_[_0x5d26('0x3c')]({},_0x29d5de,_0x196b62['options']);var _0x182a67={'where':_0x29d5de[_0x5d26('0x38')]};return db[_0x5d26('0x3d')][_0x5d26('0x1f')](_0x182a67)[_0x5d26('0x26')](function(_0xac0b3a){_0xf8b92b[_0x5d26('0x1f')]=_0xac0b3a;if(_0x196b62[_0x5d26('0x30')][_0x5d26('0x3e')]){_0x29d5de[_0x5d26('0x3f')]=[{'all':!![]}];}return db[_0x5d26('0x3d')][_0x5d26('0x40')](_0x29d5de);})[_0x5d26('0x26')](function(_0x5ba7cc){_0xf8b92b[_0x5d26('0x41')]=_0x5ba7cc;return _0xf8b92b;})[_0x5d26('0x26')](respondWithFilteredResult(_0xbea930,_0x29d5de))['catch'](handleError(_0xbea930,null));};exports[_0x5d26('0x42')]=function(_0x454588,_0x8c4ed5){var _0x4cab16={'raw':!![],'where':{'id':_0x454588[_0x5d26('0x43')]['id']}},_0x3fd288={};_0x3fd288[_0x5d26('0x35')]=_['keys'](db[_0x5d26('0x3d')][_0x5d26('0x2d')]);_0x3fd288[_0x5d26('0x30')]=_['keys'](_0x454588[_0x5d26('0x30')]);_0x3fd288[_0x5d26('0x39')]=_[_0x5d26('0x31')](_0x3fd288[_0x5d26('0x35')],_0x3fd288[_0x5d26('0x30')]);_0x4cab16['attributes']=_[_0x5d26('0x31')](_0x3fd288['model'],qs[_0x5d26('0x33')](_0x454588[_0x5d26('0x30')][_0x5d26('0x33')]));_0x4cab16[_0x5d26('0x32')]=_0x4cab16['attributes'][_0x5d26('0x34')]?_0x4cab16['attributes']:_0x3fd288[_0x5d26('0x35')];if(_0x454588['query'][_0x5d26('0x3e')]){_0x4cab16[_0x5d26('0x3f')]=[{'all':!![]}];}_0x4cab16=_['merge']({},_0x4cab16,_0x454588[_0x5d26('0x44')]);return db[_0x5d26('0x3d')][_0x5d26('0x45')](_0x4cab16)['then'](handleEntityNotFound(_0x8c4ed5,null))[_0x5d26('0x26')](respondWithResult(_0x8c4ed5,null))[_0x5d26('0x46')](handleError(_0x8c4ed5,null));};exports['create']=function(_0xc46fa5,_0x135a3d){return db['SquareReport'][_0x5d26('0x47')](_0xc46fa5['body'],{})[_0x5d26('0x26')](respondWithResult(_0x135a3d,0xc9))[_0x5d26('0x46')](handleError(_0x135a3d,null));};exports[_0x5d26('0x25')]=function(_0x3b2e61,_0x3cc22e){if(_0x3b2e61[_0x5d26('0x48')]['id']){delete _0x3b2e61[_0x5d26('0x48')]['id'];}return db[_0x5d26('0x3d')][_0x5d26('0x45')]({'where':{'id':_0x3b2e61[_0x5d26('0x43')]['id']}})[_0x5d26('0x26')](handleEntityNotFound(_0x3cc22e,null))[_0x5d26('0x26')](saveUpdates(_0x3b2e61[_0x5d26('0x48')],null))[_0x5d26('0x26')](respondWithResult(_0x3cc22e,null))[_0x5d26('0x46')](handleError(_0x3cc22e,null));};exports['destroy']=function(_0x47aa17,_0x40cdf6){return db[_0x5d26('0x3d')][_0x5d26('0x45')]({'where':{'id':_0x47aa17[_0x5d26('0x43')]['id']}})[_0x5d26('0x26')](handleEntityNotFound(_0x40cdf6,null))[_0x5d26('0x26')](removeEntity(_0x40cdf6,null))[_0x5d26('0x46')](handleError(_0x40cdf6,null));};exports[_0x5d26('0x49')]=function(_0x5bbc52,_0x104b54){return db[_0x5d26('0x3d')][_0x5d26('0x49')]()['then'](respondWithResult(_0x104b54,null))[_0x5d26('0x46')](handleError(_0x104b54,null));};
\ No newline at end of file
index f4342f3..535a1a9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0217=['project_name','leaveAt','lodash','util','../../config/logger','api','moment','request-promise','rimraf','../../config/environment','./squareReport.attributes','report_square','uid_pname','uniqueid'];(function(_0x27af45,_0x1b57aa){var _0x18df21=function(_0x4b7679){while(--_0x4b7679){_0x27af45['push'](_0x27af45['shift']());}};_0x18df21(++_0x1b57aa);}(_0x0217,0xe2));var _0x7021=function(_0x421b46,_0x54128e){_0x421b46=_0x421b46-0x0;var _0x1a6a76=_0x0217[_0x421b46];return _0x1a6a76;};'use strict';var _=require(_0x7021('0x0'));var util=require(_0x7021('0x1'));var logger=require(_0x7021('0x2'))(_0x7021('0x3'));var moment=require(_0x7021('0x4'));var BPromise=require('bluebird');var rp=require(_0x7021('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x7021('0x6'));var config=require(_0x7021('0x7'));var attributes=require(_0x7021('0x8'));module['exports']=function(_0x4ecda0,_0x4835b9){return _0x4ecda0['define']('SquareReport',attributes,{'tableName':_0x7021('0x9'),'paranoid':![],'indexes':[{'name':_0x7021('0xa'),'fields':[_0x7021('0xb'),_0x7021('0xc')]},{'name':_0x7021('0xd'),'fields':[_0x7021('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x59d3=['request-promise','path','../../config/environment','./squareReport.attributes','exports','define','SquareReport','uid_pname','uniqueid','leaveAt','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x1832a7,_0x3ef02b){var _0x4e6916=function(_0x5357e8){while(--_0x5357e8){_0x1832a7['push'](_0x1832a7['shift']());}};_0x4e6916(++_0x3ef02b);}(_0x59d3,0x1ca));var _0x359d=function(_0x1b5d16,_0x3fa23e){_0x1b5d16=_0x1b5d16-0x0;var _0x96a5ec=_0x59d3[_0x1b5d16];return _0x96a5ec;};'use strict';var _=require(_0x359d('0x0'));var util=require(_0x359d('0x1'));var logger=require(_0x359d('0x2'))(_0x359d('0x3'));var moment=require(_0x359d('0x4'));var BPromise=require(_0x359d('0x5'));var rp=require(_0x359d('0x6'));var fs=require('fs');var path=require(_0x359d('0x7'));var rimraf=require('rimraf');var config=require(_0x359d('0x8'));var attributes=require(_0x359d('0x9'));module[_0x359d('0xa')]=function(_0x42de07,_0x5310f4){return _0x42de07[_0x359d('0xb')](_0x359d('0xc'),attributes,{'tableName':'report_square','paranoid':![],'indexes':[{'name':_0x359d('0xd'),'fields':[_0x359d('0xe'),'project_name']},{'name':_0x359d('0xf'),'fields':[_0x359d('0xf')]}],'timestamps':!![]});};
\ No newline at end of file
index 8f16454..5180459 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfca5=['then','info','SquareReport,\x20%s,\x20%s','request\x20sent','debug','SquareReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateSquareReport','create','options','UpdateSquareReport','raw','where','attributes','lodash','util','moment','randomstring','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http'];(function(_0x13d176,_0xc331){var _0x5807ee=function(_0x1274a7){while(--_0x1274a7){_0x13d176['push'](_0x13d176['shift']());}};_0x5807ee(++_0xc331);}(_0xfca5,0x18c));var _0x5fca=function(_0x350258,_0x4e0a50){_0x350258=_0x350258-0x0;var _0x3714b3=_0xfca5[_0x350258];return _0x3714b3;};'use strict';var _=require(_0x5fca('0x0'));var util=require(_0x5fca('0x1'));var moment=require(_0x5fca('0x2'));var BPromise=require('bluebird');var rs=require(_0x5fca('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5fca('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x5fca('0x5'))('rpc');var config=require(_0x5fca('0x6'));var jayson=require(_0x5fca('0x7'));var client=jayson[_0x5fca('0x8')][_0x5fca('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x59a3ca,_0x33eb75,_0xf15840){return new BPromise(function(_0x40d6df,_0x234ab8){return client['request'](_0x59a3ca,_0xf15840)[_0x5fca('0xa')](function(_0x2693ea){logger[_0x5fca('0xb')](_0x5fca('0xc'),_0x33eb75,_0x5fca('0xd'));logger[_0x5fca('0xe')](_0x5fca('0xf'),_0x33eb75,'request\x20sent',JSON[_0x5fca('0x10')](_0x2693ea));if(_0x2693ea[_0x5fca('0x11')]){if(_0x2693ea['error'][_0x5fca('0x12')]===0x1f4){logger['error'](_0x5fca('0xc'),_0x33eb75,_0x2693ea[_0x5fca('0x11')][_0x5fca('0x13')]);return _0x234ab8(_0x2693ea[_0x5fca('0x11')][_0x5fca('0x13')]);}logger['error'](_0x5fca('0xc'),_0x33eb75,_0x2693ea['error'][_0x5fca('0x13')]);return _0x40d6df(_0x2693ea[_0x5fca('0x11')][_0x5fca('0x13')]);}else{logger['info'](_0x5fca('0xc'),_0x33eb75,_0x5fca('0xd'));_0x40d6df(_0x2693ea[_0x5fca('0x14')][_0x5fca('0x13')]);}})[_0x5fca('0x15')](function(_0x136f81){logger[_0x5fca('0x11')](_0x5fca('0xc'),_0x33eb75,_0x136f81);_0x234ab8(_0x136f81);});});}exports[_0x5fca('0x16')]=function(_0x8af381){var _0x341cb7=this;return new Promise(function(_0x538e43,_0x2301c2){return db['SquareReport'][_0x5fca('0x17')](_0x8af381['body'],{'raw':_0x8af381[_0x5fca('0x18')]?_0x8af381['options']['raw']===undefined?!![]:![]:!![]})[_0x5fca('0xa')](function(_0x4f8706){logger['info'](_0x5fca('0x16'),_0x8af381);logger[_0x5fca('0xe')]('CreateSquareReport',_0x8af381,JSON[_0x5fca('0x10')](_0x4f8706));_0x538e43(_0x4f8706);})[_0x5fca('0x15')](function(_0x2d21cb){logger[_0x5fca('0x11')](_0x5fca('0x16'),_0x2d21cb[_0x5fca('0x13')],_0x8af381);_0x2301c2(_0x341cb7[_0x5fca('0x11')](0x1f4,_0x2d21cb[_0x5fca('0x13')]));});});};exports[_0x5fca('0x19')]=function(_0x3f0d5e){var _0x2bda73=this;return new Promise(function(_0x501c1f,_0x39fbd5){return db['SquareReport']['update'](_0x3f0d5e['body'],{'raw':_0x3f0d5e[_0x5fca('0x18')]?_0x3f0d5e['options'][_0x5fca('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3f0d5e[_0x5fca('0x18')]?_0x3f0d5e['options'][_0x5fca('0x1b')]||null:null,'attributes':_0x3f0d5e[_0x5fca('0x18')]?_0x3f0d5e[_0x5fca('0x18')][_0x5fca('0x1c')]||null:null,'limit':_0x3f0d5e[_0x5fca('0x18')]?_0x3f0d5e[_0x5fca('0x18')]['limit']||null:null})[_0x5fca('0xa')](function(_0x5f2d38){logger[_0x5fca('0xb')](_0x5fca('0x19'),_0x3f0d5e);logger[_0x5fca('0xe')](_0x5fca('0x19'),_0x3f0d5e,JSON[_0x5fca('0x10')](_0x5f2d38));_0x501c1f(_0x5f2d38);})['catch'](function(_0x20100e){logger['error']('UpdateSquareReport',_0x20100e['message'],_0x3f0d5e);_0x39fbd5(_0x2bda73[_0x5fca('0x11')](0x1f4,_0x20100e['message']));});});};
\ No newline at end of file
+var _0x032a=['SquareReport','body','UpdateSquareReport','options','raw','where','attributes','limit','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','then','info','debug','SquareReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','SquareReport,\x20%s,\x20%s','message','result','catch','CreateSquareReport'];(function(_0x4e66d6,_0x3692e0){var _0x3dedbf=function(_0x5c2daf){while(--_0x5c2daf){_0x4e66d6['push'](_0x4e66d6['shift']());}};_0x3dedbf(++_0x3692e0);}(_0x032a,0x1ba));var _0xa032=function(_0x2b0f81,_0x3917f0){_0x2b0f81=_0x2b0f81-0x0;var _0x5ce74c=_0x032a[_0x2b0f81];return _0x5ce74c;};'use strict';var _=require(_0xa032('0x0'));var util=require(_0xa032('0x1'));var moment=require(_0xa032('0x2'));var BPromise=require('bluebird');var rs=require(_0xa032('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa032('0x4'))['db'];var utils=require(_0xa032('0x5'));var logger=require(_0xa032('0x6'))('rpc');var config=require(_0xa032('0x7'));var jayson=require(_0xa032('0x8'));var client=jayson['client'][_0xa032('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5952a8,_0x4db93e,_0x4c98bd){return new BPromise(function(_0x11c3a9,_0xc2e1f1){return client['request'](_0x5952a8,_0x4c98bd)[_0xa032('0xa')](function(_0x55b9d4){logger[_0xa032('0xb')]('SquareReport,\x20%s,\x20%s',_0x4db93e,'request\x20sent');logger[_0xa032('0xc')](_0xa032('0xd'),_0x4db93e,_0xa032('0xe'),JSON[_0xa032('0xf')](_0x55b9d4));if(_0x55b9d4[_0xa032('0x10')]){if(_0x55b9d4[_0xa032('0x10')][_0xa032('0x11')]===0x1f4){logger[_0xa032('0x10')](_0xa032('0x12'),_0x4db93e,_0x55b9d4[_0xa032('0x10')][_0xa032('0x13')]);return _0xc2e1f1(_0x55b9d4['error'][_0xa032('0x13')]);}logger[_0xa032('0x10')]('SquareReport,\x20%s,\x20%s',_0x4db93e,_0x55b9d4[_0xa032('0x10')]['message']);return _0x11c3a9(_0x55b9d4[_0xa032('0x10')][_0xa032('0x13')]);}else{logger[_0xa032('0xb')]('SquareReport,\x20%s,\x20%s',_0x4db93e,_0xa032('0xe'));_0x11c3a9(_0x55b9d4[_0xa032('0x14')][_0xa032('0x13')]);}})[_0xa032('0x15')](function(_0x26f7cd){logger[_0xa032('0x10')](_0xa032('0x12'),_0x4db93e,_0x26f7cd);_0xc2e1f1(_0x26f7cd);});});}exports[_0xa032('0x16')]=function(_0x3c0806){var _0x50548e=this;return new Promise(function(_0x5f499e,_0x8b9b32){return db[_0xa032('0x17')]['create'](_0x3c0806[_0xa032('0x18')],{'raw':_0x3c0806['options']?_0x3c0806['options']['raw']===undefined?!![]:![]:!![]})['then'](function(_0x24f80d){logger[_0xa032('0xb')](_0xa032('0x16'),_0x3c0806);logger['debug'](_0xa032('0x16'),_0x3c0806,JSON[_0xa032('0xf')](_0x24f80d));_0x5f499e(_0x24f80d);})[_0xa032('0x15')](function(_0x3aadbf){logger['error'](_0xa032('0x16'),_0x3aadbf[_0xa032('0x13')],_0x3c0806);_0x8b9b32(_0x50548e[_0xa032('0x10')](0x1f4,_0x3aadbf[_0xa032('0x13')]));});});};exports[_0xa032('0x19')]=function(_0x56c671){var _0x4b18e0=this;return new Promise(function(_0x4dfde1,_0x452138){return db[_0xa032('0x17')]['update'](_0x56c671[_0xa032('0x18')],{'raw':_0x56c671['options']?_0x56c671[_0xa032('0x1a')][_0xa032('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x56c671['options']?_0x56c671[_0xa032('0x1a')][_0xa032('0x1c')]||null:null,'attributes':_0x56c671[_0xa032('0x1a')]?_0x56c671[_0xa032('0x1a')][_0xa032('0x1d')]||null:null,'limit':_0x56c671['options']?_0x56c671[_0xa032('0x1a')][_0xa032('0x1e')]||null:null})[_0xa032('0xa')](function(_0x7af5d0){logger[_0xa032('0xb')](_0xa032('0x19'),_0x56c671);logger[_0xa032('0xc')](_0xa032('0x19'),_0x56c671,JSON['stringify'](_0x7af5d0));_0x4dfde1(_0x7af5d0);})[_0xa032('0x15')](function(_0x27d50e){logger[_0xa032('0x10')](_0xa032('0x19'),_0x27d50e[_0xa032('0x13')],_0x56c671);_0x452138(_0x4b18e0[_0xa032('0x10')](0x1f4,_0x27d50e[_0xa032('0x13')]));});});};
\ No newline at end of file
index acc9b1b..c29dd3d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8deb=['put','update','delete','destroy','exports','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./squareReportDetail.controller','get','/describe','isAuthenticated','describe','/:id','show','post','create'];(function(_0x521e8d,_0x23a290){var _0x518bbd=function(_0x4241eb){while(--_0x4241eb){_0x521e8d['push'](_0x521e8d['shift']());}};_0x518bbd(++_0x23a290);}(_0x8deb,0xa5));var _0xb8de=function(_0xd066c8,_0x46b223){_0xd066c8=_0xd066c8-0x0;var _0x369df2=_0x8deb[_0xd066c8];return _0x369df2;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require(_0xb8de('0x0'));var express=require(_0xb8de('0x1'));var router=express[_0xb8de('0x2')]();var fs_extra=require(_0xb8de('0x3'));var auth=require(_0xb8de('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xb8de('0x5'));var controller=require(_0xb8de('0x6'));router['get']('/',auth['isAuthenticated'](),controller['index']);router[_0xb8de('0x7')](_0xb8de('0x8'),auth[_0xb8de('0x9')](),controller[_0xb8de('0xa')]);router['get'](_0xb8de('0xb'),auth[_0xb8de('0x9')](),controller[_0xb8de('0xc')]);router[_0xb8de('0xd')]('/',auth[_0xb8de('0x9')](),controller[_0xb8de('0xe')]);router[_0xb8de('0xf')](_0xb8de('0xb'),auth[_0xb8de('0x9')](),controller[_0xb8de('0x10')]);router[_0xb8de('0x11')](_0xb8de('0xb'),auth[_0xb8de('0x9')](),controller[_0xb8de('0x12')]);module[_0xb8de('0x13')]=router;
\ No newline at end of file
+var _0x2a7c=['update','delete','destroy','multer','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'];(function(_0x5cfce7,_0x17e90e){var _0x350223=function(_0x55a769){while(--_0x55a769){_0x5cfce7['push'](_0x5cfce7['shift']());}};_0x350223(++_0x17e90e);}(_0x2a7c,0x10b));var _0xc2a7=function(_0x228713,_0x56aa06){_0x228713=_0x228713-0x0;var _0xb4c687=_0x2a7c[_0x228713];return _0xb4c687;};'use strict';var multer=require(_0xc2a7('0x0'));var util=require('util');var path=require(_0xc2a7('0x1'));var timeout=require(_0xc2a7('0x2'));var express=require(_0xc2a7('0x3'));var router=express[_0xc2a7('0x4')]();var fs_extra=require(_0xc2a7('0x5'));var auth=require(_0xc2a7('0x6'));var interaction=require(_0xc2a7('0x7'));var config=require(_0xc2a7('0x8'));var controller=require('./squareReportDetail.controller');router[_0xc2a7('0x9')]('/',auth['isAuthenticated'](),controller[_0xc2a7('0xa')]);router['get'](_0xc2a7('0xb'),auth[_0xc2a7('0xc')](),controller[_0xc2a7('0xd')]);router[_0xc2a7('0x9')](_0xc2a7('0xe'),auth['isAuthenticated'](),controller[_0xc2a7('0xf')]);router[_0xc2a7('0x10')]('/',auth['isAuthenticated'](),controller[_0xc2a7('0x11')]);router[_0xc2a7('0x12')](_0xc2a7('0xe'),auth['isAuthenticated'](),controller[_0xc2a7('0x13')]);router[_0xc2a7('0x14')](_0xc2a7('0xe'),auth[_0xc2a7('0xc')](),controller[_0xc2a7('0x15')]);module['exports']=router;
\ No newline at end of file
index a43d9fc..74c85e9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc27f=['TEXT','exports','STRING'];(function(_0x45783c,_0x49c56d){var _0x1161da=function(_0x3c5d41){while(--_0x3c5d41){_0x45783c['push'](_0x45783c['shift']());}};_0x1161da(++_0x49c56d);}(_0xc27f,0x1e7));var _0xfc27=function(_0x1de501,_0x1fcca4){_0x1de501=_0x1de501-0x0;var _0x164727=_0xc27f[_0x1de501];return _0x164727;};'use strict';var Sequelize=require('sequelize');module[_0xfc27('0x0')]={'uniqueid':{'type':Sequelize[_0xfc27('0x1')]},'node':{'type':Sequelize[_0xfc27('0x1')]},'application':{'type':Sequelize['STRING']},'data':{'type':Sequelize[_0xfc27('0x2')]},'project_name':{'type':Sequelize[_0xfc27('0x1')]},'callerid':{'type':Sequelize[_0xfc27('0x1')]}};
\ No newline at end of file
+var _0xb562=['TEXT','STRING'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xb562,0x1aa));var _0x2b56=function(_0x25e05b,_0x21f4cb){_0x25e05b=_0x25e05b-0x0;var _0x45f83a=_0xb562[_0x25e05b];return _0x45f83a;};'use strict';var Sequelize=require('sequelize');module['exports']={'uniqueid':{'type':Sequelize['STRING']},'node':{'type':Sequelize['STRING']},'application':{'type':Sequelize['STRING']},'data':{'type':Sequelize[_0x2b56('0x0')]},'project_name':{'type':Sequelize['STRING']},'callerid':{'type':Sequelize[_0x2b56('0x1')]}};
\ No newline at end of file
index 8e4996c..1b98669 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0607=['bluebird','mustache','util','sox','to-csv','fs-extra','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','map','SquareDetailsReport','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','merge','type','filter','includeAll','include','findAll','rows','catch','show','options','find','create','body','params','describe','rimraf','fast-json-patch','request-promise','moment'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x0607,0x16e));var _0x7060=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0x0607[_0x3bf83f];return _0x22c4a9;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x7060('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x7060('0x1'));var rp=require(_0x7060('0x2'));var moment=require(_0x7060('0x3'));var BPromise=require(_0x7060('0x4'));var Mustache=require(_0x7060('0x5'));var util=require(_0x7060('0x6'));var path=require('path');var sox=require(_0x7060('0x7'));var csv=require(_0x7060('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x7060('0x9'));var _=require('lodash');var squel=require(_0x7060('0xa'));var crypto=require(_0x7060('0xb'));var jsforce=require(_0x7060('0xc'));var deskjs=require(_0x7060('0xd'));var toCsv=require('to-csv');var querystring=require(_0x7060('0xe'));var Papa=require('papaparse');var Redis=require(_0x7060('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x7060('0x10'));var as=require(_0x7060('0x11'));var hardwareService=require(_0x7060('0x12'));var logger=require(_0x7060('0x13'))(_0x7060('0x14'));var utils=require(_0x7060('0x15'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x7060('0x16'))['db'];function respondWithStatusCode(_0x257d91,_0x1fdc4c){_0x1fdc4c=_0x1fdc4c||0xcc;return function(_0x206ee7){if(_0x206ee7){return _0x257d91[_0x7060('0x17')](_0x1fdc4c);}return _0x257d91[_0x7060('0x18')](_0x1fdc4c)[_0x7060('0x19')]();};}function respondWithResult(_0x3648f2,_0x31f22d){_0x31f22d=_0x31f22d||0xc8;return function(_0x2ec998){if(_0x2ec998){return _0x3648f2[_0x7060('0x18')](_0x31f22d)[_0x7060('0x1a')](_0x2ec998);}};}function respondWithFilteredResult(_0x45eb3c,_0x4203d2){return function(_0x3a45cd){if(_0x3a45cd){var _0x2545f7=typeof _0x4203d2[_0x7060('0x1b')]===_0x7060('0x1c')&&typeof _0x4203d2['limit']===_0x7060('0x1c');var _0x152cd5=_0x3a45cd[_0x7060('0x1d')];var _0x58dbb4=_0x2545f7?0x0:_0x4203d2[_0x7060('0x1b')];var _0x4ed114=_0x2545f7?_0x3a45cd[_0x7060('0x1d')]:_0x4203d2[_0x7060('0x1b')]+_0x4203d2[_0x7060('0x1e')];var _0x5ccba0;if(_0x4ed114>=_0x152cd5){_0x4ed114=_0x152cd5;_0x5ccba0=0xc8;}else{_0x5ccba0=0xce;}_0x45eb3c[_0x7060('0x18')](_0x5ccba0);return _0x45eb3c['set'](_0x7060('0x1f'),_0x58dbb4+'-'+_0x4ed114+'/'+_0x152cd5)[_0x7060('0x1a')](_0x3a45cd);}return null;};}function patchUpdates(_0x4fa254){return function(_0x23cc7d){try{jsonpatch[_0x7060('0x20')](_0x23cc7d,_0x4fa254,!![]);}catch(_0x6cefeb){return BPromise[_0x7060('0x21')](_0x6cefeb);}return _0x23cc7d[_0x7060('0x22')]();};}function saveUpdates(_0x512796,_0x1f8f4c){return function(_0x4a5aeb){if(_0x4a5aeb){return _0x4a5aeb[_0x7060('0x23')](_0x512796)[_0x7060('0x24')](function(_0x1c1967){return _0x1c1967;});}return null;};}function removeEntity(_0x48001f,_0xeb0544){return function(_0x1bca72){if(_0x1bca72){return _0x1bca72[_0x7060('0x25')]()['then'](function(){_0x48001f[_0x7060('0x18')](0xcc)[_0x7060('0x19')]();});}};}function handleEntityNotFound(_0x1de20b,_0x2c20b5){return function(_0x3adbdd){if(!_0x3adbdd){_0x1de20b[_0x7060('0x17')](0x194);}return _0x3adbdd;};}function handleError(_0x3d9bf2,_0x33e224){_0x33e224=_0x33e224||0x1f4;return function(_0x4f377e){logger[_0x7060('0x26')](_0x4f377e[_0x7060('0x27')]);if(_0x4f377e[_0x7060('0x28')]){delete _0x4f377e[_0x7060('0x28')];}_0x3d9bf2[_0x7060('0x18')](_0x33e224)['send'](_0x4f377e);};}exports['index']=function(_0xd1c189,_0x4be8dc){var _0x187b77={},_0xb0a5ef={},_0x285721={'count':0x0,'rows':[]};var _0x4ceca2=_[_0x7060('0x29')](db[_0x7060('0x2a')][_0x7060('0x2b')],function(_0x56f4d3){return{'name':_0x56f4d3[_0x7060('0x2c')],'type':_0x56f4d3['type'][_0x7060('0x2d')]};});_0xb0a5ef[_0x7060('0x2e')]=_[_0x7060('0x29')](_0x4ceca2,_0x7060('0x28'));_0xb0a5ef[_0x7060('0x2f')]=_[_0x7060('0x30')](_0xd1c189[_0x7060('0x2f')]);_0xb0a5ef[_0x7060('0x31')]=_[_0x7060('0x32')](_0xb0a5ef[_0x7060('0x2e')],_0xb0a5ef[_0x7060('0x2f')]);_0x187b77[_0x7060('0x33')]=_[_0x7060('0x32')](_0xb0a5ef[_0x7060('0x2e')],qs[_0x7060('0x34')](_0xd1c189['query'][_0x7060('0x34')]));_0x187b77[_0x7060('0x33')]=_0x187b77[_0x7060('0x33')][_0x7060('0x35')]?_0x187b77['attributes']:_0xb0a5ef[_0x7060('0x2e')];if(!_0xd1c189[_0x7060('0x2f')][_0x7060('0x36')](_0x7060('0x37'))){_0x187b77[_0x7060('0x1e')]=qs[_0x7060('0x1e')](_0xd1c189[_0x7060('0x2f')][_0x7060('0x1e')]);_0x187b77[_0x7060('0x1b')]=qs['offset'](_0xd1c189[_0x7060('0x2f')][_0x7060('0x1b')]);}_0x187b77['order']=qs['sort'](_0xd1c189[_0x7060('0x2f')][_0x7060('0x38')]);_0x187b77[_0x7060('0x39')]=qs[_0x7060('0x31')](_[_0x7060('0x3a')](_0xd1c189[_0x7060('0x2f')],_0xb0a5ef['filters']),_0x4ceca2);if(_0xd1c189[_0x7060('0x2f')]['filter']){_0x187b77[_0x7060('0x39')]=_[_0x7060('0x3b')](_0x187b77[_0x7060('0x39')],{'$or':_['map'](_0x4ceca2,function(_0x52c1b1){if(_0x52c1b1[_0x7060('0x3c')]!=='VIRTUAL'){var _0x4a9fd9={};_0x4a9fd9[_0x52c1b1[_0x7060('0x28')]]={'$like':'%'+_0xd1c189['query'][_0x7060('0x3d')]+'%'};return _0x4a9fd9;}})});}_0x187b77=_['merge']({},_0x187b77,_0xd1c189['options']);var _0x14eca2={'where':_0x187b77[_0x7060('0x39')]};return db[_0x7060('0x2a')]['count'](_0x14eca2)[_0x7060('0x24')](function(_0x240efd){_0x285721[_0x7060('0x1d')]=_0x240efd;if(_0xd1c189[_0x7060('0x2f')][_0x7060('0x3e')]){_0x187b77[_0x7060('0x3f')]=[{'all':!![]}];}return db['SquareDetailsReport'][_0x7060('0x40')](_0x187b77);})['then'](function(_0x1e8a72){_0x285721[_0x7060('0x41')]=_0x1e8a72;return _0x285721;})[_0x7060('0x24')](respondWithFilteredResult(_0x4be8dc,_0x187b77))[_0x7060('0x42')](handleError(_0x4be8dc,null));};exports[_0x7060('0x43')]=function(_0x2b9691,_0x8a13d1){var _0x27ed15={'raw':!![],'where':{'id':_0x2b9691['params']['id']}},_0x10b20c={};_0x10b20c[_0x7060('0x2e')]=_[_0x7060('0x30')](db[_0x7060('0x2a')][_0x7060('0x2b')]);_0x10b20c[_0x7060('0x2f')]=_[_0x7060('0x30')](_0x2b9691['query']);_0x10b20c[_0x7060('0x31')]=_[_0x7060('0x32')](_0x10b20c[_0x7060('0x2e')],_0x10b20c['query']);_0x27ed15[_0x7060('0x33')]=_['intersection'](_0x10b20c[_0x7060('0x2e')],qs[_0x7060('0x34')](_0x2b9691['query'][_0x7060('0x34')]));_0x27ed15[_0x7060('0x33')]=_0x27ed15['attributes'][_0x7060('0x35')]?_0x27ed15[_0x7060('0x33')]:_0x10b20c[_0x7060('0x2e')];if(_0x2b9691['query'][_0x7060('0x3e')]){_0x27ed15[_0x7060('0x3f')]=[{'all':!![]}];}_0x27ed15=_[_0x7060('0x3b')]({},_0x27ed15,_0x2b9691[_0x7060('0x44')]);return db[_0x7060('0x2a')][_0x7060('0x45')](_0x27ed15)['then'](handleEntityNotFound(_0x8a13d1,null))[_0x7060('0x24')](respondWithResult(_0x8a13d1,null))[_0x7060('0x42')](handleError(_0x8a13d1,null));};exports[_0x7060('0x46')]=function(_0x5a94b8,_0x1d6397){return db[_0x7060('0x2a')][_0x7060('0x46')](_0x5a94b8[_0x7060('0x47')],{})[_0x7060('0x24')](respondWithResult(_0x1d6397,0xc9))[_0x7060('0x42')](handleError(_0x1d6397,null));};exports['update']=function(_0x52f094,_0x3f0f5c){if(_0x52f094[_0x7060('0x47')]['id']){delete _0x52f094['body']['id'];}return db[_0x7060('0x2a')][_0x7060('0x45')]({'where':{'id':_0x52f094[_0x7060('0x48')]['id']}})[_0x7060('0x24')](handleEntityNotFound(_0x3f0f5c,null))[_0x7060('0x24')](saveUpdates(_0x52f094[_0x7060('0x47')],null))['then'](respondWithResult(_0x3f0f5c,null))['catch'](handleError(_0x3f0f5c,null));};exports[_0x7060('0x25')]=function(_0x48836c,_0x50d1bd){return db[_0x7060('0x2a')][_0x7060('0x45')]({'where':{'id':_0x48836c['params']['id']}})['then'](handleEntityNotFound(_0x50d1bd,null))[_0x7060('0x24')](removeEntity(_0x50d1bd,null))[_0x7060('0x42')](handleError(_0x50d1bd,null));};exports['describe']=function(_0x136b56,_0x26aa2a){return db[_0x7060('0x2a')][_0x7060('0x49')]()[_0x7060('0x24')](respondWithResult(_0x26aa2a,null))[_0x7060('0x42')](handleError(_0x26aa2a,null));};
\ No newline at end of file
+var _0x7089=['SquareDetailsReport','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','VIRTUAL','options','includeAll','findAll','catch','params','keys','include','find','create','body','destroy','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','save','update','then','end','error','stack','name','send'];(function(_0x5c2c7c,_0xa7d3b1){var _0xea7ffe=function(_0x471f17){while(--_0x471f17){_0x5c2c7c['push'](_0x5c2c7c['shift']());}};_0xea7ffe(++_0xa7d3b1);}(_0x7089,0x10f));var _0x9708=function(_0x46d524,_0x19c4aa){_0x46d524=_0x46d524-0x0;var _0x342f46=_0x7089[_0x46d524];return _0x342f46;};'use strict';var emlformat=require(_0x9708('0x0'));var rimraf=require(_0x9708('0x1'));var zipdir=require(_0x9708('0x2'));var jsonpatch=require(_0x9708('0x3'));var rp=require(_0x9708('0x4'));var moment=require(_0x9708('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x9708('0x6'));var util=require(_0x9708('0x7'));var path=require(_0x9708('0x8'));var sox=require(_0x9708('0x9'));var csv=require(_0x9708('0xa'));var ejs=require(_0x9708('0xb'));var fs=require('fs');var fs_extra=require(_0x9708('0xc'));var _=require(_0x9708('0xd'));var squel=require('squel');var crypto=require(_0x9708('0xe'));var jsforce=require(_0x9708('0xf'));var deskjs=require(_0x9708('0x10'));var toCsv=require(_0x9708('0xa'));var querystring=require(_0x9708('0x11'));var Papa=require(_0x9708('0x12'));var Redis=require('ioredis');var authService=require(_0x9708('0x13'));var qs=require(_0x9708('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x9708('0x15'))(_0x9708('0x16'));var utils=require(_0x9708('0x17'));var config=require(_0x9708('0x18'));var licenseUtil=require(_0x9708('0x19'));var db=require(_0x9708('0x1a'))['db'];function respondWithStatusCode(_0x350030,_0x1e03c1){_0x1e03c1=_0x1e03c1||0xcc;return function(_0x1e0e11){if(_0x1e0e11){return _0x350030[_0x9708('0x1b')](_0x1e03c1);}return _0x350030['status'](_0x1e03c1)['end']();};}function respondWithResult(_0x3c32a8,_0x124690){_0x124690=_0x124690||0xc8;return function(_0xf6ac67){if(_0xf6ac67){return _0x3c32a8[_0x9708('0x1c')](_0x124690)[_0x9708('0x1d')](_0xf6ac67);}};}function respondWithFilteredResult(_0x3a9ed7,_0xdc333b){return function(_0x545e77){if(_0x545e77){var _0x52ed8e=typeof _0xdc333b[_0x9708('0x1e')]===_0x9708('0x1f')&&typeof _0xdc333b[_0x9708('0x20')]==='undefined';var _0x6de03b=_0x545e77['count'];var _0x57e75f=_0x52ed8e?0x0:_0xdc333b[_0x9708('0x1e')];var _0x2689b7=_0x52ed8e?_0x545e77[_0x9708('0x21')]:_0xdc333b['offset']+_0xdc333b[_0x9708('0x20')];var _0x472965;if(_0x2689b7>=_0x6de03b){_0x2689b7=_0x6de03b;_0x472965=0xc8;}else{_0x472965=0xce;}_0x3a9ed7[_0x9708('0x1c')](_0x472965);return _0x3a9ed7[_0x9708('0x22')](_0x9708('0x23'),_0x57e75f+'-'+_0x2689b7+'/'+_0x6de03b)['json'](_0x545e77);}return null;};}function patchUpdates(_0x3b82e3){return function(_0x499554){try{jsonpatch[_0x9708('0x24')](_0x499554,_0x3b82e3,!![]);}catch(_0x84ed0b){return BPromise['reject'](_0x84ed0b);}return _0x499554[_0x9708('0x25')]();};}function saveUpdates(_0x18c9c,_0x84ba0b){return function(_0x277d7c){if(_0x277d7c){return _0x277d7c[_0x9708('0x26')](_0x18c9c)[_0x9708('0x27')](function(_0x431084){return _0x431084;});}return null;};}function removeEntity(_0x367c09,_0x276b91){return function(_0x2842d0){if(_0x2842d0){return _0x2842d0['destroy']()[_0x9708('0x27')](function(){_0x367c09[_0x9708('0x1c')](0xcc)[_0x9708('0x28')]();});}};}function handleEntityNotFound(_0x15ab34,_0x3d063c){return function(_0x12b7d8){if(!_0x12b7d8){_0x15ab34[_0x9708('0x1b')](0x194);}return _0x12b7d8;};}function handleError(_0x50f3bc,_0x4eb5d1){_0x4eb5d1=_0x4eb5d1||0x1f4;return function(_0x21b549){logger[_0x9708('0x29')](_0x21b549[_0x9708('0x2a')]);if(_0x21b549[_0x9708('0x2b')]){delete _0x21b549[_0x9708('0x2b')];}_0x50f3bc[_0x9708('0x1c')](_0x4eb5d1)[_0x9708('0x2c')](_0x21b549);};}exports['index']=function(_0x3cc2c8,_0xbcbcca){var _0x20ec5b={},_0xdd0336={},_0x53caf6={'count':0x0,'rows':[]};var _0x1e9e74=_['map'](db[_0x9708('0x2d')][_0x9708('0x2e')],function(_0x14fbad){return{'name':_0x14fbad[_0x9708('0x2f')],'type':_0x14fbad[_0x9708('0x30')][_0x9708('0x31')]};});_0xdd0336[_0x9708('0x32')]=_['map'](_0x1e9e74,_0x9708('0x2b'));_0xdd0336[_0x9708('0x33')]=_['keys'](_0x3cc2c8[_0x9708('0x33')]);_0xdd0336[_0x9708('0x34')]=_[_0x9708('0x35')](_0xdd0336[_0x9708('0x32')],_0xdd0336[_0x9708('0x33')]);_0x20ec5b[_0x9708('0x36')]=_[_0x9708('0x35')](_0xdd0336[_0x9708('0x32')],qs[_0x9708('0x37')](_0x3cc2c8['query'][_0x9708('0x37')]));_0x20ec5b['attributes']=_0x20ec5b[_0x9708('0x36')][_0x9708('0x38')]?_0x20ec5b[_0x9708('0x36')]:_0xdd0336[_0x9708('0x32')];if(!_0x3cc2c8[_0x9708('0x33')][_0x9708('0x39')](_0x9708('0x3a'))){_0x20ec5b[_0x9708('0x20')]=qs[_0x9708('0x20')](_0x3cc2c8[_0x9708('0x33')][_0x9708('0x20')]);_0x20ec5b[_0x9708('0x1e')]=qs[_0x9708('0x1e')](_0x3cc2c8[_0x9708('0x33')][_0x9708('0x1e')]);}_0x20ec5b[_0x9708('0x3b')]=qs[_0x9708('0x3c')](_0x3cc2c8[_0x9708('0x33')]['sort']);_0x20ec5b[_0x9708('0x3d')]=qs[_0x9708('0x34')](_[_0x9708('0x3e')](_0x3cc2c8[_0x9708('0x33')],_0xdd0336[_0x9708('0x34')]),_0x1e9e74);if(_0x3cc2c8[_0x9708('0x33')][_0x9708('0x3f')]){_0x20ec5b[_0x9708('0x3d')]=_[_0x9708('0x40')](_0x20ec5b[_0x9708('0x3d')],{'$or':_[_0x9708('0x41')](_0x1e9e74,function(_0x38e59d){if(_0x38e59d[_0x9708('0x30')]!==_0x9708('0x42')){var _0x4af8c3={};_0x4af8c3[_0x38e59d[_0x9708('0x2b')]]={'$like':'%'+_0x3cc2c8['query'][_0x9708('0x3f')]+'%'};return _0x4af8c3;}})});}_0x20ec5b=_[_0x9708('0x40')]({},_0x20ec5b,_0x3cc2c8[_0x9708('0x43')]);var _0x2e887a={'where':_0x20ec5b[_0x9708('0x3d')]};return db[_0x9708('0x2d')]['count'](_0x2e887a)[_0x9708('0x27')](function(_0x5b7bd9){_0x53caf6[_0x9708('0x21')]=_0x5b7bd9;if(_0x3cc2c8[_0x9708('0x33')][_0x9708('0x44')]){_0x20ec5b['include']=[{'all':!![]}];}return db[_0x9708('0x2d')][_0x9708('0x45')](_0x20ec5b);})['then'](function(_0x52a450){_0x53caf6['rows']=_0x52a450;return _0x53caf6;})[_0x9708('0x27')](respondWithFilteredResult(_0xbcbcca,_0x20ec5b))[_0x9708('0x46')](handleError(_0xbcbcca,null));};exports['show']=function(_0x3fa50c,_0x21aaa3){var _0x5abd30={'raw':!![],'where':{'id':_0x3fa50c[_0x9708('0x47')]['id']}},_0x31f0d0={};_0x31f0d0['model']=_[_0x9708('0x48')](db[_0x9708('0x2d')][_0x9708('0x2e')]);_0x31f0d0[_0x9708('0x33')]=_['keys'](_0x3fa50c[_0x9708('0x33')]);_0x31f0d0['filters']=_['intersection'](_0x31f0d0[_0x9708('0x32')],_0x31f0d0[_0x9708('0x33')]);_0x5abd30[_0x9708('0x36')]=_[_0x9708('0x35')](_0x31f0d0['model'],qs[_0x9708('0x37')](_0x3fa50c['query'][_0x9708('0x37')]));_0x5abd30[_0x9708('0x36')]=_0x5abd30[_0x9708('0x36')][_0x9708('0x38')]?_0x5abd30[_0x9708('0x36')]:_0x31f0d0[_0x9708('0x32')];if(_0x3fa50c[_0x9708('0x33')][_0x9708('0x44')]){_0x5abd30[_0x9708('0x49')]=[{'all':!![]}];}_0x5abd30=_['merge']({},_0x5abd30,_0x3fa50c[_0x9708('0x43')]);return db[_0x9708('0x2d')][_0x9708('0x4a')](_0x5abd30)[_0x9708('0x27')](handleEntityNotFound(_0x21aaa3,null))['then'](respondWithResult(_0x21aaa3,null))['catch'](handleError(_0x21aaa3,null));};exports[_0x9708('0x4b')]=function(_0x4c16d5,_0x563ecd){return db['SquareDetailsReport'][_0x9708('0x4b')](_0x4c16d5['body'],{})[_0x9708('0x27')](respondWithResult(_0x563ecd,0xc9))[_0x9708('0x46')](handleError(_0x563ecd,null));};exports[_0x9708('0x26')]=function(_0x2d4bc8,_0x14ab6b){if(_0x2d4bc8[_0x9708('0x4c')]['id']){delete _0x2d4bc8[_0x9708('0x4c')]['id'];}return db[_0x9708('0x2d')]['find']({'where':{'id':_0x2d4bc8[_0x9708('0x47')]['id']}})['then'](handleEntityNotFound(_0x14ab6b,null))[_0x9708('0x27')](saveUpdates(_0x2d4bc8[_0x9708('0x4c')],null))['then'](respondWithResult(_0x14ab6b,null))['catch'](handleError(_0x14ab6b,null));};exports[_0x9708('0x4d')]=function(_0x452d2,_0x2e8fcb){return db[_0x9708('0x2d')][_0x9708('0x4a')]({'where':{'id':_0x452d2[_0x9708('0x47')]['id']}})[_0x9708('0x27')](handleEntityNotFound(_0x2e8fcb,null))[_0x9708('0x27')](removeEntity(_0x2e8fcb,null))[_0x9708('0x46')](handleError(_0x2e8fcb,null));};exports['describe']=function(_0x3b68ea,_0x33ab54){return db[_0x9708('0x2d')][_0x9708('0x4e')]()[_0x9708('0x27')](respondWithResult(_0x33ab54,null))[_0x9708('0x46')](handleError(_0x33ab54,null));};
\ No newline at end of file
index 3fb3447..4265646 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x70f2=['SquareDetailsReport','lodash','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','exports'];(function(_0x241424,_0x25eb5d){var _0x3da798=function(_0x415153){while(--_0x415153){_0x241424['push'](_0x241424['shift']());}};_0x3da798(++_0x25eb5d);}(_0x70f2,0x83));var _0x270f=function(_0x40ff41,_0x2b51bc){_0x40ff41=_0x40ff41-0x0;var _0x5339ac=_0x70f2[_0x40ff41];return _0x5339ac;};'use strict';var _=require(_0x270f('0x0'));var util=require('util');var logger=require(_0x270f('0x1'))(_0x270f('0x2'));var moment=require(_0x270f('0x3'));var BPromise=require(_0x270f('0x4'));var rp=require(_0x270f('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x270f('0x6'));var config=require(_0x270f('0x7'));var attributes=require('./squareReportDetail.attributes');module[_0x270f('0x8')]=function(_0x15b179,_0x20b1d3){return _0x15b179['define'](_0x270f('0x9'),attributes,{'tableName':'report_square_details','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x2838=['define','report_square_details','util','moment','request-promise','path','rimraf'];(function(_0x57cd69,_0x3afab8){var _0x18aac0=function(_0xdf497e){while(--_0xdf497e){_0x57cd69['push'](_0x57cd69['shift']());}};_0x18aac0(++_0x3afab8);}(_0x2838,0x152));var _0x8283=function(_0x2cc8bb,_0x5f2607){_0x2cc8bb=_0x2cc8bb-0x0;var _0x140e40=_0x2838[_0x2cc8bb];return _0x140e40;};'use strict';var _=require('lodash');var util=require(_0x8283('0x0'));var logger=require('../../config/logger')('api');var moment=require(_0x8283('0x1'));var BPromise=require('bluebird');var rp=require(_0x8283('0x2'));var fs=require('fs');var path=require(_0x8283('0x3'));var rimraf=require(_0x8283('0x4'));var config=require('../../config/environment');var attributes=require('./squareReportDetail.attributes');module['exports']=function(_0x487606,_0x3c47a8){return _0x487606[_0x8283('0x5')]('SquareDetailsReport',attributes,{'tableName':_0x8283('0x6'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 23edabd..369894d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xda2d=['bluebird','randomstring','ioredis','rpc','../../config/environment','jayson/promise','client','http','then','SquareDetailsReport,\x20%s,\x20%s','request\x20sent','debug','SquareDetailsReport,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','CreateSquareDetailsReport','SquareDetailsReport','create','body','options','raw','util','moment'];(function(_0x4daef0,_0x3837c8){var _0x3e7c81=function(_0x182172){while(--_0x182172){_0x4daef0['push'](_0x4daef0['shift']());}};_0x3e7c81(++_0x3837c8);}(_0xda2d,0x102));var _0xdda2=function(_0x3c7d45,_0x1e8a90){_0x3c7d45=_0x3c7d45-0x0;var _0x366cbd=_0xda2d[_0x3c7d45];return _0x366cbd;};'use strict';var _=require('lodash');var util=require(_0xdda2('0x0'));var moment=require(_0xdda2('0x1'));var BPromise=require(_0xdda2('0x2'));var rs=require(_0xdda2('0x3'));var fs=require('fs');var Redis=require(_0xdda2('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xdda2('0x5'));var config=require(_0xdda2('0x6'));var jayson=require(_0xdda2('0x7'));var client=jayson[_0xdda2('0x8')][_0xdda2('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xf38e58,_0x2f55dc,_0x436676){return new BPromise(function(_0x2e2523,_0x341c7b){return client['request'](_0xf38e58,_0x436676)[_0xdda2('0xa')](function(_0x22c6e5){logger['info'](_0xdda2('0xb'),_0x2f55dc,_0xdda2('0xc'));logger[_0xdda2('0xd')](_0xdda2('0xe'),_0x2f55dc,_0xdda2('0xc'),JSON[_0xdda2('0xf')](_0x22c6e5));if(_0x22c6e5[_0xdda2('0x10')]){if(_0x22c6e5[_0xdda2('0x10')]['code']===0x1f4){logger['error']('SquareDetailsReport,\x20%s,\x20%s',_0x2f55dc,_0x22c6e5[_0xdda2('0x10')][_0xdda2('0x11')]);return _0x341c7b(_0x22c6e5[_0xdda2('0x10')][_0xdda2('0x11')]);}logger[_0xdda2('0x10')](_0xdda2('0xb'),_0x2f55dc,_0x22c6e5[_0xdda2('0x10')]['message']);return _0x2e2523(_0x22c6e5[_0xdda2('0x10')]['message']);}else{logger[_0xdda2('0x12')](_0xdda2('0xb'),_0x2f55dc,_0xdda2('0xc'));_0x2e2523(_0x22c6e5[_0xdda2('0x13')][_0xdda2('0x11')]);}})['catch'](function(_0x55d674){logger[_0xdda2('0x10')]('SquareDetailsReport,\x20%s,\x20%s',_0x2f55dc,_0x55d674);_0x341c7b(_0x55d674);});});}exports[_0xdda2('0x14')]=function(_0x1a3b35){var _0x335fb5=this;return new Promise(function(_0x2b6ee8,_0x8d44b7){return db[_0xdda2('0x15')][_0xdda2('0x16')](_0x1a3b35[_0xdda2('0x17')],{'raw':_0x1a3b35[_0xdda2('0x18')]?_0x1a3b35[_0xdda2('0x18')][_0xdda2('0x19')]===undefined?!![]:![]:!![]})[_0xdda2('0xa')](function(_0x4eed30){logger[_0xdda2('0x12')]('CreateSquareDetailsReport',_0x1a3b35);logger[_0xdda2('0xd')](_0xdda2('0x14'),_0x1a3b35,JSON[_0xdda2('0xf')](_0x4eed30));_0x2b6ee8(_0x4eed30);})['catch'](function(_0x347ee6){logger['error'](_0xdda2('0x14'),_0x347ee6[_0xdda2('0x11')],_0x1a3b35);_0x8d44b7(_0x335fb5['error'](0x1f4,_0x347ee6[_0xdda2('0x11')]));});});};
\ No newline at end of file
+var _0x58a4=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','info','SquareDetailsReport,\x20%s,\x20%s','request\x20sent','debug','SquareDetailsReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','CreateSquareDetailsReport','body','options','raw','lodash','util','moment','bluebird','randomstring'];(function(_0xc85ce5,_0x23c1a1){var _0x37d8da=function(_0x385d19){while(--_0x385d19){_0xc85ce5['push'](_0xc85ce5['shift']());}};_0x37d8da(++_0x23c1a1);}(_0x58a4,0xbf));var _0x458a=function(_0x315b61,_0x4bb11e){_0x315b61=_0x315b61-0x0;var _0x3521e8=_0x58a4[_0x315b61];return _0x3521e8;};'use strict';var _=require(_0x458a('0x0'));var util=require(_0x458a('0x1'));var moment=require(_0x458a('0x2'));var BPromise=require(_0x458a('0x3'));var rs=require(_0x458a('0x4'));var fs=require('fs');var Redis=require(_0x458a('0x5'));var db=require(_0x458a('0x6'))['db'];var utils=require(_0x458a('0x7'));var logger=require(_0x458a('0x8'))(_0x458a('0x9'));var config=require(_0x458a('0xa'));var jayson=require(_0x458a('0xb'));var client=jayson[_0x458a('0xc')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5358c2,_0x30b095,_0x11fcaa){return new BPromise(function(_0x2029bc,_0x1e658e){return client[_0x458a('0xd')](_0x5358c2,_0x11fcaa)['then'](function(_0x4bedce){logger[_0x458a('0xe')](_0x458a('0xf'),_0x30b095,_0x458a('0x10'));logger[_0x458a('0x11')](_0x458a('0x12'),_0x30b095,'request\x20sent',JSON[_0x458a('0x13')](_0x4bedce));if(_0x4bedce[_0x458a('0x14')]){if(_0x4bedce['error'][_0x458a('0x15')]===0x1f4){logger[_0x458a('0x14')](_0x458a('0xf'),_0x30b095,_0x4bedce[_0x458a('0x14')][_0x458a('0x16')]);return _0x1e658e(_0x4bedce['error']['message']);}logger[_0x458a('0x14')]('SquareDetailsReport,\x20%s,\x20%s',_0x30b095,_0x4bedce[_0x458a('0x14')][_0x458a('0x16')]);return _0x2029bc(_0x4bedce[_0x458a('0x14')][_0x458a('0x16')]);}else{logger[_0x458a('0xe')](_0x458a('0xf'),_0x30b095,'request\x20sent');_0x2029bc(_0x4bedce['result']['message']);}})[_0x458a('0x17')](function(_0x3fd6d4){logger[_0x458a('0x14')]('SquareDetailsReport,\x20%s,\x20%s',_0x30b095,_0x3fd6d4);_0x1e658e(_0x3fd6d4);});});}exports[_0x458a('0x18')]=function(_0x260c87){var _0x18504d=this;return new Promise(function(_0x392986,_0xa91473){return db['SquareDetailsReport']['create'](_0x260c87[_0x458a('0x19')],{'raw':_0x260c87['options']?_0x260c87[_0x458a('0x1a')][_0x458a('0x1b')]===undefined?!![]:![]:!![]})['then'](function(_0x468416){logger['info'](_0x458a('0x18'),_0x260c87);logger[_0x458a('0x11')]('CreateSquareDetailsReport',_0x260c87,JSON[_0x458a('0x13')](_0x468416));_0x392986(_0x468416);})[_0x458a('0x17')](function(_0x5a2bcb){logger[_0x458a('0x14')]('CreateSquareDetailsReport',_0x5a2bcb[_0x458a('0x16')],_0x260c87);_0xa91473(_0x18504d['error'](0x1f4,_0x5a2bcb[_0x458a('0x16')]));});});};
\ No newline at end of file
index 2f5a611..dcea430 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa3d4=['index','/process/:pid/kill','killProcess','express','../../components/auth/service','./system.controller','get','isAuthenticated'];(function(_0x4b1769,_0xffb3a7){var _0x9556f9=function(_0x38a1c6){while(--_0x38a1c6){_0x4b1769['push'](_0x4b1769['shift']());}};_0x9556f9(++_0xffb3a7);}(_0xa3d4,0x1e3));var _0x4a3d=function(_0x5f09c5,_0x2bfca0){_0x5f09c5=_0x5f09c5-0x0;var _0x426ad9=_0xa3d4[_0x5f09c5];return _0x426ad9;};'use strict';var express=require(_0x4a3d('0x0'));var router=express['Router']();var auth=require(_0x4a3d('0x1'));var controller=require(_0x4a3d('0x2'));router[_0x4a3d('0x3')]('/',auth[_0x4a3d('0x4')](),controller[_0x4a3d('0x5')]);router['get'](_0x4a3d('0x6'),auth['isAuthenticated'](),controller[_0x4a3d('0x7')]);module['exports']=router;
\ No newline at end of file
+var _0x1bdd=['express','Router','../../components/auth/service','./system.controller','get','isAuthenticated','/process/:pid/kill','killProcess','exports'];(function(_0x284a61,_0x231686){var _0x220e3c=function(_0x104496){while(--_0x104496){_0x284a61['push'](_0x284a61['shift']());}};_0x220e3c(++_0x231686);}(_0x1bdd,0x7e));var _0xd1bd=function(_0xbfd058,_0x1ee59){_0xbfd058=_0xbfd058-0x0;var _0x568cb1=_0x1bdd[_0xbfd058];return _0x568cb1;};'use strict';var express=require(_0xd1bd('0x0'));var router=express[_0xd1bd('0x1')]();var auth=require(_0xd1bd('0x2'));var controller=require(_0xd1bd('0x3'));router[_0xd1bd('0x4')]('/',auth[_0xd1bd('0x5')](),controller['index']);router[_0xd1bd('0x4')](_0xd1bd('0x6'),auth[_0xd1bd('0x5')](),controller[_0xd1bd('0x7')]);module[_0xd1bd('0x8')]=router;
\ No newline at end of file
index 7614146..d0faf07 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe0c8=['api','util','lodash','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','name','status','index','getAllData','then','json','catch','killProcess','components/import/cm','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','pid','indexOf','format','SIGINT','systeminformation','exec','../../config/logger'];(function(_0x26892d,_0x46df9b){var _0x4aa5bb=function(_0x3058ab){while(--_0x3058ab){_0x26892d['push'](_0x26892d['shift']());}};_0x4aa5bb(++_0x46df9b);}(_0xe0c8,0x14d));var _0x8e0c=function(_0x2b6448,_0x4fa425){_0x2b6448=_0x2b6448-0x0;var _0x5cc0f1=_0xe0c8[_0x2b6448];return _0x5cc0f1;};'use strict';var info=require(_0x8e0c('0x0'));var exec=require('child_process')[_0x8e0c('0x1')];var logger=require(_0x8e0c('0x2'))(_0x8e0c('0x3'));var util=require(_0x8e0c('0x4'));var BPromise=require('bluebird');var _=require(_0x8e0c('0x5'));function handleError(_0x5ed849,_0x494b01,_0x5c9f86){_0x494b01=_0x494b01||0x1f4;return function(_0x52df48){logger[_0x8e0c('0x6')](_0x8e0c('0x7'),_0x5c9f86,_0x494b01,util[_0x8e0c('0x8')](_0x52df48,{'showHidden':![],'depth':null}));delete _0x52df48[_0x8e0c('0x9')];_0x5ed849[_0x8e0c('0xa')](_0x494b01)['send'](_0x52df48);};}exports[_0x8e0c('0xb')]=function(_0x5a3bd5,_0x373fa1){return info[_0x8e0c('0xc')]()[_0x8e0c('0xd')](function(_0x5da634){return _0x373fa1[_0x8e0c('0xa')](0xc8)[_0x8e0c('0xe')](_0x5da634);})[_0x8e0c('0xf')](function(_0x973955){return _0x373fa1['status'](0x1f4)[_0x8e0c('0xe')](_0x973955);});};exports[_0x8e0c('0x10')]=function(_0xa812c5,_0x5f47b1){var _0x20aa2c=[_0x8e0c('0x11')];return new BPromise(function(_0x124810,_0x443b22){return exec(util['format'](_0x8e0c('0x12'),_0xa812c5[_0x8e0c('0x13')][_0x8e0c('0x14')]),function(_0x5cce3a,_0x40cd39,_0x4c60c9){if(_0x5cce3a){return _0x443b22(_0x5cce3a);}return _0x124810(_0x40cd39);});})[_0x8e0c('0xd')](function(_0x1b9e96){var _0x3f9ffa=![];var _0x3e2f61=_0x1b9e96['split'](/\n/);for(var _0x1a9de6=0x0,_0x184538=_0x20aa2c['length'];_0x1a9de6<_0x184538,_0x3f9ffa===![];_0x1a9de6+=0x1){if(_0x1b9e96[_0x8e0c('0x15')](_0x20aa2c[_0x1a9de6])>=0x0){_0x3f9ffa=!![];}}if(!_0x3f9ffa){throw new Error(util[_0x8e0c('0x16')]('Process\x20with\x20pid\x20%s\x20not\x20found!',_0xa812c5[_0x8e0c('0x13')][_0x8e0c('0x14')]));}process['kill'](_0xa812c5['params'][_0x8e0c('0x14')],_0x8e0c('0x17'));return _0x5f47b1[_0x8e0c('0xa')](0xc8)[_0x8e0c('0xe')]({'message':util[_0x8e0c('0x16')]('Process\x20with\x20pid\x20%s\x20killed\x20correctly',_0xa812c5[_0x8e0c('0x13')][_0x8e0c('0x14')])});})['catch'](handleError(_0x5f47b1,null,_0x8e0c('0x10')));};
\ No newline at end of file
+var _0xa1d9=['json','components/import/cm','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','pid','then','length','indexOf','Process\x20with\x20pid\x20%s\x20not\x20found!','SIGINT','Process\x20with\x20pid\x20%s\x20killed\x20correctly','catch','killProcess','systeminformation','child_process','exec','../../config/logger','api','util','bluebird','lodash','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','name','status','send','index','getAllData'];(function(_0x11447e,_0x33dab2){var _0x45a214=function(_0x1dce72){while(--_0x1dce72){_0x11447e['push'](_0x11447e['shift']());}};_0x45a214(++_0x33dab2);}(_0xa1d9,0x158));var _0x9a1d=function(_0x561944,_0x5a4783){_0x561944=_0x561944-0x0;var _0x179b7b=_0xa1d9[_0x561944];return _0x179b7b;};'use strict';var info=require(_0x9a1d('0x0'));var exec=require(_0x9a1d('0x1'))[_0x9a1d('0x2')];var logger=require(_0x9a1d('0x3'))(_0x9a1d('0x4'));var util=require(_0x9a1d('0x5'));var BPromise=require(_0x9a1d('0x6'));var _=require(_0x9a1d('0x7'));function handleError(_0x3bb7c9,_0x51166e,_0x403da1){_0x51166e=_0x51166e||0x1f4;return function(_0x8ab8c2){logger[_0x9a1d('0x8')](_0x9a1d('0x9'),_0x403da1,_0x51166e,util[_0x9a1d('0xa')](_0x8ab8c2,{'showHidden':![],'depth':null}));delete _0x8ab8c2[_0x9a1d('0xb')];_0x3bb7c9[_0x9a1d('0xc')](_0x51166e)[_0x9a1d('0xd')](_0x8ab8c2);};}exports[_0x9a1d('0xe')]=function(_0x469767,_0x1fd3aa){return info[_0x9a1d('0xf')]()['then'](function(_0x1c1c1b){return _0x1fd3aa[_0x9a1d('0xc')](0xc8)[_0x9a1d('0x10')](_0x1c1c1b);})['catch'](function(_0x499c90){return _0x1fd3aa[_0x9a1d('0xc')](0x1f4)[_0x9a1d('0x10')](_0x499c90);});};exports['killProcess']=function(_0x26f9ee,_0x30e17c){var _0x3ca430=[_0x9a1d('0x11')];return new BPromise(function(_0x3a9184,_0x5d2713){return exec(util[_0x9a1d('0x12')](_0x9a1d('0x13'),_0x26f9ee[_0x9a1d('0x14')][_0x9a1d('0x15')]),function(_0x191266,_0x5c33fe,_0x3d7bc2){if(_0x191266){return _0x5d2713(_0x191266);}return _0x3a9184(_0x5c33fe);});})[_0x9a1d('0x16')](function(_0x6f99b3){var _0x518a94=![];var _0x17cef7=_0x6f99b3['split'](/\n/);for(var _0x3ce69f=0x0,_0x3fd18d=_0x3ca430[_0x9a1d('0x17')];_0x3ce69f<_0x3fd18d,_0x518a94===![];_0x3ce69f+=0x1){if(_0x6f99b3[_0x9a1d('0x18')](_0x3ca430[_0x3ce69f])>=0x0){_0x518a94=!![];}}if(!_0x518a94){throw new Error(util[_0x9a1d('0x12')](_0x9a1d('0x19'),_0x26f9ee[_0x9a1d('0x14')][_0x9a1d('0x15')]));}process['kill'](_0x26f9ee['params'][_0x9a1d('0x15')],_0x9a1d('0x1a'));return _0x30e17c[_0x9a1d('0xc')](0xc8)[_0x9a1d('0x10')]({'message':util[_0x9a1d('0x12')](_0x9a1d('0x1b'),_0x26f9ee[_0x9a1d('0x14')][_0x9a1d('0x15')])});})[_0x9a1d('0x1c')](handleError(_0x30e17c,null,_0x9a1d('0x1d')));};
\ No newline at end of file
index 0e36768..25a63e1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb43b=['../../components/interaction/service','../../config/environment','./tag.controller','index','/describe','isAuthenticated','describe','get','/:id','show','post','create','put','update','delete','destroy','multer','util','connect-timeout','express','Router','../../components/auth/service'];(function(_0x1609ea,_0x232fe5){var _0x4abf0c=function(_0x58d1b5){while(--_0x58d1b5){_0x1609ea['push'](_0x1609ea['shift']());}};_0x4abf0c(++_0x232fe5);}(_0xb43b,0x1b2));var _0xbb43=function(_0x39c82e,_0x1a764a){_0x39c82e=_0x39c82e-0x0;var _0x877507=_0xb43b[_0x39c82e];return _0x877507;};'use strict';var multer=require(_0xbb43('0x0'));var util=require(_0xbb43('0x1'));var path=require('path');var timeout=require(_0xbb43('0x2'));var express=require(_0xbb43('0x3'));var router=express[_0xbb43('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xbb43('0x5'));var interaction=require(_0xbb43('0x6'));var config=require(_0xbb43('0x7'));var controller=require(_0xbb43('0x8'));router['get']('/',auth['isAuthenticated'](),controller[_0xbb43('0x9')]);router['get'](_0xbb43('0xa'),auth[_0xbb43('0xb')](),controller[_0xbb43('0xc')]);router[_0xbb43('0xd')](_0xbb43('0xe'),auth['isAuthenticated'](),controller[_0xbb43('0xf')]);router[_0xbb43('0x10')]('/',auth['isAuthenticated'](),controller[_0xbb43('0x11')]);router[_0xbb43('0x12')](_0xbb43('0xe'),auth[_0xbb43('0xb')](),controller[_0xbb43('0x13')]);router[_0xbb43('0x14')]('/:id',auth[_0xbb43('0xb')](),controller[_0xbb43('0x15')]);module['exports']=router;
\ No newline at end of file
+var _0x84ab=['util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../config/environment','./tag.controller','get','/describe','describe','isAuthenticated','post','create','update','delete','/:id','destroy','multer'];(function(_0x57c501,_0x319f03){var _0x4f15ba=function(_0x52e0c1){while(--_0x52e0c1){_0x57c501['push'](_0x57c501['shift']());}};_0x4f15ba(++_0x319f03);}(_0x84ab,0x12f));var _0xb84a=function(_0x151418,_0x2cbffa){_0x151418=_0x151418-0x0;var _0x40e29a=_0x84ab[_0x151418];return _0x40e29a;};'use strict';var multer=require(_0xb84a('0x0'));var util=require(_0xb84a('0x1'));var path=require(_0xb84a('0x2'));var timeout=require(_0xb84a('0x3'));var express=require(_0xb84a('0x4'));var router=express['Router']();var fs_extra=require(_0xb84a('0x5'));var auth=require(_0xb84a('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xb84a('0x7'));var controller=require(_0xb84a('0x8'));router[_0xb84a('0x9')]('/',auth['isAuthenticated'](),controller['index']);router['get'](_0xb84a('0xa'),auth['isAuthenticated'](),controller[_0xb84a('0xb')]);router[_0xb84a('0x9')]('/:id',auth[_0xb84a('0xc')](),controller['show']);router[_0xb84a('0xd')]('/',auth[_0xb84a('0xc')](),controller[_0xb84a('0xe')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0xb84a('0xf')]);router[_0xb84a('0x10')](_0xb84a('0x11'),auth[_0xb84a('0xc')](),controller[_0xb84a('0x12')]);module['exports']=router;
\ No newline at end of file
index 1de49d5..8450a29 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9c02=['STRING','sequelize','exports'];(function(_0x39c376,_0x5e3c44){var _0x3ae3da=function(_0x30f12b){while(--_0x30f12b){_0x39c376['push'](_0x39c376['shift']());}};_0x3ae3da(++_0x5e3c44);}(_0x9c02,0x196));var _0x29c0=function(_0x56ff10,_0x324418){_0x56ff10=_0x56ff10-0x0;var _0xadcfc7=_0x9c02[_0x56ff10];return _0xadcfc7;};'use strict';var Sequelize=require(_0x29c0('0x0'));module[_0x29c0('0x1')]={'name':{'type':Sequelize[_0x29c0('0x2')],'unique':'name','allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'color':{'type':Sequelize['STRING'],'defaultValue':'#0091EA'},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xceb0=['STRING'];(function(_0x50a0c2,_0x4befab){var _0x5ebadd=function(_0x3a3342){while(--_0x3a3342){_0x50a0c2['push'](_0x50a0c2['shift']());}};_0x5ebadd(++_0x4befab);}(_0xceb0,0x173));var _0x0ceb=function(_0x3ec098,_0x135cbf){_0x3ec098=_0x3ec098-0x0;var _0xd158ed=_0xceb0[_0x3ec098];return _0xd158ed;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize['STRING'],'unique':'name','allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'color':{'type':Sequelize[_0x0ceb('0x0')],'defaultValue':'#0091EA'},'description':{'type':Sequelize[_0x0ceb('0x0')]}};
\ No newline at end of file
index 4332fac..536c78c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x032f=['rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','filter','VIRTUAL','merge','options','Tag','include','rows','catch','show','params','length','includeAll','find','create','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/utils','../../mysqldb','sendStatus','status','offset','undefined','limit','count','set','Content-Range','apply','save','update','then','destroy','Tags','UserProfileResource','stack','name','send','index'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x032f,0x7b));var _0xf032=function(_0x552803,_0x227d8a){_0x552803=_0x552803-0x0;var _0x32f18f=_0x032f[_0x552803];return _0x32f18f;};'use strict';var emlformat=require(_0xf032('0x0'));var rimraf=require(_0xf032('0x1'));var zipdir=require(_0xf032('0x2'));var jsonpatch=require(_0xf032('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xf032('0x4'));var util=require(_0xf032('0x5'));var path=require(_0xf032('0x6'));var sox=require(_0xf032('0x7'));var csv=require(_0xf032('0x8'));var ejs=require(_0xf032('0x9'));var fs=require('fs');var fs_extra=require(_0xf032('0xa'));var _=require(_0xf032('0xb'));var squel=require(_0xf032('0xc'));var crypto=require(_0xf032('0xd'));var jsforce=require(_0xf032('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xf032('0x8'));var querystring=require(_0xf032('0xf'));var Papa=require(_0xf032('0x10'));var Redis=require(_0xf032('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xf032('0x12'));var as=require(_0xf032('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require(_0xf032('0x14'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xf032('0x15'))['db'];function respondWithStatusCode(_0x3c2a78,_0x25ae7e){_0x25ae7e=_0x25ae7e||0xcc;return function(_0x21ea31){if(_0x21ea31){return _0x3c2a78[_0xf032('0x16')](_0x25ae7e);}return _0x3c2a78['status'](_0x25ae7e)['end']();};}function respondWithResult(_0x472f1b,_0x3231d0){_0x3231d0=_0x3231d0||0xc8;return function(_0x17c4ab){if(_0x17c4ab){return _0x472f1b[_0xf032('0x17')](_0x3231d0)['json'](_0x17c4ab);}};}function respondWithFilteredResult(_0x2287b1,_0x3ce02f){return function(_0x3eab9d){if(_0x3eab9d){var _0x20ec95=typeof _0x3ce02f[_0xf032('0x18')]===_0xf032('0x19')&&typeof _0x3ce02f[_0xf032('0x1a')]===_0xf032('0x19');var _0x336472=_0x3eab9d['count'];var _0x47d6de=_0x20ec95?0x0:_0x3ce02f[_0xf032('0x18')];var _0x52bd26=_0x20ec95?_0x3eab9d[_0xf032('0x1b')]:_0x3ce02f[_0xf032('0x18')]+_0x3ce02f[_0xf032('0x1a')];var _0x427898;if(_0x52bd26>=_0x336472){_0x52bd26=_0x336472;_0x427898=0xc8;}else{_0x427898=0xce;}_0x2287b1[_0xf032('0x17')](_0x427898);return _0x2287b1[_0xf032('0x1c')](_0xf032('0x1d'),_0x47d6de+'-'+_0x52bd26+'/'+_0x336472)['json'](_0x3eab9d);}return null;};}function patchUpdates(_0x135a38){return function(_0x3a7bd1){try{jsonpatch[_0xf032('0x1e')](_0x3a7bd1,_0x135a38,!![]);}catch(_0x9c1fa9){return BPromise['reject'](_0x9c1fa9);}return _0x3a7bd1[_0xf032('0x1f')]();};}function saveUpdates(_0x4954c6,_0xe129d2){return function(_0x2264dc){if(_0x2264dc){return _0x2264dc[_0xf032('0x20')](_0x4954c6)[_0xf032('0x21')](function(_0x348e20){return _0x348e20;});}return null;};}function removeEntity(_0xda000b,_0x40273a){return function(_0x3fe17f){if(_0x3fe17f){return _0x3fe17f[_0xf032('0x22')]()[_0xf032('0x21')](function(){var _0x49056e=_0x3fe17f['get']({'plain':!![]});var _0x44fb27=_0xf032('0x23');return db[_0xf032('0x24')][_0xf032('0x22')]({'where':{'type':_0x44fb27,'resourceId':_0x49056e['id']}})[_0xf032('0x21')](function(){return _0x3fe17f;});})[_0xf032('0x21')](function(){_0xda000b[_0xf032('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x56b834,_0x10e8aa){return function(_0x3c5b5b){if(!_0x3c5b5b){_0x56b834['sendStatus'](0x194);}return _0x3c5b5b;};}function handleError(_0x10ddd0,_0xaa0e12){_0xaa0e12=_0xaa0e12||0x1f4;return function(_0x6b105f){logger['error'](_0x6b105f[_0xf032('0x25')]);if(_0x6b105f[_0xf032('0x26')]){delete _0x6b105f[_0xf032('0x26')];}_0x10ddd0['status'](_0xaa0e12)[_0xf032('0x27')](_0x6b105f);};}exports[_0xf032('0x28')]=function(_0x46b889,_0x4af26f){var _0x2a1ff3={},_0x396c9d={},_0x38131a={'count':0x0,'rows':[]};var _0x434496=_['map'](db['Tag'][_0xf032('0x29')],function(_0x29fb02){return{'name':_0x29fb02[_0xf032('0x2a')],'type':_0x29fb02[_0xf032('0x2b')][_0xf032('0x2c')]};});_0x396c9d[_0xf032('0x2d')]=_[_0xf032('0x2e')](_0x434496,_0xf032('0x26'));_0x396c9d[_0xf032('0x2f')]=_[_0xf032('0x30')](_0x46b889['query']);_0x396c9d[_0xf032('0x31')]=_[_0xf032('0x32')](_0x396c9d[_0xf032('0x2d')],_0x396c9d[_0xf032('0x2f')]);_0x2a1ff3['attributes']=_[_0xf032('0x32')](_0x396c9d[_0xf032('0x2d')],qs[_0xf032('0x33')](_0x46b889['query'][_0xf032('0x33')]));_0x2a1ff3[_0xf032('0x34')]=_0x2a1ff3[_0xf032('0x34')]['length']?_0x2a1ff3[_0xf032('0x34')]:_0x396c9d[_0xf032('0x2d')];if(!_0x46b889[_0xf032('0x2f')][_0xf032('0x35')](_0xf032('0x36'))){_0x2a1ff3['limit']=qs[_0xf032('0x1a')](_0x46b889[_0xf032('0x2f')][_0xf032('0x1a')]);_0x2a1ff3[_0xf032('0x18')]=qs[_0xf032('0x18')](_0x46b889[_0xf032('0x2f')][_0xf032('0x18')]);}_0x2a1ff3[_0xf032('0x37')]=qs[_0xf032('0x38')](_0x46b889[_0xf032('0x2f')][_0xf032('0x38')]);_0x2a1ff3[_0xf032('0x39')]=qs['filters'](_['pick'](_0x46b889['query'],_0x396c9d[_0xf032('0x31')]),_0x434496);if(_0x46b889['query'][_0xf032('0x3a')]){_0x2a1ff3[_0xf032('0x39')]=_['merge'](_0x2a1ff3[_0xf032('0x39')],{'$or':_[_0xf032('0x2e')](_0x434496,function(_0x16ce92){if(_0x16ce92[_0xf032('0x2b')]!==_0xf032('0x3b')){var _0x47980a={};_0x47980a[_0x16ce92[_0xf032('0x26')]]={'$like':'%'+_0x46b889[_0xf032('0x2f')][_0xf032('0x3a')]+'%'};return _0x47980a;}})});}_0x2a1ff3=_[_0xf032('0x3c')]({},_0x2a1ff3,_0x46b889[_0xf032('0x3d')]);var _0x5a98ee={'where':_0x2a1ff3[_0xf032('0x39')]};return db[_0xf032('0x3e')][_0xf032('0x1b')](_0x5a98ee)[_0xf032('0x21')](function(_0x2424c4){_0x38131a[_0xf032('0x1b')]=_0x2424c4;if(_0x46b889['query']['includeAll']){_0x2a1ff3[_0xf032('0x3f')]=[{'all':!![]}];}return db[_0xf032('0x3e')]['findAll'](_0x2a1ff3);})[_0xf032('0x21')](function(_0x2e5a54){_0x38131a[_0xf032('0x40')]=_0x2e5a54;return _0x38131a;})[_0xf032('0x21')](respondWithFilteredResult(_0x4af26f,_0x2a1ff3))[_0xf032('0x41')](handleError(_0x4af26f,null));};exports[_0xf032('0x42')]=function(_0x76cb59,_0x23e6a1){var _0x31c92d={'raw':!![],'where':{'id':_0x76cb59[_0xf032('0x43')]['id']}},_0x51348f={};_0x51348f[_0xf032('0x2d')]=_['keys'](db['Tag'][_0xf032('0x29')]);_0x51348f[_0xf032('0x2f')]=_['keys'](_0x76cb59['query']);_0x51348f['filters']=_[_0xf032('0x32')](_0x51348f[_0xf032('0x2d')],_0x51348f[_0xf032('0x2f')]);_0x31c92d[_0xf032('0x34')]=_[_0xf032('0x32')](_0x51348f['model'],qs[_0xf032('0x33')](_0x76cb59[_0xf032('0x2f')][_0xf032('0x33')]));_0x31c92d[_0xf032('0x34')]=_0x31c92d['attributes'][_0xf032('0x44')]?_0x31c92d[_0xf032('0x34')]:_0x51348f[_0xf032('0x2d')];if(_0x76cb59[_0xf032('0x2f')][_0xf032('0x45')]){_0x31c92d['include']=[{'all':!![]}];}_0x31c92d=_['merge']({},_0x31c92d,_0x76cb59['options']);return db[_0xf032('0x3e')][_0xf032('0x46')](_0x31c92d)['then'](handleEntityNotFound(_0x23e6a1,null))[_0xf032('0x21')](respondWithResult(_0x23e6a1,null))[_0xf032('0x41')](handleError(_0x23e6a1,null));};exports[_0xf032('0x47')]=function(_0x37392a,_0x5501b6){return db[_0xf032('0x3e')]['create'](_0x37392a['body'],{})[_0xf032('0x21')](function(_0x18aac9){var _0x1c5277=_0x37392a[_0xf032('0x48')][_0xf032('0x49')]({'plain':!![]});if(!_0x1c5277)throw new Error(_0xf032('0x4a'));if(_0x1c5277[_0xf032('0x4b')]===_0xf032('0x48')){var _0x3edd07=_0x18aac9[_0xf032('0x49')]({'plain':!![]});var _0x91de0e='Tags';return db[_0xf032('0x4c')][_0xf032('0x46')]({'where':{'name':_0x91de0e,'userProfileId':_0x1c5277['userProfileId']},'raw':!![]})[_0xf032('0x21')](function(_0x50dab5){if(_0x50dab5&&_0x50dab5[_0xf032('0x4d')]===0x0){return db['UserProfileResource'][_0xf032('0x47')]({'name':_0x3edd07[_0xf032('0x26')],'resourceId':_0x3edd07['id'],'type':_0x50dab5[_0xf032('0x26')],'sectionId':_0x50dab5['id']},{})['then'](function(){return _0x18aac9;});}else{return _0x18aac9;}})[_0xf032('0x41')](function(_0xa716c9){logger[_0xf032('0x4e')](_0xf032('0x4f'),_0xa716c9);throw _0xa716c9;});}return _0x18aac9;})['then'](respondWithResult(_0x5501b6,0xc9))[_0xf032('0x41')](handleError(_0x5501b6,null));};exports[_0xf032('0x20')]=function(_0x5a8bdd,_0x5260e4){if(_0x5a8bdd[_0xf032('0x50')]['id']){delete _0x5a8bdd['body']['id'];}return db[_0xf032('0x3e')]['find']({'where':{'id':_0x5a8bdd[_0xf032('0x43')]['id']}})[_0xf032('0x21')](handleEntityNotFound(_0x5260e4,null))[_0xf032('0x21')](saveUpdates(_0x5a8bdd['body'],null))[_0xf032('0x21')](respondWithResult(_0x5260e4,null))['catch'](handleError(_0x5260e4,null));};exports[_0xf032('0x22')]=function(_0x5c5607,_0x433e1a){return db['Tag'][_0xf032('0x46')]({'where':{'id':_0x5c5607[_0xf032('0x43')]['id']}})[_0xf032('0x21')](handleEntityNotFound(_0x433e1a,null))[_0xf032('0x21')](removeEntity(_0x433e1a,null))[_0xf032('0x41')](handleError(_0x433e1a,null));};exports[_0xf032('0x51')]=function(_0x42befa,_0x1a0d3d){return db[_0xf032('0x3e')][_0xf032('0x51')]()[_0xf032('0x21')](respondWithResult(_0x1a0d3d,null))['catch'](handleError(_0x1a0d3d,null));};
\ No newline at end of file
+var _0xbf49=['rows','catch','show','params','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Tags','UserProfileSection','userProfileId','autoAssociation','error','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','reject','save','update','then','destroy','UserProfileResource','stack','send','index','map','Tag','rawAttributes','type','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','name','options','includeAll','include','findAll'];(function(_0x191dab,_0x2ebe91){var _0x3f1206=function(_0x45c331){while(--_0x45c331){_0x191dab['push'](_0x191dab['shift']());}};_0x3f1206(++_0x2ebe91);}(_0xbf49,0x11f));var _0x9bf4=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xbf49[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0x9bf4('0x0'));var rimraf=require(_0x9bf4('0x1'));var zipdir=require(_0x9bf4('0x2'));var jsonpatch=require(_0x9bf4('0x3'));var rp=require(_0x9bf4('0x4'));var moment=require(_0x9bf4('0x5'));var BPromise=require(_0x9bf4('0x6'));var Mustache=require(_0x9bf4('0x7'));var util=require(_0x9bf4('0x8'));var path=require(_0x9bf4('0x9'));var sox=require(_0x9bf4('0xa'));var csv=require(_0x9bf4('0xb'));var ejs=require(_0x9bf4('0xc'));var fs=require('fs');var fs_extra=require(_0x9bf4('0xd'));var _=require('lodash');var squel=require(_0x9bf4('0xe'));var crypto=require('crypto');var jsforce=require(_0x9bf4('0xf'));var deskjs=require(_0x9bf4('0x10'));var toCsv=require(_0x9bf4('0xb'));var querystring=require(_0x9bf4('0x11'));var Papa=require('papaparse');var Redis=require(_0x9bf4('0x12'));var authService=require('../../components/auth/service');var qs=require(_0x9bf4('0x13'));var as=require(_0x9bf4('0x14'));var hardwareService=require(_0x9bf4('0x15'));var logger=require(_0x9bf4('0x16'))(_0x9bf4('0x17'));var utils=require('../../config/utils');var config=require(_0x9bf4('0x18'));var licenseUtil=require(_0x9bf4('0x19'));var db=require(_0x9bf4('0x1a'))['db'];function respondWithStatusCode(_0x141652,_0x507c97){_0x507c97=_0x507c97||0xcc;return function(_0x145857){if(_0x145857){return _0x141652[_0x9bf4('0x1b')](_0x507c97);}return _0x141652[_0x9bf4('0x1c')](_0x507c97)[_0x9bf4('0x1d')]();};}function respondWithResult(_0x268610,_0x47a176){_0x47a176=_0x47a176||0xc8;return function(_0x3ab11b){if(_0x3ab11b){return _0x268610[_0x9bf4('0x1c')](_0x47a176)[_0x9bf4('0x1e')](_0x3ab11b);}};}function respondWithFilteredResult(_0x45b87f,_0x3075cd){return function(_0x432a74){if(_0x432a74){var _0x3cd07c=typeof _0x3075cd['offset']===_0x9bf4('0x1f')&&typeof _0x3075cd[_0x9bf4('0x20')]===_0x9bf4('0x1f');var _0x1c6511=_0x432a74[_0x9bf4('0x21')];var _0x3a036e=_0x3cd07c?0x0:_0x3075cd[_0x9bf4('0x22')];var _0xbd3a39=_0x3cd07c?_0x432a74[_0x9bf4('0x21')]:_0x3075cd['offset']+_0x3075cd[_0x9bf4('0x20')];var _0x3573fb;if(_0xbd3a39>=_0x1c6511){_0xbd3a39=_0x1c6511;_0x3573fb=0xc8;}else{_0x3573fb=0xce;}_0x45b87f[_0x9bf4('0x1c')](_0x3573fb);return _0x45b87f[_0x9bf4('0x23')](_0x9bf4('0x24'),_0x3a036e+'-'+_0xbd3a39+'/'+_0x1c6511)[_0x9bf4('0x1e')](_0x432a74);}return null;};}function patchUpdates(_0x3c5116){return function(_0x2e6dbf){try{jsonpatch[_0x9bf4('0x25')](_0x2e6dbf,_0x3c5116,!![]);}catch(_0x4dba3f){return BPromise[_0x9bf4('0x26')](_0x4dba3f);}return _0x2e6dbf[_0x9bf4('0x27')]();};}function saveUpdates(_0x4934fb,_0x36b06f){return function(_0x13b8f3){if(_0x13b8f3){return _0x13b8f3[_0x9bf4('0x28')](_0x4934fb)[_0x9bf4('0x29')](function(_0x306045){return _0x306045;});}return null;};}function removeEntity(_0x2a22d3,_0x490768){return function(_0x5eca34){if(_0x5eca34){return _0x5eca34[_0x9bf4('0x2a')]()['then'](function(){var _0x1d1063=_0x5eca34['get']({'plain':!![]});var _0x575e19='Tags';return db[_0x9bf4('0x2b')][_0x9bf4('0x2a')]({'where':{'type':_0x575e19,'resourceId':_0x1d1063['id']}})[_0x9bf4('0x29')](function(){return _0x5eca34;});})['then'](function(){_0x2a22d3[_0x9bf4('0x1c')](0xcc)[_0x9bf4('0x1d')]();});}};}function handleEntityNotFound(_0x2e0c07,_0x3c4b37){return function(_0x157e8a){if(!_0x157e8a){_0x2e0c07[_0x9bf4('0x1b')](0x194);}return _0x157e8a;};}function handleError(_0x26bd3a,_0xa8414a){_0xa8414a=_0xa8414a||0x1f4;return function(_0x442a94){logger['error'](_0x442a94[_0x9bf4('0x2c')]);if(_0x442a94['name']){delete _0x442a94['name'];}_0x26bd3a[_0x9bf4('0x1c')](_0xa8414a)[_0x9bf4('0x2d')](_0x442a94);};}exports[_0x9bf4('0x2e')]=function(_0x1bb3fe,_0x18a35b){var _0x4b8d23={},_0x3ab1a7={},_0x36f252={'count':0x0,'rows':[]};var _0x25224d=_[_0x9bf4('0x2f')](db[_0x9bf4('0x30')][_0x9bf4('0x31')],function(_0x472f76){return{'name':_0x472f76['fieldName'],'type':_0x472f76[_0x9bf4('0x32')]['key']};});_0x3ab1a7['model']=_[_0x9bf4('0x2f')](_0x25224d,'name');_0x3ab1a7['query']=_[_0x9bf4('0x33')](_0x1bb3fe[_0x9bf4('0x34')]);_0x3ab1a7[_0x9bf4('0x35')]=_[_0x9bf4('0x36')](_0x3ab1a7[_0x9bf4('0x37')],_0x3ab1a7['query']);_0x4b8d23[_0x9bf4('0x38')]=_[_0x9bf4('0x36')](_0x3ab1a7[_0x9bf4('0x37')],qs[_0x9bf4('0x39')](_0x1bb3fe[_0x9bf4('0x34')]['fields']));_0x4b8d23['attributes']=_0x4b8d23[_0x9bf4('0x38')][_0x9bf4('0x3a')]?_0x4b8d23[_0x9bf4('0x38')]:_0x3ab1a7[_0x9bf4('0x37')];if(!_0x1bb3fe[_0x9bf4('0x34')][_0x9bf4('0x3b')](_0x9bf4('0x3c'))){_0x4b8d23[_0x9bf4('0x20')]=qs[_0x9bf4('0x20')](_0x1bb3fe['query']['limit']);_0x4b8d23[_0x9bf4('0x22')]=qs[_0x9bf4('0x22')](_0x1bb3fe[_0x9bf4('0x34')]['offset']);}_0x4b8d23[_0x9bf4('0x3d')]=qs['sort'](_0x1bb3fe[_0x9bf4('0x34')][_0x9bf4('0x3e')]);_0x4b8d23[_0x9bf4('0x3f')]=qs[_0x9bf4('0x35')](_[_0x9bf4('0x40')](_0x1bb3fe[_0x9bf4('0x34')],_0x3ab1a7[_0x9bf4('0x35')]),_0x25224d);if(_0x1bb3fe['query'][_0x9bf4('0x41')]){_0x4b8d23[_0x9bf4('0x3f')]=_[_0x9bf4('0x42')](_0x4b8d23[_0x9bf4('0x3f')],{'$or':_[_0x9bf4('0x2f')](_0x25224d,function(_0x54eed9){if(_0x54eed9['type']!==_0x9bf4('0x43')){var _0x330056={};_0x330056[_0x54eed9[_0x9bf4('0x44')]]={'$like':'%'+_0x1bb3fe[_0x9bf4('0x34')][_0x9bf4('0x41')]+'%'};return _0x330056;}})});}_0x4b8d23=_[_0x9bf4('0x42')]({},_0x4b8d23,_0x1bb3fe[_0x9bf4('0x45')]);var _0x12f95e={'where':_0x4b8d23[_0x9bf4('0x3f')]};return db[_0x9bf4('0x30')][_0x9bf4('0x21')](_0x12f95e)['then'](function(_0x581d13){_0x36f252[_0x9bf4('0x21')]=_0x581d13;if(_0x1bb3fe[_0x9bf4('0x34')][_0x9bf4('0x46')]){_0x4b8d23[_0x9bf4('0x47')]=[{'all':!![]}];}return db['Tag'][_0x9bf4('0x48')](_0x4b8d23);})[_0x9bf4('0x29')](function(_0x2c21bd){_0x36f252[_0x9bf4('0x49')]=_0x2c21bd;return _0x36f252;})[_0x9bf4('0x29')](respondWithFilteredResult(_0x18a35b,_0x4b8d23))[_0x9bf4('0x4a')](handleError(_0x18a35b,null));};exports[_0x9bf4('0x4b')]=function(_0x142579,_0x58d63c){var _0x4abd21={'raw':!![],'where':{'id':_0x142579[_0x9bf4('0x4c')]['id']}},_0x43945f={};_0x43945f[_0x9bf4('0x37')]=_[_0x9bf4('0x33')](db['Tag'][_0x9bf4('0x31')]);_0x43945f['query']=_[_0x9bf4('0x33')](_0x142579[_0x9bf4('0x34')]);_0x43945f[_0x9bf4('0x35')]=_[_0x9bf4('0x36')](_0x43945f['model'],_0x43945f[_0x9bf4('0x34')]);_0x4abd21[_0x9bf4('0x38')]=_[_0x9bf4('0x36')](_0x43945f['model'],qs['fields'](_0x142579['query'][_0x9bf4('0x39')]));_0x4abd21[_0x9bf4('0x38')]=_0x4abd21[_0x9bf4('0x38')][_0x9bf4('0x3a')]?_0x4abd21[_0x9bf4('0x38')]:_0x43945f[_0x9bf4('0x37')];if(_0x142579[_0x9bf4('0x34')][_0x9bf4('0x46')]){_0x4abd21[_0x9bf4('0x47')]=[{'all':!![]}];}_0x4abd21=_['merge']({},_0x4abd21,_0x142579[_0x9bf4('0x45')]);return db[_0x9bf4('0x30')][_0x9bf4('0x4d')](_0x4abd21)[_0x9bf4('0x29')](handleEntityNotFound(_0x58d63c,null))[_0x9bf4('0x29')](respondWithResult(_0x58d63c,null))['catch'](handleError(_0x58d63c,null));};exports[_0x9bf4('0x4e')]=function(_0x20caaf,_0x3e26b1){return db[_0x9bf4('0x30')][_0x9bf4('0x4e')](_0x20caaf[_0x9bf4('0x4f')],{})['then'](function(_0x17d5da){var _0x33acff=_0x20caaf[_0x9bf4('0x50')][_0x9bf4('0x51')]({'plain':!![]});if(!_0x33acff)throw new Error(_0x9bf4('0x52'));if(_0x33acff[_0x9bf4('0x53')]===_0x9bf4('0x50')){var _0x45dd0a=_0x17d5da[_0x9bf4('0x51')]({'plain':!![]});var _0xa31d29=_0x9bf4('0x54');return db[_0x9bf4('0x55')][_0x9bf4('0x4d')]({'where':{'name':_0xa31d29,'userProfileId':_0x33acff[_0x9bf4('0x56')]},'raw':!![]})[_0x9bf4('0x29')](function(_0x21c62a){if(_0x21c62a&&_0x21c62a[_0x9bf4('0x57')]===0x0){return db[_0x9bf4('0x2b')][_0x9bf4('0x4e')]({'name':_0x45dd0a[_0x9bf4('0x44')],'resourceId':_0x45dd0a['id'],'type':_0x21c62a[_0x9bf4('0x44')],'sectionId':_0x21c62a['id']},{})[_0x9bf4('0x29')](function(){return _0x17d5da;});}else{return _0x17d5da;}})[_0x9bf4('0x4a')](function(_0x4a3eae){logger[_0x9bf4('0x58')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4a3eae);throw _0x4a3eae;});}return _0x17d5da;})[_0x9bf4('0x29')](respondWithResult(_0x3e26b1,0xc9))[_0x9bf4('0x4a')](handleError(_0x3e26b1,null));};exports[_0x9bf4('0x28')]=function(_0x49bc25,_0x110996){if(_0x49bc25[_0x9bf4('0x4f')]['id']){delete _0x49bc25[_0x9bf4('0x4f')]['id'];}return db[_0x9bf4('0x30')][_0x9bf4('0x4d')]({'where':{'id':_0x49bc25[_0x9bf4('0x4c')]['id']}})['then'](handleEntityNotFound(_0x110996,null))['then'](saveUpdates(_0x49bc25['body'],null))['then'](respondWithResult(_0x110996,null))['catch'](handleError(_0x110996,null));};exports[_0x9bf4('0x2a')]=function(_0x29890b,_0xf8e7a4){return db[_0x9bf4('0x30')][_0x9bf4('0x4d')]({'where':{'id':_0x29890b[_0x9bf4('0x4c')]['id']}})['then'](handleEntityNotFound(_0xf8e7a4,null))[_0x9bf4('0x29')](removeEntity(_0xf8e7a4,null))[_0x9bf4('0x4a')](handleError(_0xf8e7a4,null));};exports[_0x9bf4('0x59')]=function(_0x531ac4,_0x2e123c){return db['Tag'][_0x9bf4('0x59')]()[_0x9bf4('0x29')](respondWithResult(_0x2e123c,null))[_0x9bf4('0x4a')](handleError(_0x2e123c,null));};
\ No newline at end of file
index 2b47a99..03c2dbf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe608=['tools_tags','lodash','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','Tag'];(function(_0x277b55,_0x8ba28){var _0xff0d15=function(_0x1beefc){while(--_0x1beefc){_0x277b55['push'](_0x277b55['shift']());}};_0xff0d15(++_0x8ba28);}(_0xe608,0xb5));var _0x8e60=function(_0xead5f0,_0x30581c){_0xead5f0=_0xead5f0-0x0;var _0x73c2a6=_0xe608[_0xead5f0];return _0x73c2a6;};'use strict';var _=require(_0x8e60('0x0'));var util=require('util');var logger=require(_0x8e60('0x1'))(_0x8e60('0x2'));var moment=require(_0x8e60('0x3'));var BPromise=require('bluebird');var rp=require(_0x8e60('0x4'));var fs=require('fs');var path=require(_0x8e60('0x5'));var rimraf=require(_0x8e60('0x6'));var config=require(_0x8e60('0x7'));var attributes=require('./tag.attributes');module['exports']=function(_0x55b99d,_0x2f027d){return _0x55b99d['define'](_0x8e60('0x8'),attributes,{'tableName':_0x8e60('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x4bcc=['util','../../config/logger','api','bluebird','request-promise','rimraf','../../config/environment','exports','lodash'];(function(_0x11af4d,_0x2bfd27){var _0x53694a=function(_0x563cfb){while(--_0x563cfb){_0x11af4d['push'](_0x11af4d['shift']());}};_0x53694a(++_0x2bfd27);}(_0x4bcc,0x1a6));var _0xc4bc=function(_0x9cd4c3,_0x1c9b2c){_0x9cd4c3=_0x9cd4c3-0x0;var _0x4c9025=_0x4bcc[_0x9cd4c3];return _0x4c9025;};'use strict';var _=require(_0xc4bc('0x0'));var util=require(_0xc4bc('0x1'));var logger=require(_0xc4bc('0x2'))(_0xc4bc('0x3'));var moment=require('moment');var BPromise=require(_0xc4bc('0x4'));var rp=require(_0xc4bc('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xc4bc('0x6'));var config=require(_0xc4bc('0x7'));var attributes=require('./tag.attributes');module[_0xc4bc('0x8')]=function(_0x52fa5e,_0x31a4af){return _0x52fa5e['define']('Tag',attributes,{'tableName':'tools_tags','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 8eefb18..beec74b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0faf=['../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','info','Tag,\x20%s,\x20%s','request\x20sent','debug','Tag,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x37a433,_0x426b8){var _0x157b02=function(_0x210216){while(--_0x210216){_0x37a433['push'](_0x37a433['shift']());}};_0x157b02(++_0x426b8);}(_0x0faf,0x132));var _0xf0fa=function(_0x2b55b5,_0x78505e){_0x2b55b5=_0x2b55b5-0x0;var _0x103d28=_0x0faf[_0x2b55b5];return _0x103d28;};'use strict';var _=require(_0xf0fa('0x0'));var util=require('util');var moment=require(_0xf0fa('0x1'));var BPromise=require(_0xf0fa('0x2'));var rs=require(_0xf0fa('0x3'));var fs=require('fs');var Redis=require(_0xf0fa('0x4'));var db=require(_0xf0fa('0x5'))['db'];var utils=require(_0xf0fa('0x6'));var logger=require(_0xf0fa('0x7'))(_0xf0fa('0x8'));var config=require(_0xf0fa('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xf0fa('0xa')][_0xf0fa('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x25b5c4,_0x3a703b,_0x2db1d9){return new BPromise(function(_0x587865,_0x42f7fd){return client[_0xf0fa('0xc')](_0x25b5c4,_0x2db1d9)['then'](function(_0x4df4d1){logger[_0xf0fa('0xd')](_0xf0fa('0xe'),_0x3a703b,_0xf0fa('0xf'));logger[_0xf0fa('0x10')](_0xf0fa('0x11'),_0x3a703b,_0xf0fa('0xf'),JSON[_0xf0fa('0x12')](_0x4df4d1));if(_0x4df4d1[_0xf0fa('0x13')]){if(_0x4df4d1['error'][_0xf0fa('0x14')]===0x1f4){logger['error'](_0xf0fa('0xe'),_0x3a703b,_0x4df4d1['error'][_0xf0fa('0x15')]);return _0x42f7fd(_0x4df4d1[_0xf0fa('0x13')][_0xf0fa('0x15')]);}logger['error']('Tag,\x20%s,\x20%s',_0x3a703b,_0x4df4d1[_0xf0fa('0x13')]['message']);return _0x587865(_0x4df4d1[_0xf0fa('0x13')][_0xf0fa('0x15')]);}else{logger[_0xf0fa('0xd')](_0xf0fa('0xe'),_0x3a703b,_0xf0fa('0xf'));_0x587865(_0x4df4d1[_0xf0fa('0x16')][_0xf0fa('0x15')]);}})[_0xf0fa('0x17')](function(_0x497542){logger[_0xf0fa('0x13')](_0xf0fa('0xe'),_0x3a703b,_0x497542);_0x42f7fd(_0x497542);});});}
\ No newline at end of file
+var _0x98a8=['request','then','info','Tag,\x20%s,\x20%s','request\x20sent','debug','Tag,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x433d7b,_0x24009e){var _0x7f4d53=function(_0x1e693d){while(--_0x1e693d){_0x433d7b['push'](_0x433d7b['shift']());}};_0x7f4d53(++_0x24009e);}(_0x98a8,0x12c));var _0x898a=function(_0x3f2afd,_0x402e17){_0x3f2afd=_0x3f2afd-0x0;var _0x4ee827=_0x98a8[_0x3f2afd];return _0x4ee827;};'use strict';var _=require(_0x898a('0x0'));var util=require(_0x898a('0x1'));var moment=require(_0x898a('0x2'));var BPromise=require(_0x898a('0x3'));var rs=require(_0x898a('0x4'));var fs=require('fs');var Redis=require(_0x898a('0x5'));var db=require(_0x898a('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x898a('0x7'))(_0x898a('0x8'));var config=require(_0x898a('0x9'));var jayson=require(_0x898a('0xa'));var client=jayson[_0x898a('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3aadc2,_0x564583,_0xfa8c50){return new BPromise(function(_0x4fbce5,_0x42021d){return client[_0x898a('0xc')](_0x3aadc2,_0xfa8c50)[_0x898a('0xd')](function(_0x96b636){logger[_0x898a('0xe')](_0x898a('0xf'),_0x564583,_0x898a('0x10'));logger[_0x898a('0x11')](_0x898a('0x12'),_0x564583,'request\x20sent',JSON[_0x898a('0x13')](_0x96b636));if(_0x96b636['error']){if(_0x96b636[_0x898a('0x14')]['code']===0x1f4){logger[_0x898a('0x14')](_0x898a('0xf'),_0x564583,_0x96b636[_0x898a('0x14')]['message']);return _0x42021d(_0x96b636['error']['message']);}logger[_0x898a('0x14')](_0x898a('0xf'),_0x564583,_0x96b636[_0x898a('0x14')][_0x898a('0x15')]);return _0x4fbce5(_0x96b636[_0x898a('0x14')][_0x898a('0x15')]);}else{logger['info'](_0x898a('0xf'),_0x564583,'request\x20sent');_0x4fbce5(_0x96b636[_0x898a('0x16')]['message']);}})[_0x898a('0x17')](function(_0x4fb05b){logger[_0x898a('0x14')]('Tag,\x20%s,\x20%s',_0x564583,_0x4fb05b);_0x42021d(_0x4fb05b);});});}
\ No newline at end of file
index 350cb2b..f1231e9 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(_0x4b055c,_0x4b870b){var _0x4b62bb=function(_0x4884c2){while(--_0x4884c2){_0x4b055c['push'](_0x4b055c['shift']());}};_0x4b62bb(++_0x4b870b);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4154a6,_0x2c0b8e){_0x4154a6=_0x4154a6-0x0;var _0x3b2786=_0xa9e0[_0x4154a6];return _0x3b2786;};'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(_0x934425,_0x5af72f){_0x934425=_0x934425-0x0;var _0x31d596=_0xa9e0[_0x934425];return _0x31d596;};'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 4cf340b..6fb0e41 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbaf0=['name','exports','STRING'];(function(_0xf26c2e,_0x56c3ea){var _0x46ecb4=function(_0x1be516){while(--_0x1be516){_0xf26c2e['push'](_0xf26c2e['shift']());}};_0x46ecb4(++_0x56c3ea);}(_0xbaf0,0x12a));var _0x0baf=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0xbaf0[_0x4cf98e];return _0x1623ac;};'use strict';var Sequelize=require('sequelize');module[_0x0baf('0x0')]={'name':{'type':Sequelize[_0x0baf('0x1')],'allowNull':![],'unique':_0x0baf('0x2')},'description':{'type':Sequelize[_0x0baf('0x1')]}};
\ No newline at end of file
+var _0xd8b0=['exports','sequelize'];(function(_0x468484,_0x3c1769){var _0x668d8d=function(_0xf3a508){while(--_0xf3a508){_0x468484['push'](_0x468484['shift']());}};_0x668d8d(++_0x3c1769);}(_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 68372bc..1f1e24b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe5e9=['end','json','offset','undefined','limit','count','status','set','Content-Range','apply','reject','save','update','then','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','VIRTUAL','merge','options','Team','includeAll','include','findAll','rows','show','params','find','catch','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','get','Teams','UserProfileSection','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','destroy','SELECT\x20UserId\x20FROM\x20user_has_teams\x20WHERE\x20TeamId\x20=\x20','Sequelize','QueryTypes','UserId','sequelize','SELECT','VoiceQueueId','SELECT\x20MailQueueId\x20FROM\x20team_has_mail_queues\x20WHERE\x20TeamId\x20=\x20','MailQueueId','UserMailQueue','SELECT\x20SmsQueueId\x20FROM\x20team_has_sms_queues\x20WHERE\x20TeamId\x20=\x20','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','WhatsappQueueId','UserWhatsappQueue','TeamVoicePrefix','UserVoicePrefix','VoicePrefixId','getQueues','findOne','channel','isValidChannel','ValidationError','capitalize','toLowerCase','addQueues','add','removeQueues','Unknown\x20channel','remove','Queues','ids','Chat','Mail','Fax','Openchannel','Whatsapp','Voice','through','penalty','QueueId','defaults','TeamVoiceQueue','User','Queue','findOrCreate','emit','Queue:save','online','voicePause','interface','UserVoiceQueueRt','upsert','isNil','SIP/%s','all','spread','Sms','transaction','Queue:remove','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','papaparse','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','redis','localhost','sendStatus'];(function(_0x22022c,_0x824cc6){var _0x390ee7=function(_0x910153){while(--_0x910153){_0x22022c['push'](_0x22022c['shift']());}};_0x390ee7(++_0x824cc6);}(_0xe5e9,0x83));var _0x9e5e=function(_0x1e40e9,_0x16cc7a){_0x1e40e9=_0x1e40e9-0x0;var _0x3d3cbc=_0xe5e9[_0x1e40e9];return _0x3d3cbc;};'use strict';var emlformat=require(_0x9e5e('0x0'));var rimraf=require(_0x9e5e('0x1'));var zipdir=require(_0x9e5e('0x2'));var jsonpatch=require(_0x9e5e('0x3'));var rp=require(_0x9e5e('0x4'));var moment=require(_0x9e5e('0x5'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x9e5e('0x6'));var path=require(_0x9e5e('0x7'));var sox=require(_0x9e5e('0x8'));var csv=require(_0x9e5e('0x9'));var ejs=require(_0x9e5e('0xa'));var fs=require('fs');var fs_extra=require(_0x9e5e('0xb'));var _=require(_0x9e5e('0xc'));var squel=require(_0x9e5e('0xd'));var crypto=require(_0x9e5e('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x9e5e('0xf'));var toCsv=require(_0x9e5e('0x9'));var querystring=require('querystring');var Papa=require(_0x9e5e('0x10'));var Redis=require(_0x9e5e('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x9e5e('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x9e5e('0x13'))(_0x9e5e('0x14'));var utils=require(_0x9e5e('0x15'));var config=require(_0x9e5e('0x16'));var licenseUtil=require(_0x9e5e('0x17'));var db=require('../../mysqldb')['db'];config['redis']=_['defaults'](config[_0x9e5e('0x18')],{'host':_0x9e5e('0x19'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x9e5e('0x18')]));require('./team.socket')['register'](socket);function respondWithStatusCode(_0x175c94,_0xde2761){_0xde2761=_0xde2761||0xcc;return function(_0x7765e6){if(_0x7765e6){return _0x175c94[_0x9e5e('0x1a')](_0xde2761);}return _0x175c94['status'](_0xde2761)[_0x9e5e('0x1b')]();};}function respondWithResult(_0xc54fc0,_0x2fdf40){_0x2fdf40=_0x2fdf40||0xc8;return function(_0x1b068e){if(_0x1b068e){return _0xc54fc0['status'](_0x2fdf40)[_0x9e5e('0x1c')](_0x1b068e);}};}function respondWithFilteredResult(_0x1c9b35,_0x5322de){return function(_0x879b7f){if(_0x879b7f){var _0x14d9a4=typeof _0x5322de[_0x9e5e('0x1d')]===_0x9e5e('0x1e')&&typeof _0x5322de[_0x9e5e('0x1f')]===_0x9e5e('0x1e');var _0x1f1cee=_0x879b7f[_0x9e5e('0x20')];var _0x2f073e=_0x14d9a4?0x0:_0x5322de[_0x9e5e('0x1d')];var _0x4c387a=_0x14d9a4?_0x879b7f[_0x9e5e('0x20')]:_0x5322de[_0x9e5e('0x1d')]+_0x5322de[_0x9e5e('0x1f')];var _0x18bb5e;if(_0x4c387a>=_0x1f1cee){_0x4c387a=_0x1f1cee;_0x18bb5e=0xc8;}else{_0x18bb5e=0xce;}_0x1c9b35[_0x9e5e('0x21')](_0x18bb5e);return _0x1c9b35[_0x9e5e('0x22')](_0x9e5e('0x23'),_0x2f073e+'-'+_0x4c387a+'/'+_0x1f1cee)['json'](_0x879b7f);}return null;};}function patchUpdates(_0x18e8e0){return function(_0x5b8b7d){try{jsonpatch[_0x9e5e('0x24')](_0x5b8b7d,_0x18e8e0,!![]);}catch(_0x2dad04){return BPromise[_0x9e5e('0x25')](_0x2dad04);}return _0x5b8b7d[_0x9e5e('0x26')]();};}function saveUpdates(_0x4ac10b,_0x203d88){return function(_0xec3c44){if(_0xec3c44){return _0xec3c44[_0x9e5e('0x27')](_0x4ac10b)[_0x9e5e('0x28')](function(_0x45ee7f){return _0x45ee7f;});}return null;};}function handleEntityNotFound(_0x52f8cc,_0x1360ae){return function(_0x18ebe9){if(!_0x18ebe9){_0x52f8cc[_0x9e5e('0x1a')](0x194);}return _0x18ebe9;};}function handleError(_0x4b2257,_0x5efb03){_0x5efb03=_0x5efb03||0x1f4;return function(_0x4b3a50){logger[_0x9e5e('0x29')](_0x4b3a50[_0x9e5e('0x2a')]);if(_0x4b3a50[_0x9e5e('0x2b')]){delete _0x4b3a50[_0x9e5e('0x2b')];}_0x4b2257[_0x9e5e('0x21')](_0x5efb03)[_0x9e5e('0x2c')](_0x4b3a50);};}exports[_0x9e5e('0x2d')]=function(_0x2d9a2a,_0x14e733){var _0x38693e={},_0x269bc7={},_0x2e5715={'count':0x0,'rows':[]};var _0x4866c9=_[_0x9e5e('0x2e')](db['Team'][_0x9e5e('0x2f')],function(_0x2d98e6){return{'name':_0x2d98e6[_0x9e5e('0x30')],'type':_0x2d98e6[_0x9e5e('0x31')][_0x9e5e('0x32')]};});_0x269bc7[_0x9e5e('0x33')]=_[_0x9e5e('0x2e')](_0x4866c9,_0x9e5e('0x2b'));_0x269bc7[_0x9e5e('0x34')]=_[_0x9e5e('0x35')](_0x2d9a2a[_0x9e5e('0x34')]);_0x269bc7[_0x9e5e('0x36')]=_[_0x9e5e('0x37')](_0x269bc7[_0x9e5e('0x33')],_0x269bc7[_0x9e5e('0x34')]);_0x38693e['attributes']=_['intersection'](_0x269bc7['model'],qs[_0x9e5e('0x38')](_0x2d9a2a[_0x9e5e('0x34')][_0x9e5e('0x38')]));_0x38693e[_0x9e5e('0x39')]=_0x38693e['attributes'][_0x9e5e('0x3a')]?_0x38693e[_0x9e5e('0x39')]:_0x269bc7['model'];if(!_0x2d9a2a[_0x9e5e('0x34')][_0x9e5e('0x3b')](_0x9e5e('0x3c'))){_0x38693e[_0x9e5e('0x1f')]=qs[_0x9e5e('0x1f')](_0x2d9a2a[_0x9e5e('0x34')][_0x9e5e('0x1f')]);_0x38693e[_0x9e5e('0x1d')]=qs[_0x9e5e('0x1d')](_0x2d9a2a[_0x9e5e('0x34')][_0x9e5e('0x1d')]);}_0x38693e[_0x9e5e('0x3d')]=qs[_0x9e5e('0x3e')](_0x2d9a2a[_0x9e5e('0x34')]['sort']);_0x38693e['where']=qs['filters'](_[_0x9e5e('0x3f')](_0x2d9a2a[_0x9e5e('0x34')],_0x269bc7[_0x9e5e('0x36')]),_0x4866c9);if(_0x2d9a2a[_0x9e5e('0x34')][_0x9e5e('0x40')]){_0x38693e[_0x9e5e('0x41')]=_['merge'](_0x38693e[_0x9e5e('0x41')],{'$or':_[_0x9e5e('0x2e')](_0x4866c9,function(_0x3275cf){if(_0x3275cf['type']!==_0x9e5e('0x42')){var _0x421a5b={};_0x421a5b[_0x3275cf[_0x9e5e('0x2b')]]={'$like':'%'+_0x2d9a2a['query']['filter']+'%'};return _0x421a5b;}})});}_0x38693e=_[_0x9e5e('0x43')]({},_0x38693e,_0x2d9a2a[_0x9e5e('0x44')]);var _0x31e303={'where':_0x38693e[_0x9e5e('0x41')]};return db[_0x9e5e('0x45')][_0x9e5e('0x20')](_0x31e303)[_0x9e5e('0x28')](function(_0x235cbd){_0x2e5715[_0x9e5e('0x20')]=_0x235cbd;if(_0x2d9a2a[_0x9e5e('0x34')][_0x9e5e('0x46')]){_0x38693e[_0x9e5e('0x47')]=[{'all':!![]}];}return db[_0x9e5e('0x45')][_0x9e5e('0x48')](_0x38693e);})[_0x9e5e('0x28')](function(_0x117282){_0x2e5715[_0x9e5e('0x49')]=_0x117282;return _0x2e5715;})[_0x9e5e('0x28')](respondWithFilteredResult(_0x14e733,_0x38693e))['catch'](handleError(_0x14e733,null));};exports[_0x9e5e('0x4a')]=function(_0x911c90,_0x529102){var _0x578228={'raw':![],'where':{'id':_0x911c90[_0x9e5e('0x4b')]['id']}},_0x20f9ef={};_0x20f9ef['model']=_[_0x9e5e('0x35')](db[_0x9e5e('0x45')][_0x9e5e('0x2f')]);_0x20f9ef[_0x9e5e('0x34')]=_[_0x9e5e('0x35')](_0x911c90['query']);_0x20f9ef['filters']=_[_0x9e5e('0x37')](_0x20f9ef[_0x9e5e('0x33')],_0x20f9ef['query']);_0x578228[_0x9e5e('0x39')]=_[_0x9e5e('0x37')](_0x20f9ef[_0x9e5e('0x33')],qs[_0x9e5e('0x38')](_0x911c90[_0x9e5e('0x34')][_0x9e5e('0x38')]));_0x578228[_0x9e5e('0x39')]=_0x578228[_0x9e5e('0x39')][_0x9e5e('0x3a')]?_0x578228[_0x9e5e('0x39')]:_0x20f9ef[_0x9e5e('0x33')];if(_0x911c90['query'][_0x9e5e('0x46')]){_0x578228[_0x9e5e('0x47')]=[{'all':!![]}];}_0x578228=_[_0x9e5e('0x43')]({},_0x578228,_0x911c90[_0x9e5e('0x44')]);return db[_0x9e5e('0x45')][_0x9e5e('0x4c')](_0x578228)[_0x9e5e('0x28')](handleEntityNotFound(_0x529102,null))[_0x9e5e('0x28')](respondWithResult(_0x529102,null))[_0x9e5e('0x4d')](handleError(_0x529102,null));};exports[_0x9e5e('0x4e')]=function(_0x2df283,_0x4badb6){return db['Team'][_0x9e5e('0x4e')](_0x2df283['body'],{})[_0x9e5e('0x28')](function(_0x54d889){var _0x21e304=_0x2df283[_0x9e5e('0x4f')]['get']({'plain':!![]});if(!_0x21e304)throw new Error(_0x9e5e('0x50'));if(_0x21e304[_0x9e5e('0x51')]===_0x9e5e('0x4f')){var _0x21b57e=_0x54d889[_0x9e5e('0x52')]({'plain':!![]});var _0x5d5959=_0x9e5e('0x53');return db[_0x9e5e('0x54')][_0x9e5e('0x4c')]({'where':{'name':_0x5d5959,'userProfileId':_0x21e304['userProfileId']},'raw':!![]})[_0x9e5e('0x28')](function(_0x19b430){if(_0x19b430&&_0x19b430[_0x9e5e('0x55')]===0x0){return db[_0x9e5e('0x56')][_0x9e5e('0x4e')]({'name':_0x21b57e[_0x9e5e('0x2b')],'resourceId':_0x21b57e['id'],'type':_0x19b430[_0x9e5e('0x2b')],'sectionId':_0x19b430['id']},{})[_0x9e5e('0x28')](function(){return _0x54d889;});}else{return _0x54d889;}})[_0x9e5e('0x4d')](function(_0xdb4815){logger[_0x9e5e('0x29')](_0x9e5e('0x57'),_0xdb4815);throw _0xdb4815;});}return _0x54d889;})[_0x9e5e('0x28')](respondWithResult(_0x4badb6,0xc9))[_0x9e5e('0x4d')](handleError(_0x4badb6,null));};exports[_0x9e5e('0x27')]=function(_0x4b345b,_0x2c4a83){if(_0x4b345b[_0x9e5e('0x58')]['id']){delete _0x4b345b[_0x9e5e('0x58')]['id'];}return db[_0x9e5e('0x45')][_0x9e5e('0x4c')]({'where':{'id':_0x4b345b[_0x9e5e('0x4b')]['id']}})[_0x9e5e('0x28')](handleEntityNotFound(_0x2c4a83,null))[_0x9e5e('0x28')](saveUpdates(_0x4b345b[_0x9e5e('0x58')],null))[_0x9e5e('0x28')](respondWithResult(_0x2c4a83,null))['catch'](handleError(_0x2c4a83,null));};exports[_0x9e5e('0x59')]=function(_0x419ce0,_0x5a057c){var _0x2a9200=_0x419ce0['params']['id'];var _0x49cda2=[];return db['sequelize']['transaction'](function(_0x2c6bcb){var _0x228f16=_0x9e5e('0x5a')+_0x2a9200;return db['sequelize'][_0x9e5e('0x34')](_0x228f16,{'type':db[_0x9e5e('0x5b')][_0x9e5e('0x5c')]['SELECT'],'raw':!![],'transaction':_0x2c6bcb})[_0x9e5e('0x28')](function(_0x2d45d1){_0x49cda2=_[_0x9e5e('0x2e')](_0x2d45d1,function(_0x468663){return Number(_0x468663[_0x9e5e('0x5d')]);});})[_0x9e5e('0x28')](function(){var _0x3f7110='SELECT\x20VoiceQueueId\x20FROM\x20team_has_voice_queues\x20WHERE\x20TeamId\x20=\x20'+_0x2a9200;return db[_0x9e5e('0x5e')][_0x9e5e('0x34')](_0x3f7110,{'type':db['Sequelize'][_0x9e5e('0x5c')][_0x9e5e('0x5f')],'raw':!![],'transaction':_0x2c6bcb});})['then'](function(_0x5f0409){var _0x37054f=_[_0x9e5e('0x2e')](_0x5f0409,function(_0x75c409){return Number(_0x75c409[_0x9e5e('0x60')]);});return db['UserVoiceQueue'][_0x9e5e('0x59')]({'where':{'UserId':{'$in':_0x49cda2},'VoiceQueueId':{'$in':_0x37054f}},'transaction':_0x2c6bcb});})[_0x9e5e('0x28')](function(){var _0x4c4ac4=_0x9e5e('0x61')+_0x2a9200;return db[_0x9e5e('0x5e')][_0x9e5e('0x34')](_0x4c4ac4,{'type':db[_0x9e5e('0x5b')][_0x9e5e('0x5c')][_0x9e5e('0x5f')],'raw':!![],'transaction':_0x2c6bcb});})['then'](function(_0x43025d){var _0x438f6f=_[_0x9e5e('0x2e')](_0x43025d,function(_0x32340f){return Number(_0x32340f[_0x9e5e('0x62')]);});return db[_0x9e5e('0x63')][_0x9e5e('0x59')]({'where':{'UserId':{'$in':_0x49cda2},'MailQueueId':{'$in':_0x438f6f}},'transaction':_0x2c6bcb});})[_0x9e5e('0x28')](function(){var _0x2eea28=_0x9e5e('0x64')+_0x2a9200;return db[_0x9e5e('0x5e')][_0x9e5e('0x34')](_0x2eea28,{'type':db[_0x9e5e('0x5b')][_0x9e5e('0x5c')][_0x9e5e('0x5f')],'raw':!![],'transaction':_0x2c6bcb});})['then'](function(_0x5ec5f2){var _0x17b4e3=_[_0x9e5e('0x2e')](_0x5ec5f2,function(_0x24094f){return Number(_0x24094f['SmsQueueId']);});return db['UserSmsQueue']['destroy']({'where':{'UserId':{'$in':_0x49cda2},'SmsQueueId':{'$in':_0x17b4e3}},'transaction':_0x2c6bcb});})[_0x9e5e('0x28')](function(){var _0x24a6f2=_0x9e5e('0x65')+_0x2a9200;return db[_0x9e5e('0x5e')][_0x9e5e('0x34')](_0x24a6f2,{'type':db[_0x9e5e('0x5b')][_0x9e5e('0x5c')][_0x9e5e('0x5f')],'raw':!![],'transaction':_0x2c6bcb});})[_0x9e5e('0x28')](function(_0x586fde){var _0xed7513=_[_0x9e5e('0x2e')](_0x586fde,function(_0x2aea58){return Number(_0x2aea58[_0x9e5e('0x66')]);});return db[_0x9e5e('0x67')][_0x9e5e('0x59')]({'where':{'UserId':{'$in':_0x49cda2},'ChatQueueId':{'$in':_0xed7513}},'transaction':_0x2c6bcb});})[_0x9e5e('0x28')](function(){var _0x718486=_0x9e5e('0x68')+_0x2a9200;return db['sequelize'][_0x9e5e('0x34')](_0x718486,{'type':db[_0x9e5e('0x5b')][_0x9e5e('0x5c')][_0x9e5e('0x5f')],'raw':!![],'transaction':_0x2c6bcb});})[_0x9e5e('0x28')](function(_0x432b46){var _0xe87e6a=_[_0x9e5e('0x2e')](_0x432b46,function(_0x1c55c2){return Number(_0x1c55c2[_0x9e5e('0x69')]);});return db[_0x9e5e('0x6a')][_0x9e5e('0x59')]({'where':{'UserId':{'$in':_0x49cda2},'FaxQueueId':{'$in':_0xe87e6a}},'transaction':_0x2c6bcb});})[_0x9e5e('0x28')](function(){var _0x204b1b=_0x9e5e('0x6b')+_0x2a9200;return db[_0x9e5e('0x5e')][_0x9e5e('0x34')](_0x204b1b,{'type':db[_0x9e5e('0x5b')][_0x9e5e('0x5c')][_0x9e5e('0x5f')],'raw':!![],'transaction':_0x2c6bcb});})[_0x9e5e('0x28')](function(_0x338e3b){var _0x1c57e5=_[_0x9e5e('0x2e')](_0x338e3b,function(_0x29dd3a){return Number(_0x29dd3a[_0x9e5e('0x6c')]);});return db[_0x9e5e('0x6d')]['destroy']({'where':{'UserId':{'$in':_0x49cda2},'OpenchannelQueueId':{'$in':_0x1c57e5}},'transaction':_0x2c6bcb});})['then'](function(){var _0x1f6ba0='SELECT\x20WhatsappQueueId\x20FROM\x20team_has_whatsapp_queues\x20WHERE\x20TeamId\x20=\x20'+_0x2a9200;return db[_0x9e5e('0x5e')][_0x9e5e('0x34')](_0x1f6ba0,{'type':db[_0x9e5e('0x5b')][_0x9e5e('0x5c')][_0x9e5e('0x5f')],'raw':!![],'transaction':_0x2c6bcb});})[_0x9e5e('0x28')](function(_0x15ddc3){var _0x24f117=_['map'](_0x15ddc3,function(_0x3c10ce){return Number(_0x3c10ce[_0x9e5e('0x6e')]);});return db[_0x9e5e('0x6f')][_0x9e5e('0x59')]({'where':{'UserId':{'$in':_0x49cda2},'WhatsappQueueId':{'$in':_0x24f117}},'transaction':_0x2c6bcb});})[_0x9e5e('0x28')](function(){return db[_0x9e5e('0x70')][_0x9e5e('0x4c')]({'where':{'TeamId':_0x2a9200}});})[_0x9e5e('0x28')](function(_0x224df6){if(_0x224df6===null){return;}return db[_0x9e5e('0x71')][_0x9e5e('0x59')]({'where':{'UserId':{'$in':_0x49cda2},'VoicePrefixId':_0x224df6[_0x9e5e('0x72')]},'transaction':_0x2c6bcb});})[_0x9e5e('0x28')](function(){return db['Team'][_0x9e5e('0x59')]({'where':{'id':_0x2a9200},'cascade':!![],'transaction':_0x2c6bcb});})[_0x9e5e('0x28')](function(_0x1468fe){if(_0x1468fe===0x0){_0x5a057c['sendStatus'](0x194);}else{return db[_0x9e5e('0x56')][_0x9e5e('0x59')]({'where':{'type':_0x9e5e('0x53'),'resourceId':_0x2a9200},'cascade':!![],'transaction':_0x2c6bcb})['then'](function(){_0x5a057c[_0x9e5e('0x21')](0xcc)[_0x9e5e('0x1b')]();});}})[_0x9e5e('0x4d')](function(_0x3dedbb){_0x5a057c[_0x9e5e('0x21')](0x1f4)['send'](_0x3dedbb);});});};exports[_0x9e5e('0x73')]=function(_0x24af19,_0x2de61d,_0x2562ce){return db[_0x9e5e('0x45')][_0x9e5e('0x74')]({'where':{'id':_0x24af19[_0x9e5e('0x4b')]['id']}})[_0x9e5e('0x28')](handleEntityNotFound(_0x2de61d,null))[_0x9e5e('0x28')](function(_0x1cd3c1){if(!_0x24af19[_0x9e5e('0x34')][_0x9e5e('0x75')]||!utils[_0x9e5e('0x76')](_0x24af19[_0x9e5e('0x34')][_0x9e5e('0x75')])){throw new db[(_0x9e5e('0x5b'))][(_0x9e5e('0x77'))]('Unknown\x20channel');}var _0x3b73ee={};var _0x419040={};_0x419040['model']=_['keys'](db[_[_0x9e5e('0x78')](_0x24af19[_0x9e5e('0x34')]['channel'][_0x9e5e('0x79')]())+'Queue']['rawAttributes']);_0x419040[_0x9e5e('0x34')]=_[_0x9e5e('0x35')](_0x24af19['query']);_0x419040[_0x9e5e('0x36')]=_['intersection'](_0x419040[_0x9e5e('0x33')],_0x419040[_0x9e5e('0x34')]);_0x3b73ee[_0x9e5e('0x39')]=_[_0x9e5e('0x37')](_0x419040[_0x9e5e('0x33')],qs[_0x9e5e('0x38')](_0x24af19[_0x9e5e('0x34')][_0x9e5e('0x38')]));_0x3b73ee[_0x9e5e('0x39')]=_0x3b73ee[_0x9e5e('0x39')]['length']?_0x3b73ee[_0x9e5e('0x39')]:_0x419040[_0x9e5e('0x33')];_0x3b73ee[_0x9e5e('0x1f')]=qs['limit'](_0x24af19['query'][_0x9e5e('0x1f')]);_0x3b73ee[_0x9e5e('0x1d')]=qs[_0x9e5e('0x1d')](_0x24af19[_0x9e5e('0x34')][_0x9e5e('0x1d')]);_0x3b73ee[_0x9e5e('0x3d')]=qs['sort'](_0x24af19[_0x9e5e('0x34')][_0x9e5e('0x3e')]);_0x3b73ee[_0x9e5e('0x41')]=qs[_0x9e5e('0x36')](_['pick'](_0x24af19[_0x9e5e('0x34')],_0x419040[_0x9e5e('0x36')]));_0x3b73ee=_[_0x9e5e('0x43')]({},_0x3b73ee,_0x24af19[_0x9e5e('0x44')]);return _0x1cd3c1[_0x9e5e('0x52')+_['capitalize'](_0x24af19['query'][_0x9e5e('0x75')][_0x9e5e('0x79')]())+'Queues'](_0x3b73ee);})[_0x9e5e('0x28')](respondWithResult(_0x2de61d,null))[_0x9e5e('0x4d')](handleError(_0x2de61d,null));};exports[_0x9e5e('0x7a')]=function(_0x1b6656,_0x308a99,_0x4de83d){return db[_0x9e5e('0x45')][_0x9e5e('0x74')]({'where':{'id':_0x1b6656[_0x9e5e('0x4b')]['id']}})[_0x9e5e('0x28')](function(_0x154f66){if(_0x154f66){if(!_0x1b6656['body'][_0x9e5e('0x75')]||!utils[_0x9e5e('0x76')](_0x1b6656[_0x9e5e('0x58')][_0x9e5e('0x75')])){throw new db[(_0x9e5e('0x5b'))][(_0x9e5e('0x77'))]('Unknown\x20channel');}return _0x154f66[_0x9e5e('0x7b')+_['capitalize'](_0x1b6656[_0x9e5e('0x58')][_0x9e5e('0x75')][_0x9e5e('0x79')]())+'Queues'](_0x1b6656['body']['ids']);}return null;})[_0x9e5e('0x28')](handleEntityNotFound(_0x308a99,null))[_0x9e5e('0x28')](respondWithStatusCode(_0x308a99,null))[_0x9e5e('0x4d')](handleError(_0x308a99,null));};exports[_0x9e5e('0x7c')]=function(_0x4ff024,_0x95ca74,_0x2064b5){return db[_0x9e5e('0x45')][_0x9e5e('0x74')]({'where':{'id':_0x4ff024['params']['id']}})[_0x9e5e('0x28')](function(_0x3d11bd){if(_0x3d11bd){if(!_0x4ff024[_0x9e5e('0x34')]['channel']||!utils[_0x9e5e('0x76')](_0x4ff024[_0x9e5e('0x34')][_0x9e5e('0x75')])){throw new db[(_0x9e5e('0x5b'))][(_0x9e5e('0x77'))](_0x9e5e('0x7d'));}return _0x3d11bd[_0x9e5e('0x7e')+_[_0x9e5e('0x78')](_0x4ff024['query'][_0x9e5e('0x75')][_0x9e5e('0x79')]())+_0x9e5e('0x7f')](_0x4ff024[_0x9e5e('0x34')]['ids']);}return null;})[_0x9e5e('0x28')](handleEntityNotFound(_0x95ca74,null))[_0x9e5e('0x28')](respondWithStatusCode(_0x95ca74,null))[_0x9e5e('0x4d')](handleError(_0x95ca74,null));};exports['addAgents']=function(_0x3bd659,_0x5cf79c){var _0x4ad7d0=_['isArray'](_0x3bd659[_0x9e5e('0x58')][_0x9e5e('0x80')])?_0x3bd659['body'][_0x9e5e('0x80')]:[_0x3bd659[_0x9e5e('0x58')][_0x9e5e('0x80')]];var _0x4398b6=_0x3bd659[_0x9e5e('0x4b')]['id'];return db[_0x9e5e('0x45')][_0x9e5e('0x4c')]({'where':{'id':_0x4398b6}})[_0x9e5e('0x28')](handleEntityNotFound(_0x5cf79c,null))['then'](function(_0x4cf10a){if(_0x4cf10a){var _0x237d16=['Voice',_0x9e5e('0x81'),_0x9e5e('0x82'),'Sms',_0x9e5e('0x83'),_0x9e5e('0x84'),_0x9e5e('0x85')];return db[_0x9e5e('0x5e')]['transaction'](function(_0x2225d6){var _0x248f93=_['map'](_0x237d16,function(_0x50bbb5){var _0x1ab862={'attributes':['id','name']};if(_0x50bbb5===_0x9e5e('0x86')){_0x1ab862[_0x9e5e('0x87')]={'attributes':[_0x9e5e('0x88')]};}return _0x4cf10a['get'+_0x50bbb5+_0x9e5e('0x7f')](_0x1ab862)[_0x9e5e('0x28')](function(_0x49cf01){var _0x53f467=_['map'](_0x49cf01,function(_0x2caf4d){var _0x40a8db=_[_0x9e5e('0x2e')](_0x4ad7d0,function(_0x560c77){var _0x5e1040={'where':{'UserId':_0x560c77,[_0x50bbb5+_0x9e5e('0x89')]:_0x2caf4d['id']},'transaction':_0x2225d6};if(_0x50bbb5===_0x9e5e('0x86')){_0x5e1040[_0x9e5e('0x8a')]={'penalty':_0x2caf4d[_0x9e5e('0x8b')]['penalty']};}return db[_0x9e5e('0x8c')+_0x50bbb5+_0x9e5e('0x8d')][_0x9e5e('0x8e')](_0x5e1040)['then'](function(){socket[_0x9e5e('0x8f')](_0x9e5e('0x4f')+_0x50bbb5+_0x9e5e('0x90'),{'UserId':_0x560c77,[_0x50bbb5+_0x9e5e('0x89')]:_0x2caf4d['id']});if(_0x50bbb5!==_0x9e5e('0x86')){return;}return db[_0x9e5e('0x8c')]['findAll']({'where':{'id':_0x4ad7d0,'online':0x1},'attributes':['id','name',_0x9e5e('0x91'),_0x9e5e('0x92'),_0x9e5e('0x93')],'raw':!![]})[_0x9e5e('0x28')](function(_0x118b1f){var _0x5cfe4c=_[_0x9e5e('0x2e')](_0x118b1f,function(_0xb2cbd7){return db[_0x9e5e('0x94')][_0x9e5e('0x95')]({'membername':_0xb2cbd7[_0x9e5e('0x2b')],'UserId':_0xb2cbd7['id'],'queue_name':_0x2caf4d[_0x9e5e('0x2b')],'VoiceQueueId':_0x2caf4d['id'],'interface':_[_0x9e5e('0x96')](_0xb2cbd7['interface'])?util['format'](_0x9e5e('0x97'),_0xb2cbd7[_0x9e5e('0x2b')]):_0xb2cbd7[_0x9e5e('0x93')],'paused':_0xb2cbd7[_0x9e5e('0x92')]||![],'penalty':_0x2caf4d[_0x9e5e('0x8b')][_0x9e5e('0x88')]},{'transaction':_0x2225d6});});return Promise[_0x9e5e('0x98')](_0x5cfe4c);});});});return Promise['all'](_0x40a8db);});return Promise[_0x9e5e('0x98')](_0x53f467);})[_0x9e5e('0x28')](function(){return db[_0x9e5e('0x70')][_0x9e5e('0x74')]({'where':{'teamId':_0x4398b6}})[_0x9e5e('0x28')](function(_0x12269f){if(_0x12269f){var _0x5043c7=_['map'](_0x4ad7d0,function(_0x1fe409){db[_0x9e5e('0x71')]['upsert']({'UserId':_0x1fe409,'VoicePrefixId':_0x12269f['VoicePrefixId']});});return Promise[_0x9e5e('0x98')](_0x5043c7);}});});});return Promise[_0x9e5e('0x98')](_0x248f93)[_0x9e5e('0x28')](function(){return _0x4cf10a['addAgents'](_0x4ad7d0,{'transaction':_0x2225d6})[_0x9e5e('0x99')](function(_0x21dbd9){return _0x21dbd9;});});});}})[_0x9e5e('0x28')](respondWithResult(_0x5cf79c,null))[_0x9e5e('0x4d')](handleError(_0x5cf79c,null));};exports['removeAgents']=function(_0x2210fb,_0x1624de){var _0x3e41ba=_['isArray'](_0x2210fb['query']['ids'])?_0x2210fb[_0x9e5e('0x34')][_0x9e5e('0x80')]:[_0x2210fb['query'][_0x9e5e('0x80')]];var _0x17410a=_0x2210fb['params']['id'];return db[_0x9e5e('0x45')][_0x9e5e('0x4c')]({'where':{'id':_0x17410a}})[_0x9e5e('0x28')](handleEntityNotFound(_0x1624de,null))[_0x9e5e('0x28')](function(_0x4af027){if(_0x4af027){var _0x12a32d=[_0x9e5e('0x86'),_0x9e5e('0x81'),'Mail',_0x9e5e('0x9a'),_0x9e5e('0x83'),'Openchannel',_0x9e5e('0x85')];return db[_0x9e5e('0x5e')][_0x9e5e('0x9b')](function(_0x45431f){var _0x551a7a=_[_0x9e5e('0x2e')](_0x12a32d,function(_0xf0805f){var _0x260391={'attributes':['id','name']};return _0x4af027['get'+_0xf0805f+_0x9e5e('0x7f')](_0x260391)[_0x9e5e('0x28')](function(_0x5def73){var _0x880d5d=_['map'](_0x5def73,function(_0x1a93a){return _0x1a93a['removeAgents'](_0x3e41ba,{'transaction':_0x45431f})[_0x9e5e('0x28')](function(){var _0xd67c71=_[_0x9e5e('0x2e')](_0x3e41ba,function(_0x9b39d7){socket[_0x9e5e('0x8f')](_0x9e5e('0x4f')+_0xf0805f+_0x9e5e('0x9c'),{'UserId':Number(_0x9b39d7),[_0xf0805f+_0x9e5e('0x89')]:_0x1a93a['id']});if(_0xf0805f!==_0x9e5e('0x86')){return;}return db[_0x9e5e('0x94')][_0x9e5e('0x59')]({'where':{'VoiceQueueId':_0x1a93a['id'],'UserId':_0x9b39d7},'transaction':_0x45431f});});return Promise[_0x9e5e('0x98')](_0xd67c71);});});return Promise[_0x9e5e('0x98')](_0x880d5d);});});return Promise['all'](_0x551a7a)[_0x9e5e('0x28')](function(){return _0x4af027['removeAgents'](_0x3e41ba,{'transaction':_0x45431f});})[_0x9e5e('0x28')](function(){return db[_0x9e5e('0x70')][_0x9e5e('0x74')]({'where':{'teamId':_0x17410a}})[_0x9e5e('0x28')](function(_0x24d6c0){if(_0x24d6c0){var _0x2a3504=_[_0x9e5e('0x2e')](_0x3e41ba,function(_0x2f322b){db[_0x9e5e('0x71')]['destroy']({'where':{'UserId':_0x2f322b,'VoicePrefixId':_0x24d6c0[_0x9e5e('0x72')]}});});return Promise[_0x9e5e('0x98')](_0x2a3504);}});});});}})[_0x9e5e('0x28')](respondWithStatusCode(_0x1624de,null))[_0x9e5e('0x4d')](handleError(_0x1624de,null));};exports[_0x9e5e('0x9d')]=function(_0x15df28,_0x239ea2,_0x5dc571){var _0x1792c0={};var _0x2f5034={};var _0x1286f3;var _0x3ed47b;return db['Team'][_0x9e5e('0x74')]({'where':{'id':_0x15df28[_0x9e5e('0x4b')]['id']}})[_0x9e5e('0x28')](handleEntityNotFound(_0x239ea2,null))[_0x9e5e('0x28')](function(_0x175965){if(_0x175965){_0x1286f3=_0x175965;_0x2f5034[_0x9e5e('0x33')]=_[_0x9e5e('0x35')](db['User']['rawAttributes']);_0x2f5034['query']=_[_0x9e5e('0x35')](_0x15df28[_0x9e5e('0x34')]);_0x2f5034[_0x9e5e('0x36')]=_[_0x9e5e('0x37')](_0x2f5034[_0x9e5e('0x33')],_0x2f5034['query']);_0x1792c0[_0x9e5e('0x39')]=_[_0x9e5e('0x37')](_0x2f5034[_0x9e5e('0x33')],qs[_0x9e5e('0x38')](_0x15df28[_0x9e5e('0x34')][_0x9e5e('0x38')]));_0x1792c0[_0x9e5e('0x39')]=_0x1792c0[_0x9e5e('0x39')][_0x9e5e('0x3a')]?_0x1792c0['attributes']:_0x2f5034[_0x9e5e('0x33')];_0x1792c0['order']=qs[_0x9e5e('0x3e')](_0x15df28[_0x9e5e('0x34')][_0x9e5e('0x3e')]);_0x1792c0[_0x9e5e('0x41')]=qs[_0x9e5e('0x36')](_[_0x9e5e('0x3f')](_0x15df28[_0x9e5e('0x34')],_0x2f5034[_0x9e5e('0x36')]));if(_0x15df28[_0x9e5e('0x34')][_0x9e5e('0x40')]){_0x1792c0[_0x9e5e('0x41')]=_[_0x9e5e('0x43')](_0x1792c0[_0x9e5e('0x41')],{'$or':_['map'](_0x1792c0[_0x9e5e('0x39')],function(_0x1bbf5a){var _0x621b9c={};_0x621b9c[_0x1bbf5a]={'$like':'%'+_0x15df28['query']['filter']+'%'};return _0x621b9c;})});}_0x1792c0=_[_0x9e5e('0x43')]({},_0x1792c0,_0x15df28[_0x9e5e('0x44')]);return _0x1286f3[_0x9e5e('0x9d')](_0x1792c0);}})['then'](function(_0x272423){if(_0x272423){_0x3ed47b=_0x272423[_0x9e5e('0x3a')];if(!_0x15df28[_0x9e5e('0x34')][_0x9e5e('0x3b')](_0x9e5e('0x3c'))){_0x1792c0[_0x9e5e('0x1f')]=qs[_0x9e5e('0x1f')](_0x15df28[_0x9e5e('0x34')][_0x9e5e('0x1f')]);_0x1792c0[_0x9e5e('0x1d')]=qs[_0x9e5e('0x1d')](_0x15df28[_0x9e5e('0x34')]['offset']);}return _0x1286f3[_0x9e5e('0x9d')](_0x1792c0);}})[_0x9e5e('0x28')](function(_0x5bcd91){if(_0x5bcd91){return _0x5bcd91?{'count':_0x3ed47b,'rows':_0x5bcd91}:null;}})[_0x9e5e('0x28')](respondWithResult(_0x239ea2,null))['catch'](handleError(_0x239ea2,null));};
\ No newline at end of file
+var _0x5d94=['name','send','index','map','Team','rawAttributes','fieldName','query','filters','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','limit','sort','where','pick','filter','merge','type','VIRTUAL','options','include','findAll','rows','catch','params','keys','includeAll','create','body','user','get','role','Teams','UserProfileSection','find','userProfileId','autoAssociation','UserProfileResource','update','destroy','transaction','SELECT\x20UserId\x20FROM\x20user_has_teams\x20WHERE\x20TeamId\x20=\x20','sequelize','Sequelize','QueryTypes','SELECT','SELECT\x20VoiceQueueId\x20FROM\x20team_has_voice_queues\x20WHERE\x20TeamId\x20=\x20','VoiceQueueId','UserVoiceQueue','SELECT\x20MailQueueId\x20FROM\x20team_has_mail_queues\x20WHERE\x20TeamId\x20=\x20','UserMailQueue','SELECT\x20SmsQueueId\x20FROM\x20team_has_sms_queues\x20WHERE\x20TeamId\x20=\x20','UserSmsQueue','SELECT\x20ChatQueueId\x20FROM\x20team_has_chat_queues\x20WHERE\x20TeamId\x20=\x20','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','SELECT\x20WhatsappQueueId\x20FROM\x20team_has_whatsapp_queues\x20WHERE\x20TeamId\x20=\x20','WhatsappQueueId','UserWhatsappQueue','TeamVoicePrefix','UserVoicePrefix','getQueues','findOne','channel','isValidChannel','ValidationError','Unknown\x20channel','capitalize','toLowerCase','Queue','addQueues','Queues','ids','removeQueues','addAgents','isArray','Voice','Chat','Mail','Sms','Fax','Whatsapp','through','penalty','QueueId','TeamVoiceQueue','User','findOrCreate','emit','voicePause','interface','UserVoiceQueueRt','upsert','isNil','format','SIP/%s','all','spread','removeAgents','Openchannel','Queue:remove','VoicePrefixId','getAgents','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./team.socket','register','sendStatus','status','end','json','offset','undefined','count','set','Content-Range','reject','save','then','error','stack'];(function(_0x442a48,_0xc46eca){var _0x3e242e=function(_0x58fe79){while(--_0x58fe79){_0x442a48['push'](_0x442a48['shift']());}};_0x3e242e(++_0xc46eca);}(_0x5d94,0x1a6));var _0x45d9=function(_0x5ac8fb,_0x58384b){_0x5ac8fb=_0x5ac8fb-0x0;var _0x3c3a3f=_0x5d94[_0x5ac8fb];return _0x3c3a3f;};'use strict';var emlformat=require(_0x45d9('0x0'));var rimraf=require(_0x45d9('0x1'));var zipdir=require(_0x45d9('0x2'));var jsonpatch=require(_0x45d9('0x3'));var rp=require(_0x45d9('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x45d9('0x5'));var util=require('util');var path=require(_0x45d9('0x6'));var sox=require(_0x45d9('0x7'));var csv=require(_0x45d9('0x8'));var ejs=require(_0x45d9('0x9'));var fs=require('fs');var fs_extra=require(_0x45d9('0xa'));var _=require(_0x45d9('0xb'));var squel=require('squel');var crypto=require(_0x45d9('0xc'));var jsforce=require(_0x45d9('0xd'));var deskjs=require(_0x45d9('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x45d9('0xf'));var Redis=require('ioredis');var authService=require(_0x45d9('0x10'));var qs=require(_0x45d9('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x45d9('0x12'));var logger=require(_0x45d9('0x13'))(_0x45d9('0x14'));var utils=require(_0x45d9('0x15'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x45d9('0x16'))['db'];config[_0x45d9('0x17')]=_[_0x45d9('0x18')](config[_0x45d9('0x17')],{'host':_0x45d9('0x19'),'port':0x18eb});var socket=require(_0x45d9('0x1a'))(new Redis(config[_0x45d9('0x17')]));require(_0x45d9('0x1b'))[_0x45d9('0x1c')](socket);function respondWithStatusCode(_0x22920c,_0x2fca0e){_0x2fca0e=_0x2fca0e||0xcc;return function(_0x208068){if(_0x208068){return _0x22920c[_0x45d9('0x1d')](_0x2fca0e);}return _0x22920c[_0x45d9('0x1e')](_0x2fca0e)[_0x45d9('0x1f')]();};}function respondWithResult(_0x45bb61,_0x4b3a47){_0x4b3a47=_0x4b3a47||0xc8;return function(_0x36b8fa){if(_0x36b8fa){return _0x45bb61['status'](_0x4b3a47)[_0x45d9('0x20')](_0x36b8fa);}};}function respondWithFilteredResult(_0x20d3b1,_0x57cd8c){return function(_0x9cb1f1){if(_0x9cb1f1){var _0x13d42c=typeof _0x57cd8c[_0x45d9('0x21')]===_0x45d9('0x22')&&typeof _0x57cd8c['limit']===_0x45d9('0x22');var _0xe1a112=_0x9cb1f1[_0x45d9('0x23')];var _0x4c0da9=_0x13d42c?0x0:_0x57cd8c['offset'];var _0x46089f=_0x13d42c?_0x9cb1f1[_0x45d9('0x23')]:_0x57cd8c['offset']+_0x57cd8c['limit'];var _0x26667d;if(_0x46089f>=_0xe1a112){_0x46089f=_0xe1a112;_0x26667d=0xc8;}else{_0x26667d=0xce;}_0x20d3b1['status'](_0x26667d);return _0x20d3b1[_0x45d9('0x24')](_0x45d9('0x25'),_0x4c0da9+'-'+_0x46089f+'/'+_0xe1a112)[_0x45d9('0x20')](_0x9cb1f1);}return null;};}function patchUpdates(_0x3d3bf1){return function(_0x5fc2ca){try{jsonpatch['apply'](_0x5fc2ca,_0x3d3bf1,!![]);}catch(_0x322ca9){return BPromise[_0x45d9('0x26')](_0x322ca9);}return _0x5fc2ca[_0x45d9('0x27')]();};}function saveUpdates(_0x5b01af,_0x9a1f41){return function(_0x45fc48){if(_0x45fc48){return _0x45fc48['update'](_0x5b01af)[_0x45d9('0x28')](function(_0xda71cb){return _0xda71cb;});}return null;};}function handleEntityNotFound(_0x43a79c,_0x295fc5){return function(_0x2c4bac){if(!_0x2c4bac){_0x43a79c[_0x45d9('0x1d')](0x194);}return _0x2c4bac;};}function handleError(_0x31baa9,_0x4218bf){_0x4218bf=_0x4218bf||0x1f4;return function(_0xc25c00){logger[_0x45d9('0x29')](_0xc25c00[_0x45d9('0x2a')]);if(_0xc25c00[_0x45d9('0x2b')]){delete _0xc25c00[_0x45d9('0x2b')];}_0x31baa9[_0x45d9('0x1e')](_0x4218bf)[_0x45d9('0x2c')](_0xc25c00);};}exports[_0x45d9('0x2d')]=function(_0x2f87bb,_0x5abe80){var _0x116bfb={},_0x46e308={},_0x4abdf2={'count':0x0,'rows':[]};var _0x5bd779=_[_0x45d9('0x2e')](db[_0x45d9('0x2f')][_0x45d9('0x30')],function(_0x1a55ba){return{'name':_0x1a55ba[_0x45d9('0x31')],'type':_0x1a55ba['type']['key']};});_0x46e308['model']=_[_0x45d9('0x2e')](_0x5bd779,_0x45d9('0x2b'));_0x46e308[_0x45d9('0x32')]=_['keys'](_0x2f87bb[_0x45d9('0x32')]);_0x46e308[_0x45d9('0x33')]=_[_0x45d9('0x34')](_0x46e308[_0x45d9('0x35')],_0x46e308[_0x45d9('0x32')]);_0x116bfb['attributes']=_[_0x45d9('0x34')](_0x46e308[_0x45d9('0x35')],qs[_0x45d9('0x36')](_0x2f87bb[_0x45d9('0x32')][_0x45d9('0x36')]));_0x116bfb[_0x45d9('0x37')]=_0x116bfb[_0x45d9('0x37')][_0x45d9('0x38')]?_0x116bfb[_0x45d9('0x37')]:_0x46e308['model'];if(!_0x2f87bb[_0x45d9('0x32')][_0x45d9('0x39')](_0x45d9('0x3a'))){_0x116bfb['limit']=qs[_0x45d9('0x3b')](_0x2f87bb[_0x45d9('0x32')]['limit']);_0x116bfb[_0x45d9('0x21')]=qs[_0x45d9('0x21')](_0x2f87bb[_0x45d9('0x32')][_0x45d9('0x21')]);}_0x116bfb['order']=qs['sort'](_0x2f87bb[_0x45d9('0x32')][_0x45d9('0x3c')]);_0x116bfb[_0x45d9('0x3d')]=qs[_0x45d9('0x33')](_[_0x45d9('0x3e')](_0x2f87bb[_0x45d9('0x32')],_0x46e308[_0x45d9('0x33')]),_0x5bd779);if(_0x2f87bb[_0x45d9('0x32')][_0x45d9('0x3f')]){_0x116bfb[_0x45d9('0x3d')]=_[_0x45d9('0x40')](_0x116bfb[_0x45d9('0x3d')],{'$or':_[_0x45d9('0x2e')](_0x5bd779,function(_0x527acf){if(_0x527acf[_0x45d9('0x41')]!==_0x45d9('0x42')){var _0x1ecc85={};_0x1ecc85[_0x527acf[_0x45d9('0x2b')]]={'$like':'%'+_0x2f87bb[_0x45d9('0x32')]['filter']+'%'};return _0x1ecc85;}})});}_0x116bfb=_[_0x45d9('0x40')]({},_0x116bfb,_0x2f87bb[_0x45d9('0x43')]);var _0x1f7f97={'where':_0x116bfb[_0x45d9('0x3d')]};return db[_0x45d9('0x2f')][_0x45d9('0x23')](_0x1f7f97)[_0x45d9('0x28')](function(_0x7d9d34){_0x4abdf2[_0x45d9('0x23')]=_0x7d9d34;if(_0x2f87bb[_0x45d9('0x32')]['includeAll']){_0x116bfb[_0x45d9('0x44')]=[{'all':!![]}];}return db[_0x45d9('0x2f')][_0x45d9('0x45')](_0x116bfb);})[_0x45d9('0x28')](function(_0x32239a){_0x4abdf2[_0x45d9('0x46')]=_0x32239a;return _0x4abdf2;})['then'](respondWithFilteredResult(_0x5abe80,_0x116bfb))[_0x45d9('0x47')](handleError(_0x5abe80,null));};exports['show']=function(_0x1aa4ba,_0x3cff71){var _0x5d989d={'raw':![],'where':{'id':_0x1aa4ba[_0x45d9('0x48')]['id']}},_0x17dbf2={};_0x17dbf2[_0x45d9('0x35')]=_[_0x45d9('0x49')](db[_0x45d9('0x2f')][_0x45d9('0x30')]);_0x17dbf2[_0x45d9('0x32')]=_['keys'](_0x1aa4ba['query']);_0x17dbf2[_0x45d9('0x33')]=_['intersection'](_0x17dbf2[_0x45d9('0x35')],_0x17dbf2['query']);_0x5d989d[_0x45d9('0x37')]=_[_0x45d9('0x34')](_0x17dbf2['model'],qs[_0x45d9('0x36')](_0x1aa4ba[_0x45d9('0x32')][_0x45d9('0x36')]));_0x5d989d[_0x45d9('0x37')]=_0x5d989d['attributes'][_0x45d9('0x38')]?_0x5d989d['attributes']:_0x17dbf2[_0x45d9('0x35')];if(_0x1aa4ba[_0x45d9('0x32')][_0x45d9('0x4a')]){_0x5d989d[_0x45d9('0x44')]=[{'all':!![]}];}_0x5d989d=_[_0x45d9('0x40')]({},_0x5d989d,_0x1aa4ba[_0x45d9('0x43')]);return db[_0x45d9('0x2f')]['find'](_0x5d989d)[_0x45d9('0x28')](handleEntityNotFound(_0x3cff71,null))[_0x45d9('0x28')](respondWithResult(_0x3cff71,null))[_0x45d9('0x47')](handleError(_0x3cff71,null));};exports[_0x45d9('0x4b')]=function(_0x5632b6,_0x23fc93){return db[_0x45d9('0x2f')][_0x45d9('0x4b')](_0x5632b6[_0x45d9('0x4c')],{})['then'](function(_0x5e86bc){var _0x5099b4=_0x5632b6[_0x45d9('0x4d')][_0x45d9('0x4e')]({'plain':!![]});if(!_0x5099b4)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x5099b4[_0x45d9('0x4f')]===_0x45d9('0x4d')){var _0x4f3959=_0x5e86bc[_0x45d9('0x4e')]({'plain':!![]});var _0x5359e1=_0x45d9('0x50');return db[_0x45d9('0x51')][_0x45d9('0x52')]({'where':{'name':_0x5359e1,'userProfileId':_0x5099b4[_0x45d9('0x53')]},'raw':!![]})[_0x45d9('0x28')](function(_0x59faeb){if(_0x59faeb&&_0x59faeb[_0x45d9('0x54')]===0x0){return db[_0x45d9('0x55')][_0x45d9('0x4b')]({'name':_0x4f3959[_0x45d9('0x2b')],'resourceId':_0x4f3959['id'],'type':_0x59faeb['name'],'sectionId':_0x59faeb['id']},{})[_0x45d9('0x28')](function(){return _0x5e86bc;});}else{return _0x5e86bc;}})[_0x45d9('0x47')](function(_0x182782){logger[_0x45d9('0x29')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x182782);throw _0x182782;});}return _0x5e86bc;})['then'](respondWithResult(_0x23fc93,0xc9))[_0x45d9('0x47')](handleError(_0x23fc93,null));};exports[_0x45d9('0x56')]=function(_0x44bd6d,_0x407eb7){if(_0x44bd6d[_0x45d9('0x4c')]['id']){delete _0x44bd6d[_0x45d9('0x4c')]['id'];}return db[_0x45d9('0x2f')][_0x45d9('0x52')]({'where':{'id':_0x44bd6d[_0x45d9('0x48')]['id']}})['then'](handleEntityNotFound(_0x407eb7,null))[_0x45d9('0x28')](saveUpdates(_0x44bd6d[_0x45d9('0x4c')],null))[_0x45d9('0x28')](respondWithResult(_0x407eb7,null))[_0x45d9('0x47')](handleError(_0x407eb7,null));};exports[_0x45d9('0x57')]=function(_0x266514,_0x1414bc){var _0x25e270=_0x266514[_0x45d9('0x48')]['id'];var _0x2a3365=[];return db['sequelize'][_0x45d9('0x58')](function(_0x434fa8){var _0x14babc=_0x45d9('0x59')+_0x25e270;return db[_0x45d9('0x5a')][_0x45d9('0x32')](_0x14babc,{'type':db[_0x45d9('0x5b')][_0x45d9('0x5c')][_0x45d9('0x5d')],'raw':!![],'transaction':_0x434fa8})[_0x45d9('0x28')](function(_0x3b1426){_0x2a3365=_[_0x45d9('0x2e')](_0x3b1426,function(_0x575c8a){return Number(_0x575c8a['UserId']);});})[_0x45d9('0x28')](function(){var _0x5a2b85=_0x45d9('0x5e')+_0x25e270;return db[_0x45d9('0x5a')][_0x45d9('0x32')](_0x5a2b85,{'type':db[_0x45d9('0x5b')]['QueryTypes'][_0x45d9('0x5d')],'raw':!![],'transaction':_0x434fa8});})[_0x45d9('0x28')](function(_0x8bf8a8){var _0x2f98be=_['map'](_0x8bf8a8,function(_0x2faf23){return Number(_0x2faf23[_0x45d9('0x5f')]);});return db[_0x45d9('0x60')][_0x45d9('0x57')]({'where':{'UserId':{'$in':_0x2a3365},'VoiceQueueId':{'$in':_0x2f98be}},'transaction':_0x434fa8});})['then'](function(){var _0x5b973c=_0x45d9('0x61')+_0x25e270;return db['sequelize'][_0x45d9('0x32')](_0x5b973c,{'type':db['Sequelize'][_0x45d9('0x5c')][_0x45d9('0x5d')],'raw':!![],'transaction':_0x434fa8});})[_0x45d9('0x28')](function(_0x5e7142){var _0x5a52d1=_[_0x45d9('0x2e')](_0x5e7142,function(_0x17d650){return Number(_0x17d650['MailQueueId']);});return db[_0x45d9('0x62')]['destroy']({'where':{'UserId':{'$in':_0x2a3365},'MailQueueId':{'$in':_0x5a52d1}},'transaction':_0x434fa8});})[_0x45d9('0x28')](function(){var _0x5bb91a=_0x45d9('0x63')+_0x25e270;return db[_0x45d9('0x5a')][_0x45d9('0x32')](_0x5bb91a,{'type':db[_0x45d9('0x5b')][_0x45d9('0x5c')][_0x45d9('0x5d')],'raw':!![],'transaction':_0x434fa8});})[_0x45d9('0x28')](function(_0x55e195){var _0x361162=_[_0x45d9('0x2e')](_0x55e195,function(_0x5c0b49){return Number(_0x5c0b49['SmsQueueId']);});return db[_0x45d9('0x64')][_0x45d9('0x57')]({'where':{'UserId':{'$in':_0x2a3365},'SmsQueueId':{'$in':_0x361162}},'transaction':_0x434fa8});})[_0x45d9('0x28')](function(){var _0x2737de=_0x45d9('0x65')+_0x25e270;return db['sequelize'][_0x45d9('0x32')](_0x2737de,{'type':db['Sequelize'][_0x45d9('0x5c')][_0x45d9('0x5d')],'raw':!![],'transaction':_0x434fa8});})['then'](function(_0x1d0237){var _0x206d35=_[_0x45d9('0x2e')](_0x1d0237,function(_0x5b1a96){return Number(_0x5b1a96['ChatQueueId']);});return db[_0x45d9('0x66')][_0x45d9('0x57')]({'where':{'UserId':{'$in':_0x2a3365},'ChatQueueId':{'$in':_0x206d35}},'transaction':_0x434fa8});})[_0x45d9('0x28')](function(){var _0x184fda=_0x45d9('0x67')+_0x25e270;return db['sequelize'][_0x45d9('0x32')](_0x184fda,{'type':db[_0x45d9('0x5b')][_0x45d9('0x5c')][_0x45d9('0x5d')],'raw':!![],'transaction':_0x434fa8});})[_0x45d9('0x28')](function(_0xe92275){var _0x3b97e0=_[_0x45d9('0x2e')](_0xe92275,function(_0xfbc7d5){return Number(_0xfbc7d5[_0x45d9('0x68')]);});return db[_0x45d9('0x69')][_0x45d9('0x57')]({'where':{'UserId':{'$in':_0x2a3365},'FaxQueueId':{'$in':_0x3b97e0}},'transaction':_0x434fa8});})[_0x45d9('0x28')](function(){var _0x968e8d=_0x45d9('0x6a')+_0x25e270;return db[_0x45d9('0x5a')][_0x45d9('0x32')](_0x968e8d,{'type':db[_0x45d9('0x5b')][_0x45d9('0x5c')][_0x45d9('0x5d')],'raw':!![],'transaction':_0x434fa8});})[_0x45d9('0x28')](function(_0xd79b5f){var _0xb420d1=_[_0x45d9('0x2e')](_0xd79b5f,function(_0x4411b3){return Number(_0x4411b3[_0x45d9('0x6b')]);});return db['UserOpenchannelQueue'][_0x45d9('0x57')]({'where':{'UserId':{'$in':_0x2a3365},'OpenchannelQueueId':{'$in':_0xb420d1}},'transaction':_0x434fa8});})[_0x45d9('0x28')](function(){var _0x5c567b=_0x45d9('0x6c')+_0x25e270;return db[_0x45d9('0x5a')][_0x45d9('0x32')](_0x5c567b,{'type':db[_0x45d9('0x5b')]['QueryTypes'][_0x45d9('0x5d')],'raw':!![],'transaction':_0x434fa8});})[_0x45d9('0x28')](function(_0x1c4abc){var _0x55dbf3=_[_0x45d9('0x2e')](_0x1c4abc,function(_0x316545){return Number(_0x316545[_0x45d9('0x6d')]);});return db[_0x45d9('0x6e')]['destroy']({'where':{'UserId':{'$in':_0x2a3365},'WhatsappQueueId':{'$in':_0x55dbf3}},'transaction':_0x434fa8});})[_0x45d9('0x28')](function(){return db[_0x45d9('0x6f')][_0x45d9('0x52')]({'where':{'TeamId':_0x25e270}});})[_0x45d9('0x28')](function(_0x30c4f4){if(_0x30c4f4===null){return;}return db[_0x45d9('0x70')][_0x45d9('0x57')]({'where':{'UserId':{'$in':_0x2a3365},'VoicePrefixId':_0x30c4f4['VoicePrefixId']},'transaction':_0x434fa8});})[_0x45d9('0x28')](function(){return db[_0x45d9('0x2f')][_0x45d9('0x57')]({'where':{'id':_0x25e270},'cascade':!![],'transaction':_0x434fa8});})[_0x45d9('0x28')](function(_0x375dad){if(_0x375dad===0x0){_0x1414bc['sendStatus'](0x194);}else{return db[_0x45d9('0x55')][_0x45d9('0x57')]({'where':{'type':'Teams','resourceId':_0x25e270},'cascade':!![],'transaction':_0x434fa8})[_0x45d9('0x28')](function(){_0x1414bc[_0x45d9('0x1e')](0xcc)['end']();});}})[_0x45d9('0x47')](function(_0x1aa660){_0x1414bc[_0x45d9('0x1e')](0x1f4)[_0x45d9('0x2c')](_0x1aa660);});});};exports[_0x45d9('0x71')]=function(_0x27e1b3,_0x267fbc,_0x2d2e6a){return db[_0x45d9('0x2f')][_0x45d9('0x72')]({'where':{'id':_0x27e1b3[_0x45d9('0x48')]['id']}})['then'](handleEntityNotFound(_0x267fbc,null))[_0x45d9('0x28')](function(_0xaf9288){if(!_0x27e1b3['query'][_0x45d9('0x73')]||!utils[_0x45d9('0x74')](_0x27e1b3[_0x45d9('0x32')]['channel'])){throw new db[(_0x45d9('0x5b'))][(_0x45d9('0x75'))](_0x45d9('0x76'));}var _0x423b11={};var _0x3bb758={};_0x3bb758[_0x45d9('0x35')]=_['keys'](db[_[_0x45d9('0x77')](_0x27e1b3[_0x45d9('0x32')]['channel'][_0x45d9('0x78')]())+_0x45d9('0x79')][_0x45d9('0x30')]);_0x3bb758[_0x45d9('0x32')]=_[_0x45d9('0x49')](_0x27e1b3[_0x45d9('0x32')]);_0x3bb758['filters']=_[_0x45d9('0x34')](_0x3bb758[_0x45d9('0x35')],_0x3bb758[_0x45d9('0x32')]);_0x423b11[_0x45d9('0x37')]=_[_0x45d9('0x34')](_0x3bb758[_0x45d9('0x35')],qs[_0x45d9('0x36')](_0x27e1b3[_0x45d9('0x32')][_0x45d9('0x36')]));_0x423b11[_0x45d9('0x37')]=_0x423b11['attributes'][_0x45d9('0x38')]?_0x423b11[_0x45d9('0x37')]:_0x3bb758[_0x45d9('0x35')];_0x423b11['limit']=qs[_0x45d9('0x3b')](_0x27e1b3[_0x45d9('0x32')]['limit']);_0x423b11[_0x45d9('0x21')]=qs[_0x45d9('0x21')](_0x27e1b3[_0x45d9('0x32')][_0x45d9('0x21')]);_0x423b11['order']=qs[_0x45d9('0x3c')](_0x27e1b3[_0x45d9('0x32')][_0x45d9('0x3c')]);_0x423b11['where']=qs['filters'](_[_0x45d9('0x3e')](_0x27e1b3['query'],_0x3bb758[_0x45d9('0x33')]));_0x423b11=_[_0x45d9('0x40')]({},_0x423b11,_0x27e1b3[_0x45d9('0x43')]);return _0xaf9288['get'+_['capitalize'](_0x27e1b3['query'][_0x45d9('0x73')][_0x45d9('0x78')]())+'Queues'](_0x423b11);})[_0x45d9('0x28')](respondWithResult(_0x267fbc,null))[_0x45d9('0x47')](handleError(_0x267fbc,null));};exports[_0x45d9('0x7a')]=function(_0x251dfe,_0x4e9b20,_0x53bce7){return db[_0x45d9('0x2f')]['findOne']({'where':{'id':_0x251dfe[_0x45d9('0x48')]['id']}})[_0x45d9('0x28')](function(_0x43e801){if(_0x43e801){if(!_0x251dfe[_0x45d9('0x4c')][_0x45d9('0x73')]||!utils['isValidChannel'](_0x251dfe[_0x45d9('0x4c')]['channel'])){throw new db[(_0x45d9('0x5b'))][(_0x45d9('0x75'))]('Unknown\x20channel');}return _0x43e801['add'+_['capitalize'](_0x251dfe[_0x45d9('0x4c')][_0x45d9('0x73')][_0x45d9('0x78')]())+_0x45d9('0x7b')](_0x251dfe[_0x45d9('0x4c')][_0x45d9('0x7c')]);}return null;})[_0x45d9('0x28')](handleEntityNotFound(_0x4e9b20,null))['then'](respondWithStatusCode(_0x4e9b20,null))[_0x45d9('0x47')](handleError(_0x4e9b20,null));};exports[_0x45d9('0x7d')]=function(_0x5ed3b1,_0x4933e4,_0x2001ae){return db['Team']['findOne']({'where':{'id':_0x5ed3b1[_0x45d9('0x48')]['id']}})[_0x45d9('0x28')](function(_0x4d2da6){if(_0x4d2da6){if(!_0x5ed3b1['query'][_0x45d9('0x73')]||!utils[_0x45d9('0x74')](_0x5ed3b1[_0x45d9('0x32')]['channel'])){throw new db[(_0x45d9('0x5b'))][(_0x45d9('0x75'))](_0x45d9('0x76'));}return _0x4d2da6['remove'+_[_0x45d9('0x77')](_0x5ed3b1[_0x45d9('0x32')][_0x45d9('0x73')]['toLowerCase']())+_0x45d9('0x7b')](_0x5ed3b1[_0x45d9('0x32')]['ids']);}return null;})['then'](handleEntityNotFound(_0x4933e4,null))[_0x45d9('0x28')](respondWithStatusCode(_0x4933e4,null))[_0x45d9('0x47')](handleError(_0x4933e4,null));};exports[_0x45d9('0x7e')]=function(_0x56502b,_0x16d377){var _0x1e0656=_[_0x45d9('0x7f')](_0x56502b[_0x45d9('0x4c')]['ids'])?_0x56502b[_0x45d9('0x4c')][_0x45d9('0x7c')]:[_0x56502b[_0x45d9('0x4c')][_0x45d9('0x7c')]];var _0x5946ad=_0x56502b[_0x45d9('0x48')]['id'];return db[_0x45d9('0x2f')][_0x45d9('0x52')]({'where':{'id':_0x5946ad}})[_0x45d9('0x28')](handleEntityNotFound(_0x16d377,null))[_0x45d9('0x28')](function(_0x29a32a){if(_0x29a32a){var _0x55cb39=[_0x45d9('0x80'),_0x45d9('0x81'),_0x45d9('0x82'),_0x45d9('0x83'),_0x45d9('0x84'),'Openchannel',_0x45d9('0x85')];return db[_0x45d9('0x5a')]['transaction'](function(_0x59c2cc){var _0x4903a7=_[_0x45d9('0x2e')](_0x55cb39,function(_0x3b10d2){var _0x120bec={'attributes':['id',_0x45d9('0x2b')]};if(_0x3b10d2===_0x45d9('0x80')){_0x120bec[_0x45d9('0x86')]={'attributes':[_0x45d9('0x87')]};}return _0x29a32a[_0x45d9('0x4e')+_0x3b10d2+'Queues'](_0x120bec)[_0x45d9('0x28')](function(_0x4134de){var _0x1d31d0=_[_0x45d9('0x2e')](_0x4134de,function(_0xcf12ad){var _0x213651=_[_0x45d9('0x2e')](_0x1e0656,function(_0x28b925){var _0x6ecdc1={'where':{'UserId':_0x28b925,[_0x3b10d2+_0x45d9('0x88')]:_0xcf12ad['id']},'transaction':_0x59c2cc};if(_0x3b10d2===_0x45d9('0x80')){_0x6ecdc1[_0x45d9('0x18')]={'penalty':_0xcf12ad[_0x45d9('0x89')][_0x45d9('0x87')]};}return db[_0x45d9('0x8a')+_0x3b10d2+_0x45d9('0x79')][_0x45d9('0x8b')](_0x6ecdc1)['then'](function(){socket[_0x45d9('0x8c')](_0x45d9('0x4d')+_0x3b10d2+'Queue:save',{'UserId':_0x28b925,[_0x3b10d2+'QueueId']:_0xcf12ad['id']});if(_0x3b10d2!==_0x45d9('0x80')){return;}return db['User']['findAll']({'where':{'id':_0x1e0656,'online':0x1},'attributes':['id',_0x45d9('0x2b'),'online',_0x45d9('0x8d'),_0x45d9('0x8e')],'raw':!![]})['then'](function(_0xaa9528){var _0x37ec09=_[_0x45d9('0x2e')](_0xaa9528,function(_0x113ab0){return db[_0x45d9('0x8f')][_0x45d9('0x90')]({'membername':_0x113ab0['name'],'UserId':_0x113ab0['id'],'queue_name':_0xcf12ad[_0x45d9('0x2b')],'VoiceQueueId':_0xcf12ad['id'],'interface':_[_0x45d9('0x91')](_0x113ab0[_0x45d9('0x8e')])?util[_0x45d9('0x92')](_0x45d9('0x93'),_0x113ab0[_0x45d9('0x2b')]):_0x113ab0['interface'],'paused':_0x113ab0['voicePause']||![],'penalty':_0xcf12ad['TeamVoiceQueue'][_0x45d9('0x87')]},{'transaction':_0x59c2cc});});return Promise['all'](_0x37ec09);});});});return Promise[_0x45d9('0x94')](_0x213651);});return Promise[_0x45d9('0x94')](_0x1d31d0);})[_0x45d9('0x28')](function(){return db[_0x45d9('0x6f')][_0x45d9('0x72')]({'where':{'teamId':_0x5946ad}})[_0x45d9('0x28')](function(_0x4f6f44){if(_0x4f6f44){var _0x66383b=_[_0x45d9('0x2e')](_0x1e0656,function(_0x17db65){db['UserVoicePrefix'][_0x45d9('0x90')]({'UserId':_0x17db65,'VoicePrefixId':_0x4f6f44['VoicePrefixId']});});return Promise[_0x45d9('0x94')](_0x66383b);}});});});return Promise[_0x45d9('0x94')](_0x4903a7)['then'](function(){return _0x29a32a['addAgents'](_0x1e0656,{'transaction':_0x59c2cc})[_0x45d9('0x95')](function(_0x402821){return _0x402821;});});});}})[_0x45d9('0x28')](respondWithResult(_0x16d377,null))[_0x45d9('0x47')](handleError(_0x16d377,null));};exports[_0x45d9('0x96')]=function(_0x1e638a,_0x59959b){var _0x516eca=_[_0x45d9('0x7f')](_0x1e638a[_0x45d9('0x32')][_0x45d9('0x7c')])?_0x1e638a[_0x45d9('0x32')][_0x45d9('0x7c')]:[_0x1e638a[_0x45d9('0x32')]['ids']];var _0x406af9=_0x1e638a[_0x45d9('0x48')]['id'];return db['Team'][_0x45d9('0x52')]({'where':{'id':_0x406af9}})[_0x45d9('0x28')](handleEntityNotFound(_0x59959b,null))['then'](function(_0x12e675){if(_0x12e675){var _0x53510d=[_0x45d9('0x80'),_0x45d9('0x81'),_0x45d9('0x82'),_0x45d9('0x83'),_0x45d9('0x84'),_0x45d9('0x97'),_0x45d9('0x85')];return db[_0x45d9('0x5a')]['transaction'](function(_0xcec81d){var _0x53327c=_['map'](_0x53510d,function(_0x5605e9){var _0x4f8bba={'attributes':['id',_0x45d9('0x2b')]};return _0x12e675[_0x45d9('0x4e')+_0x5605e9+_0x45d9('0x7b')](_0x4f8bba)[_0x45d9('0x28')](function(_0x17f6e8){var _0x3f2ac1=_['map'](_0x17f6e8,function(_0x31c08b){return _0x31c08b[_0x45d9('0x96')](_0x516eca,{'transaction':_0xcec81d})[_0x45d9('0x28')](function(){var _0x1affa9=_[_0x45d9('0x2e')](_0x516eca,function(_0x242a2e){socket[_0x45d9('0x8c')](_0x45d9('0x4d')+_0x5605e9+_0x45d9('0x98'),{'UserId':Number(_0x242a2e),[_0x5605e9+_0x45d9('0x88')]:_0x31c08b['id']});if(_0x5605e9!==_0x45d9('0x80')){return;}return db[_0x45d9('0x8f')][_0x45d9('0x57')]({'where':{'VoiceQueueId':_0x31c08b['id'],'UserId':_0x242a2e},'transaction':_0xcec81d});});return Promise[_0x45d9('0x94')](_0x1affa9);});});return Promise[_0x45d9('0x94')](_0x3f2ac1);});});return Promise['all'](_0x53327c)[_0x45d9('0x28')](function(){return _0x12e675[_0x45d9('0x96')](_0x516eca,{'transaction':_0xcec81d});})[_0x45d9('0x28')](function(){return db['TeamVoicePrefix'][_0x45d9('0x72')]({'where':{'teamId':_0x406af9}})['then'](function(_0x218cc3){if(_0x218cc3){var _0x485060=_[_0x45d9('0x2e')](_0x516eca,function(_0x1aeaa4){db['UserVoicePrefix'][_0x45d9('0x57')]({'where':{'UserId':_0x1aeaa4,'VoicePrefixId':_0x218cc3[_0x45d9('0x99')]}});});return Promise[_0x45d9('0x94')](_0x485060);}});});});}})[_0x45d9('0x28')](respondWithStatusCode(_0x59959b,null))[_0x45d9('0x47')](handleError(_0x59959b,null));};exports[_0x45d9('0x9a')]=function(_0x4bf12e,_0x5c0308,_0x5d0592){var _0x58b570={};var _0x1b5982={};var _0x2b0b98;var _0x41be24;return db[_0x45d9('0x2f')]['findOne']({'where':{'id':_0x4bf12e[_0x45d9('0x48')]['id']}})[_0x45d9('0x28')](handleEntityNotFound(_0x5c0308,null))['then'](function(_0x10f649){if(_0x10f649){_0x2b0b98=_0x10f649;_0x1b5982[_0x45d9('0x35')]=_[_0x45d9('0x49')](db[_0x45d9('0x8a')]['rawAttributes']);_0x1b5982['query']=_[_0x45d9('0x49')](_0x4bf12e[_0x45d9('0x32')]);_0x1b5982[_0x45d9('0x33')]=_['intersection'](_0x1b5982[_0x45d9('0x35')],_0x1b5982['query']);_0x58b570[_0x45d9('0x37')]=_['intersection'](_0x1b5982[_0x45d9('0x35')],qs['fields'](_0x4bf12e[_0x45d9('0x32')][_0x45d9('0x36')]));_0x58b570['attributes']=_0x58b570['attributes'][_0x45d9('0x38')]?_0x58b570[_0x45d9('0x37')]:_0x1b5982[_0x45d9('0x35')];_0x58b570['order']=qs[_0x45d9('0x3c')](_0x4bf12e['query']['sort']);_0x58b570[_0x45d9('0x3d')]=qs[_0x45d9('0x33')](_[_0x45d9('0x3e')](_0x4bf12e['query'],_0x1b5982[_0x45d9('0x33')]));if(_0x4bf12e[_0x45d9('0x32')]['filter']){_0x58b570[_0x45d9('0x3d')]=_[_0x45d9('0x40')](_0x58b570['where'],{'$or':_[_0x45d9('0x2e')](_0x58b570[_0x45d9('0x37')],function(_0x39b269){var _0x2a716f={};_0x2a716f[_0x39b269]={'$like':'%'+_0x4bf12e[_0x45d9('0x32')][_0x45d9('0x3f')]+'%'};return _0x2a716f;})});}_0x58b570=_[_0x45d9('0x40')]({},_0x58b570,_0x4bf12e[_0x45d9('0x43')]);return _0x2b0b98[_0x45d9('0x9a')](_0x58b570);}})['then'](function(_0x185607){if(_0x185607){_0x41be24=_0x185607['length'];if(!_0x4bf12e['query'][_0x45d9('0x39')](_0x45d9('0x3a'))){_0x58b570[_0x45d9('0x3b')]=qs[_0x45d9('0x3b')](_0x4bf12e['query'][_0x45d9('0x3b')]);_0x58b570[_0x45d9('0x21')]=qs[_0x45d9('0x21')](_0x4bf12e[_0x45d9('0x32')]['offset']);}return _0x2b0b98['getAgents'](_0x58b570);}})[_0x45d9('0x28')](function(_0x30197c){if(_0x30197c){return _0x30197c?{'count':_0x41be24,'rows':_0x30197c}:null;}})['then'](respondWithResult(_0x5c0308,null))[_0x45d9('0x47')](handleError(_0x5c0308,null));};
\ No newline at end of file
index 42f060a..193c159 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xef56=['Team','save','update','remove','emit','hasOwnProperty','hook','exports','events'];(function(_0x3e2c74,_0x10bf0a){var _0xf59c04=function(_0x56d190){while(--_0x56d190){_0x3e2c74['push'](_0x3e2c74['shift']());}};_0xf59c04(++_0x10bf0a);}(_0xef56,0x7d));var _0x6ef5=function(_0x382c73,_0x199cab){_0x382c73=_0x382c73-0x0;var _0x1dd0bf=_0xef56[_0x382c73];return _0x1dd0bf;};'use strict';var EventEmitter=require(_0x6ef5('0x0'));var Team=require('../../mysqldb')['db'][_0x6ef5('0x1')];var TeamEvents=new EventEmitter();TeamEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x6ef5('0x2'),'afterUpdate':_0x6ef5('0x3'),'afterDestroy':_0x6ef5('0x4')};function emitEvent(_0xd14c18){return function(_0x1fa673,_0x17893d,_0x402c67){TeamEvents[_0x6ef5('0x5')](_0xd14c18+':'+_0x1fa673['id'],_0x1fa673);TeamEvents[_0x6ef5('0x5')](_0xd14c18,_0x1fa673);_0x402c67(null);};}for(var e in events){if(events[_0x6ef5('0x6')](e)){var event=events[e];Team[_0x6ef5('0x7')](e,emitEvent(event));}}module[_0x6ef5('0x8')]=TeamEvents;
\ No newline at end of file
+var _0xfcc8=['setMaxListeners','save','update','emit','hasOwnProperty','hook','exports','Team'];(function(_0x74aa68,_0x3fd8d2){var _0x544e43=function(_0x13e141){while(--_0x13e141){_0x74aa68['push'](_0x74aa68['shift']());}};_0x544e43(++_0x3fd8d2);}(_0xfcc8,0x16f));var _0x8fcc=function(_0x88fd6a,_0x5a2152){_0x88fd6a=_0x88fd6a-0x0;var _0x1f423a=_0xfcc8[_0x88fd6a];return _0x1f423a;};'use strict';var EventEmitter=require('events');var Team=require('../../mysqldb')['db'][_0x8fcc('0x0')];var TeamEvents=new EventEmitter();TeamEvents[_0x8fcc('0x1')](0x0);var events={'afterCreate':_0x8fcc('0x2'),'afterUpdate':_0x8fcc('0x3'),'afterDestroy':'remove'};function emitEvent(_0x14adb0){return function(_0x306501,_0x377a94,_0x543912){TeamEvents[_0x8fcc('0x4')](_0x14adb0+':'+_0x306501['id'],_0x306501);TeamEvents[_0x8fcc('0x4')](_0x14adb0,_0x306501);_0x543912(null);};}for(var e in events){if(events[_0x8fcc('0x5')](e)){var event=events[e];Team[_0x8fcc('0x6')](e,emitEvent(event));}}module[_0x8fcc('0x7')]=TeamEvents;
\ No newline at end of file
index f7c1ff5..4f2e938 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd83c=['all','./team.attributes','Queues','then','map','setDataValue','channel','catch','exports','define','teams','Chat','Fax','Openchannel','Whatsapp','resolve'];(function(_0x1ac6ec,_0x1f81fc){var _0x48a489=function(_0xf38b04){while(--_0xf38b04){_0x1ac6ec['push'](_0x1ac6ec['shift']());}};_0x48a489(++_0x1f81fc);}(_0xd83c,0x101));var _0xcd83=function(_0x2d9c6a,_0x59393d){_0x2d9c6a=_0x2d9c6a-0x0;var _0xf3c918=_0xd83c[_0x2d9c6a];return _0xf3c918;};'use strict';var _=require('lodash');var attributes=require(_0xcd83('0x0'));function getQueuesByChannel(_0x167848,_0x124fc1){var _0x2fd3f1='get'+_0x124fc1+_0xcd83('0x1');return _0x167848[_0x2fd3f1]()[_0xcd83('0x2')](function(_0x4cd344){return _[_0xcd83('0x3')](_0x4cd344,function(_0x4cfcd6){_0x4cfcd6[_0xcd83('0x4')](_0xcd83('0x5'),_0x124fc1);return _0x4cfcd6;});})[_0xcd83('0x6')](function(_0x319b93){throw _0x319b93;});}module[_0xcd83('0x7')]=function(_0x48a065){return _0x48a065[_0xcd83('0x8')]('Team',attributes,{'tableName':_0xcd83('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getAssociatedQueues':function(){var _0x17ee39=this;var _0x2c569a=[_0xcd83('0xa'),_0xcd83('0xb'),'Mail',_0xcd83('0xc'),'Sms','Voice',_0xcd83('0xd')];return Promise[_0xcd83('0xe')]()[_0xcd83('0x2')](function(){var _0x493c84=_[_0xcd83('0x3')](_0x2c569a,function(_0x1e72d7){return getQueuesByChannel(_0x17ee39,_0x1e72d7);});return Promise[_0xcd83('0xf')](_0x493c84);})[_0xcd83('0x6')](function(_0x217d45){throw _0x217d45;});}}});};
\ No newline at end of file
+var _0x30bb=['Voice','Whatsapp','resolve','then','all','catch','lodash','get','Queues','map','channel','exports','define','teams','Mail','Openchannel','Sms'];(function(_0x415836,_0x5b8aad){var _0x4363f5=function(_0xeed357){while(--_0xeed357){_0x415836['push'](_0x415836['shift']());}};_0x4363f5(++_0x5b8aad);}(_0x30bb,0x18d));var _0xb30b=function(_0x90a741,_0x20a0f2){_0x90a741=_0x90a741-0x0;var _0xfab5b8=_0x30bb[_0x90a741];return _0xfab5b8;};'use strict';var _=require(_0xb30b('0x0'));var attributes=require('./team.attributes');function getQueuesByChannel(_0xcd01b4,_0x738d99){var _0x303d19=_0xb30b('0x1')+_0x738d99+_0xb30b('0x2');return _0xcd01b4[_0x303d19]()['then'](function(_0x4212db){return _[_0xb30b('0x3')](_0x4212db,function(_0x52a093){_0x52a093['setDataValue'](_0xb30b('0x4'),_0x738d99);return _0x52a093;});})['catch'](function(_0xc3e071){throw _0xc3e071;});}module[_0xb30b('0x5')]=function(_0x3fbb3f){return _0x3fbb3f[_0xb30b('0x6')]('Team',attributes,{'tableName':_0xb30b('0x7'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getAssociatedQueues':function(){var _0x574c06=this;var _0x20cb5e=['Chat','Fax',_0xb30b('0x8'),_0xb30b('0x9'),_0xb30b('0xa'),_0xb30b('0xb'),_0xb30b('0xc')];return Promise[_0xb30b('0xd')]()[_0xb30b('0xe')](function(){var _0x46eb6c=_[_0xb30b('0x3')](_0x20cb5e,function(_0x59f8b5){return getQueuesByChannel(_0x574c06,_0x59f8b5);});return Promise[_0xb30b('0xf')](_0x46eb6c);})[_0xb30b('0x10')](function(_0x50a18a){throw _0x50a18a;});}}});};
\ No newline at end of file
index 3f38e39..7c9796e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x39cc=['request\x20sent','debug','Team,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','redis','localhost','socket.io-emitter','./team.socket','register','request','then','info','Team,\x20%s,\x20%s'];(function(_0x708c47,_0x6eaa1f){var _0x52a470=function(_0x14a750){while(--_0x14a750){_0x708c47['push'](_0x708c47['shift']());}};_0x52a470(++_0x6eaa1f);}(_0x39cc,0x104));var _0xc39c=function(_0x88be7b,_0x2403af){_0x88be7b=_0x88be7b-0x0;var _0x100b31=_0x39cc[_0x88be7b];return _0x100b31;};'use strict';var _=require(_0xc39c('0x0'));var util=require(_0xc39c('0x1'));var moment=require(_0xc39c('0x2'));var BPromise=require('bluebird');var rs=require(_0xc39c('0x3'));var fs=require('fs');var Redis=require(_0xc39c('0x4'));var db=require(_0xc39c('0x5'))['db'];var utils=require(_0xc39c('0x6'));var logger=require('../../config/logger')(_0xc39c('0x7'));var config=require(_0xc39c('0x8'));var jayson=require(_0xc39c('0x9'));var client=jayson[_0xc39c('0xa')]['http']({'port':0x232a});config['redis']=_['defaults'](config[_0xc39c('0xb')],{'host':_0xc39c('0xc'),'port':0x18eb});var socket=require(_0xc39c('0xd'))(new Redis(config[_0xc39c('0xb')]));require(_0xc39c('0xe'))[_0xc39c('0xf')](socket);function respondWithRpcPromise(_0x568295,_0x5aa8c2,_0x3b6021){return new BPromise(function(_0x2923be,_0x1b8892){return client[_0xc39c('0x10')](_0x568295,_0x3b6021)[_0xc39c('0x11')](function(_0x4e2839){logger[_0xc39c('0x12')](_0xc39c('0x13'),_0x5aa8c2,_0xc39c('0x14'));logger[_0xc39c('0x15')](_0xc39c('0x16'),_0x5aa8c2,_0xc39c('0x14'),JSON[_0xc39c('0x17')](_0x4e2839));if(_0x4e2839[_0xc39c('0x18')]){if(_0x4e2839['error']['code']===0x1f4){logger[_0xc39c('0x18')](_0xc39c('0x13'),_0x5aa8c2,_0x4e2839[_0xc39c('0x18')]['message']);return _0x1b8892(_0x4e2839[_0xc39c('0x18')][_0xc39c('0x19')]);}logger['error'](_0xc39c('0x13'),_0x5aa8c2,_0x4e2839[_0xc39c('0x18')][_0xc39c('0x19')]);return _0x2923be(_0x4e2839[_0xc39c('0x18')][_0xc39c('0x19')]);}else{logger['info'](_0xc39c('0x13'),_0x5aa8c2,'request\x20sent');_0x2923be(_0x4e2839[_0xc39c('0x1a')][_0xc39c('0x19')]);}})[_0xc39c('0x1b')](function(_0x30a7c4){logger[_0xc39c('0x18')](_0xc39c('0x13'),_0x5aa8c2,_0x30a7c4);_0x1b8892(_0x30a7c4);});});}
\ No newline at end of file
+var _0xd344=['randomstring','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','redis','localhost','socket.io-emitter','register','then','info','Team,\x20%s,\x20%s','request\x20sent','Team,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','lodash','moment'];(function(_0x46361e,_0x243aaf){var _0x14e302=function(_0x9ebecf){while(--_0x9ebecf){_0x46361e['push'](_0x46361e['shift']());}};_0x14e302(++_0x243aaf);}(_0xd344,0x16e));var _0x4d34=function(_0xa2ad66,_0x50aea6){_0xa2ad66=_0xa2ad66-0x0;var _0x2c6ec2=_0xd344[_0xa2ad66];return _0x2c6ec2;};'use strict';var _=require(_0x4d34('0x0'));var util=require('util');var moment=require(_0x4d34('0x1'));var BPromise=require('bluebird');var rs=require(_0x4d34('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4d34('0x3'))['db'];var utils=require(_0x4d34('0x4'));var logger=require('../../config/logger')(_0x4d34('0x5'));var config=require('../../config/environment');var jayson=require(_0x4d34('0x6'));var client=jayson[_0x4d34('0x7')][_0x4d34('0x8')]({'port':0x232a});config[_0x4d34('0x9')]=_['defaults'](config['redis'],{'host':_0x4d34('0xa'),'port':0x18eb});var socket=require(_0x4d34('0xb'))(new Redis(config[_0x4d34('0x9')]));require('./team.socket')[_0x4d34('0xc')](socket);function respondWithRpcPromise(_0x496fc5,_0x247eaf,_0x9d538d){return new BPromise(function(_0x1ceca2,_0x217335){return client['request'](_0x496fc5,_0x9d538d)[_0x4d34('0xd')](function(_0x48d23f){logger[_0x4d34('0xe')](_0x4d34('0xf'),_0x247eaf,_0x4d34('0x10'));logger['debug'](_0x4d34('0x11'),_0x247eaf,_0x4d34('0x10'),JSON[_0x4d34('0x12')](_0x48d23f));if(_0x48d23f['error']){if(_0x48d23f['error'][_0x4d34('0x13')]===0x1f4){logger[_0x4d34('0x14')]('Team,\x20%s,\x20%s',_0x247eaf,_0x48d23f[_0x4d34('0x14')][_0x4d34('0x15')]);return _0x217335(_0x48d23f[_0x4d34('0x14')][_0x4d34('0x15')]);}logger[_0x4d34('0x14')](_0x4d34('0xf'),_0x247eaf,_0x48d23f[_0x4d34('0x14')]['message']);return _0x1ceca2(_0x48d23f[_0x4d34('0x14')]['message']);}else{logger['info'](_0x4d34('0xf'),_0x247eaf,_0x4d34('0x10'));_0x1ceca2(_0x48d23f[_0x4d34('0x16')][_0x4d34('0x15')]);}})['catch'](function(_0x2f6872){logger[_0x4d34('0x14')](_0x4d34('0xf'),_0x247eaf,_0x2f6872);_0x217335(_0x2f6872);});});}
\ No newline at end of file
index 3907f1d..0f674d0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdbfc=['removeListener','length','team:','./team.events','save','emit'];(function(_0x5b6187,_0x5dc1ba){var _0x4ca690=function(_0x2882c7){while(--_0x2882c7){_0x5b6187['push'](_0x5b6187['shift']());}};_0x4ca690(++_0x5dc1ba);}(_0xdbfc,0x11d));var _0xcdbf=function(_0x381cb0,_0x957076){_0x381cb0=_0x381cb0-0x0;var _0x44562f=_0xdbfc[_0x381cb0];return _0x44562f;};'use strict';var TeamEvents=require(_0xcdbf('0x0'));var events=[_0xcdbf('0x1'),'remove','update'];function createListener(_0x364647,_0x3067d8){return function(_0x3db24f){_0x3067d8[_0xcdbf('0x2')](_0x364647,_0x3db24f);};}function removeListener(_0x26c4cf,_0x1c2ce4){return function(){TeamEvents[_0xcdbf('0x3')](_0x26c4cf,_0x1c2ce4);};}exports['register']=function(_0x3ffa10){for(var _0x4129cf=0x0,_0x54aeaf=events[_0xcdbf('0x4')];_0x4129cf<_0x54aeaf;_0x4129cf++){var _0x3c077d=events[_0x4129cf];var _0x409a4e=createListener(_0xcdbf('0x5')+_0x3c077d,_0x3ffa10);TeamEvents['on'](_0x3c077d,_0x409a4e);}};
\ No newline at end of file
+var _0xbfca=['length','team:','./team.events','save','remove','update','emit','removeListener'];(function(_0x3fcc20,_0x57c31b){var _0x15d3ce=function(_0x575619){while(--_0x575619){_0x3fcc20['push'](_0x3fcc20['shift']());}};_0x15d3ce(++_0x57c31b);}(_0xbfca,0x112));var _0xabfc=function(_0x417463,_0x312d8a){_0x417463=_0x417463-0x0;var _0x221e9f=_0xbfca[_0x417463];return _0x221e9f;};'use strict';var TeamEvents=require(_0xabfc('0x0'));var events=[_0xabfc('0x1'),_0xabfc('0x2'),_0xabfc('0x3')];function createListener(_0xc1d7c9,_0x52d3a1){return function(_0x256acf){_0x52d3a1[_0xabfc('0x4')](_0xc1d7c9,_0x256acf);};}function removeListener(_0x3a18d8,_0x4bceb0){return function(){TeamEvents[_0xabfc('0x5')](_0x3a18d8,_0x4bceb0);};}exports['register']=function(_0x6a772a){for(var _0x28777d=0x0,_0x16abc7=events[_0xabfc('0x6')];_0x28777d<_0x16abc7;_0x28777d++){var _0x531e51=events[_0x28777d];var _0x254b5e=createListener(_0xabfc('0x7')+_0x531e51,_0x6a772a);TeamEvents['on'](_0x531e51,_0x254b5e);}};
\ No newline at end of file
index 021ef5e..07a33c6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa25d=['exports','INTEGER','sequelize'];(function(_0x2714ec,_0x36daa4){var _0x2608e5=function(_0x408468){while(--_0x408468){_0x2714ec['push'](_0x2714ec['shift']());}};_0x2608e5(++_0x36daa4);}(_0xa25d,0x194));var _0xda25=function(_0x1af469,_0x584d95){_0x1af469=_0x1af469-0x0;var _0x336171=_0xa25d[_0x1af469];return _0x336171;};'use strict';var Sequelize=require(_0xda25('0x0'));module[_0xda25('0x1')]={'TeamId':{'type':Sequelize[_0xda25('0x2')]},'VoicePrefixId':{'type':Sequelize[_0xda25('0x2')]}};
\ No newline at end of file
+var _0xe3c8=['INTEGER','sequelize','exports'];(function(_0x504df1,_0x289598){var _0x1063b5=function(_0x627abd){while(--_0x627abd){_0x504df1['push'](_0x504df1['shift']());}};_0x1063b5(++_0x289598);}(_0xe3c8,0x145));var _0x8e3c=function(_0x574cf4,_0x5988d4){_0x574cf4=_0x574cf4-0x0;var _0x493f92=_0xe3c8[_0x574cf4];return _0x493f92;};'use strict';var Sequelize=require(_0x8e3c('0x0'));module[_0x8e3c('0x1')]={'TeamId':{'type':Sequelize[_0x8e3c('0x2')]},'VoicePrefixId':{'type':Sequelize[_0x8e3c('0x2')]}};
\ No newline at end of file
index 5d060c4..897be9d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xddb8=['path','rimraf','../../config/environment','./teamVoicePrefix.attributes','define','util','../../config/logger','api','bluebird','request-promise'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0xddb8,0xd7));var _0x8ddb=function(_0x48aa43,_0x3d8bce){_0x48aa43=_0x48aa43-0x0;var _0x2a90da=_0xddb8[_0x48aa43];return _0x2a90da;};'use strict';var _=require('lodash');var util=require(_0x8ddb('0x0'));var logger=require(_0x8ddb('0x1'))(_0x8ddb('0x2'));var moment=require('moment');var BPromise=require(_0x8ddb('0x3'));var rp=require(_0x8ddb('0x4'));var fs=require('fs');var path=require(_0x8ddb('0x5'));var rimraf=require(_0x8ddb('0x6'));var config=require(_0x8ddb('0x7'));var attributes=require(_0x8ddb('0x8'));module['exports']=function(_0x5a52ec,_0x2ebc4b){return _0x5a52ec[_0x8ddb('0x9')]('TeamVoicePrefix',attributes,{'tableName':'team_has_voice_prefixes','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6cb4=['bluebird','request-promise','path','rimraf','./teamVoicePrefix.attributes','define','TeamVoicePrefix','team_has_voice_prefixes','lodash','util','../../config/logger','api','moment'];(function(_0x26fc9e,_0x59073b){var _0x589ddc=function(_0x278875){while(--_0x278875){_0x26fc9e['push'](_0x26fc9e['shift']());}};_0x589ddc(++_0x59073b);}(_0x6cb4,0xff));var _0x46cb=function(_0x56bb86,_0x51d8c8){_0x56bb86=_0x56bb86-0x0;var _0x1a42e9=_0x6cb4[_0x56bb86];return _0x1a42e9;};'use strict';var _=require(_0x46cb('0x0'));var util=require(_0x46cb('0x1'));var logger=require(_0x46cb('0x2'))(_0x46cb('0x3'));var moment=require(_0x46cb('0x4'));var BPromise=require(_0x46cb('0x5'));var rp=require(_0x46cb('0x6'));var fs=require('fs');var path=require(_0x46cb('0x7'));var rimraf=require(_0x46cb('0x8'));var config=require('../../config/environment');var attributes=require(_0x46cb('0x9'));module['exports']=function(_0x3d9d3c,_0x4d9f1d){return _0x3d9d3c[_0x46cb('0xa')](_0x46cb('0xb'),attributes,{'tableName':_0x46cb('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 5cf5add..0f022c0 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(_0x3bf146,_0x3c40e1){var _0x2c3d2b=function(_0x46cd5d){while(--_0x46cd5d){_0x3bf146['push'](_0x3bf146['shift']());}};_0x2c3d2b(++_0x3c40e1);}(_0xe706,0xa3));var _0x6e70=function(_0x388899,_0x17f370){_0x388899=_0x388899-0x0;var _0x3be17d=_0xe706[_0x388899];return _0x3be17d;};'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 _0x9c44=['express','Router','fs-extra','../../components/auth/service','exports','path','connect-timeout'];(function(_0x87e0dc,_0x577dce){var _0x2cd2d1=function(_0x2d8173){while(--_0x2d8173){_0x87e0dc['push'](_0x87e0dc['shift']());}};_0x2cd2d1(++_0x577dce);}(_0x9c44,0x178));var _0x49c4=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0x9c44[_0x167cc1];return _0x10bc4b;};'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 5af5e0f..ec8e31d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9dd1=['exports','INTEGER'];(function(_0x22abf5,_0x311567){var _0x38ef30=function(_0x595c11){while(--_0x595c11){_0x22abf5['push'](_0x22abf5['shift']());}};_0x38ef30(++_0x311567);}(_0x9dd1,0x160));var _0x19dd=function(_0x43a6cd,_0x503d1a){_0x43a6cd=_0x43a6cd-0x0;var _0x5acb36=_0x9dd1[_0x43a6cd];return _0x5acb36;};'use strict';var Sequelize=require('sequelize');module[_0x19dd('0x0')]={'penalty':{'type':Sequelize[_0x19dd('0x1')],'defaultValue':0x0}};
\ No newline at end of file
+var _0xa48b=['INTEGER','sequelize','exports'];(function(_0x7c2d21,_0x31bb23){var _0x20501f=function(_0x3e3d3e){while(--_0x3e3d3e){_0x7c2d21['push'](_0x7c2d21['shift']());}};_0x20501f(++_0x31bb23);}(_0xa48b,0xc4));var _0xba48=function(_0x22df9c,_0x3924c7){_0x22df9c=_0x22df9c-0x0;var _0x40e0f1=_0xa48b[_0x22df9c];return _0x40e0f1;};'use strict';var Sequelize=require(_0xba48('0x0'));module[_0xba48('0x1')]={'penalty':{'type':Sequelize[_0xba48('0x2')],'defaultValue':0x0}};
\ No newline at end of file
index 6a9726f..3406249 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc298=['api','moment','bluebird','request-promise','rimraf','../../config/environment','./teamVoiceQueue.attributes','exports','define','TeamVoiceQueue','team_has_voice_queues','util','../../config/logger'];(function(_0x6c0123,_0x4c8d3b){var _0x5a87d2=function(_0x1ff614){while(--_0x1ff614){_0x6c0123['push'](_0x6c0123['shift']());}};_0x5a87d2(++_0x4c8d3b);}(_0xc298,0x143));var _0x8c29=function(_0x53ae30,_0x194de8){_0x53ae30=_0x53ae30-0x0;var _0x3de7cd=_0xc298[_0x53ae30];return _0x3de7cd;};'use strict';var _=require('lodash');var util=require(_0x8c29('0x0'));var logger=require(_0x8c29('0x1'))(_0x8c29('0x2'));var moment=require(_0x8c29('0x3'));var BPromise=require(_0x8c29('0x4'));var rp=require(_0x8c29('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x8c29('0x6'));var config=require(_0x8c29('0x7'));var attributes=require(_0x8c29('0x8'));module[_0x8c29('0x9')]=function(_0x6cac5d,_0x50a81c){return _0x6cac5d[_0x8c29('0xa')](_0x8c29('0xb'),attributes,{'tableName':_0x8c29('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x342b=['api','moment','../../config/environment','./teamVoiceQueue.attributes','exports','define','TeamVoiceQueue','team_has_voice_queues','lodash','../../config/logger'];(function(_0x256011,_0x28bb88){var _0xcb704f=function(_0x31feb3){while(--_0x31feb3){_0x256011['push'](_0x256011['shift']());}};_0xcb704f(++_0x28bb88);}(_0x342b,0xbc));var _0xb342=function(_0x13a850,_0x888642){_0x13a850=_0x13a850-0x0;var _0x1d7abe=_0x342b[_0x13a850];return _0x1d7abe;};'use strict';var _=require(_0xb342('0x0'));var util=require('util');var logger=require(_0xb342('0x1'))(_0xb342('0x2'));var moment=require(_0xb342('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(_0xb342('0x4'));var attributes=require(_0xb342('0x5'));module[_0xb342('0x6')]=function(_0x28bca8,_0x25ecba){return _0x28bca8[_0xb342('0x7')](_0xb342('0x8'),attributes,{'tableName':_0xb342('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 2de81fa..d46d5e4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8ebf=['TeamVoiceQueue,\x20%s,\x20%s','request\x20sent','TeamVoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','then','info'];(function(_0x4c2384,_0x3e0fca){var _0x4696b6=function(_0x38cd89){while(--_0x38cd89){_0x4c2384['push'](_0x4c2384['shift']());}};_0x4696b6(++_0x3e0fca);}(_0x8ebf,0x15c));var _0xf8eb=function(_0x2f9467,_0x40576f){_0x2f9467=_0x2f9467-0x0;var _0x39894c=_0x8ebf[_0x2f9467];return _0x39894c;};'use strict';var _=require(_0xf8eb('0x0'));var util=require(_0xf8eb('0x1'));var moment=require(_0xf8eb('0x2'));var BPromise=require('bluebird');var rs=require(_0xf8eb('0x3'));var fs=require('fs');var Redis=require(_0xf8eb('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xf8eb('0x5'));var logger=require(_0xf8eb('0x6'))(_0xf8eb('0x7'));var config=require('../../config/environment');var jayson=require(_0xf8eb('0x8'));var client=jayson[_0xf8eb('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x30c91c,_0x2c2489,_0x2a1fb6){return new BPromise(function(_0x4c628d,_0x959b95){return client['request'](_0x30c91c,_0x2a1fb6)[_0xf8eb('0xa')](function(_0x4d1adc){logger[_0xf8eb('0xb')](_0xf8eb('0xc'),_0x2c2489,_0xf8eb('0xd'));logger['debug'](_0xf8eb('0xe'),_0x2c2489,_0xf8eb('0xd'),JSON[_0xf8eb('0xf')](_0x4d1adc));if(_0x4d1adc[_0xf8eb('0x10')]){if(_0x4d1adc[_0xf8eb('0x10')][_0xf8eb('0x11')]===0x1f4){logger[_0xf8eb('0x10')](_0xf8eb('0xc'),_0x2c2489,_0x4d1adc['error'][_0xf8eb('0x12')]);return _0x959b95(_0x4d1adc[_0xf8eb('0x10')][_0xf8eb('0x12')]);}logger[_0xf8eb('0x10')]('TeamVoiceQueue,\x20%s,\x20%s',_0x2c2489,_0x4d1adc['error']['message']);return _0x4c628d(_0x4d1adc['error'][_0xf8eb('0x12')]);}else{logger[_0xf8eb('0xb')]('TeamVoiceQueue,\x20%s,\x20%s',_0x2c2489,_0xf8eb('0xd'));_0x4c628d(_0x4d1adc[_0xf8eb('0x13')][_0xf8eb('0x12')]);}})['catch'](function(_0x18dbbd){logger[_0xf8eb('0x10')](_0xf8eb('0xc'),_0x2c2489,_0x18dbbd);_0x959b95(_0x18dbbd);});});}
\ No newline at end of file
+var _0xc577=['http','request','info','TeamVoiceQueue,\x20%s,\x20%s','request\x20sent','TeamVoiceQueue,\x20%s,\x20%s,\x20%s','error','code','message','catch','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client'];(function(_0x3cf208,_0x425724){var _0x3a323a=function(_0x2d1c75){while(--_0x2d1c75){_0x3cf208['push'](_0x3cf208['shift']());}};_0x3a323a(++_0x425724);}(_0xc577,0x172));var _0x7c57=function(_0x4d9443,_0xe0d01f){_0x4d9443=_0x4d9443-0x0;var _0x350586=_0xc577[_0x4d9443];return _0x350586;};'use strict';var _=require(_0x7c57('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x7c57('0x1'));var rs=require(_0x7c57('0x2'));var fs=require('fs');var Redis=require(_0x7c57('0x3'));var db=require(_0x7c57('0x4'))['db'];var utils=require(_0x7c57('0x5'));var logger=require(_0x7c57('0x6'))(_0x7c57('0x7'));var config=require('../../config/environment');var jayson=require(_0x7c57('0x8'));var client=jayson[_0x7c57('0x9')][_0x7c57('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2bc454,_0x2f2c8f,_0x4bb81b){return new BPromise(function(_0x4e5cb2,_0x5c7ffb){return client[_0x7c57('0xb')](_0x2bc454,_0x4bb81b)['then'](function(_0x3ea732){logger[_0x7c57('0xc')](_0x7c57('0xd'),_0x2f2c8f,_0x7c57('0xe'));logger['debug'](_0x7c57('0xf'),_0x2f2c8f,_0x7c57('0xe'),JSON['stringify'](_0x3ea732));if(_0x3ea732[_0x7c57('0x10')]){if(_0x3ea732[_0x7c57('0x10')][_0x7c57('0x11')]===0x1f4){logger[_0x7c57('0x10')](_0x7c57('0xd'),_0x2f2c8f,_0x3ea732[_0x7c57('0x10')][_0x7c57('0x12')]);return _0x5c7ffb(_0x3ea732['error']['message']);}logger['error'](_0x7c57('0xd'),_0x2f2c8f,_0x3ea732[_0x7c57('0x10')][_0x7c57('0x12')]);return _0x4e5cb2(_0x3ea732[_0x7c57('0x10')][_0x7c57('0x12')]);}else{logger[_0x7c57('0xc')](_0x7c57('0xd'),_0x2f2c8f,_0x7c57('0xe'));_0x4e5cb2(_0x3ea732['result']['message']);}})[_0x7c57('0x13')](function(_0x2975f0){logger[_0x7c57('0x10')](_0x7c57('0xd'),_0x2f2c8f,_0x2975f0);_0x5c7ffb(_0x2975f0);});});}
\ No newline at end of file
index 273b9ba..7c89891 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc274=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/:id','post','create','put','isAuthenticated','update','destroy','exports','util','express','Router'];(function(_0x353275,_0x36b419){var _0x3097c3=function(_0x49e645){while(--_0x49e645){_0x353275['push'](_0x353275['shift']());}};_0x3097c3(++_0x36b419);}(_0xc274,0x151));var _0x4c27=function(_0x2dd88b,_0x4078f5){_0x2dd88b=_0x2dd88b-0x0;var _0x5eed67=_0xc274[_0x2dd88b];return _0x5eed67;};'use strict';var multer=require('multer');var util=require(_0x4c27('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x4c27('0x1'));var router=express[_0x4c27('0x2')]();var fs_extra=require(_0x4c27('0x3'));var auth=require(_0x4c27('0x4'));var interaction=require(_0x4c27('0x5'));var config=require(_0x4c27('0x6'));var controller=require('./template.controller');router[_0x4c27('0x7')]('/',auth['isAuthenticated'](),controller[_0x4c27('0x8')]);router[_0x4c27('0x7')](_0x4c27('0x9'),auth['isAuthenticated'](),controller['show']);router[_0x4c27('0xa')]('/',auth['isAuthenticated'](),controller[_0x4c27('0xb')]);router[_0x4c27('0xc')](_0x4c27('0x9'),auth[_0x4c27('0xd')](),controller[_0x4c27('0xe')]);router['delete'](_0x4c27('0x9'),auth[_0x4c27('0xd')](),controller[_0x4c27('0xf')]);module[_0x4c27('0x10')]=router;
\ No newline at end of file
+var _0x431b=['express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./template.controller','isAuthenticated','get','show','create','put','/:id','update','delete','destroy','exports','multer','util','path'];(function(_0x2d2c16,_0x4e88b6){var _0x53f2fb=function(_0x6b6dac){while(--_0x6b6dac){_0x2d2c16['push'](_0x2d2c16['shift']());}};_0x53f2fb(++_0x4e88b6);}(_0x431b,0x18d));var _0xb431=function(_0x1b925b,_0x1ab3c9){_0x1b925b=_0x1b925b-0x0;var _0x275f07=_0x431b[_0x1b925b];return _0x275f07;};'use strict';var multer=require(_0xb431('0x0'));var util=require(_0xb431('0x1'));var path=require(_0xb431('0x2'));var timeout=require('connect-timeout');var express=require(_0xb431('0x3'));var router=express[_0xb431('0x4')]();var fs_extra=require(_0xb431('0x5'));var auth=require(_0xb431('0x6'));var interaction=require(_0xb431('0x7'));var config=require(_0xb431('0x8'));var controller=require(_0xb431('0x9'));router['get']('/',auth[_0xb431('0xa')](),controller['index']);router[_0xb431('0xb')]('/:id',auth['isAuthenticated'](),controller[_0xb431('0xc')]);router['post']('/',auth['isAuthenticated'](),controller[_0xb431('0xd')]);router[_0xb431('0xe')](_0xb431('0xf'),auth[_0xb431('0xa')](),controller[_0xb431('0x10')]);router[_0xb431('0x11')](_0xb431('0xf'),auth['isAuthenticated'](),controller[_0xb431('0x12')]);module[_0xb431('0x13')]=router;
\ No newline at end of file
index 049fa95..0daccbb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfce6=['TEXT','sequelize'];(function(_0x29b93d,_0x1a6632){var _0x848e7e=function(_0x55b674){while(--_0x55b674){_0x29b93d['push'](_0x29b93d['shift']());}};_0x848e7e(++_0x1a6632);}(_0xfce6,0xc7));var _0x6fce=function(_0x361098,_0x56950f){_0x361098=_0x361098-0x0;var _0x5f56f9=_0xfce6[_0x361098];return _0x5f56f9;};'use strict';var Sequelize=require(_0x6fce('0x0'));module['exports']={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize['STRING']},'html':{'type':Sequelize[_0x6fce('0x1')]}};
\ No newline at end of file
+var _0xc74f=['STRING','TEXT','sequelize'];(function(_0x55bf66,_0x4b36e0){var _0x73cf10=function(_0x2d0d3c){while(--_0x2d0d3c){_0x55bf66['push'](_0x55bf66['shift']());}};_0x73cf10(++_0x4b36e0);}(_0xc74f,0xf8));var _0xfc74=function(_0x22bb0c,_0x34403f){_0x22bb0c=_0x22bb0c-0x0;var _0x594588=_0xc74f[_0x22bb0c];return _0x594588;};'use strict';var Sequelize=require(_0xfc74('0x0'));module['exports']={'name':{'type':Sequelize[_0xfc74('0x1')]},'description':{'type':Sequelize['STRING']},'html':{'type':Sequelize[_0xfc74('0x2')]}};
\ No newline at end of file
index 7cf32e8..460bcb4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x88f1=['includeAll','findAll','rows','keys','find','catch','create','body','user','UserProfileSection','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../config/logger','../../config/utils','../../mysqldb','sendStatus','status','json','offset','undefined','count','limit','set','apply','reject','destroy','then','Templates','UserProfileResource','end','name','send','index','map','Template','fieldName','type','key','model','query','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','options'];(function(_0x25b4a4,_0x2e081b){var _0x707267=function(_0x440123){while(--_0x440123){_0x25b4a4['push'](_0x25b4a4['shift']());}};_0x707267(++_0x2e081b);}(_0x88f1,0xa2));var _0x188f=function(_0x257875,_0x5b01ec){_0x257875=_0x257875-0x0;var _0x13a4cd=_0x88f1[_0x257875];return _0x13a4cd;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x188f('0x0'));var zipdir=require(_0x188f('0x1'));var jsonpatch=require(_0x188f('0x2'));var rp=require(_0x188f('0x3'));var moment=require(_0x188f('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x188f('0x5'));var util=require(_0x188f('0x6'));var path=require(_0x188f('0x7'));var sox=require('sox');var csv=require(_0x188f('0x8'));var ejs=require(_0x188f('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x188f('0xa'));var squel=require(_0x188f('0xb'));var crypto=require(_0x188f('0xc'));var jsforce=require(_0x188f('0xd'));var deskjs=require(_0x188f('0xe'));var toCsv=require('to-csv');var querystring=require(_0x188f('0xf'));var Papa=require('papaparse');var Redis=require(_0x188f('0x10'));var authService=require(_0x188f('0x11'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x188f('0x12'))('api');var utils=require(_0x188f('0x13'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x188f('0x14'))['db'];function respondWithStatusCode(_0x309f4b,_0x350566){_0x350566=_0x350566||0xcc;return function(_0x2e5675){if(_0x2e5675){return _0x309f4b[_0x188f('0x15')](_0x350566);}return _0x309f4b[_0x188f('0x16')](_0x350566)['end']();};}function respondWithResult(_0xa0f47d,_0x43e4fa){_0x43e4fa=_0x43e4fa||0xc8;return function(_0x6f0061){if(_0x6f0061){return _0xa0f47d['status'](_0x43e4fa)[_0x188f('0x17')](_0x6f0061);}};}function respondWithFilteredResult(_0x5cdad4,_0x13160e){return function(_0x33524c){if(_0x33524c){var _0x2cb9f8=typeof _0x13160e[_0x188f('0x18')]===_0x188f('0x19')&&typeof _0x13160e['limit']===_0x188f('0x19');var _0x5c38ff=_0x33524c['count'];var _0x1ec586=_0x2cb9f8?0x0:_0x13160e[_0x188f('0x18')];var _0x8dc5ce=_0x2cb9f8?_0x33524c[_0x188f('0x1a')]:_0x13160e[_0x188f('0x18')]+_0x13160e[_0x188f('0x1b')];var _0x8a19f0;if(_0x8dc5ce>=_0x5c38ff){_0x8dc5ce=_0x5c38ff;_0x8a19f0=0xc8;}else{_0x8a19f0=0xce;}_0x5cdad4[_0x188f('0x16')](_0x8a19f0);return _0x5cdad4[_0x188f('0x1c')]('Content-Range',_0x1ec586+'-'+_0x8dc5ce+'/'+_0x5c38ff)[_0x188f('0x17')](_0x33524c);}return null;};}function patchUpdates(_0x40c2be){return function(_0x3fb0d5){try{jsonpatch[_0x188f('0x1d')](_0x3fb0d5,_0x40c2be,!![]);}catch(_0x4f9c3e){return BPromise[_0x188f('0x1e')](_0x4f9c3e);}return _0x3fb0d5['save']();};}function saveUpdates(_0x32e79d,_0xd3bb6b){return function(_0x575780){if(_0x575780){return _0x575780['update'](_0x32e79d)['then'](function(_0x54bc0e){return _0x54bc0e;});}return null;};}function removeEntity(_0x19c4c6,_0x1a9079){return function(_0x4ec8ca){if(_0x4ec8ca){return _0x4ec8ca[_0x188f('0x1f')]()[_0x188f('0x20')](function(){var _0x1194ad=_0x4ec8ca['get']({'plain':!![]});var _0x6c5db2=_0x188f('0x21');return db[_0x188f('0x22')][_0x188f('0x1f')]({'where':{'type':_0x6c5db2,'resourceId':_0x1194ad['id']}})[_0x188f('0x20')](function(){return _0x4ec8ca;});})[_0x188f('0x20')](function(){_0x19c4c6['status'](0xcc)[_0x188f('0x23')]();});}};}function handleEntityNotFound(_0x3be13d,_0x41c7b7){return function(_0x2e70d4){if(!_0x2e70d4){_0x3be13d['sendStatus'](0x194);}return _0x2e70d4;};}function handleError(_0x24b16e,_0x3a7ec6){_0x3a7ec6=_0x3a7ec6||0x1f4;return function(_0x2d2d41){logger['error'](_0x2d2d41['stack']);if(_0x2d2d41['name']){delete _0x2d2d41[_0x188f('0x24')];}_0x24b16e['status'](_0x3a7ec6)[_0x188f('0x25')](_0x2d2d41);};}exports[_0x188f('0x26')]=function(_0x4b7e87,_0x3cb006){var _0x1ee70e={},_0x3de3c3={},_0x2b7ff8={'count':0x0,'rows':[]};var _0x2c689a=_[_0x188f('0x27')](db[_0x188f('0x28')]['rawAttributes'],function(_0x13d8d1){return{'name':_0x13d8d1[_0x188f('0x29')],'type':_0x13d8d1[_0x188f('0x2a')][_0x188f('0x2b')]};});_0x3de3c3[_0x188f('0x2c')]=_[_0x188f('0x27')](_0x2c689a,_0x188f('0x24'));_0x3de3c3[_0x188f('0x2d')]=_['keys'](_0x4b7e87[_0x188f('0x2d')]);_0x3de3c3[_0x188f('0x2e')]=_[_0x188f('0x2f')](_0x3de3c3[_0x188f('0x2c')],_0x3de3c3[_0x188f('0x2d')]);_0x1ee70e['attributes']=_[_0x188f('0x2f')](_0x3de3c3[_0x188f('0x2c')],qs[_0x188f('0x30')](_0x4b7e87['query'][_0x188f('0x30')]));_0x1ee70e[_0x188f('0x31')]=_0x1ee70e[_0x188f('0x31')]['length']?_0x1ee70e[_0x188f('0x31')]:_0x3de3c3[_0x188f('0x2c')];if(!_0x4b7e87[_0x188f('0x2d')][_0x188f('0x32')](_0x188f('0x33'))){_0x1ee70e[_0x188f('0x1b')]=qs[_0x188f('0x1b')](_0x4b7e87[_0x188f('0x2d')]['limit']);_0x1ee70e['offset']=qs['offset'](_0x4b7e87['query'][_0x188f('0x18')]);}_0x1ee70e[_0x188f('0x34')]=qs[_0x188f('0x35')](_0x4b7e87['query'][_0x188f('0x35')]);_0x1ee70e[_0x188f('0x36')]=qs[_0x188f('0x2e')](_[_0x188f('0x37')](_0x4b7e87[_0x188f('0x2d')],_0x3de3c3[_0x188f('0x2e')]),_0x2c689a);if(_0x4b7e87[_0x188f('0x2d')][_0x188f('0x38')]){_0x1ee70e[_0x188f('0x36')]=_['merge'](_0x1ee70e[_0x188f('0x36')],{'$or':_['map'](_0x2c689a,function(_0x571674){if(_0x571674['type']!==_0x188f('0x39')){var _0x1a8aee={};_0x1a8aee[_0x571674[_0x188f('0x24')]]={'$like':'%'+_0x4b7e87[_0x188f('0x2d')][_0x188f('0x38')]+'%'};return _0x1a8aee;}})});}_0x1ee70e=_[_0x188f('0x3a')]({},_0x1ee70e,_0x4b7e87[_0x188f('0x3b')]);var _0x4cf5de={'where':_0x1ee70e['where']};return db[_0x188f('0x28')][_0x188f('0x1a')](_0x4cf5de)['then'](function(_0x582344){_0x2b7ff8[_0x188f('0x1a')]=_0x582344;if(_0x4b7e87[_0x188f('0x2d')][_0x188f('0x3c')]){_0x1ee70e['include']=[{'all':!![]}];}return db[_0x188f('0x28')][_0x188f('0x3d')](_0x1ee70e);})[_0x188f('0x20')](function(_0xaf3f75){_0x2b7ff8[_0x188f('0x3e')]=_0xaf3f75;return _0x2b7ff8;})[_0x188f('0x20')](respondWithFilteredResult(_0x3cb006,_0x1ee70e))['catch'](handleError(_0x3cb006,null));};exports['show']=function(_0x210661,_0x79e40){var _0x46f3ab={'raw':!![],'where':{'id':_0x210661['params']['id']}},_0x27f11f={};_0x27f11f[_0x188f('0x2c')]=_[_0x188f('0x3f')](db[_0x188f('0x28')]['rawAttributes']);_0x27f11f[_0x188f('0x2d')]=_[_0x188f('0x3f')](_0x210661['query']);_0x27f11f[_0x188f('0x2e')]=_[_0x188f('0x2f')](_0x27f11f[_0x188f('0x2c')],_0x27f11f[_0x188f('0x2d')]);_0x46f3ab[_0x188f('0x31')]=_[_0x188f('0x2f')](_0x27f11f['model'],qs[_0x188f('0x30')](_0x210661[_0x188f('0x2d')][_0x188f('0x30')]));_0x46f3ab[_0x188f('0x31')]=_0x46f3ab['attributes']['length']?_0x46f3ab['attributes']:_0x27f11f[_0x188f('0x2c')];if(_0x210661[_0x188f('0x2d')][_0x188f('0x3c')]){_0x46f3ab['include']=[{'all':!![]}];}_0x46f3ab=_[_0x188f('0x3a')]({},_0x46f3ab,_0x210661[_0x188f('0x3b')]);return db[_0x188f('0x28')][_0x188f('0x40')](_0x46f3ab)[_0x188f('0x20')](handleEntityNotFound(_0x79e40,null))['then'](respondWithResult(_0x79e40,null))[_0x188f('0x41')](handleError(_0x79e40,null));};exports[_0x188f('0x42')]=function(_0x55a314,_0x55bb04){return db[_0x188f('0x28')][_0x188f('0x42')](_0x55a314[_0x188f('0x43')],{})[_0x188f('0x20')](function(_0x26f757){var _0x5e944a=_0x55a314[_0x188f('0x44')]['get']({'plain':!![]});if(!_0x5e944a)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x5e944a['role']===_0x188f('0x44')){var _0x584143=_0x26f757['get']({'plain':!![]});var _0x1e43d6=_0x188f('0x21');return db[_0x188f('0x45')]['find']({'where':{'name':_0x1e43d6,'userProfileId':_0x5e944a['userProfileId']},'raw':!![]})[_0x188f('0x20')](function(_0x220214){if(_0x220214&&_0x220214[_0x188f('0x46')]===0x0){return db[_0x188f('0x22')][_0x188f('0x42')]({'name':_0x584143[_0x188f('0x24')],'resourceId':_0x584143['id'],'type':_0x220214[_0x188f('0x24')],'sectionId':_0x220214['id']},{})[_0x188f('0x20')](function(){return _0x26f757;});}else{return _0x26f757;}})['catch'](function(_0x2fa119){logger[_0x188f('0x47')](_0x188f('0x48'),_0x2fa119);throw _0x2fa119;});}return _0x26f757;})[_0x188f('0x20')](respondWithResult(_0x55bb04,0xc9))[_0x188f('0x41')](handleError(_0x55bb04,null));};exports['update']=function(_0x1eb2fe,_0x1e7a2b){if(_0x1eb2fe['body']['id']){delete _0x1eb2fe[_0x188f('0x43')]['id'];}return db[_0x188f('0x28')][_0x188f('0x40')]({'where':{'id':_0x1eb2fe[_0x188f('0x49')]['id']}})['then'](handleEntityNotFound(_0x1e7a2b,null))[_0x188f('0x20')](saveUpdates(_0x1eb2fe['body'],null))[_0x188f('0x20')](respondWithResult(_0x1e7a2b,null))[_0x188f('0x41')](handleError(_0x1e7a2b,null));};exports[_0x188f('0x1f')]=function(_0x58ab26,_0xd7d2d7){return db['Template']['find']({'where':{'id':_0x58ab26[_0x188f('0x49')]['id']}})[_0x188f('0x20')](handleEntityNotFound(_0xd7d2d7,null))[_0x188f('0x20')](removeEntity(_0xd7d2d7,null))[_0x188f('0x41')](handleError(_0xd7d2d7,null));};
\ No newline at end of file
+var _0x7077=['set','Content-Range','json','apply','reject','save','update','then','destroy','get','UserProfileResource','error','name','index','map','Template','rawAttributes','fieldName','type','query','keys','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','includeAll','include','findAll','rows','catch','show','length','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Templates','UserProfileSection','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','count','limit'];(function(_0x2dadb9,_0x42cfe6){var _0x2f0097=function(_0x21163f){while(--_0x21163f){_0x2dadb9['push'](_0x2dadb9['shift']());}};_0x2f0097(++_0x42cfe6);}(_0x7077,0x8b));var _0x7707=function(_0x59900a,_0x510eb7){_0x59900a=_0x59900a-0x0;var _0x3e9a2d=_0x7077[_0x59900a];return _0x3e9a2d;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x7707('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x7707('0x1'));var rp=require('request-promise');var moment=require(_0x7707('0x2'));var BPromise=require(_0x7707('0x3'));var Mustache=require(_0x7707('0x4'));var util=require(_0x7707('0x5'));var path=require(_0x7707('0x6'));var sox=require(_0x7707('0x7'));var csv=require(_0x7707('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x7707('0x9'));var _=require(_0x7707('0xa'));var squel=require(_0x7707('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x7707('0xc'));var toCsv=require(_0x7707('0x8'));var querystring=require(_0x7707('0xd'));var Papa=require(_0x7707('0xe'));var Redis=require(_0x7707('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x7707('0x10'));var as=require(_0x7707('0x11'));var hardwareService=require(_0x7707('0x12'));var logger=require(_0x7707('0x13'))(_0x7707('0x14'));var utils=require('../../config/utils');var config=require(_0x7707('0x15'));var licenseUtil=require(_0x7707('0x16'));var db=require(_0x7707('0x17'))['db'];function respondWithStatusCode(_0x56f212,_0x3bd915){_0x3bd915=_0x3bd915||0xcc;return function(_0x5dc637){if(_0x5dc637){return _0x56f212[_0x7707('0x18')](_0x3bd915);}return _0x56f212[_0x7707('0x19')](_0x3bd915)[_0x7707('0x1a')]();};}function respondWithResult(_0x22a5b6,_0x1b83fe){_0x1b83fe=_0x1b83fe||0xc8;return function(_0x1e5d48){if(_0x1e5d48){return _0x22a5b6[_0x7707('0x19')](_0x1b83fe)['json'](_0x1e5d48);}};}function respondWithFilteredResult(_0x280ba8,_0x5ab249){return function(_0x2dc65a){if(_0x2dc65a){var _0x5a7927=typeof _0x5ab249[_0x7707('0x1b')]==='undefined'&&typeof _0x5ab249['limit']===_0x7707('0x1c');var _0x2c4fff=_0x2dc65a[_0x7707('0x1d')];var _0xeb780d=_0x5a7927?0x0:_0x5ab249[_0x7707('0x1b')];var _0x2b2dd3=_0x5a7927?_0x2dc65a['count']:_0x5ab249[_0x7707('0x1b')]+_0x5ab249[_0x7707('0x1e')];var _0xbea262;if(_0x2b2dd3>=_0x2c4fff){_0x2b2dd3=_0x2c4fff;_0xbea262=0xc8;}else{_0xbea262=0xce;}_0x280ba8['status'](_0xbea262);return _0x280ba8[_0x7707('0x1f')](_0x7707('0x20'),_0xeb780d+'-'+_0x2b2dd3+'/'+_0x2c4fff)[_0x7707('0x21')](_0x2dc65a);}return null;};}function patchUpdates(_0x42ee28){return function(_0x9f1e30){try{jsonpatch[_0x7707('0x22')](_0x9f1e30,_0x42ee28,!![]);}catch(_0x5bf8ea){return BPromise[_0x7707('0x23')](_0x5bf8ea);}return _0x9f1e30[_0x7707('0x24')]();};}function saveUpdates(_0x99189c,_0x378a3c){return function(_0x3d61be){if(_0x3d61be){return _0x3d61be[_0x7707('0x25')](_0x99189c)[_0x7707('0x26')](function(_0x1e15a1){return _0x1e15a1;});}return null;};}function removeEntity(_0x1c3a8c,_0x3969ed){return function(_0x597fc0){if(_0x597fc0){return _0x597fc0[_0x7707('0x27')]()['then'](function(){var _0x32697f=_0x597fc0[_0x7707('0x28')]({'plain':!![]});var _0x502359='Templates';return db[_0x7707('0x29')][_0x7707('0x27')]({'where':{'type':_0x502359,'resourceId':_0x32697f['id']}})[_0x7707('0x26')](function(){return _0x597fc0;});})[_0x7707('0x26')](function(){_0x1c3a8c['status'](0xcc)[_0x7707('0x1a')]();});}};}function handleEntityNotFound(_0x22a11e,_0x185547){return function(_0xfa0839){if(!_0xfa0839){_0x22a11e[_0x7707('0x18')](0x194);}return _0xfa0839;};}function handleError(_0x2d9789,_0x1cc905){_0x1cc905=_0x1cc905||0x1f4;return function(_0x4adef7){logger[_0x7707('0x2a')](_0x4adef7['stack']);if(_0x4adef7[_0x7707('0x2b')]){delete _0x4adef7['name'];}_0x2d9789[_0x7707('0x19')](_0x1cc905)['send'](_0x4adef7);};}exports[_0x7707('0x2c')]=function(_0x9bfbb1,_0x47dc65){var _0x16b975={},_0x19bb21={},_0x47e766={'count':0x0,'rows':[]};var _0x4224ac=_[_0x7707('0x2d')](db[_0x7707('0x2e')][_0x7707('0x2f')],function(_0x582e09){return{'name':_0x582e09[_0x7707('0x30')],'type':_0x582e09[_0x7707('0x31')]['key']};});_0x19bb21['model']=_[_0x7707('0x2d')](_0x4224ac,'name');_0x19bb21[_0x7707('0x32')]=_[_0x7707('0x33')](_0x9bfbb1[_0x7707('0x32')]);_0x19bb21[_0x7707('0x34')]=_[_0x7707('0x35')](_0x19bb21[_0x7707('0x36')],_0x19bb21[_0x7707('0x32')]);_0x16b975[_0x7707('0x37')]=_['intersection'](_0x19bb21['model'],qs['fields'](_0x9bfbb1[_0x7707('0x32')][_0x7707('0x38')]));_0x16b975['attributes']=_0x16b975['attributes']['length']?_0x16b975[_0x7707('0x37')]:_0x19bb21[_0x7707('0x36')];if(!_0x9bfbb1[_0x7707('0x32')][_0x7707('0x39')](_0x7707('0x3a'))){_0x16b975[_0x7707('0x1e')]=qs[_0x7707('0x1e')](_0x9bfbb1[_0x7707('0x32')][_0x7707('0x1e')]);_0x16b975[_0x7707('0x1b')]=qs[_0x7707('0x1b')](_0x9bfbb1[_0x7707('0x32')][_0x7707('0x1b')]);}_0x16b975[_0x7707('0x3b')]=qs['sort'](_0x9bfbb1[_0x7707('0x32')][_0x7707('0x3c')]);_0x16b975[_0x7707('0x3d')]=qs['filters'](_[_0x7707('0x3e')](_0x9bfbb1[_0x7707('0x32')],_0x19bb21['filters']),_0x4224ac);if(_0x9bfbb1[_0x7707('0x32')][_0x7707('0x3f')]){_0x16b975['where']=_[_0x7707('0x40')](_0x16b975[_0x7707('0x3d')],{'$or':_[_0x7707('0x2d')](_0x4224ac,function(_0x29839b){if(_0x29839b['type']!==_0x7707('0x41')){var _0x37ec70={};_0x37ec70[_0x29839b[_0x7707('0x2b')]]={'$like':'%'+_0x9bfbb1['query']['filter']+'%'};return _0x37ec70;}})});}_0x16b975=_['merge']({},_0x16b975,_0x9bfbb1['options']);var _0x5db582={'where':_0x16b975[_0x7707('0x3d')]};return db['Template'][_0x7707('0x1d')](_0x5db582)[_0x7707('0x26')](function(_0x184f88){_0x47e766[_0x7707('0x1d')]=_0x184f88;if(_0x9bfbb1['query'][_0x7707('0x42')]){_0x16b975[_0x7707('0x43')]=[{'all':!![]}];}return db[_0x7707('0x2e')][_0x7707('0x44')](_0x16b975);})[_0x7707('0x26')](function(_0x1ab90a){_0x47e766[_0x7707('0x45')]=_0x1ab90a;return _0x47e766;})[_0x7707('0x26')](respondWithFilteredResult(_0x47dc65,_0x16b975))[_0x7707('0x46')](handleError(_0x47dc65,null));};exports[_0x7707('0x47')]=function(_0x1c3a80,_0x370f5f){var _0x2e2bdd={'raw':!![],'where':{'id':_0x1c3a80['params']['id']}},_0x428dd3={};_0x428dd3['model']=_['keys'](db[_0x7707('0x2e')][_0x7707('0x2f')]);_0x428dd3[_0x7707('0x32')]=_[_0x7707('0x33')](_0x1c3a80[_0x7707('0x32')]);_0x428dd3[_0x7707('0x34')]=_['intersection'](_0x428dd3[_0x7707('0x36')],_0x428dd3['query']);_0x2e2bdd[_0x7707('0x37')]=_[_0x7707('0x35')](_0x428dd3[_0x7707('0x36')],qs[_0x7707('0x38')](_0x1c3a80[_0x7707('0x32')]['fields']));_0x2e2bdd[_0x7707('0x37')]=_0x2e2bdd[_0x7707('0x37')][_0x7707('0x48')]?_0x2e2bdd['attributes']:_0x428dd3[_0x7707('0x36')];if(_0x1c3a80[_0x7707('0x32')]['includeAll']){_0x2e2bdd[_0x7707('0x43')]=[{'all':!![]}];}_0x2e2bdd=_[_0x7707('0x40')]({},_0x2e2bdd,_0x1c3a80['options']);return db[_0x7707('0x2e')]['find'](_0x2e2bdd)[_0x7707('0x26')](handleEntityNotFound(_0x370f5f,null))[_0x7707('0x26')](respondWithResult(_0x370f5f,null))['catch'](handleError(_0x370f5f,null));};exports[_0x7707('0x49')]=function(_0x2b82b5,_0x574691){return db[_0x7707('0x2e')][_0x7707('0x49')](_0x2b82b5[_0x7707('0x4a')],{})[_0x7707('0x26')](function(_0x292b8f){var _0x4bba52=_0x2b82b5[_0x7707('0x4b')][_0x7707('0x28')]({'plain':!![]});if(!_0x4bba52)throw new Error(_0x7707('0x4c'));if(_0x4bba52[_0x7707('0x4d')]===_0x7707('0x4b')){var _0x3cadd1=_0x292b8f[_0x7707('0x28')]({'plain':!![]});var _0x1cf9a1=_0x7707('0x4e');return db[_0x7707('0x4f')][_0x7707('0x50')]({'where':{'name':_0x1cf9a1,'userProfileId':_0x4bba52[_0x7707('0x51')]},'raw':!![]})['then'](function(_0x2a7888){if(_0x2a7888&&_0x2a7888[_0x7707('0x52')]===0x0){return db[_0x7707('0x29')][_0x7707('0x49')]({'name':_0x3cadd1['name'],'resourceId':_0x3cadd1['id'],'type':_0x2a7888[_0x7707('0x2b')],'sectionId':_0x2a7888['id']},{})['then'](function(){return _0x292b8f;});}else{return _0x292b8f;}})[_0x7707('0x46')](function(_0x3da220){logger['error'](_0x7707('0x53'),_0x3da220);throw _0x3da220;});}return _0x292b8f;})[_0x7707('0x26')](respondWithResult(_0x574691,0xc9))[_0x7707('0x46')](handleError(_0x574691,null));};exports[_0x7707('0x25')]=function(_0x321160,_0x7b31ad){if(_0x321160[_0x7707('0x4a')]['id']){delete _0x321160[_0x7707('0x4a')]['id'];}return db['Template'][_0x7707('0x50')]({'where':{'id':_0x321160[_0x7707('0x54')]['id']}})[_0x7707('0x26')](handleEntityNotFound(_0x7b31ad,null))[_0x7707('0x26')](saveUpdates(_0x321160[_0x7707('0x4a')],null))[_0x7707('0x26')](respondWithResult(_0x7b31ad,null))[_0x7707('0x46')](handleError(_0x7b31ad,null));};exports[_0x7707('0x27')]=function(_0x9cdf9d,_0x38d760){return db['Template']['find']({'where':{'id':_0x9cdf9d['params']['id']}})['then'](handleEntityNotFound(_0x38d760,null))[_0x7707('0x26')](removeEntity(_0x38d760,null))['catch'](handleError(_0x38d760,null));};
\ No newline at end of file
index 653374d..9b6e38e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaf25=['./template.attributes','exports','tools_templates','lodash','util','bluebird','request-promise','path','../../config/environment'];(function(_0x24d3c3,_0x1ce6b4){var _0x327d8f=function(_0x35076e){while(--_0x35076e){_0x24d3c3['push'](_0x24d3c3['shift']());}};_0x327d8f(++_0x1ce6b4);}(_0xaf25,0x162));var _0x5af2=function(_0x4e966d,_0x40a2f8){_0x4e966d=_0x4e966d-0x0;var _0x4fd09f=_0xaf25[_0x4e966d];return _0x4fd09f;};'use strict';var _=require(_0x5af2('0x0'));var util=require(_0x5af2('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x5af2('0x2'));var rp=require(_0x5af2('0x3'));var fs=require('fs');var path=require(_0x5af2('0x4'));var rimraf=require('rimraf');var config=require(_0x5af2('0x5'));var attributes=require(_0x5af2('0x6'));module[_0x5af2('0x7')]=function(_0x8b701e,_0x5c9110){return _0x8b701e['define']('Template',attributes,{'tableName':_0x5af2('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6155=['../../config/environment','./template.attributes','exports','Template','tools_templates','util','../../config/logger','api','bluebird','path','rimraf'];(function(_0x4796a2,_0x2685db){var _0x45889a=function(_0x486393){while(--_0x486393){_0x4796a2['push'](_0x4796a2['shift']());}};_0x45889a(++_0x2685db);}(_0x6155,0x15a));var _0x5615=function(_0x58e469,_0x95ee3e){_0x58e469=_0x58e469-0x0;var _0x4c01c5=_0x6155[_0x58e469];return _0x4c01c5;};'use strict';var _=require('lodash');var util=require(_0x5615('0x0'));var logger=require(_0x5615('0x1'))(_0x5615('0x2'));var moment=require('moment');var BPromise=require(_0x5615('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x5615('0x4'));var rimraf=require(_0x5615('0x5'));var config=require(_0x5615('0x6'));var attributes=require(_0x5615('0x7'));module[_0x5615('0x8')]=function(_0x2de8bd,_0x405aca){return _0x2de8bd['define'](_0x5615('0x9'),attributes,{'tableName':_0x5615('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index fdd518a..ad8b37f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4aec=['request\x20sent','result','catch','GetTemplate','Template','findAll','options','raw','attributes','limit','map','include','model','lodash','util','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','Template,\x20%s,\x20%s','debug','Template,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info'];(function(_0x273204,_0x3b145c){var _0x1c574a=function(_0x1db5e4){while(--_0x1db5e4){_0x273204['push'](_0x273204['shift']());}};_0x1c574a(++_0x3b145c);}(_0x4aec,0x1ad));var _0xc4ae=function(_0x1d757c,_0x1e7634){_0x1d757c=_0x1d757c-0x0;var _0xf71071=_0x4aec[_0x1d757c];return _0xf71071;};'use strict';var _=require(_0xc4ae('0x0'));var util=require(_0xc4ae('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xc4ae('0x2'));var db=require(_0xc4ae('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xc4ae('0x4'))(_0xc4ae('0x5'));var config=require(_0xc4ae('0x6'));var jayson=require(_0xc4ae('0x7'));var client=jayson[_0xc4ae('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4690bf,_0x4a3530,_0x3e6900){return new BPromise(function(_0x1fec2f,_0xfb76bf){return client[_0xc4ae('0x9')](_0x4690bf,_0x3e6900)[_0xc4ae('0xa')](function(_0x5bb75a){logger['info'](_0xc4ae('0xb'),_0x4a3530,'request\x20sent');logger[_0xc4ae('0xc')](_0xc4ae('0xd'),_0x4a3530,'request\x20sent',JSON[_0xc4ae('0xe')](_0x5bb75a));if(_0x5bb75a[_0xc4ae('0xf')]){if(_0x5bb75a[_0xc4ae('0xf')][_0xc4ae('0x10')]===0x1f4){logger[_0xc4ae('0xf')](_0xc4ae('0xb'),_0x4a3530,_0x5bb75a['error'][_0xc4ae('0x11')]);return _0xfb76bf(_0x5bb75a[_0xc4ae('0xf')][_0xc4ae('0x11')]);}logger['error'](_0xc4ae('0xb'),_0x4a3530,_0x5bb75a[_0xc4ae('0xf')][_0xc4ae('0x11')]);return _0x1fec2f(_0x5bb75a[_0xc4ae('0xf')]['message']);}else{logger[_0xc4ae('0x12')](_0xc4ae('0xb'),_0x4a3530,_0xc4ae('0x13'));_0x1fec2f(_0x5bb75a[_0xc4ae('0x14')][_0xc4ae('0x11')]);}})[_0xc4ae('0x15')](function(_0x1685d2){logger[_0xc4ae('0xf')](_0xc4ae('0xb'),_0x4a3530,_0x1685d2);_0xfb76bf(_0x1685d2);});});}exports[_0xc4ae('0x16')]=function(_0x4be7df){var _0x4f0dd9=this;return new Promise(function(_0x4b6008,_0x26ebf7){return db[_0xc4ae('0x17')][_0xc4ae('0x18')]({'raw':_0x4be7df[_0xc4ae('0x19')]?_0x4be7df[_0xc4ae('0x19')][_0xc4ae('0x1a')]===undefined?!![]:![]:!![],'where':_0x4be7df[_0xc4ae('0x19')]?_0x4be7df[_0xc4ae('0x19')]['where']||null:null,'attributes':_0x4be7df[_0xc4ae('0x19')]?_0x4be7df[_0xc4ae('0x19')][_0xc4ae('0x1b')]||null:null,'limit':_0x4be7df['options']?_0x4be7df[_0xc4ae('0x19')][_0xc4ae('0x1c')]||null:null,'include':_0x4be7df['options']?_0x4be7df[_0xc4ae('0x19')]['include']?_[_0xc4ae('0x1d')](_0x4be7df[_0xc4ae('0x19')][_0xc4ae('0x1e')],function(_0x3ff98a){return{'model':db[_0x3ff98a[_0xc4ae('0x1f')]],'as':_0x3ff98a['as'],'attributes':_0x3ff98a[_0xc4ae('0x1b')],'include':_0x3ff98a['include']?_['map'](_0x3ff98a['include'],function(_0x1395f8){return{'model':db[_0x1395f8['model']],'as':_0x1395f8['as'],'attributes':_0x1395f8[_0xc4ae('0x1b')],'include':_0x1395f8[_0xc4ae('0x1e')]?_[_0xc4ae('0x1d')](_0x1395f8[_0xc4ae('0x1e')],function(_0x40c9d8){return{'model':db[_0x40c9d8[_0xc4ae('0x1f')]],'as':_0x40c9d8['as'],'attributes':_0x40c9d8[_0xc4ae('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xc4ae('0xa')](function(_0x166c8f){logger[_0xc4ae('0x12')]('GetTemplate',_0x4be7df);logger[_0xc4ae('0xc')](_0xc4ae('0x16'),_0x4be7df,JSON[_0xc4ae('0xe')](_0x166c8f));_0x4b6008(_0x166c8f);})['catch'](function(_0x34a20a){logger['error'](_0xc4ae('0x16'),_0x34a20a['message'],_0x4be7df);_0x26ebf7(_0x4f0dd9['error'](0x1f4,_0x34a20a['message']));});});};
\ No newline at end of file
+var _0xef87=['options','attributes','limit','include','map','model','stringify','lodash','util','moment','ioredis','../../config/utils','../../config/logger','jayson/promise','http','request','then','debug','request\x20sent','error','code','message','info','Template,\x20%s,\x20%s','result','catch','GetTemplate','Template'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0xef87,0x1ab));var _0x7ef8=function(_0x552bb3,_0x533ded){_0x552bb3=_0x552bb3-0x0;var _0xbc5fb=_0xef87[_0x552bb3];return _0xbc5fb;};'use strict';var _=require(_0x7ef8('0x0'));var util=require(_0x7ef8('0x1'));var moment=require(_0x7ef8('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7ef8('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x7ef8('0x4'));var logger=require(_0x7ef8('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0x7ef8('0x6'));var client=jayson['client'][_0x7ef8('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x4bad9b,_0x3e8844,_0x19ab9a){return new BPromise(function(_0x4da628,_0x138d9f){return client[_0x7ef8('0x8')](_0x4bad9b,_0x19ab9a)[_0x7ef8('0x9')](function(_0xff033c){logger['info']('Template,\x20%s,\x20%s',_0x3e8844,'request\x20sent');logger[_0x7ef8('0xa')]('Template,\x20%s,\x20%s,\x20%s',_0x3e8844,_0x7ef8('0xb'),JSON['stringify'](_0xff033c));if(_0xff033c[_0x7ef8('0xc')]){if(_0xff033c[_0x7ef8('0xc')][_0x7ef8('0xd')]===0x1f4){logger[_0x7ef8('0xc')]('Template,\x20%s,\x20%s',_0x3e8844,_0xff033c['error']['message']);return _0x138d9f(_0xff033c[_0x7ef8('0xc')][_0x7ef8('0xe')]);}logger[_0x7ef8('0xc')]('Template,\x20%s,\x20%s',_0x3e8844,_0xff033c['error']['message']);return _0x4da628(_0xff033c[_0x7ef8('0xc')][_0x7ef8('0xe')]);}else{logger[_0x7ef8('0xf')](_0x7ef8('0x10'),_0x3e8844,_0x7ef8('0xb'));_0x4da628(_0xff033c[_0x7ef8('0x11')][_0x7ef8('0xe')]);}})[_0x7ef8('0x12')](function(_0x490a20){logger[_0x7ef8('0xc')](_0x7ef8('0x10'),_0x3e8844,_0x490a20);_0x138d9f(_0x490a20);});});}exports[_0x7ef8('0x13')]=function(_0x512730){var _0x917c4f=this;return new Promise(function(_0x9fff42,_0x54d4dd){return db[_0x7ef8('0x14')]['findAll']({'raw':_0x512730['options']?_0x512730[_0x7ef8('0x15')]['raw']===undefined?!![]:![]:!![],'where':_0x512730[_0x7ef8('0x15')]?_0x512730[_0x7ef8('0x15')]['where']||null:null,'attributes':_0x512730[_0x7ef8('0x15')]?_0x512730[_0x7ef8('0x15')][_0x7ef8('0x16')]||null:null,'limit':_0x512730[_0x7ef8('0x15')]?_0x512730[_0x7ef8('0x15')][_0x7ef8('0x17')]||null:null,'include':_0x512730['options']?_0x512730['options'][_0x7ef8('0x18')]?_[_0x7ef8('0x19')](_0x512730[_0x7ef8('0x15')]['include'],function(_0x318b4a){return{'model':db[_0x318b4a[_0x7ef8('0x1a')]],'as':_0x318b4a['as'],'attributes':_0x318b4a[_0x7ef8('0x16')],'include':_0x318b4a[_0x7ef8('0x18')]?_[_0x7ef8('0x19')](_0x318b4a[_0x7ef8('0x18')],function(_0x2fd815){return{'model':db[_0x2fd815['model']],'as':_0x2fd815['as'],'attributes':_0x2fd815['attributes'],'include':_0x2fd815[_0x7ef8('0x18')]?_[_0x7ef8('0x19')](_0x2fd815['include'],function(_0x58e214){return{'model':db[_0x58e214[_0x7ef8('0x1a')]],'as':_0x58e214['as'],'attributes':_0x58e214[_0x7ef8('0x16')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1d82e4){logger[_0x7ef8('0xf')](_0x7ef8('0x13'),_0x512730);logger[_0x7ef8('0xa')](_0x7ef8('0x13'),_0x512730,JSON[_0x7ef8('0x1b')](_0x1d82e4));_0x9fff42(_0x1d82e4);})[_0x7ef8('0x12')](function(_0xa736bc){logger['error']('GetTemplate',_0xa736bc[_0x7ef8('0xe')],_0x512730);_0x54d4dd(_0x917c4f[_0x7ef8('0xc')](0x1f4,_0xa736bc['message']));});});};
\ No newline at end of file
index 7e005d3..628bfa5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7e33=['create','post','addAllCondition','addAnyCondition','addAction','update','delete','multer','util','express','Router','fs-extra','../../config/environment','./trigger.controller','get','isAuthenticated','index','/:id','show','/:id/all_conditions','/:id/any_conditions','/:id/actions','getActions'];(function(_0xfc0976,_0x33776f){var _0x23579f=function(_0x4143d9){while(--_0x4143d9){_0xfc0976['push'](_0xfc0976['shift']());}};_0x23579f(++_0x33776f);}(_0x7e33,0x7a));var _0x37e3=function(_0x1f6110,_0x4f90c2){_0x1f6110=_0x1f6110-0x0;var _0x1c7f18=_0x7e33[_0x1f6110];return _0x1c7f18;};'use strict';var multer=require(_0x37e3('0x0'));var util=require(_0x37e3('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x37e3('0x2'));var router=express[_0x37e3('0x3')]();var fs_extra=require(_0x37e3('0x4'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x37e3('0x5'));var controller=require(_0x37e3('0x6'));router[_0x37e3('0x7')]('/',auth[_0x37e3('0x8')](),controller[_0x37e3('0x9')]);router['get'](_0x37e3('0xa'),auth[_0x37e3('0x8')](),controller[_0x37e3('0xb')]);router[_0x37e3('0x7')](_0x37e3('0xc'),auth['isAuthenticated'](),controller['getAllConditions']);router[_0x37e3('0x7')](_0x37e3('0xd'),auth[_0x37e3('0x8')](),controller['getAnyConditions']);router[_0x37e3('0x7')](_0x37e3('0xe'),auth[_0x37e3('0x8')](),controller[_0x37e3('0xf')]);router['post']('/',auth[_0x37e3('0x8')](),controller[_0x37e3('0x10')]);router[_0x37e3('0x11')](_0x37e3('0xc'),auth['isAuthenticated'](),controller[_0x37e3('0x12')]);router[_0x37e3('0x11')](_0x37e3('0xd'),auth['isAuthenticated'](),controller[_0x37e3('0x13')]);router[_0x37e3('0x11')](_0x37e3('0xe'),auth[_0x37e3('0x8')](),controller[_0x37e3('0x14')]);router['put'](_0x37e3('0xa'),auth[_0x37e3('0x8')](),controller[_0x37e3('0x15')]);router[_0x37e3('0x16')](_0x37e3('0xa'),auth[_0x37e3('0x8')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0xef0b=['delete','destroy','exports','multer','path','express','Router','../../components/auth/service','./trigger.controller','get','isAuthenticated','index','/:id','show','getAllConditions','/:id/any_conditions','getAnyConditions','getActions','post','create','/:id/all_conditions','addAllCondition','addAnyCondition','/:id/actions','put','update'];(function(_0x3c0654,_0x39281b){var _0x31dac3=function(_0x3a567c){while(--_0x3a567c){_0x3c0654['push'](_0x3c0654['shift']());}};_0x31dac3(++_0x39281b);}(_0xef0b,0x1d7));var _0xbef0=function(_0x1df5f7,_0x3f56f1){_0x1df5f7=_0x1df5f7-0x0;var _0x3fcaa1=_0xef0b[_0x1df5f7];return _0x3fcaa1;};'use strict';var multer=require(_0xbef0('0x0'));var util=require('util');var path=require(_0xbef0('0x1'));var timeout=require('connect-timeout');var express=require(_0xbef0('0x2'));var router=express[_0xbef0('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xbef0('0x4'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xbef0('0x5'));router[_0xbef0('0x6')]('/',auth[_0xbef0('0x7')](),controller[_0xbef0('0x8')]);router[_0xbef0('0x6')](_0xbef0('0x9'),auth[_0xbef0('0x7')](),controller[_0xbef0('0xa')]);router[_0xbef0('0x6')]('/:id/all_conditions',auth[_0xbef0('0x7')](),controller[_0xbef0('0xb')]);router[_0xbef0('0x6')](_0xbef0('0xc'),auth[_0xbef0('0x7')](),controller[_0xbef0('0xd')]);router['get']('/:id/actions',auth[_0xbef0('0x7')](),controller[_0xbef0('0xe')]);router[_0xbef0('0xf')]('/',auth['isAuthenticated'](),controller[_0xbef0('0x10')]);router[_0xbef0('0xf')](_0xbef0('0x11'),auth[_0xbef0('0x7')](),controller[_0xbef0('0x12')]);router['post'](_0xbef0('0xc'),auth['isAuthenticated'](),controller[_0xbef0('0x13')]);router['post'](_0xbef0('0x14'),auth['isAuthenticated'](),controller['addAction']);router[_0xbef0('0x15')](_0xbef0('0x9'),auth['isAuthenticated'](),controller[_0xbef0('0x16')]);router[_0xbef0('0x17')](_0xbef0('0x9'),auth[_0xbef0('0x7')](),controller[_0xbef0('0x18')]);module[_0xbef0('0x19')]=router;
\ No newline at end of file
index 56d0699..6b43ff9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x776f=['STRING','BOOLEAN','sequelize','exports'];(function(_0x50d84b,_0x1d7ea7){var _0x6d4270=function(_0x883f21){while(--_0x883f21){_0x50d84b['push'](_0x50d84b['shift']());}};_0x6d4270(++_0x1d7ea7);}(_0x776f,0x18a));var _0xf776=function(_0x2b6b89,_0x172ec0){_0x2b6b89=_0x2b6b89-0x0;var _0x5aa6af=_0x776f[_0x2b6b89];return _0x5aa6af;};'use strict';var Sequelize=require(_0xf776('0x0'));module[_0xf776('0x1')]={'name':{'type':Sequelize[_0xf776('0x2')]},'channel':{'type':Sequelize[_0xf776('0x2')]},'description':{'type':Sequelize[_0xf776('0x2')]},'status':{'type':Sequelize[_0xf776('0x3')],'defaultValue':![]}};
\ No newline at end of file
+var _0x6658=['BOOLEAN','sequelize','exports','STRING'];(function(_0x187f4b,_0x12fd52){var _0x132087=function(_0x2b68ef){while(--_0x2b68ef){_0x187f4b['push'](_0x187f4b['shift']());}};_0x132087(++_0x12fd52);}(_0x6658,0x79));var _0x8665=function(_0x55535c,_0x5b9dc2){_0x55535c=_0x55535c-0x0;var _0x502921=_0x6658[_0x55535c];return _0x502921;};'use strict';var Sequelize=require(_0x8665('0x0'));module[_0x8665('0x1')]={'name':{'type':Sequelize[_0x8665('0x2')]},'channel':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x8665('0x2')]},'status':{'type':Sequelize[_0x8665('0x3')],'defaultValue':![]}};
\ No newline at end of file
index 6f93531..6cf1395 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x96c0=['util','path','sox','to-csv','ejs','fs-extra','lodash','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','status','json','offset','undefined','limit','set','Content-Range','reject','save','update','destroy','then','get','Triggers','UserProfileResource','end','error','stack','name','index','map','Trigger','rawAttributes','key','keys','model','query','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','filter','merge','type','VIRTUAL','options','count','includeAll','findAll','rows','catch','params','find','create','body','user','role','userProfileId','autoAssociation','addAllCondition','TriggerAllId','Condition','addAnyCondition','TriggerAnyId','getAllConditions','findOne','getAnyConditions','pick','addAction','TriggerId','Action','getActions','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache'];(function(_0x50e0b4,_0x1057f7){var _0x2fa8b0=function(_0x3766bc){while(--_0x3766bc){_0x50e0b4['push'](_0x50e0b4['shift']());}};_0x2fa8b0(++_0x1057f7);}(_0x96c0,0xbb));var _0x096c=function(_0x8006f2,_0x26a636){_0x8006f2=_0x8006f2-0x0;var _0x1cfca7=_0x96c0[_0x8006f2];return _0x1cfca7;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x096c('0x0'));var zipdir=require(_0x096c('0x1'));var jsonpatch=require(_0x096c('0x2'));var rp=require(_0x096c('0x3'));var moment=require(_0x096c('0x4'));var BPromise=require(_0x096c('0x5'));var Mustache=require(_0x096c('0x6'));var util=require(_0x096c('0x7'));var path=require(_0x096c('0x8'));var sox=require(_0x096c('0x9'));var csv=require(_0x096c('0xa'));var ejs=require(_0x096c('0xb'));var fs=require('fs');var fs_extra=require(_0x096c('0xc'));var _=require(_0x096c('0xd'));var squel=require('squel');var crypto=require(_0x096c('0xe'));var jsforce=require(_0x096c('0xf'));var deskjs=require(_0x096c('0x10'));var toCsv=require(_0x096c('0xa'));var querystring=require(_0x096c('0x11'));var Papa=require(_0x096c('0x12'));var Redis=require(_0x096c('0x13'));var authService=require(_0x096c('0x14'));var qs=require(_0x096c('0x15'));var as=require(_0x096c('0x16'));var hardwareService=require(_0x096c('0x17'));var logger=require(_0x096c('0x18'))(_0x096c('0x19'));var utils=require(_0x096c('0x1a'));var config=require(_0x096c('0x1b'));var licenseUtil=require(_0x096c('0x1c'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x120e98,_0x48ef91){_0x48ef91=_0x48ef91||0xcc;return function(_0x312e17){if(_0x312e17){return _0x120e98['sendStatus'](_0x48ef91);}return _0x120e98[_0x096c('0x1d')](_0x48ef91)['end']();};}function respondWithResult(_0x203e90,_0x55000e){_0x55000e=_0x55000e||0xc8;return function(_0x22b539){if(_0x22b539){return _0x203e90['status'](_0x55000e)[_0x096c('0x1e')](_0x22b539);}};}function respondWithFilteredResult(_0xa80426,_0x8927c8){return function(_0x4ac6e0){if(_0x4ac6e0){var _0xbecd82=typeof _0x8927c8[_0x096c('0x1f')]===_0x096c('0x20')&&typeof _0x8927c8[_0x096c('0x21')]===_0x096c('0x20');var _0x260c32=_0x4ac6e0['count'];var _0x141c3e=_0xbecd82?0x0:_0x8927c8[_0x096c('0x1f')];var _0x26f25b=_0xbecd82?_0x4ac6e0['count']:_0x8927c8[_0x096c('0x1f')]+_0x8927c8['limit'];var _0x1ac4f8;if(_0x26f25b>=_0x260c32){_0x26f25b=_0x260c32;_0x1ac4f8=0xc8;}else{_0x1ac4f8=0xce;}_0xa80426[_0x096c('0x1d')](_0x1ac4f8);return _0xa80426[_0x096c('0x22')](_0x096c('0x23'),_0x141c3e+'-'+_0x26f25b+'/'+_0x260c32)[_0x096c('0x1e')](_0x4ac6e0);}return null;};}function patchUpdates(_0x2bc628){return function(_0xac8c85){try{jsonpatch['apply'](_0xac8c85,_0x2bc628,!![]);}catch(_0x334463){return BPromise[_0x096c('0x24')](_0x334463);}return _0xac8c85[_0x096c('0x25')]();};}function saveUpdates(_0x1955b4,_0x5e6505){return function(_0x579981){if(_0x579981){return _0x579981[_0x096c('0x26')](_0x1955b4)['then'](function(_0x4fdd81){return _0x4fdd81;});}return null;};}function removeEntity(_0x448a98,_0x8c662e){return function(_0x1676c4){if(_0x1676c4){return _0x1676c4[_0x096c('0x27')]()[_0x096c('0x28')](function(){var _0x499e24=_0x1676c4[_0x096c('0x29')]({'plain':!![]});var _0x2e767f=_0x096c('0x2a');return db[_0x096c('0x2b')][_0x096c('0x27')]({'where':{'type':_0x2e767f,'resourceId':_0x499e24['id']}})[_0x096c('0x28')](function(){return _0x1676c4;});})[_0x096c('0x28')](function(){_0x448a98[_0x096c('0x1d')](0xcc)[_0x096c('0x2c')]();});}};}function handleEntityNotFound(_0x49b1d3,_0x56d986){return function(_0x2c3a19){if(!_0x2c3a19){_0x49b1d3['sendStatus'](0x194);}return _0x2c3a19;};}function handleError(_0x580594,_0xf1fb72){_0xf1fb72=_0xf1fb72||0x1f4;return function(_0x2d2ef5){logger[_0x096c('0x2d')](_0x2d2ef5[_0x096c('0x2e')]);if(_0x2d2ef5[_0x096c('0x2f')]){delete _0x2d2ef5[_0x096c('0x2f')];}_0x580594[_0x096c('0x1d')](_0xf1fb72)['send'](_0x2d2ef5);};}exports[_0x096c('0x30')]=function(_0x2f7165,_0x713976){var _0x437227={},_0x23dfaa={},_0x173a17={'count':0x0,'rows':[]};var _0x343298=_[_0x096c('0x31')](db[_0x096c('0x32')][_0x096c('0x33')],function(_0x1456b0){return{'name':_0x1456b0['fieldName'],'type':_0x1456b0['type'][_0x096c('0x34')]};});_0x23dfaa['model']=_['map'](_0x343298,_0x096c('0x2f'));_0x23dfaa['query']=_[_0x096c('0x35')](_0x2f7165['query']);_0x23dfaa['filters']=_['intersection'](_0x23dfaa[_0x096c('0x36')],_0x23dfaa[_0x096c('0x37')]);_0x437227['attributes']=_[_0x096c('0x38')](_0x23dfaa['model'],qs['fields'](_0x2f7165[_0x096c('0x37')][_0x096c('0x39')]));_0x437227[_0x096c('0x3a')]=_0x437227[_0x096c('0x3a')][_0x096c('0x3b')]?_0x437227['attributes']:_0x23dfaa['model'];if(!_0x2f7165[_0x096c('0x37')][_0x096c('0x3c')](_0x096c('0x3d'))){_0x437227[_0x096c('0x21')]=qs['limit'](_0x2f7165[_0x096c('0x37')]['limit']);_0x437227[_0x096c('0x1f')]=qs[_0x096c('0x1f')](_0x2f7165[_0x096c('0x37')][_0x096c('0x1f')]);}_0x437227[_0x096c('0x3e')]=qs[_0x096c('0x3f')](_0x2f7165[_0x096c('0x37')][_0x096c('0x3f')]);_0x437227[_0x096c('0x40')]=qs[_0x096c('0x41')](_['pick'](_0x2f7165[_0x096c('0x37')],_0x23dfaa['filters']),_0x343298);if(_0x2f7165[_0x096c('0x37')][_0x096c('0x42')]){_0x437227[_0x096c('0x40')]=_[_0x096c('0x43')](_0x437227['where'],{'$or':_[_0x096c('0x31')](_0x343298,function(_0x2f4b48){if(_0x2f4b48[_0x096c('0x44')]!==_0x096c('0x45')){var _0x420940={};_0x420940[_0x2f4b48[_0x096c('0x2f')]]={'$like':'%'+_0x2f7165[_0x096c('0x37')][_0x096c('0x42')]+'%'};return _0x420940;}})});}_0x437227=_[_0x096c('0x43')]({},_0x437227,_0x2f7165[_0x096c('0x46')]);var _0x66ce9f={'where':_0x437227[_0x096c('0x40')]};return db[_0x096c('0x32')][_0x096c('0x47')](_0x66ce9f)[_0x096c('0x28')](function(_0x140e0c){_0x173a17[_0x096c('0x47')]=_0x140e0c;if(_0x2f7165[_0x096c('0x37')][_0x096c('0x48')]){_0x437227['include']=[{'all':!![]}];}return db[_0x096c('0x32')][_0x096c('0x49')](_0x437227);})['then'](function(_0xe836e6){_0x173a17[_0x096c('0x4a')]=_0xe836e6;return _0x173a17;})[_0x096c('0x28')](respondWithFilteredResult(_0x713976,_0x437227))[_0x096c('0x4b')](handleError(_0x713976,null));};exports['show']=function(_0x1f6fd0,_0x390889){var _0x342a38={'raw':![],'where':{'id':_0x1f6fd0[_0x096c('0x4c')]['id']}},_0x19d1d2={};_0x19d1d2[_0x096c('0x36')]=_[_0x096c('0x35')](db[_0x096c('0x32')][_0x096c('0x33')]);_0x19d1d2[_0x096c('0x37')]=_['keys'](_0x1f6fd0[_0x096c('0x37')]);_0x19d1d2[_0x096c('0x41')]=_['intersection'](_0x19d1d2[_0x096c('0x36')],_0x19d1d2['query']);_0x342a38[_0x096c('0x3a')]=_[_0x096c('0x38')](_0x19d1d2[_0x096c('0x36')],qs[_0x096c('0x39')](_0x1f6fd0[_0x096c('0x37')][_0x096c('0x39')]));_0x342a38[_0x096c('0x3a')]=_0x342a38[_0x096c('0x3a')][_0x096c('0x3b')]?_0x342a38['attributes']:_0x19d1d2['model'];if(_0x1f6fd0[_0x096c('0x37')][_0x096c('0x48')]){_0x342a38['include']=[{'all':!![]}];}_0x342a38=_[_0x096c('0x43')]({},_0x342a38,_0x1f6fd0['options']);return db[_0x096c('0x32')][_0x096c('0x4d')](_0x342a38)['then'](handleEntityNotFound(_0x390889,null))[_0x096c('0x28')](respondWithResult(_0x390889,null))[_0x096c('0x4b')](handleError(_0x390889,null));};exports[_0x096c('0x4e')]=function(_0xefb649,_0x4738f4){return db[_0x096c('0x32')]['create'](_0xefb649[_0x096c('0x4f')],{})[_0x096c('0x28')](function(_0x18312f){var _0xbe3c06=_0xefb649[_0x096c('0x50')][_0x096c('0x29')]({'plain':!![]});if(!_0xbe3c06)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0xbe3c06[_0x096c('0x51')]===_0x096c('0x50')){var _0x2081d6=_0x18312f[_0x096c('0x29')]({'plain':!![]});var _0x121011=_0x096c('0x2a');return db['UserProfileSection'][_0x096c('0x4d')]({'where':{'name':_0x121011,'userProfileId':_0xbe3c06[_0x096c('0x52')]},'raw':!![]})['then'](function(_0x42e0f4){if(_0x42e0f4&&_0x42e0f4[_0x096c('0x53')]===0x0){return db[_0x096c('0x2b')][_0x096c('0x4e')]({'name':_0x2081d6['name'],'resourceId':_0x2081d6['id'],'type':_0x42e0f4['name'],'sectionId':_0x42e0f4['id']},{})['then'](function(){return _0x18312f;});}else{return _0x18312f;}})[_0x096c('0x4b')](function(_0x4e3f81){logger[_0x096c('0x2d')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4e3f81);throw _0x4e3f81;});}return _0x18312f;})[_0x096c('0x28')](respondWithResult(_0x4738f4,0xc9))['catch'](handleError(_0x4738f4,null));};exports['update']=function(_0x410920,_0x5aed74){if(_0x410920[_0x096c('0x4f')]['id']){delete _0x410920[_0x096c('0x4f')]['id'];}return db[_0x096c('0x32')][_0x096c('0x4d')]({'where':{'id':_0x410920[_0x096c('0x4c')]['id']}})[_0x096c('0x28')](handleEntityNotFound(_0x5aed74,null))[_0x096c('0x28')](saveUpdates(_0x410920[_0x096c('0x4f')],null))['then'](respondWithResult(_0x5aed74,null))['catch'](handleError(_0x5aed74,null));};exports['destroy']=function(_0x593af2,_0x1a5154){return db[_0x096c('0x32')]['find']({'where':{'id':_0x593af2['params']['id']}})[_0x096c('0x28')](handleEntityNotFound(_0x1a5154,null))['then'](removeEntity(_0x1a5154,null))[_0x096c('0x4b')](handleError(_0x1a5154,null));};exports[_0x096c('0x54')]=function(_0x3f7a4a,_0x332d05,_0x14eb7e){if(_0x3f7a4a[_0x096c('0x4f')]['id']){delete _0x3f7a4a[_0x096c('0x4f')]['id'];}return db[_0x096c('0x32')][_0x096c('0x4d')]({'where':{'id':_0x3f7a4a[_0x096c('0x4c')]['id']}})[_0x096c('0x28')](handleEntityNotFound(_0x332d05,null))[_0x096c('0x28')](function(_0x511c84){if(_0x511c84){_0x3f7a4a[_0x096c('0x4f')][_0x096c('0x55')]=_0x511c84['id'];return db[_0x096c('0x56')][_0x096c('0x4e')](_0x3f7a4a[_0x096c('0x4f')]);}})[_0x096c('0x28')](respondWithResult(_0x332d05,null))[_0x096c('0x4b')](handleError(_0x332d05,null));};exports[_0x096c('0x57')]=function(_0x7ce89,_0x19c8b0,_0x4db7a2){if(_0x7ce89[_0x096c('0x4f')]['id']){delete _0x7ce89['body']['id'];}return db['Trigger']['find']({'where':{'id':_0x7ce89[_0x096c('0x4c')]['id']}})[_0x096c('0x28')](handleEntityNotFound(_0x19c8b0,null))[_0x096c('0x28')](function(_0x1966a4){if(_0x1966a4){_0x7ce89[_0x096c('0x4f')][_0x096c('0x58')]=_0x1966a4['id'];return db['Condition'][_0x096c('0x4e')](_0x7ce89[_0x096c('0x4f')]);}})[_0x096c('0x28')](respondWithResult(_0x19c8b0,null))[_0x096c('0x4b')](handleError(_0x19c8b0,null));};exports[_0x096c('0x59')]=function(_0x491024,_0x36c9f2,_0x36cee7){var _0x1fd364={};var _0x80fbbf={};var _0x587f83;var _0x1fc67f;return db[_0x096c('0x32')][_0x096c('0x5a')]({'where':{'id':_0x491024[_0x096c('0x4c')]['id']}})['then'](handleEntityNotFound(_0x36c9f2,null))[_0x096c('0x28')](function(_0x492147){if(_0x492147){_0x587f83=_0x492147;_0x80fbbf['model']=_[_0x096c('0x35')](db[_0x096c('0x56')][_0x096c('0x33')]);_0x80fbbf[_0x096c('0x37')]=_[_0x096c('0x35')](_0x491024[_0x096c('0x37')]);_0x80fbbf[_0x096c('0x41')]=_[_0x096c('0x38')](_0x80fbbf['model'],_0x80fbbf[_0x096c('0x37')]);_0x1fd364[_0x096c('0x3a')]=_[_0x096c('0x38')](_0x80fbbf[_0x096c('0x36')],qs['fields'](_0x491024[_0x096c('0x37')][_0x096c('0x39')]));_0x1fd364[_0x096c('0x3a')]=_0x1fd364[_0x096c('0x3a')][_0x096c('0x3b')]?_0x1fd364['attributes']:_0x80fbbf[_0x096c('0x36')];_0x1fd364['order']=qs[_0x096c('0x3f')](_0x491024[_0x096c('0x37')][_0x096c('0x3f')]);_0x1fd364[_0x096c('0x40')]=qs[_0x096c('0x41')](_['pick'](_0x491024['query'],_0x80fbbf[_0x096c('0x41')]));if(_0x491024['query'][_0x096c('0x42')]){_0x1fd364[_0x096c('0x40')]=_[_0x096c('0x43')](_0x1fd364['where'],{'$or':_['map'](_0x1fd364[_0x096c('0x3a')],function(_0x40a21f){var _0x1de491={};_0x1de491[_0x40a21f]={'$like':'%'+_0x491024['query']['filter']+'%'};return _0x1de491;})});}_0x1fd364=_[_0x096c('0x43')]({},_0x1fd364,_0x491024[_0x096c('0x46')]);return _0x587f83[_0x096c('0x59')](_0x1fd364);}})[_0x096c('0x28')](function(_0xcbc9b1){if(_0xcbc9b1){_0x1fc67f=_0xcbc9b1[_0x096c('0x3b')];if(!_0x491024[_0x096c('0x37')][_0x096c('0x3c')](_0x096c('0x3d'))){_0x1fd364['limit']=qs[_0x096c('0x21')](_0x491024[_0x096c('0x37')][_0x096c('0x21')]);_0x1fd364[_0x096c('0x1f')]=qs[_0x096c('0x1f')](_0x491024[_0x096c('0x37')][_0x096c('0x1f')]);}return _0x587f83[_0x096c('0x59')](_0x1fd364);}})['then'](function(_0xbc5358){if(_0xbc5358){return _0xbc5358?{'count':_0x1fc67f,'rows':_0xbc5358}:null;}})[_0x096c('0x28')](respondWithResult(_0x36c9f2,null))[_0x096c('0x4b')](handleError(_0x36c9f2,null));};exports[_0x096c('0x5b')]=function(_0x2029ab,_0x3eeba9,_0x387641){var _0x1559c5={};var _0x409507={};var _0x40dda3;var _0x3f5318;return db['Trigger'][_0x096c('0x5a')]({'where':{'id':_0x2029ab['params']['id']}})['then'](handleEntityNotFound(_0x3eeba9,null))['then'](function(_0x7ea43e){if(_0x7ea43e){_0x40dda3=_0x7ea43e;_0x409507[_0x096c('0x36')]=_['keys'](db['Condition'][_0x096c('0x33')]);_0x409507[_0x096c('0x37')]=_[_0x096c('0x35')](_0x2029ab[_0x096c('0x37')]);_0x409507['filters']=_[_0x096c('0x38')](_0x409507[_0x096c('0x36')],_0x409507[_0x096c('0x37')]);_0x1559c5[_0x096c('0x3a')]=_[_0x096c('0x38')](_0x409507[_0x096c('0x36')],qs[_0x096c('0x39')](_0x2029ab[_0x096c('0x37')][_0x096c('0x39')]));_0x1559c5[_0x096c('0x3a')]=_0x1559c5[_0x096c('0x3a')][_0x096c('0x3b')]?_0x1559c5[_0x096c('0x3a')]:_0x409507[_0x096c('0x36')];_0x1559c5[_0x096c('0x3e')]=qs['sort'](_0x2029ab[_0x096c('0x37')]['sort']);_0x1559c5[_0x096c('0x40')]=qs[_0x096c('0x41')](_[_0x096c('0x5c')](_0x2029ab[_0x096c('0x37')],_0x409507[_0x096c('0x41')]));if(_0x2029ab[_0x096c('0x37')][_0x096c('0x42')]){_0x1559c5[_0x096c('0x40')]=_['merge'](_0x1559c5['where'],{'$or':_[_0x096c('0x31')](_0x1559c5['attributes'],function(_0x49914d){var _0x16fb09={};_0x16fb09[_0x49914d]={'$like':'%'+_0x2029ab[_0x096c('0x37')][_0x096c('0x42')]+'%'};return _0x16fb09;})});}_0x1559c5=_[_0x096c('0x43')]({},_0x1559c5,_0x2029ab[_0x096c('0x46')]);return _0x40dda3[_0x096c('0x5b')](_0x1559c5);}})[_0x096c('0x28')](function(_0x5ceabe){if(_0x5ceabe){_0x3f5318=_0x5ceabe[_0x096c('0x3b')];if(!_0x2029ab[_0x096c('0x37')][_0x096c('0x3c')](_0x096c('0x3d'))){_0x1559c5['limit']=qs[_0x096c('0x21')](_0x2029ab['query'][_0x096c('0x21')]);_0x1559c5[_0x096c('0x1f')]=qs[_0x096c('0x1f')](_0x2029ab[_0x096c('0x37')][_0x096c('0x1f')]);}return _0x40dda3[_0x096c('0x5b')](_0x1559c5);}})['then'](function(_0xb840d2){if(_0xb840d2){return _0xb840d2?{'count':_0x3f5318,'rows':_0xb840d2}:null;}})['then'](respondWithResult(_0x3eeba9,null))[_0x096c('0x4b')](handleError(_0x3eeba9,null));};exports[_0x096c('0x5d')]=function(_0x1f3e2c,_0x4cd3e3,_0xc2cefb){if(_0x1f3e2c[_0x096c('0x4f')]['id']){delete _0x1f3e2c['body']['id'];}return db[_0x096c('0x32')]['find']({'where':{'id':_0x1f3e2c[_0x096c('0x4c')]['id']}})[_0x096c('0x28')](handleEntityNotFound(_0x4cd3e3,null))[_0x096c('0x28')](function(_0x53fa56){if(_0x53fa56){_0x1f3e2c[_0x096c('0x4f')][_0x096c('0x5e')]=_0x53fa56['id'];return db[_0x096c('0x5f')]['create'](_0x1f3e2c[_0x096c('0x4f')]);}})[_0x096c('0x28')](respondWithResult(_0x4cd3e3,null))['catch'](handleError(_0x4cd3e3,null));};exports[_0x096c('0x60')]=function(_0x1047c2,_0x4e901a,_0x249db1){var _0x568cc0={};var _0x1264cd={};var _0x40cecb;var _0x106ac2;return db[_0x096c('0x32')][_0x096c('0x5a')]({'where':{'id':_0x1047c2[_0x096c('0x4c')]['id']}})[_0x096c('0x28')](handleEntityNotFound(_0x4e901a,null))[_0x096c('0x28')](function(_0xb06f61){if(_0xb06f61){_0x40cecb=_0xb06f61;_0x1264cd[_0x096c('0x36')]=_['keys'](db['Action'][_0x096c('0x33')]);_0x1264cd[_0x096c('0x37')]=_[_0x096c('0x35')](_0x1047c2[_0x096c('0x37')]);_0x1264cd[_0x096c('0x41')]=_[_0x096c('0x38')](_0x1264cd[_0x096c('0x36')],_0x1264cd[_0x096c('0x37')]);_0x568cc0[_0x096c('0x3a')]=_[_0x096c('0x38')](_0x1264cd[_0x096c('0x36')],qs['fields'](_0x1047c2['query'][_0x096c('0x39')]));_0x568cc0[_0x096c('0x3a')]=_0x568cc0[_0x096c('0x3a')][_0x096c('0x3b')]?_0x568cc0[_0x096c('0x3a')]:_0x1264cd[_0x096c('0x36')];_0x568cc0[_0x096c('0x3e')]=qs[_0x096c('0x3f')](_0x1047c2['query']['sort']);_0x568cc0['where']=qs[_0x096c('0x41')](_[_0x096c('0x5c')](_0x1047c2['query'],_0x1264cd[_0x096c('0x41')]));if(_0x1047c2[_0x096c('0x37')][_0x096c('0x42')]){_0x568cc0[_0x096c('0x40')]=_['merge'](_0x568cc0['where'],{'$or':_[_0x096c('0x31')](_0x568cc0['attributes'],function(_0x275d8b){var _0x5a6d0f={};_0x5a6d0f[_0x275d8b]={'$like':'%'+_0x1047c2[_0x096c('0x37')][_0x096c('0x42')]+'%'};return _0x5a6d0f;})});}_0x568cc0=_['merge']({},_0x568cc0,_0x1047c2['options']);return _0x40cecb['getActions'](_0x568cc0);}})[_0x096c('0x28')](function(_0x4fddb7){if(_0x4fddb7){_0x106ac2=_0x4fddb7[_0x096c('0x3b')];if(!_0x1047c2[_0x096c('0x37')][_0x096c('0x3c')](_0x096c('0x3d'))){_0x568cc0[_0x096c('0x21')]=qs[_0x096c('0x21')](_0x1047c2[_0x096c('0x37')]['limit']);_0x568cc0[_0x096c('0x1f')]=qs['offset'](_0x1047c2['query'][_0x096c('0x1f')]);}return _0x40cecb[_0x096c('0x60')](_0x568cc0);}})[_0x096c('0x28')](function(_0x42e211){if(_0x42e211){return _0x42e211?{'count':_0x106ac2,'rows':_0x42e211}:null;}})['then'](respondWithResult(_0x4e901a,null))[_0x096c('0x4b')](handleError(_0x4e901a,null));};
\ No newline at end of file
+var _0x1e62=['../../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','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','get','Triggers','UserProfileResource','sendStatus','error','stack','send','Trigger','rawAttributes','fieldName','type','key','model','map','name','keys','query','attributes','intersection','fields','length','order','sort','where','pick','filters','filter','merge','options','includeAll','include','findAll','rows','show','params','find','catch','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','body','TriggerAllId','Condition','create','addAnyCondition','TriggerAnyId','getAllConditions','hasOwnProperty','nolimit','getAnyConditions','addAction','TriggerId','getActions','findOne','eml-format','rimraf','moment','bluebird','mustache','sox','ejs','fs-extra','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis'];(function(_0x1834fb,_0x38bfa4){var _0x578b25=function(_0xb3980e){while(--_0xb3980e){_0x1834fb['push'](_0x1834fb['shift']());}};_0x578b25(++_0x38bfa4);}(_0x1e62,0xb1));var _0x21e6=function(_0xe854ef,_0x595f28){_0xe854ef=_0xe854ef-0x0;var _0x3fcc1d=_0x1e62[_0xe854ef];return _0x3fcc1d;};'use strict';var emlformat=require(_0x21e6('0x0'));var rimraf=require(_0x21e6('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x21e6('0x2'));var BPromise=require(_0x21e6('0x3'));var Mustache=require(_0x21e6('0x4'));var util=require('util');var path=require('path');var sox=require(_0x21e6('0x5'));var csv=require('to-csv');var ejs=require(_0x21e6('0x6'));var fs=require('fs');var fs_extra=require(_0x21e6('0x7'));var _=require('lodash');var squel=require(_0x21e6('0x8'));var crypto=require(_0x21e6('0x9'));var jsforce=require(_0x21e6('0xa'));var deskjs=require(_0x21e6('0xb'));var toCsv=require(_0x21e6('0xc'));var querystring=require('querystring');var Papa=require(_0x21e6('0xd'));var Redis=require(_0x21e6('0xe'));var authService=require(_0x21e6('0xf'));var qs=require(_0x21e6('0x10'));var as=require(_0x21e6('0x11'));var hardwareService=require(_0x21e6('0x12'));var logger=require(_0x21e6('0x13'))(_0x21e6('0x14'));var utils=require(_0x21e6('0x15'));var config=require(_0x21e6('0x16'));var licenseUtil=require(_0x21e6('0x17'));var db=require(_0x21e6('0x18'))['db'];function respondWithStatusCode(_0x4d7a4f,_0x6ad443){_0x6ad443=_0x6ad443||0xcc;return function(_0x287d83){if(_0x287d83){return _0x4d7a4f['sendStatus'](_0x6ad443);}return _0x4d7a4f[_0x21e6('0x19')](_0x6ad443)[_0x21e6('0x1a')]();};}function respondWithResult(_0x467098,_0x40d22c){_0x40d22c=_0x40d22c||0xc8;return function(_0xb7b0a9){if(_0xb7b0a9){return _0x467098[_0x21e6('0x19')](_0x40d22c)[_0x21e6('0x1b')](_0xb7b0a9);}};}function respondWithFilteredResult(_0x236012,_0x55c61e){return function(_0x21521d){if(_0x21521d){var _0x313afe=typeof _0x55c61e[_0x21e6('0x1c')]===_0x21e6('0x1d')&&typeof _0x55c61e[_0x21e6('0x1e')]===_0x21e6('0x1d');var _0x21b1a8=_0x21521d[_0x21e6('0x1f')];var _0x2403ff=_0x313afe?0x0:_0x55c61e['offset'];var _0x125e54=_0x313afe?_0x21521d[_0x21e6('0x1f')]:_0x55c61e[_0x21e6('0x1c')]+_0x55c61e[_0x21e6('0x1e')];var _0x38a65d;if(_0x125e54>=_0x21b1a8){_0x125e54=_0x21b1a8;_0x38a65d=0xc8;}else{_0x38a65d=0xce;}_0x236012['status'](_0x38a65d);return _0x236012[_0x21e6('0x20')](_0x21e6('0x21'),_0x2403ff+'-'+_0x125e54+'/'+_0x21b1a8)[_0x21e6('0x1b')](_0x21521d);}return null;};}function patchUpdates(_0x4df851){return function(_0x2b4c18){try{jsonpatch[_0x21e6('0x22')](_0x2b4c18,_0x4df851,!![]);}catch(_0x185d01){return BPromise[_0x21e6('0x23')](_0x185d01);}return _0x2b4c18[_0x21e6('0x24')]();};}function saveUpdates(_0xf7fab,_0x1c4dd4){return function(_0x34bb88){if(_0x34bb88){return _0x34bb88[_0x21e6('0x25')](_0xf7fab)[_0x21e6('0x26')](function(_0x22dda4){return _0x22dda4;});}return null;};}function removeEntity(_0x33dd6d,_0x6eccf3){return function(_0x125034){if(_0x125034){return _0x125034[_0x21e6('0x27')]()[_0x21e6('0x26')](function(){var _0x2b62fc=_0x125034[_0x21e6('0x28')]({'plain':!![]});var _0x357bf5=_0x21e6('0x29');return db[_0x21e6('0x2a')][_0x21e6('0x27')]({'where':{'type':_0x357bf5,'resourceId':_0x2b62fc['id']}})[_0x21e6('0x26')](function(){return _0x125034;});})[_0x21e6('0x26')](function(){_0x33dd6d[_0x21e6('0x19')](0xcc)[_0x21e6('0x1a')]();});}};}function handleEntityNotFound(_0x1805b3,_0x54f0d6){return function(_0x4771c2){if(!_0x4771c2){_0x1805b3[_0x21e6('0x2b')](0x194);}return _0x4771c2;};}function handleError(_0x228cc5,_0x3680b7){_0x3680b7=_0x3680b7||0x1f4;return function(_0x28d7c4){logger[_0x21e6('0x2c')](_0x28d7c4[_0x21e6('0x2d')]);if(_0x28d7c4['name']){delete _0x28d7c4['name'];}_0x228cc5[_0x21e6('0x19')](_0x3680b7)[_0x21e6('0x2e')](_0x28d7c4);};}exports['index']=function(_0x59696a,_0x423f91){var _0x2682ae={},_0x551b1f={},_0x21ac08={'count':0x0,'rows':[]};var _0x26987b=_['map'](db[_0x21e6('0x2f')][_0x21e6('0x30')],function(_0x3d3f4c){return{'name':_0x3d3f4c[_0x21e6('0x31')],'type':_0x3d3f4c[_0x21e6('0x32')][_0x21e6('0x33')]};});_0x551b1f[_0x21e6('0x34')]=_[_0x21e6('0x35')](_0x26987b,_0x21e6('0x36'));_0x551b1f['query']=_[_0x21e6('0x37')](_0x59696a[_0x21e6('0x38')]);_0x551b1f['filters']=_['intersection'](_0x551b1f[_0x21e6('0x34')],_0x551b1f[_0x21e6('0x38')]);_0x2682ae[_0x21e6('0x39')]=_[_0x21e6('0x3a')](_0x551b1f[_0x21e6('0x34')],qs[_0x21e6('0x3b')](_0x59696a[_0x21e6('0x38')][_0x21e6('0x3b')]));_0x2682ae[_0x21e6('0x39')]=_0x2682ae['attributes'][_0x21e6('0x3c')]?_0x2682ae[_0x21e6('0x39')]:_0x551b1f['model'];if(!_0x59696a[_0x21e6('0x38')]['hasOwnProperty']('nolimit')){_0x2682ae[_0x21e6('0x1e')]=qs[_0x21e6('0x1e')](_0x59696a[_0x21e6('0x38')][_0x21e6('0x1e')]);_0x2682ae[_0x21e6('0x1c')]=qs[_0x21e6('0x1c')](_0x59696a[_0x21e6('0x38')][_0x21e6('0x1c')]);}_0x2682ae[_0x21e6('0x3d')]=qs[_0x21e6('0x3e')](_0x59696a['query'][_0x21e6('0x3e')]);_0x2682ae[_0x21e6('0x3f')]=qs['filters'](_[_0x21e6('0x40')](_0x59696a['query'],_0x551b1f[_0x21e6('0x41')]),_0x26987b);if(_0x59696a['query'][_0x21e6('0x42')]){_0x2682ae[_0x21e6('0x3f')]=_[_0x21e6('0x43')](_0x2682ae['where'],{'$or':_[_0x21e6('0x35')](_0x26987b,function(_0x1f6a23){if(_0x1f6a23[_0x21e6('0x32')]!=='VIRTUAL'){var _0x16e1d0={};_0x16e1d0[_0x1f6a23[_0x21e6('0x36')]]={'$like':'%'+_0x59696a[_0x21e6('0x38')][_0x21e6('0x42')]+'%'};return _0x16e1d0;}})});}_0x2682ae=_[_0x21e6('0x43')]({},_0x2682ae,_0x59696a[_0x21e6('0x44')]);var _0x42fc3e={'where':_0x2682ae[_0x21e6('0x3f')]};return db[_0x21e6('0x2f')][_0x21e6('0x1f')](_0x42fc3e)[_0x21e6('0x26')](function(_0x32b09f){_0x21ac08[_0x21e6('0x1f')]=_0x32b09f;if(_0x59696a[_0x21e6('0x38')][_0x21e6('0x45')]){_0x2682ae[_0x21e6('0x46')]=[{'all':!![]}];}return db['Trigger'][_0x21e6('0x47')](_0x2682ae);})[_0x21e6('0x26')](function(_0x3e1ed2){_0x21ac08[_0x21e6('0x48')]=_0x3e1ed2;return _0x21ac08;})['then'](respondWithFilteredResult(_0x423f91,_0x2682ae))['catch'](handleError(_0x423f91,null));};exports[_0x21e6('0x49')]=function(_0x40674a,_0xd8a3d7){var _0x5d33e8={'raw':![],'where':{'id':_0x40674a[_0x21e6('0x4a')]['id']}},_0x302d2c={};_0x302d2c[_0x21e6('0x34')]=_[_0x21e6('0x37')](db[_0x21e6('0x2f')]['rawAttributes']);_0x302d2c['query']=_[_0x21e6('0x37')](_0x40674a['query']);_0x302d2c['filters']=_[_0x21e6('0x3a')](_0x302d2c[_0x21e6('0x34')],_0x302d2c[_0x21e6('0x38')]);_0x5d33e8[_0x21e6('0x39')]=_[_0x21e6('0x3a')](_0x302d2c['model'],qs[_0x21e6('0x3b')](_0x40674a['query'][_0x21e6('0x3b')]));_0x5d33e8[_0x21e6('0x39')]=_0x5d33e8[_0x21e6('0x39')][_0x21e6('0x3c')]?_0x5d33e8[_0x21e6('0x39')]:_0x302d2c[_0x21e6('0x34')];if(_0x40674a[_0x21e6('0x38')][_0x21e6('0x45')]){_0x5d33e8[_0x21e6('0x46')]=[{'all':!![]}];}_0x5d33e8=_[_0x21e6('0x43')]({},_0x5d33e8,_0x40674a[_0x21e6('0x44')]);return db[_0x21e6('0x2f')][_0x21e6('0x4b')](_0x5d33e8)['then'](handleEntityNotFound(_0xd8a3d7,null))[_0x21e6('0x26')](respondWithResult(_0xd8a3d7,null))[_0x21e6('0x4c')](handleError(_0xd8a3d7,null));};exports['create']=function(_0x1b6555,_0x539849){return db[_0x21e6('0x2f')]['create'](_0x1b6555['body'],{})[_0x21e6('0x26')](function(_0x1d4f57){var _0x360cc9=_0x1b6555[_0x21e6('0x4d')][_0x21e6('0x28')]({'plain':!![]});if(!_0x360cc9)throw new Error(_0x21e6('0x4e'));if(_0x360cc9['role']===_0x21e6('0x4d')){var _0x3403f1=_0x1d4f57[_0x21e6('0x28')]({'plain':!![]});var _0x4eefa3=_0x21e6('0x29');return db[_0x21e6('0x4f')][_0x21e6('0x4b')]({'where':{'name':_0x4eefa3,'userProfileId':_0x360cc9[_0x21e6('0x50')]},'raw':!![]})[_0x21e6('0x26')](function(_0x55178b){if(_0x55178b&&_0x55178b[_0x21e6('0x51')]===0x0){return db[_0x21e6('0x2a')]['create']({'name':_0x3403f1[_0x21e6('0x36')],'resourceId':_0x3403f1['id'],'type':_0x55178b[_0x21e6('0x36')],'sectionId':_0x55178b['id']},{})[_0x21e6('0x26')](function(){return _0x1d4f57;});}else{return _0x1d4f57;}})[_0x21e6('0x4c')](function(_0x21e242){logger[_0x21e6('0x2c')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x21e242);throw _0x21e242;});}return _0x1d4f57;})['then'](respondWithResult(_0x539849,0xc9))[_0x21e6('0x4c')](handleError(_0x539849,null));};exports[_0x21e6('0x25')]=function(_0x2cb479,_0x3dd843){if(_0x2cb479[_0x21e6('0x52')]['id']){delete _0x2cb479[_0x21e6('0x52')]['id'];}return db[_0x21e6('0x2f')][_0x21e6('0x4b')]({'where':{'id':_0x2cb479['params']['id']}})['then'](handleEntityNotFound(_0x3dd843,null))['then'](saveUpdates(_0x2cb479[_0x21e6('0x52')],null))[_0x21e6('0x26')](respondWithResult(_0x3dd843,null))['catch'](handleError(_0x3dd843,null));};exports['destroy']=function(_0x261f2c,_0xd25411){return db[_0x21e6('0x2f')][_0x21e6('0x4b')]({'where':{'id':_0x261f2c[_0x21e6('0x4a')]['id']}})[_0x21e6('0x26')](handleEntityNotFound(_0xd25411,null))[_0x21e6('0x26')](removeEntity(_0xd25411,null))[_0x21e6('0x4c')](handleError(_0xd25411,null));};exports['addAllCondition']=function(_0xd0bba4,_0x19cfe1,_0x193ff6){if(_0xd0bba4[_0x21e6('0x52')]['id']){delete _0xd0bba4[_0x21e6('0x52')]['id'];}return db[_0x21e6('0x2f')][_0x21e6('0x4b')]({'where':{'id':_0xd0bba4['params']['id']}})['then'](handleEntityNotFound(_0x19cfe1,null))[_0x21e6('0x26')](function(_0x36068d){if(_0x36068d){_0xd0bba4[_0x21e6('0x52')][_0x21e6('0x53')]=_0x36068d['id'];return db[_0x21e6('0x54')][_0x21e6('0x55')](_0xd0bba4[_0x21e6('0x52')]);}})[_0x21e6('0x26')](respondWithResult(_0x19cfe1,null))[_0x21e6('0x4c')](handleError(_0x19cfe1,null));};exports[_0x21e6('0x56')]=function(_0x4e3116,_0x130c0d,_0x3e4ddc){if(_0x4e3116[_0x21e6('0x52')]['id']){delete _0x4e3116[_0x21e6('0x52')]['id'];}return db[_0x21e6('0x2f')][_0x21e6('0x4b')]({'where':{'id':_0x4e3116[_0x21e6('0x4a')]['id']}})[_0x21e6('0x26')](handleEntityNotFound(_0x130c0d,null))[_0x21e6('0x26')](function(_0x109791){if(_0x109791){_0x4e3116[_0x21e6('0x52')][_0x21e6('0x57')]=_0x109791['id'];return db[_0x21e6('0x54')][_0x21e6('0x55')](_0x4e3116[_0x21e6('0x52')]);}})[_0x21e6('0x26')](respondWithResult(_0x130c0d,null))['catch'](handleError(_0x130c0d,null));};exports[_0x21e6('0x58')]=function(_0x92c657,_0x1a7240,_0x3360d7){var _0x4e9824={};var _0x5a0d61={};var _0xbcc12e;var _0x19e63a;return db[_0x21e6('0x2f')]['findOne']({'where':{'id':_0x92c657[_0x21e6('0x4a')]['id']}})[_0x21e6('0x26')](handleEntityNotFound(_0x1a7240,null))['then'](function(_0x270fa5){if(_0x270fa5){_0xbcc12e=_0x270fa5;_0x5a0d61['model']=_['keys'](db[_0x21e6('0x54')][_0x21e6('0x30')]);_0x5a0d61[_0x21e6('0x38')]=_['keys'](_0x92c657[_0x21e6('0x38')]);_0x5a0d61['filters']=_[_0x21e6('0x3a')](_0x5a0d61['model'],_0x5a0d61[_0x21e6('0x38')]);_0x4e9824[_0x21e6('0x39')]=_['intersection'](_0x5a0d61[_0x21e6('0x34')],qs[_0x21e6('0x3b')](_0x92c657[_0x21e6('0x38')][_0x21e6('0x3b')]));_0x4e9824[_0x21e6('0x39')]=_0x4e9824[_0x21e6('0x39')][_0x21e6('0x3c')]?_0x4e9824['attributes']:_0x5a0d61[_0x21e6('0x34')];_0x4e9824['order']=qs[_0x21e6('0x3e')](_0x92c657[_0x21e6('0x38')][_0x21e6('0x3e')]);_0x4e9824['where']=qs[_0x21e6('0x41')](_[_0x21e6('0x40')](_0x92c657['query'],_0x5a0d61[_0x21e6('0x41')]));if(_0x92c657[_0x21e6('0x38')]['filter']){_0x4e9824[_0x21e6('0x3f')]=_[_0x21e6('0x43')](_0x4e9824[_0x21e6('0x3f')],{'$or':_['map'](_0x4e9824[_0x21e6('0x39')],function(_0x109d44){var _0x11602e={};_0x11602e[_0x109d44]={'$like':'%'+_0x92c657[_0x21e6('0x38')][_0x21e6('0x42')]+'%'};return _0x11602e;})});}_0x4e9824=_['merge']({},_0x4e9824,_0x92c657['options']);return _0xbcc12e[_0x21e6('0x58')](_0x4e9824);}})[_0x21e6('0x26')](function(_0x2a2385){if(_0x2a2385){_0x19e63a=_0x2a2385['length'];if(!_0x92c657['query'][_0x21e6('0x59')](_0x21e6('0x5a'))){_0x4e9824[_0x21e6('0x1e')]=qs['limit'](_0x92c657[_0x21e6('0x38')][_0x21e6('0x1e')]);_0x4e9824[_0x21e6('0x1c')]=qs[_0x21e6('0x1c')](_0x92c657['query'][_0x21e6('0x1c')]);}return _0xbcc12e[_0x21e6('0x58')](_0x4e9824);}})[_0x21e6('0x26')](function(_0x488dfb){if(_0x488dfb){return _0x488dfb?{'count':_0x19e63a,'rows':_0x488dfb}:null;}})[_0x21e6('0x26')](respondWithResult(_0x1a7240,null))['catch'](handleError(_0x1a7240,null));};exports['getAnyConditions']=function(_0x3492db,_0x3a36c5,_0x324e17){var _0x33e0d4={};var _0x1bb27a={};var _0x57f249;var _0x1ddc82;return db[_0x21e6('0x2f')]['findOne']({'where':{'id':_0x3492db['params']['id']}})[_0x21e6('0x26')](handleEntityNotFound(_0x3a36c5,null))[_0x21e6('0x26')](function(_0x455d35){if(_0x455d35){_0x57f249=_0x455d35;_0x1bb27a[_0x21e6('0x34')]=_['keys'](db[_0x21e6('0x54')]['rawAttributes']);_0x1bb27a[_0x21e6('0x38')]=_[_0x21e6('0x37')](_0x3492db['query']);_0x1bb27a[_0x21e6('0x41')]=_[_0x21e6('0x3a')](_0x1bb27a['model'],_0x1bb27a['query']);_0x33e0d4['attributes']=_[_0x21e6('0x3a')](_0x1bb27a[_0x21e6('0x34')],qs[_0x21e6('0x3b')](_0x3492db['query'][_0x21e6('0x3b')]));_0x33e0d4[_0x21e6('0x39')]=_0x33e0d4[_0x21e6('0x39')]['length']?_0x33e0d4['attributes']:_0x1bb27a['model'];_0x33e0d4[_0x21e6('0x3d')]=qs[_0x21e6('0x3e')](_0x3492db[_0x21e6('0x38')][_0x21e6('0x3e')]);_0x33e0d4['where']=qs[_0x21e6('0x41')](_['pick'](_0x3492db[_0x21e6('0x38')],_0x1bb27a[_0x21e6('0x41')]));if(_0x3492db['query'][_0x21e6('0x42')]){_0x33e0d4[_0x21e6('0x3f')]=_[_0x21e6('0x43')](_0x33e0d4[_0x21e6('0x3f')],{'$or':_['map'](_0x33e0d4['attributes'],function(_0x5ce2c1){var _0xc52cc2={};_0xc52cc2[_0x5ce2c1]={'$like':'%'+_0x3492db[_0x21e6('0x38')][_0x21e6('0x42')]+'%'};return _0xc52cc2;})});}_0x33e0d4=_[_0x21e6('0x43')]({},_0x33e0d4,_0x3492db[_0x21e6('0x44')]);return _0x57f249[_0x21e6('0x5b')](_0x33e0d4);}})[_0x21e6('0x26')](function(_0x618028){if(_0x618028){_0x1ddc82=_0x618028[_0x21e6('0x3c')];if(!_0x3492db['query']['hasOwnProperty'](_0x21e6('0x5a'))){_0x33e0d4['limit']=qs[_0x21e6('0x1e')](_0x3492db[_0x21e6('0x38')][_0x21e6('0x1e')]);_0x33e0d4['offset']=qs[_0x21e6('0x1c')](_0x3492db[_0x21e6('0x38')][_0x21e6('0x1c')]);}return _0x57f249[_0x21e6('0x5b')](_0x33e0d4);}})[_0x21e6('0x26')](function(_0x5b20f6){if(_0x5b20f6){return _0x5b20f6?{'count':_0x1ddc82,'rows':_0x5b20f6}:null;}})[_0x21e6('0x26')](respondWithResult(_0x3a36c5,null))[_0x21e6('0x4c')](handleError(_0x3a36c5,null));};exports[_0x21e6('0x5c')]=function(_0x41be17,_0x3a0976,_0x5566b0){if(_0x41be17[_0x21e6('0x52')]['id']){delete _0x41be17[_0x21e6('0x52')]['id'];}return db['Trigger'][_0x21e6('0x4b')]({'where':{'id':_0x41be17[_0x21e6('0x4a')]['id']}})[_0x21e6('0x26')](handleEntityNotFound(_0x3a0976,null))[_0x21e6('0x26')](function(_0x128a2d){if(_0x128a2d){_0x41be17[_0x21e6('0x52')][_0x21e6('0x5d')]=_0x128a2d['id'];return db['Action'][_0x21e6('0x55')](_0x41be17[_0x21e6('0x52')]);}})[_0x21e6('0x26')](respondWithResult(_0x3a0976,null))['catch'](handleError(_0x3a0976,null));};exports[_0x21e6('0x5e')]=function(_0x5d5bb3,_0x8bf475,_0x3e14b2){var _0x25662b={};var _0x1ef6ed={};var _0x37fffc;var _0x46663c;return db[_0x21e6('0x2f')][_0x21e6('0x5f')]({'where':{'id':_0x5d5bb3[_0x21e6('0x4a')]['id']}})[_0x21e6('0x26')](handleEntityNotFound(_0x8bf475,null))[_0x21e6('0x26')](function(_0x53e088){if(_0x53e088){_0x37fffc=_0x53e088;_0x1ef6ed[_0x21e6('0x34')]=_[_0x21e6('0x37')](db['Action']['rawAttributes']);_0x1ef6ed[_0x21e6('0x38')]=_[_0x21e6('0x37')](_0x5d5bb3['query']);_0x1ef6ed[_0x21e6('0x41')]=_['intersection'](_0x1ef6ed['model'],_0x1ef6ed[_0x21e6('0x38')]);_0x25662b[_0x21e6('0x39')]=_['intersection'](_0x1ef6ed[_0x21e6('0x34')],qs['fields'](_0x5d5bb3[_0x21e6('0x38')][_0x21e6('0x3b')]));_0x25662b[_0x21e6('0x39')]=_0x25662b[_0x21e6('0x39')][_0x21e6('0x3c')]?_0x25662b[_0x21e6('0x39')]:_0x1ef6ed[_0x21e6('0x34')];_0x25662b[_0x21e6('0x3d')]=qs[_0x21e6('0x3e')](_0x5d5bb3[_0x21e6('0x38')][_0x21e6('0x3e')]);_0x25662b[_0x21e6('0x3f')]=qs[_0x21e6('0x41')](_['pick'](_0x5d5bb3[_0x21e6('0x38')],_0x1ef6ed[_0x21e6('0x41')]));if(_0x5d5bb3['query'][_0x21e6('0x42')]){_0x25662b['where']=_[_0x21e6('0x43')](_0x25662b[_0x21e6('0x3f')],{'$or':_['map'](_0x25662b[_0x21e6('0x39')],function(_0x62935){var _0xddbd78={};_0xddbd78[_0x62935]={'$like':'%'+_0x5d5bb3[_0x21e6('0x38')][_0x21e6('0x42')]+'%'};return _0xddbd78;})});}_0x25662b=_[_0x21e6('0x43')]({},_0x25662b,_0x5d5bb3[_0x21e6('0x44')]);return _0x37fffc[_0x21e6('0x5e')](_0x25662b);}})['then'](function(_0x5b6a21){if(_0x5b6a21){_0x46663c=_0x5b6a21[_0x21e6('0x3c')];if(!_0x5d5bb3[_0x21e6('0x38')][_0x21e6('0x59')](_0x21e6('0x5a'))){_0x25662b[_0x21e6('0x1e')]=qs[_0x21e6('0x1e')](_0x5d5bb3[_0x21e6('0x38')][_0x21e6('0x1e')]);_0x25662b[_0x21e6('0x1c')]=qs[_0x21e6('0x1c')](_0x5d5bb3[_0x21e6('0x38')][_0x21e6('0x1c')]);}return _0x37fffc['getActions'](_0x25662b);}})[_0x21e6('0x26')](function(_0x462b8a){if(_0x462b8a){return _0x462b8a?{'count':_0x46663c,'rows':_0x462b8a}:null;}})[_0x21e6('0x26')](respondWithResult(_0x8bf475,null))['catch'](handleError(_0x8bf475,null));};
\ No newline at end of file
index a4a1fc3..8ceef69 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xac9d=['bluebird','request-promise','path','../../config/environment','exports','define','Trigger','tools_triggers','lodash','util','../../config/logger','api','moment'];(function(_0x4c12ec,_0x2e9103){var _0x3ae42c=function(_0x5a728f){while(--_0x5a728f){_0x4c12ec['push'](_0x4c12ec['shift']());}};_0x3ae42c(++_0x2e9103);}(_0xac9d,0x14d));var _0xdac9=function(_0x528bb5,_0x119c5b){_0x528bb5=_0x528bb5-0x0;var _0x58e8ca=_0xac9d[_0x528bb5];return _0x58e8ca;};'use strict';var _=require(_0xdac9('0x0'));var util=require(_0xdac9('0x1'));var logger=require(_0xdac9('0x2'))(_0xdac9('0x3'));var moment=require(_0xdac9('0x4'));var BPromise=require(_0xdac9('0x5'));var rp=require(_0xdac9('0x6'));var fs=require('fs');var path=require(_0xdac9('0x7'));var rimraf=require('rimraf');var config=require(_0xdac9('0x8'));var attributes=require('./trigger.attributes');module[_0xdac9('0x9')]=function(_0x1f8ff3,_0x1222bb){return _0x1f8ff3[_0xdac9('0xa')](_0xdac9('0xb'),attributes,{'tableName':_0xdac9('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x3ee5=['rimraf','../../config/environment','./trigger.attributes','exports','define','tools_triggers','util','../../config/logger','moment','bluebird','request-promise','path'];(function(_0xaa1b3e,_0x47d976){var _0x454d7d=function(_0x575b32){while(--_0x575b32){_0xaa1b3e['push'](_0xaa1b3e['shift']());}};_0x454d7d(++_0x47d976);}(_0x3ee5,0x1b6));var _0x53ee=function(_0x4af753,_0x592a92){_0x4af753=_0x4af753-0x0;var _0x1c8b1b=_0x3ee5[_0x4af753];return _0x1c8b1b;};'use strict';var _=require('lodash');var util=require(_0x53ee('0x0'));var logger=require(_0x53ee('0x1'))('api');var moment=require(_0x53ee('0x2'));var BPromise=require(_0x53ee('0x3'));var rp=require(_0x53ee('0x4'));var fs=require('fs');var path=require(_0x53ee('0x5'));var rimraf=require(_0x53ee('0x6'));var config=require(_0x53ee('0x7'));var attributes=require(_0x53ee('0x8'));module[_0x53ee('0x9')]=function(_0x343bbb,_0x16ad68){return _0x343bbb[_0x53ee('0xa')]('Trigger',attributes,{'tableName':_0x53ee('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 3839a6a..1a1a6b4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc161=['catch','GetTrigger','findAll','raw','options','where','attributes','limit','include','map','model','ShowTrigger','Trigger','find','stringify','lodash','util','moment','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','request','info','Trigger,\x20%s,\x20%s','debug','request\x20sent','error','message'];(function(_0x22ad2d,_0x5172c6){var _0x5638f8=function(_0x3d5d5f){while(--_0x3d5d5f){_0x22ad2d['push'](_0x22ad2d['shift']());}};_0x5638f8(++_0x5172c6);}(_0xc161,0x6f));var _0x1c16=function(_0xa3fa3,_0x328285){_0xa3fa3=_0xa3fa3-0x0;var _0x488dd4=_0xc161[_0xa3fa3];return _0x488dd4;};'use strict';var _=require(_0x1c16('0x0'));var util=require(_0x1c16('0x1'));var moment=require(_0x1c16('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1c16('0x3'));var db=require(_0x1c16('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x1c16('0x5'))(_0x1c16('0x6'));var config=require('../../config/environment');var jayson=require(_0x1c16('0x7'));var client=jayson[_0x1c16('0x8')][_0x1c16('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x28e891,_0x612081,_0x6b00be){return new BPromise(function(_0x5bb77a,_0x4d9291){return client[_0x1c16('0xa')](_0x28e891,_0x6b00be)['then'](function(_0x48797b){logger[_0x1c16('0xb')](_0x1c16('0xc'),_0x612081,'request\x20sent');logger[_0x1c16('0xd')]('Trigger,\x20%s,\x20%s,\x20%s',_0x612081,_0x1c16('0xe'),JSON['stringify'](_0x48797b));if(_0x48797b[_0x1c16('0xf')]){if(_0x48797b[_0x1c16('0xf')]['code']===0x1f4){logger[_0x1c16('0xf')](_0x1c16('0xc'),_0x612081,_0x48797b[_0x1c16('0xf')][_0x1c16('0x10')]);return _0x4d9291(_0x48797b[_0x1c16('0xf')]['message']);}logger[_0x1c16('0xf')](_0x1c16('0xc'),_0x612081,_0x48797b[_0x1c16('0xf')][_0x1c16('0x10')]);return _0x5bb77a(_0x48797b[_0x1c16('0xf')][_0x1c16('0x10')]);}else{logger[_0x1c16('0xb')]('Trigger,\x20%s,\x20%s',_0x612081,_0x1c16('0xe'));_0x5bb77a(_0x48797b['result'][_0x1c16('0x10')]);}})[_0x1c16('0x11')](function(_0x19cf21){logger[_0x1c16('0xf')](_0x1c16('0xc'),_0x612081,_0x19cf21);_0x4d9291(_0x19cf21);});});}exports[_0x1c16('0x12')]=function(_0x2efe2a){var _0x210475=this;return new Promise(function(_0x593098,_0x1f10cc){return db['Trigger'][_0x1c16('0x13')]({'raw':_0x2efe2a['options']?_0x2efe2a['options'][_0x1c16('0x14')]===undefined?!![]:![]:!![],'where':_0x2efe2a[_0x1c16('0x15')]?_0x2efe2a[_0x1c16('0x15')][_0x1c16('0x16')]||null:null,'attributes':_0x2efe2a[_0x1c16('0x15')]?_0x2efe2a[_0x1c16('0x15')][_0x1c16('0x17')]||null:null,'limit':_0x2efe2a[_0x1c16('0x15')]?_0x2efe2a[_0x1c16('0x15')][_0x1c16('0x18')]||null:null,'include':_0x2efe2a[_0x1c16('0x15')]?_0x2efe2a[_0x1c16('0x15')][_0x1c16('0x19')]?_[_0x1c16('0x1a')](_0x2efe2a[_0x1c16('0x15')][_0x1c16('0x19')],function(_0x3b577c){return{'model':db[_0x3b577c[_0x1c16('0x1b')]],'as':_0x3b577c['as'],'attributes':_0x3b577c[_0x1c16('0x17')],'include':_0x3b577c[_0x1c16('0x19')]?_['map'](_0x3b577c['include'],function(_0x1ed876){return{'model':db[_0x1ed876['model']],'as':_0x1ed876['as'],'attributes':_0x1ed876[_0x1c16('0x17')],'include':_0x1ed876[_0x1c16('0x19')]?_['map'](_0x1ed876['include'],function(_0x4a1115){return{'model':db[_0x4a1115['model']],'as':_0x4a1115['as'],'attributes':_0x4a1115['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x481266){logger['info']('GetTrigger',_0x2efe2a);logger['debug'](_0x1c16('0x12'),_0x2efe2a,JSON['stringify'](_0x481266));_0x593098(_0x481266);})['catch'](function(_0x20148e){logger[_0x1c16('0xf')](_0x1c16('0x12'),_0x20148e[_0x1c16('0x10')],_0x2efe2a);_0x1f10cc(_0x210475[_0x1c16('0xf')](0x1f4,_0x20148e[_0x1c16('0x10')]));});});};exports[_0x1c16('0x1c')]=function(_0x545d88){var _0xd98689=this;return new Promise(function(_0x4f6f49,_0x1877d4){return db[_0x1c16('0x1d')][_0x1c16('0x1e')]({'raw':_0x545d88[_0x1c16('0x15')]?_0x545d88['options'][_0x1c16('0x14')]===undefined?!![]:![]:!![],'where':_0x545d88[_0x1c16('0x15')]?_0x545d88[_0x1c16('0x15')][_0x1c16('0x16')]||null:null,'attributes':_0x545d88['options']?_0x545d88[_0x1c16('0x15')][_0x1c16('0x17')]||null:null,'include':_0x545d88[_0x1c16('0x15')]?_0x545d88[_0x1c16('0x15')][_0x1c16('0x19')]?_[_0x1c16('0x1a')](_0x545d88[_0x1c16('0x15')]['include'],function(_0x245229){return{'model':db[_0x245229['model']],'as':_0x245229['as'],'attributes':_0x245229[_0x1c16('0x17')],'include':_0x245229[_0x1c16('0x19')]?_[_0x1c16('0x1a')](_0x245229['include'],function(_0x2eff75){return{'model':db[_0x2eff75[_0x1c16('0x1b')]],'as':_0x2eff75['as'],'attributes':_0x2eff75[_0x1c16('0x17')],'include':_0x2eff75[_0x1c16('0x19')]?_['map'](_0x2eff75[_0x1c16('0x19')],function(_0x397c31){return{'model':db[_0x397c31[_0x1c16('0x1b')]],'as':_0x397c31['as'],'attributes':_0x397c31[_0x1c16('0x17')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x392b8d){logger[_0x1c16('0xb')](_0x1c16('0x1c'),_0x545d88);logger['debug'](_0x1c16('0x1c'),_0x545d88,JSON[_0x1c16('0x1f')](_0x392b8d));_0x4f6f49(_0x392b8d);})[_0x1c16('0x11')](function(_0x41d413){logger[_0x1c16('0xf')]('ShowTrigger',_0x41d413['message'],_0x545d88);_0x1877d4(_0xd98689[_0x1c16('0xf')](0x1f4,_0x41d413[_0x1c16('0x10')]));});});};
\ No newline at end of file
+var _0xa4b6=['message','result','GetTrigger','Trigger','findAll','options','raw','where','attributes','limit','include','map','model','then','ShowTrigger','find','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','info','Trigger,\x20%s,\x20%s','request\x20sent','debug','Trigger,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x2d4085,_0x236a28){var _0x4f78cb=function(_0x5cca18){while(--_0x5cca18){_0x2d4085['push'](_0x2d4085['shift']());}};_0x4f78cb(++_0x236a28);}(_0xa4b6,0x7f));var _0x6a4b=function(_0x4126ec,_0x4fd9c4){_0x4126ec=_0x4126ec-0x0;var _0x550a4e=_0xa4b6[_0x4126ec];return _0x550a4e;};'use strict';var _=require('lodash');var util=require(_0x6a4b('0x0'));var moment=require(_0x6a4b('0x1'));var BPromise=require(_0x6a4b('0x2'));var rs=require(_0x6a4b('0x3'));var fs=require('fs');var Redis=require(_0x6a4b('0x4'));var db=require(_0x6a4b('0x5'))['db'];var utils=require(_0x6a4b('0x6'));var logger=require(_0x6a4b('0x7'))(_0x6a4b('0x8'));var config=require(_0x6a4b('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x6a4b('0xa')][_0x6a4b('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x124164,_0x36f8e8,_0x382fdc){return new BPromise(function(_0x53b613,_0x3e4c73){return client[_0x6a4b('0xc')](_0x124164,_0x382fdc)['then'](function(_0x5f02ac){logger[_0x6a4b('0xd')](_0x6a4b('0xe'),_0x36f8e8,_0x6a4b('0xf'));logger[_0x6a4b('0x10')](_0x6a4b('0x11'),_0x36f8e8,_0x6a4b('0xf'),JSON[_0x6a4b('0x12')](_0x5f02ac));if(_0x5f02ac[_0x6a4b('0x13')]){if(_0x5f02ac[_0x6a4b('0x13')][_0x6a4b('0x14')]===0x1f4){logger[_0x6a4b('0x13')](_0x6a4b('0xe'),_0x36f8e8,_0x5f02ac[_0x6a4b('0x13')]['message']);return _0x3e4c73(_0x5f02ac['error'][_0x6a4b('0x15')]);}logger['error'](_0x6a4b('0xe'),_0x36f8e8,_0x5f02ac[_0x6a4b('0x13')][_0x6a4b('0x15')]);return _0x53b613(_0x5f02ac[_0x6a4b('0x13')][_0x6a4b('0x15')]);}else{logger['info'](_0x6a4b('0xe'),_0x36f8e8,_0x6a4b('0xf'));_0x53b613(_0x5f02ac[_0x6a4b('0x16')]['message']);}})['catch'](function(_0x58da3a){logger['error'](_0x6a4b('0xe'),_0x36f8e8,_0x58da3a);_0x3e4c73(_0x58da3a);});});}exports[_0x6a4b('0x17')]=function(_0x5c5004){var _0x3c0bf6=this;return new Promise(function(_0x40185d,_0x40f77e){return db[_0x6a4b('0x18')][_0x6a4b('0x19')]({'raw':_0x5c5004[_0x6a4b('0x1a')]?_0x5c5004['options'][_0x6a4b('0x1b')]===undefined?!![]:![]:!![],'where':_0x5c5004[_0x6a4b('0x1a')]?_0x5c5004[_0x6a4b('0x1a')][_0x6a4b('0x1c')]||null:null,'attributes':_0x5c5004[_0x6a4b('0x1a')]?_0x5c5004[_0x6a4b('0x1a')][_0x6a4b('0x1d')]||null:null,'limit':_0x5c5004[_0x6a4b('0x1a')]?_0x5c5004[_0x6a4b('0x1a')][_0x6a4b('0x1e')]||null:null,'include':_0x5c5004[_0x6a4b('0x1a')]?_0x5c5004[_0x6a4b('0x1a')][_0x6a4b('0x1f')]?_[_0x6a4b('0x20')](_0x5c5004['options'][_0x6a4b('0x1f')],function(_0x58db90){return{'model':db[_0x58db90[_0x6a4b('0x21')]],'as':_0x58db90['as'],'attributes':_0x58db90[_0x6a4b('0x1d')],'include':_0x58db90[_0x6a4b('0x1f')]?_['map'](_0x58db90[_0x6a4b('0x1f')],function(_0x1f7b45){return{'model':db[_0x1f7b45[_0x6a4b('0x21')]],'as':_0x1f7b45['as'],'attributes':_0x1f7b45[_0x6a4b('0x1d')],'include':_0x1f7b45['include']?_[_0x6a4b('0x20')](_0x1f7b45[_0x6a4b('0x1f')],function(_0x29acc){return{'model':db[_0x29acc['model']],'as':_0x29acc['as'],'attributes':_0x29acc[_0x6a4b('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x6a4b('0x22')](function(_0x2fb753){logger['info'](_0x6a4b('0x17'),_0x5c5004);logger[_0x6a4b('0x10')](_0x6a4b('0x17'),_0x5c5004,JSON['stringify'](_0x2fb753));_0x40185d(_0x2fb753);})['catch'](function(_0x955cbf){logger[_0x6a4b('0x13')](_0x6a4b('0x17'),_0x955cbf[_0x6a4b('0x15')],_0x5c5004);_0x40f77e(_0x3c0bf6['error'](0x1f4,_0x955cbf['message']));});});};exports[_0x6a4b('0x23')]=function(_0x4c59ee){var _0xebdf0d=this;return new Promise(function(_0x11aeb3,_0x4063c3){return db[_0x6a4b('0x18')][_0x6a4b('0x24')]({'raw':_0x4c59ee[_0x6a4b('0x1a')]?_0x4c59ee[_0x6a4b('0x1a')][_0x6a4b('0x1b')]===undefined?!![]:![]:!![],'where':_0x4c59ee[_0x6a4b('0x1a')]?_0x4c59ee[_0x6a4b('0x1a')][_0x6a4b('0x1c')]||null:null,'attributes':_0x4c59ee[_0x6a4b('0x1a')]?_0x4c59ee[_0x6a4b('0x1a')][_0x6a4b('0x1d')]||null:null,'include':_0x4c59ee[_0x6a4b('0x1a')]?_0x4c59ee['options']['include']?_['map'](_0x4c59ee[_0x6a4b('0x1a')]['include'],function(_0x1029f8){return{'model':db[_0x1029f8[_0x6a4b('0x21')]],'as':_0x1029f8['as'],'attributes':_0x1029f8[_0x6a4b('0x1d')],'include':_0x1029f8[_0x6a4b('0x1f')]?_[_0x6a4b('0x20')](_0x1029f8[_0x6a4b('0x1f')],function(_0x1aad19){return{'model':db[_0x1aad19['model']],'as':_0x1aad19['as'],'attributes':_0x1aad19[_0x6a4b('0x1d')],'include':_0x1aad19[_0x6a4b('0x1f')]?_[_0x6a4b('0x20')](_0x1aad19['include'],function(_0x3abe6d){return{'model':db[_0x3abe6d[_0x6a4b('0x21')]],'as':_0x3abe6d['as'],'attributes':_0x3abe6d['attributes']};}):[]};}):[]};}):[]:[]})[_0x6a4b('0x22')](function(_0xe7c66d){logger[_0x6a4b('0xd')](_0x6a4b('0x23'),_0x4c59ee);logger[_0x6a4b('0x10')](_0x6a4b('0x23'),_0x4c59ee,JSON[_0x6a4b('0x12')](_0xe7c66d));_0x11aeb3(_0xe7c66d);})['catch'](function(_0x57a927){logger[_0x6a4b('0x13')](_0x6a4b('0x23'),_0x57a927[_0x6a4b('0x15')],_0x4c59ee);_0x4063c3(_0xebdf0d[_0x6a4b('0x13')](0x1f4,_0x57a927[_0x6a4b('0x15')]));});});};
\ No newline at end of file
index e40599b..3f3349d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8115=['multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./trunk.controller','get','isAuthenticated','show','post','/:id/clone','clone','create','/:id','update','delete','destroy','exports'];(function(_0x903b8,_0x748a72){var _0x115ca6=function(_0x19fa66){while(--_0x19fa66){_0x903b8['push'](_0x903b8['shift']());}};_0x115ca6(++_0x748a72);}(_0x8115,0x108));var _0x5811=function(_0x1aced1,_0x120d53){_0x1aced1=_0x1aced1-0x0;var _0x42f54d=_0x8115[_0x1aced1];return _0x42f54d;};'use strict';var multer=require(_0x5811('0x0'));var util=require(_0x5811('0x1'));var path=require(_0x5811('0x2'));var timeout=require(_0x5811('0x3'));var express=require('express');var router=express[_0x5811('0x4')]();var fs_extra=require(_0x5811('0x5'));var auth=require(_0x5811('0x6'));var interaction=require(_0x5811('0x7'));var config=require(_0x5811('0x8'));var controller=require(_0x5811('0x9'));router[_0x5811('0xa')]('/',auth[_0x5811('0xb')](),controller['index']);router[_0x5811('0xa')]('/:id',auth[_0x5811('0xb')](),controller[_0x5811('0xc')]);router[_0x5811('0xd')](_0x5811('0xe'),auth[_0x5811('0xb')](),controller[_0x5811('0xf')]);router[_0x5811('0xd')]('/',auth['isAuthenticated'](),controller[_0x5811('0x10')]);router['put'](_0x5811('0x11'),auth[_0x5811('0xb')](),controller[_0x5811('0x12')]);router[_0x5811('0x13')](_0x5811('0x11'),auth[_0x5811('0xb')](),controller[_0x5811('0x14')]);module[_0x5811('0x15')]=router;
\ No newline at end of file
+var _0xe4fa=['delete','destroy','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','show','/:id/clone','clone','create','/:id','update'];(function(_0x400a07,_0x22316f){var _0x24c9fb=function(_0x78e188){while(--_0x78e188){_0x400a07['push'](_0x400a07['shift']());}};_0x24c9fb(++_0x22316f);}(_0xe4fa,0x1f0));var _0xae4f=function(_0x448e60,_0xa612f2){_0x448e60=_0x448e60-0x0;var _0x1603a0=_0xe4fa[_0x448e60];return _0x1603a0;};'use strict';var multer=require(_0xae4f('0x0'));var util=require(_0xae4f('0x1'));var path=require(_0xae4f('0x2'));var timeout=require(_0xae4f('0x3'));var express=require(_0xae4f('0x4'));var router=express['Router']();var fs_extra=require(_0xae4f('0x5'));var auth=require(_0xae4f('0x6'));var interaction=require(_0xae4f('0x7'));var config=require('../../config/environment');var controller=require('./trunk.controller');router[_0xae4f('0x8')]('/',auth[_0xae4f('0x9')](),controller[_0xae4f('0xa')]);router['get']('/:id',auth[_0xae4f('0x9')](),controller[_0xae4f('0xb')]);router['post'](_0xae4f('0xc'),auth[_0xae4f('0x9')](),controller[_0xae4f('0xd')]);router['post']('/',auth[_0xae4f('0x9')](),controller[_0xae4f('0xe')]);router['put'](_0xae4f('0xf'),auth['isAuthenticated'](),controller[_0xae4f('0x10')]);router[_0xae4f('0x11')]('/:id',auth[_0xae4f('0x9')](),controller[_0xae4f('0x12')]);module['exports']=router;
\ No newline at end of file
index 537142a..a7dc50e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x83bc=['update','outgoing','force_rport,comedia','setDataValue','nat','split','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]','all','ulaw;alaw;gsm','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','\x22\x22\x20<>','INTEGER','always','accept','originate','uac','uas','fingerprint','active','passive','actpass','update,nonat','BOOLEAN','sequelize','exports','STRING','name','ENUM','friend','peer','ALLOWED_NOT_SCREENED','ALLOWED_PASSED_SCREEN','ALLOWED_FAILED_SCREEN','ALLOWED','PROHIB_PASSED_SCREEN','PROHIB_FAILED_SCREEN','PROHIB','udp','transport','join','getDataValue','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]','rfc2833','info','shortinfo','auto','yes','nonat'];(function(_0x2b8077,_0x453634){var _0x308091=function(_0x426df7){while(--_0x426df7){_0x2b8077['push'](_0x2b8077['shift']());}};_0x308091(++_0x453634);}(_0x83bc,0x18f));var _0xc83b=function(_0x4d64e0,_0x1b7efb){_0x4d64e0=_0x4d64e0-0x0;var _0x54f3d6=_0x83bc[_0x4d64e0];return _0x54f3d6;};'use strict';var Sequelize=require(_0xc83b('0x0'));module[_0xc83b('0x1')]={'name':{'type':Sequelize[_0xc83b('0x2')],'allowNull':![],'unique':_0xc83b('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x5'),'user',_0xc83b('0x6')),'allowNull':![],'defaultValue':_0xc83b('0x5')},'context':{'type':Sequelize[_0xc83b('0x2')],'allowNull':![],'defaultValue':'from-voip-provider'},'callingpres':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x7'),_0xc83b('0x8'),_0xc83b('0x9'),_0xc83b('0xa'),'PROHIB_NOT_SCREENED',_0xc83b('0xb'),_0xc83b('0xc'),_0xc83b('0xd'))},'deny':{'type':Sequelize[_0xc83b('0x2')]},'permit':{'type':Sequelize[_0xc83b('0x2')]},'secret':{'type':Sequelize[_0xc83b('0x2')]},'md5secret':{'type':Sequelize[_0xc83b('0x2')]},'remotesecret':{'type':Sequelize[_0xc83b('0x2')]},'transport':{'type':Sequelize[_0xc83b('0x2')],'defaultValue':_0xc83b('0xe'),'set':function(_0x30b40a){this['setDataValue'](_0xc83b('0xf'),_0x30b40a?_0x30b40a[_0xc83b('0x10')](','):null);},'get':function(){return this[_0xc83b('0x11')]('transport')?this[_0xc83b('0x11')](_0xc83b('0xf'))['split'](','):null;},'comment':_0xc83b('0x12')},'dtmfmode':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x13'),_0xc83b('0x14'),_0xc83b('0x15'),'inband',_0xc83b('0x16')),'defaultValue':'rfc2833'},'directmedia':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x17'),'no',_0xc83b('0x18'),_0xc83b('0x19'),_0xc83b('0x1a')),'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x17'),'no'),'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0xc83b('0x2')]},'directmediadeny':{'type':Sequelize[_0xc83b('0x2')]},'nat':{'type':Sequelize[_0xc83b('0x2')],'defaultValue':_0xc83b('0x1b'),'set':function(_0x5d7e41){this[_0xc83b('0x1c')](_0xc83b('0x1d'),_0x5d7e41?_0x5d7e41[_0xc83b('0x10')](','):null);},'get':function(){return this[_0xc83b('0x11')]('nat')?this[_0xc83b('0x11')]('nat')[_0xc83b('0x1e')](','):null;},'comment':_0xc83b('0x1f')},'callgroup':{'type':Sequelize[_0xc83b('0x2')]},'namedcallgroup':{'type':Sequelize['STRING']},'pickupgroup':{'type':Sequelize[_0xc83b('0x2')]},'namedpickupgroup':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0xc83b('0x2')],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0xc83b('0x2')],'allowNull':!![]},'disallow':{'type':Sequelize[_0xc83b('0x2')],'defaultValue':_0xc83b('0x20')},'allow':{'type':Sequelize[_0xc83b('0x2')],'allowNull':![],'defaultValue':_0xc83b('0x21'),'set':function(_0x176440){this[_0xc83b('0x1c')]('allow',_0x176440?_0x176440[_0xc83b('0x10')](';'):_0xc83b('0x21'));},'get':function(){return this[_0xc83b('0x11')]('allow')?this[_0xc83b('0x11')](_0xc83b('0x22'))[_0xc83b('0x1e')](';'):null;},'comment':_0xc83b('0x23')},'autoframing':{'type':Sequelize[_0xc83b('0x4')]('yes','no')},'insecure':{'type':Sequelize['STRING'],'defaultValue':_0xc83b('0x24'),'set':function(_0x202258){this[_0xc83b('0x1c')](_0xc83b('0x25'),_0x202258?_0x202258['join'](','):null);},'get':function(){return this['getDataValue'](_0xc83b('0x25'))?this[_0xc83b('0x11')]('insecure')[_0xc83b('0x1e')](','):null;},'comment':_0xc83b('0x26')},'trustrpid':{'type':Sequelize['ENUM'](_0xc83b('0x17'),'no'),'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x17'),'no'),'defaultValue':'no'},'progressinband':{'type':Sequelize[_0xc83b('0x4')]('yes','no',_0xc83b('0x27'))},'promiscredir':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x17'),'no')},'useclientcode':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x17'),'no')},'accountcode':{'type':Sequelize['INTEGER'](0xb)},'setvar':{'type':Sequelize[_0xc83b('0x2')]},'callerid':{'type':Sequelize[_0xc83b('0x2')],'defaultValue':_0xc83b('0x28')},'amaflags':{'type':Sequelize['STRING']},'callcounter':{'type':Sequelize['ENUM'](_0xc83b('0x17'),'no'),'defaultValue':_0xc83b('0x17')},'busylevel':{'type':Sequelize[_0xc83b('0x29')](0xb)},'allowoverlap':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x17'),'no')},'allowsubscribe':{'type':Sequelize['ENUM'](_0xc83b('0x17'),'no')},'allowtransfer':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x17'),'no')},'ignoresdpversion':{'type':Sequelize['ENUM'](_0xc83b('0x17'),'no')},'subscribecontext':{'type':Sequelize[_0xc83b('0x2')]},'template':{'type':Sequelize[_0xc83b('0x2')]},'videosupport':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x17'),'no',_0xc83b('0x2a')),'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize[_0xc83b('0x29')](0xb)},'rfc2833compensate':{'type':Sequelize[_0xc83b('0x4')]('yes','no')},'mailbox':{'type':Sequelize[_0xc83b('0x2')]},'session_timers':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x2b'),'refuse',_0xc83b('0x2c'))},'session_expires':{'type':Sequelize[_0xc83b('0x29')](0xb)},'session_minse':{'type':Sequelize[_0xc83b('0x29')](0xb)},'session_refresher':{'type':Sequelize['ENUM'](_0xc83b('0x2d'),_0xc83b('0x2e')),'defaultValue':_0xc83b('0x2e')},'t38pt_usertpsource':{'type':Sequelize[_0xc83b('0x2')]},'regexten':{'type':Sequelize['STRING']},'fromdomain':{'type':Sequelize[_0xc83b('0x2')]},'fromuser':{'type':Sequelize[_0xc83b('0x2')]},'port':{'type':Sequelize[_0xc83b('0x29')](0x5)},'qualify':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x17'),'no'),'defaultValue':'yes'},'keepalive':{'type':Sequelize[_0xc83b('0x29')](0xb)},'defaultip':{'type':Sequelize['STRING']},'defaultuser':{'type':Sequelize[_0xc83b('0x2')]},'rtptimeout':{'type':Sequelize[_0xc83b('0x29')](0xb)},'rtpholdtimeout':{'type':Sequelize[_0xc83b('0x29')](0xb)},'rtpkeepalive':{'type':Sequelize[_0xc83b('0x29')](0xb)},'sendrpid':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x17'),'no','pai'),'defaultValue':'no'},'outboundproxy':{'type':Sequelize['STRING']},'callbackextension':{'type':Sequelize[_0xc83b('0x2')]},'timert1':{'type':Sequelize[_0xc83b('0x29')](0xb)},'timerb':{'type':Sequelize[_0xc83b('0x29')](0xb)},'qualifyfreq':{'type':Sequelize[_0xc83b('0x29')](0xb)},'contactpermit':{'type':Sequelize[_0xc83b('0x2')]},'contactdeny':{'type':Sequelize[_0xc83b('0x2')]},'contactacl':{'type':Sequelize[_0xc83b('0x2')]},'unsolicited_mailbox':{'type':Sequelize[_0xc83b('0x2')]},'use_q850_reason':{'type':Sequelize[_0xc83b('0x2')]},'maxforwards':{'type':Sequelize[_0xc83b('0x29')](0xb)},'encryption':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x17'),'no'),'defaultValue':'no'},'avpf':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x17'),'no')},'force_avp':{'type':Sequelize['ENUM'](_0xc83b('0x17'),'no')},'icesupport':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x17'),'no')},'dtlsenable':{'type':Sequelize['ENUM'](_0xc83b('0x17'),'no')},'dtlsverify':{'type':Sequelize['ENUM'](_0xc83b('0x17'),'no',_0xc83b('0x2f'),'certificate')},'dtlsrekey':{'type':Sequelize[_0xc83b('0x29')](0xb)},'dtlscertfile':{'type':Sequelize[_0xc83b('0x2')]},'dtlsprivatekey':{'type':Sequelize[_0xc83b('0x2')]},'dtlscipher':{'type':Sequelize['STRING']},'dtlscafile':{'type':Sequelize[_0xc83b('0x2')]},'dtlscapath':{'type':Sequelize[_0xc83b('0x2')]},'dtlssetup':{'type':Sequelize['ENUM'](_0xc83b('0x30'),_0xc83b('0x31'),_0xc83b('0x32')),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0xc83b('0x2')]},'usereqphone':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x17'),'no'),'defaultValue':'no'},'recordonfeature':{'type':Sequelize[_0xc83b('0x2')]},'recordofffeature':{'type':Sequelize[_0xc83b('0x2')]},'call_limit':{'type':Sequelize[_0xc83b('0x29')](0xb),'defaultValue':0x3e8},'registertrying':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x17'),'no')},'subscribemwi':{'type':Sequelize['ENUM'](_0xc83b('0x17'),'no')},'vmexten':{'type':Sequelize['STRING']},'mohinterpret':{'type':Sequelize[_0xc83b('0x2')]},'mohsuggest':{'type':Sequelize[_0xc83b('0x2')]},'parkinglot':{'type':Sequelize[_0xc83b('0x2')]},'description':{'type':Sequelize['STRING']},'host':{'type':Sequelize[_0xc83b('0x2')],'defaultValue':'dynamic'},'canreinvite':{'type':Sequelize[_0xc83b('0x4')](_0xc83b('0x17'),'no','nonat',_0xc83b('0x19'),_0xc83b('0x33')),'defaultValue':'no'},'registry':{'type':Sequelize[_0xc83b('0x2')]},'otherFields':{'type':Sequelize[_0xc83b('0x2')]},'active':{'type':Sequelize[_0xc83b('0x34')],'allowNull':![],'defaultValue':!![]},'t38pt_udptl':{'type':Sequelize[_0xc83b('0x2')],'defaultValue':'no'}};
\ No newline at end of file
+var _0x9508=['STRING','ENUM','friend','user','peer','from-voip-provider','ALLOWED_NOT_SCREENED','ALLOWED_PASSED_SCREEN','PROHIB_NOT_SCREENED','PROHIB_FAILED_SCREEN','udp','setDataValue','transport','join','getDataValue','split','shortinfo','inband','auto','rfc2833','nonat','update','outgoing','yes','force_rport,comedia','nat','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]','all','allow','ulaw;alaw;gsm','insecure','\x22\x22\x20<>','INTEGER','always','accept','refuse','originate','uac','uas','pai','certificate','passive','actpass','dynamic','update,nonat','BOOLEAN','exports'];(function(_0x304efc,_0x2c6a48){var _0x34e2b9=function(_0x327c24){while(--_0x327c24){_0x304efc['push'](_0x304efc['shift']());}};_0x34e2b9(++_0x2c6a48);}(_0x9508,0x148));var _0x8950=function(_0x2e6270,_0x31a6a0){_0x2e6270=_0x2e6270-0x0;var _0x1ceb6b=_0x9508[_0x2e6270];return _0x1ceb6b;};'use strict';var Sequelize=require('sequelize');module[_0x8950('0x0')]={'name':{'type':Sequelize[_0x8950('0x1')],'allowNull':![],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x3'),_0x8950('0x4'),_0x8950('0x5')),'allowNull':![],'defaultValue':_0x8950('0x3')},'context':{'type':Sequelize[_0x8950('0x1')],'allowNull':![],'defaultValue':_0x8950('0x6')},'callingpres':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x7'),_0x8950('0x8'),'ALLOWED_FAILED_SCREEN','ALLOWED',_0x8950('0x9'),'PROHIB_PASSED_SCREEN',_0x8950('0xa'),'PROHIB')},'deny':{'type':Sequelize[_0x8950('0x1')]},'permit':{'type':Sequelize['STRING']},'secret':{'type':Sequelize[_0x8950('0x1')]},'md5secret':{'type':Sequelize['STRING']},'remotesecret':{'type':Sequelize[_0x8950('0x1')]},'transport':{'type':Sequelize[_0x8950('0x1')],'defaultValue':_0x8950('0xb'),'set':function(_0x1d99fd){this[_0x8950('0xc')](_0x8950('0xd'),_0x1d99fd?_0x1d99fd[_0x8950('0xe')](','):null);},'get':function(){return this[_0x8950('0xf')]('transport')?this[_0x8950('0xf')](_0x8950('0xd'))[_0x8950('0x10')](','):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]'},'dtmfmode':{'type':Sequelize[_0x8950('0x2')]('rfc2833','info',_0x8950('0x11'),_0x8950('0x12'),_0x8950('0x13')),'defaultValue':_0x8950('0x14')},'directmedia':{'type':Sequelize[_0x8950('0x2')]('yes','no',_0x8950('0x15'),_0x8950('0x16'),_0x8950('0x17')),'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x18'),'no'),'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0x8950('0x1')]},'directmediadeny':{'type':Sequelize[_0x8950('0x1')]},'nat':{'type':Sequelize[_0x8950('0x1')],'defaultValue':_0x8950('0x19'),'set':function(_0xb29146){this[_0x8950('0xc')](_0x8950('0x1a'),_0xb29146?_0xb29146[_0x8950('0xe')](','):null);},'get':function(){return this['getDataValue']('nat')?this[_0x8950('0xf')](_0x8950('0x1a'))[_0x8950('0x10')](','):null;},'comment':_0x8950('0x1b')},'callgroup':{'type':Sequelize[_0x8950('0x1')]},'namedcallgroup':{'type':Sequelize[_0x8950('0x1')]},'pickupgroup':{'type':Sequelize['STRING']},'namedpickupgroup':{'type':Sequelize[_0x8950('0x1')]},'language':{'type':Sequelize['STRING'],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0x8950('0x1')],'allowNull':!![]},'disallow':{'type':Sequelize[_0x8950('0x1')],'defaultValue':_0x8950('0x1c')},'allow':{'type':Sequelize[_0x8950('0x1')],'allowNull':![],'defaultValue':'ulaw;alaw;gsm','set':function(_0x3993ea){this[_0x8950('0xc')](_0x8950('0x1d'),_0x3993ea?_0x3993ea[_0x8950('0xe')](';'):_0x8950('0x1e'));},'get':function(){return this['getDataValue'](_0x8950('0x1d'))?this[_0x8950('0xf')](_0x8950('0x1d'))[_0x8950('0x10')](';'):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22alaw\x22]'},'autoframing':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x18'),'no')},'insecure':{'type':Sequelize[_0x8950('0x1')],'defaultValue':'port,invite','set':function(_0x3e19cd){this[_0x8950('0xc')]('insecure',_0x3e19cd?_0x3e19cd[_0x8950('0xe')](','):null);},'get':function(){return this[_0x8950('0xf')](_0x8950('0x1f'))?this[_0x8950('0xf')](_0x8950('0x1f'))[_0x8950('0x10')](','):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]'},'trustrpid':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x18'),'no'),'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize['ENUM'](_0x8950('0x18'),'no'),'defaultValue':'no'},'progressinband':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x18'),'no','never')},'promiscredir':{'type':Sequelize[_0x8950('0x2')]('yes','no')},'useclientcode':{'type':Sequelize['ENUM'](_0x8950('0x18'),'no')},'accountcode':{'type':Sequelize['INTEGER'](0xb)},'setvar':{'type':Sequelize[_0x8950('0x1')]},'callerid':{'type':Sequelize[_0x8950('0x1')],'defaultValue':_0x8950('0x20')},'amaflags':{'type':Sequelize[_0x8950('0x1')]},'callcounter':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x18'),'no'),'defaultValue':_0x8950('0x18')},'busylevel':{'type':Sequelize[_0x8950('0x21')](0xb)},'allowoverlap':{'type':Sequelize[_0x8950('0x2')]('yes','no')},'allowsubscribe':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x18'),'no')},'allowtransfer':{'type':Sequelize['ENUM'](_0x8950('0x18'),'no')},'ignoresdpversion':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x18'),'no')},'subscribecontext':{'type':Sequelize[_0x8950('0x1')]},'template':{'type':Sequelize[_0x8950('0x1')]},'videosupport':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x18'),'no',_0x8950('0x22')),'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize[_0x8950('0x21')](0xb)},'rfc2833compensate':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x18'),'no')},'mailbox':{'type':Sequelize[_0x8950('0x1')]},'session_timers':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x23'),_0x8950('0x24'),_0x8950('0x25'))},'session_expires':{'type':Sequelize['INTEGER'](0xb)},'session_minse':{'type':Sequelize[_0x8950('0x21')](0xb)},'session_refresher':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x26'),_0x8950('0x27')),'defaultValue':_0x8950('0x27')},'t38pt_usertpsource':{'type':Sequelize['STRING']},'regexten':{'type':Sequelize[_0x8950('0x1')]},'fromdomain':{'type':Sequelize[_0x8950('0x1')]},'fromuser':{'type':Sequelize[_0x8950('0x1')]},'port':{'type':Sequelize[_0x8950('0x21')](0x5)},'qualify':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x18'),'no'),'defaultValue':_0x8950('0x18')},'keepalive':{'type':Sequelize[_0x8950('0x21')](0xb)},'defaultip':{'type':Sequelize['STRING']},'defaultuser':{'type':Sequelize[_0x8950('0x1')]},'rtptimeout':{'type':Sequelize[_0x8950('0x21')](0xb)},'rtpholdtimeout':{'type':Sequelize[_0x8950('0x21')](0xb)},'rtpkeepalive':{'type':Sequelize[_0x8950('0x21')](0xb)},'sendrpid':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x18'),'no',_0x8950('0x28')),'defaultValue':'no'},'outboundproxy':{'type':Sequelize['STRING']},'callbackextension':{'type':Sequelize['STRING']},'timert1':{'type':Sequelize[_0x8950('0x21')](0xb)},'timerb':{'type':Sequelize[_0x8950('0x21')](0xb)},'qualifyfreq':{'type':Sequelize[_0x8950('0x21')](0xb)},'contactpermit':{'type':Sequelize[_0x8950('0x1')]},'contactdeny':{'type':Sequelize[_0x8950('0x1')]},'contactacl':{'type':Sequelize[_0x8950('0x1')]},'unsolicited_mailbox':{'type':Sequelize[_0x8950('0x1')]},'use_q850_reason':{'type':Sequelize['STRING']},'maxforwards':{'type':Sequelize[_0x8950('0x21')](0xb)},'encryption':{'type':Sequelize[_0x8950('0x2')]('yes','no'),'defaultValue':'no'},'avpf':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x18'),'no')},'force_avp':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x18'),'no')},'icesupport':{'type':Sequelize[_0x8950('0x2')]('yes','no')},'dtlsenable':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x18'),'no')},'dtlsverify':{'type':Sequelize['ENUM'](_0x8950('0x18'),'no','fingerprint',_0x8950('0x29'))},'dtlsrekey':{'type':Sequelize[_0x8950('0x21')](0xb)},'dtlscertfile':{'type':Sequelize[_0x8950('0x1')]},'dtlsprivatekey':{'type':Sequelize[_0x8950('0x1')]},'dtlscipher':{'type':Sequelize[_0x8950('0x1')]},'dtlscafile':{'type':Sequelize[_0x8950('0x1')]},'dtlscapath':{'type':Sequelize['STRING']},'dtlssetup':{'type':Sequelize[_0x8950('0x2')]('active',_0x8950('0x2a'),_0x8950('0x2b')),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0x8950('0x1')]},'usereqphone':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'no'},'recordonfeature':{'type':Sequelize[_0x8950('0x1')]},'recordofffeature':{'type':Sequelize[_0x8950('0x1')]},'call_limit':{'type':Sequelize[_0x8950('0x21')](0xb),'defaultValue':0x3e8},'registertrying':{'type':Sequelize['ENUM'](_0x8950('0x18'),'no')},'subscribemwi':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x18'),'no')},'vmexten':{'type':Sequelize[_0x8950('0x1')]},'mohinterpret':{'type':Sequelize[_0x8950('0x1')]},'mohsuggest':{'type':Sequelize['STRING']},'parkinglot':{'type':Sequelize[_0x8950('0x1')]},'description':{'type':Sequelize[_0x8950('0x1')]},'host':{'type':Sequelize[_0x8950('0x1')],'defaultValue':_0x8950('0x2c')},'canreinvite':{'type':Sequelize[_0x8950('0x2')](_0x8950('0x18'),'no','nonat',_0x8950('0x16'),_0x8950('0x2d')),'defaultValue':'no'},'registry':{'type':Sequelize['STRING']},'otherFields':{'type':Sequelize[_0x8950('0x1')]},'active':{'type':Sequelize[_0x8950('0x2e')],'allowNull':![],'defaultValue':!![]},'t38pt_udptl':{'type':Sequelize['STRING'],'defaultValue':'no'}};
\ No newline at end of file
index c8d30ba..b0d0297 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x98a8=['../../mysqldb','jayson/promise','client','request','Trunk,\x20%s,\x20%s','debug','request\x20sent','error','code','message','info','catch','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','reject','update','then','destroy','get','Trunks','UserProfileResource','stack','name','map','fieldName','model','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','Trunk','include','show','params','keys','rawAttributes','includeAll','clone','find','createdAt','updatedAt','body','omit','create','user','role','UserProfileSection','userProfileId','autoAssociation','findAll','readFileSync','root','server/files/templates/trunk.ejs','join','server/files/templates/registry.ejs','utf8','render','writeFileSync','/etc/asterisk/sip_xcally_trunks.conf','registry','/etc/asterisk/sip_xcally_registers.conf','Reload','chan_sip.so','Unable\x20to\x20retrieve\x20the\x20current\x20user','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment'];(function(_0x22760b,_0xf7e5fd){var _0x43e9a1=function(_0x309b91){while(--_0x309b91){_0x22760b['push'](_0x22760b['shift']());}};_0x43e9a1(++_0xf7e5fd);}(_0x98a8,0x12c));var _0x898a=function(_0x6532c9,_0x2e6ba1){_0x6532c9=_0x6532c9-0x0;var _0x3a3146=_0x98a8[_0x6532c9];return _0x3a3146;};'use strict';var emlformat=require(_0x898a('0x0'));var rimraf=require(_0x898a('0x1'));var zipdir=require(_0x898a('0x2'));var jsonpatch=require(_0x898a('0x3'));var rp=require(_0x898a('0x4'));var moment=require(_0x898a('0x5'));var BPromise=require(_0x898a('0x6'));var Mustache=require('mustache');var util=require(_0x898a('0x7'));var path=require(_0x898a('0x8'));var sox=require(_0x898a('0x9'));var csv=require(_0x898a('0xa'));var ejs=require(_0x898a('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x898a('0xc'));var squel=require('squel');var crypto=require(_0x898a('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x898a('0xe'));var toCsv=require(_0x898a('0xa'));var querystring=require(_0x898a('0xf'));var Papa=require(_0x898a('0x10'));var Redis=require(_0x898a('0x11'));var authService=require(_0x898a('0x12'));var qs=require(_0x898a('0x13'));var as=require(_0x898a('0x14'));var hardwareService=require(_0x898a('0x15'));var logger=require('../../config/logger')(_0x898a('0x16'));var utils=require('../../config/utils');var config=require(_0x898a('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x898a('0x18'))['db'];var jayson=require(_0x898a('0x19'));var client=jayson[_0x898a('0x1a')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5bfded,_0x5b5c9c,_0x373d53,_0x1f5be4){return new BPromise(function(_0xb24335,_0x116fbe){var _0x1873e9=_0x1f5be4||client;return _0x1873e9[_0x898a('0x1b')](_0x5bfded,_0x373d53)['then'](function(_0x47033c){logger['info'](_0x898a('0x1c'),_0x5b5c9c,'request\x20sent');logger[_0x898a('0x1d')]('Trunk,\x20%s,\x20%s,\x20%s',_0x5b5c9c,_0x898a('0x1e'),JSON['stringify'](_0x47033c));if(_0x47033c[_0x898a('0x1f')]){if(_0x47033c[_0x898a('0x1f')][_0x898a('0x20')]===0x1f4){logger['error'](_0x898a('0x1c'),_0x5b5c9c,_0x47033c['error']['message']);return _0x116fbe(_0x47033c[_0x898a('0x1f')][_0x898a('0x21')]);}logger['error']('Trunk,\x20%s,\x20%s',_0x5b5c9c,_0x47033c[_0x898a('0x1f')][_0x898a('0x21')]);return _0xb24335(_0x47033c[_0x898a('0x1f')][_0x898a('0x21')]);}else{logger[_0x898a('0x22')](_0x898a('0x1c'),_0x5b5c9c,_0x898a('0x1e'));_0xb24335(_0x47033c['result'][_0x898a('0x21')]);}})[_0x898a('0x23')](function(_0x11cae2){logger[_0x898a('0x1f')](_0x898a('0x1c'),_0x5b5c9c,_0x11cae2);_0x116fbe(_0x11cae2);});});}function respondWithStatusCode(_0x310bfa,_0x4e254d){_0x4e254d=_0x4e254d||0xcc;return function(_0x274cdf){if(_0x274cdf){return _0x310bfa[_0x898a('0x24')](_0x4e254d);}return _0x310bfa[_0x898a('0x25')](_0x4e254d)[_0x898a('0x26')]();};}function respondWithResult(_0x3901ab,_0x1426e3){_0x1426e3=_0x1426e3||0xc8;return function(_0x5b7719){if(_0x5b7719){return _0x3901ab[_0x898a('0x25')](_0x1426e3)['json'](_0x5b7719);}};}function respondWithFilteredResult(_0x513c6b,_0x53ddb2){return function(_0x3678be){if(_0x3678be){var _0x1f4d86=typeof _0x53ddb2[_0x898a('0x27')]===_0x898a('0x28')&&typeof _0x53ddb2[_0x898a('0x29')]===_0x898a('0x28');var _0x398e98=_0x3678be[_0x898a('0x2a')];var _0xd31922=_0x1f4d86?0x0:_0x53ddb2['offset'];var _0x4b3e68=_0x1f4d86?_0x3678be['count']:_0x53ddb2[_0x898a('0x27')]+_0x53ddb2[_0x898a('0x29')];var _0x3b7704;if(_0x4b3e68>=_0x398e98){_0x4b3e68=_0x398e98;_0x3b7704=0xc8;}else{_0x3b7704=0xce;}_0x513c6b[_0x898a('0x25')](_0x3b7704);return _0x513c6b[_0x898a('0x2b')](_0x898a('0x2c'),_0xd31922+'-'+_0x4b3e68+'/'+_0x398e98)[_0x898a('0x2d')](_0x3678be);}return null;};}function patchUpdates(_0xf74645){return function(_0x18773a){try{jsonpatch[_0x898a('0x2e')](_0x18773a,_0xf74645,!![]);}catch(_0x44c5d2){return BPromise[_0x898a('0x2f')](_0x44c5d2);}return _0x18773a['save']();};}function saveUpdates(_0x7a1eb5,_0x17a5f3){return function(_0x26eead){if(_0x26eead){return _0x26eead[_0x898a('0x30')](_0x7a1eb5)[_0x898a('0x31')](function(_0x47af5b){return _0x47af5b;});}return null;};}function removeEntity(_0x48cefb,_0x20a3fe){return function(_0x1e2fd4){if(_0x1e2fd4){return _0x1e2fd4[_0x898a('0x32')]()['then'](function(){var _0x105477=_0x1e2fd4[_0x898a('0x33')]({'plain':!![]});var _0x5eafc7=_0x898a('0x34');return db[_0x898a('0x35')][_0x898a('0x32')]({'where':{'type':_0x5eafc7,'resourceId':_0x105477['id']}})[_0x898a('0x31')](function(){return _0x1e2fd4;});})[_0x898a('0x31')](function(){_0x48cefb['status'](0xcc)[_0x898a('0x26')]();});}};}function handleEntityNotFound(_0x5baf5b,_0x573eb3){return function(_0x14e2dc){if(!_0x14e2dc){_0x5baf5b['sendStatus'](0x194);}return _0x14e2dc;};}function handleError(_0x3c9588,_0x4b3aac){_0x4b3aac=_0x4b3aac||0x1f4;return function(_0x37cb11){logger['error'](_0x37cb11[_0x898a('0x36')]);if(_0x37cb11[_0x898a('0x37')]){delete _0x37cb11[_0x898a('0x37')];}_0x3c9588['status'](_0x4b3aac)['send'](_0x37cb11);};}exports['index']=function(_0x1575d2,_0x429c32){var _0x5a228f={},_0xdd019d={},_0x3d3463={'count':0x0,'rows':[]};var _0xe84f7e=_[_0x898a('0x38')](db['Trunk']['rawAttributes'],function(_0x3aed01){return{'name':_0x3aed01[_0x898a('0x39')],'type':_0x3aed01['type']['key']};});_0xdd019d[_0x898a('0x3a')]=_[_0x898a('0x38')](_0xe84f7e,_0x898a('0x37'));_0xdd019d[_0x898a('0x3b')]=_['keys'](_0x1575d2[_0x898a('0x3b')]);_0xdd019d[_0x898a('0x3c')]=_['intersection'](_0xdd019d['model'],_0xdd019d['query']);_0x5a228f[_0x898a('0x3d')]=_[_0x898a('0x3e')](_0xdd019d[_0x898a('0x3a')],qs[_0x898a('0x3f')](_0x1575d2[_0x898a('0x3b')][_0x898a('0x3f')]));_0x5a228f[_0x898a('0x3d')]=_0x5a228f[_0x898a('0x3d')][_0x898a('0x40')]?_0x5a228f[_0x898a('0x3d')]:_0xdd019d[_0x898a('0x3a')];if(!_0x1575d2[_0x898a('0x3b')][_0x898a('0x41')](_0x898a('0x42'))){_0x5a228f[_0x898a('0x29')]=qs['limit'](_0x1575d2[_0x898a('0x3b')][_0x898a('0x29')]);_0x5a228f[_0x898a('0x27')]=qs['offset'](_0x1575d2[_0x898a('0x3b')][_0x898a('0x27')]);}_0x5a228f[_0x898a('0x43')]=qs[_0x898a('0x44')](_0x1575d2[_0x898a('0x3b')][_0x898a('0x44')]);_0x5a228f[_0x898a('0x45')]=qs[_0x898a('0x3c')](_['pick'](_0x1575d2[_0x898a('0x3b')],_0xdd019d[_0x898a('0x3c')]),_0xe84f7e);if(_0x1575d2[_0x898a('0x3b')][_0x898a('0x46')]){_0x5a228f['where']=_[_0x898a('0x47')](_0x5a228f[_0x898a('0x45')],{'$or':_['map'](_0xe84f7e,function(_0x241677){if(_0x241677['type']!==_0x898a('0x48')){var _0x5137c4={};_0x5137c4[_0x241677['name']]={'$like':'%'+_0x1575d2[_0x898a('0x3b')]['filter']+'%'};return _0x5137c4;}})});}_0x5a228f=_[_0x898a('0x47')]({},_0x5a228f,_0x1575d2[_0x898a('0x49')]);var _0x4d6ac0={'where':_0x5a228f[_0x898a('0x45')]};return db[_0x898a('0x4a')]['count'](_0x4d6ac0)[_0x898a('0x31')](function(_0x199437){_0x3d3463[_0x898a('0x2a')]=_0x199437;if(_0x1575d2[_0x898a('0x3b')]['includeAll']){_0x5a228f[_0x898a('0x4b')]=[{'all':!![]}];}return db[_0x898a('0x4a')]['findAll'](_0x5a228f);})[_0x898a('0x31')](function(_0x1d8c16){_0x3d3463['rows']=_0x1d8c16;return _0x3d3463;})[_0x898a('0x31')](respondWithFilteredResult(_0x429c32,_0x5a228f))['catch'](handleError(_0x429c32,null));};exports[_0x898a('0x4c')]=function(_0x41f291,_0x32ccb9){var _0x50f9e3={'raw':![],'where':{'id':_0x41f291[_0x898a('0x4d')]['id']}},_0x2f6cb3={};_0x2f6cb3[_0x898a('0x3a')]=_[_0x898a('0x4e')](db['Trunk'][_0x898a('0x4f')]);_0x2f6cb3['query']=_[_0x898a('0x4e')](_0x41f291[_0x898a('0x3b')]);_0x2f6cb3[_0x898a('0x3c')]=_['intersection'](_0x2f6cb3[_0x898a('0x3a')],_0x2f6cb3[_0x898a('0x3b')]);_0x50f9e3[_0x898a('0x3d')]=_['intersection'](_0x2f6cb3['model'],qs[_0x898a('0x3f')](_0x41f291[_0x898a('0x3b')][_0x898a('0x3f')]));_0x50f9e3[_0x898a('0x3d')]=_0x50f9e3[_0x898a('0x3d')][_0x898a('0x40')]?_0x50f9e3[_0x898a('0x3d')]:_0x2f6cb3[_0x898a('0x3a')];if(_0x41f291[_0x898a('0x3b')][_0x898a('0x50')]){_0x50f9e3[_0x898a('0x4b')]=[{'all':!![]}];}_0x50f9e3=_['merge']({},_0x50f9e3,_0x41f291[_0x898a('0x49')]);return db[_0x898a('0x4a')]['find'](_0x50f9e3)[_0x898a('0x31')](handleEntityNotFound(_0x32ccb9,null))['then'](respondWithResult(_0x32ccb9,null))['catch'](handleError(_0x32ccb9,null));};exports[_0x898a('0x51')]=function(_0x124f9b,_0x209529){var _0x5bfd61={'where':{'id':_0x124f9b[_0x898a('0x4d')]['id']}},_0x556fd8={};_0x556fd8[_0x898a('0x3a')]=_['keys'](db[_0x898a('0x4a')][_0x898a('0x4f')]);_0x5bfd61['attributes']=_[_0x898a('0x3e')](_0x556fd8[_0x898a('0x3a')],qs[_0x898a('0x3f')](_0x124f9b['query'][_0x898a('0x3f')]));_0x5bfd61[_0x898a('0x3d')]=_0x5bfd61[_0x898a('0x3d')][_0x898a('0x40')]?_0x5bfd61[_0x898a('0x3d')]:_0x556fd8[_0x898a('0x3a')];if(_0x124f9b['query'][_0x898a('0x50')]){_0x5bfd61['include']=[{'all':!![]}];}_0x5bfd61=_[_0x898a('0x47')]({},_0x5bfd61,_0x124f9b[_0x898a('0x49')]);return db[_0x898a('0x4a')][_0x898a('0x52')](_0x5bfd61)[_0x898a('0x31')](handleEntityNotFound(_0x209529,null))[_0x898a('0x31')](function(_0x2486a5){if(_0x2486a5){var _0x75ff57=_0x2486a5[_0x898a('0x33')]({'plain':!![]});_0x75ff57=qs['omit'](_0x75ff57,['id',_0x898a('0x53'),_0x898a('0x54')]);_0x124f9b[_0x898a('0x55')]=_[_0x898a('0x56')](_0x124f9b[_0x898a('0x55')],['id',_0x898a('0x53'),_0x898a('0x54')]);return db[_0x898a('0x4a')][_0x898a('0x57')](_[_0x898a('0x47')](_0x75ff57,_0x124f9b[_0x898a('0x55')]),{'include':_0x124f9b[_0x898a('0x3b')][_0x898a('0x50')]?[{'all':!![]}]:undefined})[_0x898a('0x31')](function(_0x22f9ba){var _0x5f42ae=_0x124f9b[_0x898a('0x58')][_0x898a('0x33')]({'plain':!![]});if(!_0x5f42ae)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x5f42ae[_0x898a('0x59')]===_0x898a('0x58')){var _0x5f0944=_0x22f9ba[_0x898a('0x33')]({'plain':!![]});var _0x1daecd=_0x898a('0x34');return db[_0x898a('0x5a')]['find']({'where':{'name':_0x1daecd,'userProfileId':_0x5f42ae[_0x898a('0x5b')]},'raw':!![]})[_0x898a('0x31')](function(_0x137935){if(_0x137935&&_0x137935[_0x898a('0x5c')]===0x0){return db['UserProfileResource'][_0x898a('0x57')]({'name':_0x5f0944[_0x898a('0x37')],'resourceId':_0x5f0944['id'],'type':_0x137935['name'],'sectionId':_0x137935['id']},{})[_0x898a('0x31')](function(){return _0x22f9ba;});}else{return _0x22f9ba;}})[_0x898a('0x23')](function(_0x5b7019){logger[_0x898a('0x1f')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x5b7019);throw _0x5b7019;});}return _0x22f9ba;});}})[_0x898a('0x31')](respondWithResult(_0x209529,0xc9))['catch'](handleError(_0x209529,null));};exports['create']=function(_0x5ed35e,_0xfdd6d8,_0x473f5c){var _0x3909c5;return db[_0x898a('0x4a')]['create'](_0x5ed35e['body'],{'raw':!![]})[_0x898a('0x31')](function(_0x232be0){_0x3909c5=_0x232be0;return db[_0x898a('0x4a')][_0x898a('0x5d')]({'raw':!![]});})[_0x898a('0x31')](function(_0x41cf94){var _0x30051d=fs[_0x898a('0x5e')](path['join'](config[_0x898a('0x5f')],_0x898a('0x60')),'utf8');var _0x42fda8=fs[_0x898a('0x5e')](path[_0x898a('0x61')](config[_0x898a('0x5f')],_0x898a('0x62')),_0x898a('0x63'));var _0x3bcc3d=ejs[_0x898a('0x64')](_0x30051d,{'trunks':_0x41cf94||[]});fs[_0x898a('0x65')](_0x898a('0x66'),_0x3bcc3d);if(_0x3909c5[_0x898a('0x67')]){var _0x307849=ejs[_0x898a('0x64')](_0x42fda8,{'trunks':_0x41cf94||[]});fs['writeFileSync'](_0x898a('0x68'),_0x307849);}})['then'](function(){return respondWithRpcPromise(_0x898a('0x69'),_0x898a('0x57'),{'module':_0x898a('0x6a')});})['then'](function(){var _0x31102d=_0x5ed35e[_0x898a('0x58')][_0x898a('0x33')]({'plain':!![]});if(!_0x31102d)throw new Error(_0x898a('0x6b'));if(_0x31102d[_0x898a('0x59')]==='user'){var _0x4b9487=_0x3909c5[_0x898a('0x33')]({'plain':!![]});return db[_0x898a('0x5a')][_0x898a('0x52')]({'where':{'name':_0x898a('0x34'),'userProfileId':_0x31102d['userProfileId']},'raw':!![]})[_0x898a('0x31')](function(_0x3d3451){if(_0x3d3451&&_0x3d3451[_0x898a('0x5c')]===0x0){return db[_0x898a('0x35')][_0x898a('0x57')]({'name':_0x4b9487[_0x898a('0x37')],'resourceId':_0x4b9487['id'],'type':_0x3d3451[_0x898a('0x37')],'sectionId':_0x3d3451['id']},{})[_0x898a('0x31')](function(){return _0x3909c5;});}else{return _0x3909c5;}})['catch'](function(_0x32a207){logger[_0x898a('0x1f')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x32a207);throw _0x32a207;});}return _0x3909c5;})[_0x898a('0x31')](respondWithResult(_0xfdd6d8,0xc9))['catch'](handleError(_0xfdd6d8,null));};exports[_0x898a('0x30')]=function(_0x4b2575,_0x2471d8,_0x387f2c){var _0x3b07dc;return db[_0x898a('0x4a')][_0x898a('0x52')]({'where':{'id':_0x4b2575[_0x898a('0x4d')]['id']}})[_0x898a('0x31')](handleEntityNotFound(_0x2471d8,null))[_0x898a('0x31')](saveUpdates(_0x4b2575[_0x898a('0x55')],null))['then'](function(_0x3fe54b){if(_0x3fe54b){_0x3b07dc=_0x3fe54b;return db[_0x898a('0x4a')][_0x898a('0x5d')]({'raw':!![]});}})[_0x898a('0x31')](function(_0x290972){if(_0x290972){var _0x1d594b=fs[_0x898a('0x5e')](path[_0x898a('0x61')](config[_0x898a('0x5f')],_0x898a('0x60')),'utf8');var _0x4fad03=fs[_0x898a('0x5e')](path[_0x898a('0x61')](config['root'],'server/files/templates/registry.ejs'),_0x898a('0x63'));var _0x4a79a4=ejs[_0x898a('0x64')](_0x1d594b,{'trunks':_0x290972||[]});fs[_0x898a('0x65')]('/etc/asterisk/sip_xcally_trunks.conf',_0x4a79a4);var _0x3f6815=ejs[_0x898a('0x64')](_0x4fad03,{'trunks':_0x290972||[]});fs[_0x898a('0x65')](_0x898a('0x68'),_0x3f6815);return respondWithRpcPromise(_0x898a('0x69'),_0x898a('0x30'),{'module':_0x898a('0x6a')});}return null;})['then'](function(_0x3237e8){if(_0x3237e8){return _0x3b07dc;}})[_0x898a('0x31')](respondWithResult(_0x2471d8,null))[_0x898a('0x23')](handleError(_0x2471d8,null));};exports['destroy']=function(_0x27560f,_0x61247c,_0x5c6247){var _0x39e917;return db['Trunk']['find']({'where':{'id':_0x27560f['params']['id']}})[_0x898a('0x31')](handleEntityNotFound(_0x61247c,null))[_0x898a('0x31')](removeEntity(_0x61247c,null))[_0x898a('0x31')](function(){return db[_0x898a('0x4a')][_0x898a('0x5d')]({'raw':!![]});})[_0x898a('0x31')](function(_0x12e54b){var _0x50dd52=fs[_0x898a('0x5e')](path['join'](config[_0x898a('0x5f')],_0x898a('0x60')),'utf8');var _0x24670c=fs[_0x898a('0x5e')](path[_0x898a('0x61')](config[_0x898a('0x5f')],_0x898a('0x62')),'utf8');var _0x5847cb=ejs['render'](_0x50dd52,{'trunks':_0x12e54b});var _0x3b8fb5=ejs[_0x898a('0x64')](_0x24670c,{'trunks':_0x12e54b});fs[_0x898a('0x65')]('/etc/asterisk/sip_xcally_trunks.conf',_0x5847cb);fs[_0x898a('0x65')]('/etc/asterisk/sip_xcally_registers.conf',_0x3b8fb5);return respondWithRpcPromise('Reload',_0x898a('0x32'),{'module':_0x898a('0x6a')});})[_0x898a('0x23')](handleError(_0x61247c,null));};
\ No newline at end of file
+var _0xf3cd=['length','limit','sort','where','filter','merge','options','Trunk','includeAll','include','findAll','show','find','clone','createdAt','updatedAt','omit','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Trunks','UserProfileSection','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','readFileSync','join','root','server/files/templates/trunk.ejs','server/files/templates/registry.ejs','utf8','writeFileSync','/etc/asterisk/sip_xcally_trunks.conf','render','/etc/asterisk/sip_xcally_registers.conf','Reload','chan_sip.so','userProfileId','autoAssociation','params','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','jayson/promise','client','http','request','then','info','Trunk,\x20%s,\x20%s','request\x20sent','debug','Trunk,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','sendStatus','status','end','undefined','offset','count','json','reject','save','update','get','UserProfileResource','destroy','name','send','index','map','rawAttributes','type','model','query','keys','filters','intersection','attributes','fields'];(function(_0x3d4d8e,_0x4a450e){var _0x245fd4=function(_0x11fb54){while(--_0x11fb54){_0x3d4d8e['push'](_0x3d4d8e['shift']());}};_0x245fd4(++_0x4a450e);}(_0xf3cd,0xfe));var _0xdf3c=function(_0x2389bc,_0x167cd2){_0x2389bc=_0x2389bc-0x0;var _0x170548=_0xf3cd[_0x2389bc];return _0x170548;};'use strict';var emlformat=require(_0xdf3c('0x0'));var rimraf=require(_0xdf3c('0x1'));var zipdir=require(_0xdf3c('0x2'));var jsonpatch=require(_0xdf3c('0x3'));var rp=require(_0xdf3c('0x4'));var moment=require(_0xdf3c('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xdf3c('0x6'));var util=require(_0xdf3c('0x7'));var path=require(_0xdf3c('0x8'));var sox=require('sox');var csv=require(_0xdf3c('0x9'));var ejs=require(_0xdf3c('0xa'));var fs=require('fs');var fs_extra=require(_0xdf3c('0xb'));var _=require(_0xdf3c('0xc'));var squel=require(_0xdf3c('0xd'));var crypto=require(_0xdf3c('0xe'));var jsforce=require('jsforce');var deskjs=require(_0xdf3c('0xf'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xdf3c('0x10'));var Redis=require(_0xdf3c('0x11'));var authService=require('../../components/auth/service');var qs=require(_0xdf3c('0x12'));var as=require(_0xdf3c('0x13'));var hardwareService=require(_0xdf3c('0x14'));var logger=require(_0xdf3c('0x15'))(_0xdf3c('0x16'));var utils=require(_0xdf3c('0x17'));var config=require(_0xdf3c('0x18'));var licenseUtil=require(_0xdf3c('0x19'));var db=require('../../mysqldb')['db'];var jayson=require(_0xdf3c('0x1a'));var client=jayson[_0xdf3c('0x1b')][_0xdf3c('0x1c')]({'port':0x232a});function respondWithRpcPromise(_0x17319c,_0x59e431,_0x2ae4ad,_0x461079){return new BPromise(function(_0x13ea5f,_0x5e0047){var _0x18aafa=_0x461079||client;return _0x18aafa[_0xdf3c('0x1d')](_0x17319c,_0x2ae4ad)[_0xdf3c('0x1e')](function(_0x4274fd){logger[_0xdf3c('0x1f')](_0xdf3c('0x20'),_0x59e431,_0xdf3c('0x21'));logger[_0xdf3c('0x22')](_0xdf3c('0x23'),_0x59e431,_0xdf3c('0x21'),JSON['stringify'](_0x4274fd));if(_0x4274fd[_0xdf3c('0x24')]){if(_0x4274fd[_0xdf3c('0x24')][_0xdf3c('0x25')]===0x1f4){logger[_0xdf3c('0x24')](_0xdf3c('0x20'),_0x59e431,_0x4274fd[_0xdf3c('0x24')][_0xdf3c('0x26')]);return _0x5e0047(_0x4274fd[_0xdf3c('0x24')][_0xdf3c('0x26')]);}logger[_0xdf3c('0x24')](_0xdf3c('0x20'),_0x59e431,_0x4274fd[_0xdf3c('0x24')][_0xdf3c('0x26')]);return _0x13ea5f(_0x4274fd['error']['message']);}else{logger[_0xdf3c('0x1f')]('Trunk,\x20%s,\x20%s',_0x59e431,_0xdf3c('0x21'));_0x13ea5f(_0x4274fd[_0xdf3c('0x27')][_0xdf3c('0x26')]);}})[_0xdf3c('0x28')](function(_0x33652f){logger[_0xdf3c('0x24')]('Trunk,\x20%s,\x20%s',_0x59e431,_0x33652f);_0x5e0047(_0x33652f);});});}function respondWithStatusCode(_0x22a164,_0x213d75){_0x213d75=_0x213d75||0xcc;return function(_0x13e3ca){if(_0x13e3ca){return _0x22a164[_0xdf3c('0x29')](_0x213d75);}return _0x22a164[_0xdf3c('0x2a')](_0x213d75)[_0xdf3c('0x2b')]();};}function respondWithResult(_0xef54cb,_0x155f54){_0x155f54=_0x155f54||0xc8;return function(_0x18cb46){if(_0x18cb46){return _0xef54cb[_0xdf3c('0x2a')](_0x155f54)['json'](_0x18cb46);}};}function respondWithFilteredResult(_0xd284d7,_0x153daa){return function(_0x4b57a4){if(_0x4b57a4){var _0xdc8962=typeof _0x153daa['offset']==='undefined'&&typeof _0x153daa['limit']===_0xdf3c('0x2c');var _0x186bba=_0x4b57a4['count'];var _0x5c3b5a=_0xdc8962?0x0:_0x153daa[_0xdf3c('0x2d')];var _0x1f2ce4=_0xdc8962?_0x4b57a4[_0xdf3c('0x2e')]:_0x153daa[_0xdf3c('0x2d')]+_0x153daa['limit'];var _0x43ce06;if(_0x1f2ce4>=_0x186bba){_0x1f2ce4=_0x186bba;_0x43ce06=0xc8;}else{_0x43ce06=0xce;}_0xd284d7[_0xdf3c('0x2a')](_0x43ce06);return _0xd284d7['set']('Content-Range',_0x5c3b5a+'-'+_0x1f2ce4+'/'+_0x186bba)[_0xdf3c('0x2f')](_0x4b57a4);}return null;};}function patchUpdates(_0x46f0e3){return function(_0x36937e){try{jsonpatch['apply'](_0x36937e,_0x46f0e3,!![]);}catch(_0x2355f6){return BPromise[_0xdf3c('0x30')](_0x2355f6);}return _0x36937e[_0xdf3c('0x31')]();};}function saveUpdates(_0x10099e,_0x575ae1){return function(_0xda0de0){if(_0xda0de0){return _0xda0de0[_0xdf3c('0x32')](_0x10099e)['then'](function(_0x40ae3d){return _0x40ae3d;});}return null;};}function removeEntity(_0x3daeda,_0x217a65){return function(_0x2287f){if(_0x2287f){return _0x2287f['destroy']()[_0xdf3c('0x1e')](function(){var _0x360d5c=_0x2287f[_0xdf3c('0x33')]({'plain':!![]});var _0x3b9ce8='Trunks';return db[_0xdf3c('0x34')][_0xdf3c('0x35')]({'where':{'type':_0x3b9ce8,'resourceId':_0x360d5c['id']}})['then'](function(){return _0x2287f;});})['then'](function(){_0x3daeda[_0xdf3c('0x2a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x216115,_0x5e8130){return function(_0x57faba){if(!_0x57faba){_0x216115['sendStatus'](0x194);}return _0x57faba;};}function handleError(_0x44a478,_0x2ee9ad){_0x2ee9ad=_0x2ee9ad||0x1f4;return function(_0x1d0b8a){logger[_0xdf3c('0x24')](_0x1d0b8a['stack']);if(_0x1d0b8a['name']){delete _0x1d0b8a[_0xdf3c('0x36')];}_0x44a478['status'](_0x2ee9ad)[_0xdf3c('0x37')](_0x1d0b8a);};}exports[_0xdf3c('0x38')]=function(_0x3628ae,_0xcdd731){var _0x1004e9={},_0x1e0cf2={},_0x1c7335={'count':0x0,'rows':[]};var _0x809f3d=_[_0xdf3c('0x39')](db['Trunk'][_0xdf3c('0x3a')],function(_0x54e689){return{'name':_0x54e689['fieldName'],'type':_0x54e689[_0xdf3c('0x3b')]['key']};});_0x1e0cf2[_0xdf3c('0x3c')]=_['map'](_0x809f3d,_0xdf3c('0x36'));_0x1e0cf2[_0xdf3c('0x3d')]=_[_0xdf3c('0x3e')](_0x3628ae[_0xdf3c('0x3d')]);_0x1e0cf2[_0xdf3c('0x3f')]=_[_0xdf3c('0x40')](_0x1e0cf2[_0xdf3c('0x3c')],_0x1e0cf2[_0xdf3c('0x3d')]);_0x1004e9[_0xdf3c('0x41')]=_[_0xdf3c('0x40')](_0x1e0cf2[_0xdf3c('0x3c')],qs[_0xdf3c('0x42')](_0x3628ae['query']['fields']));_0x1004e9[_0xdf3c('0x41')]=_0x1004e9['attributes'][_0xdf3c('0x43')]?_0x1004e9[_0xdf3c('0x41')]:_0x1e0cf2[_0xdf3c('0x3c')];if(!_0x3628ae[_0xdf3c('0x3d')]['hasOwnProperty']('nolimit')){_0x1004e9[_0xdf3c('0x44')]=qs[_0xdf3c('0x44')](_0x3628ae[_0xdf3c('0x3d')]['limit']);_0x1004e9[_0xdf3c('0x2d')]=qs[_0xdf3c('0x2d')](_0x3628ae[_0xdf3c('0x3d')][_0xdf3c('0x2d')]);}_0x1004e9['order']=qs[_0xdf3c('0x45')](_0x3628ae[_0xdf3c('0x3d')][_0xdf3c('0x45')]);_0x1004e9[_0xdf3c('0x46')]=qs[_0xdf3c('0x3f')](_['pick'](_0x3628ae[_0xdf3c('0x3d')],_0x1e0cf2[_0xdf3c('0x3f')]),_0x809f3d);if(_0x3628ae[_0xdf3c('0x3d')][_0xdf3c('0x47')]){_0x1004e9[_0xdf3c('0x46')]=_[_0xdf3c('0x48')](_0x1004e9['where'],{'$or':_['map'](_0x809f3d,function(_0x2c6c6d){if(_0x2c6c6d[_0xdf3c('0x3b')]!=='VIRTUAL'){var _0x5c9885={};_0x5c9885[_0x2c6c6d[_0xdf3c('0x36')]]={'$like':'%'+_0x3628ae[_0xdf3c('0x3d')][_0xdf3c('0x47')]+'%'};return _0x5c9885;}})});}_0x1004e9=_[_0xdf3c('0x48')]({},_0x1004e9,_0x3628ae[_0xdf3c('0x49')]);var _0x2dbf54={'where':_0x1004e9[_0xdf3c('0x46')]};return db[_0xdf3c('0x4a')][_0xdf3c('0x2e')](_0x2dbf54)['then'](function(_0x129c2a){_0x1c7335[_0xdf3c('0x2e')]=_0x129c2a;if(_0x3628ae[_0xdf3c('0x3d')][_0xdf3c('0x4b')]){_0x1004e9[_0xdf3c('0x4c')]=[{'all':!![]}];}return db[_0xdf3c('0x4a')][_0xdf3c('0x4d')](_0x1004e9);})['then'](function(_0x1751a8){_0x1c7335['rows']=_0x1751a8;return _0x1c7335;})[_0xdf3c('0x1e')](respondWithFilteredResult(_0xcdd731,_0x1004e9))['catch'](handleError(_0xcdd731,null));};exports[_0xdf3c('0x4e')]=function(_0x28144f,_0x2ec575){var _0x94c5b9={'raw':![],'where':{'id':_0x28144f['params']['id']}},_0x5eef94={};_0x5eef94['model']=_[_0xdf3c('0x3e')](db['Trunk'][_0xdf3c('0x3a')]);_0x5eef94[_0xdf3c('0x3d')]=_[_0xdf3c('0x3e')](_0x28144f[_0xdf3c('0x3d')]);_0x5eef94[_0xdf3c('0x3f')]=_['intersection'](_0x5eef94['model'],_0x5eef94[_0xdf3c('0x3d')]);_0x94c5b9[_0xdf3c('0x41')]=_['intersection'](_0x5eef94[_0xdf3c('0x3c')],qs[_0xdf3c('0x42')](_0x28144f[_0xdf3c('0x3d')][_0xdf3c('0x42')]));_0x94c5b9[_0xdf3c('0x41')]=_0x94c5b9[_0xdf3c('0x41')][_0xdf3c('0x43')]?_0x94c5b9['attributes']:_0x5eef94['model'];if(_0x28144f[_0xdf3c('0x3d')][_0xdf3c('0x4b')]){_0x94c5b9[_0xdf3c('0x4c')]=[{'all':!![]}];}_0x94c5b9=_[_0xdf3c('0x48')]({},_0x94c5b9,_0x28144f[_0xdf3c('0x49')]);return db[_0xdf3c('0x4a')][_0xdf3c('0x4f')](_0x94c5b9)[_0xdf3c('0x1e')](handleEntityNotFound(_0x2ec575,null))[_0xdf3c('0x1e')](respondWithResult(_0x2ec575,null))[_0xdf3c('0x28')](handleError(_0x2ec575,null));};exports[_0xdf3c('0x50')]=function(_0x4cb28f,_0x1eebcf){var _0x47cb74={'where':{'id':_0x4cb28f['params']['id']}},_0x5e7247={};_0x5e7247['model']=_['keys'](db[_0xdf3c('0x4a')][_0xdf3c('0x3a')]);_0x47cb74['attributes']=_[_0xdf3c('0x40')](_0x5e7247[_0xdf3c('0x3c')],qs['fields'](_0x4cb28f[_0xdf3c('0x3d')][_0xdf3c('0x42')]));_0x47cb74[_0xdf3c('0x41')]=_0x47cb74[_0xdf3c('0x41')][_0xdf3c('0x43')]?_0x47cb74[_0xdf3c('0x41')]:_0x5e7247[_0xdf3c('0x3c')];if(_0x4cb28f[_0xdf3c('0x3d')][_0xdf3c('0x4b')]){_0x47cb74[_0xdf3c('0x4c')]=[{'all':!![]}];}_0x47cb74=_[_0xdf3c('0x48')]({},_0x47cb74,_0x4cb28f['options']);return db[_0xdf3c('0x4a')][_0xdf3c('0x4f')](_0x47cb74)[_0xdf3c('0x1e')](handleEntityNotFound(_0x1eebcf,null))['then'](function(_0x245c68){if(_0x245c68){var _0x3e327e=_0x245c68[_0xdf3c('0x33')]({'plain':!![]});_0x3e327e=qs['omit'](_0x3e327e,['id',_0xdf3c('0x51'),_0xdf3c('0x52')]);_0x4cb28f['body']=_[_0xdf3c('0x53')](_0x4cb28f['body'],['id',_0xdf3c('0x51'),_0xdf3c('0x52')]);return db[_0xdf3c('0x4a')][_0xdf3c('0x54')](_[_0xdf3c('0x48')](_0x3e327e,_0x4cb28f[_0xdf3c('0x55')]),{'include':_0x4cb28f[_0xdf3c('0x3d')][_0xdf3c('0x4b')]?[{'all':!![]}]:undefined})[_0xdf3c('0x1e')](function(_0x330730){var _0x283be2=_0x4cb28f[_0xdf3c('0x56')][_0xdf3c('0x33')]({'plain':!![]});if(!_0x283be2)throw new Error(_0xdf3c('0x57'));if(_0x283be2[_0xdf3c('0x58')]===_0xdf3c('0x56')){var _0xd7fb2d=_0x330730['get']({'plain':!![]});var _0x4dade5=_0xdf3c('0x59');return db[_0xdf3c('0x5a')][_0xdf3c('0x4f')]({'where':{'name':_0x4dade5,'userProfileId':_0x283be2['userProfileId']},'raw':!![]})[_0xdf3c('0x1e')](function(_0x5f2765){if(_0x5f2765&&_0x5f2765['autoAssociation']===0x0){return db[_0xdf3c('0x34')][_0xdf3c('0x54')]({'name':_0xd7fb2d[_0xdf3c('0x36')],'resourceId':_0xd7fb2d['id'],'type':_0x5f2765[_0xdf3c('0x36')],'sectionId':_0x5f2765['id']},{})[_0xdf3c('0x1e')](function(){return _0x330730;});}else{return _0x330730;}})[_0xdf3c('0x28')](function(_0x1a31d7){logger[_0xdf3c('0x24')](_0xdf3c('0x5b'),_0x1a31d7);throw _0x1a31d7;});}return _0x330730;});}})[_0xdf3c('0x1e')](respondWithResult(_0x1eebcf,0xc9))[_0xdf3c('0x28')](handleError(_0x1eebcf,null));};exports[_0xdf3c('0x54')]=function(_0x34000c,_0x4be79a,_0x3febac){var _0x2cb0f5;return db[_0xdf3c('0x4a')][_0xdf3c('0x54')](_0x34000c[_0xdf3c('0x55')],{'raw':!![]})['then'](function(_0x18bf4f){_0x2cb0f5=_0x18bf4f;return db[_0xdf3c('0x4a')][_0xdf3c('0x4d')]({'raw':!![]});})[_0xdf3c('0x1e')](function(_0x1efa9c){var _0x50805c=fs[_0xdf3c('0x5c')](path[_0xdf3c('0x5d')](config[_0xdf3c('0x5e')],_0xdf3c('0x5f')),'utf8');var _0xb867a1=fs[_0xdf3c('0x5c')](path[_0xdf3c('0x5d')](config[_0xdf3c('0x5e')],_0xdf3c('0x60')),_0xdf3c('0x61'));var _0x19c851=ejs['render'](_0x50805c,{'trunks':_0x1efa9c||[]});fs[_0xdf3c('0x62')](_0xdf3c('0x63'),_0x19c851);if(_0x2cb0f5['registry']){var _0x52a2e1=ejs[_0xdf3c('0x64')](_0xb867a1,{'trunks':_0x1efa9c||[]});fs[_0xdf3c('0x62')](_0xdf3c('0x65'),_0x52a2e1);}})[_0xdf3c('0x1e')](function(){return respondWithRpcPromise(_0xdf3c('0x66'),_0xdf3c('0x54'),{'module':_0xdf3c('0x67')});})[_0xdf3c('0x1e')](function(){var _0x5e6606=_0x34000c[_0xdf3c('0x56')][_0xdf3c('0x33')]({'plain':!![]});if(!_0x5e6606)throw new Error(_0xdf3c('0x57'));if(_0x5e6606['role']===_0xdf3c('0x56')){var _0x354ff4=_0x2cb0f5[_0xdf3c('0x33')]({'plain':!![]});return db['UserProfileSection'][_0xdf3c('0x4f')]({'where':{'name':_0xdf3c('0x59'),'userProfileId':_0x5e6606[_0xdf3c('0x68')]},'raw':!![]})[_0xdf3c('0x1e')](function(_0xe01538){if(_0xe01538&&_0xe01538[_0xdf3c('0x69')]===0x0){return db['UserProfileResource']['create']({'name':_0x354ff4['name'],'resourceId':_0x354ff4['id'],'type':_0xe01538['name'],'sectionId':_0xe01538['id']},{})['then'](function(){return _0x2cb0f5;});}else{return _0x2cb0f5;}})[_0xdf3c('0x28')](function(_0x3f43a0){logger[_0xdf3c('0x24')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x3f43a0);throw _0x3f43a0;});}return _0x2cb0f5;})[_0xdf3c('0x1e')](respondWithResult(_0x4be79a,0xc9))[_0xdf3c('0x28')](handleError(_0x4be79a,null));};exports[_0xdf3c('0x32')]=function(_0x51e8c6,_0x591936,_0x233718){var _0x4e3517;return db[_0xdf3c('0x4a')]['find']({'where':{'id':_0x51e8c6[_0xdf3c('0x6a')]['id']}})[_0xdf3c('0x1e')](handleEntityNotFound(_0x591936,null))[_0xdf3c('0x1e')](saveUpdates(_0x51e8c6[_0xdf3c('0x55')],null))['then'](function(_0x5148f6){if(_0x5148f6){_0x4e3517=_0x5148f6;return db[_0xdf3c('0x4a')][_0xdf3c('0x4d')]({'raw':!![]});}})[_0xdf3c('0x1e')](function(_0x12a7b0){if(_0x12a7b0){var _0x39d9f0=fs[_0xdf3c('0x5c')](path['join'](config[_0xdf3c('0x5e')],'server/files/templates/trunk.ejs'),_0xdf3c('0x61'));var _0x9c761a=fs[_0xdf3c('0x5c')](path[_0xdf3c('0x5d')](config[_0xdf3c('0x5e')],'server/files/templates/registry.ejs'),_0xdf3c('0x61'));var _0x5c27cc=ejs[_0xdf3c('0x64')](_0x39d9f0,{'trunks':_0x12a7b0||[]});fs['writeFileSync']('/etc/asterisk/sip_xcally_trunks.conf',_0x5c27cc);var _0x53b0c3=ejs['render'](_0x9c761a,{'trunks':_0x12a7b0||[]});fs[_0xdf3c('0x62')](_0xdf3c('0x65'),_0x53b0c3);return respondWithRpcPromise(_0xdf3c('0x66'),_0xdf3c('0x32'),{'module':_0xdf3c('0x67')});}return null;})[_0xdf3c('0x1e')](function(_0x5c8e5e){if(_0x5c8e5e){return _0x4e3517;}})[_0xdf3c('0x1e')](respondWithResult(_0x591936,null))['catch'](handleError(_0x591936,null));};exports[_0xdf3c('0x35')]=function(_0x389708,_0x2e5f82,_0x15a057){var _0x320452;return db[_0xdf3c('0x4a')][_0xdf3c('0x4f')]({'where':{'id':_0x389708[_0xdf3c('0x6a')]['id']}})[_0xdf3c('0x1e')](handleEntityNotFound(_0x2e5f82,null))[_0xdf3c('0x1e')](removeEntity(_0x2e5f82,null))[_0xdf3c('0x1e')](function(){return db[_0xdf3c('0x4a')][_0xdf3c('0x4d')]({'raw':!![]});})[_0xdf3c('0x1e')](function(_0x55fd73){var _0x118ab5=fs[_0xdf3c('0x5c')](path[_0xdf3c('0x5d')](config[_0xdf3c('0x5e')],'server/files/templates/trunk.ejs'),_0xdf3c('0x61'));var _0x1c8fe4=fs['readFileSync'](path['join'](config[_0xdf3c('0x5e')],_0xdf3c('0x60')),_0xdf3c('0x61'));var _0x1aaf8b=ejs[_0xdf3c('0x64')](_0x118ab5,{'trunks':_0x55fd73});var _0x56fc77=ejs[_0xdf3c('0x64')](_0x1c8fe4,{'trunks':_0x55fd73});fs[_0xdf3c('0x62')](_0xdf3c('0x63'),_0x1aaf8b);fs[_0xdf3c('0x62')](_0xdf3c('0x65'),_0x56fc77);return respondWithRpcPromise(_0xdf3c('0x66'),'destroy',{'module':_0xdf3c('0x67')});})[_0xdf3c('0x28')](handleError(_0x2e5f82,null));};
\ No newline at end of file
index a73a8b0..93ed270 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2874=['moment','bluebird','path','rimraf','../../config/environment','./trunk.attributes','exports','define','Trunk','tools_trunks','lodash','util','../../config/logger','api'];(function(_0x4ee5ab,_0xd42447){var _0x341485=function(_0x5b941f){while(--_0x5b941f){_0x4ee5ab['push'](_0x4ee5ab['shift']());}};_0x341485(++_0xd42447);}(_0x2874,0x1e6));var _0x4287=function(_0x1db653,_0x3a9940){_0x1db653=_0x1db653-0x0;var _0x156348=_0x2874[_0x1db653];return _0x156348;};'use strict';var _=require(_0x4287('0x0'));var util=require(_0x4287('0x1'));var logger=require(_0x4287('0x2'))(_0x4287('0x3'));var moment=require(_0x4287('0x4'));var BPromise=require(_0x4287('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x4287('0x6'));var rimraf=require(_0x4287('0x7'));var config=require(_0x4287('0x8'));var attributes=require(_0x4287('0x9'));module[_0x4287('0xa')]=function(_0x41b2e7,_0x434487){return _0x41b2e7[_0x4287('0xb')](_0x4287('0xc'),attributes,{'tableName':_0x4287('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xa9ec=['tools_trunks','lodash','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./trunk.attributes','define'];(function(_0x1288dd,_0x38f47c){var _0x3efba7=function(_0x31bbe5){while(--_0x31bbe5){_0x1288dd['push'](_0x1288dd['shift']());}};_0x3efba7(++_0x38f47c);}(_0xa9ec,0xe8));var _0xca9e=function(_0x5c5cfb,_0x856fe6){_0x5c5cfb=_0x5c5cfb-0x0;var _0xb89878=_0xa9ec[_0x5c5cfb];return _0xb89878;};'use strict';var _=require(_0xca9e('0x0'));var util=require('util');var logger=require(_0xca9e('0x1'))(_0xca9e('0x2'));var moment=require(_0xca9e('0x3'));var BPromise=require(_0xca9e('0x4'));var rp=require(_0xca9e('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xca9e('0x6'));var config=require(_0xca9e('0x7'));var attributes=require(_0xca9e('0x8'));module['exports']=function(_0x4823d7,_0x2c3adb){return _0x4823d7[_0xca9e('0x9')]('Trunk',attributes,{'tableName':_0xca9e('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index d7d157f..0b88245 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb9c8=['bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','request','then','info','Trunk,\x20%s,\x20%s','request\x20sent','debug','error','code','message','catch','GetTrunk','Trunk','options','raw','attributes','limit','include','map','model','stringify','ShowTrunk','find','where','lodash','util','moment'];(function(_0x665846,_0x1894fc){var _0x24c3ab=function(_0x3c94c6){while(--_0x3c94c6){_0x665846['push'](_0x665846['shift']());}};_0x24c3ab(++_0x1894fc);}(_0xb9c8,0x1d9));var _0x8b9c=function(_0x441563,_0x1d4a28){_0x441563=_0x441563-0x0;var _0x2369ec=_0xb9c8[_0x441563];return _0x2369ec;};'use strict';var _=require(_0x8b9c('0x0'));var util=require(_0x8b9c('0x1'));var moment=require(_0x8b9c('0x2'));var BPromise=require(_0x8b9c('0x3'));var rs=require(_0x8b9c('0x4'));var fs=require('fs');var Redis=require(_0x8b9c('0x5'));var db=require(_0x8b9c('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x8b9c('0x7'));var config=require(_0x8b9c('0x8'));var jayson=require(_0x8b9c('0x9'));var client=jayson[_0x8b9c('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0xbd1907,_0xa17135,_0x276341){return new BPromise(function(_0x5eca4c,_0x16ee7e){return client[_0x8b9c('0xb')](_0xbd1907,_0x276341)[_0x8b9c('0xc')](function(_0x425e26){logger[_0x8b9c('0xd')](_0x8b9c('0xe'),_0xa17135,_0x8b9c('0xf'));logger[_0x8b9c('0x10')]('Trunk,\x20%s,\x20%s,\x20%s',_0xa17135,_0x8b9c('0xf'),JSON['stringify'](_0x425e26));if(_0x425e26[_0x8b9c('0x11')]){if(_0x425e26[_0x8b9c('0x11')][_0x8b9c('0x12')]===0x1f4){logger[_0x8b9c('0x11')]('Trunk,\x20%s,\x20%s',_0xa17135,_0x425e26[_0x8b9c('0x11')][_0x8b9c('0x13')]);return _0x16ee7e(_0x425e26['error']['message']);}logger[_0x8b9c('0x11')](_0x8b9c('0xe'),_0xa17135,_0x425e26[_0x8b9c('0x11')][_0x8b9c('0x13')]);return _0x5eca4c(_0x425e26[_0x8b9c('0x11')][_0x8b9c('0x13')]);}else{logger['info'](_0x8b9c('0xe'),_0xa17135,_0x8b9c('0xf'));_0x5eca4c(_0x425e26['result']['message']);}})[_0x8b9c('0x14')](function(_0x32474f){logger[_0x8b9c('0x11')](_0x8b9c('0xe'),_0xa17135,_0x32474f);_0x16ee7e(_0x32474f);});});}exports[_0x8b9c('0x15')]=function(_0x422ebc){var _0x274cad=this;return new Promise(function(_0x5a62ea,_0x55bf36){return db[_0x8b9c('0x16')]['findAll']({'raw':_0x422ebc[_0x8b9c('0x17')]?_0x422ebc[_0x8b9c('0x17')][_0x8b9c('0x18')]===undefined?!![]:![]:!![],'where':_0x422ebc[_0x8b9c('0x17')]?_0x422ebc[_0x8b9c('0x17')]['where']||null:null,'attributes':_0x422ebc[_0x8b9c('0x17')]?_0x422ebc['options'][_0x8b9c('0x19')]||null:null,'limit':_0x422ebc[_0x8b9c('0x17')]?_0x422ebc[_0x8b9c('0x17')][_0x8b9c('0x1a')]||null:null,'include':_0x422ebc[_0x8b9c('0x17')]?_0x422ebc[_0x8b9c('0x17')][_0x8b9c('0x1b')]?_[_0x8b9c('0x1c')](_0x422ebc[_0x8b9c('0x17')][_0x8b9c('0x1b')],function(_0x32ea5a){return{'model':db[_0x32ea5a[_0x8b9c('0x1d')]],'as':_0x32ea5a['as'],'attributes':_0x32ea5a[_0x8b9c('0x19')],'include':_0x32ea5a['include']?_[_0x8b9c('0x1c')](_0x32ea5a[_0x8b9c('0x1b')],function(_0x50604a){return{'model':db[_0x50604a[_0x8b9c('0x1d')]],'as':_0x50604a['as'],'attributes':_0x50604a[_0x8b9c('0x19')],'include':_0x50604a['include']?_['map'](_0x50604a[_0x8b9c('0x1b')],function(_0x418114){return{'model':db[_0x418114[_0x8b9c('0x1d')]],'as':_0x418114['as'],'attributes':_0x418114[_0x8b9c('0x19')]};}):[]};}):[]};}):[]:[]})[_0x8b9c('0xc')](function(_0x49bec3){logger['info']('GetTrunk',_0x422ebc);logger['debug'](_0x8b9c('0x15'),_0x422ebc,JSON[_0x8b9c('0x1e')](_0x49bec3));_0x5a62ea(_0x49bec3);})[_0x8b9c('0x14')](function(_0x452ce0){logger['error']('GetTrunk',_0x452ce0[_0x8b9c('0x13')],_0x422ebc);_0x55bf36(_0x274cad[_0x8b9c('0x11')](0x1f4,_0x452ce0['message']));});});};exports[_0x8b9c('0x1f')]=function(_0x5274e9){var _0x13e01f=this;return new Promise(function(_0x25ab06,_0x570bdc){return db[_0x8b9c('0x16')][_0x8b9c('0x20')]({'raw':_0x5274e9[_0x8b9c('0x17')]?_0x5274e9[_0x8b9c('0x17')][_0x8b9c('0x18')]===undefined?!![]:![]:!![],'where':_0x5274e9['options']?_0x5274e9[_0x8b9c('0x17')][_0x8b9c('0x21')]||null:null,'attributes':_0x5274e9[_0x8b9c('0x17')]?_0x5274e9[_0x8b9c('0x17')][_0x8b9c('0x19')]||null:null,'include':_0x5274e9[_0x8b9c('0x17')]?_0x5274e9[_0x8b9c('0x17')][_0x8b9c('0x1b')]?_[_0x8b9c('0x1c')](_0x5274e9[_0x8b9c('0x17')][_0x8b9c('0x1b')],function(_0x20e6eb){return{'model':db[_0x20e6eb[_0x8b9c('0x1d')]],'as':_0x20e6eb['as'],'attributes':_0x20e6eb[_0x8b9c('0x19')],'include':_0x20e6eb[_0x8b9c('0x1b')]?_[_0x8b9c('0x1c')](_0x20e6eb[_0x8b9c('0x1b')],function(_0x585cb8){return{'model':db[_0x585cb8[_0x8b9c('0x1d')]],'as':_0x585cb8['as'],'attributes':_0x585cb8['attributes'],'include':_0x585cb8[_0x8b9c('0x1b')]?_[_0x8b9c('0x1c')](_0x585cb8[_0x8b9c('0x1b')],function(_0x569d54){return{'model':db[_0x569d54['model']],'as':_0x569d54['as'],'attributes':_0x569d54[_0x8b9c('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x398b39){logger[_0x8b9c('0xd')](_0x8b9c('0x1f'),_0x5274e9);logger[_0x8b9c('0x10')](_0x8b9c('0x1f'),_0x5274e9,JSON[_0x8b9c('0x1e')](_0x398b39));_0x25ab06(_0x398b39);})[_0x8b9c('0x14')](function(_0x5b4669){logger['error'](_0x8b9c('0x1f'),_0x5b4669['message'],_0x5274e9);_0x570bdc(_0x13e01f[_0x8b9c('0x11')](0x1f4,_0x5b4669[_0x8b9c('0x13')]));});});};
\ No newline at end of file
+var _0x7910=['then','info','Trunk,\x20%s,\x20%s','request\x20sent','debug','Trunk,\x20%s,\x20%s,\x20%s','error','code','message','GetTrunk','Trunk','findAll','options','raw','where','limit','include','map','model','attributes','catch','ShowTrunk','find','stringify','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','jayson/promise','client','http'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0x7910,0xc2));var _0x0791=function(_0x44474f,_0x431580){_0x44474f=_0x44474f-0x0;var _0x427d97=_0x7910[_0x44474f];return _0x427d97;};'use strict';var _=require(_0x0791('0x0'));var util=require(_0x0791('0x1'));var moment=require(_0x0791('0x2'));var BPromise=require(_0x0791('0x3'));var rs=require(_0x0791('0x4'));var fs=require('fs');var Redis=require(_0x0791('0x5'));var db=require(_0x0791('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0x0791('0x7'));var client=jayson[_0x0791('0x8')][_0x0791('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x343ff9,_0x1993d9,_0x558fb4){return new BPromise(function(_0x4e775f,_0x51ea10){return client['request'](_0x343ff9,_0x558fb4)[_0x0791('0xa')](function(_0x713687){logger[_0x0791('0xb')](_0x0791('0xc'),_0x1993d9,_0x0791('0xd'));logger[_0x0791('0xe')](_0x0791('0xf'),_0x1993d9,_0x0791('0xd'),JSON['stringify'](_0x713687));if(_0x713687['error']){if(_0x713687[_0x0791('0x10')][_0x0791('0x11')]===0x1f4){logger[_0x0791('0x10')](_0x0791('0xc'),_0x1993d9,_0x713687[_0x0791('0x10')][_0x0791('0x12')]);return _0x51ea10(_0x713687[_0x0791('0x10')][_0x0791('0x12')]);}logger['error'](_0x0791('0xc'),_0x1993d9,_0x713687[_0x0791('0x10')][_0x0791('0x12')]);return _0x4e775f(_0x713687['error'][_0x0791('0x12')]);}else{logger['info'](_0x0791('0xc'),_0x1993d9,_0x0791('0xd'));_0x4e775f(_0x713687['result'][_0x0791('0x12')]);}})['catch'](function(_0x4f19b6){logger[_0x0791('0x10')]('Trunk,\x20%s,\x20%s',_0x1993d9,_0x4f19b6);_0x51ea10(_0x4f19b6);});});}exports[_0x0791('0x13')]=function(_0x2ccd9b){var _0x46b09b=this;return new Promise(function(_0xd832cf,_0x39e4ec){return db[_0x0791('0x14')][_0x0791('0x15')]({'raw':_0x2ccd9b['options']?_0x2ccd9b[_0x0791('0x16')][_0x0791('0x17')]===undefined?!![]:![]:!![],'where':_0x2ccd9b[_0x0791('0x16')]?_0x2ccd9b[_0x0791('0x16')][_0x0791('0x18')]||null:null,'attributes':_0x2ccd9b[_0x0791('0x16')]?_0x2ccd9b[_0x0791('0x16')]['attributes']||null:null,'limit':_0x2ccd9b[_0x0791('0x16')]?_0x2ccd9b['options'][_0x0791('0x19')]||null:null,'include':_0x2ccd9b[_0x0791('0x16')]?_0x2ccd9b[_0x0791('0x16')][_0x0791('0x1a')]?_[_0x0791('0x1b')](_0x2ccd9b['options'][_0x0791('0x1a')],function(_0x46dc13){return{'model':db[_0x46dc13[_0x0791('0x1c')]],'as':_0x46dc13['as'],'attributes':_0x46dc13[_0x0791('0x1d')],'include':_0x46dc13[_0x0791('0x1a')]?_[_0x0791('0x1b')](_0x46dc13[_0x0791('0x1a')],function(_0x19fb09){return{'model':db[_0x19fb09[_0x0791('0x1c')]],'as':_0x19fb09['as'],'attributes':_0x19fb09[_0x0791('0x1d')],'include':_0x19fb09[_0x0791('0x1a')]?_['map'](_0x19fb09[_0x0791('0x1a')],function(_0x597696){return{'model':db[_0x597696[_0x0791('0x1c')]],'as':_0x597696['as'],'attributes':_0x597696[_0x0791('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x0791('0xa')](function(_0x455519){logger[_0x0791('0xb')]('GetTrunk',_0x2ccd9b);logger['debug'](_0x0791('0x13'),_0x2ccd9b,JSON['stringify'](_0x455519));_0xd832cf(_0x455519);})[_0x0791('0x1e')](function(_0x398301){logger['error'](_0x0791('0x13'),_0x398301[_0x0791('0x12')],_0x2ccd9b);_0x39e4ec(_0x46b09b[_0x0791('0x10')](0x1f4,_0x398301[_0x0791('0x12')]));});});};exports[_0x0791('0x1f')]=function(_0x5f3d2e){var _0x53530a=this;return new Promise(function(_0x1fc9c8,_0x5b143a){return db[_0x0791('0x14')][_0x0791('0x20')]({'raw':_0x5f3d2e[_0x0791('0x16')]?_0x5f3d2e[_0x0791('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x5f3d2e[_0x0791('0x16')]?_0x5f3d2e['options'][_0x0791('0x18')]||null:null,'attributes':_0x5f3d2e['options']?_0x5f3d2e[_0x0791('0x16')][_0x0791('0x1d')]||null:null,'include':_0x5f3d2e[_0x0791('0x16')]?_0x5f3d2e[_0x0791('0x16')][_0x0791('0x1a')]?_[_0x0791('0x1b')](_0x5f3d2e['options'][_0x0791('0x1a')],function(_0x129f1f){return{'model':db[_0x129f1f['model']],'as':_0x129f1f['as'],'attributes':_0x129f1f['attributes'],'include':_0x129f1f[_0x0791('0x1a')]?_['map'](_0x129f1f[_0x0791('0x1a')],function(_0x99a504){return{'model':db[_0x99a504[_0x0791('0x1c')]],'as':_0x99a504['as'],'attributes':_0x99a504[_0x0791('0x1d')],'include':_0x99a504[_0x0791('0x1a')]?_[_0x0791('0x1b')](_0x99a504[_0x0791('0x1a')],function(_0x20ca7c){return{'model':db[_0x20ca7c[_0x0791('0x1c')]],'as':_0x20ca7c['as'],'attributes':_0x20ca7c[_0x0791('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x0791('0xa')](function(_0x1d1fc3){logger['info'](_0x0791('0x1f'),_0x5f3d2e);logger[_0x0791('0xe')](_0x0791('0x1f'),_0x5f3d2e,JSON[_0x0791('0x21')](_0x1d1fc3));_0x1fc9c8(_0x1d1fc3);})['catch'](function(_0x4e9805){logger[_0x0791('0x10')](_0x0791('0x1f'),_0x4e9805[_0x0791('0x12')],_0x5f3d2e);_0x5b143a(_0x53530a[_0x0791('0x10')](0x1f4,_0x4e9805[_0x0791('0x12')]));});});};
\ No newline at end of file
index 54eb9cc..f68f1d8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9b8b=['exports','express','../../components/auth/service','put','/:id','isAuthenticated','update'];(function(_0x1a03e1,_0x3f5037){var _0x528919=function(_0x179075){while(--_0x179075){_0x1a03e1['push'](_0x1a03e1['shift']());}};_0x528919(++_0x3f5037);}(_0x9b8b,0xc5));var _0xb9b8=function(_0xad8f02,_0x3b94bf){_0xad8f02=_0xad8f02-0x0;var _0x36ab56=_0x9b8b[_0xad8f02];return _0x36ab56;};'use strict';var express=require(_0xb9b8('0x0'));var router=express['Router']();var auth=require(_0xb9b8('0x1'));var controller=require('./user-setting.controller');router[_0xb9b8('0x2')](_0xb9b8('0x3'),auth[_0xb9b8('0x4')](),controller[_0xb9b8('0x5')]);module[_0xb9b8('0x6')]=router;
\ No newline at end of file
+var _0xc64b=['./user-setting.controller','put','/:id','isAuthenticated','update','../../components/auth/service'];(function(_0x56acd1,_0xfca357){var _0x257590=function(_0x629209){while(--_0x629209){_0x56acd1['push'](_0x56acd1['shift']());}};_0x257590(++_0xfca357);}(_0xc64b,0x173));var _0xbc64=function(_0x174583,_0x468485){_0x174583=_0x174583-0x0;var _0x14e46f=_0xc64b[_0x174583];return _0x14e46f;};'use strict';var express=require('express');var router=express['Router']();var auth=require(_0xbc64('0x0'));var controller=require(_0xbc64('0x1'));router[_0xbc64('0x2')](_0xbc64('0x3'),auth[_0xbc64('0x4')](),controller[_0xbc64('0x5')]);module['exports']=router;
\ No newline at end of file
index 030a688..8e47b30 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x473d=['INTEGER','UserId','sequelize','error','warning','info','debug','exports','BOOLEAN','DATE'];(function(_0xeef852,_0x5ecff2){var _0x2c0c85=function(_0xe4f39){while(--_0xe4f39){_0xeef852['push'](_0xeef852['shift']());}};_0x2c0c85(++_0x5ecff2);}(_0x473d,0xf2));var _0xd473=function(_0x4ef904,_0x2508d8){_0x4ef904=_0x4ef904-0x0;var _0x2ea461=_0x473d[_0x4ef904];return _0x2ea461;};'use strict';var Sequelize=require(_0xd473('0x0'));const CLIENT_SIDE_LOG_LEVELS=[_0xd473('0x1'),_0xd473('0x2'),_0xd473('0x3'),_0xd473('0x4')];module[_0xd473('0x5')]={'clientSideLoggingLevel':{'type':Sequelize['ENUM'](CLIENT_SIDE_LOG_LEVELS),'allowNull':![],'defaultValue':'error','validate':{'isIn':[CLIENT_SIDE_LOG_LEVELS]}},'clientSideLoggingEnabled':{'type':Sequelize[_0xd473('0x6')],'defaultValue':![]},'clientSideLoggingScopes':{'type':Sequelize['TEXT'],'allowNull':!![]},'clientSideLoggingEnabledSince':{'type':Sequelize[_0xd473('0x7')],'allowNull':!![],'defaultValue':null},'UserId':{'type':Sequelize[_0xd473('0x8')],'unique':_0xd473('0x9')}};
\ No newline at end of file
+var _0x0438=['INTEGER','warning','debug','exports','error','TEXT','DATE'];(function(_0x111a8a,_0x411280){var _0x49a085=function(_0x5953ac){while(--_0x5953ac){_0x111a8a['push'](_0x111a8a['shift']());}};_0x49a085(++_0x411280);}(_0x0438,0x86));var _0x8043=function(_0x4b7895,_0x3c4f5d){_0x4b7895=_0x4b7895-0x0;var _0x264180=_0x0438[_0x4b7895];return _0x264180;};'use strict';var Sequelize=require('sequelize');const CLIENT_SIDE_LOG_LEVELS=['error',_0x8043('0x0'),'info',_0x8043('0x1')];module[_0x8043('0x2')]={'clientSideLoggingLevel':{'type':Sequelize['ENUM'](CLIENT_SIDE_LOG_LEVELS),'allowNull':![],'defaultValue':_0x8043('0x3'),'validate':{'isIn':[CLIENT_SIDE_LOG_LEVELS]}},'clientSideLoggingEnabled':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'clientSideLoggingScopes':{'type':Sequelize[_0x8043('0x4')],'allowNull':!![]},'clientSideLoggingEnabledSince':{'type':Sequelize[_0x8043('0x5')],'allowNull':!![],'defaultValue':null},'UserId':{'type':Sequelize[_0x8043('0x6')],'unique':'UserId'}};
\ No newline at end of file
index 369e7fd..e68293d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xde50=['sendStatus','error','name','send','user','Unauthorized','params','Invalid\x20user\x20setting\x20id','UserSetting','find','body','catch','../../config/logger','api','../../config/environment','../../mysqldb','redis','register','localhost','status','update','then'];(function(_0x4ceb9e,_0x291e82){var _0x259d85=function(_0x374762){while(--_0x374762){_0x4ceb9e['push'](_0x4ceb9e['shift']());}};_0x259d85(++_0x291e82);}(_0xde50,0x140));var _0x0de5=function(_0x2a586f,_0x1c05b2){_0x2a586f=_0x2a586f-0x0;var _0x2dd8c5=_0xde50[_0x2a586f];return _0x2dd8c5;};'use strict';var _=require('lodash');var Redis=require('ioredis');var logger=require(_0x0de5('0x0'))(_0x0de5('0x1'));var config=require(_0x0de5('0x2'));var db=require(_0x0de5('0x3'))['db'];var socket=require('socket.io-emitter')(new Redis(config[_0x0de5('0x4')]));require('./user-setting.socket')[_0x0de5('0x5')](socket);config['redis']=_['defaults'](config['redis'],{'host':_0x0de5('0x6'),'port':0x18eb});function respondWithResult(_0x2714e3,_0x2a5d94){_0x2a5d94=_0x2a5d94||0xc8;return function(_0x57410e){if(_0x57410e){return _0x2714e3[_0x0de5('0x7')](_0x2a5d94)['json'](_0x57410e);}};}function saveUpdates(_0x54c94f){return function(_0x5655f2){if(_0x5655f2){return _0x5655f2[_0x0de5('0x8')](_0x54c94f)[_0x0de5('0x9')](function(_0x833ae0){return _0x833ae0;});}return null;};}function handleEntityNotFound(_0x5a165a){return function(_0x3f12d4){if(!_0x3f12d4){_0x5a165a[_0x0de5('0xa')](0x194);}return _0x3f12d4;};}function handleError(_0x53cf09,_0x132a49){_0x132a49=_0x132a49||0x1f4;return function(_0x21a80e){logger[_0x0de5('0xb')](_0x21a80e['stack']);if(_0x21a80e['name']){delete _0x21a80e[_0x0de5('0xc')];}_0x53cf09[_0x0de5('0x7')](_0x132a49)[_0x0de5('0xd')](_0x21a80e);};}exports[_0x0de5('0x8')]=function(_0x2dddc0,_0x5ba869){if(_0x2dddc0[_0x0de5('0xe')]['role']!=='admin')throw new Error(_0x0de5('0xf'));if(isNaN(Number(_0x2dddc0[_0x0de5('0x10')]['id'])))throw new Error(_0x0de5('0x11'));return db[_0x0de5('0x12')][_0x0de5('0x13')]({'where':{'id':_0x2dddc0[_0x0de5('0x10')]['id']}})['then'](handleEntityNotFound(_0x5ba869,null))[_0x0de5('0x9')](saveUpdates(_0x2dddc0[_0x0de5('0x14')],null))[_0x0de5('0x9')](respondWithResult(_0x5ba869,null))[_0x0de5('0x15')](handleError(_0x5ba869,null));};
\ No newline at end of file
+var _0xcb81=['sendStatus','error','name','send','update','user','role','admin','Unauthorized','params','Invalid\x20user\x20setting\x20id','UserSetting','then','body','catch','lodash','ioredis','api','redis','./user-setting.socket','register','defaults','localhost','status','json'];(function(_0x43dc6f,_0xbf2321){var _0x26ad2a=function(_0x10782a){while(--_0x10782a){_0x43dc6f['push'](_0x43dc6f['shift']());}};_0x26ad2a(++_0xbf2321);}(_0xcb81,0x154));var _0x1cb8=function(_0x54ea7a,_0x19df9b){_0x54ea7a=_0x54ea7a-0x0;var _0x65a10d=_0xcb81[_0x54ea7a];return _0x65a10d;};'use strict';var _=require(_0x1cb8('0x0'));var Redis=require(_0x1cb8('0x1'));var logger=require('../../config/logger')(_0x1cb8('0x2'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];var socket=require('socket.io-emitter')(new Redis(config[_0x1cb8('0x3')]));require(_0x1cb8('0x4'))[_0x1cb8('0x5')](socket);config[_0x1cb8('0x3')]=_[_0x1cb8('0x6')](config['redis'],{'host':_0x1cb8('0x7'),'port':0x18eb});function respondWithResult(_0x2ac2d6,_0x584b16){_0x584b16=_0x584b16||0xc8;return function(_0x2408c2){if(_0x2408c2){return _0x2ac2d6[_0x1cb8('0x8')](_0x584b16)[_0x1cb8('0x9')](_0x2408c2);}};}function saveUpdates(_0x503efb){return function(_0x1ff267){if(_0x1ff267){return _0x1ff267['update'](_0x503efb)['then'](function(_0x29e901){return _0x29e901;});}return null;};}function handleEntityNotFound(_0x2158a9){return function(_0x16600b){if(!_0x16600b){_0x2158a9[_0x1cb8('0xa')](0x194);}return _0x16600b;};}function handleError(_0x267dde,_0x32715a){_0x32715a=_0x32715a||0x1f4;return function(_0xb8048c){logger[_0x1cb8('0xb')](_0xb8048c['stack']);if(_0xb8048c[_0x1cb8('0xc')]){delete _0xb8048c[_0x1cb8('0xc')];}_0x267dde[_0x1cb8('0x8')](_0x32715a)[_0x1cb8('0xd')](_0xb8048c);};}exports[_0x1cb8('0xe')]=function(_0x5dfde1,_0x389c12){if(_0x5dfde1[_0x1cb8('0xf')][_0x1cb8('0x10')]!==_0x1cb8('0x11'))throw new Error(_0x1cb8('0x12'));if(isNaN(Number(_0x5dfde1[_0x1cb8('0x13')]['id'])))throw new Error(_0x1cb8('0x14'));return db[_0x1cb8('0x15')]['find']({'where':{'id':_0x5dfde1[_0x1cb8('0x13')]['id']}})['then'](handleEntityNotFound(_0x389c12,null))[_0x1cb8('0x16')](saveUpdates(_0x5dfde1[_0x1cb8('0x17')],null))[_0x1cb8('0x16')](respondWithResult(_0x389c12,null))[_0x1cb8('0x18')](handleError(_0x389c12,null));};
\ No newline at end of file
index 71e810f..5177c70 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1e0c=['hasOwnProperty','hook','exports','events','../../mysqldb','UserSetting','setMaxListeners','save','emit'];(function(_0x340dac,_0x571885){var _0x40bf79=function(_0x42d4f9){while(--_0x42d4f9){_0x340dac['push'](_0x340dac['shift']());}};_0x40bf79(++_0x571885);}(_0x1e0c,0x1c5));var _0xc1e0=function(_0x7ab6d9,_0x1f1d29){_0x7ab6d9=_0x7ab6d9-0x0;var _0x2fbfb2=_0x1e0c[_0x7ab6d9];return _0x2fbfb2;};'use strict';var EventEmitter=require(_0xc1e0('0x0'));var UserSetting=require(_0xc1e0('0x1'))['db'][_0xc1e0('0x2')];var UserSettingEvents=new EventEmitter();UserSettingEvents[_0xc1e0('0x3')](0x0);var events={'afterCreate':_0xc1e0('0x4'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x4a916f){return function(_0x109a92,_0x340b8a,_0x598c3b){UserSettingEvents[_0xc1e0('0x5')](_0x4a916f+':'+_0x109a92['id'],_0x109a92);UserSettingEvents[_0xc1e0('0x5')](_0x4a916f,_0x109a92);_0x598c3b(null);};}for(var e in events){if(events[_0xc1e0('0x6')](e)){var event=events[e];UserSetting[_0xc1e0('0x7')](e,emitEvent(event));}}module[_0xc1e0('0x8')]=UserSettingEvents;
\ No newline at end of file
+var _0xe5f0=['UserSetting','setMaxListeners','save','remove','emit','hasOwnProperty','hook','exports','../../mysqldb'];(function(_0x21c01f,_0x1641e4){var _0x49f9e3=function(_0x3ca03e){while(--_0x3ca03e){_0x21c01f['push'](_0x21c01f['shift']());}};_0x49f9e3(++_0x1641e4);}(_0xe5f0,0x10d));var _0x0e5f=function(_0x1729b2,_0xc95bcf){_0x1729b2=_0x1729b2-0x0;var _0x4fe362=_0xe5f0[_0x1729b2];return _0x4fe362;};'use strict';var EventEmitter=require('events');var UserSetting=require(_0x0e5f('0x0'))['db'][_0x0e5f('0x1')];var UserSettingEvents=new EventEmitter();UserSettingEvents[_0x0e5f('0x2')](0x0);var events={'afterCreate':_0x0e5f('0x3'),'afterUpdate':'update','afterDestroy':_0x0e5f('0x4')};function emitEvent(_0x5aaf51){return function(_0x4e3d38,_0xfdd37f,_0x4cec92){UserSettingEvents[_0x0e5f('0x5')](_0x5aaf51+':'+_0x4e3d38['id'],_0x4e3d38);UserSettingEvents[_0x0e5f('0x5')](_0x5aaf51,_0x4e3d38);_0x4cec92(null);};}for(var e in events){if(events[_0x0e5f('0x6')](e)){var event=events[e];UserSetting[_0x0e5f('0x7')](e,emitEvent(event));}}module[_0x0e5f('0x8')]=UserSettingEvents;
\ No newline at end of file
index b592d3c..86445a7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x58e5=['exports','define','UserSetting','user_settings','clientSideLoggingEnabled','clientSideLoggingEnabledSince','./user-setting.attributes'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x58e5,0xd1));var _0x558e=function(_0x599f41,_0x4db732){_0x599f41=_0x599f41-0x0;var _0x2e4d58=_0x58e5[_0x599f41];return _0x2e4d58;};'use strict';var attributes=require(_0x558e('0x0'));module[_0x558e('0x1')]=function(_0x41331c){return _0x41331c[_0x558e('0x2')](_0x558e('0x3'),attributes,{'tableName':_0x558e('0x4'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x49a1b7){if(!_0x49a1b7[_0x558e('0x5')])_0x49a1b7['clientSideLoggingEnabledSince']=null;else if(_0x49a1b7['clientSideLoggingEnabledSince']===null)_0x49a1b7[_0x558e('0x6')]=new Date();}}});};
\ No newline at end of file
+var _0xd139=['UserSetting','user_settings','clientSideLoggingEnabled','clientSideLoggingEnabledSince','./user-setting.attributes','exports'];(function(_0xd4e399,_0x4a8481){var _0x1186c9=function(_0x48aa19){while(--_0x48aa19){_0xd4e399['push'](_0xd4e399['shift']());}};_0x1186c9(++_0x4a8481);}(_0xd139,0x14e));var _0x9d13=function(_0x866ecf,_0x484490){_0x866ecf=_0x866ecf-0x0;var _0x359a7b=_0xd139[_0x866ecf];return _0x359a7b;};'use strict';var attributes=require(_0x9d13('0x0'));module[_0x9d13('0x1')]=function(_0x5ec4c7){return _0x5ec4c7['define'](_0x9d13('0x2'),attributes,{'tableName':_0x9d13('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x3d392a){if(!_0x3d392a[_0x9d13('0x4')])_0x3d392a[_0x9d13('0x5')]=null;else if(_0x3d392a[_0x9d13('0x5')]===null)_0x3d392a[_0x9d13('0x5')]=new Date();}}});};
\ No newline at end of file
index 57ee693..c08240b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x83d4=['save','remove','update','emit','user-setting:update','UserId','register','length','user-setting:','./user-setting.events'];(function(_0x2f50cc,_0x3b9e38){var _0x1b5e1f=function(_0x1065bf){while(--_0x1065bf){_0x2f50cc['push'](_0x2f50cc['shift']());}};_0x1b5e1f(++_0x3b9e38);}(_0x83d4,0x1cb));var _0x483d=function(_0x56b000,_0x199ba8){_0x56b000=_0x56b000-0x0;var _0x50583c=_0x83d4[_0x56b000];return _0x50583c;};'use strict';var UserSettingEvents=require(_0x483d('0x0'));var events=[_0x483d('0x1'),_0x483d('0x2'),_0x483d('0x3')];function createListener(_0x415890,_0x19bd34){return function(_0xf8d790){_0x19bd34[_0x483d('0x4')](_0x415890,_0xf8d790);if(_0x415890===_0x483d('0x5')){_0x19bd34[_0x483d('0x4')]('user-setting:update:user-'+_0xf8d790[_0x483d('0x6')],_0xf8d790);}};}exports[_0x483d('0x7')]=function(_0x7d3fea){for(var _0x3b5826=0x0,_0x47ccfc=events[_0x483d('0x8')];_0x3b5826<_0x47ccfc;_0x3b5826++){var _0x1373bb=events[_0x3b5826];var _0x41f737=createListener(_0x483d('0x9')+_0x1373bb,_0x7d3fea);UserSettingEvents['on'](_0x1373bb,_0x41f737);}};
\ No newline at end of file
+var _0xd090=['user-setting:','./user-setting.events','remove','emit','user-setting:update','user-setting:update:user-','UserId','register','length'];(function(_0x24203c,_0x2d77b0){var _0x2c9207=function(_0x42a403){while(--_0x42a403){_0x24203c['push'](_0x24203c['shift']());}};_0x2c9207(++_0x2d77b0);}(_0xd090,0x13c));var _0x0d09=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xd090[_0x3dd15e];return _0x231fd0;};'use strict';var UserSettingEvents=require(_0x0d09('0x0'));var events=['save',_0x0d09('0x1'),'update'];function createListener(_0x41123c,_0x55117e){return function(_0xda44f6){_0x55117e[_0x0d09('0x2')](_0x41123c,_0xda44f6);if(_0x41123c===_0x0d09('0x3')){_0x55117e[_0x0d09('0x2')](_0x0d09('0x4')+_0xda44f6[_0x0d09('0x5')],_0xda44f6);}};}exports[_0x0d09('0x6')]=function(_0x2fca29){for(var _0x2c8b1c=0x0,_0x57047d=events[_0x0d09('0x7')];_0x2c8b1c<_0x57047d;_0x2c8b1c++){var _0x924b7e=events[_0x2c8b1c];var _0xe1e1b2=createListener(_0x0d09('0x8')+_0x924b7e,_0x2fca29);UserSettingEvents['on'](_0x924b7e,_0xe1e1b2);}};
\ No newline at end of file
index ec6799a..2298e6a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x09d5=['getTeams','/:id/lists','getLists','/:id/agents','getAgents','/:id/prefixes','/:id/fax_accounts','getFaxAccounts','getMailAccounts','/:id/openchannel_accounts','getOpenchannelAccounts','/:id/sms_accounts','getChatWebsites','/:id/whatsapp_accounts','getWhatsappAccounts','/:id/scheduled_calls','getScheduledCalls','/:id/api_key','getApiKey','post','create','/create_many','bulkCreate','addQueues','diskStorage','root','server/files/images/','format','%s-%s','originalname','addAvatar','/:id/login','login','/:id/logout','logout','pause','unpause','/:id/chat_interactions','addChatInteractions','/:id/mail_interactions','addMailInteractions','/:id/fax_interactions','/:id/sms_interactions','addSmsInteractions','/:id/openchannel_interactions','addOpenchannelInteractions','/:id/whatsapp_interactions','/:id/mail_accounts','addSmsAccounts','/:id/chat_websites','addChatWebsites','addWhatsappAccounts','createApiKey','/:id/password','delete','removeQueues','removeTeams','destroy','removeChatInteractions','removeMailInteractions','removeFaxInteractions','removeOpenchannelInteractions','removeFaxAccounts','removeMailAccounts','removeSmsAccounts','removeChatWebsites','removeApiKey','messengerSoundNotification','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','/describe','/whoami','/:id','show','/:id/avatar','getAvatar','/:id/open_tabs','getOpenTabs','/:id/contacts','getContacts','/:id/queues','getQueues','/:id/queues_rt','getVoiceQueuesRt','/:id/groups','getGroups','getRecordings','/:id/screen_recordings','getScreenRecordings','/:id/chat/interactions','getChatInteractions','/:id/openchannel/interactions','getOpenchannelInteractions','/:id/mail/interactions','getMailInteractions','/:id/sms/interactions','getSmsInteractions','/:id/whatsapp/interactions','getWhatsappInteractions','/:id/teams'];(function(_0x547ff4,_0x416fa1){var _0xe41057=function(_0x1afe63){while(--_0x1afe63){_0x547ff4['push'](_0x547ff4['shift']());}};_0xe41057(++_0x416fa1);}(_0x09d5,0x192));var _0x509d=function(_0x424462,_0x2f63bb){_0x424462=_0x424462-0x0;var _0x2002bf=_0x09d5[_0x424462];return _0x2002bf;};'use strict';var multer=require(_0x509d('0x0'));var util=require(_0x509d('0x1'));var path=require(_0x509d('0x2'));var timeout=require(_0x509d('0x3'));var express=require('express');var router=express[_0x509d('0x4')]();var fs_extra=require(_0x509d('0x5'));var auth=require(_0x509d('0x6'));var interaction=require(_0x509d('0x7'));var config=require(_0x509d('0x8'));var controller=require('./user.controller');router['get']('/',auth[_0x509d('0x9')](),controller[_0x509d('0xa')]);router[_0x509d('0xb')](_0x509d('0xc'),auth[_0x509d('0x9')](),controller['describe']);router[_0x509d('0xb')](_0x509d('0xd'),auth['isAuthenticated'](),controller['whoami']);router['get']('/presence',auth[_0x509d('0x9')](),controller['getPresence']);router[_0x509d('0xb')](_0x509d('0xe'),auth[_0x509d('0x9')](),controller[_0x509d('0xf')]);router[_0x509d('0xb')](_0x509d('0x10'),controller[_0x509d('0x11')]);router[_0x509d('0xb')](_0x509d('0x12'),auth[_0x509d('0x9')](),controller[_0x509d('0x13')]);router[_0x509d('0xb')](_0x509d('0x14'),auth['isAuthenticated'](),controller[_0x509d('0x15')]);router[_0x509d('0xb')](_0x509d('0x16'),auth['isAuthenticated'](),controller[_0x509d('0x17')]);router[_0x509d('0xb')](_0x509d('0x18'),auth[_0x509d('0x9')](),controller[_0x509d('0x19')]);router['get'](_0x509d('0x1a'),auth[_0x509d('0x9')](),controller[_0x509d('0x1b')]);router[_0x509d('0xb')]('/:id/recordings',auth['isAuthenticated'](),controller[_0x509d('0x1c')]);router[_0x509d('0xb')](_0x509d('0x1d'),auth['isAuthenticated'](),controller[_0x509d('0x1e')]);router['get'](_0x509d('0x1f'),auth[_0x509d('0x9')](),controller[_0x509d('0x20')]);router['get'](_0x509d('0x21'),auth[_0x509d('0x9')](),controller[_0x509d('0x22')]);router[_0x509d('0xb')](_0x509d('0x23'),auth[_0x509d('0x9')](),controller[_0x509d('0x24')]);router[_0x509d('0xb')](_0x509d('0x25'),auth[_0x509d('0x9')](),controller[_0x509d('0x26')]);router[_0x509d('0xb')]('/:id/fax/interactions',auth[_0x509d('0x9')](),controller['getFaxInteractions']);router[_0x509d('0xb')](_0x509d('0x27'),auth[_0x509d('0x9')](),controller[_0x509d('0x28')]);router['get'](_0x509d('0x29'),auth[_0x509d('0x9')](),controller[_0x509d('0x2a')]);router['get'](_0x509d('0x2b'),auth[_0x509d('0x9')](),controller[_0x509d('0x2c')]);router[_0x509d('0xb')](_0x509d('0x2d'),auth[_0x509d('0x9')](),controller[_0x509d('0x2e')]);router[_0x509d('0xb')](_0x509d('0x2f'),auth[_0x509d('0x9')](),controller['getVoicePrefixes']);router[_0x509d('0xb')](_0x509d('0x30'),auth[_0x509d('0x9')](),controller[_0x509d('0x31')]);router[_0x509d('0xb')]('/:id/mail_accounts',auth[_0x509d('0x9')](),controller[_0x509d('0x32')]);router[_0x509d('0xb')](_0x509d('0x33'),auth[_0x509d('0x9')](),controller[_0x509d('0x34')]);router[_0x509d('0xb')](_0x509d('0x35'),auth[_0x509d('0x9')](),controller['getSmsAccounts']);router[_0x509d('0xb')]('/:id/chat_websites',auth[_0x509d('0x9')](),controller[_0x509d('0x36')]);router[_0x509d('0xb')](_0x509d('0x37'),auth[_0x509d('0x9')](),controller[_0x509d('0x38')]);router['get'](_0x509d('0x39'),auth[_0x509d('0x9')](),controller[_0x509d('0x3a')]);router[_0x509d('0xb')](_0x509d('0x3b'),auth[_0x509d('0x9')](),controller[_0x509d('0x3c')]);router[_0x509d('0x3d')](_0x509d('0x14'),auth[_0x509d('0x9')](),controller['addContacts']);router['post']('/',auth[_0x509d('0x9')](),controller[_0x509d('0x3e')]);router[_0x509d('0x3d')](_0x509d('0x3f'),auth['isAuthenticated'](),controller[_0x509d('0x40')]);router[_0x509d('0x3d')](_0x509d('0x16'),auth['isAuthenticated'](),controller[_0x509d('0x41')]);var upload=multer({'storage':multer[_0x509d('0x42')]({'destination':function(_0x1f4e18,_0x3c02d4,_0x378fa1){_0x378fa1(null,path['join'](config[_0x509d('0x43')],_0x509d('0x44')));},'filename':function(_0x4fabf1,_0x1b2c6e,_0x2287c6){_0x2287c6(null,util[_0x509d('0x45')](_0x509d('0x46'),Date['now'](),_0x1b2c6e[_0x509d('0x47')]));}})});router[_0x509d('0x3d')](_0x509d('0x10'),upload['single']('file'),controller[_0x509d('0x48')]);router[_0x509d('0x3d')](_0x509d('0x49'),auth[_0x509d('0x9')](),controller[_0x509d('0x4a')]);router[_0x509d('0x3d')](_0x509d('0x4b'),auth[_0x509d('0x9')](),controller[_0x509d('0x4c')]);router[_0x509d('0x3d')]('/:id/pause',auth[_0x509d('0x9')](),controller[_0x509d('0x4d')]);router[_0x509d('0x3d')]('/:id/unpause',auth['isAuthenticated'](),controller[_0x509d('0x4e')]);router[_0x509d('0x3d')](_0x509d('0x29'),auth[_0x509d('0x9')](),controller['addTeams']);router[_0x509d('0x3d')](_0x509d('0x4f'),auth['isAuthenticated'](),controller[_0x509d('0x50')]);router['post'](_0x509d('0x51'),auth[_0x509d('0x9')](),controller[_0x509d('0x52')]);router['post'](_0x509d('0x53'),auth[_0x509d('0x9')](),controller['addFaxInteractions']);router[_0x509d('0x3d')](_0x509d('0x54'),auth[_0x509d('0x9')](),controller[_0x509d('0x55')]);router['post'](_0x509d('0x56'),auth[_0x509d('0x9')](),controller[_0x509d('0x57')]);router[_0x509d('0x3d')](_0x509d('0x58'),auth[_0x509d('0x9')](),controller['addWhatsappInteractions']);router[_0x509d('0x3d')]('/:id/fax_accounts',auth['isAuthenticated'](),controller['addFaxAccounts']);router['post'](_0x509d('0x59'),auth[_0x509d('0x9')](),controller['addMailAccounts']);router[_0x509d('0x3d')](_0x509d('0x33'),auth[_0x509d('0x9')](),controller['addOpenchannelAccounts']);router[_0x509d('0x3d')](_0x509d('0x35'),auth[_0x509d('0x9')](),controller[_0x509d('0x5a')]);router[_0x509d('0x3d')](_0x509d('0x5b'),auth['isAuthenticated'](),controller[_0x509d('0x5c')]);router[_0x509d('0x3d')](_0x509d('0x37'),auth[_0x509d('0x9')](),controller[_0x509d('0x5d')]);router[_0x509d('0x3d')]('/:id/api_key',auth[_0x509d('0x9')](),controller[_0x509d('0x5e')]);router['put']('/:id',auth[_0x509d('0x9')](),controller['update']);router['put'](_0x509d('0x5f'),auth[_0x509d('0x9')](),controller['changePassword']);router[_0x509d('0x60')](_0x509d('0x16'),auth[_0x509d('0x9')](),controller[_0x509d('0x61')]);router[_0x509d('0x60')](_0x509d('0x29'),auth[_0x509d('0x9')](),controller[_0x509d('0x62')]);router[_0x509d('0x60')](_0x509d('0xe'),auth['isAuthenticated'](),controller[_0x509d('0x63')]);router[_0x509d('0x60')]('/:id/chat_interactions',auth[_0x509d('0x9')](),controller[_0x509d('0x64')]);router[_0x509d('0x60')](_0x509d('0x51'),auth[_0x509d('0x9')](),controller[_0x509d('0x65')]);router[_0x509d('0x60')]('/:id/fax_interactions',auth[_0x509d('0x9')](),controller[_0x509d('0x66')]);router[_0x509d('0x60')](_0x509d('0x54'),auth[_0x509d('0x9')](),controller['removeSmsInteractions']);router[_0x509d('0x60')]('/:id/openchannel_interactions',auth[_0x509d('0x9')](),controller[_0x509d('0x67')]);router[_0x509d('0x60')]('/:id/whatsapp_interactions',auth['isAuthenticated'](),controller['removeWhatsappInteractions']);router['delete'](_0x509d('0x30'),auth[_0x509d('0x9')](),controller[_0x509d('0x68')]);router[_0x509d('0x60')](_0x509d('0x59'),auth[_0x509d('0x9')](),controller[_0x509d('0x69')]);router[_0x509d('0x60')](_0x509d('0x33'),auth[_0x509d('0x9')](),controller['removeOpenchannelAccounts']);router[_0x509d('0x60')]('/:id/sms_accounts',auth[_0x509d('0x9')](),controller[_0x509d('0x6a')]);router[_0x509d('0x60')](_0x509d('0x5b'),auth[_0x509d('0x9')](),controller[_0x509d('0x6b')]);router[_0x509d('0x60')]('/:id/whatsapp_accounts',auth[_0x509d('0x9')](),controller['removeWhatsappAccounts']);router[_0x509d('0x60')](_0x509d('0x3b'),auth[_0x509d('0x9')](),controller[_0x509d('0x6c')]);router[_0x509d('0x3d')]('/:id/messengerSoundNotification',auth[_0x509d('0x9')](),controller[_0x509d('0x6d')]);module[_0x509d('0x6e')]=router;
\ No newline at end of file
+var _0xbcd2=['removeWhatsappAccounts','removeApiKey','messengerSoundNotification','exports','multer','util','express','Router','fs-extra','../../components/auth/service','../../config/environment','./user.controller','get','isAuthenticated','/describe','describe','/whoami','whoami','getPresence','/:id','/:id/avatar','getAvatar','/:id/open_tabs','getOpenTabs','/:id/contacts','getContacts','getQueues','/:id/queues_rt','getVoiceQueuesRt','getGroups','/:id/recordings','getRecordings','getScreenRecordings','/:id/chat/interactions','getOpenchannelInteractions','/:id/mail/interactions','/:id/sms/interactions','getSmsInteractions','/:id/fax/interactions','/:id/whatsapp/interactions','getWhatsappInteractions','getTeams','/:id/lists','getLists','/:id/agents','getAgents','/:id/prefixes','getVoicePrefixes','/:id/fax_accounts','getFaxAccounts','/:id/mail_accounts','getMailAccounts','/:id/openchannel_accounts','getOpenchannelAccounts','/:id/sms_accounts','/:id/chat_websites','getChatWebsites','/:id/scheduled_calls','getScheduledCalls','/:id/api_key','getApiKey','post','addContacts','create','/create_many','bulkCreate','/:id/queues','addQueues','diskStorage','join','server/files/images/','format','%s-%s','now','originalname','single','addAvatar','/:id/login','login','logout','/:id/pause','pause','/:id/unpause','unpause','addTeams','addChatInteractions','addMailInteractions','/:id/fax_interactions','addFaxInteractions','/:id/sms_interactions','/:id/openchannel_interactions','addOpenchannelInteractions','addOpenchannelAccounts','addSmsAccounts','addChatWebsites','/:id/whatsapp_accounts','addWhatsappAccounts','createApiKey','update','put','/:id/password','changePassword','removeQueues','delete','/:id/teams','removeTeams','/:id/chat_interactions','removeChatInteractions','removeMailInteractions','removeFaxInteractions','removeSmsInteractions','removeOpenchannelInteractions','/:id/whatsapp_interactions','removeWhatsappInteractions','removeFaxAccounts','removeMailAccounts','removeOpenchannelAccounts','removeSmsAccounts'];(function(_0xb26dbc,_0x48769c){var _0x1c9dc4=function(_0x2baf2a){while(--_0x2baf2a){_0xb26dbc['push'](_0xb26dbc['shift']());}};_0x1c9dc4(++_0x48769c);}(_0xbcd2,0xf0));var _0x2bcd=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xbcd2[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0x2bcd('0x0'));var util=require(_0x2bcd('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x2bcd('0x2'));var router=express[_0x2bcd('0x3')]();var fs_extra=require(_0x2bcd('0x4'));var auth=require(_0x2bcd('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x2bcd('0x6'));var controller=require(_0x2bcd('0x7'));router[_0x2bcd('0x8')]('/',auth[_0x2bcd('0x9')](),controller['index']);router['get'](_0x2bcd('0xa'),auth['isAuthenticated'](),controller[_0x2bcd('0xb')]);router[_0x2bcd('0x8')](_0x2bcd('0xc'),auth['isAuthenticated'](),controller[_0x2bcd('0xd')]);router[_0x2bcd('0x8')]('/presence',auth[_0x2bcd('0x9')](),controller[_0x2bcd('0xe')]);router[_0x2bcd('0x8')](_0x2bcd('0xf'),auth['isAuthenticated'](),controller['show']);router['get'](_0x2bcd('0x10'),controller[_0x2bcd('0x11')]);router[_0x2bcd('0x8')](_0x2bcd('0x12'),auth['isAuthenticated'](),controller[_0x2bcd('0x13')]);router['get'](_0x2bcd('0x14'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x15')]);router[_0x2bcd('0x8')]('/:id/queues',auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x16')]);router[_0x2bcd('0x8')](_0x2bcd('0x17'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x18')]);router[_0x2bcd('0x8')]('/:id/groups',auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x19')]);router['get'](_0x2bcd('0x1a'),auth['isAuthenticated'](),controller[_0x2bcd('0x1b')]);router['get']('/:id/screen_recordings',auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x1c')]);router[_0x2bcd('0x8')](_0x2bcd('0x1d'),auth[_0x2bcd('0x9')](),controller['getChatInteractions']);router['get']('/:id/openchannel/interactions',auth['isAuthenticated'](),controller[_0x2bcd('0x1e')]);router['get'](_0x2bcd('0x1f'),auth[_0x2bcd('0x9')](),controller['getMailInteractions']);router[_0x2bcd('0x8')](_0x2bcd('0x20'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x21')]);router[_0x2bcd('0x8')](_0x2bcd('0x22'),auth[_0x2bcd('0x9')](),controller['getFaxInteractions']);router[_0x2bcd('0x8')](_0x2bcd('0x23'),auth['isAuthenticated'](),controller[_0x2bcd('0x24')]);router[_0x2bcd('0x8')]('/:id/teams',auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x25')]);router[_0x2bcd('0x8')](_0x2bcd('0x26'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x27')]);router['get'](_0x2bcd('0x28'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x29')]);router[_0x2bcd('0x8')](_0x2bcd('0x2a'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x2b')]);router[_0x2bcd('0x8')](_0x2bcd('0x2c'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x2d')]);router[_0x2bcd('0x8')](_0x2bcd('0x2e'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x2f')]);router[_0x2bcd('0x8')](_0x2bcd('0x30'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x31')]);router[_0x2bcd('0x8')](_0x2bcd('0x32'),auth[_0x2bcd('0x9')](),controller['getSmsAccounts']);router[_0x2bcd('0x8')](_0x2bcd('0x33'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x34')]);router[_0x2bcd('0x8')]('/:id/whatsapp_accounts',auth[_0x2bcd('0x9')](),controller['getWhatsappAccounts']);router[_0x2bcd('0x8')](_0x2bcd('0x35'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x36')]);router[_0x2bcd('0x8')](_0x2bcd('0x37'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x38')]);router[_0x2bcd('0x39')](_0x2bcd('0x14'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x3a')]);router[_0x2bcd('0x39')]('/',auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x3b')]);router[_0x2bcd('0x39')](_0x2bcd('0x3c'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x3d')]);router[_0x2bcd('0x39')](_0x2bcd('0x3e'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x3f')]);var upload=multer({'storage':multer[_0x2bcd('0x40')]({'destination':function(_0x59dd3e,_0x530217,_0x5810c3){_0x5810c3(null,path[_0x2bcd('0x41')](config['root'],_0x2bcd('0x42')));},'filename':function(_0x30d605,_0x54f04b,_0x4a45e1){_0x4a45e1(null,util[_0x2bcd('0x43')](_0x2bcd('0x44'),Date[_0x2bcd('0x45')](),_0x54f04b[_0x2bcd('0x46')]));}})});router[_0x2bcd('0x39')](_0x2bcd('0x10'),upload[_0x2bcd('0x47')]('file'),controller[_0x2bcd('0x48')]);router[_0x2bcd('0x39')](_0x2bcd('0x49'),auth['isAuthenticated'](),controller[_0x2bcd('0x4a')]);router[_0x2bcd('0x39')]('/:id/logout',auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x4b')]);router[_0x2bcd('0x39')](_0x2bcd('0x4c'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x4d')]);router[_0x2bcd('0x39')](_0x2bcd('0x4e'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x4f')]);router[_0x2bcd('0x39')]('/:id/teams',auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x50')]);router[_0x2bcd('0x39')]('/:id/chat_interactions',auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x51')]);router['post']('/:id/mail_interactions',auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x52')]);router[_0x2bcd('0x39')](_0x2bcd('0x53'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x54')]);router[_0x2bcd('0x39')](_0x2bcd('0x55'),auth[_0x2bcd('0x9')](),controller['addSmsInteractions']);router[_0x2bcd('0x39')](_0x2bcd('0x56'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x57')]);router['post']('/:id/whatsapp_interactions',auth[_0x2bcd('0x9')](),controller['addWhatsappInteractions']);router[_0x2bcd('0x39')](_0x2bcd('0x2c'),auth[_0x2bcd('0x9')](),controller['addFaxAccounts']);router[_0x2bcd('0x39')](_0x2bcd('0x2e'),auth['isAuthenticated'](),controller['addMailAccounts']);router[_0x2bcd('0x39')]('/:id/openchannel_accounts',auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x58')]);router[_0x2bcd('0x39')]('/:id/sms_accounts',auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x59')]);router[_0x2bcd('0x39')](_0x2bcd('0x33'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x5a')]);router['post'](_0x2bcd('0x5b'),auth['isAuthenticated'](),controller[_0x2bcd('0x5c')]);router[_0x2bcd('0x39')](_0x2bcd('0x37'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x5d')]);router['put'](_0x2bcd('0xf'),auth['isAuthenticated'](),controller[_0x2bcd('0x5e')]);router[_0x2bcd('0x5f')](_0x2bcd('0x60'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x61')]);router['delete'](_0x2bcd('0x3e'),auth['isAuthenticated'](),controller[_0x2bcd('0x62')]);router[_0x2bcd('0x63')](_0x2bcd('0x64'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x65')]);router[_0x2bcd('0x63')](_0x2bcd('0xf'),auth[_0x2bcd('0x9')](),controller['destroy']);router[_0x2bcd('0x63')](_0x2bcd('0x66'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x67')]);router[_0x2bcd('0x63')]('/:id/mail_interactions',auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x68')]);router[_0x2bcd('0x63')]('/:id/fax_interactions',auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x69')]);router[_0x2bcd('0x63')](_0x2bcd('0x55'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x6a')]);router[_0x2bcd('0x63')](_0x2bcd('0x56'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x6b')]);router[_0x2bcd('0x63')](_0x2bcd('0x6c'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x6d')]);router[_0x2bcd('0x63')](_0x2bcd('0x2c'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x6e')]);router[_0x2bcd('0x63')](_0x2bcd('0x2e'),auth['isAuthenticated'](),controller[_0x2bcd('0x6f')]);router[_0x2bcd('0x63')](_0x2bcd('0x30'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x70')]);router[_0x2bcd('0x63')](_0x2bcd('0x32'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x71')]);router[_0x2bcd('0x63')](_0x2bcd('0x33'),auth['isAuthenticated'](),controller['removeChatWebsites']);router[_0x2bcd('0x63')](_0x2bcd('0x5b'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x72')]);router[_0x2bcd('0x63')](_0x2bcd('0x37'),auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x73')]);router[_0x2bcd('0x39')]('/:id/messengerSoundNotification',auth[_0x2bcd('0x9')](),controller[_0x2bcd('0x74')]);module[_0x2bcd('0x75')]=router;
\ No newline at end of file
index 0c2dddf..c3013ed 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc8ef=['/etc/pki/tls/private/motion.key','permissions','VIRTUAL','phoneBarEnableScreenRecordingByAgent','string','true','false','screenrecording','blockedAt','loginAttempts','UNSIGNED','moment','util','lodash','exports','STRING','setDataValue','name','defaultuser','The\x20name\x20of\x20the\x20user','fullname','callerid','format','internal','email','toLowerCase','ENUM','user','agent','telephone','local','accountcode','getDataValue','BOOLEAN','DEFAULT\x20PAUSE','INTEGER','dynamic','peer','ALLOWED_PASSED_SCREEN','ALLOWED_FAILED_SCREEN','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','inband','auto','yes','nonat','force_rport,comedia','nat','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]','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]','never','\x22\x22\x20<>','always','accept','refuse','uas','fingerprint','certificate','active','passive','actpass','update','update,nonat','DATE','TEXT','showWebBar','get','isArray','wss','encryption','avpf','force_avp','dtlsenable','dtlsverify','dtlssetup','dtlscertfile','dtlsprivatekey','rtcp_mux','icesupport','/etc/pki/tls/certs/motion.crt'];(function(_0x4f2152,_0x1bf26a){var _0x9a69a5=function(_0x2c57ba){while(--_0x2c57ba){_0x4f2152['push'](_0x4f2152['shift']());}};_0x9a69a5(++_0x1bf26a);}(_0xc8ef,0x128));var _0xfc8e=function(_0x2b4411,_0x2625ed){_0x2b4411=_0x2b4411-0x0;var _0x8e41ef=_0xc8ef[_0x2b4411];return _0x8e41ef;};'use strict';var Sequelize=require('sequelize');var moment=require(_0xfc8e('0x0'));var util=require(_0xfc8e('0x1'));var _=require(_0xfc8e('0x2'));module[_0xfc8e('0x3')]={'name':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':![],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i},'set':function(_0x487f69){this[_0xfc8e('0x5')](_0xfc8e('0x6'),_0x487f69);this[_0xfc8e('0x5')](_0xfc8e('0x7'),_0x487f69);},'comment':_0xfc8e('0x8')},'fullname':{'type':Sequelize['STRING'],'allowNull':![],'set':function(_0x1a3a2b){this[_0xfc8e('0x5')](_0xfc8e('0x9'),_0x1a3a2b);this[_0xfc8e('0x5')](_0xfc8e('0xa'),util[_0xfc8e('0xb')]('\x22%s\x22\x20<%s>',_0x1a3a2b,this['getDataValue'](_0xfc8e('0xc'))));}},'alias':{'type':Sequelize[_0xfc8e('0x4')]},'email':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':![],'unique':'email','validate':{'isEmail':!![]},'set':function(_0x3f155c){if(_0x3f155c){this[_0xfc8e('0x5')](_0xfc8e('0xd'),_0x3f155c[_0xfc8e('0xe')]());}}},'role':{'type':Sequelize[_0xfc8e('0xf')]('admin',_0xfc8e('0x10'),_0xfc8e('0x11'),_0xfc8e('0x12')),'allowNull':![]},'password':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':![],'validate':{'notEmpty':!![]}},'provider':{'type':Sequelize[_0xfc8e('0x4')],'defaultValue':_0xfc8e('0x13')},'internal':{'type':Sequelize['INTEGER'](0xb),'allowNull':![],'unique':_0xfc8e('0xc'),'set':function(_0x452e7d){this[_0xfc8e('0x5')](_0xfc8e('0xc'),_0x452e7d);this[_0xfc8e('0x5')](_0xfc8e('0x14'),_0x452e7d);this['setDataValue'](_0xfc8e('0xa'),util[_0xfc8e('0xb')]('\x22%s\x22\x20<%s>',this[_0xfc8e('0x15')](_0xfc8e('0x9')),_0x452e7d));}},'salt':{'type':Sequelize[_0xfc8e('0x4')]},'phone':{'type':Sequelize['STRING']},'mobile':{'type':Sequelize[_0xfc8e('0x4')]},'address':{'type':Sequelize[_0xfc8e('0x4')]},'zipcode':{'type':Sequelize[_0xfc8e('0x4')]},'userpic':{'type':Sequelize[_0xfc8e('0x4')]},'city':{'type':Sequelize[_0xfc8e('0x4')]},'country':{'type':Sequelize[_0xfc8e('0x4')]},'online':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'lastLoginAt':{'type':Sequelize['DATE']},'voicePause':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'chatPause':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'mailPause':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'faxPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'smsPause':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'whatsappPause':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'openchannelPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'pauseType':{'type':Sequelize[_0xfc8e('0x4')],'defaultValue':_0xfc8e('0x17')},'lastPauseAt':{'type':Sequelize['DATE']},'chatCapacity':{'type':Sequelize[_0xfc8e('0x18')],'defaultValue':0x0},'mailCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'faxCapacity':{'type':Sequelize[_0xfc8e('0x18')],'defaultValue':0x0},'smsCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'whatsappCapacity':{'type':Sequelize[_0xfc8e('0x18')],'defaultValue':0x0},'openchannelCapacity':{'type':Sequelize[_0xfc8e('0x18')],'defaultValue':0x0},'phoneBarAutoAnswer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarEnableSettings':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':!![]},'phoneBarListenPort':{'type':Sequelize[_0xfc8e('0x18')](0x5),'defaultValue':0x1428},'phoneBarExpires':{'type':Sequelize[_0xfc8e('0x18')](0x5),'defaultValue':0x78},'phoneBarRemoteControl':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarRemoteControlPort':{'type':Sequelize['INTEGER'],'defaultValue':0x26a0},'phoneBarEnableRecording':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'phoneBarRingInUse':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'chanspy':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'description':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'host':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![],'defaultValue':_0xfc8e('0x19')},'ipaddr':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'port':{'type':Sequelize[_0xfc8e('0x18')](0x5),'allowNull':!![]},'regseconds':{'type':Sequelize[_0xfc8e('0x18')](0xb),'allowNull':!![]},'fullcontact':{'type':Sequelize['STRING'],'allowNull':!![]},'regserver':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'useragent':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'lastms':{'type':Sequelize[_0xfc8e('0x18')](0xb),'allowNull':!![]},'type':{'type':Sequelize['ENUM']('friend','user',_0xfc8e('0x1a')),'allowNull':!![],'defaultValue':'friend'},'context':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':'from-sip'},'callingpres':{'type':Sequelize[_0xfc8e('0xf')]('ALLOWED_NOT_SCREENED',_0xfc8e('0x1b'),_0xfc8e('0x1c'),_0xfc8e('0x1d'),_0xfc8e('0x1e'),_0xfc8e('0x1f'),_0xfc8e('0x20'),_0xfc8e('0x21')),'allowNull':!![]},'deny':{'type':Sequelize['STRING'],'allowNull':!![]},'permit':{'type':Sequelize['STRING'],'allowNull':!![]},'secret':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'md5secret':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'remotesecret':{'type':Sequelize['STRING'],'allowNull':!![]},'transport':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![],'defaultValue':_0xfc8e('0x22'),'set':function(_0x4078d9){this['setDataValue'](_0xfc8e('0x23'),_0x4078d9?_0x4078d9[_0xfc8e('0x24')](','):null);},'get':function(){return this[_0xfc8e('0x15')](_0xfc8e('0x23'))?this[_0xfc8e('0x15')]('transport')[_0xfc8e('0x25')](','):null;},'comment':_0xfc8e('0x26')},'dtmfmode':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x27'),_0xfc8e('0x28'),'shortinfo',_0xfc8e('0x29'),_0xfc8e('0x2a')),'allowNull':!![],'defaultValue':_0xfc8e('0x27')},'directmedia':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x2b'),'no',_0xfc8e('0x2c'),'update','outgoing'),'allowNull':!![],'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x2b'),'no'),'allowNull':!![],'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'directmediadeny':{'type':Sequelize['STRING'],'allowNull':!![]},'nat':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![],'defaultValue':_0xfc8e('0x2d'),'set':function(_0x1a1979){this[_0xfc8e('0x5')]('nat',_0x1a1979?_0x1a1979[_0xfc8e('0x24')](','):null);},'get':function(){return this[_0xfc8e('0x15')](_0xfc8e('0x2e'))?this[_0xfc8e('0x15')](_0xfc8e('0x2e'))[_0xfc8e('0x25')](','):null;},'comment':_0xfc8e('0x2f')},'callgroup':{'type':Sequelize[_0xfc8e('0x4')]},'namedcallgroup':{'type':Sequelize[_0xfc8e('0x4')]},'pickupgroup':{'type':Sequelize[_0xfc8e('0x4')]},'namedpickupgroup':{'type':Sequelize[_0xfc8e('0x4')]},'language':{'type':Sequelize['STRING'],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0xfc8e('0x4')]},'disallow':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xfc8e('0x30')},'allow':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':![],'defaultValue':_0xfc8e('0x31'),'set':function(_0x18f18d){this[_0xfc8e('0x5')](_0xfc8e('0x32'),_0x18f18d?_0x18f18d['join'](';'):_0xfc8e('0x31'));},'get':function(){return this['getDataValue']('allow')?this[_0xfc8e('0x15')](_0xfc8e('0x32'))[_0xfc8e('0x25')](';'):null;},'comment':_0xfc8e('0x33')},'autoframing':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x2b'),'no'),'allowNull':!![]},'insecure':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![],'set':function(_0x1bef2e){this['setDataValue'](_0xfc8e('0x34'),_0x1bef2e?_0x1bef2e[_0xfc8e('0x24')](','):null);},'get':function(){return this[_0xfc8e('0x15')](_0xfc8e('0x34'))?this[_0xfc8e('0x15')](_0xfc8e('0x34'))[_0xfc8e('0x25')](','):null;},'comment':_0xfc8e('0x35')},'trustrpid':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x2b'),'no'),'allowNull':!![],'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x2b'),'no'),'allowNull':!![],'defaultValue':'no'},'progressinband':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x2b'),'no',_0xfc8e('0x36')),'allowNull':!![]},'promiscredir':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x2b'),'no'),'allowNull':!![]},'useclientcode':{'type':Sequelize['ENUM']('yes','no'),'allowNull':!![]},'accountcode':{'type':Sequelize[_0xfc8e('0x18')](0xb),'allowNull':!![]},'setvar':{'type':Sequelize['STRING'],'allowNull':!![]},'callerid':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![],'defaultValue':_0xfc8e('0x37')},'amaflags':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'callcounter':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x2b'),'no'),'allowNull':!![],'defaultValue':_0xfc8e('0x2b')},'busylevel':{'type':Sequelize[_0xfc8e('0x18')](0xb),'allowNull':!![]},'allowoverlap':{'type':Sequelize['ENUM'](_0xfc8e('0x2b'),'no'),'allowNull':!![]},'allowsubscribe':{'type':Sequelize[_0xfc8e('0xf')]('yes','no'),'allowNull':!![]},'allowtransfer':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x2b'),'no'),'allowNull':!![]},'ignoresdpversion':{'type':Sequelize['ENUM'](_0xfc8e('0x2b'),'no'),'allowNull':!![]},'subscribecontext':{'type':Sequelize['STRING'],'allowNull':!![]},'template':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'videosupport':{'type':Sequelize['ENUM'](_0xfc8e('0x2b'),'no',_0xfc8e('0x38')),'allowNull':!![],'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize[_0xfc8e('0x18')](0xb),'allowNull':!![]},'rfc2833compensate':{'type':Sequelize['ENUM'](_0xfc8e('0x2b'),'no'),'allowNull':!![]},'mailbox':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'session_timers':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x39'),_0xfc8e('0x3a'),'originate'),'allowNull':!![]},'session_expires':{'type':Sequelize[_0xfc8e('0x18')](0xb),'allowNull':!![]},'session_minse':{'type':Sequelize[_0xfc8e('0x18')](0xb),'allowNull':!![]},'session_refresher':{'type':Sequelize[_0xfc8e('0xf')]('uac',_0xfc8e('0x3b')),'allowNull':!![],'defaultValue':_0xfc8e('0x3b')},'t38pt_usertpsource':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'regexten':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'fromdomain':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'fromuser':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'qualify':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x2b'),'no'),'allowNull':!![],'defaultValue':_0xfc8e('0x2b')},'keepalive':{'type':Sequelize[_0xfc8e('0x18')](0xb),'allowNull':!![]},'defaultip':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'defaultuser':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'rtptimeout':{'type':Sequelize[_0xfc8e('0x18')](0xb),'allowNull':!![]},'rtpholdtimeout':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'rtpkeepalive':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'sendrpid':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x2b'),'no'),'allowNull':!![],'defaultValue':'no'},'outboundproxy':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'callbackextension':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'timert1':{'type':Sequelize[_0xfc8e('0x18')](0xb),'allowNull':!![]},'timerb':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'qualifyfreq':{'type':Sequelize[_0xfc8e('0x18')](0xb),'allowNull':!![]},'contactpermit':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'contactdeny':{'type':Sequelize['STRING'],'allowNull':!![]},'contactacl':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'unsolicited_mailbox':{'type':Sequelize['STRING'],'allowNull':!![]},'use_q850_reason':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'maxforwards':{'type':Sequelize[_0xfc8e('0x18')](0xb),'allowNull':!![]},'encryption':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x2b'),'no'),'allowNull':!![],'defaultValue':'no'},'avpf':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x2b'),'no'),'allowNull':!![]},'force_avp':{'type':Sequelize['ENUM']('yes','no'),'allowNull':!![]},'icesupport':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x2b'),'no'),'allowNull':!![]},'dtlsenable':{'type':Sequelize['ENUM']('yes','no'),'allowNull':!![]},'dtlsverify':{'type':Sequelize[_0xfc8e('0xf')]('yes','no',_0xfc8e('0x3c'),_0xfc8e('0x3d')),'allowNull':!![]},'dtlsrekey':{'type':Sequelize[_0xfc8e('0x18')](0xb),'allowNull':!![]},'dtlscertfile':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'dtlsprivatekey':{'type':Sequelize['STRING'],'allowNull':!![]},'dtlscipher':{'type':Sequelize['STRING'],'allowNull':!![]},'dtlscafile':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'dtlscapath':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'dtlssetup':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x3e'),_0xfc8e('0x3f'),_0xfc8e('0x40')),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'usereqphone':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x2b'),'no'),'allowNull':!![],'defaultValue':'no'},'recordonfeature':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'recordofffeature':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'call_limit':{'type':Sequelize[_0xfc8e('0x18')](0xb),'allowNull':!![],'defaultValue':0xa},'registertrying':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x2b'),'no'),'allowNull':!![]},'subscribemwi':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x2b'),'no'),'allowNull':!![]},'vmexten':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'mohinterpret':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'mohsuggest':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'parkinglot':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'canreinvite':{'type':Sequelize[_0xfc8e('0xf')]('yes','no',_0xfc8e('0x2c'),_0xfc8e('0x41'),_0xfc8e('0x42')),'allowNull':!![],'defaultValue':'no'},'loginInPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'resetPasswordToken':{'type':Sequelize[_0xfc8e('0x4')]},'resetPasswordExpires':{'type':Sequelize[_0xfc8e('0x43')]},'passwordResetAt':{'type':Sequelize[_0xfc8e('0x43')],'defaultValue':null},'previousPasswords':{'type':Sequelize[_0xfc8e('0x44')]},'showWebBar':{'type':Sequelize[_0xfc8e('0x18')],'defaultValue':0x0,'set':function(_0x8e7421){this[_0xfc8e('0x5')](_0xfc8e('0x45'),_0x8e7421);var _0x4d8a9d=this[_0xfc8e('0x46')]({'plain':!![]});switch(_0x8e7421){case 0x0:case 0x1:var _0xb9ea0a=_0x4d8a9d[_0xfc8e('0x23')]?_[_0xfc8e('0x47')](_0x4d8a9d['transport'])?_0x4d8a9d[_0xfc8e('0x23')][_0xfc8e('0x24')]():_0x4d8a9d[_0xfc8e('0x23')]:_0xfc8e('0x22');if(_0xb9ea0a===_0xfc8e('0x48')){_0xb9ea0a=_0xfc8e('0x22');}this[_0xfc8e('0x5')](_0xfc8e('0x23'),_0xb9ea0a);this['setDataValue'](_0xfc8e('0x49'),'no');this[_0xfc8e('0x5')](_0xfc8e('0x4a'),null);this[_0xfc8e('0x5')](_0xfc8e('0x4b'),null);this[_0xfc8e('0x5')]('icesupport',null);this['setDataValue'](_0xfc8e('0x4c'),null);this[_0xfc8e('0x5')](_0xfc8e('0x4d'),null);this[_0xfc8e('0x5')](_0xfc8e('0x4e'),null);this[_0xfc8e('0x5')](_0xfc8e('0x4f'),null);this[_0xfc8e('0x5')](_0xfc8e('0x50'),null);this['setDataValue'](_0xfc8e('0x51'),'no');break;case 0x2:this[_0xfc8e('0x5')]('transport',_0xfc8e('0x48'));this['setDataValue'](_0xfc8e('0x49'),_0xfc8e('0x2b'));this[_0xfc8e('0x5')]('avpf',_0xfc8e('0x2b'));this[_0xfc8e('0x5')](_0xfc8e('0x4b'),_0xfc8e('0x2b'));this[_0xfc8e('0x5')](_0xfc8e('0x52'),_0xfc8e('0x2b'));this[_0xfc8e('0x5')](_0xfc8e('0x4c'),_0xfc8e('0x2b'));this[_0xfc8e('0x5')](_0xfc8e('0x4d'),'no');this[_0xfc8e('0x5')](_0xfc8e('0x4e'),_0xfc8e('0x40'));this[_0xfc8e('0x5')](_0xfc8e('0x4f'),_0x4d8a9d[_0xfc8e('0x4f')]||_0xfc8e('0x53'));this['setDataValue'](_0xfc8e('0x50'),_0x4d8a9d[_0xfc8e('0x50')]||_0xfc8e('0x54'));this[_0xfc8e('0x5')](_0xfc8e('0x51'),_0xfc8e('0x2b'));break;default:}}},'permissions':{'type':Sequelize[_0xfc8e('0x44')],'set':function(_0x554107){this[_0xfc8e('0x5')](_0xfc8e('0x55'),_0x554107?_0x554107[_0xfc8e('0x24')](','):[]);},'get':function(){return this[_0xfc8e('0x15')]('permissions')?_['map'](this[_0xfc8e('0x15')](_0xfc8e('0x55'))[_0xfc8e('0x25')](','),function(_0xdac1fa){return parseInt(_0xdac1fa,0xa);}):[];}},'phoneBarUnconditionalNumber':{'type':Sequelize[_0xfc8e('0x4')]},'phoneBarNoReplyNumber':{'type':Sequelize[_0xfc8e('0x4')]},'phoneBarBusyNumber':{'type':Sequelize[_0xfc8e('0x4')]},'phoneBarUnconditional':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarNoReply':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'phoneBarBusy':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'phoneBarDnd':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':!![]},'phoneBarUnansweredCallBadge':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':!![]},'phoneBarEnableDtmfTone':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'phoneBarAutoAnswerDelay':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'extensionMonitor':{'type':Sequelize[_0xfc8e('0x4')],'defaultValue':''},'crudPermissions':{'type':Sequelize[_0xfc8e('0x18')],'defaultValue':0x0},'rtcp_mux':{'type':Sequelize[_0xfc8e('0xf')](_0xfc8e('0x2b'),'no'),'defaultValue':'no'},'allowmessenger':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':!![]},'phoneBarOutboundProxy':{'type':Sequelize[_0xfc8e('0x4')]},'phoneBarEnableJaws':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'phoneBarEnableScreenRecordingByAgent':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'phoneBarEnableVideoRecording':{'type':Sequelize[_0xfc8e('0x56')],'get':function(){return this[_0xfc8e('0x15')](_0xfc8e('0x57'))?this['getDataValue']('phoneBarEnableScreenRecordingByAgent'):![];}},'phoneBarEnableAutomaticScreenRecording':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'phoneBarPrefixRequired':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'hotdesk':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'interface':{'type':Sequelize[_0xfc8e('0x4')],'defaultValue':null},'privacyEnabled':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'apiKeyNonce':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'apiKeyIat':{'type':Sequelize[_0xfc8e('0x4')],'allowNull':!![]},'screenrecording':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![],'set':function(_0x5c276f){if(typeof _0x5c276f===_0xfc8e('0x58')){var _0x118589=_0x5c276f==='1'?!![]:_0x5c276f==='0'?![]:_0x5c276f===_0xfc8e('0x59')?!![]:_0x5c276f===_0xfc8e('0x5a')?![]:![];this[_0xfc8e('0x5')](_0xfc8e('0x5b'),_0x118589);}else{this[_0xfc8e('0x5')]('screenrecording',_0x5c276f);}}},'blocked':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![],'set':function(_0x21d2ce){this[_0xfc8e('0x5')]('blocked',_0x21d2ce);if(_0x21d2ce===!![]){this[_0xfc8e('0x5')](_0xfc8e('0x5c'),moment());this['setDataValue'](_0xfc8e('0x5d'),0x0);}else{this['setDataValue'](_0xfc8e('0x5c'),null);}}},'blockedAt':{'type':Sequelize[_0xfc8e('0x43')],'defaultValue':null},'loginAttempts':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'disabled':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'settingsEnabled':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':!![]},'wssPort':{'type':Sequelize[_0xfc8e('0x18')](0x5)[_0xfc8e('0x5e')],'defaultValue':0x1f99},'downloadAttachments':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'downloadOmnichannelInteractions':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':!![]},'downloadVoiceRecordings':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':!![]},'ignorePauseForPreviewCalls':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'selectRecallMeCampaign':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'adSsoEnabled':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'chatAutoanswer':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'chatAutoanswerDelay':{'type':Sequelize[_0xfc8e('0x18')],'defaultValue':0x0},'emailAutoanswer':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'emailAutoanswerDelay':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'smsAutoanswer':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'smsAutoanswerDelay':{'type':Sequelize[_0xfc8e('0x18')],'defaultValue':0x0},'openchannelAutoanswer':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'openchannelAutoanswerDelay':{'type':Sequelize[_0xfc8e('0x18')],'defaultValue':0x0},'faxAutoanswer':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'faxAutoanswerDelay':{'type':Sequelize[_0xfc8e('0x18')],'defaultValue':0x0},'whatsappAutoanswer':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]},'whatsappAutoanswerDelay':{'type':Sequelize[_0xfc8e('0x18')],'defaultValue':0x0},'messengerSoundNotification':{'type':Sequelize[_0xfc8e('0x16')],'defaultValue':![]}};
\ No newline at end of file
+var _0x35ba=['ALLOWED_NOT_SCREENED','ALLOWED_PASSED_SCREEN','ALLOWED_FAILED_SCREEN','ALLOWED','PROHIB_NOT_SCREENED','PROHIB_PASSED_SCREEN','PROHIB_FAILED_SCREEN','PROHIB','udp','transport','split','rfc2833','shortinfo','inband','auto','yes','nonat','update','outgoing','force_rport,comedia','nat','join','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]','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','uac','uas','fingerprint','certificate','active','passive','showWebBar','get','wss','encryption','avpf','force_avp','dtlsenable','dtlsverify','dtlssetup','dtlscertfile','dtlsprivatekey','rtcp_mux','icesupport','actpass','/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key','TEXT','permissions','VIRTUAL','phoneBarEnableScreenRecordingByAgent','string','true','screenrecording','blocked','blockedAt','sequelize','moment','util','lodash','exports','STRING','name','setDataValue','defaultuser','The\x20name\x20of\x20the\x20user','fullname','callerid','\x22%s\x22\x20<%s>','getDataValue','email','toLowerCase','ENUM','admin','user','telephone','local','INTEGER','internal','accountcode','format','BOOLEAN','DATE','DEFAULT\x20PAUSE','dynamic','friend','peer'];(function(_0x1ba14f,_0x370fc2){var _0x23ca83=function(_0x41ee8b){while(--_0x41ee8b){_0x1ba14f['push'](_0x1ba14f['shift']());}};_0x23ca83(++_0x370fc2);}(_0x35ba,0x9b));var _0xa35b=function(_0xbe6d5d,_0x308a41){_0xbe6d5d=_0xbe6d5d-0x0;var _0x2cb584=_0x35ba[_0xbe6d5d];return _0x2cb584;};'use strict';var Sequelize=require(_0xa35b('0x0'));var moment=require(_0xa35b('0x1'));var util=require(_0xa35b('0x2'));var _=require(_0xa35b('0x3'));module[_0xa35b('0x4')]={'name':{'type':Sequelize[_0xa35b('0x5')],'allowNull':![],'unique':_0xa35b('0x6'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i},'set':function(_0x93c319){this['setDataValue']('name',_0x93c319);this[_0xa35b('0x7')](_0xa35b('0x8'),_0x93c319);},'comment':_0xa35b('0x9')},'fullname':{'type':Sequelize['STRING'],'allowNull':![],'set':function(_0x1693c1){this[_0xa35b('0x7')](_0xa35b('0xa'),_0x1693c1);this[_0xa35b('0x7')](_0xa35b('0xb'),util['format'](_0xa35b('0xc'),_0x1693c1,this[_0xa35b('0xd')]('internal')));}},'alias':{'type':Sequelize['STRING']},'email':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0xa35b('0xe'),'validate':{'isEmail':!![]},'set':function(_0x16aa5c){if(_0x16aa5c){this['setDataValue'](_0xa35b('0xe'),_0x16aa5c[_0xa35b('0xf')]());}}},'role':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x11'),_0xa35b('0x12'),'agent',_0xa35b('0x13')),'allowNull':![]},'password':{'type':Sequelize[_0xa35b('0x5')],'allowNull':![],'validate':{'notEmpty':!![]}},'provider':{'type':Sequelize[_0xa35b('0x5')],'defaultValue':_0xa35b('0x14')},'internal':{'type':Sequelize[_0xa35b('0x15')](0xb),'allowNull':![],'unique':_0xa35b('0x16'),'set':function(_0x43a4cb){this[_0xa35b('0x7')]('internal',_0x43a4cb);this[_0xa35b('0x7')](_0xa35b('0x17'),_0x43a4cb);this[_0xa35b('0x7')](_0xa35b('0xb'),util[_0xa35b('0x18')]('\x22%s\x22\x20<%s>',this[_0xa35b('0xd')](_0xa35b('0xa')),_0x43a4cb));}},'salt':{'type':Sequelize[_0xa35b('0x5')]},'phone':{'type':Sequelize[_0xa35b('0x5')]},'mobile':{'type':Sequelize['STRING']},'address':{'type':Sequelize[_0xa35b('0x5')]},'zipcode':{'type':Sequelize[_0xa35b('0x5')]},'userpic':{'type':Sequelize[_0xa35b('0x5')]},'city':{'type':Sequelize[_0xa35b('0x5')]},'country':{'type':Sequelize['STRING']},'online':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'lastLoginAt':{'type':Sequelize[_0xa35b('0x1a')]},'voicePause':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'chatPause':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'mailPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'faxPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'smsPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'whatsappPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'openchannelPause':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'pauseType':{'type':Sequelize[_0xa35b('0x5')],'defaultValue':_0xa35b('0x1b')},'lastPauseAt':{'type':Sequelize['DATE']},'chatCapacity':{'type':Sequelize[_0xa35b('0x15')],'defaultValue':0x0},'mailCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'faxCapacity':{'type':Sequelize[_0xa35b('0x15')],'defaultValue':0x0},'smsCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'whatsappCapacity':{'type':Sequelize[_0xa35b('0x15')],'defaultValue':0x0},'openchannelCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'phoneBarAutoAnswer':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'phoneBarEnableSettings':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':!![]},'phoneBarListenPort':{'type':Sequelize[_0xa35b('0x15')](0x5),'defaultValue':0x1428},'phoneBarExpires':{'type':Sequelize[_0xa35b('0x15')](0x5),'defaultValue':0x78},'phoneBarRemoteControl':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'phoneBarRemoteControlPort':{'type':Sequelize[_0xa35b('0x15')],'defaultValue':0x26a0},'phoneBarEnableRecording':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarRingInUse':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'chanspy':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'description':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'host':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![],'defaultValue':_0xa35b('0x1c')},'ipaddr':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'port':{'type':Sequelize['INTEGER'](0x5),'allowNull':!![]},'regseconds':{'type':Sequelize[_0xa35b('0x15')](0xb),'allowNull':!![]},'fullcontact':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'regserver':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'useragent':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'lastms':{'type':Sequelize[_0xa35b('0x15')](0xb),'allowNull':!![]},'type':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x1d'),_0xa35b('0x12'),_0xa35b('0x1e')),'allowNull':!![],'defaultValue':_0xa35b('0x1d')},'context':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![],'defaultValue':'from-sip'},'callingpres':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x1f'),_0xa35b('0x20'),_0xa35b('0x21'),_0xa35b('0x22'),_0xa35b('0x23'),_0xa35b('0x24'),_0xa35b('0x25'),_0xa35b('0x26')),'allowNull':!![]},'deny':{'type':Sequelize['STRING'],'allowNull':!![]},'permit':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'secret':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'md5secret':{'type':Sequelize['STRING'],'allowNull':!![]},'remotesecret':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'transport':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![],'defaultValue':_0xa35b('0x27'),'set':function(_0x779ace){this[_0xa35b('0x7')](_0xa35b('0x28'),_0x779ace?_0x779ace['join'](','):null);},'get':function(){return this[_0xa35b('0xd')]('transport')?this[_0xa35b('0xd')](_0xa35b('0x28'))[_0xa35b('0x29')](','):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]'},'dtmfmode':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x2a'),'info',_0xa35b('0x2b'),_0xa35b('0x2c'),_0xa35b('0x2d')),'allowNull':!![],'defaultValue':_0xa35b('0x2a')},'directmedia':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x2e'),'no',_0xa35b('0x2f'),_0xa35b('0x30'),_0xa35b('0x31')),'allowNull':!![],'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0xa35b('0x10')]('yes','no'),'allowNull':!![],'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'directmediadeny':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'nat':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![],'defaultValue':_0xa35b('0x32'),'set':function(_0x3236b8){this[_0xa35b('0x7')](_0xa35b('0x33'),_0x3236b8?_0x3236b8[_0xa35b('0x34')](','):null);},'get':function(){return this[_0xa35b('0xd')](_0xa35b('0x33'))?this[_0xa35b('0xd')](_0xa35b('0x33'))[_0xa35b('0x29')](','):null;},'comment':_0xa35b('0x35')},'callgroup':{'type':Sequelize[_0xa35b('0x5')]},'namedcallgroup':{'type':Sequelize[_0xa35b('0x5')]},'pickupgroup':{'type':Sequelize['STRING']},'namedpickupgroup':{'type':Sequelize[_0xa35b('0x5')]},'language':{'type':Sequelize[_0xa35b('0x5')],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0xa35b('0x5')]},'disallow':{'type':Sequelize[_0xa35b('0x5')],'allowNull':![],'defaultValue':_0xa35b('0x36')},'allow':{'type':Sequelize[_0xa35b('0x5')],'allowNull':![],'defaultValue':_0xa35b('0x37'),'set':function(_0x10e981){this['setDataValue'](_0xa35b('0x38'),_0x10e981?_0x10e981['join'](';'):_0xa35b('0x37'));},'get':function(){return this['getDataValue'](_0xa35b('0x38'))?this['getDataValue'](_0xa35b('0x38'))[_0xa35b('0x29')](';'):null;},'comment':_0xa35b('0x39')},'autoframing':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x2e'),'no'),'allowNull':!![]},'insecure':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![],'set':function(_0x85570a){this['setDataValue'](_0xa35b('0x3a'),_0x85570a?_0x85570a[_0xa35b('0x34')](','):null);},'get':function(){return this[_0xa35b('0xd')](_0xa35b('0x3a'))?this['getDataValue'](_0xa35b('0x3a'))['split'](','):null;},'comment':_0xa35b('0x3b')},'trustrpid':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x2e'),'no'),'allowNull':!![],'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize['ENUM'](_0xa35b('0x2e'),'no'),'allowNull':!![],'defaultValue':'no'},'progressinband':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x2e'),'no','never'),'allowNull':!![]},'promiscredir':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x2e'),'no'),'allowNull':!![]},'useclientcode':{'type':Sequelize[_0xa35b('0x10')]('yes','no'),'allowNull':!![]},'accountcode':{'type':Sequelize[_0xa35b('0x15')](0xb),'allowNull':!![]},'setvar':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'callerid':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![],'defaultValue':_0xa35b('0x3c')},'amaflags':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'callcounter':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x2e'),'no'),'allowNull':!![],'defaultValue':_0xa35b('0x2e')},'busylevel':{'type':Sequelize[_0xa35b('0x15')](0xb),'allowNull':!![]},'allowoverlap':{'type':Sequelize['ENUM'](_0xa35b('0x2e'),'no'),'allowNull':!![]},'allowsubscribe':{'type':Sequelize['ENUM'](_0xa35b('0x2e'),'no'),'allowNull':!![]},'allowtransfer':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x2e'),'no'),'allowNull':!![]},'ignoresdpversion':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x2e'),'no'),'allowNull':!![]},'subscribecontext':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'template':{'type':Sequelize['STRING'],'allowNull':!![]},'videosupport':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x2e'),'no',_0xa35b('0x3d')),'allowNull':!![],'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize[_0xa35b('0x15')](0xb),'allowNull':!![]},'rfc2833compensate':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x2e'),'no'),'allowNull':!![]},'mailbox':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'session_timers':{'type':Sequelize[_0xa35b('0x10')]('accept','refuse','originate'),'allowNull':!![]},'session_expires':{'type':Sequelize[_0xa35b('0x15')](0xb),'allowNull':!![]},'session_minse':{'type':Sequelize[_0xa35b('0x15')](0xb),'allowNull':!![]},'session_refresher':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x3e'),_0xa35b('0x3f')),'allowNull':!![],'defaultValue':_0xa35b('0x3f')},'t38pt_usertpsource':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'regexten':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'fromdomain':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'fromuser':{'type':Sequelize['STRING'],'allowNull':!![]},'qualify':{'type':Sequelize['ENUM'](_0xa35b('0x2e'),'no'),'allowNull':!![],'defaultValue':_0xa35b('0x2e')},'keepalive':{'type':Sequelize[_0xa35b('0x15')](0xb),'allowNull':!![]},'defaultip':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'defaultuser':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'rtptimeout':{'type':Sequelize[_0xa35b('0x15')](0xb),'allowNull':!![]},'rtpholdtimeout':{'type':Sequelize[_0xa35b('0x15')](0xb),'allowNull':!![]},'rtpkeepalive':{'type':Sequelize[_0xa35b('0x15')](0xb),'allowNull':!![]},'sendrpid':{'type':Sequelize['ENUM'](_0xa35b('0x2e'),'no'),'allowNull':!![],'defaultValue':'no'},'outboundproxy':{'type':Sequelize['STRING'],'allowNull':!![]},'callbackextension':{'type':Sequelize['STRING'],'allowNull':!![]},'timert1':{'type':Sequelize[_0xa35b('0x15')](0xb),'allowNull':!![]},'timerb':{'type':Sequelize[_0xa35b('0x15')](0xb),'allowNull':!![]},'qualifyfreq':{'type':Sequelize[_0xa35b('0x15')](0xb),'allowNull':!![]},'contactpermit':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'contactdeny':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'contactacl':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'unsolicited_mailbox':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'use_q850_reason':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'maxforwards':{'type':Sequelize[_0xa35b('0x15')](0xb),'allowNull':!![]},'encryption':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x2e'),'no'),'allowNull':!![],'defaultValue':'no'},'avpf':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x2e'),'no'),'allowNull':!![]},'force_avp':{'type':Sequelize['ENUM'](_0xa35b('0x2e'),'no'),'allowNull':!![]},'icesupport':{'type':Sequelize[_0xa35b('0x10')]('yes','no'),'allowNull':!![]},'dtlsenable':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x2e'),'no'),'allowNull':!![]},'dtlsverify':{'type':Sequelize[_0xa35b('0x10')]('yes','no',_0xa35b('0x40'),_0xa35b('0x41')),'allowNull':!![]},'dtlsrekey':{'type':Sequelize[_0xa35b('0x15')](0xb),'allowNull':!![]},'dtlscertfile':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'dtlsprivatekey':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'dtlscipher':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'dtlscafile':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'dtlscapath':{'type':Sequelize['STRING'],'allowNull':!![]},'dtlssetup':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x42'),_0xa35b('0x43'),'actpass'),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'usereqphone':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x2e'),'no'),'allowNull':!![],'defaultValue':'no'},'recordonfeature':{'type':Sequelize['STRING'],'allowNull':!![]},'recordofffeature':{'type':Sequelize['STRING'],'allowNull':!![]},'call_limit':{'type':Sequelize[_0xa35b('0x15')](0xb),'allowNull':!![],'defaultValue':0xa},'registertrying':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x2e'),'no'),'allowNull':!![]},'subscribemwi':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x2e'),'no'),'allowNull':!![]},'vmexten':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'mohinterpret':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'mohsuggest':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'parkinglot':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'canreinvite':{'type':Sequelize['ENUM']('yes','no','nonat',_0xa35b('0x30'),'update,nonat'),'allowNull':!![],'defaultValue':'no'},'loginInPause':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'resetPasswordToken':{'type':Sequelize[_0xa35b('0x5')]},'resetPasswordExpires':{'type':Sequelize[_0xa35b('0x1a')]},'passwordResetAt':{'type':Sequelize[_0xa35b('0x1a')],'defaultValue':null},'previousPasswords':{'type':Sequelize['TEXT']},'showWebBar':{'type':Sequelize[_0xa35b('0x15')],'defaultValue':0x0,'set':function(_0x1286e6){this[_0xa35b('0x7')](_0xa35b('0x44'),_0x1286e6);var _0x3be4ac=this[_0xa35b('0x45')]({'plain':!![]});switch(_0x1286e6){case 0x0:case 0x1:var _0x2733c1=_0x3be4ac[_0xa35b('0x28')]?_['isArray'](_0x3be4ac[_0xa35b('0x28')])?_0x3be4ac[_0xa35b('0x28')][_0xa35b('0x34')]():_0x3be4ac[_0xa35b('0x28')]:'udp';if(_0x2733c1===_0xa35b('0x46')){_0x2733c1=_0xa35b('0x27');}this[_0xa35b('0x7')](_0xa35b('0x28'),_0x2733c1);this['setDataValue'](_0xa35b('0x47'),'no');this[_0xa35b('0x7')](_0xa35b('0x48'),null);this[_0xa35b('0x7')](_0xa35b('0x49'),null);this[_0xa35b('0x7')]('icesupport',null);this[_0xa35b('0x7')](_0xa35b('0x4a'),null);this['setDataValue'](_0xa35b('0x4b'),null);this[_0xa35b('0x7')](_0xa35b('0x4c'),null);this[_0xa35b('0x7')](_0xa35b('0x4d'),null);this['setDataValue'](_0xa35b('0x4e'),null);this[_0xa35b('0x7')](_0xa35b('0x4f'),'no');break;case 0x2:this[_0xa35b('0x7')](_0xa35b('0x28'),'wss');this[_0xa35b('0x7')]('encryption',_0xa35b('0x2e'));this[_0xa35b('0x7')](_0xa35b('0x48'),_0xa35b('0x2e'));this[_0xa35b('0x7')]('force_avp',_0xa35b('0x2e'));this[_0xa35b('0x7')](_0xa35b('0x50'),_0xa35b('0x2e'));this[_0xa35b('0x7')](_0xa35b('0x4a'),_0xa35b('0x2e'));this[_0xa35b('0x7')](_0xa35b('0x4b'),'no');this[_0xa35b('0x7')](_0xa35b('0x4c'),_0xa35b('0x51'));this[_0xa35b('0x7')]('dtlscertfile',_0x3be4ac[_0xa35b('0x4d')]||_0xa35b('0x52'));this[_0xa35b('0x7')]('dtlsprivatekey',_0x3be4ac[_0xa35b('0x4e')]||_0xa35b('0x53'));this[_0xa35b('0x7')]('rtcp_mux',_0xa35b('0x2e'));break;default:}}},'permissions':{'type':Sequelize[_0xa35b('0x54')],'set':function(_0x3a052f){this[_0xa35b('0x7')](_0xa35b('0x55'),_0x3a052f?_0x3a052f[_0xa35b('0x34')](','):[]);},'get':function(){return this[_0xa35b('0xd')](_0xa35b('0x55'))?_['map'](this[_0xa35b('0xd')]('permissions')[_0xa35b('0x29')](','),function(_0x4f8499){return parseInt(_0x4f8499,0xa);}):[];}},'phoneBarUnconditionalNumber':{'type':Sequelize[_0xa35b('0x5')]},'phoneBarNoReplyNumber':{'type':Sequelize[_0xa35b('0x5')]},'phoneBarBusyNumber':{'type':Sequelize[_0xa35b('0x5')]},'phoneBarUnconditional':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'phoneBarNoReply':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'phoneBarBusy':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'phoneBarDnd':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':!![]},'phoneBarUnansweredCallBadge':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':!![]},'phoneBarEnableDtmfTone':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'phoneBarAutoAnswerDelay':{'type':Sequelize[_0xa35b('0x15')],'defaultValue':0x0},'extensionMonitor':{'type':Sequelize[_0xa35b('0x5')],'defaultValue':''},'crudPermissions':{'type':Sequelize[_0xa35b('0x15')],'defaultValue':0x0},'rtcp_mux':{'type':Sequelize[_0xa35b('0x10')](_0xa35b('0x2e'),'no'),'defaultValue':'no'},'allowmessenger':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'phoneBarOutboundProxy':{'type':Sequelize['STRING']},'phoneBarEnableJaws':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'phoneBarEnableScreenRecordingByAgent':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'phoneBarEnableVideoRecording':{'type':Sequelize[_0xa35b('0x56')],'get':function(){return this[_0xa35b('0xd')]('phoneBarEnableScreenRecordingByAgent')?this[_0xa35b('0xd')](_0xa35b('0x57')):![];}},'phoneBarEnableAutomaticScreenRecording':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'phoneBarPrefixRequired':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'hotdesk':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'interface':{'type':Sequelize[_0xa35b('0x5')],'defaultValue':null},'privacyEnabled':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'apiKeyNonce':{'type':Sequelize[_0xa35b('0x5')],'allowNull':!![]},'apiKeyIat':{'type':Sequelize['STRING'],'allowNull':!![]},'screenrecording':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![],'set':function(_0x274de4){if(typeof _0x274de4===_0xa35b('0x58')){var _0x2299a4=_0x274de4==='1'?!![]:_0x274de4==='0'?![]:_0x274de4===_0xa35b('0x59')?!![]:_0x274de4==='false'?![]:![];this[_0xa35b('0x7')](_0xa35b('0x5a'),_0x2299a4);}else{this[_0xa35b('0x7')](_0xa35b('0x5a'),_0x274de4);}}},'blocked':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![],'set':function(_0x5accfe){this[_0xa35b('0x7')](_0xa35b('0x5b'),_0x5accfe);if(_0x5accfe===!![]){this[_0xa35b('0x7')](_0xa35b('0x5c'),moment());this[_0xa35b('0x7')]('loginAttempts',0x0);}else{this[_0xa35b('0x7')](_0xa35b('0x5c'),null);}}},'blockedAt':{'type':Sequelize['DATE'],'defaultValue':null},'loginAttempts':{'type':Sequelize[_0xa35b('0x15')],'defaultValue':0x0},'disabled':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'settingsEnabled':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'wssPort':{'type':Sequelize[_0xa35b('0x15')](0x5)['UNSIGNED'],'defaultValue':0x1f99},'downloadAttachments':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':!![]},'downloadOmnichannelInteractions':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':!![]},'downloadVoiceRecordings':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':!![]},'ignorePauseForPreviewCalls':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'selectRecallMeCampaign':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'adSsoEnabled':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'chatAutoanswer':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'chatAutoanswerDelay':{'type':Sequelize[_0xa35b('0x15')],'defaultValue':0x0},'emailAutoanswer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'emailAutoanswerDelay':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'smsAutoanswer':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'smsAutoanswerDelay':{'type':Sequelize[_0xa35b('0x15')],'defaultValue':0x0},'openchannelAutoanswer':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'openchannelAutoanswerDelay':{'type':Sequelize[_0xa35b('0x15')],'defaultValue':0x0},'faxAutoanswer':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'faxAutoanswerDelay':{'type':Sequelize[_0xa35b('0x15')],'defaultValue':0x0},'whatsappAutoanswer':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]},'whatsappAutoanswerDelay':{'type':Sequelize[_0xa35b('0x15')],'defaultValue':0x0},'messengerSoundNotification':{'type':Sequelize[_0xa35b('0x19')],'defaultValue':![]}};
\ No newline at end of file
index 90eaf50..a309370 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xde3d=['lastName','CmContact','Contact','token','No\x20API\x20access\x20key\x20found!','json','You\x20don\x27t\x20have\x20sufficient\x20privileges\x20to\x20access\x20this\x20resource.','generateApiKey','iat','removeApiKey','apiKeyNonce','apiKeyIat','API\x20key\x20not\x20available','whoami','Unable\x20to\x20retrieve\x20the\x20current\x20user','getUserSetting','unknown','teams','queues','getAgents','flatten','lower','col','asc','desc','uniqBy','offline','voiceStatus','unavailable','busy','charAt','select','field','InteractionId','_interactions','ui.UserId\x20=\x20?','toString','messengerSoundNotification','moment','util','path','lodash','squel','jayson/promise','../../components/auth/service','../../components/contacts','../../components/parsers/qs','../../components/realtime/agents','../../config/logger','api','../../config/environment','../../config/license/util','../../errors/api','APINotFoundError','APIForbiddenrror','handleError','../../mysqldb','socket.io-emitter','redis','./user.socket','localhost','client','http','sendStatus','status','offset','limit','undefined','count','Content-Range','request','then','info','User,\x20%s,\x20%s','request\x20sent','User,\x20%s,\x20%s,\x20%s','stringify','error','message','result','update','role','agent','emit','userNotification:recalc:','get','Users','user','Agents','Telephones','ignore','map','value','includes','name','UserProfileResource','destroy','end','stack','send','rawAttributes','type','key','filter','password','salt','previousPasswords','resetPasswordToken','resetPasswordExpires','getOptions','User','includeAll','include','query','userSetting','true','UserSetting','attributes','push','findAll','openTabs','chat','rows','fax','dataValues','mail','openchannel','whatsapp','catch','show','params','options','all','body','find','describe','addContacts','ids','omit','internal','Setting','findById','isNil','min_internal','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)','sequelize','QueryTypes','SELECT','length','from','voicemail','mailbox','VoiceMail','email','permissions','101','102','103','113','104','105','108','109','100','111','114','115','Unauthorized','admin','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','userProfileId','create','UserProfileSection','autoAssociation','bulkCreate','some','Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20an\x20administrator','telephone','changePassword','oldPassword','newPassword','Sequelize','ValidationError','Wrong\x20credentials','New\x20password\x20must\x20be\x20different\x20from\x20old\x20password','Invalid\x20body\x20format.\x20Use\x20newPassword','findOne','enforcePasswordHistory','passwordHistoryLimit','securePassword','validatePasswordHistory','updatePasswordsHistory','addQueues','channel','online','loginInPause','interface','isValidChannel','Unknown\x20channel','add','capitalize','toLowerCase','penalty','spread','QueueId','VoiceQueue','voice','format','SIP/%s','UserVoiceQueueRt','remove','Queues','isArray','Queue:remove','userpic','file','getAvatar','join','root','server/files/images/logos/default_profile.png','download','existsSync','server/files/images/','getOpenTabs','ChatOpenTabs','createdAt','FAX','OpenchannelOpenTabs','OPENCHANNEL','MailOpenTabs','MAIL','SmsOpenTabs','WHATSAPP','concat','getContacts','hasOwnProperty','Tag','Tags','tag','getQueues','model','keys','Queue','filters','fields','order','sort','where','pick','merge','nolimit','intersection','getVoiceQueuesRt','getGroups','VoiceRecording','UserId','ScreenRecording','getChatInteractions','ChatInteraction','getOpenchannelInteractions','OpenchannelInteraction','getMailInteractions','MailInteraction','SmsInteraction','getFaxInteractions','WhatsappInteraction','getWhatsappInteractions','mobile','LOCAL/%s@from-sip/n','user:%s','user:forcelogout','x-forwarded-for','remoteAddress','socket','connection','User\x20not\x20found\x20or\x20not\x20allowed\x20to\x20perform\x20login\x20method','getVoiceQueues','UserVoiceQueue.penalty','MemberReport','forEach','YYYY-MM-DD\x20HH:mm:ss','getChannels','LOGIN','device','PAUSE','LOGININPAUSE','resolve','logout','pause','DEFAULT\x20PAUSE','unpause','Channel\x20parameter\x20%s\x20is\x20invalid','voicePause','mailPause','chatPause','faxPause','openchannelPause','smsPause','whatsappPause','pauseType','lastPauseAt','User\x20with\x20id\x20%s\x20not\x20found','getTeams','Team','addTeams','Body\x20parameter\x20\x27ids\x27\x20is\x20required','transaction','getAssociatedQueues','addAgent','getDataValue','Voice','upsert','TeamVoicePrefix','VoicePrefixId','Queue:save','removeTeams','Query\x20parameter\x20\x27ids\x27\x20is\x20required','flattenDeep','getLists','CmList','values','You\x20can\x27t\x20delete\x20yourself','CmHopper','addChatInteractions','user_has_chat_interactions:save','removeChatInteractions','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','user_has_whatsapp_interactions:save','removeWhatsappInteractions','getVoicePrefixes','VoicePrefix','getFaxAccounts','addFaxAccounts','removeFaxAccounts','getMailAccounts','MailAccount','addMailAccounts','removeMailAccounts','getOpenchannelAccounts','addOpenchannelAccounts','removeOpenchannelAccounts','getSmsAccounts','SmsAccount','addSmsAccounts','removeSmsAccounts','getChatWebsites','ChatWebsite','addChatWebsites','removeChatWebsites','getWhatsappAccounts','addWhatsappAccounts','removeWhatsappAccounts','getScheduledCalls','$and','$gt','$lt','$lte','$ne','$eq','$between','$notBetween','$notIn','$like','$notLike','$iLike','$notILike','$contains','$any'];(function(_0x72895a,_0x433607){var _0x5226d5=function(_0x5b7d21){while(--_0x5b7d21){_0x72895a['push'](_0x72895a['shift']());}};_0x5226d5(++_0x433607);}(_0xde3d,0x1a8));var _0xdde3=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xde3d[_0xa464c9];return _0x3d73c4;};'use strict';var moment=require(_0xdde3('0x0'));var util=require(_0xdde3('0x1'));var path=require(_0xdde3('0x2'));var fs=require('fs');var _=require(_0xdde3('0x3'));var squel=require(_0xdde3('0x4'));var Redis=require('ioredis');var jayson=require(_0xdde3('0x5'));var authService=require(_0xdde3('0x6'));var contacts=require(_0xdde3('0x7'));var qs=require(_0xdde3('0x8'));var rta=require(_0xdde3('0x9'));var logger=require(_0xdde3('0xa'))(_0xdde3('0xb'));var utils=require('../../config/utils');var config=require(_0xdde3('0xc'));var licenseUtil=require(_0xdde3('0xd'));var APIBadRequestError=require(_0xdde3('0xe'))['APIBadRequestError'];var APINotFoundError=require(_0xdde3('0xe'))[_0xdde3('0xf')];var APIForbiddenError=require(_0xdde3('0xe'))[_0xdde3('0x10')];var APIHandleError=require('../../errors/api')[_0xdde3('0x11')];var db=require(_0xdde3('0x12'))['db'];var socket=require(_0xdde3('0x13'))(new Redis(config[_0xdde3('0x14')]));require(_0xdde3('0x15'))['register'](socket);config['redis']=_['defaults'](config[_0xdde3('0x14')],{'host':_0xdde3('0x16'),'port':0x18eb});var amiClient=jayson[_0xdde3('0x17')][_0xdde3('0x18')]({'port':0x232a});var values;function respondWithStatusCode(_0x4adbb1,_0x8634c6){_0x8634c6=_0x8634c6||0xcc;return function(_0x1c67aa){if(_0x1c67aa){return _0x4adbb1[_0xdde3('0x19')](_0x8634c6);}return _0x4adbb1[_0xdde3('0x1a')](_0x8634c6)['end']();};}function respondWithResult(_0x9464,_0x1656a9){_0x1656a9=_0x1656a9||0xc8;return function(_0x29cba5){if(_0x29cba5){return _0x9464[_0xdde3('0x1a')](_0x1656a9)['json'](_0x29cba5);}};}function respondWithFilteredResult(_0x28009a,_0x7657ff){return function(_0x26b3be){if(_0x26b3be){var _0x29cb2d=typeof _0x7657ff[_0xdde3('0x1b')]==='undefined'&&typeof _0x7657ff[_0xdde3('0x1c')]===_0xdde3('0x1d');var _0x19ab87=_0x26b3be['count'];var _0x2ae1e5=_0x29cb2d?0x0:_0x7657ff[_0xdde3('0x1b')];var _0x5f59a8=_0x29cb2d?_0x26b3be[_0xdde3('0x1e')]:_0x7657ff[_0xdde3('0x1b')]+_0x7657ff['limit'];var _0x3ff559;if(_0x5f59a8>=_0x19ab87){_0x5f59a8=_0x19ab87;_0x3ff559=0xc8;}else{_0x3ff559=0xce;}_0x28009a[_0xdde3('0x1a')](_0x3ff559);return _0x28009a['set'](_0xdde3('0x1f'),_0x2ae1e5+'-'+_0x5f59a8+'/'+_0x19ab87)['json'](_0x26b3be);}return null;};}function respondWithRpcPromise(_0xe0d169,_0xebbccf,_0xa24ccf,_0x2e2547){return new Promise(function(_0x390baf,_0x303814){var _0x1644f2=_0x2e2547||amiClient;return _0x1644f2[_0xdde3('0x20')](_0xe0d169,_0xa24ccf)[_0xdde3('0x21')](function(_0x2f2b19){logger[_0xdde3('0x22')](_0xdde3('0x23'),_0xebbccf,_0xdde3('0x24'));logger['debug'](_0xdde3('0x25'),_0xebbccf,_0xdde3('0x24'),JSON[_0xdde3('0x26')](_0x2f2b19));if(_0x2f2b19[_0xdde3('0x27')]){if(_0x2f2b19[_0xdde3('0x27')]['code']===0x1f4){logger['error'](_0xdde3('0x23'),_0xebbccf,_0x2f2b19[_0xdde3('0x27')][_0xdde3('0x28')]);return _0x303814(_0x2f2b19['error']['message']);}logger['error'](_0xdde3('0x23'),_0xebbccf,_0x2f2b19['error']['message']);return _0x390baf(_0x2f2b19[_0xdde3('0x27')][_0xdde3('0x28')]);}else{logger['info']('User,\x20%s,\x20%s',_0xebbccf,_0xdde3('0x24'));_0x390baf(_0x2f2b19[_0xdde3('0x29')][_0xdde3('0x28')]);}})['catch'](function(_0x1b164c){logger[_0xdde3('0x27')](_0xdde3('0x23'),_0xebbccf,_0x1b164c);_0x303814(_0x1b164c);});});}function saveUpdates(_0x4d7518){return function(_0x4fa952){if(_0x4fa952){return _0x4fa952[_0xdde3('0x2a')](_0x4d7518)['then'](function(_0x4a0a21){if(_0x4a0a21[_0xdde3('0x2b')]===_0xdde3('0x2c')){socket[_0xdde3('0x2d')](_0xdde3('0x2e')+_0x4a0a21['id'],_0x4a0a21);}return _0x4a0a21;});}return null;};}function removeEntity(_0x2b85d1,_0x26278d){return function(_0x5af305){if(_0x5af305){return _0x5af305['destroy']({'transaction':_0x26278d})['then'](function(){var _0x64aeeb=_0x5af305[_0xdde3('0x2f')]({'plain':!![]});if(_0x64aeeb[_0xdde3('0x2b')]==='admin')return;var _0x2c87cd=[{'name':_0xdde3('0x30'),'value':_0xdde3('0x31'),'ignore':!![]},{'name':_0xdde3('0x32'),'value':_0xdde3('0x2c'),'ignore':![]},{'name':_0xdde3('0x33'),'value':'telephone','ignore':![]}];var _0x7be356=_(_0x2c87cd)['filter'](_0xdde3('0x34'))[_0xdde3('0x35')](_0xdde3('0x36'))[_0xdde3('0x36')]();if(_[_0xdde3('0x37')](_0x7be356,_0x64aeeb['role'])){return;}var _0x441682=_['find'](_0x2c87cd,[_0xdde3('0x36'),_0x64aeeb[_0xdde3('0x2b')]])[_0xdde3('0x38')];return db[_0xdde3('0x39')][_0xdde3('0x3a')]({'where':{'type':_0x441682,'resourceId':_0x64aeeb['id']},'transaction':_0x26278d})['then'](function(){return _0x5af305;});})[_0xdde3('0x21')](function(){_0x2b85d1[_0xdde3('0x1a')](0xcc)[_0xdde3('0x3b')]();});}};}function handleEntityNotFound(_0x47c2f1){return function(_0x4254a6){if(!_0x4254a6){_0x47c2f1['sendStatus'](0x194);}return _0x4254a6;};}function handleError(_0x3b73f4,_0x3a0899){_0x3a0899=_0x3a0899||0x1f4;return function(_0x56acd8){logger[_0xdde3('0x27')](_0x56acd8[_0xdde3('0x3c')]);if(_0x56acd8['name']){delete _0x56acd8['name'];}_0x3b73f4[_0xdde3('0x1a')](_0x3a0899)[_0xdde3('0x3d')](_0x56acd8);};}function getUserAttributes(){return _(db['User'][_0xdde3('0x3e')])[_0xdde3('0x35')](function(_0x241d3d){return{'name':_0x241d3d['fieldName'],'type':_0x241d3d[_0xdde3('0x3f')][_0xdde3('0x40')]};})[_0xdde3('0x41')](function(_0x1afb7c){return![_0xdde3('0x42'),_0xdde3('0x43'),_0xdde3('0x44'),_0xdde3('0x45'),_0xdde3('0x46'),'md5secret'][_0xdde3('0x37')](_0x1afb7c['name']);})[_0xdde3('0x36')]();}exports['index']=function(_0x19b966,_0x240821){var _0x14cfe0={},_0x527363={'count':0x0,'rows':[]};var _0x120149=getUserAttributes();_0x14cfe0=qs[_0xdde3('0x47')](_0x120149,_0x19b966);var _0x3037cc={'where':_0x14cfe0['where']};return db[_0xdde3('0x48')]['count'](_0x3037cc)[_0xdde3('0x21')](function(_0x307204){_0x527363[_0xdde3('0x1e')]=_0x307204;if(_0x19b966['query'][_0xdde3('0x49')]){_0x14cfe0[_0xdde3('0x4a')]=[{'all':!![]}];}if(_0x19b966[_0xdde3('0x4b')][_0xdde3('0x4c')]===_0xdde3('0x4d')){_0x14cfe0['include']=[{'model':db[_0xdde3('0x4e')],'as':_0xdde3('0x4c')}];}if(!_[_0xdde3('0x37')](_0x14cfe0['attributes'],'id')){_0x14cfe0[_0xdde3('0x4f')][_0xdde3('0x50')]('id');}return db[_0xdde3('0x48')][_0xdde3('0x51')](_0x14cfe0);})[_0xdde3('0x21')](function(_0x32bef0){_0x527363['rows']=_0x32bef0;if(_0x19b966[_0xdde3('0x4b')][_0xdde3('0x52')]==='true'){var _0x41c6f2=[];for(var _0x3b29c6=0x0;_0x3b29c6<_0x527363['rows']['length'];_0x3b29c6++){_0x41c6f2['push'](get_open_tabs(_0xdde3('0x53'),_0x527363[_0xdde3('0x54')][_0x3b29c6]['dataValues']));_0x41c6f2[_0xdde3('0x50')](get_open_tabs('sms',_0x527363[_0xdde3('0x54')][_0x3b29c6]['dataValues']));_0x41c6f2[_0xdde3('0x50')](get_open_tabs(_0xdde3('0x55'),_0x527363['rows'][_0x3b29c6][_0xdde3('0x56')]));_0x41c6f2[_0xdde3('0x50')](get_open_tabs(_0xdde3('0x57'),_0x527363['rows'][_0x3b29c6][_0xdde3('0x56')]));_0x41c6f2[_0xdde3('0x50')](get_open_tabs(_0xdde3('0x58'),_0x527363[_0xdde3('0x54')][_0x3b29c6]['dataValues']));_0x41c6f2[_0xdde3('0x50')](get_open_tabs(_0xdde3('0x59'),_0x527363[_0xdde3('0x54')][_0x3b29c6][_0xdde3('0x56')]));}return Promise['all'](_0x41c6f2)[_0xdde3('0x21')](function(){return _0x527363;});}else{return _0x527363;}})[_0xdde3('0x21')](respondWithFilteredResult(_0x240821,_0x14cfe0))[_0xdde3('0x5a')](handleError(_0x240821,null));};exports[_0xdde3('0x5b')]=function(_0x28f5e3,_0x318c4b){var _0x1a4d3b=getUserAttributes();_0x28f5e3['query']['id']=_0x28f5e3[_0xdde3('0x5c')]['id'];var _0x5b3df0=qs[_0xdde3('0x47')](_0x1a4d3b,_0x28f5e3);if(_0x28f5e3[_0xdde3('0x4b')][_0xdde3('0x49')]){_0x5b3df0[_0xdde3('0x4a')]=[{'all':!![]}];}if(_0x28f5e3[_0xdde3('0x4b')][_0xdde3('0x4c')]===_0xdde3('0x4d')){_0x5b3df0[_0xdde3('0x4a')]=[{'model':db[_0xdde3('0x4e')],'as':_0xdde3('0x4c')}];}_0x5b3df0=_['merge']({},_0x5b3df0,_0x28f5e3[_0xdde3('0x5d')]);if(!_['includes'](_0x5b3df0[_0xdde3('0x4f')],'id')){_0x5b3df0['attributes'][_0xdde3('0x50')]('id');}return db[_0xdde3('0x48')]['find'](_0x5b3df0)[_0xdde3('0x21')](handleEntityNotFound(_0x318c4b,null))[_0xdde3('0x21')](function(_0x5bd3f1){var _0xceafd6=[];values=_0x5bd3f1;if(_0x28f5e3[_0xdde3('0x4b')]['openTabs']===_0xdde3('0x4d')){_0xceafd6['push'](get_open_tabs('chat',_0x5bd3f1['dataValues']));_0xceafd6[_0xdde3('0x50')](get_open_tabs('sms',_0x5bd3f1[_0xdde3('0x56')]));_0xceafd6[_0xdde3('0x50')](get_open_tabs(_0xdde3('0x58'),_0x5bd3f1['dataValues']));_0xceafd6['push'](get_open_tabs(_0xdde3('0x59'),_0x5bd3f1['dataValues']));_0xceafd6[_0xdde3('0x50')](get_open_tabs(_0xdde3('0x55'),_0x5bd3f1[_0xdde3('0x56')]));_0xceafd6[_0xdde3('0x50')](get_open_tabs(_0xdde3('0x57'),_0x5bd3f1[_0xdde3('0x56')]));return Promise[_0xdde3('0x5e')](_0xceafd6);}else{return values;}})[_0xdde3('0x21')](function(){return values;})['then'](respondWithResult(_0x318c4b,null))[_0xdde3('0x5a')](handleError(_0x318c4b,null));};exports[_0xdde3('0x2a')]=function(_0x21e8a8,_0xff0c68){if(_0x21e8a8[_0xdde3('0x5f')]['id']){delete _0x21e8a8[_0xdde3('0x5f')]['id'];}delete _0x21e8a8[_0xdde3('0x5f')][_0xdde3('0x2b')];return db['User'][_0xdde3('0x60')]({'where':{'id':_0x21e8a8[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0xff0c68,null))['then'](saveUpdates(_0x21e8a8[_0xdde3('0x5f')],null))['then'](respondWithResult(_0xff0c68,null))['catch'](handleError(_0xff0c68,null));};exports[_0xdde3('0x61')]=function(_0x3a36a3,_0x38e3d1){return db['User'][_0xdde3('0x61')]()[_0xdde3('0x21')](respondWithResult(_0x38e3d1,null))[_0xdde3('0x5a')](handleError(_0x38e3d1,null));};exports[_0xdde3('0x62')]=function(_0x505c68,_0x3561a4){return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x505c68[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x3561a4,null))[_0xdde3('0x21')](function(_0x4c2262){if(_0x4c2262){return _0x4c2262[_0xdde3('0x62')](_0x505c68[_0xdde3('0x5f')][_0xdde3('0x63')],_[_0xdde3('0x64')](_0x505c68[_0xdde3('0x5f')],[_0xdde3('0x63'),'id'])||{});}})[_0xdde3('0x21')](respondWithResult(_0x3561a4,null))['catch'](handleError(_0x3561a4,null));};function validateUser(_0x4db6ab){return new Promise(function(_0x2dbf1f,_0xfbe7ad){if(_0x4db6ab[_0xdde3('0x65')])return _0x2dbf1f(_0x4db6ab);return db[_0xdde3('0x66')][_0xdde3('0x67')](0x1)['then'](function(_0x7db854){if(_0x7db854['securePassword'])authService['validatePasswordPattern'](_0x4db6ab[_0xdde3('0x42')]);db['User']['max'](_0xdde3('0x65'))[_0xdde3('0x21')](function(_0x248073){if(_[_0xdde3('0x68')](_0x248073)){_0x4db6ab['internal']=_0x7db854[_0xdde3('0x69')]||0x1;return;}if(_[_0xdde3('0x68')](_0x7db854[_0xdde3('0x69')])||_0x7db854[_0xdde3('0x69')]===_0x248073){_0x4db6ab[_0xdde3('0x65')]=_0x248073+0x1;return;}if(_0x7db854[_0xdde3('0x69')]>_0x248073){_0x4db6ab['internal']=_0x7db854[_0xdde3('0x69')];return;}return db['sequelize'][_0xdde3('0x4b')](_0xdde3('0x6a'),{'type':db[_0xdde3('0x6b')][_0xdde3('0x6c')][_0xdde3('0x6d')]})[_0xdde3('0x21')](function(_0x4d6414){if(_0x4d6414&&_0x4d6414[_0xdde3('0x6e')]){for(var _0x27c7d8=0x0,_0x29b589=_0x4d6414[_0xdde3('0x6e')];_0x27c7d8<_0x29b589&&_['isNil'](_0x4db6ab[_0xdde3('0x65')]);_0x27c7d8++){if(_0x7db854[_0xdde3('0x69')]<=_0x4d6414[_0x27c7d8][_0xdde3('0x6f')]){_0x4db6ab['internal']=_0x4d6414[_0x27c7d8][_0xdde3('0x6f')];}else if(_0x7db854[_0xdde3('0x69')]>_0x4d6414[_0x27c7d8][_0xdde3('0x6f')]&&_0x7db854[_0xdde3('0x69')]<=_0x4d6414[_0x27c7d8]['to']){_0x4db6ab[_0xdde3('0x65')]=_0x7db854[_0xdde3('0x69')];}}}if(_[_0xdde3('0x68')](_0x4db6ab[_0xdde3('0x65')])){_0x4db6ab[_0xdde3('0x65')]=_0x248073+0x1;}return _0x2dbf1f(_0x4db6ab);});});})[_0xdde3('0x5a')](function(_0x1825e9){_0xfbe7ad(_0x1825e9);});});}function updateUser(_0x10d3ff){return new Promise(function(_0x349819,_0x28a7be){try{if(_0x10d3ff[_0xdde3('0x70')]){_0x10d3ff[_0xdde3('0x71')]=_0x10d3ff[_0xdde3('0x65')];_0x10d3ff[_0xdde3('0x72')]={'mailbox':_0x10d3ff[_0xdde3('0x65')],'password':_0x10d3ff[_0xdde3('0x42')],'fullname':_0x10d3ff['fullname'],'email':_0x10d3ff[_0xdde3('0x73')]};}if(_0x10d3ff[_0xdde3('0x2b')]==='agent'){if(!_0x10d3ff[_0xdde3('0x74')])_0x10d3ff['permissions']=[_0xdde3('0x75'),_0xdde3('0x76'),_0xdde3('0x77'),_0xdde3('0x78'),'110',_0xdde3('0x79'),_0xdde3('0x7a'),'106','107',_0xdde3('0x7b'),_0xdde3('0x7c'),_0xdde3('0x7d'),_0xdde3('0x7e'),_0xdde3('0x7f'),_0xdde3('0x80')];}_0x349819(_0x10d3ff);}catch(_0x379235){_0x28a7be(_0x379235);}});}exports['create']=function(_0x825be5,_0x42520e){if(_0x825be5['user'][_0xdde3('0x2b')]==='agent')throw new Error(_0xdde3('0x81'));if(_0x825be5['body'][_0xdde3('0x2b')]===_0xdde3('0x31')&&_0x825be5[_0xdde3('0x31')]['role']!==_0xdde3('0x82')){throw new Error(_0xdde3('0x83'));}if(_0x825be5['body'][_0xdde3('0x2b')]===_0xdde3('0x82')&&_0x825be5['user'][_0xdde3('0x2b')]!=='admin'){throw new Error(_0xdde3('0x84'));}return licenseUtil[_0xdde3('0x85')]([_0x825be5['body']])[_0xdde3('0x21')](function(){return validateUser(_0x825be5['body']);})[_0xdde3('0x21')](function(_0x3f4375){return updateUser(_0x3f4375)[_0xdde3('0x21')](function(_0x337693){if(_0x337693[_0xdde3('0x2b')]===_0xdde3('0x82')){_0x337693['settingsEnabled']=_0x825be5[_0xdde3('0x31')][_0xdde3('0x86')];delete _0x337693[_0xdde3('0x87')];}return _0x337693;});})[_0xdde3('0x21')](function(_0x36962f){return db[_0xdde3('0x48')][_0xdde3('0x88')](_0x36962f,{'include':[{'model':db[_0xdde3('0x72')],'as':'VoiceMail'}]});})['then'](function(_0x467276){if(_0x825be5['body'][_0xdde3('0x2b')]==='user')return _0x467276;if(_0x825be5[_0xdde3('0x31')][_0xdde3('0x2b')]!=='user')return _0x467276;return db[_0xdde3('0x89')][_0xdde3('0x60')]({'where':{'name':_0x467276['role']==='agent'?'Agents':'Telephones','userProfileId':_0x825be5[_0xdde3('0x31')]['userProfileId']},'raw':!![]})['then'](function(_0x2dd3c8){if(!_0x2dd3c8||_0x2dd3c8[_0xdde3('0x8a')]!=0x0)return _0x467276;return db[_0xdde3('0x39')]['create']({'name':_0x467276[_0xdde3('0x38')],'resourceId':_0x467276['id'],'type':_0x2dd3c8['name'],'sectionId':_0x2dd3c8['id']},{})[_0xdde3('0x21')](function(){return _0x467276;});})[_0xdde3('0x5a')](function(_0x644ae){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x644ae);throw _0x644ae;});})[_0xdde3('0x21')](respondWithResult(_0x42520e,0xc9))[_0xdde3('0x5a')](handleError(_0x42520e,null));};exports[_0xdde3('0x8b')]=function(_0x4da451,_0x219356){var _0x16b72d=_0x4da451['body'];var _0x413cfa=[];if(_0x4da451['user'][_0xdde3('0x2b')]===_0xdde3('0x2c'))throw new Error('Unauthorized');if(_[_0xdde3('0x8c')](_0x16b72d,['role',_0xdde3('0x31')])&&_0x4da451[_0xdde3('0x31')]['role']!==_0xdde3('0x82')){throw new Error(_0xdde3('0x83'));}if(_[_0xdde3('0x8c')](_0x16b72d,['role',_0xdde3('0x82')])&&_0x4da451['user'][_0xdde3('0x2b')]!==_0xdde3('0x82')){throw new Error(_0xdde3('0x8d'));}return licenseUtil[_0xdde3('0x85')](_0x16b72d)['then'](function(){return validateUser(_0x16b72d[0x0]);})[_0xdde3('0x21')](function(){for(var _0x3bd38b=0x1;_0x3bd38b<_0x16b72d[_0xdde3('0x6e')];_0x3bd38b++){var _0x536da8=_0x16b72d[_0x3bd38b-0x1][_0xdde3('0x65')];if(!_0x16b72d[_0x3bd38b][_0xdde3('0x65')])_0x16b72d[_0x3bd38b][_0xdde3('0x65')]=_0x536da8+0x1;_0x413cfa['push'](validateUser(_0x16b72d[_0x3bd38b]));}return Promise[_0xdde3('0x5e')](_0x413cfa);})[_0xdde3('0x21')](function(){_0x413cfa=[];for(var _0xd8a7a0=0x0;_0xd8a7a0<_0x16b72d['length'];_0xd8a7a0++){_0x413cfa[_0xdde3('0x50')](updateUser(_0x16b72d[_0xd8a7a0]));}return Promise['all'](_0x413cfa);})[_0xdde3('0x21')](function(){_0x413cfa=_0x16b72d[_0xdde3('0x35')](function(_0x1b43b3){return db[_0xdde3('0x48')][_0xdde3('0x88')](_0x1b43b3,{'include':[{'model':db[_0xdde3('0x72')],'as':_0xdde3('0x72')}]})[_0xdde3('0x21')](function(_0x4d1e3c){_0x1b43b3['id']=_0x4d1e3c['id'];return _0x1b43b3;});});return Promise[_0xdde3('0x5e')](_0x413cfa);})['then'](function(_0x3fea84){if(_0x4da451['body'][_0xdde3('0x2b')]==='user')return _0x3fea84;if(_0x4da451[_0xdde3('0x31')][_0xdde3('0x2b')]!=='user')return _0x3fea84;var _0x1b3279=_[_0xdde3('0x8c')](_0x3fea84,function(_0x1f837c){return _0x1f837c[_0xdde3('0x2b')]===_0xdde3('0x2c')||_0x1f837c[_0xdde3('0x2b')]==='telephone';});if(!_0x1b3279)return _0x3fea84;return db[_0xdde3('0x89')][_0xdde3('0x51')]({'where':{'name':{'$or':[_0xdde3('0x32'),_0xdde3('0x33')]},'userProfileId':_0x4da451[_0xdde3('0x31')]['userProfileId']},'raw':!![]})[_0xdde3('0x21')](function(_0x88ea5c){if(_['isEmpty'](_0x88ea5c)||!_['some'](_0x88ea5c,[_0xdde3('0x8a'),0x0]))return _0x3fea84;_0x413cfa=[];var _0x254a51=_(_0x88ea5c)[_0xdde3('0x35')](function(_0x4d18e8){if(_0x4d18e8[_0xdde3('0x8a')]===0x1)return;return _0x4d18e8[_0xdde3('0x38')]==='Agents'?_0xdde3('0x2c'):_0xdde3('0x8e');})['compact']()[_0xdde3('0x36')]();for(var _0x580b52=0x0;_0x580b52<_0x3fea84['length'];_0x580b52++){if(!_['includes'](_0x254a51,_0x3fea84[_0x580b52][_0xdde3('0x2b')]))return;var _0x334a29=_0x3fea84[_0x580b52][_0xdde3('0x2b')]===_0xdde3('0x2c')?_0xdde3('0x32'):_0xdde3('0x33');_0x413cfa[_0xdde3('0x50')](db['UserProfileResource']['create']({'name':_0x3fea84[_0x580b52][_0xdde3('0x38')],'resourceId':_0x3fea84[_0x580b52]['id'],'type':_0x334a29,'sectionId':_['find'](_0x88ea5c,[_0xdde3('0x38'),_0x334a29])['id']},{}));}return Promise['all'](_0x413cfa);});})['then'](respondWithResult(_0x219356,0xc9))[_0xdde3('0x5a')](handleError(_0x219356,null));};exports[_0xdde3('0x8f')]=function(_0x2759d7,_0x597071){if(_0x2759d7[_0xdde3('0x5f')]['id']){delete _0x2759d7[_0xdde3('0x5f')]['id'];}return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x2759d7['params']['id']}})['then'](function(_0x21f55c){if(!_0x21f55c)return null;if(_0x21f55c['id']===_0x2759d7['user']['id']){if(!_0x2759d7[_0xdde3('0x5f')][_0xdde3('0x90')]||!_0x2759d7[_0xdde3('0x5f')][_0xdde3('0x91')]){throw new db[(_0xdde3('0x92'))][(_0xdde3('0x93'))]('Invalid\x20body\x20format.\x20Use\x20oldPassword\x20and\x20newPassword');}if(!_0x21f55c['authenticate'](_0x2759d7['body'][_0xdde3('0x90')])){throw new db[(_0xdde3('0x92'))][(_0xdde3('0x93'))](_0xdde3('0x94'));}if(_0x2759d7['body'][_0xdde3('0x90')]===_0x2759d7[_0xdde3('0x5f')][_0xdde3('0x91')]){throw new db[(_0xdde3('0x92'))]['ValidationError'](_0xdde3('0x95'));}}else if(_0x2759d7[_0xdde3('0x31')][_0xdde3('0x2b')]===_0xdde3('0x82')){if(!_0x2759d7[_0xdde3('0x5f')][_0xdde3('0x91')]){throw new db['Sequelize'][(_0xdde3('0x93'))](_0xdde3('0x96'));}}else if(_0x2759d7[_0xdde3('0x31')][_0xdde3('0x2b')]==='user'){if(!_0x2759d7[_0xdde3('0x5f')][_0xdde3('0x91')]){throw new db['Sequelize'][(_0xdde3('0x93'))](_0xdde3('0x96'));}if(_0x21f55c[_0xdde3('0x2b')]!=='agent'){throw new db[(_0xdde3('0x92'))][(_0xdde3('0x93'))]('Unauthorized');}}else{throw new db[(_0xdde3('0x92'))]['ValidationError'](_0xdde3('0x81'));}return _0x21f55c;})[_0xdde3('0x21')](handleEntityNotFound(_0x597071,null))[_0xdde3('0x21')](function(_0x4848f9){return db['Setting'][_0xdde3('0x97')]({'attributes':['id','securePassword',_0xdde3('0x98'),_0xdde3('0x99')]})[_0xdde3('0x21')](function(_0x573ad8){if(_0x573ad8[_0xdde3('0x9a')])authService['validatePasswordPattern'](_0x2759d7[_0xdde3('0x5f')][_0xdde3('0x91')]);if(!_0x573ad8[_0xdde3('0x98')]||!_0x4848f9[_0xdde3('0x44')])return _0x4848f9;authService[_0xdde3('0x9b')](_0x2759d7[_0xdde3('0x5f')][_0xdde3('0x91')],_0x4848f9['previousPasswords'],_0x573ad8[_0xdde3('0x99')]);return _0x4848f9;})[_0xdde3('0x21')](saveUpdates({'password':_0x2759d7[_0xdde3('0x5f')]['newPassword'],'passwordResetAt':_0x2759d7['user']['id']==_0x2759d7['params']['id']?moment():null,'previousPasswords':authService[_0xdde3('0x9c')](_0x2759d7[_0xdde3('0x5f')][_0xdde3('0x91')],_0x4848f9[_0xdde3('0x44')])},null));})[_0xdde3('0x21')](respondWithResult(_0x597071,null))[_0xdde3('0x5a')](handleError(_0x597071,null));};exports[_0xdde3('0x9d')]=function(_0x504f71,_0x582364){var _0x164f42=_0x504f71[_0xdde3('0x5f')][_0xdde3('0x9e')];return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x504f71[_0xdde3('0x5c')]['id']},'attributes':['id','name',_0xdde3('0x2b'),_0xdde3('0x9f'),_0xdde3('0xa0'),'voicePause',_0xdde3('0xa1')]})['then'](handleEntityNotFound(_0x582364,null))[_0xdde3('0x21')](function(_0x1406f9){if(_0x1406f9){if(!utils[_0xdde3('0xa2')](_0x164f42)){throw new db[(_0xdde3('0x92'))][(_0xdde3('0x93'))](_0xdde3('0xa3'));}return _0x1406f9[_0xdde3('0xa4')+_[_0xdde3('0xa5')](_0x164f42[_0xdde3('0xa6')]())+'Queues'](_0x504f71[_0xdde3('0x5f')][_0xdde3('0x63')],{'penalty':_0x504f71[_0xdde3('0x5f')][_0xdde3('0xa7')]||0x0})[_0xdde3('0xa8')](function(_0x234fe2){for(var _0x255f8e=0x0;_0x255f8e<_0x504f71['body'][_0xdde3('0x63')]['length'];_0x255f8e+=0x1){var _0x3a9c92={'UserId':Number(_0x504f71[_0xdde3('0x5c')]['id'])};_0x3a9c92[_['capitalize'](_0x164f42[_0xdde3('0xa6')]())+_0xdde3('0xa9')]=Number(_0x504f71[_0xdde3('0x5f')][_0xdde3('0x63')][_0x255f8e]);socket[_0xdde3('0x2d')](_0xdde3('0x31')+_[_0xdde3('0xa5')](_0x164f42['toLowerCase']())+'Queue:save',_0x3a9c92);}return _0x234fe2;})['then'](function(){if(_0x164f42==='voice'){return db[_0xdde3('0xaa')]['findAll']({'where':{'id':_0x504f71[_0xdde3('0x5f')][_0xdde3('0x63')]||[]},'raw':!![],'attributes':['id',_0xdde3('0x38')]});}})[_0xdde3('0x21')](function(_0x4d240b){var _0x20e713=_0x1406f9['get']({'plain':!![]});var _0x4e1b61=[];if(_0x164f42===_0xdde3('0xab')&&_0x20e713[_0xdde3('0x2b')]===_0xdde3('0x2c')&&_0x20e713[_0xdde3('0x9f')]){for(let _0x5f28d2=0x0;_0x5f28d2<_0x4d240b[_0xdde3('0x6e')];_0x5f28d2+=0x1){_0x4e1b61[_0xdde3('0x50')]({'membername':_0x20e713[_0xdde3('0x38')],'UserId':_0x20e713['id'],'queue_name':_0x4d240b[_0x5f28d2][_0xdde3('0x38')],'VoiceQueueId':_0x4d240b[_0x5f28d2]['id'],'interface':_[_0xdde3('0x68')](_0x20e713[_0xdde3('0xa1')])?util[_0xdde3('0xac')](_0xdde3('0xad'),_0x20e713[_0xdde3('0x38')]):_0x20e713['interface'],'paused':_0x20e713['voicePause']||![],'penalty':_0x504f71[_0xdde3('0x5f')]['penalty']||0x0});}return Promise['all'](_0x4e1b61[_0xdde3('0x35')](function(_0x567756){return db[_0xdde3('0xae')]['upsert'](_0x567756);}));}return _0x1406f9;});}})['then'](respondWithStatusCode(_0x582364,null))[_0xdde3('0x5a')](handleError(_0x582364,null));};exports['removeQueues']=function(_0x2057be,_0x22ccd4){var _0x92366,_0x408ed9;return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x2057be[_0xdde3('0x5c')]['id']},'attributes':['id',_0xdde3('0x38'),_0xdde3('0x2b')]})['then'](handleEntityNotFound(_0x22ccd4,null))['then'](function(_0x58e4ff){if(_0x58e4ff){_0x92366=_0x58e4ff;if(!_0x2057be[_0xdde3('0x4b')][_0xdde3('0x9e')]||!utils['isValidChannel'](_0x2057be[_0xdde3('0x4b')]['channel'])){throw new db[(_0xdde3('0x92'))]['ValidationError'](_0xdde3('0xa3'));}return _0x58e4ff[_0xdde3('0xaf')+_[_0xdde3('0xa5')](_0x2057be['query']['channel'][_0xdde3('0xa6')]())+_0xdde3('0xb0')](_0x2057be[_0xdde3('0x4b')][_0xdde3('0x63')]);}})[_0xdde3('0x21')](function(_0x55e9c9){if(_[_0xdde3('0xb1')](_0x2057be[_0xdde3('0x4b')]['ids'])){for(var _0x44dbfc=0x0;_0x44dbfc<_0x2057be[_0xdde3('0x4b')][_0xdde3('0x63')][_0xdde3('0x6e')];_0x44dbfc+=0x1){_0x408ed9={'UserId':Number(_0x2057be['params']['id'])};_0x408ed9[_[_0xdde3('0xa5')](_0x2057be['query'][_0xdde3('0x9e')][_0xdde3('0xa6')]())+_0xdde3('0xa9')]=Number(_0x2057be[_0xdde3('0x4b')][_0xdde3('0x63')][_0x44dbfc]);socket[_0xdde3('0x2d')](_0xdde3('0x31')+_[_0xdde3('0xa5')](_0x2057be[_0xdde3('0x4b')][_0xdde3('0x9e')][_0xdde3('0xa6')]())+_0xdde3('0xb2'),_0x408ed9);}}else{_0x408ed9={'UserId':Number(_0x2057be[_0xdde3('0x5c')]['id'])};_0x408ed9[_['capitalize'](_0x2057be['query'][_0xdde3('0x9e')][_0xdde3('0xa6')]())+_0xdde3('0xa9')]=Number(_0x2057be[_0xdde3('0x4b')][_0xdde3('0x63')]);socket[_0xdde3('0x2d')]('user'+_['capitalize'](_0x2057be[_0xdde3('0x4b')][_0xdde3('0x9e')][_0xdde3('0xa6')]())+_0xdde3('0xb2'),_0x408ed9);}return _0x55e9c9;})[_0xdde3('0x21')](function(){if(_0x2057be['query'][_0xdde3('0x9e')]==='voice'){return db['UserVoiceQueueRt'][_0xdde3('0x3a')]({'where':{'UserId':_0x2057be['params']['id'],'VoiceQueueId':_0x2057be['query'][_0xdde3('0x63')]},'individualHooks':!![]})[_0xdde3('0x21')](function(){return _0x92366;});}return _0x92366;})[_0xdde3('0x21')](respondWithStatusCode(_0x22ccd4,null))['catch'](handleError(_0x22ccd4,null));};exports['addAvatar']=function(_0x5b0d66,_0x343a10){_0x5b0d66[_0xdde3('0x5f')][_0xdde3('0xb3')]=_0x5b0d66[_0xdde3('0xb4')]['filename'];return db['User'][_0xdde3('0x60')]({'where':{'id':_0x5b0d66['params']['id']}})['then'](handleEntityNotFound(_0x343a10,null))['then'](saveUpdates(_0x5b0d66['body'],null))[_0xdde3('0x21')](respondWithResult(_0x343a10,null))[_0xdde3('0x5a')](handleError(_0x343a10,null));};exports[_0xdde3('0xb5')]=function(_0x3e54f2,_0x4ad7c0){var _0x4457e4=path[_0xdde3('0xb6')](config[_0xdde3('0xb7')],_0xdde3('0xb8'));return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x3e54f2[_0xdde3('0x5c')]['id']},'attributes':['id',_0xdde3('0xb3')],'raw':!![]})[_0xdde3('0x21')](handleEntityNotFound(_0x4ad7c0,null))[_0xdde3('0x21')](function(_0x41fb9e){if(_0x41fb9e){if(_['isNil'](_0x41fb9e['userpic'])){return _0x4ad7c0[_0xdde3('0xb9')](_0x4457e4);}else{if(!fs[_0xdde3('0xba')](path['join'](config[_0xdde3('0xb7')],'server/files/images/',_0x41fb9e[_0xdde3('0xb3')]))){return _0x4ad7c0[_0xdde3('0xb9')](_0x4457e4);}return _0x4ad7c0[_0xdde3('0xb9')](path[_0xdde3('0xb6')](config[_0xdde3('0xb7')],_0xdde3('0xbb'),_0x41fb9e[_0xdde3('0xb3')]));}}})['catch'](handleError(_0x4ad7c0,null));};exports[_0xdde3('0xbc')]=function(_0x43c6c5,_0x25b9ae){return db[_0xdde3('0x48')]['find']({'where':{'id':_0x43c6c5[_0xdde3('0x5c')]['id']},'attributes':['id']})[_0xdde3('0x21')](handleEntityNotFound(_0x25b9ae,null))[_0xdde3('0x21')](function(_0x3beda4){var _0x107646=[];values=_0x3beda4[_0xdde3('0x56')];_0x107646[_0xdde3('0x50')](get_open_tabs('chat',_0x3beda4['dataValues']));_0x107646[_0xdde3('0x50')](get_open_tabs('sms',_0x3beda4['dataValues']));_0x107646[_0xdde3('0x50')](get_open_tabs(_0xdde3('0x58'),_0x3beda4[_0xdde3('0x56')]));_0x107646[_0xdde3('0x50')](get_open_tabs('whatsapp',_0x3beda4[_0xdde3('0x56')]));_0x107646[_0xdde3('0x50')](get_open_tabs(_0xdde3('0x55'),_0x3beda4[_0xdde3('0x56')]));_0x107646[_0xdde3('0x50')](get_open_tabs('mail',_0x3beda4[_0xdde3('0x56')]));return Promise[_0xdde3('0x5e')](_0x107646);})[_0xdde3('0x21')](function(_0x418b38){if(_0x418b38){var _0x5ee10a=_['map'](values[_0xdde3('0xbd')],function(_0x442be3){return{'channel':'CHAT','id':_0x442be3['id'],'createdAt':_0x442be3[_0xdde3('0xbe')]};});var _0xa8ebb3=_['map'](values['FaxOpenTabs'],function(_0x294e16){return{'channel':_0xdde3('0xbf'),'id':_0x294e16['id'],'createdAt':_0x294e16['createdAt']};});var _0x543a24=_[_0xdde3('0x35')](values[_0xdde3('0xc0')],function(_0x1f9db7){return{'channel':_0xdde3('0xc1'),'id':_0x1f9db7['id'],'createdAt':_0x1f9db7[_0xdde3('0xbe')]};});var _0xe5ea3a=_['map'](values[_0xdde3('0xc2')],function(_0x14beab){return{'channel':_0xdde3('0xc3'),'id':_0x14beab['id'],'createdAt':_0x14beab[_0xdde3('0xbe')]};});var _0x30e516=_[_0xdde3('0x35')](values[_0xdde3('0xc4')],function(_0x3371ee){return{'channel':'SMS','id':_0x3371ee['id'],'createdAt':_0x3371ee[_0xdde3('0xbe')]};});var _0x304bf6=_[_0xdde3('0x35')](values['WhatsappOpenTabs'],function(_0x52366a){return{'channel':_0xdde3('0xc5'),'id':_0x52366a['id'],'createdAt':_0x52366a[_0xdde3('0xbe')]};});var _0x10f3a8=_[_0xdde3('0xc6')](_0x5ee10a,_0xa8ebb3,_0x543a24,_0xe5ea3a,_0x30e516,_0x304bf6);var _0x51c2d4={'count':_0x10f3a8[_0xdde3('0x6e')],'rows':_0x10f3a8};return _0x51c2d4;}else return null;})[_0xdde3('0x21')](respondWithResult(_0x25b9ae,null))[_0xdde3('0x5a')](handleError(_0x25b9ae,null));};exports[_0xdde3('0xc7')]=function(_0x2fdbee,_0x407236){var _0x3c3e39={};return db['User']['findOne']({'where':{'id':_0x2fdbee['params']['id']}})['then'](function(_0xa310c9){if(!_0xa310c9){throw new APINotFoundError(util[_0xdde3('0xac')]('User\x20with\x20id\x20%s\x20not\x20found',_0x2fdbee['params']['id']));}return contacts[_0xdde3('0x61')]();})[_0xdde3('0x21')](function(_0x3e6f8e){_0x2fdbee[_0xdde3('0x4b')][_0xdde3('0x48')]=_0x2fdbee[_0xdde3('0x5c')]['id'];_0x3c3e39=qs[_0xdde3('0x47')](_0x3e6f8e,_0x2fdbee);if(_0x2fdbee['query'][_0xdde3('0xc8')](_0xdde3('0x49'))){_0x3c3e39[_0xdde3('0x4a')]=[{'model':db['CmList'],'as':'List','required':![]},{'model':db[_0xdde3('0xc9')],'as':_0xdde3('0xca'),'attributes':['id',_0xdde3('0x38'),'color'],'where':_0x2fdbee[_0xdde3('0x4b')][_0xdde3('0xcb')]?{'id':_0x2fdbee['query']['tag']}:undefined,'required':_0x2fdbee[_0xdde3('0x4b')][_0xdde3('0xcb')]?!![]:![]}];}return contacts[_0xdde3('0x51')](_0x2fdbee[_0xdde3('0x4b')],_0x2fdbee['user'],_0x3c3e39,_0x3e6f8e);})[_0xdde3('0x21')](respondWithFilteredResult(_0x407236,_0x3c3e39))[_0xdde3('0x5a')](APIHandleError(_0x407236));};exports[_0xdde3('0xcc')]=function(_0x1625de,_0x16ed80){var _0x4dc93b;var _0x1365e9={};var _0x4f5e9e;return db[_0xdde3('0x48')]['findOne']({'where':{'id':_0x1625de[_0xdde3('0x5c')]['id']},'attributes':['id',_0xdde3('0x38'),_0xdde3('0x2b')]})[_0xdde3('0x21')](handleEntityNotFound(_0x16ed80,null))[_0xdde3('0x21')](function(_0x732aa6){if(!utils[_0xdde3('0xa2')](_0x1625de[_0xdde3('0x4b')][_0xdde3('0x9e')])){throw new db['Sequelize']['ValidationError'](_0xdde3('0xa3'));}_0x4dc93b=_0x732aa6;var _0x1a6f84={};_0x1a6f84[_0xdde3('0xcd')]=_[_0xdde3('0xce')](db[_[_0xdde3('0xa5')](_0x1625de[_0xdde3('0x4b')][_0xdde3('0x9e')])+_0xdde3('0xcf')][_0xdde3('0x3e')]);_0x1a6f84[_0xdde3('0x4b')]=_[_0xdde3('0xce')](_0x1625de[_0xdde3('0x4b')]);_0x1a6f84[_0xdde3('0xd0')]=_['intersection'](_0x1a6f84[_0xdde3('0xcd')],_0x1a6f84['query']);_0x1365e9[_0xdde3('0x4f')]=_['intersection'](_0x1a6f84[_0xdde3('0xcd')],qs[_0xdde3('0xd1')](_0x1625de[_0xdde3('0x4b')]['fields']));_0x1365e9[_0xdde3('0x4f')]=_0x1365e9[_0xdde3('0x4f')][_0xdde3('0x6e')]?_0x1365e9[_0xdde3('0x4f')]:_0x1a6f84[_0xdde3('0xcd')];_0x1365e9[_0xdde3('0xd2')]=qs[_0xdde3('0xd3')](_0x1625de[_0xdde3('0x4b')][_0xdde3('0xd3')]);_0x1365e9[_0xdde3('0xd4')]=qs['filters'](_[_0xdde3('0xd5')](_0x1625de[_0xdde3('0x4b')],_0x1a6f84[_0xdde3('0xd0')]));if(_0x1625de[_0xdde3('0x4b')][_0xdde3('0x41')]){_0x1365e9[_0xdde3('0xd4')]=_[_0xdde3('0xd6')](_0x1365e9[_0xdde3('0xd4')],{'$or':_[_0xdde3('0x35')](_0x1365e9[_0xdde3('0x4f')],function(_0x2f7537){var _0x182176={};_0x182176[_0x2f7537]={'$like':'%'+_0x1625de[_0xdde3('0x4b')][_0xdde3('0x41')]+'%'};return _0x182176;})});}_0x1365e9=_[_0xdde3('0xd6')]({},_0x1365e9,_0x1625de[_0xdde3('0x5d')]);switch(_0x4dc93b['role']){case _0xdde3('0x82'):return db[_[_0xdde3('0xa5')](_0x1625de[_0xdde3('0x4b')][_0xdde3('0x9e')])+_0xdde3('0xcf')][_0xdde3('0x51')](_0x1365e9);case _0xdde3('0x31'):case'agent':return _0x4dc93b[_0xdde3('0x2f')+_[_0xdde3('0xa5')](_0x1625de[_0xdde3('0x4b')][_0xdde3('0x9e')])+'Queues'](_0x1365e9);default:throw new db[(_0xdde3('0x92'))][(_0xdde3('0x93'))]('Unknown\x20role');}})[_0xdde3('0x21')](function(_0x3fa3d5){_0x4f5e9e=_0x3fa3d5[_0xdde3('0x6e')];if(!_0x1625de[_0xdde3('0x4b')][_0xdde3('0xc8')](_0xdde3('0xd7'))){_0x1365e9[_0xdde3('0x1c')]=qs[_0xdde3('0x1c')](_0x1625de[_0xdde3('0x4b')][_0xdde3('0x1c')]);_0x1365e9[_0xdde3('0x1b')]=qs[_0xdde3('0x1b')](_0x1625de['query']['offset']);}switch(_0x4dc93b['role']){case _0xdde3('0x82'):return db[_['capitalize'](_0x1625de[_0xdde3('0x4b')][_0xdde3('0x9e')])+'Queue'][_0xdde3('0x51')](_0x1365e9);case _0xdde3('0x31'):case _0xdde3('0x2c'):return _0x4dc93b['get'+_[_0xdde3('0xa5')](_0x1625de[_0xdde3('0x4b')][_0xdde3('0x9e')])+_0xdde3('0xb0')](_0x1365e9);}})[_0xdde3('0x21')](function(_0x13d0d3){return{'count':_0x4f5e9e,'rows':_0x13d0d3};})[_0xdde3('0x21')](respondWithResult(_0x16ed80,null))[_0xdde3('0x5a')](handleError(_0x16ed80,null));};exports['getVoiceQueuesRt']=function(_0xf6e9f0,_0x55e301){var _0x10e210={};var _0x2afbe0={};var _0x3c4c00;var _0x4998b2;return db[_0xdde3('0x48')]['findOne']({'where':{'id':_0xf6e9f0[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x55e301,null))['then'](function(_0x45b85f){if(_0x45b85f){_0x3c4c00=_0x45b85f;_0x2afbe0[_0xdde3('0xcd')]=_['keys'](db[_0xdde3('0xae')][_0xdde3('0x3e')]);_0x2afbe0[_0xdde3('0x4b')]=_['keys'](_0xf6e9f0[_0xdde3('0x4b')]);_0x2afbe0[_0xdde3('0xd0')]=_['intersection'](_0x2afbe0[_0xdde3('0xcd')],_0x2afbe0[_0xdde3('0x4b')]);_0x10e210[_0xdde3('0x4f')]=_[_0xdde3('0xd8')](_0x2afbe0[_0xdde3('0xcd')],qs[_0xdde3('0xd1')](_0xf6e9f0['query']['fields']));_0x10e210['attributes']=_0x10e210[_0xdde3('0x4f')][_0xdde3('0x6e')]?_0x10e210['attributes']:_0x2afbe0[_0xdde3('0xcd')];_0x10e210[_0xdde3('0xd2')]=qs[_0xdde3('0xd3')](_0xf6e9f0[_0xdde3('0x4b')][_0xdde3('0xd3')]);_0x10e210[_0xdde3('0xd4')]=qs[_0xdde3('0xd0')](_[_0xdde3('0xd5')](_0xf6e9f0['query'],_0x2afbe0[_0xdde3('0xd0')]));if(_0xf6e9f0[_0xdde3('0x4b')][_0xdde3('0x41')]){_0x10e210[_0xdde3('0xd4')]=_[_0xdde3('0xd6')](_0x10e210['where'],{'$or':_[_0xdde3('0x35')](_0x10e210[_0xdde3('0x4f')],function(_0x30b09c){var _0x4c4c70={};_0x4c4c70[_0x30b09c]={'$like':'%'+_0xf6e9f0[_0xdde3('0x4b')][_0xdde3('0x41')]+'%'};return _0x4c4c70;})});}_0x10e210=_['merge']({},_0x10e210,_0xf6e9f0[_0xdde3('0x5d')]);return _0x3c4c00[_0xdde3('0xd9')](_0x10e210);}})['then'](function(_0x550a9d){if(_0x550a9d){_0x4998b2=_0x550a9d[_0xdde3('0x6e')];if(!_0xf6e9f0[_0xdde3('0x4b')][_0xdde3('0xc8')]('nolimit')){_0x10e210[_0xdde3('0x1c')]=qs[_0xdde3('0x1c')](_0xf6e9f0['query'][_0xdde3('0x1c')]);_0x10e210[_0xdde3('0x1b')]=qs[_0xdde3('0x1b')](_0xf6e9f0['query'][_0xdde3('0x1b')]);}return _0x3c4c00[_0xdde3('0xd9')](_0x10e210);}})['then'](function(_0x4da2a0){if(_0x4da2a0){return _0x4da2a0?{'count':_0x4998b2,'rows':_0x4da2a0}:null;}})[_0xdde3('0x21')](respondWithResult(_0x55e301,null))[_0xdde3('0x5a')](handleError(_0x55e301,null));};exports[_0xdde3('0xda')]=function(_0x43d96f,_0x44fde0){var _0xaadb3={};var _0x5ccd10={};var _0x59b684;var _0x3dfef3;return db['User']['findOne']({'where':{'id':_0x43d96f[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x44fde0,null))[_0xdde3('0x21')](function(_0x2ff5c0){if(_0x2ff5c0){_0x59b684=_0x2ff5c0;_0x5ccd10[_0xdde3('0xcd')]=_[_0xdde3('0xce')](db['ChatGroup'][_0xdde3('0x3e')]);_0x5ccd10[_0xdde3('0x4b')]=_[_0xdde3('0xce')](_0x43d96f[_0xdde3('0x4b')]);_0x5ccd10[_0xdde3('0xd0')]=_[_0xdde3('0xd8')](_0x5ccd10[_0xdde3('0xcd')],_0x5ccd10[_0xdde3('0x4b')]);_0xaadb3[_0xdde3('0x4f')]=_['intersection'](_0x5ccd10[_0xdde3('0xcd')],qs[_0xdde3('0xd1')](_0x43d96f[_0xdde3('0x4b')][_0xdde3('0xd1')]));_0xaadb3[_0xdde3('0x4f')]=_0xaadb3[_0xdde3('0x4f')]['length']?_0xaadb3[_0xdde3('0x4f')]:_0x5ccd10[_0xdde3('0xcd')];_0xaadb3[_0xdde3('0xd2')]=qs[_0xdde3('0xd3')](_0x43d96f[_0xdde3('0x4b')][_0xdde3('0xd3')]);_0xaadb3[_0xdde3('0xd4')]=qs[_0xdde3('0xd0')](_[_0xdde3('0xd5')](_0x43d96f[_0xdde3('0x4b')],_0x5ccd10[_0xdde3('0xd0')]));if(_0x43d96f[_0xdde3('0x4b')]['filter']){_0xaadb3['where']=_[_0xdde3('0xd6')](_0xaadb3['where'],{'$or':_[_0xdde3('0x35')](_0xaadb3[_0xdde3('0x4f')],function(_0x236060){var _0xe3f39b={};_0xe3f39b[_0x236060]={'$like':'%'+_0x43d96f[_0xdde3('0x4b')][_0xdde3('0x41')]+'%'};return _0xe3f39b;})});}_0xaadb3=_[_0xdde3('0xd6')]({},_0xaadb3,_0x43d96f['options']);return _0x59b684[_0xdde3('0xda')](_0xaadb3);}})['then'](function(_0x3bfc82){if(_0x3bfc82){_0x3dfef3=_0x3bfc82['length'];if(!_0x43d96f[_0xdde3('0x4b')][_0xdde3('0xc8')](_0xdde3('0xd7'))){_0xaadb3[_0xdde3('0x1c')]=qs[_0xdde3('0x1c')](_0x43d96f[_0xdde3('0x4b')][_0xdde3('0x1c')]);_0xaadb3[_0xdde3('0x1b')]=qs[_0xdde3('0x1b')](_0x43d96f[_0xdde3('0x4b')][_0xdde3('0x1b')]);}return _0x59b684['getGroups'](_0xaadb3);}})[_0xdde3('0x21')](function(_0x499bfa){if(_0x499bfa){return _0x499bfa?{'count':_0x3dfef3,'rows':_0x499bfa}:null;}})[_0xdde3('0x21')](respondWithResult(_0x44fde0,null))['catch'](handleError(_0x44fde0,null));};exports['getRecordings']=function(_0x5b10a4,_0x293620){var _0x51bddb={'raw':!![],'where':{}};var _0xc51531={};var _0x33ef46={'count':0x0,'rows':[]};return db[_0xdde3('0x48')][_0xdde3('0x97')]({'where':{'id':_0x5b10a4[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x293620,null))[_0xdde3('0x21')](function(_0x5a9b18){if(_0x5a9b18){_0xc51531[_0xdde3('0xcd')]=_[_0xdde3('0xce')](db[_0xdde3('0xdb')][_0xdde3('0x3e')]);_0xc51531[_0xdde3('0x4b')]=_[_0xdde3('0xce')](_0x5b10a4[_0xdde3('0x4b')]);_0xc51531[_0xdde3('0xd0')]=_[_0xdde3('0xd8')](_0xc51531[_0xdde3('0xcd')],_0xc51531[_0xdde3('0x4b')]);_0x51bddb[_0xdde3('0x4f')]=_['intersection'](_0xc51531[_0xdde3('0xcd')],qs[_0xdde3('0xd1')](_0x5b10a4[_0xdde3('0x4b')][_0xdde3('0xd1')]));_0x51bddb[_0xdde3('0x4f')]=_0x51bddb[_0xdde3('0x4f')][_0xdde3('0x6e')]?_0x51bddb['attributes']:_0xc51531['model'];if(!_0x5b10a4[_0xdde3('0x4b')][_0xdde3('0xc8')](_0xdde3('0xd7'))){_0x51bddb[_0xdde3('0x1c')]=qs[_0xdde3('0x1c')](_0x5b10a4[_0xdde3('0x4b')]['limit']);_0x51bddb[_0xdde3('0x1b')]=qs[_0xdde3('0x1b')](_0x5b10a4['query'][_0xdde3('0x1b')]);}_0x51bddb[_0xdde3('0xd2')]=qs[_0xdde3('0xd3')](_0x5b10a4[_0xdde3('0x4b')]['sort']);_0x51bddb[_0xdde3('0xd4')]=qs[_0xdde3('0xd0')](_[_0xdde3('0xd5')](_0x5b10a4[_0xdde3('0x4b')],_0xc51531['filters']));_0x51bddb['where'][_0xdde3('0xdc')]=_0x5a9b18['id'];if(_0x5b10a4['query'][_0xdde3('0x41')]){_0x51bddb[_0xdde3('0xd4')]=_[_0xdde3('0xd6')](_0x51bddb[_0xdde3('0xd4')],{'$or':_[_0xdde3('0x35')](_0x51bddb['attributes'],function(_0x155b77){var _0x2fe843={};_0x2fe843[_0x155b77]={'$like':'%'+_0x5b10a4[_0xdde3('0x4b')][_0xdde3('0x41')]+'%'};return _0x2fe843;})});}_0x51bddb=_[_0xdde3('0xd6')]({},_0x51bddb,_0x5b10a4[_0xdde3('0x5d')]);return db[_0xdde3('0xdb')]['count']({'where':_0x51bddb[_0xdde3('0xd4')]})[_0xdde3('0x21')](function(_0x53a45f){_0x33ef46['count']=_0x53a45f;if(_0x5b10a4[_0xdde3('0x4b')]['includeAll']){_0x51bddb[_0xdde3('0x4a')]=[{'all':!![]}];}return db[_0xdde3('0xdb')][_0xdde3('0x51')](_0x51bddb);})[_0xdde3('0x21')](function(_0x1810b0){_0x33ef46['rows']=_0x1810b0;return _0x33ef46;});}})[_0xdde3('0x21')](respondWithFilteredResult(_0x293620,_0x51bddb))[_0xdde3('0x5a')](handleError(_0x293620,null));};exports['getScreenRecordings']=function(_0x327a69,_0x193f1e){var _0x37ea7a={'raw':!![],'where':{}};var _0x3e1f1f={};var _0x2398ba={'count':0x0,'rows':[]};return db['User']['findOne']({'where':{'id':_0x327a69[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x193f1e,null))[_0xdde3('0x21')](function(_0x3c7064){if(_0x3c7064){_0x3e1f1f[_0xdde3('0xcd')]=_[_0xdde3('0xce')](db[_0xdde3('0xdd')][_0xdde3('0x3e')]);_0x3e1f1f[_0xdde3('0x4b')]=_[_0xdde3('0xce')](_0x327a69[_0xdde3('0x4b')]);_0x3e1f1f[_0xdde3('0xd0')]=_[_0xdde3('0xd8')](_0x3e1f1f['model'],_0x3e1f1f[_0xdde3('0x4b')]);_0x37ea7a['attributes']=_[_0xdde3('0xd8')](_0x3e1f1f[_0xdde3('0xcd')],qs['fields'](_0x327a69['query'][_0xdde3('0xd1')]));_0x37ea7a['attributes']=_0x37ea7a[_0xdde3('0x4f')][_0xdde3('0x6e')]?_0x37ea7a['attributes']:_0x3e1f1f[_0xdde3('0xcd')];if(!_0x327a69['query'][_0xdde3('0xc8')](_0xdde3('0xd7'))){_0x37ea7a['limit']=qs[_0xdde3('0x1c')](_0x327a69[_0xdde3('0x4b')][_0xdde3('0x1c')]);_0x37ea7a[_0xdde3('0x1b')]=qs[_0xdde3('0x1b')](_0x327a69[_0xdde3('0x4b')][_0xdde3('0x1b')]);}_0x37ea7a[_0xdde3('0xd2')]=qs[_0xdde3('0xd3')](_0x327a69[_0xdde3('0x4b')][_0xdde3('0xd3')]);_0x37ea7a['where']=qs[_0xdde3('0xd0')](_['pick'](_0x327a69['query'],_0x3e1f1f[_0xdde3('0xd0')]));_0x37ea7a['where']['UserId']=_0x3c7064['id'];if(_0x327a69['query'][_0xdde3('0x41')]){_0x37ea7a['where']=_[_0xdde3('0xd6')](_0x37ea7a[_0xdde3('0xd4')],{'$or':_[_0xdde3('0x35')](_0x37ea7a[_0xdde3('0x4f')],function(_0x47e7c5){var _0x459dfe={};_0x459dfe[_0x47e7c5]={'$like':'%'+_0x327a69[_0xdde3('0x4b')][_0xdde3('0x41')]+'%'};return _0x459dfe;})});}_0x37ea7a=_[_0xdde3('0xd6')]({},_0x37ea7a,_0x327a69[_0xdde3('0x5d')]);return db[_0xdde3('0xdd')][_0xdde3('0x1e')]({'where':_0x37ea7a[_0xdde3('0xd4')]})[_0xdde3('0x21')](function(_0x43d181){_0x2398ba[_0xdde3('0x1e')]=_0x43d181;if(_0x327a69[_0xdde3('0x4b')]['includeAll']){_0x37ea7a[_0xdde3('0x4a')]=[{'all':!![]}];}return db[_0xdde3('0xdd')]['findAll'](_0x37ea7a);})[_0xdde3('0x21')](function(_0x44f5f2){_0x2398ba[_0xdde3('0x54')]=_0x44f5f2;return _0x2398ba;});}})[_0xdde3('0x21')](respondWithFilteredResult(_0x193f1e,_0x37ea7a))[_0xdde3('0x5a')](handleError(_0x193f1e,null));};exports[_0xdde3('0xde')]=function(_0x175d88,_0x2ba8d7){var _0x1db0e9={};var _0xedf91c={};var _0x4466bc;var _0x361ff3;return db['User'][_0xdde3('0x97')]({'where':{'id':_0x175d88[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x2ba8d7,null))[_0xdde3('0x21')](function(_0x36e289){if(_0x36e289){_0x4466bc=_0x36e289;_0xedf91c[_0xdde3('0xcd')]=_[_0xdde3('0xce')](db[_0xdde3('0xdf')]['rawAttributes']);_0xedf91c['query']=_[_0xdde3('0xce')](_0x175d88[_0xdde3('0x4b')]);_0xedf91c['filters']=_['intersection'](_0xedf91c[_0xdde3('0xcd')],_0xedf91c[_0xdde3('0x4b')]);_0x1db0e9[_0xdde3('0x4f')]=_[_0xdde3('0xd8')](_0xedf91c[_0xdde3('0xcd')],qs[_0xdde3('0xd1')](_0x175d88[_0xdde3('0x4b')][_0xdde3('0xd1')]));_0x1db0e9[_0xdde3('0x4f')]=_0x1db0e9[_0xdde3('0x4f')][_0xdde3('0x6e')]?_0x1db0e9[_0xdde3('0x4f')]:_0xedf91c[_0xdde3('0xcd')];_0x1db0e9[_0xdde3('0xd2')]=qs[_0xdde3('0xd3')](_0x175d88[_0xdde3('0x4b')][_0xdde3('0xd3')]);_0x1db0e9[_0xdde3('0xd4')]=qs[_0xdde3('0xd0')](_['pick'](_0x175d88[_0xdde3('0x4b')],_0xedf91c[_0xdde3('0xd0')]));if(_0x175d88[_0xdde3('0x4b')][_0xdde3('0x41')]){_0x1db0e9['where']=_[_0xdde3('0xd6')](_0x1db0e9[_0xdde3('0xd4')],{'$or':_[_0xdde3('0x35')](_0x1db0e9[_0xdde3('0x4f')],function(_0x500040){var _0x2c8f0d={};_0x2c8f0d[_0x500040]={'$like':'%'+_0x175d88[_0xdde3('0x4b')][_0xdde3('0x41')]+'%'};return _0x2c8f0d;})});}_0x1db0e9=_[_0xdde3('0xd6')]({},_0x1db0e9,_0x175d88[_0xdde3('0x5d')]);return _0x4466bc[_0xdde3('0xde')](_0x1db0e9);}})['then'](function(_0x2a73fd){if(_0x2a73fd){_0x361ff3=_0x2a73fd['length'];if(!_0x175d88['query']['hasOwnProperty']('nolimit')){_0x1db0e9[_0xdde3('0x1c')]=qs[_0xdde3('0x1c')](_0x175d88[_0xdde3('0x4b')][_0xdde3('0x1c')]);_0x1db0e9[_0xdde3('0x1b')]=qs[_0xdde3('0x1b')](_0x175d88[_0xdde3('0x4b')][_0xdde3('0x1b')]);}return _0x4466bc[_0xdde3('0xde')](_0x1db0e9);}})[_0xdde3('0x21')](function(_0x11e81d){if(_0x11e81d){return _0x11e81d?{'count':_0x361ff3,'rows':_0x11e81d}:null;}})['then'](respondWithResult(_0x2ba8d7,null))[_0xdde3('0x5a')](handleError(_0x2ba8d7,null));};exports[_0xdde3('0xe0')]=function(_0x13d520,_0x5d8ef7){var _0x52607e={};var _0x2b1d97={};var _0x4c21a3;var _0x36742a;return db[_0xdde3('0x48')][_0xdde3('0x97')]({'where':{'id':_0x13d520[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x5d8ef7,null))[_0xdde3('0x21')](function(_0x56a236){if(_0x56a236){_0x4c21a3=_0x56a236;_0x2b1d97['model']=_[_0xdde3('0xce')](db[_0xdde3('0xe1')][_0xdde3('0x3e')]);_0x2b1d97[_0xdde3('0x4b')]=_[_0xdde3('0xce')](_0x13d520[_0xdde3('0x4b')]);_0x2b1d97[_0xdde3('0xd0')]=_[_0xdde3('0xd8')](_0x2b1d97[_0xdde3('0xcd')],_0x2b1d97[_0xdde3('0x4b')]);_0x52607e[_0xdde3('0x4f')]=_[_0xdde3('0xd8')](_0x2b1d97['model'],qs['fields'](_0x13d520['query']['fields']));_0x52607e[_0xdde3('0x4f')]=_0x52607e['attributes'][_0xdde3('0x6e')]?_0x52607e[_0xdde3('0x4f')]:_0x2b1d97[_0xdde3('0xcd')];_0x52607e[_0xdde3('0xd2')]=qs[_0xdde3('0xd3')](_0x13d520['query'][_0xdde3('0xd3')]);_0x52607e['where']=qs['filters'](_[_0xdde3('0xd5')](_0x13d520[_0xdde3('0x4b')],_0x2b1d97[_0xdde3('0xd0')]));if(_0x13d520[_0xdde3('0x4b')][_0xdde3('0x41')]){_0x52607e['where']=_[_0xdde3('0xd6')](_0x52607e[_0xdde3('0xd4')],{'$or':_['map'](_0x52607e[_0xdde3('0x4f')],function(_0x23d967){var _0x2265db={};_0x2265db[_0x23d967]={'$like':'%'+_0x13d520['query'][_0xdde3('0x41')]+'%'};return _0x2265db;})});}_0x52607e=_[_0xdde3('0xd6')]({},_0x52607e,_0x13d520['options']);return _0x4c21a3[_0xdde3('0xe0')](_0x52607e);}})[_0xdde3('0x21')](function(_0x55e7f2){if(_0x55e7f2){_0x36742a=_0x55e7f2[_0xdde3('0x6e')];if(!_0x13d520[_0xdde3('0x4b')][_0xdde3('0xc8')](_0xdde3('0xd7'))){_0x52607e[_0xdde3('0x1c')]=qs[_0xdde3('0x1c')](_0x13d520[_0xdde3('0x4b')][_0xdde3('0x1c')]);_0x52607e[_0xdde3('0x1b')]=qs[_0xdde3('0x1b')](_0x13d520[_0xdde3('0x4b')][_0xdde3('0x1b')]);}return _0x4c21a3[_0xdde3('0xe0')](_0x52607e);}})[_0xdde3('0x21')](function(_0x2f708d){if(_0x2f708d){return _0x2f708d?{'count':_0x36742a,'rows':_0x2f708d}:null;}})[_0xdde3('0x21')](respondWithResult(_0x5d8ef7,null))[_0xdde3('0x5a')](handleError(_0x5d8ef7,null));};exports[_0xdde3('0xe2')]=function(_0x4b83bd,_0x4df78b){var _0x19391c={'raw':!![],'where':{}};var _0x15b025={};var _0xb09808={'count':0x0,'rows':[]};return db['User'][_0xdde3('0x97')]({'where':{'id':_0x4b83bd[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x4df78b,null))[_0xdde3('0x21')](function(_0x1df5d5){if(_0x1df5d5){_0x15b025['model']=_['keys'](db['MailInteraction'][_0xdde3('0x3e')]);_0x15b025[_0xdde3('0x4b')]=_['keys'](_0x4b83bd[_0xdde3('0x4b')]);_0x15b025[_0xdde3('0xd0')]=_[_0xdde3('0xd8')](_0x15b025[_0xdde3('0xcd')],_0x15b025[_0xdde3('0x4b')]);_0x19391c[_0xdde3('0x4f')]=_['intersection'](_0x15b025[_0xdde3('0xcd')],qs[_0xdde3('0xd1')](_0x4b83bd[_0xdde3('0x4b')][_0xdde3('0xd1')]));_0x19391c[_0xdde3('0x4f')]=_0x19391c[_0xdde3('0x4f')][_0xdde3('0x6e')]?_0x19391c[_0xdde3('0x4f')]:_0x15b025[_0xdde3('0xcd')];if(!_0x4b83bd[_0xdde3('0x4b')][_0xdde3('0xc8')](_0xdde3('0xd7'))){_0x19391c[_0xdde3('0x1c')]=qs[_0xdde3('0x1c')](_0x4b83bd[_0xdde3('0x4b')][_0xdde3('0x1c')]);_0x19391c[_0xdde3('0x1b')]=qs[_0xdde3('0x1b')](_0x4b83bd['query'][_0xdde3('0x1b')]);}_0x19391c[_0xdde3('0xd2')]=qs[_0xdde3('0xd3')](_0x4b83bd[_0xdde3('0x4b')][_0xdde3('0xd3')]);_0x19391c['where']=qs[_0xdde3('0xd0')](_['pick'](_0x4b83bd[_0xdde3('0x4b')],_0x15b025[_0xdde3('0xd0')]));_0x19391c[_0xdde3('0xd4')][_0xdde3('0xdc')]=_0x1df5d5['id'];if(_0x4b83bd[_0xdde3('0x4b')][_0xdde3('0x41')]){_0x19391c['where']=_[_0xdde3('0xd6')](_0x19391c[_0xdde3('0xd4')],{'$or':_['map'](_0x19391c[_0xdde3('0x4f')],function(_0x41ab81){var _0x4014e={};_0x4014e[_0x41ab81]={'$like':'%'+_0x4b83bd[_0xdde3('0x4b')][_0xdde3('0x41')]+'%'};return _0x4014e;})});}_0x19391c=_[_0xdde3('0xd6')]({},_0x19391c,_0x4b83bd['options']);return db['MailInteraction'][_0xdde3('0x1e')]({'where':_0x19391c[_0xdde3('0xd4')]})['then'](function(_0x1503e2){_0xb09808['count']=_0x1503e2;if(_0x4b83bd[_0xdde3('0x4b')]['includeAll']){_0x19391c[_0xdde3('0x4a')]=[{'all':!![]}];}return db[_0xdde3('0xe3')][_0xdde3('0x51')](_0x19391c);})[_0xdde3('0x21')](function(_0x4d608c){_0xb09808[_0xdde3('0x54')]=_0x4d608c;return _0xb09808;});}})['then'](respondWithFilteredResult(_0x4df78b,_0x19391c))[_0xdde3('0x5a')](handleError(_0x4df78b,null));};exports['getSmsInteractions']=function(_0x36348,_0x1481a2){var _0x2f1ca7={};var _0x96024c={};var _0x4e5e6c;var _0x39f3c7;return db[_0xdde3('0x48')]['findOne']({'where':{'id':_0x36348[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x1481a2,null))[_0xdde3('0x21')](function(_0x41c95a){if(_0x41c95a){_0x4e5e6c=_0x41c95a;_0x96024c[_0xdde3('0xcd')]=_[_0xdde3('0xce')](db[_0xdde3('0xe4')][_0xdde3('0x3e')]);_0x96024c['query']=_[_0xdde3('0xce')](_0x36348[_0xdde3('0x4b')]);_0x96024c[_0xdde3('0xd0')]=_[_0xdde3('0xd8')](_0x96024c[_0xdde3('0xcd')],_0x96024c['query']);_0x2f1ca7[_0xdde3('0x4f')]=_['intersection'](_0x96024c[_0xdde3('0xcd')],qs[_0xdde3('0xd1')](_0x36348[_0xdde3('0x4b')]['fields']));_0x2f1ca7['attributes']=_0x2f1ca7['attributes'][_0xdde3('0x6e')]?_0x2f1ca7['attributes']:_0x96024c['model'];_0x2f1ca7[_0xdde3('0xd2')]=qs[_0xdde3('0xd3')](_0x36348[_0xdde3('0x4b')]['sort']);_0x2f1ca7[_0xdde3('0xd4')]=qs['filters'](_[_0xdde3('0xd5')](_0x36348[_0xdde3('0x4b')],_0x96024c[_0xdde3('0xd0')]));if(_0x36348[_0xdde3('0x4b')]['filter']){_0x2f1ca7[_0xdde3('0xd4')]=_[_0xdde3('0xd6')](_0x2f1ca7[_0xdde3('0xd4')],{'$or':_['map'](_0x2f1ca7['attributes'],function(_0x1db3d4){var _0x161624={};_0x161624[_0x1db3d4]={'$like':'%'+_0x36348[_0xdde3('0x4b')]['filter']+'%'};return _0x161624;})});}_0x2f1ca7=_[_0xdde3('0xd6')]({},_0x2f1ca7,_0x36348[_0xdde3('0x5d')]);return _0x4e5e6c['getSmsInteractions'](_0x2f1ca7);}})[_0xdde3('0x21')](function(_0x21781a){if(_0x21781a){_0x39f3c7=_0x21781a['length'];if(!_0x36348[_0xdde3('0x4b')][_0xdde3('0xc8')](_0xdde3('0xd7'))){_0x2f1ca7[_0xdde3('0x1c')]=qs['limit'](_0x36348['query'][_0xdde3('0x1c')]);_0x2f1ca7[_0xdde3('0x1b')]=qs[_0xdde3('0x1b')](_0x36348['query']['offset']);}return _0x4e5e6c['getSmsInteractions'](_0x2f1ca7);}})[_0xdde3('0x21')](function(_0x332c18){if(_0x332c18){return _0x332c18?{'count':_0x39f3c7,'rows':_0x332c18}:null;}})[_0xdde3('0x21')](respondWithResult(_0x1481a2,null))[_0xdde3('0x5a')](handleError(_0x1481a2,null));};exports['getFaxInteractions']=function(_0x19f6af,_0x4c446d){var _0x6c5cae={};var _0x3236e3={};var _0x2cff3a;var _0x4f6f82;return db[_0xdde3('0x48')][_0xdde3('0x97')]({'where':{'id':_0x19f6af[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x4c446d,null))[_0xdde3('0x21')](function(_0x1ddb16){if(_0x1ddb16){_0x2cff3a=_0x1ddb16;_0x3236e3[_0xdde3('0xcd')]=_['keys'](db['FaxInteraction'][_0xdde3('0x3e')]);_0x3236e3['query']=_['keys'](_0x19f6af[_0xdde3('0x4b')]);_0x3236e3['filters']=_['intersection'](_0x3236e3[_0xdde3('0xcd')],_0x3236e3[_0xdde3('0x4b')]);_0x6c5cae['attributes']=_[_0xdde3('0xd8')](_0x3236e3[_0xdde3('0xcd')],qs['fields'](_0x19f6af[_0xdde3('0x4b')][_0xdde3('0xd1')]));_0x6c5cae[_0xdde3('0x4f')]=_0x6c5cae[_0xdde3('0x4f')][_0xdde3('0x6e')]?_0x6c5cae[_0xdde3('0x4f')]:_0x3236e3['model'];_0x6c5cae[_0xdde3('0xd2')]=qs['sort'](_0x19f6af[_0xdde3('0x4b')][_0xdde3('0xd3')]);_0x6c5cae[_0xdde3('0xd4')]=qs[_0xdde3('0xd0')](_[_0xdde3('0xd5')](_0x19f6af[_0xdde3('0x4b')],_0x3236e3[_0xdde3('0xd0')]));if(_0x19f6af['query'][_0xdde3('0x41')]){_0x6c5cae[_0xdde3('0xd4')]=_['merge'](_0x6c5cae[_0xdde3('0xd4')],{'$or':_[_0xdde3('0x35')](_0x6c5cae['attributes'],function(_0x2fb737){var _0x302091={};_0x302091[_0x2fb737]={'$like':'%'+_0x19f6af[_0xdde3('0x4b')][_0xdde3('0x41')]+'%'};return _0x302091;})});}_0x6c5cae=_[_0xdde3('0xd6')]({},_0x6c5cae,_0x19f6af[_0xdde3('0x5d')]);return _0x2cff3a[_0xdde3('0xe5')](_0x6c5cae);}})[_0xdde3('0x21')](function(_0x4f6f7c){if(_0x4f6f7c){_0x4f6f82=_0x4f6f7c[_0xdde3('0x6e')];if(!_0x19f6af['query'][_0xdde3('0xc8')](_0xdde3('0xd7'))){_0x6c5cae[_0xdde3('0x1c')]=qs[_0xdde3('0x1c')](_0x19f6af['query'][_0xdde3('0x1c')]);_0x6c5cae[_0xdde3('0x1b')]=qs[_0xdde3('0x1b')](_0x19f6af[_0xdde3('0x4b')][_0xdde3('0x1b')]);}return _0x2cff3a['getFaxInteractions'](_0x6c5cae);}})[_0xdde3('0x21')](function(_0x107bed){if(_0x107bed){return _0x107bed?{'count':_0x4f6f82,'rows':_0x107bed}:null;}})['then'](respondWithResult(_0x4c446d,null))[_0xdde3('0x5a')](handleError(_0x4c446d,null));};exports['getWhatsappInteractions']=function(_0x5a4229,_0x37ead3){var _0x3a487b={};var _0x106b5d={};var _0x4bbc2b;var _0xcec4dd;return db[_0xdde3('0x48')][_0xdde3('0x97')]({'where':{'id':_0x5a4229[_0xdde3('0x5c')]['id']}})['then'](handleEntityNotFound(_0x37ead3,null))[_0xdde3('0x21')](function(_0x169f47){if(_0x169f47){_0x4bbc2b=_0x169f47;_0x106b5d[_0xdde3('0xcd')]=_['keys'](db[_0xdde3('0xe6')]['rawAttributes']);_0x106b5d[_0xdde3('0x4b')]=_['keys'](_0x5a4229['query']);_0x106b5d[_0xdde3('0xd0')]=_[_0xdde3('0xd8')](_0x106b5d[_0xdde3('0xcd')],_0x106b5d['query']);_0x3a487b[_0xdde3('0x4f')]=_[_0xdde3('0xd8')](_0x106b5d[_0xdde3('0xcd')],qs[_0xdde3('0xd1')](_0x5a4229[_0xdde3('0x4b')][_0xdde3('0xd1')]));_0x3a487b['attributes']=_0x3a487b['attributes']['length']?_0x3a487b[_0xdde3('0x4f')]:_0x106b5d[_0xdde3('0xcd')];_0x3a487b[_0xdde3('0xd2')]=qs[_0xdde3('0xd3')](_0x5a4229[_0xdde3('0x4b')]['sort']);_0x3a487b[_0xdde3('0xd4')]=qs[_0xdde3('0xd0')](_[_0xdde3('0xd5')](_0x5a4229[_0xdde3('0x4b')],_0x106b5d['filters']));if(_0x5a4229['query'][_0xdde3('0x41')]){_0x3a487b[_0xdde3('0xd4')]=_[_0xdde3('0xd6')](_0x3a487b[_0xdde3('0xd4')],{'$or':_[_0xdde3('0x35')](_0x3a487b['attributes'],function(_0xbc7e01){var _0x2c218c={};_0x2c218c[_0xbc7e01]={'$like':'%'+_0x5a4229[_0xdde3('0x4b')][_0xdde3('0x41')]+'%'};return _0x2c218c;})});}_0x3a487b=_[_0xdde3('0xd6')]({},_0x3a487b,_0x5a4229['options']);return _0x4bbc2b['getWhatsappInteractions'](_0x3a487b);}})[_0xdde3('0x21')](function(_0x475199){if(_0x475199){_0xcec4dd=_0x475199[_0xdde3('0x6e')];if(!_0x5a4229[_0xdde3('0x4b')][_0xdde3('0xc8')](_0xdde3('0xd7'))){_0x3a487b['limit']=qs[_0xdde3('0x1c')](_0x5a4229[_0xdde3('0x4b')][_0xdde3('0x1c')]);_0x3a487b[_0xdde3('0x1b')]=qs['offset'](_0x5a4229['query']['offset']);}return _0x4bbc2b[_0xdde3('0xe7')](_0x3a487b);}})['then'](function(_0x5e6f9e){if(_0x5e6f9e){return _0x5e6f9e?{'count':_0xcec4dd,'rows':_0x5e6f9e}:null;}})['then'](respondWithResult(_0x37ead3,null))['catch'](handleError(_0x37ead3,null));};exports['login']=function(_0x17dbc5,_0x557866,_0x1fadd8){var _0x1336fe;var _0x5701f5;var _0x11f067;var _0x13a8d2=!_[_0xdde3('0x68')](_0x17dbc5[_0xdde3('0x5c')]['id'])?_0x17dbc5[_0xdde3('0x5c')]['id']:!_[_0xdde3('0x68')](_0x17dbc5['user']['id'])?_0x17dbc5['user']['id']:null;return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x13a8d2,'role':{'$or':[_0xdde3('0x82'),_0xdde3('0x31'),_0xdde3('0x2c')]}},'attributes':['id',_0xdde3('0x38'),'phone',_0xdde3('0xe8'),'role',_0xdde3('0x65'),_0xdde3('0xa0')]})[_0xdde3('0x21')](function(_0x173c0c){if(_0x173c0c){if(_0x173c0c[_0xdde3('0x2b')]===_0xdde3('0x2c')){_0x1336fe=_0x173c0c;if(_0x17dbc5['body'][_0xdde3('0xa1')]){_0x11f067=util[_0xdde3('0xac')](_0xdde3('0xe9'),_0x1336fe[_0x17dbc5[_0xdde3('0x5f')][_0xdde3('0xa1')]]);}else if(_0x17dbc5[_0xdde3('0x5f')]['intrf']){_0x11f067=util[_0xdde3('0xac')](_0xdde3('0xad'),_0x17dbc5[_0xdde3('0x5f')]['intrf']);}else{_0x11f067=util[_0xdde3('0xac')]('SIP/%s',_0x1336fe['name']);}socket['to'](util[_0xdde3('0xac')](_0xdde3('0xea'),_0x1336fe[_0xdde3('0x38')]))['emit'](_0xdde3('0xeb'),{'user':{'id':_0x1336fe['id'],'name':_0x1336fe[_0xdde3('0x38')]},'ip':_0x17dbc5['headers'][_0xdde3('0xec')]||_0x17dbc5['connection'][_0xdde3('0xed')]||_0x17dbc5[_0xdde3('0xee')]['remoteAddress']||_0x17dbc5[_0xdde3('0xef')][_0xdde3('0xee')][_0xdde3('0xed')]});return db[_0xdde3('0xae')]['destroy']({'where':{'membername':_0x1336fe[_0xdde3('0x38')]},'individualHooks':!![]});}}else{throw new db[(_0xdde3('0x92'))][(_0xdde3('0x93'))](_0xdde3('0xf0'));}})[_0xdde3('0x21')](function(){if(_0x1336fe){return _0x1336fe[_0xdde3('0xf1')]({'raw':!![]});}})['then'](function(_0x4baeff){if(_0x1336fe){if(_0x4baeff){_0x5701f5=_0x4baeff;if(_0x5701f5['length']){var _0x34eb31=_0x5701f5[_0xdde3('0x35')](function(_0x37bfdf){var _0x49b93d={'membername':_0x1336fe[_0xdde3('0x38')],'UserId':_0x1336fe['id'],'queue_name':_0x37bfdf[_0xdde3('0x38')],'VoiceQueueId':_0x37bfdf['id'],'interface':_0x11f067,'paused':_0x1336fe[_0xdde3('0xa0')]||![],'penalty':_0x37bfdf[_0xdde3('0xf2')]||0x0};return db[_0xdde3('0xae')]['upsert'](_0x49b93d);});return Promise[_0xdde3('0x5e')](_0x34eb31);}}}})[_0xdde3('0x21')](function(){if(_0x1336fe){return db[_0xdde3('0xf3')][_0xdde3('0x51')]({'where':{'membername':_0x1336fe[_0xdde3('0x38')],'exitAt':null}});}})['then'](function(_0x70ae58){if(_0x1336fe){var _0x4e500a=[];_0x70ae58[_0xdde3('0xf4')](function(_0x1b66d3){_0x4e500a[_0xdde3('0x50')](_0x1b66d3[_0xdde3('0x2a')]({'exitAt':moment()[_0xdde3('0xac')](_0xdde3('0xf5'))}));});return Promise[_0xdde3('0x5e')](_0x4e500a);}})[_0xdde3('0x21')](function(){if(_0x1336fe){var _0x3ba6fd=[];var _0x2276c5=[];var _0x2aa794=utils[_0xdde3('0xf6')]();var _0x55fdde={'membername':_0x1336fe[_0xdde3('0x38')],'interface':_0x11f067,'enterAt':moment()[_0xdde3('0xac')](_0xdde3('0xf5')),'role':_0x1336fe[_0xdde3('0x2b')],'internal':_0x1336fe[_0xdde3('0x65')]};_0x2aa794[_0xdde3('0xf4')](function(_0x55662e){_0x3ba6fd[_0xdde3('0x50')](_[_0xdde3('0xd6')]({'channel':_0x55662e,'type':_0xdde3('0xf7'),'data1':_0x17dbc5[_0xdde3('0x5f')][_0xdde3('0xf8')],'data2':_0x11f067},_0x55fdde));if(_0x1336fe[_0xdde3('0xa0')]){_0x2276c5['push'](_[_0xdde3('0xd6')]({'channel':_0x55662e,'type':_0xdde3('0xf9'),'data1':_0xdde3('0xfa')},_0x55fdde));}});return db['MemberReport'][_0xdde3('0x8b')](_0x3ba6fd[_0xdde3('0xc6')](_0x2276c5),{'individualHooks':!![]});}})[_0xdde3('0x21')](function(){if(_0x1336fe){return _0x1336fe[_0xdde3('0x2a')]({'online':!![],'lastLoginAt':moment()[_0xdde3('0xac')](_0xdde3('0xf5')),'voicePause':_0x1336fe[_0xdde3('0xa0')]||![],'mailPause':_0x1336fe[_0xdde3('0xa0')]||![],'chatPause':_0x1336fe[_0xdde3('0xa0')]||![],'faxPause':_0x1336fe['loginInPause']||![],'smsPause':_0x1336fe['loginInPause']||![],'openchannelPause':_0x1336fe[_0xdde3('0xa0')]||![],'whatsappPause':_0x1336fe['loginInPause']||![],'pauseType':_0x1336fe[_0xdde3('0xa0')]?'LOGININPAUSE':null,'interface':_0x11f067,'lastPauseAt':moment()[_0xdde3('0xac')](_0xdde3('0xf5'))});}})[_0xdde3('0x21')](function(_0x1c4af5){if(_0x17dbc5['isMiddleware']){return _0x1fadd8();}else{return Promise[_0xdde3('0xfb')](_0x1c4af5)['then'](respondWithResult(_0x557866,null));}})[_0xdde3('0x5a')](handleError(_0x557866,null));};exports[_0xdde3('0xfc')]=function(_0x1302d1,_0x219810){var _0x5a3f24;return db[_0xdde3('0x48')]['find']({'where':{'id':_0x1302d1[_0xdde3('0x5c')]['id'],'role':'agent'},'attributes':['id',_0xdde3('0x38'),_0xdde3('0x2b')]})[_0xdde3('0x21')](handleEntityNotFound(_0x219810,null))['then'](function(_0x2e911f){if(_0x2e911f){_0x5a3f24=_0x2e911f;return db[_0xdde3('0xae')]['destroy']({'where':{'membername':_0x5a3f24['name']},'individualHooks':!![]});}})[_0xdde3('0x21')](function(){return db['MemberReport'][_0xdde3('0x51')]({'where':{'membername':_0x5a3f24[_0xdde3('0x38')],'exitAt':null}});})['then'](function(_0x1c9e8d){var _0x258ce3=[];_0x1c9e8d[_0xdde3('0xf4')](function(_0x50be1f){_0x258ce3[_0xdde3('0x50')](_0x50be1f[_0xdde3('0x2a')]({'exitAt':moment()[_0xdde3('0xac')](_0xdde3('0xf5'))}));});return Promise[_0xdde3('0x5e')](_0x258ce3);})[_0xdde3('0x21')](function(){return _0x5a3f24[_0xdde3('0x2a')]({'online':![],'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![],'whatsappPause':![],'interface':null});})[_0xdde3('0x21')](respondWithResult(_0x219810,null))[_0xdde3('0x5a')](handleError(_0x219810,null));};exports[_0xdde3('0xfd')]=function(_0x5e078a,_0x3cef71){var _0x5d792d;return db[_0xdde3('0xae')][_0xdde3('0x2a')]({'paused':0x1},{'where':{'UserId':_0x5e078a[_0xdde3('0x5c')]['id']},'individualHooks':!![]})['then'](function(){return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x5e078a['params']['id'],'role':_0xdde3('0x2c')},'attributes':['id','name','role',_0xdde3('0x65'),_0xdde3('0xa1'),_0xdde3('0x9f')]});})['then'](handleEntityNotFound(_0x3cef71,null))[_0xdde3('0x21')](function(_0x5121c6){if(_0x5121c6){_0x5d792d=_0x5121c6;return respondWithRpcPromise('QueuePause','pause',{'id':_0x5d792d['id'],'name':_0x5d792d[_0xdde3('0x38')],'pause':!![]});}})['then'](function(){if(_0x5d792d){return db[_0xdde3('0xf3')][_0xdde3('0x51')]({'where':{'membername':_0x5d792d['name'],'type':_0xdde3('0xf9'),'exitAt':null}});}})[_0xdde3('0x21')](function(_0x1fd25b){if(_0x1fd25b[_0xdde3('0x6e')]){var _0x1ef334=moment()[_0xdde3('0xac')](_0xdde3('0xf5'));for(var _0x29d0fc=0x0,_0x156043=_0x1fd25b[_0xdde3('0x6e')];_0x29d0fc<_0x156043;_0x29d0fc++){_0x1fd25b[_0x29d0fc]['updateAttributes']({'exitAt':_0x1ef334});}}})[_0xdde3('0x21')](function(){var _0x484ad0=[];var _0x5b26d9=utils['getChannels']();_0x5b26d9[_0xdde3('0xf4')](function(_0x3540a5){_0x484ad0[_0xdde3('0x50')]({'channel':_0x3540a5,'membername':_0x5d792d[_0xdde3('0x38')],'interface':_[_0xdde3('0x68')](_0x5d792d[_0xdde3('0xa1')])?util[_0xdde3('0xac')](_0xdde3('0xad'),_0x5d792d[_0xdde3('0x38')]):_0x5d792d[_0xdde3('0xa1')],'type':_0xdde3('0xf9'),'enterAt':moment()[_0xdde3('0xac')](_0xdde3('0xf5')),'data1':_0x5e078a[_0xdde3('0x5f')][_0xdde3('0x3f')]||_0xdde3('0xfe'),'role':_0x5d792d[_0xdde3('0x2b')],'internal':_0x5d792d[_0xdde3('0x65')]});});return db[_0xdde3('0xf3')][_0xdde3('0x8b')](_0x484ad0,{'individualHooks':!![]});})[_0xdde3('0x21')](function(){return _0x5d792d['update']({'voicePause':!![],'mailPause':!![],'chatPause':!![],'faxPause':!![],'smsPause':!![],'whatsappPause':!![],'openchannelPause':!![],'pauseType':_0x5e078a[_0xdde3('0x5f')][_0xdde3('0x3f')]||_0xdde3('0xfe'),'lastPauseAt':moment()[_0xdde3('0xac')](_0xdde3('0xf5'))});})[_0xdde3('0x21')](respondWithResult(_0x3cef71,null))[_0xdde3('0x5a')](handleError(_0x3cef71,null));};exports[_0xdde3('0xff')]=function(_0x5332b7,_0xbeaddf){if(_0x5332b7[_0xdde3('0x5f')][_0xdde3('0x9e')]&&!utils[_0xdde3('0xa2')](_0x5332b7[_0xdde3('0x5f')]['channel'])){throw new APIBadRequestError(util[_0xdde3('0xac')](_0xdde3('0x100'),_0x5332b7['body'][_0xdde3('0x9e')]));}return db[_0xdde3('0x48')]['find']({'where':{'id':_0x5332b7[_0xdde3('0x5c')]['id']},'attributes':['id',_0xdde3('0x38'),'role',_0xdde3('0x65'),_0xdde3('0xa1'),_0xdde3('0x9f'),_0xdde3('0x101'),_0xdde3('0x102'),_0xdde3('0x103'),_0xdde3('0x104'),_0xdde3('0x105'),_0xdde3('0x106'),_0xdde3('0x107'),_0xdde3('0x108'),_0xdde3('0x109')]})[_0xdde3('0x21')](function(_0x4702d5){if(!_0x4702d5){throw new APINotFoundError(util[_0xdde3('0xac')](_0xdde3('0x10a'),_0x5332b7[_0xdde3('0x5c')]['id']));}return _0x4702d5['unpause'](_0x5332b7['body'][_0xdde3('0x9e')]);})['then'](respondWithResult(_0xbeaddf,null))[_0xdde3('0x5a')](APIHandleError(_0xbeaddf));};exports[_0xdde3('0x10b')]=function(_0x2a2484,_0x2e7230){var _0x232fc9={};var _0x4f4811={};var _0x392f6c;var _0x30bd0a;return db[_0xdde3('0x48')][_0xdde3('0x97')]({'where':{'id':_0x2a2484[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x2e7230,null))[_0xdde3('0x21')](function(_0x889b27){if(_0x889b27){_0x392f6c=_0x889b27;_0x4f4811[_0xdde3('0xcd')]=_['keys'](db[_0xdde3('0x10c')][_0xdde3('0x3e')]);_0x4f4811['query']=_['keys'](_0x2a2484[_0xdde3('0x4b')]);_0x4f4811[_0xdde3('0xd0')]=_[_0xdde3('0xd8')](_0x4f4811[_0xdde3('0xcd')],_0x4f4811[_0xdde3('0x4b')]);_0x232fc9[_0xdde3('0x4f')]=_[_0xdde3('0xd8')](_0x4f4811[_0xdde3('0xcd')],qs[_0xdde3('0xd1')](_0x2a2484[_0xdde3('0x4b')][_0xdde3('0xd1')]));_0x232fc9[_0xdde3('0x4f')]=_0x232fc9[_0xdde3('0x4f')]['length']?_0x232fc9[_0xdde3('0x4f')]:_0x4f4811[_0xdde3('0xcd')];_0x232fc9[_0xdde3('0xd2')]=qs['sort'](_0x2a2484['query'][_0xdde3('0xd3')]);_0x232fc9[_0xdde3('0xd4')]=qs[_0xdde3('0xd0')](_[_0xdde3('0xd5')](_0x2a2484[_0xdde3('0x4b')],_0x4f4811[_0xdde3('0xd0')]));if(_0x2a2484['query'][_0xdde3('0x41')]){_0x232fc9[_0xdde3('0xd4')]=_['merge'](_0x232fc9[_0xdde3('0xd4')],{'$or':_[_0xdde3('0x35')](_0x232fc9[_0xdde3('0x4f')],function(_0x5e4d30){var _0x213295={};_0x213295[_0x5e4d30]={'$like':'%'+_0x2a2484[_0xdde3('0x4b')][_0xdde3('0x41')]+'%'};return _0x213295;})});}_0x232fc9=_[_0xdde3('0xd6')]({},_0x232fc9,_0x2a2484[_0xdde3('0x5d')]);return _0x392f6c[_0xdde3('0x10b')](_0x232fc9);}})[_0xdde3('0x21')](function(_0x41744e){if(_0x41744e){_0x30bd0a=_0x41744e[_0xdde3('0x6e')];if(!_0x2a2484['query']['hasOwnProperty'](_0xdde3('0xd7'))){_0x232fc9[_0xdde3('0x1c')]=qs['limit'](_0x2a2484[_0xdde3('0x4b')][_0xdde3('0x1c')]);_0x232fc9[_0xdde3('0x1b')]=qs[_0xdde3('0x1b')](_0x2a2484[_0xdde3('0x4b')]['offset']);}return _0x392f6c['getTeams'](_0x232fc9);}})[_0xdde3('0x21')](function(_0x29b114){if(_0x29b114){return _0x29b114?{'count':_0x30bd0a,'rows':_0x29b114}:null;}})[_0xdde3('0x21')](respondWithResult(_0x2e7230,null))['catch'](handleError(_0x2e7230,null));};exports[_0xdde3('0x10d')]=function(_0x70b567,_0x5dcacb){var _0x1586be=_0x70b567[_0xdde3('0x5c')]['id'];var _0x193619=_0x70b567[_0xdde3('0x5f')]?_0x70b567[_0xdde3('0x5f')][_0xdde3('0x63')]:null;var _0x573175=[];return Promise[_0xdde3('0xfb')]()[_0xdde3('0x21')](function(){if(!_0x193619)throw new APIBadRequestError(_0xdde3('0x10e'));})['then'](function(){return db[_0xdde3('0x48')][_0xdde3('0x97')]({'where':{'id':_0x1586be}});})['then'](function(_0x45bce5){if(!_0x45bce5)throw new APINotFoundError(util[_0xdde3('0xac')]('User\x20with\x20id\x20%s\x20not\x20found',_0x70b567[_0xdde3('0x5c')]['id']));return db[_0xdde3('0x6b')][_0xdde3('0x10f')](function(_0x11478e){return _0x45bce5[_0xdde3('0x10d')](_0x193619,{'transaction':_0x11478e})[_0xdde3('0x21')](function(){return db[_0xdde3('0x10c')][_0xdde3('0x51')]({'where':{'id':{'$in':_0x193619}}});})[_0xdde3('0x21')](function(_0x2893d8){var _0x4e0e9c=_[_0xdde3('0x35')](_0x2893d8,function(_0x1c855a){return _0x1c855a[_0xdde3('0x110')]();});return Promise[_0xdde3('0x5e')](_0x4e0e9c);})['then'](function(_0x43021a){_0x573175=_['flattenDeep'](_0x43021a);var _0x5087e8=_[_0xdde3('0x35')](_0x573175,function(_0x487458){return _0x487458[_0xdde3('0x111')](_0x45bce5['id'],{'transaction':_0x11478e});});return Promise['all'](_0x5087e8);})[_0xdde3('0x21')](function(){if(!_0x45bce5['online'])return;var _0x2732b0=_[_0xdde3('0x41')](_0x573175,function(_0x142df3){return _0x142df3[_0xdde3('0x112')](_0xdde3('0x9e'))===_0xdde3('0x113');});var _0xce47b3=_[_0xdde3('0x35')](_0x2732b0,function(_0x42d943){return db['UserVoiceQueueRt'][_0xdde3('0x114')]({'membername':_0x45bce5[_0xdde3('0x38')],'UserId':_0x45bce5['id'],'queue_name':_0x42d943[_0xdde3('0x38')],'VoiceQueueId':_0x42d943['id'],'interface':_[_0xdde3('0x68')](_0x45bce5[_0xdde3('0xa1')])?util[_0xdde3('0xac')](_0xdde3('0xad'),_0x45bce5['name']):_0x45bce5[_0xdde3('0xa1')],'paused':_0x45bce5[_0xdde3('0x101')]||![],'penalty':_0x45bce5[_0xdde3('0xa7')]},{'transaction':_0x11478e});});return Promise[_0xdde3('0x5e')](_0xce47b3);})[_0xdde3('0x21')](function(){return db[_0xdde3('0x115')][_0xdde3('0x51')]({'where':{'teamId':{'$in':_0x193619}}});})[_0xdde3('0x21')](function(_0x2b2a9b){var _0xcfbc4=_[_0xdde3('0x35')](_0x2b2a9b,function(_0x57fa2f){return db['UserVoicePrefix'][_0xdde3('0x88')]({'UserId':_0x45bce5['id'],'VoicePrefixId':_0x57fa2f[_0xdde3('0x116')]},{'transaction':_0x11478e});});return Promise[_0xdde3('0x5e')](_0xcfbc4);});});})[_0xdde3('0x21')](function(){for(var _0x1c8b4b=0x0;_0x1c8b4b<_0x573175[_0xdde3('0x6e')];_0x1c8b4b++){var _0x169af3=_0x573175[_0x1c8b4b]['getDataValue']('channel');var _0x557f1f=_0x169af3+_0xdde3('0xa9');socket['emit'](_0xdde3('0x31')+_0x169af3+_0xdde3('0x117'),{'UserId':_0x1586be,['queueField']:_0x573175[_0x1c8b4b]['id']});}})[_0xdde3('0x21')](respondWithStatusCode(_0x5dcacb,null))[_0xdde3('0x5a')](APIHandleError(_0x5dcacb));};exports[_0xdde3('0x118')]=function(_0x4bbae1,_0x2d0cda){var _0x4ee520=_0x4bbae1[_0xdde3('0x5c')]['id'];var _0x2a0abd=null;if(_0x4bbae1['query'][_0xdde3('0x63')]){_0x2a0abd=_[_0xdde3('0xb1')](_0x4bbae1[_0xdde3('0x4b')]['ids'])?_0x4bbae1[_0xdde3('0x4b')]['ids']:[_0x4bbae1['query']['ids']];}var _0x5c105e=[];return Promise[_0xdde3('0xfb')]()[_0xdde3('0x21')](function(){if(!_0x2a0abd)throw new APIBadRequestError(_0xdde3('0x119'));})[_0xdde3('0x21')](function(){return db['User'][_0xdde3('0x97')]({'where':{'id':_0x4ee520}});})[_0xdde3('0x21')](function(_0x326a6f){if(!_0x326a6f)throw new APINotFoundError(util['format']('User\x20with\x20id\x20%s\x20not\x20found',_0x4bbae1[_0xdde3('0x5c')]['id']));return db[_0xdde3('0x6b')][_0xdde3('0x10f')](function(_0x194510){return _0x326a6f['removeTeams'](_0x2a0abd,{'transaction':_0x194510})[_0xdde3('0x21')](function(){return db[_0xdde3('0x10c')][_0xdde3('0x51')]({'where':{'id':{'$in':_0x2a0abd}}});})['then'](function(_0x2ea0df){var _0x3a5489=_['map'](_0x2ea0df,function(_0x5cb7cd){return _0x5cb7cd['getAssociatedQueues']();});return Promise[_0xdde3('0x5e')](_0x3a5489);})['then'](function(_0x42620d){_0x5c105e=_[_0xdde3('0x11a')](_0x42620d);var _0x4b8352=_[_0xdde3('0x35')](_0x5c105e,function(_0x20ba97){return _0x20ba97['removeAgent'](_0x326a6f['id'],{'transaction':_0x194510});});return Promise[_0xdde3('0x5e')](_0x4b8352);})[_0xdde3('0x21')](function(){if(!_0x326a6f[_0xdde3('0x9f')])return;var _0x3947f1=_[_0xdde3('0x41')](_0x5c105e,function(_0x1835a9){return _0x1835a9[_0xdde3('0x112')]('channel')==='Voice';});var _0x2a32b8=_[_0xdde3('0x35')](_0x3947f1,function(_0xf08fb7){return db['UserVoiceQueueRt'][_0xdde3('0x3a')]({'where':{'VoiceQueueId':_0xf08fb7['id'],'UserId':_0x326a6f['id']},'transaction':_0x194510});});return Promise[_0xdde3('0x5e')](_0x2a32b8);})[_0xdde3('0x21')](function(){return db[_0xdde3('0x115')][_0xdde3('0x51')]({'where':{'teamId':{'$in':_0x2a0abd}}});})[_0xdde3('0x21')](function(_0xfdf8c6){var _0x48d6cf=_[_0xdde3('0x35')](_0xfdf8c6,function(_0x32320b){return db['UserVoicePrefix'][_0xdde3('0x3a')]({'where':{'UserId':_0x326a6f['id'],'VoicePrefixId':_0x32320b['VoicePrefixId']}},{'transaction':_0x194510});});return Promise['all'](_0x48d6cf);});});})[_0xdde3('0x21')](function(){for(var _0x3945b1=0x0;_0x3945b1<_0x5c105e[_0xdde3('0x6e')];_0x3945b1++){var _0x1ef16c=_0x5c105e[_0x3945b1][_0xdde3('0x112')]('channel');var _0x3468e0=_0x1ef16c+'QueueId';socket[_0xdde3('0x2d')](_0xdde3('0x31')+_0x1ef16c+_0xdde3('0xb2'),{'UserId':_0x4ee520,['queueField']:_0x5c105e[_0x3945b1]['id']});}})[_0xdde3('0x21')](respondWithStatusCode(_0x2d0cda,null))[_0xdde3('0x5a')](APIHandleError(_0x2d0cda));};exports[_0xdde3('0x11b')]=function(_0x1e2204,_0x35fc9c){var _0x45e32b={};var _0x4d5b17={};var _0x42af80;var _0x109b5a;return db[_0xdde3('0x48')]['findOne']({'where':{'id':_0x1e2204['params']['id']}})['then'](handleEntityNotFound(_0x35fc9c,null))[_0xdde3('0x21')](function(_0x999d3b){if(_0x999d3b){_0x42af80=_0x999d3b;_0x4d5b17['model']=_[_0xdde3('0xce')](db[_0xdde3('0x11c')]['rawAttributes']);_0x4d5b17['query']=_['keys'](_0x1e2204['query']);_0x4d5b17[_0xdde3('0xd0')]=_['intersection'](_0x4d5b17['model'],_0x4d5b17[_0xdde3('0x4b')]);_0x45e32b['attributes']=_[_0xdde3('0xd8')](_0x4d5b17[_0xdde3('0xcd')],qs[_0xdde3('0xd1')](_0x1e2204['query'][_0xdde3('0xd1')]));_0x45e32b[_0xdde3('0x4f')]=_0x45e32b[_0xdde3('0x4f')][_0xdde3('0x6e')]?_0x45e32b[_0xdde3('0x4f')]:_0x4d5b17[_0xdde3('0xcd')];_0x45e32b[_0xdde3('0xd2')]=qs[_0xdde3('0xd3')](_0x1e2204[_0xdde3('0x4b')][_0xdde3('0xd3')]);_0x45e32b[_0xdde3('0xd4')]=qs[_0xdde3('0xd0')](_['pick'](_0x1e2204[_0xdde3('0x4b')],_0x4d5b17[_0xdde3('0xd0')]));if(_0x1e2204['query'][_0xdde3('0x41')]){_0x45e32b[_0xdde3('0xd4')]=_[_0xdde3('0xd6')](_0x45e32b[_0xdde3('0xd4')],{'$or':_[_0xdde3('0x35')](_0x45e32b[_0xdde3('0x4f')],function(_0xbdad2d){var _0x50a0b3={};_0x50a0b3[_0xbdad2d]={'$like':'%'+_0x1e2204[_0xdde3('0x4b')][_0xdde3('0x41')]+'%'};return _0x50a0b3;})});}_0x45e32b=_[_0xdde3('0xd6')]({},_0x45e32b,_0x1e2204[_0xdde3('0x5d')]);return _0x42af80[_0xdde3('0x11b')](_0x45e32b);}})[_0xdde3('0x21')](function(_0x48e7ea){if(_0x48e7ea){_0x109b5a=_0x48e7ea[_0xdde3('0x6e')];if(!_0x1e2204[_0xdde3('0x4b')][_0xdde3('0xc8')](_0xdde3('0xd7'))){_0x45e32b['limit']=qs[_0xdde3('0x1c')](_0x1e2204[_0xdde3('0x4b')]['limit']);_0x45e32b[_0xdde3('0x1b')]=qs[_0xdde3('0x1b')](_0x1e2204['query']['offset']);}return _0x42af80[_0xdde3('0x11b')](_0x45e32b);}})[_0xdde3('0x21')](function(_0x1fecdf){if(_0x1fecdf){return _0x1fecdf?{'count':_0x109b5a,'rows':_0x1fecdf}:null;}})[_0xdde3('0x21')](respondWithResult(_0x35fc9c,null))[_0xdde3('0x5a')](handleError(_0x35fc9c,null));};exports['getAgents']=function(_0x57cf77,_0x4e826f){var _0x5b39a8={};var _0x2cb653={};var _0x122e05;return db[_0xdde3('0x48')]['findOne']({'where':{'id':_0x57cf77[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x4e826f,null))[_0xdde3('0x21')](function(_0x22287c){if(_0x22287c){_0x122e05=_0x22287c;_0x2cb653[_0xdde3('0xcd')]=_[_0xdde3('0xce')](db[_0xdde3('0x48')][_0xdde3('0x3e')]);_0x2cb653['query']=_[_0xdde3('0xce')](_0x57cf77[_0xdde3('0x4b')]);_0x2cb653[_0xdde3('0xd0')]=_[_0xdde3('0xd8')](_0x2cb653[_0xdde3('0xcd')],_0x2cb653[_0xdde3('0x4b')]);_0x5b39a8[_0xdde3('0x4f')]=_['intersection'](_0x2cb653[_0xdde3('0xcd')],qs['fields'](_0x57cf77[_0xdde3('0x4b')][_0xdde3('0xd1')]));_0x5b39a8[_0xdde3('0x4f')]=_0x5b39a8[_0xdde3('0x4f')][_0xdde3('0x6e')]?_0x5b39a8['attributes']:_0x2cb653[_0xdde3('0xcd')];_0x5b39a8[_0xdde3('0xd2')]=qs[_0xdde3('0xd3')](_0x57cf77[_0xdde3('0x4b')][_0xdde3('0xd3')]);_0x5b39a8[_0xdde3('0xd4')]=qs[_0xdde3('0xd0')](_[_0xdde3('0xd5')](_0x57cf77[_0xdde3('0x4b')],_0x2cb653[_0xdde3('0xd0')]));if(_0x57cf77['query'][_0xdde3('0x41')]){_0x5b39a8['where']=_[_0xdde3('0xd6')](_0x5b39a8['where'],{'$or':_[_0xdde3('0x35')](_0x5b39a8[_0xdde3('0x4f')],function(_0x1e3abf){var _0x1e4471={};_0x1e4471[_0x1e3abf]={'$like':'%'+_0x57cf77[_0xdde3('0x4b')][_0xdde3('0x41')]+'%'};return _0x1e4471;})});}_0x5b39a8[_0xdde3('0xcd')]=db[_0xdde3('0x48')];_0x5b39a8['as']='Agents';_0x5b39a8=_[_0xdde3('0xd6')]({},_0x5b39a8,_0x57cf77['options']);return _0x122e05[_0xdde3('0xf1')]({'include':[_0x5b39a8]});}})[_0xdde3('0x21')](function(_0x49007c){if(_0x49007c){var _0x57e442={},_0x4a1024=[];for(var _0xaeaf6=0x0;_0xaeaf6<_0x49007c['length'];_0xaeaf6+=0x1){for(var _0x373688=0x0,_0x4b7842;_0x373688<_0x49007c[_0xaeaf6][_0xdde3('0x32')][_0xdde3('0x6e')];_0x373688+=0x1){_0x4b7842=_0x49007c[_0xaeaf6][_0xdde3('0x32')][_0x373688][_0xdde3('0x2f')]({'plain':!![]});_0x57e442[_0x4b7842['id']]=_0x4b7842;}}_0x57e442=_[_0xdde3('0x11d')](_0x57e442);for(var _0x30498a=qs[_0xdde3('0x1b')](_0x57cf77['query'][_0xdde3('0x1b')]);_0x30498a<_0x57e442[_0xdde3('0x6e')]&&_0x4a1024[_0xdde3('0x6e')]<qs[_0xdde3('0x1c')](_0x57cf77['query']['limit']);_0x30498a+=0x1){if(_0x57e442[_0x30498a]){_0x4a1024[_0xdde3('0x50')](_0x57e442[_0x30498a]);}}return{'count':_0x57e442['length'],'rows':_0x4a1024};}})['then'](respondWithResult(_0x4e826f,null))[_0xdde3('0x5a')](handleError(_0x4e826f,null));};exports[_0xdde3('0x3a')]=function(_0x414ce0,_0x209cfd){if(_0x414ce0[_0xdde3('0x31')]['id']==_0x414ce0[_0xdde3('0x5c')]['id']){throw new APIForbiddenError(_0xdde3('0x11e'));}return db['User'][_0xdde3('0x60')]({'where':{'id':_0x414ce0[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](function(_0x184172){if(!_0x184172){throw new APINotFoundError(util[_0xdde3('0xac')]('User\x20with\x20id\x20%s\x20not\x20found',_0x414ce0[_0xdde3('0x5c')]['id']));}return db[_0xdde3('0x6b')][_0xdde3('0x10f')](function(_0x137fc1){return db[_0xdde3('0x11f')][_0xdde3('0x2a')]({'recallme':![]},{'where':{'UserId':_0x414ce0[_0xdde3('0x5c')]['id']},'transaction':_0x137fc1})[_0xdde3('0x21')](function(){return removeEntity(_0x209cfd,_0x137fc1)(_0x184172);});});})[_0xdde3('0x5a')](APIHandleError(_0x209cfd));};exports['addChatInteractions']=function(_0x12472a,_0x588feb){return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x12472a[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x588feb,null))[_0xdde3('0x21')](function(_0x2bc8c1){if(_0x2bc8c1){return _0x2bc8c1[_0xdde3('0x120')](_0x12472a[_0xdde3('0x5f')][_0xdde3('0x63')],_[_0xdde3('0x64')](_0x12472a[_0xdde3('0x5f')],[_0xdde3('0x63'),'id'])||{})[_0xdde3('0xa8')](function(){for(var _0x1b49be=0x0;_0x1b49be<_0x12472a[_0xdde3('0x5f')][_0xdde3('0x63')]['length'];_0x1b49be+=0x1){socket[_0xdde3('0x2d')](_0xdde3('0x121'),{'ChatInteractionId':Number(_0x12472a[_0xdde3('0x5f')][_0xdde3('0x63')][_0x1b49be]),'UserId':Number(_0x12472a[_0xdde3('0x5c')]['id'])});}return _0x12472a[_0xdde3('0x5f')]['ids'];});}})[_0xdde3('0x21')](respondWithResult(_0x588feb,null))[_0xdde3('0x5a')](handleError(_0x588feb,null));};exports[_0xdde3('0x122')]=function(_0x3c54d0,_0xb1a067){return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x3c54d0['params']['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0xb1a067,null))[_0xdde3('0x21')](function(_0x308552){if(_0x308552){return _0x308552[_0xdde3('0x122')](_0x3c54d0[_0xdde3('0x4b')][_0xdde3('0x63')])[_0xdde3('0x21')](function(){if(_[_0xdde3('0xb1')](_0x3c54d0['query']['ids'])){for(var _0x4559c3=0x0;_0x4559c3<_0x3c54d0[_0xdde3('0x4b')]['ids']['length'];_0x4559c3+=0x1){socket[_0xdde3('0x2d')]('user_has_chat_interactions:remove',{'ChatInteractionId':Number(_0x3c54d0[_0xdde3('0x4b')][_0xdde3('0x63')][_0x4559c3]),'UserId':Number(_0x3c54d0['params']['id'])});}}else{socket[_0xdde3('0x2d')]('user_has_chat_interactions:remove',{'ChatInteractionId':Number(_0x3c54d0['query'][_0xdde3('0x63')]),'UserId':Number(_0x3c54d0['params']['id'])});}});}})[_0xdde3('0x21')](respondWithStatusCode(_0xb1a067,null))[_0xdde3('0x5a')](handleError(_0xb1a067,null));};exports[_0xdde3('0x123')]=function(_0x516081,_0x121e1f){return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x516081[_0xdde3('0x5c')]['id']}})['then'](handleEntityNotFound(_0x121e1f,null))[_0xdde3('0x21')](function(_0x543218){if(_0x543218){return _0x543218['addMailInteractions'](_0x516081[_0xdde3('0x5f')]['ids'],_[_0xdde3('0x64')](_0x516081['body'],[_0xdde3('0x63'),'id'])||{})[_0xdde3('0xa8')](function(){for(var _0x16da2c=0x0;_0x16da2c<_0x516081[_0xdde3('0x5f')][_0xdde3('0x63')][_0xdde3('0x6e')];_0x16da2c+=0x1){socket[_0xdde3('0x2d')](_0xdde3('0x124'),{'MailInteractionId':Number(_0x516081['body'][_0xdde3('0x63')][_0x16da2c]),'UserId':Number(_0x516081[_0xdde3('0x5c')]['id'])});}return _0x516081[_0xdde3('0x5f')][_0xdde3('0x63')];});}})[_0xdde3('0x21')](respondWithResult(_0x121e1f,null))['catch'](handleError(_0x121e1f,null));};exports[_0xdde3('0x125')]=function(_0x55a80b,_0xa26e78){return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x55a80b[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0xa26e78,null))[_0xdde3('0x21')](function(_0x37f291){if(_0x37f291){return _0x37f291[_0xdde3('0x125')](_0x55a80b[_0xdde3('0x4b')][_0xdde3('0x63')])[_0xdde3('0x21')](function(){if(_[_0xdde3('0xb1')](_0x55a80b[_0xdde3('0x4b')][_0xdde3('0x63')])){for(var _0x2d1e77=0x0;_0x2d1e77<_0x55a80b[_0xdde3('0x4b')][_0xdde3('0x63')]['length'];_0x2d1e77+=0x1){socket[_0xdde3('0x2d')](_0xdde3('0x126'),{'MailInteractionId':Number(_0x55a80b[_0xdde3('0x4b')][_0xdde3('0x63')][_0x2d1e77]),'UserId':Number(_0x55a80b[_0xdde3('0x5c')]['id'])});}}else{socket[_0xdde3('0x2d')]('user_has_mail_interactions:remove',{'MailInteractionId':Number(_0x55a80b[_0xdde3('0x4b')][_0xdde3('0x63')]),'UserId':Number(_0x55a80b[_0xdde3('0x5c')]['id'])});}});}})[_0xdde3('0x21')](respondWithStatusCode(_0xa26e78,null))[_0xdde3('0x5a')](handleError(_0xa26e78,null));};exports[_0xdde3('0x127')]=function(_0x238358,_0x580bc1){return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x238358[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x580bc1,null))['then'](function(_0x4925d1){if(_0x4925d1){return _0x4925d1[_0xdde3('0x127')](_0x238358['body']['ids'],_[_0xdde3('0x64')](_0x238358[_0xdde3('0x5f')],[_0xdde3('0x63'),'id'])||{})[_0xdde3('0xa8')](function(){for(var _0x29cdd2=0x0;_0x29cdd2<_0x238358[_0xdde3('0x5f')][_0xdde3('0x63')][_0xdde3('0x6e')];_0x29cdd2+=0x1){socket[_0xdde3('0x2d')](_0xdde3('0x128'),{'FaxInteractionId':Number(_0x238358[_0xdde3('0x5f')][_0xdde3('0x63')][_0x29cdd2]),'UserId':Number(_0x238358[_0xdde3('0x5c')]['id'])});}return _0x238358[_0xdde3('0x5f')][_0xdde3('0x63')];});}})[_0xdde3('0x21')](respondWithResult(_0x580bc1,null))[_0xdde3('0x5a')](handleError(_0x580bc1,null));};exports[_0xdde3('0x129')]=function(_0x6e0fd3,_0x2bd344){return db[_0xdde3('0x48')]['find']({'where':{'id':_0x6e0fd3[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x2bd344,null))[_0xdde3('0x21')](function(_0x4fc19c){if(_0x4fc19c){return _0x4fc19c['removeFaxInteractions'](_0x6e0fd3[_0xdde3('0x4b')][_0xdde3('0x63')])[_0xdde3('0x21')](function(){if(_[_0xdde3('0xb1')](_0x6e0fd3['query'][_0xdde3('0x63')])){for(var _0x2b197e=0x0;_0x2b197e<_0x6e0fd3[_0xdde3('0x4b')][_0xdde3('0x63')][_0xdde3('0x6e')];_0x2b197e+=0x1){socket[_0xdde3('0x2d')]('user_has_fax_interactions:remove',{'FaxInteractionId':Number(_0x6e0fd3['query'][_0xdde3('0x63')][_0x2b197e]),'UserId':Number(_0x6e0fd3['params']['id'])});}}else{socket[_0xdde3('0x2d')](_0xdde3('0x12a'),{'FaxInteractionId':Number(_0x6e0fd3[_0xdde3('0x4b')][_0xdde3('0x63')]),'UserId':Number(_0x6e0fd3[_0xdde3('0x5c')]['id'])});}});}})[_0xdde3('0x21')](respondWithStatusCode(_0x2bd344,null))[_0xdde3('0x5a')](handleError(_0x2bd344,null));};exports['addSmsInteractions']=function(_0x2194fd,_0x1c424a){return db['User']['find']({'where':{'id':_0x2194fd['params']['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x1c424a,null))[_0xdde3('0x21')](function(_0x3046aa){if(_0x3046aa){return _0x3046aa[_0xdde3('0x12b')](_0x2194fd['body'][_0xdde3('0x63')],_[_0xdde3('0x64')](_0x2194fd['body'],[_0xdde3('0x63'),'id'])||{})['spread'](function(){for(var _0x1a9b4b=0x0;_0x1a9b4b<_0x2194fd[_0xdde3('0x5f')]['ids']['length'];_0x1a9b4b+=0x1){socket[_0xdde3('0x2d')](_0xdde3('0x12c'),{'SmsInteractionId':Number(_0x2194fd[_0xdde3('0x5f')][_0xdde3('0x63')][_0x1a9b4b]),'UserId':Number(_0x2194fd[_0xdde3('0x5c')]['id'])});}return _0x2194fd[_0xdde3('0x5f')][_0xdde3('0x63')];});}})[_0xdde3('0x21')](respondWithResult(_0x1c424a,null))[_0xdde3('0x5a')](handleError(_0x1c424a,null));};exports[_0xdde3('0x12d')]=function(_0x473707,_0x1f4910){return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x473707['params']['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x1f4910,null))['then'](function(_0x247c2d){if(_0x247c2d){return _0x247c2d['removeSmsInteractions'](_0x473707[_0xdde3('0x4b')][_0xdde3('0x63')])[_0xdde3('0x21')](function(){if(_[_0xdde3('0xb1')](_0x473707[_0xdde3('0x4b')][_0xdde3('0x63')])){for(var _0x2a127c=0x0;_0x2a127c<_0x473707[_0xdde3('0x4b')][_0xdde3('0x63')][_0xdde3('0x6e')];_0x2a127c+=0x1){socket[_0xdde3('0x2d')](_0xdde3('0x12e'),{'SmsInteractionId':Number(_0x473707['query']['ids'][_0x2a127c]),'UserId':Number(_0x473707['params']['id'])});}}else{socket['emit'](_0xdde3('0x12e'),{'SmsInteractionId':Number(_0x473707[_0xdde3('0x4b')]['ids']),'UserId':Number(_0x473707['params']['id'])});}});}})[_0xdde3('0x21')](respondWithStatusCode(_0x1f4910,null))[_0xdde3('0x5a')](handleError(_0x1f4910,null));};exports[_0xdde3('0x12f')]=function(_0xeeea79,_0x2b4746){return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0xeeea79[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x2b4746,null))['then'](function(_0x4cccea){if(_0x4cccea){return _0x4cccea[_0xdde3('0x12f')](_0xeeea79[_0xdde3('0x5f')][_0xdde3('0x63')],_[_0xdde3('0x64')](_0xeeea79[_0xdde3('0x5f')],['ids','id'])||{})['spread'](function(){for(var _0x39debe=0x0;_0x39debe<_0xeeea79[_0xdde3('0x5f')][_0xdde3('0x63')][_0xdde3('0x6e')];_0x39debe+=0x1){socket[_0xdde3('0x2d')](_0xdde3('0x130'),{'OpenchannelInteractionId':Number(_0xeeea79[_0xdde3('0x5f')][_0xdde3('0x63')][_0x39debe]),'UserId':Number(_0xeeea79[_0xdde3('0x5c')]['id'])});}return _0xeeea79[_0xdde3('0x5f')][_0xdde3('0x63')];});}})[_0xdde3('0x21')](respondWithResult(_0x2b4746,null))[_0xdde3('0x5a')](handleError(_0x2b4746,null));};exports['removeOpenchannelInteractions']=function(_0x3a7473,_0x3b1c3e){return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x3a7473[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x3b1c3e,null))['then'](function(_0x5b7a10){if(_0x5b7a10){return _0x5b7a10[_0xdde3('0x131')](_0x3a7473[_0xdde3('0x4b')][_0xdde3('0x63')])[_0xdde3('0x21')](function(){if(_[_0xdde3('0xb1')](_0x3a7473['query'][_0xdde3('0x63')])){for(var _0x18746c=0x0;_0x18746c<_0x3a7473['query'][_0xdde3('0x63')]['length'];_0x18746c+=0x1){socket[_0xdde3('0x2d')]('user_has_openchannel_interactions:remove',{'OpenchannelInteractionId':Number(_0x3a7473[_0xdde3('0x4b')][_0xdde3('0x63')][_0x18746c]),'UserId':Number(_0x3a7473['params']['id'])});}}else{socket[_0xdde3('0x2d')](_0xdde3('0x132'),{'OpenchannelInteractionId':Number(_0x3a7473['query'][_0xdde3('0x63')]),'UserId':Number(_0x3a7473[_0xdde3('0x5c')]['id'])});}});}})['then'](respondWithStatusCode(_0x3b1c3e,null))[_0xdde3('0x5a')](handleError(_0x3b1c3e,null));};exports['addWhatsappInteractions']=function(_0x49ea4e,_0x4b0be4){return db[_0xdde3('0x48')]['find']({'where':{'id':_0x49ea4e[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x4b0be4,null))['then'](function(_0x266048){if(_0x266048){return _0x266048['addWhatsappInteractions'](_0x49ea4e[_0xdde3('0x5f')]['ids'],_[_0xdde3('0x64')](_0x49ea4e[_0xdde3('0x5f')],[_0xdde3('0x63'),'id'])||{})[_0xdde3('0xa8')](function(){for(var _0x1d7809=0x0;_0x1d7809<_0x49ea4e['body'][_0xdde3('0x63')]['length'];_0x1d7809+=0x1){socket[_0xdde3('0x2d')](_0xdde3('0x133'),{'WhatsappInteractionId':Number(_0x49ea4e['body']['ids'][_0x1d7809]),'UserId':Number(_0x49ea4e[_0xdde3('0x5c')]['id'])});}return _0x49ea4e[_0xdde3('0x5f')][_0xdde3('0x63')];});}})[_0xdde3('0x21')](respondWithResult(_0x4b0be4,null))[_0xdde3('0x5a')](handleError(_0x4b0be4,null));};exports[_0xdde3('0x134')]=function(_0x1b9961,_0x2fb785){return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x1b9961[_0xdde3('0x5c')]['id']}})['then'](handleEntityNotFound(_0x2fb785,null))[_0xdde3('0x21')](function(_0x2e4e35){if(_0x2e4e35){return _0x2e4e35[_0xdde3('0x134')](_0x1b9961[_0xdde3('0x4b')][_0xdde3('0x63')]);}})[_0xdde3('0x21')](respondWithStatusCode(_0x2fb785,null))[_0xdde3('0x5a')](handleError(_0x2fb785,null));};exports[_0xdde3('0x135')]=function(_0xae070b,_0x127907){var _0x3b4d67={};var _0x3eca68={};var _0x7db134;var _0x1f3324;return db[_0xdde3('0x48')][_0xdde3('0x97')]({'where':{'id':_0xae070b['params']['id']}})['then'](handleEntityNotFound(_0x127907,null))[_0xdde3('0x21')](function(_0x10da3a){if(_0x10da3a){_0x7db134=_0x10da3a;_0x3eca68[_0xdde3('0xcd')]=_[_0xdde3('0xce')](db[_0xdde3('0x136')][_0xdde3('0x3e')]);_0x3eca68[_0xdde3('0x4b')]=_[_0xdde3('0xce')](_0xae070b[_0xdde3('0x4b')]);_0x3eca68['filters']=_[_0xdde3('0xd8')](_0x3eca68[_0xdde3('0xcd')],_0x3eca68['query']);_0x3b4d67[_0xdde3('0x4f')]=_[_0xdde3('0xd8')](_0x3eca68[_0xdde3('0xcd')],qs['fields'](_0xae070b[_0xdde3('0x4b')][_0xdde3('0xd1')]));_0x3b4d67[_0xdde3('0x4f')]=_0x3b4d67[_0xdde3('0x4f')]['length']?_0x3b4d67['attributes']:_0x3eca68[_0xdde3('0xcd')];_0x3b4d67[_0xdde3('0xd2')]=qs[_0xdde3('0xd3')](_0xae070b['query'][_0xdde3('0xd3')]);_0x3b4d67['where']=qs[_0xdde3('0xd0')](_[_0xdde3('0xd5')](_0xae070b[_0xdde3('0x4b')],_0x3eca68['filters']));if(_0xae070b[_0xdde3('0x4b')][_0xdde3('0x41')]){_0x3b4d67[_0xdde3('0xd4')]=_[_0xdde3('0xd6')](_0x3b4d67['where'],{'$or':_[_0xdde3('0x35')](_0x3b4d67[_0xdde3('0x4f')],function(_0xadcd88){var _0x5e3a59={};_0x5e3a59[_0xadcd88]={'$like':'%'+_0xae070b['query'][_0xdde3('0x41')]+'%'};return _0x5e3a59;})});}_0x3b4d67=_['merge']({},_0x3b4d67,_0xae070b['options']);return _0x7db134[_0xdde3('0x135')](_0x3b4d67);}})[_0xdde3('0x21')](function(_0x335c4e){if(_0x335c4e){_0x1f3324=_0x335c4e[_0xdde3('0x6e')];if(!_0xae070b[_0xdde3('0x4b')]['hasOwnProperty'](_0xdde3('0xd7'))){_0x3b4d67[_0xdde3('0x1c')]=qs[_0xdde3('0x1c')](_0xae070b[_0xdde3('0x4b')][_0xdde3('0x1c')]);_0x3b4d67[_0xdde3('0x1b')]=qs['offset'](_0xae070b[_0xdde3('0x4b')][_0xdde3('0x1b')]);}return _0x7db134['getVoicePrefixes'](_0x3b4d67);}})[_0xdde3('0x21')](function(_0x461525){if(_0x461525){return _0x461525?{'count':_0x1f3324,'rows':_0x461525}:null;}})[_0xdde3('0x21')](respondWithResult(_0x127907,null))[_0xdde3('0x5a')](handleError(_0x127907,null));};exports[_0xdde3('0x137')]=function(_0x18d520,_0x177f27){var _0x411e8f={};var _0x498c1b={};var _0x2e50e2;var _0x2f1541;return db['User']['findOne']({'where':{'id':_0x18d520[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x177f27,null))['then'](function(_0x303eb1){if(_0x303eb1){_0x2e50e2=_0x303eb1;_0x498c1b[_0xdde3('0xcd')]=_[_0xdde3('0xce')](db['FaxAccount'][_0xdde3('0x3e')]);_0x498c1b[_0xdde3('0x4b')]=_[_0xdde3('0xce')](_0x18d520[_0xdde3('0x4b')]);_0x498c1b[_0xdde3('0xd0')]=_[_0xdde3('0xd8')](_0x498c1b[_0xdde3('0xcd')],_0x498c1b[_0xdde3('0x4b')]);_0x411e8f[_0xdde3('0x4f')]=_['intersection'](_0x498c1b[_0xdde3('0xcd')],qs['fields'](_0x18d520[_0xdde3('0x4b')][_0xdde3('0xd1')]));_0x411e8f['attributes']=_0x411e8f[_0xdde3('0x4f')][_0xdde3('0x6e')]?_0x411e8f[_0xdde3('0x4f')]:_0x498c1b[_0xdde3('0xcd')];_0x411e8f[_0xdde3('0xd2')]=qs['sort'](_0x18d520['query']['sort']);_0x411e8f[_0xdde3('0xd4')]=qs[_0xdde3('0xd0')](_[_0xdde3('0xd5')](_0x18d520['query'],_0x498c1b['filters']));if(_0x18d520[_0xdde3('0x4b')][_0xdde3('0x41')]){_0x411e8f[_0xdde3('0xd4')]=_[_0xdde3('0xd6')](_0x411e8f['where'],{'$or':_[_0xdde3('0x35')](_0x411e8f[_0xdde3('0x4f')],function(_0x443f0e){var _0x11386e={};_0x11386e[_0x443f0e]={'$like':'%'+_0x18d520[_0xdde3('0x4b')][_0xdde3('0x41')]+'%'};return _0x11386e;})});}_0x411e8f=_[_0xdde3('0xd6')]({},_0x411e8f,_0x18d520[_0xdde3('0x5d')]);return _0x2e50e2[_0xdde3('0x137')](_0x411e8f);}})['then'](function(_0x4f7097){if(_0x4f7097){_0x2f1541=_0x4f7097[_0xdde3('0x6e')];if(!_0x18d520['query'][_0xdde3('0xc8')](_0xdde3('0xd7'))){_0x411e8f['limit']=qs[_0xdde3('0x1c')](_0x18d520[_0xdde3('0x4b')][_0xdde3('0x1c')]);_0x411e8f[_0xdde3('0x1b')]=qs[_0xdde3('0x1b')](_0x18d520['query'][_0xdde3('0x1b')]);}return _0x2e50e2[_0xdde3('0x137')](_0x411e8f);}})[_0xdde3('0x21')](function(_0x2d373a){if(_0x2d373a){return _0x2d373a?{'count':_0x2f1541,'rows':_0x2d373a}:null;}})[_0xdde3('0x21')](respondWithResult(_0x177f27,null))[_0xdde3('0x5a')](handleError(_0x177f27,null));};exports[_0xdde3('0x138')]=function(_0x22baef,_0x4d6507){return db[_0xdde3('0x48')]['find']({'where':{'id':_0x22baef[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x4d6507,null))['then'](function(_0x4cab01){if(_0x4cab01){return _0x4cab01[_0xdde3('0x138')](_0x22baef[_0xdde3('0x5f')][_0xdde3('0x63')],_['omit'](_0x22baef['body'],[_0xdde3('0x63'),'id'])||{});}})[_0xdde3('0x21')](respondWithResult(_0x4d6507,null))[_0xdde3('0x5a')](handleError(_0x4d6507,null));};exports[_0xdde3('0x139')]=function(_0xe06642,_0x341fba){return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0xe06642['params']['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x341fba,null))[_0xdde3('0x21')](function(_0x4f6a23){if(_0x4f6a23){return _0x4f6a23[_0xdde3('0x139')](_0xe06642[_0xdde3('0x4b')][_0xdde3('0x63')]);}})[_0xdde3('0x21')](respondWithStatusCode(_0x341fba,null))[_0xdde3('0x5a')](handleError(_0x341fba,null));};exports[_0xdde3('0x13a')]=function(_0x253785,_0x4a8c13){var _0x30811f={};var _0x3852ac={};var _0x1aa59f;var _0x45e28d;return db['User']['findOne']({'where':{'id':_0x253785['params']['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x4a8c13,null))[_0xdde3('0x21')](function(_0x3bbc0f){if(_0x3bbc0f){_0x1aa59f=_0x3bbc0f;_0x3852ac['model']=_[_0xdde3('0xce')](db[_0xdde3('0x13b')][_0xdde3('0x3e')]);_0x3852ac[_0xdde3('0x4b')]=_[_0xdde3('0xce')](_0x253785[_0xdde3('0x4b')]);_0x3852ac[_0xdde3('0xd0')]=_[_0xdde3('0xd8')](_0x3852ac[_0xdde3('0xcd')],_0x3852ac[_0xdde3('0x4b')]);_0x30811f[_0xdde3('0x4f')]=_[_0xdde3('0xd8')](_0x3852ac['model'],qs['fields'](_0x253785[_0xdde3('0x4b')][_0xdde3('0xd1')]));_0x30811f[_0xdde3('0x4f')]=_0x30811f[_0xdde3('0x4f')][_0xdde3('0x6e')]?_0x30811f[_0xdde3('0x4f')]:_0x3852ac[_0xdde3('0xcd')];_0x30811f['order']=qs[_0xdde3('0xd3')](_0x253785[_0xdde3('0x4b')][_0xdde3('0xd3')]);_0x30811f[_0xdde3('0xd4')]=qs[_0xdde3('0xd0')](_['pick'](_0x253785['query'],_0x3852ac[_0xdde3('0xd0')]));if(_0x253785[_0xdde3('0x4b')][_0xdde3('0x41')]){_0x30811f[_0xdde3('0xd4')]=_['merge'](_0x30811f['where'],{'$or':_[_0xdde3('0x35')](_0x30811f['attributes'],function(_0x49b7d0){var _0x11e7ea={};_0x11e7ea[_0x49b7d0]={'$like':'%'+_0x253785['query'][_0xdde3('0x41')]+'%'};return _0x11e7ea;})});}_0x30811f=_[_0xdde3('0xd6')]({},_0x30811f,_0x253785[_0xdde3('0x5d')]);return _0x1aa59f[_0xdde3('0x13a')](_0x30811f);}})['then'](function(_0x1be35a){if(_0x1be35a){_0x45e28d=_0x1be35a[_0xdde3('0x6e')];if(!_0x253785[_0xdde3('0x4b')][_0xdde3('0xc8')](_0xdde3('0xd7'))){_0x30811f[_0xdde3('0x1c')]=qs[_0xdde3('0x1c')](_0x253785[_0xdde3('0x4b')][_0xdde3('0x1c')]);_0x30811f[_0xdde3('0x1b')]=qs['offset'](_0x253785[_0xdde3('0x4b')][_0xdde3('0x1b')]);}return _0x1aa59f[_0xdde3('0x13a')](_0x30811f);}})[_0xdde3('0x21')](function(_0x32f9e2){if(_0x32f9e2){return _0x32f9e2?{'count':_0x45e28d,'rows':_0x32f9e2}:null;}})[_0xdde3('0x21')](respondWithResult(_0x4a8c13,null))[_0xdde3('0x5a')](handleError(_0x4a8c13,null));};exports[_0xdde3('0x13c')]=function(_0x2fe5e4,_0x27a18b){return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x2fe5e4[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x27a18b,null))[_0xdde3('0x21')](function(_0x201168){if(_0x201168){return _0x201168[_0xdde3('0x13c')](_0x2fe5e4[_0xdde3('0x5f')][_0xdde3('0x63')],_[_0xdde3('0x64')](_0x2fe5e4[_0xdde3('0x5f')],[_0xdde3('0x63'),'id'])||{});}})['then'](respondWithResult(_0x27a18b,null))[_0xdde3('0x5a')](handleError(_0x27a18b,null));};exports[_0xdde3('0x13d')]=function(_0x431b57,_0x27eb22){return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x431b57[_0xdde3('0x5c')]['id']}})['then'](handleEntityNotFound(_0x27eb22,null))[_0xdde3('0x21')](function(_0x4fd3c4){if(_0x4fd3c4){return _0x4fd3c4[_0xdde3('0x13d')](_0x431b57[_0xdde3('0x4b')]['ids']);}})[_0xdde3('0x21')](respondWithStatusCode(_0x27eb22,null))[_0xdde3('0x5a')](handleError(_0x27eb22,null));};exports[_0xdde3('0x13e')]=function(_0x27bef1,_0x5635e1){var _0x454614={};var _0x16c355={};var _0x2747e7;var _0x2c79e7;return db[_0xdde3('0x48')][_0xdde3('0x97')]({'where':{'id':_0x27bef1[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x5635e1,null))[_0xdde3('0x21')](function(_0x576c01){if(_0x576c01){_0x2747e7=_0x576c01;_0x16c355[_0xdde3('0xcd')]=_[_0xdde3('0xce')](db['OpenchannelAccount']['rawAttributes']);_0x16c355[_0xdde3('0x4b')]=_[_0xdde3('0xce')](_0x27bef1[_0xdde3('0x4b')]);_0x16c355[_0xdde3('0xd0')]=_[_0xdde3('0xd8')](_0x16c355['model'],_0x16c355[_0xdde3('0x4b')]);_0x454614[_0xdde3('0x4f')]=_[_0xdde3('0xd8')](_0x16c355[_0xdde3('0xcd')],qs[_0xdde3('0xd1')](_0x27bef1[_0xdde3('0x4b')][_0xdde3('0xd1')]));_0x454614[_0xdde3('0x4f')]=_0x454614[_0xdde3('0x4f')][_0xdde3('0x6e')]?_0x454614[_0xdde3('0x4f')]:_0x16c355['model'];_0x454614[_0xdde3('0xd2')]=qs[_0xdde3('0xd3')](_0x27bef1[_0xdde3('0x4b')][_0xdde3('0xd3')]);_0x454614[_0xdde3('0xd4')]=qs[_0xdde3('0xd0')](_[_0xdde3('0xd5')](_0x27bef1[_0xdde3('0x4b')],_0x16c355['filters']));if(_0x27bef1[_0xdde3('0x4b')][_0xdde3('0x41')]){_0x454614[_0xdde3('0xd4')]=_[_0xdde3('0xd6')](_0x454614[_0xdde3('0xd4')],{'$or':_['map'](_0x454614[_0xdde3('0x4f')],function(_0x3feac2){var _0x4f9d09={};_0x4f9d09[_0x3feac2]={'$like':'%'+_0x27bef1[_0xdde3('0x4b')][_0xdde3('0x41')]+'%'};return _0x4f9d09;})});}_0x454614=_[_0xdde3('0xd6')]({},_0x454614,_0x27bef1[_0xdde3('0x5d')]);return _0x2747e7['getOpenchannelAccounts'](_0x454614);}})['then'](function(_0xbab288){if(_0xbab288){_0x2c79e7=_0xbab288[_0xdde3('0x6e')];if(!_0x27bef1[_0xdde3('0x4b')][_0xdde3('0xc8')]('nolimit')){_0x454614[_0xdde3('0x1c')]=qs[_0xdde3('0x1c')](_0x27bef1[_0xdde3('0x4b')]['limit']);_0x454614[_0xdde3('0x1b')]=qs['offset'](_0x27bef1[_0xdde3('0x4b')][_0xdde3('0x1b')]);}return _0x2747e7[_0xdde3('0x13e')](_0x454614);}})[_0xdde3('0x21')](function(_0x30aae8){if(_0x30aae8){return _0x30aae8?{'count':_0x2c79e7,'rows':_0x30aae8}:null;}})[_0xdde3('0x21')](respondWithResult(_0x5635e1,null))[_0xdde3('0x5a')](handleError(_0x5635e1,null));};exports[_0xdde3('0x13f')]=function(_0x6ce321,_0x56305d){return db['User'][_0xdde3('0x60')]({'where':{'id':_0x6ce321['params']['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x56305d,null))['then'](function(_0x2eafa0){if(_0x2eafa0){return _0x2eafa0[_0xdde3('0x13f')](_0x6ce321[_0xdde3('0x5f')][_0xdde3('0x63')],_[_0xdde3('0x64')](_0x6ce321['body'],[_0xdde3('0x63'),'id'])||{});}})[_0xdde3('0x21')](respondWithResult(_0x56305d,null))['catch'](handleError(_0x56305d,null));};exports[_0xdde3('0x140')]=function(_0x23b308,_0x5a834a){return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x23b308['params']['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x5a834a,null))[_0xdde3('0x21')](function(_0x3433d2){if(_0x3433d2){return _0x3433d2['removeOpenchannelAccounts'](_0x23b308['query']['ids']);}})[_0xdde3('0x21')](respondWithStatusCode(_0x5a834a,null))[_0xdde3('0x5a')](handleError(_0x5a834a,null));};exports[_0xdde3('0x141')]=function(_0x745811,_0x37e5f0){var _0x511f75={};var _0x27522d={};var _0x3ae7bb;var _0x397dda;return db[_0xdde3('0x48')][_0xdde3('0x97')]({'where':{'id':_0x745811['params']['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x37e5f0,null))[_0xdde3('0x21')](function(_0x21b23c){if(_0x21b23c){_0x3ae7bb=_0x21b23c;_0x27522d[_0xdde3('0xcd')]=_[_0xdde3('0xce')](db[_0xdde3('0x142')][_0xdde3('0x3e')]);_0x27522d[_0xdde3('0x4b')]=_[_0xdde3('0xce')](_0x745811[_0xdde3('0x4b')]);_0x27522d[_0xdde3('0xd0')]=_['intersection'](_0x27522d[_0xdde3('0xcd')],_0x27522d[_0xdde3('0x4b')]);_0x511f75[_0xdde3('0x4f')]=_[_0xdde3('0xd8')](_0x27522d[_0xdde3('0xcd')],qs[_0xdde3('0xd1')](_0x745811[_0xdde3('0x4b')][_0xdde3('0xd1')]));_0x511f75[_0xdde3('0x4f')]=_0x511f75[_0xdde3('0x4f')][_0xdde3('0x6e')]?_0x511f75[_0xdde3('0x4f')]:_0x27522d[_0xdde3('0xcd')];_0x511f75[_0xdde3('0xd2')]=qs[_0xdde3('0xd3')](_0x745811['query'][_0xdde3('0xd3')]);_0x511f75['where']=qs[_0xdde3('0xd0')](_[_0xdde3('0xd5')](_0x745811[_0xdde3('0x4b')],_0x27522d[_0xdde3('0xd0')]));if(_0x745811['query']['filter']){_0x511f75[_0xdde3('0xd4')]=_[_0xdde3('0xd6')](_0x511f75[_0xdde3('0xd4')],{'$or':_['map'](_0x511f75['attributes'],function(_0x56355b){var _0x48851a={};_0x48851a[_0x56355b]={'$like':'%'+_0x745811[_0xdde3('0x4b')]['filter']+'%'};return _0x48851a;})});}_0x511f75=_[_0xdde3('0xd6')]({},_0x511f75,_0x745811[_0xdde3('0x5d')]);return _0x3ae7bb[_0xdde3('0x141')](_0x511f75);}})['then'](function(_0x2e2a16){if(_0x2e2a16){_0x397dda=_0x2e2a16['length'];if(!_0x745811[_0xdde3('0x4b')][_0xdde3('0xc8')](_0xdde3('0xd7'))){_0x511f75[_0xdde3('0x1c')]=qs[_0xdde3('0x1c')](_0x745811[_0xdde3('0x4b')][_0xdde3('0x1c')]);_0x511f75['offset']=qs['offset'](_0x745811[_0xdde3('0x4b')][_0xdde3('0x1b')]);}return _0x3ae7bb['getSmsAccounts'](_0x511f75);}})[_0xdde3('0x21')](function(_0x592e90){if(_0x592e90){return _0x592e90?{'count':_0x397dda,'rows':_0x592e90}:null;}})[_0xdde3('0x21')](respondWithResult(_0x37e5f0,null))[_0xdde3('0x5a')](handleError(_0x37e5f0,null));};exports['addSmsAccounts']=function(_0x8ee053,_0x49ce5e){return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x8ee053[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x49ce5e,null))[_0xdde3('0x21')](function(_0x170141){if(_0x170141){return _0x170141[_0xdde3('0x143')](_0x8ee053[_0xdde3('0x5f')][_0xdde3('0x63')],_[_0xdde3('0x64')](_0x8ee053[_0xdde3('0x5f')],['ids','id'])||{});}})[_0xdde3('0x21')](respondWithResult(_0x49ce5e,null))[_0xdde3('0x5a')](handleError(_0x49ce5e,null));};exports[_0xdde3('0x144')]=function(_0x157865,_0x168541){return db['User']['find']({'where':{'id':_0x157865[_0xdde3('0x5c')]['id']}})['then'](handleEntityNotFound(_0x168541,null))[_0xdde3('0x21')](function(_0xc18310){if(_0xc18310){return _0xc18310[_0xdde3('0x144')](_0x157865[_0xdde3('0x4b')][_0xdde3('0x63')]);}})[_0xdde3('0x21')](respondWithStatusCode(_0x168541,null))[_0xdde3('0x5a')](handleError(_0x168541,null));};exports[_0xdde3('0x145')]=function(_0xfb19b5,_0x33606b){var _0x30ae85={};var _0x1ea332={};var _0x2ccd66;var _0x212b92;return db[_0xdde3('0x48')][_0xdde3('0x97')]({'where':{'id':_0xfb19b5[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x33606b,null))['then'](function(_0x577ce2){if(_0x577ce2){_0x2ccd66=_0x577ce2;_0x1ea332['model']=_[_0xdde3('0xce')](db[_0xdde3('0x146')][_0xdde3('0x3e')]);_0x1ea332['query']=_[_0xdde3('0xce')](_0xfb19b5['query']);_0x1ea332['filters']=_[_0xdde3('0xd8')](_0x1ea332[_0xdde3('0xcd')],_0x1ea332[_0xdde3('0x4b')]);_0x30ae85['attributes']=_[_0xdde3('0xd8')](_0x1ea332[_0xdde3('0xcd')],qs['fields'](_0xfb19b5[_0xdde3('0x4b')][_0xdde3('0xd1')]));_0x30ae85[_0xdde3('0x4f')]=_0x30ae85[_0xdde3('0x4f')][_0xdde3('0x6e')]?_0x30ae85[_0xdde3('0x4f')]:_0x1ea332[_0xdde3('0xcd')];_0x30ae85[_0xdde3('0xd2')]=qs[_0xdde3('0xd3')](_0xfb19b5[_0xdde3('0x4b')][_0xdde3('0xd3')]);_0x30ae85[_0xdde3('0xd4')]=qs[_0xdde3('0xd0')](_[_0xdde3('0xd5')](_0xfb19b5['query'],_0x1ea332['filters']));if(_0xfb19b5[_0xdde3('0x4b')][_0xdde3('0x41')]){_0x30ae85[_0xdde3('0xd4')]=_['merge'](_0x30ae85[_0xdde3('0xd4')],{'$or':_[_0xdde3('0x35')](_0x30ae85[_0xdde3('0x4f')],function(_0x4c2ae5){var _0x276e12={};_0x276e12[_0x4c2ae5]={'$like':'%'+_0xfb19b5[_0xdde3('0x4b')][_0xdde3('0x41')]+'%'};return _0x276e12;})});}_0x30ae85=_[_0xdde3('0xd6')]({},_0x30ae85,_0xfb19b5[_0xdde3('0x5d')]);return _0x2ccd66[_0xdde3('0x145')](_0x30ae85);}})[_0xdde3('0x21')](function(_0x2f7405){if(_0x2f7405){_0x212b92=_0x2f7405[_0xdde3('0x6e')];if(!_0xfb19b5['query'][_0xdde3('0xc8')]('nolimit')){_0x30ae85[_0xdde3('0x1c')]=qs[_0xdde3('0x1c')](_0xfb19b5[_0xdde3('0x4b')][_0xdde3('0x1c')]);_0x30ae85['offset']=qs[_0xdde3('0x1b')](_0xfb19b5['query'][_0xdde3('0x1b')]);}return _0x2ccd66[_0xdde3('0x145')](_0x30ae85);}})[_0xdde3('0x21')](function(_0x9e3cb5){if(_0x9e3cb5){return _0x9e3cb5?{'count':_0x212b92,'rows':_0x9e3cb5}:null;}})['then'](respondWithResult(_0x33606b,null))[_0xdde3('0x5a')](handleError(_0x33606b,null));};exports[_0xdde3('0x147')]=function(_0x37b581,_0x392356){return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x37b581[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x392356,null))[_0xdde3('0x21')](function(_0x1c827a){if(_0x1c827a){return _0x1c827a[_0xdde3('0x147')](_0x37b581[_0xdde3('0x5f')]['ids'],_[_0xdde3('0x64')](_0x37b581[_0xdde3('0x5f')],[_0xdde3('0x63'),'id'])||{});}})[_0xdde3('0x21')](respondWithResult(_0x392356,null))[_0xdde3('0x5a')](handleError(_0x392356,null));};exports[_0xdde3('0x148')]=function(_0x3b261d,_0x1eb496){return db[_0xdde3('0x48')]['find']({'where':{'id':_0x3b261d[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0x1eb496,null))['then'](function(_0x3b7340){if(_0x3b7340){return _0x3b7340['removeChatWebsites'](_0x3b261d[_0xdde3('0x4b')][_0xdde3('0x63')]);}})[_0xdde3('0x21')](respondWithStatusCode(_0x1eb496,null))[_0xdde3('0x5a')](handleError(_0x1eb496,null));};exports['getWhatsappAccounts']=function(_0x2fdf47,_0x3cb326){var _0x56db82={};var _0x5a71fc={};var _0x12e8d4;var _0x4ce32d;return db[_0xdde3('0x48')][_0xdde3('0x97')]({'where':{'id':_0x2fdf47[_0xdde3('0x5c')]['id']}})['then'](handleEntityNotFound(_0x3cb326,null))[_0xdde3('0x21')](function(_0x3fb7ff){if(_0x3fb7ff){_0x12e8d4=_0x3fb7ff;_0x5a71fc[_0xdde3('0xcd')]=_['keys'](db['WhatsappAccount']['rawAttributes']);_0x5a71fc['query']=_[_0xdde3('0xce')](_0x2fdf47[_0xdde3('0x4b')]);_0x5a71fc[_0xdde3('0xd0')]=_['intersection'](_0x5a71fc[_0xdde3('0xcd')],_0x5a71fc[_0xdde3('0x4b')]);_0x56db82['attributes']=_[_0xdde3('0xd8')](_0x5a71fc[_0xdde3('0xcd')],qs[_0xdde3('0xd1')](_0x2fdf47['query'][_0xdde3('0xd1')]));_0x56db82[_0xdde3('0x4f')]=_0x56db82[_0xdde3('0x4f')]['length']?_0x56db82['attributes']:_0x5a71fc[_0xdde3('0xcd')];_0x56db82[_0xdde3('0xd2')]=qs[_0xdde3('0xd3')](_0x2fdf47['query'][_0xdde3('0xd3')]);_0x56db82[_0xdde3('0xd4')]=qs['filters'](_[_0xdde3('0xd5')](_0x2fdf47[_0xdde3('0x4b')],_0x5a71fc[_0xdde3('0xd0')]));if(_0x2fdf47[_0xdde3('0x4b')][_0xdde3('0x41')]){_0x56db82[_0xdde3('0xd4')]=_[_0xdde3('0xd6')](_0x56db82['where'],{'$or':_[_0xdde3('0x35')](_0x56db82['attributes'],function(_0x63d211){var _0x54660d={};_0x54660d[_0x63d211]={'$like':'%'+_0x2fdf47[_0xdde3('0x4b')][_0xdde3('0x41')]+'%'};return _0x54660d;})});}_0x56db82=_[_0xdde3('0xd6')]({},_0x56db82,_0x2fdf47['options']);return _0x12e8d4['getWhatsappAccounts'](_0x56db82);}})[_0xdde3('0x21')](function(_0x122adf){if(_0x122adf){_0x4ce32d=_0x122adf[_0xdde3('0x6e')];if(!_0x2fdf47[_0xdde3('0x4b')][_0xdde3('0xc8')](_0xdde3('0xd7'))){_0x56db82['limit']=qs[_0xdde3('0x1c')](_0x2fdf47[_0xdde3('0x4b')][_0xdde3('0x1c')]);_0x56db82[_0xdde3('0x1b')]=qs['offset'](_0x2fdf47[_0xdde3('0x4b')][_0xdde3('0x1b')]);}return _0x12e8d4[_0xdde3('0x149')](_0x56db82);}})[_0xdde3('0x21')](function(_0xe64b88){if(_0xe64b88){return _0xe64b88?{'count':_0x4ce32d,'rows':_0xe64b88}:null;}})['then'](respondWithResult(_0x3cb326,null))[_0xdde3('0x5a')](handleError(_0x3cb326,null));};exports['addWhatsappAccounts']=function(_0x355b87,_0xa5446c){return db[_0xdde3('0x48')]['find']({'where':{'id':_0x355b87[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0xa5446c,null))[_0xdde3('0x21')](function(_0x4414c3){if(_0x4414c3){return _0x4414c3[_0xdde3('0x14a')](_0x355b87[_0xdde3('0x5f')][_0xdde3('0x63')],_[_0xdde3('0x64')](_0x355b87[_0xdde3('0x5f')],[_0xdde3('0x63'),'id'])||{});}})[_0xdde3('0x21')](respondWithResult(_0xa5446c,null))[_0xdde3('0x5a')](handleError(_0xa5446c,null));};exports[_0xdde3('0x14b')]=function(_0x3ef615,_0x4dc47a){return db[_0xdde3('0x48')][_0xdde3('0x60')]({'where':{'id':_0x3ef615[_0xdde3('0x5c')]['id']}})['then'](handleEntityNotFound(_0x4dc47a,null))['then'](function(_0x33c407){if(_0x33c407){return _0x33c407[_0xdde3('0x14b')](_0x3ef615[_0xdde3('0x4b')][_0xdde3('0x63')]);}})[_0xdde3('0x21')](respondWithStatusCode(_0x4dc47a,null))[_0xdde3('0x5a')](handleError(_0x4dc47a,null));};exports[_0xdde3('0x14c')]=function(_0x4d6cb2,_0x140942){var _0x69ad28={},_0x18b0b9={},_0x1e3d9a={'count':0x0,'rows':[]};var _0x383717=db[_0xdde3('0x11f')][_0xdde3('0x3e')];_0x18b0b9[_0xdde3('0xcd')]=_[_0xdde3('0xce')](_0x383717);_0x18b0b9[_0xdde3('0x4b')]=_[_0xdde3('0xce')](_0x4d6cb2['query']);_0x18b0b9[_0xdde3('0xd0')]=_[_0xdde3('0xd8')](_0x18b0b9[_0xdde3('0xcd')],_0x18b0b9['query']);_0x18b0b9[_0xdde3('0xd0')]=_['concat'](_0x18b0b9[_0xdde3('0xd0')],[_0xdde3('0x14d'),'$or',_0xdde3('0x14e'),'$gte',_0xdde3('0x14f'),_0xdde3('0x150'),_0xdde3('0x151'),_0xdde3('0x152'),'$not',_0xdde3('0x153'),_0xdde3('0x154'),'$in',_0xdde3('0x155'),_0xdde3('0x156'),_0xdde3('0x157'),_0xdde3('0x158'),_0xdde3('0x159'),_0xdde3('0x156'),'$overlap',_0xdde3('0x15a'),'$contained',_0xdde3('0x15b')]);_0x69ad28[_0xdde3('0x4f')]=_[_0xdde3('0xd8')](_0x18b0b9['model'],qs[_0xdde3('0xd1')](_0x4d6cb2['query'][_0xdde3('0xd1')]));_0x69ad28['attributes']=_0x69ad28[_0xdde3('0x4f')][_0xdde3('0x6e')]?_0x69ad28[_0xdde3('0x4f')]:_0x18b0b9[_0xdde3('0xcd')];if(!_0x4d6cb2['query']['hasOwnProperty']('nolimit')){_0x69ad28[_0xdde3('0x1c')]=qs[_0xdde3('0x1c')](_0x4d6cb2[_0xdde3('0x4b')]['limit']);_0x69ad28[_0xdde3('0x1b')]=qs['offset'](_0x4d6cb2[_0xdde3('0x4b')][_0xdde3('0x1b')]);}_0x69ad28['order']=qs[_0xdde3('0xd3')](_0x4d6cb2['query'][_0xdde3('0xd3')]);_0x69ad28[_0xdde3('0xd4')]=qs[_0xdde3('0xd0')](_['pick'](_0x4d6cb2['query'],_0x18b0b9[_0xdde3('0xd0')]));if(_0x4d6cb2[_0xdde3('0x4b')]['filter']){_0x69ad28[_0xdde3('0xd4')]=_[_0xdde3('0xd6')](_0x69ad28[_0xdde3('0xd4')],{'$or':_[_0xdde3('0x35')](_0x69ad28['attributes'],function(_0x288e8d){var _0x1e5ea5={};_0x1e5ea5[_0x288e8d]={'$like':'%'+_0x4d6cb2['query'][_0xdde3('0x41')]+'%'};return _0x1e5ea5;})});}_0x69ad28[_0xdde3('0xd4')]={'$and':[_0x69ad28[_0xdde3('0xd4')],{'$or':[{'UserId':_0x4d6cb2[_0xdde3('0x5c')]['id']},{'OwnerId':_0x4d6cb2[_0xdde3('0x5c')]['id']}]}]};_0x69ad28=_[_0xdde3('0xd6')]({},_0x69ad28,_0x4d6cb2['options']);var _0x26b122={'where':_0x69ad28[_0xdde3('0xd4')]};return db[_0xdde3('0x11f')][_0xdde3('0x1e')](_0x26b122)[_0xdde3('0x21')](function(_0x44df5b){_0x1e3d9a[_0xdde3('0x1e')]=_0x44df5b;if(_0x4d6cb2[_0xdde3('0x4b')]['includeAll']){_0x69ad28[_0xdde3('0x4a')]=[{'attributes':['id','firstName',_0xdde3('0x15c'),'phone'],'model':db[_0xdde3('0x15d')],'as':_0xdde3('0x15e')},{'attributes':['id',_0xdde3('0x38'),'dialActive'],'model':db[_0xdde3('0xaa')],'as':'Queue'}];}return db[_0xdde3('0x11f')]['findAll'](_0x69ad28);})['then'](function(_0x437dea){_0x1e3d9a[_0xdde3('0x54')]=_0x437dea;return _0x1e3d9a;})[_0xdde3('0x21')](respondWithFilteredResult(_0x140942,_0x69ad28))[_0xdde3('0x5a')](handleError(_0x140942,null));};exports['getApiKey']=function(_0x2cd7fd,_0x3b2ffc){if(!_[_0xdde3('0x68')](_0x2cd7fd[_0xdde3('0x31')]['id'])&&(_0x2cd7fd['user'][_0xdde3('0x2b')]=='admin'||_0x2cd7fd[_0xdde3('0x31')][_0xdde3('0x2b')]==_0xdde3('0x31'))){return db[_0xdde3('0x48')]['findOne']({'where':{'id':_0x2cd7fd[_0xdde3('0x5c')]['id']},'raw':!![]})['then'](function(_0x3ed939){return authService['retrieveApiKey'](_0x3ed939);})[_0xdde3('0x21')](function(_0x2b2a4f){if(_0x2b2a4f){return _0x3b2ffc['status'](0xc8)['json']({'api_key':_0x2b2a4f[_0xdde3('0x15f')]});}else{return _0x3b2ffc[_0xdde3('0x1a')](0xcc)['json']({'message':_0xdde3('0x160')});}})[_0xdde3('0x5a')](handleError(_0x3b2ffc,0x193));}else{return _0x3b2ffc[_0xdde3('0x1a')](0x191)[_0xdde3('0x161')]({'message':_0xdde3('0x162')});}};exports['createApiKey']=function(_0x7b1ae2,_0x2ae70d){if(!_[_0xdde3('0x68')](_0x7b1ae2['user']['id'])&&(_0x7b1ae2[_0xdde3('0x31')][_0xdde3('0x2b')]==_0xdde3('0x82')||_0x7b1ae2['user'][_0xdde3('0x2b')]==_0xdde3('0x31'))){return db['User'][_0xdde3('0x60')]({'where':{'id':_0x7b1ae2[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](function(_0x4cf695){return authService[_0xdde3('0x163')](_0x4cf695);})[_0xdde3('0x21')](function(_0x138c04){return db[_0xdde3('0x48')][_0xdde3('0x2a')]({'apiKeyIat':_0x138c04[_0xdde3('0x164')],'apiKeyNonce':_0x138c04['nonce']},{'where':{'id':_0x7b1ae2[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](function(){return _0x2ae70d[_0xdde3('0x1a')](0xc8)[_0xdde3('0x161')]({'api_key':_0x138c04[_0xdde3('0x15f')]});});})[_0xdde3('0x5a')](handleError(_0x2ae70d,0x193));}else{return _0x2ae70d[_0xdde3('0x1a')](0x191)[_0xdde3('0x161')]({'message':_0xdde3('0x162')});}};exports[_0xdde3('0x165')]=function(_0x4cd6a3,_0xd574ac){if(!_[_0xdde3('0x68')](_0x4cd6a3['user']['id'])&&(_0x4cd6a3[_0xdde3('0x31')][_0xdde3('0x2b')]=='admin'||_0x4cd6a3[_0xdde3('0x31')][_0xdde3('0x2b')]==_0xdde3('0x31'))){return db[_0xdde3('0x48')]['find']({'where':{'id':_0x4cd6a3[_0xdde3('0x5c')]['id']}})[_0xdde3('0x21')](handleEntityNotFound(_0xd574ac,null))['then'](function(_0x1ce4d1){if(_0x1ce4d1&&_0x1ce4d1[_0xdde3('0x166')]&&_0x1ce4d1[_0xdde3('0x167')])return _0x1ce4d1;else throw{'message':_0xdde3('0x168')};})[_0xdde3('0x21')](function(){return db[_0xdde3('0x48')][_0xdde3('0x2a')]({'apiKeyNonce':null,'apiKeyIat':null},{'where':{'id':_0x4cd6a3[_0xdde3('0x5c')]['id']}});})[_0xdde3('0x21')](respondWithStatusCode(_0xd574ac,0xc8))['catch'](handleError(_0xd574ac,0x193));}else{return _0xd574ac['status'](0x191)[_0xdde3('0x161')]({'message':_0xdde3('0x162')});}};exports[_0xdde3('0x169')]=function(_0x1602ae,_0x5275c4){var _0x3360a0=_0x1602ae[_0xdde3('0x31')][_0xdde3('0x2f')]({'plain':!![]});if(!_0x3360a0){return _0x5275c4[_0xdde3('0x1a')](0x191)['send'](_0xdde3('0x16a'));}else{Promise[_0xdde3('0xfb')]()[_0xdde3('0x21')](function(){if(_0x1602ae['query'][_0xdde3('0x4c')]!==_0xdde3('0x4d'))return;return _0x1602ae['user'][_0xdde3('0x16b')]();})[_0xdde3('0x21')](function(_0x5a707d){if(!_0x5a707d)return;return _0x5a707d[_0xdde3('0x2f')]({'plain':!![]});})[_0xdde3('0x21')](function(_0x5031ea){_0x3360a0['userSetting']=_0x5031ea;return _0x5275c4[_0xdde3('0x1a')](0xc8)[_0xdde3('0x161')](_0x3360a0);});}};exports['getPresence']=function(_0x45302c,_0x414319){var _0x482b7c={'offset':0x0};var _0x5bd707={'count':0x0,'rows':[]};var _0x5e14fc=['idle',_0xdde3('0x16c'),'ringing'];var _0x12d096=[];var _0x554fd7=[];var _0x1f3740=[];var _0x2f42e0=_0x45302c[_0xdde3('0x4b')][_0xdde3('0x16d')];var _0x1169bf=_0x45302c[_0xdde3('0x4b')][_0xdde3('0x16e')];var _0x1fc5e8=_0x45302c[_0xdde3('0x4b')][_0xdde3('0x41')];return Promise[_0xdde3('0xfb')]()[_0xdde3('0x21')](function(){if(!_0x2f42e0){return[];}return db[_0xdde3('0x10c')]['findAll']({'attributes':['id',_0xdde3('0x38')],'where':{'id':_0x2f42e0}});})[_0xdde3('0x21')](function(_0x2d2fbc){_0x1f3740=_0x2d2fbc;if(!_0x1169bf){return[];}return db[_0xdde3('0xaa')][_0xdde3('0x51')]({'attributes':['id',_0xdde3('0x38')],'type':'inbound','where':{'id':_0x1169bf}});})['then'](function(_0x3320cd){_0x554fd7=_0x3320cd;var _0x4f11a3=_0x1f3740[_0xdde3('0xc6')](_0x554fd7)[_0xdde3('0x35')](function(_0x33b249){return _0x33b249[_0xdde3('0x16f')]({'attributes':['id',_0xdde3('0x38'),'internal',_0xdde3('0x9f')],'raw':!![]});});return Promise[_0xdde3('0x5e')](_0x4f11a3);})['then'](function(_0x55f113){var _0x6b970=_[_0xdde3('0x170')](_0x55f113);if(_0x1fc5e8){if(_0x1169bf||_0x2f42e0){return _0x6b970[_0xdde3('0x41')](function(_0x2ab06f){return _0x2ab06f[_0xdde3('0x38')][_0xdde3('0xa6')]()[_0xdde3('0x37')](_0x1fc5e8[_0xdde3('0xa6')]())||_0x2ab06f[_0xdde3('0x65')]['toString']()[_0xdde3('0x37')](_0x1fc5e8);});}else{return db[_0xdde3('0x48')][_0xdde3('0x51')]({'attributes':['id','name','internal',_0xdde3('0x9f')],'where':{'role':_0xdde3('0x2c'),'$or':[db[_0xdde3('0x6b')][_0xdde3('0xd4')](db[_0xdde3('0x6b')]['fn'](_0xdde3('0x171'),db[_0xdde3('0x6b')][_0xdde3('0x172')](_0xdde3('0x38'))),{'$like':'%'+_0x1fc5e8['toLowerCase']()+'%'}),{'internal':{'$like':'%'+_0x1fc5e8+'%'}}]},'raw':!![]});}}else{return _0x6b970;}})[_0xdde3('0x21')](function(_0x324145){var _0x3597c6=_0xdde3('0x38');var _0x4f51eb=_0xdde3('0x173');if(_0x45302c[_0xdde3('0x4b')][_0xdde3('0xd3')]){_0x4f51eb=_0x45302c['query']['sort'][0x0]==='-'?_0xdde3('0x174'):_0xdde3('0x173');_0x3597c6=_0x4f51eb===_0xdde3('0x173')?_0x45302c[_0xdde3('0x4b')][_0xdde3('0xd3')]:_0x45302c[_0xdde3('0x4b')][_0xdde3('0xd3')]['substring'](0x1);}return _(_0x324145)[_0xdde3('0x175')]('id')['orderBy']([function(_0x300e0f){return _0x3597c6===_0xdde3('0x38')?_0x300e0f[_0x3597c6][_0xdde3('0xa6')]():_0x300e0f[_0x3597c6];}],[_0x4f51eb])[_0xdde3('0x35')](function(_0x5a3cba){return _[_0xdde3('0xd5')](_0x5a3cba,['id','name',_0xdde3('0x65'),_0xdde3('0x9f')]);})[_0xdde3('0x36')]();})[_0xdde3('0x21')](function(_0x574470){_0x12d096=_0x574470;return rta['getRealtimeAgents']();})[_0xdde3('0x21')](function(_0xb7859d){return _0x12d096[_0xdde3('0x35')](function(_0x447a7f){var _0x4e6222=_[_0xdde3('0x60')](_0xb7859d[_0xdde3('0x54')],['id',_0x447a7f['id']]);if(!_0x4e6222||!_0x447a7f[_0xdde3('0x9f')]){_0x447a7f[_0xdde3('0x1a')]=_0xdde3('0x176');}else if(_0x4e6222['voicePause']){_0x447a7f[_0xdde3('0x1a')]=_0xdde3('0xfd');}else if(_0x4e6222[_0xdde3('0x177')]===_0xdde3('0x178')||!_0x4e6222[_0xdde3('0x177')]){_0x447a7f[_0xdde3('0x1a')]=_0xdde3('0x178');}else{_0x447a7f['status']=_0x5e14fc[_0xdde3('0x37')](_0x4e6222[_0xdde3('0x177')])?_0xdde3('0x9f'):_0xdde3('0x179');}return _0x447a7f;});})[_0xdde3('0x21')](function(_0x5b66ea){if(!_0x45302c[_0xdde3('0x4b')][_0xdde3('0xc8')](_0xdde3('0xd7'))){_0x482b7c[_0xdde3('0x1c')]=qs[_0xdde3('0x1c')](_0x45302c['query'][_0xdde3('0x1c')]||0xa);_0x482b7c[_0xdde3('0x1b')]=qs[_0xdde3('0x1b')](_0x45302c[_0xdde3('0x4b')][_0xdde3('0x1b')]);}_0x5bd707[_0xdde3('0x1e')]=_0x5b66ea[_0xdde3('0x6e')];_0x5bd707[_0xdde3('0x54')]=_0x482b7c[_0xdde3('0x1c')]?_0x5b66ea['slice'](_0x482b7c[_0xdde3('0x1b')],_0x482b7c[_0xdde3('0x1b')]+_0x482b7c[_0xdde3('0x1c')]):_0x5b66ea;return _0x5bd707;})[_0xdde3('0x21')](respondWithFilteredResult(_0x414319,_0x482b7c))[_0xdde3('0x5a')](handleError(_0x414319,null));};function get_open_tabs(_0x1ef702,_0x3e7c27){var _0x3f9a93=_0x1ef702[_0xdde3('0x17a')](0x0)['toUpperCase']()+_0x1ef702['slice'](0x1);var _0x46bf8e={'type':db[_0xdde3('0x92')][_0xdde3('0x6c')][_0xdde3('0x6d')],'raw':!![]};return new Promise(function(_0x3bf983,_0x47e447){var _0x1d1a5e=squel[_0xdde3('0x17b')]()[_0xdde3('0x17c')]('ui.'+_0x3f9a93+_0xdde3('0x17d'),'id')[_0xdde3('0x17c')]('ui.createdAt')[_0xdde3('0x6f')]('user_has_'+_0x1ef702+_0xdde3('0x17e'),'ui')['where'](_0xdde3('0x17f'),_0x3e7c27['id']);return db[_0xdde3('0x6b')][_0xdde3('0x4b')](_0x1d1a5e[_0xdde3('0x180')](),_0x46bf8e)[_0xdde3('0x21')](function(_0x40a9d3){_0x3e7c27[_0x3f9a93+'OpenTabs']=_0x40a9d3;_0x3bf983(_0x40a9d3);})[_0xdde3('0x5a')](function(_0x3a67bd){_0x47e447(_0x3a67bd);});});}exports[_0xdde3('0x181')]=function(_0x41181d,_0x3bc9d6){var _0x338017=_0x41181d['params']['id'];var _0x45c761=_0x41181d[_0xdde3('0x5f')]['enabled'];return db[_0xdde3('0x48')][_0xdde3('0x2a')]({'messengerSoundNotification':_0x45c761},{'where':{'id':_0x338017}})[_0xdde3('0x21')](respondWithStatusCode(_0x3bc9d6,null))['catch'](handleError(_0x3bc9d6,null));};
\ No newline at end of file
+var _0x7e74=['pick','filters','merge','Unknown\x20role','nolimit','getVoiceQueuesRt','getGroups','ChatGroup','order','getRecordings','VoiceRecording','UserId','getScreenRecordings','ScreenRecording','getChatInteractions','ChatInteraction','getMailInteractions','MailInteraction','SmsInteraction','getSmsInteractions','FaxInteraction','getFaxInteractions','getWhatsappInteractions','phone','mobile','LOCAL/%s@from-sip/n','intrf','user:%s','user:forcelogout','headers','x-forwarded-for','connection','remoteAddress','User\x20not\x20found\x20or\x20not\x20allowed\x20to\x20perform\x20login\x20method','getVoiceQueues','UserVoiceQueue.penalty','MemberReport','YYYY-MM-DD\x20HH:mm:ss','getChannels','forEach','LOGIN','device','PAUSE','LOGININPAUSE','resolve','pause','QueuePause','updateAttributes','bulkCreate','mailPause','chatPause','smsPause','pauseType','lastPauseAt','User\x20with\x20id\x20%s\x20not\x20found','unpause','getTeams','Team','addTeams','Body\x20parameter\x20\x27ids\x27\x20is\x20required','transaction','getAssociatedQueues','flattenDeep','addAgent','getDataValue','TeamVoicePrefix','UserVoicePrefix','VoicePrefixId','Queue:save','removeTeams','isArray','Query\x20parameter\x20\x27ids\x27\x20is\x20required','removeAgent','Voice','CmList','getAgents','values','CmHopper','addChatInteractions','omit','user_has_chat_interactions:save','removeChatInteractions','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','addWhatsappInteractions','user_has_whatsapp_interactions:save','removeWhatsappInteractions','VoicePrefix','getVoicePrefixes','getFaxAccounts','addFaxAccounts','removeFaxAccounts','getMailAccounts','addMailAccounts','removeMailAccounts','getOpenchannelAccounts','addOpenchannelAccounts','removeOpenchannelAccounts','getSmsAccounts','SmsAccount','addSmsAccounts','ChatWebsite','getChatWebsites','addChatWebsites','removeChatWebsites','getWhatsappAccounts','WhatsappAccount','addWhatsappAccounts','removeWhatsappAccounts','getScheduledCalls','$or','$gt','$gte','$lt','$not','$between','$notBetween','$in','$notIn','$like','$notLike','$notILike','$overlap','$any','firstName','lastName','dialActive','VoiceQueue','getApiKey','retrieveApiKey','token','No\x20API\x20access\x20key\x20found!','You\x20don\x27t\x20have\x20sufficient\x20privileges\x20to\x20access\x20this\x20resource.','createApiKey','generateApiKey','iat','nonce','apiKeyNonce','whoami','send','getUserSetting','getPresence','unknown','ringing','queues','flatten','toString','lower','desc','asc','substring','uniqBy','orderBy','offline','unavailable','voiceStatus','busy','slice','charAt','toUpperCase','QueryTypes','select','field','ui.','InteractionId','user_has_','ui.UserId\x20=\x20?','OpenTabs','messengerSoundNotification','enabled','moment','path','lodash','ioredis','../../components/auth/service','../../components/contacts','../../components/realtime/agents','../../config/logger','api','../../config/environment','../../config/license/util','../../errors/api','APIBadRequestError','APIForbiddenrror','../../mysqldb','socket.io-emitter','redis','register','defaults','localhost','client','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','then','info','User,\x20%s,\x20%s','debug','User,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent','result','catch','update','emit','userNotification:recalc:','get','role','admin','Users','user','Agents','Telephones','telephone','ignore','map','value','includes','find','name','destroy','end','stack','User','rawAttributes','fieldName','type','key','filter','password','previousPasswords','resetPasswordExpires','md5secret','index','getOptions','query','includeAll','include','userSetting','true','UserSetting','attributes','push','rows','openTabs','length','chat','fax','mail','dataValues','openchannel','whatsapp','all','show','params','options','sms','body','describe','addContacts','ids','internal','Setting','findById','securePassword','validatePasswordPattern','max','isNil','min_internal','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)','sequelize','SELECT','from','voicemail','mailbox','VoiceMail','fullname','email','agent','permissions','101','102','103','113','110','104','105','107','108','100','114','115','create','Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20an\x20user','Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20another\x20administrator','settingsEnabled','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','checkUserLimits','some','findAll','isEmpty','autoAssociation','compact','UserProfileResource','newPassword','Sequelize','ValidationError','authenticate','oldPassword','New\x20password\x20must\x20be\x20different\x20from\x20old\x20password','Unauthorized','findOne','enforcePasswordHistory','passwordHistoryLimit','updatePasswordsHistory','addQueues','channel','online','loginInPause','voicePause','interface','capitalize','toLowerCase','Queues','penalty','spread','voice','format','SIP/%s','UserVoiceQueueRt','upsert','removeQueues','isValidChannel','Unknown\x20channel','QueueId','Queue:remove','addAvatar','userpic','getAvatar','join','root','server/files/images/logos/default_profile.png','download','existsSync','server/files/images/','ChatOpenTabs','CHAT','createdAt','OpenchannelOpenTabs','MailOpenTabs','MAIL','SMS','WhatsappOpenTabs','WHATSAPP','concat','getContacts','hasOwnProperty','Tags','color','tag','getQueues','model','Queue','keys','intersection','fields','sort','where'];(function(_0x52ca59,_0x279dda){var _0x1ab7e5=function(_0x2b8c74){while(--_0x2b8c74){_0x52ca59['push'](_0x52ca59['shift']());}};_0x1ab7e5(++_0x279dda);}(_0x7e74,0xb7));var _0x47e7=function(_0x5af98e,_0x13d8fd){_0x5af98e=_0x5af98e-0x0;var _0x88a7a7=_0x7e74[_0x5af98e];return _0x88a7a7;};'use strict';var moment=require(_0x47e7('0x0'));var util=require('util');var path=require(_0x47e7('0x1'));var fs=require('fs');var _=require(_0x47e7('0x2'));var squel=require('squel');var Redis=require(_0x47e7('0x3'));var jayson=require('jayson/promise');var authService=require(_0x47e7('0x4'));var contacts=require(_0x47e7('0x5'));var qs=require('../../components/parsers/qs');var rta=require(_0x47e7('0x6'));var logger=require(_0x47e7('0x7'))(_0x47e7('0x8'));var utils=require('../../config/utils');var config=require(_0x47e7('0x9'));var licenseUtil=require(_0x47e7('0xa'));var APIBadRequestError=require(_0x47e7('0xb'))[_0x47e7('0xc')];var APINotFoundError=require('../../errors/api')['APINotFoundError'];var APIForbiddenError=require(_0x47e7('0xb'))[_0x47e7('0xd')];var APIHandleError=require(_0x47e7('0xb'))['handleError'];var db=require(_0x47e7('0xe'))['db'];var socket=require(_0x47e7('0xf'))(new Redis(config[_0x47e7('0x10')]));require('./user.socket')[_0x47e7('0x11')](socket);config['redis']=_[_0x47e7('0x12')](config[_0x47e7('0x10')],{'host':_0x47e7('0x13'),'port':0x18eb});var amiClient=jayson[_0x47e7('0x14')]['http']({'port':0x232a});var values;function respondWithStatusCode(_0x60ee62,_0x59b735){_0x59b735=_0x59b735||0xcc;return function(_0x590972){if(_0x590972){return _0x60ee62[_0x47e7('0x15')](_0x59b735);}return _0x60ee62[_0x47e7('0x16')](_0x59b735)['end']();};}function respondWithResult(_0x6b2b7,_0x599517){_0x599517=_0x599517||0xc8;return function(_0x432b9c){if(_0x432b9c){return _0x6b2b7[_0x47e7('0x16')](_0x599517)[_0x47e7('0x17')](_0x432b9c);}};}function respondWithFilteredResult(_0x5a1eb3,_0x4625a1){return function(_0x227209){if(_0x227209){var _0x1f1700=typeof _0x4625a1[_0x47e7('0x18')]===_0x47e7('0x19')&&typeof _0x4625a1[_0x47e7('0x1a')]==='undefined';var _0x26258c=_0x227209[_0x47e7('0x1b')];var _0x4c8a5f=_0x1f1700?0x0:_0x4625a1[_0x47e7('0x18')];var _0x6b5758=_0x1f1700?_0x227209['count']:_0x4625a1[_0x47e7('0x18')]+_0x4625a1[_0x47e7('0x1a')];var _0x8d70d;if(_0x6b5758>=_0x26258c){_0x6b5758=_0x26258c;_0x8d70d=0xc8;}else{_0x8d70d=0xce;}_0x5a1eb3[_0x47e7('0x16')](_0x8d70d);return _0x5a1eb3[_0x47e7('0x1c')](_0x47e7('0x1d'),_0x4c8a5f+'-'+_0x6b5758+'/'+_0x26258c)['json'](_0x227209);}return null;};}function respondWithRpcPromise(_0x1f5f49,_0x299e3c,_0x41be0b,_0x2cd30e){return new Promise(function(_0x561591,_0x5a8d4f){var _0x5af157=_0x2cd30e||amiClient;return _0x5af157['request'](_0x1f5f49,_0x41be0b)[_0x47e7('0x1e')](function(_0x1550d0){logger[_0x47e7('0x1f')](_0x47e7('0x20'),_0x299e3c,'request\x20sent');logger[_0x47e7('0x21')](_0x47e7('0x22'),_0x299e3c,'request\x20sent',JSON[_0x47e7('0x23')](_0x1550d0));if(_0x1550d0[_0x47e7('0x24')]){if(_0x1550d0[_0x47e7('0x24')]['code']===0x1f4){logger[_0x47e7('0x24')](_0x47e7('0x20'),_0x299e3c,_0x1550d0[_0x47e7('0x24')][_0x47e7('0x25')]);return _0x5a8d4f(_0x1550d0[_0x47e7('0x24')]['message']);}logger[_0x47e7('0x24')](_0x47e7('0x20'),_0x299e3c,_0x1550d0[_0x47e7('0x24')][_0x47e7('0x25')]);return _0x561591(_0x1550d0['error'][_0x47e7('0x25')]);}else{logger[_0x47e7('0x1f')](_0x47e7('0x20'),_0x299e3c,_0x47e7('0x26'));_0x561591(_0x1550d0[_0x47e7('0x27')]['message']);}})[_0x47e7('0x28')](function(_0x19475e){logger[_0x47e7('0x24')]('User,\x20%s,\x20%s',_0x299e3c,_0x19475e);_0x5a8d4f(_0x19475e);});});}function saveUpdates(_0xafba11){return function(_0x55b6bb){if(_0x55b6bb){return _0x55b6bb[_0x47e7('0x29')](_0xafba11)[_0x47e7('0x1e')](function(_0x3c7f4e){if(_0x3c7f4e['role']==='agent'){socket[_0x47e7('0x2a')](_0x47e7('0x2b')+_0x3c7f4e['id'],_0x3c7f4e);}return _0x3c7f4e;});}return null;};}function removeEntity(_0x25c9d8,_0x55ed05){return function(_0x426ef2){if(_0x426ef2){return _0x426ef2['destroy']({'transaction':_0x55ed05})[_0x47e7('0x1e')](function(){var _0x1a50d9=_0x426ef2[_0x47e7('0x2c')]({'plain':!![]});if(_0x1a50d9[_0x47e7('0x2d')]===_0x47e7('0x2e'))return;var _0x135d24=[{'name':_0x47e7('0x2f'),'value':_0x47e7('0x30'),'ignore':!![]},{'name':_0x47e7('0x31'),'value':'agent','ignore':![]},{'name':_0x47e7('0x32'),'value':_0x47e7('0x33'),'ignore':![]}];var _0x193b60=_(_0x135d24)['filter'](_0x47e7('0x34'))[_0x47e7('0x35')](_0x47e7('0x36'))[_0x47e7('0x36')]();if(_[_0x47e7('0x37')](_0x193b60,_0x1a50d9[_0x47e7('0x2d')])){return;}var _0x130134=_[_0x47e7('0x38')](_0x135d24,[_0x47e7('0x36'),_0x1a50d9[_0x47e7('0x2d')]])[_0x47e7('0x39')];return db['UserProfileResource'][_0x47e7('0x3a')]({'where':{'type':_0x130134,'resourceId':_0x1a50d9['id']},'transaction':_0x55ed05})[_0x47e7('0x1e')](function(){return _0x426ef2;});})[_0x47e7('0x1e')](function(){_0x25c9d8[_0x47e7('0x16')](0xcc)[_0x47e7('0x3b')]();});}};}function handleEntityNotFound(_0x18b36d){return function(_0x50a533){if(!_0x50a533){_0x18b36d[_0x47e7('0x15')](0x194);}return _0x50a533;};}function handleError(_0xbddfca,_0x2e2ce3){_0x2e2ce3=_0x2e2ce3||0x1f4;return function(_0x34c8f3){logger[_0x47e7('0x24')](_0x34c8f3[_0x47e7('0x3c')]);if(_0x34c8f3[_0x47e7('0x39')]){delete _0x34c8f3[_0x47e7('0x39')];}_0xbddfca[_0x47e7('0x16')](_0x2e2ce3)['send'](_0x34c8f3);};}function getUserAttributes(){return _(db[_0x47e7('0x3d')][_0x47e7('0x3e')])[_0x47e7('0x35')](function(_0x20de71){return{'name':_0x20de71[_0x47e7('0x3f')],'type':_0x20de71[_0x47e7('0x40')][_0x47e7('0x41')]};})[_0x47e7('0x42')](function(_0x3f7bbc){return![_0x47e7('0x43'),'salt',_0x47e7('0x44'),'resetPasswordToken',_0x47e7('0x45'),_0x47e7('0x46')]['includes'](_0x3f7bbc['name']);})[_0x47e7('0x36')]();}exports[_0x47e7('0x47')]=function(_0x52180,_0x32f47f){var _0x5cd1ad={},_0x2d4b92={'count':0x0,'rows':[]};var _0x108274=getUserAttributes();_0x5cd1ad=qs[_0x47e7('0x48')](_0x108274,_0x52180);var _0x36b069={'where':_0x5cd1ad['where']};return db[_0x47e7('0x3d')][_0x47e7('0x1b')](_0x36b069)[_0x47e7('0x1e')](function(_0x7e3b77){_0x2d4b92[_0x47e7('0x1b')]=_0x7e3b77;if(_0x52180[_0x47e7('0x49')][_0x47e7('0x4a')]){_0x5cd1ad[_0x47e7('0x4b')]=[{'all':!![]}];}if(_0x52180['query'][_0x47e7('0x4c')]===_0x47e7('0x4d')){_0x5cd1ad['include']=[{'model':db[_0x47e7('0x4e')],'as':_0x47e7('0x4c')}];}if(!_[_0x47e7('0x37')](_0x5cd1ad[_0x47e7('0x4f')],'id')){_0x5cd1ad[_0x47e7('0x4f')][_0x47e7('0x50')]('id');}return db[_0x47e7('0x3d')]['findAll'](_0x5cd1ad);})['then'](function(_0x81753c){_0x2d4b92[_0x47e7('0x51')]=_0x81753c;if(_0x52180['query'][_0x47e7('0x52')]===_0x47e7('0x4d')){var _0x28f4d5=[];for(var _0xc62173=0x0;_0xc62173<_0x2d4b92[_0x47e7('0x51')][_0x47e7('0x53')];_0xc62173++){_0x28f4d5[_0x47e7('0x50')](get_open_tabs(_0x47e7('0x54'),_0x2d4b92[_0x47e7('0x51')][_0xc62173]['dataValues']));_0x28f4d5[_0x47e7('0x50')](get_open_tabs('sms',_0x2d4b92[_0x47e7('0x51')][_0xc62173]['dataValues']));_0x28f4d5[_0x47e7('0x50')](get_open_tabs(_0x47e7('0x55'),_0x2d4b92[_0x47e7('0x51')][_0xc62173]['dataValues']));_0x28f4d5['push'](get_open_tabs(_0x47e7('0x56'),_0x2d4b92[_0x47e7('0x51')][_0xc62173][_0x47e7('0x57')]));_0x28f4d5[_0x47e7('0x50')](get_open_tabs(_0x47e7('0x58'),_0x2d4b92[_0x47e7('0x51')][_0xc62173]['dataValues']));_0x28f4d5[_0x47e7('0x50')](get_open_tabs(_0x47e7('0x59'),_0x2d4b92['rows'][_0xc62173][_0x47e7('0x57')]));}return Promise[_0x47e7('0x5a')](_0x28f4d5)['then'](function(){return _0x2d4b92;});}else{return _0x2d4b92;}})[_0x47e7('0x1e')](respondWithFilteredResult(_0x32f47f,_0x5cd1ad))[_0x47e7('0x28')](handleError(_0x32f47f,null));};exports[_0x47e7('0x5b')]=function(_0x32d616,_0x5e3598){var _0x89daa7=getUserAttributes();_0x32d616[_0x47e7('0x49')]['id']=_0x32d616[_0x47e7('0x5c')]['id'];var _0x380a18=qs[_0x47e7('0x48')](_0x89daa7,_0x32d616);if(_0x32d616[_0x47e7('0x49')][_0x47e7('0x4a')]){_0x380a18[_0x47e7('0x4b')]=[{'all':!![]}];}if(_0x32d616[_0x47e7('0x49')][_0x47e7('0x4c')]===_0x47e7('0x4d')){_0x380a18[_0x47e7('0x4b')]=[{'model':db[_0x47e7('0x4e')],'as':_0x47e7('0x4c')}];}_0x380a18=_['merge']({},_0x380a18,_0x32d616[_0x47e7('0x5d')]);if(!_['includes'](_0x380a18[_0x47e7('0x4f')],'id')){_0x380a18[_0x47e7('0x4f')]['push']('id');}return db[_0x47e7('0x3d')][_0x47e7('0x38')](_0x380a18)[_0x47e7('0x1e')](handleEntityNotFound(_0x5e3598,null))[_0x47e7('0x1e')](function(_0x39c11f){var _0x39a138=[];values=_0x39c11f;if(_0x32d616[_0x47e7('0x49')][_0x47e7('0x52')]===_0x47e7('0x4d')){_0x39a138[_0x47e7('0x50')](get_open_tabs(_0x47e7('0x54'),_0x39c11f[_0x47e7('0x57')]));_0x39a138[_0x47e7('0x50')](get_open_tabs(_0x47e7('0x5e'),_0x39c11f['dataValues']));_0x39a138[_0x47e7('0x50')](get_open_tabs(_0x47e7('0x58'),_0x39c11f[_0x47e7('0x57')]));_0x39a138[_0x47e7('0x50')](get_open_tabs(_0x47e7('0x59'),_0x39c11f['dataValues']));_0x39a138[_0x47e7('0x50')](get_open_tabs(_0x47e7('0x55'),_0x39c11f[_0x47e7('0x57')]));_0x39a138['push'](get_open_tabs(_0x47e7('0x56'),_0x39c11f[_0x47e7('0x57')]));return Promise[_0x47e7('0x5a')](_0x39a138);}else{return values;}})[_0x47e7('0x1e')](function(){return values;})[_0x47e7('0x1e')](respondWithResult(_0x5e3598,null))[_0x47e7('0x28')](handleError(_0x5e3598,null));};exports[_0x47e7('0x29')]=function(_0x1e73af,_0x259649){if(_0x1e73af[_0x47e7('0x5f')]['id']){delete _0x1e73af[_0x47e7('0x5f')]['id'];}delete _0x1e73af[_0x47e7('0x5f')][_0x47e7('0x2d')];return db[_0x47e7('0x3d')]['find']({'where':{'id':_0x1e73af[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x259649,null))[_0x47e7('0x1e')](saveUpdates(_0x1e73af[_0x47e7('0x5f')],null))[_0x47e7('0x1e')](respondWithResult(_0x259649,null))[_0x47e7('0x28')](handleError(_0x259649,null));};exports[_0x47e7('0x60')]=function(_0x58efe7,_0x3bb11b){return db[_0x47e7('0x3d')]['describe']()['then'](respondWithResult(_0x3bb11b,null))[_0x47e7('0x28')](handleError(_0x3bb11b,null));};exports[_0x47e7('0x61')]=function(_0x4ddc24,_0x46d2c4){return db['User'][_0x47e7('0x38')]({'where':{'id':_0x4ddc24[_0x47e7('0x5c')]['id']}})['then'](handleEntityNotFound(_0x46d2c4,null))['then'](function(_0xbb4a64){if(_0xbb4a64){return _0xbb4a64[_0x47e7('0x61')](_0x4ddc24[_0x47e7('0x5f')][_0x47e7('0x62')],_['omit'](_0x4ddc24[_0x47e7('0x5f')],[_0x47e7('0x62'),'id'])||{});}})['then'](respondWithResult(_0x46d2c4,null))[_0x47e7('0x28')](handleError(_0x46d2c4,null));};function validateUser(_0x186e5f){return new Promise(function(_0x260165,_0x2c5a4e){if(_0x186e5f[_0x47e7('0x63')])return _0x260165(_0x186e5f);return db[_0x47e7('0x64')][_0x47e7('0x65')](0x1)['then'](function(_0x2cca02){if(_0x2cca02[_0x47e7('0x66')])authService[_0x47e7('0x67')](_0x186e5f['password']);db[_0x47e7('0x3d')][_0x47e7('0x68')](_0x47e7('0x63'))[_0x47e7('0x1e')](function(_0x1d7ae5){if(_[_0x47e7('0x69')](_0x1d7ae5)){_0x186e5f['internal']=_0x2cca02[_0x47e7('0x6a')]||0x1;return;}if(_[_0x47e7('0x69')](_0x2cca02[_0x47e7('0x6a')])||_0x2cca02['min_internal']===_0x1d7ae5){_0x186e5f[_0x47e7('0x63')]=_0x1d7ae5+0x1;return;}if(_0x2cca02[_0x47e7('0x6a')]>_0x1d7ae5){_0x186e5f[_0x47e7('0x63')]=_0x2cca02['min_internal'];return;}return db['sequelize']['query'](_0x47e7('0x6b'),{'type':db[_0x47e7('0x6c')]['QueryTypes'][_0x47e7('0x6d')]})['then'](function(_0xe6c02c){if(_0xe6c02c&&_0xe6c02c[_0x47e7('0x53')]){for(var _0x190188=0x0,_0x52f274=_0xe6c02c[_0x47e7('0x53')];_0x190188<_0x52f274&&_['isNil'](_0x186e5f[_0x47e7('0x63')]);_0x190188++){if(_0x2cca02[_0x47e7('0x6a')]<=_0xe6c02c[_0x190188][_0x47e7('0x6e')]){_0x186e5f[_0x47e7('0x63')]=_0xe6c02c[_0x190188][_0x47e7('0x6e')];}else if(_0x2cca02[_0x47e7('0x6a')]>_0xe6c02c[_0x190188][_0x47e7('0x6e')]&&_0x2cca02['min_internal']<=_0xe6c02c[_0x190188]['to']){_0x186e5f[_0x47e7('0x63')]=_0x2cca02[_0x47e7('0x6a')];}}}if(_[_0x47e7('0x69')](_0x186e5f['internal'])){_0x186e5f[_0x47e7('0x63')]=_0x1d7ae5+0x1;}return _0x260165(_0x186e5f);});});})[_0x47e7('0x28')](function(_0x40bc21){_0x2c5a4e(_0x40bc21);});});}function updateUser(_0x5bdbc8){return new Promise(function(_0x2ac2d3,_0x13abe0){try{if(_0x5bdbc8[_0x47e7('0x6f')]){_0x5bdbc8[_0x47e7('0x70')]=_0x5bdbc8[_0x47e7('0x63')];_0x5bdbc8[_0x47e7('0x71')]={'mailbox':_0x5bdbc8[_0x47e7('0x63')],'password':_0x5bdbc8[_0x47e7('0x43')],'fullname':_0x5bdbc8[_0x47e7('0x72')],'email':_0x5bdbc8[_0x47e7('0x73')]};}if(_0x5bdbc8['role']===_0x47e7('0x74')){if(!_0x5bdbc8[_0x47e7('0x75')])_0x5bdbc8['permissions']=[_0x47e7('0x76'),_0x47e7('0x77'),_0x47e7('0x78'),_0x47e7('0x79'),_0x47e7('0x7a'),_0x47e7('0x7b'),_0x47e7('0x7c'),'106',_0x47e7('0x7d'),_0x47e7('0x7e'),'109',_0x47e7('0x7f'),'111',_0x47e7('0x80'),_0x47e7('0x81')];}_0x2ac2d3(_0x5bdbc8);}catch(_0x3a5823){_0x13abe0(_0x3a5823);}});}exports[_0x47e7('0x82')]=function(_0x20a20a,_0x6701cc){if(_0x20a20a[_0x47e7('0x30')][_0x47e7('0x2d')]===_0x47e7('0x74'))throw new Error('Unauthorized');if(_0x20a20a['body'][_0x47e7('0x2d')]===_0x47e7('0x30')&&_0x20a20a[_0x47e7('0x30')]['role']!==_0x47e7('0x2e')){throw new Error(_0x47e7('0x83'));}if(_0x20a20a[_0x47e7('0x5f')][_0x47e7('0x2d')]===_0x47e7('0x2e')&&_0x20a20a['user']['role']!==_0x47e7('0x2e')){throw new Error(_0x47e7('0x84'));}return licenseUtil['checkUserLimits']([_0x20a20a[_0x47e7('0x5f')]])[_0x47e7('0x1e')](function(){return validateUser(_0x20a20a[_0x47e7('0x5f')]);})[_0x47e7('0x1e')](function(_0x2bf6fe){return updateUser(_0x2bf6fe)[_0x47e7('0x1e')](function(_0x3693c0){if(_0x3693c0[_0x47e7('0x2d')]===_0x47e7('0x2e')){_0x3693c0[_0x47e7('0x85')]=_0x20a20a[_0x47e7('0x30')][_0x47e7('0x85')];delete _0x3693c0['userProfileId'];}return _0x3693c0;});})[_0x47e7('0x1e')](function(_0x2fd262){return db[_0x47e7('0x3d')][_0x47e7('0x82')](_0x2fd262,{'include':[{'model':db[_0x47e7('0x71')],'as':'VoiceMail'}]});})[_0x47e7('0x1e')](function(_0x1da155){if(_0x20a20a[_0x47e7('0x5f')][_0x47e7('0x2d')]==='user')return _0x1da155;if(_0x20a20a['user'][_0x47e7('0x2d')]!=='user')return _0x1da155;return db[_0x47e7('0x86')][_0x47e7('0x38')]({'where':{'name':_0x1da155[_0x47e7('0x2d')]===_0x47e7('0x74')?_0x47e7('0x31'):'Telephones','userProfileId':_0x20a20a[_0x47e7('0x30')][_0x47e7('0x87')]},'raw':!![]})[_0x47e7('0x1e')](function(_0x11be66){if(!_0x11be66||_0x11be66['autoAssociation']!=0x0)return _0x1da155;return db['UserProfileResource'][_0x47e7('0x82')]({'name':_0x1da155['name'],'resourceId':_0x1da155['id'],'type':_0x11be66[_0x47e7('0x39')],'sectionId':_0x11be66['id']},{})[_0x47e7('0x1e')](function(){return _0x1da155;});})[_0x47e7('0x28')](function(_0x55807c){logger[_0x47e7('0x24')](_0x47e7('0x88'),_0x55807c);throw _0x55807c;});})[_0x47e7('0x1e')](respondWithResult(_0x6701cc,0xc9))[_0x47e7('0x28')](handleError(_0x6701cc,null));};exports['bulkCreate']=function(_0x19ad16,_0x2da680){var _0x40566a=_0x19ad16[_0x47e7('0x5f')];var _0x52453e=[];if(_0x19ad16[_0x47e7('0x30')][_0x47e7('0x2d')]===_0x47e7('0x74'))throw new Error('Unauthorized');if(_['some'](_0x40566a,[_0x47e7('0x2d'),_0x47e7('0x30')])&&_0x19ad16[_0x47e7('0x30')][_0x47e7('0x2d')]!==_0x47e7('0x2e')){throw new Error(_0x47e7('0x83'));}if(_['some'](_0x40566a,[_0x47e7('0x2d'),_0x47e7('0x2e')])&&_0x19ad16[_0x47e7('0x30')]['role']!=='admin'){throw new Error('Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20an\x20administrator');}return licenseUtil[_0x47e7('0x89')](_0x40566a)[_0x47e7('0x1e')](function(){return validateUser(_0x40566a[0x0]);})[_0x47e7('0x1e')](function(){for(var _0x1c417d=0x1;_0x1c417d<_0x40566a[_0x47e7('0x53')];_0x1c417d++){var _0x9d7200=_0x40566a[_0x1c417d-0x1][_0x47e7('0x63')];if(!_0x40566a[_0x1c417d][_0x47e7('0x63')])_0x40566a[_0x1c417d][_0x47e7('0x63')]=_0x9d7200+0x1;_0x52453e['push'](validateUser(_0x40566a[_0x1c417d]));}return Promise[_0x47e7('0x5a')](_0x52453e);})[_0x47e7('0x1e')](function(){_0x52453e=[];for(var _0x37ebf5=0x0;_0x37ebf5<_0x40566a['length'];_0x37ebf5++){_0x52453e['push'](updateUser(_0x40566a[_0x37ebf5]));}return Promise[_0x47e7('0x5a')](_0x52453e);})[_0x47e7('0x1e')](function(){_0x52453e=_0x40566a[_0x47e7('0x35')](function(_0x282b4f){return db[_0x47e7('0x3d')]['create'](_0x282b4f,{'include':[{'model':db[_0x47e7('0x71')],'as':'VoiceMail'}]})[_0x47e7('0x1e')](function(_0x565b8d){_0x282b4f['id']=_0x565b8d['id'];return _0x282b4f;});});return Promise[_0x47e7('0x5a')](_0x52453e);})[_0x47e7('0x1e')](function(_0x37f555){if(_0x19ad16['body'][_0x47e7('0x2d')]===_0x47e7('0x30'))return _0x37f555;if(_0x19ad16[_0x47e7('0x30')][_0x47e7('0x2d')]!==_0x47e7('0x30'))return _0x37f555;var _0x1c1d97=_[_0x47e7('0x8a')](_0x37f555,function(_0x407432){return _0x407432[_0x47e7('0x2d')]===_0x47e7('0x74')||_0x407432[_0x47e7('0x2d')]===_0x47e7('0x33');});if(!_0x1c1d97)return _0x37f555;return db[_0x47e7('0x86')][_0x47e7('0x8b')]({'where':{'name':{'$or':[_0x47e7('0x31'),'Telephones']},'userProfileId':_0x19ad16[_0x47e7('0x30')][_0x47e7('0x87')]},'raw':!![]})[_0x47e7('0x1e')](function(_0xc93c1){if(_[_0x47e7('0x8c')](_0xc93c1)||!_[_0x47e7('0x8a')](_0xc93c1,[_0x47e7('0x8d'),0x0]))return _0x37f555;_0x52453e=[];var _0x41fa80=_(_0xc93c1)[_0x47e7('0x35')](function(_0x2c166d){if(_0x2c166d[_0x47e7('0x8d')]===0x1)return;return _0x2c166d[_0x47e7('0x39')]==='Agents'?'agent':_0x47e7('0x33');})[_0x47e7('0x8e')]()[_0x47e7('0x36')]();for(var _0x2582f1=0x0;_0x2582f1<_0x37f555[_0x47e7('0x53')];_0x2582f1++){if(!_[_0x47e7('0x37')](_0x41fa80,_0x37f555[_0x2582f1][_0x47e7('0x2d')]))return;var _0x21ab8b=_0x37f555[_0x2582f1][_0x47e7('0x2d')]===_0x47e7('0x74')?_0x47e7('0x31'):_0x47e7('0x32');_0x52453e[_0x47e7('0x50')](db[_0x47e7('0x8f')][_0x47e7('0x82')]({'name':_0x37f555[_0x2582f1][_0x47e7('0x39')],'resourceId':_0x37f555[_0x2582f1]['id'],'type':_0x21ab8b,'sectionId':_['find'](_0xc93c1,[_0x47e7('0x39'),_0x21ab8b])['id']},{}));}return Promise[_0x47e7('0x5a')](_0x52453e);});})['then'](respondWithResult(_0x2da680,0xc9))['catch'](handleError(_0x2da680,null));};exports['changePassword']=function(_0x2eff4d,_0x2c5332){if(_0x2eff4d[_0x47e7('0x5f')]['id']){delete _0x2eff4d[_0x47e7('0x5f')]['id'];}return db[_0x47e7('0x3d')]['find']({'where':{'id':_0x2eff4d[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](function(_0x5c484f){if(!_0x5c484f)return null;if(_0x5c484f['id']===_0x2eff4d['user']['id']){if(!_0x2eff4d[_0x47e7('0x5f')]['oldPassword']||!_0x2eff4d[_0x47e7('0x5f')][_0x47e7('0x90')]){throw new db[(_0x47e7('0x91'))][(_0x47e7('0x92'))]('Invalid\x20body\x20format.\x20Use\x20oldPassword\x20and\x20newPassword');}if(!_0x5c484f[_0x47e7('0x93')](_0x2eff4d[_0x47e7('0x5f')]['oldPassword'])){throw new db['Sequelize']['ValidationError']('Wrong\x20credentials');}if(_0x2eff4d['body'][_0x47e7('0x94')]===_0x2eff4d[_0x47e7('0x5f')][_0x47e7('0x90')]){throw new db[(_0x47e7('0x91'))]['ValidationError'](_0x47e7('0x95'));}}else if(_0x2eff4d[_0x47e7('0x30')]['role']===_0x47e7('0x2e')){if(!_0x2eff4d[_0x47e7('0x5f')][_0x47e7('0x90')]){throw new db[(_0x47e7('0x91'))][(_0x47e7('0x92'))]('Invalid\x20body\x20format.\x20Use\x20newPassword');}}else if(_0x2eff4d[_0x47e7('0x30')][_0x47e7('0x2d')]==='user'){if(!_0x2eff4d['body']['newPassword']){throw new db[(_0x47e7('0x91'))][(_0x47e7('0x92'))]('Invalid\x20body\x20format.\x20Use\x20newPassword');}if(_0x5c484f[_0x47e7('0x2d')]!==_0x47e7('0x74')){throw new db['Sequelize'][(_0x47e7('0x92'))](_0x47e7('0x96'));}}else{throw new db[(_0x47e7('0x91'))][(_0x47e7('0x92'))](_0x47e7('0x96'));}return _0x5c484f;})[_0x47e7('0x1e')](handleEntityNotFound(_0x2c5332,null))[_0x47e7('0x1e')](function(_0x168107){return db['Setting'][_0x47e7('0x97')]({'attributes':['id',_0x47e7('0x66'),_0x47e7('0x98'),_0x47e7('0x99')]})[_0x47e7('0x1e')](function(_0x8cc8e){if(_0x8cc8e[_0x47e7('0x66')])authService[_0x47e7('0x67')](_0x2eff4d[_0x47e7('0x5f')][_0x47e7('0x90')]);if(!_0x8cc8e['enforcePasswordHistory']||!_0x168107['previousPasswords'])return _0x168107;authService['validatePasswordHistory'](_0x2eff4d[_0x47e7('0x5f')][_0x47e7('0x90')],_0x168107[_0x47e7('0x44')],_0x8cc8e['passwordHistoryLimit']);return _0x168107;})[_0x47e7('0x1e')](saveUpdates({'password':_0x2eff4d['body'][_0x47e7('0x90')],'passwordResetAt':_0x2eff4d['user']['id']==_0x2eff4d[_0x47e7('0x5c')]['id']?moment():null,'previousPasswords':authService[_0x47e7('0x9a')](_0x2eff4d[_0x47e7('0x5f')]['newPassword'],_0x168107[_0x47e7('0x44')])},null));})[_0x47e7('0x1e')](respondWithResult(_0x2c5332,null))[_0x47e7('0x28')](handleError(_0x2c5332,null));};exports[_0x47e7('0x9b')]=function(_0x42fc20,_0x5c20fd){var _0x517cbc=_0x42fc20[_0x47e7('0x5f')][_0x47e7('0x9c')];return db[_0x47e7('0x3d')][_0x47e7('0x38')]({'where':{'id':_0x42fc20['params']['id']},'attributes':['id','name',_0x47e7('0x2d'),_0x47e7('0x9d'),_0x47e7('0x9e'),_0x47e7('0x9f'),_0x47e7('0xa0')]})[_0x47e7('0x1e')](handleEntityNotFound(_0x5c20fd,null))[_0x47e7('0x1e')](function(_0x2e2614){if(_0x2e2614){if(!utils['isValidChannel'](_0x517cbc)){throw new db[(_0x47e7('0x91'))]['ValidationError']('Unknown\x20channel');}return _0x2e2614['add'+_[_0x47e7('0xa1')](_0x517cbc[_0x47e7('0xa2')]())+_0x47e7('0xa3')](_0x42fc20['body']['ids'],{'penalty':_0x42fc20[_0x47e7('0x5f')][_0x47e7('0xa4')]||0x0})[_0x47e7('0xa5')](function(_0x375f34){for(var _0x346fc5=0x0;_0x346fc5<_0x42fc20[_0x47e7('0x5f')]['ids'][_0x47e7('0x53')];_0x346fc5+=0x1){var _0xfafa4b={'UserId':Number(_0x42fc20[_0x47e7('0x5c')]['id'])};_0xfafa4b[_[_0x47e7('0xa1')](_0x517cbc['toLowerCase']())+'QueueId']=Number(_0x42fc20[_0x47e7('0x5f')][_0x47e7('0x62')][_0x346fc5]);socket['emit']('user'+_[_0x47e7('0xa1')](_0x517cbc[_0x47e7('0xa2')]())+'Queue:save',_0xfafa4b);}return _0x375f34;})[_0x47e7('0x1e')](function(){if(_0x517cbc==='voice'){return db['VoiceQueue'][_0x47e7('0x8b')]({'where':{'id':_0x42fc20[_0x47e7('0x5f')][_0x47e7('0x62')]||[]},'raw':!![],'attributes':['id',_0x47e7('0x39')]});}})[_0x47e7('0x1e')](function(_0x3b3769){var _0x33cd65=_0x2e2614[_0x47e7('0x2c')]({'plain':!![]});var _0x44d45d=[];if(_0x517cbc===_0x47e7('0xa6')&&_0x33cd65[_0x47e7('0x2d')]===_0x47e7('0x74')&&_0x33cd65[_0x47e7('0x9d')]){for(let _0x9dff11=0x0;_0x9dff11<_0x3b3769[_0x47e7('0x53')];_0x9dff11+=0x1){_0x44d45d['push']({'membername':_0x33cd65[_0x47e7('0x39')],'UserId':_0x33cd65['id'],'queue_name':_0x3b3769[_0x9dff11][_0x47e7('0x39')],'VoiceQueueId':_0x3b3769[_0x9dff11]['id'],'interface':_[_0x47e7('0x69')](_0x33cd65['interface'])?util[_0x47e7('0xa7')](_0x47e7('0xa8'),_0x33cd65[_0x47e7('0x39')]):_0x33cd65['interface'],'paused':_0x33cd65['voicePause']||![],'penalty':_0x42fc20[_0x47e7('0x5f')][_0x47e7('0xa4')]||0x0});}return Promise[_0x47e7('0x5a')](_0x44d45d[_0x47e7('0x35')](function(_0xfffb08){return db[_0x47e7('0xa9')][_0x47e7('0xaa')](_0xfffb08);}));}return _0x2e2614;});}})['then'](respondWithStatusCode(_0x5c20fd,null))['catch'](handleError(_0x5c20fd,null));};exports[_0x47e7('0xab')]=function(_0x1fb980,_0x108ffb){var _0x139479,_0x301b81;return db['User'][_0x47e7('0x38')]({'where':{'id':_0x1fb980[_0x47e7('0x5c')]['id']},'attributes':['id',_0x47e7('0x39'),_0x47e7('0x2d')]})[_0x47e7('0x1e')](handleEntityNotFound(_0x108ffb,null))[_0x47e7('0x1e')](function(_0xcd293c){if(_0xcd293c){_0x139479=_0xcd293c;if(!_0x1fb980[_0x47e7('0x49')][_0x47e7('0x9c')]||!utils[_0x47e7('0xac')](_0x1fb980[_0x47e7('0x49')][_0x47e7('0x9c')])){throw new db[(_0x47e7('0x91'))]['ValidationError'](_0x47e7('0xad'));}return _0xcd293c['remove'+_[_0x47e7('0xa1')](_0x1fb980['query']['channel'][_0x47e7('0xa2')]())+_0x47e7('0xa3')](_0x1fb980[_0x47e7('0x49')][_0x47e7('0x62')]);}})[_0x47e7('0x1e')](function(_0x5dc0c0){if(_['isArray'](_0x1fb980[_0x47e7('0x49')][_0x47e7('0x62')])){for(var _0x575104=0x0;_0x575104<_0x1fb980[_0x47e7('0x49')][_0x47e7('0x62')][_0x47e7('0x53')];_0x575104+=0x1){_0x301b81={'UserId':Number(_0x1fb980['params']['id'])};_0x301b81[_[_0x47e7('0xa1')](_0x1fb980[_0x47e7('0x49')][_0x47e7('0x9c')][_0x47e7('0xa2')]())+_0x47e7('0xae')]=Number(_0x1fb980[_0x47e7('0x49')][_0x47e7('0x62')][_0x575104]);socket['emit'](_0x47e7('0x30')+_[_0x47e7('0xa1')](_0x1fb980[_0x47e7('0x49')][_0x47e7('0x9c')]['toLowerCase']())+_0x47e7('0xaf'),_0x301b81);}}else{_0x301b81={'UserId':Number(_0x1fb980['params']['id'])};_0x301b81[_[_0x47e7('0xa1')](_0x1fb980[_0x47e7('0x49')]['channel'][_0x47e7('0xa2')]())+_0x47e7('0xae')]=Number(_0x1fb980[_0x47e7('0x49')]['ids']);socket[_0x47e7('0x2a')](_0x47e7('0x30')+_[_0x47e7('0xa1')](_0x1fb980[_0x47e7('0x49')][_0x47e7('0x9c')][_0x47e7('0xa2')]())+_0x47e7('0xaf'),_0x301b81);}return _0x5dc0c0;})[_0x47e7('0x1e')](function(){if(_0x1fb980[_0x47e7('0x49')][_0x47e7('0x9c')]===_0x47e7('0xa6')){return db['UserVoiceQueueRt'][_0x47e7('0x3a')]({'where':{'UserId':_0x1fb980[_0x47e7('0x5c')]['id'],'VoiceQueueId':_0x1fb980['query'][_0x47e7('0x62')]},'individualHooks':!![]})[_0x47e7('0x1e')](function(){return _0x139479;});}return _0x139479;})[_0x47e7('0x1e')](respondWithStatusCode(_0x108ffb,null))[_0x47e7('0x28')](handleError(_0x108ffb,null));};exports[_0x47e7('0xb0')]=function(_0x4a64a4,_0xe62cce){_0x4a64a4[_0x47e7('0x5f')][_0x47e7('0xb1')]=_0x4a64a4['file']['filename'];return db[_0x47e7('0x3d')][_0x47e7('0x38')]({'where':{'id':_0x4a64a4[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0xe62cce,null))['then'](saveUpdates(_0x4a64a4['body'],null))[_0x47e7('0x1e')](respondWithResult(_0xe62cce,null))[_0x47e7('0x28')](handleError(_0xe62cce,null));};exports[_0x47e7('0xb2')]=function(_0x190bd7,_0x52923d){var _0x592e9b=path[_0x47e7('0xb3')](config[_0x47e7('0xb4')],_0x47e7('0xb5'));return db[_0x47e7('0x3d')]['find']({'where':{'id':_0x190bd7['params']['id']},'attributes':['id','userpic'],'raw':!![]})[_0x47e7('0x1e')](handleEntityNotFound(_0x52923d,null))['then'](function(_0x30caff){if(_0x30caff){if(_['isNil'](_0x30caff['userpic'])){return _0x52923d[_0x47e7('0xb6')](_0x592e9b);}else{if(!fs[_0x47e7('0xb7')](path[_0x47e7('0xb3')](config['root'],_0x47e7('0xb8'),_0x30caff['userpic']))){return _0x52923d[_0x47e7('0xb6')](_0x592e9b);}return _0x52923d[_0x47e7('0xb6')](path[_0x47e7('0xb3')](config[_0x47e7('0xb4')],_0x47e7('0xb8'),_0x30caff[_0x47e7('0xb1')]));}}})['catch'](handleError(_0x52923d,null));};exports['getOpenTabs']=function(_0x1af312,_0x4b779a){return db['User']['find']({'where':{'id':_0x1af312[_0x47e7('0x5c')]['id']},'attributes':['id']})[_0x47e7('0x1e')](handleEntityNotFound(_0x4b779a,null))[_0x47e7('0x1e')](function(_0x245902){var _0x1262de=[];values=_0x245902[_0x47e7('0x57')];_0x1262de[_0x47e7('0x50')](get_open_tabs(_0x47e7('0x54'),_0x245902[_0x47e7('0x57')]));_0x1262de[_0x47e7('0x50')](get_open_tabs(_0x47e7('0x5e'),_0x245902[_0x47e7('0x57')]));_0x1262de[_0x47e7('0x50')](get_open_tabs(_0x47e7('0x58'),_0x245902[_0x47e7('0x57')]));_0x1262de[_0x47e7('0x50')](get_open_tabs(_0x47e7('0x59'),_0x245902['dataValues']));_0x1262de['push'](get_open_tabs(_0x47e7('0x55'),_0x245902[_0x47e7('0x57')]));_0x1262de[_0x47e7('0x50')](get_open_tabs(_0x47e7('0x56'),_0x245902['dataValues']));return Promise[_0x47e7('0x5a')](_0x1262de);})[_0x47e7('0x1e')](function(_0x5dfd4d){if(_0x5dfd4d){var _0x34ad04=_[_0x47e7('0x35')](values[_0x47e7('0xb9')],function(_0x49817d){return{'channel':_0x47e7('0xba'),'id':_0x49817d['id'],'createdAt':_0x49817d[_0x47e7('0xbb')]};});var _0x35b3ef=_[_0x47e7('0x35')](values['FaxOpenTabs'],function(_0x5f2b46){return{'channel':'FAX','id':_0x5f2b46['id'],'createdAt':_0x5f2b46['createdAt']};});var _0x2435bb=_['map'](values[_0x47e7('0xbc')],function(_0x3e1823){return{'channel':'OPENCHANNEL','id':_0x3e1823['id'],'createdAt':_0x3e1823[_0x47e7('0xbb')]};});var _0x11bb84=_['map'](values[_0x47e7('0xbd')],function(_0x4e35cf){return{'channel':_0x47e7('0xbe'),'id':_0x4e35cf['id'],'createdAt':_0x4e35cf[_0x47e7('0xbb')]};});var _0x3991a2=_[_0x47e7('0x35')](values['SmsOpenTabs'],function(_0x5cb727){return{'channel':_0x47e7('0xbf'),'id':_0x5cb727['id'],'createdAt':_0x5cb727['createdAt']};});var _0x148267=_[_0x47e7('0x35')](values[_0x47e7('0xc0')],function(_0x4e1725){return{'channel':_0x47e7('0xc1'),'id':_0x4e1725['id'],'createdAt':_0x4e1725[_0x47e7('0xbb')]};});var _0x47452e=_[_0x47e7('0xc2')](_0x34ad04,_0x35b3ef,_0x2435bb,_0x11bb84,_0x3991a2,_0x148267);var _0x4ed840={'count':_0x47452e[_0x47e7('0x53')],'rows':_0x47452e};return _0x4ed840;}else return null;})[_0x47e7('0x1e')](respondWithResult(_0x4b779a,null))[_0x47e7('0x28')](handleError(_0x4b779a,null));};exports[_0x47e7('0xc3')]=function(_0xb5fb09,_0x465d3a){var _0x3ba160={};return db['User'][_0x47e7('0x97')]({'where':{'id':_0xb5fb09[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](function(_0x53551c){if(!_0x53551c){throw new APINotFoundError(util[_0x47e7('0xa7')]('User\x20with\x20id\x20%s\x20not\x20found',_0xb5fb09[_0x47e7('0x5c')]['id']));}return contacts[_0x47e7('0x60')]();})[_0x47e7('0x1e')](function(_0x3b7a3){_0xb5fb09['query'][_0x47e7('0x3d')]=_0xb5fb09[_0x47e7('0x5c')]['id'];_0x3ba160=qs[_0x47e7('0x48')](_0x3b7a3,_0xb5fb09);if(_0xb5fb09[_0x47e7('0x49')][_0x47e7('0xc4')](_0x47e7('0x4a'))){_0x3ba160[_0x47e7('0x4b')]=[{'model':db['CmList'],'as':'List','required':![]},{'model':db['Tag'],'as':_0x47e7('0xc5'),'attributes':['id',_0x47e7('0x39'),_0x47e7('0xc6')],'where':_0xb5fb09['query'][_0x47e7('0xc7')]?{'id':_0xb5fb09['query'][_0x47e7('0xc7')]}:undefined,'required':_0xb5fb09[_0x47e7('0x49')]['tag']?!![]:![]}];}return contacts[_0x47e7('0x8b')](_0xb5fb09[_0x47e7('0x49')],_0xb5fb09[_0x47e7('0x30')],_0x3ba160,_0x3b7a3);})[_0x47e7('0x1e')](respondWithFilteredResult(_0x465d3a,_0x3ba160))[_0x47e7('0x28')](APIHandleError(_0x465d3a));};exports[_0x47e7('0xc8')]=function(_0x1804a9,_0x237d24){var _0x7e70c7;var _0x107250={};var _0x2af619;return db['User'][_0x47e7('0x97')]({'where':{'id':_0x1804a9['params']['id']},'attributes':['id','name',_0x47e7('0x2d')]})[_0x47e7('0x1e')](handleEntityNotFound(_0x237d24,null))[_0x47e7('0x1e')](function(_0x265a03){if(!utils[_0x47e7('0xac')](_0x1804a9[_0x47e7('0x49')][_0x47e7('0x9c')])){throw new db[(_0x47e7('0x91'))][(_0x47e7('0x92'))](_0x47e7('0xad'));}_0x7e70c7=_0x265a03;var _0x56ba1d={};_0x56ba1d[_0x47e7('0xc9')]=_['keys'](db[_[_0x47e7('0xa1')](_0x1804a9[_0x47e7('0x49')][_0x47e7('0x9c')])+_0x47e7('0xca')]['rawAttributes']);_0x56ba1d[_0x47e7('0x49')]=_[_0x47e7('0xcb')](_0x1804a9[_0x47e7('0x49')]);_0x56ba1d['filters']=_[_0x47e7('0xcc')](_0x56ba1d[_0x47e7('0xc9')],_0x56ba1d[_0x47e7('0x49')]);_0x107250[_0x47e7('0x4f')]=_[_0x47e7('0xcc')](_0x56ba1d[_0x47e7('0xc9')],qs[_0x47e7('0xcd')](_0x1804a9['query'][_0x47e7('0xcd')]));_0x107250['attributes']=_0x107250[_0x47e7('0x4f')]['length']?_0x107250[_0x47e7('0x4f')]:_0x56ba1d['model'];_0x107250['order']=qs[_0x47e7('0xce')](_0x1804a9['query'][_0x47e7('0xce')]);_0x107250[_0x47e7('0xcf')]=qs['filters'](_[_0x47e7('0xd0')](_0x1804a9['query'],_0x56ba1d[_0x47e7('0xd1')]));if(_0x1804a9[_0x47e7('0x49')][_0x47e7('0x42')]){_0x107250['where']=_[_0x47e7('0xd2')](_0x107250[_0x47e7('0xcf')],{'$or':_[_0x47e7('0x35')](_0x107250[_0x47e7('0x4f')],function(_0x4aab16){var _0x3277b5={};_0x3277b5[_0x4aab16]={'$like':'%'+_0x1804a9[_0x47e7('0x49')][_0x47e7('0x42')]+'%'};return _0x3277b5;})});}_0x107250=_['merge']({},_0x107250,_0x1804a9[_0x47e7('0x5d')]);switch(_0x7e70c7[_0x47e7('0x2d')]){case'admin':return db[_[_0x47e7('0xa1')](_0x1804a9[_0x47e7('0x49')][_0x47e7('0x9c')])+_0x47e7('0xca')]['findAll'](_0x107250);case _0x47e7('0x30'):case _0x47e7('0x74'):return _0x7e70c7[_0x47e7('0x2c')+_[_0x47e7('0xa1')](_0x1804a9[_0x47e7('0x49')]['channel'])+'Queues'](_0x107250);default:throw new db[(_0x47e7('0x91'))][(_0x47e7('0x92'))](_0x47e7('0xd3'));}})[_0x47e7('0x1e')](function(_0x515b9b){_0x2af619=_0x515b9b[_0x47e7('0x53')];if(!_0x1804a9[_0x47e7('0x49')][_0x47e7('0xc4')](_0x47e7('0xd4'))){_0x107250[_0x47e7('0x1a')]=qs[_0x47e7('0x1a')](_0x1804a9[_0x47e7('0x49')][_0x47e7('0x1a')]);_0x107250[_0x47e7('0x18')]=qs[_0x47e7('0x18')](_0x1804a9['query'][_0x47e7('0x18')]);}switch(_0x7e70c7['role']){case'admin':return db[_[_0x47e7('0xa1')](_0x1804a9[_0x47e7('0x49')][_0x47e7('0x9c')])+_0x47e7('0xca')]['findAll'](_0x107250);case _0x47e7('0x30'):case _0x47e7('0x74'):return _0x7e70c7['get'+_['capitalize'](_0x1804a9['query'][_0x47e7('0x9c')])+_0x47e7('0xa3')](_0x107250);}})[_0x47e7('0x1e')](function(_0x424be9){return{'count':_0x2af619,'rows':_0x424be9};})[_0x47e7('0x1e')](respondWithResult(_0x237d24,null))['catch'](handleError(_0x237d24,null));};exports[_0x47e7('0xd5')]=function(_0x2eb7f1,_0x4a0837){var _0x21300d={};var _0x42feec={};var _0x3b9be1;var _0x4cf8cd;return db[_0x47e7('0x3d')][_0x47e7('0x97')]({'where':{'id':_0x2eb7f1[_0x47e7('0x5c')]['id']}})['then'](handleEntityNotFound(_0x4a0837,null))[_0x47e7('0x1e')](function(_0x777418){if(_0x777418){_0x3b9be1=_0x777418;_0x42feec[_0x47e7('0xc9')]=_['keys'](db[_0x47e7('0xa9')][_0x47e7('0x3e')]);_0x42feec[_0x47e7('0x49')]=_[_0x47e7('0xcb')](_0x2eb7f1['query']);_0x42feec[_0x47e7('0xd1')]=_[_0x47e7('0xcc')](_0x42feec[_0x47e7('0xc9')],_0x42feec[_0x47e7('0x49')]);_0x21300d['attributes']=_[_0x47e7('0xcc')](_0x42feec[_0x47e7('0xc9')],qs[_0x47e7('0xcd')](_0x2eb7f1[_0x47e7('0x49')][_0x47e7('0xcd')]));_0x21300d[_0x47e7('0x4f')]=_0x21300d[_0x47e7('0x4f')][_0x47e7('0x53')]?_0x21300d['attributes']:_0x42feec[_0x47e7('0xc9')];_0x21300d['order']=qs['sort'](_0x2eb7f1[_0x47e7('0x49')][_0x47e7('0xce')]);_0x21300d[_0x47e7('0xcf')]=qs[_0x47e7('0xd1')](_[_0x47e7('0xd0')](_0x2eb7f1[_0x47e7('0x49')],_0x42feec[_0x47e7('0xd1')]));if(_0x2eb7f1[_0x47e7('0x49')][_0x47e7('0x42')]){_0x21300d[_0x47e7('0xcf')]=_['merge'](_0x21300d[_0x47e7('0xcf')],{'$or':_[_0x47e7('0x35')](_0x21300d[_0x47e7('0x4f')],function(_0x1371cb){var _0x232b55={};_0x232b55[_0x1371cb]={'$like':'%'+_0x2eb7f1[_0x47e7('0x49')][_0x47e7('0x42')]+'%'};return _0x232b55;})});}_0x21300d=_['merge']({},_0x21300d,_0x2eb7f1[_0x47e7('0x5d')]);return _0x3b9be1[_0x47e7('0xd5')](_0x21300d);}})['then'](function(_0xea0360){if(_0xea0360){_0x4cf8cd=_0xea0360[_0x47e7('0x53')];if(!_0x2eb7f1[_0x47e7('0x49')][_0x47e7('0xc4')](_0x47e7('0xd4'))){_0x21300d[_0x47e7('0x1a')]=qs['limit'](_0x2eb7f1['query'][_0x47e7('0x1a')]);_0x21300d[_0x47e7('0x18')]=qs[_0x47e7('0x18')](_0x2eb7f1['query']['offset']);}return _0x3b9be1['getVoiceQueuesRt'](_0x21300d);}})['then'](function(_0x51829a){if(_0x51829a){return _0x51829a?{'count':_0x4cf8cd,'rows':_0x51829a}:null;}})['then'](respondWithResult(_0x4a0837,null))[_0x47e7('0x28')](handleError(_0x4a0837,null));};exports[_0x47e7('0xd6')]=function(_0x378f69,_0x47dbdc){var _0xba12f3={};var _0x3087bc={};var _0x1fbb09;var _0x36b0c9;return db[_0x47e7('0x3d')]['findOne']({'where':{'id':_0x378f69[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x47dbdc,null))['then'](function(_0x55a36a){if(_0x55a36a){_0x1fbb09=_0x55a36a;_0x3087bc[_0x47e7('0xc9')]=_[_0x47e7('0xcb')](db[_0x47e7('0xd7')][_0x47e7('0x3e')]);_0x3087bc[_0x47e7('0x49')]=_['keys'](_0x378f69['query']);_0x3087bc[_0x47e7('0xd1')]=_['intersection'](_0x3087bc['model'],_0x3087bc[_0x47e7('0x49')]);_0xba12f3[_0x47e7('0x4f')]=_[_0x47e7('0xcc')](_0x3087bc[_0x47e7('0xc9')],qs[_0x47e7('0xcd')](_0x378f69[_0x47e7('0x49')][_0x47e7('0xcd')]));_0xba12f3[_0x47e7('0x4f')]=_0xba12f3['attributes'][_0x47e7('0x53')]?_0xba12f3[_0x47e7('0x4f')]:_0x3087bc[_0x47e7('0xc9')];_0xba12f3[_0x47e7('0xd8')]=qs[_0x47e7('0xce')](_0x378f69['query'][_0x47e7('0xce')]);_0xba12f3[_0x47e7('0xcf')]=qs[_0x47e7('0xd1')](_[_0x47e7('0xd0')](_0x378f69[_0x47e7('0x49')],_0x3087bc[_0x47e7('0xd1')]));if(_0x378f69['query'][_0x47e7('0x42')]){_0xba12f3['where']=_[_0x47e7('0xd2')](_0xba12f3[_0x47e7('0xcf')],{'$or':_[_0x47e7('0x35')](_0xba12f3[_0x47e7('0x4f')],function(_0x6fa691){var _0x5ab7fd={};_0x5ab7fd[_0x6fa691]={'$like':'%'+_0x378f69[_0x47e7('0x49')][_0x47e7('0x42')]+'%'};return _0x5ab7fd;})});}_0xba12f3=_[_0x47e7('0xd2')]({},_0xba12f3,_0x378f69[_0x47e7('0x5d')]);return _0x1fbb09[_0x47e7('0xd6')](_0xba12f3);}})[_0x47e7('0x1e')](function(_0x127311){if(_0x127311){_0x36b0c9=_0x127311['length'];if(!_0x378f69[_0x47e7('0x49')]['hasOwnProperty'](_0x47e7('0xd4'))){_0xba12f3[_0x47e7('0x1a')]=qs[_0x47e7('0x1a')](_0x378f69[_0x47e7('0x49')]['limit']);_0xba12f3['offset']=qs[_0x47e7('0x18')](_0x378f69[_0x47e7('0x49')][_0x47e7('0x18')]);}return _0x1fbb09[_0x47e7('0xd6')](_0xba12f3);}})[_0x47e7('0x1e')](function(_0x291ea7){if(_0x291ea7){return _0x291ea7?{'count':_0x36b0c9,'rows':_0x291ea7}:null;}})['then'](respondWithResult(_0x47dbdc,null))[_0x47e7('0x28')](handleError(_0x47dbdc,null));};exports[_0x47e7('0xd9')]=function(_0x4be96a,_0x19fdcd){var _0x1fc868={'raw':!![],'where':{}};var _0x397829={};var _0x2f2f40={'count':0x0,'rows':[]};return db[_0x47e7('0x3d')][_0x47e7('0x97')]({'where':{'id':_0x4be96a['params']['id']}})['then'](handleEntityNotFound(_0x19fdcd,null))[_0x47e7('0x1e')](function(_0x2fd109){if(_0x2fd109){_0x397829[_0x47e7('0xc9')]=_[_0x47e7('0xcb')](db[_0x47e7('0xda')][_0x47e7('0x3e')]);_0x397829[_0x47e7('0x49')]=_[_0x47e7('0xcb')](_0x4be96a['query']);_0x397829[_0x47e7('0xd1')]=_[_0x47e7('0xcc')](_0x397829[_0x47e7('0xc9')],_0x397829[_0x47e7('0x49')]);_0x1fc868['attributes']=_[_0x47e7('0xcc')](_0x397829['model'],qs[_0x47e7('0xcd')](_0x4be96a['query'][_0x47e7('0xcd')]));_0x1fc868['attributes']=_0x1fc868[_0x47e7('0x4f')]['length']?_0x1fc868[_0x47e7('0x4f')]:_0x397829[_0x47e7('0xc9')];if(!_0x4be96a[_0x47e7('0x49')]['hasOwnProperty'](_0x47e7('0xd4'))){_0x1fc868[_0x47e7('0x1a')]=qs[_0x47e7('0x1a')](_0x4be96a[_0x47e7('0x49')][_0x47e7('0x1a')]);_0x1fc868[_0x47e7('0x18')]=qs[_0x47e7('0x18')](_0x4be96a[_0x47e7('0x49')][_0x47e7('0x18')]);}_0x1fc868['order']=qs[_0x47e7('0xce')](_0x4be96a[_0x47e7('0x49')][_0x47e7('0xce')]);_0x1fc868[_0x47e7('0xcf')]=qs[_0x47e7('0xd1')](_[_0x47e7('0xd0')](_0x4be96a['query'],_0x397829[_0x47e7('0xd1')]));_0x1fc868[_0x47e7('0xcf')][_0x47e7('0xdb')]=_0x2fd109['id'];if(_0x4be96a[_0x47e7('0x49')]['filter']){_0x1fc868[_0x47e7('0xcf')]=_[_0x47e7('0xd2')](_0x1fc868['where'],{'$or':_[_0x47e7('0x35')](_0x1fc868[_0x47e7('0x4f')],function(_0x4e24c1){var _0x49d31f={};_0x49d31f[_0x4e24c1]={'$like':'%'+_0x4be96a[_0x47e7('0x49')][_0x47e7('0x42')]+'%'};return _0x49d31f;})});}_0x1fc868=_[_0x47e7('0xd2')]({},_0x1fc868,_0x4be96a[_0x47e7('0x5d')]);return db[_0x47e7('0xda')][_0x47e7('0x1b')]({'where':_0x1fc868[_0x47e7('0xcf')]})[_0x47e7('0x1e')](function(_0x54aab5){_0x2f2f40['count']=_0x54aab5;if(_0x4be96a['query'][_0x47e7('0x4a')]){_0x1fc868[_0x47e7('0x4b')]=[{'all':!![]}];}return db[_0x47e7('0xda')][_0x47e7('0x8b')](_0x1fc868);})['then'](function(_0xa4860f){_0x2f2f40[_0x47e7('0x51')]=_0xa4860f;return _0x2f2f40;});}})[_0x47e7('0x1e')](respondWithFilteredResult(_0x19fdcd,_0x1fc868))['catch'](handleError(_0x19fdcd,null));};exports[_0x47e7('0xdc')]=function(_0x417191,_0x4bac47){var _0x92ad4e={'raw':!![],'where':{}};var _0x740ef0={};var _0x1ca5f5={'count':0x0,'rows':[]};return db[_0x47e7('0x3d')][_0x47e7('0x97')]({'where':{'id':_0x417191['params']['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x4bac47,null))[_0x47e7('0x1e')](function(_0x5cb305){if(_0x5cb305){_0x740ef0[_0x47e7('0xc9')]=_[_0x47e7('0xcb')](db[_0x47e7('0xdd')][_0x47e7('0x3e')]);_0x740ef0['query']=_[_0x47e7('0xcb')](_0x417191['query']);_0x740ef0[_0x47e7('0xd1')]=_['intersection'](_0x740ef0['model'],_0x740ef0[_0x47e7('0x49')]);_0x92ad4e[_0x47e7('0x4f')]=_[_0x47e7('0xcc')](_0x740ef0[_0x47e7('0xc9')],qs[_0x47e7('0xcd')](_0x417191[_0x47e7('0x49')][_0x47e7('0xcd')]));_0x92ad4e[_0x47e7('0x4f')]=_0x92ad4e[_0x47e7('0x4f')][_0x47e7('0x53')]?_0x92ad4e[_0x47e7('0x4f')]:_0x740ef0[_0x47e7('0xc9')];if(!_0x417191[_0x47e7('0x49')]['hasOwnProperty']('nolimit')){_0x92ad4e['limit']=qs[_0x47e7('0x1a')](_0x417191[_0x47e7('0x49')][_0x47e7('0x1a')]);_0x92ad4e['offset']=qs[_0x47e7('0x18')](_0x417191[_0x47e7('0x49')]['offset']);}_0x92ad4e[_0x47e7('0xd8')]=qs[_0x47e7('0xce')](_0x417191['query'][_0x47e7('0xce')]);_0x92ad4e[_0x47e7('0xcf')]=qs[_0x47e7('0xd1')](_['pick'](_0x417191[_0x47e7('0x49')],_0x740ef0[_0x47e7('0xd1')]));_0x92ad4e[_0x47e7('0xcf')][_0x47e7('0xdb')]=_0x5cb305['id'];if(_0x417191[_0x47e7('0x49')]['filter']){_0x92ad4e[_0x47e7('0xcf')]=_[_0x47e7('0xd2')](_0x92ad4e[_0x47e7('0xcf')],{'$or':_['map'](_0x92ad4e[_0x47e7('0x4f')],function(_0x42833d){var _0x3e8fc2={};_0x3e8fc2[_0x42833d]={'$like':'%'+_0x417191['query'][_0x47e7('0x42')]+'%'};return _0x3e8fc2;})});}_0x92ad4e=_[_0x47e7('0xd2')]({},_0x92ad4e,_0x417191[_0x47e7('0x5d')]);return db[_0x47e7('0xdd')][_0x47e7('0x1b')]({'where':_0x92ad4e[_0x47e7('0xcf')]})[_0x47e7('0x1e')](function(_0x2080e2){_0x1ca5f5['count']=_0x2080e2;if(_0x417191[_0x47e7('0x49')][_0x47e7('0x4a')]){_0x92ad4e[_0x47e7('0x4b')]=[{'all':!![]}];}return db['ScreenRecording'][_0x47e7('0x8b')](_0x92ad4e);})[_0x47e7('0x1e')](function(_0x44c6a2){_0x1ca5f5[_0x47e7('0x51')]=_0x44c6a2;return _0x1ca5f5;});}})[_0x47e7('0x1e')](respondWithFilteredResult(_0x4bac47,_0x92ad4e))[_0x47e7('0x28')](handleError(_0x4bac47,null));};exports[_0x47e7('0xde')]=function(_0x518006,_0xb840ab){var _0xc91988={};var _0x502930={};var _0xa90de;var _0x442578;return db[_0x47e7('0x3d')][_0x47e7('0x97')]({'where':{'id':_0x518006[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0xb840ab,null))[_0x47e7('0x1e')](function(_0x4d395d){if(_0x4d395d){_0xa90de=_0x4d395d;_0x502930[_0x47e7('0xc9')]=_[_0x47e7('0xcb')](db[_0x47e7('0xdf')][_0x47e7('0x3e')]);_0x502930[_0x47e7('0x49')]=_['keys'](_0x518006['query']);_0x502930[_0x47e7('0xd1')]=_['intersection'](_0x502930[_0x47e7('0xc9')],_0x502930[_0x47e7('0x49')]);_0xc91988['attributes']=_[_0x47e7('0xcc')](_0x502930[_0x47e7('0xc9')],qs[_0x47e7('0xcd')](_0x518006[_0x47e7('0x49')][_0x47e7('0xcd')]));_0xc91988['attributes']=_0xc91988['attributes'][_0x47e7('0x53')]?_0xc91988[_0x47e7('0x4f')]:_0x502930[_0x47e7('0xc9')];_0xc91988[_0x47e7('0xd8')]=qs[_0x47e7('0xce')](_0x518006[_0x47e7('0x49')][_0x47e7('0xce')]);_0xc91988['where']=qs[_0x47e7('0xd1')](_[_0x47e7('0xd0')](_0x518006[_0x47e7('0x49')],_0x502930[_0x47e7('0xd1')]));if(_0x518006[_0x47e7('0x49')][_0x47e7('0x42')]){_0xc91988['where']=_[_0x47e7('0xd2')](_0xc91988[_0x47e7('0xcf')],{'$or':_[_0x47e7('0x35')](_0xc91988[_0x47e7('0x4f')],function(_0x46a7f8){var _0xf5bd50={};_0xf5bd50[_0x46a7f8]={'$like':'%'+_0x518006[_0x47e7('0x49')][_0x47e7('0x42')]+'%'};return _0xf5bd50;})});}_0xc91988=_[_0x47e7('0xd2')]({},_0xc91988,_0x518006[_0x47e7('0x5d')]);return _0xa90de['getChatInteractions'](_0xc91988);}})[_0x47e7('0x1e')](function(_0x11d5c7){if(_0x11d5c7){_0x442578=_0x11d5c7[_0x47e7('0x53')];if(!_0x518006[_0x47e7('0x49')][_0x47e7('0xc4')](_0x47e7('0xd4'))){_0xc91988[_0x47e7('0x1a')]=qs[_0x47e7('0x1a')](_0x518006[_0x47e7('0x49')][_0x47e7('0x1a')]);_0xc91988[_0x47e7('0x18')]=qs[_0x47e7('0x18')](_0x518006['query'][_0x47e7('0x18')]);}return _0xa90de[_0x47e7('0xde')](_0xc91988);}})[_0x47e7('0x1e')](function(_0x24267d){if(_0x24267d){return _0x24267d?{'count':_0x442578,'rows':_0x24267d}:null;}})[_0x47e7('0x1e')](respondWithResult(_0xb840ab,null))[_0x47e7('0x28')](handleError(_0xb840ab,null));};exports['getOpenchannelInteractions']=function(_0x107eb1,_0x2ec388){var _0x52b3b9={};var _0xe11d7c={};var _0x116fcf;var _0xac9e31;return db[_0x47e7('0x3d')][_0x47e7('0x97')]({'where':{'id':_0x107eb1[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x2ec388,null))[_0x47e7('0x1e')](function(_0x26bcf1){if(_0x26bcf1){_0x116fcf=_0x26bcf1;_0xe11d7c[_0x47e7('0xc9')]=_[_0x47e7('0xcb')](db['OpenchannelInteraction']['rawAttributes']);_0xe11d7c['query']=_['keys'](_0x107eb1['query']);_0xe11d7c['filters']=_[_0x47e7('0xcc')](_0xe11d7c[_0x47e7('0xc9')],_0xe11d7c[_0x47e7('0x49')]);_0x52b3b9[_0x47e7('0x4f')]=_[_0x47e7('0xcc')](_0xe11d7c[_0x47e7('0xc9')],qs[_0x47e7('0xcd')](_0x107eb1[_0x47e7('0x49')][_0x47e7('0xcd')]));_0x52b3b9['attributes']=_0x52b3b9['attributes'][_0x47e7('0x53')]?_0x52b3b9['attributes']:_0xe11d7c[_0x47e7('0xc9')];_0x52b3b9['order']=qs[_0x47e7('0xce')](_0x107eb1[_0x47e7('0x49')][_0x47e7('0xce')]);_0x52b3b9[_0x47e7('0xcf')]=qs[_0x47e7('0xd1')](_[_0x47e7('0xd0')](_0x107eb1[_0x47e7('0x49')],_0xe11d7c['filters']));if(_0x107eb1['query']['filter']){_0x52b3b9['where']=_['merge'](_0x52b3b9[_0x47e7('0xcf')],{'$or':_[_0x47e7('0x35')](_0x52b3b9[_0x47e7('0x4f')],function(_0x4d0e0c){var _0x18d6dd={};_0x18d6dd[_0x4d0e0c]={'$like':'%'+_0x107eb1[_0x47e7('0x49')][_0x47e7('0x42')]+'%'};return _0x18d6dd;})});}_0x52b3b9=_['merge']({},_0x52b3b9,_0x107eb1['options']);return _0x116fcf['getOpenchannelInteractions'](_0x52b3b9);}})[_0x47e7('0x1e')](function(_0x5bce74){if(_0x5bce74){_0xac9e31=_0x5bce74[_0x47e7('0x53')];if(!_0x107eb1[_0x47e7('0x49')][_0x47e7('0xc4')](_0x47e7('0xd4'))){_0x52b3b9['limit']=qs['limit'](_0x107eb1[_0x47e7('0x49')]['limit']);_0x52b3b9['offset']=qs[_0x47e7('0x18')](_0x107eb1[_0x47e7('0x49')][_0x47e7('0x18')]);}return _0x116fcf['getOpenchannelInteractions'](_0x52b3b9);}})[_0x47e7('0x1e')](function(_0x137a15){if(_0x137a15){return _0x137a15?{'count':_0xac9e31,'rows':_0x137a15}:null;}})['then'](respondWithResult(_0x2ec388,null))['catch'](handleError(_0x2ec388,null));};exports[_0x47e7('0xe0')]=function(_0x396077,_0x56d01c){var _0x230031={'raw':!![],'where':{}};var _0x75f2bc={};var _0x3c342a={'count':0x0,'rows':[]};return db[_0x47e7('0x3d')][_0x47e7('0x97')]({'where':{'id':_0x396077[_0x47e7('0x5c')]['id']}})['then'](handleEntityNotFound(_0x56d01c,null))['then'](function(_0x5cd205){if(_0x5cd205){_0x75f2bc[_0x47e7('0xc9')]=_['keys'](db[_0x47e7('0xe1')][_0x47e7('0x3e')]);_0x75f2bc[_0x47e7('0x49')]=_[_0x47e7('0xcb')](_0x396077[_0x47e7('0x49')]);_0x75f2bc['filters']=_['intersection'](_0x75f2bc[_0x47e7('0xc9')],_0x75f2bc[_0x47e7('0x49')]);_0x230031[_0x47e7('0x4f')]=_['intersection'](_0x75f2bc[_0x47e7('0xc9')],qs[_0x47e7('0xcd')](_0x396077[_0x47e7('0x49')][_0x47e7('0xcd')]));_0x230031['attributes']=_0x230031[_0x47e7('0x4f')][_0x47e7('0x53')]?_0x230031[_0x47e7('0x4f')]:_0x75f2bc[_0x47e7('0xc9')];if(!_0x396077['query'][_0x47e7('0xc4')](_0x47e7('0xd4'))){_0x230031['limit']=qs[_0x47e7('0x1a')](_0x396077[_0x47e7('0x49')]['limit']);_0x230031[_0x47e7('0x18')]=qs['offset'](_0x396077['query']['offset']);}_0x230031[_0x47e7('0xd8')]=qs[_0x47e7('0xce')](_0x396077[_0x47e7('0x49')][_0x47e7('0xce')]);_0x230031[_0x47e7('0xcf')]=qs[_0x47e7('0xd1')](_[_0x47e7('0xd0')](_0x396077[_0x47e7('0x49')],_0x75f2bc[_0x47e7('0xd1')]));_0x230031['where'][_0x47e7('0xdb')]=_0x5cd205['id'];if(_0x396077[_0x47e7('0x49')]['filter']){_0x230031[_0x47e7('0xcf')]=_['merge'](_0x230031['where'],{'$or':_[_0x47e7('0x35')](_0x230031[_0x47e7('0x4f')],function(_0x1c4c3c){var _0x5edd16={};_0x5edd16[_0x1c4c3c]={'$like':'%'+_0x396077[_0x47e7('0x49')][_0x47e7('0x42')]+'%'};return _0x5edd16;})});}_0x230031=_[_0x47e7('0xd2')]({},_0x230031,_0x396077['options']);return db['MailInteraction']['count']({'where':_0x230031['where']})['then'](function(_0x276dd7){_0x3c342a[_0x47e7('0x1b')]=_0x276dd7;if(_0x396077[_0x47e7('0x49')][_0x47e7('0x4a')]){_0x230031[_0x47e7('0x4b')]=[{'all':!![]}];}return db[_0x47e7('0xe1')][_0x47e7('0x8b')](_0x230031);})[_0x47e7('0x1e')](function(_0x12bbb2){_0x3c342a[_0x47e7('0x51')]=_0x12bbb2;return _0x3c342a;});}})[_0x47e7('0x1e')](respondWithFilteredResult(_0x56d01c,_0x230031))['catch'](handleError(_0x56d01c,null));};exports['getSmsInteractions']=function(_0x3a621,_0x3cc46e){var _0x1a6e77={};var _0xb09765={};var _0x568cc2;var _0x2daa8f;return db[_0x47e7('0x3d')]['findOne']({'where':{'id':_0x3a621['params']['id']}})['then'](handleEntityNotFound(_0x3cc46e,null))[_0x47e7('0x1e')](function(_0x390fcf){if(_0x390fcf){_0x568cc2=_0x390fcf;_0xb09765['model']=_[_0x47e7('0xcb')](db[_0x47e7('0xe2')][_0x47e7('0x3e')]);_0xb09765[_0x47e7('0x49')]=_[_0x47e7('0xcb')](_0x3a621[_0x47e7('0x49')]);_0xb09765[_0x47e7('0xd1')]=_[_0x47e7('0xcc')](_0xb09765[_0x47e7('0xc9')],_0xb09765['query']);_0x1a6e77[_0x47e7('0x4f')]=_['intersection'](_0xb09765[_0x47e7('0xc9')],qs[_0x47e7('0xcd')](_0x3a621[_0x47e7('0x49')][_0x47e7('0xcd')]));_0x1a6e77[_0x47e7('0x4f')]=_0x1a6e77[_0x47e7('0x4f')][_0x47e7('0x53')]?_0x1a6e77[_0x47e7('0x4f')]:_0xb09765[_0x47e7('0xc9')];_0x1a6e77['order']=qs[_0x47e7('0xce')](_0x3a621['query'][_0x47e7('0xce')]);_0x1a6e77[_0x47e7('0xcf')]=qs['filters'](_[_0x47e7('0xd0')](_0x3a621[_0x47e7('0x49')],_0xb09765['filters']));if(_0x3a621[_0x47e7('0x49')][_0x47e7('0x42')]){_0x1a6e77[_0x47e7('0xcf')]=_[_0x47e7('0xd2')](_0x1a6e77[_0x47e7('0xcf')],{'$or':_[_0x47e7('0x35')](_0x1a6e77[_0x47e7('0x4f')],function(_0x45816d){var _0x4ef8cc={};_0x4ef8cc[_0x45816d]={'$like':'%'+_0x3a621[_0x47e7('0x49')][_0x47e7('0x42')]+'%'};return _0x4ef8cc;})});}_0x1a6e77=_[_0x47e7('0xd2')]({},_0x1a6e77,_0x3a621['options']);return _0x568cc2[_0x47e7('0xe3')](_0x1a6e77);}})[_0x47e7('0x1e')](function(_0x5f1767){if(_0x5f1767){_0x2daa8f=_0x5f1767[_0x47e7('0x53')];if(!_0x3a621[_0x47e7('0x49')]['hasOwnProperty']('nolimit')){_0x1a6e77[_0x47e7('0x1a')]=qs['limit'](_0x3a621[_0x47e7('0x49')][_0x47e7('0x1a')]);_0x1a6e77[_0x47e7('0x18')]=qs[_0x47e7('0x18')](_0x3a621[_0x47e7('0x49')][_0x47e7('0x18')]);}return _0x568cc2['getSmsInteractions'](_0x1a6e77);}})['then'](function(_0x39c287){if(_0x39c287){return _0x39c287?{'count':_0x2daa8f,'rows':_0x39c287}:null;}})[_0x47e7('0x1e')](respondWithResult(_0x3cc46e,null))[_0x47e7('0x28')](handleError(_0x3cc46e,null));};exports['getFaxInteractions']=function(_0x5e4c7e,_0x516eb3){var _0x3c75be={};var _0x50d6ff={};var _0x269094;var _0x85e114;return db[_0x47e7('0x3d')][_0x47e7('0x97')]({'where':{'id':_0x5e4c7e['params']['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x516eb3,null))[_0x47e7('0x1e')](function(_0x8df120){if(_0x8df120){_0x269094=_0x8df120;_0x50d6ff[_0x47e7('0xc9')]=_['keys'](db[_0x47e7('0xe4')][_0x47e7('0x3e')]);_0x50d6ff[_0x47e7('0x49')]=_['keys'](_0x5e4c7e[_0x47e7('0x49')]);_0x50d6ff[_0x47e7('0xd1')]=_[_0x47e7('0xcc')](_0x50d6ff[_0x47e7('0xc9')],_0x50d6ff[_0x47e7('0x49')]);_0x3c75be[_0x47e7('0x4f')]=_[_0x47e7('0xcc')](_0x50d6ff[_0x47e7('0xc9')],qs['fields'](_0x5e4c7e['query'][_0x47e7('0xcd')]));_0x3c75be['attributes']=_0x3c75be[_0x47e7('0x4f')][_0x47e7('0x53')]?_0x3c75be['attributes']:_0x50d6ff[_0x47e7('0xc9')];_0x3c75be[_0x47e7('0xd8')]=qs[_0x47e7('0xce')](_0x5e4c7e[_0x47e7('0x49')][_0x47e7('0xce')]);_0x3c75be[_0x47e7('0xcf')]=qs['filters'](_[_0x47e7('0xd0')](_0x5e4c7e['query'],_0x50d6ff[_0x47e7('0xd1')]));if(_0x5e4c7e['query']['filter']){_0x3c75be['where']=_[_0x47e7('0xd2')](_0x3c75be[_0x47e7('0xcf')],{'$or':_['map'](_0x3c75be[_0x47e7('0x4f')],function(_0x1e0753){var _0x51bf9b={};_0x51bf9b[_0x1e0753]={'$like':'%'+_0x5e4c7e['query'][_0x47e7('0x42')]+'%'};return _0x51bf9b;})});}_0x3c75be=_['merge']({},_0x3c75be,_0x5e4c7e[_0x47e7('0x5d')]);return _0x269094[_0x47e7('0xe5')](_0x3c75be);}})[_0x47e7('0x1e')](function(_0x1a0754){if(_0x1a0754){_0x85e114=_0x1a0754[_0x47e7('0x53')];if(!_0x5e4c7e[_0x47e7('0x49')][_0x47e7('0xc4')](_0x47e7('0xd4'))){_0x3c75be[_0x47e7('0x1a')]=qs[_0x47e7('0x1a')](_0x5e4c7e['query'][_0x47e7('0x1a')]);_0x3c75be[_0x47e7('0x18')]=qs[_0x47e7('0x18')](_0x5e4c7e['query'][_0x47e7('0x18')]);}return _0x269094[_0x47e7('0xe5')](_0x3c75be);}})[_0x47e7('0x1e')](function(_0x4b7c00){if(_0x4b7c00){return _0x4b7c00?{'count':_0x85e114,'rows':_0x4b7c00}:null;}})['then'](respondWithResult(_0x516eb3,null))[_0x47e7('0x28')](handleError(_0x516eb3,null));};exports['getWhatsappInteractions']=function(_0x36d6a6,_0x6d13ae){var _0x20b6aa={};var _0xc25605={};var _0x565f91;var _0x46d39c;return db[_0x47e7('0x3d')][_0x47e7('0x97')]({'where':{'id':_0x36d6a6[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x6d13ae,null))['then'](function(_0x3a6641){if(_0x3a6641){_0x565f91=_0x3a6641;_0xc25605['model']=_['keys'](db['WhatsappInteraction'][_0x47e7('0x3e')]);_0xc25605['query']=_[_0x47e7('0xcb')](_0x36d6a6[_0x47e7('0x49')]);_0xc25605[_0x47e7('0xd1')]=_['intersection'](_0xc25605[_0x47e7('0xc9')],_0xc25605[_0x47e7('0x49')]);_0x20b6aa['attributes']=_[_0x47e7('0xcc')](_0xc25605[_0x47e7('0xc9')],qs['fields'](_0x36d6a6['query'][_0x47e7('0xcd')]));_0x20b6aa[_0x47e7('0x4f')]=_0x20b6aa['attributes'][_0x47e7('0x53')]?_0x20b6aa[_0x47e7('0x4f')]:_0xc25605[_0x47e7('0xc9')];_0x20b6aa[_0x47e7('0xd8')]=qs[_0x47e7('0xce')](_0x36d6a6[_0x47e7('0x49')]['sort']);_0x20b6aa['where']=qs[_0x47e7('0xd1')](_[_0x47e7('0xd0')](_0x36d6a6[_0x47e7('0x49')],_0xc25605[_0x47e7('0xd1')]));if(_0x36d6a6[_0x47e7('0x49')][_0x47e7('0x42')]){_0x20b6aa[_0x47e7('0xcf')]=_['merge'](_0x20b6aa[_0x47e7('0xcf')],{'$or':_[_0x47e7('0x35')](_0x20b6aa['attributes'],function(_0x4c964f){var _0x3079ea={};_0x3079ea[_0x4c964f]={'$like':'%'+_0x36d6a6['query']['filter']+'%'};return _0x3079ea;})});}_0x20b6aa=_[_0x47e7('0xd2')]({},_0x20b6aa,_0x36d6a6[_0x47e7('0x5d')]);return _0x565f91[_0x47e7('0xe6')](_0x20b6aa);}})[_0x47e7('0x1e')](function(_0x3506aa){if(_0x3506aa){_0x46d39c=_0x3506aa['length'];if(!_0x36d6a6[_0x47e7('0x49')][_0x47e7('0xc4')](_0x47e7('0xd4'))){_0x20b6aa['limit']=qs[_0x47e7('0x1a')](_0x36d6a6[_0x47e7('0x49')][_0x47e7('0x1a')]);_0x20b6aa[_0x47e7('0x18')]=qs['offset'](_0x36d6a6['query'][_0x47e7('0x18')]);}return _0x565f91[_0x47e7('0xe6')](_0x20b6aa);}})['then'](function(_0x249cb5){if(_0x249cb5){return _0x249cb5?{'count':_0x46d39c,'rows':_0x249cb5}:null;}})[_0x47e7('0x1e')](respondWithResult(_0x6d13ae,null))[_0x47e7('0x28')](handleError(_0x6d13ae,null));};exports['login']=function(_0x224320,_0x41f3f7,_0x5de468){var _0x219735;var _0x4b652b;var _0x307584;var _0x5ad7a9=!_[_0x47e7('0x69')](_0x224320['params']['id'])?_0x224320['params']['id']:!_['isNil'](_0x224320[_0x47e7('0x30')]['id'])?_0x224320['user']['id']:null;return db[_0x47e7('0x3d')][_0x47e7('0x38')]({'where':{'id':_0x5ad7a9,'role':{'$or':[_0x47e7('0x2e'),_0x47e7('0x30'),_0x47e7('0x74')]}},'attributes':['id',_0x47e7('0x39'),_0x47e7('0xe7'),_0x47e7('0xe8'),_0x47e7('0x2d'),_0x47e7('0x63'),_0x47e7('0x9e')]})[_0x47e7('0x1e')](function(_0x452716){if(_0x452716){if(_0x452716[_0x47e7('0x2d')]===_0x47e7('0x74')){_0x219735=_0x452716;if(_0x224320[_0x47e7('0x5f')][_0x47e7('0xa0')]){_0x307584=util[_0x47e7('0xa7')](_0x47e7('0xe9'),_0x219735[_0x224320[_0x47e7('0x5f')][_0x47e7('0xa0')]]);}else if(_0x224320[_0x47e7('0x5f')][_0x47e7('0xea')]){_0x307584=util[_0x47e7('0xa7')](_0x47e7('0xa8'),_0x224320[_0x47e7('0x5f')][_0x47e7('0xea')]);}else{_0x307584=util[_0x47e7('0xa7')](_0x47e7('0xa8'),_0x219735[_0x47e7('0x39')]);}socket['to'](util[_0x47e7('0xa7')](_0x47e7('0xeb'),_0x219735['name']))[_0x47e7('0x2a')](_0x47e7('0xec'),{'user':{'id':_0x219735['id'],'name':_0x219735[_0x47e7('0x39')]},'ip':_0x224320[_0x47e7('0xed')][_0x47e7('0xee')]||_0x224320[_0x47e7('0xef')][_0x47e7('0xf0')]||_0x224320['socket'][_0x47e7('0xf0')]||_0x224320['connection']['socket'][_0x47e7('0xf0')]});return db[_0x47e7('0xa9')]['destroy']({'where':{'membername':_0x219735[_0x47e7('0x39')]},'individualHooks':!![]});}}else{throw new db[(_0x47e7('0x91'))]['ValidationError'](_0x47e7('0xf1'));}})['then'](function(){if(_0x219735){return _0x219735[_0x47e7('0xf2')]({'raw':!![]});}})[_0x47e7('0x1e')](function(_0x23dce5){if(_0x219735){if(_0x23dce5){_0x4b652b=_0x23dce5;if(_0x4b652b[_0x47e7('0x53')]){var _0x1cc6aa=_0x4b652b[_0x47e7('0x35')](function(_0x835bb2){var _0x2ab2c8={'membername':_0x219735['name'],'UserId':_0x219735['id'],'queue_name':_0x835bb2[_0x47e7('0x39')],'VoiceQueueId':_0x835bb2['id'],'interface':_0x307584,'paused':_0x219735[_0x47e7('0x9e')]||![],'penalty':_0x835bb2[_0x47e7('0xf3')]||0x0};return db[_0x47e7('0xa9')][_0x47e7('0xaa')](_0x2ab2c8);});return Promise[_0x47e7('0x5a')](_0x1cc6aa);}}}})[_0x47e7('0x1e')](function(){if(_0x219735){return db[_0x47e7('0xf4')]['findAll']({'where':{'membername':_0x219735[_0x47e7('0x39')],'exitAt':null}});}})[_0x47e7('0x1e')](function(_0x4cd7a3){if(_0x219735){var _0x376505=[];_0x4cd7a3['forEach'](function(_0x1d1d4b){_0x376505[_0x47e7('0x50')](_0x1d1d4b['update']({'exitAt':moment()[_0x47e7('0xa7')](_0x47e7('0xf5'))}));});return Promise[_0x47e7('0x5a')](_0x376505);}})['then'](function(){if(_0x219735){var _0x3907ab=[];var _0x248921=[];var _0x54209d=utils[_0x47e7('0xf6')]();var _0x5b708e={'membername':_0x219735['name'],'interface':_0x307584,'enterAt':moment()[_0x47e7('0xa7')](_0x47e7('0xf5')),'role':_0x219735[_0x47e7('0x2d')],'internal':_0x219735[_0x47e7('0x63')]};_0x54209d[_0x47e7('0xf7')](function(_0x56a414){_0x3907ab[_0x47e7('0x50')](_['merge']({'channel':_0x56a414,'type':_0x47e7('0xf8'),'data1':_0x224320[_0x47e7('0x5f')][_0x47e7('0xf9')],'data2':_0x307584},_0x5b708e));if(_0x219735[_0x47e7('0x9e')]){_0x248921[_0x47e7('0x50')](_[_0x47e7('0xd2')]({'channel':_0x56a414,'type':_0x47e7('0xfa'),'data1':_0x47e7('0xfb')},_0x5b708e));}});return db['MemberReport']['bulkCreate'](_0x3907ab[_0x47e7('0xc2')](_0x248921),{'individualHooks':!![]});}})['then'](function(){if(_0x219735){return _0x219735[_0x47e7('0x29')]({'online':!![],'lastLoginAt':moment()[_0x47e7('0xa7')](_0x47e7('0xf5')),'voicePause':_0x219735['loginInPause']||![],'mailPause':_0x219735['loginInPause']||![],'chatPause':_0x219735['loginInPause']||![],'faxPause':_0x219735[_0x47e7('0x9e')]||![],'smsPause':_0x219735[_0x47e7('0x9e')]||![],'openchannelPause':_0x219735[_0x47e7('0x9e')]||![],'whatsappPause':_0x219735[_0x47e7('0x9e')]||![],'pauseType':_0x219735[_0x47e7('0x9e')]?_0x47e7('0xfb'):null,'interface':_0x307584,'lastPauseAt':moment()[_0x47e7('0xa7')](_0x47e7('0xf5'))});}})[_0x47e7('0x1e')](function(_0x27a6a4){if(_0x224320['isMiddleware']){return _0x5de468();}else{return Promise[_0x47e7('0xfc')](_0x27a6a4)[_0x47e7('0x1e')](respondWithResult(_0x41f3f7,null));}})[_0x47e7('0x28')](handleError(_0x41f3f7,null));};exports['logout']=function(_0xe50364,_0x222181){var _0x49fe0a;return db[_0x47e7('0x3d')][_0x47e7('0x38')]({'where':{'id':_0xe50364[_0x47e7('0x5c')]['id'],'role':'agent'},'attributes':['id',_0x47e7('0x39'),'role']})[_0x47e7('0x1e')](handleEntityNotFound(_0x222181,null))[_0x47e7('0x1e')](function(_0x39e3bd){if(_0x39e3bd){_0x49fe0a=_0x39e3bd;return db[_0x47e7('0xa9')][_0x47e7('0x3a')]({'where':{'membername':_0x49fe0a['name']},'individualHooks':!![]});}})[_0x47e7('0x1e')](function(){return db['MemberReport'][_0x47e7('0x8b')]({'where':{'membername':_0x49fe0a[_0x47e7('0x39')],'exitAt':null}});})[_0x47e7('0x1e')](function(_0x1a125e){var _0x1038fd=[];_0x1a125e[_0x47e7('0xf7')](function(_0x286479){_0x1038fd[_0x47e7('0x50')](_0x286479['update']({'exitAt':moment()[_0x47e7('0xa7')](_0x47e7('0xf5'))}));});return Promise[_0x47e7('0x5a')](_0x1038fd);})['then'](function(){return _0x49fe0a[_0x47e7('0x29')]({'online':![],'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![],'whatsappPause':![],'interface':null});})[_0x47e7('0x1e')](respondWithResult(_0x222181,null))[_0x47e7('0x28')](handleError(_0x222181,null));};exports[_0x47e7('0xfd')]=function(_0xb36a9b,_0x5aba08){var _0x245f21;return db['UserVoiceQueueRt'][_0x47e7('0x29')]({'paused':0x1},{'where':{'UserId':_0xb36a9b['params']['id']},'individualHooks':!![]})[_0x47e7('0x1e')](function(){return db[_0x47e7('0x3d')][_0x47e7('0x38')]({'where':{'id':_0xb36a9b[_0x47e7('0x5c')]['id'],'role':_0x47e7('0x74')},'attributes':['id',_0x47e7('0x39'),_0x47e7('0x2d'),'internal',_0x47e7('0xa0'),_0x47e7('0x9d')]});})[_0x47e7('0x1e')](handleEntityNotFound(_0x5aba08,null))[_0x47e7('0x1e')](function(_0x1c5359){if(_0x1c5359){_0x245f21=_0x1c5359;return respondWithRpcPromise(_0x47e7('0xfe'),'pause',{'id':_0x245f21['id'],'name':_0x245f21[_0x47e7('0x39')],'pause':!![]});}})[_0x47e7('0x1e')](function(){if(_0x245f21){return db['MemberReport'][_0x47e7('0x8b')]({'where':{'membername':_0x245f21[_0x47e7('0x39')],'type':_0x47e7('0xfa'),'exitAt':null}});}})['then'](function(_0x146008){if(_0x146008[_0x47e7('0x53')]){var _0x548ac3=moment()[_0x47e7('0xa7')]('YYYY-MM-DD\x20HH:mm:ss');for(var _0x2126f3=0x0,_0x5be44b=_0x146008[_0x47e7('0x53')];_0x2126f3<_0x5be44b;_0x2126f3++){_0x146008[_0x2126f3][_0x47e7('0xff')]({'exitAt':_0x548ac3});}}})[_0x47e7('0x1e')](function(){var _0x87059d=[];var _0x580824=utils['getChannels']();_0x580824[_0x47e7('0xf7')](function(_0x329c1a){_0x87059d[_0x47e7('0x50')]({'channel':_0x329c1a,'membername':_0x245f21['name'],'interface':_['isNil'](_0x245f21[_0x47e7('0xa0')])?util[_0x47e7('0xa7')](_0x47e7('0xa8'),_0x245f21[_0x47e7('0x39')]):_0x245f21[_0x47e7('0xa0')],'type':'PAUSE','enterAt':moment()[_0x47e7('0xa7')](_0x47e7('0xf5')),'data1':_0xb36a9b[_0x47e7('0x5f')]['type']||'DEFAULT\x20PAUSE','role':_0x245f21['role'],'internal':_0x245f21[_0x47e7('0x63')]});});return db['MemberReport'][_0x47e7('0x100')](_0x87059d,{'individualHooks':!![]});})[_0x47e7('0x1e')](function(){return _0x245f21['update']({'voicePause':!![],'mailPause':!![],'chatPause':!![],'faxPause':!![],'smsPause':!![],'whatsappPause':!![],'openchannelPause':!![],'pauseType':_0xb36a9b[_0x47e7('0x5f')]['type']||'DEFAULT\x20PAUSE','lastPauseAt':moment()[_0x47e7('0xa7')](_0x47e7('0xf5'))});})[_0x47e7('0x1e')](respondWithResult(_0x5aba08,null))[_0x47e7('0x28')](handleError(_0x5aba08,null));};exports['unpause']=function(_0x44f462,_0x37b6c3){if(_0x44f462['body'][_0x47e7('0x9c')]&&!utils[_0x47e7('0xac')](_0x44f462[_0x47e7('0x5f')]['channel'])){throw new APIBadRequestError(util['format']('Channel\x20parameter\x20%s\x20is\x20invalid',_0x44f462[_0x47e7('0x5f')]['channel']));}return db['User'][_0x47e7('0x38')]({'where':{'id':_0x44f462[_0x47e7('0x5c')]['id']},'attributes':['id','name',_0x47e7('0x2d'),'internal',_0x47e7('0xa0'),_0x47e7('0x9d'),_0x47e7('0x9f'),_0x47e7('0x101'),_0x47e7('0x102'),'faxPause','openchannelPause',_0x47e7('0x103'),'whatsappPause',_0x47e7('0x104'),_0x47e7('0x105')]})[_0x47e7('0x1e')](function(_0x57763f){if(!_0x57763f){throw new APINotFoundError(util[_0x47e7('0xa7')](_0x47e7('0x106'),_0x44f462[_0x47e7('0x5c')]['id']));}return _0x57763f[_0x47e7('0x107')](_0x44f462['body'][_0x47e7('0x9c')]);})['then'](respondWithResult(_0x37b6c3,null))[_0x47e7('0x28')](APIHandleError(_0x37b6c3));};exports[_0x47e7('0x108')]=function(_0x12be58,_0x9ba92b){var _0x5bf5ad={};var _0x51a5eb={};var _0x3a791b;var _0x1f2e53;return db[_0x47e7('0x3d')]['findOne']({'where':{'id':_0x12be58[_0x47e7('0x5c')]['id']}})['then'](handleEntityNotFound(_0x9ba92b,null))[_0x47e7('0x1e')](function(_0xd5e251){if(_0xd5e251){_0x3a791b=_0xd5e251;_0x51a5eb[_0x47e7('0xc9')]=_[_0x47e7('0xcb')](db[_0x47e7('0x109')]['rawAttributes']);_0x51a5eb[_0x47e7('0x49')]=_[_0x47e7('0xcb')](_0x12be58['query']);_0x51a5eb[_0x47e7('0xd1')]=_['intersection'](_0x51a5eb['model'],_0x51a5eb[_0x47e7('0x49')]);_0x5bf5ad[_0x47e7('0x4f')]=_[_0x47e7('0xcc')](_0x51a5eb[_0x47e7('0xc9')],qs[_0x47e7('0xcd')](_0x12be58[_0x47e7('0x49')][_0x47e7('0xcd')]));_0x5bf5ad[_0x47e7('0x4f')]=_0x5bf5ad[_0x47e7('0x4f')]['length']?_0x5bf5ad[_0x47e7('0x4f')]:_0x51a5eb[_0x47e7('0xc9')];_0x5bf5ad[_0x47e7('0xd8')]=qs[_0x47e7('0xce')](_0x12be58[_0x47e7('0x49')]['sort']);_0x5bf5ad[_0x47e7('0xcf')]=qs['filters'](_[_0x47e7('0xd0')](_0x12be58['query'],_0x51a5eb[_0x47e7('0xd1')]));if(_0x12be58[_0x47e7('0x49')][_0x47e7('0x42')]){_0x5bf5ad[_0x47e7('0xcf')]=_[_0x47e7('0xd2')](_0x5bf5ad[_0x47e7('0xcf')],{'$or':_[_0x47e7('0x35')](_0x5bf5ad[_0x47e7('0x4f')],function(_0x1fed0f){var _0x1f290a={};_0x1f290a[_0x1fed0f]={'$like':'%'+_0x12be58[_0x47e7('0x49')][_0x47e7('0x42')]+'%'};return _0x1f290a;})});}_0x5bf5ad=_[_0x47e7('0xd2')]({},_0x5bf5ad,_0x12be58[_0x47e7('0x5d')]);return _0x3a791b['getTeams'](_0x5bf5ad);}})[_0x47e7('0x1e')](function(_0x1c46fa){if(_0x1c46fa){_0x1f2e53=_0x1c46fa[_0x47e7('0x53')];if(!_0x12be58[_0x47e7('0x49')]['hasOwnProperty'](_0x47e7('0xd4'))){_0x5bf5ad[_0x47e7('0x1a')]=qs[_0x47e7('0x1a')](_0x12be58[_0x47e7('0x49')][_0x47e7('0x1a')]);_0x5bf5ad[_0x47e7('0x18')]=qs[_0x47e7('0x18')](_0x12be58['query'][_0x47e7('0x18')]);}return _0x3a791b[_0x47e7('0x108')](_0x5bf5ad);}})[_0x47e7('0x1e')](function(_0x1992cd){if(_0x1992cd){return _0x1992cd?{'count':_0x1f2e53,'rows':_0x1992cd}:null;}})[_0x47e7('0x1e')](respondWithResult(_0x9ba92b,null))['catch'](handleError(_0x9ba92b,null));};exports[_0x47e7('0x10a')]=function(_0x5a3f2d,_0x331b07){var _0x7ff6da=_0x5a3f2d['params']['id'];var _0x5de275=_0x5a3f2d[_0x47e7('0x5f')]?_0x5a3f2d[_0x47e7('0x5f')][_0x47e7('0x62')]:null;var _0x3857a6=[];return Promise[_0x47e7('0xfc')]()[_0x47e7('0x1e')](function(){if(!_0x5de275)throw new APIBadRequestError(_0x47e7('0x10b'));})[_0x47e7('0x1e')](function(){return db[_0x47e7('0x3d')][_0x47e7('0x97')]({'where':{'id':_0x7ff6da}});})[_0x47e7('0x1e')](function(_0x427c84){if(!_0x427c84)throw new APINotFoundError(util[_0x47e7('0xa7')](_0x47e7('0x106'),_0x5a3f2d[_0x47e7('0x5c')]['id']));return db[_0x47e7('0x6c')][_0x47e7('0x10c')](function(_0x229f4e){return _0x427c84['addTeams'](_0x5de275,{'transaction':_0x229f4e})['then'](function(){return db[_0x47e7('0x109')]['findAll']({'where':{'id':{'$in':_0x5de275}}});})['then'](function(_0xa7c8bd){var _0x459c13=_[_0x47e7('0x35')](_0xa7c8bd,function(_0x52799c){return _0x52799c[_0x47e7('0x10d')]();});return Promise['all'](_0x459c13);})[_0x47e7('0x1e')](function(_0x3a2170){_0x3857a6=_[_0x47e7('0x10e')](_0x3a2170);var _0xe43b02=_[_0x47e7('0x35')](_0x3857a6,function(_0x4e2e77){return _0x4e2e77[_0x47e7('0x10f')](_0x427c84['id'],{'transaction':_0x229f4e});});return Promise[_0x47e7('0x5a')](_0xe43b02);})[_0x47e7('0x1e')](function(){if(!_0x427c84['online'])return;var _0x326e29=_[_0x47e7('0x42')](_0x3857a6,function(_0x252ed9){return _0x252ed9[_0x47e7('0x110')](_0x47e7('0x9c'))==='Voice';});var _0x2022dd=_[_0x47e7('0x35')](_0x326e29,function(_0x2a50c4){return db[_0x47e7('0xa9')][_0x47e7('0xaa')]({'membername':_0x427c84[_0x47e7('0x39')],'UserId':_0x427c84['id'],'queue_name':_0x2a50c4[_0x47e7('0x39')],'VoiceQueueId':_0x2a50c4['id'],'interface':_[_0x47e7('0x69')](_0x427c84[_0x47e7('0xa0')])?util[_0x47e7('0xa7')]('SIP/%s',_0x427c84[_0x47e7('0x39')]):_0x427c84[_0x47e7('0xa0')],'paused':_0x427c84['voicePause']||![],'penalty':_0x427c84['penalty']},{'transaction':_0x229f4e});});return Promise[_0x47e7('0x5a')](_0x2022dd);})[_0x47e7('0x1e')](function(){return db[_0x47e7('0x111')][_0x47e7('0x8b')]({'where':{'teamId':{'$in':_0x5de275}}});})[_0x47e7('0x1e')](function(_0x408899){var _0x25f185=_[_0x47e7('0x35')](_0x408899,function(_0x2eba57){return db[_0x47e7('0x112')]['create']({'UserId':_0x427c84['id'],'VoicePrefixId':_0x2eba57[_0x47e7('0x113')]},{'transaction':_0x229f4e});});return Promise[_0x47e7('0x5a')](_0x25f185);});});})[_0x47e7('0x1e')](function(){for(var _0x2896a3=0x0;_0x2896a3<_0x3857a6[_0x47e7('0x53')];_0x2896a3++){var _0x54e0ef=_0x3857a6[_0x2896a3][_0x47e7('0x110')](_0x47e7('0x9c'));var _0x476123=_0x54e0ef+_0x47e7('0xae');socket[_0x47e7('0x2a')](_0x47e7('0x30')+_0x54e0ef+_0x47e7('0x114'),{'UserId':_0x7ff6da,['queueField']:_0x3857a6[_0x2896a3]['id']});}})[_0x47e7('0x1e')](respondWithStatusCode(_0x331b07,null))[_0x47e7('0x28')](APIHandleError(_0x331b07));};exports[_0x47e7('0x115')]=function(_0x314d71,_0x151540){var _0x1fd670=_0x314d71['params']['id'];var _0x2e9a5e=null;if(_0x314d71['query'][_0x47e7('0x62')]){_0x2e9a5e=_[_0x47e7('0x116')](_0x314d71[_0x47e7('0x49')]['ids'])?_0x314d71[_0x47e7('0x49')][_0x47e7('0x62')]:[_0x314d71[_0x47e7('0x49')][_0x47e7('0x62')]];}var _0x5aab1c=[];return Promise[_0x47e7('0xfc')]()[_0x47e7('0x1e')](function(){if(!_0x2e9a5e)throw new APIBadRequestError(_0x47e7('0x117'));})[_0x47e7('0x1e')](function(){return db['User'][_0x47e7('0x97')]({'where':{'id':_0x1fd670}});})[_0x47e7('0x1e')](function(_0x11991b){if(!_0x11991b)throw new APINotFoundError(util[_0x47e7('0xa7')](_0x47e7('0x106'),_0x314d71[_0x47e7('0x5c')]['id']));return db[_0x47e7('0x6c')][_0x47e7('0x10c')](function(_0x58ca32){return _0x11991b[_0x47e7('0x115')](_0x2e9a5e,{'transaction':_0x58ca32})[_0x47e7('0x1e')](function(){return db[_0x47e7('0x109')][_0x47e7('0x8b')]({'where':{'id':{'$in':_0x2e9a5e}}});})[_0x47e7('0x1e')](function(_0x5e5949){var _0x1ed617=_[_0x47e7('0x35')](_0x5e5949,function(_0x2ddc5e){return _0x2ddc5e[_0x47e7('0x10d')]();});return Promise[_0x47e7('0x5a')](_0x1ed617);})[_0x47e7('0x1e')](function(_0x596c6d){_0x5aab1c=_[_0x47e7('0x10e')](_0x596c6d);var _0x1569c5=_[_0x47e7('0x35')](_0x5aab1c,function(_0x58ef34){return _0x58ef34[_0x47e7('0x118')](_0x11991b['id'],{'transaction':_0x58ca32});});return Promise[_0x47e7('0x5a')](_0x1569c5);})[_0x47e7('0x1e')](function(){if(!_0x11991b[_0x47e7('0x9d')])return;var _0x5506ed=_['filter'](_0x5aab1c,function(_0x5c39e8){return _0x5c39e8[_0x47e7('0x110')]('channel')===_0x47e7('0x119');});var _0x3b3e93=_['map'](_0x5506ed,function(_0x265e1c){return db[_0x47e7('0xa9')][_0x47e7('0x3a')]({'where':{'VoiceQueueId':_0x265e1c['id'],'UserId':_0x11991b['id']},'transaction':_0x58ca32});});return Promise[_0x47e7('0x5a')](_0x3b3e93);})[_0x47e7('0x1e')](function(){return db['TeamVoicePrefix'][_0x47e7('0x8b')]({'where':{'teamId':{'$in':_0x2e9a5e}}});})[_0x47e7('0x1e')](function(_0x2dc0b8){var _0x58e266=_['map'](_0x2dc0b8,function(_0xdc6f9c){return db[_0x47e7('0x112')][_0x47e7('0x3a')]({'where':{'UserId':_0x11991b['id'],'VoicePrefixId':_0xdc6f9c[_0x47e7('0x113')]}},{'transaction':_0x58ca32});});return Promise[_0x47e7('0x5a')](_0x58e266);});});})[_0x47e7('0x1e')](function(){for(var _0x1d3399=0x0;_0x1d3399<_0x5aab1c['length'];_0x1d3399++){var _0x332141=_0x5aab1c[_0x1d3399][_0x47e7('0x110')](_0x47e7('0x9c'));var _0x5b7b60=_0x332141+_0x47e7('0xae');socket[_0x47e7('0x2a')](_0x47e7('0x30')+_0x332141+_0x47e7('0xaf'),{'UserId':_0x1fd670,['queueField']:_0x5aab1c[_0x1d3399]['id']});}})['then'](respondWithStatusCode(_0x151540,null))[_0x47e7('0x28')](APIHandleError(_0x151540));};exports['getLists']=function(_0x131265,_0x5c642c){var _0x1e9e03={};var _0x170c75={};var _0x523349;var _0x5e01e6;return db[_0x47e7('0x3d')]['findOne']({'where':{'id':_0x131265[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x5c642c,null))[_0x47e7('0x1e')](function(_0x2dccba){if(_0x2dccba){_0x523349=_0x2dccba;_0x170c75['model']=_[_0x47e7('0xcb')](db[_0x47e7('0x11a')][_0x47e7('0x3e')]);_0x170c75[_0x47e7('0x49')]=_[_0x47e7('0xcb')](_0x131265[_0x47e7('0x49')]);_0x170c75['filters']=_[_0x47e7('0xcc')](_0x170c75[_0x47e7('0xc9')],_0x170c75[_0x47e7('0x49')]);_0x1e9e03['attributes']=_[_0x47e7('0xcc')](_0x170c75[_0x47e7('0xc9')],qs['fields'](_0x131265['query'][_0x47e7('0xcd')]));_0x1e9e03[_0x47e7('0x4f')]=_0x1e9e03[_0x47e7('0x4f')][_0x47e7('0x53')]?_0x1e9e03[_0x47e7('0x4f')]:_0x170c75[_0x47e7('0xc9')];_0x1e9e03[_0x47e7('0xd8')]=qs[_0x47e7('0xce')](_0x131265[_0x47e7('0x49')][_0x47e7('0xce')]);_0x1e9e03[_0x47e7('0xcf')]=qs[_0x47e7('0xd1')](_[_0x47e7('0xd0')](_0x131265[_0x47e7('0x49')],_0x170c75['filters']));if(_0x131265[_0x47e7('0x49')][_0x47e7('0x42')]){_0x1e9e03[_0x47e7('0xcf')]=_['merge'](_0x1e9e03[_0x47e7('0xcf')],{'$or':_[_0x47e7('0x35')](_0x1e9e03[_0x47e7('0x4f')],function(_0xa47c50){var _0x83b798={};_0x83b798[_0xa47c50]={'$like':'%'+_0x131265[_0x47e7('0x49')][_0x47e7('0x42')]+'%'};return _0x83b798;})});}_0x1e9e03=_[_0x47e7('0xd2')]({},_0x1e9e03,_0x131265['options']);return _0x523349['getLists'](_0x1e9e03);}})[_0x47e7('0x1e')](function(_0x44d692){if(_0x44d692){_0x5e01e6=_0x44d692[_0x47e7('0x53')];if(!_0x131265[_0x47e7('0x49')][_0x47e7('0xc4')](_0x47e7('0xd4'))){_0x1e9e03[_0x47e7('0x1a')]=qs['limit'](_0x131265[_0x47e7('0x49')]['limit']);_0x1e9e03[_0x47e7('0x18')]=qs[_0x47e7('0x18')](_0x131265[_0x47e7('0x49')][_0x47e7('0x18')]);}return _0x523349['getLists'](_0x1e9e03);}})[_0x47e7('0x1e')](function(_0x44cd19){if(_0x44cd19){return _0x44cd19?{'count':_0x5e01e6,'rows':_0x44cd19}:null;}})[_0x47e7('0x1e')](respondWithResult(_0x5c642c,null))[_0x47e7('0x28')](handleError(_0x5c642c,null));};exports[_0x47e7('0x11b')]=function(_0x1a8247,_0xe2f5ff){var _0x14dea1={};var _0x48a5bb={};var _0x529192;return db[_0x47e7('0x3d')][_0x47e7('0x97')]({'where':{'id':_0x1a8247[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0xe2f5ff,null))[_0x47e7('0x1e')](function(_0x2832ae){if(_0x2832ae){_0x529192=_0x2832ae;_0x48a5bb[_0x47e7('0xc9')]=_[_0x47e7('0xcb')](db[_0x47e7('0x3d')]['rawAttributes']);_0x48a5bb[_0x47e7('0x49')]=_[_0x47e7('0xcb')](_0x1a8247[_0x47e7('0x49')]);_0x48a5bb[_0x47e7('0xd1')]=_[_0x47e7('0xcc')](_0x48a5bb[_0x47e7('0xc9')],_0x48a5bb[_0x47e7('0x49')]);_0x14dea1[_0x47e7('0x4f')]=_[_0x47e7('0xcc')](_0x48a5bb[_0x47e7('0xc9')],qs[_0x47e7('0xcd')](_0x1a8247[_0x47e7('0x49')][_0x47e7('0xcd')]));_0x14dea1['attributes']=_0x14dea1[_0x47e7('0x4f')][_0x47e7('0x53')]?_0x14dea1[_0x47e7('0x4f')]:_0x48a5bb[_0x47e7('0xc9')];_0x14dea1[_0x47e7('0xd8')]=qs[_0x47e7('0xce')](_0x1a8247['query'][_0x47e7('0xce')]);_0x14dea1[_0x47e7('0xcf')]=qs[_0x47e7('0xd1')](_['pick'](_0x1a8247['query'],_0x48a5bb[_0x47e7('0xd1')]));if(_0x1a8247['query'][_0x47e7('0x42')]){_0x14dea1['where']=_[_0x47e7('0xd2')](_0x14dea1[_0x47e7('0xcf')],{'$or':_[_0x47e7('0x35')](_0x14dea1[_0x47e7('0x4f')],function(_0x21890c){var _0x3469fa={};_0x3469fa[_0x21890c]={'$like':'%'+_0x1a8247[_0x47e7('0x49')][_0x47e7('0x42')]+'%'};return _0x3469fa;})});}_0x14dea1['model']=db['User'];_0x14dea1['as']=_0x47e7('0x31');_0x14dea1=_[_0x47e7('0xd2')]({},_0x14dea1,_0x1a8247[_0x47e7('0x5d')]);return _0x529192[_0x47e7('0xf2')]({'include':[_0x14dea1]});}})[_0x47e7('0x1e')](function(_0x4aceb1){if(_0x4aceb1){var _0x2e5f31={},_0x12204a=[];for(var _0x474391=0x0;_0x474391<_0x4aceb1[_0x47e7('0x53')];_0x474391+=0x1){for(var _0x26c560=0x0,_0x59c71f;_0x26c560<_0x4aceb1[_0x474391]['Agents']['length'];_0x26c560+=0x1){_0x59c71f=_0x4aceb1[_0x474391][_0x47e7('0x31')][_0x26c560][_0x47e7('0x2c')]({'plain':!![]});_0x2e5f31[_0x59c71f['id']]=_0x59c71f;}}_0x2e5f31=_[_0x47e7('0x11c')](_0x2e5f31);for(var _0x439ccf=qs[_0x47e7('0x18')](_0x1a8247[_0x47e7('0x49')][_0x47e7('0x18')]);_0x439ccf<_0x2e5f31[_0x47e7('0x53')]&&_0x12204a[_0x47e7('0x53')]<qs[_0x47e7('0x1a')](_0x1a8247[_0x47e7('0x49')]['limit']);_0x439ccf+=0x1){if(_0x2e5f31[_0x439ccf]){_0x12204a[_0x47e7('0x50')](_0x2e5f31[_0x439ccf]);}}return{'count':_0x2e5f31[_0x47e7('0x53')],'rows':_0x12204a};}})['then'](respondWithResult(_0xe2f5ff,null))[_0x47e7('0x28')](handleError(_0xe2f5ff,null));};exports['destroy']=function(_0x36d80d,_0x37adc4){if(_0x36d80d[_0x47e7('0x30')]['id']==_0x36d80d[_0x47e7('0x5c')]['id']){throw new APIForbiddenError('You\x20can\x27t\x20delete\x20yourself');}return db[_0x47e7('0x3d')]['find']({'where':{'id':_0x36d80d[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](function(_0xc360de){if(!_0xc360de){throw new APINotFoundError(util['format'](_0x47e7('0x106'),_0x36d80d[_0x47e7('0x5c')]['id']));}return db[_0x47e7('0x6c')][_0x47e7('0x10c')](function(_0x12d30d){return db[_0x47e7('0x11d')]['update']({'recallme':![]},{'where':{'UserId':_0x36d80d['params']['id']},'transaction':_0x12d30d})[_0x47e7('0x1e')](function(){return removeEntity(_0x37adc4,_0x12d30d)(_0xc360de);});});})[_0x47e7('0x28')](APIHandleError(_0x37adc4));};exports[_0x47e7('0x11e')]=function(_0x5b0814,_0x2a7fba){return db['User'][_0x47e7('0x38')]({'where':{'id':_0x5b0814[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x2a7fba,null))[_0x47e7('0x1e')](function(_0x4cacbb){if(_0x4cacbb){return _0x4cacbb[_0x47e7('0x11e')](_0x5b0814[_0x47e7('0x5f')][_0x47e7('0x62')],_[_0x47e7('0x11f')](_0x5b0814[_0x47e7('0x5f')],[_0x47e7('0x62'),'id'])||{})[_0x47e7('0xa5')](function(){for(var _0x327fdc=0x0;_0x327fdc<_0x5b0814[_0x47e7('0x5f')][_0x47e7('0x62')][_0x47e7('0x53')];_0x327fdc+=0x1){socket[_0x47e7('0x2a')](_0x47e7('0x120'),{'ChatInteractionId':Number(_0x5b0814[_0x47e7('0x5f')][_0x47e7('0x62')][_0x327fdc]),'UserId':Number(_0x5b0814[_0x47e7('0x5c')]['id'])});}return _0x5b0814[_0x47e7('0x5f')][_0x47e7('0x62')];});}})['then'](respondWithResult(_0x2a7fba,null))[_0x47e7('0x28')](handleError(_0x2a7fba,null));};exports[_0x47e7('0x121')]=function(_0x15847c,_0x398aa7){return db['User'][_0x47e7('0x38')]({'where':{'id':_0x15847c[_0x47e7('0x5c')]['id']}})['then'](handleEntityNotFound(_0x398aa7,null))[_0x47e7('0x1e')](function(_0x43554){if(_0x43554){return _0x43554['removeChatInteractions'](_0x15847c['query'][_0x47e7('0x62')])[_0x47e7('0x1e')](function(){if(_['isArray'](_0x15847c[_0x47e7('0x49')][_0x47e7('0x62')])){for(var _0x55adc1=0x0;_0x55adc1<_0x15847c[_0x47e7('0x49')]['ids'][_0x47e7('0x53')];_0x55adc1+=0x1){socket[_0x47e7('0x2a')]('user_has_chat_interactions:remove',{'ChatInteractionId':Number(_0x15847c[_0x47e7('0x49')][_0x47e7('0x62')][_0x55adc1]),'UserId':Number(_0x15847c['params']['id'])});}}else{socket[_0x47e7('0x2a')]('user_has_chat_interactions:remove',{'ChatInteractionId':Number(_0x15847c[_0x47e7('0x49')][_0x47e7('0x62')]),'UserId':Number(_0x15847c[_0x47e7('0x5c')]['id'])});}});}})[_0x47e7('0x1e')](respondWithStatusCode(_0x398aa7,null))['catch'](handleError(_0x398aa7,null));};exports[_0x47e7('0x122')]=function(_0x3bec6a,_0x528984){return db[_0x47e7('0x3d')]['find']({'where':{'id':_0x3bec6a[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x528984,null))[_0x47e7('0x1e')](function(_0x255f0b){if(_0x255f0b){return _0x255f0b[_0x47e7('0x122')](_0x3bec6a[_0x47e7('0x5f')][_0x47e7('0x62')],_['omit'](_0x3bec6a[_0x47e7('0x5f')],['ids','id'])||{})[_0x47e7('0xa5')](function(){for(var _0x39795c=0x0;_0x39795c<_0x3bec6a[_0x47e7('0x5f')][_0x47e7('0x62')][_0x47e7('0x53')];_0x39795c+=0x1){socket[_0x47e7('0x2a')](_0x47e7('0x123'),{'MailInteractionId':Number(_0x3bec6a[_0x47e7('0x5f')][_0x47e7('0x62')][_0x39795c]),'UserId':Number(_0x3bec6a[_0x47e7('0x5c')]['id'])});}return _0x3bec6a[_0x47e7('0x5f')]['ids'];});}})[_0x47e7('0x1e')](respondWithResult(_0x528984,null))[_0x47e7('0x28')](handleError(_0x528984,null));};exports[_0x47e7('0x124')]=function(_0xc954f0,_0x5d67d3){return db[_0x47e7('0x3d')][_0x47e7('0x38')]({'where':{'id':_0xc954f0[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x5d67d3,null))[_0x47e7('0x1e')](function(_0xd771c4){if(_0xd771c4){return _0xd771c4['removeMailInteractions'](_0xc954f0[_0x47e7('0x49')][_0x47e7('0x62')])[_0x47e7('0x1e')](function(){if(_['isArray'](_0xc954f0[_0x47e7('0x49')][_0x47e7('0x62')])){for(var _0x4bea93=0x0;_0x4bea93<_0xc954f0[_0x47e7('0x49')][_0x47e7('0x62')]['length'];_0x4bea93+=0x1){socket[_0x47e7('0x2a')](_0x47e7('0x125'),{'MailInteractionId':Number(_0xc954f0[_0x47e7('0x49')][_0x47e7('0x62')][_0x4bea93]),'UserId':Number(_0xc954f0[_0x47e7('0x5c')]['id'])});}}else{socket[_0x47e7('0x2a')](_0x47e7('0x125'),{'MailInteractionId':Number(_0xc954f0[_0x47e7('0x49')]['ids']),'UserId':Number(_0xc954f0[_0x47e7('0x5c')]['id'])});}});}})['then'](respondWithStatusCode(_0x5d67d3,null))[_0x47e7('0x28')](handleError(_0x5d67d3,null));};exports[_0x47e7('0x126')]=function(_0x299b5c,_0x2799c4){return db[_0x47e7('0x3d')]['find']({'where':{'id':_0x299b5c[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x2799c4,null))[_0x47e7('0x1e')](function(_0x30152a){if(_0x30152a){return _0x30152a[_0x47e7('0x126')](_0x299b5c[_0x47e7('0x5f')][_0x47e7('0x62')],_[_0x47e7('0x11f')](_0x299b5c[_0x47e7('0x5f')],[_0x47e7('0x62'),'id'])||{})['spread'](function(){for(var _0x25399d=0x0;_0x25399d<_0x299b5c[_0x47e7('0x5f')][_0x47e7('0x62')][_0x47e7('0x53')];_0x25399d+=0x1){socket[_0x47e7('0x2a')](_0x47e7('0x127'),{'FaxInteractionId':Number(_0x299b5c[_0x47e7('0x5f')][_0x47e7('0x62')][_0x25399d]),'UserId':Number(_0x299b5c[_0x47e7('0x5c')]['id'])});}return _0x299b5c[_0x47e7('0x5f')][_0x47e7('0x62')];});}})['then'](respondWithResult(_0x2799c4,null))[_0x47e7('0x28')](handleError(_0x2799c4,null));};exports[_0x47e7('0x128')]=function(_0xbf938f,_0x2bea3f){return db[_0x47e7('0x3d')][_0x47e7('0x38')]({'where':{'id':_0xbf938f[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x2bea3f,null))['then'](function(_0x354100){if(_0x354100){return _0x354100['removeFaxInteractions'](_0xbf938f['query'][_0x47e7('0x62')])[_0x47e7('0x1e')](function(){if(_[_0x47e7('0x116')](_0xbf938f[_0x47e7('0x49')][_0x47e7('0x62')])){for(var _0x57aea9=0x0;_0x57aea9<_0xbf938f[_0x47e7('0x49')][_0x47e7('0x62')][_0x47e7('0x53')];_0x57aea9+=0x1){socket[_0x47e7('0x2a')]('user_has_fax_interactions:remove',{'FaxInteractionId':Number(_0xbf938f[_0x47e7('0x49')]['ids'][_0x57aea9]),'UserId':Number(_0xbf938f['params']['id'])});}}else{socket[_0x47e7('0x2a')](_0x47e7('0x129'),{'FaxInteractionId':Number(_0xbf938f[_0x47e7('0x49')]['ids']),'UserId':Number(_0xbf938f[_0x47e7('0x5c')]['id'])});}});}})['then'](respondWithStatusCode(_0x2bea3f,null))[_0x47e7('0x28')](handleError(_0x2bea3f,null));};exports[_0x47e7('0x12a')]=function(_0x82ba47,_0x35a082){return db[_0x47e7('0x3d')][_0x47e7('0x38')]({'where':{'id':_0x82ba47[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x35a082,null))[_0x47e7('0x1e')](function(_0x120ec9){if(_0x120ec9){return _0x120ec9[_0x47e7('0x12a')](_0x82ba47[_0x47e7('0x5f')][_0x47e7('0x62')],_[_0x47e7('0x11f')](_0x82ba47[_0x47e7('0x5f')],[_0x47e7('0x62'),'id'])||{})['spread'](function(){for(var _0x304249=0x0;_0x304249<_0x82ba47[_0x47e7('0x5f')][_0x47e7('0x62')]['length'];_0x304249+=0x1){socket[_0x47e7('0x2a')](_0x47e7('0x12b'),{'SmsInteractionId':Number(_0x82ba47[_0x47e7('0x5f')][_0x47e7('0x62')][_0x304249]),'UserId':Number(_0x82ba47[_0x47e7('0x5c')]['id'])});}return _0x82ba47[_0x47e7('0x5f')][_0x47e7('0x62')];});}})[_0x47e7('0x1e')](respondWithResult(_0x35a082,null))[_0x47e7('0x28')](handleError(_0x35a082,null));};exports[_0x47e7('0x12c')]=function(_0x5ae5df,_0x3978b0){return db[_0x47e7('0x3d')][_0x47e7('0x38')]({'where':{'id':_0x5ae5df[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x3978b0,null))[_0x47e7('0x1e')](function(_0x11eb12){if(_0x11eb12){return _0x11eb12[_0x47e7('0x12c')](_0x5ae5df[_0x47e7('0x49')][_0x47e7('0x62')])[_0x47e7('0x1e')](function(){if(_['isArray'](_0x5ae5df[_0x47e7('0x49')][_0x47e7('0x62')])){for(var _0x31b28f=0x0;_0x31b28f<_0x5ae5df[_0x47e7('0x49')]['ids'][_0x47e7('0x53')];_0x31b28f+=0x1){socket[_0x47e7('0x2a')]('user_has_sms_interactions:remove',{'SmsInteractionId':Number(_0x5ae5df[_0x47e7('0x49')]['ids'][_0x31b28f]),'UserId':Number(_0x5ae5df['params']['id'])});}}else{socket[_0x47e7('0x2a')](_0x47e7('0x12d'),{'SmsInteractionId':Number(_0x5ae5df[_0x47e7('0x49')]['ids']),'UserId':Number(_0x5ae5df[_0x47e7('0x5c')]['id'])});}});}})[_0x47e7('0x1e')](respondWithStatusCode(_0x3978b0,null))[_0x47e7('0x28')](handleError(_0x3978b0,null));};exports[_0x47e7('0x12e')]=function(_0x5aa614,_0x584d26){return db[_0x47e7('0x3d')]['find']({'where':{'id':_0x5aa614[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x584d26,null))[_0x47e7('0x1e')](function(_0xa5294f){if(_0xa5294f){return _0xa5294f[_0x47e7('0x12e')](_0x5aa614['body'][_0x47e7('0x62')],_['omit'](_0x5aa614[_0x47e7('0x5f')],[_0x47e7('0x62'),'id'])||{})[_0x47e7('0xa5')](function(){for(var _0x482e52=0x0;_0x482e52<_0x5aa614[_0x47e7('0x5f')]['ids'][_0x47e7('0x53')];_0x482e52+=0x1){socket[_0x47e7('0x2a')](_0x47e7('0x12f'),{'OpenchannelInteractionId':Number(_0x5aa614[_0x47e7('0x5f')][_0x47e7('0x62')][_0x482e52]),'UserId':Number(_0x5aa614['params']['id'])});}return _0x5aa614[_0x47e7('0x5f')]['ids'];});}})[_0x47e7('0x1e')](respondWithResult(_0x584d26,null))['catch'](handleError(_0x584d26,null));};exports['removeOpenchannelInteractions']=function(_0x40c20d,_0x1c48b8){return db[_0x47e7('0x3d')][_0x47e7('0x38')]({'where':{'id':_0x40c20d[_0x47e7('0x5c')]['id']}})['then'](handleEntityNotFound(_0x1c48b8,null))[_0x47e7('0x1e')](function(_0x5b7590){if(_0x5b7590){return _0x5b7590[_0x47e7('0x130')](_0x40c20d[_0x47e7('0x49')][_0x47e7('0x62')])[_0x47e7('0x1e')](function(){if(_['isArray'](_0x40c20d[_0x47e7('0x49')]['ids'])){for(var _0x17d6d6=0x0;_0x17d6d6<_0x40c20d['query'][_0x47e7('0x62')]['length'];_0x17d6d6+=0x1){socket[_0x47e7('0x2a')]('user_has_openchannel_interactions:remove',{'OpenchannelInteractionId':Number(_0x40c20d['query']['ids'][_0x17d6d6]),'UserId':Number(_0x40c20d[_0x47e7('0x5c')]['id'])});}}else{socket['emit']('user_has_openchannel_interactions:remove',{'OpenchannelInteractionId':Number(_0x40c20d['query'][_0x47e7('0x62')]),'UserId':Number(_0x40c20d[_0x47e7('0x5c')]['id'])});}});}})['then'](respondWithStatusCode(_0x1c48b8,null))['catch'](handleError(_0x1c48b8,null));};exports[_0x47e7('0x131')]=function(_0x47ccf4,_0x10bb90){return db[_0x47e7('0x3d')][_0x47e7('0x38')]({'where':{'id':_0x47ccf4[_0x47e7('0x5c')]['id']}})['then'](handleEntityNotFound(_0x10bb90,null))['then'](function(_0x23a5a9){if(_0x23a5a9){return _0x23a5a9['addWhatsappInteractions'](_0x47ccf4['body'][_0x47e7('0x62')],_['omit'](_0x47ccf4[_0x47e7('0x5f')],[_0x47e7('0x62'),'id'])||{})['spread'](function(){for(var _0x18a040=0x0;_0x18a040<_0x47ccf4['body'][_0x47e7('0x62')][_0x47e7('0x53')];_0x18a040+=0x1){socket['emit'](_0x47e7('0x132'),{'WhatsappInteractionId':Number(_0x47ccf4[_0x47e7('0x5f')][_0x47e7('0x62')][_0x18a040]),'UserId':Number(_0x47ccf4['params']['id'])});}return _0x47ccf4[_0x47e7('0x5f')][_0x47e7('0x62')];});}})[_0x47e7('0x1e')](respondWithResult(_0x10bb90,null))[_0x47e7('0x28')](handleError(_0x10bb90,null));};exports[_0x47e7('0x133')]=function(_0x41e8e3,_0x17f3d6){return db[_0x47e7('0x3d')]['find']({'where':{'id':_0x41e8e3[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x17f3d6,null))['then'](function(_0x235f9c){if(_0x235f9c){return _0x235f9c[_0x47e7('0x133')](_0x41e8e3[_0x47e7('0x49')]['ids']);}})[_0x47e7('0x1e')](respondWithStatusCode(_0x17f3d6,null))['catch'](handleError(_0x17f3d6,null));};exports['getVoicePrefixes']=function(_0x25f0b3,_0x30b64b){var _0x90d9a6={};var _0x159473={};var _0x28bc28;var _0x499601;return db[_0x47e7('0x3d')][_0x47e7('0x97')]({'where':{'id':_0x25f0b3[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x30b64b,null))[_0x47e7('0x1e')](function(_0x28c038){if(_0x28c038){_0x28bc28=_0x28c038;_0x159473[_0x47e7('0xc9')]=_[_0x47e7('0xcb')](db[_0x47e7('0x134')][_0x47e7('0x3e')]);_0x159473[_0x47e7('0x49')]=_['keys'](_0x25f0b3[_0x47e7('0x49')]);_0x159473[_0x47e7('0xd1')]=_[_0x47e7('0xcc')](_0x159473[_0x47e7('0xc9')],_0x159473[_0x47e7('0x49')]);_0x90d9a6[_0x47e7('0x4f')]=_['intersection'](_0x159473[_0x47e7('0xc9')],qs[_0x47e7('0xcd')](_0x25f0b3[_0x47e7('0x49')][_0x47e7('0xcd')]));_0x90d9a6[_0x47e7('0x4f')]=_0x90d9a6['attributes'][_0x47e7('0x53')]?_0x90d9a6['attributes']:_0x159473[_0x47e7('0xc9')];_0x90d9a6['order']=qs[_0x47e7('0xce')](_0x25f0b3['query'][_0x47e7('0xce')]);_0x90d9a6[_0x47e7('0xcf')]=qs[_0x47e7('0xd1')](_[_0x47e7('0xd0')](_0x25f0b3[_0x47e7('0x49')],_0x159473[_0x47e7('0xd1')]));if(_0x25f0b3['query']['filter']){_0x90d9a6[_0x47e7('0xcf')]=_[_0x47e7('0xd2')](_0x90d9a6[_0x47e7('0xcf')],{'$or':_['map'](_0x90d9a6[_0x47e7('0x4f')],function(_0x4c11e0){var _0x1a326c={};_0x1a326c[_0x4c11e0]={'$like':'%'+_0x25f0b3[_0x47e7('0x49')][_0x47e7('0x42')]+'%'};return _0x1a326c;})});}_0x90d9a6=_[_0x47e7('0xd2')]({},_0x90d9a6,_0x25f0b3[_0x47e7('0x5d')]);return _0x28bc28[_0x47e7('0x135')](_0x90d9a6);}})['then'](function(_0x51694d){if(_0x51694d){_0x499601=_0x51694d[_0x47e7('0x53')];if(!_0x25f0b3['query'][_0x47e7('0xc4')](_0x47e7('0xd4'))){_0x90d9a6[_0x47e7('0x1a')]=qs['limit'](_0x25f0b3['query'][_0x47e7('0x1a')]);_0x90d9a6[_0x47e7('0x18')]=qs['offset'](_0x25f0b3['query'][_0x47e7('0x18')]);}return _0x28bc28['getVoicePrefixes'](_0x90d9a6);}})[_0x47e7('0x1e')](function(_0x381209){if(_0x381209){return _0x381209?{'count':_0x499601,'rows':_0x381209}:null;}})[_0x47e7('0x1e')](respondWithResult(_0x30b64b,null))['catch'](handleError(_0x30b64b,null));};exports['getFaxAccounts']=function(_0x54e025,_0x5ae144){var _0x1932c1={};var _0x457869={};var _0x478ada;var _0x1ec3a0;return db[_0x47e7('0x3d')][_0x47e7('0x97')]({'where':{'id':_0x54e025[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x5ae144,null))[_0x47e7('0x1e')](function(_0x492c4d){if(_0x492c4d){_0x478ada=_0x492c4d;_0x457869[_0x47e7('0xc9')]=_[_0x47e7('0xcb')](db['FaxAccount']['rawAttributes']);_0x457869[_0x47e7('0x49')]=_[_0x47e7('0xcb')](_0x54e025[_0x47e7('0x49')]);_0x457869[_0x47e7('0xd1')]=_[_0x47e7('0xcc')](_0x457869[_0x47e7('0xc9')],_0x457869['query']);_0x1932c1[_0x47e7('0x4f')]=_['intersection'](_0x457869[_0x47e7('0xc9')],qs[_0x47e7('0xcd')](_0x54e025['query'][_0x47e7('0xcd')]));_0x1932c1['attributes']=_0x1932c1[_0x47e7('0x4f')][_0x47e7('0x53')]?_0x1932c1['attributes']:_0x457869['model'];_0x1932c1['order']=qs['sort'](_0x54e025[_0x47e7('0x49')][_0x47e7('0xce')]);_0x1932c1['where']=qs['filters'](_[_0x47e7('0xd0')](_0x54e025[_0x47e7('0x49')],_0x457869[_0x47e7('0xd1')]));if(_0x54e025['query'][_0x47e7('0x42')]){_0x1932c1[_0x47e7('0xcf')]=_[_0x47e7('0xd2')](_0x1932c1[_0x47e7('0xcf')],{'$or':_[_0x47e7('0x35')](_0x1932c1['attributes'],function(_0x295a57){var _0x599689={};_0x599689[_0x295a57]={'$like':'%'+_0x54e025[_0x47e7('0x49')]['filter']+'%'};return _0x599689;})});}_0x1932c1=_['merge']({},_0x1932c1,_0x54e025[_0x47e7('0x5d')]);return _0x478ada['getFaxAccounts'](_0x1932c1);}})[_0x47e7('0x1e')](function(_0x14c410){if(_0x14c410){_0x1ec3a0=_0x14c410[_0x47e7('0x53')];if(!_0x54e025['query']['hasOwnProperty'](_0x47e7('0xd4'))){_0x1932c1[_0x47e7('0x1a')]=qs[_0x47e7('0x1a')](_0x54e025[_0x47e7('0x49')]['limit']);_0x1932c1[_0x47e7('0x18')]=qs[_0x47e7('0x18')](_0x54e025[_0x47e7('0x49')]['offset']);}return _0x478ada[_0x47e7('0x136')](_0x1932c1);}})['then'](function(_0x20c269){if(_0x20c269){return _0x20c269?{'count':_0x1ec3a0,'rows':_0x20c269}:null;}})['then'](respondWithResult(_0x5ae144,null))[_0x47e7('0x28')](handleError(_0x5ae144,null));};exports['addFaxAccounts']=function(_0x14cdf4,_0x1977ce){return db[_0x47e7('0x3d')][_0x47e7('0x38')]({'where':{'id':_0x14cdf4[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x1977ce,null))[_0x47e7('0x1e')](function(_0x2a15ad){if(_0x2a15ad){return _0x2a15ad[_0x47e7('0x137')](_0x14cdf4[_0x47e7('0x5f')][_0x47e7('0x62')],_[_0x47e7('0x11f')](_0x14cdf4[_0x47e7('0x5f')],[_0x47e7('0x62'),'id'])||{});}})[_0x47e7('0x1e')](respondWithResult(_0x1977ce,null))['catch'](handleError(_0x1977ce,null));};exports['removeFaxAccounts']=function(_0x1ab1ad,_0x284ba4){return db[_0x47e7('0x3d')][_0x47e7('0x38')]({'where':{'id':_0x1ab1ad[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x284ba4,null))[_0x47e7('0x1e')](function(_0x76b173){if(_0x76b173){return _0x76b173[_0x47e7('0x138')](_0x1ab1ad[_0x47e7('0x49')][_0x47e7('0x62')]);}})[_0x47e7('0x1e')](respondWithStatusCode(_0x284ba4,null))['catch'](handleError(_0x284ba4,null));};exports[_0x47e7('0x139')]=function(_0x3c7208,_0x14ee5f){var _0x114a4c={};var _0x52ab3b={};var _0x45438b;var _0x46d210;return db['User'][_0x47e7('0x97')]({'where':{'id':_0x3c7208['params']['id']}})['then'](handleEntityNotFound(_0x14ee5f,null))[_0x47e7('0x1e')](function(_0x228bd7){if(_0x228bd7){_0x45438b=_0x228bd7;_0x52ab3b[_0x47e7('0xc9')]=_['keys'](db['MailAccount'][_0x47e7('0x3e')]);_0x52ab3b['query']=_[_0x47e7('0xcb')](_0x3c7208[_0x47e7('0x49')]);_0x52ab3b['filters']=_[_0x47e7('0xcc')](_0x52ab3b[_0x47e7('0xc9')],_0x52ab3b[_0x47e7('0x49')]);_0x114a4c[_0x47e7('0x4f')]=_[_0x47e7('0xcc')](_0x52ab3b['model'],qs['fields'](_0x3c7208['query'][_0x47e7('0xcd')]));_0x114a4c[_0x47e7('0x4f')]=_0x114a4c['attributes'][_0x47e7('0x53')]?_0x114a4c[_0x47e7('0x4f')]:_0x52ab3b[_0x47e7('0xc9')];_0x114a4c[_0x47e7('0xd8')]=qs['sort'](_0x3c7208['query'][_0x47e7('0xce')]);_0x114a4c['where']=qs[_0x47e7('0xd1')](_['pick'](_0x3c7208[_0x47e7('0x49')],_0x52ab3b[_0x47e7('0xd1')]));if(_0x3c7208[_0x47e7('0x49')]['filter']){_0x114a4c[_0x47e7('0xcf')]=_[_0x47e7('0xd2')](_0x114a4c[_0x47e7('0xcf')],{'$or':_[_0x47e7('0x35')](_0x114a4c['attributes'],function(_0x3c20ee){var _0x4b54d0={};_0x4b54d0[_0x3c20ee]={'$like':'%'+_0x3c7208[_0x47e7('0x49')][_0x47e7('0x42')]+'%'};return _0x4b54d0;})});}_0x114a4c=_[_0x47e7('0xd2')]({},_0x114a4c,_0x3c7208[_0x47e7('0x5d')]);return _0x45438b[_0x47e7('0x139')](_0x114a4c);}})['then'](function(_0x57ba25){if(_0x57ba25){_0x46d210=_0x57ba25['length'];if(!_0x3c7208[_0x47e7('0x49')][_0x47e7('0xc4')]('nolimit')){_0x114a4c['limit']=qs[_0x47e7('0x1a')](_0x3c7208[_0x47e7('0x49')][_0x47e7('0x1a')]);_0x114a4c['offset']=qs['offset'](_0x3c7208[_0x47e7('0x49')]['offset']);}return _0x45438b['getMailAccounts'](_0x114a4c);}})[_0x47e7('0x1e')](function(_0x2d9874){if(_0x2d9874){return _0x2d9874?{'count':_0x46d210,'rows':_0x2d9874}:null;}})[_0x47e7('0x1e')](respondWithResult(_0x14ee5f,null))[_0x47e7('0x28')](handleError(_0x14ee5f,null));};exports[_0x47e7('0x13a')]=function(_0x2d6538,_0x331aef){return db[_0x47e7('0x3d')][_0x47e7('0x38')]({'where':{'id':_0x2d6538[_0x47e7('0x5c')]['id']}})['then'](handleEntityNotFound(_0x331aef,null))[_0x47e7('0x1e')](function(_0x1b1831){if(_0x1b1831){return _0x1b1831['addMailAccounts'](_0x2d6538[_0x47e7('0x5f')][_0x47e7('0x62')],_[_0x47e7('0x11f')](_0x2d6538[_0x47e7('0x5f')],[_0x47e7('0x62'),'id'])||{});}})[_0x47e7('0x1e')](respondWithResult(_0x331aef,null))[_0x47e7('0x28')](handleError(_0x331aef,null));};exports[_0x47e7('0x13b')]=function(_0x1d5a26,_0x876cd7){return db[_0x47e7('0x3d')][_0x47e7('0x38')]({'where':{'id':_0x1d5a26[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x876cd7,null))[_0x47e7('0x1e')](function(_0x597d35){if(_0x597d35){return _0x597d35['removeMailAccounts'](_0x1d5a26['query'][_0x47e7('0x62')]);}})['then'](respondWithStatusCode(_0x876cd7,null))[_0x47e7('0x28')](handleError(_0x876cd7,null));};exports[_0x47e7('0x13c')]=function(_0x493146,_0x59a86d){var _0x352d65={};var _0x3a4fe1={};var _0x2ce46d;var _0x454a33;return db['User']['findOne']({'where':{'id':_0x493146[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x59a86d,null))[_0x47e7('0x1e')](function(_0x2c0a7b){if(_0x2c0a7b){_0x2ce46d=_0x2c0a7b;_0x3a4fe1[_0x47e7('0xc9')]=_[_0x47e7('0xcb')](db['OpenchannelAccount'][_0x47e7('0x3e')]);_0x3a4fe1[_0x47e7('0x49')]=_[_0x47e7('0xcb')](_0x493146['query']);_0x3a4fe1[_0x47e7('0xd1')]=_[_0x47e7('0xcc')](_0x3a4fe1[_0x47e7('0xc9')],_0x3a4fe1[_0x47e7('0x49')]);_0x352d65[_0x47e7('0x4f')]=_[_0x47e7('0xcc')](_0x3a4fe1['model'],qs[_0x47e7('0xcd')](_0x493146[_0x47e7('0x49')][_0x47e7('0xcd')]));_0x352d65['attributes']=_0x352d65[_0x47e7('0x4f')][_0x47e7('0x53')]?_0x352d65['attributes']:_0x3a4fe1['model'];_0x352d65['order']=qs[_0x47e7('0xce')](_0x493146[_0x47e7('0x49')][_0x47e7('0xce')]);_0x352d65['where']=qs[_0x47e7('0xd1')](_[_0x47e7('0xd0')](_0x493146[_0x47e7('0x49')],_0x3a4fe1[_0x47e7('0xd1')]));if(_0x493146[_0x47e7('0x49')][_0x47e7('0x42')]){_0x352d65[_0x47e7('0xcf')]=_['merge'](_0x352d65[_0x47e7('0xcf')],{'$or':_[_0x47e7('0x35')](_0x352d65[_0x47e7('0x4f')],function(_0x2fda1f){var _0xa9a2e={};_0xa9a2e[_0x2fda1f]={'$like':'%'+_0x493146['query'][_0x47e7('0x42')]+'%'};return _0xa9a2e;})});}_0x352d65=_['merge']({},_0x352d65,_0x493146[_0x47e7('0x5d')]);return _0x2ce46d[_0x47e7('0x13c')](_0x352d65);}})[_0x47e7('0x1e')](function(_0x40a110){if(_0x40a110){_0x454a33=_0x40a110[_0x47e7('0x53')];if(!_0x493146[_0x47e7('0x49')][_0x47e7('0xc4')](_0x47e7('0xd4'))){_0x352d65[_0x47e7('0x1a')]=qs[_0x47e7('0x1a')](_0x493146[_0x47e7('0x49')][_0x47e7('0x1a')]);_0x352d65[_0x47e7('0x18')]=qs['offset'](_0x493146[_0x47e7('0x49')][_0x47e7('0x18')]);}return _0x2ce46d['getOpenchannelAccounts'](_0x352d65);}})[_0x47e7('0x1e')](function(_0x106cf1){if(_0x106cf1){return _0x106cf1?{'count':_0x454a33,'rows':_0x106cf1}:null;}})['then'](respondWithResult(_0x59a86d,null))[_0x47e7('0x28')](handleError(_0x59a86d,null));};exports[_0x47e7('0x13d')]=function(_0x4d1fbb,_0x570378){return db[_0x47e7('0x3d')]['find']({'where':{'id':_0x4d1fbb[_0x47e7('0x5c')]['id']}})['then'](handleEntityNotFound(_0x570378,null))[_0x47e7('0x1e')](function(_0x389dae){if(_0x389dae){return _0x389dae[_0x47e7('0x13d')](_0x4d1fbb[_0x47e7('0x5f')][_0x47e7('0x62')],_[_0x47e7('0x11f')](_0x4d1fbb[_0x47e7('0x5f')],[_0x47e7('0x62'),'id'])||{});}})['then'](respondWithResult(_0x570378,null))[_0x47e7('0x28')](handleError(_0x570378,null));};exports[_0x47e7('0x13e')]=function(_0x1900eb,_0xed2b5e){return db[_0x47e7('0x3d')][_0x47e7('0x38')]({'where':{'id':_0x1900eb[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0xed2b5e,null))[_0x47e7('0x1e')](function(_0x5102a1){if(_0x5102a1){return _0x5102a1[_0x47e7('0x13e')](_0x1900eb[_0x47e7('0x49')][_0x47e7('0x62')]);}})[_0x47e7('0x1e')](respondWithStatusCode(_0xed2b5e,null))[_0x47e7('0x28')](handleError(_0xed2b5e,null));};exports[_0x47e7('0x13f')]=function(_0x5349a4,_0x54878e){var _0x1e9d5a={};var _0x522a2e={};var _0x46e500;var _0x6c2280;return db[_0x47e7('0x3d')][_0x47e7('0x97')]({'where':{'id':_0x5349a4[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x54878e,null))[_0x47e7('0x1e')](function(_0x53a68e){if(_0x53a68e){_0x46e500=_0x53a68e;_0x522a2e['model']=_[_0x47e7('0xcb')](db[_0x47e7('0x140')][_0x47e7('0x3e')]);_0x522a2e[_0x47e7('0x49')]=_['keys'](_0x5349a4[_0x47e7('0x49')]);_0x522a2e[_0x47e7('0xd1')]=_[_0x47e7('0xcc')](_0x522a2e['model'],_0x522a2e[_0x47e7('0x49')]);_0x1e9d5a[_0x47e7('0x4f')]=_[_0x47e7('0xcc')](_0x522a2e['model'],qs[_0x47e7('0xcd')](_0x5349a4['query'][_0x47e7('0xcd')]));_0x1e9d5a[_0x47e7('0x4f')]=_0x1e9d5a[_0x47e7('0x4f')][_0x47e7('0x53')]?_0x1e9d5a[_0x47e7('0x4f')]:_0x522a2e['model'];_0x1e9d5a[_0x47e7('0xd8')]=qs[_0x47e7('0xce')](_0x5349a4[_0x47e7('0x49')][_0x47e7('0xce')]);_0x1e9d5a[_0x47e7('0xcf')]=qs['filters'](_[_0x47e7('0xd0')](_0x5349a4['query'],_0x522a2e[_0x47e7('0xd1')]));if(_0x5349a4[_0x47e7('0x49')][_0x47e7('0x42')]){_0x1e9d5a[_0x47e7('0xcf')]=_[_0x47e7('0xd2')](_0x1e9d5a[_0x47e7('0xcf')],{'$or':_['map'](_0x1e9d5a['attributes'],function(_0x58e555){var _0x16563f={};_0x16563f[_0x58e555]={'$like':'%'+_0x5349a4[_0x47e7('0x49')][_0x47e7('0x42')]+'%'};return _0x16563f;})});}_0x1e9d5a=_['merge']({},_0x1e9d5a,_0x5349a4['options']);return _0x46e500['getSmsAccounts'](_0x1e9d5a);}})['then'](function(_0x2a4029){if(_0x2a4029){_0x6c2280=_0x2a4029['length'];if(!_0x5349a4[_0x47e7('0x49')][_0x47e7('0xc4')](_0x47e7('0xd4'))){_0x1e9d5a['limit']=qs[_0x47e7('0x1a')](_0x5349a4[_0x47e7('0x49')][_0x47e7('0x1a')]);_0x1e9d5a['offset']=qs[_0x47e7('0x18')](_0x5349a4[_0x47e7('0x49')][_0x47e7('0x18')]);}return _0x46e500[_0x47e7('0x13f')](_0x1e9d5a);}})['then'](function(_0x5c8007){if(_0x5c8007){return _0x5c8007?{'count':_0x6c2280,'rows':_0x5c8007}:null;}})[_0x47e7('0x1e')](respondWithResult(_0x54878e,null))[_0x47e7('0x28')](handleError(_0x54878e,null));};exports[_0x47e7('0x141')]=function(_0x4608e7,_0x37ad4c){return db[_0x47e7('0x3d')][_0x47e7('0x38')]({'where':{'id':_0x4608e7[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x37ad4c,null))['then'](function(_0x39a387){if(_0x39a387){return _0x39a387[_0x47e7('0x141')](_0x4608e7['body'][_0x47e7('0x62')],_[_0x47e7('0x11f')](_0x4608e7[_0x47e7('0x5f')],[_0x47e7('0x62'),'id'])||{});}})[_0x47e7('0x1e')](respondWithResult(_0x37ad4c,null))[_0x47e7('0x28')](handleError(_0x37ad4c,null));};exports['removeSmsAccounts']=function(_0x32ff73,_0x1b4b09){return db[_0x47e7('0x3d')]['find']({'where':{'id':_0x32ff73[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x1b4b09,null))[_0x47e7('0x1e')](function(_0x578a8a){if(_0x578a8a){return _0x578a8a['removeSmsAccounts'](_0x32ff73[_0x47e7('0x49')]['ids']);}})[_0x47e7('0x1e')](respondWithStatusCode(_0x1b4b09,null))[_0x47e7('0x28')](handleError(_0x1b4b09,null));};exports['getChatWebsites']=function(_0x19a571,_0x3b8dbc){var _0x1be290={};var _0x1e33cf={};var _0xb0e673;var _0x50b152;return db[_0x47e7('0x3d')]['findOne']({'where':{'id':_0x19a571[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x3b8dbc,null))[_0x47e7('0x1e')](function(_0x3de9c7){if(_0x3de9c7){_0xb0e673=_0x3de9c7;_0x1e33cf[_0x47e7('0xc9')]=_['keys'](db[_0x47e7('0x142')][_0x47e7('0x3e')]);_0x1e33cf[_0x47e7('0x49')]=_[_0x47e7('0xcb')](_0x19a571[_0x47e7('0x49')]);_0x1e33cf[_0x47e7('0xd1')]=_['intersection'](_0x1e33cf[_0x47e7('0xc9')],_0x1e33cf[_0x47e7('0x49')]);_0x1be290[_0x47e7('0x4f')]=_[_0x47e7('0xcc')](_0x1e33cf[_0x47e7('0xc9')],qs['fields'](_0x19a571[_0x47e7('0x49')][_0x47e7('0xcd')]));_0x1be290[_0x47e7('0x4f')]=_0x1be290[_0x47e7('0x4f')]['length']?_0x1be290[_0x47e7('0x4f')]:_0x1e33cf['model'];_0x1be290['order']=qs[_0x47e7('0xce')](_0x19a571[_0x47e7('0x49')][_0x47e7('0xce')]);_0x1be290['where']=qs[_0x47e7('0xd1')](_[_0x47e7('0xd0')](_0x19a571[_0x47e7('0x49')],_0x1e33cf['filters']));if(_0x19a571[_0x47e7('0x49')][_0x47e7('0x42')]){_0x1be290[_0x47e7('0xcf')]=_['merge'](_0x1be290[_0x47e7('0xcf')],{'$or':_[_0x47e7('0x35')](_0x1be290[_0x47e7('0x4f')],function(_0x881029){var _0x578dc3={};_0x578dc3[_0x881029]={'$like':'%'+_0x19a571[_0x47e7('0x49')][_0x47e7('0x42')]+'%'};return _0x578dc3;})});}_0x1be290=_['merge']({},_0x1be290,_0x19a571[_0x47e7('0x5d')]);return _0xb0e673['getChatWebsites'](_0x1be290);}})['then'](function(_0x17e7c1){if(_0x17e7c1){_0x50b152=_0x17e7c1[_0x47e7('0x53')];if(!_0x19a571[_0x47e7('0x49')][_0x47e7('0xc4')](_0x47e7('0xd4'))){_0x1be290[_0x47e7('0x1a')]=qs['limit'](_0x19a571[_0x47e7('0x49')]['limit']);_0x1be290[_0x47e7('0x18')]=qs[_0x47e7('0x18')](_0x19a571[_0x47e7('0x49')][_0x47e7('0x18')]);}return _0xb0e673[_0x47e7('0x143')](_0x1be290);}})[_0x47e7('0x1e')](function(_0x4b0b4e){if(_0x4b0b4e){return _0x4b0b4e?{'count':_0x50b152,'rows':_0x4b0b4e}:null;}})[_0x47e7('0x1e')](respondWithResult(_0x3b8dbc,null))[_0x47e7('0x28')](handleError(_0x3b8dbc,null));};exports['addChatWebsites']=function(_0x18ef4f,_0x5e7b12){return db[_0x47e7('0x3d')]['find']({'where':{'id':_0x18ef4f['params']['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x5e7b12,null))[_0x47e7('0x1e')](function(_0x5b787c){if(_0x5b787c){return _0x5b787c[_0x47e7('0x144')](_0x18ef4f[_0x47e7('0x5f')][_0x47e7('0x62')],_[_0x47e7('0x11f')](_0x18ef4f[_0x47e7('0x5f')],['ids','id'])||{});}})[_0x47e7('0x1e')](respondWithResult(_0x5e7b12,null))[_0x47e7('0x28')](handleError(_0x5e7b12,null));};exports[_0x47e7('0x145')]=function(_0x4b4922,_0xb823f){return db[_0x47e7('0x3d')]['find']({'where':{'id':_0x4b4922[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0xb823f,null))[_0x47e7('0x1e')](function(_0x451c39){if(_0x451c39){return _0x451c39[_0x47e7('0x145')](_0x4b4922[_0x47e7('0x49')][_0x47e7('0x62')]);}})[_0x47e7('0x1e')](respondWithStatusCode(_0xb823f,null))[_0x47e7('0x28')](handleError(_0xb823f,null));};exports[_0x47e7('0x146')]=function(_0x26d820,_0x9cf997){var _0x17b356={};var _0x54d1f7={};var _0x33bbf8;var _0x5c51b9;return db[_0x47e7('0x3d')]['findOne']({'where':{'id':_0x26d820[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x9cf997,null))[_0x47e7('0x1e')](function(_0x3496c7){if(_0x3496c7){_0x33bbf8=_0x3496c7;_0x54d1f7[_0x47e7('0xc9')]=_[_0x47e7('0xcb')](db[_0x47e7('0x147')][_0x47e7('0x3e')]);_0x54d1f7['query']=_[_0x47e7('0xcb')](_0x26d820[_0x47e7('0x49')]);_0x54d1f7[_0x47e7('0xd1')]=_['intersection'](_0x54d1f7[_0x47e7('0xc9')],_0x54d1f7[_0x47e7('0x49')]);_0x17b356['attributes']=_['intersection'](_0x54d1f7[_0x47e7('0xc9')],qs[_0x47e7('0xcd')](_0x26d820[_0x47e7('0x49')][_0x47e7('0xcd')]));_0x17b356[_0x47e7('0x4f')]=_0x17b356[_0x47e7('0x4f')][_0x47e7('0x53')]?_0x17b356[_0x47e7('0x4f')]:_0x54d1f7['model'];_0x17b356['order']=qs[_0x47e7('0xce')](_0x26d820[_0x47e7('0x49')]['sort']);_0x17b356[_0x47e7('0xcf')]=qs[_0x47e7('0xd1')](_['pick'](_0x26d820['query'],_0x54d1f7[_0x47e7('0xd1')]));if(_0x26d820[_0x47e7('0x49')]['filter']){_0x17b356['where']=_['merge'](_0x17b356[_0x47e7('0xcf')],{'$or':_['map'](_0x17b356[_0x47e7('0x4f')],function(_0x1e31e9){var _0x4be409={};_0x4be409[_0x1e31e9]={'$like':'%'+_0x26d820[_0x47e7('0x49')]['filter']+'%'};return _0x4be409;})});}_0x17b356=_['merge']({},_0x17b356,_0x26d820[_0x47e7('0x5d')]);return _0x33bbf8[_0x47e7('0x146')](_0x17b356);}})[_0x47e7('0x1e')](function(_0x2a685a){if(_0x2a685a){_0x5c51b9=_0x2a685a[_0x47e7('0x53')];if(!_0x26d820[_0x47e7('0x49')][_0x47e7('0xc4')](_0x47e7('0xd4'))){_0x17b356[_0x47e7('0x1a')]=qs['limit'](_0x26d820[_0x47e7('0x49')]['limit']);_0x17b356[_0x47e7('0x18')]=qs[_0x47e7('0x18')](_0x26d820['query'][_0x47e7('0x18')]);}return _0x33bbf8[_0x47e7('0x146')](_0x17b356);}})[_0x47e7('0x1e')](function(_0x6f707d){if(_0x6f707d){return _0x6f707d?{'count':_0x5c51b9,'rows':_0x6f707d}:null;}})[_0x47e7('0x1e')](respondWithResult(_0x9cf997,null))['catch'](handleError(_0x9cf997,null));};exports['addWhatsappAccounts']=function(_0x371d32,_0x1c002a){return db[_0x47e7('0x3d')][_0x47e7('0x38')]({'where':{'id':_0x371d32['params']['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x1c002a,null))['then'](function(_0x554ac7){if(_0x554ac7){return _0x554ac7[_0x47e7('0x148')](_0x371d32[_0x47e7('0x5f')][_0x47e7('0x62')],_[_0x47e7('0x11f')](_0x371d32['body'],[_0x47e7('0x62'),'id'])||{});}})[_0x47e7('0x1e')](respondWithResult(_0x1c002a,null))[_0x47e7('0x28')](handleError(_0x1c002a,null));};exports['removeWhatsappAccounts']=function(_0x388a54,_0x46ef82){return db[_0x47e7('0x3d')]['find']({'where':{'id':_0x388a54[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0x46ef82,null))[_0x47e7('0x1e')](function(_0x36b009){if(_0x36b009){return _0x36b009[_0x47e7('0x149')](_0x388a54[_0x47e7('0x49')][_0x47e7('0x62')]);}})[_0x47e7('0x1e')](respondWithStatusCode(_0x46ef82,null))[_0x47e7('0x28')](handleError(_0x46ef82,null));};exports[_0x47e7('0x14a')]=function(_0x2a36c4,_0x4e2e42){var _0x255a1d={},_0x5d6281={},_0xdc3930={'count':0x0,'rows':[]};var _0x4edcab=db[_0x47e7('0x11d')][_0x47e7('0x3e')];_0x5d6281[_0x47e7('0xc9')]=_[_0x47e7('0xcb')](_0x4edcab);_0x5d6281[_0x47e7('0x49')]=_['keys'](_0x2a36c4[_0x47e7('0x49')]);_0x5d6281[_0x47e7('0xd1')]=_[_0x47e7('0xcc')](_0x5d6281[_0x47e7('0xc9')],_0x5d6281['query']);_0x5d6281[_0x47e7('0xd1')]=_['concat'](_0x5d6281[_0x47e7('0xd1')],['$and',_0x47e7('0x14b'),_0x47e7('0x14c'),_0x47e7('0x14d'),_0x47e7('0x14e'),'$lte','$ne','$eq',_0x47e7('0x14f'),_0x47e7('0x150'),_0x47e7('0x151'),_0x47e7('0x152'),_0x47e7('0x153'),_0x47e7('0x154'),_0x47e7('0x155'),'$iLike',_0x47e7('0x156'),'$like',_0x47e7('0x157'),'$contains','$contained',_0x47e7('0x158')]);_0x255a1d['attributes']=_['intersection'](_0x5d6281[_0x47e7('0xc9')],qs[_0x47e7('0xcd')](_0x2a36c4[_0x47e7('0x49')][_0x47e7('0xcd')]));_0x255a1d[_0x47e7('0x4f')]=_0x255a1d[_0x47e7('0x4f')]['length']?_0x255a1d[_0x47e7('0x4f')]:_0x5d6281[_0x47e7('0xc9')];if(!_0x2a36c4['query']['hasOwnProperty'](_0x47e7('0xd4'))){_0x255a1d[_0x47e7('0x1a')]=qs[_0x47e7('0x1a')](_0x2a36c4[_0x47e7('0x49')]['limit']);_0x255a1d[_0x47e7('0x18')]=qs[_0x47e7('0x18')](_0x2a36c4[_0x47e7('0x49')]['offset']);}_0x255a1d['order']=qs[_0x47e7('0xce')](_0x2a36c4[_0x47e7('0x49')]['sort']);_0x255a1d[_0x47e7('0xcf')]=qs[_0x47e7('0xd1')](_[_0x47e7('0xd0')](_0x2a36c4[_0x47e7('0x49')],_0x5d6281[_0x47e7('0xd1')]));if(_0x2a36c4[_0x47e7('0x49')]['filter']){_0x255a1d[_0x47e7('0xcf')]=_[_0x47e7('0xd2')](_0x255a1d[_0x47e7('0xcf')],{'$or':_[_0x47e7('0x35')](_0x255a1d[_0x47e7('0x4f')],function(_0x25e0c0){var _0xc35c8a={};_0xc35c8a[_0x25e0c0]={'$like':'%'+_0x2a36c4[_0x47e7('0x49')][_0x47e7('0x42')]+'%'};return _0xc35c8a;})});}_0x255a1d[_0x47e7('0xcf')]={'$and':[_0x255a1d['where'],{'$or':[{'UserId':_0x2a36c4[_0x47e7('0x5c')]['id']},{'OwnerId':_0x2a36c4[_0x47e7('0x5c')]['id']}]}]};_0x255a1d=_[_0x47e7('0xd2')]({},_0x255a1d,_0x2a36c4[_0x47e7('0x5d')]);var _0x5b6c47={'where':_0x255a1d[_0x47e7('0xcf')]};return db['CmHopper'][_0x47e7('0x1b')](_0x5b6c47)[_0x47e7('0x1e')](function(_0x5039ca){_0xdc3930[_0x47e7('0x1b')]=_0x5039ca;if(_0x2a36c4[_0x47e7('0x49')][_0x47e7('0x4a')]){_0x255a1d[_0x47e7('0x4b')]=[{'attributes':['id',_0x47e7('0x159'),_0x47e7('0x15a'),_0x47e7('0xe7')],'model':db['CmContact'],'as':'Contact'},{'attributes':['id',_0x47e7('0x39'),_0x47e7('0x15b')],'model':db[_0x47e7('0x15c')],'as':_0x47e7('0xca')}];}return db[_0x47e7('0x11d')][_0x47e7('0x8b')](_0x255a1d);})[_0x47e7('0x1e')](function(_0x3a4a5b){_0xdc3930[_0x47e7('0x51')]=_0x3a4a5b;return _0xdc3930;})[_0x47e7('0x1e')](respondWithFilteredResult(_0x4e2e42,_0x255a1d))[_0x47e7('0x28')](handleError(_0x4e2e42,null));};exports[_0x47e7('0x15d')]=function(_0x29a8ac,_0x12b3ad){if(!_[_0x47e7('0x69')](_0x29a8ac[_0x47e7('0x30')]['id'])&&(_0x29a8ac[_0x47e7('0x30')][_0x47e7('0x2d')]==_0x47e7('0x2e')||_0x29a8ac['user']['role']=='user')){return db[_0x47e7('0x3d')]['findOne']({'where':{'id':_0x29a8ac[_0x47e7('0x5c')]['id']},'raw':!![]})[_0x47e7('0x1e')](function(_0x3e1aae){return authService[_0x47e7('0x15e')](_0x3e1aae);})[_0x47e7('0x1e')](function(_0x31c06d){if(_0x31c06d){return _0x12b3ad[_0x47e7('0x16')](0xc8)[_0x47e7('0x17')]({'api_key':_0x31c06d[_0x47e7('0x15f')]});}else{return _0x12b3ad[_0x47e7('0x16')](0xcc)['json']({'message':_0x47e7('0x160')});}})[_0x47e7('0x28')](handleError(_0x12b3ad,0x193));}else{return _0x12b3ad[_0x47e7('0x16')](0x191)[_0x47e7('0x17')]({'message':_0x47e7('0x161')});}};exports[_0x47e7('0x162')]=function(_0x524914,_0x2424c7){if(!_['isNil'](_0x524914[_0x47e7('0x30')]['id'])&&(_0x524914[_0x47e7('0x30')]['role']==_0x47e7('0x2e')||_0x524914[_0x47e7('0x30')][_0x47e7('0x2d')]==_0x47e7('0x30'))){return db[_0x47e7('0x3d')]['find']({'where':{'id':_0x524914[_0x47e7('0x5c')]['id']}})['then'](function(_0x598865){return authService[_0x47e7('0x163')](_0x598865);})[_0x47e7('0x1e')](function(_0x1dcdaa){return db['User'][_0x47e7('0x29')]({'apiKeyIat':_0x1dcdaa[_0x47e7('0x164')],'apiKeyNonce':_0x1dcdaa[_0x47e7('0x165')]},{'where':{'id':_0x524914[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](function(){return _0x2424c7['status'](0xc8)[_0x47e7('0x17')]({'api_key':_0x1dcdaa['token']});});})[_0x47e7('0x28')](handleError(_0x2424c7,0x193));}else{return _0x2424c7[_0x47e7('0x16')](0x191)[_0x47e7('0x17')]({'message':'You\x20don\x27t\x20have\x20sufficient\x20privileges\x20to\x20access\x20this\x20resource.'});}};exports['removeApiKey']=function(_0x24e4ab,_0xeae040){if(!_[_0x47e7('0x69')](_0x24e4ab['user']['id'])&&(_0x24e4ab[_0x47e7('0x30')]['role']==_0x47e7('0x2e')||_0x24e4ab[_0x47e7('0x30')][_0x47e7('0x2d')]==_0x47e7('0x30'))){return db['User'][_0x47e7('0x38')]({'where':{'id':_0x24e4ab[_0x47e7('0x5c')]['id']}})[_0x47e7('0x1e')](handleEntityNotFound(_0xeae040,null))[_0x47e7('0x1e')](function(_0x295687){if(_0x295687&&_0x295687[_0x47e7('0x166')]&&_0x295687['apiKeyIat'])return _0x295687;else throw{'message':'API\x20key\x20not\x20available'};})[_0x47e7('0x1e')](function(){return db['User']['update']({'apiKeyNonce':null,'apiKeyIat':null},{'where':{'id':_0x24e4ab[_0x47e7('0x5c')]['id']}});})[_0x47e7('0x1e')](respondWithStatusCode(_0xeae040,0xc8))[_0x47e7('0x28')](handleError(_0xeae040,0x193));}else{return _0xeae040[_0x47e7('0x16')](0x191)[_0x47e7('0x17')]({'message':'You\x20don\x27t\x20have\x20sufficient\x20privileges\x20to\x20access\x20this\x20resource.'});}};exports[_0x47e7('0x167')]=function(_0x5da493,_0x1cef20){var _0x2250f9=_0x5da493[_0x47e7('0x30')]['get']({'plain':!![]});if(!_0x2250f9){return _0x1cef20['status'](0x191)[_0x47e7('0x168')]('Unable\x20to\x20retrieve\x20the\x20current\x20user');}else{Promise['resolve']()[_0x47e7('0x1e')](function(){if(_0x5da493[_0x47e7('0x49')]['userSetting']!==_0x47e7('0x4d'))return;return _0x5da493[_0x47e7('0x30')][_0x47e7('0x169')]();})[_0x47e7('0x1e')](function(_0x405fa9){if(!_0x405fa9)return;return _0x405fa9[_0x47e7('0x2c')]({'plain':!![]});})[_0x47e7('0x1e')](function(_0x1f4b77){_0x2250f9[_0x47e7('0x4c')]=_0x1f4b77;return _0x1cef20[_0x47e7('0x16')](0xc8)[_0x47e7('0x17')](_0x2250f9);});}};exports[_0x47e7('0x16a')]=function(_0x110c63,_0x549e23){var _0x11d3e4={'offset':0x0};var _0x157db3={'count':0x0,'rows':[]};var _0x164fe3=['idle',_0x47e7('0x16b'),_0x47e7('0x16c')];var _0x3d3f6e=[];var _0x5cc08a=[];var _0x5449ee=[];var _0x1f2800=_0x110c63[_0x47e7('0x49')]['teams'];var _0x299d18=_0x110c63[_0x47e7('0x49')][_0x47e7('0x16d')];var _0x5996e0=_0x110c63['query']['filter'];return Promise['resolve']()['then'](function(){if(!_0x1f2800){return[];}return db[_0x47e7('0x109')]['findAll']({'attributes':['id',_0x47e7('0x39')],'where':{'id':_0x1f2800}});})['then'](function(_0x4b9b11){_0x5449ee=_0x4b9b11;if(!_0x299d18){return[];}return db[_0x47e7('0x15c')][_0x47e7('0x8b')]({'attributes':['id',_0x47e7('0x39')],'type':'inbound','where':{'id':_0x299d18}});})[_0x47e7('0x1e')](function(_0x30bb5f){_0x5cc08a=_0x30bb5f;var _0x2d2e9b=_0x5449ee['concat'](_0x5cc08a)[_0x47e7('0x35')](function(_0x3e5c9e){return _0x3e5c9e['getAgents']({'attributes':['id',_0x47e7('0x39'),_0x47e7('0x63'),_0x47e7('0x9d')],'raw':!![]});});return Promise[_0x47e7('0x5a')](_0x2d2e9b);})[_0x47e7('0x1e')](function(_0x500f7b){var _0x4d6075=_[_0x47e7('0x16e')](_0x500f7b);if(_0x5996e0){if(_0x299d18||_0x1f2800){return _0x4d6075[_0x47e7('0x42')](function(_0x59d87d){return _0x59d87d[_0x47e7('0x39')]['toLowerCase']()[_0x47e7('0x37')](_0x5996e0[_0x47e7('0xa2')]())||_0x59d87d[_0x47e7('0x63')][_0x47e7('0x16f')]()[_0x47e7('0x37')](_0x5996e0);});}else{return db[_0x47e7('0x3d')][_0x47e7('0x8b')]({'attributes':['id','name','internal','online'],'where':{'role':_0x47e7('0x74'),'$or':[db[_0x47e7('0x6c')][_0x47e7('0xcf')](db[_0x47e7('0x6c')]['fn'](_0x47e7('0x170'),db['sequelize']['col'](_0x47e7('0x39'))),{'$like':'%'+_0x5996e0[_0x47e7('0xa2')]()+'%'}),{'internal':{'$like':'%'+_0x5996e0+'%'}}]},'raw':!![]});}}else{return _0x4d6075;}})['then'](function(_0x31c2d1){var _0x454406=_0x47e7('0x39');var _0x22b6a9='asc';if(_0x110c63[_0x47e7('0x49')]['sort']){_0x22b6a9=_0x110c63[_0x47e7('0x49')]['sort'][0x0]==='-'?_0x47e7('0x171'):'asc';_0x454406=_0x22b6a9===_0x47e7('0x172')?_0x110c63[_0x47e7('0x49')][_0x47e7('0xce')]:_0x110c63[_0x47e7('0x49')]['sort'][_0x47e7('0x173')](0x1);}return _(_0x31c2d1)[_0x47e7('0x174')]('id')[_0x47e7('0x175')]([function(_0x5e2bf3){return _0x454406===_0x47e7('0x39')?_0x5e2bf3[_0x454406]['toLowerCase']():_0x5e2bf3[_0x454406];}],[_0x22b6a9])[_0x47e7('0x35')](function(_0x5a4f20){return _[_0x47e7('0xd0')](_0x5a4f20,['id','name',_0x47e7('0x63'),_0x47e7('0x9d')]);})['value']();})[_0x47e7('0x1e')](function(_0x480cb1){_0x3d3f6e=_0x480cb1;return rta['getRealtimeAgents']();})['then'](function(_0x3bc18d){return _0x3d3f6e['map'](function(_0x32f346){var _0x2b3f6c=_[_0x47e7('0x38')](_0x3bc18d[_0x47e7('0x51')],['id',_0x32f346['id']]);if(!_0x2b3f6c||!_0x32f346[_0x47e7('0x9d')]){_0x32f346[_0x47e7('0x16')]=_0x47e7('0x176');}else if(_0x2b3f6c[_0x47e7('0x9f')]){_0x32f346[_0x47e7('0x16')]='pause';}else if(_0x2b3f6c['voiceStatus']===_0x47e7('0x177')||!_0x2b3f6c[_0x47e7('0x178')]){_0x32f346[_0x47e7('0x16')]='unavailable';}else{_0x32f346[_0x47e7('0x16')]=_0x164fe3[_0x47e7('0x37')](_0x2b3f6c[_0x47e7('0x178')])?_0x47e7('0x9d'):_0x47e7('0x179');}return _0x32f346;});})[_0x47e7('0x1e')](function(_0x589f17){if(!_0x110c63[_0x47e7('0x49')][_0x47e7('0xc4')](_0x47e7('0xd4'))){_0x11d3e4[_0x47e7('0x1a')]=qs[_0x47e7('0x1a')](_0x110c63[_0x47e7('0x49')][_0x47e7('0x1a')]||0xa);_0x11d3e4[_0x47e7('0x18')]=qs['offset'](_0x110c63['query'][_0x47e7('0x18')]);}_0x157db3['count']=_0x589f17['length'];_0x157db3[_0x47e7('0x51')]=_0x11d3e4[_0x47e7('0x1a')]?_0x589f17[_0x47e7('0x17a')](_0x11d3e4[_0x47e7('0x18')],_0x11d3e4['offset']+_0x11d3e4[_0x47e7('0x1a')]):_0x589f17;return _0x157db3;})[_0x47e7('0x1e')](respondWithFilteredResult(_0x549e23,_0x11d3e4))['catch'](handleError(_0x549e23,null));};function get_open_tabs(_0x5ca7a7,_0x32f69a){var _0x2c00e2=_0x5ca7a7[_0x47e7('0x17b')](0x0)[_0x47e7('0x17c')]()+_0x5ca7a7[_0x47e7('0x17a')](0x1);var _0x51306d={'type':db['Sequelize'][_0x47e7('0x17d')][_0x47e7('0x6d')],'raw':!![]};return new Promise(function(_0x172e2e,_0x596094){var _0xa190e4=squel[_0x47e7('0x17e')]()[_0x47e7('0x17f')](_0x47e7('0x180')+_0x2c00e2+_0x47e7('0x181'),'id')['field']('ui.createdAt')[_0x47e7('0x6e')](_0x47e7('0x182')+_0x5ca7a7+'_interactions','ui')[_0x47e7('0xcf')](_0x47e7('0x183'),_0x32f69a['id']);return db[_0x47e7('0x6c')][_0x47e7('0x49')](_0xa190e4['toString'](),_0x51306d)['then'](function(_0x41b719){_0x32f69a[_0x2c00e2+_0x47e7('0x184')]=_0x41b719;_0x172e2e(_0x41b719);})[_0x47e7('0x28')](function(_0x5a0634){_0x596094(_0x5a0634);});});}exports[_0x47e7('0x185')]=function(_0x45c20f,_0x57a978){var _0x51e6d7=_0x45c20f[_0x47e7('0x5c')]['id'];var _0x383249=_0x45c20f[_0x47e7('0x5f')][_0x47e7('0x186')];return db[_0x47e7('0x3d')][_0x47e7('0x29')]({'messengerSoundNotification':_0x383249},{'where':{'id':_0x51e6d7}})[_0x47e7('0x1e')](respondWithStatusCode(_0x57a978,null))[_0x47e7('0x28')](handleError(_0x57a978,null));};
\ No newline at end of file
index b11317f..4fb8ffd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa95d=['exports','events','../../mysqldb','update','remove','emit','hasOwnProperty','hook'];(function(_0x118be,_0x432743){var _0x1838ff=function(_0x314698){while(--_0x314698){_0x118be['push'](_0x118be['shift']());}};_0x1838ff(++_0x432743);}(_0xa95d,0x181));var _0xda95=function(_0x146ad2,_0x11d2fc){_0x146ad2=_0x146ad2-0x0;var _0x56b9fa=_0xa95d[_0x146ad2];return _0x56b9fa;};'use strict';var EventEmitter=require(_0xda95('0x0'));var User=require(_0xda95('0x1'))['db']['User'];var UserEvents=new EventEmitter();UserEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xda95('0x2'),'afterDestroy':_0xda95('0x3')};function emitEvent(_0x5286c4){return function(_0x42c3a4,_0x22a58d,_0x3b94da){UserEvents[_0xda95('0x4')](_0x5286c4+':'+_0x42c3a4['id'],_0x42c3a4);UserEvents['emit'](_0x5286c4,_0x42c3a4);_0x3b94da(null);};}for(var e in events){if(events[_0xda95('0x5')](e)){var event=events[e];User[_0xda95('0x6')](e,emitEvent(event));}}module[_0xda95('0x7')]=UserEvents;
\ No newline at end of file
+var _0x5c4e=['hook','exports','events','User','update','remove','emit','hasOwnProperty'];(function(_0x16e57d,_0x2cb7ba){var _0x40239c=function(_0x3cc8f0){while(--_0x3cc8f0){_0x16e57d['push'](_0x16e57d['shift']());}};_0x40239c(++_0x2cb7ba);}(_0x5c4e,0x9a));var _0xe5c4=function(_0x279f43,_0x5cf049){_0x279f43=_0x279f43-0x0;var _0x2871fc=_0x5c4e[_0x279f43];return _0x2871fc;};'use strict';var EventEmitter=require(_0xe5c4('0x0'));var User=require('../../mysqldb')['db'][_0xe5c4('0x1')];var UserEvents=new EventEmitter();UserEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xe5c4('0x2'),'afterDestroy':_0xe5c4('0x3')};function emitEvent(_0xff29b0){return function(_0x11a609,_0x4cab1b,_0x1c86cb){UserEvents[_0xe5c4('0x4')](_0xff29b0+':'+_0x11a609['id'],_0x11a609);UserEvents['emit'](_0xff29b0,_0x11a609);_0x1c86cb(null);};}for(var e in events){if(events[_0xe5c4('0x5')](e)){var event=events[e];User[_0xe5c4('0x6')](e,emitEvent(event));}}module[_0xe5c4('0x7')]=UserEvents;
\ No newline at end of file
index d85dfd2..d5f4eb8 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(_0x58c27e,_0x2c0482){var _0x7ea902=function(_0x3a9f44){while(--_0x3a9f44){_0x58c27e['push'](_0x58c27e['shift']());}};_0x7ea902(++_0x2c0482);}(_0xa9e0,0x123));var _0x0a9e=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0xa9e0[_0x6c993a];return _0x27f547;};'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(_0x450683,_0x3f007f){var _0x5d6bac=function(_0x1a88e9){while(--_0x1a88e9){_0x450683['push'](_0x450683['shift']());}};_0x5d6bac(++_0x3f007f);}(_0xa9e0,0x123));var _0x0a9e=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0xa9e0[_0x19e35c];return _0x3e1fe8;};'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 bf7868b..958fa8f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8895=['resolve','isValidChannel','channel','findOne','voicePause','mailPause','chatPause','faxPause','openchannelPause','smsPause','whatsappPause','pauseType','lastPauseAt','params','system','LogoutUser','destroy','LoginUser','mobile','phone','loginInPause','count','../../config/license/util','agents','Maximum\x20login\x20has\x20been\x20reached','upsert','UserVoiceQueue.penalty','all','merge','callysquare','LOGININPAUSE','concat','lodash','util','moment','bluebird','ioredis','../../config/logger','rpc','defaults','redis','localhost','register','User','findAll','options','raw','where','attributes','limit','include','model','map','then','info','GetUser','debug','stringify','error','message','find','catch','PauseUser','name','internal','interface','format','User\x20with\x20id\x20%s\x20not\x20found','UserVoiceQueueRt','update','MemberReport','length','YYYY-MM-DD\x20HH:mm:ss','updateAttributes','getChannels','forEach','push','isNil','SIP/%s','PAUSE','body','type','role','uniqueid','bulkCreate','DEFAULT\x20PAUSE','UnpauseUser'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x8895,0x1d3));var _0x5889=function(_0xee58c6,_0x1436dd){_0xee58c6=_0xee58c6-0x0;var _0x2edf40=_0x8895[_0xee58c6];return _0x2edf40;};'use strict';var _=require(_0x5889('0x0'));var util=require(_0x5889('0x1'));var moment=require(_0x5889('0x2'));var BPromise=require(_0x5889('0x3'));var Redis=require(_0x5889('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x5889('0x5'))(_0x5889('0x6'));var config=require('../../config/environment');config['redis']=_[_0x5889('0x7')](config[_0x5889('0x8')],{'host':_0x5889('0x9'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x5889('0x8')]));require('./user.socket')[_0x5889('0xa')](socket);exports['GetUser']=function(_0x25a7d5){var _0x2263a5=this;return new Promise(function(_0x3facc3,_0xe3a2b9){return db[_0x5889('0xb')][_0x5889('0xc')]({'raw':_0x25a7d5[_0x5889('0xd')]?_0x25a7d5[_0x5889('0xd')][_0x5889('0xe')]===undefined?!![]:![]:!![],'where':_0x25a7d5['options']?_0x25a7d5[_0x5889('0xd')][_0x5889('0xf')]||null:null,'attributes':_0x25a7d5['options']?_0x25a7d5[_0x5889('0xd')][_0x5889('0x10')]||null:null,'limit':_0x25a7d5[_0x5889('0xd')]?_0x25a7d5[_0x5889('0xd')][_0x5889('0x11')]||null:null,'include':_0x25a7d5[_0x5889('0xd')]?_0x25a7d5[_0x5889('0xd')][_0x5889('0x12')]?_['map'](_0x25a7d5[_0x5889('0xd')][_0x5889('0x12')],function(_0x15df4d){return{'model':db[_0x15df4d[_0x5889('0x13')]],'as':_0x15df4d['as'],'attributes':_0x15df4d[_0x5889('0x10')],'include':_0x15df4d[_0x5889('0x12')]?_[_0x5889('0x14')](_0x15df4d['include'],function(_0x1b2416){return{'model':db[_0x1b2416[_0x5889('0x13')]],'as':_0x1b2416['as'],'attributes':_0x1b2416[_0x5889('0x10')],'include':_0x1b2416[_0x5889('0x12')]?_['map'](_0x1b2416[_0x5889('0x12')],function(_0x59ccd0){return{'model':db[_0x59ccd0[_0x5889('0x13')]],'as':_0x59ccd0['as'],'attributes':_0x59ccd0[_0x5889('0x10')]};}):[]};}):[]};}):[]:[]})[_0x5889('0x15')](function(_0x4436a1){logger[_0x5889('0x16')](_0x5889('0x17'),_0x25a7d5);logger[_0x5889('0x18')](_0x5889('0x17'),_0x25a7d5,JSON[_0x5889('0x19')](_0x4436a1));_0x3facc3(_0x4436a1);})['catch'](function(_0x2fb62e){logger[_0x5889('0x1a')](_0x5889('0x17'),_0x2fb62e[_0x5889('0x1b')],_0x25a7d5);_0xe3a2b9(_0x2263a5[_0x5889('0x1a')](0x1f4,_0x2fb62e[_0x5889('0x1b')]));});});};exports['ShowUser']=function(_0x392764){var _0x5147c1=this;return new Promise(function(_0x2073ac,_0x1993c7){return db['User'][_0x5889('0x1c')]({'raw':_0x392764[_0x5889('0xd')]?_0x392764[_0x5889('0xd')]['raw']===undefined?!![]:![]:!![],'where':_0x392764['options']?_0x392764[_0x5889('0xd')][_0x5889('0xf')]||null:null,'attributes':_0x392764['options']?_0x392764[_0x5889('0xd')][_0x5889('0x10')]||null:null,'include':_0x392764[_0x5889('0xd')]?_0x392764[_0x5889('0xd')]['include']?_[_0x5889('0x14')](_0x392764[_0x5889('0xd')][_0x5889('0x12')],function(_0x6dc143){return{'model':db[_0x6dc143[_0x5889('0x13')]],'as':_0x6dc143['as'],'attributes':_0x6dc143['attributes'],'include':_0x6dc143[_0x5889('0x12')]?_[_0x5889('0x14')](_0x6dc143[_0x5889('0x12')],function(_0x267191){return{'model':db[_0x267191[_0x5889('0x13')]],'as':_0x267191['as'],'attributes':_0x267191[_0x5889('0x10')],'include':_0x267191[_0x5889('0x12')]?_[_0x5889('0x14')](_0x267191[_0x5889('0x12')],function(_0x557beb){return{'model':db[_0x557beb[_0x5889('0x13')]],'as':_0x557beb['as'],'attributes':_0x557beb[_0x5889('0x10')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x58628d){logger['info']('ShowUser',_0x392764);logger[_0x5889('0x18')]('ShowUser',_0x392764,JSON[_0x5889('0x19')](_0x58628d));_0x2073ac(_0x58628d);})[_0x5889('0x1d')](function(_0x300af2){logger[_0x5889('0x1a')]('ShowUser',_0x300af2[_0x5889('0x1b')],_0x392764);_0x1993c7(_0x5147c1[_0x5889('0x1a')](0x1f4,_0x300af2[_0x5889('0x1b')]));});});};exports[_0x5889('0x1e')]=function(_0x31f48e){var _0x22c5af;return db[_0x5889('0xb')][_0x5889('0x1c')]({'where':_0x31f48e[_0x5889('0xd')]['where']||{},'attributes':['id',_0x5889('0x1f'),'role',_0x5889('0x20'),_0x5889('0x21')]})[_0x5889('0x15')](function(_0x1a38dc){if(!_0x1a38dc){throw new Error(util[_0x5889('0x22')](_0x5889('0x23'),_0x31f48e['params']['id']));}_0x22c5af=_0x1a38dc;return db[_0x5889('0x24')][_0x5889('0x25')]({'paused':0x1},{'where':{'UserId':_0x22c5af['id']},'individualHooks':!![]});})['then'](function(){return db[_0x5889('0x26')][_0x5889('0xc')]({'where':{'membername':_0x22c5af[_0x5889('0x1f')],'type':'PAUSE','exitAt':null}});})[_0x5889('0x15')](function(_0x4492fb){if(_0x4492fb&&_0x4492fb[_0x5889('0x27')]){var _0x2d1dfd=moment()[_0x5889('0x22')](_0x5889('0x28'));for(var _0x55ee85=0x0,_0x108b77=_0x4492fb[_0x5889('0x27')];_0x55ee85<_0x108b77;_0x55ee85++){_0x4492fb[_0x55ee85][_0x5889('0x29')]({'exitAt':_0x2d1dfd});}}})[_0x5889('0x15')](function(){var _0x26fa73=[];var _0x369d57=utils[_0x5889('0x2a')]();_0x369d57[_0x5889('0x2b')](function(_0x478cbb){_0x26fa73[_0x5889('0x2c')]({'channel':_0x478cbb,'membername':_0x22c5af[_0x5889('0x1f')],'interface':_[_0x5889('0x2d')](_0x22c5af[_0x5889('0x21')])?util['format'](_0x5889('0x2e'),_0x22c5af['name']):_0x22c5af[_0x5889('0x21')],'type':_0x5889('0x2f'),'enterAt':moment()[_0x5889('0x22')]('YYYY-MM-DD\x20HH:mm:ss'),'data1':_0x31f48e[_0x5889('0x30')][_0x5889('0x31')]||'DEFAULT\x20PAUSE','role':_0x22c5af[_0x5889('0x32')],'internal':_0x22c5af[_0x5889('0x20')],'uniqueid':_0x31f48e['body'][_0x5889('0x33')]||null});});return db['MemberReport'][_0x5889('0x34')](_0x26fa73,{'individualHooks':!![]});})[_0x5889('0x15')](function(){return _0x22c5af[_0x5889('0x25')]({'voicePause':!![],'mailPause':!![],'chatPause':!![],'faxPause':!![],'smsPause':!![],'openchannelPause':!![],'whatsappPause':!![],'pauseType':_0x31f48e[_0x5889('0x30')][_0x5889('0x31')]||_0x5889('0x35'),'lastPauseAt':moment()[_0x5889('0x22')](_0x5889('0x28'))});})[_0x5889('0x1d')](function(_0x94ffde){throw _0x94ffde;});};exports[_0x5889('0x36')]=function(_0x4cbeff){return Promise[_0x5889('0x37')]()[_0x5889('0x15')](function(){if(_0x4cbeff[_0x5889('0x30')]['channel']&&!utils[_0x5889('0x38')](_0x4cbeff[_0x5889('0x30')][_0x5889('0x39')])){throw new Error(util['format']('Channel\x20parameter\x20%s\x20is\x20invalid',_0x4cbeff[_0x5889('0x30')]['channel']));}return db[_0x5889('0xb')][_0x5889('0x3a')]({'where':_0x4cbeff['options'][_0x5889('0xf')]||{},'attributes':['id',_0x5889('0x1f'),'role',_0x5889('0x20'),_0x5889('0x21'),'online',_0x5889('0x3b'),_0x5889('0x3c'),_0x5889('0x3d'),_0x5889('0x3e'),_0x5889('0x3f'),_0x5889('0x40'),_0x5889('0x41'),_0x5889('0x42'),_0x5889('0x43')]});})[_0x5889('0x15')](function(_0x3dcac6){if(!_0x3dcac6){throw new Error(util[_0x5889('0x22')]('User\x20with\x20id\x20%s\x20not\x20found',_0x4cbeff[_0x5889('0x44')]['id']));}return _0x3dcac6['unpause'](_0x4cbeff['body'][_0x5889('0x39')],_0x5889('0x45'));})[_0x5889('0x1d')](function(_0x1a9208){throw _0x1a9208;});};exports[_0x5889('0x46')]=function(_0x1c197b){var _0x165a7a=this;return new Promise(function(_0x4efa0d,_0x4cef84){var _0xc7f6b6;return db[_0x5889('0xb')]['findOne']({'where':_0x1c197b[_0x5889('0xd')]['where']||{},'attributes':['id','name']})['then'](function(_0x2a2804){if(_0x2a2804){_0xc7f6b6=_0x2a2804;return db[_0x5889('0x24')][_0x5889('0x47')]({'where':{'membername':_0xc7f6b6['name']},'individualHooks':!![]});}})[_0x5889('0x15')](function(){if(_0xc7f6b6){return db[_0x5889('0x26')]['findAll']({'where':{'membername':_0xc7f6b6['name'],'exitAt':null}});}})[_0x5889('0x15')](function(_0x10a77e){if(_0xc7f6b6){if(_0x10a77e&&_0x10a77e[_0x5889('0x27')]){var _0x32ee2f=[];_0x10a77e[_0x5889('0x2b')](function(_0x89835b){_0x32ee2f[_0x5889('0x2c')](_0x89835b[_0x5889('0x25')]({'exitAt':moment()[_0x5889('0x22')](_0x5889('0x28'))}));});return BPromise['all'](_0x32ee2f);}}})[_0x5889('0x15')](function(){if(_0xc7f6b6){return _0xc7f6b6[_0x5889('0x25')]({'online':![],'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![]});}})['then'](function(_0x53cfc8){_0x4efa0d(_0x53cfc8);})[_0x5889('0x1d')](function(_0x43f85f){_0x4cef84(_0x165a7a['error'](0x1f4,_0x43f85f[_0x5889('0x1b')]));});});};exports[_0x5889('0x48')]=function(_0x2be732){var _0x7f6ef9=this;return new Promise(function(_0x36e1c3,_0x1033f2){var _0x3b0c9c;var _0x3348ae;var _0x5d1dc6;var _0x91782f;return db[_0x5889('0xb')][_0x5889('0x3a')]({'where':_0x2be732[_0x5889('0xd')][_0x5889('0xf')]||{},'attributes':['id',_0x5889('0x1f'),_0x5889('0x32'),_0x5889('0x49'),_0x5889('0x4a'),_0x5889('0x20'),_0x5889('0x4b'),_0x5889('0x21')]})[_0x5889('0x15')](function(_0x586347){if(_0x586347){_0x3b0c9c=_0x586347;_0x91782f=_0x2be732[_0x5889('0x30')][_0x5889('0x21')]?_0x2be732[_0x5889('0x30')][_0x5889('0x21')]:util[_0x5889('0x22')]('SIP/%s',_0x3b0c9c['name']);return db[_0x5889('0xb')][_0x5889('0x4c')]({'where':{'role':'agent','online':!![],'id':{'$ne':_0x3b0c9c['id']}}});}})[_0x5889('0x15')](function(_0x1a5f84){if(_0x1a5f84){_0x5d1dc6=_0x1a5f84;return require(_0x5889('0x4d'))['getLicense']();}})['then'](function(_0x1774bb){if(_0x1774bb&&_0x1774bb[_0x5889('0x4e')]&&_0x5d1dc6>=_0x1774bb[_0x5889('0x4e')]){throw new Error(_0x5889('0x4f'));}})[_0x5889('0x15')](function(){if(_0x3b0c9c){return db[_0x5889('0x24')][_0x5889('0x47')]({'where':{'membername':_0x3b0c9c[_0x5889('0x1f')]},'individualHooks':!![]});}})[_0x5889('0x15')](function(){if(_0x3b0c9c){return _0x3b0c9c['getVoiceQueues']({'raw':!![]});}})[_0x5889('0x15')](function(_0x17ecc0){if(_0x3b0c9c){if(_0x17ecc0){var _0x30fe95=[];_0x3348ae=_0x17ecc0;if(_0x3348ae[_0x5889('0x27')]){for(var _0x3f9e7e=0x0;_0x3f9e7e<_0x3348ae[_0x5889('0x27')];_0x3f9e7e++){_0x30fe95[_0x5889('0x2c')](db['UserVoiceQueueRt'][_0x5889('0x50')]({'membername':_0x3b0c9c['name'],'UserId':_0x3b0c9c['id'],'queue_name':_0x3348ae[_0x3f9e7e]['name'],'VoiceQueueId':_0x3348ae[_0x3f9e7e]['id'],'interface':_0x91782f,'paused':_0x3b0c9c['loginInPause']||![],'penalty':_0x3348ae[_0x3f9e7e][_0x5889('0x51')]||0x0}));}return BPromise['all'](_0x30fe95);}}}})[_0x5889('0x15')](function(){if(_0x3b0c9c){return db[_0x5889('0x26')][_0x5889('0xc')]({'where':{'membername':_0x3b0c9c[_0x5889('0x1f')],'exitAt':null}});}})[_0x5889('0x15')](function(_0x338425){if(_0x3b0c9c){if(_0x338425&&_0x338425[_0x5889('0x27')]){var _0x190089=[];_0x338425[_0x5889('0x2b')](function(_0x2c86a2){_0x190089[_0x5889('0x2c')](_0x2c86a2[_0x5889('0x25')]({'exitAt':moment()[_0x5889('0x22')](_0x5889('0x28'))}));});return BPromise[_0x5889('0x52')](_0x190089);}}})['then'](function(){if(_0x3b0c9c){var _0x4de242=[];var _0x1a0c7b=[];var _0x43be1b=utils['getChannels']();var _0x4fceca={'membername':_0x3b0c9c[_0x5889('0x1f')],'interface':_0x91782f,'enterAt':moment()[_0x5889('0x22')](_0x5889('0x28')),'role':_0x3b0c9c[_0x5889('0x32')],'internal':_0x3b0c9c['internal']};_0x43be1b[_0x5889('0x2b')](function(_0x155188){_0x4de242[_0x5889('0x2c')](_[_0x5889('0x53')]({'channel':_0x155188,'type':'LOGIN','data1':_0x5889('0x54'),'data2':_0x91782f},_0x4fceca));if(_0x3b0c9c[_0x5889('0x4b')]){_0x1a0c7b[_0x5889('0x2c')](_[_0x5889('0x53')]({'channel':_0x155188,'type':_0x5889('0x2f'),'data1':_0x5889('0x55')},_0x4fceca));}});return db['MemberReport'][_0x5889('0x34')](_0x4de242[_0x5889('0x56')](_0x1a0c7b),{'individualHooks':!![]});}})[_0x5889('0x15')](function(){if(_0x3b0c9c){return _0x3b0c9c[_0x5889('0x25')]({'online':!![],'lastLoginAt':moment()[_0x5889('0x22')](_0x5889('0x28')),'voicePause':_0x3b0c9c['loginInPause']||![],'mailPause':_0x3b0c9c[_0x5889('0x4b')]||![],'chatPause':_0x3b0c9c[_0x5889('0x4b')]||![],'faxPause':_0x3b0c9c['loginInPause']||![],'smsPause':_0x3b0c9c['loginInPause']||![],'openchannelPause':_0x3b0c9c['loginInPause']||![],'pauseType':_0x3b0c9c[_0x5889('0x4b')]?_0x5889('0x55'):null,'lastPauseAt':moment()[_0x5889('0x22')](_0x5889('0x28')),'interface':_0x91782f});}})[_0x5889('0x15')](function(_0x1d5586){_0x36e1c3(_0x1d5586);})[_0x5889('0x1d')](function(_0x2ff4a1){_0x1033f2(_0x7f6ef9['error'](0x1f4,_0x2ff4a1[_0x5889('0x1b')]));});});};
\ No newline at end of file
+var _0x323a=['isNil','SIP/%s','PAUSE','body','type','DEFAULT\x20PAUSE','uniqueid','UnpauseUser','resolve','channel','isValidChannel','Channel\x20parameter\x20%s\x20is\x20invalid','internal','online','voicePause','mailPause','chatPause','faxPause','openchannelPause','unpause','system','LogoutUser','findOne','LoginUser','mobile','phone','loginInPause','../../config/license/util','getLicense','agents','Maximum\x20login\x20has\x20been\x20reached','upsert','all','merge','LOGIN','callysquare','LOGININPAUSE','bulkCreate','concat','lodash','util','ioredis','../../config/utils','../../config/logger','../../config/environment','redis','localhost','socket.io-emitter','./user.socket','register','GetUser','User','findAll','raw','options','where','limit','map','include','model','attributes','then','stringify','catch','error','message','ShowUser','info','PauseUser','find','name','role','interface','format','User\x20with\x20id\x20%s\x20not\x20found','params','UserVoiceQueueRt','update','MemberReport','length','YYYY-MM-DD\x20HH:mm:ss','updateAttributes','getChannels','forEach','push'];(function(_0x3d9d1e,_0x5d284a){var _0x58a4e2=function(_0x42d718){while(--_0x42d718){_0x3d9d1e['push'](_0x3d9d1e['shift']());}};_0x58a4e2(++_0x5d284a);}(_0x323a,0x7c));var _0xa323=function(_0x39c12e,_0x585534){_0x39c12e=_0x39c12e-0x0;var _0x58dbf4=_0x323a[_0x39c12e];return _0x58dbf4;};'use strict';var _=require(_0xa323('0x0'));var util=require(_0xa323('0x1'));var moment=require('moment');var BPromise=require('bluebird');var Redis=require(_0xa323('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0xa323('0x3'));var logger=require(_0xa323('0x4'))('rpc');var config=require(_0xa323('0x5'));config[_0xa323('0x6')]=_['defaults'](config[_0xa323('0x6')],{'host':_0xa323('0x7'),'port':0x18eb});var socket=require(_0xa323('0x8'))(new Redis(config[_0xa323('0x6')]));require(_0xa323('0x9'))[_0xa323('0xa')](socket);exports[_0xa323('0xb')]=function(_0x19b28a){var _0x3fd679=this;return new Promise(function(_0x287dfd,_0x3da929){return db[_0xa323('0xc')][_0xa323('0xd')]({'raw':_0x19b28a['options']?_0x19b28a['options'][_0xa323('0xe')]===undefined?!![]:![]:!![],'where':_0x19b28a[_0xa323('0xf')]?_0x19b28a[_0xa323('0xf')][_0xa323('0x10')]||null:null,'attributes':_0x19b28a[_0xa323('0xf')]?_0x19b28a[_0xa323('0xf')]['attributes']||null:null,'limit':_0x19b28a[_0xa323('0xf')]?_0x19b28a[_0xa323('0xf')][_0xa323('0x11')]||null:null,'include':_0x19b28a[_0xa323('0xf')]?_0x19b28a[_0xa323('0xf')]['include']?_[_0xa323('0x12')](_0x19b28a[_0xa323('0xf')][_0xa323('0x13')],function(_0x361b56){return{'model':db[_0x361b56[_0xa323('0x14')]],'as':_0x361b56['as'],'attributes':_0x361b56[_0xa323('0x15')],'include':_0x361b56[_0xa323('0x13')]?_['map'](_0x361b56[_0xa323('0x13')],function(_0x4af5de){return{'model':db[_0x4af5de[_0xa323('0x14')]],'as':_0x4af5de['as'],'attributes':_0x4af5de['attributes'],'include':_0x4af5de[_0xa323('0x13')]?_[_0xa323('0x12')](_0x4af5de['include'],function(_0x466376){return{'model':db[_0x466376[_0xa323('0x14')]],'as':_0x466376['as'],'attributes':_0x466376[_0xa323('0x15')]};}):[]};}):[]};}):[]:[]})[_0xa323('0x16')](function(_0x3cf114){logger['info'](_0xa323('0xb'),_0x19b28a);logger['debug']('GetUser',_0x19b28a,JSON[_0xa323('0x17')](_0x3cf114));_0x287dfd(_0x3cf114);})[_0xa323('0x18')](function(_0x4da966){logger[_0xa323('0x19')]('GetUser',_0x4da966[_0xa323('0x1a')],_0x19b28a);_0x3da929(_0x3fd679[_0xa323('0x19')](0x1f4,_0x4da966[_0xa323('0x1a')]));});});};exports[_0xa323('0x1b')]=function(_0x7f7dc3){var _0x2ad60d=this;return new Promise(function(_0x1354eb,_0x1e0ffe){return db[_0xa323('0xc')]['find']({'raw':_0x7f7dc3[_0xa323('0xf')]?_0x7f7dc3['options'][_0xa323('0xe')]===undefined?!![]:![]:!![],'where':_0x7f7dc3[_0xa323('0xf')]?_0x7f7dc3[_0xa323('0xf')][_0xa323('0x10')]||null:null,'attributes':_0x7f7dc3[_0xa323('0xf')]?_0x7f7dc3[_0xa323('0xf')][_0xa323('0x15')]||null:null,'include':_0x7f7dc3['options']?_0x7f7dc3[_0xa323('0xf')][_0xa323('0x13')]?_[_0xa323('0x12')](_0x7f7dc3[_0xa323('0xf')][_0xa323('0x13')],function(_0x1bd395){return{'model':db[_0x1bd395[_0xa323('0x14')]],'as':_0x1bd395['as'],'attributes':_0x1bd395[_0xa323('0x15')],'include':_0x1bd395['include']?_[_0xa323('0x12')](_0x1bd395[_0xa323('0x13')],function(_0x52777a){return{'model':db[_0x52777a['model']],'as':_0x52777a['as'],'attributes':_0x52777a[_0xa323('0x15')],'include':_0x52777a[_0xa323('0x13')]?_[_0xa323('0x12')](_0x52777a['include'],function(_0x113170){return{'model':db[_0x113170['model']],'as':_0x113170['as'],'attributes':_0x113170[_0xa323('0x15')]};}):[]};}):[]};}):[]:[]})['then'](function(_0xe737b7){logger[_0xa323('0x1c')](_0xa323('0x1b'),_0x7f7dc3);logger['debug'](_0xa323('0x1b'),_0x7f7dc3,JSON['stringify'](_0xe737b7));_0x1354eb(_0xe737b7);})['catch'](function(_0xf04373){logger[_0xa323('0x19')](_0xa323('0x1b'),_0xf04373[_0xa323('0x1a')],_0x7f7dc3);_0x1e0ffe(_0x2ad60d[_0xa323('0x19')](0x1f4,_0xf04373[_0xa323('0x1a')]));});});};exports[_0xa323('0x1d')]=function(_0x4f39bc){var _0x43e1c1;return db[_0xa323('0xc')][_0xa323('0x1e')]({'where':_0x4f39bc[_0xa323('0xf')][_0xa323('0x10')]||{},'attributes':['id',_0xa323('0x1f'),_0xa323('0x20'),'internal',_0xa323('0x21')]})[_0xa323('0x16')](function(_0x72782d){if(!_0x72782d){throw new Error(util[_0xa323('0x22')](_0xa323('0x23'),_0x4f39bc[_0xa323('0x24')]['id']));}_0x43e1c1=_0x72782d;return db[_0xa323('0x25')][_0xa323('0x26')]({'paused':0x1},{'where':{'UserId':_0x43e1c1['id']},'individualHooks':!![]});})[_0xa323('0x16')](function(){return db[_0xa323('0x27')]['findAll']({'where':{'membername':_0x43e1c1[_0xa323('0x1f')],'type':'PAUSE','exitAt':null}});})[_0xa323('0x16')](function(_0x2de0c4){if(_0x2de0c4&&_0x2de0c4[_0xa323('0x28')]){var _0x341b73=moment()[_0xa323('0x22')](_0xa323('0x29'));for(var _0x1c1fcd=0x0,_0x31cd14=_0x2de0c4['length'];_0x1c1fcd<_0x31cd14;_0x1c1fcd++){_0x2de0c4[_0x1c1fcd][_0xa323('0x2a')]({'exitAt':_0x341b73});}}})[_0xa323('0x16')](function(){var _0x3d5f32=[];var _0x1dae2c=utils[_0xa323('0x2b')]();_0x1dae2c[_0xa323('0x2c')](function(_0x186493){_0x3d5f32[_0xa323('0x2d')]({'channel':_0x186493,'membername':_0x43e1c1[_0xa323('0x1f')],'interface':_[_0xa323('0x2e')](_0x43e1c1[_0xa323('0x21')])?util['format'](_0xa323('0x2f'),_0x43e1c1[_0xa323('0x1f')]):_0x43e1c1[_0xa323('0x21')],'type':_0xa323('0x30'),'enterAt':moment()['format'](_0xa323('0x29')),'data1':_0x4f39bc[_0xa323('0x31')][_0xa323('0x32')]||_0xa323('0x33'),'role':_0x43e1c1['role'],'internal':_0x43e1c1['internal'],'uniqueid':_0x4f39bc['body'][_0xa323('0x34')]||null});});return db['MemberReport']['bulkCreate'](_0x3d5f32,{'individualHooks':!![]});})[_0xa323('0x16')](function(){return _0x43e1c1[_0xa323('0x26')]({'voicePause':!![],'mailPause':!![],'chatPause':!![],'faxPause':!![],'smsPause':!![],'openchannelPause':!![],'whatsappPause':!![],'pauseType':_0x4f39bc['body'][_0xa323('0x32')]||'DEFAULT\x20PAUSE','lastPauseAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss')});})[_0xa323('0x18')](function(_0x2ac88f){throw _0x2ac88f;});};exports[_0xa323('0x35')]=function(_0x166b62){return Promise[_0xa323('0x36')]()[_0xa323('0x16')](function(){if(_0x166b62['body'][_0xa323('0x37')]&&!utils[_0xa323('0x38')](_0x166b62[_0xa323('0x31')][_0xa323('0x37')])){throw new Error(util[_0xa323('0x22')](_0xa323('0x39'),_0x166b62[_0xa323('0x31')][_0xa323('0x37')]));}return db[_0xa323('0xc')]['findOne']({'where':_0x166b62[_0xa323('0xf')][_0xa323('0x10')]||{},'attributes':['id',_0xa323('0x1f'),_0xa323('0x20'),_0xa323('0x3a'),_0xa323('0x21'),_0xa323('0x3b'),_0xa323('0x3c'),_0xa323('0x3d'),_0xa323('0x3e'),_0xa323('0x3f'),_0xa323('0x40'),'smsPause','whatsappPause','pauseType','lastPauseAt']});})[_0xa323('0x16')](function(_0x2520ea){if(!_0x2520ea){throw new Error(util[_0xa323('0x22')](_0xa323('0x23'),_0x166b62[_0xa323('0x24')]['id']));}return _0x2520ea[_0xa323('0x41')](_0x166b62[_0xa323('0x31')][_0xa323('0x37')],_0xa323('0x42'));})[_0xa323('0x18')](function(_0x38b3a7){throw _0x38b3a7;});};exports[_0xa323('0x43')]=function(_0x5a5d78){var _0x1431d9=this;return new Promise(function(_0x2a3b8b,_0x27362c){var _0x30a07f;return db['User'][_0xa323('0x44')]({'where':_0x5a5d78[_0xa323('0xf')][_0xa323('0x10')]||{},'attributes':['id','name']})[_0xa323('0x16')](function(_0x291195){if(_0x291195){_0x30a07f=_0x291195;return db['UserVoiceQueueRt']['destroy']({'where':{'membername':_0x30a07f['name']},'individualHooks':!![]});}})[_0xa323('0x16')](function(){if(_0x30a07f){return db[_0xa323('0x27')][_0xa323('0xd')]({'where':{'membername':_0x30a07f[_0xa323('0x1f')],'exitAt':null}});}})[_0xa323('0x16')](function(_0xcc68c8){if(_0x30a07f){if(_0xcc68c8&&_0xcc68c8[_0xa323('0x28')]){var _0x93124f=[];_0xcc68c8[_0xa323('0x2c')](function(_0x29b672){_0x93124f[_0xa323('0x2d')](_0x29b672[_0xa323('0x26')]({'exitAt':moment()[_0xa323('0x22')](_0xa323('0x29'))}));});return BPromise['all'](_0x93124f);}}})[_0xa323('0x16')](function(){if(_0x30a07f){return _0x30a07f[_0xa323('0x26')]({'online':![],'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![]});}})[_0xa323('0x16')](function(_0x291e46){_0x2a3b8b(_0x291e46);})[_0xa323('0x18')](function(_0x137ca8){_0x27362c(_0x1431d9[_0xa323('0x19')](0x1f4,_0x137ca8[_0xa323('0x1a')]));});});};exports[_0xa323('0x45')]=function(_0x6fb931){var _0x48db13=this;return new Promise(function(_0x2b9c4b,_0x2c7855){var _0x20c4d9;var _0x5764c0;var _0x130eef;var _0xf2f769;return db[_0xa323('0xc')][_0xa323('0x44')]({'where':_0x6fb931[_0xa323('0xf')][_0xa323('0x10')]||{},'attributes':['id',_0xa323('0x1f'),_0xa323('0x20'),_0xa323('0x46'),_0xa323('0x47'),_0xa323('0x3a'),_0xa323('0x48'),_0xa323('0x21')]})['then'](function(_0x2a12d3){if(_0x2a12d3){_0x20c4d9=_0x2a12d3;_0xf2f769=_0x6fb931[_0xa323('0x31')]['interface']?_0x6fb931[_0xa323('0x31')]['interface']:util['format'](_0xa323('0x2f'),_0x20c4d9[_0xa323('0x1f')]);return db[_0xa323('0xc')]['count']({'where':{'role':'agent','online':!![],'id':{'$ne':_0x20c4d9['id']}}});}})[_0xa323('0x16')](function(_0x43e14){if(_0x43e14){_0x130eef=_0x43e14;return require(_0xa323('0x49'))[_0xa323('0x4a')]();}})[_0xa323('0x16')](function(_0x4aaace){if(_0x4aaace&&_0x4aaace[_0xa323('0x4b')]&&_0x130eef>=_0x4aaace['agents']){throw new Error(_0xa323('0x4c'));}})[_0xa323('0x16')](function(){if(_0x20c4d9){return db[_0xa323('0x25')]['destroy']({'where':{'membername':_0x20c4d9[_0xa323('0x1f')]},'individualHooks':!![]});}})[_0xa323('0x16')](function(){if(_0x20c4d9){return _0x20c4d9['getVoiceQueues']({'raw':!![]});}})[_0xa323('0x16')](function(_0x1db271){if(_0x20c4d9){if(_0x1db271){var _0x439eae=[];_0x5764c0=_0x1db271;if(_0x5764c0[_0xa323('0x28')]){for(var _0x54b98c=0x0;_0x54b98c<_0x5764c0[_0xa323('0x28')];_0x54b98c++){_0x439eae[_0xa323('0x2d')](db[_0xa323('0x25')][_0xa323('0x4d')]({'membername':_0x20c4d9[_0xa323('0x1f')],'UserId':_0x20c4d9['id'],'queue_name':_0x5764c0[_0x54b98c][_0xa323('0x1f')],'VoiceQueueId':_0x5764c0[_0x54b98c]['id'],'interface':_0xf2f769,'paused':_0x20c4d9[_0xa323('0x48')]||![],'penalty':_0x5764c0[_0x54b98c]['UserVoiceQueue.penalty']||0x0}));}return BPromise[_0xa323('0x4e')](_0x439eae);}}}})[_0xa323('0x16')](function(){if(_0x20c4d9){return db[_0xa323('0x27')][_0xa323('0xd')]({'where':{'membername':_0x20c4d9[_0xa323('0x1f')],'exitAt':null}});}})[_0xa323('0x16')](function(_0x2e4409){if(_0x20c4d9){if(_0x2e4409&&_0x2e4409[_0xa323('0x28')]){var _0x41644d=[];_0x2e4409[_0xa323('0x2c')](function(_0x42697b){_0x41644d[_0xa323('0x2d')](_0x42697b[_0xa323('0x26')]({'exitAt':moment()[_0xa323('0x22')](_0xa323('0x29'))}));});return BPromise[_0xa323('0x4e')](_0x41644d);}}})[_0xa323('0x16')](function(){if(_0x20c4d9){var _0x23d78b=[];var _0xa4964d=[];var _0x2c9b71=utils[_0xa323('0x2b')]();var _0x28f788={'membername':_0x20c4d9[_0xa323('0x1f')],'interface':_0xf2f769,'enterAt':moment()['format'](_0xa323('0x29')),'role':_0x20c4d9[_0xa323('0x20')],'internal':_0x20c4d9['internal']};_0x2c9b71['forEach'](function(_0x311f3c){_0x23d78b[_0xa323('0x2d')](_[_0xa323('0x4f')]({'channel':_0x311f3c,'type':_0xa323('0x50'),'data1':_0xa323('0x51'),'data2':_0xf2f769},_0x28f788));if(_0x20c4d9['loginInPause']){_0xa4964d[_0xa323('0x2d')](_[_0xa323('0x4f')]({'channel':_0x311f3c,'type':_0xa323('0x30'),'data1':_0xa323('0x52')},_0x28f788));}});return db[_0xa323('0x27')][_0xa323('0x53')](_0x23d78b[_0xa323('0x54')](_0xa4964d),{'individualHooks':!![]});}})[_0xa323('0x16')](function(){if(_0x20c4d9){return _0x20c4d9[_0xa323('0x26')]({'online':!![],'lastLoginAt':moment()[_0xa323('0x22')](_0xa323('0x29')),'voicePause':_0x20c4d9[_0xa323('0x48')]||![],'mailPause':_0x20c4d9['loginInPause']||![],'chatPause':_0x20c4d9['loginInPause']||![],'faxPause':_0x20c4d9[_0xa323('0x48')]||![],'smsPause':_0x20c4d9[_0xa323('0x48')]||![],'openchannelPause':_0x20c4d9[_0xa323('0x48')]||![],'pauseType':_0x20c4d9[_0xa323('0x48')]?'LOGININPAUSE':null,'lastPauseAt':moment()['format'](_0xa323('0x29')),'interface':_0xf2f769});}})[_0xa323('0x16')](function(_0x46e24e){_0x2b9c4b(_0x46e24e);})[_0xa323('0x18')](function(_0x529635){_0x2c7855(_0x48db13[_0xa323('0x19')](0x1f4,_0x529635[_0xa323('0x1a')]));});});};
\ No newline at end of file
index 5c54f2f..fb3b52c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb140=['save','remove','update','removeListener','user:','./user.events'];(function(_0x3da707,_0x30c36d){var _0x342ee7=function(_0x175135){while(--_0x175135){_0x3da707['push'](_0x3da707['shift']());}};_0x342ee7(++_0x30c36d);}(_0xb140,0xdd));var _0x0b14=function(_0x74a76c,_0x87c60d){_0x74a76c=_0x74a76c-0x0;var _0x3d8e25=_0xb140[_0x74a76c];return _0x3d8e25;};'use strict';var UserEvents=require(_0x0b14('0x0'));var events=[_0x0b14('0x1'),_0x0b14('0x2'),_0x0b14('0x3')];function createListener(_0x1a5d7f,_0x30367b){return function(_0x78f1a){_0x30367b['emit'](_0x1a5d7f,_0x78f1a);};}function removeListener(_0x3fcac4,_0x2190d2){return function(){UserEvents[_0x0b14('0x4')](_0x3fcac4,_0x2190d2);};}exports['register']=function(_0x3fc07d){for(var _0x3ac111=0x0,_0x5e26ca=events['length'];_0x3ac111<_0x5e26ca;_0x3ac111++){var _0x180573=events[_0x3ac111];var _0x9d4c85=createListener(_0x0b14('0x5')+_0x180573,_0x3fc07d);UserEvents['on'](_0x180573,_0x9d4c85);}};
\ No newline at end of file
+var _0xafde=['register','length','./user.events','save','emit','removeListener'];(function(_0x8914f4,_0x4361bc){var _0xe8ab94=function(_0x30be62){while(--_0x30be62){_0x8914f4['push'](_0x8914f4['shift']());}};_0xe8ab94(++_0x4361bc);}(_0xafde,0x1f4));var _0xeafd=function(_0x2e5fd3,_0x28ab1b){_0x2e5fd3=_0x2e5fd3-0x0;var _0x39274b=_0xafde[_0x2e5fd3];return _0x39274b;};'use strict';var UserEvents=require(_0xeafd('0x0'));var events=[_0xeafd('0x1'),'remove','update'];function createListener(_0x12f9db,_0x650649){return function(_0xd59bc){_0x650649[_0xeafd('0x2')](_0x12f9db,_0xd59bc);};}function removeListener(_0x3edbbb,_0x2527f2){return function(){UserEvents[_0xeafd('0x3')](_0x3edbbb,_0x2527f2);};}exports[_0xeafd('0x4')]=function(_0x5cf901){for(var _0x1d0945=0x0,_0x123ea2=events[_0xeafd('0x5')];_0x1d0945<_0x123ea2;_0x1d0945++){var _0x73b83a=events[_0x1d0945];var _0x4b3315=createListener('user:'+_0x73b83a,_0x5cf901);UserEvents['on'](_0x73b83a,_0x4b3315);}};
\ No newline at end of file
index c5c224a..d29439e 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(_0x2373a7,_0x563294){var _0xa04d6e=function(_0x155732){while(--_0x155732){_0x2373a7['push'](_0x2373a7['shift']());}};_0xa04d6e(++_0x563294);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x1db831,_0x42b7b5){_0x1db831=_0x1db831-0x0;var _0x39ba56=_0xcb91[_0x1db831];return _0x39ba56;};'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 _0xd8b0=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','multer','util'];(function(_0x28f2e6,_0x1d1fb7){var _0x2e16f6=function(_0x230ea4){while(--_0x230ea4){_0x28f2e6['push'](_0x28f2e6['shift']());}};_0x2e16f6(++_0x1d1fb7);}(_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
index 6a9d131..a4ae193 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x45d5=['INTEGER','sequelize','exports'];(function(_0x58cdd8,_0x8d1935){var _0x197e69=function(_0x406daf){while(--_0x406daf){_0x58cdd8['push'](_0x58cdd8['shift']());}};_0x197e69(++_0x8d1935);}(_0x45d5,0x1e7));var _0x545d=function(_0x23498d,_0x510aef){_0x23498d=_0x23498d-0x0;var _0x8c736f=_0x45d5[_0x23498d];return _0x8c736f;};'use strict';var Sequelize=require(_0x545d('0x0'));module[_0x545d('0x1')]={'penalty':{'type':Sequelize[_0x545d('0x2')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x9a82=['INTEGER','sequelize','exports'];(function(_0x3ee7e2,_0x15cf09){var _0x1c1f18=function(_0x3426e0){while(--_0x3426e0){_0x3ee7e2['push'](_0x3ee7e2['shift']());}};_0x1c1f18(++_0x15cf09);}(_0x9a82,0x97));var _0x29a8=function(_0x227027,_0x7369a3){_0x227027=_0x227027-0x0;var _0x2e5250=_0x9a82[_0x227027];return _0x2e5250;};'use strict';var Sequelize=require(_0x29a8('0x0'));module[_0x29a8('0x1')]={'penalty':{'type':Sequelize[_0x29a8('0x2')],'defaultValue':0x0}};
\ No newline at end of file
index df06f1d..10d36b9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9793=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./userChatQueue.attributes','define','UserChatQueue','user_has_chat_queues','lodash','util'];(function(_0x2d9839,_0x4e9a93){var _0x2e8615=function(_0x3531ed){while(--_0x3531ed){_0x2d9839['push'](_0x2d9839['shift']());}};_0x2e8615(++_0x4e9a93);}(_0x9793,0xb4));var _0x3979=function(_0x31b1b2,_0x6b3bdf){_0x31b1b2=_0x31b1b2-0x0;var _0x3f9289=_0x9793[_0x31b1b2];return _0x3f9289;};'use strict';var _=require(_0x3979('0x0'));var util=require(_0x3979('0x1'));var logger=require('../../config/logger')(_0x3979('0x2'));var moment=require(_0x3979('0x3'));var BPromise=require(_0x3979('0x4'));var rp=require(_0x3979('0x5'));var fs=require('fs');var path=require(_0x3979('0x6'));var rimraf=require(_0x3979('0x7'));var config=require(_0x3979('0x8'));var attributes=require(_0x3979('0x9'));module['exports']=function(_0x3e87ca,_0x1b93a4){return _0x3e87ca[_0x3979('0xa')](_0x3979('0xb'),attributes,{'tableName':_0x3979('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xad25=['exports','UserChatQueue','lodash','util','request-promise','rimraf','./userChatQueue.attributes'];(function(_0x33b6f1,_0x3de281){var _0x417f2a=function(_0xb803d6){while(--_0xb803d6){_0x33b6f1['push'](_0x33b6f1['shift']());}};_0x417f2a(++_0x3de281);}(_0xad25,0x191));var _0x5ad2=function(_0x36ed48,_0x1ee0d4){_0x36ed48=_0x36ed48-0x0;var _0x51c63a=_0xad25[_0x36ed48];return _0x51c63a;};'use strict';var _=require(_0x5ad2('0x0'));var util=require(_0x5ad2('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x5ad2('0x2'));var fs=require('fs');var path=require('path');var rimraf=require(_0x5ad2('0x3'));var config=require('../../config/environment');var attributes=require(_0x5ad2('0x4'));module[_0x5ad2('0x5')]=function(_0x3807cd,_0x3fc31b){return _0x3807cd['define'](_0x5ad2('0x6'),attributes,{'tableName':'user_has_chat_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index a031e6a..12595c9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd3d3=['../../config/logger','../../config/environment','jayson/promise','then','info','UserChatQueue,\x20%s,\x20%s','request\x20sent','debug','UserChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','bluebird','ioredis'];(function(_0x38be1c,_0x3b659e){var _0x2fd6ca=function(_0x493778){while(--_0x493778){_0x38be1c['push'](_0x38be1c['shift']());}};_0x2fd6ca(++_0x3b659e);}(_0xd3d3,0xda));var _0x3d3d=function(_0x45d55e,_0x2fede3){_0x45d55e=_0x45d55e-0x0;var _0x29812a=_0xd3d3[_0x45d55e];return _0x29812a;};'use strict';var _=require(_0x3d3d('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x3d3d('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x3d3d('0x2'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x3d3d('0x3'))('rpc');var config=require(_0x3d3d('0x4'));var jayson=require(_0x3d3d('0x5'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x2006bc,_0x58ac18,_0x5a66aa){return new BPromise(function(_0x4552ad,_0xd80fb9){return client['request'](_0x2006bc,_0x5a66aa)[_0x3d3d('0x6')](function(_0x5ae48b){logger[_0x3d3d('0x7')](_0x3d3d('0x8'),_0x58ac18,_0x3d3d('0x9'));logger[_0x3d3d('0xa')](_0x3d3d('0xb'),_0x58ac18,'request\x20sent',JSON[_0x3d3d('0xc')](_0x5ae48b));if(_0x5ae48b['error']){if(_0x5ae48b[_0x3d3d('0xd')][_0x3d3d('0xe')]===0x1f4){logger['error']('UserChatQueue,\x20%s,\x20%s',_0x58ac18,_0x5ae48b[_0x3d3d('0xd')][_0x3d3d('0xf')]);return _0xd80fb9(_0x5ae48b[_0x3d3d('0xd')][_0x3d3d('0xf')]);}logger['error'](_0x3d3d('0x8'),_0x58ac18,_0x5ae48b[_0x3d3d('0xd')][_0x3d3d('0xf')]);return _0x4552ad(_0x5ae48b['error'][_0x3d3d('0xf')]);}else{logger[_0x3d3d('0x7')](_0x3d3d('0x8'),_0x58ac18,'request\x20sent');_0x4552ad(_0x5ae48b['result'][_0x3d3d('0xf')]);}})[_0x3d3d('0x10')](function(_0x1ab163){logger[_0x3d3d('0xd')](_0x3d3d('0x8'),_0x58ac18,_0x1ab163);_0xd80fb9(_0x1ab163);});});}
\ No newline at end of file
+var _0x1dce=['../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','request\x20sent','stringify','error','code','UserChatQueue,\x20%s,\x20%s','message','info','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x2d04a6,_0x5bbf0a){var _0x3cd00e=function(_0x38887c){while(--_0x38887c){_0x2d04a6['push'](_0x2d04a6['shift']());}};_0x3cd00e(++_0x5bbf0a);}(_0x1dce,0x151));var _0xe1dc=function(_0x39ba00,_0x369bfb){_0x39ba00=_0x39ba00-0x0;var _0x50488=_0x1dce[_0x39ba00];return _0x50488;};'use strict';var _=require(_0xe1dc('0x0'));var util=require(_0xe1dc('0x1'));var moment=require(_0xe1dc('0x2'));var BPromise=require(_0xe1dc('0x3'));var rs=require(_0xe1dc('0x4'));var fs=require('fs');var Redis=require(_0xe1dc('0x5'));var db=require(_0xe1dc('0x6'))['db'];var utils=require(_0xe1dc('0x7'));var logger=require(_0xe1dc('0x8'))(_0xe1dc('0x9'));var config=require(_0xe1dc('0xa'));var jayson=require(_0xe1dc('0xb'));var client=jayson['client'][_0xe1dc('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x450276,_0x18e40e,_0x2d0467){return new BPromise(function(_0x3ba746,_0x3bc718){return client[_0xe1dc('0xd')](_0x450276,_0x2d0467)[_0xe1dc('0xe')](function(_0x5802ef){logger['info']('UserChatQueue,\x20%s,\x20%s',_0x18e40e,_0xe1dc('0xf'));logger['debug']('UserChatQueue,\x20%s,\x20%s,\x20%s',_0x18e40e,_0xe1dc('0xf'),JSON[_0xe1dc('0x10')](_0x5802ef));if(_0x5802ef[_0xe1dc('0x11')]){if(_0x5802ef[_0xe1dc('0x11')][_0xe1dc('0x12')]===0x1f4){logger[_0xe1dc('0x11')](_0xe1dc('0x13'),_0x18e40e,_0x5802ef[_0xe1dc('0x11')]['message']);return _0x3bc718(_0x5802ef[_0xe1dc('0x11')][_0xe1dc('0x14')]);}logger[_0xe1dc('0x11')](_0xe1dc('0x13'),_0x18e40e,_0x5802ef['error'][_0xe1dc('0x14')]);return _0x3ba746(_0x5802ef[_0xe1dc('0x11')]['message']);}else{logger[_0xe1dc('0x15')](_0xe1dc('0x13'),_0x18e40e,_0xe1dc('0xf'));_0x3ba746(_0x5802ef['result'][_0xe1dc('0x14')]);}})[_0xe1dc('0x16')](function(_0x7ac38){logger[_0xe1dc('0x11')](_0xe1dc('0x13'),_0x18e40e,_0x7ac38);_0x3bc718(_0x7ac38);});});}
\ No newline at end of file
index 030cb94..a522356 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(_0x170bc8,_0x5066f5){var _0x342273=function(_0x55481c){while(--_0x55481c){_0x170bc8['push'](_0x170bc8['shift']());}};_0x342273(++_0x5066f5);}(_0xedd9,0xfc));var _0x9edd=function(_0x3af04b,_0x4343a0){_0x3af04b=_0x3af04b-0x0;var _0x45c918=_0xedd9[_0x3af04b];return _0x45c918;};'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 _0x70e0=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','Router','fs-extra'];(function(_0x59bd45,_0x3ec67){var _0x4093b8=function(_0x499366){while(--_0x499366){_0x59bd45['push'](_0x59bd45['shift']());}};_0x4093b8(++_0x3ec67);}(_0x70e0,0x17b));var _0x070e=function(_0x107c7b,_0x5cc8d8){_0x107c7b=_0x107c7b-0x0;var _0x29ed23=_0x70e0[_0x107c7b];return _0x29ed23;};'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 4c696a3..e4eb15b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xef63=['STRING','sequelize','exports','INTEGER'];(function(_0x1ecefd,_0x8ceb9e){var _0x225204=function(_0x27ab6a){while(--_0x27ab6a){_0x1ecefd['push'](_0x1ecefd['shift']());}};_0x225204(++_0x8ceb9e);}(_0xef63,0x1b1));var _0x3ef6=function(_0x2db376,_0x1dde3b){_0x2db376=_0x2db376-0x0;var _0x41bbaf=_0xef63[_0x2db376];return _0x41bbaf;};'use strict';var Sequelize=require(_0x3ef6('0x0'));module[_0x3ef6('0x1')]={'penalty':{'type':Sequelize[_0x3ef6('0x2')],'defaultValue':0x0},'assigned':{'type':Sequelize[_0x3ef6('0x2')],'defaultValue':0x0},'queue':{'type':Sequelize[_0x3ef6('0x3')]}};
\ No newline at end of file
+var _0x5f20=['STRING','exports','INTEGER'];(function(_0x45b6f2,_0x2936c5){var _0x317ba0=function(_0x56572f){while(--_0x56572f){_0x45b6f2['push'](_0x45b6f2['shift']());}};_0x317ba0(++_0x2936c5);}(_0x5f20,0x1f0));var _0x05f2=function(_0x1573ea,_0x434f02){_0x1573ea=_0x1573ea-0x0;var _0x51c0e2=_0x5f20[_0x1573ea];return _0x51c0e2;};'use strict';var Sequelize=require('sequelize');module[_0x05f2('0x0')]={'penalty':{'type':Sequelize[_0x05f2('0x1')],'defaultValue':0x0},'assigned':{'type':Sequelize[_0x05f2('0x1')],'defaultValue':0x0},'queue':{'type':Sequelize[_0x05f2('0x2')]}};
\ No newline at end of file
index fa0bcdc..40e7b77 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcdf7=['exports','UserFaxQueue','user_has_fax_queues','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment'];(function(_0x442e99,_0xda935a){var _0x3d0b8e=function(_0x30a77b){while(--_0x30a77b){_0x442e99['push'](_0x442e99['shift']());}};_0x3d0b8e(++_0xda935a);}(_0xcdf7,0x177));var _0x7cdf=function(_0x2c93a8,_0x1f0025){_0x2c93a8=_0x2c93a8-0x0;var _0x3dfc91=_0xcdf7[_0x2c93a8];return _0x3dfc91;};'use strict';var _=require(_0x7cdf('0x0'));var util=require(_0x7cdf('0x1'));var logger=require(_0x7cdf('0x2'))(_0x7cdf('0x3'));var moment=require(_0x7cdf('0x4'));var BPromise=require(_0x7cdf('0x5'));var rp=require(_0x7cdf('0x6'));var fs=require('fs');var path=require(_0x7cdf('0x7'));var rimraf=require('rimraf');var config=require(_0x7cdf('0x8'));var attributes=require('./userFaxQueue.attributes');module[_0x7cdf('0x9')]=function(_0x199017,_0x25411c){return _0x199017['define'](_0x7cdf('0xa'),attributes,{'tableName':_0x7cdf('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x69f3=['util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./userFaxQueue.attributes','exports','define','UserFaxQueue','user_has_fax_queues'];(function(_0x351b97,_0x60125b){var _0x5b3b7e=function(_0x284562){while(--_0x284562){_0x351b97['push'](_0x351b97['shift']());}};_0x5b3b7e(++_0x60125b);}(_0x69f3,0x12b));var _0x369f=function(_0x5ed5fb,_0x457fca){_0x5ed5fb=_0x5ed5fb-0x0;var _0x18f94f=_0x69f3[_0x5ed5fb];return _0x18f94f;};'use strict';var _=require('lodash');var util=require(_0x369f('0x0'));var logger=require(_0x369f('0x1'))(_0x369f('0x2'));var moment=require(_0x369f('0x3'));var BPromise=require(_0x369f('0x4'));var rp=require(_0x369f('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x369f('0x6'));var config=require(_0x369f('0x7'));var attributes=require(_0x369f('0x8'));module[_0x369f('0x9')]=function(_0x2e2167,_0x2f7a25){return _0x2e2167[_0x369f('0xa')](_0x369f('0xb'),attributes,{'tableName':_0x369f('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 03e76dd..f600b20 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf2d2=['UserFaxQueue,\x20%s,\x20%s','request\x20sent','debug','UserFaxQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','request','info'];(function(_0x338f73,_0x1945c8){var _0x163fdf=function(_0x4cd033){while(--_0x4cd033){_0x338f73['push'](_0x338f73['shift']());}};_0x163fdf(++_0x1945c8);}(_0xf2d2,0xb9));var _0x2f2d=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xf2d2[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0x2f2d('0x0'));var util=require(_0x2f2d('0x1'));var moment=require(_0x2f2d('0x2'));var BPromise=require(_0x2f2d('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2f2d('0x4'));var db=require(_0x2f2d('0x5'))['db'];var utils=require(_0x2f2d('0x6'));var logger=require(_0x2f2d('0x7'))(_0x2f2d('0x8'));var config=require('../../config/environment');var jayson=require(_0x2f2d('0x9'));var client=jayson['client'][_0x2f2d('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3fd6f6,_0x49d144,_0x34b312){return new BPromise(function(_0x17d092,_0x169799){return client[_0x2f2d('0xb')](_0x3fd6f6,_0x34b312)['then'](function(_0x574544){logger[_0x2f2d('0xc')](_0x2f2d('0xd'),_0x49d144,_0x2f2d('0xe'));logger[_0x2f2d('0xf')](_0x2f2d('0x10'),_0x49d144,_0x2f2d('0xe'),JSON[_0x2f2d('0x11')](_0x574544));if(_0x574544[_0x2f2d('0x12')]){if(_0x574544['error']['code']===0x1f4){logger['error'](_0x2f2d('0xd'),_0x49d144,_0x574544[_0x2f2d('0x12')][_0x2f2d('0x13')]);return _0x169799(_0x574544[_0x2f2d('0x12')][_0x2f2d('0x13')]);}logger['error']('UserFaxQueue,\x20%s,\x20%s',_0x49d144,_0x574544[_0x2f2d('0x12')]['message']);return _0x17d092(_0x574544[_0x2f2d('0x12')][_0x2f2d('0x13')]);}else{logger[_0x2f2d('0xc')]('UserFaxQueue,\x20%s,\x20%s',_0x49d144,_0x2f2d('0xe'));_0x17d092(_0x574544[_0x2f2d('0x14')]['message']);}})[_0x2f2d('0x15')](function(_0x29add7){logger[_0x2f2d('0x12')]('UserFaxQueue,\x20%s,\x20%s',_0x49d144,_0x29add7);_0x169799(_0x29add7);});});}
\ No newline at end of file
+var _0x931c=['error','message','result','catch','moment','bluebird','randomstring','ioredis','../../config/logger','rpc','http','then','UserFaxQueue,\x20%s,\x20%s','request\x20sent','debug','stringify'];(function(_0x5710db,_0x410db1){var _0xee92e=function(_0x1606e7){while(--_0x1606e7){_0x5710db['push'](_0x5710db['shift']());}};_0xee92e(++_0x410db1);}(_0x931c,0x134));var _0xc931=function(_0x5edcdf,_0xbc6078){_0x5edcdf=_0x5edcdf-0x0;var _0x2180e1=_0x931c[_0x5edcdf];return _0x2180e1;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xc931('0x0'));var BPromise=require(_0xc931('0x1'));var rs=require(_0xc931('0x2'));var fs=require('fs');var Redis=require(_0xc931('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xc931('0x4'))(_0xc931('0x5'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0xc931('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x5d56d5,_0x374016,_0x1b801a){return new BPromise(function(_0x293222,_0x260912){return client['request'](_0x5d56d5,_0x1b801a)[_0xc931('0x7')](function(_0x589dc6){logger['info'](_0xc931('0x8'),_0x374016,_0xc931('0x9'));logger[_0xc931('0xa')]('UserFaxQueue,\x20%s,\x20%s,\x20%s',_0x374016,_0xc931('0x9'),JSON[_0xc931('0xb')](_0x589dc6));if(_0x589dc6[_0xc931('0xc')]){if(_0x589dc6[_0xc931('0xc')]['code']===0x1f4){logger['error']('UserFaxQueue,\x20%s,\x20%s',_0x374016,_0x589dc6[_0xc931('0xc')][_0xc931('0xd')]);return _0x260912(_0x589dc6[_0xc931('0xc')][_0xc931('0xd')]);}logger['error'](_0xc931('0x8'),_0x374016,_0x589dc6[_0xc931('0xc')][_0xc931('0xd')]);return _0x293222(_0x589dc6[_0xc931('0xc')]['message']);}else{logger['info'](_0xc931('0x8'),_0x374016,_0xc931('0x9'));_0x293222(_0x589dc6[_0xc931('0xe')][_0xc931('0xd')]);}})[_0xc931('0xf')](function(_0x4280f1){logger[_0xc931('0xc')](_0xc931('0x8'),_0x374016,_0x4280f1);_0x260912(_0x4280f1);});});}
\ No newline at end of file
index 399f27c..f5ca11a 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(_0x31408c,_0x365b43){var _0x253c34=function(_0x4464e3){while(--_0x4464e3){_0x31408c['push'](_0x31408c['shift']());}};_0x253c34(++_0x365b43);}(_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(_0x4a9dd3,_0x378439){var _0x14bb4b=function(_0x5c9204){while(--_0x5c9204){_0x4a9dd3['push'](_0x4a9dd3['shift']());}};_0x14bb4b(++_0x378439);}(_0x70e0,0x17b));var _0x070e=function(_0xac674f,_0x379d51){_0xac674f=_0xac674f-0x0;var _0xebc81=_0x70e0[_0xac674f];return _0xebc81;};'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 4b70000..2f5862e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7d2f=['exports','INTEGER'];(function(_0xc36dad,_0x44723e){var _0x133b50=function(_0x371ddc){while(--_0x371ddc){_0xc36dad['push'](_0xc36dad['shift']());}};_0x133b50(++_0x44723e);}(_0x7d2f,0xba));var _0xf7d2=function(_0x1813e7,_0x2eb397){_0x1813e7=_0x1813e7-0x0;var _0x1fd03a=_0x7d2f[_0x1813e7];return _0x1fd03a;};'use strict';var Sequelize=require('sequelize');module[_0xf7d2('0x0')]={'penalty':{'type':Sequelize[_0xf7d2('0x1')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x2f02=['sequelize','exports'];(function(_0xd1d19a,_0x1933f0){var _0x52a79d=function(_0x5199e2){while(--_0x5199e2){_0xd1d19a['push'](_0xd1d19a['shift']());}};_0x52a79d(++_0x1933f0);}(_0x2f02,0x11e));var _0x22f0=function(_0x4287fe,_0x14ad49){_0x4287fe=_0x4287fe-0x0;var _0x329a39=_0x2f02[_0x4287fe];return _0x329a39;};'use strict';var Sequelize=require(_0x22f0('0x0'));module[_0x22f0('0x1')]={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0}};
\ No newline at end of file
index 8c5c6be..f8e27ef 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfc14=['util','../../config/logger','moment','request-promise','rimraf','../../config/environment','./userMailQueue.attributes','define','user_has_mail_queues'];(function(_0x2a37a4,_0x464b98){var _0x29d935=function(_0xff7180){while(--_0xff7180){_0x2a37a4['push'](_0x2a37a4['shift']());}};_0x29d935(++_0x464b98);}(_0xfc14,0xea));var _0x4fc1=function(_0x3c1b97,_0x2e45b0){_0x3c1b97=_0x3c1b97-0x0;var _0x893e37=_0xfc14[_0x3c1b97];return _0x893e37;};'use strict';var _=require('lodash');var util=require(_0x4fc1('0x0'));var logger=require(_0x4fc1('0x1'))('api');var moment=require(_0x4fc1('0x2'));var BPromise=require('bluebird');var rp=require(_0x4fc1('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x4fc1('0x4'));var config=require(_0x4fc1('0x5'));var attributes=require(_0x4fc1('0x6'));module['exports']=function(_0x87e54c,_0x127ada){return _0x87e54c[_0x4fc1('0x7')]('UserMailQueue',attributes,{'tableName':_0x4fc1('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xa013=['moment','bluebird','request-promise','path','rimraf','./userMailQueue.attributes','exports','define','UserMailQueue','util','../../config/logger','api'];(function(_0x594cd2,_0x31896d){var _0x17a200=function(_0x28f8a6){while(--_0x28f8a6){_0x594cd2['push'](_0x594cd2['shift']());}};_0x17a200(++_0x31896d);}(_0xa013,0xbd));var _0x3a01=function(_0x119705,_0xba9427){_0x119705=_0x119705-0x0;var _0x2affc2=_0xa013[_0x119705];return _0x2affc2;};'use strict';var _=require('lodash');var util=require(_0x3a01('0x0'));var logger=require(_0x3a01('0x1'))(_0x3a01('0x2'));var moment=require(_0x3a01('0x3'));var BPromise=require(_0x3a01('0x4'));var rp=require(_0x3a01('0x5'));var fs=require('fs');var path=require(_0x3a01('0x6'));var rimraf=require(_0x3a01('0x7'));var config=require('../../config/environment');var attributes=require(_0x3a01('0x8'));module[_0x3a01('0x9')]=function(_0x42eee5,_0x52a9a8){return _0x42eee5[_0x3a01('0xa')](_0x3a01('0xb'),attributes,{'tableName':'user_has_mail_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 2444b1b..40d8663 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6aa7=['result','catch','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','client','request','then','info','UserMailQueue,\x20%s,\x20%s','request\x20sent','debug','UserMailQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x1b9f5a,_0x4543b0){var _0x4a5969=function(_0x571bb3){while(--_0x571bb3){_0x1b9f5a['push'](_0x1b9f5a['shift']());}};_0x4a5969(++_0x4543b0);}(_0x6aa7,0x178));var _0x76aa=function(_0x150ea1,_0x44a069){_0x150ea1=_0x150ea1-0x0;var _0x41fa25=_0x6aa7[_0x150ea1];return _0x41fa25;};'use strict';var _=require(_0x76aa('0x0'));var util=require('util');var moment=require(_0x76aa('0x1'));var BPromise=require(_0x76aa('0x2'));var rs=require(_0x76aa('0x3'));var fs=require('fs');var Redis=require(_0x76aa('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x76aa('0x5'));var logger=require(_0x76aa('0x6'))(_0x76aa('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x76aa('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x32dee5,_0x36d12b,_0xa9b695){return new BPromise(function(_0x56d6bc,_0x3dae33){return client[_0x76aa('0x9')](_0x32dee5,_0xa9b695)[_0x76aa('0xa')](function(_0x557d69){logger[_0x76aa('0xb')](_0x76aa('0xc'),_0x36d12b,_0x76aa('0xd'));logger[_0x76aa('0xe')](_0x76aa('0xf'),_0x36d12b,_0x76aa('0xd'),JSON[_0x76aa('0x10')](_0x557d69));if(_0x557d69[_0x76aa('0x11')]){if(_0x557d69[_0x76aa('0x11')][_0x76aa('0x12')]===0x1f4){logger['error'](_0x76aa('0xc'),_0x36d12b,_0x557d69['error'][_0x76aa('0x13')]);return _0x3dae33(_0x557d69[_0x76aa('0x11')][_0x76aa('0x13')]);}logger[_0x76aa('0x11')](_0x76aa('0xc'),_0x36d12b,_0x557d69['error']['message']);return _0x56d6bc(_0x557d69[_0x76aa('0x11')]['message']);}else{logger[_0x76aa('0xb')](_0x76aa('0xc'),_0x36d12b,'request\x20sent');_0x56d6bc(_0x557d69[_0x76aa('0x14')]['message']);}})[_0x76aa('0x15')](function(_0x5181d2){logger[_0x76aa('0x11')](_0x76aa('0xc'),_0x36d12b,_0x5181d2);_0x3dae33(_0x5181d2);});});}
\ 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(_0x177ab0,_0x24fed6){var _0x2cba32=function(_0x3c67d6){while(--_0x3c67d6){_0x177ab0['push'](_0x177ab0['shift']());}};_0x2cba32(++_0x24fed6);}(_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 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 3740bae..192ff3d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3433=['../../config/environment','post','isAuthenticated','sendUserNotification','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x6c993a,_0x5ea3ab){var _0x27f547=function(_0x22df20){while(--_0x22df20){_0x6c993a['push'](_0x6c993a['shift']());}};_0x27f547(++_0x5ea3ab);}(_0x3433,0x17f));var _0x3343=function(_0x13e758,_0x317d23){_0x13e758=_0x13e758-0x0;var _0x5b53c3=_0x3433[_0x13e758];return _0x5b53c3;};'use strict';var multer=require(_0x3343('0x0'));var util=require(_0x3343('0x1'));var path=require(_0x3343('0x2'));var timeout=require(_0x3343('0x3'));var express=require(_0x3343('0x4'));var router=express[_0x3343('0x5')]();var fs_extra=require(_0x3343('0x6'));var auth=require(_0x3343('0x7'));var interaction=require(_0x3343('0x8'));var config=require(_0x3343('0x9'));var controller=require('./userNotification.controller');router[_0x3343('0xa')]('/',auth[_0x3343('0xb')](),controller[_0x3343('0xc')]);module[_0x3343('0xd')]=router;
\ No newline at end of file
+var _0x947d=['util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./userNotification.controller','isAuthenticated','exports'];(function(_0x23f564,_0x48d2ba){var _0x47582b=function(_0x3a8876){while(--_0x3a8876){_0x23f564['push'](_0x23f564['shift']());}};_0x47582b(++_0x48d2ba);}(_0x947d,0x118));var _0xd947=function(_0x5c965a,_0x42cc16){_0x5c965a=_0x5c965a-0x0;var _0x3b6bd9=_0x947d[_0x5c965a];return _0x3b6bd9;};'use strict';var multer=require('multer');var util=require(_0xd947('0x0'));var path=require('path');var timeout=require(_0xd947('0x1'));var express=require(_0xd947('0x2'));var router=express[_0xd947('0x3')]();var fs_extra=require(_0xd947('0x4'));var auth=require(_0xd947('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xd947('0x6'));var controller=require(_0xd947('0x7'));router['post']('/',auth[_0xd947('0x8')](),controller['sendUserNotification']);module[_0xd947('0x9')]=router;
\ No newline at end of file
index 3318151..0a0c7cc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6f33=['TEXT','STRING','BOOLEAN','exports'];(function(_0x546e79,_0x234028){var _0x5c0726=function(_0x488631){while(--_0x488631){_0x546e79['push'](_0x546e79['shift']());}};_0x5c0726(++_0x234028);}(_0x6f33,0x1bf));var _0x36f3=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x6f33[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require('sequelize');module[_0x36f3('0x0')]={'body':{'type':Sequelize[_0x36f3('0x1')]},'senderName':{'type':Sequelize[_0x36f3('0x2')]},'recipientsId':{'type':Sequelize['TEXT']},'recipientsDescription':{'type':Sequelize['STRING']},'beep':{'type':Sequelize[_0x36f3('0x3')]}};
\ No newline at end of file
+var _0xbd54=['sequelize','exports','TEXT','STRING','BOOLEAN'];(function(_0x1eca35,_0x214670){var _0x1d565f=function(_0x10855f){while(--_0x10855f){_0x1eca35['push'](_0x1eca35['shift']());}};_0x1d565f(++_0x214670);}(_0xbd54,0x104));var _0x4bd5=function(_0x588bf2,_0xe6fb8){_0x588bf2=_0x588bf2-0x0;var _0x571db3=_0xbd54[_0x588bf2];return _0x571db3;};'use strict';var Sequelize=require(_0x4bd5('0x0'));module[_0x4bd5('0x1')]={'body':{'type':Sequelize[_0x4bd5('0x2')]},'senderName':{'type':Sequelize[_0x4bd5('0x3')]},'recipientsId':{'type':Sequelize[_0x4bd5('0x2')]},'recipientsDescription':{'type':Sequelize[_0x4bd5('0x3')]},'beep':{'type':Sequelize[_0x4bd5('0x4')]}};
\ No newline at end of file
index 23d3138..d87a9e8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf162=['Missing\x20\x27recipients\x27\x20parameter','parse','error','Invalid\x20\x27recipients\x27\x20object','chatqueue','faxqueue','openchannelqueue','smsqueue','voicequeue','whatsappqueue','user','some','includes','model','toLowerCase','Invalid\x20model\x20in\x20\x27recipients\x27\x20object','senderName','fullname','recipientsDescription','isEmpty','beep','SenderId','recipientsId','sortBy','join','sequelize','transaction','UserNotification','forEach','recipient','emit','userNotification:send','catch','text','html','Invalid\x20\x27TemplateId\x27\x20parameter','render','startCase','ids','queue','push','all','flatten','findOne','getAgents','map','eml-format','fast-json-patch','request-promise','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/environment','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./userNotification.socket','register','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','destroy','then','stack','name','send','sendUserNotification','hasOwnProperty','TemplateId','ValidationError','Must\x20specify\x20at\x20least\x20one\x20argument\x20for\x20\x27text\x27\x20or\x20\x27TemplateId\x27','body','view','Missing\x20\x27view\x27\x20parameter','recipients','Sequelize'];(function(_0x1cc8fe,_0x105328){var _0x230054=function(_0x1a1b56){while(--_0x1a1b56){_0x1cc8fe['push'](_0x1cc8fe['shift']());}};_0x230054(++_0x105328);}(_0xf162,0x1d6));var _0x2f16=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0xf162[_0x57b54c];return _0x59cc19;};'use strict';var emlformat=require(_0x2f16('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x2f16('0x1'));var rp=require(_0x2f16('0x2'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x2f16('0x3'));var util=require(_0x2f16('0x4'));var path=require(_0x2f16('0x5'));var sox=require(_0x2f16('0x6'));var csv=require(_0x2f16('0x7'));var ejs=require(_0x2f16('0x8'));var fs=require('fs');var fs_extra=require(_0x2f16('0x9'));var _=require(_0x2f16('0xa'));var squel=require(_0x2f16('0xb'));var crypto=require(_0x2f16('0xc'));var jsforce=require(_0x2f16('0xd'));var deskjs=require(_0x2f16('0xe'));var toCsv=require('to-csv');var querystring=require(_0x2f16('0xf'));var Papa=require(_0x2f16('0x10'));var Redis=require(_0x2f16('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x2f16('0x12'));var hardwareService=require(_0x2f16('0x13'));var logger=require(_0x2f16('0x14'))(_0x2f16('0x15'));var utils=require(_0x2f16('0x16'));var config=require(_0x2f16('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x2f16('0x18'))['db'];config['redis']=_[_0x2f16('0x19')](config[_0x2f16('0x1a')],{'host':_0x2f16('0x1b'),'port':0x18eb});var socket=require(_0x2f16('0x1c'))(new Redis(config[_0x2f16('0x1a')]));require(_0x2f16('0x1d'))[_0x2f16('0x1e')](socket);function respondWithStatusCode(_0x536912,_0x26e9aa){_0x26e9aa=_0x26e9aa||0xcc;return function(_0x38faa8){if(_0x38faa8){return _0x536912[_0x2f16('0x1f')](_0x26e9aa);}return _0x536912[_0x2f16('0x20')](_0x26e9aa)[_0x2f16('0x21')]();};}function respondWithResult(_0xcc2805,_0x3c2782){_0x3c2782=_0x3c2782||0xc8;return function(_0x9c1dd5){if(_0x9c1dd5){return _0xcc2805[_0x2f16('0x20')](_0x3c2782)[_0x2f16('0x22')](_0x9c1dd5);}};}function respondWithFilteredResult(_0x72577c,_0x1b5a45){return function(_0x37b384){if(_0x37b384){var _0x4da791=typeof _0x1b5a45[_0x2f16('0x23')]===_0x2f16('0x24')&&typeof _0x1b5a45[_0x2f16('0x25')]===_0x2f16('0x24');var _0x5b5f03=_0x37b384[_0x2f16('0x26')];var _0x572d6c=_0x4da791?0x0:_0x1b5a45['offset'];var _0x84df1b=_0x4da791?_0x37b384[_0x2f16('0x26')]:_0x1b5a45[_0x2f16('0x23')]+_0x1b5a45[_0x2f16('0x25')];var _0x5bbab9;if(_0x84df1b>=_0x5b5f03){_0x84df1b=_0x5b5f03;_0x5bbab9=0xc8;}else{_0x5bbab9=0xce;}_0x72577c['status'](_0x5bbab9);return _0x72577c[_0x2f16('0x27')](_0x2f16('0x28'),_0x572d6c+'-'+_0x84df1b+'/'+_0x5b5f03)[_0x2f16('0x22')](_0x37b384);}return null;};}function patchUpdates(_0x11c193){return function(_0x38bc4b){try{jsonpatch[_0x2f16('0x29')](_0x38bc4b,_0x11c193,!![]);}catch(_0x5d3a4f){return BPromise[_0x2f16('0x2a')](_0x5d3a4f);}return _0x38bc4b[_0x2f16('0x2b')]();};}function saveUpdates(_0x4696e5,_0x289634){return function(_0x3097a0){if(_0x3097a0){return _0x3097a0[_0x2f16('0x2c')](_0x4696e5)['then'](function(_0x5275fb){return _0x5275fb;});}return null;};}function removeEntity(_0x10a91b,_0x30b6dc){return function(_0x281520){if(_0x281520){return _0x281520[_0x2f16('0x2d')]()[_0x2f16('0x2e')](function(){_0x10a91b[_0x2f16('0x20')](0xcc)[_0x2f16('0x21')]();});}};}function handleEntityNotFound(_0x282887,_0x84aac6){return function(_0x1c67ac){if(!_0x1c67ac){_0x282887['sendStatus'](0x194);}return _0x1c67ac;};}function handleError(_0x2d1904,_0x5e298e){_0x5e298e=_0x5e298e||0x1f4;return function(_0xb3cd20){logger['error'](_0xb3cd20[_0x2f16('0x2f')]);if(_0xb3cd20[_0x2f16('0x30')]){delete _0xb3cd20['name'];}_0x2d1904[_0x2f16('0x20')](_0x5e298e)[_0x2f16('0x31')](_0xb3cd20);};}exports[_0x2f16('0x32')]=function(_0x5e0d90,_0x15c517,_0x477eab){if(!_0x5e0d90['body'][_0x2f16('0x33')]('text')&&!_0x5e0d90['body'][_0x2f16('0x33')](_0x2f16('0x34'))){throw new db['Sequelize'][(_0x2f16('0x35'))](_0x2f16('0x36'));}else{if(_0x5e0d90['body'][_0x2f16('0x33')]('TemplateId')&&!_0x5e0d90[_0x2f16('0x37')][_0x2f16('0x33')](_0x2f16('0x38'))){throw new db['Sequelize'][(_0x2f16('0x35'))](_0x2f16('0x39'));}if(!_0x5e0d90['body'][_0x2f16('0x33')](_0x2f16('0x3a'))){throw new db[(_0x2f16('0x3b'))][(_0x2f16('0x35'))](_0x2f16('0x3c'));}else{try{var _0x8d4331=JSON[_0x2f16('0x3d')](_0x5e0d90['body'][_0x2f16('0x3a')]);}catch(_0x1fef5a){logger[_0x2f16('0x3e')](_0x1fef5a);throw new db['Sequelize'][(_0x2f16('0x35'))](_0x2f16('0x3f'));}var _0xeebb78=[_0x2f16('0x40'),_0x2f16('0x41'),'mailqueue',_0x2f16('0x42'),_0x2f16('0x43'),_0x2f16('0x44'),_0x2f16('0x45'),'team',_0x2f16('0x46')];if(_[_0x2f16('0x47')](_0x8d4331,function(_0x5492f1){return!_[_0x2f16('0x48')](_0xeebb78,_0x5492f1[_0x2f16('0x49')][_0x2f16('0x4a')]());})){throw new db['Sequelize'][(_0x2f16('0x35'))](_0x2f16('0x4b'));}}}var _0x363761={};_0x363761['senderName']=_0x5e0d90[_0x2f16('0x37')]['hasOwnProperty'](_0x2f16('0x4c'))?_0x5e0d90[_0x2f16('0x37')][_0x2f16('0x4c')]:_0x5e0d90[_0x2f16('0x46')][_0x2f16('0x4d')];_0x363761[_0x2f16('0x4e')]=_[_0x2f16('0x4f')](_0x5e0d90[_0x2f16('0x37')][_0x2f16('0x4e')])?null:_0x5e0d90[_0x2f16('0x37')][_0x2f16('0x4e')];_0x363761[_0x2f16('0x50')]=_0x5e0d90[_0x2f16('0x37')][_0x2f16('0x50')]||![];_0x363761[_0x2f16('0x51')]=_0x5e0d90['user']['id'];return getContent(_0x5e0d90[_0x2f16('0x37')])[_0x2f16('0x2e')](function(_0x915aac){_0x363761[_0x2f16('0x37')]=_0x915aac;return getRecipients(_0x8d4331);})[_0x2f16('0x2e')](function(_0xa969ad){_0x363761[_0x2f16('0x52')]=_[_0x2f16('0x53')](_0xa969ad)[_0x2f16('0x54')](',');return db[_0x2f16('0x55')][_0x2f16('0x56')](function(_0x5607db){return db[_0x2f16('0x57')]['create'](_0x363761,{'raw':!![],'transaction':_0x5607db})['then'](function(_0x13d186){var _0x47db82={'sender':_0x363761[_0x2f16('0x4c')],'description':_0x363761[_0x2f16('0x4e')],'content':_0x363761[_0x2f16('0x37')],'beep':_0x363761[_0x2f16('0x50')]};_0xa969ad[_0x2f16('0x58')](function(_0x4e641c){_0x47db82[_0x2f16('0x59')]=_0x4e641c;socket[_0x2f16('0x5a')](_0x2f16('0x5b'),_0x47db82);});return _0x13d186;});});})[_0x2f16('0x2e')](respondWithResult(_0x15c517,0xc9))[_0x2f16('0x5c')](handleError(_0x15c517,null));};function getContent(_0x385a6b){return new BPromise(function(_0x155f51,_0x3bc3ff){if(_0x385a6b['text']){_0x155f51(_0x385a6b[_0x2f16('0x5d')]);return;}return db['Template']['findOne']({'attributes':[_0x2f16('0x5e')],'where':{'id':_0x385a6b['TemplateId']},'raw':!![]})['then'](function(_0x27a753){if(!_0x27a753)throw new db[(_0x2f16('0x3b'))][(_0x2f16('0x35'))](_0x2f16('0x5f'));var _0x2ad7b1=Mustache[_0x2f16('0x60')](_0x27a753[_0x2f16('0x5e')],_0x385a6b[_0x2f16('0x38')]);_0x155f51(_0x2ad7b1);})[_0x2f16('0x5c')](function(_0x36e4be){_0x3bc3ff(_0x36e4be);});});}function getRecipients(_0x31c46b){return new BPromise(function(_0x25ebe0,_0x473a24){var _0x542feb=[];var _0x40e408=[];_0x31c46b[_0x2f16('0x58')](function(_0x33ca89){var _0x4d44f4=_[_0x2f16('0x61')](_0x33ca89[_0x2f16('0x49')]['toLowerCase']());if(_0x4d44f4==='User'){_0x542feb=_['union'](_0x542feb,_0x33ca89[_0x2f16('0x62')]);}else{if(_['includes'](_0x4d44f4,'queue'))_0x4d44f4=_0x4d44f4['replace'](_0x2f16('0x63'),'Queue');_0x33ca89['ids'][_0x2f16('0x58')](function(_0x43e052){_0x40e408[_0x2f16('0x64')](getAgents(_0x4d44f4,_0x43e052));});}});return BPromise[_0x2f16('0x65')](_0x40e408)[_0x2f16('0x2e')](function(_0x541c52){_0x542feb=_['union'](_0x542feb,_[_0x2f16('0x66')](_0x541c52));_0x25ebe0(_0x542feb);})['catch'](function(_0x4c7fc4){_0x473a24(_0x4c7fc4);});});}function getAgents(_0x113246,_0x1e0071){return new BPromise(function(_0x399636,_0xa48e5b){return db[_0x113246][_0x2f16('0x67')]({'where':{'id':_0x1e0071}})[_0x2f16('0x2e')](function(_0x11e6a5){return _0x11e6a5[_0x2f16('0x68')]({'attributes':['id'],'raw':!![]})[_0x2f16('0x2e')](function(_0x3aafa2){var _0x435c92=_[_0x2f16('0x69')](_0x3aafa2,'id');_0x399636(_0x435c92);});})[_0x2f16('0x5c')](function(_0xe84c14){_0xa48e5b(_0xe84c14);});});}
\ No newline at end of file
+var _0xe794=['findOne','html','Invalid\x20\x27TemplateId\x27\x20parameter','render','startCase','User','union','queue','replace','Queue','ids','all','getAgents','map','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','redis','localhost','socket.io-emitter','./userNotification.socket','register','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','reject','save','update','destroy','then','end','error','name','sendUserNotification','body','hasOwnProperty','text','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','faxqueue','mailqueue','openchannelqueue','team','user','some','includes','model','toLowerCase','Invalid\x20model\x20in\x20\x27recipients\x27\x20object','senderName','fullname','recipientsDescription','isEmpty','recipientsId','join','sequelize','transaction','UserNotification','create','beep','forEach','recipient','emit','userNotification:send','catch','Template'];(function(_0x57fb52,_0x5201a7){var _0x313a9c=function(_0x5241e0){while(--_0x5241e0){_0x57fb52['push'](_0x57fb52['shift']());}};_0x313a9c(++_0x5201a7);}(_0xe794,0x13d));var _0x4e79=function(_0x11a984,_0x3fd55c){_0x11a984=_0x11a984-0x0;var _0x324b97=_0xe794[_0x11a984];return _0x324b97;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x4e79('0x0'));var zipdir=require(_0x4e79('0x1'));var jsonpatch=require(_0x4e79('0x2'));var rp=require(_0x4e79('0x3'));var moment=require(_0x4e79('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x4e79('0x5'));var util=require(_0x4e79('0x6'));var path=require(_0x4e79('0x7'));var sox=require(_0x4e79('0x8'));var csv=require(_0x4e79('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x4e79('0xa'));var crypto=require(_0x4e79('0xb'));var jsforce=require(_0x4e79('0xc'));var deskjs=require(_0x4e79('0xd'));var toCsv=require(_0x4e79('0x9'));var querystring=require(_0x4e79('0xe'));var Papa=require(_0x4e79('0xf'));var Redis=require(_0x4e79('0x10'));var authService=require(_0x4e79('0x11'));var qs=require(_0x4e79('0x12'));var as=require(_0x4e79('0x13'));var hardwareService=require(_0x4e79('0x14'));var logger=require('../../config/logger')(_0x4e79('0x15'));var utils=require(_0x4e79('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x4e79('0x17'));var db=require('../../mysqldb')['db'];config[_0x4e79('0x18')]=_['defaults'](config['redis'],{'host':_0x4e79('0x19'),'port':0x18eb});var socket=require(_0x4e79('0x1a'))(new Redis(config[_0x4e79('0x18')]));require(_0x4e79('0x1b'))[_0x4e79('0x1c')](socket);function respondWithStatusCode(_0x4bad04,_0x356ad1){_0x356ad1=_0x356ad1||0xcc;return function(_0x99924f){if(_0x99924f){return _0x4bad04[_0x4e79('0x1d')](_0x356ad1);}return _0x4bad04[_0x4e79('0x1e')](_0x356ad1)['end']();};}function respondWithResult(_0x2714da,_0x30aa94){_0x30aa94=_0x30aa94||0xc8;return function(_0x583182){if(_0x583182){return _0x2714da[_0x4e79('0x1e')](_0x30aa94)[_0x4e79('0x1f')](_0x583182);}};}function respondWithFilteredResult(_0x38a967,_0x15ea28){return function(_0x417985){if(_0x417985){var _0x1ffead=typeof _0x15ea28[_0x4e79('0x20')]===_0x4e79('0x21')&&typeof _0x15ea28[_0x4e79('0x22')]===_0x4e79('0x21');var _0x2732b2=_0x417985[_0x4e79('0x23')];var _0x2fecf2=_0x1ffead?0x0:_0x15ea28['offset'];var _0x5e0241=_0x1ffead?_0x417985['count']:_0x15ea28[_0x4e79('0x20')]+_0x15ea28[_0x4e79('0x22')];var _0x456198;if(_0x5e0241>=_0x2732b2){_0x5e0241=_0x2732b2;_0x456198=0xc8;}else{_0x456198=0xce;}_0x38a967['status'](_0x456198);return _0x38a967[_0x4e79('0x24')](_0x4e79('0x25'),_0x2fecf2+'-'+_0x5e0241+'/'+_0x2732b2)[_0x4e79('0x1f')](_0x417985);}return null;};}function patchUpdates(_0x1f2e69){return function(_0x3faa3e){try{jsonpatch['apply'](_0x3faa3e,_0x1f2e69,!![]);}catch(_0xc3d9fb){return BPromise[_0x4e79('0x26')](_0xc3d9fb);}return _0x3faa3e[_0x4e79('0x27')]();};}function saveUpdates(_0x487b68,_0x24b201){return function(_0x5813e3){if(_0x5813e3){return _0x5813e3[_0x4e79('0x28')](_0x487b68)['then'](function(_0x102eab){return _0x102eab;});}return null;};}function removeEntity(_0x2dbadc,_0x3eb312){return function(_0x53f4ae){if(_0x53f4ae){return _0x53f4ae[_0x4e79('0x29')]()[_0x4e79('0x2a')](function(){_0x2dbadc['status'](0xcc)[_0x4e79('0x2b')]();});}};}function handleEntityNotFound(_0x5edd5d,_0x1e3cfa){return function(_0xd2fc4){if(!_0xd2fc4){_0x5edd5d[_0x4e79('0x1d')](0x194);}return _0xd2fc4;};}function handleError(_0x4b8d28,_0xa0b07){_0xa0b07=_0xa0b07||0x1f4;return function(_0x47d2de){logger[_0x4e79('0x2c')](_0x47d2de['stack']);if(_0x47d2de[_0x4e79('0x2d')]){delete _0x47d2de[_0x4e79('0x2d')];}_0x4b8d28[_0x4e79('0x1e')](_0xa0b07)['send'](_0x47d2de);};}exports[_0x4e79('0x2e')]=function(_0x50ad58,_0x15bce2,_0x3536c6){if(!_0x50ad58[_0x4e79('0x2f')][_0x4e79('0x30')](_0x4e79('0x31'))&&!_0x50ad58['body'][_0x4e79('0x30')](_0x4e79('0x32'))){throw new db[(_0x4e79('0x33'))][(_0x4e79('0x34'))](_0x4e79('0x35'));}else{if(_0x50ad58[_0x4e79('0x2f')][_0x4e79('0x30')](_0x4e79('0x32'))&&!_0x50ad58[_0x4e79('0x2f')][_0x4e79('0x30')](_0x4e79('0x36'))){throw new db[(_0x4e79('0x33'))][(_0x4e79('0x34'))](_0x4e79('0x37'));}if(!_0x50ad58[_0x4e79('0x2f')][_0x4e79('0x30')](_0x4e79('0x38'))){throw new db['Sequelize'][(_0x4e79('0x34'))](_0x4e79('0x39'));}else{try{var _0x2e8f8f=JSON[_0x4e79('0x3a')](_0x50ad58[_0x4e79('0x2f')][_0x4e79('0x38')]);}catch(_0x4f81d2){logger[_0x4e79('0x2c')](_0x4f81d2);throw new db['Sequelize'][(_0x4e79('0x34'))]('Invalid\x20\x27recipients\x27\x20object');}var _0x23ef11=[_0x4e79('0x3b'),_0x4e79('0x3c'),_0x4e79('0x3d'),_0x4e79('0x3e'),'smsqueue','voicequeue','whatsappqueue',_0x4e79('0x3f'),_0x4e79('0x40')];if(_[_0x4e79('0x41')](_0x2e8f8f,function(_0x49a028){return!_[_0x4e79('0x42')](_0x23ef11,_0x49a028[_0x4e79('0x43')][_0x4e79('0x44')]());})){throw new db['Sequelize'][(_0x4e79('0x34'))](_0x4e79('0x45'));}}}var _0x39c678={};_0x39c678[_0x4e79('0x46')]=_0x50ad58[_0x4e79('0x2f')][_0x4e79('0x30')](_0x4e79('0x46'))?_0x50ad58['body'][_0x4e79('0x46')]:_0x50ad58[_0x4e79('0x40')][_0x4e79('0x47')];_0x39c678[_0x4e79('0x48')]=_[_0x4e79('0x49')](_0x50ad58[_0x4e79('0x2f')][_0x4e79('0x48')])?null:_0x50ad58[_0x4e79('0x2f')][_0x4e79('0x48')];_0x39c678['beep']=_0x50ad58['body']['beep']||![];_0x39c678['SenderId']=_0x50ad58[_0x4e79('0x40')]['id'];return getContent(_0x50ad58['body'])['then'](function(_0x24cf5f){_0x39c678[_0x4e79('0x2f')]=_0x24cf5f;return getRecipients(_0x2e8f8f);})[_0x4e79('0x2a')](function(_0x290976){_0x39c678[_0x4e79('0x4a')]=_['sortBy'](_0x290976)[_0x4e79('0x4b')](',');return db[_0x4e79('0x4c')][_0x4e79('0x4d')](function(_0x29ddab){return db[_0x4e79('0x4e')][_0x4e79('0x4f')](_0x39c678,{'raw':!![],'transaction':_0x29ddab})[_0x4e79('0x2a')](function(_0x2d1220){var _0x20c0bc={'sender':_0x39c678[_0x4e79('0x46')],'description':_0x39c678[_0x4e79('0x48')],'content':_0x39c678[_0x4e79('0x2f')],'beep':_0x39c678[_0x4e79('0x50')]};_0x290976[_0x4e79('0x51')](function(_0x3a39af){_0x20c0bc[_0x4e79('0x52')]=_0x3a39af;socket[_0x4e79('0x53')](_0x4e79('0x54'),_0x20c0bc);});return _0x2d1220;});});})['then'](respondWithResult(_0x15bce2,0xc9))[_0x4e79('0x55')](handleError(_0x15bce2,null));};function getContent(_0x5d8f69){return new BPromise(function(_0x207538,_0x18ea7d){if(_0x5d8f69[_0x4e79('0x31')]){_0x207538(_0x5d8f69[_0x4e79('0x31')]);return;}return db[_0x4e79('0x56')][_0x4e79('0x57')]({'attributes':[_0x4e79('0x58')],'where':{'id':_0x5d8f69[_0x4e79('0x32')]},'raw':!![]})[_0x4e79('0x2a')](function(_0x5839fb){if(!_0x5839fb)throw new db[(_0x4e79('0x33'))][(_0x4e79('0x34'))](_0x4e79('0x59'));var _0x5f4156=Mustache[_0x4e79('0x5a')](_0x5839fb[_0x4e79('0x58')],_0x5d8f69['view']);_0x207538(_0x5f4156);})[_0x4e79('0x55')](function(_0x4fc80c){_0x18ea7d(_0x4fc80c);});});}function getRecipients(_0x5918d3){return new BPromise(function(_0x410c50,_0xd9700f){var _0x59b1c9=[];var _0x31b903=[];_0x5918d3['forEach'](function(_0x1a60c7){var _0x34972e=_[_0x4e79('0x5b')](_0x1a60c7[_0x4e79('0x43')][_0x4e79('0x44')]());if(_0x34972e===_0x4e79('0x5c')){_0x59b1c9=_[_0x4e79('0x5d')](_0x59b1c9,_0x1a60c7['ids']);}else{if(_[_0x4e79('0x42')](_0x34972e,_0x4e79('0x5e')))_0x34972e=_0x34972e[_0x4e79('0x5f')](_0x4e79('0x5e'),_0x4e79('0x60'));_0x1a60c7[_0x4e79('0x61')]['forEach'](function(_0x20034c){_0x31b903['push'](getAgents(_0x34972e,_0x20034c));});}});return BPromise[_0x4e79('0x62')](_0x31b903)[_0x4e79('0x2a')](function(_0x424b7e){_0x59b1c9=_[_0x4e79('0x5d')](_0x59b1c9,_['flatten'](_0x424b7e));_0x410c50(_0x59b1c9);})[_0x4e79('0x55')](function(_0x30f700){_0xd9700f(_0x30f700);});});}function getAgents(_0xbd659d,_0x14a132){return new BPromise(function(_0x334ed1,_0xed7d40){return db[_0xbd659d][_0x4e79('0x57')]({'where':{'id':_0x14a132}})[_0x4e79('0x2a')](function(_0x2fd9ee){return _0x2fd9ee[_0x4e79('0x63')]({'attributes':['id'],'raw':!![]})['then'](function(_0x43398e){var _0x38e0e7=_[_0x4e79('0x64')](_0x43398e,'id');_0x334ed1(_0x38e0e7);});})[_0x4e79('0x55')](function(_0x657c84){_0xed7d40(_0x657c84);});});}
\ No newline at end of file
index d7bc767..7397221 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x46dc=['hook','exports','events','../../mysqldb','UserNotification','save','update','remove','emit','hasOwnProperty'];(function(_0x4976c7,_0x4e3fb8){var _0x3bd68b=function(_0xd2b6da){while(--_0xd2b6da){_0x4976c7['push'](_0x4976c7['shift']());}};_0x3bd68b(++_0x4e3fb8);}(_0x46dc,0x17e));var _0xc46d=function(_0x3cfcee,_0x1defe8){_0x3cfcee=_0x3cfcee-0x0;var _0x156879=_0x46dc[_0x3cfcee];return _0x156879;};'use strict';var EventEmitter=require(_0xc46d('0x0'));var UserNotification=require(_0xc46d('0x1'))['db'][_0xc46d('0x2')];var UserNotificationEvents=new EventEmitter();UserNotificationEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xc46d('0x3'),'afterUpdate':_0xc46d('0x4'),'afterDestroy':_0xc46d('0x5')};function emitEvent(_0x15f1fa){return function(_0x398484,_0x35eed7,_0x4a2d9b){UserNotificationEvents[_0xc46d('0x6')](_0x15f1fa+':'+_0x398484['id'],_0x398484);UserNotificationEvents['emit'](_0x15f1fa,_0x398484);_0x4a2d9b(null);};}for(var e in events){if(events[_0xc46d('0x7')](e)){var event=events[e];UserNotification[_0xc46d('0x8')](e,emitEvent(event));}}module[_0xc46d('0x9')]=UserNotificationEvents;
\ No newline at end of file
+var _0xbd4b=['hook','UserNotification','setMaxListeners','save','remove','emit','hasOwnProperty'];(function(_0x4a095e,_0x381cd5){var _0x10ef73=function(_0x1f6964){while(--_0x1f6964){_0x4a095e['push'](_0x4a095e['shift']());}};_0x10ef73(++_0x381cd5);}(_0xbd4b,0x174));var _0xbbd4=function(_0x28b3f2,_0x4e616c){_0x28b3f2=_0x28b3f2-0x0;var _0x16879b=_0xbd4b[_0x28b3f2];return _0x16879b;};'use strict';var EventEmitter=require('events');var UserNotification=require('../../mysqldb')['db'][_0xbbd4('0x0')];var UserNotificationEvents=new EventEmitter();UserNotificationEvents[_0xbbd4('0x1')](0x0);var events={'afterCreate':_0xbbd4('0x2'),'afterUpdate':'update','afterDestroy':_0xbbd4('0x3')};function emitEvent(_0x491311){return function(_0x2cb66f,_0x1d473e,_0x3d97ee){UserNotificationEvents[_0xbbd4('0x4')](_0x491311+':'+_0x2cb66f['id'],_0x2cb66f);UserNotificationEvents[_0xbbd4('0x4')](_0x491311,_0x2cb66f);_0x3d97ee(null);};}for(var e in events){if(events[_0xbbd4('0x5')](e)){var event=events[e];UserNotification[_0xbbd4('0x6')](e,emitEvent(event));}}module['exports']=UserNotificationEvents;
\ No newline at end of file
index 4c846bb..451ce62 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xde91=['../../config/logger','bluebird','request-promise','path','../../config/environment','exports','UserNotification','utf8mb4','utf8mb4_unicode_ci','util'];(function(_0x462999,_0x24d200){var _0x4b1366=function(_0x1fa353){while(--_0x1fa353){_0x462999['push'](_0x462999['shift']());}};_0x4b1366(++_0x24d200);}(_0xde91,0x171));var _0x1de9=function(_0x3a19d4,_0x3f19a4){_0x3a19d4=_0x3a19d4-0x0;var _0x5b858b=_0xde91[_0x3a19d4];return _0x5b858b;};'use strict';var _=require('lodash');var util=require(_0x1de9('0x0'));var logger=require(_0x1de9('0x1'))('api');var moment=require('moment');var BPromise=require(_0x1de9('0x2'));var rp=require(_0x1de9('0x3'));var fs=require('fs');var path=require(_0x1de9('0x4'));var rimraf=require('rimraf');var config=require(_0x1de9('0x5'));var attributes=require('./userNotification.attributes');module[_0x1de9('0x6')]=function(_0x1bef21,_0x1bff69){return _0x1bef21['define'](_0x1de9('0x7'),attributes,{'tableName':'userNotifications','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x1de9('0x8'),'collate':_0x1de9('0x9')});};
\ No newline at end of file
+var _0x3760=['./userNotification.attributes','userNotifications','utf8mb4','lodash','../../config/logger','moment','bluebird','request-promise','rimraf','../../config/environment'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x3760,0x157));var _0x0376=function(_0x18d5d7,_0x19074b){_0x18d5d7=_0x18d5d7-0x0;var _0x30a9ea=_0x3760[_0x18d5d7];return _0x30a9ea;};'use strict';var _=require(_0x0376('0x0'));var util=require('util');var logger=require(_0x0376('0x1'))('api');var moment=require(_0x0376('0x2'));var BPromise=require(_0x0376('0x3'));var rp=require(_0x0376('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x0376('0x5'));var config=require(_0x0376('0x6'));var attributes=require(_0x0376('0x7'));module['exports']=function(_0x397306,_0x190425){return _0x397306['define']('UserNotification',attributes,{'tableName':_0x0376('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x0376('0x9'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
index 021f1d2..adbbef5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6813=['then','UserNotification,\x20%s,\x20%s','request\x20sent','debug','UserNotification,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','register','request'];(function(_0x28611e,_0x586726){var _0x530f69=function(_0x407906){while(--_0x407906){_0x28611e['push'](_0x28611e['shift']());}};_0x530f69(++_0x586726);}(_0x6813,0x14a));var _0x3681=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x6813[_0x501510];return _0x1e6ee5;};'use strict';var _=require(_0x3681('0x0'));var util=require(_0x3681('0x1'));var moment=require('moment');var BPromise=require(_0x3681('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x3681('0x3'));var db=require(_0x3681('0x4'))['db'];var utils=require(_0x3681('0x5'));var logger=require(_0x3681('0x6'))(_0x3681('0x7'));var config=require(_0x3681('0x8'));var jayson=require(_0x3681('0x9'));var client=jayson[_0x3681('0xa')][_0x3681('0xb')]({'port':0x232a});config[_0x3681('0xc')]=_[_0x3681('0xd')](config[_0x3681('0xc')],{'host':_0x3681('0xe'),'port':0x18eb});var socket=require(_0x3681('0xf'))(new Redis(config[_0x3681('0xc')]));require('./userNotification.socket')[_0x3681('0x10')](socket);function respondWithRpcPromise(_0x28893e,_0x570183,_0x4749e3){return new BPromise(function(_0x4a4c93,_0x25183b){return client[_0x3681('0x11')](_0x28893e,_0x4749e3)[_0x3681('0x12')](function(_0x1c9583){logger['info'](_0x3681('0x13'),_0x570183,_0x3681('0x14'));logger[_0x3681('0x15')](_0x3681('0x16'),_0x570183,_0x3681('0x14'),JSON[_0x3681('0x17')](_0x1c9583));if(_0x1c9583[_0x3681('0x18')]){if(_0x1c9583[_0x3681('0x18')][_0x3681('0x19')]===0x1f4){logger[_0x3681('0x18')]('UserNotification,\x20%s,\x20%s',_0x570183,_0x1c9583[_0x3681('0x18')][_0x3681('0x1a')]);return _0x25183b(_0x1c9583['error'][_0x3681('0x1a')]);}logger[_0x3681('0x18')](_0x3681('0x13'),_0x570183,_0x1c9583['error']['message']);return _0x4a4c93(_0x1c9583['error']['message']);}else{logger['info']('UserNotification,\x20%s,\x20%s',_0x570183,_0x3681('0x14'));_0x4a4c93(_0x1c9583[_0x3681('0x1b')][_0x3681('0x1a')]);}})[_0x3681('0x1c')](function(_0x314a0b){logger[_0x3681('0x18')](_0x3681('0x13'),_0x570183,_0x314a0b);_0x25183b(_0x314a0b);});});}
\ No newline at end of file
+var _0x11b9=['result','catch','lodash','bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','defaults','redis','localhost','socket.io-emitter','./userNotification.socket','register','then','UserNotification,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info'];(function(_0x30a193,_0x158ad6){var _0x5d6ccd=function(_0xaf5a46){while(--_0xaf5a46){_0x30a193['push'](_0x30a193['shift']());}};_0x5d6ccd(++_0x158ad6);}(_0x11b9,0x9e));var _0x911b=function(_0x12b345,_0x60adea){_0x12b345=_0x12b345-0x0;var _0x378c6d=_0x11b9[_0x12b345];return _0x378c6d;};'use strict';var _=require(_0x911b('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x911b('0x1'));var rs=require(_0x911b('0x2'));var fs=require('fs');var Redis=require(_0x911b('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x911b('0x4'))(_0x911b('0x5'));var config=require(_0x911b('0x6'));var jayson=require(_0x911b('0x7'));var client=jayson[_0x911b('0x8')]['http']({'port':0x232a});config['redis']=_[_0x911b('0x9')](config[_0x911b('0xa')],{'host':_0x911b('0xb'),'port':0x18eb});var socket=require(_0x911b('0xc'))(new Redis(config[_0x911b('0xa')]));require(_0x911b('0xd'))[_0x911b('0xe')](socket);function respondWithRpcPromise(_0x1f5413,_0x26a4cc,_0x1e7ead){return new BPromise(function(_0x43a155,_0x2673e8){return client['request'](_0x1f5413,_0x1e7ead)[_0x911b('0xf')](function(_0x9793b5){logger['info'](_0x911b('0x10'),_0x26a4cc,_0x911b('0x11'));logger[_0x911b('0x12')]('UserNotification,\x20%s,\x20%s,\x20%s',_0x26a4cc,_0x911b('0x11'),JSON[_0x911b('0x13')](_0x9793b5));if(_0x9793b5[_0x911b('0x14')]){if(_0x9793b5['error'][_0x911b('0x15')]===0x1f4){logger['error'](_0x911b('0x10'),_0x26a4cc,_0x9793b5[_0x911b('0x14')][_0x911b('0x16')]);return _0x2673e8(_0x9793b5[_0x911b('0x14')][_0x911b('0x16')]);}logger[_0x911b('0x14')](_0x911b('0x10'),_0x26a4cc,_0x9793b5[_0x911b('0x14')]['message']);return _0x43a155(_0x9793b5[_0x911b('0x14')][_0x911b('0x16')]);}else{logger[_0x911b('0x17')](_0x911b('0x10'),_0x26a4cc,'request\x20sent');_0x43a155(_0x9793b5[_0x911b('0x18')][_0x911b('0x16')]);}})[_0x911b('0x19')](function(_0x47d844){logger[_0x911b('0x14')](_0x911b('0x10'),_0x26a4cc,_0x47d844);_0x2673e8(_0x47d844);});});}
\ No newline at end of file
index 4db8032..5264673 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x25c1=['register','length','userNotification:','./userNotification.events','remove','update','emit'];(function(_0x487d93,_0x1443b2){var _0xa6ba2a=function(_0x6dfbb9){while(--_0x6dfbb9){_0x487d93['push'](_0x487d93['shift']());}};_0xa6ba2a(++_0x1443b2);}(_0x25c1,0x88));var _0x125c=function(_0x11ce2d,_0x512d87){_0x11ce2d=_0x11ce2d-0x0;var _0x1a1019=_0x25c1[_0x11ce2d];return _0x1a1019;};'use strict';var UserNotificationEvents=require(_0x125c('0x0'));var events=['save',_0x125c('0x1'),_0x125c('0x2')];function createListener(_0x447150,_0x514a21){return function(_0x3cdc44){_0x514a21[_0x125c('0x3')](_0x447150,_0x3cdc44);};}function removeListener(_0x384734,_0x2ec0c3){return function(){UserNotificationEvents['removeListener'](_0x384734,_0x2ec0c3);};}exports[_0x125c('0x4')]=function(_0xb59ad7){for(var _0x387fce=0x0,_0x1b1249=events[_0x125c('0x5')];_0x387fce<_0x1b1249;_0x387fce++){var _0xcf8d82=events[_0x387fce];var _0x42b570=createListener(_0x125c('0x6')+_0xcf8d82,_0xb59ad7);UserNotificationEvents['on'](_0xcf8d82,_0x42b570);}};
\ No newline at end of file
+var _0x2091=['remove','emit','removeListener','register','userNotification:','save'];(function(_0x116ff4,_0x14b84d){var _0x273964=function(_0x171e0c){while(--_0x171e0c){_0x116ff4['push'](_0x116ff4['shift']());}};_0x273964(++_0x14b84d);}(_0x2091,0xcb));var _0x1209=function(_0x387e84,_0x5fffe7){_0x387e84=_0x387e84-0x0;var _0x1add03=_0x2091[_0x387e84];return _0x1add03;};'use strict';var UserNotificationEvents=require('./userNotification.events');var events=[_0x1209('0x0'),_0x1209('0x1'),'update'];function createListener(_0x425748,_0x13d0e1){return function(_0xd33fbe){_0x13d0e1[_0x1209('0x2')](_0x425748,_0xd33fbe);};}function removeListener(_0x44bade,_0x46567d){return function(){UserNotificationEvents[_0x1209('0x3')](_0x44bade,_0x46567d);};}exports[_0x1209('0x4')]=function(_0x4e561c){for(var _0x49d2f1=0x0,_0x4341a1=events['length'];_0x49d2f1<_0x4341a1;_0x49d2f1++){var _0x3c7d22=events[_0x49d2f1];var _0x23d247=createListener(_0x1209('0x5')+_0x3c7d22,_0x4e561c);UserNotificationEvents['on'](_0x3c7d22,_0x23d247);}};
\ No newline at end of file
index e776619..f11104d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['../../components/interaction/service','../../config/environment','exports','multer','util','path','Router','../../components/auth/service'];(function(_0x49f30d,_0x50300a){var _0x2c75fa=function(_0x3a880a){while(--_0x3a880a){_0x49f30d['push'](_0x49f30d['shift']());}};_0x2c75fa(++_0x50300a);}(_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'));module[_0x0a9e('0x7')]=router;
\ No newline at end of file
+var _0xa9e0=['../../components/interaction/service','../../config/environment','exports','multer','util','path','Router','../../components/auth/service'];(function(_0x371841,_0x30d8db){var _0xc41d83=function(_0x2ca64d){while(--_0x2ca64d){_0x371841['push'](_0x371841['shift']());}};_0xc41d83(++_0x30d8db);}(_0xa9e0,0x123));var _0x0a9e=function(_0x433a86,_0x175b5c){_0x433a86=_0x433a86-0x0;var _0x23000c=_0xa9e0[_0x433a86];return _0x23000c;};'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 6dfb1de..6c7ed11 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8d37=['sequelize','INTEGER'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0x8d37,0xbc));var _0x78d3=function(_0x3911ff,_0x5b57be){_0x3911ff=_0x3911ff-0x0;var _0x5aacc6=_0x8d37[_0x3911ff];return _0x5aacc6;};'use strict';var Sequelize=require(_0x78d3('0x0'));module['exports']={'penalty':{'type':Sequelize[_0x78d3('0x1')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x7768=['INTEGER','sequelize','exports'];(function(_0x2c38f2,_0x432576){var _0x3db426=function(_0x85279d){while(--_0x85279d){_0x2c38f2['push'](_0x2c38f2['shift']());}};_0x3db426(++_0x432576);}(_0x7768,0x1ea));var _0x8776=function(_0x4b5570,_0x4bc370){_0x4b5570=_0x4b5570-0x0;var _0x677eee=_0x7768[_0x4b5570];return _0x677eee;};'use strict';var Sequelize=require(_0x8776('0x0'));module[_0x8776('0x1')]={'penalty':{'type':Sequelize[_0x8776('0x2')],'defaultValue':0x0}};
\ No newline at end of file
index bd88d05..453a30d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0a97=['exports','define','UserOpenchannelQueue','user_has_openchannel_queues','lodash','util','../../config/logger','moment','bluebird','path','rimraf'];(function(_0x50d640,_0x1e1d43){var _0x59f6fe=function(_0x449976){while(--_0x449976){_0x50d640['push'](_0x50d640['shift']());}};_0x59f6fe(++_0x1e1d43);}(_0x0a97,0x164));var _0x70a9=function(_0x27af45,_0x1b57aa){_0x27af45=_0x27af45-0x0;var _0x18df21=_0x0a97[_0x27af45];return _0x18df21;};'use strict';var _=require(_0x70a9('0x0'));var util=require(_0x70a9('0x1'));var logger=require(_0x70a9('0x2'))('api');var moment=require(_0x70a9('0x3'));var BPromise=require(_0x70a9('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x70a9('0x5'));var rimraf=require(_0x70a9('0x6'));var config=require('../../config/environment');var attributes=require('./userOpenchannelQueue.attributes');module[_0x70a9('0x7')]=function(_0x56eeab,_0x522679){return _0x56eeab[_0x70a9('0x8')](_0x70a9('0x9'),attributes,{'tableName':_0x70a9('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x5e50=['user_has_openchannel_queues','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./userOpenchannelQueue.attributes','exports','define','UserOpenchannelQueue'];(function(_0x1d3fdc,_0x2b5c54){var _0x128bb0=function(_0x3b7184){while(--_0x3b7184){_0x1d3fdc['push'](_0x1d3fdc['shift']());}};_0x128bb0(++_0x2b5c54);}(_0x5e50,0x97));var _0x05e5=function(_0x336eae,_0x576f2b){_0x336eae=_0x336eae-0x0;var _0x1d6e0a=_0x5e50[_0x336eae];return _0x1d6e0a;};'use strict';var _=require(_0x05e5('0x0'));var util=require(_0x05e5('0x1'));var logger=require(_0x05e5('0x2'))(_0x05e5('0x3'));var moment=require(_0x05e5('0x4'));var BPromise=require(_0x05e5('0x5'));var rp=require(_0x05e5('0x6'));var fs=require('fs');var path=require(_0x05e5('0x7'));var rimraf=require(_0x05e5('0x8'));var config=require(_0x05e5('0x9'));var attributes=require(_0x05e5('0xa'));module[_0x05e5('0xb')]=function(_0x482a4f,_0x50b31a){return _0x482a4f[_0x05e5('0xc')](_0x05e5('0xd'),attributes,{'tableName':_0x05e5('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 23d0c45..b90c844 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfcb7=['lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','UserOpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','UserOpenchannelQueue,\x20%s,\x20%s','message'];(function(_0x5d8940,_0x52c352){var _0x2830b0=function(_0x580916){while(--_0x580916){_0x5d8940['push'](_0x5d8940['shift']());}};_0x2830b0(++_0x52c352);}(_0xfcb7,0x8c));var _0x7fcb=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xfcb7[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x7fcb('0x0'));var util=require(_0x7fcb('0x1'));var moment=require(_0x7fcb('0x2'));var BPromise=require('bluebird');var rs=require(_0x7fcb('0x3'));var fs=require('fs');var Redis=require(_0x7fcb('0x4'));var db=require(_0x7fcb('0x5'))['db'];var utils=require(_0x7fcb('0x6'));var logger=require(_0x7fcb('0x7'))(_0x7fcb('0x8'));var config=require(_0x7fcb('0x9'));var jayson=require(_0x7fcb('0xa'));var client=jayson['client'][_0x7fcb('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x216ae8,_0x46732c,_0x374faf){return new BPromise(function(_0x21cd92,_0x511fe8){return client[_0x7fcb('0xc')](_0x216ae8,_0x374faf)[_0x7fcb('0xd')](function(_0x4922fe){logger[_0x7fcb('0xe')]('UserOpenchannelQueue,\x20%s,\x20%s',_0x46732c,'request\x20sent');logger['debug'](_0x7fcb('0xf'),_0x46732c,'request\x20sent',JSON[_0x7fcb('0x10')](_0x4922fe));if(_0x4922fe[_0x7fcb('0x11')]){if(_0x4922fe['error']['code']===0x1f4){logger[_0x7fcb('0x11')](_0x7fcb('0x12'),_0x46732c,_0x4922fe[_0x7fcb('0x11')][_0x7fcb('0x13')]);return _0x511fe8(_0x4922fe[_0x7fcb('0x11')][_0x7fcb('0x13')]);}logger['error'](_0x7fcb('0x12'),_0x46732c,_0x4922fe[_0x7fcb('0x11')]['message']);return _0x21cd92(_0x4922fe[_0x7fcb('0x11')][_0x7fcb('0x13')]);}else{logger[_0x7fcb('0xe')](_0x7fcb('0x12'),_0x46732c,'request\x20sent');_0x21cd92(_0x4922fe['result'][_0x7fcb('0x13')]);}})['catch'](function(_0xa79849){logger[_0x7fcb('0x11')](_0x7fcb('0x12'),_0x46732c,_0xa79849);_0x511fe8(_0xa79849);});});}
\ No newline at end of file
+var _0x0644=['then','info','request\x20sent','debug','UserOpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','UserOpenchannelQueue,\x20%s,\x20%s','result','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x3ffda3,_0x59fb20){var _0x4e3697=function(_0x32ddaa){while(--_0x32ddaa){_0x3ffda3['push'](_0x3ffda3['shift']());}};_0x4e3697(++_0x59fb20);}(_0x0644,0x1ee));var _0x4064=function(_0x549111,_0x31c984){_0x549111=_0x549111-0x0;var _0x586adc=_0x0644[_0x549111];return _0x586adc;};'use strict';var _=require(_0x4064('0x0'));var util=require(_0x4064('0x1'));var moment=require(_0x4064('0x2'));var BPromise=require(_0x4064('0x3'));var rs=require(_0x4064('0x4'));var fs=require('fs');var Redis=require(_0x4064('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x4064('0x6'));var logger=require('../../config/logger')(_0x4064('0x7'));var config=require(_0x4064('0x8'));var jayson=require(_0x4064('0x9'));var client=jayson[_0x4064('0xa')][_0x4064('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x481cb1,_0x5cb01b,_0x5f13dd){return new BPromise(function(_0x37f739,_0x5b4265){return client['request'](_0x481cb1,_0x5f13dd)[_0x4064('0xc')](function(_0x1e13ca){logger[_0x4064('0xd')]('UserOpenchannelQueue,\x20%s,\x20%s',_0x5cb01b,_0x4064('0xe'));logger[_0x4064('0xf')](_0x4064('0x10'),_0x5cb01b,'request\x20sent',JSON[_0x4064('0x11')](_0x1e13ca));if(_0x1e13ca[_0x4064('0x12')]){if(_0x1e13ca[_0x4064('0x12')]['code']===0x1f4){logger[_0x4064('0x12')]('UserOpenchannelQueue,\x20%s,\x20%s',_0x5cb01b,_0x1e13ca[_0x4064('0x12')][_0x4064('0x13')]);return _0x5b4265(_0x1e13ca['error'][_0x4064('0x13')]);}logger['error'](_0x4064('0x14'),_0x5cb01b,_0x1e13ca[_0x4064('0x12')][_0x4064('0x13')]);return _0x37f739(_0x1e13ca['error'][_0x4064('0x13')]);}else{logger['info'](_0x4064('0x14'),_0x5cb01b,_0x4064('0xe'));_0x37f739(_0x1e13ca[_0x4064('0x15')][_0x4064('0x13')]);}})['catch'](function(_0x387e26){logger[_0x4064('0x12')](_0x4064('0x14'),_0x5cb01b,_0x387e26);_0x5b4265(_0x387e26);});});}
\ No newline at end of file
index b50f44f..e917e6a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc4e8=['post','create','/:id/clone','clone','addSections','addResources','update','delete','destroy','/:id/resources','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../config/environment','./userProfile.controller','get','isAuthenticated','index','describe','/:id','show','getResources'];(function(_0x2a5099,_0x329e92){var _0x2802f1=function(_0x53f99b){while(--_0x53f99b){_0x2a5099['push'](_0x2a5099['shift']());}};_0x2802f1(++_0x329e92);}(_0xc4e8,0xe3));var _0x8c4e=function(_0x23e702,_0x3e915c){_0x23e702=_0x23e702-0x0;var _0x1f4ed5=_0xc4e8[_0x23e702];return _0x1f4ed5;};'use strict';var multer=require(_0x8c4e('0x0'));var util=require(_0x8c4e('0x1'));var path=require(_0x8c4e('0x2'));var timeout=require(_0x8c4e('0x3'));var express=require('express');var router=express[_0x8c4e('0x4')]();var fs_extra=require(_0x8c4e('0x5'));var auth=require(_0x8c4e('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x8c4e('0x7'));var controller=require(_0x8c4e('0x8'));router[_0x8c4e('0x9')]('/',auth[_0x8c4e('0xa')](),controller[_0x8c4e('0xb')]);router[_0x8c4e('0x9')]('/describe',auth[_0x8c4e('0xa')](),controller[_0x8c4e('0xc')]);router[_0x8c4e('0x9')](_0x8c4e('0xd'),auth[_0x8c4e('0xa')](),controller[_0x8c4e('0xe')]);router['get']('/:id/sections',auth[_0x8c4e('0xa')](),controller['getSections']);router[_0x8c4e('0x9')]('/:id/resources',auth[_0x8c4e('0xa')](),controller[_0x8c4e('0xf')]);router[_0x8c4e('0x10')]('/',auth['isAuthenticated'](),controller[_0x8c4e('0x11')]);router[_0x8c4e('0x10')](_0x8c4e('0x12'),auth[_0x8c4e('0xa')](),controller[_0x8c4e('0x13')]);router[_0x8c4e('0x10')]('/:id/sections',auth[_0x8c4e('0xa')](),controller[_0x8c4e('0x14')]);router['post']('/:id/resources',auth[_0x8c4e('0xa')](),controller[_0x8c4e('0x15')]);router['put']('/:id',auth[_0x8c4e('0xa')](),controller[_0x8c4e('0x16')]);router[_0x8c4e('0x17')]('/:id',auth[_0x8c4e('0xa')](),controller[_0x8c4e('0x18')]);router[_0x8c4e('0x17')]('/:id/sections',auth['isAuthenticated'](),controller['removeSections']);router[_0x8c4e('0x17')](_0x8c4e('0x19'),auth['isAuthenticated'](),controller['removeResources']);module[_0x8c4e('0x1a')]=router;
\ No newline at end of file
+var _0xd04a=['get','isAuthenticated','index','/describe','show','/:id/sections','getSections','/:id/resources','/:id/clone','clone','post','addSections','addResources','/:id','destroy','delete','removeSections','removeResources','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./userProfile.controller'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0xd04a,0x94));var _0xad04=function(_0x5da56b,_0x262f71){_0x5da56b=_0x5da56b-0x0;var _0x2c1e83=_0xd04a[_0x5da56b];return _0x2c1e83;};'use strict';var multer=require(_0xad04('0x0'));var util=require(_0xad04('0x1'));var path=require('path');var timeout=require(_0xad04('0x2'));var express=require(_0xad04('0x3'));var router=express[_0xad04('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xad04('0x5'));var interaction=require(_0xad04('0x6'));var config=require('../../config/environment');var controller=require(_0xad04('0x7'));router[_0xad04('0x8')]('/',auth[_0xad04('0x9')](),controller[_0xad04('0xa')]);router['get'](_0xad04('0xb'),auth[_0xad04('0x9')](),controller['describe']);router['get']('/:id',auth[_0xad04('0x9')](),controller[_0xad04('0xc')]);router[_0xad04('0x8')](_0xad04('0xd'),auth['isAuthenticated'](),controller[_0xad04('0xe')]);router[_0xad04('0x8')](_0xad04('0xf'),auth[_0xad04('0x9')](),controller['getResources']);router['post']('/',auth[_0xad04('0x9')](),controller['create']);router['post'](_0xad04('0x10'),auth['isAuthenticated'](),controller[_0xad04('0x11')]);router[_0xad04('0x12')](_0xad04('0xd'),auth[_0xad04('0x9')](),controller[_0xad04('0x13')]);router[_0xad04('0x12')]('/:id/resources',auth[_0xad04('0x9')](),controller[_0xad04('0x14')]);router['put'](_0xad04('0x15'),auth[_0xad04('0x9')](),controller['update']);router['delete'](_0xad04('0x15'),auth[_0xad04('0x9')](),controller[_0xad04('0x16')]);router[_0xad04('0x17')]('/:id/sections',auth[_0xad04('0x9')](),controller[_0xad04('0x18')]);router[_0xad04('0x17')](_0xad04('0xf'),auth[_0xad04('0x9')](),controller[_0xad04('0x19')]);module['exports']=router;
\ No newline at end of file
index c59253e..4c3c9ed 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4797=['BOOLEAN','sequelize','exports','STRING','name','setDataValue','crudPermissions','split'];(function(_0x2b2c53,_0x4bcf9b){var _0x311ec2=function(_0x4a8e72){while(--_0x4a8e72){_0x2b2c53['push'](_0x2b2c53['shift']());}};_0x311ec2(++_0x4bcf9b);}(_0x4797,0x121));var _0x7479=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x4797[_0x321bb2];return _0x9c12ed;};'use strict';var Sequelize=require(_0x7479('0x0'));module[_0x7479('0x1')]={'name':{'type':Sequelize[_0x7479('0x2')],'allowNull':![],'unique':_0x7479('0x3')},'crudPermissions':{'type':Sequelize[_0x7479('0x2')],'set':function(_0x2d87d0){this[_0x7479('0x4')](_0x7479('0x5'),_0x2d87d0?_0x2d87d0['join'](''):[]);},'get':function(){return this['getDataValue'](_0x7479('0x5'))?this['getDataValue'](_0x7479('0x5'))[_0x7479('0x6')](''):[];},'allowNull':![],'defaultValue':'r'},'description':{'type':Sequelize[_0x7479('0x2')],'allowNull':!![]},'privacyEnabled':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'downloadAttachments':{'type':Sequelize[_0x7479('0x7')],'defaultValue':!![]},'downloadCallySquareRecordings':{'type':Sequelize[_0x7479('0x7')],'defaultValue':!![]},'downloadContactManagerLists':{'type':Sequelize[_0x7479('0x7')],'defaultValue':!![]},'downloadJscriptySessions':{'type':Sequelize[_0x7479('0x7')],'defaultValue':!![]},'downloadOmnichannelInteractions':{'type':Sequelize[_0x7479('0x7')],'defaultValue':!![]},'downloadScreenRecordings':{'type':Sequelize[_0x7479('0x7')],'defaultValue':!![]},'downloadVoiceRecordings':{'type':Sequelize[_0x7479('0x7')],'defaultValue':!![]}};
\ No newline at end of file
+var _0x1c7b=['exports','STRING','setDataValue','join','getDataValue','split','BOOLEAN','sequelize'];(function(_0x556ff5,_0x22f331){var _0x2ba588=function(_0x12dfdc){while(--_0x12dfdc){_0x556ff5['push'](_0x556ff5['shift']());}};_0x2ba588(++_0x22f331);}(_0x1c7b,0x87));var _0xb1c7=function(_0x56cb4c,_0x3721a0){_0x56cb4c=_0x56cb4c-0x0;var _0x416449=_0x1c7b[_0x56cb4c];return _0x416449;};'use strict';var Sequelize=require(_0xb1c7('0x0'));module[_0xb1c7('0x1')]={'name':{'type':Sequelize[_0xb1c7('0x2')],'allowNull':![],'unique':'name'},'crudPermissions':{'type':Sequelize[_0xb1c7('0x2')],'set':function(_0x254e13){this[_0xb1c7('0x3')]('crudPermissions',_0x254e13?_0x254e13[_0xb1c7('0x4')](''):[]);},'get':function(){return this[_0xb1c7('0x5')]('crudPermissions')?this['getDataValue']('crudPermissions')[_0xb1c7('0x6')](''):[];},'allowNull':![],'defaultValue':'r'},'description':{'type':Sequelize[_0xb1c7('0x2')],'allowNull':!![]},'privacyEnabled':{'type':Sequelize[_0xb1c7('0x7')],'defaultValue':![]},'downloadAttachments':{'type':Sequelize[_0xb1c7('0x7')],'defaultValue':!![]},'downloadCallySquareRecordings':{'type':Sequelize[_0xb1c7('0x7')],'defaultValue':!![]},'downloadContactManagerLists':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'downloadJscriptySessions':{'type':Sequelize[_0xb1c7('0x7')],'defaultValue':!![]},'downloadOmnichannelInteractions':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'downloadScreenRecordings':{'type':Sequelize[_0xb1c7('0x7')],'defaultValue':!![]},'downloadVoiceRecordings':{'type':Sequelize[_0xb1c7('0x7')],'defaultValue':!![]}};
\ No newline at end of file
index 4facd13..d4d8ab6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xed38=['sectionId','Resources','describe','addSections','userProfileId','push','ids','getSections','includes','isEmpty','subsections','concat','enabled','findOne','Dashboard','forEach','Plugin','resourceId','addResources','bulkCreate','removeResources','section','Missing\x20section\x20parameter','No\x20User\x20Profile\x20found\x20for\x20id\x20','getResources','eml-format','zip-dir','request-promise','bluebird','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','../../config/license/util','defaults','redis','localhost','sendStatus','status','end','json','offset','undefined','limit','count','set','reject','save','update','destroy','error','name','send','index','map','UserProfile','fieldName','type','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','filters','pick','filter','merge','VIRTUAL','options','then','includeAll','include','findAll','rows','params','find','catch','create','body','clone','rawAttributes','omit','createdAt','updatedAt','crudPermissions','transaction','get','UserProfileSection','each','autoAssociation','UserProfileResource'];(function(_0x3f3a12,_0x5dcc45){var _0xdf4127=function(_0x550455){while(--_0x550455){_0x3f3a12['push'](_0x3f3a12['shift']());}};_0xdf4127(++_0x5dcc45);}(_0xed38,0x89));var _0x8ed3=function(_0x3151dc,_0x28100c){_0x3151dc=_0x3151dc-0x0;var _0xeb7595=_0xed38[_0x3151dc];return _0xeb7595;};'use strict';var emlformat=require(_0x8ed3('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x8ed3('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x8ed3('0x2'));var moment=require('moment');var BPromise=require(_0x8ed3('0x3'));var Mustache=require('mustache');var util=require(_0x8ed3('0x4'));var path=require('path');var sox=require(_0x8ed3('0x5'));var csv=require(_0x8ed3('0x6'));var ejs=require(_0x8ed3('0x7'));var fs=require('fs');var fs_extra=require(_0x8ed3('0x8'));var _=require(_0x8ed3('0x9'));var squel=require(_0x8ed3('0xa'));var crypto=require(_0x8ed3('0xb'));var jsforce=require(_0x8ed3('0xc'));var deskjs=require(_0x8ed3('0xd'));var toCsv=require('to-csv');var querystring=require(_0x8ed3('0xe'));var Papa=require('papaparse');var Redis=require(_0x8ed3('0xf'));var authService=require(_0x8ed3('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x8ed3('0x11'));var hardwareService=require(_0x8ed3('0x12'));var logger=require(_0x8ed3('0x13'))(_0x8ed3('0x14'));var utils=require(_0x8ed3('0x15'));var config=require(_0x8ed3('0x16'));var licenseUtil=require(_0x8ed3('0x17'));var db=require('../../mysqldb')['db'];config['redis']=_[_0x8ed3('0x18')](config[_0x8ed3('0x19')],{'host':_0x8ed3('0x1a'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x8ed3('0x19')]));require('./userProfile.socket')['register'](socket);function respondWithStatusCode(_0x517b89,_0x1bd907){_0x1bd907=_0x1bd907||0xcc;return function(_0x3f64fe){if(_0x3f64fe){return _0x517b89[_0x8ed3('0x1b')](_0x1bd907);}return _0x517b89[_0x8ed3('0x1c')](_0x1bd907)[_0x8ed3('0x1d')]();};}function respondWithResult(_0x3d4328,_0x3ec992){_0x3ec992=_0x3ec992||0xc8;return function(_0x325bda){if(_0x325bda){return _0x3d4328['status'](_0x3ec992)[_0x8ed3('0x1e')](_0x325bda);}};}function respondWithFilteredResult(_0x35b07,_0x301269){return function(_0x46ef8e){if(_0x46ef8e){var _0x16f2f4=typeof _0x301269[_0x8ed3('0x1f')]===_0x8ed3('0x20')&&typeof _0x301269[_0x8ed3('0x21')]===_0x8ed3('0x20');var _0x364275=_0x46ef8e['count'];var _0x261631=_0x16f2f4?0x0:_0x301269[_0x8ed3('0x1f')];var _0x33aeb3=_0x16f2f4?_0x46ef8e[_0x8ed3('0x22')]:_0x301269[_0x8ed3('0x1f')]+_0x301269[_0x8ed3('0x21')];var _0x32d63b;if(_0x33aeb3>=_0x364275){_0x33aeb3=_0x364275;_0x32d63b=0xc8;}else{_0x32d63b=0xce;}_0x35b07[_0x8ed3('0x1c')](_0x32d63b);return _0x35b07[_0x8ed3('0x23')]('Content-Range',_0x261631+'-'+_0x33aeb3+'/'+_0x364275)[_0x8ed3('0x1e')](_0x46ef8e);}return null;};}function patchUpdates(_0x4bb6e5){return function(_0x6322c9){try{jsonpatch['apply'](_0x6322c9,_0x4bb6e5,!![]);}catch(_0x324828){return BPromise[_0x8ed3('0x24')](_0x324828);}return _0x6322c9[_0x8ed3('0x25')]();};}function saveUpdates(_0x50c4d2,_0x3d6f5d){return function(_0x32593f){if(_0x32593f){return _0x32593f[_0x8ed3('0x26')](_0x50c4d2)['then'](function(_0x263faa){return _0x263faa;});}return null;};}function removeEntity(_0x18c79e,_0x51a4d3){return function(_0x2c38cb){if(_0x2c38cb){return _0x2c38cb[_0x8ed3('0x27')]()['then'](function(){_0x18c79e[_0x8ed3('0x1c')](0xcc)[_0x8ed3('0x1d')]();});}};}function handleEntityNotFound(_0x196757,_0x4d3eea){return function(_0x1bf251){if(!_0x1bf251){_0x196757['sendStatus'](0x194);}return _0x1bf251;};}function handleError(_0x4b3a03,_0x3a93fe){_0x3a93fe=_0x3a93fe||0x1f4;return function(_0x5e146e){logger[_0x8ed3('0x28')](_0x5e146e['stack']);if(_0x5e146e[_0x8ed3('0x29')]){delete _0x5e146e[_0x8ed3('0x29')];}_0x4b3a03[_0x8ed3('0x1c')](_0x3a93fe)[_0x8ed3('0x2a')](_0x5e146e);};}exports[_0x8ed3('0x2b')]=function(_0x4eee14,_0x28c2){var _0x56f6cd={},_0x25c91b={},_0xcf50c2={'count':0x0,'rows':[]};var _0x1eb092=_[_0x8ed3('0x2c')](db[_0x8ed3('0x2d')]['rawAttributes'],function(_0x46b85f){return{'name':_0x46b85f[_0x8ed3('0x2e')],'type':_0x46b85f[_0x8ed3('0x2f')]['key']};});_0x25c91b[_0x8ed3('0x30')]=_[_0x8ed3('0x2c')](_0x1eb092,'name');_0x25c91b['query']=_[_0x8ed3('0x31')](_0x4eee14[_0x8ed3('0x32')]);_0x25c91b['filters']=_[_0x8ed3('0x33')](_0x25c91b[_0x8ed3('0x30')],_0x25c91b[_0x8ed3('0x32')]);_0x56f6cd[_0x8ed3('0x34')]=_[_0x8ed3('0x33')](_0x25c91b[_0x8ed3('0x30')],qs[_0x8ed3('0x35')](_0x4eee14['query'][_0x8ed3('0x35')]));_0x56f6cd[_0x8ed3('0x34')]=_0x56f6cd['attributes'][_0x8ed3('0x36')]?_0x56f6cd['attributes']:_0x25c91b[_0x8ed3('0x30')];if(!_0x4eee14[_0x8ed3('0x32')][_0x8ed3('0x37')](_0x8ed3('0x38'))){_0x56f6cd[_0x8ed3('0x21')]=qs[_0x8ed3('0x21')](_0x4eee14[_0x8ed3('0x32')]['limit']);_0x56f6cd[_0x8ed3('0x1f')]=qs[_0x8ed3('0x1f')](_0x4eee14[_0x8ed3('0x32')]['offset']);}_0x56f6cd['order']=qs['sort'](_0x4eee14[_0x8ed3('0x32')][_0x8ed3('0x39')]);_0x56f6cd[_0x8ed3('0x3a')]=qs[_0x8ed3('0x3b')](_[_0x8ed3('0x3c')](_0x4eee14[_0x8ed3('0x32')],_0x25c91b[_0x8ed3('0x3b')]),_0x1eb092);if(_0x4eee14['query'][_0x8ed3('0x3d')]){_0x56f6cd[_0x8ed3('0x3a')]=_[_0x8ed3('0x3e')](_0x56f6cd[_0x8ed3('0x3a')],{'$or':_[_0x8ed3('0x2c')](_0x1eb092,function(_0x349843){if(_0x349843[_0x8ed3('0x2f')]!==_0x8ed3('0x3f')){var _0x287a89={};_0x287a89[_0x349843['name']]={'$like':'%'+_0x4eee14[_0x8ed3('0x32')][_0x8ed3('0x3d')]+'%'};return _0x287a89;}})});}_0x56f6cd=_[_0x8ed3('0x3e')]({},_0x56f6cd,_0x4eee14[_0x8ed3('0x40')]);var _0x42cdd0={'where':_0x56f6cd[_0x8ed3('0x3a')]};return db[_0x8ed3('0x2d')][_0x8ed3('0x22')](_0x42cdd0)[_0x8ed3('0x41')](function(_0x415302){_0xcf50c2['count']=_0x415302;if(_0x4eee14[_0x8ed3('0x32')][_0x8ed3('0x42')]){_0x56f6cd[_0x8ed3('0x43')]=[{'all':!![]}];}return db[_0x8ed3('0x2d')][_0x8ed3('0x44')](_0x56f6cd);})[_0x8ed3('0x41')](function(_0x29aebc){_0xcf50c2[_0x8ed3('0x45')]=_0x29aebc;return _0xcf50c2;})[_0x8ed3('0x41')](respondWithFilteredResult(_0x28c2,_0x56f6cd))['catch'](handleError(_0x28c2,null));};exports['show']=function(_0x37c96f,_0x3f9d91){var _0x4958ed={'raw':![],'where':{'id':_0x37c96f[_0x8ed3('0x46')]['id']}},_0x21ea57={};_0x21ea57['model']=_[_0x8ed3('0x31')](db['UserProfile']['rawAttributes']);_0x21ea57[_0x8ed3('0x32')]=_[_0x8ed3('0x31')](_0x37c96f[_0x8ed3('0x32')]);_0x21ea57[_0x8ed3('0x3b')]=_['intersection'](_0x21ea57[_0x8ed3('0x30')],_0x21ea57['query']);_0x4958ed[_0x8ed3('0x34')]=_[_0x8ed3('0x33')](_0x21ea57[_0x8ed3('0x30')],qs[_0x8ed3('0x35')](_0x37c96f[_0x8ed3('0x32')][_0x8ed3('0x35')]));_0x4958ed[_0x8ed3('0x34')]=_0x4958ed[_0x8ed3('0x34')][_0x8ed3('0x36')]?_0x4958ed[_0x8ed3('0x34')]:_0x21ea57[_0x8ed3('0x30')];if(_0x37c96f[_0x8ed3('0x32')]['includeAll']){_0x4958ed[_0x8ed3('0x43')]=[{'all':!![]}];}_0x4958ed=_[_0x8ed3('0x3e')]({},_0x4958ed,_0x37c96f[_0x8ed3('0x40')]);return db['UserProfile'][_0x8ed3('0x47')](_0x4958ed)[_0x8ed3('0x41')](handleEntityNotFound(_0x3f9d91,null))['then'](respondWithResult(_0x3f9d91,null))[_0x8ed3('0x48')](handleError(_0x3f9d91,null));};exports[_0x8ed3('0x49')]=function(_0x32d571,_0x5554cc){return db[_0x8ed3('0x2d')]['create'](_0x32d571[_0x8ed3('0x4a')],{})[_0x8ed3('0x41')](respondWithResult(_0x5554cc,0xc9))[_0x8ed3('0x48')](handleError(_0x5554cc,null));};exports[_0x8ed3('0x4b')]=function(_0x1b154a,_0x240d41){var _0x465640={'where':{'id':_0x1b154a[_0x8ed3('0x46')]['id']}},_0x440102={};_0x440102[_0x8ed3('0x30')]=_[_0x8ed3('0x31')](db[_0x8ed3('0x2d')][_0x8ed3('0x4c')]);_0x465640[_0x8ed3('0x34')]=_[_0x8ed3('0x33')](_0x440102[_0x8ed3('0x30')],qs[_0x8ed3('0x35')](_0x1b154a[_0x8ed3('0x32')][_0x8ed3('0x35')]));_0x465640[_0x8ed3('0x34')]=_0x465640[_0x8ed3('0x34')][_0x8ed3('0x36')]?_0x465640[_0x8ed3('0x34')]:_0x440102[_0x8ed3('0x30')];if(_0x1b154a['query'][_0x8ed3('0x42')]){_0x465640[_0x8ed3('0x43')]=[{'all':!![]}];}_0x465640=_[_0x8ed3('0x3e')]({},_0x465640,_0x1b154a['options']);return db[_0x8ed3('0x2d')]['find'](_0x465640)[_0x8ed3('0x41')](handleEntityNotFound(_0x240d41,null))[_0x8ed3('0x41')](function(_0x3a89b4){if(_0x3a89b4){var _0x3d15a2=_0x3a89b4['get']({'plain':!![]});_0x3d15a2=qs[_0x8ed3('0x4d')](_0x3d15a2,['id',_0x8ed3('0x4e'),_0x8ed3('0x4f'),_0x8ed3('0x50')]);_0x1b154a['body']=_['omit'](_0x1b154a[_0x8ed3('0x4a')],['id',_0x8ed3('0x4e'),_0x8ed3('0x4f')]);return db['sequelize'][_0x8ed3('0x51')](function(_0x3d1aaf){return db[_0x8ed3('0x2d')][_0x8ed3('0x49')](_[_0x8ed3('0x3e')](_0x3d15a2,_0x1b154a['body']),{'include':_0x1b154a['query']['includeAll']?[{'all':!![]}]:undefined,'transaction':_0x3d1aaf})[_0x8ed3('0x41')](function(_0x89330f){var _0x57d6b4=_0x89330f[_0x8ed3('0x52')]({'plain':!![]});return db[_0x8ed3('0x53')][_0x8ed3('0x44')]({'where':{'userProfileId':_0x1b154a['params']['id']},'raw':!![]})['then'](function(_0x3c121a){if(_0x3c121a){return BPromise[_0x8ed3('0x54')](_0x3c121a,function(_0x410ca6){return new BPromise(function(_0x474b0b,_0x2f39bb){if(_0x410ca6[_0x8ed3('0x55')]===null||_0x410ca6[_0x8ed3('0x55')]===0x1)_0x474b0b(null);return db[_0x8ed3('0x56')][_0x8ed3('0x44')]({'where':{'sectionId':_0x410ca6['id']},'raw':!![]})[_0x8ed3('0x41')](function(_0x4524b1){var _0x40dedb=_[_0x8ed3('0x2c')](_0x4524b1,function(_0x3ddb1e){return qs['omit'](_0x3ddb1e,['id',_0x8ed3('0x4e'),_0x8ed3('0x4f'),_0x8ed3('0x57')]);});_0x474b0b(_0x40dedb);})[_0x8ed3('0x48')](function(_0x5f455a){_0x2f39bb(_0x5f455a);});})[_0x8ed3('0x41')](function(_0x288a08){var _0x5496a7=qs['omit'](_0x410ca6,['id',_0x8ed3('0x4e'),_0x8ed3('0x4f')]);_0x5496a7['userProfileId']=_0x57d6b4['id'];if(_0x288a08)_0x5496a7[_0x8ed3('0x58')]=_0x288a08;return _0x5496a7;})['then'](function(_0x60bdeb){return db['UserProfileSection'][_0x8ed3('0x49')](_0x60bdeb,{'include':[{'model':db[_0x8ed3('0x56')],'as':_0x8ed3('0x58')}],'raw':!![],'transaction':_0x3d1aaf});});})['then'](function(){return _0x57d6b4;});}});});});}})['then'](respondWithResult(_0x240d41,0xc9))[_0x8ed3('0x48')](handleError(_0x240d41,null));};exports[_0x8ed3('0x26')]=function(_0x33dbe7,_0x4bdf5b){if(_0x33dbe7['body']['id']){delete _0x33dbe7[_0x8ed3('0x4a')]['id'];}return db['UserProfile'][_0x8ed3('0x47')]({'where':{'id':_0x33dbe7[_0x8ed3('0x46')]['id']}})['then'](handleEntityNotFound(_0x4bdf5b,null))[_0x8ed3('0x41')](saveUpdates(_0x33dbe7['body'],null))['then'](respondWithResult(_0x4bdf5b,null))[_0x8ed3('0x48')](handleError(_0x4bdf5b,null));};exports['destroy']=function(_0x46c020,_0x14cb0f){return db[_0x8ed3('0x2d')][_0x8ed3('0x47')]({'where':{'id':_0x46c020[_0x8ed3('0x46')]['id']}})[_0x8ed3('0x41')](handleEntityNotFound(_0x14cb0f,null))[_0x8ed3('0x41')](removeEntity(_0x14cb0f,null))['catch'](handleError(_0x14cb0f,null));};exports[_0x8ed3('0x59')]=function(_0x222f22,_0x5cc50d){return db[_0x8ed3('0x2d')][_0x8ed3('0x59')]()[_0x8ed3('0x41')](respondWithResult(_0x5cc50d,null))[_0x8ed3('0x48')](handleError(_0x5cc50d,null));};exports[_0x8ed3('0x5a')]=function(_0x3c976e,_0x59453b){var _0x103251=_0x3c976e[_0x8ed3('0x4a')];return db['UserProfile']['find']({'where':{'id':_0x3c976e[_0x8ed3('0x46')]['id']}})['then'](handleEntityNotFound(_0x59453b,null))[_0x8ed3('0x41')](function(_0x104586){if(_0x104586){return db['sequelize'][_0x8ed3('0x51')](function(_0x36fc0a){return db[_0x8ed3('0x53')][_0x8ed3('0x27')]({'where':{'userProfileId':_0x3c976e['params']['id'],'sectionId':_[_0x8ed3('0x2c')](_0x103251,function(_0xc78edc){return _0xc78edc['sectionId'];})},'transaction':_0x36fc0a})[_0x8ed3('0x41')](function(){var _0x1d15a4=_['map'](_0x103251,function(_0x2460d7){_0x2460d7[_0x8ed3('0x5b')]=_0x3c976e['params']['id'];return _0x2460d7;});var _0x412b75=[];return BPromise[_0x8ed3('0x54')](_0x1d15a4,function(_0x4ce79d){return db['UserProfileSection'][_0x8ed3('0x49')](_0x4ce79d,{'include':[{'model':db['UserProfileResource'],'as':_0x8ed3('0x58')}],'raw':!![],'transaction':_0x36fc0a})['then'](function(_0x2dcb4e){_0x412b75[_0x8ed3('0x5c')](_0x2dcb4e['get']({'plain':!![]}));});})[_0x8ed3('0x41')](function(){return _0x412b75;});});});}})[_0x8ed3('0x41')](function(_0x5513fc){return _0x5513fc;})[_0x8ed3('0x41')](respondWithResult(_0x59453b,null))[_0x8ed3('0x48')](handleError(_0x59453b,null));};exports['removeSections']=function(_0x529382,_0x2e3448){var _0x1e0d41;return db[_0x8ed3('0x2d')]['find']({'where':{'id':_0x529382[_0x8ed3('0x46')]['id']},'attributes':['id',_0x8ed3('0x29')]})[_0x8ed3('0x41')](handleEntityNotFound(_0x2e3448,null))['then'](function(_0x2ee91f){if(_0x2ee91f){_0x1e0d41=_0x2ee91f;return db[_0x8ed3('0x53')][_0x8ed3('0x27')]({'where':{'userProfileId':_0x529382[_0x8ed3('0x46')]['id'],'sectionId':_0x529382[_0x8ed3('0x32')][_0x8ed3('0x5d')]}});}})[_0x8ed3('0x41')](function(){return _0x1e0d41;})['then'](respondWithStatusCode(_0x2e3448,null))['catch'](handleError(_0x2e3448,null));};exports[_0x8ed3('0x5e')]=function(_0x1e8f19,_0x4656c0){var _0x4045a3=[];var _0x55164=[];return db['UserProfileSection']['findAll']({'where':{'userProfileId':_0x1e8f19[_0x8ed3('0x46')]['id']},'raw':!![]})['then'](function(_0x2001d5){_0x4045a3=_[_0x8ed3('0x3d')](_0x2001d5,function(_0x578ce9){return _0x578ce9['enabled']===0x1||_[_0x8ed3('0x5f')]([0x3eb,0x709],_0x578ce9[_0x8ed3('0x57')]);});if(!_[_0x8ed3('0x60')](_0x4045a3)){return _['map'](_0x4045a3,function(_0x805c64){return _0x805c64[_0x8ed3('0x57')];});}else{return;}})[_0x8ed3('0x41')](function(_0x3420bf){if(_0x3420bf)_0x55164=_0x3420bf;if(_[_0x8ed3('0x5f')](_0x55164,0x64)){var _0x15758f=_[_0x8ed3('0x47')](_0x4045a3,{'sectionId':0x64});return hasDefaultDashboard(_0x15758f)['then'](function(_0x4719c1){return _[_0x8ed3('0x2c')](_0x4045a3,function(_0x328e17){if(_0x328e17[_0x8ed3('0x57')]===0x64){_0x328e17[_0x8ed3('0x61')]=_0x4719c1;}return _0x328e17;});});}else{return;}})['then'](function(_0x4c648b){if(_0x4c648b)_0x4045a3=_0x4c648b;if(_['includes'](_0x55164,0x3eb)){var _0x2c3fc0=_['find'](_0x4045a3,{'sectionId':0x3eb});return getCustomDashboards(_0x2c3fc0)[_0x8ed3('0x41')](function(_0x5b341c){return _[_0x8ed3('0x2c')](_0x4045a3,function(_0xd2235){if(_0x2c3fc0['enabled']){if(_0xd2235[_0x8ed3('0x57')]===0x3eb){_0xd2235[_0x8ed3('0x61')]=_0x5b341c;}}else{if(_0xd2235[_0x8ed3('0x57')]===0x64){if(!_0xd2235[_0x8ed3('0x61')]){_0xd2235[_0x8ed3('0x61')]=[];}_0xd2235[_0x8ed3('0x61')]=_0xd2235[_0x8ed3('0x61')][_0x8ed3('0x62')](_0x5b341c);}}return _0xd2235;});});}else{return;}})[_0x8ed3('0x41')](function(_0x4ae843){if(_0x4ae843)_0x4045a3=_0x4ae843;if(_['includes'](_0x55164,0x709)){var _0x27d12a=_[_0x8ed3('0x47')](_0x4045a3,{'sectionId':0x709});return getPlugins(_0x27d12a)[_0x8ed3('0x41')](function(_0x4f237f){if(_0x27d12a[_0x8ed3('0x63')]){return _['map'](_0x4045a3,function(_0x37158e){if(_0x37158e[_0x8ed3('0x57')]===0x709){_0x37158e['subsections']=_0x4f237f;}return _0x37158e;});}else{var _0x1b7de9={'sectionId':0x76c,'enabled':0x1,'subsections':_0x4f237f};var _0x119c4b=_[_0x8ed3('0x2c')](_0x4045a3);_0x119c4b[_0x8ed3('0x5c')](_0x1b7de9);return _0x119c4b;}});}else{return;}})[_0x8ed3('0x41')](function(_0x27f700){if(_0x27f700)_0x4045a3=_0x27f700;return _[_0x8ed3('0x3d')](_0x4045a3,[_0x8ed3('0x63'),0x1]);})[_0x8ed3('0x41')](respondWithResult(_0x4656c0,null))['catch'](handleError(_0x4656c0,null));};function hasDefaultDashboard(_0x41f2e4){var _0x561c90=[0x65];return new BPromise(function(_0x5be71d,_0x2700aa){try{if(_0x41f2e4[_0x8ed3('0x55')]){_0x5be71d(_0x561c90);}else{return db['UserProfileResource'][_0x8ed3('0x64')]({'where':{'sectionId':_0x41f2e4['id']},'raw':!![]})[_0x8ed3('0x41')](function(_0x31b39c){_0x31b39c?_0x5be71d(_0x561c90):_0x5be71d();});}}catch(_0xc23371){_0x2700aa(_0xc23371);}});}function getCustomDashboards(_0x47e5be){var _0x412477=[];return new BPromise(function(_0x6e8427,_0x3c77ff){try{if(_0x47e5be[_0x8ed3('0x55')]){return db[_0x8ed3('0x65')][_0x8ed3('0x44')]({'raw':!![]})['then'](function(_0x306856){_0x306856[_0x8ed3('0x66')](function(_0xcb76df){_0x412477[_0x8ed3('0x5c')](_0xcb76df['id']+0x1869f);});_0x6e8427(_0x412477);});}else{return db[_0x8ed3('0x56')][_0x8ed3('0x44')]({'where':{'sectionId':_0x47e5be['id']},'raw':!![]})[_0x8ed3('0x41')](function(_0x142128){_0x142128[_0x8ed3('0x66')](function(_0x3e3920){_0x412477['push'](_0x3e3920['resourceId']+0x1869f);});_0x6e8427(_0x412477);});}}catch(_0x2f8d6d){_0x3c77ff(_0x2f8d6d);}});}function getPlugins(_0x2d7923){var _0x232654=[];return new BPromise(function(_0x587ec5,_0x3b52a2){try{if(_0x2d7923['autoAssociation']){return db[_0x8ed3('0x67')]['findAll']({'raw':!![]})[_0x8ed3('0x41')](function(_0x569c87){_0x569c87[_0x8ed3('0x66')](function(_0x5ec975){_0x232654['push'](_0x5ec975['id']+0x15b38);});_0x587ec5(_0x232654);});}else{return db['UserProfileResource'][_0x8ed3('0x44')]({'where':{'sectionId':_0x2d7923['id']},'raw':!![]})['then'](function(_0x523b23){_0x523b23[_0x8ed3('0x66')](function(_0xe3c9ee){_0x232654[_0x8ed3('0x5c')](_0xe3c9ee[_0x8ed3('0x68')]+0x15b38);});_0x587ec5(_0x232654);});}}catch(_0x393454){_0x3b52a2(_0x393454);}});}exports[_0x8ed3('0x69')]=function(_0x3b69d0,_0x55867f){return db[_0x8ed3('0x2d')][_0x8ed3('0x47')]({'where':{'id':_0x3b69d0[_0x8ed3('0x46')]['id']}})[_0x8ed3('0x41')](handleEntityNotFound(_0x55867f,null))['then'](function(_0x840446){if(_0x840446){return db['sequelize'][_0x8ed3('0x51')](function(_0x4fced7){return db[_0x8ed3('0x53')][_0x8ed3('0x44')]({'where':{'userProfileId':_0x3b69d0[_0x8ed3('0x46')]['id']},'attributes':['id'],'raw':!![]})[_0x8ed3('0x41')](function(_0x4a1260){if(_0x4a1260){return db[_0x8ed3('0x53')]['destroy']({'where':{'userProfileId':_0x3b69d0[_0x8ed3('0x46')]['id'],'id':_['map'](_0x4a1260,function(_0x364d14){return _0x364d14['id'];})},'transaction':_0x4fced7});}})[_0x8ed3('0x41')](function(_0x10c240){var _0x43678b=_[_0x8ed3('0x2c')](_0x3b69d0[_0x8ed3('0x4a')],function(_0x5b702c){_0x5b702c['userProfileId']=_0x3b69d0[_0x8ed3('0x46')]['id'];return _0x5b702c;});return db[_0x8ed3('0x53')]['bulkCreate'](_0x43678b,{'raw':!![],'transaction':_0x4fced7});})[_0x8ed3('0x41')](function(_0x275ec8){var _0x50603e=_['filter'](_[_0x8ed3('0x2c')](_0x275ec8,function(_0x24026f){return _0x24026f[_0x8ed3('0x52')]({'plain':!![]});}),{'includeAll':![]});if(_0x50603e){return db[_0x8ed3('0x53')][_0x8ed3('0x44')]({'where':{'userProfileId':_0x3b69d0['params']['id'],'sectionId':_[_0x8ed3('0x2c')](_0x50603e,function(_0x5a041f){return _0x5a041f[_0x8ed3('0x57')];})},'attributes':['id','sectionId'],'raw':!![]})[_0x8ed3('0x41')](function(_0x16697d){var _0x193c0d=_['map'](_0x3b69d0[_0x8ed3('0x4a')],function(_0x1fa813){_0x1fa813[_0x8ed3('0x5b')]=_0x3b69d0[_0x8ed3('0x46')]['id'];return _0x1fa813;});return db[_0x8ed3('0x56')][_0x8ed3('0x6a')](_0x193c0d,{'raw':!![],'transaction':_0x4fced7});});}})[_0x8ed3('0x48')](handleError(_0x55867f,null));});}})['then'](function(_0x555fe8){var _0x2ea1f2=_[_0x8ed3('0x2c')](_0x555fe8,function(_0xb59bfa){return _0xb59bfa[_0x8ed3('0x52')]({'plain':!![]});});})['then'](respondWithResult(_0x55867f,null))[_0x8ed3('0x48')](handleError(_0x55867f,null));};exports[_0x8ed3('0x6b')]=function(_0x40040b,_0x36f3e5,_0x219078){return db[_0x8ed3('0x2d')][_0x8ed3('0x47')]({'where':{'id':_0x40040b[_0x8ed3('0x46')]['id']}})[_0x8ed3('0x41')](handleEntityNotFound(_0x36f3e5,null))['then'](function(_0x24f538){if(_0x24f538){return _0x24f538[_0x8ed3('0x6b')](_0x40040b[_0x8ed3('0x32')][_0x8ed3('0x5d')]);}})[_0x8ed3('0x41')](respondWithStatusCode(_0x36f3e5,null))[_0x8ed3('0x48')](handleError(_0x36f3e5,null));};exports['getResources']=function(_0xcf028a,_0x834089){var _0x192aea={};if(!_0xcf028a['query'][_0x8ed3('0x6c')])throw new Error(_0x8ed3('0x6d'));if(!_0xcf028a['query'][_0x8ed3('0x37')]('nolimit')){_0x192aea[_0x8ed3('0x21')]=qs[_0x8ed3('0x21')](_0xcf028a[_0x8ed3('0x32')][_0x8ed3('0x21')]);_0x192aea[_0x8ed3('0x1f')]=qs[_0x8ed3('0x1f')](_0xcf028a[_0x8ed3('0x32')][_0x8ed3('0x1f')]);}return db[_0x8ed3('0x2d')][_0x8ed3('0x47')]({'where':{'id':_0xcf028a[_0x8ed3('0x46')]['id']}})[_0x8ed3('0x41')](function(_0x49809f){if(!_0x49809f)throw new Error(_0x8ed3('0x6e')+_0xcf028a[_0x8ed3('0x46')]['id']);return db['UserProfile'][_0x8ed3('0x6f')](_0xcf028a);})[_0x8ed3('0x41')](respondWithFilteredResult(_0x834089,_0x192aea))[_0x8ed3('0x48')](handleError(_0x834089,null));};
\ No newline at end of file
+var _0x84e6=['crudPermissions','updatedAt','transaction','UserProfileSection','each','autoAssociation','UserProfileResource','omit','sectionId','userProfileId','Resources','describe','addSections','sequelize','push','ids','getSections','enabled','includes','isEmpty','subsections','concat','findOne','resourceId','Plugin','forEach','addResources','bulkCreate','removeResources','getResources','section','No\x20User\x20Profile\x20found\x20for\x20id\x20','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','path','sox','to-csv','fs-extra','squel','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../config/license/util','redis','localhost','socket.io-emitter','./userProfile.socket','register','sendStatus','status','end','json','offset','limit','undefined','count','Content-Range','reject','save','update','then','destroy','error','stack','name','index','rawAttributes','fieldName','type','key','keys','filters','intersection','model','query','fields','attributes','hasOwnProperty','nolimit','order','sort','pick','filter','where','map','VIRTUAL','merge','UserProfile','includeAll','include','findAll','catch','show','params','find','create','body','clone','length','options','get','createdAt'];(function(_0x37ce94,_0xbe541){var _0x5a9a52=function(_0x3fa025){while(--_0x3fa025){_0x37ce94['push'](_0x37ce94['shift']());}};_0x5a9a52(++_0xbe541);}(_0x84e6,0x8f));var _0x684e=function(_0x36032c,_0x120a0e){_0x36032c=_0x36032c-0x0;var _0x38fa38=_0x84e6[_0x36032c];return _0x38fa38;};'use strict';var emlformat=require(_0x684e('0x0'));var rimraf=require(_0x684e('0x1'));var zipdir=require(_0x684e('0x2'));var jsonpatch=require(_0x684e('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x684e('0x4'));var Mustache=require('mustache');var util=require('util');var path=require(_0x684e('0x5'));var sox=require(_0x684e('0x6'));var csv=require(_0x684e('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x684e('0x8'));var _=require('lodash');var squel=require(_0x684e('0x9'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x684e('0xa'));var toCsv=require(_0x684e('0x7'));var querystring=require(_0x684e('0xb'));var Papa=require(_0x684e('0xc'));var Redis=require(_0x684e('0xd'));var authService=require(_0x684e('0xe'));var qs=require(_0x684e('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x684e('0x10'))(_0x684e('0x11'));var utils=require('../../config/utils');var config=require(_0x684e('0x12'));var licenseUtil=require(_0x684e('0x13'));var db=require('../../mysqldb')['db'];config[_0x684e('0x14')]=_['defaults'](config[_0x684e('0x14')],{'host':_0x684e('0x15'),'port':0x18eb});var socket=require(_0x684e('0x16'))(new Redis(config[_0x684e('0x14')]));require(_0x684e('0x17'))[_0x684e('0x18')](socket);function respondWithStatusCode(_0x389075,_0x4318a9){_0x4318a9=_0x4318a9||0xcc;return function(_0x109281){if(_0x109281){return _0x389075[_0x684e('0x19')](_0x4318a9);}return _0x389075[_0x684e('0x1a')](_0x4318a9)[_0x684e('0x1b')]();};}function respondWithResult(_0x2a8e90,_0x2ba383){_0x2ba383=_0x2ba383||0xc8;return function(_0x13d3ba){if(_0x13d3ba){return _0x2a8e90[_0x684e('0x1a')](_0x2ba383)[_0x684e('0x1c')](_0x13d3ba);}};}function respondWithFilteredResult(_0x284801,_0x5c8382){return function(_0x4f3b8c){if(_0x4f3b8c){var _0x421dd7=typeof _0x5c8382[_0x684e('0x1d')]==='undefined'&&typeof _0x5c8382[_0x684e('0x1e')]===_0x684e('0x1f');var _0x184ff8=_0x4f3b8c[_0x684e('0x20')];var _0x555559=_0x421dd7?0x0:_0x5c8382[_0x684e('0x1d')];var _0x561471=_0x421dd7?_0x4f3b8c[_0x684e('0x20')]:_0x5c8382[_0x684e('0x1d')]+_0x5c8382[_0x684e('0x1e')];var _0x411a03;if(_0x561471>=_0x184ff8){_0x561471=_0x184ff8;_0x411a03=0xc8;}else{_0x411a03=0xce;}_0x284801[_0x684e('0x1a')](_0x411a03);return _0x284801['set'](_0x684e('0x21'),_0x555559+'-'+_0x561471+'/'+_0x184ff8)[_0x684e('0x1c')](_0x4f3b8c);}return null;};}function patchUpdates(_0x5077ec){return function(_0x4b2dff){try{jsonpatch['apply'](_0x4b2dff,_0x5077ec,!![]);}catch(_0x13f15f){return BPromise[_0x684e('0x22')](_0x13f15f);}return _0x4b2dff[_0x684e('0x23')]();};}function saveUpdates(_0xa565a8,_0x48a18b){return function(_0xa0dde9){if(_0xa0dde9){return _0xa0dde9[_0x684e('0x24')](_0xa565a8)[_0x684e('0x25')](function(_0x5a6264){return _0x5a6264;});}return null;};}function removeEntity(_0x245f69,_0x57d303){return function(_0x218eda){if(_0x218eda){return _0x218eda[_0x684e('0x26')]()[_0x684e('0x25')](function(){_0x245f69[_0x684e('0x1a')](0xcc)[_0x684e('0x1b')]();});}};}function handleEntityNotFound(_0x195a72,_0x50ee80){return function(_0x2a3d8d){if(!_0x2a3d8d){_0x195a72['sendStatus'](0x194);}return _0x2a3d8d;};}function handleError(_0x3ad849,_0x16dfcf){_0x16dfcf=_0x16dfcf||0x1f4;return function(_0x2e0107){logger[_0x684e('0x27')](_0x2e0107[_0x684e('0x28')]);if(_0x2e0107[_0x684e('0x29')]){delete _0x2e0107[_0x684e('0x29')];}_0x3ad849[_0x684e('0x1a')](_0x16dfcf)['send'](_0x2e0107);};}exports[_0x684e('0x2a')]=function(_0x204297,_0x3032eb){var _0x1438f0={},_0xee5518={},_0xff5533={'count':0x0,'rows':[]};var _0x4b1c9c=_['map'](db['UserProfile'][_0x684e('0x2b')],function(_0x5ed129){return{'name':_0x5ed129[_0x684e('0x2c')],'type':_0x5ed129[_0x684e('0x2d')][_0x684e('0x2e')]};});_0xee5518['model']=_['map'](_0x4b1c9c,_0x684e('0x29'));_0xee5518['query']=_[_0x684e('0x2f')](_0x204297['query']);_0xee5518[_0x684e('0x30')]=_[_0x684e('0x31')](_0xee5518[_0x684e('0x32')],_0xee5518[_0x684e('0x33')]);_0x1438f0['attributes']=_[_0x684e('0x31')](_0xee5518[_0x684e('0x32')],qs[_0x684e('0x34')](_0x204297[_0x684e('0x33')][_0x684e('0x34')]));_0x1438f0['attributes']=_0x1438f0[_0x684e('0x35')]['length']?_0x1438f0['attributes']:_0xee5518['model'];if(!_0x204297[_0x684e('0x33')][_0x684e('0x36')](_0x684e('0x37'))){_0x1438f0[_0x684e('0x1e')]=qs[_0x684e('0x1e')](_0x204297[_0x684e('0x33')][_0x684e('0x1e')]);_0x1438f0[_0x684e('0x1d')]=qs[_0x684e('0x1d')](_0x204297[_0x684e('0x33')][_0x684e('0x1d')]);}_0x1438f0[_0x684e('0x38')]=qs['sort'](_0x204297['query'][_0x684e('0x39')]);_0x1438f0['where']=qs[_0x684e('0x30')](_[_0x684e('0x3a')](_0x204297[_0x684e('0x33')],_0xee5518[_0x684e('0x30')]),_0x4b1c9c);if(_0x204297[_0x684e('0x33')][_0x684e('0x3b')]){_0x1438f0['where']=_['merge'](_0x1438f0[_0x684e('0x3c')],{'$or':_[_0x684e('0x3d')](_0x4b1c9c,function(_0x278e2c){if(_0x278e2c[_0x684e('0x2d')]!==_0x684e('0x3e')){var _0xf85310={};_0xf85310[_0x278e2c[_0x684e('0x29')]]={'$like':'%'+_0x204297[_0x684e('0x33')][_0x684e('0x3b')]+'%'};return _0xf85310;}})});}_0x1438f0=_[_0x684e('0x3f')]({},_0x1438f0,_0x204297['options']);var _0x3e3d4e={'where':_0x1438f0['where']};return db[_0x684e('0x40')][_0x684e('0x20')](_0x3e3d4e)[_0x684e('0x25')](function(_0x1dfe09){_0xff5533[_0x684e('0x20')]=_0x1dfe09;if(_0x204297[_0x684e('0x33')][_0x684e('0x41')]){_0x1438f0[_0x684e('0x42')]=[{'all':!![]}];}return db[_0x684e('0x40')][_0x684e('0x43')](_0x1438f0);})['then'](function(_0x16589a){_0xff5533['rows']=_0x16589a;return _0xff5533;})[_0x684e('0x25')](respondWithFilteredResult(_0x3032eb,_0x1438f0))[_0x684e('0x44')](handleError(_0x3032eb,null));};exports[_0x684e('0x45')]=function(_0x54263a,_0x3feb8b){var _0x1b4e96={'raw':![],'where':{'id':_0x54263a[_0x684e('0x46')]['id']}},_0x4fb9aa={};_0x4fb9aa['model']=_['keys'](db[_0x684e('0x40')][_0x684e('0x2b')]);_0x4fb9aa[_0x684e('0x33')]=_['keys'](_0x54263a[_0x684e('0x33')]);_0x4fb9aa[_0x684e('0x30')]=_[_0x684e('0x31')](_0x4fb9aa['model'],_0x4fb9aa[_0x684e('0x33')]);_0x1b4e96['attributes']=_[_0x684e('0x31')](_0x4fb9aa[_0x684e('0x32')],qs[_0x684e('0x34')](_0x54263a[_0x684e('0x33')][_0x684e('0x34')]));_0x1b4e96[_0x684e('0x35')]=_0x1b4e96[_0x684e('0x35')]['length']?_0x1b4e96[_0x684e('0x35')]:_0x4fb9aa[_0x684e('0x32')];if(_0x54263a[_0x684e('0x33')][_0x684e('0x41')]){_0x1b4e96[_0x684e('0x42')]=[{'all':!![]}];}_0x1b4e96=_['merge']({},_0x1b4e96,_0x54263a['options']);return db[_0x684e('0x40')][_0x684e('0x47')](_0x1b4e96)[_0x684e('0x25')](handleEntityNotFound(_0x3feb8b,null))['then'](respondWithResult(_0x3feb8b,null))[_0x684e('0x44')](handleError(_0x3feb8b,null));};exports[_0x684e('0x48')]=function(_0x31685f,_0x5a806e){return db[_0x684e('0x40')]['create'](_0x31685f[_0x684e('0x49')],{})['then'](respondWithResult(_0x5a806e,0xc9))[_0x684e('0x44')](handleError(_0x5a806e,null));};exports[_0x684e('0x4a')]=function(_0x5c0400,_0x5dac54){var _0x57b774={'where':{'id':_0x5c0400['params']['id']}},_0x30ab5a={};_0x30ab5a[_0x684e('0x32')]=_['keys'](db[_0x684e('0x40')]['rawAttributes']);_0x57b774['attributes']=_['intersection'](_0x30ab5a['model'],qs[_0x684e('0x34')](_0x5c0400[_0x684e('0x33')]['fields']));_0x57b774[_0x684e('0x35')]=_0x57b774[_0x684e('0x35')][_0x684e('0x4b')]?_0x57b774[_0x684e('0x35')]:_0x30ab5a[_0x684e('0x32')];if(_0x5c0400[_0x684e('0x33')]['includeAll']){_0x57b774[_0x684e('0x42')]=[{'all':!![]}];}_0x57b774=_[_0x684e('0x3f')]({},_0x57b774,_0x5c0400[_0x684e('0x4c')]);return db[_0x684e('0x40')]['find'](_0x57b774)[_0x684e('0x25')](handleEntityNotFound(_0x5dac54,null))['then'](function(_0x77c33){if(_0x77c33){var _0x2de9ad=_0x77c33[_0x684e('0x4d')]({'plain':!![]});_0x2de9ad=qs['omit'](_0x2de9ad,['id',_0x684e('0x4e'),'updatedAt',_0x684e('0x4f')]);_0x5c0400[_0x684e('0x49')]=_['omit'](_0x5c0400[_0x684e('0x49')],['id','createdAt',_0x684e('0x50')]);return db['sequelize'][_0x684e('0x51')](function(_0x363b90){return db['UserProfile'][_0x684e('0x48')](_['merge'](_0x2de9ad,_0x5c0400['body']),{'include':_0x5c0400[_0x684e('0x33')][_0x684e('0x41')]?[{'all':!![]}]:undefined,'transaction':_0x363b90})[_0x684e('0x25')](function(_0x5d0087){var _0x4b9996=_0x5d0087['get']({'plain':!![]});return db[_0x684e('0x52')][_0x684e('0x43')]({'where':{'userProfileId':_0x5c0400[_0x684e('0x46')]['id']},'raw':!![]})[_0x684e('0x25')](function(_0x258363){if(_0x258363){return BPromise[_0x684e('0x53')](_0x258363,function(_0x4262c1){return new BPromise(function(_0x45484b,_0x33dfaa){if(_0x4262c1[_0x684e('0x54')]===null||_0x4262c1[_0x684e('0x54')]===0x1)_0x45484b(null);return db[_0x684e('0x55')]['findAll']({'where':{'sectionId':_0x4262c1['id']},'raw':!![]})[_0x684e('0x25')](function(_0x5c340d){var _0x1c978e=_['map'](_0x5c340d,function(_0x32a59a){return qs[_0x684e('0x56')](_0x32a59a,['id',_0x684e('0x4e'),_0x684e('0x50'),_0x684e('0x57')]);});_0x45484b(_0x1c978e);})[_0x684e('0x44')](function(_0xeb50bb){_0x33dfaa(_0xeb50bb);});})['then'](function(_0x2251f2){var _0x168048=qs[_0x684e('0x56')](_0x4262c1,['id','createdAt','updatedAt']);_0x168048[_0x684e('0x58')]=_0x4b9996['id'];if(_0x2251f2)_0x168048[_0x684e('0x59')]=_0x2251f2;return _0x168048;})[_0x684e('0x25')](function(_0xf1fa3c){return db[_0x684e('0x52')][_0x684e('0x48')](_0xf1fa3c,{'include':[{'model':db[_0x684e('0x55')],'as':'Resources'}],'raw':!![],'transaction':_0x363b90});});})['then'](function(){return _0x4b9996;});}});});});}})[_0x684e('0x25')](respondWithResult(_0x5dac54,0xc9))['catch'](handleError(_0x5dac54,null));};exports[_0x684e('0x24')]=function(_0x45ec54,_0x2ef934){if(_0x45ec54[_0x684e('0x49')]['id']){delete _0x45ec54['body']['id'];}return db[_0x684e('0x40')][_0x684e('0x47')]({'where':{'id':_0x45ec54[_0x684e('0x46')]['id']}})[_0x684e('0x25')](handleEntityNotFound(_0x2ef934,null))[_0x684e('0x25')](saveUpdates(_0x45ec54['body'],null))['then'](respondWithResult(_0x2ef934,null))[_0x684e('0x44')](handleError(_0x2ef934,null));};exports['destroy']=function(_0x1abeb4,_0x3463c4){return db['UserProfile']['find']({'where':{'id':_0x1abeb4[_0x684e('0x46')]['id']}})['then'](handleEntityNotFound(_0x3463c4,null))[_0x684e('0x25')](removeEntity(_0x3463c4,null))['catch'](handleError(_0x3463c4,null));};exports[_0x684e('0x5a')]=function(_0x32d6df,_0xfa6553){return db[_0x684e('0x40')][_0x684e('0x5a')]()['then'](respondWithResult(_0xfa6553,null))[_0x684e('0x44')](handleError(_0xfa6553,null));};exports[_0x684e('0x5b')]=function(_0x416f36,_0x5d2ca5){var _0x4dc642=_0x416f36[_0x684e('0x49')];return db['UserProfile'][_0x684e('0x47')]({'where':{'id':_0x416f36[_0x684e('0x46')]['id']}})[_0x684e('0x25')](handleEntityNotFound(_0x5d2ca5,null))[_0x684e('0x25')](function(_0x5b510c){if(_0x5b510c){return db[_0x684e('0x5c')][_0x684e('0x51')](function(_0x548bff){return db[_0x684e('0x52')]['destroy']({'where':{'userProfileId':_0x416f36[_0x684e('0x46')]['id'],'sectionId':_[_0x684e('0x3d')](_0x4dc642,function(_0x3c4865){return _0x3c4865[_0x684e('0x57')];})},'transaction':_0x548bff})['then'](function(){var _0x3eaabe=_[_0x684e('0x3d')](_0x4dc642,function(_0x403f8d){_0x403f8d[_0x684e('0x58')]=_0x416f36[_0x684e('0x46')]['id'];return _0x403f8d;});var _0x9abc95=[];return BPromise['each'](_0x3eaabe,function(_0x550ec3){return db[_0x684e('0x52')][_0x684e('0x48')](_0x550ec3,{'include':[{'model':db['UserProfileResource'],'as':'Resources'}],'raw':!![],'transaction':_0x548bff})[_0x684e('0x25')](function(_0xfcd79c){_0x9abc95[_0x684e('0x5d')](_0xfcd79c[_0x684e('0x4d')]({'plain':!![]}));});})[_0x684e('0x25')](function(){return _0x9abc95;});});});}})['then'](function(_0x3efcd5){return _0x3efcd5;})['then'](respondWithResult(_0x5d2ca5,null))[_0x684e('0x44')](handleError(_0x5d2ca5,null));};exports['removeSections']=function(_0x554e11,_0x5673db){var _0x4fe984;return db[_0x684e('0x40')][_0x684e('0x47')]({'where':{'id':_0x554e11[_0x684e('0x46')]['id']},'attributes':['id','name']})[_0x684e('0x25')](handleEntityNotFound(_0x5673db,null))[_0x684e('0x25')](function(_0x537b92){if(_0x537b92){_0x4fe984=_0x537b92;return db[_0x684e('0x52')][_0x684e('0x26')]({'where':{'userProfileId':_0x554e11[_0x684e('0x46')]['id'],'sectionId':_0x554e11['query'][_0x684e('0x5e')]}});}})[_0x684e('0x25')](function(){return _0x4fe984;})['then'](respondWithStatusCode(_0x5673db,null))[_0x684e('0x44')](handleError(_0x5673db,null));};exports[_0x684e('0x5f')]=function(_0x5bbc68,_0x53edda){var _0x196be3=[];var _0x722042=[];return db[_0x684e('0x52')][_0x684e('0x43')]({'where':{'userProfileId':_0x5bbc68[_0x684e('0x46')]['id']},'raw':!![]})[_0x684e('0x25')](function(_0x4cc7d3){_0x196be3=_[_0x684e('0x3b')](_0x4cc7d3,function(_0x20f8bc){return _0x20f8bc[_0x684e('0x60')]===0x1||_[_0x684e('0x61')]([0x3eb,0x709],_0x20f8bc['sectionId']);});if(!_[_0x684e('0x62')](_0x196be3)){return _['map'](_0x196be3,function(_0x4617cc){return _0x4617cc[_0x684e('0x57')];});}else{return;}})[_0x684e('0x25')](function(_0x2ab040){if(_0x2ab040)_0x722042=_0x2ab040;if(_[_0x684e('0x61')](_0x722042,0x64)){var _0xd76463=_[_0x684e('0x47')](_0x196be3,{'sectionId':0x64});return hasDefaultDashboard(_0xd76463)[_0x684e('0x25')](function(_0x5da204){return _[_0x684e('0x3d')](_0x196be3,function(_0x126d21){if(_0x126d21['sectionId']===0x64){_0x126d21[_0x684e('0x63')]=_0x5da204;}return _0x126d21;});});}else{return;}})[_0x684e('0x25')](function(_0x1eae54){if(_0x1eae54)_0x196be3=_0x1eae54;if(_[_0x684e('0x61')](_0x722042,0x3eb)){var _0xd5c5d7=_[_0x684e('0x47')](_0x196be3,{'sectionId':0x3eb});return getCustomDashboards(_0xd5c5d7)[_0x684e('0x25')](function(_0x47639e){return _['map'](_0x196be3,function(_0x29e377){if(_0xd5c5d7[_0x684e('0x60')]){if(_0x29e377[_0x684e('0x57')]===0x3eb){_0x29e377[_0x684e('0x63')]=_0x47639e;}}else{if(_0x29e377['sectionId']===0x64){if(!_0x29e377[_0x684e('0x63')]){_0x29e377[_0x684e('0x63')]=[];}_0x29e377[_0x684e('0x63')]=_0x29e377[_0x684e('0x63')][_0x684e('0x64')](_0x47639e);}}return _0x29e377;});});}else{return;}})[_0x684e('0x25')](function(_0x35c109){if(_0x35c109)_0x196be3=_0x35c109;if(_[_0x684e('0x61')](_0x722042,0x709)){var _0x283638=_['find'](_0x196be3,{'sectionId':0x709});return getPlugins(_0x283638)[_0x684e('0x25')](function(_0x2a082b){if(_0x283638[_0x684e('0x60')]){return _[_0x684e('0x3d')](_0x196be3,function(_0x297db1){if(_0x297db1[_0x684e('0x57')]===0x709){_0x297db1[_0x684e('0x63')]=_0x2a082b;}return _0x297db1;});}else{var _0xad698c={'sectionId':0x76c,'enabled':0x1,'subsections':_0x2a082b};var _0x476e0a=_[_0x684e('0x3d')](_0x196be3);_0x476e0a[_0x684e('0x5d')](_0xad698c);return _0x476e0a;}});}else{return;}})[_0x684e('0x25')](function(_0x2313fb){if(_0x2313fb)_0x196be3=_0x2313fb;return _[_0x684e('0x3b')](_0x196be3,[_0x684e('0x60'),0x1]);})['then'](respondWithResult(_0x53edda,null))[_0x684e('0x44')](handleError(_0x53edda,null));};function hasDefaultDashboard(_0x3ae2d1){var _0x3c97a3=[0x65];return new BPromise(function(_0x27ad04,_0x5b3827){try{if(_0x3ae2d1[_0x684e('0x54')]){_0x27ad04(_0x3c97a3);}else{return db['UserProfileResource'][_0x684e('0x65')]({'where':{'sectionId':_0x3ae2d1['id']},'raw':!![]})[_0x684e('0x25')](function(_0x193f41){_0x193f41?_0x27ad04(_0x3c97a3):_0x27ad04();});}}catch(_0x1832bc){_0x5b3827(_0x1832bc);}});}function getCustomDashboards(_0x577f35){var _0xdb40d1=[];return new BPromise(function(_0x5af67e,_0x167476){try{if(_0x577f35[_0x684e('0x54')]){return db['Dashboard'][_0x684e('0x43')]({'raw':!![]})[_0x684e('0x25')](function(_0x4e0471){_0x4e0471['forEach'](function(_0x2d6832){_0xdb40d1['push'](_0x2d6832['id']+0x1869f);});_0x5af67e(_0xdb40d1);});}else{return db['UserProfileResource'][_0x684e('0x43')]({'where':{'sectionId':_0x577f35['id']},'raw':!![]})['then'](function(_0xc9b60a){_0xc9b60a['forEach'](function(_0x1aaf17){_0xdb40d1[_0x684e('0x5d')](_0x1aaf17[_0x684e('0x66')]+0x1869f);});_0x5af67e(_0xdb40d1);});}}catch(_0x204177){_0x167476(_0x204177);}});}function getPlugins(_0x1e0890){var _0x23a168=[];return new BPromise(function(_0x491911,_0x431f15){try{if(_0x1e0890[_0x684e('0x54')]){return db[_0x684e('0x67')]['findAll']({'raw':!![]})[_0x684e('0x25')](function(_0x2ac3f8){_0x2ac3f8['forEach'](function(_0x13194e){_0x23a168['push'](_0x13194e['id']+0x15b38);});_0x491911(_0x23a168);});}else{return db[_0x684e('0x55')][_0x684e('0x43')]({'where':{'sectionId':_0x1e0890['id']},'raw':!![]})[_0x684e('0x25')](function(_0x3b8cba){_0x3b8cba[_0x684e('0x68')](function(_0x1e34f2){_0x23a168[_0x684e('0x5d')](_0x1e34f2['resourceId']+0x15b38);});_0x491911(_0x23a168);});}}catch(_0x57febd){_0x431f15(_0x57febd);}});}exports[_0x684e('0x69')]=function(_0x4c51ae,_0x4d10ad){return db[_0x684e('0x40')][_0x684e('0x47')]({'where':{'id':_0x4c51ae[_0x684e('0x46')]['id']}})[_0x684e('0x25')](handleEntityNotFound(_0x4d10ad,null))['then'](function(_0x494d32){if(_0x494d32){return db[_0x684e('0x5c')][_0x684e('0x51')](function(_0x556294){return db['UserProfileSection'][_0x684e('0x43')]({'where':{'userProfileId':_0x4c51ae[_0x684e('0x46')]['id']},'attributes':['id'],'raw':!![]})['then'](function(_0x19d5cb){if(_0x19d5cb){return db[_0x684e('0x52')][_0x684e('0x26')]({'where':{'userProfileId':_0x4c51ae[_0x684e('0x46')]['id'],'id':_[_0x684e('0x3d')](_0x19d5cb,function(_0x4a977d){return _0x4a977d['id'];})},'transaction':_0x556294});}})['then'](function(_0x3c1de1){var _0x27a79f=_['map'](_0x4c51ae['body'],function(_0x1f5e13){_0x1f5e13[_0x684e('0x58')]=_0x4c51ae[_0x684e('0x46')]['id'];return _0x1f5e13;});return db['UserProfileSection'][_0x684e('0x6a')](_0x27a79f,{'raw':!![],'transaction':_0x556294});})[_0x684e('0x25')](function(_0x158a6e){var _0x1776b4=_[_0x684e('0x3b')](_[_0x684e('0x3d')](_0x158a6e,function(_0x88eaea){return _0x88eaea[_0x684e('0x4d')]({'plain':!![]});}),{'includeAll':![]});if(_0x1776b4){return db['UserProfileSection'][_0x684e('0x43')]({'where':{'userProfileId':_0x4c51ae[_0x684e('0x46')]['id'],'sectionId':_['map'](_0x1776b4,function(_0x415c03){return _0x415c03['sectionId'];})},'attributes':['id',_0x684e('0x57')],'raw':!![]})[_0x684e('0x25')](function(_0x4259c8){var _0xb89a47=_[_0x684e('0x3d')](_0x4c51ae[_0x684e('0x49')],function(_0x56142d){_0x56142d[_0x684e('0x58')]=_0x4c51ae[_0x684e('0x46')]['id'];return _0x56142d;});return db['UserProfileResource'][_0x684e('0x6a')](_0xb89a47,{'raw':!![],'transaction':_0x556294});});}})[_0x684e('0x44')](handleError(_0x4d10ad,null));});}})[_0x684e('0x25')](function(_0xa97588){var _0x3808e7=_[_0x684e('0x3d')](_0xa97588,function(_0x2e1449){return _0x2e1449[_0x684e('0x4d')]({'plain':!![]});});})[_0x684e('0x25')](respondWithResult(_0x4d10ad,null))[_0x684e('0x44')](handleError(_0x4d10ad,null));};exports['removeResources']=function(_0x4a0749,_0x4d3839,_0x4cb89a){return db[_0x684e('0x40')]['find']({'where':{'id':_0x4a0749[_0x684e('0x46')]['id']}})[_0x684e('0x25')](handleEntityNotFound(_0x4d3839,null))['then'](function(_0x30301e){if(_0x30301e){return _0x30301e[_0x684e('0x6b')](_0x4a0749[_0x684e('0x33')][_0x684e('0x5e')]);}})[_0x684e('0x25')](respondWithStatusCode(_0x4d3839,null))[_0x684e('0x44')](handleError(_0x4d3839,null));};exports[_0x684e('0x6c')]=function(_0x4c48fc,_0x166750){var _0x296142={};if(!_0x4c48fc['query'][_0x684e('0x6d')])throw new Error('Missing\x20section\x20parameter');if(!_0x4c48fc[_0x684e('0x33')][_0x684e('0x36')](_0x684e('0x37'))){_0x296142[_0x684e('0x1e')]=qs[_0x684e('0x1e')](_0x4c48fc[_0x684e('0x33')][_0x684e('0x1e')]);_0x296142[_0x684e('0x1d')]=qs[_0x684e('0x1d')](_0x4c48fc[_0x684e('0x33')]['offset']);}return db[_0x684e('0x40')][_0x684e('0x47')]({'where':{'id':_0x4c48fc[_0x684e('0x46')]['id']}})[_0x684e('0x25')](function(_0x5be455){if(!_0x5be455)throw new Error(_0x684e('0x6e')+_0x4c48fc['params']['id']);return db[_0x684e('0x40')][_0x684e('0x6c')](_0x4c48fc);})[_0x684e('0x25')](respondWithFilteredResult(_0x166750,_0x296142))[_0x684e('0x44')](handleError(_0x166750,null));};
\ No newline at end of file
index 715b6d2..9eeb123 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd663=['update','remove','hook','events','../../mysqldb','setMaxListeners','save'];(function(_0x566416,_0x5f0533){var _0x11a8d7=function(_0x41b25f){while(--_0x41b25f){_0x566416['push'](_0x566416['shift']());}};_0x11a8d7(++_0x5f0533);}(_0xd663,0x1ed));var _0x3d66=function(_0x5e2c56,_0x4b57d4){_0x5e2c56=_0x5e2c56-0x0;var _0x485a69=_0xd663[_0x5e2c56];return _0x485a69;};'use strict';var EventEmitter=require(_0x3d66('0x0'));var UserProfile=require(_0x3d66('0x1'))['db']['UserProfile'];var UserProfileEvents=new EventEmitter();UserProfileEvents[_0x3d66('0x2')](0x0);var events={'afterCreate':_0x3d66('0x3'),'afterUpdate':_0x3d66('0x4'),'afterDestroy':_0x3d66('0x5')};function emitEvent(_0xb5a453){return function(_0x4e9001,_0x28d76b,_0x533dcc){UserProfileEvents['emit'](_0xb5a453+':'+_0x4e9001['id'],_0x4e9001);UserProfileEvents['emit'](_0xb5a453,_0x4e9001);_0x533dcc(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserProfile[_0x3d66('0x6')](e,emitEvent(event));}}module['exports']=UserProfileEvents;
\ No newline at end of file
+var _0xf61e=['hook','events','../../mysqldb','UserProfile','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0xbd4746,_0x9ca2c8){var _0x2afcef=function(_0x5c6a0b){while(--_0x5c6a0b){_0xbd4746['push'](_0xbd4746['shift']());}};_0x2afcef(++_0x9ca2c8);}(_0xf61e,0x191));var _0xef61=function(_0x92a4a7,_0x105843){_0x92a4a7=_0x92a4a7-0x0;var _0x18ad30=_0xf61e[_0x92a4a7];return _0x18ad30;};'use strict';var EventEmitter=require(_0xef61('0x0'));var UserProfile=require(_0xef61('0x1'))['db'][_0xef61('0x2')];var UserProfileEvents=new EventEmitter();UserProfileEvents[_0xef61('0x3')](0x0);var events={'afterCreate':_0xef61('0x4'),'afterUpdate':_0xef61('0x5'),'afterDestroy':_0xef61('0x6')};function emitEvent(_0x40509e){return function(_0x2bd1d0,_0x14122a,_0x239fa9){UserProfileEvents[_0xef61('0x7')](_0x40509e+':'+_0x2bd1d0['id'],_0x2bd1d0);UserProfileEvents['emit'](_0x40509e,_0x2bd1d0);_0x239fa9(null);};}for(var e in events){if(events[_0xef61('0x8')](e)){var event=events[e];UserProfile[_0xef61('0x9')](e,emitEvent(event));}}module['exports']=UserProfileEvents;
\ No newline at end of file
index ee78e2b..6f960a8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5c0e=['Plugin','AnalyticExtractedReport','Reports','metrics','charAt','toUpperCase','slice','Sequelize','QueryTypes','SELECT','InteractionId','ui.createdAt','from','ui.UserId\x20=\x20?','sequelize','query','toString','OpenTabs','define','UserProfile','user_profiles','../../components/parsers/qs','raw','Invalid\x20section\x20\x27','isEmpty','length','push','UserProfileSection','find','params','ignore','union','autoAssociation','all','rawAttributes','keys','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','limit','offset','order','sort','where','merge','key','VIRTUAL','foreignKey','includeAll','include','findAll','forEach','reportType','default','reportId','DefaultReports','custom','count','rows','ids','customSorting','extraQueryConditions','Tags','color','tag','ThroughTags','openTabs','true','chat','dataValues','sms','fax','openchannel','lodash','./userProfile.attributes','squel','models','filter','field','value','then','associatedResources','map','catch','name','resolve','resourceId','toLowerCase','squareprojects','SquareProject','odbc','childModel','SquareRecording','parentSections','projectName','projects','JscriptyProject','contacts','CmContact','Lists','ListId','lists','CmList','companies','CmCompany','globalcustomfields','chatqueues','ChatQueue','chatwebsites','faxqueues','FaxQueue','faxaccounts','internalroutes','outboundroutes','VoiceExtension','contexts','VoiceContext','VoiceMail','voicerecordings','VoiceRecording','Agents','membername','User','telephone','VoiceQueues','queue','VoiceQueue','QueueCampaigns','type','VoiceMusicOnHold','VoiceChanSpy','voiceprefixes','VoicePrefix','ivrcampaigns','mailqueues','MailQueue','MailAccount','mailsubstatuses','MailSubstatus','openchannelqueues','OpenchannelQueue','smsqueues','SmsAccount','whatsappqueues','WhatsappQueue','whatsappaccounts','WhatsappAccount','teams','Team','voicequeues','queuecampaigns','users','telephones','Users','role','admin','user','zendeskaccounts','salesforceaccounts','freshdeskaccounts','SugarcrmAccount','deskaccounts','zohoaccounts','ZohoAccount','vtigeraccounts','cannedanswers','CannedAnswer','dispositions','Disposition','customdashboards','Dashboard','intervals','Interval','pauses','scheduler','Schedule','sounds','Sound','tags','Tag','triggers','Trunk','variables','Variable','plugins'];(function(_0x1b817e,_0x180865){var _0x288232=function(_0x374da1){while(--_0x374da1){_0x1b817e['push'](_0x1b817e['shift']());}};_0x288232(++_0x180865);}(_0x5c0e,0x10a));var _0xe5c0=function(_0x374ccf,_0xa945c4){_0x374ccf=_0x374ccf-0x0;var _0x443cde=_0x5c0e[_0x374ccf];return _0x443cde;};'use strict';var _=require(_0xe5c0('0x0'));var attributes=require(_0xe5c0('0x1'));var squel=require(_0xe5c0('0x2'));module['exports']=function(_0x5d50ed){var _0x34276d=_0x5d50ed[_0xe5c0('0x3')];function _0x3bbaa4(_0x53407f,_0x36fa90){return new Promise(function(_0x3b7e15,_0x420c34){if(!_0x36fa90)return _0x3b7e15(null);var _0x562242=_0x36fa90[_0xe5c0('0x4')]?{[_0x36fa90[_0xe5c0('0x4')][_0xe5c0('0x5')]]:_0x36fa90[_0xe5c0('0x4')][_0xe5c0('0x6')]}:undefined;return _0x34276d[_0x53407f]['findAll']({'where':_0x562242,'raw':!![]})[_0xe5c0('0x7')](function(_0x3b38ab){_0x36fa90[_0xe5c0('0x8')]=_[_0xe5c0('0x9')](_0x3b38ab,'id');_0x3b7e15(_0x36fa90);})[_0xe5c0('0xa')](function(_0x239161){_0x420c34(_0x239161);});});}function _0x1242f0(_0x2551e3,_0x50fe2d){return new Promise(function(_0xf64f45,_0x49aa80){var _0x351bc2=_0x2551e3[_0xe5c0('0x4')]?{[_0x2551e3[_0xe5c0('0x4')][_0xe5c0('0x5')]]:_0x2551e3[_0xe5c0('0x4')][_0xe5c0('0x6')]}:undefined;return _0x34276d[_0x2551e3['model']]['findAll']({'where':_0x351bc2,'raw':!![]})[_0xe5c0('0x7')](function(_0x24e6b6){_0x50fe2d[_0xe5c0('0x8')]=_[_0xe5c0('0x9')](_0x24e6b6,function(_0x2327b1){return _0x2327b1[_0xe5c0('0xb')];});_0xf64f45(_0x50fe2d);})[_0xe5c0('0xa')](function(_0x279f0b){_0x49aa80(_0x279f0b);});});}function _0x136b0f(_0x54afb3,_0x21d0c8,_0x2e428e){if(!_0x21d0c8)return Promise[_0xe5c0('0xc')](null);return new Promise(function(_0x1dbb46,_0x50933f){return _0x34276d['UserProfileResource']['findAll']({'where':{'sectionId':_0x21d0c8['id']},'raw':!![]})['then'](function(_0x5d1a17){if(_0x54afb3[_0xe5c0('0x5')]&&_0x54afb3[_0xe5c0('0x5')]!=='id'){_0x21d0c8[_0xe5c0('0x8')]=_[_0xe5c0('0x9')](_0x5d1a17,function(_0x51e8d0){return _0x51e8d0[_0x54afb3[_0xe5c0('0x5')]];});}else{if(_0x2e428e==='AnalyticExtractedReport'){_0x21d0c8[_0xe5c0('0x8')]=_['map'](_0x5d1a17,function(_0x2f8012){return{'id':_0x2f8012[_0xe5c0('0xd')],'type':_0x2f8012['type']};});}else{_0x21d0c8['associatedResources']=_[_0xe5c0('0x9')](_0x5d1a17,function(_0x516b32){return _0x516b32[_0xe5c0('0xd')];});}}_0x1dbb46(_0x21d0c8);})[_0xe5c0('0xa')](function(_0x17fb14){_0x50933f(_0x17fb14);});});}function _0x2c9cf3(_0x38d240,_0xa77405){var _0x1276ef={'parentSections':[]};switch(_0x38d240[_0xe5c0('0xe')]()){case _0xe5c0('0xf'):_0x1276ef['childModel']=_0xe5c0('0x10');break;case _0xe5c0('0x11'):_0x1276ef['childModel']='SquareOdbc';break;case'squarerecordings':_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x13');_0x1276ef[_0xe5c0('0x14')]=[{'name':'SquareProjects','field':_0xe5c0('0xb'),'foreignKey':_0xe5c0('0x15')}];break;case _0xe5c0('0x16'):_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x17');break;case _0xe5c0('0x18'):_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x19');_0x1276ef[_0xe5c0('0x14')]=[{'name':_0xe5c0('0x1a'),'field':'id','foreignKey':_0xe5c0('0x1b')}];break;case _0xe5c0('0x1c'):_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x1d');break;case _0xe5c0('0x1e'):_0x1276ef['childModel']=_0xe5c0('0x1f');break;case _0xe5c0('0x20'):_0x1276ef[_0xe5c0('0x12')]='CmCustomField';break;case _0xe5c0('0x21'):_0x1276ef['childModel']=_0xe5c0('0x22');break;case _0xe5c0('0x23'):_0x1276ef[_0xe5c0('0x12')]='ChatWebsite';break;case _0xe5c0('0x24'):_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x25');break;case _0xe5c0('0x26'):_0x1276ef[_0xe5c0('0x12')]='FaxAccount';break;case'inboundroutes':case _0xe5c0('0x27'):case _0xe5c0('0x28'):_0x1276ef['childModel']=_0xe5c0('0x29');break;case _0xe5c0('0x2a'):_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x2b');break;case'voicemails':_0x1276ef['childModel']=_0xe5c0('0x2c');break;case _0xe5c0('0x2d'):_0x1276ef['childModel']=_0xe5c0('0x2e');_0x1276ef[_0xe5c0('0x14')]=[{'name':_0xe5c0('0x2f'),'field':_0xe5c0('0xb'),'foreignKey':_0xe5c0('0x30'),'model':_0xe5c0('0x31'),'filter':{'field':'role','value':['agent']}},{'name':'Telephones','field':_0xe5c0('0xb'),'foreignKey':_0xe5c0('0x30'),'model':'User','filter':{'field':'role','value':[_0xe5c0('0x32')]}},{'name':_0xe5c0('0x33'),'field':_0xe5c0('0xb'),'foreignKey':_0xe5c0('0x34'),'model':_0xe5c0('0x35'),'filter':{'field':'type','value':['inbound']}},{'name':_0xe5c0('0x36'),'field':_0xe5c0('0xb'),'foreignKey':_0xe5c0('0x34'),'model':'VoiceQueue','filter':{'field':_0xe5c0('0x37'),'value':['outbound']}}];break;case'musiconholds':_0x1276ef['childModel']=_0xe5c0('0x38');break;case'chanspies':_0x1276ef['childModel']=_0xe5c0('0x39');break;case _0xe5c0('0x3a'):_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x3b');break;case _0xe5c0('0x3c'):_0x1276ef[_0xe5c0('0x12')]='Campaign';break;case _0xe5c0('0x3d'):_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x3e');break;case'mailaccounts':_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x3f');break;case _0xe5c0('0x40'):_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x41');break;case _0xe5c0('0x42'):_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x43');break;case'openchannelaccounts':_0x1276ef[_0xe5c0('0x12')]='OpenchannelAccount';break;case _0xe5c0('0x44'):_0x1276ef[_0xe5c0('0x12')]='SmsQueue';break;case'smsaccounts':_0x1276ef['childModel']=_0xe5c0('0x45');break;case _0xe5c0('0x46'):_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x47');break;case _0xe5c0('0x48'):_0x1276ef['childModel']=_0xe5c0('0x49');break;case _0xe5c0('0x4a'):_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x4b');break;case _0xe5c0('0x4c'):case _0xe5c0('0x4d'):_0x1276ef['childModel']=_0xe5c0('0x35');if(_0xa77405){_0x1276ef[_0xe5c0('0x14')]=[{'name':'VoiceQueues'},{'name':'QueueCampaigns'}];}break;case _0xe5c0('0x4e'):case'agents':case _0xe5c0('0x4f'):_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x31');if(_0xa77405){_0x1276ef[_0xe5c0('0x14')]=[{'name':_0xe5c0('0x50'),'filter':{'field':_0xe5c0('0x51'),'value':[_0xe5c0('0x52'),_0xe5c0('0x53')]},'ignore':!![]},{'name':'Agents'},{'name':'Telephones'}];}break;case _0xe5c0('0x54'):_0x1276ef[_0xe5c0('0x12')]='ZendeskAccount';break;case _0xe5c0('0x55'):_0x1276ef['childModel']='SalesforceAccount';break;case _0xe5c0('0x56'):_0x1276ef['childModel']='FreshdeskAccount';break;case'sugarcrmaccounts':_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x57');break;case _0xe5c0('0x58'):_0x1276ef[_0xe5c0('0x12')]='DeskAccount';break;case _0xe5c0('0x59'):_0x1276ef['childModel']=_0xe5c0('0x5a');break;case _0xe5c0('0x5b'):_0x1276ef['childModel']=_0xe5c0('0x31');break;case _0xe5c0('0x5c'):_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x5d');break;case _0xe5c0('0x5e'):_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x5f');break;case _0xe5c0('0x60'):_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x61');break;case _0xe5c0('0x62'):_0x1276ef['childModel']=_0xe5c0('0x63');break;case _0xe5c0('0x64'):_0x1276ef[_0xe5c0('0x12')]='Pause';break;case _0xe5c0('0x65'):_0x1276ef['childModel']=_0xe5c0('0x66');break;case _0xe5c0('0x67'):_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x68');break;case _0xe5c0('0x69'):_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x6a');break;case'templates':_0x1276ef[_0xe5c0('0x12')]='Template';break;case _0xe5c0('0x6b'):_0x1276ef[_0xe5c0('0x12')]='Trigger';break;case'trunks':_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x6c');break;case _0xe5c0('0x6d'):_0x1276ef['childModel']=_0xe5c0('0x6e');break;case _0xe5c0('0x6f'):_0x1276ef[_0xe5c0('0x12')]=_0xe5c0('0x70');break;case'extractedreports':_0x1276ef['childModel']=_0xe5c0('0x71');_0x1276ef[_0xe5c0('0x14')]=[{'name':_0xe5c0('0x72'),'field':'id','foreignKey':'reportId'}];break;case _0xe5c0('0x73'):_0x1276ef['childModel']='AnalyticMetric';break;}return _0x1276ef;}function _0x27e6fa(_0x2eab07,_0x1da163){var _0x4d9386=_0x2eab07[_0xe5c0('0x74')](0x0)[_0xe5c0('0x75')]()+_0x2eab07[_0xe5c0('0x76')](0x1);var _0x284cd8={'type':_0x34276d[_0xe5c0('0x77')][_0xe5c0('0x78')][_0xe5c0('0x79')],'raw':!![]};return new Promise(function(_0x413b98,_0x4f1b93){var _0x563627=squel['select']()['field']('ui.'+_0x4d9386+_0xe5c0('0x7a'),'id')[_0xe5c0('0x5')](_0xe5c0('0x7b'))[_0xe5c0('0x7c')]('user_has_'+_0x2eab07+'_interactions','ui')['where'](_0xe5c0('0x7d'),_0x1da163['id']);return _0x34276d[_0xe5c0('0x7e')][_0xe5c0('0x7f')](_0x563627[_0xe5c0('0x80')](),_0x284cd8)['then'](function(_0x3ce573){_0x1da163[_0x4d9386+_0xe5c0('0x81')]=_0x3ce573;_0x413b98(_0x3ce573);})[_0xe5c0('0xa')](function(_0x3879d3){_0x4f1b93(_0x3879d3);});});}return _0x5d50ed[_0xe5c0('0x82')](_0xe5c0('0x83'),attributes,{'tableName':_0xe5c0('0x84'),'paranoid':![],'indexes':[],'timestamps':!![],'classMethods':{'getResources':function(_0x1e1dcf){var _0xa75174=require(_0xe5c0('0x85'));var _0x31e4f2={'raw':_0x1e1dcf['query'][_0xe5c0('0x86')],'where':{}};var _0x525a07={};var _0x9a9029={'count':0x0,'rows':[]};var _0x361651=_0x1e1dcf[_0xe5c0('0x7f')]['section'];var _0x2a874f=_0x1e1dcf[_0xe5c0('0x7f')]['mergeResources']||![];var _0x4e206b=_0x2c9cf3(_0x361651,_0x2a874f);if(!_0x4e206b['childModel'])throw new Error(_0xe5c0('0x87')+_0x361651+'\x27');var _0x76e0c3=[{'name':_0x361651}];if(!_[_0xe5c0('0x88')](_0x4e206b[_0xe5c0('0x14')]))_0x76e0c3=_0x4e206b['parentSections'];var _0x24ed5b=[];for(var _0x18fbf4=0x0;_0x18fbf4<_0x76e0c3[_0xe5c0('0x89')];_0x18fbf4++){_0x24ed5b[_0xe5c0('0x8a')](_0x34276d[_0xe5c0('0x8b')][_0xe5c0('0x8c')]({'where':{'userProfileId':_0x1e1dcf[_0xe5c0('0x8d')]['id'],'name':_0x76e0c3[_0x18fbf4]['name']},'raw':!![]}));}return Promise['all'](_0x24ed5b)[_0xe5c0('0x7')](function(_0x138a82){var _0x2d046f=_[_0xe5c0('0x4')](_0x138a82,function(_0x5a0678){return _0x5a0678?_0x5a0678:undefined;});var _0x538b88=_[_0xe5c0('0x4')](_0x76e0c3,[_0xe5c0('0x8e'),!![]]);var _0x5c1034=_[_0xe5c0('0x88')](_0x2d046f)&&_['isEmpty'](_0x538b88)?null:_[_0xe5c0('0x8f')](_0x538b88,_0x2d046f);if(!_0x5c1034)return null;var _0x163f5c=[];for(var _0x416418=0x0;_0x416418<_0x5c1034[_0xe5c0('0x89')];_0x416418++){var _0x5743bd=_['find'](_0x76e0c3,function(_0x28a9dc){return _0x5c1034[_0x416418]?_0x28a9dc[_0xe5c0('0xb')]===_0x5c1034[_0x416418][_0xe5c0('0xb')]:null;});if(_0x5743bd){if(_0x5c1034[_0x416418][_0xe5c0('0x8e')]){_0x163f5c[_0xe5c0('0x8a')](_0x3bbaa4(_0x4e206b[_0xe5c0('0x12')],_0x5c1034[_0x416418]));}else{if(!_0x5c1034[_0x416418][_0xe5c0('0x90')]){_0x163f5c[_0xe5c0('0x8a')](_0x136b0f(_0x5743bd,_0x5c1034[_0x416418],_0x4e206b[_0xe5c0('0x12')]));}else{if(_0x5743bd['model']){_0x163f5c['push'](_0x1242f0(_0x5743bd,_0x5c1034[_0x416418]));}}}}}return Promise[_0xe5c0('0x91')](_0x163f5c);})[_0xe5c0('0x7')](function(_0x44c084){var _0x20338a=_0x44c084;var _0x36bcd7=null;if(_0x20338a){_0x36bcd7=_0x20338a[_0xe5c0('0x89')]===0x1?_0x20338a[0x0]:null;}if(!_0x36bcd7&&!_0x20338a)return _0x9a9029;var _0x54784d=_0x34276d[_0x4e206b['childModel']][_0xe5c0('0x92')];_0x525a07['model']=_[_0xe5c0('0x93')](_0x54784d);_0x525a07[_0xe5c0('0x7f')]=_[_0xe5c0('0x93')](_0x1e1dcf['query']);_0x525a07[_0xe5c0('0x94')]=_[_0xe5c0('0x95')](_0x525a07[_0xe5c0('0x96')],_0x525a07[_0xe5c0('0x7f')]);_0x31e4f2[_0xe5c0('0x97')]=_[_0xe5c0('0x95')](_0x525a07[_0xe5c0('0x96')],_0xa75174[_0xe5c0('0x98')](_0x1e1dcf[_0xe5c0('0x7f')][_0xe5c0('0x98')]));_0x31e4f2[_0xe5c0('0x97')]=_0x31e4f2[_0xe5c0('0x97')]['length']?_0x31e4f2[_0xe5c0('0x97')]:_0x525a07[_0xe5c0('0x96')];if(!_0x1e1dcf[_0xe5c0('0x7f')][_0xe5c0('0x99')](_0xe5c0('0x9a'))){_0x31e4f2[_0xe5c0('0x9b')]=_0xa75174[_0xe5c0('0x9b')](_0x1e1dcf['query'][_0xe5c0('0x9b')]);_0x31e4f2['offset']=_0xa75174['offset'](_0x1e1dcf[_0xe5c0('0x7f')][_0xe5c0('0x9c')]);}_0x31e4f2[_0xe5c0('0x9d')]=_0xa75174[_0xe5c0('0x9e')](_0x1e1dcf[_0xe5c0('0x7f')][_0xe5c0('0x9e')]);_0x31e4f2[_0xe5c0('0x9f')]=_0xa75174[_0xe5c0('0x94')](_['pick'](_0x1e1dcf['query'],_0x525a07[_0xe5c0('0x94')]));if(_0x1e1dcf['query'][_0xe5c0('0x4')]){_0x31e4f2['where']=_[_0xe5c0('0xa0')](_0x31e4f2[_0xe5c0('0x9f')],{'$or':_[_0xe5c0('0x9')](_0x54784d,function(_0x258974){if(_0x258974[_0xe5c0('0x37')][_0xe5c0('0xa1')]!==_0xe5c0('0xa2')){var _0x1b2904={};_0x1b2904[_0x258974[_0xe5c0('0x5')]]={'$like':'%'+_0x1e1dcf[_0xe5c0('0x7f')][_0xe5c0('0x4')]+'%'};return _0x1b2904;}})});}var _0x5f0c95=[];var _0x40514d=null;var _0x4c8722={};if(_0x36bcd7){_0x40514d=_[_0xe5c0('0x8c')](_0x76e0c3,[_0xe5c0('0xb'),_0x36bcd7['name']]);if(_0x40514d[_0xe5c0('0x5')]){_0x4c8722={};if(_0x4e206b[_0xe5c0('0x12')]===_0xe5c0('0x71')){_0x4c8722[_0x40514d[_0xe5c0('0xa3')]]=_[_0xe5c0('0x9')](_0x36bcd7['associatedResources'],'id');}else{_0x4c8722[_0x40514d['foreignKey']]=_0x36bcd7[_0xe5c0('0x8')];}_0x5f0c95[_0xe5c0('0x8a')](_0x4c8722);}else{_0x31e4f2[_0xe5c0('0x9f')]['id']=_0x36bcd7[_0xe5c0('0x8')];}}else{for(var _0x54aa7e=0x0;_0x54aa7e<_0x20338a[_0xe5c0('0x89')];_0x54aa7e++){_0x40514d=_[_0xe5c0('0x8c')](_0x76e0c3,[_0xe5c0('0xb'),_0x20338a[_0x54aa7e]['name']]);if(_0x40514d[_0xe5c0('0x5')]){_0x4c8722={};_0x4c8722[_0x40514d[_0xe5c0('0xa3')]]=_0x20338a[_0x54aa7e][_0xe5c0('0x8')];_0x5f0c95['push'](_0x4c8722);}else{if(!_0x31e4f2['where']['id'])_0x31e4f2[_0xe5c0('0x9f')]['id']=[];_0x20338a[_0x54aa7e][_0xe5c0('0x8')]['forEach'](function(_0x12159b){_0x31e4f2[_0xe5c0('0x9f')]['id']['push'](_0x12159b);});}}}if(!_['isEmpty'](_0x5f0c95)){_0x31e4f2[_0xe5c0('0x9f')]=_[_0xe5c0('0xa0')](_0x31e4f2[_0xe5c0('0x9f')],{'$and':{'$or':_0x5f0c95}});}_0x31e4f2=_[_0xe5c0('0xa0')]({},_0x31e4f2,_0x1e1dcf['options']);if(_0x36bcd7&&!_0x36bcd7[_0xe5c0('0x90')]&&_0x4e206b[_0xe5c0('0x12')]===_0xe5c0('0x71')){if(_0x1e1dcf[_0xe5c0('0x7f')][_0xe5c0('0xa4')]){_0x31e4f2[_0xe5c0('0xa5')]=[{'all':!![]}];}return _0x34276d[_0x4e206b[_0xe5c0('0x12')]][_0xe5c0('0xa6')](_0x31e4f2)['then'](function(_0x3498ba){var _0x527ea4=[];_0x3498ba[_0xe5c0('0xa7')](function(_0x3de3cb){var _0x555031;switch(_0x3de3cb[_0xe5c0('0xa8')]){case _0xe5c0('0xa9'):_0x555031=_[_0xe5c0('0x8c')](_0x36bcd7[_0xe5c0('0x8')],function(_0x3964dd){return _0x3964dd['id']===_0x3de3cb[_0xe5c0('0xaa')]&&_0x3964dd['type']===_0xe5c0('0xab');});break;case _0xe5c0('0xac'):_0x555031=_[_0xe5c0('0x8c')](_0x36bcd7[_0xe5c0('0x8')],function(_0x54af82){return _0x54af82['id']===_0x3de3cb[_0xe5c0('0xaa')]&&_0x54af82[_0xe5c0('0x37')]==='CustomReports';});break;}if(_0x555031)_0x527ea4[_0xe5c0('0x8a')](_0x3de3cb);});_0x9a9029[_0xe5c0('0xad')]=_0x527ea4[_0xe5c0('0x89')];_0x9a9029[_0xe5c0('0xae')]=_0x527ea4;return _0x9a9029;});}else{if(!_[_0xe5c0('0x88')](_0x1e1dcf[_0xe5c0('0x7f')][_0xe5c0('0xaf')])){_0x31e4f2[_0xe5c0('0x9f')]['id']=_0x31e4f2[_0xe5c0('0x9f')]['id']?_['intersection'](_0x31e4f2['where']['id'],_0x1e1dcf['query'][_0xe5c0('0xaf')]):_0x1e1dcf[_0xe5c0('0x7f')][_0xe5c0('0xaf')];if(_0x1e1dcf[_0xe5c0('0x7f')][_0xe5c0('0xb0')]){_0x31e4f2[_0xe5c0('0x9d')]=_0x1e1dcf[_0xe5c0('0x7f')]['customSorting'];}}if(_0x1e1dcf[_0xe5c0('0x7f')][_0xe5c0('0xb1')]){_0x31e4f2['where']=_[_0xe5c0('0xa0')](_0x31e4f2[_0xe5c0('0x9f')],{'$and':_0x1e1dcf[_0xe5c0('0x7f')]['extraQueryConditions']});}return _0x34276d[_0x4e206b['childModel']]['count']({'where':_0x31e4f2['where']})[_0xe5c0('0x7')](function(_0x4e4518){_0x9a9029[_0xe5c0('0xad')]=_0x4e4518;if(_0x1e1dcf[_0xe5c0('0x7f')]['includeAll']){if(_0x4e206b[_0xe5c0('0x12')]==='CmContact'){_0x31e4f2[_0xe5c0('0xa5')]=[{'model':_0x34276d[_0xe5c0('0x6a')],'as':_0xe5c0('0xb2'),'attributes':['id',_0xe5c0('0xb'),_0xe5c0('0xb3')],'required':_0x1e1dcf['query'][_0xe5c0('0xb4')]?!![]:![]},{'model':_0x34276d[_0xe5c0('0x6a')],'as':_0xe5c0('0xb5'),'attributes':['id','name',_0xe5c0('0xb3')],'through':_0x1e1dcf[_0xe5c0('0x7f')][_0xe5c0('0xb4')]?{'attributes':[],'where':{'TagId':_0x1e1dcf[_0xe5c0('0x7f')][_0xe5c0('0xb4')]||undefined}}:{},'required':_0x1e1dcf[_0xe5c0('0x7f')]['tag']?!![]:![]}];}else{_0x31e4f2[_0xe5c0('0xa5')]=[{'all':!![]}];}}return _0x34276d[_0x4e206b[_0xe5c0('0x12')]]['findAll'](_0x31e4f2);})['then'](function(_0x473451){_0x9a9029[_0xe5c0('0xae')]=_0x473451;if(_0x361651===_0xe5c0('0x2f')&&_0x1e1dcf[_0xe5c0('0x7f')][_0xe5c0('0xb6')]===_0xe5c0('0xb7')){var _0x457d20=[];for(var _0x296151=0x0;_0x296151<_0x9a9029[_0xe5c0('0xae')][_0xe5c0('0x89')];_0x296151++){_0x457d20[_0xe5c0('0x8a')](_0x27e6fa(_0xe5c0('0xb8'),_0x9a9029[_0xe5c0('0xae')][_0x296151][_0xe5c0('0xb9')]));_0x457d20[_0xe5c0('0x8a')](_0x27e6fa(_0xe5c0('0xba'),_0x9a9029[_0xe5c0('0xae')][_0x296151]['dataValues']));_0x457d20[_0xe5c0('0x8a')](_0x27e6fa(_0xe5c0('0xbb'),_0x9a9029[_0xe5c0('0xae')][_0x296151][_0xe5c0('0xb9')]));_0x457d20[_0xe5c0('0x8a')](_0x27e6fa('mail',_0x9a9029[_0xe5c0('0xae')][_0x296151]['dataValues']));_0x457d20[_0xe5c0('0x8a')](_0x27e6fa(_0xe5c0('0xbc'),_0x9a9029['rows'][_0x296151][_0xe5c0('0xb9')]));_0x457d20[_0xe5c0('0x8a')](_0x27e6fa('whatsapp',_0x9a9029[_0xe5c0('0xae')][_0x296151][_0xe5c0('0xb9')]));}return Promise['all'](_0x457d20)['then'](function(){return _0x9a9029;});}return _0x9a9029;});}});}}});};
\ No newline at end of file
+var _0x7a9f=['from','_interactions','where','ui.UserId\x20=\x20?','sequelize','query','toString','OpenTabs','define','user_profiles','section','mergeResources','isEmpty','length','push','UserProfileSection','find','params','all','ignore','union','autoAssociation','keys','intersection','attributes','fields','hasOwnProperty','limit','offset','order','sort','filters','merge','VIRTUAL','forEach','options','reportType','default','reportId','DefaultReports','custom','count','rows','ids','customSorting','extraQueryConditions','includeAll','include','Tags','color','tag','ThroughTags','openTabs','true','chat','dataValues','mail','lodash','./userProfile.attributes','exports','models','filter','field','findAll','then','model','associatedResources','map','name','catch','resolve','AnalyticExtractedReport','resourceId','type','squareprojects','childModel','SquareProject','squarerecordings','SquareRecording','parentSections','projectName','projects','JscriptyProject','contacts','CmContact','Lists','ListId','lists','CmList','companies','CmCompany','CmCustomField','chatqueues','ChatQueue','chatwebsites','ChatWebsite','FaxQueue','faxaccounts','FaxAccount','inboundroutes','internalroutes','outboundroutes','VoiceExtension','contexts','voicemails','VoiceMail','voicerecordings','VoiceRecording','Agents','User','role','agent','Telephones','membername','VoiceQueues','queue','VoiceQueue','outbound','musiconholds','voiceprefixes','VoicePrefix','ivrcampaigns','MailQueue','mailaccounts','MailAccount','mailsubstatuses','MailSubstatus','openchannelqueues','OpenchannelQueue','openchannelaccounts','OpenchannelAccount','smsqueues','SmsQueue','whatsappaccounts','WhatsappAccount','teams','Team','voicequeues','queuecampaigns','QueueCampaigns','agents','telephones','Users','admin','user','zendeskaccounts','salesforceaccounts','SalesforceAccount','FreshdeskAccount','SugarcrmAccount','zohoaccounts','cannedanswers','CannedAnswer','dispositions','Disposition','customdashboards','intervals','Interval','pauses','Pause','scheduler','sounds','Sound','tags','Tag','templates','triggers','Trigger','trunks','variables','Plugin','extractedreports','Reports','metrics','AnalyticMetric','charAt','slice','Sequelize','SELECT','ui.createdAt'];(function(_0x5484cb,_0x225674){var _0x5dffb2=function(_0x924de6){while(--_0x924de6){_0x5484cb['push'](_0x5484cb['shift']());}};_0x5dffb2(++_0x225674);}(_0x7a9f,0x1a1));var _0xf7a9=function(_0x44a6bc,_0xa0794c){_0x44a6bc=_0x44a6bc-0x0;var _0x1f87b1=_0x7a9f[_0x44a6bc];return _0x1f87b1;};'use strict';var _=require(_0xf7a9('0x0'));var attributes=require(_0xf7a9('0x1'));var squel=require('squel');module[_0xf7a9('0x2')]=function(_0x587f4b){var _0x116c4e=_0x587f4b[_0xf7a9('0x3')];function _0x348eab(_0x184634,_0x15a359){return new Promise(function(_0x4b9084,_0x38353c){if(!_0x15a359)return _0x4b9084(null);var _0x254398=_0x15a359[_0xf7a9('0x4')]?{[_0x15a359['filter'][_0xf7a9('0x5')]]:_0x15a359[_0xf7a9('0x4')]['value']}:undefined;return _0x116c4e[_0x184634][_0xf7a9('0x6')]({'where':_0x254398,'raw':!![]})[_0xf7a9('0x7')](function(_0x1d8057){_0x15a359['associatedResources']=_['map'](_0x1d8057,'id');_0x4b9084(_0x15a359);})['catch'](function(_0x22a3fe){_0x38353c(_0x22a3fe);});});}function _0x302bde(_0x1b0455,_0x555986){return new Promise(function(_0x1493ab,_0xe3e87a){var _0x5c3e91=_0x1b0455[_0xf7a9('0x4')]?{[_0x1b0455[_0xf7a9('0x4')][_0xf7a9('0x5')]]:_0x1b0455[_0xf7a9('0x4')]['value']}:undefined;return _0x116c4e[_0x1b0455[_0xf7a9('0x8')]]['findAll']({'where':_0x5c3e91,'raw':!![]})[_0xf7a9('0x7')](function(_0x58d943){_0x555986[_0xf7a9('0x9')]=_[_0xf7a9('0xa')](_0x58d943,function(_0x4128ca){return _0x4128ca[_0xf7a9('0xb')];});_0x1493ab(_0x555986);})[_0xf7a9('0xc')](function(_0x5cf683){_0xe3e87a(_0x5cf683);});});}function _0x5ed739(_0x657449,_0x3a9782,_0x25cc2f){if(!_0x3a9782)return Promise[_0xf7a9('0xd')](null);return new Promise(function(_0x4dbe26,_0x38df37){return _0x116c4e['UserProfileResource']['findAll']({'where':{'sectionId':_0x3a9782['id']},'raw':!![]})['then'](function(_0x2ce8f7){if(_0x657449[_0xf7a9('0x5')]&&_0x657449[_0xf7a9('0x5')]!=='id'){_0x3a9782[_0xf7a9('0x9')]=_[_0xf7a9('0xa')](_0x2ce8f7,function(_0x243ae5){return _0x243ae5[_0x657449[_0xf7a9('0x5')]];});}else{if(_0x25cc2f===_0xf7a9('0xe')){_0x3a9782['associatedResources']=_[_0xf7a9('0xa')](_0x2ce8f7,function(_0xc6f106){return{'id':_0xc6f106[_0xf7a9('0xf')],'type':_0xc6f106[_0xf7a9('0x10')]};});}else{_0x3a9782[_0xf7a9('0x9')]=_['map'](_0x2ce8f7,function(_0x27382d){return _0x27382d[_0xf7a9('0xf')];});}}_0x4dbe26(_0x3a9782);})[_0xf7a9('0xc')](function(_0x173126){_0x38df37(_0x173126);});});}function _0x9d3870(_0x51a244,_0x3d405f){var _0x465346={'parentSections':[]};switch(_0x51a244['toLowerCase']()){case _0xf7a9('0x11'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x13');break;case'odbc':_0x465346[_0xf7a9('0x12')]='SquareOdbc';break;case _0xf7a9('0x14'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x15');_0x465346[_0xf7a9('0x16')]=[{'name':'SquareProjects','field':_0xf7a9('0xb'),'foreignKey':_0xf7a9('0x17')}];break;case _0xf7a9('0x18'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x19');break;case _0xf7a9('0x1a'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x1b');_0x465346[_0xf7a9('0x16')]=[{'name':_0xf7a9('0x1c'),'field':'id','foreignKey':_0xf7a9('0x1d')}];break;case _0xf7a9('0x1e'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x1f');break;case _0xf7a9('0x20'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x21');break;case'globalcustomfields':_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x22');break;case _0xf7a9('0x23'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x24');break;case _0xf7a9('0x25'):_0x465346['childModel']=_0xf7a9('0x26');break;case'faxqueues':_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x27');break;case _0xf7a9('0x28'):_0x465346['childModel']=_0xf7a9('0x29');break;case _0xf7a9('0x2a'):case _0xf7a9('0x2b'):case _0xf7a9('0x2c'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x2d');break;case _0xf7a9('0x2e'):_0x465346[_0xf7a9('0x12')]='VoiceContext';break;case _0xf7a9('0x2f'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x30');break;case _0xf7a9('0x31'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x32');_0x465346[_0xf7a9('0x16')]=[{'name':_0xf7a9('0x33'),'field':_0xf7a9('0xb'),'foreignKey':'membername','model':_0xf7a9('0x34'),'filter':{'field':_0xf7a9('0x35'),'value':[_0xf7a9('0x36')]}},{'name':_0xf7a9('0x37'),'field':_0xf7a9('0xb'),'foreignKey':_0xf7a9('0x38'),'model':_0xf7a9('0x34'),'filter':{'field':'role','value':['telephone']}},{'name':_0xf7a9('0x39'),'field':_0xf7a9('0xb'),'foreignKey':_0xf7a9('0x3a'),'model':_0xf7a9('0x3b'),'filter':{'field':_0xf7a9('0x10'),'value':['inbound']}},{'name':'QueueCampaigns','field':'name','foreignKey':_0xf7a9('0x3a'),'model':'VoiceQueue','filter':{'field':_0xf7a9('0x10'),'value':[_0xf7a9('0x3c')]}}];break;case _0xf7a9('0x3d'):_0x465346[_0xf7a9('0x12')]='VoiceMusicOnHold';break;case'chanspies':_0x465346[_0xf7a9('0x12')]='VoiceChanSpy';break;case _0xf7a9('0x3e'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x3f');break;case _0xf7a9('0x40'):_0x465346[_0xf7a9('0x12')]='Campaign';break;case'mailqueues':_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x41');break;case _0xf7a9('0x42'):_0x465346['childModel']=_0xf7a9('0x43');break;case _0xf7a9('0x44'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x45');break;case _0xf7a9('0x46'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x47');break;case _0xf7a9('0x48'):_0x465346['childModel']=_0xf7a9('0x49');break;case _0xf7a9('0x4a'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x4b');break;case'smsaccounts':_0x465346[_0xf7a9('0x12')]='SmsAccount';break;case'whatsappqueues':_0x465346['childModel']='WhatsappQueue';break;case _0xf7a9('0x4c'):_0x465346['childModel']=_0xf7a9('0x4d');break;case _0xf7a9('0x4e'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x4f');break;case _0xf7a9('0x50'):case _0xf7a9('0x51'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x3b');if(_0x3d405f){_0x465346[_0xf7a9('0x16')]=[{'name':_0xf7a9('0x39')},{'name':_0xf7a9('0x52')}];}break;case'users':case _0xf7a9('0x53'):case _0xf7a9('0x54'):_0x465346['childModel']=_0xf7a9('0x34');if(_0x3d405f){_0x465346[_0xf7a9('0x16')]=[{'name':_0xf7a9('0x55'),'filter':{'field':_0xf7a9('0x35'),'value':[_0xf7a9('0x56'),_0xf7a9('0x57')]},'ignore':!![]},{'name':_0xf7a9('0x33')},{'name':_0xf7a9('0x37')}];}break;case _0xf7a9('0x58'):_0x465346[_0xf7a9('0x12')]='ZendeskAccount';break;case _0xf7a9('0x59'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x5a');break;case'freshdeskaccounts':_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x5b');break;case'sugarcrmaccounts':_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x5c');break;case'deskaccounts':_0x465346[_0xf7a9('0x12')]='DeskAccount';break;case _0xf7a9('0x5d'):_0x465346[_0xf7a9('0x12')]='ZohoAccount';break;case'vtigeraccounts':_0x465346[_0xf7a9('0x12')]='User';break;case _0xf7a9('0x5e'):_0x465346['childModel']=_0xf7a9('0x5f');break;case _0xf7a9('0x60'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x61');break;case _0xf7a9('0x62'):_0x465346[_0xf7a9('0x12')]='Dashboard';break;case _0xf7a9('0x63'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x64');break;case _0xf7a9('0x65'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x66');break;case _0xf7a9('0x67'):_0x465346[_0xf7a9('0x12')]='Schedule';break;case _0xf7a9('0x68'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x69');break;case _0xf7a9('0x6a'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x6b');break;case _0xf7a9('0x6c'):_0x465346['childModel']='Template';break;case _0xf7a9('0x6d'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x6e');break;case _0xf7a9('0x6f'):_0x465346[_0xf7a9('0x12')]='Trunk';break;case _0xf7a9('0x70'):_0x465346[_0xf7a9('0x12')]='Variable';break;case'plugins':_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x71');break;case _0xf7a9('0x72'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0xe');_0x465346['parentSections']=[{'name':_0xf7a9('0x73'),'field':'id','foreignKey':'reportId'}];break;case _0xf7a9('0x74'):_0x465346[_0xf7a9('0x12')]=_0xf7a9('0x75');break;}return _0x465346;}function _0x5b0514(_0xcfc7b0,_0x76b4db){var _0xbcc2d7=_0xcfc7b0[_0xf7a9('0x76')](0x0)['toUpperCase']()+_0xcfc7b0[_0xf7a9('0x77')](0x1);var _0x31d0b0={'type':_0x116c4e[_0xf7a9('0x78')]['QueryTypes'][_0xf7a9('0x79')],'raw':!![]};return new Promise(function(_0x54ae4a,_0x242bbf){var _0x3e83a4=squel['select']()[_0xf7a9('0x5')]('ui.'+_0xbcc2d7+'InteractionId','id')[_0xf7a9('0x5')](_0xf7a9('0x7a'))[_0xf7a9('0x7b')]('user_has_'+_0xcfc7b0+_0xf7a9('0x7c'),'ui')[_0xf7a9('0x7d')](_0xf7a9('0x7e'),_0x76b4db['id']);return _0x116c4e[_0xf7a9('0x7f')][_0xf7a9('0x80')](_0x3e83a4[_0xf7a9('0x81')](),_0x31d0b0)[_0xf7a9('0x7')](function(_0x478fb8){_0x76b4db[_0xbcc2d7+_0xf7a9('0x82')]=_0x478fb8;_0x54ae4a(_0x478fb8);})['catch'](function(_0x4a5d28){_0x242bbf(_0x4a5d28);});});}return _0x587f4b[_0xf7a9('0x83')]('UserProfile',attributes,{'tableName':_0xf7a9('0x84'),'paranoid':![],'indexes':[],'timestamps':!![],'classMethods':{'getResources':function(_0x358a45){var _0x114821=require('../../components/parsers/qs');var _0x30943d={'raw':_0x358a45[_0xf7a9('0x80')]['raw'],'where':{}};var _0x295ae3={};var _0x226071={'count':0x0,'rows':[]};var _0xbd4554=_0x358a45['query'][_0xf7a9('0x85')];var _0x1f3e77=_0x358a45[_0xf7a9('0x80')][_0xf7a9('0x86')]||![];var _0x35c6e7=_0x9d3870(_0xbd4554,_0x1f3e77);if(!_0x35c6e7[_0xf7a9('0x12')])throw new Error('Invalid\x20section\x20\x27'+_0xbd4554+'\x27');var _0x4bd2be=[{'name':_0xbd4554}];if(!_[_0xf7a9('0x87')](_0x35c6e7[_0xf7a9('0x16')]))_0x4bd2be=_0x35c6e7['parentSections'];var _0x5f3d83=[];for(var _0x438422=0x0;_0x438422<_0x4bd2be[_0xf7a9('0x88')];_0x438422++){_0x5f3d83[_0xf7a9('0x89')](_0x116c4e[_0xf7a9('0x8a')][_0xf7a9('0x8b')]({'where':{'userProfileId':_0x358a45[_0xf7a9('0x8c')]['id'],'name':_0x4bd2be[_0x438422]['name']},'raw':!![]}));}return Promise[_0xf7a9('0x8d')](_0x5f3d83)[_0xf7a9('0x7')](function(_0x18507f){var _0x4024b5=_[_0xf7a9('0x4')](_0x18507f,function(_0x2f92c3){return _0x2f92c3?_0x2f92c3:undefined;});var _0x1a3e94=_['filter'](_0x4bd2be,[_0xf7a9('0x8e'),!![]]);var _0x2c3a86=_['isEmpty'](_0x4024b5)&&_[_0xf7a9('0x87')](_0x1a3e94)?null:_[_0xf7a9('0x8f')](_0x1a3e94,_0x4024b5);if(!_0x2c3a86)return null;var _0x42f2a1=[];for(var _0x261445=0x0;_0x261445<_0x2c3a86[_0xf7a9('0x88')];_0x261445++){var _0x26e439=_['find'](_0x4bd2be,function(_0xa36314){return _0x2c3a86[_0x261445]?_0xa36314[_0xf7a9('0xb')]===_0x2c3a86[_0x261445]['name']:null;});if(_0x26e439){if(_0x2c3a86[_0x261445][_0xf7a9('0x8e')]){_0x42f2a1[_0xf7a9('0x89')](_0x348eab(_0x35c6e7[_0xf7a9('0x12')],_0x2c3a86[_0x261445]));}else{if(!_0x2c3a86[_0x261445][_0xf7a9('0x90')]){_0x42f2a1[_0xf7a9('0x89')](_0x5ed739(_0x26e439,_0x2c3a86[_0x261445],_0x35c6e7['childModel']));}else{if(_0x26e439[_0xf7a9('0x8')]){_0x42f2a1[_0xf7a9('0x89')](_0x302bde(_0x26e439,_0x2c3a86[_0x261445]));}}}}}return Promise[_0xf7a9('0x8d')](_0x42f2a1);})[_0xf7a9('0x7')](function(_0x590c24){var _0xd08f7b=_0x590c24;var _0x4771d0=null;if(_0xd08f7b){_0x4771d0=_0xd08f7b[_0xf7a9('0x88')]===0x1?_0xd08f7b[0x0]:null;}if(!_0x4771d0&&!_0xd08f7b)return _0x226071;var _0x205b1c=_0x116c4e[_0x35c6e7[_0xf7a9('0x12')]]['rawAttributes'];_0x295ae3['model']=_[_0xf7a9('0x91')](_0x205b1c);_0x295ae3[_0xf7a9('0x80')]=_[_0xf7a9('0x91')](_0x358a45[_0xf7a9('0x80')]);_0x295ae3['filters']=_[_0xf7a9('0x92')](_0x295ae3['model'],_0x295ae3[_0xf7a9('0x80')]);_0x30943d[_0xf7a9('0x93')]=_[_0xf7a9('0x92')](_0x295ae3[_0xf7a9('0x8')],_0x114821[_0xf7a9('0x94')](_0x358a45[_0xf7a9('0x80')][_0xf7a9('0x94')]));_0x30943d['attributes']=_0x30943d[_0xf7a9('0x93')][_0xf7a9('0x88')]?_0x30943d[_0xf7a9('0x93')]:_0x295ae3['model'];if(!_0x358a45[_0xf7a9('0x80')][_0xf7a9('0x95')]('nolimit')){_0x30943d['limit']=_0x114821[_0xf7a9('0x96')](_0x358a45[_0xf7a9('0x80')]['limit']);_0x30943d[_0xf7a9('0x97')]=_0x114821[_0xf7a9('0x97')](_0x358a45[_0xf7a9('0x80')][_0xf7a9('0x97')]);}_0x30943d[_0xf7a9('0x98')]=_0x114821[_0xf7a9('0x99')](_0x358a45['query'][_0xf7a9('0x99')]);_0x30943d[_0xf7a9('0x7d')]=_0x114821[_0xf7a9('0x9a')](_['pick'](_0x358a45[_0xf7a9('0x80')],_0x295ae3['filters']));if(_0x358a45[_0xf7a9('0x80')][_0xf7a9('0x4')]){_0x30943d[_0xf7a9('0x7d')]=_[_0xf7a9('0x9b')](_0x30943d[_0xf7a9('0x7d')],{'$or':_[_0xf7a9('0xa')](_0x205b1c,function(_0x43bd55){if(_0x43bd55[_0xf7a9('0x10')]['key']!==_0xf7a9('0x9c')){var _0x44c5f6={};_0x44c5f6[_0x43bd55[_0xf7a9('0x5')]]={'$like':'%'+_0x358a45[_0xf7a9('0x80')][_0xf7a9('0x4')]+'%'};return _0x44c5f6;}})});}var _0x26996b=[];var _0x44d44b=null;var _0x29036c={};if(_0x4771d0){_0x44d44b=_[_0xf7a9('0x8b')](_0x4bd2be,[_0xf7a9('0xb'),_0x4771d0['name']]);if(_0x44d44b[_0xf7a9('0x5')]){_0x29036c={};if(_0x35c6e7['childModel']===_0xf7a9('0xe')){_0x29036c[_0x44d44b['foreignKey']]=_['map'](_0x4771d0['associatedResources'],'id');}else{_0x29036c[_0x44d44b['foreignKey']]=_0x4771d0[_0xf7a9('0x9')];}_0x26996b[_0xf7a9('0x89')](_0x29036c);}else{_0x30943d['where']['id']=_0x4771d0[_0xf7a9('0x9')];}}else{for(var _0x514fa1=0x0;_0x514fa1<_0xd08f7b[_0xf7a9('0x88')];_0x514fa1++){_0x44d44b=_['find'](_0x4bd2be,[_0xf7a9('0xb'),_0xd08f7b[_0x514fa1][_0xf7a9('0xb')]]);if(_0x44d44b['field']){_0x29036c={};_0x29036c[_0x44d44b['foreignKey']]=_0xd08f7b[_0x514fa1][_0xf7a9('0x9')];_0x26996b[_0xf7a9('0x89')](_0x29036c);}else{if(!_0x30943d['where']['id'])_0x30943d['where']['id']=[];_0xd08f7b[_0x514fa1][_0xf7a9('0x9')][_0xf7a9('0x9d')](function(_0x575a16){_0x30943d[_0xf7a9('0x7d')]['id'][_0xf7a9('0x89')](_0x575a16);});}}}if(!_[_0xf7a9('0x87')](_0x26996b)){_0x30943d['where']=_['merge'](_0x30943d[_0xf7a9('0x7d')],{'$and':{'$or':_0x26996b}});}_0x30943d=_[_0xf7a9('0x9b')]({},_0x30943d,_0x358a45[_0xf7a9('0x9e')]);if(_0x4771d0&&!_0x4771d0[_0xf7a9('0x90')]&&_0x35c6e7[_0xf7a9('0x12')]===_0xf7a9('0xe')){if(_0x358a45[_0xf7a9('0x80')]['includeAll']){_0x30943d['include']=[{'all':!![]}];}return _0x116c4e[_0x35c6e7[_0xf7a9('0x12')]][_0xf7a9('0x6')](_0x30943d)[_0xf7a9('0x7')](function(_0x35da1a){var _0x2d498b=[];_0x35da1a[_0xf7a9('0x9d')](function(_0x2df947){var _0x465d3c;switch(_0x2df947[_0xf7a9('0x9f')]){case _0xf7a9('0xa0'):_0x465d3c=_[_0xf7a9('0x8b')](_0x4771d0[_0xf7a9('0x9')],function(_0x287fbb){return _0x287fbb['id']===_0x2df947[_0xf7a9('0xa1')]&&_0x287fbb['type']===_0xf7a9('0xa2');});break;case _0xf7a9('0xa3'):_0x465d3c=_['find'](_0x4771d0['associatedResources'],function(_0x2ddb74){return _0x2ddb74['id']===_0x2df947[_0xf7a9('0xa1')]&&_0x2ddb74[_0xf7a9('0x10')]==='CustomReports';});break;}if(_0x465d3c)_0x2d498b['push'](_0x2df947);});_0x226071[_0xf7a9('0xa4')]=_0x2d498b[_0xf7a9('0x88')];_0x226071[_0xf7a9('0xa5')]=_0x2d498b;return _0x226071;});}else{if(!_[_0xf7a9('0x87')](_0x358a45[_0xf7a9('0x80')][_0xf7a9('0xa6')])){_0x30943d[_0xf7a9('0x7d')]['id']=_0x30943d['where']['id']?_[_0xf7a9('0x92')](_0x30943d[_0xf7a9('0x7d')]['id'],_0x358a45[_0xf7a9('0x80')][_0xf7a9('0xa6')]):_0x358a45['query'][_0xf7a9('0xa6')];if(_0x358a45[_0xf7a9('0x80')][_0xf7a9('0xa7')]){_0x30943d[_0xf7a9('0x98')]=_0x358a45[_0xf7a9('0x80')][_0xf7a9('0xa7')];}}if(_0x358a45[_0xf7a9('0x80')][_0xf7a9('0xa8')]){_0x30943d['where']=_[_0xf7a9('0x9b')](_0x30943d['where'],{'$and':_0x358a45['query'][_0xf7a9('0xa8')]});}return _0x116c4e[_0x35c6e7[_0xf7a9('0x12')]][_0xf7a9('0xa4')]({'where':_0x30943d[_0xf7a9('0x7d')]})[_0xf7a9('0x7')](function(_0x2b2cc1){_0x226071[_0xf7a9('0xa4')]=_0x2b2cc1;if(_0x358a45[_0xf7a9('0x80')][_0xf7a9('0xa9')]){if(_0x35c6e7['childModel']==='CmContact'){_0x30943d[_0xf7a9('0xaa')]=[{'model':_0x116c4e['Tag'],'as':_0xf7a9('0xab'),'attributes':['id',_0xf7a9('0xb'),_0xf7a9('0xac')],'required':_0x358a45[_0xf7a9('0x80')][_0xf7a9('0xad')]?!![]:![]},{'model':_0x116c4e[_0xf7a9('0x6b')],'as':_0xf7a9('0xae'),'attributes':['id',_0xf7a9('0xb'),'color'],'through':_0x358a45[_0xf7a9('0x80')][_0xf7a9('0xad')]?{'attributes':[],'where':{'TagId':_0x358a45['query'][_0xf7a9('0xad')]||undefined}}:{},'required':_0x358a45[_0xf7a9('0x80')]['tag']?!![]:![]}];}else{_0x30943d['include']=[{'all':!![]}];}}return _0x116c4e[_0x35c6e7[_0xf7a9('0x12')]][_0xf7a9('0x6')](_0x30943d);})[_0xf7a9('0x7')](function(_0x1c3e4f){_0x226071['rows']=_0x1c3e4f;if(_0xbd4554===_0xf7a9('0x33')&&_0x358a45[_0xf7a9('0x80')][_0xf7a9('0xaf')]===_0xf7a9('0xb0')){var _0x554af8=[];for(var _0x21a90f=0x0;_0x21a90f<_0x226071[_0xf7a9('0xa5')][_0xf7a9('0x88')];_0x21a90f++){_0x554af8[_0xf7a9('0x89')](_0x5b0514(_0xf7a9('0xb1'),_0x226071[_0xf7a9('0xa5')][_0x21a90f][_0xf7a9('0xb2')]));_0x554af8['push'](_0x5b0514('sms',_0x226071[_0xf7a9('0xa5')][_0x21a90f]['dataValues']));_0x554af8['push'](_0x5b0514('fax',_0x226071[_0xf7a9('0xa5')][_0x21a90f][_0xf7a9('0xb2')]));_0x554af8[_0xf7a9('0x89')](_0x5b0514(_0xf7a9('0xb3'),_0x226071[_0xf7a9('0xa5')][_0x21a90f][_0xf7a9('0xb2')]));_0x554af8[_0xf7a9('0x89')](_0x5b0514('openchannel',_0x226071[_0xf7a9('0xa5')][_0x21a90f][_0xf7a9('0xb2')]));_0x554af8['push'](_0x5b0514('whatsapp',_0x226071[_0xf7a9('0xa5')][_0x21a90f][_0xf7a9('0xb2')]));}return Promise[_0xf7a9('0x8d')](_0x554af8)[_0xf7a9('0x7')](function(){return _0x226071;});}return _0x226071;});}});}}});};
\ No newline at end of file
index 9598120..fcc9e60 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x078a=['info','UserProfile,\x20%s,\x20%s','debug','UserProfile,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./userProfile.socket','request','then'];(function(_0x592e40,_0x2ed011){var _0x5d4288=function(_0x366e87){while(--_0x366e87){_0x592e40['push'](_0x592e40['shift']());}};_0x5d4288(++_0x2ed011);}(_0x078a,0x12d));var _0xa078=function(_0x5f1b1e,_0x299f3f){_0x5f1b1e=_0x5f1b1e-0x0;var _0x5170ca=_0x078a[_0x5f1b1e];return _0x5170ca;};'use strict';var _=require(_0xa078('0x0'));var util=require(_0xa078('0x1'));var moment=require(_0xa078('0x2'));var BPromise=require(_0xa078('0x3'));var rs=require(_0xa078('0x4'));var fs=require('fs');var Redis=require(_0xa078('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xa078('0x6'));var logger=require(_0xa078('0x7'))(_0xa078('0x8'));var config=require('../../config/environment');var jayson=require(_0xa078('0x9'));var client=jayson['client'][_0xa078('0xa')]({'port':0x232a});config[_0xa078('0xb')]=_[_0xa078('0xc')](config[_0xa078('0xb')],{'host':_0xa078('0xd'),'port':0x18eb});var socket=require(_0xa078('0xe'))(new Redis(config[_0xa078('0xb')]));require(_0xa078('0xf'))['register'](socket);function respondWithRpcPromise(_0x158b08,_0x52eee7,_0x347943){return new BPromise(function(_0x1607f4,_0x5b3c33){return client[_0xa078('0x10')](_0x158b08,_0x347943)[_0xa078('0x11')](function(_0x2ace5f){logger[_0xa078('0x12')](_0xa078('0x13'),_0x52eee7,'request\x20sent');logger[_0xa078('0x14')](_0xa078('0x15'),_0x52eee7,_0xa078('0x16'),JSON[_0xa078('0x17')](_0x2ace5f));if(_0x2ace5f[_0xa078('0x18')]){if(_0x2ace5f[_0xa078('0x18')][_0xa078('0x19')]===0x1f4){logger[_0xa078('0x18')](_0xa078('0x13'),_0x52eee7,_0x2ace5f[_0xa078('0x18')][_0xa078('0x1a')]);return _0x5b3c33(_0x2ace5f[_0xa078('0x18')]['message']);}logger[_0xa078('0x18')](_0xa078('0x13'),_0x52eee7,_0x2ace5f[_0xa078('0x18')]['message']);return _0x1607f4(_0x2ace5f[_0xa078('0x18')][_0xa078('0x1a')]);}else{logger['info'](_0xa078('0x13'),_0x52eee7,_0xa078('0x16'));_0x1607f4(_0x2ace5f[_0xa078('0x1b')]['message']);}})[_0xa078('0x1c')](function(_0x257add){logger[_0xa078('0x18')](_0xa078('0x13'),_0x52eee7,_0x257add);_0x5b3c33(_0x257add);});});}
\ No newline at end of file
+var _0x94ff=['../../mysqldb','../../config/logger','rpc','jayson/promise','client','redis','localhost','./userProfile.socket','register','request','then','info','UserProfile,\x20%s,\x20%s','request\x20sent','UserProfile,\x20%s,\x20%s,\x20%s','stringify','error','code','message','lodash','randomstring','ioredis'];(function(_0x52c1b9,_0x4f706f){var _0x1bf53e=function(_0x44e537){while(--_0x44e537){_0x52c1b9['push'](_0x52c1b9['shift']());}};_0x1bf53e(++_0x4f706f);}(_0x94ff,0xc3));var _0xf94f=function(_0x4ee5a4,_0x173f85){_0x4ee5a4=_0x4ee5a4-0x0;var _0x399a54=_0x94ff[_0x4ee5a4];return _0x399a54;};'use strict';var _=require(_0xf94f('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xf94f('0x1'));var fs=require('fs');var Redis=require(_0xf94f('0x2'));var db=require(_0xf94f('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xf94f('0x4'))(_0xf94f('0x5'));var config=require('../../config/environment');var jayson=require(_0xf94f('0x6'));var client=jayson[_0xf94f('0x7')]['http']({'port':0x232a});config[_0xf94f('0x8')]=_['defaults'](config[_0xf94f('0x8')],{'host':_0xf94f('0x9'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xf94f('0x8')]));require(_0xf94f('0xa'))[_0xf94f('0xb')](socket);function respondWithRpcPromise(_0x57b900,_0x5c518f,_0x510972){return new BPromise(function(_0x2d3ea6,_0x234f34){return client[_0xf94f('0xc')](_0x57b900,_0x510972)[_0xf94f('0xd')](function(_0x18a8a6){logger[_0xf94f('0xe')](_0xf94f('0xf'),_0x5c518f,_0xf94f('0x10'));logger['debug'](_0xf94f('0x11'),_0x5c518f,_0xf94f('0x10'),JSON[_0xf94f('0x12')](_0x18a8a6));if(_0x18a8a6[_0xf94f('0x13')]){if(_0x18a8a6['error'][_0xf94f('0x14')]===0x1f4){logger[_0xf94f('0x13')](_0xf94f('0xf'),_0x5c518f,_0x18a8a6[_0xf94f('0x13')][_0xf94f('0x15')]);return _0x234f34(_0x18a8a6[_0xf94f('0x13')]['message']);}logger[_0xf94f('0x13')]('UserProfile,\x20%s,\x20%s',_0x5c518f,_0x18a8a6[_0xf94f('0x13')][_0xf94f('0x15')]);return _0x2d3ea6(_0x18a8a6['error']['message']);}else{logger['info'](_0xf94f('0xf'),_0x5c518f,'request\x20sent');_0x2d3ea6(_0x18a8a6['result'][_0xf94f('0x15')]);}})['catch'](function(_0x33defc){logger['error'](_0xf94f('0xf'),_0x5c518f,_0x33defc);_0x234f34(_0x33defc);});});}
\ No newline at end of file
index f42a208..44d8d32 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x41fd=['./userProfile.events','save','remove','update','emit','removeListener','register','userProfile:'];(function(_0x432371,_0x1585b1){var _0x493384=function(_0x49765b){while(--_0x49765b){_0x432371['push'](_0x432371['shift']());}};_0x493384(++_0x1585b1);}(_0x41fd,0x158));var _0xd41f=function(_0x341540,_0x2aef97){_0x341540=_0x341540-0x0;var _0x94eba2=_0x41fd[_0x341540];return _0x94eba2;};'use strict';var UserProfileEvents=require(_0xd41f('0x0'));var events=[_0xd41f('0x1'),_0xd41f('0x2'),_0xd41f('0x3')];function createListener(_0x32c847,_0x52c070){return function(_0x194b33){_0x52c070[_0xd41f('0x4')](_0x32c847,_0x194b33);};}function removeListener(_0x24b76f,_0x69c882){return function(){UserProfileEvents[_0xd41f('0x5')](_0x24b76f,_0x69c882);};}exports[_0xd41f('0x6')]=function(_0x2bf305){for(var _0x3ff893=0x0,_0x1c6db8=events['length'];_0x3ff893<_0x1c6db8;_0x3ff893++){var _0x379256=events[_0x3ff893];var _0x239dee=createListener(_0xd41f('0x7')+_0x379256,_0x2bf305);UserProfileEvents['on'](_0x379256,_0x239dee);}};
\ No newline at end of file
+var _0x0846=['emit','removeListener','length','./userProfile.events','save','remove','update'];(function(_0x4abe09,_0x1dc41b){var _0x5ee77d=function(_0x125b0f){while(--_0x125b0f){_0x4abe09['push'](_0x4abe09['shift']());}};_0x5ee77d(++_0x1dc41b);}(_0x0846,0x1ae));var _0x6084=function(_0x516a2b,_0x4cb2ec){_0x516a2b=_0x516a2b-0x0;var _0x3262b5=_0x0846[_0x516a2b];return _0x3262b5;};'use strict';var UserProfileEvents=require(_0x6084('0x0'));var events=[_0x6084('0x1'),_0x6084('0x2'),_0x6084('0x3')];function createListener(_0x5718bf,_0x2acc8f){return function(_0x4ca595){_0x2acc8f[_0x6084('0x4')](_0x5718bf,_0x4ca595);};}function removeListener(_0x8d7568,_0x15dba6){return function(){UserProfileEvents[_0x6084('0x5')](_0x8d7568,_0x15dba6);};}exports['register']=function(_0x5d5692){for(var _0x43262f=0x0,_0x3f486a=events[_0x6084('0x6')];_0x43262f<_0x3f486a;_0x43262f++){var _0xa1d619=events[_0x43262f];var _0x2252f8=createListener('userProfile:'+_0xa1d619,_0x5d5692);UserProfileEvents['on'](_0xa1d619,_0x2252f8);}};
\ No newline at end of file
index b54402d..f2733e0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4167=['index','/describe','/:id','post','put','update','delete','exports','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated'];(function(_0x3c4e97,_0x26e8cf){var _0x3f6f88=function(_0x17c84f){while(--_0x17c84f){_0x3c4e97['push'](_0x3c4e97['shift']());}};_0x3f6f88(++_0x26e8cf);}(_0x4167,0x86));var _0x7416=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x4167[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require(_0x7416('0x0'));var path=require(_0x7416('0x1'));var timeout=require('connect-timeout');var express=require(_0x7416('0x2'));var router=express[_0x7416('0x3')]();var fs_extra=require(_0x7416('0x4'));var auth=require(_0x7416('0x5'));var interaction=require(_0x7416('0x6'));var config=require(_0x7416('0x7'));var controller=require('./userProfileResource.controller');router[_0x7416('0x8')]('/',auth[_0x7416('0x9')](),controller[_0x7416('0xa')]);router[_0x7416('0x8')](_0x7416('0xb'),auth['isAuthenticated'](),controller['describe']);router[_0x7416('0x8')](_0x7416('0xc'),auth[_0x7416('0x9')](),controller['show']);router[_0x7416('0xd')]('/',auth[_0x7416('0x9')](),controller['create']);router[_0x7416('0xe')]('/:id',auth['isAuthenticated'](),controller[_0x7416('0xf')]);router[_0x7416('0x10')](_0x7416('0xc'),auth[_0x7416('0x9')](),controller['destroy']);module[_0x7416('0x11')]=router;
\ No newline at end of file
+var _0x8089=['connect-timeout','express','fs-extra','../../components/auth/service','../../config/environment','./userProfileResource.controller','get','/describe','isAuthenticated','describe','show','post','create','/:id','delete','exports','multer','path'];(function(_0x4b74c6,_0x6b7f86){var _0x232268=function(_0x354639){while(--_0x354639){_0x4b74c6['push'](_0x4b74c6['shift']());}};_0x232268(++_0x6b7f86);}(_0x8089,0x178));var _0x9808=function(_0x3f61c2,_0x9fbfde){_0x3f61c2=_0x3f61c2-0x0;var _0x52a80a=_0x8089[_0x3f61c2];return _0x52a80a;};'use strict';var multer=require(_0x9808('0x0'));var util=require('util');var path=require(_0x9808('0x1'));var timeout=require(_0x9808('0x2'));var express=require(_0x9808('0x3'));var router=express['Router']();var fs_extra=require(_0x9808('0x4'));var auth=require(_0x9808('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x9808('0x6'));var controller=require(_0x9808('0x7'));router['get']('/',auth['isAuthenticated'](),controller['index']);router[_0x9808('0x8')](_0x9808('0x9'),auth[_0x9808('0xa')](),controller[_0x9808('0xb')]);router[_0x9808('0x8')]('/:id',auth['isAuthenticated'](),controller[_0x9808('0xc')]);router[_0x9808('0xd')]('/',auth['isAuthenticated'](),controller[_0x9808('0xe')]);router['put'](_0x9808('0xf'),auth['isAuthenticated'](),controller['update']);router[_0x9808('0x10')](_0x9808('0xf'),auth[_0x9808('0xa')](),controller['destroy']);module[_0x9808('0x11')]=router;
\ No newline at end of file
index c9900fd..3753e7f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7f57=['STRING','INTEGER','sequelize','exports'];(function(_0x4f415d,_0x2c2219){var _0x4ba7c7=function(_0x17639c){while(--_0x17639c){_0x4f415d['push'](_0x4f415d['shift']());}};_0x4ba7c7(++_0x2c2219);}(_0x7f57,0xf2));var _0x77f5=function(_0x1deb03,_0xd05ad8){_0x1deb03=_0x1deb03-0x0;var _0x189fe7=_0x7f57[_0x1deb03];return _0x189fe7;};'use strict';var Sequelize=require(_0x77f5('0x0'));module[_0x77f5('0x1')]={'name':{'type':Sequelize[_0x77f5('0x2')],'allowNull':![]},'resourceId':{'type':Sequelize[_0x77f5('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0x77f5('0x2')],'allowNull':![]}};
\ No newline at end of file
+var _0xd1b2=['STRING','INTEGER','sequelize'];(function(_0x11d876,_0x4dc816){var _0x5c7084=function(_0x2947ef){while(--_0x2947ef){_0x11d876['push'](_0x11d876['shift']());}};_0x5c7084(++_0x4dc816);}(_0xd1b2,0x74));var _0x2d1b=function(_0x377e61,_0x4d7f70){_0x377e61=_0x377e61-0x0;var _0x100260=_0xd1b2[_0x377e61];return _0x100260;};'use strict';var Sequelize=require(_0x2d1b('0x0'));module['exports']={'name':{'type':Sequelize[_0x2d1b('0x1')],'allowNull':![]},'resourceId':{'type':Sequelize[_0x2d1b('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0x2d1b('0x1')],'allowNull':![]}};
\ No newline at end of file
index 059bc36..0a5b486 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8e3f=['save','update','destroy','then','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','keys','query','intersection','fields','attributes','length','hasOwnProperty','sort','where','filters','pick','merge','filter','options','UserProfileResource','includeAll','include','findAll','catch','show','params','create','body','find','describe','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','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','sendStatus','end','status','undefined','limit','count','offset','set','Content-Range','json','apply','reject'];(function(_0x580576,_0x2f107d){var _0x3f55a0=function(_0x2e180b){while(--_0x2e180b){_0x580576['push'](_0x580576['shift']());}};_0x3f55a0(++_0x2f107d);}(_0x8e3f,0xc1));var _0xf8e3=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0x8e3f[_0x40a045];return _0x1a687c;};'use strict';var emlformat=require(_0xf8e3('0x0'));var rimraf=require(_0xf8e3('0x1'));var zipdir=require(_0xf8e3('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xf8e3('0x3'));var moment=require(_0xf8e3('0x4'));var BPromise=require(_0xf8e3('0x5'));var Mustache=require('mustache');var util=require(_0xf8e3('0x6'));var path=require(_0xf8e3('0x7'));var sox=require('sox');var csv=require(_0xf8e3('0x8'));var ejs=require(_0xf8e3('0x9'));var fs=require('fs');var fs_extra=require(_0xf8e3('0xa'));var _=require(_0xf8e3('0xb'));var squel=require('squel');var crypto=require(_0xf8e3('0xc'));var jsforce=require(_0xf8e3('0xd'));var deskjs=require(_0xf8e3('0xe'));var toCsv=require(_0xf8e3('0x8'));var querystring=require(_0xf8e3('0xf'));var Papa=require(_0xf8e3('0x10'));var Redis=require(_0xf8e3('0x11'));var authService=require(_0xf8e3('0x12'));var qs=require(_0xf8e3('0x13'));var as=require(_0xf8e3('0x14'));var hardwareService=require(_0xf8e3('0x15'));var logger=require(_0xf8e3('0x16'))('api');var utils=require(_0xf8e3('0x17'));var config=require(_0xf8e3('0x18'));var licenseUtil=require(_0xf8e3('0x19'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x40ae02,_0x41f85e){_0x41f85e=_0x41f85e||0xcc;return function(_0x336790){if(_0x336790){return _0x40ae02[_0xf8e3('0x1a')](_0x41f85e);}return _0x40ae02['status'](_0x41f85e)[_0xf8e3('0x1b')]();};}function respondWithResult(_0xa856f5,_0x2fe631){_0x2fe631=_0x2fe631||0xc8;return function(_0x4af736){if(_0x4af736){return _0xa856f5[_0xf8e3('0x1c')](_0x2fe631)['json'](_0x4af736);}};}function respondWithFilteredResult(_0x1ec773,_0x40c196){return function(_0x460629){if(_0x460629){var _0x570ee3=typeof _0x40c196['offset']===_0xf8e3('0x1d')&&typeof _0x40c196[_0xf8e3('0x1e')]===_0xf8e3('0x1d');var _0x3b01ac=_0x460629[_0xf8e3('0x1f')];var _0x11d4cc=_0x570ee3?0x0:_0x40c196[_0xf8e3('0x20')];var _0x2e27e3=_0x570ee3?_0x460629[_0xf8e3('0x1f')]:_0x40c196[_0xf8e3('0x20')]+_0x40c196['limit'];var _0x20cc64;if(_0x2e27e3>=_0x3b01ac){_0x2e27e3=_0x3b01ac;_0x20cc64=0xc8;}else{_0x20cc64=0xce;}_0x1ec773[_0xf8e3('0x1c')](_0x20cc64);return _0x1ec773[_0xf8e3('0x21')](_0xf8e3('0x22'),_0x11d4cc+'-'+_0x2e27e3+'/'+_0x3b01ac)[_0xf8e3('0x23')](_0x460629);}return null;};}function patchUpdates(_0x11c58e){return function(_0x1cae53){try{jsonpatch[_0xf8e3('0x24')](_0x1cae53,_0x11c58e,!![]);}catch(_0x5b99b1){return BPromise[_0xf8e3('0x25')](_0x5b99b1);}return _0x1cae53[_0xf8e3('0x26')]();};}function saveUpdates(_0x3c636d,_0xccbcc0){return function(_0x4a1e5f){if(_0x4a1e5f){return _0x4a1e5f[_0xf8e3('0x27')](_0x3c636d)['then'](function(_0x286059){return _0x286059;});}return null;};}function removeEntity(_0x225a1b,_0x33d526){return function(_0x2dc856){if(_0x2dc856){return _0x2dc856[_0xf8e3('0x28')]()[_0xf8e3('0x29')](function(){_0x225a1b['status'](0xcc)[_0xf8e3('0x1b')]();});}};}function handleEntityNotFound(_0x2fc674,_0x3373ca){return function(_0x417b42){if(!_0x417b42){_0x2fc674[_0xf8e3('0x1a')](0x194);}return _0x417b42;};}function handleError(_0x3b41a1,_0x2963ed){_0x2963ed=_0x2963ed||0x1f4;return function(_0x157a2d){logger['error'](_0x157a2d[_0xf8e3('0x2a')]);if(_0x157a2d[_0xf8e3('0x2b')]){delete _0x157a2d[_0xf8e3('0x2b')];}_0x3b41a1[_0xf8e3('0x1c')](_0x2963ed)[_0xf8e3('0x2c')](_0x157a2d);};}exports[_0xf8e3('0x2d')]=function(_0x16485e,_0xfaf15d){var _0x4f2ae9={},_0x21e1c0={},_0x243e28={'count':0x0,'rows':[]};var _0x492694=_[_0xf8e3('0x2e')](db['UserProfileResource'][_0xf8e3('0x2f')],function(_0x10cf28){return{'name':_0x10cf28[_0xf8e3('0x30')],'type':_0x10cf28[_0xf8e3('0x31')][_0xf8e3('0x32')]};});_0x21e1c0[_0xf8e3('0x33')]=_[_0xf8e3('0x2e')](_0x492694,_0xf8e3('0x2b'));_0x21e1c0['query']=_[_0xf8e3('0x34')](_0x16485e[_0xf8e3('0x35')]);_0x21e1c0['filters']=_['intersection'](_0x21e1c0['model'],_0x21e1c0[_0xf8e3('0x35')]);_0x4f2ae9['attributes']=_[_0xf8e3('0x36')](_0x21e1c0[_0xf8e3('0x33')],qs[_0xf8e3('0x37')](_0x16485e[_0xf8e3('0x35')]['fields']));_0x4f2ae9['attributes']=_0x4f2ae9[_0xf8e3('0x38')][_0xf8e3('0x39')]?_0x4f2ae9[_0xf8e3('0x38')]:_0x21e1c0[_0xf8e3('0x33')];if(!_0x16485e[_0xf8e3('0x35')][_0xf8e3('0x3a')]('nolimit')){_0x4f2ae9[_0xf8e3('0x1e')]=qs['limit'](_0x16485e['query'][_0xf8e3('0x1e')]);_0x4f2ae9[_0xf8e3('0x20')]=qs[_0xf8e3('0x20')](_0x16485e[_0xf8e3('0x35')]['offset']);}_0x4f2ae9['order']=qs[_0xf8e3('0x3b')](_0x16485e[_0xf8e3('0x35')]['sort']);_0x4f2ae9[_0xf8e3('0x3c')]=qs[_0xf8e3('0x3d')](_[_0xf8e3('0x3e')](_0x16485e[_0xf8e3('0x35')],_0x21e1c0['filters']),_0x492694);if(_0x16485e['query']['filter']){_0x4f2ae9[_0xf8e3('0x3c')]=_[_0xf8e3('0x3f')](_0x4f2ae9[_0xf8e3('0x3c')],{'$or':_[_0xf8e3('0x2e')](_0x492694,function(_0x53160a){if(_0x53160a[_0xf8e3('0x31')]!=='VIRTUAL'){var _0x20909b={};_0x20909b[_0x53160a[_0xf8e3('0x2b')]]={'$like':'%'+_0x16485e[_0xf8e3('0x35')][_0xf8e3('0x40')]+'%'};return _0x20909b;}})});}_0x4f2ae9=_[_0xf8e3('0x3f')]({},_0x4f2ae9,_0x16485e[_0xf8e3('0x41')]);var _0x82e778={'where':_0x4f2ae9[_0xf8e3('0x3c')]};return db[_0xf8e3('0x42')]['count'](_0x82e778)[_0xf8e3('0x29')](function(_0x537089){_0x243e28[_0xf8e3('0x1f')]=_0x537089;if(_0x16485e[_0xf8e3('0x35')][_0xf8e3('0x43')]){_0x4f2ae9[_0xf8e3('0x44')]=[{'all':!![]}];}return db[_0xf8e3('0x42')][_0xf8e3('0x45')](_0x4f2ae9);})[_0xf8e3('0x29')](function(_0x2f05b7){_0x243e28['rows']=_0x2f05b7;return _0x243e28;})[_0xf8e3('0x29')](respondWithFilteredResult(_0xfaf15d,_0x4f2ae9))[_0xf8e3('0x46')](handleError(_0xfaf15d,null));};exports[_0xf8e3('0x47')]=function(_0x382dbb,_0x6dd110){var _0xe7fcb9={'raw':![],'where':{'id':_0x382dbb[_0xf8e3('0x48')]['id']}},_0x792190={};_0x792190['model']=_['keys'](db['UserProfileResource'][_0xf8e3('0x2f')]);_0x792190[_0xf8e3('0x35')]=_['keys'](_0x382dbb[_0xf8e3('0x35')]);_0x792190['filters']=_[_0xf8e3('0x36')](_0x792190[_0xf8e3('0x33')],_0x792190['query']);_0xe7fcb9[_0xf8e3('0x38')]=_['intersection'](_0x792190[_0xf8e3('0x33')],qs[_0xf8e3('0x37')](_0x382dbb['query'][_0xf8e3('0x37')]));_0xe7fcb9[_0xf8e3('0x38')]=_0xe7fcb9[_0xf8e3('0x38')][_0xf8e3('0x39')]?_0xe7fcb9['attributes']:_0x792190['model'];if(_0x382dbb['query'][_0xf8e3('0x43')]){_0xe7fcb9[_0xf8e3('0x44')]=[{'all':!![]}];}_0xe7fcb9=_[_0xf8e3('0x3f')]({},_0xe7fcb9,_0x382dbb['options']);return db[_0xf8e3('0x42')]['find'](_0xe7fcb9)[_0xf8e3('0x29')](handleEntityNotFound(_0x6dd110,null))[_0xf8e3('0x29')](respondWithResult(_0x6dd110,null))['catch'](handleError(_0x6dd110,null));};exports['create']=function(_0x128234,_0x2939e6){return db[_0xf8e3('0x42')][_0xf8e3('0x49')](_0x128234[_0xf8e3('0x4a')],{})[_0xf8e3('0x29')](respondWithResult(_0x2939e6,0xc9))[_0xf8e3('0x46')](handleError(_0x2939e6,null));};exports[_0xf8e3('0x27')]=function(_0xdc2430,_0x81898e){if(_0xdc2430[_0xf8e3('0x4a')]['id']){delete _0xdc2430['body']['id'];}return db[_0xf8e3('0x42')][_0xf8e3('0x4b')]({'where':{'id':_0xdc2430[_0xf8e3('0x48')]['id']}})[_0xf8e3('0x29')](handleEntityNotFound(_0x81898e,null))[_0xf8e3('0x29')](saveUpdates(_0xdc2430[_0xf8e3('0x4a')],null))['then'](respondWithResult(_0x81898e,null))[_0xf8e3('0x46')](handleError(_0x81898e,null));};exports[_0xf8e3('0x28')]=function(_0x39caae,_0x3e60a6){return db[_0xf8e3('0x42')][_0xf8e3('0x4b')]({'where':{'id':_0x39caae['params']['id']}})[_0xf8e3('0x29')](handleEntityNotFound(_0x3e60a6,null))[_0xf8e3('0x29')](removeEntity(_0x3e60a6,null))[_0xf8e3('0x46')](handleError(_0x3e60a6,null));};exports[_0xf8e3('0x4c')]=function(_0x113404,_0x2fef16){return db['UserProfileResource'][_0xf8e3('0x4c')]()[_0xf8e3('0x29')](respondWithResult(_0x2fef16,null))[_0xf8e3('0x46')](handleError(_0x2fef16,null));};
\ No newline at end of file
+var _0x1a37=['index','map','UserProfileResource','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filter','VIRTUAL','merge','includeAll','include','findAll','catch','show','options','find','create','body','params','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','fs-extra','lodash','squel','crypto','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','apply','reject','update','then','destroy','error','stack','name','send'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x1a37,0xb4));var _0x71a3=function(_0x4b055c,_0x4b870b){_0x4b055c=_0x4b055c-0x0;var _0x4b62bb=_0x1a37[_0x4b055c];return _0x4b62bb;};'use strict';var emlformat=require(_0x71a3('0x0'));var rimraf=require(_0x71a3('0x1'));var zipdir=require(_0x71a3('0x2'));var jsonpatch=require(_0x71a3('0x3'));var rp=require(_0x71a3('0x4'));var moment=require(_0x71a3('0x5'));var BPromise=require(_0x71a3('0x6'));var Mustache=require(_0x71a3('0x7'));var util=require(_0x71a3('0x8'));var path=require(_0x71a3('0x9'));var sox=require('sox');var csv=require(_0x71a3('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x71a3('0xb'));var _=require(_0x71a3('0xc'));var squel=require(_0x71a3('0xd'));var crypto=require(_0x71a3('0xe'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x71a3('0xf'));var Redis=require(_0x71a3('0x10'));var authService=require(_0x71a3('0x11'));var qs=require(_0x71a3('0x12'));var as=require(_0x71a3('0x13'));var hardwareService=require(_0x71a3('0x14'));var logger=require(_0x71a3('0x15'))(_0x71a3('0x16'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x71a3('0x17'))['db'];function respondWithStatusCode(_0x3830cb,_0x27e46d){_0x27e46d=_0x27e46d||0xcc;return function(_0x229134){if(_0x229134){return _0x3830cb[_0x71a3('0x18')](_0x27e46d);}return _0x3830cb[_0x71a3('0x19')](_0x27e46d)[_0x71a3('0x1a')]();};}function respondWithResult(_0x3b256c,_0x4dc4ed){_0x4dc4ed=_0x4dc4ed||0xc8;return function(_0x203ee1){if(_0x203ee1){return _0x3b256c[_0x71a3('0x19')](_0x4dc4ed)['json'](_0x203ee1);}};}function respondWithFilteredResult(_0x1743d7,_0x32591a){return function(_0x59021f){if(_0x59021f){var _0x4aa918=typeof _0x32591a[_0x71a3('0x1b')]===_0x71a3('0x1c')&&typeof _0x32591a[_0x71a3('0x1d')]===_0x71a3('0x1c');var _0x1af1bc=_0x59021f[_0x71a3('0x1e')];var _0x5d4dee=_0x4aa918?0x0:_0x32591a[_0x71a3('0x1b')];var _0x27bfb4=_0x4aa918?_0x59021f['count']:_0x32591a['offset']+_0x32591a[_0x71a3('0x1d')];var _0x250db3;if(_0x27bfb4>=_0x1af1bc){_0x27bfb4=_0x1af1bc;_0x250db3=0xc8;}else{_0x250db3=0xce;}_0x1743d7[_0x71a3('0x19')](_0x250db3);return _0x1743d7[_0x71a3('0x1f')](_0x71a3('0x20'),_0x5d4dee+'-'+_0x27bfb4+'/'+_0x1af1bc)['json'](_0x59021f);}return null;};}function patchUpdates(_0x1ab947){return function(_0x4156e1){try{jsonpatch[_0x71a3('0x21')](_0x4156e1,_0x1ab947,!![]);}catch(_0x3ea036){return BPromise[_0x71a3('0x22')](_0x3ea036);}return _0x4156e1['save']();};}function saveUpdates(_0x1af24b,_0x5bbaee){return function(_0x3bf78e){if(_0x3bf78e){return _0x3bf78e[_0x71a3('0x23')](_0x1af24b)[_0x71a3('0x24')](function(_0x21899d){return _0x21899d;});}return null;};}function removeEntity(_0x452bc4,_0x2847b4){return function(_0x5f33c5){if(_0x5f33c5){return _0x5f33c5[_0x71a3('0x25')]()[_0x71a3('0x24')](function(){_0x452bc4[_0x71a3('0x19')](0xcc)[_0x71a3('0x1a')]();});}};}function handleEntityNotFound(_0xb0f3aa,_0x4fd214){return function(_0x107fbd){if(!_0x107fbd){_0xb0f3aa[_0x71a3('0x18')](0x194);}return _0x107fbd;};}function handleError(_0x4c1a3d,_0x412746){_0x412746=_0x412746||0x1f4;return function(_0x515519){logger[_0x71a3('0x26')](_0x515519[_0x71a3('0x27')]);if(_0x515519[_0x71a3('0x28')]){delete _0x515519[_0x71a3('0x28')];}_0x4c1a3d[_0x71a3('0x19')](_0x412746)[_0x71a3('0x29')](_0x515519);};}exports[_0x71a3('0x2a')]=function(_0x242b85,_0x305eb1){var _0x3fc578={},_0x3ea7aa={},_0x228afa={'count':0x0,'rows':[]};var _0x51cde3=_[_0x71a3('0x2b')](db[_0x71a3('0x2c')][_0x71a3('0x2d')],function(_0x23ae85){return{'name':_0x23ae85['fieldName'],'type':_0x23ae85[_0x71a3('0x2e')][_0x71a3('0x2f')]};});_0x3ea7aa[_0x71a3('0x30')]=_[_0x71a3('0x2b')](_0x51cde3,_0x71a3('0x28'));_0x3ea7aa[_0x71a3('0x31')]=_[_0x71a3('0x32')](_0x242b85['query']);_0x3ea7aa[_0x71a3('0x33')]=_[_0x71a3('0x34')](_0x3ea7aa[_0x71a3('0x30')],_0x3ea7aa[_0x71a3('0x31')]);_0x3fc578[_0x71a3('0x35')]=_[_0x71a3('0x34')](_0x3ea7aa[_0x71a3('0x30')],qs[_0x71a3('0x36')](_0x242b85[_0x71a3('0x31')][_0x71a3('0x36')]));_0x3fc578[_0x71a3('0x35')]=_0x3fc578[_0x71a3('0x35')][_0x71a3('0x37')]?_0x3fc578['attributes']:_0x3ea7aa['model'];if(!_0x242b85[_0x71a3('0x31')][_0x71a3('0x38')]('nolimit')){_0x3fc578[_0x71a3('0x1d')]=qs[_0x71a3('0x1d')](_0x242b85['query'][_0x71a3('0x1d')]);_0x3fc578[_0x71a3('0x1b')]=qs[_0x71a3('0x1b')](_0x242b85[_0x71a3('0x31')][_0x71a3('0x1b')]);}_0x3fc578[_0x71a3('0x39')]=qs[_0x71a3('0x3a')](_0x242b85['query'][_0x71a3('0x3a')]);_0x3fc578[_0x71a3('0x3b')]=qs[_0x71a3('0x33')](_['pick'](_0x242b85[_0x71a3('0x31')],_0x3ea7aa[_0x71a3('0x33')]),_0x51cde3);if(_0x242b85[_0x71a3('0x31')][_0x71a3('0x3c')]){_0x3fc578[_0x71a3('0x3b')]=_['merge'](_0x3fc578['where'],{'$or':_[_0x71a3('0x2b')](_0x51cde3,function(_0x2b3197){if(_0x2b3197[_0x71a3('0x2e')]!==_0x71a3('0x3d')){var _0x36ed2e={};_0x36ed2e[_0x2b3197['name']]={'$like':'%'+_0x242b85[_0x71a3('0x31')][_0x71a3('0x3c')]+'%'};return _0x36ed2e;}})});}_0x3fc578=_[_0x71a3('0x3e')]({},_0x3fc578,_0x242b85['options']);var _0x17c467={'where':_0x3fc578['where']};return db[_0x71a3('0x2c')][_0x71a3('0x1e')](_0x17c467)[_0x71a3('0x24')](function(_0x43c6d1){_0x228afa[_0x71a3('0x1e')]=_0x43c6d1;if(_0x242b85[_0x71a3('0x31')][_0x71a3('0x3f')]){_0x3fc578[_0x71a3('0x40')]=[{'all':!![]}];}return db[_0x71a3('0x2c')][_0x71a3('0x41')](_0x3fc578);})['then'](function(_0xa49846){_0x228afa['rows']=_0xa49846;return _0x228afa;})[_0x71a3('0x24')](respondWithFilteredResult(_0x305eb1,_0x3fc578))[_0x71a3('0x42')](handleError(_0x305eb1,null));};exports[_0x71a3('0x43')]=function(_0x18974c,_0x59c7c9){var _0x412bce={'raw':![],'where':{'id':_0x18974c['params']['id']}},_0x4b4fde={};_0x4b4fde[_0x71a3('0x30')]=_[_0x71a3('0x32')](db[_0x71a3('0x2c')][_0x71a3('0x2d')]);_0x4b4fde['query']=_[_0x71a3('0x32')](_0x18974c[_0x71a3('0x31')]);_0x4b4fde[_0x71a3('0x33')]=_[_0x71a3('0x34')](_0x4b4fde[_0x71a3('0x30')],_0x4b4fde[_0x71a3('0x31')]);_0x412bce[_0x71a3('0x35')]=_[_0x71a3('0x34')](_0x4b4fde[_0x71a3('0x30')],qs[_0x71a3('0x36')](_0x18974c[_0x71a3('0x31')][_0x71a3('0x36')]));_0x412bce[_0x71a3('0x35')]=_0x412bce[_0x71a3('0x35')][_0x71a3('0x37')]?_0x412bce[_0x71a3('0x35')]:_0x4b4fde['model'];if(_0x18974c[_0x71a3('0x31')][_0x71a3('0x3f')]){_0x412bce['include']=[{'all':!![]}];}_0x412bce=_[_0x71a3('0x3e')]({},_0x412bce,_0x18974c[_0x71a3('0x44')]);return db[_0x71a3('0x2c')][_0x71a3('0x45')](_0x412bce)[_0x71a3('0x24')](handleEntityNotFound(_0x59c7c9,null))['then'](respondWithResult(_0x59c7c9,null))['catch'](handleError(_0x59c7c9,null));};exports[_0x71a3('0x46')]=function(_0x4305ee,_0x51d20d){return db[_0x71a3('0x2c')][_0x71a3('0x46')](_0x4305ee[_0x71a3('0x47')],{})[_0x71a3('0x24')](respondWithResult(_0x51d20d,0xc9))[_0x71a3('0x42')](handleError(_0x51d20d,null));};exports[_0x71a3('0x23')]=function(_0x501a62,_0x1c9ba6){if(_0x501a62['body']['id']){delete _0x501a62[_0x71a3('0x47')]['id'];}return db[_0x71a3('0x2c')][_0x71a3('0x45')]({'where':{'id':_0x501a62[_0x71a3('0x48')]['id']}})[_0x71a3('0x24')](handleEntityNotFound(_0x1c9ba6,null))['then'](saveUpdates(_0x501a62[_0x71a3('0x47')],null))[_0x71a3('0x24')](respondWithResult(_0x1c9ba6,null))[_0x71a3('0x42')](handleError(_0x1c9ba6,null));};exports['destroy']=function(_0x6c34,_0x4e6423){return db[_0x71a3('0x2c')][_0x71a3('0x45')]({'where':{'id':_0x6c34['params']['id']}})[_0x71a3('0x24')](handleEntityNotFound(_0x4e6423,null))[_0x71a3('0x24')](removeEntity(_0x4e6423,null))[_0x71a3('0x42')](handleError(_0x4e6423,null));};exports[_0x71a3('0x49')]=function(_0x11391d,_0x3952c0){return db[_0x71a3('0x2c')]['describe']()[_0x71a3('0x24')](respondWithResult(_0x3952c0,null))['catch'](handleError(_0x3952c0,null));};
\ No newline at end of file
index f384be3..45f5f0e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x229a=['exports','UserProfileResource','resourceId','sectionId','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x4f9fe8,_0x3c5524){var _0x188463=function(_0x2a0929){while(--_0x2a0929){_0x4f9fe8['push'](_0x4f9fe8['shift']());}};_0x188463(++_0x3c5524);}(_0x229a,0xd5));var _0xa229=function(_0x493c9d,_0x555253){_0x493c9d=_0x493c9d-0x0;var _0x2a924c=_0x229a[_0x493c9d];return _0x2a924c;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')(_0xa229('0x0'));var moment=require(_0xa229('0x1'));var BPromise=require(_0xa229('0x2'));var rp=require(_0xa229('0x3'));var fs=require('fs');var path=require(_0xa229('0x4'));var rimraf=require(_0xa229('0x5'));var config=require(_0xa229('0x6'));var attributes=require('./userProfileResource.attributes');module[_0xa229('0x7')]=function(_0x36b64a,_0x2e0df5){return _0x36b64a['define'](_0xa229('0x8'),attributes,{'tableName':'user_profile_has_resources','paranoid':![],'indexes':[{'name':'compositeIndex','fields':[_0xa229('0x9'),_0xa229('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x36a4=['../../config/environment','exports','define','UserProfileResource','user_profile_has_resources','sectionId','util','../../config/logger','api','moment','bluebird','path','rimraf'];(function(_0xb0f7c3,_0x4eae95){var _0x28ea68=function(_0x4395a7){while(--_0x4395a7){_0xb0f7c3['push'](_0xb0f7c3['shift']());}};_0x28ea68(++_0x4eae95);}(_0x36a4,0xe3));var _0x436a=function(_0xf97195,_0x194d67){_0xf97195=_0xf97195-0x0;var _0x5a4a9f=_0x36a4[_0xf97195];return _0x5a4a9f;};'use strict';var _=require('lodash');var util=require(_0x436a('0x0'));var logger=require(_0x436a('0x1'))(_0x436a('0x2'));var moment=require(_0x436a('0x3'));var BPromise=require(_0x436a('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x436a('0x5'));var rimraf=require(_0x436a('0x6'));var config=require(_0x436a('0x7'));var attributes=require('./userProfileResource.attributes');module[_0x436a('0x8')]=function(_0x4545d3,_0x580b28){return _0x4545d3[_0x436a('0x9')](_0x436a('0xa'),attributes,{'tableName':_0x436a('0xb'),'paranoid':![],'indexes':[{'name':'compositeIndex','fields':['resourceId',_0x436a('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
index 68923bf..4a27b4b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x35e6=['stringify','error','code','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','info','UserProfileResource,\x20%s,\x20%s','request\x20sent'];(function(_0xf6f6d9,_0x32e950){var _0x55b36b=function(_0x4423f1){while(--_0x4423f1){_0xf6f6d9['push'](_0xf6f6d9['shift']());}};_0x55b36b(++_0x32e950);}(_0x35e6,0x192));var _0x635e=function(_0x527e09,_0x3f042f){_0x527e09=_0x527e09-0x0;var _0xe432cb=_0x35e6[_0x527e09];return _0xe432cb;};'use strict';var _=require(_0x635e('0x0'));var util=require(_0x635e('0x1'));var moment=require('moment');var BPromise=require(_0x635e('0x2'));var rs=require(_0x635e('0x3'));var fs=require('fs');var Redis=require(_0x635e('0x4'));var db=require(_0x635e('0x5'))['db'];var utils=require(_0x635e('0x6'));var logger=require(_0x635e('0x7'))('rpc');var config=require(_0x635e('0x8'));var jayson=require(_0x635e('0x9'));var client=jayson[_0x635e('0xa')][_0x635e('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2dd2b6,_0xc46f99,_0xc81644){return new BPromise(function(_0x55ed30,_0x27913c){return client['request'](_0x2dd2b6,_0xc81644)[_0x635e('0xc')](function(_0x100acc){logger[_0x635e('0xd')](_0x635e('0xe'),_0xc46f99,_0x635e('0xf'));logger['debug']('UserProfileResource,\x20%s,\x20%s,\x20%s',_0xc46f99,'request\x20sent',JSON[_0x635e('0x10')](_0x100acc));if(_0x100acc[_0x635e('0x11')]){if(_0x100acc[_0x635e('0x11')][_0x635e('0x12')]===0x1f4){logger[_0x635e('0x11')](_0x635e('0xe'),_0xc46f99,_0x100acc['error']['message']);return _0x27913c(_0x100acc[_0x635e('0x11')][_0x635e('0x13')]);}logger['error'](_0x635e('0xe'),_0xc46f99,_0x100acc[_0x635e('0x11')][_0x635e('0x13')]);return _0x55ed30(_0x100acc[_0x635e('0x11')][_0x635e('0x13')]);}else{logger['info']('UserProfileResource,\x20%s,\x20%s',_0xc46f99,_0x635e('0xf'));_0x55ed30(_0x100acc[_0x635e('0x14')]['message']);}})[_0x635e('0x15')](function(_0xa7e0fb){logger[_0x635e('0x11')]('UserProfileResource,\x20%s,\x20%s',_0xc46f99,_0xa7e0fb);_0x27913c(_0xa7e0fb);});});}
\ No newline at end of file
+var _0xfb88=['then','UserProfileResource,\x20%s,\x20%s','request\x20sent','debug','UserProfileResource,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','request'];(function(_0x3aa497,_0x478c35){var _0x4d7ada=function(_0x29e935){while(--_0x29e935){_0x3aa497['push'](_0x3aa497['shift']());}};_0x4d7ada(++_0x478c35);}(_0xfb88,0x1ed));var _0x8fb8=function(_0x36e198,_0x177c76){_0x36e198=_0x36e198-0x0;var _0x3e8493=_0xfb88[_0x36e198];return _0x3e8493;};'use strict';var _=require(_0x8fb8('0x0'));var util=require(_0x8fb8('0x1'));var moment=require(_0x8fb8('0x2'));var BPromise=require(_0x8fb8('0x3'));var rs=require(_0x8fb8('0x4'));var fs=require('fs');var Redis=require(_0x8fb8('0x5'));var db=require(_0x8fb8('0x6'))['db'];var utils=require(_0x8fb8('0x7'));var logger=require('../../config/logger')(_0x8fb8('0x8'));var config=require(_0x8fb8('0x9'));var jayson=require(_0x8fb8('0xa'));var client=jayson['client'][_0x8fb8('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5b917f,_0x499f8d,_0x3d9ae9){return new BPromise(function(_0xc9e25f,_0x5e6a23){return client[_0x8fb8('0xc')](_0x5b917f,_0x3d9ae9)[_0x8fb8('0xd')](function(_0x10d5bd){logger['info'](_0x8fb8('0xe'),_0x499f8d,_0x8fb8('0xf'));logger[_0x8fb8('0x10')](_0x8fb8('0x11'),_0x499f8d,'request\x20sent',JSON[_0x8fb8('0x12')](_0x10d5bd));if(_0x10d5bd[_0x8fb8('0x13')]){if(_0x10d5bd[_0x8fb8('0x13')][_0x8fb8('0x14')]===0x1f4){logger['error'](_0x8fb8('0xe'),_0x499f8d,_0x10d5bd[_0x8fb8('0x13')][_0x8fb8('0x15')]);return _0x5e6a23(_0x10d5bd[_0x8fb8('0x13')]['message']);}logger['error'](_0x8fb8('0xe'),_0x499f8d,_0x10d5bd[_0x8fb8('0x13')][_0x8fb8('0x15')]);return _0xc9e25f(_0x10d5bd['error'][_0x8fb8('0x15')]);}else{logger[_0x8fb8('0x16')](_0x8fb8('0xe'),_0x499f8d,_0x8fb8('0xf'));_0xc9e25f(_0x10d5bd['result']['message']);}})['catch'](function(_0x263d66){logger['error'](_0x8fb8('0xe'),_0x499f8d,_0x263d66);_0x5e6a23(_0x263d66);});});}
\ No newline at end of file
index a04fed1..cb9ccb6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x894b=['get','isAuthenticated','describe','/:id','show','post','create','put','update','destroy','exports','multer','util','path','express','Router','fs-extra','../../config/environment','./userProfileSection.controller','index'];(function(_0x612267,_0x363a1f){var _0x46b502=function(_0x32791a){while(--_0x32791a){_0x612267['push'](_0x612267['shift']());}};_0x46b502(++_0x363a1f);}(_0x894b,0x10f));var _0xb894=function(_0x307e15,_0x2d1c7a){_0x307e15=_0x307e15-0x0;var _0x1e202c=_0x894b[_0x307e15];return _0x1e202c;};'use strict';var multer=require(_0xb894('0x0'));var util=require(_0xb894('0x1'));var path=require(_0xb894('0x2'));var timeout=require('connect-timeout');var express=require(_0xb894('0x3'));var router=express[_0xb894('0x4')]();var fs_extra=require(_0xb894('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xb894('0x6'));var controller=require(_0xb894('0x7'));router['get']('/',auth['isAuthenticated'](),controller[_0xb894('0x8')]);router[_0xb894('0x9')]('/describe',auth[_0xb894('0xa')](),controller[_0xb894('0xb')]);router[_0xb894('0x9')](_0xb894('0xc'),auth['isAuthenticated'](),controller[_0xb894('0xd')]);router[_0xb894('0xe')]('/',auth[_0xb894('0xa')](),controller[_0xb894('0xf')]);router[_0xb894('0x10')]('/:id',auth[_0xb894('0xa')](),controller[_0xb894('0x11')]);router['delete'](_0xb894('0xc'),auth['isAuthenticated'](),controller[_0xb894('0x12')]);module[_0xb894('0x13')]=router;
\ No newline at end of file
+var _0x101e=['put','delete','/:id','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','get','index','/describe','isAuthenticated','show','post','create'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x101e,0x1a6));var _0xe101=function(_0x1ac595,_0x5d2081){_0x1ac595=_0x1ac595-0x0;var _0x455fff=_0x101e[_0x1ac595];return _0x455fff;};'use strict';var multer=require(_0xe101('0x0'));var util=require(_0xe101('0x1'));var path=require(_0xe101('0x2'));var timeout=require(_0xe101('0x3'));var express=require(_0xe101('0x4'));var router=express[_0xe101('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xe101('0x6'));var interaction=require(_0xe101('0x7'));var config=require('../../config/environment');var controller=require('./userProfileSection.controller');router[_0xe101('0x8')]('/',auth['isAuthenticated'](),controller[_0xe101('0x9')]);router['get'](_0xe101('0xa'),auth[_0xe101('0xb')](),controller['describe']);router[_0xe101('0x8')]('/:id',auth[_0xe101('0xb')](),controller[_0xe101('0xc')]);router[_0xe101('0xd')]('/',auth[_0xe101('0xb')](),controller[_0xe101('0xe')]);router[_0xe101('0xf')]('/:id',auth[_0xe101('0xb')](),controller['update']);router[_0xe101('0x10')](_0xe101('0x11'),auth[_0xe101('0xb')](),controller['destroy']);module[_0xe101('0x12')]=router;
\ No newline at end of file
index 46a61df..d6ee12e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbaf0=['split','exports','STRING','INTEGER','BOOLEAN','setDataValue','crudPermissions','join','getDataValue'];(function(_0x4f98c3,_0x3d107f){var _0x13ad99=function(_0x15826f){while(--_0x15826f){_0x4f98c3['push'](_0x4f98c3['shift']());}};_0x13ad99(++_0x3d107f);}(_0xbaf0,0x12a));var _0x0baf=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0xbaf0[_0x5ddb1c];return _0x354adc;};'use strict';var Sequelize=require('sequelize');module[_0x0baf('0x0')]={'name':{'type':Sequelize[_0x0baf('0x1')],'allowNull':![]},'category':{'type':Sequelize[_0x0baf('0x1')],'allowNull':![]},'sectionId':{'type':Sequelize[_0x0baf('0x2')],'allowNull':![]},'enabled':{'type':Sequelize[_0x0baf('0x3')],'defaultValue':null},'autoAssociation':{'type':Sequelize[_0x0baf('0x3')],'defaultValue':null},'crudPermissions':{'type':Sequelize['STRING'],'set':function(_0x232cc7){this[_0x0baf('0x4')](_0x0baf('0x5'),_0x232cc7?_0x232cc7[_0x0baf('0x6')](''):[]);},'get':function(){return this[_0x0baf('0x7')](_0x0baf('0x5'))?this[_0x0baf('0x7')](_0x0baf('0x5'))[_0x0baf('0x8')](''):[];}}};
\ No newline at end of file
+var _0x4cf8=['split','sequelize','exports','STRING','INTEGER','BOOLEAN','setDataValue','crudPermissions','join','getDataValue'];(function(_0xd7c05d,_0x18c29f){var _0x2556d6=function(_0x418e45){while(--_0x418e45){_0xd7c05d['push'](_0xd7c05d['shift']());}};_0x2556d6(++_0x18c29f);}(_0x4cf8,0x1e1));var _0x84cf=function(_0x4a3acd,_0x4bf641){_0x4a3acd=_0x4a3acd-0x0;var _0x3efdaa=_0x4cf8[_0x4a3acd];return _0x3efdaa;};'use strict';var Sequelize=require(_0x84cf('0x0'));module[_0x84cf('0x1')]={'name':{'type':Sequelize[_0x84cf('0x2')],'allowNull':![]},'category':{'type':Sequelize[_0x84cf('0x2')],'allowNull':![]},'sectionId':{'type':Sequelize[_0x84cf('0x3')],'allowNull':![]},'enabled':{'type':Sequelize[_0x84cf('0x4')],'defaultValue':null},'autoAssociation':{'type':Sequelize[_0x84cf('0x4')],'defaultValue':null},'crudPermissions':{'type':Sequelize[_0x84cf('0x2')],'set':function(_0x3bbbc3){this[_0x84cf('0x5')](_0x84cf('0x6'),_0x3bbbc3?_0x3bbbc3[_0x84cf('0x7')](''):[]);},'get':function(){return this['getDataValue']('crudPermissions')?this[_0x84cf('0x8')]('crudPermissions')[_0x84cf('0x9')](''):[];}}};
\ No newline at end of file
index 41d73a0..51466e8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9220=['json','offset','undefined','count','set','Content-Range','apply','reject','save','destroy','then','error','name','send','map','UserProfileSection','type','key','model','keys','query','filters','attributes','intersection','fields','hasOwnProperty','limit','sort','where','pick','filter','merge','options','includeAll','rows','catch','show','params','rawAttributes','length','include','find','body','describe','eml-format','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end'];(function(_0x1456c0,_0x25d8a3){var _0x40c06f=function(_0x358049){while(--_0x358049){_0x1456c0['push'](_0x1456c0['shift']());}};_0x40c06f(++_0x25d8a3);}(_0x9220,0x76));var _0x0922=function(_0x616290,_0x280b7f){_0x616290=_0x616290-0x0;var _0x453879=_0x9220[_0x616290];return _0x453879;};'use strict';var emlformat=require(_0x0922('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x0922('0x1'));var rp=require(_0x0922('0x2'));var moment=require(_0x0922('0x3'));var BPromise=require(_0x0922('0x4'));var Mustache=require(_0x0922('0x5'));var util=require(_0x0922('0x6'));var path=require(_0x0922('0x7'));var sox=require(_0x0922('0x8'));var csv=require(_0x0922('0x9'));var ejs=require(_0x0922('0xa'));var fs=require('fs');var fs_extra=require(_0x0922('0xb'));var _=require(_0x0922('0xc'));var squel=require(_0x0922('0xd'));var crypto=require(_0x0922('0xe'));var jsforce=require(_0x0922('0xf'));var deskjs=require(_0x0922('0x10'));var toCsv=require(_0x0922('0x9'));var querystring=require(_0x0922('0x11'));var Papa=require(_0x0922('0x12'));var Redis=require('ioredis');var authService=require(_0x0922('0x13'));var qs=require(_0x0922('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x0922('0x15'));var logger=require(_0x0922('0x16'))(_0x0922('0x17'));var utils=require(_0x0922('0x18'));var config=require(_0x0922('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0x0922('0x1a'))['db'];function respondWithStatusCode(_0x24c4e4,_0x5ce07c){_0x5ce07c=_0x5ce07c||0xcc;return function(_0x427812){if(_0x427812){return _0x24c4e4[_0x0922('0x1b')](_0x5ce07c);}return _0x24c4e4[_0x0922('0x1c')](_0x5ce07c)[_0x0922('0x1d')]();};}function respondWithResult(_0x21cdc9,_0x5d2b44){_0x5d2b44=_0x5d2b44||0xc8;return function(_0x56c664){if(_0x56c664){return _0x21cdc9[_0x0922('0x1c')](_0x5d2b44)[_0x0922('0x1e')](_0x56c664);}};}function respondWithFilteredResult(_0x91fb02,_0x6bf0a8){return function(_0x272d6e){if(_0x272d6e){var _0x381199=typeof _0x6bf0a8[_0x0922('0x1f')]===_0x0922('0x20')&&typeof _0x6bf0a8['limit']===_0x0922('0x20');var _0x2de932=_0x272d6e[_0x0922('0x21')];var _0x2628b5=_0x381199?0x0:_0x6bf0a8[_0x0922('0x1f')];var _0x53c423=_0x381199?_0x272d6e[_0x0922('0x21')]:_0x6bf0a8[_0x0922('0x1f')]+_0x6bf0a8['limit'];var _0x4015e4;if(_0x53c423>=_0x2de932){_0x53c423=_0x2de932;_0x4015e4=0xc8;}else{_0x4015e4=0xce;}_0x91fb02['status'](_0x4015e4);return _0x91fb02[_0x0922('0x22')](_0x0922('0x23'),_0x2628b5+'-'+_0x53c423+'/'+_0x2de932)[_0x0922('0x1e')](_0x272d6e);}return null;};}function patchUpdates(_0xe3e59c){return function(_0x1a2814){try{jsonpatch[_0x0922('0x24')](_0x1a2814,_0xe3e59c,!![]);}catch(_0x5ec491){return BPromise[_0x0922('0x25')](_0x5ec491);}return _0x1a2814[_0x0922('0x26')]();};}function saveUpdates(_0x47e42f,_0x5451f4){return function(_0x2efefd){if(_0x2efefd){return _0x2efefd['update'](_0x47e42f)['then'](function(_0x58f80e){return _0x58f80e;});}return null;};}function removeEntity(_0xefe1fb,_0x215325){return function(_0x28d1cb){if(_0x28d1cb){return _0x28d1cb[_0x0922('0x27')]()[_0x0922('0x28')](function(){_0xefe1fb[_0x0922('0x1c')](0xcc)[_0x0922('0x1d')]();});}};}function handleEntityNotFound(_0x4052ce,_0xd6c2d4){return function(_0x14057f){if(!_0x14057f){_0x4052ce[_0x0922('0x1b')](0x194);}return _0x14057f;};}function handleError(_0x570ed0,_0x5ea8ed){_0x5ea8ed=_0x5ea8ed||0x1f4;return function(_0xdac59){logger[_0x0922('0x29')](_0xdac59['stack']);if(_0xdac59[_0x0922('0x2a')]){delete _0xdac59[_0x0922('0x2a')];}_0x570ed0['status'](_0x5ea8ed)[_0x0922('0x2b')](_0xdac59);};}exports['index']=function(_0x467d26,_0x138e7e){var _0x2c7054={},_0x10defd={},_0x37276a={'count':0x0,'rows':[]};var _0x53f3ec=_[_0x0922('0x2c')](db[_0x0922('0x2d')]['rawAttributes'],function(_0x1f2862){return{'name':_0x1f2862['fieldName'],'type':_0x1f2862[_0x0922('0x2e')][_0x0922('0x2f')]};});_0x10defd[_0x0922('0x30')]=_[_0x0922('0x2c')](_0x53f3ec,_0x0922('0x2a'));_0x10defd['query']=_[_0x0922('0x31')](_0x467d26[_0x0922('0x32')]);_0x10defd[_0x0922('0x33')]=_['intersection'](_0x10defd['model'],_0x10defd['query']);_0x2c7054[_0x0922('0x34')]=_[_0x0922('0x35')](_0x10defd['model'],qs['fields'](_0x467d26[_0x0922('0x32')][_0x0922('0x36')]));_0x2c7054[_0x0922('0x34')]=_0x2c7054[_0x0922('0x34')]['length']?_0x2c7054[_0x0922('0x34')]:_0x10defd[_0x0922('0x30')];if(!_0x467d26[_0x0922('0x32')][_0x0922('0x37')]('nolimit')){_0x2c7054['limit']=qs['limit'](_0x467d26[_0x0922('0x32')][_0x0922('0x38')]);_0x2c7054[_0x0922('0x1f')]=qs[_0x0922('0x1f')](_0x467d26[_0x0922('0x32')]['offset']);}_0x2c7054['order']=qs[_0x0922('0x39')](_0x467d26[_0x0922('0x32')][_0x0922('0x39')]);_0x2c7054[_0x0922('0x3a')]=qs[_0x0922('0x33')](_[_0x0922('0x3b')](_0x467d26[_0x0922('0x32')],_0x10defd[_0x0922('0x33')]),_0x53f3ec);if(_0x467d26[_0x0922('0x32')][_0x0922('0x3c')]){_0x2c7054['where']=_[_0x0922('0x3d')](_0x2c7054['where'],{'$or':_[_0x0922('0x2c')](_0x53f3ec,function(_0x3ec9b0){if(_0x3ec9b0[_0x0922('0x2e')]!=='VIRTUAL'){var _0x46780b={};_0x46780b[_0x3ec9b0['name']]={'$like':'%'+_0x467d26['query']['filter']+'%'};return _0x46780b;}})});}_0x2c7054=_['merge']({},_0x2c7054,_0x467d26[_0x0922('0x3e')]);var _0x492eab={'where':_0x2c7054[_0x0922('0x3a')]};return db[_0x0922('0x2d')][_0x0922('0x21')](_0x492eab)[_0x0922('0x28')](function(_0x214b8c){_0x37276a['count']=_0x214b8c;if(_0x467d26[_0x0922('0x32')][_0x0922('0x3f')]){_0x2c7054['include']=[{'all':!![]}];}return db[_0x0922('0x2d')]['findAll'](_0x2c7054);})[_0x0922('0x28')](function(_0x171af0){_0x37276a[_0x0922('0x40')]=_0x171af0;return _0x37276a;})['then'](respondWithFilteredResult(_0x138e7e,_0x2c7054))[_0x0922('0x41')](handleError(_0x138e7e,null));};exports[_0x0922('0x42')]=function(_0x3a4de6,_0x1fbf04){var _0x514650={'raw':![],'where':{'id':_0x3a4de6[_0x0922('0x43')]['id']}},_0x1f1cc1={};_0x1f1cc1['model']=_[_0x0922('0x31')](db[_0x0922('0x2d')][_0x0922('0x44')]);_0x1f1cc1['query']=_['keys'](_0x3a4de6['query']);_0x1f1cc1[_0x0922('0x33')]=_[_0x0922('0x35')](_0x1f1cc1[_0x0922('0x30')],_0x1f1cc1[_0x0922('0x32')]);_0x514650['attributes']=_[_0x0922('0x35')](_0x1f1cc1[_0x0922('0x30')],qs['fields'](_0x3a4de6[_0x0922('0x32')][_0x0922('0x36')]));_0x514650[_0x0922('0x34')]=_0x514650['attributes'][_0x0922('0x45')]?_0x514650[_0x0922('0x34')]:_0x1f1cc1[_0x0922('0x30')];if(_0x3a4de6['query']['includeAll']){_0x514650[_0x0922('0x46')]=[{'all':!![]}];}_0x514650=_[_0x0922('0x3d')]({},_0x514650,_0x3a4de6[_0x0922('0x3e')]);return db[_0x0922('0x2d')][_0x0922('0x47')](_0x514650)[_0x0922('0x28')](handleEntityNotFound(_0x1fbf04,null))[_0x0922('0x28')](respondWithResult(_0x1fbf04,null))[_0x0922('0x41')](handleError(_0x1fbf04,null));};exports['create']=function(_0x759cc4,_0xb94b3d){return db[_0x0922('0x2d')]['create'](_0x759cc4[_0x0922('0x48')],{})['then'](respondWithResult(_0xb94b3d,0xc9))[_0x0922('0x41')](handleError(_0xb94b3d,null));};exports['update']=function(_0x178c1d,_0x577866){if(_0x178c1d[_0x0922('0x48')]['id']){delete _0x178c1d['body']['id'];}return db[_0x0922('0x2d')][_0x0922('0x47')]({'where':{'id':_0x178c1d['params']['id']}})[_0x0922('0x28')](handleEntityNotFound(_0x577866,null))['then'](saveUpdates(_0x178c1d[_0x0922('0x48')],null))[_0x0922('0x28')](respondWithResult(_0x577866,null))[_0x0922('0x41')](handleError(_0x577866,null));};exports['destroy']=function(_0x2c3d6c,_0x4106a2){return db['UserProfileSection'][_0x0922('0x47')]({'where':{'id':_0x2c3d6c[_0x0922('0x43')]['id']}})[_0x0922('0x28')](handleEntityNotFound(_0x4106a2,null))[_0x0922('0x28')](removeEntity(_0x4106a2,null))[_0x0922('0x41')](handleError(_0x4106a2,null));};exports['describe']=function(_0x5ccdbb,_0x4ba581){return db[_0x0922('0x2d')][_0x0922('0x49')]()[_0x0922('0x28')](respondWithResult(_0x4ba581,null))['catch'](handleError(_0x4ba581,null));};
\ No newline at end of file
+var _0x8835=['intersection','fields','length','hasOwnProperty','order','sort','filter','where','merge','options','include','findAll','rows','show','keys','includeAll','find','catch','create','body','update','destroy','describe','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','undefined','count','offset','limit','Content-Range','apply','reject','then','end','error','stack','name','map','UserProfileSection','rawAttributes','fieldName','type','model','query','filters','attributes'];(function(_0x463741,_0x3e8521){var _0x41da54=function(_0x4e6928){while(--_0x4e6928){_0x463741['push'](_0x463741['shift']());}};_0x41da54(++_0x3e8521);}(_0x8835,0x127));var _0x5883=function(_0x527209,_0x1ad0bd){_0x527209=_0x527209-0x0;var _0x27f805=_0x8835[_0x527209];return _0x27f805;};'use strict';var emlformat=require(_0x5883('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x5883('0x1'));var jsonpatch=require(_0x5883('0x2'));var rp=require(_0x5883('0x3'));var moment=require(_0x5883('0x4'));var BPromise=require(_0x5883('0x5'));var Mustache=require(_0x5883('0x6'));var util=require(_0x5883('0x7'));var path=require(_0x5883('0x8'));var sox=require('sox');var csv=require(_0x5883('0x9'));var ejs=require(_0x5883('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x5883('0xb'));var squel=require(_0x5883('0xc'));var crypto=require(_0x5883('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x5883('0xe'));var toCsv=require('to-csv');var querystring=require(_0x5883('0xf'));var Papa=require(_0x5883('0x10'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x5883('0x11'));var as=require(_0x5883('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0x5883('0x13'));var licenseUtil=require(_0x5883('0x14'));var db=require(_0x5883('0x15'))['db'];function respondWithStatusCode(_0x337de6,_0xbbeaea){_0xbbeaea=_0xbbeaea||0xcc;return function(_0x1076aa){if(_0x1076aa){return _0x337de6[_0x5883('0x16')](_0xbbeaea);}return _0x337de6[_0x5883('0x17')](_0xbbeaea)['end']();};}function respondWithResult(_0x223295,_0x21f55e){_0x21f55e=_0x21f55e||0xc8;return function(_0xdf717a){if(_0xdf717a){return _0x223295[_0x5883('0x17')](_0x21f55e)['json'](_0xdf717a);}};}function respondWithFilteredResult(_0x1c0aca,_0x3c5dea){return function(_0x57277e){if(_0x57277e){var _0x149652=typeof _0x3c5dea['offset']==='undefined'&&typeof _0x3c5dea['limit']===_0x5883('0x18');var _0x96b84f=_0x57277e[_0x5883('0x19')];var _0x13cbaa=_0x149652?0x0:_0x3c5dea[_0x5883('0x1a')];var _0x19547d=_0x149652?_0x57277e[_0x5883('0x19')]:_0x3c5dea[_0x5883('0x1a')]+_0x3c5dea[_0x5883('0x1b')];var _0x27848c;if(_0x19547d>=_0x96b84f){_0x19547d=_0x96b84f;_0x27848c=0xc8;}else{_0x27848c=0xce;}_0x1c0aca[_0x5883('0x17')](_0x27848c);return _0x1c0aca['set'](_0x5883('0x1c'),_0x13cbaa+'-'+_0x19547d+'/'+_0x96b84f)['json'](_0x57277e);}return null;};}function patchUpdates(_0x57f653){return function(_0xe40690){try{jsonpatch[_0x5883('0x1d')](_0xe40690,_0x57f653,!![]);}catch(_0x2a768a){return BPromise[_0x5883('0x1e')](_0x2a768a);}return _0xe40690['save']();};}function saveUpdates(_0x2cb37d,_0x591bd3){return function(_0x47c672){if(_0x47c672){return _0x47c672['update'](_0x2cb37d)['then'](function(_0x4a8e80){return _0x4a8e80;});}return null;};}function removeEntity(_0x3ac754,_0x4e5ba5){return function(_0x1e0eea){if(_0x1e0eea){return _0x1e0eea['destroy']()[_0x5883('0x1f')](function(){_0x3ac754[_0x5883('0x17')](0xcc)[_0x5883('0x20')]();});}};}function handleEntityNotFound(_0xba0f7f,_0x401551){return function(_0x197cfa){if(!_0x197cfa){_0xba0f7f[_0x5883('0x16')](0x194);}return _0x197cfa;};}function handleError(_0x575a57,_0x21b671){_0x21b671=_0x21b671||0x1f4;return function(_0x2548ca){logger[_0x5883('0x21')](_0x2548ca[_0x5883('0x22')]);if(_0x2548ca[_0x5883('0x23')]){delete _0x2548ca[_0x5883('0x23')];}_0x575a57[_0x5883('0x17')](_0x21b671)['send'](_0x2548ca);};}exports['index']=function(_0xf9c119,_0x3f7e39){var _0x15faba={},_0x506d5b={},_0x366254={'count':0x0,'rows':[]};var _0x134b28=_[_0x5883('0x24')](db[_0x5883('0x25')][_0x5883('0x26')],function(_0x392caa){return{'name':_0x392caa[_0x5883('0x27')],'type':_0x392caa[_0x5883('0x28')]['key']};});_0x506d5b[_0x5883('0x29')]=_['map'](_0x134b28,_0x5883('0x23'));_0x506d5b[_0x5883('0x2a')]=_['keys'](_0xf9c119[_0x5883('0x2a')]);_0x506d5b[_0x5883('0x2b')]=_['intersection'](_0x506d5b['model'],_0x506d5b[_0x5883('0x2a')]);_0x15faba[_0x5883('0x2c')]=_[_0x5883('0x2d')](_0x506d5b['model'],qs[_0x5883('0x2e')](_0xf9c119[_0x5883('0x2a')]['fields']));_0x15faba[_0x5883('0x2c')]=_0x15faba['attributes'][_0x5883('0x2f')]?_0x15faba['attributes']:_0x506d5b[_0x5883('0x29')];if(!_0xf9c119[_0x5883('0x2a')][_0x5883('0x30')]('nolimit')){_0x15faba[_0x5883('0x1b')]=qs[_0x5883('0x1b')](_0xf9c119[_0x5883('0x2a')][_0x5883('0x1b')]);_0x15faba['offset']=qs[_0x5883('0x1a')](_0xf9c119['query'][_0x5883('0x1a')]);}_0x15faba[_0x5883('0x31')]=qs[_0x5883('0x32')](_0xf9c119[_0x5883('0x2a')][_0x5883('0x32')]);_0x15faba['where']=qs[_0x5883('0x2b')](_['pick'](_0xf9c119[_0x5883('0x2a')],_0x506d5b[_0x5883('0x2b')]),_0x134b28);if(_0xf9c119[_0x5883('0x2a')][_0x5883('0x33')]){_0x15faba[_0x5883('0x34')]=_[_0x5883('0x35')](_0x15faba[_0x5883('0x34')],{'$or':_[_0x5883('0x24')](_0x134b28,function(_0x2ae265){if(_0x2ae265[_0x5883('0x28')]!=='VIRTUAL'){var _0xcdfdf4={};_0xcdfdf4[_0x2ae265['name']]={'$like':'%'+_0xf9c119[_0x5883('0x2a')][_0x5883('0x33')]+'%'};return _0xcdfdf4;}})});}_0x15faba=_[_0x5883('0x35')]({},_0x15faba,_0xf9c119[_0x5883('0x36')]);var _0x2b35ae={'where':_0x15faba[_0x5883('0x34')]};return db['UserProfileSection']['count'](_0x2b35ae)[_0x5883('0x1f')](function(_0x4fbb77){_0x366254[_0x5883('0x19')]=_0x4fbb77;if(_0xf9c119[_0x5883('0x2a')]['includeAll']){_0x15faba[_0x5883('0x37')]=[{'all':!![]}];}return db[_0x5883('0x25')][_0x5883('0x38')](_0x15faba);})['then'](function(_0x511373){_0x366254[_0x5883('0x39')]=_0x511373;return _0x366254;})[_0x5883('0x1f')](respondWithFilteredResult(_0x3f7e39,_0x15faba))['catch'](handleError(_0x3f7e39,null));};exports[_0x5883('0x3a')]=function(_0xe50082,_0x17f709){var _0xc120fa={'raw':![],'where':{'id':_0xe50082['params']['id']}},_0x3c1670={};_0x3c1670[_0x5883('0x29')]=_[_0x5883('0x3b')](db[_0x5883('0x25')][_0x5883('0x26')]);_0x3c1670[_0x5883('0x2a')]=_[_0x5883('0x3b')](_0xe50082[_0x5883('0x2a')]);_0x3c1670['filters']=_[_0x5883('0x2d')](_0x3c1670[_0x5883('0x29')],_0x3c1670[_0x5883('0x2a')]);_0xc120fa[_0x5883('0x2c')]=_[_0x5883('0x2d')](_0x3c1670[_0x5883('0x29')],qs[_0x5883('0x2e')](_0xe50082[_0x5883('0x2a')][_0x5883('0x2e')]));_0xc120fa['attributes']=_0xc120fa[_0x5883('0x2c')]['length']?_0xc120fa['attributes']:_0x3c1670['model'];if(_0xe50082['query'][_0x5883('0x3c')]){_0xc120fa['include']=[{'all':!![]}];}_0xc120fa=_['merge']({},_0xc120fa,_0xe50082['options']);return db[_0x5883('0x25')][_0x5883('0x3d')](_0xc120fa)['then'](handleEntityNotFound(_0x17f709,null))[_0x5883('0x1f')](respondWithResult(_0x17f709,null))[_0x5883('0x3e')](handleError(_0x17f709,null));};exports[_0x5883('0x3f')]=function(_0xdc222d,_0x4929c5){return db[_0x5883('0x25')]['create'](_0xdc222d[_0x5883('0x40')],{})['then'](respondWithResult(_0x4929c5,0xc9))[_0x5883('0x3e')](handleError(_0x4929c5,null));};exports[_0x5883('0x41')]=function(_0x5db55b,_0x187d5e){if(_0x5db55b[_0x5883('0x40')]['id']){delete _0x5db55b[_0x5883('0x40')]['id'];}return db[_0x5883('0x25')][_0x5883('0x3d')]({'where':{'id':_0x5db55b['params']['id']}})[_0x5883('0x1f')](handleEntityNotFound(_0x187d5e,null))[_0x5883('0x1f')](saveUpdates(_0x5db55b[_0x5883('0x40')],null))['then'](respondWithResult(_0x187d5e,null))[_0x5883('0x3e')](handleError(_0x187d5e,null));};exports[_0x5883('0x42')]=function(_0x19cc9e,_0x2ed9fb){return db['UserProfileSection']['find']({'where':{'id':_0x19cc9e['params']['id']}})[_0x5883('0x1f')](handleEntityNotFound(_0x2ed9fb,null))['then'](removeEntity(_0x2ed9fb,null))[_0x5883('0x3e')](handleError(_0x2ed9fb,null));};exports['describe']=function(_0x3da1f1,_0x4cb2a7){return db[_0x5883('0x25')][_0x5883('0x43')]()[_0x5883('0x1f')](respondWithResult(_0x4cb2a7,null))[_0x5883('0x3e')](handleError(_0x4cb2a7,null));};
\ No newline at end of file
index 32e5f32..9ca28b1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x27d3=['api','moment','request-promise','path','rimraf','../../config/environment','./userProfileSection.attributes','exports','UserProfileSection','user_profile_has_sections','compositeIndex','sectionId','userProfileId','lodash'];(function(_0x4c8fd1,_0xc3a2ad){var _0x512295=function(_0x551268){while(--_0x551268){_0x4c8fd1['push'](_0x4c8fd1['shift']());}};_0x512295(++_0xc3a2ad);}(_0x27d3,0xa7));var _0x327d=function(_0x2112d4,_0x3c863c){_0x2112d4=_0x2112d4-0x0;var _0x434972=_0x27d3[_0x2112d4];return _0x434972;};'use strict';var _=require(_0x327d('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x327d('0x1'));var moment=require(_0x327d('0x2'));var BPromise=require('bluebird');var rp=require(_0x327d('0x3'));var fs=require('fs');var path=require(_0x327d('0x4'));var rimraf=require(_0x327d('0x5'));var config=require(_0x327d('0x6'));var attributes=require(_0x327d('0x7'));module[_0x327d('0x8')]=function(_0x202a11,_0x130a43){return _0x202a11['define'](_0x327d('0x9'),attributes,{'tableName':_0x327d('0xa'),'paranoid':![],'indexes':[{'name':_0x327d('0xb'),'fields':[_0x327d('0xc'),_0x327d('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x06ce=['request-promise','path','define','UserProfileSection','user_profile_has_sections','sectionId','userProfileId','lodash','util','api','moment','bluebird'];(function(_0x1035c1,_0x2d8583){var _0x308d67=function(_0x58ddb6){while(--_0x58ddb6){_0x1035c1['push'](_0x1035c1['shift']());}};_0x308d67(++_0x2d8583);}(_0x06ce,0x1db));var _0xe06c=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0x06ce[_0x2f5ac5];return _0x37c9a8;};'use strict';var _=require(_0xe06c('0x0'));var util=require(_0xe06c('0x1'));var logger=require('../../config/logger')(_0xe06c('0x2'));var moment=require(_0xe06c('0x3'));var BPromise=require(_0xe06c('0x4'));var rp=require(_0xe06c('0x5'));var fs=require('fs');var path=require(_0xe06c('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./userProfileSection.attributes');module['exports']=function(_0x1edb71,_0x313773){return _0x1edb71[_0xe06c('0x7')](_0xe06c('0x8'),attributes,{'tableName':_0xe06c('0x9'),'paranoid':![],'indexes':[{'name':'compositeIndex','fields':[_0xe06c('0xa'),_0xe06c('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
index f761ec9..e4db22b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x63cb=['UserProfileSection,\x20%s,\x20%s','debug','UserProfileSection,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info'];(function(_0x2d9e27,_0x5965b2){var _0xd35381=function(_0x343d18){while(--_0x343d18){_0x2d9e27['push'](_0x2d9e27['shift']());}};_0xd35381(++_0x5965b2);}(_0x63cb,0x158));var _0xb63c=function(_0x2dadb9,_0x42cfe6){_0x2dadb9=_0x2dadb9-0x0;var _0x2f0097=_0x63cb[_0x2dadb9];return _0x2f0097;};'use strict';var _=require(_0xb63c('0x0'));var util=require(_0xb63c('0x1'));var moment=require(_0xb63c('0x2'));var BPromise=require(_0xb63c('0x3'));var rs=require(_0xb63c('0x4'));var fs=require('fs');var Redis=require(_0xb63c('0x5'));var db=require(_0xb63c('0x6'))['db'];var utils=require(_0xb63c('0x7'));var logger=require(_0xb63c('0x8'))(_0xb63c('0x9'));var config=require(_0xb63c('0xa'));var jayson=require(_0xb63c('0xb'));var client=jayson[_0xb63c('0xc')][_0xb63c('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x5089c3,_0x2c061c,_0x501f9f){return new BPromise(function(_0xb80c53,_0x416bf2){return client[_0xb63c('0xe')](_0x5089c3,_0x501f9f)['then'](function(_0x27890e){logger[_0xb63c('0xf')](_0xb63c('0x10'),_0x2c061c,'request\x20sent');logger[_0xb63c('0x11')](_0xb63c('0x12'),_0x2c061c,_0xb63c('0x13'),JSON['stringify'](_0x27890e));if(_0x27890e[_0xb63c('0x14')]){if(_0x27890e['error'][_0xb63c('0x15')]===0x1f4){logger[_0xb63c('0x14')](_0xb63c('0x10'),_0x2c061c,_0x27890e[_0xb63c('0x14')][_0xb63c('0x16')]);return _0x416bf2(_0x27890e[_0xb63c('0x14')][_0xb63c('0x16')]);}logger[_0xb63c('0x14')](_0xb63c('0x10'),_0x2c061c,_0x27890e[_0xb63c('0x14')][_0xb63c('0x16')]);return _0xb80c53(_0x27890e[_0xb63c('0x14')][_0xb63c('0x16')]);}else{logger[_0xb63c('0xf')](_0xb63c('0x10'),_0x2c061c,_0xb63c('0x13'));_0xb80c53(_0x27890e['result'][_0xb63c('0x16')]);}})[_0xb63c('0x17')](function(_0x59b490){logger['error'](_0xb63c('0x10'),_0x2c061c,_0x59b490);_0x416bf2(_0x59b490);});});}
\ No newline at end of file
+var _0x8274=['code','message','request\x20sent','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http','request','info','UserProfileSection,\x20%s,\x20%s','debug','stringify','error'];(function(_0x720b49,_0x4b4106){var _0x57f8bc=function(_0x5c6efd){while(--_0x5c6efd){_0x720b49['push'](_0x720b49['shift']());}};_0x57f8bc(++_0x4b4106);}(_0x8274,0x14f));var _0x4827=function(_0x1e5e1a,_0x4a678c){_0x1e5e1a=_0x1e5e1a-0x0;var _0x43f280=_0x8274[_0x1e5e1a];return _0x43f280;};'use strict';var _=require(_0x4827('0x0'));var util=require(_0x4827('0x1'));var moment=require(_0x4827('0x2'));var BPromise=require(_0x4827('0x3'));var rs=require(_0x4827('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4827('0x5'))['db'];var utils=require(_0x4827('0x6'));var logger=require(_0x4827('0x7'))('rpc');var config=require(_0x4827('0x8'));var jayson=require(_0x4827('0x9'));var client=jayson['client'][_0x4827('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xafb959,_0x137f5e,_0x2ca396){return new BPromise(function(_0x1f6bd1,_0x1b30f2){return client[_0x4827('0xb')](_0xafb959,_0x2ca396)['then'](function(_0x15f1f1){logger[_0x4827('0xc')](_0x4827('0xd'),_0x137f5e,'request\x20sent');logger[_0x4827('0xe')]('UserProfileSection,\x20%s,\x20%s,\x20%s',_0x137f5e,'request\x20sent',JSON[_0x4827('0xf')](_0x15f1f1));if(_0x15f1f1[_0x4827('0x10')]){if(_0x15f1f1[_0x4827('0x10')][_0x4827('0x11')]===0x1f4){logger['error'](_0x4827('0xd'),_0x137f5e,_0x15f1f1[_0x4827('0x10')]['message']);return _0x1b30f2(_0x15f1f1[_0x4827('0x10')]['message']);}logger[_0x4827('0x10')](_0x4827('0xd'),_0x137f5e,_0x15f1f1[_0x4827('0x10')][_0x4827('0x12')]);return _0x1f6bd1(_0x15f1f1[_0x4827('0x10')]['message']);}else{logger[_0x4827('0xc')]('UserProfileSection,\x20%s,\x20%s',_0x137f5e,_0x4827('0x13'));_0x1f6bd1(_0x15f1f1[_0x4827('0x14')][_0x4827('0x12')]);}})[_0x4827('0x15')](function(_0x552c6c){logger[_0x4827('0x10')](_0x4827('0xd'),_0x137f5e,_0x552c6c);_0x1b30f2(_0x552c6c);});});}
\ No newline at end of file
index 03c41be..acf937f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['../../components/interaction/service','../../config/environment','exports','multer','util','path','Router','../../components/auth/service'];(function(_0x32b425,_0xad2119){var _0x2ed879=function(_0x1f5c7a){while(--_0x1f5c7a){_0x32b425['push'](_0x32b425['shift']());}};_0x2ed879(++_0xad2119);}(_0xa9e0,0x123));var _0x0a9e=function(_0x220dbb,_0x99328d){_0x220dbb=_0x220dbb-0x0;var _0x2b77de=_0xa9e0[_0x220dbb];return _0x2b77de;};'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
+var _0x9c44=['express','Router','fs-extra','../../components/auth/service','exports','path','connect-timeout'];(function(_0x595add,_0x15feb9){var _0x52eb1a=function(_0x32fcec){while(--_0x32fcec){_0x595add['push'](_0x595add['shift']());}};_0x52eb1a(++_0x15feb9);}(_0x9c44,0x178));var _0x49c4=function(_0x3d42d8,_0x4cffaa){_0x3d42d8=_0x3d42d8-0x0;var _0x27fc41=_0x9c44[_0x3d42d8];return _0x27fc41;};'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 0415ca6..9264045 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1b4e=['sequelize','exports','INTEGER'];(function(_0x2e0e96,_0x52a2dc){var _0x56c085=function(_0x416c63){while(--_0x416c63){_0x2e0e96['push'](_0x2e0e96['shift']());}};_0x56c085(++_0x52a2dc);}(_0x1b4e,0x1ad));var _0xe1b4=function(_0x3d2cd2,_0x554af7){_0x3d2cd2=_0x3d2cd2-0x0;var _0x3afdf6=_0x1b4e[_0x3d2cd2];return _0x3afdf6;};'use strict';var Sequelize=require(_0xe1b4('0x0'));module[_0xe1b4('0x1')]={'penalty':{'type':Sequelize[_0xe1b4('0x2')],'defaultValue':0x0}};
\ No newline at end of file
+var _0xd790=['INTEGER','sequelize','exports'];(function(_0x5256d6,_0x5ef4af){var _0x50b792=function(_0x5cb615){while(--_0x5cb615){_0x5256d6['push'](_0x5256d6['shift']());}};_0x50b792(++_0x5ef4af);}(_0xd790,0xaf));var _0x0d79=function(_0xc3ca5e,_0x184b39){_0xc3ca5e=_0xc3ca5e-0x0;var _0x2a7387=_0xd790[_0xc3ca5e];return _0x2a7387;};'use strict';var Sequelize=require(_0x0d79('0x0'));module[_0x0d79('0x1')]={'penalty':{'type':Sequelize[_0x0d79('0x2')],'defaultValue':0x0}};
\ No newline at end of file
index 4bcad1f..b8e79f8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6455=['request-promise','path','../../config/environment','./userSmsQueue.attributes','exports','define','UserSmsQueue','user_has_sms_queues','lodash','../../config/logger','api','moment','bluebird'];(function(_0x4e7ad4,_0x232fd2){var _0x57ef9e=function(_0x1a7edf){while(--_0x1a7edf){_0x4e7ad4['push'](_0x4e7ad4['shift']());}};_0x57ef9e(++_0x232fd2);}(_0x6455,0x97));var _0x5645=function(_0x1aa845,_0x555da5){_0x1aa845=_0x1aa845-0x0;var _0x550a3d=_0x6455[_0x1aa845];return _0x550a3d;};'use strict';var _=require(_0x5645('0x0'));var util=require('util');var logger=require(_0x5645('0x1'))(_0x5645('0x2'));var moment=require(_0x5645('0x3'));var BPromise=require(_0x5645('0x4'));var rp=require(_0x5645('0x5'));var fs=require('fs');var path=require(_0x5645('0x6'));var rimraf=require('rimraf');var config=require(_0x5645('0x7'));var attributes=require(_0x5645('0x8'));module[_0x5645('0x9')]=function(_0x9400a8,_0x3a635d){return _0x9400a8[_0x5645('0xa')](_0x5645('0xb'),attributes,{'tableName':_0x5645('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x71ab=['exports','define','UserSmsQueue','user_has_sms_queues','util','api','bluebird','request-promise','path','rimraf','../../config/environment','./userSmsQueue.attributes'];(function(_0x2e204e,_0x11af47){var _0x3fa6da=function(_0x4a8383){while(--_0x4a8383){_0x2e204e['push'](_0x2e204e['shift']());}};_0x3fa6da(++_0x11af47);}(_0x71ab,0x64));var _0xb71a=function(_0x126558,_0x143c9a){_0x126558=_0x126558-0x0;var _0x1f6d14=_0x71ab[_0x126558];return _0x1f6d14;};'use strict';var _=require('lodash');var util=require(_0xb71a('0x0'));var logger=require('../../config/logger')(_0xb71a('0x1'));var moment=require('moment');var BPromise=require(_0xb71a('0x2'));var rp=require(_0xb71a('0x3'));var fs=require('fs');var path=require(_0xb71a('0x4'));var rimraf=require(_0xb71a('0x5'));var config=require(_0xb71a('0x6'));var attributes=require(_0xb71a('0x7'));module[_0xb71a('0x8')]=function(_0x38d931,_0x22c072){return _0x38d931[_0xb71a('0x9')](_0xb71a('0xa'),attributes,{'tableName':_0xb71a('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 971b077..c944038 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x581d=['client','http','request','info','UserSmsQueue,\x20%s,\x20%s','request\x20sent','debug','UserSmsQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','bluebird','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise'];(function(_0x8b8564,_0x162976){var _0x360c61=function(_0x164cc9){while(--_0x164cc9){_0x8b8564['push'](_0x8b8564['shift']());}};_0x360c61(++_0x162976);}(_0x581d,0x66));var _0xd581=function(_0x47e4be,_0x31e514){_0x47e4be=_0x47e4be-0x0;var _0xefd11=_0x581d[_0x47e4be];return _0xefd11;};'use strict';var _=require(_0xd581('0x0'));var util=require(_0xd581('0x1'));var moment=require('moment');var BPromise=require(_0xd581('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xd581('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xd581('0x4'));var logger=require(_0xd581('0x5'))('rpc');var config=require(_0xd581('0x6'));var jayson=require(_0xd581('0x7'));var client=jayson[_0xd581('0x8')][_0xd581('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4f699f,_0x2bc5a1,_0x5021c3){return new BPromise(function(_0x19eb51,_0x4700b6){return client[_0xd581('0xa')](_0x4f699f,_0x5021c3)['then'](function(_0x44f90e){logger[_0xd581('0xb')](_0xd581('0xc'),_0x2bc5a1,_0xd581('0xd'));logger[_0xd581('0xe')](_0xd581('0xf'),_0x2bc5a1,_0xd581('0xd'),JSON[_0xd581('0x10')](_0x44f90e));if(_0x44f90e[_0xd581('0x11')]){if(_0x44f90e[_0xd581('0x11')][_0xd581('0x12')]===0x1f4){logger[_0xd581('0x11')](_0xd581('0xc'),_0x2bc5a1,_0x44f90e[_0xd581('0x11')]['message']);return _0x4700b6(_0x44f90e[_0xd581('0x11')][_0xd581('0x13')]);}logger['error'](_0xd581('0xc'),_0x2bc5a1,_0x44f90e[_0xd581('0x11')][_0xd581('0x13')]);return _0x19eb51(_0x44f90e[_0xd581('0x11')]['message']);}else{logger[_0xd581('0xb')](_0xd581('0xc'),_0x2bc5a1,_0xd581('0xd'));_0x19eb51(_0x44f90e[_0xd581('0x14')][_0xd581('0x13')]);}})[_0xd581('0x15')](function(_0x2565e3){logger[_0xd581('0x11')](_0xd581('0xc'),_0x2bc5a1,_0x2565e3);_0x4700b6(_0x2565e3);});});}
\ No newline at end of file
+var _0x12f1=['jayson/promise','client','http','then','info','UserSmsQueue,\x20%s,\x20%s','debug','UserSmsQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0xaec147,_0x503b84){var _0x23a2e7=function(_0x3ea36f){while(--_0x3ea36f){_0xaec147['push'](_0xaec147['shift']());}};_0x23a2e7(++_0x503b84);}(_0x12f1,0x184));var _0x112f=function(_0x5b43ac,_0x9424bc){_0x5b43ac=_0x5b43ac-0x0;var _0x2f0a71=_0x12f1[_0x5b43ac];return _0x2f0a71;};'use strict';var _=require('lodash');var util=require(_0x112f('0x0'));var moment=require(_0x112f('0x1'));var BPromise=require(_0x112f('0x2'));var rs=require(_0x112f('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x112f('0x4'))['db'];var utils=require(_0x112f('0x5'));var logger=require(_0x112f('0x6'))(_0x112f('0x7'));var config=require('../../config/environment');var jayson=require(_0x112f('0x8'));var client=jayson[_0x112f('0x9')][_0x112f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4b9460,_0x3c5e09,_0x3425f7){return new BPromise(function(_0x3b4829,_0x341b8b){return client['request'](_0x4b9460,_0x3425f7)[_0x112f('0xb')](function(_0x1b4071){logger[_0x112f('0xc')](_0x112f('0xd'),_0x3c5e09,'request\x20sent');logger[_0x112f('0xe')](_0x112f('0xf'),_0x3c5e09,_0x112f('0x10'),JSON[_0x112f('0x11')](_0x1b4071));if(_0x1b4071[_0x112f('0x12')]){if(_0x1b4071[_0x112f('0x12')][_0x112f('0x13')]===0x1f4){logger[_0x112f('0x12')](_0x112f('0xd'),_0x3c5e09,_0x1b4071['error'][_0x112f('0x14')]);return _0x341b8b(_0x1b4071[_0x112f('0x12')]['message']);}logger['error'](_0x112f('0xd'),_0x3c5e09,_0x1b4071[_0x112f('0x12')][_0x112f('0x14')]);return _0x3b4829(_0x1b4071['error'][_0x112f('0x14')]);}else{logger[_0x112f('0xc')](_0x112f('0xd'),_0x3c5e09,_0x112f('0x10'));_0x3b4829(_0x1b4071['result'][_0x112f('0x14')]);}})[_0x112f('0x15')](function(_0x846314){logger[_0x112f('0x12')](_0x112f('0xd'),_0x3c5e09,_0x846314);_0x341b8b(_0x846314);});});}
\ No newline at end of file
index 39b28af..265d4f5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x918b=['exports','INTEGER'];(function(_0x4bfc9f,_0x3635d8){var _0x22627f=function(_0x1e2aaf){while(--_0x1e2aaf){_0x4bfc9f['push'](_0x4bfc9f['shift']());}};_0x22627f(++_0x3635d8);}(_0x918b,0x1dc));var _0xb918=function(_0x1c31f4,_0x8e8aeb){_0x1c31f4=_0x1c31f4-0x0;var _0x5a3f66=_0x918b[_0x1c31f4];return _0x5a3f66;};'use strict';var Sequelize=require('sequelize');module[_0xb918('0x0')]={'UserId':{'type':Sequelize[_0xb918('0x1')]},'VoicePrefixId':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
+var _0xdc5b=['exports','INTEGER'];(function(_0x28add5,_0x3bcdd7){var _0x2eb5f7=function(_0x996ef){while(--_0x996ef){_0x28add5['push'](_0x28add5['shift']());}};_0x2eb5f7(++_0x3bcdd7);}(_0xdc5b,0x98));var _0xbdc5=function(_0x5f0d94,_0x5618be){_0x5f0d94=_0x5f0d94-0x0;var _0x4fe50d=_0xdc5b[_0x5f0d94];return _0x4fe50d;};'use strict';var Sequelize=require('sequelize');module[_0xbdc5('0x0')]={'UserId':{'type':Sequelize[_0xbdc5('0x1')]},'VoicePrefixId':{'type':Sequelize[_0xbdc5('0x1')]}};
\ No newline at end of file
index c6622f8..6820cb8 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(_0x4820df,_0x158dd4){var _0x8886ae=function(_0x425dda){while(--_0x425dda){_0x4820df['push'](_0x4820df['shift']());}};_0x8886ae(++_0x158dd4);}(_0xa9e0,0x123));var _0x0a9e=function(_0xbe200f,_0x4b50eb){_0xbe200f=_0xbe200f-0x0;var _0x192597=_0xa9e0[_0xbe200f];return _0x192597;};'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(_0x374152,_0x3a5889){var _0x280bb5=function(_0x158849){while(--_0x158849){_0x374152['push'](_0x374152['shift']());}};_0x280bb5(++_0x3a5889);}(_0xa9e0,0x123));var _0x0a9e=function(_0x12d033,_0x25fa2f){_0x12d033=_0x12d033-0x0;var _0x3b4e80=_0xa9e0[_0x12d033];return _0x3b4e80;};'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 4a13ecf..fb2dcb6 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(_0x15fb4d,_0x37b59f){var _0x2d49ca=function(_0x1b9512){while(--_0x1b9512){_0x15fb4d['push'](_0x15fb4d['shift']());}};_0x2d49ca(++_0x37b59f);}(_0xe706,0xa3));var _0x6e70=function(_0x2cf818,_0x1cd613){_0x2cf818=_0x2cf818-0x0;var _0x4c1fc7=_0xe706[_0x2cf818];return _0x4c1fc7;};'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(_0x5dd0d3,_0x304e93){var _0x5bd978=function(_0x29cd88){while(--_0x29cd88){_0x5dd0d3['push'](_0x5dd0d3['shift']());}};_0x5bd978(++_0x304e93);}(_0xa9e0,0x123));var _0x0a9e=function(_0x37bd26,_0x5ad346){_0x37bd26=_0x37bd26-0x0;var _0xe83dc4=_0xa9e0[_0x37bd26];return _0xe83dc4;};'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 d0e52c0..a7a0be0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4917=['INTEGER'];(function(_0x22bd5e,_0x316e73){var _0x3b5777=function(_0x453249){while(--_0x453249){_0x22bd5e['push'](_0x22bd5e['shift']());}};_0x3b5777(++_0x316e73);}(_0x4917,0x141));var _0x7491=function(_0x464a17,_0x463917){_0x464a17=_0x464a17-0x0;var _0x236b0e=_0x4917[_0x464a17];return _0x236b0e;};'use strict';var Sequelize=require('sequelize');module['exports']={'penalty':{'type':Sequelize[_0x7491('0x0')],'defaultValue':0x0}};
\ No newline at end of file
+var _0xd1d3=['exports','INTEGER'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0xd1d3,0x7a));var _0x3d1d=function(_0x506f24,_0x2f471b){_0x506f24=_0x506f24-0x0;var _0x1d4d59=_0xd1d3[_0x506f24];return _0x1d4d59;};'use strict';var Sequelize=require('sequelize');module[_0x3d1d('0x0')]={'penalty':{'type':Sequelize[_0x3d1d('0x1')],'defaultValue':0x0}};
\ No newline at end of file
index 9d00676..a9c43fc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x47dc=['request-promise','../../config/environment','./userVoiceQueue.attributes','exports','UserVoiceQueue','user_has_voice_queues','util','../../config/logger','api','bluebird'];(function(_0x18f152,_0x41585a){var _0xa10b34=function(_0x1e9798){while(--_0x1e9798){_0x18f152['push'](_0x18f152['shift']());}};_0xa10b34(++_0x41585a);}(_0x47dc,0x10a));var _0xc47d=function(_0x41b5cb,_0x4e8d48){_0x41b5cb=_0x41b5cb-0x0;var _0x407c26=_0x47dc[_0x41b5cb];return _0x407c26;};'use strict';var _=require('lodash');var util=require(_0xc47d('0x0'));var logger=require(_0xc47d('0x1'))(_0xc47d('0x2'));var moment=require('moment');var BPromise=require(_0xc47d('0x3'));var rp=require(_0xc47d('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xc47d('0x5'));var attributes=require(_0xc47d('0x6'));module[_0xc47d('0x7')]=function(_0x3fc58d,_0xb9e972){return _0x3fc58d['define'](_0xc47d('0x8'),attributes,{'tableName':_0xc47d('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x7f92=['util','api','bluebird','request-promise','path','rimraf','../../config/environment','define','lodash'];(function(_0x5681a9,_0x27cee8){var _0x273d96=function(_0x1d3fbb){while(--_0x1d3fbb){_0x5681a9['push'](_0x5681a9['shift']());}};_0x273d96(++_0x27cee8);}(_0x7f92,0xd7));var _0x27f9=function(_0xcceba1,_0x56d63b){_0xcceba1=_0xcceba1-0x0;var _0x529b91=_0x7f92[_0xcceba1];return _0x529b91;};'use strict';var _=require(_0x27f9('0x0'));var util=require(_0x27f9('0x1'));var logger=require('../../config/logger')(_0x27f9('0x2'));var moment=require('moment');var BPromise=require(_0x27f9('0x3'));var rp=require(_0x27f9('0x4'));var fs=require('fs');var path=require(_0x27f9('0x5'));var rimraf=require(_0x27f9('0x6'));var config=require(_0x27f9('0x7'));var attributes=require('./userVoiceQueue.attributes');module['exports']=function(_0x1d20fb,_0x14feb2){return _0x1d20fb[_0x27f9('0x8')]('UserVoiceQueue',attributes,{'tableName':'user_has_voice_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 763df2d..ff3fc67 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x63f9=['catch','lodash','moment','bluebird','randomstring','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','UserVoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','UserVoiceQueue,\x20%s,\x20%s','message'];(function(_0x50ed15,_0x1581d4){var _0x473226=function(_0xe8235b){while(--_0xe8235b){_0x50ed15['push'](_0x50ed15['shift']());}};_0x473226(++_0x1581d4);}(_0x63f9,0x161));var _0x963f=function(_0x509773,_0x12434e){_0x509773=_0x509773-0x0;var _0x194f82=_0x63f9[_0x509773];return _0x194f82;};'use strict';var _=require(_0x963f('0x0'));var util=require('util');var moment=require(_0x963f('0x1'));var BPromise=require(_0x963f('0x2'));var rs=require(_0x963f('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x963f('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x963f('0x5'));var config=require(_0x963f('0x6'));var jayson=require(_0x963f('0x7'));var client=jayson[_0x963f('0x8')][_0x963f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3d3fbb,_0x78eca7,_0x57725e){return new BPromise(function(_0xff9ee4,_0x137aa0){return client[_0x963f('0xa')](_0x3d3fbb,_0x57725e)[_0x963f('0xb')](function(_0x37be2e){logger[_0x963f('0xc')]('UserVoiceQueue,\x20%s,\x20%s',_0x78eca7,_0x963f('0xd'));logger[_0x963f('0xe')](_0x963f('0xf'),_0x78eca7,_0x963f('0xd'),JSON[_0x963f('0x10')](_0x37be2e));if(_0x37be2e['error']){if(_0x37be2e[_0x963f('0x11')][_0x963f('0x12')]===0x1f4){logger['error'](_0x963f('0x13'),_0x78eca7,_0x37be2e['error'][_0x963f('0x14')]);return _0x137aa0(_0x37be2e[_0x963f('0x11')]['message']);}logger[_0x963f('0x11')](_0x963f('0x13'),_0x78eca7,_0x37be2e[_0x963f('0x11')]['message']);return _0xff9ee4(_0x37be2e[_0x963f('0x11')][_0x963f('0x14')]);}else{logger['info'](_0x963f('0x13'),_0x78eca7,_0x963f('0xd'));_0xff9ee4(_0x37be2e['result'][_0x963f('0x14')]);}})[_0x963f('0x15')](function(_0x1e5fb7){logger['error'](_0x963f('0x13'),_0x78eca7,_0x1e5fb7);_0x137aa0(_0x1e5fb7);});});}
\ No newline at end of file
+var _0x55ad=['rpc','../../config/environment','client','http','request','then','request\x20sent','debug','UserVoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','UserVoiceQueue,\x20%s,\x20%s','message','info','result','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x2511e7,_0x1fb1ed){var _0x377f5e=function(_0x109472){while(--_0x109472){_0x2511e7['push'](_0x2511e7['shift']());}};_0x377f5e(++_0x1fb1ed);}(_0x55ad,0x197));var _0xd55a=function(_0x320465,_0x7165da){_0x320465=_0x320465-0x0;var _0x1b0882=_0x55ad[_0x320465];return _0x1b0882;};'use strict';var _=require('lodash');var util=require(_0xd55a('0x0'));var moment=require(_0xd55a('0x1'));var BPromise=require('bluebird');var rs=require(_0xd55a('0x2'));var fs=require('fs');var Redis=require(_0xd55a('0x3'));var db=require(_0xd55a('0x4'))['db'];var utils=require(_0xd55a('0x5'));var logger=require(_0xd55a('0x6'))(_0xd55a('0x7'));var config=require(_0xd55a('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xd55a('0x9')][_0xd55a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3f9a45,_0x478e12,_0x33fc0a){return new BPromise(function(_0x56eb8f,_0xe74df4){return client[_0xd55a('0xb')](_0x3f9a45,_0x33fc0a)[_0xd55a('0xc')](function(_0xd63ef2){logger['info']('UserVoiceQueue,\x20%s,\x20%s',_0x478e12,_0xd55a('0xd'));logger[_0xd55a('0xe')](_0xd55a('0xf'),_0x478e12,'request\x20sent',JSON[_0xd55a('0x10')](_0xd63ef2));if(_0xd63ef2[_0xd55a('0x11')]){if(_0xd63ef2[_0xd55a('0x11')][_0xd55a('0x12')]===0x1f4){logger[_0xd55a('0x11')](_0xd55a('0x13'),_0x478e12,_0xd63ef2[_0xd55a('0x11')]['message']);return _0xe74df4(_0xd63ef2[_0xd55a('0x11')][_0xd55a('0x14')]);}logger[_0xd55a('0x11')]('UserVoiceQueue,\x20%s,\x20%s',_0x478e12,_0xd63ef2[_0xd55a('0x11')]['message']);return _0x56eb8f(_0xd63ef2[_0xd55a('0x11')][_0xd55a('0x14')]);}else{logger[_0xd55a('0x15')]('UserVoiceQueue,\x20%s,\x20%s',_0x478e12,_0xd55a('0xd'));_0x56eb8f(_0xd63ef2[_0xd55a('0x16')][_0xd55a('0x14')]);}})['catch'](function(_0x46206d){logger[_0xd55a('0x11')](_0xd55a('0x13'),_0x478e12,_0x46206d);_0xe74df4(_0x46206d);});});}
\ No newline at end of file
index 597f7ef..3c68e59 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(_0x4ce35c,_0x308e76){var _0x4eac15=function(_0x5ae7b0){while(--_0x5ae7b0){_0x4ce35c['push'](_0x4ce35c['shift']());}};_0x4eac15(++_0x308e76);}(_0x70e0,0x17b));var _0x070e=function(_0x551b6f,_0x5bf136){_0x551b6f=_0x551b6f-0x0;var _0x5ccb20=_0x70e0[_0x551b6f];return _0x5ccb20;};'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 _0x9c44=['express','Router','fs-extra','../../components/auth/service','exports','path','connect-timeout'];(function(_0x46640c,_0x4d27c5){var _0x32fb77=function(_0x2384b6){while(--_0x2384b6){_0x46640c['push'](_0x46640c['shift']());}};_0x32fb77(++_0x4d27c5);}(_0x9c44,0x178));var _0x49c4=function(_0x273c39,_0x1052e6){_0x273c39=_0x273c39-0x0;var _0x46d6b5=_0x9c44[_0x273c39];return _0x46d6b5;};'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 66a6148..ef5cf4f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x501b=['sequelize','exports','INTEGER','Required\x20by\x20Asterisk','STRING','queue_interface'];(function(_0x4d613c,_0x55f220){var _0x301fe3=function(_0x5eec0b){while(--_0x5eec0b){_0x4d613c['push'](_0x4d613c['shift']());}};_0x301fe3(++_0x55f220);}(_0x501b,0xd2));var _0xb501=function(_0x719235,_0x41971c){_0x719235=_0x719235-0x0;var _0x48c54c=_0x501b[_0x719235];return _0x48c54c;};'use strict';var Sequelize=require(_0xb501('0x0'));module[_0xb501('0x1')]={'uniqueid':{'type':Sequelize[_0xb501('0x2')],'primaryKey':!![],'autoIncrement':!![],'comment':_0xb501('0x3')},'membername':{'type':Sequelize[_0xb501('0x4')],'allowNull':![],'comment':_0xb501('0x3')},'UserId':{'type':Sequelize[_0xb501('0x2')],'allowNull':![]},'queue_name':{'type':Sequelize[_0xb501('0x4')],'allowNull':![],'unique':'queue_interface','comment':_0xb501('0x3')},'VoiceQueueId':{'type':Sequelize[_0xb501('0x2')],'allowNull':![]},'interface':{'type':Sequelize[_0xb501('0x4')],'allowNull':![],'unique':_0xb501('0x5'),'comment':'Required\x20by\x20Asterisk'},'penalty':{'type':Sequelize[_0xb501('0x2')](0xb),'defaultValue':0x0,'comment':_0xb501('0x3')},'paused':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0,'comment':_0xb501('0x3')}};
\ No newline at end of file
+var _0x2228=['INTEGER','STRING','Required\x20by\x20Asterisk','queue_interface'];(function(_0x49c890,_0x425615){var _0x48dbee=function(_0x3ac99f){while(--_0x3ac99f){_0x49c890['push'](_0x49c890['shift']());}};_0x48dbee(++_0x425615);}(_0x2228,0x118));var _0x8222=function(_0x4a0b3d,_0x51a79c){_0x4a0b3d=_0x4a0b3d-0x0;var _0x534053=_0x2228[_0x4a0b3d];return _0x534053;};'use strict';var Sequelize=require('sequelize');module['exports']={'uniqueid':{'type':Sequelize[_0x8222('0x0')],'primaryKey':!![],'autoIncrement':!![],'comment':'Required\x20by\x20Asterisk'},'membername':{'type':Sequelize[_0x8222('0x1')],'allowNull':![],'comment':_0x8222('0x2')},'UserId':{'type':Sequelize[_0x8222('0x0')],'allowNull':![]},'queue_name':{'type':Sequelize[_0x8222('0x1')],'allowNull':![],'unique':_0x8222('0x3'),'comment':_0x8222('0x2')},'VoiceQueueId':{'type':Sequelize[_0x8222('0x0')],'allowNull':![]},'interface':{'type':Sequelize[_0x8222('0x1')],'allowNull':![],'unique':_0x8222('0x3'),'comment':_0x8222('0x2')},'penalty':{'type':Sequelize[_0x8222('0x0')](0xb),'defaultValue':0x0,'comment':_0x8222('0x2')},'paused':{'type':Sequelize[_0x8222('0x0')](0xb),'defaultValue':0x0,'comment':_0x8222('0x2')}};
\ No newline at end of file
index 89272f2..fd90c0f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x074f=['../../mysqldb','setMaxListeners','save','update','remove','emit','exports'];(function(_0x3128af,_0xfd2d5e){var _0x37ca57=function(_0x2e3405){while(--_0x2e3405){_0x3128af['push'](_0x3128af['shift']());}};_0x37ca57(++_0xfd2d5e);}(_0x074f,0xe7));var _0xf074=function(_0x1933e5,_0x46fbdd){_0x1933e5=_0x1933e5-0x0;var _0x4d9ab6=_0x074f[_0x1933e5];return _0x4d9ab6;};'use strict';var EventEmitter=require('events');var UserVoiceQueueRt=require(_0xf074('0x0'))['db']['UserVoiceQueueRt'];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0xf074('0x1')](0x0);var events={'afterCreate':_0xf074('0x2'),'afterUpdate':_0xf074('0x3'),'afterDestroy':_0xf074('0x4')};function emitEvent(_0x3fa3ad){return function(_0x4f2134,_0x3bae5c,_0x3abde7){UserVoiceQueueRtEvents[_0xf074('0x5')](_0x3fa3ad+':'+_0x4f2134['id'],_0x4f2134);UserVoiceQueueRtEvents[_0xf074('0x5')](_0x3fa3ad,_0x4f2134);_0x3abde7(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module[_0xf074('0x6')]=UserVoiceQueueRtEvents;
\ No newline at end of file
+var _0xd5ae=['UserVoiceQueueRt','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x1b8f5a,_0x57c154){var _0x594189=function(_0x15b277){while(--_0x15b277){_0x1b8f5a['push'](_0x1b8f5a['shift']());}};_0x594189(++_0x57c154);}(_0xd5ae,0x11e));var _0xed5a=function(_0x6451c3,_0xb216c2){_0x6451c3=_0x6451c3-0x0;var _0x338723=_0xd5ae[_0x6451c3];return _0x338723;};'use strict';var EventEmitter=require(_0xed5a('0x0'));var UserVoiceQueueRt=require(_0xed5a('0x1'))['db'][_0xed5a('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xed5a('0x3'),'afterDestroy':_0xed5a('0x4')};function emitEvent(_0x12ad47){return function(_0x4f5ee9,_0xc4fe3e,_0x4017f7){UserVoiceQueueRtEvents[_0xed5a('0x5')](_0x12ad47+':'+_0x4f5ee9['id'],_0x4f5ee9);UserVoiceQueueRtEvents[_0xed5a('0x5')](_0x12ad47,_0x4f5ee9);_0x4017f7(null);};}for(var e in events){if(events[_0xed5a('0x6')](e)){var event=events[e];UserVoiceQueueRt[_0xed5a('0x7')](e,emitEvent(event));}}module[_0xed5a('0x8')]=UserVoiceQueueRtEvents;
\ No newline at end of file
index bf9b17f..60e26a7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4cb8=['path','rimraf','../../config/environment','./userVoiceQueueRt.attributes','lodash','api','moment','bluebird'];(function(_0x3b1330,_0x48a7ef){var _0x341058=function(_0x1a6438){while(--_0x1a6438){_0x3b1330['push'](_0x3b1330['shift']());}};_0x341058(++_0x48a7ef);}(_0x4cb8,0x18c));var _0x84cb=function(_0x2e0ab5,_0x454b73){_0x2e0ab5=_0x2e0ab5-0x0;var _0x464953=_0x4cb8[_0x2e0ab5];return _0x464953;};'use strict';var _=require(_0x84cb('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x84cb('0x1'));var moment=require(_0x84cb('0x2'));var BPromise=require(_0x84cb('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x84cb('0x4'));var rimraf=require(_0x84cb('0x5'));var config=require(_0x84cb('0x6'));var attributes=require(_0x84cb('0x7'));module['exports']=function(_0xde6e26,_0x4e4705){return _0xde6e26['define']('UserVoiceQueueRt',attributes,{'tableName':'user_has_voice_queues_rt','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x1ffa=['../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./userVoiceQueueRt.attributes','exports','define','UserVoiceQueueRt','user_has_voice_queues_rt','lodash','util'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x1ffa,0x16a));var _0xa1ff=function(_0x5183c5,_0x2b4655){_0x5183c5=_0x5183c5-0x0;var _0x50028d=_0x1ffa[_0x5183c5];return _0x50028d;};'use strict';var _=require(_0xa1ff('0x0'));var util=require(_0xa1ff('0x1'));var logger=require(_0xa1ff('0x2'))(_0xa1ff('0x3'));var moment=require(_0xa1ff('0x4'));var BPromise=require(_0xa1ff('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xa1ff('0x6'));var rimraf=require(_0xa1ff('0x7'));var config=require(_0xa1ff('0x8'));var attributes=require(_0xa1ff('0x9'));module[_0xa1ff('0xa')]=function(_0x546e8a,_0x39bac7){return _0x546e8a[_0xa1ff('0xb')](_0xa1ff('0xc'),attributes,{'tableName':_0xa1ff('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 883a24c..a47716e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaea9=['UserVoiceQueueRt','findAll','options','raw','where','sequelize','literal','outboundQueuePauses','lodash','util','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','redis','defaults','localhost','./userVoiceQueueRt.socket','register','then','UserVoiceQueueRt,\x20%s,\x20%s','request\x20sent','debug','UserVoiceQueueRt,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch','GetVoiceQueueRtPauses'];(function(_0x4121d1,_0x4289d7){var _0x19bd71=function(_0x311123){while(--_0x311123){_0x4121d1['push'](_0x4121d1['shift']());}};_0x19bd71(++_0x4289d7);}(_0xaea9,0x189));var _0x9aea=function(_0x18a79d,_0x57bd2c){_0x18a79d=_0x18a79d-0x0;var _0x4f8848=_0xaea9[_0x18a79d];return _0x4f8848;};'use strict';var _=require(_0x9aea('0x0'));var util=require(_0x9aea('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x9aea('0x2'));var fs=require('fs');var Redis=require(_0x9aea('0x3'));var db=require(_0x9aea('0x4'))['db'];var utils=require(_0x9aea('0x5'));var logger=require('../../config/logger')(_0x9aea('0x6'));var config=require('../../config/environment');var jayson=require(_0x9aea('0x7'));var client=jayson[_0x9aea('0x8')][_0x9aea('0x9')]({'port':0x232a});config[_0x9aea('0xa')]=_[_0x9aea('0xb')](config[_0x9aea('0xa')],{'host':_0x9aea('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x9aea('0xa')]));require(_0x9aea('0xd'))[_0x9aea('0xe')](socket);function respondWithRpcPromise(_0x5f20cb,_0xf46758,_0x1ff0ff){return new BPromise(function(_0x356d76,_0x3a3343){return client['request'](_0x5f20cb,_0x1ff0ff)[_0x9aea('0xf')](function(_0x4e5916){logger['info'](_0x9aea('0x10'),_0xf46758,_0x9aea('0x11'));logger[_0x9aea('0x12')](_0x9aea('0x13'),_0xf46758,'request\x20sent',JSON[_0x9aea('0x14')](_0x4e5916));if(_0x4e5916[_0x9aea('0x15')]){if(_0x4e5916[_0x9aea('0x15')][_0x9aea('0x16')]===0x1f4){logger['error'](_0x9aea('0x10'),_0xf46758,_0x4e5916[_0x9aea('0x15')][_0x9aea('0x17')]);return _0x3a3343(_0x4e5916['error'][_0x9aea('0x17')]);}logger[_0x9aea('0x15')]('UserVoiceQueueRt,\x20%s,\x20%s',_0xf46758,_0x4e5916['error'][_0x9aea('0x17')]);return _0x356d76(_0x4e5916[_0x9aea('0x15')][_0x9aea('0x17')]);}else{logger[_0x9aea('0x18')](_0x9aea('0x10'),_0xf46758,_0x9aea('0x11'));_0x356d76(_0x4e5916['result']['message']);}})[_0x9aea('0x19')](function(_0x361506){logger[_0x9aea('0x15')](_0x9aea('0x10'),_0xf46758,_0x361506);_0x3a3343(_0x361506);});});}exports[_0x9aea('0x1a')]=function(_0x489213){var _0x6541fa=this;return new Promise(function(_0x5946a0,_0x1829ce){return db[_0x9aea('0x1b')][_0x9aea('0x1c')]({'raw':_0x489213['options']?_0x489213[_0x9aea('0x1d')][_0x9aea('0x1e')]===undefined?!![]:![]:!![],'where':_0x489213[_0x9aea('0x1d')]?_0x489213[_0x9aea('0x1d')][_0x9aea('0x1f')]||null:null,'attributes':[[db[_0x9aea('0x20')]['fn']('COUNT',db[_0x9aea('0x20')]['fn']('IF',db[_0x9aea('0x20')][_0x9aea('0x21')]('`paused`\x20=\x201,\x201,\x20null'))),_0x9aea('0x22')]]})[_0x9aea('0xf')](function(_0xb3a575){logger[_0x9aea('0x18')](_0x9aea('0x1a'),_0x489213);logger['debug'](_0x9aea('0x1a'),_0x489213,JSON[_0x9aea('0x14')](_0xb3a575));_0x5946a0(_0xb3a575);})[_0x9aea('0x19')](function(_0x1560b4){logger['error'](_0x9aea('0x1a'),_0x1560b4[_0x9aea('0x17')],_0x489213);_0x1829ce(_0x6541fa[_0x9aea('0x15')](0x1f4,_0x1560b4[_0x9aea('0x17')]));});});};
\ No newline at end of file
+var _0xdd45=['catch','GetVoiceQueueRtPauses','UserVoiceQueueRt','options','raw','where','COUNT','sequelize','literal','`paused`\x20=\x201,\x201,\x20null','outboundQueuePauses','then','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','./userVoiceQueueRt.socket','register','request','info','debug','UserVoiceQueueRt,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','UserVoiceQueueRt,\x20%s,\x20%s','result'];(function(_0x49e722,_0x1e1a48){var _0x42eb63=function(_0x81764c){while(--_0x81764c){_0x49e722['push'](_0x49e722['shift']());}};_0x42eb63(++_0x1e1a48);}(_0xdd45,0x102));var _0x5dd4=function(_0x552d61,_0x4fb70d){_0x552d61=_0x552d61-0x0;var _0x14a9ea=_0xdd45[_0x552d61];return _0x14a9ea;};'use strict';var _=require(_0x5dd4('0x0'));var util=require('util');var moment=require(_0x5dd4('0x1'));var BPromise=require(_0x5dd4('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x5dd4('0x3'));var db=require(_0x5dd4('0x4'))['db'];var utils=require(_0x5dd4('0x5'));var logger=require(_0x5dd4('0x6'))(_0x5dd4('0x7'));var config=require(_0x5dd4('0x8'));var jayson=require(_0x5dd4('0x9'));var client=jayson[_0x5dd4('0xa')][_0x5dd4('0xb')]({'port':0x232a});config['redis']=_[_0x5dd4('0xc')](config[_0x5dd4('0xd')],{'host':_0x5dd4('0xe'),'port':0x18eb});var socket=require(_0x5dd4('0xf'))(new Redis(config[_0x5dd4('0xd')]));require(_0x5dd4('0x10'))[_0x5dd4('0x11')](socket);function respondWithRpcPromise(_0x45aa3d,_0x37b59d,_0x5f53c4){return new BPromise(function(_0x4ea846,_0x269562){return client[_0x5dd4('0x12')](_0x45aa3d,_0x5f53c4)['then'](function(_0x152d18){logger[_0x5dd4('0x13')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x37b59d,'request\x20sent');logger[_0x5dd4('0x14')](_0x5dd4('0x15'),_0x37b59d,_0x5dd4('0x16'),JSON[_0x5dd4('0x17')](_0x152d18));if(_0x152d18[_0x5dd4('0x18')]){if(_0x152d18[_0x5dd4('0x18')][_0x5dd4('0x19')]===0x1f4){logger[_0x5dd4('0x18')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x37b59d,_0x152d18[_0x5dd4('0x18')][_0x5dd4('0x1a')]);return _0x269562(_0x152d18[_0x5dd4('0x18')][_0x5dd4('0x1a')]);}logger[_0x5dd4('0x18')](_0x5dd4('0x1b'),_0x37b59d,_0x152d18[_0x5dd4('0x18')][_0x5dd4('0x1a')]);return _0x4ea846(_0x152d18[_0x5dd4('0x18')][_0x5dd4('0x1a')]);}else{logger[_0x5dd4('0x13')](_0x5dd4('0x1b'),_0x37b59d,_0x5dd4('0x16'));_0x4ea846(_0x152d18[_0x5dd4('0x1c')]['message']);}})[_0x5dd4('0x1d')](function(_0x2eab98){logger[_0x5dd4('0x18')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x37b59d,_0x2eab98);_0x269562(_0x2eab98);});});}exports[_0x5dd4('0x1e')]=function(_0x25e86e){var _0x3c0092=this;return new Promise(function(_0x1293dd,_0x15de16){return db[_0x5dd4('0x1f')]['findAll']({'raw':_0x25e86e[_0x5dd4('0x20')]?_0x25e86e[_0x5dd4('0x20')][_0x5dd4('0x21')]===undefined?!![]:![]:!![],'where':_0x25e86e[_0x5dd4('0x20')]?_0x25e86e[_0x5dd4('0x20')][_0x5dd4('0x22')]||null:null,'attributes':[[db['sequelize']['fn'](_0x5dd4('0x23'),db[_0x5dd4('0x24')]['fn']('IF',db[_0x5dd4('0x24')][_0x5dd4('0x25')](_0x5dd4('0x26')))),_0x5dd4('0x27')]]})[_0x5dd4('0x28')](function(_0x459d32){logger[_0x5dd4('0x13')](_0x5dd4('0x1e'),_0x25e86e);logger[_0x5dd4('0x14')](_0x5dd4('0x1e'),_0x25e86e,JSON['stringify'](_0x459d32));_0x1293dd(_0x459d32);})[_0x5dd4('0x1d')](function(_0x88ff66){logger[_0x5dd4('0x18')](_0x5dd4('0x1e'),_0x88ff66[_0x5dd4('0x1a')],_0x25e86e);_0x15de16(_0x3c0092[_0x5dd4('0x18')](0x1f4,_0x88ff66[_0x5dd4('0x1a')]));});});};
\ No newline at end of file
index 29e1085..690ce6e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6333=['removeListener','register','length','update'];(function(_0x1b495b,_0x4d8ba5){var _0x3530b6=function(_0x51970b){while(--_0x51970b){_0x1b495b['push'](_0x1b495b['shift']());}};_0x3530b6(++_0x4d8ba5);}(_0x6333,0x83));var _0x3633=function(_0x732ae7,_0xe6ba9e){_0x732ae7=_0x732ae7-0x0;var _0x3282fc=_0x6333[_0x732ae7];return _0x3282fc;};'use strict';var UserVoiceQueueRtEvents=require('./userVoiceQueueRt.events');var events=['save','remove',_0x3633('0x0')];function createListener(_0x528e8c,_0x2c7f7e){return function(_0x31ea34){_0x2c7f7e['emit'](_0x528e8c,_0x31ea34);};}function removeListener(_0x3e0961,_0x5cb6c6){return function(){UserVoiceQueueRtEvents[_0x3633('0x1')](_0x3e0961,_0x5cb6c6);};}exports[_0x3633('0x2')]=function(_0x566b21){for(var _0x547e6d=0x0,_0x23c014=events[_0x3633('0x3')];_0x547e6d<_0x23c014;_0x547e6d++){var _0x272da5=events[_0x547e6d];var _0x5c35ba=createListener('userVoiceQueueRt:'+_0x272da5,_0x566b21);UserVoiceQueueRtEvents['on'](_0x272da5,_0x5c35ba);}};
\ No newline at end of file
+var _0xa786=['removeListener','register','length','userVoiceQueueRt:','remove','update','emit'];(function(_0x5dbfe5,_0x1e00fc){var _0x3bb340=function(_0x303f9e){while(--_0x303f9e){_0x5dbfe5['push'](_0x5dbfe5['shift']());}};_0x3bb340(++_0x1e00fc);}(_0xa786,0x1d2));var _0x6a78=function(_0x800732,_0x134119){_0x800732=_0x800732-0x0;var _0x3ae82b=_0xa786[_0x800732];return _0x3ae82b;};'use strict';var UserVoiceQueueRtEvents=require('./userVoiceQueueRt.events');var events=['save',_0x6a78('0x0'),_0x6a78('0x1')];function createListener(_0x96d812,_0x2c7e2a){return function(_0x22723f){_0x2c7e2a[_0x6a78('0x2')](_0x96d812,_0x22723f);};}function removeListener(_0x34b520,_0x521b4a){return function(){UserVoiceQueueRtEvents[_0x6a78('0x3')](_0x34b520,_0x521b4a);};}exports[_0x6a78('0x4')]=function(_0xc0be8b){for(var _0x45470e=0x0,_0x28d286=events[_0x6a78('0x5')];_0x45470e<_0x28d286;_0x45470e++){var _0x2b8c4c=events[_0x45470e];var _0x2a6de6=createListener(_0x6a78('0x6')+_0x2b8c4c,_0xc0be8b);UserVoiceQueueRtEvents['on'](_0x2b8c4c,_0x2a6de6);}};
\ No newline at end of file
index 5c9794e..079a8ae 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(_0xdabac3,_0x16a9be){var _0x3c06aa=function(_0x4a334d){while(--_0x4a334d){_0xdabac3['push'](_0xdabac3['shift']());}};_0x3c06aa(++_0x16a9be);}(_0xedd9,0xfc));var _0x9edd=function(_0x9d4413,_0x221b32){_0x9d4413=_0x9d4413-0x0;var _0x2c7037=_0xedd9[_0x9d4413];return _0x2c7037;};'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 _0xd8b0=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','multer','util'];(function(_0xbbd04,_0x4e535f){var _0x4ef8b6=function(_0x4a78ab){while(--_0x4a78ab){_0xbbd04['push'](_0xbbd04['shift']());}};_0x4ef8b6(++_0x4e535f);}(_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
index 25da0d7..cb3cafd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8d37=['sequelize','INTEGER'];(function(_0x3e5086,_0x48f4a2){var _0xfeb102=function(_0x5a945f){while(--_0x5a945f){_0x3e5086['push'](_0x3e5086['shift']());}};_0xfeb102(++_0x48f4a2);}(_0x8d37,0xbc));var _0x78d3=function(_0x19090d,_0x2c61d8){_0x19090d=_0x19090d-0x0;var _0x440fcc=_0x8d37[_0x19090d];return _0x440fcc;};'use strict';var Sequelize=require(_0x78d3('0x0'));module['exports']={'penalty':{'type':Sequelize[_0x78d3('0x1')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x0737=['INTEGER','sequelize'];(function(_0x4927cb,_0x5cb098){var _0x5d0b2c=function(_0x2ed0b6){while(--_0x2ed0b6){_0x4927cb['push'](_0x4927cb['shift']());}};_0x5d0b2c(++_0x5cb098);}(_0x0737,0x18d));var _0x7073=function(_0x1f43f0,_0x2ac7d3){_0x1f43f0=_0x1f43f0-0x0;var _0x4a1f75=_0x0737[_0x1f43f0];return _0x4a1f75;};'use strict';var Sequelize=require(_0x7073('0x0'));module['exports']={'penalty':{'type':Sequelize[_0x7073('0x1')],'defaultValue':0x0}};
\ No newline at end of file
index 7784bb6..7934fb6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0053=['bluebird','request-promise','path','rimraf','../../config/environment','./userWhatsappQueue.attributes','define','UserWhatsappQueue','user_has_whatsapp_queues','lodash','util','../../config/logger','moment'];(function(_0xc4001c,_0x1bf8f0){var _0x49f7bc=function(_0x1059b8){while(--_0x1059b8){_0xc4001c['push'](_0xc4001c['shift']());}};_0x49f7bc(++_0x1bf8f0);}(_0x0053,0xe6));var _0x3005=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0053[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x3005('0x0'));var util=require(_0x3005('0x1'));var logger=require(_0x3005('0x2'))('api');var moment=require(_0x3005('0x3'));var BPromise=require(_0x3005('0x4'));var rp=require(_0x3005('0x5'));var fs=require('fs');var path=require(_0x3005('0x6'));var rimraf=require(_0x3005('0x7'));var config=require(_0x3005('0x8'));var attributes=require(_0x3005('0x9'));module['exports']=function(_0x37d943,_0x1bbf2c){return _0x37d943[_0x3005('0xa')](_0x3005('0xb'),attributes,{'tableName':_0x3005('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x9a29=['request-promise','path','rimraf','../../config/environment','./userWhatsappQueue.attributes','UserWhatsappQueue','util','../../config/logger','api','moment'];(function(_0x57432a,_0x3329ff){var _0x2494b7=function(_0x287c12){while(--_0x287c12){_0x57432a['push'](_0x57432a['shift']());}};_0x2494b7(++_0x3329ff);}(_0x9a29,0x146));var _0x99a2=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x9a29[_0x2641f9];return _0x585741;};'use strict';var _=require('lodash');var util=require(_0x99a2('0x0'));var logger=require(_0x99a2('0x1'))(_0x99a2('0x2'));var moment=require(_0x99a2('0x3'));var BPromise=require('bluebird');var rp=require(_0x99a2('0x4'));var fs=require('fs');var path=require(_0x99a2('0x5'));var rimraf=require(_0x99a2('0x6'));var config=require(_0x99a2('0x7'));var attributes=require(_0x99a2('0x8'));module['exports']=function(_0x42cf5c,_0x29852c){return _0x42cf5c['define'](_0x99a2('0x9'),attributes,{'tableName':'user_has_whatsapp_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 1cd0978..2a0992d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0254=['request','then','info','debug','UserWhatsappQueue,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','UserWhatsappQueue,\x20%s,\x20%s','message','result','catch','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x299984,_0x383734){var _0xae48c9=function(_0x836ac6){while(--_0x836ac6){_0x299984['push'](_0x299984['shift']());}};_0xae48c9(++_0x383734);}(_0x0254,0x17c));var _0x4025=function(_0x2ce6f3,_0x288572){_0x2ce6f3=_0x2ce6f3-0x0;var _0x357c3b=_0x0254[_0x2ce6f3];return _0x357c3b;};'use strict';var _=require(_0x4025('0x0'));var util=require('util');var moment=require(_0x4025('0x1'));var BPromise=require('bluebird');var rs=require(_0x4025('0x2'));var fs=require('fs');var Redis=require(_0x4025('0x3'));var db=require(_0x4025('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x4025('0x5'))(_0x4025('0x6'));var config=require(_0x4025('0x7'));var jayson=require(_0x4025('0x8'));var client=jayson[_0x4025('0x9')][_0x4025('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1f1b7c,_0x553c0f,_0x28cea5){return new BPromise(function(_0x1dc777,_0x13b40d){return client[_0x4025('0xb')](_0x1f1b7c,_0x28cea5)[_0x4025('0xc')](function(_0x516faf){logger[_0x4025('0xd')]('UserWhatsappQueue,\x20%s,\x20%s',_0x553c0f,'request\x20sent');logger[_0x4025('0xe')](_0x4025('0xf'),_0x553c0f,_0x4025('0x10'),JSON['stringify'](_0x516faf));if(_0x516faf[_0x4025('0x11')]){if(_0x516faf[_0x4025('0x11')][_0x4025('0x12')]===0x1f4){logger[_0x4025('0x11')](_0x4025('0x13'),_0x553c0f,_0x516faf['error']['message']);return _0x13b40d(_0x516faf[_0x4025('0x11')][_0x4025('0x14')]);}logger[_0x4025('0x11')](_0x4025('0x13'),_0x553c0f,_0x516faf[_0x4025('0x11')][_0x4025('0x14')]);return _0x1dc777(_0x516faf[_0x4025('0x11')][_0x4025('0x14')]);}else{logger[_0x4025('0xd')]('UserWhatsappQueue,\x20%s,\x20%s',_0x553c0f,_0x4025('0x10'));_0x1dc777(_0x516faf[_0x4025('0x15')][_0x4025('0x14')]);}})[_0x4025('0x16')](function(_0x78e6f1){logger[_0x4025('0x11')](_0x4025('0x13'),_0x553c0f,_0x78e6f1);_0x13b40d(_0x78e6f1);});});}
\ No newline at end of file
+var _0x38e4=['ioredis','../../mysqldb','../../config/utils','../../config/logger','client','http','request','then','debug','UserWhatsappQueue,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','UserWhatsappQueue,\x20%s,\x20%s','message','info','result','catch','lodash','util','bluebird'];(function(_0xf24091,_0x8c8992){var _0x1bf084=function(_0xe22cbb){while(--_0xe22cbb){_0xf24091['push'](_0xf24091['shift']());}};_0x1bf084(++_0x8c8992);}(_0x38e4,0x10e));var _0x438e=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0x38e4[_0x4b369d];return _0x571a98;};'use strict';var _=require(_0x438e('0x0'));var util=require(_0x438e('0x1'));var moment=require('moment');var BPromise=require(_0x438e('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x438e('0x3'));var db=require(_0x438e('0x4'))['db'];var utils=require(_0x438e('0x5'));var logger=require(_0x438e('0x6'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x438e('0x7')][_0x438e('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x5e4344,_0x557a6f,_0x30e1ab){return new BPromise(function(_0x1c49d3,_0x16753d){return client[_0x438e('0x9')](_0x5e4344,_0x30e1ab)[_0x438e('0xa')](function(_0x4a5e98){logger['info']('UserWhatsappQueue,\x20%s,\x20%s',_0x557a6f,'request\x20sent');logger[_0x438e('0xb')](_0x438e('0xc'),_0x557a6f,_0x438e('0xd'),JSON[_0x438e('0xe')](_0x4a5e98));if(_0x4a5e98['error']){if(_0x4a5e98[_0x438e('0xf')]['code']===0x1f4){logger[_0x438e('0xf')](_0x438e('0x10'),_0x557a6f,_0x4a5e98[_0x438e('0xf')]['message']);return _0x16753d(_0x4a5e98[_0x438e('0xf')][_0x438e('0x11')]);}logger[_0x438e('0xf')](_0x438e('0x10'),_0x557a6f,_0x4a5e98['error']['message']);return _0x1c49d3(_0x4a5e98['error']['message']);}else{logger[_0x438e('0x12')](_0x438e('0x10'),_0x557a6f,_0x438e('0xd'));_0x1c49d3(_0x4a5e98[_0x438e('0x13')]['message']);}})[_0x438e('0x14')](function(_0x286b8f){logger[_0x438e('0xf')](_0x438e('0x10'),_0x557a6f,_0x286b8f);_0x16753d(_0x286b8f);});});}
\ No newline at end of file
index 4120dc5..6c72bdd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6597=['show','post','create','/:id','delete','exports','multer','util','path','express','fs-extra','./variable.controller','get','isAuthenticated','index'];(function(_0x2d34d6,_0x397ff9){var _0x1d3d12=function(_0x558800){while(--_0x558800){_0x2d34d6['push'](_0x2d34d6['shift']());}};_0x1d3d12(++_0x397ff9);}(_0x6597,0x16e));var _0x7659=function(_0x46d131,_0x333fe2){_0x46d131=_0x46d131-0x0;var _0x119311=_0x6597[_0x46d131];return _0x119311;};'use strict';var multer=require(_0x7659('0x0'));var util=require(_0x7659('0x1'));var path=require(_0x7659('0x2'));var timeout=require('connect-timeout');var express=require(_0x7659('0x3'));var router=express['Router']();var fs_extra=require(_0x7659('0x4'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x7659('0x5'));router[_0x7659('0x6')]('/',auth[_0x7659('0x7')](),controller[_0x7659('0x8')]);router[_0x7659('0x6')]('/:id',auth['isAuthenticated'](),controller[_0x7659('0x9')]);router[_0x7659('0xa')]('/',auth[_0x7659('0x7')](),controller[_0x7659('0xb')]);router['put'](_0x7659('0xc'),auth[_0x7659('0x7')](),controller['update']);router[_0x7659('0xd')]('/:id',auth[_0x7659('0x7')](),controller['destroy']);module[_0x7659('0xe')]=router;
\ No newline at end of file
+var _0x1d5b=['../../config/environment','isAuthenticated','index','get','/:id','show','post','put','delete','exports','multer','util','path','express','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x553045,_0x682a63){var _0x50e1b5=function(_0x21da25){while(--_0x21da25){_0x553045['push'](_0x553045['shift']());}};_0x50e1b5(++_0x682a63);}(_0x1d5b,0x13c));var _0xb1d5=function(_0x357d7e,_0x2b8f07){_0x357d7e=_0x357d7e-0x0;var _0x23ac8=_0x1d5b[_0x357d7e];return _0x23ac8;};'use strict';var multer=require(_0xb1d5('0x0'));var util=require(_0xb1d5('0x1'));var path=require(_0xb1d5('0x2'));var timeout=require('connect-timeout');var express=require(_0xb1d5('0x3'));var router=express['Router']();var fs_extra=require(_0xb1d5('0x4'));var auth=require(_0xb1d5('0x5'));var interaction=require(_0xb1d5('0x6'));var config=require(_0xb1d5('0x7'));var controller=require('./variable.controller');router['get']('/',auth[_0xb1d5('0x8')](),controller[_0xb1d5('0x9')]);router[_0xb1d5('0xa')](_0xb1d5('0xb'),auth[_0xb1d5('0x8')](),controller[_0xb1d5('0xc')]);router[_0xb1d5('0xd')]('/',auth[_0xb1d5('0x8')](),controller['create']);router[_0xb1d5('0xe')](_0xb1d5('0xb'),auth['isAuthenticated'](),controller['update']);router[_0xb1d5('0xf')](_0xb1d5('0xb'),auth[_0xb1d5('0x8')](),controller['destroy']);module[_0xb1d5('0x10')]=router;
\ No newline at end of file
index 42abda8..50b9086 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8375=['exports','STRING','name'];(function(_0xafa655,_0x224e25){var _0x2c6704=function(_0x5c568b){while(--_0x5c568b){_0xafa655['push'](_0xafa655['shift']());}};_0x2c6704(++_0x224e25);}(_0x8375,0x132));var _0x5837=function(_0x5d5f5a,_0x2513d6){_0x5d5f5a=_0x5d5f5a-0x0;var _0x4c468f=_0x8375[_0x5d5f5a];return _0x4c468f;};'use strict';var Sequelize=require('sequelize');module[_0x5837('0x0')]={'name':{'type':Sequelize[_0x5837('0x1')],'unique':_0x5837('0x2'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x5837('0x1')]}};
\ No newline at end of file
+var _0x19cc=['name','sequelize','STRING'];(function(_0x2ecf23,_0x8e0045){var _0x469cae=function(_0x400fa8){while(--_0x400fa8){_0x2ecf23['push'](_0x2ecf23['shift']());}};_0x469cae(++_0x8e0045);}(_0x19cc,0x139));var _0xc19c=function(_0x2300f2,_0x315c5f){_0x2300f2=_0x2300f2-0x0;var _0x6bd508=_0x19cc[_0x2300f2];return _0x6bd508;};'use strict';var Sequelize=require(_0xc19c('0x0'));module['exports']={'name':{'type':Sequelize[_0xc19c('0x1')],'unique':_0xc19c('0x2'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0xc19c('0x1')]}};
\ No newline at end of file
index 24ae75f..530d385 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbe6b=['Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','to-csv','fs-extra','lodash','crypto','jsforce','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/environment','../../config/license/util','sendStatus','status','json','undefined','offset','count','limit','set','Content-Range','reject','save','update','then','get','Variables','UserProfileResource','destroy','end','error','stack','name','send','index','map','Variable','type','key','query','keys','filters','attributes','intersection','model','fields','length','hasOwnProperty','sort','where','pick','merge','VIRTUAL','filter','options','includeAll','rows','catch','show','params','rawAttributes','find','create','body','user'];(function(_0x5a3e79,_0x5d9753){var _0x5582c3=function(_0x577988){while(--_0x577988){_0x5a3e79['push'](_0x5a3e79['shift']());}};_0x5582c3(++_0x5d9753);}(_0xbe6b,0x18c));var _0xbbe6=function(_0x1a9d7b,_0x1fc191){_0x1a9d7b=_0x1a9d7b-0x0;var _0x23c002=_0xbe6b[_0x1a9d7b];return _0x23c002;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xbbe6('0x0'));var zipdir=require(_0xbbe6('0x1'));var jsonpatch=require(_0xbbe6('0x2'));var rp=require('request-promise');var moment=require(_0xbbe6('0x3'));var BPromise=require(_0xbbe6('0x4'));var Mustache=require('mustache');var util=require(_0xbbe6('0x5'));var path=require('path');var sox=require('sox');var csv=require(_0xbbe6('0x6'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xbbe6('0x7'));var _=require(_0xbbe6('0x8'));var squel=require('squel');var crypto=require(_0xbbe6('0x9'));var jsforce=require(_0xbbe6('0xa'));var deskjs=require('desk.js');var toCsv=require(_0xbbe6('0x6'));var querystring=require(_0xbbe6('0xb'));var Papa=require(_0xbbe6('0xc'));var Redis=require(_0xbbe6('0xd'));var authService=require('../../components/auth/service');var qs=require(_0xbbe6('0xe'));var as=require(_0xbbe6('0xf'));var hardwareService=require(_0xbbe6('0x10'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0xbbe6('0x11'));var licenseUtil=require(_0xbbe6('0x12'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x420655,_0x741197){_0x741197=_0x741197||0xcc;return function(_0x269d6f){if(_0x269d6f){return _0x420655[_0xbbe6('0x13')](_0x741197);}return _0x420655[_0xbbe6('0x14')](_0x741197)['end']();};}function respondWithResult(_0x5dcb5d,_0x54d9ec){_0x54d9ec=_0x54d9ec||0xc8;return function(_0x5b1817){if(_0x5b1817){return _0x5dcb5d[_0xbbe6('0x14')](_0x54d9ec)[_0xbbe6('0x15')](_0x5b1817);}};}function respondWithFilteredResult(_0x177bd7,_0xe4bcd5){return function(_0x5eacf8){if(_0x5eacf8){var _0x35df56=typeof _0xe4bcd5['offset']===_0xbbe6('0x16')&&typeof _0xe4bcd5['limit']===_0xbbe6('0x16');var _0x51a7e8=_0x5eacf8['count'];var _0x590a7c=_0x35df56?0x0:_0xe4bcd5[_0xbbe6('0x17')];var _0xf9e94f=_0x35df56?_0x5eacf8[_0xbbe6('0x18')]:_0xe4bcd5[_0xbbe6('0x17')]+_0xe4bcd5[_0xbbe6('0x19')];var _0x3f1775;if(_0xf9e94f>=_0x51a7e8){_0xf9e94f=_0x51a7e8;_0x3f1775=0xc8;}else{_0x3f1775=0xce;}_0x177bd7[_0xbbe6('0x14')](_0x3f1775);return _0x177bd7[_0xbbe6('0x1a')](_0xbbe6('0x1b'),_0x590a7c+'-'+_0xf9e94f+'/'+_0x51a7e8)[_0xbbe6('0x15')](_0x5eacf8);}return null;};}function patchUpdates(_0x440cfd){return function(_0x370522){try{jsonpatch['apply'](_0x370522,_0x440cfd,!![]);}catch(_0x22d291){return BPromise[_0xbbe6('0x1c')](_0x22d291);}return _0x370522[_0xbbe6('0x1d')]();};}function saveUpdates(_0x14dce3,_0x38c366){return function(_0x4eaca2){if(_0x4eaca2){return _0x4eaca2[_0xbbe6('0x1e')](_0x14dce3)[_0xbbe6('0x1f')](function(_0x58fa48){return _0x58fa48;});}return null;};}function removeEntity(_0x1ec69f,_0x2743ce){return function(_0x1ce9ef){if(_0x1ce9ef){return _0x1ce9ef['destroy']()[_0xbbe6('0x1f')](function(){var _0x3450fc=_0x1ce9ef[_0xbbe6('0x20')]({'plain':!![]});var _0x5e4a0a=_0xbbe6('0x21');return db[_0xbbe6('0x22')][_0xbbe6('0x23')]({'where':{'type':_0x5e4a0a,'resourceId':_0x3450fc['id']}})['then'](function(){return _0x1ce9ef;});})['then'](function(){_0x1ec69f[_0xbbe6('0x14')](0xcc)[_0xbbe6('0x24')]();});}};}function handleEntityNotFound(_0x4d2bc7,_0x302290){return function(_0x315f84){if(!_0x315f84){_0x4d2bc7['sendStatus'](0x194);}return _0x315f84;};}function handleError(_0x21ed0b,_0x482dca){_0x482dca=_0x482dca||0x1f4;return function(_0x31b657){logger[_0xbbe6('0x25')](_0x31b657[_0xbbe6('0x26')]);if(_0x31b657[_0xbbe6('0x27')]){delete _0x31b657[_0xbbe6('0x27')];}_0x21ed0b[_0xbbe6('0x14')](_0x482dca)[_0xbbe6('0x28')](_0x31b657);};}exports[_0xbbe6('0x29')]=function(_0x48e84a,_0x2a61b3){var _0x33fed1={},_0x2df202={},_0xc6838e={'count':0x0,'rows':[]};var _0xdd4a75=_[_0xbbe6('0x2a')](db[_0xbbe6('0x2b')]['rawAttributes'],function(_0x59996f){return{'name':_0x59996f['fieldName'],'type':_0x59996f[_0xbbe6('0x2c')][_0xbbe6('0x2d')]};});_0x2df202['model']=_[_0xbbe6('0x2a')](_0xdd4a75,'name');_0x2df202[_0xbbe6('0x2e')]=_[_0xbbe6('0x2f')](_0x48e84a['query']);_0x2df202[_0xbbe6('0x30')]=_['intersection'](_0x2df202['model'],_0x2df202[_0xbbe6('0x2e')]);_0x33fed1[_0xbbe6('0x31')]=_[_0xbbe6('0x32')](_0x2df202[_0xbbe6('0x33')],qs['fields'](_0x48e84a[_0xbbe6('0x2e')][_0xbbe6('0x34')]));_0x33fed1[_0xbbe6('0x31')]=_0x33fed1[_0xbbe6('0x31')][_0xbbe6('0x35')]?_0x33fed1[_0xbbe6('0x31')]:_0x2df202[_0xbbe6('0x33')];if(!_0x48e84a[_0xbbe6('0x2e')][_0xbbe6('0x36')]('nolimit')){_0x33fed1[_0xbbe6('0x19')]=qs['limit'](_0x48e84a['query'][_0xbbe6('0x19')]);_0x33fed1[_0xbbe6('0x17')]=qs[_0xbbe6('0x17')](_0x48e84a[_0xbbe6('0x2e')][_0xbbe6('0x17')]);}_0x33fed1['order']=qs[_0xbbe6('0x37')](_0x48e84a['query'][_0xbbe6('0x37')]);_0x33fed1[_0xbbe6('0x38')]=qs['filters'](_[_0xbbe6('0x39')](_0x48e84a['query'],_0x2df202[_0xbbe6('0x30')]),_0xdd4a75);if(_0x48e84a[_0xbbe6('0x2e')]['filter']){_0x33fed1[_0xbbe6('0x38')]=_[_0xbbe6('0x3a')](_0x33fed1[_0xbbe6('0x38')],{'$or':_['map'](_0xdd4a75,function(_0x42402f){if(_0x42402f[_0xbbe6('0x2c')]!==_0xbbe6('0x3b')){var _0x21c037={};_0x21c037[_0x42402f[_0xbbe6('0x27')]]={'$like':'%'+_0x48e84a[_0xbbe6('0x2e')][_0xbbe6('0x3c')]+'%'};return _0x21c037;}})});}_0x33fed1=_[_0xbbe6('0x3a')]({},_0x33fed1,_0x48e84a[_0xbbe6('0x3d')]);var _0x188985={'where':_0x33fed1[_0xbbe6('0x38')]};return db['Variable'][_0xbbe6('0x18')](_0x188985)[_0xbbe6('0x1f')](function(_0x20002e){_0xc6838e[_0xbbe6('0x18')]=_0x20002e;if(_0x48e84a['query'][_0xbbe6('0x3e')]){_0x33fed1['include']=[{'all':!![]}];}return db[_0xbbe6('0x2b')]['findAll'](_0x33fed1);})[_0xbbe6('0x1f')](function(_0x40e4df){_0xc6838e[_0xbbe6('0x3f')]=_0x40e4df;return _0xc6838e;})['then'](respondWithFilteredResult(_0x2a61b3,_0x33fed1))[_0xbbe6('0x40')](handleError(_0x2a61b3,null));};exports[_0xbbe6('0x41')]=function(_0x55f060,_0x269275){var _0x3419e1={'raw':!![],'where':{'id':_0x55f060[_0xbbe6('0x42')]['id']}},_0x40274b={};_0x40274b['model']=_[_0xbbe6('0x2f')](db[_0xbbe6('0x2b')][_0xbbe6('0x43')]);_0x40274b[_0xbbe6('0x2e')]=_[_0xbbe6('0x2f')](_0x55f060[_0xbbe6('0x2e')]);_0x40274b[_0xbbe6('0x30')]=_['intersection'](_0x40274b[_0xbbe6('0x33')],_0x40274b[_0xbbe6('0x2e')]);_0x3419e1[_0xbbe6('0x31')]=_[_0xbbe6('0x32')](_0x40274b['model'],qs[_0xbbe6('0x34')](_0x55f060[_0xbbe6('0x2e')]['fields']));_0x3419e1[_0xbbe6('0x31')]=_0x3419e1[_0xbbe6('0x31')]['length']?_0x3419e1[_0xbbe6('0x31')]:_0x40274b['model'];if(_0x55f060[_0xbbe6('0x2e')][_0xbbe6('0x3e')]){_0x3419e1['include']=[{'all':!![]}];}_0x3419e1=_[_0xbbe6('0x3a')]({},_0x3419e1,_0x55f060[_0xbbe6('0x3d')]);return db['Variable'][_0xbbe6('0x44')](_0x3419e1)[_0xbbe6('0x1f')](handleEntityNotFound(_0x269275,null))['then'](respondWithResult(_0x269275,null))[_0xbbe6('0x40')](handleError(_0x269275,null));};exports['create']=function(_0x2c98a5,_0x49be47){return db[_0xbbe6('0x2b')][_0xbbe6('0x45')](_0x2c98a5[_0xbbe6('0x46')],{})[_0xbbe6('0x1f')](function(_0x577ea7){var _0x21a2e2=_0x2c98a5[_0xbbe6('0x47')]['get']({'plain':!![]});if(!_0x21a2e2)throw new Error(_0xbbe6('0x48'));if(_0x21a2e2[_0xbbe6('0x49')]===_0xbbe6('0x47')){var _0x2f48f5=_0x577ea7[_0xbbe6('0x20')]({'plain':!![]});var _0x3e7898=_0xbbe6('0x21');return db[_0xbbe6('0x4a')][_0xbbe6('0x44')]({'where':{'name':_0x3e7898,'userProfileId':_0x21a2e2[_0xbbe6('0x4b')]},'raw':!![]})[_0xbbe6('0x1f')](function(_0x1de4fc){if(_0x1de4fc&&_0x1de4fc[_0xbbe6('0x4c')]===0x0){return db[_0xbbe6('0x22')][_0xbbe6('0x45')]({'name':_0x2f48f5[_0xbbe6('0x27')],'resourceId':_0x2f48f5['id'],'type':_0x1de4fc['name'],'sectionId':_0x1de4fc['id']},{})['then'](function(){return _0x577ea7;});}else{return _0x577ea7;}})[_0xbbe6('0x40')](function(_0x47bac8){logger[_0xbbe6('0x25')](_0xbbe6('0x4d'),_0x47bac8);throw _0x47bac8;});}return _0x577ea7;})[_0xbbe6('0x1f')](respondWithResult(_0x49be47,0xc9))[_0xbbe6('0x40')](handleError(_0x49be47,null));};exports[_0xbbe6('0x1e')]=function(_0x2cb7a3,_0x2ae4b7){if(_0x2cb7a3[_0xbbe6('0x46')]['id']){delete _0x2cb7a3[_0xbbe6('0x46')]['id'];}return db['Variable']['find']({'where':{'id':_0x2cb7a3[_0xbbe6('0x42')]['id']}})['then'](handleEntityNotFound(_0x2ae4b7,null))['then'](saveUpdates(_0x2cb7a3[_0xbbe6('0x46')],null))['then'](respondWithResult(_0x2ae4b7,null))[_0xbbe6('0x40')](handleError(_0x2ae4b7,null));};exports['destroy']=function(_0x3eff4e,_0x3444a9){return db[_0xbbe6('0x2b')][_0xbbe6('0x44')]({'where':{'id':_0x3eff4e[_0xbbe6('0x42')]['id']}})[_0xbbe6('0x1f')](handleEntityNotFound(_0x3444a9,null))['then'](removeEntity(_0x3444a9,null))[_0xbbe6('0x40')](handleError(_0x3444a9,null));};
\ No newline at end of file
+var _0xaa45=['show','params','rawAttributes','include','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','to-csv','fs-extra','lodash','squel','crypto','desk.js','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','end','status','json','limit','undefined','count','offset','set','Content-Range','apply','reject','save','then','get','Variables','UserProfileResource','destroy','stack','name','send','index','map','Variable','fieldName','type','key','model','query','keys','intersection','fields','attributes','length','order','sort','where','filters','filter','merge','options','includeAll','findAll','rows','catch'];(function(_0x193c29,_0xbbdec4){var _0x16daa9=function(_0x2d1acd){while(--_0x2d1acd){_0x193c29['push'](_0x193c29['shift']());}};_0x16daa9(++_0xbbdec4);}(_0xaa45,0x15c));var _0x5aa4=function(_0x8e8ca7,_0x5a5e07){_0x8e8ca7=_0x8e8ca7-0x0;var _0x561381=_0xaa45[_0x8e8ca7];return _0x561381;};'use strict';var emlformat=require(_0x5aa4('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x5aa4('0x1'));var jsonpatch=require(_0x5aa4('0x2'));var rp=require(_0x5aa4('0x3'));var moment=require(_0x5aa4('0x4'));var BPromise=require(_0x5aa4('0x5'));var Mustache=require(_0x5aa4('0x6'));var util=require('util');var path=require('path');var sox=require(_0x5aa4('0x7'));var csv=require(_0x5aa4('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x5aa4('0x9'));var _=require(_0x5aa4('0xa'));var squel=require(_0x5aa4('0xb'));var crypto=require(_0x5aa4('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x5aa4('0xd'));var toCsv=require(_0x5aa4('0x8'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x5aa4('0xe'));var qs=require('../../components/parsers/qs');var as=require(_0x5aa4('0xf'));var hardwareService=require(_0x5aa4('0x10'));var logger=require(_0x5aa4('0x11'))(_0x5aa4('0x12'));var utils=require(_0x5aa4('0x13'));var config=require(_0x5aa4('0x14'));var licenseUtil=require(_0x5aa4('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x26df20,_0x2622e8){_0x2622e8=_0x2622e8||0xcc;return function(_0x564ebf){if(_0x564ebf){return _0x26df20[_0x5aa4('0x16')](_0x2622e8);}return _0x26df20['status'](_0x2622e8)[_0x5aa4('0x17')]();};}function respondWithResult(_0x5b11ec,_0x3fb7bf){_0x3fb7bf=_0x3fb7bf||0xc8;return function(_0x1b99fb){if(_0x1b99fb){return _0x5b11ec[_0x5aa4('0x18')](_0x3fb7bf)[_0x5aa4('0x19')](_0x1b99fb);}};}function respondWithFilteredResult(_0x13c88c,_0x28bfcc){return function(_0x373b38){if(_0x373b38){var _0x50e611=typeof _0x28bfcc['offset']==='undefined'&&typeof _0x28bfcc[_0x5aa4('0x1a')]===_0x5aa4('0x1b');var _0x97f382=_0x373b38[_0x5aa4('0x1c')];var _0x2329c9=_0x50e611?0x0:_0x28bfcc['offset'];var _0x259ec5=_0x50e611?_0x373b38[_0x5aa4('0x1c')]:_0x28bfcc[_0x5aa4('0x1d')]+_0x28bfcc[_0x5aa4('0x1a')];var _0x43b461;if(_0x259ec5>=_0x97f382){_0x259ec5=_0x97f382;_0x43b461=0xc8;}else{_0x43b461=0xce;}_0x13c88c[_0x5aa4('0x18')](_0x43b461);return _0x13c88c[_0x5aa4('0x1e')](_0x5aa4('0x1f'),_0x2329c9+'-'+_0x259ec5+'/'+_0x97f382)[_0x5aa4('0x19')](_0x373b38);}return null;};}function patchUpdates(_0x108ad9){return function(_0x2bdb94){try{jsonpatch[_0x5aa4('0x20')](_0x2bdb94,_0x108ad9,!![]);}catch(_0x5ddaf6){return BPromise[_0x5aa4('0x21')](_0x5ddaf6);}return _0x2bdb94[_0x5aa4('0x22')]();};}function saveUpdates(_0x12d916,_0x190d06){return function(_0x5abe49){if(_0x5abe49){return _0x5abe49['update'](_0x12d916)[_0x5aa4('0x23')](function(_0x2a5647){return _0x2a5647;});}return null;};}function removeEntity(_0x35b401,_0x18f938){return function(_0x49949e){if(_0x49949e){return _0x49949e['destroy']()[_0x5aa4('0x23')](function(){var _0x13e1ba=_0x49949e[_0x5aa4('0x24')]({'plain':!![]});var _0xaedd1f=_0x5aa4('0x25');return db[_0x5aa4('0x26')][_0x5aa4('0x27')]({'where':{'type':_0xaedd1f,'resourceId':_0x13e1ba['id']}})['then'](function(){return _0x49949e;});})[_0x5aa4('0x23')](function(){_0x35b401[_0x5aa4('0x18')](0xcc)[_0x5aa4('0x17')]();});}};}function handleEntityNotFound(_0x223b03,_0x3e782d){return function(_0xd6b15e){if(!_0xd6b15e){_0x223b03[_0x5aa4('0x16')](0x194);}return _0xd6b15e;};}function handleError(_0x365d74,_0x6457b8){_0x6457b8=_0x6457b8||0x1f4;return function(_0x1df73d){logger['error'](_0x1df73d[_0x5aa4('0x28')]);if(_0x1df73d[_0x5aa4('0x29')]){delete _0x1df73d[_0x5aa4('0x29')];}_0x365d74[_0x5aa4('0x18')](_0x6457b8)[_0x5aa4('0x2a')](_0x1df73d);};}exports[_0x5aa4('0x2b')]=function(_0x3ed236,_0x455033){var _0x14e6bb={},_0x584268={},_0x8e00ed={'count':0x0,'rows':[]};var _0x530af3=_[_0x5aa4('0x2c')](db[_0x5aa4('0x2d')]['rawAttributes'],function(_0x566e18){return{'name':_0x566e18[_0x5aa4('0x2e')],'type':_0x566e18[_0x5aa4('0x2f')][_0x5aa4('0x30')]};});_0x584268[_0x5aa4('0x31')]=_['map'](_0x530af3,'name');_0x584268[_0x5aa4('0x32')]=_[_0x5aa4('0x33')](_0x3ed236[_0x5aa4('0x32')]);_0x584268['filters']=_[_0x5aa4('0x34')](_0x584268[_0x5aa4('0x31')],_0x584268[_0x5aa4('0x32')]);_0x14e6bb['attributes']=_[_0x5aa4('0x34')](_0x584268[_0x5aa4('0x31')],qs[_0x5aa4('0x35')](_0x3ed236[_0x5aa4('0x32')][_0x5aa4('0x35')]));_0x14e6bb['attributes']=_0x14e6bb[_0x5aa4('0x36')][_0x5aa4('0x37')]?_0x14e6bb[_0x5aa4('0x36')]:_0x584268['model'];if(!_0x3ed236['query']['hasOwnProperty']('nolimit')){_0x14e6bb[_0x5aa4('0x1a')]=qs['limit'](_0x3ed236[_0x5aa4('0x32')][_0x5aa4('0x1a')]);_0x14e6bb[_0x5aa4('0x1d')]=qs[_0x5aa4('0x1d')](_0x3ed236['query'][_0x5aa4('0x1d')]);}_0x14e6bb[_0x5aa4('0x38')]=qs['sort'](_0x3ed236[_0x5aa4('0x32')][_0x5aa4('0x39')]);_0x14e6bb[_0x5aa4('0x3a')]=qs[_0x5aa4('0x3b')](_['pick'](_0x3ed236['query'],_0x584268[_0x5aa4('0x3b')]),_0x530af3);if(_0x3ed236[_0x5aa4('0x32')][_0x5aa4('0x3c')]){_0x14e6bb[_0x5aa4('0x3a')]=_[_0x5aa4('0x3d')](_0x14e6bb[_0x5aa4('0x3a')],{'$or':_[_0x5aa4('0x2c')](_0x530af3,function(_0x38e129){if(_0x38e129[_0x5aa4('0x2f')]!=='VIRTUAL'){var _0xb6f48b={};_0xb6f48b[_0x38e129['name']]={'$like':'%'+_0x3ed236[_0x5aa4('0x32')]['filter']+'%'};return _0xb6f48b;}})});}_0x14e6bb=_[_0x5aa4('0x3d')]({},_0x14e6bb,_0x3ed236[_0x5aa4('0x3e')]);var _0x58fa44={'where':_0x14e6bb[_0x5aa4('0x3a')]};return db['Variable'][_0x5aa4('0x1c')](_0x58fa44)[_0x5aa4('0x23')](function(_0x132c9a){_0x8e00ed[_0x5aa4('0x1c')]=_0x132c9a;if(_0x3ed236[_0x5aa4('0x32')][_0x5aa4('0x3f')]){_0x14e6bb['include']=[{'all':!![]}];}return db['Variable'][_0x5aa4('0x40')](_0x14e6bb);})[_0x5aa4('0x23')](function(_0x54c9a3){_0x8e00ed[_0x5aa4('0x41')]=_0x54c9a3;return _0x8e00ed;})[_0x5aa4('0x23')](respondWithFilteredResult(_0x455033,_0x14e6bb))[_0x5aa4('0x42')](handleError(_0x455033,null));};exports[_0x5aa4('0x43')]=function(_0x5e8b2e,_0x5c9533){var _0x29e7f4={'raw':!![],'where':{'id':_0x5e8b2e[_0x5aa4('0x44')]['id']}},_0x3514d9={};_0x3514d9[_0x5aa4('0x31')]=_[_0x5aa4('0x33')](db['Variable'][_0x5aa4('0x45')]);_0x3514d9[_0x5aa4('0x32')]=_['keys'](_0x5e8b2e[_0x5aa4('0x32')]);_0x3514d9[_0x5aa4('0x3b')]=_[_0x5aa4('0x34')](_0x3514d9['model'],_0x3514d9[_0x5aa4('0x32')]);_0x29e7f4[_0x5aa4('0x36')]=_[_0x5aa4('0x34')](_0x3514d9['model'],qs[_0x5aa4('0x35')](_0x5e8b2e[_0x5aa4('0x32')][_0x5aa4('0x35')]));_0x29e7f4[_0x5aa4('0x36')]=_0x29e7f4[_0x5aa4('0x36')][_0x5aa4('0x37')]?_0x29e7f4[_0x5aa4('0x36')]:_0x3514d9[_0x5aa4('0x31')];if(_0x5e8b2e[_0x5aa4('0x32')][_0x5aa4('0x3f')]){_0x29e7f4[_0x5aa4('0x46')]=[{'all':!![]}];}_0x29e7f4=_['merge']({},_0x29e7f4,_0x5e8b2e[_0x5aa4('0x3e')]);return db[_0x5aa4('0x2d')][_0x5aa4('0x47')](_0x29e7f4)[_0x5aa4('0x23')](handleEntityNotFound(_0x5c9533,null))[_0x5aa4('0x23')](respondWithResult(_0x5c9533,null))['catch'](handleError(_0x5c9533,null));};exports[_0x5aa4('0x48')]=function(_0x2c3347,_0x260319){return db[_0x5aa4('0x2d')][_0x5aa4('0x48')](_0x2c3347[_0x5aa4('0x49')],{})['then'](function(_0x305570){var _0x260c2b=_0x2c3347[_0x5aa4('0x4a')][_0x5aa4('0x24')]({'plain':!![]});if(!_0x260c2b)throw new Error(_0x5aa4('0x4b'));if(_0x260c2b[_0x5aa4('0x4c')]==='user'){var _0x27ba2d=_0x305570[_0x5aa4('0x24')]({'plain':!![]});var _0x2c10fa='Variables';return db[_0x5aa4('0x4d')][_0x5aa4('0x47')]({'where':{'name':_0x2c10fa,'userProfileId':_0x260c2b[_0x5aa4('0x4e')]},'raw':!![]})[_0x5aa4('0x23')](function(_0x499f44){if(_0x499f44&&_0x499f44[_0x5aa4('0x4f')]===0x0){return db['UserProfileResource'][_0x5aa4('0x48')]({'name':_0x27ba2d[_0x5aa4('0x29')],'resourceId':_0x27ba2d['id'],'type':_0x499f44[_0x5aa4('0x29')],'sectionId':_0x499f44['id']},{})[_0x5aa4('0x23')](function(){return _0x305570;});}else{return _0x305570;}})['catch'](function(_0x372edc){logger[_0x5aa4('0x50')](_0x5aa4('0x51'),_0x372edc);throw _0x372edc;});}return _0x305570;})['then'](respondWithResult(_0x260319,0xc9))[_0x5aa4('0x42')](handleError(_0x260319,null));};exports[_0x5aa4('0x52')]=function(_0x1c7d3a,_0x1d908f){if(_0x1c7d3a['body']['id']){delete _0x1c7d3a[_0x5aa4('0x49')]['id'];}return db[_0x5aa4('0x2d')][_0x5aa4('0x47')]({'where':{'id':_0x1c7d3a[_0x5aa4('0x44')]['id']}})[_0x5aa4('0x23')](handleEntityNotFound(_0x1d908f,null))[_0x5aa4('0x23')](saveUpdates(_0x1c7d3a[_0x5aa4('0x49')],null))[_0x5aa4('0x23')](respondWithResult(_0x1d908f,null))[_0x5aa4('0x42')](handleError(_0x1d908f,null));};exports['destroy']=function(_0x18b1c0,_0x455aad){return db['Variable'][_0x5aa4('0x47')]({'where':{'id':_0x18b1c0['params']['id']}})['then'](handleEntityNotFound(_0x455aad,null))[_0x5aa4('0x23')](removeEntity(_0x455aad,null))[_0x5aa4('0x42')](handleError(_0x455aad,null));};
\ No newline at end of file
index e41b46f..eeb938a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd3b3=['../../config/environment','define','Variable','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0xfc9d62,_0x4c0a49){var _0xb6bf90=function(_0x42ba0a){while(--_0x42ba0a){_0xfc9d62['push'](_0xfc9d62['shift']());}};_0xb6bf90(++_0x4c0a49);}(_0xd3b3,0x1c6));var _0x3d3b=function(_0x34c26b,_0x5e279b){_0x34c26b=_0x34c26b-0x0;var _0x2f9f58=_0xd3b3[_0x34c26b];return _0x2f9f58;};'use strict';var _=require(_0x3d3b('0x0'));var util=require(_0x3d3b('0x1'));var logger=require(_0x3d3b('0x2'))(_0x3d3b('0x3'));var moment=require(_0x3d3b('0x4'));var BPromise=require(_0x3d3b('0x5'));var rp=require(_0x3d3b('0x6'));var fs=require('fs');var path=require(_0x3d3b('0x7'));var rimraf=require('rimraf');var config=require(_0x3d3b('0x8'));var attributes=require('./variable.attributes');module['exports']=function(_0x1edebe,_0x409111){return _0x1edebe[_0x3d3b('0x9')](_0x3d3b('0xa'),attributes,{'tableName':'tools_variables','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x0972=['request-promise','path','rimraf','../../config/environment','./variable.attributes','exports','tools_variables','util','../../config/logger'];(function(_0x53ccf2,_0x13cb67){var _0x5a2964=function(_0x3b0514){while(--_0x3b0514){_0x53ccf2['push'](_0x53ccf2['shift']());}};_0x5a2964(++_0x13cb67);}(_0x0972,0xe8));var _0x2097=function(_0x185599,_0x2ce689){_0x185599=_0x185599-0x0;var _0x9c0452=_0x0972[_0x185599];return _0x9c0452;};'use strict';var _=require('lodash');var util=require(_0x2097('0x0'));var logger=require(_0x2097('0x1'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x2097('0x2'));var fs=require('fs');var path=require(_0x2097('0x3'));var rimraf=require(_0x2097('0x4'));var config=require(_0x2097('0x5'));var attributes=require(_0x2097('0x6'));module[_0x2097('0x7')]=function(_0x475feb,_0x1e4ce6){return _0x475feb['define']('Variable',attributes,{'tableName':_0x2097('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 958f29d..38d7ff7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa41a=['debug','Variable,\x20%s,\x20%s,\x20%s','error','message','result','catch','ShowVariable','options','raw','where','attributes','include','map','model','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','Variable,\x20%s,\x20%s','request\x20sent'];(function(_0x29b609,_0x19d388){var _0x54c952=function(_0xb3c38d){while(--_0xb3c38d){_0x29b609['push'](_0x29b609['shift']());}};_0x54c952(++_0x19d388);}(_0xa41a,0x6b));var _0xaa41=function(_0x377222,_0x153da6){_0x377222=_0x377222-0x0;var _0x31ef1f=_0xa41a[_0x377222];return _0x31ef1f;};'use strict';var _=require(_0xaa41('0x0'));var util=require(_0xaa41('0x1'));var moment=require('moment');var BPromise=require(_0xaa41('0x2'));var rs=require(_0xaa41('0x3'));var fs=require('fs');var Redis=require(_0xaa41('0x4'));var db=require(_0xaa41('0x5'))['db'];var utils=require(_0xaa41('0x6'));var logger=require(_0xaa41('0x7'))(_0xaa41('0x8'));var config=require(_0xaa41('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xaa41('0xa')][_0xaa41('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x54bc5a,_0x5b1fff,_0x179545){return new BPromise(function(_0x202cce,_0x588ab4){return client[_0xaa41('0xc')](_0x54bc5a,_0x179545)[_0xaa41('0xd')](function(_0x409dab){logger[_0xaa41('0xe')](_0xaa41('0xf'),_0x5b1fff,_0xaa41('0x10'));logger[_0xaa41('0x11')](_0xaa41('0x12'),_0x5b1fff,_0xaa41('0x10'),JSON['stringify'](_0x409dab));if(_0x409dab[_0xaa41('0x13')]){if(_0x409dab[_0xaa41('0x13')]['code']===0x1f4){logger['error'](_0xaa41('0xf'),_0x5b1fff,_0x409dab['error'][_0xaa41('0x14')]);return _0x588ab4(_0x409dab[_0xaa41('0x13')][_0xaa41('0x14')]);}logger[_0xaa41('0x13')](_0xaa41('0xf'),_0x5b1fff,_0x409dab['error'][_0xaa41('0x14')]);return _0x202cce(_0x409dab[_0xaa41('0x13')][_0xaa41('0x14')]);}else{logger[_0xaa41('0xe')](_0xaa41('0xf'),_0x5b1fff,_0xaa41('0x10'));_0x202cce(_0x409dab[_0xaa41('0x15')]['message']);}})[_0xaa41('0x16')](function(_0x16b930){logger[_0xaa41('0x13')](_0xaa41('0xf'),_0x5b1fff,_0x16b930);_0x588ab4(_0x16b930);});});}exports[_0xaa41('0x17')]=function(_0xd20ddf){var _0x29efe5=this;return new Promise(function(_0x46e6d3,_0x150ddf){return db['Variable']['find']({'raw':_0xd20ddf[_0xaa41('0x18')]?_0xd20ddf[_0xaa41('0x18')][_0xaa41('0x19')]===undefined?!![]:![]:!![],'where':_0xd20ddf['options']?_0xd20ddf[_0xaa41('0x18')][_0xaa41('0x1a')]||null:null,'attributes':_0xd20ddf['options']?_0xd20ddf['options'][_0xaa41('0x1b')]||null:null,'include':_0xd20ddf['options']?_0xd20ddf[_0xaa41('0x18')][_0xaa41('0x1c')]?_[_0xaa41('0x1d')](_0xd20ddf[_0xaa41('0x18')][_0xaa41('0x1c')],function(_0x4eb01f){return{'model':db[_0x4eb01f[_0xaa41('0x1e')]],'as':_0x4eb01f['as'],'attributes':_0x4eb01f[_0xaa41('0x1b')],'include':_0x4eb01f[_0xaa41('0x1c')]?_[_0xaa41('0x1d')](_0x4eb01f[_0xaa41('0x1c')],function(_0xa1f024){return{'model':db[_0xa1f024['model']],'as':_0xa1f024['as'],'attributes':_0xa1f024['attributes'],'include':_0xa1f024[_0xaa41('0x1c')]?_['map'](_0xa1f024['include'],function(_0x12e362){return{'model':db[_0x12e362['model']],'as':_0x12e362['as'],'attributes':_0x12e362['attributes']};}):[]};}):[]};}):[]:[]})[_0xaa41('0xd')](function(_0x9c8c21){logger[_0xaa41('0xe')](_0xaa41('0x17'),_0xd20ddf);logger[_0xaa41('0x11')](_0xaa41('0x17'),_0xd20ddf,JSON['stringify'](_0x9c8c21));_0x46e6d3(_0x9c8c21);})[_0xaa41('0x16')](function(_0x1f0275){logger[_0xaa41('0x13')](_0xaa41('0x17'),_0x1f0275[_0xaa41('0x14')],_0xd20ddf);_0x150ddf(_0x29efe5[_0xaa41('0x13')](0x1f4,_0x1f0275[_0xaa41('0x14')]));});});};
\ No newline at end of file
+var _0x8ef6=['result','catch','Variable','find','options','raw','include','model','attributes','map','ShowVariable','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','request','then','info','Variable,\x20%s,\x20%s','request\x20sent','debug','Variable,\x20%s,\x20%s,\x20%s','stringify','error','code','message'];(function(_0x23d7fd,_0x16d5b1){var _0x475743=function(_0x32a188){while(--_0x32a188){_0x23d7fd['push'](_0x23d7fd['shift']());}};_0x475743(++_0x16d5b1);}(_0x8ef6,0xf2));var _0x68ef=function(_0x11016e,_0xdf9c26){_0x11016e=_0x11016e-0x0;var _0xdb7bf3=_0x8ef6[_0x11016e];return _0xdb7bf3;};'use strict';var _=require(_0x68ef('0x0'));var util=require(_0x68ef('0x1'));var moment=require(_0x68ef('0x2'));var BPromise=require(_0x68ef('0x3'));var rs=require(_0x68ef('0x4'));var fs=require('fs');var Redis=require(_0x68ef('0x5'));var db=require(_0x68ef('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x68ef('0x7'))(_0x68ef('0x8'));var config=require(_0x68ef('0x9'));var jayson=require(_0x68ef('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3c2ff3,_0x4740e8,_0x2de776){return new BPromise(function(_0x4eb5eb,_0x228967){return client[_0x68ef('0xb')](_0x3c2ff3,_0x2de776)[_0x68ef('0xc')](function(_0x22ae26){logger[_0x68ef('0xd')](_0x68ef('0xe'),_0x4740e8,_0x68ef('0xf'));logger[_0x68ef('0x10')](_0x68ef('0x11'),_0x4740e8,_0x68ef('0xf'),JSON[_0x68ef('0x12')](_0x22ae26));if(_0x22ae26[_0x68ef('0x13')]){if(_0x22ae26['error'][_0x68ef('0x14')]===0x1f4){logger[_0x68ef('0x13')](_0x68ef('0xe'),_0x4740e8,_0x22ae26[_0x68ef('0x13')][_0x68ef('0x15')]);return _0x228967(_0x22ae26[_0x68ef('0x13')]['message']);}logger[_0x68ef('0x13')](_0x68ef('0xe'),_0x4740e8,_0x22ae26[_0x68ef('0x13')]['message']);return _0x4eb5eb(_0x22ae26[_0x68ef('0x13')][_0x68ef('0x15')]);}else{logger[_0x68ef('0xd')]('Variable,\x20%s,\x20%s',_0x4740e8,_0x68ef('0xf'));_0x4eb5eb(_0x22ae26[_0x68ef('0x16')][_0x68ef('0x15')]);}})[_0x68ef('0x17')](function(_0x5c4456){logger[_0x68ef('0x13')]('Variable,\x20%s,\x20%s',_0x4740e8,_0x5c4456);_0x228967(_0x5c4456);});});}exports['ShowVariable']=function(_0x2633c1){var _0x404870=this;return new Promise(function(_0x4ade0d,_0x527870){return db[_0x68ef('0x18')][_0x68ef('0x19')]({'raw':_0x2633c1[_0x68ef('0x1a')]?_0x2633c1['options'][_0x68ef('0x1b')]===undefined?!![]:![]:!![],'where':_0x2633c1[_0x68ef('0x1a')]?_0x2633c1[_0x68ef('0x1a')]['where']||null:null,'attributes':_0x2633c1[_0x68ef('0x1a')]?_0x2633c1[_0x68ef('0x1a')]['attributes']||null:null,'include':_0x2633c1[_0x68ef('0x1a')]?_0x2633c1[_0x68ef('0x1a')][_0x68ef('0x1c')]?_['map'](_0x2633c1['options']['include'],function(_0x26018d){return{'model':db[_0x26018d[_0x68ef('0x1d')]],'as':_0x26018d['as'],'attributes':_0x26018d[_0x68ef('0x1e')],'include':_0x26018d[_0x68ef('0x1c')]?_[_0x68ef('0x1f')](_0x26018d[_0x68ef('0x1c')],function(_0x258cd5){return{'model':db[_0x258cd5[_0x68ef('0x1d')]],'as':_0x258cd5['as'],'attributes':_0x258cd5[_0x68ef('0x1e')],'include':_0x258cd5[_0x68ef('0x1c')]?_['map'](_0x258cd5[_0x68ef('0x1c')],function(_0x57f9ee){return{'model':db[_0x57f9ee['model']],'as':_0x57f9ee['as'],'attributes':_0x57f9ee['attributes']};}):[]};}):[]};}):[]:[]})[_0x68ef('0xc')](function(_0x268f32){logger[_0x68ef('0xd')](_0x68ef('0x20'),_0x2633c1);logger['debug']('ShowVariable',_0x2633c1,JSON[_0x68ef('0x12')](_0x268f32));_0x4ade0d(_0x268f32);})[_0x68ef('0x17')](function(_0x7bf96){logger[_0x68ef('0x13')](_0x68ef('0x20'),_0x7bf96[_0x68ef('0x15')],_0x2633c1);_0x527870(_0x404870[_0x68ef('0x13')](0x1f4,_0x7bf96[_0x68ef('0x15')]));});});};
\ No newline at end of file
index 48b40ab..23ca68b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x906d=['/fetch','canUpdate','fetch','isAuthenticated','/pull','/restart','restart','/migrations','migrations','exports','express','Router','./version.controller','index','get'];(function(_0x2e748c,_0x55ec8e){var _0x37e219=function(_0x38c784){while(--_0x38c784){_0x2e748c['push'](_0x2e748c['shift']());}};_0x37e219(++_0x55ec8e);}(_0x906d,0x64));var _0xd906=function(_0x119cd8,_0x556b73){_0x119cd8=_0x119cd8-0x0;var _0x7072a3=_0x906d[_0x119cd8];return _0x7072a3;};'use strict';var express=require(_0xd906('0x0'));var router=express[_0xd906('0x1')]();var auth=require('../../components/auth/service');var controller=require(_0xd906('0x2'));router['get']('/',controller[_0xd906('0x3')]);router[_0xd906('0x4')](_0xd906('0x5'),auth['isAuthenticated'](),auth[_0xd906('0x6')](),controller[_0xd906('0x7')]);router[_0xd906('0x4')]('/reset',auth[_0xd906('0x8')](),auth[_0xd906('0x6')](),controller['reset']);router['get'](_0xd906('0x9'),auth[_0xd906('0x8')](),auth[_0xd906('0x6')](),controller['pull']);router[_0xd906('0x4')](_0xd906('0xa'),auth[_0xd906('0x8')](),controller[_0xd906('0xb')]);router['get'](_0xd906('0xc'),controller[_0xd906('0xd')]);module[_0xd906('0xe')]=router;
\ No newline at end of file
+var _0xfa49=['isAuthenticated','pull','restart','migrations','exports','express','Router','../../components/auth/service','./version.controller','get','index','/fetch','canUpdate','/reset','reset'];(function(_0x4b055c,_0x4b870b){var _0x4b62bb=function(_0x4884c2){while(--_0x4884c2){_0x4b055c['push'](_0x4b055c['shift']());}};_0x4b62bb(++_0x4b870b);}(_0xfa49,0x1e5));var _0x9fa4=function(_0x4456d0,_0x109429){_0x4456d0=_0x4456d0-0x0;var _0x59210e=_0xfa49[_0x4456d0];return _0x59210e;};'use strict';var express=require(_0x9fa4('0x0'));var router=express[_0x9fa4('0x1')]();var auth=require(_0x9fa4('0x2'));var controller=require(_0x9fa4('0x3'));router[_0x9fa4('0x4')]('/',controller[_0x9fa4('0x5')]);router[_0x9fa4('0x4')](_0x9fa4('0x6'),auth['isAuthenticated'](),auth[_0x9fa4('0x7')](),controller['fetch']);router['get'](_0x9fa4('0x8'),auth['isAuthenticated'](),auth[_0x9fa4('0x7')](),controller[_0x9fa4('0x9')]);router[_0x9fa4('0x4')]('/pull',auth[_0x9fa4('0xa')](),auth[_0x9fa4('0x7')](),controller[_0x9fa4('0xb')]);router['get']('/restart',auth['isAuthenticated'](),controller[_0x9fa4('0xc')]);router[_0x9fa4('0x4')]('/migrations',controller[_0x9fa4('0xd')]);module[_0x9fa4('0xe')]=router;
\ No newline at end of file
index 3ef00e0..516a14e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x627c=['catch','migrations','readdirSync','root','server','length','replace','.js','push','sort','sequelize','Migration','getQueryInterface','constructor','Migration\x20tried\x20to\x20use\x20old\x20style\x20\x22done\x22\x20callback.\x20Please\x20upgrade\x20to\x20\x22umzug\x22\x20and\x20return\x20a\x20promise\x20instead.','join','map','then','Database\x20migrated\x20successfully\x20from\x20version\x20','\x20to\x20','last','Database\x20already\x20up-to-date','path','pkginfo','version','compare-versions','child_process','exec','../../mysqldb','../../config/environment','../../config/logger','update','simple-git','index','exports','query','fetch','tags','latest','2.0.0','status','json','origin','master','error','info','git\x20fetch','git\x20fetch\x20origin\x20master','reset','--hard','FETCH_HEAD','pull','npm\x20install\x20--production','restart','motion2','pm2\x20restart\x20motion\x20%s','Your\x20system\x20has\x20been\x20restart\x20successfully'];(function(_0x3a2c7f,_0x3a342f){var _0x116c28=function(_0x353f63){while(--_0x353f63){_0x3a2c7f['push'](_0x3a2c7f['shift']());}};_0x116c28(++_0x3a342f);}(_0x627c,0x1de));var _0xc627=function(_0x17bfb9,_0x861521){_0x17bfb9=_0x17bfb9-0x0;var _0x3cdf20=_0x627c[_0x17bfb9];return _0x3cdf20;};'use strict';var Umzug=require('umzug');var path=require(_0xc627('0x0'));var fs=require('fs');var _=require('lodash');var pkginfo=require(_0xc627('0x1'))(module,_0xc627('0x2'));var compareVersions=require(_0xc627('0x3'));var exec=require(_0xc627('0x4'))[_0xc627('0x5')];var db=require(_0xc627('0x6'))['db'];var config=require(_0xc627('0x7'));var pm2=require('../../config/pm2');var logger=require(_0xc627('0x8'))(_0xc627('0x9'));var git=require(_0xc627('0xa'))(config['root']);exports[_0xc627('0xb')]=function(_0x11e5e4,_0x4dbcb8){var _0x2892c8={'current':module[_0xc627('0xc')][_0xc627('0x2')],'phonebar':0x2};if(_0x11e5e4[_0xc627('0xd')]&&_0x11e5e4[_0xc627('0xd')]['latest']){return git[_0xc627('0xe')]()[_0xc627('0xf')](function(_0x20aae0,_0x12146){_0x2892c8['latest']=(_0x20aae0?module[_0xc627('0xc')][_0xc627('0x2')]:_0x12146[_0xc627('0x10')])||_0xc627('0x11');return _0x4dbcb8[_0xc627('0x12')](0xc8)[_0xc627('0x13')](_0x2892c8);});}else{return _0x4dbcb8[_0xc627('0x12')](0xc8)['json'](_0x2892c8);}};exports['fetch']=function(_0xfe6def,_0x45bab1){return git[_0xc627('0xe')]([_0xc627('0x14'),_0xc627('0x15')],function(_0x3e7b93){if(_0x3e7b93){logger[_0xc627('0x16')](_0x3e7b93);return _0x45bab1[_0xc627('0x12')](0x1f4)[_0xc627('0x13')](_0x3e7b93);}logger[_0xc627('0x17')](_0xc627('0x18'));return _0x45bab1[_0xc627('0x12')](0xc8)[_0xc627('0x13')]({'output':_0xc627('0x19')});});};exports[_0xc627('0x1a')]=function(_0x36eecd,_0x38c507){return git[_0xc627('0x1a')]([_0xc627('0x1b'),_0xc627('0x1c')],function(_0xf00595){if(_0xf00595){logger[_0xc627('0x16')](_0xf00595);return _0x38c507[_0xc627('0x12')](0x1f4)[_0xc627('0x13')](_0xf00595);}logger['info']('git\x20reset\x20--hard\x20FETCH_HEAD');return _0x38c507[_0xc627('0x12')](0xc8)[_0xc627('0x13')]({'output':'git\x20reset\x20--hard'});});};exports[_0xc627('0x1d')]=function(_0x3d524a,_0x2d2476){exec(_0xc627('0x1e'),function(_0x21ead4,_0x2fc4a3,_0x2705a9){logger[_0xc627('0x17')](_0x2fc4a3);logger['info'](_0x2705a9);if(_0x21ead4){logger[_0xc627('0x16')](_0x21ead4);return _0x2d2476[_0xc627('0x12')](0x1f4)[_0xc627('0x13')](_0x21ead4);}return _0x2d2476['status'](0xc8)[_0xc627('0x13')]({'output':_0x2fc4a3});});};exports[_0xc627('0x1f')]=function(_0x506951,_0x321623){return pm2[_0xc627('0x1f')](_0xc627('0x20'))['then'](function(_0x20baff){logger[_0xc627('0x17')](_0xc627('0x21'),_0x20baff);return _0x321623[_0xc627('0x12')](0xc8)['json']({'output':_0xc627('0x22')});})[_0xc627('0x23')](function(_0x561b50){logger['error'](_0x561b50);return _0x321623[_0xc627('0x12')](0x1f4)[_0xc627('0x13')](_0x561b50);});};exports[_0xc627('0x24')]=function(_0x46a21f,_0x4a1ed9){var _0x5d7a0f=fs[_0xc627('0x25')](path['join'](config[_0xc627('0x26')],_0xc627('0x27'),_0xc627('0x24')));var _0x15463d=[];for(var _0x4d95b9=0x0;_0x4d95b9<_0x5d7a0f[_0xc627('0x28')];_0x4d95b9++){var _0x4b7fd5=_0x5d7a0f[_0x4d95b9][_0xc627('0x29')](_0xc627('0x2a'),'');if(compareVersions(module[_0xc627('0xc')][_0xc627('0x2')],_0x4b7fd5)===-0x1){_0x15463d[_0xc627('0x2b')](_0x4b7fd5);}}if(_0x15463d[_0xc627('0x28')]){var _0x2f8def=_0x15463d[_0xc627('0x2c')](compareVersions);var _0x27b28b=new Umzug({'storage':_0xc627('0x2d'),'storageOptions':{'model':db[_0xc627('0x2e')],'modelName':_0xc627('0x2e'),'columnName':_0xc627('0x2')},'migrations':{'params':[db[_0xc627('0x2d')][_0xc627('0x2f')](),db[_0xc627('0x2d')][_0xc627('0x30')],function(){throw new Error(_0xc627('0x31'));}],'path':path[_0xc627('0x32')](config[_0xc627('0x26')],_0xc627('0x27'),_0xc627('0x24')),'pattern':/\.js$/}});_0x27b28b['up']({'migrations':_[_0xc627('0x33')](_0x2f8def,function(_0x424f90){return _0x424f90+_0xc627('0x2a');})})[_0xc627('0x34')](function(){return _0x4a1ed9[_0xc627('0x12')](0xc8)['json']({'output':_0xc627('0x35')+module[_0xc627('0xc')][_0xc627('0x2')]+_0xc627('0x36')+_[_0xc627('0x37')](_0x2f8def),'migrations':_[_0xc627('0x32')](_0x2f8def)});})['catch'](function(_0x389948){if(_0x389948 instanceof db[_0xc627('0x2d')]['UniqueConstraintError']){return _0x4a1ed9[_0xc627('0x12')](0xc8)[_0xc627('0x13')]({'output':_0xc627('0x38')});}else{return _0x4a1ed9[_0xc627('0x12')](0x1f4)[_0xc627('0x13')](_0x389948);}});}else{return _0x4a1ed9[_0xc627('0x12')](0xc8)['json']({'output':_0xc627('0x38')});}};
\ No newline at end of file
+var _0xf6c4=['root','index','query','fetch','tags','latest','exports','2.0.0','status','json','origin','master','error','info','git\x20fetch','git\x20fetch\x20origin\x20master','reset','git\x20reset\x20--hard\x20FETCH_HEAD','pull','npm\x20install\x20--production','restart','motion2','then','pm2\x20restart\x20motion\x20%s','readdirSync','migrations','length','replace','.js','push','Migration','sequelize','constructor','Migration\x20tried\x20to\x20use\x20old\x20style\x20\x22done\x22\x20callback.\x20Please\x20upgrade\x20to\x20\x22umzug\x22\x20and\x20return\x20a\x20promise\x20instead.','join','server','map','catch','UniqueConstraintError','Database\x20already\x20up-to-date','umzug','path','lodash','version','compare-versions','child_process','../../mysqldb','../../config/environment','../../config/logger','update'];(function(_0x58518e,_0x13cc8d){var _0x658794=function(_0x484530){while(--_0x484530){_0x58518e['push'](_0x58518e['shift']());}};_0x658794(++_0x13cc8d);}(_0xf6c4,0x8c));var _0x4f6c=function(_0xa9281c,_0x4ec723){_0xa9281c=_0xa9281c-0x0;var _0x99b105=_0xf6c4[_0xa9281c];return _0x99b105;};'use strict';var Umzug=require(_0x4f6c('0x0'));var path=require(_0x4f6c('0x1'));var fs=require('fs');var _=require(_0x4f6c('0x2'));var pkginfo=require('pkginfo')(module,_0x4f6c('0x3'));var compareVersions=require(_0x4f6c('0x4'));var exec=require(_0x4f6c('0x5'))['exec'];var db=require(_0x4f6c('0x6'))['db'];var config=require(_0x4f6c('0x7'));var pm2=require('../../config/pm2');var logger=require(_0x4f6c('0x8'))(_0x4f6c('0x9'));var git=require('simple-git')(config[_0x4f6c('0xa')]);exports[_0x4f6c('0xb')]=function(_0x21a707,_0x3ef6c8){var _0x5c4a02={'current':module['exports'][_0x4f6c('0x3')],'phonebar':0x2};if(_0x21a707[_0x4f6c('0xc')]&&_0x21a707[_0x4f6c('0xc')]['latest']){return git[_0x4f6c('0xd')]()[_0x4f6c('0xe')](function(_0x310178,_0x151cc2){_0x5c4a02[_0x4f6c('0xf')]=(_0x310178?module[_0x4f6c('0x10')][_0x4f6c('0x3')]:_0x151cc2['latest'])||_0x4f6c('0x11');return _0x3ef6c8[_0x4f6c('0x12')](0xc8)[_0x4f6c('0x13')](_0x5c4a02);});}else{return _0x3ef6c8[_0x4f6c('0x12')](0xc8)['json'](_0x5c4a02);}};exports[_0x4f6c('0xd')]=function(_0x3a5ab9,_0x21f384){return git[_0x4f6c('0xd')]([_0x4f6c('0x14'),_0x4f6c('0x15')],function(_0x56b841){if(_0x56b841){logger[_0x4f6c('0x16')](_0x56b841);return _0x21f384[_0x4f6c('0x12')](0x1f4)[_0x4f6c('0x13')](_0x56b841);}logger[_0x4f6c('0x17')](_0x4f6c('0x18'));return _0x21f384[_0x4f6c('0x12')](0xc8)[_0x4f6c('0x13')]({'output':_0x4f6c('0x19')});});};exports[_0x4f6c('0x1a')]=function(_0x42ed5a,_0x541ad0){return git['reset'](['--hard','FETCH_HEAD'],function(_0x3c9732){if(_0x3c9732){logger[_0x4f6c('0x16')](_0x3c9732);return _0x541ad0[_0x4f6c('0x12')](0x1f4)[_0x4f6c('0x13')](_0x3c9732);}logger[_0x4f6c('0x17')](_0x4f6c('0x1b'));return _0x541ad0[_0x4f6c('0x12')](0xc8)['json']({'output':'git\x20reset\x20--hard'});});};exports[_0x4f6c('0x1c')]=function(_0x2ed627,_0x2a4ad3){exec(_0x4f6c('0x1d'),function(_0x3c5508,_0x5b55fe,_0x37749c){logger['info'](_0x5b55fe);logger[_0x4f6c('0x17')](_0x37749c);if(_0x3c5508){logger['error'](_0x3c5508);return _0x2a4ad3[_0x4f6c('0x12')](0x1f4)['json'](_0x3c5508);}return _0x2a4ad3[_0x4f6c('0x12')](0xc8)[_0x4f6c('0x13')]({'output':_0x5b55fe});});};exports[_0x4f6c('0x1e')]=function(_0x4d3171,_0x596071){return pm2['restart'](_0x4f6c('0x1f'))[_0x4f6c('0x20')](function(_0x5cfb41){logger[_0x4f6c('0x17')](_0x4f6c('0x21'),_0x5cfb41);return _0x596071['status'](0xc8)['json']({'output':'Your\x20system\x20has\x20been\x20restart\x20successfully'});})['catch'](function(_0x24095d){logger[_0x4f6c('0x16')](_0x24095d);return _0x596071[_0x4f6c('0x12')](0x1f4)['json'](_0x24095d);});};exports['migrations']=function(_0x2aa934,_0x37233a){var _0x5c7927=fs[_0x4f6c('0x22')](path['join'](config[_0x4f6c('0xa')],'server',_0x4f6c('0x23')));var _0x57ff7d=[];for(var _0x2917fe=0x0;_0x2917fe<_0x5c7927[_0x4f6c('0x24')];_0x2917fe++){var _0x1fa00c=_0x5c7927[_0x2917fe][_0x4f6c('0x25')](_0x4f6c('0x26'),'');if(compareVersions(module['exports'][_0x4f6c('0x3')],_0x1fa00c)===-0x1){_0x57ff7d[_0x4f6c('0x27')](_0x1fa00c);}}if(_0x57ff7d['length']){var _0xf1d192=_0x57ff7d['sort'](compareVersions);var _0x5b0bed=new Umzug({'storage':'sequelize','storageOptions':{'model':db[_0x4f6c('0x28')],'modelName':_0x4f6c('0x28'),'columnName':'version'},'migrations':{'params':[db[_0x4f6c('0x29')]['getQueryInterface'](),db['sequelize'][_0x4f6c('0x2a')],function(){throw new Error(_0x4f6c('0x2b'));}],'path':path[_0x4f6c('0x2c')](config[_0x4f6c('0xa')],_0x4f6c('0x2d'),'migrations'),'pattern':/\.js$/}});_0x5b0bed['up']({'migrations':_[_0x4f6c('0x2e')](_0xf1d192,function(_0x361b9d){return _0x361b9d+'.js';})})[_0x4f6c('0x20')](function(){return _0x37233a[_0x4f6c('0x12')](0xc8)['json']({'output':'Database\x20migrated\x20successfully\x20from\x20version\x20'+module['exports'][_0x4f6c('0x3')]+'\x20to\x20'+_['last'](_0xf1d192),'migrations':_[_0x4f6c('0x2c')](_0xf1d192)});})[_0x4f6c('0x2f')](function(_0x12e6dd){if(_0x12e6dd instanceof db[_0x4f6c('0x29')][_0x4f6c('0x30')]){return _0x37233a[_0x4f6c('0x12')](0xc8)[_0x4f6c('0x13')]({'output':'Database\x20already\x20up-to-date'});}else{return _0x37233a['status'](0x1f4)[_0x4f6c('0x13')](_0x12e6dd);}});}else{return _0x37233a[_0x4f6c('0x12')](0xc8)[_0x4f6c('0x13')]({'output':_0x4f6c('0x31')});}};
\ No newline at end of file
index 7cb4054..b319fd9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3847=['../../config/environment','./voiceAgentReport.controller','get','isAuthenticated','index','/describe','describe','/:id','post','create','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x113a9b,_0x525a06){var _0x4cc43a=function(_0x4e173d){while(--_0x4e173d){_0x113a9b['push'](_0x113a9b['shift']());}};_0x4cc43a(++_0x525a06);}(_0x3847,0x1d8));var _0x7384=function(_0x3e6ee0,_0x57887e){_0x3e6ee0=_0x3e6ee0-0x0;var _0xf59027=_0x3847[_0x3e6ee0];return _0xf59027;};'use strict';var multer=require('multer');var util=require(_0x7384('0x0'));var path=require(_0x7384('0x1'));var timeout=require(_0x7384('0x2'));var express=require(_0x7384('0x3'));var router=express[_0x7384('0x4')]();var fs_extra=require(_0x7384('0x5'));var auth=require(_0x7384('0x6'));var interaction=require(_0x7384('0x7'));var config=require(_0x7384('0x8'));var controller=require(_0x7384('0x9'));router[_0x7384('0xa')]('/',auth[_0x7384('0xb')](),controller[_0x7384('0xc')]);router[_0x7384('0xa')](_0x7384('0xd'),auth['isAuthenticated'](),controller[_0x7384('0xe')]);router[_0x7384('0xa')](_0x7384('0xf'),auth['isAuthenticated'](),controller['show']);router[_0x7384('0x10')]('/',auth[_0x7384('0xb')](),controller[_0x7384('0x11')]);router['put'](_0x7384('0xf'),auth['isAuthenticated'](),controller['update']);router['delete'](_0x7384('0xf'),auth[_0x7384('0xb')](),controller[_0x7384('0x12')]);module[_0x7384('0x13')]=router;
\ No newline at end of file
+var _0x3d1e=['Router','fs-extra','../../components/interaction/service','./voiceAgentReport.controller','get','isAuthenticated','/describe','describe','/:id','show','post','create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express'];(function(_0x5b2270,_0x4cded3){var _0x58cd6e=function(_0x15ee72){while(--_0x15ee72){_0x5b2270['push'](_0x5b2270['shift']());}};_0x58cd6e(++_0x4cded3);}(_0x3d1e,0x19d));var _0xe3d1=function(_0x63d906,_0x328d17){_0x63d906=_0x63d906-0x0;var _0x571949=_0x3d1e[_0x63d906];return _0x571949;};'use strict';var multer=require(_0xe3d1('0x0'));var util=require(_0xe3d1('0x1'));var path=require(_0xe3d1('0x2'));var timeout=require(_0xe3d1('0x3'));var express=require(_0xe3d1('0x4'));var router=express[_0xe3d1('0x5')]();var fs_extra=require(_0xe3d1('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0xe3d1('0x7'));var config=require('../../config/environment');var controller=require(_0xe3d1('0x8'));router[_0xe3d1('0x9')]('/',auth[_0xe3d1('0xa')](),controller['index']);router[_0xe3d1('0x9')](_0xe3d1('0xb'),auth[_0xe3d1('0xa')](),controller[_0xe3d1('0xc')]);router[_0xe3d1('0x9')](_0xe3d1('0xd'),auth['isAuthenticated'](),controller[_0xe3d1('0xe')]);router[_0xe3d1('0xf')]('/',auth[_0xe3d1('0xa')](),controller[_0xe3d1('0x10')]);router[_0xe3d1('0x11')](_0xe3d1('0xd'),auth['isAuthenticated'](),controller[_0xe3d1('0x12')]);router[_0xe3d1('0x13')](_0xe3d1('0xd'),auth[_0xe3d1('0xa')](),controller[_0xe3d1('0x14')]);module[_0xe3d1('0x15')]=router;
\ No newline at end of file
index 59c9b71..3d45af3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3fce=['FORWARD,\x20BLIND,\x20ATTENDED','exports','STRING','DATE','BOOLEAN','INTEGER'];(function(_0xbca1b1,_0x33f0ce){var _0x4e1686=function(_0x58a80c){while(--_0x58a80c){_0xbca1b1['push'](_0xbca1b1['shift']());}};_0x4e1686(++_0x33f0ce);}(_0x3fce,0x121));var _0xe3fc=function(_0x29ae80,_0x3579f1){_0x29ae80=_0x29ae80-0x0;var _0x5d6d71=_0x3fce[_0x29ae80];return _0x5d6d71;};'use strict';var Sequelize=require('sequelize');module[_0xe3fc('0x0')]={'type':{'type':Sequelize[_0xe3fc('0x1')]},'uniqueid':{'type':Sequelize[_0xe3fc('0x1')]},'calleridnum':{'type':Sequelize[_0xe3fc('0x1')]},'calleridname':{'type':Sequelize[_0xe3fc('0x1')]},'queue':{'type':Sequelize[_0xe3fc('0x1')]},'interface':{'type':Sequelize[_0xe3fc('0x1')]},'membername':{'type':Sequelize['STRING']},'agentcalledAt':{'type':Sequelize['DATE']},'agentconnectAt':{'type':Sequelize['DATE']},'agentcompleteAt':{'type':Sequelize['DATE']},'agentringnoanswerAt':{'type':Sequelize[_0xe3fc('0x2')]},'agentdumpAt':{'type':Sequelize[_0xe3fc('0x2')]},'holdtime':{'type':Sequelize['INTEGER']},'agentcomplete':{'type':Sequelize[_0xe3fc('0x3')],'defaultValue':![]},'agentringnoanswer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentdump':{'type':Sequelize[_0xe3fc('0x3')],'defaultValue':![]},'talktime':{'type':Sequelize['INTEGER']},'agentacw':{'type':Sequelize[_0xe3fc('0x3')],'defaultValue':![]},'acwtime':{'type':Sequelize[_0xe3fc('0x4')]},'reason':{'type':Sequelize[_0xe3fc('0x1')]},'lastevent':{'type':Sequelize[_0xe3fc('0x1')]},'channel':{'type':Sequelize[_0xe3fc('0x1')]},'channelstate':{'type':Sequelize['INTEGER']},'channelstatedesc':{'type':Sequelize['STRING']},'connectedlinenum':{'type':Sequelize[_0xe3fc('0x1')]},'connectedlinename':{'type':Sequelize[_0xe3fc('0x1')]},'language':{'type':Sequelize[_0xe3fc('0x1')]},'accountcode':{'type':Sequelize['STRING']},'context':{'type':Sequelize[_0xe3fc('0x1')]},'exten':{'type':Sequelize[_0xe3fc('0x1')]},'priority':{'type':Sequelize[_0xe3fc('0x1')]},'destchannel':{'type':Sequelize[_0xe3fc('0x1')]},'destchannelstate':{'type':Sequelize[_0xe3fc('0x4')]},'destchannelstatedesc':{'type':Sequelize[_0xe3fc('0x1')]},'destcalleridnum':{'type':Sequelize[_0xe3fc('0x1')]},'destcalleridname':{'type':Sequelize['STRING']},'destconnectedlinenum':{'type':Sequelize[_0xe3fc('0x1')]},'destconnectedlinename':{'type':Sequelize[_0xe3fc('0x1')]},'destlanguage':{'type':Sequelize['STRING']},'destaccountcode':{'type':Sequelize[_0xe3fc('0x1')]},'destcontext':{'type':Sequelize[_0xe3fc('0x1')]},'destexten':{'type':Sequelize['STRING']},'destpriority':{'type':Sequelize[_0xe3fc('0x1')]},'destuniqueid':{'type':Sequelize[_0xe3fc('0x1')]},'answeredelsewheredestinationuniqueid':{'type':Sequelize['STRING']},'answeredelsewheremembername':{'type':Sequelize['STRING']},'transfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'transfertype':{'type':Sequelize[_0xe3fc('0x1')],'comment':_0xe3fc('0x5')},'transferexten':{'type':Sequelize[_0xe3fc('0x1')]},'transferuniqueid':{'type':Sequelize['STRING']},'agententerreason':{'type':Sequelize['INTEGER'],'defaultValue':0x0}};
\ No newline at end of file
+var _0xd7a0=['BOOLEAN','sequelize','exports','STRING','DATE','INTEGER'];(function(_0xce1a87,_0x372c44){var _0x26669d=function(_0x215038){while(--_0x215038){_0xce1a87['push'](_0xce1a87['shift']());}};_0x26669d(++_0x372c44);}(_0xd7a0,0x163));var _0x0d7a=function(_0x11f2ba,_0x15ed34){_0x11f2ba=_0x11f2ba-0x0;var _0x31f60b=_0xd7a0[_0x11f2ba];return _0x31f60b;};'use strict';var Sequelize=require(_0x0d7a('0x0'));module[_0x0d7a('0x1')]={'type':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize[_0x0d7a('0x2')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x0d7a('0x2')]},'queue':{'type':Sequelize[_0x0d7a('0x2')]},'interface':{'type':Sequelize[_0x0d7a('0x2')]},'membername':{'type':Sequelize[_0x0d7a('0x2')]},'agentcalledAt':{'type':Sequelize[_0x0d7a('0x3')]},'agentconnectAt':{'type':Sequelize['DATE']},'agentcompleteAt':{'type':Sequelize[_0x0d7a('0x3')]},'agentringnoanswerAt':{'type':Sequelize[_0x0d7a('0x3')]},'agentdumpAt':{'type':Sequelize[_0x0d7a('0x3')]},'holdtime':{'type':Sequelize[_0x0d7a('0x4')]},'agentcomplete':{'type':Sequelize[_0x0d7a('0x5')],'defaultValue':![]},'agentringnoanswer':{'type':Sequelize[_0x0d7a('0x5')],'defaultValue':![]},'agentdump':{'type':Sequelize[_0x0d7a('0x5')],'defaultValue':![]},'talktime':{'type':Sequelize['INTEGER']},'agentacw':{'type':Sequelize[_0x0d7a('0x5')],'defaultValue':![]},'acwtime':{'type':Sequelize[_0x0d7a('0x4')]},'reason':{'type':Sequelize[_0x0d7a('0x2')]},'lastevent':{'type':Sequelize[_0x0d7a('0x2')]},'channel':{'type':Sequelize['STRING']},'channelstate':{'type':Sequelize[_0x0d7a('0x4')]},'channelstatedesc':{'type':Sequelize[_0x0d7a('0x2')]},'connectedlinenum':{'type':Sequelize['STRING']},'connectedlinename':{'type':Sequelize[_0x0d7a('0x2')]},'language':{'type':Sequelize[_0x0d7a('0x2')]},'accountcode':{'type':Sequelize[_0x0d7a('0x2')]},'context':{'type':Sequelize[_0x0d7a('0x2')]},'exten':{'type':Sequelize[_0x0d7a('0x2')]},'priority':{'type':Sequelize['STRING']},'destchannel':{'type':Sequelize['STRING']},'destchannelstate':{'type':Sequelize[_0x0d7a('0x4')]},'destchannelstatedesc':{'type':Sequelize[_0x0d7a('0x2')]},'destcalleridnum':{'type':Sequelize[_0x0d7a('0x2')]},'destcalleridname':{'type':Sequelize['STRING']},'destconnectedlinenum':{'type':Sequelize[_0x0d7a('0x2')]},'destconnectedlinename':{'type':Sequelize['STRING']},'destlanguage':{'type':Sequelize['STRING']},'destaccountcode':{'type':Sequelize[_0x0d7a('0x2')]},'destcontext':{'type':Sequelize['STRING']},'destexten':{'type':Sequelize[_0x0d7a('0x2')]},'destpriority':{'type':Sequelize[_0x0d7a('0x2')]},'destuniqueid':{'type':Sequelize[_0x0d7a('0x2')]},'answeredelsewheredestinationuniqueid':{'type':Sequelize[_0x0d7a('0x2')]},'answeredelsewheremembername':{'type':Sequelize['STRING']},'transfer':{'type':Sequelize[_0x0d7a('0x5')],'defaultValue':![]},'transfertype':{'type':Sequelize[_0x0d7a('0x2')],'comment':'FORWARD,\x20BLIND,\x20ATTENDED'},'transferexten':{'type':Sequelize[_0x0d7a('0x2')]},'transferuniqueid':{'type':Sequelize[_0x0d7a('0x2')]},'agententerreason':{'type':Sequelize[_0x0d7a('0x4')],'defaultValue':0x0}};
\ No newline at end of file
index fcd4c9c..c7460a7 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(_0x4e676e,_0x2a7c6d){var _0x336a3c=function(_0x4767c4){while(--_0x4767c4){_0x4e676e['push'](_0x4e676e['shift']());}};_0x336a3c(++_0x2a7c6d);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3a6efd,_0x2a5102){_0x3a6efd=_0x3a6efd-0x0;var _0x487b9a=_0xa9e0[_0x3a6efd];return _0x487b9a;};'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(_0x31a371,_0x50828e){var _0x2a5bd6=function(_0x2fb481){while(--_0x2fb481){_0x31a371['push'](_0x31a371['shift']());}};_0x2a5bd6(++_0x50828e);}(_0xa9e0,0x123));var _0x0a9e=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xa9e0[_0x14add3];return _0x4a174f;};'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 2e2a527..e83932a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x885a=['./voiceAgentReport.attributes','exports','define','VoiceAgentReport','uniqueid','destuniqueid','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x885a,0x180));var _0xa885=function(_0x3e5086,_0x48f4a2){_0x3e5086=_0x3e5086-0x0;var _0xfeb102=_0x885a[_0x3e5086];return _0xfeb102;};'use strict';var _=require('lodash');var util=require(_0xa885('0x0'));var logger=require(_0xa885('0x1'))(_0xa885('0x2'));var moment=require(_0xa885('0x3'));var BPromise=require('bluebird');var rp=require(_0xa885('0x4'));var fs=require('fs');var path=require(_0xa885('0x5'));var rimraf=require(_0xa885('0x6'));var config=require(_0xa885('0x7'));var attributes=require(_0xa885('0x8'));module[_0xa885('0x9')]=function(_0x5dfd7e,_0x7ac6bd){return _0x5dfd7e[_0xa885('0xa')](_0xa885('0xb'),attributes,{'tableName':'report_agent','paranoid':![],'indexes':[{'fields':[_0xa885('0xc'),_0xa885('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x3561=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./voiceAgentReport.attributes','exports','define','report_agent','uniqueid','destuniqueid','lodash','../../config/logger'];(function(_0x5550f9,_0x36bd22){var _0x58f71a=function(_0x31311d){while(--_0x31311d){_0x5550f9['push'](_0x5550f9['shift']());}};_0x58f71a(++_0x36bd22);}(_0x3561,0x94));var _0x1356=function(_0x17c0e5,_0x4e4c0b){_0x17c0e5=_0x17c0e5-0x0;var _0xc2e7f8=_0x3561[_0x17c0e5];return _0xc2e7f8;};'use strict';var _=require(_0x1356('0x0'));var util=require('util');var logger=require(_0x1356('0x1'))(_0x1356('0x2'));var moment=require(_0x1356('0x3'));var BPromise=require(_0x1356('0x4'));var rp=require(_0x1356('0x5'));var fs=require('fs');var path=require(_0x1356('0x6'));var rimraf=require(_0x1356('0x7'));var config=require(_0x1356('0x8'));var attributes=require(_0x1356('0x9'));module[_0x1356('0xa')]=function(_0x417d11,_0x36e81f){return _0x417d11[_0x1356('0xb')]('VoiceAgentReport',attributes,{'tableName':_0x1356('0xc'),'paranoid':![],'indexes':[{'fields':[_0x1356('0xd'),_0x1356('0xe')]}],'timestamps':!![]});};
\ No newline at end of file
index 5769b9d..742ad80 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x69c3=['CreateVoiceAgentReport','UpdateVoiceAgentReport','VoiceAgentReport','options','where','attributes','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','VoiceAgentReport,\x20%s,\x20%s','stringify','error','message','request\x20sent','result','catch','body','raw','then','debug'];(function(_0x189e54,_0x4bb31d){var _0x58db6d=function(_0x4d1798){while(--_0x4d1798){_0x189e54['push'](_0x189e54['shift']());}};_0x58db6d(++_0x4bb31d);}(_0x69c3,0x1d1));var _0x369c=function(_0x5b82e9,_0x382fe1){_0x5b82e9=_0x5b82e9-0x0;var _0x204239=_0x69c3[_0x5b82e9];return _0x204239;};'use strict';var _=require('lodash');var util=require(_0x369c('0x0'));var moment=require(_0x369c('0x1'));var BPromise=require(_0x369c('0x2'));var rs=require(_0x369c('0x3'));var fs=require('fs');var Redis=require(_0x369c('0x4'));var db=require(_0x369c('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x369c('0x6'))(_0x369c('0x7'));var config=require(_0x369c('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x369c('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x330b08,_0x58cc1d,_0x19bde8){return new BPromise(function(_0x2c3885,_0x34e642){return client['request'](_0x330b08,_0x19bde8)['then'](function(_0x1dc8e6){logger['info'](_0x369c('0xa'),_0x58cc1d,'request\x20sent');logger['debug']('VoiceAgentReport,\x20%s,\x20%s,\x20%s',_0x58cc1d,'request\x20sent',JSON[_0x369c('0xb')](_0x1dc8e6));if(_0x1dc8e6[_0x369c('0xc')]){if(_0x1dc8e6[_0x369c('0xc')]['code']===0x1f4){logger[_0x369c('0xc')](_0x369c('0xa'),_0x58cc1d,_0x1dc8e6['error']['message']);return _0x34e642(_0x1dc8e6[_0x369c('0xc')][_0x369c('0xd')]);}logger['error']('VoiceAgentReport,\x20%s,\x20%s',_0x58cc1d,_0x1dc8e6[_0x369c('0xc')][_0x369c('0xd')]);return _0x2c3885(_0x1dc8e6[_0x369c('0xc')]['message']);}else{logger['info']('VoiceAgentReport,\x20%s,\x20%s',_0x58cc1d,_0x369c('0xe'));_0x2c3885(_0x1dc8e6[_0x369c('0xf')]['message']);}})[_0x369c('0x10')](function(_0x571ece){logger[_0x369c('0xc')](_0x369c('0xa'),_0x58cc1d,_0x571ece);_0x34e642(_0x571ece);});});}exports['CreateVoiceAgentReport']=function(_0x39e0cb){var _0x199ac9=this;return new Promise(function(_0xafb0b0,_0x46badb){return db['VoiceAgentReport']['create'](_0x39e0cb[_0x369c('0x11')],{'raw':_0x39e0cb['options']?_0x39e0cb['options'][_0x369c('0x12')]===undefined?!![]:![]:!![]})[_0x369c('0x13')](function(_0x1a2600){logger['info']('CreateVoiceAgentReport',_0x39e0cb);logger[_0x369c('0x14')](_0x369c('0x15'),_0x39e0cb,JSON[_0x369c('0xb')](_0x1a2600));_0xafb0b0(_0x1a2600);})[_0x369c('0x10')](function(_0xb51cb5){logger[_0x369c('0xc')]('CreateVoiceAgentReport',_0xb51cb5['message'],_0x39e0cb);_0x46badb(_0x199ac9[_0x369c('0xc')](0x1f4,_0xb51cb5['message']));});});};exports[_0x369c('0x16')]=function(_0x131d88){var _0x9a37ef=this;return new Promise(function(_0x3516ce,_0x16eeb4){return db[_0x369c('0x17')]['update'](_0x131d88[_0x369c('0x11')],{'raw':_0x131d88[_0x369c('0x18')]?_0x131d88[_0x369c('0x18')][_0x369c('0x12')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x131d88[_0x369c('0x18')]?_0x131d88[_0x369c('0x18')][_0x369c('0x19')]||null:null,'attributes':_0x131d88[_0x369c('0x18')]?_0x131d88[_0x369c('0x18')][_0x369c('0x1a')]||null:null,'limit':_0x131d88[_0x369c('0x18')]?_0x131d88[_0x369c('0x18')]['limit']||null:null})[_0x369c('0x13')](function(_0x274726){logger['info'](_0x369c('0x16'),_0x131d88);logger[_0x369c('0x14')](_0x369c('0x16'),_0x131d88,JSON[_0x369c('0xb')](_0x274726));_0x3516ce(_0x274726);})[_0x369c('0x10')](function(_0x57adb4){logger['error'](_0x369c('0x16'),_0x57adb4[_0x369c('0xd')],_0x131d88);_0x16eeb4(_0x9a37ef[_0x369c('0xc')](0x1f4,_0x57adb4[_0x369c('0xd')]));});});};
\ No newline at end of file
+var _0xa6b3=['client','http','request','then','info','request\x20sent','debug','VoiceAgentReport,\x20%s,\x20%s,\x20%s','error','code','message','VoiceAgentReport,\x20%s,\x20%s','catch','CreateVoiceAgentReport','VoiceAgentReport','create','body','options','stringify','UpdateVoiceAgentReport','limit','util','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x4e10ef,_0x43bb57){var _0x3528ef=function(_0x40cbf4){while(--_0x40cbf4){_0x4e10ef['push'](_0x4e10ef['shift']());}};_0x3528ef(++_0x43bb57);}(_0xa6b3,0x165));var _0x3a6b=function(_0x33e48f,_0x47ef69){_0x33e48f=_0x33e48f-0x0;var _0x591d05=_0xa6b3[_0x33e48f];return _0x591d05;};'use strict';var _=require('lodash');var util=require(_0x3a6b('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x3a6b('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x3a6b('0x2'))['db'];var utils=require('../../config/utils');var logger=require(_0x3a6b('0x3'))(_0x3a6b('0x4'));var config=require(_0x3a6b('0x5'));var jayson=require(_0x3a6b('0x6'));var client=jayson[_0x3a6b('0x7')][_0x3a6b('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x3bef23,_0x1cf7b7,_0x5082ca){return new BPromise(function(_0xa97ad5,_0x33fdff){return client[_0x3a6b('0x9')](_0x3bef23,_0x5082ca)[_0x3a6b('0xa')](function(_0x30d4f4){logger[_0x3a6b('0xb')]('VoiceAgentReport,\x20%s,\x20%s',_0x1cf7b7,_0x3a6b('0xc'));logger[_0x3a6b('0xd')](_0x3a6b('0xe'),_0x1cf7b7,_0x3a6b('0xc'),JSON['stringify'](_0x30d4f4));if(_0x30d4f4[_0x3a6b('0xf')]){if(_0x30d4f4[_0x3a6b('0xf')][_0x3a6b('0x10')]===0x1f4){logger[_0x3a6b('0xf')]('VoiceAgentReport,\x20%s,\x20%s',_0x1cf7b7,_0x30d4f4[_0x3a6b('0xf')][_0x3a6b('0x11')]);return _0x33fdff(_0x30d4f4[_0x3a6b('0xf')]['message']);}logger[_0x3a6b('0xf')]('VoiceAgentReport,\x20%s,\x20%s',_0x1cf7b7,_0x30d4f4[_0x3a6b('0xf')][_0x3a6b('0x11')]);return _0xa97ad5(_0x30d4f4['error'][_0x3a6b('0x11')]);}else{logger[_0x3a6b('0xb')](_0x3a6b('0x12'),_0x1cf7b7,_0x3a6b('0xc'));_0xa97ad5(_0x30d4f4['result'][_0x3a6b('0x11')]);}})[_0x3a6b('0x13')](function(_0x4d8756){logger['error'](_0x3a6b('0x12'),_0x1cf7b7,_0x4d8756);_0x33fdff(_0x4d8756);});});}exports[_0x3a6b('0x14')]=function(_0x4d0ae8){var _0x3120a6=this;return new Promise(function(_0x194117,_0x275efa){return db[_0x3a6b('0x15')][_0x3a6b('0x16')](_0x4d0ae8[_0x3a6b('0x17')],{'raw':_0x4d0ae8[_0x3a6b('0x18')]?_0x4d0ae8[_0x3a6b('0x18')]['raw']===undefined?!![]:![]:!![]})[_0x3a6b('0xa')](function(_0x550ee3){logger[_0x3a6b('0xb')](_0x3a6b('0x14'),_0x4d0ae8);logger[_0x3a6b('0xd')](_0x3a6b('0x14'),_0x4d0ae8,JSON[_0x3a6b('0x19')](_0x550ee3));_0x194117(_0x550ee3);})[_0x3a6b('0x13')](function(_0x580c01){logger[_0x3a6b('0xf')](_0x3a6b('0x14'),_0x580c01['message'],_0x4d0ae8);_0x275efa(_0x3120a6['error'](0x1f4,_0x580c01[_0x3a6b('0x11')]));});});};exports[_0x3a6b('0x1a')]=function(_0x35f726){var _0x37f52d=this;return new Promise(function(_0xa1de39,_0x1e25b3){return db['VoiceAgentReport']['update'](_0x35f726[_0x3a6b('0x17')],{'raw':_0x35f726['options']?_0x35f726[_0x3a6b('0x18')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x35f726[_0x3a6b('0x18')]?_0x35f726[_0x3a6b('0x18')]['where']||null:null,'attributes':_0x35f726['options']?_0x35f726[_0x3a6b('0x18')]['attributes']||null:null,'limit':_0x35f726[_0x3a6b('0x18')]?_0x35f726[_0x3a6b('0x18')][_0x3a6b('0x1b')]||null:null})['then'](function(_0x29485d){logger[_0x3a6b('0xb')]('UpdateVoiceAgentReport',_0x35f726);logger[_0x3a6b('0xd')](_0x3a6b('0x1a'),_0x35f726,JSON[_0x3a6b('0x19')](_0x29485d));_0xa1de39(_0x29485d);})[_0x3a6b('0x13')](function(_0x545ede){logger['error']('UpdateVoiceAgentReport',_0x545ede['message'],_0x35f726);_0x1e25b3(_0x37f52d[_0x3a6b('0xf')](0x1f4,_0x545ede[_0x3a6b('0x11')]));});});};
\ No newline at end of file
index 704f92c..996f284 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xadb8=['/describe','describe','post','/:id','update','delete','destroy','exports','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceCallReport.controller','isAuthenticated','index','get'];(function(_0x26d6d9,_0x431cb8){var _0x1b4875=function(_0x41111f){while(--_0x41111f){_0x26d6d9['push'](_0x26d6d9['shift']());}};_0x1b4875(++_0x431cb8);}(_0xadb8,0x1d0));var _0x8adb=function(_0x3e531a,_0x28a82a){_0x3e531a=_0x3e531a-0x0;var _0x3c2574=_0xadb8[_0x3e531a];return _0x3c2574;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x8adb('0x0'));var timeout=require('connect-timeout');var express=require(_0x8adb('0x1'));var router=express[_0x8adb('0x2')]();var fs_extra=require(_0x8adb('0x3'));var auth=require(_0x8adb('0x4'));var interaction=require(_0x8adb('0x5'));var config=require(_0x8adb('0x6'));var controller=require(_0x8adb('0x7'));router['get']('/',auth[_0x8adb('0x8')](),controller[_0x8adb('0x9')]);router[_0x8adb('0xa')](_0x8adb('0xb'),auth[_0x8adb('0x8')](),controller[_0x8adb('0xc')]);router[_0x8adb('0xa')]('/:id',auth['isAuthenticated'](),controller['show']);router[_0x8adb('0xd')]('/',auth['isAuthenticated'](),controller['create']);router['put'](_0x8adb('0xe'),auth[_0x8adb('0x8')](),controller[_0x8adb('0xf')]);router[_0x8adb('0x10')](_0x8adb('0xe'),auth[_0x8adb('0x8')](),controller[_0x8adb('0x11')]);module[_0x8adb('0x12')]=router;
\ No newline at end of file
+var _0xa630=['describe','/:id','show','post','create','put','update','delete','destroy','exports','multer','util','express','fs-extra','../../components/interaction/service','../../config/environment','./voiceCallReport.controller','get','isAuthenticated','/describe'];(function(_0x2fcc8a,_0x47c3af){var _0x515d53=function(_0x290368){while(--_0x290368){_0x2fcc8a['push'](_0x2fcc8a['shift']());}};_0x515d53(++_0x47c3af);}(_0xa630,0xbe));var _0x0a63=function(_0x52e1ac,_0x128df9){_0x52e1ac=_0x52e1ac-0x0;var _0x258f06=_0xa630[_0x52e1ac];return _0x258f06;};'use strict';var multer=require(_0x0a63('0x0'));var util=require(_0x0a63('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x0a63('0x2'));var router=express['Router']();var fs_extra=require(_0x0a63('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0x0a63('0x4'));var config=require(_0x0a63('0x5'));var controller=require(_0x0a63('0x6'));router[_0x0a63('0x7')]('/',auth[_0x0a63('0x8')](),controller['index']);router[_0x0a63('0x7')](_0x0a63('0x9'),auth[_0x0a63('0x8')](),controller[_0x0a63('0xa')]);router[_0x0a63('0x7')](_0x0a63('0xb'),auth['isAuthenticated'](),controller[_0x0a63('0xc')]);router[_0x0a63('0xd')]('/',auth[_0x0a63('0x8')](),controller[_0x0a63('0xe')]);router[_0x0a63('0xf')](_0x0a63('0xb'),auth[_0x0a63('0x8')](),controller[_0x0a63('0x10')]);router[_0x0a63('0x11')](_0x0a63('0xb'),auth['isAuthenticated'](),controller[_0x0a63('0x12')]);module[_0x0a63('0x13')]=router;
\ No newline at end of file
index f42f0fe..2aadbc8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa5c9=['exports','STRING','ENUM','outbound','inbound-fax','TEXT','DATE','INTEGER','sequelize'];(function(_0x28f0e2,_0x515a04){var _0x2d397a=function(_0x587bcb){while(--_0x587bcb){_0x28f0e2['push'](_0x28f0e2['shift']());}};_0x2d397a(++_0x515a04);}(_0xa5c9,0x143));var _0x9a5c=function(_0xd578cb,_0x2167a3){_0xd578cb=_0xd578cb-0x0;var _0x775533=_0xa5c9[_0xd578cb];return _0x775533;};'use strict';var Sequelize=require(_0x9a5c('0x0'));module[_0x9a5c('0x1')]={'uniqueid':{'type':Sequelize[_0x9a5c('0x2')]},'type':{'type':Sequelize[_0x9a5c('0x3')]('inbound','internal',_0x9a5c('0x4'),_0x9a5c('0x5'),'outbound-fax','dialer')},'tag':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize[_0x9a5c('0x2')]},'source':{'type':Sequelize[_0x9a5c('0x2')]},'destination':{'type':Sequelize[_0x9a5c('0x2')]},'destinationcontext':{'type':Sequelize[_0x9a5c('0x2')]},'callerid':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0x9a5c('0x2')]},'destinationchannel':{'type':Sequelize['STRING']},'lastapplication':{'type':Sequelize[_0x9a5c('0x2')]},'lastdata':{'type':Sequelize[_0x9a5c('0x6')]},'starttime':{'type':Sequelize['DATE']},'systemanswertime':{'type':Sequelize[_0x9a5c('0x7')]},'answertime':{'type':Sequelize[_0x9a5c('0x7')]},'endtime':{'type':Sequelize[_0x9a5c('0x7')]},'duration':{'type':Sequelize['INTEGER']},'billableseconds':{'type':Sequelize['INTEGER']},'mohtime':{'type':Sequelize[_0x9a5c('0x8')],'defaultValue':0x0},'disposition':{'type':Sequelize[_0x9a5c('0x2')]},'amaflags':{'type':Sequelize[_0x9a5c('0x2')]},'userfield':{'type':Sequelize[_0x9a5c('0x2')]},'userDisposition':{'type':Sequelize[_0x9a5c('0x2')]},'userSecondDisposition':{'type':Sequelize[_0x9a5c('0x2')]},'userThirdDisposition':{'type':Sequelize[_0x9a5c('0x2')]},'note':{'type':Sequelize[_0x9a5c('0x2')]},'prefix':{'type':Sequelize[_0x9a5c('0x2')]},'routeid':{'type':Sequelize[_0x9a5c('0x8')]},'sipcallid':{'type':Sequelize[_0x9a5c('0x2')]}};
\ No newline at end of file
+var _0xb6a1=['TEXT','DATE','INTEGER','sequelize','exports','STRING','ENUM','internal','outbound','inbound-fax','dialer'];(function(_0x546c6a,_0x20ece7){var _0x362547=function(_0x491e9c){while(--_0x491e9c){_0x546c6a['push'](_0x546c6a['shift']());}};_0x362547(++_0x20ece7);}(_0xb6a1,0x14d));var _0x1b6a=function(_0x13d07a,_0x41efc3){_0x13d07a=_0x13d07a-0x0;var _0x5ee0ee=_0xb6a1[_0x13d07a];return _0x5ee0ee;};'use strict';var Sequelize=require(_0x1b6a('0x0'));module[_0x1b6a('0x1')]={'uniqueid':{'type':Sequelize[_0x1b6a('0x2')]},'type':{'type':Sequelize[_0x1b6a('0x3')]('inbound',_0x1b6a('0x4'),_0x1b6a('0x5'),_0x1b6a('0x6'),'outbound-fax',_0x1b6a('0x7'))},'tag':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize[_0x1b6a('0x2')]},'source':{'type':Sequelize[_0x1b6a('0x2')]},'destination':{'type':Sequelize[_0x1b6a('0x2')]},'destinationcontext':{'type':Sequelize['STRING']},'callerid':{'type':Sequelize[_0x1b6a('0x2')]},'channel':{'type':Sequelize['STRING']},'destinationchannel':{'type':Sequelize[_0x1b6a('0x2')]},'lastapplication':{'type':Sequelize[_0x1b6a('0x2')]},'lastdata':{'type':Sequelize[_0x1b6a('0x8')]},'starttime':{'type':Sequelize['DATE']},'systemanswertime':{'type':Sequelize[_0x1b6a('0x9')]},'answertime':{'type':Sequelize[_0x1b6a('0x9')]},'endtime':{'type':Sequelize['DATE']},'duration':{'type':Sequelize['INTEGER']},'billableseconds':{'type':Sequelize[_0x1b6a('0xa')]},'mohtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'disposition':{'type':Sequelize[_0x1b6a('0x2')]},'amaflags':{'type':Sequelize[_0x1b6a('0x2')]},'userfield':{'type':Sequelize[_0x1b6a('0x2')]},'userDisposition':{'type':Sequelize['STRING']},'userSecondDisposition':{'type':Sequelize[_0x1b6a('0x2')]},'userThirdDisposition':{'type':Sequelize[_0x1b6a('0x2')]},'note':{'type':Sequelize[_0x1b6a('0x2')]},'prefix':{'type':Sequelize[_0x1b6a('0x2')]},'routeid':{'type':Sequelize[_0x1b6a('0xa')]},'sipcallid':{'type':Sequelize['STRING']}};
\ No newline at end of file
index 38ec536..e0f7115 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5f66=['../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/license/util','sendStatus','status','end','json','undefined','limit','count','offset','Content-Range','apply','reject','save','destroy','then','error','name','send','index','map','VoiceCallReport','rawAttributes','fieldName','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','filter','merge','type','VIRTUAL','includeAll','include','fullname','alias','User','rows','catch','show','params','find','create','body','describe','uniqueid','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','path','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x5f66,0x1a0));var _0x65f6=function(_0x297fd3,_0x115406){_0x297fd3=_0x297fd3-0x0;var _0x2af381=_0x5f66[_0x297fd3];return _0x2af381;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x65f6('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x65f6('0x1'));var rp=require(_0x65f6('0x2'));var moment=require(_0x65f6('0x3'));var BPromise=require(_0x65f6('0x4'));var Mustache=require(_0x65f6('0x5'));var util=require('util');var path=require(_0x65f6('0x6'));var sox=require('sox');var csv=require(_0x65f6('0x7'));var ejs=require(_0x65f6('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x65f6('0x9'));var crypto=require(_0x65f6('0xa'));var jsforce=require(_0x65f6('0xb'));var deskjs=require(_0x65f6('0xc'));var toCsv=require(_0x65f6('0x7'));var querystring=require(_0x65f6('0xd'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x65f6('0xe'));var qs=require(_0x65f6('0xf'));var as=require(_0x65f6('0x10'));var hardwareService=require(_0x65f6('0x11'));var logger=require('../../config/logger')(_0x65f6('0x12'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x65f6('0x13'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x419819,_0x4862a5){_0x4862a5=_0x4862a5||0xcc;return function(_0x2f964a){if(_0x2f964a){return _0x419819[_0x65f6('0x14')](_0x4862a5);}return _0x419819[_0x65f6('0x15')](_0x4862a5)[_0x65f6('0x16')]();};}function respondWithResult(_0x369f96,_0x1d29fd){_0x1d29fd=_0x1d29fd||0xc8;return function(_0x44144b){if(_0x44144b){return _0x369f96[_0x65f6('0x15')](_0x1d29fd)[_0x65f6('0x17')](_0x44144b);}};}function respondWithFilteredResult(_0x3440af,_0x59154e){return function(_0x19b9ff){if(_0x19b9ff){var _0x49a913=typeof _0x59154e['offset']===_0x65f6('0x18')&&typeof _0x59154e[_0x65f6('0x19')]===_0x65f6('0x18');var _0x1c955c=_0x19b9ff[_0x65f6('0x1a')];var _0x1f974c=_0x49a913?0x0:_0x59154e[_0x65f6('0x1b')];var _0x18380e=_0x49a913?_0x19b9ff['count']:_0x59154e['offset']+_0x59154e[_0x65f6('0x19')];var _0x5b4055;if(_0x18380e>=_0x1c955c){_0x18380e=_0x1c955c;_0x5b4055=0xc8;}else{_0x5b4055=0xce;}_0x3440af['status'](_0x5b4055);return _0x3440af['set'](_0x65f6('0x1c'),_0x1f974c+'-'+_0x18380e+'/'+_0x1c955c)[_0x65f6('0x17')](_0x19b9ff);}return null;};}function patchUpdates(_0x5114a4){return function(_0x39e19f){try{jsonpatch[_0x65f6('0x1d')](_0x39e19f,_0x5114a4,!![]);}catch(_0xbee6a4){return BPromise[_0x65f6('0x1e')](_0xbee6a4);}return _0x39e19f[_0x65f6('0x1f')]();};}function saveUpdates(_0xc139c2,_0x581374){return function(_0x197a49){if(_0x197a49){return _0x197a49['update'](_0xc139c2)['then'](function(_0x212247){return _0x212247;});}return null;};}function removeEntity(_0xd173f4,_0x524e42){return function(_0x1eeaaa){if(_0x1eeaaa){return _0x1eeaaa[_0x65f6('0x20')]()[_0x65f6('0x21')](function(){_0xd173f4[_0x65f6('0x15')](0xcc)['end']();});}};}function handleEntityNotFound(_0x9d7bb0,_0x59ea32){return function(_0x20a161){if(!_0x20a161){_0x9d7bb0['sendStatus'](0x194);}return _0x20a161;};}function handleError(_0x5cb131,_0x4fde2f){_0x4fde2f=_0x4fde2f||0x1f4;return function(_0x29abdb){logger[_0x65f6('0x22')](_0x29abdb['stack']);if(_0x29abdb[_0x65f6('0x23')]){delete _0x29abdb[_0x65f6('0x23')];}_0x5cb131['status'](_0x4fde2f)[_0x65f6('0x24')](_0x29abdb);};}exports[_0x65f6('0x25')]=function(_0x28d0df,_0x559330){var _0x4ac04b={},_0x488d36={},_0x266cfe={'count':0x0,'rows':[]};var _0x3c032f=_[_0x65f6('0x26')](db[_0x65f6('0x27')][_0x65f6('0x28')],function(_0x14a387){return{'name':_0x14a387[_0x65f6('0x29')],'type':_0x14a387['type']['key']};});_0x488d36[_0x65f6('0x2a')]=_[_0x65f6('0x26')](_0x3c032f,'name');_0x488d36['query']=_[_0x65f6('0x2b')](_0x28d0df[_0x65f6('0x2c')]);_0x488d36[_0x65f6('0x2d')]=_[_0x65f6('0x2e')](_0x488d36[_0x65f6('0x2a')],_0x488d36[_0x65f6('0x2c')]);_0x4ac04b['attributes']=_[_0x65f6('0x2e')](_0x488d36[_0x65f6('0x2a')],qs[_0x65f6('0x2f')](_0x28d0df['query'][_0x65f6('0x2f')]));_0x4ac04b[_0x65f6('0x30')]=_0x4ac04b[_0x65f6('0x30')][_0x65f6('0x31')]?_0x4ac04b[_0x65f6('0x30')]:_0x488d36[_0x65f6('0x2a')];if(!_0x28d0df['query'][_0x65f6('0x32')](_0x65f6('0x33'))){_0x4ac04b['limit']=qs[_0x65f6('0x19')](_0x28d0df['query'][_0x65f6('0x19')]);_0x4ac04b['offset']=qs[_0x65f6('0x1b')](_0x28d0df[_0x65f6('0x2c')]['offset']);}_0x4ac04b[_0x65f6('0x34')]=qs[_0x65f6('0x35')](_0x28d0df[_0x65f6('0x2c')]['sort']);_0x4ac04b['where']=qs[_0x65f6('0x2d')](_['pick'](_0x28d0df[_0x65f6('0x2c')],_0x488d36['filters']),_0x3c032f);if(_0x28d0df[_0x65f6('0x2c')][_0x65f6('0x36')]){_0x4ac04b['where']=_[_0x65f6('0x37')](_0x4ac04b['where'],{'$or':_['map'](_0x3c032f,function(_0x71b16b){if(_0x71b16b[_0x65f6('0x38')]!==_0x65f6('0x39')){var _0x313be5={};_0x313be5[_0x71b16b[_0x65f6('0x23')]]={'$like':'%'+_0x28d0df[_0x65f6('0x2c')][_0x65f6('0x36')]+'%'};return _0x313be5;}})});}_0x4ac04b=_[_0x65f6('0x37')]({},_0x4ac04b,_0x28d0df['options']);var _0x3aa254={'where':_0x4ac04b['where']};return db[_0x65f6('0x27')][_0x65f6('0x1a')](_0x3aa254)[_0x65f6('0x21')](function(_0x2ea7f7){_0x266cfe['count']=_0x2ea7f7;if(_0x28d0df[_0x65f6('0x2c')][_0x65f6('0x3a')]){_0x4ac04b[_0x65f6('0x3b')]=[{'attributes':['id',_0x65f6('0x23'),_0x65f6('0x3c'),_0x65f6('0x3d')],'model':db[_0x65f6('0x3e')],'as':_0x65f6('0x3e')}];}return db[_0x65f6('0x27')]['findAll'](_0x4ac04b);})[_0x65f6('0x21')](function(_0x400ed2){_0x266cfe[_0x65f6('0x3f')]=_0x400ed2;return _0x266cfe;})[_0x65f6('0x21')](respondWithFilteredResult(_0x559330,_0x4ac04b))[_0x65f6('0x40')](handleError(_0x559330,null));};exports[_0x65f6('0x41')]=function(_0xe0b72d,_0x2e91e8){var _0x461393={'raw':!![],'where':{'id':_0xe0b72d[_0x65f6('0x42')]['id']}},_0x2abbed={};_0x2abbed[_0x65f6('0x2a')]=_[_0x65f6('0x2b')](db[_0x65f6('0x27')][_0x65f6('0x28')]);_0x2abbed[_0x65f6('0x2c')]=_['keys'](_0xe0b72d[_0x65f6('0x2c')]);_0x2abbed[_0x65f6('0x2d')]=_[_0x65f6('0x2e')](_0x2abbed[_0x65f6('0x2a')],_0x2abbed['query']);_0x461393[_0x65f6('0x30')]=_[_0x65f6('0x2e')](_0x2abbed[_0x65f6('0x2a')],qs['fields'](_0xe0b72d[_0x65f6('0x2c')][_0x65f6('0x2f')]));_0x461393[_0x65f6('0x30')]=_0x461393[_0x65f6('0x30')]['length']?_0x461393[_0x65f6('0x30')]:_0x2abbed['model'];if(_0xe0b72d[_0x65f6('0x2c')][_0x65f6('0x3a')]){_0x461393['include']=[{'all':!![]}];}_0x461393=_[_0x65f6('0x37')]({},_0x461393,_0xe0b72d['options']);return db[_0x65f6('0x27')][_0x65f6('0x43')](_0x461393)[_0x65f6('0x21')](handleEntityNotFound(_0x2e91e8,null))[_0x65f6('0x21')](respondWithResult(_0x2e91e8,null))[_0x65f6('0x40')](handleError(_0x2e91e8,null));};exports[_0x65f6('0x44')]=function(_0x4d30c5,_0x51bf6c){return db[_0x65f6('0x27')][_0x65f6('0x44')](_0x4d30c5[_0x65f6('0x45')],{})[_0x65f6('0x21')](respondWithResult(_0x51bf6c,0xc9))[_0x65f6('0x40')](handleError(_0x51bf6c,null));};exports[_0x65f6('0x20')]=function(_0x149c28,_0x41690c){return db[_0x65f6('0x27')]['find']({'where':{'id':_0x149c28[_0x65f6('0x42')]['id']}})[_0x65f6('0x21')](handleEntityNotFound(_0x41690c,null))[_0x65f6('0x21')](removeEntity(_0x41690c,null))['catch'](handleError(_0x41690c,null));};exports[_0x65f6('0x46')]=function(_0x42d453,_0x49ba5a){return db[_0x65f6('0x27')][_0x65f6('0x46')]()['then'](respondWithResult(_0x49ba5a,null))[_0x65f6('0x40')](handleError(_0x49ba5a,null));};exports['update']=function(_0x247be3,_0x3b241f){if(_0x247be3[_0x65f6('0x45')]['uniqueid']){delete _0x247be3[_0x65f6('0x45')][_0x65f6('0x47')];}return db['VoiceCallReport'][_0x65f6('0x43')]({'where':{'uniqueid':_0x247be3[_0x65f6('0x42')]['id'],'UserId':{'$or':[null,_0x247be3['user']['id']]}}})[_0x65f6('0x21')](handleEntityNotFound(_0x3b241f,null))[_0x65f6('0x21')](saveUpdates(_0x247be3[_0x65f6('0x45')],null))[_0x65f6('0x21')](respondWithResult(_0x3b241f,null))[_0x65f6('0x40')](handleError(_0x3b241f,null));};
\ No newline at end of file
+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(_0x4c4b04,_0x3db067){var _0x267c5c=function(_0x232300){while(--_0x232300){_0x4c4b04['push'](_0x4c4b04['shift']());}};_0x267c5c(++_0x3db067);}(_0xb10b,0x12a));var _0xbb10=function(_0x519c88,_0xb84103){_0x519c88=_0x519c88-0x0;var _0x4668d7=_0xb10b[_0x519c88];return _0x4668d7;};'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
index 2b3ca7c..c1a65a6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9164=['uniqueid','lodash','../../config/logger','moment','path','../../config/environment','exports','define','VoiceCallReport','report_call'];(function(_0x1c2e3e,_0x16dc28){var _0x26adbd=function(_0x562282){while(--_0x562282){_0x1c2e3e['push'](_0x1c2e3e['shift']());}};_0x26adbd(++_0x16dc28);}(_0x9164,0x1cd));var _0x4916=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x9164[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x4916('0x0'));var util=require('util');var logger=require(_0x4916('0x1'))('api');var moment=require(_0x4916('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x4916('0x3'));var rimraf=require('rimraf');var config=require(_0x4916('0x4'));var attributes=require('./voiceCallReport.attributes');module[_0x4916('0x5')]=function(_0x426edc,_0x1ff768){return _0x426edc[_0x4916('0x6')](_0x4916('0x7'),attributes,{'tableName':_0x4916('0x8'),'paranoid':![],'indexes':[{'fields':[_0x4916('0x9')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x0d27=['../../config/logger','api','moment','bluebird','path','../../config/environment','exports','define','VoiceCallReport','uniqueid','lodash','util'];(function(_0x183ee6,_0xf68dac){var _0x28b3d5=function(_0x1cc5e5){while(--_0x1cc5e5){_0x183ee6['push'](_0x183ee6['shift']());}};_0x28b3d5(++_0xf68dac);}(_0x0d27,0x112));var _0x70d2=function(_0x450651,_0x38be69){_0x450651=_0x450651-0x0;var _0x3cff3e=_0x0d27[_0x450651];return _0x3cff3e;};'use strict';var _=require(_0x70d2('0x0'));var util=require(_0x70d2('0x1'));var logger=require(_0x70d2('0x2'))(_0x70d2('0x3'));var moment=require(_0x70d2('0x4'));var BPromise=require(_0x70d2('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x70d2('0x6'));var rimraf=require('rimraf');var config=require(_0x70d2('0x7'));var attributes=require('./voiceCallReport.attributes');module[_0x70d2('0x8')]=function(_0x25f5ac,_0x5808ed){return _0x25f5ac[_0x70d2('0x9')](_0x70d2('0xa'),attributes,{'tableName':'report_call','paranoid':![],'indexes':[{'fields':[_0x70d2('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
index a3270cf..e6fa987 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9da=['moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','then','info','request\x20sent','debug','stringify','error','VoiceCallReport,\x20%s,\x20%s','message','result','catch','GetVoiceCallReport','VoiceCallReport','findAll','options','raw','where','attributes','limit','include','map','model','CreateVoiceCallReport','update','body','UpdateVoiceCallReport','lodash','util'];(function(_0x36ff48,_0x3fc943){var _0x485d93=function(_0x5cb220){while(--_0x5cb220){_0x36ff48['push'](_0x36ff48['shift']());}};_0x485d93(++_0x3fc943);}(_0xa9da,0x1d2));var _0xaa9d=function(_0x3dc483,_0x56fbe4){_0x3dc483=_0x3dc483-0x0;var _0x3518fa=_0xa9da[_0x3dc483];return _0x3518fa;};'use strict';var _=require(_0xaa9d('0x0'));var util=require(_0xaa9d('0x1'));var moment=require(_0xaa9d('0x2'));var BPromise=require(_0xaa9d('0x3'));var rs=require(_0xaa9d('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xaa9d('0x5'));var logger=require(_0xaa9d('0x6'))(_0xaa9d('0x7'));var config=require('../../config/environment');var jayson=require(_0xaa9d('0x8'));var client=jayson[_0xaa9d('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5e399d,_0x22b6ff,_0x5b88b2){return new BPromise(function(_0x344e4b,_0xce0e7f){return client[_0xaa9d('0xa')](_0x5e399d,_0x5b88b2)[_0xaa9d('0xb')](function(_0x45b3ab){logger[_0xaa9d('0xc')]('VoiceCallReport,\x20%s,\x20%s',_0x22b6ff,_0xaa9d('0xd'));logger[_0xaa9d('0xe')]('VoiceCallReport,\x20%s,\x20%s,\x20%s',_0x22b6ff,_0xaa9d('0xd'),JSON[_0xaa9d('0xf')](_0x45b3ab));if(_0x45b3ab[_0xaa9d('0x10')]){if(_0x45b3ab[_0xaa9d('0x10')]['code']===0x1f4){logger[_0xaa9d('0x10')](_0xaa9d('0x11'),_0x22b6ff,_0x45b3ab[_0xaa9d('0x10')][_0xaa9d('0x12')]);return _0xce0e7f(_0x45b3ab[_0xaa9d('0x10')][_0xaa9d('0x12')]);}logger[_0xaa9d('0x10')](_0xaa9d('0x11'),_0x22b6ff,_0x45b3ab['error']['message']);return _0x344e4b(_0x45b3ab[_0xaa9d('0x10')][_0xaa9d('0x12')]);}else{logger[_0xaa9d('0xc')](_0xaa9d('0x11'),_0x22b6ff,_0xaa9d('0xd'));_0x344e4b(_0x45b3ab[_0xaa9d('0x13')][_0xaa9d('0x12')]);}})[_0xaa9d('0x14')](function(_0xd77db9){logger[_0xaa9d('0x10')](_0xaa9d('0x11'),_0x22b6ff,_0xd77db9);_0xce0e7f(_0xd77db9);});});}exports[_0xaa9d('0x15')]=function(_0x2eec2a){var _0x26b7ca=this;return new Promise(function(_0x1333a6,_0x33719a){return db[_0xaa9d('0x16')][_0xaa9d('0x17')]({'raw':_0x2eec2a[_0xaa9d('0x18')]?_0x2eec2a[_0xaa9d('0x18')][_0xaa9d('0x19')]===undefined?!![]:![]:!![],'where':_0x2eec2a[_0xaa9d('0x18')]?_0x2eec2a[_0xaa9d('0x18')][_0xaa9d('0x1a')]||null:null,'attributes':_0x2eec2a[_0xaa9d('0x18')]?_0x2eec2a['options'][_0xaa9d('0x1b')]||null:null,'limit':_0x2eec2a[_0xaa9d('0x18')]?_0x2eec2a['options'][_0xaa9d('0x1c')]||null:null,'include':_0x2eec2a['options']?_0x2eec2a[_0xaa9d('0x18')][_0xaa9d('0x1d')]?_[_0xaa9d('0x1e')](_0x2eec2a['options']['include'],function(_0x5c91f7){return{'model':db[_0x5c91f7['model']],'as':_0x5c91f7['as'],'attributes':_0x5c91f7[_0xaa9d('0x1b')],'include':_0x5c91f7[_0xaa9d('0x1d')]?_[_0xaa9d('0x1e')](_0x5c91f7[_0xaa9d('0x1d')],function(_0x1d44e6){return{'model':db[_0x1d44e6[_0xaa9d('0x1f')]],'as':_0x1d44e6['as'],'attributes':_0x1d44e6[_0xaa9d('0x1b')],'include':_0x1d44e6[_0xaa9d('0x1d')]?_['map'](_0x1d44e6[_0xaa9d('0x1d')],function(_0x2fd504){return{'model':db[_0x2fd504[_0xaa9d('0x1f')]],'as':_0x2fd504['as'],'attributes':_0x2fd504[_0xaa9d('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xaa9d('0xb')](function(_0x31aae8){logger['info'](_0xaa9d('0x15'),_0x2eec2a);logger[_0xaa9d('0xe')]('GetVoiceCallReport',_0x2eec2a,JSON[_0xaa9d('0xf')](_0x31aae8));_0x1333a6(_0x31aae8);})[_0xaa9d('0x14')](function(_0x48a1d8){logger[_0xaa9d('0x10')](_0xaa9d('0x15'),_0x48a1d8[_0xaa9d('0x12')],_0x2eec2a);_0x33719a(_0x26b7ca[_0xaa9d('0x10')](0x1f4,_0x48a1d8[_0xaa9d('0x12')]));});});};exports['CreateVoiceCallReport']=function(_0x322ab3){var _0x890cc4=this;return new Promise(function(_0x358e64,_0x10934a){return db['VoiceCallReport']['create'](_0x322ab3['body'],{'raw':_0x322ab3[_0xaa9d('0x18')]?_0x322ab3[_0xaa9d('0x18')][_0xaa9d('0x19')]===undefined?!![]:![]:!![]})[_0xaa9d('0xb')](function(_0x5c7454){logger[_0xaa9d('0xc')](_0xaa9d('0x20'),_0x322ab3);logger[_0xaa9d('0xe')](_0xaa9d('0x20'),_0x322ab3,JSON['stringify'](_0x5c7454));_0x358e64(_0x5c7454);})[_0xaa9d('0x14')](function(_0x3c0dab){logger[_0xaa9d('0x10')](_0xaa9d('0x20'),_0x3c0dab[_0xaa9d('0x12')],_0x322ab3);_0x10934a(_0x890cc4[_0xaa9d('0x10')](0x1f4,_0x3c0dab['message']));});});};exports['UpdateVoiceCallReport']=function(_0x1de811){var _0x2cdfab=this;return new Promise(function(_0x1d17e2,_0x124456){return db[_0xaa9d('0x16')][_0xaa9d('0x21')](_0x1de811[_0xaa9d('0x22')],{'raw':_0x1de811['options']?_0x1de811['options'][_0xaa9d('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1de811[_0xaa9d('0x18')]?_0x1de811[_0xaa9d('0x18')][_0xaa9d('0x1a')]||null:null,'attributes':_0x1de811['options']?_0x1de811[_0xaa9d('0x18')][_0xaa9d('0x1b')]||null:null,'limit':_0x1de811[_0xaa9d('0x18')]?_0x1de811[_0xaa9d('0x18')][_0xaa9d('0x1c')]||null:null})[_0xaa9d('0xb')](function(_0x1f2eb1){logger[_0xaa9d('0xc')]('UpdateVoiceCallReport',_0x1de811);logger['debug']('UpdateVoiceCallReport',_0x1de811,JSON[_0xaa9d('0xf')](_0x1f2eb1));_0x1d17e2(_0x1f2eb1);})[_0xaa9d('0x14')](function(_0x1eaacb){logger[_0xaa9d('0x10')](_0xaa9d('0x23'),_0x1eaacb[_0xaa9d('0x12')],_0x1de811);_0x124456(_0x2cdfab[_0xaa9d('0x10')](0x1f4,_0x1eaacb['message']));});});};
\ No newline at end of file
+var _0x847b=['findAll','options','raw','where','attributes','limit','map','include','model','GetVoiceCallReport','create','CreateVoiceCallReport','UpdateVoiceCallReport','update','lodash','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','VoiceCallReport,\x20%s,\x20%s','request\x20sent','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','VoiceCallReport'];(function(_0x26b729,_0x5a770c){var _0x5e5ea5=function(_0x4ef74e){while(--_0x4ef74e){_0x26b729['push'](_0x26b729['shift']());}};_0x5e5ea5(++_0x5a770c);}(_0x847b,0xf2));var _0xb847=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0x847b[_0x397e5f];return _0x5302b8;};'use strict';var _=require(_0xb847('0x0'));var util=require('util');var moment=require(_0xb847('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xb847('0x2'));var db=require(_0xb847('0x3'))['db'];var utils=require(_0xb847('0x4'));var logger=require(_0xb847('0x5'))(_0xb847('0x6'));var config=require(_0xb847('0x7'));var jayson=require(_0xb847('0x8'));var client=jayson[_0xb847('0x9')][_0xb847('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x498e33,_0x1225ee,_0x1da7c8){return new BPromise(function(_0x46274d,_0x233ef1){return client[_0xb847('0xb')](_0x498e33,_0x1da7c8)[_0xb847('0xc')](function(_0x4ab21d){logger[_0xb847('0xd')](_0xb847('0xe'),_0x1225ee,_0xb847('0xf'));logger[_0xb847('0x10')](_0xb847('0x11'),_0x1225ee,_0xb847('0xf'),JSON[_0xb847('0x12')](_0x4ab21d));if(_0x4ab21d['error']){if(_0x4ab21d['error']['code']===0x1f4){logger[_0xb847('0x13')]('VoiceCallReport,\x20%s,\x20%s',_0x1225ee,_0x4ab21d[_0xb847('0x13')][_0xb847('0x14')]);return _0x233ef1(_0x4ab21d[_0xb847('0x13')][_0xb847('0x14')]);}logger[_0xb847('0x13')](_0xb847('0xe'),_0x1225ee,_0x4ab21d['error'][_0xb847('0x14')]);return _0x46274d(_0x4ab21d[_0xb847('0x13')][_0xb847('0x14')]);}else{logger['info'](_0xb847('0xe'),_0x1225ee,_0xb847('0xf'));_0x46274d(_0x4ab21d[_0xb847('0x15')]['message']);}})[_0xb847('0x16')](function(_0x25b8b5){logger['error'](_0xb847('0xe'),_0x1225ee,_0x25b8b5);_0x233ef1(_0x25b8b5);});});}exports['GetVoiceCallReport']=function(_0x2bdd18){var _0x11d00d=this;return new Promise(function(_0x292f00,_0xe31ce7){return db[_0xb847('0x17')][_0xb847('0x18')]({'raw':_0x2bdd18[_0xb847('0x19')]?_0x2bdd18['options'][_0xb847('0x1a')]===undefined?!![]:![]:!![],'where':_0x2bdd18[_0xb847('0x19')]?_0x2bdd18['options'][_0xb847('0x1b')]||null:null,'attributes':_0x2bdd18[_0xb847('0x19')]?_0x2bdd18['options'][_0xb847('0x1c')]||null:null,'limit':_0x2bdd18['options']?_0x2bdd18[_0xb847('0x19')][_0xb847('0x1d')]||null:null,'include':_0x2bdd18[_0xb847('0x19')]?_0x2bdd18[_0xb847('0x19')]['include']?_[_0xb847('0x1e')](_0x2bdd18[_0xb847('0x19')][_0xb847('0x1f')],function(_0x4a078f){return{'model':db[_0x4a078f['model']],'as':_0x4a078f['as'],'attributes':_0x4a078f[_0xb847('0x1c')],'include':_0x4a078f[_0xb847('0x1f')]?_[_0xb847('0x1e')](_0x4a078f[_0xb847('0x1f')],function(_0xe21669){return{'model':db[_0xe21669['model']],'as':_0xe21669['as'],'attributes':_0xe21669['attributes'],'include':_0xe21669['include']?_[_0xb847('0x1e')](_0xe21669['include'],function(_0x5e0cf1){return{'model':db[_0x5e0cf1[_0xb847('0x20')]],'as':_0x5e0cf1['as'],'attributes':_0x5e0cf1[_0xb847('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x20b63b){logger['info']('GetVoiceCallReport',_0x2bdd18);logger['debug']('GetVoiceCallReport',_0x2bdd18,JSON[_0xb847('0x12')](_0x20b63b));_0x292f00(_0x20b63b);})[_0xb847('0x16')](function(_0x3dac15){logger[_0xb847('0x13')](_0xb847('0x21'),_0x3dac15['message'],_0x2bdd18);_0xe31ce7(_0x11d00d[_0xb847('0x13')](0x1f4,_0x3dac15['message']));});});};exports['CreateVoiceCallReport']=function(_0x4601bc){var _0x1bf669=this;return new Promise(function(_0x4d4e0d,_0x3aa941){return db['VoiceCallReport'][_0xb847('0x22')](_0x4601bc['body'],{'raw':_0x4601bc['options']?_0x4601bc[_0xb847('0x19')][_0xb847('0x1a')]===undefined?!![]:![]:!![]})[_0xb847('0xc')](function(_0x58f9ab){logger[_0xb847('0xd')](_0xb847('0x23'),_0x4601bc);logger[_0xb847('0x10')](_0xb847('0x23'),_0x4601bc,JSON[_0xb847('0x12')](_0x58f9ab));_0x4d4e0d(_0x58f9ab);})[_0xb847('0x16')](function(_0x4f4ef2){logger[_0xb847('0x13')](_0xb847('0x23'),_0x4f4ef2['message'],_0x4601bc);_0x3aa941(_0x1bf669[_0xb847('0x13')](0x1f4,_0x4f4ef2[_0xb847('0x14')]));});});};exports[_0xb847('0x24')]=function(_0x49b8f2){var _0x16aace=this;return new Promise(function(_0x1c8123,_0x7e66f3){return db[_0xb847('0x17')][_0xb847('0x25')](_0x49b8f2['body'],{'raw':_0x49b8f2['options']?_0x49b8f2[_0xb847('0x19')][_0xb847('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x49b8f2[_0xb847('0x19')]?_0x49b8f2['options']['where']||null:null,'attributes':_0x49b8f2[_0xb847('0x19')]?_0x49b8f2[_0xb847('0x19')][_0xb847('0x1c')]||null:null,'limit':_0x49b8f2['options']?_0x49b8f2[_0xb847('0x19')][_0xb847('0x1d')]||null:null})[_0xb847('0xc')](function(_0x3c3c40){logger[_0xb847('0xd')]('UpdateVoiceCallReport',_0x49b8f2);logger[_0xb847('0x10')](_0xb847('0x24'),_0x49b8f2,JSON[_0xb847('0x12')](_0x3c3c40));_0x1c8123(_0x3c3c40);})[_0xb847('0x16')](function(_0x2543b1){logger[_0xb847('0x13')](_0xb847('0x24'),_0x2543b1[_0xb847('0x14')],_0x49b8f2);_0x7e66f3(_0x16aace['error'](0x1f4,_0x2543b1[_0xb847('0x14')]));});});};
\ No newline at end of file
index 9dd0b8c..7444100 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x76fa=['../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceChanSpy.controller','get','index','/:id','isAuthenticated','show','post','create','put','update','delete','destroy','exports','multer','connect-timeout','express','Router','fs-extra'];(function(_0x51ab83,_0x2721b9){var _0x14b6de=function(_0x243483){while(--_0x243483){_0x51ab83['push'](_0x51ab83['shift']());}};_0x14b6de(++_0x2721b9);}(_0x76fa,0x175));var _0xa76f=function(_0x50bc77,_0x4a4f2a){_0x50bc77=_0x50bc77-0x0;var _0x177b82=_0x76fa[_0x50bc77];return _0x177b82;};'use strict';var multer=require(_0xa76f('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xa76f('0x1'));var express=require(_0xa76f('0x2'));var router=express[_0xa76f('0x3')]();var fs_extra=require(_0xa76f('0x4'));var auth=require(_0xa76f('0x5'));var interaction=require(_0xa76f('0x6'));var config=require(_0xa76f('0x7'));var controller=require(_0xa76f('0x8'));router[_0xa76f('0x9')]('/',auth['isAuthenticated'](),controller[_0xa76f('0xa')]);router['get'](_0xa76f('0xb'),auth[_0xa76f('0xc')](),controller[_0xa76f('0xd')]);router[_0xa76f('0xe')]('/',auth[_0xa76f('0xc')](),controller[_0xa76f('0xf')]);router[_0xa76f('0x10')](_0xa76f('0xb'),auth[_0xa76f('0xc')](),controller[_0xa76f('0x11')]);router[_0xa76f('0x12')](_0xa76f('0xb'),auth[_0xa76f('0xc')](),controller[_0xa76f('0x13')]);module[_0xa76f('0x14')]=router;
\ No newline at end of file
+var _0xfee6=['get','isAuthenticated','/:id','post','put','update','delete','destroy','exports','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceChanSpy.controller'];(function(_0x3c4737,_0x2329ec){var _0x2bb926=function(_0x3b9605){while(--_0x3b9605){_0x3c4737['push'](_0x3c4737['shift']());}};_0x2bb926(++_0x2329ec);}(_0xfee6,0x1b2));var _0x6fee=function(_0x5aed76,_0x22c450){_0x5aed76=_0x5aed76-0x0;var _0x26b84c=_0xfee6[_0x5aed76];return _0x26b84c;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x6fee('0x0'));var timeout=require('connect-timeout');var express=require(_0x6fee('0x1'));var router=express[_0x6fee('0x2')]();var fs_extra=require(_0x6fee('0x3'));var auth=require(_0x6fee('0x4'));var interaction=require(_0x6fee('0x5'));var config=require(_0x6fee('0x6'));var controller=require(_0x6fee('0x7'));router[_0x6fee('0x8')]('/',auth[_0x6fee('0x9')](),controller['index']);router[_0x6fee('0x8')](_0x6fee('0xa'),auth[_0x6fee('0x9')](),controller['show']);router[_0x6fee('0xb')]('/',auth[_0x6fee('0x9')](),controller['create']);router[_0x6fee('0xc')]('/:id',auth[_0x6fee('0x9')](),controller[_0x6fee('0xd')]);router[_0x6fee('0xe')](_0x6fee('0xa'),auth[_0x6fee('0x9')](),controller[_0x6fee('0xf')]);module[_0x6fee('0x10')]=router;
\ No newline at end of file
index b8dd014..2167a05 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfd24=['options','split','BOOLEAN','sequelize','exports','STRING','name','join','getDataValue'];(function(_0x5a4526,_0x521684){var _0x4d5f94=function(_0x240bd6){while(--_0x240bd6){_0x5a4526['push'](_0x5a4526['shift']());}};_0x4d5f94(++_0x521684);}(_0xfd24,0x16b));var _0x4fd2=function(_0x172747,_0x1732bd){_0x172747=_0x172747-0x0;var _0x509692=_0xfd24[_0x172747];return _0x509692;};'use strict';var Sequelize=require(_0x4fd2('0x0'));module[_0x4fd2('0x1')]={'name':{'type':Sequelize[_0x4fd2('0x2')]},'prefix':{'type':Sequelize[_0x4fd2('0x2')],'unique':_0x4fd2('0x3'),'allowNull':![]},'options':{'type':Sequelize[_0x4fd2('0x2')],'set':function(_0x494357){this['setDataValue']('options',_0x494357?_0x494357[_0x4fd2('0x4')](''):[]);},'get':function(){return this[_0x4fd2('0x5')](_0x4fd2('0x6'))?this['getDataValue']('options')[_0x4fd2('0x7')](''):[];}},'auth':{'type':Sequelize[_0x4fd2('0x8')],'defaultValue':![]},'password':{'type':Sequelize[_0x4fd2('0x2')]},'record':{'type':Sequelize[_0x4fd2('0x8')],'defaultValue':![]},'recordingFormat':{'type':Sequelize[_0x4fd2('0x2')]},'description':{'type':Sequelize[_0x4fd2('0x2')]}};
\ No newline at end of file
+var _0xde32=['BOOLEAN','STRING','name','setDataValue','join','options','getDataValue','split'];(function(_0xc3a71f,_0x54fe71){var _0x46a474=function(_0x47e601){while(--_0x47e601){_0xc3a71f['push'](_0xc3a71f['shift']());}};_0x46a474(++_0x54fe71);}(_0xde32,0x119));var _0x2de3=function(_0x442f8a,_0x12ef37){_0x442f8a=_0x442f8a-0x0;var _0x44731f=_0xde32[_0x442f8a];return _0x44731f;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x2de3('0x0')]},'prefix':{'type':Sequelize[_0x2de3('0x0')],'unique':_0x2de3('0x1'),'allowNull':![]},'options':{'type':Sequelize[_0x2de3('0x0')],'set':function(_0x603b90){this[_0x2de3('0x2')]('options',_0x603b90?_0x603b90[_0x2de3('0x3')](''):[]);},'get':function(){return this['getDataValue'](_0x2de3('0x4'))?this[_0x2de3('0x5')](_0x2de3('0x4'))[_0x2de3('0x6')](''):[];}},'auth':{'type':Sequelize[_0x2de3('0x7')],'defaultValue':![]},'password':{'type':Sequelize[_0x2de3('0x0')]},'record':{'type':Sequelize[_0x2de3('0x7')],'defaultValue':![]},'recordingFormat':{'type':Sequelize[_0x2de3('0x0')]},'description':{'type':Sequelize[_0x2de3('0x0')]}};
\ No newline at end of file
index 7ac7bcb..4a6f8f6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6f7a=['order','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','keys','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','update','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','desk.js','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','undefined','limit','offset','count','set','Content-Range','apply','ChanSpies','destroy','then','sendStatus','error','stack','name','send','index','VoiceChanSpy','rawAttributes','type','key','model','map','query','intersection','attributes','fields','length','hasOwnProperty'];(function(_0x53c43a,_0x293e7c){var _0xb00b70=function(_0x2fd3f6){while(--_0x2fd3f6){_0x53c43a['push'](_0x53c43a['shift']());}};_0xb00b70(++_0x293e7c);}(_0x6f7a,0x1ae));var _0xa6f7=function(_0x382b44,_0x271b34){_0x382b44=_0x382b44-0x0;var _0x3ebae6=_0x6f7a[_0x382b44];return _0x3ebae6;};'use strict';var emlformat=require(_0xa6f7('0x0'));var rimraf=require(_0xa6f7('0x1'));var zipdir=require(_0xa6f7('0x2'));var jsonpatch=require(_0xa6f7('0x3'));var rp=require('request-promise');var moment=require(_0xa6f7('0x4'));var BPromise=require(_0xa6f7('0x5'));var Mustache=require(_0xa6f7('0x6'));var util=require(_0xa6f7('0x7'));var path=require(_0xa6f7('0x8'));var sox=require(_0xa6f7('0x9'));var csv=require(_0xa6f7('0xa'));var ejs=require(_0xa6f7('0xb'));var fs=require('fs');var fs_extra=require(_0xa6f7('0xc'));var _=require(_0xa6f7('0xd'));var squel=require(_0xa6f7('0xe'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xa6f7('0xf'));var toCsv=require(_0xa6f7('0xa'));var querystring=require(_0xa6f7('0x10'));var Papa=require(_0xa6f7('0x11'));var Redis=require(_0xa6f7('0x12'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xa6f7('0x13'));var hardwareService=require(_0xa6f7('0x14'));var logger=require('../../config/logger')(_0xa6f7('0x15'));var utils=require('../../config/utils');var config=require(_0xa6f7('0x16'));var licenseUtil=require(_0xa6f7('0x17'));var db=require(_0xa6f7('0x18'))['db'];function respondWithStatusCode(_0xd5558b,_0x5a3035){_0x5a3035=_0x5a3035||0xcc;return function(_0x3fc7f1){if(_0x3fc7f1){return _0xd5558b['sendStatus'](_0x5a3035);}return _0xd5558b[_0xa6f7('0x19')](_0x5a3035)[_0xa6f7('0x1a')]();};}function respondWithResult(_0x25c123,_0x4d3d59){_0x4d3d59=_0x4d3d59||0xc8;return function(_0x34c02d){if(_0x34c02d){return _0x25c123['status'](_0x4d3d59)[_0xa6f7('0x1b')](_0x34c02d);}};}function respondWithFilteredResult(_0x57308a,_0x17b814){return function(_0x17f9c5){if(_0x17f9c5){var _0x6efd38=typeof _0x17b814['offset']===_0xa6f7('0x1c')&&typeof _0x17b814[_0xa6f7('0x1d')]===_0xa6f7('0x1c');var _0x2401b9=_0x17f9c5['count'];var _0x4a8827=_0x6efd38?0x0:_0x17b814[_0xa6f7('0x1e')];var _0x5298ba=_0x6efd38?_0x17f9c5[_0xa6f7('0x1f')]:_0x17b814[_0xa6f7('0x1e')]+_0x17b814['limit'];var _0x18fc4a;if(_0x5298ba>=_0x2401b9){_0x5298ba=_0x2401b9;_0x18fc4a=0xc8;}else{_0x18fc4a=0xce;}_0x57308a[_0xa6f7('0x19')](_0x18fc4a);return _0x57308a[_0xa6f7('0x20')](_0xa6f7('0x21'),_0x4a8827+'-'+_0x5298ba+'/'+_0x2401b9)[_0xa6f7('0x1b')](_0x17f9c5);}return null;};}function patchUpdates(_0x1aa8dc){return function(_0x4887ad){try{jsonpatch[_0xa6f7('0x22')](_0x4887ad,_0x1aa8dc,!![]);}catch(_0x45d79e){return BPromise['reject'](_0x45d79e);}return _0x4887ad['save']();};}function saveUpdates(_0x5ddc8d,_0x1de6c9){return function(_0x119950){if(_0x119950){return _0x119950['update'](_0x5ddc8d)['then'](function(_0x50e2be){return _0x50e2be;});}return null;};}function removeEntity(_0x2b6a84,_0xc77e8e){return function(_0x28263e){if(_0x28263e){return _0x28263e['destroy']()['then'](function(){var _0x2f4907=_0x28263e['get']({'plain':!![]});var _0x47ef97=_0xa6f7('0x23');return db['UserProfileResource'][_0xa6f7('0x24')]({'where':{'type':_0x47ef97,'resourceId':_0x2f4907['id']}})[_0xa6f7('0x25')](function(){return _0x28263e;});})[_0xa6f7('0x25')](function(){_0x2b6a84[_0xa6f7('0x19')](0xcc)[_0xa6f7('0x1a')]();});}};}function handleEntityNotFound(_0x4b8d2b,_0x51db47){return function(_0x1c419b){if(!_0x1c419b){_0x4b8d2b[_0xa6f7('0x26')](0x194);}return _0x1c419b;};}function handleError(_0x55d45a,_0x267917){_0x267917=_0x267917||0x1f4;return function(_0x27babb){logger[_0xa6f7('0x27')](_0x27babb[_0xa6f7('0x28')]);if(_0x27babb[_0xa6f7('0x29')]){delete _0x27babb[_0xa6f7('0x29')];}_0x55d45a[_0xa6f7('0x19')](_0x267917)[_0xa6f7('0x2a')](_0x27babb);};}exports[_0xa6f7('0x2b')]=function(_0x3dee2e,_0x40b0f8){var _0x278bad={},_0x52f9c1={},_0x442ccf={'count':0x0,'rows':[]};var _0x42dc49=_['map'](db[_0xa6f7('0x2c')][_0xa6f7('0x2d')],function(_0x4d79d8){return{'name':_0x4d79d8['fieldName'],'type':_0x4d79d8[_0xa6f7('0x2e')][_0xa6f7('0x2f')]};});_0x52f9c1[_0xa6f7('0x30')]=_[_0xa6f7('0x31')](_0x42dc49,_0xa6f7('0x29'));_0x52f9c1['query']=_['keys'](_0x3dee2e[_0xa6f7('0x32')]);_0x52f9c1['filters']=_[_0xa6f7('0x33')](_0x52f9c1[_0xa6f7('0x30')],_0x52f9c1[_0xa6f7('0x32')]);_0x278bad[_0xa6f7('0x34')]=_[_0xa6f7('0x33')](_0x52f9c1[_0xa6f7('0x30')],qs['fields'](_0x3dee2e[_0xa6f7('0x32')][_0xa6f7('0x35')]));_0x278bad[_0xa6f7('0x34')]=_0x278bad['attributes'][_0xa6f7('0x36')]?_0x278bad['attributes']:_0x52f9c1[_0xa6f7('0x30')];if(!_0x3dee2e[_0xa6f7('0x32')][_0xa6f7('0x37')]('nolimit')){_0x278bad[_0xa6f7('0x1d')]=qs[_0xa6f7('0x1d')](_0x3dee2e[_0xa6f7('0x32')][_0xa6f7('0x1d')]);_0x278bad[_0xa6f7('0x1e')]=qs[_0xa6f7('0x1e')](_0x3dee2e['query'][_0xa6f7('0x1e')]);}_0x278bad[_0xa6f7('0x38')]=qs[_0xa6f7('0x39')](_0x3dee2e[_0xa6f7('0x32')][_0xa6f7('0x39')]);_0x278bad[_0xa6f7('0x3a')]=qs[_0xa6f7('0x3b')](_[_0xa6f7('0x3c')](_0x3dee2e['query'],_0x52f9c1[_0xa6f7('0x3b')]),_0x42dc49);if(_0x3dee2e[_0xa6f7('0x32')][_0xa6f7('0x3d')]){_0x278bad['where']=_[_0xa6f7('0x3e')](_0x278bad[_0xa6f7('0x3a')],{'$or':_['map'](_0x42dc49,function(_0x39349a){if(_0x39349a[_0xa6f7('0x2e')]!==_0xa6f7('0x3f')){var _0x14d532={};_0x14d532[_0x39349a[_0xa6f7('0x29')]]={'$like':'%'+_0x3dee2e['query'][_0xa6f7('0x3d')]+'%'};return _0x14d532;}})});}_0x278bad=_[_0xa6f7('0x3e')]({},_0x278bad,_0x3dee2e[_0xa6f7('0x40')]);var _0x1b8bf3={'where':_0x278bad[_0xa6f7('0x3a')]};return db[_0xa6f7('0x2c')][_0xa6f7('0x1f')](_0x1b8bf3)[_0xa6f7('0x25')](function(_0x5646b9){_0x442ccf['count']=_0x5646b9;if(_0x3dee2e[_0xa6f7('0x32')][_0xa6f7('0x41')]){_0x278bad[_0xa6f7('0x42')]=[{'all':!![]}];}return db[_0xa6f7('0x2c')][_0xa6f7('0x43')](_0x278bad);})[_0xa6f7('0x25')](function(_0x21fdd7){_0x442ccf[_0xa6f7('0x44')]=_0x21fdd7;return _0x442ccf;})[_0xa6f7('0x25')](respondWithFilteredResult(_0x40b0f8,_0x278bad))[_0xa6f7('0x45')](handleError(_0x40b0f8,null));};exports['show']=function(_0x41917c,_0x30be3b){var _0x4d5846={'raw':![],'where':{'id':_0x41917c[_0xa6f7('0x46')]['id']}},_0x22d500={};_0x22d500[_0xa6f7('0x30')]=_[_0xa6f7('0x47')](db['VoiceChanSpy'][_0xa6f7('0x2d')]);_0x22d500['query']=_['keys'](_0x41917c[_0xa6f7('0x32')]);_0x22d500[_0xa6f7('0x3b')]=_[_0xa6f7('0x33')](_0x22d500[_0xa6f7('0x30')],_0x22d500[_0xa6f7('0x32')]);_0x4d5846[_0xa6f7('0x34')]=_[_0xa6f7('0x33')](_0x22d500['model'],qs[_0xa6f7('0x35')](_0x41917c[_0xa6f7('0x32')]['fields']));_0x4d5846[_0xa6f7('0x34')]=_0x4d5846[_0xa6f7('0x34')][_0xa6f7('0x36')]?_0x4d5846['attributes']:_0x22d500[_0xa6f7('0x30')];if(_0x41917c['query'][_0xa6f7('0x41')]){_0x4d5846[_0xa6f7('0x42')]=[{'all':!![]}];}_0x4d5846=_[_0xa6f7('0x3e')]({},_0x4d5846,_0x41917c['options']);return db['VoiceChanSpy'][_0xa6f7('0x48')](_0x4d5846)['then'](handleEntityNotFound(_0x30be3b,null))[_0xa6f7('0x25')](respondWithResult(_0x30be3b,null))['catch'](handleError(_0x30be3b,null));};exports['create']=function(_0x1e7089,_0x2e3a04){return db[_0xa6f7('0x2c')][_0xa6f7('0x49')](_0x1e7089[_0xa6f7('0x4a')],{})[_0xa6f7('0x25')](function(_0x5d9b6f){var _0x4032fc=_0x1e7089[_0xa6f7('0x4b')]['get']({'plain':!![]});if(!_0x4032fc)throw new Error(_0xa6f7('0x4c'));if(_0x4032fc['role']===_0xa6f7('0x4b')){var _0x59091a=_0x5d9b6f['get']({'plain':!![]});var _0x60eacc=_0xa6f7('0x23');return db[_0xa6f7('0x4d')][_0xa6f7('0x48')]({'where':{'name':_0x60eacc,'userProfileId':_0x4032fc[_0xa6f7('0x4e')]},'raw':!![]})['then'](function(_0x340d3f){if(_0x340d3f&&_0x340d3f[_0xa6f7('0x4f')]===0x0){return db['UserProfileResource'][_0xa6f7('0x49')]({'name':_0x59091a['name'],'resourceId':_0x59091a['id'],'type':_0x340d3f[_0xa6f7('0x29')],'sectionId':_0x340d3f['id']},{})[_0xa6f7('0x25')](function(){return _0x5d9b6f;});}else{return _0x5d9b6f;}})[_0xa6f7('0x45')](function(_0x55369a){logger[_0xa6f7('0x27')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x55369a);throw _0x55369a;});}return _0x5d9b6f;})[_0xa6f7('0x25')](respondWithResult(_0x2e3a04,0xc9))[_0xa6f7('0x45')](handleError(_0x2e3a04,null));};exports[_0xa6f7('0x50')]=function(_0x1dcb45,_0xa6bff9){if(_0x1dcb45['body']['id']){delete _0x1dcb45['body']['id'];}return db[_0xa6f7('0x2c')][_0xa6f7('0x48')]({'where':{'id':_0x1dcb45[_0xa6f7('0x46')]['id']}})[_0xa6f7('0x25')](handleEntityNotFound(_0xa6bff9,null))['then'](saveUpdates(_0x1dcb45[_0xa6f7('0x4a')],null))[_0xa6f7('0x25')](respondWithResult(_0xa6bff9,null))[_0xa6f7('0x45')](handleError(_0xa6bff9,null));};exports[_0xa6f7('0x24')]=function(_0x1b33a5,_0x39538e){return db['VoiceChanSpy'][_0xa6f7('0x48')]({'where':{'id':_0x1b33a5[_0xa6f7('0x46')]['id']}})[_0xa6f7('0x25')](handleEntityNotFound(_0x39538e,null))['then'](removeEntity(_0x39538e,null))[_0xa6f7('0x45')](handleError(_0x39538e,null));};
\ No newline at end of file
+var _0xd624=['../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','count','limit','set','Content-Range','reject','save','update','destroy','then','get','ChanSpies','UserProfileResource','end','error','stack','name','map','VoiceChanSpy','rawAttributes','type','key','model','filters','intersection','fields','query','attributes','length','order','sort','where','merge','filter','options','includeAll','include','rows','show','params','keys','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','find','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','fast-json-patch','mustache','util','path','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api'];(function(_0x43026b,_0x928d8c){var _0x4a96cd=function(_0x362cbd){while(--_0x362cbd){_0x43026b['push'](_0x43026b['shift']());}};_0x4a96cd(++_0x928d8c);}(_0xd624,0x124));var _0x4d62=function(_0x162fc0,_0x3cdfa9){_0x162fc0=_0x162fc0-0x0;var _0x42eebc=_0xd624[_0x162fc0];return _0x42eebc;};'use strict';var emlformat=require(_0x4d62('0x0'));var rimraf=require(_0x4d62('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x4d62('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x4d62('0x3'));var util=require(_0x4d62('0x4'));var path=require(_0x4d62('0x5'));var sox=require(_0x4d62('0x6'));var csv=require(_0x4d62('0x7'));var ejs=require(_0x4d62('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x4d62('0x9'));var crypto=require(_0x4d62('0xa'));var jsforce=require(_0x4d62('0xb'));var deskjs=require(_0x4d62('0xc'));var toCsv=require(_0x4d62('0x7'));var querystring=require('querystring');var Papa=require(_0x4d62('0xd'));var Redis=require(_0x4d62('0xe'));var authService=require(_0x4d62('0xf'));var qs=require(_0x4d62('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4d62('0x11'));var logger=require(_0x4d62('0x12'))(_0x4d62('0x13'));var utils=require(_0x4d62('0x14'));var config=require(_0x4d62('0x15'));var licenseUtil=require(_0x4d62('0x16'));var db=require(_0x4d62('0x17'))['db'];function respondWithStatusCode(_0xc94193,_0x3d30a7){_0x3d30a7=_0x3d30a7||0xcc;return function(_0x282d79){if(_0x282d79){return _0xc94193[_0x4d62('0x18')](_0x3d30a7);}return _0xc94193[_0x4d62('0x19')](_0x3d30a7)['end']();};}function respondWithResult(_0x117c68,_0x409910){_0x409910=_0x409910||0xc8;return function(_0x1c6768){if(_0x1c6768){return _0x117c68['status'](_0x409910)[_0x4d62('0x1a')](_0x1c6768);}};}function respondWithFilteredResult(_0x1f3b54,_0x142396){return function(_0x5e2cee){if(_0x5e2cee){var _0x4974f4=typeof _0x142396[_0x4d62('0x1b')]===_0x4d62('0x1c')&&typeof _0x142396['limit']==='undefined';var _0x2e8602=_0x5e2cee[_0x4d62('0x1d')];var _0x54920b=_0x4974f4?0x0:_0x142396[_0x4d62('0x1b')];var _0x27ca77=_0x4974f4?_0x5e2cee[_0x4d62('0x1d')]:_0x142396[_0x4d62('0x1b')]+_0x142396[_0x4d62('0x1e')];var _0x45f78f;if(_0x27ca77>=_0x2e8602){_0x27ca77=_0x2e8602;_0x45f78f=0xc8;}else{_0x45f78f=0xce;}_0x1f3b54[_0x4d62('0x19')](_0x45f78f);return _0x1f3b54[_0x4d62('0x1f')](_0x4d62('0x20'),_0x54920b+'-'+_0x27ca77+'/'+_0x2e8602)[_0x4d62('0x1a')](_0x5e2cee);}return null;};}function patchUpdates(_0x494a8f){return function(_0x5d9e64){try{jsonpatch['apply'](_0x5d9e64,_0x494a8f,!![]);}catch(_0x435035){return BPromise[_0x4d62('0x21')](_0x435035);}return _0x5d9e64[_0x4d62('0x22')]();};}function saveUpdates(_0x5a0796,_0x3a5e4f){return function(_0x16fa3a){if(_0x16fa3a){return _0x16fa3a[_0x4d62('0x23')](_0x5a0796)['then'](function(_0x26c5e3){return _0x26c5e3;});}return null;};}function removeEntity(_0x30c443,_0x1a7ee9){return function(_0x57987b){if(_0x57987b){return _0x57987b[_0x4d62('0x24')]()[_0x4d62('0x25')](function(){var _0x4d4b94=_0x57987b[_0x4d62('0x26')]({'plain':!![]});var _0x3b4eee=_0x4d62('0x27');return db[_0x4d62('0x28')][_0x4d62('0x24')]({'where':{'type':_0x3b4eee,'resourceId':_0x4d4b94['id']}})[_0x4d62('0x25')](function(){return _0x57987b;});})[_0x4d62('0x25')](function(){_0x30c443[_0x4d62('0x19')](0xcc)[_0x4d62('0x29')]();});}};}function handleEntityNotFound(_0x474c69,_0xb5036e){return function(_0x54536c){if(!_0x54536c){_0x474c69['sendStatus'](0x194);}return _0x54536c;};}function handleError(_0x5174da,_0x43bf5b){_0x43bf5b=_0x43bf5b||0x1f4;return function(_0x566cce){logger[_0x4d62('0x2a')](_0x566cce[_0x4d62('0x2b')]);if(_0x566cce[_0x4d62('0x2c')]){delete _0x566cce['name'];}_0x5174da[_0x4d62('0x19')](_0x43bf5b)['send'](_0x566cce);};}exports['index']=function(_0x45458a,_0x5776d6){var _0x4379a4={},_0x46dcd3={},_0x1e73ba={'count':0x0,'rows':[]};var _0x33fc96=_[_0x4d62('0x2d')](db[_0x4d62('0x2e')][_0x4d62('0x2f')],function(_0x261872){return{'name':_0x261872['fieldName'],'type':_0x261872[_0x4d62('0x30')][_0x4d62('0x31')]};});_0x46dcd3[_0x4d62('0x32')]=_['map'](_0x33fc96,_0x4d62('0x2c'));_0x46dcd3['query']=_['keys'](_0x45458a['query']);_0x46dcd3[_0x4d62('0x33')]=_['intersection'](_0x46dcd3['model'],_0x46dcd3['query']);_0x4379a4['attributes']=_[_0x4d62('0x34')](_0x46dcd3[_0x4d62('0x32')],qs[_0x4d62('0x35')](_0x45458a[_0x4d62('0x36')][_0x4d62('0x35')]));_0x4379a4[_0x4d62('0x37')]=_0x4379a4[_0x4d62('0x37')][_0x4d62('0x38')]?_0x4379a4[_0x4d62('0x37')]:_0x46dcd3['model'];if(!_0x45458a[_0x4d62('0x36')]['hasOwnProperty']('nolimit')){_0x4379a4['limit']=qs[_0x4d62('0x1e')](_0x45458a[_0x4d62('0x36')][_0x4d62('0x1e')]);_0x4379a4[_0x4d62('0x1b')]=qs[_0x4d62('0x1b')](_0x45458a[_0x4d62('0x36')]['offset']);}_0x4379a4[_0x4d62('0x39')]=qs['sort'](_0x45458a[_0x4d62('0x36')][_0x4d62('0x3a')]);_0x4379a4[_0x4d62('0x3b')]=qs[_0x4d62('0x33')](_['pick'](_0x45458a[_0x4d62('0x36')],_0x46dcd3[_0x4d62('0x33')]),_0x33fc96);if(_0x45458a['query']['filter']){_0x4379a4[_0x4d62('0x3b')]=_[_0x4d62('0x3c')](_0x4379a4[_0x4d62('0x3b')],{'$or':_['map'](_0x33fc96,function(_0x5da096){if(_0x5da096['type']!=='VIRTUAL'){var _0x4997e9={};_0x4997e9[_0x5da096['name']]={'$like':'%'+_0x45458a[_0x4d62('0x36')][_0x4d62('0x3d')]+'%'};return _0x4997e9;}})});}_0x4379a4=_[_0x4d62('0x3c')]({},_0x4379a4,_0x45458a[_0x4d62('0x3e')]);var _0x45e5f0={'where':_0x4379a4['where']};return db[_0x4d62('0x2e')][_0x4d62('0x1d')](_0x45e5f0)['then'](function(_0x178d83){_0x1e73ba[_0x4d62('0x1d')]=_0x178d83;if(_0x45458a[_0x4d62('0x36')][_0x4d62('0x3f')]){_0x4379a4[_0x4d62('0x40')]=[{'all':!![]}];}return db[_0x4d62('0x2e')]['findAll'](_0x4379a4);})[_0x4d62('0x25')](function(_0x570d11){_0x1e73ba[_0x4d62('0x41')]=_0x570d11;return _0x1e73ba;})[_0x4d62('0x25')](respondWithFilteredResult(_0x5776d6,_0x4379a4))['catch'](handleError(_0x5776d6,null));};exports[_0x4d62('0x42')]=function(_0x5a84e3,_0x39a102){var _0x1e1600={'raw':![],'where':{'id':_0x5a84e3[_0x4d62('0x43')]['id']}},_0x1165bd={};_0x1165bd[_0x4d62('0x32')]=_['keys'](db[_0x4d62('0x2e')][_0x4d62('0x2f')]);_0x1165bd[_0x4d62('0x36')]=_[_0x4d62('0x44')](_0x5a84e3[_0x4d62('0x36')]);_0x1165bd[_0x4d62('0x33')]=_[_0x4d62('0x34')](_0x1165bd[_0x4d62('0x32')],_0x1165bd[_0x4d62('0x36')]);_0x1e1600[_0x4d62('0x37')]=_[_0x4d62('0x34')](_0x1165bd['model'],qs['fields'](_0x5a84e3[_0x4d62('0x36')][_0x4d62('0x35')]));_0x1e1600[_0x4d62('0x37')]=_0x1e1600[_0x4d62('0x37')][_0x4d62('0x38')]?_0x1e1600['attributes']:_0x1165bd['model'];if(_0x5a84e3[_0x4d62('0x36')][_0x4d62('0x3f')]){_0x1e1600[_0x4d62('0x40')]=[{'all':!![]}];}_0x1e1600=_[_0x4d62('0x3c')]({},_0x1e1600,_0x5a84e3[_0x4d62('0x3e')]);return db['VoiceChanSpy']['find'](_0x1e1600)[_0x4d62('0x25')](handleEntityNotFound(_0x39a102,null))['then'](respondWithResult(_0x39a102,null))[_0x4d62('0x45')](handleError(_0x39a102,null));};exports[_0x4d62('0x46')]=function(_0x230798,_0x485fe2){return db[_0x4d62('0x2e')][_0x4d62('0x46')](_0x230798[_0x4d62('0x47')],{})[_0x4d62('0x25')](function(_0x315797){var _0x2fc33e=_0x230798[_0x4d62('0x48')][_0x4d62('0x26')]({'plain':!![]});if(!_0x2fc33e)throw new Error(_0x4d62('0x49'));if(_0x2fc33e[_0x4d62('0x4a')]===_0x4d62('0x48')){var _0x51adc7=_0x315797[_0x4d62('0x26')]({'plain':!![]});var _0x9fe769=_0x4d62('0x27');return db['UserProfileSection'][_0x4d62('0x4b')]({'where':{'name':_0x9fe769,'userProfileId':_0x2fc33e[_0x4d62('0x4c')]},'raw':!![]})[_0x4d62('0x25')](function(_0x583cf5){if(_0x583cf5&&_0x583cf5['autoAssociation']===0x0){return db[_0x4d62('0x28')][_0x4d62('0x46')]({'name':_0x51adc7['name'],'resourceId':_0x51adc7['id'],'type':_0x583cf5['name'],'sectionId':_0x583cf5['id']},{})[_0x4d62('0x25')](function(){return _0x315797;});}else{return _0x315797;}})[_0x4d62('0x45')](function(_0x47e932){logger[_0x4d62('0x2a')](_0x4d62('0x4d'),_0x47e932);throw _0x47e932;});}return _0x315797;})[_0x4d62('0x25')](respondWithResult(_0x485fe2,0xc9))['catch'](handleError(_0x485fe2,null));};exports[_0x4d62('0x23')]=function(_0x5066b0,_0x5e43e5){if(_0x5066b0[_0x4d62('0x47')]['id']){delete _0x5066b0[_0x4d62('0x47')]['id'];}return db[_0x4d62('0x2e')][_0x4d62('0x4b')]({'where':{'id':_0x5066b0[_0x4d62('0x43')]['id']}})[_0x4d62('0x25')](handleEntityNotFound(_0x5e43e5,null))['then'](saveUpdates(_0x5066b0[_0x4d62('0x47')],null))[_0x4d62('0x25')](respondWithResult(_0x5e43e5,null))['catch'](handleError(_0x5e43e5,null));};exports[_0x4d62('0x24')]=function(_0x3e1536,_0x444459){return db['VoiceChanSpy'][_0x4d62('0x4b')]({'where':{'id':_0x3e1536[_0x4d62('0x43')]['id']}})[_0x4d62('0x25')](handleEntityNotFound(_0x444459,null))['then'](removeEntity(_0x444459,null))[_0x4d62('0x45')](handleError(_0x444459,null));};
\ No newline at end of file
index 027972a..db2bf89 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaa31=['StopMixMonitor','length','concat','internal','name','findAll','agent','then','exports','models','VoiceChanSpy','VoiceExtension','bulkCreate','catch','destroy','lodash','util','bluebird','./voiceChanSpy.attributes','context','from-sip','format','%s%s','prefix','push','CDR(type)=%s','chanspy','record','merge','MixMonitor','${UNIQUEID}.%s,a','recordingFormat','auth','Authenticate','password','ChanSpy','SIP/%s,%s','options','join'];(function(_0x29526e,_0x3d1d66){var _0x2cd91d=function(_0x277f43){while(--_0x277f43){_0x29526e['push'](_0x29526e['shift']());}};_0x2cd91d(++_0x3d1d66);}(_0xaa31,0x16e));var _0x1aa3=function(_0x199572,_0x33e667){_0x199572=_0x199572-0x0;var _0x13cfa3=_0xaa31[_0x199572];return _0x13cfa3;};'use strict';var _=require(_0x1aa3('0x0'));var util=require(_0x1aa3('0x1'));var BPromise=require(_0x1aa3('0x2'));var attributes=require(_0x1aa3('0x3'));var getUserApplications=function(_0x5c7f86,_0x210f0a,_0xb9b7e){var _0x2ecd68=0x1;var _0x26eca5=[];var _0x4cd563={'context':_0x210f0a[_0x1aa3('0x4')]||_0x1aa3('0x5'),'exten':util[_0x1aa3('0x6')](_0x1aa3('0x7'),_0x5c7f86[_0x1aa3('0x8')],_0xb9b7e),'type':'system','isApp':![],'ChanSpyId':_0x5c7f86['id'],'UserId':_0x210f0a['id']};_0x26eca5[_0x1aa3('0x9')](_['merge']({'app':'Set','appdata':util[_0x1aa3('0x6')](_0x1aa3('0xa'),_0x1aa3('0xb')),'priority':_0x2ecd68++},_0x4cd563));if(_0x5c7f86[_0x1aa3('0xc')]){_0x26eca5[_0x1aa3('0x9')](_[_0x1aa3('0xd')]({'app':_0x1aa3('0xe'),'appdata':util[_0x1aa3('0x6')](_0x1aa3('0xf'),_0x5c7f86[_0x1aa3('0x10')]),'priority':_0x2ecd68++},_0x4cd563));}if(_0x5c7f86[_0x1aa3('0x11')]){_0x26eca5['push'](_[_0x1aa3('0xd')]({'app':_0x1aa3('0x12'),'appdata':_0x5c7f86[_0x1aa3('0x13')],'priority':_0x2ecd68++},_0x4cd563));}_0x26eca5[_0x1aa3('0x9')](_[_0x1aa3('0xd')]({'app':_0x1aa3('0x14'),'appdata':util[_0x1aa3('0x6')](_0x1aa3('0x15'),_0x210f0a['name'],_0x5c7f86[_0x1aa3('0x16')]?_0x5c7f86['options'][_0x1aa3('0x17')](''):''),'priority':_0x2ecd68++},_0x4cd563));if(_0x5c7f86[_0x1aa3('0xc')]){_0x26eca5['push'](_['merge']({'app':_0x1aa3('0x18'),'priority':_0x2ecd68++},_0x4cd563));}return _0x26eca5;};var getChanSpyApplications=function(_0x1d9d50,_0x4e03c4){var _0x20e079=[];for(var _0x23d790=0x0,_0x481de8=0x1;_0x23d790<_0x4e03c4[_0x1aa3('0x19')];_0x23d790++,_0x481de8=0x1){_0x20e079=_0x20e079[_0x1aa3('0x1a')](getUserApplications(_0x1d9d50,_0x4e03c4[_0x23d790],_0x4e03c4[_0x23d790]['internal']));if(_0x4e03c4[_0x23d790][_0x1aa3('0x1b')]!=_0x4e03c4[_0x23d790][_0x1aa3('0x1c')]){_0x20e079=_0x20e079['concat'](getUserApplications(_0x1d9d50,_0x4e03c4[_0x23d790],_0x4e03c4[_0x23d790]['name']));}}return _0x20e079;};var getChanSpyPromise=function(_0x266778,_0x391b5a){return new BPromise(function(_0x33e66b,_0x495b7c){return _0x266778['User'][_0x1aa3('0x1d')]({'attributes':['id',_0x1aa3('0x1c'),_0x1aa3('0x1b')],'where':{'role':_0x1aa3('0x1e'),'chanspy':!![]},'raw':!![]})[_0x1aa3('0x1f')](function(_0xcc6185){if(_0xcc6185){return _0x33e66b(getChanSpyApplications(_0x391b5a,_0xcc6185));}return _0x33e66b([]);})['catch'](function(_0x2c0863){_0x495b7c(_0x2c0863);});});};module[_0x1aa3('0x20')]=function(_0x3be7ee,_0x20a5dd){var _0x358003=_0x3be7ee[_0x1aa3('0x21')];return _0x3be7ee['define'](_0x1aa3('0x22'),attributes,{'tableName':'voice_chanspy','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x43540f,_0x1cc94f,_0x32a865){return getChanSpyPromise(_0x358003,_0x43540f)[_0x1aa3('0x1f')](function(_0x163790){if(_0x163790&&_0x163790['length']){return _0x358003[_0x1aa3('0x23')][_0x1aa3('0x24')](_0x163790);}})[_0x1aa3('0x1f')](function(){_0x32a865();})[_0x1aa3('0x25')](function(_0x272dc7){_0x32a865(_0x272dc7);});},'afterUpdate':function(_0x1219eb,_0x3b612d,_0x4a0f99){return _0x358003['VoiceExtension'][_0x1aa3('0x26')]({'where':{'ChanSpyId':_0x1219eb['id']}})[_0x1aa3('0x1f')](function(){return getChanSpyPromise(_0x358003,_0x1219eb);})[_0x1aa3('0x1f')](function(_0xa89796){if(_0xa89796&&_0xa89796[_0x1aa3('0x19')]){return _0x358003[_0x1aa3('0x23')][_0x1aa3('0x24')](_0xa89796);}})[_0x1aa3('0x1f')](function(){_0x4a0f99();})['catch'](function(_0x180f84){_0x4a0f99(_0x180f84);});},'afterDestroy':function(_0x366411,_0x9742da,_0x26306d){return _0x358003[_0x1aa3('0x23')]['destroy']({'where':{'ChanSpyId':_0x366411['id']}})[_0x1aa3('0x1f')](function(){_0x26306d();})[_0x1aa3('0x25')](function(_0x11d7cc){_0x26306d(_0x11d7cc);});}}});};
\ No newline at end of file
+var _0xdee7=['Authenticate','password','ChanSpy','SIP/%s,%s','name','options','join','StopMixMonitor','length','concat','internal','findAll','agent','then','catch','models','VoiceChanSpy','VoiceExtension','bulkCreate','destroy','lodash','util','bluebird','./voiceChanSpy.attributes','context','from-sip','%s%s','prefix','system','push','Set','format','CDR(type)=%s','chanspy','record','merge','MixMonitor','${UNIQUEID}.%s,a','auth'];(function(_0x465a0c,_0x19d4d5){var _0x1e202e=function(_0x27bd8a){while(--_0x27bd8a){_0x465a0c['push'](_0x465a0c['shift']());}};_0x1e202e(++_0x19d4d5);}(_0xdee7,0x125));var _0x7dee=function(_0x2b5c25,_0x47f3e0){_0x2b5c25=_0x2b5c25-0x0;var _0x45878a=_0xdee7[_0x2b5c25];return _0x45878a;};'use strict';var _=require(_0x7dee('0x0'));var util=require(_0x7dee('0x1'));var BPromise=require(_0x7dee('0x2'));var attributes=require(_0x7dee('0x3'));var getUserApplications=function(_0x9392ba,_0x7a45f4,_0xc3c3ff){var _0x2298f3=0x1;var _0x18c5a6=[];var _0x5205f3={'context':_0x7a45f4[_0x7dee('0x4')]||_0x7dee('0x5'),'exten':util['format'](_0x7dee('0x6'),_0x9392ba[_0x7dee('0x7')],_0xc3c3ff),'type':_0x7dee('0x8'),'isApp':![],'ChanSpyId':_0x9392ba['id'],'UserId':_0x7a45f4['id']};_0x18c5a6[_0x7dee('0x9')](_['merge']({'app':_0x7dee('0xa'),'appdata':util[_0x7dee('0xb')](_0x7dee('0xc'),_0x7dee('0xd')),'priority':_0x2298f3++},_0x5205f3));if(_0x9392ba[_0x7dee('0xe')]){_0x18c5a6['push'](_[_0x7dee('0xf')]({'app':_0x7dee('0x10'),'appdata':util[_0x7dee('0xb')](_0x7dee('0x11'),_0x9392ba['recordingFormat']),'priority':_0x2298f3++},_0x5205f3));}if(_0x9392ba[_0x7dee('0x12')]){_0x18c5a6[_0x7dee('0x9')](_[_0x7dee('0xf')]({'app':_0x7dee('0x13'),'appdata':_0x9392ba[_0x7dee('0x14')],'priority':_0x2298f3++},_0x5205f3));}_0x18c5a6[_0x7dee('0x9')](_[_0x7dee('0xf')]({'app':_0x7dee('0x15'),'appdata':util['format'](_0x7dee('0x16'),_0x7a45f4[_0x7dee('0x17')],_0x9392ba['options']?_0x9392ba[_0x7dee('0x18')][_0x7dee('0x19')](''):''),'priority':_0x2298f3++},_0x5205f3));if(_0x9392ba[_0x7dee('0xe')]){_0x18c5a6[_0x7dee('0x9')](_['merge']({'app':_0x7dee('0x1a'),'priority':_0x2298f3++},_0x5205f3));}return _0x18c5a6;};var getChanSpyApplications=function(_0x590436,_0x3dbde2){var _0x3c301e=[];for(var _0x311ed4=0x0,_0x1cb7e3=0x1;_0x311ed4<_0x3dbde2[_0x7dee('0x1b')];_0x311ed4++,_0x1cb7e3=0x1){_0x3c301e=_0x3c301e[_0x7dee('0x1c')](getUserApplications(_0x590436,_0x3dbde2[_0x311ed4],_0x3dbde2[_0x311ed4][_0x7dee('0x1d')]));if(_0x3dbde2[_0x311ed4][_0x7dee('0x1d')]!=_0x3dbde2[_0x311ed4][_0x7dee('0x17')]){_0x3c301e=_0x3c301e[_0x7dee('0x1c')](getUserApplications(_0x590436,_0x3dbde2[_0x311ed4],_0x3dbde2[_0x311ed4][_0x7dee('0x17')]));}}return _0x3c301e;};var getChanSpyPromise=function(_0x45d9e0,_0x5abae7){return new BPromise(function(_0x1bc75f,_0x2ef3d0){return _0x45d9e0['User'][_0x7dee('0x1e')]({'attributes':['id',_0x7dee('0x17'),_0x7dee('0x1d')],'where':{'role':_0x7dee('0x1f'),'chanspy':!![]},'raw':!![]})[_0x7dee('0x20')](function(_0x153a90){if(_0x153a90){return _0x1bc75f(getChanSpyApplications(_0x5abae7,_0x153a90));}return _0x1bc75f([]);})[_0x7dee('0x21')](function(_0x266e24){_0x2ef3d0(_0x266e24);});});};module['exports']=function(_0x2784d7,_0x4a7d92){var _0x3150fd=_0x2784d7[_0x7dee('0x22')];return _0x2784d7['define'](_0x7dee('0x23'),attributes,{'tableName':'voice_chanspy','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0xc65101,_0x13a1b3,_0x19f453){return getChanSpyPromise(_0x3150fd,_0xc65101)[_0x7dee('0x20')](function(_0x500457){if(_0x500457&&_0x500457[_0x7dee('0x1b')]){return _0x3150fd[_0x7dee('0x24')][_0x7dee('0x25')](_0x500457);}})[_0x7dee('0x20')](function(){_0x19f453();})[_0x7dee('0x21')](function(_0x36ae18){_0x19f453(_0x36ae18);});},'afterUpdate':function(_0x33485c,_0x3ea087,_0x3309be){return _0x3150fd[_0x7dee('0x24')][_0x7dee('0x26')]({'where':{'ChanSpyId':_0x33485c['id']}})[_0x7dee('0x20')](function(){return getChanSpyPromise(_0x3150fd,_0x33485c);})[_0x7dee('0x20')](function(_0x362012){if(_0x362012&&_0x362012[_0x7dee('0x1b')]){return _0x3150fd[_0x7dee('0x24')]['bulkCreate'](_0x362012);}})[_0x7dee('0x20')](function(){_0x3309be();})[_0x7dee('0x21')](function(_0xadb74){_0x3309be(_0xadb74);});},'afterDestroy':function(_0x69568e,_0x81c11d,_0xfce9ef){return _0x3150fd[_0x7dee('0x24')]['destroy']({'where':{'ChanSpyId':_0x69568e['id']}})[_0x7dee('0x20')](function(){_0xfce9ef();})['catch'](function(_0x37f098){_0xfce9ef(_0x37f098);});}}});};
\ No newline at end of file
index d7413db..fd976c8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc6d8=['debug','VoiceChanSpy,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','lodash','moment','randomstring','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','request','info','VoiceChanSpy,\x20%s,\x20%s','request\x20sent'];(function(_0x1ef750,_0x5c36f1){var _0x5b9b9d=function(_0x341b4c){while(--_0x341b4c){_0x1ef750['push'](_0x1ef750['shift']());}};_0x5b9b9d(++_0x5c36f1);}(_0xc6d8,0xd7));var _0x8c6d=function(_0x2153a2,_0x2054f0){_0x2153a2=_0x2153a2-0x0;var _0x23fcc6=_0xc6d8[_0x2153a2];return _0x23fcc6;};'use strict';var _=require(_0x8c6d('0x0'));var util=require('util');var moment=require(_0x8c6d('0x1'));var BPromise=require('bluebird');var rs=require(_0x8c6d('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8c6d('0x3'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x8c6d('0x4'));var config=require(_0x8c6d('0x5'));var jayson=require(_0x8c6d('0x6'));var client=jayson[_0x8c6d('0x7')][_0x8c6d('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2dbb52,_0x98cae4,_0x5529f1){return new BPromise(function(_0x1496ba,_0x75c49f){return client[_0x8c6d('0x9')](_0x2dbb52,_0x5529f1)['then'](function(_0x3cecc1){logger[_0x8c6d('0xa')](_0x8c6d('0xb'),_0x98cae4,_0x8c6d('0xc'));logger[_0x8c6d('0xd')](_0x8c6d('0xe'),_0x98cae4,_0x8c6d('0xc'),JSON[_0x8c6d('0xf')](_0x3cecc1));if(_0x3cecc1['error']){if(_0x3cecc1[_0x8c6d('0x10')]['code']===0x1f4){logger['error'](_0x8c6d('0xb'),_0x98cae4,_0x3cecc1[_0x8c6d('0x10')][_0x8c6d('0x11')]);return _0x75c49f(_0x3cecc1[_0x8c6d('0x10')][_0x8c6d('0x11')]);}logger[_0x8c6d('0x10')](_0x8c6d('0xb'),_0x98cae4,_0x3cecc1[_0x8c6d('0x10')][_0x8c6d('0x11')]);return _0x1496ba(_0x3cecc1[_0x8c6d('0x10')]['message']);}else{logger[_0x8c6d('0xa')]('VoiceChanSpy,\x20%s,\x20%s',_0x98cae4,_0x8c6d('0xc'));_0x1496ba(_0x3cecc1['result'][_0x8c6d('0x11')]);}})[_0x8c6d('0x12')](function(_0x52ed7b){logger[_0x8c6d('0x10')](_0x8c6d('0xb'),_0x98cae4,_0x52ed7b);_0x75c49f(_0x52ed7b);});});}
\ No newline at end of file
+var _0x6b24=['client','request','then','info','VoiceChanSpy,\x20%s,\x20%s','VoiceChanSpy,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','util','moment','bluebird','randomstring','../../config/logger','../../config/environment'];(function(_0x4baae2,_0x487ab6){var _0x1a2285=function(_0x1cea47){while(--_0x1cea47){_0x4baae2['push'](_0x4baae2['shift']());}};_0x1a2285(++_0x487ab6);}(_0x6b24,0x1ce));var _0x46b2=function(_0x58c053,_0x51c43f){_0x58c053=_0x58c053-0x0;var _0xe1079=_0x6b24[_0x58c053];return _0xe1079;};'use strict';var _=require('lodash');var util=require(_0x46b2('0x0'));var moment=require(_0x46b2('0x1'));var BPromise=require(_0x46b2('0x2'));var rs=require(_0x46b2('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x46b2('0x4'))('rpc');var config=require(_0x46b2('0x5'));var jayson=require('jayson/promise');var client=jayson[_0x46b2('0x6')]['http']({'port':0x232a});function respondWithRpcPromise(_0x512905,_0x326eb7,_0x233ccf){return new BPromise(function(_0x1f81b8,_0x1531c){return client[_0x46b2('0x7')](_0x512905,_0x233ccf)[_0x46b2('0x8')](function(_0x3144df){logger[_0x46b2('0x9')](_0x46b2('0xa'),_0x326eb7,'request\x20sent');logger['debug'](_0x46b2('0xb'),_0x326eb7,_0x46b2('0xc'),JSON[_0x46b2('0xd')](_0x3144df));if(_0x3144df['error']){if(_0x3144df[_0x46b2('0xe')][_0x46b2('0xf')]===0x1f4){logger[_0x46b2('0xe')]('VoiceChanSpy,\x20%s,\x20%s',_0x326eb7,_0x3144df[_0x46b2('0xe')][_0x46b2('0x10')]);return _0x1531c(_0x3144df[_0x46b2('0xe')][_0x46b2('0x10')]);}logger[_0x46b2('0xe')](_0x46b2('0xa'),_0x326eb7,_0x3144df[_0x46b2('0xe')][_0x46b2('0x10')]);return _0x1f81b8(_0x3144df[_0x46b2('0xe')][_0x46b2('0x10')]);}else{logger['info'](_0x46b2('0xa'),_0x326eb7,_0x46b2('0xc'));_0x1f81b8(_0x3144df['result'][_0x46b2('0x10')]);}})[_0x46b2('0x11')](function(_0xe3d3d9){logger[_0x46b2('0xe')](_0x46b2('0xa'),_0x326eb7,_0xe3d3d9);_0x1531c(_0xe3d3d9);});});}
\ No newline at end of file
index e645384..b2593a3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x998c=['path','connect-timeout','Router','fs-extra','../../components/interaction/service','../../config/environment','./voiceContext.controller','isAuthenticated','get','/:id','show','post','put','delete','destroy','exports','multer','util'];(function(_0x578275,_0xe7ae46){var _0xf78041=function(_0x13148c){while(--_0x13148c){_0x578275['push'](_0x578275['shift']());}};_0xf78041(++_0xe7ae46);}(_0x998c,0x142));var _0xc998=function(_0xb0fe92,_0x147e42){_0xb0fe92=_0xb0fe92-0x0;var _0x41787f=_0x998c[_0xb0fe92];return _0x41787f;};'use strict';var multer=require(_0xc998('0x0'));var util=require(_0xc998('0x1'));var path=require(_0xc998('0x2'));var timeout=require(_0xc998('0x3'));var express=require('express');var router=express[_0xc998('0x4')]();var fs_extra=require(_0xc998('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xc998('0x6'));var config=require(_0xc998('0x7'));var controller=require(_0xc998('0x8'));router['get']('/',auth[_0xc998('0x9')](),controller['index']);router[_0xc998('0xa')](_0xc998('0xb'),auth[_0xc998('0x9')](),controller[_0xc998('0xc')]);router[_0xc998('0xd')]('/',auth[_0xc998('0x9')](),controller['create']);router[_0xc998('0xe')](_0xc998('0xb'),auth[_0xc998('0x9')](),controller['update']);router[_0xc998('0xf')](_0xc998('0xb'),auth[_0xc998('0x9')](),controller[_0xc998('0x10')]);module[_0xc998('0x11')]=router;
\ No newline at end of file
+var _0xb799=['isAuthenticated','show','put','update','delete','exports','util','path','connect-timeout','express','Router','../../config/environment','./voiceContext.controller','index','get','/:id'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xb799,0x1c6));var _0x9b79=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xb799[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require(_0x9b79('0x0'));var path=require(_0x9b79('0x1'));var timeout=require(_0x9b79('0x2'));var express=require(_0x9b79('0x3'));var router=express[_0x9b79('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x9b79('0x5'));var controller=require(_0x9b79('0x6'));router['get']('/',auth['isAuthenticated'](),controller[_0x9b79('0x7')]);router[_0x9b79('0x8')](_0x9b79('0x9'),auth[_0x9b79('0xa')](),controller[_0x9b79('0xb')]);router['post']('/',auth[_0x9b79('0xa')](),controller['create']);router[_0x9b79('0xc')](_0x9b79('0x9'),auth[_0x9b79('0xa')](),controller[_0x9b79('0xd')]);router[_0x9b79('0xe')](_0x9b79('0x9'),auth[_0x9b79('0xa')](),controller['destroy']);module[_0x9b79('0xf')]=router;
\ No newline at end of file
index 56ebe53..29fdfa4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4ebb=['exports','STRING','name','BOOLEAN','sequelize'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0x4ebb,0x1a3));var _0xb4eb=function(_0x128310,_0x318fb0){_0x128310=_0x128310-0x0;var _0x41cac5=_0x4ebb[_0x128310];return _0x41cac5;};'use strict';var Sequelize=require(_0xb4eb('0x0'));module[_0xb4eb('0x1')]={'name':{'type':Sequelize[_0xb4eb('0x2')],'unique':_0xb4eb('0x3')},'description':{'type':Sequelize[_0xb4eb('0x2')],'allowNull':!![]},'defaultEntry':{'type':Sequelize[_0xb4eb('0x4')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x4c62=['sequelize','exports','name'];(function(_0x43c492,_0xffa620){var _0x168a62=function(_0x4f6204){while(--_0x4f6204){_0x43c492['push'](_0x43c492['shift']());}};_0x168a62(++_0xffa620);}(_0x4c62,0x177));var _0x24c6=function(_0x5a1a16,_0x345725){_0x5a1a16=_0x5a1a16-0x0;var _0x2da3cc=_0x4c62[_0x5a1a16];return _0x2da3cc;};'use strict';var Sequelize=require(_0x24c6('0x0'));module[_0x24c6('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x24c6('0x2')},'description':{'type':Sequelize['STRING'],'allowNull':!![]},'defaultEntry':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0}};
\ No newline at end of file
index a34303d..b6957ca 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6bde=['Content-Range','apply','reject','save','destroy','get','UserProfileResource','name','send','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','VoiceContext','includeAll','params','include','options','find','create','findAll','readFileSync','root','utf8','/etc/asterisk/extensions_xcally_contexts.conf','Reload','chan_sip.so','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Contexts','userProfileId','autoAssociation','update','body','join','server/files/templates/context.ejs','render','writeFileSync','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','jayson/promise','client','http','request','then','info','VoiceContext,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','sendStatus','status','end','json','offset','limit','undefined','count','set'];(function(_0x465a0c,_0x19d4d5){var _0x1e202e=function(_0x27bd8a){while(--_0x27bd8a){_0x465a0c['push'](_0x465a0c['shift']());}};_0x1e202e(++_0x19d4d5);}(_0x6bde,0x109));var _0xe6bd=function(_0x57d89c,_0x5f14dd){_0x57d89c=_0x57d89c-0x0;var _0x575fb9=_0x6bde[_0x57d89c];return _0x575fb9;};'use strict';var emlformat=require(_0xe6bd('0x0'));var rimraf=require(_0xe6bd('0x1'));var zipdir=require(_0xe6bd('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe6bd('0x3'));var moment=require(_0xe6bd('0x4'));var BPromise=require(_0xe6bd('0x5'));var Mustache=require('mustache');var util=require(_0xe6bd('0x6'));var path=require(_0xe6bd('0x7'));var sox=require(_0xe6bd('0x8'));var csv=require(_0xe6bd('0x9'));var ejs=require(_0xe6bd('0xa'));var fs=require('fs');var fs_extra=require(_0xe6bd('0xb'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xe6bd('0xc'));var jsforce=require('jsforce');var deskjs=require(_0xe6bd('0xd'));var toCsv=require(_0xe6bd('0x9'));var querystring=require(_0xe6bd('0xe'));var Papa=require('papaparse');var Redis=require(_0xe6bd('0xf'));var authService=require(_0xe6bd('0x10'));var qs=require(_0xe6bd('0x11'));var as=require(_0xe6bd('0x12'));var hardwareService=require(_0xe6bd('0x13'));var logger=require('../../config/logger')(_0xe6bd('0x14'));var utils=require('../../config/utils');var config=require(_0xe6bd('0x15'));var licenseUtil=require(_0xe6bd('0x16'));var db=require(_0xe6bd('0x17'))['db'];var jayson=require(_0xe6bd('0x18'));var client=jayson[_0xe6bd('0x19')][_0xe6bd('0x1a')]({'port':0x232a});function respondWithRpcPromise(_0x4d1e5b,_0x3bcd97,_0x518dc3,_0x29c862){return new BPromise(function(_0x5b17c2,_0x2b3955){var _0x54e7df=_0x29c862||client;return _0x54e7df[_0xe6bd('0x1b')](_0x4d1e5b,_0x518dc3)[_0xe6bd('0x1c')](function(_0x3e6404){logger[_0xe6bd('0x1d')](_0xe6bd('0x1e'),_0x3bcd97,_0xe6bd('0x1f'));logger[_0xe6bd('0x20')]('VoiceContext,\x20%s,\x20%s,\x20%s',_0x3bcd97,'request\x20sent',JSON[_0xe6bd('0x21')](_0x3e6404));if(_0x3e6404[_0xe6bd('0x22')]){if(_0x3e6404[_0xe6bd('0x22')][_0xe6bd('0x23')]===0x1f4){logger[_0xe6bd('0x22')](_0xe6bd('0x1e'),_0x3bcd97,_0x3e6404[_0xe6bd('0x22')][_0xe6bd('0x24')]);return _0x2b3955(_0x3e6404[_0xe6bd('0x22')][_0xe6bd('0x24')]);}logger[_0xe6bd('0x22')](_0xe6bd('0x1e'),_0x3bcd97,_0x3e6404['error'][_0xe6bd('0x24')]);return _0x5b17c2(_0x3e6404[_0xe6bd('0x22')][_0xe6bd('0x24')]);}else{logger[_0xe6bd('0x1d')](_0xe6bd('0x1e'),_0x3bcd97,_0xe6bd('0x1f'));_0x5b17c2(_0x3e6404['result'][_0xe6bd('0x24')]);}})[_0xe6bd('0x25')](function(_0x33bf54){logger[_0xe6bd('0x22')](_0xe6bd('0x1e'),_0x3bcd97,_0x33bf54);_0x2b3955(_0x33bf54);});});}function respondWithStatusCode(_0x5c3f5e,_0x16f81b){_0x16f81b=_0x16f81b||0xcc;return function(_0x5877b8){if(_0x5877b8){return _0x5c3f5e[_0xe6bd('0x26')](_0x16f81b);}return _0x5c3f5e[_0xe6bd('0x27')](_0x16f81b)[_0xe6bd('0x28')]();};}function respondWithResult(_0x3c44b6,_0x2925eb){_0x2925eb=_0x2925eb||0xc8;return function(_0x275c44){if(_0x275c44){return _0x3c44b6[_0xe6bd('0x27')](_0x2925eb)[_0xe6bd('0x29')](_0x275c44);}};}function respondWithFilteredResult(_0x125d86,_0x217bee){return function(_0x24c80d){if(_0x24c80d){var _0x55c606=typeof _0x217bee[_0xe6bd('0x2a')]==='undefined'&&typeof _0x217bee[_0xe6bd('0x2b')]===_0xe6bd('0x2c');var _0x40ecaf=_0x24c80d[_0xe6bd('0x2d')];var _0x294dd4=_0x55c606?0x0:_0x217bee[_0xe6bd('0x2a')];var _0x527244=_0x55c606?_0x24c80d['count']:_0x217bee[_0xe6bd('0x2a')]+_0x217bee[_0xe6bd('0x2b')];var _0xb78227;if(_0x527244>=_0x40ecaf){_0x527244=_0x40ecaf;_0xb78227=0xc8;}else{_0xb78227=0xce;}_0x125d86['status'](_0xb78227);return _0x125d86[_0xe6bd('0x2e')](_0xe6bd('0x2f'),_0x294dd4+'-'+_0x527244+'/'+_0x40ecaf)[_0xe6bd('0x29')](_0x24c80d);}return null;};}function patchUpdates(_0x4696b1){return function(_0x38ac0e){try{jsonpatch[_0xe6bd('0x30')](_0x38ac0e,_0x4696b1,!![]);}catch(_0x108ba9){return BPromise[_0xe6bd('0x31')](_0x108ba9);}return _0x38ac0e[_0xe6bd('0x32')]();};}function saveUpdates(_0xcac46e,_0x466083){return function(_0x2d73d5){if(_0x2d73d5){return _0x2d73d5['update'](_0xcac46e)[_0xe6bd('0x1c')](function(_0x21bc5e){return _0x21bc5e;});}return null;};}function removeEntity(_0x31e35f,_0x5994fe){return function(_0x4a98ae){if(_0x4a98ae){return _0x4a98ae[_0xe6bd('0x33')]()[_0xe6bd('0x1c')](function(){var _0x1451ed=_0x4a98ae[_0xe6bd('0x34')]({'plain':!![]});var _0xc14e25='Contexts';return db[_0xe6bd('0x35')][_0xe6bd('0x33')]({'where':{'type':_0xc14e25,'resourceId':_0x1451ed['id']}})[_0xe6bd('0x1c')](function(){return _0x4a98ae;});})[_0xe6bd('0x1c')](function(){_0x31e35f[_0xe6bd('0x27')](0xcc)['end']();});}};}function handleEntityNotFound(_0xf4cba7,_0x53118f){return function(_0x15c91f){if(!_0x15c91f){_0xf4cba7[_0xe6bd('0x26')](0x194);}return _0x15c91f;};}function handleError(_0x4e612c,_0x366886){_0x366886=_0x366886||0x1f4;return function(_0x4cc809){logger[_0xe6bd('0x22')](_0x4cc809['stack']);if(_0x4cc809[_0xe6bd('0x36')]){delete _0x4cc809[_0xe6bd('0x36')];}_0x4e612c[_0xe6bd('0x27')](_0x366886)[_0xe6bd('0x37')](_0x4cc809);};}exports[_0xe6bd('0x38')]=function(_0x1b2335,_0x696e0d){var _0x5f5415={},_0x45bf5c={},_0x1e1abf={'count':0x0,'rows':[]};var _0x289422=_[_0xe6bd('0x39')](db['VoiceContext'][_0xe6bd('0x3a')],function(_0x21160b){return{'name':_0x21160b[_0xe6bd('0x3b')],'type':_0x21160b[_0xe6bd('0x3c')][_0xe6bd('0x3d')]};});_0x45bf5c[_0xe6bd('0x3e')]=_['map'](_0x289422,_0xe6bd('0x36'));_0x45bf5c[_0xe6bd('0x3f')]=_[_0xe6bd('0x40')](_0x1b2335[_0xe6bd('0x3f')]);_0x45bf5c[_0xe6bd('0x41')]=_[_0xe6bd('0x42')](_0x45bf5c[_0xe6bd('0x3e')],_0x45bf5c[_0xe6bd('0x3f')]);_0x5f5415[_0xe6bd('0x43')]=_['intersection'](_0x45bf5c[_0xe6bd('0x3e')],qs[_0xe6bd('0x44')](_0x1b2335['query'][_0xe6bd('0x44')]));_0x5f5415[_0xe6bd('0x43')]=_0x5f5415[_0xe6bd('0x43')][_0xe6bd('0x45')]?_0x5f5415['attributes']:_0x45bf5c['model'];if(!_0x1b2335['query'][_0xe6bd('0x46')](_0xe6bd('0x47'))){_0x5f5415[_0xe6bd('0x2b')]=qs[_0xe6bd('0x2b')](_0x1b2335[_0xe6bd('0x3f')]['limit']);_0x5f5415[_0xe6bd('0x2a')]=qs[_0xe6bd('0x2a')](_0x1b2335[_0xe6bd('0x3f')][_0xe6bd('0x2a')]);}_0x5f5415['order']=qs[_0xe6bd('0x48')](_0x1b2335['query'][_0xe6bd('0x48')]);_0x5f5415[_0xe6bd('0x49')]=qs[_0xe6bd('0x41')](_[_0xe6bd('0x4a')](_0x1b2335[_0xe6bd('0x3f')],_0x45bf5c[_0xe6bd('0x41')]),_0x289422);if(_0x1b2335['query'][_0xe6bd('0x4b')]){_0x5f5415['where']=_[_0xe6bd('0x4c')](_0x5f5415[_0xe6bd('0x49')],{'$or':_['map'](_0x289422,function(_0xd1e922){if(_0xd1e922[_0xe6bd('0x3c')]!==_0xe6bd('0x4d')){var _0x4b0b96={};_0x4b0b96[_0xd1e922[_0xe6bd('0x36')]]={'$like':'%'+_0x1b2335[_0xe6bd('0x3f')][_0xe6bd('0x4b')]+'%'};return _0x4b0b96;}})});}_0x5f5415=_[_0xe6bd('0x4c')]({},_0x5f5415,_0x1b2335['options']);var _0x476b99={'where':_0x5f5415[_0xe6bd('0x49')]};return db[_0xe6bd('0x4e')]['count'](_0x476b99)['then'](function(_0x351db1){_0x1e1abf[_0xe6bd('0x2d')]=_0x351db1;if(_0x1b2335['query'][_0xe6bd('0x4f')]){_0x5f5415['include']=[{'all':!![]}];}return db[_0xe6bd('0x4e')]['findAll'](_0x5f5415);})[_0xe6bd('0x1c')](function(_0x85e10b){_0x1e1abf['rows']=_0x85e10b;return _0x1e1abf;})['then'](respondWithFilteredResult(_0x696e0d,_0x5f5415))['catch'](handleError(_0x696e0d,null));};exports['show']=function(_0x14b6e2,_0x1c4eb4){var _0x230fb6={'raw':![],'where':{'id':_0x14b6e2[_0xe6bd('0x50')]['id']}},_0x59f351={};_0x59f351[_0xe6bd('0x3e')]=_['keys'](db[_0xe6bd('0x4e')][_0xe6bd('0x3a')]);_0x59f351[_0xe6bd('0x3f')]=_['keys'](_0x14b6e2['query']);_0x59f351['filters']=_[_0xe6bd('0x42')](_0x59f351['model'],_0x59f351['query']);_0x230fb6[_0xe6bd('0x43')]=_['intersection'](_0x59f351[_0xe6bd('0x3e')],qs[_0xe6bd('0x44')](_0x14b6e2[_0xe6bd('0x3f')][_0xe6bd('0x44')]));_0x230fb6[_0xe6bd('0x43')]=_0x230fb6[_0xe6bd('0x43')][_0xe6bd('0x45')]?_0x230fb6[_0xe6bd('0x43')]:_0x59f351[_0xe6bd('0x3e')];if(_0x14b6e2['query'][_0xe6bd('0x4f')]){_0x230fb6[_0xe6bd('0x51')]=[{'all':!![]}];}_0x230fb6=_[_0xe6bd('0x4c')]({},_0x230fb6,_0x14b6e2[_0xe6bd('0x52')]);return db[_0xe6bd('0x4e')][_0xe6bd('0x53')](_0x230fb6)[_0xe6bd('0x1c')](handleEntityNotFound(_0x1c4eb4,null))[_0xe6bd('0x1c')](respondWithResult(_0x1c4eb4,null))[_0xe6bd('0x25')](handleError(_0x1c4eb4,null));};exports[_0xe6bd('0x54')]=function(_0x3deae1,_0x463b93,_0x11ae18){var _0x193d87;return db[_0xe6bd('0x4e')][_0xe6bd('0x54')](_0x3deae1['body'],{'raw':!![]})['then'](function(_0x509722){_0x193d87=_0x509722;return db[_0xe6bd('0x4e')][_0xe6bd('0x55')]({'raw':!![]});})['then'](function(_0x5c29a4){var _0x133d6a=fs[_0xe6bd('0x56')](path['join'](config[_0xe6bd('0x57')],'server/files/templates/context.ejs'),_0xe6bd('0x58'));var _0x6ac88a=ejs['render'](_0x133d6a,{'contexts':_0x5c29a4||[]});fs['writeFileSync'](_0xe6bd('0x59'),_0x6ac88a);})[_0xe6bd('0x1c')](function(){return respondWithRpcPromise(_0xe6bd('0x5a'),_0xe6bd('0x54'),{'module':_0xe6bd('0x5b')});})['then'](function(){var _0x521fff=_0x3deae1[_0xe6bd('0x5c')][_0xe6bd('0x34')]({'plain':!![]});if(!_0x521fff)throw new Error(_0xe6bd('0x5d'));if(_0x521fff[_0xe6bd('0x5e')]===_0xe6bd('0x5c')){var _0x10ca6b=_0x193d87[_0xe6bd('0x34')]({'plain':!![]});return db['UserProfileSection']['find']({'where':{'name':_0xe6bd('0x5f'),'userProfileId':_0x521fff[_0xe6bd('0x60')]},'raw':!![]})[_0xe6bd('0x1c')](function(_0x246a71){if(_0x246a71&&_0x246a71[_0xe6bd('0x61')]===0x0){return db[_0xe6bd('0x35')]['create']({'name':_0x10ca6b[_0xe6bd('0x36')],'resourceId':_0x10ca6b['id'],'type':_0x246a71['name'],'sectionId':_0x246a71['id']},{})['then'](function(){return _0x193d87;});}else{return _0x193d87;}})['catch'](function(_0x1b0d69){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x1b0d69);throw _0x1b0d69;});}return _0x193d87;})[_0xe6bd('0x1c')](respondWithResult(_0x463b93,0xc9))['catch'](handleError(_0x463b93,null));};exports[_0xe6bd('0x62')]=function(_0x321f58,_0x5ca2ff,_0x1d0eaf){var _0x365714;return db['VoiceContext'][_0xe6bd('0x53')]({'where':{'id':_0x321f58[_0xe6bd('0x50')]['id']}})[_0xe6bd('0x1c')](handleEntityNotFound(_0x5ca2ff,null))[_0xe6bd('0x1c')](saveUpdates(_0x321f58[_0xe6bd('0x63')],null))['then'](function(_0x189d63){if(_0x189d63){_0x365714=_0x189d63;return db[_0xe6bd('0x4e')][_0xe6bd('0x55')]({'raw':!![]});}})[_0xe6bd('0x1c')](function(_0x4321e3){var _0xcb8d30=fs[_0xe6bd('0x56')](path[_0xe6bd('0x64')](config['root'],_0xe6bd('0x65')),'utf8');var _0x2537a9=ejs[_0xe6bd('0x66')](_0xcb8d30,{'contexts':_0x4321e3||[]});fs[_0xe6bd('0x67')](_0xe6bd('0x59'),_0x2537a9);})[_0xe6bd('0x1c')](function(){return respondWithRpcPromise(_0xe6bd('0x5a'),_0xe6bd('0x62'),{'module':_0xe6bd('0x5b')});})[_0xe6bd('0x1c')](function(){return _0x365714;})[_0xe6bd('0x1c')](respondWithResult(_0x5ca2ff,null))['catch'](handleError(_0x5ca2ff,null));};exports[_0xe6bd('0x33')]=function(_0x42c403,_0x1f92f6,_0x27dff2){var _0x1690a4;return db[_0xe6bd('0x4e')][_0xe6bd('0x53')]({'where':{'id':_0x42c403[_0xe6bd('0x50')]['id']}})[_0xe6bd('0x1c')](handleEntityNotFound(_0x1f92f6,null))[_0xe6bd('0x1c')](removeEntity(_0x1f92f6,null))[_0xe6bd('0x1c')](function(){return db[_0xe6bd('0x4e')][_0xe6bd('0x55')]({'raw':!![]});})[_0xe6bd('0x1c')](function(_0x527e5f){var _0x38a7c0=fs[_0xe6bd('0x56')](path['join'](config[_0xe6bd('0x57')],'server/files/templates/context.ejs'),_0xe6bd('0x58'));var _0x5922df=ejs['render'](_0x38a7c0,{'contexts':_0x527e5f});fs['writeFileSync'](_0xe6bd('0x59'),_0x5922df);return respondWithRpcPromise(_0xe6bd('0x5a'),_0xe6bd('0x33'),{'module':'chan_sip.so'});})['catch'](handleError(_0x1f92f6,null));};
\ No newline at end of file
+var _0x846e=['body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','http','then','info','VoiceContext,\x20%s,\x20%s','request\x20sent','debug','VoiceContext,\x20%s,\x20%s,\x20%s','error','message','result','sendStatus','status','end','offset','limit','undefined','count','apply','reject','save','update','get','Contexts','UserProfileResource','destroy','stack','send','map','VoiceContext','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','sort','where','merge','VIRTUAL','filter','includeAll','include','findAll','show','params','options','find','create','readFileSync','join','root','server/files/templates/context.ejs','utf8','render','writeFileSync','/etc/asterisk/extensions_xcally_contexts.conf','Reload','chan_sip.so','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','name','catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s'];(function(_0x233cb1,_0x8ca9a2){var _0x29ee7e=function(_0x20e277){while(--_0x20e277){_0x233cb1['push'](_0x233cb1['shift']());}};_0x29ee7e(++_0x8ca9a2);}(_0x846e,0x1eb));var _0xe846=function(_0x4d12ec,_0x5af936){_0x4d12ec=_0x4d12ec-0x0;var _0xcda1a8=_0x846e[_0x4d12ec];return _0xcda1a8;};'use strict';var emlformat=require(_0xe846('0x0'));var rimraf=require(_0xe846('0x1'));var zipdir=require(_0xe846('0x2'));var jsonpatch=require(_0xe846('0x3'));var rp=require(_0xe846('0x4'));var moment=require(_0xe846('0x5'));var BPromise=require(_0xe846('0x6'));var Mustache=require(_0xe846('0x7'));var util=require(_0xe846('0x8'));var path=require(_0xe846('0x9'));var sox=require(_0xe846('0xa'));var csv=require(_0xe846('0xb'));var ejs=require(_0xe846('0xc'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xe846('0xd'));var crypto=require('crypto');var jsforce=require(_0xe846('0xe'));var deskjs=require(_0xe846('0xf'));var toCsv=require(_0xe846('0xb'));var querystring=require('querystring');var Papa=require(_0xe846('0x10'));var Redis=require(_0xe846('0x11'));var authService=require(_0xe846('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xe846('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xe846('0x14'))(_0xe846('0x15'));var utils=require(_0xe846('0x16'));var config=require(_0xe846('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0xe846('0x18'))['db'];var jayson=require(_0xe846('0x19'));var client=jayson['client'][_0xe846('0x1a')]({'port':0x232a});function respondWithRpcPromise(_0x442492,_0xe8020e,_0x4dfcc8,_0x5d492c){return new BPromise(function(_0x18a727,_0x2e55c5){var _0x39e1ec=_0x5d492c||client;return _0x39e1ec['request'](_0x442492,_0x4dfcc8)[_0xe846('0x1b')](function(_0x18c15d){logger[_0xe846('0x1c')](_0xe846('0x1d'),_0xe8020e,_0xe846('0x1e'));logger[_0xe846('0x1f')](_0xe846('0x20'),_0xe8020e,'request\x20sent',JSON['stringify'](_0x18c15d));if(_0x18c15d['error']){if(_0x18c15d['error']['code']===0x1f4){logger[_0xe846('0x21')]('VoiceContext,\x20%s,\x20%s',_0xe8020e,_0x18c15d[_0xe846('0x21')][_0xe846('0x22')]);return _0x2e55c5(_0x18c15d[_0xe846('0x21')][_0xe846('0x22')]);}logger['error'](_0xe846('0x1d'),_0xe8020e,_0x18c15d[_0xe846('0x21')][_0xe846('0x22')]);return _0x18a727(_0x18c15d[_0xe846('0x21')][_0xe846('0x22')]);}else{logger[_0xe846('0x1c')](_0xe846('0x1d'),_0xe8020e,_0xe846('0x1e'));_0x18a727(_0x18c15d[_0xe846('0x23')][_0xe846('0x22')]);}})['catch'](function(_0x5db390){logger[_0xe846('0x21')](_0xe846('0x1d'),_0xe8020e,_0x5db390);_0x2e55c5(_0x5db390);});});}function respondWithStatusCode(_0x3a1698,_0xa4941c){_0xa4941c=_0xa4941c||0xcc;return function(_0x3c7c0b){if(_0x3c7c0b){return _0x3a1698[_0xe846('0x24')](_0xa4941c);}return _0x3a1698[_0xe846('0x25')](_0xa4941c)[_0xe846('0x26')]();};}function respondWithResult(_0x532c77,_0x6c3d6d){_0x6c3d6d=_0x6c3d6d||0xc8;return function(_0x252ea5){if(_0x252ea5){return _0x532c77[_0xe846('0x25')](_0x6c3d6d)['json'](_0x252ea5);}};}function respondWithFilteredResult(_0xbc563f,_0x5cd110){return function(_0x31375c){if(_0x31375c){var _0xb64659=typeof _0x5cd110[_0xe846('0x27')]==='undefined'&&typeof _0x5cd110[_0xe846('0x28')]===_0xe846('0x29');var _0x40b3b4=_0x31375c[_0xe846('0x2a')];var _0x4ee051=_0xb64659?0x0:_0x5cd110['offset'];var _0x2132d2=_0xb64659?_0x31375c[_0xe846('0x2a')]:_0x5cd110[_0xe846('0x27')]+_0x5cd110[_0xe846('0x28')];var _0x33a4c4;if(_0x2132d2>=_0x40b3b4){_0x2132d2=_0x40b3b4;_0x33a4c4=0xc8;}else{_0x33a4c4=0xce;}_0xbc563f[_0xe846('0x25')](_0x33a4c4);return _0xbc563f['set']('Content-Range',_0x4ee051+'-'+_0x2132d2+'/'+_0x40b3b4)['json'](_0x31375c);}return null;};}function patchUpdates(_0x33ca0f){return function(_0x54668b){try{jsonpatch[_0xe846('0x2b')](_0x54668b,_0x33ca0f,!![]);}catch(_0x138666){return BPromise[_0xe846('0x2c')](_0x138666);}return _0x54668b[_0xe846('0x2d')]();};}function saveUpdates(_0x5579a5,_0x3dee08){return function(_0x3c3cb7){if(_0x3c3cb7){return _0x3c3cb7[_0xe846('0x2e')](_0x5579a5)[_0xe846('0x1b')](function(_0x3b3be3){return _0x3b3be3;});}return null;};}function removeEntity(_0x3208fc,_0x3246ff){return function(_0x2262a8){if(_0x2262a8){return _0x2262a8['destroy']()['then'](function(){var _0x49f383=_0x2262a8[_0xe846('0x2f')]({'plain':!![]});var _0x2ea3e7=_0xe846('0x30');return db[_0xe846('0x31')][_0xe846('0x32')]({'where':{'type':_0x2ea3e7,'resourceId':_0x49f383['id']}})[_0xe846('0x1b')](function(){return _0x2262a8;});})[_0xe846('0x1b')](function(){_0x3208fc[_0xe846('0x25')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3164d7,_0x5dd180){return function(_0x297aab){if(!_0x297aab){_0x3164d7[_0xe846('0x24')](0x194);}return _0x297aab;};}function handleError(_0x454539,_0x24fc3b){_0x24fc3b=_0x24fc3b||0x1f4;return function(_0x59e166){logger[_0xe846('0x21')](_0x59e166[_0xe846('0x33')]);if(_0x59e166['name']){delete _0x59e166['name'];}_0x454539[_0xe846('0x25')](_0x24fc3b)[_0xe846('0x34')](_0x59e166);};}exports['index']=function(_0x25fcc7,_0x2a46a1){var _0x396c9f={},_0x55be00={},_0x354b26={'count':0x0,'rows':[]};var _0x4dc768=_[_0xe846('0x35')](db[_0xe846('0x36')][_0xe846('0x37')],function(_0x2ecf29){return{'name':_0x2ecf29['fieldName'],'type':_0x2ecf29[_0xe846('0x38')][_0xe846('0x39')]};});_0x55be00[_0xe846('0x3a')]=_[_0xe846('0x35')](_0x4dc768,'name');_0x55be00[_0xe846('0x3b')]=_[_0xe846('0x3c')](_0x25fcc7[_0xe846('0x3b')]);_0x55be00[_0xe846('0x3d')]=_[_0xe846('0x3e')](_0x55be00['model'],_0x55be00[_0xe846('0x3b')]);_0x396c9f[_0xe846('0x3f')]=_[_0xe846('0x3e')](_0x55be00[_0xe846('0x3a')],qs[_0xe846('0x40')](_0x25fcc7[_0xe846('0x3b')][_0xe846('0x40')]));_0x396c9f[_0xe846('0x3f')]=_0x396c9f[_0xe846('0x3f')][_0xe846('0x41')]?_0x396c9f[_0xe846('0x3f')]:_0x55be00[_0xe846('0x3a')];if(!_0x25fcc7['query']['hasOwnProperty']('nolimit')){_0x396c9f[_0xe846('0x28')]=qs[_0xe846('0x28')](_0x25fcc7[_0xe846('0x3b')]['limit']);_0x396c9f[_0xe846('0x27')]=qs[_0xe846('0x27')](_0x25fcc7[_0xe846('0x3b')][_0xe846('0x27')]);}_0x396c9f['order']=qs['sort'](_0x25fcc7[_0xe846('0x3b')][_0xe846('0x42')]);_0x396c9f[_0xe846('0x43')]=qs[_0xe846('0x3d')](_['pick'](_0x25fcc7[_0xe846('0x3b')],_0x55be00['filters']),_0x4dc768);if(_0x25fcc7['query']['filter']){_0x396c9f['where']=_[_0xe846('0x44')](_0x396c9f[_0xe846('0x43')],{'$or':_[_0xe846('0x35')](_0x4dc768,function(_0x53155e){if(_0x53155e[_0xe846('0x38')]!==_0xe846('0x45')){var _0x2eaeeb={};_0x2eaeeb[_0x53155e['name']]={'$like':'%'+_0x25fcc7[_0xe846('0x3b')][_0xe846('0x46')]+'%'};return _0x2eaeeb;}})});}_0x396c9f=_['merge']({},_0x396c9f,_0x25fcc7['options']);var _0xde0552={'where':_0x396c9f[_0xe846('0x43')]};return db[_0xe846('0x36')]['count'](_0xde0552)['then'](function(_0xb0db21){_0x354b26['count']=_0xb0db21;if(_0x25fcc7[_0xe846('0x3b')][_0xe846('0x47')]){_0x396c9f[_0xe846('0x48')]=[{'all':!![]}];}return db[_0xe846('0x36')][_0xe846('0x49')](_0x396c9f);})['then'](function(_0x8d2a83){_0x354b26['rows']=_0x8d2a83;return _0x354b26;})[_0xe846('0x1b')](respondWithFilteredResult(_0x2a46a1,_0x396c9f))['catch'](handleError(_0x2a46a1,null));};exports[_0xe846('0x4a')]=function(_0x79a68,_0x28cea7){var _0x59b7df={'raw':![],'where':{'id':_0x79a68[_0xe846('0x4b')]['id']}},_0x45fd19={};_0x45fd19[_0xe846('0x3a')]=_[_0xe846('0x3c')](db[_0xe846('0x36')][_0xe846('0x37')]);_0x45fd19[_0xe846('0x3b')]=_['keys'](_0x79a68[_0xe846('0x3b')]);_0x45fd19[_0xe846('0x3d')]=_[_0xe846('0x3e')](_0x45fd19[_0xe846('0x3a')],_0x45fd19[_0xe846('0x3b')]);_0x59b7df[_0xe846('0x3f')]=_[_0xe846('0x3e')](_0x45fd19[_0xe846('0x3a')],qs['fields'](_0x79a68[_0xe846('0x3b')][_0xe846('0x40')]));_0x59b7df['attributes']=_0x59b7df[_0xe846('0x3f')]['length']?_0x59b7df['attributes']:_0x45fd19[_0xe846('0x3a')];if(_0x79a68['query']['includeAll']){_0x59b7df[_0xe846('0x48')]=[{'all':!![]}];}_0x59b7df=_['merge']({},_0x59b7df,_0x79a68[_0xe846('0x4c')]);return db[_0xe846('0x36')][_0xe846('0x4d')](_0x59b7df)[_0xe846('0x1b')](handleEntityNotFound(_0x28cea7,null))[_0xe846('0x1b')](respondWithResult(_0x28cea7,null))['catch'](handleError(_0x28cea7,null));};exports[_0xe846('0x4e')]=function(_0x98fe73,_0x1da5f1,_0x190b63){var _0x240944;return db[_0xe846('0x36')]['create'](_0x98fe73['body'],{'raw':!![]})[_0xe846('0x1b')](function(_0x1e57c1){_0x240944=_0x1e57c1;return db[_0xe846('0x36')]['findAll']({'raw':!![]});})[_0xe846('0x1b')](function(_0x380110){var _0x2ab3a5=fs[_0xe846('0x4f')](path[_0xe846('0x50')](config[_0xe846('0x51')],_0xe846('0x52')),_0xe846('0x53'));var _0x16a157=ejs[_0xe846('0x54')](_0x2ab3a5,{'contexts':_0x380110||[]});fs[_0xe846('0x55')](_0xe846('0x56'),_0x16a157);})[_0xe846('0x1b')](function(){return respondWithRpcPromise(_0xe846('0x57'),_0xe846('0x4e'),{'module':_0xe846('0x58')});})['then'](function(){var _0x329589=_0x98fe73[_0xe846('0x59')]['get']({'plain':!![]});if(!_0x329589)throw new Error(_0xe846('0x5a'));if(_0x329589[_0xe846('0x5b')]===_0xe846('0x59')){var _0x4ca731=_0x240944[_0xe846('0x2f')]({'plain':!![]});return db[_0xe846('0x5c')][_0xe846('0x4d')]({'where':{'name':_0xe846('0x30'),'userProfileId':_0x329589[_0xe846('0x5d')]},'raw':!![]})['then'](function(_0xc0bd07){if(_0xc0bd07&&_0xc0bd07['autoAssociation']===0x0){return db['UserProfileResource'][_0xe846('0x4e')]({'name':_0x4ca731[_0xe846('0x5e')],'resourceId':_0x4ca731['id'],'type':_0xc0bd07[_0xe846('0x5e')],'sectionId':_0xc0bd07['id']},{})['then'](function(){return _0x240944;});}else{return _0x240944;}})[_0xe846('0x5f')](function(_0x78b5e1){logger[_0xe846('0x21')](_0xe846('0x60'),_0x78b5e1);throw _0x78b5e1;});}return _0x240944;})[_0xe846('0x1b')](respondWithResult(_0x1da5f1,0xc9))['catch'](handleError(_0x1da5f1,null));};exports[_0xe846('0x2e')]=function(_0x339be5,_0x305698,_0x1b6041){var _0x520130;return db[_0xe846('0x36')][_0xe846('0x4d')]({'where':{'id':_0x339be5[_0xe846('0x4b')]['id']}})[_0xe846('0x1b')](handleEntityNotFound(_0x305698,null))[_0xe846('0x1b')](saveUpdates(_0x339be5[_0xe846('0x61')],null))[_0xe846('0x1b')](function(_0x358c0c){if(_0x358c0c){_0x520130=_0x358c0c;return db['VoiceContext']['findAll']({'raw':!![]});}})[_0xe846('0x1b')](function(_0x3e20dd){var _0x3737f7=fs[_0xe846('0x4f')](path[_0xe846('0x50')](config[_0xe846('0x51')],'server/files/templates/context.ejs'),_0xe846('0x53'));var _0x4378c9=ejs[_0xe846('0x54')](_0x3737f7,{'contexts':_0x3e20dd||[]});fs['writeFileSync'](_0xe846('0x56'),_0x4378c9);})[_0xe846('0x1b')](function(){return respondWithRpcPromise('Reload',_0xe846('0x2e'),{'module':_0xe846('0x58')});})['then'](function(){return _0x520130;})[_0xe846('0x1b')](respondWithResult(_0x305698,null))['catch'](handleError(_0x305698,null));};exports[_0xe846('0x32')]=function(_0x3bd162,_0x256967,_0x1eb366){var _0x5a085a;return db[_0xe846('0x36')][_0xe846('0x4d')]({'where':{'id':_0x3bd162[_0xe846('0x4b')]['id']}})[_0xe846('0x1b')](handleEntityNotFound(_0x256967,null))['then'](removeEntity(_0x256967,null))[_0xe846('0x1b')](function(){return db[_0xe846('0x36')][_0xe846('0x49')]({'raw':!![]});})[_0xe846('0x1b')](function(_0x53abd7){var _0x5af0a8=fs[_0xe846('0x4f')](path['join'](config[_0xe846('0x51')],_0xe846('0x52')),_0xe846('0x53'));var _0xb41030=ejs[_0xe846('0x54')](_0x5af0a8,{'contexts':_0x53abd7});fs[_0xe846('0x55')]('/etc/asterisk/extensions_xcally_contexts.conf',_0xb41030);return respondWithRpcPromise('Reload','destroy',{'module':'chan_sip.so'});})[_0xe846('0x5f')](handleError(_0x256967,null));};
\ No newline at end of file
index 94c8af2..d1e352b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x37a7=['path','rimraf','../../config/environment','./voiceContext.attributes','exports','define','VoiceContext','lodash','util','moment','bluebird','request-promise'];(function(_0x2235bf,_0x3a06a7){var _0x4c3a64=function(_0x3b3bb6){while(--_0x3b3bb6){_0x2235bf['push'](_0x2235bf['shift']());}};_0x4c3a64(++_0x3a06a7);}(_0x37a7,0x73));var _0x737a=function(_0x2f28bb,_0x578d3e){_0x2f28bb=_0x2f28bb-0x0;var _0x43a4ed=_0x37a7[_0x2f28bb];return _0x43a4ed;};'use strict';var _=require(_0x737a('0x0'));var util=require(_0x737a('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x737a('0x2'));var BPromise=require(_0x737a('0x3'));var rp=require(_0x737a('0x4'));var fs=require('fs');var path=require(_0x737a('0x5'));var rimraf=require(_0x737a('0x6'));var config=require(_0x737a('0x7'));var attributes=require(_0x737a('0x8'));module[_0x737a('0x9')]=function(_0x4b5a14,_0x5746b4){return _0x4b5a14[_0x737a('0xa')](_0x737a('0xb'),attributes,{'tableName':'voice_contexts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x71d5=['./voiceContext.attributes','exports','define','VoiceContext','voice_contexts','lodash','util','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x55f8b4,_0x43f30d){var _0x2475f9=function(_0xdd6f4a){while(--_0xdd6f4a){_0x55f8b4['push'](_0x55f8b4['shift']());}};_0x2475f9(++_0x43f30d);}(_0x71d5,0x109));var _0x571d=function(_0x31ffbf,_0x3a8aad){_0x31ffbf=_0x31ffbf-0x0;var _0x536035=_0x71d5[_0x31ffbf];return _0x536035;};'use strict';var _=require(_0x571d('0x0'));var util=require(_0x571d('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x571d('0x2'));var BPromise=require(_0x571d('0x3'));var rp=require(_0x571d('0x4'));var fs=require('fs');var path=require(_0x571d('0x5'));var rimraf=require(_0x571d('0x6'));var config=require(_0x571d('0x7'));var attributes=require(_0x571d('0x8'));module[_0x571d('0x9')]=function(_0xee95c4,_0x562de5){return _0xee95c4[_0x571d('0xa')](_0x571d('0xb'),attributes,{'tableName':_0x571d('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 3a5e7bd..55d7582 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x063e=['debug','VoiceContext,\x20%s,\x20%s,\x20%s','stringify','error','code','VoiceContext,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','request','then','request\x20sent'];(function(_0x1b2ff7,_0x12a034){var _0x31656a=function(_0x1165a5){while(--_0x1165a5){_0x1b2ff7['push'](_0x1b2ff7['shift']());}};_0x31656a(++_0x12a034);}(_0x063e,0x111));var _0xe063=function(_0x36c5b0,_0x5001da){_0x36c5b0=_0x36c5b0-0x0;var _0xf19333=_0x063e[_0x36c5b0];return _0xf19333;};'use strict';var _=require(_0xe063('0x0'));var util=require(_0xe063('0x1'));var moment=require(_0xe063('0x2'));var BPromise=require(_0xe063('0x3'));var rs=require(_0xe063('0x4'));var fs=require('fs');var Redis=require(_0xe063('0x5'));var db=require(_0xe063('0x6'))['db'];var utils=require(_0xe063('0x7'));var logger=require(_0xe063('0x8'))(_0xe063('0x9'));var config=require(_0xe063('0xa'));var jayson=require(_0xe063('0xb'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x561d7b,_0x3a046c,_0x661f34){return new BPromise(function(_0x1c48ea,_0x5b10ce){return client[_0xe063('0xc')](_0x561d7b,_0x661f34)[_0xe063('0xd')](function(_0x4bb52b){logger['info']('VoiceContext,\x20%s,\x20%s',_0x3a046c,_0xe063('0xe'));logger[_0xe063('0xf')](_0xe063('0x10'),_0x3a046c,'request\x20sent',JSON[_0xe063('0x11')](_0x4bb52b));if(_0x4bb52b[_0xe063('0x12')]){if(_0x4bb52b[_0xe063('0x12')][_0xe063('0x13')]===0x1f4){logger[_0xe063('0x12')](_0xe063('0x14'),_0x3a046c,_0x4bb52b[_0xe063('0x12')][_0xe063('0x15')]);return _0x5b10ce(_0x4bb52b[_0xe063('0x12')][_0xe063('0x15')]);}logger[_0xe063('0x12')](_0xe063('0x14'),_0x3a046c,_0x4bb52b['error']['message']);return _0x1c48ea(_0x4bb52b['error'][_0xe063('0x15')]);}else{logger['info'](_0xe063('0x14'),_0x3a046c,_0xe063('0xe'));_0x1c48ea(_0x4bb52b[_0xe063('0x16')][_0xe063('0x15')]);}})[_0xe063('0x17')](function(_0x29f4ae){logger[_0xe063('0x12')](_0xe063('0x14'),_0x3a046c,_0x29f4ae);_0x5b10ce(_0x29f4ae);});});}
\ No newline at end of file
+var _0x622f=['info','VoiceContext,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','http','then'];(function(_0x468b0f,_0x408566){var _0x3e74d9=function(_0x27a545){while(--_0x27a545){_0x468b0f['push'](_0x468b0f['shift']());}};_0x3e74d9(++_0x408566);}(_0x622f,0x172));var _0xf622=function(_0x1b1e90,_0x1d2cde){_0x1b1e90=_0x1b1e90-0x0;var _0x401173=_0x622f[_0x1b1e90];return _0x401173;};'use strict';var _=require(_0xf622('0x0'));var util=require(_0xf622('0x1'));var moment=require('moment');var BPromise=require(_0xf622('0x2'));var rs=require(_0xf622('0x3'));var fs=require('fs');var Redis=require(_0xf622('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xf622('0x5'));var logger=require('../../config/logger')(_0xf622('0x6'));var config=require(_0xf622('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0xf622('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x847984,_0x540b19,_0x4211d8){return new BPromise(function(_0x8b4fab,_0x54a7bc){return client['request'](_0x847984,_0x4211d8)[_0xf622('0x9')](function(_0x54f10a){logger[_0xf622('0xa')](_0xf622('0xb'),_0x540b19,_0xf622('0xc'));logger[_0xf622('0xd')]('VoiceContext,\x20%s,\x20%s,\x20%s',_0x540b19,_0xf622('0xc'),JSON[_0xf622('0xe')](_0x54f10a));if(_0x54f10a[_0xf622('0xf')]){if(_0x54f10a[_0xf622('0xf')]['code']===0x1f4){logger[_0xf622('0xf')](_0xf622('0xb'),_0x540b19,_0x54f10a[_0xf622('0xf')]['message']);return _0x54a7bc(_0x54f10a[_0xf622('0xf')][_0xf622('0x10')]);}logger[_0xf622('0xf')](_0xf622('0xb'),_0x540b19,_0x54f10a[_0xf622('0xf')][_0xf622('0x10')]);return _0x8b4fab(_0x54f10a['error'][_0xf622('0x10')]);}else{logger['info'](_0xf622('0xb'),_0x540b19,'request\x20sent');_0x8b4fab(_0x54f10a[_0xf622('0x11')][_0xf622('0x10')]);}})[_0xf622('0x12')](function(_0x52c66f){logger[_0xf622('0xf')](_0xf622('0xb'),_0x540b19,_0x52c66f);_0x54a7bc(_0x52c66f);});});}
\ No newline at end of file
index f65bf4d..a51589e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8f1d=['../../components/auth/service','../../config/environment','./voiceDialReport.controller','get','isAuthenticated','/describe','describe','show','post','create','put','/:id','delete','destroy','multer','util','connect-timeout','express','Router','fs-extra'];(function(_0xf1568d,_0x17582b){var _0x5541b2=function(_0x4ffb3c){while(--_0x4ffb3c){_0xf1568d['push'](_0xf1568d['shift']());}};_0x5541b2(++_0x17582b);}(_0x8f1d,0x72));var _0xd8f1=function(_0x4474c2,_0x59cf02){_0x4474c2=_0x4474c2-0x0;var _0x435fbb=_0x8f1d[_0x4474c2];return _0x435fbb;};'use strict';var multer=require(_0xd8f1('0x0'));var util=require(_0xd8f1('0x1'));var path=require('path');var timeout=require(_0xd8f1('0x2'));var express=require(_0xd8f1('0x3'));var router=express[_0xd8f1('0x4')]();var fs_extra=require(_0xd8f1('0x5'));var auth=require(_0xd8f1('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xd8f1('0x7'));var controller=require(_0xd8f1('0x8'));router[_0xd8f1('0x9')]('/',auth[_0xd8f1('0xa')](),controller['index']);router[_0xd8f1('0x9')](_0xd8f1('0xb'),auth[_0xd8f1('0xa')](),controller[_0xd8f1('0xc')]);router[_0xd8f1('0x9')]('/:id',auth[_0xd8f1('0xa')](),controller[_0xd8f1('0xd')]);router[_0xd8f1('0xe')]('/',auth[_0xd8f1('0xa')](),controller[_0xd8f1('0xf')]);router[_0xd8f1('0x10')](_0xd8f1('0x11'),auth[_0xd8f1('0xa')](),controller['update']);router[_0xd8f1('0x12')]('/:id',auth[_0xd8f1('0xa')](),controller[_0xd8f1('0x13')]);module['exports']=router;
\ No newline at end of file
+var _0xfbf0=['Router','fs-extra','../../components/interaction/service','./voiceDialReport.controller','isAuthenticated','index','/describe','describe','get','/:id','show','post','create','delete','destroy','util','path'];(function(_0x2ee700,_0x2ac643){var _0x123a9d=function(_0x28ab7e){while(--_0x28ab7e){_0x2ee700['push'](_0x2ee700['shift']());}};_0x123a9d(++_0x2ac643);}(_0xfbf0,0x141));var _0x0fbf=function(_0x58afd5,_0x534a48){_0x58afd5=_0x58afd5-0x0;var _0x3e503b=_0xfbf0[_0x58afd5];return _0x3e503b;};'use strict';var multer=require('multer');var util=require(_0x0fbf('0x0'));var path=require(_0x0fbf('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0fbf('0x2')]();var fs_extra=require(_0x0fbf('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0x0fbf('0x4'));var config=require('../../config/environment');var controller=require(_0x0fbf('0x5'));router['get']('/',auth[_0x0fbf('0x6')](),controller[_0x0fbf('0x7')]);router['get'](_0x0fbf('0x8'),auth[_0x0fbf('0x6')](),controller[_0x0fbf('0x9')]);router[_0x0fbf('0xa')](_0x0fbf('0xb'),auth[_0x0fbf('0x6')](),controller[_0x0fbf('0xc')]);router[_0x0fbf('0xd')]('/',auth[_0x0fbf('0x6')](),controller[_0x0fbf('0xe')]);router['put'](_0x0fbf('0xb'),auth['isAuthenticated'](),controller['update']);router[_0x0fbf('0xf')](_0x0fbf('0xb'),auth[_0x0fbf('0x6')](),controller[_0x0fbf('0x10')]);module['exports']=router;
\ No newline at end of file
index e26d2f0..e8a65de 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x55ca=['exports','STRING','INTEGER','DATE','sequelize'];(function(_0x3dc785,_0x5bd728){var _0x345e94=function(_0x54ffcb){while(--_0x54ffcb){_0x3dc785['push'](_0x3dc785['shift']());}};_0x345e94(++_0x5bd728);}(_0x55ca,0x126));var _0xa55c=function(_0x51f4fc,_0x1fe3ef){_0x51f4fc=_0x51f4fc-0x0;var _0x4d96fc=_0x55ca[_0x51f4fc];return _0x4d96fc;};'use strict';var Sequelize=require(_0xa55c('0x0'));module[_0xa55c('0x1')]={'privilege':{'type':Sequelize['STRING']},'channel':{'type':Sequelize['STRING']},'channelstate':{'type':Sequelize['INTEGER']},'channelstatedesc':{'type':Sequelize[_0xa55c('0x2')]},'calleridnum':{'type':Sequelize[_0xa55c('0x2')]},'calleridname':{'type':Sequelize['STRING']},'connectedlinenum':{'type':Sequelize[_0xa55c('0x2')]},'connectedlinename':{'type':Sequelize[_0xa55c('0x2')]},'language':{'type':Sequelize[_0xa55c('0x2')]},'accountcode':{'type':Sequelize[_0xa55c('0x2')]},'context':{'type':Sequelize[_0xa55c('0x2')]},'exten':{'type':Sequelize[_0xa55c('0x2')]},'priority':{'type':Sequelize[_0xa55c('0x3')]},'uniqueid':{'type':Sequelize['STRING']},'linkedid':{'type':Sequelize[_0xa55c('0x2')]},'destchannel':{'type':Sequelize[_0xa55c('0x2')]},'destchannelstate':{'type':Sequelize['INTEGER']},'destchannelstatedesc':{'type':Sequelize[_0xa55c('0x2')]},'destcalleridnum':{'type':Sequelize[_0xa55c('0x2')]},'destcalleridname':{'type':Sequelize['STRING']},'destconnectedlinenum':{'type':Sequelize['STRING']},'destconnectedlinename':{'type':Sequelize[_0xa55c('0x2')]},'destlanguage':{'type':Sequelize[_0xa55c('0x2')]},'destaccountcode':{'type':Sequelize[_0xa55c('0x2')]},'destcontext':{'type':Sequelize[_0xa55c('0x2')]},'destexten':{'type':Sequelize[_0xa55c('0x2')]},'destpriority':{'type':Sequelize[_0xa55c('0x3')]},'destuniqueid':{'type':Sequelize[_0xa55c('0x2')]},'destlinkedid':{'type':Sequelize[_0xa55c('0x2')]},'dialstring':{'type':Sequelize[_0xa55c('0x2')]},'dialstatus':{'type':Sequelize[_0xa55c('0x2')]},'starttime':{'type':Sequelize['DATE']},'answertime':{'type':Sequelize['DATE']},'endtime':{'type':Sequelize[_0xa55c('0x4')]},'lastevent':{'type':Sequelize['STRING'],'comment':'called,connect,complete'},'routeId':{'type':Sequelize['INTEGER']},'duration':{'type':Sequelize[_0xa55c('0x3')]},'holdtime':{'type':Sequelize[_0xa55c('0x3')]},'billableseconds':{'type':Sequelize[_0xa55c('0x3')]}};
\ No newline at end of file
+var _0x3e74=['DATE','sequelize','STRING','INTEGER'];(function(_0x465a0c,_0x19d4d5){var _0x1e202e=function(_0x27bd8a){while(--_0x27bd8a){_0x465a0c['push'](_0x465a0c['shift']());}};_0x1e202e(++_0x19d4d5);}(_0x3e74,0x175));var _0x43e7=function(_0x543bcb,_0x221c9c){_0x543bcb=_0x543bcb-0x0;var _0x3b4a76=_0x3e74[_0x543bcb];return _0x3b4a76;};'use strict';var Sequelize=require(_0x43e7('0x0'));module['exports']={'privilege':{'type':Sequelize[_0x43e7('0x1')]},'channel':{'type':Sequelize[_0x43e7('0x1')]},'channelstate':{'type':Sequelize[_0x43e7('0x2')]},'channelstatedesc':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x43e7('0x1')]},'connectedlinenum':{'type':Sequelize['STRING']},'connectedlinename':{'type':Sequelize[_0x43e7('0x1')]},'language':{'type':Sequelize[_0x43e7('0x1')]},'accountcode':{'type':Sequelize[_0x43e7('0x1')]},'context':{'type':Sequelize[_0x43e7('0x1')]},'exten':{'type':Sequelize[_0x43e7('0x1')]},'priority':{'type':Sequelize['INTEGER']},'uniqueid':{'type':Sequelize[_0x43e7('0x1')]},'linkedid':{'type':Sequelize[_0x43e7('0x1')]},'destchannel':{'type':Sequelize[_0x43e7('0x1')]},'destchannelstate':{'type':Sequelize[_0x43e7('0x2')]},'destchannelstatedesc':{'type':Sequelize[_0x43e7('0x1')]},'destcalleridnum':{'type':Sequelize['STRING']},'destcalleridname':{'type':Sequelize[_0x43e7('0x1')]},'destconnectedlinenum':{'type':Sequelize['STRING']},'destconnectedlinename':{'type':Sequelize['STRING']},'destlanguage':{'type':Sequelize[_0x43e7('0x1')]},'destaccountcode':{'type':Sequelize[_0x43e7('0x1')]},'destcontext':{'type':Sequelize['STRING']},'destexten':{'type':Sequelize[_0x43e7('0x1')]},'destpriority':{'type':Sequelize['INTEGER']},'destuniqueid':{'type':Sequelize[_0x43e7('0x1')]},'destlinkedid':{'type':Sequelize[_0x43e7('0x1')]},'dialstring':{'type':Sequelize['STRING']},'dialstatus':{'type':Sequelize[_0x43e7('0x1')]},'starttime':{'type':Sequelize[_0x43e7('0x3')]},'answertime':{'type':Sequelize[_0x43e7('0x3')]},'endtime':{'type':Sequelize[_0x43e7('0x3')]},'lastevent':{'type':Sequelize['STRING'],'comment':'called,connect,complete'},'routeId':{'type':Sequelize[_0x43e7('0x2')]},'duration':{'type':Sequelize[_0x43e7('0x2')]},'holdtime':{'type':Sequelize[_0x43e7('0x2')]},'billableseconds':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
index 8adcf4e..845df60 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9239=['../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','json','offset','limit','undefined','count','set','Content-Range','apply','reject','save','update','then','destroy','end','name','send','map','VoiceDialReport','rawAttributes','fieldName','key','model','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','sort','where','filters','merge','type','VIRTUAL','filter','includeAll','include','findAll','catch','show','length','options','find','create','body','params','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','ejs','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger'];(function(_0x33975c,_0x50d085){var _0x1c15ab=function(_0x54e8bc){while(--_0x54e8bc){_0x33975c['push'](_0x33975c['shift']());}};_0x1c15ab(++_0x50d085);}(_0x9239,0x1f1));var _0x9923=function(_0x43c699,_0x1a6c31){_0x43c699=_0x43c699-0x0;var _0x3edace=_0x9239[_0x43c699];return _0x3edace;};'use strict';var emlformat=require(_0x9923('0x0'));var rimraf=require(_0x9923('0x1'));var zipdir=require(_0x9923('0x2'));var jsonpatch=require(_0x9923('0x3'));var rp=require(_0x9923('0x4'));var moment=require(_0x9923('0x5'));var BPromise=require(_0x9923('0x6'));var Mustache=require(_0x9923('0x7'));var util=require(_0x9923('0x8'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x9923('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x9923('0xa'));var squel=require(_0x9923('0xb'));var crypto=require('crypto');var jsforce=require(_0x9923('0xc'));var deskjs=require(_0x9923('0xd'));var toCsv=require('to-csv');var querystring=require(_0x9923('0xe'));var Papa=require(_0x9923('0xf'));var Redis=require(_0x9923('0x10'));var authService=require(_0x9923('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x9923('0x12'));var hardwareService=require(_0x9923('0x13'));var logger=require(_0x9923('0x14'))('api');var utils=require(_0x9923('0x15'));var config=require(_0x9923('0x16'));var licenseUtil=require(_0x9923('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x548a09,_0x43004b){_0x43004b=_0x43004b||0xcc;return function(_0x57cbc5){if(_0x57cbc5){return _0x548a09[_0x9923('0x18')](_0x43004b);}return _0x548a09[_0x9923('0x19')](_0x43004b)['end']();};}function respondWithResult(_0x2c06d9,_0x204a8b){_0x204a8b=_0x204a8b||0xc8;return function(_0xc9e196){if(_0xc9e196){return _0x2c06d9['status'](_0x204a8b)[_0x9923('0x1a')](_0xc9e196);}};}function respondWithFilteredResult(_0x56ccfa,_0x4f2d78){return function(_0x5e0b94){if(_0x5e0b94){var _0x33d4b=typeof _0x4f2d78[_0x9923('0x1b')]==='undefined'&&typeof _0x4f2d78[_0x9923('0x1c')]===_0x9923('0x1d');var _0x2d0828=_0x5e0b94['count'];var _0x114880=_0x33d4b?0x0:_0x4f2d78[_0x9923('0x1b')];var _0x5991c9=_0x33d4b?_0x5e0b94[_0x9923('0x1e')]:_0x4f2d78[_0x9923('0x1b')]+_0x4f2d78[_0x9923('0x1c')];var _0x502804;if(_0x5991c9>=_0x2d0828){_0x5991c9=_0x2d0828;_0x502804=0xc8;}else{_0x502804=0xce;}_0x56ccfa['status'](_0x502804);return _0x56ccfa[_0x9923('0x1f')](_0x9923('0x20'),_0x114880+'-'+_0x5991c9+'/'+_0x2d0828)['json'](_0x5e0b94);}return null;};}function patchUpdates(_0x52ebfc){return function(_0x11741d){try{jsonpatch[_0x9923('0x21')](_0x11741d,_0x52ebfc,!![]);}catch(_0x31d460){return BPromise[_0x9923('0x22')](_0x31d460);}return _0x11741d[_0x9923('0x23')]();};}function saveUpdates(_0x67ebd9,_0x341b72){return function(_0xb73d4){if(_0xb73d4){return _0xb73d4[_0x9923('0x24')](_0x67ebd9)[_0x9923('0x25')](function(_0x1ada42){return _0x1ada42;});}return null;};}function removeEntity(_0x313fd4,_0x2a65f1){return function(_0xc14a82){if(_0xc14a82){return _0xc14a82[_0x9923('0x26')]()[_0x9923('0x25')](function(){_0x313fd4[_0x9923('0x19')](0xcc)[_0x9923('0x27')]();});}};}function handleEntityNotFound(_0x2b6929,_0x1279c4){return function(_0x30f112){if(!_0x30f112){_0x2b6929[_0x9923('0x18')](0x194);}return _0x30f112;};}function handleError(_0x56a254,_0xf8fed5){_0xf8fed5=_0xf8fed5||0x1f4;return function(_0x12466a){logger['error'](_0x12466a['stack']);if(_0x12466a[_0x9923('0x28')]){delete _0x12466a[_0x9923('0x28')];}_0x56a254[_0x9923('0x19')](_0xf8fed5)[_0x9923('0x29')](_0x12466a);};}exports['index']=function(_0x570d0c,_0x5c5e91){var _0x28ee8a={},_0x3cbedf={},_0x4f62da={'count':0x0,'rows':[]};var _0x4af159=_[_0x9923('0x2a')](db[_0x9923('0x2b')][_0x9923('0x2c')],function(_0x527d69){return{'name':_0x527d69[_0x9923('0x2d')],'type':_0x527d69['type'][_0x9923('0x2e')]};});_0x3cbedf[_0x9923('0x2f')]=_[_0x9923('0x2a')](_0x4af159,_0x9923('0x28'));_0x3cbedf[_0x9923('0x30')]=_[_0x9923('0x31')](_0x570d0c[_0x9923('0x30')]);_0x3cbedf['filters']=_[_0x9923('0x32')](_0x3cbedf[_0x9923('0x2f')],_0x3cbedf['query']);_0x28ee8a[_0x9923('0x33')]=_['intersection'](_0x3cbedf[_0x9923('0x2f')],qs[_0x9923('0x34')](_0x570d0c['query'][_0x9923('0x34')]));_0x28ee8a['attributes']=_0x28ee8a[_0x9923('0x33')]['length']?_0x28ee8a[_0x9923('0x33')]:_0x3cbedf[_0x9923('0x2f')];if(!_0x570d0c[_0x9923('0x30')][_0x9923('0x35')](_0x9923('0x36'))){_0x28ee8a['limit']=qs[_0x9923('0x1c')](_0x570d0c[_0x9923('0x30')][_0x9923('0x1c')]);_0x28ee8a[_0x9923('0x1b')]=qs[_0x9923('0x1b')](_0x570d0c[_0x9923('0x30')][_0x9923('0x1b')]);}_0x28ee8a['order']=qs[_0x9923('0x37')](_0x570d0c[_0x9923('0x30')][_0x9923('0x37')]);_0x28ee8a[_0x9923('0x38')]=qs[_0x9923('0x39')](_['pick'](_0x570d0c['query'],_0x3cbedf[_0x9923('0x39')]),_0x4af159);if(_0x570d0c[_0x9923('0x30')]['filter']){_0x28ee8a['where']=_[_0x9923('0x3a')](_0x28ee8a[_0x9923('0x38')],{'$or':_['map'](_0x4af159,function(_0x451b0e){if(_0x451b0e[_0x9923('0x3b')]!==_0x9923('0x3c')){var _0x291e51={};_0x291e51[_0x451b0e['name']]={'$like':'%'+_0x570d0c[_0x9923('0x30')][_0x9923('0x3d')]+'%'};return _0x291e51;}})});}_0x28ee8a=_['merge']({},_0x28ee8a,_0x570d0c['options']);var _0x43e08d={'where':_0x28ee8a[_0x9923('0x38')]};return db[_0x9923('0x2b')][_0x9923('0x1e')](_0x43e08d)[_0x9923('0x25')](function(_0x594f38){_0x4f62da[_0x9923('0x1e')]=_0x594f38;if(_0x570d0c[_0x9923('0x30')][_0x9923('0x3e')]){_0x28ee8a[_0x9923('0x3f')]=[{'all':!![]}];}return db['VoiceDialReport'][_0x9923('0x40')](_0x28ee8a);})['then'](function(_0x4ce5af){_0x4f62da['rows']=_0x4ce5af;return _0x4f62da;})['then'](respondWithFilteredResult(_0x5c5e91,_0x28ee8a))[_0x9923('0x41')](handleError(_0x5c5e91,null));};exports[_0x9923('0x42')]=function(_0x474877,_0x31d7bc){var _0x5e0b58={'raw':!![],'where':{'id':_0x474877['params']['id']}},_0x38ea73={};_0x38ea73[_0x9923('0x2f')]=_['keys'](db['VoiceDialReport'][_0x9923('0x2c')]);_0x38ea73[_0x9923('0x30')]=_[_0x9923('0x31')](_0x474877[_0x9923('0x30')]);_0x38ea73[_0x9923('0x39')]=_[_0x9923('0x32')](_0x38ea73['model'],_0x38ea73[_0x9923('0x30')]);_0x5e0b58['attributes']=_[_0x9923('0x32')](_0x38ea73['model'],qs['fields'](_0x474877['query'][_0x9923('0x34')]));_0x5e0b58[_0x9923('0x33')]=_0x5e0b58['attributes'][_0x9923('0x43')]?_0x5e0b58[_0x9923('0x33')]:_0x38ea73['model'];if(_0x474877[_0x9923('0x30')][_0x9923('0x3e')]){_0x5e0b58['include']=[{'all':!![]}];}_0x5e0b58=_[_0x9923('0x3a')]({},_0x5e0b58,_0x474877[_0x9923('0x44')]);return db['VoiceDialReport'][_0x9923('0x45')](_0x5e0b58)[_0x9923('0x25')](handleEntityNotFound(_0x31d7bc,null))['then'](respondWithResult(_0x31d7bc,null))[_0x9923('0x41')](handleError(_0x31d7bc,null));};exports[_0x9923('0x46')]=function(_0x33a655,_0x203cc1){return db[_0x9923('0x2b')]['create'](_0x33a655[_0x9923('0x47')],{})['then'](respondWithResult(_0x203cc1,0xc9))['catch'](handleError(_0x203cc1,null));};exports[_0x9923('0x24')]=function(_0x1fb988,_0x57ae07){if(_0x1fb988[_0x9923('0x47')]['id']){delete _0x1fb988[_0x9923('0x47')]['id'];}return db[_0x9923('0x2b')][_0x9923('0x45')]({'where':{'id':_0x1fb988[_0x9923('0x48')]['id']}})[_0x9923('0x25')](handleEntityNotFound(_0x57ae07,null))[_0x9923('0x25')](saveUpdates(_0x1fb988[_0x9923('0x47')],null))[_0x9923('0x25')](respondWithResult(_0x57ae07,null))[_0x9923('0x41')](handleError(_0x57ae07,null));};exports[_0x9923('0x26')]=function(_0x477aea,_0x27bfe0){return db['VoiceDialReport'][_0x9923('0x45')]({'where':{'id':_0x477aea['params']['id']}})[_0x9923('0x25')](handleEntityNotFound(_0x27bfe0,null))[_0x9923('0x25')](removeEntity(_0x27bfe0,null))[_0x9923('0x41')](handleError(_0x27bfe0,null));};exports[_0x9923('0x49')]=function(_0xc920b6,_0x42f582){return db[_0x9923('0x2b')][_0x9923('0x49')]()[_0x9923('0x25')](respondWithResult(_0x42f582,null))[_0x9923('0x41')](handleError(_0x42f582,null));};
\ No newline at end of file
+var _0xde22=['update','destroy','sendStatus','error','stack','name','send','index','map','VoiceDialReport','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','filters','pick','where','merge','VIRTUAL','filter','then','includeAll','include','rows','catch','show','params','rawAttributes','find','create','body','describe','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','status','end','json','offset','undefined','limit','count','set','apply','reject','save'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xde22,0x113));var _0x2de2=function(_0x385e1b,_0x4ddc71){_0x385e1b=_0x385e1b-0x0;var _0x27f144=_0xde22[_0x385e1b];return _0x27f144;};'use strict';var emlformat=require(_0x2de2('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x2de2('0x1'));var jsonpatch=require(_0x2de2('0x2'));var rp=require(_0x2de2('0x3'));var moment=require(_0x2de2('0x4'));var BPromise=require(_0x2de2('0x5'));var Mustache=require(_0x2de2('0x6'));var util=require(_0x2de2('0x7'));var path=require(_0x2de2('0x8'));var sox=require(_0x2de2('0x9'));var csv=require(_0x2de2('0xa'));var ejs=require(_0x2de2('0xb'));var fs=require('fs');var fs_extra=require(_0x2de2('0xc'));var _=require('lodash');var squel=require(_0x2de2('0xd'));var crypto=require(_0x2de2('0xe'));var jsforce=require(_0x2de2('0xf'));var deskjs=require(_0x2de2('0x10'));var toCsv=require('to-csv');var querystring=require(_0x2de2('0x11'));var Papa=require(_0x2de2('0x12'));var Redis=require('ioredis');var authService=require(_0x2de2('0x13'));var qs=require(_0x2de2('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x2de2('0x15'));var logger=require(_0x2de2('0x16'))(_0x2de2('0x17'));var utils=require('../../config/utils');var config=require(_0x2de2('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0x2de2('0x19'))['db'];function respondWithStatusCode(_0x15dfca,_0x18e6d3){_0x18e6d3=_0x18e6d3||0xcc;return function(_0x36cfdb){if(_0x36cfdb){return _0x15dfca['sendStatus'](_0x18e6d3);}return _0x15dfca[_0x2de2('0x1a')](_0x18e6d3)[_0x2de2('0x1b')]();};}function respondWithResult(_0x2920b8,_0x367165){_0x367165=_0x367165||0xc8;return function(_0x5b563e){if(_0x5b563e){return _0x2920b8[_0x2de2('0x1a')](_0x367165)[_0x2de2('0x1c')](_0x5b563e);}};}function respondWithFilteredResult(_0xa9a680,_0x3227c8){return function(_0x4f5467){if(_0x4f5467){var _0x3170d7=typeof _0x3227c8[_0x2de2('0x1d')]===_0x2de2('0x1e')&&typeof _0x3227c8[_0x2de2('0x1f')]===_0x2de2('0x1e');var _0x15faf3=_0x4f5467['count'];var _0x3bd941=_0x3170d7?0x0:_0x3227c8[_0x2de2('0x1d')];var _0x2c6503=_0x3170d7?_0x4f5467[_0x2de2('0x20')]:_0x3227c8[_0x2de2('0x1d')]+_0x3227c8[_0x2de2('0x1f')];var _0x1c86c7;if(_0x2c6503>=_0x15faf3){_0x2c6503=_0x15faf3;_0x1c86c7=0xc8;}else{_0x1c86c7=0xce;}_0xa9a680['status'](_0x1c86c7);return _0xa9a680[_0x2de2('0x21')]('Content-Range',_0x3bd941+'-'+_0x2c6503+'/'+_0x15faf3)[_0x2de2('0x1c')](_0x4f5467);}return null;};}function patchUpdates(_0x3bb05a){return function(_0x3053ce){try{jsonpatch[_0x2de2('0x22')](_0x3053ce,_0x3bb05a,!![]);}catch(_0x1a6fb3){return BPromise[_0x2de2('0x23')](_0x1a6fb3);}return _0x3053ce[_0x2de2('0x24')]();};}function saveUpdates(_0x2417dc,_0xf7cfb1){return function(_0x74d4a1){if(_0x74d4a1){return _0x74d4a1[_0x2de2('0x25')](_0x2417dc)['then'](function(_0x51a5d0){return _0x51a5d0;});}return null;};}function removeEntity(_0x452d1f,_0x552cdd){return function(_0x453f65){if(_0x453f65){return _0x453f65[_0x2de2('0x26')]()['then'](function(){_0x452d1f[_0x2de2('0x1a')](0xcc)[_0x2de2('0x1b')]();});}};}function handleEntityNotFound(_0xe82486,_0x2a8a61){return function(_0x591832){if(!_0x591832){_0xe82486[_0x2de2('0x27')](0x194);}return _0x591832;};}function handleError(_0x3f64ba,_0x214a31){_0x214a31=_0x214a31||0x1f4;return function(_0x305d5d){logger[_0x2de2('0x28')](_0x305d5d[_0x2de2('0x29')]);if(_0x305d5d[_0x2de2('0x2a')]){delete _0x305d5d[_0x2de2('0x2a')];}_0x3f64ba[_0x2de2('0x1a')](_0x214a31)[_0x2de2('0x2b')](_0x305d5d);};}exports[_0x2de2('0x2c')]=function(_0x31a754,_0x3155a4){var _0x52df86={},_0xf570a4={},_0x34d46b={'count':0x0,'rows':[]};var _0x29269a=_[_0x2de2('0x2d')](db[_0x2de2('0x2e')]['rawAttributes'],function(_0x5d4f54){return{'name':_0x5d4f54[_0x2de2('0x2f')],'type':_0x5d4f54[_0x2de2('0x30')][_0x2de2('0x31')]};});_0xf570a4[_0x2de2('0x32')]=_[_0x2de2('0x2d')](_0x29269a,'name');_0xf570a4[_0x2de2('0x33')]=_[_0x2de2('0x34')](_0x31a754[_0x2de2('0x33')]);_0xf570a4['filters']=_[_0x2de2('0x35')](_0xf570a4['model'],_0xf570a4[_0x2de2('0x33')]);_0x52df86[_0x2de2('0x36')]=_[_0x2de2('0x35')](_0xf570a4['model'],qs[_0x2de2('0x37')](_0x31a754[_0x2de2('0x33')][_0x2de2('0x37')]));_0x52df86[_0x2de2('0x36')]=_0x52df86[_0x2de2('0x36')][_0x2de2('0x38')]?_0x52df86['attributes']:_0xf570a4[_0x2de2('0x32')];if(!_0x31a754[_0x2de2('0x33')][_0x2de2('0x39')](_0x2de2('0x3a'))){_0x52df86[_0x2de2('0x1f')]=qs[_0x2de2('0x1f')](_0x31a754[_0x2de2('0x33')]['limit']);_0x52df86[_0x2de2('0x1d')]=qs[_0x2de2('0x1d')](_0x31a754[_0x2de2('0x33')]['offset']);}_0x52df86['order']=qs['sort'](_0x31a754['query'][_0x2de2('0x3b')]);_0x52df86['where']=qs[_0x2de2('0x3c')](_[_0x2de2('0x3d')](_0x31a754[_0x2de2('0x33')],_0xf570a4['filters']),_0x29269a);if(_0x31a754['query']['filter']){_0x52df86[_0x2de2('0x3e')]=_[_0x2de2('0x3f')](_0x52df86[_0x2de2('0x3e')],{'$or':_[_0x2de2('0x2d')](_0x29269a,function(_0x53438f){if(_0x53438f[_0x2de2('0x30')]!==_0x2de2('0x40')){var _0x5ce98a={};_0x5ce98a[_0x53438f[_0x2de2('0x2a')]]={'$like':'%'+_0x31a754[_0x2de2('0x33')][_0x2de2('0x41')]+'%'};return _0x5ce98a;}})});}_0x52df86=_[_0x2de2('0x3f')]({},_0x52df86,_0x31a754['options']);var _0x558502={'where':_0x52df86['where']};return db['VoiceDialReport'][_0x2de2('0x20')](_0x558502)[_0x2de2('0x42')](function(_0x586cd8){_0x34d46b[_0x2de2('0x20')]=_0x586cd8;if(_0x31a754['query'][_0x2de2('0x43')]){_0x52df86[_0x2de2('0x44')]=[{'all':!![]}];}return db[_0x2de2('0x2e')]['findAll'](_0x52df86);})[_0x2de2('0x42')](function(_0xaf4a3c){_0x34d46b[_0x2de2('0x45')]=_0xaf4a3c;return _0x34d46b;})['then'](respondWithFilteredResult(_0x3155a4,_0x52df86))[_0x2de2('0x46')](handleError(_0x3155a4,null));};exports[_0x2de2('0x47')]=function(_0x59660c,_0x3d407c){var _0x44dac0={'raw':!![],'where':{'id':_0x59660c[_0x2de2('0x48')]['id']}},_0x27023d={};_0x27023d[_0x2de2('0x32')]=_[_0x2de2('0x34')](db[_0x2de2('0x2e')][_0x2de2('0x49')]);_0x27023d['query']=_[_0x2de2('0x34')](_0x59660c['query']);_0x27023d[_0x2de2('0x3c')]=_[_0x2de2('0x35')](_0x27023d[_0x2de2('0x32')],_0x27023d[_0x2de2('0x33')]);_0x44dac0[_0x2de2('0x36')]=_[_0x2de2('0x35')](_0x27023d[_0x2de2('0x32')],qs[_0x2de2('0x37')](_0x59660c[_0x2de2('0x33')]['fields']));_0x44dac0['attributes']=_0x44dac0[_0x2de2('0x36')][_0x2de2('0x38')]?_0x44dac0['attributes']:_0x27023d[_0x2de2('0x32')];if(_0x59660c[_0x2de2('0x33')][_0x2de2('0x43')]){_0x44dac0[_0x2de2('0x44')]=[{'all':!![]}];}_0x44dac0=_[_0x2de2('0x3f')]({},_0x44dac0,_0x59660c['options']);return db[_0x2de2('0x2e')][_0x2de2('0x4a')](_0x44dac0)[_0x2de2('0x42')](handleEntityNotFound(_0x3d407c,null))['then'](respondWithResult(_0x3d407c,null))['catch'](handleError(_0x3d407c,null));};exports[_0x2de2('0x4b')]=function(_0x1193ad,_0x1a14ef){return db[_0x2de2('0x2e')][_0x2de2('0x4b')](_0x1193ad[_0x2de2('0x4c')],{})[_0x2de2('0x42')](respondWithResult(_0x1a14ef,0xc9))[_0x2de2('0x46')](handleError(_0x1a14ef,null));};exports[_0x2de2('0x25')]=function(_0x475145,_0x3cf81a){if(_0x475145['body']['id']){delete _0x475145[_0x2de2('0x4c')]['id'];}return db[_0x2de2('0x2e')][_0x2de2('0x4a')]({'where':{'id':_0x475145[_0x2de2('0x48')]['id']}})[_0x2de2('0x42')](handleEntityNotFound(_0x3cf81a,null))[_0x2de2('0x42')](saveUpdates(_0x475145['body'],null))[_0x2de2('0x42')](respondWithResult(_0x3cf81a,null))[_0x2de2('0x46')](handleError(_0x3cf81a,null));};exports['destroy']=function(_0x4dc508,_0x48637a){return db['VoiceDialReport'][_0x2de2('0x4a')]({'where':{'id':_0x4dc508[_0x2de2('0x48')]['id']}})[_0x2de2('0x42')](handleEntityNotFound(_0x48637a,null))[_0x2de2('0x42')](removeEntity(_0x48637a,null))[_0x2de2('0x46')](handleError(_0x48637a,null));};exports[_0x2de2('0x4d')]=function(_0x13f1b2,_0x4e4419){return db['VoiceDialReport'][_0x2de2('0x4d')]()[_0x2de2('0x42')](respondWithResult(_0x4e4419,null))[_0x2de2('0x46')](handleError(_0x4e4419,null));};
\ No newline at end of file
index 4ef1ae2..702f103 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x661c=['./voiceDialReport.attributes','exports','define','report_dial','lodash','api','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0xc3b507,_0x3bf129){var _0x38e577=function(_0x2467f8){while(--_0x2467f8){_0xc3b507['push'](_0xc3b507['shift']());}};_0x38e577(++_0x3bf129);}(_0x661c,0x122));var _0xc661=function(_0x1deb03,_0xd05ad8){_0x1deb03=_0x1deb03-0x0;var _0x189fe7=_0x661c[_0x1deb03];return _0x189fe7;};'use strict';var _=require(_0xc661('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xc661('0x1'));var moment=require('moment');var BPromise=require(_0xc661('0x2'));var rp=require(_0xc661('0x3'));var fs=require('fs');var path=require(_0xc661('0x4'));var rimraf=require(_0xc661('0x5'));var config=require(_0xc661('0x6'));var attributes=require(_0xc661('0x7'));module[_0xc661('0x8')]=function(_0x502716,_0x4de875){return _0x502716[_0xc661('0x9')]('VoiceDialReport',attributes,{'tableName':_0xc661('0xa'),'paranoid':![],'indexes':[{'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0xbb49=['moment','bluebird','path','rimraf','./voiceDialReport.attributes','exports','define','VoiceDialReport','uniqueid','lodash','../../config/logger','api'];(function(_0xcb1869,_0x53ce11){var _0x4151fd=function(_0x4b4de1){while(--_0x4b4de1){_0xcb1869['push'](_0xcb1869['shift']());}};_0x4151fd(++_0x53ce11);}(_0xbb49,0xbd));var _0x9bb4=function(_0x4e4364,_0x15bfc3){_0x4e4364=_0x4e4364-0x0;var _0x147487=_0xbb49[_0x4e4364];return _0x147487;};'use strict';var _=require(_0x9bb4('0x0'));var util=require('util');var logger=require(_0x9bb4('0x1'))(_0x9bb4('0x2'));var moment=require(_0x9bb4('0x3'));var BPromise=require(_0x9bb4('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x9bb4('0x5'));var rimraf=require(_0x9bb4('0x6'));var config=require('../../config/environment');var attributes=require(_0x9bb4('0x7'));module[_0x9bb4('0x8')]=function(_0x18c2ef,_0x1c6db9){return _0x18c2ef[_0x9bb4('0x9')](_0x9bb4('0xa'),attributes,{'tableName':'report_dial','paranoid':![],'indexes':[{'fields':[_0x9bb4('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
index 20078fd..adb9dd3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5a7d=['UpdateVoiceDialReport','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','VoiceDialReport,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','CreateVoiceDialReport','VoiceDialReport','create','body','options','raw','debug','stringify','update','where','attributes','limit'];(function(_0x521929,_0x479be5){var _0x632436=function(_0x288290){while(--_0x288290){_0x521929['push'](_0x521929['shift']());}};_0x632436(++_0x479be5);}(_0x5a7d,0x8d));var _0xd5a7=function(_0x56bcff,_0x158e5f){_0x56bcff=_0x56bcff-0x0;var _0x340351=_0x5a7d[_0x56bcff];return _0x340351;};'use strict';var _=require(_0xd5a7('0x0'));var util=require(_0xd5a7('0x1'));var moment=require(_0xd5a7('0x2'));var BPromise=require('bluebird');var rs=require(_0xd5a7('0x3'));var fs=require('fs');var Redis=require(_0xd5a7('0x4'));var db=require(_0xd5a7('0x5'))['db'];var utils=require(_0xd5a7('0x6'));var logger=require(_0xd5a7('0x7'))(_0xd5a7('0x8'));var config=require(_0xd5a7('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xd5a7('0xa')][_0xd5a7('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x249d28,_0x1d1851,_0x34c4ea){return new BPromise(function(_0x4ccefa,_0x308f44){return client[_0xd5a7('0xc')](_0x249d28,_0x34c4ea)[_0xd5a7('0xd')](function(_0x22ae47){logger[_0xd5a7('0xe')](_0xd5a7('0xf'),_0x1d1851,_0xd5a7('0x10'));logger['debug']('VoiceDialReport,\x20%s,\x20%s,\x20%s',_0x1d1851,_0xd5a7('0x10'),JSON['stringify'](_0x22ae47));if(_0x22ae47[_0xd5a7('0x11')]){if(_0x22ae47[_0xd5a7('0x11')][_0xd5a7('0x12')]===0x1f4){logger[_0xd5a7('0x11')](_0xd5a7('0xf'),_0x1d1851,_0x22ae47[_0xd5a7('0x11')][_0xd5a7('0x13')]);return _0x308f44(_0x22ae47['error']['message']);}logger['error'](_0xd5a7('0xf'),_0x1d1851,_0x22ae47[_0xd5a7('0x11')]['message']);return _0x4ccefa(_0x22ae47['error'][_0xd5a7('0x13')]);}else{logger[_0xd5a7('0xe')](_0xd5a7('0xf'),_0x1d1851,_0xd5a7('0x10'));_0x4ccefa(_0x22ae47[_0xd5a7('0x14')]['message']);}})[_0xd5a7('0x15')](function(_0x39d9ee){logger[_0xd5a7('0x11')](_0xd5a7('0xf'),_0x1d1851,_0x39d9ee);_0x308f44(_0x39d9ee);});});}exports[_0xd5a7('0x16')]=function(_0x55f7c7){var _0x2d3247=this;return new Promise(function(_0x2da3f9,_0x5380da){return db[_0xd5a7('0x17')][_0xd5a7('0x18')](_0x55f7c7[_0xd5a7('0x19')],{'raw':_0x55f7c7[_0xd5a7('0x1a')]?_0x55f7c7[_0xd5a7('0x1a')][_0xd5a7('0x1b')]===undefined?!![]:![]:!![]})[_0xd5a7('0xd')](function(_0x12e7f8){logger[_0xd5a7('0xe')](_0xd5a7('0x16'),_0x55f7c7);logger[_0xd5a7('0x1c')](_0xd5a7('0x16'),_0x55f7c7,JSON[_0xd5a7('0x1d')](_0x12e7f8));_0x2da3f9(_0x12e7f8);})['catch'](function(_0x5e1575){logger[_0xd5a7('0x11')](_0xd5a7('0x16'),_0x5e1575[_0xd5a7('0x13')],_0x55f7c7);_0x5380da(_0x2d3247[_0xd5a7('0x11')](0x1f4,_0x5e1575[_0xd5a7('0x13')]));});});};exports['UpdateVoiceDialReport']=function(_0x3d8737){var _0x276314=this;return new Promise(function(_0x4499d4,_0x247133){return db[_0xd5a7('0x17')][_0xd5a7('0x1e')](_0x3d8737[_0xd5a7('0x19')],{'raw':_0x3d8737['options']?_0x3d8737['options'][_0xd5a7('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3d8737[_0xd5a7('0x1a')]?_0x3d8737['options'][_0xd5a7('0x1f')]||null:null,'attributes':_0x3d8737['options']?_0x3d8737[_0xd5a7('0x1a')][_0xd5a7('0x20')]||null:null,'limit':_0x3d8737[_0xd5a7('0x1a')]?_0x3d8737['options'][_0xd5a7('0x21')]||null:null})[_0xd5a7('0xd')](function(_0x21b18){logger[_0xd5a7('0xe')](_0xd5a7('0x22'),_0x3d8737);logger[_0xd5a7('0x1c')](_0xd5a7('0x22'),_0x3d8737,JSON[_0xd5a7('0x1d')](_0x21b18));_0x4499d4(_0x21b18);})['catch'](function(_0x4e17d6){logger['error'](_0xd5a7('0x22'),_0x4e17d6[_0xd5a7('0x13')],_0x3d8737);_0x247133(_0x276314['error'](0x1f4,_0x4e17d6[_0xd5a7('0x13')]));});});};
\ No newline at end of file
+var _0xe514=['attributes','limit','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','VoiceDialReport,\x20%s,\x20%s','request\x20sent','debug','VoiceDialReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateVoiceDialReport','VoiceDialReport','body','options','raw','UpdateVoiceDialReport','where'];(function(_0x208e27,_0x2a59dc){var _0x3dfc09=function(_0x577dff){while(--_0x577dff){_0x208e27['push'](_0x208e27['shift']());}};_0x3dfc09(++_0x2a59dc);}(_0xe514,0x134));var _0x4e51=function(_0x4fdca2,_0x203c30){_0x4fdca2=_0x4fdca2-0x0;var _0x3e6515=_0xe514[_0x4fdca2];return _0x3e6515;};'use strict';var _=require(_0x4e51('0x0'));var util=require(_0x4e51('0x1'));var moment=require(_0x4e51('0x2'));var BPromise=require(_0x4e51('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x4e51('0x4'));var db=require(_0x4e51('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x4e51('0x6'))(_0x4e51('0x7'));var config=require(_0x4e51('0x8'));var jayson=require(_0x4e51('0x9'));var client=jayson[_0x4e51('0xa')][_0x4e51('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x56daa0,_0x143bf2,_0x4f756e){return new BPromise(function(_0x38d618,_0x2efb2d){return client[_0x4e51('0xc')](_0x56daa0,_0x4f756e)[_0x4e51('0xd')](function(_0x31d1bf){logger[_0x4e51('0xe')](_0x4e51('0xf'),_0x143bf2,_0x4e51('0x10'));logger[_0x4e51('0x11')](_0x4e51('0x12'),_0x143bf2,_0x4e51('0x10'),JSON[_0x4e51('0x13')](_0x31d1bf));if(_0x31d1bf['error']){if(_0x31d1bf[_0x4e51('0x14')][_0x4e51('0x15')]===0x1f4){logger[_0x4e51('0x14')](_0x4e51('0xf'),_0x143bf2,_0x31d1bf[_0x4e51('0x14')][_0x4e51('0x16')]);return _0x2efb2d(_0x31d1bf[_0x4e51('0x14')]['message']);}logger[_0x4e51('0x14')](_0x4e51('0xf'),_0x143bf2,_0x31d1bf[_0x4e51('0x14')][_0x4e51('0x16')]);return _0x38d618(_0x31d1bf[_0x4e51('0x14')][_0x4e51('0x16')]);}else{logger[_0x4e51('0xe')](_0x4e51('0xf'),_0x143bf2,_0x4e51('0x10'));_0x38d618(_0x31d1bf[_0x4e51('0x17')]['message']);}})[_0x4e51('0x18')](function(_0x2bd77a){logger[_0x4e51('0x14')](_0x4e51('0xf'),_0x143bf2,_0x2bd77a);_0x2efb2d(_0x2bd77a);});});}exports[_0x4e51('0x19')]=function(_0x2cab22){var _0x4efab6=this;return new Promise(function(_0x466f4b,_0xc2ba37){return db[_0x4e51('0x1a')]['create'](_0x2cab22[_0x4e51('0x1b')],{'raw':_0x2cab22['options']?_0x2cab22[_0x4e51('0x1c')][_0x4e51('0x1d')]===undefined?!![]:![]:!![]})[_0x4e51('0xd')](function(_0x5b07ce){logger[_0x4e51('0xe')](_0x4e51('0x19'),_0x2cab22);logger[_0x4e51('0x11')](_0x4e51('0x19'),_0x2cab22,JSON['stringify'](_0x5b07ce));_0x466f4b(_0x5b07ce);})[_0x4e51('0x18')](function(_0x2d8afb){logger[_0x4e51('0x14')](_0x4e51('0x19'),_0x2d8afb['message'],_0x2cab22);_0xc2ba37(_0x4efab6[_0x4e51('0x14')](0x1f4,_0x2d8afb['message']));});});};exports[_0x4e51('0x1e')]=function(_0x2a481d){var _0x2bb252=this;return new Promise(function(_0x21e114,_0x5841d2){return db[_0x4e51('0x1a')]['update'](_0x2a481d[_0x4e51('0x1b')],{'raw':_0x2a481d[_0x4e51('0x1c')]?_0x2a481d[_0x4e51('0x1c')][_0x4e51('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2a481d['options']?_0x2a481d[_0x4e51('0x1c')][_0x4e51('0x1f')]||null:null,'attributes':_0x2a481d['options']?_0x2a481d['options'][_0x4e51('0x20')]||null:null,'limit':_0x2a481d['options']?_0x2a481d[_0x4e51('0x1c')][_0x4e51('0x21')]||null:null})[_0x4e51('0xd')](function(_0x190bde){logger[_0x4e51('0xe')](_0x4e51('0x1e'),_0x2a481d);logger[_0x4e51('0x11')](_0x4e51('0x1e'),_0x2a481d,JSON['stringify'](_0x190bde));_0x21e114(_0x190bde);})[_0x4e51('0x18')](function(_0x586aa3){logger[_0x4e51('0x14')](_0x4e51('0x1e'),_0x586aa3['message'],_0x2a481d);_0x5841d2(_0x2bb252['error'](0x1f4,_0x586aa3[_0x4e51('0x16')]));});});};
\ No newline at end of file
index 14b913d..7ba25df 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xae3f=['../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','show','post','create','/:id/applications','addApplications','put','/:id','update','delete','exports','multer','util','path','connect-timeout','express','Router'];(function(_0x157306,_0x24483b){var _0x46efc5=function(_0x242c0c){while(--_0x242c0c){_0x157306['push'](_0x157306['shift']());}};_0x46efc5(++_0x24483b);}(_0xae3f,0x170));var _0xfae3=function(_0x45b034,_0x3a57dd){_0x45b034=_0x45b034-0x0;var _0x509cb0=_0xae3f[_0x45b034];return _0x509cb0;};'use strict';var multer=require(_0xfae3('0x0'));var util=require(_0xfae3('0x1'));var path=require(_0xfae3('0x2'));var timeout=require(_0xfae3('0x3'));var express=require(_0xfae3('0x4'));var router=express[_0xfae3('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xfae3('0x6'));var interaction=require(_0xfae3('0x7'));var config=require(_0xfae3('0x8'));var controller=require('./voiceExtension.controller');router[_0xfae3('0x9')]('/',auth[_0xfae3('0xa')](),controller[_0xfae3('0xb')]);router[_0xfae3('0x9')]('/:id',auth[_0xfae3('0xa')](),controller[_0xfae3('0xc')]);router[_0xfae3('0xd')]('/',auth['isAuthenticated'](),controller[_0xfae3('0xe')]);router['post'](_0xfae3('0xf'),auth[_0xfae3('0xa')](),controller[_0xfae3('0x10')]);router[_0xfae3('0x11')](_0xfae3('0x12'),auth[_0xfae3('0xa')](),controller[_0xfae3('0x13')]);router[_0xfae3('0x14')](_0xfae3('0x12'),auth[_0xfae3('0xa')](),controller['destroy']);module[_0xfae3('0x15')]=router;
\ No newline at end of file
+var _0xc117=['Router','fs-extra','../../components/auth/service','../../config/environment','./voiceExtension.controller','isAuthenticated','index','get','show','post','create','put','/:id','update','delete','exports','multer','util','connect-timeout'];(function(_0x50a9af,_0x24df09){var _0x3478f9=function(_0x2228ff){while(--_0x2228ff){_0x50a9af['push'](_0x50a9af['shift']());}};_0x3478f9(++_0x24df09);}(_0xc117,0xe1));var _0x7c11=function(_0x540d2f,_0x165b9a){_0x540d2f=_0x540d2f-0x0;var _0x1668b3=_0xc117[_0x540d2f];return _0x1668b3;};'use strict';var multer=require(_0x7c11('0x0'));var util=require(_0x7c11('0x1'));var path=require('path');var timeout=require(_0x7c11('0x2'));var express=require('express');var router=express[_0x7c11('0x3')]();var fs_extra=require(_0x7c11('0x4'));var auth=require(_0x7c11('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x7c11('0x6'));var controller=require(_0x7c11('0x7'));router['get']('/',auth[_0x7c11('0x8')](),controller[_0x7c11('0x9')]);router[_0x7c11('0xa')]('/:id',auth[_0x7c11('0x8')](),controller[_0x7c11('0xb')]);router[_0x7c11('0xc')]('/',auth[_0x7c11('0x8')](),controller[_0x7c11('0xd')]);router[_0x7c11('0xc')]('/:id/applications',auth['isAuthenticated'](),controller['addApplications']);router[_0x7c11('0xe')](_0x7c11('0xf'),auth['isAuthenticated'](),controller[_0x7c11('0x10')]);router[_0x7c11('0x11')](_0x7c11('0xf'),auth['isAuthenticated'](),controller['destroy']);module[_0x7c11('0x12')]=router;
\ No newline at end of file
index 3b9e214..49b4190 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xccbf=['NoOp','ENUM','inbound','outbound','outbound-fax','system','any','INTEGER','BOOLEAN','wav','VIRTUAL','getDataValue','sequelize','exports','STRING','compositeIndex'];(function(_0x4b6f15,_0x3740ad){var _0x2e3064=function(_0x22c300){while(--_0x22c300){_0x4b6f15['push'](_0x4b6f15['shift']());}};_0x2e3064(++_0x3740ad);}(_0xccbf,0x1bc));var _0xfccb=function(_0x508b78,_0x88dc32){_0x508b78=_0x508b78-0x0;var _0x3bb4a7=_0xccbf[_0x508b78];return _0x3bb4a7;};'use strict';var Sequelize=require(_0xfccb('0x0'));module[_0xfccb('0x1')]={'context':{'type':Sequelize[_0xfccb('0x2')],'allowNull':![],'unique':'compositeIndex','validate':{'notEmpty':!![],'is':/[A-Za-z0-9._\+*!\-\[\]]+$/i}},'exten':{'type':Sequelize[_0xfccb('0x2')],'allowNull':![],'unique':_0xfccb('0x3')},'priority':{'type':Sequelize[_0xfccb('0x2')],'allowNull':![],'defaultValue':'1','unique':_0xfccb('0x3')},'tag':{'type':Sequelize[_0xfccb('0x2')],'allowNull':![],'defaultValue':'--'},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xfccb('0x4')},'appdata':{'type':Sequelize[_0xfccb('0x2')](0x1000),'allowNull':!![],'defaultValue':''},'type':{'type':Sequelize[_0xfccb('0x5')](_0xfccb('0x6'),_0xfccb('0x7'),'internal','inbound-fax',_0xfccb('0x8'),_0xfccb('0x9'),_0xfccb('0xa')),'allowNull':![]},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize[_0xfccb('0x2')],'allowNull':![],'defaultValue':'*,*,*,*'},'IntervalId':{'type':Sequelize[_0xfccb('0xb')]},'isApp':{'type':Sequelize[_0xfccb('0xc')],'allowNull':![],'defaultValue':![]},'appType':{'type':Sequelize['STRING'],'defaultValue':null},'callerID':{'type':Sequelize[_0xfccb('0x2')],'allowNull':!![]},'record':{'type':Sequelize[_0xfccb('0xc')],'defaultValue':![]},'cutdigits':{'type':Sequelize[_0xfccb('0xb')]},'recordingFormat':{'type':Sequelize[_0xfccb('0x2')],'defaultValue':_0xfccb('0xd')},'answer':{'type':Sequelize[_0xfccb('0xc')],'defaultValue':!![]},'name':{'type':Sequelize[_0xfccb('0xe')],'get':function(_0x497963){return this[_0xfccb('0xf')]('exten');}},'alias':{'type':Sequelize['STRING'],'allowNull':!![]}};
\ No newline at end of file
+var _0xe1eb=['STRING','NoOp','ENUM','inbound','inbound-fax','outbound-fax','system','*,*,*,*','INTEGER','BOOLEAN','VIRTUAL','getDataValue','exten','sequelize','compositeIndex'];(function(_0x57afc6,_0x4025cc){var _0x20f7de=function(_0x80b048){while(--_0x80b048){_0x57afc6['push'](_0x57afc6['shift']());}};_0x20f7de(++_0x4025cc);}(_0xe1eb,0x85));var _0xbe1e=function(_0x472ee2,_0x295444){_0x472ee2=_0x472ee2-0x0;var _0x18387b=_0xe1eb[_0x472ee2];return _0x18387b;};'use strict';var Sequelize=require(_0xbe1e('0x0'));module['exports']={'context':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0xbe1e('0x1'),'validate':{'notEmpty':!![],'is':/[A-Za-z0-9._\+*!\-\[\]]+$/i}},'exten':{'type':Sequelize[_0xbe1e('0x2')],'allowNull':![],'unique':_0xbe1e('0x1')},'priority':{'type':Sequelize[_0xbe1e('0x2')],'allowNull':![],'defaultValue':'1','unique':'compositeIndex'},'tag':{'type':Sequelize[_0xbe1e('0x2')],'allowNull':![],'defaultValue':'--'},'app':{'type':Sequelize[_0xbe1e('0x2')],'allowNull':![],'defaultValue':_0xbe1e('0x3')},'appdata':{'type':Sequelize[_0xbe1e('0x2')](0x1000),'allowNull':!![],'defaultValue':''},'type':{'type':Sequelize[_0xbe1e('0x4')](_0xbe1e('0x5'),'outbound','internal',_0xbe1e('0x6'),_0xbe1e('0x7'),_0xbe1e('0x8'),'any'),'allowNull':![]},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize[_0xbe1e('0x2')],'allowNull':![],'defaultValue':_0xbe1e('0x9')},'IntervalId':{'type':Sequelize[_0xbe1e('0xa')]},'isApp':{'type':Sequelize['BOOLEAN'],'allowNull':![],'defaultValue':![]},'appType':{'type':Sequelize[_0xbe1e('0x2')],'defaultValue':null},'callerID':{'type':Sequelize[_0xbe1e('0x2')],'allowNull':!![]},'record':{'type':Sequelize[_0xbe1e('0xb')],'defaultValue':![]},'cutdigits':{'type':Sequelize[_0xbe1e('0xa')]},'recordingFormat':{'type':Sequelize[_0xbe1e('0x2')],'defaultValue':'wav'},'answer':{'type':Sequelize[_0xbe1e('0xb')],'defaultValue':!![]},'name':{'type':Sequelize[_0xbe1e('0xc')],'get':function(_0x1b5423){return this[_0xbe1e('0xd')](_0xbe1e('0xe'));}},'alias':{'type':Sequelize['STRING'],'allowNull':!![]}};
\ No newline at end of file
index 34ad5ed..482c570 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd089=['undefined','count','limit','set','Content-Range','json','destroy','then','get','InboundRoutes','OutboundRoutes','outbound','InternalRoutes','internal','filter','ignore','map','value','includes','type','find','name','error','send','index','VoiceExtension','rawAttributes','fieldName','key','model','query','keys','intersection','fields','attributes','nolimit','order','sort','where','filters','pick','merge','options','includeAll','findAll','catch','show','length','include','params','body','startsWith','exten','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','inbound','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','context','description','recordingFormat','cutdigits','mandatoryDisposition','alias','sequelize','transaction','Transaction','ISOLATION_LEVELS','isApp','createRouting','bulkCreate','findAndCountAll','cast(priority\x20as\x20unsigned)','stack','lodash','ioredis','../../components/parsers/qs','../../config/logger','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','sendStatus','status','offset'];(function(_0x5b456b,_0x13eb78){var _0xf93f97=function(_0x316167){while(--_0x316167){_0x5b456b['push'](_0x5b456b['shift']());}};_0xf93f97(++_0x13eb78);}(_0xd089,0xab));var _0x9d08=function(_0xd21bad,_0x125eb0){_0xd21bad=_0xd21bad-0x0;var _0x4aca91=_0xd089[_0xd21bad];return _0x4aca91;};'use strict';var _=require(_0x9d08('0x0'));var Redis=require(_0x9d08('0x1'));var qs=require(_0x9d08('0x2'));var logger=require(_0x9d08('0x3'))('api');var config=require(_0x9d08('0x4'));var db=require(_0x9d08('0x5'))['db'];config[_0x9d08('0x6')]=_[_0x9d08('0x7')](config[_0x9d08('0x6')],{'host':_0x9d08('0x8'),'port':0x18eb});var socket=require(_0x9d08('0x9'))(new Redis(config['redis']));require('./voiceExtension.socket')['register'](socket);function respondWithStatusCode(_0x213f87,_0x5a08b6){_0x5a08b6=_0x5a08b6||0xcc;return function(_0x21f220){if(_0x21f220){return _0x213f87[_0x9d08('0xa')](_0x5a08b6);}return _0x213f87[_0x9d08('0xb')](_0x5a08b6)['end']();};}function respondWithResult(_0x14de03,_0x4b5307){_0x4b5307=_0x4b5307||0xc8;return function(_0x3f9f41){if(_0x3f9f41){return _0x14de03[_0x9d08('0xb')](_0x4b5307)['json'](_0x3f9f41);}};}function respondWithFilteredResult(_0x5f4ce3,_0x377ba2){return function(_0x1c9070){if(_0x1c9070){var _0x3665fa=typeof _0x377ba2[_0x9d08('0xc')]===_0x9d08('0xd')&&typeof _0x377ba2['limit']===_0x9d08('0xd');var _0x36bc50=_0x1c9070['count'];var _0x10629f=_0x3665fa?0x0:_0x377ba2[_0x9d08('0xc')];var _0x37bf03=_0x3665fa?_0x1c9070[_0x9d08('0xe')]:_0x377ba2['offset']+_0x377ba2[_0x9d08('0xf')];var _0x9de844;if(_0x37bf03>=_0x36bc50){_0x37bf03=_0x36bc50;_0x9de844=0xc8;}else{_0x9de844=0xce;}_0x5f4ce3['status'](_0x9de844);return _0x5f4ce3[_0x9d08('0x10')](_0x9d08('0x11'),_0x10629f+'-'+_0x37bf03+'/'+_0x36bc50)[_0x9d08('0x12')](_0x1c9070);}return null;};}function removeEntity(_0x140816){return function(_0x10e789){if(_0x10e789){return _0x10e789[_0x9d08('0x13')]()[_0x9d08('0x14')](function(){var _0x514592=_0x10e789[_0x9d08('0x15')]({'plain':!![]});var _0x55542f=[{'name':_0x9d08('0x16'),'value':'inbound','ignore':![]},{'name':_0x9d08('0x17'),'value':_0x9d08('0x18'),'ignore':![]},{'name':_0x9d08('0x19'),'value':_0x9d08('0x1a'),'ignore':![]}];var _0x3096ad=_(_0x55542f)[_0x9d08('0x1b')](_0x9d08('0x1c'))[_0x9d08('0x1d')](_0x9d08('0x1e'))[_0x9d08('0x1e')]();if(_[_0x9d08('0x1f')](_0x3096ad,_0x514592[_0x9d08('0x20')])){return;}var _0xfa58f8=_[_0x9d08('0x21')](_0x55542f,['value',_0x514592[_0x9d08('0x20')]])[_0x9d08('0x22')];return db['UserProfileResource'][_0x9d08('0x13')]({'where':{'type':_0xfa58f8,'resourceId':_0x514592['id']}})[_0x9d08('0x14')](function(){return _0x10e789;});})[_0x9d08('0x14')](function(){_0x140816[_0x9d08('0xb')](0xcc)['end']();});}};}function handleEntityNotFound(_0x389d47){return function(_0x2342e5){if(!_0x2342e5){_0x389d47['sendStatus'](0x194);}return _0x2342e5;};}function handleError(_0x54700d,_0x52b071){_0x52b071=_0x52b071||0x1f4;return function(_0x58a5b2){logger[_0x9d08('0x23')](_0x58a5b2['stack']);if(_0x58a5b2['name']){delete _0x58a5b2[_0x9d08('0x22')];}_0x54700d['status'](_0x52b071)[_0x9d08('0x24')](_0x58a5b2);};}exports[_0x9d08('0x25')]=function(_0x3cceca,_0x55dd75){var _0x345146={},_0x140a5c={},_0x4cfb73={'count':0x0,'rows':[]};var _0x4f4b9c=_['map'](db[_0x9d08('0x26')][_0x9d08('0x27')],function(_0x5880dd){return{'name':_0x5880dd[_0x9d08('0x28')],'type':_0x5880dd[_0x9d08('0x20')][_0x9d08('0x29')]};});_0x140a5c[_0x9d08('0x2a')]=_[_0x9d08('0x1d')](_0x4f4b9c,_0x9d08('0x22'));_0x140a5c[_0x9d08('0x2b')]=_[_0x9d08('0x2c')](_0x3cceca[_0x9d08('0x2b')]);_0x140a5c['filters']=_['intersection'](_0x140a5c[_0x9d08('0x2a')],_0x140a5c[_0x9d08('0x2b')]);_0x345146['attributes']=_[_0x9d08('0x2d')](_0x140a5c[_0x9d08('0x2a')],qs['fields'](_0x3cceca['query'][_0x9d08('0x2e')]));_0x345146[_0x9d08('0x2f')]=_0x345146['attributes']['length']?_0x345146[_0x9d08('0x2f')]:_0x140a5c[_0x9d08('0x2a')];if(!_0x3cceca[_0x9d08('0x2b')]['hasOwnProperty'](_0x9d08('0x30'))){_0x345146['limit']=qs[_0x9d08('0xf')](_0x3cceca['query'][_0x9d08('0xf')]);_0x345146[_0x9d08('0xc')]=qs[_0x9d08('0xc')](_0x3cceca[_0x9d08('0x2b')][_0x9d08('0xc')]);}_0x345146[_0x9d08('0x31')]=qs[_0x9d08('0x32')](_0x3cceca['query']['sort']);_0x345146[_0x9d08('0x33')]=qs[_0x9d08('0x34')](_[_0x9d08('0x35')](_0x3cceca[_0x9d08('0x2b')],_0x140a5c[_0x9d08('0x34')]),_0x4f4b9c);if(_0x3cceca[_0x9d08('0x2b')][_0x9d08('0x1b')]){_0x345146[_0x9d08('0x33')]=_['merge'](_0x345146['where'],{'$or':_[_0x9d08('0x1d')](_0x4f4b9c,function(_0x1e01de){if(_0x1e01de['type']!=='VIRTUAL'){var _0x6b68ea={};_0x6b68ea[_0x1e01de[_0x9d08('0x22')]]={'$like':'%'+_0x3cceca[_0x9d08('0x2b')][_0x9d08('0x1b')]+'%'};return _0x6b68ea;}})});}_0x345146=_[_0x9d08('0x36')]({},_0x345146,_0x3cceca[_0x9d08('0x37')]);var _0x44b44f={'where':_0x345146[_0x9d08('0x33')]};return db[_0x9d08('0x26')][_0x9d08('0xe')](_0x44b44f)[_0x9d08('0x14')](function(_0x35c438){_0x4cfb73[_0x9d08('0xe')]=_0x35c438;if(_0x3cceca[_0x9d08('0x2b')][_0x9d08('0x38')]){_0x345146['include']=[{'all':!![]}];}return db[_0x9d08('0x26')][_0x9d08('0x39')](_0x345146);})['then'](function(_0x174d92){_0x4cfb73['rows']=_0x174d92;return _0x4cfb73;})[_0x9d08('0x14')](respondWithFilteredResult(_0x55dd75,_0x345146))[_0x9d08('0x3a')](handleError(_0x55dd75,null));};exports[_0x9d08('0x3b')]=function(_0x433691,_0x445ba8){var _0x255cad={'raw':![],'where':{'id':_0x433691['params']['id']}},_0x7dc65b={};_0x7dc65b[_0x9d08('0x2a')]=_[_0x9d08('0x2c')](db[_0x9d08('0x26')]['rawAttributes']);_0x7dc65b[_0x9d08('0x2b')]=_[_0x9d08('0x2c')](_0x433691[_0x9d08('0x2b')]);_0x7dc65b[_0x9d08('0x34')]=_[_0x9d08('0x2d')](_0x7dc65b[_0x9d08('0x2a')],_0x7dc65b[_0x9d08('0x2b')]);_0x255cad[_0x9d08('0x2f')]=_[_0x9d08('0x2d')](_0x7dc65b[_0x9d08('0x2a')],qs[_0x9d08('0x2e')](_0x433691[_0x9d08('0x2b')]['fields']));_0x255cad['attributes']=_0x255cad[_0x9d08('0x2f')][_0x9d08('0x3c')]?_0x255cad[_0x9d08('0x2f')]:_0x7dc65b[_0x9d08('0x2a')];if(_0x433691[_0x9d08('0x2b')][_0x9d08('0x38')]){_0x255cad[_0x9d08('0x3d')]=[{'all':!![]}];}_0x255cad=_[_0x9d08('0x36')]({},_0x255cad,_0x433691[_0x9d08('0x37')]);return db[_0x9d08('0x26')][_0x9d08('0x21')](_0x255cad)['then'](handleEntityNotFound(_0x445ba8,null))[_0x9d08('0x14')](respondWithResult(_0x445ba8,null))[_0x9d08('0x3a')](handleError(_0x445ba8,null));};exports[_0x9d08('0x13')]=function(_0x1e5525,_0x1b3b08){return db[_0x9d08('0x26')][_0x9d08('0x21')]({'where':{'id':_0x1e5525[_0x9d08('0x3e')]['id']}})[_0x9d08('0x14')](handleEntityNotFound(_0x1b3b08,null))[_0x9d08('0x14')](removeEntity(_0x1b3b08,null))[_0x9d08('0x3a')](handleError(_0x1b3b08,null));};exports['create']=function(_0xac787a,_0xb3b12d){if(_0xac787a[_0x9d08('0x3f')][_0x9d08('0x20')]===_0x9d08('0x18')&&!_[_0x9d08('0x40')](_0xac787a[_0x9d08('0x3f')][_0x9d08('0x41')],'_')){_0xac787a['body'][_0x9d08('0x41')]='_'['concat'](_0xac787a[_0x9d08('0x3f')]['exten']);}return db[_0x9d08('0x26')][_0x9d08('0x42')](_0xac787a['body'],{'raw':![]})[_0x9d08('0x14')](function(_0x2ebabc){var _0x2a7481=_0xac787a[_0x9d08('0x43')][_0x9d08('0x15')]({'plain':!![]});if(!_0x2a7481)throw new Error(_0x9d08('0x44'));if(_0x2a7481[_0x9d08('0x45')]===_0x9d08('0x43')){var _0x155192=_0x2ebabc[_0x9d08('0x15')]({'plain':!![]});var _0x2da13d=[{'name':_0x9d08('0x16'),'value':_0x9d08('0x46')},{'name':'OutboundRoutes','value':_0x9d08('0x18')},{'name':_0x9d08('0x19'),'value':'internal'}];var _0x29d974=_[_0x9d08('0x21')](_0x2da13d,[_0x9d08('0x1e'),_0x155192[_0x9d08('0x20')]])[_0x9d08('0x22')];return db[_0x9d08('0x47')]['find']({'where':{'name':_0x29d974,'userProfileId':_0x2a7481[_0x9d08('0x48')]},'raw':!![]})['then'](function(_0x54d82b){if(_0x54d82b&&_0x54d82b[_0x9d08('0x49')]===0x0){return db['UserProfileResource'][_0x9d08('0x42')]({'name':_0x155192[_0x9d08('0x22')],'resourceId':_0x155192['id'],'type':_0x54d82b['name'],'sectionId':_0x54d82b['id']},{})[_0x9d08('0x14')](function(){return _0x2ebabc;});}else{return _0x2ebabc;}})['catch'](function(_0x87d81d){logger[_0x9d08('0x23')](_0x9d08('0x4a'),_0x87d81d);throw _0x87d81d;});}return _0x2ebabc;})[_0x9d08('0x14')](respondWithResult(_0xb3b12d,0xc9))[_0x9d08('0x3a')](handleError(_0xb3b12d,null));};exports[_0x9d08('0x4b')]=function(_0x2d1db1,_0x35c7b0){if(_0x2d1db1[_0x9d08('0x3f')]['id']){delete _0x2d1db1[_0x9d08('0x3f')]['id'];}return db[_0x9d08('0x26')][_0x9d08('0x21')]({'where':{'id':_0x2d1db1[_0x9d08('0x3e')]['id']}})[_0x9d08('0x14')](handleEntityNotFound(_0x35c7b0,null))[_0x9d08('0x14')](function(_0x20e74c){if(_0x20e74c){return db[_0x9d08('0x26')]['update'](_['pick'](_0x2d1db1[_0x9d08('0x3f')],['exten',_0x9d08('0x4c'),_0x9d08('0x4d'),_0x9d08('0x4e'),_0x9d08('0x4f'),_0x9d08('0x50'),_0x9d08('0x51')]),{'where':{'context':_0x20e74c[_0x9d08('0x4c')],'exten':_0x20e74c['exten']},'individualHooks':!![]})[_0x9d08('0x14')](function(_0x413c7c){return _0x413c7c;});}return null;})[_0x9d08('0x14')](respondWithStatusCode(_0x35c7b0,null))[_0x9d08('0x3a')](handleError(_0x35c7b0,null));};exports['addApplications']=function(_0x23ab3c,_0x2d0055){var _0x71ee36=_0x23ab3c[_0x9d08('0x3e')]['id'];var _0x313e71=_0x23ab3c[_0x9d08('0x3f')];var _0x1e0512=0xc8;var _0x4eac70=null;return db[_0x9d08('0x52')][_0x9d08('0x53')]({'isolationLevel':db[_0x9d08('0x52')][_0x9d08('0x54')][_0x9d08('0x55')]['READ_COMMITTED']},function(_0x690fb8){return db[_0x9d08('0x26')]['findOne']({'where':{'id':_0x71ee36},'transaction':_0x690fb8})[_0x9d08('0x14')](function(_0x40e485){if(_0x40e485){return db[_0x9d08('0x26')][_0x9d08('0x13')]({'where':{'VoiceExtensionId':_0x71ee36},'transaction':_0x690fb8})[_0x9d08('0x14')](function(){var _0x4f4d7d=_[_0x9d08('0x1d')](_0x313e71,function(_0x4eb9b0){_0x4eb9b0['VoiceExtensionId']=_0x71ee36;_0x4eb9b0[_0x9d08('0x56')]=!![];return _0x4eb9b0;});return _0x40e485[_0x9d08('0x57')](_0x4f4d7d);})[_0x9d08('0x14')](function(_0x37a707){return db[_0x9d08('0x26')][_0x9d08('0x58')](_0x37a707,{'transaction':_0x690fb8});});}else{_0x1e0512=0x194;_0x4eac70=[];}});})[_0x9d08('0x14')](function(){if(_0x1e0512!==0x194){return db[_0x9d08('0x26')][_0x9d08('0x59')]({'where':{'isApp':!![],'VoiceExtensionId':_0x71ee36},'order':_0x9d08('0x5a')})[_0x9d08('0x14')](function(_0x4652b3){_0x4eac70=_0x4652b3;});}})[_0x9d08('0x3a')](function(_0x2cbd07){_0x1e0512=0x1f4;logger[_0x9d08('0x23')](_0x2cbd07[_0x9d08('0x5b')]);if(_0x2cbd07[_0x9d08('0x22')]){delete _0x2cbd07['name'];}_0x4eac70=_0x2cbd07;})['finally'](function(){if(_0x4eac70===null){_0x2d0055[_0x9d08('0xa')](_0x1e0512);}else{if(_0x1e0512===0x1f4){_0x2d0055[_0x9d08('0xb')](_0x1e0512)['send'](_0x4eac70);}else{_0x2d0055[_0x9d08('0xb')](_0x1e0512)[_0x9d08('0x12')](_0x4eac70);}}});};
\ No newline at end of file
+var _0x4728=['../../mysqldb','redis','defaults','localhost','socket.io-emitter','./voiceExtension.socket','register','status','end','json','limit','undefined','offset','set','Content-Range','then','get','InboundRoutes','inbound','outbound','internal','filter','ignore','map','value','includes','type','find','destroy','sendStatus','error','name','send','VoiceExtension','rawAttributes','fieldName','key','model','keys','filters','intersection','query','fields','attributes','length','nolimit','sort','pick','where','merge','VIRTUAL','options','count','includeAll','include','catch','show','params','create','body','startsWith','exten','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','OutboundRoutes','InternalRoutes','UserProfileSection','userProfileId','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','context','description','recordingFormat','cutdigits','mandatoryDisposition','sequelize','transaction','Transaction','ISOLATION_LEVELS','READ_COMMITTED','findOne','VoiceExtensionId','isApp','createRouting','findAndCountAll','cast(priority\x20as\x20unsigned)','stack','finally','ioredis','../../config/logger','api','../../config/environment'];(function(_0x6c3c46,_0x4ae7df){var _0x434c10=function(_0x222911){while(--_0x222911){_0x6c3c46['push'](_0x6c3c46['shift']());}};_0x434c10(++_0x4ae7df);}(_0x4728,0x174));var _0x8472=function(_0x539724,_0x120b2d){_0x539724=_0x539724-0x0;var _0x1752e5=_0x4728[_0x539724];return _0x1752e5;};'use strict';var _=require('lodash');var Redis=require(_0x8472('0x0'));var qs=require('../../components/parsers/qs');var logger=require(_0x8472('0x1'))(_0x8472('0x2'));var config=require(_0x8472('0x3'));var db=require(_0x8472('0x4'))['db'];config[_0x8472('0x5')]=_[_0x8472('0x6')](config[_0x8472('0x5')],{'host':_0x8472('0x7'),'port':0x18eb});var socket=require(_0x8472('0x8'))(new Redis(config[_0x8472('0x5')]));require(_0x8472('0x9'))[_0x8472('0xa')](socket);function respondWithStatusCode(_0x154552,_0x5b07c7){_0x5b07c7=_0x5b07c7||0xcc;return function(_0x2fba51){if(_0x2fba51){return _0x154552['sendStatus'](_0x5b07c7);}return _0x154552[_0x8472('0xb')](_0x5b07c7)[_0x8472('0xc')]();};}function respondWithResult(_0x33762c,_0x402d45){_0x402d45=_0x402d45||0xc8;return function(_0x35f3a4){if(_0x35f3a4){return _0x33762c['status'](_0x402d45)[_0x8472('0xd')](_0x35f3a4);}};}function respondWithFilteredResult(_0x54c939,_0x3e5f7f){return function(_0x2c3e67){if(_0x2c3e67){var _0xba8825=typeof _0x3e5f7f['offset']==='undefined'&&typeof _0x3e5f7f[_0x8472('0xe')]===_0x8472('0xf');var _0x753c6c=_0x2c3e67['count'];var _0x47e7ca=_0xba8825?0x0:_0x3e5f7f['offset'];var _0x47c008=_0xba8825?_0x2c3e67['count']:_0x3e5f7f[_0x8472('0x10')]+_0x3e5f7f[_0x8472('0xe')];var _0x132973;if(_0x47c008>=_0x753c6c){_0x47c008=_0x753c6c;_0x132973=0xc8;}else{_0x132973=0xce;}_0x54c939[_0x8472('0xb')](_0x132973);return _0x54c939[_0x8472('0x11')](_0x8472('0x12'),_0x47e7ca+'-'+_0x47c008+'/'+_0x753c6c)['json'](_0x2c3e67);}return null;};}function removeEntity(_0x457f9c){return function(_0x326f06){if(_0x326f06){return _0x326f06['destroy']()[_0x8472('0x13')](function(){var _0x423f7b=_0x326f06[_0x8472('0x14')]({'plain':!![]});var _0xe79332=[{'name':_0x8472('0x15'),'value':_0x8472('0x16'),'ignore':![]},{'name':'OutboundRoutes','value':_0x8472('0x17'),'ignore':![]},{'name':'InternalRoutes','value':_0x8472('0x18'),'ignore':![]}];var _0x5957b1=_(_0xe79332)[_0x8472('0x19')](_0x8472('0x1a'))[_0x8472('0x1b')](_0x8472('0x1c'))[_0x8472('0x1c')]();if(_[_0x8472('0x1d')](_0x5957b1,_0x423f7b[_0x8472('0x1e')])){return;}var _0x4611d4=_[_0x8472('0x1f')](_0xe79332,[_0x8472('0x1c'),_0x423f7b[_0x8472('0x1e')]])['name'];return db['UserProfileResource'][_0x8472('0x20')]({'where':{'type':_0x4611d4,'resourceId':_0x423f7b['id']}})[_0x8472('0x13')](function(){return _0x326f06;});})[_0x8472('0x13')](function(){_0x457f9c[_0x8472('0xb')](0xcc)[_0x8472('0xc')]();});}};}function handleEntityNotFound(_0x64e63c){return function(_0xd383a0){if(!_0xd383a0){_0x64e63c[_0x8472('0x21')](0x194);}return _0xd383a0;};}function handleError(_0x540a38,_0x89cf09){_0x89cf09=_0x89cf09||0x1f4;return function(_0x1b5af7){logger[_0x8472('0x22')](_0x1b5af7['stack']);if(_0x1b5af7['name']){delete _0x1b5af7[_0x8472('0x23')];}_0x540a38[_0x8472('0xb')](_0x89cf09)[_0x8472('0x24')](_0x1b5af7);};}exports['index']=function(_0x503459,_0x2e87ff){var _0x13e8d2={},_0x4fdacb={},_0x4022fd={'count':0x0,'rows':[]};var _0x328360=_['map'](db[_0x8472('0x25')][_0x8472('0x26')],function(_0x1a846a){return{'name':_0x1a846a[_0x8472('0x27')],'type':_0x1a846a[_0x8472('0x1e')][_0x8472('0x28')]};});_0x4fdacb[_0x8472('0x29')]=_[_0x8472('0x1b')](_0x328360,_0x8472('0x23'));_0x4fdacb['query']=_[_0x8472('0x2a')](_0x503459['query']);_0x4fdacb[_0x8472('0x2b')]=_[_0x8472('0x2c')](_0x4fdacb[_0x8472('0x29')],_0x4fdacb[_0x8472('0x2d')]);_0x13e8d2['attributes']=_[_0x8472('0x2c')](_0x4fdacb[_0x8472('0x29')],qs[_0x8472('0x2e')](_0x503459[_0x8472('0x2d')]['fields']));_0x13e8d2[_0x8472('0x2f')]=_0x13e8d2[_0x8472('0x2f')][_0x8472('0x30')]?_0x13e8d2[_0x8472('0x2f')]:_0x4fdacb[_0x8472('0x29')];if(!_0x503459[_0x8472('0x2d')]['hasOwnProperty'](_0x8472('0x31'))){_0x13e8d2[_0x8472('0xe')]=qs[_0x8472('0xe')](_0x503459[_0x8472('0x2d')]['limit']);_0x13e8d2['offset']=qs['offset'](_0x503459['query'][_0x8472('0x10')]);}_0x13e8d2['order']=qs[_0x8472('0x32')](_0x503459[_0x8472('0x2d')]['sort']);_0x13e8d2['where']=qs[_0x8472('0x2b')](_[_0x8472('0x33')](_0x503459[_0x8472('0x2d')],_0x4fdacb[_0x8472('0x2b')]),_0x328360);if(_0x503459[_0x8472('0x2d')]['filter']){_0x13e8d2[_0x8472('0x34')]=_[_0x8472('0x35')](_0x13e8d2[_0x8472('0x34')],{'$or':_[_0x8472('0x1b')](_0x328360,function(_0x1a48a6){if(_0x1a48a6['type']!==_0x8472('0x36')){var _0x5c815b={};_0x5c815b[_0x1a48a6['name']]={'$like':'%'+_0x503459[_0x8472('0x2d')][_0x8472('0x19')]+'%'};return _0x5c815b;}})});}_0x13e8d2=_[_0x8472('0x35')]({},_0x13e8d2,_0x503459[_0x8472('0x37')]);var _0x5ec008={'where':_0x13e8d2[_0x8472('0x34')]};return db[_0x8472('0x25')][_0x8472('0x38')](_0x5ec008)[_0x8472('0x13')](function(_0x498d91){_0x4022fd[_0x8472('0x38')]=_0x498d91;if(_0x503459[_0x8472('0x2d')][_0x8472('0x39')]){_0x13e8d2[_0x8472('0x3a')]=[{'all':!![]}];}return db[_0x8472('0x25')]['findAll'](_0x13e8d2);})[_0x8472('0x13')](function(_0x4ef39f){_0x4022fd['rows']=_0x4ef39f;return _0x4022fd;})[_0x8472('0x13')](respondWithFilteredResult(_0x2e87ff,_0x13e8d2))[_0x8472('0x3b')](handleError(_0x2e87ff,null));};exports[_0x8472('0x3c')]=function(_0x19f228,_0x47228e){var _0x5b94db={'raw':![],'where':{'id':_0x19f228[_0x8472('0x3d')]['id']}},_0x1d38f1={};_0x1d38f1[_0x8472('0x29')]=_[_0x8472('0x2a')](db['VoiceExtension'][_0x8472('0x26')]);_0x1d38f1[_0x8472('0x2d')]=_['keys'](_0x19f228[_0x8472('0x2d')]);_0x1d38f1[_0x8472('0x2b')]=_[_0x8472('0x2c')](_0x1d38f1[_0x8472('0x29')],_0x1d38f1[_0x8472('0x2d')]);_0x5b94db[_0x8472('0x2f')]=_[_0x8472('0x2c')](_0x1d38f1[_0x8472('0x29')],qs['fields'](_0x19f228['query'][_0x8472('0x2e')]));_0x5b94db[_0x8472('0x2f')]=_0x5b94db[_0x8472('0x2f')][_0x8472('0x30')]?_0x5b94db[_0x8472('0x2f')]:_0x1d38f1[_0x8472('0x29')];if(_0x19f228[_0x8472('0x2d')]['includeAll']){_0x5b94db[_0x8472('0x3a')]=[{'all':!![]}];}_0x5b94db=_[_0x8472('0x35')]({},_0x5b94db,_0x19f228[_0x8472('0x37')]);return db['VoiceExtension'][_0x8472('0x1f')](_0x5b94db)['then'](handleEntityNotFound(_0x47228e,null))[_0x8472('0x13')](respondWithResult(_0x47228e,null))[_0x8472('0x3b')](handleError(_0x47228e,null));};exports[_0x8472('0x20')]=function(_0x1b6c58,_0x335365){return db[_0x8472('0x25')]['find']({'where':{'id':_0x1b6c58[_0x8472('0x3d')]['id']}})['then'](handleEntityNotFound(_0x335365,null))['then'](removeEntity(_0x335365,null))[_0x8472('0x3b')](handleError(_0x335365,null));};exports[_0x8472('0x3e')]=function(_0x78caf4,_0x3b4d86){if(_0x78caf4[_0x8472('0x3f')][_0x8472('0x1e')]==='outbound'&&!_[_0x8472('0x40')](_0x78caf4[_0x8472('0x3f')][_0x8472('0x41')],'_')){_0x78caf4[_0x8472('0x3f')][_0x8472('0x41')]='_'['concat'](_0x78caf4['body'][_0x8472('0x41')]);}return db[_0x8472('0x25')]['create'](_0x78caf4[_0x8472('0x3f')],{'raw':![]})[_0x8472('0x13')](function(_0x5e3289){var _0x116d1b=_0x78caf4[_0x8472('0x42')][_0x8472('0x14')]({'plain':!![]});if(!_0x116d1b)throw new Error(_0x8472('0x43'));if(_0x116d1b[_0x8472('0x44')]===_0x8472('0x42')){var _0x24334c=_0x5e3289[_0x8472('0x14')]({'plain':!![]});var _0x23059a=[{'name':_0x8472('0x15'),'value':_0x8472('0x16')},{'name':_0x8472('0x45'),'value':_0x8472('0x17')},{'name':_0x8472('0x46'),'value':'internal'}];var _0x5242fe=_['find'](_0x23059a,[_0x8472('0x1c'),_0x24334c[_0x8472('0x1e')]])['name'];return db[_0x8472('0x47')][_0x8472('0x1f')]({'where':{'name':_0x5242fe,'userProfileId':_0x116d1b[_0x8472('0x48')]},'raw':!![]})[_0x8472('0x13')](function(_0x159cfb){if(_0x159cfb&&_0x159cfb['autoAssociation']===0x0){return db[_0x8472('0x49')][_0x8472('0x3e')]({'name':_0x24334c['name'],'resourceId':_0x24334c['id'],'type':_0x159cfb[_0x8472('0x23')],'sectionId':_0x159cfb['id']},{})['then'](function(){return _0x5e3289;});}else{return _0x5e3289;}})['catch'](function(_0x41ce0b){logger[_0x8472('0x22')](_0x8472('0x4a'),_0x41ce0b);throw _0x41ce0b;});}return _0x5e3289;})[_0x8472('0x13')](respondWithResult(_0x3b4d86,0xc9))[_0x8472('0x3b')](handleError(_0x3b4d86,null));};exports[_0x8472('0x4b')]=function(_0x90a954,_0x3acc22){if(_0x90a954[_0x8472('0x3f')]['id']){delete _0x90a954[_0x8472('0x3f')]['id'];}return db[_0x8472('0x25')][_0x8472('0x1f')]({'where':{'id':_0x90a954['params']['id']}})[_0x8472('0x13')](handleEntityNotFound(_0x3acc22,null))['then'](function(_0x52545b){if(_0x52545b){return db[_0x8472('0x25')][_0x8472('0x4b')](_[_0x8472('0x33')](_0x90a954['body'],[_0x8472('0x41'),_0x8472('0x4c'),_0x8472('0x4d'),_0x8472('0x4e'),_0x8472('0x4f'),_0x8472('0x50'),'alias']),{'where':{'context':_0x52545b[_0x8472('0x4c')],'exten':_0x52545b[_0x8472('0x41')]},'individualHooks':!![]})['then'](function(_0x2377ea){return _0x2377ea;});}return null;})['then'](respondWithStatusCode(_0x3acc22,null))[_0x8472('0x3b')](handleError(_0x3acc22,null));};exports['addApplications']=function(_0x315699,_0x1d69f6){var _0x1c5e85=_0x315699['params']['id'];var _0x32f848=_0x315699[_0x8472('0x3f')];var _0x230665=0xc8;var _0x36a435=null;return db[_0x8472('0x51')][_0x8472('0x52')]({'isolationLevel':db[_0x8472('0x51')][_0x8472('0x53')][_0x8472('0x54')][_0x8472('0x55')]},function(_0x247818){return db[_0x8472('0x25')][_0x8472('0x56')]({'where':{'id':_0x1c5e85},'transaction':_0x247818})[_0x8472('0x13')](function(_0x22dce9){if(_0x22dce9){return db['VoiceExtension'][_0x8472('0x20')]({'where':{'VoiceExtensionId':_0x1c5e85},'transaction':_0x247818})[_0x8472('0x13')](function(){var _0x25335f=_[_0x8472('0x1b')](_0x32f848,function(_0x32d643){_0x32d643[_0x8472('0x57')]=_0x1c5e85;_0x32d643[_0x8472('0x58')]=!![];return _0x32d643;});return _0x22dce9[_0x8472('0x59')](_0x25335f);})[_0x8472('0x13')](function(_0x2214e4){return db[_0x8472('0x25')]['bulkCreate'](_0x2214e4,{'transaction':_0x247818});});}else{_0x230665=0x194;_0x36a435=[];}});})[_0x8472('0x13')](function(){if(_0x230665!==0x194){return db['VoiceExtension'][_0x8472('0x5a')]({'where':{'isApp':!![],'VoiceExtensionId':_0x1c5e85},'order':_0x8472('0x5b')})[_0x8472('0x13')](function(_0x5953a6){_0x36a435=_0x5953a6;});}})[_0x8472('0x3b')](function(_0x32e832){_0x230665=0x1f4;logger[_0x8472('0x22')](_0x32e832[_0x8472('0x5c')]);if(_0x32e832[_0x8472('0x23')]){delete _0x32e832[_0x8472('0x23')];}_0x36a435=_0x32e832;})[_0x8472('0x5d')](function(){if(_0x36a435===null){_0x1d69f6[_0x8472('0x21')](_0x230665);}else{if(_0x230665===0x1f4){_0x1d69f6[_0x8472('0xb')](_0x230665)['send'](_0x36a435);}else{_0x1d69f6[_0x8472('0xb')](_0x230665)[_0x8472('0xd')](_0x36a435);}}});};
\ No newline at end of file
index 26f0957..e403e75 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x74ed=['hasOwnProperty','hook','exports','events','../../mysqldb','VoiceExtension','setMaxListeners','save','update','remove','emit'];(function(_0x14eed8,_0x4b11c9){var _0x31956d=function(_0x27e244){while(--_0x27e244){_0x14eed8['push'](_0x14eed8['shift']());}};_0x31956d(++_0x4b11c9);}(_0x74ed,0xc9));var _0xd74e=function(_0x2c9731,_0x318505){_0x2c9731=_0x2c9731-0x0;var _0x1d0057=_0x74ed[_0x2c9731];return _0x1d0057;};'use strict';var EventEmitter=require(_0xd74e('0x0'));var VoiceExtension=require(_0xd74e('0x1'))['db'][_0xd74e('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0xd74e('0x3')](0x0);var events={'afterCreate':_0xd74e('0x4'),'afterUpdate':_0xd74e('0x5'),'afterDestroy':_0xd74e('0x6')};function emitEvent(_0x2b1bc7){return function(_0x48cbc3,_0x554d2f,_0x373b8e){VoiceExtensionEvents[_0xd74e('0x7')](_0x2b1bc7+':'+_0x48cbc3['id'],_0x48cbc3);VoiceExtensionEvents['emit'](_0x2b1bc7,_0x48cbc3);_0x373b8e(null);};}for(var e in events){if(events[_0xd74e('0x8')](e)){var event=events[e];VoiceExtension[_0xd74e('0x9')](e,emitEvent(event));}}module[_0xd74e('0xa')]=VoiceExtensionEvents;
\ No newline at end of file
+var _0x10c4=['hook','exports','events','../../mysqldb','save','remove','emit'];(function(_0x18fc00,_0x4a93d1){var _0x2ab2bd=function(_0x119745){while(--_0x119745){_0x18fc00['push'](_0x18fc00['shift']());}};_0x2ab2bd(++_0x4a93d1);}(_0x10c4,0x17c));var _0x410c=function(_0x1bd5b7,_0x5efc82){_0x1bd5b7=_0x1bd5b7-0x0;var _0x126235=_0x10c4[_0x1bd5b7];return _0x126235;};'use strict';var EventEmitter=require(_0x410c('0x0'));var VoiceExtension=require(_0x410c('0x1'))['db']['VoiceExtension'];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x410c('0x2'),'afterUpdate':'update','afterDestroy':_0x410c('0x3')};function emitEvent(_0x321db4){return function(_0x5ad004,_0x145d11,_0x141580){VoiceExtensionEvents[_0x410c('0x4')](_0x321db4+':'+_0x5ad004['id'],_0x5ad004);VoiceExtensionEvents[_0x410c('0x4')](_0x321db4,_0x5ad004);_0x141580(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceExtension[_0x410c('0x5')](e,emitEvent(event));}}module[_0x410c('0x6')]=VoiceExtensionEvents;
\ No newline at end of file
index 8fb88bd..2e103d9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf6d8=['queue','playback','includes','app','appType','$[${XCALLY-MOTION-ANSWER}=0]?Answer','$[${XCALLY-MOTION-PROGRESS}=0]?Progress','splice',',${EXTEN},','appdata','agi','XMCS-UNIQUEID=${CHANNEL(LINKEDID)}','last','concat','priority','catch','define','VoiceExtension','voice_extensions','then','lodash','./voiceExtension.attributes','exports','models','type','Set','CDR(type)=','exten','alias','NoOp','CDR(routeAlias)=','No\x20alias\x20set','context','inbound','push','MONITOR_OPTIONS=ab','CDR(type)=outbound','outbound','CDR(destination)=','cutdigits','${EXTEN:','${EXTEN}','ExecIf','$[${LEN(${CDR(prefix)})}\x20>\x200]?Goto(','CDR(prefix)=${EXTEN:0:','CDR(prefix)=noprefix','XCALLY-MOTION-ANSWER=0','XCALLY-MOTION-PROGRESS=0','outboundrouteid=','recordingFormat','none','wav','timeout','options','url','length','split','phone','prefix','SIP','trunk','join','param','indexOf','U(xcally-mixmonitor-context)','replace','Interval','findAll','interval','IntervalId','intervals','map','filter','toLowerCase','hasOwnProperty','tag','CDR(tag)=','callerID','NoOp(No\x20number\x20available)','answer'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0xf6d8,0xb4));var _0x8f6d=function(_0x362e6d,_0x4d40b0){_0x362e6d=_0x362e6d-0x0;var _0x416d99=_0xf6d8[_0x362e6d];return _0x416d99;};'use strict';var _=require(_0x8f6d('0x0'));var attributes=require(_0x8f6d('0x1'));module[_0x8f6d('0x2')]=function(_0x2f16a9){var _0x569061=_0x2f16a9[_0x8f6d('0x3')];function _0x145474(_0x554429){var _0x299f2e=0x2;var _0x1ec708=[{'type':_0x554429[_0x8f6d('0x4')],'app':_0x8f6d('0x5'),'appdata':_0x8f6d('0x6')+_0x554429['type'],'context':_0x554429['context'],'exten':_0x554429[_0x8f6d('0x7')],'priority':_0x299f2e++,'VoiceExtensionId':_0x554429['id']},{'type':_0x554429['type'],'app':_0x554429[_0x8f6d('0x8')]?_0x8f6d('0x5'):_0x8f6d('0x9'),'appdata':_0x554429[_0x8f6d('0x8')]?_0x8f6d('0xa')+_0x554429['alias']:_0x8f6d('0xb'),'context':_0x554429[_0x8f6d('0xc')],'exten':_0x554429[_0x8f6d('0x7')],'priority':_0x299f2e++,'VoiceExtensionId':_0x554429['id']}];if(_0x554429[_0x8f6d('0x4')]===_0x8f6d('0xd')){_0x1ec708['push']({'type':'inbound','app':_0x8f6d('0x5'),'appdata':'CDR(routeid)='+_0x554429['id'],'context':_0x554429[_0x8f6d('0xc')],'exten':_0x554429[_0x8f6d('0x7')],'priority':_0x299f2e++,'VoiceExtensionId':_0x554429['id']});}_0x1ec708[_0x8f6d('0xe')]({'type':_0x554429['type'],'app':_0x8f6d('0x5'),'appdata':'XCALLY-MOTION-ANSWER=0','context':_0x554429['context'],'exten':_0x554429[_0x8f6d('0x7')],'priority':_0x299f2e++,'VoiceExtensionId':_0x554429['id']},{'type':_0x554429['type'],'app':_0x8f6d('0x5'),'appdata':'XCALLY-MOTION-PROGRESS=0','context':_0x554429[_0x8f6d('0xc')],'exten':_0x554429[_0x8f6d('0x7')],'priority':_0x299f2e++,'VoiceExtensionId':_0x554429['id']},{'type':_0x554429[_0x8f6d('0x4')],'app':_0x8f6d('0x5'),'appdata':_0x8f6d('0xf'),'context':_0x554429['context'],'exten':_0x554429[_0x8f6d('0x7')],'priority':_0x299f2e++,'VoiceExtensionId':_0x554429['id']});return _0x1ec708;}function _0x37b7a7(_0x15d9bd){var _0x24d68b=0x2;var _0xc457b8=[{'type':'outbound','app':_0x8f6d('0x5'),'appdata':_0x8f6d('0x10'),'context':_0x15d9bd[_0x8f6d('0xc')],'exten':_0x15d9bd[_0x8f6d('0x7')],'priority':_0x24d68b++,'VoiceExtensionId':_0x15d9bd['id']},{'type':_0x8f6d('0x11'),'app':_0x15d9bd['alias']?_0x8f6d('0x5'):_0x8f6d('0x9'),'appdata':_0x15d9bd[_0x8f6d('0x8')]?'CDR(routeAlias)='+_0x15d9bd[_0x8f6d('0x8')]:_0x8f6d('0xb'),'context':_0x15d9bd[_0x8f6d('0xc')],'exten':_0x15d9bd[_0x8f6d('0x7')],'priority':_0x24d68b++,'VoiceExtensionId':_0x15d9bd['id']},{'type':_0x8f6d('0x11'),'app':_0x8f6d('0x5'),'appdata':_0x8f6d('0x12')+(_0x15d9bd[_0x8f6d('0x13')]?_0x8f6d('0x14')+_0x15d9bd[_0x8f6d('0x13')]+'}':_0x8f6d('0x15')),'context':_0x15d9bd['context'],'exten':_0x15d9bd[_0x8f6d('0x7')],'priority':_0x24d68b++,'VoiceExtensionId':_0x15d9bd['id']},{'type':'outbound','app':_0x8f6d('0x5'),'appdata':'CDR(routeid)='+_0x15d9bd['id'],'context':_0x15d9bd[_0x8f6d('0xc')],'exten':_0x15d9bd['exten'],'priority':_0x24d68b++,'VoiceExtensionId':_0x15d9bd['id']},{'type':'outbound','app':_0x8f6d('0x16'),'appdata':_0x8f6d('0x17')+(_0x24d68b+0x2)+'):Goto('+(_0x24d68b+0x1)+')','context':_0x15d9bd[_0x8f6d('0xc')],'exten':_0x15d9bd['exten'],'priority':_0x24d68b++,'VoiceExtensionId':_0x15d9bd['id']},{'type':_0x8f6d('0x11'),'app':'Set','appdata':_0x15d9bd[_0x8f6d('0x13')]?_0x8f6d('0x18')+_0x15d9bd[_0x8f6d('0x13')]+'}':_0x8f6d('0x19'),'context':_0x15d9bd[_0x8f6d('0xc')],'exten':_0x15d9bd[_0x8f6d('0x7')],'priority':_0x24d68b++,'VoiceExtensionId':_0x15d9bd['id']},{'type':_0x8f6d('0x11'),'app':_0x8f6d('0x5'),'appdata':_0x8f6d('0x1a'),'context':_0x15d9bd['context'],'exten':_0x15d9bd[_0x8f6d('0x7')],'priority':_0x24d68b++,'VoiceExtensionId':_0x15d9bd['id']},{'type':_0x8f6d('0x11'),'app':_0x8f6d('0x5'),'appdata':_0x8f6d('0x1b'),'context':_0x15d9bd['context'],'exten':_0x15d9bd['exten'],'priority':_0x24d68b++,'VoiceExtensionId':_0x15d9bd['id']},{'type':_0x8f6d('0x11'),'app':_0x8f6d('0x5'),'appdata':_0x8f6d('0xf'),'context':_0x15d9bd[_0x8f6d('0xc')],'exten':_0x15d9bd[_0x8f6d('0x7')],'priority':_0x24d68b++,'VoiceExtensionId':_0x15d9bd['id']},{'type':_0x8f6d('0x11'),'app':_0x8f6d('0x5'),'appdata':_0x8f6d('0x1c')+_0x15d9bd['id'],'context':_0x15d9bd[_0x8f6d('0xc')],'exten':_0x15d9bd[_0x8f6d('0x7')],'priority':_0x24d68b++,'VoiceExtensionId':_0x15d9bd['id']}];if(_0x15d9bd['hasOwnProperty'](_0x8f6d('0x1d'))&&_0x15d9bd[_0x8f6d('0x1d')]!==_0x8f6d('0x1e')){_0xc457b8[_0x8f6d('0xe')]({'type':_0x8f6d('0x11'),'app':_0x8f6d('0x5'),'appdata':'_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','context':_0x15d9bd[_0x8f6d('0xc')],'exten':_0x15d9bd[_0x8f6d('0x7')],'priority':_0x24d68b++,'VoiceExtensionId':_0x15d9bd['id']},{'type':'outbound','app':_0x8f6d('0x5'),'appdata':'_XCALLY_MIXMONITOR_FORMAT='+_0x15d9bd[_0x8f6d('0x1d')]||_0x8f6d('0x1f'),'context':_0x15d9bd[_0x8f6d('0xc')],'exten':_0x15d9bd[_0x8f6d('0x7')],'priority':_0x24d68b++,'VoiceExtensionId':_0x15d9bd['id']});}return _0xc457b8;}function _0x15dae9(_0x3149bb,_0xe92604){var _0x20305e=[{'name':'trunk','param':0x0},{'name':_0x8f6d('0x20'),'param':0x1},{'name':_0x8f6d('0x21'),'param':0x2},{'name':_0x8f6d('0x22'),'param':0x3}];var _0x486029={};var _0xb225e5=_0xe92604['split'](',');var _0x42f8ad=[];for(var _0x38f00c=0x0;_0x38f00c<_0x20305e[_0x8f6d('0x23')];_0x38f00c++){switch(_0x20305e[_0x38f00c]['name']){case'trunk':_0x486029['trunk']=_0xb225e5[_0x20305e[_0x38f00c]['param']][_0x8f6d('0x24')]('/')[0x1];_0x486029[_0x8f6d('0x25')]=_0xb225e5[_0x20305e[_0x38f00c]['param']][_0x8f6d('0x24')]('/')[0x2];_0x486029[_0x8f6d('0x26')]=_0x486029[_0x8f6d('0x25')]?_0x486029[_0x8f6d('0x25')][_0x8f6d('0x24')]('$')[0x0]:undefined;_0x486029[_0x8f6d('0x25')]=_0x3149bb[_0x8f6d('0x13')]?(_0x486029[_0x8f6d('0x26')]||'')+_0x8f6d('0x14')+_0x3149bb['cutdigits']+'}':(_0x486029[_0x8f6d('0x26')]||'')+_0x8f6d('0x15');_0x42f8ad[_0x20305e[_0x38f00c]['param']]=[_0x8f6d('0x27'),_0x486029[_0x8f6d('0x28')],_0x486029[_0x8f6d('0x25')]][_0x8f6d('0x29')]('/');break;case'options':_0x486029[_0x8f6d('0x21')]=_0xb225e5[_0x20305e[_0x38f00c][_0x8f6d('0x2a')]];if(_0x3149bb[_0x8f6d('0x1d')]!=='none'){if(_0x486029[_0x8f6d('0x21')][_0x8f6d('0x2b')]('U(xcally-mixmonitor-context)')<0x0){_0x486029['options']+=_0x8f6d('0x2c');}}else{_0x486029['options']=_0x486029[_0x8f6d('0x21')][_0x8f6d('0x2d')]('U(xcally-mixmonitor-context)','');}_0x42f8ad[_0x20305e[_0x38f00c][_0x8f6d('0x2a')]]=_0x486029[_0x8f6d('0x21')];break;default:_0x42f8ad[_0x20305e[_0x38f00c][_0x8f6d('0x2a')]]=_0xb225e5[_0x20305e[_0x38f00c]['param']];}}return _0x42f8ad[_0x8f6d('0x29')](',');}function _0x289aa2(_0x402656,_0x21f295,_0xedc45){return new Promise(function(_0x4d2372,_0x18541f){var _0x55d74f=[];if(_['isEmpty'](_0x21f295))return _0x4d2372(_0x55d74f);_0x569061[_0x8f6d('0x2e')][_0x8f6d('0x2f')]({'attributes':['id',_0x8f6d('0x30'),_0x8f6d('0x31')],'raw':!![]})['then'](function(_0x57f6ed){for(var _0x160ada=0x0,_0x1c47ed=0x0;_0x160ada<_0x21f295[_0x8f6d('0x23')];_0x160ada++,_0x1c47ed=0x0){var _0x5b4c3e=_0x21f295[_0x160ada];var _0x5aa5e6=[];var _0x3e9fd5=[];delete _0x5b4c3e['id'];if(_0x5b4c3e[_0x8f6d('0x30')]!=='*,*,*,*'){_0x5b4c3e[_0x8f6d('0x32')]=[_0x5b4c3e[_0x8f6d('0x30')]];}else{_0x5b4c3e[_0x8f6d('0x32')]=_0x5b4c3e[_0x8f6d('0x31')]?_[_0x8f6d('0x33')](_[_0x8f6d('0x34')](_0x57f6ed,{'IntervalId':_0x5b4c3e['IntervalId']}),_0x8f6d('0x30')):[];}_0x5b4c3e[_0x8f6d('0xc')]=_0x402656[_0x8f6d('0xc')];_0x5b4c3e[_0x8f6d('0x7')]=_0x402656[_0x8f6d('0x7')];if(_0x5b4c3e[_0x8f6d('0x4')])_0x5b4c3e[_0x8f6d('0x4')]=_0x5b4c3e['type'][_0x8f6d('0x35')]();if(_0x402656[_0x8f6d('0x4')]===_0x8f6d('0x11')){if(_0x5b4c3e[_0x8f6d('0x36')](_0x8f6d('0x37'))&&_0x5b4c3e['tag']&&_0x5b4c3e[_0x8f6d('0x37')]!=='--'){_0x5aa5e6['push']({'type':_0x5b4c3e[_0x8f6d('0x4')]['toLowerCase'](),'app':_0x8f6d('0x5'),'appdata':_0x8f6d('0x38')+_0x5b4c3e[_0x8f6d('0x37')],'context':_0x402656[_0x8f6d('0xc')],'exten':_0x402656[_0x8f6d('0x7')],'priority':_0x5b4c3e[_0x8f6d('0x32')][_0x8f6d('0x23')]+_0xedc45+_0x1c47ed++,'VoiceExtensionId':_0x402656['id']});}_0x5aa5e6['push']({'type':_0x5b4c3e['type'][_0x8f6d('0x35')](),'app':_0x8f6d('0x16'),'appdata':'$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):'+(_0x5b4c3e[_0x8f6d('0x39')]?'Set(CALLERID(all)='+_0x5b4c3e[_0x8f6d('0x39')]+')':_0x8f6d('0x3a')),'context':_0x402656['context'],'exten':_0x402656[_0x8f6d('0x7')],'priority':_0x5b4c3e[_0x8f6d('0x32')][_0x8f6d('0x23')]+_0xedc45+_0x1c47ed++,'VoiceExtensionId':_0x402656['id']});}else{if(_0x5b4c3e['hasOwnProperty'](_0x8f6d('0x3b'))){if([_0x8f6d('0x3c'),_0x8f6d('0x3d')][_0x8f6d('0x3e')](_0x5b4c3e[_0x8f6d('0x3f')][_0x8f6d('0x35')]())&&_0x5b4c3e[_0x8f6d('0x40')]!=='custom'){if(_0x5b4c3e['answer']){_0x5aa5e6[_0x8f6d('0xe')]({'type':_0x5b4c3e['type'][_0x8f6d('0x35')](),'app':'ExecIf','appdata':_0x8f6d('0x41'),'context':_0x402656['context'],'exten':_0x402656['exten'],'priority':_0x5b4c3e[_0x8f6d('0x32')][_0x8f6d('0x23')]+_0xedc45+_0x1c47ed++,'VoiceExtensionId':_0x402656['id']});_0x5aa5e6['push']({'type':_0x5b4c3e['type'][_0x8f6d('0x35')](),'app':_0x8f6d('0x5'),'appdata':'XCALLY-MOTION-ANSWER=1','context':_0x402656['context'],'exten':_0x402656['exten'],'priority':_0x5b4c3e[_0x8f6d('0x32')][_0x8f6d('0x23')]+_0xedc45+_0x1c47ed++,'VoiceExtensionId':_0x402656['id']});}else{_0x5aa5e6[_0x8f6d('0xe')]({'type':_0x5b4c3e[_0x8f6d('0x4')][_0x8f6d('0x35')](),'app':_0x8f6d('0x16'),'appdata':_0x8f6d('0x42'),'context':_0x402656['context'],'exten':_0x402656[_0x8f6d('0x7')],'priority':_0x5b4c3e[_0x8f6d('0x32')][_0x8f6d('0x23')]+_0xedc45+_0x1c47ed++,'VoiceExtensionId':_0x402656['id']});_0x5aa5e6[_0x8f6d('0xe')]({'type':_0x5b4c3e['type'][_0x8f6d('0x35')](),'app':'Set','appdata':'XCALLY-MOTION-PROGRESS=1','context':_0x402656[_0x8f6d('0xc')],'exten':_0x402656['exten'],'priority':_0x5b4c3e['intervals'][_0x8f6d('0x23')]+_0xedc45+_0x1c47ed++,'VoiceExtensionId':_0x402656['id']});}}}}for(var _0x5dc219=0x0;_0x5dc219<_0x5b4c3e['intervals']['length'];_0x5dc219++){var _0x97ebf9=_0xedc45+_0x5b4c3e['intervals']['length'];var _0x122fd0=_0x5dc219===_0x5b4c3e[_0x8f6d('0x32')][_0x8f6d('0x23')]-0x1?_0xedc45+_0x5aa5e6['length']+_0x3e9fd5[_0x8f6d('0x23')]+0x2:_0xedc45+_0x5dc219+0x1;_0x5aa5e6[_0x8f6d('0x43')](_0x5dc219,0x0,{'type':_0x402656[_0x8f6d('0x4')],'app':'GotoIfTime','appdata':_0x5b4c3e[_0x8f6d('0x32')][_0x5dc219]+'?'+_0x402656[_0x8f6d('0xc')]+_0x8f6d('0x44')+_0x97ebf9+':'+_0x402656['context']+_0x8f6d('0x44')+_0x122fd0,'exten':_0x402656[_0x8f6d('0x7')],'context':_0x402656[_0x8f6d('0xc')],'priority':_0xedc45+_0x5dc219,'VoiceExtensionId':_0x402656['id']});}if(_0x5b4c3e[_0x8f6d('0x40')]==='outboundDial'){_0x5b4c3e[_0x8f6d('0x45')]=_0x15dae9(_0x402656,_0x5b4c3e[_0x8f6d('0x45')]);}if(_0x5b4c3e[_0x8f6d('0x40')]===_0x8f6d('0x46')){_0x5aa5e6[_0x8f6d('0xe')]({'type':_0x5b4c3e[_0x8f6d('0x4')][_0x8f6d('0x35')](),'app':_0x8f6d('0x5'),'appdata':_0x8f6d('0x47'),'context':_0x402656['context'],'exten':_0x402656['exten'],'priority':_0x5b4c3e[_0x8f6d('0x32')][_0x8f6d('0x23')]+_0xedc45+_0x1c47ed++,'VoiceExtensionId':_0x402656['id']});}_0x5b4c3e['priority']=_0x5aa5e6['length']?_[_0x8f6d('0x48')](_0x5aa5e6)['priority']+0x1:_0xedc45;_0x55d74f=_[_0x8f6d('0x49')](_0x55d74f,_0x5aa5e6,[_0x5b4c3e],_0x3e9fd5);_0xedc45=_['last'](_0x55d74f)[_0x8f6d('0x4a')]+0x1;}return _0x4d2372(_0x55d74f);})[_0x8f6d('0x4b')](function(_0x39401e){_0x18541f(_0x39401e);});});}return _0x2f16a9[_0x8f6d('0x4c')](_0x8f6d('0x4d'),attributes,{'tableName':_0x8f6d('0x4e'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'createRouting':function(_0x5279cb){var _0x3c9455=this['get']({'plain':!![]});var _0x336710=_0x3c9455['type']==='outbound'?_0x37b7a7(_0x3c9455):_0x145474(_0x3c9455);return _0x289aa2(_0x3c9455,_0x5279cb,_[_0x8f6d('0x48')](_0x336710)[_0x8f6d('0x4a')]+0x1)[_0x8f6d('0x4f')](function(_0x4845cd){var _0x4843a8=_[_0x8f6d('0x49')](_0x336710,_0x4845cd);_0x4843a8[_0x8f6d('0xe')]({'type':_0x3c9455[_0x8f6d('0x4')],'app':'Hangup','exten':_0x3c9455['exten'],'context':_0x3c9455[_0x8f6d('0xc')],'priority':_[_0x8f6d('0x48')](_0x4843a8)[_0x8f6d('0x4a')]+0x1,'VoiceExtensionId':_0x3c9455['id']});return _0x4843a8;});}}});};
\ No newline at end of file
+var _0x64f7=['catch','define','VoiceExtension','voice_extensions','get','concat','Hangup','./voiceExtension.attributes','exports','type','context','exten','NoOp','CDR(routeAlias)=','alias','No\x20alias\x20set','inbound','Set','CDR(routeid)=','push','XCALLY-MOTION-PROGRESS=0','MONITOR_OPTIONS=ab','outbound','CDR(type)=outbound','CDR(destination)=','cutdigits','ExecIf','$[${LEN(${CDR(prefix)})}\x20>\x200]?Goto(','CDR(prefix)=${EXTEN:0:','outboundrouteid=','hasOwnProperty','recordingFormat','_XCALLY_MIXMONITOR_FORMAT=','wav','timeout','options','url','length','trunk','param','phone','split','prefix','${EXTEN:','${EXTEN}','SIP','none','U(xcally-mixmonitor-context)','replace','join','isEmpty','Interval','findAll','interval','IntervalId','then','intervals','map','tag','toLowerCase','CDR(tag)=','callerID','Set(CALLERID(all)=','playback','includes','app','custom','answer','$[${XCALLY-MOTION-ANSWER}=0]?Answer','XCALLY-MOTION-PROGRESS=1','splice',',${EXTEN},','appType','appdata','agi','XMCS-UNIQUEID=${CHANNEL(LINKEDID)}','priority','last'];(function(_0x1298e5,_0x429a78){var _0x39d2b0=function(_0x5dd000){while(--_0x5dd000){_0x1298e5['push'](_0x1298e5['shift']());}};_0x39d2b0(++_0x429a78);}(_0x64f7,0xa3));var _0x764f=function(_0x1c190b,_0x12bfb1){_0x1c190b=_0x1c190b-0x0;var _0x53535a=_0x64f7[_0x1c190b];return _0x53535a;};'use strict';var _=require('lodash');var attributes=require(_0x764f('0x0'));module[_0x764f('0x1')]=function(_0x368a80){var _0x585aff=_0x368a80['models'];function _0x5f0064(_0x183ed3){var _0x594a2d=0x2;var _0x425fc4=[{'type':_0x183ed3[_0x764f('0x2')],'app':'Set','appdata':'CDR(type)='+_0x183ed3['type'],'context':_0x183ed3[_0x764f('0x3')],'exten':_0x183ed3[_0x764f('0x4')],'priority':_0x594a2d++,'VoiceExtensionId':_0x183ed3['id']},{'type':_0x183ed3[_0x764f('0x2')],'app':_0x183ed3['alias']?'Set':_0x764f('0x5'),'appdata':_0x183ed3['alias']?_0x764f('0x6')+_0x183ed3[_0x764f('0x7')]:_0x764f('0x8'),'context':_0x183ed3['context'],'exten':_0x183ed3[_0x764f('0x4')],'priority':_0x594a2d++,'VoiceExtensionId':_0x183ed3['id']}];if(_0x183ed3['type']==='inbound'){_0x425fc4['push']({'type':_0x764f('0x9'),'app':_0x764f('0xa'),'appdata':_0x764f('0xb')+_0x183ed3['id'],'context':_0x183ed3['context'],'exten':_0x183ed3[_0x764f('0x4')],'priority':_0x594a2d++,'VoiceExtensionId':_0x183ed3['id']});}_0x425fc4[_0x764f('0xc')]({'type':_0x183ed3[_0x764f('0x2')],'app':_0x764f('0xa'),'appdata':'XCALLY-MOTION-ANSWER=0','context':_0x183ed3[_0x764f('0x3')],'exten':_0x183ed3[_0x764f('0x4')],'priority':_0x594a2d++,'VoiceExtensionId':_0x183ed3['id']},{'type':_0x183ed3[_0x764f('0x2')],'app':_0x764f('0xa'),'appdata':_0x764f('0xd'),'context':_0x183ed3[_0x764f('0x3')],'exten':_0x183ed3[_0x764f('0x4')],'priority':_0x594a2d++,'VoiceExtensionId':_0x183ed3['id']},{'type':_0x183ed3[_0x764f('0x2')],'app':'Set','appdata':_0x764f('0xe'),'context':_0x183ed3[_0x764f('0x3')],'exten':_0x183ed3[_0x764f('0x4')],'priority':_0x594a2d++,'VoiceExtensionId':_0x183ed3['id']});return _0x425fc4;}function _0x3e3316(_0x1f4265){var _0x3cceb8=0x2;var _0x139e46=[{'type':_0x764f('0xf'),'app':_0x764f('0xa'),'appdata':_0x764f('0x10'),'context':_0x1f4265[_0x764f('0x3')],'exten':_0x1f4265['exten'],'priority':_0x3cceb8++,'VoiceExtensionId':_0x1f4265['id']},{'type':_0x764f('0xf'),'app':_0x1f4265[_0x764f('0x7')]?_0x764f('0xa'):_0x764f('0x5'),'appdata':_0x1f4265['alias']?'CDR(routeAlias)='+_0x1f4265[_0x764f('0x7')]:_0x764f('0x8'),'context':_0x1f4265[_0x764f('0x3')],'exten':_0x1f4265['exten'],'priority':_0x3cceb8++,'VoiceExtensionId':_0x1f4265['id']},{'type':_0x764f('0xf'),'app':_0x764f('0xa'),'appdata':_0x764f('0x11')+(_0x1f4265['cutdigits']?'${EXTEN:'+_0x1f4265[_0x764f('0x12')]+'}':'${EXTEN}'),'context':_0x1f4265[_0x764f('0x3')],'exten':_0x1f4265[_0x764f('0x4')],'priority':_0x3cceb8++,'VoiceExtensionId':_0x1f4265['id']},{'type':_0x764f('0xf'),'app':_0x764f('0xa'),'appdata':_0x764f('0xb')+_0x1f4265['id'],'context':_0x1f4265[_0x764f('0x3')],'exten':_0x1f4265[_0x764f('0x4')],'priority':_0x3cceb8++,'VoiceExtensionId':_0x1f4265['id']},{'type':_0x764f('0xf'),'app':_0x764f('0x13'),'appdata':_0x764f('0x14')+(_0x3cceb8+0x2)+'):Goto('+(_0x3cceb8+0x1)+')','context':_0x1f4265['context'],'exten':_0x1f4265['exten'],'priority':_0x3cceb8++,'VoiceExtensionId':_0x1f4265['id']},{'type':_0x764f('0xf'),'app':_0x764f('0xa'),'appdata':_0x1f4265[_0x764f('0x12')]?_0x764f('0x15')+_0x1f4265[_0x764f('0x12')]+'}':'CDR(prefix)=noprefix','context':_0x1f4265[_0x764f('0x3')],'exten':_0x1f4265[_0x764f('0x4')],'priority':_0x3cceb8++,'VoiceExtensionId':_0x1f4265['id']},{'type':_0x764f('0xf'),'app':_0x764f('0xa'),'appdata':'XCALLY-MOTION-ANSWER=0','context':_0x1f4265['context'],'exten':_0x1f4265[_0x764f('0x4')],'priority':_0x3cceb8++,'VoiceExtensionId':_0x1f4265['id']},{'type':_0x764f('0xf'),'app':_0x764f('0xa'),'appdata':_0x764f('0xd'),'context':_0x1f4265[_0x764f('0x3')],'exten':_0x1f4265[_0x764f('0x4')],'priority':_0x3cceb8++,'VoiceExtensionId':_0x1f4265['id']},{'type':'outbound','app':_0x764f('0xa'),'appdata':_0x764f('0xe'),'context':_0x1f4265[_0x764f('0x3')],'exten':_0x1f4265[_0x764f('0x4')],'priority':_0x3cceb8++,'VoiceExtensionId':_0x1f4265['id']},{'type':_0x764f('0xf'),'app':_0x764f('0xa'),'appdata':_0x764f('0x16')+_0x1f4265['id'],'context':_0x1f4265[_0x764f('0x3')],'exten':_0x1f4265[_0x764f('0x4')],'priority':_0x3cceb8++,'VoiceExtensionId':_0x1f4265['id']}];if(_0x1f4265[_0x764f('0x17')](_0x764f('0x18'))&&_0x1f4265['recordingFormat']!=='none'){_0x139e46[_0x764f('0xc')]({'type':_0x764f('0xf'),'app':_0x764f('0xa'),'appdata':'_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','context':_0x1f4265[_0x764f('0x3')],'exten':_0x1f4265[_0x764f('0x4')],'priority':_0x3cceb8++,'VoiceExtensionId':_0x1f4265['id']},{'type':'outbound','app':_0x764f('0xa'),'appdata':_0x764f('0x19')+_0x1f4265['recordingFormat']||_0x764f('0x1a'),'context':_0x1f4265[_0x764f('0x3')],'exten':_0x1f4265[_0x764f('0x4')],'priority':_0x3cceb8++,'VoiceExtensionId':_0x1f4265['id']});}return _0x139e46;}function _0x2f5403(_0x21c1cc,_0x584478){var _0x536e31=[{'name':'trunk','param':0x0},{'name':_0x764f('0x1b'),'param':0x1},{'name':_0x764f('0x1c'),'param':0x2},{'name':_0x764f('0x1d'),'param':0x3}];var _0x2247df={};var _0x42c7f8=_0x584478['split'](',');var _0x36cfd0=[];for(var _0x35937a=0x0;_0x35937a<_0x536e31[_0x764f('0x1e')];_0x35937a++){switch(_0x536e31[_0x35937a]['name']){case _0x764f('0x1f'):_0x2247df[_0x764f('0x1f')]=_0x42c7f8[_0x536e31[_0x35937a][_0x764f('0x20')]]['split']('/')[0x1];_0x2247df[_0x764f('0x21')]=_0x42c7f8[_0x536e31[_0x35937a][_0x764f('0x20')]][_0x764f('0x22')]('/')[0x2];_0x2247df['prefix']=_0x2247df[_0x764f('0x21')]?_0x2247df[_0x764f('0x21')]['split']('$')[0x0]:undefined;_0x2247df[_0x764f('0x21')]=_0x21c1cc[_0x764f('0x12')]?(_0x2247df[_0x764f('0x23')]||'')+_0x764f('0x24')+_0x21c1cc[_0x764f('0x12')]+'}':(_0x2247df['prefix']||'')+_0x764f('0x25');_0x36cfd0[_0x536e31[_0x35937a][_0x764f('0x20')]]=[_0x764f('0x26'),_0x2247df[_0x764f('0x1f')],_0x2247df[_0x764f('0x21')]]['join']('/');break;case _0x764f('0x1c'):_0x2247df['options']=_0x42c7f8[_0x536e31[_0x35937a]['param']];if(_0x21c1cc['recordingFormat']!==_0x764f('0x27')){if(_0x2247df[_0x764f('0x1c')]['indexOf'](_0x764f('0x28'))<0x0){_0x2247df['options']+=_0x764f('0x28');}}else{_0x2247df[_0x764f('0x1c')]=_0x2247df[_0x764f('0x1c')][_0x764f('0x29')](_0x764f('0x28'),'');}_0x36cfd0[_0x536e31[_0x35937a][_0x764f('0x20')]]=_0x2247df[_0x764f('0x1c')];break;default:_0x36cfd0[_0x536e31[_0x35937a][_0x764f('0x20')]]=_0x42c7f8[_0x536e31[_0x35937a][_0x764f('0x20')]];}}return _0x36cfd0[_0x764f('0x2a')](',');}function _0x1aad7d(_0x41b5a0,_0x4a5eac,_0x98460c){return new Promise(function(_0x3aa761,_0x3595e9){var _0x1f800b=[];if(_[_0x764f('0x2b')](_0x4a5eac))return _0x3aa761(_0x1f800b);_0x585aff[_0x764f('0x2c')][_0x764f('0x2d')]({'attributes':['id',_0x764f('0x2e'),_0x764f('0x2f')],'raw':!![]})[_0x764f('0x30')](function(_0x4f7b40){for(var _0x10a032=0x0,_0x1f967e=0x0;_0x10a032<_0x4a5eac[_0x764f('0x1e')];_0x10a032++,_0x1f967e=0x0){var _0x2f686f=_0x4a5eac[_0x10a032];var _0x5e1e29=[];var _0x4e7117=[];delete _0x2f686f['id'];if(_0x2f686f[_0x764f('0x2e')]!=='*,*,*,*'){_0x2f686f[_0x764f('0x31')]=[_0x2f686f['interval']];}else{_0x2f686f['intervals']=_0x2f686f['IntervalId']?_[_0x764f('0x32')](_['filter'](_0x4f7b40,{'IntervalId':_0x2f686f['IntervalId']}),'interval'):[];}_0x2f686f[_0x764f('0x3')]=_0x41b5a0[_0x764f('0x3')];_0x2f686f[_0x764f('0x4')]=_0x41b5a0[_0x764f('0x4')];if(_0x2f686f[_0x764f('0x2')])_0x2f686f[_0x764f('0x2')]=_0x2f686f[_0x764f('0x2')]['toLowerCase']();if(_0x41b5a0[_0x764f('0x2')]===_0x764f('0xf')){if(_0x2f686f[_0x764f('0x17')](_0x764f('0x33'))&&_0x2f686f['tag']&&_0x2f686f[_0x764f('0x33')]!=='--'){_0x5e1e29[_0x764f('0xc')]({'type':_0x2f686f[_0x764f('0x2')][_0x764f('0x34')](),'app':'Set','appdata':_0x764f('0x35')+_0x2f686f['tag'],'context':_0x41b5a0[_0x764f('0x3')],'exten':_0x41b5a0[_0x764f('0x4')],'priority':_0x2f686f[_0x764f('0x31')]['length']+_0x98460c+_0x1f967e++,'VoiceExtensionId':_0x41b5a0['id']});}_0x5e1e29[_0x764f('0xc')]({'type':_0x2f686f[_0x764f('0x2')][_0x764f('0x34')](),'app':_0x764f('0x13'),'appdata':'$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):'+(_0x2f686f[_0x764f('0x36')]?_0x764f('0x37')+_0x2f686f[_0x764f('0x36')]+')':'NoOp(No\x20number\x20available)'),'context':_0x41b5a0[_0x764f('0x3')],'exten':_0x41b5a0[_0x764f('0x4')],'priority':_0x2f686f[_0x764f('0x31')][_0x764f('0x1e')]+_0x98460c+_0x1f967e++,'VoiceExtensionId':_0x41b5a0['id']});}else{if(_0x2f686f[_0x764f('0x17')]('answer')){if(['queue',_0x764f('0x38')][_0x764f('0x39')](_0x2f686f[_0x764f('0x3a')]['toLowerCase']())&&_0x2f686f['appType']!==_0x764f('0x3b')){if(_0x2f686f[_0x764f('0x3c')]){_0x5e1e29['push']({'type':_0x2f686f[_0x764f('0x2')][_0x764f('0x34')](),'app':_0x764f('0x13'),'appdata':_0x764f('0x3d'),'context':_0x41b5a0[_0x764f('0x3')],'exten':_0x41b5a0[_0x764f('0x4')],'priority':_0x2f686f['intervals'][_0x764f('0x1e')]+_0x98460c+_0x1f967e++,'VoiceExtensionId':_0x41b5a0['id']});_0x5e1e29[_0x764f('0xc')]({'type':_0x2f686f[_0x764f('0x2')][_0x764f('0x34')](),'app':_0x764f('0xa'),'appdata':'XCALLY-MOTION-ANSWER=1','context':_0x41b5a0['context'],'exten':_0x41b5a0[_0x764f('0x4')],'priority':_0x2f686f[_0x764f('0x31')][_0x764f('0x1e')]+_0x98460c+_0x1f967e++,'VoiceExtensionId':_0x41b5a0['id']});}else{_0x5e1e29[_0x764f('0xc')]({'type':_0x2f686f[_0x764f('0x2')]['toLowerCase'](),'app':_0x764f('0x13'),'appdata':'$[${XCALLY-MOTION-PROGRESS}=0]?Progress','context':_0x41b5a0['context'],'exten':_0x41b5a0[_0x764f('0x4')],'priority':_0x2f686f['intervals']['length']+_0x98460c+_0x1f967e++,'VoiceExtensionId':_0x41b5a0['id']});_0x5e1e29[_0x764f('0xc')]({'type':_0x2f686f[_0x764f('0x2')]['toLowerCase'](),'app':_0x764f('0xa'),'appdata':_0x764f('0x3e'),'context':_0x41b5a0[_0x764f('0x3')],'exten':_0x41b5a0[_0x764f('0x4')],'priority':_0x2f686f['intervals'][_0x764f('0x1e')]+_0x98460c+_0x1f967e++,'VoiceExtensionId':_0x41b5a0['id']});}}}}for(var _0x18c1e0=0x0;_0x18c1e0<_0x2f686f[_0x764f('0x31')][_0x764f('0x1e')];_0x18c1e0++){var _0x8ac1c0=_0x98460c+_0x2f686f[_0x764f('0x31')][_0x764f('0x1e')];var _0x38c565=_0x18c1e0===_0x2f686f['intervals'][_0x764f('0x1e')]-0x1?_0x98460c+_0x5e1e29[_0x764f('0x1e')]+_0x4e7117[_0x764f('0x1e')]+0x2:_0x98460c+_0x18c1e0+0x1;_0x5e1e29[_0x764f('0x3f')](_0x18c1e0,0x0,{'type':_0x41b5a0['type'],'app':'GotoIfTime','appdata':_0x2f686f['intervals'][_0x18c1e0]+'?'+_0x41b5a0[_0x764f('0x3')]+_0x764f('0x40')+_0x8ac1c0+':'+_0x41b5a0[_0x764f('0x3')]+',${EXTEN},'+_0x38c565,'exten':_0x41b5a0[_0x764f('0x4')],'context':_0x41b5a0['context'],'priority':_0x98460c+_0x18c1e0,'VoiceExtensionId':_0x41b5a0['id']});}if(_0x2f686f[_0x764f('0x41')]==='outboundDial'){_0x2f686f[_0x764f('0x42')]=_0x2f5403(_0x41b5a0,_0x2f686f[_0x764f('0x42')]);}if(_0x2f686f[_0x764f('0x41')]===_0x764f('0x43')){_0x5e1e29[_0x764f('0xc')]({'type':_0x2f686f['type'][_0x764f('0x34')](),'app':_0x764f('0xa'),'appdata':_0x764f('0x44'),'context':_0x41b5a0['context'],'exten':_0x41b5a0[_0x764f('0x4')],'priority':_0x2f686f['intervals'][_0x764f('0x1e')]+_0x98460c+_0x1f967e++,'VoiceExtensionId':_0x41b5a0['id']});}_0x2f686f[_0x764f('0x45')]=_0x5e1e29[_0x764f('0x1e')]?_[_0x764f('0x46')](_0x5e1e29)[_0x764f('0x45')]+0x1:_0x98460c;_0x1f800b=_['concat'](_0x1f800b,_0x5e1e29,[_0x2f686f],_0x4e7117);_0x98460c=_[_0x764f('0x46')](_0x1f800b)[_0x764f('0x45')]+0x1;}return _0x3aa761(_0x1f800b);})[_0x764f('0x47')](function(_0xdad216){_0x3595e9(_0xdad216);});});}return _0x368a80[_0x764f('0x48')](_0x764f('0x49'),attributes,{'tableName':_0x764f('0x4a'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'createRouting':function(_0x354e28){var _0x25d507=this[_0x764f('0x4b')]({'plain':!![]});var _0x1760ac=_0x25d507[_0x764f('0x2')]===_0x764f('0xf')?_0x3e3316(_0x25d507):_0x5f0064(_0x25d507);return _0x1aad7d(_0x25d507,_0x354e28,_[_0x764f('0x46')](_0x1760ac)['priority']+0x1)[_0x764f('0x30')](function(_0x2daedb){var _0x146615=_[_0x764f('0x4c')](_0x1760ac,_0x2daedb);_0x146615[_0x764f('0xc')]({'type':_0x25d507[_0x764f('0x2')],'app':_0x764f('0x4d'),'exten':_0x25d507[_0x764f('0x4')],'context':_0x25d507[_0x764f('0x3')],'priority':_[_0x764f('0x46')](_0x146615)[_0x764f('0x45')]+0x1,'VoiceExtensionId':_0x25d507['id']});return _0x146615;});}}});};
\ No newline at end of file
index 8e0a427..5c62db0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa786=['catch','VoiceExtension','options','raw','attributes','include','map','model','debug','GetVoiceExtension','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./voiceExtension.socket','register','request','then','VoiceExtension,\x20%s,\x20%s','request\x20sent','VoiceExtension,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result'];(function(_0xeef5ad,_0xf6e1c7){var _0xdd8699=function(_0x5ca2fe){while(--_0x5ca2fe){_0xeef5ad['push'](_0xeef5ad['shift']());}};_0xdd8699(++_0xf6e1c7);}(_0xa786,0x1d2));var _0x6a78=function(_0x178f92,_0x4a35d5){_0x178f92=_0x178f92-0x0;var _0x2b0a2d=_0xa786[_0x178f92];return _0x2b0a2d;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x6a78('0x0'));var BPromise=require(_0x6a78('0x1'));var rs=require(_0x6a78('0x2'));var fs=require('fs');var Redis=require(_0x6a78('0x3'));var db=require(_0x6a78('0x4'))['db'];var utils=require(_0x6a78('0x5'));var logger=require(_0x6a78('0x6'))('rpc');var config=require(_0x6a78('0x7'));var jayson=require(_0x6a78('0x8'));var client=jayson[_0x6a78('0x9')][_0x6a78('0xa')]({'port':0x232a});config[_0x6a78('0xb')]=_[_0x6a78('0xc')](config[_0x6a78('0xb')],{'host':_0x6a78('0xd'),'port':0x18eb});var socket=require(_0x6a78('0xe'))(new Redis(config[_0x6a78('0xb')]));require(_0x6a78('0xf'))[_0x6a78('0x10')](socket);function respondWithRpcPromise(_0x306116,_0x2fb93e,_0x2ff853){return new BPromise(function(_0x2641ed,_0x3c414c){return client[_0x6a78('0x11')](_0x306116,_0x2ff853)[_0x6a78('0x12')](function(_0x595e3e){logger['info'](_0x6a78('0x13'),_0x2fb93e,_0x6a78('0x14'));logger['debug'](_0x6a78('0x15'),_0x2fb93e,_0x6a78('0x14'),JSON[_0x6a78('0x16')](_0x595e3e));if(_0x595e3e[_0x6a78('0x17')]){if(_0x595e3e[_0x6a78('0x17')][_0x6a78('0x18')]===0x1f4){logger[_0x6a78('0x17')]('VoiceExtension,\x20%s,\x20%s',_0x2fb93e,_0x595e3e['error']['message']);return _0x3c414c(_0x595e3e[_0x6a78('0x17')][_0x6a78('0x19')]);}logger[_0x6a78('0x17')]('VoiceExtension,\x20%s,\x20%s',_0x2fb93e,_0x595e3e[_0x6a78('0x17')][_0x6a78('0x19')]);return _0x2641ed(_0x595e3e['error'][_0x6a78('0x19')]);}else{logger[_0x6a78('0x1a')](_0x6a78('0x13'),_0x2fb93e,_0x6a78('0x14'));_0x2641ed(_0x595e3e[_0x6a78('0x1b')][_0x6a78('0x19')]);}})[_0x6a78('0x1c')](function(_0x3c3e5d){logger['error'](_0x6a78('0x13'),_0x2fb93e,_0x3c3e5d);_0x3c414c(_0x3c3e5d);});});}exports['GetVoiceExtension']=function(_0x216365){var _0xee82ac=this;return new Promise(function(_0x2ae9c5,_0x5d135e){return db[_0x6a78('0x1d')]['findAll']({'raw':_0x216365[_0x6a78('0x1e')]?_0x216365['options'][_0x6a78('0x1f')]===undefined?!![]:![]:!![],'where':_0x216365['options']?_0x216365[_0x6a78('0x1e')]['where']||null:null,'attributes':_0x216365['options']?_0x216365['options'][_0x6a78('0x20')]||null:null,'limit':_0x216365[_0x6a78('0x1e')]?_0x216365[_0x6a78('0x1e')]['limit']||null:null,'include':_0x216365[_0x6a78('0x1e')]?_0x216365[_0x6a78('0x1e')][_0x6a78('0x21')]?_[_0x6a78('0x22')](_0x216365['options'][_0x6a78('0x21')],function(_0x5ba74f){return{'model':db[_0x5ba74f[_0x6a78('0x23')]],'as':_0x5ba74f['as'],'attributes':_0x5ba74f[_0x6a78('0x20')],'include':_0x5ba74f[_0x6a78('0x21')]?_[_0x6a78('0x22')](_0x5ba74f['include'],function(_0x3eb79f){return{'model':db[_0x3eb79f[_0x6a78('0x23')]],'as':_0x3eb79f['as'],'attributes':_0x3eb79f['attributes'],'include':_0x3eb79f[_0x6a78('0x21')]?_['map'](_0x3eb79f[_0x6a78('0x21')],function(_0x48c692){return{'model':db[_0x48c692[_0x6a78('0x23')]],'as':_0x48c692['as'],'attributes':_0x48c692[_0x6a78('0x20')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x31ca28){logger[_0x6a78('0x1a')]('GetVoiceExtension',_0x216365);logger[_0x6a78('0x24')](_0x6a78('0x25'),_0x216365,JSON['stringify'](_0x31ca28));_0x2ae9c5(_0x31ca28);})[_0x6a78('0x1c')](function(_0x86d08f){logger[_0x6a78('0x17')](_0x6a78('0x25'),_0x86d08f[_0x6a78('0x19')],_0x216365);_0x5d135e(_0xee82ac[_0x6a78('0x17')](0x1f4,_0x86d08f[_0x6a78('0x19')]));});});};
\ No newline at end of file
+var _0x15b2=['stringify','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./voiceExtension.socket','register','request','info','request\x20sent','error','code','VoiceExtension,\x20%s,\x20%s','message','result','catch','VoiceExtension','findAll','options','raw','include','map','model','attributes','then','debug','GetVoiceExtension'];(function(_0x19d591,_0xc2d9b6){var _0x29da9b=function(_0x4a57a1){while(--_0x4a57a1){_0x19d591['push'](_0x19d591['shift']());}};_0x29da9b(++_0xc2d9b6);}(_0x15b2,0x145));var _0x215b=function(_0xdc42d1,_0x458707){_0xdc42d1=_0xdc42d1-0x0;var _0x3cf972=_0x15b2[_0xdc42d1];return _0x3cf972;};'use strict';var _=require('lodash');var util=require(_0x215b('0x0'));var moment=require('moment');var BPromise=require(_0x215b('0x1'));var rs=require(_0x215b('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x215b('0x3'))['db'];var utils=require(_0x215b('0x4'));var logger=require(_0x215b('0x5'))(_0x215b('0x6'));var config=require('../../config/environment');var jayson=require(_0x215b('0x7'));var client=jayson['client'][_0x215b('0x8')]({'port':0x232a});config[_0x215b('0x9')]=_[_0x215b('0xa')](config[_0x215b('0x9')],{'host':_0x215b('0xb'),'port':0x18eb});var socket=require(_0x215b('0xc'))(new Redis(config['redis']));require(_0x215b('0xd'))[_0x215b('0xe')](socket);function respondWithRpcPromise(_0x50ef7a,_0x2f736e,_0x44bbd9){return new BPromise(function(_0x5578e4,_0x4de4ad){return client[_0x215b('0xf')](_0x50ef7a,_0x44bbd9)['then'](function(_0x401260){logger[_0x215b('0x10')]('VoiceExtension,\x20%s,\x20%s',_0x2f736e,_0x215b('0x11'));logger['debug']('VoiceExtension,\x20%s,\x20%s,\x20%s',_0x2f736e,_0x215b('0x11'),JSON['stringify'](_0x401260));if(_0x401260[_0x215b('0x12')]){if(_0x401260['error'][_0x215b('0x13')]===0x1f4){logger[_0x215b('0x12')](_0x215b('0x14'),_0x2f736e,_0x401260['error']['message']);return _0x4de4ad(_0x401260['error'][_0x215b('0x15')]);}logger[_0x215b('0x12')](_0x215b('0x14'),_0x2f736e,_0x401260[_0x215b('0x12')][_0x215b('0x15')]);return _0x5578e4(_0x401260[_0x215b('0x12')][_0x215b('0x15')]);}else{logger['info'](_0x215b('0x14'),_0x2f736e,_0x215b('0x11'));_0x5578e4(_0x401260[_0x215b('0x16')][_0x215b('0x15')]);}})[_0x215b('0x17')](function(_0x4492da){logger[_0x215b('0x12')](_0x215b('0x14'),_0x2f736e,_0x4492da);_0x4de4ad(_0x4492da);});});}exports['GetVoiceExtension']=function(_0x534e73){var _0x2cb718=this;return new Promise(function(_0x5d1998,_0x16732d){return db[_0x215b('0x18')][_0x215b('0x19')]({'raw':_0x534e73[_0x215b('0x1a')]?_0x534e73[_0x215b('0x1a')][_0x215b('0x1b')]===undefined?!![]:![]:!![],'where':_0x534e73[_0x215b('0x1a')]?_0x534e73[_0x215b('0x1a')]['where']||null:null,'attributes':_0x534e73['options']?_0x534e73[_0x215b('0x1a')]['attributes']||null:null,'limit':_0x534e73[_0x215b('0x1a')]?_0x534e73[_0x215b('0x1a')]['limit']||null:null,'include':_0x534e73[_0x215b('0x1a')]?_0x534e73['options'][_0x215b('0x1c')]?_[_0x215b('0x1d')](_0x534e73[_0x215b('0x1a')][_0x215b('0x1c')],function(_0x1f30b1){return{'model':db[_0x1f30b1[_0x215b('0x1e')]],'as':_0x1f30b1['as'],'attributes':_0x1f30b1[_0x215b('0x1f')],'include':_0x1f30b1[_0x215b('0x1c')]?_['map'](_0x1f30b1[_0x215b('0x1c')],function(_0x1f1a6f){return{'model':db[_0x1f1a6f['model']],'as':_0x1f1a6f['as'],'attributes':_0x1f1a6f[_0x215b('0x1f')],'include':_0x1f1a6f[_0x215b('0x1c')]?_[_0x215b('0x1d')](_0x1f1a6f['include'],function(_0x23ffca){return{'model':db[_0x23ffca[_0x215b('0x1e')]],'as':_0x23ffca['as'],'attributes':_0x23ffca[_0x215b('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x215b('0x20')](function(_0x8dea4c){logger[_0x215b('0x10')]('GetVoiceExtension',_0x534e73);logger[_0x215b('0x21')](_0x215b('0x22'),_0x534e73,JSON[_0x215b('0x23')](_0x8dea4c));_0x5d1998(_0x8dea4c);})[_0x215b('0x17')](function(_0x5eb42b){logger['error']('GetVoiceExtension',_0x5eb42b['message'],_0x534e73);_0x16732d(_0x2cb718['error'](0x1f4,_0x5eb42b[_0x215b('0x15')]));});});};
\ No newline at end of file
index f2a7910..a5fbe7d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xabce=['voiceExtension:','./voiceExtension.events','save','remove','update','emit'];(function(_0x2f72fa,_0x5a8ffc){var _0x59dc51=function(_0x52e038){while(--_0x52e038){_0x2f72fa['push'](_0x2f72fa['shift']());}};_0x59dc51(++_0x5a8ffc);}(_0xabce,0x103));var _0xeabc=function(_0x42245d,_0x51758f){_0x42245d=_0x42245d-0x0;var _0x4b211a=_0xabce[_0x42245d];return _0x4b211a;};'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
+var _0x4975=['length','./voiceExtension.events','remove','update','emit','removeListener','register'];(function(_0x264022,_0x51bd31){var _0x39b495=function(_0x1bdbc9){while(--_0x1bdbc9){_0x264022['push'](_0x264022['shift']());}};_0x39b495(++_0x51bd31);}(_0x4975,0x86));var _0x5497=function(_0x46f625,_0xae8459){_0x46f625=_0x46f625-0x0;var _0x3df0b4=_0x4975[_0x46f625];return _0x3df0b4;};'use strict';var VoiceExtensionEvents=require(_0x5497('0x0'));var events=['save',_0x5497('0x1'),_0x5497('0x2')];function createListener(_0xfc7927,_0x349f5f){return function(_0x135f6f){_0x349f5f[_0x5497('0x3')](_0xfc7927,_0x135f6f);};}function removeListener(_0x14cecb,_0xeb31af){return function(){VoiceExtensionEvents[_0x5497('0x4')](_0x14cecb,_0xeb31af);};}exports[_0x5497('0x5')]=function(_0x539a27){for(var _0x37e48d=0x0,_0x4f563d=events[_0x5497('0x6')];_0x37e48d<_0x4f563d;_0x37e48d++){var _0x674a2a=events[_0x37e48d];var _0x368e8b=createListener('voiceExtension:'+_0x674a2a,_0x539a27);VoiceExtensionEvents['on'](_0x674a2a,_0x368e8b);}};
\ No newline at end of file
index 0d5369f..1fd962e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6050=['/:id/messages','isAuthenticated','getMessages','create','put','/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','index','show','get'];(function(_0x414ee5,_0xb262f8){var _0x8e5120=function(_0x57d660){while(--_0x57d660){_0x414ee5['push'](_0x414ee5['shift']());}};_0x8e5120(++_0xb262f8);}(_0x6050,0x196));var _0x0605=function(_0x2d13de,_0x4133bd){_0x2d13de=_0x2d13de-0x0;var _0x115519=_0x6050[_0x2d13de];return _0x115519;};'use strict';var multer=require(_0x0605('0x0'));var util=require(_0x0605('0x1'));var path=require(_0x0605('0x2'));var timeout=require(_0x0605('0x3'));var express=require(_0x0605('0x4'));var router=express[_0x0605('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x0605('0x6'));var interaction=require(_0x0605('0x7'));var config=require(_0x0605('0x8'));var controller=require('./voiceMail.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x0605('0x9')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0x0605('0xa')]);router[_0x0605('0xb')](_0x0605('0xc'),auth[_0x0605('0xd')](),controller[_0x0605('0xe')]);router['post']('/',auth[_0x0605('0xd')](),controller[_0x0605('0xf')]);router[_0x0605('0x10')](_0x0605('0x11'),auth[_0x0605('0xd')](),controller[_0x0605('0x12')]);router[_0x0605('0x13')](_0x0605('0x11'),auth[_0x0605('0xd')](),controller[_0x0605('0x14')]);module[_0x0605('0x15')]=router;
\ No newline at end of file
+var _0x7bd0=['connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./voiceMail.controller','get','isAuthenticated','index','/:id','show','/:id/messages','getMessages','create','put','update','delete','destroy','exports','multer','util','path'];(function(_0x5c3db0,_0x32780e){var _0x48aa2d=function(_0x457094){while(--_0x457094){_0x5c3db0['push'](_0x5c3db0['shift']());}};_0x48aa2d(++_0x32780e);}(_0x7bd0,0x111));var _0x07bd=function(_0x1e393b,_0x355f6b){_0x1e393b=_0x1e393b-0x0;var _0x3d0bfe=_0x7bd0[_0x1e393b];return _0x3d0bfe;};'use strict';var multer=require(_0x07bd('0x0'));var util=require(_0x07bd('0x1'));var path=require(_0x07bd('0x2'));var timeout=require(_0x07bd('0x3'));var express=require(_0x07bd('0x4'));var router=express[_0x07bd('0x5')]();var fs_extra=require(_0x07bd('0x6'));var auth=require(_0x07bd('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0x07bd('0x8'));var controller=require(_0x07bd('0x9'));router[_0x07bd('0xa')]('/',auth[_0x07bd('0xb')](),controller[_0x07bd('0xc')]);router[_0x07bd('0xa')](_0x07bd('0xd'),auth['isAuthenticated'](),controller[_0x07bd('0xe')]);router['get'](_0x07bd('0xf'),auth[_0x07bd('0xb')](),controller[_0x07bd('0x10')]);router['post']('/',auth[_0x07bd('0xb')](),controller[_0x07bd('0x11')]);router[_0x07bd('0x12')](_0x07bd('0xd'),auth['isAuthenticated'](),controller[_0x07bd('0x13')]);router[_0x07bd('0x14')](_0x07bd('0xd'),auth[_0x07bd('0xb')](),controller[_0x07bd('0x15')]);module[_0x07bd('0x16')]=router;
\ No newline at end of file
index 353b74b..918bc3d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb0b6=['STRING','from-voicemail','contest_mailbox','setDataValue','email','string','trim','central','ENUM','yes','TINYINT(4)','TIMESTAMP','INTEGER','VIRTUAL','getDataValue','\x20-\x20','mailbox','sequelize'];(function(_0x5e47b9,_0x1c57c0){var _0x49e0b2=function(_0x2d9de0){while(--_0x2d9de0){_0x5e47b9['push'](_0x5e47b9['shift']());}};_0x49e0b2(++_0x1c57c0);}(_0xb0b6,0xd7));var _0x6b0b=function(_0x349815,_0x26525a){_0x349815=_0x349815-0x0;var _0x594f2c=_0xb0b6[_0x349815];return _0x594f2c;};'use strict';var Sequelize=require(_0x6b0b('0x0'));module['exports']={'customer_id':{'type':Sequelize[_0x6b0b('0x1')]},'context':{'type':Sequelize['STRING'],'defaultValue':_0x6b0b('0x2'),'unique':_0x6b0b('0x3')},'mailbox':{'type':Sequelize[_0x6b0b('0x1')],'defaultValue':'','allowNull':![],'unique':_0x6b0b('0x3')},'password':{'type':Sequelize[_0x6b0b('0x1')]},'fullname':{'type':Sequelize[_0x6b0b('0x1')]},'email':{'type':Sequelize['STRING'],'validate':{'isEmail':!![]},'set':function(_0x56fba4){this[_0x6b0b('0x4')](_0x6b0b('0x5'),typeof _0x56fba4===_0x6b0b('0x6')&&_0x56fba4[_0x6b0b('0x7')]()?_0x56fba4[_0x6b0b('0x7')]():null);}},'pager':{'type':Sequelize[_0x6b0b('0x1')]},'tz':{'type':Sequelize[_0x6b0b('0x1')],'defaultValue':_0x6b0b('0x8')},'attach':{'type':Sequelize[_0x6b0b('0x9')](_0x6b0b('0xa'),'no'),'defaultValue':_0x6b0b('0xa'),'allowNull':![]},'saycid':{'type':Sequelize['ENUM'](_0x6b0b('0xa'),'no'),'defaultValue':_0x6b0b('0xa'),'allowNull':![]},'dialout':{'type':Sequelize[_0x6b0b('0x1')]},'callback':{'type':Sequelize['STRING']},'review':{'type':Sequelize['ENUM'](_0x6b0b('0xa'),'no'),'defaultValue':'no','allowNull':![]},'operator':{'type':Sequelize[_0x6b0b('0x9')](_0x6b0b('0xa'),'no'),'defaultValue':'no','allowNull':![]},'envelope':{'type':Sequelize['ENUM'](_0x6b0b('0xa'),'no'),'defaultValue':'no','allowNull':![]},'sayduration':{'type':Sequelize[_0x6b0b('0x9')](_0x6b0b('0xa'),'no'),'defaultValue':'no','allowNull':![]},'saydurationm':{'type':_0x6b0b('0xb'),'defaultValue':0x1,'allowNull':![]},'sendvoicemail':{'type':Sequelize[_0x6b0b('0x9')](_0x6b0b('0xa'),'no'),'defaultValue':'no','allowNull':![]},'delete':{'type':Sequelize[_0x6b0b('0x9')](_0x6b0b('0xa'),'no'),'defaultValue':'no','allowNull':![]},'nextaftercmd':{'type':Sequelize[_0x6b0b('0x9')](_0x6b0b('0xa'),'no'),'defaultValue':_0x6b0b('0xa'),'allowNull':![]},'forcename':{'type':Sequelize['ENUM'](_0x6b0b('0xa'),'no'),'defaultValue':'no','allowNull':![]},'forcegreetings':{'type':Sequelize[_0x6b0b('0x9')](_0x6b0b('0xa'),'no'),'defaultValue':'no','allowNull':![]},'hidefromdir':{'type':Sequelize[_0x6b0b('0x9')](_0x6b0b('0xa'),'no'),'defaultValue':'yes','allowNull':![]},'stamp':{'type':_0x6b0b('0xc')},'emailsubject':{'type':Sequelize[_0x6b0b('0x1')]},'emailbody':{'type':Sequelize[_0x6b0b('0x1')]},'maxsecs':{'type':Sequelize['INTEGER'](0xff),'defaultValue':0xb4,'allowNull':![]},'maxmsg':{'type':Sequelize[_0x6b0b('0xd')](0xff),'defaultValue':0x64,'allowNull':![]},'name':{'type':Sequelize[_0x6b0b('0xe')],'get':function(){return this[_0x6b0b('0xf')]('fullname')+_0x6b0b('0x10')+this[_0x6b0b('0xf')](_0x6b0b('0x11'));}}};
\ No newline at end of file
+var _0x4ece=['INTEGER','VIRTUAL','getDataValue','fullname','\x20-\x20','sequelize','exports','STRING','contest_mailbox','setDataValue','email','string','trim','ENUM','yes','TIMESTAMP'];(function(_0x558980,_0x19bd71){var _0x3bbc70=function(_0x2a93af){while(--_0x2a93af){_0x558980['push'](_0x558980['shift']());}};_0x3bbc70(++_0x19bd71);}(_0x4ece,0x195));var _0xe4ec=function(_0x8bffc8,_0x2da09a){_0x8bffc8=_0x8bffc8-0x0;var _0x5d5a92=_0x4ece[_0x8bffc8];return _0x5d5a92;};'use strict';var Sequelize=require(_0xe4ec('0x0'));module[_0xe4ec('0x1')]={'customer_id':{'type':Sequelize[_0xe4ec('0x2')]},'context':{'type':Sequelize[_0xe4ec('0x2')],'defaultValue':'from-voicemail','unique':_0xe4ec('0x3')},'mailbox':{'type':Sequelize[_0xe4ec('0x2')],'defaultValue':'','allowNull':![],'unique':'contest_mailbox'},'password':{'type':Sequelize[_0xe4ec('0x2')]},'fullname':{'type':Sequelize[_0xe4ec('0x2')]},'email':{'type':Sequelize[_0xe4ec('0x2')],'validate':{'isEmail':!![]},'set':function(_0x1a7367){this[_0xe4ec('0x4')](_0xe4ec('0x5'),typeof _0x1a7367===_0xe4ec('0x6')&&_0x1a7367[_0xe4ec('0x7')]()?_0x1a7367[_0xe4ec('0x7')]():null);}},'pager':{'type':Sequelize[_0xe4ec('0x2')]},'tz':{'type':Sequelize[_0xe4ec('0x2')],'defaultValue':'central'},'attach':{'type':Sequelize[_0xe4ec('0x8')]('yes','no'),'defaultValue':_0xe4ec('0x9'),'allowNull':![]},'saycid':{'type':Sequelize[_0xe4ec('0x8')](_0xe4ec('0x9'),'no'),'defaultValue':_0xe4ec('0x9'),'allowNull':![]},'dialout':{'type':Sequelize[_0xe4ec('0x2')]},'callback':{'type':Sequelize['STRING']},'review':{'type':Sequelize[_0xe4ec('0x8')](_0xe4ec('0x9'),'no'),'defaultValue':'no','allowNull':![]},'operator':{'type':Sequelize[_0xe4ec('0x8')](_0xe4ec('0x9'),'no'),'defaultValue':'no','allowNull':![]},'envelope':{'type':Sequelize['ENUM'](_0xe4ec('0x9'),'no'),'defaultValue':'no','allowNull':![]},'sayduration':{'type':Sequelize[_0xe4ec('0x8')]('yes','no'),'defaultValue':'no','allowNull':![]},'saydurationm':{'type':'TINYINT(4)','defaultValue':0x1,'allowNull':![]},'sendvoicemail':{'type':Sequelize[_0xe4ec('0x8')](_0xe4ec('0x9'),'no'),'defaultValue':'no','allowNull':![]},'delete':{'type':Sequelize[_0xe4ec('0x8')](_0xe4ec('0x9'),'no'),'defaultValue':'no','allowNull':![]},'nextaftercmd':{'type':Sequelize[_0xe4ec('0x8')](_0xe4ec('0x9'),'no'),'defaultValue':_0xe4ec('0x9'),'allowNull':![]},'forcename':{'type':Sequelize[_0xe4ec('0x8')](_0xe4ec('0x9'),'no'),'defaultValue':'no','allowNull':![]},'forcegreetings':{'type':Sequelize[_0xe4ec('0x8')]('yes','no'),'defaultValue':'no','allowNull':![]},'hidefromdir':{'type':Sequelize[_0xe4ec('0x8')]('yes','no'),'defaultValue':'yes','allowNull':![]},'stamp':{'type':_0xe4ec('0xa')},'emailsubject':{'type':Sequelize[_0xe4ec('0x2')]},'emailbody':{'type':Sequelize[_0xe4ec('0x2')]},'maxsecs':{'type':Sequelize[_0xe4ec('0xb')](0xff),'defaultValue':0xb4,'allowNull':![]},'maxmsg':{'type':Sequelize[_0xe4ec('0xb')](0xff),'defaultValue':0x64,'allowNull':![]},'name':{'type':Sequelize[_0xe4ec('0xc')],'get':function(){return this[_0xe4ec('0xd')](_0xe4ec('0xe'))+_0xe4ec('0xf')+this[_0xe4ec('0xd')]('mailbox');}}};
\ No newline at end of file
index 339438f..4154292 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x087b=['catch','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','body','params','destroy','getMessages','findOne','hasOwnProperty','order','mailbox','VoiceMailMessage','eml-format','rimraf','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','limit','undefined','count','set','apply','reject','save','then','error','stack','name','send','index','VoiceMail','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','attributes','fields','length','nolimit','sort','pick','where','merge','options','includeAll','include','findAll','show','find','create','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','UserProfileResource'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x087b,0x11a));var _0xb087=function(_0x1a7846,_0x59723e){_0x1a7846=_0x1a7846-0x0;var _0x48049=_0x087b[_0x1a7846];return _0x48049;};'use strict';var emlformat=require(_0xb087('0x0'));var rimraf=require(_0xb087('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xb087('0x2'));var moment=require('moment');var BPromise=require(_0xb087('0x3'));var Mustache=require(_0xb087('0x4'));var util=require(_0xb087('0x5'));var path=require(_0xb087('0x6'));var sox=require(_0xb087('0x7'));var csv=require(_0xb087('0x8'));var ejs=require(_0xb087('0x9'));var fs=require('fs');var fs_extra=require(_0xb087('0xa'));var _=require(_0xb087('0xb'));var squel=require(_0xb087('0xc'));var crypto=require(_0xb087('0xd'));var jsforce=require(_0xb087('0xe'));var deskjs=require(_0xb087('0xf'));var toCsv=require(_0xb087('0x8'));var querystring=require(_0xb087('0x10'));var Papa=require(_0xb087('0x11'));var Redis=require(_0xb087('0x12'));var authService=require('../../components/auth/service');var qs=require(_0xb087('0x13'));var as=require(_0xb087('0x14'));var hardwareService=require(_0xb087('0x15'));var logger=require(_0xb087('0x16'))(_0xb087('0x17'));var utils=require(_0xb087('0x18'));var config=require(_0xb087('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0xb087('0x1a'))['db'];function respondWithStatusCode(_0x31f977,_0x323656){_0x323656=_0x323656||0xcc;return function(_0x51ceaa){if(_0x51ceaa){return _0x31f977[_0xb087('0x1b')](_0x323656);}return _0x31f977[_0xb087('0x1c')](_0x323656)[_0xb087('0x1d')]();};}function respondWithResult(_0x46410b,_0x11784c){_0x11784c=_0x11784c||0xc8;return function(_0x12d0db){if(_0x12d0db){return _0x46410b[_0xb087('0x1c')](_0x11784c)[_0xb087('0x1e')](_0x12d0db);}};}function respondWithFilteredResult(_0x24e1a3,_0x16d0b7){return function(_0x5193a4){if(_0x5193a4){var _0x43e576=typeof _0x16d0b7[_0xb087('0x1f')]==='undefined'&&typeof _0x16d0b7[_0xb087('0x20')]===_0xb087('0x21');var _0x2e9e74=_0x5193a4['count'];var _0x330005=_0x43e576?0x0:_0x16d0b7[_0xb087('0x1f')];var _0x17200d=_0x43e576?_0x5193a4[_0xb087('0x22')]:_0x16d0b7['offset']+_0x16d0b7[_0xb087('0x20')];var _0x28428e;if(_0x17200d>=_0x2e9e74){_0x17200d=_0x2e9e74;_0x28428e=0xc8;}else{_0x28428e=0xce;}_0x24e1a3[_0xb087('0x1c')](_0x28428e);return _0x24e1a3[_0xb087('0x23')]('Content-Range',_0x330005+'-'+_0x17200d+'/'+_0x2e9e74)['json'](_0x5193a4);}return null;};}function patchUpdates(_0x5ea3dc){return function(_0x49450a){try{jsonpatch[_0xb087('0x24')](_0x49450a,_0x5ea3dc,!![]);}catch(_0x17be8e){return BPromise[_0xb087('0x25')](_0x17be8e);}return _0x49450a[_0xb087('0x26')]();};}function saveUpdates(_0x1fb765,_0x258b4c){return function(_0x31ae01){if(_0x31ae01){return _0x31ae01['update'](_0x1fb765)[_0xb087('0x27')](function(_0x466397){return _0x466397;});}return null;};}function removeEntity(_0x1de654,_0x1cfb3e){return function(_0x3ad74e){if(_0x3ad74e){return _0x3ad74e['destroy']()[_0xb087('0x27')](function(){var _0xdd4216=_0x3ad74e['get']({'plain':!![]});var _0x5a2dc6='Voicemails';return db['UserProfileResource']['destroy']({'where':{'type':_0x5a2dc6,'resourceId':_0xdd4216['id']}})[_0xb087('0x27')](function(){return _0x3ad74e;});})[_0xb087('0x27')](function(){_0x1de654[_0xb087('0x1c')](0xcc)[_0xb087('0x1d')]();});}};}function handleEntityNotFound(_0xd9ec66,_0xb72173){return function(_0xf3f41f){if(!_0xf3f41f){_0xd9ec66[_0xb087('0x1b')](0x194);}return _0xf3f41f;};}function handleError(_0x6cfb22,_0x1551c3){_0x1551c3=_0x1551c3||0x1f4;return function(_0x18058c){logger[_0xb087('0x28')](_0x18058c[_0xb087('0x29')]);if(_0x18058c[_0xb087('0x2a')]){delete _0x18058c['name'];}_0x6cfb22[_0xb087('0x1c')](_0x1551c3)[_0xb087('0x2b')](_0x18058c);};}exports[_0xb087('0x2c')]=function(_0x15c9ac,_0x22d441){var _0xa6d90c={},_0x2e1c57={},_0x13fb2f={'count':0x0,'rows':[]};var _0x53a535=_['map'](db[_0xb087('0x2d')][_0xb087('0x2e')],function(_0x4cb5a8){return{'name':_0x4cb5a8[_0xb087('0x2f')],'type':_0x4cb5a8[_0xb087('0x30')][_0xb087('0x31')]};});_0x2e1c57[_0xb087('0x32')]=_[_0xb087('0x33')](_0x53a535,_0xb087('0x2a'));_0x2e1c57[_0xb087('0x34')]=_[_0xb087('0x35')](_0x15c9ac[_0xb087('0x34')]);_0x2e1c57[_0xb087('0x36')]=_[_0xb087('0x37')](_0x2e1c57[_0xb087('0x32')],_0x2e1c57['query']);_0xa6d90c[_0xb087('0x38')]=_['intersection'](_0x2e1c57[_0xb087('0x32')],qs[_0xb087('0x39')](_0x15c9ac[_0xb087('0x34')][_0xb087('0x39')]));_0xa6d90c[_0xb087('0x38')]=_0xa6d90c[_0xb087('0x38')][_0xb087('0x3a')]?_0xa6d90c[_0xb087('0x38')]:_0x2e1c57[_0xb087('0x32')];if(!_0x15c9ac['query']['hasOwnProperty'](_0xb087('0x3b'))){_0xa6d90c[_0xb087('0x20')]=qs[_0xb087('0x20')](_0x15c9ac[_0xb087('0x34')][_0xb087('0x20')]);_0xa6d90c['offset']=qs[_0xb087('0x1f')](_0x15c9ac[_0xb087('0x34')]['offset']);}_0xa6d90c['order']=qs[_0xb087('0x3c')](_0x15c9ac[_0xb087('0x34')][_0xb087('0x3c')]);_0xa6d90c['where']=qs[_0xb087('0x36')](_[_0xb087('0x3d')](_0x15c9ac[_0xb087('0x34')],_0x2e1c57[_0xb087('0x36')]),_0x53a535);if(_0x15c9ac[_0xb087('0x34')]['filter']){_0xa6d90c[_0xb087('0x3e')]=_['merge'](_0xa6d90c[_0xb087('0x3e')],{'$or':_['map'](_0x53a535,function(_0x52a98f){if(_0x52a98f[_0xb087('0x30')]!=='VIRTUAL'){var _0xed47c4={};_0xed47c4[_0x52a98f['name']]={'$like':'%'+_0x15c9ac[_0xb087('0x34')]['filter']+'%'};return _0xed47c4;}})});}_0xa6d90c=_[_0xb087('0x3f')]({},_0xa6d90c,_0x15c9ac[_0xb087('0x40')]);var _0x364b1d={'where':_0xa6d90c[_0xb087('0x3e')]};return db[_0xb087('0x2d')][_0xb087('0x22')](_0x364b1d)[_0xb087('0x27')](function(_0x5e7690){_0x13fb2f[_0xb087('0x22')]=_0x5e7690;if(_0x15c9ac['query'][_0xb087('0x41')]){_0xa6d90c[_0xb087('0x42')]=[{'all':!![]}];}return db['VoiceMail'][_0xb087('0x43')](_0xa6d90c);})[_0xb087('0x27')](function(_0x7650c5){_0x13fb2f['rows']=_0x7650c5;return _0x13fb2f;})[_0xb087('0x27')](respondWithFilteredResult(_0x22d441,_0xa6d90c))['catch'](handleError(_0x22d441,null));};exports[_0xb087('0x44')]=function(_0x32b9d3,_0x5e7f45){var _0x38cb9d={'raw':!![],'where':{'id':_0x32b9d3['params']['id']}},_0x302ce7={};_0x302ce7[_0xb087('0x32')]=_[_0xb087('0x35')](db['VoiceMail'][_0xb087('0x2e')]);_0x302ce7[_0xb087('0x34')]=_[_0xb087('0x35')](_0x32b9d3[_0xb087('0x34')]);_0x302ce7['filters']=_['intersection'](_0x302ce7[_0xb087('0x32')],_0x302ce7[_0xb087('0x34')]);_0x38cb9d[_0xb087('0x38')]=_[_0xb087('0x37')](_0x302ce7[_0xb087('0x32')],qs[_0xb087('0x39')](_0x32b9d3['query']['fields']));_0x38cb9d[_0xb087('0x38')]=_0x38cb9d['attributes'][_0xb087('0x3a')]?_0x38cb9d[_0xb087('0x38')]:_0x302ce7[_0xb087('0x32')];if(_0x32b9d3[_0xb087('0x34')]['includeAll']){_0x38cb9d[_0xb087('0x42')]=[{'all':!![]}];}_0x38cb9d=_['merge']({},_0x38cb9d,_0x32b9d3[_0xb087('0x40')]);return db[_0xb087('0x2d')][_0xb087('0x45')](_0x38cb9d)[_0xb087('0x27')](handleEntityNotFound(_0x5e7f45,null))[_0xb087('0x27')](respondWithResult(_0x5e7f45,null))['catch'](handleError(_0x5e7f45,null));};exports[_0xb087('0x46')]=function(_0xb15e28,_0x588d96){return db['VoiceMail'][_0xb087('0x46')](_0xb15e28['body'],{})['then'](function(_0x1c9f8f){var _0x341665=_0xb15e28['user'][_0xb087('0x47')]({'plain':!![]});if(!_0x341665)throw new Error(_0xb087('0x48'));if(_0x341665[_0xb087('0x49')]==='user'){var _0x5ba160=_0x1c9f8f[_0xb087('0x47')]({'plain':!![]});var _0x54862a='Voicemails';return db[_0xb087('0x4a')][_0xb087('0x45')]({'where':{'name':_0x54862a,'userProfileId':_0x341665[_0xb087('0x4b')]},'raw':!![]})[_0xb087('0x27')](function(_0x2bf92f){if(_0x2bf92f&&_0x2bf92f[_0xb087('0x4c')]===0x0){return db[_0xb087('0x4d')][_0xb087('0x46')]({'name':_0x5ba160[_0xb087('0x2a')],'resourceId':_0x5ba160['id'],'type':_0x2bf92f[_0xb087('0x2a')],'sectionId':_0x2bf92f['id']},{})[_0xb087('0x27')](function(){return _0x1c9f8f;});}else{return _0x1c9f8f;}})[_0xb087('0x4e')](function(_0x55e653){logger[_0xb087('0x28')](_0xb087('0x4f'),_0x55e653);throw _0x55e653;});}return _0x1c9f8f;})['then'](respondWithResult(_0x588d96,0xc9))[_0xb087('0x4e')](handleError(_0x588d96,null));};exports[_0xb087('0x50')]=function(_0x343830,_0x1c91e8){if(_0x343830[_0xb087('0x51')]['id']){delete _0x343830[_0xb087('0x51')]['id'];}return db[_0xb087('0x2d')][_0xb087('0x45')]({'where':{'id':_0x343830[_0xb087('0x52')]['id']}})[_0xb087('0x27')](handleEntityNotFound(_0x1c91e8,null))[_0xb087('0x27')](saveUpdates(_0x343830['body'],null))[_0xb087('0x27')](respondWithResult(_0x1c91e8,null))['catch'](handleError(_0x1c91e8,null));};exports[_0xb087('0x53')]=function(_0x575cc4,_0xf0b592){return db[_0xb087('0x2d')][_0xb087('0x45')]({'where':{'id':_0x575cc4[_0xb087('0x52')]['id']}})[_0xb087('0x27')](handleEntityNotFound(_0xf0b592,null))[_0xb087('0x27')](removeEntity(_0xf0b592,null))[_0xb087('0x4e')](handleError(_0xf0b592,null));};exports[_0xb087('0x54')]=function(_0x3f3091,_0x323e0a,_0x300e9b){return db[_0xb087('0x2d')][_0xb087('0x55')]({'where':{'id':_0x3f3091[_0xb087('0x52')]['id']}})[_0xb087('0x27')](handleEntityNotFound(_0x323e0a,null))[_0xb087('0x27')](function(_0x217f26){var _0x3185c4;var _0x40ff74={},_0xe3cb2={};_0xe3cb2[_0xb087('0x32')]=_[_0xb087('0x35')](db['VoiceMailMessage'][_0xb087('0x2e')]);_0xe3cb2[_0xb087('0x34')]=_[_0xb087('0x35')](_0x3f3091['query']);_0xe3cb2[_0xb087('0x36')]=_[_0xb087('0x37')](_0xe3cb2['model'],_0xe3cb2[_0xb087('0x34')]);_0x40ff74[_0xb087('0x38')]=_[_0xb087('0x37')](_0xe3cb2['model'],qs[_0xb087('0x39')](_0x3f3091[_0xb087('0x34')][_0xb087('0x39')]));_0x40ff74[_0xb087('0x38')]=_0x40ff74[_0xb087('0x38')][_0xb087('0x3a')]?_0x40ff74[_0xb087('0x38')]:_0xe3cb2[_0xb087('0x32')];if(!_0x3f3091['query'][_0xb087('0x56')](_0xb087('0x3b'))){_0x40ff74[_0xb087('0x20')]=qs['limit'](_0x3f3091[_0xb087('0x34')]['limit']);_0x40ff74['offset']=qs[_0xb087('0x1f')](_0x3f3091[_0xb087('0x34')]['offset']);}_0x40ff74[_0xb087('0x57')]=qs['sort'](_0x3f3091[_0xb087('0x34')][_0xb087('0x3c')]);_0x40ff74['where']=qs['filters'](_[_0xb087('0x3d')](_0x3f3091['query'],_0xe3cb2['filters']));if(_0x3f3091[_0xb087('0x34')]['filter']){_0x40ff74[_0xb087('0x3e')]=_['merge'](_0x40ff74[_0xb087('0x3e')],{'$or':_[_0xb087('0x33')](_0x40ff74[_0xb087('0x38')],function(_0x2a6b2e){var _0x4e1683={};_0x4e1683[_0x2a6b2e]={'$like':'%'+_0x3f3091[_0xb087('0x34')]['filter']+'%'};return _0x4e1683;})});}_0x40ff74[_0xb087('0x3e')]=_['merge'](_0x40ff74[_0xb087('0x3e')],{'mailboxuser':_0x217f26[_0xb087('0x58')]});_0x40ff74=_[_0xb087('0x3f')]({},_0x40ff74,_0x3f3091['options']);return db[_0xb087('0x59')]['findAndCountAll'](_0x40ff74)[_0xb087('0x27')](respondWithFilteredResult(_0x323e0a,_0x40ff74));})[_0xb087('0x4e')](handleError(_0x323e0a,null));};
\ No newline at end of file
+var _0xb7e7=['sort','where','pick','filter','options','show','params','keys','rawAttributes','intersection','includeAll','include','merge','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Voicemails','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','findOne','VoiceMailMessage','findAndCountAll','eml-format','zip-dir','request-promise','bluebird','util','path','sox','fs-extra','lodash','squel','jsforce','desk.js','to-csv','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','status','json','offset','undefined','limit','count','set','Content-Range','apply','save','update','then','get','destroy','error','name','send','index','VoiceMail','fieldName','type','key','model','map','query','filters','attributes','fields','length','hasOwnProperty','nolimit','order'];(function(_0x7199c0,_0x5aef22){var _0x4da511=function(_0x1de8c9){while(--_0x1de8c9){_0x7199c0['push'](_0x7199c0['shift']());}};_0x4da511(++_0x5aef22);}(_0xb7e7,0x121));var _0x7b7e=function(_0x45f951,_0x2750c8){_0x45f951=_0x45f951-0x0;var _0x24756c=_0xb7e7[_0x45f951];return _0x24756c;};'use strict';var emlformat=require(_0x7b7e('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x7b7e('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x7b7e('0x2'));var moment=require('moment');var BPromise=require(_0x7b7e('0x3'));var Mustache=require('mustache');var util=require(_0x7b7e('0x4'));var path=require(_0x7b7e('0x5'));var sox=require(_0x7b7e('0x6'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x7b7e('0x7'));var _=require(_0x7b7e('0x8'));var squel=require(_0x7b7e('0x9'));var crypto=require('crypto');var jsforce=require(_0x7b7e('0xa'));var deskjs=require(_0x7b7e('0xb'));var toCsv=require(_0x7b7e('0xc'));var querystring=require(_0x7b7e('0xd'));var Papa=require(_0x7b7e('0xe'));var Redis=require(_0x7b7e('0xf'));var authService=require(_0x7b7e('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x7b7e('0x11'));var hardwareService=require(_0x7b7e('0x12'));var logger=require(_0x7b7e('0x13'))(_0x7b7e('0x14'));var utils=require(_0x7b7e('0x15'));var config=require(_0x7b7e('0x16'));var licenseUtil=require(_0x7b7e('0x17'));var db=require(_0x7b7e('0x18'))['db'];function respondWithStatusCode(_0xaadda,_0x54d8ce){_0x54d8ce=_0x54d8ce||0xcc;return function(_0x267446){if(_0x267446){return _0xaadda[_0x7b7e('0x19')](_0x54d8ce);}return _0xaadda['status'](_0x54d8ce)[_0x7b7e('0x1a')]();};}function respondWithResult(_0x5976ac,_0x4c6011){_0x4c6011=_0x4c6011||0xc8;return function(_0x2889ed){if(_0x2889ed){return _0x5976ac[_0x7b7e('0x1b')](_0x4c6011)[_0x7b7e('0x1c')](_0x2889ed);}};}function respondWithFilteredResult(_0x457ec5,_0x3d2fb2){return function(_0x5703fd){if(_0x5703fd){var _0x51baf6=typeof _0x3d2fb2[_0x7b7e('0x1d')]===_0x7b7e('0x1e')&&typeof _0x3d2fb2[_0x7b7e('0x1f')]===_0x7b7e('0x1e');var _0x2cc400=_0x5703fd[_0x7b7e('0x20')];var _0x242368=_0x51baf6?0x0:_0x3d2fb2[_0x7b7e('0x1d')];var _0x2acb8c=_0x51baf6?_0x5703fd[_0x7b7e('0x20')]:_0x3d2fb2[_0x7b7e('0x1d')]+_0x3d2fb2[_0x7b7e('0x1f')];var _0x448980;if(_0x2acb8c>=_0x2cc400){_0x2acb8c=_0x2cc400;_0x448980=0xc8;}else{_0x448980=0xce;}_0x457ec5[_0x7b7e('0x1b')](_0x448980);return _0x457ec5[_0x7b7e('0x21')](_0x7b7e('0x22'),_0x242368+'-'+_0x2acb8c+'/'+_0x2cc400)[_0x7b7e('0x1c')](_0x5703fd);}return null;};}function patchUpdates(_0x49eddb){return function(_0x69262b){try{jsonpatch[_0x7b7e('0x23')](_0x69262b,_0x49eddb,!![]);}catch(_0x24718c){return BPromise['reject'](_0x24718c);}return _0x69262b[_0x7b7e('0x24')]();};}function saveUpdates(_0xbf0cb3,_0x14243b){return function(_0x200156){if(_0x200156){return _0x200156[_0x7b7e('0x25')](_0xbf0cb3)[_0x7b7e('0x26')](function(_0x28bf43){return _0x28bf43;});}return null;};}function removeEntity(_0x10a66a,_0x53bbb3){return function(_0x5d6215){if(_0x5d6215){return _0x5d6215['destroy']()[_0x7b7e('0x26')](function(){var _0x22598e=_0x5d6215[_0x7b7e('0x27')]({'plain':!![]});var _0x483c6f='Voicemails';return db['UserProfileResource'][_0x7b7e('0x28')]({'where':{'type':_0x483c6f,'resourceId':_0x22598e['id']}})[_0x7b7e('0x26')](function(){return _0x5d6215;});})[_0x7b7e('0x26')](function(){_0x10a66a[_0x7b7e('0x1b')](0xcc)[_0x7b7e('0x1a')]();});}};}function handleEntityNotFound(_0x48fad1,_0x6a1e71){return function(_0x21a15){if(!_0x21a15){_0x48fad1['sendStatus'](0x194);}return _0x21a15;};}function handleError(_0x57b9da,_0x4e5de7){_0x4e5de7=_0x4e5de7||0x1f4;return function(_0x12ef0b){logger[_0x7b7e('0x29')](_0x12ef0b['stack']);if(_0x12ef0b[_0x7b7e('0x2a')]){delete _0x12ef0b['name'];}_0x57b9da[_0x7b7e('0x1b')](_0x4e5de7)[_0x7b7e('0x2b')](_0x12ef0b);};}exports[_0x7b7e('0x2c')]=function(_0x5515ca,_0x3960b8){var _0xe31336={},_0x35602a={},_0x326dd2={'count':0x0,'rows':[]};var _0x33f9a1=_['map'](db[_0x7b7e('0x2d')]['rawAttributes'],function(_0x23a453){return{'name':_0x23a453[_0x7b7e('0x2e')],'type':_0x23a453[_0x7b7e('0x2f')][_0x7b7e('0x30')]};});_0x35602a[_0x7b7e('0x31')]=_[_0x7b7e('0x32')](_0x33f9a1,_0x7b7e('0x2a'));_0x35602a['query']=_['keys'](_0x5515ca[_0x7b7e('0x33')]);_0x35602a[_0x7b7e('0x34')]=_['intersection'](_0x35602a[_0x7b7e('0x31')],_0x35602a[_0x7b7e('0x33')]);_0xe31336[_0x7b7e('0x35')]=_['intersection'](_0x35602a[_0x7b7e('0x31')],qs[_0x7b7e('0x36')](_0x5515ca[_0x7b7e('0x33')][_0x7b7e('0x36')]));_0xe31336[_0x7b7e('0x35')]=_0xe31336[_0x7b7e('0x35')][_0x7b7e('0x37')]?_0xe31336[_0x7b7e('0x35')]:_0x35602a[_0x7b7e('0x31')];if(!_0x5515ca[_0x7b7e('0x33')][_0x7b7e('0x38')](_0x7b7e('0x39'))){_0xe31336[_0x7b7e('0x1f')]=qs[_0x7b7e('0x1f')](_0x5515ca[_0x7b7e('0x33')][_0x7b7e('0x1f')]);_0xe31336['offset']=qs[_0x7b7e('0x1d')](_0x5515ca[_0x7b7e('0x33')][_0x7b7e('0x1d')]);}_0xe31336[_0x7b7e('0x3a')]=qs[_0x7b7e('0x3b')](_0x5515ca[_0x7b7e('0x33')][_0x7b7e('0x3b')]);_0xe31336[_0x7b7e('0x3c')]=qs[_0x7b7e('0x34')](_[_0x7b7e('0x3d')](_0x5515ca['query'],_0x35602a[_0x7b7e('0x34')]),_0x33f9a1);if(_0x5515ca[_0x7b7e('0x33')][_0x7b7e('0x3e')]){_0xe31336[_0x7b7e('0x3c')]=_['merge'](_0xe31336[_0x7b7e('0x3c')],{'$or':_[_0x7b7e('0x32')](_0x33f9a1,function(_0x3d5280){if(_0x3d5280['type']!=='VIRTUAL'){var _0x22651e={};_0x22651e[_0x3d5280['name']]={'$like':'%'+_0x5515ca[_0x7b7e('0x33')][_0x7b7e('0x3e')]+'%'};return _0x22651e;}})});}_0xe31336=_['merge']({},_0xe31336,_0x5515ca[_0x7b7e('0x3f')]);var _0x2074d1={'where':_0xe31336[_0x7b7e('0x3c')]};return db[_0x7b7e('0x2d')][_0x7b7e('0x20')](_0x2074d1)[_0x7b7e('0x26')](function(_0xc888e4){_0x326dd2[_0x7b7e('0x20')]=_0xc888e4;if(_0x5515ca[_0x7b7e('0x33')]['includeAll']){_0xe31336['include']=[{'all':!![]}];}return db[_0x7b7e('0x2d')]['findAll'](_0xe31336);})[_0x7b7e('0x26')](function(_0x5e8b5d){_0x326dd2['rows']=_0x5e8b5d;return _0x326dd2;})[_0x7b7e('0x26')](respondWithFilteredResult(_0x3960b8,_0xe31336))['catch'](handleError(_0x3960b8,null));};exports[_0x7b7e('0x40')]=function(_0x52051c,_0xa8521d){var _0x3e58be={'raw':!![],'where':{'id':_0x52051c[_0x7b7e('0x41')]['id']}},_0x7ea84c={};_0x7ea84c['model']=_[_0x7b7e('0x42')](db[_0x7b7e('0x2d')][_0x7b7e('0x43')]);_0x7ea84c[_0x7b7e('0x33')]=_[_0x7b7e('0x42')](_0x52051c[_0x7b7e('0x33')]);_0x7ea84c['filters']=_['intersection'](_0x7ea84c['model'],_0x7ea84c[_0x7b7e('0x33')]);_0x3e58be[_0x7b7e('0x35')]=_[_0x7b7e('0x44')](_0x7ea84c[_0x7b7e('0x31')],qs[_0x7b7e('0x36')](_0x52051c[_0x7b7e('0x33')]['fields']));_0x3e58be[_0x7b7e('0x35')]=_0x3e58be[_0x7b7e('0x35')]['length']?_0x3e58be['attributes']:_0x7ea84c[_0x7b7e('0x31')];if(_0x52051c[_0x7b7e('0x33')][_0x7b7e('0x45')]){_0x3e58be[_0x7b7e('0x46')]=[{'all':!![]}];}_0x3e58be=_[_0x7b7e('0x47')]({},_0x3e58be,_0x52051c[_0x7b7e('0x3f')]);return db['VoiceMail'][_0x7b7e('0x48')](_0x3e58be)['then'](handleEntityNotFound(_0xa8521d,null))[_0x7b7e('0x26')](respondWithResult(_0xa8521d,null))[_0x7b7e('0x49')](handleError(_0xa8521d,null));};exports[_0x7b7e('0x4a')]=function(_0x5874e2,_0x58e4e6){return db[_0x7b7e('0x2d')][_0x7b7e('0x4a')](_0x5874e2[_0x7b7e('0x4b')],{})[_0x7b7e('0x26')](function(_0x1f9d0f){var _0x5cce7c=_0x5874e2[_0x7b7e('0x4c')][_0x7b7e('0x27')]({'plain':!![]});if(!_0x5cce7c)throw new Error(_0x7b7e('0x4d'));if(_0x5cce7c[_0x7b7e('0x4e')]===_0x7b7e('0x4c')){var _0x5a9697=_0x1f9d0f[_0x7b7e('0x27')]({'plain':!![]});var _0x29024e=_0x7b7e('0x4f');return db[_0x7b7e('0x50')][_0x7b7e('0x48')]({'where':{'name':_0x29024e,'userProfileId':_0x5cce7c[_0x7b7e('0x51')]},'raw':!![]})[_0x7b7e('0x26')](function(_0x4a7be0){if(_0x4a7be0&&_0x4a7be0[_0x7b7e('0x52')]===0x0){return db['UserProfileResource'][_0x7b7e('0x4a')]({'name':_0x5a9697[_0x7b7e('0x2a')],'resourceId':_0x5a9697['id'],'type':_0x4a7be0['name'],'sectionId':_0x4a7be0['id']},{})[_0x7b7e('0x26')](function(){return _0x1f9d0f;});}else{return _0x1f9d0f;}})[_0x7b7e('0x49')](function(_0x16c81d){logger[_0x7b7e('0x29')](_0x7b7e('0x53'),_0x16c81d);throw _0x16c81d;});}return _0x1f9d0f;})[_0x7b7e('0x26')](respondWithResult(_0x58e4e6,0xc9))[_0x7b7e('0x49')](handleError(_0x58e4e6,null));};exports['update']=function(_0xbf044d,_0x3ff731){if(_0xbf044d[_0x7b7e('0x4b')]['id']){delete _0xbf044d[_0x7b7e('0x4b')]['id'];}return db['VoiceMail']['find']({'where':{'id':_0xbf044d['params']['id']}})[_0x7b7e('0x26')](handleEntityNotFound(_0x3ff731,null))[_0x7b7e('0x26')](saveUpdates(_0xbf044d[_0x7b7e('0x4b')],null))['then'](respondWithResult(_0x3ff731,null))['catch'](handleError(_0x3ff731,null));};exports[_0x7b7e('0x28')]=function(_0x39efb5,_0x4fecf7){return db[_0x7b7e('0x2d')][_0x7b7e('0x48')]({'where':{'id':_0x39efb5[_0x7b7e('0x41')]['id']}})['then'](handleEntityNotFound(_0x4fecf7,null))[_0x7b7e('0x26')](removeEntity(_0x4fecf7,null))[_0x7b7e('0x49')](handleError(_0x4fecf7,null));};exports['getMessages']=function(_0x25c933,_0x441c3c,_0x1d7db1){return db[_0x7b7e('0x2d')][_0x7b7e('0x54')]({'where':{'id':_0x25c933[_0x7b7e('0x41')]['id']}})[_0x7b7e('0x26')](handleEntityNotFound(_0x441c3c,null))[_0x7b7e('0x26')](function(_0x45fff9){var _0x5509ad;var _0x29d0af={},_0x20108a={};_0x20108a['model']=_[_0x7b7e('0x42')](db[_0x7b7e('0x55')][_0x7b7e('0x43')]);_0x20108a['query']=_[_0x7b7e('0x42')](_0x25c933['query']);_0x20108a[_0x7b7e('0x34')]=_[_0x7b7e('0x44')](_0x20108a['model'],_0x20108a[_0x7b7e('0x33')]);_0x29d0af[_0x7b7e('0x35')]=_['intersection'](_0x20108a[_0x7b7e('0x31')],qs[_0x7b7e('0x36')](_0x25c933[_0x7b7e('0x33')][_0x7b7e('0x36')]));_0x29d0af['attributes']=_0x29d0af[_0x7b7e('0x35')][_0x7b7e('0x37')]?_0x29d0af[_0x7b7e('0x35')]:_0x20108a[_0x7b7e('0x31')];if(!_0x25c933[_0x7b7e('0x33')][_0x7b7e('0x38')](_0x7b7e('0x39'))){_0x29d0af[_0x7b7e('0x1f')]=qs[_0x7b7e('0x1f')](_0x25c933[_0x7b7e('0x33')]['limit']);_0x29d0af[_0x7b7e('0x1d')]=qs['offset'](_0x25c933['query'][_0x7b7e('0x1d')]);}_0x29d0af[_0x7b7e('0x3a')]=qs[_0x7b7e('0x3b')](_0x25c933[_0x7b7e('0x33')]['sort']);_0x29d0af[_0x7b7e('0x3c')]=qs[_0x7b7e('0x34')](_[_0x7b7e('0x3d')](_0x25c933[_0x7b7e('0x33')],_0x20108a[_0x7b7e('0x34')]));if(_0x25c933[_0x7b7e('0x33')]['filter']){_0x29d0af[_0x7b7e('0x3c')]=_['merge'](_0x29d0af['where'],{'$or':_[_0x7b7e('0x32')](_0x29d0af['attributes'],function(_0x47aa4c){var _0x4a2378={};_0x4a2378[_0x47aa4c]={'$like':'%'+_0x25c933[_0x7b7e('0x33')][_0x7b7e('0x3e')]+'%'};return _0x4a2378;})});}_0x29d0af['where']=_[_0x7b7e('0x47')](_0x29d0af[_0x7b7e('0x3c')],{'mailboxuser':_0x45fff9['mailbox']});_0x29d0af=_[_0x7b7e('0x47')]({},_0x29d0af,_0x25c933[_0x7b7e('0x3f')]);return db[_0x7b7e('0x55')][_0x7b7e('0x56')](_0x29d0af)[_0x7b7e('0x26')](respondWithFilteredResult(_0x441c3c,_0x29d0af));})[_0x7b7e('0x49')](handleError(_0x441c3c,null));};
\ No newline at end of file
index 07d0a54..705a146 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xca44=['moment','bluebird','request-promise','path','rimraf','./voiceMail.attributes','define','VoiceMail','voice_voicemail','mailbox_context','lodash','util','../../config/logger','api'];(function(_0x2991ec,_0x1fc255){var _0x1b1cff=function(_0x24828){while(--_0x24828){_0x2991ec['push'](_0x2991ec['shift']());}};_0x1b1cff(++_0x1fc255);}(_0xca44,0x184));var _0x4ca4=function(_0x2383bc,_0x25dbf8){_0x2383bc=_0x2383bc-0x0;var _0x4628a7=_0xca44[_0x2383bc];return _0x4628a7;};'use strict';var _=require(_0x4ca4('0x0'));var util=require(_0x4ca4('0x1'));var logger=require(_0x4ca4('0x2'))(_0x4ca4('0x3'));var moment=require(_0x4ca4('0x4'));var BPromise=require(_0x4ca4('0x5'));var rp=require(_0x4ca4('0x6'));var fs=require('fs');var path=require(_0x4ca4('0x7'));var rimraf=require(_0x4ca4('0x8'));var config=require('../../config/environment');var attributes=require(_0x4ca4('0x9'));module['exports']=function(_0x378520,_0x428c29){return _0x378520[_0x4ca4('0xa')](_0x4ca4('0xb'),attributes,{'tableName':_0x4ca4('0xc'),'paranoid':![],'indexes':[{'name':_0x4ca4('0xd'),'fields':['mailbox','context']}],'timestamps':!![]});};
\ No newline at end of file
+var _0x2399=['path','rimraf','./voiceMail.attributes','exports','define','VoiceMail','voice_voicemail','mailbox_context','mailbox','context','lodash','util','../../config/logger','api','bluebird'];(function(_0x4521e3,_0x10a8a4){var _0x46a272=function(_0x2f4c64){while(--_0x2f4c64){_0x4521e3['push'](_0x4521e3['shift']());}};_0x46a272(++_0x10a8a4);}(_0x2399,0xcd));var _0x9239=function(_0x8daa25,_0x41191f){_0x8daa25=_0x8daa25-0x0;var _0x260b85=_0x2399[_0x8daa25];return _0x260b85;};'use strict';var _=require(_0x9239('0x0'));var util=require(_0x9239('0x1'));var logger=require(_0x9239('0x2'))(_0x9239('0x3'));var moment=require('moment');var BPromise=require(_0x9239('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x9239('0x5'));var rimraf=require(_0x9239('0x6'));var config=require('../../config/environment');var attributes=require(_0x9239('0x7'));module[_0x9239('0x8')]=function(_0x296b72,_0x1a2a5e){return _0x296b72[_0x9239('0x9')](_0x9239('0xa'),attributes,{'tableName':_0x9239('0xb'),'paranoid':![],'indexes':[{'name':_0x9239('0xc'),'fields':[_0x9239('0xd'),_0x9239('0xe')]}],'timestamps':!![]});};
\ No newline at end of file
index 46591f0..36de4ab 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x93b7=['../../config/environment','jayson/promise','client','http','request','then','info','VoiceMail,\x20%s,\x20%s','debug','VoiceMail,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x276a5f,_0x5ccf39){var _0x486264=function(_0x2845c0){while(--_0x2845c0){_0x276a5f['push'](_0x276a5f['shift']());}};_0x486264(++_0x5ccf39);}(_0x93b7,0x1e4));var _0x793b=function(_0x19a72c,_0x2229cb){_0x19a72c=_0x19a72c-0x0;var _0x3c6199=_0x93b7[_0x19a72c];return _0x3c6199;};'use strict';var _=require(_0x793b('0x0'));var util=require(_0x793b('0x1'));var moment=require(_0x793b('0x2'));var BPromise=require(_0x793b('0x3'));var rs=require(_0x793b('0x4'));var fs=require('fs');var Redis=require(_0x793b('0x5'));var db=require(_0x793b('0x6'))['db'];var utils=require(_0x793b('0x7'));var logger=require(_0x793b('0x8'))(_0x793b('0x9'));var config=require(_0x793b('0xa'));var jayson=require(_0x793b('0xb'));var client=jayson[_0x793b('0xc')][_0x793b('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x324d91,_0x24ca43,_0x4435f0){return new BPromise(function(_0x5b32dd,_0x4c8f2e){return client[_0x793b('0xe')](_0x324d91,_0x4435f0)[_0x793b('0xf')](function(_0x11dcdf){logger[_0x793b('0x10')](_0x793b('0x11'),_0x24ca43,'request\x20sent');logger[_0x793b('0x12')](_0x793b('0x13'),_0x24ca43,_0x793b('0x14'),JSON[_0x793b('0x15')](_0x11dcdf));if(_0x11dcdf[_0x793b('0x16')]){if(_0x11dcdf['error']['code']===0x1f4){logger[_0x793b('0x16')](_0x793b('0x11'),_0x24ca43,_0x11dcdf[_0x793b('0x16')][_0x793b('0x17')]);return _0x4c8f2e(_0x11dcdf['error']['message']);}logger[_0x793b('0x16')](_0x793b('0x11'),_0x24ca43,_0x11dcdf[_0x793b('0x16')][_0x793b('0x17')]);return _0x5b32dd(_0x11dcdf[_0x793b('0x16')][_0x793b('0x17')]);}else{logger[_0x793b('0x10')](_0x793b('0x11'),_0x24ca43,_0x793b('0x14'));_0x5b32dd(_0x11dcdf[_0x793b('0x18')]['message']);}})[_0x793b('0x19')](function(_0x27c156){logger[_0x793b('0x16')](_0x793b('0x11'),_0x24ca43,_0x27c156);_0x4c8f2e(_0x27c156);});});}
\ No newline at end of file
+var _0x6442=['../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','request\x20sent','VoiceMail,\x20%s,\x20%s,\x20%s','stringify','error','VoiceMail,\x20%s,\x20%s','message','info','result','catch','lodash','util','moment','randomstring','ioredis'];(function(_0xe6e6c1,_0x2108b4){var _0x34ecd9=function(_0x954f5c){while(--_0x954f5c){_0xe6e6c1['push'](_0xe6e6c1['shift']());}};_0x34ecd9(++_0x2108b4);}(_0x6442,0x9c));var _0x2644=function(_0x51f492,_0x6b3e08){_0x51f492=_0x51f492-0x0;var _0x4c76eb=_0x6442[_0x51f492];return _0x4c76eb;};'use strict';var _=require(_0x2644('0x0'));var util=require(_0x2644('0x1'));var moment=require(_0x2644('0x2'));var BPromise=require('bluebird');var rs=require(_0x2644('0x3'));var fs=require('fs');var Redis=require(_0x2644('0x4'));var db=require(_0x2644('0x5'))['db'];var utils=require(_0x2644('0x6'));var logger=require('../../config/logger')(_0x2644('0x7'));var config=require(_0x2644('0x8'));var jayson=require(_0x2644('0x9'));var client=jayson[_0x2644('0xa')][_0x2644('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x25825c,_0x24ecdc,_0x25c910){return new BPromise(function(_0x69b3fa,_0x700e8){return client[_0x2644('0xc')](_0x25825c,_0x25c910)[_0x2644('0xd')](function(_0x3e6e5c){logger['info']('VoiceMail,\x20%s,\x20%s',_0x24ecdc,_0x2644('0xe'));logger['debug'](_0x2644('0xf'),_0x24ecdc,_0x2644('0xe'),JSON[_0x2644('0x10')](_0x3e6e5c));if(_0x3e6e5c[_0x2644('0x11')]){if(_0x3e6e5c[_0x2644('0x11')]['code']===0x1f4){logger[_0x2644('0x11')](_0x2644('0x12'),_0x24ecdc,_0x3e6e5c[_0x2644('0x11')][_0x2644('0x13')]);return _0x700e8(_0x3e6e5c[_0x2644('0x11')][_0x2644('0x13')]);}logger[_0x2644('0x11')]('VoiceMail,\x20%s,\x20%s',_0x24ecdc,_0x3e6e5c[_0x2644('0x11')][_0x2644('0x13')]);return _0x69b3fa(_0x3e6e5c[_0x2644('0x11')][_0x2644('0x13')]);}else{logger[_0x2644('0x14')](_0x2644('0x12'),_0x24ecdc,_0x2644('0xe'));_0x69b3fa(_0x3e6e5c[_0x2644('0x15')][_0x2644('0x13')]);}})[_0x2644('0x16')](function(_0x21aa67){logger[_0x2644('0x11')](_0x2644('0x12'),_0x24ecdc,_0x21aa67);_0x700e8(_0x21aa67);});});}
\ No newline at end of file
index 532bf64..24d522c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9fe9=['../../config/environment','./voiceMailMessage.controller','get','isAuthenticated','index','/:id','show','post','create','put','update','delete','destroy','exports','multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x520725,_0x2714f2){var _0x197db4=function(_0xf3958b){while(--_0xf3958b){_0x520725['push'](_0x520725['shift']());}};_0x197db4(++_0x2714f2);}(_0x9fe9,0xa1));var _0x99fe=function(_0x3b36df,_0x3a1ac8){_0x3b36df=_0x3b36df-0x0;var _0x27c050=_0x9fe9[_0x3b36df];return _0x27c050;};'use strict';var multer=require(_0x99fe('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x99fe('0x1'));var express=require(_0x99fe('0x2'));var router=express[_0x99fe('0x3')]();var fs_extra=require(_0x99fe('0x4'));var auth=require(_0x99fe('0x5'));var interaction=require(_0x99fe('0x6'));var config=require(_0x99fe('0x7'));var controller=require(_0x99fe('0x8'));router[_0x99fe('0x9')]('/',auth[_0x99fe('0xa')](),controller[_0x99fe('0xb')]);router['get'](_0x99fe('0xc'),auth[_0x99fe('0xa')](),controller[_0x99fe('0xd')]);router[_0x99fe('0x9')]('/:id/download',auth[_0x99fe('0xa')](),controller['download']);router[_0x99fe('0xe')]('/',auth[_0x99fe('0xa')](),controller[_0x99fe('0xf')]);router[_0x99fe('0x10')]('/:id',auth[_0x99fe('0xa')](),controller[_0x99fe('0x11')]);router[_0x99fe('0x12')]('/:id',auth[_0x99fe('0xa')](),controller[_0x99fe('0x13')]);module[_0x99fe('0x14')]=router;
\ No newline at end of file
+var _0xb9a4=['put','exports','util','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','get','/:id','isAuthenticated','show','/:id/download','download','post','create'];(function(_0x8353d0,_0x592d3f){var _0x52ee64=function(_0x328b53){while(--_0x328b53){_0x8353d0['push'](_0x8353d0['shift']());}};_0x52ee64(++_0x592d3f);}(_0xb9a4,0xf2));var _0x4b9a=function(_0x1ae59c,_0x7b8339){_0x1ae59c=_0x1ae59c-0x0;var _0x176aae=_0xb9a4[_0x1ae59c];return _0x176aae;};'use strict';var multer=require('multer');var util=require(_0x4b9a('0x0'));var path=require('path');var timeout=require(_0x4b9a('0x1'));var express=require(_0x4b9a('0x2'));var router=express['Router']();var fs_extra=require(_0x4b9a('0x3'));var auth=require(_0x4b9a('0x4'));var interaction=require(_0x4b9a('0x5'));var config=require('../../config/environment');var controller=require('./voiceMailMessage.controller');router['get']('/',auth['isAuthenticated'](),controller['index']);router[_0x4b9a('0x6')](_0x4b9a('0x7'),auth[_0x4b9a('0x8')](),controller[_0x4b9a('0x9')]);router['get'](_0x4b9a('0xa'),auth[_0x4b9a('0x8')](),controller[_0x4b9a('0xb')]);router[_0x4b9a('0xc')]('/',auth[_0x4b9a('0x8')](),controller[_0x4b9a('0xd')]);router[_0x4b9a('0xe')](_0x4b9a('0x7'),auth[_0x4b9a('0x8')](),controller['update']);router['delete'](_0x4b9a('0x7'),auth[_0x4b9a('0x8')](),controller['destroy']);module[_0x4b9a('0xf')]=router;
\ No newline at end of file
index f2f1aab..879de31 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9d98=['getDataValue','INTEGER','STRING','long','literal','exports','VIRTUAL'];(function(_0x5230b7,_0x5c4ca2){var _0x22694c=function(_0x53df69){while(--_0x53df69){_0x5230b7['push'](_0x5230b7['shift']());}};_0x22694c(++_0x5c4ca2);}(_0x9d98,0x1e1));var _0x89d9=function(_0x3860b6,_0x2c7203){_0x3860b6=_0x3860b6-0x0;var _0xb1ef0b=_0x9d98[_0x3860b6];return _0xb1ef0b;};'use strict';var Sequelize=require('sequelize');module[_0x89d9('0x0')]={'name':{'type':Sequelize[_0x89d9('0x1')],'get':function(_0x3d9908){return this[_0x89d9('0x2')]('id');}},'msgnum':{'type':Sequelize[_0x89d9('0x3')](0xb),'defaultValue':0x0,'allowNull':![]},'dir':{'type':Sequelize[_0x89d9('0x4')],'defaultValue':''},'context':{'type':Sequelize[_0x89d9('0x4')],'defaultValue':''},'macrocontext':{'type':Sequelize[_0x89d9('0x4')],'defaultValue':''},'callerid':{'type':Sequelize[_0x89d9('0x4')],'defaultValue':''},'origtime':{'type':Sequelize[_0x89d9('0x4')],'defaultValue':''},'duration':{'type':Sequelize['STRING'],'defaultValue':''},'mailboxuser':{'type':Sequelize[_0x89d9('0x4')],'defaultValue':''},'mailboxcontext':{'type':Sequelize[_0x89d9('0x4')],'defaultValue':''},'recording':{'type':Sequelize['BLOB'](_0x89d9('0x5')),'defaultValue':null},'flag':{'type':Sequelize['STRING'],'defaultValue':''},'msg_id':{'type':Sequelize[_0x89d9('0x4')],'defaultValue':''},'stamp':{'type':'TIMESTAMP','defaultValue':Sequelize[_0x89d9('0x6')]('CURRENT_TIMESTAMP\x20ON\x20UPDATE\x20CURRENT_TIMESTAMP')}};
\ No newline at end of file
+var _0xbd15=['STRING','BLOB','CURRENT_TIMESTAMP\x20ON\x20UPDATE\x20CURRENT_TIMESTAMP','sequelize','exports','VIRTUAL'];(function(_0x465028,_0x4570ac){var _0xb783d4=function(_0x5458c5){while(--_0x5458c5){_0x465028['push'](_0x465028['shift']());}};_0xb783d4(++_0x4570ac);}(_0xbd15,0x6f));var _0x5bd1=function(_0x56a74a,_0x1ebcc4){_0x56a74a=_0x56a74a-0x0;var _0x136f4d=_0xbd15[_0x56a74a];return _0x136f4d;};'use strict';var Sequelize=require(_0x5bd1('0x0'));module[_0x5bd1('0x1')]={'name':{'type':Sequelize[_0x5bd1('0x2')],'get':function(_0x3645ff){return this['getDataValue']('id');}},'msgnum':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0,'allowNull':![]},'dir':{'type':Sequelize['STRING'],'defaultValue':''},'context':{'type':Sequelize['STRING'],'defaultValue':''},'macrocontext':{'type':Sequelize[_0x5bd1('0x3')],'defaultValue':''},'callerid':{'type':Sequelize[_0x5bd1('0x3')],'defaultValue':''},'origtime':{'type':Sequelize[_0x5bd1('0x3')],'defaultValue':''},'duration':{'type':Sequelize[_0x5bd1('0x3')],'defaultValue':''},'mailboxuser':{'type':Sequelize[_0x5bd1('0x3')],'defaultValue':''},'mailboxcontext':{'type':Sequelize[_0x5bd1('0x3')],'defaultValue':''},'recording':{'type':Sequelize[_0x5bd1('0x4')]('long'),'defaultValue':null},'flag':{'type':Sequelize[_0x5bd1('0x3')],'defaultValue':''},'msg_id':{'type':Sequelize[_0x5bd1('0x3')],'defaultValue':''},'stamp':{'type':'TIMESTAMP','defaultValue':Sequelize['literal'](_0x5bd1('0x5'))}};
\ No newline at end of file
index c9435a7..5263a34 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9e63=['rows','catch','show','rawAttributes','intersection','create','body','find','params','download','recording','msg_id','Sequelize','VoiceMailMessage\x20not\x20found','audio/wav','attachment','Content-Disposition','attachment;\x20filename=\x22','.wav\x22','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','path','sox','to-csv','fs-extra','crypto','jsforce','querystring','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','set','json','apply','reject','save','update','then','destroy','error','stack','name','send','map','VoiceMailMessage','fieldName','key','model','query','keys','filters','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','type','VIRTUAL','merge','options','includeAll','include','findAll'];(function(_0x464ee7,_0x1f0c1a){var _0x4c9ae3=function(_0x5ef5ff){while(--_0x5ef5ff){_0x464ee7['push'](_0x464ee7['shift']());}};_0x4c9ae3(++_0x1f0c1a);}(_0x9e63,0x106));var _0x39e6=function(_0x47b58b,_0x41a189){_0x47b58b=_0x47b58b-0x0;var _0x46bebe=_0x9e63[_0x47b58b];return _0x46bebe;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x39e6('0x0'));var zipdir=require(_0x39e6('0x1'));var jsonpatch=require(_0x39e6('0x2'));var rp=require('request-promise');var moment=require(_0x39e6('0x3'));var BPromise=require(_0x39e6('0x4'));var Mustache=require('mustache');var util=require(_0x39e6('0x5'));var path=require(_0x39e6('0x6'));var sox=require(_0x39e6('0x7'));var csv=require(_0x39e6('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x39e6('0x9'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x39e6('0xa'));var jsforce=require(_0x39e6('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x39e6('0x8'));var querystring=require(_0x39e6('0xc'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x39e6('0xd'));var as=require(_0x39e6('0xe'));var hardwareService=require(_0x39e6('0xf'));var logger=require(_0x39e6('0x10'))(_0x39e6('0x11'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x39e6('0x12'))['db'];function respondWithStatusCode(_0x3b36be,_0x59f9f7){_0x59f9f7=_0x59f9f7||0xcc;return function(_0x182d48){if(_0x182d48){return _0x3b36be[_0x39e6('0x13')](_0x59f9f7);}return _0x3b36be[_0x39e6('0x14')](_0x59f9f7)[_0x39e6('0x15')]();};}function respondWithResult(_0x5a58c1,_0x4da910){_0x4da910=_0x4da910||0xc8;return function(_0x585da5){if(_0x585da5){return _0x5a58c1[_0x39e6('0x14')](_0x4da910)['json'](_0x585da5);}};}function respondWithFilteredResult(_0xeb59e,_0x1f4796){return function(_0x1498a1){if(_0x1498a1){var _0x524473=typeof _0x1f4796[_0x39e6('0x16')]===_0x39e6('0x17')&&typeof _0x1f4796[_0x39e6('0x18')]===_0x39e6('0x17');var _0x586087=_0x1498a1[_0x39e6('0x19')];var _0xbe2f32=_0x524473?0x0:_0x1f4796[_0x39e6('0x16')];var _0x471e16=_0x524473?_0x1498a1[_0x39e6('0x19')]:_0x1f4796[_0x39e6('0x16')]+_0x1f4796['limit'];var _0x3a9c89;if(_0x471e16>=_0x586087){_0x471e16=_0x586087;_0x3a9c89=0xc8;}else{_0x3a9c89=0xce;}_0xeb59e[_0x39e6('0x14')](_0x3a9c89);return _0xeb59e[_0x39e6('0x1a')]('Content-Range',_0xbe2f32+'-'+_0x471e16+'/'+_0x586087)[_0x39e6('0x1b')](_0x1498a1);}return null;};}function patchUpdates(_0x2c833d){return function(_0x2cda87){try{jsonpatch[_0x39e6('0x1c')](_0x2cda87,_0x2c833d,!![]);}catch(_0xa90936){return BPromise[_0x39e6('0x1d')](_0xa90936);}return _0x2cda87[_0x39e6('0x1e')]();};}function saveUpdates(_0x47c2ed,_0x4cc30f){return function(_0x3c56e8){if(_0x3c56e8){return _0x3c56e8[_0x39e6('0x1f')](_0x47c2ed)[_0x39e6('0x20')](function(_0x37c193){return _0x37c193;});}return null;};}function removeEntity(_0x21ce6c,_0x36034f){return function(_0xf78902){if(_0xf78902){return _0xf78902[_0x39e6('0x21')]()['then'](function(){_0x21ce6c['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x2a4db8,_0x5ed714){return function(_0x50cea3){if(!_0x50cea3){_0x2a4db8[_0x39e6('0x13')](0x194);}return _0x50cea3;};}function handleError(_0x35095a,_0x3c296a){_0x3c296a=_0x3c296a||0x1f4;return function(_0x533f37){logger[_0x39e6('0x22')](_0x533f37[_0x39e6('0x23')]);if(_0x533f37[_0x39e6('0x24')]){delete _0x533f37['name'];}_0x35095a[_0x39e6('0x14')](_0x3c296a)[_0x39e6('0x25')](_0x533f37);};}exports['index']=function(_0x5e4928,_0x477a59){var _0x36ad1d={},_0x28d7fc={},_0x13cbbd={'count':0x0,'rows':[]};var _0x5e30ec=_[_0x39e6('0x26')](db[_0x39e6('0x27')]['rawAttributes'],function(_0x4325a7){return{'name':_0x4325a7[_0x39e6('0x28')],'type':_0x4325a7['type'][_0x39e6('0x29')]};});_0x28d7fc[_0x39e6('0x2a')]=_['differenceBy'](_[_0x39e6('0x26')](_0x5e30ec,_0x39e6('0x24')),[_0x39e6('0x24')]);_0x28d7fc[_0x39e6('0x2b')]=_[_0x39e6('0x2c')](_0x5e4928[_0x39e6('0x2b')]);_0x28d7fc[_0x39e6('0x2d')]=_['intersection'](_0x28d7fc[_0x39e6('0x2a')],_0x28d7fc['query']);_0x36ad1d['attributes']=_['intersection'](_0x28d7fc[_0x39e6('0x2a')],qs['fields'](_0x5e4928[_0x39e6('0x2b')][_0x39e6('0x2e')]));_0x36ad1d[_0x39e6('0x2f')]=_0x36ad1d[_0x39e6('0x2f')]['length']?_0x36ad1d[_0x39e6('0x2f')]:_0x28d7fc[_0x39e6('0x2a')];if(!_0x5e4928[_0x39e6('0x2b')][_0x39e6('0x30')](_0x39e6('0x31'))){_0x36ad1d[_0x39e6('0x18')]=qs[_0x39e6('0x18')](_0x5e4928[_0x39e6('0x2b')][_0x39e6('0x18')]);_0x36ad1d[_0x39e6('0x16')]=qs[_0x39e6('0x16')](_0x5e4928['query'][_0x39e6('0x16')]);}_0x36ad1d[_0x39e6('0x32')]=qs[_0x39e6('0x33')](_0x5e4928[_0x39e6('0x2b')][_0x39e6('0x33')]);_0x36ad1d[_0x39e6('0x34')]=qs[_0x39e6('0x2d')](_[_0x39e6('0x35')](_0x5e4928['query'],_0x28d7fc[_0x39e6('0x2d')]),_0x5e30ec);if(_0x5e4928[_0x39e6('0x2b')][_0x39e6('0x36')]){_0x36ad1d[_0x39e6('0x34')]=_['merge'](_0x36ad1d[_0x39e6('0x34')],{'$or':_[_0x39e6('0x26')](_0x5e30ec,function(_0xef75fc){if(_0xef75fc[_0x39e6('0x37')]!==_0x39e6('0x38')){var _0x2f8002={};_0x2f8002[_0xef75fc[_0x39e6('0x24')]]={'$like':'%'+_0x5e4928[_0x39e6('0x2b')][_0x39e6('0x36')]+'%'};return _0x2f8002;}})});}_0x36ad1d=_[_0x39e6('0x39')]({},_0x36ad1d,_0x5e4928[_0x39e6('0x3a')]);var _0x3ad0b1={'where':_0x36ad1d[_0x39e6('0x34')]};return db[_0x39e6('0x27')][_0x39e6('0x19')](_0x3ad0b1)[_0x39e6('0x20')](function(_0x5cbb69){_0x13cbbd[_0x39e6('0x19')]=_0x5cbb69;if(_0x5e4928[_0x39e6('0x2b')][_0x39e6('0x3b')]){_0x36ad1d[_0x39e6('0x3c')]=[{'all':!![]}];}return db[_0x39e6('0x27')][_0x39e6('0x3d')](_0x36ad1d);})[_0x39e6('0x20')](function(_0x3942ca){_0x13cbbd[_0x39e6('0x3e')]=_0x3942ca;return _0x13cbbd;})[_0x39e6('0x20')](respondWithFilteredResult(_0x477a59,_0x36ad1d))[_0x39e6('0x3f')](handleError(_0x477a59,null));};exports[_0x39e6('0x40')]=function(_0x1be671,_0x4db725){var _0xd0ccc9={'raw':!![],'where':{'id':_0x1be671['params']['id']}},_0x2511e1={};_0x2511e1[_0x39e6('0x2a')]=_[_0x39e6('0x2c')](db[_0x39e6('0x27')][_0x39e6('0x41')]);_0x2511e1[_0x39e6('0x2b')]=_[_0x39e6('0x2c')](_0x1be671[_0x39e6('0x2b')]);_0x2511e1[_0x39e6('0x2d')]=_['intersection'](_0x2511e1[_0x39e6('0x2a')],_0x2511e1[_0x39e6('0x2b')]);_0xd0ccc9[_0x39e6('0x2f')]=_[_0x39e6('0x42')](_0x2511e1[_0x39e6('0x2a')],qs[_0x39e6('0x2e')](_0x1be671[_0x39e6('0x2b')][_0x39e6('0x2e')]));_0xd0ccc9[_0x39e6('0x2f')]=_0xd0ccc9[_0x39e6('0x2f')]['length']?_0xd0ccc9[_0x39e6('0x2f')]:_0x2511e1[_0x39e6('0x2a')];if(_0x1be671[_0x39e6('0x2b')]['includeAll']){_0xd0ccc9['include']=[{'all':!![]}];}_0xd0ccc9=_[_0x39e6('0x39')]({},_0xd0ccc9,_0x1be671['options']);return db[_0x39e6('0x27')]['find'](_0xd0ccc9)[_0x39e6('0x20')](handleEntityNotFound(_0x4db725,null))[_0x39e6('0x20')](respondWithResult(_0x4db725,null))['catch'](handleError(_0x4db725,null));};exports[_0x39e6('0x43')]=function(_0x20efb6,_0xe1107b){return db['VoiceMailMessage'][_0x39e6('0x43')](_0x20efb6[_0x39e6('0x44')],{})['then'](respondWithResult(_0xe1107b,0xc9))[_0x39e6('0x3f')](handleError(_0xe1107b,null));};exports['update']=function(_0x3c3e94,_0x190c94){if(_0x3c3e94[_0x39e6('0x44')]['id']){delete _0x3c3e94['body']['id'];}return db[_0x39e6('0x27')][_0x39e6('0x45')]({'where':{'id':_0x3c3e94[_0x39e6('0x46')]['id']}})[_0x39e6('0x20')](handleEntityNotFound(_0x190c94,null))['then'](saveUpdates(_0x3c3e94['body'],null))[_0x39e6('0x20')](respondWithResult(_0x190c94,null))['catch'](handleError(_0x190c94,null));};exports[_0x39e6('0x21')]=function(_0x29748f,_0x4e0dc4){return db[_0x39e6('0x27')]['find']({'where':{'id':_0x29748f['params']['id']}})[_0x39e6('0x20')](handleEntityNotFound(_0x4e0dc4,null))[_0x39e6('0x20')](removeEntity(_0x4e0dc4,null))[_0x39e6('0x3f')](handleError(_0x4e0dc4,null));};exports[_0x39e6('0x47')]=function(_0x257abe,_0x2def6c,_0x2f987e){return db[_0x39e6('0x27')][_0x39e6('0x45')]({'where':{'id':_0x257abe['params']['id']},'attributes':['id',_0x39e6('0x48'),_0x39e6('0x49')]})[_0x39e6('0x20')](handleEntityNotFound(_0x2def6c,null))['then'](function(_0x86eebc){if(_0x86eebc){if(!_0x86eebc[_0x39e6('0x48')]){throw new db[(_0x39e6('0x4a'))]['ValidationError'](_0x39e6('0x4b'));}var _0x5adc74={'Content-Type':_0x39e6('0x4c'),'Content-Disposition':_0x39e6('0x4d')};if(_0x86eebc[_0x39e6('0x49')]){_0x5adc74[_0x39e6('0x4e')]=_0x39e6('0x4f')+_0x86eebc[_0x39e6('0x49')]+_0x39e6('0x50');}_0x2def6c[_0x39e6('0x1a')](_0x5adc74);return _0x2def6c[_0x39e6('0x25')](new Buffer(_0x86eebc['recording']));}})[_0x39e6('0x3f')](handleError(_0x2def6c,null));};
\ No newline at end of file
+var _0x2afa=['includeAll','findAll','rows','catch','show','params','length','include','options','find','create','body','update','msg_id','recording','Sequelize','attachment','Content-Disposition','attachment;\x20filename=\x22','.wav\x22','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','sox','ejs','fs-extra','squel','crypto','jsforce','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','offset','undefined','count','limit','set','apply','reject','save','then','destroy','sendStatus','error','stack','name','send','VoiceMailMessage','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','VIRTUAL'];(function(_0x4b6a33,_0x367275){var _0x51af0a=function(_0x2ac4eb){while(--_0x2ac4eb){_0x4b6a33['push'](_0x4b6a33['shift']());}};_0x51af0a(++_0x367275);}(_0x2afa,0x67));var _0xa2af=function(_0x708b52,_0x3ac80c){_0x708b52=_0x708b52-0x0;var _0x5470e2=_0x2afa[_0x708b52];return _0x5470e2;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xa2af('0x0'));var zipdir=require(_0xa2af('0x1'));var jsonpatch=require(_0xa2af('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xa2af('0x3'));var Mustache=require(_0xa2af('0x4'));var util=require(_0xa2af('0x5'));var path=require('path');var sox=require(_0xa2af('0x6'));var csv=require('to-csv');var ejs=require(_0xa2af('0x7'));var fs=require('fs');var fs_extra=require(_0xa2af('0x8'));var _=require('lodash');var squel=require(_0xa2af('0x9'));var crypto=require(_0xa2af('0xa'));var jsforce=require(_0xa2af('0xb'));var deskjs=require(_0xa2af('0xc'));var toCsv=require(_0xa2af('0xd'));var querystring=require(_0xa2af('0xe'));var Papa=require('papaparse');var Redis=require(_0xa2af('0xf'));var authService=require(_0xa2af('0x10'));var qs=require(_0xa2af('0x11'));var as=require(_0xa2af('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xa2af('0x13'));var utils=require(_0xa2af('0x14'));var config=require(_0xa2af('0x15'));var licenseUtil=require(_0xa2af('0x16'));var db=require(_0xa2af('0x17'))['db'];function respondWithStatusCode(_0x2cffc1,_0xe295f0){_0xe295f0=_0xe295f0||0xcc;return function(_0x4de435){if(_0x4de435){return _0x2cffc1['sendStatus'](_0xe295f0);}return _0x2cffc1[_0xa2af('0x18')](_0xe295f0)[_0xa2af('0x19')]();};}function respondWithResult(_0x10db88,_0x261f10){_0x261f10=_0x261f10||0xc8;return function(_0x556583){if(_0x556583){return _0x10db88[_0xa2af('0x18')](_0x261f10)['json'](_0x556583);}};}function respondWithFilteredResult(_0x12266a,_0x30ad15){return function(_0x19b31a){if(_0x19b31a){var _0xf277cf=typeof _0x30ad15[_0xa2af('0x1a')]==='undefined'&&typeof _0x30ad15['limit']===_0xa2af('0x1b');var _0x21e6df=_0x19b31a['count'];var _0x21bf11=_0xf277cf?0x0:_0x30ad15[_0xa2af('0x1a')];var _0x4cee10=_0xf277cf?_0x19b31a[_0xa2af('0x1c')]:_0x30ad15[_0xa2af('0x1a')]+_0x30ad15[_0xa2af('0x1d')];var _0x181663;if(_0x4cee10>=_0x21e6df){_0x4cee10=_0x21e6df;_0x181663=0xc8;}else{_0x181663=0xce;}_0x12266a[_0xa2af('0x18')](_0x181663);return _0x12266a[_0xa2af('0x1e')]('Content-Range',_0x21bf11+'-'+_0x4cee10+'/'+_0x21e6df)['json'](_0x19b31a);}return null;};}function patchUpdates(_0x5acc5c){return function(_0x481f9f){try{jsonpatch[_0xa2af('0x1f')](_0x481f9f,_0x5acc5c,!![]);}catch(_0x211b34){return BPromise[_0xa2af('0x20')](_0x211b34);}return _0x481f9f[_0xa2af('0x21')]();};}function saveUpdates(_0x58989e,_0x273f23){return function(_0x6af977){if(_0x6af977){return _0x6af977['update'](_0x58989e)[_0xa2af('0x22')](function(_0x582173){return _0x582173;});}return null;};}function removeEntity(_0x24b7f2,_0x49663e){return function(_0x4f1674){if(_0x4f1674){return _0x4f1674[_0xa2af('0x23')]()['then'](function(){_0x24b7f2[_0xa2af('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x210660,_0x4733d1){return function(_0x489aed){if(!_0x489aed){_0x210660[_0xa2af('0x24')](0x194);}return _0x489aed;};}function handleError(_0x4b52c4,_0x1dda1a){_0x1dda1a=_0x1dda1a||0x1f4;return function(_0x170771){logger[_0xa2af('0x25')](_0x170771[_0xa2af('0x26')]);if(_0x170771[_0xa2af('0x27')]){delete _0x170771[_0xa2af('0x27')];}_0x4b52c4[_0xa2af('0x18')](_0x1dda1a)[_0xa2af('0x28')](_0x170771);};}exports['index']=function(_0x19ca28,_0x3e7a2b){var _0x309249={},_0x37efbd={},_0x1d3ff5={'count':0x0,'rows':[]};var _0x7088af=_['map'](db[_0xa2af('0x29')][_0xa2af('0x2a')],function(_0x579bb5){return{'name':_0x579bb5[_0xa2af('0x2b')],'type':_0x579bb5[_0xa2af('0x2c')][_0xa2af('0x2d')]};});_0x37efbd[_0xa2af('0x2e')]=_['differenceBy'](_['map'](_0x7088af,'name'),[_0xa2af('0x27')]);_0x37efbd[_0xa2af('0x2f')]=_[_0xa2af('0x30')](_0x19ca28['query']);_0x37efbd[_0xa2af('0x31')]=_[_0xa2af('0x32')](_0x37efbd[_0xa2af('0x2e')],_0x37efbd['query']);_0x309249['attributes']=_[_0xa2af('0x32')](_0x37efbd[_0xa2af('0x2e')],qs[_0xa2af('0x33')](_0x19ca28[_0xa2af('0x2f')][_0xa2af('0x33')]));_0x309249[_0xa2af('0x34')]=_0x309249['attributes']['length']?_0x309249[_0xa2af('0x34')]:_0x37efbd[_0xa2af('0x2e')];if(!_0x19ca28[_0xa2af('0x2f')][_0xa2af('0x35')](_0xa2af('0x36'))){_0x309249['limit']=qs['limit'](_0x19ca28[_0xa2af('0x2f')][_0xa2af('0x1d')]);_0x309249[_0xa2af('0x1a')]=qs[_0xa2af('0x1a')](_0x19ca28[_0xa2af('0x2f')][_0xa2af('0x1a')]);}_0x309249[_0xa2af('0x37')]=qs[_0xa2af('0x38')](_0x19ca28[_0xa2af('0x2f')][_0xa2af('0x38')]);_0x309249[_0xa2af('0x39')]=qs[_0xa2af('0x31')](_[_0xa2af('0x3a')](_0x19ca28['query'],_0x37efbd[_0xa2af('0x31')]),_0x7088af);if(_0x19ca28[_0xa2af('0x2f')][_0xa2af('0x3b')]){_0x309249[_0xa2af('0x39')]=_[_0xa2af('0x3c')](_0x309249[_0xa2af('0x39')],{'$or':_[_0xa2af('0x3d')](_0x7088af,function(_0x260b88){if(_0x260b88[_0xa2af('0x2c')]!==_0xa2af('0x3e')){var _0x155ef0={};_0x155ef0[_0x260b88[_0xa2af('0x27')]]={'$like':'%'+_0x19ca28['query']['filter']+'%'};return _0x155ef0;}})});}_0x309249=_['merge']({},_0x309249,_0x19ca28['options']);var _0x44fb0a={'where':_0x309249['where']};return db[_0xa2af('0x29')][_0xa2af('0x1c')](_0x44fb0a)['then'](function(_0x14ac85){_0x1d3ff5[_0xa2af('0x1c')]=_0x14ac85;if(_0x19ca28[_0xa2af('0x2f')][_0xa2af('0x3f')]){_0x309249['include']=[{'all':!![]}];}return db[_0xa2af('0x29')][_0xa2af('0x40')](_0x309249);})[_0xa2af('0x22')](function(_0x144a80){_0x1d3ff5[_0xa2af('0x41')]=_0x144a80;return _0x1d3ff5;})['then'](respondWithFilteredResult(_0x3e7a2b,_0x309249))[_0xa2af('0x42')](handleError(_0x3e7a2b,null));};exports[_0xa2af('0x43')]=function(_0x2fcdef,_0x2a23c5){var _0x3d05b2={'raw':!![],'where':{'id':_0x2fcdef[_0xa2af('0x44')]['id']}},_0x44d7f1={};_0x44d7f1[_0xa2af('0x2e')]=_[_0xa2af('0x30')](db['VoiceMailMessage']['rawAttributes']);_0x44d7f1[_0xa2af('0x2f')]=_[_0xa2af('0x30')](_0x2fcdef[_0xa2af('0x2f')]);_0x44d7f1['filters']=_['intersection'](_0x44d7f1[_0xa2af('0x2e')],_0x44d7f1[_0xa2af('0x2f')]);_0x3d05b2[_0xa2af('0x34')]=_[_0xa2af('0x32')](_0x44d7f1['model'],qs['fields'](_0x2fcdef[_0xa2af('0x2f')][_0xa2af('0x33')]));_0x3d05b2[_0xa2af('0x34')]=_0x3d05b2[_0xa2af('0x34')][_0xa2af('0x45')]?_0x3d05b2['attributes']:_0x44d7f1['model'];if(_0x2fcdef[_0xa2af('0x2f')]['includeAll']){_0x3d05b2[_0xa2af('0x46')]=[{'all':!![]}];}_0x3d05b2=_[_0xa2af('0x3c')]({},_0x3d05b2,_0x2fcdef[_0xa2af('0x47')]);return db[_0xa2af('0x29')][_0xa2af('0x48')](_0x3d05b2)['then'](handleEntityNotFound(_0x2a23c5,null))[_0xa2af('0x22')](respondWithResult(_0x2a23c5,null))[_0xa2af('0x42')](handleError(_0x2a23c5,null));};exports[_0xa2af('0x49')]=function(_0x24c337,_0x1e90d6){return db['VoiceMailMessage'][_0xa2af('0x49')](_0x24c337[_0xa2af('0x4a')],{})[_0xa2af('0x22')](respondWithResult(_0x1e90d6,0xc9))[_0xa2af('0x42')](handleError(_0x1e90d6,null));};exports[_0xa2af('0x4b')]=function(_0x42f817,_0x149998){if(_0x42f817['body']['id']){delete _0x42f817['body']['id'];}return db[_0xa2af('0x29')]['find']({'where':{'id':_0x42f817[_0xa2af('0x44')]['id']}})[_0xa2af('0x22')](handleEntityNotFound(_0x149998,null))['then'](saveUpdates(_0x42f817[_0xa2af('0x4a')],null))[_0xa2af('0x22')](respondWithResult(_0x149998,null))[_0xa2af('0x42')](handleError(_0x149998,null));};exports[_0xa2af('0x23')]=function(_0x49e50a,_0x6571d1){return db[_0xa2af('0x29')][_0xa2af('0x48')]({'where':{'id':_0x49e50a['params']['id']}})['then'](handleEntityNotFound(_0x6571d1,null))[_0xa2af('0x22')](removeEntity(_0x6571d1,null))[_0xa2af('0x42')](handleError(_0x6571d1,null));};exports['download']=function(_0x5a9eac,_0x2cd3f7,_0x353654){return db[_0xa2af('0x29')][_0xa2af('0x48')]({'where':{'id':_0x5a9eac[_0xa2af('0x44')]['id']},'attributes':['id','recording',_0xa2af('0x4c')]})[_0xa2af('0x22')](handleEntityNotFound(_0x2cd3f7,null))[_0xa2af('0x22')](function(_0x44572f){if(_0x44572f){if(!_0x44572f[_0xa2af('0x4d')]){throw new db[(_0xa2af('0x4e'))]['ValidationError']('VoiceMailMessage\x20not\x20found');}var _0x32c2d3={'Content-Type':'audio/wav','Content-Disposition':_0xa2af('0x4f')};if(_0x44572f[_0xa2af('0x4c')]){_0x32c2d3[_0xa2af('0x50')]=_0xa2af('0x51')+_0x44572f['msg_id']+_0xa2af('0x52');}_0x2cd3f7['set'](_0x32c2d3);return _0x2cd3f7[_0xa2af('0x28')](new Buffer(_0x44572f[_0xa2af('0x4d')]));}})[_0xa2af('0x42')](handleError(_0x2cd3f7,null));};
\ No newline at end of file
index 7e21764..e4f9212 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8ad4=['moment','request-promise','rimraf','../../config/environment','./voiceMailMessage.attributes','define','VoiceMailMessage','dir','lodash','../../config/logger','api'];(function(_0x46111d,_0x5d286b){var _0xe82586=function(_0x39551b){while(--_0x39551b){_0x46111d['push'](_0x46111d['shift']());}};_0xe82586(++_0x5d286b);}(_0x8ad4,0x1aa));var _0x48ad=function(_0x44e0a2,_0x59d296){_0x44e0a2=_0x44e0a2-0x0;var _0x518791=_0x8ad4[_0x44e0a2];return _0x518791;};'use strict';var _=require(_0x48ad('0x0'));var util=require('util');var logger=require(_0x48ad('0x1'))(_0x48ad('0x2'));var moment=require(_0x48ad('0x3'));var BPromise=require('bluebird');var rp=require(_0x48ad('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x48ad('0x5'));var config=require(_0x48ad('0x6'));var attributes=require(_0x48ad('0x7'));module['exports']=function(_0x29b9f3,_0x306ca2){return _0x29b9f3[_0x48ad('0x8')](_0x48ad('0x9'),attributes,{'tableName':'voice_voicemail_messages','paranoid':![],'indexes':[{'name':_0x48ad('0xa'),'fields':[_0x48ad('0xa')]}],'timestamps':![]});};
\ No newline at end of file
+var _0x4988=['rimraf','../../config/environment','./voiceMailMessage.attributes','VoiceMailMessage','voice_voicemail_messages','dir','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x4a1056,_0x466230){var _0x325776=function(_0xdc970c){while(--_0xdc970c){_0x4a1056['push'](_0x4a1056['shift']());}};_0x325776(++_0x466230);}(_0x4988,0xf4));var _0x8498=function(_0x596073,_0x4ce28d){_0x596073=_0x596073-0x0;var _0x4392c8=_0x4988[_0x596073];return _0x4392c8;};'use strict';var _=require(_0x8498('0x0'));var util=require(_0x8498('0x1'));var logger=require(_0x8498('0x2'))(_0x8498('0x3'));var moment=require(_0x8498('0x4'));var BPromise=require(_0x8498('0x5'));var rp=require(_0x8498('0x6'));var fs=require('fs');var path=require(_0x8498('0x7'));var rimraf=require(_0x8498('0x8'));var config=require(_0x8498('0x9'));var attributes=require(_0x8498('0xa'));module['exports']=function(_0x5aa94b,_0x4a1296){return _0x5aa94b['define'](_0x8498('0xb'),attributes,{'tableName':_0x8498('0xc'),'paranoid':![],'indexes':[{'name':_0x8498('0xd'),'fields':[_0x8498('0xd')]}],'timestamps':![]});};
\ No newline at end of file
index 958be56..2f62c9c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x25d9=['http','request','then','info','debug','VoiceMailMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','VoiceMailMessage,\x20%s,\x20%s','catch','util','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x2e48a6,_0x3b7abd){var _0x539fb7=function(_0x268350){while(--_0x268350){_0x2e48a6['push'](_0x2e48a6['shift']());}};_0x539fb7(++_0x3b7abd);}(_0x25d9,0x1db));var _0x925d=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x25d9[_0x2641f9];return _0x585741;};'use strict';var _=require('lodash');var util=require(_0x925d('0x0'));var moment=require('moment');var BPromise=require(_0x925d('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x925d('0x2'))['db'];var utils=require(_0x925d('0x3'));var logger=require(_0x925d('0x4'))(_0x925d('0x5'));var config=require(_0x925d('0x6'));var jayson=require(_0x925d('0x7'));var client=jayson[_0x925d('0x8')][_0x925d('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x29c9c3,_0x5bff1c,_0x6bd1e){return new BPromise(function(_0x47b839,_0x5919db){return client[_0x925d('0xa')](_0x29c9c3,_0x6bd1e)[_0x925d('0xb')](function(_0x4569d3){logger[_0x925d('0xc')]('VoiceMailMessage,\x20%s,\x20%s',_0x5bff1c,'request\x20sent');logger[_0x925d('0xd')](_0x925d('0xe'),_0x5bff1c,_0x925d('0xf'),JSON[_0x925d('0x10')](_0x4569d3));if(_0x4569d3[_0x925d('0x11')]){if(_0x4569d3[_0x925d('0x11')][_0x925d('0x12')]===0x1f4){logger[_0x925d('0x11')]('VoiceMailMessage,\x20%s,\x20%s',_0x5bff1c,_0x4569d3['error'][_0x925d('0x13')]);return _0x5919db(_0x4569d3[_0x925d('0x11')][_0x925d('0x13')]);}logger['error'](_0x925d('0x14'),_0x5bff1c,_0x4569d3['error'][_0x925d('0x13')]);return _0x47b839(_0x4569d3[_0x925d('0x11')][_0x925d('0x13')]);}else{logger[_0x925d('0xc')](_0x925d('0x14'),_0x5bff1c,_0x925d('0xf'));_0x47b839(_0x4569d3['result'][_0x925d('0x13')]);}})[_0x925d('0x15')](function(_0x2ab6a1){logger[_0x925d('0x11')](_0x925d('0x14'),_0x5bff1c,_0x2ab6a1);_0x5919db(_0x2ab6a1);});});}
\ No newline at end of file
+var _0xba04=['../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','info','VoiceMailMessage,\x20%s,\x20%s','request\x20sent','debug','VoiceMailMessage,\x20%s,\x20%s,\x20%s','error','message','result','catch','lodash','bluebird','randomstring','ioredis'];(function(_0x2b948f,_0x398e62){var _0x1237bc=function(_0x3c1843){while(--_0x3c1843){_0x2b948f['push'](_0x2b948f['shift']());}};_0x1237bc(++_0x398e62);}(_0xba04,0x10d));var _0x4ba0=function(_0x4be165,_0x3cefb4){_0x4be165=_0x4be165-0x0;var _0x5133b8=_0xba04[_0x4be165];return _0x5133b8;};'use strict';var _=require(_0x4ba0('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x4ba0('0x1'));var rs=require(_0x4ba0('0x2'));var fs=require('fs');var Redis=require(_0x4ba0('0x3'));var db=require(_0x4ba0('0x4'))['db'];var utils=require(_0x4ba0('0x5'));var logger=require(_0x4ba0('0x6'))(_0x4ba0('0x7'));var config=require(_0x4ba0('0x8'));var jayson=require(_0x4ba0('0x9'));var client=jayson[_0x4ba0('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2a3ec4,_0x16f748,_0x69b1d1){return new BPromise(function(_0x23db72,_0x3af716){return client[_0x4ba0('0xb')](_0x2a3ec4,_0x69b1d1)['then'](function(_0x5a6c25){logger[_0x4ba0('0xc')](_0x4ba0('0xd'),_0x16f748,_0x4ba0('0xe'));logger[_0x4ba0('0xf')](_0x4ba0('0x10'),_0x16f748,_0x4ba0('0xe'),JSON['stringify'](_0x5a6c25));if(_0x5a6c25[_0x4ba0('0x11')]){if(_0x5a6c25['error']['code']===0x1f4){logger['error'](_0x4ba0('0xd'),_0x16f748,_0x5a6c25[_0x4ba0('0x11')][_0x4ba0('0x12')]);return _0x3af716(_0x5a6c25[_0x4ba0('0x11')][_0x4ba0('0x12')]);}logger[_0x4ba0('0x11')](_0x4ba0('0xd'),_0x16f748,_0x5a6c25[_0x4ba0('0x11')][_0x4ba0('0x12')]);return _0x23db72(_0x5a6c25[_0x4ba0('0x11')][_0x4ba0('0x12')]);}else{logger[_0x4ba0('0xc')]('VoiceMailMessage,\x20%s,\x20%s',_0x16f748,_0x4ba0('0xe'));_0x23db72(_0x5a6c25[_0x4ba0('0x13')][_0x4ba0('0x12')]);}})[_0x4ba0('0x14')](function(_0x3ca948){logger['error'](_0x4ba0('0xd'),_0x16f748,_0x3ca948);_0x3af716(_0x3ca948);});});}
\ No newline at end of file
index c0acf0b..4018a13 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x25c2=['post','create','/:id/sounds','put','update','delete','/:id/sounds/:id2','removeSound','path','connect-timeout','express','../../components/auth/service','./voiceMusicOnHold.controller','isAuthenticated','index','get','/:id','show','getSounds'];(function(_0x4ecaa5,_0x32ea4f){var _0x57b312=function(_0x46f2fe){while(--_0x46f2fe){_0x4ecaa5['push'](_0x4ecaa5['shift']());}};_0x57b312(++_0x32ea4f);}(_0x25c2,0xa0));var _0x225c=function(_0x40220a,_0x22feb1){_0x40220a=_0x40220a-0x0;var _0x3903cc=_0x25c2[_0x40220a];return _0x3903cc;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x225c('0x0'));var timeout=require(_0x225c('0x1'));var express=require(_0x225c('0x2'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x225c('0x3'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x225c('0x4'));router['get']('/',auth[_0x225c('0x5')](),controller[_0x225c('0x6')]);router[_0x225c('0x7')](_0x225c('0x8'),auth['isAuthenticated'](),controller[_0x225c('0x9')]);router['get']('/:id/sounds',auth[_0x225c('0x5')](),controller[_0x225c('0xa')]);router[_0x225c('0xb')]('/',auth[_0x225c('0x5')](),controller[_0x225c('0xc')]);router[_0x225c('0xb')](_0x225c('0xd'),auth[_0x225c('0x5')](),controller['addSound']);router[_0x225c('0xe')](_0x225c('0x8'),auth[_0x225c('0x5')](),controller[_0x225c('0xf')]);router[_0x225c('0x10')]('/:id',auth[_0x225c('0x5')](),controller['destroy']);router[_0x225c('0x10')](_0x225c('0x11'),auth[_0x225c('0x5')](),controller[_0x225c('0x12')]);module['exports']=router;
\ No newline at end of file
+var _0x1ca6=['/:id/sounds/:id2','removeSound','multer','util','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceMusicOnHold.controller','get','isAuthenticated','index','show','getSounds','post','create','/:id/sounds','put','update','delete','destroy'];(function(_0x2da4ab,_0x3d4809){var _0x4d03c4=function(_0x82bd3c){while(--_0x82bd3c){_0x2da4ab['push'](_0x2da4ab['shift']());}};_0x4d03c4(++_0x3d4809);}(_0x1ca6,0x1b7));var _0x61ca=function(_0x19d813,_0x366b4a){_0x19d813=_0x19d813-0x0;var _0x47fd7b=_0x1ca6[_0x19d813];return _0x47fd7b;};'use strict';var multer=require(_0x61ca('0x0'));var util=require(_0x61ca('0x1'));var path=require('path');var timeout=require(_0x61ca('0x2'));var express=require(_0x61ca('0x3'));var router=express['Router']();var fs_extra=require(_0x61ca('0x4'));var auth=require(_0x61ca('0x5'));var interaction=require(_0x61ca('0x6'));var config=require(_0x61ca('0x7'));var controller=require(_0x61ca('0x8'));router[_0x61ca('0x9')]('/',auth[_0x61ca('0xa')](),controller[_0x61ca('0xb')]);router[_0x61ca('0x9')]('/:id',auth[_0x61ca('0xa')](),controller[_0x61ca('0xc')]);router[_0x61ca('0x9')]('/:id/sounds',auth[_0x61ca('0xa')](),controller[_0x61ca('0xd')]);router[_0x61ca('0xe')]('/',auth[_0x61ca('0xa')](),controller[_0x61ca('0xf')]);router[_0x61ca('0xe')](_0x61ca('0x10'),auth[_0x61ca('0xa')](),controller['addSound']);router[_0x61ca('0x11')]('/:id',auth[_0x61ca('0xa')](),controller[_0x61ca('0x12')]);router[_0x61ca('0x13')]('/:id',auth['isAuthenticated'](),controller[_0x61ca('0x14')]);router['delete'](_0x61ca('0x15'),auth[_0x61ca('0xa')](),controller[_0x61ca('0x16')]);module['exports']=router;
\ No newline at end of file
index 463d68f..e28f94c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2f21=['name','ENUM','custom','files','quietmp3nb','quietmp3','mp3','alpha','exports','STRING'];(function(_0x11f858,_0x4ac922){var _0x58252c=function(_0x443e38){while(--_0x443e38){_0x11f858['push'](_0x11f858['shift']());}};_0x58252c(++_0x4ac922);}(_0x2f21,0x120));var _0x12f2=function(_0x27af45,_0x1b57aa){_0x27af45=_0x27af45-0x0;var _0x18df21=_0x2f21[_0x27af45];return _0x18df21;};'use strict';var Sequelize=require('sequelize');module[_0x12f2('0x0')]={'name':{'type':Sequelize[_0x12f2('0x1')],'allowNull':![],'unique':_0x12f2('0x2')},'mode':{'type':Sequelize[_0x12f2('0x3')](_0x12f2('0x4'),_0x12f2('0x5'),'mp3nb',_0x12f2('0x6'),_0x12f2('0x7'),_0x12f2('0x8')),'allowNull':!![],'defaultValue':_0x12f2('0x5')},'directory':{'type':Sequelize['STRING'],'allowNull':!![]},'application':{'type':Sequelize[_0x12f2('0x1')],'allowNull':!![]},'digit':{'type':Sequelize[_0x12f2('0x1')],'allowNull':!![]},'sort':{'type':Sequelize[_0x12f2('0x1')],'allowNull':!![],'defaultValue':_0x12f2('0x9')},'format':{'type':Sequelize[_0x12f2('0x1')],'allowNull':!![]},'stamp':{'type':'TIMESTAMP'},'defaultEntry':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0}};
\ No newline at end of file
+var _0xde63=['name','ENUM','files','mp3nb','quietmp3nb','mp3','alpha','TIMESTAMP','BOOLEAN','sequelize','STRING'];(function(_0x33b4e2,_0x203f8b){var _0x14ab5b=function(_0xba257){while(--_0xba257){_0x33b4e2['push'](_0x33b4e2['shift']());}};_0x14ab5b(++_0x203f8b);}(_0xde63,0xe5));var _0x3de6=function(_0x36f47c,_0x38ef4d){_0x36f47c=_0x36f47c-0x0;var _0x296c55=_0xde63[_0x36f47c];return _0x296c55;};'use strict';var Sequelize=require(_0x3de6('0x0'));module['exports']={'name':{'type':Sequelize[_0x3de6('0x1')],'allowNull':![],'unique':_0x3de6('0x2')},'mode':{'type':Sequelize[_0x3de6('0x3')]('custom',_0x3de6('0x4'),_0x3de6('0x5'),_0x3de6('0x6'),'quietmp3',_0x3de6('0x7')),'allowNull':!![],'defaultValue':_0x3de6('0x4')},'directory':{'type':Sequelize[_0x3de6('0x1')],'allowNull':!![]},'application':{'type':Sequelize[_0x3de6('0x1')],'allowNull':!![]},'digit':{'type':Sequelize[_0x3de6('0x1')],'allowNull':!![]},'sort':{'type':Sequelize[_0x3de6('0x1')],'allowNull':!![],'defaultValue':_0x3de6('0x8')},'format':{'type':Sequelize[_0x3de6('0x1')],'allowNull':!![]},'stamp':{'type':_0x3de6('0x9')},'defaultEntry':{'type':Sequelize[_0x3de6('0xa')],'defaultValue':0x0}};
\ No newline at end of file
index 7268b2d..6b89de5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x43b6=['../../config/utils','../../config/license/util','../../mysqldb','status','end','json','undefined','limit','count','apply','reject','save','update','then','destroy','get','MusicOnHolds','sendStatus','error','name','send','index','map','VoiceMusicOnHold','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','nolimit','offset','order','sort','where','pick','VIRTUAL','filter','merge','includeAll','include','findAll','rows','catch','show','params','options','body','create','transaction','mode','directory','join','root','server/files/moh','files','mkdirSync','0777','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','sequelize','readdirSync','forEach','unlinkSync','rmdirSync','Sequelize','ValidationError','message','Sound','findOne','converted_format','createdAt','server/files/sounds/converted','format','%s.%s','basename','save_name','extname','symlinkSync','id2','getSounds','hasOwnProperty','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api'];(function(_0x5a5320,_0x3e36dd){var _0x16c157=function(_0x3010d5){while(--_0x3010d5){_0x5a5320['push'](_0x5a5320['shift']());}};_0x16c157(++_0x3e36dd);}(_0x43b6,0xd3));var _0x643b=function(_0x148bc0,_0xf5cfdc){_0x148bc0=_0x148bc0-0x0;var _0x34d7d0=_0x43b6[_0x148bc0];return _0x34d7d0;};'use strict';var emlformat=require(_0x643b('0x0'));var rimraf=require(_0x643b('0x1'));var zipdir=require(_0x643b('0x2'));var jsonpatch=require(_0x643b('0x3'));var rp=require(_0x643b('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x643b('0x5'));var util=require(_0x643b('0x6'));var path=require(_0x643b('0x7'));var sox=require(_0x643b('0x8'));var csv=require(_0x643b('0x9'));var ejs=require(_0x643b('0xa'));var fs=require('fs');var fs_extra=require(_0x643b('0xb'));var _=require('lodash');var squel=require(_0x643b('0xc'));var crypto=require('crypto');var jsforce=require(_0x643b('0xd'));var deskjs=require(_0x643b('0xe'));var toCsv=require(_0x643b('0x9'));var querystring=require(_0x643b('0xf'));var Papa=require(_0x643b('0x10'));var Redis=require(_0x643b('0x11'));var authService=require(_0x643b('0x12'));var qs=require(_0x643b('0x13'));var as=require(_0x643b('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x643b('0x15'))(_0x643b('0x16'));var utils=require(_0x643b('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0x643b('0x18'));var db=require(_0x643b('0x19'))['db'];function respondWithStatusCode(_0x454a60,_0x2a297d){_0x2a297d=_0x2a297d||0xcc;return function(_0x118303){if(_0x118303){return _0x454a60['sendStatus'](_0x2a297d);}return _0x454a60[_0x643b('0x1a')](_0x2a297d)[_0x643b('0x1b')]();};}function respondWithResult(_0x35899b,_0x3a3af1){_0x3a3af1=_0x3a3af1||0xc8;return function(_0x3375ab){if(_0x3375ab){return _0x35899b[_0x643b('0x1a')](_0x3a3af1)[_0x643b('0x1c')](_0x3375ab);}};}function respondWithFilteredResult(_0x12dc73,_0x210fb2){return function(_0x204ff3){if(_0x204ff3){var _0x568384=typeof _0x210fb2['offset']===_0x643b('0x1d')&&typeof _0x210fb2[_0x643b('0x1e')]===_0x643b('0x1d');var _0x177abb=_0x204ff3[_0x643b('0x1f')];var _0x29a838=_0x568384?0x0:_0x210fb2['offset'];var _0x15e445=_0x568384?_0x204ff3[_0x643b('0x1f')]:_0x210fb2['offset']+_0x210fb2[_0x643b('0x1e')];var _0x423c07;if(_0x15e445>=_0x177abb){_0x15e445=_0x177abb;_0x423c07=0xc8;}else{_0x423c07=0xce;}_0x12dc73[_0x643b('0x1a')](_0x423c07);return _0x12dc73['set']('Content-Range',_0x29a838+'-'+_0x15e445+'/'+_0x177abb)[_0x643b('0x1c')](_0x204ff3);}return null;};}function patchUpdates(_0x267b43){return function(_0x457bda){try{jsonpatch[_0x643b('0x20')](_0x457bda,_0x267b43,!![]);}catch(_0x27cde4){return BPromise[_0x643b('0x21')](_0x27cde4);}return _0x457bda[_0x643b('0x22')]();};}function saveUpdates(_0x29ffec,_0x1fa0d9){return function(_0x3e04ac){if(_0x3e04ac){return _0x3e04ac[_0x643b('0x23')](_0x29ffec)[_0x643b('0x24')](function(_0x1ed04b){return _0x1ed04b;});}return null;};}function removeEntity(_0x52d609,_0x1cc6eb){return function(_0x5a4a4b){if(_0x5a4a4b){return _0x5a4a4b[_0x643b('0x25')]()[_0x643b('0x24')](function(){var _0x5442f2=_0x5a4a4b[_0x643b('0x26')]({'plain':!![]});var _0x4ec272=_0x643b('0x27');return db['UserProfileResource'][_0x643b('0x25')]({'where':{'type':_0x4ec272,'resourceId':_0x5442f2['id']}})[_0x643b('0x24')](function(){return _0x5a4a4b;});})[_0x643b('0x24')](function(){_0x52d609[_0x643b('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2e8f21,_0x102b6f){return function(_0x12e425){if(!_0x12e425){_0x2e8f21[_0x643b('0x28')](0x194);}return _0x12e425;};}function handleError(_0x169740,_0x1a6870){_0x1a6870=_0x1a6870||0x1f4;return function(_0x34eec7){logger[_0x643b('0x29')](_0x34eec7['stack']);if(_0x34eec7[_0x643b('0x2a')]){delete _0x34eec7[_0x643b('0x2a')];}_0x169740[_0x643b('0x1a')](_0x1a6870)[_0x643b('0x2b')](_0x34eec7);};}exports[_0x643b('0x2c')]=function(_0x460134,_0x364389){var _0x489790={},_0x487c1a={},_0x455faa={'count':0x0,'rows':[]};var _0x2c93ad=_[_0x643b('0x2d')](db[_0x643b('0x2e')][_0x643b('0x2f')],function(_0x41fd29){return{'name':_0x41fd29[_0x643b('0x30')],'type':_0x41fd29[_0x643b('0x31')][_0x643b('0x32')]};});_0x487c1a[_0x643b('0x33')]=_[_0x643b('0x2d')](_0x2c93ad,_0x643b('0x2a'));_0x487c1a[_0x643b('0x34')]=_[_0x643b('0x35')](_0x460134['query']);_0x487c1a[_0x643b('0x36')]=_['intersection'](_0x487c1a[_0x643b('0x33')],_0x487c1a[_0x643b('0x34')]);_0x489790['attributes']=_[_0x643b('0x37')](_0x487c1a['model'],qs[_0x643b('0x38')](_0x460134[_0x643b('0x34')][_0x643b('0x38')]));_0x489790['attributes']=_0x489790[_0x643b('0x39')][_0x643b('0x3a')]?_0x489790[_0x643b('0x39')]:_0x487c1a['model'];if(!_0x460134[_0x643b('0x34')]['hasOwnProperty'](_0x643b('0x3b'))){_0x489790[_0x643b('0x1e')]=qs[_0x643b('0x1e')](_0x460134['query'][_0x643b('0x1e')]);_0x489790[_0x643b('0x3c')]=qs['offset'](_0x460134[_0x643b('0x34')][_0x643b('0x3c')]);}_0x489790[_0x643b('0x3d')]=qs[_0x643b('0x3e')](_0x460134[_0x643b('0x34')][_0x643b('0x3e')]);delete _0x460134[_0x643b('0x34')][_0x643b('0x3e')];_0x489790[_0x643b('0x3f')]=qs[_0x643b('0x36')](_[_0x643b('0x40')](_0x460134[_0x643b('0x34')],_0x487c1a[_0x643b('0x36')]),_0x2c93ad);if(_0x460134[_0x643b('0x34')]['filter']){_0x489790[_0x643b('0x3f')]=_['merge'](_0x489790[_0x643b('0x3f')],{'$or':_[_0x643b('0x2d')](_0x2c93ad,function(_0x350750){if(_0x350750['type']!==_0x643b('0x41')){var _0x10476b={};_0x10476b[_0x350750[_0x643b('0x2a')]]={'$like':'%'+_0x460134[_0x643b('0x34')][_0x643b('0x42')]+'%'};return _0x10476b;}})});}_0x489790=_[_0x643b('0x43')]({},_0x489790,_0x460134['options']);var _0x4a80a0={'where':_0x489790[_0x643b('0x3f')]};return db[_0x643b('0x2e')]['count'](_0x4a80a0)[_0x643b('0x24')](function(_0x3b6a27){_0x455faa[_0x643b('0x1f')]=_0x3b6a27;if(_0x460134[_0x643b('0x34')][_0x643b('0x44')]){_0x489790[_0x643b('0x45')]=[{'all':!![]}];}return db[_0x643b('0x2e')][_0x643b('0x46')](_0x489790);})[_0x643b('0x24')](function(_0x220bf9){_0x455faa[_0x643b('0x47')]=_0x220bf9;return _0x455faa;})[_0x643b('0x24')](respondWithFilteredResult(_0x364389,_0x489790))[_0x643b('0x48')](handleError(_0x364389,null));};exports[_0x643b('0x49')]=function(_0x51f46c,_0x21ee4b){var _0x956ec1={'raw':![],'where':{'id':_0x51f46c[_0x643b('0x4a')]['id']}},_0x533a4a={};_0x533a4a[_0x643b('0x33')]=_['keys'](db[_0x643b('0x2e')][_0x643b('0x2f')]);_0x533a4a[_0x643b('0x34')]=_[_0x643b('0x35')](_0x51f46c[_0x643b('0x34')]);_0x533a4a[_0x643b('0x36')]=_[_0x643b('0x37')](_0x533a4a['model'],_0x533a4a['query']);_0x956ec1[_0x643b('0x39')]=_[_0x643b('0x37')](_0x533a4a[_0x643b('0x33')],qs[_0x643b('0x38')](_0x51f46c[_0x643b('0x34')][_0x643b('0x38')]));_0x956ec1[_0x643b('0x39')]=_0x956ec1[_0x643b('0x39')]['length']?_0x956ec1[_0x643b('0x39')]:_0x533a4a['model'];if(_0x51f46c['query'][_0x643b('0x44')]){_0x956ec1[_0x643b('0x45')]=[{'all':!![]}];}_0x956ec1=_[_0x643b('0x43')]({},_0x956ec1,_0x51f46c[_0x643b('0x4b')]);return db[_0x643b('0x2e')]['find'](_0x956ec1)[_0x643b('0x24')](handleEntityNotFound(_0x21ee4b,null))[_0x643b('0x24')](respondWithResult(_0x21ee4b,null))[_0x643b('0x48')](handleError(_0x21ee4b,null));};exports[_0x643b('0x23')]=function(_0x503ee6,_0x1acf61){if(_0x503ee6[_0x643b('0x4c')]['id']){delete _0x503ee6[_0x643b('0x4c')]['id'];}return db[_0x643b('0x2e')]['find']({'where':{'id':_0x503ee6[_0x643b('0x4a')]['id']}})['then'](handleEntityNotFound(_0x1acf61,null))['then'](saveUpdates(_0x503ee6[_0x643b('0x4c')],null))[_0x643b('0x24')](respondWithResult(_0x1acf61,null))[_0x643b('0x48')](handleError(_0x1acf61,null));};exports[_0x643b('0x4d')]=function(_0x9b6220,_0x7052a2,_0x3648b5){return db['sequelize'][_0x643b('0x4e')](function(_0x223482){if(_0x9b6220[_0x643b('0x4c')][_0x643b('0x4f')]==='files'){_0x9b6220[_0x643b('0x4c')][_0x643b('0x50')]=path[_0x643b('0x51')](config[_0x643b('0x52')],_0x643b('0x53'),_0x9b6220['body'][_0x643b('0x2a')]);}return db['VoiceMusicOnHold']['create'](_0x9b6220[_0x643b('0x4c')],{'transaction':_0x223482})[_0x643b('0x24')](function(_0x4b13e4){if(_0x9b6220[_0x643b('0x4c')][_0x643b('0x4f')]===_0x643b('0x54')){fs[_0x643b('0x55')](_0x4b13e4[_0x643b('0x50')],parseInt(_0x643b('0x56'),0x8));}var _0x444119=_0x9b6220['user'][_0x643b('0x26')]({'plain':!![]});if(!_0x444119)throw new Error(_0x643b('0x57'));if(_0x444119[_0x643b('0x58')]===_0x643b('0x59')){var _0xd53e3e=_0x4b13e4[_0x643b('0x26')]({'plain':!![]});return db[_0x643b('0x5a')][_0x643b('0x5b')]({'where':{'name':_0x643b('0x27'),'userProfileId':_0x444119[_0x643b('0x5c')]},'raw':!![]})[_0x643b('0x24')](function(_0x311224){if(_0x311224&&_0x311224[_0x643b('0x5d')]===0x0){return db['UserProfileResource'][_0x643b('0x4d')]({'name':_0xd53e3e[_0x643b('0x2a')],'resourceId':_0xd53e3e['id'],'type':_0x311224[_0x643b('0x2a')],'sectionId':_0x311224['id']},{})[_0x643b('0x24')](function(){return _0x4b13e4;});}else{return _0x4b13e4;}})[_0x643b('0x48')](function(_0x3cd228){logger[_0x643b('0x29')](_0x643b('0x5e'),_0x3cd228);});}return _0x4b13e4;});})['then'](respondWithResult(_0x7052a2,0xc9))[_0x643b('0x48')](handleError(_0x7052a2,null));};exports[_0x643b('0x25')]=function(_0x4767b8,_0x5a070c,_0x3f4f93){var _0x3c8c33;return db[_0x643b('0x2e')][_0x643b('0x5b')]({'where':{'id':_0x4767b8[_0x643b('0x4a')]['id']}})[_0x643b('0x24')](function(_0x5b7cb0){if(_0x5b7cb0){return db[_0x643b('0x5f')][_0x643b('0x4e')](function(_0x46712a){return _0x5b7cb0[_0x643b('0x25')]({'transaction':_0x46712a,'raw':!![]})[_0x643b('0x24')](function(_0x37541d){if(_0x37541d[_0x643b('0x50')]){fs[_0x643b('0x60')](_0x37541d['directory'])[_0x643b('0x61')](function(_0x207d27){fs[_0x643b('0x62')](path['join'](_0x37541d[_0x643b('0x50')],_0x207d27));});fs[_0x643b('0x63')](_0x37541d['directory']);}return _0x37541d;});})[_0x643b('0x48')](function(_0xf875e8){throw new db[(_0x643b('0x64'))][(_0x643b('0x65'))](_0xf875e8[_0x643b('0x66')]);});}})[_0x643b('0x24')](handleEntityNotFound(_0x5a070c,null))['then'](removeEntity(_0x5a070c,null))[_0x643b('0x48')](handleError(_0x5a070c,null));};exports['addSound']=function(_0x5650c6,_0x2c0c72,_0x28481d){return db[_0x643b('0x5f')][_0x643b('0x4e')](function(_0x28402d){var _0x85b90c;return db['VoiceMusicOnHold'][_0x643b('0x5b')]({'where':{'id':_0x5650c6[_0x643b('0x4a')]['id']}})[_0x643b('0x24')](function(_0x335947){if(_0x335947){_0x85b90c=_0x335947;return _0x335947['addSound'](_0x5650c6[_0x643b('0x4c')]['id'],{'transaction':_0x28402d});}})[_0x643b('0x24')](function(_0x14dad7){if(_0x14dad7){return db[_0x643b('0x67')][_0x643b('0x68')]({'where':{'id':_0x5650c6['body']['id']},'attributes':['id',_0x643b('0x2a'),'save_name',_0x643b('0x69'),_0x643b('0x6a')],'raw':!![]});}})[_0x643b('0x24')](function(_0x426707){if(_0x426707){var _0x1cea6f=path[_0x643b('0x51')](config[_0x643b('0x52')],_0x643b('0x6b'),util[_0x643b('0x6c')](_0x643b('0x6d'),path[_0x643b('0x6e')](_0x426707[_0x643b('0x6f')],path[_0x643b('0x70')](_0x426707[_0x643b('0x6f')])),_0x426707[_0x643b('0x69')]));var _0x4d0f40=path[_0x643b('0x51')](config['root'],_0x643b('0x53'),_0x85b90c[_0x643b('0x2a')],util['format']('%s.%s',_0x426707[_0x643b('0x2a')],_0x426707[_0x643b('0x69')]));fs[_0x643b('0x71')](_0x1cea6f,_0x4d0f40);return _0x426707;}})[_0x643b('0x48')](function(_0x567f88){throw new db['Sequelize'][(_0x643b('0x65'))](_0x567f88[_0x643b('0x66')]);});})[_0x643b('0x24')](handleEntityNotFound(_0x2c0c72,null))[_0x643b('0x24')](respondWithResult(_0x2c0c72,0xc9))['catch'](handleError(_0x2c0c72,null));};exports['removeSound']=function(_0x192bbd,_0x1f1a47,_0xb01eba){return db[_0x643b('0x5f')]['transaction'](function(_0x56e1db){var _0x24f889;return db['VoiceMusicOnHold'][_0x643b('0x68')]({'where':{'id':_0x192bbd[_0x643b('0x4a')]['id']}})[_0x643b('0x24')](handleEntityNotFound(_0x1f1a47,null))[_0x643b('0x24')](function(_0x10eaf1){if(_0x10eaf1){_0x24f889=_0x10eaf1;return _0x10eaf1['removeSound'](_0x192bbd[_0x643b('0x4a')][_0x643b('0x72')]);}})[_0x643b('0x24')](function(_0x41d409){if(_0x41d409){return db['Sound']['findOne']({'where':{'id':_0x192bbd[_0x643b('0x4a')]['id2']},'attributes':['id',_0x643b('0x2a'),_0x643b('0x6f'),_0x643b('0x69'),_0x643b('0x6a')],'raw':!![]});}})[_0x643b('0x24')](function(_0x902d6){if(_0x902d6){fs[_0x643b('0x62')](path[_0x643b('0x51')](_0x24f889[_0x643b('0x50')],util[_0x643b('0x6c')](_0x643b('0x6d'),_0x902d6[_0x643b('0x2a')],_0x902d6['converted_format'])));return _0x902d6;}})['catch'](function(_0x3e4c07){throw new db[(_0x643b('0x64'))][(_0x643b('0x65'))](_0x3e4c07[_0x643b('0x66')]);});})[_0x643b('0x24')](handleEntityNotFound(_0x1f1a47,null))[_0x643b('0x24')](respondWithStatusCode(_0x1f1a47,0xcc))['catch'](handleError(_0x1f1a47,null));};exports['getSounds']=function(_0x5b4bbb,_0x2de022,_0x47ba5b){var _0x69a39={};var _0x1244b6={};var _0x40998c;var _0x365956;return db['VoiceMusicOnHold']['findOne']({'where':{'id':_0x5b4bbb[_0x643b('0x4a')]['id']}})[_0x643b('0x24')](handleEntityNotFound(_0x2de022,null))[_0x643b('0x24')](function(_0x3b9c8c){if(_0x3b9c8c){_0x40998c=_0x3b9c8c;_0x1244b6[_0x643b('0x33')]=_[_0x643b('0x35')](db[_0x643b('0x67')][_0x643b('0x2f')]);_0x1244b6['query']=_['keys'](_0x5b4bbb[_0x643b('0x34')]);_0x1244b6['filters']=_[_0x643b('0x37')](_0x1244b6[_0x643b('0x33')],_0x1244b6[_0x643b('0x34')]);_0x69a39[_0x643b('0x39')]=_[_0x643b('0x37')](_0x1244b6[_0x643b('0x33')],qs[_0x643b('0x38')](_0x5b4bbb[_0x643b('0x34')]['fields']));_0x69a39['attributes']=_0x69a39[_0x643b('0x39')][_0x643b('0x3a')]?_0x69a39[_0x643b('0x39')]:_0x1244b6['model'];_0x69a39[_0x643b('0x3d')]=qs[_0x643b('0x3e')](_0x5b4bbb[_0x643b('0x34')][_0x643b('0x3e')]);_0x69a39['where']=qs['filters'](_[_0x643b('0x40')](_0x5b4bbb['query'],_0x1244b6[_0x643b('0x36')]));if(_0x5b4bbb['query'][_0x643b('0x42')]){_0x69a39[_0x643b('0x3f')]=_[_0x643b('0x43')](_0x69a39[_0x643b('0x3f')],{'$or':_[_0x643b('0x2d')](_0x69a39[_0x643b('0x39')],function(_0x38e2ae){var _0x5bd07b={};_0x5bd07b[_0x38e2ae]={'$like':'%'+_0x5b4bbb[_0x643b('0x34')]['filter']+'%'};return _0x5bd07b;})});}_0x69a39=_[_0x643b('0x43')]({},_0x69a39,_0x5b4bbb[_0x643b('0x4b')]);return _0x40998c[_0x643b('0x73')](_0x69a39);}})[_0x643b('0x24')](function(_0x256d95){if(_0x256d95){_0x365956=_0x256d95[_0x643b('0x3a')];if(!_0x5b4bbb[_0x643b('0x34')][_0x643b('0x74')](_0x643b('0x3b'))){_0x69a39[_0x643b('0x1e')]=qs[_0x643b('0x1e')](_0x5b4bbb[_0x643b('0x34')]['limit']);_0x69a39[_0x643b('0x3c')]=qs[_0x643b('0x3c')](_0x5b4bbb[_0x643b('0x34')]['offset']);}return _0x40998c[_0x643b('0x73')](_0x69a39);}})['then'](function(_0x14b581){if(_0x14b581){return _0x14b581?{'count':_0x365956,'rows':_0x14b581}:null;}})['then'](respondWithResult(_0x2de022,null))['catch'](handleError(_0x2de022,null));};
\ No newline at end of file
+var _0x35a8=['rows','catch','show','params','includeAll','body','create','sequelize','transaction','mode','join','root','server/files/moh','files','mkdirSync','directory','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','find','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','readdirSync','forEach','unlinkSync','rmdirSync','Sequelize','ValidationError','addSound','Sound','findOne','save_name','converted_format','createdAt','format','%s.%s','basename','symlinkSync','message','removeSound','id2','getSounds','order','rimraf','mustache','util','to-csv','fs-extra','lodash','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','offset','limit','undefined','count','set','Content-Range','json','reject','save','update','destroy','then','get','MusicOnHolds','UserProfileResource','error','stack','name','index','map','VoiceMusicOnHold','rawAttributes','key','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','type','VIRTUAL','options','include','findAll'];(function(_0x2bbb56,_0x121360){var _0x2967d8=function(_0x2fc382){while(--_0x2fc382){_0x2bbb56['push'](_0x2bbb56['shift']());}};_0x2967d8(++_0x121360);}(_0x35a8,0x173));var _0x835a=function(_0x4e1a7d,_0x28ecaa){_0x4e1a7d=_0x4e1a7d-0x0;var _0x43b58a=_0x35a8[_0x4e1a7d];return _0x43b58a;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x835a('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x835a('0x1'));var util=require(_0x835a('0x2'));var path=require('path');var sox=require('sox');var csv=require(_0x835a('0x3'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x835a('0x4'));var _=require(_0x835a('0x5'));var squel=require('squel');var crypto=require(_0x835a('0x6'));var jsforce=require(_0x835a('0x7'));var deskjs=require(_0x835a('0x8'));var toCsv=require('to-csv');var querystring=require(_0x835a('0x9'));var Papa=require('papaparse');var Redis=require(_0x835a('0xa'));var authService=require(_0x835a('0xb'));var qs=require(_0x835a('0xc'));var as=require(_0x835a('0xd'));var hardwareService=require(_0x835a('0xe'));var logger=require('../../config/logger')(_0x835a('0xf'));var utils=require(_0x835a('0x10'));var config=require(_0x835a('0x11'));var licenseUtil=require('../../config/license/util');var db=require(_0x835a('0x12'))['db'];function respondWithStatusCode(_0x22bc23,_0x42a1fd){_0x42a1fd=_0x42a1fd||0xcc;return function(_0x2a6979){if(_0x2a6979){return _0x22bc23[_0x835a('0x13')](_0x42a1fd);}return _0x22bc23[_0x835a('0x14')](_0x42a1fd)[_0x835a('0x15')]();};}function respondWithResult(_0x476df0,_0x3e2bda){_0x3e2bda=_0x3e2bda||0xc8;return function(_0x2c26da){if(_0x2c26da){return _0x476df0[_0x835a('0x14')](_0x3e2bda)['json'](_0x2c26da);}};}function respondWithFilteredResult(_0x598bf8,_0x3ab361){return function(_0x2b2daa){if(_0x2b2daa){var _0x925b70=typeof _0x3ab361[_0x835a('0x16')]==='undefined'&&typeof _0x3ab361[_0x835a('0x17')]===_0x835a('0x18');var _0x552c4e=_0x2b2daa[_0x835a('0x19')];var _0x53e20b=_0x925b70?0x0:_0x3ab361[_0x835a('0x16')];var _0x39cf95=_0x925b70?_0x2b2daa[_0x835a('0x19')]:_0x3ab361[_0x835a('0x16')]+_0x3ab361[_0x835a('0x17')];var _0x3ef2ae;if(_0x39cf95>=_0x552c4e){_0x39cf95=_0x552c4e;_0x3ef2ae=0xc8;}else{_0x3ef2ae=0xce;}_0x598bf8[_0x835a('0x14')](_0x3ef2ae);return _0x598bf8[_0x835a('0x1a')](_0x835a('0x1b'),_0x53e20b+'-'+_0x39cf95+'/'+_0x552c4e)[_0x835a('0x1c')](_0x2b2daa);}return null;};}function patchUpdates(_0x3a5da7){return function(_0x3dd8e8){try{jsonpatch['apply'](_0x3dd8e8,_0x3a5da7,!![]);}catch(_0x58b185){return BPromise[_0x835a('0x1d')](_0x58b185);}return _0x3dd8e8[_0x835a('0x1e')]();};}function saveUpdates(_0xe9bdd9,_0x3fc921){return function(_0x55f1c8){if(_0x55f1c8){return _0x55f1c8[_0x835a('0x1f')](_0xe9bdd9)['then'](function(_0x3b20b8){return _0x3b20b8;});}return null;};}function removeEntity(_0x49263e,_0x4ccf34){return function(_0x7a2506){if(_0x7a2506){return _0x7a2506[_0x835a('0x20')]()[_0x835a('0x21')](function(){var _0x526f8b=_0x7a2506[_0x835a('0x22')]({'plain':!![]});var _0xe9b06e=_0x835a('0x23');return db[_0x835a('0x24')][_0x835a('0x20')]({'where':{'type':_0xe9b06e,'resourceId':_0x526f8b['id']}})[_0x835a('0x21')](function(){return _0x7a2506;});})[_0x835a('0x21')](function(){_0x49263e[_0x835a('0x14')](0xcc)[_0x835a('0x15')]();});}};}function handleEntityNotFound(_0x550e76,_0x1277de){return function(_0x196084){if(!_0x196084){_0x550e76[_0x835a('0x13')](0x194);}return _0x196084;};}function handleError(_0x2f4e5f,_0x4272b5){_0x4272b5=_0x4272b5||0x1f4;return function(_0x33b82b){logger[_0x835a('0x25')](_0x33b82b[_0x835a('0x26')]);if(_0x33b82b[_0x835a('0x27')]){delete _0x33b82b[_0x835a('0x27')];}_0x2f4e5f[_0x835a('0x14')](_0x4272b5)['send'](_0x33b82b);};}exports[_0x835a('0x28')]=function(_0x34e9f2,_0xfb5bef){var _0x384edf={},_0x533dcf={},_0x308d72={'count':0x0,'rows':[]};var _0x1c129a=_[_0x835a('0x29')](db[_0x835a('0x2a')][_0x835a('0x2b')],function(_0x2e1a42){return{'name':_0x2e1a42['fieldName'],'type':_0x2e1a42['type'][_0x835a('0x2c')]};});_0x533dcf[_0x835a('0x2d')]=_[_0x835a('0x29')](_0x1c129a,_0x835a('0x27'));_0x533dcf[_0x835a('0x2e')]=_[_0x835a('0x2f')](_0x34e9f2[_0x835a('0x2e')]);_0x533dcf[_0x835a('0x30')]=_['intersection'](_0x533dcf['model'],_0x533dcf['query']);_0x384edf[_0x835a('0x31')]=_[_0x835a('0x32')](_0x533dcf['model'],qs[_0x835a('0x33')](_0x34e9f2[_0x835a('0x2e')]['fields']));_0x384edf[_0x835a('0x31')]=_0x384edf[_0x835a('0x31')][_0x835a('0x34')]?_0x384edf[_0x835a('0x31')]:_0x533dcf[_0x835a('0x2d')];if(!_0x34e9f2['query'][_0x835a('0x35')](_0x835a('0x36'))){_0x384edf[_0x835a('0x17')]=qs[_0x835a('0x17')](_0x34e9f2[_0x835a('0x2e')][_0x835a('0x17')]);_0x384edf['offset']=qs[_0x835a('0x16')](_0x34e9f2[_0x835a('0x2e')][_0x835a('0x16')]);}_0x384edf['order']=qs[_0x835a('0x37')](_0x34e9f2[_0x835a('0x2e')][_0x835a('0x37')]);delete _0x34e9f2[_0x835a('0x2e')][_0x835a('0x37')];_0x384edf[_0x835a('0x38')]=qs[_0x835a('0x30')](_[_0x835a('0x39')](_0x34e9f2[_0x835a('0x2e')],_0x533dcf[_0x835a('0x30')]),_0x1c129a);if(_0x34e9f2[_0x835a('0x2e')][_0x835a('0x3a')]){_0x384edf['where']=_[_0x835a('0x3b')](_0x384edf['where'],{'$or':_['map'](_0x1c129a,function(_0x42b2e2){if(_0x42b2e2[_0x835a('0x3c')]!==_0x835a('0x3d')){var _0x5dca5b={};_0x5dca5b[_0x42b2e2[_0x835a('0x27')]]={'$like':'%'+_0x34e9f2[_0x835a('0x2e')][_0x835a('0x3a')]+'%'};return _0x5dca5b;}})});}_0x384edf=_[_0x835a('0x3b')]({},_0x384edf,_0x34e9f2[_0x835a('0x3e')]);var _0x2accc2={'where':_0x384edf[_0x835a('0x38')]};return db[_0x835a('0x2a')]['count'](_0x2accc2)['then'](function(_0xd2bbad){_0x308d72[_0x835a('0x19')]=_0xd2bbad;if(_0x34e9f2[_0x835a('0x2e')]['includeAll']){_0x384edf[_0x835a('0x3f')]=[{'all':!![]}];}return db[_0x835a('0x2a')][_0x835a('0x40')](_0x384edf);})['then'](function(_0x474a4a){_0x308d72[_0x835a('0x41')]=_0x474a4a;return _0x308d72;})[_0x835a('0x21')](respondWithFilteredResult(_0xfb5bef,_0x384edf))[_0x835a('0x42')](handleError(_0xfb5bef,null));};exports[_0x835a('0x43')]=function(_0x22ecbd,_0x44c2f4){var _0x1fa542={'raw':![],'where':{'id':_0x22ecbd[_0x835a('0x44')]['id']}},_0x18761f={};_0x18761f['model']=_['keys'](db['VoiceMusicOnHold'][_0x835a('0x2b')]);_0x18761f[_0x835a('0x2e')]=_[_0x835a('0x2f')](_0x22ecbd['query']);_0x18761f[_0x835a('0x30')]=_[_0x835a('0x32')](_0x18761f[_0x835a('0x2d')],_0x18761f['query']);_0x1fa542[_0x835a('0x31')]=_[_0x835a('0x32')](_0x18761f[_0x835a('0x2d')],qs[_0x835a('0x33')](_0x22ecbd['query']['fields']));_0x1fa542[_0x835a('0x31')]=_0x1fa542['attributes'][_0x835a('0x34')]?_0x1fa542[_0x835a('0x31')]:_0x18761f[_0x835a('0x2d')];if(_0x22ecbd[_0x835a('0x2e')][_0x835a('0x45')]){_0x1fa542[_0x835a('0x3f')]=[{'all':!![]}];}_0x1fa542=_[_0x835a('0x3b')]({},_0x1fa542,_0x22ecbd[_0x835a('0x3e')]);return db['VoiceMusicOnHold']['find'](_0x1fa542)['then'](handleEntityNotFound(_0x44c2f4,null))['then'](respondWithResult(_0x44c2f4,null))[_0x835a('0x42')](handleError(_0x44c2f4,null));};exports[_0x835a('0x1f')]=function(_0x411b88,_0x36a983){if(_0x411b88[_0x835a('0x46')]['id']){delete _0x411b88[_0x835a('0x46')]['id'];}return db[_0x835a('0x2a')]['find']({'where':{'id':_0x411b88[_0x835a('0x44')]['id']}})[_0x835a('0x21')](handleEntityNotFound(_0x36a983,null))[_0x835a('0x21')](saveUpdates(_0x411b88[_0x835a('0x46')],null))['then'](respondWithResult(_0x36a983,null))[_0x835a('0x42')](handleError(_0x36a983,null));};exports[_0x835a('0x47')]=function(_0x4ef015,_0x57773a,_0x1e4d8b){return db[_0x835a('0x48')][_0x835a('0x49')](function(_0x528f86){if(_0x4ef015['body'][_0x835a('0x4a')]==='files'){_0x4ef015[_0x835a('0x46')]['directory']=path[_0x835a('0x4b')](config[_0x835a('0x4c')],_0x835a('0x4d'),_0x4ef015['body'][_0x835a('0x27')]);}return db[_0x835a('0x2a')][_0x835a('0x47')](_0x4ef015[_0x835a('0x46')],{'transaction':_0x528f86})[_0x835a('0x21')](function(_0x3eb836){if(_0x4ef015[_0x835a('0x46')][_0x835a('0x4a')]===_0x835a('0x4e')){fs[_0x835a('0x4f')](_0x3eb836[_0x835a('0x50')],parseInt('0777',0x8));}var _0x5caf35=_0x4ef015[_0x835a('0x51')][_0x835a('0x22')]({'plain':!![]});if(!_0x5caf35)throw new Error(_0x835a('0x52'));if(_0x5caf35[_0x835a('0x53')]===_0x835a('0x51')){var _0x3de650=_0x3eb836[_0x835a('0x22')]({'plain':!![]});return db[_0x835a('0x54')][_0x835a('0x55')]({'where':{'name':_0x835a('0x23'),'userProfileId':_0x5caf35[_0x835a('0x56')]},'raw':!![]})[_0x835a('0x21')](function(_0x13a672){if(_0x13a672&&_0x13a672['autoAssociation']===0x0){return db[_0x835a('0x24')][_0x835a('0x47')]({'name':_0x3de650[_0x835a('0x27')],'resourceId':_0x3de650['id'],'type':_0x13a672[_0x835a('0x27')],'sectionId':_0x13a672['id']},{})[_0x835a('0x21')](function(){return _0x3eb836;});}else{return _0x3eb836;}})[_0x835a('0x42')](function(_0x5d8fae){logger[_0x835a('0x25')](_0x835a('0x57'),_0x5d8fae);});}return _0x3eb836;});})[_0x835a('0x21')](respondWithResult(_0x57773a,0xc9))[_0x835a('0x42')](handleError(_0x57773a,null));};exports[_0x835a('0x20')]=function(_0xfdad5,_0x272025,_0x281504){var _0x3f9ad1;return db[_0x835a('0x2a')]['find']({'where':{'id':_0xfdad5['params']['id']}})[_0x835a('0x21')](function(_0x42546e){if(_0x42546e){return db[_0x835a('0x48')][_0x835a('0x49')](function(_0xfe068b){return _0x42546e['destroy']({'transaction':_0xfe068b,'raw':!![]})[_0x835a('0x21')](function(_0x30b253){if(_0x30b253[_0x835a('0x50')]){fs[_0x835a('0x58')](_0x30b253[_0x835a('0x50')])[_0x835a('0x59')](function(_0x2fb251){fs[_0x835a('0x5a')](path[_0x835a('0x4b')](_0x30b253[_0x835a('0x50')],_0x2fb251));});fs[_0x835a('0x5b')](_0x30b253[_0x835a('0x50')]);}return _0x30b253;});})[_0x835a('0x42')](function(_0x33183b){throw new db[(_0x835a('0x5c'))][(_0x835a('0x5d'))](_0x33183b['message']);});}})[_0x835a('0x21')](handleEntityNotFound(_0x272025,null))[_0x835a('0x21')](removeEntity(_0x272025,null))[_0x835a('0x42')](handleError(_0x272025,null));};exports[_0x835a('0x5e')]=function(_0x3aeed3,_0x30d756,_0x57c231){return db['sequelize'][_0x835a('0x49')](function(_0x2239f7){var _0x25bd70;return db[_0x835a('0x2a')][_0x835a('0x55')]({'where':{'id':_0x3aeed3['params']['id']}})['then'](function(_0x3c9a9c){if(_0x3c9a9c){_0x25bd70=_0x3c9a9c;return _0x3c9a9c[_0x835a('0x5e')](_0x3aeed3['body']['id'],{'transaction':_0x2239f7});}})['then'](function(_0x2db04d){if(_0x2db04d){return db[_0x835a('0x5f')][_0x835a('0x60')]({'where':{'id':_0x3aeed3[_0x835a('0x46')]['id']},'attributes':['id',_0x835a('0x27'),_0x835a('0x61'),_0x835a('0x62'),_0x835a('0x63')],'raw':!![]});}})[_0x835a('0x21')](function(_0x369862){if(_0x369862){var _0x4a79c1=path[_0x835a('0x4b')](config[_0x835a('0x4c')],'server/files/sounds/converted',util[_0x835a('0x64')](_0x835a('0x65'),path[_0x835a('0x66')](_0x369862[_0x835a('0x61')],path['extname'](_0x369862[_0x835a('0x61')])),_0x369862[_0x835a('0x62')]));var _0x3c1f81=path[_0x835a('0x4b')](config[_0x835a('0x4c')],'server/files/moh',_0x25bd70[_0x835a('0x27')],util[_0x835a('0x64')](_0x835a('0x65'),_0x369862[_0x835a('0x27')],_0x369862[_0x835a('0x62')]));fs[_0x835a('0x67')](_0x4a79c1,_0x3c1f81);return _0x369862;}})[_0x835a('0x42')](function(_0x628873){throw new db['Sequelize'][(_0x835a('0x5d'))](_0x628873[_0x835a('0x68')]);});})['then'](handleEntityNotFound(_0x30d756,null))[_0x835a('0x21')](respondWithResult(_0x30d756,0xc9))[_0x835a('0x42')](handleError(_0x30d756,null));};exports['removeSound']=function(_0x2ca369,_0x2b6bbe,_0x3f1042){return db['sequelize'][_0x835a('0x49')](function(_0x1a8efe){var _0x3f7c5e;return db[_0x835a('0x2a')][_0x835a('0x60')]({'where':{'id':_0x2ca369[_0x835a('0x44')]['id']}})[_0x835a('0x21')](handleEntityNotFound(_0x2b6bbe,null))[_0x835a('0x21')](function(_0xf895eb){if(_0xf895eb){_0x3f7c5e=_0xf895eb;return _0xf895eb[_0x835a('0x69')](_0x2ca369['params'][_0x835a('0x6a')]);}})[_0x835a('0x21')](function(_0x206d88){if(_0x206d88){return db[_0x835a('0x5f')][_0x835a('0x60')]({'where':{'id':_0x2ca369[_0x835a('0x44')][_0x835a('0x6a')]},'attributes':['id',_0x835a('0x27'),'save_name',_0x835a('0x62'),'createdAt'],'raw':!![]});}})[_0x835a('0x21')](function(_0x1ba27a){if(_0x1ba27a){fs[_0x835a('0x5a')](path[_0x835a('0x4b')](_0x3f7c5e[_0x835a('0x50')],util[_0x835a('0x64')](_0x835a('0x65'),_0x1ba27a[_0x835a('0x27')],_0x1ba27a[_0x835a('0x62')])));return _0x1ba27a;}})['catch'](function(_0x47f52b){throw new db['Sequelize'][(_0x835a('0x5d'))](_0x47f52b[_0x835a('0x68')]);});})[_0x835a('0x21')](handleEntityNotFound(_0x2b6bbe,null))[_0x835a('0x21')](respondWithStatusCode(_0x2b6bbe,0xcc))[_0x835a('0x42')](handleError(_0x2b6bbe,null));};exports[_0x835a('0x6b')]=function(_0x2a049a,_0x5e3d4d,_0x374962){var _0x56158={};var _0xd16f7e={};var _0x36ccb5;var _0x269075;return db[_0x835a('0x2a')]['findOne']({'where':{'id':_0x2a049a[_0x835a('0x44')]['id']}})[_0x835a('0x21')](handleEntityNotFound(_0x5e3d4d,null))[_0x835a('0x21')](function(_0x34ab79){if(_0x34ab79){_0x36ccb5=_0x34ab79;_0xd16f7e['model']=_['keys'](db[_0x835a('0x5f')][_0x835a('0x2b')]);_0xd16f7e[_0x835a('0x2e')]=_['keys'](_0x2a049a[_0x835a('0x2e')]);_0xd16f7e[_0x835a('0x30')]=_[_0x835a('0x32')](_0xd16f7e[_0x835a('0x2d')],_0xd16f7e['query']);_0x56158[_0x835a('0x31')]=_[_0x835a('0x32')](_0xd16f7e[_0x835a('0x2d')],qs[_0x835a('0x33')](_0x2a049a[_0x835a('0x2e')][_0x835a('0x33')]));_0x56158['attributes']=_0x56158[_0x835a('0x31')][_0x835a('0x34')]?_0x56158['attributes']:_0xd16f7e[_0x835a('0x2d')];_0x56158[_0x835a('0x6c')]=qs[_0x835a('0x37')](_0x2a049a[_0x835a('0x2e')][_0x835a('0x37')]);_0x56158['where']=qs[_0x835a('0x30')](_[_0x835a('0x39')](_0x2a049a[_0x835a('0x2e')],_0xd16f7e['filters']));if(_0x2a049a[_0x835a('0x2e')][_0x835a('0x3a')]){_0x56158['where']=_[_0x835a('0x3b')](_0x56158['where'],{'$or':_[_0x835a('0x29')](_0x56158['attributes'],function(_0x35e877){var _0x521ca6={};_0x521ca6[_0x35e877]={'$like':'%'+_0x2a049a[_0x835a('0x2e')][_0x835a('0x3a')]+'%'};return _0x521ca6;})});}_0x56158=_[_0x835a('0x3b')]({},_0x56158,_0x2a049a[_0x835a('0x3e')]);return _0x36ccb5[_0x835a('0x6b')](_0x56158);}})['then'](function(_0x5b3ebe){if(_0x5b3ebe){_0x269075=_0x5b3ebe['length'];if(!_0x2a049a['query'][_0x835a('0x35')]('nolimit')){_0x56158[_0x835a('0x17')]=qs[_0x835a('0x17')](_0x2a049a[_0x835a('0x2e')][_0x835a('0x17')]);_0x56158['offset']=qs[_0x835a('0x16')](_0x2a049a[_0x835a('0x2e')][_0x835a('0x16')]);}return _0x36ccb5[_0x835a('0x6b')](_0x56158);}})['then'](function(_0x4ee6b3){if(_0x4ee6b3){return _0x4ee6b3?{'count':_0x269075,'rows':_0x4ee6b3}:null;}})[_0x835a('0x21')](respondWithResult(_0x5e3d4d,null))[_0x835a('0x42')](handleError(_0x5e3d4d,null));};
\ No newline at end of file
index 1d7035a..dbd9edb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe780=['util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./voiceMusicOnHold.attributes','exports','VoiceMusicOnHold','voice_musiconhold'];(function(_0x3bf83f,_0x181cac){var _0x22c4a9=function(_0xb3ff0d){while(--_0xb3ff0d){_0x3bf83f['push'](_0x3bf83f['shift']());}};_0x22c4a9(++_0x181cac);}(_0xe780,0x90));var _0x0e78=function(_0x132fab,_0x38f620){_0x132fab=_0x132fab-0x0;var _0x2ec568=_0xe780[_0x132fab];return _0x2ec568;};'use strict';var _=require('lodash');var util=require(_0x0e78('0x0'));var logger=require(_0x0e78('0x1'))(_0x0e78('0x2'));var moment=require(_0x0e78('0x3'));var BPromise=require(_0x0e78('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0e78('0x5'));var rimraf=require(_0x0e78('0x6'));var config=require(_0x0e78('0x7'));var attributes=require(_0x0e78('0x8'));module[_0x0e78('0x9')]=function(_0x778f2a,_0x2a7cac){return _0x778f2a['define'](_0x0e78('0xa'),attributes,{'tableName':_0x0e78('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xea61=['define','VoiceMusicOnHold','voice_musiconhold','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./voiceMusicOnHold.attributes'];(function(_0x422165,_0x1eed41){var _0x2492b0=function(_0x291908){while(--_0x291908){_0x422165['push'](_0x422165['shift']());}};_0x2492b0(++_0x1eed41);}(_0xea61,0x148));var _0x1ea6=function(_0x382153,_0x1724be){_0x382153=_0x382153-0x0;var _0x3edc3d=_0xea61[_0x382153];return _0x3edc3d;};'use strict';var _=require(_0x1ea6('0x0'));var util=require('util');var logger=require(_0x1ea6('0x1'))(_0x1ea6('0x2'));var moment=require(_0x1ea6('0x3'));var BPromise=require(_0x1ea6('0x4'));var rp=require(_0x1ea6('0x5'));var fs=require('fs');var path=require(_0x1ea6('0x6'));var rimraf=require(_0x1ea6('0x7'));var config=require(_0x1ea6('0x8'));var attributes=require(_0x1ea6('0x9'));module['exports']=function(_0x34bd68,_0x4dad29){return _0x34bd68[_0x1ea6('0xa')](_0x1ea6('0xb'),attributes,{'tableName':_0x1ea6('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 0fcd534..71ba9f9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe706=['http','request','then','info','VoiceMusicOnHold,\x20%s,\x20%s','request\x20sent','debug','VoiceMusicOnHold,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x13950f,_0x64aca){var _0x1ea304=function(_0x160a45){while(--_0x160a45){_0x13950f['push'](_0x13950f['shift']());}};_0x1ea304(++_0x64aca);}(_0xe706,0xa3));var _0x6e70=function(_0x37ded3,_0x371ebb){_0x37ded3=_0x37ded3-0x0;var _0x51e49e=_0xe706[_0x37ded3];return _0x51e49e;};'use strict';var _=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var moment=require(_0x6e70('0x2'));var BPromise=require('bluebird');var rs=require(_0x6e70('0x3'));var fs=require('fs');var Redis=require(_0x6e70('0x4'));var db=require(_0x6e70('0x5'))['db'];var utils=require(_0x6e70('0x6'));var logger=require(_0x6e70('0x7'))(_0x6e70('0x8'));var config=require(_0x6e70('0x9'));var jayson=require(_0x6e70('0xa'));var client=jayson[_0x6e70('0xb')][_0x6e70('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x36357b,_0x293ce7,_0x45a2d4){return new BPromise(function(_0x188ed3,_0x3c4843){return client[_0x6e70('0xd')](_0x36357b,_0x45a2d4)[_0x6e70('0xe')](function(_0x25e61c){logger[_0x6e70('0xf')](_0x6e70('0x10'),_0x293ce7,_0x6e70('0x11'));logger[_0x6e70('0x12')](_0x6e70('0x13'),_0x293ce7,_0x6e70('0x11'),JSON['stringify'](_0x25e61c));if(_0x25e61c['error']){if(_0x25e61c[_0x6e70('0x14')][_0x6e70('0x15')]===0x1f4){logger[_0x6e70('0x14')](_0x6e70('0x10'),_0x293ce7,_0x25e61c[_0x6e70('0x14')][_0x6e70('0x16')]);return _0x3c4843(_0x25e61c[_0x6e70('0x14')][_0x6e70('0x16')]);}logger['error']('VoiceMusicOnHold,\x20%s,\x20%s',_0x293ce7,_0x25e61c['error'][_0x6e70('0x16')]);return _0x188ed3(_0x25e61c['error']['message']);}else{logger[_0x6e70('0xf')](_0x6e70('0x10'),_0x293ce7,'request\x20sent');_0x188ed3(_0x25e61c[_0x6e70('0x17')]['message']);}})[_0x6e70('0x18')](function(_0x161f23){logger['error']('VoiceMusicOnHold,\x20%s,\x20%s',_0x293ce7,_0x161f23);_0x3c4843(_0x161f23);});});}
\ No newline at end of file
+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(_0x555977,_0x290185){var _0x5b1695=function(_0x4886ef){while(--_0x4886ef){_0x555977['push'](_0x555977['shift']());}};_0x5b1695(++_0x290185);}(_0x34e8,0x12c));var _0x834e=function(_0x42f848,_0x4efeaf){_0x42f848=_0x42f848-0x0;var _0x439bac=_0x34e8[_0x42f848];return _0x439bac;};'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
index d819ddd..c5a8b7c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3d3e=['/describe','isAuthenticated','describe','/:id','show','/:id/users','/:id/teams','getTeams','create','addAgents','post','put','update','removeAgents','delete','removeTeams','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','./voicePrefix.controller','index','get'];(function(_0x19feb1,_0x286c60){var _0x337cbc=function(_0x4f00fe){while(--_0x4f00fe){_0x19feb1['push'](_0x19feb1['shift']());}};_0x337cbc(++_0x286c60);}(_0x3d3e,0x155));var _0xe3d3=function(_0x29d915,_0x3c17f9){_0x29d915=_0x29d915-0x0;var _0x3eb1f0=_0x3d3e[_0x29d915];return _0x3eb1f0;};'use strict';var multer=require(_0xe3d3('0x0'));var util=require(_0xe3d3('0x1'));var path=require(_0xe3d3('0x2'));var timeout=require('connect-timeout');var express=require(_0xe3d3('0x3'));var router=express[_0xe3d3('0x4')]();var fs_extra=require(_0xe3d3('0x5'));var auth=require(_0xe3d3('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xe3d3('0x7'));router['get']('/',auth['isAuthenticated'](),controller[_0xe3d3('0x8')]);router[_0xe3d3('0x9')](_0xe3d3('0xa'),auth[_0xe3d3('0xb')](),controller[_0xe3d3('0xc')]);router[_0xe3d3('0x9')](_0xe3d3('0xd'),auth[_0xe3d3('0xb')](),controller[_0xe3d3('0xe')]);router[_0xe3d3('0x9')](_0xe3d3('0xf'),auth[_0xe3d3('0xb')](),controller['getAgents']);router['get'](_0xe3d3('0x10'),auth[_0xe3d3('0xb')](),controller[_0xe3d3('0x11')]);router['post']('/',auth[_0xe3d3('0xb')](),controller[_0xe3d3('0x12')]);router['post']('/:id/users',auth[_0xe3d3('0xb')](),controller[_0xe3d3('0x13')]);router[_0xe3d3('0x14')](_0xe3d3('0x10'),auth[_0xe3d3('0xb')](),controller['addTeams']);router[_0xe3d3('0x15')](_0xe3d3('0xd'),auth[_0xe3d3('0xb')](),controller[_0xe3d3('0x16')]);router['delete'](_0xe3d3('0xd'),auth[_0xe3d3('0xb')](),controller['destroy']);router['delete']('/:id/users',auth[_0xe3d3('0xb')](),controller[_0xe3d3('0x17')]);router[_0xe3d3('0x18')]('/:id/teams',auth['isAuthenticated'](),controller[_0xe3d3('0x19')]);module[_0xe3d3('0x1a')]=router;
\ No newline at end of file
+var _0x74eb=['index','isAuthenticated','/:id','show','getAgents','/:id/teams','getTeams','post','/:id/users','addAgents','addTeams','update','delete','removeAgents','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x74eb,0x13b));var _0xb74e=function(_0x59afbd,_0x1f72e4){_0x59afbd=_0x59afbd-0x0;var _0x1b9242=_0x74eb[_0x59afbd];return _0x1b9242;};'use strict';var multer=require(_0xb74e('0x0'));var util=require(_0xb74e('0x1'));var path=require(_0xb74e('0x2'));var timeout=require('connect-timeout');var express=require(_0xb74e('0x3'));var router=express[_0xb74e('0x4')]();var fs_extra=require(_0xb74e('0x5'));var auth=require(_0xb74e('0x6'));var interaction=require(_0xb74e('0x7'));var config=require(_0xb74e('0x8'));var controller=require('./voicePrefix.controller');router[_0xb74e('0x9')]('/',auth['isAuthenticated'](),controller[_0xb74e('0xa')]);router[_0xb74e('0x9')]('/describe',auth[_0xb74e('0xb')](),controller['describe']);router['get'](_0xb74e('0xc'),auth['isAuthenticated'](),controller[_0xb74e('0xd')]);router[_0xb74e('0x9')]('/:id/users',auth[_0xb74e('0xb')](),controller[_0xb74e('0xe')]);router[_0xb74e('0x9')](_0xb74e('0xf'),auth[_0xb74e('0xb')](),controller[_0xb74e('0x10')]);router[_0xb74e('0x11')]('/',auth['isAuthenticated'](),controller['create']);router[_0xb74e('0x11')](_0xb74e('0x12'),auth[_0xb74e('0xb')](),controller[_0xb74e('0x13')]);router[_0xb74e('0x11')](_0xb74e('0xf'),auth[_0xb74e('0xb')](),controller[_0xb74e('0x14')]);router['put'](_0xb74e('0xc'),auth[_0xb74e('0xb')](),controller[_0xb74e('0x15')]);router['delete']('/:id',auth[_0xb74e('0xb')](),controller['destroy']);router[_0xb74e('0x16')]('/:id/users',auth[_0xb74e('0xb')](),controller[_0xb74e('0x17')]);router[_0xb74e('0x16')](_0xb74e('0xf'),auth['isAuthenticated'](),controller['removeTeams']);module[_0xb74e('0x18')]=router;
\ No newline at end of file
index 1e05be5..bd7ea94 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd571=['VIRTUAL','system-','getDataValue','exports','STRING'];(function(_0x2cc0c5,_0x47a192){var _0x4ec66e=function(_0x1b8cde){while(--_0x1b8cde){_0x2cc0c5['push'](_0x2cc0c5['shift']());}};_0x4ec66e(++_0x47a192);}(_0xd571,0x1c5));var _0x1d57=function(_0x580bae,_0x1f2c51){_0x580bae=_0x580bae-0x0;var _0x754b61=_0xd571[_0x580bae];return _0x754b61;};'use strict';var Sequelize=require('sequelize');module[_0x1d57('0x0')]={'name':{'type':Sequelize[_0x1d57('0x1')],'allowNull':![],'unique':'name'},'prefix':{'type':Sequelize[_0x1d57('0x2')],'get':function(_0x3d0922){return _0x1d57('0x3')+this[_0x1d57('0x4')]('name')+'-';}},'description':{'type':Sequelize[_0x1d57('0x1')]},'callerIdAll':{'type':Sequelize[_0x1d57('0x1')]},'VoiceExtensionId':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
+var _0x6c07=['name','VIRTUAL','system-','getDataValue','STRING','INTEGER','sequelize','exports'];(function(_0x2b6677,_0x1dab11){var _0x56ca1a=function(_0x2c8f44){while(--_0x2c8f44){_0x2b6677['push'](_0x2b6677['shift']());}};_0x56ca1a(++_0x1dab11);}(_0x6c07,0x166));var _0x76c0=function(_0x3f07b7,_0x2e4c76){_0x3f07b7=_0x3f07b7-0x0;var _0x511826=_0x6c07[_0x3f07b7];return _0x511826;};'use strict';var Sequelize=require(_0x76c0('0x0'));module[_0x76c0('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x76c0('0x2')},'prefix':{'type':Sequelize[_0x76c0('0x3')],'get':function(_0x39110b){return _0x76c0('0x4')+this[_0x76c0('0x5')]('name')+'-';}},'description':{'type':Sequelize[_0x76c0('0x6')]},'callerIdAll':{'type':Sequelize[_0x76c0('0x6')]},'VoiceExtensionId':{'type':Sequelize[_0x76c0('0x7')]}};
\ No newline at end of file
index a32f55e..a13f1a1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3de3=['jsforce','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','localhost','./voicePrefix.socket','register','sendStatus','status','offset','undefined','count','limit','set','json','apply','reject','update','then','VoicePrefixes','UserProfileResource','destroy','end','error','stack','name','send','index','map','VoicePrefix','key','model','query','keys','filters','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','type','VIRTUAL','filter','merge','options','includeAll','findAll','rows','catch','show','rawAttributes','intersection','find','params','describe','create','transaction','body','get','VoiceExtensionId','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','context','exten','app','system','description','Voice\x20Prefix\x20Extension','priority','prefix','Voice\x20Prefix','VoicePrefixId','VoiceExtension','bulkCreate','Extensions\x20creation\x20failed','Set','callerIdAll','No\x20callerid\x20available','push','goto','${EXTEN:','charAt','system-','findById','ids','omit','spread','userVoicePrefix:save','removeAgents','userVoicePrefix:remove','emit','getAgents','findOne','User','Team','getTeams','addTeams','Agents','online','voicePause','interface','flatMap','sequelize','each','TeamVoicePrefix','upsert','UserVoicePrefix','forEach','removeTeams','tq.TeamId','team_has_voice_prefixes','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','VoicePrefixId\x20=\x20?','clone','toString','QueryTypes','SELECT','every','TeamId','includes','all','union','compact','value','isEmpty','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','to-csv','fs-extra','squel','crypto'];(function(_0x21302e,_0x421afd){var _0x596d4a=function(_0x5a1c8a){while(--_0x5a1c8a){_0x21302e['push'](_0x21302e['shift']());}};_0x596d4a(++_0x421afd);}(_0x3de3,0x1ce));var _0x33de=function(_0x33524c,_0x3006c4){_0x33524c=_0x33524c-0x0;var _0x1d4dcd=_0x3de3[_0x33524c];return _0x1d4dcd;};'use strict';var emlformat=require(_0x33de('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x33de('0x1'));var jsonpatch=require(_0x33de('0x2'));var rp=require('request-promise');var moment=require(_0x33de('0x3'));var BPromise=require(_0x33de('0x4'));var Mustache=require(_0x33de('0x5'));var util=require(_0x33de('0x6'));var path=require('path');var sox=require(_0x33de('0x7'));var csv=require(_0x33de('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x33de('0x9'));var _=require('lodash');var squel=require(_0x33de('0xa'));var crypto=require(_0x33de('0xb'));var jsforce=require(_0x33de('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x33de('0x8'));var querystring=require(_0x33de('0xd'));var Papa=require(_0x33de('0xe'));var Redis=require('ioredis');var authService=require(_0x33de('0xf'));var qs=require(_0x33de('0x10'));var as=require(_0x33de('0x11'));var hardwareService=require(_0x33de('0x12'));var logger=require(_0x33de('0x13'))(_0x33de('0x14'));var utils=require(_0x33de('0x15'));var config=require(_0x33de('0x16'));var licenseUtil=require(_0x33de('0x17'));var db=require(_0x33de('0x18'))['db'];config[_0x33de('0x19')]=_['defaults'](config[_0x33de('0x19')],{'host':_0x33de('0x1a'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x33de('0x1b'))[_0x33de('0x1c')](socket);function respondWithStatusCode(_0x2b3748,_0x57a2a1){_0x57a2a1=_0x57a2a1||0xcc;return function(_0x57aa73){if(_0x57aa73){return _0x2b3748[_0x33de('0x1d')](_0x57a2a1);}return _0x2b3748[_0x33de('0x1e')](_0x57a2a1)['end']();};}function respondWithResult(_0x4ff69f,_0x185849){_0x185849=_0x185849||0xc8;return function(_0x16c050){if(_0x16c050){return _0x4ff69f[_0x33de('0x1e')](_0x185849)['json'](_0x16c050);}};}function respondWithFilteredResult(_0x2db887,_0x1203cf){return function(_0x52cfa0){if(_0x52cfa0){var _0x2815a7=typeof _0x1203cf[_0x33de('0x1f')]==='undefined'&&typeof _0x1203cf['limit']===_0x33de('0x20');var _0x52d718=_0x52cfa0[_0x33de('0x21')];var _0x2f0529=_0x2815a7?0x0:_0x1203cf[_0x33de('0x1f')];var _0x315c9b=_0x2815a7?_0x52cfa0[_0x33de('0x21')]:_0x1203cf[_0x33de('0x1f')]+_0x1203cf[_0x33de('0x22')];var _0x493263;if(_0x315c9b>=_0x52d718){_0x315c9b=_0x52d718;_0x493263=0xc8;}else{_0x493263=0xce;}_0x2db887['status'](_0x493263);return _0x2db887[_0x33de('0x23')]('Content-Range',_0x2f0529+'-'+_0x315c9b+'/'+_0x52d718)[_0x33de('0x24')](_0x52cfa0);}return null;};}function patchUpdates(_0x4cd8db){return function(_0x28ed17){try{jsonpatch[_0x33de('0x25')](_0x28ed17,_0x4cd8db,!![]);}catch(_0x575e88){return BPromise[_0x33de('0x26')](_0x575e88);}return _0x28ed17['save']();};}function saveUpdates(_0x67d040,_0x5c602d){return function(_0x62743b){if(_0x62743b){return _0x62743b[_0x33de('0x27')](_0x67d040)[_0x33de('0x28')](function(_0x5b79d7){return _0x5b79d7;});}return null;};}function removeEntity(_0x3bdba4,_0x2d206b){return function(_0x140979){if(_0x140979){return _0x140979['destroy']()[_0x33de('0x28')](function(){var _0x5585a2=_0x140979['get']({'plain':!![]});var _0x1c8de9=_0x33de('0x29');return db[_0x33de('0x2a')][_0x33de('0x2b')]({'where':{'type':_0x1c8de9,'resourceId':_0x5585a2['id']}})[_0x33de('0x28')](function(){return _0x140979;});})[_0x33de('0x28')](function(){_0x3bdba4[_0x33de('0x1e')](0xcc)[_0x33de('0x2c')]();});}};}function handleEntityNotFound(_0x59bc3b,_0x5ae0e8){return function(_0x2755e6){if(!_0x2755e6){_0x59bc3b[_0x33de('0x1d')](0x194);}return _0x2755e6;};}function handleError(_0xaeaec5,_0x451ff5){_0x451ff5=_0x451ff5||0x1f4;return function(_0x167cec){logger[_0x33de('0x2d')](_0x167cec[_0x33de('0x2e')]);if(_0x167cec['name']){delete _0x167cec[_0x33de('0x2f')];}_0xaeaec5[_0x33de('0x1e')](_0x451ff5)[_0x33de('0x30')](_0x167cec);};}exports[_0x33de('0x31')]=function(_0x49e857,_0xe5dc68){var _0xf5d78a={},_0x5a9c43={},_0x5d2da4={'count':0x0,'rows':[]};var _0x57fcf3=_[_0x33de('0x32')](db[_0x33de('0x33')]['rawAttributes'],function(_0x1d0194){return{'name':_0x1d0194['fieldName'],'type':_0x1d0194['type'][_0x33de('0x34')]};});_0x5a9c43[_0x33de('0x35')]=_[_0x33de('0x32')](_0x57fcf3,_0x33de('0x2f'));_0x5a9c43[_0x33de('0x36')]=_[_0x33de('0x37')](_0x49e857[_0x33de('0x36')]);_0x5a9c43[_0x33de('0x38')]=_['intersection'](_0x5a9c43[_0x33de('0x35')],_0x5a9c43['query']);_0xf5d78a[_0x33de('0x39')]=_['intersection'](_0x5a9c43['model'],qs[_0x33de('0x3a')](_0x49e857[_0x33de('0x36')][_0x33de('0x3a')]));_0xf5d78a[_0x33de('0x39')]=_0xf5d78a[_0x33de('0x39')][_0x33de('0x3b')]?_0xf5d78a['attributes']:_0x5a9c43[_0x33de('0x35')];if(!_0x49e857[_0x33de('0x36')][_0x33de('0x3c')](_0x33de('0x3d'))){_0xf5d78a[_0x33de('0x22')]=qs[_0x33de('0x22')](_0x49e857[_0x33de('0x36')]['limit']);_0xf5d78a[_0x33de('0x1f')]=qs[_0x33de('0x1f')](_0x49e857[_0x33de('0x36')][_0x33de('0x1f')]);}_0xf5d78a[_0x33de('0x3e')]=qs[_0x33de('0x3f')](_0x49e857[_0x33de('0x36')]['sort']);_0xf5d78a[_0x33de('0x40')]=qs[_0x33de('0x38')](_[_0x33de('0x41')](_0x49e857[_0x33de('0x36')],_0x5a9c43[_0x33de('0x38')]),_0x57fcf3);if(_0x49e857[_0x33de('0x36')]['filter']){_0xf5d78a[_0x33de('0x40')]=_['merge'](_0xf5d78a[_0x33de('0x40')],{'$or':_[_0x33de('0x32')](_0x57fcf3,function(_0x4da2a5){if(_0x4da2a5[_0x33de('0x42')]!==_0x33de('0x43')){var _0x15918c={};_0x15918c[_0x4da2a5[_0x33de('0x2f')]]={'$like':'%'+_0x49e857[_0x33de('0x36')][_0x33de('0x44')]+'%'};return _0x15918c;}})});}_0xf5d78a=_[_0x33de('0x45')]({},_0xf5d78a,_0x49e857[_0x33de('0x46')]);var _0x48e0fc={'where':_0xf5d78a['where']};return db['VoicePrefix'][_0x33de('0x21')](_0x48e0fc)[_0x33de('0x28')](function(_0x20d04f){_0x5d2da4[_0x33de('0x21')]=_0x20d04f;if(_0x49e857['query'][_0x33de('0x47')]){_0xf5d78a['include']=[{'all':!![]}];}return db['VoicePrefix'][_0x33de('0x48')](_0xf5d78a);})[_0x33de('0x28')](function(_0x384b12){_0x5d2da4[_0x33de('0x49')]=_0x384b12;return _0x5d2da4;})[_0x33de('0x28')](respondWithFilteredResult(_0xe5dc68,_0xf5d78a))[_0x33de('0x4a')](handleError(_0xe5dc68,null));};exports[_0x33de('0x4b')]=function(_0x49b067,_0x3b5530){var _0x5de38b={'raw':![],'where':{'id':_0x49b067['params']['id']}},_0x2fbca6={};_0x2fbca6[_0x33de('0x35')]=_[_0x33de('0x37')](db['VoicePrefix'][_0x33de('0x4c')]);_0x2fbca6[_0x33de('0x36')]=_[_0x33de('0x37')](_0x49b067['query']);_0x2fbca6['filters']=_[_0x33de('0x4d')](_0x2fbca6[_0x33de('0x35')],_0x2fbca6['query']);_0x5de38b['attributes']=_[_0x33de('0x4d')](_0x2fbca6['model'],qs['fields'](_0x49b067['query'][_0x33de('0x3a')]));_0x5de38b[_0x33de('0x39')]=_0x5de38b[_0x33de('0x39')][_0x33de('0x3b')]?_0x5de38b['attributes']:_0x2fbca6['model'];if(_0x49b067[_0x33de('0x36')][_0x33de('0x47')]){_0x5de38b['include']=[{'all':!![]}];}_0x5de38b=_[_0x33de('0x45')]({},_0x5de38b,_0x49b067[_0x33de('0x46')]);return db[_0x33de('0x33')][_0x33de('0x4e')](_0x5de38b)[_0x33de('0x28')](handleEntityNotFound(_0x3b5530,null))['then'](respondWithResult(_0x3b5530,null))[_0x33de('0x4a')](handleError(_0x3b5530,null));};exports[_0x33de('0x2b')]=function(_0x4fe3a2,_0x302573){return db[_0x33de('0x33')][_0x33de('0x4e')]({'where':{'id':_0x4fe3a2[_0x33de('0x4f')]['id']}})[_0x33de('0x28')](handleEntityNotFound(_0x302573,null))[_0x33de('0x28')](removeEntity(_0x302573,null))[_0x33de('0x4a')](handleError(_0x302573,null));};exports[_0x33de('0x50')]=function(_0x24e428,_0x1b4397){return db['VoicePrefix'][_0x33de('0x50')]()[_0x33de('0x28')](respondWithResult(_0x1b4397,null))[_0x33de('0x4a')](handleError(_0x1b4397,null));};exports[_0x33de('0x51')]=function(_0xe6d59,_0x3fe65d){var _0x5c91e7;return db['sequelize'][_0x33de('0x52')](function(_0x32042e){return db[_0x33de('0x33')]['create'](_0xe6d59[_0x33de('0x53')],{'transaction':_0x32042e})[_0x33de('0x28')](function(_0x379224){_0x5c91e7=_0x379224[_0x33de('0x54')]({'plain':!![]});return db['VoiceExtension']['find']({'where':{'id':_0x5c91e7[_0x33de('0x55')]},'raw':!![]})[_0x33de('0x28')](function(_0x232da5){return createVoicePrefixExtensions(_0x5c91e7,_0x232da5,_0x32042e);});});})[_0x33de('0x28')](function(){var _0x379784=_0xe6d59['user']['get']({'plain':!![]});if(!_0x379784)throw new Error(_0x33de('0x56'));if(_0x379784[_0x33de('0x57')]===_0x33de('0x58')){var _0x7112db=_0x5c91e7;return db[_0x33de('0x59')][_0x33de('0x4e')]({'where':{'name':_0x33de('0x29'),'userProfileId':_0x379784[_0x33de('0x5a')]},'raw':!![]})[_0x33de('0x28')](function(_0x5de12f){if(_0x5de12f&&_0x5de12f[_0x33de('0x5b')]===0x0){return db[_0x33de('0x2a')][_0x33de('0x51')]({'name':_0x7112db['name'],'resourceId':_0x7112db['id'],'type':_0x5de12f[_0x33de('0x2f')],'sectionId':_0x5de12f['id']},{})['then'](function(){return _0x5c91e7;});}else{return _0x5c91e7;}})['catch'](function(_0x4dae6d){logger['error'](_0x33de('0x5c'),_0x4dae6d);throw _0x4dae6d;});}return _0x5c91e7;})[_0x33de('0x28')](respondWithResult(_0x3fe65d,null))['catch'](handleError(_0x3fe65d,null));};function Extension(_0x397179,_0x232840,_0x56542f,_0x42c8b9){this[_0x33de('0x5d')]='from-sip';this[_0x33de('0x5e')]=_0x397179;this[_0x33de('0x5f')]=_0x56542f;this[_0x33de('0x42')]=_0x33de('0x60');this[_0x33de('0x61')]=_0x33de('0x62');this[_0x33de('0x63')]=_0x232840;this['appdata']=_0x42c8b9;}function createVoicePrefixExtensions(_0x533863,_0x409e2e,_0x49516d){return new BPromise(function(_0x2af340,_0x3eef03){var _0x4ca20f=new Extension(formatPrefixName(_0x533863[_0x33de('0x64')]),0x1,'NoOp',_0x33de('0x65'));_0x4ca20f[_0x33de('0x66')]=_0x533863['id'];return db['VoiceExtension']['create'](_0x4ca20f,{'transaction':_0x49516d})[_0x33de('0x28')](function(_0x1b2d6f){var _0x17845c=_0x1b2d6f[_0x33de('0x54')]({'plain':!![]});var _0x24d936=_['map'](addVoicePrefixExtensions(_0x533863,_0x409e2e),function(_0x221038){_0x221038[_0x33de('0x55')]=_0x17845c['id'];_0x221038['VoicePrefixId']=_0x533863['id'];return _0x221038;});return db[_0x33de('0x67')][_0x33de('0x68')](_0x24d936,{'transaction':_0x49516d})['then'](function(_0x151551){if(!_0x151551){return _0x3eef03(_0x33de('0x69'));}else{return _0x2af340(_0x151551);}})['catch'](function(_0x4aa203){return _0x3eef03(_0x4aa203);});});;});};function addVoicePrefixExtensions(_0xc2504a,_0x55d7ef){var _0x31a511=[];var _0x4803b8=formatPrefixName(_0xc2504a[_0x33de('0x64')]);_0x31a511['push'](new Extension(_0x4803b8,0x2,'Set','CDR(prefix)='+_0xc2504a['name']));if(_0xc2504a['callerIdAll']){_0x31a511['push'](new Extension(_0x4803b8,0x3,_0x33de('0x6a'),'PREFIX-CALLERIDALL='+_0xc2504a[_0x33de('0x6b')]));}else{_0x31a511['push'](new Extension(_0x4803b8,0x3,'NoOp',_0x33de('0x6c')));}_0x31a511[_0x33de('0x6d')](new Extension(_0x4803b8,0x4,_0x33de('0x6e'),_0x55d7ef[_0x33de('0x5d')]+','+_0x33de('0x6f')+(0x8+_0xc2504a[_0x33de('0x2f')][_0x33de('0x3b')])+'}'+','+0x1));return _0x31a511;}function formatPrefixName(_0x659652){var _0x4893d2='_';for(var _0x297a84=0x0;_0x297a84<_0x659652['length'];_0x297a84++){if(_0x659652[_0x33de('0x70')](_0x297a84)=='-'){_0x4893d2+=_0x659652[_0x33de('0x70')](_0x297a84);}else{_0x4893d2+='['+_0x659652[_0x33de('0x70')](_0x297a84)+']';}}_0x4893d2+='.';return _0x4893d2;}exports[_0x33de('0x27')]=function(_0x8a9729,_0x3f5d52,_0x2a6004){var _0x355b7d=_0x8a9729[_0x33de('0x53')];_0x355b7d[_0x33de('0x64')]=_0x33de('0x71')+_0x355b7d['name']+'-';return db['sequelize'][_0x33de('0x52')](function(_0x1179f6){return db[_0x33de('0x33')][_0x33de('0x27')](_0x355b7d,{'where':{'id':_0x355b7d['id']},'transaction':_0x1179f6})[_0x33de('0x28')](function(){return db[_0x33de('0x67')][_0x33de('0x2b')]({'where':{'VoicePrefixId':_0x355b7d['id']},'transaction':_0x1179f6})[_0x33de('0x28')](function(){return db[_0x33de('0x67')][_0x33de('0x4e')]({'where':{'id':_0x355b7d['VoiceExtensionId']},'raw':!![]})[_0x33de('0x28')](function(_0x43eb19){return createVoicePrefixExtensions(_0x355b7d,_0x43eb19,_0x1179f6);});});});})[_0x33de('0x28')](function(){return db[_0x33de('0x33')][_0x33de('0x72')](_0x355b7d['id']);})[_0x33de('0x28')](respondWithResult(_0x3f5d52,null))['catch'](handleError(_0x3f5d52,null));};exports['addAgents']=function(_0x558c26,_0x1370ac,_0x2d2b02){return db[_0x33de('0x33')][_0x33de('0x4e')]({'where':{'id':_0x558c26['params']['id']}})[_0x33de('0x28')](handleEntityNotFound(_0x1370ac,null))[_0x33de('0x28')](function(_0x484827){if(_0x484827){return _0x484827['addAgents'](_0x558c26['body'][_0x33de('0x73')],_[_0x33de('0x74')](_0x558c26[_0x33de('0x53')],[_0x33de('0x73'),'id'])||{})[_0x33de('0x75')](function(_0x545555){for(var _0x2e6389=0x0;_0x2e6389<_0x558c26['body'][_0x33de('0x73')][_0x33de('0x3b')];_0x2e6389+=0x1){socket['emit'](_0x33de('0x76'),{'UserId':Number(_0x558c26[_0x33de('0x53')]['ids'][_0x2e6389]),'VoicePrefixId':Number(_0x558c26[_0x33de('0x4f')]['id'])});}return _0x545555;});}})['then'](respondWithResult(_0x1370ac,null))['catch'](handleError(_0x1370ac,null));};exports[_0x33de('0x77')]=function(_0x2ef94d,_0x3fbbaf,_0x46e3d6){return db[_0x33de('0x33')]['find']({'where':{'id':_0x2ef94d[_0x33de('0x4f')]['id']}})[_0x33de('0x28')](handleEntityNotFound(_0x3fbbaf,null))[_0x33de('0x28')](function(_0x1e0637){if(_0x1e0637){return _0x1e0637['removeAgents'](_0x2ef94d[_0x33de('0x36')][_0x33de('0x73')])[_0x33de('0x28')](function(){if(_['isArray'](_0x2ef94d['query']['ids'])){for(var _0x586c51=0x0;_0x586c51<_0x2ef94d['query'][_0x33de('0x73')][_0x33de('0x3b')];_0x586c51+=0x1){socket['emit'](_0x33de('0x78'),{'UserId':Number(_0x2ef94d['query']['ids'][_0x586c51]),'VoicePrefixId':Number(_0x2ef94d[_0x33de('0x4f')]['id'])});}}else{socket[_0x33de('0x79')]('userVoicePrefix:remove',{'UserId':Number(_0x2ef94d[_0x33de('0x36')][_0x33de('0x73')]),'VoicePrefixId':Number(_0x2ef94d['params']['id'])});}});}})[_0x33de('0x28')](respondWithStatusCode(_0x3fbbaf,null))['catch'](handleError(_0x3fbbaf,null));};exports[_0x33de('0x7a')]=function(_0x1d060d,_0x487dac,_0x30d749){var _0x2cd94f={};var _0x53ec24={};var _0x4fa42c;var _0x130bbd;return db[_0x33de('0x33')][_0x33de('0x7b')]({'where':{'id':_0x1d060d[_0x33de('0x4f')]['id']}})[_0x33de('0x28')](handleEntityNotFound(_0x487dac,null))[_0x33de('0x28')](function(_0x4ef18b){if(_0x4ef18b){_0x4fa42c=_0x4ef18b;_0x53ec24[_0x33de('0x35')]=_[_0x33de('0x37')](db[_0x33de('0x7c')][_0x33de('0x4c')]);_0x53ec24[_0x33de('0x36')]=_[_0x33de('0x37')](_0x1d060d[_0x33de('0x36')]);_0x53ec24[_0x33de('0x38')]=_[_0x33de('0x4d')](_0x53ec24[_0x33de('0x35')],_0x53ec24[_0x33de('0x36')]);_0x2cd94f[_0x33de('0x39')]=_[_0x33de('0x4d')](_0x53ec24[_0x33de('0x35')],qs[_0x33de('0x3a')](_0x1d060d[_0x33de('0x36')]['fields']));_0x2cd94f[_0x33de('0x39')]=_0x2cd94f[_0x33de('0x39')][_0x33de('0x3b')]?_0x2cd94f[_0x33de('0x39')]:_0x53ec24[_0x33de('0x35')];_0x2cd94f['order']=qs[_0x33de('0x3f')](_0x1d060d[_0x33de('0x36')][_0x33de('0x3f')]);_0x2cd94f[_0x33de('0x40')]=qs[_0x33de('0x38')](_[_0x33de('0x41')](_0x1d060d[_0x33de('0x36')],_0x53ec24[_0x33de('0x38')]));if(_0x1d060d[_0x33de('0x36')][_0x33de('0x44')]){_0x2cd94f['where']=_['merge'](_0x2cd94f[_0x33de('0x40')],{'$or':_[_0x33de('0x32')](_0x2cd94f[_0x33de('0x39')],function(_0xa0b337){var _0x5b8928={};_0x5b8928[_0xa0b337]={'$like':'%'+_0x1d060d[_0x33de('0x36')][_0x33de('0x44')]+'%'};return _0x5b8928;})});}_0x2cd94f=_[_0x33de('0x45')]({},_0x2cd94f,_0x1d060d['options']);return _0x4fa42c['getAgents'](_0x2cd94f);}})[_0x33de('0x28')](function(_0xe6b940){if(_0xe6b940){_0x130bbd=_0xe6b940[_0x33de('0x3b')];if(!_0x1d060d['query'][_0x33de('0x3c')](_0x33de('0x3d'))){_0x2cd94f[_0x33de('0x22')]=qs['limit'](_0x1d060d[_0x33de('0x36')][_0x33de('0x22')]);_0x2cd94f['offset']=qs[_0x33de('0x1f')](_0x1d060d['query'][_0x33de('0x1f')]);}return _0x4fa42c[_0x33de('0x7a')](_0x2cd94f);}})['then'](function(_0x42546c){if(_0x42546c){return _0x42546c?{'count':_0x130bbd,'rows':_0x42546c}:null;}})[_0x33de('0x28')](respondWithResult(_0x487dac,null))[_0x33de('0x4a')](handleError(_0x487dac,null));};exports['getTeams']=function(_0x52b4e2,_0x48a039,_0xfb0042){var _0x5f46d7={};var _0x5817e3={};var _0x3df0d3;var _0xebf05f;return db[_0x33de('0x33')][_0x33de('0x7b')]({'where':{'id':_0x52b4e2['params']['id']}})[_0x33de('0x28')](handleEntityNotFound(_0x48a039,null))[_0x33de('0x28')](function(_0x27072a){if(_0x27072a){_0x3df0d3=_0x27072a;_0x5817e3['model']=_[_0x33de('0x37')](db[_0x33de('0x7d')][_0x33de('0x4c')]);_0x5817e3[_0x33de('0x36')]=_[_0x33de('0x37')](_0x52b4e2[_0x33de('0x36')]);_0x5817e3[_0x33de('0x38')]=_[_0x33de('0x4d')](_0x5817e3[_0x33de('0x35')],_0x5817e3[_0x33de('0x36')]);_0x5f46d7[_0x33de('0x39')]=_[_0x33de('0x4d')](_0x5817e3[_0x33de('0x35')],qs[_0x33de('0x3a')](_0x52b4e2[_0x33de('0x36')][_0x33de('0x3a')]));_0x5f46d7[_0x33de('0x39')]=_0x5f46d7[_0x33de('0x39')][_0x33de('0x3b')]?_0x5f46d7['attributes']:_0x5817e3[_0x33de('0x35')];_0x5f46d7[_0x33de('0x3e')]=qs[_0x33de('0x3f')](_0x52b4e2[_0x33de('0x36')][_0x33de('0x3f')]);_0x5f46d7['where']=qs[_0x33de('0x38')](_[_0x33de('0x41')](_0x52b4e2[_0x33de('0x36')],_0x5817e3[_0x33de('0x38')]));if(_0x52b4e2[_0x33de('0x36')][_0x33de('0x44')]){_0x5f46d7[_0x33de('0x40')]=_[_0x33de('0x45')](_0x5f46d7[_0x33de('0x40')],{'$or':_[_0x33de('0x32')](_0x5f46d7['attributes'],function(_0x3af223){var _0x258238={};_0x258238[_0x3af223]={'$like':'%'+_0x52b4e2['query'][_0x33de('0x44')]+'%'};return _0x258238;})});}_0x5f46d7=_[_0x33de('0x45')]({},_0x5f46d7,_0x52b4e2['options']);return _0x3df0d3['getTeams'](_0x5f46d7);}})['then'](function(_0x1f1bd4){if(_0x1f1bd4){_0xebf05f=_0x1f1bd4['length'];if(!_0x52b4e2[_0x33de('0x36')][_0x33de('0x3c')]('nolimit')){_0x5f46d7[_0x33de('0x22')]=qs['limit'](_0x52b4e2[_0x33de('0x36')][_0x33de('0x22')]);_0x5f46d7[_0x33de('0x1f')]=qs[_0x33de('0x1f')](_0x52b4e2[_0x33de('0x36')]['offset']);}return _0x3df0d3[_0x33de('0x7e')](_0x5f46d7);}})[_0x33de('0x28')](function(_0x24dcfe){if(_0x24dcfe){return _0x24dcfe?{'count':_0xebf05f,'rows':_0x24dcfe}:null;}})['then'](respondWithResult(_0x48a039,null))[_0x33de('0x4a')](handleError(_0x48a039,null));};exports[_0x33de('0x7f')]=function(_0x24af54,_0x2baee6,_0x56fadb){var _0x5ce00e=_0x24af54[_0x33de('0x53')][_0x33de('0x73')];var _0x2127ab;return db[_0x33de('0x7d')][_0x33de('0x48')]({'where':{'id':_0x5ce00e},'attributes':['id'],'include':[{'model':db[_0x33de('0x7c')],'as':_0x33de('0x80'),'attributes':['id',_0x33de('0x2f'),_0x33de('0x81'),_0x33de('0x82'),_0x33de('0x83')],'raw':!![]}]})[_0x33de('0x28')](function(_0x371e4d){if(_0x371e4d){_0x2127ab=_0x371e4d;var _0x17d367=_[_0x33de('0x84')](_0x371e4d,function(_0x21a70f){var _0x5e11f1=_0x21a70f[_0x33de('0x54')]({'plain':!![]});return _0x5e11f1[_0x33de('0x80')];});return db[_0x33de('0x33')][_0x33de('0x4e')]({'where':{'id':_0x24af54[_0x33de('0x4f')]['id']}})[_0x33de('0x28')](function(_0x5120f5){return db[_0x33de('0x85')][_0x33de('0x52')](function(_0x51b000){return _0x5120f5[_0x33de('0x7f')](_0x5ce00e,{'transaction':_0x51b000})[_0x33de('0x28')](function(){return BPromise[_0x33de('0x86')](_0x2127ab,function(_0x131d87){return db[_0x33de('0x87')][_0x33de('0x88')]({'TeamId':_0x131d87['id'],'VoicePrefixId':_0x24af54[_0x33de('0x4f')]['id']},{'transaction':_0x51b000});});})['then'](function(){return BPromise['each'](_0x17d367,function(_0x446257){return db[_0x33de('0x89')]['findOrCreate']({'where':{'UserId':_0x446257['id'],'VoicePrefixId':_0x24af54[_0x33de('0x4f')]['id']},'transaction':_0x51b000});});})[_0x33de('0x28')](function(){_0x17d367[_0x33de('0x8a')](function(_0xf06806){socket[_0x33de('0x79')]('userVoicePrefix:save',{'UserId':_0xf06806['id'],'VoicePrefixId':_0x5120f5['id']});});});});});}})[_0x33de('0x28')](respondWithStatusCode(_0x2baee6,null))[_0x33de('0x4a')](handleError(_0x2baee6,null));};exports[_0x33de('0x8b')]=function(_0x1f5872,_0x38d880,_0x40758b){return db[_0x33de('0x7d')][_0x33de('0x48')]({'where':{'id':_0x1f5872[_0x33de('0x36')][_0x33de('0x73')]},'attributes':['id'],'include':[{'model':db[_0x33de('0x7c')],'as':_0x33de('0x80'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x38d880,null))[_0x33de('0x28')](function(_0xd41b76){var _0x24fa73=_['map'](_0xd41b76,'id');var _0x93313d=[];var _0x3c854d=[];var _0x3e00b7=squel['select']();_0x3e00b7['field'](_0x33de('0x8c'))['from'](_0x33de('0x8d'),'tq')[_0x33de('0x8e')](_0x33de('0x8f'),'ut',_0x33de('0x90'))[_0x33de('0x40')](_0x33de('0x91'),_0x1f5872[_0x33de('0x4f')]['id']);for(var _0x23b8e9=0x0;_0x23b8e9<_0xd41b76[_0x33de('0x3b')];_0x23b8e9+=0x1){let _0x64836b=_0xd41b76[_0x23b8e9];for(var _0x72b745=0x0;_0x72b745<_0x64836b[_0x33de('0x80')]['length'];_0x72b745+=0x1){let _0x4eacef=_0x64836b[_0x33de('0x80')][_0x72b745];var _0x13cd17=_0x3e00b7[_0x33de('0x92')]();_0x13cd17[_0x33de('0x40')]('ut.UserId\x20=\x20?',_0x4eacef['id']);_0x3c854d[_0x33de('0x6d')](db['sequelize']['query'](_0x13cd17[_0x33de('0x93')](),{'type':db[_0x33de('0x85')][_0x33de('0x94')][_0x33de('0x95')]})[_0x33de('0x28')](function(_0x251b71){if(_0x251b71['length']===0x1){return _0x4eacef['id'];}else{var _0x341b23=_[_0x33de('0x96')](_[_0x33de('0x32')](_0x251b71,_0x33de('0x97')),function(_0x29eda7){return _[_0x33de('0x98')](_0x24fa73,_0x29eda7);});if(_0x341b23){return _0x4eacef['id'];}}}));}}return BPromise[_0x33de('0x99')](_0x3c854d)['then'](function(_0x572532){_0x93313d=_(_0x93313d)[_0x33de('0x9a')](_0x572532)[_0x33de('0x9b')]()[_0x33de('0x9c')]();return db[_0x33de('0x33')]['find']({'where':{'id':_0x1f5872[_0x33de('0x4f')]['id']}})[_0x33de('0x28')](function(_0x24edf8){return db['sequelize'][_0x33de('0x52')](function(_0x1ad90f){return _0x24edf8['removeTeams'](_0x1f5872['query'][_0x33de('0x73')],{'transaction':_0x1ad90f})[_0x33de('0x28')](function(){if(!_[_0x33de('0x9d')](_0x93313d)){return _0x24edf8['removeAgents'](_0x93313d,{'transaction':_0x1ad90f});}})[_0x33de('0x28')](function(){_0x93313d[_0x33de('0x8a')](function(_0x4d56df){socket[_0x33de('0x79')](_0x33de('0x78'),{'UserId':_0x4d56df,'VoicePrefixId':_0x24edf8['id']});});});});});});})['then'](respondWithStatusCode(_0x38d880,null))['catch'](handleError(_0x38d880,null));};
\ No newline at end of file
+var _0x5f66=['map','rawAttributes','fieldName','key','model','name','query','keys','filters','intersection','fields','attributes','length','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','VoicePrefix','count','includeAll','include','findAll','rows','catch','find','destroy','describe','create','transaction','body','VoiceExtension','VoiceExtensionId','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','context','from-sip','exten','system','description','Voice\x20Prefix\x20Extension','appdata','NoOp','Voice\x20Prefix','VoicePrefixId','bulkCreate','Extensions\x20creation\x20failed','prefix','Set','CDR(prefix)=','callerIdAll','push','PREFIX-CALLERIDALL=','goto','charAt','system-','findById','params','addAgents','ids','spread','userVoicePrefix:save','removeAgents','isArray','emit','userVoicePrefix:remove','findOne','getAgents','hasOwnProperty','getTeams','Team','online','voicePause','interface','flatMap','Agents','sequelize','addTeams','each','TeamVoicePrefix','upsert','UserVoicePrefix','findOrCreate','forEach','removeTeams','User','select','from','team_has_voice_prefixes','join','user_has_teams','clone','toString','QueryTypes','every','TeamId','includes','all','union','compact','value','isEmpty','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','path','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/license/util','redis','localhost','socket.io-emitter','./voicePrefix.socket','register','sendStatus','end','status','json','offset','undefined','limit','set','Content-Range','reject','update','get','VoicePrefixes','UserProfileResource','then','error','stack','send'];(function(_0x652c36,_0xbd54a1){var _0x30c32f=function(_0x1533dc){while(--_0x1533dc){_0x652c36['push'](_0x652c36['shift']());}};_0x30c32f(++_0xbd54a1);}(_0x5f66,0x1a0));var _0x65f6=function(_0x4243a3,_0x447337){_0x4243a3=_0x4243a3-0x0;var _0x1b2a33=_0x5f66[_0x4243a3];return _0x1b2a33;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x65f6('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x65f6('0x1'));var rp=require(_0x65f6('0x2'));var moment=require(_0x65f6('0x3'));var BPromise=require(_0x65f6('0x4'));var Mustache=require(_0x65f6('0x5'));var util=require('util');var path=require(_0x65f6('0x6'));var sox=require('sox');var csv=require(_0x65f6('0x7'));var ejs=require(_0x65f6('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x65f6('0x9'));var crypto=require(_0x65f6('0xa'));var jsforce=require(_0x65f6('0xb'));var deskjs=require(_0x65f6('0xc'));var toCsv=require(_0x65f6('0x7'));var querystring=require(_0x65f6('0xd'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x65f6('0xe'));var qs=require(_0x65f6('0xf'));var as=require(_0x65f6('0x10'));var hardwareService=require(_0x65f6('0x11'));var logger=require('../../config/logger')(_0x65f6('0x12'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x65f6('0x13'));var db=require('../../mysqldb')['db'];config[_0x65f6('0x14')]=_['defaults'](config[_0x65f6('0x14')],{'host':_0x65f6('0x15'),'port':0x18eb});var socket=require(_0x65f6('0x16'))(new Redis(config[_0x65f6('0x14')]));require(_0x65f6('0x17'))[_0x65f6('0x18')](socket);function respondWithStatusCode(_0x44144b,_0xb1d40a){_0xb1d40a=_0xb1d40a||0xcc;return function(_0x46dbc6){if(_0x46dbc6){return _0x44144b[_0x65f6('0x19')](_0xb1d40a);}return _0x44144b['status'](_0xb1d40a)[_0x65f6('0x1a')]();};}function respondWithResult(_0x49a913,_0x5dd324){_0x5dd324=_0x5dd324||0xc8;return function(_0x1693e6){if(_0x1693e6){return _0x49a913[_0x65f6('0x1b')](_0x5dd324)[_0x65f6('0x1c')](_0x1693e6);}};}function respondWithFilteredResult(_0x1c955c,_0x1b1cbb){return function(_0x1f974c){if(_0x1f974c){var _0xc8660c=typeof _0x1b1cbb[_0x65f6('0x1d')]==='undefined'&&typeof _0x1b1cbb['limit']===_0x65f6('0x1e');var _0x5b4055=_0x1f974c['count'];var _0x5c5b91=_0xc8660c?0x0:_0x1b1cbb[_0x65f6('0x1d')];var _0x21ea88=_0xc8660c?_0x1f974c['count']:_0x1b1cbb[_0x65f6('0x1d')]+_0x1b1cbb[_0x65f6('0x1f')];var _0xbee6a4;if(_0x21ea88>=_0x5b4055){_0x21ea88=_0x5b4055;_0xbee6a4=0xc8;}else{_0xbee6a4=0xce;}_0x1c955c[_0x65f6('0x1b')](_0xbee6a4);return _0x1c955c[_0x65f6('0x20')](_0x65f6('0x21'),_0x5c5b91+'-'+_0x21ea88+'/'+_0x5b4055)['json'](_0x1f974c);}return null;};}function patchUpdates(_0x197a49){return function(_0x4bb39e){try{jsonpatch['apply'](_0x4bb39e,_0x197a49,!![]);}catch(_0x212247){return BPromise[_0x65f6('0x22')](_0x212247);}return _0x4bb39e['save']();};}function saveUpdates(_0x1eeaaa,_0x471a33){return function(_0x2317ce){if(_0x2317ce){return _0x2317ce[_0x65f6('0x23')](_0x1eeaaa)['then'](function(_0x9d7bb0){return _0x9d7bb0;});}return null;};}function removeEntity(_0x59ea32,_0x20a161){return function(_0x5963e0){if(_0x5963e0){return _0x5963e0['destroy']()['then'](function(){var _0x29abdb=_0x5963e0[_0x65f6('0x24')]({'plain':!![]});var _0x4b2292=_0x65f6('0x25');return db[_0x65f6('0x26')]['destroy']({'where':{'type':_0x4b2292,'resourceId':_0x29abdb['id']}})[_0x65f6('0x27')](function(){return _0x5963e0;});})[_0x65f6('0x27')](function(){_0x59ea32[_0x65f6('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4ac04b,_0x488d36){return function(_0x266cfe){if(!_0x266cfe){_0x4ac04b[_0x65f6('0x19')](0x194);}return _0x266cfe;};}function handleError(_0x4344b3,_0x408ccc){_0x408ccc=_0x408ccc||0x1f4;return function(_0x518cac){logger[_0x65f6('0x28')](_0x518cac[_0x65f6('0x29')]);if(_0x518cac['name']){delete _0x518cac['name'];}_0x4344b3[_0x65f6('0x1b')](_0x408ccc)[_0x65f6('0x2a')](_0x518cac);};}exports['index']=function(_0x4e50c0,_0x10b368){var _0x1ce43c={},_0x11fe3b={},_0xc53cb7={'count':0x0,'rows':[]};var _0x1217fd=_[_0x65f6('0x2b')](db['VoicePrefix'][_0x65f6('0x2c')],function(_0x38f3c6){return{'name':_0x38f3c6[_0x65f6('0x2d')],'type':_0x38f3c6['type'][_0x65f6('0x2e')]};});_0x11fe3b[_0x65f6('0x2f')]=_[_0x65f6('0x2b')](_0x1217fd,_0x65f6('0x30'));_0x11fe3b[_0x65f6('0x31')]=_[_0x65f6('0x32')](_0x4e50c0['query']);_0x11fe3b[_0x65f6('0x33')]=_[_0x65f6('0x34')](_0x11fe3b['model'],_0x11fe3b[_0x65f6('0x31')]);_0x1ce43c['attributes']=_[_0x65f6('0x34')](_0x11fe3b['model'],qs[_0x65f6('0x35')](_0x4e50c0[_0x65f6('0x31')]['fields']));_0x1ce43c[_0x65f6('0x36')]=_0x1ce43c[_0x65f6('0x36')][_0x65f6('0x37')]?_0x1ce43c['attributes']:_0x11fe3b['model'];if(!_0x4e50c0[_0x65f6('0x31')]['hasOwnProperty'](_0x65f6('0x38'))){_0x1ce43c['limit']=qs[_0x65f6('0x1f')](_0x4e50c0[_0x65f6('0x31')]['limit']);_0x1ce43c[_0x65f6('0x1d')]=qs['offset'](_0x4e50c0['query'][_0x65f6('0x1d')]);}_0x1ce43c[_0x65f6('0x39')]=qs[_0x65f6('0x3a')](_0x4e50c0[_0x65f6('0x31')][_0x65f6('0x3a')]);_0x1ce43c[_0x65f6('0x3b')]=qs[_0x65f6('0x33')](_[_0x65f6('0x3c')](_0x4e50c0['query'],_0x11fe3b[_0x65f6('0x33')]),_0x1217fd);if(_0x4e50c0['query'][_0x65f6('0x3d')]){_0x1ce43c[_0x65f6('0x3b')]=_[_0x65f6('0x3e')](_0x1ce43c[_0x65f6('0x3b')],{'$or':_['map'](_0x1217fd,function(_0x32148f){if(_0x32148f[_0x65f6('0x3f')]!==_0x65f6('0x40')){var _0x3fb1c6={};_0x3fb1c6[_0x32148f[_0x65f6('0x30')]]={'$like':'%'+_0x4e50c0[_0x65f6('0x31')][_0x65f6('0x3d')]+'%'};return _0x3fb1c6;}})});}_0x1ce43c=_[_0x65f6('0x3e')]({},_0x1ce43c,_0x4e50c0[_0x65f6('0x41')]);var _0x5d8e48={'where':_0x1ce43c[_0x65f6('0x3b')]};return db[_0x65f6('0x42')][_0x65f6('0x43')](_0x5d8e48)[_0x65f6('0x27')](function(_0x83e2d9){_0xc53cb7[_0x65f6('0x43')]=_0x83e2d9;if(_0x4e50c0[_0x65f6('0x31')][_0x65f6('0x44')]){_0x1ce43c[_0x65f6('0x45')]=[{'all':!![]}];}return db[_0x65f6('0x42')][_0x65f6('0x46')](_0x1ce43c);})[_0x65f6('0x27')](function(_0x6c4d94){_0xc53cb7[_0x65f6('0x47')]=_0x6c4d94;return _0xc53cb7;})[_0x65f6('0x27')](respondWithFilteredResult(_0x10b368,_0x1ce43c))[_0x65f6('0x48')](handleError(_0x10b368,null));};exports['show']=function(_0x2dd16c,_0x37cd36){var _0x2d8c45={'raw':![],'where':{'id':_0x2dd16c['params']['id']}},_0x3828c9={};_0x3828c9[_0x65f6('0x2f')]=_[_0x65f6('0x32')](db[_0x65f6('0x42')]['rawAttributes']);_0x3828c9[_0x65f6('0x31')]=_[_0x65f6('0x32')](_0x2dd16c[_0x65f6('0x31')]);_0x3828c9[_0x65f6('0x33')]=_['intersection'](_0x3828c9[_0x65f6('0x2f')],_0x3828c9['query']);_0x2d8c45[_0x65f6('0x36')]=_[_0x65f6('0x34')](_0x3828c9['model'],qs[_0x65f6('0x35')](_0x2dd16c['query'][_0x65f6('0x35')]));_0x2d8c45[_0x65f6('0x36')]=_0x2d8c45[_0x65f6('0x36')][_0x65f6('0x37')]?_0x2d8c45[_0x65f6('0x36')]:_0x3828c9[_0x65f6('0x2f')];if(_0x2dd16c['query']['includeAll']){_0x2d8c45[_0x65f6('0x45')]=[{'all':!![]}];}_0x2d8c45=_[_0x65f6('0x3e')]({},_0x2d8c45,_0x2dd16c[_0x65f6('0x41')]);return db[_0x65f6('0x42')][_0x65f6('0x49')](_0x2d8c45)[_0x65f6('0x27')](handleEntityNotFound(_0x37cd36,null))[_0x65f6('0x27')](respondWithResult(_0x37cd36,null))[_0x65f6('0x48')](handleError(_0x37cd36,null));};exports[_0x65f6('0x4a')]=function(_0x517a47,_0x1f16cf){return db[_0x65f6('0x42')][_0x65f6('0x49')]({'where':{'id':_0x517a47['params']['id']}})[_0x65f6('0x27')](handleEntityNotFound(_0x1f16cf,null))[_0x65f6('0x27')](removeEntity(_0x1f16cf,null))['catch'](handleError(_0x1f16cf,null));};exports[_0x65f6('0x4b')]=function(_0x253d52,_0x57eb04){return db[_0x65f6('0x42')]['describe']()[_0x65f6('0x27')](respondWithResult(_0x57eb04,null))[_0x65f6('0x48')](handleError(_0x57eb04,null));};exports[_0x65f6('0x4c')]=function(_0x4b9f0a,_0x1646c5){var _0x43a52e;return db['sequelize'][_0x65f6('0x4d')](function(_0x34312c){return db['VoicePrefix'][_0x65f6('0x4c')](_0x4b9f0a[_0x65f6('0x4e')],{'transaction':_0x34312c})[_0x65f6('0x27')](function(_0x25d504){_0x43a52e=_0x25d504[_0x65f6('0x24')]({'plain':!![]});return db[_0x65f6('0x4f')][_0x65f6('0x49')]({'where':{'id':_0x43a52e[_0x65f6('0x50')]},'raw':!![]})['then'](function(_0x52c5a4){return createVoicePrefixExtensions(_0x43a52e,_0x52c5a4,_0x34312c);});});})['then'](function(){var _0x19f40c=_0x4b9f0a[_0x65f6('0x51')][_0x65f6('0x24')]({'plain':!![]});if(!_0x19f40c)throw new Error(_0x65f6('0x52'));if(_0x19f40c['role']===_0x65f6('0x51')){var _0x2032b9=_0x43a52e;return db[_0x65f6('0x53')]['find']({'where':{'name':_0x65f6('0x25'),'userProfileId':_0x19f40c[_0x65f6('0x54')]},'raw':!![]})[_0x65f6('0x27')](function(_0x4e289e){if(_0x4e289e&&_0x4e289e['autoAssociation']===0x0){return db[_0x65f6('0x26')][_0x65f6('0x4c')]({'name':_0x2032b9[_0x65f6('0x30')],'resourceId':_0x2032b9['id'],'type':_0x4e289e[_0x65f6('0x30')],'sectionId':_0x4e289e['id']},{})[_0x65f6('0x27')](function(){return _0x43a52e;});}else{return _0x43a52e;}})[_0x65f6('0x48')](function(_0x35d77f){logger[_0x65f6('0x28')](_0x65f6('0x55'),_0x35d77f);throw _0x35d77f;});}return _0x43a52e;})[_0x65f6('0x27')](respondWithResult(_0x1646c5,null))[_0x65f6('0x48')](handleError(_0x1646c5,null));};function Extension(_0x141fcc,_0x30adee,_0x3e3143,_0x5ba9c6){this[_0x65f6('0x56')]=_0x65f6('0x57');this[_0x65f6('0x58')]=_0x141fcc;this['app']=_0x3e3143;this[_0x65f6('0x3f')]=_0x65f6('0x59');this[_0x65f6('0x5a')]=_0x65f6('0x5b');this['priority']=_0x30adee;this[_0x65f6('0x5c')]=_0x5ba9c6;}function createVoicePrefixExtensions(_0x4227f5,_0xe5fc65,_0x3e0d8b){return new BPromise(function(_0x553ff0,_0x2923ff){var _0x2fc20f=new Extension(formatPrefixName(_0x4227f5['prefix']),0x1,_0x65f6('0x5d'),_0x65f6('0x5e'));_0x2fc20f[_0x65f6('0x5f')]=_0x4227f5['id'];return db['VoiceExtension'][_0x65f6('0x4c')](_0x2fc20f,{'transaction':_0x3e0d8b})[_0x65f6('0x27')](function(_0x3974ef){var _0x3c23e3=_0x3974ef[_0x65f6('0x24')]({'plain':!![]});var _0x334fa1=_['map'](addVoicePrefixExtensions(_0x4227f5,_0xe5fc65),function(_0x4ee8bd){_0x4ee8bd['VoiceExtensionId']=_0x3c23e3['id'];_0x4ee8bd[_0x65f6('0x5f')]=_0x4227f5['id'];return _0x4ee8bd;});return db[_0x65f6('0x4f')][_0x65f6('0x60')](_0x334fa1,{'transaction':_0x3e0d8b})[_0x65f6('0x27')](function(_0xab6f0){if(!_0xab6f0){return _0x2923ff(_0x65f6('0x61'));}else{return _0x553ff0(_0xab6f0);}})['catch'](function(_0xfbfebc){return _0x2923ff(_0xfbfebc);});});;});};function addVoicePrefixExtensions(_0x1d1532,_0x54b569){var _0x225aeb=[];var _0x39c244=formatPrefixName(_0x1d1532[_0x65f6('0x62')]);_0x225aeb['push'](new Extension(_0x39c244,0x2,_0x65f6('0x63'),_0x65f6('0x64')+_0x1d1532['name']));if(_0x1d1532[_0x65f6('0x65')]){_0x225aeb[_0x65f6('0x66')](new Extension(_0x39c244,0x3,_0x65f6('0x63'),_0x65f6('0x67')+_0x1d1532[_0x65f6('0x65')]));}else{_0x225aeb[_0x65f6('0x66')](new Extension(_0x39c244,0x3,_0x65f6('0x5d'),'No\x20callerid\x20available'));}_0x225aeb['push'](new Extension(_0x39c244,0x4,_0x65f6('0x68'),_0x54b569[_0x65f6('0x56')]+','+'${EXTEN:'+(0x8+_0x1d1532[_0x65f6('0x30')]['length'])+'}'+','+0x1));return _0x225aeb;}function formatPrefixName(_0x3a483b){var _0x4e0450='_';for(var _0x440df1=0x0;_0x440df1<_0x3a483b[_0x65f6('0x37')];_0x440df1++){if(_0x3a483b[_0x65f6('0x69')](_0x440df1)=='-'){_0x4e0450+=_0x3a483b[_0x65f6('0x69')](_0x440df1);}else{_0x4e0450+='['+_0x3a483b[_0x65f6('0x69')](_0x440df1)+']';}}_0x4e0450+='.';return _0x4e0450;}exports[_0x65f6('0x23')]=function(_0x1aaf75,_0x1cc66a,_0x2405a7){var _0x4b7ecd=_0x1aaf75['body'];_0x4b7ecd[_0x65f6('0x62')]=_0x65f6('0x6a')+_0x4b7ecd[_0x65f6('0x30')]+'-';return db['sequelize']['transaction'](function(_0x2dbec2){return db[_0x65f6('0x42')][_0x65f6('0x23')](_0x4b7ecd,{'where':{'id':_0x4b7ecd['id']},'transaction':_0x2dbec2})[_0x65f6('0x27')](function(){return db[_0x65f6('0x4f')][_0x65f6('0x4a')]({'where':{'VoicePrefixId':_0x4b7ecd['id']},'transaction':_0x2dbec2})['then'](function(){return db['VoiceExtension'][_0x65f6('0x49')]({'where':{'id':_0x4b7ecd[_0x65f6('0x50')]},'raw':!![]})['then'](function(_0x219bf8){return createVoicePrefixExtensions(_0x4b7ecd,_0x219bf8,_0x2dbec2);});});});})['then'](function(){return db[_0x65f6('0x42')][_0x65f6('0x6b')](_0x4b7ecd['id']);})[_0x65f6('0x27')](respondWithResult(_0x1cc66a,null))[_0x65f6('0x48')](handleError(_0x1cc66a,null));};exports['addAgents']=function(_0x34ab7b,_0x351d43,_0x11411c){return db['VoicePrefix']['find']({'where':{'id':_0x34ab7b[_0x65f6('0x6c')]['id']}})['then'](handleEntityNotFound(_0x351d43,null))[_0x65f6('0x27')](function(_0xf6de){if(_0xf6de){return _0xf6de[_0x65f6('0x6d')](_0x34ab7b[_0x65f6('0x4e')]['ids'],_['omit'](_0x34ab7b['body'],[_0x65f6('0x6e'),'id'])||{})[_0x65f6('0x6f')](function(_0x161fb2){for(var _0x57464e=0x0;_0x57464e<_0x34ab7b[_0x65f6('0x4e')][_0x65f6('0x6e')][_0x65f6('0x37')];_0x57464e+=0x1){socket['emit'](_0x65f6('0x70'),{'UserId':Number(_0x34ab7b[_0x65f6('0x4e')]['ids'][_0x57464e]),'VoicePrefixId':Number(_0x34ab7b[_0x65f6('0x6c')]['id'])});}return _0x161fb2;});}})[_0x65f6('0x27')](respondWithResult(_0x351d43,null))['catch'](handleError(_0x351d43,null));};exports[_0x65f6('0x71')]=function(_0x5ef825,_0xe8449b,_0x55ea91){return db[_0x65f6('0x42')][_0x65f6('0x49')]({'where':{'id':_0x5ef825['params']['id']}})[_0x65f6('0x27')](handleEntityNotFound(_0xe8449b,null))[_0x65f6('0x27')](function(_0x2a700b){if(_0x2a700b){return _0x2a700b[_0x65f6('0x71')](_0x5ef825[_0x65f6('0x31')][_0x65f6('0x6e')])[_0x65f6('0x27')](function(){if(_[_0x65f6('0x72')](_0x5ef825[_0x65f6('0x31')][_0x65f6('0x6e')])){for(var _0x288eb0=0x0;_0x288eb0<_0x5ef825['query'][_0x65f6('0x6e')][_0x65f6('0x37')];_0x288eb0+=0x1){socket[_0x65f6('0x73')](_0x65f6('0x74'),{'UserId':Number(_0x5ef825['query'][_0x65f6('0x6e')][_0x288eb0]),'VoicePrefixId':Number(_0x5ef825[_0x65f6('0x6c')]['id'])});}}else{socket['emit'](_0x65f6('0x74'),{'UserId':Number(_0x5ef825['query'][_0x65f6('0x6e')]),'VoicePrefixId':Number(_0x5ef825['params']['id'])});}});}})[_0x65f6('0x27')](respondWithStatusCode(_0xe8449b,null))[_0x65f6('0x48')](handleError(_0xe8449b,null));};exports['getAgents']=function(_0x4946c7,_0xa4a742,_0x413c21){var _0x5158c9={};var _0x2d86c8={};var _0x3b3bd5;var _0x73d359;return db['VoicePrefix'][_0x65f6('0x75')]({'where':{'id':_0x4946c7[_0x65f6('0x6c')]['id']}})['then'](handleEntityNotFound(_0xa4a742,null))[_0x65f6('0x27')](function(_0x504b39){if(_0x504b39){_0x3b3bd5=_0x504b39;_0x2d86c8[_0x65f6('0x2f')]=_['keys'](db['User'][_0x65f6('0x2c')]);_0x2d86c8[_0x65f6('0x31')]=_[_0x65f6('0x32')](_0x4946c7[_0x65f6('0x31')]);_0x2d86c8[_0x65f6('0x33')]=_[_0x65f6('0x34')](_0x2d86c8[_0x65f6('0x2f')],_0x2d86c8[_0x65f6('0x31')]);_0x5158c9['attributes']=_['intersection'](_0x2d86c8[_0x65f6('0x2f')],qs['fields'](_0x4946c7[_0x65f6('0x31')][_0x65f6('0x35')]));_0x5158c9[_0x65f6('0x36')]=_0x5158c9[_0x65f6('0x36')][_0x65f6('0x37')]?_0x5158c9['attributes']:_0x2d86c8[_0x65f6('0x2f')];_0x5158c9[_0x65f6('0x39')]=qs[_0x65f6('0x3a')](_0x4946c7['query'][_0x65f6('0x3a')]);_0x5158c9[_0x65f6('0x3b')]=qs[_0x65f6('0x33')](_[_0x65f6('0x3c')](_0x4946c7[_0x65f6('0x31')],_0x2d86c8[_0x65f6('0x33')]));if(_0x4946c7['query']['filter']){_0x5158c9[_0x65f6('0x3b')]=_[_0x65f6('0x3e')](_0x5158c9[_0x65f6('0x3b')],{'$or':_[_0x65f6('0x2b')](_0x5158c9['attributes'],function(_0x4bda86){var _0x336076={};_0x336076[_0x4bda86]={'$like':'%'+_0x4946c7[_0x65f6('0x31')][_0x65f6('0x3d')]+'%'};return _0x336076;})});}_0x5158c9=_[_0x65f6('0x3e')]({},_0x5158c9,_0x4946c7[_0x65f6('0x41')]);return _0x3b3bd5[_0x65f6('0x76')](_0x5158c9);}})['then'](function(_0x4d607a){if(_0x4d607a){_0x73d359=_0x4d607a['length'];if(!_0x4946c7[_0x65f6('0x31')][_0x65f6('0x77')](_0x65f6('0x38'))){_0x5158c9[_0x65f6('0x1f')]=qs['limit'](_0x4946c7['query'][_0x65f6('0x1f')]);_0x5158c9[_0x65f6('0x1d')]=qs['offset'](_0x4946c7[_0x65f6('0x31')]['offset']);}return _0x3b3bd5[_0x65f6('0x76')](_0x5158c9);}})['then'](function(_0x3a30ed){if(_0x3a30ed){return _0x3a30ed?{'count':_0x73d359,'rows':_0x3a30ed}:null;}})[_0x65f6('0x27')](respondWithResult(_0xa4a742,null))['catch'](handleError(_0xa4a742,null));};exports[_0x65f6('0x78')]=function(_0x330e18,_0x13c03b,_0x9f6e0c){var _0xec6a56={};var _0x144db0={};var _0x584ea4;var _0x45b3e6;return db['VoicePrefix'][_0x65f6('0x75')]({'where':{'id':_0x330e18['params']['id']}})[_0x65f6('0x27')](handleEntityNotFound(_0x13c03b,null))[_0x65f6('0x27')](function(_0xdf396c){if(_0xdf396c){_0x584ea4=_0xdf396c;_0x144db0[_0x65f6('0x2f')]=_['keys'](db[_0x65f6('0x79')][_0x65f6('0x2c')]);_0x144db0[_0x65f6('0x31')]=_['keys'](_0x330e18['query']);_0x144db0[_0x65f6('0x33')]=_[_0x65f6('0x34')](_0x144db0['model'],_0x144db0[_0x65f6('0x31')]);_0xec6a56[_0x65f6('0x36')]=_[_0x65f6('0x34')](_0x144db0['model'],qs[_0x65f6('0x35')](_0x330e18[_0x65f6('0x31')]['fields']));_0xec6a56[_0x65f6('0x36')]=_0xec6a56[_0x65f6('0x36')][_0x65f6('0x37')]?_0xec6a56['attributes']:_0x144db0[_0x65f6('0x2f')];_0xec6a56[_0x65f6('0x39')]=qs[_0x65f6('0x3a')](_0x330e18['query'][_0x65f6('0x3a')]);_0xec6a56['where']=qs[_0x65f6('0x33')](_[_0x65f6('0x3c')](_0x330e18[_0x65f6('0x31')],_0x144db0[_0x65f6('0x33')]));if(_0x330e18[_0x65f6('0x31')][_0x65f6('0x3d')]){_0xec6a56['where']=_[_0x65f6('0x3e')](_0xec6a56[_0x65f6('0x3b')],{'$or':_[_0x65f6('0x2b')](_0xec6a56[_0x65f6('0x36')],function(_0x207d15){var _0x59407d={};_0x59407d[_0x207d15]={'$like':'%'+_0x330e18['query']['filter']+'%'};return _0x59407d;})});}_0xec6a56=_[_0x65f6('0x3e')]({},_0xec6a56,_0x330e18[_0x65f6('0x41')]);return _0x584ea4[_0x65f6('0x78')](_0xec6a56);}})['then'](function(_0x151cee){if(_0x151cee){_0x45b3e6=_0x151cee['length'];if(!_0x330e18['query'][_0x65f6('0x77')](_0x65f6('0x38'))){_0xec6a56['limit']=qs[_0x65f6('0x1f')](_0x330e18[_0x65f6('0x31')][_0x65f6('0x1f')]);_0xec6a56[_0x65f6('0x1d')]=qs[_0x65f6('0x1d')](_0x330e18[_0x65f6('0x31')][_0x65f6('0x1d')]);}return _0x584ea4[_0x65f6('0x78')](_0xec6a56);}})[_0x65f6('0x27')](function(_0x350641){if(_0x350641){return _0x350641?{'count':_0x45b3e6,'rows':_0x350641}:null;}})[_0x65f6('0x27')](respondWithResult(_0x13c03b,null))[_0x65f6('0x48')](handleError(_0x13c03b,null));};exports['addTeams']=function(_0x349af7,_0x52dc75,_0x55355f){var _0x24d524=_0x349af7[_0x65f6('0x4e')][_0x65f6('0x6e')];var _0x3727f9;return db['Team'][_0x65f6('0x46')]({'where':{'id':_0x24d524},'attributes':['id'],'include':[{'model':db['User'],'as':'Agents','attributes':['id',_0x65f6('0x30'),_0x65f6('0x7a'),_0x65f6('0x7b'),_0x65f6('0x7c')],'raw':!![]}]})[_0x65f6('0x27')](function(_0xcdfebe){if(_0xcdfebe){_0x3727f9=_0xcdfebe;var _0x5a33cf=_[_0x65f6('0x7d')](_0xcdfebe,function(_0x56bf49){var _0x1ef2a0=_0x56bf49[_0x65f6('0x24')]({'plain':!![]});return _0x1ef2a0[_0x65f6('0x7e')];});return db['VoicePrefix'][_0x65f6('0x49')]({'where':{'id':_0x349af7['params']['id']}})['then'](function(_0x377d5e){return db[_0x65f6('0x7f')][_0x65f6('0x4d')](function(_0xf364a9){return _0x377d5e[_0x65f6('0x80')](_0x24d524,{'transaction':_0xf364a9})['then'](function(){return BPromise[_0x65f6('0x81')](_0x3727f9,function(_0x400633){return db[_0x65f6('0x82')][_0x65f6('0x83')]({'TeamId':_0x400633['id'],'VoicePrefixId':_0x349af7['params']['id']},{'transaction':_0xf364a9});});})[_0x65f6('0x27')](function(){return BPromise[_0x65f6('0x81')](_0x5a33cf,function(_0x344163){return db[_0x65f6('0x84')][_0x65f6('0x85')]({'where':{'UserId':_0x344163['id'],'VoicePrefixId':_0x349af7[_0x65f6('0x6c')]['id']},'transaction':_0xf364a9});});})[_0x65f6('0x27')](function(){_0x5a33cf[_0x65f6('0x86')](function(_0x558410){socket[_0x65f6('0x73')](_0x65f6('0x70'),{'UserId':_0x558410['id'],'VoicePrefixId':_0x377d5e['id']});});});});});}})[_0x65f6('0x27')](respondWithStatusCode(_0x52dc75,null))[_0x65f6('0x48')](handleError(_0x52dc75,null));};exports[_0x65f6('0x87')]=function(_0x4171a1,_0x57667e,_0x3fd6ee){return db[_0x65f6('0x79')]['findAll']({'where':{'id':_0x4171a1[_0x65f6('0x31')]['ids']},'attributes':['id'],'include':[{'model':db[_0x65f6('0x88')],'as':_0x65f6('0x7e'),'attributes':['id'],'raw':!![]}]})[_0x65f6('0x27')](handleEntityNotFound(_0x57667e,null))[_0x65f6('0x27')](function(_0x2177f1){var _0x55c9bd=_[_0x65f6('0x2b')](_0x2177f1,'id');var _0x395642=[];var _0x2394eb=[];var _0x31870f=squel[_0x65f6('0x89')]();_0x31870f['field']('tq.TeamId')[_0x65f6('0x8a')](_0x65f6('0x8b'),'tq')[_0x65f6('0x8c')](_0x65f6('0x8d'),'ut','ut.TeamId\x20=\x20tq.TeamId')['where']('VoicePrefixId\x20=\x20?',_0x4171a1[_0x65f6('0x6c')]['id']);for(var _0x3b0a97=0x0;_0x3b0a97<_0x2177f1[_0x65f6('0x37')];_0x3b0a97+=0x1){let _0x50e159=_0x2177f1[_0x3b0a97];for(var _0x12730b=0x0;_0x12730b<_0x50e159[_0x65f6('0x7e')][_0x65f6('0x37')];_0x12730b+=0x1){let _0x18c6a8=_0x50e159[_0x65f6('0x7e')][_0x12730b];var _0x54e258=_0x31870f[_0x65f6('0x8e')]();_0x54e258[_0x65f6('0x3b')]('ut.UserId\x20=\x20?',_0x18c6a8['id']);_0x2394eb['push'](db[_0x65f6('0x7f')][_0x65f6('0x31')](_0x54e258[_0x65f6('0x8f')](),{'type':db[_0x65f6('0x7f')][_0x65f6('0x90')]['SELECT']})[_0x65f6('0x27')](function(_0x4b080a){if(_0x4b080a[_0x65f6('0x37')]===0x1){return _0x18c6a8['id'];}else{var _0x5d181a=_[_0x65f6('0x91')](_['map'](_0x4b080a,_0x65f6('0x92')),function(_0x48a9df){return _[_0x65f6('0x93')](_0x55c9bd,_0x48a9df);});if(_0x5d181a){return _0x18c6a8['id'];}}}));}}return BPromise[_0x65f6('0x94')](_0x2394eb)['then'](function(_0x4f2f43){_0x395642=_(_0x395642)[_0x65f6('0x95')](_0x4f2f43)[_0x65f6('0x96')]()[_0x65f6('0x97')]();return db[_0x65f6('0x42')][_0x65f6('0x49')]({'where':{'id':_0x4171a1[_0x65f6('0x6c')]['id']}})[_0x65f6('0x27')](function(_0x1b5957){return db[_0x65f6('0x7f')][_0x65f6('0x4d')](function(_0x4a90e3){return _0x1b5957[_0x65f6('0x87')](_0x4171a1[_0x65f6('0x31')][_0x65f6('0x6e')],{'transaction':_0x4a90e3})[_0x65f6('0x27')](function(){if(!_[_0x65f6('0x98')](_0x395642)){return _0x1b5957[_0x65f6('0x71')](_0x395642,{'transaction':_0x4a90e3});}})['then'](function(){_0x395642[_0x65f6('0x86')](function(_0x91d7bf){socket[_0x65f6('0x73')](_0x65f6('0x74'),{'UserId':_0x91d7bf,'VoicePrefixId':_0x1b5957['id']});});});});});});})[_0x65f6('0x27')](respondWithStatusCode(_0x57667e,null))[_0x65f6('0x48')](handleError(_0x57667e,null));};
\ No newline at end of file
index ec95d0b..ffcf82a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9c03=['../../mysqldb','VoicePrefix','setMaxListeners','save','update','remove','emit','hasOwnProperty','exports','events'];(function(_0x3c5f8d,_0x39891f){var _0x3b7beb=function(_0x44d6c9){while(--_0x44d6c9){_0x3c5f8d['push'](_0x3c5f8d['shift']());}};_0x3b7beb(++_0x39891f);}(_0x9c03,0x81));var _0x39c0=function(_0x4a9fb1,_0x273043){_0x4a9fb1=_0x4a9fb1-0x0;var _0x348672=_0x9c03[_0x4a9fb1];return _0x348672;};'use strict';var EventEmitter=require(_0x39c0('0x0'));var VoicePrefix=require(_0x39c0('0x1'))['db'][_0x39c0('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x39c0('0x3')](0x0);var events={'afterCreate':_0x39c0('0x4'),'afterUpdate':_0x39c0('0x5'),'afterDestroy':_0x39c0('0x6')};function emitEvent(_0x24d835){return function(_0x202978,_0x66d330,_0x1bbd4a){VoicePrefixEvents[_0x39c0('0x7')](_0x24d835+':'+_0x202978['id'],_0x202978);VoicePrefixEvents[_0x39c0('0x7')](_0x24d835,_0x202978);_0x1bbd4a(null);};}for(var e in events){if(events[_0x39c0('0x8')](e)){var event=events[e];VoicePrefix['hook'](e,emitEvent(event));}}module[_0x39c0('0x9')]=VoicePrefixEvents;
\ No newline at end of file
+var _0xac2e=['save','update','emit','hook','../../mysqldb','VoicePrefix','setMaxListeners'];(function(_0x5b47ed,_0x30abf4){var _0x5cae85=function(_0x423031){while(--_0x423031){_0x5b47ed['push'](_0x5b47ed['shift']());}};_0x5cae85(++_0x30abf4);}(_0xac2e,0x169));var _0xeac2=function(_0x2a4bb1,_0x8d5834){_0x2a4bb1=_0x2a4bb1-0x0;var _0x5c71aa=_0xac2e[_0x2a4bb1];return _0x5c71aa;};'use strict';var EventEmitter=require('events');var VoicePrefix=require(_0xeac2('0x0'))['db'][_0xeac2('0x1')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0xeac2('0x2')](0x0);var events={'afterCreate':_0xeac2('0x3'),'afterUpdate':_0xeac2('0x4'),'afterDestroy':'remove'};function emitEvent(_0x26dfcf){return function(_0x63a94,_0xbce388,_0x1e8441){VoicePrefixEvents[_0xeac2('0x5')](_0x26dfcf+':'+_0x63a94['id'],_0x63a94);VoicePrefixEvents[_0xeac2('0x5')](_0x26dfcf,_0x63a94);_0x1e8441(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoicePrefix[_0xeac2('0x6')](e,emitEvent(event));}}module['exports']=VoicePrefixEvents;
\ No newline at end of file
index fbd276d..308660b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa0e6=['../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./voicePrefix.attributes','exports','define','VoicePrefix','voice_prefixes','lodash','util'];(function(_0x18ab2a,_0x4debcd){var _0x16dcee=function(_0x10107a){while(--_0x10107a){_0x18ab2a['push'](_0x18ab2a['shift']());}};_0x16dcee(++_0x4debcd);}(_0xa0e6,0x14e));var _0x6a0e=function(_0x4d2390,_0x4b72b1){_0x4d2390=_0x4d2390-0x0;var _0x24b4aa=_0xa0e6[_0x4d2390];return _0x24b4aa;};'use strict';var _=require(_0x6a0e('0x0'));var util=require(_0x6a0e('0x1'));var logger=require(_0x6a0e('0x2'))(_0x6a0e('0x3'));var moment=require(_0x6a0e('0x4'));var BPromise=require(_0x6a0e('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x6a0e('0x6'));var rimraf=require(_0x6a0e('0x7'));var config=require(_0x6a0e('0x8'));var attributes=require(_0x6a0e('0x9'));module[_0x6a0e('0xa')]=function(_0x54305a,_0x57660e){return _0x54305a[_0x6a0e('0xb')](_0x6a0e('0xc'),attributes,{'tableName':_0x6a0e('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xb324=['exports','VoicePrefix','lodash','api','moment','bluebird','path','rimraf','../../config/environment'];(function(_0x434f2e,_0x68493e){var _0x76c0b9=function(_0x7db698){while(--_0x7db698){_0x434f2e['push'](_0x434f2e['shift']());}};_0x76c0b9(++_0x68493e);}(_0xb324,0x1b2));var _0x4b32=function(_0x15ebd6,_0x4d4b9a){_0x15ebd6=_0x15ebd6-0x0;var _0x219a9f=_0xb324[_0x15ebd6];return _0x219a9f;};'use strict';var _=require(_0x4b32('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x4b32('0x1'));var moment=require(_0x4b32('0x2'));var BPromise=require(_0x4b32('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x4b32('0x4'));var rimraf=require(_0x4b32('0x5'));var config=require(_0x4b32('0x6'));var attributes=require('./voicePrefix.attributes');module[_0x4b32('0x7')]=function(_0x23502f,_0x4391fe){return _0x23502f['define'](_0x4b32('0x8'),attributes,{'tableName':'voice_prefixes','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index f6a05bd..5011c4e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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(_0xc1f074,_0x5d68e3){var _0x51cd4d=function(_0x349fc1){while(--_0x349fc1){_0xc1f074['push'](_0xc1f074['shift']());}};_0x51cd4d(++_0x5d68e3);}(_0x5430,0x10c));var _0x0543=function(_0x5f4655,_0x5923d0){_0x5f4655=_0x5f4655-0x0;var _0x1293d2=_0x5430[_0x5f4655];return _0x1293d2;};'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
+var _0x042a=['randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','defaults','redis','socket.io-emitter','./voicePrefix.socket','register','request','VoicePrefix,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','result','catch','lodash','moment','bluebird'];(function(_0x355111,_0x3b0eb1){var _0x512763=function(_0x5085e3){while(--_0x5085e3){_0x355111['push'](_0x355111['shift']());}};_0x512763(++_0x3b0eb1);}(_0x042a,0x1d9));var _0xa042=function(_0x1629db,_0x3af456){_0x1629db=_0x1629db-0x0;var _0x57bb60=_0x042a[_0x1629db];return _0x57bb60;};'use strict';var _=require(_0xa042('0x0'));var util=require('util');var moment=require(_0xa042('0x1'));var BPromise=require(_0xa042('0x2'));var rs=require(_0xa042('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa042('0x4'))['db'];var utils=require(_0xa042('0x5'));var logger=require(_0xa042('0x6'))(_0xa042('0x7'));var config=require(_0xa042('0x8'));var jayson=require(_0xa042('0x9'));var client=jayson[_0xa042('0xa')][_0xa042('0xb')]({'port':0x232a});config['redis']=_[_0xa042('0xc')](config[_0xa042('0xd')],{'host':'localhost','port':0x18eb});var socket=require(_0xa042('0xe'))(new Redis(config['redis']));require(_0xa042('0xf'))[_0xa042('0x10')](socket);function respondWithRpcPromise(_0x15426e,_0x2f195a,_0x172c37){return new BPromise(function(_0x2146f3,_0x550ee2){return client[_0xa042('0x11')](_0x15426e,_0x172c37)['then'](function(_0x411e3c){logger['info'](_0xa042('0x12'),_0x2f195a,_0xa042('0x13'));logger[_0xa042('0x14')]('VoicePrefix,\x20%s,\x20%s,\x20%s',_0x2f195a,_0xa042('0x13'),JSON[_0xa042('0x15')](_0x411e3c));if(_0x411e3c[_0xa042('0x16')]){if(_0x411e3c['error'][_0xa042('0x17')]===0x1f4){logger[_0xa042('0x16')](_0xa042('0x12'),_0x2f195a,_0x411e3c[_0xa042('0x16')]['message']);return _0x550ee2(_0x411e3c[_0xa042('0x16')][_0xa042('0x18')]);}logger[_0xa042('0x16')](_0xa042('0x12'),_0x2f195a,_0x411e3c[_0xa042('0x16')][_0xa042('0x18')]);return _0x2146f3(_0x411e3c['error']['message']);}else{logger[_0xa042('0x19')](_0xa042('0x12'),_0x2f195a,_0xa042('0x13'));_0x2146f3(_0x411e3c[_0xa042('0x1a')][_0xa042('0x18')]);}})[_0xa042('0x1b')](function(_0x42f2e4){logger['error']('VoicePrefix,\x20%s,\x20%s',_0x2f195a,_0x42f2e4);_0x550ee2(_0x42f2e4);});});}
\ No newline at end of file
index 0d85fac..82cf9f5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8ec7=['voicePrefix:','./voicePrefix.events','save','update','emit','removeListener','register','length'];(function(_0x2168f,_0x389196){var _0x12f192=function(_0x4318ef){while(--_0x4318ef){_0x2168f['push'](_0x2168f['shift']());}};_0x12f192(++_0x389196);}(_0x8ec7,0x1f1));var _0x78ec=function(_0xd7b0a4,_0x53c7d3){_0xd7b0a4=_0xd7b0a4-0x0;var _0x184e9e=_0x8ec7[_0xd7b0a4];return _0x184e9e;};'use strict';var VoicePrefixEvents=require(_0x78ec('0x0'));var events=[_0x78ec('0x1'),'remove',_0x78ec('0x2')];function createListener(_0x53115d,_0x47d4c9){return function(_0x1271a1){_0x47d4c9[_0x78ec('0x3')](_0x53115d,_0x1271a1);};}function removeListener(_0x5d3971,_0x207477){return function(){VoicePrefixEvents[_0x78ec('0x4')](_0x5d3971,_0x207477);};}exports[_0x78ec('0x5')]=function(_0x1f4732){for(var _0xef2f90=0x0,_0x5d2780=events[_0x78ec('0x6')];_0xef2f90<_0x5d2780;_0xef2f90++){var _0x4ca55e=events[_0xef2f90];var _0x372108=createListener(_0x78ec('0x7')+_0x4ca55e,_0x1f4732);VoicePrefixEvents['on'](_0x4ca55e,_0x372108);}};
\ No newline at end of file
+var _0x47fd=['remove','update','emit','register','./voicePrefix.events','save'];(function(_0x35d9c8,_0x267f41){var _0x24cafc=function(_0x259757){while(--_0x259757){_0x35d9c8['push'](_0x35d9c8['shift']());}};_0x24cafc(++_0x267f41);}(_0x47fd,0x13c));var _0xd47f=function(_0x323c60,_0x219b72){_0x323c60=_0x323c60-0x0;var _0x103f23=_0x47fd[_0x323c60];return _0x103f23;};'use strict';var VoicePrefixEvents=require(_0xd47f('0x0'));var events=[_0xd47f('0x1'),_0xd47f('0x2'),_0xd47f('0x3')];function createListener(_0x3cc8ea,_0x2eabd0){return function(_0x31b0da){_0x2eabd0[_0xd47f('0x4')](_0x3cc8ea,_0x31b0da);};}function removeListener(_0x285b39,_0x1dfe62){return function(){VoicePrefixEvents['removeListener'](_0x285b39,_0x1dfe62);};}exports[_0xd47f('0x5')]=function(_0x138753){for(var _0x5d07ac=0x0,_0x11c1d4=events['length'];_0x5d07ac<_0x11c1d4;_0x5d07ac++){var _0x55433e=events[_0x5d07ac];var _0x38b07c=createListener('voicePrefix:'+_0x55433e,_0x138753);VoicePrefixEvents['on'](_0x55433e,_0x38b07c);}};
\ No newline at end of file
index 7ca35a7..17176c9 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(_0xab724d,_0x17c711){var _0x4804e4=function(_0x3031a3){while(--_0x3031a3){_0xab724d['push'](_0xab724d['shift']());}};_0x4804e4(++_0x17c711);}(_0xa9e0,0x123));var _0x0a9e=function(_0x433a86,_0x175b5c){_0x433a86=_0x433a86-0x0;var _0x23000c=_0xa9e0[_0x433a86];return _0x23000c;};'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 _0xb10b=['express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceQueue.controller','get','index','isAuthenticated','show','/:id/hoppers','getHoppers','/:id/hopper_histories','/:id/hopper_finals','getHopperBlacks','/:id/teams','getTeams','/:id/users','getAgents','/:id/members','getMembers','/:id/lists','/:id/blacklists','getBlackLists','post','create','/:id/clone','addTeams','addAgents','addLists','addBlackLists','put','/:id','update','delete','removeTeams','removeAgents','removeLists','removeBlackLists','exports','multer','path','connect-timeout'];(function(_0x3e32a8,_0x255953){var _0x2997b0=function(_0x2d564a){while(--_0x2d564a){_0x3e32a8['push'](_0x3e32a8['shift']());}};_0x2997b0(++_0x255953);}(_0xb10b,0x12a));var _0xbb10=function(_0x2f2cb6,_0x5f5576){_0x2f2cb6=_0x2f2cb6-0x0;var _0x33c4a7=_0xb10b[_0x2f2cb6];return _0x33c4a7;};'use strict';var multer=require(_0xbb10('0x0'));var util=require('util');var path=require(_0xbb10('0x1'));var timeout=require(_0xbb10('0x2'));var express=require(_0xbb10('0x3'));var router=express['Router']();var fs_extra=require(_0xbb10('0x4'));var auth=require(_0xbb10('0x5'));var interaction=require(_0xbb10('0x6'));var config=require(_0xbb10('0x7'));var controller=require(_0xbb10('0x8'));router[_0xbb10('0x9')]('/',auth['isAuthenticated'](),controller[_0xbb10('0xa')]);router[_0xbb10('0x9')]('/:id',auth[_0xbb10('0xb')](),controller[_0xbb10('0xc')]);router[_0xbb10('0x9')](_0xbb10('0xd'),auth[_0xbb10('0xb')](),controller[_0xbb10('0xe')]);router[_0xbb10('0x9')](_0xbb10('0xf'),auth['isAuthenticated'](),controller['getHopperHistories']);router[_0xbb10('0x9')](_0xbb10('0x10'),auth[_0xbb10('0xb')](),controller['getHopperFinals']);router[_0xbb10('0x9')]('/:id/hopper_black',auth[_0xbb10('0xb')](),controller[_0xbb10('0x11')]);router[_0xbb10('0x9')](_0xbb10('0x12'),auth[_0xbb10('0xb')](),controller[_0xbb10('0x13')]);router['get'](_0xbb10('0x14'),auth[_0xbb10('0xb')](),controller[_0xbb10('0x15')]);router[_0xbb10('0x9')](_0xbb10('0x16'),auth[_0xbb10('0xb')](),controller[_0xbb10('0x17')]);router[_0xbb10('0x9')](_0xbb10('0x18'),auth[_0xbb10('0xb')](),controller['getLists']);router[_0xbb10('0x9')](_0xbb10('0x19'),auth[_0xbb10('0xb')](),controller[_0xbb10('0x1a')]);router[_0xbb10('0x1b')]('/',auth[_0xbb10('0xb')](),controller[_0xbb10('0x1c')]);router[_0xbb10('0x1b')](_0xbb10('0x1d'),auth[_0xbb10('0xb')](),controller['clone']);router[_0xbb10('0x1b')](_0xbb10('0x12'),auth[_0xbb10('0xb')](),controller[_0xbb10('0x1e')]);router[_0xbb10('0x1b')](_0xbb10('0x14'),auth['isAuthenticated'](),controller[_0xbb10('0x1f')]);router[_0xbb10('0x1b')]('/:id/lists',auth['isAuthenticated'](),controller[_0xbb10('0x20')]);router[_0xbb10('0x1b')](_0xbb10('0x19'),auth[_0xbb10('0xb')](),controller[_0xbb10('0x21')]);router[_0xbb10('0x22')](_0xbb10('0x23'),auth[_0xbb10('0xb')](),controller[_0xbb10('0x24')]);router[_0xbb10('0x25')](_0xbb10('0x23'),auth[_0xbb10('0xb')](),controller['destroy']);router['delete']('/:id/teams',auth[_0xbb10('0xb')](),controller[_0xbb10('0x26')]);router[_0xbb10('0x25')]('/:id/users',auth[_0xbb10('0xb')](),controller[_0xbb10('0x27')]);router[_0xbb10('0x25')](_0xbb10('0x18'),auth[_0xbb10('0xb')](),controller[_0xbb10('0x28')]);router[_0xbb10('0x25')]('/:id/blacklists',auth[_0xbb10('0xb')](),controller[_0xbb10('0x29')]);module[_0xbb10('0x2a')]=router;
\ No newline at end of file
index 2cb21b6..3a53a68 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x87b1=['name','ENUM','inbound','outbound','default','leastrecent','fewestcalls','random','rrmemory','linear','wrandom','ringall','setDataValue','type','getDataValue','dialMethod','strategy','preview','booked','includes','INTEGER','yes','once','TEXT','periodic_announce','split','join','joinempty','leavewhenempty','BOOLEAN','acw','wrapuptime','progressive','power','Dial\x20Method.','UNSIGNED','Max\x209999\x20member\x20in\x20queue(min:1,\x20max:9999),\x200\x20means\x20unlimited.','FLOAT','Power\x20Level:\x20Calls\x20for\x20agents\x20(min:1,\x20max:10).','agentBusyFactor','dropRate','Only\x20for\x20predictive\x20method.','Predictive\x20Optimization\x20Percentage\x20(min:\x201,\x20max:\x2095)','Interval\x20Predictive\x20Minutes\x20(min:5\x20max:30)','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)','NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','07:00-22:00,*,*,*','always','never','onlyIfOpen','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Min\x20Word\x20Length','#AMD\x20Between\x20Words\x20Silence','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','#RecallMe\x20Timeout\x20(min:1)','ASC','DESC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)','NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Drop\x20Retry\x20(min:1,\x20max:999)','Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#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)','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','exports','STRING'];(function(_0xe1150a,_0x199580){var _0xf98e7c=function(_0x524855){while(--_0x524855){_0xe1150a['push'](_0xe1150a['shift']());}};_0xf98e7c(++_0x199580);}(_0x87b1,0x1ab));var _0x187b=function(_0x28a170,_0x3d378e){_0x28a170=_0x28a170-0x0;var _0x841074=_0x87b1[_0x28a170];return _0x841074;};'use strict';var Sequelize=require(_0x187b('0x0'));module[_0x187b('0x1')]={'name':{'type':Sequelize[_0x187b('0x2')],'allowNull':![],'unique':_0x187b('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize[_0x187b('0x4')](_0x187b('0x5'),_0x187b('0x6')),'allowNull':![],'defaultValue':_0x187b('0x5')},'musiconhold':{'type':Sequelize['STRING'],'defaultValue':_0x187b('0x7')},'announce':{'type':Sequelize[_0x187b('0x2')],'defaultValue':''},'strategy':{'type':Sequelize[_0x187b('0x4')]('rr','ringall',_0x187b('0x8'),_0x187b('0x9'),_0x187b('0xa'),_0x187b('0xb'),_0x187b('0xc'),_0x187b('0xd'),'rrordered'),'allowNull':![],'defaultValue':_0x187b('0xe'),'set':function(_0x4fd08d){this[_0x187b('0xf')]('strategy',_0x4fd08d?_0x4fd08d:_0x187b('0xb'));},'get':function(){var _0x39d8ac=this['getDataValue'](_0x187b('0x10'));var _0x1afcf2=this[_0x187b('0x11')](_0x187b('0x12'));var _0xd79a03=this[_0x187b('0x11')](_0x187b('0x13'));if(_0x39d8ac==='outbound'){if(_0x1afcf2===_0x187b('0x14')){return null;}if(_0x1afcf2===_0x187b('0x15')&&![_0x187b('0xb'),'roundrobin'][_0x187b('0x16')](_0xd79a03)){this['setDataValue'](_0x187b('0x13'),_0x187b('0xb'));}}return _0xd79a03;}},'servicelevel':{'type':Sequelize[_0x187b('0x17')](0xb),'defaultValue':0x0},'context':{'type':Sequelize['STRING'],'defaultValue':null},'penaltymemberslimit':{'type':Sequelize[_0x187b('0x17')](0xb)},'timeout':{'type':Sequelize[_0x187b('0x17')](0xb),'defaultValue':0xf},'retry':{'type':Sequelize[_0x187b('0x17')](0xb),'defaultValue':0x2},'timeoutpriority':{'type':Sequelize[_0x187b('0x2')]},'weight':{'type':Sequelize[_0x187b('0x17')](0xb),'allowNull':!![],'defaultValue':0x0},'wrapuptime':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'autofill':{'type':Sequelize[_0x187b('0x4')](_0x187b('0x18'),'no'),'defaultValue':_0x187b('0x18')},'autopause':{'type':Sequelize[_0x187b('0x4')](_0x187b('0x18'),'no','all'),'defaultValue':'no'},'autopausedelay':{'type':Sequelize[_0x187b('0x17')](0xb)},'autopausebusy':{'type':Sequelize['ENUM'](_0x187b('0x18'),'no'),'defaultValue':'no'},'autopauseunavail':{'type':Sequelize[_0x187b('0x4')](_0x187b('0x18'),'no'),'defaultValue':'no'},'maxlen':{'type':Sequelize[_0x187b('0x17')](0xb),'defaultValue':0x0},'setinterfacevar':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'no'},'setqueueentryvar':{'type':Sequelize['ENUM'](_0x187b('0x18'),'no'),'defautValue':'no'},'setqueuevar':{'type':Sequelize[_0x187b('0x4')](_0x187b('0x18'),'no'),'defaultValue':'no'},'eventmemberstatus':{'type':Sequelize[_0x187b('0x4')](_0x187b('0x18'),'no'),'defaultValue':'no'},'membermacro':{'type':Sequelize[_0x187b('0x2')],'allowNull':!![]},'membergosub':{'type':Sequelize[_0x187b('0x2')],'allowNull':!![]},'announce_frequency':{'type':Sequelize[_0x187b('0x17')](0xb),'defaultValue':0x0},'min_announce_frequency':{'type':Sequelize[_0x187b('0x17')](0xb),'defaultValue':0x0},'periodic_announce_frequency':{'type':Sequelize[_0x187b('0x17')](0xb),'defaultValue':0x0},'random_periodic_announce':{'type':Sequelize[_0x187b('0x4')]('yes','no'),'defaultValue':'no'},'relative_periodic_announce':{'type':Sequelize[_0x187b('0x4')](_0x187b('0x18'),'no'),'defaultValue':_0x187b('0x18')},'announce_holdtime':{'type':Sequelize[_0x187b('0x4')](_0x187b('0x18'),'no',_0x187b('0x19')),'defaultValue':'no'},'announce_position':{'type':Sequelize['STRING'],'defaultValue':'no'},'announce_to_first_user':{'type':Sequelize[_0x187b('0x4')]('yes','no')},'announce_position_limit':{'type':Sequelize[_0x187b('0x17')](0xb)},'announce_round_seconds':{'type':Sequelize[_0x187b('0x4')]('0','5','10','15','20','30'),'defaultValue':'0'},'monitor_format':{'type':Sequelize[_0x187b('0x2')],'defaultValue':''},'monitor_type':{'type':Sequelize[_0x187b('0x2')]},'queue_youarenext':{'type':Sequelize['STRING'],'defaultValue':null},'queue_thereare':{'type':Sequelize[_0x187b('0x2')],'defaultValue':null},'queue_callswaiting':{'type':Sequelize[_0x187b('0x2')],'defaultValue':null},'queue_holdtime':{'type':Sequelize[_0x187b('0x2')],'defaultValue':null},'queue_minute':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':null},'queue_minutes':{'type':Sequelize['STRING'],'defaultValue':null},'queue_seconds':{'type':Sequelize['STRING'],'defaultValue':null},'queue_thankyou':{'type':Sequelize[_0x187b('0x2')],'defaultValue':null},'queue_reporthold':{'type':Sequelize[_0x187b('0x2')]},'queue_quantity1':{'type':Sequelize[_0x187b('0x2')]},'queue_quantity2':{'type':Sequelize[_0x187b('0x2')]},'queue_periodic_announce':{'type':Sequelize[_0x187b('0x2')]},'queue_less_than':{'type':Sequelize['STRING']},'periodic_announce':{'type':Sequelize[_0x187b('0x1a')],'set':function(_0x1ae1f1){this['setDataValue'](_0x187b('0x1b'),_0x1ae1f1?_0x1ae1f1['join'](','):[]);},'get':function(){return this[_0x187b('0x11')](_0x187b('0x1b'))?this[_0x187b('0x11')](_0x187b('0x1b'))[_0x187b('0x1c')](','):[];}},'joinempty':{'type':Sequelize[_0x187b('0x2')],'defaultValue':'yes','set':function(_0x14a3c6){this[_0x187b('0xf')]('joinempty',_0x14a3c6?_0x14a3c6[_0x187b('0x1d')](','):undefined);},'get':function(){return this[_0x187b('0x11')](_0x187b('0x1e'))?this[_0x187b('0x11')](_0x187b('0x1e'))[_0x187b('0x1c')](','):undefined;}},'leavewhenempty':{'type':Sequelize[_0x187b('0x2')],'defaultValue':'no','set':function(_0x530a49){this[_0x187b('0xf')]('leavewhenempty',_0x530a49?_0x530a49[_0x187b('0x1d')](','):undefined);},'get':function(){return this['getDataValue'](_0x187b('0x1f'))?this[_0x187b('0x11')](_0x187b('0x1f'))[_0x187b('0x1c')](','):undefined;}},'reportholdtime':{'type':Sequelize[_0x187b('0x4')](_0x187b('0x18'),'no'),'defaultValue':'no'},'ringinuse':{'type':Sequelize[_0x187b('0x4')](_0x187b('0x18'),'no'),'defaultValue':'no'},'memberdelay':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'timeoutrestart':{'type':Sequelize[_0x187b('0x4')](_0x187b('0x18'),'no'),'defaultValue':'no'},'defaultrule':{'type':Sequelize[_0x187b('0x2')]},'description':{'type':Sequelize['STRING']},'acw':{'type':Sequelize[_0x187b('0x20')],'defaultValue':0x0,'set':function(_0x4e9179){this[_0x187b('0xf')](_0x187b('0x21'),_0x4e9179);if(_0x4e9179){if(this['getDataValue'](_0x187b('0x22'))<0x2){this[_0x187b('0xf')](_0x187b('0x22'),0x2);}}}},'acwTimeout':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0xa},'dialActive':{'type':Sequelize[_0x187b('0x20')],'defaultValue':0x0,'comment':'Active/Disactive\x20Campaign'},'dialMethod':{'type':Sequelize[_0x187b('0x4')](_0x187b('0x14'),_0x187b('0x23'),_0x187b('0x24'),'predictive',_0x187b('0x15')),'defaultValue':'progressive','comment':_0x187b('0x25')},'dialLimitChannel':{'type':Sequelize[_0x187b('0x17')](0x4)[_0x187b('0x26')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':'Max\x209999\x20channels,\x200\x20means\x20unlimited.'},'dialLimitQueue':{'type':Sequelize['INTEGER'](0x4)[_0x187b('0x26')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':_0x187b('0x27')},'dialPowerLevel':{'type':Sequelize[_0x187b('0x28')](0x2)[_0x187b('0x26')],'defaultValue':0x1,'validate':{'min':0x1,'max':0xa},'comment':_0x187b('0x29')},'dialPredictiveOptimization':{'type':Sequelize[_0x187b('0x4')](_0x187b('0x2a'),_0x187b('0x2b')),'defaultValue':_0x187b('0x2b'),'comment':_0x187b('0x2c')},'dialPredictiveOptimizationPercentage':{'type':Sequelize[_0x187b('0x28')](0x2)[_0x187b('0x26')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5f},'comment':_0x187b('0x2d')},'dialPredictiveInterval':{'type':Sequelize[_0x187b('0x17')](0x3)['UNSIGNED'],'defaultValue':0xa,'validate':{'min':0x5,'max':0x1e},'comment':_0x187b('0x2e')},'dialOriginateCallerIdName':{'type':Sequelize[_0x187b('0x2')]},'dialOriginateCallerIdNumber':{'type':Sequelize[_0x187b('0x2')]},'dialOriginateTimeout':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x187b('0x2f')},'dialQueueOptions':{'type':Sequelize[_0x187b('0x2')],'defaultValue':_0x187b('0x30'),'comment':_0x187b('0x31')},'dialQueueTimeout':{'type':Sequelize[_0x187b('0x17')](0x3)[_0x187b('0x26')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x187b('0x32')},'dialQueueProject':{'type':Sequelize[_0x187b('0x2')],'comment':_0x187b('0x33')},'dialCongestionMaxRetry':{'type':Sequelize[_0x187b('0x17')](0x3)[_0x187b('0x26')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x187b('0x34')},'dialCongestionRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x187b('0x26')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x187b('0x35')},'dialBusyMaxRetry':{'type':Sequelize[_0x187b('0x17')](0x3)[_0x187b('0x26')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x187b('0x36')},'dialBusyRetryFrequency':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialNoAnswerMaxRetry':{'type':Sequelize[_0x187b('0x17')](0x3)[_0x187b('0x26')],'defaultValue':0x3,'comment':'#NoAnswer\x20Retry\x20(min:1,\x20max:999)'},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x187b('0x17')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x187b('0x37')},'dialGlobalMaxRetry':{'type':Sequelize[_0x187b('0x17')](0x3)[_0x187b('0x26')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':'#Global\x20Max\x20Retry\x20(min:1,\x20max:999)'},'dialTimezone':{'type':Sequelize[_0x187b('0x2')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x187b('0x2')],'defaultValue':_0x187b('0x38')},'dialPrefix':{'type':Sequelize[_0x187b('0x2')],'defaultValue':null},'dialCheckDuplicateType':{'type':Sequelize[_0x187b('0x4')](_0x187b('0x39'),_0x187b('0x3a'),_0x187b('0x3b')),'defaultValue':_0x187b('0x39')},'dialAMDActive':{'type':Sequelize[_0x187b('0x20')],'defaultValue':0x0,'comment':'Active/Disactive\x20AMD'},'dialAMDInitialSilence':{'type':Sequelize[_0x187b('0x17')](0x9)[_0x187b('0x26')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x187b('0x3c')},'dialAMDGreeting':{'type':Sequelize[_0x187b('0x17')](0x9)[_0x187b('0x26')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x187b('0x3d')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0x187b('0x17')](0x9)['UNSIGNED'],'defaultValue':0x320,'validate':{'min':0x0},'comment':'#AMD\x20After\x20Greeting\x20Silence'},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0x187b('0x17')](0x9)[_0x187b('0x26')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x187b('0x3e')},'dialAMDMinWordLength':{'type':Sequelize[_0x187b('0x17')](0x9)['UNSIGNED'],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0x187b('0x3f')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x187b('0x17')](0x9)['UNSIGNED'],'defaultValue':0x32,'validate':{'min':0x0},'comment':_0x187b('0x40')},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0x187b('0x17')](0x9)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0x187b('0x41')},'dialAMDSilenceThreshold':{'type':Sequelize[_0x187b('0x17')](0x5)['UNSIGNED'],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0x187b('0x42')},'dialAMDMaximumWordLength':{'type':Sequelize[_0x187b('0x17')](0x9)[_0x187b('0x26')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x187b('0x43')},'dialRecallMeTimeout':{'type':Sequelize[_0x187b('0x17')](0x5)[_0x187b('0x26')],'validate':{'min':0x1},'defaultValue':0x1e,'comment':_0x187b('0x44')},'dialRecallInQueue':{'type':Sequelize[_0x187b('0x20')],'defaultValue':0x0,'comment':'Active/Disactive\x20Recall\x20In\x20Queue'},'dialOrderByScheduledAt':{'type':Sequelize[_0x187b('0x4')]('DESC',_0x187b('0x45')),'defaultValue':_0x187b('0x46')},'dialQueueProject2':{'type':Sequelize['STRING'],'comment':'AGI\x20queue\x20option\x20(use:\x20agi://127.0.0.1/square,<project_name>)'},'dialAgiAfterHangupClient':{'type':Sequelize[_0x187b('0x20')],'defaultValue':![]},'dialAgiAfterHangupAgent':{'type':Sequelize[_0x187b('0x20')],'defaultValue':![]},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize['INTEGER'](0x3)[_0x187b('0x26')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x187b('0x47')},'dialCutDigit':{'type':Sequelize[_0x187b('0x17')](0x3)[_0x187b('0x26')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':'Cut\x20Digit\x20(min:1,\x20max:15)'},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0x187b('0x17')](0x3)[_0x187b('0x26')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x187b('0x48')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0x187b('0x17')](0x5)[_0x187b('0x26')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x187b('0x49')},'dialDropMaxRetry':{'type':Sequelize[_0x187b('0x17')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x187b('0x4a')},'dialDropRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x187b('0x26')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x187b('0x4b')},'dialAbandonedMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x187b('0x26')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x187b('0x4c')},'dialAbandonedRetryFrequency':{'type':Sequelize[_0x187b('0x17')](0x5)[_0x187b('0x26')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x187b('0x4d')},'dialMachineMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x187b('0x26')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x187b('0x4e')},'dialMachineRetryFrequency':{'type':Sequelize[_0x187b('0x17')](0x5)[_0x187b('0x26')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x187b('0x4f')},'dialAgentRejectMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x187b('0x26')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x187b('0x50')},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0x187b('0x17')](0x5)[_0x187b('0x26')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x187b('0x51')},'mandatoryDispositionPauseId':{'type':Sequelize[_0x187b('0x17')],'allowNull':!![],'comment':_0x187b('0x52')},'mandatoryDisposition':{'type':Sequelize[_0x187b('0x20')],'defaultValue':![],'comment':_0x187b('0x53'),'set':function(_0x2e1e17){if(!_0x2e1e17)this[_0x187b('0xf')](_0x187b('0x54'),null);this[_0x187b('0xf')](_0x187b('0x55'),_0x2e1e17);}},'dialPredictiveIntervalMaxThreshold':{'type':Sequelize[_0x187b('0x17')](0x3)[_0x187b('0x26')],'defaultValue':0x14,'validate':{'min':0x1,'max':0x64}},'dialPredictiveIntervalMinThreshold':{'type':Sequelize[_0x187b('0x17')](0x3)[_0x187b('0x26')],'defaultValue':0xa,'validate':{'min':0x1,'max':0x64}},'dialPreviewAutoRecallMe':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'callAdditionalPhoneAfterMin':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'defaultValue':0x4},'dialPreviewRecallmeReminder':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}};
\ No newline at end of file
+var _0x41a7=['rrordered','strategy','getDataValue','dialMethod','outbound','preview','booked','roundrobin','INTEGER','yes','all','once','periodic_announce','split','setDataValue','joinempty','join','leavewhenempty','BOOLEAN','acw','wrapuptime','Active/Disactive\x20Campaign','progressive','predictive','Dial\x20Method.','Max\x209999\x20channels,\x200\x20means\x20unlimited.','UNSIGNED','FLOAT','Power\x20Level:\x20Calls\x20for\x20agents\x20(min:1,\x20max:10).','agentBusyFactor','dropRate','Only\x20for\x20predictive\x20method.','Interval\x20Predictive\x20Minutes\x20(min:5\x20max:30)','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)','NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Global\x20Max\x20Retry\x20(min:1,\x20max:999)','07:00-22:00,*,*,*','onlyIfOpen','always','Active/Disactive\x20AMD','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Min\x20Word\x20Length','#AMD\x20Between\x20Words\x20Silence','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','ASC','DESC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','Cut\x20Digit\x20(min:1,\x20max:15)','#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)','NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Drop\x20Retry\x20(min:1,\x20max:999)','Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#AgentReject\x20Retry\x20(min:1,\x20max:999)','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','sequelize','exports','name','inbound','STRING','default','ENUM','ringall','leastrecent','fewestcalls','random','rrmemory','linear'];(function(_0xdec73b,_0x1790a7){var _0x169f7d=function(_0xf15fd4){while(--_0xf15fd4){_0xdec73b['push'](_0xdec73b['shift']());}};_0x169f7d(++_0x1790a7);}(_0x41a7,0x143));var _0x741a=function(_0x3d0d29,_0x2e1f54){_0x3d0d29=_0x3d0d29-0x0;var _0x2d65c7=_0x41a7[_0x3d0d29];return _0x2d65c7;};'use strict';var Sequelize=require(_0x741a('0x0'));module[_0x741a('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x741a('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize['ENUM'](_0x741a('0x3'),'outbound'),'allowNull':![],'defaultValue':'inbound'},'musiconhold':{'type':Sequelize[_0x741a('0x4')],'defaultValue':_0x741a('0x5')},'announce':{'type':Sequelize['STRING'],'defaultValue':''},'strategy':{'type':Sequelize[_0x741a('0x6')]('rr',_0x741a('0x7'),_0x741a('0x8'),_0x741a('0x9'),_0x741a('0xa'),_0x741a('0xb'),_0x741a('0xc'),'wrandom',_0x741a('0xd')),'allowNull':![],'defaultValue':_0x741a('0x7'),'set':function(_0x3a037c){this['setDataValue'](_0x741a('0xe'),_0x3a037c?_0x3a037c:_0x741a('0xb'));},'get':function(){var _0x26d6bf=this[_0x741a('0xf')]('type');var _0x5155fa=this[_0x741a('0xf')](_0x741a('0x10'));var _0x24641c=this[_0x741a('0xf')](_0x741a('0xe'));if(_0x26d6bf===_0x741a('0x11')){if(_0x5155fa===_0x741a('0x12')){return null;}if(_0x5155fa===_0x741a('0x13')&&![_0x741a('0xb'),_0x741a('0x14')]['includes'](_0x24641c)){this['setDataValue'](_0x741a('0xe'),'rrmemory');}}return _0x24641c;}},'servicelevel':{'type':Sequelize[_0x741a('0x15')](0xb),'defaultValue':0x0},'context':{'type':Sequelize[_0x741a('0x4')],'defaultValue':null},'penaltymemberslimit':{'type':Sequelize[_0x741a('0x15')](0xb)},'timeout':{'type':Sequelize[_0x741a('0x15')](0xb),'defaultValue':0xf},'retry':{'type':Sequelize[_0x741a('0x15')](0xb),'defaultValue':0x2},'timeoutpriority':{'type':Sequelize[_0x741a('0x4')]},'weight':{'type':Sequelize[_0x741a('0x15')](0xb),'allowNull':!![],'defaultValue':0x0},'wrapuptime':{'type':Sequelize[_0x741a('0x15')](0xb),'defaultValue':0x0},'autofill':{'type':Sequelize[_0x741a('0x6')]('yes','no'),'defaultValue':'yes'},'autopause':{'type':Sequelize[_0x741a('0x6')](_0x741a('0x16'),'no',_0x741a('0x17')),'defaultValue':'no'},'autopausedelay':{'type':Sequelize[_0x741a('0x15')](0xb)},'autopausebusy':{'type':Sequelize[_0x741a('0x6')](_0x741a('0x16'),'no'),'defaultValue':'no'},'autopauseunavail':{'type':Sequelize[_0x741a('0x6')](_0x741a('0x16'),'no'),'defaultValue':'no'},'maxlen':{'type':Sequelize[_0x741a('0x15')](0xb),'defaultValue':0x0},'setinterfacevar':{'type':Sequelize['ENUM'](_0x741a('0x16'),'no'),'defaultValue':'no'},'setqueueentryvar':{'type':Sequelize[_0x741a('0x6')](_0x741a('0x16'),'no'),'defautValue':'no'},'setqueuevar':{'type':Sequelize[_0x741a('0x6')]('yes','no'),'defaultValue':'no'},'eventmemberstatus':{'type':Sequelize[_0x741a('0x6')](_0x741a('0x16'),'no'),'defaultValue':'no'},'membermacro':{'type':Sequelize['STRING'],'allowNull':!![]},'membergosub':{'type':Sequelize[_0x741a('0x4')],'allowNull':!![]},'announce_frequency':{'type':Sequelize[_0x741a('0x15')](0xb),'defaultValue':0x0},'min_announce_frequency':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'periodic_announce_frequency':{'type':Sequelize[_0x741a('0x15')](0xb),'defaultValue':0x0},'random_periodic_announce':{'type':Sequelize[_0x741a('0x6')](_0x741a('0x16'),'no'),'defaultValue':'no'},'relative_periodic_announce':{'type':Sequelize[_0x741a('0x6')](_0x741a('0x16'),'no'),'defaultValue':_0x741a('0x16')},'announce_holdtime':{'type':Sequelize[_0x741a('0x6')](_0x741a('0x16'),'no',_0x741a('0x18')),'defaultValue':'no'},'announce_position':{'type':Sequelize[_0x741a('0x4')],'defaultValue':'no'},'announce_to_first_user':{'type':Sequelize[_0x741a('0x6')](_0x741a('0x16'),'no')},'announce_position_limit':{'type':Sequelize[_0x741a('0x15')](0xb)},'announce_round_seconds':{'type':Sequelize[_0x741a('0x6')]('0','5','10','15','20','30'),'defaultValue':'0'},'monitor_format':{'type':Sequelize[_0x741a('0x4')],'defaultValue':''},'monitor_type':{'type':Sequelize[_0x741a('0x4')]},'queue_youarenext':{'type':Sequelize['STRING'],'defaultValue':null},'queue_thereare':{'type':Sequelize[_0x741a('0x4')],'defaultValue':null},'queue_callswaiting':{'type':Sequelize[_0x741a('0x4')],'defaultValue':null},'queue_holdtime':{'type':Sequelize[_0x741a('0x4')],'defaultValue':null},'queue_minute':{'type':Sequelize[_0x741a('0x4')],'allowNull':!![],'defaultValue':null},'queue_minutes':{'type':Sequelize['STRING'],'defaultValue':null},'queue_seconds':{'type':Sequelize[_0x741a('0x4')],'defaultValue':null},'queue_thankyou':{'type':Sequelize[_0x741a('0x4')],'defaultValue':null},'queue_reporthold':{'type':Sequelize[_0x741a('0x4')]},'queue_quantity1':{'type':Sequelize[_0x741a('0x4')]},'queue_quantity2':{'type':Sequelize[_0x741a('0x4')]},'queue_periodic_announce':{'type':Sequelize[_0x741a('0x4')]},'queue_less_than':{'type':Sequelize['STRING']},'periodic_announce':{'type':Sequelize['TEXT'],'set':function(_0x4ca766){this['setDataValue'](_0x741a('0x19'),_0x4ca766?_0x4ca766['join'](','):[]);},'get':function(){return this[_0x741a('0xf')](_0x741a('0x19'))?this[_0x741a('0xf')](_0x741a('0x19'))[_0x741a('0x1a')](','):[];}},'joinempty':{'type':Sequelize[_0x741a('0x4')],'defaultValue':'yes','set':function(_0x387f74){this[_0x741a('0x1b')](_0x741a('0x1c'),_0x387f74?_0x387f74[_0x741a('0x1d')](','):undefined);},'get':function(){return this[_0x741a('0xf')](_0x741a('0x1c'))?this[_0x741a('0xf')](_0x741a('0x1c'))['split'](','):undefined;}},'leavewhenempty':{'type':Sequelize[_0x741a('0x4')],'defaultValue':'no','set':function(_0x5a7955){this[_0x741a('0x1b')](_0x741a('0x1e'),_0x5a7955?_0x5a7955[_0x741a('0x1d')](','):undefined);},'get':function(){return this[_0x741a('0xf')](_0x741a('0x1e'))?this['getDataValue'](_0x741a('0x1e'))['split'](','):undefined;}},'reportholdtime':{'type':Sequelize[_0x741a('0x6')]('yes','no'),'defaultValue':'no'},'ringinuse':{'type':Sequelize[_0x741a('0x6')]('yes','no'),'defaultValue':'no'},'memberdelay':{'type':Sequelize[_0x741a('0x15')](0xb),'defaultValue':0x0},'timeoutrestart':{'type':Sequelize[_0x741a('0x6')](_0x741a('0x16'),'no'),'defaultValue':'no'},'defaultrule':{'type':Sequelize[_0x741a('0x4')]},'description':{'type':Sequelize['STRING']},'acw':{'type':Sequelize[_0x741a('0x1f')],'defaultValue':0x0,'set':function(_0x34c4fd){this[_0x741a('0x1b')](_0x741a('0x20'),_0x34c4fd);if(_0x34c4fd){if(this[_0x741a('0xf')]('wrapuptime')<0x2){this['setDataValue'](_0x741a('0x21'),0x2);}}}},'acwTimeout':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0xa},'dialActive':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':_0x741a('0x22')},'dialMethod':{'type':Sequelize[_0x741a('0x6')](_0x741a('0x12'),_0x741a('0x23'),'power',_0x741a('0x24'),_0x741a('0x13')),'defaultValue':_0x741a('0x23'),'comment':_0x741a('0x25')},'dialLimitChannel':{'type':Sequelize['INTEGER'](0x4)['UNSIGNED'],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':_0x741a('0x26')},'dialLimitQueue':{'type':Sequelize['INTEGER'](0x4)[_0x741a('0x27')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':'Max\x209999\x20member\x20in\x20queue(min:1,\x20max:9999),\x200\x20means\x20unlimited.'},'dialPowerLevel':{'type':Sequelize[_0x741a('0x28')](0x2)['UNSIGNED'],'defaultValue':0x1,'validate':{'min':0x1,'max':0xa},'comment':_0x741a('0x29')},'dialPredictiveOptimization':{'type':Sequelize[_0x741a('0x6')](_0x741a('0x2a'),_0x741a('0x2b')),'defaultValue':_0x741a('0x2b'),'comment':_0x741a('0x2c')},'dialPredictiveOptimizationPercentage':{'type':Sequelize[_0x741a('0x28')](0x2)[_0x741a('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5f},'comment':'Predictive\x20Optimization\x20Percentage\x20(min:\x201,\x20max:\x2095)'},'dialPredictiveInterval':{'type':Sequelize[_0x741a('0x15')](0x3)[_0x741a('0x27')],'defaultValue':0xa,'validate':{'min':0x5,'max':0x1e},'comment':_0x741a('0x2d')},'dialOriginateCallerIdName':{'type':Sequelize['STRING']},'dialOriginateCallerIdNumber':{'type':Sequelize[_0x741a('0x4')]},'dialOriginateTimeout':{'type':Sequelize['INTEGER'](0x3)[_0x741a('0x27')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x741a('0x2e')},'dialQueueOptions':{'type':Sequelize[_0x741a('0x4')],'defaultValue':_0x741a('0x2f'),'comment':_0x741a('0x30')},'dialQueueTimeout':{'type':Sequelize[_0x741a('0x15')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x741a('0x31')},'dialQueueProject':{'type':Sequelize[_0x741a('0x4')],'comment':_0x741a('0x32')},'dialCongestionMaxRetry':{'type':Sequelize[_0x741a('0x15')](0x3)[_0x741a('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x741a('0x33')},'dialCongestionRetryFrequency':{'type':Sequelize[_0x741a('0x15')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x741a('0x34')},'dialBusyMaxRetry':{'type':Sequelize[_0x741a('0x15')](0x3)[_0x741a('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x741a('0x35')},'dialBusyRetryFrequency':{'type':Sequelize[_0x741a('0x15')](0x5)[_0x741a('0x27')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x741a('0x36')},'dialNoAnswerMaxRetry':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'defaultValue':0x3,'comment':'#NoAnswer\x20Retry\x20(min:1,\x20max:999)'},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x741a('0x15')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x741a('0x37')},'dialGlobalMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x741a('0x27')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0x741a('0x38')},'dialTimezone':{'type':Sequelize['STRING'],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x741a('0x4')],'defaultValue':_0x741a('0x39')},'dialPrefix':{'type':Sequelize['STRING'],'defaultValue':null},'dialCheckDuplicateType':{'type':Sequelize['ENUM']('always','never',_0x741a('0x3a')),'defaultValue':_0x741a('0x3b')},'dialAMDActive':{'type':Sequelize[_0x741a('0x1f')],'defaultValue':0x0,'comment':_0x741a('0x3c')},'dialAMDInitialSilence':{'type':Sequelize['INTEGER'](0x9)[_0x741a('0x27')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x741a('0x3d')},'dialAMDGreeting':{'type':Sequelize['INTEGER'](0x9)[_0x741a('0x27')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x741a('0x3e')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0x741a('0x15')](0x9)['UNSIGNED'],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x741a('0x3f')},'dialAMDTotalAnalysisTime':{'type':Sequelize['INTEGER'](0x9)[_0x741a('0x27')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x741a('0x40')},'dialAMDMinWordLength':{'type':Sequelize['INTEGER'](0x9)[_0x741a('0x27')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0x741a('0x41')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x741a('0x15')](0x9)['UNSIGNED'],'defaultValue':0x32,'validate':{'min':0x0},'comment':_0x741a('0x42')},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0x741a('0x15')](0x9)[_0x741a('0x27')],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0x741a('0x43')},'dialAMDSilenceThreshold':{'type':Sequelize[_0x741a('0x15')](0x5)[_0x741a('0x27')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0x741a('0x44')},'dialAMDMaximumWordLength':{'type':Sequelize[_0x741a('0x15')](0x9)[_0x741a('0x27')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x741a('0x45')},'dialRecallMeTimeout':{'type':Sequelize[_0x741a('0x15')](0x5)[_0x741a('0x27')],'validate':{'min':0x1},'defaultValue':0x1e,'comment':'#RecallMe\x20Timeout\x20(min:1)'},'dialRecallInQueue':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':'Active/Disactive\x20Recall\x20In\x20Queue'},'dialOrderByScheduledAt':{'type':Sequelize[_0x741a('0x6')]('DESC',_0x741a('0x46')),'defaultValue':_0x741a('0x47')},'dialQueueProject2':{'type':Sequelize['STRING'],'comment':_0x741a('0x32')},'dialAgiAfterHangupClient':{'type':Sequelize[_0x741a('0x1f')],'defaultValue':![]},'dialAgiAfterHangupAgent':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize['INTEGER'](0x3)[_0x741a('0x27')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x741a('0x48')},'dialCutDigit':{'type':Sequelize[_0x741a('0x15')](0x3)[_0x741a('0x27')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x741a('0x49')},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0x741a('0x15')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x741a('0x4a')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0x741a('0x15')](0x5)[_0x741a('0x27')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x741a('0x4b')},'dialDropMaxRetry':{'type':Sequelize[_0x741a('0x15')](0x3)[_0x741a('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x741a('0x4c')},'dialDropRetryFrequency':{'type':Sequelize['INTEGER'](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x741a('0x4d')},'dialAbandonedMaxRetry':{'type':Sequelize[_0x741a('0x15')](0x3)[_0x741a('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Abandoned\x20Retry\x20(min:1,\x20max:999)'},'dialAbandonedRetryFrequency':{'type':Sequelize[_0x741a('0x15')](0x5)[_0x741a('0x27')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialMachineMaxRetry':{'type':Sequelize[_0x741a('0x15')](0x3)[_0x741a('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Machine\x20Retry\x20(min:1,\x20max:999)'},'dialMachineRetryFrequency':{'type':Sequelize[_0x741a('0x15')](0x5)[_0x741a('0x27')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialAgentRejectMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x741a('0x27')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x741a('0x4e')},'dialAgentRejectRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x741a('0x27')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x741a('0x4f')},'mandatoryDispositionPauseId':{'type':Sequelize[_0x741a('0x15')],'allowNull':!![],'comment':_0x741a('0x50')},'mandatoryDisposition':{'type':Sequelize[_0x741a('0x1f')],'defaultValue':![],'comment':_0x741a('0x51'),'set':function(_0x341821){if(!_0x341821)this[_0x741a('0x1b')](_0x741a('0x52'),null);this['setDataValue'](_0x741a('0x53'),_0x341821);}},'dialPredictiveIntervalMaxThreshold':{'type':Sequelize[_0x741a('0x15')](0x3)[_0x741a('0x27')],'defaultValue':0x14,'validate':{'min':0x1,'max':0x64}},'dialPredictiveIntervalMinThreshold':{'type':Sequelize['INTEGER'](0x3)[_0x741a('0x27')],'defaultValue':0xa,'validate':{'min':0x1,'max':0x64}},'dialPreviewAutoRecallMe':{'type':Sequelize[_0x741a('0x1f')],'defaultValue':!![]},'callAdditionalPhoneAfterMin':{'type':Sequelize[_0x741a('0x15')](0x3)[_0x741a('0x27')],'defaultValue':0x4},'dialPreviewRecallmeReminder':{'type':Sequelize[_0x741a('0x1f')],'defaultValue':![]}};
\ No newline at end of file
index 3ddfda2..381cbbb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8ef6=['select','field','tq.TeamId','from','team_has_voice_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','ut.UserId\x20=\x20?','push','toString','QueryTypes','every','includes','all','union','compact','isEmpty','removeAgents','userVoiceQueue:remove','addAgents','spread','isArray','getAgents','getMembers','CmList','getLists','addLists','dialCheckDuplicateType','always','insert','cm_hopper','fromQuery','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)','VoiceQueueId\x20=\x20?','into','COALESCE(phone,\x27\x27)','cm_hopper_additional_phones','CmHopperId','OrderBy','h.id','ci.item','cm_contact_has_items','h.ContactId=ci.CmContactId','ci.ItemClass=?','PHONE','removeLists','getBlackLists','addBlackLists','cm_hopper_black','NOW()','removeBlackLists','moment','bluebird','util','lodash','squel','ioredis','../../components/parsers/qs','api','../../config/environment','../../mysqldb','redis','localhost','socket.io-emitter','register','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','then','destroy','VoiceQueues','inbound','outbound','ignore','map','value','find','type','name','UserProfileResource','error','stack','send','index','VoiceQueue','rawAttributes','getOptions','include','query','findAll','rows','catch','show','model','keys','intersection','attributes','fields','length','merge','options','create','body','user','get','role','QueueCampaigns','UserProfileSection','userProfileId','clone','includeAll','omit','updatedAt','createdAt','Unable\x20to\x20retrieve\x20the\x20current\x20user','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','params','getHoppers','findOne','CmHopper','filters','hasOwnProperty','order','sort','where','pick','filter','getHopperHistories','CmHopperHistory','nolimit','VoiceQueueId','getHopperFinals','CmHopperFinal','getHopperBlacks','CmHopperBlack','getTeams','Team','addTeams','teams','User','Agents','online','voicePause','interface','flatMap','forEach','penalty','sequelize','transaction','each','TeamVoiceQueue','upsert','findOrCreate','UserVoiceQueueRt','isNil','format','SIP/%s','emit','userVoiceQueue:save','removeTeams','ids'];(function(_0x505e54,_0x24bc05){var _0x17f538=function(_0x687a0a){while(--_0x687a0a){_0x505e54['push'](_0x505e54['shift']());}};_0x17f538(++_0x24bc05);}(_0x8ef6,0xf2));var _0x68ef=function(_0x5299a3,_0x13df1b){_0x5299a3=_0x5299a3-0x0;var _0x2b9474=_0x8ef6[_0x5299a3];return _0x2b9474;};'use strict';var moment=require(_0x68ef('0x0'));var BPromise=require(_0x68ef('0x1'));var util=require(_0x68ef('0x2'));var _=require(_0x68ef('0x3'));var squel=require(_0x68ef('0x4'));var Redis=require(_0x68ef('0x5'));var qs=require(_0x68ef('0x6'));var logger=require('../../config/logger')(_0x68ef('0x7'));var config=require(_0x68ef('0x8'));var db=require(_0x68ef('0x9'))['db'];config[_0x68ef('0xa')]=_['defaults'](config['redis'],{'host':_0x68ef('0xb'),'port':0x18eb});var socket=require(_0x68ef('0xc'))(new Redis(config[_0x68ef('0xa')]));require('./voiceQueue.socket')[_0x68ef('0xd')](socket);function respondWithStatusCode(_0x31007e,_0x1bee73){_0x1bee73=_0x1bee73||0xcc;return function(_0x22ae26){if(_0x22ae26){return _0x31007e[_0x68ef('0xe')](_0x1bee73);}return _0x31007e[_0x68ef('0xf')](_0x1bee73)[_0x68ef('0x10')]();};}function respondWithResult(_0x23da00,_0x1f6747){_0x1f6747=_0x1f6747||0xc8;return function(_0x255c85){if(_0x255c85){return _0x23da00[_0x68ef('0xf')](_0x1f6747)[_0x68ef('0x11')](_0x255c85);}};}function respondWithFilteredResult(_0x582a79,_0x1aa045){return function(_0x46356f){if(_0x46356f){var _0x1e117a=typeof _0x1aa045[_0x68ef('0x12')]===_0x68ef('0x13')&&typeof _0x1aa045[_0x68ef('0x14')]==='undefined';var _0x3b48dd=_0x46356f[_0x68ef('0x15')];var _0x2657c5=_0x1e117a?0x0:_0x1aa045['offset'];var _0x22fe96=_0x1e117a?_0x46356f[_0x68ef('0x15')]:_0x1aa045[_0x68ef('0x12')]+_0x1aa045['limit'];var _0x35493d;if(_0x22fe96>=_0x3b48dd){_0x22fe96=_0x3b48dd;_0x35493d=0xc8;}else{_0x35493d=0xce;}_0x582a79[_0x68ef('0xf')](_0x35493d);return _0x582a79[_0x68ef('0x16')](_0x68ef('0x17'),_0x2657c5+'-'+_0x22fe96+'/'+_0x3b48dd)['json'](_0x46356f);}return null;};}function saveUpdates(_0x2ada1c){return function(_0x54139e){if(_0x54139e){return _0x54139e['update'](_0x2ada1c)[_0x68ef('0x18')](function(_0x404870){return _0x404870;});}return null;};}function removeEntity(_0x4ade0d){return function(_0x527870){if(_0x527870){return _0x527870[_0x68ef('0x19')]()[_0x68ef('0x18')](function(){var _0x318514=_0x527870['get']({'plain':!![]});var _0x1dc49c=[{'name':_0x68ef('0x1a'),'value':_0x68ef('0x1b'),'ignore':![]},{'name':'QueueCampaigns','value':_0x68ef('0x1c'),'ignore':![]}];var _0x3be4c0=_(_0x1dc49c)['filter'](_0x68ef('0x1d'))[_0x68ef('0x1e')](_0x68ef('0x1f'))['value']();if(_['includes'](_0x3be4c0,_0x318514['type'])){return;}var _0x26018d=_[_0x68ef('0x20')](_0x1dc49c,[_0x68ef('0x1f'),_0x318514[_0x68ef('0x21')]])[_0x68ef('0x22')];return db[_0x68ef('0x23')][_0x68ef('0x19')]({'where':{'type':_0x26018d,'resourceId':_0x318514['id']}})[_0x68ef('0x18')](function(){return _0x527870;});})[_0x68ef('0x18')](function(){_0x4ade0d[_0x68ef('0xf')](0xcc)['end']();});}};}function handleEntityNotFound(_0x178460){return function(_0x57f9ee){if(!_0x57f9ee){_0x178460['sendStatus'](0x194);}return _0x57f9ee;};}function handleError(_0x55d8b0,_0x1a7ce1){_0x1a7ce1=_0x1a7ce1||0x1f4;return function(_0x268f32){logger[_0x68ef('0x24')](_0x268f32[_0x68ef('0x25')]);if(_0x268f32['name']){delete _0x268f32['name'];}_0x55d8b0[_0x68ef('0xf')](_0x1a7ce1)[_0x68ef('0x26')](_0x268f32);};}exports[_0x68ef('0x27')]=function(_0x263b30,_0x22ef25){var _0x201884={};var _0x26288a={'count':0x0,'rows':[]};var _0x4579cb=_['map'](db[_0x68ef('0x28')][_0x68ef('0x29')],function(_0x132d9e){return{'name':_0x132d9e['fieldName'],'type':_0x132d9e[_0x68ef('0x21')]['key']};});_0x201884=qs[_0x68ef('0x2a')](_0x4579cb,_0x263b30);var _0x17588a={'where':_0x201884['where']};return db['VoiceQueue'][_0x68ef('0x15')](_0x17588a)[_0x68ef('0x18')](function(_0x4b8fc8){_0x26288a[_0x68ef('0x15')]=_0x4b8fc8;_0x201884[_0x68ef('0x2b')]=qs[_0x68ef('0x2b')](_0x263b30[_0x68ef('0x2c')]);return db['VoiceQueue'][_0x68ef('0x2d')](_0x201884);})[_0x68ef('0x18')](function(_0x5f137b){_0x26288a[_0x68ef('0x2e')]=_0x5f137b;return _0x26288a;})['then'](respondWithFilteredResult(_0x22ef25,_0x201884))[_0x68ef('0x2f')](handleError(_0x22ef25,null));};exports[_0x68ef('0x30')]=function(_0x4973c2,_0x24c2c9){var _0x4a0763={'raw':![],'where':{'id':_0x4973c2['params']['id']}},_0x38c2f8={};_0x38c2f8[_0x68ef('0x31')]=_[_0x68ef('0x32')](db[_0x68ef('0x28')]['rawAttributes']);_0x38c2f8[_0x68ef('0x2c')]=_['keys'](_0x4973c2[_0x68ef('0x2c')]);_0x38c2f8['filters']=_[_0x68ef('0x33')](_0x38c2f8[_0x68ef('0x31')],_0x38c2f8[_0x68ef('0x2c')]);_0x4a0763[_0x68ef('0x34')]=_[_0x68ef('0x33')](_0x38c2f8[_0x68ef('0x31')],qs['fields'](_0x4973c2[_0x68ef('0x2c')][_0x68ef('0x35')]));_0x4a0763[_0x68ef('0x34')]=_0x4a0763['attributes'][_0x68ef('0x36')]?_0x4a0763[_0x68ef('0x34')]:_0x38c2f8[_0x68ef('0x31')];if(_0x4973c2['query']['includeAll']){_0x4a0763[_0x68ef('0x2b')]=[{'all':!![]}];}_0x4a0763=_[_0x68ef('0x37')]({},_0x4a0763,_0x4973c2[_0x68ef('0x38')]);return db[_0x68ef('0x28')][_0x68ef('0x20')](_0x4a0763)[_0x68ef('0x18')](handleEntityNotFound(_0x24c2c9,null))[_0x68ef('0x18')](respondWithResult(_0x24c2c9,null))['catch'](handleError(_0x24c2c9,null));};exports[_0x68ef('0x39')]=function(_0xd7f9ca,_0x2f6ee0){return db[_0x68ef('0x28')]['create'](_0xd7f9ca[_0x68ef('0x3a')],{})[_0x68ef('0x18')](function(_0xcf595d){var _0x410c10=_0xd7f9ca[_0x68ef('0x3b')][_0x68ef('0x3c')]({'plain':!![]});if(!_0x410c10)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x410c10[_0x68ef('0x3d')]===_0x68ef('0x3b')){var _0xf5010c=_0xcf595d[_0x68ef('0x3c')]({'plain':!![]});var _0x449f3c=[{'name':_0x68ef('0x1a'),'value':_0x68ef('0x1b')},{'name':_0x68ef('0x3e'),'value':_0x68ef('0x1c')}];var _0x531096=_[_0x68ef('0x20')](_0x449f3c,[_0x68ef('0x1f'),_0xf5010c[_0x68ef('0x21')]])[_0x68ef('0x22')];return db[_0x68ef('0x3f')][_0x68ef('0x20')]({'where':{'name':_0x531096,'userProfileId':_0x410c10[_0x68ef('0x40')]},'raw':!![]})['then'](function(_0xb3d396){if(_0xb3d396&&_0xb3d396['autoAssociation']===0x0){return db[_0x68ef('0x23')][_0x68ef('0x39')]({'name':_0xf5010c[_0x68ef('0x22')],'resourceId':_0xf5010c['id'],'type':_0xb3d396[_0x68ef('0x22')],'sectionId':_0xb3d396['id']},{})['then'](function(){return _0xcf595d;});}else{return _0xcf595d;}})[_0x68ef('0x2f')](function(_0x5a8231){logger[_0x68ef('0x24')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x5a8231);throw _0x5a8231;});}return _0xcf595d;})[_0x68ef('0x18')](respondWithResult(_0x2f6ee0,0xc9))[_0x68ef('0x2f')](handleError(_0x2f6ee0,null));};exports[_0x68ef('0x41')]=function(_0x5c4a66,_0x59b148){var _0x4044d5={'where':{'id':_0x5c4a66['params']['id']}},_0x399055={};_0x399055['model']=_['keys'](db[_0x68ef('0x28')][_0x68ef('0x29')]);_0x4044d5[_0x68ef('0x34')]=_[_0x68ef('0x33')](_0x399055[_0x68ef('0x31')],qs['fields'](_0x5c4a66['query'][_0x68ef('0x35')]));_0x4044d5[_0x68ef('0x34')]=_0x4044d5[_0x68ef('0x34')][_0x68ef('0x36')]?_0x4044d5['attributes']:_0x399055[_0x68ef('0x31')];if(_0x5c4a66[_0x68ef('0x2c')][_0x68ef('0x42')]){_0x4044d5[_0x68ef('0x2b')]=[{'all':!![]}];}_0x4044d5=_['merge']({},_0x4044d5,_0x5c4a66['options']);return db[_0x68ef('0x28')][_0x68ef('0x20')](_0x4044d5)['then'](handleEntityNotFound(_0x59b148,null))[_0x68ef('0x18')](function(_0x12fff3){if(_0x12fff3){var _0x3a82a0=_0x12fff3[_0x68ef('0x3c')]({'plain':!![]});_0x3a82a0=qs[_0x68ef('0x43')](_0x3a82a0,['id','createdAt',_0x68ef('0x44')]);_0x5c4a66[_0x68ef('0x3a')]=_[_0x68ef('0x43')](_0x5c4a66['body'],['id',_0x68ef('0x45'),_0x68ef('0x44')]);return db[_0x68ef('0x28')]['create'](_[_0x68ef('0x37')](_0x3a82a0,_0x5c4a66['body']),{'include':_0x5c4a66['query'][_0x68ef('0x42')]?[{'all':!![]}]:undefined})['then'](function(_0x39dd21){var _0xb33afd=_0x5c4a66[_0x68ef('0x3b')][_0x68ef('0x3c')]({'plain':!![]});if(!_0xb33afd)throw new Error(_0x68ef('0x46'));if(_0xb33afd[_0x68ef('0x3d')]===_0x68ef('0x3b')){var _0x1d1d6e=_0x39dd21[_0x68ef('0x3c')]({'plain':!![]});var _0x247915=[{'name':'VoiceQueues','value':'inbound'},{'name':_0x68ef('0x3e'),'value':_0x68ef('0x1c')}];var _0x317b79=_[_0x68ef('0x20')](_0x247915,[_0x68ef('0x1f'),_0x1d1d6e[_0x68ef('0x21')]])[_0x68ef('0x22')];return db[_0x68ef('0x3f')][_0x68ef('0x20')]({'where':{'name':_0x317b79,'userProfileId':_0xb33afd['userProfileId']},'raw':!![]})['then'](function(_0x42a4b2){if(_0x42a4b2&&_0x42a4b2['autoAssociation']===0x0){return db[_0x68ef('0x23')]['create']({'name':_0x1d1d6e[_0x68ef('0x22')],'resourceId':_0x1d1d6e['id'],'type':_0x42a4b2[_0x68ef('0x22')],'sectionId':_0x42a4b2['id']},{})['then'](function(){return _0x39dd21;});}else{return _0x39dd21;}})[_0x68ef('0x2f')](function(_0x4e097e){logger[_0x68ef('0x24')](_0x68ef('0x47'),_0x4e097e);throw _0x4e097e;});}return _0x39dd21;});}})[_0x68ef('0x18')](respondWithResult(_0x59b148,0xc9))[_0x68ef('0x2f')](handleError(_0x59b148,null));};exports[_0x68ef('0x48')]=function(_0x3d81c8,_0x5c347c){if(_0x3d81c8[_0x68ef('0x3a')]['id']){delete _0x3d81c8[_0x68ef('0x3a')]['id'];}return db[_0x68ef('0x28')][_0x68ef('0x20')]({'where':{'id':_0x3d81c8[_0x68ef('0x49')]['id']}})[_0x68ef('0x18')](handleEntityNotFound(_0x5c347c,null))['then'](saveUpdates(_0x3d81c8[_0x68ef('0x3a')],null))[_0x68ef('0x18')](respondWithResult(_0x5c347c,null))['catch'](handleError(_0x5c347c,null));};exports[_0x68ef('0x19')]=function(_0x114d9f,_0x3d3087){return db['VoiceQueue'][_0x68ef('0x20')]({'where':{'id':_0x114d9f['params']['id']}})['then'](handleEntityNotFound(_0x3d3087,null))[_0x68ef('0x18')](removeEntity(_0x3d3087,null))['catch'](handleError(_0x3d3087,null));};exports[_0x68ef('0x4a')]=function(_0x47c1d5,_0x100a20){var _0x9e8554={'raw':![],'where':{}};var _0x304405={};var _0x3fbd39={'count':0x0,'rows':[]};return db[_0x68ef('0x28')][_0x68ef('0x4b')]({'where':{'id':_0x47c1d5['params']['id']}})[_0x68ef('0x18')](handleEntityNotFound(_0x100a20,null))['then'](function(_0x2cbd99){if(_0x2cbd99){_0x304405['model']=_[_0x68ef('0x32')](db[_0x68ef('0x4c')][_0x68ef('0x29')]);_0x304405[_0x68ef('0x2c')]=_[_0x68ef('0x32')](_0x47c1d5[_0x68ef('0x2c')]);_0x304405[_0x68ef('0x4d')]=_['intersection'](_0x304405[_0x68ef('0x31')],_0x304405[_0x68ef('0x2c')]);_0x9e8554[_0x68ef('0x34')]=_[_0x68ef('0x33')](_0x304405[_0x68ef('0x31')],qs['fields'](_0x47c1d5[_0x68ef('0x2c')]['fields']));_0x9e8554[_0x68ef('0x34')]=_0x9e8554['attributes']['length']?_0x9e8554[_0x68ef('0x34')]:_0x304405[_0x68ef('0x31')];if(!_0x47c1d5[_0x68ef('0x2c')][_0x68ef('0x4e')]('nolimit')){_0x9e8554[_0x68ef('0x14')]=qs['limit'](_0x47c1d5[_0x68ef('0x2c')][_0x68ef('0x14')]);_0x9e8554[_0x68ef('0x12')]=qs['offset'](_0x47c1d5['query'][_0x68ef('0x12')]);}_0x9e8554[_0x68ef('0x4f')]=qs[_0x68ef('0x50')](_0x47c1d5[_0x68ef('0x2c')]['sort']);_0x9e8554[_0x68ef('0x51')]=qs[_0x68ef('0x4d')](_[_0x68ef('0x52')](_0x47c1d5[_0x68ef('0x2c')],_0x304405['filters']));_0x9e8554[_0x68ef('0x51')]['VoiceQueueId']=_0x2cbd99['id'];if(_0x47c1d5[_0x68ef('0x2c')][_0x68ef('0x53')]){_0x9e8554[_0x68ef('0x51')]=_[_0x68ef('0x37')](_0x9e8554[_0x68ef('0x51')],{'$or':_['map'](_0x9e8554[_0x68ef('0x34')],function(_0x2caed7){var _0x147695={};_0x147695[_0x2caed7]={'$like':'%'+_0x47c1d5['query'][_0x68ef('0x53')]+'%'};return _0x147695;})});}_0x9e8554=_['merge']({},_0x9e8554,_0x47c1d5[_0x68ef('0x38')]);return db['CmHopper']['count']({'where':_0x9e8554[_0x68ef('0x51')]})[_0x68ef('0x18')](function(_0x38c117){_0x3fbd39[_0x68ef('0x15')]=_0x38c117;if(_0x47c1d5['query'][_0x68ef('0x42')]){_0x9e8554[_0x68ef('0x2b')]=[{'all':!![]}];}return db[_0x68ef('0x4c')]['findAll'](_0x9e8554);})[_0x68ef('0x18')](function(_0x2db826){_0x3fbd39[_0x68ef('0x2e')]=_0x2db826;return _0x3fbd39;});}})[_0x68ef('0x18')](respondWithFilteredResult(_0x100a20,_0x9e8554))[_0x68ef('0x2f')](handleError(_0x100a20,null));};exports[_0x68ef('0x54')]=function(_0x139557,_0xfe72dc){var _0x156ce3={'raw':!![],'where':{}};var _0x11feff={};var _0x454999={'count':0x0,'rows':[]};return db[_0x68ef('0x28')]['findOne']({'where':{'id':_0x139557[_0x68ef('0x49')]['id']}})[_0x68ef('0x18')](handleEntityNotFound(_0xfe72dc,null))['then'](function(_0x513c69){if(_0x513c69){_0x11feff[_0x68ef('0x31')]=_['keys'](db[_0x68ef('0x55')][_0x68ef('0x29')]);_0x11feff['query']=_['keys'](_0x139557[_0x68ef('0x2c')]);_0x11feff['filters']=_[_0x68ef('0x33')](_0x11feff['model'],_0x11feff[_0x68ef('0x2c')]);_0x156ce3['attributes']=_[_0x68ef('0x33')](_0x11feff[_0x68ef('0x31')],qs['fields'](_0x139557[_0x68ef('0x2c')][_0x68ef('0x35')]));_0x156ce3[_0x68ef('0x34')]=_0x156ce3[_0x68ef('0x34')]['length']?_0x156ce3[_0x68ef('0x34')]:_0x11feff[_0x68ef('0x31')];if(!_0x139557['query'][_0x68ef('0x4e')](_0x68ef('0x56'))){_0x156ce3[_0x68ef('0x14')]=qs['limit'](_0x139557[_0x68ef('0x2c')]['limit']);_0x156ce3[_0x68ef('0x12')]=qs[_0x68ef('0x12')](_0x139557['query']['offset']);}_0x156ce3['order']=qs['sort'](_0x139557[_0x68ef('0x2c')][_0x68ef('0x50')]);_0x156ce3[_0x68ef('0x51')]=qs[_0x68ef('0x4d')](_[_0x68ef('0x52')](_0x139557[_0x68ef('0x2c')],_0x11feff[_0x68ef('0x4d')]));_0x156ce3[_0x68ef('0x51')][_0x68ef('0x57')]=_0x513c69['id'];if(_0x139557[_0x68ef('0x2c')][_0x68ef('0x53')]){_0x156ce3[_0x68ef('0x51')]=_[_0x68ef('0x37')](_0x156ce3['where'],{'$or':_[_0x68ef('0x1e')](_0x156ce3['attributes'],function(_0x791181){var _0x5b39a8={};_0x5b39a8[_0x791181]={'$like':'%'+_0x139557['query'][_0x68ef('0x53')]+'%'};return _0x5b39a8;})});}_0x156ce3=_[_0x68ef('0x37')]({},_0x156ce3,_0x139557[_0x68ef('0x38')]);return db[_0x68ef('0x55')]['count']({'where':_0x156ce3['where']})[_0x68ef('0x18')](function(_0x308997){_0x454999[_0x68ef('0x15')]=_0x308997;if(_0x139557['query'][_0x68ef('0x42')]){_0x156ce3[_0x68ef('0x2b')]=[{'all':!![]}];}return db[_0x68ef('0x55')][_0x68ef('0x2d')](_0x156ce3);})['then'](function(_0x214e89){_0x454999[_0x68ef('0x2e')]=_0x214e89;return _0x454999;});}})[_0x68ef('0x18')](respondWithFilteredResult(_0xfe72dc,_0x156ce3))[_0x68ef('0x2f')](handleError(_0xfe72dc,null));};exports[_0x68ef('0x58')]=function(_0x346049,_0x489ca6){var _0x2a72e8={'raw':!![],'where':{}};var _0x49844f={};var _0xea97f4={'count':0x0,'rows':[]};return db[_0x68ef('0x28')][_0x68ef('0x4b')]({'where':{'id':_0x346049[_0x68ef('0x49')]['id']}})['then'](handleEntityNotFound(_0x489ca6,null))[_0x68ef('0x18')](function(_0x4c47ab){if(_0x4c47ab){_0x49844f[_0x68ef('0x31')]=_[_0x68ef('0x32')](db['CmHopperFinal']['rawAttributes']);_0x49844f[_0x68ef('0x2c')]=_['keys'](_0x346049[_0x68ef('0x2c')]);_0x49844f['filters']=_[_0x68ef('0x33')](_0x49844f[_0x68ef('0x31')],_0x49844f[_0x68ef('0x2c')]);_0x2a72e8[_0x68ef('0x34')]=_[_0x68ef('0x33')](_0x49844f[_0x68ef('0x31')],qs['fields'](_0x346049[_0x68ef('0x2c')][_0x68ef('0x35')]));_0x2a72e8[_0x68ef('0x34')]=_0x2a72e8[_0x68ef('0x34')][_0x68ef('0x36')]?_0x2a72e8[_0x68ef('0x34')]:_0x49844f[_0x68ef('0x31')];if(!_0x346049['query'][_0x68ef('0x4e')](_0x68ef('0x56'))){_0x2a72e8[_0x68ef('0x14')]=qs[_0x68ef('0x14')](_0x346049[_0x68ef('0x2c')][_0x68ef('0x14')]);_0x2a72e8[_0x68ef('0x12')]=qs[_0x68ef('0x12')](_0x346049[_0x68ef('0x2c')]['offset']);}_0x2a72e8[_0x68ef('0x4f')]=qs['sort'](_0x346049['query']['sort']);_0x2a72e8[_0x68ef('0x51')]=qs[_0x68ef('0x4d')](_[_0x68ef('0x52')](_0x346049['query'],_0x49844f['filters']));_0x2a72e8['where'][_0x68ef('0x57')]=_0x4c47ab['id'];if(_0x346049[_0x68ef('0x2c')][_0x68ef('0x53')]){_0x2a72e8[_0x68ef('0x51')]=_[_0x68ef('0x37')](_0x2a72e8[_0x68ef('0x51')],{'$or':_['map'](_0x2a72e8[_0x68ef('0x34')],function(_0x2c7f18){var _0x1bdacc={};_0x1bdacc[_0x2c7f18]={'$like':'%'+_0x346049[_0x68ef('0x2c')]['filter']+'%'};return _0x1bdacc;})});}_0x2a72e8=_[_0x68ef('0x37')]({},_0x2a72e8,_0x346049[_0x68ef('0x38')]);return db[_0x68ef('0x59')][_0x68ef('0x15')]({'where':_0x2a72e8[_0x68ef('0x51')]})[_0x68ef('0x18')](function(_0x6ca6f4){_0xea97f4[_0x68ef('0x15')]=_0x6ca6f4;if(_0x346049['query'][_0x68ef('0x42')]){_0x2a72e8[_0x68ef('0x2b')]=[{'all':!![]}];}return db['CmHopperFinal'][_0x68ef('0x2d')](_0x2a72e8);})[_0x68ef('0x18')](function(_0x1b9028){_0xea97f4[_0x68ef('0x2e')]=_0x1b9028;return _0xea97f4;});}})[_0x68ef('0x18')](respondWithFilteredResult(_0x489ca6,_0x2a72e8))[_0x68ef('0x2f')](handleError(_0x489ca6,null));};exports[_0x68ef('0x5a')]=function(_0x2e626c,_0x3b1781){var _0x159169={'raw':!![],'where':{}};var _0x29522c={};var _0x37bf89={'count':0x0,'rows':[]};return db[_0x68ef('0x28')][_0x68ef('0x4b')]({'where':{'id':_0x2e626c[_0x68ef('0x49')]['id']}})[_0x68ef('0x18')](handleEntityNotFound(_0x3b1781,null))[_0x68ef('0x18')](function(_0x24af15){if(_0x24af15){_0x29522c['model']=_[_0x68ef('0x32')](db[_0x68ef('0x5b')][_0x68ef('0x29')]);_0x29522c[_0x68ef('0x2c')]=_[_0x68ef('0x32')](_0x2e626c['query']);_0x29522c[_0x68ef('0x4d')]=_[_0x68ef('0x33')](_0x29522c['model'],_0x29522c[_0x68ef('0x2c')]);_0x159169['attributes']=_['intersection'](_0x29522c['model'],qs['fields'](_0x2e626c[_0x68ef('0x2c')]['fields']));_0x159169[_0x68ef('0x34')]=_0x159169['attributes']['length']?_0x159169['attributes']:_0x29522c[_0x68ef('0x31')];if(!_0x2e626c[_0x68ef('0x2c')][_0x68ef('0x4e')](_0x68ef('0x56'))){_0x159169[_0x68ef('0x14')]=qs['limit'](_0x2e626c[_0x68ef('0x2c')][_0x68ef('0x14')]);_0x159169[_0x68ef('0x12')]=qs[_0x68ef('0x12')](_0x2e626c['query'][_0x68ef('0x12')]);}_0x159169['order']=qs['sort'](_0x2e626c['query'][_0x68ef('0x50')]);_0x159169[_0x68ef('0x51')]=qs[_0x68ef('0x4d')](_[_0x68ef('0x52')](_0x2e626c[_0x68ef('0x2c')],_0x29522c[_0x68ef('0x4d')]));_0x159169[_0x68ef('0x51')][_0x68ef('0x57')]=_0x24af15['id'];if(_0x2e626c[_0x68ef('0x2c')][_0x68ef('0x53')]){_0x159169[_0x68ef('0x51')]=_[_0x68ef('0x37')](_0x159169['where'],{'$or':_['map'](_0x159169['attributes'],function(_0x25e698){var _0x1cad59={};_0x1cad59[_0x25e698]={'$like':'%'+_0x2e626c[_0x68ef('0x2c')]['filter']+'%'};return _0x1cad59;})});}_0x159169=_[_0x68ef('0x37')]({},_0x159169,_0x2e626c['options']);return db[_0x68ef('0x5b')][_0x68ef('0x15')]({'where':_0x159169[_0x68ef('0x51')]})['then'](function(_0x304260){_0x37bf89[_0x68ef('0x15')]=_0x304260;if(_0x2e626c['query'][_0x68ef('0x42')]){_0x159169[_0x68ef('0x2b')]=[{'all':!![]}];}return db[_0x68ef('0x5b')][_0x68ef('0x2d')](_0x159169);})[_0x68ef('0x18')](function(_0x23126a){_0x37bf89[_0x68ef('0x2e')]=_0x23126a;return _0x37bf89;});}})['then'](respondWithFilteredResult(_0x3b1781,_0x159169))[_0x68ef('0x2f')](handleError(_0x3b1781,null));};exports[_0x68ef('0x5c')]=function(_0x5a262d,_0x28cad4){var _0x424e46={};var _0x46c87e={};var _0x20a131;var _0x1b8250;return db[_0x68ef('0x28')][_0x68ef('0x4b')]({'where':{'id':_0x5a262d['params']['id']}})['then'](handleEntityNotFound(_0x28cad4,null))[_0x68ef('0x18')](function(_0x4dcf9e){if(_0x4dcf9e){_0x20a131=_0x4dcf9e;_0x46c87e[_0x68ef('0x31')]=_[_0x68ef('0x32')](db[_0x68ef('0x5d')][_0x68ef('0x29')]);_0x46c87e[_0x68ef('0x2c')]=_['keys'](_0x5a262d[_0x68ef('0x2c')]);_0x46c87e[_0x68ef('0x4d')]=_[_0x68ef('0x33')](_0x46c87e[_0x68ef('0x31')],_0x46c87e['query']);_0x424e46['attributes']=_[_0x68ef('0x33')](_0x46c87e[_0x68ef('0x31')],qs[_0x68ef('0x35')](_0x5a262d[_0x68ef('0x2c')][_0x68ef('0x35')]));_0x424e46[_0x68ef('0x34')]=_0x424e46[_0x68ef('0x34')][_0x68ef('0x36')]?_0x424e46[_0x68ef('0x34')]:_0x46c87e[_0x68ef('0x31')];_0x424e46[_0x68ef('0x4f')]=qs['sort'](_0x5a262d[_0x68ef('0x2c')][_0x68ef('0x50')]);_0x424e46[_0x68ef('0x51')]=qs[_0x68ef('0x4d')](_[_0x68ef('0x52')](_0x5a262d[_0x68ef('0x2c')],_0x46c87e[_0x68ef('0x4d')]));if(_0x5a262d[_0x68ef('0x2c')][_0x68ef('0x53')]){_0x424e46[_0x68ef('0x51')]=_['merge'](_0x424e46['where'],{'$or':_[_0x68ef('0x1e')](_0x424e46[_0x68ef('0x34')],function(_0x3ef9e2){var _0x12ef69={};_0x12ef69[_0x3ef9e2]={'$like':'%'+_0x5a262d[_0x68ef('0x2c')][_0x68ef('0x53')]+'%'};return _0x12ef69;})});}_0x424e46=_[_0x68ef('0x37')]({},_0x424e46,_0x5a262d['options']);return _0x20a131[_0x68ef('0x5c')](_0x424e46);}})[_0x68ef('0x18')](function(_0x11c717){if(_0x11c717){_0x1b8250=_0x11c717[_0x68ef('0x36')];if(!_0x5a262d['query'][_0x68ef('0x4e')]('nolimit')){_0x424e46[_0x68ef('0x14')]=qs[_0x68ef('0x14')](_0x5a262d[_0x68ef('0x2c')]['limit']);_0x424e46['offset']=qs[_0x68ef('0x12')](_0x5a262d['query'][_0x68ef('0x12')]);}return _0x20a131['getTeams'](_0x424e46);}})[_0x68ef('0x18')](function(_0x426274){if(_0x426274){return _0x426274?{'count':_0x1b8250,'rows':_0x426274}:null;}})['then'](respondWithResult(_0x28cad4,null))['catch'](handleError(_0x28cad4,null));};exports[_0x68ef('0x5e')]=function(_0x1d429a,_0x4d96a9){var _0xf9f2c4=_0x1d429a[_0x68ef('0x3a')][_0x68ef('0x5f')];var _0x4ae311=_['map'](_0xf9f2c4,'id');return db[_0x68ef('0x5d')]['findAll']({'where':{'id':_0x4ae311},'attributes':['id'],'include':[{'model':db[_0x68ef('0x60')],'as':_0x68ef('0x61'),'attributes':['id',_0x68ef('0x22'),_0x68ef('0x62'),_0x68ef('0x63'),_0x68ef('0x64')],'raw':!![]}]})['then'](function(_0x48f3f6){if(_0x48f3f6){var _0x453f91=_[_0x68ef('0x65')](_0x48f3f6,function(_0x8eb711){var _0x39ab6a=_0x8eb711[_0x68ef('0x3c')]({'plain':!![]});_0x39ab6a['Agents'][_0x68ef('0x66')](function(_0x428fd5){_0x428fd5[_0x68ef('0x67')]=_[_0x68ef('0x20')](_0xf9f2c4,{'id':_0x39ab6a['id']})[_0x68ef('0x67')];});return _0x39ab6a[_0x68ef('0x61')];});return db[_0x68ef('0x28')][_0x68ef('0x20')]({'where':{'id':_0x1d429a['params']['id']}})[_0x68ef('0x18')](function(_0x261ce6){return db[_0x68ef('0x68')][_0x68ef('0x69')](function(_0x2138cd){return _0x261ce6[_0x68ef('0x5e')](_0x4ae311,{'transaction':_0x2138cd})['then'](function(){return BPromise[_0x68ef('0x6a')](_0xf9f2c4,function(_0x13fae2){return db[_0x68ef('0x6b')][_0x68ef('0x6c')]({'TeamId':_0x13fae2['id'],'VoiceQueueId':_0x1d429a[_0x68ef('0x49')]['id'],'penalty':_0x13fae2['penalty']},{'transaction':_0x2138cd});});})[_0x68ef('0x18')](function(){return BPromise[_0x68ef('0x6a')](_0x453f91,function(_0x5d156e){return db['UserVoiceQueue'][_0x68ef('0x6d')]({'where':{'UserId':_0x5d156e['id'],'VoiceQueueId':_0x1d429a[_0x68ef('0x49')]['id']},'defaults':{'penalty':_0x5d156e[_0x68ef('0x67')]},'transaction':_0x2138cd});});})['then'](function(){return BPromise['each'](_[_0x68ef('0x53')](_0x453f91,{'online':!![]}),function(_0x10a3f9){return db[_0x68ef('0x6e')][_0x68ef('0x6c')]({'membername':_0x10a3f9[_0x68ef('0x22')],'UserId':_0x10a3f9['id'],'queue_name':_0x261ce6[_0x68ef('0x22')],'VoiceQueueId':_0x261ce6['id'],'interface':_[_0x68ef('0x6f')](_0x10a3f9[_0x68ef('0x64')])?util[_0x68ef('0x70')](_0x68ef('0x71'),_0x10a3f9[_0x68ef('0x22')]):_0x10a3f9[_0x68ef('0x64')],'paused':_0x10a3f9[_0x68ef('0x63')]||![],'penalty':_0x10a3f9[_0x68ef('0x67')]},{'transaction':_0x2138cd});});})['then'](function(){_0x453f91['forEach'](function(_0x503219){socket[_0x68ef('0x72')](_0x68ef('0x73'),{'UserId':_0x503219['id'],'VoiceQueueId':_0x261ce6['id']});});});});});}})[_0x68ef('0x18')](respondWithStatusCode(_0x4d96a9,null))['catch'](handleError(_0x4d96a9,null));};exports[_0x68ef('0x74')]=function(_0x3713e0,_0x5af5d0){return db['Team'][_0x68ef('0x2d')]({'where':{'id':_0x3713e0[_0x68ef('0x2c')][_0x68ef('0x75')]},'attributes':['id'],'include':[{'model':db['User'],'as':_0x68ef('0x61'),'attributes':['id'],'raw':!![]}]})[_0x68ef('0x18')](handleEntityNotFound(_0x5af5d0,null))[_0x68ef('0x18')](function(_0x48959f){var _0x1bb11f=_['map'](_0x48959f,'id');var _0x211d51=[];var _0x3e37e3=[];var _0x5168cd=squel[_0x68ef('0x76')]();_0x5168cd[_0x68ef('0x77')](_0x68ef('0x78'))[_0x68ef('0x79')](_0x68ef('0x7a'),'tq')[_0x68ef('0x7b')](_0x68ef('0x7c'),'ut',_0x68ef('0x7d'))[_0x68ef('0x51')]('VoiceQueueId\x20=\x20?',_0x3713e0[_0x68ef('0x49')]['id']);for(var _0x121a0f=0x0;_0x121a0f<_0x48959f[_0x68ef('0x36')];_0x121a0f+=0x1){let _0x465198=_0x48959f[_0x121a0f];for(var _0x3e3775=0x0;_0x3e3775<_0x465198[_0x68ef('0x61')][_0x68ef('0x36')];_0x3e3775+=0x1){let _0x4906d2=_0x465198['Agents'][_0x3e3775];var _0x1e8577=_0x5168cd['clone']();_0x1e8577[_0x68ef('0x51')](_0x68ef('0x7e'),_0x4906d2['id']);_0x3e37e3[_0x68ef('0x7f')](db[_0x68ef('0x68')]['query'](_0x1e8577[_0x68ef('0x80')](),{'type':db[_0x68ef('0x68')][_0x68ef('0x81')]['SELECT']})[_0x68ef('0x18')](function(_0xe82f3a){if(_0xe82f3a['length']===0x1){return _0x4906d2['id'];}else{var _0x3c3933=_[_0x68ef('0x82')](_['map'](_0xe82f3a,'TeamId'),function(_0x522ef7){return _[_0x68ef('0x83')](_0x1bb11f,_0x522ef7);});if(_0x3c3933){return _0x4906d2['id'];}}}));}}return BPromise[_0x68ef('0x84')](_0x3e37e3)[_0x68ef('0x18')](function(_0x3e92e0){_0x211d51=_(_0x211d51)[_0x68ef('0x85')](_0x3e92e0)[_0x68ef('0x86')]()[_0x68ef('0x1f')]();return db[_0x68ef('0x28')][_0x68ef('0x20')]({'where':{'id':_0x3713e0['params']['id']}})[_0x68ef('0x18')](function(_0x62a830){return db['sequelize'][_0x68ef('0x69')](function(_0x2374fa){return _0x62a830[_0x68ef('0x74')](_0x3713e0['query'][_0x68ef('0x75')],{'transaction':_0x2374fa})['then'](function(){if(!_[_0x68ef('0x87')](_0x211d51)){return _0x62a830[_0x68ef('0x88')](_0x211d51,{'transaction':_0x2374fa})[_0x68ef('0x18')](function(){return db[_0x68ef('0x6e')][_0x68ef('0x19')]({'where':{'VoiceQueueId':_0x3713e0[_0x68ef('0x49')]['id'],'UserId':_0x211d51},'transaction':_0x2374fa});});}})[_0x68ef('0x18')](function(){_0x211d51[_0x68ef('0x66')](function(_0x491464){socket[_0x68ef('0x72')](_0x68ef('0x89'),{'UserId':_0x491464,'VoiceQueueId':_0x62a830['id']});});});});});});})['then'](respondWithStatusCode(_0x5af5d0,null))[_0x68ef('0x2f')](handleError(_0x5af5d0,null));};exports[_0x68ef('0x8a')]=function(_0x430ef5,_0x1d3499){var _0x2b1686,_0x51c52b;return db[_0x68ef('0x28')][_0x68ef('0x20')]({'where':{'id':_0x430ef5[_0x68ef('0x49')]['id']}})[_0x68ef('0x18')](handleEntityNotFound(_0x1d3499,null))[_0x68ef('0x18')](function(_0x5548b1){if(_0x5548b1){_0x51c52b=_0x5548b1;return _0x5548b1[_0x68ef('0x8a')](_0x430ef5['body']['ids'],_[_0x68ef('0x43')](_0x430ef5[_0x68ef('0x3a')],[_0x68ef('0x75'),'id'])||{})[_0x68ef('0x8b')](function(_0x32e1e3){for(var _0x150e0d=0x0;_0x150e0d<_0x430ef5[_0x68ef('0x3a')][_0x68ef('0x75')]['length'];_0x150e0d+=0x1){socket[_0x68ef('0x72')](_0x68ef('0x73'),{'UserId':Number(_0x430ef5[_0x68ef('0x3a')][_0x68ef('0x75')][_0x150e0d]),'VoiceQueueId':Number(_0x430ef5[_0x68ef('0x49')]['id'])});}return _0x32e1e3;});}})[_0x68ef('0x18')](function(_0x39302e){_0x2b1686=_0x39302e||[];if(_0x51c52b){return db[_0x68ef('0x60')][_0x68ef('0x2d')]({'where':{'id':_0x430ef5[_0x68ef('0x3a')][_0x68ef('0x75')]},'attributes':['id',_0x68ef('0x22'),'online',_0x68ef('0x63'),_0x68ef('0x64')],'raw':!![]});}})[_0x68ef('0x18')](function(_0xe4c314){if(!_['isEmpty'](_0xe4c314)){var _0xc5163d=[];for(var _0xb342e5=0x0;_0xb342e5<_0xe4c314[_0x68ef('0x36')];_0xb342e5++){if(_0xe4c314[_0xb342e5]['online']){_0xc5163d[_0x68ef('0x7f')](db['UserVoiceQueueRt'][_0x68ef('0x6c')]({'membername':_0xe4c314[_0xb342e5][_0x68ef('0x22')],'UserId':_0xe4c314[_0xb342e5]['id'],'queue_name':_0x51c52b[_0x68ef('0x22')],'VoiceQueueId':_0x51c52b['id'],'interface':_[_0x68ef('0x6f')](_0xe4c314[_0xb342e5][_0x68ef('0x64')])?util['format']('SIP/%s',_0xe4c314[_0xb342e5]['name']):_0xe4c314[_0xb342e5][_0x68ef('0x64')],'paused':_0xe4c314[_0xb342e5][_0x68ef('0x63')]||![],'penalty':_0x430ef5['body'][_0x68ef('0x67')]||0x0}));}}return BPromise[_0x68ef('0x84')](_0xc5163d);}})[_0x68ef('0x18')](function(){return _0x2b1686;})[_0x68ef('0x18')](respondWithResult(_0x1d3499,null))[_0x68ef('0x2f')](handleError(_0x1d3499,null));};exports[_0x68ef('0x88')]=function(_0x34edc4,_0x1576ac){return db[_0x68ef('0x28')][_0x68ef('0x20')]({'where':{'id':_0x34edc4[_0x68ef('0x49')]['id']}})[_0x68ef('0x18')](handleEntityNotFound(_0x1576ac,null))[_0x68ef('0x18')](function(_0x31b61d){if(_0x31b61d){return _0x31b61d[_0x68ef('0x88')](_0x34edc4[_0x68ef('0x2c')]['ids'])[_0x68ef('0x18')](function(){if(_[_0x68ef('0x8c')](_0x34edc4['query'][_0x68ef('0x75')])){for(var _0x1774a9=0x0;_0x1774a9<_0x34edc4[_0x68ef('0x2c')][_0x68ef('0x75')][_0x68ef('0x36')];_0x1774a9+=0x1){socket[_0x68ef('0x72')](_0x68ef('0x89'),{'UserId':Number(_0x34edc4['query']['ids'][_0x1774a9]),'VoiceQueueId':Number(_0x34edc4[_0x68ef('0x49')]['id'])});}}else{socket[_0x68ef('0x72')]('userVoiceQueue:remove',{'UserId':Number(_0x34edc4[_0x68ef('0x2c')]['ids']),'VoiceQueueId':Number(_0x34edc4[_0x68ef('0x49')]['id'])});}});}})['then'](function(_0x3054e8){return db[_0x68ef('0x6e')][_0x68ef('0x19')]({'where':{'VoiceQueueId':_0x34edc4[_0x68ef('0x49')]['id'],'UserId':_0x34edc4[_0x68ef('0x2c')][_0x68ef('0x75')]}})[_0x68ef('0x18')](function(){return _0x3054e8;});})[_0x68ef('0x18')](respondWithStatusCode(_0x1576ac,null))['catch'](handleError(_0x1576ac,null));};exports[_0x68ef('0x8d')]=function(_0x60a1e7,_0x3bd9f2){var _0x3dd5f7={};var _0x35eba3={};var _0x18e166;var _0x3a6e25;return db[_0x68ef('0x28')][_0x68ef('0x4b')]({'where':{'id':_0x60a1e7['params']['id']}})[_0x68ef('0x18')](handleEntityNotFound(_0x3bd9f2,null))[_0x68ef('0x18')](function(_0x33ec8e){if(_0x33ec8e){_0x18e166=_0x33ec8e;_0x35eba3['model']=_[_0x68ef('0x32')](db[_0x68ef('0x60')][_0x68ef('0x29')]);_0x35eba3[_0x68ef('0x2c')]=_[_0x68ef('0x32')](_0x60a1e7[_0x68ef('0x2c')]);_0x35eba3[_0x68ef('0x4d')]=_[_0x68ef('0x33')](_0x35eba3[_0x68ef('0x31')],_0x35eba3[_0x68ef('0x2c')]);_0x3dd5f7[_0x68ef('0x34')]=_[_0x68ef('0x33')](_0x35eba3[_0x68ef('0x31')],qs[_0x68ef('0x35')](_0x60a1e7[_0x68ef('0x2c')]['fields']));_0x3dd5f7[_0x68ef('0x34')]=_0x3dd5f7[_0x68ef('0x34')]['length']?_0x3dd5f7[_0x68ef('0x34')]:_0x35eba3['model'];_0x3dd5f7[_0x68ef('0x4f')]=qs[_0x68ef('0x50')](_0x60a1e7[_0x68ef('0x2c')][_0x68ef('0x50')]);_0x3dd5f7[_0x68ef('0x51')]=qs[_0x68ef('0x4d')](_[_0x68ef('0x52')](_0x60a1e7[_0x68ef('0x2c')],_0x35eba3[_0x68ef('0x4d')]));if(_0x60a1e7[_0x68ef('0x2c')][_0x68ef('0x53')]){_0x3dd5f7[_0x68ef('0x51')]=_[_0x68ef('0x37')](_0x3dd5f7['where'],{'$or':_[_0x68ef('0x1e')](_0x3dd5f7[_0x68ef('0x34')],function(_0x2cf7d3){var _0x154c78={};_0x154c78[_0x2cf7d3]={'$like':'%'+_0x60a1e7['query'][_0x68ef('0x53')]+'%'};return _0x154c78;})});}_0x3dd5f7=_[_0x68ef('0x37')]({},_0x3dd5f7,_0x60a1e7[_0x68ef('0x38')]);return _0x18e166['getAgents'](_0x3dd5f7);}})[_0x68ef('0x18')](function(_0x225067){if(_0x225067){_0x3a6e25=_0x225067[_0x68ef('0x36')];if(!_0x60a1e7[_0x68ef('0x2c')][_0x68ef('0x4e')](_0x68ef('0x56'))){_0x3dd5f7[_0x68ef('0x14')]=qs['limit'](_0x60a1e7['query'][_0x68ef('0x14')]);_0x3dd5f7[_0x68ef('0x12')]=qs['offset'](_0x60a1e7['query'][_0x68ef('0x12')]);}return _0x18e166[_0x68ef('0x8d')](_0x3dd5f7);}})[_0x68ef('0x18')](function(_0x1e1738){if(_0x1e1738){return _0x1e1738?{'count':_0x3a6e25,'rows':_0x1e1738}:null;}})[_0x68ef('0x18')](respondWithResult(_0x3bd9f2,null))[_0x68ef('0x2f')](handleError(_0x3bd9f2,null));};exports[_0x68ef('0x8e')]=function(_0x13db31,_0x58800b){var _0x4cc80a={};var _0x3452d1={};var _0x1c5b4a;var _0x33dd03;return db['VoiceQueue'][_0x68ef('0x4b')]({'where':{'id':_0x13db31[_0x68ef('0x49')]['id']}})[_0x68ef('0x18')](handleEntityNotFound(_0x58800b,null))[_0x68ef('0x18')](function(_0x535c5c){if(_0x535c5c){_0x1c5b4a=_0x535c5c;_0x3452d1['model']=_[_0x68ef('0x32')](db[_0x68ef('0x6e')][_0x68ef('0x29')]);_0x3452d1['query']=_[_0x68ef('0x32')](_0x13db31[_0x68ef('0x2c')]);_0x3452d1[_0x68ef('0x4d')]=_[_0x68ef('0x33')](_0x3452d1[_0x68ef('0x31')],_0x3452d1[_0x68ef('0x2c')]);_0x4cc80a[_0x68ef('0x34')]=_[_0x68ef('0x33')](_0x3452d1[_0x68ef('0x31')],qs['fields'](_0x13db31[_0x68ef('0x2c')][_0x68ef('0x35')]));_0x4cc80a['attributes']=_0x4cc80a[_0x68ef('0x34')][_0x68ef('0x36')]?_0x4cc80a[_0x68ef('0x34')]:_0x3452d1[_0x68ef('0x31')];_0x4cc80a['order']=qs[_0x68ef('0x50')](_0x13db31[_0x68ef('0x2c')][_0x68ef('0x50')]);_0x4cc80a['where']=qs[_0x68ef('0x4d')](_['pick'](_0x13db31['query'],_0x3452d1['filters']));if(_0x13db31[_0x68ef('0x2c')][_0x68ef('0x53')]){_0x4cc80a['where']=_[_0x68ef('0x37')](_0x4cc80a['where'],{'$or':_['map'](_0x4cc80a[_0x68ef('0x34')],function(_0x103585){var _0xa28738={};_0xa28738[_0x103585]={'$like':'%'+_0x13db31[_0x68ef('0x2c')][_0x68ef('0x53')]+'%'};return _0xa28738;})});}_0x4cc80a=_[_0x68ef('0x37')]({},_0x4cc80a,_0x13db31[_0x68ef('0x38')]);return _0x1c5b4a[_0x68ef('0x8e')](_0x4cc80a);}})[_0x68ef('0x18')](function(_0xcd5609){if(_0xcd5609){_0x33dd03=_0xcd5609[_0x68ef('0x36')];if(!_0x13db31['query'][_0x68ef('0x4e')](_0x68ef('0x56'))){_0x4cc80a['limit']=qs[_0x68ef('0x14')](_0x13db31['query'][_0x68ef('0x14')]);_0x4cc80a[_0x68ef('0x12')]=qs[_0x68ef('0x12')](_0x13db31['query'][_0x68ef('0x12')]);}return _0x1c5b4a[_0x68ef('0x8e')](_0x4cc80a);}})[_0x68ef('0x18')](function(_0x799597){return _0x799597?{'count':_0x33dd03,'rows':_0x799597}:null;})[_0x68ef('0x18')](respondWithResult(_0x58800b,null))[_0x68ef('0x2f')](handleError(_0x58800b,null));};exports['getLists']=function(_0x5e4ec4,_0x40c6ec){var _0x4a45f9={};var _0x16ba3d={};var _0x405008;var _0x3ecec3;return db[_0x68ef('0x28')][_0x68ef('0x4b')]({'where':{'id':_0x5e4ec4[_0x68ef('0x49')]['id']}})[_0x68ef('0x18')](handleEntityNotFound(_0x40c6ec,null))[_0x68ef('0x18')](function(_0x4d4bfa){if(_0x4d4bfa){_0x405008=_0x4d4bfa;_0x16ba3d[_0x68ef('0x31')]=_[_0x68ef('0x32')](db[_0x68ef('0x8f')]['rawAttributes']);_0x16ba3d[_0x68ef('0x2c')]=_[_0x68ef('0x32')](_0x5e4ec4[_0x68ef('0x2c')]);_0x16ba3d[_0x68ef('0x4d')]=_[_0x68ef('0x33')](_0x16ba3d[_0x68ef('0x31')],_0x16ba3d[_0x68ef('0x2c')]);_0x4a45f9[_0x68ef('0x34')]=_[_0x68ef('0x33')](_0x16ba3d['model'],qs['fields'](_0x5e4ec4[_0x68ef('0x2c')][_0x68ef('0x35')]));_0x4a45f9['attributes']=_0x4a45f9[_0x68ef('0x34')][_0x68ef('0x36')]?_0x4a45f9['attributes']:_0x16ba3d['model'];_0x4a45f9['order']=qs['sort'](_0x5e4ec4[_0x68ef('0x2c')]['sort']);_0x4a45f9[_0x68ef('0x51')]=qs['filters'](_[_0x68ef('0x52')](_0x5e4ec4[_0x68ef('0x2c')],_0x16ba3d['filters']));if(_0x5e4ec4['query']['filter']){_0x4a45f9[_0x68ef('0x51')]=_[_0x68ef('0x37')](_0x4a45f9[_0x68ef('0x51')],{'$or':_['map'](_0x4a45f9[_0x68ef('0x34')],function(_0x4898ad){var _0x22a810={};_0x22a810[_0x4898ad]={'$like':'%'+_0x5e4ec4['query'][_0x68ef('0x53')]+'%'};return _0x22a810;})});}_0x4a45f9=_[_0x68ef('0x37')]({},_0x4a45f9,_0x5e4ec4[_0x68ef('0x38')]);return _0x405008[_0x68ef('0x90')](_0x4a45f9);}})[_0x68ef('0x18')](function(_0x3f9113){if(_0x3f9113){_0x3ecec3=_0x3f9113[_0x68ef('0x36')];if(!_0x5e4ec4['query'][_0x68ef('0x4e')](_0x68ef('0x56'))){_0x4a45f9[_0x68ef('0x14')]=qs[_0x68ef('0x14')](_0x5e4ec4[_0x68ef('0x2c')][_0x68ef('0x14')]);_0x4a45f9[_0x68ef('0x12')]=qs['offset'](_0x5e4ec4[_0x68ef('0x2c')][_0x68ef('0x12')]);}return _0x405008[_0x68ef('0x90')](_0x4a45f9);}})[_0x68ef('0x18')](function(_0x2a93bf){if(_0x2a93bf){return _0x2a93bf?{'count':_0x3ecec3,'rows':_0x2a93bf}:null;}})[_0x68ef('0x18')](respondWithResult(_0x40c6ec,null))[_0x68ef('0x2f')](handleError(_0x40c6ec,null));};exports[_0x68ef('0x91')]=function(_0x2d0bf5,_0x40da26){var _0x202e78=moment()[_0x68ef('0x70')]('YYYY-MM-DD\x20HH:mm:ss');var _0x253b31,_0x14b845;return db[_0x68ef('0x28')][_0x68ef('0x20')]({'where':{'id':_0x2d0bf5['params']['id']}})['then'](handleEntityNotFound(_0x40da26,null))['then'](function(_0x2e6bcf){if(_0x2e6bcf){_0x14b845=_0x2e6bcf;return _0x2e6bcf[_0x68ef('0x91')](_0x2d0bf5[_0x68ef('0x3a')][_0x68ef('0x75')],_['omit'](_0x2d0bf5['body'],['ids','id'])||{});}return null;})[_0x68ef('0x8b')](function(_0x12dbe5){var _0x547e6d;_0x253b31=_0x12dbe5||[];var _0x575f73=[];if(_0x12dbe5){for(var _0x6dc883=0x0;_0x6dc883<_0x12dbe5[_0x68ef('0x36')];_0x6dc883+=0x1){var _0x1dcc3e=_0x12dbe5[_0x6dc883][_0x68ef('0x3c')]({'plain':!![]});_0x14b845[_0x68ef('0x92')]=_0x2d0bf5[_0x68ef('0x3a')][_0x68ef('0x92')]?_0x2d0bf5['body'][_0x68ef('0x92')]:_0x14b845[_0x68ef('0x92')];switch(_0x14b845[_0x68ef('0x92')]){case _0x68ef('0x93'):_0x547e6d=squel[_0x68ef('0x94')]()['into'](_0x68ef('0x95'))[_0x68ef('0x96')](['phone',_0x68ef('0x97'),_0x68ef('0x98'),_0x68ef('0x99'),_0x68ef('0x57'),'createdAt',_0x68ef('0x44')],squel['select']()[_0x68ef('0x77')](_0x68ef('0x9a'),_0x68ef('0x9a'))['field']('\x27'+_0x202e78+'\x27',_0x68ef('0x97'))[_0x68ef('0x77')]('id','ContactId')['field'](_0x1dcc3e[_0x68ef('0x9b')][_0x68ef('0x80')](),'ListId')['field'](_0x2d0bf5[_0x68ef('0x49')]['id'][_0x68ef('0x80')](),_0x68ef('0x57'))[_0x68ef('0x77')]('\x27'+_0x202e78+'\x27',_0x68ef('0x45'))[_0x68ef('0x77')]('\x27'+_0x202e78+'\x27',_0x68ef('0x44'))['from'](_0x68ef('0x9c'))[_0x68ef('0x51')](_0x68ef('0x9d'))[_0x68ef('0x51')](_0x68ef('0x9e'),_0x1dcc3e[_0x68ef('0x9b')][_0x68ef('0x80')]())[_0x68ef('0x51')](_0x68ef('0x9f'))[_0x68ef('0x51')](_0x68ef('0xa0'),squel[_0x68ef('0x76')]()[_0x68ef('0x77')](_0x68ef('0xa1'))[_0x68ef('0x79')]('cm_hopper_final')['where'](_0x68ef('0xa2'),_0x2d0bf5[_0x68ef('0x49')]['id'][_0x68ef('0x80')]()))[_0x68ef('0x51')]('phone\x20NOT\x20IN\x20(?)',squel[_0x68ef('0x76')]()[_0x68ef('0x77')]('COALESCE(phone,\x27\x27)')['from']('cm_hopper')[_0x68ef('0x51')](_0x68ef('0xa2'),_0x2d0bf5[_0x68ef('0x49')]['id']['toString']())))[_0x68ef('0x80')]();break;case'onlyIfOpen':_0x547e6d=squel[_0x68ef('0x94')]()[_0x68ef('0xa3')](_0x68ef('0x95'))[_0x68ef('0x96')]([_0x68ef('0x9a'),_0x68ef('0x97'),_0x68ef('0x98'),_0x68ef('0x99'),_0x68ef('0x57'),_0x68ef('0x45'),_0x68ef('0x44')],squel[_0x68ef('0x76')]()['field'](_0x68ef('0x9a'),_0x68ef('0x9a'))[_0x68ef('0x77')]('\x27'+_0x202e78+'\x27',_0x68ef('0x97'))[_0x68ef('0x77')]('id',_0x68ef('0x98'))['field'](_0x1dcc3e[_0x68ef('0x9b')][_0x68ef('0x80')](),_0x68ef('0x99'))[_0x68ef('0x77')](_0x2d0bf5['params']['id']['toString'](),_0x68ef('0x57'))['field']('\x27'+_0x202e78+'\x27',_0x68ef('0x45'))[_0x68ef('0x77')]('\x27'+_0x202e78+'\x27',_0x68ef('0x44'))[_0x68ef('0x79')](_0x68ef('0x9c'))[_0x68ef('0x51')](_0x68ef('0x9d'))[_0x68ef('0x51')](_0x68ef('0x9e'),_0x1dcc3e[_0x68ef('0x9b')][_0x68ef('0x80')]())[_0x68ef('0x51')](_0x68ef('0x9f'))[_0x68ef('0x51')](_0x68ef('0xa0'),squel[_0x68ef('0x76')]()[_0x68ef('0x77')](_0x68ef('0xa4'))[_0x68ef('0x79')]('cm_hopper')['where'](_0x68ef('0xa2'),_0x2d0bf5[_0x68ef('0x49')]['id'][_0x68ef('0x80')]())))[_0x68ef('0x80')]();break;default:_0x547e6d=squel[_0x68ef('0x94')]()[_0x68ef('0xa3')]('cm_hopper')[_0x68ef('0x96')]([_0x68ef('0x9a'),_0x68ef('0x97'),_0x68ef('0x98'),_0x68ef('0x99'),'VoiceQueueId','createdAt',_0x68ef('0x44')],squel[_0x68ef('0x76')]()[_0x68ef('0x77')](_0x68ef('0x9a'),_0x68ef('0x9a'))[_0x68ef('0x77')]('\x27'+_0x202e78+'\x27',_0x68ef('0x97'))['field']('id','ContactId')[_0x68ef('0x77')](_0x1dcc3e[_0x68ef('0x9b')][_0x68ef('0x80')](),'ListId')[_0x68ef('0x77')](_0x2d0bf5[_0x68ef('0x49')]['id'][_0x68ef('0x80')](),_0x68ef('0x57'))[_0x68ef('0x77')]('\x27'+_0x202e78+'\x27',_0x68ef('0x45'))[_0x68ef('0x77')]('\x27'+_0x202e78+'\x27',_0x68ef('0x44'))['from'](_0x68ef('0x9c'))['where'](_0x68ef('0x9d'))[_0x68ef('0x51')](_0x68ef('0x9e'),_0x1dcc3e['CmListId'][_0x68ef('0x80')]())[_0x68ef('0x51')](_0x68ef('0x9f')))[_0x68ef('0x80')]();}_0x575f73[_0x68ef('0x7f')](db[_0x68ef('0x68')][_0x68ef('0x2c')](_0x547e6d));}return BPromise[_0x68ef('0x84')](_0x575f73);}})[_0x68ef('0x18')](function(){var _0x54b4cc=[];var _0x59637f=squel[_0x68ef('0x94')]()[_0x68ef('0xa3')](_0x68ef('0xa5'))['fromQuery']([_0x68ef('0xa6'),_0x68ef('0x9a'),_0x68ef('0xa7'),'createdAt','updatedAt'],squel[_0x68ef('0x76')]()[_0x68ef('0x77')](_0x68ef('0xa8'))[_0x68ef('0x77')](_0x68ef('0xa9'))[_0x68ef('0x77')]('ci.OrderBy+1')['field']('\x27'+_0x202e78+'\x27',_0x68ef('0x45'))[_0x68ef('0x77')]('\x27'+_0x202e78+'\x27',_0x68ef('0x44'))['from'](_0x68ef('0xaa'),'ci')[_0x68ef('0x7b')](_0x68ef('0x95'),'h',_0x68ef('0xab'))[_0x68ef('0x51')]('h.scheduledat=?',_0x202e78)[_0x68ef('0x51')](_0x68ef('0xac'),_0x68ef('0xad')))['toString']();_0x54b4cc[_0x68ef('0x7f')](db[_0x68ef('0x68')][_0x68ef('0x2c')](_0x59637f));return BPromise[_0x68ef('0x84')](_0x54b4cc);})[_0x68ef('0x18')](function(){return _0x253b31;})[_0x68ef('0x18')](respondWithResult(_0x40da26,null))[_0x68ef('0x2f')](handleError(_0x40da26,null));};exports[_0x68ef('0xae')]=function(_0x58d5da,_0x1873b5){return db[_0x68ef('0x28')][_0x68ef('0x20')]({'where':{'id':_0x58d5da[_0x68ef('0x49')]['id']}})['then'](handleEntityNotFound(_0x1873b5,null))[_0x68ef('0x18')](function(_0x351b99){if(_0x351b99){return _0x351b99[_0x68ef('0xae')](_0x58d5da[_0x68ef('0x2c')][_0x68ef('0x75')]);}})['then'](function(_0x5b41f0){if(_0x5b41f0){return db[_0x68ef('0x4c')]['destroy']({'where':{'ListId':_0x58d5da['query'][_0x68ef('0x75')],'VoiceQueueId':_0x58d5da[_0x68ef('0x49')]['id']}})[_0x68ef('0x18')](function(){return _0x5b41f0;});}})[_0x68ef('0x18')](respondWithStatusCode(_0x1873b5,null))[_0x68ef('0x2f')](handleError(_0x1873b5,null));};exports[_0x68ef('0xaf')]=function(_0x3ee069,_0x5f49e9){var _0x40cd91={};var _0x848118={};var _0x794d1e;var _0x266f6c;return db[_0x68ef('0x28')]['findOne']({'where':{'id':_0x3ee069[_0x68ef('0x49')]['id']}})[_0x68ef('0x18')](handleEntityNotFound(_0x5f49e9,null))[_0x68ef('0x18')](function(_0x2b5994){if(_0x2b5994){_0x794d1e=_0x2b5994;_0x848118[_0x68ef('0x31')]=_[_0x68ef('0x32')](db[_0x68ef('0x8f')][_0x68ef('0x29')]);_0x848118['query']=_[_0x68ef('0x32')](_0x3ee069[_0x68ef('0x2c')]);_0x848118[_0x68ef('0x4d')]=_[_0x68ef('0x33')](_0x848118[_0x68ef('0x31')],_0x848118[_0x68ef('0x2c')]);_0x40cd91[_0x68ef('0x34')]=_[_0x68ef('0x33')](_0x848118['model'],qs[_0x68ef('0x35')](_0x3ee069[_0x68ef('0x2c')][_0x68ef('0x35')]));_0x40cd91[_0x68ef('0x34')]=_0x40cd91[_0x68ef('0x34')]['length']?_0x40cd91[_0x68ef('0x34')]:_0x848118[_0x68ef('0x31')];_0x40cd91[_0x68ef('0x4f')]=qs[_0x68ef('0x50')](_0x3ee069[_0x68ef('0x2c')][_0x68ef('0x50')]);_0x40cd91[_0x68ef('0x51')]=qs[_0x68ef('0x4d')](_[_0x68ef('0x52')](_0x3ee069[_0x68ef('0x2c')],_0x848118[_0x68ef('0x4d')]));if(_0x3ee069[_0x68ef('0x2c')][_0x68ef('0x53')]){_0x40cd91['where']=_[_0x68ef('0x37')](_0x40cd91[_0x68ef('0x51')],{'$or':_[_0x68ef('0x1e')](_0x40cd91[_0x68ef('0x34')],function(_0x124eda){var _0x4b738d={};_0x4b738d[_0x124eda]={'$like':'%'+_0x3ee069[_0x68ef('0x2c')]['filter']+'%'};return _0x4b738d;})});}_0x40cd91=_['merge']({},_0x40cd91,_0x3ee069[_0x68ef('0x38')]);return _0x794d1e['getBlackLists'](_0x40cd91);}})['then'](function(_0x4210c0){if(_0x4210c0){_0x266f6c=_0x4210c0['length'];if(!_0x3ee069[_0x68ef('0x2c')][_0x68ef('0x4e')](_0x68ef('0x56'))){_0x40cd91[_0x68ef('0x14')]=qs[_0x68ef('0x14')](_0x3ee069[_0x68ef('0x2c')][_0x68ef('0x14')]);_0x40cd91[_0x68ef('0x12')]=qs['offset'](_0x3ee069['query'][_0x68ef('0x12')]);}return _0x794d1e[_0x68ef('0xaf')](_0x40cd91);}})[_0x68ef('0x18')](function(_0x23946d){if(_0x23946d){return _0x23946d?{'count':_0x266f6c,'rows':_0x23946d}:null;}})[_0x68ef('0x18')](respondWithResult(_0x5f49e9,null))[_0x68ef('0x2f')](handleError(_0x5f49e9,null));};exports[_0x68ef('0xb0')]=function(_0xcc1765,_0x29662c){var _0x1185bd;return db[_0x68ef('0x28')][_0x68ef('0x20')]({'where':{'id':_0xcc1765['params']['id']}})[_0x68ef('0x18')](handleEntityNotFound(_0x29662c,null))['then'](function(_0x30876d){if(_0x30876d){return _0x30876d[_0x68ef('0xb0')](_0xcc1765[_0x68ef('0x3a')][_0x68ef('0x75')],_['omit'](_0xcc1765[_0x68ef('0x3a')],[_0x68ef('0x75'),'id'])||{});}return null;})[_0x68ef('0x8b')](function(_0x295b66){var _0x3455b5;_0x1185bd=_0x295b66||[];var _0xbf2168=[];if(_0x295b66){for(var _0x4cf8b6=0x0;_0x4cf8b6<_0x295b66[_0x68ef('0x36')];_0x4cf8b6+=0x1){var _0x4e3f0a=_0x295b66[_0x4cf8b6][_0x68ef('0x3c')]({'plain':!![]});_0x3455b5=squel[_0x68ef('0x94')]()[_0x68ef('0xa3')](_0x68ef('0xb1'))[_0x68ef('0x96')]([_0x68ef('0x9a'),'ContactId','ListId','VoiceQueueId',_0x68ef('0x45'),_0x68ef('0x44')],squel['select']()[_0x68ef('0x77')](_0x68ef('0x9a'),_0x68ef('0x9a'))[_0x68ef('0x77')]('id','ContactId')[_0x68ef('0x77')](_0x4e3f0a[_0x68ef('0x9b')][_0x68ef('0x80')](),_0x68ef('0x99'))[_0x68ef('0x77')](_0xcc1765[_0x68ef('0x49')]['id'][_0x68ef('0x80')](),_0x68ef('0x57'))[_0x68ef('0x77')](_0x68ef('0xb2'),'createdAt')[_0x68ef('0x77')](_0x68ef('0xb2'),_0x68ef('0x44'))[_0x68ef('0x79')]('cm_contacts')[_0x68ef('0x51')](_0x68ef('0x9d'))[_0x68ef('0x51')](_0x68ef('0x9e'),_0x4e3f0a['CmListId'][_0x68ef('0x80')]())[_0x68ef('0x51')](_0x68ef('0x9f')))['toString']();_0xbf2168['push'](db['sequelize'][_0x68ef('0x2c')](_0x3455b5));}return BPromise['all'](_0xbf2168);}})['then'](function(){return _0x1185bd;})[_0x68ef('0x18')](respondWithResult(_0x29662c,null))['catch'](handleError(_0x29662c,null));};exports[_0x68ef('0xb3')]=function(_0x398899,_0x8dd212){return db[_0x68ef('0x28')]['find']({'where':{'id':_0x398899[_0x68ef('0x49')]['id']}})[_0x68ef('0x18')](handleEntityNotFound(_0x8dd212,null))[_0x68ef('0x18')](function(_0x57d305){if(_0x57d305){return _0x57d305[_0x68ef('0xb3')](_0x398899[_0x68ef('0x2c')][_0x68ef('0x75')]);}})['then'](function(_0x4c6756){if(_0x4c6756){return db[_0x68ef('0x5b')]['destroy']({'where':{'ListId':_0x398899[_0x68ef('0x2c')]['ids'],'VoiceQueueId':_0x398899['params']['id']}})['then'](function(){return _0x4c6756;});}})[_0x68ef('0x18')](respondWithStatusCode(_0x8dd212,null))[_0x68ef('0x2f')](handleError(_0x8dd212,null));};
\ No newline at end of file
+var _0x4b84=['type','find','UserProfileResource','stack','name','send','index','rawAttributes','fieldName','key','getOptions','where','VoiceQueue','include','findAll','rows','catch','show','params','model','keys','query','filters','intersection','attributes','fields','length','includeAll','merge','options','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','omit','createdAt','updatedAt','userProfileId','findOne','hasOwnProperty','nolimit','order','sort','VoiceQueueId','CmHopper','getHopperHistories','pick','CmHopperHistory','CmHopperFinal','CmHopperBlack','getTeams','Team','addTeams','User','Agents','voicePause','interface','forEach','penalty','transaction','TeamVoiceQueue','each','UserVoiceQueue','UserVoiceQueueRt','upsert','format','SIP/%s','emit','ids','field','from','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','VoiceQueueId\x20=\x20?','ut.UserId\x20=\x20?','push','toString','sequelize','SELECT','TeamId','all','removeTeams','isEmpty','removeAgents','addAgents','spread','userVoiceQueue:save','online','isNil','isArray','userVoiceQueue:remove','getAgents','getMembers','getLists','CmList','addLists','dialCheckDuplicateType','fromQuery','phone','scheduledAt','ContactId','ListId','select','cm_contacts','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','CmListId','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','cm_hopper_final','COALESCE(phone,\x27\x27)','cm_hopper','onlyIfOpen','insert','into','CmHopperId','OrderBy','h.id','ci.item','ci.OrderBy+1','cm_contact_has_items','h.scheduledat=?','ci.ItemClass=?','removeLists','getBlackLists','NOW()','removeBlackLists','moment','bluebird','squel','../../config/logger','api','../../config/environment','redis','socket.io-emitter','./voiceQueue.socket','sendStatus','end','status','json','undefined','count','offset','limit','update','destroy','then','get','VoiceQueues','inbound','QueueCampaigns','outbound','filter','ignore','map','value'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x4b84,0x1cc));var _0x44b8=function(_0x2a8860,_0x2da926){_0x2a8860=_0x2a8860-0x0;var _0x2f47a4=_0x4b84[_0x2a8860];return _0x2f47a4;};'use strict';var moment=require(_0x44b8('0x0'));var BPromise=require(_0x44b8('0x1'));var util=require('util');var _=require('lodash');var squel=require(_0x44b8('0x2'));var Redis=require('ioredis');var qs=require('../../components/parsers/qs');var logger=require(_0x44b8('0x3'))(_0x44b8('0x4'));var config=require(_0x44b8('0x5'));var db=require('../../mysqldb')['db'];config['redis']=_['defaults'](config[_0x44b8('0x6')],{'host':'localhost','port':0x18eb});var socket=require(_0x44b8('0x7'))(new Redis(config['redis']));require(_0x44b8('0x8'))['register'](socket);function respondWithStatusCode(_0x5034b6,_0x41d515){_0x41d515=_0x41d515||0xcc;return function(_0x42319d){if(_0x42319d){return _0x5034b6[_0x44b8('0x9')](_0x41d515);}return _0x5034b6['status'](_0x41d515)[_0x44b8('0xa')]();};}function respondWithResult(_0x2cc74b,_0x4315f6){_0x4315f6=_0x4315f6||0xc8;return function(_0x9b6048){if(_0x9b6048){return _0x2cc74b[_0x44b8('0xb')](_0x4315f6)[_0x44b8('0xc')](_0x9b6048);}};}function respondWithFilteredResult(_0xe9a025,_0x4ae8a1){return function(_0x147529){if(_0x147529){var _0x4301a6=typeof _0x4ae8a1['offset']===_0x44b8('0xd')&&typeof _0x4ae8a1['limit']===_0x44b8('0xd');var _0x18d642=_0x147529['count'];var _0x63e8f6=_0x4301a6?0x0:_0x4ae8a1['offset'];var _0x54fa95=_0x4301a6?_0x147529[_0x44b8('0xe')]:_0x4ae8a1[_0x44b8('0xf')]+_0x4ae8a1[_0x44b8('0x10')];var _0x41ab46;if(_0x54fa95>=_0x18d642){_0x54fa95=_0x18d642;_0x41ab46=0xc8;}else{_0x41ab46=0xce;}_0xe9a025['status'](_0x41ab46);return _0xe9a025['set']('Content-Range',_0x63e8f6+'-'+_0x54fa95+'/'+_0x18d642)[_0x44b8('0xc')](_0x147529);}return null;};}function saveUpdates(_0x5b7803){return function(_0x28ef36){if(_0x28ef36){return _0x28ef36[_0x44b8('0x11')](_0x5b7803)['then'](function(_0x36743e){return _0x36743e;});}return null;};}function removeEntity(_0xe3de8f){return function(_0x5103f5){if(_0x5103f5){return _0x5103f5[_0x44b8('0x12')]()[_0x44b8('0x13')](function(){var _0x4b600f=_0x5103f5[_0x44b8('0x14')]({'plain':!![]});var _0x8b4301=[{'name':_0x44b8('0x15'),'value':_0x44b8('0x16'),'ignore':![]},{'name':_0x44b8('0x17'),'value':_0x44b8('0x18'),'ignore':![]}];var _0x452f2f=_(_0x8b4301)[_0x44b8('0x19')](_0x44b8('0x1a'))[_0x44b8('0x1b')](_0x44b8('0x1c'))[_0x44b8('0x1c')]();if(_['includes'](_0x452f2f,_0x4b600f[_0x44b8('0x1d')])){return;}var _0x3a8aa4=_[_0x44b8('0x1e')](_0x8b4301,[_0x44b8('0x1c'),_0x4b600f[_0x44b8('0x1d')]])['name'];return db[_0x44b8('0x1f')]['destroy']({'where':{'type':_0x3a8aa4,'resourceId':_0x4b600f['id']}})[_0x44b8('0x13')](function(){return _0x5103f5;});})[_0x44b8('0x13')](function(){_0xe3de8f[_0x44b8('0xb')](0xcc)[_0x44b8('0xa')]();});}};}function handleEntityNotFound(_0x230a3d){return function(_0x59acbc){if(!_0x59acbc){_0x230a3d[_0x44b8('0x9')](0x194);}return _0x59acbc;};}function handleError(_0x502acf,_0x41d673){_0x41d673=_0x41d673||0x1f4;return function(_0x350482){logger['error'](_0x350482[_0x44b8('0x20')]);if(_0x350482[_0x44b8('0x21')]){delete _0x350482[_0x44b8('0x21')];}_0x502acf['status'](_0x41d673)[_0x44b8('0x22')](_0x350482);};}exports[_0x44b8('0x23')]=function(_0x53d9c7,_0x2e0174){var _0x4a182d={};var _0xfb0028={'count':0x0,'rows':[]};var _0x5a544c=_['map'](db['VoiceQueue'][_0x44b8('0x24')],function(_0x29b18d){return{'name':_0x29b18d[_0x44b8('0x25')],'type':_0x29b18d[_0x44b8('0x1d')][_0x44b8('0x26')]};});_0x4a182d=qs[_0x44b8('0x27')](_0x5a544c,_0x53d9c7);var _0x2cf205={'where':_0x4a182d[_0x44b8('0x28')]};return db[_0x44b8('0x29')][_0x44b8('0xe')](_0x2cf205)[_0x44b8('0x13')](function(_0x417d81){_0xfb0028[_0x44b8('0xe')]=_0x417d81;_0x4a182d['include']=qs[_0x44b8('0x2a')](_0x53d9c7['query']);return db[_0x44b8('0x29')][_0x44b8('0x2b')](_0x4a182d);})[_0x44b8('0x13')](function(_0xb64609){_0xfb0028[_0x44b8('0x2c')]=_0xb64609;return _0xfb0028;})['then'](respondWithFilteredResult(_0x2e0174,_0x4a182d))[_0x44b8('0x2d')](handleError(_0x2e0174,null));};exports[_0x44b8('0x2e')]=function(_0x26265f,_0x339f0f){var _0x46b008={'raw':![],'where':{'id':_0x26265f[_0x44b8('0x2f')]['id']}},_0x5f541d={};_0x5f541d[_0x44b8('0x30')]=_[_0x44b8('0x31')](db[_0x44b8('0x29')][_0x44b8('0x24')]);_0x5f541d[_0x44b8('0x32')]=_[_0x44b8('0x31')](_0x26265f[_0x44b8('0x32')]);_0x5f541d[_0x44b8('0x33')]=_[_0x44b8('0x34')](_0x5f541d[_0x44b8('0x30')],_0x5f541d[_0x44b8('0x32')]);_0x46b008[_0x44b8('0x35')]=_[_0x44b8('0x34')](_0x5f541d[_0x44b8('0x30')],qs[_0x44b8('0x36')](_0x26265f[_0x44b8('0x32')][_0x44b8('0x36')]));_0x46b008[_0x44b8('0x35')]=_0x46b008[_0x44b8('0x35')][_0x44b8('0x37')]?_0x46b008[_0x44b8('0x35')]:_0x5f541d['model'];if(_0x26265f[_0x44b8('0x32')][_0x44b8('0x38')]){_0x46b008['include']=[{'all':!![]}];}_0x46b008=_[_0x44b8('0x39')]({},_0x46b008,_0x26265f[_0x44b8('0x3a')]);return db[_0x44b8('0x29')][_0x44b8('0x1e')](_0x46b008)['then'](handleEntityNotFound(_0x339f0f,null))[_0x44b8('0x13')](respondWithResult(_0x339f0f,null))[_0x44b8('0x2d')](handleError(_0x339f0f,null));};exports[_0x44b8('0x3b')]=function(_0x1ee3cc,_0x9cb2a){return db[_0x44b8('0x29')][_0x44b8('0x3b')](_0x1ee3cc[_0x44b8('0x3c')],{})[_0x44b8('0x13')](function(_0x3d1be1){var _0x1c9983=_0x1ee3cc[_0x44b8('0x3d')][_0x44b8('0x14')]({'plain':!![]});if(!_0x1c9983)throw new Error(_0x44b8('0x3e'));if(_0x1c9983[_0x44b8('0x3f')]===_0x44b8('0x3d')){var _0x57d8c4=_0x3d1be1[_0x44b8('0x14')]({'plain':!![]});var _0x43e43a=[{'name':_0x44b8('0x15'),'value':'inbound'},{'name':_0x44b8('0x17'),'value':_0x44b8('0x18')}];var _0x229cc9=_['find'](_0x43e43a,[_0x44b8('0x1c'),_0x57d8c4[_0x44b8('0x1d')]])[_0x44b8('0x21')];return db[_0x44b8('0x40')][_0x44b8('0x1e')]({'where':{'name':_0x229cc9,'userProfileId':_0x1c9983['userProfileId']},'raw':!![]})['then'](function(_0x215f7b){if(_0x215f7b&&_0x215f7b[_0x44b8('0x41')]===0x0){return db[_0x44b8('0x1f')][_0x44b8('0x3b')]({'name':_0x57d8c4[_0x44b8('0x21')],'resourceId':_0x57d8c4['id'],'type':_0x215f7b[_0x44b8('0x21')],'sectionId':_0x215f7b['id']},{})[_0x44b8('0x13')](function(){return _0x3d1be1;});}else{return _0x3d1be1;}})[_0x44b8('0x2d')](function(_0x455fd6){logger[_0x44b8('0x42')](_0x44b8('0x43'),_0x455fd6);throw _0x455fd6;});}return _0x3d1be1;})[_0x44b8('0x13')](respondWithResult(_0x9cb2a,0xc9))[_0x44b8('0x2d')](handleError(_0x9cb2a,null));};exports[_0x44b8('0x44')]=function(_0x149731,_0x60eeb2){var _0xce06dc={'where':{'id':_0x149731[_0x44b8('0x2f')]['id']}},_0x3b3d5d={};_0x3b3d5d['model']=_['keys'](db[_0x44b8('0x29')][_0x44b8('0x24')]);_0xce06dc[_0x44b8('0x35')]=_[_0x44b8('0x34')](_0x3b3d5d[_0x44b8('0x30')],qs[_0x44b8('0x36')](_0x149731[_0x44b8('0x32')]['fields']));_0xce06dc[_0x44b8('0x35')]=_0xce06dc['attributes'][_0x44b8('0x37')]?_0xce06dc[_0x44b8('0x35')]:_0x3b3d5d[_0x44b8('0x30')];if(_0x149731[_0x44b8('0x32')][_0x44b8('0x38')]){_0xce06dc[_0x44b8('0x2a')]=[{'all':!![]}];}_0xce06dc=_['merge']({},_0xce06dc,_0x149731[_0x44b8('0x3a')]);return db[_0x44b8('0x29')][_0x44b8('0x1e')](_0xce06dc)[_0x44b8('0x13')](handleEntityNotFound(_0x60eeb2,null))['then'](function(_0x4e4ed1){if(_0x4e4ed1){var _0x2f549d=_0x4e4ed1[_0x44b8('0x14')]({'plain':!![]});_0x2f549d=qs[_0x44b8('0x45')](_0x2f549d,['id',_0x44b8('0x46'),_0x44b8('0x47')]);_0x149731['body']=_[_0x44b8('0x45')](_0x149731[_0x44b8('0x3c')],['id',_0x44b8('0x46'),_0x44b8('0x47')]);return db[_0x44b8('0x29')]['create'](_['merge'](_0x2f549d,_0x149731[_0x44b8('0x3c')]),{'include':_0x149731['query'][_0x44b8('0x38')]?[{'all':!![]}]:undefined})['then'](function(_0x40164d){var _0x434d6a=_0x149731[_0x44b8('0x3d')][_0x44b8('0x14')]({'plain':!![]});if(!_0x434d6a)throw new Error(_0x44b8('0x3e'));if(_0x434d6a[_0x44b8('0x3f')]===_0x44b8('0x3d')){var _0x533967=_0x40164d[_0x44b8('0x14')]({'plain':!![]});var _0x37b2c2=[{'name':_0x44b8('0x15'),'value':'inbound'},{'name':_0x44b8('0x17'),'value':_0x44b8('0x18')}];var _0x45f9a0=_[_0x44b8('0x1e')](_0x37b2c2,['value',_0x533967[_0x44b8('0x1d')]])[_0x44b8('0x21')];return db['UserProfileSection'][_0x44b8('0x1e')]({'where':{'name':_0x45f9a0,'userProfileId':_0x434d6a[_0x44b8('0x48')]},'raw':!![]})[_0x44b8('0x13')](function(_0x3df6aa){if(_0x3df6aa&&_0x3df6aa[_0x44b8('0x41')]===0x0){return db['UserProfileResource']['create']({'name':_0x533967[_0x44b8('0x21')],'resourceId':_0x533967['id'],'type':_0x3df6aa[_0x44b8('0x21')],'sectionId':_0x3df6aa['id']},{})[_0x44b8('0x13')](function(){return _0x40164d;});}else{return _0x40164d;}})[_0x44b8('0x2d')](function(_0x765e45){logger[_0x44b8('0x42')](_0x44b8('0x43'),_0x765e45);throw _0x765e45;});}return _0x40164d;});}})[_0x44b8('0x13')](respondWithResult(_0x60eeb2,0xc9))[_0x44b8('0x2d')](handleError(_0x60eeb2,null));};exports[_0x44b8('0x11')]=function(_0x16c628,_0x3f7576){if(_0x16c628['body']['id']){delete _0x16c628[_0x44b8('0x3c')]['id'];}return db[_0x44b8('0x29')][_0x44b8('0x1e')]({'where':{'id':_0x16c628[_0x44b8('0x2f')]['id']}})[_0x44b8('0x13')](handleEntityNotFound(_0x3f7576,null))[_0x44b8('0x13')](saveUpdates(_0x16c628[_0x44b8('0x3c')],null))[_0x44b8('0x13')](respondWithResult(_0x3f7576,null))[_0x44b8('0x2d')](handleError(_0x3f7576,null));};exports[_0x44b8('0x12')]=function(_0x2ecff9,_0x15bcba){return db[_0x44b8('0x29')][_0x44b8('0x1e')]({'where':{'id':_0x2ecff9[_0x44b8('0x2f')]['id']}})[_0x44b8('0x13')](handleEntityNotFound(_0x15bcba,null))[_0x44b8('0x13')](removeEntity(_0x15bcba,null))[_0x44b8('0x2d')](handleError(_0x15bcba,null));};exports['getHoppers']=function(_0x1ec516,_0x3aac51){var _0x10e519={'raw':![],'where':{}};var _0x2b37e={};var _0x51f763={'count':0x0,'rows':[]};return db[_0x44b8('0x29')][_0x44b8('0x49')]({'where':{'id':_0x1ec516['params']['id']}})[_0x44b8('0x13')](handleEntityNotFound(_0x3aac51,null))[_0x44b8('0x13')](function(_0x5df821){if(_0x5df821){_0x2b37e[_0x44b8('0x30')]=_[_0x44b8('0x31')](db['CmHopper'][_0x44b8('0x24')]);_0x2b37e[_0x44b8('0x32')]=_[_0x44b8('0x31')](_0x1ec516['query']);_0x2b37e[_0x44b8('0x33')]=_['intersection'](_0x2b37e[_0x44b8('0x30')],_0x2b37e['query']);_0x10e519[_0x44b8('0x35')]=_[_0x44b8('0x34')](_0x2b37e[_0x44b8('0x30')],qs[_0x44b8('0x36')](_0x1ec516[_0x44b8('0x32')][_0x44b8('0x36')]));_0x10e519['attributes']=_0x10e519[_0x44b8('0x35')]['length']?_0x10e519[_0x44b8('0x35')]:_0x2b37e[_0x44b8('0x30')];if(!_0x1ec516['query'][_0x44b8('0x4a')](_0x44b8('0x4b'))){_0x10e519[_0x44b8('0x10')]=qs[_0x44b8('0x10')](_0x1ec516[_0x44b8('0x32')][_0x44b8('0x10')]);_0x10e519[_0x44b8('0xf')]=qs[_0x44b8('0xf')](_0x1ec516[_0x44b8('0x32')][_0x44b8('0xf')]);}_0x10e519[_0x44b8('0x4c')]=qs[_0x44b8('0x4d')](_0x1ec516['query'][_0x44b8('0x4d')]);_0x10e519[_0x44b8('0x28')]=qs[_0x44b8('0x33')](_['pick'](_0x1ec516[_0x44b8('0x32')],_0x2b37e[_0x44b8('0x33')]));_0x10e519['where'][_0x44b8('0x4e')]=_0x5df821['id'];if(_0x1ec516[_0x44b8('0x32')][_0x44b8('0x19')]){_0x10e519[_0x44b8('0x28')]=_[_0x44b8('0x39')](_0x10e519['where'],{'$or':_[_0x44b8('0x1b')](_0x10e519[_0x44b8('0x35')],function(_0x279753){var _0x270224={};_0x270224[_0x279753]={'$like':'%'+_0x1ec516[_0x44b8('0x32')][_0x44b8('0x19')]+'%'};return _0x270224;})});}_0x10e519=_[_0x44b8('0x39')]({},_0x10e519,_0x1ec516[_0x44b8('0x3a')]);return db['CmHopper'][_0x44b8('0xe')]({'where':_0x10e519[_0x44b8('0x28')]})[_0x44b8('0x13')](function(_0x3ce76e){_0x51f763['count']=_0x3ce76e;if(_0x1ec516['query']['includeAll']){_0x10e519[_0x44b8('0x2a')]=[{'all':!![]}];}return db[_0x44b8('0x4f')][_0x44b8('0x2b')](_0x10e519);})[_0x44b8('0x13')](function(_0x32e630){_0x51f763['rows']=_0x32e630;return _0x51f763;});}})[_0x44b8('0x13')](respondWithFilteredResult(_0x3aac51,_0x10e519))['catch'](handleError(_0x3aac51,null));};exports[_0x44b8('0x50')]=function(_0x155bcf,_0xea2c3e){var _0x5da034={'raw':!![],'where':{}};var _0x4cac12={};var _0xb4c6dc={'count':0x0,'rows':[]};return db[_0x44b8('0x29')][_0x44b8('0x49')]({'where':{'id':_0x155bcf['params']['id']}})[_0x44b8('0x13')](handleEntityNotFound(_0xea2c3e,null))[_0x44b8('0x13')](function(_0x1258c2){if(_0x1258c2){_0x4cac12[_0x44b8('0x30')]=_[_0x44b8('0x31')](db['CmHopperHistory'][_0x44b8('0x24')]);_0x4cac12[_0x44b8('0x32')]=_[_0x44b8('0x31')](_0x155bcf[_0x44b8('0x32')]);_0x4cac12[_0x44b8('0x33')]=_['intersection'](_0x4cac12[_0x44b8('0x30')],_0x4cac12[_0x44b8('0x32')]);_0x5da034[_0x44b8('0x35')]=_[_0x44b8('0x34')](_0x4cac12[_0x44b8('0x30')],qs[_0x44b8('0x36')](_0x155bcf[_0x44b8('0x32')]['fields']));_0x5da034[_0x44b8('0x35')]=_0x5da034[_0x44b8('0x35')]['length']?_0x5da034[_0x44b8('0x35')]:_0x4cac12[_0x44b8('0x30')];if(!_0x155bcf['query'][_0x44b8('0x4a')]('nolimit')){_0x5da034['limit']=qs[_0x44b8('0x10')](_0x155bcf[_0x44b8('0x32')][_0x44b8('0x10')]);_0x5da034['offset']=qs['offset'](_0x155bcf['query'][_0x44b8('0xf')]);}_0x5da034[_0x44b8('0x4c')]=qs[_0x44b8('0x4d')](_0x155bcf[_0x44b8('0x32')][_0x44b8('0x4d')]);_0x5da034[_0x44b8('0x28')]=qs[_0x44b8('0x33')](_[_0x44b8('0x51')](_0x155bcf['query'],_0x4cac12[_0x44b8('0x33')]));_0x5da034['where']['VoiceQueueId']=_0x1258c2['id'];if(_0x155bcf['query'][_0x44b8('0x19')]){_0x5da034['where']=_[_0x44b8('0x39')](_0x5da034[_0x44b8('0x28')],{'$or':_[_0x44b8('0x1b')](_0x5da034[_0x44b8('0x35')],function(_0x3a9780){var _0x245ba3={};_0x245ba3[_0x3a9780]={'$like':'%'+_0x155bcf[_0x44b8('0x32')][_0x44b8('0x19')]+'%'};return _0x245ba3;})});}_0x5da034=_['merge']({},_0x5da034,_0x155bcf[_0x44b8('0x3a')]);return db[_0x44b8('0x52')][_0x44b8('0xe')]({'where':_0x5da034[_0x44b8('0x28')]})[_0x44b8('0x13')](function(_0xee44b3){_0xb4c6dc[_0x44b8('0xe')]=_0xee44b3;if(_0x155bcf[_0x44b8('0x32')][_0x44b8('0x38')]){_0x5da034['include']=[{'all':!![]}];}return db['CmHopperHistory'][_0x44b8('0x2b')](_0x5da034);})['then'](function(_0x531d65){_0xb4c6dc[_0x44b8('0x2c')]=_0x531d65;return _0xb4c6dc;});}})[_0x44b8('0x13')](respondWithFilteredResult(_0xea2c3e,_0x5da034))['catch'](handleError(_0xea2c3e,null));};exports['getHopperFinals']=function(_0x4b22e7,_0x2e0289){var _0x4860af={'raw':!![],'where':{}};var _0x353ff1={};var _0x2812da={'count':0x0,'rows':[]};return db[_0x44b8('0x29')][_0x44b8('0x49')]({'where':{'id':_0x4b22e7[_0x44b8('0x2f')]['id']}})[_0x44b8('0x13')](handleEntityNotFound(_0x2e0289,null))[_0x44b8('0x13')](function(_0x3a7229){if(_0x3a7229){_0x353ff1[_0x44b8('0x30')]=_[_0x44b8('0x31')](db[_0x44b8('0x53')][_0x44b8('0x24')]);_0x353ff1[_0x44b8('0x32')]=_[_0x44b8('0x31')](_0x4b22e7['query']);_0x353ff1[_0x44b8('0x33')]=_[_0x44b8('0x34')](_0x353ff1[_0x44b8('0x30')],_0x353ff1[_0x44b8('0x32')]);_0x4860af[_0x44b8('0x35')]=_[_0x44b8('0x34')](_0x353ff1[_0x44b8('0x30')],qs[_0x44b8('0x36')](_0x4b22e7[_0x44b8('0x32')][_0x44b8('0x36')]));_0x4860af[_0x44b8('0x35')]=_0x4860af[_0x44b8('0x35')][_0x44b8('0x37')]?_0x4860af['attributes']:_0x353ff1[_0x44b8('0x30')];if(!_0x4b22e7[_0x44b8('0x32')][_0x44b8('0x4a')]('nolimit')){_0x4860af['limit']=qs[_0x44b8('0x10')](_0x4b22e7[_0x44b8('0x32')][_0x44b8('0x10')]);_0x4860af['offset']=qs[_0x44b8('0xf')](_0x4b22e7[_0x44b8('0x32')][_0x44b8('0xf')]);}_0x4860af[_0x44b8('0x4c')]=qs[_0x44b8('0x4d')](_0x4b22e7[_0x44b8('0x32')][_0x44b8('0x4d')]);_0x4860af[_0x44b8('0x28')]=qs['filters'](_[_0x44b8('0x51')](_0x4b22e7[_0x44b8('0x32')],_0x353ff1[_0x44b8('0x33')]));_0x4860af[_0x44b8('0x28')][_0x44b8('0x4e')]=_0x3a7229['id'];if(_0x4b22e7[_0x44b8('0x32')][_0x44b8('0x19')]){_0x4860af['where']=_['merge'](_0x4860af['where'],{'$or':_[_0x44b8('0x1b')](_0x4860af[_0x44b8('0x35')],function(_0x2d74ee){var _0x312f4c={};_0x312f4c[_0x2d74ee]={'$like':'%'+_0x4b22e7[_0x44b8('0x32')][_0x44b8('0x19')]+'%'};return _0x312f4c;})});}_0x4860af=_[_0x44b8('0x39')]({},_0x4860af,_0x4b22e7[_0x44b8('0x3a')]);return db[_0x44b8('0x53')]['count']({'where':_0x4860af[_0x44b8('0x28')]})[_0x44b8('0x13')](function(_0x4b8036){_0x2812da['count']=_0x4b8036;if(_0x4b22e7[_0x44b8('0x32')]['includeAll']){_0x4860af[_0x44b8('0x2a')]=[{'all':!![]}];}return db[_0x44b8('0x53')][_0x44b8('0x2b')](_0x4860af);})['then'](function(_0x3f4a2a){_0x2812da[_0x44b8('0x2c')]=_0x3f4a2a;return _0x2812da;});}})[_0x44b8('0x13')](respondWithFilteredResult(_0x2e0289,_0x4860af))[_0x44b8('0x2d')](handleError(_0x2e0289,null));};exports['getHopperBlacks']=function(_0x216030,_0x584ae3){var _0x38c0c5={'raw':!![],'where':{}};var _0x2f2923={};var _0x2d9d62={'count':0x0,'rows':[]};return db[_0x44b8('0x29')][_0x44b8('0x49')]({'where':{'id':_0x216030[_0x44b8('0x2f')]['id']}})[_0x44b8('0x13')](handleEntityNotFound(_0x584ae3,null))['then'](function(_0x4d3b82){if(_0x4d3b82){_0x2f2923['model']=_[_0x44b8('0x31')](db[_0x44b8('0x54')][_0x44b8('0x24')]);_0x2f2923[_0x44b8('0x32')]=_[_0x44b8('0x31')](_0x216030[_0x44b8('0x32')]);_0x2f2923[_0x44b8('0x33')]=_[_0x44b8('0x34')](_0x2f2923[_0x44b8('0x30')],_0x2f2923[_0x44b8('0x32')]);_0x38c0c5[_0x44b8('0x35')]=_[_0x44b8('0x34')](_0x2f2923[_0x44b8('0x30')],qs[_0x44b8('0x36')](_0x216030[_0x44b8('0x32')][_0x44b8('0x36')]));_0x38c0c5[_0x44b8('0x35')]=_0x38c0c5[_0x44b8('0x35')]['length']?_0x38c0c5[_0x44b8('0x35')]:_0x2f2923['model'];if(!_0x216030[_0x44b8('0x32')]['hasOwnProperty']('nolimit')){_0x38c0c5[_0x44b8('0x10')]=qs['limit'](_0x216030['query']['limit']);_0x38c0c5['offset']=qs['offset'](_0x216030[_0x44b8('0x32')][_0x44b8('0xf')]);}_0x38c0c5[_0x44b8('0x4c')]=qs[_0x44b8('0x4d')](_0x216030['query'][_0x44b8('0x4d')]);_0x38c0c5[_0x44b8('0x28')]=qs['filters'](_['pick'](_0x216030[_0x44b8('0x32')],_0x2f2923[_0x44b8('0x33')]));_0x38c0c5[_0x44b8('0x28')]['VoiceQueueId']=_0x4d3b82['id'];if(_0x216030[_0x44b8('0x32')][_0x44b8('0x19')]){_0x38c0c5[_0x44b8('0x28')]=_[_0x44b8('0x39')](_0x38c0c5[_0x44b8('0x28')],{'$or':_[_0x44b8('0x1b')](_0x38c0c5[_0x44b8('0x35')],function(_0x16344b){var _0x21057f={};_0x21057f[_0x16344b]={'$like':'%'+_0x216030['query'][_0x44b8('0x19')]+'%'};return _0x21057f;})});}_0x38c0c5=_[_0x44b8('0x39')]({},_0x38c0c5,_0x216030['options']);return db[_0x44b8('0x54')][_0x44b8('0xe')]({'where':_0x38c0c5[_0x44b8('0x28')]})['then'](function(_0x3a09e4){_0x2d9d62['count']=_0x3a09e4;if(_0x216030[_0x44b8('0x32')][_0x44b8('0x38')]){_0x38c0c5['include']=[{'all':!![]}];}return db[_0x44b8('0x54')][_0x44b8('0x2b')](_0x38c0c5);})[_0x44b8('0x13')](function(_0x37871e){_0x2d9d62['rows']=_0x37871e;return _0x2d9d62;});}})[_0x44b8('0x13')](respondWithFilteredResult(_0x584ae3,_0x38c0c5))[_0x44b8('0x2d')](handleError(_0x584ae3,null));};exports[_0x44b8('0x55')]=function(_0x35d46c,_0x2d4a8a){var _0x1d666e={};var _0x10a66a={};var _0x1e608f;var _0x470f90;return db['VoiceQueue']['findOne']({'where':{'id':_0x35d46c[_0x44b8('0x2f')]['id']}})[_0x44b8('0x13')](handleEntityNotFound(_0x2d4a8a,null))[_0x44b8('0x13')](function(_0x3539f9){if(_0x3539f9){_0x1e608f=_0x3539f9;_0x10a66a[_0x44b8('0x30')]=_['keys'](db[_0x44b8('0x56')]['rawAttributes']);_0x10a66a[_0x44b8('0x32')]=_['keys'](_0x35d46c[_0x44b8('0x32')]);_0x10a66a[_0x44b8('0x33')]=_[_0x44b8('0x34')](_0x10a66a[_0x44b8('0x30')],_0x10a66a[_0x44b8('0x32')]);_0x1d666e[_0x44b8('0x35')]=_[_0x44b8('0x34')](_0x10a66a[_0x44b8('0x30')],qs[_0x44b8('0x36')](_0x35d46c['query'][_0x44b8('0x36')]));_0x1d666e[_0x44b8('0x35')]=_0x1d666e[_0x44b8('0x35')][_0x44b8('0x37')]?_0x1d666e['attributes']:_0x10a66a['model'];_0x1d666e['order']=qs[_0x44b8('0x4d')](_0x35d46c['query']['sort']);_0x1d666e[_0x44b8('0x28')]=qs[_0x44b8('0x33')](_[_0x44b8('0x51')](_0x35d46c[_0x44b8('0x32')],_0x10a66a[_0x44b8('0x33')]));if(_0x35d46c[_0x44b8('0x32')][_0x44b8('0x19')]){_0x1d666e[_0x44b8('0x28')]=_['merge'](_0x1d666e[_0x44b8('0x28')],{'$or':_[_0x44b8('0x1b')](_0x1d666e[_0x44b8('0x35')],function(_0x2594bf){var _0x5f0c0c={};_0x5f0c0c[_0x2594bf]={'$like':'%'+_0x35d46c[_0x44b8('0x32')][_0x44b8('0x19')]+'%'};return _0x5f0c0c;})});}_0x1d666e=_[_0x44b8('0x39')]({},_0x1d666e,_0x35d46c['options']);return _0x1e608f['getTeams'](_0x1d666e);}})[_0x44b8('0x13')](function(_0xae9b10){if(_0xae9b10){_0x470f90=_0xae9b10[_0x44b8('0x37')];if(!_0x35d46c[_0x44b8('0x32')][_0x44b8('0x4a')]('nolimit')){_0x1d666e[_0x44b8('0x10')]=qs[_0x44b8('0x10')](_0x35d46c['query'][_0x44b8('0x10')]);_0x1d666e[_0x44b8('0xf')]=qs[_0x44b8('0xf')](_0x35d46c[_0x44b8('0x32')]['offset']);}return _0x1e608f[_0x44b8('0x55')](_0x1d666e);}})['then'](function(_0x4464d3){if(_0x4464d3){return _0x4464d3?{'count':_0x470f90,'rows':_0x4464d3}:null;}})[_0x44b8('0x13')](respondWithResult(_0x2d4a8a,null))[_0x44b8('0x2d')](handleError(_0x2d4a8a,null));};exports[_0x44b8('0x57')]=function(_0x45ff62,_0x343c5c){var _0x3cb290=_0x45ff62[_0x44b8('0x3c')]['teams'];var _0x2d27bf=_[_0x44b8('0x1b')](_0x3cb290,'id');return db[_0x44b8('0x56')][_0x44b8('0x2b')]({'where':{'id':_0x2d27bf},'attributes':['id'],'include':[{'model':db[_0x44b8('0x58')],'as':_0x44b8('0x59'),'attributes':['id','name','online',_0x44b8('0x5a'),_0x44b8('0x5b')],'raw':!![]}]})['then'](function(_0x41f732){if(_0x41f732){var _0x16074e=_['flatMap'](_0x41f732,function(_0x1ec23e){var _0x3208b4=_0x1ec23e[_0x44b8('0x14')]({'plain':!![]});_0x3208b4[_0x44b8('0x59')][_0x44b8('0x5c')](function(_0x43f416){_0x43f416[_0x44b8('0x5d')]=_[_0x44b8('0x1e')](_0x3cb290,{'id':_0x3208b4['id']})[_0x44b8('0x5d')];});return _0x3208b4[_0x44b8('0x59')];});return db[_0x44b8('0x29')][_0x44b8('0x1e')]({'where':{'id':_0x45ff62[_0x44b8('0x2f')]['id']}})[_0x44b8('0x13')](function(_0x15365d){return db['sequelize'][_0x44b8('0x5e')](function(_0x3d92a9){return _0x15365d[_0x44b8('0x57')](_0x2d27bf,{'transaction':_0x3d92a9})[_0x44b8('0x13')](function(){return BPromise['each'](_0x3cb290,function(_0x611876){return db[_0x44b8('0x5f')]['upsert']({'TeamId':_0x611876['id'],'VoiceQueueId':_0x45ff62[_0x44b8('0x2f')]['id'],'penalty':_0x611876['penalty']},{'transaction':_0x3d92a9});});})[_0x44b8('0x13')](function(){return BPromise[_0x44b8('0x60')](_0x16074e,function(_0x5a508f){return db[_0x44b8('0x61')]['findOrCreate']({'where':{'UserId':_0x5a508f['id'],'VoiceQueueId':_0x45ff62['params']['id']},'defaults':{'penalty':_0x5a508f[_0x44b8('0x5d')]},'transaction':_0x3d92a9});});})[_0x44b8('0x13')](function(){return BPromise['each'](_['filter'](_0x16074e,{'online':!![]}),function(_0x52af57){return db[_0x44b8('0x62')][_0x44b8('0x63')]({'membername':_0x52af57[_0x44b8('0x21')],'UserId':_0x52af57['id'],'queue_name':_0x15365d['name'],'VoiceQueueId':_0x15365d['id'],'interface':_['isNil'](_0x52af57[_0x44b8('0x5b')])?util[_0x44b8('0x64')](_0x44b8('0x65'),_0x52af57[_0x44b8('0x21')]):_0x52af57[_0x44b8('0x5b')],'paused':_0x52af57[_0x44b8('0x5a')]||![],'penalty':_0x52af57[_0x44b8('0x5d')]},{'transaction':_0x3d92a9});});})[_0x44b8('0x13')](function(){_0x16074e[_0x44b8('0x5c')](function(_0x4ed62f){socket[_0x44b8('0x66')]('userVoiceQueue:save',{'UserId':_0x4ed62f['id'],'VoiceQueueId':_0x15365d['id']});});});});});}})[_0x44b8('0x13')](respondWithStatusCode(_0x343c5c,null))['catch'](handleError(_0x343c5c,null));};exports['removeTeams']=function(_0x1fb070,_0x224071){return db[_0x44b8('0x56')][_0x44b8('0x2b')]({'where':{'id':_0x1fb070[_0x44b8('0x32')][_0x44b8('0x67')]},'attributes':['id'],'include':[{'model':db[_0x44b8('0x58')],'as':_0x44b8('0x59'),'attributes':['id'],'raw':!![]}]})[_0x44b8('0x13')](handleEntityNotFound(_0x224071,null))['then'](function(_0x1eb0a8){var _0x1e3b5f=_[_0x44b8('0x1b')](_0x1eb0a8,'id');var _0x536d1d=[];var _0x5bc747=[];var _0x3e44ea=squel['select']();_0x3e44ea[_0x44b8('0x68')]('tq.TeamId')[_0x44b8('0x69')]('team_has_voice_queues','tq')['join'](_0x44b8('0x6a'),'ut',_0x44b8('0x6b'))['where'](_0x44b8('0x6c'),_0x1fb070[_0x44b8('0x2f')]['id']);for(var _0x276dfc=0x0;_0x276dfc<_0x1eb0a8[_0x44b8('0x37')];_0x276dfc+=0x1){let _0x291617=_0x1eb0a8[_0x276dfc];for(var _0x57b73f=0x0;_0x57b73f<_0x291617[_0x44b8('0x59')]['length'];_0x57b73f+=0x1){let _0x595af5=_0x291617['Agents'][_0x57b73f];var _0x3015f9=_0x3e44ea[_0x44b8('0x44')]();_0x3015f9['where'](_0x44b8('0x6d'),_0x595af5['id']);_0x5bc747[_0x44b8('0x6e')](db['sequelize']['query'](_0x3015f9[_0x44b8('0x6f')](),{'type':db[_0x44b8('0x70')]['QueryTypes'][_0x44b8('0x71')]})[_0x44b8('0x13')](function(_0x5e2d3b){if(_0x5e2d3b[_0x44b8('0x37')]===0x1){return _0x595af5['id'];}else{var _0x97f4=_['every'](_[_0x44b8('0x1b')](_0x5e2d3b,_0x44b8('0x72')),function(_0xdb42f2){return _['includes'](_0x1e3b5f,_0xdb42f2);});if(_0x97f4){return _0x595af5['id'];}}}));}}return BPromise[_0x44b8('0x73')](_0x5bc747)['then'](function(_0x2ea49d){_0x536d1d=_(_0x536d1d)['union'](_0x2ea49d)['compact']()[_0x44b8('0x1c')]();return db[_0x44b8('0x29')][_0x44b8('0x1e')]({'where':{'id':_0x1fb070[_0x44b8('0x2f')]['id']}})[_0x44b8('0x13')](function(_0x1db2cf){return db[_0x44b8('0x70')][_0x44b8('0x5e')](function(_0x1b7826){return _0x1db2cf[_0x44b8('0x74')](_0x1fb070[_0x44b8('0x32')]['ids'],{'transaction':_0x1b7826})[_0x44b8('0x13')](function(){if(!_[_0x44b8('0x75')](_0x536d1d)){return _0x1db2cf[_0x44b8('0x76')](_0x536d1d,{'transaction':_0x1b7826})[_0x44b8('0x13')](function(){return db[_0x44b8('0x62')][_0x44b8('0x12')]({'where':{'VoiceQueueId':_0x1fb070[_0x44b8('0x2f')]['id'],'UserId':_0x536d1d},'transaction':_0x1b7826});});}})[_0x44b8('0x13')](function(){_0x536d1d['forEach'](function(_0x4234bc){socket[_0x44b8('0x66')]('userVoiceQueue:remove',{'UserId':_0x4234bc,'VoiceQueueId':_0x1db2cf['id']});});});});});});})[_0x44b8('0x13')](respondWithStatusCode(_0x224071,null))[_0x44b8('0x2d')](handleError(_0x224071,null));};exports[_0x44b8('0x77')]=function(_0x5596c0,_0x4b2b8f){var _0x18cd30,_0x133da8;return db['VoiceQueue']['find']({'where':{'id':_0x5596c0[_0x44b8('0x2f')]['id']}})[_0x44b8('0x13')](handleEntityNotFound(_0x4b2b8f,null))[_0x44b8('0x13')](function(_0x2bccf9){if(_0x2bccf9){_0x133da8=_0x2bccf9;return _0x2bccf9[_0x44b8('0x77')](_0x5596c0['body'][_0x44b8('0x67')],_['omit'](_0x5596c0[_0x44b8('0x3c')],[_0x44b8('0x67'),'id'])||{})[_0x44b8('0x78')](function(_0x156a60){for(var _0x3cbec9=0x0;_0x3cbec9<_0x5596c0[_0x44b8('0x3c')]['ids'][_0x44b8('0x37')];_0x3cbec9+=0x1){socket['emit'](_0x44b8('0x79'),{'UserId':Number(_0x5596c0[_0x44b8('0x3c')]['ids'][_0x3cbec9]),'VoiceQueueId':Number(_0x5596c0[_0x44b8('0x2f')]['id'])});}return _0x156a60;});}})['then'](function(_0x42b0c9){_0x18cd30=_0x42b0c9||[];if(_0x133da8){return db[_0x44b8('0x58')][_0x44b8('0x2b')]({'where':{'id':_0x5596c0['body'][_0x44b8('0x67')]},'attributes':['id',_0x44b8('0x21'),'online',_0x44b8('0x5a'),'interface'],'raw':!![]});}})['then'](function(_0x4220b5){if(!_['isEmpty'](_0x4220b5)){var _0x336436=[];for(var _0x51add5=0x0;_0x51add5<_0x4220b5[_0x44b8('0x37')];_0x51add5++){if(_0x4220b5[_0x51add5][_0x44b8('0x7a')]){_0x336436['push'](db[_0x44b8('0x62')][_0x44b8('0x63')]({'membername':_0x4220b5[_0x51add5]['name'],'UserId':_0x4220b5[_0x51add5]['id'],'queue_name':_0x133da8['name'],'VoiceQueueId':_0x133da8['id'],'interface':_[_0x44b8('0x7b')](_0x4220b5[_0x51add5][_0x44b8('0x5b')])?util[_0x44b8('0x64')](_0x44b8('0x65'),_0x4220b5[_0x51add5]['name']):_0x4220b5[_0x51add5][_0x44b8('0x5b')],'paused':_0x4220b5[_0x51add5][_0x44b8('0x5a')]||![],'penalty':_0x5596c0[_0x44b8('0x3c')][_0x44b8('0x5d')]||0x0}));}}return BPromise['all'](_0x336436);}})['then'](function(){return _0x18cd30;})[_0x44b8('0x13')](respondWithResult(_0x4b2b8f,null))[_0x44b8('0x2d')](handleError(_0x4b2b8f,null));};exports[_0x44b8('0x76')]=function(_0x4cf4a0,_0x1443bd){return db[_0x44b8('0x29')]['find']({'where':{'id':_0x4cf4a0[_0x44b8('0x2f')]['id']}})[_0x44b8('0x13')](handleEntityNotFound(_0x1443bd,null))[_0x44b8('0x13')](function(_0x2cb698){if(_0x2cb698){return _0x2cb698[_0x44b8('0x76')](_0x4cf4a0[_0x44b8('0x32')]['ids'])['then'](function(){if(_[_0x44b8('0x7c')](_0x4cf4a0['query'][_0x44b8('0x67')])){for(var _0x4dc333=0x0;_0x4dc333<_0x4cf4a0[_0x44b8('0x32')][_0x44b8('0x67')][_0x44b8('0x37')];_0x4dc333+=0x1){socket[_0x44b8('0x66')](_0x44b8('0x7d'),{'UserId':Number(_0x4cf4a0[_0x44b8('0x32')][_0x44b8('0x67')][_0x4dc333]),'VoiceQueueId':Number(_0x4cf4a0[_0x44b8('0x2f')]['id'])});}}else{socket[_0x44b8('0x66')](_0x44b8('0x7d'),{'UserId':Number(_0x4cf4a0[_0x44b8('0x32')][_0x44b8('0x67')]),'VoiceQueueId':Number(_0x4cf4a0[_0x44b8('0x2f')]['id'])});}});}})[_0x44b8('0x13')](function(_0x4026d7){return db[_0x44b8('0x62')]['destroy']({'where':{'VoiceQueueId':_0x4cf4a0[_0x44b8('0x2f')]['id'],'UserId':_0x4cf4a0['query'][_0x44b8('0x67')]}})[_0x44b8('0x13')](function(){return _0x4026d7;});})[_0x44b8('0x13')](respondWithStatusCode(_0x1443bd,null))[_0x44b8('0x2d')](handleError(_0x1443bd,null));};exports[_0x44b8('0x7e')]=function(_0x22e5ae,_0x2f3340){var _0x4d98de={};var _0x597139={};var _0x2fffd5;var _0x3c90c2;return db[_0x44b8('0x29')][_0x44b8('0x49')]({'where':{'id':_0x22e5ae[_0x44b8('0x2f')]['id']}})['then'](handleEntityNotFound(_0x2f3340,null))[_0x44b8('0x13')](function(_0x208c53){if(_0x208c53){_0x2fffd5=_0x208c53;_0x597139[_0x44b8('0x30')]=_[_0x44b8('0x31')](db[_0x44b8('0x58')][_0x44b8('0x24')]);_0x597139['query']=_[_0x44b8('0x31')](_0x22e5ae[_0x44b8('0x32')]);_0x597139[_0x44b8('0x33')]=_[_0x44b8('0x34')](_0x597139[_0x44b8('0x30')],_0x597139['query']);_0x4d98de['attributes']=_[_0x44b8('0x34')](_0x597139[_0x44b8('0x30')],qs['fields'](_0x22e5ae['query'][_0x44b8('0x36')]));_0x4d98de['attributes']=_0x4d98de[_0x44b8('0x35')][_0x44b8('0x37')]?_0x4d98de[_0x44b8('0x35')]:_0x597139[_0x44b8('0x30')];_0x4d98de[_0x44b8('0x4c')]=qs[_0x44b8('0x4d')](_0x22e5ae[_0x44b8('0x32')][_0x44b8('0x4d')]);_0x4d98de['where']=qs[_0x44b8('0x33')](_[_0x44b8('0x51')](_0x22e5ae[_0x44b8('0x32')],_0x597139['filters']));if(_0x22e5ae[_0x44b8('0x32')][_0x44b8('0x19')]){_0x4d98de['where']=_['merge'](_0x4d98de['where'],{'$or':_['map'](_0x4d98de[_0x44b8('0x35')],function(_0x5e423c){var _0x48065d={};_0x48065d[_0x5e423c]={'$like':'%'+_0x22e5ae[_0x44b8('0x32')][_0x44b8('0x19')]+'%'};return _0x48065d;})});}_0x4d98de=_[_0x44b8('0x39')]({},_0x4d98de,_0x22e5ae['options']);return _0x2fffd5[_0x44b8('0x7e')](_0x4d98de);}})['then'](function(_0x230407){if(_0x230407){_0x3c90c2=_0x230407[_0x44b8('0x37')];if(!_0x22e5ae[_0x44b8('0x32')][_0x44b8('0x4a')]('nolimit')){_0x4d98de[_0x44b8('0x10')]=qs[_0x44b8('0x10')](_0x22e5ae[_0x44b8('0x32')][_0x44b8('0x10')]);_0x4d98de['offset']=qs['offset'](_0x22e5ae[_0x44b8('0x32')][_0x44b8('0xf')]);}return _0x2fffd5['getAgents'](_0x4d98de);}})[_0x44b8('0x13')](function(_0x188744){if(_0x188744){return _0x188744?{'count':_0x3c90c2,'rows':_0x188744}:null;}})[_0x44b8('0x13')](respondWithResult(_0x2f3340,null))[_0x44b8('0x2d')](handleError(_0x2f3340,null));};exports[_0x44b8('0x7f')]=function(_0x2da727,_0x319520){var _0x2f7550={};var _0x57d24f={};var _0x223e54;var _0x3e5fa8;return db[_0x44b8('0x29')]['findOne']({'where':{'id':_0x2da727[_0x44b8('0x2f')]['id']}})['then'](handleEntityNotFound(_0x319520,null))[_0x44b8('0x13')](function(_0x5370a5){if(_0x5370a5){_0x223e54=_0x5370a5;_0x57d24f[_0x44b8('0x30')]=_[_0x44b8('0x31')](db[_0x44b8('0x62')][_0x44b8('0x24')]);_0x57d24f[_0x44b8('0x32')]=_[_0x44b8('0x31')](_0x2da727[_0x44b8('0x32')]);_0x57d24f[_0x44b8('0x33')]=_[_0x44b8('0x34')](_0x57d24f[_0x44b8('0x30')],_0x57d24f[_0x44b8('0x32')]);_0x2f7550[_0x44b8('0x35')]=_['intersection'](_0x57d24f[_0x44b8('0x30')],qs['fields'](_0x2da727[_0x44b8('0x32')]['fields']));_0x2f7550[_0x44b8('0x35')]=_0x2f7550[_0x44b8('0x35')][_0x44b8('0x37')]?_0x2f7550[_0x44b8('0x35')]:_0x57d24f[_0x44b8('0x30')];_0x2f7550[_0x44b8('0x4c')]=qs[_0x44b8('0x4d')](_0x2da727['query'][_0x44b8('0x4d')]);_0x2f7550[_0x44b8('0x28')]=qs[_0x44b8('0x33')](_[_0x44b8('0x51')](_0x2da727[_0x44b8('0x32')],_0x57d24f[_0x44b8('0x33')]));if(_0x2da727[_0x44b8('0x32')][_0x44b8('0x19')]){_0x2f7550[_0x44b8('0x28')]=_[_0x44b8('0x39')](_0x2f7550[_0x44b8('0x28')],{'$or':_[_0x44b8('0x1b')](_0x2f7550[_0x44b8('0x35')],function(_0x4281a6){var _0x4bb399={};_0x4bb399[_0x4281a6]={'$like':'%'+_0x2da727[_0x44b8('0x32')][_0x44b8('0x19')]+'%'};return _0x4bb399;})});}_0x2f7550=_['merge']({},_0x2f7550,_0x2da727[_0x44b8('0x3a')]);return _0x223e54[_0x44b8('0x7f')](_0x2f7550);}})[_0x44b8('0x13')](function(_0x1f389e){if(_0x1f389e){_0x3e5fa8=_0x1f389e[_0x44b8('0x37')];if(!_0x2da727['query'][_0x44b8('0x4a')](_0x44b8('0x4b'))){_0x2f7550[_0x44b8('0x10')]=qs[_0x44b8('0x10')](_0x2da727['query'][_0x44b8('0x10')]);_0x2f7550[_0x44b8('0xf')]=qs['offset'](_0x2da727['query']['offset']);}return _0x223e54['getMembers'](_0x2f7550);}})[_0x44b8('0x13')](function(_0x5824a8){return _0x5824a8?{'count':_0x3e5fa8,'rows':_0x5824a8}:null;})['then'](respondWithResult(_0x319520,null))[_0x44b8('0x2d')](handleError(_0x319520,null));};exports[_0x44b8('0x80')]=function(_0x87a38,_0x54adf9){var _0x44dc3d={};var _0x32dafb={};var _0x3c8e0c;var _0x21ea61;return db['VoiceQueue'][_0x44b8('0x49')]({'where':{'id':_0x87a38['params']['id']}})[_0x44b8('0x13')](handleEntityNotFound(_0x54adf9,null))[_0x44b8('0x13')](function(_0x56cfa5){if(_0x56cfa5){_0x3c8e0c=_0x56cfa5;_0x32dafb[_0x44b8('0x30')]=_[_0x44b8('0x31')](db[_0x44b8('0x81')][_0x44b8('0x24')]);_0x32dafb[_0x44b8('0x32')]=_['keys'](_0x87a38['query']);_0x32dafb[_0x44b8('0x33')]=_[_0x44b8('0x34')](_0x32dafb[_0x44b8('0x30')],_0x32dafb[_0x44b8('0x32')]);_0x44dc3d[_0x44b8('0x35')]=_[_0x44b8('0x34')](_0x32dafb[_0x44b8('0x30')],qs[_0x44b8('0x36')](_0x87a38[_0x44b8('0x32')][_0x44b8('0x36')]));_0x44dc3d[_0x44b8('0x35')]=_0x44dc3d[_0x44b8('0x35')]['length']?_0x44dc3d['attributes']:_0x32dafb[_0x44b8('0x30')];_0x44dc3d['order']=qs[_0x44b8('0x4d')](_0x87a38[_0x44b8('0x32')][_0x44b8('0x4d')]);_0x44dc3d['where']=qs[_0x44b8('0x33')](_[_0x44b8('0x51')](_0x87a38[_0x44b8('0x32')],_0x32dafb[_0x44b8('0x33')]));if(_0x87a38[_0x44b8('0x32')][_0x44b8('0x19')]){_0x44dc3d['where']=_[_0x44b8('0x39')](_0x44dc3d[_0x44b8('0x28')],{'$or':_['map'](_0x44dc3d[_0x44b8('0x35')],function(_0x1ffa05){var _0x22edd7={};_0x22edd7[_0x1ffa05]={'$like':'%'+_0x87a38[_0x44b8('0x32')][_0x44b8('0x19')]+'%'};return _0x22edd7;})});}_0x44dc3d=_['merge']({},_0x44dc3d,_0x87a38[_0x44b8('0x3a')]);return _0x3c8e0c[_0x44b8('0x80')](_0x44dc3d);}})[_0x44b8('0x13')](function(_0x2fca1a){if(_0x2fca1a){_0x21ea61=_0x2fca1a[_0x44b8('0x37')];if(!_0x87a38[_0x44b8('0x32')][_0x44b8('0x4a')](_0x44b8('0x4b'))){_0x44dc3d[_0x44b8('0x10')]=qs[_0x44b8('0x10')](_0x87a38['query'][_0x44b8('0x10')]);_0x44dc3d[_0x44b8('0xf')]=qs[_0x44b8('0xf')](_0x87a38['query']['offset']);}return _0x3c8e0c[_0x44b8('0x80')](_0x44dc3d);}})['then'](function(_0x9458fb){if(_0x9458fb){return _0x9458fb?{'count':_0x21ea61,'rows':_0x9458fb}:null;}})[_0x44b8('0x13')](respondWithResult(_0x54adf9,null))[_0x44b8('0x2d')](handleError(_0x54adf9,null));};exports[_0x44b8('0x82')]=function(_0x2eb6ce,_0x105ca0){var _0x25f364=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');var _0x77c009,_0x161362;return db[_0x44b8('0x29')][_0x44b8('0x1e')]({'where':{'id':_0x2eb6ce[_0x44b8('0x2f')]['id']}})[_0x44b8('0x13')](handleEntityNotFound(_0x105ca0,null))['then'](function(_0x4d88a6){if(_0x4d88a6){_0x161362=_0x4d88a6;return _0x4d88a6[_0x44b8('0x82')](_0x2eb6ce[_0x44b8('0x3c')][_0x44b8('0x67')],_[_0x44b8('0x45')](_0x2eb6ce[_0x44b8('0x3c')],[_0x44b8('0x67'),'id'])||{});}return null;})[_0x44b8('0x78')](function(_0x4b49df){var _0xbf96c1;_0x77c009=_0x4b49df||[];var _0x1f6244=[];if(_0x4b49df){for(var _0x96a3cd=0x0;_0x96a3cd<_0x4b49df['length'];_0x96a3cd+=0x1){var _0x16721d=_0x4b49df[_0x96a3cd][_0x44b8('0x14')]({'plain':!![]});_0x161362[_0x44b8('0x83')]=_0x2eb6ce[_0x44b8('0x3c')]['dialCheckDuplicateType']?_0x2eb6ce[_0x44b8('0x3c')][_0x44b8('0x83')]:_0x161362[_0x44b8('0x83')];switch(_0x161362['dialCheckDuplicateType']){case'always':_0xbf96c1=squel['insert']()['into']('cm_hopper')[_0x44b8('0x84')]([_0x44b8('0x85'),_0x44b8('0x86'),_0x44b8('0x87'),_0x44b8('0x88'),_0x44b8('0x4e'),_0x44b8('0x46'),_0x44b8('0x47')],squel[_0x44b8('0x89')]()[_0x44b8('0x68')](_0x44b8('0x85'),'phone')[_0x44b8('0x68')]('\x27'+_0x25f364+'\x27',_0x44b8('0x86'))[_0x44b8('0x68')]('id',_0x44b8('0x87'))[_0x44b8('0x68')](_0x16721d['CmListId'][_0x44b8('0x6f')](),'ListId')[_0x44b8('0x68')](_0x2eb6ce[_0x44b8('0x2f')]['id'][_0x44b8('0x6f')](),'VoiceQueueId')[_0x44b8('0x68')]('\x27'+_0x25f364+'\x27',_0x44b8('0x46'))['field']('\x27'+_0x25f364+'\x27',_0x44b8('0x47'))[_0x44b8('0x69')](_0x44b8('0x8a'))['where'](_0x44b8('0x8b'))['where'](_0x44b8('0x8c'),_0x16721d[_0x44b8('0x8d')][_0x44b8('0x6f')]())['where'](_0x44b8('0x8e'))['where'](_0x44b8('0x8f'),squel[_0x44b8('0x89')]()[_0x44b8('0x68')](_0x44b8('0x90'))[_0x44b8('0x69')](_0x44b8('0x91'))['where'](_0x44b8('0x6c'),_0x2eb6ce[_0x44b8('0x2f')]['id'][_0x44b8('0x6f')]()))[_0x44b8('0x28')]('phone\x20NOT\x20IN\x20(?)',squel[_0x44b8('0x89')]()[_0x44b8('0x68')](_0x44b8('0x92'))[_0x44b8('0x69')](_0x44b8('0x93'))[_0x44b8('0x28')](_0x44b8('0x6c'),_0x2eb6ce[_0x44b8('0x2f')]['id'][_0x44b8('0x6f')]())))[_0x44b8('0x6f')]();break;case _0x44b8('0x94'):_0xbf96c1=squel[_0x44b8('0x95')]()['into'](_0x44b8('0x93'))[_0x44b8('0x84')]([_0x44b8('0x85'),_0x44b8('0x86'),'ContactId',_0x44b8('0x88'),'VoiceQueueId',_0x44b8('0x46'),_0x44b8('0x47')],squel[_0x44b8('0x89')]()['field'](_0x44b8('0x85'),_0x44b8('0x85'))[_0x44b8('0x68')]('\x27'+_0x25f364+'\x27',_0x44b8('0x86'))[_0x44b8('0x68')]('id','ContactId')[_0x44b8('0x68')](_0x16721d[_0x44b8('0x8d')][_0x44b8('0x6f')](),_0x44b8('0x88'))[_0x44b8('0x68')](_0x2eb6ce['params']['id'][_0x44b8('0x6f')](),_0x44b8('0x4e'))[_0x44b8('0x68')]('\x27'+_0x25f364+'\x27',_0x44b8('0x46'))[_0x44b8('0x68')]('\x27'+_0x25f364+'\x27',_0x44b8('0x47'))[_0x44b8('0x69')]('cm_contacts')['where']('deletedAt\x20IS\x20NULL')[_0x44b8('0x28')](_0x44b8('0x8c'),_0x16721d[_0x44b8('0x8d')]['toString']())['where'](_0x44b8('0x8e'))[_0x44b8('0x28')](_0x44b8('0x8f'),squel[_0x44b8('0x89')]()[_0x44b8('0x68')]('COALESCE(phone,\x27\x27)')['from']('cm_hopper')['where'](_0x44b8('0x6c'),_0x2eb6ce[_0x44b8('0x2f')]['id'][_0x44b8('0x6f')]())))[_0x44b8('0x6f')]();break;default:_0xbf96c1=squel[_0x44b8('0x95')]()[_0x44b8('0x96')]('cm_hopper')[_0x44b8('0x84')](['phone',_0x44b8('0x86'),_0x44b8('0x87'),_0x44b8('0x88'),'VoiceQueueId','createdAt',_0x44b8('0x47')],squel[_0x44b8('0x89')]()['field']('phone',_0x44b8('0x85'))[_0x44b8('0x68')]('\x27'+_0x25f364+'\x27',_0x44b8('0x86'))[_0x44b8('0x68')]('id',_0x44b8('0x87'))['field'](_0x16721d[_0x44b8('0x8d')][_0x44b8('0x6f')](),_0x44b8('0x88'))[_0x44b8('0x68')](_0x2eb6ce[_0x44b8('0x2f')]['id'][_0x44b8('0x6f')](),_0x44b8('0x4e'))['field']('\x27'+_0x25f364+'\x27',_0x44b8('0x46'))[_0x44b8('0x68')]('\x27'+_0x25f364+'\x27',_0x44b8('0x47'))[_0x44b8('0x69')](_0x44b8('0x8a'))[_0x44b8('0x28')]('deletedAt\x20IS\x20NULL')[_0x44b8('0x28')](_0x44b8('0x8c'),_0x16721d[_0x44b8('0x8d')][_0x44b8('0x6f')]())['where'](_0x44b8('0x8e')))[_0x44b8('0x6f')]();}_0x1f6244[_0x44b8('0x6e')](db[_0x44b8('0x70')]['query'](_0xbf96c1));}return BPromise['all'](_0x1f6244);}})[_0x44b8('0x13')](function(){var _0x2ad4ab=[];var _0x196b4b=squel[_0x44b8('0x95')]()[_0x44b8('0x96')]('cm_hopper_additional_phones')[_0x44b8('0x84')]([_0x44b8('0x97'),_0x44b8('0x85'),_0x44b8('0x98'),_0x44b8('0x46'),_0x44b8('0x47')],squel['select']()[_0x44b8('0x68')](_0x44b8('0x99'))[_0x44b8('0x68')](_0x44b8('0x9a'))[_0x44b8('0x68')](_0x44b8('0x9b'))[_0x44b8('0x68')]('\x27'+_0x25f364+'\x27','createdAt')[_0x44b8('0x68')]('\x27'+_0x25f364+'\x27',_0x44b8('0x47'))[_0x44b8('0x69')](_0x44b8('0x9c'),'ci')['join'](_0x44b8('0x93'),'h','h.ContactId=ci.CmContactId')[_0x44b8('0x28')](_0x44b8('0x9d'),_0x25f364)[_0x44b8('0x28')](_0x44b8('0x9e'),'PHONE'))[_0x44b8('0x6f')]();_0x2ad4ab[_0x44b8('0x6e')](db[_0x44b8('0x70')]['query'](_0x196b4b));return BPromise[_0x44b8('0x73')](_0x2ad4ab);})[_0x44b8('0x13')](function(){return _0x77c009;})[_0x44b8('0x13')](respondWithResult(_0x105ca0,null))[_0x44b8('0x2d')](handleError(_0x105ca0,null));};exports[_0x44b8('0x9f')]=function(_0x257702,_0x17560c){return db[_0x44b8('0x29')][_0x44b8('0x1e')]({'where':{'id':_0x257702[_0x44b8('0x2f')]['id']}})['then'](handleEntityNotFound(_0x17560c,null))[_0x44b8('0x13')](function(_0x4d11d5){if(_0x4d11d5){return _0x4d11d5[_0x44b8('0x9f')](_0x257702[_0x44b8('0x32')][_0x44b8('0x67')]);}})[_0x44b8('0x13')](function(_0xafca17){if(_0xafca17){return db['CmHopper']['destroy']({'where':{'ListId':_0x257702['query'][_0x44b8('0x67')],'VoiceQueueId':_0x257702[_0x44b8('0x2f')]['id']}})[_0x44b8('0x13')](function(){return _0xafca17;});}})[_0x44b8('0x13')](respondWithStatusCode(_0x17560c,null))[_0x44b8('0x2d')](handleError(_0x17560c,null));};exports[_0x44b8('0xa0')]=function(_0x513302,_0xfdb408){var _0x119dda={};var _0x5834fe={};var _0xe5cc1e;var _0x4c55e6;return db[_0x44b8('0x29')][_0x44b8('0x49')]({'where':{'id':_0x513302['params']['id']}})[_0x44b8('0x13')](handleEntityNotFound(_0xfdb408,null))[_0x44b8('0x13')](function(_0x537eab){if(_0x537eab){_0xe5cc1e=_0x537eab;_0x5834fe[_0x44b8('0x30')]=_[_0x44b8('0x31')](db[_0x44b8('0x81')][_0x44b8('0x24')]);_0x5834fe['query']=_[_0x44b8('0x31')](_0x513302[_0x44b8('0x32')]);_0x5834fe[_0x44b8('0x33')]=_[_0x44b8('0x34')](_0x5834fe[_0x44b8('0x30')],_0x5834fe[_0x44b8('0x32')]);_0x119dda[_0x44b8('0x35')]=_['intersection'](_0x5834fe[_0x44b8('0x30')],qs[_0x44b8('0x36')](_0x513302[_0x44b8('0x32')]['fields']));_0x119dda[_0x44b8('0x35')]=_0x119dda[_0x44b8('0x35')]['length']?_0x119dda[_0x44b8('0x35')]:_0x5834fe[_0x44b8('0x30')];_0x119dda[_0x44b8('0x4c')]=qs[_0x44b8('0x4d')](_0x513302['query'][_0x44b8('0x4d')]);_0x119dda[_0x44b8('0x28')]=qs[_0x44b8('0x33')](_[_0x44b8('0x51')](_0x513302[_0x44b8('0x32')],_0x5834fe['filters']));if(_0x513302[_0x44b8('0x32')][_0x44b8('0x19')]){_0x119dda['where']=_[_0x44b8('0x39')](_0x119dda[_0x44b8('0x28')],{'$or':_[_0x44b8('0x1b')](_0x119dda[_0x44b8('0x35')],function(_0x4e9376){var _0x25f31c={};_0x25f31c[_0x4e9376]={'$like':'%'+_0x513302[_0x44b8('0x32')][_0x44b8('0x19')]+'%'};return _0x25f31c;})});}_0x119dda=_[_0x44b8('0x39')]({},_0x119dda,_0x513302[_0x44b8('0x3a')]);return _0xe5cc1e[_0x44b8('0xa0')](_0x119dda);}})[_0x44b8('0x13')](function(_0x57e3c9){if(_0x57e3c9){_0x4c55e6=_0x57e3c9[_0x44b8('0x37')];if(!_0x513302[_0x44b8('0x32')][_0x44b8('0x4a')](_0x44b8('0x4b'))){_0x119dda['limit']=qs[_0x44b8('0x10')](_0x513302[_0x44b8('0x32')][_0x44b8('0x10')]);_0x119dda['offset']=qs['offset'](_0x513302[_0x44b8('0x32')][_0x44b8('0xf')]);}return _0xe5cc1e[_0x44b8('0xa0')](_0x119dda);}})[_0x44b8('0x13')](function(_0x4a5916){if(_0x4a5916){return _0x4a5916?{'count':_0x4c55e6,'rows':_0x4a5916}:null;}})[_0x44b8('0x13')](respondWithResult(_0xfdb408,null))[_0x44b8('0x2d')](handleError(_0xfdb408,null));};exports['addBlackLists']=function(_0xd19a35,_0x2439f2){var _0x22a624;return db['VoiceQueue'][_0x44b8('0x1e')]({'where':{'id':_0xd19a35[_0x44b8('0x2f')]['id']}})[_0x44b8('0x13')](handleEntityNotFound(_0x2439f2,null))[_0x44b8('0x13')](function(_0x14c021){if(_0x14c021){return _0x14c021['addBlackLists'](_0xd19a35[_0x44b8('0x3c')][_0x44b8('0x67')],_['omit'](_0xd19a35[_0x44b8('0x3c')],[_0x44b8('0x67'),'id'])||{});}return null;})[_0x44b8('0x78')](function(_0x3b9cd2){var _0xb6cadf;_0x22a624=_0x3b9cd2||[];var _0x2024eb=[];if(_0x3b9cd2){for(var _0x29af58=0x0;_0x29af58<_0x3b9cd2[_0x44b8('0x37')];_0x29af58+=0x1){var _0x3870a9=_0x3b9cd2[_0x29af58]['get']({'plain':!![]});_0xb6cadf=squel['insert']()['into']('cm_hopper_black')[_0x44b8('0x84')]([_0x44b8('0x85'),'ContactId',_0x44b8('0x88'),_0x44b8('0x4e'),_0x44b8('0x46'),_0x44b8('0x47')],squel[_0x44b8('0x89')]()[_0x44b8('0x68')]('phone',_0x44b8('0x85'))['field']('id','ContactId')[_0x44b8('0x68')](_0x3870a9[_0x44b8('0x8d')][_0x44b8('0x6f')](),_0x44b8('0x88'))[_0x44b8('0x68')](_0xd19a35['params']['id'][_0x44b8('0x6f')](),_0x44b8('0x4e'))[_0x44b8('0x68')](_0x44b8('0xa1'),_0x44b8('0x46'))[_0x44b8('0x68')](_0x44b8('0xa1'),'updatedAt')[_0x44b8('0x69')](_0x44b8('0x8a'))[_0x44b8('0x28')]('deletedAt\x20IS\x20NULL')[_0x44b8('0x28')](_0x44b8('0x8c'),_0x3870a9[_0x44b8('0x8d')][_0x44b8('0x6f')]())[_0x44b8('0x28')](_0x44b8('0x8e')))[_0x44b8('0x6f')]();_0x2024eb[_0x44b8('0x6e')](db['sequelize'][_0x44b8('0x32')](_0xb6cadf));}return BPromise[_0x44b8('0x73')](_0x2024eb);}})[_0x44b8('0x13')](function(){return _0x22a624;})[_0x44b8('0x13')](respondWithResult(_0x2439f2,null))[_0x44b8('0x2d')](handleError(_0x2439f2,null));};exports[_0x44b8('0xa2')]=function(_0x4ec799,_0x3fa943){return db[_0x44b8('0x29')]['find']({'where':{'id':_0x4ec799[_0x44b8('0x2f')]['id']}})[_0x44b8('0x13')](handleEntityNotFound(_0x3fa943,null))[_0x44b8('0x13')](function(_0x3b1643){if(_0x3b1643){return _0x3b1643['removeBlackLists'](_0x4ec799[_0x44b8('0x32')]['ids']);}})['then'](function(_0x9a5734){if(_0x9a5734){return db[_0x44b8('0x54')][_0x44b8('0x12')]({'where':{'ListId':_0x4ec799[_0x44b8('0x32')][_0x44b8('0x67')],'VoiceQueueId':_0x4ec799['params']['id']}})['then'](function(){return _0x9a5734;});}})['then'](respondWithStatusCode(_0x3fa943,null))[_0x44b8('0x2d')](handleError(_0x3fa943,null));};
\ No newline at end of file
index f31569f..698862b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x956f=['VoiceQueue','save','update','emit','exports','events','../../mysqldb'];(function(_0x2cb236,_0x47d67b){var _0x5e7acf=function(_0x5b4771){while(--_0x5b4771){_0x2cb236['push'](_0x2cb236['shift']());}};_0x5e7acf(++_0x47d67b);}(_0x956f,0xc9));var _0xf956=function(_0x382ca6,_0x1aaf79){_0x382ca6=_0x382ca6-0x0;var _0x295a6c=_0x956f[_0x382ca6];return _0x295a6c;};'use strict';var EventEmitter=require(_0xf956('0x0'));var VoiceQueue=require(_0xf956('0x1'))['db'][_0xf956('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xf956('0x3'),'afterUpdate':_0xf956('0x4'),'afterDestroy':'remove'};function emitEvent(_0x3d37fa){return function(_0x506ab3,_0x28b92b,_0x36e529){VoiceQueueEvents[_0xf956('0x5')](_0x3d37fa+':'+_0x506ab3['id'],_0x506ab3);VoiceQueueEvents['emit'](_0x3d37fa,_0x506ab3);_0x36e529(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module[_0xf956('0x6')]=VoiceQueueEvents;
\ No newline at end of file
+var _0x6289=['exports','events','setMaxListeners','update','remove','emit'];(function(_0x1fbbed,_0x5ea039){var _0x3a666d=function(_0x15b3a1){while(--_0x15b3a1){_0x1fbbed['push'](_0x1fbbed['shift']());}};_0x3a666d(++_0x5ea039);}(_0x6289,0x11b));var _0x9628=function(_0xedea6a,_0x23fa84){_0xedea6a=_0xedea6a-0x0;var _0x3bc2f8=_0x6289[_0xedea6a];return _0x3bc2f8;};'use strict';var EventEmitter=require(_0x9628('0x0'));var VoiceQueue=require('../../mysqldb')['db']['VoiceQueue'];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x9628('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':_0x9628('0x2'),'afterDestroy':_0x9628('0x3')};function emitEvent(_0x56f961){return function(_0x801b29,_0x2b6173,_0x3219c4){VoiceQueueEvents[_0x9628('0x4')](_0x56f961+':'+_0x801b29['id'],_0x801b29);VoiceQueueEvents[_0x9628('0x4')](_0x56f961,_0x801b29);_0x3219c4(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module[_0x9628('0x5')]=VoiceQueueEvents;
\ No newline at end of file
index 9f81d6c..11cdb85 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x34e8=['voice_queues','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./voiceQueue.attributes','exports','VoiceQueue'];(function(_0x4bade4,_0x129a03){var _0x442589=function(_0x54c5b4){while(--_0x54c5b4){_0x4bade4['push'](_0x4bade4['shift']());}};_0x442589(++_0x129a03);}(_0x34e8,0x12c));var _0x834e=function(_0x30ff62,_0x1e58c1){_0x30ff62=_0x30ff62-0x0;var _0x59eefb=_0x34e8[_0x30ff62];return _0x59eefb;};'use strict';var _=require(_0x834e('0x0'));var util=require(_0x834e('0x1'));var logger=require(_0x834e('0x2'))(_0x834e('0x3'));var moment=require('moment');var BPromise=require(_0x834e('0x4'));var rp=require(_0x834e('0x5'));var fs=require('fs');var path=require(_0x834e('0x6'));var rimraf=require(_0x834e('0x7'));var config=require(_0x834e('0x8'));var attributes=require(_0x834e('0x9'));module[_0x834e('0xa')]=function(_0x4a2018,_0x858aa1){return _0x4a2018['define'](_0x834e('0xb'),attributes,{'tableName':_0x834e('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xa9e0=['../../config/environment','./voiceQueue.attributes','exports','define','VoiceQueue','lodash','util','../../config/logger','bluebird','path','rimraf'];(function(_0x53eea2,_0x9bdf03){var _0x591b17=function(_0x22cf07){while(--_0x22cf07){_0x53eea2['push'](_0x53eea2['shift']());}};_0x591b17(++_0x9bdf03);}(_0xa9e0,0x123));var _0x0a9e=function(_0x29b609,_0x19d388){_0x29b609=_0x29b609-0x0;var _0x54c952=_0xa9e0[_0x29b609];return _0x54c952;};'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':'voice_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index c6fcc2f..785b2fa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6568=['include','map','model','stringify','ShowVoiceQueue','find','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','client','defaults','socket.io-emitter','./voiceQueue.socket','register','request','then','info','VoiceQueue,\x20%s,\x20%s','request\x20sent','debug','error','code','message','catch','GetVoiceQueue','VoiceQueue','findAll','options','where','attributes','limit'];(function(_0x28a3ec,_0x4c11c0){var _0x47ea11=function(_0x4a4671){while(--_0x4a4671){_0x28a3ec['push'](_0x28a3ec['shift']());}};_0x47ea11(++_0x4c11c0);}(_0x6568,0x72));var _0x8656=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0x6568[_0x167cc1];return _0x10bc4b;};'use strict';var _=require(_0x8656('0x0'));var util=require(_0x8656('0x1'));var moment=require(_0x8656('0x2'));var BPromise=require(_0x8656('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8656('0x4'));var db=require(_0x8656('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x8656('0x6'))(_0x8656('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x8656('0x8')]['http']({'port':0x232a});config['redis']=_[_0x8656('0x9')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x8656('0xa'))(new Redis(config['redis']));require(_0x8656('0xb'))[_0x8656('0xc')](socket);function respondWithRpcPromise(_0x1b4365,_0x50c248,_0x10ca53){return new BPromise(function(_0x2149da,_0x1465db){return client[_0x8656('0xd')](_0x1b4365,_0x10ca53)[_0x8656('0xe')](function(_0x8c7b59){logger[_0x8656('0xf')](_0x8656('0x10'),_0x50c248,_0x8656('0x11'));logger[_0x8656('0x12')]('VoiceQueue,\x20%s,\x20%s,\x20%s',_0x50c248,_0x8656('0x11'),JSON['stringify'](_0x8c7b59));if(_0x8c7b59['error']){if(_0x8c7b59[_0x8656('0x13')][_0x8656('0x14')]===0x1f4){logger[_0x8656('0x13')](_0x8656('0x10'),_0x50c248,_0x8c7b59[_0x8656('0x13')][_0x8656('0x15')]);return _0x1465db(_0x8c7b59[_0x8656('0x13')][_0x8656('0x15')]);}logger[_0x8656('0x13')](_0x8656('0x10'),_0x50c248,_0x8c7b59[_0x8656('0x13')][_0x8656('0x15')]);return _0x2149da(_0x8c7b59[_0x8656('0x13')][_0x8656('0x15')]);}else{logger[_0x8656('0xf')](_0x8656('0x10'),_0x50c248,_0x8656('0x11'));_0x2149da(_0x8c7b59['result'][_0x8656('0x15')]);}})[_0x8656('0x16')](function(_0x21d0bf){logger[_0x8656('0x13')](_0x8656('0x10'),_0x50c248,_0x21d0bf);_0x1465db(_0x21d0bf);});});}exports[_0x8656('0x17')]=function(_0x46e27b){var _0x1c24a8=this;return new Promise(function(_0x16f548,_0x5cf9d2){return db[_0x8656('0x18')][_0x8656('0x19')]({'raw':_0x46e27b[_0x8656('0x1a')]?_0x46e27b['options']['raw']===undefined?!![]:![]:!![],'where':_0x46e27b['options']?_0x46e27b[_0x8656('0x1a')][_0x8656('0x1b')]||null:null,'attributes':_0x46e27b[_0x8656('0x1a')]?_0x46e27b[_0x8656('0x1a')][_0x8656('0x1c')]||null:null,'limit':_0x46e27b[_0x8656('0x1a')]?_0x46e27b['options'][_0x8656('0x1d')]||null:null,'include':_0x46e27b[_0x8656('0x1a')]?_0x46e27b[_0x8656('0x1a')][_0x8656('0x1e')]?_[_0x8656('0x1f')](_0x46e27b[_0x8656('0x1a')][_0x8656('0x1e')],function(_0xc1cf60){return{'model':db[_0xc1cf60[_0x8656('0x20')]],'as':_0xc1cf60['as'],'attributes':_0xc1cf60[_0x8656('0x1c')],'include':_0xc1cf60[_0x8656('0x1e')]?_[_0x8656('0x1f')](_0xc1cf60[_0x8656('0x1e')],function(_0xb14a8){return{'model':db[_0xb14a8[_0x8656('0x20')]],'as':_0xb14a8['as'],'attributes':_0xb14a8[_0x8656('0x1c')],'include':_0xb14a8[_0x8656('0x1e')]?_[_0x8656('0x1f')](_0xb14a8[_0x8656('0x1e')],function(_0x319b23){return{'model':db[_0x319b23[_0x8656('0x20')]],'as':_0x319b23['as'],'attributes':_0x319b23['attributes']};}):[]};}):[]};}):[]:[]})[_0x8656('0xe')](function(_0xe72d7d){logger[_0x8656('0xf')]('GetVoiceQueue',_0x46e27b);logger[_0x8656('0x12')](_0x8656('0x17'),_0x46e27b,JSON[_0x8656('0x21')](_0xe72d7d));_0x16f548(_0xe72d7d);})[_0x8656('0x16')](function(_0x518804){logger[_0x8656('0x13')](_0x8656('0x17'),_0x518804[_0x8656('0x15')],_0x46e27b);_0x5cf9d2(_0x1c24a8[_0x8656('0x13')](0x1f4,_0x518804['message']));});});};exports[_0x8656('0x22')]=function(_0x3ba406){var _0x37edcc=this;return new Promise(function(_0xa3d6f3,_0xcd9aea){return db[_0x8656('0x18')][_0x8656('0x23')]({'raw':_0x3ba406['options']?_0x3ba406[_0x8656('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x3ba406['options']?_0x3ba406[_0x8656('0x1a')][_0x8656('0x1b')]||null:null,'attributes':_0x3ba406[_0x8656('0x1a')]?_0x3ba406[_0x8656('0x1a')][_0x8656('0x1c')]||null:null,'include':_0x3ba406['options']?_0x3ba406[_0x8656('0x1a')][_0x8656('0x1e')]?_[_0x8656('0x1f')](_0x3ba406[_0x8656('0x1a')][_0x8656('0x1e')],function(_0x28ad66){return{'model':db[_0x28ad66[_0x8656('0x20')]],'as':_0x28ad66['as'],'attributes':_0x28ad66[_0x8656('0x1c')],'include':_0x28ad66['include']?_[_0x8656('0x1f')](_0x28ad66['include'],function(_0x189050){return{'model':db[_0x189050[_0x8656('0x20')]],'as':_0x189050['as'],'attributes':_0x189050[_0x8656('0x1c')],'include':_0x189050[_0x8656('0x1e')]?_[_0x8656('0x1f')](_0x189050[_0x8656('0x1e')],function(_0x113afd){return{'model':db[_0x113afd[_0x8656('0x20')]],'as':_0x113afd['as'],'attributes':_0x113afd[_0x8656('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x8656('0xe')](function(_0x47c42e){logger[_0x8656('0xf')](_0x8656('0x22'),_0x3ba406);logger[_0x8656('0x12')]('ShowVoiceQueue',_0x3ba406,JSON[_0x8656('0x21')](_0x47c42e));_0xa3d6f3(_0x47c42e);})[_0x8656('0x16')](function(_0x1b8974){logger[_0x8656('0x13')](_0x8656('0x22'),_0x1b8974[_0x8656('0x15')],_0x3ba406);_0xcd9aea(_0x37edcc[_0x8656('0x13')](0x1f4,_0x1b8974['message']));});});};
\ No newline at end of file
+var _0x5b69=['find','raw','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','localhost','socket.io-emitter','register','request','then','info','VoiceQueue,\x20%s,\x20%s','request\x20sent','VoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetVoiceQueue','VoiceQueue','options','where','attributes','limit','include','model','map','debug','ShowVoiceQueue'];(function(_0x55855c,_0x151e65){var _0x551f70=function(_0x1ed38f){while(--_0x1ed38f){_0x55855c['push'](_0x55855c['shift']());}};_0x551f70(++_0x151e65);}(_0x5b69,0x192));var _0x95b6=function(_0x29f9af,_0x4f3d10){_0x29f9af=_0x29f9af-0x0;var _0x56e4a8=_0x5b69[_0x29f9af];return _0x56e4a8;};'use strict';var _=require(_0x95b6('0x0'));var util=require(_0x95b6('0x1'));var moment=require('moment');var BPromise=require(_0x95b6('0x2'));var rs=require(_0x95b6('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x95b6('0x4'))['db'];var utils=require(_0x95b6('0x5'));var logger=require(_0x95b6('0x6'))(_0x95b6('0x7'));var config=require(_0x95b6('0x8'));var jayson=require(_0x95b6('0x9'));var client=jayson[_0x95b6('0xa')]['http']({'port':0x232a});config[_0x95b6('0xb')]=_['defaults'](config[_0x95b6('0xb')],{'host':_0x95b6('0xc'),'port':0x18eb});var socket=require(_0x95b6('0xd'))(new Redis(config[_0x95b6('0xb')]));require('./voiceQueue.socket')[_0x95b6('0xe')](socket);function respondWithRpcPromise(_0x2ee11b,_0x2f0af7,_0x265394){return new BPromise(function(_0x5af439,_0x8e34ed){return client[_0x95b6('0xf')](_0x2ee11b,_0x265394)[_0x95b6('0x10')](function(_0x5438d3){logger[_0x95b6('0x11')](_0x95b6('0x12'),_0x2f0af7,_0x95b6('0x13'));logger['debug'](_0x95b6('0x14'),_0x2f0af7,_0x95b6('0x13'),JSON[_0x95b6('0x15')](_0x5438d3));if(_0x5438d3[_0x95b6('0x16')]){if(_0x5438d3[_0x95b6('0x16')][_0x95b6('0x17')]===0x1f4){logger[_0x95b6('0x16')](_0x95b6('0x12'),_0x2f0af7,_0x5438d3[_0x95b6('0x16')][_0x95b6('0x18')]);return _0x8e34ed(_0x5438d3['error'][_0x95b6('0x18')]);}logger['error'](_0x95b6('0x12'),_0x2f0af7,_0x5438d3['error'][_0x95b6('0x18')]);return _0x5af439(_0x5438d3[_0x95b6('0x16')][_0x95b6('0x18')]);}else{logger[_0x95b6('0x11')](_0x95b6('0x12'),_0x2f0af7,'request\x20sent');_0x5af439(_0x5438d3[_0x95b6('0x19')][_0x95b6('0x18')]);}})[_0x95b6('0x1a')](function(_0x31598f){logger[_0x95b6('0x16')](_0x95b6('0x12'),_0x2f0af7,_0x31598f);_0x8e34ed(_0x31598f);});});}exports[_0x95b6('0x1b')]=function(_0x16a672){var _0x3b283f=this;return new Promise(function(_0x8bdb6a,_0x5284bd){return db[_0x95b6('0x1c')]['findAll']({'raw':_0x16a672[_0x95b6('0x1d')]?_0x16a672[_0x95b6('0x1d')]['raw']===undefined?!![]:![]:!![],'where':_0x16a672[_0x95b6('0x1d')]?_0x16a672['options'][_0x95b6('0x1e')]||null:null,'attributes':_0x16a672[_0x95b6('0x1d')]?_0x16a672[_0x95b6('0x1d')][_0x95b6('0x1f')]||null:null,'limit':_0x16a672[_0x95b6('0x1d')]?_0x16a672[_0x95b6('0x1d')][_0x95b6('0x20')]||null:null,'include':_0x16a672[_0x95b6('0x1d')]?_0x16a672['options']['include']?_['map'](_0x16a672[_0x95b6('0x1d')][_0x95b6('0x21')],function(_0x20e067){return{'model':db[_0x20e067[_0x95b6('0x22')]],'as':_0x20e067['as'],'attributes':_0x20e067[_0x95b6('0x1f')],'include':_0x20e067['include']?_[_0x95b6('0x23')](_0x20e067[_0x95b6('0x21')],function(_0x552c0c){return{'model':db[_0x552c0c[_0x95b6('0x22')]],'as':_0x552c0c['as'],'attributes':_0x552c0c[_0x95b6('0x1f')],'include':_0x552c0c[_0x95b6('0x21')]?_['map'](_0x552c0c[_0x95b6('0x21')],function(_0x217061){return{'model':db[_0x217061[_0x95b6('0x22')]],'as':_0x217061['as'],'attributes':_0x217061[_0x95b6('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x95b6('0x10')](function(_0x1ac1c9){logger[_0x95b6('0x11')](_0x95b6('0x1b'),_0x16a672);logger[_0x95b6('0x24')](_0x95b6('0x1b'),_0x16a672,JSON[_0x95b6('0x15')](_0x1ac1c9));_0x8bdb6a(_0x1ac1c9);})['catch'](function(_0x1d6089){logger[_0x95b6('0x16')](_0x95b6('0x1b'),_0x1d6089[_0x95b6('0x18')],_0x16a672);_0x5284bd(_0x3b283f[_0x95b6('0x16')](0x1f4,_0x1d6089[_0x95b6('0x18')]));});});};exports[_0x95b6('0x25')]=function(_0x41b2b2){var _0x52b00c=this;return new Promise(function(_0x2477e4,_0x2533fe){return db[_0x95b6('0x1c')][_0x95b6('0x26')]({'raw':_0x41b2b2[_0x95b6('0x1d')]?_0x41b2b2[_0x95b6('0x1d')][_0x95b6('0x27')]===undefined?!![]:![]:!![],'where':_0x41b2b2['options']?_0x41b2b2[_0x95b6('0x1d')][_0x95b6('0x1e')]||null:null,'attributes':_0x41b2b2[_0x95b6('0x1d')]?_0x41b2b2['options'][_0x95b6('0x1f')]||null:null,'include':_0x41b2b2[_0x95b6('0x1d')]?_0x41b2b2[_0x95b6('0x1d')][_0x95b6('0x21')]?_[_0x95b6('0x23')](_0x41b2b2['options']['include'],function(_0x7b1fb9){return{'model':db[_0x7b1fb9[_0x95b6('0x22')]],'as':_0x7b1fb9['as'],'attributes':_0x7b1fb9[_0x95b6('0x1f')],'include':_0x7b1fb9['include']?_[_0x95b6('0x23')](_0x7b1fb9[_0x95b6('0x21')],function(_0x1e055b){return{'model':db[_0x1e055b[_0x95b6('0x22')]],'as':_0x1e055b['as'],'attributes':_0x1e055b[_0x95b6('0x1f')],'include':_0x1e055b['include']?_['map'](_0x1e055b[_0x95b6('0x21')],function(_0x311329){return{'model':db[_0x311329['model']],'as':_0x311329['as'],'attributes':_0x311329[_0x95b6('0x1f')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x25e342){logger[_0x95b6('0x11')](_0x95b6('0x25'),_0x41b2b2);logger[_0x95b6('0x24')](_0x95b6('0x25'),_0x41b2b2,JSON[_0x95b6('0x15')](_0x25e342));_0x2477e4(_0x25e342);})['catch'](function(_0x2b6974){logger[_0x95b6('0x16')]('ShowVoiceQueue',_0x2b6974['message'],_0x41b2b2);_0x2533fe(_0x52b00c[_0x95b6('0x16')](0x1f4,_0x2b6974['message']));});});};
\ No newline at end of file
index e5fd104..a1e6496 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4d31=['register','length','voiceQueue:','save','update','emit','removeListener'];(function(_0x136ad3,_0x37ee64){var _0x5508c8=function(_0x2168ef){while(--_0x2168ef){_0x136ad3['push'](_0x136ad3['shift']());}};_0x5508c8(++_0x37ee64);}(_0x4d31,0xf1));var _0x14d3=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x4d31[_0x321bb2];return _0x9c12ed;};'use strict';var VoiceQueueEvents=require('./voiceQueue.events');var events=[_0x14d3('0x0'),'remove',_0x14d3('0x1')];function createListener(_0xaf6f9e,_0x41244f){return function(_0x38d9eb){_0x41244f[_0x14d3('0x2')](_0xaf6f9e,_0x38d9eb);};}function removeListener(_0x26dd4a,_0x319df1){return function(){VoiceQueueEvents[_0x14d3('0x3')](_0x26dd4a,_0x319df1);};}exports[_0x14d3('0x4')]=function(_0x38be61){for(var _0x1e798f=0x0,_0x2fdd86=events[_0x14d3('0x5')];_0x1e798f<_0x2fdd86;_0x1e798f++){var _0x489f15=events[_0x1e798f];var _0x8a55bb=createListener(_0x14d3('0x6')+_0x489f15,_0x38be61);VoiceQueueEvents['on'](_0x489f15,_0x8a55bb);}};
\ No newline at end of file
+var _0x0078=['register','length','voiceQueue:','./voiceQueue.events','save','remove','emit','removeListener'];(function(_0x35181c,_0xaefce6){var _0x3f5987=function(_0x4980af){while(--_0x4980af){_0x35181c['push'](_0x35181c['shift']());}};_0x3f5987(++_0xaefce6);}(_0x0078,0x73));var _0x8007=function(_0x145b00,_0xf24eda){_0x145b00=_0x145b00-0x0;var _0x46fd2e=_0x0078[_0x145b00];return _0x46fd2e;};'use strict';var VoiceQueueEvents=require(_0x8007('0x0'));var events=[_0x8007('0x1'),_0x8007('0x2'),'update'];function createListener(_0x480520,_0x1c7ca7){return function(_0x576dcb){_0x1c7ca7[_0x8007('0x3')](_0x480520,_0x576dcb);};}function removeListener(_0x37164e,_0x45b341){return function(){VoiceQueueEvents[_0x8007('0x4')](_0x37164e,_0x45b341);};}exports[_0x8007('0x5')]=function(_0xcc7ba4){for(var _0x253e07=0x0,_0x4796e1=events[_0x8007('0x6')];_0x253e07<_0x4796e1;_0x253e07++){var _0x2ec7d3=events[_0x253e07];var _0x1234f8=createListener(_0x8007('0x7')+_0x2ec7d3,_0xcc7ba4);VoiceQueueEvents['on'](_0x2ec7d3,_0x1234f8);}};
\ No newline at end of file
index 08a2f35..75d5ca8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8e7a=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','/describe','isAuthenticated','/:id','show','post','create','put','delete','multer','util','path','connect-timeout','express'];(function(_0xbaf1b,_0x21ea7d){var _0x7ee631=function(_0xd5ca07){while(--_0xd5ca07){_0xbaf1b['push'](_0xbaf1b['shift']());}};_0x7ee631(++_0x21ea7d);}(_0x8e7a,0xdf));var _0xa8e7=function(_0x2b5d75,_0x12888c){_0x2b5d75=_0x2b5d75-0x0;var _0x446bb2=_0x8e7a[_0x2b5d75];return _0x446bb2;};'use strict';var multer=require(_0xa8e7('0x0'));var util=require(_0xa8e7('0x1'));var path=require(_0xa8e7('0x2'));var timeout=require(_0xa8e7('0x3'));var express=require(_0xa8e7('0x4'));var router=express[_0xa8e7('0x5')]();var fs_extra=require(_0xa8e7('0x6'));var auth=require(_0xa8e7('0x7'));var interaction=require(_0xa8e7('0x8'));var config=require(_0xa8e7('0x9'));var controller=require('./voiceQueueReport.controller');router[_0xa8e7('0xa')]('/',auth['isAuthenticated'](),controller['index']);router[_0xa8e7('0xa')](_0xa8e7('0xb'),auth['isAuthenticated'](),controller['describe']);router[_0xa8e7('0xa')]('/index',auth[_0xa8e7('0xc')](),controller['getVoiceQueuesReport']);router[_0xa8e7('0xa')](_0xa8e7('0xd'),auth[_0xa8e7('0xc')](),controller[_0xa8e7('0xe')]);router[_0xa8e7('0xf')]('/',auth['isAuthenticated'](),controller[_0xa8e7('0x10')]);router[_0xa8e7('0x11')](_0xa8e7('0xd'),auth[_0xa8e7('0xc')](),controller['update']);router[_0xa8e7('0x12')](_0xa8e7('0xd'),auth[_0xa8e7('0xc')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x8baf=['path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceQueueReport.controller','isAuthenticated','get','/describe','describe','/index','getVoiceQueuesReport','show','post','put','/:id','delete','destroy','exports','multer'];(function(_0x54516e,_0x5df54c){var _0x4d1e6f=function(_0x454bbc){while(--_0x454bbc){_0x54516e['push'](_0x54516e['shift']());}};_0x4d1e6f(++_0x5df54c);}(_0x8baf,0x11d));var _0xf8ba=function(_0x51b1bd,_0xd9d2aa){_0x51b1bd=_0x51b1bd-0x0;var _0x1ce3d8=_0x8baf[_0x51b1bd];return _0x1ce3d8;};'use strict';var multer=require(_0xf8ba('0x0'));var util=require('util');var path=require(_0xf8ba('0x1'));var timeout=require('connect-timeout');var express=require(_0xf8ba('0x2'));var router=express[_0xf8ba('0x3')]();var fs_extra=require(_0xf8ba('0x4'));var auth=require(_0xf8ba('0x5'));var interaction=require(_0xf8ba('0x6'));var config=require(_0xf8ba('0x7'));var controller=require(_0xf8ba('0x8'));router['get']('/',auth[_0xf8ba('0x9')](),controller['index']);router[_0xf8ba('0xa')](_0xf8ba('0xb'),auth[_0xf8ba('0x9')](),controller[_0xf8ba('0xc')]);router[_0xf8ba('0xa')](_0xf8ba('0xd'),auth['isAuthenticated'](),controller[_0xf8ba('0xe')]);router[_0xf8ba('0xa')]('/:id',auth[_0xf8ba('0x9')](),controller[_0xf8ba('0xf')]);router[_0xf8ba('0x10')]('/',auth[_0xf8ba('0x9')](),controller['create']);router[_0xf8ba('0x11')](_0xf8ba('0x12'),auth[_0xf8ba('0x9')](),controller['update']);router[_0xf8ba('0x13')](_0xf8ba('0x12'),auth[_0xf8ba('0x9')](),controller[_0xf8ba('0x14')]);module[_0xf8ba('0x15')]=router;
\ No newline at end of file
index 75b8e36..475ca91 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x57c2=['diff','queuecallerleaveAt','setDataValue','holdtime','INTEGER','BOOLEAN','COMPLETEDBYCALLER,\x20COMPLETEDBYAGENT,\x20FORWARDTRANFER,\x20BLINDTRANSFER,\x20ATTENDEDTRANSFER,\x20EXITWITHKEY,\x20TIMEOUT','FORWARD,\x20BLIND,\x20ATTENDED','sequelize','moment','exports','STRING','DATE','getDataValue','queuecallerjoinAt','format'];(function(_0x443337,_0x47051c){var _0x1aa11a=function(_0x1452f5){while(--_0x1452f5){_0x443337['push'](_0x443337['shift']());}};_0x1aa11a(++_0x47051c);}(_0x57c2,0x198));var _0x257c=function(_0x53c057,_0xfa6941){_0x53c057=_0x53c057-0x0;var _0x593b09=_0x57c2[_0x53c057];return _0x593b09;};'use strict';var Sequelize=require(_0x257c('0x0'));var moment=require(_0x257c('0x1'));module[_0x257c('0x2')]={'type':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize[_0x257c('0x3')]},'calleridname':{'type':Sequelize[_0x257c('0x3')]},'queue':{'type':Sequelize[_0x257c('0x3')]},'queuecallerjoinAt':{'type':Sequelize[_0x257c('0x4')]},'queuecallerleaveAt':{'type':Sequelize[_0x257c('0x4')],'set':function(_0x517fb0){var _0x598b1d=moment(_0x517fb0);var _0x781e65=moment(this[_0x257c('0x5')](_0x257c('0x6')))[_0x257c('0x7')]('YYYY-MM-DD\x20HH:mm:ss');var _0x22d263=_0x598b1d[_0x257c('0x8')](_0x781e65,'seconds');this['setDataValue'](_0x257c('0x9'),_0x517fb0);this[_0x257c('0xa')](_0x257c('0xb'),_0x22d263||null);}},'position':{'type':Sequelize[_0x257c('0xc')]},'count':{'type':Sequelize['INTEGER']},'queuecallerabandon':{'type':Sequelize[_0x257c('0xd')],'defaultValue':![]},'queuecallerabandonAt':{'type':Sequelize[_0x257c('0x4')]},'queuecallercomplete':{'type':Sequelize[_0x257c('0xd')],'defaultValue':![]},'queuecallercompleteAt':{'type':Sequelize[_0x257c('0x4')]},'queuecallerexit':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queuecallerexitAt':{'type':Sequelize[_0x257c('0x4')]},'queuecallerexitreason':{'type':Sequelize[_0x257c('0x3')],'comment':_0x257c('0xe')},'originalposition':{'type':Sequelize[_0x257c('0xc')]},'channel':{'type':Sequelize[_0x257c('0x3')]},'connectedlinenum':{'type':Sequelize[_0x257c('0x3')]},'connectedlinename':{'type':Sequelize[_0x257c('0x3')]},'accountcode':{'type':Sequelize['STRING']},'context':{'type':Sequelize['STRING']},'exten':{'type':Sequelize['STRING']},'priority':{'type':Sequelize['STRING']},'holdtime':{'type':Sequelize[_0x257c('0xc')]},'mohtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'assigned':{'type':Sequelize[_0x257c('0xd')],'defaultValue':![]},'lastAssignedTo':{'type':Sequelize['STRING']},'transfer':{'type':Sequelize[_0x257c('0xd')],'defaultValue':![]},'transfertype':{'type':Sequelize['STRING'],'comment':_0x257c('0xf')},'transferexten':{'type':Sequelize[_0x257c('0x3')]},'transferuniqueid':{'type':Sequelize[_0x257c('0x3')]},'disposition':{'type':Sequelize['STRING']},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize['STRING']},'queuecallerenterreason':{'type':Sequelize[_0x257c('0xc')],'defaultValue':0x0},'note':{'type':Sequelize[_0x257c('0x3')]}};
\ No newline at end of file
+var _0xe4a6=['format','YYYY-MM-DD\x20HH:mm:ss','diff','setDataValue','queuecallerleaveAt','holdtime','INTEGER','BOOLEAN','COMPLETEDBYCALLER,\x20COMPLETEDBYAGENT,\x20FORWARDTRANFER,\x20BLINDTRANSFER,\x20ATTENDEDTRANSFER,\x20EXITWITHKEY,\x20TIMEOUT','FORWARD,\x20BLIND,\x20ATTENDED','sequelize','moment','STRING','DATE','getDataValue','queuecallerjoinAt'];(function(_0x23b4b3,_0x4c092b){var _0x387006=function(_0x2ec4bd){while(--_0x2ec4bd){_0x23b4b3['push'](_0x23b4b3['shift']());}};_0x387006(++_0x4c092b);}(_0xe4a6,0x16a));var _0x6e4a=function(_0x3cf868,_0x28a57a){_0x3cf868=_0x3cf868-0x0;var _0x104034=_0xe4a6[_0x3cf868];return _0x104034;};'use strict';var Sequelize=require(_0x6e4a('0x0'));var moment=require(_0x6e4a('0x1'));module['exports']={'type':{'type':Sequelize[_0x6e4a('0x2')]},'uniqueid':{'type':Sequelize[_0x6e4a('0x2')]},'calleridnum':{'type':Sequelize[_0x6e4a('0x2')]},'calleridname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x6e4a('0x2')]},'queuecallerjoinAt':{'type':Sequelize['DATE']},'queuecallerleaveAt':{'type':Sequelize[_0x6e4a('0x3')],'set':function(_0x23d634){var _0x267e73=moment(_0x23d634);var _0x2d0fdc=moment(this[_0x6e4a('0x4')](_0x6e4a('0x5')))[_0x6e4a('0x6')](_0x6e4a('0x7'));var _0x2b194b=_0x267e73[_0x6e4a('0x8')](_0x2d0fdc,'seconds');this[_0x6e4a('0x9')](_0x6e4a('0xa'),_0x23d634);this[_0x6e4a('0x9')](_0x6e4a('0xb'),_0x2b194b||null);}},'position':{'type':Sequelize[_0x6e4a('0xc')]},'count':{'type':Sequelize[_0x6e4a('0xc')]},'queuecallerabandon':{'type':Sequelize[_0x6e4a('0xd')],'defaultValue':![]},'queuecallerabandonAt':{'type':Sequelize[_0x6e4a('0x3')]},'queuecallercomplete':{'type':Sequelize[_0x6e4a('0xd')],'defaultValue':![]},'queuecallercompleteAt':{'type':Sequelize[_0x6e4a('0x3')]},'queuecallerexit':{'type':Sequelize[_0x6e4a('0xd')],'defaultValue':![]},'queuecallerexitAt':{'type':Sequelize['DATE']},'queuecallerexitreason':{'type':Sequelize[_0x6e4a('0x2')],'comment':_0x6e4a('0xe')},'originalposition':{'type':Sequelize[_0x6e4a('0xc')]},'channel':{'type':Sequelize['STRING']},'connectedlinenum':{'type':Sequelize['STRING']},'connectedlinename':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize[_0x6e4a('0x2')]},'context':{'type':Sequelize[_0x6e4a('0x2')]},'exten':{'type':Sequelize[_0x6e4a('0x2')]},'priority':{'type':Sequelize[_0x6e4a('0x2')]},'holdtime':{'type':Sequelize[_0x6e4a('0xc')]},'mohtime':{'type':Sequelize[_0x6e4a('0xc')],'defaultValue':0x0},'assigned':{'type':Sequelize[_0x6e4a('0xd')],'defaultValue':![]},'lastAssignedTo':{'type':Sequelize['STRING']},'transfer':{'type':Sequelize[_0x6e4a('0xd')],'defaultValue':![]},'transfertype':{'type':Sequelize[_0x6e4a('0x2')],'comment':_0x6e4a('0xf')},'transferexten':{'type':Sequelize['STRING']},'transferuniqueid':{'type':Sequelize[_0x6e4a('0x2')]},'disposition':{'type':Sequelize['STRING']},'secondDisposition':{'type':Sequelize[_0x6e4a('0x2')]},'thirdDisposition':{'type':Sequelize[_0x6e4a('0x2')]},'queuecallerenterreason':{'type':Sequelize[_0x6e4a('0xc')],'defaultValue':0x0},'note':{'type':Sequelize[_0x6e4a('0x2')]}};
\ No newline at end of file
index 1ac7ecf..af985f0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8e46=['merge','type','VIRTUAL','VoiceQueueReport','includeAll','include','findAll','rows','catch','show','params','rawAttributes','options','find','create','body','destroy','describe','getVoiceQueuesReport','nolimit','pick','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','path','sox','ejs','fs-extra','lodash','squel','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','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','json','offset','undefined','limit','count','Content-Range','reject','save','update','then','end','error','stack','name','send','index','model','map','keys','filters','intersection','query','fields','attributes','length','hasOwnProperty','order','sort','where','filter'];(function(_0x18f90b,_0x231462){var _0x54f950=function(_0x22f120){while(--_0x22f120){_0x18f90b['push'](_0x18f90b['shift']());}};_0x54f950(++_0x231462);}(_0x8e46,0x114));var _0x68e4=function(_0x5400a1,_0x2275aa){_0x5400a1=_0x5400a1-0x0;var _0x4006c7=_0x8e46[_0x5400a1];return _0x4006c7;};'use strict';var emlformat=require(_0x68e4('0x0'));var rimraf=require(_0x68e4('0x1'));var zipdir=require(_0x68e4('0x2'));var jsonpatch=require(_0x68e4('0x3'));var rp=require(_0x68e4('0x4'));var moment=require('moment');var BPromise=require(_0x68e4('0x5'));var Mustache=require(_0x68e4('0x6'));var util=require('util');var path=require(_0x68e4('0x7'));var sox=require(_0x68e4('0x8'));var csv=require('to-csv');var ejs=require(_0x68e4('0x9'));var fs=require('fs');var fs_extra=require(_0x68e4('0xa'));var _=require(_0x68e4('0xb'));var squel=require(_0x68e4('0xc'));var crypto=require(_0x68e4('0xd'));var jsforce=require(_0x68e4('0xe'));var deskjs=require(_0x68e4('0xf'));var toCsv=require('to-csv');var querystring=require(_0x68e4('0x10'));var Papa=require(_0x68e4('0x11'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x68e4('0x12'));var as=require(_0x68e4('0x13'));var hardwareService=require(_0x68e4('0x14'));var logger=require(_0x68e4('0x15'))(_0x68e4('0x16'));var utils=require(_0x68e4('0x17'));var config=require(_0x68e4('0x18'));var licenseUtil=require(_0x68e4('0x19'));var db=require(_0x68e4('0x1a'))['db'];config[_0x68e4('0x1b')]=_[_0x68e4('0x1c')](config[_0x68e4('0x1b')],{'host':_0x68e4('0x1d'),'port':0x18eb});var socket=require(_0x68e4('0x1e'))(new Redis(config[_0x68e4('0x1b')]));require('./voiceQueueReport.socket')[_0x68e4('0x1f')](socket);function respondWithStatusCode(_0x434bca,_0x46ed6e){_0x46ed6e=_0x46ed6e||0xcc;return function(_0x2a46b7){if(_0x2a46b7){return _0x434bca[_0x68e4('0x20')](_0x46ed6e);}return _0x434bca[_0x68e4('0x21')](_0x46ed6e)['end']();};}function respondWithResult(_0x10b9e3,_0x339352){_0x339352=_0x339352||0xc8;return function(_0x17c0a3){if(_0x17c0a3){return _0x10b9e3[_0x68e4('0x21')](_0x339352)[_0x68e4('0x22')](_0x17c0a3);}};}function respondWithFilteredResult(_0x1d37a6,_0x227339){return function(_0x10037c){if(_0x10037c){var _0xe81115=typeof _0x227339[_0x68e4('0x23')]===_0x68e4('0x24')&&typeof _0x227339[_0x68e4('0x25')]===_0x68e4('0x24');var _0x1dddd1=_0x10037c[_0x68e4('0x26')];var _0x5cf0e3=_0xe81115?0x0:_0x227339[_0x68e4('0x23')];var _0x400c41=_0xe81115?_0x10037c['count']:_0x227339[_0x68e4('0x23')]+_0x227339[_0x68e4('0x25')];var _0x36cfc2;if(_0x400c41>=_0x1dddd1){_0x400c41=_0x1dddd1;_0x36cfc2=0xc8;}else{_0x36cfc2=0xce;}_0x1d37a6[_0x68e4('0x21')](_0x36cfc2);return _0x1d37a6['set'](_0x68e4('0x27'),_0x5cf0e3+'-'+_0x400c41+'/'+_0x1dddd1)[_0x68e4('0x22')](_0x10037c);}return null;};}function patchUpdates(_0x5a07ff){return function(_0x39488b){try{jsonpatch['apply'](_0x39488b,_0x5a07ff,!![]);}catch(_0x7b9b13){return BPromise[_0x68e4('0x28')](_0x7b9b13);}return _0x39488b[_0x68e4('0x29')]();};}function saveUpdates(_0x5b0387,_0x3e7efe){return function(_0x16752e){if(_0x16752e){return _0x16752e[_0x68e4('0x2a')](_0x5b0387)[_0x68e4('0x2b')](function(_0x5514da){return _0x5514da;});}return null;};}function removeEntity(_0x1fb11c,_0x139787){return function(_0x4012ca){if(_0x4012ca){return _0x4012ca['destroy']()['then'](function(){_0x1fb11c[_0x68e4('0x21')](0xcc)[_0x68e4('0x2c')]();});}};}function handleEntityNotFound(_0x369d1d,_0x5d132b){return function(_0x2e7d31){if(!_0x2e7d31){_0x369d1d['sendStatus'](0x194);}return _0x2e7d31;};}function handleError(_0x2dfeec,_0xd2fba7){_0xd2fba7=_0xd2fba7||0x1f4;return function(_0x337b5a){logger[_0x68e4('0x2d')](_0x337b5a[_0x68e4('0x2e')]);if(_0x337b5a[_0x68e4('0x2f')]){delete _0x337b5a[_0x68e4('0x2f')];}_0x2dfeec['status'](_0xd2fba7)[_0x68e4('0x30')](_0x337b5a);};}exports[_0x68e4('0x31')]=function(_0x2cd768,_0x6975fe){var _0x44b8d1={},_0x3d8aa2={},_0x1943e8={'count':0x0,'rows':[]};var _0x224f88=_['map'](db['VoiceQueueReport']['rawAttributes'],function(_0x324550){return{'name':_0x324550['fieldName'],'type':_0x324550['type']['key']};});_0x3d8aa2[_0x68e4('0x32')]=_[_0x68e4('0x33')](_0x224f88,'name');_0x3d8aa2['query']=_[_0x68e4('0x34')](_0x2cd768['query']);_0x3d8aa2[_0x68e4('0x35')]=_[_0x68e4('0x36')](_0x3d8aa2['model'],_0x3d8aa2[_0x68e4('0x37')]);_0x44b8d1['attributes']=_[_0x68e4('0x36')](_0x3d8aa2[_0x68e4('0x32')],qs[_0x68e4('0x38')](_0x2cd768[_0x68e4('0x37')][_0x68e4('0x38')]));_0x44b8d1[_0x68e4('0x39')]=_0x44b8d1['attributes'][_0x68e4('0x3a')]?_0x44b8d1[_0x68e4('0x39')]:_0x3d8aa2[_0x68e4('0x32')];if(!_0x2cd768[_0x68e4('0x37')][_0x68e4('0x3b')]('nolimit')){_0x44b8d1[_0x68e4('0x25')]=qs[_0x68e4('0x25')](_0x2cd768['query']['limit']);_0x44b8d1[_0x68e4('0x23')]=qs[_0x68e4('0x23')](_0x2cd768[_0x68e4('0x37')][_0x68e4('0x23')]);}_0x44b8d1[_0x68e4('0x3c')]=qs[_0x68e4('0x3d')](_0x2cd768[_0x68e4('0x37')][_0x68e4('0x3d')]);_0x44b8d1[_0x68e4('0x3e')]=qs[_0x68e4('0x35')](_['pick'](_0x2cd768['query'],_0x3d8aa2[_0x68e4('0x35')]),_0x224f88);if(_0x2cd768[_0x68e4('0x37')][_0x68e4('0x3f')]){_0x44b8d1[_0x68e4('0x3e')]=_[_0x68e4('0x40')](_0x44b8d1[_0x68e4('0x3e')],{'$or':_[_0x68e4('0x33')](_0x224f88,function(_0x5eed07){if(_0x5eed07[_0x68e4('0x41')]!==_0x68e4('0x42')){var _0x4e67a7={};_0x4e67a7[_0x5eed07['name']]={'$like':'%'+_0x2cd768[_0x68e4('0x37')][_0x68e4('0x3f')]+'%'};return _0x4e67a7;}})});}_0x44b8d1=_['merge']({},_0x44b8d1,_0x2cd768['options']);var _0x5a59f7={'where':_0x44b8d1['where']};return db[_0x68e4('0x43')][_0x68e4('0x26')](_0x5a59f7)[_0x68e4('0x2b')](function(_0x592d5d){_0x1943e8[_0x68e4('0x26')]=_0x592d5d;if(_0x2cd768[_0x68e4('0x37')][_0x68e4('0x44')]){_0x44b8d1[_0x68e4('0x45')]=[{'all':!![]}];}return db[_0x68e4('0x43')][_0x68e4('0x46')](_0x44b8d1);})[_0x68e4('0x2b')](function(_0x59abd8){_0x1943e8[_0x68e4('0x47')]=_0x59abd8;return _0x1943e8;})[_0x68e4('0x2b')](respondWithFilteredResult(_0x6975fe,_0x44b8d1))[_0x68e4('0x48')](handleError(_0x6975fe,null));};exports[_0x68e4('0x49')]=function(_0x24b840,_0x1f5b2c){var _0x37a062={'raw':![],'where':{'id':_0x24b840[_0x68e4('0x4a')]['id']}},_0x2860c0={};_0x2860c0[_0x68e4('0x32')]=_['keys'](db[_0x68e4('0x43')][_0x68e4('0x4b')]);_0x2860c0['query']=_[_0x68e4('0x34')](_0x24b840[_0x68e4('0x37')]);_0x2860c0['filters']=_[_0x68e4('0x36')](_0x2860c0[_0x68e4('0x32')],_0x2860c0[_0x68e4('0x37')]);_0x37a062[_0x68e4('0x39')]=_[_0x68e4('0x36')](_0x2860c0[_0x68e4('0x32')],qs[_0x68e4('0x38')](_0x24b840[_0x68e4('0x37')][_0x68e4('0x38')]));_0x37a062['attributes']=_0x37a062[_0x68e4('0x39')][_0x68e4('0x3a')]?_0x37a062[_0x68e4('0x39')]:_0x2860c0[_0x68e4('0x32')];if(_0x24b840['query'][_0x68e4('0x44')]){_0x37a062['include']=[{'all':!![]}];}_0x37a062=_[_0x68e4('0x40')]({},_0x37a062,_0x24b840[_0x68e4('0x4c')]);return db[_0x68e4('0x43')][_0x68e4('0x4d')](_0x37a062)[_0x68e4('0x2b')](handleEntityNotFound(_0x1f5b2c,null))[_0x68e4('0x2b')](respondWithResult(_0x1f5b2c,null))[_0x68e4('0x48')](handleError(_0x1f5b2c,null));};exports[_0x68e4('0x4e')]=function(_0x43c61d,_0x28cd6b){return db['VoiceQueueReport'][_0x68e4('0x4e')](_0x43c61d[_0x68e4('0x4f')],{})[_0x68e4('0x2b')](respondWithResult(_0x28cd6b,0xc9))[_0x68e4('0x48')](handleError(_0x28cd6b,null));};exports['update']=function(_0x32b20d,_0x437d8c){if(_0x32b20d[_0x68e4('0x4f')]['id']){delete _0x32b20d[_0x68e4('0x4f')]['id'];}return db[_0x68e4('0x43')]['find']({'where':{'id':_0x32b20d['params']['id']}})[_0x68e4('0x2b')](handleEntityNotFound(_0x437d8c,null))[_0x68e4('0x2b')](saveUpdates(_0x32b20d[_0x68e4('0x4f')],null))[_0x68e4('0x2b')](respondWithResult(_0x437d8c,null))[_0x68e4('0x48')](handleError(_0x437d8c,null));};exports[_0x68e4('0x50')]=function(_0x43e651,_0x284aff){return db[_0x68e4('0x43')][_0x68e4('0x4d')]({'where':{'id':_0x43e651[_0x68e4('0x4a')]['id']}})[_0x68e4('0x2b')](handleEntityNotFound(_0x284aff,null))[_0x68e4('0x2b')](removeEntity(_0x284aff,null))[_0x68e4('0x48')](handleError(_0x284aff,null));};exports[_0x68e4('0x51')]=function(_0x184794,_0xa8fdc8){return db[_0x68e4('0x43')]['describe']()[_0x68e4('0x2b')](respondWithResult(_0xa8fdc8,null))[_0x68e4('0x48')](handleError(_0xa8fdc8,null));};exports[_0x68e4('0x52')]=function(_0x252845,_0x12d7dd){var _0x30d8d4={},_0x41c3d3={},_0x590efa={'count':0x0,'rows':[]};_0x41c3d3[_0x68e4('0x32')]=_[_0x68e4('0x34')](db[_0x68e4('0x43')][_0x68e4('0x4b')]);_0x41c3d3[_0x68e4('0x37')]=_[_0x68e4('0x34')](_0x252845[_0x68e4('0x37')]);_0x41c3d3[_0x68e4('0x35')]=_['intersection'](_0x41c3d3[_0x68e4('0x32')],_0x41c3d3[_0x68e4('0x37')]);_0x30d8d4[_0x68e4('0x39')]=_[_0x68e4('0x36')](_0x41c3d3[_0x68e4('0x32')],qs[_0x68e4('0x38')](_0x252845[_0x68e4('0x37')][_0x68e4('0x38')]));_0x30d8d4[_0x68e4('0x39')]=_0x30d8d4[_0x68e4('0x39')][_0x68e4('0x3a')]?_0x30d8d4[_0x68e4('0x39')]:_0x41c3d3[_0x68e4('0x32')];if(!_0x252845[_0x68e4('0x37')][_0x68e4('0x3b')](_0x68e4('0x53'))){_0x30d8d4['limit']=qs[_0x68e4('0x25')](_0x252845[_0x68e4('0x37')]['limit']);_0x30d8d4[_0x68e4('0x23')]=qs[_0x68e4('0x23')](_0x252845['query'][_0x68e4('0x23')]);}_0x30d8d4['order']=qs[_0x68e4('0x3d')](_0x252845[_0x68e4('0x37')][_0x68e4('0x3d')]);_0x30d8d4[_0x68e4('0x3e')]=qs[_0x68e4('0x35')](_[_0x68e4('0x54')](_0x252845[_0x68e4('0x37')],_0x41c3d3[_0x68e4('0x35')]));if(_0x252845[_0x68e4('0x37')][_0x68e4('0x3f')]){_0x30d8d4[_0x68e4('0x3e')]=_[_0x68e4('0x40')](_0x30d8d4[_0x68e4('0x3e')],{'$or':_[_0x68e4('0x33')](_0x30d8d4[_0x68e4('0x39')],function(_0x413320){var _0x4d9491={};_0x4d9491[_0x413320]={'$like':'%'+_0x252845[_0x68e4('0x37')][_0x68e4('0x3f')]+'%'};return _0x4d9491;})});}_0x30d8d4=_[_0x68e4('0x40')]({},_0x30d8d4,_0x252845[_0x68e4('0x4c')]);var _0x375fd8={'where':_0x30d8d4[_0x68e4('0x3e')]};return db['VoiceQueueReport'][_0x68e4('0x26')](_0x375fd8)[_0x68e4('0x2b')](function(_0x402883){_0x590efa[_0x68e4('0x26')]=_0x402883;if(_0x252845[_0x68e4('0x37')][_0x68e4('0x44')]){_0x30d8d4['include']=[{'all':!![]}];}return db[_0x68e4('0x43')][_0x68e4('0x46')](_0x30d8d4);})[_0x68e4('0x2b')](function(_0x6789a2){_0x590efa[_0x68e4('0x47')]=_0x6789a2;return _0x590efa;})[_0x68e4('0x2b')](respondWithFilteredResult(_0x12d7dd,_0x30d8d4,_0x68e4('0x52')))[_0x68e4('0x48')](handleError(_0x12d7dd,null,'getVoiceQueuesReport'));};
\ No newline at end of file
+var _0xbd83=['filters','intersection','attributes','fields','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','VoiceQueueReport','findAll','rows','show','rawAttributes','find','catch','create','body','params','describe','getVoiceQueuesReport','nolimit','eml-format','rimraf','fast-json-patch','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/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./voiceQueueReport.socket','sendStatus','status','end','json','undefined','count','offset','limit','Content-Range','apply','reject','save','update','then','destroy','error','name','index','map','type','key','model','query','keys'];(function(_0xac151d,_0x4ea1d2){var _0x111dba=function(_0x13d7f4){while(--_0x13d7f4){_0xac151d['push'](_0xac151d['shift']());}};_0x111dba(++_0x4ea1d2);}(_0xbd83,0x168));var _0x3bd8=function(_0x5a6de2,_0x5c8b10){_0x5a6de2=_0x5a6de2-0x0;var _0x2c0525=_0xbd83[_0x5a6de2];return _0x2c0525;};'use strict';var emlformat=require(_0x3bd8('0x0'));var rimraf=require(_0x3bd8('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x3bd8('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x3bd8('0x3'));var Mustache=require(_0x3bd8('0x4'));var util=require('util');var path=require(_0x3bd8('0x5'));var sox=require(_0x3bd8('0x6'));var csv=require(_0x3bd8('0x7'));var ejs=require(_0x3bd8('0x8'));var fs=require('fs');var fs_extra=require(_0x3bd8('0x9'));var _=require(_0x3bd8('0xa'));var squel=require(_0x3bd8('0xb'));var crypto=require(_0x3bd8('0xc'));var jsforce=require(_0x3bd8('0xd'));var deskjs=require(_0x3bd8('0xe'));var toCsv=require('to-csv');var querystring=require(_0x3bd8('0xf'));var Papa=require('papaparse');var Redis=require(_0x3bd8('0x10'));var authService=require(_0x3bd8('0x11'));var qs=require(_0x3bd8('0x12'));var as=require(_0x3bd8('0x13'));var hardwareService=require(_0x3bd8('0x14'));var logger=require(_0x3bd8('0x15'))(_0x3bd8('0x16'));var utils=require(_0x3bd8('0x17'));var config=require(_0x3bd8('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0x3bd8('0x19'))['db'];config[_0x3bd8('0x1a')]=_[_0x3bd8('0x1b')](config['redis'],{'host':_0x3bd8('0x1c'),'port':0x18eb});var socket=require(_0x3bd8('0x1d'))(new Redis(config['redis']));require(_0x3bd8('0x1e'))['register'](socket);function respondWithStatusCode(_0x3fd37a,_0x402919){_0x402919=_0x402919||0xcc;return function(_0xedb49){if(_0xedb49){return _0x3fd37a[_0x3bd8('0x1f')](_0x402919);}return _0x3fd37a[_0x3bd8('0x20')](_0x402919)[_0x3bd8('0x21')]();};}function respondWithResult(_0x42f25f,_0xeeb014){_0xeeb014=_0xeeb014||0xc8;return function(_0x16b2cd){if(_0x16b2cd){return _0x42f25f['status'](_0xeeb014)[_0x3bd8('0x22')](_0x16b2cd);}};}function respondWithFilteredResult(_0x577333,_0x3e2283){return function(_0x2e6980){if(_0x2e6980){var _0x4b3863=typeof _0x3e2283['offset']==='undefined'&&typeof _0x3e2283['limit']===_0x3bd8('0x23');var _0x343926=_0x2e6980[_0x3bd8('0x24')];var _0x4f5650=_0x4b3863?0x0:_0x3e2283[_0x3bd8('0x25')];var _0x46d682=_0x4b3863?_0x2e6980[_0x3bd8('0x24')]:_0x3e2283[_0x3bd8('0x25')]+_0x3e2283[_0x3bd8('0x26')];var _0x30eacc;if(_0x46d682>=_0x343926){_0x46d682=_0x343926;_0x30eacc=0xc8;}else{_0x30eacc=0xce;}_0x577333[_0x3bd8('0x20')](_0x30eacc);return _0x577333['set'](_0x3bd8('0x27'),_0x4f5650+'-'+_0x46d682+'/'+_0x343926)['json'](_0x2e6980);}return null;};}function patchUpdates(_0x3d4b1a){return function(_0x2ad819){try{jsonpatch[_0x3bd8('0x28')](_0x2ad819,_0x3d4b1a,!![]);}catch(_0x4cae65){return BPromise[_0x3bd8('0x29')](_0x4cae65);}return _0x2ad819[_0x3bd8('0x2a')]();};}function saveUpdates(_0x5da2a4,_0x11e72d){return function(_0x503ca1){if(_0x503ca1){return _0x503ca1[_0x3bd8('0x2b')](_0x5da2a4)[_0x3bd8('0x2c')](function(_0x581b93){return _0x581b93;});}return null;};}function removeEntity(_0x47fa25,_0x363b14){return function(_0x449ac6){if(_0x449ac6){return _0x449ac6[_0x3bd8('0x2d')]()[_0x3bd8('0x2c')](function(){_0x47fa25[_0x3bd8('0x20')](0xcc)[_0x3bd8('0x21')]();});}};}function handleEntityNotFound(_0x5ec3be,_0x2a74cb){return function(_0x5d8dec){if(!_0x5d8dec){_0x5ec3be[_0x3bd8('0x1f')](0x194);}return _0x5d8dec;};}function handleError(_0xd1096f,_0x470bda){_0x470bda=_0x470bda||0x1f4;return function(_0x52275b){logger[_0x3bd8('0x2e')](_0x52275b['stack']);if(_0x52275b[_0x3bd8('0x2f')]){delete _0x52275b['name'];}_0xd1096f['status'](_0x470bda)['send'](_0x52275b);};}exports[_0x3bd8('0x30')]=function(_0x312045,_0x4a6184){var _0x2d78d8={},_0x4ea3ba={},_0x2e78d3={'count':0x0,'rows':[]};var _0x5a6486=_[_0x3bd8('0x31')](db['VoiceQueueReport']['rawAttributes'],function(_0x202cae){return{'name':_0x202cae['fieldName'],'type':_0x202cae[_0x3bd8('0x32')][_0x3bd8('0x33')]};});_0x4ea3ba[_0x3bd8('0x34')]=_['map'](_0x5a6486,'name');_0x4ea3ba[_0x3bd8('0x35')]=_[_0x3bd8('0x36')](_0x312045[_0x3bd8('0x35')]);_0x4ea3ba[_0x3bd8('0x37')]=_[_0x3bd8('0x38')](_0x4ea3ba['model'],_0x4ea3ba['query']);_0x2d78d8[_0x3bd8('0x39')]=_[_0x3bd8('0x38')](_0x4ea3ba[_0x3bd8('0x34')],qs['fields'](_0x312045['query'][_0x3bd8('0x3a')]));_0x2d78d8['attributes']=_0x2d78d8[_0x3bd8('0x39')]['length']?_0x2d78d8['attributes']:_0x4ea3ba[_0x3bd8('0x34')];if(!_0x312045[_0x3bd8('0x35')][_0x3bd8('0x3b')]('nolimit')){_0x2d78d8[_0x3bd8('0x26')]=qs[_0x3bd8('0x26')](_0x312045['query'][_0x3bd8('0x26')]);_0x2d78d8[_0x3bd8('0x25')]=qs[_0x3bd8('0x25')](_0x312045[_0x3bd8('0x35')][_0x3bd8('0x25')]);}_0x2d78d8[_0x3bd8('0x3c')]=qs[_0x3bd8('0x3d')](_0x312045[_0x3bd8('0x35')]['sort']);_0x2d78d8[_0x3bd8('0x3e')]=qs[_0x3bd8('0x37')](_[_0x3bd8('0x3f')](_0x312045[_0x3bd8('0x35')],_0x4ea3ba['filters']),_0x5a6486);if(_0x312045['query'][_0x3bd8('0x40')]){_0x2d78d8['where']=_[_0x3bd8('0x41')](_0x2d78d8['where'],{'$or':_[_0x3bd8('0x31')](_0x5a6486,function(_0x24ef23){if(_0x24ef23[_0x3bd8('0x32')]!==_0x3bd8('0x42')){var _0x2993d8={};_0x2993d8[_0x24ef23['name']]={'$like':'%'+_0x312045[_0x3bd8('0x35')][_0x3bd8('0x40')]+'%'};return _0x2993d8;}})});}_0x2d78d8=_[_0x3bd8('0x41')]({},_0x2d78d8,_0x312045[_0x3bd8('0x43')]);var _0x3465e5={'where':_0x2d78d8[_0x3bd8('0x3e')]};return db['VoiceQueueReport'][_0x3bd8('0x24')](_0x3465e5)[_0x3bd8('0x2c')](function(_0x13acab){_0x2e78d3[_0x3bd8('0x24')]=_0x13acab;if(_0x312045[_0x3bd8('0x35')][_0x3bd8('0x44')]){_0x2d78d8[_0x3bd8('0x45')]=[{'all':!![]}];}return db[_0x3bd8('0x46')][_0x3bd8('0x47')](_0x2d78d8);})[_0x3bd8('0x2c')](function(_0x25c3ff){_0x2e78d3[_0x3bd8('0x48')]=_0x25c3ff;return _0x2e78d3;})[_0x3bd8('0x2c')](respondWithFilteredResult(_0x4a6184,_0x2d78d8))['catch'](handleError(_0x4a6184,null));};exports[_0x3bd8('0x49')]=function(_0x2a4349,_0x51a98e){var _0x4baec1={'raw':![],'where':{'id':_0x2a4349['params']['id']}},_0x45403e={};_0x45403e[_0x3bd8('0x34')]=_[_0x3bd8('0x36')](db[_0x3bd8('0x46')][_0x3bd8('0x4a')]);_0x45403e['query']=_['keys'](_0x2a4349[_0x3bd8('0x35')]);_0x45403e[_0x3bd8('0x37')]=_['intersection'](_0x45403e[_0x3bd8('0x34')],_0x45403e[_0x3bd8('0x35')]);_0x4baec1[_0x3bd8('0x39')]=_[_0x3bd8('0x38')](_0x45403e[_0x3bd8('0x34')],qs[_0x3bd8('0x3a')](_0x2a4349[_0x3bd8('0x35')]['fields']));_0x4baec1[_0x3bd8('0x39')]=_0x4baec1['attributes']['length']?_0x4baec1['attributes']:_0x45403e[_0x3bd8('0x34')];if(_0x2a4349['query'][_0x3bd8('0x44')]){_0x4baec1[_0x3bd8('0x45')]=[{'all':!![]}];}_0x4baec1=_[_0x3bd8('0x41')]({},_0x4baec1,_0x2a4349[_0x3bd8('0x43')]);return db[_0x3bd8('0x46')][_0x3bd8('0x4b')](_0x4baec1)['then'](handleEntityNotFound(_0x51a98e,null))[_0x3bd8('0x2c')](respondWithResult(_0x51a98e,null))[_0x3bd8('0x4c')](handleError(_0x51a98e,null));};exports[_0x3bd8('0x4d')]=function(_0x40bf38,_0x31f8e0){return db['VoiceQueueReport']['create'](_0x40bf38[_0x3bd8('0x4e')],{})['then'](respondWithResult(_0x31f8e0,0xc9))[_0x3bd8('0x4c')](handleError(_0x31f8e0,null));};exports['update']=function(_0x5a3cfc,_0x15b27a){if(_0x5a3cfc['body']['id']){delete _0x5a3cfc['body']['id'];}return db[_0x3bd8('0x46')][_0x3bd8('0x4b')]({'where':{'id':_0x5a3cfc['params']['id']}})[_0x3bd8('0x2c')](handleEntityNotFound(_0x15b27a,null))[_0x3bd8('0x2c')](saveUpdates(_0x5a3cfc[_0x3bd8('0x4e')],null))[_0x3bd8('0x2c')](respondWithResult(_0x15b27a,null))[_0x3bd8('0x4c')](handleError(_0x15b27a,null));};exports['destroy']=function(_0x300bc3,_0x32bd27){return db[_0x3bd8('0x46')][_0x3bd8('0x4b')]({'where':{'id':_0x300bc3[_0x3bd8('0x4f')]['id']}})['then'](handleEntityNotFound(_0x32bd27,null))[_0x3bd8('0x2c')](removeEntity(_0x32bd27,null))[_0x3bd8('0x4c')](handleError(_0x32bd27,null));};exports[_0x3bd8('0x50')]=function(_0x32135a,_0x2bb3a0){return db[_0x3bd8('0x46')][_0x3bd8('0x50')]()['then'](respondWithResult(_0x2bb3a0,null))[_0x3bd8('0x4c')](handleError(_0x2bb3a0,null));};exports[_0x3bd8('0x51')]=function(_0x5f2a44,_0x340287){var _0x4148bb={},_0x198eb2={},_0x46b2f2={'count':0x0,'rows':[]};_0x198eb2['model']=_[_0x3bd8('0x36')](db['VoiceQueueReport'][_0x3bd8('0x4a')]);_0x198eb2[_0x3bd8('0x35')]=_[_0x3bd8('0x36')](_0x5f2a44[_0x3bd8('0x35')]);_0x198eb2[_0x3bd8('0x37')]=_[_0x3bd8('0x38')](_0x198eb2[_0x3bd8('0x34')],_0x198eb2[_0x3bd8('0x35')]);_0x4148bb[_0x3bd8('0x39')]=_[_0x3bd8('0x38')](_0x198eb2[_0x3bd8('0x34')],qs['fields'](_0x5f2a44[_0x3bd8('0x35')][_0x3bd8('0x3a')]));_0x4148bb[_0x3bd8('0x39')]=_0x4148bb[_0x3bd8('0x39')]['length']?_0x4148bb[_0x3bd8('0x39')]:_0x198eb2[_0x3bd8('0x34')];if(!_0x5f2a44[_0x3bd8('0x35')][_0x3bd8('0x3b')](_0x3bd8('0x52'))){_0x4148bb[_0x3bd8('0x26')]=qs[_0x3bd8('0x26')](_0x5f2a44[_0x3bd8('0x35')]['limit']);_0x4148bb['offset']=qs[_0x3bd8('0x25')](_0x5f2a44[_0x3bd8('0x35')][_0x3bd8('0x25')]);}_0x4148bb[_0x3bd8('0x3c')]=qs[_0x3bd8('0x3d')](_0x5f2a44['query'][_0x3bd8('0x3d')]);_0x4148bb[_0x3bd8('0x3e')]=qs[_0x3bd8('0x37')](_[_0x3bd8('0x3f')](_0x5f2a44[_0x3bd8('0x35')],_0x198eb2['filters']));if(_0x5f2a44[_0x3bd8('0x35')][_0x3bd8('0x40')]){_0x4148bb[_0x3bd8('0x3e')]=_[_0x3bd8('0x41')](_0x4148bb['where'],{'$or':_[_0x3bd8('0x31')](_0x4148bb['attributes'],function(_0x2695e7){var _0x238972={};_0x238972[_0x2695e7]={'$like':'%'+_0x5f2a44['query'][_0x3bd8('0x40')]+'%'};return _0x238972;})});}_0x4148bb=_[_0x3bd8('0x41')]({},_0x4148bb,_0x5f2a44['options']);var _0x4d8db3={'where':_0x4148bb[_0x3bd8('0x3e')]};return db[_0x3bd8('0x46')][_0x3bd8('0x24')](_0x4d8db3)[_0x3bd8('0x2c')](function(_0x2cd10c){_0x46b2f2['count']=_0x2cd10c;if(_0x5f2a44['query'][_0x3bd8('0x44')]){_0x4148bb['include']=[{'all':!![]}];}return db[_0x3bd8('0x46')][_0x3bd8('0x47')](_0x4148bb);})[_0x3bd8('0x2c')](function(_0x221b3e){_0x46b2f2[_0x3bd8('0x48')]=_0x221b3e;return _0x46b2f2;})[_0x3bd8('0x2c')](respondWithFilteredResult(_0x340287,_0x4148bb,_0x3bd8('0x51')))['catch'](handleError(_0x340287,null,_0x3bd8('0x51')));};
\ No newline at end of file
index 852035b..b5db9cf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x863e=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','VoiceQueueReport','setMaxListeners','save'];(function(_0x1d9ee8,_0x4bf847){var _0x430830=function(_0x3ff15a){while(--_0x3ff15a){_0x1d9ee8['push'](_0x1d9ee8['shift']());}};_0x430830(++_0x4bf847);}(_0x863e,0x12d));var _0xe863=function(_0x6b1c0b,_0x311005){_0x6b1c0b=_0x6b1c0b-0x0;var _0x591064=_0x863e[_0x6b1c0b];return _0x591064;};'use strict';var EventEmitter=require(_0xe863('0x0'));var VoiceQueueReport=require(_0xe863('0x1'))['db'][_0xe863('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0xe863('0x3')](0x0);var events={'afterCreate':_0xe863('0x4'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x343584){return function(_0x34a59f,_0x3e8f72,_0x22a226){VoiceQueueReportEvents[_0xe863('0x5')](_0x343584+':'+_0x34a59f['id'],_0x34a59f);VoiceQueueReportEvents['emit'](_0x343584,_0x34a59f);_0x22a226(null);};}for(var e in events){if(events[_0xe863('0x6')](e)){var event=events[e];VoiceQueueReport[_0xe863('0x7')](e,emitEvent(event));}}module[_0xe863('0x8')]=VoiceQueueReportEvents;
\ No newline at end of file
+var _0x3e09=['events','../../mysqldb','VoiceQueueReport','setMaxListeners','remove','emit','hasOwnProperty','exports'];(function(_0x54e298,_0x519e23){var _0x4fff82=function(_0x453441){while(--_0x453441){_0x54e298['push'](_0x54e298['shift']());}};_0x4fff82(++_0x519e23);}(_0x3e09,0x70));var _0x93e0=function(_0x540160,_0x24c6b6){_0x540160=_0x540160-0x0;var _0x476120=_0x3e09[_0x540160];return _0x476120;};'use strict';var EventEmitter=require(_0x93e0('0x0'));var VoiceQueueReport=require(_0x93e0('0x1'))['db'][_0x93e0('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x93e0('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x93e0('0x4')};function emitEvent(_0x161b1b){return function(_0x55adfc,_0x4d058a,_0x4fe7b2){VoiceQueueReportEvents[_0x93e0('0x5')](_0x161b1b+':'+_0x55adfc['id'],_0x55adfc);VoiceQueueReportEvents[_0x93e0('0x5')](_0x161b1b,_0x55adfc);_0x4fe7b2(null);};}for(var e in events){if(events[_0x93e0('0x6')](e)){var event=events[e];VoiceQueueReport['hook'](e,emitEvent(event));}}module[_0x93e0('0x7')]=VoiceQueueReportEvents;
\ No newline at end of file
index dbb0f08..3bfe095 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x54bb=['define','VoiceQueueReport','report_queue','calleridnum','lodash','util','../../config/logger','api','moment','bluebird','request-promise','exports'];(function(_0x502a7f,_0x1ae080){var _0x144aff=function(_0x9c075d){while(--_0x9c075d){_0x502a7f['push'](_0x502a7f['shift']());}};_0x144aff(++_0x1ae080);}(_0x54bb,0xa0));var _0xb54b=function(_0x5293a1,_0x351c64){_0x5293a1=_0x5293a1-0x0;var _0x5085aa=_0x54bb[_0x5293a1];return _0x5085aa;};'use strict';var _=require(_0xb54b('0x0'));var util=require(_0xb54b('0x1'));var logger=require(_0xb54b('0x2'))(_0xb54b('0x3'));var moment=require(_0xb54b('0x4'));var BPromise=require(_0xb54b('0x5'));var rp=require(_0xb54b('0x6'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./voiceQueueReport.attributes');module[_0xb54b('0x7')]=function(_0x19696e,_0x4cf8fc){return _0x19696e[_0xb54b('0x8')](_0xb54b('0x9'),attributes,{'tableName':_0xb54b('0xa'),'paranoid':![],'indexes':[{'fields':['uniqueid']},{'fields':[_0xb54b('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x089e=['calleridnum','lodash','../../config/logger','moment','bluebird','path','rimraf','../../config/environment','./voiceQueueReport.attributes','exports','define','VoiceQueueReport','report_queue','uniqueid'];(function(_0x6970d1,_0x871130){var _0x1f14ef=function(_0x4a7862){while(--_0x4a7862){_0x6970d1['push'](_0x6970d1['shift']());}};_0x1f14ef(++_0x871130);}(_0x089e,0x10b));var _0xe089=function(_0x4a0873,_0x3057c8){_0x4a0873=_0x4a0873-0x0;var _0x4b623a=_0x089e[_0x4a0873];return _0x4b623a;};'use strict';var _=require(_0xe089('0x0'));var util=require('util');var logger=require(_0xe089('0x1'))('api');var moment=require(_0xe089('0x2'));var BPromise=require(_0xe089('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xe089('0x4'));var rimraf=require(_0xe089('0x5'));var config=require(_0xe089('0x6'));var attributes=require(_0xe089('0x7'));module[_0xe089('0x8')]=function(_0x2b3b15,_0x385aa7){return _0x2b3b15[_0xe089('0x9')](_0xe089('0xa'),attributes,{'tableName':_0xe089('0xb'),'paranoid':![],'indexes':[{'fields':[_0xe089('0xc')]},{'fields':[_0xe089('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
index 26eea8c..27f11dc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x68fe=['findAll','options','where','attributes','limit','include','map','model','then','info','GetVoiceQueueReport','debug','catch','CreateVoiceQueueReport','body','raw','UpdateVoiceQueueReport','update','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','client','redis','defaults','localhost','socket.io-emitter','./voiceQueueReport.socket','register','VoiceQueueReport,\x20%s,\x20%s','request\x20sent','VoiceQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','VoiceQueueReport'];(function(_0x4f8a4f,_0x2724f8){var _0x11446e=function(_0x2140ec){while(--_0x2140ec){_0x4f8a4f['push'](_0x4f8a4f['shift']());}};_0x11446e(++_0x2724f8);}(_0x68fe,0x16a));var _0xe68f=function(_0x34236b,_0x1027af){_0x34236b=_0x34236b-0x0;var _0x1f8de9=_0x68fe[_0x34236b];return _0x1f8de9;};'use strict';var _=require(_0xe68f('0x0'));var util=require(_0xe68f('0x1'));var moment=require(_0xe68f('0x2'));var BPromise=require(_0xe68f('0x3'));var rs=require(_0xe68f('0x4'));var fs=require('fs');var Redis=require(_0xe68f('0x5'));var db=require(_0xe68f('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xe68f('0x7'))('rpc');var config=require(_0xe68f('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xe68f('0x9')]['http']({'port':0x232a});config[_0xe68f('0xa')]=_[_0xe68f('0xb')](config[_0xe68f('0xa')],{'host':_0xe68f('0xc'),'port':0x18eb});var socket=require(_0xe68f('0xd'))(new Redis(config['redis']));require(_0xe68f('0xe'))[_0xe68f('0xf')](socket);function respondWithRpcPromise(_0x4de35f,_0x45ddc0,_0x196b5d){return new BPromise(function(_0x5ee51c,_0x115df4){return client['request'](_0x4de35f,_0x196b5d)['then'](function(_0x5d42b7){logger['info'](_0xe68f('0x10'),_0x45ddc0,_0xe68f('0x11'));logger['debug'](_0xe68f('0x12'),_0x45ddc0,'request\x20sent',JSON[_0xe68f('0x13')](_0x5d42b7));if(_0x5d42b7['error']){if(_0x5d42b7[_0xe68f('0x14')][_0xe68f('0x15')]===0x1f4){logger['error'](_0xe68f('0x10'),_0x45ddc0,_0x5d42b7['error'][_0xe68f('0x16')]);return _0x115df4(_0x5d42b7[_0xe68f('0x14')]['message']);}logger[_0xe68f('0x14')](_0xe68f('0x10'),_0x45ddc0,_0x5d42b7['error'][_0xe68f('0x16')]);return _0x5ee51c(_0x5d42b7['error'][_0xe68f('0x16')]);}else{logger['info']('VoiceQueueReport,\x20%s,\x20%s',_0x45ddc0,'request\x20sent');_0x5ee51c(_0x5d42b7[_0xe68f('0x17')][_0xe68f('0x16')]);}})['catch'](function(_0x2d5864){logger[_0xe68f('0x14')]('VoiceQueueReport,\x20%s,\x20%s',_0x45ddc0,_0x2d5864);_0x115df4(_0x2d5864);});});}exports['GetVoiceQueueReport']=function(_0x4ea0b0){var _0x113594=this;return new Promise(function(_0x2ecd25,_0x5ea34e){return db[_0xe68f('0x18')][_0xe68f('0x19')]({'raw':_0x4ea0b0['options']?_0x4ea0b0[_0xe68f('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x4ea0b0[_0xe68f('0x1a')]?_0x4ea0b0[_0xe68f('0x1a')][_0xe68f('0x1b')]||null:null,'attributes':_0x4ea0b0['options']?_0x4ea0b0['options'][_0xe68f('0x1c')]||null:null,'limit':_0x4ea0b0[_0xe68f('0x1a')]?_0x4ea0b0[_0xe68f('0x1a')][_0xe68f('0x1d')]||null:null,'include':_0x4ea0b0[_0xe68f('0x1a')]?_0x4ea0b0[_0xe68f('0x1a')][_0xe68f('0x1e')]?_[_0xe68f('0x1f')](_0x4ea0b0[_0xe68f('0x1a')][_0xe68f('0x1e')],function(_0x232da0){return{'model':db[_0x232da0[_0xe68f('0x20')]],'as':_0x232da0['as'],'attributes':_0x232da0[_0xe68f('0x1c')],'include':_0x232da0[_0xe68f('0x1e')]?_[_0xe68f('0x1f')](_0x232da0[_0xe68f('0x1e')],function(_0x332d58){return{'model':db[_0x332d58[_0xe68f('0x20')]],'as':_0x332d58['as'],'attributes':_0x332d58['attributes'],'include':_0x332d58[_0xe68f('0x1e')]?_['map'](_0x332d58[_0xe68f('0x1e')],function(_0x37a46c){return{'model':db[_0x37a46c[_0xe68f('0x20')]],'as':_0x37a46c['as'],'attributes':_0x37a46c[_0xe68f('0x1c')]};}):[]};}):[]};}):[]:[]})[_0xe68f('0x21')](function(_0x1387bf){logger[_0xe68f('0x22')](_0xe68f('0x23'),_0x4ea0b0);logger[_0xe68f('0x24')](_0xe68f('0x23'),_0x4ea0b0,JSON[_0xe68f('0x13')](_0x1387bf));_0x2ecd25(_0x1387bf);})[_0xe68f('0x25')](function(_0x1517a3){logger[_0xe68f('0x14')](_0xe68f('0x23'),_0x1517a3[_0xe68f('0x16')],_0x4ea0b0);_0x5ea34e(_0x113594['error'](0x1f4,_0x1517a3[_0xe68f('0x16')]));});});};exports[_0xe68f('0x26')]=function(_0x3df16d){var _0x42326f=this;return new Promise(function(_0x226abd,_0x2633fc){return db[_0xe68f('0x18')]['create'](_0x3df16d[_0xe68f('0x27')],{'raw':_0x3df16d[_0xe68f('0x1a')]?_0x3df16d['options'][_0xe68f('0x28')]===undefined?!![]:![]:!![]})[_0xe68f('0x21')](function(_0x455c33){logger[_0xe68f('0x22')](_0xe68f('0x26'),_0x3df16d);logger[_0xe68f('0x24')]('CreateVoiceQueueReport',_0x3df16d,JSON['stringify'](_0x455c33));_0x226abd(_0x455c33);})[_0xe68f('0x25')](function(_0x4d2a91){logger[_0xe68f('0x14')](_0xe68f('0x26'),_0x4d2a91[_0xe68f('0x16')],_0x3df16d);_0x2633fc(_0x42326f[_0xe68f('0x14')](0x1f4,_0x4d2a91[_0xe68f('0x16')]));});});};exports[_0xe68f('0x29')]=function(_0x42324e){var _0x513599=this;return new Promise(function(_0x3c1616,_0x24154c){return db[_0xe68f('0x18')][_0xe68f('0x2a')](_0x42324e['body'],{'raw':_0x42324e['options']?_0x42324e[_0xe68f('0x1a')][_0xe68f('0x28')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x42324e['options']?_0x42324e[_0xe68f('0x1a')][_0xe68f('0x1b')]||null:null,'attributes':_0x42324e['options']?_0x42324e[_0xe68f('0x1a')]['attributes']||null:null,'limit':_0x42324e[_0xe68f('0x1a')]?_0x42324e['options'][_0xe68f('0x1d')]||null:null})[_0xe68f('0x21')](function(_0x25fb24){logger['info'](_0xe68f('0x29'),_0x42324e);logger['debug']('UpdateVoiceQueueReport',_0x42324e,JSON[_0xe68f('0x13')](_0x25fb24));_0x3c1616(_0x25fb24);})[_0xe68f('0x25')](function(_0x4ab44c){logger[_0xe68f('0x14')](_0xe68f('0x29'),_0x4ab44c['message'],_0x42324e);_0x24154c(_0x513599[_0xe68f('0x14')](0x1f4,_0x4ab44c['message']));});});};
\ No newline at end of file
+var _0x66f8=['bluebird','ioredis','rpc','jayson/promise','client','http','redis','./voiceQueueReport.socket','then','info','VoiceQueueReport,\x20%s,\x20%s','request\x20sent','debug','VoiceQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','GetVoiceQueueReport','options','attributes','limit','include','map','model','CreateVoiceQueueReport','VoiceQueueReport','create','body','raw','UpdateVoiceQueueReport','update','where','lodash','util','moment'];(function(_0x4cd0de,_0x1a5174){var _0x38c6bd=function(_0x1c66ef){while(--_0x1c66ef){_0x4cd0de['push'](_0x4cd0de['shift']());}};_0x38c6bd(++_0x1a5174);}(_0x66f8,0xd5));var _0x866f=function(_0x4e4ac3,_0x39c201){_0x4e4ac3=_0x4e4ac3-0x0;var _0xddbf5b=_0x66f8[_0x4e4ac3];return _0xddbf5b;};'use strict';var _=require(_0x866f('0x0'));var util=require(_0x866f('0x1'));var moment=require(_0x866f('0x2'));var BPromise=require(_0x866f('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x866f('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x866f('0x5'));var config=require('../../config/environment');var jayson=require(_0x866f('0x6'));var client=jayson[_0x866f('0x7')][_0x866f('0x8')]({'port':0x232a});config['redis']=_['defaults'](config[_0x866f('0x9')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x866f('0xa'))['register'](socket);function respondWithRpcPromise(_0x531bca,_0x4ef168,_0x31397c){return new BPromise(function(_0x90790d,_0x34448d){return client['request'](_0x531bca,_0x31397c)[_0x866f('0xb')](function(_0xff2965){logger[_0x866f('0xc')](_0x866f('0xd'),_0x4ef168,_0x866f('0xe'));logger[_0x866f('0xf')](_0x866f('0x10'),_0x4ef168,'request\x20sent',JSON[_0x866f('0x11')](_0xff2965));if(_0xff2965[_0x866f('0x12')]){if(_0xff2965[_0x866f('0x12')]['code']===0x1f4){logger[_0x866f('0x12')]('VoiceQueueReport,\x20%s,\x20%s',_0x4ef168,_0xff2965['error'][_0x866f('0x13')]);return _0x34448d(_0xff2965[_0x866f('0x12')][_0x866f('0x13')]);}logger[_0x866f('0x12')]('VoiceQueueReport,\x20%s,\x20%s',_0x4ef168,_0xff2965['error'][_0x866f('0x13')]);return _0x90790d(_0xff2965[_0x866f('0x12')][_0x866f('0x13')]);}else{logger[_0x866f('0xc')](_0x866f('0xd'),_0x4ef168,_0x866f('0xe'));_0x90790d(_0xff2965['result'][_0x866f('0x13')]);}})[_0x866f('0x14')](function(_0x217f92){logger['error'](_0x866f('0xd'),_0x4ef168,_0x217f92);_0x34448d(_0x217f92);});});}exports[_0x866f('0x15')]=function(_0x2cda13){var _0x28caff=this;return new Promise(function(_0x1cc611,_0xcf089d){return db['VoiceQueueReport']['findAll']({'raw':_0x2cda13[_0x866f('0x16')]?_0x2cda13[_0x866f('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x2cda13[_0x866f('0x16')]?_0x2cda13[_0x866f('0x16')]['where']||null:null,'attributes':_0x2cda13[_0x866f('0x16')]?_0x2cda13['options'][_0x866f('0x17')]||null:null,'limit':_0x2cda13['options']?_0x2cda13[_0x866f('0x16')][_0x866f('0x18')]||null:null,'include':_0x2cda13[_0x866f('0x16')]?_0x2cda13['options'][_0x866f('0x19')]?_[_0x866f('0x1a')](_0x2cda13[_0x866f('0x16')]['include'],function(_0x5bd78d){return{'model':db[_0x5bd78d[_0x866f('0x1b')]],'as':_0x5bd78d['as'],'attributes':_0x5bd78d[_0x866f('0x17')],'include':_0x5bd78d[_0x866f('0x19')]?_[_0x866f('0x1a')](_0x5bd78d[_0x866f('0x19')],function(_0x34fb89){return{'model':db[_0x34fb89[_0x866f('0x1b')]],'as':_0x34fb89['as'],'attributes':_0x34fb89[_0x866f('0x17')],'include':_0x34fb89[_0x866f('0x19')]?_['map'](_0x34fb89[_0x866f('0x19')],function(_0x44b698){return{'model':db[_0x44b698[_0x866f('0x1b')]],'as':_0x44b698['as'],'attributes':_0x44b698[_0x866f('0x17')]};}):[]};}):[]};}):[]:[]})[_0x866f('0xb')](function(_0x2766d0){logger['info']('GetVoiceQueueReport',_0x2cda13);logger[_0x866f('0xf')](_0x866f('0x15'),_0x2cda13,JSON[_0x866f('0x11')](_0x2766d0));_0x1cc611(_0x2766d0);})[_0x866f('0x14')](function(_0x15a218){logger['error'](_0x866f('0x15'),_0x15a218[_0x866f('0x13')],_0x2cda13);_0xcf089d(_0x28caff[_0x866f('0x12')](0x1f4,_0x15a218[_0x866f('0x13')]));});});};exports[_0x866f('0x1c')]=function(_0x50102c){var _0x2e20af=this;return new Promise(function(_0x2a53fc,_0x5bf473){return db[_0x866f('0x1d')][_0x866f('0x1e')](_0x50102c[_0x866f('0x1f')],{'raw':_0x50102c['options']?_0x50102c[_0x866f('0x16')][_0x866f('0x20')]===undefined?!![]:![]:!![]})[_0x866f('0xb')](function(_0x5d9712){logger[_0x866f('0xc')]('CreateVoiceQueueReport',_0x50102c);logger[_0x866f('0xf')](_0x866f('0x1c'),_0x50102c,JSON['stringify'](_0x5d9712));_0x2a53fc(_0x5d9712);})[_0x866f('0x14')](function(_0x1aef2b){logger['error'](_0x866f('0x1c'),_0x1aef2b[_0x866f('0x13')],_0x50102c);_0x5bf473(_0x2e20af[_0x866f('0x12')](0x1f4,_0x1aef2b['message']));});});};exports[_0x866f('0x21')]=function(_0x25ee93){var _0x3abd79=this;return new Promise(function(_0x12d4b5,_0x2ec4d0){return db[_0x866f('0x1d')][_0x866f('0x22')](_0x25ee93[_0x866f('0x1f')],{'raw':_0x25ee93['options']?_0x25ee93[_0x866f('0x16')][_0x866f('0x20')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x25ee93[_0x866f('0x16')]?_0x25ee93[_0x866f('0x16')][_0x866f('0x23')]||null:null,'attributes':_0x25ee93['options']?_0x25ee93[_0x866f('0x16')]['attributes']||null:null,'limit':_0x25ee93[_0x866f('0x16')]?_0x25ee93[_0x866f('0x16')][_0x866f('0x18')]||null:null})[_0x866f('0xb')](function(_0x4aa68d){logger[_0x866f('0xc')](_0x866f('0x21'),_0x25ee93);logger['debug']('UpdateVoiceQueueReport',_0x25ee93,JSON[_0x866f('0x11')](_0x4aa68d));_0x12d4b5(_0x4aa68d);})['catch'](function(_0x494574){logger[_0x866f('0x12')](_0x866f('0x21'),_0x494574[_0x866f('0x13')],_0x25ee93);_0x2ec4d0(_0x3abd79[_0x866f('0x12')](0x1f4,_0x494574[_0x866f('0x13')]));});});};
\ No newline at end of file
index 8d5b827..98680bb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x83f7=['save','remove','emit','removeListener','register','voiceQueueReport:','./voiceQueueReport.events'];(function(_0x3833d0,_0x3dc86d){var _0x28f997=function(_0x1db3b6){while(--_0x1db3b6){_0x3833d0['push'](_0x3833d0['shift']());}};_0x28f997(++_0x3dc86d);}(_0x83f7,0x84));var _0x783f=function(_0x5ef86e,_0x169d33){_0x5ef86e=_0x5ef86e-0x0;var _0x252ea7=_0x83f7[_0x5ef86e];return _0x252ea7;};'use strict';var VoiceQueueReportEvents=require(_0x783f('0x0'));var events=[_0x783f('0x1'),_0x783f('0x2'),'update'];function createListener(_0x1e0c61,_0x52cbc8){return function(_0x598176){_0x52cbc8[_0x783f('0x3')](_0x1e0c61,_0x598176);};}function removeListener(_0x256e54,_0x5a28fa){return function(){VoiceQueueReportEvents[_0x783f('0x4')](_0x256e54,_0x5a28fa);};}exports[_0x783f('0x5')]=function(_0x47606e){for(var _0x2841e4=0x0,_0x25ab5f=events['length'];_0x2841e4<_0x25ab5f;_0x2841e4++){var _0x197e0b=events[_0x2841e4];var _0x2fd0ec=createListener(_0x783f('0x6')+_0x197e0b,_0x47606e);VoiceQueueReportEvents['on'](_0x197e0b,_0x2fd0ec);}};
\ No newline at end of file
+var _0xab33=['remove','emit','voiceQueueReport:','save'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xab33,0x1a3));var _0x3ab3=function(_0xa23ff1,_0x31b069){_0xa23ff1=_0xa23ff1-0x0;var _0x36eefa=_0xab33[_0xa23ff1];return _0x36eefa;};'use strict';var VoiceQueueReportEvents=require('./voiceQueueReport.events');var events=[_0x3ab3('0x0'),_0x3ab3('0x1'),'update'];function createListener(_0x18a618,_0x4d8430){return function(_0x481512){_0x4d8430[_0x3ab3('0x2')](_0x18a618,_0x481512);};}function removeListener(_0x2843e1,_0x310872){return function(){VoiceQueueReportEvents['removeListener'](_0x2843e1,_0x310872);};}exports['register']=function(_0x1495c2){for(var _0x543906=0x0,_0x4451ba=events['length'];_0x543906<_0x4451ba;_0x543906++){var _0x4f760a=events[_0x543906];var _0x277d51=createListener(_0x3ab3('0x3')+_0x4f760a,_0x1495c2);VoiceQueueReportEvents['on'](_0x4f760a,_0x277d51);}};
\ No newline at end of file
index b1dff06..6ef6bfc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5eff=['show','put','update','delete','destroy','exports','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','/:id'];(function(_0x4ae6ef,_0xc2af80){var _0x3cbb4e=function(_0x569ad5){while(--_0x569ad5){_0x4ae6ef['push'](_0x4ae6ef['shift']());}};_0x3cbb4e(++_0xc2af80);}(_0x5eff,0x76));var _0xf5ef=function(_0x1b2ff7,_0x12a034){_0x1b2ff7=_0x1b2ff7-0x0;var _0x31656a=_0x5eff[_0x1b2ff7];return _0x31656a;};'use strict';var multer=require(_0xf5ef('0x0'));var util=require(_0xf5ef('0x1'));var path=require(_0xf5ef('0x2'));var timeout=require('connect-timeout');var express=require(_0xf5ef('0x3'));var router=express[_0xf5ef('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xf5ef('0x5'));var interaction=require(_0xf5ef('0x6'));var config=require('../../config/environment');var controller=require('./voiceQueuesLog.controller');router[_0xf5ef('0x7')]('/',auth[_0xf5ef('0x8')](),controller['index']);router[_0xf5ef('0x7')](_0xf5ef('0x9'),auth['isAuthenticated'](),controller[_0xf5ef('0xa')]);router['post']('/',auth[_0xf5ef('0x8')](),controller['create']);router[_0xf5ef('0xb')](_0xf5ef('0x9'),auth[_0xf5ef('0x8')](),controller[_0xf5ef('0xc')]);router[_0xf5ef('0xd')](_0xf5ef('0x9'),auth[_0xf5ef('0x8')](),controller[_0xf5ef('0xe')]);module[_0xf5ef('0xf')]=router;
\ No newline at end of file
+var _0xf759=['exports','multer','util','path','connect-timeout','../../components/interaction/service','../../config/environment','./voiceQueuesLog.controller','isAuthenticated','index','get','/:id','show','post','create','put'];(function(_0x241710,_0x232aba){var _0x14710d=function(_0x4ef889){while(--_0x4ef889){_0x241710['push'](_0x241710['shift']());}};_0x14710d(++_0x232aba);}(_0xf759,0x1e1));var _0x9f75=function(_0x2c0c24,_0x587e07){_0x2c0c24=_0x2c0c24-0x0;var _0x1bd5d3=_0xf759[_0x2c0c24];return _0x1bd5d3;};'use strict';var multer=require(_0x9f75('0x0'));var util=require(_0x9f75('0x1'));var path=require(_0x9f75('0x2'));var timeout=require(_0x9f75('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x9f75('0x4'));var config=require(_0x9f75('0x5'));var controller=require(_0x9f75('0x6'));router['get']('/',auth[_0x9f75('0x7')](),controller[_0x9f75('0x8')]);router[_0x9f75('0x9')](_0x9f75('0xa'),auth[_0x9f75('0x7')](),controller[_0x9f75('0xb')]);router[_0x9f75('0xc')]('/',auth['isAuthenticated'](),controller[_0x9f75('0xd')]);router[_0x9f75('0xe')](_0x9f75('0xa'),auth[_0x9f75('0x7')](),controller['update']);router['delete'](_0x9f75('0xa'),auth[_0x9f75('0x7')](),controller['destroy']);module[_0x9f75('0xf')]=router;
\ No newline at end of file
index 170a09e..12c8659 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbe40=['STRING','DATE','literal','CURRENT_TIMESTAMP\x20ON\x20UPDATE\x20CURRENT_TIMESTAMP','sequelize','moment','exports'];(function(_0x138975,_0x319d77){var _0x2ff39a=function(_0x2a1a21){while(--_0x2a1a21){_0x138975['push'](_0x138975['shift']());}};_0x2ff39a(++_0x319d77);}(_0xbe40,0x12a));var _0x0be4=function(_0x2764eb,_0x5aa354){_0x2764eb=_0x2764eb-0x0;var _0x4d4103=_0xbe40[_0x2764eb];return _0x4d4103;};'use strict';var Sequelize=require(_0x0be4('0x0'));var moment=require(_0x0be4('0x1'));module[_0x0be4('0x2')]={'time':{'type':Sequelize[_0x0be4('0x3')]},'callid':{'type':Sequelize[_0x0be4('0x3')],'allowNull':![],'defaultValue':''},'queuename':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'agent':{'type':Sequelize[_0x0be4('0x3')],'allowNull':![],'defaultValue':''},'event':{'type':Sequelize[_0x0be4('0x3')],'allowNull':![],'defaultValue':''},'data':{'type':Sequelize[_0x0be4('0x3')],'allowNull':![],'defaultValue':''},'data1':{'type':Sequelize[_0x0be4('0x3')],'allowNull':![],'defaultValue':''},'data2':{'type':Sequelize[_0x0be4('0x3')],'allowNull':![],'defaultValue':''},'data3':{'type':Sequelize[_0x0be4('0x3')],'allowNull':![],'defaultValue':''},'data4':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'data5':{'type':Sequelize[_0x0be4('0x3')],'allowNull':![],'defaultValue':''},'dtm':{'type':Sequelize[_0x0be4('0x4')],'allowNull':![],'defaultValue':Sequelize[_0x0be4('0x5')](_0x0be4('0x6'))}};
\ No newline at end of file
+var _0xe216=['STRING','DATE','literal','moment'];(function(_0x4286ad,_0x5a99ed){var _0x4382d3=function(_0xdc43a8){while(--_0xdc43a8){_0x4286ad['push'](_0x4286ad['shift']());}};_0x4382d3(++_0x5a99ed);}(_0xe216,0x7f));var _0x6e21=function(_0x2afbb0,_0x44f16d){_0x2afbb0=_0x2afbb0-0x0;var _0x411ff2=_0xe216[_0x2afbb0];return _0x411ff2;};'use strict';var Sequelize=require('sequelize');var moment=require(_0x6e21('0x0'));module['exports']={'time':{'type':Sequelize[_0x6e21('0x1')]},'callid':{'type':Sequelize[_0x6e21('0x1')],'allowNull':![],'defaultValue':''},'queuename':{'type':Sequelize[_0x6e21('0x1')],'allowNull':![],'defaultValue':''},'agent':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'event':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'data':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'data1':{'type':Sequelize[_0x6e21('0x1')],'allowNull':![],'defaultValue':''},'data2':{'type':Sequelize[_0x6e21('0x1')],'allowNull':![],'defaultValue':''},'data3':{'type':Sequelize[_0x6e21('0x1')],'allowNull':![],'defaultValue':''},'data4':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'data5':{'type':Sequelize[_0x6e21('0x1')],'allowNull':![],'defaultValue':''},'dtm':{'type':Sequelize[_0x6e21('0x2')],'allowNull':![],'defaultValue':Sequelize[_0x6e21('0x3')]('CURRENT_TIMESTAMP\x20ON\x20UPDATE\x20CURRENT_TIMESTAMP')}};
\ No newline at end of file
index f28879f..a1f1776 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf24c=['json','offset','undefined','count','set','Content-Range','apply','save','update','then','end','stack','name','send','index','rawAttributes','fieldName','type','key','model','map','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','VIRTUAL','options','VoiceQueuesLog','includeAll','include','rows','catch','show','params','create','body','destroy','find','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','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','../../mysqldb','status'];(function(_0x420307,_0x52b133){var _0x66f53c=function(_0x5f3c89){while(--_0x5f3c89){_0x420307['push'](_0x420307['shift']());}};_0x66f53c(++_0x52b133);}(_0xf24c,0xd0));var _0xcf24=function(_0x534cba,_0x1f6a7f){_0x534cba=_0x534cba-0x0;var _0x2d98b4=_0xf24c[_0x534cba];return _0x2d98b4;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xcf24('0x0'));var zipdir=require(_0xcf24('0x1'));var jsonpatch=require(_0xcf24('0x2'));var rp=require(_0xcf24('0x3'));var moment=require(_0xcf24('0x4'));var BPromise=require(_0xcf24('0x5'));var Mustache=require(_0xcf24('0x6'));var util=require('util');var path=require(_0xcf24('0x7'));var sox=require(_0xcf24('0x8'));var csv=require('to-csv');var ejs=require(_0xcf24('0x9'));var fs=require('fs');var fs_extra=require(_0xcf24('0xa'));var _=require(_0xcf24('0xb'));var squel=require(_0xcf24('0xc'));var crypto=require(_0xcf24('0xd'));var jsforce=require(_0xcf24('0xe'));var deskjs=require(_0xcf24('0xf'));var toCsv=require(_0xcf24('0x10'));var querystring=require(_0xcf24('0x11'));var Papa=require('papaparse');var Redis=require(_0xcf24('0x12'));var authService=require(_0xcf24('0x13'));var qs=require(_0xcf24('0x14'));var as=require(_0xcf24('0x15'));var hardwareService=require(_0xcf24('0x16'));var logger=require(_0xcf24('0x17'))(_0xcf24('0x18'));var utils=require(_0xcf24('0x19'));var config=require(_0xcf24('0x1a'));var licenseUtil=require('../../config/license/util');var db=require(_0xcf24('0x1b'))['db'];function respondWithStatusCode(_0x47c2bf,_0x129eae){_0x129eae=_0x129eae||0xcc;return function(_0x1632ad){if(_0x1632ad){return _0x47c2bf['sendStatus'](_0x129eae);}return _0x47c2bf[_0xcf24('0x1c')](_0x129eae)['end']();};}function respondWithResult(_0x8fecde,_0x298068){_0x298068=_0x298068||0xc8;return function(_0x1ae3e7){if(_0x1ae3e7){return _0x8fecde[_0xcf24('0x1c')](_0x298068)[_0xcf24('0x1d')](_0x1ae3e7);}};}function respondWithFilteredResult(_0x2685d9,_0x114a41){return function(_0xe21e47){if(_0xe21e47){var _0x5aa6ac=typeof _0x114a41[_0xcf24('0x1e')]===_0xcf24('0x1f')&&typeof _0x114a41['limit']===_0xcf24('0x1f');var _0x5bf560=_0xe21e47[_0xcf24('0x20')];var _0x1494e3=_0x5aa6ac?0x0:_0x114a41[_0xcf24('0x1e')];var _0x3862c6=_0x5aa6ac?_0xe21e47['count']:_0x114a41[_0xcf24('0x1e')]+_0x114a41['limit'];var _0x41d27e;if(_0x3862c6>=_0x5bf560){_0x3862c6=_0x5bf560;_0x41d27e=0xc8;}else{_0x41d27e=0xce;}_0x2685d9['status'](_0x41d27e);return _0x2685d9[_0xcf24('0x21')](_0xcf24('0x22'),_0x1494e3+'-'+_0x3862c6+'/'+_0x5bf560)[_0xcf24('0x1d')](_0xe21e47);}return null;};}function patchUpdates(_0x576a00){return function(_0x1ee552){try{jsonpatch[_0xcf24('0x23')](_0x1ee552,_0x576a00,!![]);}catch(_0x47b126){return BPromise['reject'](_0x47b126);}return _0x1ee552[_0xcf24('0x24')]();};}function saveUpdates(_0x3a59f8,_0x931683){return function(_0x2b99cd){if(_0x2b99cd){return _0x2b99cd[_0xcf24('0x25')](_0x3a59f8)[_0xcf24('0x26')](function(_0x430416){return _0x430416;});}return null;};}function removeEntity(_0x4c81aa,_0x2efc42){return function(_0x3e3953){if(_0x3e3953){return _0x3e3953['destroy']()[_0xcf24('0x26')](function(){_0x4c81aa[_0xcf24('0x1c')](0xcc)[_0xcf24('0x27')]();});}};}function handleEntityNotFound(_0x54290d,_0xedef79){return function(_0x371a9){if(!_0x371a9){_0x54290d['sendStatus'](0x194);}return _0x371a9;};}function handleError(_0x136f59,_0x513718){_0x513718=_0x513718||0x1f4;return function(_0x383c9b){logger['error'](_0x383c9b[_0xcf24('0x28')]);if(_0x383c9b[_0xcf24('0x29')]){delete _0x383c9b[_0xcf24('0x29')];}_0x136f59[_0xcf24('0x1c')](_0x513718)[_0xcf24('0x2a')](_0x383c9b);};}exports[_0xcf24('0x2b')]=function(_0x1430e1,_0x439e64){var _0x54790e={},_0x214823={},_0x317db8={'count':0x0,'rows':[]};var _0x22fbe8=_['map'](db['VoiceQueuesLog'][_0xcf24('0x2c')],function(_0x566952){return{'name':_0x566952[_0xcf24('0x2d')],'type':_0x566952[_0xcf24('0x2e')][_0xcf24('0x2f')]};});_0x214823[_0xcf24('0x30')]=_[_0xcf24('0x31')](_0x22fbe8,_0xcf24('0x29'));_0x214823[_0xcf24('0x32')]=_[_0xcf24('0x33')](_0x1430e1[_0xcf24('0x32')]);_0x214823[_0xcf24('0x34')]=_['intersection'](_0x214823[_0xcf24('0x30')],_0x214823[_0xcf24('0x32')]);_0x54790e[_0xcf24('0x35')]=_[_0xcf24('0x36')](_0x214823[_0xcf24('0x30')],qs['fields'](_0x1430e1[_0xcf24('0x32')][_0xcf24('0x37')]));_0x54790e[_0xcf24('0x35')]=_0x54790e[_0xcf24('0x35')][_0xcf24('0x38')]?_0x54790e['attributes']:_0x214823[_0xcf24('0x30')];if(!_0x1430e1['query'][_0xcf24('0x39')](_0xcf24('0x3a'))){_0x54790e[_0xcf24('0x3b')]=qs[_0xcf24('0x3b')](_0x1430e1[_0xcf24('0x32')]['limit']);_0x54790e['offset']=qs['offset'](_0x1430e1[_0xcf24('0x32')][_0xcf24('0x1e')]);}_0x54790e[_0xcf24('0x3c')]=qs[_0xcf24('0x3d')](_0x1430e1[_0xcf24('0x32')][_0xcf24('0x3d')]);_0x54790e[_0xcf24('0x3e')]=qs[_0xcf24('0x34')](_[_0xcf24('0x3f')](_0x1430e1[_0xcf24('0x32')],_0x214823[_0xcf24('0x34')]),_0x22fbe8);if(_0x1430e1[_0xcf24('0x32')][_0xcf24('0x40')]){_0x54790e[_0xcf24('0x3e')]=_[_0xcf24('0x41')](_0x54790e[_0xcf24('0x3e')],{'$or':_[_0xcf24('0x31')](_0x22fbe8,function(_0xeaacbb){if(_0xeaacbb[_0xcf24('0x2e')]!==_0xcf24('0x42')){var _0x5edd26={};_0x5edd26[_0xeaacbb[_0xcf24('0x29')]]={'$like':'%'+_0x1430e1[_0xcf24('0x32')][_0xcf24('0x40')]+'%'};return _0x5edd26;}})});}_0x54790e=_[_0xcf24('0x41')]({},_0x54790e,_0x1430e1[_0xcf24('0x43')]);var _0x1c9ca2={'where':_0x54790e['where']};return db[_0xcf24('0x44')][_0xcf24('0x20')](_0x1c9ca2)[_0xcf24('0x26')](function(_0x52274f){_0x317db8[_0xcf24('0x20')]=_0x52274f;if(_0x1430e1['query'][_0xcf24('0x45')]){_0x54790e[_0xcf24('0x46')]=[{'all':!![]}];}return db[_0xcf24('0x44')]['findAll'](_0x54790e);})['then'](function(_0x105f36){_0x317db8[_0xcf24('0x47')]=_0x105f36;return _0x317db8;})[_0xcf24('0x26')](respondWithFilteredResult(_0x439e64,_0x54790e))[_0xcf24('0x48')](handleError(_0x439e64,null));};exports[_0xcf24('0x49')]=function(_0xb7e984,_0x5bd3e1){var _0x162f21={'raw':!![],'where':{'id':_0xb7e984[_0xcf24('0x4a')]['id']}},_0x41400e={};_0x41400e['model']=_[_0xcf24('0x33')](db[_0xcf24('0x44')][_0xcf24('0x2c')]);_0x41400e['query']=_[_0xcf24('0x33')](_0xb7e984[_0xcf24('0x32')]);_0x41400e[_0xcf24('0x34')]=_[_0xcf24('0x36')](_0x41400e[_0xcf24('0x30')],_0x41400e[_0xcf24('0x32')]);_0x162f21['attributes']=_['intersection'](_0x41400e['model'],qs[_0xcf24('0x37')](_0xb7e984[_0xcf24('0x32')][_0xcf24('0x37')]));_0x162f21[_0xcf24('0x35')]=_0x162f21[_0xcf24('0x35')]['length']?_0x162f21['attributes']:_0x41400e[_0xcf24('0x30')];if(_0xb7e984[_0xcf24('0x32')][_0xcf24('0x45')]){_0x162f21['include']=[{'all':!![]}];}_0x162f21=_[_0xcf24('0x41')]({},_0x162f21,_0xb7e984[_0xcf24('0x43')]);return db[_0xcf24('0x44')]['find'](_0x162f21)[_0xcf24('0x26')](handleEntityNotFound(_0x5bd3e1,null))[_0xcf24('0x26')](respondWithResult(_0x5bd3e1,null))[_0xcf24('0x48')](handleError(_0x5bd3e1,null));};exports[_0xcf24('0x4b')]=function(_0x31b7cf,_0x1bd36c){return db[_0xcf24('0x44')][_0xcf24('0x4b')](_0x31b7cf[_0xcf24('0x4c')],{})[_0xcf24('0x26')](respondWithResult(_0x1bd36c,0xc9))[_0xcf24('0x48')](handleError(_0x1bd36c,null));};exports[_0xcf24('0x25')]=function(_0x1dea95,_0x2fb678){if(_0x1dea95['body']['id']){delete _0x1dea95['body']['id'];}return db[_0xcf24('0x44')]['find']({'where':{'id':_0x1dea95['params']['id']}})[_0xcf24('0x26')](handleEntityNotFound(_0x2fb678,null))[_0xcf24('0x26')](saveUpdates(_0x1dea95[_0xcf24('0x4c')],null))['then'](respondWithResult(_0x2fb678,null))[_0xcf24('0x48')](handleError(_0x2fb678,null));};exports[_0xcf24('0x4d')]=function(_0x577c7b,_0x3c3e91){return db[_0xcf24('0x44')][_0xcf24('0x4e')]({'where':{'id':_0x577c7b['params']['id']}})['then'](handleEntityNotFound(_0x3c3e91,null))[_0xcf24('0x26')](removeEntity(_0x3c3e91,null))[_0xcf24('0x48')](handleError(_0x3c3e91,null));};
\ No newline at end of file
+var _0x6f02=['stack','name','send','index','map','VoiceQueuesLog','rawAttributes','type','key','query','filters','model','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','options','findAll','catch','params','keys','includeAll','include','find','create','body','update','destroy','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','crypto','jsforce','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','then'];(function(_0x3ee21e,_0x5cf64c){var _0x10755a=function(_0x31d3a9){while(--_0x31d3a9){_0x3ee21e['push'](_0x3ee21e['shift']());}};_0x10755a(++_0x5cf64c);}(_0x6f02,0x1f3));var _0x26f0=function(_0x88924a,_0x1431dc){_0x88924a=_0x88924a-0x0;var _0x48acdf=_0x6f02[_0x88924a];return _0x48acdf;};'use strict';var emlformat=require(_0x26f0('0x0'));var rimraf=require(_0x26f0('0x1'));var zipdir=require(_0x26f0('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x26f0('0x3'));var moment=require(_0x26f0('0x4'));var BPromise=require(_0x26f0('0x5'));var Mustache=require(_0x26f0('0x6'));var util=require(_0x26f0('0x7'));var path=require(_0x26f0('0x8'));var sox=require(_0x26f0('0x9'));var csv=require('to-csv');var ejs=require(_0x26f0('0xa'));var fs=require('fs');var fs_extra=require(_0x26f0('0xb'));var _=require(_0x26f0('0xc'));var squel=require('squel');var crypto=require(_0x26f0('0xd'));var jsforce=require(_0x26f0('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x26f0('0xf'));var querystring=require('querystring');var Papa=require(_0x26f0('0x10'));var Redis=require(_0x26f0('0x11'));var authService=require(_0x26f0('0x12'));var qs=require(_0x26f0('0x13'));var as=require(_0x26f0('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x26f0('0x15'))(_0x26f0('0x16'));var utils=require('../../config/utils');var config=require(_0x26f0('0x17'));var licenseUtil=require(_0x26f0('0x18'));var db=require(_0x26f0('0x19'))['db'];function respondWithStatusCode(_0x17ab60,_0x1f2c0a){_0x1f2c0a=_0x1f2c0a||0xcc;return function(_0x900c7f){if(_0x900c7f){return _0x17ab60[_0x26f0('0x1a')](_0x1f2c0a);}return _0x17ab60[_0x26f0('0x1b')](_0x1f2c0a)[_0x26f0('0x1c')]();};}function respondWithResult(_0x446ef5,_0x5703f9){_0x5703f9=_0x5703f9||0xc8;return function(_0x2c1135){if(_0x2c1135){return _0x446ef5[_0x26f0('0x1b')](_0x5703f9)[_0x26f0('0x1d')](_0x2c1135);}};}function respondWithFilteredResult(_0x50f36d,_0x5861a9){return function(_0x1d0fbd){if(_0x1d0fbd){var _0x51d28a=typeof _0x5861a9[_0x26f0('0x1e')]===_0x26f0('0x1f')&&typeof _0x5861a9[_0x26f0('0x20')]==='undefined';var _0x697661=_0x1d0fbd[_0x26f0('0x21')];var _0x4299c9=_0x51d28a?0x0:_0x5861a9[_0x26f0('0x1e')];var _0x5e59e6=_0x51d28a?_0x1d0fbd[_0x26f0('0x21')]:_0x5861a9[_0x26f0('0x1e')]+_0x5861a9[_0x26f0('0x20')];var _0x6e4a1c;if(_0x5e59e6>=_0x697661){_0x5e59e6=_0x697661;_0x6e4a1c=0xc8;}else{_0x6e4a1c=0xce;}_0x50f36d[_0x26f0('0x1b')](_0x6e4a1c);return _0x50f36d[_0x26f0('0x22')](_0x26f0('0x23'),_0x4299c9+'-'+_0x5e59e6+'/'+_0x697661)[_0x26f0('0x1d')](_0x1d0fbd);}return null;};}function patchUpdates(_0x4783ac){return function(_0x335fbd){try{jsonpatch[_0x26f0('0x24')](_0x335fbd,_0x4783ac,!![]);}catch(_0x28fe1c){return BPromise[_0x26f0('0x25')](_0x28fe1c);}return _0x335fbd[_0x26f0('0x26')]();};}function saveUpdates(_0x998791,_0x11adbd){return function(_0x67f77f){if(_0x67f77f){return _0x67f77f['update'](_0x998791)[_0x26f0('0x27')](function(_0x2e60a6){return _0x2e60a6;});}return null;};}function removeEntity(_0x337f94,_0x1f33d7){return function(_0x17e4f2){if(_0x17e4f2){return _0x17e4f2['destroy']()['then'](function(){_0x337f94[_0x26f0('0x1b')](0xcc)[_0x26f0('0x1c')]();});}};}function handleEntityNotFound(_0x5930c3,_0x5b51fa){return function(_0x406af7){if(!_0x406af7){_0x5930c3[_0x26f0('0x1a')](0x194);}return _0x406af7;};}function handleError(_0x5f51a8,_0x187789){_0x187789=_0x187789||0x1f4;return function(_0x10e6e4){logger['error'](_0x10e6e4[_0x26f0('0x28')]);if(_0x10e6e4[_0x26f0('0x29')]){delete _0x10e6e4[_0x26f0('0x29')];}_0x5f51a8['status'](_0x187789)[_0x26f0('0x2a')](_0x10e6e4);};}exports[_0x26f0('0x2b')]=function(_0x146581,_0x4d4b48){var _0x563b04={},_0x5499e8={},_0x12894b={'count':0x0,'rows':[]};var _0x3b2537=_[_0x26f0('0x2c')](db[_0x26f0('0x2d')][_0x26f0('0x2e')],function(_0x47d53f){return{'name':_0x47d53f['fieldName'],'type':_0x47d53f[_0x26f0('0x2f')][_0x26f0('0x30')]};});_0x5499e8['model']=_[_0x26f0('0x2c')](_0x3b2537,_0x26f0('0x29'));_0x5499e8[_0x26f0('0x31')]=_['keys'](_0x146581[_0x26f0('0x31')]);_0x5499e8[_0x26f0('0x32')]=_['intersection'](_0x5499e8[_0x26f0('0x33')],_0x5499e8[_0x26f0('0x31')]);_0x563b04[_0x26f0('0x34')]=_[_0x26f0('0x35')](_0x5499e8[_0x26f0('0x33')],qs[_0x26f0('0x36')](_0x146581[_0x26f0('0x31')]['fields']));_0x563b04[_0x26f0('0x34')]=_0x563b04[_0x26f0('0x34')][_0x26f0('0x37')]?_0x563b04[_0x26f0('0x34')]:_0x5499e8[_0x26f0('0x33')];if(!_0x146581[_0x26f0('0x31')][_0x26f0('0x38')](_0x26f0('0x39'))){_0x563b04['limit']=qs[_0x26f0('0x20')](_0x146581['query']['limit']);_0x563b04[_0x26f0('0x1e')]=qs[_0x26f0('0x1e')](_0x146581[_0x26f0('0x31')][_0x26f0('0x1e')]);}_0x563b04[_0x26f0('0x3a')]=qs[_0x26f0('0x3b')](_0x146581[_0x26f0('0x31')]['sort']);_0x563b04[_0x26f0('0x3c')]=qs['filters'](_[_0x26f0('0x3d')](_0x146581[_0x26f0('0x31')],_0x5499e8[_0x26f0('0x32')]),_0x3b2537);if(_0x146581[_0x26f0('0x31')]['filter']){_0x563b04[_0x26f0('0x3c')]=_[_0x26f0('0x3e')](_0x563b04[_0x26f0('0x3c')],{'$or':_[_0x26f0('0x2c')](_0x3b2537,function(_0x30c9dc){if(_0x30c9dc[_0x26f0('0x2f')]!==_0x26f0('0x3f')){var _0x5204b7={};_0x5204b7[_0x30c9dc['name']]={'$like':'%'+_0x146581[_0x26f0('0x31')][_0x26f0('0x40')]+'%'};return _0x5204b7;}})});}_0x563b04=_[_0x26f0('0x3e')]({},_0x563b04,_0x146581[_0x26f0('0x41')]);var _0x4d8386={'where':_0x563b04[_0x26f0('0x3c')]};return db['VoiceQueuesLog'][_0x26f0('0x21')](_0x4d8386)[_0x26f0('0x27')](function(_0x36c55d){_0x12894b['count']=_0x36c55d;if(_0x146581[_0x26f0('0x31')]['includeAll']){_0x563b04['include']=[{'all':!![]}];}return db[_0x26f0('0x2d')][_0x26f0('0x42')](_0x563b04);})[_0x26f0('0x27')](function(_0x21d210){_0x12894b['rows']=_0x21d210;return _0x12894b;})[_0x26f0('0x27')](respondWithFilteredResult(_0x4d4b48,_0x563b04))[_0x26f0('0x43')](handleError(_0x4d4b48,null));};exports['show']=function(_0x4c5de5,_0x16947d){var _0x14c58d={'raw':!![],'where':{'id':_0x4c5de5[_0x26f0('0x44')]['id']}},_0x3b5679={};_0x3b5679[_0x26f0('0x33')]=_['keys'](db[_0x26f0('0x2d')][_0x26f0('0x2e')]);_0x3b5679[_0x26f0('0x31')]=_[_0x26f0('0x45')](_0x4c5de5[_0x26f0('0x31')]);_0x3b5679[_0x26f0('0x32')]=_[_0x26f0('0x35')](_0x3b5679[_0x26f0('0x33')],_0x3b5679[_0x26f0('0x31')]);_0x14c58d[_0x26f0('0x34')]=_[_0x26f0('0x35')](_0x3b5679[_0x26f0('0x33')],qs[_0x26f0('0x36')](_0x4c5de5['query'][_0x26f0('0x36')]));_0x14c58d['attributes']=_0x14c58d[_0x26f0('0x34')][_0x26f0('0x37')]?_0x14c58d[_0x26f0('0x34')]:_0x3b5679[_0x26f0('0x33')];if(_0x4c5de5[_0x26f0('0x31')][_0x26f0('0x46')]){_0x14c58d[_0x26f0('0x47')]=[{'all':!![]}];}_0x14c58d=_[_0x26f0('0x3e')]({},_0x14c58d,_0x4c5de5[_0x26f0('0x41')]);return db[_0x26f0('0x2d')][_0x26f0('0x48')](_0x14c58d)[_0x26f0('0x27')](handleEntityNotFound(_0x16947d,null))[_0x26f0('0x27')](respondWithResult(_0x16947d,null))['catch'](handleError(_0x16947d,null));};exports[_0x26f0('0x49')]=function(_0x5c53ee,_0x26211b){return db[_0x26f0('0x2d')][_0x26f0('0x49')](_0x5c53ee[_0x26f0('0x4a')],{})['then'](respondWithResult(_0x26211b,0xc9))['catch'](handleError(_0x26211b,null));};exports[_0x26f0('0x4b')]=function(_0x5eeebf,_0x5619ac){if(_0x5eeebf[_0x26f0('0x4a')]['id']){delete _0x5eeebf['body']['id'];}return db['VoiceQueuesLog'][_0x26f0('0x48')]({'where':{'id':_0x5eeebf[_0x26f0('0x44')]['id']}})[_0x26f0('0x27')](handleEntityNotFound(_0x5619ac,null))[_0x26f0('0x27')](saveUpdates(_0x5eeebf[_0x26f0('0x4a')],null))[_0x26f0('0x27')](respondWithResult(_0x5619ac,null))['catch'](handleError(_0x5619ac,null));};exports[_0x26f0('0x4c')]=function(_0x17efbe,_0x1e014d){return db[_0x26f0('0x2d')][_0x26f0('0x48')]({'where':{'id':_0x17efbe[_0x26f0('0x44')]['id']}})[_0x26f0('0x27')](handleEntityNotFound(_0x1e014d,null))[_0x26f0('0x27')](removeEntity(_0x1e014d,null))[_0x26f0('0x43')](handleError(_0x1e014d,null));};
\ No newline at end of file
index 903cc5a..cda275e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb4f2=['moment','request-promise','path','rimraf','../../config/environment','./voiceQueuesLog.attributes','define','VoiceQueuesLog','voice_queues_log','event_dtm','dtm','lodash','util','../../config/logger','api'];(function(_0x39786e,_0x45deea){var _0x3e3a6e=function(_0xde68ea){while(--_0xde68ea){_0x39786e['push'](_0x39786e['shift']());}};_0x3e3a6e(++_0x45deea);}(_0xb4f2,0x1eb));var _0x2b4f=function(_0x127a9f,_0x24a160){_0x127a9f=_0x127a9f-0x0;var _0x22ef9b=_0xb4f2[_0x127a9f];return _0x22ef9b;};'use strict';var _=require(_0x2b4f('0x0'));var util=require(_0x2b4f('0x1'));var logger=require(_0x2b4f('0x2'))(_0x2b4f('0x3'));var moment=require(_0x2b4f('0x4'));var BPromise=require('bluebird');var rp=require(_0x2b4f('0x5'));var fs=require('fs');var path=require(_0x2b4f('0x6'));var rimraf=require(_0x2b4f('0x7'));var config=require(_0x2b4f('0x8'));var attributes=require(_0x2b4f('0x9'));module['exports']=function(_0xb3c554,_0x5613ca){return _0xb3c554[_0x2b4f('0xa')](_0x2b4f('0xb'),attributes,{'tableName':_0x2b4f('0xc'),'paranoid':![],'indexes':[{'name':_0x2b4f('0xd'),'fields':['event',_0x2b4f('0xe')]}],'timestamps':![]});};
\ No newline at end of file
+var _0xc404=['event_dtm','dtm','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','./voiceQueuesLog.attributes','exports','VoiceQueuesLog','voice_queues_log'];(function(_0x520e79,_0x503a3f){var _0x249fda=function(_0x462767){while(--_0x462767){_0x520e79['push'](_0x520e79['shift']());}};_0x249fda(++_0x503a3f);}(_0xc404,0xe2));var _0x4c40=function(_0x38ea83,_0x1b1fe6){_0x38ea83=_0x38ea83-0x0;var _0x90a5e=_0xc404[_0x38ea83];return _0x90a5e;};'use strict';var _=require(_0x4c40('0x0'));var util=require(_0x4c40('0x1'));var logger=require(_0x4c40('0x2'))('api');var moment=require(_0x4c40('0x3'));var BPromise=require(_0x4c40('0x4'));var rp=require(_0x4c40('0x5'));var fs=require('fs');var path=require(_0x4c40('0x6'));var rimraf=require(_0x4c40('0x7'));var config=require('../../config/environment');var attributes=require(_0x4c40('0x8'));module[_0x4c40('0x9')]=function(_0x5c52cc,_0x1d05ae){return _0x5c52cc['define'](_0x4c40('0xa'),attributes,{'tableName':_0x4c40('0xb'),'paranoid':![],'indexes':[{'name':_0x4c40('0xc'),'fields':['event',_0x4c40('0xd')]}],'timestamps':![]});};
\ No newline at end of file
index cf88a2a..fbd4375 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6a72=['message','info','result','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','VoiceQueuesLog,\x20%s,\x20%s','request\x20sent','stringify','error','code'];(function(_0xc36d01,_0x3bf1a6){var _0xecb231=function(_0x2fb301){while(--_0x2fb301){_0xc36d01['push'](_0xc36d01['shift']());}};_0xecb231(++_0x3bf1a6);}(_0x6a72,0x118));var _0x26a7=function(_0x33ab57,_0x449de8){_0x33ab57=_0x33ab57-0x0;var _0x3af8ce=_0x6a72[_0x33ab57];return _0x3af8ce;};'use strict';var _=require(_0x26a7('0x0'));var util=require(_0x26a7('0x1'));var moment=require(_0x26a7('0x2'));var BPromise=require('bluebird');var rs=require(_0x26a7('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x26a7('0x4'))['db'];var utils=require(_0x26a7('0x5'));var logger=require(_0x26a7('0x6'))(_0x26a7('0x7'));var config=require(_0x26a7('0x8'));var jayson=require(_0x26a7('0x9'));var client=jayson[_0x26a7('0xa')][_0x26a7('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4ae95c,_0x20e058,_0x46dbc0){return new BPromise(function(_0x5115c5,_0x7fa77b){return client[_0x26a7('0xc')](_0x4ae95c,_0x46dbc0)[_0x26a7('0xd')](function(_0x274dbf){logger['info'](_0x26a7('0xe'),_0x20e058,_0x26a7('0xf'));logger['debug']('VoiceQueuesLog,\x20%s,\x20%s,\x20%s',_0x20e058,_0x26a7('0xf'),JSON[_0x26a7('0x10')](_0x274dbf));if(_0x274dbf[_0x26a7('0x11')]){if(_0x274dbf['error'][_0x26a7('0x12')]===0x1f4){logger[_0x26a7('0x11')](_0x26a7('0xe'),_0x20e058,_0x274dbf[_0x26a7('0x11')][_0x26a7('0x13')]);return _0x7fa77b(_0x274dbf['error'][_0x26a7('0x13')]);}logger['error'](_0x26a7('0xe'),_0x20e058,_0x274dbf[_0x26a7('0x11')][_0x26a7('0x13')]);return _0x5115c5(_0x274dbf[_0x26a7('0x11')][_0x26a7('0x13')]);}else{logger[_0x26a7('0x14')](_0x26a7('0xe'),_0x20e058,_0x26a7('0xf'));_0x5115c5(_0x274dbf[_0x26a7('0x15')][_0x26a7('0x13')]);}})[_0x26a7('0x16')](function(_0x19ed18){logger[_0x26a7('0x11')]('VoiceQueuesLog,\x20%s,\x20%s',_0x20e058,_0x19ed18);_0x7fa77b(_0x19ed18);});});}
\ No newline at end of file
+var _0x90db=['request','then','info','VoiceQueuesLog,\x20%s,\x20%s','request\x20sent','VoiceQueuesLog,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','util','moment','bluebird','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x29d94e,_0xf386d6){var _0x106237=function(_0x327501){while(--_0x327501){_0x29d94e['push'](_0x29d94e['shift']());}};_0x106237(++_0xf386d6);}(_0x90db,0x1c0));var _0xb90d=function(_0x487b0c,_0x14ff74){_0x487b0c=_0x487b0c-0x0;var _0x1adbdc=_0x90db[_0x487b0c];return _0x1adbdc;};'use strict';var _=require('lodash');var util=require(_0xb90d('0x0'));var moment=require(_0xb90d('0x1'));var BPromise=require(_0xb90d('0x2'));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('../../config/logger')(_0xb90d('0x3'));var config=require(_0xb90d('0x4'));var jayson=require(_0xb90d('0x5'));var client=jayson[_0xb90d('0x6')][_0xb90d('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x2d8398,_0x180781,_0x126e17){return new BPromise(function(_0x2ef5e6,_0x108b88){return client[_0xb90d('0x8')](_0x2d8398,_0x126e17)[_0xb90d('0x9')](function(_0x48c4f6){logger[_0xb90d('0xa')](_0xb90d('0xb'),_0x180781,_0xb90d('0xc'));logger['debug'](_0xb90d('0xd'),_0x180781,_0xb90d('0xc'),JSON[_0xb90d('0xe')](_0x48c4f6));if(_0x48c4f6[_0xb90d('0xf')]){if(_0x48c4f6[_0xb90d('0xf')]['code']===0x1f4){logger[_0xb90d('0xf')]('VoiceQueuesLog,\x20%s,\x20%s',_0x180781,_0x48c4f6[_0xb90d('0xf')][_0xb90d('0x10')]);return _0x108b88(_0x48c4f6[_0xb90d('0xf')][_0xb90d('0x10')]);}logger[_0xb90d('0xf')](_0xb90d('0xb'),_0x180781,_0x48c4f6[_0xb90d('0xf')]['message']);return _0x2ef5e6(_0x48c4f6[_0xb90d('0xf')]['message']);}else{logger[_0xb90d('0xa')](_0xb90d('0xb'),_0x180781,'request\x20sent');_0x2ef5e6(_0x48c4f6[_0xb90d('0x11')]['message']);}})[_0xb90d('0x12')](function(_0x396f3f){logger[_0xb90d('0xf')](_0xb90d('0xb'),_0x180781,_0x396f3f);_0x108b88(_0x396f3f);});});}
\ No newline at end of file
index 103e843..80187a3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd773=['exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceRecording.controller','get','isAuthenticated','/describe','/:id','show','/:id/download','download','/:id/downloads','downloads','/:id/transcribe','downloadTranscribe','post','runTranscribe','put','update','delete','destroy'];(function(_0x194f09,_0x5c3a4f){var _0x26e13f=function(_0x4fecfc){while(--_0x4fecfc){_0x194f09['push'](_0x194f09['shift']());}};_0x26e13f(++_0x5c3a4f);}(_0xd773,0xe1));var _0x3d77=function(_0x4a0f6e,_0x31a636){_0x4a0f6e=_0x4a0f6e-0x0;var _0x361ff6=_0xd773[_0x4a0f6e];return _0x361ff6;};'use strict';var multer=require(_0x3d77('0x0'));var util=require(_0x3d77('0x1'));var path=require(_0x3d77('0x2'));var timeout=require(_0x3d77('0x3'));var express=require(_0x3d77('0x4'));var router=express[_0x3d77('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x3d77('0x6'));var interaction=require(_0x3d77('0x7'));var config=require(_0x3d77('0x8'));var controller=require(_0x3d77('0x9'));router[_0x3d77('0xa')]('/',auth[_0x3d77('0xb')](),controller['index']);router[_0x3d77('0xa')](_0x3d77('0xc'),auth[_0x3d77('0xb')](),controller['describe']);router['get'](_0x3d77('0xd'),auth[_0x3d77('0xb')](),controller[_0x3d77('0xe')]);router[_0x3d77('0xa')](_0x3d77('0xf'),auth[_0x3d77('0xb')](),controller[_0x3d77('0x10')]);router[_0x3d77('0xa')](_0x3d77('0x11'),controller[_0x3d77('0x12')]);router[_0x3d77('0xa')](_0x3d77('0x13'),auth['isAuthenticated'](),controller[_0x3d77('0x14')]);router[_0x3d77('0x15')]('/',auth['isAuthenticated'](),controller['create']);router[_0x3d77('0x15')]('/:id/transcribe',auth[_0x3d77('0xb')](),controller[_0x3d77('0x16')]);router[_0x3d77('0x17')](_0x3d77('0xd'),auth['isAuthenticated'](),controller[_0x3d77('0x18')]);router[_0x3d77('0x19')](_0x3d77('0xd'),auth['isAuthenticated'](),controller[_0x3d77('0x1a')]);module[_0x3d77('0x1b')]=router;
\ No newline at end of file
+var _0x4f3c=['/describe','describe','/:id','show','/:id/download','download','/:id/downloads','downloads','/:id/transcribe','downloadTranscribe','post','create','runTranscribe','put','update','delete','destroy','util','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceRecording.controller','isAuthenticated','index','get'];(function(_0x546db7,_0x59d31a){var _0x3f5c5f=function(_0x1d6976){while(--_0x1d6976){_0x546db7['push'](_0x546db7['shift']());}};_0x3f5c5f(++_0x59d31a);}(_0x4f3c,0x11f));var _0xc4f3=function(_0x2cbd58,_0x278e75){_0x2cbd58=_0x2cbd58-0x0;var _0x42ef2a=_0x4f3c[_0x2cbd58];return _0x42ef2a;};'use strict';var multer=require('multer');var util=require(_0xc4f3('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0xc4f3('0x1')]();var fs_extra=require(_0xc4f3('0x2'));var auth=require(_0xc4f3('0x3'));var interaction=require(_0xc4f3('0x4'));var config=require(_0xc4f3('0x5'));var controller=require(_0xc4f3('0x6'));router['get']('/',auth[_0xc4f3('0x7')](),controller[_0xc4f3('0x8')]);router[_0xc4f3('0x9')](_0xc4f3('0xa'),auth[_0xc4f3('0x7')](),controller[_0xc4f3('0xb')]);router['get'](_0xc4f3('0xc'),auth[_0xc4f3('0x7')](),controller[_0xc4f3('0xd')]);router[_0xc4f3('0x9')](_0xc4f3('0xe'),auth[_0xc4f3('0x7')](),controller[_0xc4f3('0xf')]);router['get'](_0xc4f3('0x10'),controller[_0xc4f3('0x11')]);router[_0xc4f3('0x9')](_0xc4f3('0x12'),auth[_0xc4f3('0x7')](),controller[_0xc4f3('0x13')]);router[_0xc4f3('0x14')]('/',auth['isAuthenticated'](),controller[_0xc4f3('0x15')]);router['post'](_0xc4f3('0x12'),auth[_0xc4f3('0x7')](),controller[_0xc4f3('0x16')]);router[_0xc4f3('0x17')]('/:id',auth[_0xc4f3('0x7')](),controller[_0xc4f3('0x18')]);router[_0xc4f3('0x19')](_0xc4f3('0xc'),auth[_0xc4f3('0x7')](),controller[_0xc4f3('0x1a')]);module['exports']=router;
\ No newline at end of file
index b936fe0..029975b 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(_0x13d07a,_0x41efc3){var _0x5ee0ee=function(_0x4ca94a){while(--_0x4ca94a){_0x13d07a['push'](_0x13d07a['shift']());}};_0x5ee0ee(++_0x41efc3);}(_0xa9e0,0x123));var _0x0a9e=function(_0x110c3d,_0x12ee06){_0x110c3d=_0x110c3d-0x0;var _0x226d67=_0xa9e0[_0x110c3d];return _0x226d67;};'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(_0x27af45,_0x1b57aa){var _0x18df21=function(_0x4b7679){while(--_0x4b7679){_0x27af45['push'](_0x27af45['shift']());}};_0x18df21(++_0x1b57aa);}(_0xa9e0,0x123));var _0x0a9e=function(_0x376b45,_0x5964fb){_0x376b45=_0x376b45-0x0;var _0x2341b3=_0xa9e0[_0x376b45];return _0x2341b3;};'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 c73cb41..63c7df1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x11a8=['listBuckets','createBucket','TranscribeService','startTranscriptionJob','basename','[RUNTRANSCRIPT][%d]\x20Voice\x20recording\x20uploaded\x20in\x20bucket\x20%s\x20(%s)','Location','Bucket','[RUNTRANSCRIPT][%d]\x20Sending\x20transcribe\x20request','TranscriptionJob','TranscriptionJobName','transcribeName','transcribeStatus','TranscriptionJobStatus','runTranscribe','findOne','Voice\x20Recording\x20not\x20found','Setting','transcribeAccountId','transcribeRegion','language','bucket','runSentiment','sentiment','sentimentAccountId','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','IN_PROGRESS','updateAttributes','writeFile','downloadTranscribe','fileText','/server/files/transcribes/transcribe_','eml-format','zip-dir','moment','bluebird','sox','to-csv','lodash','jsforce','desk.js','querystring','aws-sdk','uuid/v4','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','save','update','error','stack','name','index','VoiceRecording','rawAttributes','fieldName','type','model','differenceBy','map','format','query','keys','filters','intersection','attributes','nolimit','sort','pick','filter','where','merge','VIRTUAL','options','include','findAll','then','rows','catch','show','params','fields','length','includeAll','find','create','body','describe','download','../../components/encryptor','uniqueid','existsSync','decryptFile','secrets','recording','value','Sequelize','ValidationError','VoiceRecording\x20not\x20found','filename','extname','unlink','message','send','Not\x20found','MD5','sequelize','col','token','push','$and','%s.cypher','destroy','isNil','Entity\x20not\x20found','info','File:\x20\x22','.cypher','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync'];(function(_0x3132e8,_0x499a0e){var _0x43eb8c=function(_0x2321e1){while(--_0x2321e1){_0x3132e8['push'](_0x3132e8['shift']());}};_0x43eb8c(++_0x499a0e);}(_0x11a8,0x149));var _0x811a=function(_0x3183c6,_0x41f576){_0x3183c6=_0x3183c6-0x0;var _0x18b04e=_0x11a8[_0x3183c6];return _0x18b04e;};'use strict';var emlformat=require(_0x811a('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x811a('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x811a('0x2'));var BPromise=require(_0x811a('0x3'));var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0x811a('0x4'));var csv=require(_0x811a('0x5'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x811a('0x6'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x811a('0x7'));var deskjs=require(_0x811a('0x8'));var toCsv=require(_0x811a('0x5'));var querystring=require(_0x811a('0x9'));var Papa=require('papaparse');var AWS=require(_0x811a('0xa'));var uuidv4=require(_0x811a('0xb'));var Redis=require(_0x811a('0xc'));var authService=require(_0x811a('0xd'));var qs=require(_0x811a('0xe'));var as=require(_0x811a('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x811a('0x10'))(_0x811a('0x11'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x811a('0x12'));var db=require(_0x811a('0x13'))['db'];function respondWithStatusCode(_0x440939,_0x1f89ae){_0x1f89ae=_0x1f89ae||0xcc;return function(_0x5dddf1){if(_0x5dddf1){return _0x440939[_0x811a('0x14')](_0x1f89ae);}return _0x440939[_0x811a('0x15')](_0x1f89ae)[_0x811a('0x16')]();};}function respondWithResult(_0x181284,_0x4f916a){_0x4f916a=_0x4f916a||0xc8;return function(_0x591ff8){if(_0x591ff8){return _0x181284['status'](_0x4f916a)[_0x811a('0x17')](_0x591ff8);}};}function respondWithFilteredResult(_0x1bea1b,_0x5e7a80){return function(_0x2ecbfb){if(_0x2ecbfb){var _0xcbbc00=typeof _0x5e7a80[_0x811a('0x18')]===_0x811a('0x19')&&typeof _0x5e7a80[_0x811a('0x1a')]===_0x811a('0x19');var _0x3340d2=_0x2ecbfb[_0x811a('0x1b')];var _0x2e8384=_0xcbbc00?0x0:_0x5e7a80[_0x811a('0x18')];var _0x127ee5=_0xcbbc00?_0x2ecbfb[_0x811a('0x1b')]:_0x5e7a80[_0x811a('0x18')]+_0x5e7a80[_0x811a('0x1a')];var _0x11291a;if(_0x127ee5>=_0x3340d2){_0x127ee5=_0x3340d2;_0x11291a=0xc8;}else{_0x11291a=0xce;}_0x1bea1b[_0x811a('0x15')](_0x11291a);return _0x1bea1b[_0x811a('0x1c')]('Content-Range',_0x2e8384+'-'+_0x127ee5+'/'+_0x3340d2)[_0x811a('0x17')](_0x2ecbfb);}return null;};}function patchUpdates(_0x142677){return function(_0x543b38){try{jsonpatch[_0x811a('0x1d')](_0x543b38,_0x142677,!![]);}catch(_0x20b159){return BPromise['reject'](_0x20b159);}return _0x543b38[_0x811a('0x1e')]();};}function saveUpdates(_0x1adcc6,_0x4e994c){return function(_0x139c67){if(_0x139c67){return _0x139c67[_0x811a('0x1f')](_0x1adcc6)['then'](function(_0x13ad2f){return _0x13ad2f;});}return null;};}function removeEntity(_0x544d01,_0x165098){return function(_0x39212b){if(_0x39212b){return _0x39212b['destroy']()['then'](function(){_0x544d01[_0x811a('0x15')](0xcc)[_0x811a('0x16')]();});}};}function handleEntityNotFound(_0x13b24e,_0x213f24){return function(_0x531dad){if(!_0x531dad){_0x13b24e[_0x811a('0x14')](0x194);}return _0x531dad;};}function handleError(_0x4fe58b,_0xc74bc8){_0xc74bc8=_0xc74bc8||0x1f4;return function(_0x5892a5){logger[_0x811a('0x20')](_0x5892a5[_0x811a('0x21')]);if(_0x5892a5['name']){delete _0x5892a5[_0x811a('0x22')];}_0x4fe58b[_0x811a('0x15')](_0xc74bc8)['send'](_0x5892a5);};}exports[_0x811a('0x23')]=function(_0x2cc092,_0x3e50a8){var _0x3a1243={},_0x4aaf72={},_0x46fbf0={'count':0x0,'rows':[]};var _0x3fcb22=_['map'](db[_0x811a('0x24')][_0x811a('0x25')],function(_0x19f83d){return{'name':_0x19f83d[_0x811a('0x26')],'type':_0x19f83d[_0x811a('0x27')]['key']};});_0x4aaf72[_0x811a('0x28')]=_[_0x811a('0x29')](_[_0x811a('0x2a')](_0x3fcb22,'name'),[_0x811a('0x2b')]);_0x4aaf72[_0x811a('0x2c')]=_[_0x811a('0x2d')](_0x2cc092[_0x811a('0x2c')]);_0x4aaf72[_0x811a('0x2e')]=_[_0x811a('0x2f')](_0x4aaf72[_0x811a('0x28')],_0x4aaf72['query']);_0x3a1243[_0x811a('0x30')]=_['intersection'](_0x4aaf72[_0x811a('0x28')],qs['fields'](_0x2cc092[_0x811a('0x2c')]['fields']));_0x3a1243['attributes']=_0x3a1243[_0x811a('0x30')]['length']?_0x3a1243[_0x811a('0x30')]:_0x4aaf72[_0x811a('0x28')];if(!_0x2cc092[_0x811a('0x2c')]['hasOwnProperty'](_0x811a('0x31'))){_0x3a1243[_0x811a('0x1a')]=qs['limit'](_0x2cc092['query'][_0x811a('0x1a')]);_0x3a1243[_0x811a('0x18')]=qs[_0x811a('0x18')](_0x2cc092['query']['offset']);}_0x3a1243['order']=qs[_0x811a('0x32')](_0x2cc092['query'][_0x811a('0x32')]);_0x3a1243['where']=qs[_0x811a('0x2e')](_[_0x811a('0x33')](_0x2cc092[_0x811a('0x2c')],_0x4aaf72[_0x811a('0x2e')]),_0x3fcb22);if(_0x2cc092[_0x811a('0x2c')][_0x811a('0x34')]){_0x3a1243[_0x811a('0x35')]=_[_0x811a('0x36')](_0x3a1243[_0x811a('0x35')],{'$or':_[_0x811a('0x2a')](_0x3fcb22,function(_0x344b46){if(_0x344b46['type']!==_0x811a('0x37')){var _0x1ba1ec={};_0x1ba1ec[_0x344b46[_0x811a('0x22')]]={'$like':'%'+_0x2cc092['query'][_0x811a('0x34')]+'%'};return _0x1ba1ec;}})});}_0x3a1243=_['merge']({},_0x3a1243,_0x2cc092[_0x811a('0x38')]);var _0x316fcf={'where':_0x3a1243['where']};return db[_0x811a('0x24')][_0x811a('0x1b')](_0x316fcf)['then'](function(_0x439ed8){_0x46fbf0['count']=_0x439ed8;if(_0x2cc092['query']['includeAll']){_0x3a1243[_0x811a('0x39')]=[{'all':!![]}];}return db[_0x811a('0x24')][_0x811a('0x3a')](_0x3a1243);})[_0x811a('0x3b')](function(_0x25d2c4){_0x46fbf0[_0x811a('0x3c')]=_0x25d2c4;return _0x46fbf0;})[_0x811a('0x3b')](respondWithFilteredResult(_0x3e50a8,_0x3a1243))[_0x811a('0x3d')](handleError(_0x3e50a8,null));};exports[_0x811a('0x3e')]=function(_0x1eb03a,_0x25d9e6){var _0x56fc55={'raw':![],'where':{'id':_0x1eb03a[_0x811a('0x3f')]['id']}},_0x4155f9={};_0x4155f9[_0x811a('0x28')]=_[_0x811a('0x2d')](db[_0x811a('0x24')][_0x811a('0x25')]);_0x4155f9[_0x811a('0x2c')]=_[_0x811a('0x2d')](_0x1eb03a[_0x811a('0x2c')]);_0x4155f9['filters']=_[_0x811a('0x2f')](_0x4155f9[_0x811a('0x28')],_0x4155f9['query']);_0x56fc55[_0x811a('0x30')]=_['intersection'](_0x4155f9['model'],qs['fields'](_0x1eb03a[_0x811a('0x2c')][_0x811a('0x40')]));_0x56fc55[_0x811a('0x30')]=_0x56fc55[_0x811a('0x30')][_0x811a('0x41')]?_0x56fc55['attributes']:_0x4155f9['model'];if(_0x1eb03a[_0x811a('0x2c')][_0x811a('0x42')]){_0x56fc55['include']=[{'all':!![]}];}_0x56fc55=_[_0x811a('0x36')]({},_0x56fc55,_0x1eb03a[_0x811a('0x38')]);return db[_0x811a('0x24')][_0x811a('0x43')](_0x56fc55)[_0x811a('0x3b')](handleEntityNotFound(_0x25d9e6,null))['then'](respondWithResult(_0x25d9e6,null))['catch'](handleError(_0x25d9e6,null));};exports[_0x811a('0x44')]=function(_0x4dbfbf,_0x281461){return db['VoiceRecording'][_0x811a('0x44')](_0x4dbfbf[_0x811a('0x45')],{})[_0x811a('0x3b')](respondWithResult(_0x281461,0xc9))[_0x811a('0x3d')](handleError(_0x281461,null));};exports['update']=function(_0x522443,_0x1f382a){if(_0x522443[_0x811a('0x45')]['id']){delete _0x522443[_0x811a('0x45')]['id'];}return db[_0x811a('0x24')][_0x811a('0x43')]({'where':{'id':_0x522443['params']['id']}})['then'](handleEntityNotFound(_0x1f382a,null))['then'](saveUpdates(_0x522443[_0x811a('0x45')],null))[_0x811a('0x3b')](respondWithResult(_0x1f382a,null))['catch'](handleError(_0x1f382a,null));};exports[_0x811a('0x46')]=function(_0x584ec5,_0xa87025){return db[_0x811a('0x24')][_0x811a('0x46')]()[_0x811a('0x3b')](respondWithResult(_0xa87025,null))['catch'](handleError(_0xa87025,null));};exports[_0x811a('0x47')]=function(_0x1d4757,_0x24e993,_0x45dc4f){var _0xebff7d=require(_0x811a('0x48'));var _0x1a24bc=![];var _0xb017e5={};if(_0x1d4757[_0x811a('0x2c')][_0x811a('0x27')]&&_0x1d4757[_0x811a('0x2c')][_0x811a('0x27')]==='uniqueid'){_0xb017e5[_0x811a('0x49')]=_0x1d4757[_0x811a('0x3f')]['id'];}else{_0xb017e5['id']=_0x1d4757[_0x811a('0x3f')]['id'];}return db[_0x811a('0x24')][_0x811a('0x43')]({'where':_0xb017e5,'attributes':['id','value'],'raw':!![]})['then'](handleEntityNotFound(_0x24e993,null))[_0x811a('0x3b')](function(_0x341147){if(_0x341147){var _0x591b4b=_0x341147['value'];var _0x589a2f=util['format']('%s.cypher',_0x591b4b);if(fs[_0x811a('0x4a')](_0x589a2f)){_0x1a24bc=!![];return _0xebff7d[_0x811a('0x4b')](_0x589a2f,_0x591b4b,config[_0x811a('0x4c')][_0x811a('0x4d')])['then'](function(){return _0x341147;});}return _0x341147;}})[_0x811a('0x3b')](function(_0x40ba9e){if(_0x40ba9e){var _0x4e92e8=_0x40ba9e[_0x811a('0x4e')];if(!fs[_0x811a('0x4a')](_0x4e92e8)){throw new db[(_0x811a('0x4f'))][(_0x811a('0x50'))](_0x811a('0x51'));}if(_0x40ba9e[_0x811a('0x52')]){return _0x24e993['download'](_0x4e92e8,_0x40ba9e[_0x811a('0x52')]+path[_0x811a('0x53')](_0x4e92e8),function(){if(_0x1a24bc){fs[_0x811a('0x54')](_0x4e92e8);}});}else{return _0x24e993['download'](_0x4e92e8,function(_0x4f3993){if(_0x1a24bc){fs['unlink'](_0x4e92e8);}});}}})[_0x811a('0x3d')](function(_0x4cc0a5){if(_0x4cc0a5[_0x811a('0x55')]===_0x811a('0x51')){_0x24e993['status'](0x194)[_0x811a('0x56')](_0x811a('0x57'));}else{return handleError(_0x24e993,null);}});};exports['downloads']=function(_0x2b9982,_0x284d02,_0x53e1d7){var _0x25cfdd=require(_0x811a('0x48'));var _0x43c359=![];var _0x449be6={'$and':[db['sequelize'][_0x811a('0x35')](db['sequelize']['fn'](_0x811a('0x58'),db[_0x811a('0x59')][_0x811a('0x5a')]('uniqueid')),_0x2b9982['query'][_0x811a('0x5b')])]};if(_0x2b9982[_0x811a('0x2c')][_0x811a('0x27')]&&_0x2b9982[_0x811a('0x2c')][_0x811a('0x27')]===_0x811a('0x49')){_0x449be6['$and'][_0x811a('0x5c')]({'uniqueid':_0x2b9982['params']['id']});}else{_0x449be6[_0x811a('0x5d')][_0x811a('0x5c')]({'id':_0x2b9982[_0x811a('0x3f')]['id']});}return db['VoiceRecording'][_0x811a('0x43')]({'where':_0x449be6,'attributes':['id',_0x811a('0x4e')],'raw':!![]})['then'](handleEntityNotFound(_0x284d02,null))['then'](function(_0x1c0f6f){if(_0x1c0f6f){var _0x5b0cbe=util[_0x811a('0x2b')](_0x811a('0x5e'),_0x1c0f6f[_0x811a('0x4e')]);if(fs[_0x811a('0x4a')](_0x5b0cbe)){_0x43c359=!![];return _0x25cfdd[_0x811a('0x4b')](_0x5b0cbe,_0x1c0f6f[_0x811a('0x4e')],config[_0x811a('0x4c')][_0x811a('0x4d')])[_0x811a('0x3b')](function(){return _0x1c0f6f;});}return _0x1c0f6f;}})['then'](function(_0x423950){if(_0x423950){if(!fs['existsSync'](_0x423950['value'])){throw new db[(_0x811a('0x4f'))]['ValidationError'](_0x811a('0x51'));}if(_0x423950[_0x811a('0x52')]){return _0x284d02[_0x811a('0x47')](_0x423950['value'],_0x423950[_0x811a('0x52')]+path[_0x811a('0x53')](_0x423950['value']),function(){if(_0x43c359){fs['unlink'](_0x423950[_0x811a('0x4e')]);}});}else{return _0x284d02['download'](_0x423950[_0x811a('0x4e')],function(_0x510c11){if(_0x43c359){fs['unlink'](_0x423950[_0x811a('0x4e')]);}});}}})['catch'](handleError(_0x284d02,null));};exports[_0x811a('0x5f')]=function(_0x47d844,_0x2c1720){return db[_0x811a('0x24')][_0x811a('0x43')]({'where':{'id':_0x47d844['params']['id']}})[_0x811a('0x3b')](function(_0xf56f14){if(_[_0x811a('0x60')](_0xf56f14)){throw new ReferenceError(_0x811a('0x61'));}return _0xf56f14;})[_0x811a('0x3b')](function(_0x539d6b){var _0x3b8975=_0x539d6b[_0x811a('0x4e')];logger[_0x811a('0x62')]('cancellazione\x20fisica\x20documento\x20%s',_0x3b8975);if(!_[_0x811a('0x60')](_0x539d6b['value'])&&fs[_0x811a('0x4a')](_0x3b8975)){logger[_0x811a('0x62')](_0x811a('0x63')+_0x3b8975+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione');fs['unlinkSync'](_0x3b8975);}_0x3b8975=_0x3b8975+_0x811a('0x64');if(!_[_0x811a('0x60')](_0x539d6b[_0x811a('0x4e')])&&fs[_0x811a('0x4a')](_0x3b8975)){logger[_0x811a('0x62')](_0x811a('0x63')+_0x3b8975+_0x811a('0x65'));fs[_0x811a('0x66')](_0x3b8975);}return _0x539d6b;})[_0x811a('0x3b')](function(_0x3269ce){if(!_0x3269ce)throw new InternalError();return _0x3269ce[_0x811a('0x5f')]();})[_0x811a('0x3b')](function(){_0x2c1720['status'](0xcc)[_0x811a('0x16')]();})[_0x811a('0x3d')](handleError(_0x2c1720,null));};function getBucketslist(_0x227df0,_0x362f2b,_0x39d7ab){return new Promise(function(_0x12b8d2,_0x4cd937){var _0x175593=new AWS['S3']({'accessKeyId':_0x362f2b,'secretAccessKey':_0x227df0,'region':_0x39d7ab});_0x175593[_0x811a('0x67')]({},function(_0x1070b1,_0x47ddb6){if(_0x1070b1){return _0x4cd937(_0x1070b1);}else{return _0x12b8d2(_0x47ddb6);}});});}function createBucket(_0x39585d,_0x59d9a1,_0x140e80,_0x1d8219){return new Promise(function(_0x4b63df,_0x4702cc){var _0x378d0e=new AWS['S3']({'accessKeyId':_0x59d9a1,'secretAccessKey':_0x39585d,'region':_0x140e80});_0x378d0e[_0x811a('0x68')]({'Bucket':_0x1d8219},function(_0x136d44,_0x454879){if(_0x136d44){return _0x4702cc(_0x136d44);}else{return _0x4b63df(_0x454879);}});});}function uploadFile(_0x3f9e2d,_0x1de019,_0xea4160,_0x3cb709,_0x1cdb55,_0x39997f){return new Promise(function(_0x3d6bb9,_0xa37864){var _0x422f1f=new AWS['S3']({'accessKeyId':_0x1de019,'secretAccessKey':_0x3f9e2d,'region':_0xea4160});_0x422f1f['upload']({'Bucket':_0x3cb709,'Key':_0x1cdb55,'Body':_0x39997f},function(_0x40dc4e,_0x409f3e){if(_0x40dc4e){return _0xa37864(_0x40dc4e);}else{return _0x3d6bb9(_0x409f3e);}});});}function startTranscribe(_0x165c95,_0x419a60,_0x176373,_0x200e01,_0x122c49,_0x2ee298){return new Promise(function(_0x379b0a,_0x65712d){var _0x277ccc=new AWS[(_0x811a('0x69'))]({'accessKeyId':_0x419a60,'secretAccessKey':_0x165c95,'region':_0x176373});_0x277ccc[_0x811a('0x6a')]({'TranscriptionJobName':_0x200e01,'LanguageCode':_0x122c49,'Media':{'MediaFileUri':_0x2ee298}},function(_0x31f5c4,_0x549401){if(_0x31f5c4){return _0x65712d(_0x31f5c4);}else{return _0x379b0a(_0x549401);}});});}function transcribe(_0x42da97,_0x31d5cb,_0x2380b4,_0x1043af,_0x5cfe32,_0x2ba399,_0x3df44a){return new Promise(function(_0x3bc095,_0xefd139){var _0x2f61f3={};logger['info'](util[_0x811a('0x2b')]('[RUNTRANSCRIPT][%d]\x20Starting\x20voice\x20recording\x20upload\x20in\x20bucket\x20%s',_0x42da97,_0x5cfe32));return uploadFile(_0x31d5cb,_0x2380b4,_0x1043af,_0x5cfe32,path[_0x811a('0x6b')](_0x2ba399),fs['readFileSync'](_0x2ba399))[_0x811a('0x3b')](function(_0x15b9ba){logger[_0x811a('0x62')](util[_0x811a('0x2b')](_0x811a('0x6c'),_0x42da97,_0x5cfe32,_0x15b9ba[_0x811a('0x6d')]));_0x2f61f3['bucket']=_0x15b9ba[_0x811a('0x6e')];_0x2f61f3['location']=_0x15b9ba[_0x811a('0x6d')];logger['info'](util[_0x811a('0x2b')](_0x811a('0x6f'),_0x42da97));return startTranscribe(_0x31d5cb,_0x2380b4,_0x1043af,uuidv4(),_0x3df44a,_0x15b9ba['Location']);})['then'](function(_0x5768c5){logger[_0x811a('0x62')](util[_0x811a('0x2b')]('[RUNTRANSCRIPT][%d]\x20Transcription\x20job\x20%s\x20created',_0x42da97,_0x5768c5[_0x811a('0x70')][_0x811a('0x71')]));_0x2f61f3[_0x811a('0x72')]=_0x5768c5[_0x811a('0x70')][_0x811a('0x71')];_0x2f61f3[_0x811a('0x73')]=_0x5768c5['TranscriptionJob'][_0x811a('0x74')];return _0x3bc095(_0x2f61f3);})[_0x811a('0x3d')](function(_0x5af41d){return _0xefd139(_0x5af41d);});});}exports[_0x811a('0x75')]=function(_0x1232b5,_0xcc3f5f,_0x359a44){var _0x2466c1;var _0x480d3d;var _0x828edf;var _0x3c47fa=require(_0x811a('0x48'));return db[_0x811a('0x24')][_0x811a('0x76')]({'where':{'id':_0x1232b5['params']['id']}})[_0x811a('0x3b')](function(_0x59cc24){if(_0x59cc24){var _0xf96a5=util[_0x811a('0x2b')](_0x811a('0x5e'),_0x59cc24[_0x811a('0x4e')]);if(fs[_0x811a('0x4a')](_0xf96a5)){cypher=!![];return _0x3c47fa[_0x811a('0x4b')](_0xf96a5,_0x59cc24[_0x811a('0x4e')],config[_0x811a('0x4c')][_0x811a('0x4d')])[_0x811a('0x3b')](function(){return _0x59cc24;});}return _0x59cc24;}})['then'](function(_0x273e21){if(!_0x273e21){throw new db['Sequelize']['ValidationError'](_0x811a('0x77'));}_0x480d3d=_0x273e21;return db[_0x811a('0x78')]['findOne']({'where':{'id':0x1}});})[_0x811a('0x3b')](handleEntityNotFound(_0xcc3f5f,null))[_0x811a('0x3b')](function(_0x21e09f){if(_0x21e09f){_0x2466c1=_0x21e09f;if(!_0x2466c1['transcribe']||!_0x2466c1[_0x811a('0x79')]||!_0x2466c1[_0x811a('0x7a')]||!_0x2466c1[_0x811a('0x7b')]||!_0x2466c1[_0x811a('0x7c')]){throw new db[(_0x811a('0x4f'))][(_0x811a('0x50'))]('Transcribe\x20not\x20configured');}if(_0x1232b5[_0x811a('0x45')][_0x811a('0x7d')]&&(!_0x2466c1[_0x811a('0x7e')]||!_0x2466c1[_0x811a('0x7f')]||!_0x2466c1['sentimentRegion']||!_0x2466c1[_0x811a('0x7b')]||!_0x2466c1[_0x811a('0x7c')])){throw new db[(_0x811a('0x4f'))]['ValidationError'](_0x811a('0x80'));}return db[_0x811a('0x81')][_0x811a('0x76')]({'where':{'id':_0x2466c1[_0x811a('0x79')]}});}})['then'](function(_0x62547f){if(!_0x62547f){throw new db[(_0x811a('0x4f'))]['ValidationError'](_0x811a('0x82'));}if(!_0x62547f[_0x811a('0x83')]||!_0x62547f[_0x811a('0x84')]){throw new db[(_0x811a('0x4f'))][(_0x811a('0x50'))](_0x811a('0x85'));}_0x828edf=_0x62547f;return getBucketslist(_0x828edf[_0x811a('0x83')],_0x828edf['data2'],_0x2466c1[_0x811a('0x7a')]);})[_0x811a('0x3b')](function(_0x30ac12){if(_0x30ac12&&_0x30ac12[_0x811a('0x86')]){var _0x2edaad=_[_0x811a('0x43')](_0x30ac12[_0x811a('0x86')],function(_0x5ea4d7){return _0x5ea4d7[_0x811a('0x87')]===_0x2466c1[_0x811a('0x7c')];});if(!_0x2edaad){logger[_0x811a('0x62')](util[_0x811a('0x2b')](_0x811a('0x88'),_0x1232b5[_0x811a('0x3f')]['id'],_0x2466c1[_0x811a('0x7c')]));return createBucket(_0x828edf[_0x811a('0x83')],_0x828edf[_0x811a('0x84')],_0x2466c1['transcribeRegion'],_0x2466c1[_0x811a('0x7c')]);}logger[_0x811a('0x62')](util['format'](_0x811a('0x89'),_0x1232b5[_0x811a('0x3f')]['id'],_0x2466c1[_0x811a('0x7c')]));return;}})[_0x811a('0x3b')](function(_0x12a777){if(_0x480d3d[_0x811a('0x73')]==='NEW'){return transcribe(_0x1232b5[_0x811a('0x3f')]['id'],_0x828edf[_0x811a('0x83')],_0x828edf[_0x811a('0x84')],_0x2466c1[_0x811a('0x7a')],_0x2466c1[_0x811a('0x7c')],_0x480d3d[_0x811a('0x4e')],_0x2466c1[_0x811a('0x7b')]);}else{logger[_0x811a('0x62')](util[_0x811a('0x2b')]('[RUNTRANSCRIPT][%d]\x20Transcript\x20action\x20already\x20requested',_0x1232b5[_0x811a('0x3f')]['id']));return{'transcribeStatus':_0x811a('0x8a')};}})['then'](function(_0x368d22){if(_0x368d22){_0x368d22['tempSentiment']=_0x1232b5['body']['runSentiment'];return _0x480d3d[_0x811a('0x8b')](_0x368d22);}})[_0x811a('0x3b')](respondWithResult(_0xcc3f5f,null))['catch'](handleError(_0xcc3f5f,null));};function writeFile(_0x5f235d,_0x6bcb0b){return new Promise(function(_0x540a37,_0x295c3e){fs[_0x811a('0x8c')](_0x6bcb0b,_0x5f235d,function(_0x148bad,_0xdb3e1){if(_0x148bad){return _0x295c3e(_0x148bad);}else{return _0x540a37(_0xdb3e1);}});});}exports[_0x811a('0x8d')]=function(_0x1ed05e,_0xbfeb5e,_0x1b2690){return db[_0x811a('0x24')][_0x811a('0x76')]({'where':{'id':_0x1ed05e[_0x811a('0x3f')]['id']}})[_0x811a('0x3b')](handleEntityNotFound(_0xbfeb5e))['then'](function(_0x485052){if(_0x485052&&_0x485052[_0x811a('0x8e')]){var _0x5e039c=_0x485052['fileText'];var _0x55423e=config['root']+_0x811a('0x8f')+_0x485052['id']+'.txt';if(fs[_0x811a('0x4a')](_0x55423e)){return _0x55423e;}return writeFile(_0x5e039c,_0x55423e)['then'](function(){return _0x55423e;});}else{throw new db['Sequelize'][(_0x811a('0x50'))]('Transcript\x20not\x20available');}})[_0x811a('0x3b')](function(_0x788cab){return _0xbfeb5e[_0x811a('0x47')](_0x788cab);})[_0x811a('0x3d')](handleError(_0xbfeb5e));};
\ No newline at end of file
+var _0x052d=['show','params','keys','rawAttributes','find','create','body','describe','download','uniqueid','value','%s.cypher','existsSync','decryptFile','ValidationError','VoiceRecording\x20not\x20found','filename','extname','unlink','message','Not\x20found','../../components/encryptor','sequelize','token','$and','push','secrets','recording','Sequelize','isNil','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','File:\x20\x22','unlinkSync','.cypher','listBuckets','upload','startTranscriptionJob','[RUNTRANSCRIPT][%d]\x20Starting\x20voice\x20recording\x20upload\x20in\x20bucket\x20%s','basename','readFileSync','Location','bucket','Bucket','[RUNTRANSCRIPT][%d]\x20Sending\x20transcribe\x20request','[RUNTRANSCRIPT][%d]\x20Transcription\x20job\x20%s\x20created','TranscriptionJob','TranscriptionJobName','transcribeName','TranscriptionJobStatus','runTranscribe','findOne','transcribe','transcribeRegion','language','Transcribe\x20not\x20configured','runSentiment','sentiment','sentimentRegion','Sentiment\x20Analysis\x20not\x20configured','CloudProvider','data1','data2','Cloud\x20Provider\x20not\x20configured','Buckets','Name','[RUNTRANSCRIPT][%d]\x20Bucket\x20%s\x20not\x20available','transcribeStatus','NEW','[RUNTRANSCRIPT][%d]\x20Transcript\x20action\x20already\x20requested','tempSentiment','updateAttributes','writeFile','downloadTranscribe','fileText','root','/server/files/transcribes/transcribe_','.txt','Transcript\x20not\x20available','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','papaparse','ioredis','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','reject','update','then','destroy','stack','name','send','index','map','VoiceRecording','fieldName','type','key','differenceBy','format','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch'];(function(_0x4d02c7,_0x554d40){var _0x2ffff6=function(_0x5bd870){while(--_0x5bd870){_0x4d02c7['push'](_0x4d02c7['shift']());}};_0x2ffff6(++_0x554d40);}(_0x052d,0xe3));var _0xd052=function(_0x7a8884,_0x3bf33c){_0x7a8884=_0x7a8884-0x0;var _0xe75372=_0x052d[_0x7a8884];return _0xe75372;};'use strict';var emlformat=require(_0xd052('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xd052('0x1'));var jsonpatch=require(_0xd052('0x2'));var rp=require(_0xd052('0x3'));var moment=require(_0xd052('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xd052('0x5'));var util=require(_0xd052('0x6'));var path=require(_0xd052('0x7'));var sox=require('sox');var csv=require(_0xd052('0x8'));var ejs=require(_0xd052('0x9'));var fs=require('fs');var fs_extra=require(_0xd052('0xa'));var _=require(_0xd052('0xb'));var squel=require('squel');var crypto=require(_0xd052('0xc'));var jsforce=require(_0xd052('0xd'));var deskjs=require(_0xd052('0xe'));var toCsv=require(_0xd052('0x8'));var querystring=require('querystring');var Papa=require(_0xd052('0xf'));var AWS=require('aws-sdk');var uuidv4=require('uuid/v4');var Redis=require(_0xd052('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xd052('0x11'));var utils=require('../../config/utils');var config=require(_0xd052('0x12'));var licenseUtil=require(_0xd052('0x13'));var db=require(_0xd052('0x14'))['db'];function respondWithStatusCode(_0x5c7886,_0x57c5e4){_0x57c5e4=_0x57c5e4||0xcc;return function(_0xb4be6e){if(_0xb4be6e){return _0x5c7886[_0xd052('0x15')](_0x57c5e4);}return _0x5c7886[_0xd052('0x16')](_0x57c5e4)[_0xd052('0x17')]();};}function respondWithResult(_0xf27d1b,_0x1f1d1e){_0x1f1d1e=_0x1f1d1e||0xc8;return function(_0x5c87ed){if(_0x5c87ed){return _0xf27d1b[_0xd052('0x16')](_0x1f1d1e)[_0xd052('0x18')](_0x5c87ed);}};}function respondWithFilteredResult(_0x312144,_0xa42e45){return function(_0x544818){if(_0x544818){var _0x498c58=typeof _0xa42e45[_0xd052('0x19')]===_0xd052('0x1a')&&typeof _0xa42e45['limit']==='undefined';var _0x4362b9=_0x544818[_0xd052('0x1b')];var _0x514213=_0x498c58?0x0:_0xa42e45['offset'];var _0x17a3a9=_0x498c58?_0x544818[_0xd052('0x1b')]:_0xa42e45[_0xd052('0x19')]+_0xa42e45[_0xd052('0x1c')];var _0x18da36;if(_0x17a3a9>=_0x4362b9){_0x17a3a9=_0x4362b9;_0x18da36=0xc8;}else{_0x18da36=0xce;}_0x312144[_0xd052('0x16')](_0x18da36);return _0x312144[_0xd052('0x1d')](_0xd052('0x1e'),_0x514213+'-'+_0x17a3a9+'/'+_0x4362b9)['json'](_0x544818);}return null;};}function patchUpdates(_0x32c963){return function(_0x2681e3){try{jsonpatch['apply'](_0x2681e3,_0x32c963,!![]);}catch(_0x2fcd7e){return BPromise[_0xd052('0x1f')](_0x2fcd7e);}return _0x2681e3['save']();};}function saveUpdates(_0x2e5596,_0x53a4bb){return function(_0x7bb170){if(_0x7bb170){return _0x7bb170[_0xd052('0x20')](_0x2e5596)[_0xd052('0x21')](function(_0x20426c){return _0x20426c;});}return null;};}function removeEntity(_0x8f0ea5,_0x1e7ff4){return function(_0x3a9765){if(_0x3a9765){return _0x3a9765[_0xd052('0x22')]()[_0xd052('0x21')](function(){_0x8f0ea5[_0xd052('0x16')](0xcc)[_0xd052('0x17')]();});}};}function handleEntityNotFound(_0x2d825e,_0x361789){return function(_0x52b31c){if(!_0x52b31c){_0x2d825e[_0xd052('0x15')](0x194);}return _0x52b31c;};}function handleError(_0x1b36b1,_0x4ee70a){_0x4ee70a=_0x4ee70a||0x1f4;return function(_0x12f55d){logger['error'](_0x12f55d[_0xd052('0x23')]);if(_0x12f55d[_0xd052('0x24')]){delete _0x12f55d['name'];}_0x1b36b1[_0xd052('0x16')](_0x4ee70a)[_0xd052('0x25')](_0x12f55d);};}exports[_0xd052('0x26')]=function(_0x2d4b6f,_0xd0f2b4){var _0x242567={},_0x4f0a39={},_0x4a95c8={'count':0x0,'rows':[]};var _0x530a67=_[_0xd052('0x27')](db[_0xd052('0x28')]['rawAttributes'],function(_0x5649fe){return{'name':_0x5649fe[_0xd052('0x29')],'type':_0x5649fe[_0xd052('0x2a')][_0xd052('0x2b')]};});_0x4f0a39['model']=_[_0xd052('0x2c')](_[_0xd052('0x27')](_0x530a67,_0xd052('0x24')),[_0xd052('0x2d')]);_0x4f0a39[_0xd052('0x2e')]=_['keys'](_0x2d4b6f['query']);_0x4f0a39[_0xd052('0x2f')]=_[_0xd052('0x30')](_0x4f0a39[_0xd052('0x31')],_0x4f0a39[_0xd052('0x2e')]);_0x242567[_0xd052('0x32')]=_[_0xd052('0x30')](_0x4f0a39[_0xd052('0x31')],qs['fields'](_0x2d4b6f[_0xd052('0x2e')][_0xd052('0x33')]));_0x242567['attributes']=_0x242567['attributes'][_0xd052('0x34')]?_0x242567[_0xd052('0x32')]:_0x4f0a39[_0xd052('0x31')];if(!_0x2d4b6f[_0xd052('0x2e')][_0xd052('0x35')](_0xd052('0x36'))){_0x242567[_0xd052('0x1c')]=qs[_0xd052('0x1c')](_0x2d4b6f[_0xd052('0x2e')][_0xd052('0x1c')]);_0x242567[_0xd052('0x19')]=qs[_0xd052('0x19')](_0x2d4b6f[_0xd052('0x2e')]['offset']);}_0x242567[_0xd052('0x37')]=qs[_0xd052('0x38')](_0x2d4b6f['query']['sort']);_0x242567['where']=qs[_0xd052('0x2f')](_['pick'](_0x2d4b6f[_0xd052('0x2e')],_0x4f0a39[_0xd052('0x2f')]),_0x530a67);if(_0x2d4b6f[_0xd052('0x2e')][_0xd052('0x39')]){_0x242567[_0xd052('0x3a')]=_[_0xd052('0x3b')](_0x242567[_0xd052('0x3a')],{'$or':_['map'](_0x530a67,function(_0x1f6bee){if(_0x1f6bee[_0xd052('0x2a')]!==_0xd052('0x3c')){var _0x12c8bc={};_0x12c8bc[_0x1f6bee[_0xd052('0x24')]]={'$like':'%'+_0x2d4b6f['query'][_0xd052('0x39')]+'%'};return _0x12c8bc;}})});}_0x242567=_[_0xd052('0x3b')]({},_0x242567,_0x2d4b6f[_0xd052('0x3d')]);var _0x58ada6={'where':_0x242567[_0xd052('0x3a')]};return db[_0xd052('0x28')][_0xd052('0x1b')](_0x58ada6)['then'](function(_0xca1fb3){_0x4a95c8[_0xd052('0x1b')]=_0xca1fb3;if(_0x2d4b6f[_0xd052('0x2e')][_0xd052('0x3e')]){_0x242567[_0xd052('0x3f')]=[{'all':!![]}];}return db['VoiceRecording'][_0xd052('0x40')](_0x242567);})[_0xd052('0x21')](function(_0x29dcd1){_0x4a95c8[_0xd052('0x41')]=_0x29dcd1;return _0x4a95c8;})[_0xd052('0x21')](respondWithFilteredResult(_0xd0f2b4,_0x242567))[_0xd052('0x42')](handleError(_0xd0f2b4,null));};exports[_0xd052('0x43')]=function(_0x11fd65,_0x32f5f1){var _0x23a387={'raw':![],'where':{'id':_0x11fd65[_0xd052('0x44')]['id']}},_0x2993da={};_0x2993da[_0xd052('0x31')]=_[_0xd052('0x45')](db['VoiceRecording'][_0xd052('0x46')]);_0x2993da[_0xd052('0x2e')]=_[_0xd052('0x45')](_0x11fd65[_0xd052('0x2e')]);_0x2993da[_0xd052('0x2f')]=_['intersection'](_0x2993da[_0xd052('0x31')],_0x2993da[_0xd052('0x2e')]);_0x23a387['attributes']=_['intersection'](_0x2993da['model'],qs['fields'](_0x11fd65['query'][_0xd052('0x33')]));_0x23a387[_0xd052('0x32')]=_0x23a387['attributes'][_0xd052('0x34')]?_0x23a387[_0xd052('0x32')]:_0x2993da[_0xd052('0x31')];if(_0x11fd65[_0xd052('0x2e')][_0xd052('0x3e')]){_0x23a387[_0xd052('0x3f')]=[{'all':!![]}];}_0x23a387=_['merge']({},_0x23a387,_0x11fd65[_0xd052('0x3d')]);return db['VoiceRecording'][_0xd052('0x47')](_0x23a387)[_0xd052('0x21')](handleEntityNotFound(_0x32f5f1,null))[_0xd052('0x21')](respondWithResult(_0x32f5f1,null))[_0xd052('0x42')](handleError(_0x32f5f1,null));};exports[_0xd052('0x48')]=function(_0x1a780c,_0x597acf){return db['VoiceRecording']['create'](_0x1a780c['body'],{})['then'](respondWithResult(_0x597acf,0xc9))['catch'](handleError(_0x597acf,null));};exports[_0xd052('0x20')]=function(_0x3c6c25,_0xc9de98){if(_0x3c6c25[_0xd052('0x49')]['id']){delete _0x3c6c25[_0xd052('0x49')]['id'];}return db[_0xd052('0x28')][_0xd052('0x47')]({'where':{'id':_0x3c6c25[_0xd052('0x44')]['id']}})[_0xd052('0x21')](handleEntityNotFound(_0xc9de98,null))[_0xd052('0x21')](saveUpdates(_0x3c6c25[_0xd052('0x49')],null))['then'](respondWithResult(_0xc9de98,null))[_0xd052('0x42')](handleError(_0xc9de98,null));};exports['describe']=function(_0x4c969d,_0x3355c8){return db[_0xd052('0x28')][_0xd052('0x4a')]()[_0xd052('0x21')](respondWithResult(_0x3355c8,null))[_0xd052('0x42')](handleError(_0x3355c8,null));};exports[_0xd052('0x4b')]=function(_0x1b569c,_0x11ede8,_0x18e40a){var _0x2b14ea=require('../../components/encryptor');var _0x4e3b88=![];var _0xb02b8d={};if(_0x1b569c[_0xd052('0x2e')][_0xd052('0x2a')]&&_0x1b569c[_0xd052('0x2e')]['type']===_0xd052('0x4c')){_0xb02b8d['uniqueid']=_0x1b569c[_0xd052('0x44')]['id'];}else{_0xb02b8d['id']=_0x1b569c['params']['id'];}return db['VoiceRecording'][_0xd052('0x47')]({'where':_0xb02b8d,'attributes':['id',_0xd052('0x4d')],'raw':!![]})[_0xd052('0x21')](handleEntityNotFound(_0x11ede8,null))[_0xd052('0x21')](function(_0x566f41){if(_0x566f41){var _0x58be39=_0x566f41[_0xd052('0x4d')];var _0x269816=util[_0xd052('0x2d')](_0xd052('0x4e'),_0x58be39);if(fs[_0xd052('0x4f')](_0x269816)){_0x4e3b88=!![];return _0x2b14ea[_0xd052('0x50')](_0x269816,_0x58be39,config['secrets']['recording'])[_0xd052('0x21')](function(){return _0x566f41;});}return _0x566f41;}})[_0xd052('0x21')](function(_0x20ff3a){if(_0x20ff3a){var _0x50dfaf=_0x20ff3a[_0xd052('0x4d')];if(!fs[_0xd052('0x4f')](_0x50dfaf)){throw new db['Sequelize'][(_0xd052('0x51'))](_0xd052('0x52'));}if(_0x20ff3a[_0xd052('0x53')]){return _0x11ede8[_0xd052('0x4b')](_0x50dfaf,_0x20ff3a[_0xd052('0x53')]+path[_0xd052('0x54')](_0x50dfaf),function(){if(_0x4e3b88){fs[_0xd052('0x55')](_0x50dfaf);}});}else{return _0x11ede8[_0xd052('0x4b')](_0x50dfaf,function(_0x14298c){if(_0x4e3b88){fs[_0xd052('0x55')](_0x50dfaf);}});}}})['catch'](function(_0xa90d33){if(_0xa90d33[_0xd052('0x56')]===_0xd052('0x52')){_0x11ede8[_0xd052('0x16')](0x194)[_0xd052('0x25')](_0xd052('0x57'));}else{return handleError(_0x11ede8,null);}});};exports['downloads']=function(_0x40755c,_0x851618,_0x32ac74){var _0x3d001a=require(_0xd052('0x58'));var _0x553899=![];var _0x2fe351={'$and':[db['sequelize'][_0xd052('0x3a')](db[_0xd052('0x59')]['fn']('MD5',db[_0xd052('0x59')]['col'](_0xd052('0x4c'))),_0x40755c[_0xd052('0x2e')][_0xd052('0x5a')])]};if(_0x40755c[_0xd052('0x2e')][_0xd052('0x2a')]&&_0x40755c['query'][_0xd052('0x2a')]==='uniqueid'){_0x2fe351[_0xd052('0x5b')][_0xd052('0x5c')]({'uniqueid':_0x40755c[_0xd052('0x44')]['id']});}else{_0x2fe351['$and']['push']({'id':_0x40755c[_0xd052('0x44')]['id']});}return db['VoiceRecording'][_0xd052('0x47')]({'where':_0x2fe351,'attributes':['id','value'],'raw':!![]})[_0xd052('0x21')](handleEntityNotFound(_0x851618,null))['then'](function(_0x48c371){if(_0x48c371){var _0x2dcd21=util[_0xd052('0x2d')]('%s.cypher',_0x48c371['value']);if(fs['existsSync'](_0x2dcd21)){_0x553899=!![];return _0x3d001a[_0xd052('0x50')](_0x2dcd21,_0x48c371[_0xd052('0x4d')],config[_0xd052('0x5d')][_0xd052('0x5e')])[_0xd052('0x21')](function(){return _0x48c371;});}return _0x48c371;}})[_0xd052('0x21')](function(_0x31eee9){if(_0x31eee9){if(!fs[_0xd052('0x4f')](_0x31eee9[_0xd052('0x4d')])){throw new db[(_0xd052('0x5f'))][(_0xd052('0x51'))]('VoiceRecording\x20not\x20found');}if(_0x31eee9[_0xd052('0x53')]){return _0x851618[_0xd052('0x4b')](_0x31eee9[_0xd052('0x4d')],_0x31eee9[_0xd052('0x53')]+path[_0xd052('0x54')](_0x31eee9[_0xd052('0x4d')]),function(){if(_0x553899){fs[_0xd052('0x55')](_0x31eee9[_0xd052('0x4d')]);}});}else{return _0x851618[_0xd052('0x4b')](_0x31eee9[_0xd052('0x4d')],function(_0x93020){if(_0x553899){fs[_0xd052('0x55')](_0x31eee9['value']);}});}}})['catch'](handleError(_0x851618,null));};exports[_0xd052('0x22')]=function(_0x425396,_0x483c85){return db[_0xd052('0x28')][_0xd052('0x47')]({'where':{'id':_0x425396[_0xd052('0x44')]['id']}})['then'](function(_0x3551f9){if(_[_0xd052('0x60')](_0x3551f9)){throw new ReferenceError(_0xd052('0x61'));}return _0x3551f9;})[_0xd052('0x21')](function(_0x22d838){var _0x2468bc=_0x22d838[_0xd052('0x4d')];logger[_0xd052('0x62')](_0xd052('0x63'),_0x2468bc);if(!_[_0xd052('0x60')](_0x22d838['value'])&&fs[_0xd052('0x4f')](_0x2468bc)){logger[_0xd052('0x62')](_0xd052('0x64')+_0x2468bc+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione');fs[_0xd052('0x65')](_0x2468bc);}_0x2468bc=_0x2468bc+_0xd052('0x66');if(!_[_0xd052('0x60')](_0x22d838[_0xd052('0x4d')])&&fs[_0xd052('0x4f')](_0x2468bc)){logger[_0xd052('0x62')]('File:\x20\x22'+_0x2468bc+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione');fs[_0xd052('0x65')](_0x2468bc);}return _0x22d838;})[_0xd052('0x21')](function(_0x408606){if(!_0x408606)throw new InternalError();return _0x408606[_0xd052('0x22')]();})['then'](function(){_0x483c85[_0xd052('0x16')](0xcc)[_0xd052('0x17')]();})[_0xd052('0x42')](handleError(_0x483c85,null));};function getBucketslist(_0x129f06,_0x1ff8aa,_0x25fedd){return new Promise(function(_0x3981ec,_0x11435e){var _0x5580bf=new AWS['S3']({'accessKeyId':_0x1ff8aa,'secretAccessKey':_0x129f06,'region':_0x25fedd});_0x5580bf[_0xd052('0x67')]({},function(_0x1a34a9,_0x2a5c31){if(_0x1a34a9){return _0x11435e(_0x1a34a9);}else{return _0x3981ec(_0x2a5c31);}});});}function createBucket(_0x464f7b,_0x40b0f9,_0x1d33ce,_0x7538bb){return new Promise(function(_0x35119d,_0x26505c){var _0x5b1c07=new AWS['S3']({'accessKeyId':_0x40b0f9,'secretAccessKey':_0x464f7b,'region':_0x1d33ce});_0x5b1c07['createBucket']({'Bucket':_0x7538bb},function(_0x218724,_0x399ac2){if(_0x218724){return _0x26505c(_0x218724);}else{return _0x35119d(_0x399ac2);}});});}function uploadFile(_0x3bc666,_0x405b97,_0xe82595,_0x545ee4,_0x757fc6,_0x3b6a23){return new Promise(function(_0x1cde21,_0x281282){var _0x52cab3=new AWS['S3']({'accessKeyId':_0x405b97,'secretAccessKey':_0x3bc666,'region':_0xe82595});_0x52cab3[_0xd052('0x68')]({'Bucket':_0x545ee4,'Key':_0x757fc6,'Body':_0x3b6a23},function(_0x1406c0,_0x4685f9){if(_0x1406c0){return _0x281282(_0x1406c0);}else{return _0x1cde21(_0x4685f9);}});});}function startTranscribe(_0x4c65c9,_0x30bbb7,_0x637778,_0x5c2b2e,_0x4ba8e0,_0x287e1b){return new Promise(function(_0x41dcaa,_0x561563){var _0x3f033a=new AWS['TranscribeService']({'accessKeyId':_0x30bbb7,'secretAccessKey':_0x4c65c9,'region':_0x637778});_0x3f033a[_0xd052('0x69')]({'TranscriptionJobName':_0x5c2b2e,'LanguageCode':_0x4ba8e0,'Media':{'MediaFileUri':_0x287e1b}},function(_0x3c2a9f,_0x384dc3){if(_0x3c2a9f){return _0x561563(_0x3c2a9f);}else{return _0x41dcaa(_0x384dc3);}});});}function transcribe(_0x3de128,_0x51be20,_0x17fd17,_0x485b69,_0x17f9aa,_0x55914d,_0x585674){return new Promise(function(_0x3f8867,_0x380405){var _0x14c1f1={};logger[_0xd052('0x62')](util[_0xd052('0x2d')](_0xd052('0x6a'),_0x3de128,_0x17f9aa));return uploadFile(_0x51be20,_0x17fd17,_0x485b69,_0x17f9aa,path[_0xd052('0x6b')](_0x55914d),fs[_0xd052('0x6c')](_0x55914d))['then'](function(_0xac7b36){logger[_0xd052('0x62')](util['format']('[RUNTRANSCRIPT][%d]\x20Voice\x20recording\x20uploaded\x20in\x20bucket\x20%s\x20(%s)',_0x3de128,_0x17f9aa,_0xac7b36[_0xd052('0x6d')]));_0x14c1f1[_0xd052('0x6e')]=_0xac7b36[_0xd052('0x6f')];_0x14c1f1['location']=_0xac7b36['Location'];logger[_0xd052('0x62')](util[_0xd052('0x2d')](_0xd052('0x70'),_0x3de128));return startTranscribe(_0x51be20,_0x17fd17,_0x485b69,uuidv4(),_0x585674,_0xac7b36[_0xd052('0x6d')]);})['then'](function(_0x4ee8e1){logger[_0xd052('0x62')](util[_0xd052('0x2d')](_0xd052('0x71'),_0x3de128,_0x4ee8e1[_0xd052('0x72')][_0xd052('0x73')]));_0x14c1f1[_0xd052('0x74')]=_0x4ee8e1[_0xd052('0x72')][_0xd052('0x73')];_0x14c1f1['transcribeStatus']=_0x4ee8e1[_0xd052('0x72')][_0xd052('0x75')];return _0x3f8867(_0x14c1f1);})[_0xd052('0x42')](function(_0x3a8675){return _0x380405(_0x3a8675);});});}exports[_0xd052('0x76')]=function(_0x48d526,_0x81c02f,_0x217c9e){var _0x1da502;var _0xad9259;var _0x38a90b;var _0x328006=require('../../components/encryptor');return db[_0xd052('0x28')]['findOne']({'where':{'id':_0x48d526[_0xd052('0x44')]['id']}})['then'](function(_0x1ebb03){if(_0x1ebb03){var _0x4e60c3=util[_0xd052('0x2d')]('%s.cypher',_0x1ebb03[_0xd052('0x4d')]);if(fs[_0xd052('0x4f')](_0x4e60c3)){cypher=!![];return _0x328006[_0xd052('0x50')](_0x4e60c3,_0x1ebb03[_0xd052('0x4d')],config[_0xd052('0x5d')][_0xd052('0x5e')])[_0xd052('0x21')](function(){return _0x1ebb03;});}return _0x1ebb03;}})[_0xd052('0x21')](function(_0x32c139){if(!_0x32c139){throw new db[(_0xd052('0x5f'))][(_0xd052('0x51'))]('Voice\x20Recording\x20not\x20found');}_0xad9259=_0x32c139;return db['Setting'][_0xd052('0x77')]({'where':{'id':0x1}});})[_0xd052('0x21')](handleEntityNotFound(_0x81c02f,null))[_0xd052('0x21')](function(_0x175a55){if(_0x175a55){_0x1da502=_0x175a55;if(!_0x1da502[_0xd052('0x78')]||!_0x1da502['transcribeAccountId']||!_0x1da502[_0xd052('0x79')]||!_0x1da502[_0xd052('0x7a')]||!_0x1da502['bucket']){throw new db[(_0xd052('0x5f'))][(_0xd052('0x51'))](_0xd052('0x7b'));}if(_0x48d526[_0xd052('0x49')][_0xd052('0x7c')]&&(!_0x1da502[_0xd052('0x7d')]||!_0x1da502['sentimentAccountId']||!_0x1da502[_0xd052('0x7e')]||!_0x1da502[_0xd052('0x7a')]||!_0x1da502['bucket'])){throw new db[(_0xd052('0x5f'))][(_0xd052('0x51'))](_0xd052('0x7f'));}return db[_0xd052('0x80')][_0xd052('0x77')]({'where':{'id':_0x1da502['transcribeAccountId']}});}})[_0xd052('0x21')](function(_0x58596c){if(!_0x58596c){throw new db[(_0xd052('0x5f'))][(_0xd052('0x51'))]('Cloud\x20Provider\x20not\x20available');}if(!_0x58596c[_0xd052('0x81')]||!_0x58596c[_0xd052('0x82')]){throw new db[(_0xd052('0x5f'))][(_0xd052('0x51'))](_0xd052('0x83'));}_0x38a90b=_0x58596c;return getBucketslist(_0x38a90b[_0xd052('0x81')],_0x38a90b['data2'],_0x1da502[_0xd052('0x79')]);})[_0xd052('0x21')](function(_0x3e27ea){if(_0x3e27ea&&_0x3e27ea[_0xd052('0x84')]){var _0x4c84e3=_['find'](_0x3e27ea[_0xd052('0x84')],function(_0x4d04d0){return _0x4d04d0[_0xd052('0x85')]===_0x1da502['bucket'];});if(!_0x4c84e3){logger[_0xd052('0x62')](util['format'](_0xd052('0x86'),_0x48d526[_0xd052('0x44')]['id'],_0x1da502[_0xd052('0x6e')]));return createBucket(_0x38a90b[_0xd052('0x81')],_0x38a90b[_0xd052('0x82')],_0x1da502['transcribeRegion'],_0x1da502[_0xd052('0x6e')]);}logger[_0xd052('0x62')](util[_0xd052('0x2d')]('[RUNTRANSCRIPT][%d]\x20Bucket\x20%s\x20available',_0x48d526[_0xd052('0x44')]['id'],_0x1da502['bucket']));return;}})[_0xd052('0x21')](function(_0x873c13){if(_0xad9259[_0xd052('0x87')]===_0xd052('0x88')){return transcribe(_0x48d526[_0xd052('0x44')]['id'],_0x38a90b[_0xd052('0x81')],_0x38a90b[_0xd052('0x82')],_0x1da502[_0xd052('0x79')],_0x1da502[_0xd052('0x6e')],_0xad9259['value'],_0x1da502[_0xd052('0x7a')]);}else{logger[_0xd052('0x62')](util[_0xd052('0x2d')](_0xd052('0x89'),_0x48d526[_0xd052('0x44')]['id']));return{'transcribeStatus':'IN_PROGRESS'};}})[_0xd052('0x21')](function(_0x2c25f4){if(_0x2c25f4){_0x2c25f4[_0xd052('0x8a')]=_0x48d526[_0xd052('0x49')][_0xd052('0x7c')];return _0xad9259[_0xd052('0x8b')](_0x2c25f4);}})[_0xd052('0x21')](respondWithResult(_0x81c02f,null))['catch'](handleError(_0x81c02f,null));};function writeFile(_0x173d4b,_0x1d799f){return new Promise(function(_0x4ff9a5,_0x5eb2b9){fs[_0xd052('0x8c')](_0x1d799f,_0x173d4b,function(_0x49024d,_0x3bd1d3){if(_0x49024d){return _0x5eb2b9(_0x49024d);}else{return _0x4ff9a5(_0x3bd1d3);}});});}exports[_0xd052('0x8d')]=function(_0x596183,_0x3af1b3,_0x158858){return db['VoiceRecording'][_0xd052('0x77')]({'where':{'id':_0x596183[_0xd052('0x44')]['id']}})['then'](handleEntityNotFound(_0x3af1b3))[_0xd052('0x21')](function(_0x3812c4){if(_0x3812c4&&_0x3812c4[_0xd052('0x8e')]){var _0x118e96=_0x3812c4[_0xd052('0x8e')];var _0x28989d=config[_0xd052('0x8f')]+_0xd052('0x90')+_0x3812c4['id']+_0xd052('0x91');if(fs['existsSync'](_0x28989d)){return _0x28989d;}return writeFile(_0x118e96,_0x28989d)[_0xd052('0x21')](function(){return _0x28989d;});}else{throw new db[(_0xd052('0x5f'))][(_0xd052('0x51'))](_0xd052('0x92'));}})[_0xd052('0x21')](function(_0xc53496){return _0x3af1b3[_0xd052('0x4b')](_0xc53496);})[_0xd052('0x42')](handleError(_0x3af1b3));};
\ No newline at end of file
index 83548fb..1d91885 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfaa4=['define','VoiceRecording','uniqueid','transcribeStatus','./voiceRecording.attributes','exports'];(function(_0x4b2672,_0x39f6ab){var _0x1bf5d7=function(_0x297edf){while(--_0x297edf){_0x4b2672['push'](_0x4b2672['shift']());}};_0x1bf5d7(++_0x39f6ab);}(_0xfaa4,0x1a8));var _0x4faa=function(_0x17e47b,_0x21abfe){_0x17e47b=_0x17e47b-0x0;var _0x978d5a=_0xfaa4[_0x17e47b];return _0x978d5a;};'use strict';var attributes=require(_0x4faa('0x0'));module[_0x4faa('0x1')]=function(_0x28b375,_0x39ba1a){return _0x28b375[_0x4faa('0x2')](_0x4faa('0x3'),attributes,{'tableName':'voice_recordings','paranoid':![],'indexes':[{'name':_0x4faa('0x4'),'fields':[_0x4faa('0x4')]},{'name':_0x4faa('0x5'),'fields':[_0x4faa('0x5')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x2137=['VoiceRecording','uniqueid','transcribeStatus','./voiceRecording.attributes','exports'];(function(_0x3ab51d,_0x2fa01d){var _0x29a04e=function(_0x7807b0){while(--_0x7807b0){_0x3ab51d['push'](_0x3ab51d['shift']());}};_0x29a04e(++_0x2fa01d);}(_0x2137,0x134));var _0x7213=function(_0x59ce68,_0x98d1b5){_0x59ce68=_0x59ce68-0x0;var _0x37c816=_0x2137[_0x59ce68];return _0x37c816;};'use strict';var attributes=require(_0x7213('0x0'));module[_0x7213('0x1')]=function(_0x23e0c8,_0x4d04cb){return _0x23e0c8['define'](_0x7213('0x2'),attributes,{'tableName':'voice_recordings','paranoid':![],'indexes':[{'name':_0x7213('0x3'),'fields':[_0x7213('0x3')]},{'name':_0x7213('0x4'),'fields':['transcribeStatus']}],'timestamps':!![]});};
\ No newline at end of file
index be8f1fc..c8ad46f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbff5=['catch','CreateVoiceRecording','Setting','findOne','create','callRecordingEncryption','existsSync','%s.cypher','encryptFile','value','secrets','recording','unlink','CreateVoiceRecording\x20file\x20encrypted','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','jayson/promise','client','http','request','VoiceRecording,\x20%s,\x20%s','request\x20sent','VoiceRecording,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','update','options','raw','where','attributes','then','UpdateVoiceRecording','debug'];(function(_0x5b50ae,_0x7da7e1){var _0x84eb56=function(_0xad6b38){while(--_0xad6b38){_0x5b50ae['push'](_0x5b50ae['shift']());}};_0x84eb56(++_0x7da7e1);}(_0xbff5,0x1bc));var _0x5bff=function(_0x291fb0,_0x577551){_0x291fb0=_0x291fb0-0x0;var _0x19e9f6=_0xbff5[_0x291fb0];return _0x19e9f6;};'use strict';var _=require(_0x5bff('0x0'));var util=require(_0x5bff('0x1'));var moment=require(_0x5bff('0x2'));var BPromise=require(_0x5bff('0x3'));var rs=require(_0x5bff('0x4'));var fs=require('fs');var Redis=require(_0x5bff('0x5'));var db=require(_0x5bff('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x5bff('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0x5bff('0x8'));var client=jayson[_0x5bff('0x9')][_0x5bff('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xa54c57,_0x43605a,_0xd4b9dc){return new BPromise(function(_0x1acb49,_0x139c99){return client[_0x5bff('0xb')](_0xa54c57,_0xd4b9dc)['then'](function(_0x20e26f){logger['info'](_0x5bff('0xc'),_0x43605a,_0x5bff('0xd'));logger['debug'](_0x5bff('0xe'),_0x43605a,'request\x20sent',JSON[_0x5bff('0xf')](_0x20e26f));if(_0x20e26f['error']){if(_0x20e26f[_0x5bff('0x10')][_0x5bff('0x11')]===0x1f4){logger['error'](_0x5bff('0xc'),_0x43605a,_0x20e26f['error'][_0x5bff('0x12')]);return _0x139c99(_0x20e26f[_0x5bff('0x10')]['message']);}logger[_0x5bff('0x10')](_0x5bff('0xc'),_0x43605a,_0x20e26f['error']['message']);return _0x1acb49(_0x20e26f[_0x5bff('0x10')][_0x5bff('0x12')]);}else{logger[_0x5bff('0x13')]('VoiceRecording,\x20%s,\x20%s',_0x43605a,_0x5bff('0xd'));_0x1acb49(_0x20e26f[_0x5bff('0x14')][_0x5bff('0x12')]);}})['catch'](function(_0x3ffbbc){logger[_0x5bff('0x10')](_0x5bff('0xc'),_0x43605a,_0x3ffbbc);_0x139c99(_0x3ffbbc);});});}exports['UpdateVoiceRecording']=function(_0xc9fbc3){var _0x279c22=this;return new Promise(function(_0x36653b,_0x32cf60){return db['VoiceRecording'][_0x5bff('0x15')](_0xc9fbc3['body'],{'raw':_0xc9fbc3[_0x5bff('0x16')]?_0xc9fbc3['options'][_0x5bff('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xc9fbc3[_0x5bff('0x16')]?_0xc9fbc3[_0x5bff('0x16')][_0x5bff('0x18')]||null:null,'attributes':_0xc9fbc3[_0x5bff('0x16')]?_0xc9fbc3[_0x5bff('0x16')][_0x5bff('0x19')]||null:null,'limit':_0xc9fbc3[_0x5bff('0x16')]?_0xc9fbc3[_0x5bff('0x16')]['limit']||null:null})[_0x5bff('0x1a')](function(_0x263cf5){logger[_0x5bff('0x13')](_0x5bff('0x1b'),_0xc9fbc3);logger[_0x5bff('0x1c')](_0x5bff('0x1b'),_0xc9fbc3,JSON[_0x5bff('0xf')](_0x263cf5));_0x36653b(_0x263cf5);})[_0x5bff('0x1d')](function(_0x5e2ae8){logger['error'](_0x5bff('0x1b'),_0x5e2ae8['message'],_0xc9fbc3);_0x32cf60(_0x279c22[_0x5bff('0x10')](0x1f4,_0x5e2ae8[_0x5bff('0x12')]));});});};exports[_0x5bff('0x1e')]=function(_0x6f18f1){var _0xfa361d=this;return new Promise(function(_0x1140eb,_0x271f3c){var _0xedba9d=require('../../components/encryptor');var _0x4df57a;return db[_0x5bff('0x1f')][_0x5bff('0x20')]({'attributes':['id','callRecordingEncryption'],'where':{'id':0x1},'raw':!![]})[_0x5bff('0x1a')](function(_0x588078){_0x4df57a=_0x588078;return db['VoiceRecording'][_0x5bff('0x21')](_0x6f18f1['body']);})[_0x5bff('0x1a')](function(_0x64e22){if(_0x4df57a[_0x5bff('0x22')]&&fs[_0x5bff('0x23')](_0x64e22['value'])){var _0x71783=util['format'](_0x5bff('0x24'),_0x64e22['value']);return _0xedba9d[_0x5bff('0x25')](_0x64e22[_0x5bff('0x26')],_0x71783,config[_0x5bff('0x27')][_0x5bff('0x28')])[_0x5bff('0x1a')](function(){fs[_0x5bff('0x29')](_0x64e22['value']);logger[_0x5bff('0x13')](_0x5bff('0x2a'));return _0x64e22;});}return _0x64e22;})[_0x5bff('0x1a')](function(_0x42fe4a){logger[_0x5bff('0x13')](_0x5bff('0x1e'),_0x6f18f1);logger[_0x5bff('0x1c')](_0x5bff('0x1e'),_0x6f18f1,JSON['stringify'](_0x42fe4a));_0x1140eb(_0x42fe4a);})[_0x5bff('0x1d')](function(_0x16042d){logger[_0x5bff('0x10')](_0x5bff('0x1e'),_0x16042d['message'],_0x6f18f1);_0x271f3c(_0xfa361d[_0x5bff('0x10')](0x1f4,_0x16042d[_0x5bff('0x12')]));});});};
\ No newline at end of file
+var _0x77e6=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','request','then','info','request\x20sent','debug','VoiceRecording,\x20%s,\x20%s,\x20%s','stringify','error','code','VoiceRecording,\x20%s,\x20%s','message','result','catch','VoiceRecording','update','options','raw','attributes','limit','UpdateVoiceRecording','../../components/encryptor','Setting','findOne','callRecordingEncryption','create','body','existsSync','value','format','%s.cypher','encryptFile','secrets','recording','unlink','CreateVoiceRecording\x20file\x20encrypted','CreateVoiceRecording','lodash'];(function(_0x173441,_0x26b0d9){var _0x2423a8=function(_0x4d96c2){while(--_0x4d96c2){_0x173441['push'](_0x173441['shift']());}};_0x2423a8(++_0x26b0d9);}(_0x77e6,0x1a6));var _0x677e=function(_0x733135,_0x433b1f){_0x733135=_0x733135-0x0;var _0x352277=_0x77e6[_0x733135];return _0x352277;};'use strict';var _=require(_0x677e('0x0'));var util=require(_0x677e('0x1'));var moment=require(_0x677e('0x2'));var BPromise=require(_0x677e('0x3'));var rs=require(_0x677e('0x4'));var fs=require('fs');var Redis=require(_0x677e('0x5'));var db=require(_0x677e('0x6'))['db'];var utils=require(_0x677e('0x7'));var logger=require('../../config/logger')(_0x677e('0x8'));var config=require(_0x677e('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x677e('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x40d314,_0x4d1a57,_0x5a5dd3){return new BPromise(function(_0x2eb40c,_0x4c519f){return client[_0x677e('0xb')](_0x40d314,_0x5a5dd3)[_0x677e('0xc')](function(_0x552931){logger[_0x677e('0xd')]('VoiceRecording,\x20%s,\x20%s',_0x4d1a57,_0x677e('0xe'));logger[_0x677e('0xf')](_0x677e('0x10'),_0x4d1a57,_0x677e('0xe'),JSON[_0x677e('0x11')](_0x552931));if(_0x552931[_0x677e('0x12')]){if(_0x552931[_0x677e('0x12')][_0x677e('0x13')]===0x1f4){logger[_0x677e('0x12')](_0x677e('0x14'),_0x4d1a57,_0x552931[_0x677e('0x12')][_0x677e('0x15')]);return _0x4c519f(_0x552931[_0x677e('0x12')][_0x677e('0x15')]);}logger['error']('VoiceRecording,\x20%s,\x20%s',_0x4d1a57,_0x552931['error'][_0x677e('0x15')]);return _0x2eb40c(_0x552931[_0x677e('0x12')][_0x677e('0x15')]);}else{logger[_0x677e('0xd')](_0x677e('0x14'),_0x4d1a57,_0x677e('0xe'));_0x2eb40c(_0x552931[_0x677e('0x16')][_0x677e('0x15')]);}})[_0x677e('0x17')](function(_0x32d306){logger[_0x677e('0x12')](_0x677e('0x14'),_0x4d1a57,_0x32d306);_0x4c519f(_0x32d306);});});}exports['UpdateVoiceRecording']=function(_0x1c5124){var _0x2ef2bf=this;return new Promise(function(_0x385b06,_0x221b6d){return db[_0x677e('0x18')][_0x677e('0x19')](_0x1c5124['body'],{'raw':_0x1c5124[_0x677e('0x1a')]?_0x1c5124['options'][_0x677e('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1c5124[_0x677e('0x1a')]?_0x1c5124[_0x677e('0x1a')]['where']||null:null,'attributes':_0x1c5124[_0x677e('0x1a')]?_0x1c5124[_0x677e('0x1a')][_0x677e('0x1c')]||null:null,'limit':_0x1c5124[_0x677e('0x1a')]?_0x1c5124[_0x677e('0x1a')][_0x677e('0x1d')]||null:null})[_0x677e('0xc')](function(_0x52ee8b){logger['info']('UpdateVoiceRecording',_0x1c5124);logger[_0x677e('0xf')](_0x677e('0x1e'),_0x1c5124,JSON[_0x677e('0x11')](_0x52ee8b));_0x385b06(_0x52ee8b);})[_0x677e('0x17')](function(_0x424e5d){logger[_0x677e('0x12')](_0x677e('0x1e'),_0x424e5d[_0x677e('0x15')],_0x1c5124);_0x221b6d(_0x2ef2bf[_0x677e('0x12')](0x1f4,_0x424e5d[_0x677e('0x15')]));});});};exports['CreateVoiceRecording']=function(_0x5f0ba2){var _0x3d3370=this;return new Promise(function(_0x184f68,_0x4d9e0b){var _0x51e39d=require(_0x677e('0x1f'));var _0xf6b3ad;return db[_0x677e('0x20')][_0x677e('0x21')]({'attributes':['id',_0x677e('0x22')],'where':{'id':0x1},'raw':!![]})['then'](function(_0xcd4646){_0xf6b3ad=_0xcd4646;return db[_0x677e('0x18')][_0x677e('0x23')](_0x5f0ba2[_0x677e('0x24')]);})[_0x677e('0xc')](function(_0x2bd6fb){if(_0xf6b3ad[_0x677e('0x22')]&&fs[_0x677e('0x25')](_0x2bd6fb[_0x677e('0x26')])){var _0x4c5113=util[_0x677e('0x27')](_0x677e('0x28'),_0x2bd6fb[_0x677e('0x26')]);return _0x51e39d[_0x677e('0x29')](_0x2bd6fb[_0x677e('0x26')],_0x4c5113,config[_0x677e('0x2a')][_0x677e('0x2b')])[_0x677e('0xc')](function(){fs[_0x677e('0x2c')](_0x2bd6fb[_0x677e('0x26')]);logger['info'](_0x677e('0x2d'));return _0x2bd6fb;});}return _0x2bd6fb;})[_0x677e('0xc')](function(_0x2b6f24){logger[_0x677e('0xd')](_0x677e('0x2e'),_0x5f0ba2);logger[_0x677e('0xf')]('CreateVoiceRecording',_0x5f0ba2,JSON[_0x677e('0x11')](_0x2b6f24));_0x184f68(_0x2b6f24);})[_0x677e('0x17')](function(_0x2d0bc0){logger['error'](_0x677e('0x2e'),_0x2d0bc0[_0x677e('0x15')],_0x5f0ba2);_0x4d9e0b(_0x3d3370[_0x677e('0x12')](0x1f4,_0x2d0bc0[_0x677e('0x15')]));});});};
\ No newline at end of file
index e95f369..8585226 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x54fd=['isAuthenticated','post','create','put','/:id','delete','destroy','exports','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/describe'];(function(_0x1c309c,_0x5d8058){var _0x504e71=function(_0x45b7e8){while(--_0x45b7e8){_0x1c309c['push'](_0x1c309c['shift']());}};_0x504e71(++_0x5d8058);}(_0x54fd,0xd9));var _0xd54f=function(_0x3bf81f,_0x5703ec){_0x3bf81f=_0x3bf81f-0x0;var _0x373554=_0x54fd[_0x3bf81f];return _0x373554;};'use strict';var multer=require('multer');var util=require(_0xd54f('0x0'));var path=require(_0xd54f('0x1'));var timeout=require(_0xd54f('0x2'));var express=require('express');var router=express[_0xd54f('0x3')]();var fs_extra=require(_0xd54f('0x4'));var auth=require(_0xd54f('0x5'));var interaction=require(_0xd54f('0x6'));var config=require(_0xd54f('0x7'));var controller=require('./voiceTransferReport.controller');router[_0xd54f('0x8')]('/',auth['isAuthenticated'](),controller[_0xd54f('0x9')]);router[_0xd54f('0x8')](_0xd54f('0xa'),auth[_0xd54f('0xb')](),controller['describe']);router[_0xd54f('0x8')]('/:id',auth[_0xd54f('0xb')](),controller['show']);router[_0xd54f('0xc')]('/',auth[_0xd54f('0xb')](),controller[_0xd54f('0xd')]);router[_0xd54f('0xe')](_0xd54f('0xf'),auth[_0xd54f('0xb')](),controller['update']);router[_0xd54f('0x10')](_0xd54f('0xf'),auth[_0xd54f('0xb')](),controller[_0xd54f('0x11')]);module[_0xd54f('0x12')]=router;
\ No newline at end of file
+var _0x8b68=['destroy','exports','path','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceTransferReport.controller','isAuthenticated','get','/:id','create','put','update'];(function(_0x14be10,_0xd28b15){var _0xbb393c=function(_0x4691be){while(--_0x4691be){_0x14be10['push'](_0x14be10['shift']());}};_0xbb393c(++_0xd28b15);}(_0x8b68,0x1b5));var _0x88b6=function(_0x1e52aa,_0x5b2829){_0x1e52aa=_0x1e52aa-0x0;var _0x50a76a=_0x8b68[_0x1e52aa];return _0x50a76a;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x88b6('0x0'));var timeout=require('connect-timeout');var express=require(_0x88b6('0x1'));var router=express['Router']();var fs_extra=require(_0x88b6('0x2'));var auth=require(_0x88b6('0x3'));var interaction=require(_0x88b6('0x4'));var config=require(_0x88b6('0x5'));var controller=require(_0x88b6('0x6'));router['get']('/',auth[_0x88b6('0x7')](),controller['index']);router[_0x88b6('0x8')]('/describe',auth[_0x88b6('0x7')](),controller['describe']);router[_0x88b6('0x8')](_0x88b6('0x9'),auth[_0x88b6('0x7')](),controller['show']);router['post']('/',auth[_0x88b6('0x7')](),controller[_0x88b6('0xa')]);router[_0x88b6('0xb')](_0x88b6('0x9'),auth['isAuthenticated'](),controller[_0x88b6('0xc')]);router['delete'](_0x88b6('0x9'),auth[_0x88b6('0x7')](),controller[_0x88b6('0xd')]);module[_0x88b6('0xe')]=router;
\ No newline at end of file
index 01b4bb5..d8f2597 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd982=['attended','STRING','sequelize','moment','exports','ENUM'];(function(_0x5c0dcb,_0x16cd83){var _0x183a0e=function(_0xfb292d){while(--_0xfb292d){_0x5c0dcb['push'](_0x5c0dcb['shift']());}};_0x183a0e(++_0x16cd83);}(_0xd982,0xce));var _0x2d98=function(_0x406582,_0x1afa9e){_0x406582=_0x406582-0x0;var _0x22cd64=_0xd982[_0x406582];return _0x22cd64;};'use strict';var Sequelize=require(_0x2d98('0x0'));var moment=require(_0x2d98('0x1'));module[_0x2d98('0x2')]={'type':{'type':Sequelize[_0x2d98('0x3')]('blind',_0x2d98('0x4'))},'result':{'type':Sequelize['STRING']},'transfererchannel':{'type':Sequelize[_0x2d98('0x5')]},'transferercalleridnum':{'type':Sequelize[_0x2d98('0x5')]},'transferercalleridname':{'type':Sequelize[_0x2d98('0x5')]},'transfererconnectedlinenum':{'type':Sequelize[_0x2d98('0x5')]},'transfererconnectedlinename':{'type':Sequelize['STRING']},'transfereraccountcode':{'type':Sequelize['STRING']},'transferercontext':{'type':Sequelize[_0x2d98('0x5')]},'transfererexten':{'type':Sequelize[_0x2d98('0x5')]},'transfererlinkedid':{'type':Sequelize[_0x2d98('0x5')]},'transfereechannel':{'type':Sequelize[_0x2d98('0x5')]},'transfereecalleridnum':{'type':Sequelize[_0x2d98('0x5')]},'transfereecalleridname':{'type':Sequelize[_0x2d98('0x5')]},'transfereeconnectedlinenum':{'type':Sequelize[_0x2d98('0x5')]},'transfereeconnectedlinename':{'type':Sequelize[_0x2d98('0x5')]},'transfereeaccountcode':{'type':Sequelize[_0x2d98('0x5')]},'transfereecontext':{'type':Sequelize[_0x2d98('0x5')]},'transfereeexten':{'type':Sequelize[_0x2d98('0x5')]},'transfereelinkedid':{'type':Sequelize[_0x2d98('0x5')]},'isexternal':{'type':Sequelize[_0x2d98('0x3')]('Yes','No')},'context':{'type':Sequelize[_0x2d98('0x5')]},'extension':{'type':Sequelize[_0x2d98('0x5')]}};
\ No newline at end of file
+var _0x37b2=['ENUM','attended','STRING','Yes','sequelize','exports'];(function(_0x2bba9a,_0x2baa5c){var _0x2cd8df=function(_0x5ee111){while(--_0x5ee111){_0x2bba9a['push'](_0x2bba9a['shift']());}};_0x2cd8df(++_0x2baa5c);}(_0x37b2,0x166));var _0x237b=function(_0x2ac3dd,_0x3bc187){_0x2ac3dd=_0x2ac3dd-0x0;var _0x487a05=_0x37b2[_0x2ac3dd];return _0x487a05;};'use strict';var Sequelize=require(_0x237b('0x0'));var moment=require('moment');module[_0x237b('0x1')]={'type':{'type':Sequelize[_0x237b('0x2')]('blind',_0x237b('0x3'))},'result':{'type':Sequelize[_0x237b('0x4')]},'transfererchannel':{'type':Sequelize[_0x237b('0x4')]},'transferercalleridnum':{'type':Sequelize[_0x237b('0x4')]},'transferercalleridname':{'type':Sequelize[_0x237b('0x4')]},'transfererconnectedlinenum':{'type':Sequelize[_0x237b('0x4')]},'transfererconnectedlinename':{'type':Sequelize[_0x237b('0x4')]},'transfereraccountcode':{'type':Sequelize[_0x237b('0x4')]},'transferercontext':{'type':Sequelize[_0x237b('0x4')]},'transfererexten':{'type':Sequelize['STRING']},'transfererlinkedid':{'type':Sequelize[_0x237b('0x4')]},'transfereechannel':{'type':Sequelize[_0x237b('0x4')]},'transfereecalleridnum':{'type':Sequelize[_0x237b('0x4')]},'transfereecalleridname':{'type':Sequelize['STRING']},'transfereeconnectedlinenum':{'type':Sequelize[_0x237b('0x4')]},'transfereeconnectedlinename':{'type':Sequelize[_0x237b('0x4')]},'transfereeaccountcode':{'type':Sequelize[_0x237b('0x4')]},'transfereecontext':{'type':Sequelize[_0x237b('0x4')]},'transfereeexten':{'type':Sequelize['STRING']},'transfereelinkedid':{'type':Sequelize['STRING']},'isexternal':{'type':Sequelize[_0x237b('0x2')](_0x237b('0x5'),'No')},'context':{'type':Sequelize['STRING']},'extension':{'type':Sequelize[_0x237b('0x4')]}};
\ No newline at end of file
index 8c2437c..4aa6341 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9f4e=['body','find','describe','eml-format','zip-dir','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','reject','update','then','destroy','error','name','send','map','VoiceTransferReport','fieldName','type','model','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','sort','where','filters','merge','VIRTUAL','filter','includeAll','include','rows','catch','show','params','rawAttributes','length','options','create'];(function(_0x494965,_0x48ace5){var _0x3e682e=function(_0x463373){while(--_0x463373){_0x494965['push'](_0x494965['shift']());}};_0x3e682e(++_0x48ace5);}(_0x9f4e,0x91));var _0xe9f4=function(_0xae7c2f,_0xf31e04){_0xae7c2f=_0xae7c2f-0x0;var _0x5d7001=_0x9f4e[_0xae7c2f];return _0x5d7001;};'use strict';var emlformat=require(_0xe9f4('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xe9f4('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe9f4('0x2'));var moment=require(_0xe9f4('0x3'));var BPromise=require(_0xe9f4('0x4'));var Mustache=require(_0xe9f4('0x5'));var util=require(_0xe9f4('0x6'));var path=require(_0xe9f4('0x7'));var sox=require('sox');var csv=require(_0xe9f4('0x8'));var ejs=require(_0xe9f4('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xe9f4('0xa'));var squel=require(_0xe9f4('0xb'));var crypto=require('crypto');var jsforce=require(_0xe9f4('0xc'));var deskjs=require(_0xe9f4('0xd'));var toCsv=require(_0xe9f4('0x8'));var querystring=require('querystring');var Papa=require(_0xe9f4('0xe'));var Redis=require(_0xe9f4('0xf'));var authService=require(_0xe9f4('0x10'));var qs=require(_0xe9f4('0x11'));var as=require(_0xe9f4('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xe9f4('0x13'))(_0xe9f4('0x14'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xe9f4('0x15'));var db=require(_0xe9f4('0x16'))['db'];function respondWithStatusCode(_0x2ee461,_0x44c160){_0x44c160=_0x44c160||0xcc;return function(_0x5b114b){if(_0x5b114b){return _0x2ee461[_0xe9f4('0x17')](_0x44c160);}return _0x2ee461[_0xe9f4('0x18')](_0x44c160)[_0xe9f4('0x19')]();};}function respondWithResult(_0x3c2ed4,_0x48f40c){_0x48f40c=_0x48f40c||0xc8;return function(_0x14e4a1){if(_0x14e4a1){return _0x3c2ed4[_0xe9f4('0x18')](_0x48f40c)[_0xe9f4('0x1a')](_0x14e4a1);}};}function respondWithFilteredResult(_0x55cb17,_0x2a0abd){return function(_0x11bdc6){if(_0x11bdc6){var _0x92b14d=typeof _0x2a0abd[_0xe9f4('0x1b')]===_0xe9f4('0x1c')&&typeof _0x2a0abd[_0xe9f4('0x1d')]===_0xe9f4('0x1c');var _0x29a3c5=_0x11bdc6[_0xe9f4('0x1e')];var _0x2a16cb=_0x92b14d?0x0:_0x2a0abd['offset'];var _0x141e00=_0x92b14d?_0x11bdc6[_0xe9f4('0x1e')]:_0x2a0abd[_0xe9f4('0x1b')]+_0x2a0abd[_0xe9f4('0x1d')];var _0xf3e9f2;if(_0x141e00>=_0x29a3c5){_0x141e00=_0x29a3c5;_0xf3e9f2=0xc8;}else{_0xf3e9f2=0xce;}_0x55cb17[_0xe9f4('0x18')](_0xf3e9f2);return _0x55cb17[_0xe9f4('0x1f')](_0xe9f4('0x20'),_0x2a16cb+'-'+_0x141e00+'/'+_0x29a3c5)[_0xe9f4('0x1a')](_0x11bdc6);}return null;};}function patchUpdates(_0x774f74){return function(_0x20f29d){try{jsonpatch['apply'](_0x20f29d,_0x774f74,!![]);}catch(_0x44b8da){return BPromise[_0xe9f4('0x21')](_0x44b8da);}return _0x20f29d['save']();};}function saveUpdates(_0x2ad646,_0x30131a){return function(_0x15eea2){if(_0x15eea2){return _0x15eea2[_0xe9f4('0x22')](_0x2ad646)[_0xe9f4('0x23')](function(_0x1fd635){return _0x1fd635;});}return null;};}function removeEntity(_0x175562,_0x1bc1de){return function(_0x41da7d){if(_0x41da7d){return _0x41da7d[_0xe9f4('0x24')]()[_0xe9f4('0x23')](function(){_0x175562[_0xe9f4('0x18')](0xcc)[_0xe9f4('0x19')]();});}};}function handleEntityNotFound(_0x54acb7,_0x379f00){return function(_0x2e7afe){if(!_0x2e7afe){_0x54acb7[_0xe9f4('0x17')](0x194);}return _0x2e7afe;};}function handleError(_0x3df55c,_0x36b60a){_0x36b60a=_0x36b60a||0x1f4;return function(_0xf1953c){logger[_0xe9f4('0x25')](_0xf1953c['stack']);if(_0xf1953c[_0xe9f4('0x26')]){delete _0xf1953c[_0xe9f4('0x26')];}_0x3df55c['status'](_0x36b60a)[_0xe9f4('0x27')](_0xf1953c);};}exports['index']=function(_0x443c23,_0x3842bb){var _0x528ddd={},_0x2199f5={},_0x3c3a03={'count':0x0,'rows':[]};var _0x1706f9=_[_0xe9f4('0x28')](db[_0xe9f4('0x29')]['rawAttributes'],function(_0x2b6c91){return{'name':_0x2b6c91[_0xe9f4('0x2a')],'type':_0x2b6c91[_0xe9f4('0x2b')]['key']};});_0x2199f5[_0xe9f4('0x2c')]=_['map'](_0x1706f9,_0xe9f4('0x26'));_0x2199f5[_0xe9f4('0x2d')]=_[_0xe9f4('0x2e')](_0x443c23[_0xe9f4('0x2d')]);_0x2199f5['filters']=_[_0xe9f4('0x2f')](_0x2199f5[_0xe9f4('0x2c')],_0x2199f5[_0xe9f4('0x2d')]);_0x528ddd[_0xe9f4('0x30')]=_[_0xe9f4('0x2f')](_0x2199f5[_0xe9f4('0x2c')],qs[_0xe9f4('0x31')](_0x443c23[_0xe9f4('0x2d')][_0xe9f4('0x31')]));_0x528ddd['attributes']=_0x528ddd[_0xe9f4('0x30')]['length']?_0x528ddd[_0xe9f4('0x30')]:_0x2199f5[_0xe9f4('0x2c')];if(!_0x443c23[_0xe9f4('0x2d')][_0xe9f4('0x32')](_0xe9f4('0x33'))){_0x528ddd[_0xe9f4('0x1d')]=qs[_0xe9f4('0x1d')](_0x443c23[_0xe9f4('0x2d')][_0xe9f4('0x1d')]);_0x528ddd['offset']=qs[_0xe9f4('0x1b')](_0x443c23[_0xe9f4('0x2d')]['offset']);}_0x528ddd['order']=qs['sort'](_0x443c23['query'][_0xe9f4('0x34')]);_0x528ddd[_0xe9f4('0x35')]=qs[_0xe9f4('0x36')](_['pick'](_0x443c23[_0xe9f4('0x2d')],_0x2199f5['filters']),_0x1706f9);if(_0x443c23[_0xe9f4('0x2d')]['filter']){_0x528ddd[_0xe9f4('0x35')]=_[_0xe9f4('0x37')](_0x528ddd[_0xe9f4('0x35')],{'$or':_[_0xe9f4('0x28')](_0x1706f9,function(_0x568517){if(_0x568517[_0xe9f4('0x2b')]!==_0xe9f4('0x38')){var _0x45c9cf={};_0x45c9cf[_0x568517[_0xe9f4('0x26')]]={'$like':'%'+_0x443c23[_0xe9f4('0x2d')][_0xe9f4('0x39')]+'%'};return _0x45c9cf;}})});}_0x528ddd=_[_0xe9f4('0x37')]({},_0x528ddd,_0x443c23['options']);var _0xb8faba={'where':_0x528ddd[_0xe9f4('0x35')]};return db['VoiceTransferReport'][_0xe9f4('0x1e')](_0xb8faba)[_0xe9f4('0x23')](function(_0x35faba){_0x3c3a03[_0xe9f4('0x1e')]=_0x35faba;if(_0x443c23['query'][_0xe9f4('0x3a')]){_0x528ddd[_0xe9f4('0x3b')]=[{'all':!![]}];}return db[_0xe9f4('0x29')]['findAll'](_0x528ddd);})[_0xe9f4('0x23')](function(_0x2b0319){_0x3c3a03[_0xe9f4('0x3c')]=_0x2b0319;return _0x3c3a03;})[_0xe9f4('0x23')](respondWithFilteredResult(_0x3842bb,_0x528ddd))[_0xe9f4('0x3d')](handleError(_0x3842bb,null));};exports[_0xe9f4('0x3e')]=function(_0x2bbc03,_0x920a95){var _0x5c1be4={'raw':!![],'where':{'id':_0x2bbc03[_0xe9f4('0x3f')]['id']}},_0x4472d0={};_0x4472d0['model']=_[_0xe9f4('0x2e')](db[_0xe9f4('0x29')][_0xe9f4('0x40')]);_0x4472d0[_0xe9f4('0x2d')]=_[_0xe9f4('0x2e')](_0x2bbc03[_0xe9f4('0x2d')]);_0x4472d0[_0xe9f4('0x36')]=_['intersection'](_0x4472d0[_0xe9f4('0x2c')],_0x4472d0['query']);_0x5c1be4['attributes']=_[_0xe9f4('0x2f')](_0x4472d0[_0xe9f4('0x2c')],qs[_0xe9f4('0x31')](_0x2bbc03[_0xe9f4('0x2d')][_0xe9f4('0x31')]));_0x5c1be4['attributes']=_0x5c1be4['attributes'][_0xe9f4('0x41')]?_0x5c1be4[_0xe9f4('0x30')]:_0x4472d0[_0xe9f4('0x2c')];if(_0x2bbc03['query']['includeAll']){_0x5c1be4['include']=[{'all':!![]}];}_0x5c1be4=_[_0xe9f4('0x37')]({},_0x5c1be4,_0x2bbc03[_0xe9f4('0x42')]);return db[_0xe9f4('0x29')]['find'](_0x5c1be4)[_0xe9f4('0x23')](handleEntityNotFound(_0x920a95,null))[_0xe9f4('0x23')](respondWithResult(_0x920a95,null))[_0xe9f4('0x3d')](handleError(_0x920a95,null));};exports['create']=function(_0x2fa599,_0x585350){return db[_0xe9f4('0x29')][_0xe9f4('0x43')](_0x2fa599[_0xe9f4('0x44')],{})['then'](respondWithResult(_0x585350,0xc9))[_0xe9f4('0x3d')](handleError(_0x585350,null));};exports['update']=function(_0x1a39d1,_0x1c524d){if(_0x1a39d1[_0xe9f4('0x44')]['id']){delete _0x1a39d1[_0xe9f4('0x44')]['id'];}return db[_0xe9f4('0x29')][_0xe9f4('0x45')]({'where':{'id':_0x1a39d1['params']['id']}})[_0xe9f4('0x23')](handleEntityNotFound(_0x1c524d,null))[_0xe9f4('0x23')](saveUpdates(_0x1a39d1[_0xe9f4('0x44')],null))[_0xe9f4('0x23')](respondWithResult(_0x1c524d,null))[_0xe9f4('0x3d')](handleError(_0x1c524d,null));};exports[_0xe9f4('0x24')]=function(_0x40641d,_0x7c7471){return db[_0xe9f4('0x29')]['find']({'where':{'id':_0x40641d[_0xe9f4('0x3f')]['id']}})[_0xe9f4('0x23')](handleEntityNotFound(_0x7c7471,null))[_0xe9f4('0x23')](removeEntity(_0x7c7471,null))[_0xe9f4('0x3d')](handleError(_0x7c7471,null));};exports['describe']=function(_0xf6bca9,_0x540cfc){return db[_0xe9f4('0x29')][_0xe9f4('0x46')]()[_0xe9f4('0x23')](respondWithResult(_0x540cfc,null))[_0xe9f4('0x3d')](handleError(_0x540cfc,null));};
\ No newline at end of file
+var _0x49d6=['index','map','VoiceTransferReport','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','includeAll','include','then','rows','catch','find','create','body','update','params','describe','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','sendStatus','end','status','undefined','limit','offset','count','Content-Range','apply','reject','error','stack','name'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0x49d6,0x69));var _0x649d=function(_0x17c140,_0x66f2af){_0x17c140=_0x17c140-0x0;var _0x57598e=_0x49d6[_0x17c140];return _0x57598e;};'use strict';var emlformat=require(_0x649d('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x649d('0x1'));var jsonpatch=require(_0x649d('0x2'));var rp=require('request-promise');var moment=require(_0x649d('0x3'));var BPromise=require(_0x649d('0x4'));var Mustache=require(_0x649d('0x5'));var util=require(_0x649d('0x6'));var path=require(_0x649d('0x7'));var sox=require(_0x649d('0x8'));var csv=require(_0x649d('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require('squel');var crypto=require(_0x649d('0xa'));var jsforce=require(_0x649d('0xb'));var deskjs=require(_0x649d('0xc'));var toCsv=require(_0x649d('0x9'));var querystring=require(_0x649d('0xd'));var Papa=require(_0x649d('0xe'));var Redis=require(_0x649d('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x649d('0x10'));var as=require(_0x649d('0x11'));var hardwareService=require(_0x649d('0x12'));var logger=require('../../config/logger')(_0x649d('0x13'));var utils=require('../../config/utils');var config=require(_0x649d('0x14'));var licenseUtil=require(_0x649d('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2cc34d,_0xba24ff){_0xba24ff=_0xba24ff||0xcc;return function(_0x3a0570){if(_0x3a0570){return _0x2cc34d[_0x649d('0x16')](_0xba24ff);}return _0x2cc34d['status'](_0xba24ff)[_0x649d('0x17')]();};}function respondWithResult(_0x37829e,_0x2591b8){_0x2591b8=_0x2591b8||0xc8;return function(_0x121aac){if(_0x121aac){return _0x37829e[_0x649d('0x18')](_0x2591b8)['json'](_0x121aac);}};}function respondWithFilteredResult(_0x181244,_0x23e437){return function(_0x532039){if(_0x532039){var _0x54dbda=typeof _0x23e437['offset']===_0x649d('0x19')&&typeof _0x23e437[_0x649d('0x1a')]===_0x649d('0x19');var _0x10c88b=_0x532039['count'];var _0x4affb7=_0x54dbda?0x0:_0x23e437[_0x649d('0x1b')];var _0xd7e4c8=_0x54dbda?_0x532039[_0x649d('0x1c')]:_0x23e437['offset']+_0x23e437['limit'];var _0x1c5829;if(_0xd7e4c8>=_0x10c88b){_0xd7e4c8=_0x10c88b;_0x1c5829=0xc8;}else{_0x1c5829=0xce;}_0x181244[_0x649d('0x18')](_0x1c5829);return _0x181244['set'](_0x649d('0x1d'),_0x4affb7+'-'+_0xd7e4c8+'/'+_0x10c88b)['json'](_0x532039);}return null;};}function patchUpdates(_0x390c81){return function(_0x244032){try{jsonpatch[_0x649d('0x1e')](_0x244032,_0x390c81,!![]);}catch(_0x5a475e){return BPromise[_0x649d('0x1f')](_0x5a475e);}return _0x244032['save']();};}function saveUpdates(_0x143db7,_0x250538){return function(_0x22ee4b){if(_0x22ee4b){return _0x22ee4b['update'](_0x143db7)['then'](function(_0x25e884){return _0x25e884;});}return null;};}function removeEntity(_0x24d16f,_0x4273a0){return function(_0x5274b9){if(_0x5274b9){return _0x5274b9['destroy']()['then'](function(){_0x24d16f[_0x649d('0x18')](0xcc)[_0x649d('0x17')]();});}};}function handleEntityNotFound(_0x5900c4,_0x86a717){return function(_0x2286a3){if(!_0x2286a3){_0x5900c4[_0x649d('0x16')](0x194);}return _0x2286a3;};}function handleError(_0x2022af,_0x4e03b7){_0x4e03b7=_0x4e03b7||0x1f4;return function(_0x1c110e){logger[_0x649d('0x20')](_0x1c110e[_0x649d('0x21')]);if(_0x1c110e[_0x649d('0x22')]){delete _0x1c110e[_0x649d('0x22')];}_0x2022af[_0x649d('0x18')](_0x4e03b7)['send'](_0x1c110e);};}exports[_0x649d('0x23')]=function(_0x47dcf8,_0x504543){var _0x27b63f={},_0x153fc0={},_0x10fd32={'count':0x0,'rows':[]};var _0x116fb9=_[_0x649d('0x24')](db[_0x649d('0x25')][_0x649d('0x26')],function(_0x5146df){return{'name':_0x5146df[_0x649d('0x27')],'type':_0x5146df[_0x649d('0x28')][_0x649d('0x29')]};});_0x153fc0[_0x649d('0x2a')]=_[_0x649d('0x24')](_0x116fb9,'name');_0x153fc0[_0x649d('0x2b')]=_[_0x649d('0x2c')](_0x47dcf8[_0x649d('0x2b')]);_0x153fc0[_0x649d('0x2d')]=_[_0x649d('0x2e')](_0x153fc0[_0x649d('0x2a')],_0x153fc0[_0x649d('0x2b')]);_0x27b63f['attributes']=_[_0x649d('0x2e')](_0x153fc0[_0x649d('0x2a')],qs[_0x649d('0x2f')](_0x47dcf8[_0x649d('0x2b')][_0x649d('0x2f')]));_0x27b63f['attributes']=_0x27b63f[_0x649d('0x30')][_0x649d('0x31')]?_0x27b63f['attributes']:_0x153fc0[_0x649d('0x2a')];if(!_0x47dcf8[_0x649d('0x2b')][_0x649d('0x32')](_0x649d('0x33'))){_0x27b63f['limit']=qs[_0x649d('0x1a')](_0x47dcf8[_0x649d('0x2b')][_0x649d('0x1a')]);_0x27b63f['offset']=qs[_0x649d('0x1b')](_0x47dcf8[_0x649d('0x2b')][_0x649d('0x1b')]);}_0x27b63f[_0x649d('0x34')]=qs['sort'](_0x47dcf8[_0x649d('0x2b')][_0x649d('0x35')]);_0x27b63f[_0x649d('0x36')]=qs[_0x649d('0x2d')](_['pick'](_0x47dcf8[_0x649d('0x2b')],_0x153fc0[_0x649d('0x2d')]),_0x116fb9);if(_0x47dcf8[_0x649d('0x2b')][_0x649d('0x37')]){_0x27b63f['where']=_[_0x649d('0x38')](_0x27b63f['where'],{'$or':_[_0x649d('0x24')](_0x116fb9,function(_0x209e0f){if(_0x209e0f[_0x649d('0x28')]!==_0x649d('0x39')){var _0x6c0dbf={};_0x6c0dbf[_0x209e0f[_0x649d('0x22')]]={'$like':'%'+_0x47dcf8[_0x649d('0x2b')]['filter']+'%'};return _0x6c0dbf;}})});}_0x27b63f=_[_0x649d('0x38')]({},_0x27b63f,_0x47dcf8[_0x649d('0x3a')]);var _0x5923ff={'where':_0x27b63f['where']};return db[_0x649d('0x25')][_0x649d('0x1c')](_0x5923ff)['then'](function(_0x398b31){_0x10fd32[_0x649d('0x1c')]=_0x398b31;if(_0x47dcf8['query'][_0x649d('0x3b')]){_0x27b63f[_0x649d('0x3c')]=[{'all':!![]}];}return db[_0x649d('0x25')]['findAll'](_0x27b63f);})[_0x649d('0x3d')](function(_0x55776f){_0x10fd32[_0x649d('0x3e')]=_0x55776f;return _0x10fd32;})[_0x649d('0x3d')](respondWithFilteredResult(_0x504543,_0x27b63f))[_0x649d('0x3f')](handleError(_0x504543,null));};exports['show']=function(_0x140b9a,_0x5e3dca){var _0x55f2fa={'raw':!![],'where':{'id':_0x140b9a['params']['id']}},_0x10793f={};_0x10793f[_0x649d('0x2a')]=_[_0x649d('0x2c')](db[_0x649d('0x25')][_0x649d('0x26')]);_0x10793f[_0x649d('0x2b')]=_[_0x649d('0x2c')](_0x140b9a[_0x649d('0x2b')]);_0x10793f[_0x649d('0x2d')]=_['intersection'](_0x10793f['model'],_0x10793f['query']);_0x55f2fa['attributes']=_[_0x649d('0x2e')](_0x10793f['model'],qs[_0x649d('0x2f')](_0x140b9a[_0x649d('0x2b')][_0x649d('0x2f')]));_0x55f2fa[_0x649d('0x30')]=_0x55f2fa[_0x649d('0x30')]['length']?_0x55f2fa[_0x649d('0x30')]:_0x10793f[_0x649d('0x2a')];if(_0x140b9a[_0x649d('0x2b')][_0x649d('0x3b')]){_0x55f2fa['include']=[{'all':!![]}];}_0x55f2fa=_['merge']({},_0x55f2fa,_0x140b9a['options']);return db['VoiceTransferReport'][_0x649d('0x40')](_0x55f2fa)[_0x649d('0x3d')](handleEntityNotFound(_0x5e3dca,null))[_0x649d('0x3d')](respondWithResult(_0x5e3dca,null))[_0x649d('0x3f')](handleError(_0x5e3dca,null));};exports[_0x649d('0x41')]=function(_0x57d0b7,_0x2dd9af){return db[_0x649d('0x25')][_0x649d('0x41')](_0x57d0b7[_0x649d('0x42')],{})['then'](respondWithResult(_0x2dd9af,0xc9))[_0x649d('0x3f')](handleError(_0x2dd9af,null));};exports[_0x649d('0x43')]=function(_0x34c44f,_0x449e4d){if(_0x34c44f['body']['id']){delete _0x34c44f['body']['id'];}return db['VoiceTransferReport']['find']({'where':{'id':_0x34c44f[_0x649d('0x44')]['id']}})[_0x649d('0x3d')](handleEntityNotFound(_0x449e4d,null))[_0x649d('0x3d')](saveUpdates(_0x34c44f[_0x649d('0x42')],null))[_0x649d('0x3d')](respondWithResult(_0x449e4d,null))[_0x649d('0x3f')](handleError(_0x449e4d,null));};exports['destroy']=function(_0x1970bc,_0x2d44b3){return db[_0x649d('0x25')][_0x649d('0x40')]({'where':{'id':_0x1970bc['params']['id']}})[_0x649d('0x3d')](handleEntityNotFound(_0x2d44b3,null))[_0x649d('0x3d')](removeEntity(_0x2d44b3,null))[_0x649d('0x3f')](handleError(_0x2d44b3,null));};exports[_0x649d('0x45')]=function(_0x459548,_0xb0f34){return db['VoiceTransferReport'][_0x649d('0x45')]()['then'](respondWithResult(_0xb0f34,null))[_0x649d('0x3f')](handleError(_0xb0f34,null));};
\ No newline at end of file
index 247ae6c..5568d6b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7f4a=['path','rimraf','../../config/environment','exports','define','VoiceTransferReport','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x4ff09b,_0x53f67d){var _0x3f5c2e=function(_0x124592){while(--_0x124592){_0x4ff09b['push'](_0x4ff09b['shift']());}};_0x3f5c2e(++_0x53f67d);}(_0x7f4a,0x7b));var _0xa7f4=function(_0x1c14ae,_0x25ecce){_0x1c14ae=_0x1c14ae-0x0;var _0x24c7cf=_0x7f4a[_0x1c14ae];return _0x24c7cf;};'use strict';var _=require(_0xa7f4('0x0'));var util=require(_0xa7f4('0x1'));var logger=require(_0xa7f4('0x2'))(_0xa7f4('0x3'));var moment=require(_0xa7f4('0x4'));var BPromise=require(_0xa7f4('0x5'));var rp=require(_0xa7f4('0x6'));var fs=require('fs');var path=require(_0xa7f4('0x7'));var rimraf=require(_0xa7f4('0x8'));var config=require(_0xa7f4('0x9'));var attributes=require('./voiceTransferReport.attributes');module[_0xa7f4('0xa')]=function(_0x103074,_0x34cf88){return _0x103074[_0xa7f4('0xb')](_0xa7f4('0xc'),attributes,{'tableName':'report_call_transfer','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xbac0=['rimraf','../../config/environment','./voiceTransferReport.attributes','exports','VoiceTransferReport','report_call_transfer','lodash','../../config/logger','moment','bluebird','request-promise','path'];(function(_0x4bcf38,_0x3c12be){var _0x4a89be=function(_0x3215a6){while(--_0x3215a6){_0x4bcf38['push'](_0x4bcf38['shift']());}};_0x4a89be(++_0x3c12be);}(_0xbac0,0x126));var _0x0bac=function(_0x289874,_0x1b6752){_0x289874=_0x289874-0x0;var _0x2f8bbb=_0xbac0[_0x289874];return _0x2f8bbb;};'use strict';var _=require(_0x0bac('0x0'));var util=require('util');var logger=require(_0x0bac('0x1'))('api');var moment=require(_0x0bac('0x2'));var BPromise=require(_0x0bac('0x3'));var rp=require(_0x0bac('0x4'));var fs=require('fs');var path=require(_0x0bac('0x5'));var rimraf=require(_0x0bac('0x6'));var config=require(_0x0bac('0x7'));var attributes=require(_0x0bac('0x8'));module[_0x0bac('0x9')]=function(_0x4f011d,_0x3795a4){return _0x4f011d['define'](_0x0bac('0xa'),attributes,{'tableName':_0x0bac('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index c99bf6d..218fbe9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5377=['then','VoiceTransferReport,\x20%s,\x20%s','VoiceTransferReport,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','catch','CreateVoiceTransferReport','VoiceTransferReport','create','body','options','raw','info','debug','stringify','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','request'];(function(_0x32bd5,_0x4fcab6){var _0x3f4a6f=function(_0x2b75b5){while(--_0x2b75b5){_0x32bd5['push'](_0x32bd5['shift']());}};_0x3f4a6f(++_0x4fcab6);}(_0x5377,0x115));var _0x7537=function(_0x59d55e,_0x50e2ef){_0x59d55e=_0x59d55e-0x0;var _0x31eb62=_0x5377[_0x59d55e];return _0x31eb62;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x7537('0x0'));var BPromise=require(_0x7537('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7537('0x2'));var db=require(_0x7537('0x3'))['db'];var utils=require(_0x7537('0x4'));var logger=require(_0x7537('0x5'))('rpc');var config=require(_0x7537('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x7537('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0xf8bf2c,_0x5b815a,_0x3abc7e){return new BPromise(function(_0x144c0d,_0x57dd3a){return client[_0x7537('0x8')](_0xf8bf2c,_0x3abc7e)[_0x7537('0x9')](function(_0x244e3f){logger['info'](_0x7537('0xa'),_0x5b815a,'request\x20sent');logger['debug'](_0x7537('0xb'),_0x5b815a,_0x7537('0xc'),JSON['stringify'](_0x244e3f));if(_0x244e3f[_0x7537('0xd')]){if(_0x244e3f[_0x7537('0xd')][_0x7537('0xe')]===0x1f4){logger[_0x7537('0xd')](_0x7537('0xa'),_0x5b815a,_0x244e3f[_0x7537('0xd')][_0x7537('0xf')]);return _0x57dd3a(_0x244e3f[_0x7537('0xd')][_0x7537('0xf')]);}logger[_0x7537('0xd')](_0x7537('0xa'),_0x5b815a,_0x244e3f[_0x7537('0xd')]['message']);return _0x144c0d(_0x244e3f[_0x7537('0xd')][_0x7537('0xf')]);}else{logger['info'](_0x7537('0xa'),_0x5b815a,_0x7537('0xc'));_0x144c0d(_0x244e3f['result'][_0x7537('0xf')]);}})[_0x7537('0x10')](function(_0x1e0115){logger[_0x7537('0xd')](_0x7537('0xa'),_0x5b815a,_0x1e0115);_0x57dd3a(_0x1e0115);});});}exports[_0x7537('0x11')]=function(_0x4abb00){var _0x3d04ce=this;return new Promise(function(_0x2e84a6,_0x3b1444){return db[_0x7537('0x12')][_0x7537('0x13')](_0x4abb00[_0x7537('0x14')],{'raw':_0x4abb00[_0x7537('0x15')]?_0x4abb00[_0x7537('0x15')][_0x7537('0x16')]===undefined?!![]:![]:!![]})['then'](function(_0x1decf5){logger[_0x7537('0x17')]('CreateVoiceTransferReport',_0x4abb00);logger[_0x7537('0x18')](_0x7537('0x11'),_0x4abb00,JSON[_0x7537('0x19')](_0x1decf5));_0x2e84a6(_0x1decf5);})[_0x7537('0x10')](function(_0x18ab2c){logger[_0x7537('0xd')](_0x7537('0x11'),_0x18ab2c[_0x7537('0xf')],_0x4abb00);_0x3b1444(_0x3d04ce[_0x7537('0xd')](0x1f4,_0x18ab2c[_0x7537('0xf')]));});});};
\ No newline at end of file
+var _0xf37a=['rpc','jayson/promise','client','http','request','then','info','VoiceTransferReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','CreateVoiceTransferReport','create','options','raw','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger'];(function(_0x17418e,_0x3d28fd){var _0x58fea4=function(_0x1ce19c){while(--_0x1ce19c){_0x17418e['push'](_0x17418e['shift']());}};_0x58fea4(++_0x3d28fd);}(_0xf37a,0x131));var _0xaf37=function(_0x3e45b1,_0x62c209){_0x3e45b1=_0x3e45b1-0x0;var _0x1ef1bf=_0xf37a[_0x3e45b1];return _0x1ef1bf;};'use strict';var _=require('lodash');var util=require(_0xaf37('0x0'));var moment=require(_0xaf37('0x1'));var BPromise=require(_0xaf37('0x2'));var rs=require(_0xaf37('0x3'));var fs=require('fs');var Redis=require(_0xaf37('0x4'));var db=require(_0xaf37('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xaf37('0x6'))(_0xaf37('0x7'));var config=require('../../config/environment');var jayson=require(_0xaf37('0x8'));var client=jayson[_0xaf37('0x9')][_0xaf37('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4535c5,_0x4aa509,_0x4a95c3){return new BPromise(function(_0x1f6fc5,_0x5d6d00){return client[_0xaf37('0xb')](_0x4535c5,_0x4a95c3)[_0xaf37('0xc')](function(_0x5db324){logger[_0xaf37('0xd')](_0xaf37('0xe'),_0x4aa509,_0xaf37('0xf'));logger[_0xaf37('0x10')]('VoiceTransferReport,\x20%s,\x20%s,\x20%s',_0x4aa509,'request\x20sent',JSON[_0xaf37('0x11')](_0x5db324));if(_0x5db324[_0xaf37('0x12')]){if(_0x5db324[_0xaf37('0x12')][_0xaf37('0x13')]===0x1f4){logger[_0xaf37('0x12')](_0xaf37('0xe'),_0x4aa509,_0x5db324[_0xaf37('0x12')][_0xaf37('0x14')]);return _0x5d6d00(_0x5db324[_0xaf37('0x12')]['message']);}logger[_0xaf37('0x12')](_0xaf37('0xe'),_0x4aa509,_0x5db324['error'][_0xaf37('0x14')]);return _0x1f6fc5(_0x5db324[_0xaf37('0x12')][_0xaf37('0x14')]);}else{logger[_0xaf37('0xd')](_0xaf37('0xe'),_0x4aa509,'request\x20sent');_0x1f6fc5(_0x5db324['result'][_0xaf37('0x14')]);}})['catch'](function(_0x49b966){logger[_0xaf37('0x12')](_0xaf37('0xe'),_0x4aa509,_0x49b966);_0x5d6d00(_0x49b966);});});}exports[_0xaf37('0x15')]=function(_0x1e184f){var _0x244ec8=this;return new Promise(function(_0x2bfcde,_0x24fdbb){return db['VoiceTransferReport'][_0xaf37('0x16')](_0x1e184f['body'],{'raw':_0x1e184f['options']?_0x1e184f[_0xaf37('0x17')][_0xaf37('0x18')]===undefined?!![]:![]:!![]})['then'](function(_0x2a3df1){logger[_0xaf37('0xd')](_0xaf37('0x15'),_0x1e184f);logger['debug'](_0xaf37('0x15'),_0x1e184f,JSON[_0xaf37('0x11')](_0x2a3df1));_0x2bfcde(_0x2a3df1);})[_0xaf37('0x19')](function(_0x474c2e){logger['error'](_0xaf37('0x15'),_0x474c2e[_0xaf37('0x14')],_0x1e184f);_0x24fdbb(_0x244ec8[_0xaf37('0x12')](0x1f4,_0x474c2e[_0xaf37('0x14')]));});});};
\ No newline at end of file
index 10b1418..ff8f872 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaa88=['/hold','/unhold','/calls','calls','transfer','express','Router','../../components/auth/service','./webbar.controller','/originate','isAuthenticated','isWebrtcLicence','originate','post','/hangup','hangup','/answer','answer'];(function(_0x18af4b,_0x175b3c){var _0x1935c5=function(_0x16c212){while(--_0x16c212){_0x18af4b['push'](_0x18af4b['shift']());}};_0x1935c5(++_0x175b3c);}(_0xaa88,0x137));var _0x8aa8=function(_0x1646fa,_0x4e5bd7){_0x1646fa=_0x1646fa-0x0;var _0x5a47a5=_0xaa88[_0x1646fa];return _0x5a47a5;};'use strict';var express=require(_0x8aa8('0x0'));var router=express[_0x8aa8('0x1')]();var auth=require(_0x8aa8('0x2'));var controller=require(_0x8aa8('0x3'));router['post'](_0x8aa8('0x4'),auth[_0x8aa8('0x5')](),auth[_0x8aa8('0x6')](),controller[_0x8aa8('0x7')]);router[_0x8aa8('0x8')](_0x8aa8('0x9'),auth['isAuthenticated'](),auth['isWebrtcLicence'](),controller[_0x8aa8('0xa')]);router['post'](_0x8aa8('0xb'),auth[_0x8aa8('0x5')](),auth[_0x8aa8('0x6')](),controller[_0x8aa8('0xc')]);router['post'](_0x8aa8('0xd'),auth[_0x8aa8('0x5')](),auth[_0x8aa8('0x6')](),controller['hold']);router[_0x8aa8('0x8')](_0x8aa8('0xe'),auth[_0x8aa8('0x5')](),auth[_0x8aa8('0x6')](),controller['unhold']);router[_0x8aa8('0x8')](_0x8aa8('0xf'),auth['isAuthenticated'](),auth[_0x8aa8('0x6')](),controller[_0x8aa8('0x10')]);router[_0x8aa8('0x8')]('/transfer',auth[_0x8aa8('0x5')](),auth[_0x8aa8('0x6')](),controller[_0x8aa8('0x11')]);module['exports']=router;
\ No newline at end of file
+var _0x9a19=['hangup','answer','hold','/unhold','unhold','/calls','calls','/transfer','transfer','exports','express','Router','../../components/auth/service','post','/originate','isAuthenticated','isWebrtcLicence','originate','/hangup'];(function(_0x567274,_0x18c70a){var _0x3d08f5=function(_0x54b641){while(--_0x54b641){_0x567274['push'](_0x567274['shift']());}};_0x3d08f5(++_0x18c70a);}(_0x9a19,0x114));var _0x99a1=function(_0x4b055c,_0x4b870b){_0x4b055c=_0x4b055c-0x0;var _0x4b62bb=_0x9a19[_0x4b055c];return _0x4b62bb;};'use strict';var express=require(_0x99a1('0x0'));var router=express[_0x99a1('0x1')]();var auth=require(_0x99a1('0x2'));var controller=require('./webbar.controller');router[_0x99a1('0x3')](_0x99a1('0x4'),auth[_0x99a1('0x5')](),auth[_0x99a1('0x6')](),controller[_0x99a1('0x7')]);router[_0x99a1('0x3')](_0x99a1('0x8'),auth[_0x99a1('0x5')](),auth[_0x99a1('0x6')](),controller[_0x99a1('0x9')]);router[_0x99a1('0x3')]('/answer',auth['isAuthenticated'](),auth['isWebrtcLicence'](),controller[_0x99a1('0xa')]);router[_0x99a1('0x3')]('/hold',auth['isAuthenticated'](),auth[_0x99a1('0x6')](),controller[_0x99a1('0xb')]);router[_0x99a1('0x3')](_0x99a1('0xc'),auth[_0x99a1('0x5')](),auth['isWebrtcLicence'](),controller[_0x99a1('0xd')]);router[_0x99a1('0x3')](_0x99a1('0xe'),auth[_0x99a1('0x5')](),auth[_0x99a1('0x6')](),controller[_0x99a1('0xf')]);router[_0x99a1('0x3')](_0x99a1('0x10'),auth[_0x99a1('0x5')](),auth[_0x99a1('0x6')](),controller[_0x99a1('0x11')]);module[_0x99a1('0x12')]=router;
\ No newline at end of file
index a11a81d..cb6a7c4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x54f3=['sessionId\x20is\x20required','transferNumber\x20is\x20required','number','info','stringify','emit','log','error','stack','name','status','send','request','then','code','message','result','findOne','agent','all','filter','rows','length','sessionId\x20','\x20not\x20found!','originate','originate\x20fired:','body','json','userId','callNumber','callerId','callbackUrl','format','user:%s','webbar:originate','originate\x20executed!','catch','entityFound:','webbar:hangup','hangup\x20executed!','answer','answer\x20fired:','sessionId','webbar:answer','answer\x20executed!','hold','hold\x20fired:','unhold','unhold\x20fired:','webbar:unhold','unhold\x20executed!','calls\x20fired:','VoiceChannels','UserId','conference\x20fired:','transfer','transfer\x20fired:','transferNumber','webbar:transfer','lodash','../../mysqldb','../../config/environment','util','bluebird','http','../../config/logger','webbarapi','defaults','localhost','socket.io-emitter','redis','validate','userId\x20is\x20required','callNumber\x20is\x20required','string'];(function(_0x3942d1,_0x4506de){var _0x3dc5b7=function(_0x238127){while(--_0x238127){_0x3942d1['push'](_0x3942d1['shift']());}};_0x3dc5b7(++_0x4506de);}(_0x54f3,0x120));var _0x354f=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0x54f3[_0x40a045];return _0x1a687c;};'use strict';var path=require('path');var fs=require('fs');var _=require(_0x354f('0x0'));var db=require(_0x354f('0x1'))['db'];var config=require(_0x354f('0x2'));var util=require(_0x354f('0x3'));var BPromise=require(_0x354f('0x4'));var jayson=require('jayson/promise');var amiClient=jayson['client'][_0x354f('0x5')]({'port':0x232a});var logger=require(_0x354f('0x6'))(_0x354f('0x7'));var Redis=require('ioredis');config['redis']=_[_0x354f('0x8')](config['redis'],{'host':_0x354f('0x9'),'port':0x18eb});var io=require(_0x354f('0xa'))(new Redis(config[_0x354f('0xb')]));var Schema=require(_0x354f('0xc'));var originateValidation=new Schema({'userId':{'type':'number','required':[!![],_0x354f('0xd')]},'callNumber':{'type':'string','required':[!![],_0x354f('0xe')]},'callerId':{'type':_0x354f('0xf')},'callbackUrl':{'type':'string'}});var hangupValidation=new Schema({'userId':{'type':'number','required':[!![],_0x354f('0xd')]},'sessionId':{'type':_0x354f('0xf'),'required':![]}});var answerValidation=new Schema({'userId':{'type':'number','required':[!![],_0x354f('0xd')]},'sessionId':{'type':_0x354f('0xf'),'required':![]}});var transferValidation=new Schema({'userId':{'type':'number','required':[!![],_0x354f('0xd')]},'sessionId':{'type':_0x354f('0xf'),'required':[!![],_0x354f('0x10')]},'transferNumber':{'type':_0x354f('0xf'),'required':[!![],_0x354f('0x11')]}});var holdValidation=new Schema({'userId':{'type':_0x354f('0x12'),'required':[!![],_0x354f('0xd')]},'sessionId':{'type':'string','required':![]}});var unholdValidation=new Schema({'userId':{'type':_0x354f('0x12'),'required':[!![],_0x354f('0xd')]},'sessionId':{'type':_0x354f('0xf'),'required':![]}});var callsValidation=new Schema({'userId':{'type':'number','required':[!![],_0x354f('0xd')]}});var conferenceValidation=new Schema({'userId':{'type':_0x354f('0x12'),'required':[!![],_0x354f('0xd')]}});function emit(_0x4cc0e9,_0x588741,_0x1a02eb){logger[_0x354f('0x13')](_0x4cc0e9,_0x588741,JSON[_0x354f('0x14')](_0x1a02eb));io['to'](_0x4cc0e9)[_0x354f('0x15')](_0x588741,_0x1a02eb);}function handleError(_0x3703bb){return function(_0x36402d){console[_0x354f('0x16')]('handleError:',_0x36402d,_0x36402d instanceof RangeError);logger[_0x354f('0x17')](_0x36402d[_0x354f('0x18')]);if(_0x36402d instanceof RangeError){if(_0x36402d[_0x354f('0x19')]){delete _0x36402d['name'];}_0x3703bb[_0x354f('0x1a')](0x194)['send'](_0x36402d);}else{if(_0x36402d[_0x354f('0x19')]){delete _0x36402d[_0x354f('0x19')];}_0x3703bb['status'](0x1f4)[_0x354f('0x1b')](_0x36402d);}};}function checkError(){return function(_0x39898c){if(!_0x39898c){throw new RangeError('NotFound');}return _0x39898c;};}function respondWithRpcPromise(_0x4c2c4f,_0x25ea69){return new BPromise(function(_0x574753,_0x52e7cb){var _0xa6050f=amiClient;return _0xa6050f[_0x354f('0x1c')](_0x4c2c4f,_0x25ea69)[_0x354f('0x1d')](function(_0x2f4277){if(_0x2f4277[_0x354f('0x17')]){if(_0x2f4277[_0x354f('0x17')][_0x354f('0x1e')]===0x1f4){return _0x52e7cb(_0x2f4277['error'][_0x354f('0x1f')]);}return _0x574753(_0x2f4277['error']['message']);}else{_0x574753(_0x2f4277[_0x354f('0x20')]);}})['catch'](function(_0x4b1820){_0x52e7cb(_0x4b1820);});});}function getAgent(_0xdb861e){return db['User'][_0x354f('0x21')]({'where':{'id':_0xdb861e,'role':_0x354f('0x22')}})['then'](checkError());}function getAgentCheckSession(_0x73c95e,_0x3c5c38){return new BPromise(function(_0x1467e7,_0x4c62c3){var _0x1a968d=respondWithRpcPromise('VoiceChannels');var _0x227d9b=getAgent(_0x73c95e);Promise[_0x354f('0x23')]([_0x1a968d,_0x227d9b])[_0x354f('0x1d')](function(_0x2816cf){var _0x596b48=_0x2816cf[0x0];var _0x21c121=_0x2816cf[0x1];var _0xb50aec=_[_0x354f('0x24')](_0x596b48[_0x354f('0x25')],function(_0x223464){return _0x223464['UserId']==_0x21c121['id']&&_0x223464['sessionId']==_0x3c5c38;});if(_0xb50aec[_0x354f('0x26')]==0x1){_0x1467e7(_0x21c121);}else{_0x4c62c3(new RangeError(_0x354f('0x27')+_0x3c5c38+_0x354f('0x28')));}});});}exports[_0x354f('0x29')]=function(_0x5c38d7,_0x576a95){logger[_0x354f('0x13')](_0x354f('0x2a'),_0x5c38d7[_0x354f('0x2b')]);var _0x8ef91e=originateValidation['validate'](_0x5c38d7[_0x354f('0x2b')]);if(_0x8ef91e[_0x354f('0x26')]>0x0){return _0x576a95[_0x354f('0x1a')](0x190)[_0x354f('0x2c')](_0x8ef91e);}var _0x4cd19e=_0x5c38d7['body'][_0x354f('0x2d')];var _0xc3b77d=_0x5c38d7[_0x354f('0x2b')][_0x354f('0x2e')];var _0x33bd5a=_0x5c38d7[_0x354f('0x2b')][_0x354f('0x2f')];var _0xf3b83b=_0x5c38d7[_0x354f('0x2b')][_0x354f('0x30')];return getAgent(_0x4cd19e)[_0x354f('0x1d')](function(_0x4d59f3){logger[_0x354f('0x13')]('entityFound:',_0x4d59f3[_0x354f('0x19')]);emit(util[_0x354f('0x31')](_0x354f('0x32'),_0x4d59f3[_0x354f('0x19')]),_0x354f('0x33'),{'callNumber':_0xc3b77d,'callerId':_0x33bd5a,'callbackUrl':_0xf3b83b});return _0x576a95[_0x354f('0x1a')](0xc8)['json']({'error':![],'message':_0x354f('0x34')});})[_0x354f('0x35')](handleError(_0x576a95));};exports['hangup']=function(_0x89dcb6,_0x944fda){logger[_0x354f('0x13')]('hangup\x20fired:',_0x89dcb6[_0x354f('0x2b')]);var _0x269871=hangupValidation[_0x354f('0xc')](_0x89dcb6[_0x354f('0x2b')]);if(_0x269871['length']>0x0){return _0x944fda[_0x354f('0x1a')](0x190)['json'](_0x269871);}var _0x2f6873=_0x89dcb6[_0x354f('0x2b')][_0x354f('0x2d')];var _0x22682a=_0x89dcb6[_0x354f('0x2b')]['sessionId'];return getAgent(_0x2f6873)['then'](function(_0x162a10){logger[_0x354f('0x13')](_0x354f('0x36'),_0x162a10[_0x354f('0x19')]);emit(util[_0x354f('0x31')](_0x354f('0x32'),_0x162a10['name']),_0x354f('0x37'),{'sessionId':_0x22682a});return _0x944fda[_0x354f('0x1a')](0xc8)[_0x354f('0x2c')]({'error':![],'message':_0x354f('0x38')});})['catch'](handleError(_0x944fda));};exports[_0x354f('0x39')]=function(_0x46956e,_0x3a7180){logger[_0x354f('0x13')](_0x354f('0x3a'),_0x46956e[_0x354f('0x2b')]);var _0x5f33b2=answerValidation[_0x354f('0xc')](_0x46956e[_0x354f('0x2b')]);if(_0x5f33b2[_0x354f('0x26')]>0x0){return _0x3a7180['status'](0x190)['json'](_0x5f33b2);}var _0x7835a0=_0x46956e[_0x354f('0x2b')][_0x354f('0x2d')];var _0x3b34ca=_0x46956e[_0x354f('0x2b')][_0x354f('0x3b')];return getAgent(_0x7835a0)[_0x354f('0x1d')](function(_0x445b7d){logger['info'](_0x354f('0x36'),_0x445b7d[_0x354f('0x19')]);emit(util[_0x354f('0x31')](_0x354f('0x32'),_0x445b7d[_0x354f('0x19')]),_0x354f('0x3c'),{'sessionId':_0x3b34ca});return _0x3a7180[_0x354f('0x1a')](0xc8)[_0x354f('0x2c')]({'error':![],'message':_0x354f('0x3d')});})['catch'](handleError(_0x3a7180));};exports[_0x354f('0x3e')]=function(_0x577fa6,_0x5503d6){logger['info'](_0x354f('0x3f'),_0x577fa6[_0x354f('0x2b')]);var _0x4d26a9=holdValidation[_0x354f('0xc')](_0x577fa6[_0x354f('0x2b')]);if(_0x4d26a9[_0x354f('0x26')]>0x0){return _0x5503d6['status'](0x190)['json'](_0x4d26a9);}var _0x178313=_0x577fa6[_0x354f('0x2b')][_0x354f('0x2d')];var _0x1d6952=_0x577fa6[_0x354f('0x2b')][_0x354f('0x3b')];return getAgent(_0x178313)['then'](function(_0x55f2c9){logger[_0x354f('0x13')]('entityFound:',_0x55f2c9[_0x354f('0x19')]);emit(util[_0x354f('0x31')](_0x354f('0x32'),_0x55f2c9['name']),'webbar:hold',{'sessionId':_0x1d6952});return _0x5503d6[_0x354f('0x1a')](0xc8)[_0x354f('0x2c')]({'error':![],'message':'hold\x20executed!'});})[_0x354f('0x35')](handleError(_0x5503d6));};exports[_0x354f('0x40')]=function(_0xf71a4f,_0x2dd012){logger[_0x354f('0x13')](_0x354f('0x41'),_0xf71a4f[_0x354f('0x2b')]);var _0x4deff4=unholdValidation[_0x354f('0xc')](_0xf71a4f[_0x354f('0x2b')]);if(_0x4deff4[_0x354f('0x26')]>0x0){return _0x2dd012[_0x354f('0x1a')](0x190)[_0x354f('0x2c')](_0x4deff4);}var _0x4bb00c=_0xf71a4f[_0x354f('0x2b')][_0x354f('0x2d')];var _0x576e1d=_0xf71a4f['body'][_0x354f('0x3b')];return getAgent(_0x4bb00c)[_0x354f('0x1d')](function(_0x54914c){logger['info'](_0x354f('0x36'),_0x54914c[_0x354f('0x19')]);emit(util['format'](_0x354f('0x32'),_0x54914c[_0x354f('0x19')]),_0x354f('0x42'),{'sessionId':_0x576e1d});return _0x2dd012[_0x354f('0x1a')](0xc8)[_0x354f('0x2c')]({'error':![],'message':_0x354f('0x43')});})[_0x354f('0x35')](handleError(_0x2dd012));};exports['calls']=function(_0x2ca633,_0x4535cb){logger[_0x354f('0x13')](_0x354f('0x44'),_0x4535cb['body']);var _0x2edb7c=callsValidation[_0x354f('0xc')](_0x2ca633[_0x354f('0x2b')]);if(_0x2edb7c[_0x354f('0x26')]>0x0){return _0x4535cb['status'](0x190)[_0x354f('0x2c')](_0x2edb7c);}var _0x1e9558=_0x2ca633[_0x354f('0x2b')][_0x354f('0x2d')];var _0x58c25f=respondWithRpcPromise(_0x354f('0x45'));var _0x16a32f=getAgent(_0x1e9558);return Promise[_0x354f('0x23')]([_0x58c25f,_0x16a32f])[_0x354f('0x1d')](function(_0x6164f7){var _0x294518=_0x6164f7[0x0];var _0x3d32de=_0x6164f7[0x1];var _0x3f1770=_[_0x354f('0x24')](_0x294518[_0x354f('0x25')],function(_0x102f91){return _0x102f91[_0x354f('0x46')]==_0x3d32de['id'];});return _0x4535cb[_0x354f('0x1a')](0xc8)['json']({'count':_0x3f1770[_0x354f('0x26')],'rows':_0x3f1770});})[_0x354f('0x35')](handleError(_0x4535cb));};exports['conference']=function(_0x575b76,_0xa3d1cb){logger['info'](_0x354f('0x47'),_0x575b76[_0x354f('0x2b')]);var _0x2e08e2=conferenceValidation[_0x354f('0xc')](_0x575b76[_0x354f('0x2b')]);if(_0x2e08e2[_0x354f('0x26')]>0x0){return _0xa3d1cb[_0x354f('0x1a')](0x190)[_0x354f('0x2c')](_0x2e08e2);}var _0x5dbf67=_0x575b76[_0x354f('0x2b')][_0x354f('0x2d')];return getAgent(_0x5dbf67)[_0x354f('0x1d')](function(_0x583d97){logger[_0x354f('0x13')](_0x354f('0x36'),_0x583d97[_0x354f('0x19')]);emit(util[_0x354f('0x31')](_0x354f('0x32'),_0x583d97[_0x354f('0x19')]),'webbar:conference');return _0xa3d1cb[_0x354f('0x1a')](0xc8)[_0x354f('0x2c')]({'error':![],'message':'conference\x20executed!'});})[_0x354f('0x35')](handleError(_0xa3d1cb));};exports[_0x354f('0x48')]=function(_0x1c8401,_0x1088d2){logger['info'](_0x354f('0x49'),_0x1c8401['body']);var _0x4b9a9f=transferValidation[_0x354f('0xc')](_0x1c8401[_0x354f('0x2b')]);if(_0x4b9a9f[_0x354f('0x26')]>0x0){return _0x1088d2[_0x354f('0x1a')](0x190)[_0x354f('0x2c')](_0x4b9a9f);}var _0x4ca3df=_0x1c8401['body'][_0x354f('0x2d')];var _0x41b1a5=_0x1c8401[_0x354f('0x2b')][_0x354f('0x3b')];var _0x5681d9=_0x1c8401[_0x354f('0x2b')][_0x354f('0x4a')];return getAgent(_0x4ca3df)['then'](function(_0x1139b8){logger[_0x354f('0x13')](_0x354f('0x36'),_0x1139b8[_0x354f('0x19')]);emit(util[_0x354f('0x31')](_0x354f('0x32'),_0x1139b8[_0x354f('0x19')]),_0x354f('0x4b'),{'sessionId':_0x41b1a5,'transferNumber':_0x5681d9});return _0x1088d2[_0x354f('0x1a')](0xc8)[_0x354f('0x2c')]({'error':![],'message':'transfer\x20executed!'});})[_0x354f('0x35')](handleError(_0x1088d2));};
\ No newline at end of file
+var _0x9aea=['calls\x20fired:','conference\x20fired:','conference\x20executed!','webbar:transfer','transfer\x20executed!','path','../../mysqldb','util','bluebird','client','http','../../config/logger','webbarapi','ioredis','defaults','redis','localhost','validate','number','userId\x20is\x20required','string','callNumber\x20is\x20required','sessionId\x20is\x20required','transferNumber\x20is\x20required','info','stringify','emit','log','stack','name','status','send','NotFound','error','message','result','catch','User','findOne','agent','then','VoiceChannels','all','filter','rows','UserId','sessionId','\x20not\x20found!','originate','originate\x20fired:','body','json','userId','callNumber','callerId','entityFound:','user:%s','webbar:originate','length','hangup\x20executed!','answer','answer\x20fired:','format','webbar:answer','answer\x20executed!','hold','hold\x20fired:','webbar:hold','unhold','webbar:unhold','unhold\x20executed!','calls'];(function(_0x1cc8fe,_0x105328){var _0x230054=function(_0x1a1b56){while(--_0x1a1b56){_0x1cc8fe['push'](_0x1cc8fe['shift']());}};_0x230054(++_0x105328);}(_0x9aea,0xdd));var _0xa9ae=function(_0x546eba,_0x270791){_0x546eba=_0x546eba-0x0;var _0x4f618c=_0x9aea[_0x546eba];return _0x4f618c;};'use strict';var path=require(_0xa9ae('0x0'));var fs=require('fs');var _=require('lodash');var db=require(_0xa9ae('0x1'))['db'];var config=require('../../config/environment');var util=require(_0xa9ae('0x2'));var BPromise=require(_0xa9ae('0x3'));var jayson=require('jayson/promise');var amiClient=jayson[_0xa9ae('0x4')][_0xa9ae('0x5')]({'port':0x232a});var logger=require(_0xa9ae('0x6'))(_0xa9ae('0x7'));var Redis=require(_0xa9ae('0x8'));config['redis']=_[_0xa9ae('0x9')](config[_0xa9ae('0xa')],{'host':_0xa9ae('0xb'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xa9ae('0xa')]));var Schema=require(_0xa9ae('0xc'));var originateValidation=new Schema({'userId':{'type':_0xa9ae('0xd'),'required':[!![],_0xa9ae('0xe')]},'callNumber':{'type':_0xa9ae('0xf'),'required':[!![],_0xa9ae('0x10')]},'callerId':{'type':_0xa9ae('0xf')},'callbackUrl':{'type':_0xa9ae('0xf')}});var hangupValidation=new Schema({'userId':{'type':_0xa9ae('0xd'),'required':[!![],'userId\x20is\x20required']},'sessionId':{'type':_0xa9ae('0xf'),'required':![]}});var answerValidation=new Schema({'userId':{'type':'number','required':[!![],_0xa9ae('0xe')]},'sessionId':{'type':_0xa9ae('0xf'),'required':![]}});var transferValidation=new Schema({'userId':{'type':_0xa9ae('0xd'),'required':[!![],_0xa9ae('0xe')]},'sessionId':{'type':_0xa9ae('0xf'),'required':[!![],_0xa9ae('0x11')]},'transferNumber':{'type':_0xa9ae('0xf'),'required':[!![],_0xa9ae('0x12')]}});var holdValidation=new Schema({'userId':{'type':'number','required':[!![],_0xa9ae('0xe')]},'sessionId':{'type':_0xa9ae('0xf'),'required':![]}});var unholdValidation=new Schema({'userId':{'type':_0xa9ae('0xd'),'required':[!![],_0xa9ae('0xe')]},'sessionId':{'type':'string','required':![]}});var callsValidation=new Schema({'userId':{'type':_0xa9ae('0xd'),'required':[!![],_0xa9ae('0xe')]}});var conferenceValidation=new Schema({'userId':{'type':_0xa9ae('0xd'),'required':[!![],_0xa9ae('0xe')]}});function emit(_0x77b0a4,_0xddb095,_0x524bb2){logger[_0xa9ae('0x13')](_0x77b0a4,_0xddb095,JSON[_0xa9ae('0x14')](_0x524bb2));io['to'](_0x77b0a4)[_0xa9ae('0x15')](_0xddb095,_0x524bb2);}function handleError(_0x4ac5a6){return function(_0x4dbb30){console[_0xa9ae('0x16')]('handleError:',_0x4dbb30,_0x4dbb30 instanceof RangeError);logger['error'](_0x4dbb30[_0xa9ae('0x17')]);if(_0x4dbb30 instanceof RangeError){if(_0x4dbb30[_0xa9ae('0x18')]){delete _0x4dbb30[_0xa9ae('0x18')];}_0x4ac5a6[_0xa9ae('0x19')](0x194)['send'](_0x4dbb30);}else{if(_0x4dbb30[_0xa9ae('0x18')]){delete _0x4dbb30[_0xa9ae('0x18')];}_0x4ac5a6[_0xa9ae('0x19')](0x1f4)[_0xa9ae('0x1a')](_0x4dbb30);}};}function checkError(){return function(_0x426317){if(!_0x426317){throw new RangeError(_0xa9ae('0x1b'));}return _0x426317;};}function respondWithRpcPromise(_0x971ee1,_0x5a062d){return new BPromise(function(_0xc021cf,_0x4ca9a9){var _0x49dca9=amiClient;return _0x49dca9['request'](_0x971ee1,_0x5a062d)['then'](function(_0x1afd07){if(_0x1afd07['error']){if(_0x1afd07[_0xa9ae('0x1c')]['code']===0x1f4){return _0x4ca9a9(_0x1afd07[_0xa9ae('0x1c')][_0xa9ae('0x1d')]);}return _0xc021cf(_0x1afd07[_0xa9ae('0x1c')][_0xa9ae('0x1d')]);}else{_0xc021cf(_0x1afd07[_0xa9ae('0x1e')]);}})[_0xa9ae('0x1f')](function(_0x23c1ec){_0x4ca9a9(_0x23c1ec);});});}function getAgent(_0x5e82f1){return db[_0xa9ae('0x20')][_0xa9ae('0x21')]({'where':{'id':_0x5e82f1,'role':_0xa9ae('0x22')}})[_0xa9ae('0x23')](checkError());}function getAgentCheckSession(_0x222db7,_0x428934){return new BPromise(function(_0xb12fa8,_0x5dfcd7){var _0x489e88=respondWithRpcPromise(_0xa9ae('0x24'));var _0x3c324e=getAgent(_0x222db7);Promise[_0xa9ae('0x25')]([_0x489e88,_0x3c324e])[_0xa9ae('0x23')](function(_0x74cd94){var _0x54a821=_0x74cd94[0x0];var _0x52dd4f=_0x74cd94[0x1];var _0x1892b5=_[_0xa9ae('0x26')](_0x54a821[_0xa9ae('0x27')],function(_0x3a48b7){return _0x3a48b7[_0xa9ae('0x28')]==_0x52dd4f['id']&&_0x3a48b7[_0xa9ae('0x29')]==_0x428934;});if(_0x1892b5['length']==0x1){_0xb12fa8(_0x52dd4f);}else{_0x5dfcd7(new RangeError('sessionId\x20'+_0x428934+_0xa9ae('0x2a')));}});});}exports[_0xa9ae('0x2b')]=function(_0x3d9b30,_0x3cd87a){logger[_0xa9ae('0x13')](_0xa9ae('0x2c'),_0x3d9b30[_0xa9ae('0x2d')]);var _0x3e2ec2=originateValidation['validate'](_0x3d9b30[_0xa9ae('0x2d')]);if(_0x3e2ec2['length']>0x0){return _0x3cd87a[_0xa9ae('0x19')](0x190)[_0xa9ae('0x2e')](_0x3e2ec2);}var _0x3a701b=_0x3d9b30['body'][_0xa9ae('0x2f')];var _0x3eb867=_0x3d9b30[_0xa9ae('0x2d')][_0xa9ae('0x30')];var _0x353227=_0x3d9b30['body'][_0xa9ae('0x31')];var _0xa0730a=_0x3d9b30[_0xa9ae('0x2d')]['callbackUrl'];return getAgent(_0x3a701b)['then'](function(_0x2155c8){logger[_0xa9ae('0x13')](_0xa9ae('0x32'),_0x2155c8[_0xa9ae('0x18')]);emit(util['format'](_0xa9ae('0x33'),_0x2155c8[_0xa9ae('0x18')]),_0xa9ae('0x34'),{'callNumber':_0x3eb867,'callerId':_0x353227,'callbackUrl':_0xa0730a});return _0x3cd87a[_0xa9ae('0x19')](0xc8)[_0xa9ae('0x2e')]({'error':![],'message':'originate\x20executed!'});})[_0xa9ae('0x1f')](handleError(_0x3cd87a));};exports['hangup']=function(_0x26c8fb,_0x38f360){logger[_0xa9ae('0x13')]('hangup\x20fired:',_0x26c8fb[_0xa9ae('0x2d')]);var _0x1ffcab=hangupValidation[_0xa9ae('0xc')](_0x26c8fb['body']);if(_0x1ffcab[_0xa9ae('0x35')]>0x0){return _0x38f360[_0xa9ae('0x19')](0x190)['json'](_0x1ffcab);}var _0x2993b2=_0x26c8fb['body'][_0xa9ae('0x2f')];var _0x24c237=_0x26c8fb['body'][_0xa9ae('0x29')];return getAgent(_0x2993b2)[_0xa9ae('0x23')](function(_0x234da5){logger[_0xa9ae('0x13')](_0xa9ae('0x32'),_0x234da5[_0xa9ae('0x18')]);emit(util['format'](_0xa9ae('0x33'),_0x234da5[_0xa9ae('0x18')]),'webbar:hangup',{'sessionId':_0x24c237});return _0x38f360['status'](0xc8)[_0xa9ae('0x2e')]({'error':![],'message':_0xa9ae('0x36')});})[_0xa9ae('0x1f')](handleError(_0x38f360));};exports[_0xa9ae('0x37')]=function(_0x4c110a,_0x1b0f5e){logger[_0xa9ae('0x13')](_0xa9ae('0x38'),_0x4c110a[_0xa9ae('0x2d')]);var _0x23c91d=answerValidation[_0xa9ae('0xc')](_0x4c110a[_0xa9ae('0x2d')]);if(_0x23c91d['length']>0x0){return _0x1b0f5e[_0xa9ae('0x19')](0x190)[_0xa9ae('0x2e')](_0x23c91d);}var _0x566cb0=_0x4c110a[_0xa9ae('0x2d')]['userId'];var _0xb51a6c=_0x4c110a[_0xa9ae('0x2d')][_0xa9ae('0x29')];return getAgent(_0x566cb0)[_0xa9ae('0x23')](function(_0x250d2b){logger[_0xa9ae('0x13')](_0xa9ae('0x32'),_0x250d2b['name']);emit(util[_0xa9ae('0x39')](_0xa9ae('0x33'),_0x250d2b['name']),_0xa9ae('0x3a'),{'sessionId':_0xb51a6c});return _0x1b0f5e[_0xa9ae('0x19')](0xc8)[_0xa9ae('0x2e')]({'error':![],'message':_0xa9ae('0x3b')});})[_0xa9ae('0x1f')](handleError(_0x1b0f5e));};exports[_0xa9ae('0x3c')]=function(_0x571cb4,_0x1416a2){logger['info'](_0xa9ae('0x3d'),_0x571cb4[_0xa9ae('0x2d')]);var _0x52c6e9=holdValidation['validate'](_0x571cb4[_0xa9ae('0x2d')]);if(_0x52c6e9[_0xa9ae('0x35')]>0x0){return _0x1416a2[_0xa9ae('0x19')](0x190)[_0xa9ae('0x2e')](_0x52c6e9);}var _0x435c29=_0x571cb4[_0xa9ae('0x2d')][_0xa9ae('0x2f')];var _0x60342a=_0x571cb4['body']['sessionId'];return getAgent(_0x435c29)[_0xa9ae('0x23')](function(_0x3cf89c){logger['info'](_0xa9ae('0x32'),_0x3cf89c[_0xa9ae('0x18')]);emit(util[_0xa9ae('0x39')](_0xa9ae('0x33'),_0x3cf89c[_0xa9ae('0x18')]),_0xa9ae('0x3e'),{'sessionId':_0x60342a});return _0x1416a2[_0xa9ae('0x19')](0xc8)[_0xa9ae('0x2e')]({'error':![],'message':'hold\x20executed!'});})[_0xa9ae('0x1f')](handleError(_0x1416a2));};exports[_0xa9ae('0x3f')]=function(_0x5ea18d,_0x128f88){logger['info']('unhold\x20fired:',_0x5ea18d['body']);var _0x3b8916=unholdValidation[_0xa9ae('0xc')](_0x5ea18d['body']);if(_0x3b8916['length']>0x0){return _0x128f88['status'](0x190)[_0xa9ae('0x2e')](_0x3b8916);}var _0x54c67c=_0x5ea18d[_0xa9ae('0x2d')][_0xa9ae('0x2f')];var _0x4e39d5=_0x5ea18d[_0xa9ae('0x2d')]['sessionId'];return getAgent(_0x54c67c)[_0xa9ae('0x23')](function(_0xade70a){logger[_0xa9ae('0x13')](_0xa9ae('0x32'),_0xade70a[_0xa9ae('0x18')]);emit(util[_0xa9ae('0x39')](_0xa9ae('0x33'),_0xade70a[_0xa9ae('0x18')]),_0xa9ae('0x40'),{'sessionId':_0x4e39d5});return _0x128f88[_0xa9ae('0x19')](0xc8)[_0xa9ae('0x2e')]({'error':![],'message':_0xa9ae('0x41')});})['catch'](handleError(_0x128f88));};exports[_0xa9ae('0x42')]=function(_0x9e42b3,_0x24087a){logger[_0xa9ae('0x13')](_0xa9ae('0x43'),_0x24087a['body']);var _0x4fe9e7=callsValidation[_0xa9ae('0xc')](_0x9e42b3[_0xa9ae('0x2d')]);if(_0x4fe9e7['length']>0x0){return _0x24087a['status'](0x190)[_0xa9ae('0x2e')](_0x4fe9e7);}var _0x48637a=_0x9e42b3[_0xa9ae('0x2d')][_0xa9ae('0x2f')];var _0x1a1605=respondWithRpcPromise('VoiceChannels');var _0x36d844=getAgent(_0x48637a);return Promise['all']([_0x1a1605,_0x36d844])[_0xa9ae('0x23')](function(_0x56e847){var _0x157628=_0x56e847[0x0];var _0x38ad8f=_0x56e847[0x1];var _0x46ab4c=_[_0xa9ae('0x26')](_0x157628[_0xa9ae('0x27')],function(_0x44c3cc){return _0x44c3cc['UserId']==_0x38ad8f['id'];});return _0x24087a[_0xa9ae('0x19')](0xc8)[_0xa9ae('0x2e')]({'count':_0x46ab4c[_0xa9ae('0x35')],'rows':_0x46ab4c});})[_0xa9ae('0x1f')](handleError(_0x24087a));};exports['conference']=function(_0x2ebb14,_0x2803fb){logger[_0xa9ae('0x13')](_0xa9ae('0x44'),_0x2ebb14[_0xa9ae('0x2d')]);var _0x1f563a=conferenceValidation[_0xa9ae('0xc')](_0x2ebb14[_0xa9ae('0x2d')]);if(_0x1f563a[_0xa9ae('0x35')]>0x0){return _0x2803fb[_0xa9ae('0x19')](0x190)['json'](_0x1f563a);}var _0xc6b8a4=_0x2ebb14[_0xa9ae('0x2d')][_0xa9ae('0x2f')];return getAgent(_0xc6b8a4)[_0xa9ae('0x23')](function(_0x5b2f69){logger[_0xa9ae('0x13')](_0xa9ae('0x32'),_0x5b2f69['name']);emit(util[_0xa9ae('0x39')](_0xa9ae('0x33'),_0x5b2f69[_0xa9ae('0x18')]),'webbar:conference');return _0x2803fb['status'](0xc8)[_0xa9ae('0x2e')]({'error':![],'message':_0xa9ae('0x45')});})['catch'](handleError(_0x2803fb));};exports['transfer']=function(_0x2369e4,_0x7d0c93){logger[_0xa9ae('0x13')]('transfer\x20fired:',_0x2369e4[_0xa9ae('0x2d')]);var _0x619ae4=transferValidation[_0xa9ae('0xc')](_0x2369e4[_0xa9ae('0x2d')]);if(_0x619ae4[_0xa9ae('0x35')]>0x0){return _0x7d0c93[_0xa9ae('0x19')](0x190)[_0xa9ae('0x2e')](_0x619ae4);}var _0x381298=_0x2369e4[_0xa9ae('0x2d')][_0xa9ae('0x2f')];var _0x53445e=_0x2369e4['body'][_0xa9ae('0x29')];var _0x1a632a=_0x2369e4[_0xa9ae('0x2d')]['transferNumber'];return getAgent(_0x381298)[_0xa9ae('0x23')](function(_0xf2cd59){logger[_0xa9ae('0x13')]('entityFound:',_0xf2cd59['name']);emit(util[_0xa9ae('0x39')]('user:%s',_0xf2cd59[_0xa9ae('0x18')]),_0xa9ae('0x46'),{'sessionId':_0x53445e,'transferNumber':_0x1a632a});return _0x7d0c93[_0xa9ae('0x19')](0xc8)[_0xa9ae('0x2e')]({'error':![],'message':_0xa9ae('0x47')});})[_0xa9ae('0x1f')](handleError(_0x7d0c93));};
\ No newline at end of file
index 362e50a..cac9b04 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf434=['addApplications','/:id/notify','notify','send','/:id','update','delete','destroy','removeDispositions','removeAnswers','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappAccount.controller','isAuthenticated','index','get','/describe','describe','show','/:id/dispositions','getDispositions','getAnswers','/:id/users','/:id/applications','getApplications','post','create','addDisposition','/:id/canned_answers','addAgents'];(function(_0x21aec3,_0x5c97e9){var _0x288bbc=function(_0x2283fe){while(--_0x2283fe){_0x21aec3['push'](_0x21aec3['shift']());}};_0x288bbc(++_0x5c97e9);}(_0xf434,0xc3));var _0x4f43=function(_0xe0727,_0x1e25c5){_0xe0727=_0xe0727-0x0;var _0x380a0d=_0xf434[_0xe0727];return _0x380a0d;};'use strict';var multer=require(_0x4f43('0x0'));var util=require(_0x4f43('0x1'));var path=require(_0x4f43('0x2'));var timeout=require(_0x4f43('0x3'));var express=require(_0x4f43('0x4'));var router=express['Router']();var fs_extra=require(_0x4f43('0x5'));var auth=require(_0x4f43('0x6'));var interaction=require(_0x4f43('0x7'));var config=require(_0x4f43('0x8'));var controller=require(_0x4f43('0x9'));router['get']('/',auth[_0x4f43('0xa')](),controller[_0x4f43('0xb')]);router[_0x4f43('0xc')](_0x4f43('0xd'),auth['isAuthenticated'](),controller[_0x4f43('0xe')]);router[_0x4f43('0xc')]('/:id',auth[_0x4f43('0xa')](),controller[_0x4f43('0xf')]);router[_0x4f43('0xc')](_0x4f43('0x10'),auth[_0x4f43('0xa')](),controller[_0x4f43('0x11')]);router['get']('/:id/canned_answers',auth['isAuthenticated'](),controller[_0x4f43('0x12')]);router[_0x4f43('0xc')](_0x4f43('0x13'),auth[_0x4f43('0xa')](),controller['getAgents']);router[_0x4f43('0xc')](_0x4f43('0x14'),auth['isAuthenticated'](),controller[_0x4f43('0x15')]);router[_0x4f43('0x16')]('/',auth[_0x4f43('0xa')](),controller[_0x4f43('0x17')]);router['post'](_0x4f43('0x10'),auth[_0x4f43('0xa')](),controller[_0x4f43('0x18')]);router[_0x4f43('0x16')](_0x4f43('0x19'),auth[_0x4f43('0xa')](),controller['addAnswer']);router['post']('/:id/users',auth['isAuthenticated'](),controller[_0x4f43('0x1a')]);router['post'](_0x4f43('0x14'),auth[_0x4f43('0xa')](),controller[_0x4f43('0x1b')]);router['post'](_0x4f43('0x1c'),controller[_0x4f43('0x1d')]);router[_0x4f43('0x16')]('/:id/send',auth[_0x4f43('0xa')](),controller[_0x4f43('0x1e')]);router['put'](_0x4f43('0x1f'),auth['isAuthenticated'](),controller[_0x4f43('0x20')]);router[_0x4f43('0x21')]('/:id',auth[_0x4f43('0xa')](),controller[_0x4f43('0x22')]);router[_0x4f43('0x21')](_0x4f43('0x10'),auth[_0x4f43('0xa')](),controller[_0x4f43('0x23')]);router[_0x4f43('0x21')](_0x4f43('0x19'),auth[_0x4f43('0xa')](),controller[_0x4f43('0x24')]);router[_0x4f43('0x21')](_0x4f43('0x13'),auth[_0x4f43('0xa')](),controller['removeAgents']);module['exports']=router;
\ No newline at end of file
+var _0xcf7e=['util','path','express','fs-extra','../../components/auth/service','./whatsappAccount.controller','get','isAuthenticated','/describe','/:id','getDispositions','/:id/canned_answers','getAnswers','/:id/users','/:id/applications','getApplications','post','create','/:id/dispositions','addAnswer','addApplications','notify','/:id/send','send','delete','destroy','removeDispositions','removeAnswers','removeAgents','exports','multer'];(function(_0x3bd634,_0x594ee8){var _0x12afbb=function(_0x4ae2a7){while(--_0x4ae2a7){_0x3bd634['push'](_0x3bd634['shift']());}};_0x12afbb(++_0x594ee8);}(_0xcf7e,0xb9));var _0xecf7=function(_0x1035c1,_0x2d8583){_0x1035c1=_0x1035c1-0x0;var _0x308d67=_0xcf7e[_0x1035c1];return _0x308d67;};'use strict';var multer=require(_0xecf7('0x0'));var util=require(_0xecf7('0x1'));var path=require(_0xecf7('0x2'));var timeout=require('connect-timeout');var express=require(_0xecf7('0x3'));var router=express['Router']();var fs_extra=require(_0xecf7('0x4'));var auth=require(_0xecf7('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xecf7('0x6'));router[_0xecf7('0x7')]('/',auth[_0xecf7('0x8')](),controller['index']);router[_0xecf7('0x7')](_0xecf7('0x9'),auth[_0xecf7('0x8')](),controller['describe']);router['get'](_0xecf7('0xa'),auth[_0xecf7('0x8')](),controller['show']);router[_0xecf7('0x7')]('/:id/dispositions',auth[_0xecf7('0x8')](),controller[_0xecf7('0xb')]);router['get'](_0xecf7('0xc'),auth[_0xecf7('0x8')](),controller[_0xecf7('0xd')]);router[_0xecf7('0x7')](_0xecf7('0xe'),auth[_0xecf7('0x8')](),controller['getAgents']);router[_0xecf7('0x7')](_0xecf7('0xf'),auth[_0xecf7('0x8')](),controller[_0xecf7('0x10')]);router[_0xecf7('0x11')]('/',auth[_0xecf7('0x8')](),controller[_0xecf7('0x12')]);router[_0xecf7('0x11')](_0xecf7('0x13'),auth[_0xecf7('0x8')](),controller['addDisposition']);router['post']('/:id/canned_answers',auth[_0xecf7('0x8')](),controller[_0xecf7('0x14')]);router[_0xecf7('0x11')]('/:id/users',auth[_0xecf7('0x8')](),controller['addAgents']);router['post'](_0xecf7('0xf'),auth[_0xecf7('0x8')](),controller[_0xecf7('0x15')]);router['post']('/:id/notify',controller[_0xecf7('0x16')]);router[_0xecf7('0x11')](_0xecf7('0x17'),auth['isAuthenticated'](),controller[_0xecf7('0x18')]);router['put']('/:id',auth[_0xecf7('0x8')](),controller['update']);router[_0xecf7('0x19')]('/:id',auth[_0xecf7('0x8')](),controller[_0xecf7('0x1a')]);router[_0xecf7('0x19')](_0xecf7('0x13'),auth['isAuthenticated'](),controller[_0xecf7('0x1b')]);router[_0xecf7('0x19')]('/:id/canned_answers',auth[_0xecf7('0x8')](),controller[_0xecf7('0x1c')]);router[_0xecf7('0x19')](_0xecf7('0xe'),auth[_0xecf7('0x8')](),controller[_0xecf7('0x1d')]);module[_0xecf7('0x1e')]=router;
\ No newline at end of file
index d19c236..1ecc149 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf6d8=['sequelize','randomstring','exports','STRING','generate','ENUM','twilio','sinch','Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}','BOOLEAN','INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','mandatoryDispositionPauseId','setDataValue','mandatoryDisposition'];(function(_0x1b30c4,_0x5cd2d9){var _0x1a180a=function(_0x4b2cf9){while(--_0x4b2cf9){_0x1b30c4['push'](_0x1b30c4['shift']());}};_0x1a180a(++_0x5cd2d9);}(_0xf6d8,0xb4));var _0x8f6d=function(_0x43a7fd,_0xb2af6a){_0x43a7fd=_0x43a7fd-0x0;var _0x8547b0=_0xf6d8[_0x43a7fd];return _0x8547b0;};'use strict';var Sequelize=require(_0x8f6d('0x0'));var rs=require(_0x8f6d('0x1'));module[_0x8f6d('0x2')]={'name':{'type':Sequelize[_0x8f6d('0x3')],'unique':'name','allowNull':![]},'key':{'type':Sequelize[_0x8f6d('0x3')],'allowNull':![]},'remote':{'type':Sequelize[_0x8f6d('0x3')],'allowNull':![]},'token':{'type':Sequelize['STRING'],'defaultValue':function(){return rs[_0x8f6d('0x4')]();}},'phone':{'type':Sequelize[_0x8f6d('0x3')]},'type':{'type':Sequelize[_0x8f6d('0x5')](_0x8f6d('0x6'),_0x8f6d('0x7'))},'accountSid':{'type':Sequelize['STRING']},'baseUrl':{'type':Sequelize['STRING']},'authToken':{'type':Sequelize[_0x8f6d('0x3')]},'notificationTemplate':{'type':Sequelize['TEXT'],'defaultValue':function(){return _0x8f6d('0x8');}},'notificationSound':{'type':Sequelize[_0x8f6d('0x9')],'defaultValue':![]},'notificationShake':{'type':Sequelize[_0x8f6d('0x9')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x8f6d('0xa')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0x8f6d('0xa')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x8f6d('0xa')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x8f6d('0x9')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x8f6d('0xa')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x8f6d('0xa')],'comment':_0x8f6d('0xb')},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x39c285){if(!_0x39c285){this['setDataValue'](_0x8f6d('0xc'),null);}this[_0x8f6d('0xd')](_0x8f6d('0xe'),_0x39c285);}},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x6e1e=['sinch','TEXT','Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}','BOOLEAN','INTEGER','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','randomstring','exports','STRING','name','generate','ENUM','twilio'];(function(_0xfa634c,_0x414e0e){var _0x73e478=function(_0xac2a51){while(--_0xac2a51){_0xfa634c['push'](_0xfa634c['shift']());}};_0x73e478(++_0x414e0e);}(_0x6e1e,0x91));var _0xe6e1=function(_0x116475,_0xd21355){_0x116475=_0x116475-0x0;var _0x7f68b6=_0x6e1e[_0x116475];return _0x7f68b6;};'use strict';var Sequelize=require(_0xe6e1('0x0'));var rs=require(_0xe6e1('0x1'));module[_0xe6e1('0x2')]={'name':{'type':Sequelize[_0xe6e1('0x3')],'unique':_0xe6e1('0x4'),'allowNull':![]},'key':{'type':Sequelize[_0xe6e1('0x3')],'allowNull':![]},'remote':{'type':Sequelize[_0xe6e1('0x3')],'allowNull':![]},'token':{'type':Sequelize['STRING'],'defaultValue':function(){return rs[_0xe6e1('0x5')]();}},'phone':{'type':Sequelize[_0xe6e1('0x3')]},'type':{'type':Sequelize[_0xe6e1('0x6')](_0xe6e1('0x7'),_0xe6e1('0x8'))},'accountSid':{'type':Sequelize[_0xe6e1('0x3')]},'baseUrl':{'type':Sequelize['STRING']},'authToken':{'type':Sequelize['STRING']},'notificationTemplate':{'type':Sequelize[_0xe6e1('0x9')],'defaultValue':function(){return _0xe6e1('0xa');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'notificationShake':{'type':Sequelize[_0xe6e1('0xb')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0xe6e1('0xc')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0xe6e1('0xc')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0xe6e1('0xb')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0xe6e1('0xc')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':_0xe6e1('0xd'),'set':function(_0xec3838){if(!_0xec3838){this[_0xe6e1('0xe')](_0xe6e1('0xf'),null);}this[_0xe6e1('0xe')](_0xe6e1('0x10'),_0xec3838);}},'description':{'type':Sequelize[_0xe6e1('0x3')]}};
\ No newline at end of file
index d1522cf..7f3a756 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8b54=['queueId','WhatsappQueue','Start','startRouting','receiveMessage','entity\x20found','WhatsappAccount,\x20%s,\x20%s,\x20%s,\x20%s','stringify','set','Content-Type','text/xml','to\x20is\x20mandatory','List','out','Messages','dataValues','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','jayson/promise','client','http','request','info','debug','WhatsappAccount,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','WhatsappAccount,\x20%s,\x20%s','sendStatus','end','status','offset','limit','undefined','count','Content-Range','json','apply','reject','save','update','then','get','WhatsappAccounts','UserProfileResource','destroy','stack','name','send','index','Pause','mandatoryDispositionPause','rawAttributes','type','key','model','map','query','filters','intersection','attributes','fields','length','hasOwnProperty','sort','where','filter','merge','VIRTUAL','options','WhatsappAccount','includeAll','include','rows','show','keys','create','user','role','UserProfileSection','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','body','describe','addDisposition','WhatsappAccountId','getDispositions','Disposition','nolimit','order','pick','removeDispositions','getAnswers','findOne','CannedAnswer','findAll','removeAnswers','ids','addAgents','omit','spread','emit','removeAgents','isArray','userWhatsappAccount:remove','getAgents','addApplications','sequelize','transaction','Transaction','ISOLATION_LEVELS','READ_COMMITTED','WhatsappApplication','bulkCreate','priority','finally','getApplications','notify','whatsapp','Applications','account','sinch','statuses','state','WhatsappMessage','timestamp','message_id','applications','orderBy','asc','CmContact','Sequelize','no\x20available\x20attributes','difference','createdAt','updatedAt','CompanyId','ListId','mobile','twilio','From','replace','whatsapp:','Body','messageId','MessageSid','from','notifications','ValidationError','from\x20is\x20mandatory','isNil','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','mapKey','CmList','Contacts','DESC','WhatsappInteraction','interaction','autoclose','push','close','*,*,*,*','created','AttachmentId','UserId','User','unshift','agent','waitForTheAssignedAgent'];(function(_0x4a0552,_0x4d462b){var _0x35afa7=function(_0x180670){while(--_0x180670){_0x4a0552['push'](_0x4a0552['shift']());}};_0x35afa7(++_0x4d462b);}(_0x8b54,0x1a8));var _0x48b5=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x8b54[_0x321bb2];return _0x9c12ed;};'use strict';var emlformat=require(_0x48b5('0x0'));var rimraf=require(_0x48b5('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x48b5('0x2'));var rp=require(_0x48b5('0x3'));var moment=require('moment');var BPromise=require(_0x48b5('0x4'));var Mustache=require(_0x48b5('0x5'));var util=require('util');var path=require('path');var sox=require(_0x48b5('0x6'));var csv=require(_0x48b5('0x7'));var ejs=require(_0x48b5('0x8'));var fs=require('fs');var fs_extra=require(_0x48b5('0x9'));var _=require('lodash');var squel=require(_0x48b5('0xa'));var crypto=require(_0x48b5('0xb'));var jsforce=require(_0x48b5('0xc'));var deskjs=require(_0x48b5('0xd'));var toCsv=require(_0x48b5('0x7'));var querystring=require(_0x48b5('0xe'));var Papa=require(_0x48b5('0xf'));var Redis=require(_0x48b5('0x10'));var authService=require(_0x48b5('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x48b5('0x12'));var hardwareService=require(_0x48b5('0x13'));var logger=require('../../config/logger')(_0x48b5('0x14'));var utils=require('../../config/utils');var config=require(_0x48b5('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x48b5('0x16'))['db'];config[_0x48b5('0x17')]=_[_0x48b5('0x18')](config[_0x48b5('0x17')],{'host':_0x48b5('0x19'),'port':0x18eb});var socket=require(_0x48b5('0x1a'))(new Redis(config['redis']));require('./whatsappAccount.socket')[_0x48b5('0x1b')](socket);var jayson=require(_0x48b5('0x1c'));var client=jayson[_0x48b5('0x1d')][_0x48b5('0x1e')]({'port':0x232c});function respondWithRpcPromise(_0x2833f9,_0x298007,_0x42b86a,_0x47a13e){return new BPromise(function(_0x176e3a,_0x493ea1){var _0xeadc27=_0x47a13e||client;return _0xeadc27[_0x48b5('0x1f')](_0x2833f9,_0x42b86a)['then'](function(_0x506f24){logger[_0x48b5('0x20')]('WhatsappAccount,\x20%s,\x20%s',_0x298007,'request\x20sent');logger[_0x48b5('0x21')](_0x48b5('0x22'),_0x298007,_0x48b5('0x23'),JSON['stringify'](_0x506f24));if(_0x506f24['error']){if(_0x506f24[_0x48b5('0x24')][_0x48b5('0x25')]===0x1f4){logger[_0x48b5('0x24')]('WhatsappAccount,\x20%s,\x20%s',_0x298007,_0x506f24[_0x48b5('0x24')]['message']);return _0x493ea1(_0x506f24['error'][_0x48b5('0x26')]);}logger[_0x48b5('0x24')]('WhatsappAccount,\x20%s,\x20%s',_0x298007,_0x506f24[_0x48b5('0x24')][_0x48b5('0x26')]);return _0x176e3a(_0x506f24[_0x48b5('0x24')][_0x48b5('0x26')]);}else{logger['info']('WhatsappAccount,\x20%s,\x20%s',_0x298007,_0x48b5('0x23'));_0x176e3a(_0x506f24[_0x48b5('0x27')][_0x48b5('0x26')]);}})[_0x48b5('0x28')](function(_0x1fea8d){logger[_0x48b5('0x24')](_0x48b5('0x29'),_0x298007,_0x1fea8d);_0x493ea1(_0x1fea8d);});});}function respondWithStatusCode(_0x2c1a91,_0x101d6e){_0x101d6e=_0x101d6e||0xcc;return function(_0x43f037){if(_0x43f037){return _0x2c1a91[_0x48b5('0x2a')](_0x101d6e);}return _0x2c1a91['status'](_0x101d6e)[_0x48b5('0x2b')]();};}function respondWithResult(_0xe9414e,_0x262c92){_0x262c92=_0x262c92||0xc8;return function(_0xab94ca){if(_0xab94ca){return _0xe9414e[_0x48b5('0x2c')](_0x262c92)['json'](_0xab94ca);}};}function respondWithFilteredResult(_0x59ac33,_0x4bf408){return function(_0x25cee5){if(_0x25cee5){var _0x45b12b=typeof _0x4bf408[_0x48b5('0x2d')]==='undefined'&&typeof _0x4bf408[_0x48b5('0x2e')]===_0x48b5('0x2f');var _0x10671c=_0x25cee5[_0x48b5('0x30')];var _0x260ab2=_0x45b12b?0x0:_0x4bf408['offset'];var _0x5ab4d2=_0x45b12b?_0x25cee5['count']:_0x4bf408[_0x48b5('0x2d')]+_0x4bf408[_0x48b5('0x2e')];var _0x39dd3a;if(_0x5ab4d2>=_0x10671c){_0x5ab4d2=_0x10671c;_0x39dd3a=0xc8;}else{_0x39dd3a=0xce;}_0x59ac33['status'](_0x39dd3a);return _0x59ac33['set'](_0x48b5('0x31'),_0x260ab2+'-'+_0x5ab4d2+'/'+_0x10671c)[_0x48b5('0x32')](_0x25cee5);}return null;};}function patchUpdates(_0x4cd5a2){return function(_0x5afc53){try{jsonpatch[_0x48b5('0x33')](_0x5afc53,_0x4cd5a2,!![]);}catch(_0x2634a1){return BPromise[_0x48b5('0x34')](_0x2634a1);}return _0x5afc53[_0x48b5('0x35')]();};}function saveUpdates(_0x4c9e53,_0x40cc69){return function(_0xff3a66){if(_0xff3a66){return _0xff3a66[_0x48b5('0x36')](_0x4c9e53)['then'](function(_0x2ccb51){return _0x2ccb51;});}return null;};}function removeEntity(_0x2c29e2,_0x4414c6){return function(_0x3aecac){if(_0x3aecac){return _0x3aecac['destroy']()[_0x48b5('0x37')](function(){var _0x3ff270=_0x3aecac[_0x48b5('0x38')]({'plain':!![]});var _0x28016a=_0x48b5('0x39');return db[_0x48b5('0x3a')][_0x48b5('0x3b')]({'where':{'type':_0x28016a,'resourceId':_0x3ff270['id']}})[_0x48b5('0x37')](function(){return _0x3aecac;});})['then'](function(){_0x2c29e2[_0x48b5('0x2c')](0xcc)[_0x48b5('0x2b')]();});}};}function handleEntityNotFound(_0x5829c7,_0xb8ce0d){return function(_0x40e3ce){if(!_0x40e3ce){_0x5829c7[_0x48b5('0x2a')](0x194);}return _0x40e3ce;};}function handleError(_0x450d92,_0x1b84da){_0x1b84da=_0x1b84da||0x1f4;return function(_0x5a83cb){logger['error'](_0x5a83cb[_0x48b5('0x3c')]);if(_0x5a83cb[_0x48b5('0x3d')]){delete _0x5a83cb[_0x48b5('0x3d')];}_0x450d92[_0x48b5('0x2c')](_0x1b84da)[_0x48b5('0x3e')](_0x5a83cb);};}exports[_0x48b5('0x3f')]=function(_0x3e62b1,_0x3ccf84){var _0xd308bc={'include':[{'model':db[_0x48b5('0x40')],'as':_0x48b5('0x41')}]},_0x8aa174={},_0x3d01b1={'count':0x0,'rows':[]};var _0xb05e5e=_['map'](db['WhatsappAccount'][_0x48b5('0x42')],function(_0x158939){return{'name':_0x158939['fieldName'],'type':_0x158939[_0x48b5('0x43')][_0x48b5('0x44')]};});_0x8aa174[_0x48b5('0x45')]=_[_0x48b5('0x46')](_0xb05e5e,_0x48b5('0x3d'));_0x8aa174[_0x48b5('0x47')]=_['keys'](_0x3e62b1['query']);_0x8aa174[_0x48b5('0x48')]=_[_0x48b5('0x49')](_0x8aa174[_0x48b5('0x45')],_0x8aa174[_0x48b5('0x47')]);_0xd308bc[_0x48b5('0x4a')]=_[_0x48b5('0x49')](_0x8aa174['model'],qs['fields'](_0x3e62b1[_0x48b5('0x47')][_0x48b5('0x4b')]));_0xd308bc[_0x48b5('0x4a')]=_0xd308bc[_0x48b5('0x4a')][_0x48b5('0x4c')]?_0xd308bc[_0x48b5('0x4a')]:_0x8aa174[_0x48b5('0x45')];if(!_0x3e62b1[_0x48b5('0x47')][_0x48b5('0x4d')]('nolimit')){_0xd308bc[_0x48b5('0x2e')]=qs[_0x48b5('0x2e')](_0x3e62b1[_0x48b5('0x47')]['limit']);_0xd308bc[_0x48b5('0x2d')]=qs[_0x48b5('0x2d')](_0x3e62b1[_0x48b5('0x47')][_0x48b5('0x2d')]);}_0xd308bc['order']=qs[_0x48b5('0x4e')](_0x3e62b1[_0x48b5('0x47')]['sort']);_0xd308bc[_0x48b5('0x4f')]=qs['filters'](_['pick'](_0x3e62b1['query'],_0x8aa174[_0x48b5('0x48')]),_0xb05e5e);if(_0x3e62b1[_0x48b5('0x47')][_0x48b5('0x50')]){_0xd308bc[_0x48b5('0x4f')]=_[_0x48b5('0x51')](_0xd308bc[_0x48b5('0x4f')],{'$or':_[_0x48b5('0x46')](_0xb05e5e,function(_0x2a3b42){if(_0x2a3b42[_0x48b5('0x43')]!==_0x48b5('0x52')){var _0x3c4b2f={};_0x3c4b2f[_0x2a3b42[_0x48b5('0x3d')]]={'$like':'%'+_0x3e62b1['query']['filter']+'%'};return _0x3c4b2f;}})});}_0xd308bc=_['merge']({},_0xd308bc,_0x3e62b1[_0x48b5('0x53')]);var _0x4a3701={'where':_0xd308bc[_0x48b5('0x4f')]};return db[_0x48b5('0x54')][_0x48b5('0x30')](_0x4a3701)[_0x48b5('0x37')](function(_0x555f91){_0x3d01b1[_0x48b5('0x30')]=_0x555f91;if(_0x3e62b1['query'][_0x48b5('0x55')]){_0xd308bc[_0x48b5('0x56')]=[{'all':!![]}];}return db[_0x48b5('0x54')]['findAll'](_0xd308bc);})['then'](function(_0x289b23){_0x3d01b1[_0x48b5('0x57')]=_0x289b23;return _0x3d01b1;})['then'](respondWithFilteredResult(_0x3ccf84,_0xd308bc))[_0x48b5('0x28')](handleError(_0x3ccf84,null));};exports[_0x48b5('0x58')]=function(_0xd53363,_0x1668d7){var _0x2791c3={'raw':![],'where':{'id':_0xd53363['params']['id']},'include':[{'model':db['Pause'],'as':_0x48b5('0x41')}]},_0x5e19a6={};_0x5e19a6[_0x48b5('0x45')]=_[_0x48b5('0x59')](db[_0x48b5('0x54')][_0x48b5('0x42')]);_0x5e19a6[_0x48b5('0x47')]=_[_0x48b5('0x59')](_0xd53363[_0x48b5('0x47')]);_0x5e19a6[_0x48b5('0x48')]=_[_0x48b5('0x49')](_0x5e19a6[_0x48b5('0x45')],_0x5e19a6[_0x48b5('0x47')]);_0x2791c3['attributes']=_['intersection'](_0x5e19a6[_0x48b5('0x45')],qs['fields'](_0xd53363[_0x48b5('0x47')]['fields']));_0x2791c3['attributes']=_0x2791c3[_0x48b5('0x4a')]['length']?_0x2791c3[_0x48b5('0x4a')]:_0x5e19a6[_0x48b5('0x45')];if(_0xd53363[_0x48b5('0x47')][_0x48b5('0x55')]){_0x2791c3[_0x48b5('0x56')]=[{'all':!![]}];}_0x2791c3=_[_0x48b5('0x51')]({},_0x2791c3,_0xd53363['options']);return db[_0x48b5('0x54')]['find'](_0x2791c3)[_0x48b5('0x37')](handleEntityNotFound(_0x1668d7,null))[_0x48b5('0x37')](respondWithResult(_0x1668d7,null))[_0x48b5('0x28')](handleError(_0x1668d7,null));};exports[_0x48b5('0x5a')]=function(_0x562367,_0x11bc06){return db['WhatsappAccount'][_0x48b5('0x5a')](_0x562367['body'],{})[_0x48b5('0x37')](function(_0x1bc3f3){var _0xf0ca1c=_0x562367[_0x48b5('0x5b')][_0x48b5('0x38')]({'plain':!![]});if(!_0xf0ca1c)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0xf0ca1c[_0x48b5('0x5c')]===_0x48b5('0x5b')){var _0x16bfe6=_0x1bc3f3['get']({'plain':!![]});var _0x4304b9=_0x48b5('0x39');return db[_0x48b5('0x5d')][_0x48b5('0x5e')]({'where':{'name':_0x4304b9,'userProfileId':_0xf0ca1c[_0x48b5('0x5f')]},'raw':!![]})[_0x48b5('0x37')](function(_0x3d8e80){if(_0x3d8e80&&_0x3d8e80[_0x48b5('0x60')]===0x0){return db[_0x48b5('0x3a')]['create']({'name':_0x16bfe6['name'],'resourceId':_0x16bfe6['id'],'type':_0x3d8e80[_0x48b5('0x3d')],'sectionId':_0x3d8e80['id']},{})[_0x48b5('0x37')](function(){return _0x1bc3f3;});}else{return _0x1bc3f3;}})['catch'](function(_0x4d97f2){logger['error'](_0x48b5('0x61'),_0x4d97f2);throw _0x4d97f2;});}return _0x1bc3f3;})[_0x48b5('0x37')](respondWithResult(_0x11bc06,0xc9))['catch'](handleError(_0x11bc06,null));};exports['update']=function(_0x3fb0b2,_0x3d8f15){if(_0x3fb0b2['body']['id']){delete _0x3fb0b2['body']['id'];}return db[_0x48b5('0x54')]['find']({'where':{'id':_0x3fb0b2[_0x48b5('0x62')]['id']},'include':[{'model':db['Pause'],'as':'mandatoryDispositionPause'}]})[_0x48b5('0x37')](handleEntityNotFound(_0x3d8f15,null))['then'](saveUpdates(_0x3fb0b2[_0x48b5('0x63')],null))[_0x48b5('0x37')](respondWithResult(_0x3d8f15,null))[_0x48b5('0x28')](handleError(_0x3d8f15,null));};exports[_0x48b5('0x3b')]=function(_0x3b1bc4,_0x236454){return db[_0x48b5('0x54')][_0x48b5('0x5e')]({'where':{'id':_0x3b1bc4[_0x48b5('0x62')]['id']}})[_0x48b5('0x37')](handleEntityNotFound(_0x236454,null))[_0x48b5('0x37')](removeEntity(_0x236454,null))[_0x48b5('0x28')](handleError(_0x236454,null));};exports[_0x48b5('0x64')]=function(_0x4550ff,_0x2507c0){return db['WhatsappAccount'][_0x48b5('0x64')]()[_0x48b5('0x37')](respondWithResult(_0x2507c0,null))[_0x48b5('0x28')](handleError(_0x2507c0,null));};exports[_0x48b5('0x65')]=function(_0x31cc3f,_0x31b5b5,_0x473215){if(_0x31cc3f[_0x48b5('0x63')]['id']){delete _0x31cc3f[_0x48b5('0x63')]['id'];}return db[_0x48b5('0x54')][_0x48b5('0x5e')]({'where':{'id':_0x31cc3f[_0x48b5('0x62')]['id']}})[_0x48b5('0x37')](handleEntityNotFound(_0x31b5b5,null))['then'](function(_0x2951fb){if(_0x2951fb){_0x31cc3f[_0x48b5('0x63')][_0x48b5('0x66')]=_0x2951fb['id'];return db['Disposition'][_0x48b5('0x5a')](_0x31cc3f[_0x48b5('0x63')]);}})[_0x48b5('0x37')](respondWithResult(_0x31b5b5,null))['catch'](handleError(_0x31b5b5,null));};exports[_0x48b5('0x67')]=function(_0x2801ac,_0x457c51,_0x4413fa){var _0x52ca70={'raw':![],'where':{}};var _0x52764d={};var _0x19030d={'count':0x0,'rows':[]};return db[_0x48b5('0x54')]['findOne']({'where':{'id':_0x2801ac['params']['id']}})['then'](handleEntityNotFound(_0x457c51,null))[_0x48b5('0x37')](function(_0x4d1b95){if(_0x4d1b95){_0x52764d[_0x48b5('0x45')]=_[_0x48b5('0x59')](db[_0x48b5('0x68')][_0x48b5('0x42')]);_0x52764d[_0x48b5('0x47')]=_['keys'](_0x2801ac['query']);_0x52764d[_0x48b5('0x48')]=_['intersection'](_0x52764d['model'],_0x52764d[_0x48b5('0x47')]);_0x52ca70[_0x48b5('0x4a')]=_['intersection'](_0x52764d['model'],qs[_0x48b5('0x4b')](_0x2801ac['query'][_0x48b5('0x4b')]));_0x52ca70[_0x48b5('0x4a')]=_0x52ca70[_0x48b5('0x4a')][_0x48b5('0x4c')]?_0x52ca70['attributes']:_0x52764d['model'];if(!_0x2801ac['query'][_0x48b5('0x4d')](_0x48b5('0x69'))){_0x52ca70[_0x48b5('0x2e')]=qs['limit'](_0x2801ac[_0x48b5('0x47')][_0x48b5('0x2e')]);_0x52ca70[_0x48b5('0x2d')]=qs[_0x48b5('0x2d')](_0x2801ac[_0x48b5('0x47')][_0x48b5('0x2d')]);}_0x52ca70[_0x48b5('0x6a')]=qs[_0x48b5('0x4e')](_0x2801ac[_0x48b5('0x47')][_0x48b5('0x4e')]);_0x52ca70[_0x48b5('0x4f')]=qs[_0x48b5('0x48')](_[_0x48b5('0x6b')](_0x2801ac[_0x48b5('0x47')],_0x52764d['filters']));_0x52ca70[_0x48b5('0x4f')][_0x48b5('0x66')]=_0x4d1b95['id'];if(_0x2801ac[_0x48b5('0x47')][_0x48b5('0x50')]){_0x52ca70['where']=_[_0x48b5('0x51')](_0x52ca70[_0x48b5('0x4f')],{'$or':_['map'](_0x52ca70[_0x48b5('0x4a')],function(_0x281c0b){var _0x96bec8={};_0x96bec8[_0x281c0b]={'$like':'%'+_0x2801ac['query'][_0x48b5('0x50')]+'%'};return _0x96bec8;})});}_0x52ca70=_[_0x48b5('0x51')]({},_0x52ca70,_0x2801ac['options']);return db[_0x48b5('0x68')][_0x48b5('0x30')]({'where':_0x52ca70[_0x48b5('0x4f')]})[_0x48b5('0x37')](function(_0x5cbbeb){_0x19030d[_0x48b5('0x30')]=_0x5cbbeb;if(_0x2801ac[_0x48b5('0x47')][_0x48b5('0x55')]){_0x52ca70[_0x48b5('0x56')]=[{'all':!![]}];}return db[_0x48b5('0x68')]['findAll'](_0x52ca70);})['then'](function(_0x4d0411){_0x19030d[_0x48b5('0x57')]=_0x4d0411;return _0x19030d;});}})[_0x48b5('0x37')](respondWithFilteredResult(_0x457c51,_0x52ca70))['catch'](handleError(_0x457c51,null));};exports['removeDispositions']=function(_0x4e4dcd,_0x53e940,_0x407028){return db['WhatsappAccount'][_0x48b5('0x5e')]({'where':{'id':_0x4e4dcd['params']['id']}})[_0x48b5('0x37')](handleEntityNotFound(_0x53e940,null))[_0x48b5('0x37')](function(_0x207042){if(_0x207042){return _0x207042[_0x48b5('0x6c')](_0x4e4dcd['query']['ids']);}})[_0x48b5('0x37')](respondWithStatusCode(_0x53e940,null))['catch'](handleError(_0x53e940,null));};exports['addAnswer']=function(_0x110d99,_0x3861ed,_0x58efd6){if(_0x110d99[_0x48b5('0x63')]['id']){delete _0x110d99[_0x48b5('0x63')]['id'];}return db[_0x48b5('0x54')]['find']({'where':{'id':_0x110d99[_0x48b5('0x62')]['id']}})['then'](handleEntityNotFound(_0x3861ed,null))[_0x48b5('0x37')](function(_0x1d0702){if(_0x1d0702){_0x110d99[_0x48b5('0x63')][_0x48b5('0x66')]=_0x1d0702['id'];return db['CannedAnswer'][_0x48b5('0x5a')](_0x110d99[_0x48b5('0x63')]);}})[_0x48b5('0x37')](respondWithResult(_0x3861ed,null))[_0x48b5('0x28')](handleError(_0x3861ed,null));};exports[_0x48b5('0x6d')]=function(_0x53d0f1,_0x13d0ea,_0x3cbf9e){var _0x27876c={'raw':![],'where':{}};var _0x1e6155={};var _0x29860e={'count':0x0,'rows':[]};return db[_0x48b5('0x54')][_0x48b5('0x6e')]({'where':{'id':_0x53d0f1[_0x48b5('0x62')]['id']}})[_0x48b5('0x37')](handleEntityNotFound(_0x13d0ea,null))[_0x48b5('0x37')](function(_0x195ddd){if(_0x195ddd){_0x1e6155['model']=_[_0x48b5('0x59')](db['CannedAnswer'][_0x48b5('0x42')]);_0x1e6155['query']=_[_0x48b5('0x59')](_0x53d0f1[_0x48b5('0x47')]);_0x1e6155[_0x48b5('0x48')]=_[_0x48b5('0x49')](_0x1e6155[_0x48b5('0x45')],_0x1e6155[_0x48b5('0x47')]);_0x27876c[_0x48b5('0x4a')]=_[_0x48b5('0x49')](_0x1e6155['model'],qs['fields'](_0x53d0f1[_0x48b5('0x47')][_0x48b5('0x4b')]));_0x27876c[_0x48b5('0x4a')]=_0x27876c[_0x48b5('0x4a')]['length']?_0x27876c['attributes']:_0x1e6155[_0x48b5('0x45')];if(!_0x53d0f1[_0x48b5('0x47')]['hasOwnProperty'](_0x48b5('0x69'))){_0x27876c['limit']=qs[_0x48b5('0x2e')](_0x53d0f1[_0x48b5('0x47')][_0x48b5('0x2e')]);_0x27876c[_0x48b5('0x2d')]=qs[_0x48b5('0x2d')](_0x53d0f1[_0x48b5('0x47')][_0x48b5('0x2d')]);}_0x27876c['order']=qs[_0x48b5('0x4e')](_0x53d0f1[_0x48b5('0x47')]['sort']);_0x27876c[_0x48b5('0x4f')]=qs[_0x48b5('0x48')](_['pick'](_0x53d0f1[_0x48b5('0x47')],_0x1e6155[_0x48b5('0x48')]));_0x27876c[_0x48b5('0x4f')]['WhatsappAccountId']=_0x195ddd['id'];if(_0x53d0f1['query'][_0x48b5('0x50')]){_0x27876c[_0x48b5('0x4f')]=_[_0x48b5('0x51')](_0x27876c['where'],{'$or':_['map'](_0x27876c[_0x48b5('0x4a')],function(_0x1540e8){var _0x5d4f5e={};_0x5d4f5e[_0x1540e8]={'$like':'%'+_0x53d0f1[_0x48b5('0x47')][_0x48b5('0x50')]+'%'};return _0x5d4f5e;})});}_0x27876c=_[_0x48b5('0x51')]({},_0x27876c,_0x53d0f1[_0x48b5('0x53')]);return db[_0x48b5('0x6f')][_0x48b5('0x30')]({'where':_0x27876c[_0x48b5('0x4f')]})[_0x48b5('0x37')](function(_0x2b3030){_0x29860e[_0x48b5('0x30')]=_0x2b3030;if(_0x53d0f1['query']['includeAll']){_0x27876c[_0x48b5('0x56')]=[{'all':!![]}];}return db[_0x48b5('0x6f')][_0x48b5('0x70')](_0x27876c);})[_0x48b5('0x37')](function(_0x2b2858){_0x29860e[_0x48b5('0x57')]=_0x2b2858;return _0x29860e;});}})['then'](respondWithFilteredResult(_0x13d0ea,_0x27876c))[_0x48b5('0x28')](handleError(_0x13d0ea,null));};exports[_0x48b5('0x71')]=function(_0x1cb5b2,_0x48a34f,_0x34e88a){return db[_0x48b5('0x54')]['find']({'where':{'id':_0x1cb5b2['params']['id']}})['then'](handleEntityNotFound(_0x48a34f,null))['then'](function(_0x13dd35){if(_0x13dd35){return _0x13dd35[_0x48b5('0x71')](_0x1cb5b2[_0x48b5('0x47')][_0x48b5('0x72')]);}})[_0x48b5('0x37')](respondWithStatusCode(_0x48a34f,null))['catch'](handleError(_0x48a34f,null));};exports[_0x48b5('0x73')]=function(_0x2a27f0,_0x1cbbc0,_0x3f4800){return db[_0x48b5('0x54')][_0x48b5('0x5e')]({'where':{'id':_0x2a27f0[_0x48b5('0x62')]['id']}})['then'](handleEntityNotFound(_0x1cbbc0,null))[_0x48b5('0x37')](function(_0x561666){if(_0x561666){return _0x561666['addAgents'](_0x2a27f0['body'][_0x48b5('0x72')],_[_0x48b5('0x74')](_0x2a27f0[_0x48b5('0x63')],[_0x48b5('0x72'),'id'])||{})[_0x48b5('0x75')](function(_0x4d5ed6){for(var _0x1b0592=0x0;_0x1b0592<_0x2a27f0[_0x48b5('0x63')][_0x48b5('0x72')][_0x48b5('0x4c')];_0x1b0592+=0x1){socket[_0x48b5('0x76')]('userWhatsappAccount:save',{'UserId':Number(_0x2a27f0[_0x48b5('0x63')][_0x48b5('0x72')][_0x1b0592]),'WhatsappAccountId':Number(_0x2a27f0[_0x48b5('0x62')]['id'])});}return _0x4d5ed6;});}})['then'](respondWithResult(_0x1cbbc0,null))[_0x48b5('0x28')](handleError(_0x1cbbc0,null));};exports['removeAgents']=function(_0x2c7efa,_0x292e43,_0x1cd3ba){return db[_0x48b5('0x54')]['find']({'where':{'id':_0x2c7efa[_0x48b5('0x62')]['id']}})[_0x48b5('0x37')](handleEntityNotFound(_0x292e43,null))['then'](function(_0x428d7e){if(_0x428d7e){return _0x428d7e[_0x48b5('0x77')](_0x2c7efa[_0x48b5('0x47')][_0x48b5('0x72')])[_0x48b5('0x37')](function(){if(_[_0x48b5('0x78')](_0x2c7efa[_0x48b5('0x47')][_0x48b5('0x72')])){for(var _0x2414af=0x0;_0x2414af<_0x2c7efa['query'][_0x48b5('0x72')][_0x48b5('0x4c')];_0x2414af+=0x1){socket[_0x48b5('0x76')]('userWhatsappAccount:remove',{'UserId':Number(_0x2c7efa['query'][_0x48b5('0x72')][_0x2414af]),'WhatsappAccountId':Number(_0x2c7efa[_0x48b5('0x62')]['id'])});}}else{socket[_0x48b5('0x76')](_0x48b5('0x79'),{'UserId':Number(_0x2c7efa[_0x48b5('0x47')][_0x48b5('0x72')]),'WhatsappAccountId':Number(_0x2c7efa[_0x48b5('0x62')]['id'])});}});}})[_0x48b5('0x37')](respondWithStatusCode(_0x292e43,null))[_0x48b5('0x28')](handleError(_0x292e43,null));};exports[_0x48b5('0x7a')]=function(_0xc3f676,_0xe0eac3,_0x7c3b75){var _0x6f0f77={};var _0x1c1415={};var _0x10bdcc;var _0x341423;return db['WhatsappAccount'][_0x48b5('0x6e')]({'where':{'id':_0xc3f676[_0x48b5('0x62')]['id']}})[_0x48b5('0x37')](handleEntityNotFound(_0xe0eac3,null))[_0x48b5('0x37')](function(_0x5f3b2d){if(_0x5f3b2d){_0x10bdcc=_0x5f3b2d;_0x1c1415[_0x48b5('0x45')]=_[_0x48b5('0x59')](db['User']['rawAttributes']);_0x1c1415['query']=_[_0x48b5('0x59')](_0xc3f676[_0x48b5('0x47')]);_0x1c1415[_0x48b5('0x48')]=_[_0x48b5('0x49')](_0x1c1415['model'],_0x1c1415[_0x48b5('0x47')]);_0x6f0f77[_0x48b5('0x4a')]=_[_0x48b5('0x49')](_0x1c1415['model'],qs['fields'](_0xc3f676[_0x48b5('0x47')]['fields']));_0x6f0f77['attributes']=_0x6f0f77['attributes']['length']?_0x6f0f77[_0x48b5('0x4a')]:_0x1c1415[_0x48b5('0x45')];_0x6f0f77[_0x48b5('0x6a')]=qs[_0x48b5('0x4e')](_0xc3f676['query']['sort']);_0x6f0f77[_0x48b5('0x4f')]=qs['filters'](_[_0x48b5('0x6b')](_0xc3f676['query'],_0x1c1415[_0x48b5('0x48')]));if(_0xc3f676[_0x48b5('0x47')][_0x48b5('0x50')]){_0x6f0f77[_0x48b5('0x4f')]=_[_0x48b5('0x51')](_0x6f0f77['where'],{'$or':_['map'](_0x6f0f77['attributes'],function(_0x373e0d){var _0x26989d={};_0x26989d[_0x373e0d]={'$like':'%'+_0xc3f676[_0x48b5('0x47')][_0x48b5('0x50')]+'%'};return _0x26989d;})});}_0x6f0f77=_[_0x48b5('0x51')]({},_0x6f0f77,_0xc3f676[_0x48b5('0x53')]);return _0x10bdcc[_0x48b5('0x7a')](_0x6f0f77);}})[_0x48b5('0x37')](function(_0x32d606){if(_0x32d606){_0x341423=_0x32d606['length'];if(!_0xc3f676['query']['hasOwnProperty'](_0x48b5('0x69'))){_0x6f0f77[_0x48b5('0x2e')]=qs[_0x48b5('0x2e')](_0xc3f676['query'][_0x48b5('0x2e')]);_0x6f0f77[_0x48b5('0x2d')]=qs[_0x48b5('0x2d')](_0xc3f676[_0x48b5('0x47')][_0x48b5('0x2d')]);}return _0x10bdcc[_0x48b5('0x7a')](_0x6f0f77);}})[_0x48b5('0x37')](function(_0x25eab4){if(_0x25eab4){return _0x25eab4?{'count':_0x341423,'rows':_0x25eab4}:null;}})[_0x48b5('0x37')](respondWithResult(_0xe0eac3,null))['catch'](handleError(_0xe0eac3,null));};exports[_0x48b5('0x7b')]=function(_0x3eba0,_0xa96f5b){var _0x24b357=_0x3eba0[_0x48b5('0x62')]['id'];var _0x303e9b=_0x3eba0[_0x48b5('0x63')];var _0x34bd7a=0xc8;var _0x35fcd2=null;return db[_0x48b5('0x7c')][_0x48b5('0x7d')]({'isolationLevel':db[_0x48b5('0x7c')][_0x48b5('0x7e')][_0x48b5('0x7f')][_0x48b5('0x80')]},function(_0x369673){return db['WhatsappAccount'][_0x48b5('0x6e')]({'where':{'id':_0x24b357},'transaction':_0x369673})[_0x48b5('0x37')](function(_0x1971be){if(_0x1971be){return db[_0x48b5('0x81')][_0x48b5('0x3b')]({'where':{'WhatsappAccountId':_0x24b357},'transaction':_0x369673})[_0x48b5('0x37')](function(){var _0x1214c0=_[_0x48b5('0x46')](_0x303e9b,function(_0x3c51ee){_0x3c51ee['WhatsappAccountId']=_0x24b357;return _0x3c51ee;});return db[_0x48b5('0x81')][_0x48b5('0x82')](_0x1214c0,{'transaction':_0x369673});});}else{_0x34bd7a=0x194;_0x35fcd2=[];}});})[_0x48b5('0x37')](function(){if(_0x34bd7a!==0x194){return db[_0x48b5('0x81')]['findAndCountAll']({'where':{'WhatsappAccountId':_0x24b357},'order':_0x48b5('0x83')})[_0x48b5('0x37')](function(_0x2c6bcd){_0x35fcd2=_0x2c6bcd;});}})['catch'](function(_0xcc3744){_0x34bd7a=0x1f4;logger[_0x48b5('0x24')](_0xcc3744[_0x48b5('0x3c')]);if(_0xcc3744[_0x48b5('0x3d')]){delete _0xcc3744[_0x48b5('0x3d')];}_0x35fcd2=_0xcc3744;})[_0x48b5('0x84')](function(){if(_0x35fcd2===null){_0xa96f5b[_0x48b5('0x2a')](_0x34bd7a);}else{if(_0x34bd7a===0x1f4){_0xa96f5b['status'](_0x34bd7a)[_0x48b5('0x3e')](_0x35fcd2);}else{_0xa96f5b[_0x48b5('0x2c')](_0x34bd7a)['json'](_0x35fcd2);}}});};exports['getApplications']=function(_0x32008b,_0x2cb487,_0x56a172){var _0x3531c1={};var _0x52e4db={};var _0x5798e1;var _0xf9bb9b;return db[_0x48b5('0x54')][_0x48b5('0x6e')]({'where':{'id':_0x32008b[_0x48b5('0x62')]['id']}})[_0x48b5('0x37')](handleEntityNotFound(_0x2cb487,null))[_0x48b5('0x37')](function(_0x32dbaa){if(_0x32dbaa){_0x5798e1=_0x32dbaa;_0x52e4db[_0x48b5('0x45')]=_[_0x48b5('0x59')](db[_0x48b5('0x81')][_0x48b5('0x42')]);_0x52e4db['query']=_['keys'](_0x32008b[_0x48b5('0x47')]);_0x52e4db['filters']=_['intersection'](_0x52e4db[_0x48b5('0x45')],_0x52e4db[_0x48b5('0x47')]);_0x3531c1['attributes']=_['intersection'](_0x52e4db[_0x48b5('0x45')],qs['fields'](_0x32008b[_0x48b5('0x47')]['fields']));_0x3531c1[_0x48b5('0x4a')]=_0x3531c1['attributes'][_0x48b5('0x4c')]?_0x3531c1['attributes']:_0x52e4db['model'];_0x3531c1[_0x48b5('0x6a')]=qs[_0x48b5('0x4e')](_0x32008b[_0x48b5('0x47')][_0x48b5('0x4e')]);_0x3531c1[_0x48b5('0x4f')]=qs[_0x48b5('0x48')](_[_0x48b5('0x6b')](_0x32008b['query'],_0x52e4db['filters']));if(_0x32008b[_0x48b5('0x47')][_0x48b5('0x50')]){_0x3531c1[_0x48b5('0x4f')]=_[_0x48b5('0x51')](_0x3531c1[_0x48b5('0x4f')],{'$or':_[_0x48b5('0x46')](_0x3531c1[_0x48b5('0x4a')],function(_0x1bcb4f){var _0x149114={};_0x149114[_0x1bcb4f]={'$like':'%'+_0x32008b['query'][_0x48b5('0x50')]+'%'};return _0x149114;})});}_0x3531c1=_[_0x48b5('0x51')]({},_0x3531c1,_0x32008b[_0x48b5('0x53')]);return _0x5798e1['getApplications'](_0x3531c1);}})[_0x48b5('0x37')](function(_0x23b797){if(_0x23b797){_0xf9bb9b=_0x23b797[_0x48b5('0x4c')];if(!_0x32008b['query'][_0x48b5('0x4d')](_0x48b5('0x69'))){_0x3531c1[_0x48b5('0x2e')]=qs['limit'](_0x32008b['query']['limit']);_0x3531c1[_0x48b5('0x2d')]=qs[_0x48b5('0x2d')](_0x32008b[_0x48b5('0x47')][_0x48b5('0x2d')]);}return _0x5798e1[_0x48b5('0x85')](_0x3531c1);}})[_0x48b5('0x37')](function(_0x9cd698){if(_0x9cd698){return _0x9cd698?{'count':_0xf9bb9b,'rows':_0x9cd698}:null;}})[_0x48b5('0x37')](respondWithResult(_0x2cb487,null))[_0x48b5('0x28')](handleError(_0x2cb487,null));};exports[_0x48b5('0x86')]=function(_0x2a8145,_0x48582f,_0x87c6c1){var _0x28a81a={'channel':_0x48b5('0x87')};var _0x542b12=[];var _0x1f36f3=[];var _0x419740={};return db[_0x48b5('0x54')][_0x48b5('0x5e')]({'where':{'id':_0x2a8145['params']['id']},'include':[{'model':db[_0x48b5('0x81')],'as':_0x48b5('0x88')}]})['then'](handleEntityNotFound(_0x48582f,null))[_0x48b5('0x37')](function(_0x477865){_0x28a81a['account']=_0x477865;if(_0x28a81a[_0x48b5('0x89')]&&_0x28a81a[_0x48b5('0x89')][_0x48b5('0x43')]===_0x48b5('0x8a')&&_0x2a8145[_0x48b5('0x63')][_0x48b5('0x8b')]){if(_0x2a8145[_0x48b5('0x63')][_0x48b5('0x8b')][_0x48b5('0x4c')]===0x0)return;if(_0x2a8145['body'][_0x48b5('0x8b')][0x0][_0x48b5('0x8c')]!=='read')return;return db[_0x48b5('0x8d')][_0x48b5('0x36')]({'read':!![],'readAt':_0x2a8145[_0x48b5('0x63')][_0x48b5('0x8b')][0x0][_0x48b5('0x8e')]},{'where':{'messageId':_0x2a8145[_0x48b5('0x63')][_0x48b5('0x8b')][0x0][_0x48b5('0x8f')]},'individualHooks':!![]})['then'](function(_0x617fb8){return _0x48582f[_0x48b5('0x2c')](0xc8)[_0x48b5('0x32')](_0x617fb8);});}_0x28a81a[_0x48b5('0x90')]=_[_0x48b5('0x91')](_0x477865[_0x48b5('0x88')],[_0x48b5('0x83')],[_0x48b5('0x92')]);if(_0x28a81a[_0x48b5('0x89')]['Applications']){delete _0x28a81a[_0x48b5('0x89')][_0x48b5('0x88')];}return db[_0x48b5('0x93')][_0x48b5('0x64')]()[_0x48b5('0x37')](function(_0x4b255a){if(!_0x4b255a){throw new db[(_0x48b5('0x94'))]['ValidationError'](_0x48b5('0x95'));}_0x542b12=_[_0x48b5('0x96')](_[_0x48b5('0x59')](_0x4b255a),[_0x48b5('0x97'),'updatedAt']);_0x1f36f3=_[_0x48b5('0x96')](_[_0x48b5('0x59')](_0x4b255a),['createdAt',_0x48b5('0x98'),_0x48b5('0x99'),_0x48b5('0x9a')]);_0x28a81a[_0x48b5('0x63')]={'mapKey':_0x48b5('0x9b')};if(_0x28a81a[_0x48b5('0x89')]&&_0x28a81a[_0x48b5('0x89')][_0x48b5('0x43')]===_0x48b5('0x9c')){_0x28a81a['body']['from']=_0x2a8145[_0x48b5('0x63')][_0x48b5('0x9d')][_0x48b5('0x9e')](_0x48b5('0x9f'),'');_0x28a81a[_0x48b5('0x63')][_0x48b5('0x63')]=_0x2a8145[_0x48b5('0x63')][_0x48b5('0xa0')];_0x28a81a[_0x48b5('0x63')][_0x48b5('0xa1')]=_0x2a8145[_0x48b5('0x63')][_0x48b5('0xa2')];}if(_0x28a81a[_0x48b5('0x89')]&&_0x28a81a[_0x48b5('0x89')][_0x48b5('0x43')]===_0x48b5('0x8a')){_0x28a81a[_0x48b5('0x63')][_0x48b5('0xa3')]=_0x2a8145['body'][_0x48b5('0xa4')][0x0][_0x48b5('0xa3')];_0x28a81a[_0x48b5('0x63')][_0x48b5('0x63')]=_0x2a8145[_0x48b5('0x63')]['notifications'][0x0][_0x48b5('0x26')][_0x48b5('0x63')];_0x28a81a[_0x48b5('0x63')][_0x48b5('0xa1')]=_0x2a8145[_0x48b5('0x63')][_0x48b5('0xa4')][0x0][_0x48b5('0x8f')];}if(_0x28a81a[_0x48b5('0x63')]['id']){delete _0x28a81a['body']['id'];}if(_['isNil'](_0x28a81a[_0x48b5('0x63')][_0x48b5('0xa3')])){throw new db[(_0x48b5('0x94'))][(_0x48b5('0xa5'))](_0x48b5('0xa6'));}if(_[_0x48b5('0xa7')](_0x28a81a[_0x48b5('0x63')][_0x48b5('0x63')])||_0x28a81a[_0x48b5('0x63')]['body']===''){throw new db[(_0x48b5('0x94'))][(_0x48b5('0xa5'))](_0x48b5('0xa8'));}if(_[_0x48b5('0xa7')](_0x28a81a[_0x48b5('0x63')]['mapKey'])){throw new db[(_0x48b5('0x94'))][(_0x48b5('0xa5'))](_0x48b5('0xa9')+_0x1f36f3);}if(!_['includes'](_0x1f36f3,_0x28a81a[_0x48b5('0x63')]['mapKey'])){throw new db[(_0x48b5('0x94'))][(_0x48b5('0xa5'))](_0x48b5('0xaa')+_0x1f36f3);}_0x419740[_0x28a81a['body'][_0x48b5('0xab')]]=_0x28a81a[_0x48b5('0x63')]['from'];return db[_0x48b5('0xac')][_0x48b5('0x5e')]({'where':{'id':_0x28a81a['account'][_0x48b5('0x9a')]},'include':[{'model':db['CmContact'],'as':_0x48b5('0xad'),'where':_0x419740,'limit':0x1,'order':[[_0x48b5('0x98'),_0x48b5('0xae')]]}]});})['then'](handleEntityNotFound(_0x48582f,null))[_0x48b5('0x37')](function(_0x1d458d){if(_0x1d458d){_0x28a81a['list']=_['omit'](_0x1d458d,[_0x48b5('0xad')]);if(_0x1d458d[_0x48b5('0xad')]['length']){return _0x1d458d[_0x48b5('0xad')][0x0];}var _0x524be4=_[_0x48b5('0x18')](_0x28a81a[_0x48b5('0x63')],{'firstName':_0x28a81a[_0x48b5('0x63')][_0x48b5('0xa3')],'ListId':_0x1d458d['id']});_0x524be4[_0x28a81a[_0x48b5('0x63')][_0x48b5('0xab')]]=_0x28a81a['body'][_0x48b5('0xa3')];return db['CmContact'][_0x48b5('0x5a')](_0x524be4,{'fields':_0x542b12,'raw':!![]});}})[_0x48b5('0x37')](handleEntityNotFound(_0x48582f,null))[_0x48b5('0x37')](function(_0x2355d7){if(_0x2355d7){_0x28a81a['contact']=_0x2355d7;var _0xa8d8b5={'ContactId':_0x2355d7['id'],'phone':_0x28a81a[_0x48b5('0x63')][_0x48b5('0xa3')],'WhatsappAccountId':_0x2a8145[_0x48b5('0x62')]['id']};var _0x127113={'ContactId':_0x2355d7['id'],'WhatsappAccountId':_0x2a8145[_0x48b5('0x62')]['id'],'closed':![]};return db['WhatsappInteraction'][_0x48b5('0x5e')]({'where':_0x127113})['then'](function(_0x1a807c){if(_0x1a807c){return[_0x1a807c,![]];}return db[_0x48b5('0xaf')][_0x48b5('0x5a')](_0xa8d8b5)[_0x48b5('0x37')](function(_0x2458a0){return[_0x2458a0,!![]];});});}})[_0x48b5('0x75')](function(_0x339221,_0x1b7b40){_0x28a81a[_0x48b5('0xb0')]=_0x339221[_0x48b5('0x38')]({'plain':!![]});_0x28a81a[_0x48b5('0xb0')]['created']=![];if(_0x1b7b40){if(_0x28a81a[_0x48b5('0x89')][_0x48b5('0xb1')]){_0x28a81a[_0x48b5('0x90')][_0x48b5('0xb2')]({'id':0x0,'priority':_0x28a81a['applications'][_0x48b5('0x4c')]+0x1,'app':_0x48b5('0xb3'),'appdata':'unmanaged','interval':_0x48b5('0xb4')});}_0x28a81a[_0x48b5('0xb0')][_0x48b5('0xb5')]=!![];}return db[_0x48b5('0x8d')][_0x48b5('0x5a')]({'phone':_0x28a81a['body'][_0x48b5('0xa3')],'messageId':_0x28a81a[_0x48b5('0x63')][_0x48b5('0xa1')],'body':_0x28a81a[_0x48b5('0x63')][_0x48b5('0x63')],'WhatsappAccountId':_0x2a8145['params']['id'],'WhatsappInteractionId':_0x339221['id'],'direction':'in','ContactId':_0x339221['ContactId'],'AttachmentId':_0x28a81a[_0x48b5('0x63')][_0x48b5('0xb6')]});})[_0x48b5('0x37')](function(_0x5f4df9){_0x28a81a[_0x48b5('0x26')]=_0x5f4df9;if(!_0x28a81a[_0x48b5('0xb0')][_0x48b5('0xb7')])return;return db[_0x48b5('0xb8')]['find']({'attributes':['id',_0x48b5('0x3d')],'where':{'id':_0x28a81a[_0x48b5('0xb0')][_0x48b5('0xb7')]}});})[_0x48b5('0x37')](function(_0x257854){if(_0x257854){_0x28a81a[_0x48b5('0x90')][_0x48b5('0xb9')]({'id':0x0,'priority':0x0,'app':_0x48b5('0xba'),'appdata':_0x257854[_0x48b5('0x3d')]+','+(_0x28a81a[_0x48b5('0x89')][_0x48b5('0xbb')]||0xa),'interval':_0x48b5('0xb4')});}if(!_0x28a81a[_0x48b5('0xb0')][_0x48b5('0xbc')])return;return db[_0x48b5('0xbd')]['find']({'attributes':['id',_0x48b5('0x3d')],'where':{'id':_0x28a81a[_0x48b5('0xb0')][_0x48b5('0xbc')]}});})[_0x48b5('0x37')](function(_0x36a851){if(_0x36a851){_0x28a81a[_0x48b5('0x90')]['unshift']({'id':0x0,'priority':0x1,'app':'queue','appdata':_0x36a851['name']+','+(_0x28a81a[_0x48b5('0x89')]['waitForTheAssignedQueue']||0x12c),'interval':_0x48b5('0xb4')});}return respondWithRpcPromise(_0x48b5('0xbe'),_0x48b5('0xbf'),_0x28a81a);})['then'](function(_0x131fb6){if(_0x131fb6){var _0x197183=0xc8;var _0x51fa42=_0x48b5('0xc0');logger['info']('WhatsappAccount,\x20%s,\x20%s,\x20%s',_0x51fa42,_0x197183,_0x48b5('0xc1'));logger['debug'](_0x48b5('0xc2'),_0x51fa42,_0x197183,_0x48b5('0xc1'),JSON[_0x48b5('0xc3')](_0x131fb6));if(_0x28a81a[_0x48b5('0x89')][_0x48b5('0x43')]===_0x48b5('0x9c')){return _0x48582f['status'](_0x197183)[_0x48b5('0xc4')](_0x48b5('0xc5'),_0x48b5('0xc6'))[_0x48b5('0x3e')]('<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22?>\x0a<Response></Response>');}else{return _0x48582f['status'](_0x197183)['json'](_0x131fb6);}}});})[_0x48b5('0x28')](handleError(_0x48582f,null));};exports[_0x48b5('0x3e')]=function(_0x1e0069,_0x5d5e21,_0x2150b9){var _0x4a54cc,_0x3b311b,_0x5bfb89;if(_[_0x48b5('0xa7')](_0x1e0069[_0x48b5('0x63')][_0x48b5('0x63')])||_0x1e0069[_0x48b5('0x63')][_0x48b5('0x63')]===''){throw new db[(_0x48b5('0x94'))]['ValidationError']('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0x48b5('0xa7')](_0x1e0069[_0x48b5('0x63')]['to'])){throw new db[(_0x48b5('0x94'))][(_0x48b5('0xa5'))](_0x48b5('0xc7'));}_0x4a54cc=_0x1e0069[_0x48b5('0x63')]['to'];return db['WhatsappAccount'][_0x48b5('0x5e')]({'where':{'id':_0x1e0069[_0x48b5('0x62')]['id']},'include':[{'model':db[_0x48b5('0xac')],'as':_0x48b5('0xc8'),'include':[{'model':db['CmContact'],'as':_0x48b5('0xad'),'where':{'mobile':_0x4a54cc},'limit':0x1,'order':[[_0x48b5('0x98'),'DESC']]}]}]})[_0x48b5('0x37')](handleEntityNotFound(_0x5d5e21,null))[_0x48b5('0x37')](function(_0x34f477){if(_0x34f477&&_0x34f477[_0x48b5('0xc8')]){_0x3b311b=_0x34f477['get']({'plain':!![]});if(_0x3b311b['List']&&_0x3b311b[_0x48b5('0xc8')][_0x48b5('0xad')][_0x48b5('0x4c')]){return _0x3b311b[_0x48b5('0xc8')][_0x48b5('0xad')][0x0];}return db['CmContact']['create'](_[_0x48b5('0x18')](_0x1e0069[_0x48b5('0x63')],{'firstName':_0x4a54cc,'mobile':_0x4a54cc,'phone':_0x4a54cc,'ListId':_0x3b311b[_0x48b5('0x9a')]}));}})[_0x48b5('0x37')](handleEntityNotFound(_0x5d5e21,null))[_0x48b5('0x37')](function(_0x386c9b){if(_0x386c9b){_0x5bfb89=_0x386c9b;return db[_0x48b5('0xaf')][_0x48b5('0x5e')]({'where':{'ContactId':_0x5bfb89['id'],'closed':![],'WhatsappAccountId':_0x3b311b['id']}})[_0x48b5('0x37')](function(_0x54fef1){if(_0x54fef1){return[_0x54fef1,![]];}return db['WhatsappInteraction'][_0x48b5('0x5a')]({'UserId':_0x1e0069[_0x48b5('0x5b')]['id'],'ContactId':_0x5bfb89['id'],'WhatsappAccountId':_0x3b311b['id'],'phone':_0x4a54cc,'firstMsgDirection':_0x48b5('0xc9'),'Messages':[_[_0x48b5('0x51')](_0x1e0069[_0x48b5('0x63')],{'read':![],'body':_0x1e0069[_0x48b5('0x63')][_0x48b5('0x63')],'phone':_0x4a54cc,'WhatsappAccountId':_0x3b311b['id'],'UserId':_0x1e0069[_0x48b5('0x5b')]['id'],'ContactId':_0x5bfb89['id']})]},{'include':[{'model':db[_0x48b5('0x8d')],'as':_0x48b5('0xca')}]})[_0x48b5('0x37')](function(_0x2ea4ef){return[_0x2ea4ef,!![]];});});}})[_0x48b5('0x75')](function(_0x448783,_0x4ad855){if(_0x4ad855){return _0x448783;}return db[_0x48b5('0x8d')]['create'](_[_0x48b5('0x51')](_0x1e0069[_0x48b5('0x63')],{'read':![],'body':_0x1e0069['body'][_0x48b5('0x63')],'phone':_0x4a54cc,'WhatsappAccountId':_0x3b311b['id'],'WhatsappInteractionId':_0x448783['id'],'UserId':_0x1e0069[_0x48b5('0x5b')]['id'],'ContactId':_0x5bfb89['id']}))[_0x48b5('0x37')](function(_0x6b8241){_0x448783[_0x48b5('0xcb')]['Messages']=[];_0x448783[_0x48b5('0xcb')][_0x48b5('0xca')]['push'](_0x6b8241[_0x48b5('0xcb')]);return _0x448783;});})[_0x48b5('0x37')](respondWithResult(_0x5d5e21,null))['catch'](handleError(_0x5d5e21,null));};
\ No newline at end of file
+var _0xcfc8=['../../mysqldb','redis','localhost','socket.io-emitter','jayson/promise','client','then','WhatsappAccount,\x20%s,\x20%s','request\x20sent','WhatsappAccount,\x20%s,\x20%s,\x20%s','error','code','message','info','result','catch','status','end','json','undefined','limit','count','offset','set','Content-Range','reject','save','update','destroy','get','WhatsappAccounts','UserProfileResource','sendStatus','name','send','Pause','mandatoryDispositionPause','WhatsappAccount','rawAttributes','fieldName','type','key','model','map','query','filters','intersection','attributes','fields','length','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','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','describe','addDisposition','Disposition','getDispositions','keys','WhatsappAccountId','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','hasOwnProperty','nolimit','removeAnswers','addAgents','removeAgents','isArray','emit','userWhatsappAccount:remove','getAgents','findOne','sequelize','transaction','Transaction','ISOLATION_LEVELS','WhatsappApplication','bulkCreate','findAndCountAll','priority','getApplications','notify','whatsapp','account','sinch','statuses','state','read','WhatsappMessage','message_id','applications','orderBy','Applications','CmContact','Sequelize','ValidationError','no\x20available\x20attributes','difference','createdAt','updatedAt','ListId','mobile','from','replace','whatsapp:','Body','messageId','MessageSid','notifications','isNil','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','mapKey','CmList','Contacts','DESC','list','omit','defaults','contact','WhatsappInteraction','interaction','created','autoclose','close','unmanaged','*,*,*,*','AttachmentId','User','UserId','unshift','agent','waitForTheAssignedAgent','queueId','WhatsappQueue','queue','waitForTheAssignedQueue','Start','startRouting','receiveMessage','entity\x20found','debug','WhatsappAccount,\x20%s,\x20%s,\x20%s,\x20%s','stringify','twilio','Content-Type','text/xml','List','Messages','dataValues','push','eml-format','rimraf','fast-json-patch','request-promise','moment','util','path','to-csv','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util'];(function(_0x633566,_0x545c91){var _0xb4488d=function(_0x2b4418){while(--_0x2b4418){_0x633566['push'](_0x633566['shift']());}};_0xb4488d(++_0x545c91);}(_0xcfc8,0x172));var _0x8cfc=function(_0x4e8708,_0x1d380d){_0x4e8708=_0x4e8708-0x0;var _0x4339be=_0xcfc8[_0x4e8708];return _0x4339be;};'use strict';var emlformat=require(_0x8cfc('0x0'));var rimraf=require(_0x8cfc('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x8cfc('0x2'));var rp=require(_0x8cfc('0x3'));var moment=require(_0x8cfc('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x8cfc('0x5'));var path=require(_0x8cfc('0x6'));var sox=require('sox');var csv=require(_0x8cfc('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x8cfc('0x8'));var _=require(_0x8cfc('0x9'));var squel=require(_0x8cfc('0xa'));var crypto=require('crypto');var jsforce=require(_0x8cfc('0xb'));var deskjs=require(_0x8cfc('0xc'));var toCsv=require(_0x8cfc('0x7'));var querystring=require(_0x8cfc('0xd'));var Papa=require(_0x8cfc('0xe'));var Redis=require(_0x8cfc('0xf'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x8cfc('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x8cfc('0x11'))(_0x8cfc('0x12'));var utils=require(_0x8cfc('0x13'));var config=require(_0x8cfc('0x14'));var licenseUtil=require(_0x8cfc('0x15'));var db=require(_0x8cfc('0x16'))['db'];config['redis']=_['defaults'](config[_0x8cfc('0x17')],{'host':_0x8cfc('0x18'),'port':0x18eb});var socket=require(_0x8cfc('0x19'))(new Redis(config[_0x8cfc('0x17')]));require('./whatsappAccount.socket')['register'](socket);var jayson=require(_0x8cfc('0x1a'));var client=jayson[_0x8cfc('0x1b')]['http']({'port':0x232c});function respondWithRpcPromise(_0x1d9ba9,_0x404c1f,_0x3dbe12,_0x258db5){return new BPromise(function(_0x4d98d1,_0x4fe32d){var _0x35b90b=_0x258db5||client;return _0x35b90b['request'](_0x1d9ba9,_0x3dbe12)[_0x8cfc('0x1c')](function(_0x26eda6){logger['info'](_0x8cfc('0x1d'),_0x404c1f,_0x8cfc('0x1e'));logger['debug'](_0x8cfc('0x1f'),_0x404c1f,_0x8cfc('0x1e'),JSON['stringify'](_0x26eda6));if(_0x26eda6[_0x8cfc('0x20')]){if(_0x26eda6[_0x8cfc('0x20')][_0x8cfc('0x21')]===0x1f4){logger[_0x8cfc('0x20')]('WhatsappAccount,\x20%s,\x20%s',_0x404c1f,_0x26eda6['error'][_0x8cfc('0x22')]);return _0x4fe32d(_0x26eda6[_0x8cfc('0x20')]['message']);}logger['error'](_0x8cfc('0x1d'),_0x404c1f,_0x26eda6[_0x8cfc('0x20')][_0x8cfc('0x22')]);return _0x4d98d1(_0x26eda6[_0x8cfc('0x20')][_0x8cfc('0x22')]);}else{logger[_0x8cfc('0x23')](_0x8cfc('0x1d'),_0x404c1f,'request\x20sent');_0x4d98d1(_0x26eda6[_0x8cfc('0x24')]['message']);}})[_0x8cfc('0x25')](function(_0x89c55){logger[_0x8cfc('0x20')](_0x8cfc('0x1d'),_0x404c1f,_0x89c55);_0x4fe32d(_0x89c55);});});}function respondWithStatusCode(_0xcbbf01,_0x220f69){_0x220f69=_0x220f69||0xcc;return function(_0x580b71){if(_0x580b71){return _0xcbbf01['sendStatus'](_0x220f69);}return _0xcbbf01[_0x8cfc('0x26')](_0x220f69)[_0x8cfc('0x27')]();};}function respondWithResult(_0x1ba798,_0x542a1f){_0x542a1f=_0x542a1f||0xc8;return function(_0xf558f9){if(_0xf558f9){return _0x1ba798['status'](_0x542a1f)[_0x8cfc('0x28')](_0xf558f9);}};}function respondWithFilteredResult(_0xe2b028,_0x426c25){return function(_0x16088a){if(_0x16088a){var _0x30c4e3=typeof _0x426c25['offset']===_0x8cfc('0x29')&&typeof _0x426c25[_0x8cfc('0x2a')]===_0x8cfc('0x29');var _0x23fb5b=_0x16088a[_0x8cfc('0x2b')];var _0x45b309=_0x30c4e3?0x0:_0x426c25[_0x8cfc('0x2c')];var _0x115bde=_0x30c4e3?_0x16088a[_0x8cfc('0x2b')]:_0x426c25[_0x8cfc('0x2c')]+_0x426c25[_0x8cfc('0x2a')];var _0x46e8f8;if(_0x115bde>=_0x23fb5b){_0x115bde=_0x23fb5b;_0x46e8f8=0xc8;}else{_0x46e8f8=0xce;}_0xe2b028[_0x8cfc('0x26')](_0x46e8f8);return _0xe2b028[_0x8cfc('0x2d')](_0x8cfc('0x2e'),_0x45b309+'-'+_0x115bde+'/'+_0x23fb5b)['json'](_0x16088a);}return null;};}function patchUpdates(_0x28dc09){return function(_0x5a562b){try{jsonpatch['apply'](_0x5a562b,_0x28dc09,!![]);}catch(_0x1499d3){return BPromise[_0x8cfc('0x2f')](_0x1499d3);}return _0x5a562b[_0x8cfc('0x30')]();};}function saveUpdates(_0x5d7d7f,_0x53dde3){return function(_0x1c4bea){if(_0x1c4bea){return _0x1c4bea[_0x8cfc('0x31')](_0x5d7d7f)[_0x8cfc('0x1c')](function(_0xd9df1c){return _0xd9df1c;});}return null;};}function removeEntity(_0x1c99f6,_0x3774dc){return function(_0x2aad4c){if(_0x2aad4c){return _0x2aad4c[_0x8cfc('0x32')]()['then'](function(){var _0x2e4949=_0x2aad4c[_0x8cfc('0x33')]({'plain':!![]});var _0x14d8e8=_0x8cfc('0x34');return db[_0x8cfc('0x35')][_0x8cfc('0x32')]({'where':{'type':_0x14d8e8,'resourceId':_0x2e4949['id']}})[_0x8cfc('0x1c')](function(){return _0x2aad4c;});})[_0x8cfc('0x1c')](function(){_0x1c99f6['status'](0xcc)[_0x8cfc('0x27')]();});}};}function handleEntityNotFound(_0x3fe936,_0x2af6cd){return function(_0xedc937){if(!_0xedc937){_0x3fe936[_0x8cfc('0x36')](0x194);}return _0xedc937;};}function handleError(_0x23c927,_0x3c3fd9){_0x3c3fd9=_0x3c3fd9||0x1f4;return function(_0x4d761c){logger[_0x8cfc('0x20')](_0x4d761c['stack']);if(_0x4d761c[_0x8cfc('0x37')]){delete _0x4d761c[_0x8cfc('0x37')];}_0x23c927[_0x8cfc('0x26')](_0x3c3fd9)[_0x8cfc('0x38')](_0x4d761c);};}exports['index']=function(_0x3c30eb,_0x1e0e69){var _0x10f7ee={'include':[{'model':db[_0x8cfc('0x39')],'as':_0x8cfc('0x3a')}]},_0x23a7d4={},_0x4f7ef7={'count':0x0,'rows':[]};var _0x2519d5=_['map'](db[_0x8cfc('0x3b')][_0x8cfc('0x3c')],function(_0x2b393d){return{'name':_0x2b393d[_0x8cfc('0x3d')],'type':_0x2b393d[_0x8cfc('0x3e')][_0x8cfc('0x3f')]};});_0x23a7d4[_0x8cfc('0x40')]=_[_0x8cfc('0x41')](_0x2519d5,'name');_0x23a7d4[_0x8cfc('0x42')]=_['keys'](_0x3c30eb[_0x8cfc('0x42')]);_0x23a7d4[_0x8cfc('0x43')]=_[_0x8cfc('0x44')](_0x23a7d4[_0x8cfc('0x40')],_0x23a7d4['query']);_0x10f7ee[_0x8cfc('0x45')]=_[_0x8cfc('0x44')](_0x23a7d4[_0x8cfc('0x40')],qs[_0x8cfc('0x46')](_0x3c30eb[_0x8cfc('0x42')][_0x8cfc('0x46')]));_0x10f7ee[_0x8cfc('0x45')]=_0x10f7ee[_0x8cfc('0x45')][_0x8cfc('0x47')]?_0x10f7ee[_0x8cfc('0x45')]:_0x23a7d4[_0x8cfc('0x40')];if(!_0x3c30eb[_0x8cfc('0x42')]['hasOwnProperty']('nolimit')){_0x10f7ee[_0x8cfc('0x2a')]=qs[_0x8cfc('0x2a')](_0x3c30eb[_0x8cfc('0x42')][_0x8cfc('0x2a')]);_0x10f7ee[_0x8cfc('0x2c')]=qs['offset'](_0x3c30eb[_0x8cfc('0x42')][_0x8cfc('0x2c')]);}_0x10f7ee[_0x8cfc('0x48')]=qs[_0x8cfc('0x49')](_0x3c30eb[_0x8cfc('0x42')][_0x8cfc('0x49')]);_0x10f7ee[_0x8cfc('0x4a')]=qs[_0x8cfc('0x43')](_[_0x8cfc('0x4b')](_0x3c30eb[_0x8cfc('0x42')],_0x23a7d4[_0x8cfc('0x43')]),_0x2519d5);if(_0x3c30eb['query'][_0x8cfc('0x4c')]){_0x10f7ee[_0x8cfc('0x4a')]=_[_0x8cfc('0x4d')](_0x10f7ee[_0x8cfc('0x4a')],{'$or':_[_0x8cfc('0x41')](_0x2519d5,function(_0x3a5ea4){if(_0x3a5ea4[_0x8cfc('0x3e')]!==_0x8cfc('0x4e')){var _0x4663e6={};_0x4663e6[_0x3a5ea4[_0x8cfc('0x37')]]={'$like':'%'+_0x3c30eb['query'][_0x8cfc('0x4c')]+'%'};return _0x4663e6;}})});}_0x10f7ee=_['merge']({},_0x10f7ee,_0x3c30eb[_0x8cfc('0x4f')]);var _0x5b9b7b={'where':_0x10f7ee[_0x8cfc('0x4a')]};return db['WhatsappAccount'][_0x8cfc('0x2b')](_0x5b9b7b)[_0x8cfc('0x1c')](function(_0x594fb2){_0x4f7ef7[_0x8cfc('0x2b')]=_0x594fb2;if(_0x3c30eb[_0x8cfc('0x42')][_0x8cfc('0x50')]){_0x10f7ee[_0x8cfc('0x51')]=[{'all':!![]}];}return db[_0x8cfc('0x3b')][_0x8cfc('0x52')](_0x10f7ee);})['then'](function(_0x2ee13e){_0x4f7ef7[_0x8cfc('0x53')]=_0x2ee13e;return _0x4f7ef7;})[_0x8cfc('0x1c')](respondWithFilteredResult(_0x1e0e69,_0x10f7ee))[_0x8cfc('0x25')](handleError(_0x1e0e69,null));};exports[_0x8cfc('0x54')]=function(_0x22de04,_0x23fc3b){var _0x472edd={'raw':![],'where':{'id':_0x22de04[_0x8cfc('0x55')]['id']},'include':[{'model':db['Pause'],'as':_0x8cfc('0x3a')}]},_0x12a1e7={};_0x12a1e7[_0x8cfc('0x40')]=_['keys'](db[_0x8cfc('0x3b')][_0x8cfc('0x3c')]);_0x12a1e7[_0x8cfc('0x42')]=_['keys'](_0x22de04[_0x8cfc('0x42')]);_0x12a1e7['filters']=_[_0x8cfc('0x44')](_0x12a1e7[_0x8cfc('0x40')],_0x12a1e7[_0x8cfc('0x42')]);_0x472edd[_0x8cfc('0x45')]=_['intersection'](_0x12a1e7[_0x8cfc('0x40')],qs[_0x8cfc('0x46')](_0x22de04[_0x8cfc('0x42')][_0x8cfc('0x46')]));_0x472edd[_0x8cfc('0x45')]=_0x472edd[_0x8cfc('0x45')][_0x8cfc('0x47')]?_0x472edd['attributes']:_0x12a1e7[_0x8cfc('0x40')];if(_0x22de04['query'][_0x8cfc('0x50')]){_0x472edd[_0x8cfc('0x51')]=[{'all':!![]}];}_0x472edd=_['merge']({},_0x472edd,_0x22de04['options']);return db[_0x8cfc('0x3b')][_0x8cfc('0x56')](_0x472edd)[_0x8cfc('0x1c')](handleEntityNotFound(_0x23fc3b,null))[_0x8cfc('0x1c')](respondWithResult(_0x23fc3b,null))[_0x8cfc('0x25')](handleError(_0x23fc3b,null));};exports['create']=function(_0x5cab06,_0x8373f4){return db[_0x8cfc('0x3b')][_0x8cfc('0x57')](_0x5cab06[_0x8cfc('0x58')],{})[_0x8cfc('0x1c')](function(_0x1ebeca){var _0x1240d0=_0x5cab06[_0x8cfc('0x59')][_0x8cfc('0x33')]({'plain':!![]});if(!_0x1240d0)throw new Error(_0x8cfc('0x5a'));if(_0x1240d0[_0x8cfc('0x5b')]==='user'){var _0x29005e=_0x1ebeca['get']({'plain':!![]});var _0x467fe0=_0x8cfc('0x34');return db[_0x8cfc('0x5c')][_0x8cfc('0x56')]({'where':{'name':_0x467fe0,'userProfileId':_0x1240d0[_0x8cfc('0x5d')]},'raw':!![]})['then'](function(_0xf8c8d3){if(_0xf8c8d3&&_0xf8c8d3[_0x8cfc('0x5e')]===0x0){return db[_0x8cfc('0x35')][_0x8cfc('0x57')]({'name':_0x29005e['name'],'resourceId':_0x29005e['id'],'type':_0xf8c8d3[_0x8cfc('0x37')],'sectionId':_0xf8c8d3['id']},{})[_0x8cfc('0x1c')](function(){return _0x1ebeca;});}else{return _0x1ebeca;}})['catch'](function(_0x57dbab){logger[_0x8cfc('0x20')](_0x8cfc('0x5f'),_0x57dbab);throw _0x57dbab;});}return _0x1ebeca;})['then'](respondWithResult(_0x8373f4,0xc9))[_0x8cfc('0x25')](handleError(_0x8373f4,null));};exports[_0x8cfc('0x31')]=function(_0x419bac,_0x221207){if(_0x419bac[_0x8cfc('0x58')]['id']){delete _0x419bac[_0x8cfc('0x58')]['id'];}return db[_0x8cfc('0x3b')][_0x8cfc('0x56')]({'where':{'id':_0x419bac[_0x8cfc('0x55')]['id']},'include':[{'model':db[_0x8cfc('0x39')],'as':_0x8cfc('0x3a')}]})[_0x8cfc('0x1c')](handleEntityNotFound(_0x221207,null))[_0x8cfc('0x1c')](saveUpdates(_0x419bac['body'],null))['then'](respondWithResult(_0x221207,null))['catch'](handleError(_0x221207,null));};exports[_0x8cfc('0x32')]=function(_0x206e1d,_0x3fb70f){return db[_0x8cfc('0x3b')][_0x8cfc('0x56')]({'where':{'id':_0x206e1d[_0x8cfc('0x55')]['id']}})[_0x8cfc('0x1c')](handleEntityNotFound(_0x3fb70f,null))[_0x8cfc('0x1c')](removeEntity(_0x3fb70f,null))[_0x8cfc('0x25')](handleError(_0x3fb70f,null));};exports['describe']=function(_0x54a054,_0x5f4bc1){return db[_0x8cfc('0x3b')][_0x8cfc('0x60')]()[_0x8cfc('0x1c')](respondWithResult(_0x5f4bc1,null))['catch'](handleError(_0x5f4bc1,null));};exports[_0x8cfc('0x61')]=function(_0xf80ba3,_0x459b3c,_0x285044){if(_0xf80ba3[_0x8cfc('0x58')]['id']){delete _0xf80ba3[_0x8cfc('0x58')]['id'];}return db[_0x8cfc('0x3b')][_0x8cfc('0x56')]({'where':{'id':_0xf80ba3[_0x8cfc('0x55')]['id']}})[_0x8cfc('0x1c')](handleEntityNotFound(_0x459b3c,null))[_0x8cfc('0x1c')](function(_0x2e81ef){if(_0x2e81ef){_0xf80ba3[_0x8cfc('0x58')]['WhatsappAccountId']=_0x2e81ef['id'];return db[_0x8cfc('0x62')]['create'](_0xf80ba3[_0x8cfc('0x58')]);}})['then'](respondWithResult(_0x459b3c,null))[_0x8cfc('0x25')](handleError(_0x459b3c,null));};exports[_0x8cfc('0x63')]=function(_0x49c12c,_0x1dd7c2,_0xd3f603){var _0x53206a={'raw':![],'where':{}};var _0x27bb88={};var _0x252f4a={'count':0x0,'rows':[]};return db[_0x8cfc('0x3b')]['findOne']({'where':{'id':_0x49c12c['params']['id']}})['then'](handleEntityNotFound(_0x1dd7c2,null))[_0x8cfc('0x1c')](function(_0x4a83fb){if(_0x4a83fb){_0x27bb88[_0x8cfc('0x40')]=_[_0x8cfc('0x64')](db[_0x8cfc('0x62')][_0x8cfc('0x3c')]);_0x27bb88[_0x8cfc('0x42')]=_[_0x8cfc('0x64')](_0x49c12c[_0x8cfc('0x42')]);_0x27bb88[_0x8cfc('0x43')]=_[_0x8cfc('0x44')](_0x27bb88['model'],_0x27bb88[_0x8cfc('0x42')]);_0x53206a['attributes']=_['intersection'](_0x27bb88[_0x8cfc('0x40')],qs['fields'](_0x49c12c[_0x8cfc('0x42')][_0x8cfc('0x46')]));_0x53206a['attributes']=_0x53206a['attributes']['length']?_0x53206a[_0x8cfc('0x45')]:_0x27bb88[_0x8cfc('0x40')];if(!_0x49c12c['query']['hasOwnProperty']('nolimit')){_0x53206a['limit']=qs['limit'](_0x49c12c[_0x8cfc('0x42')]['limit']);_0x53206a[_0x8cfc('0x2c')]=qs[_0x8cfc('0x2c')](_0x49c12c[_0x8cfc('0x42')][_0x8cfc('0x2c')]);}_0x53206a[_0x8cfc('0x48')]=qs[_0x8cfc('0x49')](_0x49c12c['query'][_0x8cfc('0x49')]);_0x53206a[_0x8cfc('0x4a')]=qs[_0x8cfc('0x43')](_['pick'](_0x49c12c[_0x8cfc('0x42')],_0x27bb88[_0x8cfc('0x43')]));_0x53206a[_0x8cfc('0x4a')][_0x8cfc('0x65')]=_0x4a83fb['id'];if(_0x49c12c[_0x8cfc('0x42')]['filter']){_0x53206a['where']=_[_0x8cfc('0x4d')](_0x53206a[_0x8cfc('0x4a')],{'$or':_[_0x8cfc('0x41')](_0x53206a[_0x8cfc('0x45')],function(_0xa89a8d){var _0x13fc20={};_0x13fc20[_0xa89a8d]={'$like':'%'+_0x49c12c['query'][_0x8cfc('0x4c')]+'%'};return _0x13fc20;})});}_0x53206a=_[_0x8cfc('0x4d')]({},_0x53206a,_0x49c12c[_0x8cfc('0x4f')]);return db[_0x8cfc('0x62')][_0x8cfc('0x2b')]({'where':_0x53206a[_0x8cfc('0x4a')]})['then'](function(_0x4f9856){_0x252f4a['count']=_0x4f9856;if(_0x49c12c['query'][_0x8cfc('0x50')]){_0x53206a[_0x8cfc('0x51')]=[{'all':!![]}];}return db[_0x8cfc('0x62')]['findAll'](_0x53206a);})['then'](function(_0x21e98e){_0x252f4a[_0x8cfc('0x53')]=_0x21e98e;return _0x252f4a;});}})[_0x8cfc('0x1c')](respondWithFilteredResult(_0x1dd7c2,_0x53206a))[_0x8cfc('0x25')](handleError(_0x1dd7c2,null));};exports[_0x8cfc('0x66')]=function(_0x102a22,_0x3af2d6,_0x249d6c){return db[_0x8cfc('0x3b')][_0x8cfc('0x56')]({'where':{'id':_0x102a22[_0x8cfc('0x55')]['id']}})['then'](handleEntityNotFound(_0x3af2d6,null))[_0x8cfc('0x1c')](function(_0x255500){if(_0x255500){return _0x255500[_0x8cfc('0x66')](_0x102a22[_0x8cfc('0x42')][_0x8cfc('0x67')]);}})[_0x8cfc('0x1c')](respondWithStatusCode(_0x3af2d6,null))[_0x8cfc('0x25')](handleError(_0x3af2d6,null));};exports[_0x8cfc('0x68')]=function(_0xfeaeda,_0x1da19a,_0x33f4b9){if(_0xfeaeda[_0x8cfc('0x58')]['id']){delete _0xfeaeda[_0x8cfc('0x58')]['id'];}return db[_0x8cfc('0x3b')][_0x8cfc('0x56')]({'where':{'id':_0xfeaeda[_0x8cfc('0x55')]['id']}})[_0x8cfc('0x1c')](handleEntityNotFound(_0x1da19a,null))[_0x8cfc('0x1c')](function(_0x1d7508){if(_0x1d7508){_0xfeaeda[_0x8cfc('0x58')]['WhatsappAccountId']=_0x1d7508['id'];return db[_0x8cfc('0x69')][_0x8cfc('0x57')](_0xfeaeda[_0x8cfc('0x58')]);}})[_0x8cfc('0x1c')](respondWithResult(_0x1da19a,null))[_0x8cfc('0x25')](handleError(_0x1da19a,null));};exports[_0x8cfc('0x6a')]=function(_0x51f8d8,_0x23cb78,_0x4eb31e){var _0x21a752={'raw':![],'where':{}};var _0x5f5595={};var _0x443b00={'count':0x0,'rows':[]};return db[_0x8cfc('0x3b')]['findOne']({'where':{'id':_0x51f8d8[_0x8cfc('0x55')]['id']}})[_0x8cfc('0x1c')](handleEntityNotFound(_0x23cb78,null))[_0x8cfc('0x1c')](function(_0x208dbb){if(_0x208dbb){_0x5f5595['model']=_[_0x8cfc('0x64')](db['CannedAnswer'][_0x8cfc('0x3c')]);_0x5f5595['query']=_[_0x8cfc('0x64')](_0x51f8d8[_0x8cfc('0x42')]);_0x5f5595[_0x8cfc('0x43')]=_[_0x8cfc('0x44')](_0x5f5595['model'],_0x5f5595[_0x8cfc('0x42')]);_0x21a752[_0x8cfc('0x45')]=_[_0x8cfc('0x44')](_0x5f5595[_0x8cfc('0x40')],qs[_0x8cfc('0x46')](_0x51f8d8[_0x8cfc('0x42')][_0x8cfc('0x46')]));_0x21a752[_0x8cfc('0x45')]=_0x21a752[_0x8cfc('0x45')]['length']?_0x21a752[_0x8cfc('0x45')]:_0x5f5595['model'];if(!_0x51f8d8[_0x8cfc('0x42')][_0x8cfc('0x6b')](_0x8cfc('0x6c'))){_0x21a752['limit']=qs['limit'](_0x51f8d8['query']['limit']);_0x21a752[_0x8cfc('0x2c')]=qs[_0x8cfc('0x2c')](_0x51f8d8['query'][_0x8cfc('0x2c')]);}_0x21a752[_0x8cfc('0x48')]=qs[_0x8cfc('0x49')](_0x51f8d8[_0x8cfc('0x42')][_0x8cfc('0x49')]);_0x21a752[_0x8cfc('0x4a')]=qs[_0x8cfc('0x43')](_['pick'](_0x51f8d8['query'],_0x5f5595[_0x8cfc('0x43')]));_0x21a752[_0x8cfc('0x4a')][_0x8cfc('0x65')]=_0x208dbb['id'];if(_0x51f8d8[_0x8cfc('0x42')][_0x8cfc('0x4c')]){_0x21a752[_0x8cfc('0x4a')]=_[_0x8cfc('0x4d')](_0x21a752['where'],{'$or':_[_0x8cfc('0x41')](_0x21a752[_0x8cfc('0x45')],function(_0xaede88){var _0x26fef1={};_0x26fef1[_0xaede88]={'$like':'%'+_0x51f8d8[_0x8cfc('0x42')][_0x8cfc('0x4c')]+'%'};return _0x26fef1;})});}_0x21a752=_[_0x8cfc('0x4d')]({},_0x21a752,_0x51f8d8[_0x8cfc('0x4f')]);return db['CannedAnswer'][_0x8cfc('0x2b')]({'where':_0x21a752['where']})[_0x8cfc('0x1c')](function(_0x55ff7d){_0x443b00[_0x8cfc('0x2b')]=_0x55ff7d;if(_0x51f8d8[_0x8cfc('0x42')][_0x8cfc('0x50')]){_0x21a752[_0x8cfc('0x51')]=[{'all':!![]}];}return db[_0x8cfc('0x69')][_0x8cfc('0x52')](_0x21a752);})[_0x8cfc('0x1c')](function(_0x2af3c4){_0x443b00[_0x8cfc('0x53')]=_0x2af3c4;return _0x443b00;});}})[_0x8cfc('0x1c')](respondWithFilteredResult(_0x23cb78,_0x21a752))[_0x8cfc('0x25')](handleError(_0x23cb78,null));};exports[_0x8cfc('0x6d')]=function(_0x35cf44,_0x336959,_0x1f4e2c){return db[_0x8cfc('0x3b')][_0x8cfc('0x56')]({'where':{'id':_0x35cf44[_0x8cfc('0x55')]['id']}})['then'](handleEntityNotFound(_0x336959,null))[_0x8cfc('0x1c')](function(_0x57c652){if(_0x57c652){return _0x57c652[_0x8cfc('0x6d')](_0x35cf44[_0x8cfc('0x42')][_0x8cfc('0x67')]);}})['then'](respondWithStatusCode(_0x336959,null))[_0x8cfc('0x25')](handleError(_0x336959,null));};exports[_0x8cfc('0x6e')]=function(_0x16d5b5,_0xce6460,_0x3e75f3){return db[_0x8cfc('0x3b')]['find']({'where':{'id':_0x16d5b5[_0x8cfc('0x55')]['id']}})[_0x8cfc('0x1c')](handleEntityNotFound(_0xce6460,null))['then'](function(_0x49e827){if(_0x49e827){return _0x49e827[_0x8cfc('0x6e')](_0x16d5b5[_0x8cfc('0x58')]['ids'],_['omit'](_0x16d5b5[_0x8cfc('0x58')],[_0x8cfc('0x67'),'id'])||{})['spread'](function(_0x304edf){for(var _0x56e750=0x0;_0x56e750<_0x16d5b5[_0x8cfc('0x58')][_0x8cfc('0x67')][_0x8cfc('0x47')];_0x56e750+=0x1){socket['emit']('userWhatsappAccount:save',{'UserId':Number(_0x16d5b5[_0x8cfc('0x58')][_0x8cfc('0x67')][_0x56e750]),'WhatsappAccountId':Number(_0x16d5b5['params']['id'])});}return _0x304edf;});}})[_0x8cfc('0x1c')](respondWithResult(_0xce6460,null))[_0x8cfc('0x25')](handleError(_0xce6460,null));};exports[_0x8cfc('0x6f')]=function(_0x5da2f6,_0x16a466,_0x46b254){return db[_0x8cfc('0x3b')]['find']({'where':{'id':_0x5da2f6[_0x8cfc('0x55')]['id']}})['then'](handleEntityNotFound(_0x16a466,null))[_0x8cfc('0x1c')](function(_0x3e4f71){if(_0x3e4f71){return _0x3e4f71[_0x8cfc('0x6f')](_0x5da2f6[_0x8cfc('0x42')]['ids'])['then'](function(){if(_[_0x8cfc('0x70')](_0x5da2f6[_0x8cfc('0x42')][_0x8cfc('0x67')])){for(var _0x268bb0=0x0;_0x268bb0<_0x5da2f6[_0x8cfc('0x42')][_0x8cfc('0x67')][_0x8cfc('0x47')];_0x268bb0+=0x1){socket[_0x8cfc('0x71')]('userWhatsappAccount:remove',{'UserId':Number(_0x5da2f6[_0x8cfc('0x42')][_0x8cfc('0x67')][_0x268bb0]),'WhatsappAccountId':Number(_0x5da2f6[_0x8cfc('0x55')]['id'])});}}else{socket[_0x8cfc('0x71')](_0x8cfc('0x72'),{'UserId':Number(_0x5da2f6['query'][_0x8cfc('0x67')]),'WhatsappAccountId':Number(_0x5da2f6[_0x8cfc('0x55')]['id'])});}});}})[_0x8cfc('0x1c')](respondWithStatusCode(_0x16a466,null))['catch'](handleError(_0x16a466,null));};exports[_0x8cfc('0x73')]=function(_0x4867e2,_0x38cc45,_0x19db2e){var _0x11ea0d={};var _0x5332e7={};var _0x19e500;var _0x3143aa;return db[_0x8cfc('0x3b')][_0x8cfc('0x74')]({'where':{'id':_0x4867e2['params']['id']}})[_0x8cfc('0x1c')](handleEntityNotFound(_0x38cc45,null))[_0x8cfc('0x1c')](function(_0x149f4d){if(_0x149f4d){_0x19e500=_0x149f4d;_0x5332e7[_0x8cfc('0x40')]=_[_0x8cfc('0x64')](db['User']['rawAttributes']);_0x5332e7[_0x8cfc('0x42')]=_[_0x8cfc('0x64')](_0x4867e2['query']);_0x5332e7[_0x8cfc('0x43')]=_[_0x8cfc('0x44')](_0x5332e7[_0x8cfc('0x40')],_0x5332e7[_0x8cfc('0x42')]);_0x11ea0d[_0x8cfc('0x45')]=_[_0x8cfc('0x44')](_0x5332e7[_0x8cfc('0x40')],qs[_0x8cfc('0x46')](_0x4867e2[_0x8cfc('0x42')][_0x8cfc('0x46')]));_0x11ea0d['attributes']=_0x11ea0d[_0x8cfc('0x45')][_0x8cfc('0x47')]?_0x11ea0d[_0x8cfc('0x45')]:_0x5332e7[_0x8cfc('0x40')];_0x11ea0d[_0x8cfc('0x48')]=qs[_0x8cfc('0x49')](_0x4867e2[_0x8cfc('0x42')]['sort']);_0x11ea0d[_0x8cfc('0x4a')]=qs['filters'](_[_0x8cfc('0x4b')](_0x4867e2[_0x8cfc('0x42')],_0x5332e7[_0x8cfc('0x43')]));if(_0x4867e2[_0x8cfc('0x42')][_0x8cfc('0x4c')]){_0x11ea0d[_0x8cfc('0x4a')]=_['merge'](_0x11ea0d[_0x8cfc('0x4a')],{'$or':_[_0x8cfc('0x41')](_0x11ea0d[_0x8cfc('0x45')],function(_0xc234f1){var _0x196b48={};_0x196b48[_0xc234f1]={'$like':'%'+_0x4867e2['query'][_0x8cfc('0x4c')]+'%'};return _0x196b48;})});}_0x11ea0d=_[_0x8cfc('0x4d')]({},_0x11ea0d,_0x4867e2[_0x8cfc('0x4f')]);return _0x19e500[_0x8cfc('0x73')](_0x11ea0d);}})[_0x8cfc('0x1c')](function(_0x1ee1c3){if(_0x1ee1c3){_0x3143aa=_0x1ee1c3['length'];if(!_0x4867e2[_0x8cfc('0x42')]['hasOwnProperty'](_0x8cfc('0x6c'))){_0x11ea0d['limit']=qs[_0x8cfc('0x2a')](_0x4867e2[_0x8cfc('0x42')][_0x8cfc('0x2a')]);_0x11ea0d[_0x8cfc('0x2c')]=qs[_0x8cfc('0x2c')](_0x4867e2[_0x8cfc('0x42')]['offset']);}return _0x19e500[_0x8cfc('0x73')](_0x11ea0d);}})['then'](function(_0x4d1ab0){if(_0x4d1ab0){return _0x4d1ab0?{'count':_0x3143aa,'rows':_0x4d1ab0}:null;}})['then'](respondWithResult(_0x38cc45,null))[_0x8cfc('0x25')](handleError(_0x38cc45,null));};exports['addApplications']=function(_0x36325c,_0x3b2249){var _0x2734a0=_0x36325c[_0x8cfc('0x55')]['id'];var _0x7035c4=_0x36325c[_0x8cfc('0x58')];var _0x49a8c3=0xc8;var _0x2dd56f=null;return db[_0x8cfc('0x75')][_0x8cfc('0x76')]({'isolationLevel':db['sequelize'][_0x8cfc('0x77')][_0x8cfc('0x78')]['READ_COMMITTED']},function(_0x2067f9){return db[_0x8cfc('0x3b')][_0x8cfc('0x74')]({'where':{'id':_0x2734a0},'transaction':_0x2067f9})[_0x8cfc('0x1c')](function(_0x2a08bb){if(_0x2a08bb){return db['WhatsappApplication']['destroy']({'where':{'WhatsappAccountId':_0x2734a0},'transaction':_0x2067f9})['then'](function(){var _0x4c4f98=_[_0x8cfc('0x41')](_0x7035c4,function(_0xdde6f3){_0xdde6f3[_0x8cfc('0x65')]=_0x2734a0;return _0xdde6f3;});return db[_0x8cfc('0x79')][_0x8cfc('0x7a')](_0x4c4f98,{'transaction':_0x2067f9});});}else{_0x49a8c3=0x194;_0x2dd56f=[];}});})[_0x8cfc('0x1c')](function(){if(_0x49a8c3!==0x194){return db['WhatsappApplication'][_0x8cfc('0x7b')]({'where':{'WhatsappAccountId':_0x2734a0},'order':_0x8cfc('0x7c')})[_0x8cfc('0x1c')](function(_0x47a7d5){_0x2dd56f=_0x47a7d5;});}})[_0x8cfc('0x25')](function(_0x1b4ec2){_0x49a8c3=0x1f4;logger[_0x8cfc('0x20')](_0x1b4ec2['stack']);if(_0x1b4ec2[_0x8cfc('0x37')]){delete _0x1b4ec2[_0x8cfc('0x37')];}_0x2dd56f=_0x1b4ec2;})['finally'](function(){if(_0x2dd56f===null){_0x3b2249[_0x8cfc('0x36')](_0x49a8c3);}else{if(_0x49a8c3===0x1f4){_0x3b2249['status'](_0x49a8c3)['send'](_0x2dd56f);}else{_0x3b2249[_0x8cfc('0x26')](_0x49a8c3)[_0x8cfc('0x28')](_0x2dd56f);}}});};exports['getApplications']=function(_0x21ae92,_0x10c01f,_0x2c69e7){var _0x39a77d={};var _0x54d42b={};var _0x2a1931;var _0x2bd264;return db[_0x8cfc('0x3b')][_0x8cfc('0x74')]({'where':{'id':_0x21ae92[_0x8cfc('0x55')]['id']}})[_0x8cfc('0x1c')](handleEntityNotFound(_0x10c01f,null))[_0x8cfc('0x1c')](function(_0x5dd0ee){if(_0x5dd0ee){_0x2a1931=_0x5dd0ee;_0x54d42b[_0x8cfc('0x40')]=_['keys'](db[_0x8cfc('0x79')]['rawAttributes']);_0x54d42b[_0x8cfc('0x42')]=_[_0x8cfc('0x64')](_0x21ae92[_0x8cfc('0x42')]);_0x54d42b[_0x8cfc('0x43')]=_['intersection'](_0x54d42b[_0x8cfc('0x40')],_0x54d42b[_0x8cfc('0x42')]);_0x39a77d[_0x8cfc('0x45')]=_['intersection'](_0x54d42b[_0x8cfc('0x40')],qs[_0x8cfc('0x46')](_0x21ae92[_0x8cfc('0x42')][_0x8cfc('0x46')]));_0x39a77d[_0x8cfc('0x45')]=_0x39a77d['attributes'][_0x8cfc('0x47')]?_0x39a77d[_0x8cfc('0x45')]:_0x54d42b[_0x8cfc('0x40')];_0x39a77d['order']=qs[_0x8cfc('0x49')](_0x21ae92[_0x8cfc('0x42')][_0x8cfc('0x49')]);_0x39a77d[_0x8cfc('0x4a')]=qs[_0x8cfc('0x43')](_[_0x8cfc('0x4b')](_0x21ae92[_0x8cfc('0x42')],_0x54d42b[_0x8cfc('0x43')]));if(_0x21ae92[_0x8cfc('0x42')][_0x8cfc('0x4c')]){_0x39a77d[_0x8cfc('0x4a')]=_['merge'](_0x39a77d['where'],{'$or':_[_0x8cfc('0x41')](_0x39a77d[_0x8cfc('0x45')],function(_0x360bbb){var _0x4298ae={};_0x4298ae[_0x360bbb]={'$like':'%'+_0x21ae92[_0x8cfc('0x42')][_0x8cfc('0x4c')]+'%'};return _0x4298ae;})});}_0x39a77d=_[_0x8cfc('0x4d')]({},_0x39a77d,_0x21ae92[_0x8cfc('0x4f')]);return _0x2a1931['getApplications'](_0x39a77d);}})['then'](function(_0x56cf4a){if(_0x56cf4a){_0x2bd264=_0x56cf4a[_0x8cfc('0x47')];if(!_0x21ae92[_0x8cfc('0x42')][_0x8cfc('0x6b')](_0x8cfc('0x6c'))){_0x39a77d[_0x8cfc('0x2a')]=qs[_0x8cfc('0x2a')](_0x21ae92[_0x8cfc('0x42')][_0x8cfc('0x2a')]);_0x39a77d['offset']=qs[_0x8cfc('0x2c')](_0x21ae92[_0x8cfc('0x42')][_0x8cfc('0x2c')]);}return _0x2a1931[_0x8cfc('0x7d')](_0x39a77d);}})[_0x8cfc('0x1c')](function(_0x27efc1){if(_0x27efc1){return _0x27efc1?{'count':_0x2bd264,'rows':_0x27efc1}:null;}})[_0x8cfc('0x1c')](respondWithResult(_0x10c01f,null))[_0x8cfc('0x25')](handleError(_0x10c01f,null));};exports[_0x8cfc('0x7e')]=function(_0x201a91,_0x1fc217,_0x3fd2fb){var _0x11597b={'channel':_0x8cfc('0x7f')};var _0x121def=[];var _0xeb8456=[];var _0x2d2685={};return db['WhatsappAccount'][_0x8cfc('0x56')]({'where':{'id':_0x201a91[_0x8cfc('0x55')]['id']},'include':[{'model':db[_0x8cfc('0x79')],'as':'Applications'}]})['then'](handleEntityNotFound(_0x1fc217,null))[_0x8cfc('0x1c')](function(_0x1a1950){_0x11597b[_0x8cfc('0x80')]=_0x1a1950;if(_0x11597b[_0x8cfc('0x80')]&&_0x11597b[_0x8cfc('0x80')]['type']===_0x8cfc('0x81')&&_0x201a91[_0x8cfc('0x58')][_0x8cfc('0x82')]){if(_0x201a91[_0x8cfc('0x58')]['statuses'][_0x8cfc('0x47')]===0x0)return;if(_0x201a91['body']['statuses'][0x0][_0x8cfc('0x83')]!==_0x8cfc('0x84'))return;return db[_0x8cfc('0x85')][_0x8cfc('0x31')]({'read':!![],'readAt':_0x201a91[_0x8cfc('0x58')][_0x8cfc('0x82')][0x0]['timestamp']},{'where':{'messageId':_0x201a91[_0x8cfc('0x58')][_0x8cfc('0x82')][0x0][_0x8cfc('0x86')]},'individualHooks':!![]})['then'](function(_0x91946b){return _0x1fc217[_0x8cfc('0x26')](0xc8)[_0x8cfc('0x28')](_0x91946b);});}_0x11597b[_0x8cfc('0x87')]=_[_0x8cfc('0x88')](_0x1a1950['Applications'],[_0x8cfc('0x7c')],['asc']);if(_0x11597b[_0x8cfc('0x80')]['Applications']){delete _0x11597b[_0x8cfc('0x80')][_0x8cfc('0x89')];}return db[_0x8cfc('0x8a')][_0x8cfc('0x60')]()[_0x8cfc('0x1c')](function(_0x16da17){if(!_0x16da17){throw new db[(_0x8cfc('0x8b'))][(_0x8cfc('0x8c'))](_0x8cfc('0x8d'));}_0x121def=_[_0x8cfc('0x8e')](_[_0x8cfc('0x64')](_0x16da17),[_0x8cfc('0x8f'),_0x8cfc('0x90')]);_0xeb8456=_[_0x8cfc('0x8e')](_[_0x8cfc('0x64')](_0x16da17),['createdAt',_0x8cfc('0x90'),'CompanyId',_0x8cfc('0x91')]);_0x11597b[_0x8cfc('0x58')]={'mapKey':_0x8cfc('0x92')};if(_0x11597b[_0x8cfc('0x80')]&&_0x11597b[_0x8cfc('0x80')][_0x8cfc('0x3e')]==='twilio'){_0x11597b[_0x8cfc('0x58')][_0x8cfc('0x93')]=_0x201a91[_0x8cfc('0x58')]['From'][_0x8cfc('0x94')](_0x8cfc('0x95'),'');_0x11597b['body'][_0x8cfc('0x58')]=_0x201a91['body'][_0x8cfc('0x96')];_0x11597b['body'][_0x8cfc('0x97')]=_0x201a91[_0x8cfc('0x58')][_0x8cfc('0x98')];}if(_0x11597b['account']&&_0x11597b[_0x8cfc('0x80')][_0x8cfc('0x3e')]==='sinch'){_0x11597b[_0x8cfc('0x58')][_0x8cfc('0x93')]=_0x201a91['body'][_0x8cfc('0x99')][0x0][_0x8cfc('0x93')];_0x11597b[_0x8cfc('0x58')][_0x8cfc('0x58')]=_0x201a91[_0x8cfc('0x58')][_0x8cfc('0x99')][0x0][_0x8cfc('0x22')][_0x8cfc('0x58')];_0x11597b[_0x8cfc('0x58')][_0x8cfc('0x97')]=_0x201a91[_0x8cfc('0x58')][_0x8cfc('0x99')][0x0][_0x8cfc('0x86')];}if(_0x11597b[_0x8cfc('0x58')]['id']){delete _0x11597b[_0x8cfc('0x58')]['id'];}if(_[_0x8cfc('0x9a')](_0x11597b['body'][_0x8cfc('0x93')])){throw new db[(_0x8cfc('0x8b'))][(_0x8cfc('0x8c'))]('from\x20is\x20mandatory');}if(_[_0x8cfc('0x9a')](_0x11597b[_0x8cfc('0x58')][_0x8cfc('0x58')])||_0x11597b[_0x8cfc('0x58')]['body']===''){throw new db[(_0x8cfc('0x8b'))][(_0x8cfc('0x8c'))](_0x8cfc('0x9b'));}if(_['isNil'](_0x11597b[_0x8cfc('0x58')]['mapKey'])){throw new db[(_0x8cfc('0x8b'))][(_0x8cfc('0x8c'))](_0x8cfc('0x9c')+_0xeb8456);}if(!_['includes'](_0xeb8456,_0x11597b[_0x8cfc('0x58')][_0x8cfc('0x9d')])){throw new db['Sequelize'][(_0x8cfc('0x8c'))]('mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0xeb8456);}_0x2d2685[_0x11597b['body'][_0x8cfc('0x9d')]]=_0x11597b[_0x8cfc('0x58')][_0x8cfc('0x93')];return db[_0x8cfc('0x9e')]['find']({'where':{'id':_0x11597b['account']['ListId']},'include':[{'model':db['CmContact'],'as':_0x8cfc('0x9f'),'where':_0x2d2685,'limit':0x1,'order':[[_0x8cfc('0x90'),_0x8cfc('0xa0')]]}]});})[_0x8cfc('0x1c')](handleEntityNotFound(_0x1fc217,null))[_0x8cfc('0x1c')](function(_0x2bfcaf){if(_0x2bfcaf){_0x11597b[_0x8cfc('0xa1')]=_[_0x8cfc('0xa2')](_0x2bfcaf,[_0x8cfc('0x9f')]);if(_0x2bfcaf[_0x8cfc('0x9f')][_0x8cfc('0x47')]){return _0x2bfcaf['Contacts'][0x0];}var _0x1c9b1d=_[_0x8cfc('0xa3')](_0x11597b['body'],{'firstName':_0x11597b[_0x8cfc('0x58')][_0x8cfc('0x93')],'ListId':_0x2bfcaf['id']});_0x1c9b1d[_0x11597b[_0x8cfc('0x58')][_0x8cfc('0x9d')]]=_0x11597b['body'][_0x8cfc('0x93')];return db[_0x8cfc('0x8a')]['create'](_0x1c9b1d,{'fields':_0x121def,'raw':!![]});}})[_0x8cfc('0x1c')](handleEntityNotFound(_0x1fc217,null))[_0x8cfc('0x1c')](function(_0x3910e2){if(_0x3910e2){_0x11597b[_0x8cfc('0xa4')]=_0x3910e2;var _0x4ec940={'ContactId':_0x3910e2['id'],'phone':_0x11597b[_0x8cfc('0x58')][_0x8cfc('0x93')],'WhatsappAccountId':_0x201a91[_0x8cfc('0x55')]['id']};var _0x5496c9={'ContactId':_0x3910e2['id'],'WhatsappAccountId':_0x201a91[_0x8cfc('0x55')]['id'],'closed':![]};return db['WhatsappInteraction'][_0x8cfc('0x56')]({'where':_0x5496c9})[_0x8cfc('0x1c')](function(_0x1cbe64){if(_0x1cbe64){return[_0x1cbe64,![]];}return db[_0x8cfc('0xa5')]['create'](_0x4ec940)['then'](function(_0x131f59){return[_0x131f59,!![]];});});}})['spread'](function(_0x382f1c,_0x5887e3){_0x11597b[_0x8cfc('0xa6')]=_0x382f1c[_0x8cfc('0x33')]({'plain':!![]});_0x11597b[_0x8cfc('0xa6')][_0x8cfc('0xa7')]=![];if(_0x5887e3){if(_0x11597b[_0x8cfc('0x80')][_0x8cfc('0xa8')]){_0x11597b[_0x8cfc('0x87')]['push']({'id':0x0,'priority':_0x11597b[_0x8cfc('0x87')]['length']+0x1,'app':_0x8cfc('0xa9'),'appdata':_0x8cfc('0xaa'),'interval':_0x8cfc('0xab')});}_0x11597b['interaction'][_0x8cfc('0xa7')]=!![];}return db['WhatsappMessage'][_0x8cfc('0x57')]({'phone':_0x11597b[_0x8cfc('0x58')][_0x8cfc('0x93')],'messageId':_0x11597b[_0x8cfc('0x58')][_0x8cfc('0x97')],'body':_0x11597b[_0x8cfc('0x58')][_0x8cfc('0x58')],'WhatsappAccountId':_0x201a91[_0x8cfc('0x55')]['id'],'WhatsappInteractionId':_0x382f1c['id'],'direction':'in','ContactId':_0x382f1c['ContactId'],'AttachmentId':_0x11597b[_0x8cfc('0x58')][_0x8cfc('0xac')]});})['then'](function(_0xf8d6c1){_0x11597b[_0x8cfc('0x22')]=_0xf8d6c1;if(!_0x11597b['interaction']['UserId'])return;return db[_0x8cfc('0xad')]['find']({'attributes':['id',_0x8cfc('0x37')],'where':{'id':_0x11597b[_0x8cfc('0xa6')][_0x8cfc('0xae')]}});})[_0x8cfc('0x1c')](function(_0x1eb95b){if(_0x1eb95b){_0x11597b[_0x8cfc('0x87')][_0x8cfc('0xaf')]({'id':0x0,'priority':0x0,'app':_0x8cfc('0xb0'),'appdata':_0x1eb95b[_0x8cfc('0x37')]+','+(_0x11597b[_0x8cfc('0x80')][_0x8cfc('0xb1')]||0xa),'interval':_0x8cfc('0xab')});}if(!_0x11597b[_0x8cfc('0xa6')][_0x8cfc('0xb2')])return;return db[_0x8cfc('0xb3')][_0x8cfc('0x56')]({'attributes':['id',_0x8cfc('0x37')],'where':{'id':_0x11597b[_0x8cfc('0xa6')][_0x8cfc('0xb2')]}});})[_0x8cfc('0x1c')](function(_0x2c7857){if(_0x2c7857){_0x11597b[_0x8cfc('0x87')]['unshift']({'id':0x0,'priority':0x1,'app':_0x8cfc('0xb4'),'appdata':_0x2c7857[_0x8cfc('0x37')]+','+(_0x11597b[_0x8cfc('0x80')][_0x8cfc('0xb5')]||0x12c),'interval':_0x8cfc('0xab')});}return respondWithRpcPromise(_0x8cfc('0xb6'),_0x8cfc('0xb7'),_0x11597b);})[_0x8cfc('0x1c')](function(_0x501d2c){if(_0x501d2c){var _0x28f8e9=0xc8;var _0x5c239a=_0x8cfc('0xb8');logger[_0x8cfc('0x23')]('WhatsappAccount,\x20%s,\x20%s,\x20%s',_0x5c239a,_0x28f8e9,_0x8cfc('0xb9'));logger[_0x8cfc('0xba')](_0x8cfc('0xbb'),_0x5c239a,_0x28f8e9,_0x8cfc('0xb9'),JSON[_0x8cfc('0xbc')](_0x501d2c));if(_0x11597b['account']['type']===_0x8cfc('0xbd')){return _0x1fc217[_0x8cfc('0x26')](_0x28f8e9)[_0x8cfc('0x2d')](_0x8cfc('0xbe'),_0x8cfc('0xbf'))[_0x8cfc('0x38')]('<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22?>\x0a<Response></Response>');}else{return _0x1fc217[_0x8cfc('0x26')](_0x28f8e9)['json'](_0x501d2c);}}});})[_0x8cfc('0x25')](handleError(_0x1fc217,null));};exports[_0x8cfc('0x38')]=function(_0x43d559,_0xcf61a1,_0x6b3c6e){var _0x4b80fc,_0x4ee526,_0x192680;if(_[_0x8cfc('0x9a')](_0x43d559[_0x8cfc('0x58')][_0x8cfc('0x58')])||_0x43d559[_0x8cfc('0x58')]['body']===''){throw new db[(_0x8cfc('0x8b'))][(_0x8cfc('0x8c'))]('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0x8cfc('0x9a')](_0x43d559['body']['to'])){throw new db[(_0x8cfc('0x8b'))][(_0x8cfc('0x8c'))]('to\x20is\x20mandatory');}_0x4b80fc=_0x43d559[_0x8cfc('0x58')]['to'];return db['WhatsappAccount'][_0x8cfc('0x56')]({'where':{'id':_0x43d559[_0x8cfc('0x55')]['id']},'include':[{'model':db['CmList'],'as':_0x8cfc('0xc0'),'include':[{'model':db[_0x8cfc('0x8a')],'as':_0x8cfc('0x9f'),'where':{'mobile':_0x4b80fc},'limit':0x1,'order':[['updatedAt',_0x8cfc('0xa0')]]}]}]})[_0x8cfc('0x1c')](handleEntityNotFound(_0xcf61a1,null))[_0x8cfc('0x1c')](function(_0x23ef6a){if(_0x23ef6a&&_0x23ef6a[_0x8cfc('0xc0')]){_0x4ee526=_0x23ef6a['get']({'plain':!![]});if(_0x4ee526[_0x8cfc('0xc0')]&&_0x4ee526[_0x8cfc('0xc0')][_0x8cfc('0x9f')][_0x8cfc('0x47')]){return _0x4ee526[_0x8cfc('0xc0')]['Contacts'][0x0];}return db[_0x8cfc('0x8a')][_0x8cfc('0x57')](_['defaults'](_0x43d559[_0x8cfc('0x58')],{'firstName':_0x4b80fc,'mobile':_0x4b80fc,'phone':_0x4b80fc,'ListId':_0x4ee526['ListId']}));}})[_0x8cfc('0x1c')](handleEntityNotFound(_0xcf61a1,null))[_0x8cfc('0x1c')](function(_0x5778d2){if(_0x5778d2){_0x192680=_0x5778d2;return db[_0x8cfc('0xa5')][_0x8cfc('0x56')]({'where':{'ContactId':_0x192680['id'],'closed':![],'WhatsappAccountId':_0x4ee526['id']}})[_0x8cfc('0x1c')](function(_0x43a140){if(_0x43a140){return[_0x43a140,![]];}return db[_0x8cfc('0xa5')][_0x8cfc('0x57')]({'UserId':_0x43d559[_0x8cfc('0x59')]['id'],'ContactId':_0x192680['id'],'WhatsappAccountId':_0x4ee526['id'],'phone':_0x4b80fc,'firstMsgDirection':'out','Messages':[_[_0x8cfc('0x4d')](_0x43d559['body'],{'read':![],'body':_0x43d559[_0x8cfc('0x58')]['body'],'phone':_0x4b80fc,'WhatsappAccountId':_0x4ee526['id'],'UserId':_0x43d559[_0x8cfc('0x59')]['id'],'ContactId':_0x192680['id']})]},{'include':[{'model':db[_0x8cfc('0x85')],'as':_0x8cfc('0xc1')}]})[_0x8cfc('0x1c')](function(_0x23684e){return[_0x23684e,!![]];});});}})['spread'](function(_0x544e73,_0x21eed5){if(_0x21eed5){return _0x544e73;}return db[_0x8cfc('0x85')][_0x8cfc('0x57')](_[_0x8cfc('0x4d')](_0x43d559['body'],{'read':![],'body':_0x43d559[_0x8cfc('0x58')][_0x8cfc('0x58')],'phone':_0x4b80fc,'WhatsappAccountId':_0x4ee526['id'],'WhatsappInteractionId':_0x544e73['id'],'UserId':_0x43d559['user']['id'],'ContactId':_0x192680['id']}))[_0x8cfc('0x1c')](function(_0xdcc441){_0x544e73[_0x8cfc('0xc2')]['Messages']=[];_0x544e73['dataValues'][_0x8cfc('0xc1')][_0x8cfc('0xc3')](_0xdcc441['dataValues']);return _0x544e73;});})[_0x8cfc('0x1c')](respondWithResult(_0xcf61a1,null))['catch'](handleError(_0xcf61a1,null));};
\ No newline at end of file
index cfb915c..6bc87c1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3677=['emit','hasOwnProperty','save'];(function(_0x20fce2,_0x2bd715){var _0x525e30=function(_0x2f2812){while(--_0x2f2812){_0x20fce2['push'](_0x20fce2['shift']());}};_0x525e30(++_0x2bd715);}(_0x3677,0x170));var _0x7367=function(_0x51d234,_0x59b32f){_0x51d234=_0x51d234-0x0;var _0x4c9770=_0x3677[_0x51d234];return _0x4c9770;};'use strict';var EventEmitter=require('events');var WhatsappAccount=require('../../mysqldb')['db']['WhatsappAccount'];var WhatsappAccountEvents=new EventEmitter();WhatsappAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x7367('0x0'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x55785d){return function(_0x1f014c,_0x414e15,_0xbbce34){WhatsappAccountEvents['emit'](_0x55785d+':'+_0x1f014c['id'],_0x1f014c);WhatsappAccountEvents[_0x7367('0x1')](_0x55785d,_0x1f014c);_0xbbce34(null);};}for(var e in events){if(events[_0x7367('0x2')](e)){var event=events[e];WhatsappAccount['hook'](e,emitEvent(event));}}module['exports']=WhatsappAccountEvents;
\ No newline at end of file
+var _0xb52f=['emit','hasOwnProperty','events','../../mysqldb','WhatsappAccount','setMaxListeners','save','update','remove'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xb52f,0x134));var _0xfb52=function(_0x41fb85,_0x1057b7){_0x41fb85=_0x41fb85-0x0;var _0x1c802c=_0xb52f[_0x41fb85];return _0x1c802c;};'use strict';var EventEmitter=require(_0xfb52('0x0'));var WhatsappAccount=require(_0xfb52('0x1'))['db'][_0xfb52('0x2')];var WhatsappAccountEvents=new EventEmitter();WhatsappAccountEvents[_0xfb52('0x3')](0x0);var events={'afterCreate':_0xfb52('0x4'),'afterUpdate':_0xfb52('0x5'),'afterDestroy':_0xfb52('0x6')};function emitEvent(_0x4033a7){return function(_0x4ef54e,_0x1cffe1,_0xa51b48){WhatsappAccountEvents[_0xfb52('0x7')](_0x4033a7+':'+_0x4ef54e['id'],_0x4ef54e);WhatsappAccountEvents['emit'](_0x4033a7,_0x4ef54e);_0xa51b48(null);};}for(var e in events){if(events[_0xfb52('0x8')](e)){var event=events[e];WhatsappAccount['hook'](e,emitEvent(event));}}module['exports']=WhatsappAccountEvents;
\ No newline at end of file
index 54e419f..a1d1ae9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x52e7=['moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','WhatsappAccount','whatsapp_accounts','lodash','../../config/logger','api'];(function(_0xdcca54,_0x4b2b61){var _0x453197=function(_0x806f6a){while(--_0x806f6a){_0xdcca54['push'](_0xdcca54['shift']());}};_0x453197(++_0x4b2b61);}(_0x52e7,0x99));var _0x752e=function(_0x39b68b,_0x4ad96d){_0x39b68b=_0x39b68b-0x0;var _0xae091f=_0x52e7[_0x39b68b];return _0xae091f;};'use strict';var _=require(_0x752e('0x0'));var util=require('util');var logger=require(_0x752e('0x1'))(_0x752e('0x2'));var moment=require(_0x752e('0x3'));var BPromise=require(_0x752e('0x4'));var rp=require(_0x752e('0x5'));var fs=require('fs');var path=require(_0x752e('0x6'));var rimraf=require(_0x752e('0x7'));var config=require(_0x752e('0x8'));var attributes=require('./whatsappAccount.attributes');module[_0x752e('0x9')]=function(_0x174cbd,_0x444d8d){return _0x174cbd[_0x752e('0xa')](_0x752e('0xb'),attributes,{'tableName':_0x752e('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x8969=['lodash','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./whatsappAccount.attributes','exports','define'];(function(_0x174ef5,_0x256e8e){var _0x1cc379=function(_0x3eafcf){while(--_0x3eafcf){_0x174ef5['push'](_0x174ef5['shift']());}};_0x1cc379(++_0x256e8e);}(_0x8969,0x113));var _0x9896=function(_0x20c7f6,_0x2f7942){_0x20c7f6=_0x20c7f6-0x0;var _0x214abc=_0x8969[_0x20c7f6];return _0x214abc;};'use strict';var _=require(_0x9896('0x0'));var util=require('util');var logger=require(_0x9896('0x1'))('api');var moment=require(_0x9896('0x2'));var BPromise=require(_0x9896('0x3'));var rp=require(_0x9896('0x4'));var fs=require('fs');var path=require(_0x9896('0x5'));var rimraf=require(_0x9896('0x6'));var config=require(_0x9896('0x7'));var attributes=require(_0x9896('0x8'));module[_0x9896('0x9')]=function(_0x3449a6,_0x47a65b){return _0x3449a6[_0x9896('0xa')]('WhatsappAccount',attributes,{'tableName':'whatsapp_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 0e3b8de..1c758c5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6f08=['redis','defaults','localhost','socket.io-emitter','./whatsappAccount.socket','request','then','info','WhatsappAccount,\x20%s,\x20%s','request\x20sent','debug','WhatsappAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','ShowWhatsappAccount','WhatsappAccount','find','options','where','attributes','include','map','model','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http'];(function(_0x3a2a3c,_0x37bd31){var _0x50ac9a=function(_0x494a7f){while(--_0x494a7f){_0x3a2a3c['push'](_0x3a2a3c['shift']());}};_0x50ac9a(++_0x37bd31);}(_0x6f08,0x197));var _0x86f0=function(_0x250c85,_0x37320e){_0x250c85=_0x250c85-0x0;var _0x10df12=_0x6f08[_0x250c85];return _0x10df12;};'use strict';var _=require(_0x86f0('0x0'));var util=require(_0x86f0('0x1'));var moment=require(_0x86f0('0x2'));var BPromise=require(_0x86f0('0x3'));var rs=require(_0x86f0('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x86f0('0x5'))['db'];var utils=require(_0x86f0('0x6'));var logger=require(_0x86f0('0x7'))(_0x86f0('0x8'));var config=require(_0x86f0('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0x86f0('0xa')]({'port':0x232a});config[_0x86f0('0xb')]=_[_0x86f0('0xc')](config[_0x86f0('0xb')],{'host':_0x86f0('0xd'),'port':0x18eb});var socket=require(_0x86f0('0xe'))(new Redis(config[_0x86f0('0xb')]));require(_0x86f0('0xf'))['register'](socket);function respondWithRpcPromise(_0x337757,_0x234d8c,_0x2180f5){return new BPromise(function(_0x19e75e,_0x559423){return client[_0x86f0('0x10')](_0x337757,_0x2180f5)[_0x86f0('0x11')](function(_0x4605ff){logger[_0x86f0('0x12')](_0x86f0('0x13'),_0x234d8c,_0x86f0('0x14'));logger[_0x86f0('0x15')](_0x86f0('0x16'),_0x234d8c,_0x86f0('0x14'),JSON[_0x86f0('0x17')](_0x4605ff));if(_0x4605ff[_0x86f0('0x18')]){if(_0x4605ff[_0x86f0('0x18')][_0x86f0('0x19')]===0x1f4){logger[_0x86f0('0x18')]('WhatsappAccount,\x20%s,\x20%s',_0x234d8c,_0x4605ff[_0x86f0('0x18')][_0x86f0('0x1a')]);return _0x559423(_0x4605ff[_0x86f0('0x18')]['message']);}logger['error']('WhatsappAccount,\x20%s,\x20%s',_0x234d8c,_0x4605ff[_0x86f0('0x18')][_0x86f0('0x1a')]);return _0x19e75e(_0x4605ff['error'][_0x86f0('0x1a')]);}else{logger[_0x86f0('0x12')](_0x86f0('0x13'),_0x234d8c,_0x86f0('0x14'));_0x19e75e(_0x4605ff[_0x86f0('0x1b')]['message']);}})[_0x86f0('0x1c')](function(_0x37f2c2){logger[_0x86f0('0x18')](_0x86f0('0x13'),_0x234d8c,_0x37f2c2);_0x559423(_0x37f2c2);});});}exports[_0x86f0('0x1d')]=function(_0x1036ad){var _0x3a08a2=this;return new Promise(function(_0x1dfd75,_0x361674){return db[_0x86f0('0x1e')][_0x86f0('0x1f')]({'raw':_0x1036ad['options']?_0x1036ad['options']['raw']===undefined?!![]:![]:!![],'where':_0x1036ad['options']?_0x1036ad[_0x86f0('0x20')][_0x86f0('0x21')]||null:null,'attributes':_0x1036ad[_0x86f0('0x20')]?_0x1036ad[_0x86f0('0x20')][_0x86f0('0x22')]||null:null,'include':_0x1036ad[_0x86f0('0x20')]?_0x1036ad[_0x86f0('0x20')][_0x86f0('0x23')]?_[_0x86f0('0x24')](_0x1036ad[_0x86f0('0x20')][_0x86f0('0x23')],function(_0x234d6b){return{'model':db[_0x234d6b[_0x86f0('0x25')]],'as':_0x234d6b['as'],'attributes':_0x234d6b[_0x86f0('0x22')],'include':_0x234d6b['include']?_[_0x86f0('0x24')](_0x234d6b['include'],function(_0x53882a){return{'model':db[_0x53882a['model']],'as':_0x53882a['as'],'attributes':_0x53882a[_0x86f0('0x22')],'include':_0x53882a['include']?_[_0x86f0('0x24')](_0x53882a[_0x86f0('0x23')],function(_0x5520a4){return{'model':db[_0x5520a4[_0x86f0('0x25')]],'as':_0x5520a4['as'],'attributes':_0x5520a4['attributes']};}):[]};}):[]};}):[]:[]})[_0x86f0('0x11')](function(_0xd26843){logger[_0x86f0('0x12')]('ShowWhatsappAccount',_0x1036ad);logger[_0x86f0('0x15')](_0x86f0('0x1d'),_0x1036ad,JSON[_0x86f0('0x17')](_0xd26843));_0x1dfd75(_0xd26843);})[_0x86f0('0x1c')](function(_0x30a11b){logger[_0x86f0('0x18')](_0x86f0('0x1d'),_0x30a11b[_0x86f0('0x1a')],_0x1036ad);_0x361674(_0x3a08a2['error'](0x1f4,_0x30a11b['message']));});});};
\ No newline at end of file
+var _0xf9a9=['WhatsappAccount,\x20%s,\x20%s','request\x20sent','debug','WhatsappAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','find','options','raw','where','include','map','model','attributes','ShowWhatsappAccount','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','socket.io-emitter','./whatsappAccount.socket','register','request','then'];(function(_0x4b2cc6,_0x29ef43){var _0x3e0b08=function(_0x3b4131){while(--_0x3b4131){_0x4b2cc6['push'](_0x4b2cc6['shift']());}};_0x3e0b08(++_0x29ef43);}(_0xf9a9,0xfe));var _0x9f9a=function(_0x39c42a,_0x598fd9){_0x39c42a=_0x39c42a-0x0;var _0x33d579=_0xf9a9[_0x39c42a];return _0x33d579;};'use strict';var _=require(_0x9f9a('0x0'));var util=require(_0x9f9a('0x1'));var moment=require(_0x9f9a('0x2'));var BPromise=require(_0x9f9a('0x3'));var rs=require(_0x9f9a('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9f9a('0x5'))['db'];var utils=require(_0x9f9a('0x6'));var logger=require(_0x9f9a('0x7'))(_0x9f9a('0x8'));var config=require(_0x9f9a('0x9'));var jayson=require(_0x9f9a('0xa'));var client=jayson[_0x9f9a('0xb')][_0x9f9a('0xc')]({'port':0x232a});config[_0x9f9a('0xd')]=_['defaults'](config[_0x9f9a('0xd')],{'host':'localhost','port':0x18eb});var socket=require(_0x9f9a('0xe'))(new Redis(config['redis']));require(_0x9f9a('0xf'))[_0x9f9a('0x10')](socket);function respondWithRpcPromise(_0x4d3666,_0x4e9f84,_0xf4796a){return new BPromise(function(_0x485fdb,_0x96425a){return client[_0x9f9a('0x11')](_0x4d3666,_0xf4796a)[_0x9f9a('0x12')](function(_0x330d00){logger['info'](_0x9f9a('0x13'),_0x4e9f84,_0x9f9a('0x14'));logger[_0x9f9a('0x15')](_0x9f9a('0x16'),_0x4e9f84,_0x9f9a('0x14'),JSON[_0x9f9a('0x17')](_0x330d00));if(_0x330d00['error']){if(_0x330d00[_0x9f9a('0x18')][_0x9f9a('0x19')]===0x1f4){logger[_0x9f9a('0x18')](_0x9f9a('0x13'),_0x4e9f84,_0x330d00['error']['message']);return _0x96425a(_0x330d00[_0x9f9a('0x18')][_0x9f9a('0x1a')]);}logger['error'](_0x9f9a('0x13'),_0x4e9f84,_0x330d00[_0x9f9a('0x18')][_0x9f9a('0x1a')]);return _0x485fdb(_0x330d00['error'][_0x9f9a('0x1a')]);}else{logger[_0x9f9a('0x1b')](_0x9f9a('0x13'),_0x4e9f84,'request\x20sent');_0x485fdb(_0x330d00[_0x9f9a('0x1c')]['message']);}})[_0x9f9a('0x1d')](function(_0xf45736){logger[_0x9f9a('0x18')]('WhatsappAccount,\x20%s,\x20%s',_0x4e9f84,_0xf45736);_0x96425a(_0xf45736);});});}exports['ShowWhatsappAccount']=function(_0x387c9d){var _0x8e28e0=this;return new Promise(function(_0x35350b,_0x320446){return db['WhatsappAccount'][_0x9f9a('0x1e')]({'raw':_0x387c9d[_0x9f9a('0x1f')]?_0x387c9d[_0x9f9a('0x1f')][_0x9f9a('0x20')]===undefined?!![]:![]:!![],'where':_0x387c9d[_0x9f9a('0x1f')]?_0x387c9d[_0x9f9a('0x1f')][_0x9f9a('0x21')]||null:null,'attributes':_0x387c9d[_0x9f9a('0x1f')]?_0x387c9d['options']['attributes']||null:null,'include':_0x387c9d[_0x9f9a('0x1f')]?_0x387c9d[_0x9f9a('0x1f')][_0x9f9a('0x22')]?_[_0x9f9a('0x23')](_0x387c9d['options'][_0x9f9a('0x22')],function(_0x4d8925){return{'model':db[_0x4d8925[_0x9f9a('0x24')]],'as':_0x4d8925['as'],'attributes':_0x4d8925[_0x9f9a('0x25')],'include':_0x4d8925[_0x9f9a('0x22')]?_[_0x9f9a('0x23')](_0x4d8925['include'],function(_0x203389){return{'model':db[_0x203389['model']],'as':_0x203389['as'],'attributes':_0x203389['attributes'],'include':_0x203389[_0x9f9a('0x22')]?_['map'](_0x203389[_0x9f9a('0x22')],function(_0x1ab947){return{'model':db[_0x1ab947[_0x9f9a('0x24')]],'as':_0x1ab947['as'],'attributes':_0x1ab947['attributes']};}):[]};}):[]};}):[]:[]})[_0x9f9a('0x12')](function(_0x105d64){logger['info']('ShowWhatsappAccount',_0x387c9d);logger[_0x9f9a('0x15')]('ShowWhatsappAccount',_0x387c9d,JSON['stringify'](_0x105d64));_0x35350b(_0x105d64);})['catch'](function(_0x51a5e1){logger['error'](_0x9f9a('0x26'),_0x51a5e1[_0x9f9a('0x1a')],_0x387c9d);_0x320446(_0x8e28e0[_0x9f9a('0x18')](0x1f4,_0x51a5e1[_0x9f9a('0x1a')]));});});};
\ No newline at end of file
index 1d8b4a2..35f5da2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0347=['length','whatsappAccount:','save','remove','update','removeListener'];(function(_0x1eaf9,_0x53fb28){var _0x395ef9=function(_0x49f2a5){while(--_0x49f2a5){_0x1eaf9['push'](_0x1eaf9['shift']());}};_0x395ef9(++_0x53fb28);}(_0x0347,0x17c));var _0x7034=function(_0x2b4411,_0x2625ed){_0x2b4411=_0x2b4411-0x0;var _0x8e41ef=_0x0347[_0x2b4411];return _0x8e41ef;};'use strict';var WhatsappAccountEvents=require('./whatsappAccount.events');var events=[_0x7034('0x0'),_0x7034('0x1'),_0x7034('0x2')];function createListener(_0x1b85f9,_0x2c335a){return function(_0x1104ee){_0x2c335a['emit'](_0x1b85f9,_0x1104ee);};}function removeListener(_0x139c6f,_0x3cfd3b){return function(){WhatsappAccountEvents[_0x7034('0x3')](_0x139c6f,_0x3cfd3b);};}exports['register']=function(_0x2eb832){for(var _0x2200ff=0x0,_0x7063dd=events[_0x7034('0x4')];_0x2200ff<_0x7063dd;_0x2200ff++){var _0x5aee66=events[_0x2200ff];var _0x5e1469=createListener(_0x7034('0x5')+_0x5aee66,_0x2eb832);WhatsappAccountEvents['on'](_0x5aee66,_0x5e1469);}};
\ No newline at end of file
+var _0x94cb=['update','emit','removeListener','register','length','whatsappAccount:','save','remove'];(function(_0x37e57d,_0x52d437){var _0x4d3bbe=function(_0x2d58a6){while(--_0x2d58a6){_0x37e57d['push'](_0x37e57d['shift']());}};_0x4d3bbe(++_0x52d437);}(_0x94cb,0x76));var _0xb94c=function(_0x2afd47,_0x59ccbb){_0x2afd47=_0x2afd47-0x0;var _0x5d95bd=_0x94cb[_0x2afd47];return _0x5d95bd;};'use strict';var WhatsappAccountEvents=require('./whatsappAccount.events');var events=[_0xb94c('0x0'),_0xb94c('0x1'),_0xb94c('0x2')];function createListener(_0x254e00,_0x4a8490){return function(_0x3bab82){_0x4a8490[_0xb94c('0x3')](_0x254e00,_0x3bab82);};}function removeListener(_0x14860a,_0x31e2d9){return function(){WhatsappAccountEvents[_0xb94c('0x4')](_0x14860a,_0x31e2d9);};}exports[_0xb94c('0x5')]=function(_0x3b062d){for(var _0x41da4c=0x0,_0x2dfb0b=events[_0xb94c('0x6')];_0x41da4c<_0x2dfb0b;_0x41da4c++){var _0x2ceaf2=events[_0x41da4c];var _0x1532d0=createListener(_0xb94c('0x7')+_0x2ceaf2,_0x3b062d);WhatsappAccountEvents['on'](_0x2ceaf2,_0x1532d0);}};
\ No newline at end of file
index 175001b..3f8a07c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf84b=['./whatsappApplication.controller','get','isAuthenticated','/:id','show','post','put','update','destroy','exports','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x1dd3ed,_0x108587){var _0x2f61f1=function(_0x4af2db){while(--_0x4af2db){_0x1dd3ed['push'](_0x1dd3ed['shift']());}};_0x2f61f1(++_0x108587);}(_0xf84b,0x172));var _0xbf84=function(_0x2ca779,_0x472379){_0x2ca779=_0x2ca779-0x0;var _0x5b25eb=_0xf84b[_0x2ca779];return _0x5b25eb;};'use strict';var multer=require(_0xbf84('0x0'));var util=require(_0xbf84('0x1'));var path=require('path');var timeout=require(_0xbf84('0x2'));var express=require(_0xbf84('0x3'));var router=express[_0xbf84('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xbf84('0x5'));var interaction=require(_0xbf84('0x6'));var config=require(_0xbf84('0x7'));var controller=require(_0xbf84('0x8'));router[_0xbf84('0x9')]('/',auth[_0xbf84('0xa')](),controller['index']);router['get'](_0xbf84('0xb'),auth[_0xbf84('0xa')](),controller[_0xbf84('0xc')]);router[_0xbf84('0xd')]('/',auth[_0xbf84('0xa')](),controller['create']);router[_0xbf84('0xe')](_0xbf84('0xb'),auth[_0xbf84('0xa')](),controller[_0xbf84('0xf')]);router['delete']('/:id',auth[_0xbf84('0xa')](),controller[_0xbf84('0x10')]);module[_0xbf84('0x11')]=router;
\ No newline at end of file
+var _0xe37b=['/:id','show','post','create','put','delete','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../config/environment','./whatsappApplication.controller','get','isAuthenticated','index'];(function(_0x1f00c2,_0xcbc08a){var _0x2c425e=function(_0x191137){while(--_0x191137){_0x1f00c2['push'](_0x1f00c2['shift']());}};_0x2c425e(++_0xcbc08a);}(_0xe37b,0xd9));var _0xbe37=function(_0x49fcdc,_0xa1199c){_0x49fcdc=_0x49fcdc-0x0;var _0x3b73bc=_0xe37b[_0x49fcdc];return _0x3b73bc;};'use strict';var multer=require(_0xbe37('0x0'));var util=require('util');var path=require(_0xbe37('0x1'));var timeout=require(_0xbe37('0x2'));var express=require(_0xbe37('0x3'));var router=express[_0xbe37('0x4')]();var fs_extra=require(_0xbe37('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xbe37('0x6'));var controller=require(_0xbe37('0x7'));router[_0xbe37('0x8')]('/',auth[_0xbe37('0x9')](),controller[_0xbe37('0xa')]);router['get'](_0xbe37('0xb'),auth[_0xbe37('0x9')](),controller[_0xbe37('0xc')]);router[_0xbe37('0xd')]('/',auth[_0xbe37('0x9')](),controller[_0xbe37('0xe')]);router[_0xbe37('0xf')](_0xbe37('0xb'),auth[_0xbe37('0x9')](),controller['update']);router[_0xbe37('0x10')](_0xbe37('0xb'),auth[_0xbe37('0x9')](),controller[_0xbe37('0x11')]);module[_0xbe37('0x12')]=router;
\ No newline at end of file
index 52733bf..39de5f0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0e31=['exports','STRING','*,*,*,*','sequelize'];(function(_0x243b59,_0x3f9495){var _0x3e1676=function(_0x354052){while(--_0x354052){_0x243b59['push'](_0x243b59['shift']());}};_0x3e1676(++_0x3f9495);}(_0x0e31,0x93));var _0x10e3=function(_0x407d0f,_0x5cafa2){_0x407d0f=_0x407d0f-0x0;var _0xdeeb73=_0x0e31[_0x407d0f];return _0xdeeb73;};'use strict';var Sequelize=require(_0x10e3('0x0'));module[_0x10e3('0x1')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0x10e3('0x2')],'allowNull':![],'defaultValue':'noop'},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize[_0x10e3('0x2')]},'interval':{'type':Sequelize[_0x10e3('0x2')],'defaultValue':_0x10e3('0x3')}};
\ No newline at end of file
+var _0xf265=['TEXT','*,*,*,*','sequelize','exports','INTEGER','STRING','noop'];(function(_0xcea585,_0x1c3444){var _0x5db945=function(_0x2177f){while(--_0x2177f){_0xcea585['push'](_0xcea585['shift']());}};_0x5db945(++_0x1c3444);}(_0xf265,0x64));var _0x5f26=function(_0x1a0daa,_0x2a4634){_0x1a0daa=_0x1a0daa-0x0;var _0x1dbe15=_0xf265[_0x1a0daa];return _0x1dbe15;};'use strict';var Sequelize=require(_0x5f26('0x0'));module[_0x5f26('0x1')]={'priority':{'type':Sequelize[_0x5f26('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x5f26('0x3')],'allowNull':![],'defaultValue':_0x5f26('0x4')},'appdata':{'type':Sequelize[_0x5f26('0x5')]()},'description':{'type':Sequelize[_0x5f26('0x3')]},'interval':{'type':Sequelize[_0x5f26('0x3')],'defaultValue':_0x5f26('0x6')}};
\ No newline at end of file
index b9d9b0c..94939a0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe0dc=['apply','update','then','error','stack','name','index','map','WhatsappApplication','rawAttributes','fieldName','model','query','keys','intersection','attributes','nolimit','sort','where','filters','filter','merge','type','options','includeAll','include','findAll','rows','catch','show','params','length','find','create','body','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','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','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range'];(function(_0xf1d879,_0x239f90){var _0x474dc1=function(_0x142be4){while(--_0x142be4){_0xf1d879['push'](_0xf1d879['shift']());}};_0x474dc1(++_0x239f90);}(_0xe0dc,0x190));var _0xce0d=function(_0x4d5672,_0x4517e7){_0x4d5672=_0x4d5672-0x0;var _0x4a7aec=_0xe0dc[_0x4d5672];return _0x4a7aec;};'use strict';var emlformat=require(_0xce0d('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xce0d('0x1'));var jsonpatch=require(_0xce0d('0x2'));var rp=require('request-promise');var moment=require(_0xce0d('0x3'));var BPromise=require(_0xce0d('0x4'));var Mustache=require(_0xce0d('0x5'));var util=require(_0xce0d('0x6'));var path=require('path');var sox=require(_0xce0d('0x7'));var csv=require('to-csv');var ejs=require(_0xce0d('0x8'));var fs=require('fs');var fs_extra=require(_0xce0d('0x9'));var _=require(_0xce0d('0xa'));var squel=require(_0xce0d('0xb'));var crypto=require(_0xce0d('0xc'));var jsforce=require(_0xce0d('0xd'));var deskjs=require(_0xce0d('0xe'));var toCsv=require(_0xce0d('0xf'));var querystring=require(_0xce0d('0x10'));var Papa=require(_0xce0d('0x11'));var Redis=require(_0xce0d('0x12'));var authService=require(_0xce0d('0x13'));var qs=require(_0xce0d('0x14'));var as=require(_0xce0d('0x15'));var hardwareService=require(_0xce0d('0x16'));var logger=require(_0xce0d('0x17'))(_0xce0d('0x18'));var utils=require(_0xce0d('0x19'));var config=require(_0xce0d('0x1a'));var licenseUtil=require('../../config/license/util');var db=require(_0xce0d('0x1b'))['db'];function respondWithStatusCode(_0x419b8a,_0x2a802c){_0x2a802c=_0x2a802c||0xcc;return function(_0x29a87c){if(_0x29a87c){return _0x419b8a[_0xce0d('0x1c')](_0x2a802c);}return _0x419b8a[_0xce0d('0x1d')](_0x2a802c)[_0xce0d('0x1e')]();};}function respondWithResult(_0x178400,_0x18a96e){_0x18a96e=_0x18a96e||0xc8;return function(_0xfba354){if(_0xfba354){return _0x178400[_0xce0d('0x1d')](_0x18a96e)[_0xce0d('0x1f')](_0xfba354);}};}function respondWithFilteredResult(_0x2a2f69,_0x3bedc2){return function(_0xef9e5f){if(_0xef9e5f){var _0x176c81=typeof _0x3bedc2[_0xce0d('0x20')]===_0xce0d('0x21')&&typeof _0x3bedc2[_0xce0d('0x22')]===_0xce0d('0x21');var _0x2044df=_0xef9e5f[_0xce0d('0x23')];var _0x1dc8aa=_0x176c81?0x0:_0x3bedc2[_0xce0d('0x20')];var _0x3378f2=_0x176c81?_0xef9e5f[_0xce0d('0x23')]:_0x3bedc2[_0xce0d('0x20')]+_0x3bedc2[_0xce0d('0x22')];var _0x37aae8;if(_0x3378f2>=_0x2044df){_0x3378f2=_0x2044df;_0x37aae8=0xc8;}else{_0x37aae8=0xce;}_0x2a2f69[_0xce0d('0x1d')](_0x37aae8);return _0x2a2f69[_0xce0d('0x24')](_0xce0d('0x25'),_0x1dc8aa+'-'+_0x3378f2+'/'+_0x2044df)[_0xce0d('0x1f')](_0xef9e5f);}return null;};}function patchUpdates(_0x1fb46d){return function(_0x8388e3){try{jsonpatch[_0xce0d('0x26')](_0x8388e3,_0x1fb46d,!![]);}catch(_0x16788f){return BPromise['reject'](_0x16788f);}return _0x8388e3['save']();};}function saveUpdates(_0xa0277a,_0x4da3f6){return function(_0x2727c2){if(_0x2727c2){return _0x2727c2[_0xce0d('0x27')](_0xa0277a)[_0xce0d('0x28')](function(_0x58d7c5){return _0x58d7c5;});}return null;};}function removeEntity(_0x1ff817,_0x542d3d){return function(_0x298f3e){if(_0x298f3e){return _0x298f3e['destroy']()[_0xce0d('0x28')](function(){_0x1ff817[_0xce0d('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x516609,_0x31300f){return function(_0x201167){if(!_0x201167){_0x516609[_0xce0d('0x1c')](0x194);}return _0x201167;};}function handleError(_0x41b228,_0xdab05c){_0xdab05c=_0xdab05c||0x1f4;return function(_0x4cbaf4){logger[_0xce0d('0x29')](_0x4cbaf4[_0xce0d('0x2a')]);if(_0x4cbaf4[_0xce0d('0x2b')]){delete _0x4cbaf4['name'];}_0x41b228[_0xce0d('0x1d')](_0xdab05c)['send'](_0x4cbaf4);};}exports[_0xce0d('0x2c')]=function(_0x1eb234,_0x328842){var _0x435fd2={},_0x1a7f8c={},_0x3c4ec8={'count':0x0,'rows':[]};var _0x2c9c1b=_[_0xce0d('0x2d')](db[_0xce0d('0x2e')][_0xce0d('0x2f')],function(_0x4171cb){return{'name':_0x4171cb[_0xce0d('0x30')],'type':_0x4171cb['type']['key']};});_0x1a7f8c[_0xce0d('0x31')]=_[_0xce0d('0x2d')](_0x2c9c1b,_0xce0d('0x2b'));_0x1a7f8c[_0xce0d('0x32')]=_[_0xce0d('0x33')](_0x1eb234['query']);_0x1a7f8c['filters']=_[_0xce0d('0x34')](_0x1a7f8c[_0xce0d('0x31')],_0x1a7f8c['query']);_0x435fd2['attributes']=_['intersection'](_0x1a7f8c[_0xce0d('0x31')],qs['fields'](_0x1eb234['query']['fields']));_0x435fd2[_0xce0d('0x35')]=_0x435fd2['attributes']['length']?_0x435fd2['attributes']:_0x1a7f8c['model'];if(!_0x1eb234['query']['hasOwnProperty'](_0xce0d('0x36'))){_0x435fd2[_0xce0d('0x22')]=qs[_0xce0d('0x22')](_0x1eb234[_0xce0d('0x32')][_0xce0d('0x22')]);_0x435fd2[_0xce0d('0x20')]=qs[_0xce0d('0x20')](_0x1eb234[_0xce0d('0x32')][_0xce0d('0x20')]);}_0x435fd2['order']=qs[_0xce0d('0x37')](_0x1eb234[_0xce0d('0x32')]['sort']);_0x435fd2[_0xce0d('0x38')]=qs[_0xce0d('0x39')](_['pick'](_0x1eb234['query'],_0x1a7f8c[_0xce0d('0x39')]),_0x2c9c1b);if(_0x1eb234[_0xce0d('0x32')][_0xce0d('0x3a')]){_0x435fd2[_0xce0d('0x38')]=_[_0xce0d('0x3b')](_0x435fd2['where'],{'$or':_['map'](_0x2c9c1b,function(_0x27d599){if(_0x27d599[_0xce0d('0x3c')]!=='VIRTUAL'){var _0x4d4297={};_0x4d4297[_0x27d599[_0xce0d('0x2b')]]={'$like':'%'+_0x1eb234[_0xce0d('0x32')][_0xce0d('0x3a')]+'%'};return _0x4d4297;}})});}_0x435fd2=_[_0xce0d('0x3b')]({},_0x435fd2,_0x1eb234[_0xce0d('0x3d')]);var _0x1cfa6c={'where':_0x435fd2['where']};return db[_0xce0d('0x2e')][_0xce0d('0x23')](_0x1cfa6c)[_0xce0d('0x28')](function(_0x18a56f){_0x3c4ec8[_0xce0d('0x23')]=_0x18a56f;if(_0x1eb234[_0xce0d('0x32')][_0xce0d('0x3e')]){_0x435fd2[_0xce0d('0x3f')]=[{'all':!![]}];}return db['WhatsappApplication'][_0xce0d('0x40')](_0x435fd2);})['then'](function(_0x6352f9){_0x3c4ec8[_0xce0d('0x41')]=_0x6352f9;return _0x3c4ec8;})[_0xce0d('0x28')](respondWithFilteredResult(_0x328842,_0x435fd2))[_0xce0d('0x42')](handleError(_0x328842,null));};exports[_0xce0d('0x43')]=function(_0x4abd42,_0x118d68){var _0x1d19ed={'raw':!![],'where':{'id':_0x4abd42[_0xce0d('0x44')]['id']}},_0x5457d8={};_0x5457d8['model']=_[_0xce0d('0x33')](db[_0xce0d('0x2e')][_0xce0d('0x2f')]);_0x5457d8['query']=_[_0xce0d('0x33')](_0x4abd42[_0xce0d('0x32')]);_0x5457d8['filters']=_['intersection'](_0x5457d8[_0xce0d('0x31')],_0x5457d8[_0xce0d('0x32')]);_0x1d19ed[_0xce0d('0x35')]=_[_0xce0d('0x34')](_0x5457d8[_0xce0d('0x31')],qs['fields'](_0x4abd42['query']['fields']));_0x1d19ed[_0xce0d('0x35')]=_0x1d19ed[_0xce0d('0x35')][_0xce0d('0x45')]?_0x1d19ed[_0xce0d('0x35')]:_0x5457d8[_0xce0d('0x31')];if(_0x4abd42[_0xce0d('0x32')][_0xce0d('0x3e')]){_0x1d19ed['include']=[{'all':!![]}];}_0x1d19ed=_['merge']({},_0x1d19ed,_0x4abd42[_0xce0d('0x3d')]);return db[_0xce0d('0x2e')][_0xce0d('0x46')](_0x1d19ed)[_0xce0d('0x28')](handleEntityNotFound(_0x118d68,null))[_0xce0d('0x28')](respondWithResult(_0x118d68,null))[_0xce0d('0x42')](handleError(_0x118d68,null));};exports[_0xce0d('0x47')]=function(_0x47daa0,_0x362827){return db['WhatsappApplication']['create'](_0x47daa0[_0xce0d('0x48')],{})[_0xce0d('0x28')](respondWithResult(_0x362827,0xc9))[_0xce0d('0x42')](handleError(_0x362827,null));};exports['update']=function(_0x641547,_0x36f502){if(_0x641547['body']['id']){delete _0x641547[_0xce0d('0x48')]['id'];}return db[_0xce0d('0x2e')][_0xce0d('0x46')]({'where':{'id':_0x641547[_0xce0d('0x44')]['id']}})[_0xce0d('0x28')](handleEntityNotFound(_0x36f502,null))[_0xce0d('0x28')](saveUpdates(_0x641547[_0xce0d('0x48')],null))[_0xce0d('0x28')](respondWithResult(_0x36f502,null))[_0xce0d('0x42')](handleError(_0x36f502,null));};exports['destroy']=function(_0x327487,_0x4438e3){return db[_0xce0d('0x2e')][_0xce0d('0x46')]({'where':{'id':_0x327487['params']['id']}})[_0xce0d('0x28')](handleEntityNotFound(_0x4438e3,null))[_0xce0d('0x28')](removeEntity(_0x4438e3,null))['catch'](handleError(_0x4438e3,null));};
\ No newline at end of file
+var _0x0ef4=['lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','undefined','limit','offset','Content-Range','json','apply','save','update','then','destroy','name','map','rawAttributes','fieldName','type','key','model','query','keys','intersection','fields','attributes','hasOwnProperty','sort','where','filters','pick','filter','VIRTUAL','WhatsappApplication','count','includeAll','include','findAll','catch','show','params','length','merge','options','create','body','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','sox','fs-extra'];(function(_0x5235a6,_0x680b76){var _0x1cf37e=function(_0x31c173){while(--_0x31c173){_0x5235a6['push'](_0x5235a6['shift']());}};_0x1cf37e(++_0x680b76);}(_0x0ef4,0xc7));var _0x40ef=function(_0x3b3f4f,_0x403216){_0x3b3f4f=_0x3b3f4f-0x0;var _0x174dbe=_0x0ef4[_0x3b3f4f];return _0x174dbe;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x40ef('0x0'));var zipdir=require(_0x40ef('0x1'));var jsonpatch=require(_0x40ef('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x40ef('0x3'));var Mustache=require(_0x40ef('0x4'));var util=require(_0x40ef('0x5'));var path=require('path');var sox=require(_0x40ef('0x6'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x40ef('0x7'));var _=require(_0x40ef('0x8'));var squel=require(_0x40ef('0x9'));var crypto=require(_0x40ef('0xa'));var jsforce=require(_0x40ef('0xb'));var deskjs=require(_0x40ef('0xc'));var toCsv=require(_0x40ef('0xd'));var querystring=require(_0x40ef('0xe'));var Papa=require(_0x40ef('0xf'));var Redis=require('ioredis');var authService=require(_0x40ef('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x40ef('0x11'));var hardwareService=require(_0x40ef('0x12'));var logger=require(_0x40ef('0x13'))(_0x40ef('0x14'));var utils=require('../../config/utils');var config=require(_0x40ef('0x15'));var licenseUtil=require(_0x40ef('0x16'));var db=require(_0x40ef('0x17'))['db'];function respondWithStatusCode(_0x3d44c7,_0x1c4ed4){_0x1c4ed4=_0x1c4ed4||0xcc;return function(_0x136ccd){if(_0x136ccd){return _0x3d44c7[_0x40ef('0x18')](_0x1c4ed4);}return _0x3d44c7[_0x40ef('0x19')](_0x1c4ed4)[_0x40ef('0x1a')]();};}function respondWithResult(_0x3d5a16,_0xaf0020){_0xaf0020=_0xaf0020||0xc8;return function(_0x256142){if(_0x256142){return _0x3d5a16['status'](_0xaf0020)['json'](_0x256142);}};}function respondWithFilteredResult(_0x1ab3ba,_0x5010b3){return function(_0x39d022){if(_0x39d022){var _0xdb24fd=typeof _0x5010b3['offset']===_0x40ef('0x1b')&&typeof _0x5010b3[_0x40ef('0x1c')]==='undefined';var _0x3ddcf0=_0x39d022['count'];var _0x3a3ba2=_0xdb24fd?0x0:_0x5010b3[_0x40ef('0x1d')];var _0x3573bd=_0xdb24fd?_0x39d022['count']:_0x5010b3['offset']+_0x5010b3[_0x40ef('0x1c')];var _0x54c35d;if(_0x3573bd>=_0x3ddcf0){_0x3573bd=_0x3ddcf0;_0x54c35d=0xc8;}else{_0x54c35d=0xce;}_0x1ab3ba[_0x40ef('0x19')](_0x54c35d);return _0x1ab3ba['set'](_0x40ef('0x1e'),_0x3a3ba2+'-'+_0x3573bd+'/'+_0x3ddcf0)[_0x40ef('0x1f')](_0x39d022);}return null;};}function patchUpdates(_0x514263){return function(_0x2f6fd5){try{jsonpatch[_0x40ef('0x20')](_0x2f6fd5,_0x514263,!![]);}catch(_0xa60df3){return BPromise['reject'](_0xa60df3);}return _0x2f6fd5[_0x40ef('0x21')]();};}function saveUpdates(_0x4cef12,_0x3fb29c){return function(_0x5d2d53){if(_0x5d2d53){return _0x5d2d53[_0x40ef('0x22')](_0x4cef12)[_0x40ef('0x23')](function(_0x33ffdf){return _0x33ffdf;});}return null;};}function removeEntity(_0x362c81,_0x98d8ef){return function(_0x3d5266){if(_0x3d5266){return _0x3d5266[_0x40ef('0x24')]()[_0x40ef('0x23')](function(){_0x362c81[_0x40ef('0x19')](0xcc)[_0x40ef('0x1a')]();});}};}function handleEntityNotFound(_0x1df9e1,_0x435ce2){return function(_0x14f620){if(!_0x14f620){_0x1df9e1[_0x40ef('0x18')](0x194);}return _0x14f620;};}function handleError(_0x48cfb0,_0x3539bc){_0x3539bc=_0x3539bc||0x1f4;return function(_0x336c03){logger['error'](_0x336c03['stack']);if(_0x336c03[_0x40ef('0x25')]){delete _0x336c03[_0x40ef('0x25')];}_0x48cfb0['status'](_0x3539bc)['send'](_0x336c03);};}exports['index']=function(_0x7a3c7c,_0x570145){var _0x5c87c9={},_0xa1846c={},_0xd4338d={'count':0x0,'rows':[]};var _0x5b541d=_[_0x40ef('0x26')](db['WhatsappApplication'][_0x40ef('0x27')],function(_0x13552e){return{'name':_0x13552e[_0x40ef('0x28')],'type':_0x13552e[_0x40ef('0x29')][_0x40ef('0x2a')]};});_0xa1846c[_0x40ef('0x2b')]=_[_0x40ef('0x26')](_0x5b541d,_0x40ef('0x25'));_0xa1846c[_0x40ef('0x2c')]=_[_0x40ef('0x2d')](_0x7a3c7c['query']);_0xa1846c['filters']=_[_0x40ef('0x2e')](_0xa1846c[_0x40ef('0x2b')],_0xa1846c['query']);_0x5c87c9['attributes']=_['intersection'](_0xa1846c[_0x40ef('0x2b')],qs['fields'](_0x7a3c7c['query'][_0x40ef('0x2f')]));_0x5c87c9[_0x40ef('0x30')]=_0x5c87c9[_0x40ef('0x30')]['length']?_0x5c87c9[_0x40ef('0x30')]:_0xa1846c[_0x40ef('0x2b')];if(!_0x7a3c7c[_0x40ef('0x2c')][_0x40ef('0x31')]('nolimit')){_0x5c87c9['limit']=qs[_0x40ef('0x1c')](_0x7a3c7c['query']['limit']);_0x5c87c9[_0x40ef('0x1d')]=qs[_0x40ef('0x1d')](_0x7a3c7c['query'][_0x40ef('0x1d')]);}_0x5c87c9['order']=qs[_0x40ef('0x32')](_0x7a3c7c['query'][_0x40ef('0x32')]);_0x5c87c9[_0x40ef('0x33')]=qs[_0x40ef('0x34')](_[_0x40ef('0x35')](_0x7a3c7c['query'],_0xa1846c[_0x40ef('0x34')]),_0x5b541d);if(_0x7a3c7c['query'][_0x40ef('0x36')]){_0x5c87c9['where']=_['merge'](_0x5c87c9[_0x40ef('0x33')],{'$or':_[_0x40ef('0x26')](_0x5b541d,function(_0x159a28){if(_0x159a28['type']!==_0x40ef('0x37')){var _0x54345f={};_0x54345f[_0x159a28[_0x40ef('0x25')]]={'$like':'%'+_0x7a3c7c[_0x40ef('0x2c')]['filter']+'%'};return _0x54345f;}})});}_0x5c87c9=_['merge']({},_0x5c87c9,_0x7a3c7c['options']);var _0x1b68d3={'where':_0x5c87c9[_0x40ef('0x33')]};return db[_0x40ef('0x38')][_0x40ef('0x39')](_0x1b68d3)[_0x40ef('0x23')](function(_0x221006){_0xd4338d[_0x40ef('0x39')]=_0x221006;if(_0x7a3c7c[_0x40ef('0x2c')][_0x40ef('0x3a')]){_0x5c87c9[_0x40ef('0x3b')]=[{'all':!![]}];}return db[_0x40ef('0x38')][_0x40ef('0x3c')](_0x5c87c9);})[_0x40ef('0x23')](function(_0x5bf9f3){_0xd4338d['rows']=_0x5bf9f3;return _0xd4338d;})[_0x40ef('0x23')](respondWithFilteredResult(_0x570145,_0x5c87c9))[_0x40ef('0x3d')](handleError(_0x570145,null));};exports[_0x40ef('0x3e')]=function(_0x32e749,_0x2e7971){var _0x5583d3={'raw':!![],'where':{'id':_0x32e749[_0x40ef('0x3f')]['id']}},_0xd75ebe={};_0xd75ebe[_0x40ef('0x2b')]=_[_0x40ef('0x2d')](db[_0x40ef('0x38')]['rawAttributes']);_0xd75ebe[_0x40ef('0x2c')]=_[_0x40ef('0x2d')](_0x32e749[_0x40ef('0x2c')]);_0xd75ebe[_0x40ef('0x34')]=_[_0x40ef('0x2e')](_0xd75ebe[_0x40ef('0x2b')],_0xd75ebe[_0x40ef('0x2c')]);_0x5583d3[_0x40ef('0x30')]=_['intersection'](_0xd75ebe[_0x40ef('0x2b')],qs[_0x40ef('0x2f')](_0x32e749[_0x40ef('0x2c')]['fields']));_0x5583d3[_0x40ef('0x30')]=_0x5583d3[_0x40ef('0x30')][_0x40ef('0x40')]?_0x5583d3['attributes']:_0xd75ebe[_0x40ef('0x2b')];if(_0x32e749[_0x40ef('0x2c')]['includeAll']){_0x5583d3[_0x40ef('0x3b')]=[{'all':!![]}];}_0x5583d3=_[_0x40ef('0x41')]({},_0x5583d3,_0x32e749[_0x40ef('0x42')]);return db[_0x40ef('0x38')]['find'](_0x5583d3)[_0x40ef('0x23')](handleEntityNotFound(_0x2e7971,null))['then'](respondWithResult(_0x2e7971,null))[_0x40ef('0x3d')](handleError(_0x2e7971,null));};exports[_0x40ef('0x43')]=function(_0x1ccc24,_0x407f23){return db[_0x40ef('0x38')]['create'](_0x1ccc24[_0x40ef('0x44')],{})[_0x40ef('0x23')](respondWithResult(_0x407f23,0xc9))[_0x40ef('0x3d')](handleError(_0x407f23,null));};exports['update']=function(_0x10e2a7,_0x1e5190){if(_0x10e2a7[_0x40ef('0x44')]['id']){delete _0x10e2a7[_0x40ef('0x44')]['id'];}return db[_0x40ef('0x38')]['find']({'where':{'id':_0x10e2a7[_0x40ef('0x3f')]['id']}})[_0x40ef('0x23')](handleEntityNotFound(_0x1e5190,null))[_0x40ef('0x23')](saveUpdates(_0x10e2a7[_0x40ef('0x44')],null))[_0x40ef('0x23')](respondWithResult(_0x1e5190,null))[_0x40ef('0x3d')](handleError(_0x1e5190,null));};exports[_0x40ef('0x24')]=function(_0x4a5446,_0xc5306a){return db[_0x40ef('0x38')]['find']({'where':{'id':_0x4a5446[_0x40ef('0x3f')]['id']}})[_0x40ef('0x23')](handleEntityNotFound(_0xc5306a,null))[_0x40ef('0x23')](removeEntity(_0xc5306a,null))[_0x40ef('0x3d')](handleError(_0xc5306a,null));};
\ No newline at end of file
index 8b47114..af374f1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x207c=['bluebird','request-promise','path','../../config/environment','define','WhatsappApplication','utf8mb4','utf8mb4_unicode_ci','util','../../config/logger','api','moment'];(function(_0x369cd0,_0x472d1e){var _0x16692d=function(_0x4b8338){while(--_0x4b8338){_0x369cd0['push'](_0x369cd0['shift']());}};_0x16692d(++_0x472d1e);}(_0x207c,0x1e8));var _0xc207=function(_0x38490b,_0x108ad7){_0x38490b=_0x38490b-0x0;var _0x197661=_0x207c[_0x38490b];return _0x197661;};'use strict';var _=require('lodash');var util=require(_0xc207('0x0'));var logger=require(_0xc207('0x1'))(_0xc207('0x2'));var moment=require(_0xc207('0x3'));var BPromise=require(_0xc207('0x4'));var rp=require(_0xc207('0x5'));var fs=require('fs');var path=require(_0xc207('0x6'));var rimraf=require('rimraf');var config=require(_0xc207('0x7'));var attributes=require('./whatsappApplication.attributes');module['exports']=function(_0x55023e,_0xc88789){return _0x55023e[_0xc207('0x8')](_0xc207('0x9'),attributes,{'tableName':'whatsapp_applications','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xc207('0xa'),'collate':_0xc207('0xb')});};
\ No newline at end of file
+var _0x032e=['api','request-promise','path','rimraf','../../config/environment','./whatsappApplication.attributes','exports','define','WhatsappApplication','whatsapp_applications','utf8mb4','utf8mb4_unicode_ci','lodash','../../config/logger'];(function(_0x262ab2,_0x3d0bcd){var _0x59903c=function(_0x1f716f){while(--_0x1f716f){_0x262ab2['push'](_0x262ab2['shift']());}};_0x59903c(++_0x3d0bcd);}(_0x032e,0x124));var _0xe032=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x032e[_0x2dafbe];return _0x58a45a;};'use strict';var _=require(_0xe032('0x0'));var util=require('util');var logger=require(_0xe032('0x1'))(_0xe032('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xe032('0x3'));var fs=require('fs');var path=require(_0xe032('0x4'));var rimraf=require(_0xe032('0x5'));var config=require(_0xe032('0x6'));var attributes=require(_0xe032('0x7'));module[_0xe032('0x8')]=function(_0x2ba8a0,_0x33ad0b){return _0x2ba8a0[_0xe032('0x9')](_0xe032('0xa'),attributes,{'tableName':_0xe032('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xe032('0xc'),'collate':_0xe032('0xd')});};
\ No newline at end of file
index ff44b22..c195c38 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x70e0=['code','WhatsappApplication,\x20%s,\x20%s','message','result','catch','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','request','then','info','debug','WhatsappApplication,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error'];(function(_0x3b418f,_0x5463e2){var _0x136223=function(_0xe58731){while(--_0xe58731){_0x3b418f['push'](_0x3b418f['shift']());}};_0x136223(++_0x5463e2);}(_0x70e0,0x17b));var _0x070e=function(_0x5b8850,_0x1749d8){_0x5b8850=_0x5b8850-0x0;var _0xeecf4c=_0x70e0[_0x5b8850];return _0xeecf4c;};'use strict';var _=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var moment=require(_0x070e('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x070e('0x3'));var db=require(_0x070e('0x4'))['db'];var utils=require(_0x070e('0x5'));var logger=require(_0x070e('0x6'))('rpc');var config=require(_0x070e('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x070e('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x56e420,_0x5032e5,_0x35ab0c){return new BPromise(function(_0x1e11f0,_0x604664){return client[_0x070e('0x9')](_0x56e420,_0x35ab0c)[_0x070e('0xa')](function(_0x68a09e){logger[_0x070e('0xb')]('WhatsappApplication,\x20%s,\x20%s',_0x5032e5,'request\x20sent');logger[_0x070e('0xc')](_0x070e('0xd'),_0x5032e5,_0x070e('0xe'),JSON[_0x070e('0xf')](_0x68a09e));if(_0x68a09e[_0x070e('0x10')]){if(_0x68a09e[_0x070e('0x10')][_0x070e('0x11')]===0x1f4){logger[_0x070e('0x10')](_0x070e('0x12'),_0x5032e5,_0x68a09e[_0x070e('0x10')][_0x070e('0x13')]);return _0x604664(_0x68a09e['error']['message']);}logger[_0x070e('0x10')]('WhatsappApplication,\x20%s,\x20%s',_0x5032e5,_0x68a09e['error']['message']);return _0x1e11f0(_0x68a09e[_0x070e('0x10')][_0x070e('0x13')]);}else{logger['info']('WhatsappApplication,\x20%s,\x20%s',_0x5032e5,_0x070e('0xe'));_0x1e11f0(_0x68a09e[_0x070e('0x14')][_0x070e('0x13')]);}})[_0x070e('0x15')](function(_0x5bc71e){logger['error'](_0x070e('0x12'),_0x5032e5,_0x5bc71e);_0x604664(_0x5bc71e);});});}
\ No newline at end of file
+var _0xa8a8=['stringify','error','code','WhatsappApplication,\x20%s,\x20%s','message','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','request\x20sent','debug'];(function(_0x321737,_0x402581){var _0x27ced5=function(_0x56bd2b){while(--_0x56bd2b){_0x321737['push'](_0x321737['shift']());}};_0x27ced5(++_0x402581);}(_0xa8a8,0xec));var _0x8a8a=function(_0x4ea990,_0x4f7ae9){_0x4ea990=_0x4ea990-0x0;var _0x4c00a5=_0xa8a8[_0x4ea990];return _0x4c00a5;};'use strict';var _=require(_0x8a8a('0x0'));var util=require(_0x8a8a('0x1'));var moment=require(_0x8a8a('0x2'));var BPromise=require(_0x8a8a('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8a8a('0x4'));var db=require(_0x8a8a('0x5'))['db'];var utils=require(_0x8a8a('0x6'));var logger=require(_0x8a8a('0x7'))(_0x8a8a('0x8'));var config=require(_0x8a8a('0x9'));var jayson=require(_0x8a8a('0xa'));var client=jayson[_0x8a8a('0xb')][_0x8a8a('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x315fe9,_0x1d7121,_0x8e7aa0){return new BPromise(function(_0x4225b9,_0xecaa6f){return client[_0x8a8a('0xd')](_0x315fe9,_0x8e7aa0)['then'](function(_0x576ef9){logger[_0x8a8a('0xe')]('WhatsappApplication,\x20%s,\x20%s',_0x1d7121,_0x8a8a('0xf'));logger[_0x8a8a('0x10')]('WhatsappApplication,\x20%s,\x20%s,\x20%s',_0x1d7121,_0x8a8a('0xf'),JSON[_0x8a8a('0x11')](_0x576ef9));if(_0x576ef9[_0x8a8a('0x12')]){if(_0x576ef9['error'][_0x8a8a('0x13')]===0x1f4){logger[_0x8a8a('0x12')](_0x8a8a('0x14'),_0x1d7121,_0x576ef9[_0x8a8a('0x12')]['message']);return _0xecaa6f(_0x576ef9[_0x8a8a('0x12')]['message']);}logger[_0x8a8a('0x12')](_0x8a8a('0x14'),_0x1d7121,_0x576ef9[_0x8a8a('0x12')][_0x8a8a('0x15')]);return _0x4225b9(_0x576ef9[_0x8a8a('0x12')][_0x8a8a('0x15')]);}else{logger[_0x8a8a('0xe')]('WhatsappApplication,\x20%s,\x20%s',_0x1d7121,_0x8a8a('0xf'));_0x4225b9(_0x576ef9['result'][_0x8a8a('0x15')]);}})[_0x8a8a('0x16')](function(_0x46a4f4){logger[_0x8a8a('0x12')](_0x8a8a('0x14'),_0x1d7121,_0x46a4f4);_0xecaa6f(_0x46a4f4);});});}
\ No newline at end of file
index 01c39e7..6968ab8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x723e=['../../config/environment','./whatsappInteraction.controller','isAuthenticated','index','get','/describe','describe','/:id','show','/:id/messages','getMessages','/:id/download','download','post','create','tracked','whatsapp','whatsappinteraction:addtags','addTags','put','whatsappinteraction:update','update','delete','whatsappinteraction:destroy','destroy','/:id/tags','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x178fcd,_0x353a2f){var _0x25a77c=function(_0x3ef32d){while(--_0x3ef32d){_0x178fcd['push'](_0x178fcd['shift']());}};_0x25a77c(++_0x353a2f);}(_0x723e,0x179));var _0xe723=function(_0x3f4027,_0x221cbb){_0x3f4027=_0x3f4027-0x0;var _0x4aea2e=_0x723e[_0x3f4027];return _0x4aea2e;};'use strict';var multer=require('multer');var util=require(_0xe723('0x0'));var path=require(_0xe723('0x1'));var timeout=require(_0xe723('0x2'));var express=require(_0xe723('0x3'));var router=express[_0xe723('0x4')]();var fs_extra=require(_0xe723('0x5'));var auth=require(_0xe723('0x6'));var interaction=require(_0xe723('0x7'));var config=require(_0xe723('0x8'));var controller=require(_0xe723('0x9'));router['get']('/',auth[_0xe723('0xa')](),controller[_0xe723('0xb')]);router[_0xe723('0xc')](_0xe723('0xd'),auth[_0xe723('0xa')](),controller[_0xe723('0xe')]);router[_0xe723('0xc')](_0xe723('0xf'),auth['isAuthenticated'](),controller[_0xe723('0x10')]);router[_0xe723('0xc')](_0xe723('0x11'),auth['isAuthenticated'](),controller[_0xe723('0x12')]);router[_0xe723('0xc')](_0xe723('0x13'),auth['isAuthenticated'](),controller[_0xe723('0x14')]);router[_0xe723('0x15')]('/',auth[_0xe723('0xa')](),controller[_0xe723('0x16')]);router[_0xe723('0x15')]('/:id/messages',auth[_0xe723('0xa')](),controller['addMessage']);router['post']('/:id/tags',auth['isAuthenticated'](),interaction[_0xe723('0x17')](_0xe723('0x18'),_0xe723('0x19')),controller[_0xe723('0x1a')]);router[_0xe723('0x1b')]('/:id',auth[_0xe723('0xa')](),interaction[_0xe723('0x17')](_0xe723('0x18'),_0xe723('0x1c')),controller[_0xe723('0x1d')]);router[_0xe723('0x1e')](_0xe723('0xf'),auth[_0xe723('0xa')](),interaction[_0xe723('0x17')](_0xe723('0x18'),_0xe723('0x1f')),controller[_0xe723('0x20')]);router[_0xe723('0x1e')](_0xe723('0x21'),auth['isAuthenticated'](),controller['removeTags']);module[_0xe723('0x22')]=router;
\ No newline at end of file
+var _0x938d=['addMessage','/:id/tags','whatsappinteraction:addtags','addTags','put','tracked','whatsapp','whatsappinteraction:destroy','destroy','delete','exports','multer','util','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./whatsappInteraction.controller','isAuthenticated','index','get','/describe','describe','/:id','show','/:id/messages','/:id/download','download','post','create'];(function(_0x484e36,_0x4482d8){var _0xafc85d=function(_0xaba9c8){while(--_0xaba9c8){_0x484e36['push'](_0x484e36['shift']());}};_0xafc85d(++_0x4482d8);}(_0x938d,0x122));var _0xd938=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x938d[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0xd938('0x0'));var util=require(_0xd938('0x1'));var path=require('path');var timeout=require(_0xd938('0x2'));var express=require(_0xd938('0x3'));var router=express[_0xd938('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xd938('0x5'));var config=require(_0xd938('0x6'));var controller=require(_0xd938('0x7'));router['get']('/',auth[_0xd938('0x8')](),controller[_0xd938('0x9')]);router[_0xd938('0xa')](_0xd938('0xb'),auth[_0xd938('0x8')](),controller[_0xd938('0xc')]);router['get'](_0xd938('0xd'),auth[_0xd938('0x8')](),controller[_0xd938('0xe')]);router[_0xd938('0xa')](_0xd938('0xf'),auth[_0xd938('0x8')](),controller['getMessages']);router[_0xd938('0xa')](_0xd938('0x10'),auth[_0xd938('0x8')](),controller[_0xd938('0x11')]);router[_0xd938('0x12')]('/',auth[_0xd938('0x8')](),controller[_0xd938('0x13')]);router[_0xd938('0x12')](_0xd938('0xf'),auth[_0xd938('0x8')](),controller[_0xd938('0x14')]);router[_0xd938('0x12')](_0xd938('0x15'),auth['isAuthenticated'](),interaction['tracked']('whatsapp',_0xd938('0x16')),controller[_0xd938('0x17')]);router[_0xd938('0x18')]('/:id',auth['isAuthenticated'](),interaction[_0xd938('0x19')](_0xd938('0x1a'),'whatsappinteraction:update'),controller['update']);router['delete'](_0xd938('0xd'),auth[_0xd938('0x8')](),interaction[_0xd938('0x19')]('whatsapp',_0xd938('0x1b')),controller[_0xd938('0x1c')]);router[_0xd938('0x1d')](_0xd938('0x15'),auth[_0xd938('0x8')](),controller['removeTags']);module[_0xd938('0x1e')]=router;
\ No newline at end of file
index 080618f..4db22c3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe820=['sequelize','exports','STRING','ENUM','out','DATE','INTEGER'];(function(_0x344eb8,_0x12a8a5){var _0x3f197c=function(_0x21fa6e){while(--_0x21fa6e){_0x344eb8['push'](_0x344eb8['shift']());}};_0x3f197c(++_0x12a8a5);}(_0xe820,0xd2));var _0x0e82=function(_0x1fadf1,_0x3d615d){_0x1fadf1=_0x1fadf1-0x0;var _0x20748f=_0xe820[_0x1fadf1];return _0x20748f;};'use strict';var Sequelize=require(_0x0e82('0x0'));var moment=require('moment');module[_0x0e82('0x1')]={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0x0e82('0x2')]},'secondDisposition':{'type':Sequelize[_0x0e82('0x2')]},'thirdDisposition':{'type':Sequelize[_0x0e82('0x2')]},'note':{'type':Sequelize['STRING']},'phone':{'type':Sequelize[_0x0e82('0x2')]},'read1stAt':{'type':Sequelize['DATE']},'firstMsgDirection':{'type':Sequelize[_0x0e82('0x3')]('in',_0x0e82('0x4')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x0e82('0x5')]},'lastMsgDirection':{'type':Sequelize[_0x0e82('0x3')]('in',_0x0e82('0x4')),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueId':{'type':Sequelize[_0x0e82('0x6')]}};
\ No newline at end of file
+var _0xf34f=['out','ENUM','BOOLEAN','INTEGER','sequelize','exports','DATE','STRING'];(function(_0x572e25,_0x36f59c){var _0x2e2cf6=function(_0x4a75d2){while(--_0x4a75d2){_0x572e25['push'](_0x572e25['shift']());}};_0x2e2cf6(++_0x36f59c);}(_0xf34f,0x64));var _0xff34=function(_0x4a509f,_0xbe75f7){_0x4a509f=_0x4a509f-0x0;var _0x56d94e=_0xf34f[_0x4a509f];return _0x56d94e;};'use strict';var Sequelize=require(_0xff34('0x0'));var moment=require('moment');module[_0xff34('0x1')]={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'closedAt':{'type':Sequelize[_0xff34('0x2')]},'disposition':{'type':Sequelize['STRING']},'secondDisposition':{'type':Sequelize[_0xff34('0x3')]},'thirdDisposition':{'type':Sequelize[_0xff34('0x3')]},'note':{'type':Sequelize[_0xff34('0x3')]},'phone':{'type':Sequelize['STRING']},'read1stAt':{'type':Sequelize[_0xff34('0x2')]},'firstMsgDirection':{'type':Sequelize['ENUM']('in',_0xff34('0x4')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize['DATE']},'lastMsgDirection':{'type':Sequelize[_0xff34('0x5')]('in','out'),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0xff34('0x6')],'defaultValue':![]},'queueId':{'type':Sequelize[_0xff34('0x7')]}};
\ No newline at end of file
index 98d6899..d04622a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x03e9=['setTags','omit','spread','Tag','findAll','color','emit','whatsappInteractionTags:save','removeTags','unix','toString','join','root','server','files','tmp','attachments','transcript-%d-%s.zip','push','User','fullname','CmContact','Contact','firstName','lastName','Attachment','Messages','createdAt','secret','WhatsappAccount','Account','Owner','get','mkdirSync','Whatsapp','N.A.','closed','closedAt','disposition','existsSync','createReadStream','basename','direction','out','System','read','value','renderFile','views','downloadInteraction.ejs','transcript-','.pdf','createPdfFromHTML','err','unlinkSync','rimraf','zip-dir','bluebird','util','path','ejs','lodash','ioredis','../../components/parsers/qs','../../components/export/pdf','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./whatsappInteraction.socket','status','json','offset','count','set','Content-Range','update','then','destroy','end','sendStatus','error','stack','name','index','WhatsappInteraction','rawAttributes','fieldName','type','key','getOptions','whatsapp','query','user','catch','params','model','keys','intersection','attributes','fields','length','include','merge','create','body','find','describe','WhatsappMessage','addMessage','ids','getMessages','findOne','filters','nolimit','limit','sort','where','WhatsappInteractionId','filter','map','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','includeAll','rows','addTags'];(function(_0x555e88,_0x2c4080){var _0x2143d7=function(_0x4ecc9a){while(--_0x4ecc9a){_0x555e88['push'](_0x555e88['shift']());}};_0x2143d7(++_0x2c4080);}(_0x03e9,0x13f));var _0x903e=function(_0x56f622,_0x1c6221){_0x56f622=_0x56f622-0x0;var _0x4873dc=_0x03e9[_0x56f622];return _0x4873dc;};'use strict';var rimraf=require(_0x903e('0x0'));var zipdir=require(_0x903e('0x1'));var moment=require('moment');var BPromise=require(_0x903e('0x2'));var util=require(_0x903e('0x3'));var path=require(_0x903e('0x4'));var ejs=require(_0x903e('0x5'));var fs=require('fs');var _=require(_0x903e('0x6'));var Redis=require(_0x903e('0x7'));var interaction=require('../../components/interaction/service');var qs=require(_0x903e('0x8'));var pdf=require(_0x903e('0x9'));var logger=require(_0x903e('0xa'))(_0x903e('0xb'));var config=require(_0x903e('0xc'));var db=require(_0x903e('0xd'))['db'];config[_0x903e('0xe')]=_[_0x903e('0xf')](config['redis'],{'host':_0x903e('0x10'),'port':0x18eb});var socket=require(_0x903e('0x11'))(new Redis(config[_0x903e('0xe')]));require(_0x903e('0x12'))['register'](socket);function respondWithStatusCode(_0x270222,_0x5e7235){_0x5e7235=_0x5e7235||0xcc;return function(_0x2632af){if(_0x2632af){return _0x270222['sendStatus'](_0x5e7235);}return _0x270222[_0x903e('0x13')](_0x5e7235)['end']();};}function respondWithResult(_0x3b2ed4,_0x34573e){_0x34573e=_0x34573e||0xc8;return function(_0x523b34){if(_0x523b34){return _0x3b2ed4[_0x903e('0x13')](_0x34573e)[_0x903e('0x14')](_0x523b34);}};}function respondWithFilteredResult(_0x1ff9a4,_0x34fd15){return function(_0x168af3){if(_0x168af3){var _0x5c9c43=typeof _0x34fd15[_0x903e('0x15')]==='undefined'&&typeof _0x34fd15['limit']==='undefined';var _0xc55d6a=_0x168af3[_0x903e('0x16')];var _0x2d492d=_0x5c9c43?0x0:_0x34fd15[_0x903e('0x15')];var _0x2b62f0=_0x5c9c43?_0x168af3[_0x903e('0x16')]:_0x34fd15['offset']+_0x34fd15['limit'];var _0x1ec775;if(_0x2b62f0>=_0xc55d6a){_0x2b62f0=_0xc55d6a;_0x1ec775=0xc8;}else{_0x1ec775=0xce;}_0x1ff9a4[_0x903e('0x13')](_0x1ec775);return _0x1ff9a4[_0x903e('0x17')](_0x903e('0x18'),_0x2d492d+'-'+_0x2b62f0+'/'+_0xc55d6a)[_0x903e('0x14')](_0x168af3);}return null;};}function saveUpdates(_0x8b8e36){return function(_0x121d5a){if(_0x121d5a){return _0x121d5a[_0x903e('0x19')](_0x8b8e36)[_0x903e('0x1a')](function(_0x4ea776){return _0x4ea776;});}return null;};}function removeEntity(_0x250602){return function(_0x372641){if(_0x372641){return _0x372641[_0x903e('0x1b')]()['then'](function(){_0x250602[_0x903e('0x13')](0xcc)[_0x903e('0x1c')]();});}};}function handleEntityNotFound(_0x206b16){return function(_0x504025){if(!_0x504025){_0x206b16[_0x903e('0x1d')](0x194);}return _0x504025;};}function handleError(_0x539fbf,_0x4e7e0e){_0x4e7e0e=_0x4e7e0e||0x1f4;return function(_0x3e9756){logger[_0x903e('0x1e')](_0x3e9756[_0x903e('0x1f')]);if(_0x3e9756[_0x903e('0x20')]){delete _0x3e9756[_0x903e('0x20')];}_0x539fbf['status'](_0x4e7e0e)['send'](_0x3e9756);};}exports[_0x903e('0x21')]=function(_0x2ca311,_0x1083c5){var _0x578276={};var _0x4df371=_['map'](db[_0x903e('0x22')][_0x903e('0x23')],function(_0x532d24){return{'name':_0x532d24[_0x903e('0x24')],'type':_0x532d24[_0x903e('0x25')][_0x903e('0x26')]};});_0x578276=qs[_0x903e('0x27')](_0x4df371,_0x2ca311);return interaction['findAll'](_0x903e('0x28'),_0x2ca311[_0x903e('0x29')],_0x2ca311[_0x903e('0x2a')],_0x578276,_0x4df371)['then'](respondWithFilteredResult(_0x1083c5,_0x578276))[_0x903e('0x2b')](handleError(_0x1083c5,null));};exports['show']=function(_0x3f6587,_0x4abd28){var _0xb4e297={'raw':![],'where':{'id':_0x3f6587[_0x903e('0x2c')]['id']}},_0x19651d={};_0x19651d[_0x903e('0x2d')]=_[_0x903e('0x2e')](db[_0x903e('0x22')][_0x903e('0x23')]);_0x19651d[_0x903e('0x29')]=_[_0x903e('0x2e')](_0x3f6587['query']);_0x19651d['filters']=_[_0x903e('0x2f')](_0x19651d['model'],_0x19651d[_0x903e('0x29')]);_0xb4e297[_0x903e('0x30')]=_[_0x903e('0x2f')](_0x19651d[_0x903e('0x2d')],qs[_0x903e('0x31')](_0x3f6587[_0x903e('0x29')][_0x903e('0x31')]));_0xb4e297[_0x903e('0x30')]=_0xb4e297[_0x903e('0x30')][_0x903e('0x32')]?_0xb4e297[_0x903e('0x30')]:_0x19651d['model'];if(_0x3f6587[_0x903e('0x29')]['includeAll']){_0xb4e297[_0x903e('0x33')]=[{'all':!![]}];}_0xb4e297=_[_0x903e('0x34')]({},_0xb4e297,_0x3f6587['options']);return db[_0x903e('0x22')]['find'](_0xb4e297)[_0x903e('0x1a')](handleEntityNotFound(_0x4abd28,null))['then'](respondWithResult(_0x4abd28,null))[_0x903e('0x2b')](handleError(_0x4abd28,null));};exports[_0x903e('0x35')]=function(_0x4f0192,_0x5aa600){return db[_0x903e('0x22')]['create'](_0x4f0192[_0x903e('0x36')],{})[_0x903e('0x1a')](respondWithResult(_0x5aa600,0xc9))[_0x903e('0x2b')](handleError(_0x5aa600,null));};exports[_0x903e('0x19')]=function(_0x5ebf3c,_0x255c97){if(_0x5ebf3c[_0x903e('0x36')]['id']){delete _0x5ebf3c['body']['id'];}return db[_0x903e('0x22')][_0x903e('0x37')]({'where':{'id':_0x5ebf3c[_0x903e('0x2c')]['id']}})[_0x903e('0x1a')](handleEntityNotFound(_0x255c97,null))[_0x903e('0x1a')](saveUpdates(_0x5ebf3c['body'],null))[_0x903e('0x1a')](respondWithResult(_0x255c97,null))[_0x903e('0x2b')](handleError(_0x255c97,null));};exports[_0x903e('0x1b')]=function(_0xd1924a,_0x1d78ac){return db[_0x903e('0x22')][_0x903e('0x37')]({'where':{'id':_0xd1924a[_0x903e('0x2c')]['id']}})[_0x903e('0x1a')](handleEntityNotFound(_0x1d78ac,null))[_0x903e('0x1a')](removeEntity(_0x1d78ac,null))[_0x903e('0x2b')](handleError(_0x1d78ac,null));};exports[_0x903e('0x38')]=function(_0x4c2d27,_0x5202f3){return db[_0x903e('0x22')][_0x903e('0x38')]()[_0x903e('0x1a')](respondWithResult(_0x5202f3,null))['catch'](handleError(_0x5202f3,null));};exports['addMessage']=function(_0x2c5a11,_0x3256ef){return db[_0x903e('0x39')][_0x903e('0x37')]({'where':{'id':_0x2c5a11[_0x903e('0x2c')]['id']}})['then'](handleEntityNotFound(_0x3256ef,null))[_0x903e('0x1a')](function(_0x459907){if(_0x459907){return _0x459907[_0x903e('0x3a')](_0x2c5a11[_0x903e('0x36')][_0x903e('0x3b')],_['omit'](_0x2c5a11[_0x903e('0x36')],[_0x903e('0x3b'),'id'])||{});}})[_0x903e('0x1a')](respondWithResult(_0x3256ef,null))[_0x903e('0x2b')](handleError(_0x3256ef,null));};exports[_0x903e('0x3c')]=function(_0x20db3f,_0x4e3adf){var _0x4e9ba9={'raw':![],'where':{}};var _0xed66e6={};var _0x565835={'count':0x0,'rows':[]};return db['WhatsappInteraction'][_0x903e('0x3d')]({'where':{'id':_0x20db3f[_0x903e('0x2c')]['id']}})[_0x903e('0x1a')](handleEntityNotFound(_0x4e3adf,null))[_0x903e('0x1a')](function(_0x2d6ee3){if(_0x2d6ee3){_0xed66e6[_0x903e('0x2d')]=_[_0x903e('0x2e')](db[_0x903e('0x39')][_0x903e('0x23')]);_0xed66e6[_0x903e('0x29')]=_[_0x903e('0x2e')](_0x20db3f[_0x903e('0x29')]);_0xed66e6[_0x903e('0x3e')]=_[_0x903e('0x2f')](_0xed66e6['model'],_0xed66e6[_0x903e('0x29')]);_0x4e9ba9[_0x903e('0x30')]=_['intersection'](_0xed66e6['model'],qs['fields'](_0x20db3f[_0x903e('0x29')][_0x903e('0x31')]));_0x4e9ba9[_0x903e('0x30')]=_0x4e9ba9[_0x903e('0x30')]['length']?_0x4e9ba9[_0x903e('0x30')]:_0xed66e6[_0x903e('0x2d')];if(!_0x20db3f[_0x903e('0x29')]['hasOwnProperty'](_0x903e('0x3f'))){_0x4e9ba9['limit']=qs[_0x903e('0x40')](_0x20db3f[_0x903e('0x29')][_0x903e('0x40')]);_0x4e9ba9[_0x903e('0x15')]=qs[_0x903e('0x15')](_0x20db3f['query'][_0x903e('0x15')]);}_0x4e9ba9['order']=qs[_0x903e('0x41')](_0x20db3f['query'][_0x903e('0x41')]);_0x4e9ba9[_0x903e('0x42')]=qs[_0x903e('0x3e')](_['pick'](_0x20db3f['query'],_0xed66e6[_0x903e('0x3e')]));_0x4e9ba9[_0x903e('0x42')][_0x903e('0x43')]=_0x2d6ee3['id'];if(_0x20db3f[_0x903e('0x29')][_0x903e('0x44')]){_0x4e9ba9[_0x903e('0x42')]=_['merge'](_0x4e9ba9[_0x903e('0x42')],{'$or':_[_0x903e('0x45')](_0x4e9ba9[_0x903e('0x30')],function(_0x1c20ed){var _0x5e330c={};_0x5e330c[_0x1c20ed]={'$like':'%'+_0x20db3f[_0x903e('0x29')][_0x903e('0x44')]+'%'};return _0x5e330c;})});}if(_0x20db3f['query'][_0x903e('0x46')]){var _0x48a275=_0x20db3f['query'][_0x903e('0x46')][_0x903e('0x47')](',');var _0x2498f7={};_0x2498f7[_0x48a275[0x0]]={'$gte':moment(_0x48a275[0x1])[_0x903e('0x48')](_0x903e('0x49'))};_0x4e9ba9[_0x903e('0x42')]=_[_0x903e('0x34')](_0x4e9ba9[_0x903e('0x42')],_0x2498f7);}_0x4e9ba9=_[_0x903e('0x34')]({},_0x4e9ba9,_0x20db3f['options']);return db[_0x903e('0x39')][_0x903e('0x16')]({'where':_0x4e9ba9[_0x903e('0x42')]})[_0x903e('0x1a')](function(_0x416d33){_0x565835[_0x903e('0x16')]=_0x416d33;if(_0x20db3f['query'][_0x903e('0x4a')]){_0x4e9ba9[_0x903e('0x33')]=[{'all':!![]}];}return db[_0x903e('0x39')]['findAll'](_0x4e9ba9);})[_0x903e('0x1a')](function(_0x1e2dcb){_0x565835[_0x903e('0x4b')]=_0x1e2dcb;return _0x565835;});}})[_0x903e('0x1a')](respondWithFilteredResult(_0x4e3adf,_0x4e9ba9))[_0x903e('0x2b')](handleError(_0x4e3adf,null));};exports[_0x903e('0x4c')]=function(_0x53dcce,_0x306b51){return db[_0x903e('0x22')][_0x903e('0x37')]({'where':{'id':_0x53dcce[_0x903e('0x2c')]['id']}})[_0x903e('0x1a')](handleEntityNotFound(_0x306b51,null))[_0x903e('0x1a')](function(_0x2fb8b0){if(_0x2fb8b0){return _0x2fb8b0[_0x903e('0x4d')](_0x53dcce['body'][_0x903e('0x3b')],_[_0x903e('0x4e')](_0x53dcce[_0x903e('0x36')],[_0x903e('0x3b'),'id'])||{})[_0x903e('0x4f')](function(){return db[_0x903e('0x50')][_0x903e('0x51')]({'attributes':['id',_0x903e('0x20'),_0x903e('0x52')],'where':{'id':_0x53dcce['body'][_0x903e('0x3b')]}});})[_0x903e('0x1a')](function(_0x5412bf){socket[_0x903e('0x53')](_0x903e('0x54'),{'id':Number(_0x53dcce['params']['id']),'tags':_0x5412bf||[]});return{'id':Number(_0x53dcce[_0x903e('0x2c')]['id']),'tags':_0x5412bf||[]};});}})[_0x903e('0x1a')](respondWithResult(_0x306b51,null))[_0x903e('0x2b')](handleError(_0x306b51,null));};exports[_0x903e('0x55')]=function(_0x57ca03,_0x3d9952){return db[_0x903e('0x22')][_0x903e('0x37')]({'where':{'id':_0x57ca03['params']['id']}})[_0x903e('0x1a')](handleEntityNotFound(_0x3d9952,null))['then'](function(_0x52a9b2){if(_0x52a9b2){return _0x52a9b2[_0x903e('0x55')](_0x57ca03[_0x903e('0x29')]['ids']);}})['then'](respondWithStatusCode(_0x3d9952,null))[_0x903e('0x2b')](handleError(_0x3d9952,null));};exports['download']=function(_0x41969f,_0x4d8d45){var _0x235389=moment()[_0x903e('0x56')]()[_0x903e('0x57')]();var _0x2b4ede=path[_0x903e('0x58')](config[_0x903e('0x59')],_0x903e('0x5a'),_0x903e('0x5b'),_0x903e('0x5c'));var _0x2caf08=path[_0x903e('0x58')](config['root'],_0x903e('0x5a'),_0x903e('0x5b'),_0x903e('0x5d'));var _0x4419bc=path['join'](_0x2b4ede,_0x235389);var _0xe263d2=util[_0x903e('0x48')](_0x903e('0x5e'),_0x41969f[_0x903e('0x2c')]['id'],_0x235389);var _0x32b580=path[_0x903e('0x58')](_0x2b4ede,_0xe263d2);var _0x30260b=[];_0x30260b[_0x903e('0x5f')]({'model':db['User'],'as':_0x903e('0x60'),'attributes':['id',_0x903e('0x61')],'raw':!![]});_0x30260b[_0x903e('0x5f')]({'model':db[_0x903e('0x62')],'as':_0x903e('0x63'),'attributes':['id',_0x903e('0x64'),_0x903e('0x65')],'raw':!![]});if(_0x41969f[_0x903e('0x29')][_0x903e('0x5d')]){_0x30260b[_0x903e('0x5f')]({'model':db[_0x903e('0x66')],'as':_0x903e('0x66'),'raw':!![]});}var _0x14ed40=[{'model':db['WhatsappMessage'],'as':_0x903e('0x67'),'attributes':['id',_0x903e('0x36'),_0x903e('0x68'),'direction',_0x903e('0x69'),'read'],'include':_0x30260b}];_0x14ed40[_0x903e('0x5f')]({'model':db[_0x903e('0x6a')],'as':_0x903e('0x6b'),'attributes':['id',_0x903e('0x20')]});_0x14ed40[_0x903e('0x5f')]({'model':db[_0x903e('0x60')],'as':_0x903e('0x6c'),'attributes':['id',_0x903e('0x61')]});return db[_0x903e('0x22')][_0x903e('0x37')]({'where':{'id':_0x41969f[_0x903e('0x2c')]['id']},'include':_0x14ed40})[_0x903e('0x1a')](handleEntityNotFound(_0x4d8d45,null))[_0x903e('0x1a')](function(_0x682b05){if(_0x682b05){var _0x128c3f=_0x682b05[_0x903e('0x6d')]({'plain':!![]});fs[_0x903e('0x6e')](_0x4419bc);var _0x27170f={'channel':_0x903e('0x6f'),'account':_0x128c3f[_0x903e('0x6b')][_0x903e('0x20')],'agent':_0x128c3f['Owner']?_0x128c3f[_0x903e('0x6c')][_0x903e('0x61')]:_0x903e('0x70'),'createdAt':moment(_0x128c3f['createdAt'])[_0x903e('0x48')](_0x903e('0x49'))[_0x903e('0x57')](),'closedAt':_0x128c3f[_0x903e('0x71')]?moment(_0x128c3f[_0x903e('0x72')])['format'](_0x903e('0x49'))[_0x903e('0x57')]():'','disposition':_0x128c3f[_0x903e('0x73')],'messages':_(_0x128c3f[_0x903e('0x67')])[_0x903e('0x44')]({'secret':![]})[_0x903e('0x45')](function(_0xa3bd69){if(_0xa3bd69['Attachment']){var _0x816619=path['join'](_0x2caf08,_0xa3bd69['Attachment']['basename']);if(fs[_0x903e('0x74')](_0x816619)){fs[_0x903e('0x75')](_0x816619)['pipe'](fs['createWriteStream'](path['join'](_0x4419bc,_0xa3bd69[_0x903e('0x66')][_0x903e('0x76')])));}}return{'date':moment(_0xa3bd69[_0x903e('0x68')])[_0x903e('0x48')](_0x903e('0x49'))[_0x903e('0x57')](),'sender':_0xa3bd69[_0x903e('0x77')]===_0x903e('0x78')?_0xa3bd69[_0x903e('0x60')]?_0xa3bd69['User'][_0x903e('0x61')]:_0x903e('0x79'):_0xa3bd69[_0x903e('0x63')][_0x903e('0x64')]+(_0xa3bd69['Contact']['lastName']?'\x20'+_0xa3bd69['Contact']['lastName']:''),'body':_0xa3bd69[_0x903e('0x66')]?_0xa3bd69[_0x903e('0x66')][_0x903e('0x76')]:_0xa3bd69[_0x903e('0x36')],'direction':_0xa3bd69['direction']==='out'?'A':'C','secret':_0xa3bd69[_0x903e('0x69')],'read':_0xa3bd69[_0x903e('0x7a')],'attachment':_0xa3bd69['Attachment']};})[_0x903e('0x7b')]()};return ejs[_0x903e('0x7c')](path['join'](config['root'],_0x903e('0x5a'),_0x903e('0x7d'),_0x903e('0x7e')),{'interaction':_0x27170f})[_0x903e('0x1a')](function(_0x26709b){var _0x3ba7e5=path[_0x903e('0x58')](_0x4419bc,_0x903e('0x7f')+_0x128c3f['id']+'-'+_0x235389+_0x903e('0x80'));var _0x1d6550={'path':_0x3ba7e5,'channel':_0x903e('0x6f'),'interactionId':_0x128c3f['id']};return pdf[_0x903e('0x81')](_0x26709b,_0x1d6550);})['then'](function(){return new BPromise(function(_0x1c1586,_0x5da611){zipdir(_0x4419bc,{'saveTo':_0x32b580},function(_0x2d78ab,_0xc079a4){if(_0x2d78ab)return _0x5da611(_0x2d78ab);return _0x1c1586(_0xc079a4);});})[_0x903e('0x1a')](function(){return new BPromise(function(_0x1f2741,_0x137a6e){rimraf(_0x4419bc,function(_0x2e9da1){if(_0x2e9da1)_0x137a6e(_0x2e9da1);return _0x1f2741();});});})[_0x903e('0x1a')](function(){return _0x4d8d45['download'](_0x32b580,_0xe263d2,function(_0x23875c){if(_0x23875c){console['log'](_0x903e('0x82'),_0x23875c);}else{fs[_0x903e('0x83')](_0x32b580);}});});});}else{return _0x4d8d45[_0x903e('0x1d')](0xc8);}})[_0x903e('0x2b')](handleError(_0x4d8d45,null));};
\ No newline at end of file
+var _0x0dfc=['server','files','join','transcript-%d-%s.zip','push','User','fullname','CmContact','Contact','firstName','lastName','attachments','Attachment','Messages','createdAt','direction','secret','read','WhatsappAccount','Account','Owner','get','mkdirSync','Whatsapp','N.A.','disposition','basename','existsSync','pipe','createWriteStream','out','value','renderFile','views','downloadInteraction.ejs','transcript-','.pdf','log','err','unlinkSync','zip-dir','moment','bluebird','util','path','ejs','lodash','ioredis','../../components/interaction/service','../../components/parsers/qs','../../components/export/pdf','../../config/logger','api','../../config/environment','../../mysqldb','redis','localhost','./whatsappInteraction.socket','register','end','status','undefined','limit','count','offset','set','Content-Range','json','then','destroy','sendStatus','error','stack','name','send','index','map','rawAttributes','fieldName','type','getOptions','findAll','whatsapp','query','user','catch','show','params','model','WhatsappInteraction','filters','intersection','attributes','fields','length','includeAll','merge','options','create','body','update','find','describe','WhatsappMessage','ids','omit','getMessages','findOne','keys','hasOwnProperty','nolimit','order','where','filter','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','include','rows','spread','Tag','color','emit','whatsappInteractionTags:save','removeTags','download','unix','toString','root'];(function(_0x47f7ec,_0x369f9d){var _0x415101=function(_0x41317a){while(--_0x41317a){_0x47f7ec['push'](_0x47f7ec['shift']());}};_0x415101(++_0x369f9d);}(_0x0dfc,0xaa));var _0xc0df=function(_0x591cfe,_0x37eb93){_0x591cfe=_0x591cfe-0x0;var _0x440020=_0x0dfc[_0x591cfe];return _0x440020;};'use strict';var rimraf=require('rimraf');var zipdir=require(_0xc0df('0x0'));var moment=require(_0xc0df('0x1'));var BPromise=require(_0xc0df('0x2'));var util=require(_0xc0df('0x3'));var path=require(_0xc0df('0x4'));var ejs=require(_0xc0df('0x5'));var fs=require('fs');var _=require(_0xc0df('0x6'));var Redis=require(_0xc0df('0x7'));var interaction=require(_0xc0df('0x8'));var qs=require(_0xc0df('0x9'));var pdf=require(_0xc0df('0xa'));var logger=require(_0xc0df('0xb'))(_0xc0df('0xc'));var config=require(_0xc0df('0xd'));var db=require(_0xc0df('0xe'))['db'];config[_0xc0df('0xf')]=_['defaults'](config[_0xc0df('0xf')],{'host':_0xc0df('0x10'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xc0df('0xf')]));require(_0xc0df('0x11'))[_0xc0df('0x12')](socket);function respondWithStatusCode(_0x29ca8a,_0x5a7b4b){_0x5a7b4b=_0x5a7b4b||0xcc;return function(_0x30c1e1){if(_0x30c1e1){return _0x29ca8a['sendStatus'](_0x5a7b4b);}return _0x29ca8a['status'](_0x5a7b4b)[_0xc0df('0x13')]();};}function respondWithResult(_0x3b90bd,_0x580ae6){_0x580ae6=_0x580ae6||0xc8;return function(_0x47cf7d){if(_0x47cf7d){return _0x3b90bd[_0xc0df('0x14')](_0x580ae6)['json'](_0x47cf7d);}};}function respondWithFilteredResult(_0x119ef4,_0x5bad7d){return function(_0xefd4f6){if(_0xefd4f6){var _0x201307=typeof _0x5bad7d['offset']===_0xc0df('0x15')&&typeof _0x5bad7d[_0xc0df('0x16')]===_0xc0df('0x15');var _0x2d86d0=_0xefd4f6[_0xc0df('0x17')];var _0x33848d=_0x201307?0x0:_0x5bad7d[_0xc0df('0x18')];var _0x38d221=_0x201307?_0xefd4f6[_0xc0df('0x17')]:_0x5bad7d[_0xc0df('0x18')]+_0x5bad7d[_0xc0df('0x16')];var _0x175696;if(_0x38d221>=_0x2d86d0){_0x38d221=_0x2d86d0;_0x175696=0xc8;}else{_0x175696=0xce;}_0x119ef4['status'](_0x175696);return _0x119ef4[_0xc0df('0x19')](_0xc0df('0x1a'),_0x33848d+'-'+_0x38d221+'/'+_0x2d86d0)[_0xc0df('0x1b')](_0xefd4f6);}return null;};}function saveUpdates(_0x4470ad){return function(_0x4f04a2){if(_0x4f04a2){return _0x4f04a2['update'](_0x4470ad)[_0xc0df('0x1c')](function(_0x194219){return _0x194219;});}return null;};}function removeEntity(_0x2d786e){return function(_0x41a5e5){if(_0x41a5e5){return _0x41a5e5[_0xc0df('0x1d')]()[_0xc0df('0x1c')](function(){_0x2d786e[_0xc0df('0x14')](0xcc)[_0xc0df('0x13')]();});}};}function handleEntityNotFound(_0x51f55c){return function(_0x5df8c3){if(!_0x5df8c3){_0x51f55c[_0xc0df('0x1e')](0x194);}return _0x5df8c3;};}function handleError(_0x2893dc,_0x1118c3){_0x1118c3=_0x1118c3||0x1f4;return function(_0x34e963){logger[_0xc0df('0x1f')](_0x34e963[_0xc0df('0x20')]);if(_0x34e963[_0xc0df('0x21')]){delete _0x34e963[_0xc0df('0x21')];}_0x2893dc[_0xc0df('0x14')](_0x1118c3)[_0xc0df('0x22')](_0x34e963);};}exports[_0xc0df('0x23')]=function(_0x163384,_0x3815a3){var _0x47cbe3={};var _0x4f32cb=_[_0xc0df('0x24')](db['WhatsappInteraction'][_0xc0df('0x25')],function(_0x36dd20){return{'name':_0x36dd20[_0xc0df('0x26')],'type':_0x36dd20[_0xc0df('0x27')]['key']};});_0x47cbe3=qs[_0xc0df('0x28')](_0x4f32cb,_0x163384);return interaction[_0xc0df('0x29')](_0xc0df('0x2a'),_0x163384[_0xc0df('0x2b')],_0x163384[_0xc0df('0x2c')],_0x47cbe3,_0x4f32cb)[_0xc0df('0x1c')](respondWithFilteredResult(_0x3815a3,_0x47cbe3))[_0xc0df('0x2d')](handleError(_0x3815a3,null));};exports[_0xc0df('0x2e')]=function(_0x38e8b1,_0x475d9c){var _0x2f1cba={'raw':![],'where':{'id':_0x38e8b1[_0xc0df('0x2f')]['id']}},_0x1cafa9={};_0x1cafa9[_0xc0df('0x30')]=_['keys'](db[_0xc0df('0x31')][_0xc0df('0x25')]);_0x1cafa9[_0xc0df('0x2b')]=_['keys'](_0x38e8b1['query']);_0x1cafa9[_0xc0df('0x32')]=_[_0xc0df('0x33')](_0x1cafa9['model'],_0x1cafa9[_0xc0df('0x2b')]);_0x2f1cba[_0xc0df('0x34')]=_[_0xc0df('0x33')](_0x1cafa9[_0xc0df('0x30')],qs[_0xc0df('0x35')](_0x38e8b1[_0xc0df('0x2b')][_0xc0df('0x35')]));_0x2f1cba[_0xc0df('0x34')]=_0x2f1cba['attributes'][_0xc0df('0x36')]?_0x2f1cba[_0xc0df('0x34')]:_0x1cafa9[_0xc0df('0x30')];if(_0x38e8b1[_0xc0df('0x2b')][_0xc0df('0x37')]){_0x2f1cba['include']=[{'all':!![]}];}_0x2f1cba=_[_0xc0df('0x38')]({},_0x2f1cba,_0x38e8b1[_0xc0df('0x39')]);return db[_0xc0df('0x31')]['find'](_0x2f1cba)[_0xc0df('0x1c')](handleEntityNotFound(_0x475d9c,null))['then'](respondWithResult(_0x475d9c,null))[_0xc0df('0x2d')](handleError(_0x475d9c,null));};exports[_0xc0df('0x3a')]=function(_0x4f8bb9,_0x106355){return db[_0xc0df('0x31')]['create'](_0x4f8bb9[_0xc0df('0x3b')],{})[_0xc0df('0x1c')](respondWithResult(_0x106355,0xc9))[_0xc0df('0x2d')](handleError(_0x106355,null));};exports[_0xc0df('0x3c')]=function(_0x2448d5,_0xeed6fd){if(_0x2448d5[_0xc0df('0x3b')]['id']){delete _0x2448d5[_0xc0df('0x3b')]['id'];}return db[_0xc0df('0x31')][_0xc0df('0x3d')]({'where':{'id':_0x2448d5[_0xc0df('0x2f')]['id']}})[_0xc0df('0x1c')](handleEntityNotFound(_0xeed6fd,null))[_0xc0df('0x1c')](saveUpdates(_0x2448d5[_0xc0df('0x3b')],null))[_0xc0df('0x1c')](respondWithResult(_0xeed6fd,null))[_0xc0df('0x2d')](handleError(_0xeed6fd,null));};exports[_0xc0df('0x1d')]=function(_0x5d492e,_0x21a508){return db[_0xc0df('0x31')][_0xc0df('0x3d')]({'where':{'id':_0x5d492e[_0xc0df('0x2f')]['id']}})[_0xc0df('0x1c')](handleEntityNotFound(_0x21a508,null))[_0xc0df('0x1c')](removeEntity(_0x21a508,null))[_0xc0df('0x2d')](handleError(_0x21a508,null));};exports[_0xc0df('0x3e')]=function(_0x382865,_0x409859){return db['WhatsappInteraction'][_0xc0df('0x3e')]()[_0xc0df('0x1c')](respondWithResult(_0x409859,null))['catch'](handleError(_0x409859,null));};exports['addMessage']=function(_0x3e6642,_0x3a7f36){return db[_0xc0df('0x3f')][_0xc0df('0x3d')]({'where':{'id':_0x3e6642['params']['id']}})['then'](handleEntityNotFound(_0x3a7f36,null))[_0xc0df('0x1c')](function(_0x488870){if(_0x488870){return _0x488870['addMessage'](_0x3e6642['body'][_0xc0df('0x40')],_[_0xc0df('0x41')](_0x3e6642[_0xc0df('0x3b')],[_0xc0df('0x40'),'id'])||{});}})[_0xc0df('0x1c')](respondWithResult(_0x3a7f36,null))[_0xc0df('0x2d')](handleError(_0x3a7f36,null));};exports[_0xc0df('0x42')]=function(_0x1814b5,_0x15bbbf){var _0x4bd1fd={'raw':![],'where':{}};var _0x6c4f90={};var _0x1ced44={'count':0x0,'rows':[]};return db[_0xc0df('0x31')][_0xc0df('0x43')]({'where':{'id':_0x1814b5[_0xc0df('0x2f')]['id']}})[_0xc0df('0x1c')](handleEntityNotFound(_0x15bbbf,null))[_0xc0df('0x1c')](function(_0x2a7aa0){if(_0x2a7aa0){_0x6c4f90['model']=_[_0xc0df('0x44')](db[_0xc0df('0x3f')][_0xc0df('0x25')]);_0x6c4f90[_0xc0df('0x2b')]=_[_0xc0df('0x44')](_0x1814b5[_0xc0df('0x2b')]);_0x6c4f90['filters']=_[_0xc0df('0x33')](_0x6c4f90[_0xc0df('0x30')],_0x6c4f90[_0xc0df('0x2b')]);_0x4bd1fd[_0xc0df('0x34')]=_[_0xc0df('0x33')](_0x6c4f90[_0xc0df('0x30')],qs[_0xc0df('0x35')](_0x1814b5[_0xc0df('0x2b')]['fields']));_0x4bd1fd['attributes']=_0x4bd1fd[_0xc0df('0x34')][_0xc0df('0x36')]?_0x4bd1fd[_0xc0df('0x34')]:_0x6c4f90['model'];if(!_0x1814b5[_0xc0df('0x2b')][_0xc0df('0x45')](_0xc0df('0x46'))){_0x4bd1fd[_0xc0df('0x16')]=qs[_0xc0df('0x16')](_0x1814b5[_0xc0df('0x2b')]['limit']);_0x4bd1fd['offset']=qs[_0xc0df('0x18')](_0x1814b5[_0xc0df('0x2b')]['offset']);}_0x4bd1fd[_0xc0df('0x47')]=qs['sort'](_0x1814b5[_0xc0df('0x2b')]['sort']);_0x4bd1fd[_0xc0df('0x48')]=qs[_0xc0df('0x32')](_['pick'](_0x1814b5['query'],_0x6c4f90[_0xc0df('0x32')]));_0x4bd1fd[_0xc0df('0x48')]['WhatsappInteractionId']=_0x2a7aa0['id'];if(_0x1814b5[_0xc0df('0x2b')][_0xc0df('0x49')]){_0x4bd1fd['where']=_[_0xc0df('0x38')](_0x4bd1fd[_0xc0df('0x48')],{'$or':_[_0xc0df('0x24')](_0x4bd1fd[_0xc0df('0x34')],function(_0x4069d0){var _0x5d0344={};_0x5d0344[_0x4069d0]={'$like':'%'+_0x1814b5[_0xc0df('0x2b')][_0xc0df('0x49')]+'%'};return _0x5d0344;})});}if(_0x1814b5[_0xc0df('0x2b')][_0xc0df('0x4a')]){var _0x2341fc=_0x1814b5[_0xc0df('0x2b')][_0xc0df('0x4a')][_0xc0df('0x4b')](',');var _0x122bfd={};_0x122bfd[_0x2341fc[0x0]]={'$gte':moment(_0x2341fc[0x1])[_0xc0df('0x4c')](_0xc0df('0x4d'))};_0x4bd1fd[_0xc0df('0x48')]=_[_0xc0df('0x38')](_0x4bd1fd[_0xc0df('0x48')],_0x122bfd);}_0x4bd1fd=_[_0xc0df('0x38')]({},_0x4bd1fd,_0x1814b5[_0xc0df('0x39')]);return db[_0xc0df('0x3f')][_0xc0df('0x17')]({'where':_0x4bd1fd['where']})['then'](function(_0x2e265b){_0x1ced44[_0xc0df('0x17')]=_0x2e265b;if(_0x1814b5[_0xc0df('0x2b')][_0xc0df('0x37')]){_0x4bd1fd[_0xc0df('0x4e')]=[{'all':!![]}];}return db['WhatsappMessage'][_0xc0df('0x29')](_0x4bd1fd);})['then'](function(_0x2bf8b3){_0x1ced44[_0xc0df('0x4f')]=_0x2bf8b3;return _0x1ced44;});}})[_0xc0df('0x1c')](respondWithFilteredResult(_0x15bbbf,_0x4bd1fd))['catch'](handleError(_0x15bbbf,null));};exports['addTags']=function(_0x42c20e,_0x3b4f8d){return db[_0xc0df('0x31')][_0xc0df('0x3d')]({'where':{'id':_0x42c20e[_0xc0df('0x2f')]['id']}})[_0xc0df('0x1c')](handleEntityNotFound(_0x3b4f8d,null))[_0xc0df('0x1c')](function(_0x11c3be){if(_0x11c3be){return _0x11c3be['setTags'](_0x42c20e[_0xc0df('0x3b')][_0xc0df('0x40')],_[_0xc0df('0x41')](_0x42c20e[_0xc0df('0x3b')],[_0xc0df('0x40'),'id'])||{})[_0xc0df('0x50')](function(){return db[_0xc0df('0x51')]['findAll']({'attributes':['id',_0xc0df('0x21'),_0xc0df('0x52')],'where':{'id':_0x42c20e['body']['ids']}});})['then'](function(_0x5c4a9d){socket[_0xc0df('0x53')](_0xc0df('0x54'),{'id':Number(_0x42c20e[_0xc0df('0x2f')]['id']),'tags':_0x5c4a9d||[]});return{'id':Number(_0x42c20e[_0xc0df('0x2f')]['id']),'tags':_0x5c4a9d||[]};});}})[_0xc0df('0x1c')](respondWithResult(_0x3b4f8d,null))[_0xc0df('0x2d')](handleError(_0x3b4f8d,null));};exports['removeTags']=function(_0x83e0a2,_0x50fd4f){return db[_0xc0df('0x31')][_0xc0df('0x3d')]({'where':{'id':_0x83e0a2[_0xc0df('0x2f')]['id']}})['then'](handleEntityNotFound(_0x50fd4f,null))['then'](function(_0x585569){if(_0x585569){return _0x585569[_0xc0df('0x55')](_0x83e0a2[_0xc0df('0x2b')]['ids']);}})['then'](respondWithStatusCode(_0x50fd4f,null))[_0xc0df('0x2d')](handleError(_0x50fd4f,null));};exports[_0xc0df('0x56')]=function(_0x5ae52c,_0xa47de6){var _0x3c88a7=moment()[_0xc0df('0x57')]()[_0xc0df('0x58')]();var _0x32ba22=path['join'](config[_0xc0df('0x59')],_0xc0df('0x5a'),_0xc0df('0x5b'),'tmp');var _0x23ae51=path[_0xc0df('0x5c')](config[_0xc0df('0x59')],'server','files','attachments');var _0x11b573=path[_0xc0df('0x5c')](_0x32ba22,_0x3c88a7);var _0x497ae1=util[_0xc0df('0x4c')](_0xc0df('0x5d'),_0x5ae52c[_0xc0df('0x2f')]['id'],_0x3c88a7);var _0x577798=path[_0xc0df('0x5c')](_0x32ba22,_0x497ae1);var _0x5bd5f5=[];_0x5bd5f5[_0xc0df('0x5e')]({'model':db[_0xc0df('0x5f')],'as':_0xc0df('0x5f'),'attributes':['id',_0xc0df('0x60')],'raw':!![]});_0x5bd5f5['push']({'model':db[_0xc0df('0x61')],'as':_0xc0df('0x62'),'attributes':['id',_0xc0df('0x63'),_0xc0df('0x64')],'raw':!![]});if(_0x5ae52c[_0xc0df('0x2b')][_0xc0df('0x65')]){_0x5bd5f5['push']({'model':db[_0xc0df('0x66')],'as':'Attachment','raw':!![]});}var _0x4098b6=[{'model':db[_0xc0df('0x3f')],'as':_0xc0df('0x67'),'attributes':['id',_0xc0df('0x3b'),_0xc0df('0x68'),_0xc0df('0x69'),_0xc0df('0x6a'),_0xc0df('0x6b')],'include':_0x5bd5f5}];_0x4098b6[_0xc0df('0x5e')]({'model':db[_0xc0df('0x6c')],'as':_0xc0df('0x6d'),'attributes':['id',_0xc0df('0x21')]});_0x4098b6[_0xc0df('0x5e')]({'model':db['User'],'as':_0xc0df('0x6e'),'attributes':['id',_0xc0df('0x60')]});return db[_0xc0df('0x31')][_0xc0df('0x3d')]({'where':{'id':_0x5ae52c[_0xc0df('0x2f')]['id']},'include':_0x4098b6})['then'](handleEntityNotFound(_0xa47de6,null))[_0xc0df('0x1c')](function(_0xec11b1){if(_0xec11b1){var _0x24c62e=_0xec11b1[_0xc0df('0x6f')]({'plain':!![]});fs[_0xc0df('0x70')](_0x11b573);var _0x2905c7={'channel':_0xc0df('0x71'),'account':_0x24c62e['Account'][_0xc0df('0x21')],'agent':_0x24c62e[_0xc0df('0x6e')]?_0x24c62e[_0xc0df('0x6e')][_0xc0df('0x60')]:_0xc0df('0x72'),'createdAt':moment(_0x24c62e[_0xc0df('0x68')])['format']('YYYY-MM-DD\x20HH:mm:ss')['toString'](),'closedAt':_0x24c62e['closed']?moment(_0x24c62e['closedAt'])['format'](_0xc0df('0x4d'))[_0xc0df('0x58')]():'','disposition':_0x24c62e[_0xc0df('0x73')],'messages':_(_0x24c62e['Messages'])[_0xc0df('0x49')]({'secret':![]})[_0xc0df('0x24')](function(_0x5b4fa8){if(_0x5b4fa8[_0xc0df('0x66')]){var _0xa887a3=path[_0xc0df('0x5c')](_0x23ae51,_0x5b4fa8[_0xc0df('0x66')][_0xc0df('0x74')]);if(fs[_0xc0df('0x75')](_0xa887a3)){fs['createReadStream'](_0xa887a3)[_0xc0df('0x76')](fs[_0xc0df('0x77')](path[_0xc0df('0x5c')](_0x11b573,_0x5b4fa8[_0xc0df('0x66')]['basename'])));}}return{'date':moment(_0x5b4fa8[_0xc0df('0x68')])[_0xc0df('0x4c')](_0xc0df('0x4d'))[_0xc0df('0x58')](),'sender':_0x5b4fa8['direction']===_0xc0df('0x78')?_0x5b4fa8['User']?_0x5b4fa8[_0xc0df('0x5f')][_0xc0df('0x60')]:'System':_0x5b4fa8['Contact']['firstName']+(_0x5b4fa8['Contact'][_0xc0df('0x64')]?'\x20'+_0x5b4fa8['Contact'][_0xc0df('0x64')]:''),'body':_0x5b4fa8['Attachment']?_0x5b4fa8[_0xc0df('0x66')][_0xc0df('0x74')]:_0x5b4fa8[_0xc0df('0x3b')],'direction':_0x5b4fa8[_0xc0df('0x69')]===_0xc0df('0x78')?'A':'C','secret':_0x5b4fa8[_0xc0df('0x6a')],'read':_0x5b4fa8[_0xc0df('0x6b')],'attachment':_0x5b4fa8['Attachment']};})[_0xc0df('0x79')]()};return ejs[_0xc0df('0x7a')](path[_0xc0df('0x5c')](config[_0xc0df('0x59')],_0xc0df('0x5a'),_0xc0df('0x7b'),_0xc0df('0x7c')),{'interaction':_0x2905c7})['then'](function(_0x1e506a){var _0x3c9270=path[_0xc0df('0x5c')](_0x11b573,_0xc0df('0x7d')+_0x24c62e['id']+'-'+_0x3c88a7+_0xc0df('0x7e'));var _0x2e822a={'path':_0x3c9270,'channel':_0xc0df('0x71'),'interactionId':_0x24c62e['id']};return pdf['createPdfFromHTML'](_0x1e506a,_0x2e822a);})[_0xc0df('0x1c')](function(){return new BPromise(function(_0x35c9ec,_0x2e92fa){zipdir(_0x11b573,{'saveTo':_0x577798},function(_0x5ee316,_0x515879){if(_0x5ee316)return _0x2e92fa(_0x5ee316);return _0x35c9ec(_0x515879);});})['then'](function(){return new BPromise(function(_0x33cbff,_0x1778a5){rimraf(_0x11b573,function(_0xb9179d){if(_0xb9179d)_0x1778a5(_0xb9179d);return _0x33cbff();});});})['then'](function(){return _0xa47de6[_0xc0df('0x56')](_0x577798,_0x497ae1,function(_0x234d5f){if(_0x234d5f){console[_0xc0df('0x7f')](_0xc0df('0x80'),_0x234d5f);}else{fs[_0xc0df('0x81')](_0x577798);}});});});}else{return _0xa47de6['sendStatus'](0xc8);}})[_0xc0df('0x2d')](handleError(_0xa47de6,null));};
\ No newline at end of file
index eb9c068..042262c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8696=['map','findAll','then','unreadMessages','length','emit','hook','exports','events','../../mysqldb','setMaxListeners','save','update','setDataValue','Users'];(function(_0x15b450,_0x17f299){var _0x1a9c28=function(_0x1666f6){while(--_0x1666f6){_0x15b450['push'](_0x15b450['shift']());}};_0x1a9c28(++_0x17f299);}(_0x8696,0x143));var _0x6869=function(_0x342348,_0x49eb0a){_0x342348=_0x342348-0x0;var _0x52e34d=_0x8696[_0x342348];return _0x52e34d;};'use strict';var EventEmitter=require(_0x6869('0x0'));var WhatsappInteraction=require(_0x6869('0x1'))['db']['WhatsappInteraction'];var WhatsappMessage=require(_0x6869('0x1'))['db']['WhatsappMessage'];var WhatsappInteractionEvents=new EventEmitter();WhatsappInteractionEvents[_0x6869('0x2')](0x0);var events={'afterCreate':_0x6869('0x3'),'afterUpdate':_0x6869('0x4'),'afterDestroy':'remove'};function emitEvent(_0x46c26d){return function(_0x578644,_0x3d847c,_0x45542c){_0x578644['getUsers']({'attributes':['id'],'raw':!![]})['then'](function(_0xa00fe5){_0x578644[_0x6869('0x5')](_0x6869('0x6'),_0xa00fe5[_0x6869('0x7')](function(_0x773daa){return{'id':_0x773daa['id']};}));return WhatsappMessage[_0x6869('0x8')]({'where':{'WhatsappInteractionId':_0x578644['id'],'direction':'in','read':![]},'raw':!![]});})[_0x6869('0x9')](function(_0x594cb1){_0x578644[_0x6869('0x5')](_0x6869('0xa'),_0x594cb1[_0x6869('0xb')]);WhatsappInteractionEvents[_0x6869('0xc')](_0x46c26d+':'+_0x578644['id'],_0x578644);WhatsappInteractionEvents['emit'](_0x46c26d,_0x578644);_0x45542c(null);})['catch'](_0x45542c(null));};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];WhatsappInteraction[_0x6869('0xd')](e,emitEvent(event));}}module[_0x6869('0xe')]=WhatsappInteractionEvents;
\ No newline at end of file
+var _0xb43b=['Users','map','then','unreadMessages','length','emit','catch','hasOwnProperty','exports','events','../../mysqldb','WhatsappMessage','setMaxListeners','update','remove','getUsers','setDataValue'];(function(_0x3f0a71,_0x47ece4){var _0x308419=function(_0x434828){while(--_0x434828){_0x3f0a71['push'](_0x3f0a71['shift']());}};_0x308419(++_0x47ece4);}(_0xb43b,0x1b2));var _0xbb43=function(_0x3b7c44,_0x1a614c){_0x3b7c44=_0x3b7c44-0x0;var _0x5f4d8b=_0xb43b[_0x3b7c44];return _0x5f4d8b;};'use strict';var EventEmitter=require(_0xbb43('0x0'));var WhatsappInteraction=require(_0xbb43('0x1'))['db']['WhatsappInteraction'];var WhatsappMessage=require(_0xbb43('0x1'))['db'][_0xbb43('0x2')];var WhatsappInteractionEvents=new EventEmitter();WhatsappInteractionEvents[_0xbb43('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xbb43('0x4'),'afterDestroy':_0xbb43('0x5')};function emitEvent(_0x351254){return function(_0x16432a,_0x5dfb22,_0x491fb9){_0x16432a[_0xbb43('0x6')]({'attributes':['id'],'raw':!![]})['then'](function(_0x80fe61){_0x16432a[_0xbb43('0x7')](_0xbb43('0x8'),_0x80fe61[_0xbb43('0x9')](function(_0x364718){return{'id':_0x364718['id']};}));return WhatsappMessage['findAll']({'where':{'WhatsappInteractionId':_0x16432a['id'],'direction':'in','read':![]},'raw':!![]});})[_0xbb43('0xa')](function(_0xf54ac5){_0x16432a['setDataValue'](_0xbb43('0xb'),_0xf54ac5[_0xbb43('0xc')]);WhatsappInteractionEvents[_0xbb43('0xd')](_0x351254+':'+_0x16432a['id'],_0x16432a);WhatsappInteractionEvents[_0xbb43('0xd')](_0x351254,_0x16432a);_0x491fb9(null);})[_0xbb43('0xe')](_0x491fb9(null));};}for(var e in events){if(events[_0xbb43('0xf')](e)){var event=events[e];WhatsappInteraction['hook'](e,emitEvent(event));}}module[_0xbb43('0x10')]=WhatsappInteractionEvents;
\ No newline at end of file
index c824079..dd8fc57 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6dad=['moment','bluebird','request-promise','path','../../config/environment','./whatsappInteraction.attributes','exports','define','WhatsappInteraction','whatsapp_interactions','changed','closed','format','YYYY-MM-DD\x20HH:mm:ss','lodash'];(function(_0x138088,_0x24976c){var _0x53270c=function(_0x3ebcf2){while(--_0x3ebcf2){_0x138088['push'](_0x138088['shift']());}};_0x53270c(++_0x24976c);}(_0x6dad,0x77));var _0xd6da=function(_0x36c90a,_0x21c9af){_0x36c90a=_0x36c90a-0x0;var _0x401077=_0x6dad[_0x36c90a];return _0x401077;};'use strict';var _=require(_0xd6da('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0xd6da('0x1'));var BPromise=require(_0xd6da('0x2'));var rp=require(_0xd6da('0x3'));var fs=require('fs');var path=require(_0xd6da('0x4'));var rimraf=require('rimraf');var config=require(_0xd6da('0x5'));var attributes=require(_0xd6da('0x6'));module[_0xd6da('0x7')]=function(_0x2052ee,_0x3ba6d7){return _0x2052ee[_0xd6da('0x8')](_0xd6da('0x9'),attributes,{'tableName':_0xd6da('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x121797,_0x144390,_0x39eda7){if(_0x121797[_0xd6da('0xb')](_0xd6da('0xc'))){_0x121797['closedAt']=moment()[_0xd6da('0xd')](_0xd6da('0xe'));}_0x39eda7(null,_0x121797);}}});};
\ No newline at end of file
+var _0x16d4=['changed','closedAt','format','lodash','util','../../config/logger','api','moment','request-promise','../../config/environment','./whatsappInteraction.attributes','exports','define','WhatsappInteraction','whatsapp_interactions'];(function(_0x4f840d,_0x5d6218){var _0x315f81=function(_0x1a6e6a){while(--_0x1a6e6a){_0x4f840d['push'](_0x4f840d['shift']());}};_0x315f81(++_0x5d6218);}(_0x16d4,0x189));var _0x416d=function(_0x55da8b,_0x138713){_0x55da8b=_0x55da8b-0x0;var _0x4d12e3=_0x16d4[_0x55da8b];return _0x4d12e3;};'use strict';var _=require(_0x416d('0x0'));var util=require(_0x416d('0x1'));var logger=require(_0x416d('0x2'))(_0x416d('0x3'));var moment=require(_0x416d('0x4'));var BPromise=require('bluebird');var rp=require(_0x416d('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x416d('0x6'));var attributes=require(_0x416d('0x7'));module[_0x416d('0x8')]=function(_0x10dd13,_0xe3a307){return _0x10dd13[_0x416d('0x9')](_0x416d('0xa'),attributes,{'tableName':_0x416d('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x32235a,_0x3f9673,_0x1e9074){if(_0x32235a[_0x416d('0xc')]('closed')){_0x32235a[_0x416d('0xd')]=moment()[_0x416d('0xe')]('YYYY-MM-DD\x20HH:mm:ss');}_0x1e9074(null,_0x32235a);}}});};
\ No newline at end of file
index 8d2f8dc..08ccf20 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe577=['UpdateWhatsappInteraction','stringify','AddTagsToWhatsappInteraction','find','where','addTags','ids','AddTags','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./whatsappInteraction.socket','info','WhatsappInteraction,\x20%s,\x20%s','request\x20sent','debug','WhatsappInteraction,\x20%s,\x20%s,\x20%s','error','code','message','catch','WhatsappInteraction','body','options','attributes','limit','then'];(function(_0x1ac595,_0x5d2081){var _0x455fff=function(_0x3043ee){while(--_0x3043ee){_0x1ac595['push'](_0x1ac595['shift']());}};_0x455fff(++_0x5d2081);}(_0xe577,0x167));var _0x7e57=function(_0x1e7b16,_0x4607a1){_0x1e7b16=_0x1e7b16-0x0;var _0x37fadc=_0xe577[_0x1e7b16];return _0x37fadc;};'use strict';var _=require(_0x7e57('0x0'));var util=require('util');var moment=require(_0x7e57('0x1'));var BPromise=require('bluebird');var rs=require(_0x7e57('0x2'));var fs=require('fs');var Redis=require(_0x7e57('0x3'));var db=require(_0x7e57('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x7e57('0x5'))(_0x7e57('0x6'));var config=require(_0x7e57('0x7'));var jayson=require(_0x7e57('0x8'));var client=jayson[_0x7e57('0x9')][_0x7e57('0xa')]({'port':0x232a});config[_0x7e57('0xb')]=_[_0x7e57('0xc')](config[_0x7e57('0xb')],{'host':_0x7e57('0xd'),'port':0x18eb});var socket=require(_0x7e57('0xe'))(new Redis(config[_0x7e57('0xb')]));require(_0x7e57('0xf'))['register'](socket);function respondWithRpcPromise(_0x5a1216,_0x3f6072,_0x457818){return new BPromise(function(_0xedf11e,_0x12cafd){return client['request'](_0x5a1216,_0x457818)['then'](function(_0x1e70df){logger[_0x7e57('0x10')](_0x7e57('0x11'),_0x3f6072,_0x7e57('0x12'));logger[_0x7e57('0x13')](_0x7e57('0x14'),_0x3f6072,_0x7e57('0x12'),JSON['stringify'](_0x1e70df));if(_0x1e70df[_0x7e57('0x15')]){if(_0x1e70df[_0x7e57('0x15')][_0x7e57('0x16')]===0x1f4){logger['error'](_0x7e57('0x11'),_0x3f6072,_0x1e70df[_0x7e57('0x15')][_0x7e57('0x17')]);return _0x12cafd(_0x1e70df['error'][_0x7e57('0x17')]);}logger[_0x7e57('0x15')](_0x7e57('0x11'),_0x3f6072,_0x1e70df[_0x7e57('0x15')][_0x7e57('0x17')]);return _0xedf11e(_0x1e70df[_0x7e57('0x15')]['message']);}else{logger[_0x7e57('0x10')](_0x7e57('0x11'),_0x3f6072,_0x7e57('0x12'));_0xedf11e(_0x1e70df['result'][_0x7e57('0x17')]);}})[_0x7e57('0x18')](function(_0x9e7bf8){logger[_0x7e57('0x15')](_0x7e57('0x11'),_0x3f6072,_0x9e7bf8);_0x12cafd(_0x9e7bf8);});});}exports['UpdateWhatsappInteraction']=function(_0x53497b){var _0x2f225c=this;return new Promise(function(_0x35a807,_0x74d0aa){return db[_0x7e57('0x19')]['update'](_0x53497b[_0x7e57('0x1a')],{'raw':_0x53497b[_0x7e57('0x1b')]?_0x53497b[_0x7e57('0x1b')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x53497b['options']?_0x53497b['options']['where']||null:null,'attributes':_0x53497b[_0x7e57('0x1b')]?_0x53497b['options'][_0x7e57('0x1c')]||null:null,'limit':_0x53497b[_0x7e57('0x1b')]?_0x53497b['options'][_0x7e57('0x1d')]||null:null})[_0x7e57('0x1e')](function(_0xbb5633){logger['info']('UpdateWhatsappInteraction',_0x53497b);logger[_0x7e57('0x13')](_0x7e57('0x1f'),_0x53497b,JSON[_0x7e57('0x20')](_0xbb5633));_0x35a807(_0xbb5633);})['catch'](function(_0x2d079c){logger['error'](_0x7e57('0x1f'),_0x2d079c[_0x7e57('0x17')],_0x53497b);_0x74d0aa(_0x2f225c[_0x7e57('0x15')](0x1f4,_0x2d079c[_0x7e57('0x17')]));});});};exports[_0x7e57('0x21')]=function(_0x361aa0){return new Promise(function(_0x28ec05,_0x19ce31){return db['WhatsappInteraction'][_0x7e57('0x22')]({'where':_0x361aa0[_0x7e57('0x1b')]?_0x361aa0[_0x7e57('0x1b')][_0x7e57('0x23')]||null:null})[_0x7e57('0x1e')](function(_0x5e18c8){if(_0x5e18c8){return _0x5e18c8[_0x7e57('0x24')](_0x361aa0['body'][_0x7e57('0x25')],_['omit'](_0x361aa0[_0x7e57('0x1a')],[_0x7e57('0x25'),'id'])||{});}})['spread'](function(_0x2fd052){logger[_0x7e57('0x10')](_0x7e57('0x26'),_0x361aa0);logger[_0x7e57('0x13')](_0x7e57('0x26'),_0x361aa0,JSON[_0x7e57('0x20')](_0x2fd052));_0x28ec05(_0x2fd052);})['catch'](function(_0x1cffa1){logger[_0x7e57('0x15')](_0x7e57('0x26'),_0x1cffa1['message'],_0x361aa0);_0x19ce31(_this[_0x7e57('0x15')](0x1f4,_0x1cffa1[_0x7e57('0x17')]));});});};
\ No newline at end of file
+var _0x2a50=['rpc','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./whatsappInteraction.socket','register','request','then','WhatsappInteraction,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','WhatsappInteraction','update','body','options','raw','where','attributes','limit','UpdateWhatsappInteraction','AddTagsToWhatsappInteraction','find','addTags','omit','ids','spread','info','AddTags','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger'];(function(_0x5a4cd7,_0x465e61){var _0x256212=function(_0x13ef0c){while(--_0x13ef0c){_0x5a4cd7['push'](_0x5a4cd7['shift']());}};_0x256212(++_0x465e61);}(_0x2a50,0x168));var _0x02a5=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x2a50[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x02a5('0x0'));var util=require(_0x02a5('0x1'));var moment=require(_0x02a5('0x2'));var BPromise=require(_0x02a5('0x3'));var rs=require(_0x02a5('0x4'));var fs=require('fs');var Redis=require(_0x02a5('0x5'));var db=require(_0x02a5('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x02a5('0x7'))(_0x02a5('0x8'));var config=require('../../config/environment');var jayson=require(_0x02a5('0x9'));var client=jayson[_0x02a5('0xa')][_0x02a5('0xb')]({'port':0x232a});config[_0x02a5('0xc')]=_[_0x02a5('0xd')](config['redis'],{'host':_0x02a5('0xe'),'port':0x18eb});var socket=require(_0x02a5('0xf'))(new Redis(config[_0x02a5('0xc')]));require(_0x02a5('0x10'))[_0x02a5('0x11')](socket);function respondWithRpcPromise(_0x381d6e,_0x193433,_0x3c358e){return new BPromise(function(_0x5437e2,_0x201987){return client[_0x02a5('0x12')](_0x381d6e,_0x3c358e)[_0x02a5('0x13')](function(_0x1e7eb9){logger['info'](_0x02a5('0x14'),_0x193433,_0x02a5('0x15'));logger[_0x02a5('0x16')]('WhatsappInteraction,\x20%s,\x20%s,\x20%s',_0x193433,'request\x20sent',JSON[_0x02a5('0x17')](_0x1e7eb9));if(_0x1e7eb9[_0x02a5('0x18')]){if(_0x1e7eb9[_0x02a5('0x18')][_0x02a5('0x19')]===0x1f4){logger[_0x02a5('0x18')](_0x02a5('0x14'),_0x193433,_0x1e7eb9[_0x02a5('0x18')][_0x02a5('0x1a')]);return _0x201987(_0x1e7eb9[_0x02a5('0x18')]['message']);}logger[_0x02a5('0x18')](_0x02a5('0x14'),_0x193433,_0x1e7eb9[_0x02a5('0x18')]['message']);return _0x5437e2(_0x1e7eb9[_0x02a5('0x18')]['message']);}else{logger['info']('WhatsappInteraction,\x20%s,\x20%s',_0x193433,_0x02a5('0x15'));_0x5437e2(_0x1e7eb9[_0x02a5('0x1b')][_0x02a5('0x1a')]);}})[_0x02a5('0x1c')](function(_0x203675){logger[_0x02a5('0x18')](_0x02a5('0x14'),_0x193433,_0x203675);_0x201987(_0x203675);});});}exports['UpdateWhatsappInteraction']=function(_0x586cc5){var _0x2ae703=this;return new Promise(function(_0x20499a,_0x4e6441){return db[_0x02a5('0x1d')][_0x02a5('0x1e')](_0x586cc5[_0x02a5('0x1f')],{'raw':_0x586cc5[_0x02a5('0x20')]?_0x586cc5[_0x02a5('0x20')][_0x02a5('0x21')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x586cc5['options']?_0x586cc5[_0x02a5('0x20')][_0x02a5('0x22')]||null:null,'attributes':_0x586cc5[_0x02a5('0x20')]?_0x586cc5[_0x02a5('0x20')][_0x02a5('0x23')]||null:null,'limit':_0x586cc5[_0x02a5('0x20')]?_0x586cc5[_0x02a5('0x20')][_0x02a5('0x24')]||null:null})[_0x02a5('0x13')](function(_0x5f4cc3){logger['info'](_0x02a5('0x25'),_0x586cc5);logger[_0x02a5('0x16')](_0x02a5('0x25'),_0x586cc5,JSON['stringify'](_0x5f4cc3));_0x20499a(_0x5f4cc3);})[_0x02a5('0x1c')](function(_0x55572e){logger[_0x02a5('0x18')](_0x02a5('0x25'),_0x55572e[_0x02a5('0x1a')],_0x586cc5);_0x4e6441(_0x2ae703[_0x02a5('0x18')](0x1f4,_0x55572e[_0x02a5('0x1a')]));});});};exports[_0x02a5('0x26')]=function(_0x435246){return new Promise(function(_0x3f417d,_0x177352){return db[_0x02a5('0x1d')][_0x02a5('0x27')]({'where':_0x435246['options']?_0x435246['options']['where']||null:null})[_0x02a5('0x13')](function(_0x2f7503){if(_0x2f7503){return _0x2f7503[_0x02a5('0x28')](_0x435246['body']['ids'],_[_0x02a5('0x29')](_0x435246[_0x02a5('0x1f')],[_0x02a5('0x2a'),'id'])||{});}})[_0x02a5('0x2b')](function(_0x166d1a){logger[_0x02a5('0x2c')](_0x02a5('0x2d'),_0x435246);logger[_0x02a5('0x16')](_0x02a5('0x2d'),_0x435246,JSON['stringify'](_0x166d1a));_0x3f417d(_0x166d1a);})[_0x02a5('0x1c')](function(_0x552669){logger[_0x02a5('0x18')](_0x02a5('0x2d'),_0x552669['message'],_0x435246);_0x177352(_this['error'](0x1f4,_0x552669[_0x02a5('0x1a')]));});});};
\ No newline at end of file
index 3777248..52e3dbb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe3a5=['remove','update','removeListener','length','whatsappInteraction:','./whatsappInteraction.events','save'];(function(_0x4ee9ec,_0x1af482){var _0x59ee18=function(_0x2a7b4b){while(--_0x2a7b4b){_0x4ee9ec['push'](_0x4ee9ec['shift']());}};_0x59ee18(++_0x1af482);}(_0xe3a5,0x1ef));var _0x5e3a=function(_0x19df01,_0x92e857){_0x19df01=_0x19df01-0x0;var _0x3f8137=_0xe3a5[_0x19df01];return _0x3f8137;};'use strict';var WhatsappInteractionEvents=require(_0x5e3a('0x0'));var events=[_0x5e3a('0x1'),_0x5e3a('0x2'),_0x5e3a('0x3')];function createListener(_0x192680,_0x54e42b){return function(_0x1af9a5){_0x54e42b['emit'](_0x192680,_0x1af9a5);};}function removeListener(_0x467d0e,_0x58c88f){return function(){WhatsappInteractionEvents[_0x5e3a('0x4')](_0x467d0e,_0x58c88f);};}exports['register']=function(_0x4f141c){for(var _0x499f8d=0x0,_0x47bebd=events[_0x5e3a('0x5')];_0x499f8d<_0x47bebd;_0x499f8d++){var _0x218dd6=events[_0x499f8d];var _0x10ade1=createListener(_0x5e3a('0x6')+_0x218dd6,_0x4f141c);WhatsappInteractionEvents['on'](_0x218dd6,_0x10ade1);}};
\ No newline at end of file
+var _0xb377=['./whatsappInteraction.events','save','update','emit','removeListener','register','length','whatsappInteraction:'];(function(_0x4ddef8,_0x3c78fe){var _0x456403=function(_0x439273){while(--_0x439273){_0x4ddef8['push'](_0x4ddef8['shift']());}};_0x456403(++_0x3c78fe);}(_0xb377,0x100));var _0x7b37=function(_0x340021,_0x47a231){_0x340021=_0x340021-0x0;var _0x44d0b1=_0xb377[_0x340021];return _0x44d0b1;};'use strict';var WhatsappInteractionEvents=require(_0x7b37('0x0'));var events=[_0x7b37('0x1'),'remove',_0x7b37('0x2')];function createListener(_0x2708d8,_0x503562){return function(_0x2e82ff){_0x503562[_0x7b37('0x3')](_0x2708d8,_0x2e82ff);};}function removeListener(_0x3d2284,_0x9b08fd){return function(){WhatsappInteractionEvents[_0x7b37('0x4')](_0x3d2284,_0x9b08fd);};}exports[_0x7b37('0x5')]=function(_0xa1f460){for(var _0x24facb=0x0,_0x900cce=events[_0x7b37('0x6')];_0x24facb<_0x900cce;_0x24facb++){var _0x375962=events[_0x24facb];var _0x5bb9fa=createListener(_0x7b37('0x7')+_0x375962,_0xa1f460);WhatsappInteractionEvents['on'](_0x375962,_0x5bb9fa);}};
\ No newline at end of file
index b404f45..5d10a03 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x13ea=['tracked','whatsapp','whatsappmessage:create','/:id/status','status','update','put','/:id/accept','accept','/:id/reject','reject','delete','/:id','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappMessage.controller','get','isAuthenticated','index','/describe','describe','show'];(function(_0x3cb465,_0x36d920){var _0x4e197b=function(_0x25fd7d){while(--_0x25fd7d){_0x3cb465['push'](_0x3cb465['shift']());}};_0x4e197b(++_0x36d920);}(_0x13ea,0x11c));var _0xa13e=function(_0x4baae2,_0x487ab6){_0x4baae2=_0x4baae2-0x0;var _0x1a2285=_0x13ea[_0x4baae2];return _0x1a2285;};'use strict';var multer=require(_0xa13e('0x0'));var util=require(_0xa13e('0x1'));var path=require(_0xa13e('0x2'));var timeout=require(_0xa13e('0x3'));var express=require(_0xa13e('0x4'));var router=express['Router']();var fs_extra=require(_0xa13e('0x5'));var auth=require(_0xa13e('0x6'));var interaction=require(_0xa13e('0x7'));var config=require(_0xa13e('0x8'));var controller=require(_0xa13e('0x9'));router[_0xa13e('0xa')]('/',auth[_0xa13e('0xb')](),controller[_0xa13e('0xc')]);router['get'](_0xa13e('0xd'),auth[_0xa13e('0xb')](),controller[_0xa13e('0xe')]);router[_0xa13e('0xa')]('/:id',auth[_0xa13e('0xb')](),controller[_0xa13e('0xf')]);router['post']('/',auth['isAuthenticated'](),interaction[_0xa13e('0x10')](_0xa13e('0x11'),_0xa13e('0x12')),controller['create']);router['post'](_0xa13e('0x13'),controller[_0xa13e('0x14')]);router['put']('/:id',auth[_0xa13e('0xb')](),controller[_0xa13e('0x15')]);router[_0xa13e('0x16')](_0xa13e('0x17'),auth[_0xa13e('0xb')](),controller[_0xa13e('0x18')]);router[_0xa13e('0x16')](_0xa13e('0x19'),auth[_0xa13e('0xb')](),controller[_0xa13e('0x1a')]);router[_0xa13e('0x1b')](_0xa13e('0x1c'),auth[_0xa13e('0xb')](),controller['destroy']);module[_0xa13e('0x1d')]=router;
\ No newline at end of file
+var _0xcbe5=['/:id/accept','accept','/:id/reject','reject','destroy','exports','multer','util','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./whatsappMessage.controller','get','/describe','isAuthenticated','describe','/:id','show','post','tracked','whatsapp','create','/:id/status','status','put'];(function(_0x9d639c,_0x524dbe){var _0x1671de=function(_0x27888e){while(--_0x27888e){_0x9d639c['push'](_0x9d639c['shift']());}};_0x1671de(++_0x524dbe);}(_0xcbe5,0xc3));var _0x5cbe=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0xcbe5[_0x2c91e9];return _0x13f0ff;};'use strict';var multer=require(_0x5cbe('0x0'));var util=require(_0x5cbe('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x5cbe('0x2'));var router=express[_0x5cbe('0x3')]();var fs_extra=require(_0x5cbe('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x5cbe('0x5'));var config=require(_0x5cbe('0x6'));var controller=require(_0x5cbe('0x7'));router[_0x5cbe('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0x5cbe('0x8')](_0x5cbe('0x9'),auth[_0x5cbe('0xa')](),controller[_0x5cbe('0xb')]);router[_0x5cbe('0x8')](_0x5cbe('0xc'),auth[_0x5cbe('0xa')](),controller[_0x5cbe('0xd')]);router[_0x5cbe('0xe')]('/',auth['isAuthenticated'](),interaction[_0x5cbe('0xf')](_0x5cbe('0x10'),'whatsappmessage:create'),controller[_0x5cbe('0x11')]);router[_0x5cbe('0xe')](_0x5cbe('0x12'),controller[_0x5cbe('0x13')]);router['put'](_0x5cbe('0xc'),auth[_0x5cbe('0xa')](),controller['update']);router[_0x5cbe('0x14')](_0x5cbe('0x15'),auth[_0x5cbe('0xa')](),controller[_0x5cbe('0x16')]);router[_0x5cbe('0x14')](_0x5cbe('0x17'),auth[_0x5cbe('0xa')](),controller[_0x5cbe('0x18')]);router['delete'](_0x5cbe('0xc'),auth[_0x5cbe('0xa')](),controller[_0x5cbe('0x19')]);module[_0x5cbe('0x1a')]=router;
\ No newline at end of file
index 4737553..4406be0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xffc1=['ENUM','out','STRING','DATE','sequelize','TEXT','medium','BOOLEAN'];(function(_0x42fe9c,_0x8ea8df){var _0xe8737f=function(_0x14c22c){while(--_0x14c22c){_0x42fe9c['push'](_0x42fe9c['shift']());}};_0xe8737f(++_0x8ea8df);}(_0xffc1,0x1b4));var _0x1ffc=function(_0x36f13f,_0x3b653d){_0x36f13f=_0x36f13f-0x0;var _0x554e71=_0xffc1[_0x36f13f];return _0x554e71;};'use strict';var Sequelize=require(_0x1ffc('0x0'));module['exports']={'body':{'type':Sequelize[_0x1ffc('0x1')](_0x1ffc('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0x1ffc('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0x1ffc('0x4')]('in',_0x1ffc('0x5')),'defaultValue':'out','allowNull':![]},'messageId':{'type':Sequelize['STRING'](0xbe)},'phone':{'type':Sequelize[_0x1ffc('0x6')]},'readAt':{'type':Sequelize[_0x1ffc('0x7')]},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'providerName':{'type':Sequelize[_0x1ffc('0x6')]},'providerResponse':{'type':Sequelize[_0x1ffc('0x1')]}};
\ No newline at end of file
+var _0xcfa1=['BOOLEAN','out','STRING','DATE','sequelize','TEXT','medium'];(function(_0x1928fb,_0x152e80){var _0x2e467b=function(_0x2c1ce8){while(--_0x2c1ce8){_0x1928fb['push'](_0x1928fb['shift']());}};_0x2e467b(++_0x152e80);}(_0xcfa1,0xc8));var _0x1cfa=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0xcfa1[_0x397e5f];return _0x5302b8;};'use strict';var Sequelize=require(_0x1cfa('0x0'));module['exports']={'body':{'type':Sequelize[_0x1cfa('0x1')](_0x1cfa('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0x1cfa('0x3')],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in','out'),'defaultValue':_0x1cfa('0x4'),'allowNull':![]},'messageId':{'type':Sequelize[_0x1cfa('0x5')](0xbe)},'phone':{'type':Sequelize[_0x1cfa('0x5')]},'readAt':{'type':Sequelize[_0x1cfa('0x6')]},'secret':{'type':Sequelize[_0x1cfa('0x3')],'defaultValue':![]},'providerName':{'type':Sequelize[_0x1cfa('0x5')]},'providerResponse':{'type':Sequelize[_0x1cfa('0x1')]}};
\ No newline at end of file
index 0696bc0..d388d1e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6da6=['accept','whatsapp','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','get','WhatsappInteraction','WhatsappInteractionId','isNil','read1stAt','interaction','role','null','acceptMessage','ContactId','Sequelize','SELECT','contact','fullname','email','agent','manual','interface','SIP/%s','channel','motionChannel','event','EventManager','[WHATSAPPMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','rejectMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','sequelize','QueryTypes','User','internal','rejectmessage','WhatsappAccount','WhatsppMessage,\x20%s,\x20%s,\x20%s','received\x20delivery\x20report\x20from','inspect','MessageSid','messageId','MessageStatus','twilio','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','./whatsappMessage.socket','register','client','http','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','set','Content-Range','apply','reject','update','destroy','then','sendStatus','stack','name','send','index','map','WhatsappMessage','type','key','model','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','show','keys','rawAttributes','find','create','body','params','describe','whatsapp-interactions'];(function(_0x54381d,_0x247b2c){var _0x5308a7=function(_0x3ef056){while(--_0x3ef056){_0x54381d['push'](_0x54381d['shift']());}};_0x5308a7(++_0x247b2c);}(_0x6da6,0xbf));var _0x66da=function(_0xc4f906,_0x2076b0){_0xc4f906=_0xc4f906-0x0;var _0xed62b8=_0x6da6[_0xc4f906];return _0xed62b8;};'use strict';var emlformat=require(_0x66da('0x0'));var rimraf=require(_0x66da('0x1'));var zipdir=require(_0x66da('0x2'));var jsonpatch=require(_0x66da('0x3'));var rp=require(_0x66da('0x4'));var moment=require(_0x66da('0x5'));var BPromise=require(_0x66da('0x6'));var Mustache=require(_0x66da('0x7'));var util=require(_0x66da('0x8'));var path=require('path');var sox=require(_0x66da('0x9'));var csv=require(_0x66da('0xa'));var ejs=require(_0x66da('0xb'));var fs=require('fs');var fs_extra=require(_0x66da('0xc'));var _=require(_0x66da('0xd'));var squel=require(_0x66da('0xe'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x66da('0xf'));var toCsv=require('to-csv');var querystring=require(_0x66da('0x10'));var Papa=require(_0x66da('0x11'));var Redis=require('ioredis');var authService=require(_0x66da('0x12'));var qs=require(_0x66da('0x13'));var as=require(_0x66da('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x66da('0x15'))('api');var utils=require(_0x66da('0x16'));var config=require(_0x66da('0x17'));var licenseUtil=require(_0x66da('0x18'));var db=require(_0x66da('0x19'))['db'];config[_0x66da('0x1a')]=_[_0x66da('0x1b')](config['redis'],{'host':_0x66da('0x1c'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x66da('0x1a')]));require(_0x66da('0x1d'))[_0x66da('0x1e')](socket);var jayson=require('jayson/promise');var client=jayson[_0x66da('0x1f')][_0x66da('0x20')]({'port':0x232c});var client9002=jayson[_0x66da('0x1f')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1b2221,_0x517b39,_0xc22ed6,_0x5406cb){return new BPromise(function(_0x4c49d6,_0x389138){var _0x448b08=_0x5406cb||client;return _0x448b08['request'](_0x1b2221,_0xc22ed6)['then'](function(_0x12aa77){logger[_0x66da('0x21')](_0x66da('0x22'),_0x517b39,_0x66da('0x23'));logger[_0x66da('0x24')](_0x66da('0x25'),_0x517b39,_0x66da('0x23'),JSON[_0x66da('0x26')](_0x12aa77));if(_0x12aa77['error']){if(_0x12aa77[_0x66da('0x27')][_0x66da('0x28')]===0x1f4){logger['error'](_0x66da('0x22'),_0x517b39,_0x12aa77[_0x66da('0x27')][_0x66da('0x29')]);return _0x389138(_0x12aa77['error'][_0x66da('0x29')]);}logger['error'](_0x66da('0x22'),_0x517b39,_0x12aa77[_0x66da('0x27')][_0x66da('0x29')]);return _0x4c49d6(_0x12aa77['error']['message']);}else{logger[_0x66da('0x21')]('WhatsappMessage,\x20%s,\x20%s',_0x517b39,_0x66da('0x23'));_0x4c49d6(_0x12aa77[_0x66da('0x2a')]['message']);}})[_0x66da('0x2b')](function(_0x1412e2){logger['error'](_0x66da('0x22'),_0x517b39,_0x1412e2);_0x389138(_0x1412e2);});});}function respondWithStatusCode(_0x26304f,_0x1ee23b){_0x1ee23b=_0x1ee23b||0xcc;return function(_0x16b8c0){if(_0x16b8c0){return _0x26304f['sendStatus'](_0x1ee23b);}return _0x26304f[_0x66da('0x2c')](_0x1ee23b)[_0x66da('0x2d')]();};}function respondWithResult(_0x53d9a9,_0x9a5885){_0x9a5885=_0x9a5885||0xc8;return function(_0x3e11a7){if(_0x3e11a7){return _0x53d9a9[_0x66da('0x2c')](_0x9a5885)[_0x66da('0x2e')](_0x3e11a7);}};}function respondWithFilteredResult(_0x508570,_0x470f86){return function(_0x392ee4){if(_0x392ee4){var _0x1bccbd=typeof _0x470f86[_0x66da('0x2f')]===_0x66da('0x30')&&typeof _0x470f86[_0x66da('0x31')]===_0x66da('0x30');var _0x5769f1=_0x392ee4[_0x66da('0x32')];var _0x460483=_0x1bccbd?0x0:_0x470f86[_0x66da('0x2f')];var _0x3460f3=_0x1bccbd?_0x392ee4[_0x66da('0x32')]:_0x470f86[_0x66da('0x2f')]+_0x470f86['limit'];var _0xa12d2b;if(_0x3460f3>=_0x5769f1){_0x3460f3=_0x5769f1;_0xa12d2b=0xc8;}else{_0xa12d2b=0xce;}_0x508570[_0x66da('0x2c')](_0xa12d2b);return _0x508570[_0x66da('0x33')](_0x66da('0x34'),_0x460483+'-'+_0x3460f3+'/'+_0x5769f1)[_0x66da('0x2e')](_0x392ee4);}return null;};}function patchUpdates(_0x186f6c){return function(_0x8350d1){try{jsonpatch[_0x66da('0x35')](_0x8350d1,_0x186f6c,!![]);}catch(_0x14ebe3){return BPromise[_0x66da('0x36')](_0x14ebe3);}return _0x8350d1['save']();};}function saveUpdates(_0x4eef8d,_0x437d08){return function(_0xf1afd9){if(_0xf1afd9){return _0xf1afd9[_0x66da('0x37')](_0x4eef8d)['then'](function(_0x40a6db){return _0x40a6db;});}return null;};}function removeEntity(_0x2ee22c,_0x38d771){return function(_0x5144e1){if(_0x5144e1){return _0x5144e1[_0x66da('0x38')]()[_0x66da('0x39')](function(){_0x2ee22c[_0x66da('0x2c')](0xcc)[_0x66da('0x2d')]();});}};}function handleEntityNotFound(_0x4654ae,_0x50d507){return function(_0x8e43db){if(!_0x8e43db){_0x4654ae[_0x66da('0x3a')](0x194);}return _0x8e43db;};}function handleError(_0x2f910f,_0x24b132){_0x24b132=_0x24b132||0x1f4;return function(_0x3c308f){logger[_0x66da('0x27')](_0x3c308f[_0x66da('0x3b')]);if(_0x3c308f['name']){delete _0x3c308f[_0x66da('0x3c')];}_0x2f910f['status'](_0x24b132)[_0x66da('0x3d')](_0x3c308f);};}exports[_0x66da('0x3e')]=function(_0x2b84e0,_0x5f36ff){var _0x59f2f5={},_0x3270f3={},_0x4d2d0d={'count':0x0,'rows':[]};var _0x551444=_[_0x66da('0x3f')](db[_0x66da('0x40')]['rawAttributes'],function(_0x477bae){return{'name':_0x477bae['fieldName'],'type':_0x477bae[_0x66da('0x41')][_0x66da('0x42')]};});_0x3270f3[_0x66da('0x43')]=_[_0x66da('0x3f')](_0x551444,_0x66da('0x3c'));_0x3270f3[_0x66da('0x44')]=_['keys'](_0x2b84e0[_0x66da('0x44')]);_0x3270f3[_0x66da('0x45')]=_['intersection'](_0x3270f3[_0x66da('0x43')],_0x3270f3['query']);_0x59f2f5[_0x66da('0x46')]=_[_0x66da('0x47')](_0x3270f3[_0x66da('0x43')],qs['fields'](_0x2b84e0[_0x66da('0x44')][_0x66da('0x48')]));_0x59f2f5[_0x66da('0x46')]=_0x59f2f5[_0x66da('0x46')][_0x66da('0x49')]?_0x59f2f5[_0x66da('0x46')]:_0x3270f3['model'];if(!_0x2b84e0[_0x66da('0x44')][_0x66da('0x4a')](_0x66da('0x4b'))){_0x59f2f5['limit']=qs[_0x66da('0x31')](_0x2b84e0[_0x66da('0x44')][_0x66da('0x31')]);_0x59f2f5[_0x66da('0x2f')]=qs[_0x66da('0x2f')](_0x2b84e0[_0x66da('0x44')]['offset']);}_0x59f2f5[_0x66da('0x4c')]=qs[_0x66da('0x4d')](_0x2b84e0[_0x66da('0x44')][_0x66da('0x4d')]);_0x59f2f5[_0x66da('0x4e')]=qs[_0x66da('0x45')](_[_0x66da('0x4f')](_0x2b84e0[_0x66da('0x44')],_0x3270f3[_0x66da('0x45')]),_0x551444);if(_0x2b84e0[_0x66da('0x44')][_0x66da('0x50')]){_0x59f2f5['where']=_[_0x66da('0x51')](_0x59f2f5[_0x66da('0x4e')],{'$or':_[_0x66da('0x3f')](_0x551444,function(_0x2e3bc6){if(_0x2e3bc6[_0x66da('0x41')]!==_0x66da('0x52')){var _0x4ac392={};_0x4ac392[_0x2e3bc6[_0x66da('0x3c')]]={'$like':'%'+_0x2b84e0[_0x66da('0x44')][_0x66da('0x50')]+'%'};return _0x4ac392;}})});}_0x59f2f5=_[_0x66da('0x51')]({},_0x59f2f5,_0x2b84e0[_0x66da('0x53')]);var _0x19f991={'where':_0x59f2f5[_0x66da('0x4e')]};return db[_0x66da('0x40')][_0x66da('0x32')](_0x19f991)[_0x66da('0x39')](function(_0x3ac298){_0x4d2d0d[_0x66da('0x32')]=_0x3ac298;if(_0x2b84e0['query'][_0x66da('0x54')]){_0x59f2f5[_0x66da('0x55')]=[{'all':!![]}];}return db[_0x66da('0x40')][_0x66da('0x56')](_0x59f2f5);})['then'](function(_0x30e3d2){_0x4d2d0d[_0x66da('0x57')]=_0x30e3d2;return _0x4d2d0d;})['then'](respondWithFilteredResult(_0x5f36ff,_0x59f2f5))[_0x66da('0x2b')](handleError(_0x5f36ff,null));};exports[_0x66da('0x58')]=function(_0x21f3aa,_0x1cb330){var _0x25a982={'raw':!![],'where':{'id':_0x21f3aa['params']['id']}},_0x297daa={};_0x297daa[_0x66da('0x43')]=_[_0x66da('0x59')](db[_0x66da('0x40')][_0x66da('0x5a')]);_0x297daa[_0x66da('0x44')]=_[_0x66da('0x59')](_0x21f3aa['query']);_0x297daa[_0x66da('0x45')]=_[_0x66da('0x47')](_0x297daa[_0x66da('0x43')],_0x297daa[_0x66da('0x44')]);_0x25a982['attributes']=_[_0x66da('0x47')](_0x297daa['model'],qs[_0x66da('0x48')](_0x21f3aa['query'][_0x66da('0x48')]));_0x25a982['attributes']=_0x25a982[_0x66da('0x46')][_0x66da('0x49')]?_0x25a982[_0x66da('0x46')]:_0x297daa[_0x66da('0x43')];if(_0x21f3aa[_0x66da('0x44')]['includeAll']){_0x25a982[_0x66da('0x55')]=[{'all':!![]}];}_0x25a982=_[_0x66da('0x51')]({},_0x25a982,_0x21f3aa['options']);return db[_0x66da('0x40')][_0x66da('0x5b')](_0x25a982)[_0x66da('0x39')](handleEntityNotFound(_0x1cb330,null))[_0x66da('0x39')](respondWithResult(_0x1cb330,null))['catch'](handleError(_0x1cb330,null));};exports[_0x66da('0x5c')]=function(_0x332cc9,_0x416d60){return db[_0x66da('0x40')][_0x66da('0x5c')](_0x332cc9[_0x66da('0x5d')],{})[_0x66da('0x39')](respondWithResult(_0x416d60,0xc9))['catch'](handleError(_0x416d60,null));};exports[_0x66da('0x37')]=function(_0x4a4cd1,_0x1194c8){if(_0x4a4cd1['body']['id']){delete _0x4a4cd1[_0x66da('0x5d')]['id'];}return db['WhatsappMessage']['find']({'where':{'id':_0x4a4cd1[_0x66da('0x5e')]['id']}})[_0x66da('0x39')](handleEntityNotFound(_0x1194c8,null))[_0x66da('0x39')](saveUpdates(_0x4a4cd1[_0x66da('0x5d')],null))[_0x66da('0x39')](respondWithResult(_0x1194c8,null))[_0x66da('0x2b')](handleError(_0x1194c8,null));};exports[_0x66da('0x38')]=function(_0x5f224a,_0x51088a){return db['WhatsappMessage'][_0x66da('0x5b')]({'where':{'id':_0x5f224a['params']['id']}})['then'](handleEntityNotFound(_0x51088a,null))[_0x66da('0x39')](removeEntity(_0x51088a,null))[_0x66da('0x2b')](handleError(_0x51088a,null));};exports[_0x66da('0x5f')]=function(_0x43aad8,_0x400ddf){return db[_0x66da('0x40')][_0x66da('0x5f')]()[_0x66da('0x39')](respondWithResult(_0x400ddf,null))[_0x66da('0x2b')](handleError(_0x400ddf,null));};var interaction_log=require(_0x66da('0x15'))(_0x66da('0x60'));exports[_0x66da('0x61')]=function(_0x373646,_0x27eabe,_0x1e2bb0){var _0x4304e0={'agent':{},'channel':_0x66da('0x62')};if(_0x373646[_0x66da('0x5d')]['id']){delete _0x373646['body']['id'];}_0x373646[_0x66da('0x5d')][_0x66da('0x63')]=!![];_0x373646[_0x66da('0x5d')][_0x66da('0x64')]=moment()[_0x66da('0x65')](_0x66da('0x66'));_0x373646[_0x66da('0x5d')][_0x66da('0x67')]=_0x373646[_0x66da('0x5d')][_0x66da('0x67')]||_0x373646[_0x66da('0x68')]['id'];_0x4304e0['agent']['id']=_0x373646[_0x66da('0x5d')][_0x66da('0x67')];return db[_0x66da('0x40')]['find']({'where':{'id':_0x373646[_0x66da('0x5e')]['id'],'UserId':null}})[_0x66da('0x39')](handleEntityNotFound(_0x27eabe,null))[_0x66da('0x39')](saveUpdates(_0x373646[_0x66da('0x5d')],null))['then'](function(_0x3f0c9d){if(_0x3f0c9d){_0x4304e0[_0x66da('0x29')]=_0x3f0c9d[_0x66da('0x69')]({'plain':!![]});return db[_0x66da('0x6a')][_0x66da('0x5b')]({'where':{'id':_0x3f0c9d[_0x66da('0x6b')]}});}return null;})['then'](handleEntityNotFound(_0x27eabe,null))[_0x66da('0x39')](function(_0x130aee){if(_0x130aee){return _0x130aee[_0x66da('0x37')]({'UserId':_0x373646['body'][_0x66da('0x67')],'read1stAt':_[_0x66da('0x6c')](_0x130aee[_0x66da('0x6d')])?moment()[_0x66da('0x65')](_0x66da('0x66')):undefined});}return null;})[_0x66da('0x39')](function(_0x2c6547){if(_0x2c6547){_0x4304e0[_0x66da('0x6e')]=_0x2c6547[_0x66da('0x69')]({'plain':!![]});interaction_log[_0x66da('0x21')]('[WHATSAPPMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x373646[_0x66da('0x68')]['id'],_0x373646[_0x66da('0x68')][_0x66da('0x3c')],_0x373646[_0x66da('0x68')][_0x66da('0x6f')],_0x4304e0[_0x66da('0x6e')]['id'],_0x373646[_0x66da('0x5d')]?JSON['stringify'](_0x373646[_0x66da('0x5d')]):_0x66da('0x70'));return respondWithRpcPromise('AcceptMessage',_0x66da('0x71'),_0x4304e0);}return null;})['then'](function(_0x44cbd2){var _0x390ac3='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x44cbd2[_0x66da('0x29')][_0x66da('0x72')];return db['sequelize']['query'](_0x390ac3,{'type':db[_0x66da('0x73')]['QueryTypes'][_0x66da('0x74')],'raw':!![]})[_0x66da('0x39')](function(_0x4ae211){return _0x4ae211;});})['then'](function(_0x58bde2){if(_0x58bde2){_0x4304e0[_0x66da('0x29')][_0x66da('0x75')]=_0x58bde2[0x0];if(!_0x373646[_0x66da('0x5d')][_0x66da('0x67')])return;return db['User'][_0x66da('0x5b')]({'where':{'id':_0x373646[_0x66da('0x5d')][_0x66da('0x67')],'role':'agent'},'attributes':['id','name',_0x66da('0x76'),_0x66da('0x77'),'internal'],'raw':!![]});}return null;})[_0x66da('0x39')](function(_0x1ddf8b){if(!_0x1ddf8b)return null;_0x4304e0[_0x66da('0x29')][_0x66da('0x78')]=_0x1ddf8b;return _0x4304e0;})['then'](function(_0x4d6280){if(_0x4d6280){if(_0x373646[_0x66da('0x5d')][_0x66da('0x79')]){_0x4304e0[_0x66da('0x29')][_0x66da('0x7a')]=util[_0x66da('0x65')](_0x66da('0x7b'),_0x373646[_0x66da('0x68')][_0x66da('0x3c')]);_0x4304e0['message'][_0x66da('0x7c')]=_0x4304e0[_0x66da('0x7c')];_0x4304e0['message'][_0x66da('0x7d')]=_0x4304e0[_0x66da('0x7c')];_0x4304e0[_0x66da('0x29')][_0x66da('0x7e')]='accept';return respondWithRpcPromise(_0x66da('0x7f'),_0x66da('0x7f'),{'event':'acceptmessage','message':_0x4304e0['message']},client9002)[_0x66da('0x39')](function(){return _0x4304e0;});}return _0x4304e0;}return null;})[_0x66da('0x39')](respondWithResult(_0x27eabe,null))['catch'](handleError(_0x27eabe,null));};var interaction_log=require(_0x66da('0x15'))('whatsapp-interactions');exports['reject']=function(_0x13446f,_0xe825d3,_0x27695e){var _0x4c1bb7={'agent':{},'channel':'whatsapp'};if(_0x13446f['body']['id']){delete _0x13446f[_0x66da('0x5d')]['id'];}_0x13446f['body']['UserId']=_0x13446f['body']['UserId']||_0x13446f['user']['id'];_0x4c1bb7[_0x66da('0x78')]['id']=_0x13446f[_0x66da('0x5d')][_0x66da('0x67')];return db[_0x66da('0x40')][_0x66da('0x5b')]({'where':{'id':_0x13446f[_0x66da('0x5e')]['id'],'UserId':null}})[_0x66da('0x39')](handleEntityNotFound(_0xe825d3,null))['then'](function(_0xa8ca){if(_0xa8ca){_0x4c1bb7[_0x66da('0x29')]=_0xa8ca[_0x66da('0x69')]({'plain':!![]});return db[_0x66da('0x6a')][_0x66da('0x5b')]({'where':{'id':_0xa8ca[_0x66da('0x6b')]}});}return null;})[_0x66da('0x39')](handleEntityNotFound(_0xe825d3,null))[_0x66da('0x39')](function(_0x24f036){if(_0x24f036){_0x4c1bb7[_0x66da('0x6e')]=_0x24f036[_0x66da('0x69')]({'plain':!![]});interaction_log[_0x66da('0x21')](_0x66da('0x80'),_0x13446f['user']['id'],_0x13446f[_0x66da('0x68')][_0x66da('0x3c')],_0x13446f[_0x66da('0x68')]['role'],_0x4c1bb7[_0x66da('0x6e')]['id'],_0x13446f['body']?JSON[_0x66da('0x26')](_0x13446f[_0x66da('0x5d')]):'null');return respondWithRpcPromise('RejectMessage',_0x66da('0x81'),_0x4c1bb7);}return null;})[_0x66da('0x39')](function(_0x3057ce){var _0x165305=_0x66da('0x82')+_0x3057ce[_0x66da('0x29')][_0x66da('0x72')];return db[_0x66da('0x83')][_0x66da('0x44')](_0x165305,{'type':db[_0x66da('0x73')][_0x66da('0x84')][_0x66da('0x74')],'raw':!![]})['then'](function(_0xaf3cd0){return _0xaf3cd0;});})[_0x66da('0x39')](function(_0x37b557){if(_0x37b557){_0x4c1bb7[_0x66da('0x29')][_0x66da('0x75')]=_0x37b557[0x0];if(!_0x13446f[_0x66da('0x5d')][_0x66da('0x67')])return;return db[_0x66da('0x85')][_0x66da('0x5b')]({'where':{'id':_0x13446f['body']['UserId'],'role':_0x66da('0x78')},'attributes':['id',_0x66da('0x3c'),'fullname',_0x66da('0x77'),_0x66da('0x86')],'raw':!![]});}return null;})['then'](function(_0x4b2093){if(!_0x4b2093)return null;_0x4c1bb7[_0x66da('0x29')][_0x66da('0x78')]=_0x4b2093;return _0x4c1bb7;})[_0x66da('0x39')](function(_0xf62e42){if(_0xf62e42){_0xf62e42[_0x66da('0x29')][_0x66da('0x7a')]=util['format'](_0x66da('0x7b'),_0x13446f[_0x66da('0x68')][_0x66da('0x3c')]);_0xf62e42[_0x66da('0x29')][_0x66da('0x7c')]=_0x4c1bb7[_0x66da('0x7c')];_0xf62e42[_0x66da('0x29')]['motionChannel']=_0x4c1bb7[_0x66da('0x7c')];_0xf62e42[_0x66da('0x29')][_0x66da('0x7e')]=_0x66da('0x36');respondWithRpcPromise(_0x66da('0x7f'),'EventManager',{'event':_0x66da('0x87'),'message':_0xf62e42[_0x66da('0x29')]},client9002);return _0x4c1bb7;}return null;})[_0x66da('0x39')](respondWithResult(_0xe825d3,null))[_0x66da('0x2b')](handleError(_0xe825d3,null));};exports[_0x66da('0x2c')]=function(_0x584f4b,_0x25e79c,_0x571869){if(_0x584f4b[_0x66da('0x5d')]['id']){delete _0x584f4b[_0x66da('0x5d')]['id'];}var _0x8d4eb9;return db[_0x66da('0x40')][_0x66da('0x5b')]({'where':{'id':_0x584f4b[_0x66da('0x5e')]['id']}})[_0x66da('0x39')](handleEntityNotFound(_0x25e79c,null))['then'](function(_0x3e7a00){if(_0x3e7a00){_0x8d4eb9=_0x3e7a00;return db[_0x66da('0x88')][_0x66da('0x5b')]({'where':{'id':_0x3e7a00['WhatsappAccountId']}});}})['then'](handleEntityNotFound(_0x25e79c,null))[_0x66da('0x39')](function(_0x1c3680){if(_0x1c3680){logger[_0x66da('0x24')](_0x66da('0x89'),_0x66da('0x2c'),_0x66da('0x8a'),_0x1c3680['type'],util[_0x66da('0x8b')](_0x584f4b[_0x66da('0x5d')],{'showHidden':![],'depth':null}));switch(_0x1c3680[_0x66da('0x41')]){case'twilio':if(_0x584f4b['body']['MessageSid']&&_0x584f4b[_0x66da('0x5d')][_0x66da('0x8c')]===_0x8d4eb9[_0x66da('0x8d')]&&_0x584f4b[_0x66da('0x5d')]['MessageStatus']&&_0x584f4b[_0x66da('0x5d')][_0x66da('0x8e')]==='read'){return _0x8d4eb9['update']({'read':!![]});}else{logger[_0x66da('0x27')]('WhatsappAccount,\x20%s,\x20%s,\x20%s',_0x66da('0x2c'),_0x66da('0x8f'),util[_0x66da('0x8b')](_0x584f4b['body'],{'showHidden':![],'depth':null}));}break;}return _0x8d4eb9;}})[_0x66da('0x39')](respondWithResult(_0x25e79c,null))[_0x66da('0x2b')](handleError(_0x25e79c,null));};
\ No newline at end of file
+var _0xeaf2=['type','key','model','query','keys','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filters','filter','merge','includeAll','findAll','rows','catch','show','intersection','length','include','find','body','params','describe','whatsapp-interactions','accept','whatsapp','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','agent','get','WhatsappInteraction','WhatsappInteractionId','isNil','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','Sequelize','contact','User','fullname','internal','interface','SIP/%s','channel','motionChannel','event','EventManager','acceptmessage','reject','[WHATSAPPMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','QueryTypes','SELECT','rejectmessage','WhatsappAccount','WhatsppMessage,\x20%s,\x20%s,\x20%s','received\x20delivery\x20report\x20from','inspect','twilio','MessageSid','messageId','MessageStatus','WhatsappAccount,\x20%s,\x20%s,\x20%s','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/license/util','../../mysqldb','defaults','redis','localhost','socket.io-emitter','register','client','http','request','then','info','request\x20sent','debug','WhatsappMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','WhatsappMessage,\x20%s,\x20%s','message','result','status','end','json','offset','undefined','limit','count','set','Content-Range','save','update','destroy','sendStatus','stack','name','send','map','WhatsappMessage','rawAttributes','fieldName'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0xeaf2,0x1f1));var _0x2eaf=function(_0x74115b,_0x31f752){_0x74115b=_0x74115b-0x0;var _0x57ebbd=_0xeaf2[_0x74115b];return _0x57ebbd;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x2eaf('0x0'));var zipdir=require(_0x2eaf('0x1'));var jsonpatch=require(_0x2eaf('0x2'));var rp=require(_0x2eaf('0x3'));var moment=require(_0x2eaf('0x4'));var BPromise=require(_0x2eaf('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x2eaf('0x6'));var sox=require('sox');var csv=require(_0x2eaf('0x7'));var ejs=require(_0x2eaf('0x8'));var fs=require('fs');var fs_extra=require(_0x2eaf('0x9'));var _=require(_0x2eaf('0xa'));var squel=require(_0x2eaf('0xb'));var crypto=require(_0x2eaf('0xc'));var jsforce=require(_0x2eaf('0xd'));var deskjs=require(_0x2eaf('0xe'));var toCsv=require('to-csv');var querystring=require(_0x2eaf('0xf'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x2eaf('0x10'));var qs=require(_0x2eaf('0x11'));var as=require(_0x2eaf('0x12'));var hardwareService=require(_0x2eaf('0x13'));var logger=require(_0x2eaf('0x14'))(_0x2eaf('0x15'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x2eaf('0x16'));var db=require(_0x2eaf('0x17'))['db'];config['redis']=_[_0x2eaf('0x18')](config[_0x2eaf('0x19')],{'host':_0x2eaf('0x1a'),'port':0x18eb});var socket=require(_0x2eaf('0x1b'))(new Redis(config['redis']));require('./whatsappMessage.socket')[_0x2eaf('0x1c')](socket);var jayson=require('jayson/promise');var client=jayson[_0x2eaf('0x1d')][_0x2eaf('0x1e')]({'port':0x232c});var client9002=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0xaed2fa,_0x444624,_0x2ca9ea,_0x1f8134){return new BPromise(function(_0x2d760b,_0x5b8b23){var _0x3d93ec=_0x1f8134||client;return _0x3d93ec[_0x2eaf('0x1f')](_0xaed2fa,_0x2ca9ea)[_0x2eaf('0x20')](function(_0x5981e4){logger[_0x2eaf('0x21')]('WhatsappMessage,\x20%s,\x20%s',_0x444624,_0x2eaf('0x22'));logger[_0x2eaf('0x23')](_0x2eaf('0x24'),_0x444624,'request\x20sent',JSON[_0x2eaf('0x25')](_0x5981e4));if(_0x5981e4[_0x2eaf('0x26')]){if(_0x5981e4[_0x2eaf('0x26')][_0x2eaf('0x27')]===0x1f4){logger[_0x2eaf('0x26')](_0x2eaf('0x28'),_0x444624,_0x5981e4[_0x2eaf('0x26')]['message']);return _0x5b8b23(_0x5981e4[_0x2eaf('0x26')][_0x2eaf('0x29')]);}logger[_0x2eaf('0x26')]('WhatsappMessage,\x20%s,\x20%s',_0x444624,_0x5981e4[_0x2eaf('0x26')][_0x2eaf('0x29')]);return _0x2d760b(_0x5981e4[_0x2eaf('0x26')][_0x2eaf('0x29')]);}else{logger[_0x2eaf('0x21')](_0x2eaf('0x28'),_0x444624,_0x2eaf('0x22'));_0x2d760b(_0x5981e4[_0x2eaf('0x2a')][_0x2eaf('0x29')]);}})['catch'](function(_0x546aeb){logger[_0x2eaf('0x26')](_0x2eaf('0x28'),_0x444624,_0x546aeb);_0x5b8b23(_0x546aeb);});});}function respondWithStatusCode(_0x40f2ab,_0x4c26f1){_0x4c26f1=_0x4c26f1||0xcc;return function(_0x5c0987){if(_0x5c0987){return _0x40f2ab['sendStatus'](_0x4c26f1);}return _0x40f2ab[_0x2eaf('0x2b')](_0x4c26f1)[_0x2eaf('0x2c')]();};}function respondWithResult(_0x1321b3,_0x3dba9c){_0x3dba9c=_0x3dba9c||0xc8;return function(_0xc3e4cc){if(_0xc3e4cc){return _0x1321b3[_0x2eaf('0x2b')](_0x3dba9c)[_0x2eaf('0x2d')](_0xc3e4cc);}};}function respondWithFilteredResult(_0x56d06c,_0x30ab54){return function(_0x329cf0){if(_0x329cf0){var _0x34dcb4=typeof _0x30ab54[_0x2eaf('0x2e')]===_0x2eaf('0x2f')&&typeof _0x30ab54[_0x2eaf('0x30')]==='undefined';var _0x29e4c3=_0x329cf0[_0x2eaf('0x31')];var _0x155604=_0x34dcb4?0x0:_0x30ab54[_0x2eaf('0x2e')];var _0x1359fc=_0x34dcb4?_0x329cf0[_0x2eaf('0x31')]:_0x30ab54['offset']+_0x30ab54[_0x2eaf('0x30')];var _0x367f52;if(_0x1359fc>=_0x29e4c3){_0x1359fc=_0x29e4c3;_0x367f52=0xc8;}else{_0x367f52=0xce;}_0x56d06c['status'](_0x367f52);return _0x56d06c[_0x2eaf('0x32')](_0x2eaf('0x33'),_0x155604+'-'+_0x1359fc+'/'+_0x29e4c3)['json'](_0x329cf0);}return null;};}function patchUpdates(_0x55eab6){return function(_0x316d7a){try{jsonpatch['apply'](_0x316d7a,_0x55eab6,!![]);}catch(_0x3d1d6f){return BPromise['reject'](_0x3d1d6f);}return _0x316d7a[_0x2eaf('0x34')]();};}function saveUpdates(_0x1d84b8,_0x5950d4){return function(_0x1ce6be){if(_0x1ce6be){return _0x1ce6be[_0x2eaf('0x35')](_0x1d84b8)['then'](function(_0x372ded){return _0x372ded;});}return null;};}function removeEntity(_0x1c4630,_0x3ec7ac){return function(_0x56035a){if(_0x56035a){return _0x56035a[_0x2eaf('0x36')]()['then'](function(){_0x1c4630[_0x2eaf('0x2b')](0xcc)[_0x2eaf('0x2c')]();});}};}function handleEntityNotFound(_0x239eda,_0x33df0e){return function(_0x2b1c1d){if(!_0x2b1c1d){_0x239eda[_0x2eaf('0x37')](0x194);}return _0x2b1c1d;};}function handleError(_0x89dd05,_0x2edd09){_0x2edd09=_0x2edd09||0x1f4;return function(_0xb4a1c0){logger[_0x2eaf('0x26')](_0xb4a1c0[_0x2eaf('0x38')]);if(_0xb4a1c0[_0x2eaf('0x39')]){delete _0xb4a1c0[_0x2eaf('0x39')];}_0x89dd05[_0x2eaf('0x2b')](_0x2edd09)[_0x2eaf('0x3a')](_0xb4a1c0);};}exports['index']=function(_0x5d3716,_0x3dbb87){var _0x3ebe05={},_0x15a26c={},_0x11074d={'count':0x0,'rows':[]};var _0x54c2d0=_[_0x2eaf('0x3b')](db[_0x2eaf('0x3c')][_0x2eaf('0x3d')],function(_0x3e01ba){return{'name':_0x3e01ba[_0x2eaf('0x3e')],'type':_0x3e01ba[_0x2eaf('0x3f')][_0x2eaf('0x40')]};});_0x15a26c[_0x2eaf('0x41')]=_[_0x2eaf('0x3b')](_0x54c2d0,_0x2eaf('0x39'));_0x15a26c[_0x2eaf('0x42')]=_[_0x2eaf('0x43')](_0x5d3716['query']);_0x15a26c['filters']=_['intersection'](_0x15a26c['model'],_0x15a26c[_0x2eaf('0x42')]);_0x3ebe05[_0x2eaf('0x44')]=_['intersection'](_0x15a26c['model'],qs[_0x2eaf('0x45')](_0x5d3716[_0x2eaf('0x42')][_0x2eaf('0x45')]));_0x3ebe05['attributes']=_0x3ebe05[_0x2eaf('0x44')]['length']?_0x3ebe05[_0x2eaf('0x44')]:_0x15a26c[_0x2eaf('0x41')];if(!_0x5d3716[_0x2eaf('0x42')][_0x2eaf('0x46')](_0x2eaf('0x47'))){_0x3ebe05[_0x2eaf('0x30')]=qs['limit'](_0x5d3716[_0x2eaf('0x42')]['limit']);_0x3ebe05[_0x2eaf('0x2e')]=qs['offset'](_0x5d3716[_0x2eaf('0x42')][_0x2eaf('0x2e')]);}_0x3ebe05[_0x2eaf('0x48')]=qs['sort'](_0x5d3716[_0x2eaf('0x42')][_0x2eaf('0x49')]);_0x3ebe05[_0x2eaf('0x4a')]=qs[_0x2eaf('0x4b')](_['pick'](_0x5d3716['query'],_0x15a26c[_0x2eaf('0x4b')]),_0x54c2d0);if(_0x5d3716['query'][_0x2eaf('0x4c')]){_0x3ebe05[_0x2eaf('0x4a')]=_['merge'](_0x3ebe05[_0x2eaf('0x4a')],{'$or':_[_0x2eaf('0x3b')](_0x54c2d0,function(_0x1a8757){if(_0x1a8757[_0x2eaf('0x3f')]!=='VIRTUAL'){var _0x36b8d4={};_0x36b8d4[_0x1a8757['name']]={'$like':'%'+_0x5d3716[_0x2eaf('0x42')]['filter']+'%'};return _0x36b8d4;}})});}_0x3ebe05=_[_0x2eaf('0x4d')]({},_0x3ebe05,_0x5d3716['options']);var _0x236ca6={'where':_0x3ebe05[_0x2eaf('0x4a')]};return db[_0x2eaf('0x3c')][_0x2eaf('0x31')](_0x236ca6)[_0x2eaf('0x20')](function(_0x5b8048){_0x11074d['count']=_0x5b8048;if(_0x5d3716[_0x2eaf('0x42')][_0x2eaf('0x4e')]){_0x3ebe05['include']=[{'all':!![]}];}return db[_0x2eaf('0x3c')][_0x2eaf('0x4f')](_0x3ebe05);})['then'](function(_0x5b6733){_0x11074d[_0x2eaf('0x50')]=_0x5b6733;return _0x11074d;})['then'](respondWithFilteredResult(_0x3dbb87,_0x3ebe05))[_0x2eaf('0x51')](handleError(_0x3dbb87,null));};exports[_0x2eaf('0x52')]=function(_0x1faa94,_0x288619){var _0x324219={'raw':!![],'where':{'id':_0x1faa94['params']['id']}},_0x20e80a={};_0x20e80a[_0x2eaf('0x41')]=_[_0x2eaf('0x43')](db['WhatsappMessage'][_0x2eaf('0x3d')]);_0x20e80a[_0x2eaf('0x42')]=_['keys'](_0x1faa94[_0x2eaf('0x42')]);_0x20e80a[_0x2eaf('0x4b')]=_[_0x2eaf('0x53')](_0x20e80a['model'],_0x20e80a[_0x2eaf('0x42')]);_0x324219[_0x2eaf('0x44')]=_[_0x2eaf('0x53')](_0x20e80a[_0x2eaf('0x41')],qs[_0x2eaf('0x45')](_0x1faa94[_0x2eaf('0x42')]['fields']));_0x324219[_0x2eaf('0x44')]=_0x324219[_0x2eaf('0x44')][_0x2eaf('0x54')]?_0x324219['attributes']:_0x20e80a[_0x2eaf('0x41')];if(_0x1faa94[_0x2eaf('0x42')]['includeAll']){_0x324219[_0x2eaf('0x55')]=[{'all':!![]}];}_0x324219=_[_0x2eaf('0x4d')]({},_0x324219,_0x1faa94['options']);return db[_0x2eaf('0x3c')][_0x2eaf('0x56')](_0x324219)[_0x2eaf('0x20')](handleEntityNotFound(_0x288619,null))[_0x2eaf('0x20')](respondWithResult(_0x288619,null))[_0x2eaf('0x51')](handleError(_0x288619,null));};exports['create']=function(_0x3cc37f,_0x4f1556){return db[_0x2eaf('0x3c')]['create'](_0x3cc37f[_0x2eaf('0x57')],{})[_0x2eaf('0x20')](respondWithResult(_0x4f1556,0xc9))[_0x2eaf('0x51')](handleError(_0x4f1556,null));};exports[_0x2eaf('0x35')]=function(_0x549496,_0xfa1f59){if(_0x549496[_0x2eaf('0x57')]['id']){delete _0x549496[_0x2eaf('0x57')]['id'];}return db[_0x2eaf('0x3c')][_0x2eaf('0x56')]({'where':{'id':_0x549496[_0x2eaf('0x58')]['id']}})[_0x2eaf('0x20')](handleEntityNotFound(_0xfa1f59,null))['then'](saveUpdates(_0x549496['body'],null))[_0x2eaf('0x20')](respondWithResult(_0xfa1f59,null))[_0x2eaf('0x51')](handleError(_0xfa1f59,null));};exports[_0x2eaf('0x36')]=function(_0xa96dbe,_0x2d3337){return db[_0x2eaf('0x3c')][_0x2eaf('0x56')]({'where':{'id':_0xa96dbe[_0x2eaf('0x58')]['id']}})['then'](handleEntityNotFound(_0x2d3337,null))['then'](removeEntity(_0x2d3337,null))[_0x2eaf('0x51')](handleError(_0x2d3337,null));};exports[_0x2eaf('0x59')]=function(_0x33fac6,_0x1a2a2f){return db['WhatsappMessage']['describe']()[_0x2eaf('0x20')](respondWithResult(_0x1a2a2f,null))[_0x2eaf('0x51')](handleError(_0x1a2a2f,null));};var interaction_log=require(_0x2eaf('0x14'))(_0x2eaf('0x5a'));exports[_0x2eaf('0x5b')]=function(_0x376348,_0x2775da,_0x2e8414){var _0x1d88ae={'agent':{},'channel':_0x2eaf('0x5c')};if(_0x376348[_0x2eaf('0x57')]['id']){delete _0x376348[_0x2eaf('0x57')]['id'];}_0x376348[_0x2eaf('0x57')][_0x2eaf('0x5d')]=!![];_0x376348[_0x2eaf('0x57')][_0x2eaf('0x5e')]=moment()[_0x2eaf('0x5f')](_0x2eaf('0x60'));_0x376348[_0x2eaf('0x57')][_0x2eaf('0x61')]=_0x376348[_0x2eaf('0x57')][_0x2eaf('0x61')]||_0x376348[_0x2eaf('0x62')]['id'];_0x1d88ae[_0x2eaf('0x63')]['id']=_0x376348[_0x2eaf('0x57')][_0x2eaf('0x61')];return db[_0x2eaf('0x3c')][_0x2eaf('0x56')]({'where':{'id':_0x376348[_0x2eaf('0x58')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x2775da,null))[_0x2eaf('0x20')](saveUpdates(_0x376348[_0x2eaf('0x57')],null))['then'](function(_0x304614){if(_0x304614){_0x1d88ae[_0x2eaf('0x29')]=_0x304614[_0x2eaf('0x64')]({'plain':!![]});return db[_0x2eaf('0x65')][_0x2eaf('0x56')]({'where':{'id':_0x304614[_0x2eaf('0x66')]}});}return null;})['then'](handleEntityNotFound(_0x2775da,null))[_0x2eaf('0x20')](function(_0x178b78){if(_0x178b78){return _0x178b78[_0x2eaf('0x35')]({'UserId':_0x376348[_0x2eaf('0x57')][_0x2eaf('0x61')],'read1stAt':_[_0x2eaf('0x67')](_0x178b78['read1stAt'])?moment()['format'](_0x2eaf('0x60')):undefined});}return null;})['then'](function(_0xcfabe9){if(_0xcfabe9){_0x1d88ae[_0x2eaf('0x68')]=_0xcfabe9[_0x2eaf('0x64')]({'plain':!![]});interaction_log[_0x2eaf('0x21')](_0x2eaf('0x69'),_0x376348[_0x2eaf('0x62')]['id'],_0x376348[_0x2eaf('0x62')]['name'],_0x376348[_0x2eaf('0x62')][_0x2eaf('0x6a')],_0x1d88ae[_0x2eaf('0x68')]['id'],_0x376348['body']?JSON[_0x2eaf('0x25')](_0x376348[_0x2eaf('0x57')]):_0x2eaf('0x6b'));return respondWithRpcPromise(_0x2eaf('0x6c'),_0x2eaf('0x6d'),_0x1d88ae);}return null;})[_0x2eaf('0x20')](function(_0x1088fa){var _0xb097a4=_0x2eaf('0x6e')+_0x1088fa[_0x2eaf('0x29')][_0x2eaf('0x6f')];return db[_0x2eaf('0x70')]['query'](_0xb097a4,{'type':db[_0x2eaf('0x71')]['QueryTypes']['SELECT'],'raw':!![]})[_0x2eaf('0x20')](function(_0x224483){return _0x224483;});})[_0x2eaf('0x20')](function(_0x1f2a4b){if(_0x1f2a4b){_0x1d88ae['message'][_0x2eaf('0x72')]=_0x1f2a4b[0x0];if(!_0x376348[_0x2eaf('0x57')][_0x2eaf('0x61')])return;return db[_0x2eaf('0x73')]['find']({'where':{'id':_0x376348['body'][_0x2eaf('0x61')],'role':_0x2eaf('0x63')},'attributes':['id','name',_0x2eaf('0x74'),'email',_0x2eaf('0x75')],'raw':!![]});}return null;})[_0x2eaf('0x20')](function(_0x26602e){if(!_0x26602e)return null;_0x1d88ae['message'][_0x2eaf('0x63')]=_0x26602e;return _0x1d88ae;})[_0x2eaf('0x20')](function(_0x42146b){if(_0x42146b){if(_0x376348['body']['manual']){_0x1d88ae[_0x2eaf('0x29')][_0x2eaf('0x76')]=util[_0x2eaf('0x5f')](_0x2eaf('0x77'),_0x376348[_0x2eaf('0x62')][_0x2eaf('0x39')]);_0x1d88ae[_0x2eaf('0x29')]['channel']=_0x1d88ae[_0x2eaf('0x78')];_0x1d88ae['message'][_0x2eaf('0x79')]=_0x1d88ae[_0x2eaf('0x78')];_0x1d88ae['message'][_0x2eaf('0x7a')]=_0x2eaf('0x5b');return respondWithRpcPromise(_0x2eaf('0x7b'),_0x2eaf('0x7b'),{'event':_0x2eaf('0x7c'),'message':_0x1d88ae[_0x2eaf('0x29')]},client9002)['then'](function(){return _0x1d88ae;});}return _0x1d88ae;}return null;})[_0x2eaf('0x20')](respondWithResult(_0x2775da,null))[_0x2eaf('0x51')](handleError(_0x2775da,null));};var interaction_log=require(_0x2eaf('0x14'))(_0x2eaf('0x5a'));exports[_0x2eaf('0x7d')]=function(_0x111a6f,_0xf6d121,_0x420bdb){var _0x12eae7={'agent':{},'channel':_0x2eaf('0x5c')};if(_0x111a6f[_0x2eaf('0x57')]['id']){delete _0x111a6f['body']['id'];}_0x111a6f[_0x2eaf('0x57')][_0x2eaf('0x61')]=_0x111a6f[_0x2eaf('0x57')][_0x2eaf('0x61')]||_0x111a6f[_0x2eaf('0x62')]['id'];_0x12eae7[_0x2eaf('0x63')]['id']=_0x111a6f[_0x2eaf('0x57')]['UserId'];return db['WhatsappMessage'][_0x2eaf('0x56')]({'where':{'id':_0x111a6f[_0x2eaf('0x58')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0xf6d121,null))[_0x2eaf('0x20')](function(_0x5b11d3){if(_0x5b11d3){_0x12eae7['message']=_0x5b11d3[_0x2eaf('0x64')]({'plain':!![]});return db[_0x2eaf('0x65')]['find']({'where':{'id':_0x5b11d3[_0x2eaf('0x66')]}});}return null;})['then'](handleEntityNotFound(_0xf6d121,null))[_0x2eaf('0x20')](function(_0x445a86){if(_0x445a86){_0x12eae7[_0x2eaf('0x68')]=_0x445a86[_0x2eaf('0x64')]({'plain':!![]});interaction_log[_0x2eaf('0x21')](_0x2eaf('0x7e'),_0x111a6f[_0x2eaf('0x62')]['id'],_0x111a6f[_0x2eaf('0x62')]['name'],_0x111a6f[_0x2eaf('0x62')][_0x2eaf('0x6a')],_0x12eae7['interaction']['id'],_0x111a6f[_0x2eaf('0x57')]?JSON['stringify'](_0x111a6f[_0x2eaf('0x57')]):_0x2eaf('0x6b'));return respondWithRpcPromise(_0x2eaf('0x7f'),'rejectMessage',_0x12eae7);}return null;})[_0x2eaf('0x20')](function(_0x4b176e){var _0xb0d176=_0x2eaf('0x6e')+_0x4b176e[_0x2eaf('0x29')]['ContactId'];return db[_0x2eaf('0x70')]['query'](_0xb0d176,{'type':db[_0x2eaf('0x71')][_0x2eaf('0x80')][_0x2eaf('0x81')],'raw':!![]})[_0x2eaf('0x20')](function(_0x20b27d){return _0x20b27d;});})[_0x2eaf('0x20')](function(_0xd0dd01){if(_0xd0dd01){_0x12eae7['message'][_0x2eaf('0x72')]=_0xd0dd01[0x0];if(!_0x111a6f[_0x2eaf('0x57')][_0x2eaf('0x61')])return;return db[_0x2eaf('0x73')]['find']({'where':{'id':_0x111a6f[_0x2eaf('0x57')][_0x2eaf('0x61')],'role':_0x2eaf('0x63')},'attributes':['id','name',_0x2eaf('0x74'),'email',_0x2eaf('0x75')],'raw':!![]});}return null;})[_0x2eaf('0x20')](function(_0x2e73b2){if(!_0x2e73b2)return null;_0x12eae7[_0x2eaf('0x29')][_0x2eaf('0x63')]=_0x2e73b2;return _0x12eae7;})[_0x2eaf('0x20')](function(_0x2c112a){if(_0x2c112a){_0x2c112a[_0x2eaf('0x29')][_0x2eaf('0x76')]=util[_0x2eaf('0x5f')](_0x2eaf('0x77'),_0x111a6f[_0x2eaf('0x62')]['name']);_0x2c112a[_0x2eaf('0x29')]['channel']=_0x12eae7[_0x2eaf('0x78')];_0x2c112a[_0x2eaf('0x29')][_0x2eaf('0x79')]=_0x12eae7['channel'];_0x2c112a[_0x2eaf('0x29')][_0x2eaf('0x7a')]='reject';respondWithRpcPromise(_0x2eaf('0x7b'),_0x2eaf('0x7b'),{'event':_0x2eaf('0x82'),'message':_0x2c112a[_0x2eaf('0x29')]},client9002);return _0x12eae7;}return null;})[_0x2eaf('0x20')](respondWithResult(_0xf6d121,null))[_0x2eaf('0x51')](handleError(_0xf6d121,null));};exports[_0x2eaf('0x2b')]=function(_0x10083d,_0x56fcc2,_0x314b7d){if(_0x10083d['body']['id']){delete _0x10083d[_0x2eaf('0x57')]['id'];}var _0x27d2d3;return db[_0x2eaf('0x3c')][_0x2eaf('0x56')]({'where':{'id':_0x10083d['params']['id']}})[_0x2eaf('0x20')](handleEntityNotFound(_0x56fcc2,null))[_0x2eaf('0x20')](function(_0x4f99fa){if(_0x4f99fa){_0x27d2d3=_0x4f99fa;return db[_0x2eaf('0x83')][_0x2eaf('0x56')]({'where':{'id':_0x4f99fa['WhatsappAccountId']}});}})[_0x2eaf('0x20')](handleEntityNotFound(_0x56fcc2,null))[_0x2eaf('0x20')](function(_0x20a644){if(_0x20a644){logger[_0x2eaf('0x23')](_0x2eaf('0x84'),'status',_0x2eaf('0x85'),_0x20a644['type'],util[_0x2eaf('0x86')](_0x10083d[_0x2eaf('0x57')],{'showHidden':![],'depth':null}));switch(_0x20a644[_0x2eaf('0x3f')]){case _0x2eaf('0x87'):if(_0x10083d[_0x2eaf('0x57')][_0x2eaf('0x88')]&&_0x10083d[_0x2eaf('0x57')][_0x2eaf('0x88')]===_0x27d2d3[_0x2eaf('0x89')]&&_0x10083d[_0x2eaf('0x57')][_0x2eaf('0x8a')]&&_0x10083d['body'][_0x2eaf('0x8a')]===_0x2eaf('0x5d')){return _0x27d2d3['update']({'read':!![]});}else{logger[_0x2eaf('0x26')](_0x2eaf('0x8b'),_0x2eaf('0x2b'),_0x2eaf('0x87'),util[_0x2eaf('0x86')](_0x10083d[_0x2eaf('0x57')],{'showHidden':![],'depth':null}));}break;}return _0x27d2d3;}})['then'](respondWithResult(_0x56fcc2,null))[_0x2eaf('0x51')](handleError(_0x56fcc2,null));};
\ No newline at end of file
index 7906e06..2a1b33c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x57f8=['emit','hook','exports','../../mysqldb','WhatsappMessage','setMaxListeners','save','update','remove'];(function(_0x343901,_0x2619c2){var _0x3e5c88=function(_0xdd6e20){while(--_0xdd6e20){_0x343901['push'](_0x343901['shift']());}};_0x3e5c88(++_0x2619c2);}(_0x57f8,0x198));var _0x857f=function(_0x2bfb31,_0xdd9aae){_0x2bfb31=_0x2bfb31-0x0;var _0x2b00ce=_0x57f8[_0x2bfb31];return _0x2b00ce;};'use strict';var EventEmitter=require('events');var WhatsappMessage=require(_0x857f('0x0'))['db'][_0x857f('0x1')];var WhatsappMessageEvents=new EventEmitter();WhatsappMessageEvents[_0x857f('0x2')](0x0);var events={'afterCreate':_0x857f('0x3'),'afterUpdate':_0x857f('0x4'),'afterDestroy':_0x857f('0x5')};function emitEvent(_0x2ff336){return function(_0x6f054b,_0x318050,_0xced48e){WhatsappMessageEvents[_0x857f('0x6')](_0x2ff336+':'+_0x6f054b['id'],_0x6f054b);WhatsappMessageEvents[_0x857f('0x6')](_0x2ff336,_0x6f054b);_0xced48e(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];WhatsappMessage[_0x857f('0x7')](e,emitEvent(event));}}module[_0x857f('0x8')]=WhatsappMessageEvents;
\ No newline at end of file
+var _0x6e6c=['../../mysqldb','setMaxListeners','save','emit','hook','exports','events'];(function(_0x5d728a,_0x241ba5){var _0x1ebb5c=function(_0x4615d0){while(--_0x4615d0){_0x5d728a['push'](_0x5d728a['shift']());}};_0x1ebb5c(++_0x241ba5);}(_0x6e6c,0xc3));var _0xc6e6=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x6e6c[_0x14add3];return _0x4a174f;};'use strict';var EventEmitter=require(_0xc6e6('0x0'));var WhatsappMessage=require(_0xc6e6('0x1'))['db']['WhatsappMessage'];var WhatsappMessageEvents=new EventEmitter();WhatsappMessageEvents[_0xc6e6('0x2')](0x0);var events={'afterCreate':_0xc6e6('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x2e97f5){return function(_0x5a9e2b,_0x40b7e1,_0x4b13f0){WhatsappMessageEvents[_0xc6e6('0x4')](_0x2e97f5+':'+_0x5a9e2b['id'],_0x5a9e2b);WhatsappMessageEvents[_0xc6e6('0x4')](_0x2e97f5,_0x5a9e2b);_0x4b13f0(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];WhatsappMessage[_0xc6e6('0x5')](e,emitEvent(event));}}module[_0xc6e6('0x6')]=WhatsappMessageEvents;
\ No newline at end of file
index 9a23619..96dda50 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb021=['application/json','statuses','message_id','err','WhatsappMessage,\x20%s','finally','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','node-fetch','path','rimraf','../../config/environment','./whatsappMessage.attributes','exports','define','messageId','fti_whatsapp_messages','models','get','direction','toLowerCase','secret','isNil','UserId','WhatsappInteraction','WhatsappInteractionId','then','update','createdAt','catch','error','out','WhatsappAccount','find','type','twilio','accountSid','authToken','create','body','whatsapp:','phone','remote','/api/whatsapp/messages/','token','sid','WhatsappMessage,\x20%s,\x20%s,\x20%s','afterCreate','inspect','baseUrl','POST'];(function(_0x5672c5,_0x209143){var _0x382ddf=function(_0x108f7c){while(--_0x108f7c){_0x5672c5['push'](_0x5672c5['shift']());}};_0x382ddf(++_0x209143);}(_0xb021,0xec));var _0x1b02=function(_0x31c5e9,_0x30e373){_0x31c5e9=_0x31c5e9-0x0;var _0x517a8d=_0xb021[_0x31c5e9];return _0x517a8d;};'use strict';var _=require(_0x1b02('0x0'));var util=require(_0x1b02('0x1'));var logger=require(_0x1b02('0x2'))(_0x1b02('0x3'));var moment=require(_0x1b02('0x4'));var BPromise=require(_0x1b02('0x5'));var rp=require('request-promise');var fetch=require(_0x1b02('0x6'));var fs=require('fs');var path=require(_0x1b02('0x7'));var rimraf=require(_0x1b02('0x8'));var config=require(_0x1b02('0x9'));var attributes=require(_0x1b02('0xa'));module[_0x1b02('0xb')]=function(_0x2661ff,_0x416b32){return _0x2661ff[_0x1b02('0xc')]('WhatsappMessage',attributes,{'tableName':'whatsapp_messages','paranoid':![],'indexes':[{'name':_0x1b02('0xd'),'fields':[_0x1b02('0xd')]},{'name':_0x1b02('0xe'),'fields':['body'],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'afterCreate':function(_0x2b14b1,_0xecc589,_0x23bbff){var _0x528777=_0x2661ff[_0x1b02('0xf')];var _0x1f7ecf=_0x2b14b1[_0x1b02('0x10')]({'plain':!![]});if(_0x1f7ecf[_0x1b02('0x11')][_0x1b02('0x12')]()==='in'||_0x1f7ecf[_0x1b02('0x11')]['toLowerCase']()==='out'&&!_0x1f7ecf[_0x1b02('0x13')]&&!_[_0x1b02('0x14')](_0x1f7ecf[_0x1b02('0x15')])){_0x528777[_0x1b02('0x16')]['findOne']({'where':{'id':_0x1f7ecf[_0x1b02('0x17')]}})[_0x1b02('0x18')](function(_0x2bc146){if(_0x2bc146){_0x2bc146[_0x1b02('0x19')]({'lastMsgAt':_0x1f7ecf[_0x1b02('0x1a')],'lastMsgDirection':_0x1f7ecf[_0x1b02('0x11')][_0x1b02('0x12')]()});}})[_0x1b02('0x1b')](function(_0x5b9214){console[_0x1b02('0x1c')](_0x5b9214);});}if(_0x1f7ecf[_0x1b02('0x11')]===_0x1b02('0x1d')&&!_0x1f7ecf[_0x1b02('0x13')]){var _0x2cf085;_0x528777[_0x1b02('0x1e')][_0x1b02('0x1f')]({'where':{'id':_0x1f7ecf['WhatsappAccountId']},'raw':!![]})[_0x1b02('0x18')](function(_0x560604){_0x2cf085=_0x560604;if(_0x2cf085&&_0x2cf085['type']){switch(_0x2cf085[_0x1b02('0x20')]){case _0x1b02('0x21'):var _0x1036e6=require(_0x1b02('0x21'));if(_0x2cf085[_0x1b02('0x22')]&&_0x2cf085['authToken']&&_0x2cf085['phone']){var _0x1b8eab=new _0x1036e6(_0x2cf085[_0x1b02('0x22')],_0x2cf085[_0x1b02('0x23')]);_0x1b8eab['messages'][_0x1b02('0x24')]({'body':_0x1f7ecf[_0x1b02('0x25')],'to':_0x1b02('0x26')+_0x1f7ecf[_0x1b02('0x27')],'from':'whatsapp:'+_0x2cf085['phone'],'statusCallback':_0x2cf085[_0x1b02('0x28')]+_0x1b02('0x29')+_0x1f7ecf['id']+'/status?token='+_0x2cf085[_0x1b02('0x2a')]})[_0x1b02('0x18')](function(_0x3a60a2){if(_0x3a60a2[_0x1b02('0x2b')]){return _0x2b14b1['update']({'messageId':_0x3a60a2['sid']});}})[_0x1b02('0x1b')](function(_0x424fc8){logger[_0x1b02('0x1c')](_0x1b02('0x2c'),_0x1b02('0x2d'),_0x1b02('0x21'),util[_0x1b02('0x2e')](_0x424fc8,{'showHidden':![],'depth':null}));});}else{logger['error'](_0x1b02('0x2c'),_0x1b02('0x2d'),_0x1b02('0x21'),'Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken');}break;case'sinch':var _0x4300f8=_0x2cf085[_0x1b02('0x22')];var _0x42a6e6=_0x2cf085[_0x1b02('0x23')];var _0x5cf596=_0x2cf085[_0x1b02('0x2f')]+'/whatsapp/v1/'+_0x4300f8+'/messages/';var _0x35c03e={'to':[_0x1f7ecf[_0x1b02('0x27')]],'message':{'type':'text','text':_0x1f7ecf[_0x1b02('0x25')]}};var _0x405c8b={'method':_0x1b02('0x30'),'uri':_0x5cf596,'headers':{'Authorization':'Bearer\x20'+_0x42a6e6,'Content-Type':_0x1b02('0x31')},'body':_0x35c03e,'json':!![]};rp(_0x405c8b)[_0x1b02('0x18')](function(_0x36d9a5){if(_0x36d9a5[_0x1b02('0x32')][0x0][_0x1b02('0x33')]){return _0x2b14b1['update']({'messageId':_0x36d9a5[_0x1b02('0x32')][0x0]['message_id']});}})['catch'](function(_0x51fc4a){logger[_0x1b02('0x34')](_0x1b02('0x35'),_0x51fc4a);});break;}}})[_0x1b02('0x36')](function(){_0x23bbff();});}else{_0x23bbff();}}},'charset':_0x1b02('0x37'),'collate':_0x1b02('0x38')});};
\ No newline at end of file
+var _0x0233=['sid','WhatsappMessage,\x20%s,\x20%s,\x20%s','afterCreate','Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken','sinch','accountSid','baseUrl','/messages/','text','POST','Bearer\x20','then','statuses','message_id','update','err','WhatsappMessage,\x20%s','finally','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','request-promise','node-fetch','path','rimraf','./whatsappMessage.attributes','exports','define','WhatsappMessage','whatsapp_messages','messageId','fti_whatsapp_messages','toLowerCase','direction','out','secret','isNil','UserId','findOne','createdAt','catch','error','find','WhatsappAccountId','type','twilio','phone','authToken','messages','create','body','whatsapp:','remote','/api/whatsapp/messages/','/status?token=','token'];(function(_0x1f2cba,_0x32c613){var _0x5bfbcb=function(_0x3d14fa){while(--_0x3d14fa){_0x1f2cba['push'](_0x1f2cba['shift']());}};_0x5bfbcb(++_0x32c613);}(_0x0233,0x1b0));var _0x3023=function(_0x4a53d,_0x58a95e){_0x4a53d=_0x4a53d-0x0;var _0x27410e=_0x0233[_0x4a53d];return _0x27410e;};'use strict';var _=require(_0x3023('0x0'));var util=require(_0x3023('0x1'));var logger=require(_0x3023('0x2'))(_0x3023('0x3'));var moment=require(_0x3023('0x4'));var BPromise=require('bluebird');var rp=require(_0x3023('0x5'));var fetch=require(_0x3023('0x6'));var fs=require('fs');var path=require(_0x3023('0x7'));var rimraf=require(_0x3023('0x8'));var config=require('../../config/environment');var attributes=require(_0x3023('0x9'));module[_0x3023('0xa')]=function(_0x19ec57,_0x4623ea){return _0x19ec57[_0x3023('0xb')](_0x3023('0xc'),attributes,{'tableName':_0x3023('0xd'),'paranoid':![],'indexes':[{'name':_0x3023('0xe'),'fields':['messageId']},{'name':_0x3023('0xf'),'fields':['body'],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'afterCreate':function(_0xa78079,_0x1452ce,_0x16b0a1){var _0xb57882=_0x19ec57['models'];var _0x13dc3f=_0xa78079['get']({'plain':!![]});if(_0x13dc3f['direction'][_0x3023('0x10')]()==='in'||_0x13dc3f[_0x3023('0x11')][_0x3023('0x10')]()===_0x3023('0x12')&&!_0x13dc3f[_0x3023('0x13')]&&!_[_0x3023('0x14')](_0x13dc3f[_0x3023('0x15')])){_0xb57882['WhatsappInteraction'][_0x3023('0x16')]({'where':{'id':_0x13dc3f['WhatsappInteractionId']}})['then'](function(_0xf7934d){if(_0xf7934d){_0xf7934d['update']({'lastMsgAt':_0x13dc3f[_0x3023('0x17')],'lastMsgDirection':_0x13dc3f[_0x3023('0x11')][_0x3023('0x10')]()});}})[_0x3023('0x18')](function(_0x19fbdf){console[_0x3023('0x19')](_0x19fbdf);});}if(_0x13dc3f[_0x3023('0x11')]===_0x3023('0x12')&&!_0x13dc3f['secret']){var _0x3dfa3a;_0xb57882['WhatsappAccount'][_0x3023('0x1a')]({'where':{'id':_0x13dc3f[_0x3023('0x1b')]},'raw':!![]})['then'](function(_0x3cbde7){_0x3dfa3a=_0x3cbde7;if(_0x3dfa3a&&_0x3dfa3a[_0x3023('0x1c')]){switch(_0x3dfa3a['type']){case _0x3023('0x1d'):var _0xab05d8=require(_0x3023('0x1d'));if(_0x3dfa3a['accountSid']&&_0x3dfa3a['authToken']&&_0x3dfa3a[_0x3023('0x1e')]){var _0x2857d6=new _0xab05d8(_0x3dfa3a['accountSid'],_0x3dfa3a[_0x3023('0x1f')]);_0x2857d6[_0x3023('0x20')][_0x3023('0x21')]({'body':_0x13dc3f[_0x3023('0x22')],'to':_0x3023('0x23')+_0x13dc3f['phone'],'from':'whatsapp:'+_0x3dfa3a[_0x3023('0x1e')],'statusCallback':_0x3dfa3a[_0x3023('0x24')]+_0x3023('0x25')+_0x13dc3f['id']+_0x3023('0x26')+_0x3dfa3a[_0x3023('0x27')]})['then'](function(_0x1b5e73){if(_0x1b5e73[_0x3023('0x28')]){return _0xa78079['update']({'messageId':_0x1b5e73['sid']});}})[_0x3023('0x18')](function(_0x4a720c){logger[_0x3023('0x19')](_0x3023('0x29'),_0x3023('0x2a'),_0x3023('0x1d'),util['inspect'](_0x4a720c,{'showHidden':![],'depth':null}));});}else{logger[_0x3023('0x19')](_0x3023('0x29'),_0x3023('0x2a'),'twilio',_0x3023('0x2b'));}break;case _0x3023('0x2c'):var _0x4817b8=_0x3dfa3a[_0x3023('0x2d')];var _0x186aed=_0x3dfa3a[_0x3023('0x1f')];var _0x2cf3fa=_0x3dfa3a[_0x3023('0x2e')]+'/whatsapp/v1/'+_0x4817b8+_0x3023('0x2f');var _0x549026={'to':[_0x13dc3f['phone']],'message':{'type':_0x3023('0x30'),'text':_0x13dc3f[_0x3023('0x22')]}};var _0x185d04={'method':_0x3023('0x31'),'uri':_0x2cf3fa,'headers':{'Authorization':_0x3023('0x32')+_0x186aed,'Content-Type':'application/json'},'body':_0x549026,'json':!![]};rp(_0x185d04)[_0x3023('0x33')](function(_0x16e5f3){if(_0x16e5f3[_0x3023('0x34')][0x0][_0x3023('0x35')]){return _0xa78079[_0x3023('0x36')]({'messageId':_0x16e5f3['statuses'][0x0][_0x3023('0x35')]});}})[_0x3023('0x18')](function(_0x1d50d0){logger[_0x3023('0x37')](_0x3023('0x38'),_0x1d50d0);});break;}}})[_0x3023('0x39')](function(){_0x16b0a1();});}else{_0x16b0a1();}}},'charset':'utf8mb4','collate':_0x3023('0x3a')});};
\ No newline at end of file
index 511515a..efa79cb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1a8f=['../../config/logger','rpc','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','./whatsappMessage.socket','request','then','WhatsappMessage,\x20%s,\x20%s','request\x20sent','debug','WhatsappMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','CreateWhatsappMessage','WhatsappMessage','create','options','raw','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x3f87ce,_0x4abd6c){var _0x8d7035=function(_0x5aa071){while(--_0x5aa071){_0x3f87ce['push'](_0x3f87ce['shift']());}};_0x8d7035(++_0x4abd6c);}(_0x1a8f,0x1a8));var _0xf1a8=function(_0x5a1cf3,_0x161eca){_0x5a1cf3=_0x5a1cf3-0x0;var _0x24d3cc=_0x1a8f[_0x5a1cf3];return _0x24d3cc;};'use strict';var _=require(_0xf1a8('0x0'));var util=require(_0xf1a8('0x1'));var moment=require(_0xf1a8('0x2'));var BPromise=require(_0xf1a8('0x3'));var rs=require(_0xf1a8('0x4'));var fs=require('fs');var Redis=require(_0xf1a8('0x5'));var db=require(_0xf1a8('0x6'))['db'];var utils=require(_0xf1a8('0x7'));var logger=require(_0xf1a8('0x8'))(_0xf1a8('0x9'));var config=require(_0xf1a8('0xa'));var jayson=require('jayson/promise');var client=jayson[_0xf1a8('0xb')][_0xf1a8('0xc')]({'port':0x232a});config[_0xf1a8('0xd')]=_[_0xf1a8('0xe')](config[_0xf1a8('0xd')],{'host':_0xf1a8('0xf'),'port':0x18eb});var socket=require(_0xf1a8('0x10'))(new Redis(config[_0xf1a8('0xd')]));require(_0xf1a8('0x11'))['register'](socket);function respondWithRpcPromise(_0x4d6714,_0x4740db,_0x1e6223){return new BPromise(function(_0x3ece3f,_0x48c9ea){return client[_0xf1a8('0x12')](_0x4d6714,_0x1e6223)[_0xf1a8('0x13')](function(_0x1f81e3){logger['info'](_0xf1a8('0x14'),_0x4740db,_0xf1a8('0x15'));logger[_0xf1a8('0x16')](_0xf1a8('0x17'),_0x4740db,_0xf1a8('0x15'),JSON[_0xf1a8('0x18')](_0x1f81e3));if(_0x1f81e3[_0xf1a8('0x19')]){if(_0x1f81e3[_0xf1a8('0x19')][_0xf1a8('0x1a')]===0x1f4){logger['error'](_0xf1a8('0x14'),_0x4740db,_0x1f81e3['error'][_0xf1a8('0x1b')]);return _0x48c9ea(_0x1f81e3[_0xf1a8('0x19')][_0xf1a8('0x1b')]);}logger['error'](_0xf1a8('0x14'),_0x4740db,_0x1f81e3[_0xf1a8('0x19')][_0xf1a8('0x1b')]);return _0x3ece3f(_0x1f81e3[_0xf1a8('0x19')][_0xf1a8('0x1b')]);}else{logger[_0xf1a8('0x1c')](_0xf1a8('0x14'),_0x4740db,_0xf1a8('0x15'));_0x3ece3f(_0x1f81e3[_0xf1a8('0x1d')][_0xf1a8('0x1b')]);}})[_0xf1a8('0x1e')](function(_0x2f83e3){logger[_0xf1a8('0x19')](_0xf1a8('0x14'),_0x4740db,_0x2f83e3);_0x48c9ea(_0x2f83e3);});});}exports[_0xf1a8('0x1f')]=function(_0x5218b1){var _0x37c2ba=this;return new Promise(function(_0x354ab2,_0x431e62){return db[_0xf1a8('0x20')][_0xf1a8('0x21')](_0x5218b1['body'],{'raw':_0x5218b1[_0xf1a8('0x22')]?_0x5218b1['options'][_0xf1a8('0x23')]===undefined?!![]:![]:!![]})[_0xf1a8('0x13')](function(_0x221d1f){logger[_0xf1a8('0x1c')](_0xf1a8('0x1f'),_0x5218b1);logger['debug'](_0xf1a8('0x1f'),_0x5218b1,JSON[_0xf1a8('0x18')](_0x221d1f));_0x354ab2(_0x221d1f);})[_0xf1a8('0x1e')](function(_0x4c2c15){logger[_0xf1a8('0x19')](_0xf1a8('0x1f'),_0x4c2c15['message'],_0x5218b1);_0x431e62(_0x37c2ba['error'](0x1f4,_0x4c2c15[_0xf1a8('0x1b')]));});});};
\ No newline at end of file
+var _0x62a6=['localhost','socket.io-emitter','./whatsappMessage.socket','register','request','then','WhatsappMessage,\x20%s,\x20%s','request\x20sent','WhatsappMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','info','catch','CreateWhatsappMessage','WhatsappMessage','create','options','debug','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','http','redis','defaults'];(function(_0x50f392,_0x1d8441){var _0x5926f2=function(_0x17df32){while(--_0x17df32){_0x50f392['push'](_0x50f392['shift']());}};_0x5926f2(++_0x1d8441);}(_0x62a6,0x12a));var _0x662a=function(_0x1035c1,_0x2d8583){_0x1035c1=_0x1035c1-0x0;var _0x308d67=_0x62a6[_0x1035c1];return _0x308d67;};'use strict';var _=require(_0x662a('0x0'));var util=require(_0x662a('0x1'));var moment=require(_0x662a('0x2'));var BPromise=require(_0x662a('0x3'));var rs=require(_0x662a('0x4'));var fs=require('fs');var Redis=require(_0x662a('0x5'));var db=require(_0x662a('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x662a('0x7'))(_0x662a('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0x662a('0x9')]({'port':0x232a});config[_0x662a('0xa')]=_[_0x662a('0xb')](config[_0x662a('0xa')],{'host':_0x662a('0xc'),'port':0x18eb});var socket=require(_0x662a('0xd'))(new Redis(config[_0x662a('0xa')]));require(_0x662a('0xe'))[_0x662a('0xf')](socket);function respondWithRpcPromise(_0x574f50,_0x3db5c6,_0x541919){return new BPromise(function(_0x37b17c,_0x42b2c6){return client[_0x662a('0x10')](_0x574f50,_0x541919)[_0x662a('0x11')](function(_0x52f206){logger['info'](_0x662a('0x12'),_0x3db5c6,_0x662a('0x13'));logger['debug'](_0x662a('0x14'),_0x3db5c6,_0x662a('0x13'),JSON[_0x662a('0x15')](_0x52f206));if(_0x52f206[_0x662a('0x16')]){if(_0x52f206[_0x662a('0x16')]['code']===0x1f4){logger['error'](_0x662a('0x12'),_0x3db5c6,_0x52f206[_0x662a('0x16')][_0x662a('0x17')]);return _0x42b2c6(_0x52f206['error']['message']);}logger['error'](_0x662a('0x12'),_0x3db5c6,_0x52f206[_0x662a('0x16')][_0x662a('0x17')]);return _0x37b17c(_0x52f206[_0x662a('0x16')][_0x662a('0x17')]);}else{logger[_0x662a('0x18')](_0x662a('0x12'),_0x3db5c6,_0x662a('0x13'));_0x37b17c(_0x52f206['result'][_0x662a('0x17')]);}})[_0x662a('0x19')](function(_0x83ec1c){logger[_0x662a('0x16')](_0x662a('0x12'),_0x3db5c6,_0x83ec1c);_0x42b2c6(_0x83ec1c);});});}exports[_0x662a('0x1a')]=function(_0x542eb6){var _0x281aba=this;return new Promise(function(_0x1bf79f,_0x55575a){return db[_0x662a('0x1b')][_0x662a('0x1c')](_0x542eb6['body'],{'raw':_0x542eb6[_0x662a('0x1d')]?_0x542eb6[_0x662a('0x1d')]['raw']===undefined?!![]:![]:!![]})[_0x662a('0x11')](function(_0x24e92f){logger[_0x662a('0x18')](_0x662a('0x1a'),_0x542eb6);logger[_0x662a('0x1e')](_0x662a('0x1a'),_0x542eb6,JSON['stringify'](_0x24e92f));_0x1bf79f(_0x24e92f);})[_0x662a('0x19')](function(_0x1c687a){logger[_0x662a('0x16')](_0x662a('0x1a'),_0x1c687a[_0x662a('0x17')],_0x542eb6);_0x55575a(_0x281aba['error'](0x1f4,_0x1c687a[_0x662a('0x17')]));});});};
\ No newline at end of file
index 944f900..c3e6586 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5486=['whatsappMessage:','save','update','emit','register','length'];(function(_0x17f716,_0x4a06c7){var _0x31f0de=function(_0x5476e4){while(--_0x5476e4){_0x17f716['push'](_0x17f716['shift']());}};_0x31f0de(++_0x4a06c7);}(_0x5486,0x1e7));var _0x6548=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x5486[_0x14add3];return _0x4a174f;};'use strict';var WhatsappMessageEvents=require('./whatsappMessage.events');var events=[_0x6548('0x0'),'remove',_0x6548('0x1')];function createListener(_0x58dad7,_0x4b1314){return function(_0x9a900f){_0x4b1314[_0x6548('0x2')](_0x58dad7,_0x9a900f);};}function removeListener(_0x35ffef,_0x1a7032){return function(){WhatsappMessageEvents['removeListener'](_0x35ffef,_0x1a7032);};}exports[_0x6548('0x3')]=function(_0x6a19fc){for(var _0x5c6e41=0x0,_0x40a186=events[_0x6548('0x4')];_0x5c6e41<_0x40a186;_0x5c6e41++){var _0x543401=events[_0x5c6e41];var _0x54b7b9=createListener(_0x6548('0x5')+_0x543401,_0x6a19fc);WhatsappMessageEvents['on'](_0x543401,_0x54b7b9);}};
\ No newline at end of file
+var _0x9128=['./whatsappMessage.events','save','emit','register','whatsappMessage:'];(function(_0x525264,_0x4eafd3){var _0x550ed1=function(_0x418644){while(--_0x418644){_0x525264['push'](_0x525264['shift']());}};_0x550ed1(++_0x4eafd3);}(_0x9128,0x1bd));var _0x8912=function(_0x234577,_0x3b9004){_0x234577=_0x234577-0x0;var _0x28fea6=_0x9128[_0x234577];return _0x28fea6;};'use strict';var WhatsappMessageEvents=require(_0x8912('0x0'));var events=[_0x8912('0x1'),'remove','update'];function createListener(_0x10db42,_0x380de8){return function(_0x333777){_0x380de8[_0x8912('0x2')](_0x10db42,_0x333777);};}function removeListener(_0x81e07d,_0x380f17){return function(){WhatsappMessageEvents['removeListener'](_0x81e07d,_0x380f17);};}exports[_0x8912('0x3')]=function(_0x33710c){for(var _0x26d828=0x0,_0x596aba=events['length'];_0x26d828<_0x596aba;_0x26d828++){var _0x4fcec8=events[_0x26d828];var _0x1cb6d6=createListener(_0x8912('0x4')+_0x4fcec8,_0x33710c);WhatsappMessageEvents['on'](_0x4fcec8,_0x1cb6d6);}};
\ No newline at end of file
index aa0b817..a1b1e00 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x109b=['post','create','/:id/teams','addTeams','addAgents','put','/:id','update','delete','destroy','removeTeams','removeAgents','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./whatsappQueue.controller','get','isAuthenticated','index','/describe','describe','/:id/users','getAgents'];(function(_0x4812bd,_0x476c0e){var _0x36581c=function(_0x4330e9){while(--_0x4330e9){_0x4812bd['push'](_0x4812bd['shift']());}};_0x36581c(++_0x476c0e);}(_0x109b,0x175));var _0xb109=function(_0x48776a,_0x9af593){_0x48776a=_0x48776a-0x0;var _0x5d344b=_0x109b[_0x48776a];return _0x5d344b;};'use strict';var multer=require(_0xb109('0x0'));var util=require(_0xb109('0x1'));var path=require(_0xb109('0x2'));var timeout=require(_0xb109('0x3'));var express=require(_0xb109('0x4'));var router=express[_0xb109('0x5')]();var fs_extra=require(_0xb109('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0xb109('0x7'));var config=require(_0xb109('0x8'));var controller=require(_0xb109('0x9'));router[_0xb109('0xa')]('/',auth[_0xb109('0xb')](),controller[_0xb109('0xc')]);router['get'](_0xb109('0xd'),auth[_0xb109('0xb')](),controller[_0xb109('0xe')]);router[_0xb109('0xa')]('/:id',auth['isAuthenticated'](),controller['show']);router[_0xb109('0xa')]('/:id/members',auth['isAuthenticated'](),controller['getMembers']);router[_0xb109('0xa')]('/:id/teams',auth['isAuthenticated'](),controller['getTeams']);router[_0xb109('0xa')](_0xb109('0xf'),auth['isAuthenticated'](),controller[_0xb109('0x10')]);router[_0xb109('0x11')]('/',auth[_0xb109('0xb')](),controller[_0xb109('0x12')]);router[_0xb109('0x11')](_0xb109('0x13'),auth[_0xb109('0xb')](),controller[_0xb109('0x14')]);router[_0xb109('0x11')](_0xb109('0xf'),auth[_0xb109('0xb')](),controller[_0xb109('0x15')]);router[_0xb109('0x16')](_0xb109('0x17'),auth[_0xb109('0xb')](),controller[_0xb109('0x18')]);router[_0xb109('0x19')](_0xb109('0x17'),auth[_0xb109('0xb')](),controller[_0xb109('0x1a')]);router[_0xb109('0x19')]('/:id/teams',auth['isAuthenticated'](),controller[_0xb109('0x1b')]);router[_0xb109('0x19')](_0xb109('0xf'),auth['isAuthenticated'](),controller[_0xb109('0x1c')]);module[_0xb109('0x1d')]=router;
\ No newline at end of file
+var _0xf9fd=['/:id/members','getMembers','/:id/teams','/:id/users','getAgents','post','create','addTeams','addAgents','put','/:id','update','delete','destroy','removeTeams','removeAgents','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./whatsappQueue.controller','get','isAuthenticated','index','/describe','describe'];(function(_0x3b21f7,_0x278ae8){var _0x39b0da=function(_0x206036){while(--_0x206036){_0x3b21f7['push'](_0x3b21f7['shift']());}};_0x39b0da(++_0x278ae8);}(_0xf9fd,0x131));var _0xdf9f=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xf9fd[_0x14add3];return _0x4a174f;};'use strict';var multer=require(_0xdf9f('0x0'));var util=require(_0xdf9f('0x1'));var path=require(_0xdf9f('0x2'));var timeout=require(_0xdf9f('0x3'));var express=require(_0xdf9f('0x4'));var router=express[_0xdf9f('0x5')]();var fs_extra=require(_0xdf9f('0x6'));var auth=require(_0xdf9f('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0xdf9f('0x8'));var controller=require(_0xdf9f('0x9'));router[_0xdf9f('0xa')]('/',auth[_0xdf9f('0xb')](),controller[_0xdf9f('0xc')]);router['get'](_0xdf9f('0xd'),auth[_0xdf9f('0xb')](),controller[_0xdf9f('0xe')]);router[_0xdf9f('0xa')]('/:id',auth[_0xdf9f('0xb')](),controller['show']);router['get'](_0xdf9f('0xf'),auth[_0xdf9f('0xb')](),controller[_0xdf9f('0x10')]);router[_0xdf9f('0xa')](_0xdf9f('0x11'),auth['isAuthenticated'](),controller['getTeams']);router[_0xdf9f('0xa')](_0xdf9f('0x12'),auth['isAuthenticated'](),controller[_0xdf9f('0x13')]);router[_0xdf9f('0x14')]('/',auth[_0xdf9f('0xb')](),controller[_0xdf9f('0x15')]);router[_0xdf9f('0x14')](_0xdf9f('0x11'),auth[_0xdf9f('0xb')](),controller[_0xdf9f('0x16')]);router[_0xdf9f('0x14')]('/:id/users',auth[_0xdf9f('0xb')](),controller[_0xdf9f('0x17')]);router[_0xdf9f('0x18')](_0xdf9f('0x19'),auth['isAuthenticated'](),controller[_0xdf9f('0x1a')]);router[_0xdf9f('0x1b')](_0xdf9f('0x19'),auth[_0xdf9f('0xb')](),controller[_0xdf9f('0x1c')]);router[_0xdf9f('0x1b')](_0xdf9f('0x11'),auth[_0xdf9f('0xb')](),controller[_0xdf9f('0x1d')]);router[_0xdf9f('0x1b')](_0xdf9f('0x12'),auth[_0xdf9f('0xb')](),controller[_0xdf9f('0x1e')]);module[_0xdf9f('0x1f')]=router;
\ No newline at end of file
index 3ea9e4c..7fd0b93 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb43b=['STRING','name','INTEGER','ENUM','rrmemory','beepall','roundrobin','sequelize'];(function(_0x5076e9,_0x22454a){var _0x2a0de1=function(_0x5b6895){while(--_0x5b6895){_0x5076e9['push'](_0x5076e9['shift']());}};_0x2a0de1(++_0x22454a);}(_0xb43b,0xbf));var _0xbb43=function(_0x270e0d,_0x331d1f){_0x270e0d=_0x270e0d-0x0;var _0x364dd2=_0xb43b[_0x270e0d];return _0x364dd2;};'use strict';var Sequelize=require(_0xbb43('0x0'));module['exports']={'name':{'type':Sequelize[_0xbb43('0x1')],'unique':_0xbb43('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'timeout':{'type':Sequelize[_0xbb43('0x3')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0xbb43('0x4')](_0xbb43('0x5'),_0xbb43('0x6'),_0xbb43('0x7'))},'description':{'type':Sequelize[_0xbb43('0x1')]}};
\ No newline at end of file
+var _0x85b5=['ENUM','roundrobin','sequelize','exports','name'];(function(_0x5678b5,_0x1c4aa8){var _0x4c09a5=function(_0x2aa89a){while(--_0x2aa89a){_0x5678b5['push'](_0x5678b5['shift']());}};_0x4c09a5(++_0x1c4aa8);}(_0x85b5,0x7f));var _0x585b=function(_0x13d1b0,_0x21ce77){_0x13d1b0=_0x13d1b0-0x0;var _0x3c8971=_0x85b5[_0x13d1b0];return _0x3c8971;};'use strict';var Sequelize=require(_0x585b('0x0'));module[_0x585b('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x585b('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x585b('0x3')]('rrmemory','beepall',_0x585b('0x4'))},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
index 8f1ebdc..8141230 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfd3b=['addAgents','spread','userWhatsappQueue:save','isArray','getAgents','bluebird','util','lodash','squel','ioredis','../../components/parsers/qs','../../config/logger','api','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./whatsappQueue.socket','register','sendStatus','end','status','offset','undefined','limit','count','update','then','destroy','get','WhatsappQueues','UserProfileResource','error','send','index','map','WhatsappQueue','rawAttributes','key','getOptions','where','include','query','findAll','catch','params','model','keys','intersection','attributes','fields','includeAll','options','find','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','userProfileId','name','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','getMembers','findOne','UserWhatsappQueue','filters','length','hasOwnProperty','nolimit','order','sort','pick','merge','filter','User','findAndCountAll','agent','createdAt','rows','format','%s/%s','SIP','whatsappPause','updatedAt','Team','getTeams','addTeams','Agents','online','voicePause','interface','flatMap','sequelize','transaction','removeTeams','ids','select','field','tq.TeamId','team_has_whatsapp_queues','join','ut.TeamId\x20=\x20tq.TeamId','clone','ut.UserId\x20=\x20?','toString','QueryTypes','SELECT','every','TeamId','includes','union','compact','value','isEmpty','removeAgents','forEach','emit','userWhatsappQueue:remove'];(function(_0x29b17e,_0x45fac6){var _0x3452e9=function(_0x3050a2){while(--_0x3050a2){_0x29b17e['push'](_0x29b17e['shift']());}};_0x3452e9(++_0x45fac6);}(_0xfd3b,0x170));var _0xbfd3=function(_0x3a7261,_0x3ee28e){_0x3a7261=_0x3a7261-0x0;var _0x3fdf33=_0xfd3b[_0x3a7261];return _0x3fdf33;};'use strict';var BPromise=require(_0xbfd3('0x0'));var util=require(_0xbfd3('0x1'));var _=require(_0xbfd3('0x2'));var squel=require(_0xbfd3('0x3'));var Redis=require(_0xbfd3('0x4'));var qs=require(_0xbfd3('0x5'));var logger=require(_0xbfd3('0x6'))(_0xbfd3('0x7'));var config=require('../../config/environment');var db=require(_0xbfd3('0x8'))['db'];config[_0xbfd3('0x9')]=_[_0xbfd3('0xa')](config[_0xbfd3('0x9')],{'host':_0xbfd3('0xb'),'port':0x18eb});var socket=require(_0xbfd3('0xc'))(new Redis(config['redis']));require(_0xbfd3('0xd'))[_0xbfd3('0xe')](socket);function respondWithStatusCode(_0x3b8fd5,_0x520d0e){_0x520d0e=_0x520d0e||0xcc;return function(_0x59810b){if(_0x59810b){return _0x3b8fd5[_0xbfd3('0xf')](_0x520d0e);}return _0x3b8fd5['status'](_0x520d0e)[_0xbfd3('0x10')]();};}function respondWithResult(_0x2f3ef9,_0x373c10){_0x373c10=_0x373c10||0xc8;return function(_0x5bee33){if(_0x5bee33){return _0x2f3ef9[_0xbfd3('0x11')](_0x373c10)['json'](_0x5bee33);}};}function respondWithFilteredResult(_0x3986d7,_0x179007){return function(_0x2cccf7){if(_0x2cccf7){var _0x252ef5=typeof _0x179007[_0xbfd3('0x12')]===_0xbfd3('0x13')&&typeof _0x179007[_0xbfd3('0x14')]===_0xbfd3('0x13');var _0x4c3525=_0x2cccf7[_0xbfd3('0x15')];var _0x10bf8b=_0x252ef5?0x0:_0x179007[_0xbfd3('0x12')];var _0x19a4c5=_0x252ef5?_0x2cccf7[_0xbfd3('0x15')]:_0x179007[_0xbfd3('0x12')]+_0x179007[_0xbfd3('0x14')];var _0xb03106;if(_0x19a4c5>=_0x4c3525){_0x19a4c5=_0x4c3525;_0xb03106=0xc8;}else{_0xb03106=0xce;}_0x3986d7[_0xbfd3('0x11')](_0xb03106);return _0x3986d7['set']('Content-Range',_0x10bf8b+'-'+_0x19a4c5+'/'+_0x4c3525)['json'](_0x2cccf7);}return null;};}function saveUpdates(_0x1937b2){return function(_0x5e77a5){if(_0x5e77a5){return _0x5e77a5[_0xbfd3('0x16')](_0x1937b2)[_0xbfd3('0x17')](function(_0x54fd60){return _0x54fd60;});}return null;};}function removeEntity(_0x5d8ddd){return function(_0x4222d1){if(_0x4222d1){return _0x4222d1[_0xbfd3('0x18')]()[_0xbfd3('0x17')](function(){var _0x55562e=_0x4222d1[_0xbfd3('0x19')]({'plain':!![]});var _0x41f8cf=_0xbfd3('0x1a');return db[_0xbfd3('0x1b')][_0xbfd3('0x18')]({'where':{'type':_0x41f8cf,'resourceId':_0x55562e['id']}})[_0xbfd3('0x17')](function(){return _0x4222d1;});})[_0xbfd3('0x17')](function(){_0x5d8ddd['status'](0xcc)[_0xbfd3('0x10')]();});}};}function handleEntityNotFound(_0x1206f8){return function(_0x1205bd){if(!_0x1205bd){_0x1206f8[_0xbfd3('0xf')](0x194);}return _0x1205bd;};}function handleError(_0x124fb9,_0x567481){_0x567481=_0x567481||0x1f4;return function(_0x2f488f){logger[_0xbfd3('0x1c')](_0x2f488f['stack']);if(_0x2f488f['name']){delete _0x2f488f['name'];}_0x124fb9[_0xbfd3('0x11')](_0x567481)[_0xbfd3('0x1d')](_0x2f488f);};}exports[_0xbfd3('0x1e')]=function(_0x1bda14,_0x5be9df){var _0x2cd86f={};var _0x3e84ed={'count':0x0,'rows':[]};var _0x29c80c=_[_0xbfd3('0x1f')](db[_0xbfd3('0x20')][_0xbfd3('0x21')],function(_0x5b6efe){return{'name':_0x5b6efe['fieldName'],'type':_0x5b6efe['type'][_0xbfd3('0x22')]};});_0x2cd86f=qs[_0xbfd3('0x23')](_0x29c80c,_0x1bda14);var _0x39741e={'where':_0x2cd86f[_0xbfd3('0x24')]};return db[_0xbfd3('0x20')][_0xbfd3('0x15')](_0x39741e)[_0xbfd3('0x17')](function(_0x2ca752){_0x3e84ed[_0xbfd3('0x15')]=_0x2ca752;_0x2cd86f[_0xbfd3('0x25')]=qs[_0xbfd3('0x25')](_0x1bda14[_0xbfd3('0x26')]);return db['WhatsappQueue'][_0xbfd3('0x27')](_0x2cd86f);})[_0xbfd3('0x17')](function(_0x147003){_0x3e84ed['rows']=_0x147003;return _0x3e84ed;})[_0xbfd3('0x17')](respondWithFilteredResult(_0x5be9df,_0x2cd86f))[_0xbfd3('0x28')](handleError(_0x5be9df,null));};exports['show']=function(_0x3ea5be,_0x284698){var _0x2cab1f={'raw':!![],'where':{'id':_0x3ea5be[_0xbfd3('0x29')]['id']}},_0xaf56d3={};_0xaf56d3[_0xbfd3('0x2a')]=_[_0xbfd3('0x2b')](db['WhatsappQueue']['rawAttributes']);_0xaf56d3[_0xbfd3('0x26')]=_[_0xbfd3('0x2b')](_0x3ea5be[_0xbfd3('0x26')]);_0xaf56d3['filters']=_[_0xbfd3('0x2c')](_0xaf56d3[_0xbfd3('0x2a')],_0xaf56d3[_0xbfd3('0x26')]);_0x2cab1f[_0xbfd3('0x2d')]=_[_0xbfd3('0x2c')](_0xaf56d3[_0xbfd3('0x2a')],qs[_0xbfd3('0x2e')](_0x3ea5be[_0xbfd3('0x26')][_0xbfd3('0x2e')]));_0x2cab1f[_0xbfd3('0x2d')]=_0x2cab1f['attributes']['length']?_0x2cab1f[_0xbfd3('0x2d')]:_0xaf56d3[_0xbfd3('0x2a')];if(_0x3ea5be[_0xbfd3('0x26')][_0xbfd3('0x2f')]){_0x2cab1f[_0xbfd3('0x25')]=[{'all':!![]}];}_0x2cab1f=_['merge']({},_0x2cab1f,_0x3ea5be[_0xbfd3('0x30')]);return db[_0xbfd3('0x20')][_0xbfd3('0x31')](_0x2cab1f)[_0xbfd3('0x17')](handleEntityNotFound(_0x284698,null))[_0xbfd3('0x17')](respondWithResult(_0x284698,null))[_0xbfd3('0x28')](handleError(_0x284698,null));};exports[_0xbfd3('0x32')]=function(_0x327dab,_0x4d8e33){return db[_0xbfd3('0x20')][_0xbfd3('0x32')](_0x327dab['body'],{})[_0xbfd3('0x17')](function(_0x308641){var _0xd31ea7=_0x327dab['user']['get']({'plain':!![]});if(!_0xd31ea7)throw new Error(_0xbfd3('0x33'));if(_0xd31ea7[_0xbfd3('0x34')]===_0xbfd3('0x35')){var _0x388d76=_0x308641['get']({'plain':!![]});var _0xdf85da=_0xbfd3('0x1a');return db[_0xbfd3('0x36')][_0xbfd3('0x31')]({'where':{'name':_0xdf85da,'userProfileId':_0xd31ea7[_0xbfd3('0x37')]},'raw':!![]})[_0xbfd3('0x17')](function(_0x46c3e3){if(_0x46c3e3&&_0x46c3e3['autoAssociation']===0x0){return db[_0xbfd3('0x1b')][_0xbfd3('0x32')]({'name':_0x388d76[_0xbfd3('0x38')],'resourceId':_0x388d76['id'],'type':_0x46c3e3[_0xbfd3('0x38')],'sectionId':_0x46c3e3['id']},{})['then'](function(){return _0x308641;});}else{return _0x308641;}})[_0xbfd3('0x28')](function(_0x5407bf){logger[_0xbfd3('0x1c')](_0xbfd3('0x39'),_0x5407bf);throw _0x5407bf;});}return _0x308641;})[_0xbfd3('0x17')](respondWithResult(_0x4d8e33,0xc9))['catch'](handleError(_0x4d8e33,null));};exports[_0xbfd3('0x16')]=function(_0x314797,_0x2c4bb6){if(_0x314797[_0xbfd3('0x3a')]['id']){delete _0x314797[_0xbfd3('0x3a')]['id'];}return db[_0xbfd3('0x20')][_0xbfd3('0x31')]({'where':{'id':_0x314797[_0xbfd3('0x29')]['id']}})[_0xbfd3('0x17')](handleEntityNotFound(_0x2c4bb6,null))[_0xbfd3('0x17')](saveUpdates(_0x314797[_0xbfd3('0x3a')],null))['then'](respondWithResult(_0x2c4bb6,null))[_0xbfd3('0x28')](handleError(_0x2c4bb6,null));};exports[_0xbfd3('0x18')]=function(_0x1477a5,_0x17e2c0){return db[_0xbfd3('0x20')][_0xbfd3('0x31')]({'where':{'id':_0x1477a5[_0xbfd3('0x29')]['id']}})[_0xbfd3('0x17')](handleEntityNotFound(_0x17e2c0,null))[_0xbfd3('0x17')](removeEntity(_0x17e2c0,null))['catch'](handleError(_0x17e2c0,null));};exports['describe']=function(_0x162b31,_0x429105){return db[_0xbfd3('0x20')][_0xbfd3('0x3b')]()[_0xbfd3('0x17')](respondWithResult(_0x429105,null))[_0xbfd3('0x28')](handleError(_0x429105,null));};exports[_0xbfd3('0x3c')]=function(_0x589638,_0x14d2cc){var _0x1deb60={'raw':!![],'where':{}},_0x6c2912={},_0x139d3e;return db[_0xbfd3('0x20')][_0xbfd3('0x3d')]({'where':{'id':_0x589638[_0xbfd3('0x29')]['id']}})[_0xbfd3('0x17')](handleEntityNotFound(_0x14d2cc,null))[_0xbfd3('0x17')](function(_0x4ce85c){if(_0x4ce85c){_0x139d3e=_0x4ce85c[_0xbfd3('0x19')]({'plain':!![]});_0x6c2912['model']=_['keys'](db[_0xbfd3('0x3e')][_0xbfd3('0x21')]);_0x6c2912[_0xbfd3('0x26')]=_[_0xbfd3('0x2b')](_0x589638['query']);_0x6c2912[_0xbfd3('0x3f')]=_[_0xbfd3('0x2c')](_0x6c2912[_0xbfd3('0x2a')],_0x6c2912[_0xbfd3('0x26')]);_0x1deb60['attributes']=_['intersection'](_0x6c2912['model'],qs[_0xbfd3('0x2e')](_0x589638['query'][_0xbfd3('0x2e')]));_0x1deb60['attributes']=_0x1deb60['attributes'][_0xbfd3('0x40')]?_0x1deb60[_0xbfd3('0x2d')]:_0x6c2912[_0xbfd3('0x2a')];if(!_0x589638['query'][_0xbfd3('0x41')](_0xbfd3('0x42'))){_0x1deb60[_0xbfd3('0x14')]=qs['limit'](_0x589638[_0xbfd3('0x26')][_0xbfd3('0x14')]);_0x1deb60[_0xbfd3('0x12')]=qs[_0xbfd3('0x12')](_0x589638['query'][_0xbfd3('0x12')]);}_0x1deb60[_0xbfd3('0x43')]=qs[_0xbfd3('0x44')](_0x589638[_0xbfd3('0x26')][_0xbfd3('0x44')]);_0x1deb60[_0xbfd3('0x24')]=qs[_0xbfd3('0x3f')](_[_0xbfd3('0x45')](_0x589638[_0xbfd3('0x26')],_0x6c2912['filters']));_0x1deb60[_0xbfd3('0x24')]['WhatsappQueueId']=_0x4ce85c['id'];if(_0x589638[_0xbfd3('0x26')]['filter']){_0x1deb60['where']=_[_0xbfd3('0x46')](_0x1deb60[_0xbfd3('0x24')],{'$or':_['map'](_0x1deb60[_0xbfd3('0x2d')],function(_0x540b45){var _0x1c8456={};_0x1c8456[_0x540b45]={'$like':'%'+_0x589638[_0xbfd3('0x26')][_0xbfd3('0x47')]+'%'};return _0x1c8456;})});}_0x1deb60=_['merge']({},_0x1deb60,_0x589638[_0xbfd3('0x30')]);return db[_0xbfd3('0x3e')][_0xbfd3('0x27')](_0x1deb60);}})[_0xbfd3('0x17')](function(_0x23b112){if(_0x23b112){return db[_0xbfd3('0x48')][_0xbfd3('0x49')]({'where':{'id':_[_0xbfd3('0x1f')](_0x23b112,'UserId'),'role':_0xbfd3('0x4a')},'attributes':['id','name','whatsappPause','updatedAt',_0xbfd3('0x4b')]});}})[_0xbfd3('0x17')](function(_0x418d33){if(_0x418d33){return{'count':_0x418d33['count'],'rows':_[_0xbfd3('0x1f')](_0x418d33[_0xbfd3('0x4c')],function(_0x6da4da){return{'membername':_0x6da4da[_0xbfd3('0x38')],'UserId':_0x6da4da['id'],'queue_name':_0x139d3e['name'],'WhatsappQueueId':_0x139d3e['id'],'interface':util[_0xbfd3('0x4d')](_0xbfd3('0x4e'),_0xbfd3('0x4f'),_0x6da4da[_0xbfd3('0x38')]),'penalty':0x0,'paused':_0x6da4da[_0xbfd3('0x50')],'createdAt':_0x6da4da[_0xbfd3('0x4b')],'updatedAt':_0x6da4da[_0xbfd3('0x51')]};})};}else{return{'count':0x0,'rows':[]};}})[_0xbfd3('0x17')](respondWithFilteredResult(_0x14d2cc,_0x1deb60))[_0xbfd3('0x28')](handleError(_0x14d2cc,null));};exports['getTeams']=function(_0x261cd6,_0x82398e){var _0x1a5b07={};var _0x438f22={};var _0x430a7b;var _0x410826;return db[_0xbfd3('0x20')][_0xbfd3('0x3d')]({'where':{'id':_0x261cd6[_0xbfd3('0x29')]['id']}})[_0xbfd3('0x17')](handleEntityNotFound(_0x82398e,null))[_0xbfd3('0x17')](function(_0x1598f4){if(_0x1598f4){_0x430a7b=_0x1598f4;_0x438f22[_0xbfd3('0x2a')]=_['keys'](db[_0xbfd3('0x52')][_0xbfd3('0x21')]);_0x438f22[_0xbfd3('0x26')]=_[_0xbfd3('0x2b')](_0x261cd6[_0xbfd3('0x26')]);_0x438f22[_0xbfd3('0x3f')]=_['intersection'](_0x438f22['model'],_0x438f22[_0xbfd3('0x26')]);_0x1a5b07[_0xbfd3('0x2d')]=_[_0xbfd3('0x2c')](_0x438f22[_0xbfd3('0x2a')],qs[_0xbfd3('0x2e')](_0x261cd6['query'][_0xbfd3('0x2e')]));_0x1a5b07[_0xbfd3('0x2d')]=_0x1a5b07[_0xbfd3('0x2d')][_0xbfd3('0x40')]?_0x1a5b07[_0xbfd3('0x2d')]:_0x438f22[_0xbfd3('0x2a')];_0x1a5b07[_0xbfd3('0x43')]=qs[_0xbfd3('0x44')](_0x261cd6[_0xbfd3('0x26')][_0xbfd3('0x44')]);_0x1a5b07[_0xbfd3('0x24')]=qs[_0xbfd3('0x3f')](_['pick'](_0x261cd6[_0xbfd3('0x26')],_0x438f22[_0xbfd3('0x3f')]));if(_0x261cd6[_0xbfd3('0x26')][_0xbfd3('0x47')]){_0x1a5b07[_0xbfd3('0x24')]=_['merge'](_0x1a5b07[_0xbfd3('0x24')],{'$or':_[_0xbfd3('0x1f')](_0x1a5b07['attributes'],function(_0x58efb7){var _0x1c9996={};_0x1c9996[_0x58efb7]={'$like':'%'+_0x261cd6[_0xbfd3('0x26')][_0xbfd3('0x47')]+'%'};return _0x1c9996;})});}_0x1a5b07=_[_0xbfd3('0x46')]({},_0x1a5b07,_0x261cd6['options']);return _0x430a7b[_0xbfd3('0x53')](_0x1a5b07);}})[_0xbfd3('0x17')](function(_0x532c96){if(_0x532c96){_0x410826=_0x532c96[_0xbfd3('0x40')];if(!_0x261cd6[_0xbfd3('0x26')][_0xbfd3('0x41')](_0xbfd3('0x42'))){_0x1a5b07[_0xbfd3('0x14')]=qs[_0xbfd3('0x14')](_0x261cd6[_0xbfd3('0x26')][_0xbfd3('0x14')]);_0x1a5b07[_0xbfd3('0x12')]=qs['offset'](_0x261cd6['query'][_0xbfd3('0x12')]);}return _0x430a7b['getTeams'](_0x1a5b07);}})[_0xbfd3('0x17')](function(_0x402e33){if(_0x402e33){return _0x402e33?{'count':_0x410826,'rows':_0x402e33}:null;}})[_0xbfd3('0x17')](respondWithResult(_0x82398e,null))['catch'](handleError(_0x82398e,null));};exports[_0xbfd3('0x54')]=function(_0x1cf332,_0x2a94ec){var _0x550024=_0x1cf332['body']['ids'];return db[_0xbfd3('0x52')]['findAll']({'where':{'id':_0x550024},'attributes':['id'],'include':[{'model':db[_0xbfd3('0x48')],'as':_0xbfd3('0x55'),'attributes':['id',_0xbfd3('0x38'),_0xbfd3('0x56'),_0xbfd3('0x57'),_0xbfd3('0x58')],'raw':!![]}]})[_0xbfd3('0x17')](function(_0x3c7bd8){if(_0x3c7bd8){var _0x2520aa=_[_0xbfd3('0x59')](_0x3c7bd8,function(_0x57e43e){var _0x5d2bc2=_0x57e43e[_0xbfd3('0x19')]({'plain':!![]});return _0x5d2bc2[_0xbfd3('0x55')];});return db[_0xbfd3('0x20')][_0xbfd3('0x31')]({'where':{'id':_0x1cf332[_0xbfd3('0x29')]['id']}})[_0xbfd3('0x17')](function(_0x37dac8){return db[_0xbfd3('0x5a')][_0xbfd3('0x5b')](function(_0x29a74e){return _0x37dac8['addTeams'](_0x550024,{'transaction':_0x29a74e})[_0xbfd3('0x17')](function(){return BPromise['each'](_0x2520aa,function(_0x447e7c){return db[_0xbfd3('0x3e')]['findOrCreate']({'where':{'UserId':_0x447e7c['id'],'WhatsappQueueId':_0x1cf332[_0xbfd3('0x29')]['id']},'transaction':_0x29a74e});});})[_0xbfd3('0x17')](function(){_0x2520aa['forEach'](function(_0x5338f6){socket['emit']('userWhatsappQueue:save',{'UserId':_0x5338f6['id'],'WhatsappQueueId':_0x37dac8['id']});});});});});}})['then'](respondWithStatusCode(_0x2a94ec,null))[_0xbfd3('0x28')](handleError(_0x2a94ec,null));};exports[_0xbfd3('0x5c')]=function(_0x4981d5,_0x2bd799){return db['Team'][_0xbfd3('0x27')]({'where':{'id':_0x4981d5[_0xbfd3('0x26')][_0xbfd3('0x5d')]},'attributes':['id'],'include':[{'model':db['User'],'as':_0xbfd3('0x55'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x2bd799,null))['then'](function(_0x342a38){var _0x50d1bd=_[_0xbfd3('0x1f')](_0x342a38,'id');var _0x45f73f=[];var _0x4eebe2=[];var _0x57425e=squel[_0xbfd3('0x5e')]();_0x57425e[_0xbfd3('0x5f')](_0xbfd3('0x60'))['from'](_0xbfd3('0x61'),'tq')[_0xbfd3('0x62')]('user_has_teams','ut',_0xbfd3('0x63'))[_0xbfd3('0x24')]('WhatsappQueueId\x20=\x20?',_0x4981d5['params']['id']);for(var _0x37aeba=0x0;_0x37aeba<_0x342a38[_0xbfd3('0x40')];_0x37aeba+=0x1){let _0x376908=_0x342a38[_0x37aeba];for(var _0x3f57f9=0x0;_0x3f57f9<_0x376908[_0xbfd3('0x55')]['length'];_0x3f57f9+=0x1){let _0x487567=_0x376908[_0xbfd3('0x55')][_0x3f57f9];var _0xa304c=_0x57425e[_0xbfd3('0x64')]();_0xa304c[_0xbfd3('0x24')](_0xbfd3('0x65'),_0x487567['id']);_0x4eebe2['push'](db['sequelize'][_0xbfd3('0x26')](_0xa304c[_0xbfd3('0x66')](),{'type':db['sequelize'][_0xbfd3('0x67')][_0xbfd3('0x68')]})[_0xbfd3('0x17')](function(_0x4c97e0){if(_0x4c97e0[_0xbfd3('0x40')]===0x1){return _0x487567['id'];}else{var _0x267517=_[_0xbfd3('0x69')](_[_0xbfd3('0x1f')](_0x4c97e0,_0xbfd3('0x6a')),function(_0x5f19ea){return _[_0xbfd3('0x6b')](_0x50d1bd,_0x5f19ea);});if(_0x267517){return _0x487567['id'];}}}));}}return BPromise['all'](_0x4eebe2)[_0xbfd3('0x17')](function(_0x5b34be){_0x45f73f=_(_0x45f73f)[_0xbfd3('0x6c')](_0x5b34be)[_0xbfd3('0x6d')]()[_0xbfd3('0x6e')]();return db[_0xbfd3('0x20')][_0xbfd3('0x31')]({'where':{'id':_0x4981d5[_0xbfd3('0x29')]['id']}})[_0xbfd3('0x17')](function(_0x45a6e6){return db[_0xbfd3('0x5a')][_0xbfd3('0x5b')](function(_0x362e75){return _0x45a6e6['removeTeams'](_0x4981d5[_0xbfd3('0x26')][_0xbfd3('0x5d')],{'transaction':_0x362e75})[_0xbfd3('0x17')](function(){if(!_[_0xbfd3('0x6f')](_0x45f73f)){return _0x45a6e6[_0xbfd3('0x70')](_0x45f73f,{'transaction':_0x362e75});}})['then'](function(){_0x45f73f[_0xbfd3('0x71')](function(_0x1d76c8){socket[_0xbfd3('0x72')](_0xbfd3('0x73'),{'UserId':_0x1d76c8,'WhatsappQueueId':_0x45a6e6['id']});});});});});});})[_0xbfd3('0x17')](respondWithStatusCode(_0x2bd799,null))[_0xbfd3('0x28')](handleError(_0x2bd799,null));};exports[_0xbfd3('0x74')]=function(_0x3b11eb,_0x541c04){return db[_0xbfd3('0x20')]['find']({'where':{'id':_0x3b11eb[_0xbfd3('0x29')]['id']}})[_0xbfd3('0x17')](handleEntityNotFound(_0x541c04,null))[_0xbfd3('0x17')](function(_0x2df7e0){if(_0x2df7e0){return _0x2df7e0['addAgents'](_0x3b11eb[_0xbfd3('0x3a')]['ids'],_['omit'](_0x3b11eb[_0xbfd3('0x3a')],[_0xbfd3('0x5d'),'id'])||{})[_0xbfd3('0x75')](function(_0x1f4a1a){for(var _0x36d78b=0x0;_0x36d78b<_0x3b11eb['body']['ids'][_0xbfd3('0x40')];_0x36d78b+=0x1){socket['emit'](_0xbfd3('0x76'),{'UserId':Number(_0x3b11eb['body'][_0xbfd3('0x5d')][_0x36d78b]),'WhatsappQueueId':Number(_0x3b11eb[_0xbfd3('0x29')]['id'])});}return _0x1f4a1a;});}})[_0xbfd3('0x17')](respondWithResult(_0x541c04,null))[_0xbfd3('0x28')](handleError(_0x541c04,null));};exports[_0xbfd3('0x70')]=function(_0x416322,_0x5ecd34){return db[_0xbfd3('0x20')][_0xbfd3('0x31')]({'where':{'id':_0x416322[_0xbfd3('0x29')]['id']}})[_0xbfd3('0x17')](handleEntityNotFound(_0x5ecd34,null))[_0xbfd3('0x17')](function(_0x249e44){if(_0x249e44){return _0x249e44[_0xbfd3('0x70')](_0x416322['query'][_0xbfd3('0x5d')])[_0xbfd3('0x17')](function(){if(_[_0xbfd3('0x77')](_0x416322[_0xbfd3('0x26')]['ids'])){for(var _0x4db798=0x0;_0x4db798<_0x416322[_0xbfd3('0x26')][_0xbfd3('0x5d')][_0xbfd3('0x40')];_0x4db798+=0x1){socket[_0xbfd3('0x72')](_0xbfd3('0x73'),{'UserId':Number(_0x416322[_0xbfd3('0x26')][_0xbfd3('0x5d')][_0x4db798]),'WhatsappQueueId':Number(_0x416322[_0xbfd3('0x29')]['id'])});}}else{socket['emit'](_0xbfd3('0x73'),{'UserId':Number(_0x416322[_0xbfd3('0x26')]['ids']),'WhatsappQueueId':Number(_0x416322[_0xbfd3('0x29')]['id'])});}});}})[_0xbfd3('0x17')](respondWithStatusCode(_0x5ecd34,null))[_0xbfd3('0x28')](handleError(_0x5ecd34,null));};exports[_0xbfd3('0x78')]=function(_0x24203c,_0x4758d4){var _0x46b55b={};var _0x3a37bf={};var _0x58d8a9;var _0x22e834;return db['WhatsappQueue'][_0xbfd3('0x3d')]({'where':{'id':_0x24203c[_0xbfd3('0x29')]['id']}})[_0xbfd3('0x17')](handleEntityNotFound(_0x4758d4,null))[_0xbfd3('0x17')](function(_0x21b4e4){if(_0x21b4e4){_0x58d8a9=_0x21b4e4;_0x3a37bf[_0xbfd3('0x2a')]=_['keys'](db[_0xbfd3('0x48')][_0xbfd3('0x21')]);_0x3a37bf[_0xbfd3('0x26')]=_['keys'](_0x24203c[_0xbfd3('0x26')]);_0x3a37bf[_0xbfd3('0x3f')]=_[_0xbfd3('0x2c')](_0x3a37bf['model'],_0x3a37bf[_0xbfd3('0x26')]);_0x46b55b['attributes']=_[_0xbfd3('0x2c')](_0x3a37bf['model'],qs[_0xbfd3('0x2e')](_0x24203c[_0xbfd3('0x26')][_0xbfd3('0x2e')]));_0x46b55b[_0xbfd3('0x2d')]=_0x46b55b[_0xbfd3('0x2d')][_0xbfd3('0x40')]?_0x46b55b[_0xbfd3('0x2d')]:_0x3a37bf[_0xbfd3('0x2a')];_0x46b55b['order']=qs[_0xbfd3('0x44')](_0x24203c[_0xbfd3('0x26')][_0xbfd3('0x44')]);_0x46b55b[_0xbfd3('0x24')]=qs['filters'](_[_0xbfd3('0x45')](_0x24203c[_0xbfd3('0x26')],_0x3a37bf['filters']));if(_0x24203c['query'][_0xbfd3('0x47')]){_0x46b55b[_0xbfd3('0x24')]=_[_0xbfd3('0x46')](_0x46b55b[_0xbfd3('0x24')],{'$or':_[_0xbfd3('0x1f')](_0x46b55b[_0xbfd3('0x2d')],function(_0x4ee398){var _0x26e0d0={};_0x26e0d0[_0x4ee398]={'$like':'%'+_0x24203c[_0xbfd3('0x26')]['filter']+'%'};return _0x26e0d0;})});}_0x46b55b=_[_0xbfd3('0x46')]({},_0x46b55b,_0x24203c[_0xbfd3('0x30')]);return _0x58d8a9[_0xbfd3('0x78')](_0x46b55b);}})[_0xbfd3('0x17')](function(_0x25878c){if(_0x25878c){_0x22e834=_0x25878c[_0xbfd3('0x40')];if(!_0x24203c[_0xbfd3('0x26')][_0xbfd3('0x41')](_0xbfd3('0x42'))){_0x46b55b[_0xbfd3('0x14')]=qs[_0xbfd3('0x14')](_0x24203c[_0xbfd3('0x26')][_0xbfd3('0x14')]);_0x46b55b[_0xbfd3('0x12')]=qs['offset'](_0x24203c[_0xbfd3('0x26')]['offset']);}return _0x58d8a9[_0xbfd3('0x78')](_0x46b55b);}})['then'](function(_0x175d8c){if(_0x175d8c){return _0x175d8c?{'count':_0x22e834,'rows':_0x175d8c}:null;}})[_0xbfd3('0x17')](respondWithResult(_0x4758d4,null))[_0xbfd3('0x28')](handleError(_0x4758d4,null));};
\ No newline at end of file
+var _0xc7dd=['squel','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','redis','localhost','socket.io-emitter','./whatsappQueue.socket','sendStatus','json','offset','undefined','limit','count','status','set','update','then','destroy','get','WhatsappQueues','UserProfileResource','end','error','name','send','index','map','WhatsappQueue','fieldName','type','key','getOptions','include','findAll','rows','catch','params','model','keys','rawAttributes','query','filters','attributes','intersection','fields','length','options','create','body','role','user','UserProfileSection','find','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','getMembers','findOne','UserWhatsappQueue','hasOwnProperty','where','WhatsappQueueId','filter','merge','User','findAndCountAll','UserId','agent','whatsappPause','updatedAt','%s/%s','SIP','createdAt','Team','order','sort','pick','getTeams','nolimit','addTeams','ids','Agents','online','flatMap','transaction','forEach','emit','userWhatsappQueue:save','select','field','tq.TeamId','team_has_whatsapp_queues','join','ut.TeamId\x20=\x20tq.TeamId','WhatsappQueueId\x20=\x20?','clone','push','sequelize','toString','QueryTypes','SELECT','every','TeamId','includes','all','union','value','removeTeams','isEmpty','removeAgents','userWhatsappQueue:remove','addAgents','omit','spread','isArray','getAgents','bluebird','util'];(function(_0x3bf02b,_0x5762ac){var _0xa6f349=function(_0x3e14eb){while(--_0x3e14eb){_0x3bf02b['push'](_0x3bf02b['shift']());}};_0xa6f349(++_0x5762ac);}(_0xc7dd,0x1e6));var _0xdc7d=function(_0x5ce3c8,_0x2503bd){_0x5ce3c8=_0x5ce3c8-0x0;var _0xa76867=_0xc7dd[_0x5ce3c8];return _0xa76867;};'use strict';var BPromise=require(_0xdc7d('0x0'));var util=require(_0xdc7d('0x1'));var _=require('lodash');var squel=require(_0xdc7d('0x2'));var Redis=require(_0xdc7d('0x3'));var qs=require(_0xdc7d('0x4'));var logger=require(_0xdc7d('0x5'))(_0xdc7d('0x6'));var config=require(_0xdc7d('0x7'));var db=require(_0xdc7d('0x8'))['db'];config[_0xdc7d('0x9')]=_['defaults'](config[_0xdc7d('0x9')],{'host':_0xdc7d('0xa'),'port':0x18eb});var socket=require(_0xdc7d('0xb'))(new Redis(config[_0xdc7d('0x9')]));require(_0xdc7d('0xc'))['register'](socket);function respondWithStatusCode(_0x3e108f,_0x7a7f7f){_0x7a7f7f=_0x7a7f7f||0xcc;return function(_0x2c3452){if(_0x2c3452){return _0x3e108f[_0xdc7d('0xd')](_0x7a7f7f);}return _0x3e108f['status'](_0x7a7f7f)['end']();};}function respondWithResult(_0x52e2a5,_0x5f1359){_0x5f1359=_0x5f1359||0xc8;return function(_0x393eb1){if(_0x393eb1){return _0x52e2a5['status'](_0x5f1359)[_0xdc7d('0xe')](_0x393eb1);}};}function respondWithFilteredResult(_0x1279fe,_0xc364c5){return function(_0x52cdaa){if(_0x52cdaa){var _0x204d95=typeof _0xc364c5[_0xdc7d('0xf')]===_0xdc7d('0x10')&&typeof _0xc364c5[_0xdc7d('0x11')]===_0xdc7d('0x10');var _0x4f48ae=_0x52cdaa[_0xdc7d('0x12')];var _0x3aea53=_0x204d95?0x0:_0xc364c5[_0xdc7d('0xf')];var _0x40ca9d=_0x204d95?_0x52cdaa[_0xdc7d('0x12')]:_0xc364c5[_0xdc7d('0xf')]+_0xc364c5[_0xdc7d('0x11')];var _0x5f08e4;if(_0x40ca9d>=_0x4f48ae){_0x40ca9d=_0x4f48ae;_0x5f08e4=0xc8;}else{_0x5f08e4=0xce;}_0x1279fe[_0xdc7d('0x13')](_0x5f08e4);return _0x1279fe[_0xdc7d('0x14')]('Content-Range',_0x3aea53+'-'+_0x40ca9d+'/'+_0x4f48ae)[_0xdc7d('0xe')](_0x52cdaa);}return null;};}function saveUpdates(_0x47b541){return function(_0x7666d5){if(_0x7666d5){return _0x7666d5[_0xdc7d('0x15')](_0x47b541)[_0xdc7d('0x16')](function(_0x3b337a){return _0x3b337a;});}return null;};}function removeEntity(_0x5aca90){return function(_0x70742a){if(_0x70742a){return _0x70742a[_0xdc7d('0x17')]()[_0xdc7d('0x16')](function(){var _0x40eeaf=_0x70742a[_0xdc7d('0x18')]({'plain':!![]});var _0x1c163c=_0xdc7d('0x19');return db[_0xdc7d('0x1a')][_0xdc7d('0x17')]({'where':{'type':_0x1c163c,'resourceId':_0x40eeaf['id']}})[_0xdc7d('0x16')](function(){return _0x70742a;});})[_0xdc7d('0x16')](function(){_0x5aca90[_0xdc7d('0x13')](0xcc)[_0xdc7d('0x1b')]();});}};}function handleEntityNotFound(_0x45f928){return function(_0x20a763){if(!_0x20a763){_0x45f928[_0xdc7d('0xd')](0x194);}return _0x20a763;};}function handleError(_0x4470de,_0x33f484){_0x33f484=_0x33f484||0x1f4;return function(_0x5588c2){logger[_0xdc7d('0x1c')](_0x5588c2['stack']);if(_0x5588c2[_0xdc7d('0x1d')]){delete _0x5588c2[_0xdc7d('0x1d')];}_0x4470de['status'](_0x33f484)[_0xdc7d('0x1e')](_0x5588c2);};}exports[_0xdc7d('0x1f')]=function(_0x37e3da,_0x426cd2){var _0x1e8579={};var _0x1c46e1={'count':0x0,'rows':[]};var _0x50f9de=_[_0xdc7d('0x20')](db[_0xdc7d('0x21')]['rawAttributes'],function(_0x1b42b1){return{'name':_0x1b42b1[_0xdc7d('0x22')],'type':_0x1b42b1[_0xdc7d('0x23')][_0xdc7d('0x24')]};});_0x1e8579=qs[_0xdc7d('0x25')](_0x50f9de,_0x37e3da);var _0x5f36b3={'where':_0x1e8579['where']};return db[_0xdc7d('0x21')][_0xdc7d('0x12')](_0x5f36b3)[_0xdc7d('0x16')](function(_0x59bb23){_0x1c46e1[_0xdc7d('0x12')]=_0x59bb23;_0x1e8579['include']=qs[_0xdc7d('0x26')](_0x37e3da['query']);return db[_0xdc7d('0x21')][_0xdc7d('0x27')](_0x1e8579);})[_0xdc7d('0x16')](function(_0x81873b){_0x1c46e1[_0xdc7d('0x28')]=_0x81873b;return _0x1c46e1;})[_0xdc7d('0x16')](respondWithFilteredResult(_0x426cd2,_0x1e8579))[_0xdc7d('0x29')](handleError(_0x426cd2,null));};exports['show']=function(_0x459c54,_0x4dc280){var _0x3af6ef={'raw':!![],'where':{'id':_0x459c54[_0xdc7d('0x2a')]['id']}},_0xdec2c8={};_0xdec2c8[_0xdc7d('0x2b')]=_[_0xdc7d('0x2c')](db[_0xdc7d('0x21')][_0xdc7d('0x2d')]);_0xdec2c8[_0xdc7d('0x2e')]=_[_0xdc7d('0x2c')](_0x459c54[_0xdc7d('0x2e')]);_0xdec2c8[_0xdc7d('0x2f')]=_['intersection'](_0xdec2c8[_0xdc7d('0x2b')],_0xdec2c8['query']);_0x3af6ef[_0xdc7d('0x30')]=_[_0xdc7d('0x31')](_0xdec2c8[_0xdc7d('0x2b')],qs['fields'](_0x459c54['query'][_0xdc7d('0x32')]));_0x3af6ef['attributes']=_0x3af6ef[_0xdc7d('0x30')][_0xdc7d('0x33')]?_0x3af6ef[_0xdc7d('0x30')]:_0xdec2c8[_0xdc7d('0x2b')];if(_0x459c54[_0xdc7d('0x2e')]['includeAll']){_0x3af6ef[_0xdc7d('0x26')]=[{'all':!![]}];}_0x3af6ef=_['merge']({},_0x3af6ef,_0x459c54[_0xdc7d('0x34')]);return db['WhatsappQueue']['find'](_0x3af6ef)[_0xdc7d('0x16')](handleEntityNotFound(_0x4dc280,null))['then'](respondWithResult(_0x4dc280,null))[_0xdc7d('0x29')](handleError(_0x4dc280,null));};exports[_0xdc7d('0x35')]=function(_0x33f5ab,_0x12f38e){return db['WhatsappQueue']['create'](_0x33f5ab[_0xdc7d('0x36')],{})[_0xdc7d('0x16')](function(_0x4b906){var _0xd87240=_0x33f5ab['user']['get']({'plain':!![]});if(!_0xd87240)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0xd87240[_0xdc7d('0x37')]===_0xdc7d('0x38')){var _0x11153b=_0x4b906[_0xdc7d('0x18')]({'plain':!![]});var _0x7906dd=_0xdc7d('0x19');return db[_0xdc7d('0x39')][_0xdc7d('0x3a')]({'where':{'name':_0x7906dd,'userProfileId':_0xd87240['userProfileId']},'raw':!![]})[_0xdc7d('0x16')](function(_0x377e76){if(_0x377e76&&_0x377e76[_0xdc7d('0x3b')]===0x0){return db['UserProfileResource']['create']({'name':_0x11153b[_0xdc7d('0x1d')],'resourceId':_0x11153b['id'],'type':_0x377e76['name'],'sectionId':_0x377e76['id']},{})[_0xdc7d('0x16')](function(){return _0x4b906;});}else{return _0x4b906;}})[_0xdc7d('0x29')](function(_0x500047){logger[_0xdc7d('0x1c')](_0xdc7d('0x3c'),_0x500047);throw _0x500047;});}return _0x4b906;})[_0xdc7d('0x16')](respondWithResult(_0x12f38e,0xc9))[_0xdc7d('0x29')](handleError(_0x12f38e,null));};exports[_0xdc7d('0x15')]=function(_0x298803,_0x5a5bae){if(_0x298803[_0xdc7d('0x36')]['id']){delete _0x298803[_0xdc7d('0x36')]['id'];}return db[_0xdc7d('0x21')]['find']({'where':{'id':_0x298803['params']['id']}})[_0xdc7d('0x16')](handleEntityNotFound(_0x5a5bae,null))[_0xdc7d('0x16')](saveUpdates(_0x298803[_0xdc7d('0x36')],null))[_0xdc7d('0x16')](respondWithResult(_0x5a5bae,null))[_0xdc7d('0x29')](handleError(_0x5a5bae,null));};exports[_0xdc7d('0x17')]=function(_0x2c5e0e,_0x4c3e54){return db[_0xdc7d('0x21')][_0xdc7d('0x3a')]({'where':{'id':_0x2c5e0e[_0xdc7d('0x2a')]['id']}})[_0xdc7d('0x16')](handleEntityNotFound(_0x4c3e54,null))[_0xdc7d('0x16')](removeEntity(_0x4c3e54,null))[_0xdc7d('0x29')](handleError(_0x4c3e54,null));};exports[_0xdc7d('0x3d')]=function(_0xb0d211,_0x4d5cc6){return db[_0xdc7d('0x21')][_0xdc7d('0x3d')]()[_0xdc7d('0x16')](respondWithResult(_0x4d5cc6,null))['catch'](handleError(_0x4d5cc6,null));};exports[_0xdc7d('0x3e')]=function(_0x5e9e8b,_0x10a5c2){var _0x59c0dc={'raw':!![],'where':{}},_0x36c70e={},_0x5c7966;return db[_0xdc7d('0x21')][_0xdc7d('0x3f')]({'where':{'id':_0x5e9e8b[_0xdc7d('0x2a')]['id']}})[_0xdc7d('0x16')](handleEntityNotFound(_0x10a5c2,null))[_0xdc7d('0x16')](function(_0x25a0b5){if(_0x25a0b5){_0x5c7966=_0x25a0b5[_0xdc7d('0x18')]({'plain':!![]});_0x36c70e[_0xdc7d('0x2b')]=_[_0xdc7d('0x2c')](db[_0xdc7d('0x40')][_0xdc7d('0x2d')]);_0x36c70e['query']=_['keys'](_0x5e9e8b['query']);_0x36c70e['filters']=_[_0xdc7d('0x31')](_0x36c70e[_0xdc7d('0x2b')],_0x36c70e[_0xdc7d('0x2e')]);_0x59c0dc[_0xdc7d('0x30')]=_[_0xdc7d('0x31')](_0x36c70e[_0xdc7d('0x2b')],qs[_0xdc7d('0x32')](_0x5e9e8b[_0xdc7d('0x2e')]['fields']));_0x59c0dc[_0xdc7d('0x30')]=_0x59c0dc['attributes'][_0xdc7d('0x33')]?_0x59c0dc[_0xdc7d('0x30')]:_0x36c70e['model'];if(!_0x5e9e8b[_0xdc7d('0x2e')][_0xdc7d('0x41')]('nolimit')){_0x59c0dc[_0xdc7d('0x11')]=qs['limit'](_0x5e9e8b[_0xdc7d('0x2e')][_0xdc7d('0x11')]);_0x59c0dc[_0xdc7d('0xf')]=qs[_0xdc7d('0xf')](_0x5e9e8b['query'][_0xdc7d('0xf')]);}_0x59c0dc['order']=qs['sort'](_0x5e9e8b[_0xdc7d('0x2e')]['sort']);_0x59c0dc['where']=qs[_0xdc7d('0x2f')](_['pick'](_0x5e9e8b[_0xdc7d('0x2e')],_0x36c70e['filters']));_0x59c0dc[_0xdc7d('0x42')][_0xdc7d('0x43')]=_0x25a0b5['id'];if(_0x5e9e8b[_0xdc7d('0x2e')][_0xdc7d('0x44')]){_0x59c0dc[_0xdc7d('0x42')]=_['merge'](_0x59c0dc['where'],{'$or':_[_0xdc7d('0x20')](_0x59c0dc[_0xdc7d('0x30')],function(_0x4cad80){var _0xe9b800={};_0xe9b800[_0x4cad80]={'$like':'%'+_0x5e9e8b[_0xdc7d('0x2e')][_0xdc7d('0x44')]+'%'};return _0xe9b800;})});}_0x59c0dc=_[_0xdc7d('0x45')]({},_0x59c0dc,_0x5e9e8b['options']);return db['UserWhatsappQueue'][_0xdc7d('0x27')](_0x59c0dc);}})[_0xdc7d('0x16')](function(_0x1131f2){if(_0x1131f2){return db[_0xdc7d('0x46')][_0xdc7d('0x47')]({'where':{'id':_[_0xdc7d('0x20')](_0x1131f2,_0xdc7d('0x48')),'role':_0xdc7d('0x49')},'attributes':['id',_0xdc7d('0x1d'),_0xdc7d('0x4a'),_0xdc7d('0x4b'),'createdAt']});}})[_0xdc7d('0x16')](function(_0x1c3c9c){if(_0x1c3c9c){return{'count':_0x1c3c9c[_0xdc7d('0x12')],'rows':_['map'](_0x1c3c9c[_0xdc7d('0x28')],function(_0x10474b){return{'membername':_0x10474b[_0xdc7d('0x1d')],'UserId':_0x10474b['id'],'queue_name':_0x5c7966['name'],'WhatsappQueueId':_0x5c7966['id'],'interface':util['format'](_0xdc7d('0x4c'),_0xdc7d('0x4d'),_0x10474b['name']),'penalty':0x0,'paused':_0x10474b[_0xdc7d('0x4a')],'createdAt':_0x10474b[_0xdc7d('0x4e')],'updatedAt':_0x10474b[_0xdc7d('0x4b')]};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0x10a5c2,_0x59c0dc))[_0xdc7d('0x29')](handleError(_0x10a5c2,null));};exports['getTeams']=function(_0x211492,_0x5a857f){var _0x2a5e02={};var _0x250266={};var _0xf45afc;var _0x3b0ddd;return db[_0xdc7d('0x21')]['findOne']({'where':{'id':_0x211492[_0xdc7d('0x2a')]['id']}})['then'](handleEntityNotFound(_0x5a857f,null))[_0xdc7d('0x16')](function(_0x14c6e8){if(_0x14c6e8){_0xf45afc=_0x14c6e8;_0x250266[_0xdc7d('0x2b')]=_[_0xdc7d('0x2c')](db[_0xdc7d('0x4f')][_0xdc7d('0x2d')]);_0x250266[_0xdc7d('0x2e')]=_[_0xdc7d('0x2c')](_0x211492[_0xdc7d('0x2e')]);_0x250266[_0xdc7d('0x2f')]=_['intersection'](_0x250266[_0xdc7d('0x2b')],_0x250266[_0xdc7d('0x2e')]);_0x2a5e02['attributes']=_[_0xdc7d('0x31')](_0x250266['model'],qs[_0xdc7d('0x32')](_0x211492[_0xdc7d('0x2e')][_0xdc7d('0x32')]));_0x2a5e02['attributes']=_0x2a5e02[_0xdc7d('0x30')]['length']?_0x2a5e02[_0xdc7d('0x30')]:_0x250266['model'];_0x2a5e02[_0xdc7d('0x50')]=qs[_0xdc7d('0x51')](_0x211492[_0xdc7d('0x2e')][_0xdc7d('0x51')]);_0x2a5e02[_0xdc7d('0x42')]=qs[_0xdc7d('0x2f')](_[_0xdc7d('0x52')](_0x211492[_0xdc7d('0x2e')],_0x250266['filters']));if(_0x211492[_0xdc7d('0x2e')][_0xdc7d('0x44')]){_0x2a5e02[_0xdc7d('0x42')]=_[_0xdc7d('0x45')](_0x2a5e02[_0xdc7d('0x42')],{'$or':_[_0xdc7d('0x20')](_0x2a5e02[_0xdc7d('0x30')],function(_0x1b2998){var _0xeafc78={};_0xeafc78[_0x1b2998]={'$like':'%'+_0x211492['query'][_0xdc7d('0x44')]+'%'};return _0xeafc78;})});}_0x2a5e02=_['merge']({},_0x2a5e02,_0x211492[_0xdc7d('0x34')]);return _0xf45afc[_0xdc7d('0x53')](_0x2a5e02);}})['then'](function(_0x17fdda){if(_0x17fdda){_0x3b0ddd=_0x17fdda[_0xdc7d('0x33')];if(!_0x211492['query'][_0xdc7d('0x41')](_0xdc7d('0x54'))){_0x2a5e02[_0xdc7d('0x11')]=qs[_0xdc7d('0x11')](_0x211492[_0xdc7d('0x2e')][_0xdc7d('0x11')]);_0x2a5e02[_0xdc7d('0xf')]=qs[_0xdc7d('0xf')](_0x211492['query'][_0xdc7d('0xf')]);}return _0xf45afc[_0xdc7d('0x53')](_0x2a5e02);}})['then'](function(_0x727779){if(_0x727779){return _0x727779?{'count':_0x3b0ddd,'rows':_0x727779}:null;}})[_0xdc7d('0x16')](respondWithResult(_0x5a857f,null))[_0xdc7d('0x29')](handleError(_0x5a857f,null));};exports[_0xdc7d('0x55')]=function(_0x36609f,_0x4ef564){var _0x3b3698=_0x36609f['body'][_0xdc7d('0x56')];return db[_0xdc7d('0x4f')][_0xdc7d('0x27')]({'where':{'id':_0x3b3698},'attributes':['id'],'include':[{'model':db[_0xdc7d('0x46')],'as':_0xdc7d('0x57'),'attributes':['id',_0xdc7d('0x1d'),_0xdc7d('0x58'),'voicePause','interface'],'raw':!![]}]})[_0xdc7d('0x16')](function(_0x1e5d12){if(_0x1e5d12){var _0x41f383=_[_0xdc7d('0x59')](_0x1e5d12,function(_0x3dc1fa){var _0x2b9c04=_0x3dc1fa['get']({'plain':!![]});return _0x2b9c04[_0xdc7d('0x57')];});return db[_0xdc7d('0x21')][_0xdc7d('0x3a')]({'where':{'id':_0x36609f['params']['id']}})[_0xdc7d('0x16')](function(_0x38cba6){return db['sequelize'][_0xdc7d('0x5a')](function(_0x2aaa6b){return _0x38cba6['addTeams'](_0x3b3698,{'transaction':_0x2aaa6b})[_0xdc7d('0x16')](function(){return BPromise['each'](_0x41f383,function(_0x4852ba){return db[_0xdc7d('0x40')]['findOrCreate']({'where':{'UserId':_0x4852ba['id'],'WhatsappQueueId':_0x36609f[_0xdc7d('0x2a')]['id']},'transaction':_0x2aaa6b});});})[_0xdc7d('0x16')](function(){_0x41f383[_0xdc7d('0x5b')](function(_0x279364){socket[_0xdc7d('0x5c')](_0xdc7d('0x5d'),{'UserId':_0x279364['id'],'WhatsappQueueId':_0x38cba6['id']});});});});});}})[_0xdc7d('0x16')](respondWithStatusCode(_0x4ef564,null))['catch'](handleError(_0x4ef564,null));};exports['removeTeams']=function(_0x221ffd,_0x16b640){return db['Team']['findAll']({'where':{'id':_0x221ffd[_0xdc7d('0x2e')][_0xdc7d('0x56')]},'attributes':['id'],'include':[{'model':db[_0xdc7d('0x46')],'as':_0xdc7d('0x57'),'attributes':['id'],'raw':!![]}]})[_0xdc7d('0x16')](handleEntityNotFound(_0x16b640,null))['then'](function(_0x47b5ab){var _0x1a4566=_['map'](_0x47b5ab,'id');var _0x59c876=[];var _0x41d793=[];var _0x481e7a=squel[_0xdc7d('0x5e')]();_0x481e7a[_0xdc7d('0x5f')](_0xdc7d('0x60'))['from'](_0xdc7d('0x61'),'tq')[_0xdc7d('0x62')]('user_has_teams','ut',_0xdc7d('0x63'))[_0xdc7d('0x42')](_0xdc7d('0x64'),_0x221ffd[_0xdc7d('0x2a')]['id']);for(var _0x1d936b=0x0;_0x1d936b<_0x47b5ab[_0xdc7d('0x33')];_0x1d936b+=0x1){let _0x4b133c=_0x47b5ab[_0x1d936b];for(var _0x55aba8=0x0;_0x55aba8<_0x4b133c[_0xdc7d('0x57')][_0xdc7d('0x33')];_0x55aba8+=0x1){let _0x1213cb=_0x4b133c[_0xdc7d('0x57')][_0x55aba8];var _0x3c1821=_0x481e7a[_0xdc7d('0x65')]();_0x3c1821[_0xdc7d('0x42')]('ut.UserId\x20=\x20?',_0x1213cb['id']);_0x41d793[_0xdc7d('0x66')](db[_0xdc7d('0x67')][_0xdc7d('0x2e')](_0x3c1821[_0xdc7d('0x68')](),{'type':db[_0xdc7d('0x67')][_0xdc7d('0x69')][_0xdc7d('0x6a')]})[_0xdc7d('0x16')](function(_0x14be7f){if(_0x14be7f[_0xdc7d('0x33')]===0x1){return _0x1213cb['id'];}else{var _0x4b882c=_[_0xdc7d('0x6b')](_[_0xdc7d('0x20')](_0x14be7f,_0xdc7d('0x6c')),function(_0x212fd2){return _[_0xdc7d('0x6d')](_0x1a4566,_0x212fd2);});if(_0x4b882c){return _0x1213cb['id'];}}}));}}return BPromise[_0xdc7d('0x6e')](_0x41d793)[_0xdc7d('0x16')](function(_0xbdafe1){_0x59c876=_(_0x59c876)[_0xdc7d('0x6f')](_0xbdafe1)['compact']()[_0xdc7d('0x70')]();return db[_0xdc7d('0x21')][_0xdc7d('0x3a')]({'where':{'id':_0x221ffd['params']['id']}})[_0xdc7d('0x16')](function(_0x19200b){return db[_0xdc7d('0x67')][_0xdc7d('0x5a')](function(_0x78b9d1){return _0x19200b[_0xdc7d('0x71')](_0x221ffd[_0xdc7d('0x2e')][_0xdc7d('0x56')],{'transaction':_0x78b9d1})[_0xdc7d('0x16')](function(){if(!_[_0xdc7d('0x72')](_0x59c876)){return _0x19200b[_0xdc7d('0x73')](_0x59c876,{'transaction':_0x78b9d1});}})[_0xdc7d('0x16')](function(){_0x59c876['forEach'](function(_0x3cb301){socket[_0xdc7d('0x5c')](_0xdc7d('0x74'),{'UserId':_0x3cb301,'WhatsappQueueId':_0x19200b['id']});});});});});});})[_0xdc7d('0x16')](respondWithStatusCode(_0x16b640,null))['catch'](handleError(_0x16b640,null));};exports['addAgents']=function(_0x3581e2,_0x6c9ee2){return db[_0xdc7d('0x21')]['find']({'where':{'id':_0x3581e2[_0xdc7d('0x2a')]['id']}})[_0xdc7d('0x16')](handleEntityNotFound(_0x6c9ee2,null))[_0xdc7d('0x16')](function(_0x28276b){if(_0x28276b){return _0x28276b[_0xdc7d('0x75')](_0x3581e2[_0xdc7d('0x36')][_0xdc7d('0x56')],_[_0xdc7d('0x76')](_0x3581e2[_0xdc7d('0x36')],['ids','id'])||{})[_0xdc7d('0x77')](function(_0x50e713){for(var _0x4ef8d1=0x0;_0x4ef8d1<_0x3581e2['body'][_0xdc7d('0x56')][_0xdc7d('0x33')];_0x4ef8d1+=0x1){socket[_0xdc7d('0x5c')](_0xdc7d('0x5d'),{'UserId':Number(_0x3581e2[_0xdc7d('0x36')]['ids'][_0x4ef8d1]),'WhatsappQueueId':Number(_0x3581e2['params']['id'])});}return _0x50e713;});}})[_0xdc7d('0x16')](respondWithResult(_0x6c9ee2,null))[_0xdc7d('0x29')](handleError(_0x6c9ee2,null));};exports[_0xdc7d('0x73')]=function(_0x1497d4,_0x42c7d6){return db[_0xdc7d('0x21')]['find']({'where':{'id':_0x1497d4[_0xdc7d('0x2a')]['id']}})[_0xdc7d('0x16')](handleEntityNotFound(_0x42c7d6,null))['then'](function(_0x50d252){if(_0x50d252){return _0x50d252['removeAgents'](_0x1497d4[_0xdc7d('0x2e')][_0xdc7d('0x56')])[_0xdc7d('0x16')](function(){if(_[_0xdc7d('0x78')](_0x1497d4[_0xdc7d('0x2e')][_0xdc7d('0x56')])){for(var _0x3bfdbc=0x0;_0x3bfdbc<_0x1497d4[_0xdc7d('0x2e')][_0xdc7d('0x56')][_0xdc7d('0x33')];_0x3bfdbc+=0x1){socket['emit'](_0xdc7d('0x74'),{'UserId':Number(_0x1497d4[_0xdc7d('0x2e')][_0xdc7d('0x56')][_0x3bfdbc]),'WhatsappQueueId':Number(_0x1497d4[_0xdc7d('0x2a')]['id'])});}}else{socket[_0xdc7d('0x5c')]('userWhatsappQueue:remove',{'UserId':Number(_0x1497d4[_0xdc7d('0x2e')][_0xdc7d('0x56')]),'WhatsappQueueId':Number(_0x1497d4['params']['id'])});}});}})[_0xdc7d('0x16')](respondWithStatusCode(_0x42c7d6,null))[_0xdc7d('0x29')](handleError(_0x42c7d6,null));};exports[_0xdc7d('0x79')]=function(_0x5dff79,_0x36316e){var _0x560f89={};var _0x175732={};var _0x16b403;var _0x4e0b45;return db[_0xdc7d('0x21')]['findOne']({'where':{'id':_0x5dff79[_0xdc7d('0x2a')]['id']}})['then'](handleEntityNotFound(_0x36316e,null))[_0xdc7d('0x16')](function(_0x81d340){if(_0x81d340){_0x16b403=_0x81d340;_0x175732[_0xdc7d('0x2b')]=_[_0xdc7d('0x2c')](db[_0xdc7d('0x46')][_0xdc7d('0x2d')]);_0x175732[_0xdc7d('0x2e')]=_[_0xdc7d('0x2c')](_0x5dff79['query']);_0x175732[_0xdc7d('0x2f')]=_['intersection'](_0x175732['model'],_0x175732['query']);_0x560f89[_0xdc7d('0x30')]=_[_0xdc7d('0x31')](_0x175732[_0xdc7d('0x2b')],qs['fields'](_0x5dff79[_0xdc7d('0x2e')]['fields']));_0x560f89[_0xdc7d('0x30')]=_0x560f89['attributes']['length']?_0x560f89[_0xdc7d('0x30')]:_0x175732[_0xdc7d('0x2b')];_0x560f89[_0xdc7d('0x50')]=qs['sort'](_0x5dff79[_0xdc7d('0x2e')]['sort']);_0x560f89['where']=qs[_0xdc7d('0x2f')](_[_0xdc7d('0x52')](_0x5dff79[_0xdc7d('0x2e')],_0x175732[_0xdc7d('0x2f')]));if(_0x5dff79[_0xdc7d('0x2e')][_0xdc7d('0x44')]){_0x560f89[_0xdc7d('0x42')]=_['merge'](_0x560f89[_0xdc7d('0x42')],{'$or':_[_0xdc7d('0x20')](_0x560f89[_0xdc7d('0x30')],function(_0x43694f){var _0x158fdf={};_0x158fdf[_0x43694f]={'$like':'%'+_0x5dff79['query'][_0xdc7d('0x44')]+'%'};return _0x158fdf;})});}_0x560f89=_[_0xdc7d('0x45')]({},_0x560f89,_0x5dff79[_0xdc7d('0x34')]);return _0x16b403[_0xdc7d('0x79')](_0x560f89);}})[_0xdc7d('0x16')](function(_0x1c0bfa){if(_0x1c0bfa){_0x4e0b45=_0x1c0bfa['length'];if(!_0x5dff79[_0xdc7d('0x2e')][_0xdc7d('0x41')](_0xdc7d('0x54'))){_0x560f89[_0xdc7d('0x11')]=qs[_0xdc7d('0x11')](_0x5dff79[_0xdc7d('0x2e')][_0xdc7d('0x11')]);_0x560f89['offset']=qs[_0xdc7d('0xf')](_0x5dff79[_0xdc7d('0x2e')][_0xdc7d('0xf')]);}return _0x16b403[_0xdc7d('0x79')](_0x560f89);}})[_0xdc7d('0x16')](function(_0x59b71b){if(_0x59b71b){return _0x59b71b?{'count':_0x4e0b45,'rows':_0x59b71b}:null;}})[_0xdc7d('0x16')](respondWithResult(_0x36316e,null))[_0xdc7d('0x29')](handleError(_0x36316e,null));};
\ No newline at end of file
index f8c38f9..e59acc7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9a6=['WhatsappQueue','setMaxListeners','save','remove','emit','hook','exports','../../mysqldb'];(function(_0x49a1b6,_0x5c9e25){var _0x1612e6=function(_0x8e0186){while(--_0x8e0186){_0x49a1b6['push'](_0x49a1b6['shift']());}};_0x1612e6(++_0x5c9e25);}(_0xa9a6,0x1bf));var _0x6a9a=function(_0x184f64,_0xb0e5d2){_0x184f64=_0x184f64-0x0;var _0x393499=_0xa9a6[_0x184f64];return _0x393499;};'use strict';var EventEmitter=require('events');var WhatsappQueue=require(_0x6a9a('0x0'))['db'][_0x6a9a('0x1')];var WhatsappQueueEvents=new EventEmitter();WhatsappQueueEvents[_0x6a9a('0x2')](0x0);var events={'afterCreate':_0x6a9a('0x3'),'afterUpdate':'update','afterDestroy':_0x6a9a('0x4')};function emitEvent(_0x2e318a){return function(_0x2e5490,_0x1b742f,_0x42f6b3){WhatsappQueueEvents[_0x6a9a('0x5')](_0x2e318a+':'+_0x2e5490['id'],_0x2e5490);WhatsappQueueEvents[_0x6a9a('0x5')](_0x2e318a,_0x2e5490);_0x42f6b3(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];WhatsappQueue[_0x6a9a('0x6')](e,emitEvent(event));}}module[_0x6a9a('0x7')]=WhatsappQueueEvents;
\ No newline at end of file
+var _0xe7cb=['save','update','emit','hasOwnProperty','hook','exports','events','../../mysqldb','WhatsappQueue'];(function(_0x17a49f,_0x4f3c3a){var _0x4e24bd=function(_0x363544){while(--_0x363544){_0x17a49f['push'](_0x17a49f['shift']());}};_0x4e24bd(++_0x4f3c3a);}(_0xe7cb,0xde));var _0xbe7c=function(_0x1dfdb5,_0x4f5868){_0x1dfdb5=_0x1dfdb5-0x0;var _0x7965c0=_0xe7cb[_0x1dfdb5];return _0x7965c0;};'use strict';var EventEmitter=require(_0xbe7c('0x0'));var WhatsappQueue=require(_0xbe7c('0x1'))['db'][_0xbe7c('0x2')];var WhatsappQueueEvents=new EventEmitter();WhatsappQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xbe7c('0x3'),'afterUpdate':_0xbe7c('0x4'),'afterDestroy':'remove'};function emitEvent(_0x41fa95){return function(_0x46ea63,_0x328a67,_0x3e36ab){WhatsappQueueEvents[_0xbe7c('0x5')](_0x41fa95+':'+_0x46ea63['id'],_0x46ea63);WhatsappQueueEvents[_0xbe7c('0x5')](_0x41fa95,_0x46ea63);_0x3e36ab(null);};}for(var e in events){if(events[_0xbe7c('0x6')](e)){var event=events[e];WhatsappQueue[_0xbe7c('0x7')](e,emitEvent(event));}}module[_0xbe7c('0x8')]=WhatsappQueueEvents;
\ No newline at end of file
index ac729a9..61de357 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbc3c=['../../config/environment','./whatsappQueue.attributes','define','WhatsappQueue','whatsapp_queues','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf'];(function(_0x2a7c2d,_0x20816f){var _0xc257a=function(_0x2e1498){while(--_0x2e1498){_0x2a7c2d['push'](_0x2a7c2d['shift']());}};_0xc257a(++_0x20816f);}(_0xbc3c,0x1f3));var _0xcbc3=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0xbc3c[_0x21a9d9];return _0x46adce;};'use strict';var _=require(_0xcbc3('0x0'));var util=require('util');var logger=require(_0xcbc3('0x1'))(_0xcbc3('0x2'));var moment=require(_0xcbc3('0x3'));var BPromise=require(_0xcbc3('0x4'));var rp=require(_0xcbc3('0x5'));var fs=require('fs');var path=require(_0xcbc3('0x6'));var rimraf=require(_0xcbc3('0x7'));var config=require(_0xcbc3('0x8'));var attributes=require(_0xcbc3('0x9'));module['exports']=function(_0xd272ea,_0x107bd4){return _0xd272ea[_0xcbc3('0xa')](_0xcbc3('0xb'),attributes,{'tableName':_0xcbc3('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xbda7=['util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./whatsappQueue.attributes','exports','define','WhatsappQueue','whatsapp_queues','lodash'];(function(_0x335715,_0xd4a18f){var _0x50d417=function(_0x3eb9f7){while(--_0x3eb9f7){_0x335715['push'](_0x335715['shift']());}};_0x50d417(++_0xd4a18f);}(_0xbda7,0xfb));var _0x7bda=function(_0x4e9010,_0x1fa085){_0x4e9010=_0x4e9010-0x0;var _0x4188c6=_0xbda7[_0x4e9010];return _0x4188c6;};'use strict';var _=require(_0x7bda('0x0'));var util=require(_0x7bda('0x1'));var logger=require(_0x7bda('0x2'))('api');var moment=require(_0x7bda('0x3'));var BPromise=require(_0x7bda('0x4'));var rp=require(_0x7bda('0x5'));var fs=require('fs');var path=require(_0x7bda('0x6'));var rimraf=require(_0x7bda('0x7'));var config=require(_0x7bda('0x8'));var attributes=require(_0x7bda('0x9'));module[_0x7bda('0xa')]=function(_0x93815b,_0x334af1){return _0x93815b[_0x7bda('0xb')](_0x7bda('0xc'),attributes,{'tableName':_0x7bda('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 1abb3d6..c00360e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb39d=['request\x20sent','debug','stringify','error','code','message','info','GetWhatsappQueue','WhatsappQueue','options','raw','where','attributes','include','map','model','catch','find','ShowWhatsappQueue','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','./whatsappQueue.socket','register','request','then','WhatsappQueue,\x20%s,\x20%s'];(function(_0x2adbeb,_0x5581be){var _0x5e18a6=function(_0x84e42b){while(--_0x84e42b){_0x2adbeb['push'](_0x2adbeb['shift']());}};_0x5e18a6(++_0x5581be);}(_0xb39d,0x184));var _0xdb39=function(_0x1b6311,_0x42ec20){_0x1b6311=_0x1b6311-0x0;var _0x25aab6=_0xb39d[_0x1b6311];return _0x25aab6;};'use strict';var _=require(_0xdb39('0x0'));var util=require('util');var moment=require(_0xdb39('0x1'));var BPromise=require(_0xdb39('0x2'));var rs=require(_0xdb39('0x3'));var fs=require('fs');var Redis=require(_0xdb39('0x4'));var db=require(_0xdb39('0x5'))['db'];var utils=require(_0xdb39('0x6'));var logger=require(_0xdb39('0x7'))(_0xdb39('0x8'));var config=require(_0xdb39('0x9'));var jayson=require(_0xdb39('0xa'));var client=jayson[_0xdb39('0xb')][_0xdb39('0xc')]({'port':0x232a});config['redis']=_[_0xdb39('0xd')](config[_0xdb39('0xe')],{'host':_0xdb39('0xf'),'port':0x18eb});var socket=require(_0xdb39('0x10'))(new Redis(config['redis']));require(_0xdb39('0x11'))[_0xdb39('0x12')](socket);function respondWithRpcPromise(_0x302980,_0x145c47,_0x4971b0){return new BPromise(function(_0x171b92,_0x310cbf){return client[_0xdb39('0x13')](_0x302980,_0x4971b0)[_0xdb39('0x14')](function(_0x4da62d){logger['info'](_0xdb39('0x15'),_0x145c47,_0xdb39('0x16'));logger[_0xdb39('0x17')]('WhatsappQueue,\x20%s,\x20%s,\x20%s',_0x145c47,_0xdb39('0x16'),JSON[_0xdb39('0x18')](_0x4da62d));if(_0x4da62d[_0xdb39('0x19')]){if(_0x4da62d[_0xdb39('0x19')][_0xdb39('0x1a')]===0x1f4){logger[_0xdb39('0x19')](_0xdb39('0x15'),_0x145c47,_0x4da62d[_0xdb39('0x19')][_0xdb39('0x1b')]);return _0x310cbf(_0x4da62d['error'][_0xdb39('0x1b')]);}logger['error'](_0xdb39('0x15'),_0x145c47,_0x4da62d[_0xdb39('0x19')]['message']);return _0x171b92(_0x4da62d[_0xdb39('0x19')][_0xdb39('0x1b')]);}else{logger[_0xdb39('0x1c')](_0xdb39('0x15'),_0x145c47,_0xdb39('0x16'));_0x171b92(_0x4da62d['result'][_0xdb39('0x1b')]);}})['catch'](function(_0x2b798d){logger[_0xdb39('0x19')](_0xdb39('0x15'),_0x145c47,_0x2b798d);_0x310cbf(_0x2b798d);});});}exports[_0xdb39('0x1d')]=function(_0x3a0936){var _0x1ba886=this;return new Promise(function(_0x16b69b,_0x2e4e56){return db[_0xdb39('0x1e')]['findAll']({'raw':_0x3a0936[_0xdb39('0x1f')]?_0x3a0936[_0xdb39('0x1f')][_0xdb39('0x20')]===undefined?!![]:![]:!![],'where':_0x3a0936['options']?_0x3a0936[_0xdb39('0x1f')][_0xdb39('0x21')]||null:null,'attributes':_0x3a0936['options']?_0x3a0936[_0xdb39('0x1f')][_0xdb39('0x22')]||null:null,'limit':_0x3a0936['options']?_0x3a0936['options']['limit']||null:null,'include':_0x3a0936['options']?_0x3a0936['options'][_0xdb39('0x23')]?_[_0xdb39('0x24')](_0x3a0936[_0xdb39('0x1f')]['include'],function(_0x5d491d){return{'model':db[_0x5d491d[_0xdb39('0x25')]],'as':_0x5d491d['as'],'attributes':_0x5d491d['attributes'],'include':_0x5d491d['include']?_[_0xdb39('0x24')](_0x5d491d[_0xdb39('0x23')],function(_0x60e9cb){return{'model':db[_0x60e9cb[_0xdb39('0x25')]],'as':_0x60e9cb['as'],'attributes':_0x60e9cb[_0xdb39('0x22')],'include':_0x60e9cb[_0xdb39('0x23')]?_[_0xdb39('0x24')](_0x60e9cb['include'],function(_0x4efd4c){return{'model':db[_0x4efd4c[_0xdb39('0x25')]],'as':_0x4efd4c['as'],'attributes':_0x4efd4c[_0xdb39('0x22')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x28bdb0){logger[_0xdb39('0x1c')](_0xdb39('0x1d'),_0x3a0936);logger['debug'](_0xdb39('0x1d'),_0x3a0936,JSON[_0xdb39('0x18')](_0x28bdb0));_0x16b69b(_0x28bdb0);})[_0xdb39('0x26')](function(_0x5307ef){logger['error'](_0xdb39('0x1d'),_0x5307ef[_0xdb39('0x1b')],_0x3a0936);_0x2e4e56(_0x1ba886[_0xdb39('0x19')](0x1f4,_0x5307ef[_0xdb39('0x1b')]));});});};exports['ShowWhatsappQueue']=function(_0x21f8f8){var _0x524e5f=this;return new Promise(function(_0x36c3e0,_0x1d6fbf){return db[_0xdb39('0x1e')][_0xdb39('0x27')]({'raw':_0x21f8f8[_0xdb39('0x1f')]?_0x21f8f8[_0xdb39('0x1f')][_0xdb39('0x20')]===undefined?!![]:![]:!![],'where':_0x21f8f8[_0xdb39('0x1f')]?_0x21f8f8[_0xdb39('0x1f')][_0xdb39('0x21')]||null:null,'attributes':_0x21f8f8[_0xdb39('0x1f')]?_0x21f8f8[_0xdb39('0x1f')][_0xdb39('0x22')]||null:null,'include':_0x21f8f8[_0xdb39('0x1f')]?_0x21f8f8['options'][_0xdb39('0x23')]?_['map'](_0x21f8f8[_0xdb39('0x1f')][_0xdb39('0x23')],function(_0x57e93e){return{'model':db[_0x57e93e[_0xdb39('0x25')]],'as':_0x57e93e['as'],'attributes':_0x57e93e[_0xdb39('0x22')],'include':_0x57e93e[_0xdb39('0x23')]?_[_0xdb39('0x24')](_0x57e93e[_0xdb39('0x23')],function(_0x696621){return{'model':db[_0x696621['model']],'as':_0x696621['as'],'attributes':_0x696621[_0xdb39('0x22')],'include':_0x696621['include']?_[_0xdb39('0x24')](_0x696621['include'],function(_0x3659da){return{'model':db[_0x3659da[_0xdb39('0x25')]],'as':_0x3659da['as'],'attributes':_0x3659da['attributes']};}):[]};}):[]};}):[]:[]})[_0xdb39('0x14')](function(_0x4dd42a){logger[_0xdb39('0x1c')](_0xdb39('0x28'),_0x21f8f8);logger[_0xdb39('0x17')]('ShowWhatsappQueue',_0x21f8f8,JSON[_0xdb39('0x18')](_0x4dd42a));_0x36c3e0(_0x4dd42a);})[_0xdb39('0x26')](function(_0x5a8d3e){logger[_0xdb39('0x19')](_0xdb39('0x28'),_0x5a8d3e[_0xdb39('0x1b')],_0x21f8f8);_0x1d6fbf(_0x524e5f[_0xdb39('0x19')](0x1f4,_0x5a8d3e[_0xdb39('0x1b')]));});});};
\ No newline at end of file
+var _0x24cf=['error','code','message','result','catch','GetWhatsappQueue','WhatsappQueue','findAll','options','where','limit','include','map','model','attributes','then','ShowWhatsappQueue','find','raw','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./whatsappQueue.socket','register','info','WhatsappQueue,\x20%s,\x20%s','request\x20sent','debug','stringify'];(function(_0x1d3756,_0x3411bb){var _0x3dd1a8=function(_0x454358){while(--_0x454358){_0x1d3756['push'](_0x1d3756['shift']());}};_0x3dd1a8(++_0x3411bb);}(_0x24cf,0x17b));var _0xf24c=function(_0xf60c8,_0xf932a4){_0xf60c8=_0xf60c8-0x0;var _0x3816a1=_0x24cf[_0xf60c8];return _0x3816a1;};'use strict';var _=require('lodash');var util=require(_0xf24c('0x0'));var moment=require(_0xf24c('0x1'));var BPromise=require('bluebird');var rs=require(_0xf24c('0x2'));var fs=require('fs');var Redis=require(_0xf24c('0x3'));var db=require(_0xf24c('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xf24c('0x5'))(_0xf24c('0x6'));var config=require(_0xf24c('0x7'));var jayson=require(_0xf24c('0x8'));var client=jayson['client'][_0xf24c('0x9')]({'port':0x232a});config[_0xf24c('0xa')]=_[_0xf24c('0xb')](config['redis'],{'host':_0xf24c('0xc'),'port':0x18eb});var socket=require(_0xf24c('0xd'))(new Redis(config[_0xf24c('0xa')]));require(_0xf24c('0xe'))[_0xf24c('0xf')](socket);function respondWithRpcPromise(_0x2325f4,_0x31645b,_0xf1ab01){return new BPromise(function(_0x286101,_0x3fbf85){return client['request'](_0x2325f4,_0xf1ab01)['then'](function(_0x90fe90){logger[_0xf24c('0x10')](_0xf24c('0x11'),_0x31645b,_0xf24c('0x12'));logger[_0xf24c('0x13')]('WhatsappQueue,\x20%s,\x20%s,\x20%s',_0x31645b,'request\x20sent',JSON[_0xf24c('0x14')](_0x90fe90));if(_0x90fe90[_0xf24c('0x15')]){if(_0x90fe90[_0xf24c('0x15')][_0xf24c('0x16')]===0x1f4){logger[_0xf24c('0x15')]('WhatsappQueue,\x20%s,\x20%s',_0x31645b,_0x90fe90[_0xf24c('0x15')]['message']);return _0x3fbf85(_0x90fe90[_0xf24c('0x15')][_0xf24c('0x17')]);}logger['error'](_0xf24c('0x11'),_0x31645b,_0x90fe90[_0xf24c('0x15')][_0xf24c('0x17')]);return _0x286101(_0x90fe90[_0xf24c('0x15')]['message']);}else{logger[_0xf24c('0x10')]('WhatsappQueue,\x20%s,\x20%s',_0x31645b,_0xf24c('0x12'));_0x286101(_0x90fe90[_0xf24c('0x18')]['message']);}})[_0xf24c('0x19')](function(_0x2bd9d2){logger[_0xf24c('0x15')]('WhatsappQueue,\x20%s,\x20%s',_0x31645b,_0x2bd9d2);_0x3fbf85(_0x2bd9d2);});});}exports[_0xf24c('0x1a')]=function(_0x516df8){var _0x1d043b=this;return new Promise(function(_0x4dae4e,_0x59b000){return db[_0xf24c('0x1b')][_0xf24c('0x1c')]({'raw':_0x516df8[_0xf24c('0x1d')]?_0x516df8[_0xf24c('0x1d')]['raw']===undefined?!![]:![]:!![],'where':_0x516df8['options']?_0x516df8[_0xf24c('0x1d')][_0xf24c('0x1e')]||null:null,'attributes':_0x516df8[_0xf24c('0x1d')]?_0x516df8[_0xf24c('0x1d')]['attributes']||null:null,'limit':_0x516df8[_0xf24c('0x1d')]?_0x516df8[_0xf24c('0x1d')][_0xf24c('0x1f')]||null:null,'include':_0x516df8['options']?_0x516df8['options'][_0xf24c('0x20')]?_[_0xf24c('0x21')](_0x516df8[_0xf24c('0x1d')][_0xf24c('0x20')],function(_0x622aeb){return{'model':db[_0x622aeb[_0xf24c('0x22')]],'as':_0x622aeb['as'],'attributes':_0x622aeb['attributes'],'include':_0x622aeb[_0xf24c('0x20')]?_[_0xf24c('0x21')](_0x622aeb[_0xf24c('0x20')],function(_0x389688){return{'model':db[_0x389688[_0xf24c('0x22')]],'as':_0x389688['as'],'attributes':_0x389688[_0xf24c('0x23')],'include':_0x389688['include']?_['map'](_0x389688['include'],function(_0xfc67e1){return{'model':db[_0xfc67e1['model']],'as':_0xfc67e1['as'],'attributes':_0xfc67e1[_0xf24c('0x23')]};}):[]};}):[]};}):[]:[]})[_0xf24c('0x24')](function(_0x6baadd){logger[_0xf24c('0x10')]('GetWhatsappQueue',_0x516df8);logger[_0xf24c('0x13')](_0xf24c('0x1a'),_0x516df8,JSON[_0xf24c('0x14')](_0x6baadd));_0x4dae4e(_0x6baadd);})[_0xf24c('0x19')](function(_0x2fbd6a){logger[_0xf24c('0x15')]('GetWhatsappQueue',_0x2fbd6a[_0xf24c('0x17')],_0x516df8);_0x59b000(_0x1d043b['error'](0x1f4,_0x2fbd6a[_0xf24c('0x17')]));});});};exports[_0xf24c('0x25')]=function(_0x25ca7d){var _0x3bf5a7=this;return new Promise(function(_0x31e854,_0xe982a0){return db[_0xf24c('0x1b')][_0xf24c('0x26')]({'raw':_0x25ca7d[_0xf24c('0x1d')]?_0x25ca7d[_0xf24c('0x1d')][_0xf24c('0x27')]===undefined?!![]:![]:!![],'where':_0x25ca7d[_0xf24c('0x1d')]?_0x25ca7d[_0xf24c('0x1d')][_0xf24c('0x1e')]||null:null,'attributes':_0x25ca7d[_0xf24c('0x1d')]?_0x25ca7d[_0xf24c('0x1d')]['attributes']||null:null,'include':_0x25ca7d[_0xf24c('0x1d')]?_0x25ca7d[_0xf24c('0x1d')]['include']?_[_0xf24c('0x21')](_0x25ca7d[_0xf24c('0x1d')][_0xf24c('0x20')],function(_0x350cdf){return{'model':db[_0x350cdf['model']],'as':_0x350cdf['as'],'attributes':_0x350cdf[_0xf24c('0x23')],'include':_0x350cdf[_0xf24c('0x20')]?_[_0xf24c('0x21')](_0x350cdf['include'],function(_0x1b014a){return{'model':db[_0x1b014a[_0xf24c('0x22')]],'as':_0x1b014a['as'],'attributes':_0x1b014a[_0xf24c('0x23')],'include':_0x1b014a[_0xf24c('0x20')]?_['map'](_0x1b014a[_0xf24c('0x20')],function(_0x3b06e8){return{'model':db[_0x3b06e8[_0xf24c('0x22')]],'as':_0x3b06e8['as'],'attributes':_0x3b06e8['attributes']};}):[]};}):[]};}):[]:[]})[_0xf24c('0x24')](function(_0x21dc1f){logger[_0xf24c('0x10')](_0xf24c('0x25'),_0x25ca7d);logger[_0xf24c('0x13')](_0xf24c('0x25'),_0x25ca7d,JSON[_0xf24c('0x14')](_0x21dc1f));_0x31e854(_0x21dc1f);})['catch'](function(_0x187564){logger[_0xf24c('0x15')](_0xf24c('0x25'),_0x187564[_0xf24c('0x17')],_0x25ca7d);_0xe982a0(_0x3bf5a7[_0xf24c('0x15')](0x1f4,_0x187564[_0xf24c('0x17')]));});});};
\ No newline at end of file
index 91e6920..e008bef 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb31f=['whatsappQueue:','./whatsappQueue.events','save','remove','update','emit','removeListener','register','length'];(function(_0x1ad99b,_0x54f63b){var _0xd12b80=function(_0x3df08b){while(--_0x3df08b){_0x1ad99b['push'](_0x1ad99b['shift']());}};_0xd12b80(++_0x54f63b);}(_0xb31f,0x196));var _0xfb31=function(_0x158f01,_0x12af3e){_0x158f01=_0x158f01-0x0;var _0x5ef74e=_0xb31f[_0x158f01];return _0x5ef74e;};'use strict';var WhatsappQueueEvents=require(_0xfb31('0x0'));var events=[_0xfb31('0x1'),_0xfb31('0x2'),_0xfb31('0x3')];function createListener(_0x14bcf6,_0x1c5fcd){return function(_0x142a14){_0x1c5fcd[_0xfb31('0x4')](_0x14bcf6,_0x142a14);};}function removeListener(_0x33e745,_0x162d04){return function(){WhatsappQueueEvents[_0xfb31('0x5')](_0x33e745,_0x162d04);};}exports[_0xfb31('0x6')]=function(_0x265c61){for(var _0xc53a6f=0x0,_0x20ff9a=events[_0xfb31('0x7')];_0xc53a6f<_0x20ff9a;_0xc53a6f++){var _0x45fe2f=events[_0xc53a6f];var _0x4cca7f=createListener(_0xfb31('0x8')+_0x45fe2f,_0x265c61);WhatsappQueueEvents['on'](_0x45fe2f,_0x4cca7f);}};
\ No newline at end of file
+var _0x203d=['./whatsappQueue.events','remove','update','emit','removeListener','register','length','whatsappQueue:'];(function(_0x1422dd,_0x4465cf){var _0x304e54=function(_0xb46c63){while(--_0xb46c63){_0x1422dd['push'](_0x1422dd['shift']());}};_0x304e54(++_0x4465cf);}(_0x203d,0xc8));var _0xd203=function(_0xb833b1,_0x1c3d3f){_0xb833b1=_0xb833b1-0x0;var _0x1ab87a=_0x203d[_0xb833b1];return _0x1ab87a;};'use strict';var WhatsappQueueEvents=require(_0xd203('0x0'));var events=['save',_0xd203('0x1'),_0xd203('0x2')];function createListener(_0x5bd63e,_0x11d3f6){return function(_0x4dcfbc){_0x11d3f6[_0xd203('0x3')](_0x5bd63e,_0x4dcfbc);};}function removeListener(_0x411b41,_0x3ccb30){return function(){WhatsappQueueEvents[_0xd203('0x4')](_0x411b41,_0x3ccb30);};}exports[_0xd203('0x5')]=function(_0x5bcebb){for(var _0x5deb86=0x0,_0x329701=events[_0xd203('0x6')];_0x5deb86<_0x329701;_0x5deb86++){var _0x70b46c=events[_0x5deb86];var _0x1f551e=createListener(_0xd203('0x7')+_0x70b46c,_0x5bcebb);WhatsappQueueEvents['on'](_0x70b46c,_0x1f551e);}};
\ No newline at end of file
index b474217..348f607 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfd0b=['multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/describe','/:id','show','create','put','update','delete','destroy','exports'];(function(_0x32b9c9,_0x5881e6){var _0x1a837f=function(_0x2edd85){while(--_0x2edd85){_0x32b9c9['push'](_0x32b9c9['shift']());}};_0x1a837f(++_0x5881e6);}(_0xfd0b,0xbe));var _0xbfd0=function(_0x3291c8,_0x31d97b){_0x3291c8=_0x3291c8-0x0;var _0x444d41=_0xfd0b[_0x3291c8];return _0x444d41;};'use strict';var multer=require(_0xbfd0('0x0'));var util=require(_0xbfd0('0x1'));var path=require('path');var timeout=require(_0xbfd0('0x2'));var express=require(_0xbfd0('0x3'));var router=express[_0xbfd0('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xbfd0('0x5'));var interaction=require(_0xbfd0('0x6'));var config=require(_0xbfd0('0x7'));var controller=require('./whatsappQueueReport.controller');router[_0xbfd0('0x8')]('/',auth[_0xbfd0('0x9')](),controller['index']);router[_0xbfd0('0x8')](_0xbfd0('0xa'),auth['isAuthenticated'](),controller['describe']);router[_0xbfd0('0x8')](_0xbfd0('0xb'),auth['isAuthenticated'](),controller[_0xbfd0('0xc')]);router['post']('/',auth[_0xbfd0('0x9')](),controller[_0xbfd0('0xd')]);router[_0xbfd0('0xe')]('/:id',auth[_0xbfd0('0x9')](),controller[_0xbfd0('0xf')]);router[_0xbfd0('0x10')](_0xbfd0('0xb'),auth[_0xbfd0('0x9')](),controller[_0xbfd0('0x11')]);module[_0xbfd0('0x12')]=router;
\ No newline at end of file
+var _0xb8d9=['../../components/interaction/service','./whatsappQueueReport.controller','get','isAuthenticated','describe','/:id','show','create','put','update','delete','exports','multer','connect-timeout','express'];(function(_0x4801a0,_0x252c24){var _0x338e26=function(_0x1599c2){while(--_0x1599c2){_0x4801a0['push'](_0x4801a0['shift']());}};_0x338e26(++_0x252c24);}(_0xb8d9,0x11a));var _0x9b8d=function(_0x1e736c,_0x4ea18c){_0x1e736c=_0x1e736c-0x0;var _0x38c68d=_0xb8d9[_0x1e736c];return _0x38c68d;};'use strict';var multer=require(_0x9b8d('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x9b8d('0x1'));var express=require(_0x9b8d('0x2'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x9b8d('0x3'));var config=require('../../config/environment');var controller=require(_0x9b8d('0x4'));router[_0x9b8d('0x5')]('/',auth[_0x9b8d('0x6')](),controller['index']);router[_0x9b8d('0x5')]('/describe',auth[_0x9b8d('0x6')](),controller[_0x9b8d('0x7')]);router[_0x9b8d('0x5')](_0x9b8d('0x8'),auth[_0x9b8d('0x6')](),controller[_0x9b8d('0x9')]);router['post']('/',auth[_0x9b8d('0x6')](),controller[_0x9b8d('0xa')]);router[_0x9b8d('0xb')]('/:id',auth[_0x9b8d('0x6')](),controller[_0x9b8d('0xc')]);router[_0x9b8d('0xd')](_0x9b8d('0x8'),auth['isAuthenticated'](),controller['destroy']);module[_0x9b8d('0xe')]=router;
\ No newline at end of file
index 8dde28b..362eb15 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9957=['exports','STRING','DATE','sequelize'];(function(_0x2dd93b,_0x30065b){var _0x25abe3=function(_0x1d28d6){while(--_0x1d28d6){_0x2dd93b['push'](_0x2dd93b['shift']());}};_0x25abe3(++_0x30065b);}(_0x9957,0x93));var _0x7995=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0x9957[_0xbca1b1];return _0x4e1686;};'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(_0x4c7d81,_0x2a698c){var _0x1aa6bd=function(_0x31ecc8){while(--_0x31ecc8){_0x4c7d81['push'](_0x4c7d81['shift']());}};_0x1aa6bd(++_0x2a698c);}(_0x7a54,0x106));var _0x47a5=function(_0xbc0126,_0x3999e5){_0xbc0126=_0xbc0126-0x0;var _0x3458d6=_0x7a54[_0xbc0126];return _0x3458d6;};'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 4059121..bb5832f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe2cf=['body','destroy','describe','rimraf','fast-json-patch','moment','bluebird','mustache','util','sox','to-csv','lodash','squel','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','json','offset','undefined','count','limit','Content-Range','apply','reject','save','update','then','end','error','stack','name','index','WhatsappQueueReport','rawAttributes','fieldName','type','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','sort','where','pick','VIRTUAL','filter','merge','options','includeAll','include','findAll','rows','catch','show','params'];(function(_0x55b07e,_0x12269d){var _0x5f1d50=function(_0x37c6cb){while(--_0x37c6cb){_0x55b07e['push'](_0x55b07e['shift']());}};_0x5f1d50(++_0x12269d);}(_0xe2cf,0x1a1));var _0xfe2c=function(_0x58176f,_0x55a4e5){_0x58176f=_0x58176f-0x0;var _0x14ccb0=_0xe2cf[_0x58176f];return _0x14ccb0;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xfe2c('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xfe2c('0x1'));var rp=require('request-promise');var moment=require(_0xfe2c('0x2'));var BPromise=require(_0xfe2c('0x3'));var Mustache=require(_0xfe2c('0x4'));var util=require(_0xfe2c('0x5'));var path=require('path');var sox=require(_0xfe2c('0x6'));var csv=require(_0xfe2c('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xfe2c('0x8'));var squel=require(_0xfe2c('0x9'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xfe2c('0xa'));var toCsv=require(_0xfe2c('0x7'));var querystring=require(_0xfe2c('0xb'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xfe2c('0xc'));var qs=require(_0xfe2c('0xd'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xfe2c('0xe'));var logger=require(_0xfe2c('0xf'))(_0xfe2c('0x10'));var utils=require(_0xfe2c('0x11'));var config=require(_0xfe2c('0x12'));var licenseUtil=require(_0xfe2c('0x13'));var db=require(_0xfe2c('0x14'))['db'];function respondWithStatusCode(_0x4af8b7,_0x5e7389){_0x5e7389=_0x5e7389||0xcc;return function(_0x59ecf8){if(_0x59ecf8){return _0x4af8b7['sendStatus'](_0x5e7389);}return _0x4af8b7[_0xfe2c('0x15')](_0x5e7389)['end']();};}function respondWithResult(_0x5a6ad5,_0x38ba2c){_0x38ba2c=_0x38ba2c||0xc8;return function(_0x4d0a10){if(_0x4d0a10){return _0x5a6ad5[_0xfe2c('0x15')](_0x38ba2c)[_0xfe2c('0x16')](_0x4d0a10);}};}function respondWithFilteredResult(_0x522692,_0x5039cb){return function(_0x1a4684){if(_0x1a4684){var _0x3b3ebd=typeof _0x5039cb[_0xfe2c('0x17')]===_0xfe2c('0x18')&&typeof _0x5039cb['limit']===_0xfe2c('0x18');var _0x96a3a3=_0x1a4684[_0xfe2c('0x19')];var _0x23242b=_0x3b3ebd?0x0:_0x5039cb[_0xfe2c('0x17')];var _0x13f233=_0x3b3ebd?_0x1a4684['count']:_0x5039cb[_0xfe2c('0x17')]+_0x5039cb[_0xfe2c('0x1a')];var _0x1d7852;if(_0x13f233>=_0x96a3a3){_0x13f233=_0x96a3a3;_0x1d7852=0xc8;}else{_0x1d7852=0xce;}_0x522692[_0xfe2c('0x15')](_0x1d7852);return _0x522692['set'](_0xfe2c('0x1b'),_0x23242b+'-'+_0x13f233+'/'+_0x96a3a3)['json'](_0x1a4684);}return null;};}function patchUpdates(_0x4e9137){return function(_0x408f31){try{jsonpatch[_0xfe2c('0x1c')](_0x408f31,_0x4e9137,!![]);}catch(_0x4bf7c0){return BPromise[_0xfe2c('0x1d')](_0x4bf7c0);}return _0x408f31[_0xfe2c('0x1e')]();};}function saveUpdates(_0x5e609f,_0x1bd50e){return function(_0x5dd54b){if(_0x5dd54b){return _0x5dd54b[_0xfe2c('0x1f')](_0x5e609f)[_0xfe2c('0x20')](function(_0x8b5c0d){return _0x8b5c0d;});}return null;};}function removeEntity(_0x298819,_0x360928){return function(_0x2ee3b3){if(_0x2ee3b3){return _0x2ee3b3['destroy']()[_0xfe2c('0x20')](function(){_0x298819[_0xfe2c('0x15')](0xcc)[_0xfe2c('0x21')]();});}};}function handleEntityNotFound(_0x26448c,_0x3486b5){return function(_0x10afde){if(!_0x10afde){_0x26448c['sendStatus'](0x194);}return _0x10afde;};}function handleError(_0x205da8,_0x5e8abf){_0x5e8abf=_0x5e8abf||0x1f4;return function(_0x16daf3){logger[_0xfe2c('0x22')](_0x16daf3[_0xfe2c('0x23')]);if(_0x16daf3['name']){delete _0x16daf3[_0xfe2c('0x24')];}_0x205da8[_0xfe2c('0x15')](_0x5e8abf)['send'](_0x16daf3);};}exports[_0xfe2c('0x25')]=function(_0x1b6eb7,_0x3352e8){var _0x53a8c1={},_0x170026={},_0x1b7c91={'count':0x0,'rows':[]};var _0x55aed7=_['map'](db[_0xfe2c('0x26')][_0xfe2c('0x27')],function(_0x1a5e15){return{'name':_0x1a5e15[_0xfe2c('0x28')],'type':_0x1a5e15[_0xfe2c('0x29')]['key']};});_0x170026[_0xfe2c('0x2a')]=_[_0xfe2c('0x2b')](_0x55aed7,_0xfe2c('0x24'));_0x170026[_0xfe2c('0x2c')]=_[_0xfe2c('0x2d')](_0x1b6eb7[_0xfe2c('0x2c')]);_0x170026[_0xfe2c('0x2e')]=_[_0xfe2c('0x2f')](_0x170026[_0xfe2c('0x2a')],_0x170026[_0xfe2c('0x2c')]);_0x53a8c1[_0xfe2c('0x30')]=_[_0xfe2c('0x2f')](_0x170026['model'],qs[_0xfe2c('0x31')](_0x1b6eb7[_0xfe2c('0x2c')][_0xfe2c('0x31')]));_0x53a8c1['attributes']=_0x53a8c1[_0xfe2c('0x30')][_0xfe2c('0x32')]?_0x53a8c1['attributes']:_0x170026[_0xfe2c('0x2a')];if(!_0x1b6eb7[_0xfe2c('0x2c')][_0xfe2c('0x33')]('nolimit')){_0x53a8c1[_0xfe2c('0x1a')]=qs[_0xfe2c('0x1a')](_0x1b6eb7[_0xfe2c('0x2c')][_0xfe2c('0x1a')]);_0x53a8c1[_0xfe2c('0x17')]=qs[_0xfe2c('0x17')](_0x1b6eb7[_0xfe2c('0x2c')]['offset']);}_0x53a8c1['order']=qs[_0xfe2c('0x34')](_0x1b6eb7[_0xfe2c('0x2c')][_0xfe2c('0x34')]);_0x53a8c1[_0xfe2c('0x35')]=qs['filters'](_[_0xfe2c('0x36')](_0x1b6eb7['query'],_0x170026[_0xfe2c('0x2e')]),_0x55aed7);if(_0x1b6eb7[_0xfe2c('0x2c')]['filter']){_0x53a8c1[_0xfe2c('0x35')]=_['merge'](_0x53a8c1['where'],{'$or':_[_0xfe2c('0x2b')](_0x55aed7,function(_0x3d3b5e){if(_0x3d3b5e[_0xfe2c('0x29')]!==_0xfe2c('0x37')){var _0xae2808={};_0xae2808[_0x3d3b5e[_0xfe2c('0x24')]]={'$like':'%'+_0x1b6eb7[_0xfe2c('0x2c')][_0xfe2c('0x38')]+'%'};return _0xae2808;}})});}_0x53a8c1=_[_0xfe2c('0x39')]({},_0x53a8c1,_0x1b6eb7[_0xfe2c('0x3a')]);var _0x222335={'where':_0x53a8c1['where']};return db[_0xfe2c('0x26')][_0xfe2c('0x19')](_0x222335)[_0xfe2c('0x20')](function(_0x55ea45){_0x1b7c91['count']=_0x55ea45;if(_0x1b6eb7['query'][_0xfe2c('0x3b')]){_0x53a8c1[_0xfe2c('0x3c')]=[{'all':!![]}];}return db[_0xfe2c('0x26')][_0xfe2c('0x3d')](_0x53a8c1);})['then'](function(_0x1ed30b){_0x1b7c91[_0xfe2c('0x3e')]=_0x1ed30b;return _0x1b7c91;})[_0xfe2c('0x20')](respondWithFilteredResult(_0x3352e8,_0x53a8c1))[_0xfe2c('0x3f')](handleError(_0x3352e8,null));};exports[_0xfe2c('0x40')]=function(_0x48e361,_0x5a8d4e){var _0xeb04b9={'raw':!![],'where':{'id':_0x48e361[_0xfe2c('0x41')]['id']}},_0x6055dd={};_0x6055dd['model']=_['keys'](db[_0xfe2c('0x26')][_0xfe2c('0x27')]);_0x6055dd['query']=_[_0xfe2c('0x2d')](_0x48e361[_0xfe2c('0x2c')]);_0x6055dd[_0xfe2c('0x2e')]=_[_0xfe2c('0x2f')](_0x6055dd['model'],_0x6055dd[_0xfe2c('0x2c')]);_0xeb04b9[_0xfe2c('0x30')]=_[_0xfe2c('0x2f')](_0x6055dd[_0xfe2c('0x2a')],qs[_0xfe2c('0x31')](_0x48e361[_0xfe2c('0x2c')][_0xfe2c('0x31')]));_0xeb04b9[_0xfe2c('0x30')]=_0xeb04b9['attributes'][_0xfe2c('0x32')]?_0xeb04b9['attributes']:_0x6055dd[_0xfe2c('0x2a')];if(_0x48e361[_0xfe2c('0x2c')][_0xfe2c('0x3b')]){_0xeb04b9[_0xfe2c('0x3c')]=[{'all':!![]}];}_0xeb04b9=_['merge']({},_0xeb04b9,_0x48e361['options']);return db['WhatsappQueueReport']['find'](_0xeb04b9)['then'](handleEntityNotFound(_0x5a8d4e,null))[_0xfe2c('0x20')](respondWithResult(_0x5a8d4e,null))['catch'](handleError(_0x5a8d4e,null));};exports['create']=function(_0x22adee,_0x5d76be){return db[_0xfe2c('0x26')]['create'](_0x22adee[_0xfe2c('0x42')],{})[_0xfe2c('0x20')](respondWithResult(_0x5d76be,0xc9))[_0xfe2c('0x3f')](handleError(_0x5d76be,null));};exports[_0xfe2c('0x1f')]=function(_0x3cfda2,_0x57ad76){if(_0x3cfda2[_0xfe2c('0x42')]['id']){delete _0x3cfda2[_0xfe2c('0x42')]['id'];}return db[_0xfe2c('0x26')]['find']({'where':{'id':_0x3cfda2[_0xfe2c('0x41')]['id']}})[_0xfe2c('0x20')](handleEntityNotFound(_0x57ad76,null))['then'](saveUpdates(_0x3cfda2['body'],null))['then'](respondWithResult(_0x57ad76,null))[_0xfe2c('0x3f')](handleError(_0x57ad76,null));};exports[_0xfe2c('0x43')]=function(_0x47023e,_0x2e0012){return db[_0xfe2c('0x26')]['find']({'where':{'id':_0x47023e[_0xfe2c('0x41')]['id']}})[_0xfe2c('0x20')](handleEntityNotFound(_0x2e0012,null))[_0xfe2c('0x20')](removeEntity(_0x2e0012,null))['catch'](handleError(_0x2e0012,null));};exports['describe']=function(_0x3e7c9f,_0xa711b0){return db[_0xfe2c('0x26')][_0xfe2c('0x44')]()[_0xfe2c('0x20')](respondWithResult(_0xa711b0,null))[_0xfe2c('0x3f')](handleError(_0xa711b0,null));};
\ No newline at end of file
+var _0x84a0=['fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','type','options','includeAll','include','findAll','rows','catch','params','rawAttributes','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','path','sox','ejs','fs-extra','lodash','squel','crypto','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','undefined','offset','count','limit','set','Content-Range','apply','save','update','destroy','then','name','map','WhatsappQueueReport'];(function(_0x2c94ad,_0x13e8be){var _0x4b6732=function(_0x6d3c2a){while(--_0x6d3c2a){_0x2c94ad['push'](_0x2c94ad['shift']());}};_0x4b6732(++_0x13e8be);}(_0x84a0,0x66));var _0x084a=function(_0x9c473d,_0x102fa4){_0x9c473d=_0x9c473d-0x0;var _0x25369d=_0x84a0[_0x9c473d];return _0x25369d;};'use strict';var emlformat=require(_0x084a('0x0'));var rimraf=require(_0x084a('0x1'));var zipdir=require(_0x084a('0x2'));var jsonpatch=require(_0x084a('0x3'));var rp=require('request-promise');var moment=require(_0x084a('0x4'));var BPromise=require(_0x084a('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x084a('0x6'));var sox=require(_0x084a('0x7'));var csv=require('to-csv');var ejs=require(_0x084a('0x8'));var fs=require('fs');var fs_extra=require(_0x084a('0x9'));var _=require(_0x084a('0xa'));var squel=require(_0x084a('0xb'));var crypto=require(_0x084a('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x084a('0xd'));var toCsv=require(_0x084a('0xe'));var querystring=require(_0x084a('0xf'));var Papa=require(_0x084a('0x10'));var Redis=require(_0x084a('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x084a('0x12'));var hardwareService=require(_0x084a('0x13'));var logger=require(_0x084a('0x14'))(_0x084a('0x15'));var utils=require(_0x084a('0x16'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x084a('0x17'))['db'];function respondWithStatusCode(_0x3ca72f,_0xec90a5){_0xec90a5=_0xec90a5||0xcc;return function(_0x9245b1){if(_0x9245b1){return _0x3ca72f[_0x084a('0x18')](_0xec90a5);}return _0x3ca72f[_0x084a('0x19')](_0xec90a5)[_0x084a('0x1a')]();};}function respondWithResult(_0x3a76d1,_0x5aef40){_0x5aef40=_0x5aef40||0xc8;return function(_0x4277c9){if(_0x4277c9){return _0x3a76d1['status'](_0x5aef40)[_0x084a('0x1b')](_0x4277c9);}};}function respondWithFilteredResult(_0x3ccaca,_0x366624){return function(_0x2d35b8){if(_0x2d35b8){var _0xd20527=typeof _0x366624['offset']===_0x084a('0x1c')&&typeof _0x366624['limit']===_0x084a('0x1c');var _0x355b45=_0x2d35b8['count'];var _0xf2c333=_0xd20527?0x0:_0x366624[_0x084a('0x1d')];var _0x4134b9=_0xd20527?_0x2d35b8[_0x084a('0x1e')]:_0x366624[_0x084a('0x1d')]+_0x366624[_0x084a('0x1f')];var _0x447a19;if(_0x4134b9>=_0x355b45){_0x4134b9=_0x355b45;_0x447a19=0xc8;}else{_0x447a19=0xce;}_0x3ccaca[_0x084a('0x19')](_0x447a19);return _0x3ccaca[_0x084a('0x20')](_0x084a('0x21'),_0xf2c333+'-'+_0x4134b9+'/'+_0x355b45)[_0x084a('0x1b')](_0x2d35b8);}return null;};}function patchUpdates(_0x279e25){return function(_0x116328){try{jsonpatch[_0x084a('0x22')](_0x116328,_0x279e25,!![]);}catch(_0xf0dd98){return BPromise['reject'](_0xf0dd98);}return _0x116328[_0x084a('0x23')]();};}function saveUpdates(_0x1ad257,_0x41a90f){return function(_0x2d62bf){if(_0x2d62bf){return _0x2d62bf[_0x084a('0x24')](_0x1ad257)['then'](function(_0x755c24){return _0x755c24;});}return null;};}function removeEntity(_0x288e9e,_0x6346a5){return function(_0x1f2c9f){if(_0x1f2c9f){return _0x1f2c9f[_0x084a('0x25')]()[_0x084a('0x26')](function(){_0x288e9e['status'](0xcc)[_0x084a('0x1a')]();});}};}function handleEntityNotFound(_0x2af138,_0x54233b){return function(_0x5b1474){if(!_0x5b1474){_0x2af138[_0x084a('0x18')](0x194);}return _0x5b1474;};}function handleError(_0x3dd8b9,_0xfc9b8c){_0xfc9b8c=_0xfc9b8c||0x1f4;return function(_0x4c5658){logger['error'](_0x4c5658['stack']);if(_0x4c5658['name']){delete _0x4c5658[_0x084a('0x27')];}_0x3dd8b9['status'](_0xfc9b8c)['send'](_0x4c5658);};}exports['index']=function(_0x3b8176,_0x4651e6){var _0x388062={},_0x2c4149={},_0x3be7a6={'count':0x0,'rows':[]};var _0x25a2a1=_[_0x084a('0x28')](db[_0x084a('0x29')]['rawAttributes'],function(_0x2ed3cd){return{'name':_0x2ed3cd[_0x084a('0x2a')],'type':_0x2ed3cd['type'][_0x084a('0x2b')]};});_0x2c4149[_0x084a('0x2c')]=_[_0x084a('0x28')](_0x25a2a1,_0x084a('0x27'));_0x2c4149[_0x084a('0x2d')]=_[_0x084a('0x2e')](_0x3b8176[_0x084a('0x2d')]);_0x2c4149[_0x084a('0x2f')]=_[_0x084a('0x30')](_0x2c4149[_0x084a('0x2c')],_0x2c4149[_0x084a('0x2d')]);_0x388062[_0x084a('0x31')]=_[_0x084a('0x30')](_0x2c4149['model'],qs['fields'](_0x3b8176[_0x084a('0x2d')][_0x084a('0x32')]));_0x388062[_0x084a('0x31')]=_0x388062[_0x084a('0x31')][_0x084a('0x33')]?_0x388062['attributes']:_0x2c4149[_0x084a('0x2c')];if(!_0x3b8176[_0x084a('0x2d')][_0x084a('0x34')]('nolimit')){_0x388062[_0x084a('0x1f')]=qs[_0x084a('0x1f')](_0x3b8176[_0x084a('0x2d')]['limit']);_0x388062['offset']=qs['offset'](_0x3b8176[_0x084a('0x2d')][_0x084a('0x1d')]);}_0x388062[_0x084a('0x35')]=qs['sort'](_0x3b8176[_0x084a('0x2d')][_0x084a('0x36')]);_0x388062[_0x084a('0x37')]=qs[_0x084a('0x2f')](_[_0x084a('0x38')](_0x3b8176[_0x084a('0x2d')],_0x2c4149[_0x084a('0x2f')]),_0x25a2a1);if(_0x3b8176[_0x084a('0x2d')][_0x084a('0x39')]){_0x388062[_0x084a('0x37')]=_[_0x084a('0x3a')](_0x388062[_0x084a('0x37')],{'$or':_[_0x084a('0x28')](_0x25a2a1,function(_0x1659d3){if(_0x1659d3[_0x084a('0x3b')]!=='VIRTUAL'){var _0x220f88={};_0x220f88[_0x1659d3[_0x084a('0x27')]]={'$like':'%'+_0x3b8176[_0x084a('0x2d')][_0x084a('0x39')]+'%'};return _0x220f88;}})});}_0x388062=_[_0x084a('0x3a')]({},_0x388062,_0x3b8176[_0x084a('0x3c')]);var _0xa7b652={'where':_0x388062[_0x084a('0x37')]};return db[_0x084a('0x29')]['count'](_0xa7b652)[_0x084a('0x26')](function(_0x3d1aa5){_0x3be7a6[_0x084a('0x1e')]=_0x3d1aa5;if(_0x3b8176[_0x084a('0x2d')][_0x084a('0x3d')]){_0x388062[_0x084a('0x3e')]=[{'all':!![]}];}return db['WhatsappQueueReport'][_0x084a('0x3f')](_0x388062);})[_0x084a('0x26')](function(_0x55c5f4){_0x3be7a6[_0x084a('0x40')]=_0x55c5f4;return _0x3be7a6;})[_0x084a('0x26')](respondWithFilteredResult(_0x4651e6,_0x388062))[_0x084a('0x41')](handleError(_0x4651e6,null));};exports['show']=function(_0x1aa4ea,_0xba1081){var _0x4fe9c2={'raw':!![],'where':{'id':_0x1aa4ea[_0x084a('0x42')]['id']}},_0x3e2b92={};_0x3e2b92['model']=_['keys'](db[_0x084a('0x29')][_0x084a('0x43')]);_0x3e2b92[_0x084a('0x2d')]=_[_0x084a('0x2e')](_0x1aa4ea[_0x084a('0x2d')]);_0x3e2b92[_0x084a('0x2f')]=_[_0x084a('0x30')](_0x3e2b92[_0x084a('0x2c')],_0x3e2b92[_0x084a('0x2d')]);_0x4fe9c2[_0x084a('0x31')]=_[_0x084a('0x30')](_0x3e2b92['model'],qs['fields'](_0x1aa4ea[_0x084a('0x2d')][_0x084a('0x32')]));_0x4fe9c2[_0x084a('0x31')]=_0x4fe9c2['attributes'][_0x084a('0x33')]?_0x4fe9c2[_0x084a('0x31')]:_0x3e2b92[_0x084a('0x2c')];if(_0x1aa4ea[_0x084a('0x2d')][_0x084a('0x3d')]){_0x4fe9c2['include']=[{'all':!![]}];}_0x4fe9c2=_[_0x084a('0x3a')]({},_0x4fe9c2,_0x1aa4ea['options']);return db[_0x084a('0x29')][_0x084a('0x44')](_0x4fe9c2)[_0x084a('0x26')](handleEntityNotFound(_0xba1081,null))['then'](respondWithResult(_0xba1081,null))['catch'](handleError(_0xba1081,null));};exports[_0x084a('0x45')]=function(_0xef8fc7,_0x505965){return db[_0x084a('0x29')][_0x084a('0x45')](_0xef8fc7[_0x084a('0x46')],{})[_0x084a('0x26')](respondWithResult(_0x505965,0xc9))['catch'](handleError(_0x505965,null));};exports[_0x084a('0x24')]=function(_0x865368,_0x31677b){if(_0x865368[_0x084a('0x46')]['id']){delete _0x865368['body']['id'];}return db[_0x084a('0x29')][_0x084a('0x44')]({'where':{'id':_0x865368[_0x084a('0x42')]['id']}})[_0x084a('0x26')](handleEntityNotFound(_0x31677b,null))['then'](saveUpdates(_0x865368['body'],null))[_0x084a('0x26')](respondWithResult(_0x31677b,null))[_0x084a('0x41')](handleError(_0x31677b,null));};exports[_0x084a('0x25')]=function(_0x264f09,_0xf936e){return db[_0x084a('0x29')][_0x084a('0x44')]({'where':{'id':_0x264f09[_0x084a('0x42')]['id']}})[_0x084a('0x26')](handleEntityNotFound(_0xf936e,null))[_0x084a('0x26')](removeEntity(_0xf936e,null))[_0x084a('0x41')](handleError(_0xf936e,null));};exports[_0x084a('0x47')]=function(_0x4fe1b5,_0xcdd5b){return db[_0x084a('0x29')][_0x084a('0x47')]()[_0x084a('0x26')](respondWithResult(_0xcdd5b,null))[_0x084a('0x41')](handleError(_0xcdd5b,null));};
\ No newline at end of file
index f57e858..ef8beea 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x74cf=['bluebird','path','define','WhatsappQueueReport','report_whatsapp_queue','uniqueid','util','../../config/logger','api','moment'];(function(_0x1a80da,_0x1b532b){var _0x1c1df0=function(_0x21476f){while(--_0x21476f){_0x1a80da['push'](_0x1a80da['shift']());}};_0x1c1df0(++_0x1b532b);}(_0x74cf,0xe2));var _0xf74c=function(_0x2341c6,_0x3af092){_0x2341c6=_0x2341c6-0x0;var _0x54c34d=_0x74cf[_0x2341c6];return _0x54c34d;};'use strict';var _=require('lodash');var util=require(_0xf74c('0x0'));var logger=require(_0xf74c('0x1'))(_0xf74c('0x2'));var moment=require(_0xf74c('0x3'));var BPromise=require(_0xf74c('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xf74c('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./whatsappQueueReport.attributes');module['exports']=function(_0x5d68bb,_0x3a5206){return _0x5d68bb[_0xf74c('0x6')](_0xf74c('0x7'),attributes,{'tableName':_0xf74c('0x8'),'paranoid':![],'indexes':[{'name':_0xf74c('0x9'),'fields':[_0xf74c('0x9')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xfce6=['rimraf','../../config/environment','./whatsappQueueReport.attributes','define','uniqueid','lodash','util','api','moment','request-promise','path'];(function(_0x16e0c8,_0x4861eb){var _0xe4b5af=function(_0x5248bc){while(--_0x5248bc){_0x16e0c8['push'](_0x16e0c8['shift']());}};_0xe4b5af(++_0x4861eb);}(_0xfce6,0x94));var _0x6fce=function(_0x2b7de5,_0x1c41d0){_0x2b7de5=_0x2b7de5-0x0;var _0x2b4613=_0xfce6[_0x2b7de5];return _0x2b4613;};'use strict';var _=require(_0x6fce('0x0'));var util=require(_0x6fce('0x1'));var logger=require('../../config/logger')(_0x6fce('0x2'));var moment=require(_0x6fce('0x3'));var BPromise=require('bluebird');var rp=require(_0x6fce('0x4'));var fs=require('fs');var path=require(_0x6fce('0x5'));var rimraf=require(_0x6fce('0x6'));var config=require(_0x6fce('0x7'));var attributes=require(_0x6fce('0x8'));module['exports']=function(_0x2dff9d,_0x2acfca){return _0x2dff9d[_0x6fce('0x9')]('WhatsappQueueReport',attributes,{'tableName':'report_whatsapp_queue','paranoid':![],'indexes':[{'name':_0x6fce('0xa'),'fields':[_0x6fce('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
index b1c7234..6f26ff4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6491=['info','WhatsappQueueReport,\x20%s,\x20%s','debug','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','CreateWhatsappQueueReport','WhatsappQueueReport','body','options','raw','catch','UpdateWhatsappQueueReport','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then'];(function(_0x50f6c4,_0x5e39d6){var _0x3e90c2=function(_0x48a075){while(--_0x48a075){_0x50f6c4['push'](_0x50f6c4['shift']());}};_0x3e90c2(++_0x5e39d6);}(_0x6491,0xd1));var _0x1649=function(_0x21e097,_0x45bd35){_0x21e097=_0x21e097-0x0;var _0x4838b3=_0x6491[_0x21e097];return _0x4838b3;};'use strict';var _=require(_0x1649('0x0'));var util=require(_0x1649('0x1'));var moment=require(_0x1649('0x2'));var BPromise=require(_0x1649('0x3'));var rs=require(_0x1649('0x4'));var fs=require('fs');var Redis=require(_0x1649('0x5'));var db=require(_0x1649('0x6'))['db'];var utils=require(_0x1649('0x7'));var logger=require(_0x1649('0x8'))('rpc');var config=require(_0x1649('0x9'));var jayson=require(_0x1649('0xa'));var client=jayson[_0x1649('0xb')][_0x1649('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x5a8159,_0x48c9cc,_0x39308e){return new BPromise(function(_0xf24e2b,_0x12ca0d){return client[_0x1649('0xd')](_0x5a8159,_0x39308e)[_0x1649('0xe')](function(_0x2321db){logger[_0x1649('0xf')](_0x1649('0x10'),_0x48c9cc,'request\x20sent');logger[_0x1649('0x11')](_0x1649('0x12'),_0x48c9cc,_0x1649('0x13'),JSON[_0x1649('0x14')](_0x2321db));if(_0x2321db[_0x1649('0x15')]){if(_0x2321db[_0x1649('0x15')][_0x1649('0x16')]===0x1f4){logger[_0x1649('0x15')]('WhatsappQueueReport,\x20%s,\x20%s',_0x48c9cc,_0x2321db[_0x1649('0x15')][_0x1649('0x17')]);return _0x12ca0d(_0x2321db[_0x1649('0x15')][_0x1649('0x17')]);}logger['error'](_0x1649('0x10'),_0x48c9cc,_0x2321db['error'][_0x1649('0x17')]);return _0xf24e2b(_0x2321db[_0x1649('0x15')][_0x1649('0x17')]);}else{logger[_0x1649('0xf')](_0x1649('0x10'),_0x48c9cc,'request\x20sent');_0xf24e2b(_0x2321db[_0x1649('0x18')]['message']);}})['catch'](function(_0x54e954){logger[_0x1649('0x15')](_0x1649('0x10'),_0x48c9cc,_0x54e954);_0x12ca0d(_0x54e954);});});}exports[_0x1649('0x19')]=function(_0x3a6d17){var _0x15f279=this;return new Promise(function(_0x398aa4,_0x34d9dc){return db[_0x1649('0x1a')]['create'](_0x3a6d17[_0x1649('0x1b')],{'raw':_0x3a6d17[_0x1649('0x1c')]?_0x3a6d17[_0x1649('0x1c')][_0x1649('0x1d')]===undefined?!![]:![]:!![]})[_0x1649('0xe')](function(_0xf11c25){logger[_0x1649('0xf')](_0x1649('0x19'),_0x3a6d17);logger['debug']('CreateWhatsappQueueReport',_0x3a6d17,JSON['stringify'](_0xf11c25));_0x398aa4(_0xf11c25);})[_0x1649('0x1e')](function(_0x228006){logger[_0x1649('0x15')]('CreateWhatsappQueueReport',_0x228006[_0x1649('0x17')],_0x3a6d17);_0x34d9dc(_0x15f279[_0x1649('0x15')](0x1f4,_0x228006[_0x1649('0x17')]));});});};exports[_0x1649('0x1f')]=function(_0x3050a6){var _0xd2bdd3=this;return new Promise(function(_0x10c8d3,_0x4a4561){return db[_0x1649('0x1a')]['update'](_0x3050a6[_0x1649('0x1b')],{'raw':_0x3050a6[_0x1649('0x1c')]?_0x3050a6[_0x1649('0x1c')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3050a6[_0x1649('0x1c')]?_0x3050a6[_0x1649('0x1c')]['where']||null:null,'attributes':_0x3050a6['options']?_0x3050a6[_0x1649('0x1c')]['attributes']||null:null,'limit':_0x3050a6['options']?_0x3050a6[_0x1649('0x1c')]['limit']||null:null})['then'](function(_0x485a20){logger[_0x1649('0xf')](_0x1649('0x1f'),_0x3050a6);logger[_0x1649('0x11')](_0x1649('0x1f'),_0x3050a6,JSON['stringify'](_0x485a20));_0x10c8d3(_0x485a20);})[_0x1649('0x1e')](function(_0x236d6a){logger[_0x1649('0x15')]('UpdateWhatsappQueueReport',_0x236d6a[_0x1649('0x17')],_0x3050a6);_0x4a4561(_0xd2bdd3[_0x1649('0x15')](0x1f4,_0x236d6a[_0x1649('0x17')]));});});};
\ No newline at end of file
+var _0x200a=['lodash','util','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','WhatsappQueueReport,\x20%s,\x20%s','request\x20sent','debug','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','stringify','code','error','message','info','catch','CreateWhatsappQueueReport','WhatsappQueueReport','create','options','raw','UpdateWhatsappQueueReport','body','where','attributes'];(function(_0x4266d5,_0x4b9d46){var _0x23ac3f=function(_0x34be93){while(--_0x34be93){_0x4266d5['push'](_0x4266d5['shift']());}};_0x23ac3f(++_0x4b9d46);}(_0x200a,0xf8));var _0xa200=function(_0x1529a3,_0x529f63){_0x1529a3=_0x1529a3-0x0;var _0x1a0d4b=_0x200a[_0x1529a3];return _0x1a0d4b;};'use strict';var _=require(_0xa200('0x0'));var util=require(_0xa200('0x1'));var moment=require('moment');var BPromise=require(_0xa200('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa200('0x3'));var db=require(_0xa200('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xa200('0x5'))(_0xa200('0x6'));var config=require(_0xa200('0x7'));var jayson=require(_0xa200('0x8'));var client=jayson['client'][_0xa200('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x26d020,_0x2912b8,_0xf7685e){return new BPromise(function(_0x5df8c8,_0x204803){return client[_0xa200('0xa')](_0x26d020,_0xf7685e)[_0xa200('0xb')](function(_0x3a0c93){logger['info'](_0xa200('0xc'),_0x2912b8,_0xa200('0xd'));logger[_0xa200('0xe')](_0xa200('0xf'),_0x2912b8,'request\x20sent',JSON[_0xa200('0x10')](_0x3a0c93));if(_0x3a0c93['error']){if(_0x3a0c93['error'][_0xa200('0x11')]===0x1f4){logger[_0xa200('0x12')](_0xa200('0xc'),_0x2912b8,_0x3a0c93[_0xa200('0x12')][_0xa200('0x13')]);return _0x204803(_0x3a0c93[_0xa200('0x12')][_0xa200('0x13')]);}logger['error'](_0xa200('0xc'),_0x2912b8,_0x3a0c93['error'][_0xa200('0x13')]);return _0x5df8c8(_0x3a0c93[_0xa200('0x12')]['message']);}else{logger[_0xa200('0x14')]('WhatsappQueueReport,\x20%s,\x20%s',_0x2912b8,'request\x20sent');_0x5df8c8(_0x3a0c93['result'][_0xa200('0x13')]);}})[_0xa200('0x15')](function(_0x54dc79){logger[_0xa200('0x12')](_0xa200('0xc'),_0x2912b8,_0x54dc79);_0x204803(_0x54dc79);});});}exports[_0xa200('0x16')]=function(_0x37d326){var _0x5b9830=this;return new Promise(function(_0x553c89,_0x5cd6f9){return db[_0xa200('0x17')][_0xa200('0x18')](_0x37d326['body'],{'raw':_0x37d326[_0xa200('0x19')]?_0x37d326[_0xa200('0x19')][_0xa200('0x1a')]===undefined?!![]:![]:!![]})[_0xa200('0xb')](function(_0x130944){logger[_0xa200('0x14')](_0xa200('0x16'),_0x37d326);logger['debug'](_0xa200('0x16'),_0x37d326,JSON[_0xa200('0x10')](_0x130944));_0x553c89(_0x130944);})[_0xa200('0x15')](function(_0x103f1f){logger[_0xa200('0x12')]('CreateWhatsappQueueReport',_0x103f1f[_0xa200('0x13')],_0x37d326);_0x5cd6f9(_0x5b9830[_0xa200('0x12')](0x1f4,_0x103f1f[_0xa200('0x13')]));});});};exports[_0xa200('0x1b')]=function(_0x137b83){var _0x3d0239=this;return new Promise(function(_0xd182be,_0x331105){return db[_0xa200('0x17')]['update'](_0x137b83[_0xa200('0x1c')],{'raw':_0x137b83[_0xa200('0x19')]?_0x137b83[_0xa200('0x19')][_0xa200('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x137b83[_0xa200('0x19')]?_0x137b83[_0xa200('0x19')][_0xa200('0x1d')]||null:null,'attributes':_0x137b83[_0xa200('0x19')]?_0x137b83['options'][_0xa200('0x1e')]||null:null,'limit':_0x137b83[_0xa200('0x19')]?_0x137b83[_0xa200('0x19')]['limit']||null:null})[_0xa200('0xb')](function(_0x1ffd3f){logger[_0xa200('0x14')](_0xa200('0x1b'),_0x137b83);logger[_0xa200('0xe')](_0xa200('0x1b'),_0x137b83,JSON[_0xa200('0x10')](_0x1ffd3f));_0xd182be(_0x1ffd3f);})[_0xa200('0x15')](function(_0x39a36f){logger[_0xa200('0x12')](_0xa200('0x1b'),_0x39a36f['message'],_0x137b83);_0x331105(_0x3d0239['error'](0x1f4,_0x39a36f[_0xa200('0x13')]));});});};
\ No newline at end of file
index 0d5906e..4b34763 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4b1a=['show','post','create','put','/:id','update','delete','exports','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/describe','describe'];(function(_0x486d7c,_0x25f99d){var _0x2bc318=function(_0x494474){while(--_0x494474){_0x486d7c['push'](_0x486d7c['shift']());}};_0x2bc318(++_0x25f99d);}(_0x4b1a,0x1d4));var _0xa4b1=function(_0x1cd881,_0x103b8c){_0x1cd881=_0x1cd881-0x0;var _0x2fc47d=_0x4b1a[_0x1cd881];return _0x2fc47d;};'use strict';var multer=require('multer');var util=require(_0xa4b1('0x0'));var path=require(_0xa4b1('0x1'));var timeout=require(_0xa4b1('0x2'));var express=require('express');var router=express[_0xa4b1('0x3')]();var fs_extra=require(_0xa4b1('0x4'));var auth=require(_0xa4b1('0x5'));var interaction=require(_0xa4b1('0x6'));var config=require('../../config/environment');var controller=require('./whatsappTransferReport.controller');router[_0xa4b1('0x7')]('/',auth[_0xa4b1('0x8')](),controller[_0xa4b1('0x9')]);router[_0xa4b1('0x7')](_0xa4b1('0xa'),auth[_0xa4b1('0x8')](),controller[_0xa4b1('0xb')]);router[_0xa4b1('0x7')]('/:id',auth[_0xa4b1('0x8')](),controller[_0xa4b1('0xc')]);router[_0xa4b1('0xd')]('/',auth[_0xa4b1('0x8')](),controller[_0xa4b1('0xe')]);router[_0xa4b1('0xf')](_0xa4b1('0x10'),auth[_0xa4b1('0x8')](),controller[_0xa4b1('0x11')]);router[_0xa4b1('0x12')](_0xa4b1('0x10'),auth[_0xa4b1('0x8')](),controller['destroy']);module[_0xa4b1('0x13')]=router;
\ No newline at end of file
+var _0x22f8=['get','isAuthenticated','describe','/:id','show','create','put','update','delete','multer','util','path','express','fs-extra','../../components/auth/service','../../config/environment','index'];(function(_0x57f8c0,_0x136cf6){var _0x117f08=function(_0x426cd4){while(--_0x426cd4){_0x57f8c0['push'](_0x57f8c0['shift']());}};_0x117f08(++_0x136cf6);}(_0x22f8,0x13b));var _0x822f=function(_0x76e09b,_0x5d18a3){_0x76e09b=_0x76e09b-0x0;var _0xd18014=_0x22f8[_0x76e09b];return _0xd18014;};'use strict';var multer=require(_0x822f('0x0'));var util=require(_0x822f('0x1'));var path=require(_0x822f('0x2'));var timeout=require('connect-timeout');var express=require(_0x822f('0x3'));var router=express['Router']();var fs_extra=require(_0x822f('0x4'));var auth=require(_0x822f('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x822f('0x6'));var controller=require('./whatsappTransferReport.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x822f('0x7')]);router[_0x822f('0x8')]('/describe',auth[_0x822f('0x9')](),controller[_0x822f('0xa')]);router[_0x822f('0x8')](_0x822f('0xb'),auth[_0x822f('0x9')](),controller[_0x822f('0xc')]);router['post']('/',auth['isAuthenticated'](),controller[_0x822f('0xd')]);router[_0x822f('0xe')](_0x822f('0xb'),auth[_0x822f('0x9')](),controller[_0x822f('0xf')]);router[_0x822f('0x10')](_0x822f('0xb'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router;
\ No newline at end of file
index dcbb547..a5a9658 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd070=['queue','DATE','sequelize','STRING','ENUM','account','agent'];(function(_0x2c3bd1,_0x56a6e4){var _0x9e4419=function(_0x105346){while(--_0x105346){_0x2c3bd1['push'](_0x2c3bd1['shift']());}};_0x9e4419(++_0x56a6e4);}(_0xd070,0x8e));var _0x0d07=function(_0x4408de,_0x450ebc){_0x4408de=_0x4408de-0x0;var _0xc944d6=_0xd070[_0x4408de];return _0xc944d6;};'use strict';var Sequelize=require(_0x0d07('0x0'));module['exports']={'uniqueid':{'type':Sequelize[_0x0d07('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0x0d07('0x2')](_0x0d07('0x3'),_0x0d07('0x4'),_0x0d07('0x5')),'allowNull':![]},'transferredAt':{'type':Sequelize[_0x0d07('0x6')]}};
\ No newline at end of file
+var _0x98d8=['account','agent','queue','sequelize','exports','STRING','ENUM'];(function(_0x170bfd,_0x2347f5){var _0xc216b7=function(_0x86700b){while(--_0x86700b){_0x170bfd['push'](_0x170bfd['shift']());}};_0xc216b7(++_0x2347f5);}(_0x98d8,0xce));var _0x898d=function(_0x180bc5,_0x17fd8d){_0x180bc5=_0x180bc5-0x0;var _0x310566=_0x98d8[_0x180bc5];return _0x310566;};'use strict';var Sequelize=require(_0x898d('0x0'));module[_0x898d('0x1')]={'uniqueid':{'type':Sequelize[_0x898d('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0x898d('0x3')](_0x898d('0x4'),_0x898d('0x5'),_0x898d('0x6')),'allowNull':![]},'transferredAt':{'type':Sequelize['DATE']}};
\ No newline at end of file
index f16a264..3766a11 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x39b8=['filter','VIRTUAL','merge','options','then','include','findAll','rows','params','keys','includeAll','body','catch','find','describe','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','path','to-csv','ejs','fs-extra','lodash','squel','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','sendStatus','status','undefined','count','offset','limit','Content-Range','json','apply','reject','save','destroy','end','error','stack','name','index','map','WhatsappTransferReport','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where'];(function(_0x13ea00,_0x12f610){var _0x1f7347=function(_0x34ae63){while(--_0x34ae63){_0x13ea00['push'](_0x13ea00['shift']());}};_0x1f7347(++_0x12f610);}(_0x39b8,0x12b));var _0x839b=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x39b8[_0x14add3];return _0x4a174f;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x839b('0x0'));var zipdir=require(_0x839b('0x1'));var jsonpatch=require(_0x839b('0x2'));var rp=require(_0x839b('0x3'));var moment=require('moment');var BPromise=require(_0x839b('0x4'));var Mustache=require(_0x839b('0x5'));var util=require('util');var path=require(_0x839b('0x6'));var sox=require('sox');var csv=require(_0x839b('0x7'));var ejs=require(_0x839b('0x8'));var fs=require('fs');var fs_extra=require(_0x839b('0x9'));var _=require(_0x839b('0xa'));var squel=require(_0x839b('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x839b('0x7'));var querystring=require(_0x839b('0xc'));var Papa=require(_0x839b('0xd'));var Redis=require('ioredis');var authService=require(_0x839b('0xe'));var qs=require(_0x839b('0xf'));var as=require(_0x839b('0x10'));var hardwareService=require(_0x839b('0x11'));var logger=require('../../config/logger')(_0x839b('0x12'));var utils=require(_0x839b('0x13'));var config=require(_0x839b('0x14'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1609bf,_0x20b62b){_0x20b62b=_0x20b62b||0xcc;return function(_0x2b9df1){if(_0x2b9df1){return _0x1609bf[_0x839b('0x15')](_0x20b62b);}return _0x1609bf['status'](_0x20b62b)['end']();};}function respondWithResult(_0x1115f7,_0x397c8){_0x397c8=_0x397c8||0xc8;return function(_0x49d767){if(_0x49d767){return _0x1115f7[_0x839b('0x16')](_0x397c8)['json'](_0x49d767);}};}function respondWithFilteredResult(_0x50ae7b,_0x2da779){return function(_0x17be5d){if(_0x17be5d){var _0x3e577b=typeof _0x2da779['offset']===_0x839b('0x17')&&typeof _0x2da779['limit']===_0x839b('0x17');var _0x434823=_0x17be5d[_0x839b('0x18')];var _0x1c678f=_0x3e577b?0x0:_0x2da779[_0x839b('0x19')];var _0x3324ab=_0x3e577b?_0x17be5d[_0x839b('0x18')]:_0x2da779[_0x839b('0x19')]+_0x2da779[_0x839b('0x1a')];var _0x15a72e;if(_0x3324ab>=_0x434823){_0x3324ab=_0x434823;_0x15a72e=0xc8;}else{_0x15a72e=0xce;}_0x50ae7b[_0x839b('0x16')](_0x15a72e);return _0x50ae7b['set'](_0x839b('0x1b'),_0x1c678f+'-'+_0x3324ab+'/'+_0x434823)[_0x839b('0x1c')](_0x17be5d);}return null;};}function patchUpdates(_0x4b8568){return function(_0x152950){try{jsonpatch[_0x839b('0x1d')](_0x152950,_0x4b8568,!![]);}catch(_0xec5b6f){return BPromise[_0x839b('0x1e')](_0xec5b6f);}return _0x152950[_0x839b('0x1f')]();};}function saveUpdates(_0x1d4a3e,_0x4e3480){return function(_0x24f17f){if(_0x24f17f){return _0x24f17f['update'](_0x1d4a3e)['then'](function(_0x21f8d5){return _0x21f8d5;});}return null;};}function removeEntity(_0xd2e374,_0x2a206c){return function(_0x3af294){if(_0x3af294){return _0x3af294[_0x839b('0x20')]()['then'](function(){_0xd2e374[_0x839b('0x16')](0xcc)[_0x839b('0x21')]();});}};}function handleEntityNotFound(_0x539695,_0x49fd2d){return function(_0x593ecb){if(!_0x593ecb){_0x539695[_0x839b('0x15')](0x194);}return _0x593ecb;};}function handleError(_0x169b50,_0xc5cf56){_0xc5cf56=_0xc5cf56||0x1f4;return function(_0x28b70d){logger[_0x839b('0x22')](_0x28b70d[_0x839b('0x23')]);if(_0x28b70d[_0x839b('0x24')]){delete _0x28b70d[_0x839b('0x24')];}_0x169b50[_0x839b('0x16')](_0xc5cf56)['send'](_0x28b70d);};}exports[_0x839b('0x25')]=function(_0xa64441,_0x491d07){var _0x51f24a={},_0x5205c1={},_0x37afaa={'count':0x0,'rows':[]};var _0x595dbc=_[_0x839b('0x26')](db[_0x839b('0x27')][_0x839b('0x28')],function(_0x316cb8){return{'name':_0x316cb8[_0x839b('0x29')],'type':_0x316cb8[_0x839b('0x2a')][_0x839b('0x2b')]};});_0x5205c1[_0x839b('0x2c')]=_['map'](_0x595dbc,'name');_0x5205c1[_0x839b('0x2d')]=_['keys'](_0xa64441[_0x839b('0x2d')]);_0x5205c1[_0x839b('0x2e')]=_[_0x839b('0x2f')](_0x5205c1[_0x839b('0x2c')],_0x5205c1[_0x839b('0x2d')]);_0x51f24a[_0x839b('0x30')]=_[_0x839b('0x2f')](_0x5205c1[_0x839b('0x2c')],qs[_0x839b('0x31')](_0xa64441['query'][_0x839b('0x31')]));_0x51f24a[_0x839b('0x30')]=_0x51f24a[_0x839b('0x30')][_0x839b('0x32')]?_0x51f24a[_0x839b('0x30')]:_0x5205c1[_0x839b('0x2c')];if(!_0xa64441[_0x839b('0x2d')][_0x839b('0x33')](_0x839b('0x34'))){_0x51f24a['limit']=qs[_0x839b('0x1a')](_0xa64441[_0x839b('0x2d')][_0x839b('0x1a')]);_0x51f24a[_0x839b('0x19')]=qs[_0x839b('0x19')](_0xa64441['query']['offset']);}_0x51f24a[_0x839b('0x35')]=qs[_0x839b('0x36')](_0xa64441[_0x839b('0x2d')][_0x839b('0x36')]);_0x51f24a[_0x839b('0x37')]=qs[_0x839b('0x2e')](_['pick'](_0xa64441[_0x839b('0x2d')],_0x5205c1['filters']),_0x595dbc);if(_0xa64441['query'][_0x839b('0x38')]){_0x51f24a[_0x839b('0x37')]=_['merge'](_0x51f24a[_0x839b('0x37')],{'$or':_[_0x839b('0x26')](_0x595dbc,function(_0xdd43e2){if(_0xdd43e2['type']!==_0x839b('0x39')){var _0x4a98c5={};_0x4a98c5[_0xdd43e2['name']]={'$like':'%'+_0xa64441[_0x839b('0x2d')][_0x839b('0x38')]+'%'};return _0x4a98c5;}})});}_0x51f24a=_[_0x839b('0x3a')]({},_0x51f24a,_0xa64441[_0x839b('0x3b')]);var _0x1274d0={'where':_0x51f24a['where']};return db[_0x839b('0x27')][_0x839b('0x18')](_0x1274d0)[_0x839b('0x3c')](function(_0x401dcf){_0x37afaa['count']=_0x401dcf;if(_0xa64441[_0x839b('0x2d')]['includeAll']){_0x51f24a[_0x839b('0x3d')]=[{'all':!![]}];}return db[_0x839b('0x27')][_0x839b('0x3e')](_0x51f24a);})[_0x839b('0x3c')](function(_0x278702){_0x37afaa[_0x839b('0x3f')]=_0x278702;return _0x37afaa;})[_0x839b('0x3c')](respondWithFilteredResult(_0x491d07,_0x51f24a))['catch'](handleError(_0x491d07,null));};exports['show']=function(_0x154f5a,_0x387af1){var _0x3c084c={'raw':!![],'where':{'id':_0x154f5a[_0x839b('0x40')]['id']}},_0x405a2a={};_0x405a2a[_0x839b('0x2c')]=_['keys'](db['WhatsappTransferReport']['rawAttributes']);_0x405a2a[_0x839b('0x2d')]=_[_0x839b('0x41')](_0x154f5a['query']);_0x405a2a[_0x839b('0x2e')]=_[_0x839b('0x2f')](_0x405a2a[_0x839b('0x2c')],_0x405a2a[_0x839b('0x2d')]);_0x3c084c[_0x839b('0x30')]=_[_0x839b('0x2f')](_0x405a2a['model'],qs[_0x839b('0x31')](_0x154f5a[_0x839b('0x2d')][_0x839b('0x31')]));_0x3c084c['attributes']=_0x3c084c[_0x839b('0x30')][_0x839b('0x32')]?_0x3c084c['attributes']:_0x405a2a[_0x839b('0x2c')];if(_0x154f5a[_0x839b('0x2d')][_0x839b('0x42')]){_0x3c084c[_0x839b('0x3d')]=[{'all':!![]}];}_0x3c084c=_[_0x839b('0x3a')]({},_0x3c084c,_0x154f5a[_0x839b('0x3b')]);return db[_0x839b('0x27')]['find'](_0x3c084c)[_0x839b('0x3c')](handleEntityNotFound(_0x387af1,null))[_0x839b('0x3c')](respondWithResult(_0x387af1,null))['catch'](handleError(_0x387af1,null));};exports['create']=function(_0x5b277f,_0x33bfd7){return db[_0x839b('0x27')]['create'](_0x5b277f[_0x839b('0x43')],{})[_0x839b('0x3c')](respondWithResult(_0x33bfd7,0xc9))[_0x839b('0x44')](handleError(_0x33bfd7,null));};exports['update']=function(_0x11697b,_0x3ffa65){if(_0x11697b[_0x839b('0x43')]['id']){delete _0x11697b[_0x839b('0x43')]['id'];}return db['WhatsappTransferReport']['find']({'where':{'id':_0x11697b['params']['id']}})[_0x839b('0x3c')](handleEntityNotFound(_0x3ffa65,null))[_0x839b('0x3c')](saveUpdates(_0x11697b[_0x839b('0x43')],null))[_0x839b('0x3c')](respondWithResult(_0x3ffa65,null))[_0x839b('0x44')](handleError(_0x3ffa65,null));};exports[_0x839b('0x20')]=function(_0x364da8,_0x44eec3){return db[_0x839b('0x27')][_0x839b('0x45')]({'where':{'id':_0x364da8[_0x839b('0x40')]['id']}})[_0x839b('0x3c')](handleEntityNotFound(_0x44eec3,null))[_0x839b('0x3c')](removeEntity(_0x44eec3,null))[_0x839b('0x44')](handleError(_0x44eec3,null));};exports[_0x839b('0x46')]=function(_0xe121de,_0x116e1f){return db[_0x839b('0x27')]['describe']()[_0x839b('0x3c')](respondWithResult(_0x116e1f,null))[_0x839b('0x44')](handleError(_0x116e1f,null));};
\ No newline at end of file
+var _0x3149=['params','find','create','body','describe','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','offset','undefined','count','limit','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','index','map','WhatsappTransferReport','rawAttributes','fieldName','type','keys','filters','intersection','model','query','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show'];(function(_0x5abcc9,_0x1e6359){var _0x3169bb=function(_0x3ef704){while(--_0x3ef704){_0x5abcc9['push'](_0x5abcc9['shift']());}};_0x3169bb(++_0x1e6359);}(_0x3149,0x181));var _0x9314=function(_0x2a20ab,_0x4ab2a5){_0x2a20ab=_0x2a20ab-0x0;var _0xb4887c=_0x3149[_0x2a20ab];return _0xb4887c;};'use strict';var emlformat=require(_0x9314('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x9314('0x1'));var jsonpatch=require(_0x9314('0x2'));var rp=require(_0x9314('0x3'));var moment=require(_0x9314('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x9314('0x5'));var util=require(_0x9314('0x6'));var path=require(_0x9314('0x7'));var sox=require(_0x9314('0x8'));var csv=require(_0x9314('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x9314('0xa'));var _=require(_0x9314('0xb'));var squel=require(_0x9314('0xc'));var crypto=require(_0x9314('0xd'));var jsforce=require(_0x9314('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x9314('0x9'));var querystring=require('querystring');var Papa=require(_0x9314('0xf'));var Redis=require('ioredis');var authService=require(_0x9314('0x10'));var qs=require(_0x9314('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x9314('0x12'));var logger=require('../../config/logger')(_0x9314('0x13'));var utils=require(_0x9314('0x14'));var config=require(_0x9314('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x9314('0x16'))['db'];function respondWithStatusCode(_0x23fa9b,_0x4363a0){_0x4363a0=_0x4363a0||0xcc;return function(_0x172b9a){if(_0x172b9a){return _0x23fa9b[_0x9314('0x17')](_0x4363a0);}return _0x23fa9b[_0x9314('0x18')](_0x4363a0)[_0x9314('0x19')]();};}function respondWithResult(_0x577d5e,_0x227027){_0x227027=_0x227027||0xc8;return function(_0x397f13){if(_0x397f13){return _0x577d5e[_0x9314('0x18')](_0x227027)['json'](_0x397f13);}};}function respondWithFilteredResult(_0x3bdd1b,_0x2728db){return function(_0x3cc9bf){if(_0x3cc9bf){var _0x5c3ad0=typeof _0x2728db[_0x9314('0x1a')]===_0x9314('0x1b')&&typeof _0x2728db['limit']===_0x9314('0x1b');var _0x1f5571=_0x3cc9bf[_0x9314('0x1c')];var _0x563a71=_0x5c3ad0?0x0:_0x2728db['offset'];var _0x9dcb3c=_0x5c3ad0?_0x3cc9bf['count']:_0x2728db[_0x9314('0x1a')]+_0x2728db[_0x9314('0x1d')];var _0x16b36f;if(_0x9dcb3c>=_0x1f5571){_0x9dcb3c=_0x1f5571;_0x16b36f=0xc8;}else{_0x16b36f=0xce;}_0x3bdd1b[_0x9314('0x18')](_0x16b36f);return _0x3bdd1b[_0x9314('0x1e')](_0x9314('0x1f'),_0x563a71+'-'+_0x9dcb3c+'/'+_0x1f5571)['json'](_0x3cc9bf);}return null;};}function patchUpdates(_0x1046ae){return function(_0x3250ae){try{jsonpatch[_0x9314('0x20')](_0x3250ae,_0x1046ae,!![]);}catch(_0x5c5976){return BPromise[_0x9314('0x21')](_0x5c5976);}return _0x3250ae[_0x9314('0x22')]();};}function saveUpdates(_0x345dda,_0x1dfba0){return function(_0x5881e6){if(_0x5881e6){return _0x5881e6[_0x9314('0x23')](_0x345dda)[_0x9314('0x24')](function(_0x14b58d){return _0x14b58d;});}return null;};}function removeEntity(_0x2a4212,_0x535e05){return function(_0x2b5047){if(_0x2b5047){return _0x2b5047[_0x9314('0x25')]()[_0x9314('0x24')](function(){_0x2a4212['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x430144,_0x24d781){return function(_0x242096){if(!_0x242096){_0x430144[_0x9314('0x17')](0x194);}return _0x242096;};}function handleError(_0x5f6c11,_0x496dc6){_0x496dc6=_0x496dc6||0x1f4;return function(_0x4af880){logger[_0x9314('0x26')](_0x4af880[_0x9314('0x27')]);if(_0x4af880['name']){delete _0x4af880[_0x9314('0x28')];}_0x5f6c11[_0x9314('0x18')](_0x496dc6)[_0x9314('0x29')](_0x4af880);};}exports[_0x9314('0x2a')]=function(_0x239822,_0x4d16fa){var _0x10a9c4={},_0x282929={},_0x9242d7={'count':0x0,'rows':[]};var _0x4b8544=_[_0x9314('0x2b')](db[_0x9314('0x2c')][_0x9314('0x2d')],function(_0x60a0b0){return{'name':_0x60a0b0[_0x9314('0x2e')],'type':_0x60a0b0[_0x9314('0x2f')]['key']};});_0x282929['model']=_[_0x9314('0x2b')](_0x4b8544,_0x9314('0x28'));_0x282929['query']=_[_0x9314('0x30')](_0x239822['query']);_0x282929[_0x9314('0x31')]=_[_0x9314('0x32')](_0x282929[_0x9314('0x33')],_0x282929[_0x9314('0x34')]);_0x10a9c4[_0x9314('0x35')]=_[_0x9314('0x32')](_0x282929[_0x9314('0x33')],qs[_0x9314('0x36')](_0x239822[_0x9314('0x34')][_0x9314('0x36')]));_0x10a9c4['attributes']=_0x10a9c4[_0x9314('0x35')][_0x9314('0x37')]?_0x10a9c4[_0x9314('0x35')]:_0x282929[_0x9314('0x33')];if(!_0x239822[_0x9314('0x34')][_0x9314('0x38')](_0x9314('0x39'))){_0x10a9c4[_0x9314('0x1d')]=qs['limit'](_0x239822[_0x9314('0x34')][_0x9314('0x1d')]);_0x10a9c4[_0x9314('0x1a')]=qs[_0x9314('0x1a')](_0x239822[_0x9314('0x34')]['offset']);}_0x10a9c4[_0x9314('0x3a')]=qs[_0x9314('0x3b')](_0x239822['query'][_0x9314('0x3b')]);_0x10a9c4[_0x9314('0x3c')]=qs[_0x9314('0x31')](_['pick'](_0x239822[_0x9314('0x34')],_0x282929[_0x9314('0x31')]),_0x4b8544);if(_0x239822[_0x9314('0x34')][_0x9314('0x3d')]){_0x10a9c4[_0x9314('0x3c')]=_[_0x9314('0x3e')](_0x10a9c4[_0x9314('0x3c')],{'$or':_[_0x9314('0x2b')](_0x4b8544,function(_0x529b12){if(_0x529b12[_0x9314('0x2f')]!==_0x9314('0x3f')){var _0x21666a={};_0x21666a[_0x529b12[_0x9314('0x28')]]={'$like':'%'+_0x239822[_0x9314('0x34')][_0x9314('0x3d')]+'%'};return _0x21666a;}})});}_0x10a9c4=_[_0x9314('0x3e')]({},_0x10a9c4,_0x239822[_0x9314('0x40')]);var _0x351690={'where':_0x10a9c4[_0x9314('0x3c')]};return db[_0x9314('0x2c')][_0x9314('0x1c')](_0x351690)[_0x9314('0x24')](function(_0xda3293){_0x9242d7[_0x9314('0x1c')]=_0xda3293;if(_0x239822[_0x9314('0x34')][_0x9314('0x41')]){_0x10a9c4[_0x9314('0x42')]=[{'all':!![]}];}return db['WhatsappTransferReport'][_0x9314('0x43')](_0x10a9c4);})['then'](function(_0x598807){_0x9242d7[_0x9314('0x44')]=_0x598807;return _0x9242d7;})[_0x9314('0x24')](respondWithFilteredResult(_0x4d16fa,_0x10a9c4))[_0x9314('0x45')](handleError(_0x4d16fa,null));};exports[_0x9314('0x46')]=function(_0x5db511,_0x4d38ff){var _0x3fce84={'raw':!![],'where':{'id':_0x5db511[_0x9314('0x47')]['id']}},_0x541bb5={};_0x541bb5[_0x9314('0x33')]=_[_0x9314('0x30')](db[_0x9314('0x2c')][_0x9314('0x2d')]);_0x541bb5[_0x9314('0x34')]=_[_0x9314('0x30')](_0x5db511[_0x9314('0x34')]);_0x541bb5[_0x9314('0x31')]=_[_0x9314('0x32')](_0x541bb5[_0x9314('0x33')],_0x541bb5[_0x9314('0x34')]);_0x3fce84[_0x9314('0x35')]=_[_0x9314('0x32')](_0x541bb5[_0x9314('0x33')],qs[_0x9314('0x36')](_0x5db511[_0x9314('0x34')]['fields']));_0x3fce84[_0x9314('0x35')]=_0x3fce84[_0x9314('0x35')]['length']?_0x3fce84['attributes']:_0x541bb5['model'];if(_0x5db511[_0x9314('0x34')]['includeAll']){_0x3fce84[_0x9314('0x42')]=[{'all':!![]}];}_0x3fce84=_['merge']({},_0x3fce84,_0x5db511[_0x9314('0x40')]);return db[_0x9314('0x2c')][_0x9314('0x48')](_0x3fce84)[_0x9314('0x24')](handleEntityNotFound(_0x4d38ff,null))['then'](respondWithResult(_0x4d38ff,null))['catch'](handleError(_0x4d38ff,null));};exports[_0x9314('0x49')]=function(_0x2518ea,_0x3bf985){return db[_0x9314('0x2c')][_0x9314('0x49')](_0x2518ea['body'],{})[_0x9314('0x24')](respondWithResult(_0x3bf985,0xc9))[_0x9314('0x45')](handleError(_0x3bf985,null));};exports[_0x9314('0x23')]=function(_0x5ead5b,_0x1b947b){if(_0x5ead5b[_0x9314('0x4a')]['id']){delete _0x5ead5b['body']['id'];}return db['WhatsappTransferReport'][_0x9314('0x48')]({'where':{'id':_0x5ead5b[_0x9314('0x47')]['id']}})[_0x9314('0x24')](handleEntityNotFound(_0x1b947b,null))[_0x9314('0x24')](saveUpdates(_0x5ead5b['body'],null))[_0x9314('0x24')](respondWithResult(_0x1b947b,null))[_0x9314('0x45')](handleError(_0x1b947b,null));};exports[_0x9314('0x25')]=function(_0x1e3c92,_0x1b0adb){return db[_0x9314('0x2c')][_0x9314('0x48')]({'where':{'id':_0x1e3c92[_0x9314('0x47')]['id']}})[_0x9314('0x24')](handleEntityNotFound(_0x1b0adb,null))[_0x9314('0x24')](removeEntity(_0x1b0adb,null))[_0x9314('0x45')](handleError(_0x1b0adb,null));};exports['describe']=function(_0x5c691e,_0x3d2780){return db[_0x9314('0x2c')][_0x9314('0x4b')]()['then'](respondWithResult(_0x3d2780,null))['catch'](handleError(_0x3d2780,null));};
\ No newline at end of file
index d40d552..0f2508c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8ff2=['lodash','../../config/logger','api','moment','bluebird','request-promise','path','./whatsappTransferReport.attributes','exports','define','WhatsappTransferReport','report_whatsapp_transfer','uniqueid'];(function(_0x3947c9,_0x4d6c97){var _0x2e7871=function(_0x1236cc){while(--_0x1236cc){_0x3947c9['push'](_0x3947c9['shift']());}};_0x2e7871(++_0x4d6c97);}(_0x8ff2,0x12b));var _0x28ff=function(_0x549e99,_0x598709){_0x549e99=_0x549e99-0x0;var _0x4b585e=_0x8ff2[_0x549e99];return _0x4b585e;};'use strict';var _=require(_0x28ff('0x0'));var util=require('util');var logger=require(_0x28ff('0x1'))(_0x28ff('0x2'));var moment=require(_0x28ff('0x3'));var BPromise=require(_0x28ff('0x4'));var rp=require(_0x28ff('0x5'));var fs=require('fs');var path=require(_0x28ff('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x28ff('0x7'));module[_0x28ff('0x8')]=function(_0x2bc1c3,_0x3d8dd6){return _0x2bc1c3[_0x28ff('0x9')](_0x28ff('0xa'),attributes,{'tableName':_0x28ff('0xb'),'paranoid':![],'indexes':[{'name':_0x28ff('0xc'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0xfa0a=['report_whatsapp_transfer','uniqueid','lodash','util','../../config/logger','api','moment','bluebird','rimraf','./whatsappTransferReport.attributes','exports','define','WhatsappTransferReport'];(function(_0x20bedd,_0x39694b){var _0x3041f3=function(_0x1f53ee){while(--_0x1f53ee){_0x20bedd['push'](_0x20bedd['shift']());}};_0x3041f3(++_0x39694b);}(_0xfa0a,0x91));var _0xafa0=function(_0xaff1d2,_0x423d2a){_0xaff1d2=_0xaff1d2-0x0;var _0x32f4ed=_0xfa0a[_0xaff1d2];return _0x32f4ed;};'use strict';var _=require(_0xafa0('0x0'));var util=require(_0xafa0('0x1'));var logger=require(_0xafa0('0x2'))(_0xafa0('0x3'));var moment=require(_0xafa0('0x4'));var BPromise=require(_0xafa0('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xafa0('0x6'));var config=require('../../config/environment');var attributes=require(_0xafa0('0x7'));module[_0xafa0('0x8')]=function(_0x1ab6b6,_0xfc7b44){return _0x1ab6b6[_0xafa0('0x9')](_0xafa0('0xa'),attributes,{'tableName':_0xafa0('0xb'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0xafa0('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
index fe21090..c0100cb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2560=['util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','request','then','request\x20sent','debug','WhatsappTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','WhatsappTransferReport,\x20%s,\x20%s','message','lodash'];(function(_0x16797e,_0x485d85){var _0x333c87=function(_0x1fec46){while(--_0x1fec46){_0x16797e['push'](_0x16797e['shift']());}};_0x333c87(++_0x485d85);}(_0x2560,0x1ed));var _0x0256=function(_0x58f96b,_0x1c90f3){_0x58f96b=_0x58f96b-0x0;var _0x220e35=_0x2560[_0x58f96b];return _0x220e35;};'use strict';var _=require(_0x0256('0x0'));var util=require(_0x0256('0x1'));var moment=require(_0x0256('0x2'));var BPromise=require('bluebird');var rs=require(_0x0256('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0256('0x4'))['db'];var utils=require(_0x0256('0x5'));var logger=require(_0x0256('0x6'))('rpc');var config=require(_0x0256('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x0256('0x8')][_0x0256('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3d45a5,_0xe978a7,_0x1c4712){return new BPromise(function(_0x34e52a,_0x1e5d64){return client[_0x0256('0xa')](_0x3d45a5,_0x1c4712)[_0x0256('0xb')](function(_0x1079e0){logger['info']('WhatsappTransferReport,\x20%s,\x20%s',_0xe978a7,_0x0256('0xc'));logger[_0x0256('0xd')](_0x0256('0xe'),_0xe978a7,'request\x20sent',JSON[_0x0256('0xf')](_0x1079e0));if(_0x1079e0['error']){if(_0x1079e0[_0x0256('0x10')]['code']===0x1f4){logger[_0x0256('0x10')](_0x0256('0x11'),_0xe978a7,_0x1079e0[_0x0256('0x10')][_0x0256('0x12')]);return _0x1e5d64(_0x1079e0[_0x0256('0x10')][_0x0256('0x12')]);}logger[_0x0256('0x10')](_0x0256('0x11'),_0xe978a7,_0x1079e0[_0x0256('0x10')][_0x0256('0x12')]);return _0x34e52a(_0x1079e0[_0x0256('0x10')]['message']);}else{logger['info'](_0x0256('0x11'),_0xe978a7,_0x0256('0xc'));_0x34e52a(_0x1079e0['result'][_0x0256('0x12')]);}})['catch'](function(_0x421b24){logger['error']('WhatsappTransferReport,\x20%s,\x20%s',_0xe978a7,_0x421b24);_0x1e5d64(_0x421b24);});});}
\ No newline at end of file
+var _0x3102=['bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','request\x20sent','debug','WhatsappTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','WhatsappTransferReport,\x20%s,\x20%s','message','result','catch','moment'];(function(_0x287d9a,_0x73e23c){var _0x1ac1ab=function(_0x5d048e){while(--_0x5d048e){_0x287d9a['push'](_0x287d9a['shift']());}};_0x1ac1ab(++_0x73e23c);}(_0x3102,0x83));var _0x2310=function(_0x44d9ab,_0x76bc69){_0x44d9ab=_0x44d9ab-0x0;var _0x31485e=_0x3102[_0x44d9ab];return _0x31485e;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x2310('0x0'));var BPromise=require(_0x2310('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2310('0x2'));var db=require(_0x2310('0x3'))['db'];var utils=require(_0x2310('0x4'));var logger=require(_0x2310('0x5'))(_0x2310('0x6'));var config=require(_0x2310('0x7'));var jayson=require(_0x2310('0x8'));var client=jayson[_0x2310('0x9')][_0x2310('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x11de11,_0x4e2269,_0x129960){return new BPromise(function(_0x5c10da,_0x4b04ab){return client['request'](_0x11de11,_0x129960)[_0x2310('0xb')](function(_0x14fb36){logger[_0x2310('0xc')]('WhatsappTransferReport,\x20%s,\x20%s',_0x4e2269,_0x2310('0xd'));logger[_0x2310('0xe')](_0x2310('0xf'),_0x4e2269,_0x2310('0xd'),JSON[_0x2310('0x10')](_0x14fb36));if(_0x14fb36[_0x2310('0x11')]){if(_0x14fb36[_0x2310('0x11')]['code']===0x1f4){logger[_0x2310('0x11')](_0x2310('0x12'),_0x4e2269,_0x14fb36['error'][_0x2310('0x13')]);return _0x4b04ab(_0x14fb36[_0x2310('0x11')]['message']);}logger[_0x2310('0x11')](_0x2310('0x12'),_0x4e2269,_0x14fb36[_0x2310('0x11')][_0x2310('0x13')]);return _0x5c10da(_0x14fb36[_0x2310('0x11')][_0x2310('0x13')]);}else{logger[_0x2310('0xc')]('WhatsappTransferReport,\x20%s,\x20%s',_0x4e2269,_0x2310('0xd'));_0x5c10da(_0x14fb36[_0x2310('0x14')][_0x2310('0x13')]);}})[_0x2310('0x15')](function(_0x11da86){logger[_0x2310('0x11')](_0x2310('0x12'),_0x4e2269,_0x11da86);_0x4b04ab(_0x11da86);});});}
\ No newline at end of file
index 7f89ac9..2a504d5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x24ce=['seedDB','default','listen','info','start','filter','number','exitCode','length','\x20processes\x20failed\x20at\x20startup:\x20','map','pm2_env','name','Online\x20apps:','join','status','online','App\x20Ready!','log','Server\x20failed\x20to\x20start\x20due\x20to\x20error!','error','Server\x20failed\x20to\x20start\x20due\x20to\x20error:\x20%s','exit','./mysqldb','./config/seedDB','./config/license','./rpc','app','./config/schedule','./config/schedule/chat','./config/schedule/whatsapp','./config/schedule/transcribe','./config/schedule/cloud-provider','sync','then'];(function(_0x4a48dd,_0x54e0ef){var _0x138b0c=function(_0x52d588){while(--_0x52d588){_0x4a48dd['push'](_0x4a48dd['shift']());}};_0x138b0c(++_0x54e0ef);}(_0x24ce,0x1de));var _0xe24c=function(_0x46752c,_0x1e23dc){_0x46752c=_0x46752c-0x0;var _0x40b99c=_0x24ce[_0x46752c];return _0x40b99c;};'use strict';var _=require('lodash');var db=require(_0xe24c('0x0'))['db'];var seedDb=require(_0xe24c('0x1'));var checkLicense=require(_0xe24c('0x2'));var rpc=require(_0xe24c('0x3'));var config=require('./config/environment');var logger=require('./config/logger')(_0xe24c('0x4'));var pm2=require('./config/pm2');var pm2Config=require('./config/pm2/config');var schedule=require(_0xe24c('0x5'));var chat=require(_0xe24c('0x6'));var whatsapp=require(_0xe24c('0x7'));var transcribe=require(_0xe24c('0x8'));var provider=require(_0xe24c('0x9'));function main(){return db['sequelize'][_0xe24c('0xa')]()[_0xe24c('0xb')](function(){if(config[_0xe24c('0xc')]){return seedDb[_0xe24c('0xd')]();}})[_0xe24c('0xb')](function(){return checkLicense[_0xe24c('0xd')]();})[_0xe24c('0xb')](function(){return rpc[_0xe24c('0xe')]();})[_0xe24c('0xb')](function(_0x7b13c){logger[_0xe24c('0xf')](_0x7b13c);return chat[_0xe24c('0x10')]();})[_0xe24c('0xb')](function(){return whatsapp['start']();})[_0xe24c('0xb')](function(){return schedule['start']();})[_0xe24c('0xb')](function(){return transcribe['start']();})[_0xe24c('0xb')](function(){return provider[_0xe24c('0x10')]();})['then'](function(_0x572824){logger['info'](_0x572824);return pm2[_0xe24c('0x10')](pm2Config);})['then'](function(_0x1cb6c0){var _0x3446cf=_0x1cb6c0[_0xe24c('0x11')](function(_0x33979b){return typeof _0x33979b['exitCode']===_0xe24c('0x12')&&_0x33979b[_0xe24c('0x13')]>=0x0;});if(_0x3446cf[_0xe24c('0x14')]>0x0){throw new Error(_0x3446cf[_0xe24c('0x14')]+_0xe24c('0x15')+_[_0xe24c('0x16')](_0x3446cf,function(_0xbd9e1d){return'\x22'+_0xbd9e1d[_0xe24c('0x17')][_0xe24c('0x18')]+'\x22';}));}logger[_0xe24c('0xf')](_0xe24c('0x19'),_[_0xe24c('0x16')](_[_0xe24c('0x11')](_0x1cb6c0,{'status':'online'}),_0xe24c('0x18'))[_0xe24c('0x1a')]());logger[_0xe24c('0xf')]('Offline\x20apps:',_[_0xe24c('0x16')](_[_0xe24c('0x11')](_0x1cb6c0,function(_0x2462f2){return _0x2462f2[_0xe24c('0x1b')]!==_0xe24c('0x1c');}),_0xe24c('0x18'))['join']()||'None');console['log'](_0xe24c('0x1d'));})['catch'](function(_0x5d307c){console[_0xe24c('0x1e')](_0xe24c('0x1f'),_0x5d307c);logger[_0xe24c('0x20')](_0xe24c('0x21'),_0x5d307c);process[_0xe24c('0x22')](0x1);});}main();
\ No newline at end of file
+var _0xd8fb=['default','listen','info','start','filter','exitCode','number','length','map','name','join','Offline\x20apps:','status','online','None','log','App\x20Ready!','catch','Server\x20failed\x20to\x20start\x20due\x20to\x20error!','error','Server\x20failed\x20to\x20start\x20due\x20to\x20error:\x20%s','lodash','./mysqldb','./config/seedDB','./config/license','app','./config/pm2','./config/schedule','./config/schedule/chat','./config/schedule/transcribe','sequelize','then','seedDB'];(function(_0x1add93,_0x5f18f1){var _0x1996e0=function(_0x497508){while(--_0x497508){_0x1add93['push'](_0x1add93['shift']());}};_0x1996e0(++_0x5f18f1);}(_0xd8fb,0x99));var _0xbd8f=function(_0x4069f3,_0x16be22){_0x4069f3=_0x4069f3-0x0;var _0x3cb8be=_0xd8fb[_0x4069f3];return _0x3cb8be;};'use strict';var _=require(_0xbd8f('0x0'));var db=require(_0xbd8f('0x1'))['db'];var seedDb=require(_0xbd8f('0x2'));var checkLicense=require(_0xbd8f('0x3'));var rpc=require('./rpc');var config=require('./config/environment');var logger=require('./config/logger')(_0xbd8f('0x4'));var pm2=require(_0xbd8f('0x5'));var pm2Config=require('./config/pm2/config');var schedule=require(_0xbd8f('0x6'));var chat=require(_0xbd8f('0x7'));var whatsapp=require('./config/schedule/whatsapp');var transcribe=require(_0xbd8f('0x8'));var provider=require('./config/schedule/cloud-provider');function main(){return db[_0xbd8f('0x9')]['sync']()[_0xbd8f('0xa')](function(){if(config[_0xbd8f('0xb')]){return seedDb['default']();}})['then'](function(){return checkLicense[_0xbd8f('0xc')]();})[_0xbd8f('0xa')](function(){return rpc[_0xbd8f('0xd')]();})['then'](function(_0x255af3){logger[_0xbd8f('0xe')](_0x255af3);return chat['start']();})['then'](function(){return whatsapp[_0xbd8f('0xf')]();})[_0xbd8f('0xa')](function(){return schedule[_0xbd8f('0xf')]();})['then'](function(){return transcribe[_0xbd8f('0xf')]();})[_0xbd8f('0xa')](function(){return provider[_0xbd8f('0xf')]();})[_0xbd8f('0xa')](function(_0x8bc054){logger[_0xbd8f('0xe')](_0x8bc054);return pm2[_0xbd8f('0xf')](pm2Config);})[_0xbd8f('0xa')](function(_0x14606c){var _0x5e59ae=_0x14606c[_0xbd8f('0x10')](function(_0x829fb2){return typeof _0x829fb2[_0xbd8f('0x11')]===_0xbd8f('0x12')&&_0x829fb2['exitCode']>=0x0;});if(_0x5e59ae[_0xbd8f('0x13')]>0x0){throw new Error(_0x5e59ae[_0xbd8f('0x13')]+'\x20processes\x20failed\x20at\x20startup:\x20'+_[_0xbd8f('0x14')](_0x5e59ae,function(_0xf5e7a){return'\x22'+_0xf5e7a['pm2_env'][_0xbd8f('0x15')]+'\x22';}));}logger[_0xbd8f('0xe')]('Online\x20apps:',_['map'](_[_0xbd8f('0x10')](_0x14606c,{'status':'online'}),'name')[_0xbd8f('0x16')]());logger['info'](_0xbd8f('0x17'),_[_0xbd8f('0x14')](_[_0xbd8f('0x10')](_0x14606c,function(_0x897f25){return _0x897f25[_0xbd8f('0x18')]!==_0xbd8f('0x19');}),_0xbd8f('0x15'))[_0xbd8f('0x16')]()||_0xbd8f('0x1a'));console[_0xbd8f('0x1b')](_0xbd8f('0x1c'));})[_0xbd8f('0x1d')](function(_0x2f7c45){console[_0xbd8f('0x1b')](_0xbd8f('0x1e'),_0x2f7c45);logger[_0xbd8f('0x1f')](_0xbd8f('0x20'),_0x2f7c45);process['exit'](0x1);});}main();
\ No newline at end of file
index 8db817a..1e49859 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6a17=['lastLoginAt','lastPauseAt','crudPermissions','allowmessenger','passwordResetAt','phoneBarAutoAnswerDelay','phoneBarDnd','phoneBarEnableRecording','phoneBarEnableSettings','phoneBarExpires','phoneBarPrefixRequired','phoneBarRemoteControl','phoneBarRemoteControlPort','hotdesk','interface','userProfileId','settingsEnabled','wssPort','downloadVoiceRecordings','downloadOmnichannelInteractions','downloadAttachments','ignorePauseForPreviewCalls','selectRecallMeCampaign','chatAutoanswer','chatAutoanswerDelay','emailAutoanswer','emailAutoanswerDelay','smsAutoanswer','smsAutoanswerDelay','openchannelAutoanswer','faxAutoanswer','whatsappAutoanswer','whatsappAutoanswerDelay','isChatInteractionAuthorized','isAuthenticated','use','user','ChatInteraction','findOne','params','closed','disposition','then','query','forceDownload','status','unmanaged','json','Unmanaged.','Forbidden.','catch','headers','authorization','startsWith','Basic','User','authenticate','Wrong\x20credentials.','Bearer','Unknown\x20authorization\x20format','apikey','getUuid','find','Setting','blockDuration','isEqual','apiKeyNonce','nonce','API\x20access\x20key\x20is\x20not\x20valid\x20anymore','disabled','Invalid\x20API\x20access\x20key','blockedAt','User\x20object\x20not\x20found.','canUpdate','getLicense','Forbidden','isWebrtcLicence','webrtc','isMiddleware','signToken','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','Sequelize','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.','updatePasswordsHistory','length','splice','unshift','encryptString','join','promisify','secrets','payload','options','toString','floor','../../config/environment','../../config/license/util','../encryptor','lodash','jsonwebtoken','express-jwt','composable-middleware','basic-auth','bluebird','moment','session','role','fullname','name','internal','email','userpic','permissions','md5secret','smsPause','openchannelPause','pauseType','showWebBar'];(function(_0x5c7883,_0x2d0e2e){var _0x2e4777=function(_0x86e0cc){while(--_0x86e0cc){_0x5c7883['push'](_0x5c7883['shift']());}};_0x2e4777(++_0x2d0e2e);}(_0x6a17,0x101));var _0x76a1=function(_0x1a6f40,_0x471da3){_0x1a6f40=_0x1a6f40-0x0;var _0x2dfb96=_0x6a17[_0x1a6f40];return _0x2dfb96;};'use strict';var db=require('../../mysqldb')['db'];var config=require(_0x76a1('0x0'));var hardwareConf=require('../../config/license/hardware');var licenseUtil=require(_0x76a1('0x1'));var encryptor=require(_0x76a1('0x2'));var _=require(_0x76a1('0x3'));var jwt=require(_0x76a1('0x4'));var expressJwt=require(_0x76a1('0x5'));var compose=require(_0x76a1('0x6'));var basicAuth=require(_0x76a1('0x7'));var crypto=require('crypto');var BPromise=require(_0x76a1('0x8'));var util=require('util');var moment=require(_0x76a1('0x9'));var validateJwt=expressJwt({'secret':config['secrets'][_0x76a1('0xa')]});var userAttributes=['id',_0x76a1('0xb'),_0x76a1('0xc'),_0x76a1('0xd'),_0x76a1('0xe'),_0x76a1('0xf'),_0x76a1('0x10'),_0x76a1('0x11'),_0x76a1('0x12'),'voicePause','chatPause','mailPause','faxPause',_0x76a1('0x13'),_0x76a1('0x14'),_0x76a1('0x15'),_0x76a1('0x16'),_0x76a1('0x17'),_0x76a1('0x18'),_0x76a1('0x19'),_0x76a1('0x1a'),_0x76a1('0x1b'),'alias','phoneBarAutoAnswer',_0x76a1('0x1c'),_0x76a1('0x1d'),_0x76a1('0x1e'),'phoneBarEnableDtmfTone',_0x76a1('0x1f'),_0x76a1('0x20'),_0x76a1('0x21'),_0x76a1('0x22'),_0x76a1('0x23'),_0x76a1('0x24'),_0x76a1('0x25'),_0x76a1('0x26'),'privacyEnabled',_0x76a1('0x27'),_0x76a1('0x28'),_0x76a1('0x29'),_0x76a1('0x2a'),_0x76a1('0x2b'),_0x76a1('0x2c'),_0x76a1('0x2d'),_0x76a1('0x2e'),_0x76a1('0x2f'),_0x76a1('0x30'),_0x76a1('0x31'),_0x76a1('0x32'),_0x76a1('0x33'),_0x76a1('0x34'),'openchannelAutoanswerDelay',_0x76a1('0x35'),'faxAutoanswerDelay',_0x76a1('0x36'),_0x76a1('0x37'),'messengerSoundNotification'];exports[_0x76a1('0x38')]=function(){return this[_0x76a1('0x39')](!![])[_0x76a1('0x3a')](function(_0x2c8674,_0x29fe61,_0x29f66c){if(_0x2c8674[_0x76a1('0x3b')]){_0x29f66c();}else{return db[_0x76a1('0x3c')][_0x76a1('0x3d')]({'where':{'id':_0x2c8674[_0x76a1('0x3e')]['id']},'attributes':['id',_0x76a1('0x3f'),_0x76a1('0x40')],'raw':!![]})[_0x76a1('0x41')](function(_0x374a53){if(_0x374a53&&_0x374a53['closed']&&!_0x2c8674[_0x76a1('0x42')][_0x76a1('0x43')]){return _0x29fe61[_0x76a1('0x44')](_0x374a53[_0x76a1('0x40')]===_0x76a1('0x45')?0x195:0x193)[_0x76a1('0x46')]({'message':_0x374a53[_0x76a1('0x40')]===_0x76a1('0x45')?_0x76a1('0x47'):_0x76a1('0x48')});}else{_0x29f66c();}})[_0x76a1('0x49')](function(_0x318855){_0x29f66c(_0x318855);});}});};exports[_0x76a1('0x39')]=function isAuthenticated(_0x58e944){return compose()[_0x76a1('0x3a')](function(_0x3e3f22,_0x224480,_0x9ead85){var _0x1b5739;if(_0x3e3f22[_0x76a1('0x4a')][_0x76a1('0x4b')]){if(_[_0x76a1('0x4c')](_0x3e3f22[_0x76a1('0x4a')][_0x76a1('0x4b')],_0x76a1('0x4d'))){var _0x5ef4fc=basicAuth(_0x3e3f22);db[_0x76a1('0x4e')]['find']({'where':{'name':_0x5ef4fc[_0x76a1('0xd')]}})[_0x76a1('0x41')](function(_0x1bec2d){if(!_0x1bec2d||!_0x1bec2d[_0x76a1('0x4f')](_0x5ef4fc['pass'])){return _0x224480[_0x76a1('0x44')](0x191)[_0x76a1('0x46')]({'message':_0x76a1('0x50')});}_0x3e3f22[_0x76a1('0x3b')]={'id':_0x1bec2d['id']};_0x9ead85();})['catch'](function(_0x33832b){_0x9ead85(_0x33832b);});}else if(_[_0x76a1('0x4c')](_0x3e3f22[_0x76a1('0x4a')]['authorization'],_0x76a1('0x51'))){validateJwt(_0x3e3f22,_0x224480,_0x9ead85);}else{if(_0x58e944){_0x9ead85();}else{return _0x224480[_0x76a1('0x44')](0x193)[_0x76a1('0x46')]({'message':_0x76a1('0x52')});}}}else if(_0x3e3f22[_0x76a1('0x42')][_0x76a1('0x53')]){try{var _0x186dcb={'audience':hardwareConf[_0x76a1('0x54')](),'issuer':hardwareConf['getUuid']()};verifyJwt(_0x3e3f22[_0x76a1('0x42')][_0x76a1('0x53')],_0x186dcb)['then'](function(_0x29bd44){return db['User'][_0x76a1('0x55')]({'where':{'id':_0x29bd44['sub']}})[_0x76a1('0x41')](function(_0x4409f3){_0x1b5739=_0x4409f3;return db[_0x76a1('0x56')]['findOne']({'where':{'id':0x1},'attributes':['allowedLoginAttempts',_0x76a1('0x57')],'raw':!![]});})[_0x76a1('0x41')](function(_0x372d9c){if(!_0x1b5739||!_[_0x76a1('0x58')](_0x1b5739[_0x76a1('0x59')],_0x29bd44[_0x76a1('0x5a')])){return _0x224480[_0x76a1('0x44')](0x191)[_0x76a1('0x46')]({'message':_0x76a1('0x5b')});}if(_0x1b5739[_0x76a1('0x5c')]){return _0x224480[_0x76a1('0x44')](0x191)[_0x76a1('0x46')]({'message':_0x76a1('0x5d')});}if(_0x1b5739['blocked']){if(_0x372d9c[_0x76a1('0x57')]>0x0){if(moment(_0x1b5739[_0x76a1('0x5e')])['add'](_0x372d9c[_0x76a1('0x57')],'minutes')>moment()){return _0x224480[_0x76a1('0x44')](0x191)[_0x76a1('0x46')]({'message':_0x76a1('0x5d')});}}else{return _0x224480[_0x76a1('0x44')](0x191)[_0x76a1('0x46')]({'message':_0x76a1('0x5d')});}}_0x3e3f22[_0x76a1('0x3b')]={'id':_0x1b5739['id']};_0x9ead85();});})[_0x76a1('0x49')](function(){return _0x224480[_0x76a1('0x44')](0x191)[_0x76a1('0x46')]({'message':'Invalid\x20API\x20access\x20key'});});}catch(_0x4a79c){_0x9ead85(_0x4a79c);}}else if(_0x58e944){_0x9ead85();}else{return _0x224480['status'](0x193)[_0x76a1('0x46')]({'message':'Unknown\x20authorization\x20format'});}})[_0x76a1('0x3a')](function(_0x5ed183,_0x3953c4,_0x1e4ce5){if(_0x5ed183[_0x76a1('0x3b')]){db[_0x76a1('0x4e')][_0x76a1('0x55')]({'where':{'id':_0x5ed183[_0x76a1('0x3b')]['id']},'attributes':userAttributes})['then'](function(_0xc06a53){if(!_0xc06a53){return _0x3953c4['status'](0x194)['json']({'message':'User\x20not\x20found.'});}_0x5ed183['user']=_0xc06a53;_0x1e4ce5();})[_0x76a1('0x49')](function(_0xa7b06b){_0x1e4ce5(_0xa7b06b);});}else if(_0x58e944){_0x1e4ce5();}else{return _0x3953c4['status'](0x194)[_0x76a1('0x46')]({'message':_0x76a1('0x5f')});}});};exports[_0x76a1('0x60')]=function canUpdate(){return compose()[_0x76a1('0x3a')](function(_0x2a6faf,_0x240b91,_0x5720a4){return licenseUtil[_0x76a1('0x61')]()['then'](function(_0x147924){if(_0x147924['update']){_0x5720a4();}else{return _0x240b91[_0x76a1('0x44')](0x193)[_0x76a1('0x46')]({'message':_0x76a1('0x62')});}})[_0x76a1('0x49')](function(_0x4e90ff){_0x5720a4(_0x4e90ff);});});};exports[_0x76a1('0x63')]=function isWebrtcLicence(){return compose()['use'](function(_0x1a141,_0x510f52,_0x3a5fe0){return licenseUtil[_0x76a1('0x61')]()[_0x76a1('0x41')](function(_0x1e099f){if(_0x1e099f[_0x76a1('0x64')]){_0x3a5fe0();}else{return _0x510f52['status'](0x193)[_0x76a1('0x46')]({'message':_0x76a1('0x62')});}})[_0x76a1('0x49')](function(_0x3c4fd8){_0x3a5fe0(_0x3c4fd8);});});};exports[_0x76a1('0x65')]=function(_0x3b994f,_0x1052bb,_0x3ca529){_0x3b994f['isMiddleware']=!![];return _0x3ca529();};exports[_0x76a1('0x66')]=function signToken(_0x22368a){return signJwt(_0x22368a);};exports[_0x76a1('0x67')]=function(_0x3ae377,_0x56dfde){if(!_0x3ae377[_0x76a1('0x3b')]){return _0x56dfde[_0x76a1('0x44')](0x194)[_0x76a1('0x46')]({'message':_0x76a1('0x68')});}var _0x31231f={'payload':{'id':_0x3ae377[_0x76a1('0x3b')]['id'],'role':_0x3ae377[_0x76a1('0x3b')][_0x76a1('0xb')]},'options':{'expiresIn':0x15180}};return signJwt(_0x31231f)['then'](function(_0x43ede7){_0x56dfde[_0x76a1('0x69')](_0x76a1('0x6a'),_0x43ede7);_0x56dfde[_0x76a1('0x6b')](_0x76a1('0x6c'));})[_0x76a1('0x49')](function(_0x503403){return _0x56dfde[_0x76a1('0x44')](0x1f4)[_0x76a1('0x6d')](_0x503403);});};exports[_0x76a1('0x6e')]=function(_0x1a5334){if(_['isNil'](_0x1a5334[_0x76a1('0x59')])||_[_0x76a1('0x6f')](_0x1a5334[_0x76a1('0x70')])){return null;}else{return createJwt(_0x1a5334);}};exports[_0x76a1('0x71')]=function(_0x48c47a){_0x48c47a[_0x76a1('0x59')]=generateNonce();_0x48c47a[_0x76a1('0x70')]=generateIssuedAt();return createJwt(_0x48c47a);};exports[_0x76a1('0x72')]=function(_0x24936f,_0x2c334b){var _0x46948c=_0x24936f['query']['apikey'];if(_0x46948c){var _0x2bbb24={'nonce':_0x2c334b[_0x76a1('0x59')],'iat':_0x2c334b['apiKeyIat'],'audience':hardwareConf[_0x76a1('0x54')](),'issuer':hardwareConf[_0x76a1('0x54')]()};return verifyJwt(_0x46948c,_0x2bbb24)[_0x76a1('0x41')](function(){return generateApiKey(_0x2c334b);});}else{throw{'message':_0x76a1('0x73')};}};exports[_0x76a1('0x74')]=function(_0x2b95b9){var _0x2269d8=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(!_0x2269d8[_0x76a1('0x75')](_0x2b95b9))throw new db[(_0x76a1('0x76'))][(_0x76a1('0x77'))](_0x76a1('0x78'));return;};exports[_0x76a1('0x79')]=function(_0x274b97,_0x424adb,_0x39a5ad){var _0x2a3eda=encryptor[_0x76a1('0x7a')](_0x424adb)[_0x76a1('0x7b')](',');for(var _0x3ad3dd=0x0;_0x3ad3dd<_0x39a5ad;_0x3ad3dd++){if(!_0x2a3eda[_0x3ad3dd])break;if(_0x274b97[_0x76a1('0x7c')]()===_0x2a3eda[_0x3ad3dd]['toLowerCase']()){var _0x228465=util[_0x76a1('0x7d')](_0x76a1('0x7e'),_0x39a5ad);if(_0x39a5ad===0x1){_0x228465=_0x76a1('0x7f');}throw new db['Sequelize'][(_0x76a1('0x77'))](_0x228465);}}return;};exports[_0x76a1('0x80')]=function(_0x11d727,_0x496c10){var _0x52608b=_0x496c10?encryptor[_0x76a1('0x7a')](_0x496c10)['split'](','):[];if(_0x52608b[_0x76a1('0x81')]===0x5){_0x52608b[_0x76a1('0x82')](-0x1,0x1);}_0x52608b[_0x76a1('0x83')](_0x11d727);return encryptor[_0x76a1('0x84')](_0x52608b[_0x76a1('0x85')](','));};function signJwt(_0x43fd98){var _0xbe0082=BPromise[_0x76a1('0x86')](jwt['sign'],{'context':jwt});var _0x17f27b=_0x43fd98['secret']||config[_0x76a1('0x87')][_0x76a1('0xa')];return new BPromise(function(_0x3a946c,_0x61e17){_0xbe0082(_0x43fd98[_0x76a1('0x88')],_0x17f27b,_0x43fd98[_0x76a1('0x89')])['then'](function(_0x3491a0){_0x3a946c(_0x3491a0);})['catch'](function(_0x5486a9){_0x61e17(_0x5486a9);});});}function verifyJwt(_0x127068,_0x40a112,_0x14a1d0){var _0x2567d6=BPromise[_0x76a1('0x86')](jwt['verify'],{'context':jwt});var _0x223320=_0x14a1d0||config[_0x76a1('0x87')][_0x76a1('0xa')];return new BPromise(function(_0x1863df,_0x25c29c){_0x2567d6(_0x127068,_0x223320,_0x40a112)[_0x76a1('0x41')](function(_0x50edda){_0x1863df(_0x50edda);})[_0x76a1('0x49')](function(_0x44462a){_0x25c29c(_0x44462a);});});}function generateNonce(){return crypto['randomBytes'](0x10)[_0x76a1('0x8a')]('hex');}function generateIssuedAt(){return Math[_0x76a1('0x8b')](Date['now']()/0x3e8)['toString']();}function createJwt(_0x482ae4){var _0x10da62={'payload':{'iat':_0x482ae4['apiKeyIat'],'nonce':_0x482ae4[_0x76a1('0x59')]},'options':{'algorithm':'HS512','subject':_0x482ae4['id']['toString'](),'issuer':hardwareConf[_0x76a1('0x54')](),'audience':hardwareConf[_0x76a1('0x54')]()}};return signJwt(_0x10da62)['then'](function(_0x1cda85){return{'iat':_0x482ae4[_0x76a1('0x70')],'nonce':_0x482ae4[_0x76a1('0x59')],'token':_0x1cda85};});}
\ No newline at end of file
+var _0x3ed3=['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.','ValidationError','updatePasswordsHistory','splice','encryptString','join','promisify','secret','payload','options','verify','randomBytes','toString','hex','../../mysqldb','../../config/environment','../../config/license/hardware','../../config/license/util','../encryptor','express-jwt','composable-middleware','basic-auth','crypto','bluebird','secrets','session','role','name','email','userpic','permissions','md5secret','voicePause','chatPause','faxPause','smsPause','pauseType','lastPauseAt','crudPermissions','allowmessenger','alias','phoneBarAutoAnswer','phoneBarAutoAnswerDelay','phoneBarEnableRecording','phoneBarEnableDtmfTone','phoneBarEnableSettings','phoneBarExpires','phoneBarPrefixRequired','phoneBarRemoteControl','phoneBarRemoteControlPort','hotdesk','interface','userProfileId','privacyEnabled','settingsEnabled','downloadVoiceRecordings','downloadOmnichannelInteractions','downloadAttachments','ignorePauseForPreviewCalls','selectRecallMeCampaign','chatAutoanswerDelay','emailAutoanswer','emailAutoanswerDelay','smsAutoanswer','smsAutoanswerDelay','openchannelAutoanswerDelay','faxAutoanswer','faxAutoanswerDelay','whatsappAutoanswerDelay','messengerSoundNotification','isChatInteractionAuthorized','isAuthenticated','use','user','ChatInteraction','params','closed','disposition','then','query','forceDownload','status','unmanaged','json','Unmanaged.','Forbidden.','headers','authorization','startsWith','User','find','pass','Wrong\x20credentials.','catch','Bearer','getUuid','sub','Setting','allowedLoginAttempts','blockDuration','isEqual','apiKeyNonce','nonce','Invalid\x20API\x20access\x20key','blocked','blockedAt','add','Unknown\x20authorization\x20format','User\x20not\x20found.','User\x20object\x20not\x20found.','canUpdate','isWebrtcLicence','getLicense','webrtc','Forbidden','isMiddleware','signToken','setTokenCookie','It\x20looks\x20like\x20you\x20aren\x27t\x20logged\x20in,\x20please\x20try\x20again.','cookie','motion.token','redirect','/dashboards/general','send','retrieveApiKey','apiKeyIat','regenerateApiKey','apikey','Please\x20use\x20the\x20previous\x20API\x20access\x20key\x20to\x20generate\x20a\x20new\x20one','validatePasswordPattern','test','Sequelize','validatePasswordHistory','decryptString','split'];(function(_0x3825a8,_0x2ce1a2){var _0xabc9bc=function(_0x101073){while(--_0x101073){_0x3825a8['push'](_0x3825a8['shift']());}};_0xabc9bc(++_0x2ce1a2);}(_0x3ed3,0x122));var _0x33ed=function(_0x169e88,_0x2959f4){_0x169e88=_0x169e88-0x0;var _0x3f2517=_0x3ed3[_0x169e88];return _0x3f2517;};'use strict';var db=require(_0x33ed('0x0'))['db'];var config=require(_0x33ed('0x1'));var hardwareConf=require(_0x33ed('0x2'));var licenseUtil=require(_0x33ed('0x3'));var encryptor=require(_0x33ed('0x4'));var _=require('lodash');var jwt=require('jsonwebtoken');var expressJwt=require(_0x33ed('0x5'));var compose=require(_0x33ed('0x6'));var basicAuth=require(_0x33ed('0x7'));var crypto=require(_0x33ed('0x8'));var BPromise=require(_0x33ed('0x9'));var util=require('util');var moment=require('moment');var validateJwt=expressJwt({'secret':config[_0x33ed('0xa')][_0x33ed('0xb')]});var userAttributes=['id',_0x33ed('0xc'),'fullname',_0x33ed('0xd'),'internal',_0x33ed('0xe'),_0x33ed('0xf'),_0x33ed('0x10'),_0x33ed('0x11'),_0x33ed('0x12'),_0x33ed('0x13'),'mailPause',_0x33ed('0x14'),_0x33ed('0x15'),'openchannelPause',_0x33ed('0x16'),'showWebBar','lastLoginAt',_0x33ed('0x17'),_0x33ed('0x18'),_0x33ed('0x19'),'passwordResetAt',_0x33ed('0x1a'),_0x33ed('0x1b'),_0x33ed('0x1c'),'phoneBarDnd',_0x33ed('0x1d'),_0x33ed('0x1e'),_0x33ed('0x1f'),_0x33ed('0x20'),_0x33ed('0x21'),_0x33ed('0x22'),_0x33ed('0x23'),_0x33ed('0x24'),_0x33ed('0x25'),_0x33ed('0x26'),_0x33ed('0x27'),_0x33ed('0x28'),'wssPort',_0x33ed('0x29'),_0x33ed('0x2a'),_0x33ed('0x2b'),_0x33ed('0x2c'),_0x33ed('0x2d'),'chatAutoanswer',_0x33ed('0x2e'),_0x33ed('0x2f'),_0x33ed('0x30'),_0x33ed('0x31'),_0x33ed('0x32'),'openchannelAutoanswer',_0x33ed('0x33'),_0x33ed('0x34'),_0x33ed('0x35'),'whatsappAutoanswer',_0x33ed('0x36'),_0x33ed('0x37')];exports[_0x33ed('0x38')]=function(){return this[_0x33ed('0x39')](!![])[_0x33ed('0x3a')](function(_0x35c25e,_0x152097,_0x50db3a){if(_0x35c25e[_0x33ed('0x3b')]){_0x50db3a();}else{return db[_0x33ed('0x3c')]['findOne']({'where':{'id':_0x35c25e[_0x33ed('0x3d')]['id']},'attributes':['id',_0x33ed('0x3e'),_0x33ed('0x3f')],'raw':!![]})[_0x33ed('0x40')](function(_0x35318c){if(_0x35318c&&_0x35318c[_0x33ed('0x3e')]&&!_0x35c25e[_0x33ed('0x41')][_0x33ed('0x42')]){return _0x152097[_0x33ed('0x43')](_0x35318c[_0x33ed('0x3f')]===_0x33ed('0x44')?0x195:0x193)[_0x33ed('0x45')]({'message':_0x35318c[_0x33ed('0x3f')]==='unmanaged'?_0x33ed('0x46'):_0x33ed('0x47')});}else{_0x50db3a();}})['catch'](function(_0x13acf0){_0x50db3a(_0x13acf0);});}});};exports[_0x33ed('0x39')]=function isAuthenticated(_0x301bb5){return compose()['use'](function(_0x5bb12d,_0x525d02,_0x32077b){var _0x429d8d;if(_0x5bb12d[_0x33ed('0x48')][_0x33ed('0x49')]){if(_[_0x33ed('0x4a')](_0x5bb12d[_0x33ed('0x48')]['authorization'],'Basic')){var _0x3c3e6b=basicAuth(_0x5bb12d);db[_0x33ed('0x4b')][_0x33ed('0x4c')]({'where':{'name':_0x3c3e6b['name']}})[_0x33ed('0x40')](function(_0x176944){if(!_0x176944||!_0x176944['authenticate'](_0x3c3e6b[_0x33ed('0x4d')])){return _0x525d02[_0x33ed('0x43')](0x191)['json']({'message':_0x33ed('0x4e')});}_0x5bb12d[_0x33ed('0x3b')]={'id':_0x176944['id']};_0x32077b();})[_0x33ed('0x4f')](function(_0x5defdf){_0x32077b(_0x5defdf);});}else if(_['startsWith'](_0x5bb12d[_0x33ed('0x48')][_0x33ed('0x49')],_0x33ed('0x50'))){validateJwt(_0x5bb12d,_0x525d02,_0x32077b);}else{if(_0x301bb5){_0x32077b();}else{return _0x525d02[_0x33ed('0x43')](0x193)[_0x33ed('0x45')]({'message':'Unknown\x20authorization\x20format'});}}}else if(_0x5bb12d[_0x33ed('0x41')]['apikey']){try{var _0x3fbb23={'audience':hardwareConf['getUuid'](),'issuer':hardwareConf[_0x33ed('0x51')]()};verifyJwt(_0x5bb12d['query']['apikey'],_0x3fbb23)[_0x33ed('0x40')](function(_0x2616ad){return db[_0x33ed('0x4b')][_0x33ed('0x4c')]({'where':{'id':_0x2616ad[_0x33ed('0x52')]}})['then'](function(_0x383f8a){_0x429d8d=_0x383f8a;return db[_0x33ed('0x53')]['findOne']({'where':{'id':0x1},'attributes':[_0x33ed('0x54'),_0x33ed('0x55')],'raw':!![]});})[_0x33ed('0x40')](function(_0xc438ad){if(!_0x429d8d||!_[_0x33ed('0x56')](_0x429d8d[_0x33ed('0x57')],_0x2616ad[_0x33ed('0x58')])){return _0x525d02[_0x33ed('0x43')](0x191)[_0x33ed('0x45')]({'message':'API\x20access\x20key\x20is\x20not\x20valid\x20anymore'});}if(_0x429d8d['disabled']){return _0x525d02[_0x33ed('0x43')](0x191)['json']({'message':_0x33ed('0x59')});}if(_0x429d8d[_0x33ed('0x5a')]){if(_0xc438ad[_0x33ed('0x55')]>0x0){if(moment(_0x429d8d[_0x33ed('0x5b')])[_0x33ed('0x5c')](_0xc438ad[_0x33ed('0x55')],'minutes')>moment()){return _0x525d02[_0x33ed('0x43')](0x191)[_0x33ed('0x45')]({'message':_0x33ed('0x59')});}}else{return _0x525d02[_0x33ed('0x43')](0x191)[_0x33ed('0x45')]({'message':_0x33ed('0x59')});}}_0x5bb12d[_0x33ed('0x3b')]={'id':_0x429d8d['id']};_0x32077b();});})[_0x33ed('0x4f')](function(){return _0x525d02['status'](0x191)[_0x33ed('0x45')]({'message':_0x33ed('0x59')});});}catch(_0x909c29){_0x32077b(_0x909c29);}}else if(_0x301bb5){_0x32077b();}else{return _0x525d02[_0x33ed('0x43')](0x193)[_0x33ed('0x45')]({'message':_0x33ed('0x5d')});}})[_0x33ed('0x3a')](function(_0x37cc0c,_0x4fdd76,_0x44e0ba){if(_0x37cc0c['user']){db[_0x33ed('0x4b')]['find']({'where':{'id':_0x37cc0c[_0x33ed('0x3b')]['id']},'attributes':userAttributes})['then'](function(_0x3014f9){if(!_0x3014f9){return _0x4fdd76['status'](0x194)[_0x33ed('0x45')]({'message':_0x33ed('0x5e')});}_0x37cc0c[_0x33ed('0x3b')]=_0x3014f9;_0x44e0ba();})[_0x33ed('0x4f')](function(_0xbf8e99){_0x44e0ba(_0xbf8e99);});}else if(_0x301bb5){_0x44e0ba();}else{return _0x4fdd76[_0x33ed('0x43')](0x194)[_0x33ed('0x45')]({'message':_0x33ed('0x5f')});}});};exports[_0x33ed('0x60')]=function canUpdate(){return compose()[_0x33ed('0x3a')](function(_0x44c0e2,_0x415401,_0x413470){return licenseUtil['getLicense']()[_0x33ed('0x40')](function(_0x7256e6){if(_0x7256e6['update']){_0x413470();}else{return _0x415401[_0x33ed('0x43')](0x193)['json']({'message':'Forbidden'});}})[_0x33ed('0x4f')](function(_0x6ff8f2){_0x413470(_0x6ff8f2);});});};exports[_0x33ed('0x61')]=function isWebrtcLicence(){return compose()[_0x33ed('0x3a')](function(_0x1130d8,_0x55de2b,_0x32fdff){return licenseUtil[_0x33ed('0x62')]()[_0x33ed('0x40')](function(_0x1cfce2){if(_0x1cfce2[_0x33ed('0x63')]){_0x32fdff();}else{return _0x55de2b[_0x33ed('0x43')](0x193)['json']({'message':_0x33ed('0x64')});}})[_0x33ed('0x4f')](function(_0x40887b){_0x32fdff(_0x40887b);});});};exports[_0x33ed('0x65')]=function(_0x2ce6e6,_0x2a5f36,_0x24b4d2){_0x2ce6e6[_0x33ed('0x65')]=!![];return _0x24b4d2();};exports[_0x33ed('0x66')]=function signToken(_0x34f399){return signJwt(_0x34f399);};exports[_0x33ed('0x67')]=function(_0x472d57,_0x3c9db5){if(!_0x472d57[_0x33ed('0x3b')]){return _0x3c9db5[_0x33ed('0x43')](0x194)[_0x33ed('0x45')]({'message':_0x33ed('0x68')});}var _0x809cfd={'payload':{'id':_0x472d57[_0x33ed('0x3b')]['id'],'role':_0x472d57[_0x33ed('0x3b')][_0x33ed('0xc')]},'options':{'expiresIn':0x15180}};return signJwt(_0x809cfd)['then'](function(_0x4dfed9){_0x3c9db5[_0x33ed('0x69')](_0x33ed('0x6a'),_0x4dfed9);_0x3c9db5[_0x33ed('0x6b')](_0x33ed('0x6c'));})[_0x33ed('0x4f')](function(_0x34d051){return _0x3c9db5['status'](0x1f4)[_0x33ed('0x6d')](_0x34d051);});};exports[_0x33ed('0x6e')]=function(_0x1af943){if(_['isNil'](_0x1af943[_0x33ed('0x57')])||_['isNil'](_0x1af943[_0x33ed('0x6f')])){return null;}else{return createJwt(_0x1af943);}};exports['generateApiKey']=function(_0x1328d1){_0x1328d1[_0x33ed('0x57')]=generateNonce();_0x1328d1[_0x33ed('0x6f')]=generateIssuedAt();return createJwt(_0x1328d1);};exports[_0x33ed('0x70')]=function(_0xc5e8c9,_0x7384d){var _0x160aa9=_0xc5e8c9[_0x33ed('0x41')][_0x33ed('0x71')];if(_0x160aa9){var _0x196924={'nonce':_0x7384d[_0x33ed('0x57')],'iat':_0x7384d[_0x33ed('0x6f')],'audience':hardwareConf[_0x33ed('0x51')](),'issuer':hardwareConf[_0x33ed('0x51')]()};return verifyJwt(_0x160aa9,_0x196924)[_0x33ed('0x40')](function(){return generateApiKey(_0x7384d);});}else{throw{'message':_0x33ed('0x72')};}};exports[_0x33ed('0x73')]=function(_0x43768b){var _0x1258d8=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(!_0x1258d8[_0x33ed('0x74')](_0x43768b))throw new db[(_0x33ed('0x75'))]['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~!@#$%^&-_=+[{]}.');return;};exports[_0x33ed('0x76')]=function(_0x1dfb51,_0x3b8353,_0x1dcb69){var _0x3fd101=encryptor[_0x33ed('0x77')](_0x3b8353)[_0x33ed('0x78')](',');for(var _0x48a528=0x0;_0x48a528<_0x1dcb69;_0x48a528++){if(!_0x3fd101[_0x48a528])break;if(_0x1dfb51[_0x33ed('0x79')]()===_0x3fd101[_0x48a528][_0x33ed('0x79')]()){var _0x47869f=util['format'](_0x33ed('0x7a'),_0x1dcb69);if(_0x1dcb69===0x1){_0x47869f=_0x33ed('0x7b');}throw new db[(_0x33ed('0x75'))][(_0x33ed('0x7c'))](_0x47869f);}}return;};exports[_0x33ed('0x7d')]=function(_0x150b62,_0x47890e){var _0x18ddec=_0x47890e?encryptor[_0x33ed('0x77')](_0x47890e)[_0x33ed('0x78')](','):[];if(_0x18ddec['length']===0x5){_0x18ddec[_0x33ed('0x7e')](-0x1,0x1);}_0x18ddec['unshift'](_0x150b62);return encryptor[_0x33ed('0x7f')](_0x18ddec[_0x33ed('0x80')](','));};function signJwt(_0x22a0ac){var _0x4831e1=BPromise[_0x33ed('0x81')](jwt['sign'],{'context':jwt});var _0x4d1b77=_0x22a0ac[_0x33ed('0x82')]||config[_0x33ed('0xa')][_0x33ed('0xb')];return new BPromise(function(_0x446ece,_0x1146ce){_0x4831e1(_0x22a0ac[_0x33ed('0x83')],_0x4d1b77,_0x22a0ac[_0x33ed('0x84')])[_0x33ed('0x40')](function(_0x109129){_0x446ece(_0x109129);})[_0x33ed('0x4f')](function(_0x567849){_0x1146ce(_0x567849);});});}function verifyJwt(_0x15499d,_0x18eaa6,_0x305a82){var _0x91f771=BPromise[_0x33ed('0x81')](jwt[_0x33ed('0x85')],{'context':jwt});var _0x3d26b0=_0x305a82||config[_0x33ed('0xa')][_0x33ed('0xb')];return new BPromise(function(_0x58786b,_0x344db7){_0x91f771(_0x15499d,_0x3d26b0,_0x18eaa6)[_0x33ed('0x40')](function(_0xda726e){_0x58786b(_0xda726e);})['catch'](function(_0x30e745){_0x344db7(_0x30e745);});});}function generateNonce(){return crypto[_0x33ed('0x86')](0x10)[_0x33ed('0x87')](_0x33ed('0x88'));}function generateIssuedAt(){return Math['floor'](Date['now']()/0x3e8)[_0x33ed('0x87')]();}function createJwt(_0x33086f){var _0x326abf={'payload':{'iat':_0x33086f[_0x33ed('0x6f')],'nonce':_0x33086f[_0x33ed('0x57')]},'options':{'algorithm':'HS512','subject':_0x33086f['id']['toString'](),'issuer':hardwareConf[_0x33ed('0x51')](),'audience':hardwareConf[_0x33ed('0x51')]()}};return signJwt(_0x326abf)[_0x33ed('0x40')](function(_0x130d53){return{'iat':_0x33086f[_0x33ed('0x6f')],'nonce':_0x33086f[_0x33ed('0x57')],'token':_0x130d53};});}
\ No newline at end of file
index 96b04b5..cce4c30 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf8ab=['User','buildContactsQuery','rows','catch','describe','CmContact','cf_','map','CmCustomField','findOne','slice','all','fieldType','type','keys','lodash','./sql-utils','../../mysqldb','resolve','search','parseAdvancedSearchFilter','where','default','fields','filter','user','clause','tags','skip','checkListsRestrictions','then','ids','tag','countFilteredContacts','count'];(function(_0x3286c9,_0x559343){var _0x14bab5=function(_0x49189a){while(--_0x49189a){_0x3286c9['push'](_0x3286c9['shift']());}};_0x14bab5(++_0x559343);}(_0xf8ab,0xe1));var _0xbf8a=function(_0x1cb71a,_0x524748){_0x1cb71a=_0x1cb71a-0x0;var _0x51e78a=_0xf8ab[_0x1cb71a];return _0x51e78a;};'use strict';var _=require(_0xbf8a('0x0'));var sqlUtils=require(_0xbf8a('0x1'));var db=require(_0xbf8a('0x2'))['db'];exports['findAll']=function(_0x569eef,_0xd50f31,_0x10367d,_0x431fe3){var _0x16cc75={'count':0x0,'rows':[]};var _0x51bc23=sqlUtils['skipContactsQuery'](_0xd50f31,_0x569eef);if(_0x51bc23){return Promise[_0xbf8a('0x3')](_0x16cc75);}var _0x289522=sqlUtils['getContactsSubquery']();var _0x570bb6={};var _0x4b4541=![];var _0xe109d2=![];return Promise[_0xbf8a('0x3')]()['then'](function(){if(_0x569eef[_0xbf8a('0x4')]){return sqlUtils[_0xbf8a('0x5')](_0x569eef[_0xbf8a('0x4')],_0x431fe3);}else{return sqlUtils['parseQueryParameters'](_0x569eef,_0x431fe3);}})['then'](function(_0x31dce3){_0x289522[_0xbf8a('0x6')](_0x31dce3[_0xbf8a('0x7')]);_0x289522[_0xbf8a('0x6')](_0x31dce3[_0xbf8a('0x8')]);_0x289522[_0xbf8a('0x6')](_0x31dce3[_0xbf8a('0x9')]);_0x289522[_0xbf8a('0x6')](_0x31dce3[_0xbf8a('0xa')][_0xbf8a('0xb')]);_0x570bb6=_0x31dce3[_0xbf8a('0xc')];_0xe109d2=_0x31dce3['user'][_0xbf8a('0xd')];return sqlUtils[_0xbf8a('0xe')](_0xd50f31,_0x569eef,_0xe109d2);})[_0xbf8a('0xf')](function(_0x477ef5){_0x289522['where'](_0x477ef5);var _0x5505b9=_0x569eef[_0xbf8a('0x4')]?_0x570bb6[_0xbf8a('0x10')]:_0x569eef[_0xbf8a('0x11')];_0x4b4541=_0x5505b9?!![]:![];return sqlUtils[_0xbf8a('0x12')](_0x289522,_0x5505b9);})[_0xbf8a('0xf')](function(_0x1065ae){_0x16cc75['count']=_0x1065ae;if(_0x16cc75[_0xbf8a('0x13')]===0x0){return;}if(_0x569eef[_0xbf8a('0x14')]){_0xe109d2=!![];}return sqlUtils[_0xbf8a('0x15')](_0x289522,_0x569eef[_0xbf8a('0x8')],_0x10367d,_0x4b4541,_0x570bb6['clause'],_0xe109d2);})[_0xbf8a('0xf')](function(_0x21e261){if(!_0x21e261){return[];}return sqlUtils['getFilteredContacts'](_0x21e261,_0x569eef,_0x10367d);})['then'](function(_0x1515fb){_0x16cc75[_0xbf8a('0x16')]=_0x1515fb;return _0x16cc75;})[_0xbf8a('0x17')](function(_0x40157b){throw _0x40157b;});};exports[_0xbf8a('0x18')]=function(){var _0x5233d2={};var _0x518476=[];return db[_0xbf8a('0x19')][_0xbf8a('0x18')]()[_0xbf8a('0xf')](function(_0x3a000f){_0x5233d2=_0x3a000f;var _0x4a49e1=Object['keys'](_0x5233d2)[_0xbf8a('0x9')](function(_0x276ad4){return _['startsWith'](_0x276ad4,_0xbf8a('0x1a'))?_0x276ad4:undefined;});var _0x65fb61=_0x4a49e1[_0xbf8a('0x1b')](function(_0x3faefc){return db[_0xbf8a('0x1c')][_0xbf8a('0x1d')]({'where':{'id':_0x3faefc[_0xbf8a('0x1e')](0x3)},'raw':!![]});});return Promise[_0xbf8a('0x1f')](_0x65fb61);})['then'](function(_0x495aea){for(var _0x193f41=0x0;_0x193f41<_0x495aea['length'];_0x193f41++){if(_0x495aea[_0x193f41]){var _0x3a26e1='cf_'+_0x495aea[_0x193f41]['id'];_0x5233d2[_0x3a26e1][_0xbf8a('0x20')]=_0x495aea[_0x193f41][_0xbf8a('0x21')];}}_0x518476=_[_0xbf8a('0x1b')](Object[_0xbf8a('0x22')](_0x5233d2),function(_0x1be734){return{'name':_0x1be734,'type':_0x5233d2[_0x1be734][_0xbf8a('0x21')]};});return _0x518476;})[_0xbf8a('0x17')](function(_0x3a8c51){throw _0x3a8c51;});};
\ No newline at end of file
+var _0x34c9=['startsWith','cf_','CmCustomField','findOne','all','fieldType','type','map','./sql-utils','findAll','skipContactsQuery','resolve','then','search','parseAdvancedSearchFilter','parseQueryParameters','default','where','fields','tags','user','skip','checkListsRestrictions','ids','countFilteredContacts','User','buildContactsQuery','clause','getFilteredContacts','catch','describe','CmContact','keys','filter'];(function(_0x51505f,_0x7ac9e9){var _0x3e7c2d=function(_0x4c449e){while(--_0x4c449e){_0x51505f['push'](_0x51505f['shift']());}};_0x3e7c2d(++_0x7ac9e9);}(_0x34c9,0xb2));var _0x934c=function(_0x270ebc,_0x5102fc){_0x270ebc=_0x270ebc-0x0;var _0x315d25=_0x34c9[_0x270ebc];return _0x315d25;};'use strict';var _=require('lodash');var sqlUtils=require(_0x934c('0x0'));var db=require('../../mysqldb')['db'];exports[_0x934c('0x1')]=function(_0xee7443,_0x216f60,_0x416dd8,_0x1df59f){var _0x56be91={'count':0x0,'rows':[]};var _0x1a0d8d=sqlUtils[_0x934c('0x2')](_0x216f60,_0xee7443);if(_0x1a0d8d){return Promise[_0x934c('0x3')](_0x56be91);}var _0x16c3a9=sqlUtils['getContactsSubquery']();var _0x38b9d5={};var _0x33f165=![];var _0x4ea497=![];return Promise[_0x934c('0x3')]()[_0x934c('0x4')](function(){if(_0xee7443[_0x934c('0x5')]){return sqlUtils[_0x934c('0x6')](_0xee7443['search'],_0x1df59f);}else{return sqlUtils[_0x934c('0x7')](_0xee7443,_0x1df59f);}})[_0x934c('0x4')](function(_0x1d9803){_0x16c3a9['where'](_0x1d9803[_0x934c('0x8')]);_0x16c3a9[_0x934c('0x9')](_0x1d9803[_0x934c('0xa')]);_0x16c3a9[_0x934c('0x9')](_0x1d9803['filter']);_0x16c3a9['where'](_0x1d9803['user']['clause']);_0x38b9d5=_0x1d9803[_0x934c('0xb')];_0x4ea497=_0x1d9803[_0x934c('0xc')][_0x934c('0xd')];return sqlUtils[_0x934c('0xe')](_0x216f60,_0xee7443,_0x4ea497);})[_0x934c('0x4')](function(_0x589c95){_0x16c3a9[_0x934c('0x9')](_0x589c95);var _0x2e1139=_0xee7443[_0x934c('0x5')]?_0x38b9d5[_0x934c('0xf')]:_0xee7443['tag'];_0x33f165=_0x2e1139?!![]:![];return sqlUtils[_0x934c('0x10')](_0x16c3a9,_0x2e1139);})['then'](function(_0x596873){_0x56be91['count']=_0x596873;if(_0x56be91['count']===0x0){return;}if(_0xee7443[_0x934c('0x11')]){_0x4ea497=!![];}return sqlUtils[_0x934c('0x12')](_0x16c3a9,_0xee7443[_0x934c('0xa')],_0x416dd8,_0x33f165,_0x38b9d5[_0x934c('0x13')],_0x4ea497);})['then'](function(_0x12929b){if(!_0x12929b){return[];}return sqlUtils[_0x934c('0x14')](_0x12929b,_0xee7443,_0x416dd8);})[_0x934c('0x4')](function(_0x336f8c){_0x56be91['rows']=_0x336f8c;return _0x56be91;})[_0x934c('0x15')](function(_0x4831cb){throw _0x4831cb;});};exports[_0x934c('0x16')]=function(){var _0x46a4ba={};var _0x47fa56=[];return db[_0x934c('0x17')][_0x934c('0x16')]()[_0x934c('0x4')](function(_0x47684a){_0x46a4ba=_0x47684a;var _0x249562=Object[_0x934c('0x18')](_0x46a4ba)[_0x934c('0x19')](function(_0x3abc34){return _[_0x934c('0x1a')](_0x3abc34,_0x934c('0x1b'))?_0x3abc34:undefined;});var _0x45a6b2=_0x249562['map'](function(_0x71710c){return db[_0x934c('0x1c')][_0x934c('0x1d')]({'where':{'id':_0x71710c['slice'](0x3)},'raw':!![]});});return Promise[_0x934c('0x1e')](_0x45a6b2);})[_0x934c('0x4')](function(_0x283c47){for(var _0x2eed31=0x0;_0x2eed31<_0x283c47['length'];_0x2eed31++){if(_0x283c47[_0x2eed31]){var _0x40c730=_0x934c('0x1b')+_0x283c47[_0x2eed31]['id'];_0x46a4ba[_0x40c730][_0x934c('0x1f')]=_0x283c47[_0x2eed31][_0x934c('0x20')];}}_0x47fa56=_[_0x934c('0x21')](Object['keys'](_0x46a4ba),function(_0x10b5a1){return{'name':_0x10b5a1,'type':_0x46a4ba[_0x10b5a1][_0x934c('0x20')]};});return _0x47fa56;})['catch'](function(_0x52ffa0){throw _0x52ffa0;});};
\ No newline at end of file
index 841a043..50db580 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1ca6=['SELECT','sequelize','exports','lodash','../parsers/advancedSearch','../interaction/utils','../../mysqldb','role','agent','search','ListId','autocomplete','true','from','cm_contacts','where','c.deletedAt\x20IS\x20NULL','left_join','cm_user_has_contacts','uc.CmContactId\x20=\x20','.id','cm_contact_has_tags','ct.CmContactId\x20=\x20','t.id\x20=\x20ct.TagId','subqry','firstName','lastName','mobile','email','CompanyId','updatedAt','TagIds','includes','push','forEach','GROUP_CONCAT(DISTINCT\x20t.id)','field','expr','getSelectedTags','CONCAT(\x27,\x27,\x20subqry.TagIds,\x20\x27,\x27)\x20LIKE\x20?','replace','length','c.id\x20LIKE\x20?','c.phone\x20LIKE\x20?','isEmail','c.email\x20LIKE\x20?','c.firstName\x20LIKE\x20?','c.lastName\x20LIKE\x20?','parseSearch','conditions','name','dateOfBirth','fieldType','datetime','DATE','buildExpression','type','default','text','value','start','end','Tag','split','map','tags','clause','and','ids','User','user','uc.UserId\x20=\x20?','skip','keys','Contact','c.ListId\x20IN\x20?','\x20=\x20?','resolve','then','fields','tag','filter','getLists','c.ListId\x20IS\x20NULL','attributes','select','c.id','limit','offset','group','having','order','DESC','subqry.','findAll','color','keyBy','Sequelize','QueryTypes','CmContact','query','toString','Tags','clone','COUNT(*)','isEmpty','t.id\x20IN\x20?'];(function(_0x36976d,_0x8b0ddc){var _0x2ad159=function(_0x513c04){while(--_0x513c04){_0x36976d['push'](_0x36976d['shift']());}};_0x2ad159(++_0x8b0ddc);}(_0x1ca6,0xd9));var _0x61ca=function(_0x5ba280,_0x178f07){_0x5ba280=_0x5ba280-0x0;var _0x57fd68=_0x1ca6[_0x5ba280];return _0x57fd68;};'use strict';var _=require(_0x61ca('0x0'));var squel=require('squel');var as=require(_0x61ca('0x1'));var qs=require('../parsers/qs');var utils=require(_0x61ca('0x2'));var db=require(_0x61ca('0x3'))['db'];function skipContactsQuery(_0x3e1de0,_0x4bf6c2){var _0x5df499=![];if(_0x3e1de0[_0x61ca('0x4')]===_0x61ca('0x5')&&!_0x4bf6c2[_0x61ca('0x6')]&&!_0x4bf6c2[_0x61ca('0x7')]&&_0x4bf6c2[_0x61ca('0x8')]!==_0x61ca('0x9')){_0x5df499=!![];}return _0x5df499;}function getContactsSubquery(){return squel['select']()[_0x61ca('0xa')](_0x61ca('0xb'),'c')[_0x61ca('0xc')](_0x61ca('0xd'));}function applyJoinClauses(_0x8e5527,_0xb4261b){var _0x3c9bd3=_0xb4261b?'c':'subqry';_0x8e5527[_0x61ca('0xe')](_0x61ca('0xf'),'uc',_0x61ca('0x10')+_0x3c9bd3+_0x61ca('0x11'))['left_join'](_0x61ca('0x12'),'ct',_0x61ca('0x13')+_0x3c9bd3+'.id')[_0x61ca('0xe')]('tools_tags','t',_0x61ca('0x14'));return _0x8e5527;}function addFieldsToQuery(_0x1bd805,_0x3208ec,_0x537d85,_0x5e4db1,_0x4080c5){var _0x36d0b2=_0x4080c5?'c':_0x61ca('0x15');if(!_0x3208ec){_0x3208ec=['id',_0x61ca('0x16'),_0x61ca('0x17'),'phone',_0x61ca('0x18'),'fax',_0x61ca('0x19'),_0x61ca('0x7'),_0x61ca('0x1a'),'createdAt',_0x61ca('0x1b'),'deletedAt',_0x61ca('0x1c')];}else if(!_0x3208ec[_0x61ca('0x1d')]('id')){_0x3208ec[_0x61ca('0x1e')]('id');}var _0x1aeae2=_0x537d85&&_0x4080c5||!_0x537d85&&!_0x4080c5;if(_0x5e4db1){_0x1aeae2=_0x5e4db1&&_0x4080c5||!_0x5e4db1&&!_0x4080c5;}_0x3208ec[_0x61ca('0x1f')](function(_0x3719dc){if(_0x3719dc===_0x61ca('0x1c')){if(_0x1aeae2){_0x1bd805['field'](_0x61ca('0x20'),_0x3719dc);}else if(_0x537d85||_0x5e4db1){_0x1bd805[_0x61ca('0x21')](_0x36d0b2+'.'+_0x3719dc);}}else{_0x1bd805[_0x61ca('0x21')](_0x36d0b2+'.'+_0x3719dc);}});return _0x1bd805;}function getSqlClauses(){var _0x3950be={'default':squel[_0x61ca('0x22')](),'fields':squel[_0x61ca('0x22')](),'filter':squel[_0x61ca('0x22')](),'tags':{'clause':squel[_0x61ca('0x22')](),'ids':null},'user':{'clause':squel[_0x61ca('0x22')](),'skip':![]}};return _0x3950be;}function parseTagParameter(_0x3267c5){var _0x3fe937=squel[_0x61ca('0x22')]();if(_0x3267c5){var _0x53350a=utils[_0x61ca('0x23')](_0x3267c5);_0x53350a[_0x61ca('0x1f')](function(_0x4d5adf){_0x3fe937['or'](_0x61ca('0x24'),'%,'+_0x4d5adf+',%');});}return _0x3fe937;}function parseSearchFilter(_0x1fa152){var _0x34e453=squel[_0x61ca('0x22')]();if(_0x1fa152){var _0xb46c6c=_0x1fa152[_0x61ca('0x25')]('\x5c','\x5c\x5c')[_0x61ca('0x25')](/'/g,'\x27\x27');if(_0xb46c6c['split']('\x20')[_0x61ca('0x26')]>0x1){_0x34e453['or']('MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs['getFullTextValue'](_0xb46c6c,!![]),null);}else{if(qs['isNumeric'](_0xb46c6c)){_0x34e453['or'](_0x61ca('0x27'),_0xb46c6c+'%');_0x34e453['or'](_0x61ca('0x28'),_0xb46c6c+'%');_0x34e453['or']('c.mobile\x20LIKE\x20?',_0xb46c6c+'%');_0x34e453['or']('c.fax\x20LIKE\x20?',_0xb46c6c+'%');}else if(qs[_0x61ca('0x29')](_0xb46c6c)){_0x34e453['or'](_0x61ca('0x2a'),_0xb46c6c+'%');}else{_0x34e453['or'](_0x61ca('0x2b'),'%'+_0xb46c6c+'%');_0x34e453['or'](_0x61ca('0x2c'),'%'+_0xb46c6c+'%');_0x34e453['or'](_0x61ca('0x2a'),'%'+_0xb46c6c+'%');}}}return _0x34e453;}function parseAdvancedSearchFilter(_0x56361c,_0x15468f){var _0x36f0c1=getSqlClauses();var _0x593054=as[_0x61ca('0x2d')](_0x56361c);var _0x9c7be6=_0x593054['sqlOperator'];for(var _0x8f4ac1=0x0;_0x8f4ac1<_0x593054[_0x61ca('0x2e')][_0x61ca('0x26')];_0x8f4ac1++){var _0x16d19d=_0x593054[_0x61ca('0x2e')][_0x8f4ac1];var _0x3c8fad='c';var _0x294508=_['find'](_0x15468f,[_0x61ca('0x2f'),_0x16d19d[_0x61ca('0x21')]]);if(_0x294508){if(_0x16d19d[_0x61ca('0x21')]===_0x61ca('0x30')||_0x294508[_0x61ca('0x31')]===_0x61ca('0x32')){_0x16d19d['castTo']=_0x61ca('0x33');}var _0x1703bd=as[_0x61ca('0x34')](_0x3c8fad,_0x294508[_0x61ca('0x35')],_0x16d19d);_0x36f0c1[_0x61ca('0x36')][_0x9c7be6](_0x1703bd[_0x61ca('0x37')],_0x1703bd[_0x61ca('0x38')][_0x61ca('0x39')],_0x1703bd[_0x61ca('0x38')][_0x61ca('0x3a')]);}else{if(_0x16d19d['field']===_0x61ca('0x3b')){var _0x43bf49=_0x16d19d[_0x61ca('0x38')][_0x61ca('0x3c')](',')[_0x61ca('0x3d')](function(_0x122c34){return Number(_0x122c34);});var _0x57a7f5=parseTagParameter(_0x43bf49);_0x36f0c1[_0x61ca('0x3e')][_0x61ca('0x3f')][_0x61ca('0x40')](_0x57a7f5);_0x36f0c1[_0x61ca('0x3e')][_0x61ca('0x41')]=_0x43bf49;}else if(_0x16d19d[_0x61ca('0x21')]===_0x61ca('0x42')){_0x36f0c1[_0x61ca('0x43')][_0x61ca('0x3f')][_0x61ca('0x40')](_0x61ca('0x44'),_0x16d19d[_0x61ca('0x38')]);_0x36f0c1['user'][_0x61ca('0x45')]=!![];}}}return _0x36f0c1;}function parseModelFields(_0x2be6a1,_0xf68988){var _0x58b429=squel[_0x61ca('0x22')]();var _0x43f048=_(_0x2be6a1)[_0x61ca('0x46')]()['map'](function(_0x40480d){return _['some'](_0xf68988,[_0x61ca('0x2f'),_0x40480d])?_0x40480d:undefined;})['compact']()[_0x61ca('0x38')]();if(_0x2be6a1['Contact']){_0x43f048[_0x61ca('0x1e')](_0x61ca('0x47'));}if(_0x2be6a1[_0x61ca('0x42')]){_0x43f048[_0x61ca('0x1e')]('User');}if(_0x43f048['length']>0x0){_0x43f048['forEach'](function(_0x3fbebb){if(_0x3fbebb===_0x61ca('0x7')){_0x58b429[_0x61ca('0x40')](_0x61ca('0x48'),[]['concat'](_0x2be6a1[_0x3fbebb]));}else if(_0x3fbebb===_0x61ca('0x47')){var _0x501c93='%'+_0x2be6a1[_0x3fbebb]+'%';_0x58b429['and']('CONCAT_WS(\x27\x20\x27,\x20c.firstName,\x20c.lastName,\x20c.email)\x20LIKE\x20?',_0x501c93);}else if(_0x3fbebb===_0x61ca('0x42')){_0x58b429[_0x61ca('0x40')](_0x61ca('0x44'),_0x2be6a1[_0x3fbebb]);}else{_0x58b429[_0x61ca('0x40')]('c.'+_0x3fbebb+_0x61ca('0x49'),_0x2be6a1[_0x3fbebb]);}});}return _0x58b429;}function parseQueryParameters(_0x495196,_0x47cd50){var _0xf48701=getSqlClauses();return Promise[_0x61ca('0x4a')]()[_0x61ca('0x4b')](function(){return parseModelFields(_0x495196,_0x47cd50);})[_0x61ca('0x4b')](function(_0x4e1e5d){_0xf48701[_0x61ca('0x4c')][_0x61ca('0x40')](_0x4e1e5d);return parseTagParameter(_0x495196[_0x61ca('0x4d')]);})[_0x61ca('0x4b')](function(_0x305cef){_0xf48701[_0x61ca('0x3e')][_0x61ca('0x3f')][_0x61ca('0x40')](_0x305cef);return parseSearchFilter(_0x495196[_0x61ca('0x4e')]);})['then'](function(_0xae89b3){_0xf48701['filter']=_0xae89b3;return _0xf48701;});}function checkListsRestrictions(_0x26f658,_0x19b536,_0x302fef){var _0xfb1ed9=squel[_0x61ca('0x22')]();return Promise[_0x61ca('0x4a')]()[_0x61ca('0x4b')](function(){if(_0x19b536[_0x61ca('0x6')]&&_0x26f658[_0x61ca('0x4')]==='agent'&&!_0x302fef){return _0x26f658[_0x61ca('0x4f')]({'attributes':['id'],'raw':!![]});}})[_0x61ca('0x4b')](function(_0x1ba344){if(_0x1ba344){if(_0x1ba344[_0x61ca('0x26')]===0x0){_0xfb1ed9[_0x61ca('0x40')](_0x61ca('0x50'));}else{_0xfb1ed9[_0x61ca('0x40')](_0x61ca('0x48'),_[_0x61ca('0x3d')](_0x1ba344,'id'));}}})['then'](function(){return _0xfb1ed9;});}function buildContactsQuery(_0x2192dc,_0x479417,_0x4c3a45,_0x2383c9,_0x1b898d,_0x5c2ccb){if(_0x479417){_0x479417=_0x4c3a45[_0x61ca('0x51')];}_0x2192dc=addFieldsToQuery(_0x2192dc,_0x479417,_0x2383c9,_0x5c2ccb,!![]);var _0x1bfde6=squel[_0x61ca('0x52')]();_0x1bfde6=addFieldsToQuery(_0x1bfde6,_0x479417,_0x2383c9,_0x5c2ccb,![]);if(_0x2383c9||_0x5c2ccb){_0x2192dc=applyJoinClauses(_0x2192dc,!![]);_0x2192dc['group'](_0x61ca('0x53'));if(_0x4c3a45[_0x61ca('0x54')]){_0x1bfde6['limit'](_0x4c3a45[_0x61ca('0x54')]);}if(_0x4c3a45[_0x61ca('0x55')]){_0x1bfde6['offset'](_0x4c3a45[_0x61ca('0x55')]);}}else{_0x1bfde6=applyJoinClauses(_0x1bfde6,![]);_0x1bfde6[_0x61ca('0x56')]('subqry.id');if(_0x4c3a45[_0x61ca('0x54')]){_0x2192dc[_0x61ca('0x54')](_0x4c3a45['limit']);}if(_0x4c3a45[_0x61ca('0x55')]){_0x2192dc[_0x61ca('0x55')](_0x4c3a45[_0x61ca('0x55')]);}}_0x1bfde6[_0x61ca('0x57')](_0x1b898d);if(_0x4c3a45[_0x61ca('0x58')]){_0x4c3a45[_0x61ca('0x58')][_0x61ca('0x1f')](function(_0x497c5d){_0x2192dc['order']('c.'+_0x497c5d[0x0],_0x497c5d[0x1]===_0x61ca('0x59')?![]:!![]);_0x1bfde6[_0x61ca('0x58')](_0x61ca('0x5a')+_0x497c5d[0x0],_0x497c5d[0x1]===_0x61ca('0x59')?![]:!![]);});}_0x1bfde6['from'](_0x2192dc,_0x61ca('0x15'));return _0x1bfde6;}function getFilteredContacts(_0x1607fb){var _0x5cdcf2=[];return db['Tag'][_0x61ca('0x5b')]({'attributes':['id',_0x61ca('0x2f'),_0x61ca('0x5c')],'raw':!![]})[_0x61ca('0x4b')](function(_0xc4771b){_0x5cdcf2=_[_0x61ca('0x5d')](_0xc4771b,'id');var _0xb1d4ce={'type':db[_0x61ca('0x5e')][_0x61ca('0x5f')]['SELECT'],'model':db[_0x61ca('0x60')],'mapToModel':!![],'nest':!![],'raw':!![]};return db['sequelize'][_0x61ca('0x61')](_0x1607fb[_0x61ca('0x62')](),_0xb1d4ce);})['then'](function(_0x289252){_0x289252[_0x61ca('0x1f')](function(_0x187b49){if(_0x187b49[_0x61ca('0x1c')]){_0x187b49[_0x61ca('0x63')]=[];_0x187b49[_0x61ca('0x1c')][_0x61ca('0x3c')](',')['forEach'](function(_0x5a0c71){_0x187b49[_0x61ca('0x63')][_0x61ca('0x1e')](_0x5cdcf2[_0x5a0c71]);});}delete _0x187b49[_0x61ca('0x1c')];});return _0x289252;});}function countFilteredContacts(_0x34f45d,_0x3995a5){var _0x4b4459=_0x34f45d[_0x61ca('0x64')]();_0x4b4459[_0x61ca('0x21')](_0x61ca('0x65'));_0x4b4459=applyJoinClauses(_0x4b4459,!![]);_0x34f45d[_0x61ca('0x56')](_0x61ca('0x53'));var _0x13b7b2=utils[_0x61ca('0x23')](_0x3995a5);if(!_[_0x61ca('0x66')](_0x13b7b2)){_0x4b4459['where'](_0x61ca('0x67'),_0x13b7b2);}var _0x5bcf2d={'type':db[_0x61ca('0x5e')]['QueryTypes'][_0x61ca('0x68')],'raw':!![]};return db[_0x61ca('0x69')][_0x61ca('0x61')](_0x4b4459[_0x61ca('0x62')](),_0x5bcf2d)[_0x61ca('0x4b')](function(_0x5e4dbc){return _0x5e4dbc[0x0][_0x61ca('0x65')];});}module[_0x61ca('0x6a')]={'buildContactsQuery':buildContactsQuery,'checkListsRestrictions':checkListsRestrictions,'countFilteredContacts':countFilteredContacts,'getContactsSubquery':getContactsSubquery,'getFilteredContacts':getFilteredContacts,'parseAdvancedSearchFilter':parseAdvancedSearchFilter,'parseQueryParameters':parseQueryParameters,'skipContactsQuery':skipContactsQuery};
\ No newline at end of file
+var _0xfc7e=['clone','getSelectedTags','t.id\x20IN\x20?','COUNT(*)','exports','lodash','../interaction/utils','../../mysqldb','agent','search','autocomplete','true','select','from','cm_contacts','where','c.deletedAt\x20IS\x20NULL','left_join','cm_user_has_contacts','ct.CmContactId\x20=\x20','.id','t.id\x20=\x20ct.TagId','subqry','lastName','mobile','fax','ListId','CompanyId','updatedAt','deletedAt','TagIds','includes','forEach','GROUP_CONCAT(DISTINCT\x20t.id)','field','expr','CONCAT(\x27,\x27,\x20subqry.TagIds,\x20\x27,\x27)\x20LIKE\x20?','split','length','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','isNumeric','c.id\x20LIKE\x20?','c.phone\x20LIKE\x20?','c.mobile\x20LIKE\x20?','c.fax\x20LIKE\x20?','isEmail','c.lastName\x20LIKE\x20?','c.email\x20LIKE\x20?','parseSearch','sqlOperator','conditions','find','dateOfBirth','datetime','castTo','DATE','text','value','start','end','Tag','map','clause','and','tags','ids','User','user','uc.UserId\x20=\x20?','keys','some','compact','Contact','push','c.ListId\x20IN\x20?','concat','CONCAT_WS(\x27\x20\x27,\x20c.firstName,\x20c.lastName,\x20c.email)\x20LIKE\x20?','\x20=\x20?','then','fields','tag','filter','getLists','c.ListId\x20IS\x20NULL','group','c.id','limit','offset','subqry.id','order','DESC','subqry.','name','color','Sequelize','QueryTypes','SELECT','CmContact','sequelize','query','toString','Tags'];(function(_0x60286b,_0x3247c1){var _0x5dff69=function(_0x4ecfcf){while(--_0x4ecfcf){_0x60286b['push'](_0x60286b['shift']());}};_0x5dff69(++_0x3247c1);}(_0xfc7e,0xd3));var _0xefc7=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xfc7e[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xefc7('0x0'));var squel=require('squel');var as=require('../parsers/advancedSearch');var qs=require('../parsers/qs');var utils=require(_0xefc7('0x1'));var db=require(_0xefc7('0x2'))['db'];function skipContactsQuery(_0x2a3994,_0x10cc57){var _0x1e9ad0=![];if(_0x2a3994['role']===_0xefc7('0x3')&&!_0x10cc57[_0xefc7('0x4')]&&!_0x10cc57['ListId']&&_0x10cc57[_0xefc7('0x5')]!==_0xefc7('0x6')){_0x1e9ad0=!![];}return _0x1e9ad0;}function getContactsSubquery(){return squel[_0xefc7('0x7')]()[_0xefc7('0x8')](_0xefc7('0x9'),'c')[_0xefc7('0xa')](_0xefc7('0xb'));}function applyJoinClauses(_0x40f433,_0x476b1b){var _0x106303=_0x476b1b?'c':'subqry';_0x40f433[_0xefc7('0xc')](_0xefc7('0xd'),'uc','uc.CmContactId\x20=\x20'+_0x106303+'.id')[_0xefc7('0xc')]('cm_contact_has_tags','ct',_0xefc7('0xe')+_0x106303+_0xefc7('0xf'))['left_join']('tools_tags','t',_0xefc7('0x10'));return _0x40f433;}function addFieldsToQuery(_0x55d20f,_0x4a19ee,_0x2be269,_0x22136a,_0x35ed4e){var _0x21ada1=_0x35ed4e?'c':_0xefc7('0x11');if(!_0x4a19ee){_0x4a19ee=['id','firstName',_0xefc7('0x12'),'phone',_0xefc7('0x13'),_0xefc7('0x14'),'email',_0xefc7('0x15'),_0xefc7('0x16'),'createdAt',_0xefc7('0x17'),_0xefc7('0x18'),_0xefc7('0x19')];}else if(!_0x4a19ee[_0xefc7('0x1a')]('id')){_0x4a19ee['push']('id');}var _0x27ef8e=_0x2be269&&_0x35ed4e||!_0x2be269&&!_0x35ed4e;if(_0x22136a){_0x27ef8e=_0x22136a&&_0x35ed4e||!_0x22136a&&!_0x35ed4e;}_0x4a19ee[_0xefc7('0x1b')](function(_0x467651){if(_0x467651===_0xefc7('0x19')){if(_0x27ef8e){_0x55d20f['field'](_0xefc7('0x1c'),_0x467651);}else if(_0x2be269||_0x22136a){_0x55d20f[_0xefc7('0x1d')](_0x21ada1+'.'+_0x467651);}}else{_0x55d20f[_0xefc7('0x1d')](_0x21ada1+'.'+_0x467651);}});return _0x55d20f;}function getSqlClauses(){var _0x39af3a={'default':squel[_0xefc7('0x1e')](),'fields':squel[_0xefc7('0x1e')](),'filter':squel[_0xefc7('0x1e')](),'tags':{'clause':squel['expr'](),'ids':null},'user':{'clause':squel[_0xefc7('0x1e')](),'skip':![]}};return _0x39af3a;}function parseTagParameter(_0x3e176d){var _0x1bada0=squel[_0xefc7('0x1e')]();if(_0x3e176d){var _0x32a886=utils['getSelectedTags'](_0x3e176d);_0x32a886[_0xefc7('0x1b')](function(_0x55f67c){_0x1bada0['or'](_0xefc7('0x1f'),'%,'+_0x55f67c+',%');});}return _0x1bada0;}function parseSearchFilter(_0x145047){var _0xcffd4a=squel[_0xefc7('0x1e')]();if(_0x145047){var _0x356ae5=_0x145047['replace']('\x5c','\x5c\x5c')['replace'](/'/g,'\x27\x27');if(_0x356ae5[_0xefc7('0x20')]('\x20')[_0xefc7('0x21')]>0x1){_0xcffd4a['or'](_0xefc7('0x22'),qs[_0xefc7('0x23')](_0x356ae5,!![]),null);}else{if(qs[_0xefc7('0x24')](_0x356ae5)){_0xcffd4a['or'](_0xefc7('0x25'),_0x356ae5+'%');_0xcffd4a['or'](_0xefc7('0x26'),_0x356ae5+'%');_0xcffd4a['or'](_0xefc7('0x27'),_0x356ae5+'%');_0xcffd4a['or'](_0xefc7('0x28'),_0x356ae5+'%');}else if(qs[_0xefc7('0x29')](_0x356ae5)){_0xcffd4a['or']('c.email\x20LIKE\x20?',_0x356ae5+'%');}else{_0xcffd4a['or']('c.firstName\x20LIKE\x20?','%'+_0x356ae5+'%');_0xcffd4a['or'](_0xefc7('0x2a'),'%'+_0x356ae5+'%');_0xcffd4a['or'](_0xefc7('0x2b'),'%'+_0x356ae5+'%');}}}return _0xcffd4a;}function parseAdvancedSearchFilter(_0x209ea1,_0xba8f35){var _0x39b100=getSqlClauses();var _0x124efa=as[_0xefc7('0x2c')](_0x209ea1);var _0x1c86df=_0x124efa[_0xefc7('0x2d')];for(var _0x42f3d9=0x0;_0x42f3d9<_0x124efa[_0xefc7('0x2e')]['length'];_0x42f3d9++){var _0x151d4a=_0x124efa[_0xefc7('0x2e')][_0x42f3d9];var _0x5b3599='c';var _0x45aa30=_[_0xefc7('0x2f')](_0xba8f35,['name',_0x151d4a[_0xefc7('0x1d')]]);if(_0x45aa30){if(_0x151d4a[_0xefc7('0x1d')]===_0xefc7('0x30')||_0x45aa30['fieldType']===_0xefc7('0x31')){_0x151d4a[_0xefc7('0x32')]=_0xefc7('0x33');}var _0x352b9d=as['buildExpression'](_0x5b3599,_0x45aa30['type'],_0x151d4a);_0x39b100['default'][_0x1c86df](_0x352b9d[_0xefc7('0x34')],_0x352b9d[_0xefc7('0x35')][_0xefc7('0x36')],_0x352b9d[_0xefc7('0x35')][_0xefc7('0x37')]);}else{if(_0x151d4a[_0xefc7('0x1d')]===_0xefc7('0x38')){var _0x39d4aa=_0x151d4a['value']['split'](',')[_0xefc7('0x39')](function(_0x1b0ab7){return Number(_0x1b0ab7);});var _0x204b45=parseTagParameter(_0x39d4aa);_0x39b100['tags'][_0xefc7('0x3a')][_0xefc7('0x3b')](_0x204b45);_0x39b100[_0xefc7('0x3c')][_0xefc7('0x3d')]=_0x39d4aa;}else if(_0x151d4a['field']===_0xefc7('0x3e')){_0x39b100[_0xefc7('0x3f')][_0xefc7('0x3a')][_0xefc7('0x3b')](_0xefc7('0x40'),_0x151d4a['value']);_0x39b100[_0xefc7('0x3f')]['skip']=!![];}}}return _0x39b100;}function parseModelFields(_0x3701ca,_0x123462){var _0x44ac82=squel[_0xefc7('0x1e')]();var _0x3a38a8=_(_0x3701ca)[_0xefc7('0x41')]()[_0xefc7('0x39')](function(_0x38aa96){return _[_0xefc7('0x42')](_0x123462,['name',_0x38aa96])?_0x38aa96:undefined;})[_0xefc7('0x43')]()[_0xefc7('0x35')]();if(_0x3701ca[_0xefc7('0x44')]){_0x3a38a8['push'](_0xefc7('0x44'));}if(_0x3701ca[_0xefc7('0x3e')]){_0x3a38a8[_0xefc7('0x45')](_0xefc7('0x3e'));}if(_0x3a38a8[_0xefc7('0x21')]>0x0){_0x3a38a8['forEach'](function(_0x13b46d){if(_0x13b46d===_0xefc7('0x15')){_0x44ac82['and'](_0xefc7('0x46'),[][_0xefc7('0x47')](_0x3701ca[_0x13b46d]));}else if(_0x13b46d===_0xefc7('0x44')){var _0x104a93='%'+_0x3701ca[_0x13b46d]+'%';_0x44ac82['and'](_0xefc7('0x48'),_0x104a93);}else if(_0x13b46d===_0xefc7('0x3e')){_0x44ac82[_0xefc7('0x3b')](_0xefc7('0x40'),_0x3701ca[_0x13b46d]);}else{_0x44ac82[_0xefc7('0x3b')]('c.'+_0x13b46d+_0xefc7('0x49'),_0x3701ca[_0x13b46d]);}});}return _0x44ac82;}function parseQueryParameters(_0x1977f4,_0x50c8fb){var _0x320611=getSqlClauses();return Promise['resolve']()['then'](function(){return parseModelFields(_0x1977f4,_0x50c8fb);})[_0xefc7('0x4a')](function(_0x1c43c5){_0x320611[_0xefc7('0x4b')][_0xefc7('0x3b')](_0x1c43c5);return parseTagParameter(_0x1977f4[_0xefc7('0x4c')]);})['then'](function(_0x5436ca){_0x320611[_0xefc7('0x3c')][_0xefc7('0x3a')][_0xefc7('0x3b')](_0x5436ca);return parseSearchFilter(_0x1977f4[_0xefc7('0x4d')]);})['then'](function(_0x474f4d){_0x320611[_0xefc7('0x4d')]=_0x474f4d;return _0x320611;});}function checkListsRestrictions(_0x349b21,_0x109cc1,_0x44112a){var _0x24e033=squel[_0xefc7('0x1e')]();return Promise['resolve']()[_0xefc7('0x4a')](function(){if(_0x109cc1[_0xefc7('0x4')]&&_0x349b21['role']===_0xefc7('0x3')&&!_0x44112a){return _0x349b21[_0xefc7('0x4e')]({'attributes':['id'],'raw':!![]});}})[_0xefc7('0x4a')](function(_0x37e15f){if(_0x37e15f){if(_0x37e15f['length']===0x0){_0x24e033['and'](_0xefc7('0x4f'));}else{_0x24e033[_0xefc7('0x3b')](_0xefc7('0x46'),_[_0xefc7('0x39')](_0x37e15f,'id'));}}})[_0xefc7('0x4a')](function(){return _0x24e033;});}function buildContactsQuery(_0x71b20b,_0x2b1589,_0x3343a5,_0x20c09,_0x2924a7,_0x367731){if(_0x2b1589){_0x2b1589=_0x3343a5['attributes'];}_0x71b20b=addFieldsToQuery(_0x71b20b,_0x2b1589,_0x20c09,_0x367731,!![]);var _0xf9b936=squel[_0xefc7('0x7')]();_0xf9b936=addFieldsToQuery(_0xf9b936,_0x2b1589,_0x20c09,_0x367731,![]);if(_0x20c09||_0x367731){_0x71b20b=applyJoinClauses(_0x71b20b,!![]);_0x71b20b[_0xefc7('0x50')](_0xefc7('0x51'));if(_0x3343a5[_0xefc7('0x52')]){_0xf9b936[_0xefc7('0x52')](_0x3343a5['limit']);}if(_0x3343a5['offset']){_0xf9b936[_0xefc7('0x53')](_0x3343a5[_0xefc7('0x53')]);}}else{_0xf9b936=applyJoinClauses(_0xf9b936,![]);_0xf9b936[_0xefc7('0x50')](_0xefc7('0x54'));if(_0x3343a5[_0xefc7('0x52')]){_0x71b20b[_0xefc7('0x52')](_0x3343a5['limit']);}if(_0x3343a5[_0xefc7('0x53')]){_0x71b20b['offset'](_0x3343a5[_0xefc7('0x53')]);}}_0xf9b936['having'](_0x2924a7);if(_0x3343a5[_0xefc7('0x55')]){_0x3343a5[_0xefc7('0x55')]['forEach'](function(_0x5815f1){_0x71b20b[_0xefc7('0x55')]('c.'+_0x5815f1[0x0],_0x5815f1[0x1]===_0xefc7('0x56')?![]:!![]);_0xf9b936[_0xefc7('0x55')](_0xefc7('0x57')+_0x5815f1[0x0],_0x5815f1[0x1]===_0xefc7('0x56')?![]:!![]);});}_0xf9b936[_0xefc7('0x8')](_0x71b20b,_0xefc7('0x11'));return _0xf9b936;}function getFilteredContacts(_0x38d4dd){var _0x54a304=[];return db['Tag']['findAll']({'attributes':['id',_0xefc7('0x58'),_0xefc7('0x59')],'raw':!![]})['then'](function(_0x46ee9e){_0x54a304=_['keyBy'](_0x46ee9e,'id');var _0x7f05b3={'type':db[_0xefc7('0x5a')][_0xefc7('0x5b')][_0xefc7('0x5c')],'model':db[_0xefc7('0x5d')],'mapToModel':!![],'nest':!![],'raw':!![]};return db[_0xefc7('0x5e')][_0xefc7('0x5f')](_0x38d4dd[_0xefc7('0x60')](),_0x7f05b3);})[_0xefc7('0x4a')](function(_0x437e58){_0x437e58[_0xefc7('0x1b')](function(_0x2047e7){if(_0x2047e7[_0xefc7('0x19')]){_0x2047e7[_0xefc7('0x61')]=[];_0x2047e7[_0xefc7('0x19')]['split'](',')[_0xefc7('0x1b')](function(_0x513448){_0x2047e7['Tags'][_0xefc7('0x45')](_0x54a304[_0x513448]);});}delete _0x2047e7[_0xefc7('0x19')];});return _0x437e58;});}function countFilteredContacts(_0x432620,_0x58591d){var _0x18971f=_0x432620[_0xefc7('0x62')]();_0x18971f[_0xefc7('0x1d')]('COUNT(*)');_0x18971f=applyJoinClauses(_0x18971f,!![]);_0x432620[_0xefc7('0x50')](_0xefc7('0x51'));var _0x373f96=utils[_0xefc7('0x63')](_0x58591d);if(!_['isEmpty'](_0x373f96)){_0x18971f['where'](_0xefc7('0x64'),_0x373f96);}var _0x40fa16={'type':db[_0xefc7('0x5a')]['QueryTypes'][_0xefc7('0x5c')],'raw':!![]};return db[_0xefc7('0x5e')]['query'](_0x18971f['toString'](),_0x40fa16)[_0xefc7('0x4a')](function(_0x1313f7){return _0x1313f7[0x0][_0xefc7('0x65')];});}module[_0xefc7('0x66')]={'buildContactsQuery':buildContactsQuery,'checkListsRestrictions':checkListsRestrictions,'countFilteredContacts':countFilteredContacts,'getContactsSubquery':getContactsSubquery,'getFilteredContacts':getFilteredContacts,'parseAdvancedSearchFilter':parseAdvancedSearchFilter,'parseQueryParameters':parseQueryParameters,'skipContactsQuery':skipContactsQuery};
\ No newline at end of file
index d67230b..0b244b5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2329=['createWriteStream','unlink','secret','createCipher','utf8','decryptString','update','base64','final','../../config/environment','../../config/logger','app','secrets','session','aes-256-ctr','encrypt','algorithm','join','error','is\x20not\x20a\x20supported\x20algorithm.\x20Your\x20system\x20supports\x20the\x20following\x20algorithms:','filter','hasOwnProperty','encryptFile','createReadStream','data','binary','write','end','close'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x2329,0x9a));var _0x9232=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x2329[_0x122ef9];return _0x42fba0;};'use strict';var crypto=require('crypto');var fs=require('fs');var BPromise=require('bluebird');var _=require('lodash');var config=require(_0x9232('0x0'));var logger=require(_0x9232('0x1'))(_0x9232('0x2'));const AES_SUPPORTED_RX=/^aes(-)?\d{3}(-(cbc|cfb|ctr)(1|8)?){0,1}$/;const stringOptions={'secret':config[_0x9232('0x3')][_0x9232('0x4')],'algorithm':_0x9232('0x5')};const fileOptions={'algorithm':'aes192'};if(config[_0x9232('0x6')]&&config[_0x9232('0x6')][_0x9232('0x7')]){var isSupported=isAlgorithmSupported(config['encrypt'][_0x9232('0x7')]);if(isSupported){fileOptions['algorithm']=config[_0x9232('0x6')][_0x9232('0x7')];}else{var supportedAlgorithms=getSupportedCiphers()[_0x9232('0x8')](',\x20');logger[_0x9232('0x9')](config[_0x9232('0x6')]['algorithm'],_0x9232('0xa'),supportedAlgorithms);}}function isASupportedCipher(_0x50897c){return AES_SUPPORTED_RX['test'](_0x50897c);}function getSupportedCiphers(){return crypto['getCiphers']()[_0x9232('0xb')](isASupportedCipher);}function isAlgorithmSupported(_0x3218ef){return getSupportedCiphers()['indexOf'](_0x3218ef)>-0x1;}function combineOptions(_0x5d9969){var _0x37e124={};for(var _0x14b9b0 in fileOptions){if(fileOptions[_0x9232('0xc')](_0x14b9b0)){_0x37e124[_0x14b9b0]=fileOptions[_0x14b9b0];}}if(_0x5d9969){for(var _0x32ef8c in _0x5d9969){if(_0x5d9969[_0x9232('0xc')](_0x32ef8c)){_0x37e124[_0x32ef8c]=_0x5d9969[_0x32ef8c];}}}return _0x37e124;}exports[_0x9232('0xd')]=function(_0x30f9d0,_0x530e92,_0x58aa28,_0x1e4783){return new BPromise(function(_0x293fb2,_0x29c1f7){_0x1e4783=combineOptions(_0x1e4783);var _0x54b111=new Buffer(_0x58aa28);var _0x406daf=fs[_0x9232('0xe')](_0x30f9d0);var _0x3d1c8c=fs['createWriteStream'](_0x530e92);var _0x333a0d=crypto['createCipher'](_0x1e4783['algorithm'],_0x54b111);_0x406daf['on'](_0x9232('0xf'),function(_0x534868){var _0x156f3f=new Buffer(_0x333a0d['update'](_0x534868),_0x9232('0x10'));_0x3d1c8c[_0x9232('0x11')](_0x156f3f);});_0x406daf['on'](_0x9232('0x12'),function(){try{var _0x20a470=new Buffer(_0x333a0d['final'](_0x9232('0x10')),_0x9232('0x10'));_0x3d1c8c[_0x9232('0x11')](_0x20a470);_0x3d1c8c[_0x9232('0x12')]();_0x3d1c8c['on'](_0x9232('0x13'),function(){return _0x293fb2(_0x530e92);});}catch(_0x4ffd81){fs['unlink'](_0x530e92);return _0x29c1f7(_0x4ffd81);}});});};exports['decryptFile']=function(_0x58a056,_0x16a20e,_0x5466e4,_0x49f999){return new BPromise(function(_0x248094,_0x75f950){_0x49f999=combineOptions(_0x49f999);var _0x1ecb10=new Buffer(_0x5466e4);var _0x4f97ff=fs[_0x9232('0xe')](_0x58a056);var _0x3a7566=fs[_0x9232('0x14')](_0x16a20e);var _0x6c1765=crypto['createDecipher'](_0x49f999[_0x9232('0x7')],_0x1ecb10);_0x4f97ff['on'](_0x9232('0xf'),function(_0x33effd){var _0x486cbb=new Buffer(_0x6c1765['update'](_0x33effd),_0x9232('0x10'));_0x3a7566[_0x9232('0x11')](_0x486cbb);});_0x4f97ff['on'](_0x9232('0x12'),function(){try{var _0x4703b1=new Buffer(_0x6c1765['final'](_0x9232('0x10')),_0x9232('0x10'));_0x3a7566['write'](_0x4703b1);_0x3a7566[_0x9232('0x12')]();_0x3a7566['on']('close',function(){return _0x248094(_0x16a20e);});}catch(_0x1270ae){fs[_0x9232('0x15')](_0x16a20e);return _0x75f950(_0x1270ae);}});});};exports['encryptString']=function(_0x440988,_0x57dc10,_0x32d88d){var _0x5f1718=_0x32d88d||stringOptions['algorithm'];var _0x5bfdc4=_0x57dc10||stringOptions[_0x9232('0x16')];var _0x158d77=crypto[_0x9232('0x17')](_0x5f1718,_0x5bfdc4);var _0x4781f0=_0x158d77['update'](_0x440988,_0x9232('0x18'),'base64');_0x4781f0+=_0x158d77['final']('base64');return _0x4781f0;};exports[_0x9232('0x19')]=function(_0x3bbd5f,_0x4a9670,_0x5562bd){var _0x44c209=_0x5562bd||stringOptions[_0x9232('0x7')];var _0x457dc2=_0x4a9670||stringOptions[_0x9232('0x16')];var _0x491c9c=crypto['createDecipher'](_0x44c209,_0x457dc2);var _0x23533b=_0x491c9c[_0x9232('0x1a')](_0x3bbd5f,_0x9232('0x1b'),_0x9232('0x18'));_0x23533b+=_0x491c9c[_0x9232('0x1c')]('utf8');return _0x23533b;};
\ No newline at end of file
+var _0x2889=['encryptFile','createCipher','data','binary','write','end','close','unlink','createReadStream','createDecipher','update','encryptString','base64','final','decryptString','secret','utf8','crypto','lodash','../../config/environment','../../config/logger','app','secrets','aes-256-ctr','aes192','encrypt','algorithm','join','error','is\x20not\x20a\x20supported\x20algorithm.\x20Your\x20system\x20supports\x20the\x20following\x20algorithms:','test','getCiphers','indexOf','hasOwnProperty'];(function(_0x4569b4,_0x1df34a){var _0x3f965=function(_0x3e3367){while(--_0x3e3367){_0x4569b4['push'](_0x4569b4['shift']());}};_0x3f965(++_0x1df34a);}(_0x2889,0x187));var _0x9288=function(_0x29cba9,_0x177869){_0x29cba9=_0x29cba9-0x0;var _0x514c3f=_0x2889[_0x29cba9];return _0x514c3f;};'use strict';var crypto=require(_0x9288('0x0'));var fs=require('fs');var BPromise=require('bluebird');var _=require(_0x9288('0x1'));var config=require(_0x9288('0x2'));var logger=require(_0x9288('0x3'))(_0x9288('0x4'));const AES_SUPPORTED_RX=/^aes(-)?\d{3}(-(cbc|cfb|ctr)(1|8)?){0,1}$/;const stringOptions={'secret':config[_0x9288('0x5')]['session'],'algorithm':_0x9288('0x6')};const fileOptions={'algorithm':_0x9288('0x7')};if(config['encrypt']&&config[_0x9288('0x8')][_0x9288('0x9')]){var isSupported=isAlgorithmSupported(config['encrypt'][_0x9288('0x9')]);if(isSupported){fileOptions['algorithm']=config[_0x9288('0x8')][_0x9288('0x9')];}else{var supportedAlgorithms=getSupportedCiphers()[_0x9288('0xa')](',\x20');logger[_0x9288('0xb')](config['encrypt']['algorithm'],_0x9288('0xc'),supportedAlgorithms);}}function isASupportedCipher(_0x57d520){return AES_SUPPORTED_RX[_0x9288('0xd')](_0x57d520);}function getSupportedCiphers(){return crypto[_0x9288('0xe')]()['filter'](isASupportedCipher);}function isAlgorithmSupported(_0x2a785b){return getSupportedCiphers()[_0x9288('0xf')](_0x2a785b)>-0x1;}function combineOptions(_0x153e0f){var _0x206eb2={};for(var _0xebc84b in fileOptions){if(fileOptions['hasOwnProperty'](_0xebc84b)){_0x206eb2[_0xebc84b]=fileOptions[_0xebc84b];}}if(_0x153e0f){for(var _0x57d34d in _0x153e0f){if(_0x153e0f[_0x9288('0x10')](_0x57d34d)){_0x206eb2[_0x57d34d]=_0x153e0f[_0x57d34d];}}}return _0x206eb2;}exports[_0x9288('0x11')]=function(_0x3fcbf4,_0x357e8b,_0x4c1c67,_0x130a20){return new BPromise(function(_0x14d814,_0x2d0fae){_0x130a20=combineOptions(_0x130a20);var _0x58f913=new Buffer(_0x4c1c67);var _0x399c5a=fs['createReadStream'](_0x3fcbf4);var _0x3b5dc6=fs['createWriteStream'](_0x357e8b);var _0x2cce8c=crypto[_0x9288('0x12')](_0x130a20['algorithm'],_0x58f913);_0x399c5a['on'](_0x9288('0x13'),function(_0x16d9c0){var _0xc77ee1=new Buffer(_0x2cce8c['update'](_0x16d9c0),_0x9288('0x14'));_0x3b5dc6[_0x9288('0x15')](_0xc77ee1);});_0x399c5a['on'](_0x9288('0x16'),function(){try{var _0x4edb95=new Buffer(_0x2cce8c['final'](_0x9288('0x14')),_0x9288('0x14'));_0x3b5dc6[_0x9288('0x15')](_0x4edb95);_0x3b5dc6['end']();_0x3b5dc6['on'](_0x9288('0x17'),function(){return _0x14d814(_0x357e8b);});}catch(_0x5d9964){fs[_0x9288('0x18')](_0x357e8b);return _0x2d0fae(_0x5d9964);}});});};exports['decryptFile']=function(_0x34c231,_0x4839d2,_0x1db392,_0x40be91){return new BPromise(function(_0x1a44b5,_0x3fe25f){_0x40be91=combineOptions(_0x40be91);var _0x337598=new Buffer(_0x1db392);var _0x3ecb5a=fs[_0x9288('0x19')](_0x34c231);var _0x395a32=fs['createWriteStream'](_0x4839d2);var _0x28b03b=crypto[_0x9288('0x1a')](_0x40be91[_0x9288('0x9')],_0x337598);_0x3ecb5a['on']('data',function(_0x901b2a){var _0x52ed41=new Buffer(_0x28b03b[_0x9288('0x1b')](_0x901b2a),_0x9288('0x14'));_0x395a32[_0x9288('0x15')](_0x52ed41);});_0x3ecb5a['on'](_0x9288('0x16'),function(){try{var _0x18181c=new Buffer(_0x28b03b['final'](_0x9288('0x14')),_0x9288('0x14'));_0x395a32[_0x9288('0x15')](_0x18181c);_0x395a32['end']();_0x395a32['on'](_0x9288('0x17'),function(){return _0x1a44b5(_0x4839d2);});}catch(_0x56598b){fs[_0x9288('0x18')](_0x4839d2);return _0x3fe25f(_0x56598b);}});});};exports[_0x9288('0x1c')]=function(_0x159ba8,_0x2ab1d6,_0x4aa36d){var _0x4775e1=_0x4aa36d||stringOptions[_0x9288('0x9')];var _0x49bed0=_0x2ab1d6||stringOptions['secret'];var _0x323a40=crypto[_0x9288('0x12')](_0x4775e1,_0x49bed0);var _0x196871=_0x323a40[_0x9288('0x1b')](_0x159ba8,'utf8',_0x9288('0x1d'));_0x196871+=_0x323a40[_0x9288('0x1e')](_0x9288('0x1d'));return _0x196871;};exports[_0x9288('0x1f')]=function(_0x54aa27,_0x39444d,_0x518310){var _0x4dbcf7=_0x518310||stringOptions[_0x9288('0x9')];var _0x46f746=_0x39444d||stringOptions[_0x9288('0x20')];var _0x1250a8=crypto['createDecipher'](_0x4dbcf7,_0x46f746);var _0x360fda=_0x1250a8['update'](_0x54aa27,_0x9288('0x1d'),_0x9288('0x21'));_0x360fda+=_0x1250a8['final'](_0x9288('0x21'));return _0x360fda;};
\ No newline at end of file
index 11a39ed..5fc77cc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x99c9=['find','split','splitSizeCsv','then','sequelize','query','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','QueryTypes','num','Empty','length','range','isInteger','push','%s\x20limit\x20%d\x20OFFSET\x20%d','SELECT','dirname','basename','.csv','existsSync','join','mkdirSync','each','%s%d.%s','csv','%s.%s','writeFileSync','zip\x20finished','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','zip','catch','info','inspect','finally','exit','util','path','bluebird','rimraf','../../mysqldb','../../config/logger','argv','AnalyticExtractedReport','format','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','CSV'];(function(_0x27e551,_0x27edb1){var _0x27076e=function(_0x1f7083){while(--_0x1f7083){_0x27e551['push'](_0x27e551['shift']());}};_0x27076e(++_0x27edb1);}(_0x99c9,0x165));var _0x999c=function(_0x36ed48,_0x1ee0d4){_0x36ed48=_0x36ed48-0x0;var _0x51c63a=_0x99c9[_0x36ed48];return _0x51c63a;};'use strict';var util=require(_0x999c('0x0'));var path=require(_0x999c('0x1'));var _=require('lodash');var csv=require('to-csv');var fs=require('fs');var BPromise=require(_0x999c('0x2'));var zipdir=require('zip-dir');var rimraf=require(_0x999c('0x3'));var db=require(_0x999c('0x4'))['db'];var dbH=require(_0x999c('0x4'))['dbH'];var logger=require(_0x999c('0x5'))('analytics');var EXTRACTED_REPORT_ID=Number(process[_0x999c('0x6')][0x2]);var QUERY=process[_0x999c('0x6')][0x3];var PATH=process[_0x999c('0x6')][0x4];var EXIT_CODE=0x0;function analyticExtractedReport(_0x5e640a,_0x1b776e){var _0x4711b8={'status':_0x5e640a};var _0x195b1b={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x1b776e){_0x4711b8['savename']=_0x1b776e;}return db[_0x999c('0x7')]['update'](_0x4711b8,_0x195b1b);}function main(){var _0xe77a01=0x1388;var _0x559f59;logger['info'](util[_0x999c('0x8')](_0x999c('0x9'),EXTRACTED_REPORT_ID,_0x999c('0xa')));return db['Setting'][_0x999c('0xb')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0x999c('0xc'),_0x999c('0xd')]})[_0x999c('0xe')](function(_0x44cb43){if(_0x44cb43){_0x559f59=_0x44cb43;_0xe77a01=_0x559f59['splitSizeCsv']||0x1388;}})[_0x999c('0xe')](function(){return dbH[_0x999c('0xf')][_0x999c('0x10')](util[_0x999c('0x8')](_0x999c('0x11'),QUERY),{'type':dbH[_0x999c('0xf')][_0x999c('0x12')]['SELECT']});})['then'](function(_0x179c19){if(!_0x179c19[0x0][_0x999c('0x13')]){return analyticExtractedReport(_0x999c('0x14'));}var _0xfde64b=[];var _0x4c5b97=0x0;if(_0x559f59[_0x999c('0xc')]){if(_0x179c19&&_0x179c19[_0x999c('0x15')]){var _0x2633b4=_[_0x999c('0x16')](_0x179c19[0x0][_0x999c('0x13')]/_0xe77a01);var _0x2c21cd=Number[_0x999c('0x17')](_0x179c19[0x0][_0x999c('0x13')]/_0xe77a01)?_0x179c19[0x0][_0x999c('0x13')]%_0xe77a01:0x0;_0x2633b4['forEach'](function(_0x4dd0bd){if(_0x4dd0bd>0x0){_0x4c5b97+=_0xe77a01;}_0xfde64b[_0x999c('0x18')](dbH[_0x999c('0xf')][_0x999c('0x10')](util[_0x999c('0x8')](_0x999c('0x19'),QUERY,_0xe77a01,_0x4c5b97),{'type':dbH[_0x999c('0xf')][_0x999c('0x12')]['SELECT']}));});if(_0x2c21cd>0x0){_0x4c5b97+=_0xe77a01;_0xfde64b[_0x999c('0x18')](dbH['sequelize'][_0x999c('0x10')](util[_0x999c('0x8')](_0x999c('0x19'),QUERY,_0x2c21cd,_0x4c5b97),{'type':dbH[_0x999c('0xf')][_0x999c('0x12')][_0x999c('0x1a')]}));}}}else{_0xfde64b['push'](dbH[_0x999c('0xf')]['query'](QUERY,{'type':dbH[_0x999c('0xf')][_0x999c('0x12')]['SELECT']}));}var _0x3eb3bb=path[_0x999c('0x1b')](PATH);var _0x200669=path[_0x999c('0x1c')](PATH,_0x999c('0x1d'));var _0x19d4b6=_0x559f59[_0x999c('0xc')]&&_0xfde64b[_0x999c('0x15')]>0x1;var _0x5eba6c=[];if(!fs[_0x999c('0x1e')](path[_0x999c('0x1f')](_0x3eb3bb,_0x200669))&&_0x19d4b6){fs[_0x999c('0x20')](path[_0x999c('0x1f')](_0x3eb3bb,_0x200669));}return BPromise[_0x999c('0x21')](_0xfde64b,function(_0x3a846f){_0x5eba6c['push'](_0x3a846f);})[_0x999c('0xe')](function(){for(var _0xaac654=0x0;_0xaac654<_0x5eba6c['length'];_0xaac654+=0x1){var _0x16d02e;var _0x5af2ba=_0x5eba6c[_0xaac654];if(_0x19d4b6){_0x16d02e=path[_0x999c('0x1f')](_0x3eb3bb,_0x200669,util['format'](_0x999c('0x22'),_0x200669,_0xaac654,_0x999c('0x23')));}else{_0x16d02e=path['join'](_0x3eb3bb,util[_0x999c('0x8')](_0x999c('0x24'),_0x200669,'csv'));}fs[_0x999c('0x25')](_0x16d02e,csv(_0x5af2ba));}})['then'](function(){if(_0x19d4b6){return new Promise(function(_0x4acddb){zipdir(path[_0x999c('0x1f')](_0x3eb3bb,_0x200669),{'saveTo':path[_0x999c('0x1f')](_0x3eb3bb,util[_0x999c('0x8')]('%s.%s',_0x200669,'zip'))},function(_0x5ee010,_0x30f85d){rimraf(path['join'](_0x3eb3bb,_0x200669),function(){});_0x4acddb(_0x999c('0x26'));});});}})[_0x999c('0xe')](function(){logger['info'](util[_0x999c('0x8')](_0x999c('0x27'),EXTRACTED_REPORT_ID,_0x999c('0xa')));return analyticExtractedReport('Completed',_0x19d4b6?util[_0x999c('0x8')](_0x999c('0x24'),_0x200669,_0x19d4b6?_0x999c('0x28'):_0x999c('0x23')):null);});})[_0x999c('0x29')](function(_0x1581d0){logger[_0x999c('0x2a')](util[_0x999c('0x8')]('Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format',EXTRACTED_REPORT_ID,_0x999c('0xa')),util[_0x999c('0x2b')](_0x1581d0,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport('Failed');})[_0x999c('0x2c')](function(){process[_0x999c('0x2d')](EXIT_CODE);});}main();
\ No newline at end of file
+var _0xf862=['Failed','finally','exit','util','path','to-csv','bluebird','zip-dir','rimraf','../../mysqldb','../../config/logger','argv','savename','AnalyticExtractedReport','update','info','format','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','CSV','Setting','split','then','splitSizeCsv','sequelize','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','QueryTypes','SELECT','num','Empty','length','range','isInteger','forEach','query','%s\x20limit\x20%d\x20OFFSET\x20%d','push','dirname','basename','.csv','existsSync','join','mkdirSync','each','%s%d.%s','csv','%s.%s','zip','zip\x20finished','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','Completed','catch','inspect'];(function(_0x3c1099,_0x4cd808){var _0x1ae4bf=function(_0x1406fc){while(--_0x1406fc){_0x3c1099['push'](_0x3c1099['shift']());}};_0x1ae4bf(++_0x4cd808);}(_0xf862,0x9f));var _0x2f86=function(_0x3ea913,_0x255df2){_0x3ea913=_0x3ea913-0x0;var _0x2b4f28=_0xf862[_0x3ea913];return _0x2b4f28;};'use strict';var util=require(_0x2f86('0x0'));var path=require(_0x2f86('0x1'));var _=require('lodash');var csv=require(_0x2f86('0x2'));var fs=require('fs');var BPromise=require(_0x2f86('0x3'));var zipdir=require(_0x2f86('0x4'));var rimraf=require(_0x2f86('0x5'));var db=require(_0x2f86('0x6'))['db'];var dbH=require(_0x2f86('0x6'))['dbH'];var logger=require(_0x2f86('0x7'))('analytics');var EXTRACTED_REPORT_ID=Number(process[_0x2f86('0x8')][0x2]);var QUERY=process[_0x2f86('0x8')][0x3];var PATH=process[_0x2f86('0x8')][0x4];var EXIT_CODE=0x0;function analyticExtractedReport(_0x564548,_0x5e3574){var _0x10d065={'status':_0x564548};var _0x244ab3={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x5e3574){_0x10d065[_0x2f86('0x9')]=_0x5e3574;}return db[_0x2f86('0xa')][_0x2f86('0xb')](_0x10d065,_0x244ab3);}function main(){var _0x2e5b6c=0x1388;var _0x3521f0;logger[_0x2f86('0xc')](util[_0x2f86('0xd')](_0x2f86('0xe'),EXTRACTED_REPORT_ID,_0x2f86('0xf')));return db[_0x2f86('0x10')]['find']({'where':{'id':0x1},'raw':!![],'attributes':['id',_0x2f86('0x11'),'splitSizeCsv']})[_0x2f86('0x12')](function(_0x5dd90d){if(_0x5dd90d){_0x3521f0=_0x5dd90d;_0x2e5b6c=_0x3521f0[_0x2f86('0x13')]||0x1388;}})['then'](function(){return dbH[_0x2f86('0x14')]['query'](util[_0x2f86('0xd')](_0x2f86('0x15'),QUERY),{'type':dbH[_0x2f86('0x14')][_0x2f86('0x16')][_0x2f86('0x17')]});})['then'](function(_0x23cbac){if(!_0x23cbac[0x0][_0x2f86('0x18')]){return analyticExtractedReport(_0x2f86('0x19'));}var _0xa1fecc=[];var _0x4e1080=0x0;if(_0x3521f0[_0x2f86('0x11')]){if(_0x23cbac&&_0x23cbac[_0x2f86('0x1a')]){var _0x302b74=_[_0x2f86('0x1b')](_0x23cbac[0x0][_0x2f86('0x18')]/_0x2e5b6c);var _0x76b4ca=Number[_0x2f86('0x1c')](_0x23cbac[0x0][_0x2f86('0x18')]/_0x2e5b6c)?_0x23cbac[0x0][_0x2f86('0x18')]%_0x2e5b6c:0x0;_0x302b74[_0x2f86('0x1d')](function(_0x1ed3d5){if(_0x1ed3d5>0x0){_0x4e1080+=_0x2e5b6c;}_0xa1fecc['push'](dbH[_0x2f86('0x14')][_0x2f86('0x1e')](util[_0x2f86('0xd')](_0x2f86('0x1f'),QUERY,_0x2e5b6c,_0x4e1080),{'type':dbH[_0x2f86('0x14')][_0x2f86('0x16')]['SELECT']}));});if(_0x76b4ca>0x0){_0x4e1080+=_0x2e5b6c;_0xa1fecc[_0x2f86('0x20')](dbH[_0x2f86('0x14')][_0x2f86('0x1e')](util[_0x2f86('0xd')]('%s\x20limit\x20%d\x20OFFSET\x20%d',QUERY,_0x76b4ca,_0x4e1080),{'type':dbH[_0x2f86('0x14')][_0x2f86('0x16')][_0x2f86('0x17')]}));}}}else{_0xa1fecc[_0x2f86('0x20')](dbH[_0x2f86('0x14')][_0x2f86('0x1e')](QUERY,{'type':dbH[_0x2f86('0x14')][_0x2f86('0x16')][_0x2f86('0x17')]}));}var _0x5af866=path[_0x2f86('0x21')](PATH);var _0x1d337c=path[_0x2f86('0x22')](PATH,_0x2f86('0x23'));var _0x174eed=_0x3521f0[_0x2f86('0x11')]&&_0xa1fecc['length']>0x1;var _0x1b9fc3=[];if(!fs[_0x2f86('0x24')](path[_0x2f86('0x25')](_0x5af866,_0x1d337c))&&_0x174eed){fs[_0x2f86('0x26')](path['join'](_0x5af866,_0x1d337c));}return BPromise[_0x2f86('0x27')](_0xa1fecc,function(_0x16d281){_0x1b9fc3[_0x2f86('0x20')](_0x16d281);})[_0x2f86('0x12')](function(){for(var _0x4ecab3=0x0;_0x4ecab3<_0x1b9fc3['length'];_0x4ecab3+=0x1){var _0x299c23;var _0x3047bf=_0x1b9fc3[_0x4ecab3];if(_0x174eed){_0x299c23=path[_0x2f86('0x25')](_0x5af866,_0x1d337c,util[_0x2f86('0xd')](_0x2f86('0x28'),_0x1d337c,_0x4ecab3,_0x2f86('0x29')));}else{_0x299c23=path['join'](_0x5af866,util[_0x2f86('0xd')](_0x2f86('0x2a'),_0x1d337c,_0x2f86('0x29')));}fs['writeFileSync'](_0x299c23,csv(_0x3047bf));}})[_0x2f86('0x12')](function(){if(_0x174eed){return new Promise(function(_0x326143){zipdir(path[_0x2f86('0x25')](_0x5af866,_0x1d337c),{'saveTo':path[_0x2f86('0x25')](_0x5af866,util[_0x2f86('0xd')]('%s.%s',_0x1d337c,_0x2f86('0x2b')))},function(_0x4749a2,_0x44ae91){rimraf(path[_0x2f86('0x25')](_0x5af866,_0x1d337c),function(){});_0x326143(_0x2f86('0x2c'));});});}})[_0x2f86('0x12')](function(){logger[_0x2f86('0xc')](util[_0x2f86('0xd')](_0x2f86('0x2d'),EXTRACTED_REPORT_ID,'CSV'));return analyticExtractedReport(_0x2f86('0x2e'),_0x174eed?util[_0x2f86('0xd')](_0x2f86('0x2a'),_0x1d337c,_0x174eed?_0x2f86('0x2b'):'csv'):null);});})[_0x2f86('0x2f')](function(_0x2aeef0){logger[_0x2f86('0xc')](util[_0x2f86('0xd')]('Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format',EXTRACTED_REPORT_ID,_0x2f86('0xf')),util[_0x2f86('0x30')](_0x2aeef0,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0x2f86('0x31'));})[_0x2f86('0x32')](function(){process[_0x2f86('0x33')](EXIT_CODE);});}main();
\ No newline at end of file
index b92e9df..4cd88d8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9f33=['startDate','endDate','format','header','pageBreak','before','landscape','toString','\x20/\x20','footer','Arial','black','num','Empty','find','split','splitSizePdf','then','range','query','%s\x20limit\x20%d\x20OFFSET\x20%d','SELECT','sequelize','QueryTypes','dirname','basename','.pdf','existsSync','join','%s%d.%s','pdf','all','%s.%s','zip','zip\x20finished','info','PDF','Completed','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','catch','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','inspect','Failed','finally','/fonts/arial-regular.ttf','/fonts/arial-italic.ttf','/fonts/arial-bold-italic.ttf','%s\x20#%d','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','error','end','createPdfFromHTML','createPdfKitDocument','lodash','util','path','moment','html-to-pdfmake','rimraf','jsdom','JSDOM','window','../../mysqldb','dbH','analytics','argv','savename','AnalyticExtractedReport','tableHeader','map','value','fill','length','auto','body','concat','chunk','keys','forEach','push','Name:\x20%s\x0aReport:\x20%s\x0aFrom:\x20%s\x20To:\x20%s','name'];(function(_0x6f37c4,_0x2e8330){var _0x1d1b5d=function(_0x3535e4){while(--_0x3535e4){_0x6f37c4['push'](_0x6f37c4['shift']());}};_0x1d1b5d(++_0x2e8330);}(_0x9f33,0x147));var _0x39f3=function(_0x47964d,_0x3ba889){_0x47964d=_0x47964d-0x0;var _0x4b2d70=_0x9f33[_0x47964d];return _0x4b2d70;};'use strict';var _=require(_0x39f3('0x0'));var fs=require('fs');var util=require(_0x39f3('0x1'));var path=require(_0x39f3('0x2'));var moment=require(_0x39f3('0x3'));var htmlToPdfmake=require(_0x39f3('0x4'));var PdfPrinter=require('pdfmake/src/printer');var zipdir=require('zip-dir');var rimraf=require(_0x39f3('0x5'));var JSDOM=require(_0x39f3('0x6'))[_0x39f3('0x7')];var window=new JSDOM('')[_0x39f3('0x8')];var BPromise=require('bluebird');var db=require(_0x39f3('0x9'))['db'];var dbH=require('../../mysqldb')[_0x39f3('0xa')];var logger=require('../../config/logger')(_0x39f3('0xb'));var EXTRACTED_REPORT_ID=Number(process[_0x39f3('0xc')][0x2]);var QUERY=process[_0x39f3('0xc')][0x3];var PATH=process[_0x39f3('0xc')][0x4];var NAME=process[_0x39f3('0xc')][0x5];var FORMAT='MMMM\x20Do\x20YYYY,\x20h:mm:ss\x20a';var EXTRACTED_REPORT;var EXIT_CODE=0x0;function analyticExtractedReport(_0x260408,_0x54efb6){var _0xf716d7={'status':_0x260408};var _0x365fe3={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x54efb6){_0xf716d7[_0x39f3('0xd')]=_0x54efb6;}return db[_0x39f3('0xe')]['update'](_0xf716d7,_0x365fe3);}function getHeaders(_0x17f3a1){return _['map'](_0x17f3a1,function(_0x2ce36c){return{'text':_0x2ce36c,'style':_0x39f3('0xf')};});}function getRows(_0x29b34e,_0x1437e6){return _[_0x39f3('0x10')](_0x1437e6,function(_0x5ce77a){return _(_0x5ce77a)['pick'](_0x29b34e)['map'](function(_0x2f68af){return _0x2f68af?_['toString'](_0x2f68af):'';})[_0x39f3('0x11')]();});}function createTable(_0x4799ec,_0x10940d){var _0x1f1308={'widths':_[_0x39f3('0x12')](Array(_0x4799ec[_0x39f3('0x13')]),0x91),'heights':function(_0x3470e9){return _0x3470e9===0x0?_0x39f3('0x14'):0x32;},'dontBreakRows':!![],'headerRows':0x1,'body':[]};var _0x174165=getHeaders(_0x4799ec);_0x1f1308['body']['push'](_0x174165);var _0x5b9459=getRows(_0x4799ec,_0x10940d);_0x1f1308[_0x39f3('0x15')]=_0x1f1308[_0x39f3('0x15')][_0x39f3('0x16')](_0x5b9459);return _0x1f1308;}function createTables(_0x5c523d){var _0x27d2ec=[];var _0x2b24d1=_[_0x39f3('0x17')](Object[_0x39f3('0x18')](_0x5c523d[0x0]),0x5);_0x2b24d1[_0x39f3('0x19')](function(_0x237b41){_0x27d2ec[_0x39f3('0x1a')](createTable(_0x237b41,_0x5c523d));});return _0x27d2ec;}function getPDFDocDefinition(_0x821ebb){var _0xc87ba5=util['format'](_0x39f3('0x1b'),NAME,EXTRACTED_REPORT[_0x39f3('0x1c')],moment(EXTRACTED_REPORT[_0x39f3('0x1d')])['format'](FORMAT),moment(EXTRACTED_REPORT[_0x39f3('0x1e')])[_0x39f3('0x1f')](FORMAT));var _0x8a5610=[];for(var _0xa6b507=0x0;_0xa6b507<_0x821ebb['length'];_0xa6b507++){var _0x525184=[];if(_0xa6b507===0x0){_0x525184[_0x39f3('0x1a')]({'text':_0xc87ba5,'style':_0x39f3('0x20')});}var _0x11ce36={'table':_0x821ebb[_0xa6b507]};if(_0xa6b507>0x0){_0x11ce36[_0x39f3('0x21')]=_0x39f3('0x22');_0x11ce36['margin']=[0x0,0x46,0x0,0x0];}_0x525184[_0x39f3('0x1a')](_0x11ce36);_0x8a5610[_0x39f3('0x1a')](_0x525184);}return{'pageSize':'A4','pageOrientation':_0x39f3('0x23'),'content':_0x8a5610,'footer':function(_0x392cf2,_0x403e8e){return{'text':_0x392cf2[_0x39f3('0x24')]()+_0x39f3('0x25')+_0x403e8e,'style':_0x39f3('0x26')};},'defaultStyle':{'font':_0x39f3('0x27')},'styles':{'header':{'fontSize':0x12,'bold':!![],'margin':[0x0,0x0,0x0,0xa]},'tableHeader':{'bold':!![],'fontSize':0xd,'color':_0x39f3('0x28')},'footer':{'alignment':'right','margin':[0x0,0x0,0x28,0x0]}}};}function extractReport(_0x2ec5e3){var _0x42c80b=0x1388;var _0x2d3359;if(!_0x2ec5e3[0x0][_0x39f3('0x29')]){return analyticExtractedReport(_0x39f3('0x2a'));}return db['Setting'][_0x39f3('0x2b')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0x39f3('0x2c'),_0x39f3('0x2d')]})[_0x39f3('0x2e')](function(_0x58e968){if(_0x58e968){_0x2d3359=_0x58e968;_0x42c80b=_0x2d3359[_0x39f3('0x2d')]||0x3e8;}})[_0x39f3('0x2e')](function(){var _0x9e8862=[];var _0x4164ad=0x0;if(_0x2d3359[_0x39f3('0x2c')]){if(_0x2ec5e3&&_0x2ec5e3[_0x39f3('0x13')]){var _0xb20966=_[_0x39f3('0x2f')](_0x2ec5e3[0x0][_0x39f3('0x29')]/_0x42c80b);var _0x467711=Number['isInteger'](_0x2ec5e3[0x0][_0x39f3('0x29')]/_0x42c80b)?_0x2ec5e3[0x0][_0x39f3('0x29')]%_0x42c80b:0x0;_0xb20966['forEach'](function(_0x3abb16){if(_0x3abb16>0x0){_0x4164ad+=_0x42c80b;}_0x9e8862[_0x39f3('0x1a')](dbH['sequelize'][_0x39f3('0x30')](util[_0x39f3('0x1f')](_0x39f3('0x31'),QUERY,_0x42c80b,_0x4164ad),{'type':dbH['sequelize']['QueryTypes'][_0x39f3('0x32')]}));});if(_0x467711>0x0){_0x4164ad+=_0x42c80b;_0x9e8862[_0x39f3('0x1a')](dbH[_0x39f3('0x33')]['query'](util['format']('%s\x20limit\x20%d\x20OFFSET\x20%d',QUERY,_0x467711,_0x4164ad),{'type':dbH[_0x39f3('0x33')][_0x39f3('0x34')][_0x39f3('0x32')]}));}}}else{_0x9e8862[_0x39f3('0x1a')](dbH[_0x39f3('0x33')][_0x39f3('0x30')](QUERY,{'type':dbH[_0x39f3('0x33')][_0x39f3('0x34')][_0x39f3('0x32')]}));}var _0x181aa4=path[_0x39f3('0x35')](PATH);var _0x12227b=path[_0x39f3('0x36')](PATH,_0x39f3('0x37'));var _0x8d0792=_0x2d3359[_0x39f3('0x2c')]&&_0x9e8862[_0x39f3('0x13')]>0x1;var _0x1e1cc3=[];if(!fs[_0x39f3('0x38')](path[_0x39f3('0x39')](_0x181aa4,_0x12227b))&&_0x8d0792){fs['mkdirSync'](path[_0x39f3('0x39')](_0x181aa4,_0x12227b));}return BPromise['each'](_0x9e8862,function(_0x3e29c7){_0x1e1cc3[_0x39f3('0x1a')](_0x3e29c7);})[_0x39f3('0x2e')](function(){var _0x123eac=[];for(var _0x12a05a=0x0;_0x12a05a<_0x1e1cc3['length'];_0x12a05a+=0x1){var _0x54f722=_0x1e1cc3[_0x12a05a];var _0x118022=createTables(_['flatten'](_0x54f722));var _0x562b62;var _0x9dde9f=getPDFDocDefinition(_0x118022);var _0x26f9eb=getPDFPrinter();var _0x47f3cd=_0x26f9eb['createPdfKitDocument'](_0x9dde9f);if(_0x8d0792){_0x562b62=path[_0x39f3('0x39')](_0x181aa4,_0x12227b,util[_0x39f3('0x1f')](_0x39f3('0x3a'),_0x12227b,_0x12a05a,_0x39f3('0x3b')));}else{_0x562b62=path[_0x39f3('0x39')](_0x181aa4,util[_0x39f3('0x1f')]('%s.%s',_0x12227b,_0x39f3('0x3b')));}_0x123eac[_0x39f3('0x1a')](writePDFDocument(_0x47f3cd,_0x562b62));}return Promise[_0x39f3('0x3c')](_0x123eac);})[_0x39f3('0x2e')](function(){if(_0x8d0792){return new Promise(function(_0x6d481a){zipdir(path[_0x39f3('0x39')](_0x181aa4,_0x12227b),{'saveTo':path[_0x39f3('0x39')](_0x181aa4,util[_0x39f3('0x1f')](_0x39f3('0x3d'),_0x12227b,_0x39f3('0x3e')))},function(){rimraf(path[_0x39f3('0x39')](_0x181aa4,_0x12227b),function(){});_0x6d481a(_0x39f3('0x3f'));});});}})[_0x39f3('0x2e')](function(){if(!_0x8d0792)return;rimraf(path[_0x39f3('0x39')](_0x181aa4,_0x12227b),function(){});})[_0x39f3('0x2e')](function(){logger[_0x39f3('0x40')](util[_0x39f3('0x1f')]('Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed',EXTRACTED_REPORT_ID,_0x39f3('0x41')));return analyticExtractedReport(_0x39f3('0x42'),_0x8d0792?util[_0x39f3('0x1f')]('%s.%s',_0x12227b,_0x8d0792?'zip':_0x39f3('0x3b')):null);});});}function main(){if(!EXTRACTED_REPORT_ID)return;logger[_0x39f3('0x40')](util[_0x39f3('0x1f')](_0x39f3('0x43'),EXTRACTED_REPORT_ID,_0x39f3('0x41')));return db[_0x39f3('0xe')]['findOne']({'where':{'id':EXTRACTED_REPORT_ID}})['then'](function(_0xa0ad63){EXTRACTED_REPORT=_0xa0ad63;return dbH['sequelize'][_0x39f3('0x30')](util[_0x39f3('0x1f')](_0x39f3('0x44'),QUERY),{'type':dbH[_0x39f3('0x33')][_0x39f3('0x34')]['SELECT']});})['then'](extractReport)[_0x39f3('0x45')](function(_0x7d5b72){logger['info'](util[_0x39f3('0x1f')](_0x39f3('0x46'),EXTRACTED_REPORT_ID,_0x39f3('0x41')),util[_0x39f3('0x47')](_0x7d5b72,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0x39f3('0x48'));})[_0x39f3('0x49')](function(){process['exit'](EXIT_CODE);});}main();function getPDFPrinter(){var _0x2479dc=new PdfPrinter({'Arial':{'normal':__dirname+_0x39f3('0x4a'),'bold':__dirname+'/fonts/arial-bold.ttf','italics':__dirname+_0x39f3('0x4b'),'bolditalics':__dirname+_0x39f3('0x4c')}});return _0x2479dc;}function getPDFDocDefinitionFromHTML(_0xd5301b,_0x1542b3){var _0xec6d5e=util['format'](_0x39f3('0x4d'),_0x1542b3['channel'],_0x1542b3['interactionId']);var _0x1be188=moment()[_0x39f3('0x1f')](_0x39f3('0x4e'))['toString']();var _0x5a6321=htmlToPdfmake(_0xd5301b,{'window':window,'tableAutoSize':!![]});return{'content':[_0x5a6321],'defaultStyle':{'font':_0x39f3('0x27')},'styles':{'header':{'fontSize':0x12,'bold':!![],'alignment':_0x39f3('0x4f'),'margin':[0xa,0xa,0xa,0xa]},'footer':{'fontSize':0x9,'alignment':_0x39f3('0x4f'),'margin':[0xa,0x14,0xa,0xa]},'textblock':{'fontSize':0xb},'textfield':{'bold':!![]},'messageContainer':{'fontSize':0xa},'messageInfo':{'bold':!![]},'interactionData':{'alignment':_0x39f3('0x4f')}},'header':function(){return[{'text':_0x39f3('0x50'),'style':_0x39f3('0x20')}];},'footer':function(_0x31b993,_0x5f0c51){return[{'text':util[_0x39f3('0x1f')](_0x39f3('0x51'),_0xec6d5e,_0x31b993,_0x5f0c51,_0x1be188),'style':_0x39f3('0x26')}];}};}function writePDFDocument(_0x5a485f,_0x305f97){return new Promise(function(_0x8d862f,_0x38a11a){var _0x2e4174=_0x5a485f[_0x39f3('0x52')](fs[_0x39f3('0x53')](_0x305f97));_0x2e4174['on'](_0x39f3('0x54'),function(){_0x8d862f(_0x39f3('0x54'));});_0x2e4174['on'](_0x39f3('0x55'),function(_0xd04458){_0x38a11a(_0xd04458);});_0x5a485f[_0x39f3('0x56')]();});}exports[_0x39f3('0x57')]=function(_0x495d8c,_0x37684c){var _0x3cf4f3=getPDFPrinter();var _0x2aa8fd=getPDFDocDefinitionFromHTML(_0x495d8c,_0x37684c);var _0x92cb7c=_0x3cf4f3[_0x39f3('0x58')](_0x2aa8fd);return writePDFDocument(_0x92cb7c,_0x37684c['path'])['catch'](function(_0x5a51dc){throw _0x5a51dc;});};
\ No newline at end of file
+var _0x7ff0=['info','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','PDF','Completed','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','findOne','catch','inspect','Failed','finally','exit','/fonts/arial-bold.ttf','/fonts/arial-italic.ttf','channel','interactionId','YYYY-MM-DD','center','Interaction\x20Transcript','header','\x09\x09XCALLY\x20Motion\x20-\x20%s\x09\x09\x09\x09%d/%d\x09\x09\x09\x09%s','footer','pipe','createWriteStream','finish','error','end','createPdfFromHTML','lodash','path','moment','html-to-pdfmake','pdfmake/src/printer','zip-dir','jsdom','bluebird','../../mysqldb','dbH','analytics','argv','MMMM\x20Do\x20YYYY,\x20h:mm:ss\x20a','savename','AnalyticExtractedReport','update','map','toString','fill','auto','body','concat','chunk','keys','forEach','format','name','startDate','endDate','pageBreak','push','landscape','\x20/\x20','Arial','right','num','Empty','Setting','split','splitSizePdf','then','isInteger','sequelize','query','%s\x20limit\x20%d\x20OFFSET\x20%d','SELECT','QueryTypes','dirname','basename','.pdf','length','join','flatten','createPdfKitDocument','%s%d.%s','pdf','%s.%s','all','zip','zip\x20finished'];(function(_0x283d65,_0x5513d2){var _0x521f04=function(_0x5c7e73){while(--_0x5c7e73){_0x283d65['push'](_0x283d65['shift']());}};_0x521f04(++_0x5513d2);}(_0x7ff0,0xc9));var _0x07ff=function(_0x2d61ac,_0x18ff36){_0x2d61ac=_0x2d61ac-0x0;var _0x3f7d3c=_0x7ff0[_0x2d61ac];return _0x3f7d3c;};'use strict';var _=require(_0x07ff('0x0'));var fs=require('fs');var util=require('util');var path=require(_0x07ff('0x1'));var moment=require(_0x07ff('0x2'));var htmlToPdfmake=require(_0x07ff('0x3'));var PdfPrinter=require(_0x07ff('0x4'));var zipdir=require(_0x07ff('0x5'));var rimraf=require('rimraf');var JSDOM=require(_0x07ff('0x6'))['JSDOM'];var window=new JSDOM('')['window'];var BPromise=require(_0x07ff('0x7'));var db=require(_0x07ff('0x8'))['db'];var dbH=require(_0x07ff('0x8'))[_0x07ff('0x9')];var logger=require('../../config/logger')(_0x07ff('0xa'));var EXTRACTED_REPORT_ID=Number(process[_0x07ff('0xb')][0x2]);var QUERY=process[_0x07ff('0xb')][0x3];var PATH=process[_0x07ff('0xb')][0x4];var NAME=process[_0x07ff('0xb')][0x5];var FORMAT=_0x07ff('0xc');var EXTRACTED_REPORT;var EXIT_CODE=0x0;function analyticExtractedReport(_0x4b8935,_0x20ed48){var _0x10e1fd={'status':_0x4b8935};var _0xe44b30={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x20ed48){_0x10e1fd[_0x07ff('0xd')]=_0x20ed48;}return db[_0x07ff('0xe')][_0x07ff('0xf')](_0x10e1fd,_0xe44b30);}function getHeaders(_0x4b94aa){return _['map'](_0x4b94aa,function(_0x14b274){return{'text':_0x14b274,'style':'tableHeader'};});}function getRows(_0x57dc9a,_0x539bba){return _[_0x07ff('0x10')](_0x539bba,function(_0x2e31d0){return _(_0x2e31d0)['pick'](_0x57dc9a)[_0x07ff('0x10')](function(_0x13200d){return _0x13200d?_[_0x07ff('0x11')](_0x13200d):'';})['value']();});}function createTable(_0x32136b,_0x13cdd8){var _0x574187={'widths':_[_0x07ff('0x12')](Array(_0x32136b['length']),0x91),'heights':function(_0x32b1ef){return _0x32b1ef===0x0?_0x07ff('0x13'):0x32;},'dontBreakRows':!![],'headerRows':0x1,'body':[]};var _0x5c577c=getHeaders(_0x32136b);_0x574187[_0x07ff('0x14')]['push'](_0x5c577c);var _0x1d5544=getRows(_0x32136b,_0x13cdd8);_0x574187['body']=_0x574187[_0x07ff('0x14')][_0x07ff('0x15')](_0x1d5544);return _0x574187;}function createTables(_0x44f76b){var _0x463548=[];var _0x1f4319=_[_0x07ff('0x16')](Object[_0x07ff('0x17')](_0x44f76b[0x0]),0x5);_0x1f4319[_0x07ff('0x18')](function(_0x472dee){_0x463548['push'](createTable(_0x472dee,_0x44f76b));});return _0x463548;}function getPDFDocDefinition(_0xe6bd78){var _0x3cb818=util[_0x07ff('0x19')]('Name:\x20%s\x0aReport:\x20%s\x0aFrom:\x20%s\x20To:\x20%s',NAME,EXTRACTED_REPORT[_0x07ff('0x1a')],moment(EXTRACTED_REPORT[_0x07ff('0x1b')])[_0x07ff('0x19')](FORMAT),moment(EXTRACTED_REPORT[_0x07ff('0x1c')])[_0x07ff('0x19')](FORMAT));var _0x189169=[];for(var _0x28f20d=0x0;_0x28f20d<_0xe6bd78['length'];_0x28f20d++){var _0x15ec1c=[];if(_0x28f20d===0x0){_0x15ec1c['push']({'text':_0x3cb818,'style':'header'});}var _0x49981d={'table':_0xe6bd78[_0x28f20d]};if(_0x28f20d>0x0){_0x49981d[_0x07ff('0x1d')]='before';_0x49981d['margin']=[0x0,0x46,0x0,0x0];}_0x15ec1c[_0x07ff('0x1e')](_0x49981d);_0x189169[_0x07ff('0x1e')](_0x15ec1c);}return{'pageSize':'A4','pageOrientation':_0x07ff('0x1f'),'content':_0x189169,'footer':function(_0x21e961,_0xcdb67){return{'text':_0x21e961['toString']()+_0x07ff('0x20')+_0xcdb67,'style':'footer'};},'defaultStyle':{'font':_0x07ff('0x21')},'styles':{'header':{'fontSize':0x12,'bold':!![],'margin':[0x0,0x0,0x0,0xa]},'tableHeader':{'bold':!![],'fontSize':0xd,'color':'black'},'footer':{'alignment':_0x07ff('0x22'),'margin':[0x0,0x0,0x28,0x0]}}};}function extractReport(_0x5c62dd){var _0x400c1d=0x1388;var _0x357cf8;if(!_0x5c62dd[0x0][_0x07ff('0x23')]){return analyticExtractedReport(_0x07ff('0x24'));}return db[_0x07ff('0x25')]['find']({'where':{'id':0x1},'raw':!![],'attributes':['id',_0x07ff('0x26'),_0x07ff('0x27')]})[_0x07ff('0x28')](function(_0x1c8dcf){if(_0x1c8dcf){_0x357cf8=_0x1c8dcf;_0x400c1d=_0x357cf8[_0x07ff('0x27')]||0x3e8;}})['then'](function(){var _0xc9f65b=[];var _0x1f5910=0x0;if(_0x357cf8[_0x07ff('0x26')]){if(_0x5c62dd&&_0x5c62dd['length']){var _0x24e1d3=_['range'](_0x5c62dd[0x0][_0x07ff('0x23')]/_0x400c1d);var _0x4f5c10=Number[_0x07ff('0x29')](_0x5c62dd[0x0]['num']/_0x400c1d)?_0x5c62dd[0x0][_0x07ff('0x23')]%_0x400c1d:0x0;_0x24e1d3[_0x07ff('0x18')](function(_0x34b22d){if(_0x34b22d>0x0){_0x1f5910+=_0x400c1d;}_0xc9f65b[_0x07ff('0x1e')](dbH[_0x07ff('0x2a')][_0x07ff('0x2b')](util['format'](_0x07ff('0x2c'),QUERY,_0x400c1d,_0x1f5910),{'type':dbH[_0x07ff('0x2a')]['QueryTypes'][_0x07ff('0x2d')]}));});if(_0x4f5c10>0x0){_0x1f5910+=_0x400c1d;_0xc9f65b[_0x07ff('0x1e')](dbH[_0x07ff('0x2a')]['query'](util['format'](_0x07ff('0x2c'),QUERY,_0x4f5c10,_0x1f5910),{'type':dbH['sequelize'][_0x07ff('0x2e')][_0x07ff('0x2d')]}));}}}else{_0xc9f65b[_0x07ff('0x1e')](dbH[_0x07ff('0x2a')][_0x07ff('0x2b')](QUERY,{'type':dbH[_0x07ff('0x2a')][_0x07ff('0x2e')][_0x07ff('0x2d')]}));}var _0x17cd73=path[_0x07ff('0x2f')](PATH);var _0x5862de=path[_0x07ff('0x30')](PATH,_0x07ff('0x31'));var _0x380f00=_0x357cf8[_0x07ff('0x26')]&&_0xc9f65b[_0x07ff('0x32')]>0x1;var _0x1c2d76=[];if(!fs['existsSync'](path[_0x07ff('0x33')](_0x17cd73,_0x5862de))&&_0x380f00){fs['mkdirSync'](path[_0x07ff('0x33')](_0x17cd73,_0x5862de));}return BPromise['each'](_0xc9f65b,function(_0x5459be){_0x1c2d76['push'](_0x5459be);})['then'](function(){var _0x1bc194=[];for(var _0x348e13=0x0;_0x348e13<_0x1c2d76[_0x07ff('0x32')];_0x348e13+=0x1){var _0x864b10=_0x1c2d76[_0x348e13];var _0xb646c0=createTables(_[_0x07ff('0x34')](_0x864b10));var _0x59beab;var _0x143b0a=getPDFDocDefinition(_0xb646c0);var _0x24a5b6=getPDFPrinter();var _0x514ed1=_0x24a5b6[_0x07ff('0x35')](_0x143b0a);if(_0x380f00){_0x59beab=path['join'](_0x17cd73,_0x5862de,util[_0x07ff('0x19')](_0x07ff('0x36'),_0x5862de,_0x348e13,_0x07ff('0x37')));}else{_0x59beab=path['join'](_0x17cd73,util[_0x07ff('0x19')](_0x07ff('0x38'),_0x5862de,_0x07ff('0x37')));}_0x1bc194['push'](writePDFDocument(_0x514ed1,_0x59beab));}return Promise[_0x07ff('0x39')](_0x1bc194);})['then'](function(){if(_0x380f00){return new Promise(function(_0x73f0e5){zipdir(path[_0x07ff('0x33')](_0x17cd73,_0x5862de),{'saveTo':path[_0x07ff('0x33')](_0x17cd73,util[_0x07ff('0x19')](_0x07ff('0x38'),_0x5862de,_0x07ff('0x3a')))},function(){rimraf(path[_0x07ff('0x33')](_0x17cd73,_0x5862de),function(){});_0x73f0e5(_0x07ff('0x3b'));});});}})['then'](function(){if(!_0x380f00)return;rimraf(path[_0x07ff('0x33')](_0x17cd73,_0x5862de),function(){});})[_0x07ff('0x28')](function(){logger[_0x07ff('0x3c')](util[_0x07ff('0x19')](_0x07ff('0x3d'),EXTRACTED_REPORT_ID,_0x07ff('0x3e')));return analyticExtractedReport(_0x07ff('0x3f'),_0x380f00?util[_0x07ff('0x19')](_0x07ff('0x38'),_0x5862de,_0x380f00?_0x07ff('0x3a'):_0x07ff('0x37')):null);});});}function main(){if(!EXTRACTED_REPORT_ID)return;logger[_0x07ff('0x3c')](util[_0x07ff('0x19')](_0x07ff('0x40'),EXTRACTED_REPORT_ID,_0x07ff('0x3e')));return db[_0x07ff('0xe')][_0x07ff('0x41')]({'where':{'id':EXTRACTED_REPORT_ID}})[_0x07ff('0x28')](function(_0x12b139){EXTRACTED_REPORT=_0x12b139;return dbH[_0x07ff('0x2a')][_0x07ff('0x2b')](util[_0x07ff('0x19')]('SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t',QUERY),{'type':dbH['sequelize'][_0x07ff('0x2e')][_0x07ff('0x2d')]});})[_0x07ff('0x28')](extractReport)[_0x07ff('0x42')](function(_0xc895bf){logger[_0x07ff('0x3c')](util['format']('Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format',EXTRACTED_REPORT_ID,'PDF'),util[_0x07ff('0x43')](_0xc895bf,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0x07ff('0x44'));})[_0x07ff('0x45')](function(){process[_0x07ff('0x46')](EXIT_CODE);});}main();function getPDFPrinter(){var _0x50a331=new PdfPrinter({'Arial':{'normal':__dirname+'/fonts/arial-regular.ttf','bold':__dirname+_0x07ff('0x47'),'italics':__dirname+_0x07ff('0x48'),'bolditalics':__dirname+'/fonts/arial-bold-italic.ttf'}});return _0x50a331;}function getPDFDocDefinitionFromHTML(_0x20174e,_0x41f26e){var _0x275146=util['format']('%s\x20#%d',_0x41f26e[_0x07ff('0x49')],_0x41f26e[_0x07ff('0x4a')]);var _0x1940da=moment()[_0x07ff('0x19')](_0x07ff('0x4b'))[_0x07ff('0x11')]();var _0x289af9=htmlToPdfmake(_0x20174e,{'window':window,'tableAutoSize':!![]});return{'content':[_0x289af9],'defaultStyle':{'font':_0x07ff('0x21')},'styles':{'header':{'fontSize':0x12,'bold':!![],'alignment':_0x07ff('0x4c'),'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':_0x07ff('0x4c')}},'header':function(){return[{'text':_0x07ff('0x4d'),'style':_0x07ff('0x4e')}];},'footer':function(_0x1a5f3b,_0x34b6ed){return[{'text':util['format'](_0x07ff('0x4f'),_0x275146,_0x1a5f3b,_0x34b6ed,_0x1940da),'style':_0x07ff('0x50')}];}};}function writePDFDocument(_0x1630ed,_0x293b51){return new Promise(function(_0x23ace6,_0x5444de){var _0x26cc73=_0x1630ed[_0x07ff('0x51')](fs[_0x07ff('0x52')](_0x293b51));_0x26cc73['on']('finish',function(){_0x23ace6(_0x07ff('0x53'));});_0x26cc73['on'](_0x07ff('0x54'),function(_0x1d1af4){_0x5444de(_0x1d1af4);});_0x1630ed[_0x07ff('0x55')]();});}exports[_0x07ff('0x56')]=function(_0x31f1f8,_0x233ae9){var _0x454577=getPDFPrinter();var _0x3569b0=getPDFDocDefinitionFromHTML(_0x31f1f8,_0x233ae9);var _0x4b6750=_0x454577['createPdfKitDocument'](_0x3569b0);return writePDFDocument(_0x4b6750,_0x233ae9[_0x07ff('0x1')])[_0x07ff('0x42')](function(_0x5720c4){throw _0x5720c4;});};
\ No newline at end of file
index 4a749a6..467f0fa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3e2a=['lodash','json2xls','bluebird','zip-dir','rimraf','../../mysqldb','../../config/logger','argv','savename','update','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','XLSX','Setting','split','splitSizeXlsx','then','query','format','sequelize','num','range','isInteger','forEach','push','%s\x20limit\x20%d\x20OFFSET\x20%d','QueryTypes','SELECT','dirname','basename','length','join','each','xlsx','%s.%s','writeFileSync','binary','zip','zip\x20finished','info','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','catch','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','Failed','util','path'];(function(_0xd368f1,_0xaefc28){var _0x2f27c1=function(_0x1c2d60){while(--_0x1c2d60){_0xd368f1['push'](_0xd368f1['shift']());}};_0x2f27c1(++_0xaefc28);}(_0x3e2a,0x10c));var _0xa3e2=function(_0x131fa2,_0x2e48d2){_0x131fa2=_0x131fa2-0x0;var _0x28a429=_0x3e2a[_0x131fa2];return _0x28a429;};'use strict';var util=require(_0xa3e2('0x0'));var path=require(_0xa3e2('0x1'));var _=require(_0xa3e2('0x2'));var fs=require('fs');var json2xls=require(_0xa3e2('0x3'));var BPromise=require(_0xa3e2('0x4'));var zipdir=require(_0xa3e2('0x5'));var rimraf=require(_0xa3e2('0x6'));var db=require(_0xa3e2('0x7'))['db'];var dbH=require(_0xa3e2('0x7'))['dbH'];var logger=require(_0xa3e2('0x8'))('analytics');var EXTRACTED_REPORT_ID=Number(process[_0xa3e2('0x9')][0x2]);var QUERY=process[_0xa3e2('0x9')][0x3];var PATH=process[_0xa3e2('0x9')][0x4];var EXIT_CODE=0x0;function analyticExtractedReport(_0xb5d12b,_0x1ef5bd){var _0x51fc2d={'status':_0xb5d12b};var _0xb676f7={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x1ef5bd){_0x51fc2d[_0xa3e2('0xa')]=_0x1ef5bd;}return db['AnalyticExtractedReport'][_0xa3e2('0xb')](_0x51fc2d,_0xb676f7);}function main(){var _0x3482d3=0x1388;var _0x522cdb;logger['info'](util['format'](_0xa3e2('0xc'),EXTRACTED_REPORT_ID,_0xa3e2('0xd')));return db[_0xa3e2('0xe')]['find']({'where':{'id':0x1},'raw':!![],'attributes':['id',_0xa3e2('0xf'),_0xa3e2('0x10')]})[_0xa3e2('0x11')](function(_0x48627f){if(_0x48627f){_0x522cdb=_0x48627f;_0x3482d3=_0x522cdb[_0xa3e2('0x10')]||0x1388;}})[_0xa3e2('0x11')](function(){return dbH['sequelize'][_0xa3e2('0x12')](util[_0xa3e2('0x13')]('SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t',QUERY),{'type':dbH[_0xa3e2('0x14')]['QueryTypes']['SELECT']});})[_0xa3e2('0x11')](function(_0x27e259){if(!_0x27e259[0x0][_0xa3e2('0x15')]){return analyticExtractedReport('Empty');}var _0x2dd399=[];var _0x596293=0x0;if(_0x522cdb[_0xa3e2('0xf')]){if(_0x27e259&&_0x27e259['length']){var _0x152de3=_[_0xa3e2('0x16')](_0x27e259[0x0][_0xa3e2('0x15')]/_0x3482d3);var _0x2486c1=Number[_0xa3e2('0x17')](_0x27e259[0x0][_0xa3e2('0x15')]/_0x3482d3)?_0x27e259[0x0]['num']%_0x3482d3:0x0;_0x152de3[_0xa3e2('0x18')](function(_0xd6151a){if(_0xd6151a>0x0){_0x596293+=_0x3482d3;}_0x2dd399[_0xa3e2('0x19')](dbH[_0xa3e2('0x14')][_0xa3e2('0x12')](util[_0xa3e2('0x13')](_0xa3e2('0x1a'),QUERY,_0x3482d3,_0x596293),{'type':dbH[_0xa3e2('0x14')][_0xa3e2('0x1b')]['SELECT']}));});if(_0x2486c1>0x0){_0x596293+=_0x3482d3;_0x2dd399[_0xa3e2('0x19')](dbH['sequelize'][_0xa3e2('0x12')](util[_0xa3e2('0x13')](_0xa3e2('0x1a'),QUERY,_0x2486c1,_0x596293),{'type':dbH['sequelize'][_0xa3e2('0x1b')][_0xa3e2('0x1c')]}));}}}else{_0x2dd399['push'](dbH[_0xa3e2('0x14')][_0xa3e2('0x12')](QUERY,{'type':dbH[_0xa3e2('0x14')]['QueryTypes']['SELECT']}));}var _0x4f07fe=path[_0xa3e2('0x1d')](PATH);var _0x32c1e7=path[_0xa3e2('0x1e')](PATH,'.xlsx');var _0x4e9854=_0x522cdb[_0xa3e2('0xf')]&&_0x2dd399[_0xa3e2('0x1f')]>0x1;var _0xd5af7b=[];if(!fs['existsSync'](path['join'](_0x4f07fe,_0x32c1e7))&&_0x4e9854){fs['mkdirSync'](path[_0xa3e2('0x20')](_0x4f07fe,_0x32c1e7));}return BPromise[_0xa3e2('0x21')](_0x2dd399,function(_0x2bfa82){_0xd5af7b[_0xa3e2('0x19')](_0x2bfa82);})[_0xa3e2('0x11')](function(){for(var _0x217d0b=0x0;_0x217d0b<_0xd5af7b[_0xa3e2('0x1f')];_0x217d0b+=0x1){var _0x2d6d88;var _0x1535a8=_0xd5af7b[_0x217d0b];if(_0x4e9854){_0x2d6d88=path[_0xa3e2('0x20')](_0x4f07fe,_0x32c1e7,util[_0xa3e2('0x13')]('%s%d.%s',_0x32c1e7,_0x217d0b,_0xa3e2('0x22')));}else{_0x2d6d88=path['join'](_0x4f07fe,util[_0xa3e2('0x13')](_0xa3e2('0x23'),_0x32c1e7,'xlsx'));}fs[_0xa3e2('0x24')](_0x2d6d88,json2xls(_0x1535a8),_0xa3e2('0x25'));}})['then'](function(){if(_0x4e9854){return new Promise(function(_0x23efe9){zipdir(path[_0xa3e2('0x20')](_0x4f07fe,_0x32c1e7),{'saveTo':path[_0xa3e2('0x20')](_0x4f07fe,util[_0xa3e2('0x13')](_0xa3e2('0x23'),_0x32c1e7,_0xa3e2('0x26')))},function(_0x43cacb,_0x1d4266){rimraf(path['join'](_0x4f07fe,_0x32c1e7),function(){});_0x23efe9(_0xa3e2('0x27'));});});}})[_0xa3e2('0x11')](function(){logger[_0xa3e2('0x28')](util[_0xa3e2('0x13')](_0xa3e2('0x29'),EXTRACTED_REPORT_ID,'XLSX'));return analyticExtractedReport('Completed',_0x4e9854?util[_0xa3e2('0x13')](_0xa3e2('0x23'),_0x32c1e7,_0x4e9854?_0xa3e2('0x26'):'xlsx'):null);});})[_0xa3e2('0x2a')](function(_0x17e287){logger[_0xa3e2('0x28')](util['format'](_0xa3e2('0x2b'),EXTRACTED_REPORT_ID,'XLSX'),util['inspect'](_0x17e287,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0xa3e2('0x2c'));})['finally'](function(){process['exit'](EXIT_CODE);});}main();
\ No newline at end of file
+var _0xc113=['basename','.xlsx','length','existsSync','join','mkdirSync','each','%s%d.%s','xlsx','%s.%s','binary','zip\x20finished','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','catch','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','XLSX','inspect','finally','exit','util','path','lodash','json2xls','bluebird','zip-dir','rimraf','../../mysqldb','../../config/logger','analytics','argv','update','info','format','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','Setting','find','split','splitSizeXlsx','then','query','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','sequelize','QueryTypes','num','Empty','range','isInteger','forEach','%s\x20limit\x20%d\x20OFFSET\x20%d','push','SELECT'];(function(_0x139254,_0x53097b){var _0x5b1f66=function(_0x2444ab){while(--_0x2444ab){_0x139254['push'](_0x139254['shift']());}};_0x5b1f66(++_0x53097b);}(_0xc113,0x1ab));var _0x3c11=function(_0xd91e4c,_0x5d707f){_0xd91e4c=_0xd91e4c-0x0;var _0x34b657=_0xc113[_0xd91e4c];return _0x34b657;};'use strict';var util=require(_0x3c11('0x0'));var path=require(_0x3c11('0x1'));var _=require(_0x3c11('0x2'));var fs=require('fs');var json2xls=require(_0x3c11('0x3'));var BPromise=require(_0x3c11('0x4'));var zipdir=require(_0x3c11('0x5'));var rimraf=require(_0x3c11('0x6'));var db=require(_0x3c11('0x7'))['db'];var dbH=require(_0x3c11('0x7'))['dbH'];var logger=require(_0x3c11('0x8'))(_0x3c11('0x9'));var EXTRACTED_REPORT_ID=Number(process['argv'][0x2]);var QUERY=process[_0x3c11('0xa')][0x3];var PATH=process[_0x3c11('0xa')][0x4];var EXIT_CODE=0x0;function analyticExtractedReport(_0x2fa44d,_0x5d6f91){var _0x16959a={'status':_0x2fa44d};var _0x4e98c0={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x5d6f91){_0x16959a['savename']=_0x5d6f91;}return db['AnalyticExtractedReport'][_0x3c11('0xb')](_0x16959a,_0x4e98c0);}function main(){var _0x23d4ad=0x1388;var _0x5275df;logger[_0x3c11('0xc')](util[_0x3c11('0xd')](_0x3c11('0xe'),EXTRACTED_REPORT_ID,'XLSX'));return db[_0x3c11('0xf')][_0x3c11('0x10')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0x3c11('0x11'),_0x3c11('0x12')]})[_0x3c11('0x13')](function(_0x58c7c8){if(_0x58c7c8){_0x5275df=_0x58c7c8;_0x23d4ad=_0x5275df[_0x3c11('0x12')]||0x1388;}})[_0x3c11('0x13')](function(){return dbH['sequelize'][_0x3c11('0x14')](util[_0x3c11('0xd')](_0x3c11('0x15'),QUERY),{'type':dbH[_0x3c11('0x16')][_0x3c11('0x17')]['SELECT']});})[_0x3c11('0x13')](function(_0x2ba437){if(!_0x2ba437[0x0][_0x3c11('0x18')]){return analyticExtractedReport(_0x3c11('0x19'));}var _0x1d05f2=[];var _0x5b223f=0x0;if(_0x5275df['split']){if(_0x2ba437&&_0x2ba437['length']){var _0x43ee61=_[_0x3c11('0x1a')](_0x2ba437[0x0][_0x3c11('0x18')]/_0x23d4ad);var _0x42db8d=Number[_0x3c11('0x1b')](_0x2ba437[0x0][_0x3c11('0x18')]/_0x23d4ad)?_0x2ba437[0x0][_0x3c11('0x18')]%_0x23d4ad:0x0;_0x43ee61[_0x3c11('0x1c')](function(_0x3c2a18){if(_0x3c2a18>0x0){_0x5b223f+=_0x23d4ad;}_0x1d05f2['push'](dbH['sequelize'][_0x3c11('0x14')](util['format'](_0x3c11('0x1d'),QUERY,_0x23d4ad,_0x5b223f),{'type':dbH['sequelize'][_0x3c11('0x17')]['SELECT']}));});if(_0x42db8d>0x0){_0x5b223f+=_0x23d4ad;_0x1d05f2[_0x3c11('0x1e')](dbH['sequelize']['query'](util[_0x3c11('0xd')]('%s\x20limit\x20%d\x20OFFSET\x20%d',QUERY,_0x42db8d,_0x5b223f),{'type':dbH[_0x3c11('0x16')][_0x3c11('0x17')][_0x3c11('0x1f')]}));}}}else{_0x1d05f2[_0x3c11('0x1e')](dbH[_0x3c11('0x16')]['query'](QUERY,{'type':dbH[_0x3c11('0x16')]['QueryTypes'][_0x3c11('0x1f')]}));}var _0x414c02=path['dirname'](PATH);var _0x29f3cd=path[_0x3c11('0x20')](PATH,_0x3c11('0x21'));var _0x2df95d=_0x5275df[_0x3c11('0x11')]&&_0x1d05f2[_0x3c11('0x22')]>0x1;var _0x1af1fb=[];if(!fs[_0x3c11('0x23')](path[_0x3c11('0x24')](_0x414c02,_0x29f3cd))&&_0x2df95d){fs[_0x3c11('0x25')](path['join'](_0x414c02,_0x29f3cd));}return BPromise[_0x3c11('0x26')](_0x1d05f2,function(_0x3de4ab){_0x1af1fb[_0x3c11('0x1e')](_0x3de4ab);})[_0x3c11('0x13')](function(){for(var _0x50aec6=0x0;_0x50aec6<_0x1af1fb[_0x3c11('0x22')];_0x50aec6+=0x1){var _0x21401c;var _0x5151b0=_0x1af1fb[_0x50aec6];if(_0x2df95d){_0x21401c=path[_0x3c11('0x24')](_0x414c02,_0x29f3cd,util[_0x3c11('0xd')](_0x3c11('0x27'),_0x29f3cd,_0x50aec6,_0x3c11('0x28')));}else{_0x21401c=path[_0x3c11('0x24')](_0x414c02,util[_0x3c11('0xd')](_0x3c11('0x29'),_0x29f3cd,_0x3c11('0x28')));}fs['writeFileSync'](_0x21401c,json2xls(_0x5151b0),_0x3c11('0x2a'));}})[_0x3c11('0x13')](function(){if(_0x2df95d){return new Promise(function(_0x1ec787){zipdir(path[_0x3c11('0x24')](_0x414c02,_0x29f3cd),{'saveTo':path[_0x3c11('0x24')](_0x414c02,util[_0x3c11('0xd')](_0x3c11('0x29'),_0x29f3cd,'zip'))},function(_0xe9a49f,_0x6db1f0){rimraf(path[_0x3c11('0x24')](_0x414c02,_0x29f3cd),function(){});_0x1ec787(_0x3c11('0x2b'));});});}})[_0x3c11('0x13')](function(){logger[_0x3c11('0xc')](util['format'](_0x3c11('0x2c'),EXTRACTED_REPORT_ID,'XLSX'));return analyticExtractedReport('Completed',_0x2df95d?util[_0x3c11('0xd')](_0x3c11('0x29'),_0x29f3cd,_0x2df95d?'zip':_0x3c11('0x28')):null);});})[_0x3c11('0x2d')](function(_0x19b137){logger['info'](util[_0x3c11('0xd')](_0x3c11('0x2e'),EXTRACTED_REPORT_ID,_0x3c11('0x2f')),util[_0x3c11('0x30')](_0x19b137,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport('Failed');})[_0x3c11('0x31')](function(){process[_0x3c11('0x32')](EXIT_CODE);});}main();
\ No newline at end of file
index f859213..4fbd36a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x056f=['recordingFormat','none','_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','_XCALLY_MIXMONITOR_FORMAT=','wav','XCALLY-MOTION-ANSWER=0','XCALLY-MOTION-PROGRESS=0','MONITOR_OPTIONS=ab','toLowerCase','updatedAt','interval','*,*,*,*','IntervalId','tag','CDR(tag)=','length','$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):Set(CALLERID(all)=','callerID','$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):NoOp(No\x20number\x20available)','answer','indexOf','app','appType','$[${XCALLY-MOTION-ANSWER}=0]?Answer','XCALLY-MOTION-ANSWER=1','$[${XCALLY-MOTION-PROGRESS}=0]?Progress','splice','GotoIfTime',',${EXTEN},','last','concat','transaction','destroy','bulkCreate','sortBy','catch','error','rewrite','lodash','util','models','Interval','findAll','then','intervals','VoiceExtension','uniq','map','exten','CAST(priority\x20AS\x20UNSIGNED)','filter','groupBy','queue','playback','hasOwnProperty','priority','extensions','extension','find','push','Set','format','context','VoiceExtensionId','type','CDR(routeid)=','outbound','cutdigits','${EXTEN:','${EXTEN}','ExecIf','):Goto(','CDR(prefix)=${EXTEN:0:','outboundrouteid='];(function(_0x3c4f40,_0x302e0b){var _0x12032f=function(_0x159d92){while(--_0x159d92){_0x3c4f40['push'](_0x3c4f40['shift']());}};_0x12032f(++_0x302e0b);}(_0x056f,0x198));var _0xf056=function(_0x47570e,_0x3d39ca){_0x47570e=_0x47570e-0x0;var _0x3d1c66=_0x056f[_0x47570e];return _0x3d1c66;};'use strict';var _=require(_0xf056('0x0'));var util=require(_0xf056('0x1'));function rewrite(_0xee00cf,_0x21c6ab){var _0x86300c=this;return _0xee00cf[_0xf056('0x2')][_0xf056('0x3')][_0xf056('0x4')]({'raw':!![]})[_0xf056('0x5')](function(_0xb13d0d){_0x86300c[_0xf056('0x6')]=_0xb13d0d;return _0xee00cf['models'][_0xf056('0x7')][_0xf056('0x4')]({'where':{'IntervalId':_0x21c6ab['IntervalId']},'raw':!![]});})[_0xf056('0x5')](function(_0x59ead8){return _0xee00cf[_0xf056('0x2')][_0xf056('0x7')][_0xf056('0x4')]({'where':{'exten':{'$in':_[_0xf056('0x8')](_[_0xf056('0x9')](_0x59ead8,_0xf056('0xa')))}},'order':[{'raw':_0xf056('0xb')}],'raw':!![]});})[_0xf056('0x5')](function(_0x146d28){var _0x55ec14=_[_0xf056('0xc')](_0x146d28,{'priority':'1'});var _0x19b8d5=_[_0xf056('0xc')](_0x146d28,{'isApp':0x1});var _0x18aa0f=_[_0xf056('0xd')](_0x19b8d5,_0xf056('0xa'));var _0x505a28=[_0xf056('0xe'),_0xf056('0xf')];var _0x4d1ed6=[];var _0x49b08a=[];for(var _0x565b43 in _0x18aa0f){if(_0x18aa0f[_0xf056('0x10')](_0x565b43)){_0x86300c[_0xf056('0x11')]=0x2;_0x86300c[_0xf056('0x12')]=[];_0x86300c[_0xf056('0x13')]=_[_0xf056('0x14')](_0x55ec14,{'exten':_0x18aa0f[_0x565b43][0x0][_0xf056('0xa')]});_0x86300c[_0xf056('0x12')][_0xf056('0x15')]({'type':_0x18aa0f[_0x565b43][0x0]['type'],'app':_0xf056('0x16'),'appdata':util[_0xf056('0x17')]('CDR(type)=%s',_0x18aa0f[_0x565b43][0x0]['type']),'context':_0x18aa0f[_0x565b43][0x0][_0xf056('0x18')],'exten':_0x18aa0f[_0x565b43][0x0][_0xf056('0xa')],'priority':_0x86300c[_0xf056('0x11')]++,'VoiceExtensionId':_0x18aa0f[_0x565b43][0x0][_0xf056('0x19')]});if(_0x18aa0f[_0x565b43][0x0][_0xf056('0x1a')]==='inbound'){_0x86300c[_0xf056('0x12')][_0xf056('0x15')]({'type':_0x18aa0f[_0x565b43][0x0][_0xf056('0x1a')],'app':_0xf056('0x16'),'appdata':_0xf056('0x1b')+_0x18aa0f[_0x565b43][0x0]['VoiceExtensionId'],'context':_0x18aa0f[_0x565b43][0x0][_0xf056('0x18')],'exten':_0x18aa0f[_0x565b43][0x0][_0xf056('0xa')],'priority':_0x86300c[_0xf056('0x11')]++,'VoiceExtensionId':_0x18aa0f[_0x565b43][0x0][_0xf056('0x19')]});}else if(_0x18aa0f[_0x565b43][0x0][_0xf056('0x1a')]===_0xf056('0x1c')){if(_0x86300c['extension']){_0x86300c[_0xf056('0x12')][_0xf056('0x15')]({'type':_0x18aa0f[_0x565b43][0x0]['type'],'app':_0xf056('0x16'),'appdata':'CDR(destination)='+(_0x86300c['extension'][_0xf056('0x1d')]?_0xf056('0x1e')+_0x86300c[_0xf056('0x13')][_0xf056('0x1d')]+'}':_0xf056('0x1f')),'context':_0x18aa0f[_0x565b43][0x0][_0xf056('0x18')],'exten':_0x18aa0f[_0x565b43][0x0][_0xf056('0xa')],'priority':_0x86300c[_0xf056('0x11')]++,'VoiceExtensionId':_0x18aa0f[_0x565b43][0x0]['VoiceExtensionId']});}_0x86300c[_0xf056('0x12')]['push']({'type':_0x18aa0f[_0x565b43][0x0][_0xf056('0x1a')],'app':_0xf056('0x16'),'appdata':_0xf056('0x1b')+_0x18aa0f[_0x565b43][0x0][_0xf056('0x19')],'context':_0x18aa0f[_0x565b43][0x0][_0xf056('0x18')],'exten':_0x18aa0f[_0x565b43][0x0][_0xf056('0xa')],'priority':_0x86300c['priority']++,'VoiceExtensionId':_0x18aa0f[_0x565b43][0x0]['VoiceExtensionId']});var _0x13049e=_0x86300c[_0xf056('0x11')]++;_0x86300c['extensions'][_0xf056('0x15')]({'type':_0x18aa0f[_0x565b43][0x0][_0xf056('0x1a')],'app':_0xf056('0x20'),'appdata':'$[${LEN(${CDR(prefix)})}\x20>\x200]?Goto('+(_0x13049e+0x2)+_0xf056('0x21')+(_0x13049e+0x1)+')','context':_0x18aa0f[_0x565b43][0x0][_0xf056('0x18')],'exten':_0x18aa0f[_0x565b43][0x0][_0xf056('0xa')],'priority':_0x13049e,'VoiceExtensionId':_0x18aa0f[_0x565b43][0x0][_0xf056('0x19')]});if(_0x86300c[_0xf056('0x13')]){_0x86300c[_0xf056('0x12')][_0xf056('0x15')]({'type':_0x18aa0f[_0x565b43][0x0][_0xf056('0x1a')],'app':'Set','appdata':_0x86300c[_0xf056('0x13')][_0xf056('0x1d')]?_0xf056('0x22')+_0x86300c[_0xf056('0x13')]['cutdigits']+'}':'CDR(prefix)=noprefix','context':_0x18aa0f[_0x565b43][0x0][_0xf056('0x18')],'exten':_0x18aa0f[_0x565b43][0x0]['exten'],'priority':_0x86300c[_0xf056('0x11')]++,'VoiceExtensionId':_0x18aa0f[_0x565b43][0x0][_0xf056('0x19')]});}_0x86300c[_0xf056('0x12')][_0xf056('0x15')]({'type':_0x18aa0f[_0x565b43][0x0][_0xf056('0x1a')],'app':_0xf056('0x16'),'appdata':_0xf056('0x23')+_0x18aa0f[_0x565b43][0x0][_0xf056('0x19')],'context':_0x18aa0f[_0x565b43][0x0][_0xf056('0x18')],'exten':_0x18aa0f[_0x565b43][0x0]['exten'],'priority':_0x86300c[_0xf056('0x11')]++,'VoiceExtensionId':_0x18aa0f[_0x565b43][0x0][_0xf056('0x19')]});if(_0x86300c[_0xf056('0x13')]&&_0x86300c[_0xf056('0x13')][_0xf056('0x10')](_0xf056('0x24'))&&_0x86300c[_0xf056('0x13')][_0xf056('0x24')]!==_0xf056('0x25')){_0x86300c[_0xf056('0x12')][_0xf056('0x15')]({'type':_0x18aa0f[_0x565b43][0x0][_0xf056('0x1a')],'app':_0xf056('0x16'),'appdata':_0xf056('0x26'),'context':_0x18aa0f[_0x565b43][0x0][_0xf056('0x18')],'exten':_0x18aa0f[_0x565b43][0x0][_0xf056('0xa')],'priority':_0x86300c[_0xf056('0x11')]++,'VoiceExtensionId':_0x18aa0f[_0x565b43][0x0][_0xf056('0x19')]});_0x86300c[_0xf056('0x12')][_0xf056('0x15')]({'type':_0x18aa0f[_0x565b43][0x0][_0xf056('0x1a')],'app':_0xf056('0x16'),'appdata':_0xf056('0x27')+_0x86300c['extension'][_0xf056('0x24')]||_0xf056('0x28'),'context':_0x18aa0f[_0x565b43][0x0][_0xf056('0x18')],'exten':_0x18aa0f[_0x565b43][0x0]['exten'],'priority':_0x86300c[_0xf056('0x11')]++,'VoiceExtensionId':_0x18aa0f[_0x565b43][0x0][_0xf056('0x19')]});}}_0x86300c['extensions']['push']({'type':_0x18aa0f[_0x565b43][0x0][_0xf056('0x1a')],'app':_0xf056('0x16'),'appdata':_0xf056('0x29'),'context':_0x18aa0f[_0x565b43][0x0][_0xf056('0x18')],'exten':_0x18aa0f[_0x565b43][0x0]['exten'],'priority':_0x86300c[_0xf056('0x11')]++,'VoiceExtensionId':_0x18aa0f[_0x565b43][0x0][_0xf056('0x19')]});_0x86300c[_0xf056('0x12')]['push']({'type':_0x18aa0f[_0x565b43][0x0]['type'],'app':_0xf056('0x16'),'appdata':_0xf056('0x2a'),'context':_0x18aa0f[_0x565b43][0x0][_0xf056('0x18')],'exten':_0x18aa0f[_0x565b43][0x0][_0xf056('0xa')],'priority':_0x86300c[_0xf056('0x11')]++,'VoiceExtensionId':_0x18aa0f[_0x565b43][0x0][_0xf056('0x19')]});_0x86300c[_0xf056('0x12')][_0xf056('0x15')]({'type':_0x18aa0f[_0x565b43][0x0][_0xf056('0x1a')],'app':_0xf056('0x16'),'appdata':_0xf056('0x2b'),'context':_0x18aa0f[_0x565b43][0x0][_0xf056('0x18')],'exten':_0x18aa0f[_0x565b43][0x0]['exten'],'priority':_0x86300c[_0xf056('0x11')]++,'VoiceExtensionId':_0x18aa0f[_0x565b43][0x0]['VoiceExtensionId']});for(var _0x1a5fdd=0x0,_0xf3c5b8=0x0;_0x1a5fdd<_0x18aa0f[_0x565b43]['length'];_0x1a5fdd+=0x1,_0xf3c5b8=0x0){var _0x150383=_0x18aa0f[_0x565b43][_0x1a5fdd];if(_0x150383['type']){_0x150383[_0xf056('0x1a')]=_0x150383[_0xf056('0x1a')][_0xf056('0x2c')]();}var _0x2b1c61=[];var _0x16e806=[];delete _0x150383['id'];delete _0x150383['createdAt'];delete _0x150383[_0xf056('0x2d')];var _0x34899e=_0x150383[_0xf056('0x2e')]!==_0xf056('0x2f')?[_0x150383[_0xf056('0x2e')]]:_0x150383[_0xf056('0x30')]?_[_0xf056('0x9')](_[_0xf056('0xc')](_0x86300c[_0xf056('0x6')],{'IntervalId':_0x150383['IntervalId']}),_0xf056('0x2e')):[];if(_0x150383['hasOwnProperty']('tag')){if(_0x150383[_0xf056('0x31')]&&_0x150383['tag']!=='--'){_0x2b1c61[_0xf056('0x15')]({'type':_0x150383[_0xf056('0x1a')],'app':_0xf056('0x16'),'appdata':_0xf056('0x32')+_0x150383['tag'],'context':_0x150383[_0xf056('0x18')],'exten':_0x150383[_0xf056('0xa')],'priority':_0x34899e[_0xf056('0x33')]+_0x86300c[_0xf056('0x11')]+_0xf3c5b8++,'VoiceExtensionId':_0x150383[_0xf056('0x19')]});}}if(_0x150383[_0xf056('0x1a')]===_0xf056('0x1c')&&_0x150383[_0xf056('0x10')]('callerID')){if(_0x150383['callerID']){_0x2b1c61[_0xf056('0x15')]({'type':_0x150383[_0xf056('0x1a')],'app':'ExecIf','appdata':_0xf056('0x34')+_0x150383[_0xf056('0x35')]+')','context':_0x150383['context'],'exten':_0x150383[_0xf056('0xa')],'priority':_0x34899e[_0xf056('0x33')]+_0x86300c[_0xf056('0x11')]+_0xf3c5b8++,'VoiceExtensionId':_0x150383['VoiceExtensionId']});}else{_0x2b1c61[_0xf056('0x15')]({'type':_0x150383['type'],'app':_0xf056('0x20'),'appdata':_0xf056('0x36'),'context':_0x150383['context'],'exten':_0x150383['exten'],'priority':_0x34899e['length']+_0x86300c[_0xf056('0x11')]+_0xf3c5b8++,'VoiceExtensionId':_0x150383[_0xf056('0x19')]});}}if(_0x150383[_0xf056('0x10')](_0xf056('0x37'))){if(_0x505a28[_0xf056('0x38')](_0x150383[_0xf056('0x39')][_0xf056('0x2c')]())>=0x0&&_0x150383[_0xf056('0x3a')]!=='custom'){if(_0x150383[_0xf056('0x37')]){_0x2b1c61[_0xf056('0x15')]({'type':_0x150383[_0xf056('0x1a')],'app':_0xf056('0x20'),'appdata':_0xf056('0x3b'),'context':_0x150383['context'],'exten':_0x150383[_0xf056('0xa')],'priority':_0x34899e[_0xf056('0x33')]+_0x86300c['priority']+_0xf3c5b8++,'VoiceExtensionId':_0x150383[_0xf056('0x19')]});_0x2b1c61[_0xf056('0x15')]({'type':_0x150383['type'],'app':_0xf056('0x16'),'appdata':_0xf056('0x3c'),'context':_0x150383[_0xf056('0x18')],'exten':_0x150383[_0xf056('0xa')],'priority':_0x34899e[_0xf056('0x33')]+_0x86300c[_0xf056('0x11')]+_0xf3c5b8++,'VoiceExtensionId':_0x150383[_0xf056('0x19')]});}else{_0x2b1c61[_0xf056('0x15')]({'type':_0x150383[_0xf056('0x1a')],'app':_0xf056('0x20'),'appdata':_0xf056('0x3d'),'context':_0x150383[_0xf056('0x18')],'exten':_0x150383[_0xf056('0xa')],'priority':_0x34899e['length']+_0x86300c[_0xf056('0x11')]+_0xf3c5b8++,'VoiceExtensionId':_0x150383[_0xf056('0x19')]});_0x2b1c61['push']({'type':_0x150383[_0xf056('0x1a')],'app':_0xf056('0x16'),'appdata':'XCALLY-MOTION-PROGRESS=1','context':_0x150383[_0xf056('0x18')],'exten':_0x150383['exten'],'priority':_0x34899e['length']+_0x86300c[_0xf056('0x11')]+_0xf3c5b8++,'VoiceExtensionId':_0x150383['VoiceExtensionId']});}}}for(var _0x19f604=0x0;_0x19f604<_0x34899e[_0xf056('0x33')];_0x19f604+=0x1){var _0x1f9c5e=_0x86300c[_0xf056('0x11')]+_0x34899e[_0xf056('0x33')];var _0x508f59=_0x19f604===_0x34899e[_0xf056('0x33')]-0x1?_0x86300c[_0xf056('0x11')]+_0x2b1c61[_0xf056('0x33')]+_0x16e806[_0xf056('0x33')]+0x2:_0x86300c['priority']+_0x19f604+0x1;_0x2b1c61[_0xf056('0x3e')](_0x19f604,0x0,{'type':_0x150383[_0xf056('0x1a')],'app':_0xf056('0x3f'),'appdata':_0x34899e[_0x19f604]+'?'+_0x150383[_0xf056('0x18')]+_0xf056('0x40')+_0x1f9c5e+':'+_0x150383[_0xf056('0x18')]+',${EXTEN},'+_0x508f59,'exten':_0x150383['exten'],'context':_0x150383[_0xf056('0x18')],'priority':_0x86300c['priority']+_0x19f604,'VoiceExtensionId':_0x18aa0f[_0x565b43][0x0][_0xf056('0x19')]});}_0x150383[_0xf056('0x11')]=_0x2b1c61[_0xf056('0x33')]?_[_0xf056('0x41')](_0x2b1c61)[_0xf056('0x11')]+0x1:_0x86300c[_0xf056('0x11')];_0x86300c[_0xf056('0x11')]=(_0x16e806[_0xf056('0x33')]?_['last'](_0x16e806)[_0xf056('0x11')]:_0x150383[_0xf056('0x11')])+0x1;_0x86300c[_0xf056('0x12')]=_['concat'](_0x86300c[_0xf056('0x12')],_0x2b1c61,[_0x150383],_0x16e806);}_0x86300c[_0xf056('0x12')][_0xf056('0x15')]({'type':_0x18aa0f[_0x565b43][0x0][_0xf056('0x1a')],'app':'Hangup','exten':_0x18aa0f[_0x565b43][0x0][_0xf056('0xa')],'context':_0x18aa0f[_0x565b43][0x0][_0xf056('0x18')],'priority':_0x86300c[_0xf056('0x11')],'VoiceExtensionId':_0x18aa0f[_0x565b43][0x0]['VoiceExtensionId']});_0x4d1ed6[_0xf056('0x15')](_0x18aa0f[_0x565b43][0x0][_0xf056('0x19')]);_0x49b08a=_[_0xf056('0x42')](_0x49b08a,_0x86300c[_0xf056('0x12')]);}}return _0xee00cf[_0xf056('0x43')](function(_0xc6fcc3){return _0xee00cf[_0xf056('0x2')][_0xf056('0x7')][_0xf056('0x44')]({'where':{'VoiceExtensionId':{'$in':_0x4d1ed6}},'transaction':_0xc6fcc3})['then'](function(_0x2df146){return _0xee00cf[_0xf056('0x2')][_0xf056('0x7')][_0xf056('0x45')](_[_0xf056('0x46')](_0x49b08a,'priority'),{'transaction':_0xc6fcc3});});});})[_0xf056('0x47')](function(_0x5f2b67){console[_0xf056('0x48')](_0x5f2b67);});}exports[_0xf056('0x49')]=rewrite;
\ No newline at end of file
+var _0x7a88=['format','CDR(type)=%s','context','VoiceExtensionId','inbound','CDR(routeid)=','outbound','CDR(destination)=','cutdigits','${EXTEN:','ExecIf','$[${LEN(${CDR(prefix)})}\x20>\x200]?Goto(','):Goto(','CDR(prefix)=${EXTEN:0:','CDR(prefix)=noprefix','recordingFormat','wav','XCALLY-MOTION-PROGRESS=0','MONITOR_OPTIONS=ab','length','toLowerCase','createdAt','updatedAt','interval','*,*,*,*','IntervalId','intervals','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','$[${XCALLY-MOTION-ANSWER}=0]?Answer','XCALLY-MOTION-ANSWER=1',',${EXTEN},','last','Hangup','concat','destroy','bulkCreate','catch','error','rewrite','lodash','util','Interval','then','models','VoiceExtension','findAll','uniq','CAST(priority\x20AS\x20UNSIGNED)','filter','groupBy','exten','queue','hasOwnProperty','priority','extensions','extension','find','push','type','Set'];(function(_0x5702c6,_0x2c56f7){var _0x5c8757=function(_0x502066){while(--_0x502066){_0x5702c6['push'](_0x5702c6['shift']());}};_0x5c8757(++_0x2c56f7);}(_0x7a88,0x73));var _0x87a8=function(_0x2650de,_0x12c23e){_0x2650de=_0x2650de-0x0;var _0x2db8c0=_0x7a88[_0x2650de];return _0x2db8c0;};'use strict';var _=require(_0x87a8('0x0'));var util=require(_0x87a8('0x1'));function rewrite(_0x164a00,_0x438a57){var _0x2bf87f=this;return _0x164a00['models'][_0x87a8('0x2')]['findAll']({'raw':!![]})[_0x87a8('0x3')](function(_0x4414d4){_0x2bf87f['intervals']=_0x4414d4;return _0x164a00[_0x87a8('0x4')][_0x87a8('0x5')][_0x87a8('0x6')]({'where':{'IntervalId':_0x438a57['IntervalId']},'raw':!![]});})[_0x87a8('0x3')](function(_0x2c4ca0){return _0x164a00[_0x87a8('0x4')][_0x87a8('0x5')][_0x87a8('0x6')]({'where':{'exten':{'$in':_[_0x87a8('0x7')](_['map'](_0x2c4ca0,'exten'))}},'order':[{'raw':_0x87a8('0x8')}],'raw':!![]});})[_0x87a8('0x3')](function(_0x10b728){var _0x131b5a=_[_0x87a8('0x9')](_0x10b728,{'priority':'1'});var _0x4b7f0e=_[_0x87a8('0x9')](_0x10b728,{'isApp':0x1});var _0x5757d9=_[_0x87a8('0xa')](_0x4b7f0e,_0x87a8('0xb'));var _0x196637=[_0x87a8('0xc'),'playback'];var _0x41e5cb=[];var _0x592b01=[];for(var _0x3b738c in _0x5757d9){if(_0x5757d9[_0x87a8('0xd')](_0x3b738c)){_0x2bf87f[_0x87a8('0xe')]=0x2;_0x2bf87f[_0x87a8('0xf')]=[];_0x2bf87f[_0x87a8('0x10')]=_[_0x87a8('0x11')](_0x131b5a,{'exten':_0x5757d9[_0x3b738c][0x0][_0x87a8('0xb')]});_0x2bf87f[_0x87a8('0xf')][_0x87a8('0x12')]({'type':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x13')],'app':_0x87a8('0x14'),'appdata':util[_0x87a8('0x15')](_0x87a8('0x16'),_0x5757d9[_0x3b738c][0x0][_0x87a8('0x13')]),'context':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x17')],'exten':_0x5757d9[_0x3b738c][0x0][_0x87a8('0xb')],'priority':_0x2bf87f['priority']++,'VoiceExtensionId':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x18')]});if(_0x5757d9[_0x3b738c][0x0][_0x87a8('0x13')]===_0x87a8('0x19')){_0x2bf87f[_0x87a8('0xf')][_0x87a8('0x12')]({'type':_0x5757d9[_0x3b738c][0x0]['type'],'app':'Set','appdata':_0x87a8('0x1a')+_0x5757d9[_0x3b738c][0x0]['VoiceExtensionId'],'context':_0x5757d9[_0x3b738c][0x0]['context'],'exten':_0x5757d9[_0x3b738c][0x0][_0x87a8('0xb')],'priority':_0x2bf87f[_0x87a8('0xe')]++,'VoiceExtensionId':_0x5757d9[_0x3b738c][0x0]['VoiceExtensionId']});}else if(_0x5757d9[_0x3b738c][0x0][_0x87a8('0x13')]===_0x87a8('0x1b')){if(_0x2bf87f[_0x87a8('0x10')]){_0x2bf87f[_0x87a8('0xf')][_0x87a8('0x12')]({'type':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x13')],'app':'Set','appdata':_0x87a8('0x1c')+(_0x2bf87f[_0x87a8('0x10')][_0x87a8('0x1d')]?_0x87a8('0x1e')+_0x2bf87f[_0x87a8('0x10')][_0x87a8('0x1d')]+'}':'${EXTEN}'),'context':_0x5757d9[_0x3b738c][0x0]['context'],'exten':_0x5757d9[_0x3b738c][0x0]['exten'],'priority':_0x2bf87f[_0x87a8('0xe')]++,'VoiceExtensionId':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x18')]});}_0x2bf87f[_0x87a8('0xf')][_0x87a8('0x12')]({'type':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x13')],'app':_0x87a8('0x14'),'appdata':_0x87a8('0x1a')+_0x5757d9[_0x3b738c][0x0][_0x87a8('0x18')],'context':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x17')],'exten':_0x5757d9[_0x3b738c][0x0]['exten'],'priority':_0x2bf87f[_0x87a8('0xe')]++,'VoiceExtensionId':_0x5757d9[_0x3b738c][0x0]['VoiceExtensionId']});var _0x20d30b=_0x2bf87f[_0x87a8('0xe')]++;_0x2bf87f[_0x87a8('0xf')][_0x87a8('0x12')]({'type':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x13')],'app':_0x87a8('0x1f'),'appdata':_0x87a8('0x20')+(_0x20d30b+0x2)+_0x87a8('0x21')+(_0x20d30b+0x1)+')','context':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x17')],'exten':_0x5757d9[_0x3b738c][0x0]['exten'],'priority':_0x20d30b,'VoiceExtensionId':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x18')]});if(_0x2bf87f[_0x87a8('0x10')]){_0x2bf87f[_0x87a8('0xf')][_0x87a8('0x12')]({'type':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x13')],'app':'Set','appdata':_0x2bf87f[_0x87a8('0x10')][_0x87a8('0x1d')]?_0x87a8('0x22')+_0x2bf87f['extension'][_0x87a8('0x1d')]+'}':_0x87a8('0x23'),'context':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x17')],'exten':_0x5757d9[_0x3b738c][0x0][_0x87a8('0xb')],'priority':_0x2bf87f[_0x87a8('0xe')]++,'VoiceExtensionId':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x18')]});}_0x2bf87f[_0x87a8('0xf')]['push']({'type':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x13')],'app':'Set','appdata':'outboundrouteid='+_0x5757d9[_0x3b738c][0x0][_0x87a8('0x18')],'context':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x17')],'exten':_0x5757d9[_0x3b738c][0x0][_0x87a8('0xb')],'priority':_0x2bf87f[_0x87a8('0xe')]++,'VoiceExtensionId':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x18')]});if(_0x2bf87f[_0x87a8('0x10')]&&_0x2bf87f['extension'][_0x87a8('0xd')](_0x87a8('0x24'))&&_0x2bf87f['extension'][_0x87a8('0x24')]!=='none'){_0x2bf87f[_0x87a8('0xf')][_0x87a8('0x12')]({'type':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x13')],'app':'Set','appdata':'_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','context':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x17')],'exten':_0x5757d9[_0x3b738c][0x0][_0x87a8('0xb')],'priority':_0x2bf87f[_0x87a8('0xe')]++,'VoiceExtensionId':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x18')]});_0x2bf87f[_0x87a8('0xf')]['push']({'type':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x13')],'app':_0x87a8('0x14'),'appdata':'_XCALLY_MIXMONITOR_FORMAT='+_0x2bf87f[_0x87a8('0x10')]['recordingFormat']||_0x87a8('0x25'),'context':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x17')],'exten':_0x5757d9[_0x3b738c][0x0][_0x87a8('0xb')],'priority':_0x2bf87f['priority']++,'VoiceExtensionId':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x18')]});}}_0x2bf87f[_0x87a8('0xf')][_0x87a8('0x12')]({'type':_0x5757d9[_0x3b738c][0x0]['type'],'app':_0x87a8('0x14'),'appdata':'XCALLY-MOTION-ANSWER=0','context':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x17')],'exten':_0x5757d9[_0x3b738c][0x0][_0x87a8('0xb')],'priority':_0x2bf87f['priority']++,'VoiceExtensionId':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x18')]});_0x2bf87f[_0x87a8('0xf')][_0x87a8('0x12')]({'type':_0x5757d9[_0x3b738c][0x0]['type'],'app':_0x87a8('0x14'),'appdata':_0x87a8('0x26'),'context':_0x5757d9[_0x3b738c][0x0]['context'],'exten':_0x5757d9[_0x3b738c][0x0][_0x87a8('0xb')],'priority':_0x2bf87f[_0x87a8('0xe')]++,'VoiceExtensionId':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x18')]});_0x2bf87f['extensions'][_0x87a8('0x12')]({'type':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x13')],'app':'Set','appdata':_0x87a8('0x27'),'context':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x17')],'exten':_0x5757d9[_0x3b738c][0x0][_0x87a8('0xb')],'priority':_0x2bf87f[_0x87a8('0xe')]++,'VoiceExtensionId':_0x5757d9[_0x3b738c][0x0]['VoiceExtensionId']});for(var _0x4556ce=0x0,_0x5051bb=0x0;_0x4556ce<_0x5757d9[_0x3b738c][_0x87a8('0x28')];_0x4556ce+=0x1,_0x5051bb=0x0){var _0x18e88f=_0x5757d9[_0x3b738c][_0x4556ce];if(_0x18e88f[_0x87a8('0x13')]){_0x18e88f[_0x87a8('0x13')]=_0x18e88f[_0x87a8('0x13')][_0x87a8('0x29')]();}var _0x25885d=[];var _0x4c2dee=[];delete _0x18e88f['id'];delete _0x18e88f[_0x87a8('0x2a')];delete _0x18e88f[_0x87a8('0x2b')];var _0x321938=_0x18e88f[_0x87a8('0x2c')]!==_0x87a8('0x2d')?[_0x18e88f[_0x87a8('0x2c')]]:_0x18e88f[_0x87a8('0x2e')]?_['map'](_[_0x87a8('0x9')](_0x2bf87f[_0x87a8('0x2f')],{'IntervalId':_0x18e88f[_0x87a8('0x2e')]}),_0x87a8('0x2c')):[];if(_0x18e88f['hasOwnProperty'](_0x87a8('0x30'))){if(_0x18e88f[_0x87a8('0x30')]&&_0x18e88f[_0x87a8('0x30')]!=='--'){_0x25885d[_0x87a8('0x12')]({'type':_0x18e88f[_0x87a8('0x13')],'app':_0x87a8('0x14'),'appdata':_0x87a8('0x31')+_0x18e88f[_0x87a8('0x30')],'context':_0x18e88f['context'],'exten':_0x18e88f[_0x87a8('0xb')],'priority':_0x321938[_0x87a8('0x28')]+_0x2bf87f[_0x87a8('0xe')]+_0x5051bb++,'VoiceExtensionId':_0x18e88f['VoiceExtensionId']});}}if(_0x18e88f[_0x87a8('0x13')]===_0x87a8('0x1b')&&_0x18e88f[_0x87a8('0xd')](_0x87a8('0x32'))){if(_0x18e88f[_0x87a8('0x32')]){_0x25885d[_0x87a8('0x12')]({'type':_0x18e88f[_0x87a8('0x13')],'app':_0x87a8('0x1f'),'appdata':_0x87a8('0x33')+_0x18e88f['callerID']+')','context':_0x18e88f[_0x87a8('0x17')],'exten':_0x18e88f['exten'],'priority':_0x321938[_0x87a8('0x28')]+_0x2bf87f[_0x87a8('0xe')]+_0x5051bb++,'VoiceExtensionId':_0x18e88f['VoiceExtensionId']});}else{_0x25885d['push']({'type':_0x18e88f[_0x87a8('0x13')],'app':'ExecIf','appdata':_0x87a8('0x34'),'context':_0x18e88f[_0x87a8('0x17')],'exten':_0x18e88f[_0x87a8('0xb')],'priority':_0x321938[_0x87a8('0x28')]+_0x2bf87f[_0x87a8('0xe')]+_0x5051bb++,'VoiceExtensionId':_0x18e88f[_0x87a8('0x18')]});}}if(_0x18e88f['hasOwnProperty'](_0x87a8('0x35'))){if(_0x196637[_0x87a8('0x36')](_0x18e88f[_0x87a8('0x37')][_0x87a8('0x29')]())>=0x0&&_0x18e88f[_0x87a8('0x38')]!=='custom'){if(_0x18e88f['answer']){_0x25885d[_0x87a8('0x12')]({'type':_0x18e88f['type'],'app':_0x87a8('0x1f'),'appdata':_0x87a8('0x39'),'context':_0x18e88f[_0x87a8('0x17')],'exten':_0x18e88f[_0x87a8('0xb')],'priority':_0x321938['length']+_0x2bf87f['priority']+_0x5051bb++,'VoiceExtensionId':_0x18e88f[_0x87a8('0x18')]});_0x25885d[_0x87a8('0x12')]({'type':_0x18e88f['type'],'app':_0x87a8('0x14'),'appdata':_0x87a8('0x3a'),'context':_0x18e88f['context'],'exten':_0x18e88f[_0x87a8('0xb')],'priority':_0x321938[_0x87a8('0x28')]+_0x2bf87f[_0x87a8('0xe')]+_0x5051bb++,'VoiceExtensionId':_0x18e88f['VoiceExtensionId']});}else{_0x25885d[_0x87a8('0x12')]({'type':_0x18e88f[_0x87a8('0x13')],'app':_0x87a8('0x1f'),'appdata':'$[${XCALLY-MOTION-PROGRESS}=0]?Progress','context':_0x18e88f['context'],'exten':_0x18e88f[_0x87a8('0xb')],'priority':_0x321938['length']+_0x2bf87f[_0x87a8('0xe')]+_0x5051bb++,'VoiceExtensionId':_0x18e88f[_0x87a8('0x18')]});_0x25885d['push']({'type':_0x18e88f[_0x87a8('0x13')],'app':_0x87a8('0x14'),'appdata':'XCALLY-MOTION-PROGRESS=1','context':_0x18e88f['context'],'exten':_0x18e88f['exten'],'priority':_0x321938[_0x87a8('0x28')]+_0x2bf87f['priority']+_0x5051bb++,'VoiceExtensionId':_0x18e88f['VoiceExtensionId']});}}}for(var _0x492d79=0x0;_0x492d79<_0x321938['length'];_0x492d79+=0x1){var _0x40499f=_0x2bf87f[_0x87a8('0xe')]+_0x321938[_0x87a8('0x28')];var _0x525261=_0x492d79===_0x321938['length']-0x1?_0x2bf87f['priority']+_0x25885d[_0x87a8('0x28')]+_0x4c2dee[_0x87a8('0x28')]+0x2:_0x2bf87f[_0x87a8('0xe')]+_0x492d79+0x1;_0x25885d['splice'](_0x492d79,0x0,{'type':_0x18e88f[_0x87a8('0x13')],'app':'GotoIfTime','appdata':_0x321938[_0x492d79]+'?'+_0x18e88f['context']+_0x87a8('0x3b')+_0x40499f+':'+_0x18e88f[_0x87a8('0x17')]+_0x87a8('0x3b')+_0x525261,'exten':_0x18e88f[_0x87a8('0xb')],'context':_0x18e88f[_0x87a8('0x17')],'priority':_0x2bf87f[_0x87a8('0xe')]+_0x492d79,'VoiceExtensionId':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x18')]});}_0x18e88f[_0x87a8('0xe')]=_0x25885d[_0x87a8('0x28')]?_[_0x87a8('0x3c')](_0x25885d)[_0x87a8('0xe')]+0x1:_0x2bf87f['priority'];_0x2bf87f[_0x87a8('0xe')]=(_0x4c2dee['length']?_[_0x87a8('0x3c')](_0x4c2dee)[_0x87a8('0xe')]:_0x18e88f[_0x87a8('0xe')])+0x1;_0x2bf87f[_0x87a8('0xf')]=_['concat'](_0x2bf87f[_0x87a8('0xf')],_0x25885d,[_0x18e88f],_0x4c2dee);}_0x2bf87f[_0x87a8('0xf')][_0x87a8('0x12')]({'type':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x13')],'app':_0x87a8('0x3d'),'exten':_0x5757d9[_0x3b738c][0x0][_0x87a8('0xb')],'context':_0x5757d9[_0x3b738c][0x0][_0x87a8('0x17')],'priority':_0x2bf87f[_0x87a8('0xe')],'VoiceExtensionId':_0x5757d9[_0x3b738c][0x0]['VoiceExtensionId']});_0x41e5cb[_0x87a8('0x12')](_0x5757d9[_0x3b738c][0x0][_0x87a8('0x18')]);_0x592b01=_[_0x87a8('0x3e')](_0x592b01,_0x2bf87f['extensions']);}}return _0x164a00['transaction'](function(_0x44a7d0){return _0x164a00[_0x87a8('0x4')]['VoiceExtension'][_0x87a8('0x3f')]({'where':{'VoiceExtensionId':{'$in':_0x41e5cb}},'transaction':_0x44a7d0})['then'](function(_0x4ad508){return _0x164a00['models']['VoiceExtension'][_0x87a8('0x40')](_['sortBy'](_0x592b01,_0x87a8('0xe')),{'transaction':_0x44a7d0});});});})[_0x87a8('0x41')](function(_0x249216){console[_0x87a8('0x42')](_0x249216);});}exports[_0x87a8('0x43')]=rewrite;
\ No newline at end of file
index c147b94..63fb3cc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x89b9=['../../../config/environment','../../../config/logger','api','redis','defaults','localhost','socket.io-emitter','../../../api/cmContact/cmContact.socket','register','argv','null','Missing\x20filepath\x20parameter!','undefined','Missing\x20binding\x20parameters!','zipObject','split','Missing\x20ListId\x20parameter!','error','contact','test','isNil','The\x20row\x20is\x20empty\x20or\x20the\x20number\x20of\x20parameters\x20does\x20not\x20match\x20the\x20columns!','length','map','errors','message','join','hasOwnProperty','data','firstName\x20not\x20specified!','phone','phone\x20not\x20specified!','birthDate','isValid','birthDate\x20format\x20is\x20invalid,\x20YYYY-MM-DD\x20format\x20is\x20supported!','email','email\x20format\x20is\x20not\x20valid!','ListId','CompanyId','find','Duplicate\x20Contact','CmContact','create','keys','then','pick','catch','Error\x20while\x20creating\x20contact:\x20','stringify','cmContact','checkHopper','inspect','insert','into','fromQuery','scheduledAt','ContactId','createdAt','select','field','toString','NOW()','updatedAt','cm_contacts','where','deletedAt\x20IS\x20NULL','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','from','cm_hopper','\x20=\x20?','ListId\x20=\x20?','str','calleridnum','cm_hopper_final','id\x20IN\x20?','VoiceQueue','findAll','outbound','dialCheckDuplicateType','CmList','Lists','get','always','push','sequelize','query','VoiceQueueId','onlyIfOpen','all','BlackLists','Campaign','CampaignId','cmContact,\x20%s,\x20%s','finally','emit','contact:csv_','resolve','Unable\x20to\x20delete\x20temp\x20file:','exit','info','createReadStream','parse','duplicate','CSV\x20parse\x20error','bluebird','lodash','squel','papaparse','../../../mysqldb'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x89b9,0x1b3));var _0x989b=function(_0x22cbc6,_0x20269a){_0x22cbc6=_0x22cbc6-0x0;var _0xc13fd4=_0x89b9[_0x22cbc6];return _0xc13fd4;};'use strict';var BPromise=require(_0x989b('0x0'));var util=require('util');var _=require(_0x989b('0x1'));var fs=require('fs');var squel=require(_0x989b('0x2'));var Papa=require(_0x989b('0x3'));var Redis=require('ioredis');var db=require(_0x989b('0x4'))['db'];var config=require(_0x989b('0x5'));var logger=require(_0x989b('0x6'))(_0x989b('0x7'));config[_0x989b('0x8')]=_[_0x989b('0x9')](config[_0x989b('0x8')],{'host':_0x989b('0xa'),'port':0x18eb});var socket=require(_0x989b('0xb'))(new Redis(config[_0x989b('0x8')]));require(_0x989b('0xc'))[_0x989b('0xd')](socket);try{if(!process['argv'][0x2]||process[_0x989b('0xe')][0x2]==='undefined'||process[_0x989b('0xe')][0x2]===_0x989b('0xf')){throw new Error(_0x989b('0x10'));}var FILEPATH=process[_0x989b('0xe')][0x2];if(!process['argv'][0x3]||process[_0x989b('0xe')][0x3]==='undefined'||process[_0x989b('0xe')][0x3]===_0x989b('0xf')||!process['argv'][0x4]||process[_0x989b('0xe')][0x4]===_0x989b('0x11')||process[_0x989b('0xe')][0x4]===_0x989b('0xf')){throw new Error(_0x989b('0x12'));}var FIELDS=_[_0x989b('0x13')](process['argv'][0x3][_0x989b('0x14')](','),process['argv'][0x4][_0x989b('0x14')](','));if(!process[_0x989b('0xe')][0x5]||process['argv'][0x5]===_0x989b('0x11')||process[_0x989b('0xe')][0x5]===_0x989b('0xf')){throw new Error(_0x989b('0x15'));}var LISTID=process[_0x989b('0xe')][0x5];var COMPANYID=process['argv'][0x6]&&process[_0x989b('0xe')][0x6]!==_0x989b('0x11')&&process['argv'][0x6]!==_0x989b('0xf')?process['argv'][0x6]:null;var DUPLICATES=process[_0x989b('0xe')][0x7]&&process[_0x989b('0xe')][0x7]!=='undefined'&&process[_0x989b('0xe')][0x7]!==_0x989b('0xf')?process['argv'][0x7]:null;if(!process[_0x989b('0xe')][0x8]||process[_0x989b('0xe')][0x8]===_0x989b('0x11')||process[_0x989b('0xe')][0x8]==='null'){throw new Error('Missing\x20socket_timestamp\x20parameter!');}var SOCKET_TIMESTAMP=process['argv'][0x8];}catch(_0x4c35ed){logger[_0x989b('0x16')](_0x4c35ed);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(_0x37b4bd,_0x50ccc6,_0x2a3ed4,_0xe4e676){var _0x46e99a={'message':_0x50ccc6};_0x46e99a[_0x37b4bd]=!![];if(_0x2a3ed4){_0x46e99a[_0x989b('0x17')]=_0x2a3ed4;}if(_0xe4e676){_0x46e99a['index']=_0xe4e676;}return _0x46e99a;}function isEmail(_0x45f195){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))*$/[_0x989b('0x18')](_0x45f195);}function checkRow(_0x168d61,_0x1628e8,_0x20e0a5){return new BPromise(function(_0xb00dba,_0x3dc2c6){if(_[_0x989b('0x19')](_0x168d61)){return _0x3dc2c6(handleCheckRowError(_0x989b('0x16'),_0x989b('0x1a'),null,_0x20e0a5));}if(_0x168d61['errors']&&_0x168d61['errors'][_0x989b('0x1b')]){var _0x2b51d6=_[_0x989b('0x1c')](_0x168d61[_0x989b('0x1d')],_0x989b('0x1e'))[_0x989b('0x1f')](';');return _0x3dc2c6(handleCheckRowError('error',_0x2b51d6,null,_0x20e0a5));}var _0x30d66e={};for(var _0x4a468d in FIELDS){if(FIELDS[_0x989b('0x20')](_0x4a468d)&&FIELDS[_0x4a468d]){_0x30d66e[_0x4a468d]=_0x168d61[_0x989b('0x21')][0x0][FIELDS[_0x4a468d]]||_0x168d61['data'][0x0]['\ufeff'+FIELDS[_0x4a468d]];}}if(!_0x30d66e['firstName']){return _0x3dc2c6(handleCheckRowError(_0x989b('0x16'),_0x989b('0x22'),null,_0x20e0a5));}if(!_0x30d66e[_0x989b('0x23')]){return _0x3dc2c6(handleCheckRowError(_0x989b('0x16'),_0x989b('0x24'),null,_0x20e0a5));}if(_0x30d66e[_0x989b('0x25')]){var _0x3929eb=moment(_0x30d66e[_0x989b('0x25')],'YYYY-MM-DD');if(!_0x3929eb[_0x989b('0x26')]()){return _0x3dc2c6(handleCheckRowError(_0x989b('0x16'),_0x989b('0x27'),null,_0x20e0a5));}}if(_0x30d66e['email']){if(!isEmail(_0x30d66e[_0x989b('0x28')])){return _0x3dc2c6(handleCheckRowError(_0x989b('0x16'),_0x989b('0x29'),null,_0x20e0a5));}}_0x30d66e[_0x989b('0x2a')]=LISTID;_0x30d66e[_0x989b('0x2b')]=COMPANYID||undefined;if(DUPLICATES&&DUPLICATES['length']&&_0x1628e8){var _0x50eded={};for(var _0x5589da=0x0,_0xf0c8ae=DUPLICATES[_0x989b('0x1b')];_0x5589da<_0xf0c8ae;_0x5589da+=0x1){_0x50eded[DUPLICATES[_0x5589da]]=_0x30d66e[DUPLICATES[_0x5589da]];}var _0x18949e=_[_0x989b('0x2c')](_0x1628e8,_0x50eded);if(_0x18949e){return _0x3dc2c6(handleCheckRowError('duplicate',_0x989b('0x2d'),_0x18949e,_0x20e0a5));}}return db[_0x989b('0x2e')][_0x989b('0x2f')](_0x30d66e,{'raw':!![],'hooks':![],'fields':_[_0x989b('0x30')](_0x30d66e)})[_0x989b('0x31')](function(_0x57dc2){if(DUPLICATES&&DUPLICATES[_0x989b('0x1b')]&&_0x1628e8){_0x1628e8['push'](_[_0x989b('0x32')](_0x30d66e,DUPLICATES));}hopperContacts+=(hopperContacts?',':'')+_0x57dc2['id'];return _0xb00dba();})[_0x989b('0x33')](function(_0x564ce6){return _0x3dc2c6(handleCheckRowError(_0x989b('0x16'),_0x989b('0x34')+(_0x564ce6[_0x989b('0x1e')]||JSON[_0x989b('0x35')](_0x564ce6)),null,_0x20e0a5));});});}function checkHopper(){function _0xe7610e(){return function(_0x21102b){logger['error'](_0x989b('0x36'),_0x989b('0x37'),util[_0x989b('0x38')](_0x21102b,{'showHidden':![],'depth':null}));};}var _0x51b1ac=function(_0x458dd8,_0x414efa){var _0x5ad0b7=squel[_0x989b('0x39')]()[_0x989b('0x3a')]('cm_hopper')[_0x989b('0x3b')](['phone',_0x989b('0x3c'),_0x989b('0x3d'),_0x989b('0x2a'),_0x414efa,_0x989b('0x3e'),'updatedAt'],squel[_0x989b('0x3f')]()[_0x989b('0x40')](_0x989b('0x23'),_0x989b('0x23'))['field']('NOW()',_0x989b('0x3c'))['field']('id',_0x989b('0x3d'))[_0x989b('0x40')](LISTID[_0x989b('0x41')](),_0x989b('0x2a'))[_0x989b('0x40')](_0x458dd8['id']['toString'](),_0x414efa)[_0x989b('0x40')](_0x989b('0x42'),'createdAt')[_0x989b('0x40')]('NOW()',_0x989b('0x43'))['from'](_0x989b('0x44'))[_0x989b('0x45')](_0x989b('0x46'))['where']('ListId\x20=\x20?',LISTID['toString']())[_0x989b('0x45')](_0x989b('0x47'))[_0x989b('0x45')](_0x989b('0x48'),squel[_0x989b('0x3f')]()[_0x989b('0x40')](_0x989b('0x23'))[_0x989b('0x49')](_0x989b('0x4a'))[_0x989b('0x45')](_0x414efa+_0x989b('0x4b'),_0x458dd8['id']['toString']())))['toString']();return _0x5ad0b7;};var _0x52bd21=function(_0x4211a6,_0x5710d4){var _0x543aec=squel[_0x989b('0x39')]()[_0x989b('0x3a')]('cm_hopper')['fromQuery']([_0x989b('0x23'),'scheduledAt','ContactId',_0x989b('0x2a'),_0x5710d4,_0x989b('0x3e'),_0x989b('0x43')],squel['select']()[_0x989b('0x40')](_0x989b('0x23'),_0x989b('0x23'))[_0x989b('0x40')]('NOW()',_0x989b('0x3c'))[_0x989b('0x40')]('id',_0x989b('0x3d'))[_0x989b('0x40')](LISTID[_0x989b('0x41')](),_0x989b('0x2a'))[_0x989b('0x40')](_0x4211a6['id']['toString'](),_0x5710d4)[_0x989b('0x40')](_0x989b('0x42'),'createdAt')['field'](_0x989b('0x42'),'updatedAt')[_0x989b('0x49')](_0x989b('0x44'))[_0x989b('0x45')](_0x989b('0x46'))[_0x989b('0x45')](_0x989b('0x4c'),LISTID[_0x989b('0x41')]())[_0x989b('0x45')]('id\x20IN\x20?',squel[_0x989b('0x4d')](hopperContacts))[_0x989b('0x45')]('phone\x20IS\x20NOT\x20NULL')[_0x989b('0x45')](_0x989b('0x48'),squel['select']()[_0x989b('0x40')](_0x989b('0x4e'))[_0x989b('0x49')](_0x989b('0x4f'))[_0x989b('0x45')](_0x5710d4+_0x989b('0x4b'),_0x4211a6['id'][_0x989b('0x41')]()))[_0x989b('0x45')]('phone\x20NOT\x20IN\x20(?)',squel[_0x989b('0x3f')]()[_0x989b('0x40')](_0x989b('0x23'))[_0x989b('0x49')](_0x989b('0x4a'))[_0x989b('0x45')](_0x5710d4+_0x989b('0x4b'),_0x4211a6['id']['toString']())))['toString']();return _0x543aec;};function _0x1996e1(_0x583249,_0x3cb728){var _0x2e7557=squel[_0x989b('0x39')]()['into'](_0x989b('0x4a'))[_0x989b('0x3b')]([_0x989b('0x23'),_0x989b('0x3c'),'ContactId',_0x989b('0x2a'),_0x3cb728,'createdAt',_0x989b('0x43')],squel[_0x989b('0x3f')]()[_0x989b('0x40')](_0x989b('0x23'),'phone')[_0x989b('0x40')](_0x989b('0x42'),_0x989b('0x3c'))[_0x989b('0x40')]('id',_0x989b('0x3d'))[_0x989b('0x40')](LISTID[_0x989b('0x41')](),_0x989b('0x2a'))[_0x989b('0x40')](_0x583249['id'][_0x989b('0x41')](),_0x3cb728)[_0x989b('0x40')]('NOW()',_0x989b('0x3e'))[_0x989b('0x40')](_0x989b('0x42'),'updatedAt')[_0x989b('0x49')](_0x989b('0x44'))['where'](_0x989b('0x46'))[_0x989b('0x45')]('ListId\x20=\x20?',LISTID['toString']())[_0x989b('0x45')](_0x989b('0x50'),squel[_0x989b('0x4d')](hopperContacts))[_0x989b('0x45')](_0x989b('0x47')))[_0x989b('0x41')]();return _0x2e7557;}function _0x2bfcc4(_0x4bbb93,_0xa270cc){var _0x50bcc7=squel[_0x989b('0x39')]()[_0x989b('0x3a')]('cm_hopper_black')[_0x989b('0x3b')]([_0x989b('0x23'),'ContactId',_0x989b('0x2a'),_0xa270cc,'createdAt','updatedAt'],squel[_0x989b('0x3f')]()['field'](_0x989b('0x23'),'phone')[_0x989b('0x40')]('id',_0x989b('0x3d'))[_0x989b('0x40')](LISTID['toString'](),_0x989b('0x2a'))['field'](_0x4bbb93['id'][_0x989b('0x41')](),_0xa270cc)['field'](_0x989b('0x42'),_0x989b('0x3e'))[_0x989b('0x40')]('NOW()',_0x989b('0x43'))['from']('cm_contacts')[_0x989b('0x45')]('deletedAt\x20IS\x20NULL')[_0x989b('0x45')]('ListId\x20=\x20?',LISTID['toString']())[_0x989b('0x45')](_0x989b('0x50'),squel[_0x989b('0x4d')](hopperContacts))['where'](_0x989b('0x47')))['toString']();return _0x50bcc7;}return db[_0x989b('0x51')][_0x989b('0x52')]({'where':{'type':_0x989b('0x53')},'attributes':['id',_0x989b('0x54')],'include':[{'model':db[_0x989b('0x55')],'as':_0x989b('0x56'),'where':{'id':LISTID}}]})[_0x989b('0x31')](function(_0xee8777){var _0x5ee715=[];if(_0xee8777){var _0x52d076;for(var _0x19bde0=0x0,_0x2ea34c;_0x19bde0<_0xee8777[_0x989b('0x1b')];_0x19bde0+=0x1){_0x2ea34c=_0xee8777[_0x19bde0][_0x989b('0x57')]({'plain':!![]});switch(_0x2ea34c[_0x989b('0x54')]){case _0x989b('0x58'):_0x5ee715[_0x989b('0x59')](db[_0x989b('0x5a')][_0x989b('0x5b')](_0x52bd21(_0x2ea34c,_0x989b('0x5c')))[_0x989b('0x31')](function(){})[_0x989b('0x33')](_0xe7610e()));break;case _0x989b('0x5d'):_0x5ee715['push'](db[_0x989b('0x5a')]['query'](_0x51b1ac(_0x2ea34c,_0x989b('0x5c')))[_0x989b('0x31')](function(){})[_0x989b('0x33')](_0xe7610e()));break;default:_0x5ee715[_0x989b('0x59')](db[_0x989b('0x5a')][_0x989b('0x5b')](_0x1996e1(_0x2ea34c,_0x989b('0x5c')))[_0x989b('0x31')](function(){})['catch'](_0xe7610e()));}}}return _0x5ee715;})[_0x989b('0x5e')]()[_0x989b('0x31')](function(){return db[_0x989b('0x51')][_0x989b('0x52')]({'where':{'type':_0x989b('0x53')},'attributes':['id'],'include':[{'model':db['CmList'],'as':_0x989b('0x5f'),'where':{'id':LISTID}}]})[_0x989b('0x31')](function(_0x2d9f99){var _0x2b24fb=[];if(_0x2d9f99){var _0x5e2a31;for(var _0x597014=0x0,_0x3dc6ae;_0x597014<_0x2d9f99[_0x989b('0x1b')];_0x597014+=0x1){_0x3dc6ae=_0x2d9f99[_0x597014]['get']({'plain':!![]});_0x2b24fb[_0x989b('0x59')](db['sequelize']['query'](_0x2bfcc4(_0x3dc6ae,_0x989b('0x5c')))[_0x989b('0x31')](function(){})['catch'](_0xe7610e()));}}return _0x2b24fb;})[_0x989b('0x5e')]();})[_0x989b('0x31')](function(){return db[_0x989b('0x60')][_0x989b('0x52')]({'attributes':['id','dialCheckDuplicateType'],'include':[{'model':db[_0x989b('0x55')],'as':_0x989b('0x56'),'where':{'id':LISTID}}]})[_0x989b('0x31')](function(_0x1ae532){var _0x3d7909=[];if(_0x1ae532){for(var _0x25eaba=0x0,_0x519370;_0x25eaba<_0x1ae532['length'];_0x25eaba+=0x1){_0x519370=_0x1ae532[_0x25eaba]['get']({'plain':!![]});switch(_0x519370[_0x989b('0x54')]){case _0x989b('0x58'):_0x3d7909['push'](db[_0x989b('0x5a')]['query'](_0x52bd21(_0x519370,_0x989b('0x61')))[_0x989b('0x31')](function(){})[_0x989b('0x33')](_0xe7610e()));break;case _0x989b('0x5d'):_0x3d7909['push'](db['sequelize'][_0x989b('0x5b')](_0x51b1ac(_0x519370,'CampaignId'))['then'](function(){})['catch'](_0xe7610e()));break;default:_0x3d7909[_0x989b('0x59')](db[_0x989b('0x5a')][_0x989b('0x5b')](_0x1996e1(_0x519370,_0x989b('0x61')))[_0x989b('0x31')](function(){})[_0x989b('0x33')](_0xe7610e()));}}}return _0x3d7909;})[_0x989b('0x5e')]();})['then'](function(){return db[_0x989b('0x60')][_0x989b('0x52')]({'attributes':['id'],'include':[{'model':db[_0x989b('0x55')],'as':'BlackLists','where':{'id':LISTID}}]})[_0x989b('0x31')](function(_0x554ad8){var _0x2ddb6a=[];if(_0x554ad8){for(var _0x2c0dd5=0x0,_0x137a66;_0x2c0dd5<_0x554ad8['length'];_0x2c0dd5+=0x1){_0x137a66=_0x554ad8[_0x2c0dd5]['get']({'plain':!![]});_0x2ddb6a[_0x989b('0x59')](db[_0x989b('0x5a')][_0x989b('0x5b')](_0x2bfcc4(_0x137a66,_0x989b('0x61')))['then'](function(){})[_0x989b('0x33')](_0xe7610e()));}}return _0x2ddb6a;})[_0x989b('0x5e')]();})[_0x989b('0x33')](function(_0x1d1a18){logger['error'](_0x989b('0x62'),'generalCheckHopper',_0x1d1a18[_0x989b('0x1e')]);});}var processPromises=function(_0x57f809){return BPromise['all'](promises)[_0x989b('0x31')](function(_0x16ae2c){})[_0x989b('0x33')](function(_0x51a08a){logger['error']('Error\x20processing\x20rows\x20block:',JSON[_0x989b('0x35')](_0x51a08a));})[_0x989b('0x63')](function(){socket[_0x989b('0x64')](_0x989b('0x65')+SOCKET_TIMESTAMP,{'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});promises=[];success=0x0;errors=0x0;duplicates=0x0;rows=[];if(_0x57f809){return _0x57f809['resume']();}});};var endCsv=function(){return BPromise[_0x989b('0x66')]()[_0x989b('0x31')](function(){if(hopperContacts){return checkHopper();}})[_0x989b('0x31')](function(){socket['emit']('contact:csv_'+SOCKET_TIMESTAMP,{'finished':!![],'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});try{fs['unlinkSync'](FILEPATH);}catch(_0x44c0de){logger['error'](_0x989b('0x67'),JSON[_0x989b('0x35')](_0x44c0de));}finally{process[_0x989b('0x68')](0x0);}});};process['on']('SIGINT',function(){logger[_0x989b('0x69')]('CSV\x20import\x20process\x20stopped!');endCsv();});function main(){return BPromise[_0x989b('0x66')]()[_0x989b('0x31')](function(){if(DUPLICATES){DUPLICATES=DUPLICATES[_0x989b('0x14')](',');return db[_0x989b('0x2e')][_0x989b('0x52')]({'where':{'ListId':LISTID},'attributes':DUPLICATES,'raw':!![]});}})['then'](function(_0x20696d){var _0x450bca=fs[_0x989b('0x6a')](FILEPATH,{'highWaterMark':0xf*0x400*0x400});Papa[_0x989b('0x6b')](_0x450bca,{'header':!![],'skipEmptyLines':!![],'step':function(_0x558c0b,_0x4d1b74){total+=0x1;var _0x521b68=total;promises['push'](checkRow(_0x558c0b,_0x20696d,_0x521b68)[_0x989b('0x31')](function(){success+=0x1;})['catch'](function(_0x94b7ec){if(_0x94b7ec[_0x989b('0x16')]){errors+=0x1;delete _0x94b7ec[_0x989b('0x16')];}else if(_0x94b7ec['duplicate']){duplicates+=0x1;delete _0x94b7ec[_0x989b('0x6c')];}rows[_0x989b('0x59')](_0x94b7ec);}));if(total%0xc8===0x0){_0x4d1b74['pause']();return processPromises(_0x4d1b74);}},'complete':function(){return processPromises()[_0x989b('0x31')](function(){logger['info']('CSV\x20parsed\x20correctly!');endCsv();});},'error':function(_0x4693b6,_0x437782){logger[_0x989b('0x69')](_0x989b('0x6d'),JSON[_0x989b('0x35')](_0x4693b6));endCsv();}});})[_0x989b('0x33')](function(_0x4566c5){logger[_0x989b('0x16')]('Error\x20executing\x20contact\x20csv\x20import:',JSON[_0x989b('0x35')](_0x4566c5));});}main();
\ No newline at end of file
+var _0xb919=['email','ListId','find','duplicate','Duplicate\x20Contact','CmContact','create','keys','push','pick','catch','Error\x20while\x20creating\x20contact:\x20','stringify','cmContact','checkHopper','inspect','insert','cm_hopper','fromQuery','scheduledAt','ContactId','createdAt','updatedAt','select','field','NOW()','toString','from','cm_contacts','ListId\x20=\x20?','where','phone\x20IS\x20NOT\x20NULL','\x20=\x20?','into','deletedAt\x20IS\x20NULL','id\x20IN\x20?','phone\x20NOT\x20IN\x20(?)','calleridnum','cm_hopper_final','str','cm_hopper_black','VoiceQueue','findAll','outbound','CmList','Lists','then','get','dialCheckDuplicateType','sequelize','query','onlyIfOpen','VoiceQueueId','all','always','CampaignId','BlackLists','cmContact,\x20%s,\x20%s','generalCheckHopper','Error\x20processing\x20rows\x20block:','emit','contact:csv_','resume','resolve','unlinkSync','exit','SIGINT','info','CSV\x20import\x20process\x20stopped!','createReadStream','pause','CSV\x20parsed\x20correctly!','CSV\x20parse\x20error','Error\x20executing\x20contact\x20csv\x20import:','bluebird','util','squel','papaparse','ioredis','../../../config/environment','../../../config/logger','redis','../../../api/cmContact/cmContact.socket','register','argv','undefined','null','zipObject','split','Missing\x20ListId\x20parameter!','Missing\x20socket_timestamp\x20parameter!','error','contact','index','test','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','phone\x20not\x20specified!','birthDate','YYYY-MM-DD','birthDate\x20format\x20is\x20invalid,\x20YYYY-MM-DD\x20format\x20is\x20supported!'];(function(_0x1aba25,_0x1faed1){var _0x47d997=function(_0x4f9e11){while(--_0x4f9e11){_0x1aba25['push'](_0x1aba25['shift']());}};_0x47d997(++_0x1faed1);}(_0xb919,0x191));var _0x9b91=function(_0x3c0f35,_0x44051a){_0x3c0f35=_0x3c0f35-0x0;var _0x1de893=_0xb919[_0x3c0f35];return _0x1de893;};'use strict';var BPromise=require(_0x9b91('0x0'));var util=require(_0x9b91('0x1'));var _=require('lodash');var fs=require('fs');var squel=require(_0x9b91('0x2'));var Papa=require(_0x9b91('0x3'));var Redis=require(_0x9b91('0x4'));var db=require('../../../mysqldb')['db'];var config=require(_0x9b91('0x5'));var logger=require(_0x9b91('0x6'))('api');config[_0x9b91('0x7')]=_['defaults'](config[_0x9b91('0x7')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x9b91('0x7')]));require(_0x9b91('0x8'))[_0x9b91('0x9')](socket);try{if(!process[_0x9b91('0xa')][0x2]||process[_0x9b91('0xa')][0x2]===_0x9b91('0xb')||process[_0x9b91('0xa')][0x2]==='null'){throw new Error('Missing\x20filepath\x20parameter!');}var FILEPATH=process[_0x9b91('0xa')][0x2];if(!process[_0x9b91('0xa')][0x3]||process['argv'][0x3]===_0x9b91('0xb')||process[_0x9b91('0xa')][0x3]==='null'||!process[_0x9b91('0xa')][0x4]||process[_0x9b91('0xa')][0x4]==='undefined'||process[_0x9b91('0xa')][0x4]===_0x9b91('0xc')){throw new Error('Missing\x20binding\x20parameters!');}var FIELDS=_[_0x9b91('0xd')](process[_0x9b91('0xa')][0x3][_0x9b91('0xe')](','),process[_0x9b91('0xa')][0x4][_0x9b91('0xe')](','));if(!process[_0x9b91('0xa')][0x5]||process[_0x9b91('0xa')][0x5]===_0x9b91('0xb')||process[_0x9b91('0xa')][0x5]===_0x9b91('0xc')){throw new Error(_0x9b91('0xf'));}var LISTID=process[_0x9b91('0xa')][0x5];var COMPANYID=process[_0x9b91('0xa')][0x6]&&process[_0x9b91('0xa')][0x6]!==_0x9b91('0xb')&&process[_0x9b91('0xa')][0x6]!==_0x9b91('0xc')?process[_0x9b91('0xa')][0x6]:null;var DUPLICATES=process[_0x9b91('0xa')][0x7]&&process[_0x9b91('0xa')][0x7]!==_0x9b91('0xb')&&process['argv'][0x7]!==_0x9b91('0xc')?process[_0x9b91('0xa')][0x7]:null;if(!process[_0x9b91('0xa')][0x8]||process[_0x9b91('0xa')][0x8]===_0x9b91('0xb')||process['argv'][0x8]===_0x9b91('0xc')){throw new Error(_0x9b91('0x10'));}var SOCKET_TIMESTAMP=process[_0x9b91('0xa')][0x8];}catch(_0x852cfe){logger[_0x9b91('0x11')](_0x852cfe);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(_0x32950f,_0x36c659,_0x50f960,_0x4c2d4){var _0x3cda3b={'message':_0x36c659};_0x3cda3b[_0x32950f]=!![];if(_0x50f960){_0x3cda3b[_0x9b91('0x12')]=_0x50f960;}if(_0x4c2d4){_0x3cda3b[_0x9b91('0x13')]=_0x4c2d4;}return _0x3cda3b;}function isEmail(_0x277160){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))*$/[_0x9b91('0x14')](_0x277160);}function checkRow(_0x22ec99,_0x307874,_0x45af00){return new BPromise(function(_0x5bb8e3,_0xf6b558){if(_['isNil'](_0x22ec99)){return _0xf6b558(handleCheckRowError('error',_0x9b91('0x15'),null,_0x45af00));}if(_0x22ec99[_0x9b91('0x16')]&&_0x22ec99[_0x9b91('0x16')][_0x9b91('0x17')]){var _0x3c833d=_[_0x9b91('0x18')](_0x22ec99[_0x9b91('0x16')],_0x9b91('0x19'))[_0x9b91('0x1a')](';');return _0xf6b558(handleCheckRowError(_0x9b91('0x11'),_0x3c833d,null,_0x45af00));}var _0x1bb21d={};for(var _0x5c0c59 in FIELDS){if(FIELDS['hasOwnProperty'](_0x5c0c59)&&FIELDS[_0x5c0c59]){_0x1bb21d[_0x5c0c59]=_0x22ec99[_0x9b91('0x1b')][0x0][FIELDS[_0x5c0c59]]||_0x22ec99['data'][0x0]['\ufeff'+FIELDS[_0x5c0c59]];}}if(!_0x1bb21d[_0x9b91('0x1c')]){return _0xf6b558(handleCheckRowError(_0x9b91('0x11'),_0x9b91('0x1d'),null,_0x45af00));}if(!_0x1bb21d[_0x9b91('0x1e')]){return _0xf6b558(handleCheckRowError(_0x9b91('0x11'),_0x9b91('0x1f'),null,_0x45af00));}if(_0x1bb21d[_0x9b91('0x20')]){var _0x5be807=moment(_0x1bb21d[_0x9b91('0x20')],_0x9b91('0x21'));if(!_0x5be807['isValid']()){return _0xf6b558(handleCheckRowError('error',_0x9b91('0x22'),null,_0x45af00));}}if(_0x1bb21d[_0x9b91('0x23')]){if(!isEmail(_0x1bb21d['email'])){return _0xf6b558(handleCheckRowError(_0x9b91('0x11'),'email\x20format\x20is\x20not\x20valid!',null,_0x45af00));}}_0x1bb21d[_0x9b91('0x24')]=LISTID;_0x1bb21d['CompanyId']=COMPANYID||undefined;if(DUPLICATES&&DUPLICATES[_0x9b91('0x17')]&&_0x307874){var _0x4e97fe={};for(var _0x28a3d9=0x0,_0x5916c9=DUPLICATES[_0x9b91('0x17')];_0x28a3d9<_0x5916c9;_0x28a3d9+=0x1){_0x4e97fe[DUPLICATES[_0x28a3d9]]=_0x1bb21d[DUPLICATES[_0x28a3d9]];}var _0x91f2b2=_[_0x9b91('0x25')](_0x307874,_0x4e97fe);if(_0x91f2b2){return _0xf6b558(handleCheckRowError(_0x9b91('0x26'),_0x9b91('0x27'),_0x91f2b2,_0x45af00));}}return db[_0x9b91('0x28')][_0x9b91('0x29')](_0x1bb21d,{'raw':!![],'hooks':![],'fields':_[_0x9b91('0x2a')](_0x1bb21d)})['then'](function(_0x52f8dd){if(DUPLICATES&&DUPLICATES[_0x9b91('0x17')]&&_0x307874){_0x307874[_0x9b91('0x2b')](_[_0x9b91('0x2c')](_0x1bb21d,DUPLICATES));}hopperContacts+=(hopperContacts?',':'')+_0x52f8dd['id'];return _0x5bb8e3();})[_0x9b91('0x2d')](function(_0x51413b){return _0xf6b558(handleCheckRowError(_0x9b91('0x11'),_0x9b91('0x2e')+(_0x51413b[_0x9b91('0x19')]||JSON[_0x9b91('0x2f')](_0x51413b)),null,_0x45af00));});});}function checkHopper(){function _0x1ec312(){return function(_0x5ed6a2){logger['error'](_0x9b91('0x30'),_0x9b91('0x31'),util[_0x9b91('0x32')](_0x5ed6a2,{'showHidden':![],'depth':null}));};}var _0x8cf86b=function(_0x5569f3,_0x35263f){var _0x4e4a09=squel[_0x9b91('0x33')]()['into'](_0x9b91('0x34'))[_0x9b91('0x35')]([_0x9b91('0x1e'),_0x9b91('0x36'),_0x9b91('0x37'),_0x9b91('0x24'),_0x35263f,_0x9b91('0x38'),_0x9b91('0x39')],squel[_0x9b91('0x3a')]()['field'](_0x9b91('0x1e'),'phone')[_0x9b91('0x3b')](_0x9b91('0x3c'),_0x9b91('0x36'))[_0x9b91('0x3b')]('id','ContactId')[_0x9b91('0x3b')](LISTID[_0x9b91('0x3d')](),_0x9b91('0x24'))[_0x9b91('0x3b')](_0x5569f3['id'][_0x9b91('0x3d')](),_0x35263f)[_0x9b91('0x3b')]('NOW()',_0x9b91('0x38'))[_0x9b91('0x3b')](_0x9b91('0x3c'),_0x9b91('0x39'))[_0x9b91('0x3e')](_0x9b91('0x3f'))['where']('deletedAt\x20IS\x20NULL')['where'](_0x9b91('0x40'),LISTID['toString']())[_0x9b91('0x41')](_0x9b91('0x42'))['where']('phone\x20NOT\x20IN\x20(?)',squel[_0x9b91('0x3a')]()[_0x9b91('0x3b')](_0x9b91('0x1e'))['from'](_0x9b91('0x34'))[_0x9b91('0x41')](_0x35263f+_0x9b91('0x43'),_0x5569f3['id'][_0x9b91('0x3d')]())))[_0x9b91('0x3d')]();return _0x4e4a09;};var _0x827288=function(_0x582bbe,_0x593b16){var _0x5c2e21=squel[_0x9b91('0x33')]()[_0x9b91('0x44')](_0x9b91('0x34'))[_0x9b91('0x35')]([_0x9b91('0x1e'),'scheduledAt',_0x9b91('0x37'),_0x9b91('0x24'),_0x593b16,_0x9b91('0x38'),'updatedAt'],squel['select']()[_0x9b91('0x3b')](_0x9b91('0x1e'),_0x9b91('0x1e'))['field'](_0x9b91('0x3c'),_0x9b91('0x36'))[_0x9b91('0x3b')]('id','ContactId')['field'](LISTID[_0x9b91('0x3d')](),_0x9b91('0x24'))['field'](_0x582bbe['id']['toString'](),_0x593b16)['field']('NOW()',_0x9b91('0x38'))[_0x9b91('0x3b')]('NOW()','updatedAt')[_0x9b91('0x3e')](_0x9b91('0x3f'))['where'](_0x9b91('0x45'))['where']('ListId\x20=\x20?',LISTID[_0x9b91('0x3d')]())[_0x9b91('0x41')](_0x9b91('0x46'),squel['str'](hopperContacts))['where'](_0x9b91('0x42'))[_0x9b91('0x41')](_0x9b91('0x47'),squel[_0x9b91('0x3a')]()[_0x9b91('0x3b')](_0x9b91('0x48'))[_0x9b91('0x3e')](_0x9b91('0x49'))['where'](_0x593b16+'\x20=\x20?',_0x582bbe['id'][_0x9b91('0x3d')]()))[_0x9b91('0x41')]('phone\x20NOT\x20IN\x20(?)',squel[_0x9b91('0x3a')]()[_0x9b91('0x3b')]('phone')[_0x9b91('0x3e')](_0x9b91('0x34'))[_0x9b91('0x41')](_0x593b16+_0x9b91('0x43'),_0x582bbe['id'][_0x9b91('0x3d')]())))[_0x9b91('0x3d')]();return _0x5c2e21;};function _0x13a70c(_0x1d1eca,_0x19e6f5){var _0x8f1de6=squel['insert']()['into'](_0x9b91('0x34'))[_0x9b91('0x35')]([_0x9b91('0x1e'),_0x9b91('0x36'),_0x9b91('0x37'),'ListId',_0x19e6f5,'createdAt',_0x9b91('0x39')],squel[_0x9b91('0x3a')]()[_0x9b91('0x3b')](_0x9b91('0x1e'),_0x9b91('0x1e'))[_0x9b91('0x3b')](_0x9b91('0x3c'),_0x9b91('0x36'))['field']('id',_0x9b91('0x37'))[_0x9b91('0x3b')](LISTID[_0x9b91('0x3d')](),_0x9b91('0x24'))[_0x9b91('0x3b')](_0x1d1eca['id'][_0x9b91('0x3d')](),_0x19e6f5)[_0x9b91('0x3b')]('NOW()',_0x9b91('0x38'))['field'](_0x9b91('0x3c'),_0x9b91('0x39'))[_0x9b91('0x3e')](_0x9b91('0x3f'))[_0x9b91('0x41')](_0x9b91('0x45'))[_0x9b91('0x41')](_0x9b91('0x40'),LISTID['toString']())[_0x9b91('0x41')](_0x9b91('0x46'),squel[_0x9b91('0x4a')](hopperContacts))['where']('phone\x20IS\x20NOT\x20NULL'))[_0x9b91('0x3d')]();return _0x8f1de6;}function _0x370e38(_0x3a6c9a,_0x472dae){var _0x422080=squel[_0x9b91('0x33')]()['into'](_0x9b91('0x4b'))[_0x9b91('0x35')]([_0x9b91('0x1e'),_0x9b91('0x37'),_0x9b91('0x24'),_0x472dae,'createdAt',_0x9b91('0x39')],squel[_0x9b91('0x3a')]()[_0x9b91('0x3b')](_0x9b91('0x1e'),_0x9b91('0x1e'))[_0x9b91('0x3b')]('id',_0x9b91('0x37'))[_0x9b91('0x3b')](LISTID['toString'](),'ListId')[_0x9b91('0x3b')](_0x3a6c9a['id'][_0x9b91('0x3d')](),_0x472dae)['field'](_0x9b91('0x3c'),_0x9b91('0x38'))['field'](_0x9b91('0x3c'),_0x9b91('0x39'))['from'](_0x9b91('0x3f'))[_0x9b91('0x41')](_0x9b91('0x45'))[_0x9b91('0x41')](_0x9b91('0x40'),LISTID[_0x9b91('0x3d')]())[_0x9b91('0x41')]('id\x20IN\x20?',squel[_0x9b91('0x4a')](hopperContacts))['where'](_0x9b91('0x42')))[_0x9b91('0x3d')]();return _0x422080;}return db[_0x9b91('0x4c')][_0x9b91('0x4d')]({'where':{'type':_0x9b91('0x4e')},'attributes':['id','dialCheckDuplicateType'],'include':[{'model':db[_0x9b91('0x4f')],'as':_0x9b91('0x50'),'where':{'id':LISTID}}]})[_0x9b91('0x51')](function(_0x17d2bf){var _0x523314=[];if(_0x17d2bf){var _0x16f1f3;for(var _0x25c101=0x0,_0x4b4a02;_0x25c101<_0x17d2bf['length'];_0x25c101+=0x1){_0x4b4a02=_0x17d2bf[_0x25c101][_0x9b91('0x52')]({'plain':!![]});switch(_0x4b4a02[_0x9b91('0x53')]){case'always':_0x523314[_0x9b91('0x2b')](db[_0x9b91('0x54')][_0x9b91('0x55')](_0x827288(_0x4b4a02,'VoiceQueueId'))[_0x9b91('0x51')](function(){})['catch'](_0x1ec312()));break;case _0x9b91('0x56'):_0x523314[_0x9b91('0x2b')](db[_0x9b91('0x54')][_0x9b91('0x55')](_0x8cf86b(_0x4b4a02,_0x9b91('0x57')))[_0x9b91('0x51')](function(){})[_0x9b91('0x2d')](_0x1ec312()));break;default:_0x523314['push'](db[_0x9b91('0x54')][_0x9b91('0x55')](_0x13a70c(_0x4b4a02,_0x9b91('0x57')))[_0x9b91('0x51')](function(){})[_0x9b91('0x2d')](_0x1ec312()));}}}return _0x523314;})['all']()['then'](function(){return db[_0x9b91('0x4c')][_0x9b91('0x4d')]({'where':{'type':_0x9b91('0x4e')},'attributes':['id'],'include':[{'model':db[_0x9b91('0x4f')],'as':'BlackLists','where':{'id':LISTID}}]})[_0x9b91('0x51')](function(_0x455d37){var _0x3e3bdd=[];if(_0x455d37){var _0x109ac8;for(var _0x29cfdf=0x0,_0x232b1a;_0x29cfdf<_0x455d37['length'];_0x29cfdf+=0x1){_0x232b1a=_0x455d37[_0x29cfdf][_0x9b91('0x52')]({'plain':!![]});_0x3e3bdd[_0x9b91('0x2b')](db['sequelize']['query'](_0x370e38(_0x232b1a,_0x9b91('0x57')))[_0x9b91('0x51')](function(){})[_0x9b91('0x2d')](_0x1ec312()));}}return _0x3e3bdd;})[_0x9b91('0x58')]();})[_0x9b91('0x51')](function(){return db['Campaign'][_0x9b91('0x4d')]({'attributes':['id',_0x9b91('0x53')],'include':[{'model':db[_0x9b91('0x4f')],'as':_0x9b91('0x50'),'where':{'id':LISTID}}]})[_0x9b91('0x51')](function(_0x1055d3){var _0x46219d=[];if(_0x1055d3){for(var _0xb6bec5=0x0,_0x3916b0;_0xb6bec5<_0x1055d3[_0x9b91('0x17')];_0xb6bec5+=0x1){_0x3916b0=_0x1055d3[_0xb6bec5][_0x9b91('0x52')]({'plain':!![]});switch(_0x3916b0[_0x9b91('0x53')]){case _0x9b91('0x59'):_0x46219d[_0x9b91('0x2b')](db['sequelize'][_0x9b91('0x55')](_0x827288(_0x3916b0,_0x9b91('0x5a')))[_0x9b91('0x51')](function(){})['catch'](_0x1ec312()));break;case _0x9b91('0x56'):_0x46219d[_0x9b91('0x2b')](db[_0x9b91('0x54')][_0x9b91('0x55')](_0x8cf86b(_0x3916b0,'CampaignId'))[_0x9b91('0x51')](function(){})[_0x9b91('0x2d')](_0x1ec312()));break;default:_0x46219d[_0x9b91('0x2b')](db[_0x9b91('0x54')][_0x9b91('0x55')](_0x13a70c(_0x3916b0,_0x9b91('0x5a')))[_0x9b91('0x51')](function(){})[_0x9b91('0x2d')](_0x1ec312()));}}}return _0x46219d;})[_0x9b91('0x58')]();})[_0x9b91('0x51')](function(){return db['Campaign'][_0x9b91('0x4d')]({'attributes':['id'],'include':[{'model':db[_0x9b91('0x4f')],'as':_0x9b91('0x5b'),'where':{'id':LISTID}}]})['then'](function(_0x16574b){var _0x5c4b14=[];if(_0x16574b){for(var _0x1767ec=0x0,_0x52acbe;_0x1767ec<_0x16574b[_0x9b91('0x17')];_0x1767ec+=0x1){_0x52acbe=_0x16574b[_0x1767ec][_0x9b91('0x52')]({'plain':!![]});_0x5c4b14['push'](db[_0x9b91('0x54')][_0x9b91('0x55')](_0x370e38(_0x52acbe,_0x9b91('0x5a')))[_0x9b91('0x51')](function(){})['catch'](_0x1ec312()));}}return _0x5c4b14;})[_0x9b91('0x58')]();})[_0x9b91('0x2d')](function(_0x25288b){logger['error'](_0x9b91('0x5c'),_0x9b91('0x5d'),_0x25288b['message']);});}var processPromises=function(_0x53f7d5){return BPromise[_0x9b91('0x58')](promises)[_0x9b91('0x51')](function(_0x390b53){})['catch'](function(_0xf7cb97){logger['error'](_0x9b91('0x5e'),JSON[_0x9b91('0x2f')](_0xf7cb97));})['finally'](function(){socket[_0x9b91('0x5f')](_0x9b91('0x60')+SOCKET_TIMESTAMP,{'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});promises=[];success=0x0;errors=0x0;duplicates=0x0;rows=[];if(_0x53f7d5){return _0x53f7d5[_0x9b91('0x61')]();}});};var endCsv=function(){return BPromise[_0x9b91('0x62')]()[_0x9b91('0x51')](function(){if(hopperContacts){return checkHopper();}})[_0x9b91('0x51')](function(){socket['emit']('contact:csv_'+SOCKET_TIMESTAMP,{'finished':!![],'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});try{fs[_0x9b91('0x63')](FILEPATH);}catch(_0x1b0347){logger['error']('Unable\x20to\x20delete\x20temp\x20file:',JSON['stringify'](_0x1b0347));}finally{process[_0x9b91('0x64')](0x0);}});};process['on'](_0x9b91('0x65'),function(){logger[_0x9b91('0x66')](_0x9b91('0x67'));endCsv();});function main(){return BPromise['resolve']()[_0x9b91('0x51')](function(){if(DUPLICATES){DUPLICATES=DUPLICATES[_0x9b91('0xe')](',');return db[_0x9b91('0x28')][_0x9b91('0x4d')]({'where':{'ListId':LISTID},'attributes':DUPLICATES,'raw':!![]});}})[_0x9b91('0x51')](function(_0x432a25){var _0x43a6de=fs[_0x9b91('0x68')](FILEPATH,{'highWaterMark':0xf*0x400*0x400});Papa['parse'](_0x43a6de,{'header':!![],'skipEmptyLines':!![],'step':function(_0x37e04b,_0xb4eaba){total+=0x1;var _0x164160=total;promises[_0x9b91('0x2b')](checkRow(_0x37e04b,_0x432a25,_0x164160)[_0x9b91('0x51')](function(){success+=0x1;})[_0x9b91('0x2d')](function(_0x349af9){if(_0x349af9[_0x9b91('0x11')]){errors+=0x1;delete _0x349af9['error'];}else if(_0x349af9[_0x9b91('0x26')]){duplicates+=0x1;delete _0x349af9['duplicate'];}rows[_0x9b91('0x2b')](_0x349af9);}));if(total%0xc8===0x0){_0xb4eaba[_0x9b91('0x69')]();return processPromises(_0xb4eaba);}},'complete':function(){return processPromises()[_0x9b91('0x51')](function(){logger[_0x9b91('0x66')](_0x9b91('0x6a'));endCsv();});},'error':function(_0x17028e,_0xd13e1f){logger[_0x9b91('0x66')](_0x9b91('0x6b'),JSON[_0x9b91('0x2f')](_0x17028e));endCsv();}});})[_0x9b91('0x2d')](function(_0x3c4327){logger[_0x9b91('0x11')](_0x9b91('0x6c'),JSON['stringify'](_0x3c4327));});}main();
\ No newline at end of file
index 0cf362b..3493574 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb71c=['parse','binding\x20doesn\x27t\x20exists','phone\x20is\x20mandatory','firstName\x20is\x20mandatory','ListId\x20is\x20mandatory','body\x20id\x20mandatory','map','No\x20agent\x20available','uncaughtException','lodash','papaparse','util','bluebird','moment','squel','ioredis','../../../mysqldb','../../../config/environment','../../../config/logger','import','redis','localhost','socket.io-emitter','YYYY-MM-DD\x20HH:mm:ss','format','test','select','field','phone','from','join','where','\x20=\x20','.dialCheckDuplicateType\x20IN\x20(','findAll','then','length','push','all','AdditionalPhones','split','isNil','filter','CmContactHasItem','update','updated','create','PHONE','inserted','cm_contacts.phone','cm_contacts.scheduledat','cm_contacts.updatedAt','cm_contacts.priority','cm_contacts.UserId','insert','ListId','createdAt','updatedAt','priority','UserId','recallme','fields','cm_contacts','.CmListId','.id\x20=\x20','.CmListId\x20=\x20?','cm_contacts.createdAt\x20=\x20?','cm_contacts.phone\x20NOT\x20IN\x20(?)','cm_hopper','\x22onlyIfOpen\x22','\x22always\x22','toString','cm_contacts.id','cm_contacts.ListId','cm_contacts.createdAt','cm_hopper_black','fromQuery','ContactId','cm_contacts.ListId\x20=\x20','date_add(cm_contacts.scheduledat,interval\x20','.offset-cm_contacts.utcOffset\x20minute)','cm_hopper.id','cm_contact_has_items.item','cm_contact_has_items.createdAt','into','cm_hopper_additional_phones','CmHopperId','cm_contact_has_items','cm_contacts.id\x20=\x20cm_contact_has_items.CmContactId','cm_hopper.ListId\x20=\x20?','concat','keys','CompanyId','scheduledAt',')\x20NOT\x20IN\x20?','ListId\x20=\x20?','deletedAt\x20IS\x20NULL','id\x20IN\x20?','MIN(id)','group','info','Received\x20SIGINT','message','exit','errors','query','catch','error','campaigns.id','campaigns.dialTimezone','campaigns','campaigns_has_cm_lists','campaigns.id\x20=\x20campaigns_has_cm_lists.CampaignId','campaigns_has_cm_lists.CmListId=','spread','voice_queues.id','voice_queues.dialTimezone','voice_queues_has_cm_lists','voice_queues.id\x20=\x20voice_queues_has_cm_lists.VoiceQueueId','sequelize','timezones','dialTimezone','set','main','stringify','start','binding','socket_timestamp','server/files/tmp','.csv','includes','header','ContactItemType','name','_description','writeFileSync','createReadStream','data','rows','find','hasOwnProperty','trim','replace','scheduledat','isValid','scheduledat\x20wrong\x20format\x20(YYYY-MM-DD\x20HH:mm:ss)','isNaN','isNumber','email\x20wrong\x20format','dateOfBirth','utcOffset','firstName','\x20not\x20specified','itemTypeId','description','SystemRow','appendFileSync','emit','contact:import:','Abort\x20parser','abort','SystemError','step','duplicates','cm_contacts_','CREATE\x20TABLE\x20','\x20LIKE\x20cm_contacts;','campaigns_','(id\x20int,dialTimezone\x20varchar(255),offset\x20int);','dialTimezone,utcOffset','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','each','contactTypeId','orderBy','voice_queues','VoiceQueueId','CampaignId','campaigns_has_cm_blacklists','voice_queues_has_cm_blacklists','finish','affectedRows','unlink','complete','argv','arguments\x20<filename>\x20<parameters>\x20<agents>','root','existsSync'];(function(_0x26879e,_0x4c5bb5){var _0x28fff2=function(_0x4bd42a){while(--_0x4bd42a){_0x26879e['push'](_0x26879e['shift']());}};_0x28fff2(++_0x4c5bb5);}(_0xb71c,0xc6));var _0xcb71=function(_0x34fed1,_0x39bca9){_0x34fed1=_0x34fed1-0x0;var _0x2e71ac=_0xb71c[_0x34fed1];return _0x2e71ac;};'use strict';var fs=require('fs');var path=require('path');var _=require(_0xcb71('0x0'));var Papa=require(_0xcb71('0x1'));var util=require(_0xcb71('0x2'));var BPromise=require(_0xcb71('0x3'));var moment=require(_0xcb71('0x4'));var squel=require(_0xcb71('0x5'));var Redis=require(_0xcb71('0x6'));var db=require(_0xcb71('0x7'))['db'];var config=require(_0xcb71('0x8'));var shared=require('../../../config/environment/shared');var logger=require(_0xcb71('0x9'))(_0xcb71('0xa'));config[_0xcb71('0xb')]=_['defaults'](config[_0xcb71('0xb')],{'host':_0xcb71('0xc'),'port':0x18eb});var socket=require(_0xcb71('0xd'))(new Redis(config['redis']));var stats={'finish':![],'errors':[],'rows':0x0,'affectedRows':0x0};var results=[];var promisesAdditionalPhones=[];var orderBy=0x0;var stopped=![];var NOW=moment()['format'](_0xcb71('0xe'));var contactItemTypes=[];var phoneDescriptions=[];var hasAdditionalPhones=![];var tmp_voice_queues;var tmp_campaigns;var tzOffset=0x0;var hasTZ;var NOW=moment()[_0xcb71('0xf')](_0xcb71('0xe'));function isEmail(_0x20e22e){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))*$/[_0xcb71('0x10')](_0x20e22e);}function selectNotIn(_0x4a7f2b,_0x3f067b,_0x5c4e31,_0x120c30,_0x107bf2){return squel[_0xcb71('0x11')]()[_0xcb71('0x12')](_0xcb71('0x13'))[_0xcb71('0x14')](_0x120c30)[_0xcb71('0x15')](_0x3f067b,null,_0x3f067b+'.id\x20=\x20'+_0x120c30+'.'+_0x5c4e31)[_0xcb71('0x16')](_0x120c30+'.'+_0x5c4e31+_0xcb71('0x17')+_0x4a7f2b+'.'+_0x5c4e31)[_0xcb71('0x16')](_0x3f067b+_0xcb71('0x18')+_0x107bf2['join']()+')');}function handleAdditionalPhones(){return new Promise(function(_0x1fabfb,_0x5ab018){promisesAdditionalPhones=[];return db['CmContact'][_0xcb71('0x19')]({'raw':!![],'attributes':['id','AdditionalPhones'],'where':{'createdAt':NOW,'AdditionalPhones':{'$ne':null}}})[_0xcb71('0x1a')](function(_0x5955f3){if(_0x5955f3!==null){var _0x36edb5=[];for(var _0x2cb700=0x0;_0x2cb700<_0x5955f3[_0xcb71('0x1b')];_0x2cb700++){var _0x58dddf=_0x5955f3[_0x2cb700];_0x36edb5[_0xcb71('0x1c')](insertAdditionalPhones(_0x58dddf));}}Promise[_0xcb71('0x1d')](_0x36edb5)[_0xcb71('0x1a')](function(){_0x1fabfb({'val':0x1});});});});}function insertAdditionalPhones(_0x2a450b){return new Promise(function(_0x837249,_0x147fda){var _0x432470=_0x2a450b[_0xcb71('0x1e')];var _0x400a36=_0x432470[_0xcb71('0x1f')](';');var _0x4c7c44=[];orderBy=0x0;for(var _0x56d094=0x0;_0x56d094<_0x400a36[_0xcb71('0x1b')];_0x56d094++){_0x4c7c44[_0xcb71('0x1c')](splitAdditionalPhone(_0x2a450b['id'],_0x400a36[_0x56d094]));}Promise['all'](_0x4c7c44)[_0xcb71('0x1a')](function(){_0x837249({'val':_0x400a36[_0xcb71('0x1b')]});});});}function splitAdditionalPhone(_0x112061,_0x4c086f){return new Promise(function(_0x309177,_0x572c1f){var _0x394da9=_0x4c086f[_0xcb71('0x1f')](':');var _0x137cb2=_0x394da9[0x0];var _0x53f67f=_0x394da9[0x1];if(!_[_0xcb71('0x20')](_0x53f67f)){var _0x32548d=_0x53f67f[_0xcb71('0x1f')]('|');var _0x2118fd=[];for(var _0x54a261=0x0;_0x54a261<_0x32548d['length'];_0x54a261++){if(_0x32548d[_0x54a261]!==''){var _0x4ecea2=_[_0xcb71('0x21')](promisesAdditionalPhones,{'contactId':_0x112061,'phone':_0x32548d[_0x54a261]});if(_0x4ecea2[_0xcb71('0x1b')]==0x0){orderBy++;promisesAdditionalPhones[_0xcb71('0x1c')]({'contactId':_0x112061,'contactTypeId':_0x137cb2,'phone':_0x32548d[_0x54a261],'orderBy':orderBy});}}}_0x309177({'ok':0x1});}else _0x309177({'res':0x0});});}function createAdditionalPhone(_0x543b1b,_0x30b2c7,_0x877b16,_0x3e951a){var _0x3f700f='';var _0x3eaf33='';var _0x5b6849=_0x877b16['split']('§');_0x3f700f=_0x5b6849[0x0];if(_0x5b6849[_0xcb71('0x1b')]==0x2)_0x3eaf33=_0x5b6849[0x1];return new Promise(function(_0x53f276,_0x3eced1){return db[_0xcb71('0x22')]['findOne']({'where':{'CmContactId':_0x543b1b,'item':_0x3f700f}})[_0xcb71('0x1a')](function(_0x50ec01){if(_0x50ec01){return db[_0xcb71('0x22')][_0xcb71('0x23')]({'ItemTypeId':_0x30b2c7,'description':_0x3eaf33,'OrderBy':_0x3e951a},{'where':{'CmContactId':_0x543b1b,'item':_0x3f700f}})['then'](function(_0x4a1442){_0x53f276({'res':_0xcb71('0x24')});});}else{return db[_0xcb71('0x22')][_0xcb71('0x25')]({'CmContactId':_0x543b1b,'item':_0x3f700f,'description':_0x3eaf33,'ItemTypeId':_0x30b2c7,'OrderBy':_0x3e951a,'ItemClass':_0xcb71('0x26')})[_0xcb71('0x1a')](function(_0x421303){_0x53f276({'res':_0xcb71('0x27')});});}});});}function insertCmHopper(_0x91d811,_0x495d53,_0x3524fd,_0x58eae4,_0xc2e1d4){var _0x28d93a=[_0xcb71('0x28'),_0xcb71('0x29'),'cm_contacts.id','cm_contacts.ListId',_0x495d53+'.'+_0x58eae4,'cm_contacts.createdAt',_0xcb71('0x2a'),_0xcb71('0x2b'),_0xcb71('0x2c'),'\x22'+_0xc2e1d4+'\x22'];return squel[_0xcb71('0x2d')]()['into']('cm_hopper')['fromQuery'](['phone','scheduledat','ContactId',_0xcb71('0x2e'),_0x58eae4,_0xcb71('0x2f'),_0xcb71('0x30'),_0xcb71('0x31'),_0xcb71('0x32'),_0xcb71('0x33')],squel[_0xcb71('0x11')]()[_0xcb71('0x34')](_0x28d93a)[_0xcb71('0x14')](_0x495d53)[_0xcb71('0x15')](_0xcb71('0x35'),null,'cm_contacts.ListId\x20=\x20'+_0x495d53+_0xcb71('0x36'))['join'](_0x3524fd,null,_0x3524fd+_0xcb71('0x37')+_0x495d53+'.'+_0x58eae4)[_0xcb71('0x16')](_0x495d53+_0xcb71('0x38'),_0x91d811)['where'](_0xcb71('0x39'),NOW)[_0xcb71('0x16')](_0xcb71('0x3a'),selectNotIn(_0x495d53,_0x3524fd,_0x58eae4,_0xcb71('0x3b'),['\x22always\x22',_0xcb71('0x3c')]))[_0xcb71('0x16')]('cm_contacts.phone\x20NOT\x20IN\x20(?)',selectNotIn(_0x495d53,_0x3524fd,_0x58eae4,_0xcb71('0x3b'),[_0xcb71('0x3d')])))[_0xcb71('0x3e')]();}function insertCmHopperBlack(_0x3df30d,_0x16c00c,_0xc1bae4,_0x3b285e){var _0x872bd=[_0xcb71('0x28'),_0xcb71('0x3f'),_0xcb71('0x40'),_0x16c00c+'.'+_0x3b285e,_0xcb71('0x41'),_0xcb71('0x2a')];return squel[_0xcb71('0x2d')]()['into'](_0xcb71('0x42'))[_0xcb71('0x43')]([_0xcb71('0x13'),_0xcb71('0x44'),_0xcb71('0x2e'),_0x3b285e,_0xcb71('0x2f'),_0xcb71('0x30')],squel[_0xcb71('0x11')]()[_0xcb71('0x34')](_0x872bd)['from'](_0x16c00c)['join'](_0xcb71('0x35'),null,_0xcb71('0x45')+_0x16c00c+_0xcb71('0x36'))['join'](_0xc1bae4,null,_0xc1bae4+_0xcb71('0x37')+_0x16c00c+'.'+_0x3b285e)[_0xcb71('0x16')](_0x16c00c+_0xcb71('0x38'),_0x3df30d)[_0xcb71('0x16')](_0xcb71('0x39'),NOW)['where']('cm_contacts.phone\x20NOT\x20IN\x20(?)',squel[_0xcb71('0x11')]()['field'](_0xcb71('0x13'))[_0xcb71('0x14')]('cm_hopper_black')['where']('ListId\x20=\x20?',_0x3df30d)[_0xcb71('0x16')](_0x3b285e+_0xcb71('0x17')+_0x16c00c+'.'+_0x3b285e)))[_0xcb71('0x3e')]();}function insertTzCmHopper(_0x2fbb0c,_0x148332,_0x5a6bca,_0x152e22,_0x5ddc56,_0x582393){var _0x5b51eb=[_0xcb71('0x28'),_0xcb71('0x46')+_0x582393+_0xcb71('0x47'),'cm_contacts.id',_0xcb71('0x40'),_0x148332+'.'+_0x152e22,_0xcb71('0x41'),_0xcb71('0x2a'),_0xcb71('0x2b'),_0xcb71('0x2c'),'\x22'+_0x5ddc56+'\x22'];var _0x5ac284=squel[_0xcb71('0x2d')]()['into'](_0xcb71('0x3b'))['fromQuery']([_0xcb71('0x13'),'scheduledat',_0xcb71('0x44'),_0xcb71('0x2e'),_0x152e22,_0xcb71('0x2f'),_0xcb71('0x30'),_0xcb71('0x31'),_0xcb71('0x32'),_0xcb71('0x33')],squel[_0xcb71('0x11')]()[_0xcb71('0x34')](_0x5b51eb)[_0xcb71('0x14')](_0x148332)['join'](_0xcb71('0x35'),null,_0xcb71('0x45')+_0x148332+_0xcb71('0x36'))[_0xcb71('0x15')](_0x5a6bca,null,_0x5a6bca+_0xcb71('0x37')+_0x148332+'.'+_0x152e22)[_0xcb71('0x15')](_0x582393,null,_0x582393+'.id\x20=\x20'+_0x148332+'.'+_0x152e22)['where'](_0x148332+_0xcb71('0x38'),_0x2fbb0c)[_0xcb71('0x16')](_0xcb71('0x39'),NOW)[_0xcb71('0x16')](_0xcb71('0x3a'),selectNotIn(_0x148332,_0x5a6bca,_0x152e22,_0xcb71('0x3b'),[_0xcb71('0x3d'),_0xcb71('0x3c')]))[_0xcb71('0x16')](_0xcb71('0x3a'),selectNotIn(_0x148332,_0x5a6bca,_0x152e22,_0xcb71('0x3b'),[_0xcb71('0x3d')])))[_0xcb71('0x3e')]();return _0x5ac284;}function insertTzCmHopperBlack(_0x292fc6,_0x3ee338,_0x47c7ae,_0x78510c){var _0xf8b53b=[_0xcb71('0x28'),_0xcb71('0x3f'),'cm_contacts.ListId',_0x3ee338+'.'+_0x78510c,_0xcb71('0x41'),_0xcb71('0x2a')];return squel[_0xcb71('0x2d')]()['into']('cm_hopper_black')[_0xcb71('0x43')](['phone',_0xcb71('0x44'),_0xcb71('0x2e'),_0x78510c,_0xcb71('0x2f'),_0xcb71('0x30')],squel[_0xcb71('0x11')]()[_0xcb71('0x34')](_0xf8b53b)[_0xcb71('0x14')](_0x3ee338)[_0xcb71('0x15')](_0xcb71('0x35'),null,_0xcb71('0x45')+_0x3ee338+_0xcb71('0x36'))['join'](_0x47c7ae,null,_0x47c7ae+_0xcb71('0x37')+_0x3ee338+'.'+_0x78510c)[_0xcb71('0x16')](_0x3ee338+_0xcb71('0x38'),_0x292fc6)['where'](_0xcb71('0x39'),NOW)[_0xcb71('0x16')]('cm_contacts.phone\x20NOT\x20IN\x20(?)',squel['select']()[_0xcb71('0x12')](_0xcb71('0x13'))['from'](_0xcb71('0x42'))['where']('ListId\x20=\x20?',_0x292fc6)[_0xcb71('0x16')](_0x78510c+_0xcb71('0x17')+_0x3ee338+'.'+_0x78510c)))['toString']();}function insertCmHopperAdditionalPhones(_0x3c019c){var _0x58c4ca=[_0xcb71('0x48'),_0xcb71('0x49'),'cm_contact_has_items.OrderBy',_0xcb71('0x4a'),'cm_contact_has_items.updatedAt'];return squel['insert']()[_0xcb71('0x4b')](_0xcb71('0x4c'))[_0xcb71('0x43')]([_0xcb71('0x4d'),'phone','OrderBy',_0xcb71('0x2f'),_0xcb71('0x30')],squel[_0xcb71('0x11')]()['fields'](_0x58c4ca)[_0xcb71('0x14')](_0xcb71('0x3b'))[_0xcb71('0x15')]('cm_contacts',null,'cm_contacts.id\x20=\x20cm_hopper.ContactId')[_0xcb71('0x15')](_0xcb71('0x4e'),null,_0xcb71('0x4f'))[_0xcb71('0x16')](_0xcb71('0x50'),_0x3c019c)[_0xcb71('0x16')]('cm_contacts.createdAt\x20=\x20?',NOW))['toString']();}function insertCmContact(_0x10fa59,_0x516317,_0x59f410,_0x1cf4c9){var _0x48959c=_[_0xcb71('0x51')](_[_0xcb71('0x52')](_0x1cf4c9),['ListId',_0xcb71('0x53'),'createdAt',_0xcb71('0x30'),_0xcb71('0x54')]);return squel[_0xcb71('0x2d')]()[_0xcb71('0x4b')](_0xcb71('0x35'))[_0xcb71('0x43')](_0x48959c,squel[_0xcb71('0x11')]()[_0xcb71('0x34')](_0x48959c)[_0xcb71('0x14')](_0x516317)[_0xcb71('0x16')]('('+_0x59f410[_0xcb71('0x15')](',')+_0xcb71('0x55'),squel[_0xcb71('0x11')]()[_0xcb71('0x34')](_0x59f410)[_0xcb71('0x14')](_0xcb71('0x35'))[_0xcb71('0x16')](_0xcb71('0x56'),_0x10fa59)[_0xcb71('0x16')](_0xcb71('0x57')))[_0xcb71('0x16')](_0xcb71('0x58'),squel[_0xcb71('0x11')]()[_0xcb71('0x12')](_0xcb71('0x59'),'min_id')[_0xcb71('0x14')](_0x516317)[_0xcb71('0x5a')](_0x59f410['join'](','))))[_0xcb71('0x3e')]();}function handleStop(){logger[_0xcb71('0x5b')](_0xcb71('0x5c'));stopped=!![];}function handleUncaughtException(_0x1fd876){logger['error'](_0x1fd876[_0xcb71('0x5d')]);process[_0xcb71('0x5e')](0x1);}function handleError(_0x2170cb,_0x1614c0){stats[_0xcb71('0x5f')][_0xcb71('0x1c')]({'name':_0x1614c0['code'],'message':_0x1614c0[_0xcb71('0x5d')],'row':_0x2170cb});}function handleQuery(_0x46d6df){logger['info'](_0x46d6df);return db['sequelize'][_0xcb71('0x60')](_0x46d6df)['spread'](function(_0x4a3a53){results[_0xcb71('0x1c')](_0x4a3a53);})[_0xcb71('0x61')](function(_0x1f705d){logger[_0xcb71('0x62')](_0x1f705d[_0xcb71('0x5d')]);});}function updateTzCampaigns(_0x5620ef){return new Promise(function(_0x3c3b99,_0x5c9266){var _0x3a7b45=squel[_0xcb71('0x11')]()[_0xcb71('0x34')]([_0xcb71('0x63'),_0xcb71('0x64')])[_0xcb71('0x14')](_0xcb71('0x65'))['join'](_0xcb71('0x66'),null,_0xcb71('0x67'))['where'](_0xcb71('0x68')+_0x5620ef);db['sequelize']['query'](_0x3a7b45['toString']())[_0xcb71('0x69')](function(_0x3ac46d){var _0x2eedda=[];for(var _0x4ee2b7=0x0;_0x4ee2b7<_0x3ac46d['length'];_0x4ee2b7++){_0x2eedda[_0xcb71('0x1c')](getTimezoneData(_0x3ac46d[_0x4ee2b7],tmp_campaigns));}BPromise[_0xcb71('0x1d')](_0x2eedda)[_0xcb71('0x1a')](function(){_0x3c3b99({'val':0x1});});})['catch'](function(_0x5d1b28){logger[_0xcb71('0x62')](_0x5d1b28['message']);_0x3c3b99({'val':0x0});});});}function updateTzVoiceQueues(_0x1bcb37){return new Promise(function(_0x332286,_0x22c378){var _0x3e9625=squel[_0xcb71('0x11')]()['fields']([_0xcb71('0x6a'),_0xcb71('0x6b')])['from']('voice_queues')[_0xcb71('0x15')](_0xcb71('0x6c'),null,_0xcb71('0x6d'))[_0xcb71('0x16')]('voice_queues_has_cm_lists.CmListId='+_0x1bcb37);db[_0xcb71('0x6e')][_0xcb71('0x60')](_0x3e9625[_0xcb71('0x3e')]())['spread'](function(_0x10a139){var _0x4db387=[];for(var _0x33224d=0x0;_0x33224d<_0x10a139[_0xcb71('0x1b')];_0x33224d++){_0x4db387[_0xcb71('0x1c')](getTimezoneData(_0x10a139[_0x33224d],tmp_voice_queues));}BPromise[_0xcb71('0x1d')](_0x4db387)[_0xcb71('0x1a')](function(){_0x332286({'val':0x1});});})[_0xcb71('0x61')](function(_0x222b32){logger[_0xcb71('0x62')](_0x222b32['message']);_0x332286({'val':0x0});});});}function getTimezoneData(_0x752a01,_0x2325b6){return new Promise(function(_0x27cdf3,_0x5ada58){var _0x42970d=shared[_0xcb71('0x6f')];var _0x4ed23f=_0x42970d[_0x752a01[_0xcb71('0x70')]];if(_[_0xcb71('0x20')](_0x4ed23f)){_0x27cdf3({'ret':0x1});}else{var _0x4edb95=_0x4ed23f['utcOffset'];var _0x210407=squel[_0xcb71('0x2d')]()[_0xcb71('0x4b')](_0x2325b6)[_0xcb71('0x71')]('id',_0x752a01['id'])['set']('offset',_0x4edb95)['set']('dialTimezone',_0x752a01[_0xcb71('0x70')])[_0xcb71('0x3e')]();return db[_0xcb71('0x6e')][_0xcb71('0x60')](_0x210407)[_0xcb71('0x69')](function(_0x485ab4){_0x27cdf3({'ret':0x1});})[_0xcb71('0x61')](function(_0x3a5519){logger[_0xcb71('0x62')](_0x3a5519['message']);_0x5ada58({'ret':0x1});});}});}function handleTZQuery(_0x512edb){logger['info'](_0x512edb);return db[_0xcb71('0x6e')][_0xcb71('0x60')](_0x512edb)[_0xcb71('0x69')](function(_0x520ea6){})[_0xcb71('0x61')](function(_0x3c5599){logger['error'](_0x3c5599[_0xcb71('0x5d')]);});}function main(_0xcdda25,_0x36a342,_0xd79ce5,_0x442476){logger[_0xcb71('0x5b')](_0xcb71('0x72'),_0xcdda25,JSON[_0xcb71('0x73')](_0x36a342));process['send'](_0xcb71('0x74'));var _0xc18a=_0x36a342[_0xcb71('0x75')];var _0x57cda3=_['clone'](_0xc18a);var _0x6908ad=_0x36a342[_0xcb71('0x76')];var _0xa9d644=path[_0xcb71('0x15')](config['root'],_0xcb71('0x77'),_0x6908ad+_0xcb71('0x78'));hasTZ=_[_0xcb71('0x52')](_0xc18a)[_0xcb71('0x79')](_0xcb71('0x70'));var _0x11af39=_[_0xcb71('0x52')](_0xc18a)['join']();logger[_0xcb71('0x5b')](_0xcb71('0x7a'),_0x11af39);db[_0xcb71('0x7b')][_0xcb71('0x19')]({'raw':!![],'attributes':['id','name']})[_0xcb71('0x1a')](function(_0x566682){for(var _0x1213a5=0x0;_0x1213a5<_0x566682['length'];_0x1213a5++){if(_0x566682[_0x1213a5][_0xcb71('0x7c')]in _0xc18a){contactItemTypes[_0xcb71('0x1c')](_0x566682[_0x1213a5]);delete _0x57cda3[_0x566682[_0x1213a5][_0xcb71('0x7c')]];hasAdditionalPhones=!![];}for(var _0x4c5cff in _0xc18a){if(_0x566682[_0x1213a5][_0xcb71('0x7c')]+_0xcb71('0x7d')===_0x4c5cff){phoneDescriptions[_0xcb71('0x1c')]({'itemTypeId':_0x566682[_0x1213a5]['id'],'description':_0x4c5cff});delete _0x57cda3[_0x4c5cff];}}}if(hasAdditionalPhones)_0x57cda3[_0xcb71('0x1e')]='';var _0x308fda=_[_0xcb71('0x52')](_0x57cda3)[_0xcb71('0x15')]();logger[_0xcb71('0x5b')](_0xcb71('0x7a'),_0x308fda);fs[_0xcb71('0x7e')](_0xa9d644,_0x308fda+'\x0a');Papa['parse'](fs[_0xcb71('0x7f')](_0xcdda25),{'header':!![],'skipEmptyLines':!![],'step':function(_0x3e732e,_0x1c1665){try{for(var _0x1acae1=0x0,_0x3b58f1=[];_0x1acae1<_0x3e732e[_0xcb71('0x80')]['length'];_0x1acae1++){stats[_0xcb71('0x81')]+=0x1;if(_0x3e732e['errors'][_0x1acae1]){handleError(_0x3e732e[_0xcb71('0x80')][_0x1acae1],_0x3e732e[_0xcb71('0x5f')][_0x1acae1]);}else{var _0x34dcec=[];var _0x306915=[];var _0x5a2f52={};for(var _0x532dec in _0xc18a){let _0xc378e9=contactItemTypes[_0xcb71('0x82')](_0xc06a9c=>_0xc06a9c[_0xcb71('0x7c')]===_0x532dec);let _0x3a435=contactItemTypes[_0xcb71('0x82')](_0x314d6f=>_0x314d6f[_0xcb71('0x7c')]+'_description'===_0x532dec);if(_[_0xcb71('0x20')](_0xc378e9)&&_['isNil'](_0x3a435)){if(_0xc18a[_0xcb71('0x83')](_0x532dec)){if(_0x3e732e['data'][_0x1acae1][_0xc18a[_0x532dec]]){var _0x2ede4c=_[_0xcb71('0x84')](_0x3e732e[_0xcb71('0x80')][_0x1acae1][_0xc18a[_0x532dec]][_0xcb71('0x85')](/"/g,'\x27'));switch(_0x532dec){case _0xcb71('0x86'):var _0x23bb9b=moment(_0x2ede4c,_0xcb71('0xe'),!![]);if(_0x23bb9b[_0xcb71('0x87')]()){_0x3b58f1[_0xcb71('0x1c')]('\x22'+_0x2ede4c+'\x22');}else{_0x34dcec[_0xcb71('0x1c')](_0xcb71('0x88'));}break;case _0xcb71('0x31'):var _0x50d85f=parseInt(_0x2ede4c);_0x2ede4c=_[_0xcb71('0x89')](_0x50d85f)||_0x50d85f<0x0||_0x50d85f>0x4?_0x442476?0x3:0x2:_0x50d85f;_0x3b58f1[_0xcb71('0x1c')]('\x22'+_0x2ede4c+'\x22');break;case _0xcb71('0x32'):var _0x351fc1=parseInt(_0x2ede4c);if(_[_0xcb71('0x8a')](_0x351fc1)&&_[_0xcb71('0x79')](_0xd79ce5,_0x351fc1)){_0x3b58f1[_0xcb71('0x1c')]('\x22'+_0x351fc1+'\x22');}else{_0x34dcec[_0xcb71('0x1c')]('agent\x20not\x20exists');}break;case'email':if(isEmail(_0x2ede4c)){_0x3b58f1[_0xcb71('0x1c')]('\x22'+_0x2ede4c+'\x22');}else{_0x34dcec[_0xcb71('0x1c')](_0xcb71('0x8b'));}break;case _0xcb71('0x8c'):var _0x5edcc4=moment(_0x2ede4c,'YYYY-MM-DD',!![]);if(_0x5edcc4[_0xcb71('0x87')]()){_0x3b58f1[_0xcb71('0x1c')]('\x22'+_0x2ede4c+'\x22');}else{_0x34dcec[_0xcb71('0x1c')]('dateOfBirth\x20wrong\x20format\x20(YYYY-MM-DD)');}break;case _0xcb71('0x70'):var _0x34a23e=shared['timezones'];var _0x49e05d=_0x34a23e[_0x2ede4c];if(!_[_0xcb71('0x20')](_0x49e05d)){var _0x1c8c48=_0x49e05d[_0xcb71('0x8d')];_0x3b58f1[_0xcb71('0x1c')]('\x22'+_0x2ede4c+'\x22');_0x3b58f1['push']('\x22'+_0x1c8c48+'\x22');}break;default:_0x3b58f1[_0xcb71('0x1c')]('\x22'+_0x2ede4c+'\x22');}}else{switch(_0x532dec){case _0xcb71('0x8e'):case'phone':_0x34dcec[_0xcb71('0x1c')](_0x532dec+_0xcb71('0x8f'));break;default:_0x3b58f1[_0xcb71('0x1c')]('\x22\x22');}}}}else{var _0x5d9537='';if(!_['isNil'](_0xc378e9)){if(!_0x5a2f52[_0xcb71('0x83')](_0xc378e9['id'])){if(!_[_0xcb71('0x20')](_0x3e732e[_0xcb71('0x80')][_0x1acae1][_0xc18a[_0x532dec]])){var _0x2ede4c=_[_0xcb71('0x84')](_0x3e732e[_0xcb71('0x80')][_0x1acae1][_0xc18a[_0x532dec]][_0xcb71('0x85')](/"/g,'\x27'));var _0x4743cd=phoneDescriptions['find'](_0x392b3c=>_0x392b3c[_0xcb71('0x90')]===_0xc378e9['id']);if(!_[_0xcb71('0x20')](_0x4743cd)){var _0x7ccdc8=_['trim'](_0x3e732e[_0xcb71('0x80')][_0x1acae1][_0xc18a[_0x4743cd[_0xcb71('0x91')]]]['replace'](/"/g,'\x27'));if(!_['isNil'](_0x7ccdc8))_0x2ede4c=_0x2ede4c+'§'+_0x7ccdc8;}if(_0x5d9537=='')_0x5d9537=_0x2ede4c;else _0x5d9537+='|'+_0x2ede4c;}_0x306915[_0xcb71('0x1c')](_0xc378e9['id']+':'+_0x5d9537);_0x5a2f52[_0xc378e9['id']]=0x1;}}}}if(hasAdditionalPhones){_0x3b58f1[_0xcb71('0x1c')]('\x22'+_0x306915[_0xcb71('0x15')](';')+'\x22');}if(_0x34dcec[_0xcb71('0x1b')]){handleError(_0x3e732e[_0xcb71('0x80')][_0x1acae1],{'code':_0xcb71('0x92'),'message':_0x34dcec[_0xcb71('0x15')]()});}else{fs[_0xcb71('0x93')](_0xa9d644,_0x3b58f1[_0xcb71('0x15')]()+'\x0a');}_0x3b58f1=[];}if(!(stats[_0xcb71('0x81')]%0xc8)){socket[_0xcb71('0x94')](_0xcb71('0x95')+_0x6908ad,stats);stats[_0xcb71('0x5f')]=[];}}if(stopped){logger[_0xcb71('0x5b')](_0xcb71('0x96'));_0x1c1665[_0xcb71('0x97')]();}}catch(_0x57a714){handleError(_0x3e732e[_0xcb71('0x80')][_0x1acae1],{'code':_0xcb71('0x98'),'message':_0x57a714[_0xcb71('0x5d')]});logger[_0xcb71('0x62')](_0xcb71('0x99'),_0x57a714[_0xcb71('0x5d')]);}},'complete':function(){try{var _0x4ce95b=[];var _0x282f16=[];var _0x489317=_0xcb71('0x35');if(_0x36a342['duplicates']&&_0x36a342[_0xcb71('0x9a')][_0xcb71('0x1b')]){_0x489317=_0xcb71('0x9b')+_0x6908ad;_0x4ce95b[_0xcb71('0x1c')](_0xcb71('0x9c')+_0x489317+_0xcb71('0x9d'));}tmp_campaigns=_0xcb71('0x9e')+_0x6908ad;tmp_voice_queues='voice_queues_'+_0x6908ad;_0x282f16[_0xcb71('0x1c')](_0xcb71('0x9c')+tmp_campaigns+_0xcb71('0x9f'));_0x282f16[_0xcb71('0x1c')]('CREATE\x20TABLE\x20'+tmp_voice_queues+_0xcb71('0x9f'));BPromise['each'](_0x282f16,handleTZQuery)[_0xcb71('0x1a')](function(_0x3a20f9){updateTzCampaigns(_0x36a342['ListId'])['then'](function(_0x2ca264){updateTzVoiceQueues(_0x36a342['ListId'])[_0xcb71('0x1a')](function(_0x4b9e9f){if(hasTZ)_0x308fda=_0x308fda['replace'](_0xcb71('0x70'),_0xcb71('0xa0'));var _0x4edd80=util[_0xcb71('0xf')](_0xcb71('0xa1'),_0xa9d644,_0x489317,_0x308fda,_0x36a342[_0xcb71('0x2e')],_0x36a342[_0xcb71('0x53')]||null,NOW,NOW);if(_[_0xcb71('0x20')](_0xc18a[_0xcb71('0x86')])){_0x4edd80+=_0xcb71('0xa2');}_0x4ce95b[_0xcb71('0x1c')](_0x4edd80);if(_0x36a342[_0xcb71('0x9a')]&&_0x36a342[_0xcb71('0x9a')][_0xcb71('0x1b')]){_0x4ce95b[_0xcb71('0x1c')](insertCmContact(_0x36a342[_0xcb71('0x2e')],_0x489317,_0x36a342[_0xcb71('0x9a')],_0xc18a));_0x4ce95b['push'](_0xcb71('0xa3')+_0x489317+';');}BPromise[_0xcb71('0xa4')](_0x4ce95b,handleQuery)['then'](function(_0x323b87){BPromise[_0xcb71('0x1d')]([handleAdditionalPhones()])[_0xcb71('0x1a')](function(){_0x4ce95b=[];for(var _0x37cccf=0x0;_0x37cccf<promisesAdditionalPhones[_0xcb71('0x1b')];_0x37cccf++){if(promisesAdditionalPhones[_0x37cccf][_0xcb71('0x13')]!='§'){_0x4ce95b[_0xcb71('0x1c')](createAdditionalPhone(promisesAdditionalPhones[_0x37cccf]['contactId'],promisesAdditionalPhones[_0x37cccf][_0xcb71('0xa5')],promisesAdditionalPhones[_0x37cccf][_0xcb71('0x13')],promisesAdditionalPhones[_0x37cccf][_0xcb71('0xa6')]));}}BPromise['all'](_0x4ce95b)[_0xcb71('0x1a')](function(){_0x4ce95b=[];if(hasTZ){_0x4ce95b[_0xcb71('0x1c')](insertTzCmHopper(_0x36a342['ListId'],_0xcb71('0x6c'),_0xcb71('0xa7'),_0xcb71('0xa8'),_0x442476,tmp_voice_queues));_0x4ce95b[_0xcb71('0x1c')](insertTzCmHopperBlack(_0x36a342['ListId'],'voice_queues_has_cm_blacklists',_0xcb71('0xa7'),_0xcb71('0xa8')));_0x4ce95b[_0xcb71('0x1c')](insertTzCmHopper(_0x36a342[_0xcb71('0x2e')],_0xcb71('0x66'),_0xcb71('0x65'),_0xcb71('0xa9'),_0x442476,tmp_campaigns));_0x4ce95b[_0xcb71('0x1c')](insertTzCmHopperBlack(_0x36a342[_0xcb71('0x2e')],_0xcb71('0xaa'),'campaigns',_0xcb71('0xa9')));_0x4ce95b[_0xcb71('0x1c')](insertCmHopperAdditionalPhones(_0x36a342[_0xcb71('0x2e')]));}else{_0x4ce95b[_0xcb71('0x1c')](insertCmHopper(_0x36a342['ListId'],_0xcb71('0x6c'),_0xcb71('0xa7'),_0xcb71('0xa8'),_0x442476));_0x4ce95b[_0xcb71('0x1c')](insertCmHopperBlack(_0x36a342[_0xcb71('0x2e')],_0xcb71('0xab'),_0xcb71('0xa7'),_0xcb71('0xa8')));_0x4ce95b['push'](insertCmHopper(_0x36a342[_0xcb71('0x2e')],_0xcb71('0x66'),_0xcb71('0x65'),_0xcb71('0xa9'),_0x442476));_0x4ce95b[_0xcb71('0x1c')](insertCmHopperBlack(_0x36a342['ListId'],_0xcb71('0xaa'),_0xcb71('0x65'),_0xcb71('0xa9')));_0x4ce95b[_0xcb71('0x1c')](insertCmHopperAdditionalPhones(_0x36a342['ListId']));}_0x4ce95b[_0xcb71('0x1c')](_0xcb71('0xa3')+tmp_campaigns+';');_0x4ce95b['push'](_0xcb71('0xa3')+tmp_voice_queues+';');BPromise[_0xcb71('0xa4')](_0x4ce95b,handleQuery)[_0xcb71('0x1a')](function(_0x14b576){stats[_0xcb71('0xac')]=!![];stats[_0xcb71('0xad')]=_0x36a342['duplicates']&&_0x36a342[_0xcb71('0x9a')][_0xcb71('0x1b')]?results[0x2][_0xcb71('0xad')]:results[0x0][_0xcb71('0xad')];socket[_0xcb71('0x94')](_0xcb71('0x95')+_0x6908ad,stats);fs[_0xcb71('0xae')](_0xcdda25);fs['unlink'](_0xa9d644);process[_0xcb71('0x5e')](0x0);})['catch'](function(_0x13d163){logger['error'](_0x13d163['message']);process[_0xcb71('0x5e')](0x1);});});});})[_0xcb71('0x61')](function(_0x4520d1){logger[_0xcb71('0x62')](_0x4520d1[_0xcb71('0x5d')]);process[_0xcb71('0x5e')](0x1);});});});});}catch(_0x318676){logger[_0xcb71('0x62')](_0xcb71('0xaf'),_0x318676['message']);process[_0xcb71('0x5e')](0x1);}},'error':function(_0x38577c,_0x29b971,_0x5b26be,_0xcab114){throw new Error(_0xcab114);}});});}function validate(){if(process[_0xcb71('0xb0')]&&process[_0xcb71('0xb0')][_0xcb71('0x1b')]<0x4){throw new Error(_0xcb71('0xb1'));}var _0x16481a=path[_0xcb71('0x15')](config[_0xcb71('0xb2')],_0xcb71('0x77'),process['argv'][0x2]);if(!fs[_0xcb71('0xb3')](_0x16481a)){throw new Error('file\x20doesn\x27t\x20exists');}var _0x5e27c1={};try{_0x5e27c1=JSON[_0xcb71('0xb4')](process['argv'][0x3]);if(!_0x5e27c1[_0xcb71('0x75')]){throw new Error(_0xcb71('0xb5'));}if(!_0x5e27c1[_0xcb71('0x75')][_0xcb71('0x13')]){throw new Error(_0xcb71('0xb6'));}if(!_0x5e27c1['binding'][_0xcb71('0x8e')]){throw new Error(_0xcb71('0xb7'));}var _0x7efe6f=0x0;if(_0x5e27c1['binding'][_0xcb71('0x32')]){_0x7efe6f=0x1;}if(!_0x5e27c1[_0xcb71('0x2e')]){throw new Error(_0xcb71('0xb8'));}}catch(_0x4a38b6){throw new Error(_0xcb71('0xb9'));}var _0x33623a=[];try{_0x33623a=_[_0xcb71('0xba')](JSON[_0xcb71('0xb4')](process[_0xcb71('0xb0')][0x4]),'id');}catch(_0x427b97){logger['info'](_0xcb71('0xbb'));}main(_0x16481a,_0x5e27c1,_0x33623a,_0x7efe6f);}validate();process['on']('SIGINT',handleStop);process['on'](_0xcb71('0xbc'),handleUncaughtException);
\ No newline at end of file
+var _0xda2d=['.CmListId\x20=\x20?','cm_contacts.createdAt\x20=\x20?','cm_contacts.phone\x20NOT\x20IN\x20(?)','\x22always\x22','cm_contacts.createdAt','cm_hopper_black','fields','ListId\x20=\x20?','\x20=\x20','date_add(cm_contacts.scheduledat,interval\x20','.offset-cm_contacts.utcOffset\x20minute)','.id\x20=\x20','\x22onlyIfOpen\x22','toString','cm_contact_has_items.item','cm_contact_has_items.createdAt','cm_contact_has_items.updatedAt','CmHopperId','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','keys','CompanyId','scheduledAt','deletedAt\x20IS\x20NULL','min_id','group','info','exit','errors','code','sequelize','query','spread','catch','message','campaigns.id','campaigns.dialTimezone','campaigns','campaigns_has_cm_lists','campaigns.id\x20=\x20campaigns_has_cm_lists.CampaignId','campaigns_has_cm_lists.CmListId=','error','voice_queues.dialTimezone','voice_queues','voice_queues_has_cm_lists','timezones','offset','set','dialTimezone','main','stringify','send','start','binding','socket_timestamp','server/files/tmp','.csv','includes','findAll','name','_description','header','writeFileSync','parse','data','rows','find','hasOwnProperty','trim','isValid','isNaN','agent\x20not\x20exists','email','email\x20wrong\x20format','dateOfBirth','YYYY-MM-DD','dateOfBirth\x20wrong\x20format\x20(YYYY-MM-DD)','utcOffset','firstName','\x20not\x20specified','replace','itemTypeId','description','SystemRow','appendFileSync','emit','contact:import:','SystemError','duplicates','CREATE\x20TABLE\x20','\x20LIKE\x20cm_contacts;','campaigns_','(id\x20int,dialTimezone\x20varchar(255),offset\x20int);','each','dialTimezone,utcOffset','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','contactTypeId','orderBy','VoiceQueueId','CampaignId','campaigns_has_cm_blacklists','voice_queues_has_cm_blacklists','finish','affectedRows','unlink','complete','argv','root','existsSync','file\x20doesn\x27t\x20exists','binding\x20doesn\x27t\x20exists','firstName\x20is\x20mandatory','ListId\x20is\x20mandatory','SIGINT','uncaughtException','path','papaparse','util','bluebird','moment','squel','ioredis','../../../mysqldb','../../../config/environment','../../../config/environment/shared','../../../config/logger','redis','defaults','localhost','socket.io-emitter','format','YYYY-MM-DD\x20HH:mm:ss','test','select','field','phone','from','where','.dialCheckDuplicateType\x20IN\x20(','join','CmContact','then','length','push','all','AdditionalPhones','split','isNil','filter','CmContactHasItem','update','updated','create','PHONE','inserted','cm_contacts.phone','cm_contacts.scheduledat','cm_contacts.id','cm_contacts.ListId','cm_contacts.updatedAt','cm_contacts.UserId','insert','into','cm_hopper','fromQuery','scheduledat','ContactId','ListId','createdAt','updatedAt','priority','UserId','cm_contacts','cm_contacts.ListId\x20=\x20','.CmListId'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0xda2d,0x1e0));var _0xdda2=function(_0x327329,_0x4f3c34){_0x327329=_0x327329-0x0;var _0x2a226c=_0xda2d[_0x327329];return _0x2a226c;};'use strict';var fs=require('fs');var path=require(_0xdda2('0x0'));var _=require('lodash');var Papa=require(_0xdda2('0x1'));var util=require(_0xdda2('0x2'));var BPromise=require(_0xdda2('0x3'));var moment=require(_0xdda2('0x4'));var squel=require(_0xdda2('0x5'));var Redis=require(_0xdda2('0x6'));var db=require(_0xdda2('0x7'))['db'];var config=require(_0xdda2('0x8'));var shared=require(_0xdda2('0x9'));var logger=require(_0xdda2('0xa'))('import');config[_0xdda2('0xb')]=_[_0xdda2('0xc')](config['redis'],{'host':_0xdda2('0xd'),'port':0x18eb});var socket=require(_0xdda2('0xe'))(new Redis(config[_0xdda2('0xb')]));var stats={'finish':![],'errors':[],'rows':0x0,'affectedRows':0x0};var results=[];var promisesAdditionalPhones=[];var orderBy=0x0;var stopped=![];var NOW=moment()[_0xdda2('0xf')](_0xdda2('0x10'));var contactItemTypes=[];var phoneDescriptions=[];var hasAdditionalPhones=![];var tmp_voice_queues;var tmp_campaigns;var tzOffset=0x0;var hasTZ;var NOW=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');function isEmail(_0x5c178d){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))*$/[_0xdda2('0x11')](_0x5c178d);}function selectNotIn(_0x3d5e3c,_0x3a249c,_0x21fe57,_0x1c277d,_0x5b59df){return squel[_0xdda2('0x12')]()[_0xdda2('0x13')](_0xdda2('0x14'))[_0xdda2('0x15')](_0x1c277d)['join'](_0x3a249c,null,_0x3a249c+'.id\x20=\x20'+_0x1c277d+'.'+_0x21fe57)[_0xdda2('0x16')](_0x1c277d+'.'+_0x21fe57+'\x20=\x20'+_0x3d5e3c+'.'+_0x21fe57)[_0xdda2('0x16')](_0x3a249c+_0xdda2('0x17')+_0x5b59df[_0xdda2('0x18')]()+')');}function handleAdditionalPhones(){return new Promise(function(_0x4e71a2,_0x3dd809){promisesAdditionalPhones=[];return db[_0xdda2('0x19')]['findAll']({'raw':!![],'attributes':['id','AdditionalPhones'],'where':{'createdAt':NOW,'AdditionalPhones':{'$ne':null}}})[_0xdda2('0x1a')](function(_0x19cc6f){if(_0x19cc6f!==null){var _0x6dc72a=[];for(var _0x43ac97=0x0;_0x43ac97<_0x19cc6f[_0xdda2('0x1b')];_0x43ac97++){var _0x5f4f64=_0x19cc6f[_0x43ac97];_0x6dc72a[_0xdda2('0x1c')](insertAdditionalPhones(_0x5f4f64));}}Promise[_0xdda2('0x1d')](_0x6dc72a)[_0xdda2('0x1a')](function(){_0x4e71a2({'val':0x1});});});});}function insertAdditionalPhones(_0x1a1b54){return new Promise(function(_0x3b7980,_0x40eba3){var _0x1ccb7f=_0x1a1b54[_0xdda2('0x1e')];var _0x5cad32=_0x1ccb7f[_0xdda2('0x1f')](';');var _0x20826c=[];orderBy=0x0;for(var _0x529f9e=0x0;_0x529f9e<_0x5cad32['length'];_0x529f9e++){_0x20826c[_0xdda2('0x1c')](splitAdditionalPhone(_0x1a1b54['id'],_0x5cad32[_0x529f9e]));}Promise[_0xdda2('0x1d')](_0x20826c)[_0xdda2('0x1a')](function(){_0x3b7980({'val':_0x5cad32['length']});});});}function splitAdditionalPhone(_0x392213,_0x216aa2){return new Promise(function(_0x199cf6,_0x42ee02){var _0x2d71c9=_0x216aa2[_0xdda2('0x1f')](':');var _0x1d6006=_0x2d71c9[0x0];var _0x54c85b=_0x2d71c9[0x1];if(!_[_0xdda2('0x20')](_0x54c85b)){var _0x165573=_0x54c85b[_0xdda2('0x1f')]('|');var _0x12b437=[];for(var _0x36949c=0x0;_0x36949c<_0x165573[_0xdda2('0x1b')];_0x36949c++){if(_0x165573[_0x36949c]!==''){var _0x499dda=_[_0xdda2('0x21')](promisesAdditionalPhones,{'contactId':_0x392213,'phone':_0x165573[_0x36949c]});if(_0x499dda[_0xdda2('0x1b')]==0x0){orderBy++;promisesAdditionalPhones[_0xdda2('0x1c')]({'contactId':_0x392213,'contactTypeId':_0x1d6006,'phone':_0x165573[_0x36949c],'orderBy':orderBy});}}}_0x199cf6({'ok':0x1});}else _0x199cf6({'res':0x0});});}function createAdditionalPhone(_0x16d801,_0x3dadc8,_0x3517cb,_0x455758){var _0x1d5277='';var _0x4a8703='';var _0x18e1c7=_0x3517cb[_0xdda2('0x1f')]('§');_0x1d5277=_0x18e1c7[0x0];if(_0x18e1c7['length']==0x2)_0x4a8703=_0x18e1c7[0x1];return new Promise(function(_0x3a6807,_0x5d21fe){return db[_0xdda2('0x22')]['findOne']({'where':{'CmContactId':_0x16d801,'item':_0x1d5277}})[_0xdda2('0x1a')](function(_0x5d182e){if(_0x5d182e){return db[_0xdda2('0x22')][_0xdda2('0x23')]({'ItemTypeId':_0x3dadc8,'description':_0x4a8703,'OrderBy':_0x455758},{'where':{'CmContactId':_0x16d801,'item':_0x1d5277}})[_0xdda2('0x1a')](function(_0x2f00c6){_0x3a6807({'res':_0xdda2('0x24')});});}else{return db[_0xdda2('0x22')][_0xdda2('0x25')]({'CmContactId':_0x16d801,'item':_0x1d5277,'description':_0x4a8703,'ItemTypeId':_0x3dadc8,'OrderBy':_0x455758,'ItemClass':_0xdda2('0x26')})[_0xdda2('0x1a')](function(_0x4b2658){_0x3a6807({'res':_0xdda2('0x27')});});}});});}function insertCmHopper(_0x16ffe5,_0x192b46,_0x448282,_0xa8ec52,_0x1300fd){var _0x55c96e=[_0xdda2('0x28'),_0xdda2('0x29'),_0xdda2('0x2a'),_0xdda2('0x2b'),_0x192b46+'.'+_0xa8ec52,'cm_contacts.createdAt',_0xdda2('0x2c'),'cm_contacts.priority',_0xdda2('0x2d'),'\x22'+_0x1300fd+'\x22'];return squel[_0xdda2('0x2e')]()[_0xdda2('0x2f')](_0xdda2('0x30'))[_0xdda2('0x31')]([_0xdda2('0x14'),_0xdda2('0x32'),_0xdda2('0x33'),_0xdda2('0x34'),_0xa8ec52,_0xdda2('0x35'),_0xdda2('0x36'),_0xdda2('0x37'),_0xdda2('0x38'),'recallme'],squel[_0xdda2('0x12')]()['fields'](_0x55c96e)[_0xdda2('0x15')](_0x192b46)[_0xdda2('0x18')](_0xdda2('0x39'),null,_0xdda2('0x3a')+_0x192b46+_0xdda2('0x3b'))[_0xdda2('0x18')](_0x448282,null,_0x448282+'.id\x20=\x20'+_0x192b46+'.'+_0xa8ec52)[_0xdda2('0x16')](_0x192b46+_0xdda2('0x3c'),_0x16ffe5)['where'](_0xdda2('0x3d'),NOW)[_0xdda2('0x16')](_0xdda2('0x3e'),selectNotIn(_0x192b46,_0x448282,_0xa8ec52,_0xdda2('0x30'),['\x22always\x22','\x22onlyIfOpen\x22']))[_0xdda2('0x16')](_0xdda2('0x3e'),selectNotIn(_0x192b46,_0x448282,_0xa8ec52,_0xdda2('0x30'),[_0xdda2('0x3f')])))['toString']();}function insertCmHopperBlack(_0xa8f3bd,_0x54114f,_0x3d86d4,_0x2de72c){var _0x29dba5=[_0xdda2('0x28'),_0xdda2('0x2a'),_0xdda2('0x2b'),_0x54114f+'.'+_0x2de72c,_0xdda2('0x40'),_0xdda2('0x2c')];return squel[_0xdda2('0x2e')]()['into'](_0xdda2('0x41'))[_0xdda2('0x31')](['phone',_0xdda2('0x33'),_0xdda2('0x34'),_0x2de72c,_0xdda2('0x35'),'updatedAt'],squel['select']()[_0xdda2('0x42')](_0x29dba5)[_0xdda2('0x15')](_0x54114f)[_0xdda2('0x18')](_0xdda2('0x39'),null,'cm_contacts.ListId\x20=\x20'+_0x54114f+_0xdda2('0x3b'))[_0xdda2('0x18')](_0x3d86d4,null,_0x3d86d4+'.id\x20=\x20'+_0x54114f+'.'+_0x2de72c)[_0xdda2('0x16')](_0x54114f+_0xdda2('0x3c'),_0xa8f3bd)['where'](_0xdda2('0x3d'),NOW)[_0xdda2('0x16')](_0xdda2('0x3e'),squel[_0xdda2('0x12')]()[_0xdda2('0x13')](_0xdda2('0x14'))[_0xdda2('0x15')]('cm_hopper_black')['where'](_0xdda2('0x43'),_0xa8f3bd)['where'](_0x2de72c+_0xdda2('0x44')+_0x54114f+'.'+_0x2de72c)))['toString']();}function insertTzCmHopper(_0x57a0af,_0x30a6f7,_0x7d808f,_0x32e7a2,_0x56c869,_0x124ac2){var _0x29a536=[_0xdda2('0x28'),_0xdda2('0x45')+_0x124ac2+_0xdda2('0x46'),_0xdda2('0x2a'),_0xdda2('0x2b'),_0x30a6f7+'.'+_0x32e7a2,_0xdda2('0x40'),_0xdda2('0x2c'),'cm_contacts.priority',_0xdda2('0x2d'),'\x22'+_0x56c869+'\x22'];var _0x3cc1d9=squel[_0xdda2('0x2e')]()[_0xdda2('0x2f')](_0xdda2('0x30'))[_0xdda2('0x31')](['phone','scheduledat','ContactId',_0xdda2('0x34'),_0x32e7a2,_0xdda2('0x35'),_0xdda2('0x36'),_0xdda2('0x37'),'UserId','recallme'],squel[_0xdda2('0x12')]()[_0xdda2('0x42')](_0x29a536)[_0xdda2('0x15')](_0x30a6f7)[_0xdda2('0x18')]('cm_contacts',null,_0xdda2('0x3a')+_0x30a6f7+_0xdda2('0x3b'))[_0xdda2('0x18')](_0x7d808f,null,_0x7d808f+_0xdda2('0x47')+_0x30a6f7+'.'+_0x32e7a2)[_0xdda2('0x18')](_0x124ac2,null,_0x124ac2+_0xdda2('0x47')+_0x30a6f7+'.'+_0x32e7a2)[_0xdda2('0x16')](_0x30a6f7+'.CmListId\x20=\x20?',_0x57a0af)[_0xdda2('0x16')]('cm_contacts.createdAt\x20=\x20?',NOW)[_0xdda2('0x16')](_0xdda2('0x3e'),selectNotIn(_0x30a6f7,_0x7d808f,_0x32e7a2,_0xdda2('0x30'),[_0xdda2('0x3f'),_0xdda2('0x48')]))[_0xdda2('0x16')](_0xdda2('0x3e'),selectNotIn(_0x30a6f7,_0x7d808f,_0x32e7a2,_0xdda2('0x30'),[_0xdda2('0x3f')])))[_0xdda2('0x49')]();return _0x3cc1d9;}function insertTzCmHopperBlack(_0x3836f2,_0x394eb8,_0x2230a0,_0x3dcaca){var _0x3e0a72=[_0xdda2('0x28'),_0xdda2('0x2a'),_0xdda2('0x2b'),_0x394eb8+'.'+_0x3dcaca,_0xdda2('0x40'),_0xdda2('0x2c')];return squel[_0xdda2('0x2e')]()['into'](_0xdda2('0x41'))[_0xdda2('0x31')](['phone',_0xdda2('0x33'),_0xdda2('0x34'),_0x3dcaca,'createdAt',_0xdda2('0x36')],squel['select']()[_0xdda2('0x42')](_0x3e0a72)[_0xdda2('0x15')](_0x394eb8)[_0xdda2('0x18')]('cm_contacts',null,_0xdda2('0x3a')+_0x394eb8+_0xdda2('0x3b'))[_0xdda2('0x18')](_0x2230a0,null,_0x2230a0+'.id\x20=\x20'+_0x394eb8+'.'+_0x3dcaca)['where'](_0x394eb8+_0xdda2('0x3c'),_0x3836f2)[_0xdda2('0x16')](_0xdda2('0x3d'),NOW)[_0xdda2('0x16')](_0xdda2('0x3e'),squel[_0xdda2('0x12')]()[_0xdda2('0x13')]('phone')[_0xdda2('0x15')](_0xdda2('0x41'))[_0xdda2('0x16')](_0xdda2('0x43'),_0x3836f2)[_0xdda2('0x16')](_0x3dcaca+_0xdda2('0x44')+_0x394eb8+'.'+_0x3dcaca)))['toString']();}function insertCmHopperAdditionalPhones(_0x4f91e1){var _0x50f898=['cm_hopper.id',_0xdda2('0x4a'),'cm_contact_has_items.OrderBy',_0xdda2('0x4b'),_0xdda2('0x4c')];return squel['insert']()[_0xdda2('0x2f')]('cm_hopper_additional_phones')[_0xdda2('0x31')]([_0xdda2('0x4d'),'phone','OrderBy',_0xdda2('0x35'),_0xdda2('0x36')],squel[_0xdda2('0x12')]()['fields'](_0x50f898)[_0xdda2('0x15')](_0xdda2('0x30'))[_0xdda2('0x18')]('cm_contacts',null,_0xdda2('0x4e'))['join'](_0xdda2('0x4f'),null,_0xdda2('0x50'))[_0xdda2('0x16')](_0xdda2('0x51'),_0x4f91e1)[_0xdda2('0x16')](_0xdda2('0x3d'),NOW))[_0xdda2('0x49')]();}function insertCmContact(_0x5f1542,_0x318130,_0x12a5d3,_0x34aef3){var _0x3e9b35=_[_0xdda2('0x52')](_[_0xdda2('0x53')](_0x34aef3),[_0xdda2('0x34'),_0xdda2('0x54'),_0xdda2('0x35'),'updatedAt',_0xdda2('0x55')]);return squel[_0xdda2('0x2e')]()['into'](_0xdda2('0x39'))['fromQuery'](_0x3e9b35,squel[_0xdda2('0x12')]()[_0xdda2('0x42')](_0x3e9b35)[_0xdda2('0x15')](_0x318130)[_0xdda2('0x16')]('('+_0x12a5d3[_0xdda2('0x18')](',')+')\x20NOT\x20IN\x20?',squel[_0xdda2('0x12')]()['fields'](_0x12a5d3)[_0xdda2('0x15')](_0xdda2('0x39'))['where']('ListId\x20=\x20?',_0x5f1542)[_0xdda2('0x16')](_0xdda2('0x56')))['where']('id\x20IN\x20?',squel['select']()[_0xdda2('0x13')]('MIN(id)',_0xdda2('0x57'))[_0xdda2('0x15')](_0x318130)[_0xdda2('0x58')](_0x12a5d3['join'](','))))['toString']();}function handleStop(){logger[_0xdda2('0x59')]('Received\x20SIGINT');stopped=!![];}function handleUncaughtException(_0x3f5769){logger['error'](_0x3f5769['message']);process[_0xdda2('0x5a')](0x1);}function handleError(_0x3bca93,_0x296295){stats[_0xdda2('0x5b')]['push']({'name':_0x296295[_0xdda2('0x5c')],'message':_0x296295['message'],'row':_0x3bca93});}function handleQuery(_0x3e34a0){logger['info'](_0x3e34a0);return db[_0xdda2('0x5d')][_0xdda2('0x5e')](_0x3e34a0)[_0xdda2('0x5f')](function(_0x886cb7){results[_0xdda2('0x1c')](_0x886cb7);})[_0xdda2('0x60')](function(_0x71e559){logger['error'](_0x71e559[_0xdda2('0x61')]);});}function updateTzCampaigns(_0x396a64){return new Promise(function(_0x18ffe0,_0x462790){var _0x3c69dd=squel['select']()[_0xdda2('0x42')]([_0xdda2('0x62'),_0xdda2('0x63')])['from'](_0xdda2('0x64'))[_0xdda2('0x18')](_0xdda2('0x65'),null,_0xdda2('0x66'))[_0xdda2('0x16')](_0xdda2('0x67')+_0x396a64);db['sequelize'][_0xdda2('0x5e')](_0x3c69dd[_0xdda2('0x49')]())['spread'](function(_0x69a800){var _0x13fc4f=[];for(var _0x1e287e=0x0;_0x1e287e<_0x69a800['length'];_0x1e287e++){_0x13fc4f[_0xdda2('0x1c')](getTimezoneData(_0x69a800[_0x1e287e],tmp_campaigns));}BPromise['all'](_0x13fc4f)['then'](function(){_0x18ffe0({'val':0x1});});})[_0xdda2('0x60')](function(_0x1175aa){logger[_0xdda2('0x68')](_0x1175aa['message']);_0x18ffe0({'val':0x0});});});}function updateTzVoiceQueues(_0xe90d07){return new Promise(function(_0x12a49b,_0x40c673){var _0x33c5a8=squel[_0xdda2('0x12')]()[_0xdda2('0x42')](['voice_queues.id',_0xdda2('0x69')])[_0xdda2('0x15')](_0xdda2('0x6a'))[_0xdda2('0x18')](_0xdda2('0x6b'),null,'voice_queues.id\x20=\x20voice_queues_has_cm_lists.VoiceQueueId')[_0xdda2('0x16')]('voice_queues_has_cm_lists.CmListId='+_0xe90d07);db[_0xdda2('0x5d')][_0xdda2('0x5e')](_0x33c5a8[_0xdda2('0x49')]())['spread'](function(_0x1e083f){var _0x135323=[];for(var _0x3cffca=0x0;_0x3cffca<_0x1e083f[_0xdda2('0x1b')];_0x3cffca++){_0x135323[_0xdda2('0x1c')](getTimezoneData(_0x1e083f[_0x3cffca],tmp_voice_queues));}BPromise[_0xdda2('0x1d')](_0x135323)['then'](function(){_0x12a49b({'val':0x1});});})[_0xdda2('0x60')](function(_0x3190a4){logger[_0xdda2('0x68')](_0x3190a4[_0xdda2('0x61')]);_0x12a49b({'val':0x0});});});}function getTimezoneData(_0xe614ef,_0x33e3f9){return new Promise(function(_0x5059c1,_0x3248fe){var _0x1c1d8e=shared[_0xdda2('0x6c')];var _0x25b8c9=_0x1c1d8e[_0xe614ef['dialTimezone']];if(_[_0xdda2('0x20')](_0x25b8c9)){_0x5059c1({'ret':0x1});}else{var _0x848e20=_0x25b8c9['utcOffset'];var _0x330636=squel['insert']()[_0xdda2('0x2f')](_0x33e3f9)['set']('id',_0xe614ef['id'])['set'](_0xdda2('0x6d'),_0x848e20)[_0xdda2('0x6e')](_0xdda2('0x6f'),_0xe614ef[_0xdda2('0x6f')])[_0xdda2('0x49')]();return db['sequelize']['query'](_0x330636)[_0xdda2('0x5f')](function(_0x504d30){_0x5059c1({'ret':0x1});})[_0xdda2('0x60')](function(_0x3e64ee){logger[_0xdda2('0x68')](_0x3e64ee[_0xdda2('0x61')]);_0x3248fe({'ret':0x1});});}});}function handleTZQuery(_0x519966){logger[_0xdda2('0x59')](_0x519966);return db[_0xdda2('0x5d')]['query'](_0x519966)[_0xdda2('0x5f')](function(_0x16af22){})['catch'](function(_0x8d863){logger[_0xdda2('0x68')](_0x8d863[_0xdda2('0x61')]);});}function main(_0x18b569,_0x4ddd29,_0xec4584,_0x52a8dc){logger[_0xdda2('0x59')](_0xdda2('0x70'),_0x18b569,JSON[_0xdda2('0x71')](_0x4ddd29));process[_0xdda2('0x72')](_0xdda2('0x73'));var _0x1421fd=_0x4ddd29[_0xdda2('0x74')];var _0x247b01=_['clone'](_0x1421fd);var _0x1b5271=_0x4ddd29[_0xdda2('0x75')];var _0x3db41b=path[_0xdda2('0x18')](config['root'],_0xdda2('0x76'),_0x1b5271+_0xdda2('0x77'));hasTZ=_[_0xdda2('0x53')](_0x1421fd)[_0xdda2('0x78')](_0xdda2('0x6f'));var _0x42b800=_['keys'](_0x1421fd)[_0xdda2('0x18')]();logger[_0xdda2('0x59')]('header',_0x42b800);db['ContactItemType'][_0xdda2('0x79')]({'raw':!![],'attributes':['id',_0xdda2('0x7a')]})[_0xdda2('0x1a')](function(_0x3f4cea){for(var _0x5ae21d=0x0;_0x5ae21d<_0x3f4cea[_0xdda2('0x1b')];_0x5ae21d++){if(_0x3f4cea[_0x5ae21d][_0xdda2('0x7a')]in _0x1421fd){contactItemTypes[_0xdda2('0x1c')](_0x3f4cea[_0x5ae21d]);delete _0x247b01[_0x3f4cea[_0x5ae21d]['name']];hasAdditionalPhones=!![];}for(var _0x14647a in _0x1421fd){if(_0x3f4cea[_0x5ae21d][_0xdda2('0x7a')]+_0xdda2('0x7b')===_0x14647a){phoneDescriptions[_0xdda2('0x1c')]({'itemTypeId':_0x3f4cea[_0x5ae21d]['id'],'description':_0x14647a});delete _0x247b01[_0x14647a];}}}if(hasAdditionalPhones)_0x247b01['AdditionalPhones']='';var _0x277e1e=_[_0xdda2('0x53')](_0x247b01)[_0xdda2('0x18')]();logger[_0xdda2('0x59')](_0xdda2('0x7c'),_0x277e1e);fs[_0xdda2('0x7d')](_0x3db41b,_0x277e1e+'\x0a');Papa[_0xdda2('0x7e')](fs['createReadStream'](_0x18b569),{'header':!![],'skipEmptyLines':!![],'step':function(_0x49b598,_0x31efa7){try{for(var _0xb09826=0x0,_0x5e98c5=[];_0xb09826<_0x49b598[_0xdda2('0x7f')][_0xdda2('0x1b')];_0xb09826++){stats[_0xdda2('0x80')]+=0x1;if(_0x49b598[_0xdda2('0x5b')][_0xb09826]){handleError(_0x49b598['data'][_0xb09826],_0x49b598[_0xdda2('0x5b')][_0xb09826]);}else{var _0x45d03b=[];var _0x356bae=[];var _0x1b8633={};for(var _0x1bd109 in _0x1421fd){let _0x462afd=contactItemTypes[_0xdda2('0x81')](_0x1a63c5=>_0x1a63c5[_0xdda2('0x7a')]===_0x1bd109);let _0x2bf7cc=contactItemTypes[_0xdda2('0x81')](_0x108d77=>_0x108d77[_0xdda2('0x7a')]+'_description'===_0x1bd109);if(_[_0xdda2('0x20')](_0x462afd)&&_['isNil'](_0x2bf7cc)){if(_0x1421fd[_0xdda2('0x82')](_0x1bd109)){if(_0x49b598[_0xdda2('0x7f')][_0xb09826][_0x1421fd[_0x1bd109]]){var _0x325d5b=_[_0xdda2('0x83')](_0x49b598[_0xdda2('0x7f')][_0xb09826][_0x1421fd[_0x1bd109]]['replace'](/"/g,'\x27'));switch(_0x1bd109){case'scheduledat':var _0x469259=moment(_0x325d5b,'YYYY-MM-DD\x20HH:mm:ss',!![]);if(_0x469259[_0xdda2('0x84')]()){_0x5e98c5[_0xdda2('0x1c')]('\x22'+_0x325d5b+'\x22');}else{_0x45d03b[_0xdda2('0x1c')]('scheduledat\x20wrong\x20format\x20(YYYY-MM-DD\x20HH:mm:ss)');}break;case'priority':var _0x5ad758=parseInt(_0x325d5b);_0x325d5b=_[_0xdda2('0x85')](_0x5ad758)||_0x5ad758<0x0||_0x5ad758>0x4?_0x52a8dc?0x3:0x2:_0x5ad758;_0x5e98c5['push']('\x22'+_0x325d5b+'\x22');break;case _0xdda2('0x38'):var _0x3f12d0=parseInt(_0x325d5b);if(_['isNumber'](_0x3f12d0)&&_[_0xdda2('0x78')](_0xec4584,_0x3f12d0)){_0x5e98c5[_0xdda2('0x1c')]('\x22'+_0x3f12d0+'\x22');}else{_0x45d03b[_0xdda2('0x1c')](_0xdda2('0x86'));}break;case _0xdda2('0x87'):if(isEmail(_0x325d5b)){_0x5e98c5[_0xdda2('0x1c')]('\x22'+_0x325d5b+'\x22');}else{_0x45d03b[_0xdda2('0x1c')](_0xdda2('0x88'));}break;case _0xdda2('0x89'):var _0x56d89e=moment(_0x325d5b,_0xdda2('0x8a'),!![]);if(_0x56d89e[_0xdda2('0x84')]()){_0x5e98c5[_0xdda2('0x1c')]('\x22'+_0x325d5b+'\x22');}else{_0x45d03b['push'](_0xdda2('0x8b'));}break;case _0xdda2('0x6f'):var _0xc8ba23=shared[_0xdda2('0x6c')];var _0x4f611e=_0xc8ba23[_0x325d5b];if(!_[_0xdda2('0x20')](_0x4f611e)){var _0x5f2729=_0x4f611e[_0xdda2('0x8c')];_0x5e98c5[_0xdda2('0x1c')]('\x22'+_0x325d5b+'\x22');_0x5e98c5[_0xdda2('0x1c')]('\x22'+_0x5f2729+'\x22');}break;default:_0x5e98c5['push']('\x22'+_0x325d5b+'\x22');}}else{switch(_0x1bd109){case _0xdda2('0x8d'):case'phone':_0x45d03b['push'](_0x1bd109+_0xdda2('0x8e'));break;default:_0x5e98c5[_0xdda2('0x1c')]('\x22\x22');}}}}else{var _0x1f628e='';if(!_['isNil'](_0x462afd)){if(!_0x1b8633['hasOwnProperty'](_0x462afd['id'])){if(!_[_0xdda2('0x20')](_0x49b598[_0xdda2('0x7f')][_0xb09826][_0x1421fd[_0x1bd109]])){var _0x325d5b=_[_0xdda2('0x83')](_0x49b598[_0xdda2('0x7f')][_0xb09826][_0x1421fd[_0x1bd109]][_0xdda2('0x8f')](/"/g,'\x27'));var _0x369b8a=phoneDescriptions['find'](_0x51b45a=>_0x51b45a[_0xdda2('0x90')]===_0x462afd['id']);if(!_[_0xdda2('0x20')](_0x369b8a)){var _0x26be24=_[_0xdda2('0x83')](_0x49b598[_0xdda2('0x7f')][_0xb09826][_0x1421fd[_0x369b8a[_0xdda2('0x91')]]][_0xdda2('0x8f')](/"/g,'\x27'));if(!_[_0xdda2('0x20')](_0x26be24))_0x325d5b=_0x325d5b+'§'+_0x26be24;}if(_0x1f628e=='')_0x1f628e=_0x325d5b;else _0x1f628e+='|'+_0x325d5b;}_0x356bae[_0xdda2('0x1c')](_0x462afd['id']+':'+_0x1f628e);_0x1b8633[_0x462afd['id']]=0x1;}}}}if(hasAdditionalPhones){_0x5e98c5[_0xdda2('0x1c')]('\x22'+_0x356bae[_0xdda2('0x18')](';')+'\x22');}if(_0x45d03b[_0xdda2('0x1b')]){handleError(_0x49b598['data'][_0xb09826],{'code':_0xdda2('0x92'),'message':_0x45d03b[_0xdda2('0x18')]()});}else{fs[_0xdda2('0x93')](_0x3db41b,_0x5e98c5[_0xdda2('0x18')]()+'\x0a');}_0x5e98c5=[];}if(!(stats['rows']%0xc8)){socket[_0xdda2('0x94')](_0xdda2('0x95')+_0x1b5271,stats);stats[_0xdda2('0x5b')]=[];}}if(stopped){logger[_0xdda2('0x59')]('Abort\x20parser');_0x31efa7['abort']();}}catch(_0x56a243){handleError(_0x49b598[_0xdda2('0x7f')][_0xb09826],{'code':_0xdda2('0x96'),'message':_0x56a243['message']});logger[_0xdda2('0x68')]('step',_0x56a243[_0xdda2('0x61')]);}},'complete':function(){try{var _0x36abe9=[];var _0x26eaaa=[];var _0x4f6812=_0xdda2('0x39');if(_0x4ddd29[_0xdda2('0x97')]&&_0x4ddd29[_0xdda2('0x97')][_0xdda2('0x1b')]){_0x4f6812='cm_contacts_'+_0x1b5271;_0x36abe9[_0xdda2('0x1c')](_0xdda2('0x98')+_0x4f6812+_0xdda2('0x99'));}tmp_campaigns=_0xdda2('0x9a')+_0x1b5271;tmp_voice_queues='voice_queues_'+_0x1b5271;_0x26eaaa[_0xdda2('0x1c')](_0xdda2('0x98')+tmp_campaigns+_0xdda2('0x9b'));_0x26eaaa[_0xdda2('0x1c')](_0xdda2('0x98')+tmp_voice_queues+_0xdda2('0x9b'));BPromise[_0xdda2('0x9c')](_0x26eaaa,handleTZQuery)[_0xdda2('0x1a')](function(_0x434876){updateTzCampaigns(_0x4ddd29['ListId'])['then'](function(_0x1ccc8a){updateTzVoiceQueues(_0x4ddd29[_0xdda2('0x34')])[_0xdda2('0x1a')](function(_0x18839f){if(hasTZ)_0x277e1e=_0x277e1e[_0xdda2('0x8f')](_0xdda2('0x6f'),_0xdda2('0x9d'));var _0x1737ff=util['format'](_0xdda2('0x9e'),_0x3db41b,_0x4f6812,_0x277e1e,_0x4ddd29[_0xdda2('0x34')],_0x4ddd29['CompanyId']||null,NOW,NOW);if(_['isNil'](_0x1421fd['scheduledat'])){_0x1737ff+=_0xdda2('0x9f');}_0x36abe9[_0xdda2('0x1c')](_0x1737ff);if(_0x4ddd29[_0xdda2('0x97')]&&_0x4ddd29[_0xdda2('0x97')]['length']){_0x36abe9[_0xdda2('0x1c')](insertCmContact(_0x4ddd29[_0xdda2('0x34')],_0x4f6812,_0x4ddd29['duplicates'],_0x1421fd));_0x36abe9['push'](_0xdda2('0xa0')+_0x4f6812+';');}BPromise['each'](_0x36abe9,handleQuery)['then'](function(_0x54bf8a){BPromise[_0xdda2('0x1d')]([handleAdditionalPhones()])[_0xdda2('0x1a')](function(){_0x36abe9=[];for(var _0x544bc5=0x0;_0x544bc5<promisesAdditionalPhones[_0xdda2('0x1b')];_0x544bc5++){if(promisesAdditionalPhones[_0x544bc5][_0xdda2('0x14')]!='§'){_0x36abe9[_0xdda2('0x1c')](createAdditionalPhone(promisesAdditionalPhones[_0x544bc5]['contactId'],promisesAdditionalPhones[_0x544bc5][_0xdda2('0xa1')],promisesAdditionalPhones[_0x544bc5]['phone'],promisesAdditionalPhones[_0x544bc5][_0xdda2('0xa2')]));}}BPromise[_0xdda2('0x1d')](_0x36abe9)['then'](function(){_0x36abe9=[];if(hasTZ){_0x36abe9[_0xdda2('0x1c')](insertTzCmHopper(_0x4ddd29[_0xdda2('0x34')],_0xdda2('0x6b'),_0xdda2('0x6a'),'VoiceQueueId',_0x52a8dc,tmp_voice_queues));_0x36abe9[_0xdda2('0x1c')](insertTzCmHopperBlack(_0x4ddd29[_0xdda2('0x34')],'voice_queues_has_cm_blacklists',_0xdda2('0x6a'),_0xdda2('0xa3')));_0x36abe9[_0xdda2('0x1c')](insertTzCmHopper(_0x4ddd29[_0xdda2('0x34')],_0xdda2('0x65'),_0xdda2('0x64'),_0xdda2('0xa4'),_0x52a8dc,tmp_campaigns));_0x36abe9['push'](insertTzCmHopperBlack(_0x4ddd29[_0xdda2('0x34')],_0xdda2('0xa5'),_0xdda2('0x64'),'CampaignId'));_0x36abe9[_0xdda2('0x1c')](insertCmHopperAdditionalPhones(_0x4ddd29['ListId']));}else{_0x36abe9['push'](insertCmHopper(_0x4ddd29['ListId'],_0xdda2('0x6b'),_0xdda2('0x6a'),_0xdda2('0xa3'),_0x52a8dc));_0x36abe9[_0xdda2('0x1c')](insertCmHopperBlack(_0x4ddd29[_0xdda2('0x34')],_0xdda2('0xa6'),_0xdda2('0x6a'),_0xdda2('0xa3')));_0x36abe9['push'](insertCmHopper(_0x4ddd29[_0xdda2('0x34')],_0xdda2('0x65'),_0xdda2('0x64'),_0xdda2('0xa4'),_0x52a8dc));_0x36abe9[_0xdda2('0x1c')](insertCmHopperBlack(_0x4ddd29[_0xdda2('0x34')],_0xdda2('0xa5'),_0xdda2('0x64'),_0xdda2('0xa4')));_0x36abe9[_0xdda2('0x1c')](insertCmHopperAdditionalPhones(_0x4ddd29['ListId']));}_0x36abe9['push']('DROP\x20TABLE\x20'+tmp_campaigns+';');_0x36abe9[_0xdda2('0x1c')](_0xdda2('0xa0')+tmp_voice_queues+';');BPromise[_0xdda2('0x9c')](_0x36abe9,handleQuery)[_0xdda2('0x1a')](function(_0x37cff0){stats[_0xdda2('0xa7')]=!![];stats[_0xdda2('0xa8')]=_0x4ddd29['duplicates']&&_0x4ddd29[_0xdda2('0x97')][_0xdda2('0x1b')]?results[0x2][_0xdda2('0xa8')]:results[0x0][_0xdda2('0xa8')];socket[_0xdda2('0x94')](_0xdda2('0x95')+_0x1b5271,stats);fs[_0xdda2('0xa9')](_0x18b569);fs[_0xdda2('0xa9')](_0x3db41b);process['exit'](0x0);})[_0xdda2('0x60')](function(_0x101bf0){logger['error'](_0x101bf0[_0xdda2('0x61')]);process[_0xdda2('0x5a')](0x1);});});});})['catch'](function(_0x697d9b){logger['error'](_0x697d9b['message']);process[_0xdda2('0x5a')](0x1);});});});});}catch(_0x2a8ab3){logger[_0xdda2('0x68')](_0xdda2('0xaa'),_0x2a8ab3['message']);process[_0xdda2('0x5a')](0x1);}},'error':function(_0x2a9297,_0x2ae4ca,_0x101155,_0x5a107d){throw new Error(_0x5a107d);}});});}function validate(){if(process[_0xdda2('0xab')]&&process['argv'][_0xdda2('0x1b')]<0x4){throw new Error('arguments\x20<filename>\x20<parameters>\x20<agents>');}var _0x3baddb=path[_0xdda2('0x18')](config[_0xdda2('0xac')],_0xdda2('0x76'),process[_0xdda2('0xab')][0x2]);if(!fs[_0xdda2('0xad')](_0x3baddb)){throw new Error(_0xdda2('0xae'));}var _0x58faf9={};try{_0x58faf9=JSON[_0xdda2('0x7e')](process['argv'][0x3]);if(!_0x58faf9[_0xdda2('0x74')]){throw new Error(_0xdda2('0xaf'));}if(!_0x58faf9[_0xdda2('0x74')][_0xdda2('0x14')]){throw new Error('phone\x20is\x20mandatory');}if(!_0x58faf9[_0xdda2('0x74')][_0xdda2('0x8d')]){throw new Error(_0xdda2('0xb0'));}var _0x3e1975=0x0;if(_0x58faf9[_0xdda2('0x74')][_0xdda2('0x38')]){_0x3e1975=0x1;}if(!_0x58faf9[_0xdda2('0x34')]){throw new Error(_0xdda2('0xb1'));}}catch(_0x2ed733){throw new Error('body\x20id\x20mandatory');}var _0x536485=[];try{_0x536485=_['map'](JSON[_0xdda2('0x7e')](process[_0xdda2('0xab')][0x4]),'id');}catch(_0xe1b2d3){logger[_0xdda2('0x59')]('No\x20agent\x20available');}main(_0x3baddb,_0x58faf9,_0x536485,_0x3e1975);}validate();process['on'](_0xdda2('0xb2'),handleStop);process['on'](_0xdda2('0xb3'),handleUncaughtException);
\ No newline at end of file
index e2399fd..397e319 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x38fd=['from','.id\x20=\x20','where','\x20=\x20','.dialCheckDuplicateType\x20IN\x20(','join','sequelize','select\x20*\x20from\x20','spread','length','isNil','AdditionalPhones','push','all','then','catch','message','split','filter','findOne','CmContactHasItem','update','inserted','CmHopper','cm_contacts.phone','cm_contacts.scheduledat','cm_contacts.id','cm_contacts.ListId','cm_contacts.createdAt','cm_contacts.priority','into','cm_hopper','fromQuery','scheduledat','ContactId','createdAt','priority','recallme','fields','cm_contacts','cm_contacts.ListId\x20=\x20','.CmListId','.CmListId\x20=\x20?','cm_contacts.createdAt\x20=\x20?','cm_contacts.phone\x20NOT\x20IN\x20(?)','\x22always\x22','cm_contacts.updatedAt','insert','ListId','field','cm_hopper_black','ListId\x20=\x20?','\x20=\x20?','toString','cm_hopper.id','cm_contact_has_items.item','cm_contact_has_items.OrderBy','cm_contact_has_items.createdAt','cm_hopper_additional_phones','CmHopperId','cm_contact_has_items','cm_contacts.id\x20=\x20cm_contact_has_items.CmContactId','cm_hopper.ListId\x20=\x20?','concat','CompanyId','updatedAt',')\x20NOT\x20IN\x20?','id\x20IN\x20?','MIN(id)','min_id','group','info','Received\x20SIGINT','error','exit','errors','code','query','main','stringify','start','clone','socket_timestamp','server/files/tmp','.csv','body','ContactItemType','findAll','name','parse','data','rows','find','hasOwnProperty','replace','isValid','scheduledat\x20wrong\x20format\x20(YYYY-MM-DD\x20HH:mm:ss)','isNaN','UserId','isNumber','includes','agent\x20not\x20exists','email','email\x20wrong\x20format','dateOfBirth','YYYY-MM-DD','firstName','trim','itemTypeId','emit','contact:import:','SystemError','step','CREATE\x20TABLE\x20','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','contact','contactId','contactTypeId','DROP\x20TABLE\x20','each','finish','unlink','complete','argv','existsSync','file\x20doesn\x27t\x20exists','binding','body\x20id\x20mandatory','No\x20agent\x20available','uncaughtException','path','lodash','papaparse','bluebird','moment','squel','ioredis','../../../config/logger','import','defaults','redis','socket.io-emitter','format','YYYY-MM-DD\x20HH:mm:ss','YYYYMMDDHHmmss','select','phone'];(function(_0x55b7c8,_0x42feb7){var _0x2dce6f=function(_0xe786a7){while(--_0xe786a7){_0x55b7c8['push'](_0x55b7c8['shift']());}};_0x2dce6f(++_0x42feb7);}(_0x38fd,0x117));var _0xd38f=function(_0x377a65,_0x27dfa7){_0x377a65=_0x377a65-0x0;var _0x2a994c=_0x38fd[_0x377a65];return _0x2a994c;};'use strict';var fs=require('fs');var path=require(_0xd38f('0x0'));var _=require(_0xd38f('0x1'));var Papa=require(_0xd38f('0x2'));var util=require('util');var BPromise=require(_0xd38f('0x3'));var moment=require(_0xd38f('0x4'));var squel=require(_0xd38f('0x5'));var Redis=require(_0xd38f('0x6'));var db=require('../../../mysqldb')['db'];var config=require('../../../config/environment');var logger=require(_0xd38f('0x7'))(_0xd38f('0x8'));config['redis']=_[_0xd38f('0x9')](config[_0xd38f('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0xd38f('0xb'))(new Redis(config['redis']));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()[_0xd38f('0xc')](_0xd38f('0xd'));var tempTableName='cm_contacts_temp_'+moment()[_0xd38f('0xc')](_0xd38f('0xe'));var contactItemTypes=[];var phoneDescriptions=[];var hasAdditionalPhones=![];function isEmail(_0x4bbf6d){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'](_0x4bbf6d);}function selectNotIn(_0x1415e2,_0xba64f,_0x1dddb5,_0x5741ba,_0x148160){return squel[_0xd38f('0xf')]()['field'](_0xd38f('0x10'))[_0xd38f('0x11')](_0x5741ba)['join'](_0xba64f,null,_0xba64f+_0xd38f('0x12')+_0x5741ba+'.'+_0x1dddb5)[_0xd38f('0x13')](_0x5741ba+'.'+_0x1dddb5+_0xd38f('0x14')+_0x1415e2+'.'+_0x1dddb5)[_0xd38f('0x13')](_0xba64f+_0xd38f('0x15')+_0x148160[_0xd38f('0x16')]()+')');}function handleAdditionalPhones(){return new Promise(function(_0x275434,_0x4a4a7b){promisesAdditionalPhones=[];promisesContact=[];return db[_0xd38f('0x17')]['query'](_0xd38f('0x18')+tempTableName)[_0xd38f('0x19')](function(_0x4192be){if(_0x4192be!==null){var _0xe06f6=[];for(var _0x5c0c34=0x0;_0x5c0c34<_0x4192be[_0xd38f('0x1a')];_0x5c0c34++){var _0x555af1=_0x4192be[_0x5c0c34];if(!_[_0xd38f('0x1b')](_0x555af1[_0xd38f('0x10')])){if(!_[_0xd38f('0x1b')](_0x555af1[_0xd38f('0x1c')]))_0xe06f6[_0xd38f('0x1d')](insertAdditionalPhones(_0x555af1));promisesContact[_0xd38f('0x1d')]({'contact':_0x555af1});}}}Promise[_0xd38f('0x1e')](_0xe06f6)[_0xd38f('0x1f')](function(){_0x275434({'val':0x1});});})[_0xd38f('0x20')](function(_0x804923){logger['error'](_0x804923[_0xd38f('0x21')]);});});}function insertAdditionalPhones(_0x67c308){return new Promise(function(_0x4e92f7,_0x3ff2ef){var _0x22a05c=_0x67c308['AdditionalPhones'];if(_[_0xd38f('0x1b')](_0x22a05c))_0x3ff2ef({'val':0x0});else{var _0x4f4c7e=_0x22a05c[_0xd38f('0x22')](';');var _0x3adaf8=[];orderBy=0x0;for(var _0x2e78a1=0x0;_0x2e78a1<_0x4f4c7e[_0xd38f('0x1a')];_0x2e78a1++){_0x3adaf8[_0xd38f('0x1d')](splitAdditionalPhone(_0x67c308['id'],_0x4f4c7e[_0x2e78a1]));}Promise[_0xd38f('0x1e')](_0x3adaf8)['then'](function(){_0x4e92f7({'val':_0x4f4c7e['length']});});}});}function splitAdditionalPhone(_0x2337aa,_0x23cb5c){return new Promise(function(_0x5655ca,_0x1109bd){var _0x2819b2=_0x23cb5c[_0xd38f('0x22')](':');var _0x5b13c5=_0x2819b2[0x0];var _0x343d41=_0x2819b2[0x1];if(_0x343d41!==''){var _0x5e83af=_0x343d41['split']('|');var _0x4129a7=[];for(var _0x14e699=0x0;_0x14e699<_0x5e83af['length'];_0x14e699++){if(_0x5e83af[_0x14e699]!==''){var _0x48779f=_[_0xd38f('0x23')](promisesAdditionalPhones,{'contactId':_0x2337aa,'phone':_0x5e83af[_0x14e699]});if(_0x48779f[_0xd38f('0x1a')]==0x0){orderBy++;promisesAdditionalPhones[_0xd38f('0x1d')]({'contactId':_0x2337aa,'contactTypeId':_0x5b13c5,'phone':_0x5e83af[_0x14e699],'orderBy':orderBy});}}}_0x5655ca({'ok':0x1});}else _0x5655ca({'res':0x0});});}function createAdditionalPhone(_0x5cfab1,_0x5ce6e4,_0x2ee0d5,_0x1a8f11){var _0x3e96d2='';var _0x2e785c='';var _0x16a7b4=_0x2ee0d5[_0xd38f('0x22')]('§');_0x3e96d2=_0x16a7b4[0x0];if(_0x16a7b4[_0xd38f('0x1a')]==0x2)_0x2e785c=_0x16a7b4[0x1];return new Promise(function(_0x177eff,_0x863efb){return db['CmContactHasItem'][_0xd38f('0x24')]({'where':{'CmContactId':_0x5cfab1,'item':_0x3e96d2}})[_0xd38f('0x1f')](function(_0x56ae4e){if(_0x56ae4e){return db[_0xd38f('0x25')][_0xd38f('0x26')]({'ItemTypeId':_0x5ce6e4,'description':_0x2e785c,'OrderBy':_0x1a8f11},{'where':{'CmContactId':_0x5cfab1,'item':_0x3e96d2}})['then'](function(_0x231341){_0x177eff({'res':'updated'});});}else{return db[_0xd38f('0x25')]['create']({'CmContactId':_0x5cfab1,'item':_0x3e96d2,'ItemTypeId':_0x5ce6e4,'description':_0x2e785c,'OrderBy':_0x1a8f11,'ItemClass':'PHONE'})[_0xd38f('0x1f')](function(_0xf684d2){_0x177eff({'res':_0xd38f('0x27')});});}});});}function updateContact(_0x2a6f50){return new Promise(function(_0x4214df,_0x160ced){var _0x486105=_0x2a6f50['id'];delete _0x2a6f50['id'];return db['CmContact'][_0xd38f('0x26')](_0x2a6f50,{'where':{'id':_0x486105}})['then'](function(_0x29dded){updatedRows+=0x1;return db[_0xd38f('0x28')]['update']({'phone':_0x2a6f50[_0xd38f('0x10')]},{'where':{'ContactId':_0x486105}})[_0xd38f('0x1f')](function(_0x2152b5){_0x4214df({'ret':'OK'});});});});}function insertCmHopper(_0x4cfb52,_0x35ff1a,_0x163cc8,_0xda7afd,_0x17bae5){var _0x28219=[_0xd38f('0x29'),_0xd38f('0x2a'),_0xd38f('0x2b'),_0xd38f('0x2c'),_0x35ff1a+'.'+_0xda7afd,_0xd38f('0x2d'),'cm_contacts.updatedAt',_0xd38f('0x2e'),'cm_contacts.UserId','\x22'+_0x17bae5+'\x22'];return squel['insert']()[_0xd38f('0x2f')](_0xd38f('0x30'))[_0xd38f('0x31')]([_0xd38f('0x10'),_0xd38f('0x32'),_0xd38f('0x33'),'ListId',_0xda7afd,_0xd38f('0x34'),'updatedAt',_0xd38f('0x35'),'UserId',_0xd38f('0x36')],squel['select']()[_0xd38f('0x37')](_0x28219)[_0xd38f('0x11')](_0x35ff1a)['join'](_0xd38f('0x38'),null,_0xd38f('0x39')+_0x35ff1a+_0xd38f('0x3a'))[_0xd38f('0x16')](_0x163cc8,null,_0x163cc8+_0xd38f('0x12')+_0x35ff1a+'.'+_0xda7afd)[_0xd38f('0x13')](_0x35ff1a+_0xd38f('0x3b'),_0x4cfb52)[_0xd38f('0x13')](_0xd38f('0x3c'),NOW)[_0xd38f('0x13')](_0xd38f('0x3d'),selectNotIn(_0x35ff1a,_0x163cc8,_0xda7afd,_0xd38f('0x30'),['\x22always\x22','\x22onlyIfOpen\x22']))[_0xd38f('0x13')](_0xd38f('0x3d'),selectNotIn(_0x35ff1a,_0x163cc8,_0xda7afd,_0xd38f('0x30'),[_0xd38f('0x3e')])))['toString']();}function insertCmHopperBlack(_0x3b86bb,_0xfef106,_0x2e1dc2,_0x458704){var _0x2d3a7f=[_0xd38f('0x29'),_0xd38f('0x2b'),_0xd38f('0x2c'),_0xfef106+'.'+_0x458704,_0xd38f('0x2d'),_0xd38f('0x3f')];return squel[_0xd38f('0x40')]()[_0xd38f('0x2f')]('cm_hopper_black')[_0xd38f('0x31')]([_0xd38f('0x10'),'ContactId',_0xd38f('0x41'),_0x458704,_0xd38f('0x34'),'updatedAt'],squel[_0xd38f('0xf')]()[_0xd38f('0x37')](_0x2d3a7f)['from'](_0xfef106)['join'](_0xd38f('0x38'),null,_0xd38f('0x39')+_0xfef106+_0xd38f('0x3a'))[_0xd38f('0x16')](_0x2e1dc2,null,_0x2e1dc2+'.id\x20=\x20'+_0xfef106+'.'+_0x458704)[_0xd38f('0x13')](_0xfef106+_0xd38f('0x3b'),_0x3b86bb)[_0xd38f('0x13')](_0xd38f('0x3c'),NOW)[_0xd38f('0x13')]('cm_contacts.phone\x20NOT\x20IN\x20(?)',squel[_0xd38f('0xf')]()[_0xd38f('0x42')](_0xd38f('0x10'))['from'](_0xd38f('0x43'))['where'](_0xd38f('0x44'),_0x3b86bb)[_0xd38f('0x13')](_0x458704+_0xd38f('0x45'),_0xfef106+'.'+_0x458704)))[_0xd38f('0x46')]();}function insertCmHopperAdditionalPhones(_0x40e1e7){var _0x3d874a=[_0xd38f('0x47'),_0xd38f('0x48'),_0xd38f('0x49'),_0xd38f('0x4a'),'cm_contact_has_items.updatedAt'];return squel[_0xd38f('0x40')]()['into'](_0xd38f('0x4b'))['fromQuery']([_0xd38f('0x4c'),_0xd38f('0x10'),'OrderBy','createdAt','updatedAt'],squel[_0xd38f('0xf')]()[_0xd38f('0x37')](_0x3d874a)[_0xd38f('0x11')](_0xd38f('0x30'))[_0xd38f('0x16')](_0xd38f('0x38'),null,'cm_contacts.id\x20=\x20cm_hopper.ContactId')[_0xd38f('0x16')](_0xd38f('0x4d'),null,_0xd38f('0x4e'))[_0xd38f('0x13')](_0xd38f('0x4f'),_0x40e1e7)[_0xd38f('0x13')]('cm_contacts.createdAt\x20=\x20?',NOW))['toString']();}function insertCmContact(_0x1f2e0e,_0x223f0d,_0x48de66,_0x45af0d){var _0xdecc27=_[_0xd38f('0x50')](_['keys'](_0x45af0d),[_0xd38f('0x41'),_0xd38f('0x51'),_0xd38f('0x34'),_0xd38f('0x52')]);return squel[_0xd38f('0x40')]()[_0xd38f('0x2f')](_0xd38f('0x38'))['fromQuery'](_0xdecc27,squel[_0xd38f('0xf')]()[_0xd38f('0x37')](_0xdecc27)[_0xd38f('0x11')](_0x223f0d)[_0xd38f('0x13')]('('+_0x48de66[_0xd38f('0x16')](',')+_0xd38f('0x53'),squel[_0xd38f('0xf')]()[_0xd38f('0x37')](_0x48de66)[_0xd38f('0x11')](_0xd38f('0x38'))[_0xd38f('0x13')](_0xd38f('0x44'),_0x1f2e0e))[_0xd38f('0x13')](_0xd38f('0x54'),squel[_0xd38f('0xf')]()[_0xd38f('0x42')](_0xd38f('0x55'),_0xd38f('0x56'))[_0xd38f('0x11')](_0x223f0d)[_0xd38f('0x57')](_0x48de66['join'](','))))[_0xd38f('0x46')]();}function handleStop(){logger[_0xd38f('0x58')](_0xd38f('0x59'));stopped=!![];}function handleUncaughtException(_0x29eafa){logger[_0xd38f('0x5a')](_0x29eafa['message']);process[_0xd38f('0x5b')](0x1);}function handleError(_0x5d06e3,_0x3d0467){stats[_0xd38f('0x5c')][_0xd38f('0x1d')]({'name':_0x3d0467[_0xd38f('0x5d')],'message':_0x3d0467[_0xd38f('0x21')],'row':_0x5d06e3});}function handleQuery(_0x3b0d6){logger[_0xd38f('0x58')](_0x3b0d6);return db[_0xd38f('0x17')][_0xd38f('0x5e')](_0x3b0d6)['spread'](function(_0x393e6e){results['push'](_0x393e6e);})[_0xd38f('0x20')](function(_0x1c247b){logger['error'](_0x1c247b['message']);});}function main(_0x4afae9,_0x50386d,_0x3d03e3,_0x4dc302){logger[_0xd38f('0x58')](_0xd38f('0x5f'),_0x4afae9,JSON[_0xd38f('0x60')](_0x50386d));process['send'](_0xd38f('0x61'));var _0x36235b=_0x50386d['binding'];var _0x175412=_[_0xd38f('0x62')](_0x36235b);var _0x1f2646=_0x50386d[_0xd38f('0x63')];var _0x4854f6=path['join'](config['root'],_0xd38f('0x64'),_0x1f2646+_0xd38f('0x65'));logger[_0xd38f('0x58')](_0xd38f('0x66'),_0x50386d);db[_0xd38f('0x67')][_0xd38f('0x68')]({'raw':!![],'attributes':['id',_0xd38f('0x69')]})[_0xd38f('0x1f')](function(_0x5cb2a7){for(var _0x4c89da=0x0;_0x4c89da<_0x5cb2a7[_0xd38f('0x1a')];_0x4c89da++){if(_0x5cb2a7[_0x4c89da]['name']in _0x36235b){contactItemTypes['push'](_0x5cb2a7[_0x4c89da]);delete _0x175412[_0x5cb2a7[_0x4c89da][_0xd38f('0x69')]];hasAdditionalPhones=!![];}for(var _0x3325a0 in _0x36235b){if(_0x5cb2a7[_0x4c89da]['name']+'_description'===_0x3325a0){phoneDescriptions[_0xd38f('0x1d')]({'itemTypeId':_0x5cb2a7[_0x4c89da]['id'],'description':_0x3325a0});delete _0x175412[_0x3325a0];}}}if(hasAdditionalPhones)_0x175412['AdditionalPhones']='';var _0xa43962=_['keys'](_0x175412)['join']();logger['info']('header',_0xa43962);fs['writeFileSync'](_0x4854f6,_0xa43962+'\x0a');Papa[_0xd38f('0x6a')](fs['createReadStream'](_0x4afae9),{'header':!![],'skipEmptyLines':!![],'step':function(_0x6981e7,_0xfd42fd){try{for(var _0x144d7b=0x0,_0x42632b=[];_0x144d7b<_0x6981e7[_0xd38f('0x6b')][_0xd38f('0x1a')];_0x144d7b++){stats[_0xd38f('0x6c')]+=0x1;if(_0x6981e7[_0xd38f('0x5c')][_0x144d7b]){handleError(_0x6981e7[_0xd38f('0x6b')][_0x144d7b],_0x6981e7[_0xd38f('0x5c')][_0x144d7b]);}else{var _0xbcbcd2=[];var _0x4248a9=[];var _0x20a3af={};for(var _0x7dbf86 in _0x36235b){let _0x390510=contactItemTypes[_0xd38f('0x6d')](_0x4b6866=>_0x4b6866[_0xd38f('0x69')]===_0x7dbf86);let _0x5b5834=contactItemTypes[_0xd38f('0x6d')](_0x2f7fff=>_0x2f7fff[_0xd38f('0x69')]+'_description'===_0x7dbf86);if(_['isNil'](_0x390510)&&_[_0xd38f('0x1b')](_0x5b5834)){if(_0x36235b[_0xd38f('0x6e')](_0x7dbf86)){if(_0x6981e7['data'][_0x144d7b][_0x36235b[_0x7dbf86]]){var _0x39120f=_['trim'](_0x6981e7[_0xd38f('0x6b')][_0x144d7b][_0x36235b[_0x7dbf86]][_0xd38f('0x6f')](/"/g,'\x27'));switch(_0x7dbf86){case _0xd38f('0x32'):var _0x360651=moment(_0x39120f,_0xd38f('0xd'),!![]);if(_0x360651[_0xd38f('0x70')]()){_0x42632b[_0xd38f('0x1d')]('\x22'+_0x39120f+'\x22');}else{_0xbcbcd2['push'](_0xd38f('0x71'));}break;case _0xd38f('0x35'):var _0x2996ce=parseInt(_0x39120f);_0x39120f=_[_0xd38f('0x72')](_0x2996ce)||_0x2996ce<0x0||_0x2996ce>0x4?_0x4dc302?0x3:0x2:_0x2996ce;_0x42632b[_0xd38f('0x1d')]('\x22'+_0x39120f+'\x22');break;case _0xd38f('0x73'):var _0x568d55=parseInt(_0x39120f);if(_[_0xd38f('0x74')](_0x568d55)&&_[_0xd38f('0x75')](_0x3d03e3,_0x568d55)){_0x42632b[_0xd38f('0x1d')]('\x22'+_0x568d55+'\x22');}else{_0xbcbcd2[_0xd38f('0x1d')](_0xd38f('0x76'));}break;case _0xd38f('0x77'):if(isEmail(_0x39120f)){_0x42632b[_0xd38f('0x1d')]('\x22'+_0x39120f+'\x22');}else{_0xbcbcd2[_0xd38f('0x1d')](_0xd38f('0x78'));}break;case _0xd38f('0x79'):var _0x2a08ba=moment(_0x39120f,_0xd38f('0x7a'),!![]);if(_0x2a08ba[_0xd38f('0x70')]()){_0x42632b[_0xd38f('0x1d')]('\x22'+_0x39120f+'\x22');}else{_0xbcbcd2['push']('dateOfBirth\x20wrong\x20format\x20(YYYY-MM-DD)');}break;default:_0x42632b[_0xd38f('0x1d')]('\x22'+_0x39120f+'\x22');}}else{switch(_0x7dbf86){case _0xd38f('0x7b'):case'phone':_0xbcbcd2[_0xd38f('0x1d')](_0x7dbf86+'\x20not\x20specified');break;default:_0x42632b[_0xd38f('0x1d')]('\x22\x22');}}}}else{var _0x3f055b='';if(!_['isNil'](_0x390510)){if(!_0x20a3af[_0xd38f('0x6e')](_0x390510['id'])){for(var _0x1bbaa8=0x0;_0x1bbaa8<_0x36235b[_0x7dbf86][_0xd38f('0x1a')];_0x1bbaa8++){var _0x39120f=_[_0xd38f('0x7c')](_0x6981e7[_0xd38f('0x6b')][_0x144d7b][_0x36235b[_0x7dbf86][_0x1bbaa8]][_0xd38f('0x6f')](/"/g,'\x27'));var _0x2b4f9a=phoneDescriptions['find'](_0x18f4cb=>_0x18f4cb[_0xd38f('0x7d')]===_0x390510['id']);if(!_[_0xd38f('0x1b')](_0x2b4f9a)){var _0x41f3a3=_[_0xd38f('0x7c')](_0x6981e7[_0xd38f('0x6b')][_0x144d7b][_0x36235b[_0x2b4f9a['description']][0x0]][_0xd38f('0x6f')](/"/g,'\x27'));if(!_[_0xd38f('0x1b')](_0x41f3a3))_0x39120f=_0x39120f+'§'+_0x41f3a3;}if(_0x3f055b=='')_0x3f055b=_0x39120f;else _0x3f055b+='|'+_0x39120f;}_0x4248a9[_0xd38f('0x1d')](_0x390510['id']+':'+_0x3f055b);_0x20a3af[_0x390510['id']]=0x1;}}}}if(hasAdditionalPhones){_0x42632b[_0xd38f('0x1d')]('\x22'+_0x4248a9[_0xd38f('0x16')](';')+'\x22');}if(_0xbcbcd2[_0xd38f('0x1a')]){handleError(_0x6981e7[_0xd38f('0x6b')][_0x144d7b],{'code':'SystemRow','message':_0xbcbcd2[_0xd38f('0x16')]()});}else{fs['appendFileSync'](_0x4854f6,_0x42632b[_0xd38f('0x16')]()+'\x0a');}_0x42632b=[];}if(!(stats[_0xd38f('0x6c')]%0xc8)){socket[_0xd38f('0x7e')](_0xd38f('0x7f')+_0x1f2646,stats);stats[_0xd38f('0x5c')]=[];}}if(stopped){logger[_0xd38f('0x58')]('Abort\x20parser');_0xfd42fd['abort']();}}catch(_0x454998){handleError(_0x6981e7[_0xd38f('0x6b')][_0x144d7b],{'code':_0xd38f('0x80'),'message':_0x454998[_0xd38f('0x21')]});logger[_0xd38f('0x5a')](_0xd38f('0x81'),_0x454998[_0xd38f('0x21')]);}},'complete':function(){try{var _0x53b1ec=[];var _0x98ddd2=tempTableName;_0x53b1ec[_0xd38f('0x1d')](_0xd38f('0x82')+_0x98ddd2+'\x20LIKE\x20cm_contacts;');logger['info'](_0xd38f('0x83'),contactItemTypes[_0xd38f('0x1a')]);var _0x4a10ec=util['format'](_0xd38f('0x84'),_0x4854f6,_0x98ddd2,_0xa43962,_0x50386d[_0xd38f('0x41')],_0x50386d[_0xd38f('0x51')]||null,NOW,NOW);if(_[_0xd38f('0x1b')](_0x36235b[_0xd38f('0x32')])){_0x4a10ec+=',\x20scheduledAt\x20=\x20NOW()';}_0x53b1ec[_0xd38f('0x1d')](_0x4a10ec);BPromise['each'](_0x53b1ec,handleQuery)[_0xd38f('0x1f')](function(_0x1f22b6){BPromise[_0xd38f('0x1e')]([handleAdditionalPhones()])[_0xd38f('0x1f')](function(){_0x53b1ec=[];for(var _0xa522b2=0x0;_0xa522b2<promisesContact['length'];_0xa522b2++){_0x53b1ec[_0xd38f('0x1d')](updateContact(promisesContact[_0xa522b2][_0xd38f('0x85')]));}BPromise['all'](_0x53b1ec)['then'](function(){_0x53b1ec=[];for(var _0x525e03=0x0;_0x525e03<promisesAdditionalPhones[_0xd38f('0x1a')];_0x525e03++){_0x53b1ec[_0xd38f('0x1d')](createAdditionalPhone(promisesAdditionalPhones[_0x525e03][_0xd38f('0x86')],promisesAdditionalPhones[_0x525e03][_0xd38f('0x87')],promisesAdditionalPhones[_0x525e03][_0xd38f('0x10')],promisesAdditionalPhones[_0x525e03]['orderBy']));}BPromise[_0xd38f('0x1e')](_0x53b1ec)[_0xd38f('0x1f')](function(){_0x53b1ec=[];_0x53b1ec[_0xd38f('0x1d')](insertCmHopperAdditionalPhones(_0x50386d[_0xd38f('0x41')]));_0x53b1ec[_0xd38f('0x1d')](_0xd38f('0x88')+_0x98ddd2+';');BPromise[_0xd38f('0x89')](_0x53b1ec,handleQuery)[_0xd38f('0x1f')](function(_0x480948){stats[_0xd38f('0x8a')]=!![];stats['affectedRows']=updatedRows;socket[_0xd38f('0x7e')](_0xd38f('0x7f')+_0x1f2646,stats);fs[_0xd38f('0x8b')](_0x4afae9);fs[_0xd38f('0x8b')](_0x4854f6);process[_0xd38f('0x5b')](0x0);})['catch'](function(_0x2e5bb4){logger[_0xd38f('0x5a')](_0x2e5bb4['message']);process[_0xd38f('0x5b')](0x1);});});});});})[_0xd38f('0x20')](function(_0x144959){logger[_0xd38f('0x5a')](_0x144959[_0xd38f('0x21')]);process[_0xd38f('0x5b')](0x1);});}catch(_0x44df44){logger[_0xd38f('0x5a')](_0xd38f('0x8c'),_0x44df44[_0xd38f('0x21')]);process[_0xd38f('0x5b')](0x1);}},'error':function(_0x26a3d3,_0x439aaa,_0x38fce,_0x4be279){throw new Error(_0x4be279);}});});}function validate(){if(process[_0xd38f('0x8d')]&&process[_0xd38f('0x8d')][_0xd38f('0x1a')]<0x4){throw new Error('arguments\x20<filename>\x20<parameters>\x20<agents>');}var _0x2c7e3a=path['join'](config['root'],_0xd38f('0x64'),process['argv'][0x2]);if(!fs[_0xd38f('0x8e')](_0x2c7e3a)){throw new Error(_0xd38f('0x8f'));}var _0x470008={};try{_0x470008=JSON['parse'](process['argv'][0x3]);if(!_0x470008[_0xd38f('0x90')]){throw new Error('binding\x20doesn\x27t\x20exists');}var _0x1010ed=0x0;if(_0x470008['binding'][_0xd38f('0x73')]){_0x1010ed=0x1;}if(!_0x470008[_0xd38f('0x41')]){throw new Error('ListId\x20is\x20mandatory');}}catch(_0xcf7781){throw new Error(_0xd38f('0x91'));}var _0x23f0b7=[];try{_0x23f0b7=_['map'](JSON['parse'](process[_0xd38f('0x8d')][0x4]),'id');}catch(_0x945cb5){logger[_0xd38f('0x58')](_0xd38f('0x92'));}main(_0x2c7e3a,_0x470008,_0x23f0b7,_0x1010ed);}validate();process['on']('SIGINT',handleStop);process['on'](_0xd38f('0x93'),handleUncaughtException);
\ No newline at end of file
+var _0x4e2e=['abort','SystemError','step','CREATE\x20TABLE\x20','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',',\x20scheduledAt\x20=\x20NOW()','each','contact','contactId','contactTypeId','orderBy','emit','unlink','complete','argv','arguments\x20<filename>\x20<parameters>\x20<agents>','existsSync','binding\x20doesn\x27t\x20exists','body\x20id\x20mandatory','No\x20agent\x20available','SIGINT','lodash','papaparse','util','bluebird','moment','squel','../../../mysqldb','../../../config/environment','../../../config/logger','import','defaults','redis','localhost','socket.io-emitter','format','YYYY-MM-DD\x20HH:mm:ss','cm_contacts_temp_','YYYYMMDDHHmmss','test','select','phone','from','join','.id\x20=\x20','\x20=\x20','where','.dialCheckDuplicateType\x20IN\x20(','query','select\x20*\x20from\x20','spread','length','isNil','push','all','then','catch','error','message','AdditionalPhones','split','filter','findOne','CmContactHasItem','update','updated','create','PHONE','inserted','CmContact','CmHopper','cm_contacts.scheduledat','cm_contacts.id','cm_contacts.createdAt','cm_contacts.updatedAt','cm_contacts.priority','cm_contacts.UserId','into','fromQuery','scheduledat','ContactId','ListId','updatedAt','priority','recallme','fields','cm_contacts','cm_contacts.ListId\x20=\x20','.CmListId','.CmListId\x20=\x20?','cm_contacts.createdAt\x20=\x20?','\x22always\x22','\x22onlyIfOpen\x22','cm_contacts.phone\x20NOT\x20IN\x20(?)','toString','cm_contacts.phone','insert','cm_hopper_black','createdAt','field','ListId\x20=\x20?','\x20=\x20?','cm_hopper.id','cm_contact_has_items.item','cm_contact_has_items.createdAt','cm_contact_has_items.updatedAt','cm_contacts.id\x20=\x20cm_contact_has_items.CmContactId','concat','CompanyId',')\x20NOT\x20IN\x20?','id\x20IN\x20?','min_id','group','info','Received\x20SIGINT','exit','errors','code','sequelize','main','stringify','send','start','binding','clone','socket_timestamp','root','server/files/tmp','ContactItemType','findAll','name','_description','keys','header','writeFileSync','parse','createReadStream','data','rows','find','hasOwnProperty','trim','replace','scheduledat\x20wrong\x20format\x20(YYYY-MM-DD\x20HH:mm:ss)','UserId','isNumber','includes','agent\x20not\x20exists','email\x20wrong\x20format','dateOfBirth','YYYY-MM-DD','isValid','firstName','\x20not\x20specified','description','SystemRow','appendFileSync','contact:import:','Abort\x20parser'];(function(_0x5235dd,_0x3f91cf){var _0x13059d=function(_0x355a98){while(--_0x355a98){_0x5235dd['push'](_0x5235dd['shift']());}};_0x13059d(++_0x3f91cf);}(_0x4e2e,0x1f2));var _0xe4e2=function(_0x2ff9a4,_0x4e0c70){_0x2ff9a4=_0x2ff9a4-0x0;var _0x38f928=_0x4e2e[_0x2ff9a4];return _0x38f928;};'use strict';var fs=require('fs');var path=require('path');var _=require(_0xe4e2('0x0'));var Papa=require(_0xe4e2('0x1'));var util=require(_0xe4e2('0x2'));var BPromise=require(_0xe4e2('0x3'));var moment=require(_0xe4e2('0x4'));var squel=require(_0xe4e2('0x5'));var Redis=require('ioredis');var db=require(_0xe4e2('0x6'))['db'];var config=require(_0xe4e2('0x7'));var logger=require(_0xe4e2('0x8'))(_0xe4e2('0x9'));config['redis']=_[_0xe4e2('0xa')](config[_0xe4e2('0xb')],{'host':_0xe4e2('0xc'),'port':0x18eb});var socket=require(_0xe4e2('0xd'))(new Redis(config[_0xe4e2('0xb')]));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()[_0xe4e2('0xe')](_0xe4e2('0xf'));var tempTableName=_0xe4e2('0x10')+moment()['format'](_0xe4e2('0x11'));var contactItemTypes=[];var phoneDescriptions=[];var hasAdditionalPhones=![];function isEmail(_0x14fe0d){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))*$/[_0xe4e2('0x12')](_0x14fe0d);}function selectNotIn(_0x5b7889,_0x1954f8,_0x42a1f0,_0x137047,_0x107816){return squel[_0xe4e2('0x13')]()['field'](_0xe4e2('0x14'))[_0xe4e2('0x15')](_0x137047)[_0xe4e2('0x16')](_0x1954f8,null,_0x1954f8+_0xe4e2('0x17')+_0x137047+'.'+_0x42a1f0)['where'](_0x137047+'.'+_0x42a1f0+_0xe4e2('0x18')+_0x5b7889+'.'+_0x42a1f0)[_0xe4e2('0x19')](_0x1954f8+_0xe4e2('0x1a')+_0x107816[_0xe4e2('0x16')]()+')');}function handleAdditionalPhones(){return new Promise(function(_0x202486,_0x50678d){promisesAdditionalPhones=[];promisesContact=[];return db['sequelize'][_0xe4e2('0x1b')](_0xe4e2('0x1c')+tempTableName)[_0xe4e2('0x1d')](function(_0x28ee12){if(_0x28ee12!==null){var _0x217ea5=[];for(var _0x54107a=0x0;_0x54107a<_0x28ee12[_0xe4e2('0x1e')];_0x54107a++){var _0x3e8bb6=_0x28ee12[_0x54107a];if(!_[_0xe4e2('0x1f')](_0x3e8bb6['phone'])){if(!_[_0xe4e2('0x1f')](_0x3e8bb6['AdditionalPhones']))_0x217ea5[_0xe4e2('0x20')](insertAdditionalPhones(_0x3e8bb6));promisesContact[_0xe4e2('0x20')]({'contact':_0x3e8bb6});}}}Promise[_0xe4e2('0x21')](_0x217ea5)[_0xe4e2('0x22')](function(){_0x202486({'val':0x1});});})[_0xe4e2('0x23')](function(_0x156243){logger[_0xe4e2('0x24')](_0x156243[_0xe4e2('0x25')]);});});}function insertAdditionalPhones(_0x4769dd){return new Promise(function(_0x362741,_0x5a84c5){var _0xb7b3ab=_0x4769dd[_0xe4e2('0x26')];if(_[_0xe4e2('0x1f')](_0xb7b3ab))_0x5a84c5({'val':0x0});else{var _0x3491ff=_0xb7b3ab[_0xe4e2('0x27')](';');var _0x23b466=[];orderBy=0x0;for(var _0x16f14b=0x0;_0x16f14b<_0x3491ff['length'];_0x16f14b++){_0x23b466[_0xe4e2('0x20')](splitAdditionalPhone(_0x4769dd['id'],_0x3491ff[_0x16f14b]));}Promise[_0xe4e2('0x21')](_0x23b466)[_0xe4e2('0x22')](function(){_0x362741({'val':_0x3491ff['length']});});}});}function splitAdditionalPhone(_0x353030,_0x12ad33){return new Promise(function(_0x598fa3,_0xcba85a){var _0x234c38=_0x12ad33[_0xe4e2('0x27')](':');var _0x3f5265=_0x234c38[0x0];var _0x249b7e=_0x234c38[0x1];if(_0x249b7e!==''){var _0x5887c9=_0x249b7e[_0xe4e2('0x27')]('|');var _0x357903=[];for(var _0x1f6d1f=0x0;_0x1f6d1f<_0x5887c9['length'];_0x1f6d1f++){if(_0x5887c9[_0x1f6d1f]!==''){var _0x3a31b8=_[_0xe4e2('0x28')](promisesAdditionalPhones,{'contactId':_0x353030,'phone':_0x5887c9[_0x1f6d1f]});if(_0x3a31b8[_0xe4e2('0x1e')]==0x0){orderBy++;promisesAdditionalPhones['push']({'contactId':_0x353030,'contactTypeId':_0x3f5265,'phone':_0x5887c9[_0x1f6d1f],'orderBy':orderBy});}}}_0x598fa3({'ok':0x1});}else _0x598fa3({'res':0x0});});}function createAdditionalPhone(_0x2e5a65,_0x50b4d9,_0x477b5c,_0x1e21c0){var _0x52c849='';var _0x46926a='';var _0x18e2e5=_0x477b5c[_0xe4e2('0x27')]('§');_0x52c849=_0x18e2e5[0x0];if(_0x18e2e5[_0xe4e2('0x1e')]==0x2)_0x46926a=_0x18e2e5[0x1];return new Promise(function(_0x1f7bcc,_0x4d33de){return db['CmContactHasItem'][_0xe4e2('0x29')]({'where':{'CmContactId':_0x2e5a65,'item':_0x52c849}})[_0xe4e2('0x22')](function(_0x12848d){if(_0x12848d){return db[_0xe4e2('0x2a')][_0xe4e2('0x2b')]({'ItemTypeId':_0x50b4d9,'description':_0x46926a,'OrderBy':_0x1e21c0},{'where':{'CmContactId':_0x2e5a65,'item':_0x52c849}})[_0xe4e2('0x22')](function(_0x1c7f9a){_0x1f7bcc({'res':_0xe4e2('0x2c')});});}else{return db[_0xe4e2('0x2a')][_0xe4e2('0x2d')]({'CmContactId':_0x2e5a65,'item':_0x52c849,'ItemTypeId':_0x50b4d9,'description':_0x46926a,'OrderBy':_0x1e21c0,'ItemClass':_0xe4e2('0x2e')})[_0xe4e2('0x22')](function(_0x4ce75b){_0x1f7bcc({'res':_0xe4e2('0x2f')});});}});});}function updateContact(_0x8ffc6){return new Promise(function(_0xe0846a,_0x1fd3c5){var _0x1431b0=_0x8ffc6['id'];delete _0x8ffc6['id'];return db[_0xe4e2('0x30')]['update'](_0x8ffc6,{'where':{'id':_0x1431b0}})[_0xe4e2('0x22')](function(_0x286714){updatedRows+=0x1;return db[_0xe4e2('0x31')][_0xe4e2('0x2b')]({'phone':_0x8ffc6[_0xe4e2('0x14')]},{'where':{'ContactId':_0x1431b0}})[_0xe4e2('0x22')](function(_0x444b99){_0xe0846a({'ret':'OK'});});});});}function insertCmHopper(_0x36a26d,_0xe3d34a,_0x337b42,_0x2767df,_0x4ac14d){var _0x2c831f=['cm_contacts.phone',_0xe4e2('0x32'),_0xe4e2('0x33'),'cm_contacts.ListId',_0xe3d34a+'.'+_0x2767df,_0xe4e2('0x34'),_0xe4e2('0x35'),_0xe4e2('0x36'),_0xe4e2('0x37'),'\x22'+_0x4ac14d+'\x22'];return squel['insert']()[_0xe4e2('0x38')]('cm_hopper')[_0xe4e2('0x39')](['phone',_0xe4e2('0x3a'),_0xe4e2('0x3b'),_0xe4e2('0x3c'),_0x2767df,'createdAt',_0xe4e2('0x3d'),_0xe4e2('0x3e'),'UserId',_0xe4e2('0x3f')],squel[_0xe4e2('0x13')]()[_0xe4e2('0x40')](_0x2c831f)[_0xe4e2('0x15')](_0xe3d34a)[_0xe4e2('0x16')](_0xe4e2('0x41'),null,_0xe4e2('0x42')+_0xe3d34a+_0xe4e2('0x43'))[_0xe4e2('0x16')](_0x337b42,null,_0x337b42+'.id\x20=\x20'+_0xe3d34a+'.'+_0x2767df)['where'](_0xe3d34a+_0xe4e2('0x44'),_0x36a26d)[_0xe4e2('0x19')](_0xe4e2('0x45'),NOW)[_0xe4e2('0x19')]('cm_contacts.phone\x20NOT\x20IN\x20(?)',selectNotIn(_0xe3d34a,_0x337b42,_0x2767df,'cm_hopper',[_0xe4e2('0x46'),_0xe4e2('0x47')]))[_0xe4e2('0x19')](_0xe4e2('0x48'),selectNotIn(_0xe3d34a,_0x337b42,_0x2767df,'cm_hopper',[_0xe4e2('0x46')])))[_0xe4e2('0x49')]();}function insertCmHopperBlack(_0x385572,_0x577d4c,_0x1b54f6,_0x4789cf){var _0x67ee4f=[_0xe4e2('0x4a'),'cm_contacts.id','cm_contacts.ListId',_0x577d4c+'.'+_0x4789cf,_0xe4e2('0x34'),_0xe4e2('0x35')];return squel[_0xe4e2('0x4b')]()['into'](_0xe4e2('0x4c'))[_0xe4e2('0x39')](['phone',_0xe4e2('0x3b'),_0xe4e2('0x3c'),_0x4789cf,_0xe4e2('0x4d'),_0xe4e2('0x3d')],squel[_0xe4e2('0x13')]()[_0xe4e2('0x40')](_0x67ee4f)[_0xe4e2('0x15')](_0x577d4c)[_0xe4e2('0x16')]('cm_contacts',null,_0xe4e2('0x42')+_0x577d4c+_0xe4e2('0x43'))['join'](_0x1b54f6,null,_0x1b54f6+'.id\x20=\x20'+_0x577d4c+'.'+_0x4789cf)[_0xe4e2('0x19')](_0x577d4c+_0xe4e2('0x44'),_0x385572)[_0xe4e2('0x19')]('cm_contacts.createdAt\x20=\x20?',NOW)[_0xe4e2('0x19')](_0xe4e2('0x48'),squel[_0xe4e2('0x13')]()[_0xe4e2('0x4e')]('phone')[_0xe4e2('0x15')](_0xe4e2('0x4c'))[_0xe4e2('0x19')](_0xe4e2('0x4f'),_0x385572)['where'](_0x4789cf+_0xe4e2('0x50'),_0x577d4c+'.'+_0x4789cf)))[_0xe4e2('0x49')]();}function insertCmHopperAdditionalPhones(_0x59c52d){var _0x37a988=[_0xe4e2('0x51'),_0xe4e2('0x52'),'cm_contact_has_items.OrderBy',_0xe4e2('0x53'),_0xe4e2('0x54')];return squel[_0xe4e2('0x4b')]()['into']('cm_hopper_additional_phones')[_0xe4e2('0x39')](['CmHopperId',_0xe4e2('0x14'),'OrderBy',_0xe4e2('0x4d'),_0xe4e2('0x3d')],squel[_0xe4e2('0x13')]()['fields'](_0x37a988)[_0xe4e2('0x15')]('cm_hopper')[_0xe4e2('0x16')](_0xe4e2('0x41'),null,'cm_contacts.id\x20=\x20cm_hopper.ContactId')[_0xe4e2('0x16')]('cm_contact_has_items',null,_0xe4e2('0x55'))[_0xe4e2('0x19')]('cm_hopper.ListId\x20=\x20?',_0x59c52d)[_0xe4e2('0x19')](_0xe4e2('0x45'),NOW))[_0xe4e2('0x49')]();}function insertCmContact(_0x3e540d,_0x3c0107,_0xf7409d,_0x315255){var _0x37b33b=_[_0xe4e2('0x56')](_['keys'](_0x315255),[_0xe4e2('0x3c'),_0xe4e2('0x57'),_0xe4e2('0x4d'),_0xe4e2('0x3d')]);return squel[_0xe4e2('0x4b')]()[_0xe4e2('0x38')](_0xe4e2('0x41'))[_0xe4e2('0x39')](_0x37b33b,squel[_0xe4e2('0x13')]()[_0xe4e2('0x40')](_0x37b33b)[_0xe4e2('0x15')](_0x3c0107)['where']('('+_0xf7409d[_0xe4e2('0x16')](',')+_0xe4e2('0x58'),squel[_0xe4e2('0x13')]()[_0xe4e2('0x40')](_0xf7409d)['from'](_0xe4e2('0x41'))[_0xe4e2('0x19')]('ListId\x20=\x20?',_0x3e540d))[_0xe4e2('0x19')](_0xe4e2('0x59'),squel[_0xe4e2('0x13')]()[_0xe4e2('0x4e')]('MIN(id)',_0xe4e2('0x5a'))['from'](_0x3c0107)[_0xe4e2('0x5b')](_0xf7409d[_0xe4e2('0x16')](','))))[_0xe4e2('0x49')]();}function handleStop(){logger[_0xe4e2('0x5c')](_0xe4e2('0x5d'));stopped=!![];}function handleUncaughtException(_0x26ab38){logger[_0xe4e2('0x24')](_0x26ab38[_0xe4e2('0x25')]);process[_0xe4e2('0x5e')](0x1);}function handleError(_0x230969,_0x3cb0d2){stats[_0xe4e2('0x5f')]['push']({'name':_0x3cb0d2[_0xe4e2('0x60')],'message':_0x3cb0d2['message'],'row':_0x230969});}function handleQuery(_0x5eb739){logger[_0xe4e2('0x5c')](_0x5eb739);return db[_0xe4e2('0x61')][_0xe4e2('0x1b')](_0x5eb739)['spread'](function(_0x477acd){results['push'](_0x477acd);})[_0xe4e2('0x23')](function(_0x9ba757){logger['error'](_0x9ba757[_0xe4e2('0x25')]);});}function main(_0x14f7da,_0x55d442,_0x3f2b39,_0x4e3a01){logger['info'](_0xe4e2('0x62'),_0x14f7da,JSON[_0xe4e2('0x63')](_0x55d442));process[_0xe4e2('0x64')](_0xe4e2('0x65'));var _0x4bd248=_0x55d442[_0xe4e2('0x66')];var _0x3f94ef=_[_0xe4e2('0x67')](_0x4bd248);var _0x133f62=_0x55d442[_0xe4e2('0x68')];var _0x472b0d=path[_0xe4e2('0x16')](config[_0xe4e2('0x69')],_0xe4e2('0x6a'),_0x133f62+'.csv');logger['info']('body',_0x55d442);db[_0xe4e2('0x6b')][_0xe4e2('0x6c')]({'raw':!![],'attributes':['id',_0xe4e2('0x6d')]})[_0xe4e2('0x22')](function(_0x346e88){for(var _0x2c38a7=0x0;_0x2c38a7<_0x346e88[_0xe4e2('0x1e')];_0x2c38a7++){if(_0x346e88[_0x2c38a7]['name']in _0x4bd248){contactItemTypes[_0xe4e2('0x20')](_0x346e88[_0x2c38a7]);delete _0x3f94ef[_0x346e88[_0x2c38a7][_0xe4e2('0x6d')]];hasAdditionalPhones=!![];}for(var _0x1a96af in _0x4bd248){if(_0x346e88[_0x2c38a7][_0xe4e2('0x6d')]+_0xe4e2('0x6e')===_0x1a96af){phoneDescriptions[_0xe4e2('0x20')]({'itemTypeId':_0x346e88[_0x2c38a7]['id'],'description':_0x1a96af});delete _0x3f94ef[_0x1a96af];}}}if(hasAdditionalPhones)_0x3f94ef[_0xe4e2('0x26')]='';var _0x38eb8a=_[_0xe4e2('0x6f')](_0x3f94ef)[_0xe4e2('0x16')]();logger[_0xe4e2('0x5c')](_0xe4e2('0x70'),_0x38eb8a);fs[_0xe4e2('0x71')](_0x472b0d,_0x38eb8a+'\x0a');Papa[_0xe4e2('0x72')](fs[_0xe4e2('0x73')](_0x14f7da),{'header':!![],'skipEmptyLines':!![],'step':function(_0x51d58d,_0x4434c9){try{for(var _0xdeb76a=0x0,_0x32185b=[];_0xdeb76a<_0x51d58d[_0xe4e2('0x74')][_0xe4e2('0x1e')];_0xdeb76a++){stats[_0xe4e2('0x75')]+=0x1;if(_0x51d58d[_0xe4e2('0x5f')][_0xdeb76a]){handleError(_0x51d58d[_0xe4e2('0x74')][_0xdeb76a],_0x51d58d[_0xe4e2('0x5f')][_0xdeb76a]);}else{var _0x23e014=[];var _0x57a7eb=[];var _0x31cdfe={};for(var _0x46b5bc in _0x4bd248){let _0x11679c=contactItemTypes[_0xe4e2('0x76')](_0x24859b=>_0x24859b[_0xe4e2('0x6d')]===_0x46b5bc);let _0xacef79=contactItemTypes[_0xe4e2('0x76')](_0x4d6bbd=>_0x4d6bbd[_0xe4e2('0x6d')]+_0xe4e2('0x6e')===_0x46b5bc);if(_[_0xe4e2('0x1f')](_0x11679c)&&_[_0xe4e2('0x1f')](_0xacef79)){if(_0x4bd248[_0xe4e2('0x77')](_0x46b5bc)){if(_0x51d58d[_0xe4e2('0x74')][_0xdeb76a][_0x4bd248[_0x46b5bc]]){var _0x150c1a=_[_0xe4e2('0x78')](_0x51d58d[_0xe4e2('0x74')][_0xdeb76a][_0x4bd248[_0x46b5bc]][_0xe4e2('0x79')](/"/g,'\x27'));switch(_0x46b5bc){case'scheduledat':var _0x10fe72=moment(_0x150c1a,_0xe4e2('0xf'),!![]);if(_0x10fe72['isValid']()){_0x32185b[_0xe4e2('0x20')]('\x22'+_0x150c1a+'\x22');}else{_0x23e014[_0xe4e2('0x20')](_0xe4e2('0x7a'));}break;case _0xe4e2('0x3e'):var _0x16f0d1=parseInt(_0x150c1a);_0x150c1a=_['isNaN'](_0x16f0d1)||_0x16f0d1<0x0||_0x16f0d1>0x4?_0x4e3a01?0x3:0x2:_0x16f0d1;_0x32185b[_0xe4e2('0x20')]('\x22'+_0x150c1a+'\x22');break;case _0xe4e2('0x7b'):var _0x287546=parseInt(_0x150c1a);if(_[_0xe4e2('0x7c')](_0x287546)&&_[_0xe4e2('0x7d')](_0x3f2b39,_0x287546)){_0x32185b[_0xe4e2('0x20')]('\x22'+_0x287546+'\x22');}else{_0x23e014[_0xe4e2('0x20')](_0xe4e2('0x7e'));}break;case'email':if(isEmail(_0x150c1a)){_0x32185b[_0xe4e2('0x20')]('\x22'+_0x150c1a+'\x22');}else{_0x23e014[_0xe4e2('0x20')](_0xe4e2('0x7f'));}break;case _0xe4e2('0x80'):var _0x2fec7a=moment(_0x150c1a,_0xe4e2('0x81'),!![]);if(_0x2fec7a[_0xe4e2('0x82')]()){_0x32185b[_0xe4e2('0x20')]('\x22'+_0x150c1a+'\x22');}else{_0x23e014[_0xe4e2('0x20')]('dateOfBirth\x20wrong\x20format\x20(YYYY-MM-DD)');}break;default:_0x32185b[_0xe4e2('0x20')]('\x22'+_0x150c1a+'\x22');}}else{switch(_0x46b5bc){case _0xe4e2('0x83'):case _0xe4e2('0x14'):_0x23e014[_0xe4e2('0x20')](_0x46b5bc+_0xe4e2('0x84'));break;default:_0x32185b[_0xe4e2('0x20')]('\x22\x22');}}}}else{var _0x1255e0='';if(!_[_0xe4e2('0x1f')](_0x11679c)){if(!_0x31cdfe[_0xe4e2('0x77')](_0x11679c['id'])){for(var _0x428f83=0x0;_0x428f83<_0x4bd248[_0x46b5bc][_0xe4e2('0x1e')];_0x428f83++){var _0x150c1a=_[_0xe4e2('0x78')](_0x51d58d['data'][_0xdeb76a][_0x4bd248[_0x46b5bc][_0x428f83]][_0xe4e2('0x79')](/"/g,'\x27'));var _0x5ed108=phoneDescriptions[_0xe4e2('0x76')](_0x18e8b3=>_0x18e8b3['itemTypeId']===_0x11679c['id']);if(!_[_0xe4e2('0x1f')](_0x5ed108)){var _0xd829a8=_[_0xe4e2('0x78')](_0x51d58d[_0xe4e2('0x74')][_0xdeb76a][_0x4bd248[_0x5ed108[_0xe4e2('0x85')]][0x0]][_0xe4e2('0x79')](/"/g,'\x27'));if(!_[_0xe4e2('0x1f')](_0xd829a8))_0x150c1a=_0x150c1a+'§'+_0xd829a8;}if(_0x1255e0=='')_0x1255e0=_0x150c1a;else _0x1255e0+='|'+_0x150c1a;}_0x57a7eb['push'](_0x11679c['id']+':'+_0x1255e0);_0x31cdfe[_0x11679c['id']]=0x1;}}}}if(hasAdditionalPhones){_0x32185b[_0xe4e2('0x20')]('\x22'+_0x57a7eb[_0xe4e2('0x16')](';')+'\x22');}if(_0x23e014['length']){handleError(_0x51d58d['data'][_0xdeb76a],{'code':_0xe4e2('0x86'),'message':_0x23e014[_0xe4e2('0x16')]()});}else{fs[_0xe4e2('0x87')](_0x472b0d,_0x32185b['join']()+'\x0a');}_0x32185b=[];}if(!(stats[_0xe4e2('0x75')]%0xc8)){socket['emit'](_0xe4e2('0x88')+_0x133f62,stats);stats[_0xe4e2('0x5f')]=[];}}if(stopped){logger['info'](_0xe4e2('0x89'));_0x4434c9[_0xe4e2('0x8a')]();}}catch(_0x45ecb8){handleError(_0x51d58d[_0xe4e2('0x74')][_0xdeb76a],{'code':_0xe4e2('0x8b'),'message':_0x45ecb8[_0xe4e2('0x25')]});logger[_0xe4e2('0x24')](_0xe4e2('0x8c'),_0x45ecb8[_0xe4e2('0x25')]);}},'complete':function(){try{var _0x18fb51=[];var _0x5a6a7c=tempTableName;_0x18fb51[_0xe4e2('0x20')](_0xe4e2('0x8d')+_0x5a6a7c+'\x20LIKE\x20cm_contacts;');logger[_0xe4e2('0x5c')]('CIS\x20len',contactItemTypes[_0xe4e2('0x1e')]);var _0x388f48=util[_0xe4e2('0xe')](_0xe4e2('0x8e'),_0x472b0d,_0x5a6a7c,_0x38eb8a,_0x55d442['ListId'],_0x55d442[_0xe4e2('0x57')]||null,NOW,NOW);if(_[_0xe4e2('0x1f')](_0x4bd248[_0xe4e2('0x3a')])){_0x388f48+=_0xe4e2('0x8f');}_0x18fb51[_0xe4e2('0x20')](_0x388f48);BPromise[_0xe4e2('0x90')](_0x18fb51,handleQuery)[_0xe4e2('0x22')](function(_0x526a50){BPromise['all']([handleAdditionalPhones()])[_0xe4e2('0x22')](function(){_0x18fb51=[];for(var _0x3d7f70=0x0;_0x3d7f70<promisesContact[_0xe4e2('0x1e')];_0x3d7f70++){_0x18fb51[_0xe4e2('0x20')](updateContact(promisesContact[_0x3d7f70][_0xe4e2('0x91')]));}BPromise[_0xe4e2('0x21')](_0x18fb51)[_0xe4e2('0x22')](function(){_0x18fb51=[];for(var _0x35bf89=0x0;_0x35bf89<promisesAdditionalPhones[_0xe4e2('0x1e')];_0x35bf89++){_0x18fb51[_0xe4e2('0x20')](createAdditionalPhone(promisesAdditionalPhones[_0x35bf89][_0xe4e2('0x92')],promisesAdditionalPhones[_0x35bf89][_0xe4e2('0x93')],promisesAdditionalPhones[_0x35bf89][_0xe4e2('0x14')],promisesAdditionalPhones[_0x35bf89][_0xe4e2('0x94')]));}BPromise[_0xe4e2('0x21')](_0x18fb51)[_0xe4e2('0x22')](function(){_0x18fb51=[];_0x18fb51[_0xe4e2('0x20')](insertCmHopperAdditionalPhones(_0x55d442[_0xe4e2('0x3c')]));_0x18fb51[_0xe4e2('0x20')]('DROP\x20TABLE\x20'+_0x5a6a7c+';');BPromise[_0xe4e2('0x90')](_0x18fb51,handleQuery)[_0xe4e2('0x22')](function(_0x38f5ea){stats['finish']=!![];stats['affectedRows']=updatedRows;socket[_0xe4e2('0x95')]('contact:import:'+_0x133f62,stats);fs[_0xe4e2('0x96')](_0x14f7da);fs[_0xe4e2('0x96')](_0x472b0d);process[_0xe4e2('0x5e')](0x0);})[_0xe4e2('0x23')](function(_0x41e636){logger[_0xe4e2('0x24')](_0x41e636[_0xe4e2('0x25')]);process[_0xe4e2('0x5e')](0x1);});});});});})[_0xe4e2('0x23')](function(_0x4a53fb){logger[_0xe4e2('0x24')](_0x4a53fb[_0xe4e2('0x25')]);process['exit'](0x1);});}catch(_0x4ab01e){logger[_0xe4e2('0x24')](_0xe4e2('0x97'),_0x4ab01e[_0xe4e2('0x25')]);process[_0xe4e2('0x5e')](0x1);}},'error':function(_0x11707e,_0x11a6f4,_0x38675b,_0x39fcac){throw new Error(_0x39fcac);}});});}function validate(){if(process[_0xe4e2('0x98')]&&process[_0xe4e2('0x98')]['length']<0x4){throw new Error(_0xe4e2('0x99'));}var _0x466aa2=path[_0xe4e2('0x16')](config[_0xe4e2('0x69')],_0xe4e2('0x6a'),process[_0xe4e2('0x98')][0x2]);if(!fs[_0xe4e2('0x9a')](_0x466aa2)){throw new Error('file\x20doesn\x27t\x20exists');}var _0xceeaed={};try{_0xceeaed=JSON[_0xe4e2('0x72')](process[_0xe4e2('0x98')][0x3]);if(!_0xceeaed[_0xe4e2('0x66')]){throw new Error(_0xe4e2('0x9b'));}var _0x108f5a=0x0;if(_0xceeaed[_0xe4e2('0x66')][_0xe4e2('0x7b')]){_0x108f5a=0x1;}if(!_0xceeaed[_0xe4e2('0x3c')]){throw new Error('ListId\x20is\x20mandatory');}}catch(_0xd1362c){throw new Error(_0xe4e2('0x9c'));}var _0x132da5=[];try{_0x132da5=_['map'](JSON[_0xe4e2('0x72')](process[_0xe4e2('0x98')][0x4]),'id');}catch(_0x30a6f5){logger[_0xe4e2('0x5c')](_0xe4e2('0x9d'));}main(_0x466aa2,_0xceeaed,_0x132da5,_0x108f5a);}validate();process['on'](_0xe4e2('0x9e'),handleStop);process['on']('uncaughtException',handleUncaughtException);
\ No newline at end of file
index 8789df5..f3be60d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x70a3=['***\x20Time\x20Info\x20***','Answer\x20Time','answertime','Complete\x20Time','duration','Billable\x20Time','string','[xCALLY\x20Ticket]','toLowerCase','push','variable','queue','calleridnum','outbound','destcalleridnum','voice','inbound','***\x20Call\x20Info\x20***','Caller\x20Number','keyValue','Caller\x20Name','Call\x20To','destexten','Queue','UniqueId','uniqueid','Date','agentcalledAt','Agent\x20Name','destcalleridname','Agent\x20Number','Agent\x20Ring','Agent\x20Connect','agentconnectAt','holdtime','Talk\x20Time','talktime','Called\x20Number','membername'];(function(_0x47e7cb,_0x4c1b8d){var _0x2a8874=function(_0x36498f){while(--_0x36498f){_0x47e7cb['push'](_0x47e7cb['shift']());}};_0x2a8874(++_0x4c1b8d);}(_0x70a3,0x1da));var _0x370a=function(_0x311599,_0x1f9944){_0x311599=_0x311599-0x0;var _0x19b81c=_0x70a3[_0x311599];return _0x19b81c;};'use strict';exports['getSubjects']=function(_0x302dbd,_0xb77555){var _0x4c2042=[{'type':_0x370a('0x0'),'content':_0x370a('0x1'),'variableName':null}];switch(_0x302dbd['toLowerCase']()){case'voice':switch(_0xb77555[_0x370a('0x2')]()){case'inbound':_0x4c2042[_0x370a('0x3')]({'type':_0x370a('0x4'),'content':'','variableName':_0x370a('0x5')});_0x4c2042[_0x370a('0x3')]({'type':_0x370a('0x4'),'content':'','variableName':_0x370a('0x6')});break;case _0x370a('0x7'):_0x4c2042[_0x370a('0x3')]({'type':_0x370a('0x0'),'content':'Outbound\x20Call','variableName':null});_0x4c2042[_0x370a('0x3')]({'type':_0x370a('0x4'),'content':'','variableName':_0x370a('0x8')});break;}}return _0x4c2042;};exports['getDescriptions']=function(_0x1245ae,_0x3b06ff){var _0x2f32f8=[];switch(_0x1245ae[_0x370a('0x2')]()){case _0x370a('0x9'):switch(_0x3b06ff['toLowerCase']()){case _0x370a('0xa'):_0x2f32f8=[{'type':_0x370a('0x0'),'content':_0x370a('0xb'),'key':null,'keyType':null,'variableName':null},{'type':'keyValue','content':'','key':_0x370a('0xc'),'keyType':_0x370a('0x4'),'variableName':_0x370a('0x6')},{'type':_0x370a('0xd'),'content':'','key':_0x370a('0xe'),'keyType':'variable','variableName':'calleridname'},{'type':'keyValue','content':'','key':_0x370a('0xf'),'keyType':_0x370a('0x4'),'variableName':_0x370a('0x10')},{'type':_0x370a('0xd'),'content':'','key':_0x370a('0x11'),'keyType':'variable','variableName':_0x370a('0x5')},{'type':_0x370a('0xd'),'content':'','key':_0x370a('0x12'),'keyType':_0x370a('0x4'),'variableName':_0x370a('0x13')},{'type':_0x370a('0xd'),'content':'','key':_0x370a('0x14'),'keyType':_0x370a('0x4'),'variableName':_0x370a('0x15')},{'type':_0x370a('0x0'),'content':'***\x20Agent\x20Info\x20***','key':null,'keyType':null,'variableName':null},{'type':_0x370a('0xd'),'content':'','key':_0x370a('0x16'),'keyType':'variable','variableName':_0x370a('0x17')},{'type':_0x370a('0xd'),'content':'','key':_0x370a('0x18'),'keyType':'variable','variableName':'destcalleridnum'},{'type':_0x370a('0x0'),'content':'***\x20Time\x20Info\x20***','key':null,'keyType':null,'variableName':null},{'type':_0x370a('0xd'),'content':'','key':_0x370a('0x19'),'keyType':_0x370a('0x4'),'variableName':_0x370a('0x15')},{'type':_0x370a('0xd'),'content':'','key':_0x370a('0x1a'),'keyType':_0x370a('0x4'),'variableName':_0x370a('0x1b')},{'type':_0x370a('0xd'),'content':'','key':'Agent\x20Complete','keyType':_0x370a('0x4'),'variableName':'agentcompleteAt'},{'type':_0x370a('0xd'),'content':'','key':'Hold\x20Time','keyType':_0x370a('0x4'),'variableName':_0x370a('0x1c')},{'type':_0x370a('0xd'),'content':'','key':_0x370a('0x1d'),'keyType':_0x370a('0x4'),'variableName':_0x370a('0x1e')}];break;case _0x370a('0x7'):_0x2f32f8=[{'type':_0x370a('0x0'),'content':'***\x20Call\x20Info\x20***','variableName':null},{'type':_0x370a('0xd'),'content':'','key':_0x370a('0x1f'),'keyType':'variable','keyContent':'','variableName':'destcalleridnum'},{'type':_0x370a('0xd'),'content':'','key':'Member\x20Name','keyType':_0x370a('0x4'),'keyContent':'','variableName':_0x370a('0x20')},{'type':_0x370a('0xd'),'content':'','key':_0x370a('0x12'),'keyType':_0x370a('0x4'),'keyContent':'','variableName':_0x370a('0x13')},{'type':_0x370a('0xd'),'content':'','key':_0x370a('0x14'),'keyType':_0x370a('0x4'),'keyContent':'','variableName':'starttime'},{'type':_0x370a('0x0'),'content':_0x370a('0x21')},{'type':_0x370a('0xd'),'content':'','key':_0x370a('0x22'),'keyType':_0x370a('0x4'),'keyContent':'','variableName':_0x370a('0x23')},{'type':_0x370a('0xd'),'content':'','key':_0x370a('0x24'),'keyType':'variable','keyContent':'','variableName':'endtime'},{'type':_0x370a('0xd'),'content':'','key':'Duration','keyType':_0x370a('0x4'),'keyContent':'','variableName':_0x370a('0x25')},{'type':_0x370a('0xd'),'content':'','key':_0x370a('0x26'),'keyType':'variable','keyContent':'','variableName':'billableseconds'}];break;}}return _0x2f32f8;};
\ No newline at end of file
+var _0x10ae=['***\x20Time\x20Info\x20***','Agent\x20Connect','agentconnectAt','Agent\x20Complete','Hold\x20Time','holdtime','Talk\x20Time','talktime','outbound','Member\x20Name','membername','endtime','Duration','duration','Billable\x20Time','billableseconds','getSubjects','string','[xCALLY\x20Ticket]','toLowerCase','voice','inbound','push','variable','queue','calleridnum','Outbound\x20Call','destcalleridnum','getDescriptions','***\x20Call\x20Info\x20***','keyValue','Caller\x20Number','Caller\x20Name','calleridname','Call\x20To','destexten','Queue','UniqueId','uniqueid','Date','agentcalledAt','***\x20Agent\x20Info\x20***','Agent\x20Name','destcalleridname','Agent\x20Number'];(function(_0x5abde3,_0x4c95f8){var _0x4d7e9c=function(_0x32581c){while(--_0x32581c){_0x5abde3['push'](_0x5abde3['shift']());}};_0x4d7e9c(++_0x4c95f8);}(_0x10ae,0x6a));var _0xe10a=function(_0x41e7c4,_0x2723e1){_0x41e7c4=_0x41e7c4-0x0;var _0x20ddf2=_0x10ae[_0x41e7c4];return _0x20ddf2;};'use strict';exports[_0xe10a('0x0')]=function(_0x252f4,_0x19c16b){var _0x21fe8a=[{'type':_0xe10a('0x1'),'content':_0xe10a('0x2'),'variableName':null}];switch(_0x252f4[_0xe10a('0x3')]()){case _0xe10a('0x4'):switch(_0x19c16b['toLowerCase']()){case _0xe10a('0x5'):_0x21fe8a[_0xe10a('0x6')]({'type':_0xe10a('0x7'),'content':'','variableName':_0xe10a('0x8')});_0x21fe8a[_0xe10a('0x6')]({'type':'variable','content':'','variableName':_0xe10a('0x9')});break;case'outbound':_0x21fe8a['push']({'type':_0xe10a('0x1'),'content':_0xe10a('0xa'),'variableName':null});_0x21fe8a[_0xe10a('0x6')]({'type':_0xe10a('0x7'),'content':'','variableName':_0xe10a('0xb')});break;}}return _0x21fe8a;};exports[_0xe10a('0xc')]=function(_0x462fab,_0x2fde44){var _0x34be7c=[];switch(_0x462fab[_0xe10a('0x3')]()){case'voice':switch(_0x2fde44['toLowerCase']()){case _0xe10a('0x5'):_0x34be7c=[{'type':_0xe10a('0x1'),'content':_0xe10a('0xd'),'key':null,'keyType':null,'variableName':null},{'type':_0xe10a('0xe'),'content':'','key':_0xe10a('0xf'),'keyType':'variable','variableName':_0xe10a('0x9')},{'type':_0xe10a('0xe'),'content':'','key':_0xe10a('0x10'),'keyType':_0xe10a('0x7'),'variableName':_0xe10a('0x11')},{'type':_0xe10a('0xe'),'content':'','key':_0xe10a('0x12'),'keyType':_0xe10a('0x7'),'variableName':_0xe10a('0x13')},{'type':_0xe10a('0xe'),'content':'','key':_0xe10a('0x14'),'keyType':_0xe10a('0x7'),'variableName':_0xe10a('0x8')},{'type':_0xe10a('0xe'),'content':'','key':_0xe10a('0x15'),'keyType':_0xe10a('0x7'),'variableName':_0xe10a('0x16')},{'type':_0xe10a('0xe'),'content':'','key':_0xe10a('0x17'),'keyType':_0xe10a('0x7'),'variableName':_0xe10a('0x18')},{'type':_0xe10a('0x1'),'content':_0xe10a('0x19'),'key':null,'keyType':null,'variableName':null},{'type':'keyValue','content':'','key':_0xe10a('0x1a'),'keyType':_0xe10a('0x7'),'variableName':_0xe10a('0x1b')},{'type':'keyValue','content':'','key':_0xe10a('0x1c'),'keyType':'variable','variableName':_0xe10a('0xb')},{'type':_0xe10a('0x1'),'content':_0xe10a('0x1d'),'key':null,'keyType':null,'variableName':null},{'type':'keyValue','content':'','key':'Agent\x20Ring','keyType':_0xe10a('0x7'),'variableName':'agentcalledAt'},{'type':'keyValue','content':'','key':_0xe10a('0x1e'),'keyType':'variable','variableName':_0xe10a('0x1f')},{'type':'keyValue','content':'','key':_0xe10a('0x20'),'keyType':_0xe10a('0x7'),'variableName':'agentcompleteAt'},{'type':_0xe10a('0xe'),'content':'','key':_0xe10a('0x21'),'keyType':_0xe10a('0x7'),'variableName':_0xe10a('0x22')},{'type':_0xe10a('0xe'),'content':'','key':_0xe10a('0x23'),'keyType':_0xe10a('0x7'),'variableName':_0xe10a('0x24')}];break;case _0xe10a('0x25'):_0x34be7c=[{'type':_0xe10a('0x1'),'content':'***\x20Call\x20Info\x20***','variableName':null},{'type':_0xe10a('0xe'),'content':'','key':'Called\x20Number','keyType':'variable','keyContent':'','variableName':_0xe10a('0xb')},{'type':_0xe10a('0xe'),'content':'','key':_0xe10a('0x26'),'keyType':'variable','keyContent':'','variableName':_0xe10a('0x27')},{'type':_0xe10a('0xe'),'content':'','key':'UniqueId','keyType':_0xe10a('0x7'),'keyContent':'','variableName':_0xe10a('0x16')},{'type':_0xe10a('0xe'),'content':'','key':_0xe10a('0x17'),'keyType':'variable','keyContent':'','variableName':'starttime'},{'type':_0xe10a('0x1'),'content':_0xe10a('0x1d')},{'type':'keyValue','content':'','key':'Answer\x20Time','keyType':_0xe10a('0x7'),'keyContent':'','variableName':'answertime'},{'type':'keyValue','content':'','key':'Complete\x20Time','keyType':_0xe10a('0x7'),'keyContent':'','variableName':_0xe10a('0x28')},{'type':_0xe10a('0xe'),'content':'','key':_0xe10a('0x29'),'keyType':_0xe10a('0x7'),'keyContent':'','variableName':_0xe10a('0x2a')},{'type':_0xe10a('0xe'),'content':'','key':_0xe10a('0x2b'),'keyType':'variable','keyContent':'','variableName':_0xe10a('0x2c')}];break;}}return _0x34be7c;};
\ No newline at end of file
index 75136c9..b349404 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdd15=['order','forEach','contactName','DESC','closed','getClosedOrderClause','rows','catch','tracked','body','html','phone','fax','mobile','updateUser','lodash','./sql-utils','./utils','findAll','skipInteractionsQuery','resolve','getInteractionsQuery','then','parseAdvancedSearchFilter','search','parseQueryParameters','where','contact','default','fields','user','tags','checkAccountsRestrictions','group','ids','tag','countFilteredInteractions','count','length','having','clause'];(function(_0x13852b,_0x725eb3){var _0x506ca1=function(_0x72e0c8){while(--_0x72e0c8){_0x13852b['push'](_0x13852b['shift']());}};_0x506ca1(++_0x725eb3);}(_0xdd15,0x1d2));var _0x5dd1=function(_0x3430aa,_0x57cd92){_0x3430aa=_0x3430aa-0x0;var _0x2ac5c=_0xdd15[_0x3430aa];return _0x2ac5c;};'use strict';var _=require(_0x5dd1('0x0'));var sqlUtils=require(_0x5dd1('0x1'));var utils=require(_0x5dd1('0x2'));exports[_0x5dd1('0x3')]=function(_0x573597,_0x4cb035,_0x454ebb,_0x2377c7,_0x58906e){var _0x506bff={'count':0x0,'rows':[]};var _0x30a724=sqlUtils[_0x5dd1('0x4')](_0x573597,_0x454ebb,_0x4cb035);if(_0x30a724){return Promise[_0x5dd1('0x5')](_0x506bff);}var _0x263cc8=sqlUtils[_0x5dd1('0x6')](_0x573597);var _0x4617c3={};return Promise[_0x5dd1('0x5')]()[_0x5dd1('0x7')](function(){if(_0x4cb035['search']){return sqlUtils[_0x5dd1('0x8')](_0x4cb035[_0x5dd1('0x9')],_0x58906e);}else{return sqlUtils[_0x5dd1('0xa')](_0x573597,_0x4cb035,_0x58906e);}})[_0x5dd1('0x7')](function(_0x140032){_0x263cc8[_0x5dd1('0xb')](_0x140032['body']);_0x263cc8[_0x5dd1('0xb')](_0x140032[_0x5dd1('0xc')]);_0x263cc8[_0x5dd1('0xb')](_0x140032[_0x5dd1('0xd')]);_0x263cc8[_0x5dd1('0xb')](_0x140032[_0x5dd1('0xe')]);_0x263cc8['where'](_0x140032['filter']);_0x263cc8[_0x5dd1('0xb')](_0x140032[_0x5dd1('0xf')]);_0x263cc8['having'](_0x140032['read']);_0x4617c3=_0x140032[_0x5dd1('0x10')];return sqlUtils[_0x5dd1('0x11')](_0x573597,_0x454ebb,_0x4cb035);})[_0x5dd1('0x7')](function(_0x5bacb2){_0x263cc8[_0x5dd1('0xb')](_0x5bacb2);_0x263cc8[_0x5dd1('0x12')]('i.id');var _0x47765b=_0x4cb035[_0x5dd1('0x9')]?_0x4617c3[_0x5dd1('0x13')]:_0x4cb035[_0x5dd1('0x14')];return sqlUtils[_0x5dd1('0x15')](_0x263cc8,_0x47765b);})[_0x5dd1('0x7')](function(_0x244bfb){_0x506bff[_0x5dd1('0x16')]=_0x244bfb[_0x5dd1('0x17')];if(_0x506bff[_0x5dd1('0x16')]===0x0){return[];}_0x263cc8[_0x5dd1('0x18')](_0x4617c3[_0x5dd1('0x19')]);if(_0x2377c7[_0x5dd1('0x1a')]){_0x2377c7[_0x5dd1('0x1a')][_0x5dd1('0x1b')](function(_0x51e912){var _0x53cc4b=_0x51e912[0x0]===_0x5dd1('0x1c')?_0x51e912[0x0]:'i.'+_0x51e912[0x0];_0x263cc8[_0x5dd1('0x1a')](_0x53cc4b,_0x51e912[0x1]===_0x5dd1('0x1d')?![]:!![]);if(_0x51e912[0x0]===_0x5dd1('0x1e')){var _0x1e75d9=sqlUtils[_0x5dd1('0x1f')](_0x573597,_0x4cb035);_0x263cc8['order'](_0x1e75d9,_0x51e912[0x1]===_0x5dd1('0x1d')?![]:!![]);}});}return sqlUtils['getFilteredInteractions'](_0x573597,_0x263cc8,_0x4cb035,_0x2377c7);})[_0x5dd1('0x7')](function(_0x31f3bf){_0x506bff[_0x5dd1('0x20')]=_0x31f3bf;return _0x506bff;})[_0x5dd1('0x21')](function(_0x442e34){throw _0x442e34;});};exports[_0x5dd1('0x22')]=function(_0x3146f7,_0x5b0c77){return function(_0x459758,_0x24d887,_0x50e5f5){var _0x2294cf=_0x459758['user'];var _0x5af0a5={};var _0x185dd7=_0x459758['query'];if(_0x5af0a5){_0x5af0a5=_['clone'](_0x459758[_0x5dd1('0x23')]);_0x5af0a5=_['omit'](_0x5af0a5,[_0x5dd1('0x23'),_0x5dd1('0x24'),_0x5dd1('0x25'),_0x5dd1('0x26'),_0x5dd1('0x27')]);}utils[_0x5dd1('0x28')](_0x2294cf,_0x5af0a5,_0x185dd7,_0x3146f7,_0x5b0c77);_0x50e5f5(null);};};
\ No newline at end of file
+var _0x01b8=['updateUser','lodash','./sql-utils','skipInteractionsQuery','resolve','getInteractionsQuery','search','parseAdvancedSearchFilter','parseQueryParameters','then','where','contact','default','fields','filter','user','read','tags','checkAccountsRestrictions','i.id','tag','countFilteredInteractions','count','length','having','order','forEach','closed','getClosedOrderClause','DESC','getFilteredInteractions','rows','catch','tracked','body','html','phone','fax','mobile'];(function(_0x574db5,_0x549c95){var _0x392719=function(_0x78fec9){while(--_0x78fec9){_0x574db5['push'](_0x574db5['shift']());}};_0x392719(++_0x549c95);}(_0x01b8,0x76));var _0x801b=function(_0x2079e7,_0xdc5145){_0x2079e7=_0x2079e7-0x0;var _0x5a26c9=_0x01b8[_0x2079e7];return _0x5a26c9;};'use strict';var _=require(_0x801b('0x0'));var sqlUtils=require(_0x801b('0x1'));var utils=require('./utils');exports['findAll']=function(_0xdd0ad1,_0x4517a1,_0x4d2972,_0x10e186,_0x4ba60d){var _0x51e84e={'count':0x0,'rows':[]};var _0x321bba=sqlUtils[_0x801b('0x2')](_0xdd0ad1,_0x4d2972,_0x4517a1);if(_0x321bba){return Promise[_0x801b('0x3')](_0x51e84e);}var _0x59a54c=sqlUtils[_0x801b('0x4')](_0xdd0ad1);var _0x41754f={};return Promise['resolve']()['then'](function(){if(_0x4517a1[_0x801b('0x5')]){return sqlUtils[_0x801b('0x6')](_0x4517a1['search'],_0x4ba60d);}else{return sqlUtils[_0x801b('0x7')](_0xdd0ad1,_0x4517a1,_0x4ba60d);}})[_0x801b('0x8')](function(_0x2d2854){_0x59a54c[_0x801b('0x9')](_0x2d2854['body']);_0x59a54c['where'](_0x2d2854[_0x801b('0xa')]);_0x59a54c['where'](_0x2d2854[_0x801b('0xb')]);_0x59a54c[_0x801b('0x9')](_0x2d2854[_0x801b('0xc')]);_0x59a54c[_0x801b('0x9')](_0x2d2854[_0x801b('0xd')]);_0x59a54c[_0x801b('0x9')](_0x2d2854[_0x801b('0xe')]);_0x59a54c['having'](_0x2d2854[_0x801b('0xf')]);_0x41754f=_0x2d2854[_0x801b('0x10')];return sqlUtils[_0x801b('0x11')](_0xdd0ad1,_0x4d2972,_0x4517a1);})[_0x801b('0x8')](function(_0x4c3b40){_0x59a54c[_0x801b('0x9')](_0x4c3b40);_0x59a54c['group'](_0x801b('0x12'));var _0x79c83b=_0x4517a1[_0x801b('0x5')]?_0x41754f['ids']:_0x4517a1[_0x801b('0x13')];return sqlUtils[_0x801b('0x14')](_0x59a54c,_0x79c83b);})['then'](function(_0x467ad9){_0x51e84e[_0x801b('0x15')]=_0x467ad9[_0x801b('0x16')];if(_0x51e84e[_0x801b('0x15')]===0x0){return[];}_0x59a54c[_0x801b('0x17')](_0x41754f['clause']);if(_0x10e186[_0x801b('0x18')]){_0x10e186[_0x801b('0x18')][_0x801b('0x19')](function(_0x9d1e69){var _0x50ec12=_0x9d1e69[0x0]==='contactName'?_0x9d1e69[0x0]:'i.'+_0x9d1e69[0x0];_0x59a54c[_0x801b('0x18')](_0x50ec12,_0x9d1e69[0x1]==='DESC'?![]:!![]);if(_0x9d1e69[0x0]===_0x801b('0x1a')){var _0x2ab534=sqlUtils[_0x801b('0x1b')](_0xdd0ad1,_0x4517a1);_0x59a54c[_0x801b('0x18')](_0x2ab534,_0x9d1e69[0x1]===_0x801b('0x1c')?![]:!![]);}});}return sqlUtils[_0x801b('0x1d')](_0xdd0ad1,_0x59a54c,_0x4517a1,_0x10e186);})[_0x801b('0x8')](function(_0x57a8df){_0x51e84e[_0x801b('0x1e')]=_0x57a8df;return _0x51e84e;})[_0x801b('0x1f')](function(_0x1d4888){throw _0x1d4888;});};exports[_0x801b('0x20')]=function(_0x17fbd4,_0x3999d4){return function(_0x4f5b33,_0x42ba89,_0x1007ff){var _0x3b591b=_0x4f5b33[_0x801b('0xe')];var _0x256e81={};var _0x5dbc9e=_0x4f5b33['query'];if(_0x256e81){_0x256e81=_['clone'](_0x4f5b33[_0x801b('0x21')]);_0x256e81=_['omit'](_0x256e81,[_0x801b('0x21'),_0x801b('0x22'),_0x801b('0x23'),_0x801b('0x24'),_0x801b('0x25')]);}utils[_0x801b('0x26')](_0x3b591b,_0x256e81,_0x5dbc9e,_0x17fbd4,_0x3999d4);_0x1007ff(null);};};
\ No newline at end of file
index 7b0dfc9..d35d284 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x937a=['keys','some','concat','createdAt','parse','$lte','null','\x20IS\x20NULL','\x20=\x20?','then','tag','filter','get','chat','Websites','Accounts','resolve','role','i.thirdDisposition','i.secondDisposition','i.disposition','unshift','i.substatus','closed','CONCAT_WS(\x27\x27,\x20','join','Interaction','Sequelize','QueryTypes','SELECT','sequelize','query','toString','keyBy','merge','fields','attributes','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','unreadMessages','Account.key','a.mandatoryDisposition','a.email','Account.email','contactName','i.updatedAt','i.closed','i.closedAt','i.attach','i.lastMsgDirection','i.MailAccountId','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','c.lastName','Contact.email','c.phone','Contact.phone','c.mobile','Contact.mobile','c.fax','Owner.fullname','o.internal','Owner.internal','TagIds','limit','offset','groupBy','Setting','findOne','enableEmailPreview','all','COUNT(*)','t.id\x20IN\x20?','lodash','squel','../parsers/advancedSearch','../parsers/qs','./update-interaction','../../mysqldb','getAccountFK','agent','search','select','field','name','color','from','tools_tags','getInteractionFK','user_has_','_interactions','u.id','u.fullname','ui.','left_join','users','u.id\x20=\x20ui.UserId','where','\x20IN\x20?','map','getInteractionsTables','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','o.id\x20=\x20i.UserId','messages','\x20=\x20i.id','interactionsTags','it.','expr','getSelectedTags','forEach','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','replace','{OPERATOR}','isNumeric','i.id\x20LIKE\x20?','sms','whatsapp','i.fax\x20LIKE\x20?','openchannel','i.from\x20LIKE\x20?','isEmail','c.email\x20LIKE\x20?','mail','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)','parseSearch','sqlOperator','conditions','length','find','buildExpression','type','default','text','value','start','end','read','and','operator','$substring','contact','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','ContactId','split','tags','clause','ids','User','user','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId'];(function(_0x4c59e0,_0x4ce660){var _0xc69b7a=function(_0x56f400){while(--_0x56f400){_0x4c59e0['push'](_0x4c59e0['shift']());}};_0xc69b7a(++_0x4ce660);}(_0x937a,0xe7));var _0xa937=function(_0x345a1b,_0x189c9e){_0x345a1b=_0x345a1b-0x0;var _0x1b24ec=_0x937a[_0x345a1b];return _0x1b24ec;};'use strict';var _=require(_0xa937('0x0'));var squel=require(_0xa937('0x1'));var as=require(_0xa937('0x2'));var qs=require(_0xa937('0x3'));var updateInteraction=require(_0xa937('0x4'))['updateInteraction'];var utils=require('./utils');var db=require(_0xa937('0x5'))['db'];function skipInteractionsQuery(_0x34091b,_0x496c47,_0x3f6403){var _0x55e286=![];var _0x545e12=utils[_0xa937('0x6')](_0x34091b);if(_0x496c47['role']===_0xa937('0x7')&&!_0x3f6403[_0xa937('0x8')]&&!_0x3f6403[_0x545e12]){_0x55e286=!![];}return _0x55e286;}function getTagsQuery(){return squel[_0xa937('0x9')]()[_0xa937('0xa')]('id')[_0xa937('0xa')](_0xa937('0xb'))[_0xa937('0xa')](_0xa937('0xc'))[_0xa937('0xd')](_0xa937('0xe'));}function getUsersQuery(_0x117426,_0x3ed614){var _0x2d42ec=utils[_0xa937('0xf')](_0x117426);var _0x121a98=_0xa937('0x10')+_0x117426+_0xa937('0x11');var _0x52434a=squel['select']()['field'](_0xa937('0x12'))['field'](_0xa937('0x13'))[_0xa937('0xa')](_0xa937('0x14')+_0x2d42ec)[_0xa937('0xd')](_0x121a98,'ui')[_0xa937('0x15')](_0xa937('0x16'),'u',_0xa937('0x17'));if(_0x3ed614['length']>0x0){_0x52434a[_0xa937('0x18')](_0xa937('0x14')+_0x2d42ec+_0xa937('0x19'),_[_0xa937('0x1a')](_0x3ed614,'id'));}return _0x52434a;}function getInteractionsQuery(_0x2daf76){var _0x3ecd3b=utils[_0xa937('0x1b')](_0x2daf76);var _0x4eb3da=utils[_0xa937('0x6')](_0x2daf76);var _0x273df2=utils[_0xa937('0xf')](_0x2daf76);return squel[_0xa937('0x9')]()[_0xa937('0xd')](_0x3ecd3b['interactions'],'i')['left_join'](_0xa937('0x1c'),'c',_0xa937('0x1d'))['left_join'](_0xa937('0x16'),'o',_0xa937('0x1e'))[_0xa937('0x15')](_0x3ecd3b['accounts'],'a','a.id\x20=\x20i.'+_0x4eb3da)[_0xa937('0x15')](_0x3ecd3b[_0xa937('0x1f')],'me','me.'+_0x273df2+_0xa937('0x20'))[_0xa937('0x15')](_0x3ecd3b[_0xa937('0x21')],'it',_0xa937('0x22')+_0x273df2+_0xa937('0x20'))[_0xa937('0x15')]('tools_tags','t','t.id\x20=\x20it.TagId');}function getSqlClauses(){var _0x5c2cf6={'body':squel['expr'](),'contact':squel['expr'](),'default':squel[_0xa937('0x23')](),'fields':squel['expr'](),'filter':squel[_0xa937('0x23')](),'read':squel[_0xa937('0x23')](),'tags':{'clause':squel[_0xa937('0x23')](),'ids':null},'user':squel[_0xa937('0x23')]()};return _0x5c2cf6;}function parseTagParameter(_0x25d609){var _0x2880e1=squel[_0xa937('0x23')]();if(_0x25d609){var _0x4526b0=utils[_0xa937('0x24')](_0x25d609);_0x4526b0[_0xa937('0x25')](function(_0xf92ff1){_0x2880e1['or'](_0xa937('0x26'),'%,'+_0xf92ff1+',%');});}return _0x2880e1;}function parseReadParameter(_0x5412e4){var _0x31bf22='';if(_0x5412e4){_0x31bf22='unreadMessages\x20{OPERATOR}\x200';if(_0x5412e4==='1'){_0x31bf22=_0x31bf22[_0xa937('0x27')](_0xa937('0x28'),'=');}else{_0x31bf22=_0x31bf22[_0xa937('0x27')](_0xa937('0x28'),'>');}}return _0x31bf22;}function parseSearchFilter(_0x170fcf,_0x25677b){var _0x3f533a=squel[_0xa937('0x23')]();if(_0x25677b){var _0x3164ee=_0x25677b[_0xa937('0x27')]('\x5c','\x5c\x5c')[_0xa937('0x27')](/'/g,'\x27\x27');if(qs[_0xa937('0x29')](_0x3164ee)){_0x3f533a['or'](_0xa937('0x2a'),_0x3164ee+'%');if([_0xa937('0x2b'),_0xa937('0x2c')]['includes'](_0x170fcf)){_0x3f533a['or']('i.phone\x20LIKE\x20?',_0x3164ee+'%');}else if(_0x170fcf==='fax'){_0x3f533a['or'](_0xa937('0x2d'),_0x3164ee+'%');}else if(_0x170fcf===_0xa937('0x2e')){_0x3f533a['or'](_0xa937('0x2f'),_0x3164ee+'%');}}else if(_0x170fcf==='mail'&&qs[_0xa937('0x30')](_0x3164ee)){_0x3f533a['or'](_0xa937('0x31'),_0x3164ee+'%');}else{if(_0x170fcf===_0xa937('0x32')){_0x3f533a['or'](_0xa937('0x33'),qs[_0xa937('0x34')](_0x3164ee,!![]))['or'](_0xa937('0x35'),qs[_0xa937('0x34')](_0x3164ee));}else if(_0x170fcf!=='fax'){_0x3f533a['or'](_0xa937('0x36'),qs[_0xa937('0x34')](_0x3164ee));}_0x3f533a['or'](_0xa937('0x37'),qs[_0xa937('0x34')](_0x3164ee,!![]),null);}}return _0x3f533a;}function parseAdvancedSearchFilter(_0x4b2744,_0x2f01e4){var _0xf73629=getSqlClauses();var _0x48ae12=as[_0xa937('0x38')](_0x4b2744);var _0x5567e1=_0x48ae12[_0xa937('0x39')];for(var _0x528fc4=0x0;_0x528fc4<_0x48ae12[_0xa937('0x3a')][_0xa937('0x3b')];_0x528fc4++){var _0x12351d=_0x48ae12[_0xa937('0x3a')][_0x528fc4];var _0x4fd30e='i';var _0x4e67f9=_[_0xa937('0x3c')](_0x2f01e4,[_0xa937('0xb'),_0x12351d['field']]);if(_0x4e67f9){var _0x201809=as[_0xa937('0x3d')](_0x4fd30e,_0x4e67f9[_0xa937('0x3e')],_0x12351d);_0xf73629[_0xa937('0x3f')][_0x5567e1](_0x201809[_0xa937('0x40')],_0x201809[_0xa937('0x41')][_0xa937('0x42')],_0x201809[_0xa937('0x41')][_0xa937('0x43')]);}else{switch(_0x12351d[_0xa937('0xa')]){case'unreadMessages':var _0x11d89e=parseReadParameter(_0x12351d[_0xa937('0x41')]);_0xf73629[_0xa937('0x44')][_0xa937('0x45')](_0x11d89e);break;case'Contact':if(_0x12351d[_0xa937('0x46')]===_0xa937('0x47')){if(_0x12351d['value']['split']('\x20')[_0xa937('0x3b')]>0x1){_0xf73629['contact'][_0x5567e1](_0xa937('0x37'),qs['getFullTextValue'](_0x12351d[_0xa937('0x41')],!![]),null);}else{var _0x125bee='%'+_0x12351d[_0xa937('0x41')]+'%';_0xf73629[_0xa937('0x48')][_0x5567e1](_0xa937('0x49'),_0x125bee,_0x125bee,_0x125bee);}}else{_0x4e67f9=_[_0xa937('0x3c')](_0x2f01e4,[_0xa937('0xb'),_0xa937('0x4a')]);_0x12351d[_0xa937('0xa')]=_0xa937('0x4a');_0x201809=as[_0xa937('0x3d')](_0x4fd30e,_0x4e67f9[_0xa937('0x3e')],_0x12351d);_0xf73629[_0xa937('0x48')][_0x5567e1](_0x201809[_0xa937('0x40')],_0x201809[_0xa937('0x41')][_0xa937('0x42')],_0x201809[_0xa937('0x41')][_0xa937('0x43')]);}break;case'Tag':var _0x4ac822=_0x12351d[_0xa937('0x41')][_0xa937('0x4b')](',')[_0xa937('0x1a')](function(_0x90f9a5){return Number(_0x90f9a5);});var _0x190609=parseTagParameter(_0x4ac822);_0xf73629[_0xa937('0x4c')][_0xa937('0x4d')][_0xa937('0x45')](_0x190609);_0xf73629[_0xa937('0x4c')][_0xa937('0x4e')]=_0x4ac822;break;case _0xa937('0x4f'):if(_0x12351d[_0xa937('0x46')]===_0xa937('0x47')){_0xf73629[_0xa937('0x50')][_0x5567e1](_0xa937('0x51'),'%'+_0x12351d[_0xa937('0x41')]+'%',null);}else{_0x4e67f9=_[_0xa937('0x3c')](_0x2f01e4,['name',_0xa937('0x52')]);_0x12351d['field']=_0xa937('0x52');_0x201809=as['buildExpression'](_0x4fd30e,_0x4e67f9[_0xa937('0x3e')],_0x12351d);_0xf73629[_0xa937('0x50')][_0x5567e1](_0x201809['text'],_0x201809['value'][_0xa937('0x42')],_0x201809[_0xa937('0x41')]['end']);}break;case'body':case'plainBody':_0x201809=as[_0xa937('0x3d')]('me',null,_0x12351d);_0xf73629['body'][_0x5567e1](_0x201809[_0xa937('0x40')],_0x201809[_0xa937('0x41')][_0xa937('0x42')],_0x201809[_0xa937('0x41')]['end']);break;}}}return _0xf73629;}function parseModelFields(_0x11d903,_0x1a926a,_0x19a8ba){var _0x1a2e20=utils[_0xa937('0x6')](_0x11d903);var _0x452c49=squel[_0xa937('0x23')]();var _0x3fe9ab=_(_0x1a926a)[_0xa937('0x53')]()[_0xa937('0x1a')](function(_0x52bfa5){return _[_0xa937('0x54')](_0x19a8ba,[_0xa937('0xb'),_0x52bfa5])?_0x52bfa5:undefined;})['compact']()[_0xa937('0x41')]();if(_0x3fe9ab[_0xa937('0x3b')]>0x0){_0x3fe9ab[_0xa937('0x25')](function(_0x5714a6){if(_0x5714a6===_0x1a2e20){_0x452c49[_0xa937('0x45')]('i.'+_0x1a2e20+_0xa937('0x19'),[][_0xa937('0x55')](_0x1a926a[_0x5714a6]));}else if(_0x5714a6===_0xa937('0x56')){var _0x51ae7a=JSON['parse'](_0x1a926a[_0x5714a6])['$gte'];var _0x3eaa90=JSON[_0xa937('0x57')](_0x1a926a[_0x5714a6])[_0xa937('0x58')];_0x452c49[_0xa937('0x45')]('i.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x51ae7a,_0x3eaa90);}else{if(_0x1a926a[_0x5714a6]===_0xa937('0x59')){_0x452c49['and']('i.'+_0x5714a6+_0xa937('0x5a'));}else{_0x452c49[_0xa937('0x45')]('i.'+_0x5714a6+_0xa937('0x5b'),_0x1a926a[_0x5714a6]);}}});}return _0x452c49;}function parseQueryParameters(_0x5c8912,_0x830dd4,_0x318aa1){var _0x168cdb=getSqlClauses();return Promise['resolve']()[_0xa937('0x5c')](function(){return parseModelFields(_0x5c8912,_0x830dd4,_0x318aa1);})[_0xa937('0x5c')](function(_0x3a9195){_0x168cdb['fields']['and'](_0x3a9195);return parseReadParameter(_0x830dd4[_0xa937('0x44')]);})['then'](function(_0x223946){_0x168cdb[_0xa937('0x44')][_0xa937('0x45')](_0x223946);return parseTagParameter(_0x830dd4[_0xa937('0x5d')]);})['then'](function(_0x786229){_0x168cdb[_0xa937('0x4c')][_0xa937('0x4d')][_0xa937('0x45')](_0x786229);return parseSearchFilter(_0x5c8912,_0x830dd4[_0xa937('0x5e')]);})[_0xa937('0x5c')](function(_0x439c2b){_0x168cdb['filter']=_0x439c2b;return _0x168cdb;});}function checkAccountsRestrictions(_0x2e0236,_0x1cd41a,_0x485edc){var _0x41e64e=utils['getAccountFK'](_0x2e0236);var _0x4403c5=_0xa937('0x5f')+_['capitalize'](_0x2e0236)+(_0x2e0236===_0xa937('0x60')?_0xa937('0x61'):_0xa937('0x62'));var _0x37adbd=squel['expr']();return Promise[_0xa937('0x63')]()[_0xa937('0x5c')](function(){if(_0x485edc[_0xa937('0x8')]&&_0x1cd41a[_0xa937('0x64')]===_0xa937('0x7')){return _0x1cd41a[_0x4403c5]({'attributes':['id'],'raw':!![]});}})['then'](function(_0x4c928f){if(_0x4c928f){if(_0x4c928f[_0xa937('0x3b')]===0x0){_0x37adbd['and']('i.'+_0x41e64e+_0xa937('0x5a'));}else{_0x37adbd['and']('i.'+_0x41e64e+_0xa937('0x19'),_[_0xa937('0x1a')](_0x4c928f,'id'));}}else if(!_0x485edc[_0x41e64e]){_0x37adbd[_0xa937('0x45')]('i.'+_0x41e64e+'\x20IS\x20NOT\x20NULL');}})[_0xa937('0x5c')](function(){return _0x37adbd;});}function getClosedOrderClause(_0x319ed8,_0x595781){var _0x5cc310='';var _0x3c39b6=[_0xa937('0x65'),_0xa937('0x66'),_0xa937('0x67')];if(_0x319ed8===_0xa937('0x32')){_0x3c39b6[_0xa937('0x68')](_0xa937('0x69'));}if(_0x595781[_0xa937('0x6a')]==='0'&&_0x319ed8===_0xa937('0x32')){_0x5cc310=_0xa937('0x69');}else{if(_0x595781['closed']==='1'){_0x3c39b6['shift']();}_0x5cc310=_0xa937('0x6b')+_0x3c39b6[_0xa937('0x6c')](',\x20')+')';}return _0x5cc310;}function getFilteredInteractions(_0x546f9f,_0x381a5f,_0x2ca2dd,_0x385fa3){var _0x4674cc=utils['getInteractionFK'](_0x546f9f);var _0x3a359c=_['capitalize'](_0x546f9f)+_0xa937('0x6d');var _0x4722b2=[];var _0x3cb5de=getTagsQuery();var _0x1c562a={'type':db[_0xa937('0x6e')][_0xa937('0x6f')][_0xa937('0x70')],'raw':!![]};var _0x188337=[];var _0x4e53d2=[];return db[_0xa937('0x71')][_0xa937('0x72')](_0x3cb5de[_0xa937('0x73')](),_0x1c562a)[_0xa937('0x5c')](function(_0x9734a9){_0x4722b2=_[_0xa937('0x74')](_0x9734a9,'id');_0x1c562a=_[_0xa937('0x75')](_0x1c562a,{'model':db[_0x3a359c],'mapToModel':!![],'nest':!![]});if(_0x2ca2dd[_0xa937('0x76')]){_0x385fa3[_0xa937('0x77')][_0xa937('0x25')](function(_0x160f11){_0x381a5f['field']('i.'+_0x160f11);});}else{_0x381a5f[_0xa937('0xa')](_0xa937('0x78'),_0xa937('0x79'));_0x381a5f[_0xa937('0xa')]('a.key',_0xa937('0x7a'));_0x381a5f[_0xa937('0xa')](_0xa937('0x7b'),'Account.mandatoryDisposition');if(_0x546f9f===_0xa937('0x32')){_0x381a5f[_0xa937('0xa')](_0xa937('0x7c'),_0xa937('0x7d'));_0x381a5f[_0xa937('0xa')]('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',_0xa937('0x7e'));_0x381a5f['field']('i.id');_0x381a5f[_0xa937('0xa')]('i.createdAt');_0x381a5f['field'](_0xa937('0x7f'));_0x381a5f[_0xa937('0xa')](_0xa937('0x80'));_0x381a5f[_0xa937('0xa')](_0xa937('0x81'));_0x381a5f[_0xa937('0xa')](_0xa937('0x82'));_0x381a5f['field']('i.lastMsgAt');_0x381a5f[_0xa937('0xa')](_0xa937('0x83'));_0x381a5f['field']('i.subject');_0x381a5f['field'](_0xa937('0x67'));_0x381a5f[_0xa937('0xa')](_0xa937('0x66'));_0x381a5f['field'](_0xa937('0x65'));_0x381a5f[_0xa937('0xa')](_0xa937('0x69'));_0x381a5f[_0xa937('0xa')]('i.to');_0x381a5f[_0xa937('0xa')]('i.ContactId');_0x381a5f[_0xa937('0xa')](_0xa937('0x84'));_0x381a5f[_0xa937('0xa')]('i.UserId');}else if(_0x546f9f===_0xa937('0x2e')){_0x381a5f[_0xa937('0xa')](_0xa937('0x85'),'contactName');}else{_0x381a5f['field'](_0xa937('0x86'),_0xa937('0x7e'));}if(_0x546f9f!==_0xa937('0x32')){_0x381a5f['field'](_0xa937('0x87'));}_0x381a5f[_0xa937('0xa')](_0xa937('0x88'),'Contact.firstName');_0x381a5f[_0xa937('0xa')](_0xa937('0x89'),'Contact.lastName');_0x381a5f[_0xa937('0xa')]('c.email',_0xa937('0x8a'));_0x381a5f[_0xa937('0xa')](_0xa937('0x8b'),_0xa937('0x8c'));_0x381a5f[_0xa937('0xa')](_0xa937('0x8d'),_0xa937('0x8e'));_0x381a5f[_0xa937('0xa')](_0xa937('0x8f'),'Contact.fax');_0x381a5f[_0xa937('0xa')]('o.fullname',_0xa937('0x90'));_0x381a5f[_0xa937('0xa')](_0xa937('0x91'),_0xa937('0x92'));_0x381a5f['field']('GROUP_CONCAT(DISTINCT\x20t.id)',_0xa937('0x93'));}if(_0x385fa3['limit']){_0x381a5f['limit'](_0x385fa3[_0xa937('0x94')]);}if(_0x385fa3[_0xa937('0x95')]){_0x381a5f[_0xa937('0x95')](_0x385fa3[_0xa937('0x95')]);}return db[_0xa937('0x71')][_0xa937('0x72')](_0x381a5f[_0xa937('0x73')](),_0x1c562a);})[_0xa937('0x5c')](function(_0x557d6c){_0x188337=_0x557d6c;var _0x3b817f=getUsersQuery(_0x546f9f,_0x188337);return db[_0xa937('0x71')][_0xa937('0x72')](_0x3b817f[_0xa937('0x73')](),_0x1c562a);})[_0xa937('0x5c')](function(_0x1da7e2){_0x4e53d2=_[_0xa937('0x96')](_0x1da7e2,_0x4674cc);if(_0x546f9f===_0xa937('0x32')){return db[_0xa937('0x97')][_0xa937('0x98')]({'attributes':[_0xa937('0x99')],'raw':!![]});}})[_0xa937('0x5c')](function(_0x5c7bf7){var _0x4dab7b=_0x5c7bf7?_0x5c7bf7['enableEmailPreview']:undefined;var _0x4a9be8=_0x188337[_0xa937('0x1a')](function(_0x30a8bf){return updateInteraction(_0x30a8bf,_0x4722b2,_0x4e53d2,_0x4dab7b);});return Promise[_0xa937('0x9a')](_0x4a9be8);});}function countFilteredInteractions(_0x56cc53,_0x1caa71){var _0x2aa256=_0x56cc53['clone']();_0x2aa256['field'](_0xa937('0x9b'));_0x2aa256['field'](_0xa937('0x78'),_0xa937('0x79'));var _0x10008c=utils[_0xa937('0x24')](_0x1caa71);if(!_['isEmpty'](_0x10008c)){_0x2aa256[_0xa937('0x18')](_0xa937('0x9c'),_0x10008c);}var _0x4320e9={'type':db[_0xa937('0x6e')][_0xa937('0x6f')][_0xa937('0x70')],'raw':!![]};return db['sequelize'][_0xa937('0x72')](_0x2aa256['toString'](),_0x4320e9);}module['exports']={'checkAccountsRestrictions':checkAccountsRestrictions,'countFilteredInteractions':countFilteredInteractions,'getClosedOrderClause':getClosedOrderClause,'getFilteredInteractions':getFilteredInteractions,'getInteractionsQuery':getInteractionsQuery,'parseAdvancedSearchFilter':parseAdvancedSearchFilter,'parseQueryParameters':parseQueryParameters,'skipInteractionsQuery':skipInteractionsQuery};
\ No newline at end of file
+var _0xc963=['Contact.mobile','c.fax','Contact.fax','o.fullname','Owner.fullname','o.internal','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','TagIds','limit','offset','groupBy','Setting','all','COUNT(*)','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','isEmpty','t.id\x20IN\x20?','Sequelize','QueryTypes','exports','lodash','squel','../parsers/advancedSearch','../parsers/qs','updateInteraction','./utils','../../mysqldb','getAccountFK','role','search','select','field','name','color','tools_tags','user_has_','_interactions','u.id','u.fullname','ui.','from','length','where','\x20IN\x20?','map','getInteractionsTables','getInteractionFK','interactions','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','left_join','users','o.id\x20=\x20i.UserId','accounts','a.id\x20=\x20i.','me.','\x20=\x20i.id','it.','expr','getSelectedTags','forEach','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','unreadMessages\x20{OPERATOR}\x200','replace','{OPERATOR}','i.id\x20LIKE\x20?','sms','whatsapp','i.phone\x20LIKE\x20?','fax','i.fax\x20LIKE\x20?','openchannel','i.from\x20LIKE\x20?','isEmail','mail','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)','sqlOperator','conditions','find','default','value','end','unreadMessages','read','and','operator','$substring','split','contact','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','ContactId','buildExpression','type','text','Tag','tags','clause','ids','User','user','UserId','start','body','plainBody','keys','some','compact','concat','parse','$gte','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20IS\x20NULL','\x20=\x20?','resolve','then','tag','filter','get','capitalize','chat','Websites','agent','i.thirdDisposition','i.secondDisposition','i.disposition','unshift','i.substatus','closed','shift','CONCAT_WS(\x27\x27,\x20','join','Interaction','SELECT','sequelize','query','toString','merge','fields','a.key','Account.key','a.mandatoryDisposition','Account.mandatoryDisposition','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.attach','i.lastMsgAt','i.lastMsgDirection','i.subject','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','Contact.firstName','c.lastName','Contact.lastName','c.email','Contact.phone','c.mobile'];(function(_0x35d4e9,_0x298c61){var _0x5c2770=function(_0x2f326a){while(--_0x2f326a){_0x35d4e9['push'](_0x35d4e9['shift']());}};_0x5c2770(++_0x298c61);}(_0xc963,0xbf));var _0x3c96=function(_0x36f243,_0x188505){_0x36f243=_0x36f243-0x0;var _0x426436=_0xc963[_0x36f243];return _0x426436;};'use strict';var _=require(_0x3c96('0x0'));var squel=require(_0x3c96('0x1'));var as=require(_0x3c96('0x2'));var qs=require(_0x3c96('0x3'));var updateInteraction=require('./update-interaction')[_0x3c96('0x4')];var utils=require(_0x3c96('0x5'));var db=require(_0x3c96('0x6'))['db'];function skipInteractionsQuery(_0x535b5b,_0x232c50,_0x12da48){var _0x5b1a5e=![];var _0x148c37=utils[_0x3c96('0x7')](_0x535b5b);if(_0x232c50[_0x3c96('0x8')]==='agent'&&!_0x12da48[_0x3c96('0x9')]&&!_0x12da48[_0x148c37]){_0x5b1a5e=!![];}return _0x5b1a5e;}function getTagsQuery(){return squel[_0x3c96('0xa')]()[_0x3c96('0xb')]('id')[_0x3c96('0xb')](_0x3c96('0xc'))['field'](_0x3c96('0xd'))['from'](_0x3c96('0xe'));}function getUsersQuery(_0x4429e3,_0x1ae4c0){var _0x280651=utils['getInteractionFK'](_0x4429e3);var _0x3bdccb=_0x3c96('0xf')+_0x4429e3+_0x3c96('0x10');var _0xeb9026=squel[_0x3c96('0xa')]()[_0x3c96('0xb')](_0x3c96('0x11'))[_0x3c96('0xb')](_0x3c96('0x12'))[_0x3c96('0xb')](_0x3c96('0x13')+_0x280651)[_0x3c96('0x14')](_0x3bdccb,'ui')['left_join']('users','u','u.id\x20=\x20ui.UserId');if(_0x1ae4c0[_0x3c96('0x15')]>0x0){_0xeb9026[_0x3c96('0x16')](_0x3c96('0x13')+_0x280651+_0x3c96('0x17'),_[_0x3c96('0x18')](_0x1ae4c0,'id'));}return _0xeb9026;}function getInteractionsQuery(_0x4776e4){var _0x77aa3b=utils[_0x3c96('0x19')](_0x4776e4);var _0x24229a=utils[_0x3c96('0x7')](_0x4776e4);var _0x21f18a=utils[_0x3c96('0x1a')](_0x4776e4);return squel[_0x3c96('0xa')]()['from'](_0x77aa3b[_0x3c96('0x1b')],'i')['left_join'](_0x3c96('0x1c'),'c',_0x3c96('0x1d'))[_0x3c96('0x1e')](_0x3c96('0x1f'),'o',_0x3c96('0x20'))[_0x3c96('0x1e')](_0x77aa3b[_0x3c96('0x21')],'a',_0x3c96('0x22')+_0x24229a)[_0x3c96('0x1e')](_0x77aa3b['messages'],'me',_0x3c96('0x23')+_0x21f18a+_0x3c96('0x24'))['left_join'](_0x77aa3b['interactionsTags'],'it',_0x3c96('0x25')+_0x21f18a+'\x20=\x20i.id')['left_join'](_0x3c96('0xe'),'t','t.id\x20=\x20it.TagId');}function getSqlClauses(){var _0x15ea9e={'body':squel[_0x3c96('0x26')](),'contact':squel[_0x3c96('0x26')](),'default':squel[_0x3c96('0x26')](),'fields':squel[_0x3c96('0x26')](),'filter':squel[_0x3c96('0x26')](),'read':squel[_0x3c96('0x26')](),'tags':{'clause':squel['expr'](),'ids':null},'user':squel[_0x3c96('0x26')]()};return _0x15ea9e;}function parseTagParameter(_0x41d174){var _0x1069b0=squel[_0x3c96('0x26')]();if(_0x41d174){var _0xa510f7=utils[_0x3c96('0x27')](_0x41d174);_0xa510f7[_0x3c96('0x28')](function(_0x9a403){_0x1069b0['or'](_0x3c96('0x29'),'%,'+_0x9a403+',%');});}return _0x1069b0;}function parseReadParameter(_0x3d3094){var _0x11d60f='';if(_0x3d3094){_0x11d60f=_0x3c96('0x2a');if(_0x3d3094==='1'){_0x11d60f=_0x11d60f[_0x3c96('0x2b')]('{OPERATOR}','=');}else{_0x11d60f=_0x11d60f[_0x3c96('0x2b')](_0x3c96('0x2c'),'>');}}return _0x11d60f;}function parseSearchFilter(_0xdbef53,_0x5a4fc0){var _0x51bffd=squel[_0x3c96('0x26')]();if(_0x5a4fc0){var _0x484683=_0x5a4fc0[_0x3c96('0x2b')]('\x5c','\x5c\x5c')['replace'](/'/g,'\x27\x27');if(qs['isNumeric'](_0x484683)){_0x51bffd['or'](_0x3c96('0x2d'),_0x484683+'%');if([_0x3c96('0x2e'),_0x3c96('0x2f')]['includes'](_0xdbef53)){_0x51bffd['or'](_0x3c96('0x30'),_0x484683+'%');}else if(_0xdbef53===_0x3c96('0x31')){_0x51bffd['or'](_0x3c96('0x32'),_0x484683+'%');}else if(_0xdbef53===_0x3c96('0x33')){_0x51bffd['or'](_0x3c96('0x34'),_0x484683+'%');}}else if(_0xdbef53==='mail'&&qs[_0x3c96('0x35')](_0x484683)){_0x51bffd['or']('c.email\x20LIKE\x20?',_0x484683+'%');}else{if(_0xdbef53===_0x3c96('0x36')){_0x51bffd['or'](_0x3c96('0x37'),qs[_0x3c96('0x38')](_0x484683,!![]))['or'](_0x3c96('0x39'),qs[_0x3c96('0x38')](_0x484683));}else if(_0xdbef53!==_0x3c96('0x31')){_0x51bffd['or'](_0x3c96('0x3a'),qs[_0x3c96('0x38')](_0x484683));}_0x51bffd['or']('MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs[_0x3c96('0x38')](_0x484683,!![]),null);}}return _0x51bffd;}function parseAdvancedSearchFilter(_0x21542e,_0x2b09ab){var _0x3de53b=getSqlClauses();var _0x2f1145=as['parseSearch'](_0x21542e);var _0x1265bb=_0x2f1145[_0x3c96('0x3b')];for(var _0x546b97=0x0;_0x546b97<_0x2f1145[_0x3c96('0x3c')][_0x3c96('0x15')];_0x546b97++){var _0x38600e=_0x2f1145[_0x3c96('0x3c')][_0x546b97];var _0x7c0852='i';var _0x4215e8=_[_0x3c96('0x3d')](_0x2b09ab,['name',_0x38600e[_0x3c96('0xb')]]);if(_0x4215e8){var _0x7cb0d7=as['buildExpression'](_0x7c0852,_0x4215e8['type'],_0x38600e);_0x3de53b[_0x3c96('0x3e')][_0x1265bb](_0x7cb0d7['text'],_0x7cb0d7[_0x3c96('0x3f')]['start'],_0x7cb0d7[_0x3c96('0x3f')][_0x3c96('0x40')]);}else{switch(_0x38600e[_0x3c96('0xb')]){case _0x3c96('0x41'):var _0x41092f=parseReadParameter(_0x38600e[_0x3c96('0x3f')]);_0x3de53b[_0x3c96('0x42')][_0x3c96('0x43')](_0x41092f);break;case'Contact':if(_0x38600e[_0x3c96('0x44')]===_0x3c96('0x45')){if(_0x38600e[_0x3c96('0x3f')][_0x3c96('0x46')]('\x20')[_0x3c96('0x15')]>0x1){_0x3de53b[_0x3c96('0x47')][_0x1265bb](_0x3c96('0x48'),qs['getFullTextValue'](_0x38600e[_0x3c96('0x3f')],!![]),null);}else{var _0x22c6b8='%'+_0x38600e['value']+'%';_0x3de53b[_0x3c96('0x47')][_0x1265bb]('c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?',_0x22c6b8,_0x22c6b8,_0x22c6b8);}}else{_0x4215e8=_[_0x3c96('0x3d')](_0x2b09ab,[_0x3c96('0xc'),_0x3c96('0x49')]);_0x38600e[_0x3c96('0xb')]='ContactId';_0x7cb0d7=as[_0x3c96('0x4a')](_0x7c0852,_0x4215e8[_0x3c96('0x4b')],_0x38600e);_0x3de53b[_0x3c96('0x47')][_0x1265bb](_0x7cb0d7[_0x3c96('0x4c')],_0x7cb0d7[_0x3c96('0x3f')]['start'],_0x7cb0d7['value'][_0x3c96('0x40')]);}break;case _0x3c96('0x4d'):var _0x25da80=_0x38600e[_0x3c96('0x3f')]['split'](',')[_0x3c96('0x18')](function(_0x798b96){return Number(_0x798b96);});var _0x1826b3=parseTagParameter(_0x25da80);_0x3de53b[_0x3c96('0x4e')][_0x3c96('0x4f')][_0x3c96('0x43')](_0x1826b3);_0x3de53b[_0x3c96('0x4e')][_0x3c96('0x50')]=_0x25da80;break;case _0x3c96('0x51'):if(_0x38600e[_0x3c96('0x44')]===_0x3c96('0x45')){_0x3de53b[_0x3c96('0x52')][_0x1265bb]('CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','%'+_0x38600e['value']+'%',null);}else{_0x4215e8=_[_0x3c96('0x3d')](_0x2b09ab,[_0x3c96('0xc'),'UserId']);_0x38600e[_0x3c96('0xb')]=_0x3c96('0x53');_0x7cb0d7=as[_0x3c96('0x4a')](_0x7c0852,_0x4215e8[_0x3c96('0x4b')],_0x38600e);_0x3de53b['user'][_0x1265bb](_0x7cb0d7[_0x3c96('0x4c')],_0x7cb0d7['value'][_0x3c96('0x54')],_0x7cb0d7['value'][_0x3c96('0x40')]);}break;case _0x3c96('0x55'):case _0x3c96('0x56'):_0x7cb0d7=as[_0x3c96('0x4a')]('me',null,_0x38600e);_0x3de53b[_0x3c96('0x55')][_0x1265bb](_0x7cb0d7[_0x3c96('0x4c')],_0x7cb0d7[_0x3c96('0x3f')][_0x3c96('0x54')],_0x7cb0d7['value'][_0x3c96('0x40')]);break;}}}return _0x3de53b;}function parseModelFields(_0x5613a4,_0x500db2,_0x24ed49){var _0xb86b9f=utils[_0x3c96('0x7')](_0x5613a4);var _0x2334d1=squel[_0x3c96('0x26')]();var _0x39140f=_(_0x500db2)[_0x3c96('0x57')]()[_0x3c96('0x18')](function(_0x5b1c9e){return _[_0x3c96('0x58')](_0x24ed49,['name',_0x5b1c9e])?_0x5b1c9e:undefined;})[_0x3c96('0x59')]()[_0x3c96('0x3f')]();if(_0x39140f[_0x3c96('0x15')]>0x0){_0x39140f['forEach'](function(_0x2c9245){if(_0x2c9245===_0xb86b9f){_0x2334d1['and']('i.'+_0xb86b9f+'\x20IN\x20?',[][_0x3c96('0x5a')](_0x500db2[_0x2c9245]));}else if(_0x2c9245==='createdAt'){var _0x4fa6e4=JSON[_0x3c96('0x5b')](_0x500db2[_0x2c9245])[_0x3c96('0x5c')];var _0x30a885=JSON[_0x3c96('0x5b')](_0x500db2[_0x2c9245])[_0x3c96('0x5d')];_0x2334d1[_0x3c96('0x43')](_0x3c96('0x5e'),_0x4fa6e4,_0x30a885);}else{if(_0x500db2[_0x2c9245]===_0x3c96('0x5f')){_0x2334d1[_0x3c96('0x43')]('i.'+_0x2c9245+_0x3c96('0x60'));}else{_0x2334d1[_0x3c96('0x43')]('i.'+_0x2c9245+_0x3c96('0x61'),_0x500db2[_0x2c9245]);}}});}return _0x2334d1;}function parseQueryParameters(_0x3eeca3,_0x42ca1f,_0x4353a0){var _0x14e37b=getSqlClauses();return Promise[_0x3c96('0x62')]()[_0x3c96('0x63')](function(){return parseModelFields(_0x3eeca3,_0x42ca1f,_0x4353a0);})[_0x3c96('0x63')](function(_0x20a724){_0x14e37b['fields'][_0x3c96('0x43')](_0x20a724);return parseReadParameter(_0x42ca1f[_0x3c96('0x42')]);})[_0x3c96('0x63')](function(_0x4911ac){_0x14e37b['read']['and'](_0x4911ac);return parseTagParameter(_0x42ca1f[_0x3c96('0x64')]);})[_0x3c96('0x63')](function(_0x2ad71c){_0x14e37b[_0x3c96('0x4e')][_0x3c96('0x4f')][_0x3c96('0x43')](_0x2ad71c);return parseSearchFilter(_0x3eeca3,_0x42ca1f[_0x3c96('0x65')]);})[_0x3c96('0x63')](function(_0x597637){_0x14e37b[_0x3c96('0x65')]=_0x597637;return _0x14e37b;});}function checkAccountsRestrictions(_0x3d15e0,_0x41951d,_0x1dfea7){var _0x1c6897=utils[_0x3c96('0x7')](_0x3d15e0);var _0x16c337=_0x3c96('0x66')+_[_0x3c96('0x67')](_0x3d15e0)+(_0x3d15e0===_0x3c96('0x68')?_0x3c96('0x69'):'Accounts');var _0x2f7570=squel[_0x3c96('0x26')]();return Promise[_0x3c96('0x62')]()[_0x3c96('0x63')](function(){if(_0x1dfea7['search']&&_0x41951d[_0x3c96('0x8')]===_0x3c96('0x6a')){return _0x41951d[_0x16c337]({'attributes':['id'],'raw':!![]});}})[_0x3c96('0x63')](function(_0x2cbd8a){if(_0x2cbd8a){if(_0x2cbd8a[_0x3c96('0x15')]===0x0){_0x2f7570[_0x3c96('0x43')]('i.'+_0x1c6897+_0x3c96('0x60'));}else{_0x2f7570[_0x3c96('0x43')]('i.'+_0x1c6897+'\x20IN\x20?',_['map'](_0x2cbd8a,'id'));}}else if(!_0x1dfea7[_0x1c6897]){_0x2f7570[_0x3c96('0x43')]('i.'+_0x1c6897+'\x20IS\x20NOT\x20NULL');}})[_0x3c96('0x63')](function(){return _0x2f7570;});}function getClosedOrderClause(_0x57e90f,_0x920341){var _0x3cc284='';var _0x1e3461=[_0x3c96('0x6b'),_0x3c96('0x6c'),_0x3c96('0x6d')];if(_0x57e90f==='mail'){_0x1e3461[_0x3c96('0x6e')](_0x3c96('0x6f'));}if(_0x920341[_0x3c96('0x70')]==='0'&&_0x57e90f===_0x3c96('0x36')){_0x3cc284='i.substatus';}else{if(_0x920341[_0x3c96('0x70')]==='1'){_0x1e3461[_0x3c96('0x71')]();}_0x3cc284=_0x3c96('0x72')+_0x1e3461[_0x3c96('0x73')](',\x20')+')';}return _0x3cc284;}function getFilteredInteractions(_0x3c3c16,_0xbfd684,_0x33928b,_0x4506a6){var _0x24c224=utils[_0x3c96('0x1a')](_0x3c3c16);var _0x39d0ea=_[_0x3c96('0x67')](_0x3c3c16)+_0x3c96('0x74');var _0x4cad93=[];var _0x27feb3=getTagsQuery();var _0x162e1a={'type':db['Sequelize']['QueryTypes'][_0x3c96('0x75')],'raw':!![]};var _0x155ef6=[];var _0x130d90=[];return db[_0x3c96('0x76')][_0x3c96('0x77')](_0x27feb3[_0x3c96('0x78')](),_0x162e1a)[_0x3c96('0x63')](function(_0x481b88){_0x4cad93=_['keyBy'](_0x481b88,'id');_0x162e1a=_[_0x3c96('0x79')](_0x162e1a,{'model':db[_0x39d0ea],'mapToModel':!![],'nest':!![]});if(_0x33928b[_0x3c96('0x7a')]){_0x4506a6['attributes'][_0x3c96('0x28')](function(_0x26471d){_0xbfd684['field']('i.'+_0x26471d);});}else{_0xbfd684[_0x3c96('0xb')]('SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)',_0x3c96('0x41'));_0xbfd684[_0x3c96('0xb')](_0x3c96('0x7b'),_0x3c96('0x7c'));_0xbfd684[_0x3c96('0xb')](_0x3c96('0x7d'),_0x3c96('0x7e'));if(_0x3c3c16==='mail'){_0xbfd684[_0x3c96('0xb')]('a.email',_0x3c96('0x7f'));_0xbfd684[_0x3c96('0xb')](_0x3c96('0x80'),_0x3c96('0x81'));_0xbfd684[_0x3c96('0xb')](_0x3c96('0x82'));_0xbfd684[_0x3c96('0xb')](_0x3c96('0x83'));_0xbfd684['field'](_0x3c96('0x84'));_0xbfd684['field'](_0x3c96('0x85'));_0xbfd684[_0x3c96('0xb')](_0x3c96('0x86'));_0xbfd684['field'](_0x3c96('0x87'));_0xbfd684[_0x3c96('0xb')](_0x3c96('0x88'));_0xbfd684[_0x3c96('0xb')](_0x3c96('0x89'));_0xbfd684[_0x3c96('0xb')](_0x3c96('0x8a'));_0xbfd684['field'](_0x3c96('0x6d'));_0xbfd684[_0x3c96('0xb')](_0x3c96('0x6c'));_0xbfd684[_0x3c96('0xb')](_0x3c96('0x6b'));_0xbfd684[_0x3c96('0xb')](_0x3c96('0x6f'));_0xbfd684[_0x3c96('0xb')]('i.to');_0xbfd684[_0x3c96('0xb')](_0x3c96('0x8b'));_0xbfd684[_0x3c96('0xb')](_0x3c96('0x8c'));_0xbfd684['field'](_0x3c96('0x8d'));}else if(_0x3c3c16===_0x3c96('0x33')){_0xbfd684[_0x3c96('0xb')](_0x3c96('0x8e'),_0x3c96('0x81'));}else{_0xbfd684[_0x3c96('0xb')]('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',_0x3c96('0x81'));}if(_0x3c3c16!=='mail'){_0xbfd684[_0x3c96('0xb')]('i.*');}_0xbfd684[_0x3c96('0xb')]('c.firstName',_0x3c96('0x8f'));_0xbfd684['field'](_0x3c96('0x90'),_0x3c96('0x91'));_0xbfd684[_0x3c96('0xb')](_0x3c96('0x92'),'Contact.email');_0xbfd684[_0x3c96('0xb')]('c.phone',_0x3c96('0x93'));_0xbfd684['field'](_0x3c96('0x94'),_0x3c96('0x95'));_0xbfd684[_0x3c96('0xb')](_0x3c96('0x96'),_0x3c96('0x97'));_0xbfd684[_0x3c96('0xb')](_0x3c96('0x98'),_0x3c96('0x99'));_0xbfd684[_0x3c96('0xb')](_0x3c96('0x9a'),_0x3c96('0x9b'));_0xbfd684[_0x3c96('0xb')](_0x3c96('0x9c'),_0x3c96('0x9d'));}if(_0x4506a6[_0x3c96('0x9e')]){_0xbfd684['limit'](_0x4506a6[_0x3c96('0x9e')]);}if(_0x4506a6[_0x3c96('0x9f')]){_0xbfd684[_0x3c96('0x9f')](_0x4506a6['offset']);}return db[_0x3c96('0x76')]['query'](_0xbfd684[_0x3c96('0x78')](),_0x162e1a);})[_0x3c96('0x63')](function(_0x1023ea){_0x155ef6=_0x1023ea;var _0x5a5b9b=getUsersQuery(_0x3c3c16,_0x155ef6);return db['sequelize']['query'](_0x5a5b9b[_0x3c96('0x78')](),_0x162e1a);})['then'](function(_0x40a2f5){_0x130d90=_[_0x3c96('0xa0')](_0x40a2f5,_0x24c224);if(_0x3c3c16===_0x3c96('0x36')){return db[_0x3c96('0xa1')]['findOne']({'attributes':['enableEmailPreview'],'raw':!![]});}})[_0x3c96('0x63')](function(_0x34782e){var _0x524d10=_0x34782e?_0x34782e['enableEmailPreview']:undefined;var _0x5eb71=_0x155ef6[_0x3c96('0x18')](function(_0x62a461){return updateInteraction(_0x62a461,_0x4cad93,_0x130d90,_0x524d10);});return Promise[_0x3c96('0xa2')](_0x5eb71);});}function countFilteredInteractions(_0x558309,_0x586703){var _0x30a5bb=_0x558309['clone']();_0x30a5bb[_0x3c96('0xb')](_0x3c96('0xa3'));_0x30a5bb[_0x3c96('0xb')](_0x3c96('0xa4'),_0x3c96('0x41'));var _0x2319ba=utils[_0x3c96('0x27')](_0x586703);if(!_[_0x3c96('0xa5')](_0x2319ba)){_0x30a5bb['where'](_0x3c96('0xa6'),_0x2319ba);}var _0x11fcab={'type':db[_0x3c96('0xa7')][_0x3c96('0xa8')][_0x3c96('0x75')],'raw':!![]};return db[_0x3c96('0x76')][_0x3c96('0x77')](_0x30a5bb[_0x3c96('0x78')](),_0x11fcab);}module[_0x3c96('0xa9')]={'checkAccountsRestrictions':checkAccountsRestrictions,'countFilteredInteractions':countFilteredInteractions,'getClosedOrderClause':getClosedOrderClause,'getFilteredInteractions':getFilteredInteractions,'getInteractionsQuery':getInteractionsQuery,'parseAdvancedSearchFilter':parseAdvancedSearchFilter,'parseQueryParameters':parseQueryParameters,'skipInteractionsQuery':skipInteractionsQuery};
\ No newline at end of file
index a2eff10..49c4eb7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0c0b=['fullname','split','forEach','push','waiting','answered','unmanaged','abandoned','total','closed','UserId','talking','disposition','MailMessage','out','plainBody','then','lastMsgText','trimStart','catch','updateInteraction','TagIds','Tags','../../mysqldb','map'];(function(_0x1156ce,_0x50f233){var _0x2b6d72=function(_0x36a033){while(--_0x36a033){_0x1156ce['push'](_0x1156ce['shift']());}};_0x2b6d72(++_0x50f233);}(_0x0c0b,0x94));var _0xb0c0=function(_0x52290a,_0x47f455){_0x52290a=_0x52290a-0x0;var _0x3eb06f=_0x0c0b[_0x52290a];return _0x3eb06f;};'use strict';var _=require('lodash');var db=require(_0xb0c0('0x0'))['db'];function getInteractionUsers(_0x5f00a5,_0x2d0274){return new Promise(function(_0x4282fc,_0x16cd29){try{var _0x56f266=[];if(_0x2d0274[_0x5f00a5]){_0x56f266=_0x2d0274[_0x5f00a5][_0xb0c0('0x1')](function(_0x2078ce){return{'id':_0x2078ce['id'],'fullname':_0x2078ce[_0xb0c0('0x2')]};});}return _0x4282fc(_0x56f266);}catch(_0x506e3c){_0x16cd29(_0x506e3c);}});}function getInteractionTags(_0x1d2d02,_0x434422){var _0x1d1edf=[];if(_0x1d2d02){_0x1d2d02[_0xb0c0('0x3')](',')[_0xb0c0('0x4')](function(_0x132731){_0x1d1edf[_0xb0c0('0x5')](_0x434422[_0x132731]);});}return _0x1d1edf;}function updateWaitingCounter(_0x11d370){if(_0x11d370[_0xb0c0('0x6')]){_0x11d370[_0xb0c0('0x6')]-=0x1;}}function updateInteractionCounters(_0x33e769){_0x33e769[_0xb0c0('0x6')]=0x0;_0x33e769['talking']=0x0;_0x33e769[_0xb0c0('0x7')]=0x0;_0x33e769[_0xb0c0('0x8')]=0x0;_0x33e769[_0xb0c0('0x9')]=0x0;_0x33e769[_0xb0c0('0xa')]=0x0;if(_0x33e769[_0xb0c0('0xb')]){if(_0x33e769['disposition']==='abandoned'){_0x33e769[_0xb0c0('0x9')]+=0x1;updateWaitingCounter(_0x33e769);}if(_0x33e769[_0xb0c0('0xc')]){_0x33e769[_0xb0c0('0x7')]+=0x1;if(_0x33e769[_0xb0c0('0xd')]){_0x33e769[_0xb0c0('0xd')]-=0x1;}}else{if(_0x33e769[_0xb0c0('0xe')]){_0x33e769['unmanaged']+=0x1;updateWaitingCounter(_0x33e769);}}}else{if(!_0x33e769[_0xb0c0('0xc')]){_0x33e769[_0xb0c0('0x6')]+=0x1;}if(_0x33e769[_0xb0c0('0xc')]){_0x33e769[_0xb0c0('0xd')]+=0x1;updateWaitingCounter(_0x33e769);}}_0x33e769[_0xb0c0('0xa')]+=0x1;return _0x33e769;}function getLastMessageText(_0x320aa9){return db[_0xb0c0('0xf')]['findOne']({'where':{'$and':[{'MailInteractionId':_0x320aa9['id']},{'$or':[{'direction':'in'},{'$and':[{'direction':_0xb0c0('0x10')},{'secret':![]},{'UserId':{'$ne':null}}]}]}]},'attributes':[_0xb0c0('0x11')],'order':'-id','raw':!![]})[_0xb0c0('0x12')](function(_0x3fff68){if(_0x3fff68&&_0x3fff68['plainBody']){_0x320aa9[_0xb0c0('0x13')]=_[_0xb0c0('0x14')](_0x3fff68[_0xb0c0('0x11')]);}return _0x320aa9;})[_0xb0c0('0x15')](function(_0x1405f5){throw _0x1405f5;});}exports[_0xb0c0('0x16')]=function(_0x3894e2,_0x3b7733,_0x3572d9,_0x2a764a){return new Promise(function(_0x4f88ee,_0x229db9){return getInteractionUsers(_0x3894e2['id'],_0x3572d9)[_0xb0c0('0x12')](function(_0x255c6d){_0x3894e2['Users']=_0x255c6d;return getInteractionTags(_0x3894e2[_0xb0c0('0x17')],_0x3b7733);})[_0xb0c0('0x12')](function(_0x39a943){_0x3894e2[_0xb0c0('0x18')]=_0x39a943;delete _0x3894e2['TagIds'];return updateInteractionCounters(_0x3894e2);})[_0xb0c0('0x12')](function(_0x7aa18c){if(_0x2a764a){return getLastMessageText(_0x7aa18c);}else{return _0x7aa18c;}})[_0xb0c0('0x12')](function(_0x549ed3){_0x4f88ee(_0x549ed3);})[_0xb0c0('0x15')](function(_0x53e15d){_0x229db9(_0x53e15d);});});};
\ No newline at end of file
+var _0x125f=['Users','TagIds','Tags','catch','lodash','map','fullname','forEach','push','waiting','abandoned','total','closed','UserId','answered','disposition','unmanaged','talking','MailMessage','findOne','plainBody','-id','then','lastMsgText','trimStart','updateInteraction'];(function(_0x48b081,_0x3caf44){var _0x5bafe8=function(_0x28cefb){while(--_0x28cefb){_0x48b081['push'](_0x48b081['shift']());}};_0x5bafe8(++_0x3caf44);}(_0x125f,0x1be));var _0xf125=function(_0x37bcd8,_0x27bed9){_0x37bcd8=_0x37bcd8-0x0;var _0x422480=_0x125f[_0x37bcd8];return _0x422480;};'use strict';var _=require(_0xf125('0x0'));var db=require('../../mysqldb')['db'];function getInteractionUsers(_0x670b75,_0x2dc0d2){return new Promise(function(_0x569e5e,_0x28c3ec){try{var _0x553389=[];if(_0x2dc0d2[_0x670b75]){_0x553389=_0x2dc0d2[_0x670b75][_0xf125('0x1')](function(_0x41e6a2){return{'id':_0x41e6a2['id'],'fullname':_0x41e6a2[_0xf125('0x2')]};});}return _0x569e5e(_0x553389);}catch(_0x30d5e9){_0x28c3ec(_0x30d5e9);}});}function getInteractionTags(_0x576df8,_0x4b055e){var _0x340c53=[];if(_0x576df8){_0x576df8['split'](',')[_0xf125('0x3')](function(_0x3d744c){_0x340c53[_0xf125('0x4')](_0x4b055e[_0x3d744c]);});}return _0x340c53;}function updateWaitingCounter(_0x284418){if(_0x284418['waiting']){_0x284418[_0xf125('0x5')]-=0x1;}}function updateInteractionCounters(_0x1579f1){_0x1579f1[_0xf125('0x5')]=0x0;_0x1579f1['talking']=0x0;_0x1579f1['answered']=0x0;_0x1579f1['unmanaged']=0x0;_0x1579f1[_0xf125('0x6')]=0x0;_0x1579f1[_0xf125('0x7')]=0x0;if(_0x1579f1[_0xf125('0x8')]){if(_0x1579f1['disposition']===_0xf125('0x6')){_0x1579f1['abandoned']+=0x1;updateWaitingCounter(_0x1579f1);}if(_0x1579f1[_0xf125('0x9')]){_0x1579f1[_0xf125('0xa')]+=0x1;if(_0x1579f1['talking']){_0x1579f1['talking']-=0x1;}}else{if(_0x1579f1[_0xf125('0xb')]){_0x1579f1[_0xf125('0xc')]+=0x1;updateWaitingCounter(_0x1579f1);}}}else{if(!_0x1579f1[_0xf125('0x9')]){_0x1579f1[_0xf125('0x5')]+=0x1;}if(_0x1579f1[_0xf125('0x9')]){_0x1579f1[_0xf125('0xd')]+=0x1;updateWaitingCounter(_0x1579f1);}}_0x1579f1['total']+=0x1;return _0x1579f1;}function getLastMessageText(_0x5d13d1){return db[_0xf125('0xe')][_0xf125('0xf')]({'where':{'$and':[{'MailInteractionId':_0x5d13d1['id']},{'$or':[{'direction':'in'},{'$and':[{'direction':'out'},{'secret':![]},{'UserId':{'$ne':null}}]}]}]},'attributes':[_0xf125('0x10')],'order':_0xf125('0x11'),'raw':!![]})[_0xf125('0x12')](function(_0xcbf8ea){if(_0xcbf8ea&&_0xcbf8ea[_0xf125('0x10')]){_0x5d13d1[_0xf125('0x13')]=_[_0xf125('0x14')](_0xcbf8ea[_0xf125('0x10')]);}return _0x5d13d1;})['catch'](function(_0x5d08c9){throw _0x5d08c9;});}exports[_0xf125('0x15')]=function(_0x470086,_0x442c44,_0x5d5c9e,_0x4722da){return new Promise(function(_0x1481a7,_0x34a1be){return getInteractionUsers(_0x470086['id'],_0x5d5c9e)['then'](function(_0x3c0b91){_0x470086[_0xf125('0x16')]=_0x3c0b91;return getInteractionTags(_0x470086[_0xf125('0x17')],_0x442c44);})[_0xf125('0x12')](function(_0x36f0b6){_0x470086[_0xf125('0x18')]=_0x36f0b6;delete _0x470086[_0xf125('0x17')];return updateInteractionCounters(_0x470086);})[_0xf125('0x12')](function(_0x1bf3eb){if(_0x4722da){return getLastMessageText(_0x1bf3eb);}else{return _0x1bf3eb;}})['then'](function(_0x49e6ea){_0x1481a7(_0x49e6ea);})[_0xf125('0x19')](function(_0x4801a5){_0x34a1be(_0x4801a5);});});};
\ No newline at end of file
index 29afc50..508daa2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9343=['exports','../../mysqldb','../../config/logger','openchannel-interactions','mail-interactions','sms-interactions','whatsapp-interactions','chat','Website','Account','capitalize','InteractionId','upperFirst','unknown','websites','accounts','_interactions','_messages','user_has_','[%s]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','toUpperCase','role','stringify','null','Interaction','findOne','then','update'];(function(_0x5e9a69,_0x40c0ec){var _0x5979c8=function(_0x293da2){while(--_0x293da2){_0x5e9a69['push'](_0x5e9a69['shift']());}};_0x5979c8(++_0x40c0ec);}(_0x9343,0xe1));var _0x3934=function(_0x1fc83c,_0x57f51e){_0x1fc83c=_0x1fc83c-0x0;var _0x4ae99e=_0x9343[_0x1fc83c];return _0x4ae99e;};'use strict';var _=require('lodash');var db=require(_0x3934('0x0'))['db'];var loggers={'openchannel':require(_0x3934('0x1'))(_0x3934('0x2')),'mail':require(_0x3934('0x1'))(_0x3934('0x3')),'fax':require(_0x3934('0x1'))('fax-interactions'),'sms':require(_0x3934('0x1'))(_0x3934('0x4')),'chat':require(_0x3934('0x1'))('chat-interactions'),'whatsapp':require(_0x3934('0x1'))(_0x3934('0x5'))};function getAccountFK(_0x15bc9c){return _['capitalize'](_0x15bc9c)+(_0x15bc9c===_0x3934('0x6')?_0x3934('0x7'):_0x3934('0x8'))+'Id';}function getInteractionFK(_0x4cd221){return _[_0x3934('0x9')](_0x4cd221)+_0x3934('0xa');}function getInteractionId(_0x595aeb,_0x402c07,_0x21ea17){if(_0x595aeb&&_0x595aeb[_[_0x3934('0xb')](_0x21ea17)+'InteractionId']){return _0x595aeb[_[_0x3934('0xb')](_0x21ea17)+_0x3934('0xa')];}else if(_0x595aeb&&_0x595aeb['id']){return _0x595aeb['id'];}else if(_0x402c07&&_0x402c07['id']){return _0x402c07['id'];}else{return _0x3934('0xc');}}function getInteractionsTables(_0x2271c6){return{'accounts':_0x2271c6+'_'+(_0x2271c6==='chat'?_0x3934('0xd'):_0x3934('0xe')),'interactions':_0x2271c6+_0x3934('0xf'),'interactionsTags':_0x2271c6+'_interaction_has_tags','messages':_0x2271c6+_0x3934('0x10'),'userInteractions':_0x3934('0x11')+_0x2271c6+'_interactions'};}function getSelectedTags(_0xfa6d34){var _0x975c06=[];if(_0xfa6d34){_0x975c06=Array['isArray'](_0xfa6d34)?_0xfa6d34:[_0xfa6d34];}return _0x975c06;}function log(_0x5b2df3,_0x19f62a,_0x2bddea,_0x19c7ed,_0x9a7526,_0x56d95f){loggers[_0x9a7526['toLowerCase']()][_0x5b2df3](_0x3934('0x12'),_0x56d95f[_0x3934('0x13')](),_0x19f62a?_0x19f62a['id']:null,_0x19f62a?_0x19f62a['name']:null,_0x19f62a?_0x19f62a[_0x3934('0x14')]:null,getInteractionId(_0x2bddea,_0x19c7ed,_0x9a7526),_0x2bddea?JSON[_0x3934('0x15')](_0x2bddea):_0x3934('0x16'));}function updateUser(_0x47fcf3,_0x4223f0,_0x19ea1f,_0x1ab95c,_0x3d4108){db[_['upperFirst'](_0x1ab95c)+_0x3934('0x17')][_0x3934('0x18')]({'where':{'id':getInteractionId(_0x4223f0,_0x19ea1f,_0x1ab95c)}})[_0x3934('0x19')](function(_0xc5113b){if(_0xc5113b){return _0xc5113b[_0x3934('0x1a')]({'UserId':_0x47fcf3?_0x47fcf3['id']:null});}})[_0x3934('0x19')](function(_0x18c1fa){if(_0x18c1fa){log('info',_0x47fcf3,_0x4223f0,_0x19ea1f,_0x1ab95c,_0x3d4108);}})['catch'](function(){log('error',_0x47fcf3,_0x4223f0,_0x19ea1f,_0x1ab95c,_0x3d4108);});}module[_0x3934('0x1b')]={'getAccountFK':getAccountFK,'getInteractionFK':getInteractionFK,'getInteractionsTables':getInteractionsTables,'getSelectedTags':getSelectedTags,'updateUser':updateUser};
\ No newline at end of file
+var _0xe3da=['then','info','exports','../../mysqldb','../../config/logger','openchannel-interactions','mail-interactions','sms-interactions','chat-interactions','capitalize','chat','Website','Account','InteractionId','upperFirst','unknown','websites','accounts','_interaction_has_tags','_interactions','isArray','toLowerCase','[%s]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','toUpperCase','name','role','stringify','null','findOne','update'];(function(_0x915485,_0x5f0dd9){var _0x125035=function(_0xf40ea1){while(--_0xf40ea1){_0x915485['push'](_0x915485['shift']());}};_0x125035(++_0x5f0dd9);}(_0xe3da,0x99));var _0xae3d=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0xe3da[_0x57b54c];return _0x59cc19;};'use strict';var _=require('lodash');var db=require(_0xae3d('0x0'))['db'];var loggers={'openchannel':require(_0xae3d('0x1'))(_0xae3d('0x2')),'mail':require('../../config/logger')(_0xae3d('0x3')),'fax':require(_0xae3d('0x1'))('fax-interactions'),'sms':require(_0xae3d('0x1'))(_0xae3d('0x4')),'chat':require(_0xae3d('0x1'))(_0xae3d('0x5')),'whatsapp':require(_0xae3d('0x1'))('whatsapp-interactions')};function getAccountFK(_0x49e5ab){return _[_0xae3d('0x6')](_0x49e5ab)+(_0x49e5ab===_0xae3d('0x7')?_0xae3d('0x8'):_0xae3d('0x9'))+'Id';}function getInteractionFK(_0xeddce8){return _[_0xae3d('0x6')](_0xeddce8)+_0xae3d('0xa');}function getInteractionId(_0x40dd7f,_0x175650,_0x3c0c5b){if(_0x40dd7f&&_0x40dd7f[_[_0xae3d('0xb')](_0x3c0c5b)+'InteractionId']){return _0x40dd7f[_['upperFirst'](_0x3c0c5b)+_0xae3d('0xa')];}else if(_0x40dd7f&&_0x40dd7f['id']){return _0x40dd7f['id'];}else if(_0x175650&&_0x175650['id']){return _0x175650['id'];}else{return _0xae3d('0xc');}}function getInteractionsTables(_0xd0f79){return{'accounts':_0xd0f79+'_'+(_0xd0f79===_0xae3d('0x7')?_0xae3d('0xd'):_0xae3d('0xe')),'interactions':_0xd0f79+'_interactions','interactionsTags':_0xd0f79+_0xae3d('0xf'),'messages':_0xd0f79+'_messages','userInteractions':'user_has_'+_0xd0f79+_0xae3d('0x10')};}function getSelectedTags(_0x5d9b53){var _0x2442bb=[];if(_0x5d9b53){_0x2442bb=Array[_0xae3d('0x11')](_0x5d9b53)?_0x5d9b53:[_0x5d9b53];}return _0x2442bb;}function log(_0x3feebf,_0x39956a,_0x3a99e0,_0x48022a,_0x12ed64,_0x14761b){loggers[_0x12ed64[_0xae3d('0x12')]()][_0x3feebf](_0xae3d('0x13'),_0x14761b[_0xae3d('0x14')](),_0x39956a?_0x39956a['id']:null,_0x39956a?_0x39956a[_0xae3d('0x15')]:null,_0x39956a?_0x39956a[_0xae3d('0x16')]:null,getInteractionId(_0x3a99e0,_0x48022a,_0x12ed64),_0x3a99e0?JSON[_0xae3d('0x17')](_0x3a99e0):_0xae3d('0x18'));}function updateUser(_0x85b162,_0x323a0a,_0x213787,_0x4eec27,_0x5f5420){db[_[_0xae3d('0xb')](_0x4eec27)+'Interaction'][_0xae3d('0x19')]({'where':{'id':getInteractionId(_0x323a0a,_0x213787,_0x4eec27)}})['then'](function(_0x2d216b){if(_0x2d216b){return _0x2d216b[_0xae3d('0x1a')]({'UserId':_0x85b162?_0x85b162['id']:null});}})[_0xae3d('0x1b')](function(_0x42ea4f){if(_0x42ea4f){log(_0xae3d('0x1c'),_0x85b162,_0x323a0a,_0x213787,_0x4eec27,_0x5f5420);}})['catch'](function(){log('error',_0x85b162,_0x323a0a,_0x213787,_0x4eec27,_0x5f5420);});}module[_0xae3d('0x1d')]={'getAccountFK':getAccountFK,'getInteractionFK':getInteractionFK,'getInteractionsTables':getInteractionsTables,'getSelectedTags':getSelectedTags,'updateUser':updateUser};
\ No newline at end of file
index c43755f..9e92531 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x555a=['composable-middleware','../../mysqldb','../../config/environment','data1','split','createDecipher','aes-256-ctr','format','%s:%s:%s','update','base64','final','utf8','hasOwnProperty','use','License','then','json','Maximum\x20%s\x20limit\x20have\x20been\x20reached','catch','users','User','admin','isUserLimit','util'];(function(_0x5e3a45,_0x45f0c5){var _0x13419f=function(_0x5ac996){while(--_0x5ac996){_0x5e3a45['push'](_0x5e3a45['shift']());}};_0x13419f(++_0x45f0c5);}(_0x555a,0x1a8));var _0xa555=function(_0x2daf33,_0x362615){_0x2daf33=_0x2daf33-0x0;var _0xa9462d=_0x555a[_0x2daf33];return _0xa9462d;};'use strict';var crypto=require('crypto');var util=require(_0xa555('0x0'));var compose=require(_0xa555('0x1'));var db=require(_0xa555('0x2'))['db'];var config=require(_0xa555('0x3'));function getValueFromLicense(_0x62c18d,_0x5d64b8){if(_0x62c18d&&_0x5d64b8){if(_0x5d64b8[_0xa555('0x4')]&&_0x5d64b8['license']){var _0x45cf96=_0x5d64b8['data1'];var _0xe4b4ca=_0x5d64b8['license'];var _0x1ab6b2=_0x45cf96['split']('-')[0x4];var _0xdf9a70=_0x45cf96[_0xa555('0x5')]('-')[0x0];var _0x30e594=crypto[_0xa555('0x6')](_0xa555('0x7'),util[_0xa555('0x8')](_0xa555('0x9'),_0x1ab6b2,_0x45cf96,_0xdf9a70));var _0x57cc45=_0x30e594[_0xa555('0xa')](_0xe4b4ca,_0xa555('0xb'),'utf8');_0x57cc45+=_0x30e594[_0xa555('0xc')](_0xa555('0xd'));var _0x1021a5=JSON['parse'](_0x57cc45);return _0x1021a5[_0xa555('0xe')](_0x62c18d)?_0x1021a5[_0x62c18d]:null;}}return null;}function isLimit(_0x499a6f,_0x1ff26c,_0x16f6be,_0x2c28c9){var _0x47293f=_0x1ff26c;return compose()[_0xa555('0xf')](function(_0x371b88,_0x88c58e,_0x959266){return db[_0xa555('0x10')]['findOne']({'where':{'id':0x1},'raw':!![]})['then'](function(_0x54d546){var _0x55f26a=getValueFromLicense(_0x499a6f,_0x54d546);return _0x55f26a?_0x55f26a:_0x47293f;})['then'](function(_0x47aab0){_0x47293f=_0x47aab0;return _0x16f6be['count'](_0x2c28c9);})[_0xa555('0x11')](function(_0x4d3b77){if(_0x4d3b77>=_0x47293f){return _0x88c58e['status'](0x193)[_0xa555('0x12')]({'message':util[_0xa555('0x8')](_0xa555('0x13'),_0x499a6f)});}_0x959266();})[_0xa555('0x14')](function(_0x5b34ca){_0x959266(_0x5b34ca);});});}function isUserLimit(){return isLimit(_0xa555('0x15'),0x1,db[_0xa555('0x16')],{'where':{'$or':[{'role':_0xa555('0x17')},{'role':'user'}]}});}exports[_0xa555('0x18')]=isUserLimit;
\ No newline at end of file
+var _0x1ee4=['crypto','util','composable-middleware','data1','license','split','createDecipher','aes-256-ctr','format','%s:%s:%s','update','base64','utf8','final','parse','hasOwnProperty','use','License','findOne','then','count','json','Maximum\x20%s\x20limit\x20have\x20been\x20reached','catch','User','admin','user','isUserLimit'];(function(_0x53d1ba,_0x935486){var _0x1a8621=function(_0x251018){while(--_0x251018){_0x53d1ba['push'](_0x53d1ba['shift']());}};_0x1a8621(++_0x935486);}(_0x1ee4,0x16c));var _0x41ee=function(_0x41820c,_0x591c79){_0x41820c=_0x41820c-0x0;var _0x4112ca=_0x1ee4[_0x41820c];return _0x4112ca;};'use strict';var crypto=require(_0x41ee('0x0'));var util=require(_0x41ee('0x1'));var compose=require(_0x41ee('0x2'));var db=require('../../mysqldb')['db'];var config=require('../../config/environment');function getValueFromLicense(_0x4cd36a,_0x390157){if(_0x4cd36a&&_0x390157){if(_0x390157[_0x41ee('0x3')]&&_0x390157[_0x41ee('0x4')]){var _0x37b7d8=_0x390157[_0x41ee('0x3')];var _0x13dd74=_0x390157[_0x41ee('0x4')];var _0x44195b=_0x37b7d8[_0x41ee('0x5')]('-')[0x4];var _0x5ea4e3=_0x37b7d8[_0x41ee('0x5')]('-')[0x0];var _0x99eff1=crypto[_0x41ee('0x6')](_0x41ee('0x7'),util[_0x41ee('0x8')](_0x41ee('0x9'),_0x44195b,_0x37b7d8,_0x5ea4e3));var _0x92f897=_0x99eff1[_0x41ee('0xa')](_0x13dd74,_0x41ee('0xb'),_0x41ee('0xc'));_0x92f897+=_0x99eff1[_0x41ee('0xd')]('utf8');var _0x4969f2=JSON[_0x41ee('0xe')](_0x92f897);return _0x4969f2[_0x41ee('0xf')](_0x4cd36a)?_0x4969f2[_0x4cd36a]:null;}}return null;}function isLimit(_0x14b7c9,_0x461bd3,_0x38f255,_0x4f0cbc){var _0x4946ae=_0x461bd3;return compose()[_0x41ee('0x10')](function(_0x1b3121,_0x43f792,_0x4cf3bf){return db[_0x41ee('0x11')][_0x41ee('0x12')]({'where':{'id':0x1},'raw':!![]})[_0x41ee('0x13')](function(_0x13fdb2){var _0x14de2b=getValueFromLicense(_0x14b7c9,_0x13fdb2);return _0x14de2b?_0x14de2b:_0x4946ae;})['then'](function(_0xb61a6b){_0x4946ae=_0xb61a6b;return _0x38f255[_0x41ee('0x14')](_0x4f0cbc);})[_0x41ee('0x13')](function(_0x44afeb){if(_0x44afeb>=_0x4946ae){return _0x43f792['status'](0x193)[_0x41ee('0x15')]({'message':util[_0x41ee('0x8')](_0x41ee('0x16'),_0x14b7c9)});}_0x4cf3bf();})[_0x41ee('0x17')](function(_0x5af035){_0x4cf3bf(_0x5af035);});});}function isUserLimit(){return isLimit('users',0x1,db[_0x41ee('0x18')],{'where':{'$or':[{'role':_0x41ee('0x19')},{'role':_0x41ee('0x1a')}]}});}exports[_0x41ee('0x1b')]=isUserLimit;
\ No newline at end of file
index ffe406c..cb84624 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5856=['YYYY-MM-DD','castTo','CAST(','field','\x20AS\x20','operator','text','$ne','$notIn','\x20IS\x20NULL)','$in','IN\x20?','NOT\x20IN\x20?','<>\x20?','$substring','$startsWith','$endsWith','LIKE\x20?','$lt','<\x20?','>\x20?','$lte','<=\x20?','$gte','BETWEEN\x20?\x20AND\x20?','start','pop','utcOffset','hours','minutes','seconds','moment','parseSearch','sqlOperator','startsWith','replace','[$and]','split','slice','forEach','shift','match','filter','indexOf','map','push','buildExpression','$eq','$between','value','includes','$gt','add','days','format'];(function(_0x4e9f20,_0x37ba77){var _0x57d043=function(_0xea2dbf){while(--_0xea2dbf){_0x4e9f20['push'](_0x4e9f20['shift']());}};_0x57d043(++_0x37ba77);}(_0x5856,0x1d7));var _0x6585=function(_0x134c2e,_0x3573c4){_0x134c2e=_0x134c2e-0x0;var _0x2825db=_0x5856[_0x134c2e];return _0x2825db;};'use strict';var _=require('lodash');var moment=require(_0x6585('0x0'));exports[_0x6585('0x1')]=function(_0x489e11){var _0x3aaa78={'conditions':[]};_0x3aaa78[_0x6585('0x2')]=_[_0x6585('0x3')](_0x489e11,'[$or]')?'or':'and';var _0x10f980=_0x489e11[_0x6585('0x4')](_0x6585('0x5'),'')['replace']('[$or]','')[_0x6585('0x6')]('||');for(var _0x56dd59=0x0;_0x56dd59<_0x10f980['length'];_0x56dd59++){var _0x1ac7bf=_0x10f980[_0x56dd59][_0x6585('0x6')](':=');var _0x3ed2ae=_0x1ac7bf[0x0];var _0x558436=_0x1ac7bf[_0x6585('0x7')](0x1);_0x558436[_0x6585('0x8')](function(_0x55416f){var _0x18942c=_0x55416f[_0x6585('0x6')]('[')[_0x6585('0x9')]();var _0x542abe=_0x55416f[_0x6585('0xa')](/\[(.*?)\]/g);_0x542abe[_0x6585('0x8')](function(_0x5ba9fd){var _0x2dfb2d=_0x5ba9fd[_0x6585('0x6')]('[')[_0x6585('0xb')](function(_0xfade3d){return _0xfade3d[_0x6585('0xc')](']')>-0x1;})[_0x6585('0xd')](function(_0x5d718f){return _0x5d718f[_0x6585('0x6')](']')[0x0];})[0x0];_0x3aaa78['conditions'][_0x6585('0xe')]({'field':_0x3ed2ae,'operator':_0x18942c,'value':_0x2dfb2d});});});}return _0x3aaa78;};exports[_0x6585('0xf')]=function(_0x10a190,_0x5bc666,_0xd5f782){var _0x48c112={};if(_0x5bc666==='DATE'){if(_0xd5f782['operator']===_0x6585('0x10')){_0xd5f782['operator']=_0x6585('0x11');_0xd5f782['value']+=','+_0xd5f782[_0x6585('0x12')];}else if(_[_0x6585('0x13')]([_0x6585('0x14'),'$lte'],_0xd5f782['operator'])){_0xd5f782[_0x6585('0x12')]=moment(_0xd5f782['value'])[_0x6585('0x15')](0x1,_0x6585('0x16'))[_0x6585('0x17')](_0x6585('0x18'));}}if(_0xd5f782[_0x6585('0x19')]){_0x5bc666=_0xd5f782[_0x6585('0x19')];_0x48c112['text']=_0x6585('0x1a')+_0x10a190+'.'+_0xd5f782[_0x6585('0x1b')]+_0x6585('0x1c')+_0xd5f782[_0x6585('0x19')]+')\x20'+parseOperator(_0xd5f782[_0x6585('0x1d')]);}else{_0x48c112[_0x6585('0x1e')]=_0x10a190+'.'+_0xd5f782[_0x6585('0x1b')]+'\x20'+parseOperator(_0xd5f782['operator']);}if(_[_0x6585('0x13')]([_0x6585('0x1f'),_0x6585('0x20')],_0xd5f782['operator']))_0x48c112['text']='('+_0x48c112[_0x6585('0x1e')]+'\x20OR\x20'+_0x10a190+'.'+_0xd5f782[_0x6585('0x1b')]+_0x6585('0x21');_0x48c112['value']=parseValue(_0x5bc666,_0xd5f782[_0x6585('0x1d')],_0xd5f782[_0x6585('0x12')]);return _0x48c112;};function parseOperator(_0x395be6){var _0x36bc85;switch(_0x395be6){case _0x6585('0x22'):_0x36bc85=_0x6585('0x23');break;case _0x6585('0x20'):_0x36bc85=_0x6585('0x24');break;case _0x6585('0x10'):_0x36bc85='=\x20?';break;case'$ne':_0x36bc85=_0x6585('0x25');break;case _0x6585('0x26'):case _0x6585('0x27'):case _0x6585('0x28'):_0x36bc85=_0x6585('0x29');break;case _0x6585('0x2a'):_0x36bc85=_0x6585('0x2b');break;case _0x6585('0x14'):_0x36bc85=_0x6585('0x2c');break;case _0x6585('0x2d'):_0x36bc85=_0x6585('0x2e');break;case _0x6585('0x2f'):_0x36bc85='>=\x20?';break;case _0x6585('0x11'):_0x36bc85=_0x6585('0x30');break;}return _0x36bc85;}function parseValue(_0x75b09,_0x5c1d33,_0x16f662){var _0x3980c1={'start':undefined,'end':undefined};switch(_0x5c1d33){case'$in':case _0x6585('0x20'):_0x3980c1[_0x6585('0x31')]=_0x16f662[_0x6585('0x6')](',');break;case _0x6585('0x26'):_0x3980c1[_0x6585('0x31')]='%'+_0x16f662+'%';break;case _0x6585('0x27'):_0x3980c1[_0x6585('0x31')]=_0x16f662+'%';break;case _0x6585('0x28'):_0x3980c1[_0x6585('0x31')]='%'+_0x16f662;break;case _0x6585('0x11'):var _0x423865=_0x16f662[_0x6585('0x6')](',');var _0x16f662=_0x423865[_0x6585('0x9')]();var _0x3b7372=_0x423865[_0x6585('0x32')]();if(_0x75b09==='DATE'){_0x16f662=moment(_0x16f662)[_0x6585('0x33')](0x0,!![])['format']();_0x3b7372=moment(_0x3b7372)[_0x6585('0x33')](0x0,!![])[_0x6585('0x15')](0x17,_0x6585('0x34'))[_0x6585('0x15')](0x3b,_0x6585('0x35'))[_0x6585('0x15')](0x3b,_0x6585('0x36'))[_0x6585('0x17')]();}_0x3980c1={'start':_0x16f662,'end':_0x3b7372};break;default:_0x3980c1[_0x6585('0x31')]=_0x16f662;break;}return _0x3980c1;}
\ No newline at end of file
+var _0x5d6c=['YYYY-MM-DD','castTo','text','CAST(','field','\x20AS\x20','$ne','$notIn','\x20OR\x20','\x20IS\x20NULL)','$in','IN\x20?','NOT\x20IN\x20?','$eq','=\x20?','$substring','$startsWith','$endsWith','LIKE\x20?','$lt','>\x20?','<=\x20?','$gte','>=\x20?','$between','BETWEEN\x20?\x20AND\x20?','start','shift','hours','minutes','lodash','moment','parseSearch','sqlOperator','startsWith','and','replace','[$or]','split','length','slice','forEach','match','filter','indexOf','map','conditions','push','DATE','operator','value','includes','$gt','$lte','add','format'];(function(_0x4b6ccc,_0x146dc3){var _0x15e250=function(_0xef70d5){while(--_0xef70d5){_0x4b6ccc['push'](_0x4b6ccc['shift']());}};_0x15e250(++_0x146dc3);}(_0x5d6c,0xfe));var _0xc5d6=function(_0x4120d6,_0x469587){_0x4120d6=_0x4120d6-0x0;var _0x10724c=_0x5d6c[_0x4120d6];return _0x10724c;};'use strict';var _=require(_0xc5d6('0x0'));var moment=require(_0xc5d6('0x1'));exports[_0xc5d6('0x2')]=function(_0x29632c){var _0x12666a={'conditions':[]};_0x12666a[_0xc5d6('0x3')]=_[_0xc5d6('0x4')](_0x29632c,'[$or]')?'or':_0xc5d6('0x5');var _0x4241bc=_0x29632c[_0xc5d6('0x6')]('[$and]','')['replace'](_0xc5d6('0x7'),'')[_0xc5d6('0x8')]('||');for(var _0x34499f=0x0;_0x34499f<_0x4241bc[_0xc5d6('0x9')];_0x34499f++){var _0x166839=_0x4241bc[_0x34499f][_0xc5d6('0x8')](':=');var _0x4a2a2b=_0x166839[0x0];var _0x1ee126=_0x166839[_0xc5d6('0xa')](0x1);_0x1ee126[_0xc5d6('0xb')](function(_0x536208){var _0xfcdd50=_0x536208[_0xc5d6('0x8')]('[')['shift']();var _0x5bbad7=_0x536208[_0xc5d6('0xc')](/\[(.*?)\]/g);_0x5bbad7[_0xc5d6('0xb')](function(_0x170ff3){var _0x5d1cb5=_0x170ff3[_0xc5d6('0x8')]('[')[_0xc5d6('0xd')](function(_0x3d0478){return _0x3d0478[_0xc5d6('0xe')](']')>-0x1;})[_0xc5d6('0xf')](function(_0x35e851){return _0x35e851[_0xc5d6('0x8')](']')[0x0];})[0x0];_0x12666a[_0xc5d6('0x10')][_0xc5d6('0x11')]({'field':_0x4a2a2b,'operator':_0xfcdd50,'value':_0x5d1cb5});});});}return _0x12666a;};exports['buildExpression']=function(_0x58b7e9,_0x3369b6,_0xb5b796){var _0x5795c0={};if(_0x3369b6===_0xc5d6('0x12')){if(_0xb5b796[_0xc5d6('0x13')]==='$eq'){_0xb5b796['operator']='$between';_0xb5b796[_0xc5d6('0x14')]+=','+_0xb5b796[_0xc5d6('0x14')];}else if(_[_0xc5d6('0x15')]([_0xc5d6('0x16'),_0xc5d6('0x17')],_0xb5b796[_0xc5d6('0x13')])){_0xb5b796[_0xc5d6('0x14')]=moment(_0xb5b796[_0xc5d6('0x14')])[_0xc5d6('0x18')](0x1,'days')[_0xc5d6('0x19')](_0xc5d6('0x1a'));}}if(_0xb5b796[_0xc5d6('0x1b')]){_0x3369b6=_0xb5b796[_0xc5d6('0x1b')];_0x5795c0[_0xc5d6('0x1c')]=_0xc5d6('0x1d')+_0x58b7e9+'.'+_0xb5b796[_0xc5d6('0x1e')]+_0xc5d6('0x1f')+_0xb5b796[_0xc5d6('0x1b')]+')\x20'+parseOperator(_0xb5b796[_0xc5d6('0x13')]);}else{_0x5795c0[_0xc5d6('0x1c')]=_0x58b7e9+'.'+_0xb5b796[_0xc5d6('0x1e')]+'\x20'+parseOperator(_0xb5b796[_0xc5d6('0x13')]);}if(_[_0xc5d6('0x15')]([_0xc5d6('0x20'),_0xc5d6('0x21')],_0xb5b796[_0xc5d6('0x13')]))_0x5795c0['text']='('+_0x5795c0['text']+_0xc5d6('0x22')+_0x58b7e9+'.'+_0xb5b796[_0xc5d6('0x1e')]+_0xc5d6('0x23');_0x5795c0[_0xc5d6('0x14')]=parseValue(_0x3369b6,_0xb5b796['operator'],_0xb5b796['value']);return _0x5795c0;};function parseOperator(_0x370150){var _0xec4e93;switch(_0x370150){case _0xc5d6('0x24'):_0xec4e93=_0xc5d6('0x25');break;case _0xc5d6('0x21'):_0xec4e93=_0xc5d6('0x26');break;case _0xc5d6('0x27'):_0xec4e93=_0xc5d6('0x28');break;case _0xc5d6('0x20'):_0xec4e93='<>\x20?';break;case _0xc5d6('0x29'):case _0xc5d6('0x2a'):case _0xc5d6('0x2b'):_0xec4e93=_0xc5d6('0x2c');break;case _0xc5d6('0x2d'):_0xec4e93='<\x20?';break;case'$gt':_0xec4e93=_0xc5d6('0x2e');break;case _0xc5d6('0x17'):_0xec4e93=_0xc5d6('0x2f');break;case _0xc5d6('0x30'):_0xec4e93=_0xc5d6('0x31');break;case _0xc5d6('0x32'):_0xec4e93=_0xc5d6('0x33');break;}return _0xec4e93;}function parseValue(_0x376429,_0x44f9c9,_0x4883af){var _0x28d725={'start':undefined,'end':undefined};switch(_0x44f9c9){case'$in':case _0xc5d6('0x21'):_0x28d725[_0xc5d6('0x34')]=_0x4883af[_0xc5d6('0x8')](',');break;case _0xc5d6('0x29'):_0x28d725[_0xc5d6('0x34')]='%'+_0x4883af+'%';break;case _0xc5d6('0x2a'):_0x28d725[_0xc5d6('0x34')]=_0x4883af+'%';break;case _0xc5d6('0x2b'):_0x28d725['start']='%'+_0x4883af;break;case _0xc5d6('0x32'):var _0x417e20=_0x4883af['split'](',');var _0x4883af=_0x417e20[_0xc5d6('0x35')]();var _0x520a27=_0x417e20['pop']();if(_0x376429===_0xc5d6('0x12')){_0x4883af=moment(_0x4883af)['utcOffset'](0x0,!![])['format']();_0x520a27=moment(_0x520a27)['utcOffset'](0x0,!![])[_0xc5d6('0x18')](0x17,_0xc5d6('0x36'))[_0xc5d6('0x18')](0x3b,_0xc5d6('0x37'))[_0xc5d6('0x18')](0x3b,'seconds')[_0xc5d6('0x19')]();}_0x28d725={'start':_0x4883af,'end':_0x520a27};break;default:_0x28d725[_0xc5d6('0x34')]=_0x4883af;break;}return _0x28d725;}
\ No newline at end of file
index 2c6531d..e30dea0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe437=['unsigned','substr','ASC','length','omit','isObject','isString','unset','hasOwnProperty','^[+]?[0-9]*$','isEmail','getFullTextValue','\x22{EXPR}\x22','{EXPR}','forEach','replace','match','push','getOptions','query','$id','intersection','attributes','nolimit','order','where','pick','filter','object','columns','value','merge','VIRTUAL','lower','options','includeAll','include','lodash','sequelize','moment','parse','keys','includes','model','alias','fields','raw','split','filters','isEmpty','DATE','$gte','format','utc','$lte','YYYY-MM-DD','subtract','name','uniqueid','isArray','limit','offset','sort','map','indexOf','priority','cast','col'];(function(_0x556bb1,_0x34830d){var _0x45455f=function(_0x13c6ba){while(--_0x13c6ba){_0x556bb1['push'](_0x556bb1['shift']());}};_0x45455f(++_0x34830d);}(_0xe437,0x69));var _0x7e43=function(_0x378a29,_0x65d651){_0x378a29=_0x378a29-0x0;var _0x27af2f=_0xe437[_0x378a29];return _0x27af2f;};'use strict';var _=require(_0x7e43('0x0'));var sequelize=require(_0x7e43('0x1'));var moment=require(_0x7e43('0x2'));var db=require('../../mysqldb')['db'];var LIMIT_VALUE=0xfa;function hasSequelizeOperator(_0xeea975){var _0x3423d0=['ne'];try{var _0x11cb11=JSON[_0x7e43('0x3')](_0xeea975);var _0x427730=Object[_0x7e43('0x4')](_0x11cb11)[0x0];return _0x3423d0[_0x7e43('0x5')](_0x427730);}catch(_0x279b89){return![];}}function getOperatorValue(_0x494ce6){var _0x25752a=JSON[_0x7e43('0x3')](_0x494ce6);var _0xed5596=Object[_0x7e43('0x4')](_0x25752a)[0x0];var _0x4fac58=_0x25752a[_0xed5596];return{['$'+_0xed5596]:_0x4fac58};}function parseIncludeModel(_0x94fd3b){var _0x46ba95=JSON[_0x7e43('0x3')](_0x94fd3b);return{'model':db[_0x46ba95[_0x7e43('0x6')]],'as':_0x46ba95[_0x7e43('0x7')],'attributes':_0x46ba95[_0x7e43('0x8')],'raw':_0x46ba95[_0x7e43('0x9')]};}exports['fields']=function(_0x46febb){var _0x73e787=null;if(_0x46febb){_0x73e787=_0x46febb[_0x7e43('0xa')](',');}return _0x73e787;};exports[_0x7e43('0xb')]=function(_0x38c5fb,_0x3f558a){var _0x29a052={};if(!_[_0x7e43('0xc')](_0x38c5fb)){_['forOwn'](_0x38c5fb,function(_0x107643,_0x5a6670){try{if(_0x3f558a){var _0x53b301=_['find'](_0x3f558a,{'name':_0x5a6670})||{};if(hasSequelizeOperator(_0x107643)){_0x29a052[_0x5a6670]=getOperatorValue(_0x107643);}else if(_0x53b301['type']===_0x7e43('0xd')&&_['isPlainObject'](_0x107643)){var _0x538b66=JSON[_0x7e43('0x3')](_0x107643);var _0x33a369={'$gte':moment(moment(_0x538b66[_0x7e43('0xe')])[_0x7e43('0xf')]('YYYY-MM-DD'))[_0x7e43('0x10')]()[_0x7e43('0xf')](),'$lte':moment(moment(_0x538b66[_0x7e43('0x11')])[_0x7e43('0xf')](_0x7e43('0x12')))[_0x7e43('0x10')]()[_0x7e43('0x13')](0x1,'s')['format']()};_0x29a052[_0x5a6670]=_0x33a369;}else if(_0x53b301[_0x7e43('0x14')]===_0x7e43('0x15')){_0x29a052[_0x5a6670]=_0x107643;}else{_0x29a052[_0x5a6670]=_[_0x7e43('0x16')](_0x107643)?_0x107643:JSON[_0x7e43('0x3')](_0x107643);}}else{_0x29a052[_0x5a6670]=_[_0x7e43('0x16')](_0x107643)?_0x107643:JSON[_0x7e43('0x3')](_0x107643);}}catch(_0x3ad016){_0x29a052[_0x5a6670]=_0x107643[_0x7e43('0xa')](',');}});}return _0x29a052;};exports[_0x7e43('0x17')]=function(_0x5a8c53){_0x5a8c53=parseInt(_0x5a8c53,0xa);if(!_0x5a8c53||_0x5a8c53<0x0){_0x5a8c53=LIMIT_VALUE;}return _0x5a8c53;};exports[_0x7e43('0x18')]=function(_0x5b24f6){_0x5b24f6=parseInt(_0x5b24f6,0xa);if(!_0x5b24f6||_0x5b24f6<0x0){_0x5b24f6=0x0;}return _0x5b24f6;};exports[_0x7e43('0x19')]=function(_0x11c00f){var _0x493efb,_0x446659=null;if(_0x11c00f){_0x493efb=_0x11c00f[_0x7e43('0xa')](',');_0x446659=_[_0x7e43('0x1a')](_0x493efb,function(_0x4d9701){if(_0x4d9701[_0x7e43('0x1b')]('-')===0x0){return[_0x4d9701===_0x7e43('0x1c')?sequelize[_0x7e43('0x1d')](sequelize[_0x7e43('0x1e')]('priority'),_0x7e43('0x1f')):_0x4d9701[_0x7e43('0x20')](0x1),'DESC'];}else{return[_0x4d9701===_0x7e43('0x1c')?sequelize[_0x7e43('0x1d')](sequelize[_0x7e43('0x1e')](_0x7e43('0x1c')),'unsigned'):_0x4d9701,_0x7e43('0x21')];}});}return _0x446659;};exports['omit']=function(_0xbdea56,_0x10b6cd){if(_['isEmpty'](_0xbdea56)){return _0xbdea56;}if(_[_0x7e43('0x16')](_0xbdea56)){for(var _0x51725c=0x0;_0x51725c<_0xbdea56[_0x7e43('0x22')];_0x51725c+=0x1){_0xbdea56[_0x51725c]=this[_0x7e43('0x23')](_0xbdea56[_0x51725c],_0x10b6cd);}return _0xbdea56;}if(!_[_0x7e43('0x24')](_0xbdea56)){return _0xbdea56;}if(_[_0x7e43('0x25')](_0x10b6cd)){_0x10b6cd=[_0x10b6cd];}if(!_['isArray'](_0x10b6cd)){return _0xbdea56;}for(var _0x4ba760=0x0;_0x4ba760<_0x10b6cd[_0x7e43('0x22')];_0x4ba760+=0x1){_[_0x7e43('0x26')](_0xbdea56,_0x10b6cd[_0x4ba760]);}for(var _0x243ac4 in _0xbdea56){if(_0xbdea56[_0x7e43('0x27')](_0x243ac4)){_0xbdea56[_0x243ac4]=this[_0x7e43('0x23')](_0xbdea56[_0x243ac4],_0x10b6cd);}}return _0xbdea56;};exports['isNumeric']=function(_0x4e570d){return _0x4e570d['match'](RegExp(_0x7e43('0x28')))?!![]:![];};exports[_0x7e43('0x29')]=function(_0x2ba47d){return _0x2ba47d['match'](/^\S+@\S+$/)?!![]:![];};exports[_0x7e43('0x2a')]=function(_0x37e472,_0x1abf19){var _0x118833=[];var _0x30fd09=/[ `!@#$%^&*()_\-?~]/;var _0xc62f59=_0x1abf19?_0x7e43('0x2b'):_0x7e43('0x2c');_0x37e472[_0x7e43('0xa')](/[ ,]+/)[_0x7e43('0x2d')](function(_0x4173c2){_0x4173c2=_0x4173c2[_0x7e43('0x2e')](/([^:]")"+/g,'$1');_0x4173c2='+'+_0x4173c2+'*';var _0x1f6bc4=_0x4173c2[_0x7e43('0x2f')](_0x30fd09);if(_0x1f6bc4){_0x4173c2='\x22'+_0x4173c2+'\x22';}_0x118833[_0x7e43('0x30')](_0x4173c2);});_0xc62f59=_0xc62f59[_0x7e43('0x2e')](_0x7e43('0x2c'),_0x118833['join']('\x20'));return _0xc62f59;};exports[_0x7e43('0x31')]=function(_0x5e915d,_0x564b2f,_0x9c0905){var _0x1f9a1d={},_0xa1b84={};if(_0x564b2f[_0x7e43('0x32')][_0x7e43('0x33')]){_0x564b2f[_0x7e43('0x32')]['id']=_0x564b2f[_0x7e43('0x32')][_0x7e43('0x33')];delete _0x564b2f[_0x7e43('0x32')]['$id'];}_0x1f9a1d[_0x7e43('0x6')]=_[_0x7e43('0x1a')](_0x5e915d,'name');_0x1f9a1d[_0x7e43('0x32')]=_[_0x7e43('0x4')](_0x564b2f[_0x7e43('0x32')]);_0x1f9a1d['filters']=_[_0x7e43('0x34')](_0x1f9a1d['model'],_0x1f9a1d[_0x7e43('0x32')]);_0xa1b84[_0x7e43('0x35')]=_['intersection'](_0x1f9a1d['model'],this[_0x7e43('0x8')](_0x564b2f[_0x7e43('0x32')][_0x7e43('0x8')]));_0xa1b84[_0x7e43('0x35')]=_0xa1b84[_0x7e43('0x35')][_0x7e43('0x22')]?_0xa1b84[_0x7e43('0x35')]:_0x1f9a1d[_0x7e43('0x6')];if(!_0x564b2f[_0x7e43('0x32')][_0x7e43('0x27')](_0x7e43('0x36'))){_0xa1b84[_0x7e43('0x17')]=this[_0x7e43('0x17')](_0x564b2f[_0x7e43('0x32')]['limit']);_0xa1b84[_0x7e43('0x18')]=this['offset'](_0x564b2f[_0x7e43('0x32')]['offset']);}_0xa1b84[_0x7e43('0x37')]=this[_0x7e43('0x19')](_0x564b2f[_0x7e43('0x32')][_0x7e43('0x19')]);_0xa1b84[_0x7e43('0x38')]=this[_0x7e43('0xb')](_[_0x7e43('0x39')](_0x564b2f[_0x7e43('0x32')],_0x1f9a1d[_0x7e43('0xb')]),_0x5e915d);if(_0x564b2f['query'][_0x7e43('0x3a')]){var _0x1407dd=_0x5e915d;var _0x2dd4fc=_0x564b2f[_0x7e43('0x32')][_0x7e43('0x3a')];if(typeof _0x2dd4fc===_0x7e43('0x3b')){_0x1407dd=_[_0x7e43('0x3a')](_0x5e915d,function(_0x49f8e2){return _[_0x7e43('0x5')](_0x2dd4fc[_0x7e43('0x3c')],_0x49f8e2['name']);});_0x2dd4fc=_0x2dd4fc[_0x7e43('0x3d')];}_0xa1b84[_0x7e43('0x38')]=_[_0x7e43('0x3e')](_0xa1b84[_0x7e43('0x38')],{'$or':_[_0x7e43('0x1a')](_0x1407dd,function(_0x2475ad){if(_0x2475ad['type']!==_0x7e43('0x3f')){if(_0x9c0905){return sequelize[_0x7e43('0x38')](sequelize['fn'](_0x7e43('0x40'),sequelize[_0x7e43('0x1e')](_0x2475ad[_0x7e43('0x14')])),{'$like':sequelize['fn'](_0x7e43('0x40'),'%'+_0x564b2f[_0x7e43('0x32')][_0x7e43('0x3a')]+'%')});}else{var _0x424895={};_0x424895[_0x2475ad[_0x7e43('0x14')]]={'$like':'%'+_0x564b2f[_0x7e43('0x32')]['filter']+'%'};return _0x424895;}}})});}_0xa1b84=_[_0x7e43('0x3e')]({},_0xa1b84,_0x564b2f[_0x7e43('0x41')]);return _0xa1b84;};exports['include']=function(_0x2f44fb){var _0x1f1da8=[];if(_0x2f44fb[_0x7e43('0x42')]){_0x1f1da8[_0x7e43('0x30')]({'all':!![]});}else if(_0x2f44fb[_0x7e43('0x43')]){if(Array[_0x7e43('0x16')](_0x2f44fb[_0x7e43('0x43')])){_0x1f1da8=Object['keys'](_0x2f44fb[_0x7e43('0x43')])[_0x7e43('0x1a')](function(_0x205316){return parseIncludeModel(_0x2f44fb['include'][_0x205316]);});}else{var _0xd0b68f=parseIncludeModel(_0x2f44fb[_0x7e43('0x43')]);_0x1f1da8[_0x7e43('0x30')](_0xd0b68f);}}return _0x1f1da8;};
\ No newline at end of file
+var _0xf981=['split','isEmpty','type','DATE','$gte','format','YYYY-MM-DD','utc','$lte','subtract','name','isArray','limit','offset','sort','map','indexOf','priority','cast','unsigned','substr','DESC','col','ASC','length','isObject','isString','unset','hasOwnProperty','omit','isEmail','match','getFullTextValue','\x22{EXPR}\x22','forEach','replace','push','query','$id','intersection','attributes','nolimit','order','where','filters','filter','object','columns','merge','VIRTUAL','lower','include','includeAll','lodash','sequelize','moment','parse','keys','includes','model','alias','fields','raw'];(function(_0x215492,_0x3e9947){var _0x4b4dd5=function(_0x59c418){while(--_0x59c418){_0x215492['push'](_0x215492['shift']());}};_0x4b4dd5(++_0x3e9947);}(_0xf981,0x1af));var _0x1f98=function(_0x9ae0dd,_0x1caf3f){_0x9ae0dd=_0x9ae0dd-0x0;var _0x40838b=_0xf981[_0x9ae0dd];return _0x40838b;};'use strict';var _=require(_0x1f98('0x0'));var sequelize=require(_0x1f98('0x1'));var moment=require(_0x1f98('0x2'));var db=require('../../mysqldb')['db'];var LIMIT_VALUE=0xfa;function hasSequelizeOperator(_0x2177ee){var _0x54d75c=['ne'];try{var _0x5068d1=JSON[_0x1f98('0x3')](_0x2177ee);var _0x40884d=Object[_0x1f98('0x4')](_0x5068d1)[0x0];return _0x54d75c[_0x1f98('0x5')](_0x40884d);}catch(_0x1182bb){return![];}}function getOperatorValue(_0x503ab2){var _0x57e694=JSON[_0x1f98('0x3')](_0x503ab2);var _0x55a92d=Object[_0x1f98('0x4')](_0x57e694)[0x0];var _0x25d264=_0x57e694[_0x55a92d];return{['$'+_0x55a92d]:_0x25d264};}function parseIncludeModel(_0x539c8e){var _0x169c00=JSON[_0x1f98('0x3')](_0x539c8e);return{'model':db[_0x169c00[_0x1f98('0x6')]],'as':_0x169c00[_0x1f98('0x7')],'attributes':_0x169c00[_0x1f98('0x8')],'raw':_0x169c00[_0x1f98('0x9')]};}exports[_0x1f98('0x8')]=function(_0x291102){var _0x31c1b2=null;if(_0x291102){_0x31c1b2=_0x291102[_0x1f98('0xa')](',');}return _0x31c1b2;};exports['filters']=function(_0x3edc65,_0x4b2c6c){var _0x34e878={};if(!_[_0x1f98('0xb')](_0x3edc65)){_['forOwn'](_0x3edc65,function(_0xa92d51,_0xd741ce){try{if(_0x4b2c6c){var _0xe00fa0=_['find'](_0x4b2c6c,{'name':_0xd741ce})||{};if(hasSequelizeOperator(_0xa92d51)){_0x34e878[_0xd741ce]=getOperatorValue(_0xa92d51);}else if(_0xe00fa0[_0x1f98('0xc')]===_0x1f98('0xd')&&_['isPlainObject'](_0xa92d51)){var _0xf94509=JSON[_0x1f98('0x3')](_0xa92d51);var _0x4439a2={'$gte':moment(moment(_0xf94509[_0x1f98('0xe')])[_0x1f98('0xf')](_0x1f98('0x10')))[_0x1f98('0x11')]()['format'](),'$lte':moment(moment(_0xf94509[_0x1f98('0x12')])[_0x1f98('0xf')](_0x1f98('0x10')))[_0x1f98('0x11')]()[_0x1f98('0x13')](0x1,'s')[_0x1f98('0xf')]()};_0x34e878[_0xd741ce]=_0x4439a2;}else if(_0xe00fa0[_0x1f98('0x14')]==='uniqueid'){_0x34e878[_0xd741ce]=_0xa92d51;}else{_0x34e878[_0xd741ce]=_[_0x1f98('0x15')](_0xa92d51)?_0xa92d51:JSON[_0x1f98('0x3')](_0xa92d51);}}else{_0x34e878[_0xd741ce]=_['isArray'](_0xa92d51)?_0xa92d51:JSON['parse'](_0xa92d51);}}catch(_0x3a07b3){_0x34e878[_0xd741ce]=_0xa92d51[_0x1f98('0xa')](',');}});}return _0x34e878;};exports[_0x1f98('0x16')]=function(_0x2b56fd){_0x2b56fd=parseInt(_0x2b56fd,0xa);if(!_0x2b56fd||_0x2b56fd<0x0){_0x2b56fd=LIMIT_VALUE;}return _0x2b56fd;};exports[_0x1f98('0x17')]=function(_0x31dcb7){_0x31dcb7=parseInt(_0x31dcb7,0xa);if(!_0x31dcb7||_0x31dcb7<0x0){_0x31dcb7=0x0;}return _0x31dcb7;};exports[_0x1f98('0x18')]=function(_0x549e34){var _0x215367,_0x51f9a1=null;if(_0x549e34){_0x215367=_0x549e34[_0x1f98('0xa')](',');_0x51f9a1=_[_0x1f98('0x19')](_0x215367,function(_0x37589e){if(_0x37589e[_0x1f98('0x1a')]('-')===0x0){return[_0x37589e===_0x1f98('0x1b')?sequelize[_0x1f98('0x1c')](sequelize['col'](_0x1f98('0x1b')),_0x1f98('0x1d')):_0x37589e[_0x1f98('0x1e')](0x1),_0x1f98('0x1f')];}else{return[_0x37589e===_0x1f98('0x1b')?sequelize[_0x1f98('0x1c')](sequelize[_0x1f98('0x20')](_0x1f98('0x1b')),_0x1f98('0x1d')):_0x37589e,_0x1f98('0x21')];}});}return _0x51f9a1;};exports['omit']=function(_0x45fbbb,_0x430834){if(_[_0x1f98('0xb')](_0x45fbbb)){return _0x45fbbb;}if(_[_0x1f98('0x15')](_0x45fbbb)){for(var _0x2f5846=0x0;_0x2f5846<_0x45fbbb[_0x1f98('0x22')];_0x2f5846+=0x1){_0x45fbbb[_0x2f5846]=this['omit'](_0x45fbbb[_0x2f5846],_0x430834);}return _0x45fbbb;}if(!_[_0x1f98('0x23')](_0x45fbbb)){return _0x45fbbb;}if(_[_0x1f98('0x24')](_0x430834)){_0x430834=[_0x430834];}if(!_[_0x1f98('0x15')](_0x430834)){return _0x45fbbb;}for(var _0x35ff0a=0x0;_0x35ff0a<_0x430834[_0x1f98('0x22')];_0x35ff0a+=0x1){_[_0x1f98('0x25')](_0x45fbbb,_0x430834[_0x35ff0a]);}for(var _0x2383d8 in _0x45fbbb){if(_0x45fbbb[_0x1f98('0x26')](_0x2383d8)){_0x45fbbb[_0x2383d8]=this[_0x1f98('0x27')](_0x45fbbb[_0x2383d8],_0x430834);}}return _0x45fbbb;};exports['isNumeric']=function(_0x5e2b03){return _0x5e2b03['match'](RegExp('^[+]?[0-9]*$'))?!![]:![];};exports[_0x1f98('0x28')]=function(_0x782eb8){return _0x782eb8[_0x1f98('0x29')](/^\S+@\S+$/)?!![]:![];};exports[_0x1f98('0x2a')]=function(_0x32bec3,_0x588353){var _0x5d0dae=[];var _0x2ebb2f=/[ `!@#$%^&*()_\-?~]/;var _0x5e227b=_0x588353?_0x1f98('0x2b'):'{EXPR}';_0x32bec3[_0x1f98('0xa')](/[ ,]+/)[_0x1f98('0x2c')](function(_0x1b0410){_0x1b0410=_0x1b0410[_0x1f98('0x2d')](/([^:]")"+/g,'$1');_0x1b0410='+'+_0x1b0410+'*';var _0x1dc4fc=_0x1b0410[_0x1f98('0x29')](_0x2ebb2f);if(_0x1dc4fc){_0x1b0410='\x22'+_0x1b0410+'\x22';}_0x5d0dae[_0x1f98('0x2e')](_0x1b0410);});_0x5e227b=_0x5e227b[_0x1f98('0x2d')]('{EXPR}',_0x5d0dae['join']('\x20'));return _0x5e227b;};exports['getOptions']=function(_0x52fb85,_0x4a2a90,_0x449a1e){var _0x2df24b={},_0x1b6b31={};if(_0x4a2a90[_0x1f98('0x2f')][_0x1f98('0x30')]){_0x4a2a90[_0x1f98('0x2f')]['id']=_0x4a2a90[_0x1f98('0x2f')][_0x1f98('0x30')];delete _0x4a2a90[_0x1f98('0x2f')]['$id'];}_0x2df24b[_0x1f98('0x6')]=_[_0x1f98('0x19')](_0x52fb85,'name');_0x2df24b['query']=_[_0x1f98('0x4')](_0x4a2a90[_0x1f98('0x2f')]);_0x2df24b['filters']=_[_0x1f98('0x31')](_0x2df24b[_0x1f98('0x6')],_0x2df24b[_0x1f98('0x2f')]);_0x1b6b31['attributes']=_[_0x1f98('0x31')](_0x2df24b['model'],this[_0x1f98('0x8')](_0x4a2a90[_0x1f98('0x2f')][_0x1f98('0x8')]));_0x1b6b31[_0x1f98('0x32')]=_0x1b6b31[_0x1f98('0x32')][_0x1f98('0x22')]?_0x1b6b31[_0x1f98('0x32')]:_0x2df24b['model'];if(!_0x4a2a90[_0x1f98('0x2f')][_0x1f98('0x26')](_0x1f98('0x33'))){_0x1b6b31[_0x1f98('0x16')]=this[_0x1f98('0x16')](_0x4a2a90['query'][_0x1f98('0x16')]);_0x1b6b31[_0x1f98('0x17')]=this[_0x1f98('0x17')](_0x4a2a90[_0x1f98('0x2f')][_0x1f98('0x17')]);}_0x1b6b31[_0x1f98('0x34')]=this[_0x1f98('0x18')](_0x4a2a90['query']['sort']);_0x1b6b31[_0x1f98('0x35')]=this[_0x1f98('0x36')](_['pick'](_0x4a2a90['query'],_0x2df24b[_0x1f98('0x36')]),_0x52fb85);if(_0x4a2a90[_0x1f98('0x2f')][_0x1f98('0x37')]){var _0x9d46a4=_0x52fb85;var _0x141888=_0x4a2a90[_0x1f98('0x2f')][_0x1f98('0x37')];if(typeof _0x141888===_0x1f98('0x38')){_0x9d46a4=_['filter'](_0x52fb85,function(_0x303009){return _[_0x1f98('0x5')](_0x141888[_0x1f98('0x39')],_0x303009[_0x1f98('0x14')]);});_0x141888=_0x141888['value'];}_0x1b6b31['where']=_[_0x1f98('0x3a')](_0x1b6b31[_0x1f98('0x35')],{'$or':_[_0x1f98('0x19')](_0x9d46a4,function(_0x46d0b3){if(_0x46d0b3[_0x1f98('0xc')]!==_0x1f98('0x3b')){if(_0x449a1e){return sequelize[_0x1f98('0x35')](sequelize['fn']('lower',sequelize[_0x1f98('0x20')](_0x46d0b3['name'])),{'$like':sequelize['fn'](_0x1f98('0x3c'),'%'+_0x4a2a90[_0x1f98('0x2f')][_0x1f98('0x37')]+'%')});}else{var _0x5a233c={};_0x5a233c[_0x46d0b3[_0x1f98('0x14')]]={'$like':'%'+_0x4a2a90['query']['filter']+'%'};return _0x5a233c;}}})});}_0x1b6b31=_['merge']({},_0x1b6b31,_0x4a2a90['options']);return _0x1b6b31;};exports[_0x1f98('0x3d')]=function(_0x359a35){var _0x5142b2=[];if(_0x359a35[_0x1f98('0x3e')]){_0x5142b2['push']({'all':!![]});}else if(_0x359a35[_0x1f98('0x3d')]){if(Array[_0x1f98('0x15')](_0x359a35[_0x1f98('0x3d')])){_0x5142b2=Object['keys'](_0x359a35[_0x1f98('0x3d')])[_0x1f98('0x19')](function(_0x2a0aa7){return parseIncludeModel(_0x359a35[_0x1f98('0x3d')][_0x2a0aa7]);});}else{var _0x2d0861=parseIncludeModel(_0x359a35[_0x1f98('0x3d')]);_0x5142b2['push'](_0x2d0861);}}return _0x5142b2;};
\ No newline at end of file
index aa4242f..6422ba4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6aa7=['getAgentIdsByQueues','includes','getAgentIdsByStatus','resolve','User','name','chatPause','pauseType','find','globalStatus','fields','order','startsWith','DESC','ASC','fullname,internal','fullname','internal','indexOf','validateSortParameter','sort','toLowerCase','sortAgentsByStatus','userpic','online','lastLoginAt','lastPauseAt','address','openchannelPause','faxPause','chatCapacity','openchannelCapacity','mailCapacity','smsCapacity','whatsappCapacity','faxCapacity','mailCurrentCapacity','smsCurrentCapacity','whatsappCurrentCapacity','faxCurrentCapacity','smsStatus','chatStatusTime','mailStatusTime','whatsappStatusTime','faxStatusTime','voiceStatusTime','queue','destconnectedlinenum','screenrecording','phoneBarEnableScreenRecordingByAgent','routealias','omit','pick','role','openchannelStatusTime','smsStatusTime','chatCurrentCapacity','openchannelCurrentCapacity','phoneBarEnableAutomaticScreenRecording','onhold','getRealtimeAgentsQueryFields','lodash','../../mysqldb','client','http','mailPause','smsPause','voicePause','whatsappPause','filter','length','idle','unknown','unavailable','ringing','isNil','voiceStatus','every','chatStatus','faxStatus','mailStatus','openchannelStatus','whatsappStatus','Agents','then','error','request','Unable\x20to\x20retrieve\x20RPC\x20agents\x20(Routing)','merge','catch','getRealtimeAgents','pause','*pause','busy','getAgentStatus','isArray','startCase','Queue','map','findOne','getAgents','all','flatten','uniq','value'];(function(_0x445019,_0x16d112){var _0x1837a3=function(_0x1fbf4f){while(--_0x1fbf4f){_0x445019['push'](_0x445019['shift']());}};_0x1837a3(++_0x16d112);}(_0x6aa7,0x178));var _0x76aa=function(_0xc3e68,_0x4b8a6d){_0xc3e68=_0xc3e68-0x0;var _0x2bb09b=_0x6aa7[_0xc3e68];return _0x2bb09b;};'use strict';var _=require(_0x76aa('0x0'));var jayson=require('jayson/promise');var db=require(_0x76aa('0x1'))['db'];var amiClient=jayson[_0x76aa('0x2')][_0x76aa('0x3')]({'port':0x232a});var routingClient=jayson[_0x76aa('0x2')]['http']({'port':0x232c});function isAgentPaused(_0x13f62b,_0xef15ef){var _0x1d6e04=[_0x13f62b['chatPause'],_0x13f62b['faxPause'],_0x13f62b[_0x76aa('0x4')],_0x13f62b['openchannelPause'],_0x13f62b[_0x76aa('0x5')],_0x13f62b[_0x76aa('0x6')],_0x13f62b[_0x76aa('0x7')]];if(!_0xef15ef)return _['every'](_0x1d6e04);var _0x3dae33=_[_0x76aa('0x8')](_0x1d6e04);return _0x3dae33[_0x76aa('0x9')]>0x0&&_0x3dae33['length']<_0x1d6e04[_0x76aa('0x9')]?!![]:![];}function isIdle(_0x25856d){return _0x25856d===_0x76aa('0xa')||_0x25856d===_0x76aa('0xb')||_0x25856d===_0x76aa('0xc')||_0x25856d===_0x76aa('0xd')||_[_0x76aa('0xe')](_0x25856d);}function isAgentIdle(_0x8dc35c){if(_0x8dc35c[_0x76aa('0xf')]!==_0x76aa('0xa')&&_0x8dc35c['voicePause']){_0x8dc35c[_0x76aa('0xf')]='pause';return![];}return _[_0x76aa('0x10')]([_0x8dc35c[_0x76aa('0x11')],_0x8dc35c[_0x76aa('0x12')],_0x8dc35c[_0x76aa('0x13')],_0x8dc35c[_0x76aa('0x14')],_0x8dc35c['smsStatus'],_0x8dc35c['voiceStatus'],_0x8dc35c[_0x76aa('0x15')]],isIdle);}function getRealtimeAgents(){return amiClient['request'](_0x76aa('0x16'),{})[_0x76aa('0x17')](function(_0x5cf594){if(_0x5cf594[_0x76aa('0x18')]){throw new Error('Unable\x20to\x20retrieve\x20RPC\x20agents\x20(AMI)');}var _0x328381=_0x5cf594['result'];return routingClient[_0x76aa('0x19')](_0x76aa('0x16'),{})[_0x76aa('0x17')](function(_0x21c16d){if(_0x21c16d[_0x76aa('0x18')]){throw new Error(_0x76aa('0x1a'));}var _0x496902=_0x21c16d['result'];return _[_0x76aa('0x1b')]({},_0x328381,_0x496902);});})[_0x76aa('0x1c')](function(_0xf0711){throw _0xf0711;});}exports[_0x76aa('0x1d')]=getRealtimeAgents;function getAgentStatus(_0x15109b){var _0x191560=_0x76aa('0xb');if(isAgentPaused(_0x15109b))_0x191560=_0x76aa('0x1e');else if(isAgentPaused(_0x15109b,!![]))_0x191560=_0x76aa('0x1f');else if(isAgentIdle(_0x15109b))_0x191560='idle';else _0x191560=_0x76aa('0x20');return _0x191560;}exports[_0x76aa('0x21')]=getAgentStatus;function getAgentIdsByQueues(_0x338a6b,_0x5b3f55){var _0x41463a=_[_0x76aa('0x22')](_0x338a6b)?_0x338a6b:[_0x338a6b];var _0x31252f=_[_0x76aa('0x23')](_0x5b3f55)+_0x76aa('0x24');var _0xc1044c=_[_0x76aa('0x25')](_0x41463a,function(_0x3363b3){return db[_0x31252f][_0x76aa('0x26')]({'where':{'id':_0x3363b3}})[_0x76aa('0x17')](function(_0x37f1ab){if(!_0x37f1ab)return[];return _0x37f1ab[_0x76aa('0x27')]({'attributes':['id'],'raw':!![]});});});return Promise[_0x76aa('0x28')](_0xc1044c)['then'](function(_0xb5e8a9){var _0x1d6d15=_(_0xb5e8a9)[_0x76aa('0x29')]()[_0x76aa('0x25')]('id')[_0x76aa('0x2a')]()[_0x76aa('0x2b')]();return _0x1d6d15;});}exports[_0x76aa('0x2c')]=getAgentIdsByQueues;function getAgentIdsByStatus(_0x282d0a,_0xd12a99,_0x1bdc3d){try{if(_0xd12a99['length']>0x0){_0x282d0a=_0x282d0a[_0x76aa('0x8')](function(_0x5a8030){return _0xd12a99[_0x76aa('0x2d')](_0x5a8030['id']);});}var _0x365ff8=_0x282d0a[_0x76aa('0x8')](function(_0x1e90b9){var _0x1eecd9=_0x76aa('0x20');if(isAgentIdle(_0x1e90b9)){_0x1eecd9=_0x76aa('0xa');}return _0x1eecd9===_0x1bdc3d;});return _[_0x76aa('0x25')](_0x365ff8,'id');}catch(_0x19fd4f){throw _0x19fd4f;}}exports[_0x76aa('0x2e')]=getAgentIdsByStatus;function getSortedAgentsIdsByStatus(_0x5edcd8,_0x430ad6,_0x5532c7){return Promise[_0x76aa('0x2f')]()[_0x76aa('0x17')](function(){if(_0x430ad6[_0x76aa('0x9')]>0x0){_0x5edcd8=_0x5edcd8[_0x76aa('0x8')](function(_0x35a705){return _0x430ad6['includes'](_0x35a705['id']);});}return _0x5edcd8;})[_0x76aa('0x17')](function(){return db[_0x76aa('0x30')]['findAll']({'attributes':['id',_0x76aa('0x31'),'fullname',_0x76aa('0x32'),'faxPause',_0x76aa('0x4'),'openchannelPause','smsPause',_0x76aa('0x6'),_0x76aa('0x7'),_0x76aa('0x33')],'where':{'id':{'$in':_[_0x76aa('0x25')](_0x5edcd8,'id')}},'raw':!![]});})['then'](function(_0x592596){return _0x592596[_0x76aa('0x25')](function(_0x1c7b6f){var _0x58127c=_[_0x76aa('0x34')](_0x5edcd8,['id',_0x1c7b6f['id']]);var _0x23029e=filterAgentAttributes(_0x58127c);_['merge'](_0x1c7b6f,_0x23029e);_0x1c7b6f[_0x76aa('0x35')]=getAgentStatus(_0x1c7b6f);return _0x1c7b6f;});})['then'](function(_0x5086f5){var _0x4fdbde=sortAgentsByStatus(_0x5086f5,_0x5532c7);return _[_0x76aa('0x25')](_0x4fdbde,'id');})[_0x76aa('0x1c')](function(_0x127bc4){throw _0x127bc4;});}exports['getSortedAgentsIdsByStatus']=getSortedAgentsIdsByStatus;function getUpdatedSortOptions(_0x401c07){var _0x1c22f7={'fields':[],'order':null};var _0x2eea79=_0x401c07['split'](',');_0x1c22f7[_0x76aa('0x36')]=_[_0x76aa('0x8')](_0x2eea79,function(_0x2f7726){if(!_0x2f7726[_0x76aa('0x2d')](_0x76aa('0x35'))){return!![];}_0x1c22f7[_0x76aa('0x37')]=_[_0x76aa('0x38')](_0x2f7726,'-')?_0x76aa('0x39'):_0x76aa('0x3a');return![];});return _0x1c22f7;}exports['getUpdatedSortOptions']=getUpdatedSortOptions;function validateSortParameter(_0x1525cb){if(!_0x1525cb){_0x1525cb=_0x76aa('0x3b');}if(_0x1525cb[_0x76aa('0x2d')](_0x76aa('0x3c'))&&!_0x1525cb[_0x76aa('0x2d')](_0x76aa('0x3d'))){var _0x572fdb=_0x1525cb['substring'](0x0,_0x1525cb[_0x76aa('0x3e')](_0x76aa('0x3c')));_0x1525cb+=','+_0x572fdb+_0x76aa('0x3d');}return _0x1525cb;}exports[_0x76aa('0x3f')]=validateSortParameter;function sortAgentsByStatus(_0x50599f,_0x174a14){var _0x403084=_0x50599f[_0x76aa('0x40')](function(_0x30cdcb,_0x1138b5){if(_0x30cdcb['globalStatus']===_0x1138b5[_0x76aa('0x35')]){if(_0x30cdcb['globalStatus']===_0x76aa('0x1e')){if(_0x174a14==='DESC'){return(_0x30cdcb['pauseType']||'')<(_0x1138b5['pauseType']||'')||_0x30cdcb[_0x76aa('0x3c')]['toLowerCase']()>_0x1138b5['fullname']['toLowerCase']()?0x1:-0x1;}else{return(_0x30cdcb[_0x76aa('0x33')]||'')<(_0x1138b5[_0x76aa('0x33')]||'')||_0x30cdcb[_0x76aa('0x3c')][_0x76aa('0x41')]()>_0x1138b5[_0x76aa('0x3c')]['toLowerCase']()?-0x1:0x1;}}else{if(_0x174a14===_0x76aa('0x39')){return _0x30cdcb[_0x76aa('0x3c')][_0x76aa('0x41')]()<_0x1138b5[_0x76aa('0x3c')][_0x76aa('0x41')]()?0x1:-0x1;}else{return _0x30cdcb['fullname'][_0x76aa('0x41')]()<_0x1138b5[_0x76aa('0x3c')]['toLowerCase']()?-0x1:0x1;}}}else{if(_0x174a14===_0x76aa('0x39')){return _0x30cdcb['globalStatus']<_0x1138b5[_0x76aa('0x35')]?0x1:-0x1;}else{return _0x30cdcb[_0x76aa('0x35')]<_0x1138b5[_0x76aa('0x35')]?-0x1:0x1;}}});return _0x403084;}exports[_0x76aa('0x42')]=sortAgentsByStatus;function filterAgentAttributes(_0x2d0bc4){var _0x3e0315=[_0x76aa('0x43'),_0x76aa('0x44'),_0x76aa('0x45'),_0x76aa('0x46'),'pauseType',_0x76aa('0x46'),'internal',_0x76aa('0x47'),_0x76aa('0x32'),_0x76aa('0x48'),_0x76aa('0x4'),'smsPause','whatsappPause',_0x76aa('0x49'),'voicePause',_0x76aa('0x4a'),_0x76aa('0x4b'),_0x76aa('0x4c'),_0x76aa('0x4d'),_0x76aa('0x4e'),_0x76aa('0x4f'),'chatCurrentCapacity','openchannelCurrentCapacity',_0x76aa('0x50'),_0x76aa('0x51'),_0x76aa('0x52'),_0x76aa('0x53'),_0x76aa('0x11'),_0x76aa('0x14'),'mailStatus',_0x76aa('0x54'),_0x76aa('0x15'),_0x76aa('0x12'),'voiceStatus',_0x76aa('0x55'),'openchannelStatusTime',_0x76aa('0x56'),'smsStatusTime',_0x76aa('0x57'),_0x76aa('0x58'),_0x76aa('0x59'),_0x76aa('0x5a'),_0x76aa('0x5b'),_0x76aa('0x5c'),_0x76aa('0x5d'),'phoneBarEnableAutomaticScreenRecording',_0x76aa('0x5e')];var _0x5eeaa5=[_0x76aa('0x32'),_0x76aa('0x48'),_0x76aa('0x4'),_0x76aa('0x5'),_0x76aa('0x7'),_0x76aa('0x49'),_0x76aa('0x6'),'online'];var _0x333a3a=_(_0x2d0bc4)[_0x76aa('0x5f')](_0x5eeaa5)[_0x76aa('0x60')](_0x3e0315)[_0x76aa('0x2b')]();return _0x333a3a;}exports['filterAgentAttributes']=filterAgentAttributes;function getRealtimeAgentsQueryFields(){return['id',_0x76aa('0x31'),_0x76aa('0x3c'),_0x76aa('0x61'),_0x76aa('0x3d'),_0x76aa('0x44'),_0x76aa('0x35'),'userpic',_0x76aa('0x45'),_0x76aa('0x33'),_0x76aa('0x46'),_0x76aa('0x49'),_0x76aa('0x32'),_0x76aa('0x4'),_0x76aa('0x48'),'smsPause','voicePause',_0x76aa('0x7'),_0x76aa('0x11'),'faxStatus',_0x76aa('0x13'),_0x76aa('0x14'),'smsStatus',_0x76aa('0xf'),_0x76aa('0x15'),_0x76aa('0x55'),_0x76aa('0x58'),_0x76aa('0x56'),_0x76aa('0x62'),_0x76aa('0x63'),_0x76aa('0x59'),_0x76aa('0x57'),'chatCapacity',_0x76aa('0x4f'),'mailCapacity',_0x76aa('0x4b'),_0x76aa('0x4d'),_0x76aa('0x4e'),_0x76aa('0x64'),_0x76aa('0x53'),_0x76aa('0x50'),_0x76aa('0x65'),_0x76aa('0x51'),_0x76aa('0x52'),'phoneBarEnableScreenRecordingByAgent',_0x76aa('0x66'),_0x76aa('0x5b'),_0x76aa('0x67'),_0x76aa('0x5a'),_0x76aa('0x5e'),_0x76aa('0x5c')];}exports[_0x76aa('0x68')]=getRealtimeAgentsQueryFields;
\ No newline at end of file
+var _0xc4aa=['substring','indexOf','validateSortParameter','toLowerCase','sortAgentsByStatus','userpic','online','lastLoginAt','lastPauseAt','address','openchannelCapacity','smsCapacity','faxCapacity','chatCurrentCapacity','openchannelCurrentCapacity','mailCurrentCapacity','whatsappCurrentCapacity','faxCurrentCapacity','chatStatusTime','mailStatusTime','smsStatusTime','whatsappStatusTime','faxStatusTime','queue','destconnectedlinenum','screenrecording','phoneBarEnableScreenRecordingByAgent','phoneBarEnableAutomaticScreenRecording','omit','pick','role','openchannelStatusTime','voiceStatusTime','chatCapacity','whatsappCapacity','smsCurrentCapacity','onhold','routealias','getRealtimeAgentsQueryFields','lodash','jayson/promise','../../mysqldb','client','http','chatPause','faxPause','mailPause','openchannelPause','smsPause','voicePause','whatsappPause','filter','length','idle','unknown','ringing','voiceStatus','every','chatStatus','faxStatus','mailStatus','openchannelStatus','smsStatus','whatsappStatus','request','Agents','then','Unable\x20to\x20retrieve\x20RPC\x20agents\x20(AMI)','result','error','merge','catch','getRealtimeAgents','pause','*pause','busy','isArray','startCase','Queue','map','findOne','getAgents','all','flatten','uniq','value','getAgentIdsByQueues','includes','getAgentIdsByStatus','User','findAll','name','fullname','pauseType','globalStatus','getSortedAgentsIdsByStatus','split','fields','DESC','internal'];(function(_0xcb71e,_0x378c69){var _0x5c1cd9=function(_0x35f881){while(--_0x35f881){_0xcb71e['push'](_0xcb71e['shift']());}};_0x5c1cd9(++_0x378c69);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x5d2803,_0xf375bd){_0x5d2803=_0x5d2803-0x0;var _0xdcad2c=_0xc4aa[_0x5d2803];return _0xdcad2c;};'use strict';var _=require(_0xac4a('0x0'));var jayson=require(_0xac4a('0x1'));var db=require(_0xac4a('0x2'))['db'];var amiClient=jayson[_0xac4a('0x3')][_0xac4a('0x4')]({'port':0x232a});var routingClient=jayson[_0xac4a('0x3')]['http']({'port':0x232c});function isAgentPaused(_0x5cda73,_0x47d4f6){var _0x2f48ed=[_0x5cda73[_0xac4a('0x5')],_0x5cda73[_0xac4a('0x6')],_0x5cda73[_0xac4a('0x7')],_0x5cda73[_0xac4a('0x8')],_0x5cda73[_0xac4a('0x9')],_0x5cda73[_0xac4a('0xa')],_0x5cda73[_0xac4a('0xb')]];if(!_0x47d4f6)return _['every'](_0x2f48ed);var _0x5b8339=_[_0xac4a('0xc')](_0x2f48ed);return _0x5b8339[_0xac4a('0xd')]>0x0&&_0x5b8339[_0xac4a('0xd')]<_0x2f48ed['length']?!![]:![];}function isIdle(_0x1d182e){return _0x1d182e===_0xac4a('0xe')||_0x1d182e===_0xac4a('0xf')||_0x1d182e==='unavailable'||_0x1d182e===_0xac4a('0x10')||_['isNil'](_0x1d182e);}function isAgentIdle(_0x2f062c){if(_0x2f062c['voiceStatus']!==_0xac4a('0xe')&&_0x2f062c[_0xac4a('0xa')]){_0x2f062c[_0xac4a('0x11')]='pause';return![];}return _[_0xac4a('0x12')]([_0x2f062c[_0xac4a('0x13')],_0x2f062c[_0xac4a('0x14')],_0x2f062c[_0xac4a('0x15')],_0x2f062c[_0xac4a('0x16')],_0x2f062c[_0xac4a('0x17')],_0x2f062c[_0xac4a('0x11')],_0x2f062c[_0xac4a('0x18')]],isIdle);}function getRealtimeAgents(){return amiClient[_0xac4a('0x19')](_0xac4a('0x1a'),{})[_0xac4a('0x1b')](function(_0x26dbb8){if(_0x26dbb8['error']){throw new Error(_0xac4a('0x1c'));}var _0x34d797=_0x26dbb8[_0xac4a('0x1d')];return routingClient[_0xac4a('0x19')](_0xac4a('0x1a'),{})[_0xac4a('0x1b')](function(_0x28e304){if(_0x28e304[_0xac4a('0x1e')]){throw new Error('Unable\x20to\x20retrieve\x20RPC\x20agents\x20(Routing)');}var _0x5ac21e=_0x28e304[_0xac4a('0x1d')];return _[_0xac4a('0x1f')]({},_0x34d797,_0x5ac21e);});})[_0xac4a('0x20')](function(_0x4d837c){throw _0x4d837c;});}exports[_0xac4a('0x21')]=getRealtimeAgents;function getAgentStatus(_0x15c223){var _0x3752e4=_0xac4a('0xf');if(isAgentPaused(_0x15c223))_0x3752e4=_0xac4a('0x22');else if(isAgentPaused(_0x15c223,!![]))_0x3752e4=_0xac4a('0x23');else if(isAgentIdle(_0x15c223))_0x3752e4=_0xac4a('0xe');else _0x3752e4=_0xac4a('0x24');return _0x3752e4;}exports['getAgentStatus']=getAgentStatus;function getAgentIdsByQueues(_0x3d8f0a,_0x3204ad){var _0x599787=_[_0xac4a('0x25')](_0x3d8f0a)?_0x3d8f0a:[_0x3d8f0a];var _0x4169c0=_[_0xac4a('0x26')](_0x3204ad)+_0xac4a('0x27');var _0x4d2d6c=_[_0xac4a('0x28')](_0x599787,function(_0x2503d8){return db[_0x4169c0][_0xac4a('0x29')]({'where':{'id':_0x2503d8}})[_0xac4a('0x1b')](function(_0x594f36){if(!_0x594f36)return[];return _0x594f36[_0xac4a('0x2a')]({'attributes':['id'],'raw':!![]});});});return Promise[_0xac4a('0x2b')](_0x4d2d6c)[_0xac4a('0x1b')](function(_0x3e2c69){var _0x3bc318=_(_0x3e2c69)[_0xac4a('0x2c')]()[_0xac4a('0x28')]('id')[_0xac4a('0x2d')]()[_0xac4a('0x2e')]();return _0x3bc318;});}exports[_0xac4a('0x2f')]=getAgentIdsByQueues;function getAgentIdsByStatus(_0x20202c,_0x4e17ce,_0x23b061){try{if(_0x4e17ce[_0xac4a('0xd')]>0x0){_0x20202c=_0x20202c[_0xac4a('0xc')](function(_0x2772fe){return _0x4e17ce[_0xac4a('0x30')](_0x2772fe['id']);});}var _0x4a5a9e=_0x20202c['filter'](function(_0xdb7e){var _0x7a948b=_0xac4a('0x24');if(isAgentIdle(_0xdb7e)){_0x7a948b='idle';}return _0x7a948b===_0x23b061;});return _['map'](_0x4a5a9e,'id');}catch(_0x355755){throw _0x355755;}}exports[_0xac4a('0x31')]=getAgentIdsByStatus;function getSortedAgentsIdsByStatus(_0x228629,_0x432066,_0x17118e){return Promise['resolve']()[_0xac4a('0x1b')](function(){if(_0x432066['length']>0x0){_0x228629=_0x228629[_0xac4a('0xc')](function(_0x57adcf){return _0x432066[_0xac4a('0x30')](_0x57adcf['id']);});}return _0x228629;})[_0xac4a('0x1b')](function(){return db[_0xac4a('0x32')][_0xac4a('0x33')]({'attributes':['id',_0xac4a('0x34'),_0xac4a('0x35'),_0xac4a('0x5'),_0xac4a('0x6'),_0xac4a('0x7'),_0xac4a('0x8'),_0xac4a('0x9'),_0xac4a('0xa'),_0xac4a('0xb'),_0xac4a('0x36')],'where':{'id':{'$in':_['map'](_0x228629,'id')}},'raw':!![]});})[_0xac4a('0x1b')](function(_0x1c41fb){return _0x1c41fb['map'](function(_0x2a5419){var _0x1af1c1=_['find'](_0x228629,['id',_0x2a5419['id']]);var _0x58804b=filterAgentAttributes(_0x1af1c1);_[_0xac4a('0x1f')](_0x2a5419,_0x58804b);_0x2a5419[_0xac4a('0x37')]=getAgentStatus(_0x2a5419);return _0x2a5419;});})[_0xac4a('0x1b')](function(_0x3de9e2){var _0x4f5986=sortAgentsByStatus(_0x3de9e2,_0x17118e);return _[_0xac4a('0x28')](_0x4f5986,'id');})[_0xac4a('0x20')](function(_0x4e7630){throw _0x4e7630;});}exports[_0xac4a('0x38')]=getSortedAgentsIdsByStatus;function getUpdatedSortOptions(_0x34f55c){var _0x3ea5c8={'fields':[],'order':null};var _0x5f0eb8=_0x34f55c[_0xac4a('0x39')](',');_0x3ea5c8[_0xac4a('0x3a')]=_[_0xac4a('0xc')](_0x5f0eb8,function(_0x4e0445){if(!_0x4e0445[_0xac4a('0x30')](_0xac4a('0x37'))){return!![];}_0x3ea5c8['order']=_['startsWith'](_0x4e0445,'-')?_0xac4a('0x3b'):'ASC';return![];});return _0x3ea5c8;}exports['getUpdatedSortOptions']=getUpdatedSortOptions;function validateSortParameter(_0x5f0af0){if(!_0x5f0af0){_0x5f0af0='fullname,internal';}if(_0x5f0af0[_0xac4a('0x30')](_0xac4a('0x35'))&&!_0x5f0af0[_0xac4a('0x30')](_0xac4a('0x3c'))){var _0x2bdb21=_0x5f0af0[_0xac4a('0x3d')](0x0,_0x5f0af0[_0xac4a('0x3e')](_0xac4a('0x35')));_0x5f0af0+=','+_0x2bdb21+_0xac4a('0x3c');}return _0x5f0af0;}exports[_0xac4a('0x3f')]=validateSortParameter;function sortAgentsByStatus(_0x14f7d5,_0x1c2a87){var _0x4e4994=_0x14f7d5['sort'](function(_0x5cd24f,_0x1e1cc5){if(_0x5cd24f[_0xac4a('0x37')]===_0x1e1cc5[_0xac4a('0x37')]){if(_0x5cd24f[_0xac4a('0x37')]===_0xac4a('0x22')){if(_0x1c2a87===_0xac4a('0x3b')){return(_0x5cd24f[_0xac4a('0x36')]||'')<(_0x1e1cc5[_0xac4a('0x36')]||'')||_0x5cd24f[_0xac4a('0x35')][_0xac4a('0x40')]()>_0x1e1cc5['fullname'][_0xac4a('0x40')]()?0x1:-0x1;}else{return(_0x5cd24f[_0xac4a('0x36')]||'')<(_0x1e1cc5[_0xac4a('0x36')]||'')||_0x5cd24f[_0xac4a('0x35')][_0xac4a('0x40')]()>_0x1e1cc5['fullname'][_0xac4a('0x40')]()?-0x1:0x1;}}else{if(_0x1c2a87===_0xac4a('0x3b')){return _0x5cd24f['fullname'][_0xac4a('0x40')]()<_0x1e1cc5['fullname'][_0xac4a('0x40')]()?0x1:-0x1;}else{return _0x5cd24f[_0xac4a('0x35')][_0xac4a('0x40')]()<_0x1e1cc5[_0xac4a('0x35')][_0xac4a('0x40')]()?-0x1:0x1;}}}else{if(_0x1c2a87===_0xac4a('0x3b')){return _0x5cd24f[_0xac4a('0x37')]<_0x1e1cc5[_0xac4a('0x37')]?0x1:-0x1;}else{return _0x5cd24f[_0xac4a('0x37')]<_0x1e1cc5[_0xac4a('0x37')]?-0x1:0x1;}}});return _0x4e4994;}exports[_0xac4a('0x41')]=sortAgentsByStatus;function filterAgentAttributes(_0x3b68b3){var _0x569812=[_0xac4a('0x42'),_0xac4a('0x43'),_0xac4a('0x44'),'lastPauseAt',_0xac4a('0x36'),_0xac4a('0x45'),'internal',_0xac4a('0x46'),'chatPause',_0xac4a('0x8'),_0xac4a('0x7'),_0xac4a('0x9'),'whatsappPause','faxPause',_0xac4a('0xa'),'chatCapacity',_0xac4a('0x47'),'mailCapacity',_0xac4a('0x48'),'whatsappCapacity',_0xac4a('0x49'),_0xac4a('0x4a'),_0xac4a('0x4b'),_0xac4a('0x4c'),'smsCurrentCapacity',_0xac4a('0x4d'),_0xac4a('0x4e'),_0xac4a('0x13'),_0xac4a('0x16'),_0xac4a('0x15'),_0xac4a('0x17'),_0xac4a('0x18'),'faxStatus',_0xac4a('0x11'),_0xac4a('0x4f'),'openchannelStatusTime',_0xac4a('0x50'),_0xac4a('0x51'),_0xac4a('0x52'),_0xac4a('0x53'),'voiceStatusTime',_0xac4a('0x54'),_0xac4a('0x55'),_0xac4a('0x56'),_0xac4a('0x57'),_0xac4a('0x58'),'routealias'];var _0x179373=['chatPause',_0xac4a('0x8'),_0xac4a('0x7'),'smsPause','whatsappPause',_0xac4a('0x6'),_0xac4a('0xa'),'online'];var _0x18d29c=_(_0x3b68b3)[_0xac4a('0x59')](_0x179373)[_0xac4a('0x5a')](_0x569812)[_0xac4a('0x2e')]();return _0x18d29c;}exports['filterAgentAttributes']=filterAgentAttributes;function getRealtimeAgentsQueryFields(){return['id',_0xac4a('0x34'),_0xac4a('0x35'),_0xac4a('0x5b'),_0xac4a('0x3c'),_0xac4a('0x43'),_0xac4a('0x37'),_0xac4a('0x42'),'lastLoginAt',_0xac4a('0x36'),_0xac4a('0x45'),_0xac4a('0x6'),_0xac4a('0x5'),_0xac4a('0x7'),_0xac4a('0x8'),_0xac4a('0x9'),_0xac4a('0xa'),_0xac4a('0xb'),_0xac4a('0x13'),_0xac4a('0x14'),_0xac4a('0x15'),_0xac4a('0x16'),_0xac4a('0x17'),_0xac4a('0x11'),_0xac4a('0x18'),'chatStatusTime',_0xac4a('0x53'),'mailStatusTime',_0xac4a('0x5c'),'smsStatusTime',_0xac4a('0x5d'),'whatsappStatusTime',_0xac4a('0x5e'),'faxCapacity','mailCapacity',_0xac4a('0x47'),_0xac4a('0x48'),_0xac4a('0x5f'),_0xac4a('0x4a'),_0xac4a('0x4e'),_0xac4a('0x4c'),'openchannelCurrentCapacity',_0xac4a('0x60'),'whatsappCurrentCapacity',_0xac4a('0x57'),'phoneBarEnableAutomaticScreenRecording',_0xac4a('0x55'),_0xac4a('0x61'),_0xac4a('0x54'),_0xac4a('0x62'),_0xac4a('0x56')];}exports[_0xac4a('0x63')]=getRealtimeAgentsQueryFields;
\ No newline at end of file
index 84ac901..6b8514e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7dc0=['erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialPredictiveInterval','predictiveIntervalAvailable','predictiveIntervalTotalCalls','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','startCase','Queues','then','error','format','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','result','catch','voice','inbound','concat','outbound','map','paused','find','pick','jayson/promise','util','client','http','available','loggedIn','waiting','inUse','loggedInDb','notInUse','onHold','ringInUse','talking','unknown','pTalking','originated','message','dialActive','dialMethod','startProgressive','erlangCalls'];(function(_0x12595c,_0x2e18b4){var _0x4d5db3=function(_0x12bc1d){while(--_0x12bc1d){_0x12595c['push'](_0x12595c['shift']());}};_0x4d5db3(++_0x2e18b4);}(_0x7dc0,0x134));var _0x07dc=function(_0x2ed7d1,_0x363741){_0x2ed7d1=_0x2ed7d1-0x0;var _0x38ae3c=_0x7dc0[_0x2ed7d1];return _0x38ae3c;};'use strict';var _=require('lodash');var jayson=require(_0x07dc('0x0'));var util=require(_0x07dc('0x1'));var amiClient=jayson[_0x07dc('0x2')][_0x07dc('0x3')]({'port':0x232a});var routingClient=jayson[_0x07dc('0x2')][_0x07dc('0x3')]({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=[_0x07dc('0x4'),_0x07dc('0x5'),'paused',_0x07dc('0x6')];var VOICE_QUEUE_ATTRIBUTES=['busy',_0x07dc('0x7'),'invalid',_0x07dc('0x8'),_0x07dc('0x9'),_0x07dc('0xa'),'ringing',_0x07dc('0xb'),_0x07dc('0xc'),'unavailable',_0x07dc('0xd')];var OUTBOUND_QUEUE_ATTRIBUTES=[_0x07dc('0xe'),_0x07dc('0xf'),_0x07dc('0x10'),'statusMessage',_0x07dc('0x11'),_0x07dc('0x12'),'Trunk','startPredictive',_0x07dc('0x13'),_0x07dc('0x14'),_0x07dc('0x15'),_0x07dc('0x16'),_0x07dc('0x17'),_0x07dc('0x18'),'dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold',_0x07dc('0x19'),_0x07dc('0x1a'),'predictiveIntervalAnsweredCalls',_0x07dc('0x1b'),_0x07dc('0x1c'),_0x07dc('0x1d'),_0x07dc('0x1e')];function getRealtimeQueues(_0x12ca05,_0x1eab03){var _0x59d071=_0x1eab03==='voice'?amiClient:routingClient;return _0x59d071['request'](_[_0x07dc('0x1f')](_0x1eab03)+_0x07dc('0x20'),_0x12ca05)[_0x07dc('0x21')](function(_0x407394){if(_0x407394[_0x07dc('0x22')])throw new Error(util[_0x07dc('0x23')](_0x07dc('0x24'),_0x1eab03));return _0x407394[_0x07dc('0x25')];})[_0x07dc('0x26')](function(_0x16a6f4){throw _0x16a6f4;});}exports['getRealtimeQueues']=getRealtimeQueues;function initializeQueues(_0x2b7357,_0xb5efbf,_0x3e4770,_0x31bdca){var _0x5a3bc8=DEFAULT_QUEUE_ATTRIBUTES;if(_0x3e4770===_0x07dc('0x27')){if(_0x31bdca===_0x07dc('0x28')){_0x5a3bc8=_0x5a3bc8[_0x07dc('0x29')](VOICE_QUEUE_ATTRIBUTES);}else if(_0x31bdca===_0x07dc('0x2a')){_0x5a3bc8=_0x5a3bc8[_0x07dc('0x29')](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0x2b7357[_0x07dc('0x2b')](function(_0x579f0d){var _0xb4185c=_0x579f0d['get']({'plain':!![]});_0xb4185c[_0x07dc('0x2c')]=0x0;_0xb4185c[_0x07dc('0x8')]=0x0;_0xb4185c[_0x07dc('0x5')]=0x0;_0xb4185c[_0x07dc('0x4')]=0x0;_0xb4185c[_0x07dc('0x6')]=0x0;if(_0x3e4770==='voice'){_0xb4185c['talking']=0x0;_0xb4185c['busy']=0x0;if(_0x31bdca===_0x07dc('0x2a')){_0xb4185c['pTalking']=0x0;_0xb4185c['originated']=0x0;}}var _0x5e948f=_[_0x07dc('0x2d')](_0xb5efbf,['id',_0xb4185c['id']]);if(_0x5e948f){_['merge'](_0xb4185c,_[_0x07dc('0x2e')](_0x5e948f,_0x5a3bc8));}return _0xb4185c;});}exports['initializeQueues']=initializeQueues;
\ No newline at end of file
+var _0x9e30=['find','merge','pick','initializeQueues','lodash','util','client','http','available','loggedIn','paused','waiting','busy','invalid','loggedInDb','notInUse','onHold','ringing','ringInUse','talking','unavailable','unknown','pTalking','originated','statusMessage','dialActive','dialMethod','startProgressive','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialPredictiveInterval','dialPredictiveIntervalMinThreshold','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgTalktime','voice','startCase','error','format','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','catch','getRealtimeQueues','concat','outbound','map'];(function(_0x474f02,_0x44c5af){var _0x47321d=function(_0x40e0de){while(--_0x40e0de){_0x474f02['push'](_0x474f02['shift']());}};_0x47321d(++_0x44c5af);}(_0x9e30,0x1ee));var _0x09e3=function(_0x43747e,_0x13b832){_0x43747e=_0x43747e-0x0;var _0x7fb853=_0x9e30[_0x43747e];return _0x7fb853;};'use strict';var _=require(_0x09e3('0x0'));var jayson=require('jayson/promise');var util=require(_0x09e3('0x1'));var amiClient=jayson[_0x09e3('0x2')]['http']({'port':0x232a});var routingClient=jayson[_0x09e3('0x2')][_0x09e3('0x3')]({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=[_0x09e3('0x4'),_0x09e3('0x5'),_0x09e3('0x6'),_0x09e3('0x7')];var VOICE_QUEUE_ATTRIBUTES=[_0x09e3('0x8'),'inUse',_0x09e3('0x9'),_0x09e3('0xa'),_0x09e3('0xb'),_0x09e3('0xc'),_0x09e3('0xd'),_0x09e3('0xe'),_0x09e3('0xf'),_0x09e3('0x10'),_0x09e3('0x11')];var OUTBOUND_QUEUE_ATTRIBUTES=[_0x09e3('0x12'),_0x09e3('0x13'),'message',_0x09e3('0x14'),_0x09e3('0x15'),_0x09e3('0x16'),'Trunk','startPredictive',_0x09e3('0x17'),_0x09e3('0x18'),_0x09e3('0x19'),_0x09e3('0x1a'),_0x09e3('0x1b'),_0x09e3('0x1c'),'dialPredictiveIntervalMaxThreshold',_0x09e3('0x1d'),'predictiveIntervalAvailable',_0x09e3('0x1e'),_0x09e3('0x1f'),_0x09e3('0x20'),_0x09e3('0x21'),'predictiveIntervalAvgHoldtime',_0x09e3('0x22')];function getRealtimeQueues(_0x4326e8,_0x1836b7){var _0x41e239=_0x1836b7===_0x09e3('0x23')?amiClient:routingClient;return _0x41e239['request'](_[_0x09e3('0x24')](_0x1836b7)+'Queues',_0x4326e8)['then'](function(_0x2bda7c){if(_0x2bda7c[_0x09e3('0x25')])throw new Error(util[_0x09e3('0x26')](_0x09e3('0x27'),_0x1836b7));return _0x2bda7c['result'];})[_0x09e3('0x28')](function(_0x2ecc1e){throw _0x2ecc1e;});}exports[_0x09e3('0x29')]=getRealtimeQueues;function initializeQueues(_0x1110d5,_0x1c2011,_0x575296,_0x14367a){var _0x4e2452=DEFAULT_QUEUE_ATTRIBUTES;if(_0x575296===_0x09e3('0x23')){if(_0x14367a==='inbound'){_0x4e2452=_0x4e2452[_0x09e3('0x2a')](VOICE_QUEUE_ATTRIBUTES);}else if(_0x14367a===_0x09e3('0x2b')){_0x4e2452=_0x4e2452['concat'](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0x1110d5[_0x09e3('0x2c')](function(_0x47e66b){var _0x3984ae=_0x47e66b['get']({'plain':!![]});_0x3984ae[_0x09e3('0x6')]=0x0;_0x3984ae['loggedInDb']=0x0;_0x3984ae[_0x09e3('0x5')]=0x0;_0x3984ae['available']=0x0;_0x3984ae[_0x09e3('0x7')]=0x0;if(_0x575296===_0x09e3('0x23')){_0x3984ae[_0x09e3('0xf')]=0x0;_0x3984ae[_0x09e3('0x8')]=0x0;if(_0x14367a===_0x09e3('0x2b')){_0x3984ae[_0x09e3('0x12')]=0x0;_0x3984ae[_0x09e3('0x13')]=0x0;}}var _0x489ad1=_[_0x09e3('0x2d')](_0x1c2011,['id',_0x3984ae['id']]);if(_0x489ad1){_[_0x09e3('0x2e')](_0x3984ae,_[_0x09e3('0x2f')](_0x489ad1,_0x4e2452));}return _0x3984ae;});}exports[_0x09e3('0x30')]=initializeQueues;
\ No newline at end of file
index 13ebb5c..4401ad1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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(_0x1e660a,_0x5bb483){var _0x11507b=function(_0x4928d0){while(--_0x4928d0){_0x1e660a['push'](_0x1e660a['shift']());}};_0x11507b(++_0x5bb483);}(_0x9957,0x93));var _0x7995=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x9957[_0x3947c9];return _0x2e7871;};'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
+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(_0x91ec40,_0xa1ec3b){var _0x428c7a=function(_0x196f25){while(--_0x196f25){_0x91ec40['push'](_0x91ec40['shift']());}};_0x428c7a(++_0xa1ec3b);}(_0xa9e0,0x123));var _0x0a9e=function(_0x298ed3,_0x4ab5e1){_0x298ed3=_0x298ed3-0x0;var _0x5aad28=_0xa9e0[_0x298ed3];return _0x5aad28;};'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
index f9de1d8..871a775 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xee76=['digest','hex','getUuid','licenseToken','win32','dmidecode\x20--string\x20system-uuid','utf8','replace','macAddress','substring','lodash','crypto','bimedia-machine-uuid','child_process','execSync','networkInterfaces','orderBy','length','filter','family','IPv4','internal','concat','mac','address','127.0.0.1','getFirstInterface','cpus','map','model','join','createHash','md5','update'];(function(_0xdf5112,_0x41ca79){var _0x1dbddc=function(_0x4cae2f){while(--_0x4cae2f){_0xdf5112['push'](_0xdf5112['shift']());}};_0x1dbddc(++_0x41ca79);}(_0xee76,0x13c));var _0x6ee7=function(_0x5d2507,_0x556fac){_0x5d2507=_0x5d2507-0x0;var _0x198c07=_0xee76[_0x5d2507];return _0x198c07;};'use strict';var _=require(_0x6ee7('0x0'));var os=require('os');var crypto=require(_0x6ee7('0x1'));var machine=require(_0x6ee7('0x2'));var exec=require(_0x6ee7('0x3'))[_0x6ee7('0x4')];var config=require('../environment');function getInterfaces(){var _0x525a0d=[];var _0x315f8a=os[_0x6ee7('0x5')]();var _0x42ef65=_[_0x6ee7('0x6')](_['keys'](_0x315f8a));for(var _0x38dcf7=0x0;_0x38dcf7<_0x42ef65[_0x6ee7('0x7')];_0x38dcf7++){var _0x28abf4=_0x315f8a[_0x42ef65[_0x38dcf7]][_0x6ee7('0x8')](function(_0x2e42e1){return _0x2e42e1[_0x6ee7('0x9')]===_0x6ee7('0xa')&&_0x2e42e1[_0x6ee7('0xb')]===![];});_0x525a0d=_0x525a0d[_0x6ee7('0xc')](_0x28abf4);}return _0x525a0d;}function getFirstInterface(){var _0x261511=_['head'](getInterfaces());return{'macAddress':_0x261511&&_0x261511[_0x6ee7('0xd')]?_0x261511[_0x6ee7('0xd')]:'00:00:00:00:00:00','ipAddress':_0x261511&&_0x261511[_0x6ee7('0xe')]?_0x261511[_0x6ee7('0xe')]:_0x6ee7('0xf')};}exports[_0x6ee7('0x10')]=getFirstInterface;function getCPUhash(){var _0x4b161e=_[_0x6ee7('0x6')](os[_0x6ee7('0x11')]()[_0x6ee7('0x12')](function(_0x46f962){return _0x46f962[_0x6ee7('0x13')];}))[_0x6ee7('0x14')](':');return crypto[_0x6ee7('0x15')](_0x6ee7('0x16'))[_0x6ee7('0x17')](_0x4b161e)[_0x6ee7('0x18')](_0x6ee7('0x19'));}exports[_0x6ee7('0x1a')]=function(){var _0x38c6e3=os['platform']();var _0x272a3b=/[0-9a-f-]{36}/;if(config[_0x6ee7('0x1b')]&&_0x272a3b['test'](config[_0x6ee7('0x1b')])){return config[_0x6ee7('0x1b')];}else if(_0x38c6e3===_0x6ee7('0x1c')){return exec(_0x6ee7('0x1d'),{'encoding':_0x6ee7('0x1e')})[_0x6ee7('0x1f')]('\x0d\x0a','');}else{var _0x3b1af6=getFirstInterface();var _0x4ad51=getCPUhash();var _0x1fc5b2=_0x4ad51+'|'+os['hostname']()+'|'+_0x3b1af6[_0x6ee7('0x20')]+'|'+_0x3b1af6['ipAddress'];var _0x17cea2=crypto['createHash'](_0x6ee7('0x16'))[_0x6ee7('0x17')](_0x1fc5b2)[_0x6ee7('0x18')](_0x6ee7('0x19'));return _0x17cea2['substring'](0x0,0x8)+'-'+_0x17cea2[_0x6ee7('0x21')](0x8,0xc)+'-'+_0x17cea2['substring'](0xc,0x10)+'-'+_0x17cea2[_0x6ee7('0x21')](0x10,0x14)+'-'+_0x17cea2[_0x6ee7('0x21')](0x14);}};
\ No newline at end of file
+var _0x26fd=['lodash','crypto','bimedia-machine-uuid','child_process','execSync','../environment','keys','length','filter','family','IPv4','concat','mac','00:00:00:00:00:00','address','127.0.0.1','orderBy','cpus','model','md5','update','digest','hex','getUuid','licenseToken','test','win32','dmidecode\x20--string\x20system-uuid','replace','hostname','macAddress','ipAddress','createHash','substring'];(function(_0x45b6d5,_0x55c53c){var _0x46d9d8=function(_0x43031f){while(--_0x43031f){_0x45b6d5['push'](_0x45b6d5['shift']());}};_0x46d9d8(++_0x55c53c);}(_0x26fd,0xcc));var _0xd26f=function(_0xf13ca6,_0x5735ea){_0xf13ca6=_0xf13ca6-0x0;var _0x4a4387=_0x26fd[_0xf13ca6];return _0x4a4387;};'use strict';var _=require(_0xd26f('0x0'));var os=require('os');var crypto=require(_0xd26f('0x1'));var machine=require(_0xd26f('0x2'));var exec=require(_0xd26f('0x3'))[_0xd26f('0x4')];var config=require(_0xd26f('0x5'));function getInterfaces(){var _0xf2f3d0=[];var _0x5d118e=os['networkInterfaces']();var _0x5c48d1=_['orderBy'](_[_0xd26f('0x6')](_0x5d118e));for(var _0x42ed80=0x0;_0x42ed80<_0x5c48d1[_0xd26f('0x7')];_0x42ed80++){var _0x5e0328=_0x5d118e[_0x5c48d1[_0x42ed80]][_0xd26f('0x8')](function(_0x55afb4){return _0x55afb4[_0xd26f('0x9')]===_0xd26f('0xa')&&_0x55afb4['internal']===![];});_0xf2f3d0=_0xf2f3d0[_0xd26f('0xb')](_0x5e0328);}return _0xf2f3d0;}function getFirstInterface(){var _0x4b88e1=_['head'](getInterfaces());return{'macAddress':_0x4b88e1&&_0x4b88e1[_0xd26f('0xc')]?_0x4b88e1[_0xd26f('0xc')]:_0xd26f('0xd'),'ipAddress':_0x4b88e1&&_0x4b88e1['address']?_0x4b88e1[_0xd26f('0xe')]:_0xd26f('0xf')};}exports['getFirstInterface']=getFirstInterface;function getCPUhash(){var _0x101743=_[_0xd26f('0x10')](os[_0xd26f('0x11')]()['map'](function(_0x2ccf46){return _0x2ccf46[_0xd26f('0x12')];}))['join'](':');return crypto['createHash'](_0xd26f('0x13'))[_0xd26f('0x14')](_0x101743)[_0xd26f('0x15')](_0xd26f('0x16'));}exports[_0xd26f('0x17')]=function(){var _0x34c752=os['platform']();var _0x23a7da=/[0-9a-f-]{36}/;if(config[_0xd26f('0x18')]&&_0x23a7da[_0xd26f('0x19')](config['licenseToken'])){return config[_0xd26f('0x18')];}else if(_0x34c752===_0xd26f('0x1a')){return exec(_0xd26f('0x1b'),{'encoding':'utf8'})[_0xd26f('0x1c')]('\x0d\x0a','');}else{var _0x1779ac=getFirstInterface();var _0x1852dc=getCPUhash();var _0x228b52=_0x1852dc+'|'+os[_0xd26f('0x1d')]()+'|'+_0x1779ac[_0xd26f('0x1e')]+'|'+_0x1779ac[_0xd26f('0x1f')];var _0x1e7466=crypto[_0xd26f('0x20')](_0xd26f('0x13'))['update'](_0x228b52)['digest']('hex');return _0x1e7466[_0xd26f('0x21')](0x0,0x8)+'-'+_0x1e7466[_0xd26f('0x21')](0x8,0xc)+'-'+_0x1e7466[_0xd26f('0x21')](0xc,0x10)+'-'+_0x1e7466['substring'](0x10,0x14)+'-'+_0x1e7466[_0xd26f('0x21')](0x14);}};
\ No newline at end of file
index bf53506..a39dc62 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x243e=['getUuid','License','findOrCreate','default','util','moment','request-promise','bluebird','pkginfo','../../mysqldb','./hardware','format','%s/api/servers/%s/check?version=%s','exports','version','GET','then','catch','get','data1','data2','license','info','update','THE\x20LICENSE\x20HAS\x20BEEN\x20DISABLED','NEW\x20UUID\x20DETECTED:\x20FROM\x20%s\x20TO\x20%s','%s\x20-\x20GRAY\x20PERIOD\x20STARTED\x20AT\x20%s','toUpperCase','YYYY-MM-DD\x20HH:mm','encryptString','decryptString','error','finally'];(function(_0x1dacfe,_0x494b5a){var _0xd89649=function(_0xe673d3){while(--_0xe673d3){_0x1dacfe['push'](_0x1dacfe['shift']());}};_0xd89649(++_0x494b5a);}(_0x243e,0x190));var _0xe243=function(_0xa84391,_0x108455){_0xa84391=_0xa84391-0x0;var _0x5bdce2=_0x243e[_0xa84391];return _0x5bdce2;};'use strict';var util=require(_0xe243('0x0'));var moment=require(_0xe243('0x1'));var rp=require(_0xe243('0x2'));var BPromise=require(_0xe243('0x3'));var pkginfo=require(_0xe243('0x4'))(module,'version');var db=require(_0xe243('0x5'))['db'];var encryptor=require('../../components/encryptor');var hardware=require(_0xe243('0x6'));var logger=require('../logger')('license');var HOST='https://www.xcallymotion.com';var TIME=0x3c*0x1388;var DAYS=0x7;var GRAY_PERIOD_REASON;var oldToken;var isOldTokenSent=![];function httpRequest(_0x2b6287){return new BPromise(function(_0x15da37,_0x23aa2a){var _0x2430ee=util[_0xe243('0x7')](_0xe243('0x8'),HOST,_0x2b6287,module[_0xe243('0x9')][_0xe243('0xa')]);if(oldToken){_0x2430ee=util[_0xe243('0x7')]('%s/api/servers/%s/check?version=%s&oldtoken=%s',HOST,_0x2b6287,module['exports'][_0xe243('0xa')],oldToken);}var _0x581de8={'uri':_0x2430ee,'method':_0xe243('0xb'),'timeout':0xea60,'json':!![]};return rp(_0x581de8)[_0xe243('0xc')](function(_0x24c9bf){_0x15da37(_0x24c9bf);})[_0xe243('0xd')](function(_0x3d16cc){_0x23aa2a(_0x3d16cc);});});}function manageLicense(_0x3e7071,_0x9749e9){var _0x42a69d=_0x9749e9[_0xe243('0xe')]({'plain':!![]});if(!isOldTokenSent&&_0x42a69d[_0xe243('0xf')]!==_0x3e7071&&!_0x42a69d[_0xe243('0x10')]){oldToken=_0x42a69d[_0xe243('0xf')];}httpRequest(_0x3e7071)[_0xe243('0xc')](function(_0x3eb323){if(oldToken){oldToken=undefined;isOldTokenSent=!![];}if(_0x3eb323['active']){isOldTokenSent=![];if(!_0x42a69d[_0xe243('0x11')]&&_0x42a69d[_0xe243('0x11')]!=_0x3eb323[_0xe243('0x11')]||_0x42a69d[_0xe243('0x11')]&&_0x42a69d[_0xe243('0x10')]){logger[_0xe243('0x12')]('THE\x20LICENSE\x20HAS\x20BEEN\x20ENABLED');}if(_0x42a69d[_0xe243('0x11')]&&!_0x42a69d['data2']&&_0x42a69d[_0xe243('0x11')]!=_0x3eb323[_0xe243('0x11')]){logger[_0xe243('0x12')]('THE\x20LICENSE\x20HAS\x20BEEN\x20UPDATED');}if(_0x42a69d[_0xe243('0x11')]&&!_0x42a69d[_0xe243('0x10')]&&_0x42a69d[_0xe243('0x11')]==_0x3eb323[_0xe243('0x11')]){return _0x9749e9;}return _0x9749e9[_0xe243('0x13')]({'data1':_0x3e7071,'data2':null,'license':_0x3eb323[_0xe243('0x11')]});}else{if(_0x3eb323[_0xe243('0x11')]||_0x42a69d[_0xe243('0x11')]){if(!_0x42a69d[_0xe243('0x10')]){if(_0x42a69d[_0xe243('0xf')]==_0x3e7071){GRAY_PERIOD_REASON='Disabled';logger[_0xe243('0x12')](_0xe243('0x14'));}else{GRAY_PERIOD_REASON='Changed';logger['info'](_0xe243('0x15'),_0x42a69d[_0xe243('0xf')],_0x3e7071);}logger['info'](_0xe243('0x16'),GRAY_PERIOD_REASON[_0xe243('0x17')](),moment()[_0xe243('0x7')](_0xe243('0x18')));return _0x9749e9[_0xe243('0x13')]({'data2':encryptor[_0xe243('0x19')](moment()['format'](_0xe243('0x18')))});}else{if(moment()['diff'](encryptor[_0xe243('0x1a')](_0x42a69d[_0xe243('0x10')]),'days')>DAYS){logger['info']('DEMO\x20START\x20AT\x20%s',moment()[_0xe243('0x7')](_0xe243('0x18')));isOldTokenSent=![];return _0x9749e9[_0xe243('0x13')]({'data1':_0x3e7071,'data2':null,'license':null});}}}else{if(_0x42a69d[_0xe243('0xf')]!=_0x3e7071){logger[_0xe243('0x12')](_0xe243('0x15'),_0x42a69d['data1'],_0x3e7071);return _0x9749e9[_0xe243('0x13')]({'data1':_0x3e7071,'data2':null,'license':null});}}}return _0x9749e9;})['then'](function(_0x3187a9){_0x9749e9=_0x3187a9;})['catch'](function(_0x59cf46){logger[_0xe243('0x1b')](_0x59cf46['message']);})[_0xe243('0x1c')](function(){setTimeout(function(){manageLicense(hardware[_0xe243('0x1d')](),_0x9749e9);},TIME);});}function defaultLicense(){var _0x1a30af=hardware['getUuid']();if(_0x1a30af){return db[_0xe243('0x1e')][_0xe243('0x1f')]({'where':{'id':0x1},'defaults':{'data1':_0x1a30af}})['spread'](function(_0x349a82,_0x5b9797){logger[_0xe243('0x12')]('SERVICE\x20LICENSE\x20STARTED\x20%s',_0x1a30af);manageLicense(_0x1a30af,_0x349a82);})[_0xe243('0xd')](function(_0x130d9e){logger[_0xe243('0x1b')](_0x130d9e['message']);});}}exports[_0xe243('0x20')]=defaultLicense;
\ No newline at end of file
+var _0x43b2=['bluebird','../../mysqldb','./hardware','license','https://www.xcallymotion.com','format','version','%s/api/servers/%s/check?version=%s&oldtoken=%s','exports','GET','then','catch','get','data1','active','data2','info','THE\x20LICENSE\x20HAS\x20BEEN\x20UPDATED','update','THE\x20LICENSE\x20HAS\x20BEEN\x20DISABLED','NEW\x20UUID\x20DETECTED:\x20FROM\x20%s\x20TO\x20%s','toUpperCase','YYYY-MM-DD\x20HH:mm','encryptString','decryptString','days','DEMO\x20START\x20AT\x20%s','error','finally','getUuid','License','findOrCreate','spread','SERVICE\x20LICENSE\x20STARTED\x20%s','message','util','moment'];(function(_0x30c5ce,_0x3e3f7a){var _0x33cc16=function(_0x5138af){while(--_0x5138af){_0x30c5ce['push'](_0x30c5ce['shift']());}};_0x33cc16(++_0x3e3f7a);}(_0x43b2,0xb7));var _0x243b=function(_0x12c31a,_0x2b9ca4){_0x12c31a=_0x12c31a-0x0;var _0x12dc12=_0x43b2[_0x12c31a];return _0x12dc12;};'use strict';var util=require(_0x243b('0x0'));var moment=require(_0x243b('0x1'));var rp=require('request-promise');var BPromise=require(_0x243b('0x2'));var pkginfo=require('pkginfo')(module,'version');var db=require(_0x243b('0x3'))['db'];var encryptor=require('../../components/encryptor');var hardware=require(_0x243b('0x4'));var logger=require('../logger')(_0x243b('0x5'));var HOST=_0x243b('0x6');var TIME=0x3c*0x1388;var DAYS=0x7;var GRAY_PERIOD_REASON;var oldToken;var isOldTokenSent=![];function httpRequest(_0x40d209){return new BPromise(function(_0x46eac8,_0x24f169){var _0x218b4b=util[_0x243b('0x7')]('%s/api/servers/%s/check?version=%s',HOST,_0x40d209,module['exports'][_0x243b('0x8')]);if(oldToken){_0x218b4b=util['format'](_0x243b('0x9'),HOST,_0x40d209,module[_0x243b('0xa')][_0x243b('0x8')],oldToken);}var _0xb00b3e={'uri':_0x218b4b,'method':_0x243b('0xb'),'timeout':0xea60,'json':!![]};return rp(_0xb00b3e)[_0x243b('0xc')](function(_0x18a068){_0x46eac8(_0x18a068);})[_0x243b('0xd')](function(_0x542515){_0x24f169(_0x542515);});});}function manageLicense(_0x2e2480,_0x1a121a){var _0x289f0f=_0x1a121a[_0x243b('0xe')]({'plain':!![]});if(!isOldTokenSent&&_0x289f0f[_0x243b('0xf')]!==_0x2e2480&&!_0x289f0f['data2']){oldToken=_0x289f0f[_0x243b('0xf')];}httpRequest(_0x2e2480)['then'](function(_0x5def7d){if(oldToken){oldToken=undefined;isOldTokenSent=!![];}if(_0x5def7d[_0x243b('0x10')]){isOldTokenSent=![];if(!_0x289f0f[_0x243b('0x5')]&&_0x289f0f[_0x243b('0x5')]!=_0x5def7d[_0x243b('0x5')]||_0x289f0f['license']&&_0x289f0f[_0x243b('0x11')]){logger[_0x243b('0x12')]('THE\x20LICENSE\x20HAS\x20BEEN\x20ENABLED');}if(_0x289f0f['license']&&!_0x289f0f[_0x243b('0x11')]&&_0x289f0f[_0x243b('0x5')]!=_0x5def7d['license']){logger[_0x243b('0x12')](_0x243b('0x13'));}if(_0x289f0f['license']&&!_0x289f0f[_0x243b('0x11')]&&_0x289f0f[_0x243b('0x5')]==_0x5def7d[_0x243b('0x5')]){return _0x1a121a;}return _0x1a121a[_0x243b('0x14')]({'data1':_0x2e2480,'data2':null,'license':_0x5def7d[_0x243b('0x5')]});}else{if(_0x5def7d[_0x243b('0x5')]||_0x289f0f[_0x243b('0x5')]){if(!_0x289f0f[_0x243b('0x11')]){if(_0x289f0f['data1']==_0x2e2480){GRAY_PERIOD_REASON='Disabled';logger['info'](_0x243b('0x15'));}else{GRAY_PERIOD_REASON='Changed';logger[_0x243b('0x12')](_0x243b('0x16'),_0x289f0f[_0x243b('0xf')],_0x2e2480);}logger[_0x243b('0x12')]('%s\x20-\x20GRAY\x20PERIOD\x20STARTED\x20AT\x20%s',GRAY_PERIOD_REASON[_0x243b('0x17')](),moment()[_0x243b('0x7')](_0x243b('0x18')));return _0x1a121a[_0x243b('0x14')]({'data2':encryptor[_0x243b('0x19')](moment()['format'](_0x243b('0x18')))});}else{if(moment()['diff'](encryptor[_0x243b('0x1a')](_0x289f0f[_0x243b('0x11')]),_0x243b('0x1b'))>DAYS){logger['info'](_0x243b('0x1c'),moment()[_0x243b('0x7')](_0x243b('0x18')));isOldTokenSent=![];return _0x1a121a[_0x243b('0x14')]({'data1':_0x2e2480,'data2':null,'license':null});}}}else{if(_0x289f0f[_0x243b('0xf')]!=_0x2e2480){logger[_0x243b('0x12')](_0x243b('0x16'),_0x289f0f['data1'],_0x2e2480);return _0x1a121a[_0x243b('0x14')]({'data1':_0x2e2480,'data2':null,'license':null});}}}return _0x1a121a;})[_0x243b('0xc')](function(_0x156dcd){_0x1a121a=_0x156dcd;})[_0x243b('0xd')](function(_0x2d7549){logger[_0x243b('0x1d')](_0x2d7549['message']);})[_0x243b('0x1e')](function(){setTimeout(function(){manageLicense(hardware[_0x243b('0x1f')](),_0x1a121a);},TIME);});}function defaultLicense(){var _0x2d5858=hardware[_0x243b('0x1f')]();if(_0x2d5858){return db[_0x243b('0x20')][_0x243b('0x21')]({'where':{'id':0x1},'defaults':{'data1':_0x2d5858}})[_0x243b('0x22')](function(_0x582ebc,_0x128671){logger['info'](_0x243b('0x23'),_0x2d5858);manageLicense(_0x2d5858,_0x582ebc);})[_0x243b('0xd')](function(_0x1812e5){logger[_0x243b('0x1d')](_0x1812e5[_0x243b('0x24')]);});}}exports['default']=defaultLicense;
\ No newline at end of file
index 3d0e994..f5bc9b0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9872=['lodash','moment','./hardware','../../mysqldb','2027-01-01T00:00:00.000Z','Demo\x20license','getUuid','Breaking\x20license','License','find','defaults','then','catch','uuid','data1','data2','split','decryptString','demo','gray','deadline','add','days','grayReason','machineUuid','changed','disabled','message','User','role','sequelize','COUNT','col','count','admin','user','telephone','users','telephones','pick','License\x20limit\x20reached\x20for\x20users','exports','util'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0x9872,0x12c));var _0x2987=function(_0x2a8a97,_0x415200){_0x2a8a97=_0x2a8a97-0x0;var _0x96d61c=_0x9872[_0x2a8a97];return _0x96d61c;};'use strict';var util=require(_0x2987('0x0'));var _=require(_0x2987('0x1'));var moment=require(_0x2987('0x2'));var BPromise=require('bluebird');var hardware=require(_0x2987('0x3'));var encryptor=require('../../components/encryptor');var db=require(_0x2987('0x4'))['db'];const demoLicense={'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0x2987('0x5'),'chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'description':_0x2987('0x6'),'machineUuid':hardware[_0x2987('0x7')](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};const breakingLicense={'breaking':!![],'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0x2987('0x5'),'chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'update':![],'description':_0x2987('0x8'),'machineUuid':hardware['getUuid'](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};function getLicense(_0x96c299){return new BPromise(function(_0xae04c,_0x576328){return db[_0x2987('0x9')][_0x2987('0xa')](_[_0x2987('0xb')](_0x96c299,{'raw':!![],'where':{'id':0x1}}))[_0x2987('0xc')](function(_0x2b3921){return checkLicense(_0x2b3921,null);})['then'](function(_0x17d9be){_0xae04c(_0x17d9be);return;})[_0x2987('0xd')](function(_0x48c566){_0x576328(_0x48c566);});});}function checkLicense(_0x5ae0eb,_0x44181f){if(!_0x5ae0eb){demoLicense[_0x2987('0xe')]=_0x5ae0eb['data1'];return demoLicense;}try{var _0x148dbf=_0x44181f||_0x5ae0eb['license'];if(_['isEmpty'](_0x148dbf)){throw new Error('License\x20key\x20value\x20not\x20found');}var _0x2bbe66=_0x5ae0eb[_0x2987('0xf')];var _0x4092f3=_0x5ae0eb[_0x2987('0x10')];var _0x13d04c=_0x2bbe66[_0x2987('0x11')]('-')[0x4];var _0x4f5090=_0x2bbe66[_0x2987('0x11')]('-')[0x0];var _0x9250aa=encryptor[_0x2987('0x12')](_0x148dbf,util['format']('%s:%s:%s',_0x13d04c,_0x2bbe66,_0x4f5090));var _0x395363=JSON['parse'](_0x9250aa);_0x395363[_0x2987('0x13')]=![];_0x395363[_0x2987('0xe')]=_0x2bbe66;_0x395363['machineUuid']=hardware['getUuid']();if(_0x4092f3){var _0x258387=encryptor[_0x2987('0x12')](_0x4092f3);_0x395363[_0x2987('0x14')]=_0x258387;_0x395363[_0x2987('0x15')]=moment(_0x258387)[_0x2987('0x16')](0x7,_0x2987('0x17'))['format']();_0x395363[_0x2987('0x18')]=_0x395363[_0x2987('0xe')]!=_0x395363[_0x2987('0x19')]?_0x2987('0x1a'):_0x2987('0x1b');}return _0x395363;}catch(_0x1e81f0){breakingLicense[_0x2987('0xe')]=_0x5ae0eb['data1'];breakingLicense[_0x2987('0x1c')]=_0x1e81f0[_0x2987('0x1c')];return breakingLicense;}}function getLimits(){return new BPromise(function(_0x4a4cae,_0xada54a){getLicense()[_0x2987('0xc')](function(_0x3d7539){return db[_0x2987('0x1d')]['findAll']({'attributes':[_0x2987('0x1e'),[db[_0x2987('0x1f')]['fn'](_0x2987('0x20'),db['sequelize'][_0x2987('0x21')]('role')),_0x2987('0x22')]],'group':_0x2987('0x1e'),'where':{'role':{'$or':[_0x2987('0x23'),_0x2987('0x24'),_0x2987('0x25')]}},'raw':!![]})['then'](function(_0x39a773){var _0x2a79ad={'user':_0x3d7539[_0x2987('0x26')]||0x0,'telephone':_0x3d7539[_0x2987('0x27')]||0x0};_0x39a773['forEach'](function(_0x120513){var _0x2a3789=_0x120513[_0x2987('0x1e')]===_0x2987('0x23')?_0x2987('0x24'):_0x120513['role'];_0x2a79ad[_0x2a3789]-=_0x120513[_0x2987('0x22')];if(_0x2a79ad[_0x2a3789]<0x0)_0x2a79ad[_0x2a3789]=0x0;});_0x4a4cae(_0x2a79ad);return;});})['catch'](function(_0x186d0b){_0xada54a(_0x186d0b);});});}function checkUserLimits(_0x382cd1){return new BPromise(function(_0x2adde2,_0x5dfa8e){getLimits()[_0x2987('0xc')](function(_0x146021){var _0x5386d9=_[_0x2987('0x28')](_['countBy'](_0x382cd1,_0x2987('0x1e')),['admin',_0x2987('0x24'),_0x2987('0x25')]);var _0x38bca4=(_0x5386d9[_0x2987('0x23')]||0x0)+(_0x5386d9[_0x2987('0x24')]||0x0);var _0x592c26=_0x5386d9[_0x2987('0x25')]||0x0;if(_0x38bca4>_0x146021[_0x2987('0x24')])return _0x5dfa8e(_0x2987('0x29'));if(_0x592c26>_0x146021[_0x2987('0x25')])return _0x5dfa8e('License\x20limit\x20reached\x20for\x20telephones');return _0x2adde2();})[_0x2987('0xd')](function(_0x1073d1){_0x5dfa8e(_0x1073d1);});});}module[_0x2987('0x2a')]={'checkLicense':checkLicense,'checkUserLimits':checkUserLimits,'getLicense':getLicense};
\ No newline at end of file
+var _0x67e8=['countBy','License\x20limit\x20reached\x20for\x20users','License\x20limit\x20reached\x20for\x20telephones','exports','util','moment','bluebird','./hardware','2027-01-01T00:00:00.000Z','Demo\x20license','Breaking\x20license','License','find','defaults','then','catch','data1','license','License\x20key\x20value\x20not\x20found','data2','split','decryptString','format','parse','getUuid','gray','deadline','add','grayReason','uuid','machineUuid','changed','message','User','findAll','role','sequelize','col','admin','user','telephone','telephones','count','pick'];(function(_0x1a9b94,_0x4d763e){var _0x379102=function(_0x1d9e7c){while(--_0x1d9e7c){_0x1a9b94['push'](_0x1a9b94['shift']());}};_0x379102(++_0x4d763e);}(_0x67e8,0xe0));var _0x867e=function(_0x271a55,_0x254bf4){_0x271a55=_0x271a55-0x0;var _0x17c23c=_0x67e8[_0x271a55];return _0x17c23c;};'use strict';var util=require(_0x867e('0x0'));var _=require('lodash');var moment=require(_0x867e('0x1'));var BPromise=require(_0x867e('0x2'));var hardware=require(_0x867e('0x3'));var encryptor=require('../../components/encryptor');var db=require('../../mysqldb')['db'];const demoLicense={'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0x867e('0x4'),'chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'description':_0x867e('0x5'),'machineUuid':hardware['getUuid'](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};const breakingLicense={'breaking':!![],'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0x867e('0x4'),'chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'update':![],'description':_0x867e('0x6'),'machineUuid':hardware['getUuid'](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};function getLicense(_0x1ab51a){return new BPromise(function(_0x13c712,_0x47406f){return db[_0x867e('0x7')][_0x867e('0x8')](_[_0x867e('0x9')](_0x1ab51a,{'raw':!![],'where':{'id':0x1}}))[_0x867e('0xa')](function(_0x3cd5f2){return checkLicense(_0x3cd5f2,null);})[_0x867e('0xa')](function(_0x7fe3){_0x13c712(_0x7fe3);return;})[_0x867e('0xb')](function(_0x253a00){_0x47406f(_0x253a00);});});}function checkLicense(_0x31f01d,_0x5282f4){if(!_0x31f01d){demoLicense['uuid']=_0x31f01d[_0x867e('0xc')];return demoLicense;}try{var _0x4160b6=_0x5282f4||_0x31f01d[_0x867e('0xd')];if(_['isEmpty'](_0x4160b6)){throw new Error(_0x867e('0xe'));}var _0x2ca176=_0x31f01d[_0x867e('0xc')];var _0x4aae17=_0x31f01d[_0x867e('0xf')];var _0x1e9a73=_0x2ca176[_0x867e('0x10')]('-')[0x4];var _0x14a106=_0x2ca176[_0x867e('0x10')]('-')[0x0];var _0x572a72=encryptor[_0x867e('0x11')](_0x4160b6,util[_0x867e('0x12')]('%s:%s:%s',_0x1e9a73,_0x2ca176,_0x14a106));var _0x321088=JSON[_0x867e('0x13')](_0x572a72);_0x321088['demo']=![];_0x321088['uuid']=_0x2ca176;_0x321088['machineUuid']=hardware[_0x867e('0x14')]();if(_0x4aae17){var _0x53fbd0=encryptor[_0x867e('0x11')](_0x4aae17);_0x321088[_0x867e('0x15')]=_0x53fbd0;_0x321088[_0x867e('0x16')]=moment(_0x53fbd0)[_0x867e('0x17')](0x7,'days')['format']();_0x321088[_0x867e('0x18')]=_0x321088[_0x867e('0x19')]!=_0x321088[_0x867e('0x1a')]?_0x867e('0x1b'):'disabled';}return _0x321088;}catch(_0xc8d5b6){breakingLicense[_0x867e('0x19')]=_0x31f01d[_0x867e('0xc')];breakingLicense[_0x867e('0x1c')]=_0xc8d5b6[_0x867e('0x1c')];return breakingLicense;}}function getLimits(){return new BPromise(function(_0xfb86c5,_0x168d05){getLicense()['then'](function(_0x46e58){return db[_0x867e('0x1d')][_0x867e('0x1e')]({'attributes':[_0x867e('0x1f'),[db[_0x867e('0x20')]['fn']('COUNT',db['sequelize'][_0x867e('0x21')](_0x867e('0x1f'))),'count']],'group':_0x867e('0x1f'),'where':{'role':{'$or':[_0x867e('0x22'),_0x867e('0x23'),_0x867e('0x24')]}},'raw':!![]})[_0x867e('0xa')](function(_0xaecea4){var _0x3b72c9={'user':_0x46e58['users']||0x0,'telephone':_0x46e58[_0x867e('0x25')]||0x0};_0xaecea4['forEach'](function(_0x31345a){var _0x211009=_0x31345a['role']==='admin'?_0x867e('0x23'):_0x31345a[_0x867e('0x1f')];_0x3b72c9[_0x211009]-=_0x31345a[_0x867e('0x26')];if(_0x3b72c9[_0x211009]<0x0)_0x3b72c9[_0x211009]=0x0;});_0xfb86c5(_0x3b72c9);return;});})[_0x867e('0xb')](function(_0x47b0d1){_0x168d05(_0x47b0d1);});});}function checkUserLimits(_0x5842b8){return new BPromise(function(_0x16c642,_0x3131ee){getLimits()[_0x867e('0xa')](function(_0x26520f){var _0x4717f7=_[_0x867e('0x27')](_[_0x867e('0x28')](_0x5842b8,_0x867e('0x1f')),[_0x867e('0x22'),_0x867e('0x23'),'telephone']);var _0x4a36ee=(_0x4717f7[_0x867e('0x22')]||0x0)+(_0x4717f7[_0x867e('0x23')]||0x0);var _0xe41ed=_0x4717f7['telephone']||0x0;if(_0x4a36ee>_0x26520f['user'])return _0x3131ee(_0x867e('0x29'));if(_0xe41ed>_0x26520f['telephone'])return _0x3131ee(_0x867e('0x2a'));return _0x16c642();})[_0x867e('0xb')](function(_0x5af11e){_0x3131ee(_0x5af11e);});});}module[_0x867e('0x2b')]={'checkLicense':checkLicense,'checkUserLimits':checkUserLimits,'getLicense':getLicense};
\ No newline at end of file
index 491a3ad..e14ec37 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x583c=['http://localhost:9000','myappanuglar-secret','app-id','exports'];(function(_0x38c218,_0xbe4d6e){var _0xece85f=function(_0x14ca9f){while(--_0x14ca9f){_0x38c218['push'](_0x38c218['shift']());}};_0xece85f(++_0xbe4d6e);}(_0x583c,0x12b));var _0xc583=function(_0x2f62aa,_0x108e95){_0x2f62aa=_0x2f62aa-0x0;var _0x1a341f=_0x583c[_0x2f62aa];return _0x1a341f;};'use strict';module[_0xc583('0x0')]={'DOMAIN':_0xc583('0x1'),'SESSION_SECRET':_0xc583('0x2'),'GOOGLE_ID':_0xc583('0x3'),'GOOGLE_SECRET':'secret','DEBUG':''};
\ No newline at end of file
+var _0xf2e3=['myappanuglar-secret','app-id','secret','exports'];(function(_0x54006d,_0x5f1fed){var _0x147408=function(_0x248f4d){while(--_0x248f4d){_0x54006d['push'](_0x54006d['shift']());}};_0x147408(++_0x5f1fed);}(_0xf2e3,0x9b));var _0x3f2e=function(_0x2e4e19,_0x493b50){_0x2e4e19=_0x2e4e19-0x0;var _0x9ba20b=_0xf2e3[_0x2e4e19];return _0x9ba20b;};'use strict';module[_0x3f2e('0x0')]={'DOMAIN':'http://localhost:9000','SESSION_SECRET':_0x3f2e('0x1'),'GOOGLE_ID':_0x3f2e('0x2'),'GOOGLE_SECRET':_0x3f2e('0x3'),'DEBUG':''};
\ No newline at end of file
index 9a0a529..174febb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1dff=['../utils/loggers'];(function(_0x1c09d1,_0x5868eb){var _0x49045d=function(_0x2c8be8){while(--_0x2c8be8){_0x1c09d1['push'](_0x1c09d1['shift']());}};_0x49045d(++_0x5868eb);}(_0x1dff,0x105));var _0xf1df=function(_0x42ecb5,_0x20b4d2){_0x42ecb5=_0x42ecb5-0x0;var _0x487442=_0x1dff[_0x42ecb5];return _0x487442;};'use strict';var fileLogger=require(_0xf1df('0x0'))['fileLogger'];module['exports']=fileLogger;
\ No newline at end of file
+var _0xb929=['fileLogger','../utils/loggers'];(function(_0x8feb4e,_0xf32a5b){var _0x92e04c=function(_0xb58a4b){while(--_0xb58a4b){_0x8feb4e['push'](_0x8feb4e['shift']());}};_0x92e04c(++_0xf32a5b);}(_0xb929,0xf9));var _0x9b92=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xb929[_0x321bb2];return _0x9c12ed;};'use strict';var fileLogger=require(_0x9b92('0x0'))[_0x9b92('0x1')];module['exports']=fileLogger;
\ No newline at end of file
index e24cfb3..8975295 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcf35=['../../services/agi/index.js','../../services/email/index.js','routing','../../services/routing/index.js','xdr','../../services/xdr/index.js','exports','path','../../config/environment','resolve','root','legacy-libs','express','join','ami','../../services/ami/index.js'];(function(_0x17a716,_0x32e9bb){var _0x39dc1d=function(_0xd1021c){while(--_0xd1021c){_0x17a716['push'](_0x17a716['shift']());}};_0x39dc1d(++_0x32e9bb);}(_0xcf35,0x167));var _0x5cf3=function(_0x417a23,_0x2a228d){_0x417a23=_0x417a23-0x0;var _0x3aeb3f=_0xcf35[_0x417a23];return _0x3aeb3f;};'use strict';var path=require(_0x5cf3('0x0'));var cfg=require(_0x5cf3('0x1'));var env={'NODE_PATH':path[_0x5cf3('0x2')](path['join'](cfg[_0x5cf3('0x3')],_0x5cf3('0x4')))};var pm2config={'apps':[{'name':_0x5cf3('0x5'),'script':path[_0x5cf3('0x6')](__dirname,'../../services/express/index.js'),'env':env},{'name':_0x5cf3('0x7'),'script':path[_0x5cf3('0x6')](__dirname,_0x5cf3('0x8')),'env':env},{'name':'agi','script':path[_0x5cf3('0x6')](__dirname,_0x5cf3('0x9')),'env':env},{'name':'email','script':path[_0x5cf3('0x6')](__dirname,_0x5cf3('0xa')),'env':env},{'name':_0x5cf3('0xb'),'script':path[_0x5cf3('0x6')](__dirname,_0x5cf3('0xc')),'env':env},{'name':_0x5cf3('0xd'),'script':path[_0x5cf3('0x6')](__dirname,_0x5cf3('0xe')),'env':env}]};module[_0x5cf3('0xf')]=pm2config;
\ No newline at end of file
+var _0x7acc=['routing','xdr','path','../../config/environment','resolve','join','legacy-libs','express','../../services/express/index.js','../../services/ami/index.js','../../services/email/index.js'];(function(_0x167c4d,_0x42cf51){var _0x2ae722=function(_0x45e276){while(--_0x45e276){_0x167c4d['push'](_0x167c4d['shift']());}};_0x2ae722(++_0x42cf51);}(_0x7acc,0xde));var _0xc7ac=function(_0x38ade5,_0x50a6e4){_0x38ade5=_0x38ade5-0x0;var _0x31c40b=_0x7acc[_0x38ade5];return _0x31c40b;};'use strict';var path=require(_0xc7ac('0x0'));var cfg=require(_0xc7ac('0x1'));var env={'NODE_PATH':path[_0xc7ac('0x2')](path[_0xc7ac('0x3')](cfg['root'],_0xc7ac('0x4')))};var pm2config={'apps':[{'name':_0xc7ac('0x5'),'script':path[_0xc7ac('0x3')](__dirname,_0xc7ac('0x6')),'env':env},{'name':'ami','script':path['join'](__dirname,_0xc7ac('0x7')),'env':env},{'name':'agi','script':path[_0xc7ac('0x3')](__dirname,'../../services/agi/index.js'),'env':env},{'name':'email','script':path[_0xc7ac('0x3')](__dirname,_0xc7ac('0x8')),'env':env},{'name':_0xc7ac('0x9'),'script':path[_0xc7ac('0x3')](__dirname,'../../services/routing/index.js'),'env':env},{'name':_0xc7ac('0xa'),'script':path[_0xc7ac('0x3')](__dirname,'../../services/xdr/index.js'),'env':env}]};module['exports']=pm2config;
\ No newline at end of file
index 6eb08fc..f8081ce 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6039=['./config','connected','start','then','disconnect','stop','restart','list','delete','dump','pm2'];(function(_0x4cebe2,_0x35c51d){var _0x14538e=function(_0x1efa5d){while(--_0x1efa5d){_0x4cebe2['push'](_0x4cebe2['shift']());}};_0x14538e(++_0x35c51d);}(_0x6039,0xe6));var _0x9603=function(_0x1bdb05,_0x9b9e86){_0x1bdb05=_0x1bdb05-0x0;var _0x4ad236=_0x6039[_0x1bdb05];return _0x4ad236;};'use strict';var pm2=require(_0x9603('0x0'));var BPromise=require('bluebird');var config=require(_0x9603('0x1'));function connect(){return new BPromise(function(_0x3c412e,_0x1085b8){return pm2['connect'](function(_0x47241a){if(_0x47241a){return _0x1085b8(_0x47241a);}return _0x3c412e(_0x9603('0x2'));});});};exports[_0x9603('0x3')]=function(_0x2aa3d1){return connect()[_0x9603('0x4')](function(){return new BPromise(function(_0x542167,_0xff7f66){return pm2['start'](_0x2aa3d1,function(_0x41bbe0,_0x490c7c){if(_0x41bbe0){return _0xff7f66(_0x41bbe0);}pm2[_0x9603('0x5')]();return _0x542167(_0x490c7c);});});});};exports[_0x9603('0x6')]=function(_0x1a6797){return connect()['then'](function(){return new BPromise(function(_0x43ec4c,_0x72baa1){return pm2['stop'](_0x1a6797,function(_0xf40231,_0x48eb86){if(_0xf40231){return _0x72baa1(_0xf40231);}pm2['disconnect']();return _0x43ec4c(_0x48eb86);});});});};exports[_0x9603('0x7')]=function(_0x30251f){return connect()['then'](function(){return new BPromise(function(_0x87108c,_0x1fe1ac){return pm2[_0x9603('0x7')](_0x30251f,function(_0x5ae441,_0xa668e7){if(_0x5ae441){return _0x1fe1ac(_0x5ae441);}pm2[_0x9603('0x5')]();return _0x87108c(_0xa668e7);});});});};exports[_0x9603('0x8')]=function(){return connect()[_0x9603('0x4')](function(){return new BPromise(function(_0x252ff5,_0x52d82e){return pm2[_0x9603('0x8')](function(_0x29e2f3,_0x6e40ea){if(_0x29e2f3){return _0x52d82e(_0x29e2f3);}pm2[_0x9603('0x5')]();return _0x252ff5(_0x6e40ea);});});});};exports['describe']=function(_0xf35121){return connect()['then'](function(){return new BPromise(function(_0x440fcd,_0x272296){return pm2['describe'](_0xf35121,function(_0x1fd52e,_0x360717){if(_0x1fd52e){return _0x272296(_0x1fd52e);}pm2[_0x9603('0x5')]();return _0x440fcd(_0x360717);});});});};exports[_0x9603('0x9')]=function(_0x2bd95d){return connect()[_0x9603('0x4')](function(){return new BPromise(function(_0x5a4b6d,_0x941343){return pm2[_0x9603('0x9')](_0x2bd95d,function(_0x3d5075,_0x400d64){if(_0x3d5075){return _0x941343(_0x3d5075);}pm2[_0x9603('0x5')]();return _0x5a4b6d(_0x400d64);});});});};exports['dump']=function(){return connect()['then'](function(){return new BPromise(function(_0x22ea0c,_0x54e47c){return pm2[_0x9603('0xa')](function(_0x18103e){if(_0x18103e){return _0x54e47c(_0x18103e);}return _0x22ea0c('saved');});});});};
\ No newline at end of file
+var _0x8e0d=['describe','dump','pm2','connect','connected','start','then','disconnect','stop','list'];(function(_0x4f027d,_0x3f9587){var _0xc46890=function(_0x27d06c){while(--_0x27d06c){_0x4f027d['push'](_0x4f027d['shift']());}};_0xc46890(++_0x3f9587);}(_0x8e0d,0x1a6));var _0xd8e0=function(_0x95942,_0x85da80){_0x95942=_0x95942-0x0;var _0x6d7f81=_0x8e0d[_0x95942];return _0x6d7f81;};'use strict';var pm2=require(_0xd8e0('0x0'));var BPromise=require('bluebird');var config=require('./config');function connect(){return new BPromise(function(_0x265a0a,_0x10b233){return pm2[_0xd8e0('0x1')](function(_0xf1f214){if(_0xf1f214){return _0x10b233(_0xf1f214);}return _0x265a0a(_0xd8e0('0x2'));});});};exports[_0xd8e0('0x3')]=function(_0x19c7cc){return connect()[_0xd8e0('0x4')](function(){return new BPromise(function(_0x47b9bf,_0x581c22){return pm2[_0xd8e0('0x3')](_0x19c7cc,function(_0x4f16ba,_0xe840f6){if(_0x4f16ba){return _0x581c22(_0x4f16ba);}pm2[_0xd8e0('0x5')]();return _0x47b9bf(_0xe840f6);});});});};exports[_0xd8e0('0x6')]=function(_0x2b8579){return connect()[_0xd8e0('0x4')](function(){return new BPromise(function(_0x296384,_0x48a2fe){return pm2[_0xd8e0('0x6')](_0x2b8579,function(_0x4e65ff,_0x13e85){if(_0x4e65ff){return _0x48a2fe(_0x4e65ff);}pm2[_0xd8e0('0x5')]();return _0x296384(_0x13e85);});});});};exports['restart']=function(_0x2d2853){return connect()[_0xd8e0('0x4')](function(){return new BPromise(function(_0x1e9e7c,_0x4c55c3){return pm2['restart'](_0x2d2853,function(_0x692e29,_0x23ed5b){if(_0x692e29){return _0x4c55c3(_0x692e29);}pm2[_0xd8e0('0x5')]();return _0x1e9e7c(_0x23ed5b);});});});};exports[_0xd8e0('0x7')]=function(){return connect()[_0xd8e0('0x4')](function(){return new BPromise(function(_0x52af9e,_0x398ace){return pm2['list'](function(_0x4be274,_0x1e5e07){if(_0x4be274){return _0x398ace(_0x4be274);}pm2['disconnect']();return _0x52af9e(_0x1e5e07);});});});};exports[_0xd8e0('0x8')]=function(_0x4539cc){return connect()[_0xd8e0('0x4')](function(){return new BPromise(function(_0x1bcd45,_0xe5aac1){return pm2['describe'](_0x4539cc,function(_0x3b5ff5,_0x5ddefd){if(_0x3b5ff5){return _0xe5aac1(_0x3b5ff5);}pm2[_0xd8e0('0x5')]();return _0x1bcd45(_0x5ddefd);});});});};exports['delete']=function(_0x41eb55){return connect()[_0xd8e0('0x4')](function(){return new BPromise(function(_0x402de9,_0x12869b){return pm2['delete'](_0x41eb55,function(_0x37cbd4,_0x5cbb1f){if(_0x37cbd4){return _0x12869b(_0x37cbd4);}pm2[_0xd8e0('0x5')]();return _0x402de9(_0x5cbb1f);});});});};exports[_0xd8e0('0x9')]=function(){return connect()['then'](function(){return new BPromise(function(_0x2efcf7,_0x4f6158){return pm2[_0xd8e0('0x9')](function(_0x4953f5){if(_0x4953f5){return _0x4f6158(_0x4953f5);}return _0x2efcf7('saved');});});});};
\ No newline at end of file
index c668567..a8ef515 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xac35=['then','ChatInteraction','findAll','lastMsgAt','subtract','minutes','length','map','[CHAT]\x20Interactions\x20to\x20close:','join','update','system','format','YYYY-MM-DD\x20HH:mm:ss','emit','chatInteraction:update','inspect','start','ioredis','util','../../mysqldb','../logger','redis','defaults','localhost','socket.io-emitter','Setting','find','chatTimeout'];(function(_0x5f5650,_0x4b14ca){var _0x56b163=function(_0x33ad1f){while(--_0x33ad1f){_0x5f5650['push'](_0x5f5650['shift']());}};_0x56b163(++_0x4b14ca);}(_0xac35,0x1c5));var _0x5ac3=function(_0x17f4c8,_0x3aa345){_0x17f4c8=_0x17f4c8-0x0;var _0x288b47=_0xac35[_0x17f4c8];return _0x288b47;};'use strict';var _=require('lodash');var moment=require('moment');var Redis=require(_0x5ac3('0x0'));var util=require(_0x5ac3('0x1'));var config=require('../../config/environment');var db=require(_0x5ac3('0x2'))['db'];var logger=require(_0x5ac3('0x3'))('schedule');config[_0x5ac3('0x4')]=_[_0x5ac3('0x5')](config['redis'],{'host':_0x5ac3('0x6'),'port':0x18eb});var io=require(_0x5ac3('0x7'))(new Redis(config['redis']));function closeInteractions(){var _0x4ad50b=0x0;var _0x1ff223=[];return db[_0x5ac3('0x8')][_0x5ac3('0x9')]({'raw':!![],'attributes':['id',_0x5ac3('0xa')],'where':{'id':0x1}})[_0x5ac3('0xb')](function(_0x307b6b){_0x4ad50b=_0x307b6b[_0x5ac3('0xa')];if(_0x4ad50b){return db[_0x5ac3('0xc')][_0x5ac3('0xd')]({'raw':!![],'attributes':['id',_0x5ac3('0xe')],'where':{'closed':![],'lastMsgAt':{'$lt':moment()[_0x5ac3('0xf')](_0x307b6b[_0x5ac3('0xa')],_0x5ac3('0x10'))}}});}else{return[];}})[_0x5ac3('0xb')](function(_0x37d542){if(_0x37d542&&_0x37d542[_0x5ac3('0x11')]){_0x1ff223=_[_0x5ac3('0x12')](_0x37d542||[],'id');logger['info'](_0x5ac3('0x13'),_0x1ff223[_0x5ac3('0x14')]());return db[_0x5ac3('0xc')][_0x5ac3('0x15')]({'closeReason':_0x5ac3('0x16'),'disposition':'timeout','closed':!![],'closedAt':moment()[_0x5ac3('0x17')](_0x5ac3('0x18'))},{'where':{'id':_0x1ff223}});}})[_0x5ac3('0xb')](function(){if(_0x1ff223&&_0x1ff223[_0x5ac3('0x11')]){logger['info']('[CHAT]\x20Sending\x20updates\x20for\x20interactions:',_0x1ff223[_0x5ac3('0x14')]());for(var _0x198eb0=0x0;_0x198eb0<_0x1ff223[_0x5ac3('0x11')];_0x198eb0++){io[_0x5ac3('0x19')](_0x5ac3('0x1a'),{'id':_0x1ff223[_0x198eb0],'closed':!![]});}}})['catch'](function(_0xe03a0e){logger['error']('[CHAT]\x20Error\x20closing\x20interactions',_0xe03a0e?util[_0x5ac3('0x1b')](_0xe03a0e,{'showHidden':![],'depth':null}):'');});}exports[_0x5ac3('0x1c')]=function(){setInterval(function(){return closeInteractions();},0x3c*0x3e8);return closeInteractions();};
\ No newline at end of file
+var _0xacb4=['[CHAT]\x20Sending\x20updates\x20for\x20interactions:','join','emit','chatInteraction:update','catch','error','[CHAT]\x20Error\x20closing\x20interactions','inspect','lodash','moment','ioredis','util','../../config/environment','../../mysqldb','../logger','schedule','defaults','redis','Setting','chatTimeout','then','findAll','lastMsgAt','subtract','length','info','[CHAT]\x20Interactions\x20to\x20close:','update','timeout','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x5a39c3,_0x7fa035){var _0x366141=function(_0x8e64fd){while(--_0x8e64fd){_0x5a39c3['push'](_0x5a39c3['shift']());}};_0x366141(++_0x7fa035);}(_0xacb4,0xbc));var _0x4acb=function(_0x4c12ec,_0x2e9103){_0x4c12ec=_0x4c12ec-0x0;var _0x3ae42c=_0xacb4[_0x4c12ec];return _0x3ae42c;};'use strict';var _=require(_0x4acb('0x0'));var moment=require(_0x4acb('0x1'));var Redis=require(_0x4acb('0x2'));var util=require(_0x4acb('0x3'));var config=require(_0x4acb('0x4'));var db=require(_0x4acb('0x5'))['db'];var logger=require(_0x4acb('0x6'))(_0x4acb('0x7'));config['redis']=_[_0x4acb('0x8')](config[_0x4acb('0x9')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x4acb('0x9')]));function closeInteractions(){var _0x124301=0x0;var _0x151be3=[];return db[_0x4acb('0xa')]['find']({'raw':!![],'attributes':['id',_0x4acb('0xb')],'where':{'id':0x1}})[_0x4acb('0xc')](function(_0x2d64be){_0x124301=_0x2d64be[_0x4acb('0xb')];if(_0x124301){return db['ChatInteraction'][_0x4acb('0xd')]({'raw':!![],'attributes':['id',_0x4acb('0xe')],'where':{'closed':![],'lastMsgAt':{'$lt':moment()[_0x4acb('0xf')](_0x2d64be['chatTimeout'],'minutes')}}});}else{return[];}})[_0x4acb('0xc')](function(_0x4f9fd2){if(_0x4f9fd2&&_0x4f9fd2[_0x4acb('0x10')]){_0x151be3=_['map'](_0x4f9fd2||[],'id');logger[_0x4acb('0x11')](_0x4acb('0x12'),_0x151be3['join']());return db['ChatInteraction'][_0x4acb('0x13')]({'closeReason':'system','disposition':_0x4acb('0x14'),'closed':!![],'closedAt':moment()['format'](_0x4acb('0x15'))},{'where':{'id':_0x151be3}});}})[_0x4acb('0xc')](function(){if(_0x151be3&&_0x151be3[_0x4acb('0x10')]){logger[_0x4acb('0x11')](_0x4acb('0x16'),_0x151be3[_0x4acb('0x17')]());for(var _0x56be56=0x0;_0x56be56<_0x151be3[_0x4acb('0x10')];_0x56be56++){io[_0x4acb('0x18')](_0x4acb('0x19'),{'id':_0x151be3[_0x56be56],'closed':!![]});}}})[_0x4acb('0x1a')](function(_0x3fa668){logger[_0x4acb('0x1b')](_0x4acb('0x1c'),_0x3fa668?util[_0x4acb('0x1d')](_0x3fa668,{'showHidden':![],'depth':null}):'');});}exports['start']=function(){setInterval(function(){return closeInteractions();},0x3c*0x3e8);return closeInteractions();};
\ No newline at end of file
index 5386cae..d159763 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3f3e=['startAllRefreshIntervals','exports'];(function(_0x1de497,_0x5b2194){var _0x4f1c8f=function(_0x3a1364){while(--_0x3a1364){_0x1de497['push'](_0x1de497['shift']());}};_0x4f1c8f(++_0x5b2194);}(_0x3f3e,0x8a));var _0xe3f3=function(_0x5389e3,_0x4c7354){_0x5389e3=_0x5389e3-0x0;var _0x5e0f0a=_0x3f3e[_0x5389e3];return _0x5e0f0a;};'use strict';function start(){var _0x26bcd3=require('../../api/cloudProvider/cloudProvider.oauth.js');return _0x26bcd3[_0xe3f3('0x0')]();}module[_0xe3f3('0x1')]={'intervals':{},'start':start};
\ No newline at end of file
+var _0x3ba5=['exports','../../api/cloudProvider/cloudProvider.oauth.js','startAllRefreshIntervals'];(function(_0x3fa10c,_0x1db998){var _0x1ed01b=function(_0x1b9482){while(--_0x1b9482){_0x3fa10c['push'](_0x3fa10c['shift']());}};_0x1ed01b(++_0x1db998);}(_0x3ba5,0xdf));var _0x53ba=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x3ba5[_0x3dd15e];return _0x231fd0;};'use strict';function start(){var _0x16f195=require(_0x53ba('0x0'));return _0x16f195[_0x53ba('0x1')]();}module[_0x53ba('0x2')]={'intervals':{},'start':start};
\ No newline at end of file
index 3a8733d..479fe6d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x06c5=['active','isBetween','startAt','add','start','add\x20cron','stop\x20cron','exists','update','run','util','path','lodash','moment','cron-job-manager','jayson/promise','../logger','../../mysqldb','../../api/analyticDefaultReport/analyticDefaultReport.controller','client','info','email','MailAccount','getSmtpOptions','format','name','bcc','Report\x20%s\x20last\x20%s\x20%s','subtractNumber','subtractUnit','../../files/reports','savename','basename','extname','zip','join','existsSync','status','Sent','message','attachments','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','Report\x20empty\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20–\x20please\x20do\x20not\x20reply\x20to\x20this\x20email.\x0a\x0a','sendIfEmpty','empty\x20file,\x20email\x20not\x20sent','request','SendMail','then','error','error\x20mail','email\x20sent','catch','Smtp','isNil','subtractNumber\x20null\x20or\x20undefined','subtractUnit\x20null\x20or\x20undefined','subtract','YYYY-MM-DD\x20HH:mm:ss','scheduled','DefaultReportId','CustomReportId','findAll','MailServerOut','CloudProvider','keys','jobs','map','toString','difference','length','stop','deleteJob','delete\x20cron','toRun','index','my\x20id','resolve','run\x20job','cron'];(function(_0x103b56,_0x37e65b){var _0x45eeb2=function(_0x2a7e3b){while(--_0x2a7e3b){_0x103b56['push'](_0x103b56['shift']());}};_0x45eeb2(++_0x37e65b);}(_0x06c5,0x19f));var _0x506c=function(_0x436f4f,_0x111e20){_0x436f4f=_0x436f4f-0x0;var _0x98ab13=_0x06c5[_0x436f4f];return _0x98ab13;};'use strict';var fs=require('fs');var util=require(_0x506c('0x0'));var path=require(_0x506c('0x1'));var _=require(_0x506c('0x2'));var moment=require(_0x506c('0x3'));var CronJobManager=require(_0x506c('0x4'));var jayson=require(_0x506c('0x5'));var BPromise=require('bluebird');var logger=require(_0x506c('0x6'))('schedule');var db=require(_0x506c('0x7'))['db'];var analyticCustomReportController=require('../../api/analyticCustomReport/analyticCustomReport.controller');var analyticDefaultReportController=require(_0x506c('0x8'));var client=jayson[_0x506c('0x9')]['http']({'port':0x232b});var manager=new CronJobManager();function handleSendEmail(_0x26026d,_0x2ea253){return function(){logger[_0x506c('0xa')]('Try\x20to\x20send\x20a\x20mail\x20to',_0x26026d[_0x506c('0xb')]);var _0x41edd3=!![];var _0x466834=_0x26026d[_0x506c('0xc')][_0x506c('0xd')]();var _0x3f9547={'account':_0x466834,'message':{'from':util[_0x506c('0xe')]('\x22%s\x22\x20<%s>',_0x26026d[_0x506c('0xc')][_0x506c('0xf')],_0x26026d[_0x506c('0xc')][_0x506c('0xb')]||_0x26026d['MailAccount']['Smtp']['user']),'to':_0x26026d[_0x506c('0xb')],'cc':_0x26026d['cc'],'bcc':_0x26026d[_0x506c('0x10')],'subject':util[_0x506c('0xe')](_0x506c('0x11'),_0x2ea253[_0x506c('0xf')],_0x26026d[_0x506c('0x12')],_0x26026d[_0x506c('0x13')])}};var _0x3bbe8b=path['join'](__dirname,_0x506c('0x14'));var _0x4413c0=_0x2ea253[_0x506c('0x15')];var _0x1c6755=util[_0x506c('0xe')]('%s.%s',path[_0x506c('0x16')](_0x2ea253['savename'],path[_0x506c('0x17')](_0x2ea253[_0x506c('0x15')])),_0x506c('0x18'));var _0x14279c=path[_0x506c('0x19')](_0x3bbe8b,_0x4413c0);var _0x4b0141=path[_0x506c('0x19')](_0x3bbe8b,_0x1c6755);if(fs[_0x506c('0x1a')](_0x14279c)){_0x2ea253[_0x506c('0x1b')]=_0x506c('0x1c');_0x3f9547[_0x506c('0x1d')][_0x506c('0x1e')]=[{'filename':_0x4413c0,'path':_0x14279c}];_0x3f9547[_0x506c('0x1d')][_0x506c('0x1f')]=util[_0x506c('0xe')](_0x506c('0x20'),JSON[_0x506c('0x21')](_0x2ea253,null,0x2));}else if(fs[_0x506c('0x1a')](_0x4b0141)){_0x2ea253['status']=_0x506c('0x1c');_0x3f9547[_0x506c('0x1d')]['attachments']=[{'filename':_0x1c6755,'path':_0x4b0141}];}else{_0x3f9547[_0x506c('0x1d')][_0x506c('0x1f')]=_0x506c('0x22');if(!_0x26026d[_0x506c('0x23')]){_0x41edd3=![];logger['info'](_0x506c('0x24'));}}if(_0x41edd3){return client[_0x506c('0x25')](_0x506c('0x26'),_0x3f9547)[_0x506c('0x27')](function(_0xb2f166){if(_0xb2f166[_0x506c('0x28')]){return logger[_0x506c('0x28')](_0x506c('0x29'),JSON[_0x506c('0x21')](_0xb2f166));}return logger['info'](_0x506c('0x2a'));})[_0x506c('0x2b')](function(_0x2c38b3){return logger[_0x506c('0x28')]('error\x20mail',JSON[_0x506c('0x21')](_0x2c38b3));});}};}function handleError(){return function(_0x59e724){return logger['error'](JSON[_0x506c('0x21')](_0x59e724));};}function handleResult(_0x261467){return function(_0x747d23){logger['info']('data',JSON[_0x506c('0x21')](_0x747d23));if(_0x261467[_0x506c('0xc')]&&_0x261467[_0x506c('0xc')][_0x506c('0x2c')]&&!_[_0x506c('0x2d')](_0x261467[_0x506c('0xb')])){setTimeout(handleSendEmail(_0x261467,_0x747d23),0x3c*0x3e8);}};}function handleJob(_0x44b9a0){return function(){try{if(_['isNil'](_0x44b9a0[_0x506c('0x12')])){return logger[_0x506c('0xa')](_0x506c('0x2e'));}if(_[_0x506c('0x2d')](_0x44b9a0[_0x506c('0x13')])){return logger[_0x506c('0xa')](_0x506c('0x2f'));}var _0x53888c={'startDate':moment()[_0x506c('0x30')](_0x44b9a0['subtractNumber'],_0x44b9a0[_0x506c('0x13')])[_0x506c('0xe')](_0x506c('0x31')),'endDate':moment()[_0x506c('0xe')](_0x506c('0x31')),'type':_0x506c('0x32'),'output':_0x44b9a0['output'],'name':_0x44b9a0[_0x506c('0xf')]};if(!_[_0x506c('0x2d')](_0x44b9a0[_0x506c('0x33')])){logger[_0x506c('0xa')]('exec\x20defaul\x20report\x20id:%s',_0x44b9a0[_0x506c('0x33')]);return analyticDefaultReportController['runReport']({'id':_0x44b9a0[_0x506c('0x33')]},_0x53888c)['then'](handleResult(_0x44b9a0))[_0x506c('0x2b')](handleError());}if(!_['isNil'](_0x44b9a0[_0x506c('0x34')])){logger['info']('exec\x20custom\x20report\x20id:%s',_0x44b9a0[_0x506c('0x34')]);return analyticCustomReportController['runReport']({'id':_0x44b9a0[_0x506c('0x34')]},_0x53888c)['then'](handleResult(_0x44b9a0))[_0x506c('0x2b')](handleError());}}catch(_0x2dd918){logger[_0x506c('0x28')](JSON['stringify'](_0x2dd918));}return logger['info']('no\x20report\x20id');};}function getJobs(_0x2c4334){var _0x196ce7={};if(_0x2c4334){_0x196ce7['id']=_0x2c4334;}return db['Schedule'][_0x506c('0x35')]({'where':_0x196ce7,'include':[{'model':db[_0x506c('0xc')],'attributes':['id','name',_0x506c('0xb')],'include':[{'model':db[_0x506c('0x36')],'as':'Smtp','include':[{'model':db['CloudProvider'],'as':_0x506c('0x37')}]}]}]})[_0x506c('0x27')](function(_0x1918fe){var _0x355284=_[_0x506c('0x38')](manager[_0x506c('0x39')]);var _0x36ddea=_[_0x506c('0x3a')](_0x1918fe,function(_0x2ff40c){return _0x2ff40c['id']['toString']();});var _0x1a11e2=_['keyBy'](_0x1918fe,function(_0x5463f6){return _0x5463f6['id'][_0x506c('0x3b')]();});var _0x140e2f=_0x2c4334?_0x36ddea:_[_0x506c('0x3c')](_0x36ddea,_0x355284);var _0x460f1b=_['intersection'](_0x36ddea,_0x355284);var _0x222a94=_[_0x506c('0x3c')](_0x355284,_0x36ddea);var _0x8772f5;var _0x56be7e;for(_0x8772f5=0x0;_0x8772f5<_0x222a94[_0x506c('0x3d')]&&!_0x2c4334;_0x8772f5+=0x1){_0x56be7e=_0x222a94[_0x8772f5]['toString']();if(manager['exists'](_0x56be7e)){manager[_0x506c('0x3e')](_0x56be7e);manager[_0x506c('0x3f')](_0x56be7e);logger['info'](_0x506c('0x40'),_0x56be7e);}}logger['info'](_0x506c('0x41'),JSON[_0x506c('0x21')](_0x140e2f));for(_0x8772f5=0x0;_0x8772f5<_0x140e2f[_0x506c('0x3d')];_0x8772f5+=0x1){_0x56be7e=_0x140e2f[_0x8772f5][_0x506c('0x3b')]();logger[_0x506c('0xa')](_0x506c('0x42'),_0x56be7e);if(_0x2c4334){logger[_0x506c('0xa')](_0x506c('0x43'),_0x2c4334);logger[_0x506c('0xa')](JSON['stringify'](_0x1a11e2[_0x56be7e]));BPromise[_0x506c('0x44')]()[_0x506c('0x27')](handleJob(_0x1a11e2[_0x56be7e]));logger[_0x506c('0xa')](_0x506c('0x45'),_0x1a11e2[_0x56be7e][_0x506c('0xf')],_0x1a11e2[_0x56be7e]['cron']);}else if(_0x1a11e2[_0x56be7e][_0x506c('0x46')]&&_0x1a11e2[_0x56be7e][_0x506c('0x47')]&&moment()[_0x506c('0x48')](_0x1a11e2[_0x56be7e][_0x506c('0x49')],_0x1a11e2[_0x56be7e]['endAt'])){manager[_0x506c('0x4a')](_0x56be7e,_0x1a11e2[_0x56be7e][_0x506c('0x46')],handleJob(_0x1a11e2[_0x56be7e]));manager[_0x506c('0x4b')](_0x56be7e);logger['info'](_0x506c('0x4c'),_0x1a11e2[_0x56be7e][_0x506c('0xf')],_0x1a11e2[_0x56be7e][_0x506c('0x46')]);}else if(manager['exists'](_0x56be7e)){manager['stop'](_0x56be7e);manager['deleteJob'](_0x56be7e);logger['info'](_0x506c('0x4d'),_0x1a11e2[_0x56be7e][_0x506c('0xf')],_0x1a11e2[_0x56be7e][_0x506c('0x46')]);}}for(_0x8772f5=0x0,_0x56be7e;_0x8772f5<_0x460f1b['length']&&!_0x2c4334;_0x8772f5+=0x1){_0x56be7e=_0x460f1b[_0x8772f5][_0x506c('0x3b')]();if(manager[_0x506c('0x4e')](_0x56be7e)){if(_0x1a11e2[_0x56be7e][_0x506c('0x46')]&&_0x1a11e2[_0x56be7e]['active']&&moment()['isBetween'](_0x1a11e2[_0x56be7e][_0x506c('0x49')],_0x1a11e2[_0x56be7e]['endAt'])){manager[_0x506c('0x4f')](_0x56be7e,_0x1a11e2[_0x56be7e][_0x506c('0x46')],handleJob(_0x1a11e2[_0x56be7e]));logger[_0x506c('0xa')]('update\x20cron',_0x1a11e2[_0x56be7e]['name'],_0x1a11e2[_0x56be7e][_0x506c('0x46')]);}else{manager[_0x506c('0x3e')](_0x56be7e);manager[_0x506c('0x3f')](_0x56be7e);logger['info'](_0x506c('0x4d'),_0x1a11e2[_0x56be7e][_0x506c('0xf')],_0x1a11e2[_0x56be7e][_0x506c('0x46')]);}}}})['catch'](function(_0x42272b){logger['error'](JSON[_0x506c('0x21')](_0x42272b));});}exports[_0x506c('0x50')]=function(_0xc0f41c){return getJobs(_0xc0f41c);};exports['start']=function(){setInterval(function(){return getJobs();},0x3c*0x3e8);return getJobs();};
\ No newline at end of file
+var _0x5810=['runReport','CustomReportId','Schedule','findAll','CloudProvider','keys','jobs','map','keyBy','difference','length','toString','exists','stop','deleteJob','delete\x20cron','toRun','index','resolve','run\x20job','cron','active','isBetween','start','add\x20cron','stop\x20cron','update','update\x20cron','run','util','lodash','moment','cron-job-manager','jayson/promise','bluebird','../logger','../../mysqldb','../../api/analyticCustomReport/analyticCustomReport.controller','client','http','info','Try\x20to\x20send\x20a\x20mail\x20to','email','MailAccount','format','\x22%s\x22\x20<%s>','user','bcc','Report\x20%s\x20last\x20%s\x20%s','name','subtractNumber','subtractUnit','join','../../files/reports','%s.%s','basename','savename','existsSync','status','Sent','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','Report\x20empty\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20–\x20please\x20do\x20not\x20reply\x20to\x20this\x20email.\x0a\x0a','empty\x20file,\x20email\x20not\x20sent','request','SendMail','then','error','error\x20mail','email\x20sent','catch','data','Smtp','isNil','subtract','YYYY-MM-DD\x20HH:mm:ss','scheduled','output','DefaultReportId','exec\x20defaul\x20report\x20id:%s'];(function(_0x3b7743,_0x4a832a){var _0x4cd81f=function(_0x3f921d){while(--_0x3f921d){_0x3b7743['push'](_0x3b7743['shift']());}};_0x4cd81f(++_0x4a832a);}(_0x5810,0x70));var _0x0581=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0x5810[_0xfae23b];return _0x200640;};'use strict';var fs=require('fs');var util=require(_0x0581('0x0'));var path=require('path');var _=require(_0x0581('0x1'));var moment=require(_0x0581('0x2'));var CronJobManager=require(_0x0581('0x3'));var jayson=require(_0x0581('0x4'));var BPromise=require(_0x0581('0x5'));var logger=require(_0x0581('0x6'))('schedule');var db=require(_0x0581('0x7'))['db'];var analyticCustomReportController=require(_0x0581('0x8'));var analyticDefaultReportController=require('../../api/analyticDefaultReport/analyticDefaultReport.controller');var client=jayson[_0x0581('0x9')][_0x0581('0xa')]({'port':0x232b});var manager=new CronJobManager();function handleSendEmail(_0x179db6,_0x457357){return function(){logger[_0x0581('0xb')](_0x0581('0xc'),_0x179db6[_0x0581('0xd')]);var _0x5cdddf=!![];var _0x56ba1a=_0x179db6[_0x0581('0xe')]['getSmtpOptions']();var _0x390703={'account':_0x56ba1a,'message':{'from':util[_0x0581('0xf')](_0x0581('0x10'),_0x179db6['MailAccount']['name'],_0x179db6['MailAccount'][_0x0581('0xd')]||_0x179db6[_0x0581('0xe')]['Smtp'][_0x0581('0x11')]),'to':_0x179db6[_0x0581('0xd')],'cc':_0x179db6['cc'],'bcc':_0x179db6[_0x0581('0x12')],'subject':util['format'](_0x0581('0x13'),_0x457357[_0x0581('0x14')],_0x179db6[_0x0581('0x15')],_0x179db6[_0x0581('0x16')])}};var _0x59a9b1=path[_0x0581('0x17')](__dirname,_0x0581('0x18'));var _0x3f74ae=_0x457357['savename'];var _0x2baa0c=util[_0x0581('0xf')](_0x0581('0x19'),path[_0x0581('0x1a')](_0x457357[_0x0581('0x1b')],path['extname'](_0x457357['savename'])),'zip');var _0x132275=path[_0x0581('0x17')](_0x59a9b1,_0x3f74ae);var _0x27d224=path[_0x0581('0x17')](_0x59a9b1,_0x2baa0c);if(fs[_0x0581('0x1c')](_0x132275)){_0x457357[_0x0581('0x1d')]=_0x0581('0x1e');_0x390703['message'][_0x0581('0x1f')]=[{'filename':_0x3f74ae,'path':_0x132275}];_0x390703[_0x0581('0x20')][_0x0581('0x21')]=util[_0x0581('0xf')](_0x0581('0x22'),JSON[_0x0581('0x23')](_0x457357,null,0x2));}else if(fs[_0x0581('0x1c')](_0x27d224)){_0x457357[_0x0581('0x1d')]=_0x0581('0x1e');_0x390703[_0x0581('0x20')][_0x0581('0x1f')]=[{'filename':_0x2baa0c,'path':_0x27d224}];}else{_0x390703[_0x0581('0x20')][_0x0581('0x21')]=_0x0581('0x24');if(!_0x179db6['sendIfEmpty']){_0x5cdddf=![];logger[_0x0581('0xb')](_0x0581('0x25'));}}if(_0x5cdddf){return client[_0x0581('0x26')](_0x0581('0x27'),_0x390703)[_0x0581('0x28')](function(_0x126db2){if(_0x126db2[_0x0581('0x29')]){return logger[_0x0581('0x29')](_0x0581('0x2a'),JSON[_0x0581('0x23')](_0x126db2));}return logger['info'](_0x0581('0x2b'));})[_0x0581('0x2c')](function(_0x1ec9e4){return logger[_0x0581('0x29')](_0x0581('0x2a'),JSON[_0x0581('0x23')](_0x1ec9e4));});}};}function handleError(){return function(_0x3a00be){return logger[_0x0581('0x29')](JSON[_0x0581('0x23')](_0x3a00be));};}function handleResult(_0xa7d08d){return function(_0x27a78c){logger[_0x0581('0xb')](_0x0581('0x2d'),JSON[_0x0581('0x23')](_0x27a78c));if(_0xa7d08d[_0x0581('0xe')]&&_0xa7d08d['MailAccount'][_0x0581('0x2e')]&&!_[_0x0581('0x2f')](_0xa7d08d[_0x0581('0xd')])){setTimeout(handleSendEmail(_0xa7d08d,_0x27a78c),0x3c*0x3e8);}};}function handleJob(_0x952551){return function(){try{if(_[_0x0581('0x2f')](_0x952551[_0x0581('0x15')])){return logger['info']('subtractNumber\x20null\x20or\x20undefined');}if(_[_0x0581('0x2f')](_0x952551[_0x0581('0x16')])){return logger[_0x0581('0xb')]('subtractUnit\x20null\x20or\x20undefined');}var _0x323031={'startDate':moment()[_0x0581('0x30')](_0x952551[_0x0581('0x15')],_0x952551[_0x0581('0x16')])[_0x0581('0xf')]('YYYY-MM-DD\x20HH:mm:ss'),'endDate':moment()['format'](_0x0581('0x31')),'type':_0x0581('0x32'),'output':_0x952551[_0x0581('0x33')],'name':_0x952551[_0x0581('0x14')]};if(!_[_0x0581('0x2f')](_0x952551[_0x0581('0x34')])){logger[_0x0581('0xb')](_0x0581('0x35'),_0x952551[_0x0581('0x34')]);return analyticDefaultReportController[_0x0581('0x36')]({'id':_0x952551[_0x0581('0x34')]},_0x323031)[_0x0581('0x28')](handleResult(_0x952551))[_0x0581('0x2c')](handleError());}if(!_[_0x0581('0x2f')](_0x952551[_0x0581('0x37')])){logger[_0x0581('0xb')]('exec\x20custom\x20report\x20id:%s',_0x952551[_0x0581('0x37')]);return analyticCustomReportController[_0x0581('0x36')]({'id':_0x952551[_0x0581('0x37')]},_0x323031)[_0x0581('0x28')](handleResult(_0x952551))[_0x0581('0x2c')](handleError());}}catch(_0x5e6b4f){logger[_0x0581('0x29')](JSON[_0x0581('0x23')](_0x5e6b4f));}return logger[_0x0581('0xb')]('no\x20report\x20id');};}function getJobs(_0xd394cb){var _0x3cfc25={};if(_0xd394cb){_0x3cfc25['id']=_0xd394cb;}return db[_0x0581('0x38')][_0x0581('0x39')]({'where':_0x3cfc25,'include':[{'model':db[_0x0581('0xe')],'attributes':['id','name',_0x0581('0xd')],'include':[{'model':db['MailServerOut'],'as':_0x0581('0x2e'),'include':[{'model':db['CloudProvider'],'as':_0x0581('0x3a')}]}]}]})['then'](function(_0x472513){var _0x4ca479=_[_0x0581('0x3b')](manager[_0x0581('0x3c')]);var _0x29be36=_[_0x0581('0x3d')](_0x472513,function(_0x3be394){return _0x3be394['id']['toString']();});var _0x171bc0=_[_0x0581('0x3e')](_0x472513,function(_0x1983cb){return _0x1983cb['id']['toString']();});var _0x15f299=_0xd394cb?_0x29be36:_[_0x0581('0x3f')](_0x29be36,_0x4ca479);var _0x122d58=_['intersection'](_0x29be36,_0x4ca479);var _0x131719=_[_0x0581('0x3f')](_0x4ca479,_0x29be36);var _0x492b8f;var _0x83107e;for(_0x492b8f=0x0;_0x492b8f<_0x131719[_0x0581('0x40')]&&!_0xd394cb;_0x492b8f+=0x1){_0x83107e=_0x131719[_0x492b8f][_0x0581('0x41')]();if(manager[_0x0581('0x42')](_0x83107e)){manager[_0x0581('0x43')](_0x83107e);manager[_0x0581('0x44')](_0x83107e);logger[_0x0581('0xb')](_0x0581('0x45'),_0x83107e);}}logger[_0x0581('0xb')](_0x0581('0x46'),JSON['stringify'](_0x15f299));for(_0x492b8f=0x0;_0x492b8f<_0x15f299[_0x0581('0x40')];_0x492b8f+=0x1){_0x83107e=_0x15f299[_0x492b8f][_0x0581('0x41')]();logger[_0x0581('0xb')](_0x0581('0x47'),_0x83107e);if(_0xd394cb){logger[_0x0581('0xb')]('my\x20id',_0xd394cb);logger[_0x0581('0xb')](JSON[_0x0581('0x23')](_0x171bc0[_0x83107e]));BPromise[_0x0581('0x48')]()[_0x0581('0x28')](handleJob(_0x171bc0[_0x83107e]));logger[_0x0581('0xb')](_0x0581('0x49'),_0x171bc0[_0x83107e]['name'],_0x171bc0[_0x83107e][_0x0581('0x4a')]);}else if(_0x171bc0[_0x83107e][_0x0581('0x4a')]&&_0x171bc0[_0x83107e][_0x0581('0x4b')]&&moment()[_0x0581('0x4c')](_0x171bc0[_0x83107e]['startAt'],_0x171bc0[_0x83107e]['endAt'])){manager['add'](_0x83107e,_0x171bc0[_0x83107e][_0x0581('0x4a')],handleJob(_0x171bc0[_0x83107e]));manager[_0x0581('0x4d')](_0x83107e);logger[_0x0581('0xb')](_0x0581('0x4e'),_0x171bc0[_0x83107e]['name'],_0x171bc0[_0x83107e][_0x0581('0x4a')]);}else if(manager['exists'](_0x83107e)){manager['stop'](_0x83107e);manager[_0x0581('0x44')](_0x83107e);logger[_0x0581('0xb')](_0x0581('0x4f'),_0x171bc0[_0x83107e][_0x0581('0x14')],_0x171bc0[_0x83107e][_0x0581('0x4a')]);}}for(_0x492b8f=0x0,_0x83107e;_0x492b8f<_0x122d58[_0x0581('0x40')]&&!_0xd394cb;_0x492b8f+=0x1){_0x83107e=_0x122d58[_0x492b8f]['toString']();if(manager[_0x0581('0x42')](_0x83107e)){if(_0x171bc0[_0x83107e][_0x0581('0x4a')]&&_0x171bc0[_0x83107e][_0x0581('0x4b')]&&moment()[_0x0581('0x4c')](_0x171bc0[_0x83107e]['startAt'],_0x171bc0[_0x83107e]['endAt'])){manager[_0x0581('0x50')](_0x83107e,_0x171bc0[_0x83107e][_0x0581('0x4a')],handleJob(_0x171bc0[_0x83107e]));logger[_0x0581('0xb')](_0x0581('0x51'),_0x171bc0[_0x83107e][_0x0581('0x14')],_0x171bc0[_0x83107e][_0x0581('0x4a')]);}else{manager['stop'](_0x83107e);manager[_0x0581('0x44')](_0x83107e);logger['info'](_0x0581('0x4f'),_0x171bc0[_0x83107e][_0x0581('0x14')],_0x171bc0[_0x83107e][_0x0581('0x4a')]);}}}})[_0x0581('0x2c')](function(_0x2389b6){logger[_0x0581('0x29')](JSON[_0x0581('0x23')](_0x2389b6));});}exports[_0x0581('0x52')]=function(_0x29ad87){return getJobs(_0x29ad87);};exports[_0x0581('0x4d')]=function(){setInterval(function(){return getJobs();},0x3c*0x3e8);return getJobs();};
\ No newline at end of file
index 25d9dc0..966d6da 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3aa2=['FailureReason','CloudProvider','[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis','Negative','Neutral','COMPLETED','name','SequelizeValidationError','error','[RECORDING:%d]\x20Error\x20running\x20Transcribe\x20&\x20Sentiment\x20Analysis','VoiceRecording','findAll','IN_PROGRESS','No\x20transcribe\x20job\x20to\x20check','Setting','Settings\x20not\x20available','transcribeAccountId','Transcribe\x20not\x20configured','Cloud\x20Provider\x20not\x20configured','forEach','push','catch','inspect','lodash','aws-sdk','util','../../config/logger','transcribe','TranscribeService','getTranscriptionJob','Comprehend','detectSentiment','substring','info','format','[RECORDING:%d]\x20Get\x20status\x20for\x20transcript\x20job\x20(%s)','transcribeName','data1','transcribeRegion','[RECORDING:%d]\x20Status\x20of\x20transcript\x20job\x20(%s):\x20%s','TranscriptionJob','fileText','TranscriptionJobStatus','Transcript','TranscriptFileUri','then','[RECORDING:%d]\x20Transcript\x20downloaded','results','transcripts','length','transcript','update','tempSentiment','Sequelize','ValidationError','Sentiment\x20Analysis\x20not\x20requested','sentiment','sentimentAccountId','sentimentRegion','language','bucket','Sentiment\x20Analysis\x20not\x20configured','Transcript\x20not\x20available','findOne','Cloud\x20Provider\x20not\x20available','data2','[RECORDING:%d]\x20Sentiment\x20Analysis\x20available','Sentiment','SentimentScore','Positive','Mixed','[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated','FAILED'];(function(_0x45319d,_0x5a0653){var _0x20f076=function(_0x3da82c){while(--_0x3da82c){_0x45319d['push'](_0x45319d['shift']());}};_0x20f076(++_0x5a0653);}(_0x3aa2,0x13b));var _0x23aa=function(_0x5880d8,_0x30b0a5){_0x5880d8=_0x5880d8-0x0;var _0x88264a=_0x3aa2[_0x5880d8];return _0x88264a;};var _=require(_0x23aa('0x0'));var AWS=require(_0x23aa('0x1'));var rp=require('request-promise');var util=require(_0x23aa('0x2'));var BPromise=require('bluebird');var db=require('../../mysqldb')['db'];var logger=require(_0x23aa('0x3'))(_0x23aa('0x4'));function getTranscriptionJob(_0x556204,_0x38c0ab,_0x5b9038,_0x34a195){return new Promise(function(_0x24a89d,_0x4868c2){var _0x461bde=new AWS[(_0x23aa('0x5'))]({'accessKeyId':_0x38c0ab,'secretAccessKey':_0x556204,'region':_0x5b9038});_0x461bde[_0x23aa('0x6')]({'TranscriptionJobName':_0x34a195},function(_0x5f3efd,_0x41bfc5){if(_0x5f3efd){return _0x4868c2(_0x5f3efd);}else{return _0x24a89d(_0x41bfc5);}});});}function sentiment(_0x3e2a05,_0x23cd87,_0x5c2595,_0x4b8b1a,_0xb70adc){return new Promise(function(_0x5100f4,_0x3f9456){var _0x155c20=new AWS[(_0x23aa('0x7'))]({'accessKeyId':_0x23cd87,'secretAccessKey':_0x3e2a05,'region':_0x5c2595});_0x155c20[_0x23aa('0x8')]({'Text':_0x4b8b1a,'LanguageCode':_0xb70adc[_0x23aa('0x9')](0x0,0x2)},function(_0x459412,_0x402b42){if(_0x459412){return _0x3f9456(_0x459412);}else{return _0x5100f4(_0x402b42);}});});}function checkTranscribeJob(_0x5ed160,_0x4fdd70,_0x4f9c72){var _0x1f71ef;return new BPromise(function(_0x1c664b,_0x109649){logger[_0x23aa('0xa')](util[_0x23aa('0xb')](_0x23aa('0xc'),_0x5ed160['id'],_0x5ed160[_0x23aa('0xd')]));return getTranscriptionJob(_0x4f9c72[_0x23aa('0xe')],_0x4f9c72['data2'],_0x4fdd70[_0x23aa('0xf')],_0x5ed160['transcribeName'])['then'](function(_0x3cbbde){logger[_0x23aa('0xa')](util[_0x23aa('0xb')](_0x23aa('0x10'),_0x5ed160['id'],_0x5ed160[_0x23aa('0xd')],_0x3cbbde[_0x23aa('0x11')]['TranscriptionJobStatus']));if(!_0x5ed160[_0x23aa('0x12')]){switch(_0x3cbbde[_0x23aa('0x11')]['TranscriptionJobStatus']){case'COMPLETED':var _0x4d660f={'transcribeStatus':_0x3cbbde['TranscriptionJob'][_0x23aa('0x13')],'fileUri':_0x3cbbde[_0x23aa('0x11')][_0x23aa('0x14')]['TranscriptFileUri']};logger[_0x23aa('0xa')](util[_0x23aa('0xb')]('[RECORDING:%d]\x20Get\x20transcript',_0x5ed160['id']));return rp({'uri':_0x3cbbde[_0x23aa('0x11')][_0x23aa('0x14')][_0x23aa('0x15')],'json':!![]})[_0x23aa('0x16')](function(_0x106bde){logger[_0x23aa('0xa')](util[_0x23aa('0xb')](_0x23aa('0x17'),_0x5ed160['id']));if(_0x106bde&&_0x106bde[_0x23aa('0x18')]&&_0x106bde['results'][_0x23aa('0x19')]&&_0x106bde[_0x23aa('0x18')][_0x23aa('0x19')][_0x23aa('0x1a')]){_0x4d660f['fileText']='';for(var _0x23771b=0x0;_0x23771b<_0x106bde['results'][_0x23aa('0x19')][_0x23aa('0x1a')];_0x23771b++){_0x4d660f[_0x23aa('0x12')]+=_0x106bde['results'][_0x23aa('0x19')][_0x23771b][_0x23aa('0x1b')]+'';}}return _0x5ed160[_0x23aa('0x1c')](_0x4d660f);})[_0x23aa('0x16')](function(){logger[_0x23aa('0xa')](util['format']('[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated',_0x5ed160['id']));if(!_0x5ed160[_0x23aa('0x1d')]){throw new db[(_0x23aa('0x1e'))][(_0x23aa('0x1f'))](_0x23aa('0x20'));}if(!_0x4fdd70[_0x23aa('0x21')]||!_0x4fdd70[_0x23aa('0x22')]||!_0x4fdd70[_0x23aa('0x23')]||!_0x4fdd70[_0x23aa('0x24')]||!_0x4fdd70[_0x23aa('0x25')]){throw new db[(_0x23aa('0x1e'))][(_0x23aa('0x1f'))](_0x23aa('0x26'));}if(!_0x4d660f[_0x23aa('0x12')]){throw new Error(_0x23aa('0x27'));}if(_0x4fdd70['sentimentAccountId']===_0x4f9c72['id']){return _0x4f9c72;}else{return db['CloudProvider'][_0x23aa('0x28')]({'where':{'id':_settings[_0x23aa('0x22')]}});}})[_0x23aa('0x16')](function(_0x49f23d){if(!_0x49f23d){throw new db['Sequelize'][(_0x23aa('0x1f'))](_0x23aa('0x29'));}if(!_0x49f23d[_0x23aa('0xe')]||!_0x49f23d['data2']){throw new db[(_0x23aa('0x1e'))][(_0x23aa('0x1f'))]('Cloud\x20Provider\x20not\x20configured');}_0x1f71ef=_0x49f23d;logger[_0x23aa('0xa')](util[_0x23aa('0xb')]('[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis',_0x5ed160['id']));return sentiment(_0x1f71ef[_0x23aa('0xe')],_0x1f71ef[_0x23aa('0x2a')],_0x4fdd70['sentimentRegion'],_0x4d660f[_0x23aa('0x12')],_0x4fdd70[_0x23aa('0x24')]);})[_0x23aa('0x16')](function(_0x230a77){logger[_0x23aa('0xa')](util[_0x23aa('0xb')](_0x23aa('0x2b'),_0x5ed160['id']));return _0x5ed160['update']({'sentiment':_0x230a77[_0x23aa('0x2c')],'sPositive':_0x230a77[_0x23aa('0x2d')][_0x23aa('0x2e')],'sNegative':_0x230a77['SentimentScore']['Negative'],'sMixed':_0x230a77[_0x23aa('0x2d')][_0x23aa('0x2f')],'sNeutral':_0x230a77[_0x23aa('0x2d')]['Neutral']});})[_0x23aa('0x16')](function(){logger[_0x23aa('0xa')](util[_0x23aa('0xb')](_0x23aa('0x30'),_0x5ed160['id']));_0x1c664b();});case _0x23aa('0x31'):return _0x5ed160[_0x23aa('0x1c')]({'transcribeStatus':_0x23aa('0x31'),'failureReason':_0x3cbbde[_0x23aa('0x11')][_0x23aa('0x32')]})[_0x23aa('0x16')](function(){logger[_0x23aa('0xa')](util[_0x23aa('0xb')]('[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated',_0x5ed160['id']));_0x1c664b();});default:logger['info'](util[_0x23aa('0xb')]('[RECORDING:%d]\x20Transcript\x20Job\x20status\x20not\x20managed',_0x5ed160['id']));break;}}else{return BPromise['resolve']()[_0x23aa('0x16')](function(){if(!_0x5ed160['tempSentiment']){throw new db[(_0x23aa('0x1e'))][(_0x23aa('0x1f'))](_0x23aa('0x20'));}if(!_0x4fdd70['sentiment']||!_0x4fdd70[_0x23aa('0x22')]||!_0x4fdd70[_0x23aa('0x23')]||!_0x4fdd70[_0x23aa('0x24')]||!_0x4fdd70[_0x23aa('0x25')]){throw new db[(_0x23aa('0x1e'))][(_0x23aa('0x1f'))](_0x23aa('0x26'));}if(!_0x5ed160['fileText']){throw new Error(_0x23aa('0x27'));}if(_0x4fdd70['sentimentAccountId']===_0x4f9c72['id']){return _0x4f9c72;}else{return db[_0x23aa('0x33')]['findOne']({'where':{'id':_settings['sentimentAccountId']}});}})['then'](function(_0x284b94){if(!_0x284b94){throw new db['Sequelize']['ValidationError'](_0x23aa('0x29'));}if(!_0x284b94[_0x23aa('0xe')]||!_0x284b94[_0x23aa('0x2a')]){throw new db[(_0x23aa('0x1e'))][(_0x23aa('0x1f'))]('Cloud\x20Provider\x20not\x20configured');}_0x1f71ef=_0x284b94;logger['info'](util[_0x23aa('0xb')](_0x23aa('0x34'),_0x5ed160['id']));return sentiment(_0x1f71ef[_0x23aa('0xe')],_0x1f71ef['data2'],_0x4fdd70[_0x23aa('0x23')],_0x5ed160['fileText'],_0x4fdd70[_0x23aa('0x24')]);})[_0x23aa('0x16')](function(_0x26d37d){logger['info'](util[_0x23aa('0xb')](_0x23aa('0x2b'),_0x5ed160['id']));return _0x5ed160['update']({'sentiment':_0x26d37d[_0x23aa('0x2c')],'sPositive':_0x26d37d['SentimentScore'][_0x23aa('0x2e')],'sNegative':_0x26d37d[_0x23aa('0x2d')][_0x23aa('0x35')],'sMixed':_0x26d37d[_0x23aa('0x2d')][_0x23aa('0x2f')],'sNeutral':_0x26d37d['SentimentScore'][_0x23aa('0x36')],'transcribeStatus':_0x23aa('0x37')});})['then'](function(){logger[_0x23aa('0xa')](util[_0x23aa('0xb')](_0x23aa('0x30'),_0x5ed160['id']));_0x1c664b();});}})['catch'](function(_0xf69307){if(_0xf69307){if(!_0xf69307['name']||_0xf69307[_0x23aa('0x38')]!==_0x23aa('0x39')){logger[_0x23aa('0x3a')](util[_0x23aa('0xb')](_0x23aa('0x3b'),_0x5ed160['id']),util['inspect'](_0xf69307,{'showHidden':![],'depth':null}));}}_0x1c664b();});});}function checkTranscribe(){var _0x3b8ec3;var _0x72f912;var _0x5a6653;return db[_0x23aa('0x3c')][_0x23aa('0x3d')]({'where':{'transcribeStatus':_0x23aa('0x3e')}})[_0x23aa('0x16')](function(_0x29985c){if(!_0x29985c||!_0x29985c['length']){throw new db[(_0x23aa('0x1e'))][(_0x23aa('0x1f'))](_0x23aa('0x3f'));}_0x3b8ec3=_0x29985c;return db[_0x23aa('0x40')][_0x23aa('0x28')]({'where':{'id':0x1}});})[_0x23aa('0x16')](function(_0x318fb3){if(!_0x318fb3){throw new db[(_0x23aa('0x1e'))]['ValidationError'](_0x23aa('0x41'));}_0x72f912=_0x318fb3;if(!_0x72f912[_0x23aa('0x4')]||!_0x72f912[_0x23aa('0x42')]||!_0x72f912[_0x23aa('0xf')]||!_0x72f912['language']||!_0x72f912[_0x23aa('0x25')]){throw new db[(_0x23aa('0x1e'))][(_0x23aa('0x1f'))](_0x23aa('0x43'));}return db['CloudProvider']['findOne']({'where':{'id':_0x72f912[_0x23aa('0x42')]}});})[_0x23aa('0x16')](function(_0x3a9c00){if(!_0x3a9c00){throw new db[(_0x23aa('0x1e'))][(_0x23aa('0x1f'))](_0x23aa('0x29'));}if(!_0x3a9c00[_0x23aa('0xe')]||!_0x3a9c00[_0x23aa('0x2a')]){throw new db[(_0x23aa('0x1e'))][(_0x23aa('0x1f'))](_0x23aa('0x44'));}_0x5a6653=_0x3a9c00;var _0x243634=[];_0x3b8ec3[_0x23aa('0x45')](function(_0x1effd3){_0x243634[_0x23aa('0x46')](checkTranscribeJob(_0x1effd3,_0x72f912,_0x5a6653));});return BPromise['all'](_0x243634);})[_0x23aa('0x47')](function(_0x72d858){if(_0x72d858){if(!_0x72d858[_0x23aa('0x38')]||_0x72d858[_0x23aa('0x38')]!==_0x23aa('0x39')){logger[_0x23aa('0x3a')](util[_0x23aa('0x48')](_0x72d858,{'showHidden':![],'depth':null}));}}});}exports['start']=function(){setInterval(function(){return checkTranscribe();},0x3c*0x3e8);return checkTranscribe();};
\ No newline at end of file
+var _0x30fc=['Negative','Mixed','FAILED','FailureReason','[RECORDING:%d]\x20Transcript\x20Job\x20status\x20not\x20managed','resolve','language','Sentiment\x20Analysis\x20not\x20configured','Cloud\x20Provider\x20not\x20configured','Sentiment','Neutral','COMPLETED','catch','name','SequelizeValidationError','[RECORDING:%d]\x20Error\x20running\x20Transcribe\x20&\x20Sentiment\x20Analysis','inspect','VoiceRecording','findAll','Settings\x20not\x20available','transcribe','forEach','push','all','error','start','lodash','aws-sdk','util','bluebird','../../mysqldb','../../config/logger','TranscribeService','getTranscriptionJob','Comprehend','detectSentiment','substring','info','[RECORDING:%d]\x20Get\x20status\x20for\x20transcript\x20job\x20(%s)','transcribeName','data1','data2','transcribeRegion','then','format','[RECORDING:%d]\x20Status\x20of\x20transcript\x20job\x20(%s):\x20%s','TranscriptionJob','TranscriptionJobStatus','fileText','Transcript','TranscriptFileUri','[RECORDING:%d]\x20Get\x20transcript','[RECORDING:%d]\x20Transcript\x20downloaded','results','transcripts','length','transcript','update','[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated','tempSentiment','Sentiment\x20Analysis\x20not\x20requested','sentiment','sentimentAccountId','sentimentRegion','bucket','Sequelize','Transcript\x20not\x20available','CloudProvider','findOne','ValidationError','Cloud\x20Provider\x20not\x20available','[RECORDING:%d]\x20Sentiment\x20Analysis\x20available','SentimentScore','Positive'];(function(_0x45f6e2,_0xe72d77){var _0x573b09=function(_0x3aa398){while(--_0x3aa398){_0x45f6e2['push'](_0x45f6e2['shift']());}};_0x573b09(++_0xe72d77);}(_0x30fc,0x64));var _0xc30f=function(_0x44b694,_0x195b96){_0x44b694=_0x44b694-0x0;var _0x3fd117=_0x30fc[_0x44b694];return _0x3fd117;};var _=require(_0xc30f('0x0'));var AWS=require(_0xc30f('0x1'));var rp=require('request-promise');var util=require(_0xc30f('0x2'));var BPromise=require(_0xc30f('0x3'));var db=require(_0xc30f('0x4'))['db'];var logger=require(_0xc30f('0x5'))('transcribe');function getTranscriptionJob(_0xa8299e,_0x16c57d,_0x342b94,_0x22a3a7){return new Promise(function(_0x2948cb,_0x293391){var _0x54c174=new AWS[(_0xc30f('0x6'))]({'accessKeyId':_0x16c57d,'secretAccessKey':_0xa8299e,'region':_0x342b94});_0x54c174[_0xc30f('0x7')]({'TranscriptionJobName':_0x22a3a7},function(_0x33a769,_0x3d2167){if(_0x33a769){return _0x293391(_0x33a769);}else{return _0x2948cb(_0x3d2167);}});});}function sentiment(_0x2e328e,_0x25a9f1,_0x436059,_0x29a9df,_0x25f066){return new Promise(function(_0x597d99,_0x1c3a1b){var _0x5e1429=new AWS[(_0xc30f('0x8'))]({'accessKeyId':_0x25a9f1,'secretAccessKey':_0x2e328e,'region':_0x436059});_0x5e1429[_0xc30f('0x9')]({'Text':_0x29a9df,'LanguageCode':_0x25f066[_0xc30f('0xa')](0x0,0x2)},function(_0x1ccb60,_0x1bf15a){if(_0x1ccb60){return _0x1c3a1b(_0x1ccb60);}else{return _0x597d99(_0x1bf15a);}});});}function checkTranscribeJob(_0x3cd910,_0x4f6d18,_0x524998){var _0x3bc956;return new BPromise(function(_0x101bc4,_0x38fbc4){logger[_0xc30f('0xb')](util['format'](_0xc30f('0xc'),_0x3cd910['id'],_0x3cd910[_0xc30f('0xd')]));return getTranscriptionJob(_0x524998[_0xc30f('0xe')],_0x524998[_0xc30f('0xf')],_0x4f6d18[_0xc30f('0x10')],_0x3cd910[_0xc30f('0xd')])[_0xc30f('0x11')](function(_0x4fbdcd){logger['info'](util[_0xc30f('0x12')](_0xc30f('0x13'),_0x3cd910['id'],_0x3cd910[_0xc30f('0xd')],_0x4fbdcd[_0xc30f('0x14')][_0xc30f('0x15')]));if(!_0x3cd910[_0xc30f('0x16')]){switch(_0x4fbdcd['TranscriptionJob'][_0xc30f('0x15')]){case'COMPLETED':var _0xce9c9={'transcribeStatus':_0x4fbdcd[_0xc30f('0x14')][_0xc30f('0x15')],'fileUri':_0x4fbdcd[_0xc30f('0x14')][_0xc30f('0x17')][_0xc30f('0x18')]};logger[_0xc30f('0xb')](util[_0xc30f('0x12')](_0xc30f('0x19'),_0x3cd910['id']));return rp({'uri':_0x4fbdcd['TranscriptionJob'][_0xc30f('0x17')][_0xc30f('0x18')],'json':!![]})['then'](function(_0x218e5b){logger[_0xc30f('0xb')](util[_0xc30f('0x12')](_0xc30f('0x1a'),_0x3cd910['id']));if(_0x218e5b&&_0x218e5b[_0xc30f('0x1b')]&&_0x218e5b[_0xc30f('0x1b')][_0xc30f('0x1c')]&&_0x218e5b[_0xc30f('0x1b')][_0xc30f('0x1c')]['length']){_0xce9c9[_0xc30f('0x16')]='';for(var _0x50122e=0x0;_0x50122e<_0x218e5b[_0xc30f('0x1b')][_0xc30f('0x1c')][_0xc30f('0x1d')];_0x50122e++){_0xce9c9[_0xc30f('0x16')]+=_0x218e5b[_0xc30f('0x1b')][_0xc30f('0x1c')][_0x50122e][_0xc30f('0x1e')]+'';}}return _0x3cd910[_0xc30f('0x1f')](_0xce9c9);})[_0xc30f('0x11')](function(){logger[_0xc30f('0xb')](util[_0xc30f('0x12')](_0xc30f('0x20'),_0x3cd910['id']));if(!_0x3cd910[_0xc30f('0x21')]){throw new db['Sequelize']['ValidationError'](_0xc30f('0x22'));}if(!_0x4f6d18[_0xc30f('0x23')]||!_0x4f6d18[_0xc30f('0x24')]||!_0x4f6d18[_0xc30f('0x25')]||!_0x4f6d18['language']||!_0x4f6d18[_0xc30f('0x26')]){throw new db[(_0xc30f('0x27'))]['ValidationError']('Sentiment\x20Analysis\x20not\x20configured');}if(!_0xce9c9[_0xc30f('0x16')]){throw new Error(_0xc30f('0x28'));}if(_0x4f6d18[_0xc30f('0x24')]===_0x524998['id']){return _0x524998;}else{return db[_0xc30f('0x29')][_0xc30f('0x2a')]({'where':{'id':_settings[_0xc30f('0x24')]}});}})['then'](function(_0x2cf0b2){if(!_0x2cf0b2){throw new db[(_0xc30f('0x27'))][(_0xc30f('0x2b'))](_0xc30f('0x2c'));}if(!_0x2cf0b2[_0xc30f('0xe')]||!_0x2cf0b2[_0xc30f('0xf')]){throw new db[(_0xc30f('0x27'))]['ValidationError']('Cloud\x20Provider\x20not\x20configured');}_0x3bc956=_0x2cf0b2;logger[_0xc30f('0xb')](util[_0xc30f('0x12')]('[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis',_0x3cd910['id']));return sentiment(_0x3bc956[_0xc30f('0xe')],_0x3bc956['data2'],_0x4f6d18['sentimentRegion'],_0xce9c9[_0xc30f('0x16')],_0x4f6d18['language']);})['then'](function(_0x432b18){logger[_0xc30f('0xb')](util[_0xc30f('0x12')](_0xc30f('0x2d'),_0x3cd910['id']));return _0x3cd910['update']({'sentiment':_0x432b18['Sentiment'],'sPositive':_0x432b18[_0xc30f('0x2e')][_0xc30f('0x2f')],'sNegative':_0x432b18['SentimentScore'][_0xc30f('0x30')],'sMixed':_0x432b18[_0xc30f('0x2e')][_0xc30f('0x31')],'sNeutral':_0x432b18['SentimentScore']['Neutral']});})['then'](function(){logger[_0xc30f('0xb')](util[_0xc30f('0x12')](_0xc30f('0x20'),_0x3cd910['id']));_0x101bc4();});case _0xc30f('0x32'):return _0x3cd910[_0xc30f('0x1f')]({'transcribeStatus':_0xc30f('0x32'),'failureReason':_0x4fbdcd[_0xc30f('0x14')][_0xc30f('0x33')]})[_0xc30f('0x11')](function(){logger[_0xc30f('0xb')](util[_0xc30f('0x12')](_0xc30f('0x20'),_0x3cd910['id']));_0x101bc4();});default:logger['info'](util[_0xc30f('0x12')](_0xc30f('0x34'),_0x3cd910['id']));break;}}else{return BPromise[_0xc30f('0x35')]()[_0xc30f('0x11')](function(){if(!_0x3cd910[_0xc30f('0x21')]){throw new db['Sequelize'][(_0xc30f('0x2b'))](_0xc30f('0x22'));}if(!_0x4f6d18['sentiment']||!_0x4f6d18[_0xc30f('0x24')]||!_0x4f6d18[_0xc30f('0x25')]||!_0x4f6d18[_0xc30f('0x36')]||!_0x4f6d18[_0xc30f('0x26')]){throw new db[(_0xc30f('0x27'))][(_0xc30f('0x2b'))](_0xc30f('0x37'));}if(!_0x3cd910[_0xc30f('0x16')]){throw new Error(_0xc30f('0x28'));}if(_0x4f6d18[_0xc30f('0x24')]===_0x524998['id']){return _0x524998;}else{return db[_0xc30f('0x29')][_0xc30f('0x2a')]({'where':{'id':_settings['sentimentAccountId']}});}})[_0xc30f('0x11')](function(_0x20d0dd){if(!_0x20d0dd){throw new db['Sequelize'][(_0xc30f('0x2b'))](_0xc30f('0x2c'));}if(!_0x20d0dd[_0xc30f('0xe')]||!_0x20d0dd[_0xc30f('0xf')]){throw new db[(_0xc30f('0x27'))]['ValidationError'](_0xc30f('0x38'));}_0x3bc956=_0x20d0dd;logger[_0xc30f('0xb')](util[_0xc30f('0x12')]('[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis',_0x3cd910['id']));return sentiment(_0x3bc956[_0xc30f('0xe')],_0x3bc956[_0xc30f('0xf')],_0x4f6d18[_0xc30f('0x25')],_0x3cd910['fileText'],_0x4f6d18[_0xc30f('0x36')]);})[_0xc30f('0x11')](function(_0x35acc3){logger[_0xc30f('0xb')](util[_0xc30f('0x12')](_0xc30f('0x2d'),_0x3cd910['id']));return _0x3cd910['update']({'sentiment':_0x35acc3[_0xc30f('0x39')],'sPositive':_0x35acc3['SentimentScore'][_0xc30f('0x2f')],'sNegative':_0x35acc3[_0xc30f('0x2e')][_0xc30f('0x30')],'sMixed':_0x35acc3[_0xc30f('0x2e')]['Mixed'],'sNeutral':_0x35acc3['SentimentScore'][_0xc30f('0x3a')],'transcribeStatus':_0xc30f('0x3b')});})[_0xc30f('0x11')](function(){logger[_0xc30f('0xb')](util['format'](_0xc30f('0x20'),_0x3cd910['id']));_0x101bc4();});}})[_0xc30f('0x3c')](function(_0x2da350){if(_0x2da350){if(!_0x2da350[_0xc30f('0x3d')]||_0x2da350[_0xc30f('0x3d')]!==_0xc30f('0x3e')){logger['error'](util[_0xc30f('0x12')](_0xc30f('0x3f'),_0x3cd910['id']),util[_0xc30f('0x40')](_0x2da350,{'showHidden':![],'depth':null}));}}_0x101bc4();});});}function checkTranscribe(){var _0x5dc074;var _0x507316;var _0x23d9dc;return db[_0xc30f('0x41')][_0xc30f('0x42')]({'where':{'transcribeStatus':'IN_PROGRESS'}})[_0xc30f('0x11')](function(_0x24b3de){if(!_0x24b3de||!_0x24b3de[_0xc30f('0x1d')]){throw new db[(_0xc30f('0x27'))]['ValidationError']('No\x20transcribe\x20job\x20to\x20check');}_0x5dc074=_0x24b3de;return db['Setting'][_0xc30f('0x2a')]({'where':{'id':0x1}});})[_0xc30f('0x11')](function(_0x3ddda2){if(!_0x3ddda2){throw new db[(_0xc30f('0x27'))]['ValidationError'](_0xc30f('0x43'));}_0x507316=_0x3ddda2;if(!_0x507316[_0xc30f('0x44')]||!_0x507316['transcribeAccountId']||!_0x507316[_0xc30f('0x10')]||!_0x507316[_0xc30f('0x36')]||!_0x507316[_0xc30f('0x26')]){throw new db[(_0xc30f('0x27'))]['ValidationError']('Transcribe\x20not\x20configured');}return db[_0xc30f('0x29')]['findOne']({'where':{'id':_0x507316['transcribeAccountId']}});})[_0xc30f('0x11')](function(_0x20bc25){if(!_0x20bc25){throw new db[(_0xc30f('0x27'))][(_0xc30f('0x2b'))](_0xc30f('0x2c'));}if(!_0x20bc25['data1']||!_0x20bc25[_0xc30f('0xf')]){throw new db[(_0xc30f('0x27'))][(_0xc30f('0x2b'))]('Cloud\x20Provider\x20not\x20configured');}_0x23d9dc=_0x20bc25;var _0x3593a6=[];_0x5dc074[_0xc30f('0x45')](function(_0x4166bf){_0x3593a6[_0xc30f('0x46')](checkTranscribeJob(_0x4166bf,_0x507316,_0x23d9dc));});return BPromise[_0xc30f('0x47')](_0x3593a6);})['catch'](function(_0x2e692e){if(_0x2e692e){if(!_0x2e692e['name']||_0x2e692e[_0xc30f('0x3d')]!==_0xc30f('0x3e')){logger[_0xc30f('0x48')](util[_0xc30f('0x40')](_0x2e692e,{'showHidden':![],'depth':null}));}}});}exports[_0xc30f('0x49')]=function(){setInterval(function(){return checkTranscribe();},0x3c*0x3e8);return checkTranscribe();};
\ No newline at end of file
index b170034..803d2b4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x83eb=['emit','whatsappInteraction:update','[WHATSAPP]\x20Error\x20closing\x20interactions','inspect','lodash','moment','../../config/environment','../../mysqldb','../logger','schedule','defaults','redis','localhost','socket.io-emitter','WhatsappInteraction','findAll','lastMsgAt','hours','length','map','[WHATSAPP]\x20Interactions\x20to\x20close:','join','YYYY-MM-DD\x20HH:mm:ss','then','info','[WHATSAPP]\x20Sending\x20updates\x20for\x20interactions:'];(function(_0x51c819,_0xd812db){var _0x15c5d2=function(_0x2977f0){while(--_0x2977f0){_0x51c819['push'](_0x51c819['shift']());}};_0x15c5d2(++_0xd812db);}(_0x83eb,0x1f2));var _0xb83e=function(_0x40226b,_0x532b6d){_0x40226b=_0x40226b-0x0;var _0x2db6c9=_0x83eb[_0x40226b];return _0x2db6c9;};'use strict';var _=require(_0xb83e('0x0'));var moment=require(_0xb83e('0x1'));var Redis=require('ioredis');var util=require('util');var config=require(_0xb83e('0x2'));var db=require(_0xb83e('0x3'))['db'];var logger=require(_0xb83e('0x4'))(_0xb83e('0x5'));config['redis']=_[_0xb83e('0x6')](config[_0xb83e('0x7')],{'host':_0xb83e('0x8'),'port':0x18eb});var io=require(_0xb83e('0x9'))(new Redis(config['redis']));function closeInteractions(){var _0x46083a=[];return db[_0xb83e('0xa')][_0xb83e('0xb')]({'raw':!![],'attributes':['id',_0xb83e('0xc')],'where':{'closed':![],'lastMsgDirection':'in','lastMsgAt':{'$lt':moment()['subtract'](0x18,_0xb83e('0xd'))}}})['then'](function(_0x40b21a){if(_0x40b21a&&_0x40b21a[_0xb83e('0xe')]){_0x46083a=_[_0xb83e('0xf')](_0x40b21a||[],'id');logger['info'](_0xb83e('0x10'),_0x46083a[_0xb83e('0x11')]());return db[_0xb83e('0xa')]['update']({'closeReason':'system','disposition':'timeout','closed':!![],'closedAt':moment()['format'](_0xb83e('0x12'))},{'where':{'id':_0x46083a}});}})[_0xb83e('0x13')](function(){if(_0x46083a&&_0x46083a[_0xb83e('0xe')]){logger[_0xb83e('0x14')](_0xb83e('0x15'),_0x46083a[_0xb83e('0x11')]());for(var _0x238eda=0x0;_0x238eda<_0x46083a[_0xb83e('0xe')];_0x238eda++){io[_0xb83e('0x16')](_0xb83e('0x17'),{'id':_0x46083a[_0x238eda],'closed':!![]});}}})['catch'](function(_0x1a941b){logger['error'](_0xb83e('0x18'),_0x1a941b?util[_0xb83e('0x19')](_0x1a941b,{'showHidden':![],'depth':null}):'');});}exports['start']=function(){setInterval(function(){return closeInteractions();},0x3c*0x3e8);return closeInteractions();};
\ No newline at end of file
+var _0x2046=['[WHATSAPP]\x20Error\x20closing\x20interactions','inspect','start','lodash','moment','util','../../config/environment','../../mysqldb','../logger','schedule','redis','WhatsappInteraction','findAll','lastMsgAt','subtract','hours','then','length','map','info','join','update','system','timeout','format','[WHATSAPP]\x20Sending\x20updates\x20for\x20interactions:','whatsappInteraction:update'];(function(_0x26eaf8,_0x3ae08c){var _0x5a08bc=function(_0x41f2f0){while(--_0x41f2f0){_0x26eaf8['push'](_0x26eaf8['shift']());}};_0x5a08bc(++_0x3ae08c);}(_0x2046,0x147));var _0x6204=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x2046[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x6204('0x0'));var moment=require(_0x6204('0x1'));var Redis=require('ioredis');var util=require(_0x6204('0x2'));var config=require(_0x6204('0x3'));var db=require(_0x6204('0x4'))['db'];var logger=require(_0x6204('0x5'))(_0x6204('0x6'));config['redis']=_['defaults'](config[_0x6204('0x7')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x6204('0x7')]));function closeInteractions(){var _0x5f003e=[];return db[_0x6204('0x8')][_0x6204('0x9')]({'raw':!![],'attributes':['id',_0x6204('0xa')],'where':{'closed':![],'lastMsgDirection':'in','lastMsgAt':{'$lt':moment()[_0x6204('0xb')](0x18,_0x6204('0xc'))}}})[_0x6204('0xd')](function(_0x350ffc){if(_0x350ffc&&_0x350ffc[_0x6204('0xe')]){_0x5f003e=_[_0x6204('0xf')](_0x350ffc||[],'id');logger[_0x6204('0x10')]('[WHATSAPP]\x20Interactions\x20to\x20close:',_0x5f003e[_0x6204('0x11')]());return db['WhatsappInteraction'][_0x6204('0x12')]({'closeReason':_0x6204('0x13'),'disposition':_0x6204('0x14'),'closed':!![],'closedAt':moment()[_0x6204('0x15')]('YYYY-MM-DD\x20HH:mm:ss')},{'where':{'id':_0x5f003e}});}})[_0x6204('0xd')](function(){if(_0x5f003e&&_0x5f003e['length']){logger[_0x6204('0x10')](_0x6204('0x16'),_0x5f003e[_0x6204('0x11')]());for(var _0x594013=0x0;_0x594013<_0x5f003e[_0x6204('0xe')];_0x594013++){io['emit'](_0x6204('0x17'),{'id':_0x5f003e[_0x594013],'closed':!![]});}}})['catch'](function(_0x15aeaa){logger['error'](_0x6204('0x18'),_0x15aeaa?util[_0x6204('0x19')](_0x15aeaa,{'showHidden':![],'depth':null}):'');});}exports[_0x6204('0x1a')]=function(){setInterval(function(){return closeInteractions();},0x3c*0x3e8);return closeInteractions();};
\ No newline at end of file
index e386b75..54f998a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6759=['contacts1','CmHopper','hopper1','log','finished\x20populating','contacts2','catch','push','Innocenzo','Biondo','innocenzo.biondo','@xcally.com','now','CmContact','destroy','then','bulkCreate'];(function(_0x36eaaa,_0x326732){var _0x461349=function(_0x4e4180){while(--_0x4e4180){_0x36eaaa['push'](_0x36eaaa['shift']());}};_0x461349(++_0x326732);}(_0x6759,0x128));var _0x9675=function(_0x21afde,_0x4454ce){_0x21afde=_0x21afde-0x0;var _0x33cde=_0x6759[_0x21afde];return _0x33cde;};'use strict';var util=require('util');var db=require('../mysqldb')['db'];var contacts=[];var hopper=[];var contacts2=[];var hopper2=[];for(var i=0x1;i<=0x4b0;i+=0x1){contacts[_0x9675('0x0')]({'id':i,'firstName':_0x9675('0x1')+i,'lastName':_0x9675('0x2')+i,'phone':0xf879fb460+i,'email':_0x9675('0x3')+i+_0x9675('0x4')});}for(var i=0x1;i<=0x4b0;i+=0x1){hopper['push']({'id':i,'active':![],'scheduledat':Date['now'](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date['now'](),'updatedAt':Date[_0x9675('0x5')]()});}for(var i=0x4b1;i<=0x960;i+=0x1){contacts2[_0x9675('0x0')]({'id':i,'firstName':'Innocenzo'+i,'lastName':_0x9675('0x2')+i,'phone':0xf879fb460+i,'email':_0x9675('0x3')+i+_0x9675('0x4')});}for(var i=0x4b1;i<=0x960;i+=0x1){hopper2[_0x9675('0x0')]({'id':i,'active':![],'scheduledat':Date[_0x9675('0x5')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0x9675('0x5')](),'updatedAt':Date[_0x9675('0x5')]()});}db[_0x9675('0x6')][_0x9675('0x7')]({'where':{}})[_0x9675('0x8')](function(){return db[_0x9675('0x6')][_0x9675('0x9')](contacts);})[_0x9675('0x8')](function(){console['log']('finished\x20populating',_0x9675('0xa'));return db[_0x9675('0xb')][_0x9675('0x7')]({'where':{}});})[_0x9675('0x8')](function(){return db[_0x9675('0xb')][_0x9675('0x9')](hopper);})[_0x9675('0x8')](function(){console['log']('finished\x20populating',_0x9675('0xc'));return db['CmContact'][_0x9675('0x9')](contacts2);})[_0x9675('0x8')](function(){console[_0x9675('0xd')](_0x9675('0xe'),_0x9675('0xf'));return db['CmHopper'][_0x9675('0x9')](hopper2);})[_0x9675('0x8')](function(){console[_0x9675('0xd')](_0x9675('0xe'),'hopper2');})[_0x9675('0x10')](function(_0x503ef8){console['log'](_0x503ef8);});
\ No newline at end of file
+var _0xdf48=['contacts2','hopper2','catch','util','../mysqldb','Innocenzo','Biondo','innocenzo.biondo','@xcally.com','now','push','CmContact','destroy','then','bulkCreate','log','finished\x20populating','contacts1','CmHopper','hopper1'];(function(_0x126558,_0x143c9a){var _0x1f6d14=function(_0x2b0eea){while(--_0x2b0eea){_0x126558['push'](_0x126558['shift']());}};_0x1f6d14(++_0x143c9a);}(_0xdf48,0xa3));var _0x8df4=function(_0x15fa4c,_0x4da348){_0x15fa4c=_0x15fa4c-0x0;var _0x372fbe=_0xdf48[_0x15fa4c];return _0x372fbe;};'use strict';var util=require(_0x8df4('0x0'));var db=require(_0x8df4('0x1'))['db'];var contacts=[];var hopper=[];var contacts2=[];var hopper2=[];for(var i=0x1;i<=0x4b0;i+=0x1){contacts['push']({'id':i,'firstName':_0x8df4('0x2')+i,'lastName':_0x8df4('0x3')+i,'phone':0xf879fb460+i,'email':_0x8df4('0x4')+i+_0x8df4('0x5')});}for(var i=0x1;i<=0x4b0;i+=0x1){hopper['push']({'id':i,'active':![],'scheduledat':Date['now'](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0x8df4('0x6')](),'updatedAt':Date[_0x8df4('0x6')]()});}for(var i=0x4b1;i<=0x960;i+=0x1){contacts2[_0x8df4('0x7')]({'id':i,'firstName':_0x8df4('0x2')+i,'lastName':_0x8df4('0x3')+i,'phone':0xf879fb460+i,'email':_0x8df4('0x4')+i+_0x8df4('0x5')});}for(var i=0x4b1;i<=0x960;i+=0x1){hopper2[_0x8df4('0x7')]({'id':i,'active':![],'scheduledat':Date[_0x8df4('0x6')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0x8df4('0x6')](),'updatedAt':Date[_0x8df4('0x6')]()});}db[_0x8df4('0x8')][_0x8df4('0x9')]({'where':{}})[_0x8df4('0xa')](function(){return db[_0x8df4('0x8')][_0x8df4('0xb')](contacts);})[_0x8df4('0xa')](function(){console[_0x8df4('0xc')](_0x8df4('0xd'),_0x8df4('0xe'));return db[_0x8df4('0xf')][_0x8df4('0x9')]({'where':{}});})[_0x8df4('0xa')](function(){return db[_0x8df4('0xf')]['bulkCreate'](hopper);})[_0x8df4('0xa')](function(){console[_0x8df4('0xc')](_0x8df4('0xd'),_0x8df4('0x10'));return db[_0x8df4('0x8')]['bulkCreate'](contacts2);})[_0x8df4('0xa')](function(){console['log'](_0x8df4('0xd'),_0x8df4('0x11'));return db[_0x8df4('0xf')][_0x8df4('0xb')](hopper2);})[_0x8df4('0xa')](function(){console[_0x8df4('0xc')](_0x8df4('0xd'),_0x8df4('0x12'));})[_0x8df4('0x13')](function(_0x1b3869){console[_0x8df4('0xc')](_0x1b3869);});
\ No newline at end of file
index 9627e8c..7def489 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x943d=['User','bulkCreate','then','log','add\x20user','catch','util','../mysqldb','push','format','agent','%s%s','%s%s@xcally.com','password','friend','wss','all','ulaw','yes','/etc/pki/tls/private/motion.key','\x22%s\x22\x20<%s>'];(function(_0x29860d,_0x485a1f){var _0x31820a=function(_0x38a94){while(--_0x38a94){_0x29860d['push'](_0x29860d['shift']());}};_0x31820a(++_0x485a1f);}(_0x943d,0x1d4));var _0xd943=function(_0x4409e7,_0x307f17){_0x4409e7=_0x4409e7-0x0;var _0x24c751=_0x943d[_0x4409e7];return _0x24c751;};'use strict';var util=require(_0xd943('0x0'));var db=require(_0xd943('0x1'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0xd943('0x2')]({'name':util[_0xd943('0x3')]('%s%s',_0xd943('0x4'),i),'fullname':util[_0xd943('0x3')](_0xd943('0x5'),_0xd943('0x4'),i),'email':util[_0xd943('0x3')](_0xd943('0x6'),'agent',i),'role':_0xd943('0x4'),'password':_0xd943('0x7'),'internal':0xfa0+i,'type':_0xd943('0x8'),'transport':['udp','ws',_0xd943('0x9')],'disallow':[_0xd943('0xa')],'allow':[_0xd943('0xb')],'defaultuser':util['format'](_0xd943('0x5'),'agent',i),'encryption':_0xd943('0xc'),'avpf':'yes','force_avp':_0xd943('0xc'),'icesupport':_0xd943('0xc'),'dtlsenable':'yes','dtlsverify':'no','dtlscertfile':'/etc/pki/tls/certs/motion.crt','dtlsprivatekey':_0xd943('0xd'),'dtlssetup':'actpass','callerid':util['format'](_0xd943('0xe'),util[_0xd943('0x3')](_0xd943('0x5'),_0xd943('0x4'),i),0xfa0+i)});}db[_0xd943('0xf')][_0xd943('0x10')](users)[_0xd943('0x11')](function(){console[_0xd943('0x12')](_0xd943('0x13'));})[_0xd943('0x14')](function(_0xffe08a){console[_0xd943('0x12')](_0xffe08a);});
\ No newline at end of file
+var _0x9dd3=['log','add\x20user','catch','../mysqldb','format','%s%s','agent','friend','udp','all','ulaw','yes','/etc/pki/tls/certs/motion.crt','/etc/pki/tls/private/motion.key','actpass','\x22%s\x22\x20<%s>','bulkCreate','then'];(function(_0x3f8e20,_0x1daf92){var _0x54b65e=function(_0x4cf6b8){while(--_0x4cf6b8){_0x3f8e20['push'](_0x3f8e20['shift']());}};_0x54b65e(++_0x1daf92);}(_0x9dd3,0xc9));var _0x39dd=function(_0xc8cbaa,_0x2bba3d){_0xc8cbaa=_0xc8cbaa-0x0;var _0xcd8180=_0x9dd3[_0xc8cbaa];return _0xcd8180;};'use strict';var util=require('util');var db=require(_0x39dd('0x0'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users['push']({'name':util[_0x39dd('0x1')](_0x39dd('0x2'),_0x39dd('0x3'),i),'fullname':util[_0x39dd('0x1')](_0x39dd('0x2'),_0x39dd('0x3'),i),'email':util[_0x39dd('0x1')]('%s%s@xcally.com',_0x39dd('0x3'),i),'role':_0x39dd('0x3'),'password':'password','internal':0xfa0+i,'type':_0x39dd('0x4'),'transport':[_0x39dd('0x5'),'ws','wss'],'disallow':[_0x39dd('0x6')],'allow':[_0x39dd('0x7')],'defaultuser':util[_0x39dd('0x1')](_0x39dd('0x2'),_0x39dd('0x3'),i),'encryption':_0x39dd('0x8'),'avpf':_0x39dd('0x8'),'force_avp':'yes','icesupport':'yes','dtlsenable':_0x39dd('0x8'),'dtlsverify':'no','dtlscertfile':_0x39dd('0x9'),'dtlsprivatekey':_0x39dd('0xa'),'dtlssetup':_0x39dd('0xb'),'callerid':util[_0x39dd('0x1')](_0x39dd('0xc'),util[_0x39dd('0x1')]('%s%s','agent',i),0xfa0+i)});}db['User'][_0x39dd('0xd')](users)[_0x39dd('0xe')](function(){console[_0x39dd('0xf')](_0x39dd('0x10'));})[_0x39dd('0x11')](function(_0x25c9be){console['log'](_0x25c9be);});
\ No newline at end of file
index 2c9b4d8..49b3ffe 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd509=['User','name','agent','telephone','type','ivr','UserProfileSection','VoiceQueues','ChatQueues','FaxQueues','SmsQueues','MailQueues','OpenchannelQueues','WhatsappQueues','Telephones','Trunks','findAll','IvrCampaigns','UserProfileResource','resourceId','then','map','where','role','Campaign','format','%s:queue:%s','Agents','length','user:%s','handshake','query','find','ChatInteraction','ChatInteractions','MailInteraction','FaxInteraction','FaxInteractions','SmsInteractions','OpenchannelInteractions','WhatsappInteraction','WhatsappInteractions','admin','voice:inbound','voice:outbound','hasOwnProperty','include','push','ChatQueue','FaxQueue','SmsQueue','MailQueue','OpenchannelQueue','WhatsappQueue','Trunk','user','userProfileId','VoiceQueue','getChatQueues','getFaxQueues','getSmsQueues','getMailQueues','getOpenchannelQueues','all','voice','chat','mail','openchannel','whatsapp','telephone:%s','removeChatInteractions','emit','user_has_chat_interactions:remove','leave','MailInteractions','removeMailInteractions','removeFaxInteractions','removeSmsInteractions','user_has_sms_interactions:remove','removeOpenchannelInteractions','user_has_openchannel_interactions:remove','removeWhatsappInteractions','user_has_whatsapp_interactions:remove','catch','join','default','connection','setMaxListeners','address','request','remoteAddress','remotePort','connectedAt','log','SocketIO\x20','nsp','disconnect','DISCONNECTED','CONNECTED','bluebird','../mysqldb','./environment'];(function(_0x1265ed,_0x4b85e8){var _0x5ac459=function(_0xf0c114){while(--_0xf0c114){_0x1265ed['push'](_0x1265ed['shift']());}};_0x5ac459(++_0x4b85e8);}(_0xd509,0xc9));var _0x9d50=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xd509[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var BPromise=require(_0x9d50('0x0'));var db=require(_0x9d50('0x1'))['db'];var config=require(_0x9d50('0x2'));var queryQueues={'attributes':['id','name'],'include':[{'as':'Agents','model':db[_0x9d50('0x3')],'attributes':['id',_0x9d50('0x4'),'role'],'raw':!![],'where':{'role':_0x9d50('0x5')},'required':![]}]};var queryTelephones={'raw':!![],'attributes':['id',_0x9d50('0x4')],'where':{'role':_0x9d50('0x6')}};var queryTrunks={'raw':!![],'attributes':['id','name']};var queryAgents={'raw':!![],'attributes':['id',_0x9d50('0x4')],'where':{'role':'agent'}};var queryCampaigns={'raw':!![],'attributes':['id',_0x9d50('0x4'),_0x9d50('0x7')],'where':{'type':_0x9d50('0x8')}};function getAssociatedResources(_0x1102b6,_0x365064,_0x5380be){return db[_0x9d50('0x9')]['findOne']({'where':{'name':_0x1102b6,'userProfileId':_0x365064},'raw':!![]})['then'](function(_0x2de74f){if(_0x2de74f){if(_0x2de74f['autoAssociation']){switch(_0x1102b6){case _0x9d50('0xa'):case _0x9d50('0xb'):case _0x9d50('0xc'):case _0x9d50('0xd'):case _0x9d50('0xe'):case _0x9d50('0xf'):case _0x9d50('0x10'):return db[_0x5380be]['findAll'](queryQueues);case _0x9d50('0x11'):return db[_0x5380be]['findAll'](queryTelephones);case _0x9d50('0x12'):return db[_0x5380be][_0x9d50('0x13')](queryTrunks);case _0x9d50('0x14'):return db[_0x5380be][_0x9d50('0x13')](queryCampaigns);}}else{return db[_0x9d50('0x15')][_0x9d50('0x13')]({'attributes':[_0x9d50('0x16')],'where':{'sectionId':_0x2de74f['id']},'raw':!![]})[_0x9d50('0x17')](function(_0x25f253){if(_0x25f253){var _0x304b42={'where':{'id':_[_0x9d50('0x18')](_0x25f253,_0x9d50('0x16'))},'raw':!![]};switch(_0x5380be){case'User':_0x304b42[_0x9d50('0x19')][_0x9d50('0x1a')]=_0x9d50('0x6');break;case _0x9d50('0x1b'):_0x304b42[_0x9d50('0x19')][_0x9d50('0x7')]=_0x9d50('0x8');break;}return db[_0x5380be][_0x9d50('0x13')](_0x304b42);}else{return[];}});}}else{return[];}})[_0x9d50('0x17')](function(_0x2d5619){return _0x2d5619;});}function joinOrLeaveQueues(_0x2965a3,_0x161b40,_0x24415e,_0x7582d1){_0x2965a3[_0x161b40](util[_0x9d50('0x1c')](_0x9d50('0x1d'),_0x24415e,_0x7582d1[_0x9d50('0x4')]));if(_0x7582d1[_0x9d50('0x1e')]){for(var _0x40026b=0x0;_0x40026b<_0x7582d1[_0x9d50('0x1e')][_0x9d50('0x1f')];_0x40026b+=0x1){_0x2965a3[_0x161b40](util[_0x9d50('0x1c')](_0x9d50('0x20'),_0x7582d1['Agents'][_0x40026b][_0x9d50('0x4')]));}}}function joinOrLeave(_0xcb4fc8,_0x2a50f7,_0x1adf7d){var _0x12ae02;if(_0xcb4fc8[_0x9d50('0x21')][_0x9d50('0x22')]['id']){db[_0x9d50('0x3')][_0x9d50('0x23')]({'attributes':['id','name',_0x9d50('0x1a'),'userProfileId'],'where':{'id':_0xcb4fc8['handshake'][_0x9d50('0x22')]['id']},'include':[{'model':db[_0x9d50('0x24')],'as':_0x9d50('0x25'),'attributes':['id'],'raw':!![]},{'model':db[_0x9d50('0x26')],'as':'MailInteractions','attributes':['id'],'raw':!![]},{'model':db[_0x9d50('0x27')],'as':_0x9d50('0x28'),'attributes':['id'],'raw':!![]},{'model':db['SmsInteraction'],'as':_0x9d50('0x29'),'attributes':['id'],'raw':!![]},{'model':db['OpenchannelInteraction'],'as':_0x9d50('0x2a'),'attributes':['id'],'raw':!![]},{'model':db[_0x9d50('0x2b')],'as':_0x9d50('0x2c'),'attributes':['id'],'raw':!![]}]})['then'](function(_0x3bd762){if(_0x3bd762){_0x12ae02=_0x3bd762;_0xcb4fc8[_0x2a50f7](util['format'](_0x9d50('0x20'),_0x3bd762[_0x9d50('0x4')]));var _0x1bb403=[];switch(_0x3bd762[_0x9d50('0x1a')]){case _0x9d50('0x2d'):_0xcb4fc8[_0x2a50f7](_0x9d50('0x2e'));_0xcb4fc8[_0x2a50f7](_0x9d50('0x2f'));if(queryQueues[_0x9d50('0x30')](_0x9d50('0x31'))){delete queryQueues['include'];}_0x1bb403[_0x9d50('0x32')](db['VoiceQueue']['findAll'](queryQueues));_0x1bb403[_0x9d50('0x32')](db[_0x9d50('0x33')][_0x9d50('0x13')](queryQueues));_0x1bb403['push'](db[_0x9d50('0x34')][_0x9d50('0x13')](queryQueues));_0x1bb403[_0x9d50('0x32')](db[_0x9d50('0x35')][_0x9d50('0x13')](queryQueues));_0x1bb403[_0x9d50('0x32')](db[_0x9d50('0x36')][_0x9d50('0x13')](queryQueues));_0x1bb403[_0x9d50('0x32')](db[_0x9d50('0x37')][_0x9d50('0x13')](queryQueues));_0x1bb403[_0x9d50('0x32')](db[_0x9d50('0x38')][_0x9d50('0x13')](queryQueues));_0x1bb403[_0x9d50('0x32')](db['User'][_0x9d50('0x13')](queryTelephones));_0x1bb403['push'](db[_0x9d50('0x39')]['findAll'](queryTrunks));_0x1bb403[_0x9d50('0x32')](db[_0x9d50('0x1b')][_0x9d50('0x13')](queryCampaigns));_0x1bb403[_0x9d50('0x32')](db[_0x9d50('0x3')]['findAll'](queryAgents));break;case _0x9d50('0x3a'):_0xcb4fc8[_0x2a50f7](_0x9d50('0x2e'));_0xcb4fc8[_0x2a50f7](_0x9d50('0x2f'));_0x1bb403[_0x9d50('0x32')](getAssociatedResources(_0x9d50('0xa'),_0x3bd762[_0x9d50('0x3b')],_0x9d50('0x3c')));_0x1bb403[_0x9d50('0x32')](getAssociatedResources('ChatQueues',_0x3bd762[_0x9d50('0x3b')],'ChatQueue'));_0x1bb403[_0x9d50('0x32')](getAssociatedResources(_0x9d50('0xc'),_0x3bd762[_0x9d50('0x3b')],_0x9d50('0x34')));_0x1bb403[_0x9d50('0x32')](getAssociatedResources(_0x9d50('0xd'),_0x3bd762['userProfileId'],'SmsQueue'));_0x1bb403[_0x9d50('0x32')](getAssociatedResources(_0x9d50('0xe'),_0x3bd762[_0x9d50('0x3b')],_0x9d50('0x36')));_0x1bb403[_0x9d50('0x32')](getAssociatedResources(_0x9d50('0xf'),_0x3bd762[_0x9d50('0x3b')],_0x9d50('0x37')));_0x1bb403[_0x9d50('0x32')](getAssociatedResources(_0x9d50('0x10'),_0x3bd762[_0x9d50('0x3b')],'WhatsappQueue'));_0x1bb403[_0x9d50('0x32')](getAssociatedResources(_0x9d50('0x11'),_0x3bd762['userProfileId'],_0x9d50('0x3')));_0x1bb403[_0x9d50('0x32')](getAssociatedResources(_0x9d50('0x12'),_0x3bd762[_0x9d50('0x3b')],_0x9d50('0x39')));_0x1bb403[_0x9d50('0x32')](getAssociatedResources(_0x9d50('0x14'),_0x3bd762['userProfileId'],'Campaign'));_0x1bb403['push'](db[_0x9d50('0x3')][_0x9d50('0x13')](queryAgents));break;case _0x9d50('0x5'):_0xcb4fc8[_0x2a50f7](_0x9d50('0x2e'));_0xcb4fc8[_0x2a50f7](_0x9d50('0x2f'));_0x1bb403['push'](_0x3bd762['getVoiceQueues']({'attributes':['id',_0x9d50('0x4')]}));_0x1bb403[_0x9d50('0x32')](_0x3bd762[_0x9d50('0x3d')]({'attributes':['id',_0x9d50('0x4')]}));_0x1bb403[_0x9d50('0x32')](_0x3bd762[_0x9d50('0x3e')]({'attributes':['id',_0x9d50('0x4')]}));_0x1bb403[_0x9d50('0x32')](_0x3bd762[_0x9d50('0x3f')]({'attributes':['id',_0x9d50('0x4')]}));_0x1bb403['push'](_0x3bd762[_0x9d50('0x40')]({'attributes':['id',_0x9d50('0x4')]}));_0x1bb403[_0x9d50('0x32')](_0x3bd762[_0x9d50('0x41')]({'attributes':['id',_0x9d50('0x4')]}));_0x1bb403['push'](_0x3bd762['getWhatsappQueues']({'attributes':['id',_0x9d50('0x4')]}));break;}return BPromise[_0x9d50('0x42')](_0x1bb403);}})[_0x9d50('0x17')](function(_0x32b6bd){if(_0x32b6bd&&_0x32b6bd[_0x9d50('0x1f')]){for(var _0x58cd38=0x0;_0x58cd38<_0x32b6bd[_0x9d50('0x1f')];_0x58cd38+=0x1){for(var _0x578819=0x0;_0x578819<_0x32b6bd[_0x58cd38]['length'];_0x578819+=0x1){switch(_0x58cd38){case 0x0:joinOrLeaveQueues(_0xcb4fc8,_0x2a50f7,_0x9d50('0x43'),_0x32b6bd[_0x58cd38][_0x578819]);break;case 0x1:joinOrLeaveQueues(_0xcb4fc8,_0x2a50f7,_0x9d50('0x44'),_0x32b6bd[_0x58cd38][_0x578819]);break;case 0x2:joinOrLeaveQueues(_0xcb4fc8,_0x2a50f7,'fax',_0x32b6bd[_0x58cd38][_0x578819]);break;case 0x3:joinOrLeaveQueues(_0xcb4fc8,_0x2a50f7,'sms',_0x32b6bd[_0x58cd38][_0x578819]);break;case 0x4:joinOrLeaveQueues(_0xcb4fc8,_0x2a50f7,_0x9d50('0x45'),_0x32b6bd[_0x58cd38][_0x578819]);break;case 0x5:joinOrLeaveQueues(_0xcb4fc8,_0x2a50f7,_0x9d50('0x46'),_0x32b6bd[_0x58cd38][_0x578819]);break;case 0x6:joinOrLeaveQueues(_0xcb4fc8,_0x2a50f7,_0x9d50('0x47'),_0x32b6bd[_0x58cd38][_0x578819]);break;case 0x7:if(_0x12ae02[_0x9d50('0x1a')]!=='agent')_0xcb4fc8[_0x2a50f7](util['format'](_0x9d50('0x48'),_0x32b6bd[_0x58cd38][_0x578819]['name']));break;case 0x8:if(_0x12ae02['role']!==_0x9d50('0x5'))_0xcb4fc8[_0x2a50f7](util[_0x9d50('0x1c')]('trunk:%s',_0x32b6bd[_0x58cd38][_0x578819]['name']));break;case 0x9:if(_0x12ae02[_0x9d50('0x1a')]!==_0x9d50('0x5'))_0xcb4fc8[_0x2a50f7](util[_0x9d50('0x1c')]('campaign:%s:%s',_0x32b6bd[_0x58cd38][_0x578819][_0x9d50('0x7')],_0x32b6bd[_0x58cd38][_0x578819][_0x9d50('0x4')]));break;case 0xa:_0xcb4fc8[_0x2a50f7](util['format'](_0x9d50('0x20'),_0x32b6bd[_0x58cd38][_0x578819]['name']));break;}}}}})[_0x9d50('0x17')](function(){if(_0x2a50f7==='leave'){var _0xdf25b1=_['map'](_0x12ae02[_0x9d50('0x25')],'id');return _0x12ae02[_0x9d50('0x49')](_0xdf25b1)[_0x9d50('0x17')](function(){for(var _0x1f2d0a=0x0;_0x1f2d0a<_0xdf25b1['length'];_0x1f2d0a+=0x1){_0x1adf7d[_0x9d50('0x4a')](_0x9d50('0x4b'),{'ChatInteractionId':Number(_0xdf25b1[_0x1f2d0a]),'UserId':Number(_0x12ae02['id'])});}});}})[_0x9d50('0x17')](function(){if(_0x2a50f7===_0x9d50('0x4c')){var _0x40f5ea=_[_0x9d50('0x18')](_0x12ae02[_0x9d50('0x4d')],'id');return _0x12ae02[_0x9d50('0x4e')](_0x40f5ea)[_0x9d50('0x17')](function(){for(var _0x482cc0=0x0;_0x482cc0<_0x40f5ea['length'];_0x482cc0+=0x1){_0x1adf7d[_0x9d50('0x4a')]('user_has_mail_interactions:remove',{'MailInteractionId':Number(_0x40f5ea[_0x482cc0]),'UserId':Number(_0x12ae02['id'])});}});}})[_0x9d50('0x17')](function(){if(_0x2a50f7===_0x9d50('0x4c')){var _0x4d469d=_['map'](_0x12ae02['FaxInteractions'],'id');return _0x12ae02[_0x9d50('0x4f')](_0x4d469d)[_0x9d50('0x17')](function(){for(var _0xdaac34=0x0;_0xdaac34<_0x4d469d[_0x9d50('0x1f')];_0xdaac34+=0x1){_0x1adf7d[_0x9d50('0x4a')]('user_has_fax_interactions:remove',{'FaxInteractionId':Number(_0x4d469d[_0xdaac34]),'UserId':Number(_0x12ae02['id'])});}});}})[_0x9d50('0x17')](function(){if(_0x2a50f7==='leave'){var _0x331bc8=_[_0x9d50('0x18')](_0x12ae02[_0x9d50('0x29')],'id');return _0x12ae02[_0x9d50('0x50')](_0x331bc8)[_0x9d50('0x17')](function(){for(var _0x44f45d=0x0;_0x44f45d<_0x331bc8['length'];_0x44f45d+=0x1){_0x1adf7d[_0x9d50('0x4a')](_0x9d50('0x51'),{'SmsInteractionId':Number(_0x331bc8[_0x44f45d]),'UserId':Number(_0x12ae02['id'])});}});}})[_0x9d50('0x17')](function(){if(_0x2a50f7===_0x9d50('0x4c')){var _0x20289f=_[_0x9d50('0x18')](_0x12ae02[_0x9d50('0x2a')],'id');return _0x12ae02[_0x9d50('0x52')](_0x20289f)['then'](function(){for(var _0x2630ec=0x0;_0x2630ec<_0x20289f['length'];_0x2630ec+=0x1){_0x1adf7d['emit'](_0x9d50('0x53'),{'OpenchannelInteractionId':Number(_0x20289f[_0x2630ec]),'UserId':Number(_0x12ae02['id'])});}});}})['then'](function(){if(_0x2a50f7===_0x9d50('0x4c')){var _0x35f763=_['map'](_0x12ae02[_0x9d50('0x2c')],'id');return _0x12ae02[_0x9d50('0x54')](_0x35f763)['then'](function(){for(var _0x493396=0x0;_0x493396<_0x35f763[_0x9d50('0x1f')];_0x493396+=0x1){_0x1adf7d[_0x9d50('0x4a')](_0x9d50('0x55'),{'WhatsappInteractionId':Number(_0x35f763[_0x493396]),'UserId':Number(_0x12ae02['id'])});}});}})[_0x9d50('0x56')](function(_0xf13d1){_0xcb4fc8['log'](_0xf13d1);});}}function onDisconnect(_0x3f6ef6,_0x241713){joinOrLeave(_0x3f6ef6,'leave',_0x241713);}function onConnect(_0x445fb0){joinOrLeave(_0x445fb0,_0x9d50('0x57'));}exports[_0x9d50('0x58')]=function(_0x2b3273){_0x2b3273['on'](_0x9d50('0x59'),function(_0x67c3d4){_0x67c3d4[_0x9d50('0x5a')](0x0);_0x67c3d4[_0x9d50('0x5b')]=_0x67c3d4[_0x9d50('0x5c')][_0x9d50('0x59')][_0x9d50('0x5d')]+':'+_0x67c3d4['request']['connection'][_0x9d50('0x5e')];_0x67c3d4[_0x9d50('0x5f')]=new Date();_0x67c3d4[_0x9d50('0x60')]=function(_0x2c6d6d){console[_0x9d50('0x60')](_0x9d50('0x61')+_0x67c3d4[_0x9d50('0x62')][_0x9d50('0x4')]+'['+_0x67c3d4[_0x9d50('0x5b')]+']',_0x2c6d6d);};_0x67c3d4['on'](_0x9d50('0x63'),function(){onDisconnect(_0x67c3d4,_0x2b3273);_0x67c3d4['log'](_0x9d50('0x64'));});onConnect(_0x67c3d4);_0x67c3d4[_0x9d50('0x60')](_0x9d50('0x65'));});};
\ No newline at end of file
+var _0x042a=['where','type','format','%s:queue:%s','user:%s','handshake','query','find','userProfileId','ChatInteraction','ChatInteractions','MailInteractions','FaxInteraction','SmsInteraction','SmsInteractions','OpenchannelInteractions','WhatsappInteraction','WhatsappInteractions','admin','hasOwnProperty','include','push','ChatQueue','SmsQueue','MailQueue','WhatsappQueue','Trunk','voice:inbound','voice:outbound','VoiceQueue','FaxQueue','OpenchannelQueue','getVoiceQueues','getChatQueues','getFaxQueues','getSmsQueues','getMailQueues','getOpenchannelQueues','getWhatsappQueues','all','length','chat','sms','mail','whatsapp','telephone:%s','trunk:%s','campaign:%s:%s','leave','removeChatInteractions','emit','removeMailInteractions','user_has_mail_interactions:remove','FaxInteractions','removeFaxInteractions','user_has_fax_interactions:remove','removeSmsInteractions','user_has_sms_interactions:remove','removeWhatsappInteractions','catch','join','default','connection','remoteAddress','request','remotePort','connectedAt','log','SocketIO\x20','address','disconnect','DISCONNECTED','CONNECTED','lodash','bluebird','../mysqldb','./environment','Agents','User','name','role','agent','telephone','ivr','UserProfileSection','findOne','then','VoiceQueues','FaxQueues','MailQueues','OpenchannelQueues','WhatsappQueues','Telephones','findAll','Trunks','IvrCampaigns','UserProfileResource','map','resourceId','Campaign'];(function(_0x377255,_0x4c1405){var _0x1f6168=function(_0x4135aa){while(--_0x4135aa){_0x377255['push'](_0x377255['shift']());}};_0x1f6168(++_0x4c1405);}(_0x042a,0x1d9));var _0xa042=function(_0x1e32ad,_0x569118){_0x1e32ad=_0x1e32ad-0x0;var _0x5a185c=_0x042a[_0x1e32ad];return _0x5a185c;};'use strict';var _=require(_0xa042('0x0'));var util=require('util');var BPromise=require(_0xa042('0x1'));var db=require(_0xa042('0x2'))['db'];var config=require(_0xa042('0x3'));var queryQueues={'attributes':['id','name'],'include':[{'as':_0xa042('0x4'),'model':db[_0xa042('0x5')],'attributes':['id',_0xa042('0x6'),_0xa042('0x7')],'raw':!![],'where':{'role':_0xa042('0x8')},'required':![]}]};var queryTelephones={'raw':!![],'attributes':['id',_0xa042('0x6')],'where':{'role':_0xa042('0x9')}};var queryTrunks={'raw':!![],'attributes':['id',_0xa042('0x6')]};var queryAgents={'raw':!![],'attributes':['id','name'],'where':{'role':_0xa042('0x8')}};var queryCampaigns={'raw':!![],'attributes':['id',_0xa042('0x6'),'type'],'where':{'type':_0xa042('0xa')}};function getAssociatedResources(_0x533f67,_0x44da66,_0xd80124){return db[_0xa042('0xb')][_0xa042('0xc')]({'where':{'name':_0x533f67,'userProfileId':_0x44da66},'raw':!![]})[_0xa042('0xd')](function(_0x2146f3){if(_0x2146f3){if(_0x2146f3['autoAssociation']){switch(_0x533f67){case _0xa042('0xe'):case'ChatQueues':case _0xa042('0xf'):case'SmsQueues':case _0xa042('0x10'):case _0xa042('0x11'):case _0xa042('0x12'):return db[_0xd80124]['findAll'](queryQueues);case _0xa042('0x13'):return db[_0xd80124][_0xa042('0x14')](queryTelephones);case _0xa042('0x15'):return db[_0xd80124]['findAll'](queryTrunks);case _0xa042('0x16'):return db[_0xd80124][_0xa042('0x14')](queryCampaigns);}}else{return db[_0xa042('0x17')][_0xa042('0x14')]({'attributes':['resourceId'],'where':{'sectionId':_0x2146f3['id']},'raw':!![]})[_0xa042('0xd')](function(_0x37f2df){if(_0x37f2df){var _0x262d83={'where':{'id':_[_0xa042('0x18')](_0x37f2df,_0xa042('0x19'))},'raw':!![]};switch(_0xd80124){case _0xa042('0x5'):_0x262d83['where']['role']=_0xa042('0x9');break;case _0xa042('0x1a'):_0x262d83[_0xa042('0x1b')][_0xa042('0x1c')]=_0xa042('0xa');break;}return db[_0xd80124][_0xa042('0x14')](_0x262d83);}else{return[];}});}}else{return[];}})[_0xa042('0xd')](function(_0x47b784){return _0x47b784;});}function joinOrLeaveQueues(_0x4ad400,_0x514ba3,_0x57fc35,_0x52d815){_0x4ad400[_0x514ba3](util[_0xa042('0x1d')](_0xa042('0x1e'),_0x57fc35,_0x52d815[_0xa042('0x6')]));if(_0x52d815[_0xa042('0x4')]){for(var _0x1b76b0=0x0;_0x1b76b0<_0x52d815[_0xa042('0x4')]['length'];_0x1b76b0+=0x1){_0x4ad400[_0x514ba3](util[_0xa042('0x1d')](_0xa042('0x1f'),_0x52d815[_0xa042('0x4')][_0x1b76b0][_0xa042('0x6')]));}}}function joinOrLeave(_0x4f593f,_0x48cd0d,_0x40f174){var _0x384d9e;if(_0x4f593f[_0xa042('0x20')][_0xa042('0x21')]['id']){db[_0xa042('0x5')][_0xa042('0x22')]({'attributes':['id',_0xa042('0x6'),_0xa042('0x7'),_0xa042('0x23')],'where':{'id':_0x4f593f[_0xa042('0x20')][_0xa042('0x21')]['id']},'include':[{'model':db[_0xa042('0x24')],'as':_0xa042('0x25'),'attributes':['id'],'raw':!![]},{'model':db['MailInteraction'],'as':_0xa042('0x26'),'attributes':['id'],'raw':!![]},{'model':db[_0xa042('0x27')],'as':'FaxInteractions','attributes':['id'],'raw':!![]},{'model':db[_0xa042('0x28')],'as':_0xa042('0x29'),'attributes':['id'],'raw':!![]},{'model':db['OpenchannelInteraction'],'as':_0xa042('0x2a'),'attributes':['id'],'raw':!![]},{'model':db[_0xa042('0x2b')],'as':_0xa042('0x2c'),'attributes':['id'],'raw':!![]}]})[_0xa042('0xd')](function(_0x3baff3){if(_0x3baff3){_0x384d9e=_0x3baff3;_0x4f593f[_0x48cd0d](util[_0xa042('0x1d')](_0xa042('0x1f'),_0x3baff3[_0xa042('0x6')]));var _0x6192c1=[];switch(_0x3baff3[_0xa042('0x7')]){case _0xa042('0x2d'):_0x4f593f[_0x48cd0d]('voice:inbound');_0x4f593f[_0x48cd0d]('voice:outbound');if(queryQueues[_0xa042('0x2e')](_0xa042('0x2f'))){delete queryQueues[_0xa042('0x2f')];}_0x6192c1[_0xa042('0x30')](db['VoiceQueue'][_0xa042('0x14')](queryQueues));_0x6192c1['push'](db[_0xa042('0x31')][_0xa042('0x14')](queryQueues));_0x6192c1['push'](db['FaxQueue']['findAll'](queryQueues));_0x6192c1['push'](db[_0xa042('0x32')]['findAll'](queryQueues));_0x6192c1[_0xa042('0x30')](db[_0xa042('0x33')]['findAll'](queryQueues));_0x6192c1[_0xa042('0x30')](db['OpenchannelQueue']['findAll'](queryQueues));_0x6192c1[_0xa042('0x30')](db[_0xa042('0x34')][_0xa042('0x14')](queryQueues));_0x6192c1[_0xa042('0x30')](db[_0xa042('0x5')][_0xa042('0x14')](queryTelephones));_0x6192c1[_0xa042('0x30')](db[_0xa042('0x35')][_0xa042('0x14')](queryTrunks));_0x6192c1[_0xa042('0x30')](db[_0xa042('0x1a')]['findAll'](queryCampaigns));_0x6192c1['push'](db['User'][_0xa042('0x14')](queryAgents));break;case'user':_0x4f593f[_0x48cd0d](_0xa042('0x36'));_0x4f593f[_0x48cd0d](_0xa042('0x37'));_0x6192c1[_0xa042('0x30')](getAssociatedResources(_0xa042('0xe'),_0x3baff3['userProfileId'],_0xa042('0x38')));_0x6192c1['push'](getAssociatedResources('ChatQueues',_0x3baff3[_0xa042('0x23')],'ChatQueue'));_0x6192c1[_0xa042('0x30')](getAssociatedResources(_0xa042('0xf'),_0x3baff3[_0xa042('0x23')],_0xa042('0x39')));_0x6192c1[_0xa042('0x30')](getAssociatedResources('SmsQueues',_0x3baff3[_0xa042('0x23')],_0xa042('0x32')));_0x6192c1[_0xa042('0x30')](getAssociatedResources(_0xa042('0x10'),_0x3baff3[_0xa042('0x23')],_0xa042('0x33')));_0x6192c1[_0xa042('0x30')](getAssociatedResources(_0xa042('0x11'),_0x3baff3[_0xa042('0x23')],_0xa042('0x3a')));_0x6192c1[_0xa042('0x30')](getAssociatedResources(_0xa042('0x12'),_0x3baff3[_0xa042('0x23')],_0xa042('0x34')));_0x6192c1['push'](getAssociatedResources(_0xa042('0x13'),_0x3baff3[_0xa042('0x23')],'User'));_0x6192c1[_0xa042('0x30')](getAssociatedResources(_0xa042('0x15'),_0x3baff3[_0xa042('0x23')],_0xa042('0x35')));_0x6192c1[_0xa042('0x30')](getAssociatedResources('IvrCampaigns',_0x3baff3[_0xa042('0x23')],_0xa042('0x1a')));_0x6192c1[_0xa042('0x30')](db[_0xa042('0x5')][_0xa042('0x14')](queryAgents));break;case _0xa042('0x8'):_0x4f593f[_0x48cd0d](_0xa042('0x36'));_0x4f593f[_0x48cd0d](_0xa042('0x37'));_0x6192c1[_0xa042('0x30')](_0x3baff3[_0xa042('0x3b')]({'attributes':['id',_0xa042('0x6')]}));_0x6192c1['push'](_0x3baff3[_0xa042('0x3c')]({'attributes':['id',_0xa042('0x6')]}));_0x6192c1[_0xa042('0x30')](_0x3baff3[_0xa042('0x3d')]({'attributes':['id',_0xa042('0x6')]}));_0x6192c1['push'](_0x3baff3[_0xa042('0x3e')]({'attributes':['id',_0xa042('0x6')]}));_0x6192c1[_0xa042('0x30')](_0x3baff3[_0xa042('0x3f')]({'attributes':['id','name']}));_0x6192c1['push'](_0x3baff3[_0xa042('0x40')]({'attributes':['id',_0xa042('0x6')]}));_0x6192c1['push'](_0x3baff3[_0xa042('0x41')]({'attributes':['id',_0xa042('0x6')]}));break;}return BPromise[_0xa042('0x42')](_0x6192c1);}})[_0xa042('0xd')](function(_0x55fb70){if(_0x55fb70&&_0x55fb70[_0xa042('0x43')]){for(var _0x47a7c9=0x0;_0x47a7c9<_0x55fb70[_0xa042('0x43')];_0x47a7c9+=0x1){for(var _0x3b722c=0x0;_0x3b722c<_0x55fb70[_0x47a7c9][_0xa042('0x43')];_0x3b722c+=0x1){switch(_0x47a7c9){case 0x0:joinOrLeaveQueues(_0x4f593f,_0x48cd0d,'voice',_0x55fb70[_0x47a7c9][_0x3b722c]);break;case 0x1:joinOrLeaveQueues(_0x4f593f,_0x48cd0d,_0xa042('0x44'),_0x55fb70[_0x47a7c9][_0x3b722c]);break;case 0x2:joinOrLeaveQueues(_0x4f593f,_0x48cd0d,'fax',_0x55fb70[_0x47a7c9][_0x3b722c]);break;case 0x3:joinOrLeaveQueues(_0x4f593f,_0x48cd0d,_0xa042('0x45'),_0x55fb70[_0x47a7c9][_0x3b722c]);break;case 0x4:joinOrLeaveQueues(_0x4f593f,_0x48cd0d,_0xa042('0x46'),_0x55fb70[_0x47a7c9][_0x3b722c]);break;case 0x5:joinOrLeaveQueues(_0x4f593f,_0x48cd0d,'openchannel',_0x55fb70[_0x47a7c9][_0x3b722c]);break;case 0x6:joinOrLeaveQueues(_0x4f593f,_0x48cd0d,_0xa042('0x47'),_0x55fb70[_0x47a7c9][_0x3b722c]);break;case 0x7:if(_0x384d9e[_0xa042('0x7')]!==_0xa042('0x8'))_0x4f593f[_0x48cd0d](util[_0xa042('0x1d')](_0xa042('0x48'),_0x55fb70[_0x47a7c9][_0x3b722c]['name']));break;case 0x8:if(_0x384d9e[_0xa042('0x7')]!==_0xa042('0x8'))_0x4f593f[_0x48cd0d](util[_0xa042('0x1d')](_0xa042('0x49'),_0x55fb70[_0x47a7c9][_0x3b722c][_0xa042('0x6')]));break;case 0x9:if(_0x384d9e[_0xa042('0x7')]!==_0xa042('0x8'))_0x4f593f[_0x48cd0d](util[_0xa042('0x1d')](_0xa042('0x4a'),_0x55fb70[_0x47a7c9][_0x3b722c][_0xa042('0x1c')],_0x55fb70[_0x47a7c9][_0x3b722c]['name']));break;case 0xa:_0x4f593f[_0x48cd0d](util[_0xa042('0x1d')](_0xa042('0x1f'),_0x55fb70[_0x47a7c9][_0x3b722c][_0xa042('0x6')]));break;}}}}})[_0xa042('0xd')](function(){if(_0x48cd0d===_0xa042('0x4b')){var _0xb16c0f=_[_0xa042('0x18')](_0x384d9e['ChatInteractions'],'id');return _0x384d9e[_0xa042('0x4c')](_0xb16c0f)[_0xa042('0xd')](function(){for(var _0x70a69=0x0;_0x70a69<_0xb16c0f[_0xa042('0x43')];_0x70a69+=0x1){_0x40f174[_0xa042('0x4d')]('user_has_chat_interactions:remove',{'ChatInteractionId':Number(_0xb16c0f[_0x70a69]),'UserId':Number(_0x384d9e['id'])});}});}})[_0xa042('0xd')](function(){if(_0x48cd0d===_0xa042('0x4b')){var _0x44b217=_[_0xa042('0x18')](_0x384d9e['MailInteractions'],'id');return _0x384d9e[_0xa042('0x4e')](_0x44b217)[_0xa042('0xd')](function(){for(var _0x49f723=0x0;_0x49f723<_0x44b217[_0xa042('0x43')];_0x49f723+=0x1){_0x40f174[_0xa042('0x4d')](_0xa042('0x4f'),{'MailInteractionId':Number(_0x44b217[_0x49f723]),'UserId':Number(_0x384d9e['id'])});}});}})[_0xa042('0xd')](function(){if(_0x48cd0d===_0xa042('0x4b')){var _0x5d4b30=_[_0xa042('0x18')](_0x384d9e[_0xa042('0x50')],'id');return _0x384d9e[_0xa042('0x51')](_0x5d4b30)[_0xa042('0xd')](function(){for(var _0x2ee177=0x0;_0x2ee177<_0x5d4b30[_0xa042('0x43')];_0x2ee177+=0x1){_0x40f174[_0xa042('0x4d')](_0xa042('0x52'),{'FaxInteractionId':Number(_0x5d4b30[_0x2ee177]),'UserId':Number(_0x384d9e['id'])});}});}})[_0xa042('0xd')](function(){if(_0x48cd0d===_0xa042('0x4b')){var _0xa8400c=_[_0xa042('0x18')](_0x384d9e[_0xa042('0x29')],'id');return _0x384d9e[_0xa042('0x53')](_0xa8400c)[_0xa042('0xd')](function(){for(var _0x1fc2e0=0x0;_0x1fc2e0<_0xa8400c['length'];_0x1fc2e0+=0x1){_0x40f174[_0xa042('0x4d')](_0xa042('0x54'),{'SmsInteractionId':Number(_0xa8400c[_0x1fc2e0]),'UserId':Number(_0x384d9e['id'])});}});}})[_0xa042('0xd')](function(){if(_0x48cd0d==='leave'){var _0x1a5ab0=_[_0xa042('0x18')](_0x384d9e[_0xa042('0x2a')],'id');return _0x384d9e['removeOpenchannelInteractions'](_0x1a5ab0)[_0xa042('0xd')](function(){for(var _0xc288cf=0x0;_0xc288cf<_0x1a5ab0[_0xa042('0x43')];_0xc288cf+=0x1){_0x40f174['emit']('user_has_openchannel_interactions:remove',{'OpenchannelInteractionId':Number(_0x1a5ab0[_0xc288cf]),'UserId':Number(_0x384d9e['id'])});}});}})[_0xa042('0xd')](function(){if(_0x48cd0d===_0xa042('0x4b')){var _0x18c2e1=_['map'](_0x384d9e[_0xa042('0x2c')],'id');return _0x384d9e[_0xa042('0x55')](_0x18c2e1)[_0xa042('0xd')](function(){for(var _0x393cd0=0x0;_0x393cd0<_0x18c2e1['length'];_0x393cd0+=0x1){_0x40f174[_0xa042('0x4d')]('user_has_whatsapp_interactions:remove',{'WhatsappInteractionId':Number(_0x18c2e1[_0x393cd0]),'UserId':Number(_0x384d9e['id'])});}});}})[_0xa042('0x56')](function(_0x1cc2e1){_0x4f593f['log'](_0x1cc2e1);});}}function onDisconnect(_0x20fe79,_0x4475cf){joinOrLeave(_0x20fe79,_0xa042('0x4b'),_0x4475cf);}function onConnect(_0x19bafb){joinOrLeave(_0x19bafb,_0xa042('0x57'));}exports[_0xa042('0x58')]=function(_0x1cbb70){_0x1cbb70['on'](_0xa042('0x59'),function(_0x42abac){_0x42abac['setMaxListeners'](0x0);_0x42abac['address']=_0x42abac['request'][_0xa042('0x59')][_0xa042('0x5a')]+':'+_0x42abac[_0xa042('0x5b')]['connection'][_0xa042('0x5c')];_0x42abac[_0xa042('0x5d')]=new Date();_0x42abac[_0xa042('0x5e')]=function(_0x509c4d){console['log'](_0xa042('0x5f')+_0x42abac['nsp']['name']+'['+_0x42abac[_0xa042('0x60')]+']',_0x509c4d);};_0x42abac['on'](_0xa042('0x61'),function(){onDisconnect(_0x42abac,_0x1cbb70);_0x42abac[_0xa042('0x5e')](_0xa042('0x62'));});onConnect(_0x42abac);_0x42abac[_0xa042('0x5e')](_0xa042('0x63'));});};
\ No newline at end of file
index d85dfba..a3b507b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1a82=['callback','condition','../logger','triggers','client','http','Chat','ChatInteraction','afterCreate','newinteraction','afterUpdate','closedinteraction','ChatMessage','newmessage','ChatOfflineMessage','Sms','SmsInteraction','SmsMessage','Whatsapp','WhatsappInteraction','Fax','FaxInteraction','Mail','MailInteraction','Openchannel','OpenchannelInteraction','OpenchannelMessage','request','EventManager','then','info','Trigger,\x20%s','error','code','catch','channel','event','direction','resolve','ContactId','undefined','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','sequelize','query','QueryTypes','interface','format','name','agent','AfterCreateMessage','motionChannel','offlineMessage','get','opened','Sequelize','contact','UserId','changed','closed','substatus','SELECT','SIP/%s','AfterUpdate','User','find','fullname','email','default','length','hasOwnProperty','model','hook'];(function(_0x346737,_0x3e6081){var _0x1ade2e=function(_0x15e50e){while(--_0x15e50e){_0x346737['push'](_0x346737['shift']());}};_0x1ade2e(++_0x3e6081);}(_0x1a82,0x16a));var _0x21a8=function(_0x2aee2f,_0xad9887){_0x2aee2f=_0x2aee2f-0x0;var _0x19337f=_0x1a82[_0x2aee2f];return _0x19337f;};'use strict';var util=require('util');var db=require('../../mysqldb')['db'];var jayson=require('jayson/promise');var logger=require(_0x21a8('0x0'))(_0x21a8('0x1'));var client=jayson[_0x21a8('0x2')][_0x21a8('0x3')]({'port':0x232a});var triggers=[{'channel':_0x21a8('0x4'),'model':_0x21a8('0x5'),'event':_0x21a8('0x6'),'condition':_0x21a8('0x7'),'callback':afterCreate},{'channel':_0x21a8('0x4'),'model':'ChatInteraction','event':_0x21a8('0x8'),'condition':_0x21a8('0x9'),'callback':afterUpdate},{'channel':'Chat','model':_0x21a8('0xa'),'event':_0x21a8('0x6'),'condition':_0x21a8('0xb'),'callback':afterCreateMessage},{'channel':_0x21a8('0x4'),'model':_0x21a8('0xc'),'event':_0x21a8('0x6'),'condition':_0x21a8('0xb'),'callback':afterCreateOfflineMessage},{'channel':_0x21a8('0xd'),'model':_0x21a8('0xe'),'event':_0x21a8('0x6'),'condition':'newinteraction','callback':afterCreate},{'channel':_0x21a8('0xd'),'model':_0x21a8('0xe'),'event':'afterUpdate','condition':_0x21a8('0x9'),'callback':afterUpdate},{'channel':_0x21a8('0xd'),'model':_0x21a8('0xf'),'event':_0x21a8('0x6'),'condition':_0x21a8('0xb'),'callback':afterCreateMessage},{'channel':_0x21a8('0x10'),'model':'WhatsappInteraction','event':_0x21a8('0x6'),'condition':'newinteraction','callback':afterCreate},{'channel':'Whatsapp','model':_0x21a8('0x11'),'event':'afterUpdate','condition':_0x21a8('0x9'),'callback':afterUpdate},{'channel':'Whatsapp','model':'WhatsappMessage','event':_0x21a8('0x6'),'condition':_0x21a8('0xb'),'callback':afterCreateMessage},{'channel':_0x21a8('0x12'),'model':_0x21a8('0x13'),'event':_0x21a8('0x6'),'condition':_0x21a8('0x7'),'callback':afterCreate},{'channel':_0x21a8('0x12'),'model':_0x21a8('0x13'),'event':_0x21a8('0x8'),'condition':_0x21a8('0x9'),'callback':afterUpdate},{'channel':_0x21a8('0x12'),'model':'FaxMessage','event':_0x21a8('0x6'),'condition':_0x21a8('0xb'),'callback':afterCreateMessage},{'channel':_0x21a8('0x14'),'model':'MailInteraction','event':_0x21a8('0x6'),'condition':_0x21a8('0x7'),'callback':afterCreate},{'channel':_0x21a8('0x14'),'model':_0x21a8('0x15'),'event':_0x21a8('0x8'),'condition':'closedinteraction','callback':afterUpdate},{'channel':_0x21a8('0x14'),'model':'MailMessage','event':_0x21a8('0x6'),'condition':_0x21a8('0xb'),'callback':afterCreateMessage},{'channel':_0x21a8('0x16'),'model':'OpenchannelInteraction','event':_0x21a8('0x6'),'condition':_0x21a8('0x7'),'callback':afterCreate},{'channel':_0x21a8('0x16'),'model':_0x21a8('0x17'),'event':_0x21a8('0x8'),'condition':_0x21a8('0x9'),'callback':afterUpdate},{'channel':'Openchannel','model':_0x21a8('0x18'),'event':_0x21a8('0x6'),'condition':_0x21a8('0xb'),'callback':afterCreateMessage}];function request(_0x2c61c9){return client[_0x21a8('0x19')](_0x21a8('0x1a'),_0x2c61c9)[_0x21a8('0x1b')](function(_0x573ce0){logger[_0x21a8('0x1c')](_0x21a8('0x1d'),_0x21a8('0x1a'),_0x573ce0);if(_0x573ce0[_0x21a8('0x1e')]){if(_0x573ce0[_0x21a8('0x1e')][_0x21a8('0x1f')]===0x1f4){logger[_0x21a8('0x1e')](_0x21a8('0x1d'),_0x21a8('0x1a'),_0x573ce0[_0x21a8('0x1e')]);}}})[_0x21a8('0x20')](function(_0x5416bd){logger[_0x21a8('0x1e')]('Trigger,\x20%s',_0x21a8('0x1a'),_0x5416bd);});}function afterCreateMessage(_0xaacc10){return function(_0xab8395){_0xab8395=_0xab8395['get']({'plain':!![]});_0xab8395[_0x21a8('0x21')]=_0xaacc10;_0xab8395['motionChannel']=_0xaacc10;_0xab8395[_0x21a8('0x22')]=_0xab8395[_0x21a8('0x23')];Promise[_0x21a8('0x24')]()[_0x21a8('0x1b')](function(){if(typeof _0xab8395[_0x21a8('0x25')]===_0x21a8('0x26'))return null;var _0x8e3792=_0x21a8('0x27')+_0xab8395[_0x21a8('0x25')];return db[_0x21a8('0x28')][_0x21a8('0x29')](_0x8e3792,{'type':db['Sequelize'][_0x21a8('0x2a')]['SELECT'],'raw':!![]});})['then'](function(_0xd3fb3f){if(_0xd3fb3f){_0xab8395['contact']=_0xd3fb3f[0x0];}if(typeof _0xab8395['UserId']===_0x21a8('0x26'))return;return getAgent(_0xab8395['UserId']);})[_0x21a8('0x1b')](function(_0x247bce){if(_0x247bce){_0xab8395[_0x21a8('0x2b')]=util[_0x21a8('0x2c')]('SIP/%s',_0x247bce[_0x21a8('0x2d')]);_0xab8395[_0x21a8('0x2e')]=_0x247bce;_0xab8395['channel']=_0xaacc10;return request({'event':'incomingmessage','message':_0xab8395});}else{return request({'event':'outgoingmessage','message':_0xab8395});}})['catch'](function(_0x193e01){logger[_0x21a8('0x1e')](_0x21a8('0x1d'),_0x21a8('0x2f'),_0x193e01);});};}function afterCreateOfflineMessage(_0x8fd6e5){return function(_0x5610dd){_0x5610dd=_0x5610dd['get']({'plain':!![]});_0x5610dd[_0x21a8('0x21')]=_0x8fd6e5;_0x5610dd[_0x21a8('0x30')]=_0x8fd6e5;_0x5610dd[_0x21a8('0x22')]=_0x21a8('0x31');return request({'event':_0x5610dd[_0x21a8('0x22')],'message':_0x5610dd});};}function afterCreate(_0x2fb4df,_0x5a4c3c){return function(_0x13bf24){_0x13bf24=_0x13bf24[_0x21a8('0x32')]({'plain':!![]});_0x13bf24[_0x21a8('0x21')]=_0x2fb4df;_0x13bf24[_0x21a8('0x30')]=_0x2fb4df;_0x13bf24['event']=_0x21a8('0x33');Promise[_0x21a8('0x24')]()['then'](function(){var _0x49b8c1=_0x21a8('0x27')+_0x13bf24[_0x21a8('0x25')];return db[_0x21a8('0x28')][_0x21a8('0x29')](_0x49b8c1,{'type':db[_0x21a8('0x34')][_0x21a8('0x2a')]['SELECT'],'raw':!![]});})[_0x21a8('0x1b')](function(_0x4ef704){if(_0x4ef704){_0x13bf24[_0x21a8('0x35')]=_0x4ef704[0x0];}if(typeof _0x13bf24[_0x21a8('0x36')]===_0x21a8('0x26'))return;return getAgent(_0x13bf24['UserId']);})[_0x21a8('0x1b')](function(_0x3dacb2){if(_0x3dacb2){_0x13bf24[_0x21a8('0x2b')]=util[_0x21a8('0x2c')]('SIP/%s',_0x3dacb2['name']);_0x13bf24['agent']=_0x3dacb2;}return request({'event':_0x5a4c3c,'message':_0x13bf24});})['catch'](function(_0x1e461b){logger[_0x21a8('0x1e')](_0x21a8('0x1d'),'AfterCreate',_0x1e461b);});};}function afterUpdate(_0x33f85b){return function(_0x4433db){var _0x4ebe80=_0x4433db[_0x21a8('0x37')](_0x21a8('0x38'))&&_0x4433db['closed'];var _0x363c29=_0x4433db[_0x21a8('0x37')](_0x21a8('0x39'));if(_0x4ebe80||_0x363c29){var _0x4f86d9=_0x4ebe80?_0x21a8('0x9'):'substatus';var _0x22460b=_0x4433db[_0x21a8('0x32')]({'plain':!![]});_0x22460b[_0x21a8('0x21')]=_0x33f85b;_0x22460b[_0x21a8('0x30')]=_0x33f85b;_0x22460b[_0x21a8('0x22')]=_0x4ebe80?_0x21a8('0x38'):_0x21a8('0x39');var _0x4dc4d7='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x22460b[_0x21a8('0x25')];return db[_0x21a8('0x28')][_0x21a8('0x29')](_0x4dc4d7,{'type':db[_0x21a8('0x34')][_0x21a8('0x2a')][_0x21a8('0x3a')],'raw':!![]})['then'](function(_0x49d2c9){if(_0x49d2c9){_0x22460b[_0x21a8('0x35')]=_0x49d2c9[0x0];}if(typeof _0x22460b['UserId']===_0x21a8('0x26'))return;return getAgent(_0x22460b[_0x21a8('0x36')]);})[_0x21a8('0x1b')](function(_0x3cd1aa){if(_0x3cd1aa){_0x22460b[_0x21a8('0x2b')]=util[_0x21a8('0x2c')](_0x21a8('0x3b'),_0x3cd1aa[_0x21a8('0x2d')]);_0x22460b[_0x21a8('0x2e')]=_0x3cd1aa;}return request({'event':_0x4f86d9,'message':_0x22460b});})[_0x21a8('0x20')](function(_0x569676){logger[_0x21a8('0x1e')](_0x21a8('0x1d'),_0x21a8('0x3c'),_0x569676);});}};}function getAgent(_0x193b05){return db[_0x21a8('0x3d')][_0x21a8('0x3e')]({'where':{'id':_0x193b05},'attributes':['id',_0x21a8('0x2d'),_0x21a8('0x3f'),_0x21a8('0x40'),'internal'],'raw':!![]})['then'](function(_0x4327a1){return _0x4327a1;});}exports[_0x21a8('0x41')]=function(){for(var _0x21f7cb=0x0;_0x21f7cb<triggers[_0x21a8('0x42')];_0x21f7cb+=0x1){if(db[_0x21a8('0x43')](triggers[_0x21f7cb]['model'])){db[triggers[_0x21f7cb][_0x21a8('0x44')]][_0x21a8('0x45')](triggers[_0x21f7cb][_0x21a8('0x22')],triggers[_0x21f7cb][_0x21a8('0x46')](triggers[_0x21f7cb][_0x21a8('0x21')]['toLowerCase'](),triggers[_0x21f7cb][_0x21a8('0x47')]));}}};
\ No newline at end of file
+var _0xf102=['FaxInteraction','FaxMessage','Mail','MailInteraction','Openchannel','OpenchannelInteraction','OpenchannelMessage','request','then','EventManager','error','code','Trigger,\x20%s','catch','get','channel','event','direction','resolve','ContactId','undefined','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','sequelize','query','QueryTypes','SELECT','contact','UserId','interface','name','agent','incomingmessage','AfterCreateMessage','motionChannel','offlineMessage','opened','Sequelize','format','SIP/%s','changed','closed','substatus','AfterUpdate','User','find','email','internal','default','length','model','toLowerCase','../../mysqldb','jayson/promise','triggers','client','Chat','ChatInteraction','afterCreate','afterUpdate','closedinteraction','ChatMessage','newmessage','ChatOfflineMessage','SmsInteraction','newinteraction','Sms','SmsMessage','Whatsapp','WhatsappInteraction','WhatsappMessage','Fax'];(function(_0x858407,_0x255b18){var _0x6821a8=function(_0x2a4758){while(--_0x2a4758){_0x858407['push'](_0x858407['shift']());}};_0x6821a8(++_0x255b18);}(_0xf102,0x108));var _0x2f10=function(_0x1505e5,_0x5cc291){_0x1505e5=_0x1505e5-0x0;var _0x5b1dcd=_0xf102[_0x1505e5];return _0x5b1dcd;};'use strict';var util=require('util');var db=require(_0x2f10('0x0'))['db'];var jayson=require(_0x2f10('0x1'));var logger=require('../logger')(_0x2f10('0x2'));var client=jayson[_0x2f10('0x3')]['http']({'port':0x232a});var triggers=[{'channel':_0x2f10('0x4'),'model':_0x2f10('0x5'),'event':_0x2f10('0x6'),'condition':'newinteraction','callback':afterCreate},{'channel':_0x2f10('0x4'),'model':_0x2f10('0x5'),'event':_0x2f10('0x7'),'condition':_0x2f10('0x8'),'callback':afterUpdate},{'channel':_0x2f10('0x4'),'model':_0x2f10('0x9'),'event':_0x2f10('0x6'),'condition':_0x2f10('0xa'),'callback':afterCreateMessage},{'channel':_0x2f10('0x4'),'model':_0x2f10('0xb'),'event':_0x2f10('0x6'),'condition':_0x2f10('0xa'),'callback':afterCreateOfflineMessage},{'channel':'Sms','model':_0x2f10('0xc'),'event':_0x2f10('0x6'),'condition':_0x2f10('0xd'),'callback':afterCreate},{'channel':_0x2f10('0xe'),'model':_0x2f10('0xc'),'event':_0x2f10('0x7'),'condition':_0x2f10('0x8'),'callback':afterUpdate},{'channel':'Sms','model':_0x2f10('0xf'),'event':'afterCreate','condition':_0x2f10('0xa'),'callback':afterCreateMessage},{'channel':_0x2f10('0x10'),'model':_0x2f10('0x11'),'event':_0x2f10('0x6'),'condition':'newinteraction','callback':afterCreate},{'channel':_0x2f10('0x10'),'model':_0x2f10('0x11'),'event':_0x2f10('0x7'),'condition':'closedinteraction','callback':afterUpdate},{'channel':'Whatsapp','model':_0x2f10('0x12'),'event':_0x2f10('0x6'),'condition':_0x2f10('0xa'),'callback':afterCreateMessage},{'channel':_0x2f10('0x13'),'model':_0x2f10('0x14'),'event':_0x2f10('0x6'),'condition':_0x2f10('0xd'),'callback':afterCreate},{'channel':_0x2f10('0x13'),'model':_0x2f10('0x14'),'event':_0x2f10('0x7'),'condition':_0x2f10('0x8'),'callback':afterUpdate},{'channel':_0x2f10('0x13'),'model':_0x2f10('0x15'),'event':'afterCreate','condition':_0x2f10('0xa'),'callback':afterCreateMessage},{'channel':_0x2f10('0x16'),'model':_0x2f10('0x17'),'event':'afterCreate','condition':'newinteraction','callback':afterCreate},{'channel':'Mail','model':_0x2f10('0x17'),'event':_0x2f10('0x7'),'condition':_0x2f10('0x8'),'callback':afterUpdate},{'channel':_0x2f10('0x16'),'model':'MailMessage','event':'afterCreate','condition':'newmessage','callback':afterCreateMessage},{'channel':_0x2f10('0x18'),'model':_0x2f10('0x19'),'event':_0x2f10('0x6'),'condition':_0x2f10('0xd'),'callback':afterCreate},{'channel':_0x2f10('0x18'),'model':_0x2f10('0x19'),'event':_0x2f10('0x7'),'condition':_0x2f10('0x8'),'callback':afterUpdate},{'channel':_0x2f10('0x18'),'model':_0x2f10('0x1a'),'event':'afterCreate','condition':_0x2f10('0xa'),'callback':afterCreateMessage}];function request(_0x4a13db){return client[_0x2f10('0x1b')]('EventManager',_0x4a13db)[_0x2f10('0x1c')](function(_0x4c7b70){logger['info']('Trigger,\x20%s',_0x2f10('0x1d'),_0x4c7b70);if(_0x4c7b70[_0x2f10('0x1e')]){if(_0x4c7b70[_0x2f10('0x1e')][_0x2f10('0x1f')]===0x1f4){logger['error'](_0x2f10('0x20'),'EventManager',_0x4c7b70['error']);}}})[_0x2f10('0x21')](function(_0xce58b5){logger[_0x2f10('0x1e')](_0x2f10('0x20'),_0x2f10('0x1d'),_0xce58b5);});}function afterCreateMessage(_0x580a08){return function(_0x2694c3){_0x2694c3=_0x2694c3[_0x2f10('0x22')]({'plain':!![]});_0x2694c3[_0x2f10('0x23')]=_0x580a08;_0x2694c3['motionChannel']=_0x580a08;_0x2694c3[_0x2f10('0x24')]=_0x2694c3[_0x2f10('0x25')];Promise[_0x2f10('0x26')]()[_0x2f10('0x1c')](function(){if(typeof _0x2694c3[_0x2f10('0x27')]===_0x2f10('0x28'))return null;var _0x5a7e0f=_0x2f10('0x29')+_0x2694c3[_0x2f10('0x27')];return db[_0x2f10('0x2a')][_0x2f10('0x2b')](_0x5a7e0f,{'type':db['Sequelize'][_0x2f10('0x2c')][_0x2f10('0x2d')],'raw':!![]});})[_0x2f10('0x1c')](function(_0x1c77cb){if(_0x1c77cb){_0x2694c3[_0x2f10('0x2e')]=_0x1c77cb[0x0];}if(typeof _0x2694c3[_0x2f10('0x2f')]==='undefined')return;return getAgent(_0x2694c3['UserId']);})[_0x2f10('0x1c')](function(_0xcedd16){if(_0xcedd16){_0x2694c3[_0x2f10('0x30')]=util['format']('SIP/%s',_0xcedd16[_0x2f10('0x31')]);_0x2694c3[_0x2f10('0x32')]=_0xcedd16;_0x2694c3[_0x2f10('0x23')]=_0x580a08;return request({'event':_0x2f10('0x33'),'message':_0x2694c3});}else{return request({'event':'outgoingmessage','message':_0x2694c3});}})[_0x2f10('0x21')](function(_0x552856){logger[_0x2f10('0x1e')](_0x2f10('0x20'),_0x2f10('0x34'),_0x552856);});};}function afterCreateOfflineMessage(_0x148bfb){return function(_0x39b6ff){_0x39b6ff=_0x39b6ff[_0x2f10('0x22')]({'plain':!![]});_0x39b6ff[_0x2f10('0x23')]=_0x148bfb;_0x39b6ff[_0x2f10('0x35')]=_0x148bfb;_0x39b6ff[_0x2f10('0x24')]=_0x2f10('0x36');return request({'event':_0x39b6ff[_0x2f10('0x24')],'message':_0x39b6ff});};}function afterCreate(_0x21aa98,_0x425ec5){return function(_0x4e40fe){_0x4e40fe=_0x4e40fe[_0x2f10('0x22')]({'plain':!![]});_0x4e40fe[_0x2f10('0x23')]=_0x21aa98;_0x4e40fe['motionChannel']=_0x21aa98;_0x4e40fe[_0x2f10('0x24')]=_0x2f10('0x37');Promise[_0x2f10('0x26')]()[_0x2f10('0x1c')](function(){var _0x1ce72e=_0x2f10('0x29')+_0x4e40fe['ContactId'];return db[_0x2f10('0x2a')][_0x2f10('0x2b')](_0x1ce72e,{'type':db[_0x2f10('0x38')]['QueryTypes'][_0x2f10('0x2d')],'raw':!![]});})[_0x2f10('0x1c')](function(_0x579fb1){if(_0x579fb1){_0x4e40fe[_0x2f10('0x2e')]=_0x579fb1[0x0];}if(typeof _0x4e40fe[_0x2f10('0x2f')]===_0x2f10('0x28'))return;return getAgent(_0x4e40fe[_0x2f10('0x2f')]);})[_0x2f10('0x1c')](function(_0x4a9652){if(_0x4a9652){_0x4e40fe['interface']=util[_0x2f10('0x39')](_0x2f10('0x3a'),_0x4a9652['name']);_0x4e40fe[_0x2f10('0x32')]=_0x4a9652;}return request({'event':_0x425ec5,'message':_0x4e40fe});})[_0x2f10('0x21')](function(_0x2c2180){logger['error'](_0x2f10('0x20'),'AfterCreate',_0x2c2180);});};}function afterUpdate(_0x40c659){return function(_0x1baad5){var _0x383689=_0x1baad5[_0x2f10('0x3b')](_0x2f10('0x3c'))&&_0x1baad5[_0x2f10('0x3c')];var _0xe4c800=_0x1baad5[_0x2f10('0x3b')](_0x2f10('0x3d'));if(_0x383689||_0xe4c800){var _0x3f8992=_0x383689?_0x2f10('0x8'):_0x2f10('0x3d');var _0x56b3e4=_0x1baad5[_0x2f10('0x22')]({'plain':!![]});_0x56b3e4[_0x2f10('0x23')]=_0x40c659;_0x56b3e4[_0x2f10('0x35')]=_0x40c659;_0x56b3e4[_0x2f10('0x24')]=_0x383689?_0x2f10('0x3c'):'substatus';var _0x1776f2=_0x2f10('0x29')+_0x56b3e4[_0x2f10('0x27')];return db[_0x2f10('0x2a')]['query'](_0x1776f2,{'type':db[_0x2f10('0x38')][_0x2f10('0x2c')]['SELECT'],'raw':!![]})[_0x2f10('0x1c')](function(_0x3438df){if(_0x3438df){_0x56b3e4[_0x2f10('0x2e')]=_0x3438df[0x0];}if(typeof _0x56b3e4[_0x2f10('0x2f')]===_0x2f10('0x28'))return;return getAgent(_0x56b3e4[_0x2f10('0x2f')]);})[_0x2f10('0x1c')](function(_0x354203){if(_0x354203){_0x56b3e4['interface']=util[_0x2f10('0x39')](_0x2f10('0x3a'),_0x354203[_0x2f10('0x31')]);_0x56b3e4[_0x2f10('0x32')]=_0x354203;}return request({'event':_0x3f8992,'message':_0x56b3e4});})[_0x2f10('0x21')](function(_0xa0e201){logger[_0x2f10('0x1e')](_0x2f10('0x20'),_0x2f10('0x3e'),_0xa0e201);});}};}function getAgent(_0x19959b){return db[_0x2f10('0x3f')][_0x2f10('0x40')]({'where':{'id':_0x19959b},'attributes':['id',_0x2f10('0x31'),'fullname',_0x2f10('0x41'),_0x2f10('0x42')],'raw':!![]})['then'](function(_0x5dcab2){return _0x5dcab2;});}exports[_0x2f10('0x43')]=function(){for(var _0x82f58=0x0;_0x82f58<triggers[_0x2f10('0x44')];_0x82f58+=0x1){if(db['hasOwnProperty'](triggers[_0x82f58][_0x2f10('0x45')])){db[triggers[_0x82f58][_0x2f10('0x45')]]['hook'](triggers[_0x82f58][_0x2f10('0x24')],triggers[_0x82f58]['callback'](triggers[_0x82f58][_0x2f10('0x23')][_0x2f10('0x46')](),triggers[_0x82f58]['condition']));}}};
\ No newline at end of file
index e016290..e70575d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc766=['getLicense','role','count','agent','then','agents','Maximum\x20login\x20has\x20been\x20reached','catch','lodash','bluebird','../mysqldb','./license/util','voice','mail','fax','whatsapp','openchannel','toLowerCase','includes','clearBlockUser','isUndefined','updateAttributes'];(function(_0x2eafef,_0xcc191a){var _0x424798=function(_0x2da6e1){while(--_0x2da6e1){_0x2eafef['push'](_0x2eafef['shift']());}};_0x424798(++_0xcc191a);}(_0xc766,0x152));var _0x6c76=function(_0x494b1e,_0x13e9b7){_0x494b1e=_0x494b1e-0x0;var _0x4ab0c6=_0xc766[_0x494b1e];return _0x4ab0c6;};'use strict';var _=require(_0x6c76('0x0'));var BPromise=require(_0x6c76('0x1'));var db=require(_0x6c76('0x2'))['db'];var util=require(_0x6c76('0x3'));var channels=[_0x6c76('0x4'),_0x6c76('0x5'),'chat',_0x6c76('0x6'),'sms',_0x6c76('0x7'),_0x6c76('0x8')];exports['getChannels']=function(){return channels;};exports['isValidChannel']=function(_0x5aa28a){_0x5aa28a=_0x5aa28a[_0x6c76('0x9')]();return _[_0x6c76('0xa')](channels,_0x5aa28a);};exports[_0x6c76('0xb')]=function(_0x55500e,_0x8e9c3f,_0x2d260a,_0x5784b0){var _0x17698c={'loginAttempts':_0x8e9c3f,'blocked':_0x2d260a};if(!_[_0x6c76('0xc')](_0x5784b0)){_0x17698c['blockedAt']=_0x5784b0;}return _0x55500e[_0x6c76('0xd')](_0x17698c);};exports[_0x6c76('0xe')]=function(_0x178326){return new BPromise(function(_0x199762,_0x3851f2){var _0x216e89=0x0;if(_0x178326[_0x6c76('0xf')]!=='agent'){_0x199762(_0x178326);}db['User'][_0x6c76('0x10')]({'where':{'role':_0x6c76('0x11'),'online':!![],'id':{'$ne':_0x178326['id']}}})['then'](function(_0x11ca06){_0x216e89=_0x11ca06;return util[_0x6c76('0xe')]();})[_0x6c76('0x12')](function(_0x2347b8){if(_0x2347b8&&_0x2347b8[_0x6c76('0x13')]&&_0x216e89>=_0x2347b8[_0x6c76('0x13')]){throw Error(_0x6c76('0x14'));}_0x199762(_0x178326);})[_0x6c76('0x15')](function(_0x571ce5){_0x3851f2(_0x571ce5);});});};
\ No newline at end of file
+var _0x45bf=['updateAttributes','getLicense','agent','User','count','then','agents','catch','lodash','bluebird','./license/util','mail','chat','sms','whatsapp','openchannel','getChannels','isValidChannel','toLowerCase','includes','isUndefined','blockedAt'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x45bf,0x1d6));var _0xf45b=function(_0x5f49c0,_0x27a1b4){_0x5f49c0=_0x5f49c0-0x0;var _0x5ab653=_0x45bf[_0x5f49c0];return _0x5ab653;};'use strict';var _=require(_0xf45b('0x0'));var BPromise=require(_0xf45b('0x1'));var db=require('../mysqldb')['db'];var util=require(_0xf45b('0x2'));var channels=['voice',_0xf45b('0x3'),_0xf45b('0x4'),'fax',_0xf45b('0x5'),_0xf45b('0x6'),_0xf45b('0x7')];exports[_0xf45b('0x8')]=function(){return channels;};exports[_0xf45b('0x9')]=function(_0xb9d167){_0xb9d167=_0xb9d167[_0xf45b('0xa')]();return _[_0xf45b('0xb')](channels,_0xb9d167);};exports['clearBlockUser']=function(_0x5ec31d,_0x4bbe0a,_0x3a7d9e,_0x3477f4){var _0x10f0e3={'loginAttempts':_0x4bbe0a,'blocked':_0x3a7d9e};if(!_[_0xf45b('0xc')](_0x3477f4)){_0x10f0e3[_0xf45b('0xd')]=_0x3477f4;}return _0x5ec31d[_0xf45b('0xe')](_0x10f0e3);};exports[_0xf45b('0xf')]=function(_0x2e9cfc){return new BPromise(function(_0x2ab103,_0x33606a){var _0x446ed4=0x0;if(_0x2e9cfc['role']!==_0xf45b('0x10')){_0x2ab103(_0x2e9cfc);}db[_0xf45b('0x11')][_0xf45b('0x12')]({'where':{'role':_0xf45b('0x10'),'online':!![],'id':{'$ne':_0x2e9cfc['id']}}})[_0xf45b('0x13')](function(_0x318d64){_0x446ed4=_0x318d64;return util[_0xf45b('0xf')]();})['then'](function(_0x326e33){if(_0x326e33&&_0x326e33[_0xf45b('0x14')]&&_0x446ed4>=_0x326e33[_0xf45b('0x14')]){throw Error('Maximum\x20login\x20has\x20been\x20reached');}_0x2ab103(_0x2e9cfc);})[_0xf45b('0x15')](function(_0x51a4bf){_0x33606a(_0x51a4bf);});});};
\ No newline at end of file
index 3c378bf..1c48fe1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7c71=['name','Error','inherits','Bad\x20Request','Forbidden','Not\x20Found','code','details','Resource\x20Conflict','Conflict','Out\x20Of\x20Interval','statusMessage','status','send','exports','util','message','Internal\x20Server\x20Error'];(function(_0x203028,_0x30f456){var _0x40f10d=function(_0x3af107){while(--_0x3af107){_0x203028['push'](_0x203028['shift']());}};_0x40f10d(++_0x30f456);}(_0x7c71,0xe7));var _0x17c7=function(_0x466e57,_0x21b819){_0x466e57=_0x466e57-0x0;var _0x34df42=_0x7c71[_0x466e57];return _0x34df42;};'use strict';var util=require(_0x17c7('0x0'));var logger=require('../config/logger')('api');var APIError=function(_0x3c34c3,_0x131b65){this[_0x17c7('0x1')]=_0x3c34c3||_0x17c7('0x2');this[_0x17c7('0x3')]=_0x131b65||_0x17c7('0x4');util[_0x17c7('0x5')](APIError,Error);};var APIBadRequestError=function(_0x5f0c52){this[_0x17c7('0x1')]=_0x5f0c52||_0x17c7('0x6');this['name']='Bad\x20Request';util[_0x17c7('0x5')](APIBadRequestError,APIError);};var APIForbiddenError=function(_0x1dbe7f){this[_0x17c7('0x1')]=_0x1dbe7f||'Forbidden';this[_0x17c7('0x3')]=_0x17c7('0x7');util['inherits'](APIForbiddenError,APIError);};var APINotFoundError=function(_0x362e9f){this[_0x17c7('0x1')]=_0x362e9f||'Entity\x20not\x20found';this['name']=_0x17c7('0x8');util[_0x17c7('0x5')](APINotFoundError,APIError);};var APIOutOfIntervalError=function(_0x3ac91a){this[_0x17c7('0x1')]=_0x3ac91a||'Message\x20sent\x20outside\x20a\x20valid\x20interval';this[_0x17c7('0x3')]='Out\x20Of\x20Interval';this[_0x17c7('0x9')]=0x193;this[_0x17c7('0xa')]={'type':'OutOfInterval'};util['inherits'](APIOutOfIntervalError,APIError);};var APIConflictError=function(_0x22bae8){this[_0x17c7('0x1')]=_0x22bae8||_0x17c7('0xb');this[_0x17c7('0x3')]=_0x17c7('0xc');util[_0x17c7('0x5')](APIBadRequestError,APIError);};function getStatusCode(_0x3e6504){switch(_0x3e6504){case _0x17c7('0x6'):return 0x190;case _0x17c7('0x7'),'Out\x20Of\x20Interval':return 0x193;case _0x17c7('0x8'):return 0x194;case'Conflict':return 0x199;default:return 0x1f4;}}function getCustomStatusMessage(_0x189c55){if(_0x189c55===_0x17c7('0xd'))return _0x189c55;return null;}function handleError(_0x4f9451){return function(_0x5521c0){logger['error'](_0x5521c0['stack']);var _0x233548=getStatusCode(_0x5521c0['name']);var _0x5a04e1=getCustomStatusMessage(_0x5521c0[_0x17c7('0x3')]);if(_0x5521c0['name']){delete _0x5521c0[_0x17c7('0x3')];}if(_0x5a04e1){_0x4f9451[_0x17c7('0xe')]=_0x5a04e1;}return _0x4f9451[_0x17c7('0xf')](_0x233548)[_0x17c7('0x10')](_0x5521c0);};}module[_0x17c7('0x11')]={'APIError':APIError,'APIBadRequestError':APIBadRequestError,'APIForbiddenError':APIForbiddenError,'APINotFoundError':APINotFoundError,'APIOutOfIntervalError':APIOutOfIntervalError,'APIConflict':APIConflictError,'handleError':handleError};
\ No newline at end of file
+var _0xf242=['status','exports','../config/logger','api','message','Internal\x20Server\x20Error','name','inherits','Bad\x20Request','Forbidden','Entity\x20not\x20found','Not\x20Found','Message\x20sent\x20outside\x20a\x20valid\x20interval','Out\x20Of\x20Interval','code','details','OutOfInterval','Resource\x20Conflict','Conflict','error','stack'];(function(_0xca1f0e,_0x2713d5){var _0x35e4ef=function(_0x44c40f){while(--_0x44c40f){_0xca1f0e['push'](_0xca1f0e['shift']());}};_0x35e4ef(++_0x2713d5);}(_0xf242,0x1e5));var _0x2f24=function(_0x45b1ba,_0x5a6a21){_0x45b1ba=_0x45b1ba-0x0;var _0x145ddb=_0xf242[_0x45b1ba];return _0x145ddb;};'use strict';var util=require('util');var logger=require(_0x2f24('0x0'))(_0x2f24('0x1'));var APIError=function(_0x5e5ce6,_0x4b4467){this[_0x2f24('0x2')]=_0x5e5ce6||_0x2f24('0x3');this[_0x2f24('0x4')]=_0x4b4467||'Error';util[_0x2f24('0x5')](APIError,Error);};var APIBadRequestError=function(_0x1fd0c7){this[_0x2f24('0x2')]=_0x1fd0c7||_0x2f24('0x6');this['name']=_0x2f24('0x6');util[_0x2f24('0x5')](APIBadRequestError,APIError);};var APIForbiddenError=function(_0x4ae11f){this[_0x2f24('0x2')]=_0x4ae11f||_0x2f24('0x7');this[_0x2f24('0x4')]='Forbidden';util['inherits'](APIForbiddenError,APIError);};var APINotFoundError=function(_0x1d1a8e){this['message']=_0x1d1a8e||_0x2f24('0x8');this['name']=_0x2f24('0x9');util[_0x2f24('0x5')](APINotFoundError,APIError);};var APIOutOfIntervalError=function(_0x112ff1){this[_0x2f24('0x2')]=_0x112ff1||_0x2f24('0xa');this[_0x2f24('0x4')]=_0x2f24('0xb');this[_0x2f24('0xc')]=0x193;this[_0x2f24('0xd')]={'type':_0x2f24('0xe')};util[_0x2f24('0x5')](APIOutOfIntervalError,APIError);};var APIConflictError=function(_0x25443e){this[_0x2f24('0x2')]=_0x25443e||_0x2f24('0xf');this[_0x2f24('0x4')]=_0x2f24('0x10');util[_0x2f24('0x5')](APIBadRequestError,APIError);};function getStatusCode(_0x17759c){switch(_0x17759c){case'Bad\x20Request':return 0x190;case _0x2f24('0x7'),_0x2f24('0xb'):return 0x193;case'Not\x20Found':return 0x194;case'Conflict':return 0x199;default:return 0x1f4;}}function getCustomStatusMessage(_0xfd90a5){if(_0xfd90a5===_0x2f24('0xb'))return _0xfd90a5;return null;}function handleError(_0x143533){return function(_0x43b69e){logger[_0x2f24('0x11')](_0x43b69e[_0x2f24('0x12')]);var _0x9d75a7=getStatusCode(_0x43b69e['name']);var _0x3269a8=getCustomStatusMessage(_0x43b69e[_0x2f24('0x4')]);if(_0x43b69e[_0x2f24('0x4')]){delete _0x43b69e[_0x2f24('0x4')];}if(_0x3269a8){_0x143533['statusMessage']=_0x3269a8;}return _0x143533[_0x2f24('0x13')](_0x9d75a7)['send'](_0x43b69e);};}module[_0x2f24('0x14')]={'APIError':APIError,'APIBadRequestError':APIBadRequestError,'APIForbiddenError':APIForbiddenError,'APINotFoundError':APINotFoundError,'APIOutOfIntervalError':APIOutOfIntervalError,'APIConflict':APIConflictError,'handleError':handleError};
\ No newline at end of file
index e7c22c1..d6de977 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc526=['404','status','json','send'];(function(_0x3697f9,_0x570dcf){var _0x29f0df=function(_0xae1b9f){while(--_0xae1b9f){_0x3697f9['push'](_0x3697f9['shift']());}};_0x29f0df(++_0x570dcf);}(_0xc526,0x124));var _0x6c52=function(_0x12c29f,_0x234b62){_0x12c29f=_0x12c29f-0x0;var _0x1d1a80=_0xc526[_0x12c29f];return _0x1d1a80;};'use strict';module['exports'][0x194]=function pageNotFound(_0x2a17c1,_0x5c333b){var _0x34f5aa=_0x6c52('0x0');var _0x3b4d94=0x194;var _0x54a05b={'status':_0x3b4d94};_0x5c333b[_0x6c52('0x1')](_0x54a05b['status']);_0x5c333b['render'](_0x34f5aa,{},function(_0x56f51f,_0x23a266){if(_0x56f51f){return _0x5c333b[_0x6c52('0x1')](_0x54a05b[_0x6c52('0x1')])[_0x6c52('0x2')](_0x54a05b);}_0x5c333b[_0x6c52('0x3')](_0x23a266);});};
\ No newline at end of file
+var _0x9b00=['exports','404','status','render','json','send'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0x9b00,0xcc));var _0x09b0=function(_0x138adb,_0x193fee){_0x138adb=_0x138adb-0x0;var _0x1b27f2=_0x9b00[_0x138adb];return _0x1b27f2;};'use strict';module[_0x09b0('0x0')][0x194]=function pageNotFound(_0x31ad84,_0x32881a){var _0x52a481=_0x09b0('0x1');var _0x2bf951=0x194;var _0x18bb45={'status':_0x2bf951};_0x32881a[_0x09b0('0x2')](_0x18bb45[_0x09b0('0x2')]);_0x32881a[_0x09b0('0x3')](_0x52a481,{},function(_0x2e56a5,_0x53c312){if(_0x2e56a5){return _0x32881a[_0x09b0('0x2')](_0x18bb45['status'])[_0x09b0('0x4')](_0x18bb45);}_0x32881a[_0x09b0('0x5')](_0x53c312);});};
\ No newline at end of file
index 8bbdea1..ae3ec99 100644 (file)
 (function() {
-    'use strict';
-    try {
-        const chatWebsiteAddress = new URL('{{{chatWebsiteAddressOrigin}}}')
-        if (chatWebsiteAddress.origin !== window.location.origin){
-            throw new Error(`Domain "${window.location.origin}"" can't load snippet for '{{{chatWebsiteAddressOrigin}}}'. Please check your website domain in the current XCALLY Chat Website settings.`)
-        }
-    } catch (error) {
-        window.alert(`Domain ${window.location.origin} can't load snippet for '{{{chatWebsiteAddressOrigin}}}'. Please check your website domain in the current XCALLY Chat Website settings.`)
-        return 
+  'use strict';
+  try {
+    const chatWebsiteAddress = new URL('{{{chatWebsiteAddressOrigin}}}');
+    if (chatWebsiteAddress.origin !== window.location.origin){
+      throw new Error(`Domain "${window.location.origin}"" can't load snippet for '{{{chatWebsiteAddressOrigin}}}'. Please check your website domain in the current XCALLY Chat Website settings.`);
     }
-        // Init all URLs
-        const remoteURL = new URL('{{{remote}}}')
-        const chatOrigin = remoteURL.origin
-        const chatPath = '/snippet/'
-        const chatStylesPath = chatPath + 'styles/'
-        const chatVersion = '{{{chatVersion}}}'
-
-        // Style setttings
-        const divColor = '<%=div_color%>'
-        const textColor = '<%=text_color%>'
-        const buttonColor = '<%=button_color%>'
-        const backgroungColor = '<%=background_color%>'
-        let alignment = "<%=alignment%>";
-        let verticalAlignment = "<%=verticalAlignment%>";
-
-        // iframe URL settings
-        const iframeId = 'motion-chat-iframe'
-        const iframeSrcURL = new URL(chatPath, chatOrigin)
-        const iframeSearchParams = new URLSearchParams('{{{query}}}')
-        iframeSearchParams.append('version', chatVersion)
-        iframeSearchParams.append('location', btoa(window.location.host))
-        iframeSrcURL.search = iframeSearchParams
-
-        // Style URL settings
-        const linkURL =  new URL(chatStylesPath + 'mobile.css', chatOrigin)
-        linkURL.search = new URLSearchParams({ version: chatVersion })
-        const linkMobile = document.createElement('link');
-        linkMobile.type = "text/css";
-        linkMobile.rel='stylesheet';
-        linkMobile.href = linkURL.toString()
-
-        // Iframe localstorage whitelisting
-        const allowedOrigins = [chatOrigin]
-
-        function remoteLocalStorageEventHandler(event){
-            if (allowedOrigins.includes(event.origin)) {
-                const { action, key, value } = event.data
-                const localStorage = window.localStorage
-                switch(action){
-                    case 'setItem':
-                        {
-                            localStorage.setItem(key, JSON.stringify(value))
-                            event.source.postMessage(
-                                {
-                                action: 'setItemResult',
-                                key
-                                }, event.origin)
-                        }
-                        break
-                    case 'getItem':
-                        {
-                            let item = localStorage.getItem(key)
-                            if(item){
-                                try {
-                                    item = JSON.parse(item)
-                                } catch (error) {
-                                    console.error('Cannot read data from localstorage', error)
-                                }
-                            }
-                            event.source.postMessage(
-                                {
-                                action: 'getItemResult',
-                                key,
-                                item
-                                }, event.origin)
-                        }
-                        break
-                    case 'removeItem':
-                        {   
-                            localStorage.removeItem(key)
-                            event.source.postMessage(
-                                {
-                                action: 'removeItemResult',
-                                key
-                                }, event.origin)
-                        }
-                        break
-                    default:
-                        typeof action === 'string' && console.debug('Unsupported action', action)
-                    break;
-                }
+  } catch (error) {
+    window.alert(`Domain ${window.location.origin} can't load snippet for '{{{chatWebsiteAddressOrigin}}}'. Please check your website domain in the current XCALLY Chat Website settings.`);
+    return;
+  }
+
+  // Init all URLs
+  const remoteURL = new URL('{{{remote}}}');
+  const chatOrigin = remoteURL.origin;
+  const chatPath = '/snippet/';
+  const chatStylesPath = chatPath + 'styles/';
+  const chatVersion = '{{{chatVersion}}}';
+
+  // Style setttings
+  const divColor = '<%=div_color%>';
+  const textColor = '<%=text_color%>';
+  const buttonColor = '<%=button_color%>';
+  const backgroungColor = '<%=background_color%>';
+  let alignment = "<%=alignment%>";
+  let verticalAlignment = "<%=verticalAlignment%>";
+
+  // iframe URL settings
+  const iframeId = 'motion-chat-iframe';
+  const iframeSrcURL = new URL(chatPath, chatOrigin);
+  const iframeSearchParams = new URLSearchParams('{{{query}}}');
+  iframeSearchParams.append('version', chatVersion);
+  iframeSearchParams.append('location', btoa(window.location.host));
+  iframeSrcURL.search = iframeSearchParams;
+
+  // Style URL settings
+  const linkURL =  new URL(chatStylesPath + 'mobile.css', chatOrigin);
+  linkURL.search = new URLSearchParams({ version: chatVersion });
+  const linkMobile = document.createElement('link');
+  linkMobile.type = "text/css";
+  linkMobile.rel='stylesheet';
+  linkMobile.href = linkURL.toString();
+
+  // Iframe localstorage whitelisting
+  const allowedOrigins = [chatOrigin];
+
+  function remoteLocalStorageEventHandler(event) {
+    if (allowedOrigins.includes(event.origin)) {
+      const { action, key, value } = event.data;
+      const localStorage = window.localStorage;
+      switch(action) {
+        case 'setItem': {
+            localStorage.setItem(key, JSON.stringify(value))
+            event.source.postMessage(
+              { action: 'setItemResult', key },
+              event.origin
+            );
+            break;
+          }
+        case 'getItem': {
+          let item = localStorage.getItem(key);
+          if (item) {
+            try {
+              item = JSON.parse(item);
+            } catch (error) {
+              console.error('Cannot read data from localstorage', error);
             }
+          }
+          event.source.postMessage(
+            { action: 'getItemResult', key, item },
+            event.origin
+          );
+          break;
         }
-
-        // DOM Manipulation
-        let iframe = document.createElement('iframe');
-        // Attributes
-        iframe['id'] = iframeId;
-        iframe['src'] = iframeSrcURL.toString()
-
-        let  iframe_status = false;
-
-        document.documentElement.style.setProperty('--xc-ws-div-color', divColor);
-        document.documentElement.style.setProperty('--xc-ws-text-color', textColor);
-        document.documentElement.style.setProperty('--xc-ws-button-color', buttonColor);
-        document.documentElement.style.setProperty('--xc-ws-background-color', backgroungColor);
+        case 'removeItem': {
+          localStorage.removeItem(key);
+          event.source.postMessage(
+            { action: 'removeItemResult', key },
+            event.origin
+          );
+          break;
+        }
+        default:
+          typeof action === 'string' && console.debug('Unsupported action', action);
+        break;
+      }
+    }
+  }
+
+  // DOM Manipulation
+  let iframe = document.createElement('iframe');
+  // Attributes
+  iframe['id'] = iframeId;
+  iframe['src'] = iframeSrcURL.toString()
+
+  let  iframe_status = false;
+
+  document.documentElement.style.setProperty('--xc-ws-div-color', divColor);
+  document.documentElement.style.setProperty('--xc-ws-text-color', textColor);
+  document.documentElement.style.setProperty('--xc-ws-button-color', buttonColor);
+  document.documentElement.style.setProperty('--xc-ws-background-color', backgroungColor);
+
+  document.head.appendChild(linkMobile);
+  document.body.appendChild(iframe);
+
+  <% if (alignment == 'bottom_right') { -%>
+    // Bottom, right
+    iframe.className = 'motion-chat-iframe-bottom_right';
+    verticalAlignment = 0;
+  <% } else if (alignment == 'right') { -%>
+    // Right
+    iframe.className = 'motion-chat-iframe-right';
+    iframe.style['top'] = verticalAlignment+'%';
+    let iframe_h = topIframe_calc();
+    topIframe_set(iframe_h);
+    let div_tab = document.createElement('div');
+    div_tab['id'] = 'motion-chat-iframe-tab';
+    div_tab.className = 'motion-chat-div-right';
+    let  tab_status=0;
+  <% } else if (alignment == 'left') { -%>
+    // Left
+    iframe.className = 'motion-chat-iframe-left';
+    iframe.style['top'] = verticalAlignment+'%';
+    let iframe_h = topIframe_calc();
+    topIframe_set(iframe_h);
+    let  div_tab = document.createElement('div');
+    div_tab.className = 'motion-chat-div-left';
+    div_tab['id'] ='motion-chat-iframe-tab';
+    let tab_status=0;
+  <% } -%>   
+
+  <% if (alignment == 'right') { -%>
+    // RIGHT
+    topChat_set(iframe_h, verticalAlignment);
+    document.body.appendChild(div_tab);
+    let html = '<div id="chat_tab_arrow"> <strong><</strong> </div> <span id="chat_tab_text" style="writing-mode: tb-rl; transform: rotate(-180deg);" flex><strong><%=labelText%></strong></span>';
+    div_tab.innerHTML = html;
     
-        document.head.appendChild(linkMobile);
-
-        <% if (alignment == 'bottom_right') { -%> // Bottom, right
-            iframe.className = 'motion-chat-iframe-bottom_right';
-            verticalAlignment = 0;
-            document.body.appendChild(iframe);
-
-        <% } else if (alignment == 'right') { -%> // Right
-            iframe.className = 'motion-chat-iframe-right';
-            iframe.style['top'] = verticalAlignment+'%';
-            let  iframe_h = topIframe_calc();
-            topIframe_set(iframe_h);
-            let  div_tab = document.createElement('div');
-            div_tab['id'] = 'motion-chat-iframe-tab';
-            div_tab.className = 'motion-chat-div-right';
-            let  tab_status=0;
+    div_tab.style.backgroundColor = divColor;
+    document.getElementById("chat_tab_text").style.color = textColor; 
+    document.getElementById("chat_tab_arrow").style.color = divColor;
+    document.getElementById("chat_tab_arrow").style.backgroundColor = textColor; 
+    document.getElementById("motion-chat-iframe-tab").style.display = "flex";
+    
+    function appendLink(){
+      if(iframe_status == false){
+        document.body.appendChild(iframe);
+        iframe_status=true;
+      }
+    }
 
-        <% } else if (alignment == 'left') { -%> // Left   
-            iframe.className = 'motion-chat-iframe-left';
-            iframe.style['top'] = verticalAlignment+'%';
-            let  iframe_h = topIframe_calc();
-            topIframe_set(iframe_h);
-            let  div_tab = document.createElement('div');
-            div_tab.className = 'motion-chat-div-left';
-            div_tab['id'] ='motion-chat-iframe-tab';
-            let  tab_status=0;
+    function expandChatRight(){
+      appendLink();
+      div_tab.style.right = '295px';
+      iframe.style.right = '0px';
+      document.getElementById("chat_tab_arrow").innerHTML = "<strong> > </strong>";
+      let iframeEl = document.getElementById('motion-chat-iframe');
+      iframeEl.contentWindow?.postMessage({"evt":"show"}, '*');
+    }
 
-        <% } -%>   
+    function collapseChatRight(){
+      appendLink();
+      div_tab.style.right = '0px';
+      iframe.style.right = '-312px';
+      document.getElementById("chat_tab_arrow").innerHTML = "<strong> < </strong>";
+      let iframeEl = document.getElementById('motion-chat-iframe');
+      iframeEl.contentWindow?.postMessage({"evt":"hide"}, '*');
+    }
 
-        <% if (alignment == 'right') { -%> // Right
-            topChat_set(iframe_h, verticalAlignment);
-            document.body.appendChild(div_tab);
-            let  html = '<div id="chat_tab_arrow"> <strong><</strong> </div> <span id="chat_tab_text" style="writing-mode: tb-rl; transform: rotate(-180deg);" flex><strong><%=labelText%></strong></span>';
-            div_tab.innerHTML = html;
-            
-            div_tab.style.backgroundColor = divColor;
-            document.getElementById("chat_tab_text").style.color = textColor; 
-            document.getElementById("chat_tab_arrow").style.color = divColor 
-            document.getElementById("chat_tab_arrow").style.backgroundColor = textColor; 
-            document.getElementById("motion-chat-iframe-tab").style.display = "flex";
-            
-            function appendLink(){
-                if(iframe_status == false){
-                    document.body.appendChild(iframe);
-                    iframe_status=true;
-                }      
-            }
+    function toggleChatExpandedRight(){    
+      if (tab_status % 2 === 0) {
+        expandChatRight();
+      }
+      else {
+        collapseChatRight();
+      }
+      tab_status++;
+    }
 
-            function expandChatRight(){
-                appendLink()
-                div_tab.style.right = '295px';
-                iframe.style.right = '0px';
-                document.getElementById("chat_tab_arrow").innerHTML = "<strong> > </strong>";
-                let iframeEl = document.getElementById('motion-chat-iframe');
-                iframeEl.contentWindow?.postMessage({"evt":"show"}, '*');
-            }
+    document.getElementById("motion-chat-iframe-tab").addEventListener("click", toggleChatExpandedRight);
+  <% } else if (alignment == 'left') { -%> 
+    // LEFT
+    topChat_set(iframe_h, verticalAlignment);
+    document.body.appendChild(div_tab);
+    let  html='<div id="chat_tab_arrow"> <strong>></strong> </div><span id="chat_tab_text" style="writing-mode: tb-rl; transform: rotate(-180deg);" flex><strong><%=labelText%></strong></span>';
+    div_tab.innerHTML = html;
+
+    div_tab.style.backgroundColor = divColor;
+    document.getElementById("chat_tab_text").style.color = textColor;
+    document.getElementById("chat_tab_arrow").style.color = divColor;
+    document.getElementById("chat_tab_arrow").style.backgroundColor = textColor; 
+    document.getElementById("motion-chat-iframe-tab").style.display="flex";
+
+    function appendLink() {
+      if (iframe_status == false){
+        document.body.appendChild(iframe);
+        iframe_status=true;
+      }
+    }
 
-            function collapseChatRight(){
-                appendLink()
-                div_tab.style.right = '0px';
-                iframe.style.right = '-312px';
-                document.getElementById("chat_tab_arrow").innerHTML = "<strong> < </strong>";
-                let iframeEl = document.getElementById('motion-chat-iframe');
-                iframeEl.contentWindow?.postMessage({"evt":"hide"}, '*');
-            }
+    function expandChatLeft() {
+      appendLink();
+      div_tab.style.left = '295px';
+      iframe.style.left = '0px';
+      document.getElementById("chat_tab_arrow").innerHTML = "<strong> < </strong>";
+      let iframeEl = document.getElementById('motion-chat-iframe');
+      iframeEl.contentWindow?.postMessage({"evt":"show"}, '*');
+    }
 
-            function toggleChatExpandedRight(){    
-                if(tab_status % 2 === 0) {
-                    expandChatRight()
-                }
-                else {
-                    collapseChatRight()
-                }
-                tab_status++;
-            }
+    function collapseChatLeft() {
+      appendLink();
+      div_tab.style.left = '0px';
+      iframe.style.left = '-312px';
+      document.getElementById("chat_tab_arrow").innerHTML = "<strong> > </strong>";
+      let iframeEl = document.getElementById('motion-chat-iframe');
+      iframeEl.contentWindow?.postMessage({"evt":"hide"}, '*');
+    }
 
-            document.getElementById("motion-chat-iframe-tab").addEventListener("click", toggleChatExpandedRight);
-        <% } else if (alignment == 'left') { -%> 
-            topChat_set(iframe_h, verticalAlignment);
-            document.body.appendChild(div_tab);
-            let  html='<div id="chat_tab_arrow"> <strong>></strong> </div><span id="chat_tab_text" style="writing-mode: tb-rl; transform: rotate(-180deg);" flex><strong><%=labelText%></strong></span>';
-            div_tab.innerHTML=html;
+    function toggleChatExpandedLeft() {
+      if (tab_status % 2 === 0) {
+        expandChatLeft();
+      }
+      else {
+        collapseChatLeft();
+      }
+      tab_status++;
+    }
 
+    document.getElementById("motion-chat-iframe-tab").addEventListener("click", toggleChatExpandedLeft); 
+  <% } -%>
+
+  // START Events management
+  window.addEventListener(
+    'message',
+    function(evt) {
+      remoteLocalStorageEventHandler(evt)
+      switch (evt.data.cmd) {
+        case 'show':
+          <% if (alignment == 'bottom_right') { -%>
+            // Bottom, right
+            iframe.style.top = 'auto';
+            iframe.style.bottom = '0px';
+          <% } else if (alignment == 'right') { -%>
+            // Right
+            iframe.style.right = '0px';
+            div_tab.style.right = '295px';
+          <% } else if (alignment == 'left') { -%>
+            // Left
+            iframe.style.left = '0px';
+            div_tab.style.left = '295px';
+          <% } -%>
+          break;
+        case 'hide':
+          <% if (alignment == 'bottom_right') { -%>
+            // Bottom, right
+            iframe.style.top = 'calc(100% - 50px)';
+          <% } else if (alignment == 'right') { -%>
+            // Right
+            iframe.style.right = '-312px';
+            div_tab.style['right'] = '0px';
+          <% } else if (alignment == 'left') { -%>
+            // Left
+            iframe.style.left = '-312px';
+            div_tab.style.left = '0px';
+          <% } -%>
+          break;
+        case "init": 
+          <% if (alignment == 'right' || alignment == 'left') { -%>
+            // Bottom, right
             div_tab.style.backgroundColor = divColor;
             document.getElementById("chat_tab_text").style.color = textColor; 
             document.getElementById("chat_tab_arrow").style.color = divColor; 
             document.getElementById("chat_tab_arrow").style.backgroundColor = textColor; 
-            document.getElementById("motion-chat-iframe-tab").style.display="flex";
-
-            function appendLink(){
-                if(iframe_status == false){
-                    document.body.appendChild(iframe);
-                    iframe_status=true;
-                }   
-            }
-
-            function expandChatLeft(){
-                appendLink()
-                div_tab.style.left = '295px';
-                iframe.style.left = '0px';
-                document.getElementById("chat_tab_arrow").innerHTML = "<strong> < </strong>";
-                let iframeEl = document.getElementById('motion-chat-iframe');
-                iframeEl.contentWindow?.postMessage({"evt":"show"}, '*');
-            }
-
-            function collapseChatLeft(){
-                appendLink()
-                div_tab.style.left = '0px';
-                iframe.style.left = '-312px';
-                document.getElementById("chat_tab_arrow").innerHTML = "<strong> > </strong>";
-                let iframeEl = document.getElementById('motion-chat-iframe');
-                iframeEl.contentWindow?.postMessage({"evt":"hide"}, '*');
-            }
-
-            function toggleChatExpandedLeft(){
-                if(tab_status % 2 === 0) {
-                    expandChatLeft()
-                }   
-                else {
-                    collapseChatLeft()
-                }   
-                tab_status++;
-            }
-
-            document.getElementById("motion-chat-iframe-tab").addEventListener("click", toggleChatExpandedLeft); 
-
-            <% } -%>    
-
-        // START Events management
-        window.addEventListener('message', function(evt) {
-            remoteLocalStorageEventHandler(evt)
-            switch (evt.data.cmd) {
-                case 'show':
-                    <% if (alignment == 'bottom_right') { -%> // Bottom, right
-                        iframe.style.top = 'auto';
-                        iframe.style.bottom = '0px';
-                    <% } else if (alignment == 'right') { -%> // Right
-                        iframe.style.right = '0px';
-                        div_tab.style.right = '295px';
-                    <% } else if (alignment == 'left') { -%> // Left
-                        iframe.style.left = '0px';
-                        div_tab.style.left = '295px';
-                    // Left    
-                    <% } -%>                break;
-                case 'hide':
-                    <% if (alignment == 'bottom_right') { -%> // Bottom, right
-                    iframe.style.top = 'calc(100% - 50px)';
-                    <% } else if (alignment == 'right') { -%> // Right
-                        iframe.style.right = '-312px';
-                        div_tab.style['right'] = '0px';
-                    <% } else if (alignment == 'left') { -%> // Left
-                        iframe.style.left = '-312px';
-                        div_tab.style.left = '0px';
-                    <% } -%>                break;
-                case "init": 
-                    <% if (alignment == 'right' || alignment == 'left') { -%> // Bottom, right
-                        div_tab.style.backgroundColor = divColor;
-                        document.getElementById("chat_tab_text").style.color = textColor; 
-                        document.getElementById("chat_tab_arrow").style.color = divColor; 
-                        document.getElementById("chat_tab_arrow").style.backgroundColor = textColor; 
-                        document.getElementById("motion-chat-iframe-tab").style.display = "flex";
-                    <% } -%>                break;
-                case "offline": 
-                    <% if (alignment == 'right' || alignment == 'left') { -%> // Bottom, right
-                        document.getElementById("motion-chat-iframe-tab").style.display = "none";
-                    <% } -%>                break;
-                default:
-            }
-
-        }, false);
-        // END Events management
-
-        // START Proactive action management
-        <% proactiveActions.forEach(function(action, index) { -%>
-            <% if (action.type == 'timeout') { -%>        
-            setTimeout(function() {
-                <% if (alignment == 'right') { -%>
-                expandChatRight();
-                tab_status++;
-                <% } else if (alignment == 'left') { -%> 
-                expandChatLeft();
-                tab_status++;
-                <% } else { -%> 
-                iframe.style.bottom = '0px';
-                iframe.contentWindow?.postMessage({
-                    evt: 'show'
-                }, '*');
-                <% } -%> 
-            }, <%- action.timeout %> * 1000);
-        <% } -%>
-        <% if (action.type == 'mouseOver') { -%>
-        let  elements<%- index %> = document.querySelectorAll("<%- action.selector %>");
-        for (let  i = 0; i < elements<%- index %>.length; i++) {
-            elements<%- index %>[i].onmouseover = function() {
-                <% if (alignment == 'right') { -%>
-                expandChatRight();
-                tab_status++;
-                <% } else if (alignment == 'left') { -%> 
-                expandChatLeft();
-                tab_status++;
-                <% } else { -%> 
-                iframe.style.bottom = '0px';
-                iframe.contentWindow?.postMessage({
-                    evt: 'show'
-                }, '*');
-                <% } -%> 
-            }
-        }
-        <% } -%>    <% }); -%>
-        // END Proactive action management
-        
-
-        if (window.DeviceOrientationEvent) {
-            window.addEventListener('orientationchange', function() {
-            if (alignment == 'right'){
-                document.getElementById("chat_tab_arrow").innerHTML = "<strong> < </strong>";
-                let  iframeEl = document.getElementById('motion-chat-iframe');
-                iframeEl.contentWindow?.postMessage({"evt":"hide"}, '*');
-                tab_status = 0;
-                iframe_h = topIframe_calc();
-                topIframe_set(iframe_h);
-                if(typeof div_tab != "undefined") topChat_set(iframe_h, verticalAlignment);
-            }
-            else if (alignment == 'left'){
-                document.getElementById("chat_tab_arrow").innerHTML = "<strong> > </strong>";
-                let  iframeEl = document.getElementById('motion-chat-iframe');
-                iframeEl.contentWindow?.postMessage({"evt":"hide"}, '*');
-                tab_status = 0;
-                iframe_h = topIframe_calc();
-                topIframe_set(iframe_h);
-                if(typeof div_tab != "undefined") topChat_set(iframe_h, verticalAlignment);
-            } }, false);
-        }
-
-        window.addEventListener("resize", function(event) {
-        let  iframe_h = topIframe_calc();
-        topIframe_set(iframe_h);
-        if(typeof div_tab != "undefined") topChat_set(iframe_h, verticalAlignment);
-        });
-
-        function topIframe_calc(){
-        let height_iframe
-        let  heightD = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
-        let  iframeT = ((heightD/100)*verticalAlignment) + 450;
-        if (heightD < iframeT) {
-            height_iframe = 450 - (iframeT - heightD);
+            document.getElementById("motion-chat-iframe-tab").style.display = "flex";
+          <% } -%>
+          break;
+        case "offline": 
+          <% if (alignment == 'right' || alignment == 'left') { -%>
+            // Bottom, right
+            document.getElementById("motion-chat-iframe-tab").style.display = "none";
+          <% } -%>
+          break;
+        default:
+      }
+    },
+    false
+  );
+  // END Events management
+
+  // START Proactive action management
+  <% proactiveActions.forEach(function(action, index) { -%>
+    <% if (action.type == 'timeout') { -%>        
+    setTimeout(function() {
+      <% if (alignment == 'right') { -%>
+        expandChatRight();
+        tab_status++;
+      <% } else if (alignment == 'left') { -%> 
+        expandChatLeft();
+        tab_status++;
+      <% } else { -%> 
+        iframe.style.bottom = '0px';
+        iframe.contentWindow?.postMessage({
+            evt: 'show'
+        }, '*');
+      <% } -%> 
+    }, <%- action.timeout %> * 1000);
+  <% } -%>
+  <% if (action.type == 'mouseOver') { -%>
+  let elements<%- index %> = document.querySelectorAll("<%- action.selector %>");
+  for (let i = 0; i < elements<%- index %>.length; i++) {
+    elements<%- index %>[i].onmouseover = function() {
+      <% if (alignment == 'right') { -%>
+        expandChatRight();
+        tab_status++;
+      <% } else if (alignment == 'left') { -%> 
+        expandChatLeft();
+        tab_status++;
+      <% } else { -%> 
+        iframe.style.bottom = '0px';
+        iframe.contentWindow?.postMessage({
+            evt: 'show'
+        }, '*');
+      <% } -%> 
+    }
+  }
+  <% } -%>    <% }); -%>
+  // END Proactive action management
+
+  if (window.DeviceOrientationEvent) {
+    window.addEventListener(
+      'orientationchange',
+      function() {
+        if (alignment == 'right') {
+          document.getElementById("chat_tab_arrow").innerHTML = "<strong> < </strong>";
+          let iframeEl = document.getElementById('motion-chat-iframe');
+          iframeEl.contentWindow?.postMessage({"evt":"hide"}, '*');
+          tab_status = 0;
+          iframe_h = topIframe_calc();
+          topIframe_set(iframe_h);
+          if (typeof div_tab != "undefined") {
+            topChat_set(iframe_h, verticalAlignment);
+          }
         }
-        else { height_iframe = 450; }
-        return height_iframe;
+        else if (alignment == 'left') {
+          document.getElementById("chat_tab_arrow").innerHTML = "<strong> > </strong>";
+          let iframeEl = document.getElementById('motion-chat-iframe');
+          iframeEl.contentWindow?.postMessage({"evt":"hide"}, '*');
+          tab_status = 0;
+          iframe_h = topIframe_calc();
+          topIframe_set(iframe_h);
+          if (typeof div_tab != "undefined") {
+            topChat_set(iframe_h, verticalAlignment);
+          }
         }
+      },
+      false
+    );
+  }
+
+  window.addEventListener(
+    "resize",
+    function(event) {
+      let iframe_h = topIframe_calc();
+      topIframe_set(iframe_h);
+      if(typeof div_tab != "undefined") {
+        topChat_set(iframe_h, verticalAlignment);
+      }
+    }
+  );
+
+  function topIframe_calc(){
+    let height_iframe
+    let heightD = Math.max(document.documentElement.clientHeight, window.innerHeight || 0);
+    let iframeT = ((heightD/100)*verticalAlignment) + 450;
+    if (heightD < iframeT) {
+      height_iframe = 450 - (iframeT - heightD);
+    }
+    else {
+      height_iframe = 450;
+    }
+    return height_iframe;
+  }
+
+  function topIframe_set(height_iframe) {
+    if (height_iframe > 340) {
+      iframe.style['height'] = height_iframe +'px';
+      if (alignment == "right" || alignment == "left") {
+        iframe.style['top'] = verticalAlignment + "%";
+      }
+      else {
+        iframe.style['bottom'] = "0%";
+      }
+    }
+    else {
+      iframe.style['height'] = '340px';
+      if (alignment == "right" || alignment == "left") {
+        iframe.style['top'] = "calc(100% - 340px)";
+      }
+      else {
+        iframe.style['bottom'] = "0%";
+      }
+    }
+  }
 
-        function topIframe_set(height_iframe){
-            if( height_iframe > 340){
-            iframe.style['height'] = height_iframe +'px';
-            if (alignment == "right" || alignment == "left" )
-            { iframe.style['top'] = verticalAlignment + "%"; }
-            else{ iframe.style['bottom'] = "0%"; }
-
-            }
-            else {
-            iframe.style['height'] = '340px';
-            if (alignment == "right" || alignment == "left" )
-            { iframe.style['top'] = "calc(100% - 340px)"; }
-            else{ iframe.style['bottom'] = "0%"; }
-
-            }
-        }
-    
-        function topChat_set(height_iframe, verticalAlignment){
-    
-        if( height_iframe > 340){
-            div_tab.style['top'] = "calc("+ verticalAlignment +"% + " + (height_iframe - 100) + "px)";
-        }
-        else {
-            div_tab.style['top'] = "auto";
-            div_tab.style['bottom'] = "0px";
-        }
-        }
+  function topChat_set(height_iframe, verticalAlignment) {
+    if (height_iframe > 340) {
+        div_tab.style['top'] = "calc("+ verticalAlignment +"% + " + (height_iframe - 100) + "px)";
+    }
+    else {
+      div_tab.style['top'] = "auto";
+      div_tab.style['bottom'] = "0px";
+    }
+  }
 
-        // hide chat
-        <% if (hideWhenOffline && intervalId != null) { -%> // hide template
-            document.getElementById("motion-chat-iframe-tab").style.display = "none";
-        <% } -%>
+  // hide chat
+  <% if (hideWhenOffline && intervalId != null) { -%>
+    // hide template
+    document.getElementById("motion-chat-iframe-tab").style.display = "none";
+  <% } -%>
 }()); 
\ No newline at end of file
diff --git a/server/migrations/2.6.27.js b/server/migrations/2.6.27.js
new file mode 100644 (file)
index 0000000..a59425a
--- /dev/null
@@ -0,0 +1,169 @@
+'use strict';
+
+var BPromise = require('bluebird');
+var util = require('util');
+var logger = require('../config/logger')('migration');
+var Sequence = function() {};
+
+Sequence.prototype.enqueue = function(fn) {
+  this.tail = this.tail ? this.tail.finally(fn) : fn();
+};
+
+var Migration = function(queryInterface) {
+  this.queryInterface = queryInterface;
+  this.sequence = new Sequence();
+};
+
+Migration.prototype.changeColumn = function(table, column, type) {
+  var _this = this;
+  this.sequence.enqueue(function() {
+    return _this.queryInterface
+      .changeColumn(table, column, type)
+      .then(function() {
+        logger.info('Changed column %s in table %s', column, table);
+      })
+      .catch(function(err) {
+        logger.info(JSON.stringify(err));
+      });
+  });
+};
+
+Migration.prototype.addColumn = function(table, column, type) {
+  var _this = this;
+  this.sequence.enqueue(function() {
+    return _this.queryInterface
+      .addColumn(table, column, type)
+      .then(function() {
+        logger.info('Added column %s to %s', column, table);
+      })
+      .catch(function(err) {
+        logger.info(JSON.stringify(err));
+      });
+  });
+};
+
+Migration.prototype.dropTable = function(table) {
+  var _this = this;
+  this.sequence.enqueue(function() {
+    return _this.queryInterface
+      .dropTable(table, {
+        force: true,
+      })
+      .then(function() {
+        logger.info('table dropped %s', table);
+      })
+      .catch(function(err) {
+        logger.info(JSON.stringify(err));
+      });
+  });
+};
+
+Migration.prototype.addIndex = function(table, column, indexName) {
+  var _this = this;
+  this.sequence.enqueue(function() {
+    return _this.queryInterface
+      .addIndex(table, column, {
+        indexName: indexName,
+      })
+      .then(function() {
+        logger.info('addIndex %s %s %s', table, column.join(','), indexName);
+      })
+      .catch(function(err) {
+        logger.info(JSON.stringify(err));
+      });
+  });
+};
+
+Migration.prototype.removeIndex = function(table, indexName) {
+  var _this = this;
+  this.sequence.enqueue(function() {
+    return _this.queryInterface
+      .removeIndex(table, indexName)
+      .then(function() {
+        logger.info('removeIndex %s %s', table, indexName);
+      })
+      .catch(function(err) {
+        logger.info(JSON.stringify(err));
+      });
+  });
+};
+
+Migration.prototype.query = function(sql) {
+  var _this = this;
+  this.sequence.enqueue(function() {
+    return _this.queryInterface.sequelize
+      .query(sql)
+      .then(function() {
+        logger.info('query %s', sql);
+      })
+      .catch(function(err) {
+        logger.info(JSON.stringify(err));
+      });
+  });
+};
+
+Migration.prototype.removeColumn = function(table, column) {
+  var _this = this;
+  this.sequence.enqueue(function() {
+    return _this.queryInterface
+      .removeColumn(table, column)
+      .then(function() {
+        logger.info('Removed column %s from %s', column, table);
+      })
+      .catch(function(err) {
+        logger.info(
+          util.inspect(err, {
+            showHidden: false,
+            depth: null,
+          })
+        );
+      });
+  });
+};
+
+Migration.prototype.renameColumn = function(table, oldColumn, newColumn) {
+  var _this = this;
+  this.sequence.enqueue(function() {
+    return _this.queryInterface
+      .renameColumn(table, oldColumn, newColumn)
+      .then(function() {
+        logger.info(
+          'Renamed column from %s to %s on %s',
+          oldColumn,
+          newColumn,
+          table
+        );
+      })
+      .catch(function(err) {
+        logger.info(
+          util.inspect(err, {
+            showHidden: false,
+            depth: null,
+          })
+        );
+      });
+  });
+};
+
+Migration.prototype.final = function(resolve) {
+  this.sequence.enqueue(function() {
+    return resolve();
+  });
+};
+
+module.exports = {
+  up: function(queryInterface /*, Sequelize */) {
+    return new BPromise(function(resolve) {
+      var migration = new Migration(queryInterface);
+      // Add your migration code here
+
+      // START FINAL
+      migration.final(resolve);
+      // END FINAL
+    });
+  },
+
+  down: function( /* queryInterface, Sequelize */ ) {
+    // var migration = new Migration(queryInterface);
+  },
+};
\ No newline at end of file
diff --git a/server/migrations/2.6.28.js b/server/migrations/2.6.28.js
new file mode 100644 (file)
index 0000000..a59425a
--- /dev/null
@@ -0,0 +1,169 @@
+'use strict';
+
+var BPromise = require('bluebird');
+var util = require('util');
+var logger = require('../config/logger')('migration');
+var Sequence = function() {};
+
+Sequence.prototype.enqueue = function(fn) {
+  this.tail = this.tail ? this.tail.finally(fn) : fn();
+};
+
+var Migration = function(queryInterface) {
+  this.queryInterface = queryInterface;
+  this.sequence = new Sequence();
+};
+
+Migration.prototype.changeColumn = function(table, column, type) {
+  var _this = this;
+  this.sequence.enqueue(function() {
+    return _this.queryInterface
+      .changeColumn(table, column, type)
+      .then(function() {
+        logger.info('Changed column %s in table %s', column, table);
+      })
+      .catch(function(err) {
+        logger.info(JSON.stringify(err));
+      });
+  });
+};
+
+Migration.prototype.addColumn = function(table, column, type) {
+  var _this = this;
+  this.sequence.enqueue(function() {
+    return _this.queryInterface
+      .addColumn(table, column, type)
+      .then(function() {
+        logger.info('Added column %s to %s', column, table);
+      })
+      .catch(function(err) {
+        logger.info(JSON.stringify(err));
+      });
+  });
+};
+
+Migration.prototype.dropTable = function(table) {
+  var _this = this;
+  this.sequence.enqueue(function() {
+    return _this.queryInterface
+      .dropTable(table, {
+        force: true,
+      })
+      .then(function() {
+        logger.info('table dropped %s', table);
+      })
+      .catch(function(err) {
+        logger.info(JSON.stringify(err));
+      });
+  });
+};
+
+Migration.prototype.addIndex = function(table, column, indexName) {
+  var _this = this;
+  this.sequence.enqueue(function() {
+    return _this.queryInterface
+      .addIndex(table, column, {
+        indexName: indexName,
+      })
+      .then(function() {
+        logger.info('addIndex %s %s %s', table, column.join(','), indexName);
+      })
+      .catch(function(err) {
+        logger.info(JSON.stringify(err));
+      });
+  });
+};
+
+Migration.prototype.removeIndex = function(table, indexName) {
+  var _this = this;
+  this.sequence.enqueue(function() {
+    return _this.queryInterface
+      .removeIndex(table, indexName)
+      .then(function() {
+        logger.info('removeIndex %s %s', table, indexName);
+      })
+      .catch(function(err) {
+        logger.info(JSON.stringify(err));
+      });
+  });
+};
+
+Migration.prototype.query = function(sql) {
+  var _this = this;
+  this.sequence.enqueue(function() {
+    return _this.queryInterface.sequelize
+      .query(sql)
+      .then(function() {
+        logger.info('query %s', sql);
+      })
+      .catch(function(err) {
+        logger.info(JSON.stringify(err));
+      });
+  });
+};
+
+Migration.prototype.removeColumn = function(table, column) {
+  var _this = this;
+  this.sequence.enqueue(function() {
+    return _this.queryInterface
+      .removeColumn(table, column)
+      .then(function() {
+        logger.info('Removed column %s from %s', column, table);
+      })
+      .catch(function(err) {
+        logger.info(
+          util.inspect(err, {
+            showHidden: false,
+            depth: null,
+          })
+        );
+      });
+  });
+};
+
+Migration.prototype.renameColumn = function(table, oldColumn, newColumn) {
+  var _this = this;
+  this.sequence.enqueue(function() {
+    return _this.queryInterface
+      .renameColumn(table, oldColumn, newColumn)
+      .then(function() {
+        logger.info(
+          'Renamed column from %s to %s on %s',
+          oldColumn,
+          newColumn,
+          table
+        );
+      })
+      .catch(function(err) {
+        logger.info(
+          util.inspect(err, {
+            showHidden: false,
+            depth: null,
+          })
+        );
+      });
+  });
+};
+
+Migration.prototype.final = function(resolve) {
+  this.sequence.enqueue(function() {
+    return resolve();
+  });
+};
+
+module.exports = {
+  up: function(queryInterface /*, Sequelize */) {
+    return new BPromise(function(resolve) {
+      var migration = new Migration(queryInterface);
+      // Add your migration code here
+
+      // START FINAL
+      migration.final(resolve);
+      // END FINAL
+    });
+  },
+
+  down: function( /* queryInterface, Sequelize */ ) {
+    // var migration = new Migration(queryInterface);
+  },
+};
\ No newline at end of file
index 160d186..2e8b22d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd21b=['user_has_chat_interactions','user_has_fax_interactions','SmsInteractions','user_has_sms_interactions','user_has_openchannel_interactions','user_has_whatsapp_interactions','VoiceQueues','VoicePrefixes','MailQueue','ChatQueues','FaxQueues','SmsQueues','UserSmsQueue','WhatsappQueue','WhatsappQueues','ChatWebsite','ChatWebsites','FaxAccounts','user_has_fax_accounts','MailAccounts','user_has_mail_accounts','OpenchannelAccount','user_has_openchannel_accounts','SmsAccount','SmsAccounts','user_has_sms_accounts','WhatsappAccount','WhatsappAccounts','user_has_whatsapp_accounts','SpiedAgents','VoiceMusicOnHold','moh_has_sounds','Members','VoiceQueueId','HopperHistories','HopperBlacks','JscriptySessions','TrunkId','TrunkBackup','TrunkBackupId','belongsTo','IntervalId','mandatoryDispositionPauseId','voice_queues_has_cm_lists','Agents','Teams','TeamVoiceQueue','voice_queues_has_cm_blacklists','ScreenRecording','Messages','mailboxuser','QueueCalls','uniqueid','ContactId','MailAccountId','CloudProviderId','restrict','Imap','Smtp','Dispositions','Answers','Applications','TemplateId','team_has_mail_queues','Account','CmContact','Contact','Owner','mail_interaction_has_tags','Tag','ThroughTags','MailInteractionId','Attachments','Interaction','ChatWebsiteId','ChatOfflineMessageId','TagId','List','ListId','Dashboard','FaxAccountId','Interactions','Exntensions','FaxInteractionId','fax_interaction_has_tags','Users','AttachmentId','team_has_fax_queues','SmsAccountId','mandatoryDispositionPause','SmsQueue','SmsMessage','SmsInteractionId','Tags','sms_interaction_has_tags','SmsQueueId','team_has_sms_queues','OpenchannelAccountId','OpenchannelQueueId','OpenchannelInteractionId','openchannel_interaction_has_tags','UserOpenchannelQueue','ProactiveActions','user_has_chat_websites','Agent','Queue','ChatQueueId','ChatMessage','ChatInteractionId','chat_interaction_has_tags','team_has_chat_queues','ChatGroupId','Website','CompanyId','Phones','Hoppers','Company','cm_contact_has_tags','CampaignId','OwnerId','All','Any','AutomationAnyId','Actions','AutomationId','ParentId','Intervals','ChatApplications','FaxApplications','SmsApplications','DefaultReportId','CustomReportId','CmContactHasItem','ItemType','ItemTypeId','Hopper','CmHopperId','CmContactId','AllCondition','AnyConditions','AnyCondition','Action','AnalyticCustomReport','Fields','MetricId','SalesforceConfiguration','Configurations','AccountId','Subjects','SubjectId','Descriptions','DescriptionId','FieldId','Subject','Field','VariableId','int_desk_configuration_has_tags','Description','VtigerConfiguration','VtigerField','ServicenowConfiguration','FreshsalesConfiguration','ChatQueueReport','FromId','ToId','JscriptyAnswerReport','SessionId','ProjectId','team_has_openchannel_queues','team_has_whatsapp_queues','SquareProjectId','campaigns_has_cm_lists','BlackLists','campaigns_has_cm_blacklists','MailTransferReport','FromMailAccountId','FromAccount','FromUserId','ToUserId','ToAgent','ToQueue','ToAccount','FromChatWebsiteId','FromAgent','ToChatQueueId','ToChatWebsiteId','ToFaxQueueId','OpenchannelTransferReport','FromOpenchannelAccountId','ToOpenchannelAccountId','SmsTransferReport','FromSmsAccountId','HopperHistory','Queues','VoicePrefix','Resources','sectionId','WhatsappAccountId','whatsapp_interaction_has_tags','WhatsappInteractionId','WhatsappTransferReport','FromWhatsappAccountId','ToWhatsappAccountId','ToQueueId','WhatsappQueueId','user','exports','lodash','jstz','determine','defaultsDeep','xcall','127.0.0.1','mysql','name','utf8','sequelizeHistory','xC@LL1234','utf8_general_ci','sequelize','options','username','User','import','../api/user/user.model','VoiceChanSpy','../api/voiceChanSpy/voiceChanSpy.model','../api/voiceContext/voiceContext.model','VoiceExtension','../api/voiceExtension/voiceExtension.model','../api/voiceMusicOnHold/voiceMusicOnHold.model','VoiceQueue','../api/voiceQueue/voiceQueue.model','VoiceRecording','../api/voiceRecording/voiceRecording.model','../api/screenRecording/screenRecording.model','VoiceMailMessage','../api/voiceMailMessage/voiceMailMessage.model','VoiceCallReport','../api/voiceCallReport/voiceCallReport.model','VoiceDialReport','../api/voiceDialReport/voiceDialReport.model','VoiceAgentReport','VoiceQueueReport','../api/voiceQueueReport/voiceQueueReport.model','MemberReport','../api/memberReport/memberReport.model','Trunk','VoiceTransferReport','../api/voiceTransferReport/voiceTransferReport.model','../api/userVoiceQueueRt/userVoiceQueueRt.model','../api/userVoiceQueue/userVoiceQueue.model','UserChatQueue','../api/userChatQueue/userChatQueue.model','UserMailQueue','../api/userMailQueue/userMailQueue.model','UserFaxQueue','../api/userFaxQueue/userFaxQueue.model','../api/userSmsQueue/userSmsQueue.model','../api/userOpenchannelQueue/userOpenchannelQueue.model','UserWhatsappQueue','MailServerIn','../api/mailServerIn/mailServerIn.model','MailServerOut','../api/mailServerOut/mailServerOut.model','MailAccount','../api/mailAccount/mailAccount.model','../api/mailInteraction/mailInteraction.model','MailMessage','../api/mailMessage/mailMessage.model','MailApplication','../api/mailApplication/mailApplication.model','MailQueueReport','../api/mailQueueReport/mailQueueReport.model','../api/dashboard/dashboard.model','DashboardItem','../api/dashboardItem/dashboardItem.model','FaxAccount','../api/faxAccount/faxAccount.model','FaxApplication','../api/faxApplication/faxApplication.model','FaxInteraction','../api/faxInteraction/faxInteraction.model','FaxMessage','../api/faxMessage/faxMessage.model','FaxQueue','../api/faxQueue/faxQueue.model','FaxQueueReport','../api/faxQueueReport/faxQueueReport.model','SmsApplication','../api/smsApplication/smsApplication.model','SmsInteraction','../api/smsInteraction/smsInteraction.model','../api/smsMessage/smsMessage.model','OpenchannelApplication','../api/openchannelApplication/openchannelApplication.model','OpenchannelInteraction','../api/openchannelInteraction/openchannelInteraction.model','OpenchannelMessage','../api/openchannelMessage/openchannelMessage.model','OpenchannelQueue','../api/chatWebsite/chatWebsite.model','OpenchannelQueueReport','ChatApplication','../api/chatApplication/chatApplication.model','ChatInteraction','../api/chatInteraction/chatInteraction.model','ChatOfflineMessage','../api/chatOfflineMessage/chatOfflineMessage.model','ChatQueue','../api/chatQueue/chatQueue.model','ChatGroup','../api/chatGroup/chatGroup.model','ChatProactiveAction','../api/chatProactiveAction/chatProactiveAction.model','CmCompany','../api/cmContact/cmContact.model','../api/cmHopper/cmHopper.model','CmHopperBlack','../api/cmHopperBlack/cmHopperBlack.model','../api/cmHopperFinal/cmHopperFinal.model','CmHopperHistory','../api/cmHopperHistory/cmHopperHistory.model','ReportAgentPreview','../api/reportAgentPreview/reportAgentPreview.model','CmCustomField','Automation','../api/automation/automation.model','CannedAnswer','Disposition','../api/disposition/disposition.model','Condition','../api/condition/condition.model','Interval','../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','../api/contactItemType/contactItemType.model','../api/cmContactHasItem/cmContactHasItem.model','CmHopperAdditionalPhone','../api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.model','Template','Trigger','../api/trigger/trigger.model','Variable','Integration','../api/integration/integration.model','IntegrationReport','../api/integrationReport/integrationReport.model','../api/analyticCustomReport/analyticCustomReport.model','AnalyticDefaultReport','../api/analyticDefaultReport/analyticDefaultReport.model','AnalyticMetric','AnalyticFieldReport','../api/analyticFieldReport/analyticFieldReport.model','AnalyticTreeReport','../api/analyticTreeReport/analyticTreeReport.model','SalesforceAccount','../api/intSalesforceAccount/intSalesforceAccount.model','../api/intSalesforceConfiguration/intSalesforceConfiguration.model','SalesforceField','../api/intSalesforceField/intSalesforceField.model','SugarcrmAccount','../api/intSugarcrmAccount/intSugarcrmAccount.model','SugarcrmConfiguration','../api/intSugarcrmConfiguration/intSugarcrmConfiguration.model','SugarcrmField','DeskAccount','../api/intDeskAccount/intDeskAccount.model','DeskConfiguration','DeskField','../api/intDeskField/intDeskField.model','ZohoAccount','../api/intZohoAccount/intZohoAccount.model','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','../api/intFreshdeskAccount/intFreshdeskAccount.model','FreshdeskConfiguration','../api/intFreshdeskConfiguration/intFreshdeskConfiguration.model','FreshdeskField','../api/intFreshdeskField/intFreshdeskField.model','VtigerAccount','../api/intVtigerAccount/intVtigerAccount.model','../api/intVtigerConfiguration/intVtigerConfiguration.model','ServicenowAccount','ServicenowField','Dynamics365Account','../api/intDynamics365Account/intDynamics365Account.model','Dynamics365Configuration','../api/intDynamics365Configuration/intDynamics365Configuration.model','Dynamics365Field','../api/intDynamics365Field/intDynamics365Field.model','FreshsalesAccount','../api/intFreshsalesAccount/intFreshsalesAccount.model','../api/intFreshsalesConfiguration/intFreshsalesConfiguration.model','FreshsalesField','../api/intFreshsalesField/intFreshsalesField.model','Network','../api/chatQueueReport/chatQueueReport.model','ChatInternalMessage','../api/chatInternalMessage/chatInternalMessage.model','../api/jscriptyAnswerReport/jscriptyAnswerReport.model','JscriptyQuestionReport','../api/jscriptyQuestionReport/jscriptyQuestionReport.model','JscriptySessionReport','../api/jscriptySessionReport/jscriptySessionReport.model','SmsQueueReport','../api/smsQueueReport/smsQueueReport.model','../api/squareReportDetail/squareReportDetail.model','JscriptyProject','../api/jscriptyProject/jscriptyProject.model','Setting','../api/setting/setting.model','SquareOdbc','../api/squareOdbc/squareOdbc.model','SquareProject','../api/squareProject/squareProject.model','SquareRecording','../api/squareRecording/squareRecording.model','SquareMessage','../api/squareMessage/squareMessage.model','Team','../api/team/team.model','License','../api/license/license.model','Campaign','../api/campaign/campaign.model','Migration','../api/migration/migration.model','Attachment','../api/attachment/attachment.model','../api/plugin/plugin.model','../api/mailTransferReport/mailTransferReport.model','ChatTransferReport','FaxTransferReport','../api/faxTransferReport/faxTransferReport.model','../api/smsTransferReport/smsTransferReport.model','../api/voicePrefix/voicePrefix.model','UserProfile','UserProfileSection','../api/userProfileSection/userProfileSection.model','UserProfileResource','UserNotification','WhatsappApplication','../api/whatsappInteraction/whatsappInteraction.model','WhatsappMessage','../api/whatsappMessage/whatsappMessage.model','WhatsappQueueReport','../api/whatsappTransferReport/whatsappTransferReport.model','../api/whatsappQueue/whatsappQueue.model','CloudProvider','../api/cloudProvider/cloudProvider.model','TeamVoicePrefix','../api/teamVoicePrefix/teamVoicePrefix.model','UserVoicePrefix','../api/userVoicePrefix/userVoicePrefix.model','../api/user-setting/user-setting.model','hasOne','VoiceMail','cascade','UserSetting','userSetting','hasMany','UserId','UserVoiceQueueRt','Extensions','CmHopperFinal','HopperFinals','OpenchannelInteractions','FaxInteractions','MailInteraction','MailInteractions','WhatsappInteraction','WhatsappInteractions','CmHopper','SET\x20NULL','userProfileId','belongsToMany','Groups','chat_group_has_users','Contacts','cm_user_has_contacts','CmList','Lists','cm_user_has_lists','user_has_teams','user_has_mail_interactions','ChatInteractions'];(function(_0x2fd8c4,_0x19c608){var _0x3178ee=function(_0x584625){while(--_0x584625){_0x2fd8c4['push'](_0x2fd8c4['shift']());}};_0x3178ee(++_0x19c608);}(_0xd21b,0xcf));var _0xbd21=function(_0x28f153,_0x4852ed){_0x28f153=_0x28f153-0x0;var _0x56b861=_0xd21b[_0x28f153];return _0x56b861;};'use strict';var config=require('../config/environment');var Sequelize=require('sequelize');var _=require(_0xbd21('0x0'));var jstz=require(_0xbd21('0x1'));var timezone=jstz[_0xbd21('0x2')]();config['sequelize']=_[_0xbd21('0x3')](config['sequelize'],{'database':'motion2','username':_0xbd21('0x4'),'password':'xC@LL1234','options':{'host':_0xbd21('0x5'),'port':0xcea,'dialect':_0xbd21('0x6'),'dialectOptions':{'charset':'utf8mb4'},'logging':![],'timezone':timezone[_0xbd21('0x7')](),'define':{'charset':_0xbd21('0x8'),'collate':'utf8_general_ci'}}});config[_0xbd21('0x9')]=_[_0xbd21('0x3')](config['sequelizeHistory'],{'database':'motion2','username':_0xbd21('0x4'),'password':_0xbd21('0xa'),'options':{'host':_0xbd21('0x5'),'port':0xcea,'dialect':_0xbd21('0x6'),'dialectOptions':{'charset':'utf8mb4'},'logging':![],'timezone':timezone['name'](),'define':{'charset':_0xbd21('0x8'),'collate':_0xbd21('0xb')}}});var db={'Sequelize':Sequelize,'sequelize':new Sequelize(config[_0xbd21('0xc')]['database'],config[_0xbd21('0xc')]['username'],config[_0xbd21('0xc')]['password'],config['sequelize'][_0xbd21('0xd')])};var dbH={'Sequelize':Sequelize,'sequelize':new Sequelize(config[_0xbd21('0x9')]['database'],config['sequelizeHistory'][_0xbd21('0xe')],config[_0xbd21('0x9')]['password'],config[_0xbd21('0x9')]['options'])};db[_0xbd21('0xf')]=db['sequelize'][_0xbd21('0x10')](_0xbd21('0x11'));db[_0xbd21('0x12')]=db[_0xbd21('0xc')]['import'](_0xbd21('0x13'));db['VoiceContext']=db['sequelize']['import'](_0xbd21('0x14'));db[_0xbd21('0x15')]=db[_0xbd21('0xc')]['import'](_0xbd21('0x16'));db['VoiceMusicOnHold']=db['sequelize']['import'](_0xbd21('0x17'));db[_0xbd21('0x18')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x19'));db[_0xbd21('0x1a')]=db[_0xbd21('0xc')]['import'](_0xbd21('0x1b'));db['ScreenRecording']=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x1c'));db['VoiceMail']=db[_0xbd21('0xc')]['import']('../api/voiceMail/voiceMail.model');db[_0xbd21('0x1d')]=db['sequelize'][_0xbd21('0x10')](_0xbd21('0x1e'));db[_0xbd21('0x1f')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x20'));db[_0xbd21('0x21')]=db[_0xbd21('0xc')]['import'](_0xbd21('0x22'));db[_0xbd21('0x23')]=db['sequelize'][_0xbd21('0x10')]('../api/voiceAgentReport/voiceAgentReport.model');db[_0xbd21('0x24')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x25'));db[_0xbd21('0x26')]=db[_0xbd21('0xc')]['import'](_0xbd21('0x27'));db[_0xbd21('0x28')]=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/trunk/trunk.model');db[_0xbd21('0x29')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x2a'));db['UserVoiceQueueRt']=db['sequelize'][_0xbd21('0x10')](_0xbd21('0x2b'));db['UserVoiceQueue']=db['sequelize'][_0xbd21('0x10')](_0xbd21('0x2c'));db[_0xbd21('0x2d')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x2e'));db[_0xbd21('0x2f')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x30'));db[_0xbd21('0x31')]=db['sequelize'][_0xbd21('0x10')](_0xbd21('0x32'));db['UserSmsQueue']=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x33'));db['UserOpenchannelQueue']=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x34'));db[_0xbd21('0x35')]=db[_0xbd21('0xc')]['import']('../api/userWhatsappQueue/userWhatsappQueue.model');db[_0xbd21('0x36')]=db['sequelize'][_0xbd21('0x10')](_0xbd21('0x37'));db[_0xbd21('0x38')]=db[_0xbd21('0xc')]['import'](_0xbd21('0x39'));db[_0xbd21('0x3a')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x3b'));db['MailQueue']=db[_0xbd21('0xc')]['import']('../api/mailQueue/mailQueue.model');db['MailSubstatus']=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/mailSubstatus/mailSubstatus.model');db['MailInteraction']=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x3c'));db[_0xbd21('0x3d')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x3e'));db[_0xbd21('0x3f')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x40'));db[_0xbd21('0x41')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x42'));db['Dashboard']=db['sequelize'][_0xbd21('0x10')](_0xbd21('0x43'));db[_0xbd21('0x44')]=db['sequelize'][_0xbd21('0x10')](_0xbd21('0x45'));db[_0xbd21('0x46')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x47'));db[_0xbd21('0x48')]=db['sequelize']['import'](_0xbd21('0x49'));db[_0xbd21('0x4a')]=db[_0xbd21('0xc')]['import'](_0xbd21('0x4b'));db[_0xbd21('0x4c')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x4d'));db[_0xbd21('0x4e')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x4f'));db[_0xbd21('0x50')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x51'));db['SmsAccount']=db['sequelize'][_0xbd21('0x10')]('../api/smsAccount/smsAccount.model');db[_0xbd21('0x52')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x53'));db[_0xbd21('0x54')]=db['sequelize'][_0xbd21('0x10')](_0xbd21('0x55'));db['SmsMessage']=db[_0xbd21('0xc')]['import'](_0xbd21('0x56'));db['SmsQueue']=db['sequelize']['import']('../api/smsQueue/smsQueue.model');db['OpenchannelAccount']=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/openchannelAccount/openchannelAccount.model');db[_0xbd21('0x57')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x58'));db[_0xbd21('0x59')]=db[_0xbd21('0xc')]['import'](_0xbd21('0x5a'));db[_0xbd21('0x5b')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x5c'));db[_0xbd21('0x5d')]=db[_0xbd21('0xc')]['import']('../api/openchannelQueue/openchannelQueue.model');db['ChatWebsite']=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x5e'));db[_0xbd21('0x5f')]=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/openchannelQueueReport/openchannelQueueReport.model');db[_0xbd21('0x60')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x61'));db[_0xbd21('0x62')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x63'));db['ChatMessage']=db[_0xbd21('0xc')]['import']('../api/chatMessage/chatMessage.model');db[_0xbd21('0x64')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x65'));db[_0xbd21('0x66')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x67'));db[_0xbd21('0x68')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x69'));db[_0xbd21('0x6a')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x6b'));db[_0xbd21('0x6c')]=db[_0xbd21('0xc')]['import']('../api/cmCompany/cmCompany.model');db['CmContact']=db[_0xbd21('0xc')]['import'](_0xbd21('0x6d'));db['CmHopper']=db['sequelize'][_0xbd21('0x10')](_0xbd21('0x6e'));db[_0xbd21('0x6f')]=db['sequelize'][_0xbd21('0x10')](_0xbd21('0x70'));db['CmHopperFinal']=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x71'));db[_0xbd21('0x72')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x73'));db[_0xbd21('0x74')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x75'));db[_0xbd21('0x76')]=db['sequelize'][_0xbd21('0x10')]('../api/cmCustomField/cmCustomField.model');db['Action']=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/action/action.model');db[_0xbd21('0x77')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x78'));db[_0xbd21('0x79')]=db[_0xbd21('0xc')]['import']('../api/cannedAnswer/cannedAnswer.model');db[_0xbd21('0x7a')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x7b'));db[_0xbd21('0x7c')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x7d'));db[_0xbd21('0x7e')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x7f'));db[_0xbd21('0x80')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x81'));db[_0xbd21('0x82')]=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/cdr/cdr.model');db[_0xbd21('0x83')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x84'));db[_0xbd21('0x85')]=db['sequelize']['import'](_0xbd21('0x86'));db[_0xbd21('0x87')]=db['sequelize'][_0xbd21('0x10')]('../api/sound/sound.model');db['Tag']=db[_0xbd21('0xc')]['import'](_0xbd21('0x88'));db[_0xbd21('0x89')]=db[_0xbd21('0xc')]['import'](_0xbd21('0x8a'));db['CmContactHasItem']=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x8b'));db[_0xbd21('0x8c')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x8d'));db[_0xbd21('0x8e')]=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/template/template.model');db[_0xbd21('0x8f')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x90'));db[_0xbd21('0x91')]=db[_0xbd21('0xc')]['import']('../api/variable/variable.model');db[_0xbd21('0x92')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x93'));db[_0xbd21('0x94')]=db[_0xbd21('0xc')]['import'](_0xbd21('0x95'));db['AnalyticCustomReport']=db['sequelize']['import'](_0xbd21('0x96'));db[_0xbd21('0x97')]=db['sequelize'][_0xbd21('0x10')](_0xbd21('0x98'));db['AnalyticExtractedReport']=db['sequelize']['import']('../api/analyticExtractedReport/analyticExtractedReport.model');db[_0xbd21('0x99')]=db['sequelize'][_0xbd21('0x10')]('../api/analyticMetric/analyticMetric.model');db[_0xbd21('0x9a')]=db['sequelize'][_0xbd21('0x10')](_0xbd21('0x9b'));db[_0xbd21('0x9c')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x9d'));db[_0xbd21('0x9e')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x9f'));db['SalesforceConfiguration']=db[_0xbd21('0xc')]['import'](_0xbd21('0xa0'));db[_0xbd21('0xa1')]=db['sequelize'][_0xbd21('0x10')](_0xbd21('0xa2'));db[_0xbd21('0xa3')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xa4'));db[_0xbd21('0xa5')]=db[_0xbd21('0xc')]['import'](_0xbd21('0xa6'));db[_0xbd21('0xa7')]=db[_0xbd21('0xc')]['import']('../api/intSugarcrmField/intSugarcrmField.model');db[_0xbd21('0xa8')]=db[_0xbd21('0xc')]['import'](_0xbd21('0xa9'));db[_0xbd21('0xaa')]=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/intDeskConfiguration/intDeskConfiguration.model');db[_0xbd21('0xab')]=db['sequelize'][_0xbd21('0x10')](_0xbd21('0xac'));db[_0xbd21('0xad')]=db['sequelize'][_0xbd21('0x10')](_0xbd21('0xae'));db[_0xbd21('0xaf')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xb0'));db[_0xbd21('0xb1')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xb2'));db[_0xbd21('0xb3')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xb4'));db[_0xbd21('0xb5')]=db['sequelize'][_0xbd21('0x10')](_0xbd21('0xb6'));db[_0xbd21('0xb7')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xb8'));db[_0xbd21('0xb9')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xba'));db[_0xbd21('0xbb')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xbc'));db[_0xbd21('0xbd')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xbe'));db[_0xbd21('0xbf')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xc0'));db['VtigerConfiguration']=db[_0xbd21('0xc')]['import'](_0xbd21('0xc1'));db['VtigerField']=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/intVtigerField/intVtigerField.model');db[_0xbd21('0xc2')]=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/intServicenowAccount/intServicenowAccount.model');db['ServicenowConfiguration']=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/intServicenowConfiguration/intServicenowConfiguration.model');db[_0xbd21('0xc3')]=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/intServicenowField/intServicenowField.model');db[_0xbd21('0xc4')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xc5'));db[_0xbd21('0xc6')]=db[_0xbd21('0xc')]['import'](_0xbd21('0xc7'));db[_0xbd21('0xc8')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xc9'));db[_0xbd21('0xca')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xcb'));db['FreshsalesConfiguration']=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xcc'));db[_0xbd21('0xcd')]=db['sequelize'][_0xbd21('0x10')](_0xbd21('0xce'));db[_0xbd21('0x92')]=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/integration/integration.model');db[_0xbd21('0xcf')]=db[_0xbd21('0xc')]['import']('../api/network/network.model');db['ChatQueueReport']=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xd0'));db[_0xbd21('0xd1')]=db[_0xbd21('0xc')]['import'](_0xbd21('0xd2'));db['JscriptyAnswerReport']=db[_0xbd21('0xc')]['import'](_0xbd21('0xd3'));db[_0xbd21('0xd4')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xd5'));db[_0xbd21('0xd6')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xd7'));db[_0xbd21('0xd8')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xd9'));db['SquareReport']=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/squareReport/squareReport.model');db['SquareDetailsReport']=db[_0xbd21('0xc')]['import'](_0xbd21('0xda'));db[_0xbd21('0xdb')]=db[_0xbd21('0xc')]['import'](_0xbd21('0xdc'));db[_0xbd21('0xdd')]=db['sequelize']['import'](_0xbd21('0xde'));db[_0xbd21('0xdf')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xe0'));db[_0xbd21('0xe1')]=db['sequelize'][_0xbd21('0x10')](_0xbd21('0xe2'));db[_0xbd21('0xe3')]=db['sequelize'][_0xbd21('0x10')](_0xbd21('0xe4'));db[_0xbd21('0xe5')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xe6'));db[_0xbd21('0xe7')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xe8'));db[_0xbd21('0xe9')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xea'));db[_0xbd21('0xeb')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xec'));db[_0xbd21('0xed')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xee'));db[_0xbd21('0xef')]=db['sequelize']['import'](_0xbd21('0xf0'));db['Plugin']=db['sequelize'][_0xbd21('0x10')](_0xbd21('0xf1'));db['MailTransferReport']=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xf2'));db[_0xbd21('0xf3')]=db['sequelize'][_0xbd21('0x10')]('../api/chatTransferReport/chatTransferReport.model');db[_0xbd21('0xf4')]=db[_0xbd21('0xc')]['import'](_0xbd21('0xf5'));db['OpenchannelTransferReport']=db['sequelize'][_0xbd21('0x10')]('../api/openchannelTransferReport/openchannelTransferReport.model');db['SmsTransferReport']=db['sequelize'][_0xbd21('0x10')](_0xbd21('0xf6'));db['CmList']=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/cmList/cmList.model');db['VoicePrefix']=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xf7'));db[_0xbd21('0xf8')]=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/userProfile/userProfile.model');db[_0xbd21('0xf9')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0xfa'));db[_0xbd21('0xfb')]=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/userProfileResource/userProfileResource.model');db[_0xbd21('0xfc')]=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/userNotification/userNotification.model');db['WhatsappAccount']=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/whatsappAccount/whatsappAccount.model');db[_0xbd21('0xfd')]=db['sequelize']['import']('../api/whatsappApplication/whatsappApplication.model');db['WhatsappInteraction']=db['sequelize'][_0xbd21('0x10')](_0xbd21('0xfe'));db[_0xbd21('0xff')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x100'));db[_0xbd21('0x101')]=db['sequelize'][_0xbd21('0x10')]('../api/whatsappQueueReport/whatsappQueueReport.model');db['WhatsappTransferReport']=db['sequelize']['import'](_0xbd21('0x102'));db['WhatsappQueue']=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x103'));db[_0xbd21('0x104')]=db['sequelize'][_0xbd21('0x10')](_0xbd21('0x105'));db['TeamVoiceQueue']=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/teamVoiceQueue/teamVoiceQueue.model');db[_0xbd21('0x106')]=db[_0xbd21('0xc')][_0xbd21('0x10')](_0xbd21('0x107'));db[_0xbd21('0x108')]=db['sequelize'][_0xbd21('0x10')](_0xbd21('0x109'));db['UserSetting']=db['sequelize'][_0xbd21('0x10')](_0xbd21('0x10a'));db['MailInteractionHasTag']=db[_0xbd21('0xc')][_0xbd21('0x10')]('../api/mailInteractionHasTag/mailInteractionHasTag.model');db['User'][_0xbd21('0x10b')](db[_0xbd21('0x10c')],{'as':_0xbd21('0x10c'),'onDelete':_0xbd21('0x10d'),'foreignKey':'UserId'});db[_0xbd21('0xf')][_0xbd21('0x10b')](db[_0xbd21('0x10e')],{'as':_0xbd21('0x10f'),'onDelete':'cascade','foreignKey':'UserId'});db['User'][_0xbd21('0x110')](db[_0xbd21('0x1a')],{'as':'Recordings','foreignKey':_0xbd21('0x111')});db['User'][_0xbd21('0x110')](db[_0xbd21('0x112')],{'as':'VoiceQueuesRt','foreignKey':_0xbd21('0x111')});db[_0xbd21('0xf')][_0xbd21('0x110')](db[_0xbd21('0x15')],{'as':_0xbd21('0x113'),'onDelete':_0xbd21('0x10d'),'hooks':!![]});db['User'][_0xbd21('0x110')](db[_0xbd21('0x114')],{'as':_0xbd21('0x115'),'foreignKey':_0xbd21('0x111')});db[_0xbd21('0xf')]['hasMany'](db[_0xbd21('0x72')],{'as':'HopperHistory','foreignKey':'UserId'});db[_0xbd21('0xf')][_0xbd21('0x110')](db['ReportAgentPreview'],{'as':_0xbd21('0x74'),'foreignKey':'UserId'});db[_0xbd21('0xf')]['hasMany'](db[_0xbd21('0x59')],{'as':_0xbd21('0x116'),'foreignKey':_0xbd21('0x111')});db[_0xbd21('0xf')][_0xbd21('0x110')](db[_0xbd21('0x62')],{'as':'ChatInteractions','foreignKey':_0xbd21('0x111')});db[_0xbd21('0xf')]['hasMany'](db['SmsInteraction'],{'as':'SmsInteractions','foreignKey':'UserId'});db[_0xbd21('0xf')][_0xbd21('0x110')](db['FaxInteraction'],{'as':_0xbd21('0x117'),'foreignKey':_0xbd21('0x111')});db[_0xbd21('0xf')]['hasMany'](db[_0xbd21('0x118')],{'as':_0xbd21('0x119'),'foreignKey':_0xbd21('0x111')});db[_0xbd21('0xf')][_0xbd21('0x110')](db[_0xbd21('0x11a')],{'as':_0xbd21('0x11b'),'foreignKey':_0xbd21('0x111')});db['User'][_0xbd21('0x110')](db['UserNotification'],{'as':'UserNotifications','foreignKey':'SenderId'});db[_0xbd21('0xf')][_0xbd21('0x110')](db[_0xbd21('0x11c')],{'as':'Hoppers','foreignKey':_0xbd21('0x111'),'onDelete':_0xbd21('0x11d')});db['User']['belongsTo'](db[_0xbd21('0xf8')],{'as':'UserProfile','foreignKey':_0xbd21('0x11e')});db[_0xbd21('0xf')][_0xbd21('0x11f')](db[_0xbd21('0x68')],{'as':_0xbd21('0x120'),'through':_0xbd21('0x121')});db[_0xbd21('0xf')][_0xbd21('0x11f')](db['CmContact'],{'as':_0xbd21('0x122'),'through':_0xbd21('0x123')});db['User'][_0xbd21('0x11f')](db[_0xbd21('0x124')],{'as':_0xbd21('0x125'),'through':_0xbd21('0x126')});db['User'][_0xbd21('0x11f')](db[_0xbd21('0xe7')],{'through':_0xbd21('0x127')});db[_0xbd21('0xf')][_0xbd21('0x11f')](db[_0xbd21('0x118')],{'as':'MailInteractions','through':_0xbd21('0x128')});db[_0xbd21('0xf')][_0xbd21('0x11f')](db['ChatInteraction'],{'as':_0xbd21('0x129'),'through':_0xbd21('0x12a')});db['User'][_0xbd21('0x11f')](db[_0xbd21('0x4a')],{'as':_0xbd21('0x117'),'through':_0xbd21('0x12b')});db['User'][_0xbd21('0x11f')](db[_0xbd21('0x54')],{'as':_0xbd21('0x12c'),'through':_0xbd21('0x12d')});db[_0xbd21('0xf')]['belongsToMany'](db[_0xbd21('0x59')],{'as':_0xbd21('0x116'),'through':_0xbd21('0x12e')});db[_0xbd21('0xf')][_0xbd21('0x11f')](db[_0xbd21('0x11a')],{'as':_0xbd21('0x11b'),'through':_0xbd21('0x12f')});db['User'][_0xbd21('0x11f')](db[_0xbd21('0x18')],{'as':_0xbd21('0x130'),'through':'UserVoiceQueue','required':![]});db[_0xbd21('0xf')][_0xbd21('0x11f')](db['VoicePrefix'],{'as':_0xbd21('0x131'),'through':_0xbd21('0x108'),'required':![]});db[_0xbd21('0xf')]['belongsToMany'](db[_0xbd21('0x132')],{'as':'MailQueues','through':_0xbd21('0x2f'),'required':![]});db[_0xbd21('0xf')]['belongsToMany'](db[_0xbd21('0x66')],{'as':_0xbd21('0x133'),'through':_0xbd21('0x2d'),'required':![],'hooks':!![]});db[_0xbd21('0xf')][_0xbd21('0x11f')](db[_0xbd21('0x4e')],{'as':_0xbd21('0x134'),'through':_0xbd21('0x31'),'required':![]});db['User']['belongsToMany'](db['SmsQueue'],{'as':_0xbd21('0x135'),'through':_0xbd21('0x136'),'required':![]});db[_0xbd21('0xf')][_0xbd21('0x11f')](db['OpenchannelQueue'],{'as':'OpenchannelQueues','through':'UserOpenchannelQueue','required':![]});db[_0xbd21('0xf')][_0xbd21('0x11f')](db[_0xbd21('0x137')],{'as':_0xbd21('0x138'),'through':_0xbd21('0x35'),'required':![]});db[_0xbd21('0xf')][_0xbd21('0x11f')](db[_0xbd21('0x124')],{'through':'cm_user_has_lists'});db[_0xbd21('0xf')][_0xbd21('0x11f')](db[_0xbd21('0x139')],{'as':_0xbd21('0x13a'),'through':'user_has_chat_websites'});db[_0xbd21('0xf')]['belongsToMany'](db[_0xbd21('0x46')],{'as':_0xbd21('0x13b'),'through':_0xbd21('0x13c')});db[_0xbd21('0xf')][_0xbd21('0x11f')](db['MailAccount'],{'as':_0xbd21('0x13d'),'through':_0xbd21('0x13e')});db['User'][_0xbd21('0x11f')](db[_0xbd21('0x13f')],{'as':'OpenchannelAccounts','through':_0xbd21('0x140')});db[_0xbd21('0xf')][_0xbd21('0x11f')](db[_0xbd21('0x141')],{'as':_0xbd21('0x142'),'through':_0xbd21('0x143')});db['User'][_0xbd21('0x11f')](db[_0xbd21('0x144')],{'as':_0xbd21('0x145'),'through':_0xbd21('0x146')});db[_0xbd21('0x12')][_0xbd21('0x110')](db[_0xbd21('0x15')],{'as':_0xbd21('0x147'),'onDelete':'cascade','foreignKey':'ChanSpyId'});db['VoiceContext'][_0xbd21('0x110')](db[_0xbd21('0x15')],{'onDelete':_0xbd21('0x10d')});db[_0xbd21('0x15')][_0xbd21('0x110')](db[_0xbd21('0x15')],{'as':'Applications','onDelete':_0xbd21('0x10d')});db[_0xbd21('0x148')]['belongsToMany'](db['Sound'],{'as':'Sounds','through':_0xbd21('0x149')});db[_0xbd21('0x18')][_0xbd21('0x110')](db[_0xbd21('0x112')],{'as':_0xbd21('0x14a'),'foreignKey':_0xbd21('0x14b')});db[_0xbd21('0x18')][_0xbd21('0x110')](db['CmHopper'],{'as':'Hoppers','foreignKey':_0xbd21('0x14b')});db[_0xbd21('0x18')][_0xbd21('0x110')](db[_0xbd21('0x114')],{'as':'HopperFinals','foreignKey':_0xbd21('0x14b')});db[_0xbd21('0x18')][_0xbd21('0x110')](db[_0xbd21('0x72')],{'as':_0xbd21('0x14c'),'foreignKey':_0xbd21('0x14b')});db[_0xbd21('0x18')][_0xbd21('0x110')](db[_0xbd21('0x74')],{'as':_0xbd21('0x74'),'foreignKey':_0xbd21('0x14b')});db[_0xbd21('0x18')]['hasMany'](db[_0xbd21('0x6f')],{'as':_0xbd21('0x14d'),'foreignKey':_0xbd21('0x14b')});db[_0xbd21('0x18')]['hasMany'](db[_0xbd21('0xd6')],{'as':_0xbd21('0x14e'),'foreignKey':_0xbd21('0x14b')});db[_0xbd21('0x18')]['belongsTo'](db[_0xbd21('0x28')],{'as':'Trunk','foreignKey':_0xbd21('0x14f')});db[_0xbd21('0x18')]['belongsTo'](db[_0xbd21('0x28')],{'as':_0xbd21('0x150'),'foreignKey':_0xbd21('0x151')});db[_0xbd21('0x18')][_0xbd21('0x152')](db[_0xbd21('0x7e')],{'as':_0xbd21('0x7e'),'foreignKey':_0xbd21('0x153')});db[_0xbd21('0x18')][_0xbd21('0x152')](db[_0xbd21('0x80')],{'as':'mandatoryDispositionPause','foreignKey':_0xbd21('0x154')});db['VoiceQueue']['belongsToMany'](db[_0xbd21('0x124')],{'as':_0xbd21('0x125'),'through':_0xbd21('0x155')});db['VoiceQueue'][_0xbd21('0x11f')](db['User'],{'as':_0xbd21('0x156'),'through':'UserVoiceQueue'});db[_0xbd21('0x18')]['belongsToMany'](db['Team'],{'as':_0xbd21('0x157'),'through':_0xbd21('0x158')});db['VoiceQueue'][_0xbd21('0x11f')](db['CmList'],{'as':'BlackLists','through':_0xbd21('0x159')});db[_0xbd21('0x1a')][_0xbd21('0x152')](db[_0xbd21('0xf')],{'as':'User','foreignKey':_0xbd21('0x111')});db[_0xbd21('0x15a')]['belongsTo'](db['User'],{'as':_0xbd21('0xf'),'foreignKey':_0xbd21('0x111')});db['VoiceMail'][_0xbd21('0x110')](db['VoiceMailMessage'],{'as':_0xbd21('0x15b'),'onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x15c'),'sourceKey':'mailbox'});db[_0xbd21('0x1d')]['belongsTo'](db[_0xbd21('0x10c')],{'foreignKey':_0xbd21('0x15c'),'targetKey':'mailbox'});db[_0xbd21('0x1f')][_0xbd21('0x110')](db[_0xbd21('0x24')],{'as':_0xbd21('0x15d'),'foreignKey':_0xbd21('0x15e'),'constraints':![]});db['VoiceCallReport']['hasMany'](db[_0xbd21('0x23')],{'as':'AgentReports','foreignKey':'uniqueid','constraints':![]});db[_0xbd21('0x1f')][_0xbd21('0x152')](db[_0xbd21('0xf')],{'as':'User','foreignKey':'UserId'});db[_0xbd21('0x1f')]['belongsTo'](db['CmContact'],{'as':'Contact','foreignKey':_0xbd21('0x15f')});db[_0xbd21('0x36')][_0xbd21('0x152')](db[_0xbd21('0x3a')],{'as':_0xbd21('0x3a'),'foreignKey':_0xbd21('0x160')});db[_0xbd21('0x36')]['belongsTo'](db['CloudProvider'],{'as':_0xbd21('0x104'),'foreignKey':_0xbd21('0x161'),'onDelete':'restrict'});db[_0xbd21('0x38')]['belongsTo'](db['MailAccount'],{'as':_0xbd21('0x3a'),'foreignKey':_0xbd21('0x160')});db[_0xbd21('0x38')]['belongsTo'](db[_0xbd21('0x104')],{'as':_0xbd21('0x104'),'foreignKey':'CloudProviderId','onDelete':_0xbd21('0x162')});db['MailAccount'][_0xbd21('0x10b')](db[_0xbd21('0x36')],{'as':_0xbd21('0x163'),'onDelete':_0xbd21('0x10d')});db[_0xbd21('0x3a')][_0xbd21('0x10b')](db[_0xbd21('0x38')],{'as':_0xbd21('0x164'),'onDelete':_0xbd21('0x10d')});db[_0xbd21('0x3a')][_0xbd21('0x110')](db['Disposition'],{'as':_0xbd21('0x165'),'foreignKey':'MailAccountId','onDelete':_0xbd21('0x10d')});db['MailAccount'][_0xbd21('0x110')](db[_0xbd21('0x79')],{'as':_0xbd21('0x166'),'foreignKey':_0xbd21('0x160')});db[_0xbd21('0x3a')][_0xbd21('0x110')](db[_0xbd21('0x3d')],{'as':'Messages','foreignKey':'MailAccountId'});db['MailAccount']['hasMany'](db[_0xbd21('0x118')],{'as':'Interactions'});db['MailAccount'][_0xbd21('0x110')](db['MailApplication'],{'as':_0xbd21('0x167'),'foreignKey':_0xbd21('0x160'),'onDelete':_0xbd21('0x10d')});db[_0xbd21('0x3a')][_0xbd21('0x152')](db['CmList'],{'as':'List','foreignKey':'ListId'});db['MailAccount'][_0xbd21('0x152')](db[_0xbd21('0x8e')],{'as':'Template','foreignKey':_0xbd21('0x168')});db['MailAccount'][_0xbd21('0x152')](db['Pause'],{'as':'mandatoryDispositionPause','foreignKey':_0xbd21('0x154')});db[_0xbd21('0x3a')]['belongsToMany'](db['User'],{'as':_0xbd21('0x156'),'through':_0xbd21('0x13e')});db[_0xbd21('0x132')][_0xbd21('0x11f')](db['User'],{'as':'Agents','through':_0xbd21('0x2f')});db['MailQueue']['belongsToMany'](db[_0xbd21('0xe7')],{'through':_0xbd21('0x169'),'as':_0xbd21('0x157')});db[_0xbd21('0x118')][_0xbd21('0x110')](db[_0xbd21('0x3d')],{'as':_0xbd21('0x15b'),'onDelete':'cascade','foreignKey':'MailInteractionId'});db['MailInteraction'][_0xbd21('0x152')](db[_0xbd21('0x3a')],{'as':_0xbd21('0x16a'),'foreignKey':_0xbd21('0x160')});db['MailInteraction'][_0xbd21('0x152')](db[_0xbd21('0x16b')],{'as':_0xbd21('0x16c'),'foreignKey':_0xbd21('0x15f')});db['MailInteraction']['belongsTo'](db[_0xbd21('0xf')],{'as':_0xbd21('0x16d'),'foreignKey':_0xbd21('0x111')});db[_0xbd21('0x118')][_0xbd21('0x11f')](db['Tag'],{'through':_0xbd21('0x16e'),'as':'Tags'});db[_0xbd21('0x118')][_0xbd21('0x11f')](db[_0xbd21('0x16f')],{'through':_0xbd21('0x16e'),'as':_0xbd21('0x170')});db['MailInteraction'][_0xbd21('0x11f')](db[_0xbd21('0xf')],{'as':'Users','through':_0xbd21('0x128'),'foreignKey':_0xbd21('0x171')});db[_0xbd21('0x3d')][_0xbd21('0x110')](db[_0xbd21('0xef')],{'as':_0xbd21('0x172'),'onDelete':_0xbd21('0x10d')});db['MailMessage'][_0xbd21('0x152')](db[_0xbd21('0xf')],{'as':_0xbd21('0xf')});db[_0xbd21('0x3d')]['belongsTo'](db[_0xbd21('0x16b')],{'onDelete':'cascade','as':'Contact'});db[_0xbd21('0x3d')][_0xbd21('0x152')](db[_0xbd21('0x118')],{'as':_0xbd21('0x173'),'foreignKey':_0xbd21('0x171')});db[_0xbd21('0x3d')][_0xbd21('0x152')](db[_0xbd21('0x3a')],{'as':_0xbd21('0x16a'),'foreignKey':_0xbd21('0x160')});db[_0xbd21('0x3d')]['belongsTo'](db['ChatWebsite'],{'as':'ChatWebsite','foreignKey':_0xbd21('0x174')});db[_0xbd21('0x3d')][_0xbd21('0x152')](db[_0xbd21('0x64')],{'as':_0xbd21('0x64'),'foreignKey':_0xbd21('0x175')});db[_0xbd21('0x3f')]['belongsTo'](db[_0xbd21('0xf')],{'onDelete':_0xbd21('0x162')});db[_0xbd21('0x3f')][_0xbd21('0x152')](db[_0xbd21('0x132')],{'onDelete':_0xbd21('0x162')});db[_0xbd21('0x3f')][_0xbd21('0x152')](db[_0xbd21('0x3a')],{'onDelete':_0xbd21('0x162')});db['MailApplication'][_0xbd21('0x152')](db[_0xbd21('0x7e')],{'onDelete':'restrict','foreignKey':_0xbd21('0x153')});db['MailApplication'][_0xbd21('0x152')](db['Tag'],{'onDelete':'restrict','foreignKey':_0xbd21('0x176')});db[_0xbd21('0x41')][_0xbd21('0x152')](db[_0xbd21('0x3a')],{});db[_0xbd21('0x41')][_0xbd21('0x152')](db[_0xbd21('0x124')],{'as':_0xbd21('0x177'),'foreignKey':_0xbd21('0x178')});db[_0xbd21('0x41')][_0xbd21('0x152')](db[_0xbd21('0x16b')],{'as':_0xbd21('0x16c'),'foreignKey':'ContactId'});db[_0xbd21('0x41')][_0xbd21('0x152')](db[_0xbd21('0x118')],{});db['MailQueueReport']['belongsTo'](db[_0xbd21('0x3d')],{});db[_0xbd21('0x41')][_0xbd21('0x152')](db[_0xbd21('0xf')],{});db[_0xbd21('0x41')][_0xbd21('0x152')](db['MailQueue'],{});db[_0xbd21('0x179')][_0xbd21('0x110')](db['DashboardItem'],{'as':'Items','onDelete':'cascade'});db[_0xbd21('0x46')][_0xbd21('0x110')](db[_0xbd21('0x7a')],{'as':_0xbd21('0x165'),'foreignKey':_0xbd21('0x17a'),'onDelete':'cascade'});db[_0xbd21('0x46')][_0xbd21('0x110')](db[_0xbd21('0x79')],{'as':_0xbd21('0x166'),'foreignKey':'FaxAccountId'});db['FaxAccount'][_0xbd21('0x110')](db['FaxInteraction'],{'as':_0xbd21('0x17b')});db[_0xbd21('0x46')]['hasMany'](db[_0xbd21('0x48')],{'as':_0xbd21('0x167'),'foreignKey':'FaxAccountId','onDelete':_0xbd21('0x10d')});db[_0xbd21('0x46')][_0xbd21('0x110')](db[_0xbd21('0x15')],{'as':_0xbd21('0x17c'),'onDelete':_0xbd21('0x10d')});db[_0xbd21('0x46')][_0xbd21('0x110')](db['FaxMessage'],{'as':_0xbd21('0x15b')});db[_0xbd21('0x46')][_0xbd21('0x152')](db[_0xbd21('0x28')],{'as':_0xbd21('0x28')});db['FaxAccount'][_0xbd21('0x152')](db[_0xbd21('0x124')],{'as':_0xbd21('0x177'),'foreignKey':_0xbd21('0x178')});db[_0xbd21('0x46')][_0xbd21('0x152')](db['Pause'],{'as':'mandatoryDispositionPause','foreignKey':'mandatoryDispositionPauseId'});db[_0xbd21('0x46')][_0xbd21('0x11f')](db['User'],{'as':_0xbd21('0x156'),'through':_0xbd21('0x13c')});db[_0xbd21('0x48')][_0xbd21('0x152')](db['User'],{'onDelete':_0xbd21('0x162')});db[_0xbd21('0x48')][_0xbd21('0x152')](db[_0xbd21('0x4e')],{'onDelete':'restrict'});db[_0xbd21('0x48')][_0xbd21('0x152')](db[_0xbd21('0x46')],{'onDelete':_0xbd21('0x162')});db['FaxApplication'][_0xbd21('0x152')](db['Tag'],{'onDelete':_0xbd21('0x162'),'foreignKey':_0xbd21('0x176')});db['FaxInteraction'][_0xbd21('0x110')](db['FaxMessage'],{'as':_0xbd21('0x15b'),'onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x17d')});db[_0xbd21('0x4a')]['belongsTo'](db[_0xbd21('0x46')],{'as':_0xbd21('0x16a'),'foreignKey':_0xbd21('0x17a')});db[_0xbd21('0x4a')]['belongsTo'](db[_0xbd21('0x16b')],{'as':_0xbd21('0x16c'),'foreignKey':_0xbd21('0x15f')});db['FaxInteraction']['belongsTo'](db['User'],{'as':_0xbd21('0x16d'),'foreignKey':'UserId'});db[_0xbd21('0x4a')][_0xbd21('0x11f')](db['Tag'],{'through':_0xbd21('0x17e'),'as':'Tags'});db[_0xbd21('0x4a')][_0xbd21('0x11f')](db[_0xbd21('0x16f')],{'through':_0xbd21('0x17e'),'as':_0xbd21('0x170')});db[_0xbd21('0x4a')][_0xbd21('0x11f')](db[_0xbd21('0xf')],{'as':_0xbd21('0x17f'),'through':_0xbd21('0x12b'),'foreignKey':'FaxInteractionId'});db[_0xbd21('0x4c')][_0xbd21('0x152')](db[_0xbd21('0xf')],{'onDelete':_0xbd21('0x10d'),'as':_0xbd21('0xf')});db[_0xbd21('0x4c')][_0xbd21('0x152')](db[_0xbd21('0x4a')],{'as':_0xbd21('0x173'),'foreignKey':_0xbd21('0x17d')});db[_0xbd21('0x4c')]['belongsTo'](db[_0xbd21('0x16b')],{'onDelete':_0xbd21('0x10d'),'as':_0xbd21('0x16c')});db[_0xbd21('0x4c')][_0xbd21('0x152')](db[_0xbd21('0xef')],{'as':_0xbd21('0xef'),'foreignKey':_0xbd21('0x180')});db[_0xbd21('0x4c')][_0xbd21('0x152')](db[_0xbd21('0x46')],{'as':_0xbd21('0x16a'),'foreignKey':_0xbd21('0x17a')});db[_0xbd21('0x4e')][_0xbd21('0x11f')](db['User'],{'as':_0xbd21('0x156'),'through':_0xbd21('0x31')});db[_0xbd21('0x4e')]['belongsToMany'](db[_0xbd21('0xe7')],{'through':_0xbd21('0x181'),'as':_0xbd21('0x157')});db['FaxQueueReport'][_0xbd21('0x152')](db[_0xbd21('0x46')],{});db[_0xbd21('0x50')][_0xbd21('0x152')](db[_0xbd21('0x124')],{'as':'List','foreignKey':_0xbd21('0x178')});db['FaxQueueReport'][_0xbd21('0x152')](db[_0xbd21('0x16b')],{'as':_0xbd21('0x16c'),'foreignKey':_0xbd21('0x15f')});db[_0xbd21('0x50')][_0xbd21('0x152')](db[_0xbd21('0x4a')],{});db['FaxQueueReport'][_0xbd21('0x152')](db[_0xbd21('0x4c')],{});db[_0xbd21('0x50')][_0xbd21('0x152')](db['User'],{});db['FaxQueueReport'][_0xbd21('0x152')](db[_0xbd21('0x4e')],{});db[_0xbd21('0x141')][_0xbd21('0x110')](db[_0xbd21('0x7a')],{'as':_0xbd21('0x165'),'foreignKey':_0xbd21('0x182'),'onDelete':'cascade'});db[_0xbd21('0x141')][_0xbd21('0x110')](db[_0xbd21('0x79')],{'as':_0xbd21('0x166'),'foreignKey':_0xbd21('0x182')});db[_0xbd21('0x141')][_0xbd21('0x110')](db['SmsMessage'],{'as':_0xbd21('0x15b'),'foreignKey':_0xbd21('0x182')});db[_0xbd21('0x141')][_0xbd21('0x110')](db['SmsInteraction'],{'as':_0xbd21('0x17b')});db[_0xbd21('0x141')][_0xbd21('0x110')](db['SmsApplication'],{'as':'Applications','foreignKey':'SmsAccountId','onDelete':'cascade'});db['SmsAccount'][_0xbd21('0x152')](db['CmList'],{'as':'List','foreignKey':_0xbd21('0x178')});db[_0xbd21('0x141')][_0xbd21('0x152')](db['Pause'],{'as':_0xbd21('0x183'),'foreignKey':_0xbd21('0x154')});db[_0xbd21('0x141')][_0xbd21('0x11f')](db[_0xbd21('0xf')],{'as':_0xbd21('0x156'),'through':_0xbd21('0x143')});db[_0xbd21('0x52')][_0xbd21('0x152')](db[_0xbd21('0xf')],{'onDelete':_0xbd21('0x162')});db[_0xbd21('0x52')]['belongsTo'](db[_0xbd21('0x184')],{'onDelete':'restrict'});db[_0xbd21('0x52')]['belongsTo'](db[_0xbd21('0x141')],{'onDelete':_0xbd21('0x162')});db['SmsApplication'][_0xbd21('0x152')](db[_0xbd21('0x7e')],{'onDelete':_0xbd21('0x162'),'foreignKey':_0xbd21('0x153')});db['SmsApplication'][_0xbd21('0x152')](db['Tag'],{'onDelete':_0xbd21('0x162'),'foreignKey':_0xbd21('0x176')});db['SmsInteraction']['hasMany'](db[_0xbd21('0x185')],{'as':_0xbd21('0x15b'),'onDelete':'cascade','foreignKey':_0xbd21('0x186')});db[_0xbd21('0x54')][_0xbd21('0x152')](db[_0xbd21('0x141')],{'as':_0xbd21('0x16a'),'foreignKey':'SmsAccountId'});db[_0xbd21('0x54')]['belongsTo'](db[_0xbd21('0x16b')],{'as':_0xbd21('0x16c'),'foreignKey':'ContactId'});db[_0xbd21('0x54')][_0xbd21('0x152')](db[_0xbd21('0xf')],{'as':'Owner','foreignKey':'UserId'});db[_0xbd21('0x54')][_0xbd21('0x11f')](db['Tag'],{'through':'sms_interaction_has_tags','as':_0xbd21('0x187')});db[_0xbd21('0x54')][_0xbd21('0x11f')](db['Tag'],{'through':_0xbd21('0x188'),'as':_0xbd21('0x170')});db[_0xbd21('0x54')][_0xbd21('0x11f')](db[_0xbd21('0xf')],{'as':_0xbd21('0x17f'),'through':_0xbd21('0x12d'),'foreignKey':_0xbd21('0x186')});db['SmsMessage']['belongsTo'](db['User'],{'as':_0xbd21('0xf')});db['SmsMessage'][_0xbd21('0x152')](db[_0xbd21('0x16b')],{'onDelete':_0xbd21('0x10d'),'as':_0xbd21('0x16c')});db[_0xbd21('0x185')][_0xbd21('0x152')](db['SmsInteraction'],{'onDelete':_0xbd21('0x10d'),'as':_0xbd21('0x173'),'foreignKey':_0xbd21('0x186')});db['SmsMessage'][_0xbd21('0x152')](db[_0xbd21('0x141')],{'as':_0xbd21('0x16a'),'foreignKey':'SmsAccountId'});db['SmsQueue']['belongsToMany'](db[_0xbd21('0xf')],{'as':_0xbd21('0x156'),'through':'UserSmsQueue','foreignKey':_0xbd21('0x189')});db[_0xbd21('0x184')][_0xbd21('0x11f')](db['Team'],{'through':_0xbd21('0x18a'),'as':_0xbd21('0x157')});db['OpenchannelAccount'][_0xbd21('0x110')](db['Disposition'],{'as':'Dispositions','foreignKey':'OpenchannelAccountId','onDelete':_0xbd21('0x10d')});db[_0xbd21('0x13f')][_0xbd21('0x110')](db[_0xbd21('0x79')],{'as':_0xbd21('0x166'),'foreignKey':_0xbd21('0x18b')});db[_0xbd21('0x13f')][_0xbd21('0x110')](db[_0xbd21('0x59')],{'as':'Interactions','foreignKey':_0xbd21('0x18b')});db[_0xbd21('0x13f')][_0xbd21('0x110')](db['OpenchannelMessage'],{'as':_0xbd21('0x15b'),'foreignKey':'OpenchannelAccountId'});db[_0xbd21('0x13f')][_0xbd21('0x110')](db[_0xbd21('0x57')],{'as':_0xbd21('0x167'),'foreignKey':'OpenchannelAccountId','onDelete':'cascade'});db[_0xbd21('0x13f')]['belongsTo'](db[_0xbd21('0x124')],{'as':_0xbd21('0x177'),'foreignKey':_0xbd21('0x178')});db[_0xbd21('0x13f')]['belongsTo'](db['Pause'],{'as':_0xbd21('0x183'),'foreignKey':_0xbd21('0x154')});db[_0xbd21('0x13f')]['belongsToMany'](db[_0xbd21('0xf')],{'as':_0xbd21('0x156'),'through':'user_has_openchannel_accounts'});db[_0xbd21('0x57')][_0xbd21('0x152')](db['User'],{'onDelete':_0xbd21('0x162')});db[_0xbd21('0x57')][_0xbd21('0x152')](db[_0xbd21('0x5d')],{'onDelete':'restrict','foreignKey':_0xbd21('0x18c')});db[_0xbd21('0x57')]['belongsTo'](db[_0xbd21('0x13f')],{'onDelete':'restrict','foreignKey':_0xbd21('0x18b')});db[_0xbd21('0x57')]['belongsTo'](db['Interval'],{'onDelete':'restrict','foreignKey':'IntervalId'});db[_0xbd21('0x57')]['belongsTo'](db[_0xbd21('0x16f')],{'onDelete':_0xbd21('0x162'),'foreignKey':_0xbd21('0x176')});db[_0xbd21('0x59')][_0xbd21('0x110')](db[_0xbd21('0x5b')],{'as':'Messages','onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x18d')});db[_0xbd21('0x59')][_0xbd21('0x152')](db[_0xbd21('0x13f')],{'as':'Account','foreignKey':_0xbd21('0x18b')});db['OpenchannelInteraction'][_0xbd21('0x152')](db[_0xbd21('0x16b')],{'as':_0xbd21('0x16c'),'foreignKey':_0xbd21('0x15f')});db[_0xbd21('0x59')]['belongsTo'](db[_0xbd21('0xf')],{'as':_0xbd21('0x16d'),'foreignKey':_0xbd21('0x111')});db['OpenchannelInteraction'][_0xbd21('0x11f')](db['Tag'],{'through':_0xbd21('0x18e'),'as':_0xbd21('0x187')});db[_0xbd21('0x59')][_0xbd21('0x11f')](db[_0xbd21('0x16f')],{'through':'openchannel_interaction_has_tags','as':'ThroughTags'});db[_0xbd21('0x59')][_0xbd21('0x11f')](db[_0xbd21('0xf')],{'as':_0xbd21('0x17f'),'through':_0xbd21('0x12e'),'foreignKey':_0xbd21('0x18d')});db[_0xbd21('0x5b')][_0xbd21('0x152')](db['User'],{'onDelete':_0xbd21('0x10d'),'as':_0xbd21('0xf')});db[_0xbd21('0x5b')][_0xbd21('0x152')](db[_0xbd21('0x16b')],{'onDelete':'cascade','as':_0xbd21('0x16c')});db[_0xbd21('0x5b')][_0xbd21('0x152')](db['OpenchannelInteraction'],{'onDelete':_0xbd21('0x10d'),'as':_0xbd21('0x173'),'foreignKey':_0xbd21('0x18d')});db[_0xbd21('0x5b')][_0xbd21('0x152')](db[_0xbd21('0xef')],{'as':_0xbd21('0xef'),'foreignKey':_0xbd21('0x180')});db[_0xbd21('0x5b')][_0xbd21('0x152')](db[_0xbd21('0x13f')],{'as':_0xbd21('0x16a'),'foreignKey':_0xbd21('0x18b')});db[_0xbd21('0x5d')]['belongsToMany'](db[_0xbd21('0xf')],{'as':_0xbd21('0x156'),'through':_0xbd21('0x18f'),'foreignKey':'OpenchannelQueueId'});db[_0xbd21('0x5d')][_0xbd21('0x11f')](db[_0xbd21('0xe7')],{'through':'team_has_openchannel_queues','as':'Teams'});db[_0xbd21('0x139')][_0xbd21('0x110')](db[_0xbd21('0x7a')],{'as':'Dispositions','foreignKey':'ChatWebsiteId','onDelete':_0xbd21('0x10d')});db['ChatWebsite']['hasMany'](db[_0xbd21('0x79')],{'as':'Answers','foreignKey':_0xbd21('0x174')});db[_0xbd21('0x139')][_0xbd21('0x110')](db['ChatProactiveAction'],{'as':_0xbd21('0x190')});db[_0xbd21('0x139')][_0xbd21('0x110')](db[_0xbd21('0x62')],{'as':_0xbd21('0x17b')});db[_0xbd21('0x139')][_0xbd21('0x110')](db['ChatApplication'],{'as':'Applications','foreignKey':'ChatWebsiteId','onDelete':'cascade'});db[_0xbd21('0x139')]['hasMany'](db['ChatMessage'],{'as':_0xbd21('0x15b')});db['ChatWebsite'][_0xbd21('0x152')](db[_0xbd21('0x124')],{'as':_0xbd21('0x177'),'foreignKey':_0xbd21('0x178')});db['ChatWebsite'][_0xbd21('0x152')](db['Interval'],{'as':_0xbd21('0x7e'),'foreignKey':'IntervalId'});db[_0xbd21('0x139')]['belongsTo'](db[_0xbd21('0x3a')],{'as':_0xbd21('0x3a'),'foreignKey':'MailAccountId'});db[_0xbd21('0x139')][_0xbd21('0x152')](db[_0xbd21('0x80')],{'as':_0xbd21('0x183'),'foreignKey':'mandatoryDispositionPauseId'});db[_0xbd21('0x139')][_0xbd21('0x11f')](db['User'],{'as':_0xbd21('0x156'),'through':_0xbd21('0x191')});db[_0xbd21('0x5f')][_0xbd21('0x152')](db[_0xbd21('0x13f')],{});db[_0xbd21('0x5f')][_0xbd21('0x152')](db[_0xbd21('0x124')],{'as':'List','foreignKey':_0xbd21('0x178')});db['OpenchannelQueueReport']['belongsTo'](db[_0xbd21('0x16b')],{'as':_0xbd21('0x16c'),'foreignKey':'ContactId'});db[_0xbd21('0x5f')][_0xbd21('0x152')](db[_0xbd21('0x59')],{});db[_0xbd21('0x5f')]['belongsTo'](db[_0xbd21('0x5b')],{});db[_0xbd21('0x5f')]['belongsTo'](db[_0xbd21('0xf')],{});db[_0xbd21('0x5f')]['belongsTo'](db[_0xbd21('0x5d')],{});db[_0xbd21('0x60')][_0xbd21('0x152')](db[_0xbd21('0xf')],{'as':_0xbd21('0x192'),'foreignKey':_0xbd21('0x111'),'onDelete':_0xbd21('0x162')});db[_0xbd21('0x60')][_0xbd21('0x152')](db[_0xbd21('0x66')],{'as':_0xbd21('0x193'),'foreignKey':_0xbd21('0x194'),'onDelete':_0xbd21('0x162')});db[_0xbd21('0x60')][_0xbd21('0x152')](db['ChatWebsite'],{'as':'Website','foreignKey':_0xbd21('0x174'),'onDelete':_0xbd21('0x162')});db['ChatApplication']['belongsTo'](db['Tag'],{'onDelete':'restrict','foreignKey':_0xbd21('0x176')});db[_0xbd21('0x62')][_0xbd21('0x110')](db[_0xbd21('0x195')],{'as':'Messages','onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x196')});db[_0xbd21('0x62')]['belongsTo'](db[_0xbd21('0x139')],{'as':_0xbd21('0x16a'),'foreignKey':_0xbd21('0x174')});db[_0xbd21('0x62')]['belongsTo'](db[_0xbd21('0x16b')],{'as':_0xbd21('0x16c'),'foreignKey':_0xbd21('0x15f')});db[_0xbd21('0x62')][_0xbd21('0x152')](db[_0xbd21('0xf')],{'as':_0xbd21('0x16d'),'foreignKey':'UserId'});db[_0xbd21('0x62')][_0xbd21('0x11f')](db[_0xbd21('0x16f')],{'through':_0xbd21('0x197'),'as':_0xbd21('0x187')});db[_0xbd21('0x62')][_0xbd21('0x11f')](db['Tag'],{'through':_0xbd21('0x197'),'as':_0xbd21('0x170')});db['ChatInteraction'][_0xbd21('0x11f')](db[_0xbd21('0xf')],{'as':_0xbd21('0x17f'),'through':_0xbd21('0x12a'),'foreignKey':_0xbd21('0x196')});db[_0xbd21('0x195')][_0xbd21('0x152')](db[_0xbd21('0xf')],{'onDelete':_0xbd21('0x10d'),'as':_0xbd21('0xf')});db[_0xbd21('0x195')]['belongsTo'](db[_0xbd21('0x16b')],{'onDelete':'cascade','as':'Contact','foreignKey':_0xbd21('0x15f')});db[_0xbd21('0x195')][_0xbd21('0x152')](db[_0xbd21('0x62')],{'onDelete':_0xbd21('0x10d'),'as':_0xbd21('0x173'),'foreignKey':_0xbd21('0x196')});db[_0xbd21('0x195')][_0xbd21('0x152')](db[_0xbd21('0xef')],{'as':_0xbd21('0xef'),'foreignKey':_0xbd21('0x180')});db[_0xbd21('0x195')]['belongsTo'](db[_0xbd21('0x139')],{'as':_0xbd21('0x16a'),'foreignKey':'ChatWebsiteId'});db[_0xbd21('0x64')][_0xbd21('0x110')](db[_0xbd21('0xef')],{'as':_0xbd21('0x172'),'foreignKey':_0xbd21('0x175'),'onDelete':'cascade','hooks':!![]});db[_0xbd21('0x64')][_0xbd21('0x152')](db[_0xbd21('0x16b')],{'onDelete':_0xbd21('0x10d'),'as':_0xbd21('0x16c'),'foreignKey':_0xbd21('0x15f')});db[_0xbd21('0x64')][_0xbd21('0x152')](db['ChatWebsite'],{'as':_0xbd21('0x16a'),'foreignKey':_0xbd21('0x174')});db['ChatQueue'][_0xbd21('0x11f')](db[_0xbd21('0xf')],{'as':'Agents','through':'UserChatQueue','hooks':!![]});db[_0xbd21('0x66')]['belongsToMany'](db['Team'],{'through':_0xbd21('0x198'),'as':'Teams'});db['ChatGroup'][_0xbd21('0x110')](db[_0xbd21('0xd1')],{'as':_0xbd21('0x15b'),'foreignKey':_0xbd21('0x199'),'onDelete':_0xbd21('0x10d')});db[_0xbd21('0x68')][_0xbd21('0x11f')](db[_0xbd21('0xf')],{'as':_0xbd21('0x14a'),'through':'chat_group_has_users'});db[_0xbd21('0x6a')][_0xbd21('0x152')](db[_0xbd21('0x139')],{'as':_0xbd21('0x19a'),'foreignKey':_0xbd21('0x174')});db[_0xbd21('0x6c')][_0xbd21('0x110')](db[_0xbd21('0x16b')],{'as':_0xbd21('0x122'),'foreignKey':_0xbd21('0x19b')});db[_0xbd21('0x16b')][_0xbd21('0x110')](db['CmContactHasItem'],{'as':_0xbd21('0x19c'),'foreignKey':'CmContactId'});db[_0xbd21('0x16b')][_0xbd21('0x110')](db[_0xbd21('0x11c')],{'as':_0xbd21('0x19d'),'foreignKey':_0xbd21('0x15f')});db[_0xbd21('0x16b')][_0xbd21('0x110')](db[_0xbd21('0x114')],{'as':_0xbd21('0x115'),'foreignKey':_0xbd21('0x15f')});db[_0xbd21('0x16b')][_0xbd21('0x110')](db[_0xbd21('0x72')],{'as':_0xbd21('0x14c'),'foreignKey':_0xbd21('0x15f')});db[_0xbd21('0x16b')][_0xbd21('0x110')](db[_0xbd21('0x74')],{'as':'ReportAgentPreview','foreignKey':_0xbd21('0x15f')});db[_0xbd21('0x16b')][_0xbd21('0x110')](db[_0xbd21('0xd6')],{'as':_0xbd21('0x14e'),'foreignKey':_0xbd21('0x15f')});db[_0xbd21('0x16b')][_0xbd21('0x110')](db[_0xbd21('0x59')],{'as':'OpenchannelInteractions','foreignKey':_0xbd21('0x15f'),'onDelete':_0xbd21('0x162')});db['CmContact'][_0xbd21('0x110')](db[_0xbd21('0x62')],{'as':_0xbd21('0x129'),'foreignKey':'ContactId','onDelete':_0xbd21('0x162')});db[_0xbd21('0x16b')][_0xbd21('0x110')](db[_0xbd21('0x54')],{'as':'SmsInteractions','foreignKey':_0xbd21('0x15f'),'onDelete':_0xbd21('0x162')});db[_0xbd21('0x16b')][_0xbd21('0x110')](db[_0xbd21('0x4a')],{'as':_0xbd21('0x117'),'foreignKey':_0xbd21('0x15f'),'onDelete':_0xbd21('0x162')});db[_0xbd21('0x16b')]['hasMany'](db[_0xbd21('0x118')],{'as':_0xbd21('0x119'),'foreignKey':'ContactId','onDelete':_0xbd21('0x162')});db[_0xbd21('0x16b')][_0xbd21('0x152')](db[_0xbd21('0x6c')],{'as':_0xbd21('0x19e'),'foreignKey':_0xbd21('0x19b')});db[_0xbd21('0x16b')][_0xbd21('0x152')](db[_0xbd21('0x124')],{'as':_0xbd21('0x177'),'foreignKey':_0xbd21('0x178'),'onDelete':_0xbd21('0x10d')});db[_0xbd21('0x16b')][_0xbd21('0x11f')](db['User'],{'as':_0xbd21('0x17f'),'through':'cm_user_has_contacts'});db[_0xbd21('0x16b')]['belongsToMany'](db[_0xbd21('0x16f')],{'as':_0xbd21('0x187'),'through':_0xbd21('0x19f')});db['CmContact']['belongsToMany'](db[_0xbd21('0x16f')],{'through':'cm_contact_has_tags','as':_0xbd21('0x170')});db[_0xbd21('0x11c')]['hasMany'](db[_0xbd21('0x8c')],{'as':'AdditionalPhones','foreignKey':'CmHopperId'});db[_0xbd21('0x11c')][_0xbd21('0x152')](db[_0xbd21('0x16b')],{'as':'Contact','foreignKey':'ContactId','onDelete':_0xbd21('0x10d')});db[_0xbd21('0x11c')][_0xbd21('0x152')](db[_0xbd21('0x124')],{'as':_0xbd21('0x177'),'foreignKey':_0xbd21('0x178'),'onDelete':_0xbd21('0x10d')});db[_0xbd21('0x11c')][_0xbd21('0x152')](db[_0xbd21('0xf')],{'as':_0xbd21('0x192'),'foreignKey':_0xbd21('0x111')});db[_0xbd21('0x11c')][_0xbd21('0x152')](db['VoiceQueue'],{'as':_0xbd21('0x193'),'foreignKey':'VoiceQueueId','onDelete':'cascade'});db[_0xbd21('0x11c')]['belongsTo'](db['Campaign'],{'as':_0xbd21('0xeb'),'foreignKey':_0xbd21('0x1a0'),'onDelete':_0xbd21('0x10d')});db[_0xbd21('0x11c')][_0xbd21('0x152')](db[_0xbd21('0xf')],{'as':_0xbd21('0x16d'),'foreignKey':_0xbd21('0x1a1')});db[_0xbd21('0x6f')][_0xbd21('0x152')](db['CmContact'],{'as':_0xbd21('0x16c'),'foreignKey':_0xbd21('0x15f'),'onDelete':_0xbd21('0x10d')});db[_0xbd21('0x6f')]['belongsTo'](db['CmList'],{'as':_0xbd21('0x177'),'foreignKey':_0xbd21('0x178'),'onDelete':_0xbd21('0x10d')});db[_0xbd21('0x6f')][_0xbd21('0x152')](db[_0xbd21('0x18')],{'as':_0xbd21('0x193'),'foreignKey':'VoiceQueueId','onDelete':'cascade'});db[_0xbd21('0x6f')][_0xbd21('0x152')](db[_0xbd21('0xeb')],{'as':_0xbd21('0xeb'),'foreignKey':_0xbd21('0x1a0'),'onDelete':_0xbd21('0x10d')});db[_0xbd21('0x77')][_0xbd21('0x110')](db[_0xbd21('0x7c')],{'as':{'plural':_0xbd21('0x1a2'),'singular':'OneAll'},'foreignKey':'AutomationAllId','onDelete':'cascade','hooks':!![]});db[_0xbd21('0x77')][_0xbd21('0x110')](db[_0xbd21('0x7c')],{'as':{'plural':_0xbd21('0x1a3'),'singular':'OneAny'},'foreignKey':_0xbd21('0x1a4'),'onDelete':_0xbd21('0x10d'),'hooks':!![]});db[_0xbd21('0x77')]['hasMany'](db['Action'],{'as':_0xbd21('0x1a5'),'foreignKey':_0xbd21('0x1a6'),'onDelete':_0xbd21('0x10d'),'hooks':!![]});db[_0xbd21('0x7a')][_0xbd21('0x110')](db[_0xbd21('0x7a')],{'as':_0xbd21('0x165'),'foreignKey':_0xbd21('0x1a7'),'onDelete':'cascade'});db[_0xbd21('0x7e')][_0xbd21('0x110')](db[_0xbd21('0x7e')],{'as':_0xbd21('0x1a8'),'foreignKey':_0xbd21('0x153'),'onDelete':_0xbd21('0x10d'),'hooks':!![],'required':![]});db[_0xbd21('0x7e')][_0xbd21('0x110')](db[_0xbd21('0x15')],{'as':_0xbd21('0x113'),'foreignKey':'IntervalId','onDelete':_0xbd21('0x162')});db['Interval']['hasMany'](db[_0xbd21('0x3f')],{'as':'MailApplications','foreignKey':_0xbd21('0x153')});db['Interval'][_0xbd21('0x110')](db[_0xbd21('0x60')],{'as':_0xbd21('0x1a9'),'foreignKey':'IntervalId'});db[_0xbd21('0x7e')][_0xbd21('0x110')](db['FaxApplication'],{'as':_0xbd21('0x1aa'),'foreignKey':_0xbd21('0x153')});db[_0xbd21('0x7e')][_0xbd21('0x110')](db[_0xbd21('0x52')],{'as':_0xbd21('0x1ab'),'foreignKey':'IntervalId'});db[_0xbd21('0x85')][_0xbd21('0x152')](db[_0xbd21('0x3a')],{});db[_0xbd21('0x85')]['belongsTo'](db[_0xbd21('0x97')],{'foreignKey':_0xbd21('0x1ac')});db[_0xbd21('0x85')][_0xbd21('0x152')](db['AnalyticCustomReport'],{'foreignKey':_0xbd21('0x1ad')});db[_0xbd21('0x87')]['belongsToMany'](db[_0xbd21('0x148')],{'as':'Mohs','through':_0xbd21('0x149'),'onDelete':_0xbd21('0x162')});db['Tag'][_0xbd21('0x11f')](db[_0xbd21('0x16b')],{'through':_0xbd21('0x19f')});db[_0xbd21('0x16f')][_0xbd21('0x11f')](db[_0xbd21('0x62')],{'through':_0xbd21('0x197')});db[_0xbd21('0x16f')][_0xbd21('0x11f')](db[_0xbd21('0x118')],{'through':_0xbd21('0x16e')});db[_0xbd21('0x16f')]['belongsToMany'](db['SmsInteraction'],{'through':_0xbd21('0x188')});db['Tag'][_0xbd21('0x11f')](db[_0xbd21('0x4a')],{'through':'fax_interaction_has_tags'});db[_0xbd21('0x16f')][_0xbd21('0x11f')](db[_0xbd21('0x59')],{'through':_0xbd21('0x18e')});db[_0xbd21('0x16f')][_0xbd21('0x11f')](db['WhatsappInteraction'],{'through':'whatsapp_interaction_has_tags'});db[_0xbd21('0x1ae')][_0xbd21('0x152')](db[_0xbd21('0x89')],{'as':_0xbd21('0x1af'),'foreignKey':_0xbd21('0x1b0')});db[_0xbd21('0x8c')][_0xbd21('0x152')](db[_0xbd21('0x11c')],{'as':_0xbd21('0x1b1'),'foreignKey':_0xbd21('0x1b2')});db['CmContactHasItem'][_0xbd21('0x152')](db[_0xbd21('0x16b')],{'as':_0xbd21('0x16c'),'foreignKey':_0xbd21('0x1b3')});db[_0xbd21('0x8f')][_0xbd21('0x110')](db[_0xbd21('0x7c')],{'as':{'plural':'AllConditions','singular':_0xbd21('0x1b4')},'foreignKey':'TriggerAllId','onDelete':_0xbd21('0x10d'),'hooks':!![]});db['Trigger'][_0xbd21('0x110')](db[_0xbd21('0x7c')],{'as':{'plural':_0xbd21('0x1b5'),'singular':_0xbd21('0x1b6')},'foreignKey':'TriggerAnyId','onDelete':_0xbd21('0x10d'),'hooks':!![]});db['Trigger'][_0xbd21('0x110')](db[_0xbd21('0x1b7')],{'as':_0xbd21('0x1a5'),'foreignKey':'TriggerId','onDelete':_0xbd21('0x10d'),'hooks':!![]});db[_0xbd21('0x1b8')][_0xbd21('0x110')](db['AnalyticFieldReport'],{'as':_0xbd21('0x1b9'),'onDelete':_0xbd21('0x10d'),'foreignKey':'CustomReportId','hooks':!![]});db[_0xbd21('0x97')]['hasMany'](db['AnalyticFieldReport'],{'as':_0xbd21('0x1b9'),'onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1ac')});db[_0xbd21('0x99')]['hasMany'](db['AnalyticFieldReport'],{'as':_0xbd21('0x1b9'),'onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1ba')});db['AnalyticFieldReport'][_0xbd21('0x152')](db[_0xbd21('0x99')],{'foreignKey':_0xbd21('0x1ba')});db[_0xbd21('0x9e')][_0xbd21('0x110')](db[_0xbd21('0x1bb')],{'as':_0xbd21('0x1bc'),'onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1bd')});db[_0xbd21('0x1bb')][_0xbd21('0x110')](db['SalesforceField'],{'as':_0xbd21('0x1be'),'onDelete':'cascade','foreignKey':_0xbd21('0x1bf')});db[_0xbd21('0x1bb')]['hasMany'](db[_0xbd21('0xa1')],{'as':_0xbd21('0x1c0'),'onDelete':'cascade','foreignKey':_0xbd21('0x1c1')});db[_0xbd21('0x1bb')][_0xbd21('0x110')](db[_0xbd21('0xa1')],{'as':_0xbd21('0x1b9'),'onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1c2')});db[_0xbd21('0x1bb')][_0xbd21('0x152')](db['SalesforceAccount'],{'as':_0xbd21('0x16a'),'foreignKey':_0xbd21('0x1bd')});db[_0xbd21('0xa1')][_0xbd21('0x110')](db[_0xbd21('0xa1')],{'as':_0xbd21('0x1c3'),'foreignKey':'SubjectId'});db[_0xbd21('0xa1')][_0xbd21('0x110')](db[_0xbd21('0xa1')],{'as':'Description','foreignKey':_0xbd21('0x1c1')});db[_0xbd21('0xa1')][_0xbd21('0x110')](db[_0xbd21('0xa1')],{'as':'Field','foreignKey':'FieldId'});db[_0xbd21('0xa1')][_0xbd21('0x152')](db[_0xbd21('0x91')],{'as':_0xbd21('0x91'),'foreignKey':'VariableId'});db[_0xbd21('0xa3')][_0xbd21('0x110')](db[_0xbd21('0xa5')],{'as':_0xbd21('0x1bc'),'onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1bd')});db[_0xbd21('0xa5')][_0xbd21('0x110')](db[_0xbd21('0xa7')],{'as':'Subjects','onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1bf')});db[_0xbd21('0xa5')]['hasMany'](db['SugarcrmField'],{'as':_0xbd21('0x1c0'),'onDelete':'cascade','foreignKey':_0xbd21('0x1c1')});db[_0xbd21('0xa5')][_0xbd21('0x110')](db[_0xbd21('0xa7')],{'as':_0xbd21('0x1b9'),'onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1c2')});db['SugarcrmConfiguration'][_0xbd21('0x152')](db[_0xbd21('0xa3')],{'as':_0xbd21('0x16a'),'foreignKey':'AccountId'});db['SugarcrmField'][_0xbd21('0x110')](db[_0xbd21('0xa7')],{'as':_0xbd21('0x1c3'),'foreignKey':_0xbd21('0x1bf')});db[_0xbd21('0xa7')][_0xbd21('0x110')](db[_0xbd21('0xa7')],{'as':'Description','foreignKey':_0xbd21('0x1c1')});db['SugarcrmField'][_0xbd21('0x110')](db['SugarcrmField'],{'as':_0xbd21('0x1c4'),'foreignKey':'FieldId'});db[_0xbd21('0xa7')][_0xbd21('0x152')](db[_0xbd21('0x91')],{'as':_0xbd21('0x91'),'foreignKey':_0xbd21('0x1c5')});db['DeskAccount']['hasMany'](db[_0xbd21('0xaa')],{'as':_0xbd21('0x1bc'),'onDelete':'cascade','foreignKey':'AccountId'});db[_0xbd21('0xaa')][_0xbd21('0x110')](db[_0xbd21('0xab')],{'as':_0xbd21('0x1be'),'onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1bf')});db[_0xbd21('0xaa')]['hasMany'](db[_0xbd21('0xab')],{'as':_0xbd21('0x1c0'),'onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1c1')});db[_0xbd21('0xaa')][_0xbd21('0x110')](db[_0xbd21('0xab')],{'as':_0xbd21('0x1b9'),'onDelete':_0xbd21('0x10d'),'foreignKey':'FieldId'});db[_0xbd21('0xaa')][_0xbd21('0x152')](db[_0xbd21('0xa8')],{'as':_0xbd21('0x16a'),'foreignKey':_0xbd21('0x1bd')});db['DeskConfiguration'][_0xbd21('0x11f')](db['Tag'],{'through':_0xbd21('0x1c6')});db['DeskField'][_0xbd21('0x110')](db[_0xbd21('0xab')],{'as':_0xbd21('0x1c3'),'foreignKey':_0xbd21('0x1bf')});db['DeskField'][_0xbd21('0x110')](db[_0xbd21('0xab')],{'as':_0xbd21('0x1c7'),'foreignKey':_0xbd21('0x1c1')});db[_0xbd21('0xab')][_0xbd21('0x110')](db['DeskField'],{'as':_0xbd21('0x1c4'),'foreignKey':_0xbd21('0x1c2')});db[_0xbd21('0xab')][_0xbd21('0x152')](db[_0xbd21('0x91')],{'as':'Variable','foreignKey':_0xbd21('0x1c5')});db['ZohoAccount'][_0xbd21('0x110')](db[_0xbd21('0xaf')],{'as':_0xbd21('0x1bc'),'onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1bd')});db[_0xbd21('0xaf')][_0xbd21('0x110')](db[_0xbd21('0xb1')],{'as':_0xbd21('0x1be'),'onDelete':'cascade','foreignKey':'SubjectId'});db[_0xbd21('0xaf')][_0xbd21('0x110')](db[_0xbd21('0xb1')],{'as':_0xbd21('0x1c0'),'onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1c1')});db['ZohoConfiguration'][_0xbd21('0x110')](db['ZohoField'],{'as':'Fields','onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1c2')});db['ZohoConfiguration'][_0xbd21('0x152')](db[_0xbd21('0xad')],{'as':_0xbd21('0x16a'),'foreignKey':_0xbd21('0x1bd')});db[_0xbd21('0xb1')]['hasMany'](db[_0xbd21('0xb1')],{'as':_0xbd21('0x1c3'),'foreignKey':'SubjectId'});db[_0xbd21('0xb1')][_0xbd21('0x110')](db[_0xbd21('0xb1')],{'as':_0xbd21('0x1c7'),'foreignKey':_0xbd21('0x1c1')});db[_0xbd21('0xb1')][_0xbd21('0x110')](db['ZohoField'],{'as':'Field','foreignKey':'FieldId'});db[_0xbd21('0xb1')][_0xbd21('0x152')](db[_0xbd21('0x91')],{'as':_0xbd21('0x91'),'foreignKey':'VariableId'});db[_0xbd21('0xb3')][_0xbd21('0x110')](db[_0xbd21('0xb5')],{'as':_0xbd21('0x1bc'),'onDelete':'cascade','foreignKey':_0xbd21('0x1bd')});db[_0xbd21('0xb5')][_0xbd21('0x110')](db[_0xbd21('0xb7')],{'as':_0xbd21('0x1be'),'foreignKey':'SubjectId'});db[_0xbd21('0xb5')][_0xbd21('0x110')](db[_0xbd21('0xb7')],{'as':_0xbd21('0x1c0'),'foreignKey':_0xbd21('0x1c1')});db['ZendeskConfiguration']['hasMany'](db[_0xbd21('0xb7')],{'as':'Fields','foreignKey':'FieldId'});db[_0xbd21('0xb5')]['belongsTo'](db[_0xbd21('0xb3')],{'as':_0xbd21('0x16a'),'foreignKey':_0xbd21('0x1bd')});db[_0xbd21('0xb5')]['belongsToMany'](db[_0xbd21('0x16f')],{'through':'int_zendesk_configuration_has_tags'});db[_0xbd21('0xb7')]['hasMany'](db[_0xbd21('0xb7')],{'as':_0xbd21('0x1c3'),'foreignKey':_0xbd21('0x1bf')});db[_0xbd21('0xb7')][_0xbd21('0x110')](db[_0xbd21('0xb7')],{'as':_0xbd21('0x1c7'),'foreignKey':_0xbd21('0x1c1')});db[_0xbd21('0xb7')]['hasMany'](db[_0xbd21('0xb7')],{'as':_0xbd21('0x1c4'),'foreignKey':_0xbd21('0x1c2')});db[_0xbd21('0xb7')][_0xbd21('0x152')](db[_0xbd21('0x91')],{'as':_0xbd21('0x91'),'foreignKey':_0xbd21('0x1c5')});db[_0xbd21('0xb9')][_0xbd21('0x110')](db[_0xbd21('0xbb')],{'as':_0xbd21('0x1bc'),'onDelete':'cascade','foreignKey':'AccountId'});db[_0xbd21('0xbb')][_0xbd21('0x110')](db[_0xbd21('0xbd')],{'as':_0xbd21('0x1be'),'onDelete':_0xbd21('0x10d'),'foreignKey':'SubjectId'});db[_0xbd21('0xbb')]['hasMany'](db[_0xbd21('0xbd')],{'as':_0xbd21('0x1c0'),'onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1c1')});db[_0xbd21('0xbb')][_0xbd21('0x110')](db['FreshdeskField'],{'as':_0xbd21('0x1b9'),'onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1c2')});db[_0xbd21('0xbb')][_0xbd21('0x152')](db[_0xbd21('0xb9')],{'as':_0xbd21('0x16a'),'foreignKey':_0xbd21('0x1bd')});db[_0xbd21('0xbb')][_0xbd21('0x11f')](db[_0xbd21('0x16f')],{'through':'int_freshdesk_configuration_has_tags'});db[_0xbd21('0xbd')][_0xbd21('0x110')](db[_0xbd21('0xbd')],{'as':_0xbd21('0x1c3'),'foreignKey':'SubjectId'});db[_0xbd21('0xbd')][_0xbd21('0x110')](db[_0xbd21('0xbd')],{'as':'Description','foreignKey':_0xbd21('0x1c1')});db[_0xbd21('0xbd')][_0xbd21('0x110')](db['FreshdeskField'],{'as':_0xbd21('0x1c4'),'foreignKey':_0xbd21('0x1c2')});db[_0xbd21('0xbd')][_0xbd21('0x152')](db[_0xbd21('0x91')],{'as':_0xbd21('0x91'),'foreignKey':'VariableId'});db[_0xbd21('0xbf')]['hasMany'](db[_0xbd21('0x1c8')],{'as':_0xbd21('0x1bc'),'onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1bd')});db['VtigerConfiguration'][_0xbd21('0x110')](db['VtigerField'],{'as':_0xbd21('0x1be'),'foreignKey':'SubjectId'});db[_0xbd21('0x1c8')][_0xbd21('0x110')](db[_0xbd21('0x1c9')],{'as':'Descriptions','foreignKey':_0xbd21('0x1c1')});db[_0xbd21('0x1c8')]['hasMany'](db['VtigerField'],{'as':'Fields','foreignKey':_0xbd21('0x1c2')});db[_0xbd21('0x1c8')]['belongsTo'](db[_0xbd21('0xbf')],{'as':'Account','foreignKey':'AccountId'});db[_0xbd21('0x1c9')][_0xbd21('0x110')](db[_0xbd21('0x1c9')],{'as':_0xbd21('0x1c3'),'foreignKey':_0xbd21('0x1bf')});db[_0xbd21('0x1c9')][_0xbd21('0x110')](db[_0xbd21('0x1c9')],{'as':_0xbd21('0x1c7'),'foreignKey':'DescriptionId'});db[_0xbd21('0x1c9')]['hasMany'](db[_0xbd21('0x1c9')],{'as':_0xbd21('0x1c4'),'foreignKey':_0xbd21('0x1c2')});db['VtigerField'][_0xbd21('0x152')](db[_0xbd21('0x91')],{'as':_0xbd21('0x91'),'foreignKey':_0xbd21('0x1c5')});db[_0xbd21('0xc2')][_0xbd21('0x110')](db['ServicenowConfiguration'],{'as':_0xbd21('0x1bc'),'onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1bd')});db[_0xbd21('0x1ca')]['hasMany'](db[_0xbd21('0xc3')],{'as':_0xbd21('0x1be'),'foreignKey':_0xbd21('0x1bf')});db[_0xbd21('0x1ca')][_0xbd21('0x110')](db[_0xbd21('0xc3')],{'as':_0xbd21('0x1c0'),'foreignKey':_0xbd21('0x1c1')});db[_0xbd21('0x1ca')]['hasMany'](db['ServicenowField'],{'as':_0xbd21('0x1b9'),'foreignKey':_0xbd21('0x1c2')});db[_0xbd21('0x1ca')]['belongsTo'](db[_0xbd21('0xc2')],{'as':_0xbd21('0x16a'),'foreignKey':_0xbd21('0x1bd')});db[_0xbd21('0xc3')][_0xbd21('0x110')](db['ServicenowField'],{'as':_0xbd21('0x1c3'),'foreignKey':_0xbd21('0x1bf')});db[_0xbd21('0xc3')][_0xbd21('0x110')](db[_0xbd21('0xc3')],{'as':_0xbd21('0x1c7'),'foreignKey':_0xbd21('0x1c1')});db['ServicenowField'][_0xbd21('0x110')](db['ServicenowField'],{'as':_0xbd21('0x1c4'),'foreignKey':_0xbd21('0x1c2')});db[_0xbd21('0xc3')]['belongsTo'](db[_0xbd21('0x91')],{'as':'Variable','foreignKey':'VariableId'});db[_0xbd21('0xc4')][_0xbd21('0x110')](db[_0xbd21('0xc6')],{'as':_0xbd21('0x1bc'),'onDelete':_0xbd21('0x10d'),'foreignKey':'AccountId'});db['Dynamics365Account'][_0xbd21('0x152')](db[_0xbd21('0x104')],{'as':_0xbd21('0x104'),'foreignKey':_0xbd21('0x161')});db['Dynamics365Configuration'][_0xbd21('0x110')](db[_0xbd21('0xc8')],{'as':'Subjects','onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1bf')});db['Dynamics365Configuration'][_0xbd21('0x110')](db['Dynamics365Field'],{'as':_0xbd21('0x1c0'),'onDelete':'cascade','foreignKey':_0xbd21('0x1c1')});db[_0xbd21('0xc6')]['hasMany'](db[_0xbd21('0xc8')],{'as':_0xbd21('0x1b9'),'onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1c2')});db[_0xbd21('0xc6')]['belongsTo'](db[_0xbd21('0xc4')],{'as':'Account','foreignKey':_0xbd21('0x1bd')});db[_0xbd21('0xc8')]['hasMany'](db[_0xbd21('0xc8')],{'as':_0xbd21('0x1c3'),'foreignKey':'SubjectId'});db[_0xbd21('0xc8')][_0xbd21('0x110')](db['Dynamics365Field'],{'as':_0xbd21('0x1c7'),'foreignKey':_0xbd21('0x1c1')});db[_0xbd21('0xc8')][_0xbd21('0x110')](db[_0xbd21('0xc8')],{'as':_0xbd21('0x1c4'),'foreignKey':_0xbd21('0x1c2')});db['Dynamics365Field'][_0xbd21('0x152')](db[_0xbd21('0x91')],{'as':_0xbd21('0x91'),'foreignKey':_0xbd21('0x1c5')});db[_0xbd21('0xca')][_0xbd21('0x110')](db[_0xbd21('0x1cb')],{'as':_0xbd21('0x1bc'),'onDelete':_0xbd21('0x10d'),'foreignKey':'AccountId'});db[_0xbd21('0x1cb')]['hasMany'](db[_0xbd21('0xcd')],{'as':_0xbd21('0x1be'),'foreignKey':_0xbd21('0x1bf')});db['FreshsalesConfiguration']['hasMany'](db[_0xbd21('0xcd')],{'as':'Descriptions','foreignKey':_0xbd21('0x1c1')});db[_0xbd21('0x1cb')][_0xbd21('0x110')](db[_0xbd21('0xcd')],{'as':_0xbd21('0x1b9'),'foreignKey':_0xbd21('0x1c2')});db[_0xbd21('0x1cb')][_0xbd21('0x152')](db[_0xbd21('0xca')],{'as':_0xbd21('0x16a'),'foreignKey':'AccountId'});db[_0xbd21('0xcd')][_0xbd21('0x110')](db[_0xbd21('0xcd')],{'as':'Subject','foreignKey':_0xbd21('0x1bf')});db['FreshsalesField']['hasMany'](db[_0xbd21('0xcd')],{'as':_0xbd21('0x1c7'),'foreignKey':_0xbd21('0x1c1')});db[_0xbd21('0xcd')][_0xbd21('0x110')](db[_0xbd21('0xcd')],{'as':_0xbd21('0x1c4'),'foreignKey':_0xbd21('0x1c2')});db['FreshsalesField']['belongsTo'](db[_0xbd21('0x91')],{'as':_0xbd21('0x91'),'foreignKey':_0xbd21('0x1c5')});db[_0xbd21('0x1cc')][_0xbd21('0x152')](db['ChatWebsite'],{});db[_0xbd21('0x1cc')][_0xbd21('0x152')](db[_0xbd21('0x124')],{'as':_0xbd21('0x177'),'foreignKey':_0xbd21('0x178')});db['ChatQueueReport']['belongsTo'](db['CmContact'],{'as':'Contact','foreignKey':_0xbd21('0x15f')});db['ChatQueueReport'][_0xbd21('0x152')](db[_0xbd21('0x62')],{});db[_0xbd21('0x1cc')][_0xbd21('0x152')](db[_0xbd21('0x195')],{});db['ChatQueueReport']['belongsTo'](db[_0xbd21('0xf')],{});db[_0xbd21('0x1cc')][_0xbd21('0x152')](db[_0xbd21('0x66')],{});db['ChatInternalMessage'][_0xbd21('0x152')](db[_0xbd21('0xf')],{'onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1cd')});db['ChatInternalMessage'][_0xbd21('0x152')](db[_0xbd21('0xf')],{'onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x1ce')});db[_0xbd21('0xd6')][_0xbd21('0x110')](db[_0xbd21('0xd4')],{'foreignKey':'SessionId','onDelete':_0xbd21('0x10d')});db[_0xbd21('0xd6')]['hasMany'](db[_0xbd21('0x1cf')],{'foreignKey':_0xbd21('0x1d0'),'onDelete':_0xbd21('0x10d')});db['SmsQueueReport'][_0xbd21('0x152')](db[_0xbd21('0x141')],{});db['SmsQueueReport']['belongsTo'](db[_0xbd21('0x124')],{'as':_0xbd21('0x177'),'foreignKey':'ListId'});db['SmsQueueReport'][_0xbd21('0x152')](db[_0xbd21('0x16b')],{'as':'Contact','foreignKey':_0xbd21('0x15f')});db[_0xbd21('0xd8')][_0xbd21('0x152')](db[_0xbd21('0x54')],{});db[_0xbd21('0xd8')][_0xbd21('0x152')](db[_0xbd21('0x185')],{});db[_0xbd21('0xd8')][_0xbd21('0x152')](db[_0xbd21('0xf')],{});db['SmsQueueReport'][_0xbd21('0x152')](db['SmsQueue'],{});db[_0xbd21('0xdb')][_0xbd21('0x110')](db[_0xbd21('0xd6')],{'foreignKey':_0xbd21('0x1d1')});db[_0xbd21('0xdb')][_0xbd21('0x110')](db[_0xbd21('0xd4')],{'foreignKey':'ProjectId'});db[_0xbd21('0xdb')][_0xbd21('0x110')](db[_0xbd21('0x1cf')],{'foreignKey':_0xbd21('0x1d1')});db[_0xbd21('0xe7')][_0xbd21('0x11f')](db[_0xbd21('0xf')],{'as':_0xbd21('0x156'),'through':_0xbd21('0x127')});db[_0xbd21('0xe7')][_0xbd21('0x11f')](db[_0xbd21('0x18')],{'through':_0xbd21('0x158'),'as':_0xbd21('0x130')});db[_0xbd21('0xe7')][_0xbd21('0x11f')](db[_0xbd21('0x132')],{'through':'team_has_mail_queues','as':'MailQueues'});db[_0xbd21('0xe7')][_0xbd21('0x11f')](db[_0xbd21('0x66')],{'through':_0xbd21('0x198'),'as':_0xbd21('0x133')});db[_0xbd21('0xe7')][_0xbd21('0x11f')](db[_0xbd21('0x4e')],{'through':'team_has_fax_queues','as':_0xbd21('0x134')});db[_0xbd21('0xe7')][_0xbd21('0x11f')](db[_0xbd21('0x184')],{'through':_0xbd21('0x18a'),'as':_0xbd21('0x135')});db[_0xbd21('0xe7')][_0xbd21('0x11f')](db[_0xbd21('0x5d')],{'through':_0xbd21('0x1d2'),'as':'OpenchannelQueues'});db[_0xbd21('0xe7')][_0xbd21('0x11f')](db['WhatsappQueue'],{'through':_0xbd21('0x1d3'),'as':_0xbd21('0x138')});db[_0xbd21('0xe7')][_0xbd21('0x11f')](db['VoicePrefix'],{'through':'TeamVoicePrefix','as':_0xbd21('0x131')});db[_0xbd21('0xeb')][_0xbd21('0x110')](db['CmHopper'],{'as':_0xbd21('0x19d'),'foreignKey':_0xbd21('0x1a0')});db[_0xbd21('0xeb')][_0xbd21('0x110')](db[_0xbd21('0x114')],{'as':_0xbd21('0x115'),'foreignKey':_0xbd21('0x1a0')});db[_0xbd21('0xeb')][_0xbd21('0x110')](db['CmHopperHistory'],{'as':'HopperHistories','foreignKey':'CampaignId'});db[_0xbd21('0xeb')][_0xbd21('0x110')](db[_0xbd21('0x6f')],{'as':_0xbd21('0x14d'),'foreignKey':_0xbd21('0x1a0')});db[_0xbd21('0xeb')]['belongsTo'](db['Trunk'],{'as':'Trunk','foreignKey':_0xbd21('0x14f')});db[_0xbd21('0xeb')]['belongsTo'](db[_0xbd21('0x28')],{'as':_0xbd21('0x150'),'foreignKey':_0xbd21('0x151')});db[_0xbd21('0xeb')][_0xbd21('0x152')](db['Interval'],{'as':_0xbd21('0x7e'),'foreignKey':_0xbd21('0x153')});db[_0xbd21('0xeb')][_0xbd21('0x152')](db[_0xbd21('0xe1')],{'as':_0xbd21('0xe1'),'foreignKey':_0xbd21('0x1d4')});db['Campaign']['belongsToMany'](db['CmList'],{'as':_0xbd21('0x125'),'through':_0xbd21('0x1d5')});db[_0xbd21('0xeb')][_0xbd21('0x11f')](db['CmList'],{'as':_0xbd21('0x1d6'),'through':_0xbd21('0x1d7')});db['Attachment'][_0xbd21('0x152')](db[_0xbd21('0x64')],{'as':_0xbd21('0x64'),'foreignKey':_0xbd21('0x175')});db[_0xbd21('0x1d8')][_0xbd21('0x152')](db['MailMessage'],{});db[_0xbd21('0x1d8')][_0xbd21('0x152')](db[_0xbd21('0x118')],{});db[_0xbd21('0x1d8')][_0xbd21('0x152')](db[_0xbd21('0x3a')],{'foreignKey':_0xbd21('0x1d9'),'as':_0xbd21('0x1da')});db['MailTransferReport'][_0xbd21('0x152')](db[_0xbd21('0xf')],{'foreignKey':_0xbd21('0x1db'),'as':'FromAgent'});db[_0xbd21('0x1d8')][_0xbd21('0x152')](db[_0xbd21('0xf')],{'foreignKey':_0xbd21('0x1dc'),'as':_0xbd21('0x1dd')});db[_0xbd21('0x1d8')][_0xbd21('0x152')](db[_0xbd21('0x132')],{'foreignKey':'ToMailQueueId','as':_0xbd21('0x1de')});db['MailTransferReport'][_0xbd21('0x152')](db[_0xbd21('0x3a')],{'foreignKey':'ToMailAccountId','as':_0xbd21('0x1df')});db[_0xbd21('0xf3')][_0xbd21('0x152')](db['ChatMessage'],{});db[_0xbd21('0xf3')]['belongsTo'](db[_0xbd21('0x62')],{});db[_0xbd21('0xf3')][_0xbd21('0x152')](db['ChatWebsite'],{'foreignKey':_0xbd21('0x1e0'),'as':'FromAccount'});db[_0xbd21('0xf3')]['belongsTo'](db['User'],{'foreignKey':_0xbd21('0x1db'),'as':_0xbd21('0x1e1')});db['ChatTransferReport'][_0xbd21('0x152')](db[_0xbd21('0xf')],{'foreignKey':'ToUserId','as':'ToAgent'});db['ChatTransferReport'][_0xbd21('0x152')](db[_0xbd21('0x66')],{'foreignKey':_0xbd21('0x1e2'),'as':_0xbd21('0x1de')});db['ChatTransferReport']['belongsTo'](db['ChatWebsite'],{'foreignKey':_0xbd21('0x1e3'),'as':_0xbd21('0x1df')});db[_0xbd21('0xf4')]['belongsTo'](db[_0xbd21('0x4c')],{});db['FaxTransferReport'][_0xbd21('0x152')](db['FaxInteraction'],{});db[_0xbd21('0xf4')][_0xbd21('0x152')](db[_0xbd21('0x46')],{'foreignKey':'FromFaxAccountId','as':_0xbd21('0x1da')});db[_0xbd21('0xf4')][_0xbd21('0x152')](db[_0xbd21('0xf')],{'foreignKey':'FromUserId','as':'FromAgent'});db[_0xbd21('0xf4')][_0xbd21('0x152')](db[_0xbd21('0xf')],{'foreignKey':_0xbd21('0x1dc'),'as':_0xbd21('0x1dd')});db[_0xbd21('0xf4')][_0xbd21('0x152')](db[_0xbd21('0x4e')],{'foreignKey':_0xbd21('0x1e4'),'as':_0xbd21('0x1de')});db['FaxTransferReport'][_0xbd21('0x152')](db[_0xbd21('0x46')],{'foreignKey':'ToFaxAccountId','as':'ToAccount'});db['OpenchannelTransferReport']['belongsTo'](db[_0xbd21('0x5b')],{});db[_0xbd21('0x1e5')]['belongsTo'](db[_0xbd21('0x59')],{});db[_0xbd21('0x1e5')][_0xbd21('0x152')](db[_0xbd21('0x13f')],{'foreignKey':_0xbd21('0x1e6'),'as':'FromAccount'});db['OpenchannelTransferReport'][_0xbd21('0x152')](db[_0xbd21('0xf')],{'foreignKey':_0xbd21('0x1db'),'as':'FromAgent'});db[_0xbd21('0x1e5')][_0xbd21('0x152')](db[_0xbd21('0xf')],{'foreignKey':_0xbd21('0x1dc'),'as':'ToAgent'});db[_0xbd21('0x1e5')][_0xbd21('0x152')](db[_0xbd21('0x5d')],{'foreignKey':'ToOpenchannelQueueId','as':_0xbd21('0x1de')});db['OpenchannelTransferReport'][_0xbd21('0x152')](db['OpenchannelAccount'],{'foreignKey':_0xbd21('0x1e7'),'as':_0xbd21('0x1df')});db[_0xbd21('0x1e8')][_0xbd21('0x152')](db[_0xbd21('0x185')],{});db[_0xbd21('0x1e8')][_0xbd21('0x152')](db[_0xbd21('0x54')],{});db[_0xbd21('0x1e8')][_0xbd21('0x152')](db[_0xbd21('0x141')],{'foreignKey':_0xbd21('0x1e9'),'as':'FromAccount'});db[_0xbd21('0x1e8')]['belongsTo'](db['User'],{'foreignKey':_0xbd21('0x1db'),'as':'FromAgent'});db[_0xbd21('0x1e8')][_0xbd21('0x152')](db[_0xbd21('0xf')],{'foreignKey':_0xbd21('0x1dc'),'as':_0xbd21('0x1dd')});db[_0xbd21('0x1e8')]['belongsTo'](db['SmsQueue'],{'foreignKey':'ToSmsQueueId','as':_0xbd21('0x1de')});db[_0xbd21('0x1e8')][_0xbd21('0x152')](db[_0xbd21('0x141')],{'foreignKey':'ToSmsAccountId','as':_0xbd21('0x1df')});db['CmList']['hasMany'](db['Disposition'],{'as':_0xbd21('0x165'),'foreignKey':'ListId','onDelete':_0xbd21('0x10d')});db['CmList'][_0xbd21('0x110')](db[_0xbd21('0x76')],{'as':'CustomFields','foreignKey':_0xbd21('0x178')});db[_0xbd21('0x124')]['hasMany'](db['CmContact'],{'as':'Contacts','onDelete':_0xbd21('0x10d'),'foreignKey':_0xbd21('0x178')});db[_0xbd21('0x124')]['hasMany'](db['CmHopperFinal'],{'as':_0xbd21('0x115'),'foreignKey':_0xbd21('0x178')});db['CmList']['hasMany'](db[_0xbd21('0x72')],{'as':_0xbd21('0x1ea'),'foreignKey':_0xbd21('0x178')});db[_0xbd21('0x124')][_0xbd21('0x110')](db[_0xbd21('0x74')],{'as':_0xbd21('0x74'),'foreignKey':'ListId'});db['CmList'][_0xbd21('0x11f')](db[_0xbd21('0x18')],{'as':_0xbd21('0x1eb'),'through':_0xbd21('0x155')});db[_0xbd21('0x124')]['belongsToMany'](db[_0xbd21('0xf')],{'as':_0xbd21('0x156'),'through':_0xbd21('0x126')});db[_0xbd21('0x1ec')][_0xbd21('0x110')](db[_0xbd21('0x15')],{'as':'Extensions','onDelete':_0xbd21('0x10d')});db[_0xbd21('0x1ec')][_0xbd21('0x11f')](db[_0xbd21('0xf')],{'as':'Agents','through':_0xbd21('0x108')});db[_0xbd21('0x1ec')][_0xbd21('0x11f')](db[_0xbd21('0xe7')],{'through':_0xbd21('0x106'),'as':_0xbd21('0x157')});db['UserProfile'][_0xbd21('0x110')](db[_0xbd21('0xf')],{'as':'Users','foreignKey':_0xbd21('0x11e')});db[_0xbd21('0xf8')][_0xbd21('0x110')](db['UserProfileSection'],{'as':'UserProfileSections','foreignKey':'userProfileId','onDelete':_0xbd21('0x10d')});db[_0xbd21('0xf9')][_0xbd21('0x110')](db['UserProfileResource'],{'as':_0xbd21('0x1ed'),'foreignKey':_0xbd21('0x1ee'),'onDelete':_0xbd21('0x10d')});db['WhatsappAccount']['hasMany'](db['Disposition'],{'as':_0xbd21('0x165'),'foreignKey':_0xbd21('0x1ef'),'onDelete':_0xbd21('0x10d')});db[_0xbd21('0x144')]['hasMany'](db[_0xbd21('0x79')],{'as':'Answers','foreignKey':'WhatsappAccountId'});db[_0xbd21('0x144')][_0xbd21('0x110')](db[_0xbd21('0xff')],{'as':_0xbd21('0x15b'),'foreignKey':_0xbd21('0x1ef')});db[_0xbd21('0x144')][_0xbd21('0x110')](db[_0xbd21('0x11a')],{'as':_0xbd21('0x17b')});db[_0xbd21('0x144')][_0xbd21('0x110')](db[_0xbd21('0xfd')],{'as':_0xbd21('0x167'),'foreignKey':_0xbd21('0x1ef'),'onDelete':'cascade'});db[_0xbd21('0x144')][_0xbd21('0x152')](db[_0xbd21('0x124')],{'as':_0xbd21('0x177'),'foreignKey':_0xbd21('0x178')});db[_0xbd21('0x144')][_0xbd21('0x152')](db[_0xbd21('0x80')],{'as':_0xbd21('0x183'),'foreignKey':_0xbd21('0x154')});db[_0xbd21('0x144')][_0xbd21('0x11f')](db[_0xbd21('0xf')],{'as':_0xbd21('0x156'),'through':_0xbd21('0x146')});db[_0xbd21('0xfd')]['belongsTo'](db[_0xbd21('0xf')],{'onDelete':'restrict'});db['WhatsappApplication'][_0xbd21('0x152')](db[_0xbd21('0x137')],{'onDelete':_0xbd21('0x162')});db[_0xbd21('0xfd')]['belongsTo'](db[_0xbd21('0x144')],{'onDelete':_0xbd21('0x162')});db[_0xbd21('0xfd')][_0xbd21('0x152')](db[_0xbd21('0x7e')],{'onDelete':_0xbd21('0x162'),'foreignKey':_0xbd21('0x153')});db[_0xbd21('0xfd')][_0xbd21('0x152')](db[_0xbd21('0x16f')],{'onDelete':_0xbd21('0x162'),'foreignKey':'TagId'});db[_0xbd21('0x11a')][_0xbd21('0x110')](db['WhatsappMessage'],{'as':_0xbd21('0x15b'),'onDelete':_0xbd21('0x10d'),'foreignKey':'WhatsappInteractionId'});db[_0xbd21('0x11a')][_0xbd21('0x152')](db[_0xbd21('0x144')],{'as':'Account','foreignKey':_0xbd21('0x1ef')});db['WhatsappInteraction'][_0xbd21('0x152')](db[_0xbd21('0x16b')],{'as':_0xbd21('0x16c'),'foreignKey':_0xbd21('0x15f')});db[_0xbd21('0x11a')][_0xbd21('0x152')](db[_0xbd21('0xf')],{'as':_0xbd21('0x16d'),'foreignKey':_0xbd21('0x111')});db[_0xbd21('0x11a')]['belongsToMany'](db[_0xbd21('0x16f')],{'through':_0xbd21('0x1f0'),'as':_0xbd21('0x187')});db[_0xbd21('0x11a')][_0xbd21('0x11f')](db[_0xbd21('0x16f')],{'through':'whatsapp_interaction_has_tags','as':_0xbd21('0x170')});db['WhatsappInteraction'][_0xbd21('0x11f')](db[_0xbd21('0xf')],{'as':_0xbd21('0x17f'),'through':_0xbd21('0x12f'),'foreignKey':_0xbd21('0x1f1')});db['WhatsappMessage'][_0xbd21('0x152')](db[_0xbd21('0xf')],{'as':'User'});db[_0xbd21('0xff')][_0xbd21('0x152')](db[_0xbd21('0x16b')],{'onDelete':'cascade','as':_0xbd21('0x16c')});db['WhatsappMessage'][_0xbd21('0x152')](db[_0xbd21('0x11a')],{'onDelete':_0xbd21('0x10d'),'as':_0xbd21('0x173'),'foreignKey':'WhatsappInteractionId'});db[_0xbd21('0xff')][_0xbd21('0x152')](db[_0xbd21('0x144')],{'as':_0xbd21('0x16a'),'foreignKey':_0xbd21('0x1ef')});db[_0xbd21('0x101')][_0xbd21('0x152')](db['WhatsappAccount'],{});db[_0xbd21('0x101')]['belongsTo'](db['CmList'],{'as':_0xbd21('0x177'),'foreignKey':_0xbd21('0x178')});db[_0xbd21('0x101')][_0xbd21('0x152')](db[_0xbd21('0x16b')],{'as':_0xbd21('0x16c'),'foreignKey':_0xbd21('0x15f')});db[_0xbd21('0x101')][_0xbd21('0x152')](db[_0xbd21('0x11a')],{});db[_0xbd21('0x101')]['belongsTo'](db[_0xbd21('0x137')],{});db[_0xbd21('0x101')][_0xbd21('0x152')](db[_0xbd21('0xff')],{});db[_0xbd21('0x101')][_0xbd21('0x152')](db[_0xbd21('0xf')],{});db[_0xbd21('0x1f2')][_0xbd21('0x152')](db[_0xbd21('0xff')],{});db[_0xbd21('0x1f2')][_0xbd21('0x152')](db[_0xbd21('0x11a')],{});db[_0xbd21('0x1f2')][_0xbd21('0x152')](db[_0xbd21('0x144')],{'foreignKey':_0xbd21('0x1f3'),'as':_0xbd21('0x1da')});db[_0xbd21('0x1f2')]['belongsTo'](db['WhatsappAccount'],{'foreignKey':_0xbd21('0x1f4'),'as':_0xbd21('0x1df')});db[_0xbd21('0x1f2')]['belongsTo'](db[_0xbd21('0x137')],{'foreignKey':_0xbd21('0x1f5'),'as':'ToQueue'});db[_0xbd21('0x1f2')][_0xbd21('0x152')](db[_0xbd21('0xf')],{'foreignKey':_0xbd21('0x1db'),'as':_0xbd21('0x1e1')});db[_0xbd21('0x1f2')][_0xbd21('0x152')](db[_0xbd21('0xf')],{'foreignKey':_0xbd21('0x1dc'),'as':_0xbd21('0x1dd')});db[_0xbd21('0x137')][_0xbd21('0x11f')](db['User'],{'as':_0xbd21('0x156'),'through':_0xbd21('0x35'),'foreignKey':_0xbd21('0x1f6')});db[_0xbd21('0x137')]['belongsToMany'](db[_0xbd21('0xe7')],{'through':_0xbd21('0x1d3'),'as':_0xbd21('0x157')});db[_0xbd21('0x10e')][_0xbd21('0x152')](db[_0xbd21('0xf')],{'as':_0xbd21('0x1f7'),'foreignKey':_0xbd21('0x111'),'onDelete':'cascade','hooks':!![]});db['CloudProvider'][_0xbd21('0x10b')](db[_0xbd21('0xc4')],{'as':_0xbd21('0xc4'),'onDelete':_0xbd21('0x162')});db[_0xbd21('0x104')][_0xbd21('0x10b')](db[_0xbd21('0x36')],{'as':_0xbd21('0x163'),'onDelete':_0xbd21('0x162')});db[_0xbd21('0x104')][_0xbd21('0x10b')](db[_0xbd21('0x38')],{'as':_0xbd21('0x164'),'onDelete':_0xbd21('0x162')});module[_0xbd21('0x1f8')]={'db':db,'dbH':dbH};
\ No newline at end of file
+var _0xe3cf=['../api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.model','Template','../api/template/template.model','Trigger','../api/trigger/trigger.model','../api/variable/variable.model','Integration','../api/integration/integration.model','IntegrationReport','../api/integrationReport/integrationReport.model','AnalyticCustomReport','../api/analyticCustomReport/analyticCustomReport.model','AnalyticDefaultReport','../api/analyticDefaultReport/analyticDefaultReport.model','AnalyticExtractedReport','../api/analyticExtractedReport/analyticExtractedReport.model','AnalyticMetric','AnalyticFieldReport','../api/analyticFieldReport/analyticFieldReport.model','AnalyticTreeReport','../api/analyticTreeReport/analyticTreeReport.model','SalesforceAccount','SalesforceConfiguration','../api/intSalesforceConfiguration/intSalesforceConfiguration.model','SalesforceField','../api/intSalesforceField/intSalesforceField.model','SugarcrmAccount','../api/intSugarcrmAccount/intSugarcrmAccount.model','SugarcrmConfiguration','../api/intSugarcrmConfiguration/intSugarcrmConfiguration.model','SugarcrmField','../api/intDeskAccount/intDeskAccount.model','DeskConfiguration','../api/intDeskConfiguration/intDeskConfiguration.model','DeskField','../api/intDeskField/intDeskField.model','ZohoAccount','../api/intZohoAccount/intZohoAccount.model','../api/intZohoConfiguration/intZohoConfiguration.model','ZohoField','../api/intZohoField/intZohoField.model','ZendeskAccount','ZendeskConfiguration','../api/intZendeskConfiguration/intZendeskConfiguration.model','ZendeskField','FreshdeskAccount','../api/intFreshdeskAccount/intFreshdeskAccount.model','../api/intFreshdeskConfiguration/intFreshdeskConfiguration.model','FreshdeskField','../api/intFreshdeskField/intFreshdeskField.model','../api/intVtigerAccount/intVtigerAccount.model','VtigerConfiguration','../api/intVtigerConfiguration/intVtigerConfiguration.model','VtigerField','../api/intVtigerField/intVtigerField.model','ServicenowAccount','../api/intServicenowConfiguration/intServicenowConfiguration.model','../api/intServicenowField/intServicenowField.model','Dynamics365Configuration','../api/intDynamics365Configuration/intDynamics365Configuration.model','../api/intFreshsalesAccount/intFreshsalesAccount.model','FreshsalesConfiguration','../api/intFreshsalesConfiguration/intFreshsalesConfiguration.model','FreshsalesField','../api/intFreshsalesField/intFreshsalesField.model','Network','../api/network/network.model','ChatQueueReport','../api/chatQueueReport/chatQueueReport.model','../api/chatInternalMessage/chatInternalMessage.model','JscriptyAnswerReport','../api/jscriptyAnswerReport/jscriptyAnswerReport.model','JscriptyQuestionReport','../api/jscriptySessionReport/jscriptySessionReport.model','../api/smsQueueReport/smsQueueReport.model','JscriptyProject','../api/jscriptyProject/jscriptyProject.model','Setting','../api/setting/setting.model','SquareOdbc','../api/squareOdbc/squareOdbc.model','SquareProject','../api/squareProject/squareProject.model','SquareRecording','../api/squareRecording/squareRecording.model','Team','../api/team/team.model','../api/license/license.model','Campaign','../api/campaign/campaign.model','Migration','../api/migration/migration.model','Attachment','../api/attachment/attachment.model','../api/plugin/plugin.model','MailTransferReport','../api/mailTransferReport/mailTransferReport.model','../api/chatTransferReport/chatTransferReport.model','../api/faxTransferReport/faxTransferReport.model','../api/openchannelTransferReport/openchannelTransferReport.model','SmsTransferReport','../api/cmList/cmList.model','../api/voicePrefix/voicePrefix.model','UserProfile','UserProfileSection','../api/userProfileSection/userProfileSection.model','../api/userProfileResource/userProfileResource.model','UserNotification','WhatsappApplication','../api/whatsappApplication/whatsappApplication.model','../api/whatsappInteraction/whatsappInteraction.model','WhatsappMessage','WhatsappTransferReport','../api/whatsappTransferReport/whatsappTransferReport.model','WhatsappQueue','../api/whatsappQueue/whatsappQueue.model','CloudProvider','../api/cloudProvider/cloudProvider.model','TeamVoiceQueue','../api/teamVoiceQueue/teamVoiceQueue.model','TeamVoicePrefix','../api/teamVoicePrefix/teamVoicePrefix.model','../api/userVoicePrefix/userVoicePrefix.model','UserSetting','../api/user-setting/user-setting.model','../api/mailInteractionHasTag/mailInteractionHasTag.model','User','cascade','UserId','hasOne','userSetting','VoiceRecording','Recordings','hasMany','HopperFinals','HopperHistory','OpenchannelInteraction','OpenchannelInteractions','ChatInteractions','SmsInteraction','SmsInteractions','FaxInteractions','WhatsappInteraction','WhatsappInteractions','UserNotifications','SenderId','CmHopper','Hoppers','SET\x20NULL','belongsTo','userProfileId','Groups','chat_group_has_users','Contacts','cm_user_has_contacts','belongsToMany','CmList','Lists','cm_user_has_lists','MailInteractions','user_has_mail_interactions','user_has_sms_interactions','user_has_openchannel_interactions','user_has_whatsapp_interactions','VoiceQueues','VoicePrefixes','UserVoicePrefix','MailQueues','SmsQueues','UserSmsQueue','OpenchannelQueues','WhatsappQueues','ChatWebsites','user_has_chat_websites','FaxAccounts','user_has_mail_accounts','OpenchannelAccount','OpenchannelAccounts','SmsAccounts','user_has_sms_accounts','WhatsappAccount','WhatsappAccounts','user_has_whatsapp_accounts','ChanSpyId','Applications','Sounds','moh_has_sounds','Members','VoiceQueueId','HopperBlacks','JscriptySessionReport','JscriptySessions','TrunkId','TrunkBackup','Pause','mandatoryDispositionPause','mandatoryDispositionPauseId','voice_queues_has_cm_lists','Agents','BlackLists','voice_queues_has_cm_blacklists','Messages','mailboxuser','mailbox','uniqueid','Contact','ContactId','MailAccountId','CloudProviderId','restrict','Smtp','Dispositions','Answers','List','ListId','TemplateId','team_has_mail_queues','Teams','MailInteractionId','Owner','mail_interaction_has_tags','Tags','Users','Interaction','Account','ChatWebsiteId','IntervalId','TagId','Items','FaxAccountId','Interactions','Exntensions','FaxMessage','fax_interaction_has_tags','FaxInteractionId','AttachmentId','team_has_fax_queues','SmsMessage','SmsAccountId','SmsInteractionId','sms_interaction_has_tags','SmsQueueId','team_has_sms_queues','OpenchannelAccountId','user_has_openchannel_accounts','OpenchannelQueueId','OpenchannelInteractionId','openchannel_interaction_has_tags','ThroughTags','OpenchannelMessage','UserOpenchannelQueue','team_has_openchannel_queues','ChatMessage','Agent','Queue','Website','ChatInteractionId','chat_interaction_has_tags','user_has_chat_interactions','Attachments','ChatOfflineMessageId','team_has_chat_queues','ChatInternalMessage','ChatGroupId','Phones','CmContactId','Company','CompanyId','cm_contact_has_tags','CmHopperId','CampaignId','OwnerId','All','OneAll','AutomationAllId','Any','AutomationAnyId','Action','AutomationId','ParentId','Intervals','MailApplications','ChatApplications','FaxApplications','SmsApplications','DefaultReportId','CustomReportId','VoiceMusicOnHold','whatsapp_interaction_has_tags','ItemTypeId','Hopper','AllCondition','AnyConditions','AnyCondition','TriggerAnyId','TriggerId','Fields','MetricId','Configurations','AccountId','Subjects','SubjectId','DescriptionId','FieldId','Subject','Field','Variable','VariableId','Descriptions','Description','DeskAccount','ZohoConfiguration','int_zendesk_configuration_has_tags','FreshdeskConfiguration','int_freshdesk_configuration_has_tags','VtigerAccount','ServicenowConfiguration','ServicenowField','Dynamics365Account','Dynamics365Field','FreshsalesAccount','FromId','ToId','SessionId','SmsQueueReport','ProjectId','user_has_teams','ChatQueues','FaxQueues','team_has_whatsapp_queues','HopperHistories','TrunkBackupId','SquareProjectId','campaigns_has_cm_blacklists','FromMailAccountId','FromAccount','FromUserId','FromAgent','ToUserId','ToAgent','ToMailQueueId','ToQueue','ToMailAccountId','ChatTransferReport','FromChatWebsiteId','ToChatQueueId','ToAccount','FaxTransferReport','FromFaxAccountId','ToFaxQueueId','ToFaxAccountId','OpenchannelTransferReport','FromOpenchannelAccountId','ToOpenchannelQueueId','FromSmsAccountId','ToSmsQueueId','CustomFields','Extensions','VoicePrefix','UserProfileSections','UserProfileResource','sectionId','WhatsappAccountId','WhatsappInteractionId','WhatsappQueueReport','FromWhatsappAccountId','Imap','../config/environment','lodash','defaultsDeep','sequelize','motion2','xcall','xC@LL1234','127.0.0.1','utf8mb4','name','utf8','utf8_general_ci','sequelizeHistory','mysql','database','options','username','password','../api/user/user.model','VoiceChanSpy','../api/voiceChanSpy/voiceChanSpy.model','VoiceContext','import','VoiceExtension','../api/voiceExtension/voiceExtension.model','VoiceQueue','../api/voiceQueue/voiceQueue.model','../api/voiceRecording/voiceRecording.model','ScreenRecording','VoiceMail','../api/voiceMail/voiceMail.model','VoiceMailMessage','../api/voiceMailMessage/voiceMailMessage.model','VoiceCallReport','VoiceDialReport','../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','../api/voiceTransferReport/voiceTransferReport.model','UserVoiceQueueRt','UserVoiceQueue','../api/userVoiceQueue/userVoiceQueue.model','UserChatQueue','../api/userChatQueue/userChatQueue.model','UserMailQueue','../api/userMailQueue/userMailQueue.model','UserFaxQueue','../api/userFaxQueue/userFaxQueue.model','../api/userSmsQueue/userSmsQueue.model','../api/userOpenchannelQueue/userOpenchannelQueue.model','UserWhatsappQueue','../api/userWhatsappQueue/userWhatsappQueue.model','MailServerIn','MailServerOut','../api/mailServerOut/mailServerOut.model','MailAccount','../api/mailAccount/mailAccount.model','MailQueue','../api/mailQueue/mailQueue.model','MailSubstatus','../api/mailSubstatus/mailSubstatus.model','MailInteraction','../api/mailInteraction/mailInteraction.model','MailMessage','MailApplication','MailQueueReport','../api/mailQueueReport/mailQueueReport.model','Dashboard','../api/dashboard/dashboard.model','DashboardItem','../api/dashboardItem/dashboardItem.model','FaxAccount','../api/faxAccount/faxAccount.model','FaxApplication','../api/faxApplication/faxApplication.model','FaxInteraction','../api/faxMessage/faxMessage.model','FaxQueue','../api/faxQueue/faxQueue.model','FaxQueueReport','../api/faxQueueReport/faxQueueReport.model','SmsAccount','../api/smsAccount/smsAccount.model','SmsApplication','../api/smsApplication/smsApplication.model','../api/smsInteraction/smsInteraction.model','../api/smsMessage/smsMessage.model','SmsQueue','../api/smsQueue/smsQueue.model','OpenchannelApplication','../api/openchannelApplication/openchannelApplication.model','../api/openchannelInteraction/openchannelInteraction.model','OpenchannelQueue','ChatWebsite','../api/chatWebsite/chatWebsite.model','OpenchannelQueueReport','../api/openchannelQueueReport/openchannelQueueReport.model','ChatApplication','ChatInteraction','../api/chatMessage/chatMessage.model','ChatOfflineMessage','../api/chatOfflineMessage/chatOfflineMessage.model','ChatQueue','ChatGroup','../api/chatGroup/chatGroup.model','ChatProactiveAction','../api/chatProactiveAction/chatProactiveAction.model','CmCompany','../api/cmCompany/cmCompany.model','CmContact','../api/cmContact/cmContact.model','../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','../api/action/action.model','Automation','CannedAnswer','../api/cannedAnswer/cannedAnswer.model','Disposition','../api/disposition/disposition.model','Condition','../api/condition/condition.model','Interval','../api/interval/interval.model','../api/pause/pause.model','../api/cdr/cdr.model','VoiceQueuesLog','../api/voiceQueuesLog/voiceQueuesLog.model','Schedule','../api/schedule/schedule.model','Sound','Tag','../api/tag/tag.model','ContactItemType','../api/contactItemType/contactItemType.model','CmContactHasItem','../api/cmContactHasItem/cmContactHasItem.model','CmHopperAdditionalPhone'];(function(_0x10a0e7,_0x5cd95d){var _0x293b07=function(_0x2f97c9){while(--_0x2f97c9){_0x10a0e7['push'](_0x10a0e7['shift']());}};_0x293b07(++_0x5cd95d);}(_0xe3cf,0x16f));var _0xfe3c=function(_0x88da3f,_0x52cdc8){_0x88da3f=_0x88da3f-0x0;var _0x356191=_0xe3cf[_0x88da3f];return _0x356191;};'use strict';var config=require(_0xfe3c('0x0'));var Sequelize=require('sequelize');var _=require(_0xfe3c('0x1'));var jstz=require('jstz');var timezone=jstz['determine']();config['sequelize']=_[_0xfe3c('0x2')](config[_0xfe3c('0x3')],{'database':_0xfe3c('0x4'),'username':_0xfe3c('0x5'),'password':_0xfe3c('0x6'),'options':{'host':_0xfe3c('0x7'),'port':0xcea,'dialect':'mysql','dialectOptions':{'charset':_0xfe3c('0x8')},'logging':![],'timezone':timezone[_0xfe3c('0x9')](),'define':{'charset':_0xfe3c('0xa'),'collate':_0xfe3c('0xb')}}});config[_0xfe3c('0xc')]=_['defaultsDeep'](config[_0xfe3c('0xc')],{'database':'motion2','username':_0xfe3c('0x5'),'password':_0xfe3c('0x6'),'options':{'host':_0xfe3c('0x7'),'port':0xcea,'dialect':_0xfe3c('0xd'),'dialectOptions':{'charset':_0xfe3c('0x8')},'logging':![],'timezone':timezone[_0xfe3c('0x9')](),'define':{'charset':'utf8','collate':_0xfe3c('0xb')}}});var db={'Sequelize':Sequelize,'sequelize':new Sequelize(config[_0xfe3c('0x3')][_0xfe3c('0xe')],config['sequelize']['username'],config[_0xfe3c('0x3')]['password'],config[_0xfe3c('0x3')][_0xfe3c('0xf')])};var dbH={'Sequelize':Sequelize,'sequelize':new Sequelize(config[_0xfe3c('0xc')][_0xfe3c('0xe')],config[_0xfe3c('0xc')][_0xfe3c('0x10')],config[_0xfe3c('0xc')][_0xfe3c('0x11')],config[_0xfe3c('0xc')][_0xfe3c('0xf')])};db['User']=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x12'));db[_0xfe3c('0x13')]=db['sequelize']['import'](_0xfe3c('0x14'));db[_0xfe3c('0x15')]=db['sequelize'][_0xfe3c('0x16')]('../api/voiceContext/voiceContext.model');db[_0xfe3c('0x17')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x18'));db['VoiceMusicOnHold']=db['sequelize']['import']('../api/voiceMusicOnHold/voiceMusicOnHold.model');db[_0xfe3c('0x19')]=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0x1a'));db['VoiceRecording']=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x1b'));db[_0xfe3c('0x1c')]=db['sequelize'][_0xfe3c('0x16')]('../api/screenRecording/screenRecording.model');db[_0xfe3c('0x1d')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x1e'));db[_0xfe3c('0x1f')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x20'));db[_0xfe3c('0x21')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/voiceCallReport/voiceCallReport.model');db[_0xfe3c('0x22')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x23'));db[_0xfe3c('0x24')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x25'));db[_0xfe3c('0x26')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x27'));db[_0xfe3c('0x28')]=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0x29'));db[_0xfe3c('0x2a')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x2b'));db[_0xfe3c('0x2c')]=db['sequelize']['import'](_0xfe3c('0x2d'));db[_0xfe3c('0x2e')]=db['sequelize'][_0xfe3c('0x16')]('../api/userVoiceQueueRt/userVoiceQueueRt.model');db[_0xfe3c('0x2f')]=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0x30'));db[_0xfe3c('0x31')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x32'));db[_0xfe3c('0x33')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x34'));db[_0xfe3c('0x35')]=db['sequelize']['import'](_0xfe3c('0x36'));db['UserSmsQueue']=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x37'));db['UserOpenchannelQueue']=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x38'));db[_0xfe3c('0x39')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x3a'));db[_0xfe3c('0x3b')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/mailServerIn/mailServerIn.model');db[_0xfe3c('0x3c')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x3d'));db[_0xfe3c('0x3e')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x3f'));db[_0xfe3c('0x40')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x41'));db[_0xfe3c('0x42')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x43'));db[_0xfe3c('0x44')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x45'));db[_0xfe3c('0x46')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/mailMessage/mailMessage.model');db[_0xfe3c('0x47')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/mailApplication/mailApplication.model');db[_0xfe3c('0x48')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x49'));db[_0xfe3c('0x4a')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x4b'));db[_0xfe3c('0x4c')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x4d'));db[_0xfe3c('0x4e')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x4f'));db[_0xfe3c('0x50')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x51'));db[_0xfe3c('0x52')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/faxInteraction/faxInteraction.model');db['FaxMessage']=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x53'));db[_0xfe3c('0x54')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x55'));db[_0xfe3c('0x56')]=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0x57'));db[_0xfe3c('0x58')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x59'));db[_0xfe3c('0x5a')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x5b'));db['SmsInteraction']=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x5c'));db['SmsMessage']=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0x5d'));db[_0xfe3c('0x5e')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x5f'));db['OpenchannelAccount']=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/openchannelAccount/openchannelAccount.model');db[_0xfe3c('0x60')]=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0x61'));db['OpenchannelInteraction']=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x62'));db['OpenchannelMessage']=db[_0xfe3c('0x3')]['import']('../api/openchannelMessage/openchannelMessage.model');db[_0xfe3c('0x63')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/openchannelQueue/openchannelQueue.model');db[_0xfe3c('0x64')]=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0x65'));db[_0xfe3c('0x66')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x67'));db[_0xfe3c('0x68')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/chatApplication/chatApplication.model');db[_0xfe3c('0x69')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/chatInteraction/chatInteraction.model');db['ChatMessage']=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x6a'));db[_0xfe3c('0x6b')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x6c'));db[_0xfe3c('0x6d')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/chatQueue/chatQueue.model');db[_0xfe3c('0x6e')]=db['sequelize']['import'](_0xfe3c('0x6f'));db[_0xfe3c('0x70')]=db['sequelize']['import'](_0xfe3c('0x71'));db[_0xfe3c('0x72')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x73'));db[_0xfe3c('0x74')]=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0x75'));db['CmHopper']=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0x76'));db[_0xfe3c('0x77')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x78'));db[_0xfe3c('0x79')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x7a'));db[_0xfe3c('0x7b')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x7c'));db[_0xfe3c('0x7d')]=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0x7e'));db['CmCustomField']=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x7f'));db['Action']=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x80'));db[_0xfe3c('0x81')]=db['sequelize']['import']('../api/automation/automation.model');db[_0xfe3c('0x82')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x83'));db[_0xfe3c('0x84')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x85'));db[_0xfe3c('0x86')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x87'));db[_0xfe3c('0x88')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x89'));db['Pause']=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x8a'));db['Cdr']=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x8b'));db[_0xfe3c('0x8c')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x8d'));db[_0xfe3c('0x8e')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x8f'));db[_0xfe3c('0x90')]=db[_0xfe3c('0x3')]['import']('../api/sound/sound.model');db[_0xfe3c('0x91')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x92'));db[_0xfe3c('0x93')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x94'));db[_0xfe3c('0x95')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x96'));db[_0xfe3c('0x97')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x98'));db[_0xfe3c('0x99')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x9a'));db[_0xfe3c('0x9b')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x9c'));db['Variable']=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x9d'));db[_0xfe3c('0x9e')]=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0x9f'));db[_0xfe3c('0xa0')]=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0xa1'));db[_0xfe3c('0xa2')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xa3'));db[_0xfe3c('0xa4')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xa5'));db[_0xfe3c('0xa6')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xa7'));db[_0xfe3c('0xa8')]=db['sequelize'][_0xfe3c('0x16')]('../api/analyticMetric/analyticMetric.model');db[_0xfe3c('0xa9')]=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0xaa'));db[_0xfe3c('0xab')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xac'));db[_0xfe3c('0xad')]=db[_0xfe3c('0x3')]['import']('../api/intSalesforceAccount/intSalesforceAccount.model');db[_0xfe3c('0xae')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xaf'));db[_0xfe3c('0xb0')]=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0xb1'));db[_0xfe3c('0xb2')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xb3'));db[_0xfe3c('0xb4')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0xb5'));db[_0xfe3c('0xb6')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/intSugarcrmField/intSugarcrmField.model');db['DeskAccount']=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xb7'));db[_0xfe3c('0xb8')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0xb9'));db[_0xfe3c('0xba')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0xbb'));db[_0xfe3c('0xbc')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xbd'));db['ZohoConfiguration']=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xbe'));db[_0xfe3c('0xbf')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xc0'));db[_0xfe3c('0xc1')]=db['sequelize']['import']('../api/intZendeskAccount/intZendeskAccount.model');db[_0xfe3c('0xc2')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0xc3'));db[_0xfe3c('0xc4')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/intZendeskField/intZendeskField.model');db[_0xfe3c('0xc5')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xc6'));db['FreshdeskConfiguration']=db[_0xfe3c('0x3')]['import'](_0xfe3c('0xc7'));db[_0xfe3c('0xc8')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xc9'));db['VtigerAccount']=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xca'));db[_0xfe3c('0xcb')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xcc'));db[_0xfe3c('0xcd')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xce'));db[_0xfe3c('0xcf')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/intServicenowAccount/intServicenowAccount.model');db['ServicenowConfiguration']=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xd0'));db['ServicenowField']=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xd1'));db['Dynamics365Account']=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/intDynamics365Account/intDynamics365Account.model');db[_0xfe3c('0xd2')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xd3'));db['Dynamics365Field']=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/intDynamics365Field/intDynamics365Field.model');db['FreshsalesAccount']=db[_0xfe3c('0x3')]['import'](_0xfe3c('0xd4'));db[_0xfe3c('0xd5')]=db['sequelize']['import'](_0xfe3c('0xd6'));db[_0xfe3c('0xd7')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xd8'));db['Integration']=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x9f'));db[_0xfe3c('0xd9')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xda'));db[_0xfe3c('0xdb')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xdc'));db['ChatInternalMessage']=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xdd'));db[_0xfe3c('0xde')]=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0xdf'));db[_0xfe3c('0xe0')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/jscriptyQuestionReport/jscriptyQuestionReport.model');db['JscriptySessionReport']=db[_0xfe3c('0x3')]['import'](_0xfe3c('0xe1'));db['SmsQueueReport']=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xe2'));db['SquareReport']=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/squareReport/squareReport.model');db['SquareDetailsReport']=db['sequelize']['import']('../api/squareReportDetail/squareReportDetail.model');db[_0xfe3c('0xe3')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xe4'));db[_0xfe3c('0xe5')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xe6'));db[_0xfe3c('0xe7')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xe8'));db[_0xfe3c('0xe9')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0xea'));db[_0xfe3c('0xeb')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xec'));db['SquareMessage']=db['sequelize'][_0xfe3c('0x16')]('../api/squareMessage/squareMessage.model');db[_0xfe3c('0xed')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xee'));db['License']=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xef'));db[_0xfe3c('0xf0')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xf1'));db[_0xfe3c('0xf2')]=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0xf3'));db[_0xfe3c('0xf4')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0xf5'));db['Plugin']=db['sequelize']['import'](_0xfe3c('0xf6'));db[_0xfe3c('0xf7')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xf8'));db['ChatTransferReport']=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0xf9'));db['FaxTransferReport']=db[_0xfe3c('0x3')]['import'](_0xfe3c('0xfa'));db['OpenchannelTransferReport']=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0xfb'));db[_0xfe3c('0xfc')]=db[_0xfe3c('0x3')]['import']('../api/smsTransferReport/smsTransferReport.model');db['CmList']=db[_0xfe3c('0x3')]['import'](_0xfe3c('0xfd'));db['VoicePrefix']=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0xfe'));db[_0xfe3c('0xff')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/userProfile/userProfile.model');db[_0xfe3c('0x100')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x101'));db['UserProfileResource']=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0x102'));db[_0xfe3c('0x103')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/userNotification/userNotification.model');db['WhatsappAccount']=db['sequelize'][_0xfe3c('0x16')]('../api/whatsappAccount/whatsappAccount.model');db[_0xfe3c('0x104')]=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0x105'));db['WhatsappInteraction']=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0x106'));db[_0xfe3c('0x107')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')]('../api/whatsappMessage/whatsappMessage.model');db['WhatsappQueueReport']=db['sequelize'][_0xfe3c('0x16')]('../api/whatsappQueueReport/whatsappQueueReport.model');db[_0xfe3c('0x108')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x109'));db[_0xfe3c('0x10a')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x10b'));db[_0xfe3c('0x10c')]=db[_0xfe3c('0x3')][_0xfe3c('0x16')](_0xfe3c('0x10d'));db[_0xfe3c('0x10e')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x10f'));db[_0xfe3c('0x110')]=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0x111'));db['UserVoicePrefix']=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x112'));db[_0xfe3c('0x113')]=db[_0xfe3c('0x3')]['import'](_0xfe3c('0x114'));db['MailInteractionHasTag']=db['sequelize'][_0xfe3c('0x16')](_0xfe3c('0x115'));db[_0xfe3c('0x116')]['hasOne'](db[_0xfe3c('0x1d')],{'as':_0xfe3c('0x1d'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x118')});db['User'][_0xfe3c('0x119')](db[_0xfe3c('0x113')],{'as':_0xfe3c('0x11a'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x118')});db[_0xfe3c('0x116')]['hasMany'](db[_0xfe3c('0x11b')],{'as':_0xfe3c('0x11c'),'foreignKey':_0xfe3c('0x118')});db[_0xfe3c('0x116')][_0xfe3c('0x11d')](db[_0xfe3c('0x2e')],{'as':'VoiceQueuesRt','foreignKey':'UserId'});db[_0xfe3c('0x116')][_0xfe3c('0x11d')](db[_0xfe3c('0x17')],{'as':'Extensions','onDelete':_0xfe3c('0x117'),'hooks':!![]});db['User'][_0xfe3c('0x11d')](db[_0xfe3c('0x79')],{'as':_0xfe3c('0x11e'),'foreignKey':'UserId'});db[_0xfe3c('0x116')][_0xfe3c('0x11d')](db['CmHopperHistory'],{'as':_0xfe3c('0x11f'),'foreignKey':_0xfe3c('0x118')});db['User']['hasMany'](db[_0xfe3c('0x7d')],{'as':_0xfe3c('0x7d'),'foreignKey':_0xfe3c('0x118')});db['User'][_0xfe3c('0x11d')](db[_0xfe3c('0x120')],{'as':_0xfe3c('0x121'),'foreignKey':_0xfe3c('0x118')});db[_0xfe3c('0x116')][_0xfe3c('0x11d')](db[_0xfe3c('0x69')],{'as':_0xfe3c('0x122'),'foreignKey':_0xfe3c('0x118')});db[_0xfe3c('0x116')][_0xfe3c('0x11d')](db[_0xfe3c('0x123')],{'as':_0xfe3c('0x124'),'foreignKey':_0xfe3c('0x118')});db['User'][_0xfe3c('0x11d')](db['FaxInteraction'],{'as':_0xfe3c('0x125'),'foreignKey':_0xfe3c('0x118')});db[_0xfe3c('0x116')][_0xfe3c('0x11d')](db[_0xfe3c('0x44')],{'as':'MailInteractions','foreignKey':_0xfe3c('0x118')});db['User'][_0xfe3c('0x11d')](db[_0xfe3c('0x126')],{'as':_0xfe3c('0x127'),'foreignKey':'UserId'});db['User'][_0xfe3c('0x11d')](db[_0xfe3c('0x103')],{'as':_0xfe3c('0x128'),'foreignKey':_0xfe3c('0x129')});db[_0xfe3c('0x116')][_0xfe3c('0x11d')](db[_0xfe3c('0x12a')],{'as':_0xfe3c('0x12b'),'foreignKey':_0xfe3c('0x118'),'onDelete':_0xfe3c('0x12c')});db[_0xfe3c('0x116')][_0xfe3c('0x12d')](db[_0xfe3c('0xff')],{'as':_0xfe3c('0xff'),'foreignKey':_0xfe3c('0x12e')});db[_0xfe3c('0x116')]['belongsToMany'](db[_0xfe3c('0x6e')],{'as':_0xfe3c('0x12f'),'through':_0xfe3c('0x130')});db[_0xfe3c('0x116')]['belongsToMany'](db[_0xfe3c('0x74')],{'as':_0xfe3c('0x131'),'through':_0xfe3c('0x132')});db[_0xfe3c('0x116')][_0xfe3c('0x133')](db[_0xfe3c('0x134')],{'as':_0xfe3c('0x135'),'through':_0xfe3c('0x136')});db['User'][_0xfe3c('0x133')](db['Team'],{'through':'user_has_teams'});db[_0xfe3c('0x116')][_0xfe3c('0x133')](db[_0xfe3c('0x44')],{'as':_0xfe3c('0x137'),'through':_0xfe3c('0x138')});db[_0xfe3c('0x116')][_0xfe3c('0x133')](db[_0xfe3c('0x69')],{'as':'ChatInteractions','through':'user_has_chat_interactions'});db[_0xfe3c('0x116')][_0xfe3c('0x133')](db[_0xfe3c('0x52')],{'as':_0xfe3c('0x125'),'through':'user_has_fax_interactions'});db[_0xfe3c('0x116')][_0xfe3c('0x133')](db[_0xfe3c('0x123')],{'as':_0xfe3c('0x124'),'through':_0xfe3c('0x139')});db[_0xfe3c('0x116')][_0xfe3c('0x133')](db[_0xfe3c('0x120')],{'as':'OpenchannelInteractions','through':_0xfe3c('0x13a')});db[_0xfe3c('0x116')]['belongsToMany'](db[_0xfe3c('0x126')],{'as':_0xfe3c('0x127'),'through':_0xfe3c('0x13b')});db['User'][_0xfe3c('0x133')](db[_0xfe3c('0x19')],{'as':_0xfe3c('0x13c'),'through':_0xfe3c('0x2f'),'required':![]});db[_0xfe3c('0x116')][_0xfe3c('0x133')](db['VoicePrefix'],{'as':_0xfe3c('0x13d'),'through':_0xfe3c('0x13e'),'required':![]});db['User'][_0xfe3c('0x133')](db[_0xfe3c('0x40')],{'as':_0xfe3c('0x13f'),'through':_0xfe3c('0x33'),'required':![]});db['User'][_0xfe3c('0x133')](db[_0xfe3c('0x6d')],{'as':'ChatQueues','through':_0xfe3c('0x31'),'required':![],'hooks':!![]});db['User'][_0xfe3c('0x133')](db[_0xfe3c('0x54')],{'as':'FaxQueues','through':'UserFaxQueue','required':![]});db['User'][_0xfe3c('0x133')](db['SmsQueue'],{'as':_0xfe3c('0x140'),'through':_0xfe3c('0x141'),'required':![]});db[_0xfe3c('0x116')][_0xfe3c('0x133')](db['OpenchannelQueue'],{'as':_0xfe3c('0x142'),'through':'UserOpenchannelQueue','required':![]});db[_0xfe3c('0x116')][_0xfe3c('0x133')](db['WhatsappQueue'],{'as':_0xfe3c('0x143'),'through':'UserWhatsappQueue','required':![]});db[_0xfe3c('0x116')]['belongsToMany'](db[_0xfe3c('0x134')],{'through':_0xfe3c('0x136')});db['User'][_0xfe3c('0x133')](db['ChatWebsite'],{'as':_0xfe3c('0x144'),'through':_0xfe3c('0x145')});db[_0xfe3c('0x116')][_0xfe3c('0x133')](db[_0xfe3c('0x4e')],{'as':_0xfe3c('0x146'),'through':'user_has_fax_accounts'});db['User'][_0xfe3c('0x133')](db[_0xfe3c('0x3e')],{'as':'MailAccounts','through':_0xfe3c('0x147')});db['User'][_0xfe3c('0x133')](db[_0xfe3c('0x148')],{'as':_0xfe3c('0x149'),'through':'user_has_openchannel_accounts'});db[_0xfe3c('0x116')]['belongsToMany'](db[_0xfe3c('0x58')],{'as':_0xfe3c('0x14a'),'through':_0xfe3c('0x14b')});db[_0xfe3c('0x116')][_0xfe3c('0x133')](db[_0xfe3c('0x14c')],{'as':_0xfe3c('0x14d'),'through':_0xfe3c('0x14e')});db[_0xfe3c('0x13')][_0xfe3c('0x11d')](db['VoiceExtension'],{'as':'SpiedAgents','onDelete':'cascade','foreignKey':_0xfe3c('0x14f')});db[_0xfe3c('0x15')][_0xfe3c('0x11d')](db[_0xfe3c('0x17')],{'onDelete':_0xfe3c('0x117')});db[_0xfe3c('0x17')][_0xfe3c('0x11d')](db[_0xfe3c('0x17')],{'as':_0xfe3c('0x150'),'onDelete':_0xfe3c('0x117')});db['VoiceMusicOnHold'][_0xfe3c('0x133')](db['Sound'],{'as':_0xfe3c('0x151'),'through':_0xfe3c('0x152')});db[_0xfe3c('0x19')][_0xfe3c('0x11d')](db[_0xfe3c('0x2e')],{'as':_0xfe3c('0x153'),'foreignKey':_0xfe3c('0x154')});db['VoiceQueue']['hasMany'](db[_0xfe3c('0x12a')],{'as':'Hoppers','foreignKey':'VoiceQueueId'});db['VoiceQueue'][_0xfe3c('0x11d')](db[_0xfe3c('0x79')],{'as':_0xfe3c('0x11e'),'foreignKey':'VoiceQueueId'});db[_0xfe3c('0x19')][_0xfe3c('0x11d')](db[_0xfe3c('0x7b')],{'as':'HopperHistories','foreignKey':'VoiceQueueId'});db[_0xfe3c('0x19')][_0xfe3c('0x11d')](db['ReportAgentPreview'],{'as':_0xfe3c('0x7d'),'foreignKey':_0xfe3c('0x154')});db[_0xfe3c('0x19')][_0xfe3c('0x11d')](db[_0xfe3c('0x77')],{'as':_0xfe3c('0x155'),'foreignKey':_0xfe3c('0x154')});db[_0xfe3c('0x19')][_0xfe3c('0x11d')](db[_0xfe3c('0x156')],{'as':_0xfe3c('0x157'),'foreignKey':_0xfe3c('0x154')});db[_0xfe3c('0x19')]['belongsTo'](db[_0xfe3c('0x2a')],{'as':_0xfe3c('0x2a'),'foreignKey':_0xfe3c('0x158')});db[_0xfe3c('0x19')][_0xfe3c('0x12d')](db[_0xfe3c('0x2a')],{'as':_0xfe3c('0x159'),'foreignKey':'TrunkBackupId'});db[_0xfe3c('0x19')][_0xfe3c('0x12d')](db[_0xfe3c('0x88')],{'as':_0xfe3c('0x88'),'foreignKey':'IntervalId'});db[_0xfe3c('0x19')][_0xfe3c('0x12d')](db[_0xfe3c('0x15a')],{'as':_0xfe3c('0x15b'),'foreignKey':_0xfe3c('0x15c')});db[_0xfe3c('0x19')][_0xfe3c('0x133')](db['CmList'],{'as':_0xfe3c('0x135'),'through':_0xfe3c('0x15d')});db[_0xfe3c('0x19')][_0xfe3c('0x133')](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x15e'),'through':'UserVoiceQueue'});db[_0xfe3c('0x19')][_0xfe3c('0x133')](db['Team'],{'as':'Teams','through':_0xfe3c('0x10e')});db['VoiceQueue'][_0xfe3c('0x133')](db[_0xfe3c('0x134')],{'as':_0xfe3c('0x15f'),'through':_0xfe3c('0x160')});db[_0xfe3c('0x11b')][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x116'),'foreignKey':'UserId'});db[_0xfe3c('0x1c')][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{'as':'User','foreignKey':_0xfe3c('0x118')});db[_0xfe3c('0x1d')][_0xfe3c('0x11d')](db[_0xfe3c('0x1f')],{'as':_0xfe3c('0x161'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x162'),'sourceKey':_0xfe3c('0x163')});db[_0xfe3c('0x1f')]['belongsTo'](db['VoiceMail'],{'foreignKey':_0xfe3c('0x162'),'targetKey':_0xfe3c('0x163')});db[_0xfe3c('0x21')][_0xfe3c('0x11d')](db['VoiceQueueReport'],{'as':'QueueCalls','foreignKey':_0xfe3c('0x164'),'constraints':![]});db[_0xfe3c('0x21')][_0xfe3c('0x11d')](db[_0xfe3c('0x24')],{'as':'AgentReports','foreignKey':_0xfe3c('0x164'),'constraints':![]});db[_0xfe3c('0x21')]['belongsTo'](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x116'),'foreignKey':_0xfe3c('0x118')});db[_0xfe3c('0x21')][_0xfe3c('0x12d')](db[_0xfe3c('0x74')],{'as':_0xfe3c('0x165'),'foreignKey':_0xfe3c('0x166')});db['MailServerIn'][_0xfe3c('0x12d')](db[_0xfe3c('0x3e')],{'as':_0xfe3c('0x3e'),'foreignKey':_0xfe3c('0x167')});db['MailServerIn'][_0xfe3c('0x12d')](db[_0xfe3c('0x10c')],{'as':_0xfe3c('0x10c'),'foreignKey':_0xfe3c('0x168'),'onDelete':_0xfe3c('0x169')});db['MailServerOut'][_0xfe3c('0x12d')](db[_0xfe3c('0x3e')],{'as':_0xfe3c('0x3e'),'foreignKey':'MailAccountId'});db[_0xfe3c('0x3c')][_0xfe3c('0x12d')](db['CloudProvider'],{'as':_0xfe3c('0x10c'),'foreignKey':_0xfe3c('0x168'),'onDelete':'restrict'});db['MailAccount']['hasOne'](db[_0xfe3c('0x3b')],{'as':'Imap','onDelete':_0xfe3c('0x117')});db[_0xfe3c('0x3e')]['hasOne'](db[_0xfe3c('0x3c')],{'as':_0xfe3c('0x16a'),'onDelete':_0xfe3c('0x117')});db['MailAccount'][_0xfe3c('0x11d')](db['Disposition'],{'as':_0xfe3c('0x16b'),'foreignKey':_0xfe3c('0x167'),'onDelete':'cascade'});db['MailAccount']['hasMany'](db['CannedAnswer'],{'as':_0xfe3c('0x16c'),'foreignKey':_0xfe3c('0x167')});db[_0xfe3c('0x3e')][_0xfe3c('0x11d')](db['MailMessage'],{'as':_0xfe3c('0x161'),'foreignKey':_0xfe3c('0x167')});db[_0xfe3c('0x3e')][_0xfe3c('0x11d')](db[_0xfe3c('0x44')],{'as':'Interactions'});db['MailAccount'][_0xfe3c('0x11d')](db[_0xfe3c('0x47')],{'as':_0xfe3c('0x150'),'foreignKey':_0xfe3c('0x167'),'onDelete':_0xfe3c('0x117')});db[_0xfe3c('0x3e')][_0xfe3c('0x12d')](db[_0xfe3c('0x134')],{'as':_0xfe3c('0x16d'),'foreignKey':_0xfe3c('0x16e')});db[_0xfe3c('0x3e')][_0xfe3c('0x12d')](db[_0xfe3c('0x99')],{'as':_0xfe3c('0x99'),'foreignKey':_0xfe3c('0x16f')});db[_0xfe3c('0x3e')][_0xfe3c('0x12d')](db[_0xfe3c('0x15a')],{'as':_0xfe3c('0x15b'),'foreignKey':_0xfe3c('0x15c')});db['MailAccount'][_0xfe3c('0x133')](db[_0xfe3c('0x116')],{'as':'Agents','through':_0xfe3c('0x147')});db['MailQueue'][_0xfe3c('0x133')](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x15e'),'through':'UserMailQueue'});db['MailQueue'][_0xfe3c('0x133')](db[_0xfe3c('0xed')],{'through':_0xfe3c('0x170'),'as':_0xfe3c('0x171')});db[_0xfe3c('0x44')][_0xfe3c('0x11d')](db[_0xfe3c('0x46')],{'as':_0xfe3c('0x161'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x172')});db[_0xfe3c('0x44')][_0xfe3c('0x12d')](db['MailAccount'],{'as':'Account','foreignKey':_0xfe3c('0x167')});db[_0xfe3c('0x44')][_0xfe3c('0x12d')](db[_0xfe3c('0x74')],{'as':_0xfe3c('0x165'),'foreignKey':'ContactId'});db[_0xfe3c('0x44')][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x173'),'foreignKey':'UserId'});db[_0xfe3c('0x44')][_0xfe3c('0x133')](db[_0xfe3c('0x91')],{'through':_0xfe3c('0x174'),'as':_0xfe3c('0x175')});db[_0xfe3c('0x44')]['belongsToMany'](db['Tag'],{'through':_0xfe3c('0x174'),'as':'ThroughTags'});db['MailInteraction']['belongsToMany'](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x176'),'through':_0xfe3c('0x138'),'foreignKey':'MailInteractionId'});db['MailMessage'][_0xfe3c('0x11d')](db[_0xfe3c('0xf4')],{'as':'Attachments','onDelete':_0xfe3c('0x117')});db[_0xfe3c('0x46')][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x116')});db['MailMessage'][_0xfe3c('0x12d')](db[_0xfe3c('0x74')],{'onDelete':_0xfe3c('0x117'),'as':_0xfe3c('0x165')});db[_0xfe3c('0x46')][_0xfe3c('0x12d')](db['MailInteraction'],{'as':_0xfe3c('0x177'),'foreignKey':_0xfe3c('0x172')});db[_0xfe3c('0x46')][_0xfe3c('0x12d')](db['MailAccount'],{'as':_0xfe3c('0x178'),'foreignKey':_0xfe3c('0x167')});db['MailMessage'][_0xfe3c('0x12d')](db['ChatWebsite'],{'as':_0xfe3c('0x64'),'foreignKey':_0xfe3c('0x179')});db[_0xfe3c('0x46')][_0xfe3c('0x12d')](db[_0xfe3c('0x6b')],{'as':'ChatOfflineMessage','foreignKey':'ChatOfflineMessageId'});db[_0xfe3c('0x47')]['belongsTo'](db['User'],{'onDelete':_0xfe3c('0x169')});db[_0xfe3c('0x47')]['belongsTo'](db[_0xfe3c('0x40')],{'onDelete':_0xfe3c('0x169')});db[_0xfe3c('0x47')][_0xfe3c('0x12d')](db[_0xfe3c('0x3e')],{'onDelete':_0xfe3c('0x169')});db[_0xfe3c('0x47')][_0xfe3c('0x12d')](db[_0xfe3c('0x88')],{'onDelete':_0xfe3c('0x169'),'foreignKey':_0xfe3c('0x17a')});db[_0xfe3c('0x47')][_0xfe3c('0x12d')](db['Tag'],{'onDelete':'restrict','foreignKey':_0xfe3c('0x17b')});db[_0xfe3c('0x48')][_0xfe3c('0x12d')](db[_0xfe3c('0x3e')],{});db[_0xfe3c('0x48')]['belongsTo'](db[_0xfe3c('0x134')],{'as':'List','foreignKey':'ListId'});db['MailQueueReport'][_0xfe3c('0x12d')](db['CmContact'],{'as':'Contact','foreignKey':_0xfe3c('0x166')});db[_0xfe3c('0x48')]['belongsTo'](db[_0xfe3c('0x44')],{});db[_0xfe3c('0x48')][_0xfe3c('0x12d')](db[_0xfe3c('0x46')],{});db[_0xfe3c('0x48')][_0xfe3c('0x12d')](db['User'],{});db[_0xfe3c('0x48')][_0xfe3c('0x12d')](db[_0xfe3c('0x40')],{});db[_0xfe3c('0x4a')][_0xfe3c('0x11d')](db[_0xfe3c('0x4c')],{'as':_0xfe3c('0x17c'),'onDelete':_0xfe3c('0x117')});db['FaxAccount'][_0xfe3c('0x11d')](db[_0xfe3c('0x84')],{'as':'Dispositions','foreignKey':_0xfe3c('0x17d'),'onDelete':'cascade'});db[_0xfe3c('0x4e')][_0xfe3c('0x11d')](db[_0xfe3c('0x82')],{'as':'Answers','foreignKey':_0xfe3c('0x17d')});db['FaxAccount'][_0xfe3c('0x11d')](db[_0xfe3c('0x52')],{'as':_0xfe3c('0x17e')});db['FaxAccount'][_0xfe3c('0x11d')](db[_0xfe3c('0x50')],{'as':_0xfe3c('0x150'),'foreignKey':'FaxAccountId','onDelete':_0xfe3c('0x117')});db[_0xfe3c('0x4e')][_0xfe3c('0x11d')](db[_0xfe3c('0x17')],{'as':_0xfe3c('0x17f'),'onDelete':_0xfe3c('0x117')});db['FaxAccount'][_0xfe3c('0x11d')](db[_0xfe3c('0x180')],{'as':_0xfe3c('0x161')});db[_0xfe3c('0x4e')][_0xfe3c('0x12d')](db['Trunk'],{'as':'Trunk'});db['FaxAccount'][_0xfe3c('0x12d')](db[_0xfe3c('0x134')],{'as':'List','foreignKey':'ListId'});db[_0xfe3c('0x4e')]['belongsTo'](db[_0xfe3c('0x15a')],{'as':_0xfe3c('0x15b'),'foreignKey':_0xfe3c('0x15c')});db['FaxAccount'][_0xfe3c('0x133')](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x15e'),'through':'user_has_fax_accounts'});db[_0xfe3c('0x50')]['belongsTo'](db['User'],{'onDelete':_0xfe3c('0x169')});db[_0xfe3c('0x50')]['belongsTo'](db[_0xfe3c('0x54')],{'onDelete':'restrict'});db[_0xfe3c('0x50')][_0xfe3c('0x12d')](db[_0xfe3c('0x4e')],{'onDelete':_0xfe3c('0x169')});db['FaxApplication'][_0xfe3c('0x12d')](db['Tag'],{'onDelete':_0xfe3c('0x169'),'foreignKey':_0xfe3c('0x17b')});db[_0xfe3c('0x52')][_0xfe3c('0x11d')](db[_0xfe3c('0x180')],{'as':_0xfe3c('0x161'),'onDelete':_0xfe3c('0x117'),'foreignKey':'FaxInteractionId'});db['FaxInteraction'][_0xfe3c('0x12d')](db[_0xfe3c('0x4e')],{'as':_0xfe3c('0x178'),'foreignKey':_0xfe3c('0x17d')});db[_0xfe3c('0x52')]['belongsTo'](db[_0xfe3c('0x74')],{'as':'Contact','foreignKey':'ContactId'});db[_0xfe3c('0x52')]['belongsTo'](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x173'),'foreignKey':_0xfe3c('0x118')});db[_0xfe3c('0x52')]['belongsToMany'](db[_0xfe3c('0x91')],{'through':_0xfe3c('0x181'),'as':_0xfe3c('0x175')});db[_0xfe3c('0x52')][_0xfe3c('0x133')](db[_0xfe3c('0x91')],{'through':'fax_interaction_has_tags','as':'ThroughTags'});db['FaxInteraction'][_0xfe3c('0x133')](db['User'],{'as':_0xfe3c('0x176'),'through':'user_has_fax_interactions','foreignKey':_0xfe3c('0x182')});db['FaxMessage'][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{'onDelete':_0xfe3c('0x117'),'as':_0xfe3c('0x116')});db['FaxMessage'][_0xfe3c('0x12d')](db[_0xfe3c('0x52')],{'as':_0xfe3c('0x177'),'foreignKey':_0xfe3c('0x182')});db[_0xfe3c('0x180')][_0xfe3c('0x12d')](db[_0xfe3c('0x74')],{'onDelete':_0xfe3c('0x117'),'as':_0xfe3c('0x165')});db['FaxMessage'][_0xfe3c('0x12d')](db[_0xfe3c('0xf4')],{'as':_0xfe3c('0xf4'),'foreignKey':_0xfe3c('0x183')});db[_0xfe3c('0x180')]['belongsTo'](db[_0xfe3c('0x4e')],{'as':_0xfe3c('0x178'),'foreignKey':_0xfe3c('0x17d')});db['FaxQueue'][_0xfe3c('0x133')](db[_0xfe3c('0x116')],{'as':'Agents','through':_0xfe3c('0x35')});db[_0xfe3c('0x54')][_0xfe3c('0x133')](db[_0xfe3c('0xed')],{'through':_0xfe3c('0x184'),'as':_0xfe3c('0x171')});db['FaxQueueReport'][_0xfe3c('0x12d')](db[_0xfe3c('0x4e')],{});db['FaxQueueReport'][_0xfe3c('0x12d')](db[_0xfe3c('0x134')],{'as':_0xfe3c('0x16d'),'foreignKey':'ListId'});db[_0xfe3c('0x56')][_0xfe3c('0x12d')](db[_0xfe3c('0x74')],{'as':_0xfe3c('0x165'),'foreignKey':_0xfe3c('0x166')});db[_0xfe3c('0x56')][_0xfe3c('0x12d')](db[_0xfe3c('0x52')],{});db[_0xfe3c('0x56')]['belongsTo'](db[_0xfe3c('0x180')],{});db[_0xfe3c('0x56')][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{});db[_0xfe3c('0x56')][_0xfe3c('0x12d')](db['FaxQueue'],{});db[_0xfe3c('0x58')][_0xfe3c('0x11d')](db[_0xfe3c('0x84')],{'as':_0xfe3c('0x16b'),'foreignKey':'SmsAccountId','onDelete':_0xfe3c('0x117')});db[_0xfe3c('0x58')][_0xfe3c('0x11d')](db[_0xfe3c('0x82')],{'as':_0xfe3c('0x16c'),'foreignKey':'SmsAccountId'});db['SmsAccount'][_0xfe3c('0x11d')](db[_0xfe3c('0x185')],{'as':_0xfe3c('0x161'),'foreignKey':_0xfe3c('0x186')});db['SmsAccount']['hasMany'](db[_0xfe3c('0x123')],{'as':'Interactions'});db[_0xfe3c('0x58')]['hasMany'](db[_0xfe3c('0x5a')],{'as':_0xfe3c('0x150'),'foreignKey':'SmsAccountId','onDelete':_0xfe3c('0x117')});db[_0xfe3c('0x58')][_0xfe3c('0x12d')](db['CmList'],{'as':_0xfe3c('0x16d'),'foreignKey':_0xfe3c('0x16e')});db['SmsAccount'][_0xfe3c('0x12d')](db['Pause'],{'as':_0xfe3c('0x15b'),'foreignKey':_0xfe3c('0x15c')});db[_0xfe3c('0x58')]['belongsToMany'](db[_0xfe3c('0x116')],{'as':'Agents','through':_0xfe3c('0x14b')});db['SmsApplication']['belongsTo'](db[_0xfe3c('0x116')],{'onDelete':_0xfe3c('0x169')});db[_0xfe3c('0x5a')][_0xfe3c('0x12d')](db['SmsQueue'],{'onDelete':'restrict'});db[_0xfe3c('0x5a')][_0xfe3c('0x12d')](db[_0xfe3c('0x58')],{'onDelete':_0xfe3c('0x169')});db[_0xfe3c('0x5a')][_0xfe3c('0x12d')](db[_0xfe3c('0x88')],{'onDelete':_0xfe3c('0x169'),'foreignKey':_0xfe3c('0x17a')});db[_0xfe3c('0x5a')][_0xfe3c('0x12d')](db[_0xfe3c('0x91')],{'onDelete':'restrict','foreignKey':_0xfe3c('0x17b')});db[_0xfe3c('0x123')][_0xfe3c('0x11d')](db[_0xfe3c('0x185')],{'as':_0xfe3c('0x161'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x187')});db['SmsInteraction'][_0xfe3c('0x12d')](db[_0xfe3c('0x58')],{'as':_0xfe3c('0x178'),'foreignKey':_0xfe3c('0x186')});db[_0xfe3c('0x123')][_0xfe3c('0x12d')](db[_0xfe3c('0x74')],{'as':_0xfe3c('0x165'),'foreignKey':_0xfe3c('0x166')});db['SmsInteraction'][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x173'),'foreignKey':_0xfe3c('0x118')});db[_0xfe3c('0x123')][_0xfe3c('0x133')](db[_0xfe3c('0x91')],{'through':_0xfe3c('0x188'),'as':_0xfe3c('0x175')});db[_0xfe3c('0x123')]['belongsToMany'](db['Tag'],{'through':'sms_interaction_has_tags','as':'ThroughTags'});db[_0xfe3c('0x123')][_0xfe3c('0x133')](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x176'),'through':_0xfe3c('0x139'),'foreignKey':_0xfe3c('0x187')});db[_0xfe3c('0x185')]['belongsTo'](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x116')});db[_0xfe3c('0x185')][_0xfe3c('0x12d')](db[_0xfe3c('0x74')],{'onDelete':'cascade','as':_0xfe3c('0x165')});db[_0xfe3c('0x185')][_0xfe3c('0x12d')](db[_0xfe3c('0x123')],{'onDelete':'cascade','as':_0xfe3c('0x177'),'foreignKey':_0xfe3c('0x187')});db[_0xfe3c('0x185')][_0xfe3c('0x12d')](db['SmsAccount'],{'as':_0xfe3c('0x178'),'foreignKey':_0xfe3c('0x186')});db[_0xfe3c('0x5e')]['belongsToMany'](db[_0xfe3c('0x116')],{'as':'Agents','through':'UserSmsQueue','foreignKey':_0xfe3c('0x189')});db['SmsQueue'][_0xfe3c('0x133')](db[_0xfe3c('0xed')],{'through':_0xfe3c('0x18a'),'as':_0xfe3c('0x171')});db[_0xfe3c('0x148')][_0xfe3c('0x11d')](db['Disposition'],{'as':_0xfe3c('0x16b'),'foreignKey':_0xfe3c('0x18b'),'onDelete':_0xfe3c('0x117')});db[_0xfe3c('0x148')]['hasMany'](db[_0xfe3c('0x82')],{'as':_0xfe3c('0x16c'),'foreignKey':_0xfe3c('0x18b')});db[_0xfe3c('0x148')]['hasMany'](db[_0xfe3c('0x120')],{'as':_0xfe3c('0x17e'),'foreignKey':_0xfe3c('0x18b')});db['OpenchannelAccount'][_0xfe3c('0x11d')](db['OpenchannelMessage'],{'as':_0xfe3c('0x161'),'foreignKey':'OpenchannelAccountId'});db[_0xfe3c('0x148')][_0xfe3c('0x11d')](db[_0xfe3c('0x60')],{'as':_0xfe3c('0x150'),'foreignKey':'OpenchannelAccountId','onDelete':_0xfe3c('0x117')});db['OpenchannelAccount'][_0xfe3c('0x12d')](db[_0xfe3c('0x134')],{'as':_0xfe3c('0x16d'),'foreignKey':_0xfe3c('0x16e')});db[_0xfe3c('0x148')][_0xfe3c('0x12d')](db[_0xfe3c('0x15a')],{'as':_0xfe3c('0x15b'),'foreignKey':_0xfe3c('0x15c')});db[_0xfe3c('0x148')][_0xfe3c('0x133')](db['User'],{'as':_0xfe3c('0x15e'),'through':_0xfe3c('0x18c')});db[_0xfe3c('0x60')]['belongsTo'](db['User'],{'onDelete':_0xfe3c('0x169')});db[_0xfe3c('0x60')]['belongsTo'](db[_0xfe3c('0x63')],{'onDelete':'restrict','foreignKey':_0xfe3c('0x18d')});db[_0xfe3c('0x60')][_0xfe3c('0x12d')](db['OpenchannelAccount'],{'onDelete':_0xfe3c('0x169'),'foreignKey':_0xfe3c('0x18b')});db[_0xfe3c('0x60')][_0xfe3c('0x12d')](db['Interval'],{'onDelete':'restrict','foreignKey':_0xfe3c('0x17a')});db[_0xfe3c('0x60')][_0xfe3c('0x12d')](db[_0xfe3c('0x91')],{'onDelete':'restrict','foreignKey':_0xfe3c('0x17b')});db[_0xfe3c('0x120')][_0xfe3c('0x11d')](db['OpenchannelMessage'],{'as':'Messages','onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x18e')});db[_0xfe3c('0x120')]['belongsTo'](db[_0xfe3c('0x148')],{'as':_0xfe3c('0x178'),'foreignKey':_0xfe3c('0x18b')});db['OpenchannelInteraction'][_0xfe3c('0x12d')](db['CmContact'],{'as':_0xfe3c('0x165'),'foreignKey':_0xfe3c('0x166')});db[_0xfe3c('0x120')]['belongsTo'](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x173'),'foreignKey':'UserId'});db[_0xfe3c('0x120')][_0xfe3c('0x133')](db['Tag'],{'through':_0xfe3c('0x18f'),'as':_0xfe3c('0x175')});db[_0xfe3c('0x120')][_0xfe3c('0x133')](db[_0xfe3c('0x91')],{'through':_0xfe3c('0x18f'),'as':_0xfe3c('0x190')});db[_0xfe3c('0x120')][_0xfe3c('0x133')](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x176'),'through':'user_has_openchannel_interactions','foreignKey':_0xfe3c('0x18e')});db[_0xfe3c('0x191')]['belongsTo'](db[_0xfe3c('0x116')],{'onDelete':'cascade','as':_0xfe3c('0x116')});db['OpenchannelMessage']['belongsTo'](db['CmContact'],{'onDelete':_0xfe3c('0x117'),'as':_0xfe3c('0x165')});db[_0xfe3c('0x191')][_0xfe3c('0x12d')](db['OpenchannelInteraction'],{'onDelete':_0xfe3c('0x117'),'as':_0xfe3c('0x177'),'foreignKey':_0xfe3c('0x18e')});db[_0xfe3c('0x191')]['belongsTo'](db[_0xfe3c('0xf4')],{'as':_0xfe3c('0xf4'),'foreignKey':_0xfe3c('0x183')});db[_0xfe3c('0x191')]['belongsTo'](db[_0xfe3c('0x148')],{'as':_0xfe3c('0x178'),'foreignKey':'OpenchannelAccountId'});db[_0xfe3c('0x63')][_0xfe3c('0x133')](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x15e'),'through':_0xfe3c('0x192'),'foreignKey':_0xfe3c('0x18d')});db[_0xfe3c('0x63')]['belongsToMany'](db['Team'],{'through':_0xfe3c('0x193'),'as':_0xfe3c('0x171')});db[_0xfe3c('0x64')][_0xfe3c('0x11d')](db[_0xfe3c('0x84')],{'as':_0xfe3c('0x16b'),'foreignKey':_0xfe3c('0x179'),'onDelete':_0xfe3c('0x117')});db[_0xfe3c('0x64')][_0xfe3c('0x11d')](db[_0xfe3c('0x82')],{'as':_0xfe3c('0x16c'),'foreignKey':_0xfe3c('0x179')});db[_0xfe3c('0x64')][_0xfe3c('0x11d')](db['ChatProactiveAction'],{'as':'ProactiveActions'});db[_0xfe3c('0x64')][_0xfe3c('0x11d')](db[_0xfe3c('0x69')],{'as':_0xfe3c('0x17e')});db[_0xfe3c('0x64')][_0xfe3c('0x11d')](db[_0xfe3c('0x68')],{'as':_0xfe3c('0x150'),'foreignKey':_0xfe3c('0x179'),'onDelete':_0xfe3c('0x117')});db[_0xfe3c('0x64')]['hasMany'](db[_0xfe3c('0x194')],{'as':_0xfe3c('0x161')});db[_0xfe3c('0x64')][_0xfe3c('0x12d')](db[_0xfe3c('0x134')],{'as':_0xfe3c('0x16d'),'foreignKey':'ListId'});db[_0xfe3c('0x64')][_0xfe3c('0x12d')](db[_0xfe3c('0x88')],{'as':_0xfe3c('0x88'),'foreignKey':'IntervalId'});db[_0xfe3c('0x64')][_0xfe3c('0x12d')](db['MailAccount'],{'as':_0xfe3c('0x3e'),'foreignKey':_0xfe3c('0x167')});db[_0xfe3c('0x64')][_0xfe3c('0x12d')](db[_0xfe3c('0x15a')],{'as':_0xfe3c('0x15b'),'foreignKey':_0xfe3c('0x15c')});db[_0xfe3c('0x64')][_0xfe3c('0x133')](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x15e'),'through':_0xfe3c('0x145')});db['OpenchannelQueueReport'][_0xfe3c('0x12d')](db[_0xfe3c('0x148')],{});db['OpenchannelQueueReport'][_0xfe3c('0x12d')](db['CmList'],{'as':'List','foreignKey':'ListId'});db['OpenchannelQueueReport'][_0xfe3c('0x12d')](db[_0xfe3c('0x74')],{'as':'Contact','foreignKey':'ContactId'});db[_0xfe3c('0x66')]['belongsTo'](db['OpenchannelInteraction'],{});db[_0xfe3c('0x66')]['belongsTo'](db[_0xfe3c('0x191')],{});db[_0xfe3c('0x66')][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{});db[_0xfe3c('0x66')]['belongsTo'](db[_0xfe3c('0x63')],{});db[_0xfe3c('0x68')][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x195'),'foreignKey':_0xfe3c('0x118'),'onDelete':_0xfe3c('0x169')});db['ChatApplication']['belongsTo'](db[_0xfe3c('0x6d')],{'as':_0xfe3c('0x196'),'foreignKey':'ChatQueueId','onDelete':'restrict'});db['ChatApplication'][_0xfe3c('0x12d')](db[_0xfe3c('0x64')],{'as':_0xfe3c('0x197'),'foreignKey':_0xfe3c('0x179'),'onDelete':_0xfe3c('0x169')});db[_0xfe3c('0x68')][_0xfe3c('0x12d')](db[_0xfe3c('0x91')],{'onDelete':_0xfe3c('0x169'),'foreignKey':'TagId'});db['ChatInteraction']['hasMany'](db[_0xfe3c('0x194')],{'as':_0xfe3c('0x161'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x198')});db['ChatInteraction']['belongsTo'](db[_0xfe3c('0x64')],{'as':_0xfe3c('0x178'),'foreignKey':_0xfe3c('0x179')});db[_0xfe3c('0x69')][_0xfe3c('0x12d')](db[_0xfe3c('0x74')],{'as':_0xfe3c('0x165'),'foreignKey':'ContactId'});db['ChatInteraction']['belongsTo'](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x173'),'foreignKey':_0xfe3c('0x118')});db[_0xfe3c('0x69')]['belongsToMany'](db['Tag'],{'through':_0xfe3c('0x199'),'as':_0xfe3c('0x175')});db[_0xfe3c('0x69')][_0xfe3c('0x133')](db[_0xfe3c('0x91')],{'through':_0xfe3c('0x199'),'as':_0xfe3c('0x190')});db['ChatInteraction'][_0xfe3c('0x133')](db['User'],{'as':_0xfe3c('0x176'),'through':_0xfe3c('0x19a'),'foreignKey':_0xfe3c('0x198')});db[_0xfe3c('0x194')][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{'onDelete':_0xfe3c('0x117'),'as':'User'});db[_0xfe3c('0x194')][_0xfe3c('0x12d')](db[_0xfe3c('0x74')],{'onDelete':_0xfe3c('0x117'),'as':'Contact','foreignKey':_0xfe3c('0x166')});db['ChatMessage'][_0xfe3c('0x12d')](db[_0xfe3c('0x69')],{'onDelete':_0xfe3c('0x117'),'as':_0xfe3c('0x177'),'foreignKey':_0xfe3c('0x198')});db[_0xfe3c('0x194')][_0xfe3c('0x12d')](db[_0xfe3c('0xf4')],{'as':_0xfe3c('0xf4'),'foreignKey':_0xfe3c('0x183')});db['ChatMessage'][_0xfe3c('0x12d')](db[_0xfe3c('0x64')],{'as':_0xfe3c('0x178'),'foreignKey':'ChatWebsiteId'});db[_0xfe3c('0x6b')]['hasMany'](db['Attachment'],{'as':_0xfe3c('0x19b'),'foreignKey':_0xfe3c('0x19c'),'onDelete':_0xfe3c('0x117'),'hooks':!![]});db['ChatOfflineMessage'][_0xfe3c('0x12d')](db[_0xfe3c('0x74')],{'onDelete':_0xfe3c('0x117'),'as':_0xfe3c('0x165'),'foreignKey':_0xfe3c('0x166')});db[_0xfe3c('0x6b')]['belongsTo'](db[_0xfe3c('0x64')],{'as':_0xfe3c('0x178'),'foreignKey':_0xfe3c('0x179')});db['ChatQueue'][_0xfe3c('0x133')](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x15e'),'through':'UserChatQueue','hooks':!![]});db[_0xfe3c('0x6d')][_0xfe3c('0x133')](db[_0xfe3c('0xed')],{'through':_0xfe3c('0x19d'),'as':_0xfe3c('0x171')});db[_0xfe3c('0x6e')][_0xfe3c('0x11d')](db[_0xfe3c('0x19e')],{'as':_0xfe3c('0x161'),'foreignKey':_0xfe3c('0x19f'),'onDelete':_0xfe3c('0x117')});db['ChatGroup'][_0xfe3c('0x133')](db['User'],{'as':_0xfe3c('0x153'),'through':'chat_group_has_users'});db['ChatProactiveAction'][_0xfe3c('0x12d')](db[_0xfe3c('0x64')],{'as':'Website','foreignKey':_0xfe3c('0x179')});db[_0xfe3c('0x72')]['hasMany'](db['CmContact'],{'as':_0xfe3c('0x131'),'foreignKey':'CompanyId'});db['CmContact'][_0xfe3c('0x11d')](db['CmContactHasItem'],{'as':_0xfe3c('0x1a0'),'foreignKey':_0xfe3c('0x1a1')});db['CmContact'][_0xfe3c('0x11d')](db['CmHopper'],{'as':_0xfe3c('0x12b'),'foreignKey':_0xfe3c('0x166')});db[_0xfe3c('0x74')][_0xfe3c('0x11d')](db[_0xfe3c('0x79')],{'as':'HopperFinals','foreignKey':_0xfe3c('0x166')});db[_0xfe3c('0x74')]['hasMany'](db[_0xfe3c('0x7b')],{'as':'HopperHistories','foreignKey':_0xfe3c('0x166')});db[_0xfe3c('0x74')][_0xfe3c('0x11d')](db[_0xfe3c('0x7d')],{'as':'ReportAgentPreview','foreignKey':_0xfe3c('0x166')});db['CmContact'][_0xfe3c('0x11d')](db[_0xfe3c('0x156')],{'as':_0xfe3c('0x157'),'foreignKey':_0xfe3c('0x166')});db[_0xfe3c('0x74')]['hasMany'](db[_0xfe3c('0x120')],{'as':_0xfe3c('0x121'),'foreignKey':_0xfe3c('0x166'),'onDelete':_0xfe3c('0x169')});db[_0xfe3c('0x74')][_0xfe3c('0x11d')](db['ChatInteraction'],{'as':_0xfe3c('0x122'),'foreignKey':_0xfe3c('0x166'),'onDelete':'restrict'});db[_0xfe3c('0x74')][_0xfe3c('0x11d')](db[_0xfe3c('0x123')],{'as':_0xfe3c('0x124'),'foreignKey':_0xfe3c('0x166'),'onDelete':_0xfe3c('0x169')});db[_0xfe3c('0x74')][_0xfe3c('0x11d')](db[_0xfe3c('0x52')],{'as':_0xfe3c('0x125'),'foreignKey':_0xfe3c('0x166'),'onDelete':_0xfe3c('0x169')});db['CmContact'][_0xfe3c('0x11d')](db[_0xfe3c('0x44')],{'as':_0xfe3c('0x137'),'foreignKey':_0xfe3c('0x166'),'onDelete':_0xfe3c('0x169')});db[_0xfe3c('0x74')]['belongsTo'](db['CmCompany'],{'as':_0xfe3c('0x1a2'),'foreignKey':_0xfe3c('0x1a3')});db[_0xfe3c('0x74')][_0xfe3c('0x12d')](db[_0xfe3c('0x134')],{'as':_0xfe3c('0x16d'),'foreignKey':_0xfe3c('0x16e'),'onDelete':'cascade'});db[_0xfe3c('0x74')][_0xfe3c('0x133')](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x176'),'through':_0xfe3c('0x132')});db[_0xfe3c('0x74')][_0xfe3c('0x133')](db[_0xfe3c('0x91')],{'as':'Tags','through':_0xfe3c('0x1a4')});db[_0xfe3c('0x74')][_0xfe3c('0x133')](db['Tag'],{'through':'cm_contact_has_tags','as':_0xfe3c('0x190')});db[_0xfe3c('0x12a')][_0xfe3c('0x11d')](db[_0xfe3c('0x97')],{'as':'AdditionalPhones','foreignKey':_0xfe3c('0x1a5')});db[_0xfe3c('0x12a')][_0xfe3c('0x12d')](db[_0xfe3c('0x74')],{'as':_0xfe3c('0x165'),'foreignKey':_0xfe3c('0x166'),'onDelete':_0xfe3c('0x117')});db['CmHopper']['belongsTo'](db[_0xfe3c('0x134')],{'as':_0xfe3c('0x16d'),'foreignKey':'ListId','onDelete':_0xfe3c('0x117')});db[_0xfe3c('0x12a')][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x195'),'foreignKey':_0xfe3c('0x118')});db[_0xfe3c('0x12a')][_0xfe3c('0x12d')](db['VoiceQueue'],{'as':_0xfe3c('0x196'),'foreignKey':_0xfe3c('0x154'),'onDelete':'cascade'});db[_0xfe3c('0x12a')]['belongsTo'](db[_0xfe3c('0xf0')],{'as':_0xfe3c('0xf0'),'foreignKey':_0xfe3c('0x1a6'),'onDelete':_0xfe3c('0x117')});db[_0xfe3c('0x12a')]['belongsTo'](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x173'),'foreignKey':_0xfe3c('0x1a7')});db[_0xfe3c('0x77')]['belongsTo'](db[_0xfe3c('0x74')],{'as':_0xfe3c('0x165'),'foreignKey':'ContactId','onDelete':_0xfe3c('0x117')});db[_0xfe3c('0x77')][_0xfe3c('0x12d')](db[_0xfe3c('0x134')],{'as':'List','foreignKey':_0xfe3c('0x16e'),'onDelete':_0xfe3c('0x117')});db[_0xfe3c('0x77')]['belongsTo'](db[_0xfe3c('0x19')],{'as':_0xfe3c('0x196'),'foreignKey':_0xfe3c('0x154'),'onDelete':'cascade'});db[_0xfe3c('0x77')]['belongsTo'](db[_0xfe3c('0xf0')],{'as':_0xfe3c('0xf0'),'foreignKey':_0xfe3c('0x1a6'),'onDelete':'cascade'});db[_0xfe3c('0x81')][_0xfe3c('0x11d')](db['Condition'],{'as':{'plural':_0xfe3c('0x1a8'),'singular':_0xfe3c('0x1a9')},'foreignKey':_0xfe3c('0x1aa'),'onDelete':'cascade','hooks':!![]});db[_0xfe3c('0x81')][_0xfe3c('0x11d')](db[_0xfe3c('0x86')],{'as':{'plural':_0xfe3c('0x1ab'),'singular':'OneAny'},'foreignKey':_0xfe3c('0x1ac'),'onDelete':'cascade','hooks':!![]});db[_0xfe3c('0x81')]['hasMany'](db[_0xfe3c('0x1ad')],{'as':'Actions','foreignKey':_0xfe3c('0x1ae'),'onDelete':_0xfe3c('0x117'),'hooks':!![]});db[_0xfe3c('0x84')]['hasMany'](db[_0xfe3c('0x84')],{'as':_0xfe3c('0x16b'),'foreignKey':_0xfe3c('0x1af'),'onDelete':_0xfe3c('0x117')});db[_0xfe3c('0x88')]['hasMany'](db[_0xfe3c('0x88')],{'as':_0xfe3c('0x1b0'),'foreignKey':_0xfe3c('0x17a'),'onDelete':'cascade','hooks':!![],'required':![]});db['Interval'][_0xfe3c('0x11d')](db['VoiceExtension'],{'as':'Extensions','foreignKey':_0xfe3c('0x17a'),'onDelete':_0xfe3c('0x169')});db[_0xfe3c('0x88')][_0xfe3c('0x11d')](db['MailApplication'],{'as':_0xfe3c('0x1b1'),'foreignKey':_0xfe3c('0x17a')});db[_0xfe3c('0x88')]['hasMany'](db[_0xfe3c('0x68')],{'as':_0xfe3c('0x1b2'),'foreignKey':_0xfe3c('0x17a')});db[_0xfe3c('0x88')]['hasMany'](db[_0xfe3c('0x50')],{'as':_0xfe3c('0x1b3'),'foreignKey':_0xfe3c('0x17a')});db[_0xfe3c('0x88')]['hasMany'](db[_0xfe3c('0x5a')],{'as':_0xfe3c('0x1b4'),'foreignKey':_0xfe3c('0x17a')});db[_0xfe3c('0x8e')][_0xfe3c('0x12d')](db['MailAccount'],{});db[_0xfe3c('0x8e')][_0xfe3c('0x12d')](db[_0xfe3c('0xa4')],{'foreignKey':_0xfe3c('0x1b5')});db[_0xfe3c('0x8e')][_0xfe3c('0x12d')](db[_0xfe3c('0xa2')],{'foreignKey':_0xfe3c('0x1b6')});db[_0xfe3c('0x90')][_0xfe3c('0x133')](db[_0xfe3c('0x1b7')],{'as':'Mohs','through':'moh_has_sounds','onDelete':_0xfe3c('0x169')});db['Tag']['belongsToMany'](db[_0xfe3c('0x74')],{'through':_0xfe3c('0x1a4')});db[_0xfe3c('0x91')][_0xfe3c('0x133')](db['ChatInteraction'],{'through':_0xfe3c('0x199')});db[_0xfe3c('0x91')][_0xfe3c('0x133')](db[_0xfe3c('0x44')],{'through':'mail_interaction_has_tags'});db[_0xfe3c('0x91')]['belongsToMany'](db['SmsInteraction'],{'through':_0xfe3c('0x188')});db['Tag'][_0xfe3c('0x133')](db['FaxInteraction'],{'through':_0xfe3c('0x181')});db[_0xfe3c('0x91')]['belongsToMany'](db[_0xfe3c('0x120')],{'through':'openchannel_interaction_has_tags'});db[_0xfe3c('0x91')][_0xfe3c('0x133')](db[_0xfe3c('0x126')],{'through':_0xfe3c('0x1b8')});db[_0xfe3c('0x95')][_0xfe3c('0x12d')](db[_0xfe3c('0x93')],{'as':'ItemType','foreignKey':_0xfe3c('0x1b9')});db['CmHopperAdditionalPhone'][_0xfe3c('0x12d')](db[_0xfe3c('0x12a')],{'as':_0xfe3c('0x1ba'),'foreignKey':_0xfe3c('0x1a5')});db[_0xfe3c('0x95')][_0xfe3c('0x12d')](db[_0xfe3c('0x74')],{'as':_0xfe3c('0x165'),'foreignKey':_0xfe3c('0x1a1')});db[_0xfe3c('0x9b')][_0xfe3c('0x11d')](db['Condition'],{'as':{'plural':'AllConditions','singular':_0xfe3c('0x1bb')},'foreignKey':'TriggerAllId','onDelete':_0xfe3c('0x117'),'hooks':!![]});db[_0xfe3c('0x9b')][_0xfe3c('0x11d')](db['Condition'],{'as':{'plural':_0xfe3c('0x1bc'),'singular':_0xfe3c('0x1bd')},'foreignKey':_0xfe3c('0x1be'),'onDelete':'cascade','hooks':!![]});db['Trigger'][_0xfe3c('0x11d')](db[_0xfe3c('0x1ad')],{'as':'Actions','foreignKey':_0xfe3c('0x1bf'),'onDelete':_0xfe3c('0x117'),'hooks':!![]});db['AnalyticCustomReport']['hasMany'](db[_0xfe3c('0xa9')],{'as':_0xfe3c('0x1c0'),'onDelete':'cascade','foreignKey':_0xfe3c('0x1b6'),'hooks':!![]});db[_0xfe3c('0xa4')][_0xfe3c('0x11d')](db[_0xfe3c('0xa9')],{'as':_0xfe3c('0x1c0'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1b5')});db[_0xfe3c('0xa8')][_0xfe3c('0x11d')](db['AnalyticFieldReport'],{'as':_0xfe3c('0x1c0'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1c1')});db[_0xfe3c('0xa9')][_0xfe3c('0x12d')](db[_0xfe3c('0xa8')],{'foreignKey':_0xfe3c('0x1c1')});db['SalesforceAccount'][_0xfe3c('0x11d')](db[_0xfe3c('0xae')],{'as':_0xfe3c('0x1c2'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1c3')});db['SalesforceConfiguration'][_0xfe3c('0x11d')](db[_0xfe3c('0xb0')],{'as':_0xfe3c('0x1c4'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1c5')});db[_0xfe3c('0xae')][_0xfe3c('0x11d')](db[_0xfe3c('0xb0')],{'as':'Descriptions','onDelete':'cascade','foreignKey':_0xfe3c('0x1c6')});db[_0xfe3c('0xae')]['hasMany'](db[_0xfe3c('0xb0')],{'as':_0xfe3c('0x1c0'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1c7')});db[_0xfe3c('0xae')][_0xfe3c('0x12d')](db[_0xfe3c('0xad')],{'as':_0xfe3c('0x178'),'foreignKey':_0xfe3c('0x1c3')});db['SalesforceField'][_0xfe3c('0x11d')](db[_0xfe3c('0xb0')],{'as':_0xfe3c('0x1c8'),'foreignKey':_0xfe3c('0x1c5')});db[_0xfe3c('0xb0')][_0xfe3c('0x11d')](db[_0xfe3c('0xb0')],{'as':'Description','foreignKey':'DescriptionId'});db['SalesforceField'][_0xfe3c('0x11d')](db[_0xfe3c('0xb0')],{'as':_0xfe3c('0x1c9'),'foreignKey':_0xfe3c('0x1c7')});db[_0xfe3c('0xb0')][_0xfe3c('0x12d')](db[_0xfe3c('0x1ca')],{'as':_0xfe3c('0x1ca'),'foreignKey':_0xfe3c('0x1cb')});db[_0xfe3c('0xb2')][_0xfe3c('0x11d')](db[_0xfe3c('0xb4')],{'as':_0xfe3c('0x1c2'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1c3')});db['SugarcrmConfiguration'][_0xfe3c('0x11d')](db[_0xfe3c('0xb6')],{'as':'Subjects','onDelete':_0xfe3c('0x117'),'foreignKey':'SubjectId'});db[_0xfe3c('0xb4')][_0xfe3c('0x11d')](db[_0xfe3c('0xb6')],{'as':_0xfe3c('0x1cc'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1c6')});db[_0xfe3c('0xb4')][_0xfe3c('0x11d')](db[_0xfe3c('0xb6')],{'as':_0xfe3c('0x1c0'),'onDelete':_0xfe3c('0x117'),'foreignKey':'FieldId'});db[_0xfe3c('0xb4')]['belongsTo'](db[_0xfe3c('0xb2')],{'as':_0xfe3c('0x178'),'foreignKey':'AccountId'});db[_0xfe3c('0xb6')][_0xfe3c('0x11d')](db[_0xfe3c('0xb6')],{'as':_0xfe3c('0x1c8'),'foreignKey':_0xfe3c('0x1c5')});db[_0xfe3c('0xb6')][_0xfe3c('0x11d')](db[_0xfe3c('0xb6')],{'as':_0xfe3c('0x1cd'),'foreignKey':_0xfe3c('0x1c6')});db[_0xfe3c('0xb6')]['hasMany'](db['SugarcrmField'],{'as':_0xfe3c('0x1c9'),'foreignKey':_0xfe3c('0x1c7')});db['SugarcrmField'][_0xfe3c('0x12d')](db['Variable'],{'as':_0xfe3c('0x1ca'),'foreignKey':_0xfe3c('0x1cb')});db[_0xfe3c('0x1ce')][_0xfe3c('0x11d')](db[_0xfe3c('0xb8')],{'as':_0xfe3c('0x1c2'),'onDelete':'cascade','foreignKey':'AccountId'});db[_0xfe3c('0xb8')]['hasMany'](db[_0xfe3c('0xba')],{'as':'Subjects','onDelete':'cascade','foreignKey':_0xfe3c('0x1c5')});db['DeskConfiguration'][_0xfe3c('0x11d')](db[_0xfe3c('0xba')],{'as':_0xfe3c('0x1cc'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1c6')});db[_0xfe3c('0xb8')][_0xfe3c('0x11d')](db[_0xfe3c('0xba')],{'as':_0xfe3c('0x1c0'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1c7')});db[_0xfe3c('0xb8')]['belongsTo'](db[_0xfe3c('0x1ce')],{'as':_0xfe3c('0x178'),'foreignKey':_0xfe3c('0x1c3')});db[_0xfe3c('0xb8')][_0xfe3c('0x133')](db[_0xfe3c('0x91')],{'through':'int_desk_configuration_has_tags'});db[_0xfe3c('0xba')]['hasMany'](db[_0xfe3c('0xba')],{'as':_0xfe3c('0x1c8'),'foreignKey':'SubjectId'});db['DeskField']['hasMany'](db[_0xfe3c('0xba')],{'as':_0xfe3c('0x1cd'),'foreignKey':_0xfe3c('0x1c6')});db[_0xfe3c('0xba')][_0xfe3c('0x11d')](db[_0xfe3c('0xba')],{'as':_0xfe3c('0x1c9'),'foreignKey':_0xfe3c('0x1c7')});db['DeskField']['belongsTo'](db['Variable'],{'as':_0xfe3c('0x1ca'),'foreignKey':_0xfe3c('0x1cb')});db['ZohoAccount']['hasMany'](db[_0xfe3c('0x1cf')],{'as':'Configurations','onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1c3')});db[_0xfe3c('0x1cf')][_0xfe3c('0x11d')](db[_0xfe3c('0xbf')],{'as':_0xfe3c('0x1c4'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1c5')});db['ZohoConfiguration']['hasMany'](db['ZohoField'],{'as':'Descriptions','onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1c6')});db['ZohoConfiguration'][_0xfe3c('0x11d')](db[_0xfe3c('0xbf')],{'as':'Fields','onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1c7')});db[_0xfe3c('0x1cf')]['belongsTo'](db[_0xfe3c('0xbc')],{'as':_0xfe3c('0x178'),'foreignKey':'AccountId'});db['ZohoField'][_0xfe3c('0x11d')](db[_0xfe3c('0xbf')],{'as':_0xfe3c('0x1c8'),'foreignKey':_0xfe3c('0x1c5')});db[_0xfe3c('0xbf')][_0xfe3c('0x11d')](db[_0xfe3c('0xbf')],{'as':_0xfe3c('0x1cd'),'foreignKey':_0xfe3c('0x1c6')});db[_0xfe3c('0xbf')][_0xfe3c('0x11d')](db[_0xfe3c('0xbf')],{'as':_0xfe3c('0x1c9'),'foreignKey':_0xfe3c('0x1c7')});db[_0xfe3c('0xbf')]['belongsTo'](db[_0xfe3c('0x1ca')],{'as':_0xfe3c('0x1ca'),'foreignKey':_0xfe3c('0x1cb')});db[_0xfe3c('0xc1')][_0xfe3c('0x11d')](db[_0xfe3c('0xc2')],{'as':_0xfe3c('0x1c2'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1c3')});db[_0xfe3c('0xc2')]['hasMany'](db['ZendeskField'],{'as':_0xfe3c('0x1c4'),'foreignKey':_0xfe3c('0x1c5')});db[_0xfe3c('0xc2')][_0xfe3c('0x11d')](db['ZendeskField'],{'as':_0xfe3c('0x1cc'),'foreignKey':_0xfe3c('0x1c6')});db[_0xfe3c('0xc2')][_0xfe3c('0x11d')](db[_0xfe3c('0xc4')],{'as':_0xfe3c('0x1c0'),'foreignKey':_0xfe3c('0x1c7')});db[_0xfe3c('0xc2')][_0xfe3c('0x12d')](db[_0xfe3c('0xc1')],{'as':_0xfe3c('0x178'),'foreignKey':_0xfe3c('0x1c3')});db['ZendeskConfiguration'][_0xfe3c('0x133')](db['Tag'],{'through':_0xfe3c('0x1d0')});db[_0xfe3c('0xc4')][_0xfe3c('0x11d')](db[_0xfe3c('0xc4')],{'as':_0xfe3c('0x1c8'),'foreignKey':'SubjectId'});db[_0xfe3c('0xc4')][_0xfe3c('0x11d')](db[_0xfe3c('0xc4')],{'as':'Description','foreignKey':_0xfe3c('0x1c6')});db[_0xfe3c('0xc4')][_0xfe3c('0x11d')](db[_0xfe3c('0xc4')],{'as':_0xfe3c('0x1c9'),'foreignKey':_0xfe3c('0x1c7')});db[_0xfe3c('0xc4')][_0xfe3c('0x12d')](db['Variable'],{'as':_0xfe3c('0x1ca'),'foreignKey':'VariableId'});db[_0xfe3c('0xc5')][_0xfe3c('0x11d')](db[_0xfe3c('0x1d1')],{'as':_0xfe3c('0x1c2'),'onDelete':'cascade','foreignKey':_0xfe3c('0x1c3')});db[_0xfe3c('0x1d1')][_0xfe3c('0x11d')](db[_0xfe3c('0xc8')],{'as':_0xfe3c('0x1c4'),'onDelete':'cascade','foreignKey':_0xfe3c('0x1c5')});db[_0xfe3c('0x1d1')][_0xfe3c('0x11d')](db['FreshdeskField'],{'as':_0xfe3c('0x1cc'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1c6')});db[_0xfe3c('0x1d1')][_0xfe3c('0x11d')](db['FreshdeskField'],{'as':_0xfe3c('0x1c0'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1c7')});db[_0xfe3c('0x1d1')][_0xfe3c('0x12d')](db[_0xfe3c('0xc5')],{'as':_0xfe3c('0x178'),'foreignKey':_0xfe3c('0x1c3')});db[_0xfe3c('0x1d1')][_0xfe3c('0x133')](db['Tag'],{'through':_0xfe3c('0x1d2')});db[_0xfe3c('0xc8')]['hasMany'](db['FreshdeskField'],{'as':_0xfe3c('0x1c8'),'foreignKey':_0xfe3c('0x1c5')});db['FreshdeskField'][_0xfe3c('0x11d')](db[_0xfe3c('0xc8')],{'as':_0xfe3c('0x1cd'),'foreignKey':_0xfe3c('0x1c6')});db['FreshdeskField'][_0xfe3c('0x11d')](db[_0xfe3c('0xc8')],{'as':_0xfe3c('0x1c9'),'foreignKey':_0xfe3c('0x1c7')});db[_0xfe3c('0xc8')][_0xfe3c('0x12d')](db[_0xfe3c('0x1ca')],{'as':_0xfe3c('0x1ca'),'foreignKey':_0xfe3c('0x1cb')});db[_0xfe3c('0x1d3')]['hasMany'](db[_0xfe3c('0xcb')],{'as':_0xfe3c('0x1c2'),'onDelete':'cascade','foreignKey':_0xfe3c('0x1c3')});db[_0xfe3c('0xcb')][_0xfe3c('0x11d')](db[_0xfe3c('0xcd')],{'as':_0xfe3c('0x1c4'),'foreignKey':_0xfe3c('0x1c5')});db[_0xfe3c('0xcb')][_0xfe3c('0x11d')](db['VtigerField'],{'as':_0xfe3c('0x1cc'),'foreignKey':'DescriptionId'});db[_0xfe3c('0xcb')][_0xfe3c('0x11d')](db[_0xfe3c('0xcd')],{'as':'Fields','foreignKey':_0xfe3c('0x1c7')});db[_0xfe3c('0xcb')][_0xfe3c('0x12d')](db[_0xfe3c('0x1d3')],{'as':_0xfe3c('0x178'),'foreignKey':_0xfe3c('0x1c3')});db['VtigerField'][_0xfe3c('0x11d')](db[_0xfe3c('0xcd')],{'as':_0xfe3c('0x1c8'),'foreignKey':_0xfe3c('0x1c5')});db[_0xfe3c('0xcd')]['hasMany'](db[_0xfe3c('0xcd')],{'as':_0xfe3c('0x1cd'),'foreignKey':_0xfe3c('0x1c6')});db['VtigerField'][_0xfe3c('0x11d')](db['VtigerField'],{'as':'Field','foreignKey':'FieldId'});db[_0xfe3c('0xcd')][_0xfe3c('0x12d')](db[_0xfe3c('0x1ca')],{'as':_0xfe3c('0x1ca'),'foreignKey':_0xfe3c('0x1cb')});db[_0xfe3c('0xcf')][_0xfe3c('0x11d')](db[_0xfe3c('0x1d4')],{'as':'Configurations','onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1c3')});db[_0xfe3c('0x1d4')][_0xfe3c('0x11d')](db['ServicenowField'],{'as':_0xfe3c('0x1c4'),'foreignKey':_0xfe3c('0x1c5')});db[_0xfe3c('0x1d4')][_0xfe3c('0x11d')](db[_0xfe3c('0x1d5')],{'as':_0xfe3c('0x1cc'),'foreignKey':_0xfe3c('0x1c6')});db['ServicenowConfiguration'][_0xfe3c('0x11d')](db[_0xfe3c('0x1d5')],{'as':_0xfe3c('0x1c0'),'foreignKey':_0xfe3c('0x1c7')});db['ServicenowConfiguration']['belongsTo'](db[_0xfe3c('0xcf')],{'as':_0xfe3c('0x178'),'foreignKey':'AccountId'});db[_0xfe3c('0x1d5')][_0xfe3c('0x11d')](db[_0xfe3c('0x1d5')],{'as':'Subject','foreignKey':_0xfe3c('0x1c5')});db[_0xfe3c('0x1d5')]['hasMany'](db[_0xfe3c('0x1d5')],{'as':_0xfe3c('0x1cd'),'foreignKey':'DescriptionId'});db[_0xfe3c('0x1d5')]['hasMany'](db[_0xfe3c('0x1d5')],{'as':_0xfe3c('0x1c9'),'foreignKey':'FieldId'});db[_0xfe3c('0x1d5')]['belongsTo'](db[_0xfe3c('0x1ca')],{'as':_0xfe3c('0x1ca'),'foreignKey':'VariableId'});db[_0xfe3c('0x1d6')][_0xfe3c('0x11d')](db[_0xfe3c('0xd2')],{'as':_0xfe3c('0x1c2'),'onDelete':_0xfe3c('0x117'),'foreignKey':'AccountId'});db[_0xfe3c('0x1d6')][_0xfe3c('0x12d')](db[_0xfe3c('0x10c')],{'as':'CloudProvider','foreignKey':_0xfe3c('0x168')});db[_0xfe3c('0xd2')][_0xfe3c('0x11d')](db[_0xfe3c('0x1d7')],{'as':_0xfe3c('0x1c4'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1c5')});db[_0xfe3c('0xd2')][_0xfe3c('0x11d')](db[_0xfe3c('0x1d7')],{'as':_0xfe3c('0x1cc'),'onDelete':'cascade','foreignKey':_0xfe3c('0x1c6')});db['Dynamics365Configuration'][_0xfe3c('0x11d')](db['Dynamics365Field'],{'as':'Fields','onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1c7')});db[_0xfe3c('0xd2')]['belongsTo'](db['Dynamics365Account'],{'as':_0xfe3c('0x178'),'foreignKey':_0xfe3c('0x1c3')});db[_0xfe3c('0x1d7')][_0xfe3c('0x11d')](db[_0xfe3c('0x1d7')],{'as':_0xfe3c('0x1c8'),'foreignKey':_0xfe3c('0x1c5')});db[_0xfe3c('0x1d7')][_0xfe3c('0x11d')](db[_0xfe3c('0x1d7')],{'as':_0xfe3c('0x1cd'),'foreignKey':_0xfe3c('0x1c6')});db[_0xfe3c('0x1d7')][_0xfe3c('0x11d')](db[_0xfe3c('0x1d7')],{'as':'Field','foreignKey':_0xfe3c('0x1c7')});db['Dynamics365Field'][_0xfe3c('0x12d')](db[_0xfe3c('0x1ca')],{'as':_0xfe3c('0x1ca'),'foreignKey':_0xfe3c('0x1cb')});db[_0xfe3c('0x1d8')][_0xfe3c('0x11d')](db['FreshsalesConfiguration'],{'as':_0xfe3c('0x1c2'),'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1c3')});db[_0xfe3c('0xd5')][_0xfe3c('0x11d')](db[_0xfe3c('0xd7')],{'as':_0xfe3c('0x1c4'),'foreignKey':_0xfe3c('0x1c5')});db[_0xfe3c('0xd5')][_0xfe3c('0x11d')](db[_0xfe3c('0xd7')],{'as':_0xfe3c('0x1cc'),'foreignKey':_0xfe3c('0x1c6')});db[_0xfe3c('0xd5')][_0xfe3c('0x11d')](db[_0xfe3c('0xd7')],{'as':_0xfe3c('0x1c0'),'foreignKey':'FieldId'});db[_0xfe3c('0xd5')][_0xfe3c('0x12d')](db[_0xfe3c('0x1d8')],{'as':_0xfe3c('0x178'),'foreignKey':_0xfe3c('0x1c3')});db[_0xfe3c('0xd7')]['hasMany'](db[_0xfe3c('0xd7')],{'as':_0xfe3c('0x1c8'),'foreignKey':'SubjectId'});db[_0xfe3c('0xd7')][_0xfe3c('0x11d')](db['FreshsalesField'],{'as':_0xfe3c('0x1cd'),'foreignKey':_0xfe3c('0x1c6')});db[_0xfe3c('0xd7')][_0xfe3c('0x11d')](db['FreshsalesField'],{'as':_0xfe3c('0x1c9'),'foreignKey':_0xfe3c('0x1c7')});db[_0xfe3c('0xd7')][_0xfe3c('0x12d')](db[_0xfe3c('0x1ca')],{'as':_0xfe3c('0x1ca'),'foreignKey':_0xfe3c('0x1cb')});db[_0xfe3c('0xdb')][_0xfe3c('0x12d')](db[_0xfe3c('0x64')],{});db[_0xfe3c('0xdb')]['belongsTo'](db[_0xfe3c('0x134')],{'as':_0xfe3c('0x16d'),'foreignKey':'ListId'});db[_0xfe3c('0xdb')][_0xfe3c('0x12d')](db[_0xfe3c('0x74')],{'as':_0xfe3c('0x165'),'foreignKey':_0xfe3c('0x166')});db[_0xfe3c('0xdb')][_0xfe3c('0x12d')](db[_0xfe3c('0x69')],{});db['ChatQueueReport'][_0xfe3c('0x12d')](db[_0xfe3c('0x194')],{});db[_0xfe3c('0xdb')][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{});db['ChatQueueReport']['belongsTo'](db[_0xfe3c('0x6d')],{});db[_0xfe3c('0x19e')][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1d9')});db[_0xfe3c('0x19e')][_0xfe3c('0x12d')](db['User'],{'onDelete':_0xfe3c('0x117'),'foreignKey':_0xfe3c('0x1da')});db[_0xfe3c('0x156')][_0xfe3c('0x11d')](db[_0xfe3c('0xe0')],{'foreignKey':_0xfe3c('0x1db'),'onDelete':'cascade'});db[_0xfe3c('0x156')][_0xfe3c('0x11d')](db[_0xfe3c('0xde')],{'foreignKey':'SessionId','onDelete':_0xfe3c('0x117')});db['SmsQueueReport']['belongsTo'](db[_0xfe3c('0x58')],{});db[_0xfe3c('0x1dc')][_0xfe3c('0x12d')](db[_0xfe3c('0x134')],{'as':_0xfe3c('0x16d'),'foreignKey':'ListId'});db[_0xfe3c('0x1dc')]['belongsTo'](db[_0xfe3c('0x74')],{'as':'Contact','foreignKey':_0xfe3c('0x166')});db[_0xfe3c('0x1dc')][_0xfe3c('0x12d')](db['SmsInteraction'],{});db['SmsQueueReport'][_0xfe3c('0x12d')](db[_0xfe3c('0x185')],{});db[_0xfe3c('0x1dc')][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{});db[_0xfe3c('0x1dc')]['belongsTo'](db[_0xfe3c('0x5e')],{});db[_0xfe3c('0xe3')][_0xfe3c('0x11d')](db[_0xfe3c('0x156')],{'foreignKey':_0xfe3c('0x1dd')});db[_0xfe3c('0xe3')][_0xfe3c('0x11d')](db['JscriptyQuestionReport'],{'foreignKey':_0xfe3c('0x1dd')});db['JscriptyProject'][_0xfe3c('0x11d')](db[_0xfe3c('0xde')],{'foreignKey':_0xfe3c('0x1dd')});db['Team'][_0xfe3c('0x133')](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x15e'),'through':_0xfe3c('0x1de')});db[_0xfe3c('0xed')][_0xfe3c('0x133')](db[_0xfe3c('0x19')],{'through':_0xfe3c('0x10e'),'as':_0xfe3c('0x13c')});db[_0xfe3c('0xed')][_0xfe3c('0x133')](db[_0xfe3c('0x40')],{'through':_0xfe3c('0x170'),'as':'MailQueues'});db[_0xfe3c('0xed')][_0xfe3c('0x133')](db[_0xfe3c('0x6d')],{'through':_0xfe3c('0x19d'),'as':_0xfe3c('0x1df')});db[_0xfe3c('0xed')][_0xfe3c('0x133')](db[_0xfe3c('0x54')],{'through':_0xfe3c('0x184'),'as':_0xfe3c('0x1e0')});db[_0xfe3c('0xed')][_0xfe3c('0x133')](db['SmsQueue'],{'through':_0xfe3c('0x18a'),'as':_0xfe3c('0x140')});db[_0xfe3c('0xed')][_0xfe3c('0x133')](db[_0xfe3c('0x63')],{'through':'team_has_openchannel_queues','as':_0xfe3c('0x142')});db['Team']['belongsToMany'](db[_0xfe3c('0x10a')],{'through':_0xfe3c('0x1e1'),'as':_0xfe3c('0x143')});db[_0xfe3c('0xed')][_0xfe3c('0x133')](db['VoicePrefix'],{'through':_0xfe3c('0x110'),'as':_0xfe3c('0x13d')});db[_0xfe3c('0xf0')]['hasMany'](db['CmHopper'],{'as':_0xfe3c('0x12b'),'foreignKey':_0xfe3c('0x1a6')});db[_0xfe3c('0xf0')]['hasMany'](db[_0xfe3c('0x79')],{'as':_0xfe3c('0x11e'),'foreignKey':_0xfe3c('0x1a6')});db[_0xfe3c('0xf0')][_0xfe3c('0x11d')](db[_0xfe3c('0x7b')],{'as':_0xfe3c('0x1e2'),'foreignKey':_0xfe3c('0x1a6')});db['Campaign'][_0xfe3c('0x11d')](db[_0xfe3c('0x77')],{'as':_0xfe3c('0x155'),'foreignKey':_0xfe3c('0x1a6')});db[_0xfe3c('0xf0')][_0xfe3c('0x12d')](db[_0xfe3c('0x2a')],{'as':_0xfe3c('0x2a'),'foreignKey':_0xfe3c('0x158')});db[_0xfe3c('0xf0')][_0xfe3c('0x12d')](db[_0xfe3c('0x2a')],{'as':'TrunkBackup','foreignKey':_0xfe3c('0x1e3')});db[_0xfe3c('0xf0')][_0xfe3c('0x12d')](db['Interval'],{'as':'Interval','foreignKey':_0xfe3c('0x17a')});db[_0xfe3c('0xf0')][_0xfe3c('0x12d')](db['SquareProject'],{'as':'SquareProject','foreignKey':_0xfe3c('0x1e4')});db[_0xfe3c('0xf0')]['belongsToMany'](db[_0xfe3c('0x134')],{'as':'Lists','through':'campaigns_has_cm_lists'});db[_0xfe3c('0xf0')]['belongsToMany'](db[_0xfe3c('0x134')],{'as':_0xfe3c('0x15f'),'through':_0xfe3c('0x1e5')});db['Attachment'][_0xfe3c('0x12d')](db[_0xfe3c('0x6b')],{'as':_0xfe3c('0x6b'),'foreignKey':_0xfe3c('0x19c')});db[_0xfe3c('0xf7')][_0xfe3c('0x12d')](db['MailMessage'],{});db[_0xfe3c('0xf7')][_0xfe3c('0x12d')](db[_0xfe3c('0x44')],{});db[_0xfe3c('0xf7')][_0xfe3c('0x12d')](db['MailAccount'],{'foreignKey':_0xfe3c('0x1e6'),'as':_0xfe3c('0x1e7')});db['MailTransferReport'][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{'foreignKey':_0xfe3c('0x1e8'),'as':_0xfe3c('0x1e9')});db[_0xfe3c('0xf7')][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{'foreignKey':_0xfe3c('0x1ea'),'as':_0xfe3c('0x1eb')});db[_0xfe3c('0xf7')][_0xfe3c('0x12d')](db[_0xfe3c('0x40')],{'foreignKey':_0xfe3c('0x1ec'),'as':_0xfe3c('0x1ed')});db[_0xfe3c('0xf7')][_0xfe3c('0x12d')](db['MailAccount'],{'foreignKey':_0xfe3c('0x1ee'),'as':'ToAccount'});db[_0xfe3c('0x1ef')][_0xfe3c('0x12d')](db['ChatMessage'],{});db[_0xfe3c('0x1ef')]['belongsTo'](db[_0xfe3c('0x69')],{});db[_0xfe3c('0x1ef')][_0xfe3c('0x12d')](db['ChatWebsite'],{'foreignKey':_0xfe3c('0x1f0'),'as':'FromAccount'});db[_0xfe3c('0x1ef')][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{'foreignKey':_0xfe3c('0x1e8'),'as':_0xfe3c('0x1e9')});db[_0xfe3c('0x1ef')]['belongsTo'](db[_0xfe3c('0x116')],{'foreignKey':'ToUserId','as':'ToAgent'});db[_0xfe3c('0x1ef')][_0xfe3c('0x12d')](db[_0xfe3c('0x6d')],{'foreignKey':_0xfe3c('0x1f1'),'as':_0xfe3c('0x1ed')});db['ChatTransferReport'][_0xfe3c('0x12d')](db['ChatWebsite'],{'foreignKey':'ToChatWebsiteId','as':_0xfe3c('0x1f2')});db[_0xfe3c('0x1f3')]['belongsTo'](db[_0xfe3c('0x180')],{});db[_0xfe3c('0x1f3')][_0xfe3c('0x12d')](db[_0xfe3c('0x52')],{});db[_0xfe3c('0x1f3')]['belongsTo'](db[_0xfe3c('0x4e')],{'foreignKey':_0xfe3c('0x1f4'),'as':'FromAccount'});db[_0xfe3c('0x1f3')][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{'foreignKey':_0xfe3c('0x1e8'),'as':_0xfe3c('0x1e9')});db['FaxTransferReport'][_0xfe3c('0x12d')](db['User'],{'foreignKey':_0xfe3c('0x1ea'),'as':_0xfe3c('0x1eb')});db['FaxTransferReport'][_0xfe3c('0x12d')](db[_0xfe3c('0x54')],{'foreignKey':_0xfe3c('0x1f5'),'as':'ToQueue'});db['FaxTransferReport'][_0xfe3c('0x12d')](db[_0xfe3c('0x4e')],{'foreignKey':_0xfe3c('0x1f6'),'as':_0xfe3c('0x1f2')});db[_0xfe3c('0x1f7')][_0xfe3c('0x12d')](db[_0xfe3c('0x191')],{});db[_0xfe3c('0x1f7')]['belongsTo'](db[_0xfe3c('0x120')],{});db[_0xfe3c('0x1f7')][_0xfe3c('0x12d')](db[_0xfe3c('0x148')],{'foreignKey':_0xfe3c('0x1f8'),'as':_0xfe3c('0x1e7')});db[_0xfe3c('0x1f7')][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{'foreignKey':_0xfe3c('0x1e8'),'as':_0xfe3c('0x1e9')});db[_0xfe3c('0x1f7')]['belongsTo'](db['User'],{'foreignKey':'ToUserId','as':'ToAgent'});db[_0xfe3c('0x1f7')][_0xfe3c('0x12d')](db[_0xfe3c('0x63')],{'foreignKey':_0xfe3c('0x1f9'),'as':_0xfe3c('0x1ed')});db[_0xfe3c('0x1f7')][_0xfe3c('0x12d')](db[_0xfe3c('0x148')],{'foreignKey':'ToOpenchannelAccountId','as':_0xfe3c('0x1f2')});db['SmsTransferReport']['belongsTo'](db[_0xfe3c('0x185')],{});db['SmsTransferReport'][_0xfe3c('0x12d')](db[_0xfe3c('0x123')],{});db[_0xfe3c('0xfc')][_0xfe3c('0x12d')](db[_0xfe3c('0x58')],{'foreignKey':_0xfe3c('0x1fa'),'as':'FromAccount'});db[_0xfe3c('0xfc')]['belongsTo'](db[_0xfe3c('0x116')],{'foreignKey':_0xfe3c('0x1e8'),'as':'FromAgent'});db[_0xfe3c('0xfc')]['belongsTo'](db['User'],{'foreignKey':_0xfe3c('0x1ea'),'as':_0xfe3c('0x1eb')});db[_0xfe3c('0xfc')][_0xfe3c('0x12d')](db['SmsQueue'],{'foreignKey':_0xfe3c('0x1fb'),'as':_0xfe3c('0x1ed')});db['SmsTransferReport'][_0xfe3c('0x12d')](db[_0xfe3c('0x58')],{'foreignKey':'ToSmsAccountId','as':_0xfe3c('0x1f2')});db[_0xfe3c('0x134')][_0xfe3c('0x11d')](db[_0xfe3c('0x84')],{'as':_0xfe3c('0x16b'),'foreignKey':_0xfe3c('0x16e'),'onDelete':_0xfe3c('0x117')});db[_0xfe3c('0x134')][_0xfe3c('0x11d')](db['CmCustomField'],{'as':_0xfe3c('0x1fc'),'foreignKey':'ListId'});db[_0xfe3c('0x134')][_0xfe3c('0x11d')](db['CmContact'],{'as':'Contacts','onDelete':_0xfe3c('0x117'),'foreignKey':'ListId'});db[_0xfe3c('0x134')]['hasMany'](db[_0xfe3c('0x79')],{'as':'HopperFinals','foreignKey':_0xfe3c('0x16e')});db['CmList'][_0xfe3c('0x11d')](db['CmHopperHistory'],{'as':_0xfe3c('0x11f'),'foreignKey':_0xfe3c('0x16e')});db[_0xfe3c('0x134')][_0xfe3c('0x11d')](db[_0xfe3c('0x7d')],{'as':'ReportAgentPreview','foreignKey':_0xfe3c('0x16e')});db['CmList'][_0xfe3c('0x133')](db[_0xfe3c('0x19')],{'as':'Queues','through':'voice_queues_has_cm_lists'});db['CmList'][_0xfe3c('0x133')](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x15e'),'through':_0xfe3c('0x136')});db['VoicePrefix']['hasMany'](db[_0xfe3c('0x17')],{'as':_0xfe3c('0x1fd'),'onDelete':'cascade'});db[_0xfe3c('0x1fe')][_0xfe3c('0x133')](db[_0xfe3c('0x116')],{'as':'Agents','through':_0xfe3c('0x13e')});db['VoicePrefix'][_0xfe3c('0x133')](db['Team'],{'through':_0xfe3c('0x110'),'as':_0xfe3c('0x171')});db['UserProfile'][_0xfe3c('0x11d')](db['User'],{'as':'Users','foreignKey':_0xfe3c('0x12e')});db[_0xfe3c('0xff')][_0xfe3c('0x11d')](db[_0xfe3c('0x100')],{'as':_0xfe3c('0x1ff'),'foreignKey':_0xfe3c('0x12e'),'onDelete':_0xfe3c('0x117')});db[_0xfe3c('0x100')][_0xfe3c('0x11d')](db[_0xfe3c('0x200')],{'as':'Resources','foreignKey':_0xfe3c('0x201'),'onDelete':'cascade'});db['WhatsappAccount'][_0xfe3c('0x11d')](db[_0xfe3c('0x84')],{'as':_0xfe3c('0x16b'),'foreignKey':_0xfe3c('0x202'),'onDelete':_0xfe3c('0x117')});db['WhatsappAccount'][_0xfe3c('0x11d')](db[_0xfe3c('0x82')],{'as':'Answers','foreignKey':'WhatsappAccountId'});db[_0xfe3c('0x14c')][_0xfe3c('0x11d')](db['WhatsappMessage'],{'as':'Messages','foreignKey':'WhatsappAccountId'});db[_0xfe3c('0x14c')]['hasMany'](db[_0xfe3c('0x126')],{'as':_0xfe3c('0x17e')});db[_0xfe3c('0x14c')][_0xfe3c('0x11d')](db[_0xfe3c('0x104')],{'as':'Applications','foreignKey':'WhatsappAccountId','onDelete':'cascade'});db[_0xfe3c('0x14c')]['belongsTo'](db[_0xfe3c('0x134')],{'as':_0xfe3c('0x16d'),'foreignKey':_0xfe3c('0x16e')});db['WhatsappAccount'][_0xfe3c('0x12d')](db['Pause'],{'as':_0xfe3c('0x15b'),'foreignKey':_0xfe3c('0x15c')});db[_0xfe3c('0x14c')][_0xfe3c('0x133')](db[_0xfe3c('0x116')],{'as':_0xfe3c('0x15e'),'through':_0xfe3c('0x14e')});db[_0xfe3c('0x104')][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{'onDelete':_0xfe3c('0x169')});db[_0xfe3c('0x104')][_0xfe3c('0x12d')](db[_0xfe3c('0x10a')],{'onDelete':_0xfe3c('0x169')});db[_0xfe3c('0x104')][_0xfe3c('0x12d')](db[_0xfe3c('0x14c')],{'onDelete':_0xfe3c('0x169')});db[_0xfe3c('0x104')][_0xfe3c('0x12d')](db[_0xfe3c('0x88')],{'onDelete':_0xfe3c('0x169'),'foreignKey':_0xfe3c('0x17a')});db['WhatsappApplication'][_0xfe3c('0x12d')](db[_0xfe3c('0x91')],{'onDelete':_0xfe3c('0x169'),'foreignKey':'TagId'});db[_0xfe3c('0x126')]['hasMany'](db[_0xfe3c('0x107')],{'as':_0xfe3c('0x161'),'onDelete':_0xfe3c('0x117'),'foreignKey':'WhatsappInteractionId'});db[_0xfe3c('0x126')]['belongsTo'](db[_0xfe3c('0x14c')],{'as':_0xfe3c('0x178'),'foreignKey':_0xfe3c('0x202')});db[_0xfe3c('0x126')]['belongsTo'](db[_0xfe3c('0x74')],{'as':_0xfe3c('0x165'),'foreignKey':'ContactId'});db[_0xfe3c('0x126')][_0xfe3c('0x12d')](db['User'],{'as':_0xfe3c('0x173'),'foreignKey':'UserId'});db[_0xfe3c('0x126')]['belongsToMany'](db['Tag'],{'through':'whatsapp_interaction_has_tags','as':'Tags'});db[_0xfe3c('0x126')][_0xfe3c('0x133')](db[_0xfe3c('0x91')],{'through':_0xfe3c('0x1b8'),'as':_0xfe3c('0x190')});db['WhatsappInteraction'][_0xfe3c('0x133')](db['User'],{'as':_0xfe3c('0x176'),'through':'user_has_whatsapp_interactions','foreignKey':_0xfe3c('0x203')});db[_0xfe3c('0x107')][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{'as':'User'});db[_0xfe3c('0x107')][_0xfe3c('0x12d')](db[_0xfe3c('0x74')],{'onDelete':_0xfe3c('0x117'),'as':_0xfe3c('0x165')});db['WhatsappMessage'][_0xfe3c('0x12d')](db[_0xfe3c('0x126')],{'onDelete':'cascade','as':'Interaction','foreignKey':_0xfe3c('0x203')});db[_0xfe3c('0x107')][_0xfe3c('0x12d')](db[_0xfe3c('0x14c')],{'as':_0xfe3c('0x178'),'foreignKey':_0xfe3c('0x202')});db[_0xfe3c('0x204')]['belongsTo'](db[_0xfe3c('0x14c')],{});db[_0xfe3c('0x204')][_0xfe3c('0x12d')](db[_0xfe3c('0x134')],{'as':_0xfe3c('0x16d'),'foreignKey':_0xfe3c('0x16e')});db[_0xfe3c('0x204')][_0xfe3c('0x12d')](db[_0xfe3c('0x74')],{'as':_0xfe3c('0x165'),'foreignKey':_0xfe3c('0x166')});db[_0xfe3c('0x204')][_0xfe3c('0x12d')](db[_0xfe3c('0x126')],{});db[_0xfe3c('0x204')][_0xfe3c('0x12d')](db[_0xfe3c('0x10a')],{});db[_0xfe3c('0x204')][_0xfe3c('0x12d')](db[_0xfe3c('0x107')],{});db[_0xfe3c('0x204')][_0xfe3c('0x12d')](db[_0xfe3c('0x116')],{});db[_0xfe3c('0x108')]['belongsTo'](db['WhatsappMessage'],{});db['WhatsappTransferReport'][_0xfe3c('0x12d')](db['WhatsappInteraction'],{});db[_0xfe3c('0x108')][_0xfe3c('0x12d')](db[_0xfe3c('0x14c')],{'foreignKey':_0xfe3c('0x205'),'as':_0xfe3c('0x1e7')});db['WhatsappTransferReport']['belongsTo'](db[_0xfe3c('0x14c')],{'foreignKey':'ToWhatsappAccountId','as':_0xfe3c('0x1f2')});db[_0xfe3c('0x108')][_0xfe3c('0x12d')](db[_0xfe3c('0x10a')],{'foreignKey':'ToQueueId','as':_0xfe3c('0x1ed')});db[_0xfe3c('0x108')][_0xfe3c('0x12d')](db['User'],{'foreignKey':'FromUserId','as':_0xfe3c('0x1e9')});db['WhatsappTransferReport']['belongsTo'](db[_0xfe3c('0x116')],{'foreignKey':_0xfe3c('0x1ea'),'as':_0xfe3c('0x1eb')});db[_0xfe3c('0x10a')][_0xfe3c('0x133')](db[_0xfe3c('0x116')],{'as':'Agents','through':'UserWhatsappQueue','foreignKey':'WhatsappQueueId'});db[_0xfe3c('0x10a')][_0xfe3c('0x133')](db[_0xfe3c('0xed')],{'through':'team_has_whatsapp_queues','as':_0xfe3c('0x171')});db[_0xfe3c('0x113')]['belongsTo'](db['User'],{'as':'user','foreignKey':_0xfe3c('0x118'),'onDelete':_0xfe3c('0x117'),'hooks':!![]});db[_0xfe3c('0x10c')][_0xfe3c('0x119')](db[_0xfe3c('0x1d6')],{'as':'Dynamics365Account','onDelete':_0xfe3c('0x169')});db[_0xfe3c('0x10c')][_0xfe3c('0x119')](db[_0xfe3c('0x3b')],{'as':_0xfe3c('0x206'),'onDelete':_0xfe3c('0x169')});db[_0xfe3c('0x10c')][_0xfe3c('0x119')](db[_0xfe3c('0x3c')],{'as':_0xfe3c('0x16a'),'onDelete':_0xfe3c('0x169')});module['exports']={'db':db,'dbH':dbH};
\ No newline at end of file
index 0a33a05..848b384 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7914=['./api/mailInteractionHasTag','/api/auth/local','./api/authLocal','/api/auth/google','./api/authGoogle','./api/authActiveDirectory','/api/jira','./api/jira','./api/rpc','./api/version','/api/system','./api/system','/api/pm2','./api/pm2','/api/webbar','./api/webbar','/api/logs','static','join','/apidoc','/www','/demo','root','/snippet','3.9.0','/plugins','/server/files/plugins','route','get','/index.html','express','./errors','./utils/client-side-logger','setupLoggers','./api/client-side-logs','default','then','/api/users','./api/user','/api/voice/chanspy','./api/voiceChanSpy','use','/api/voice/contexts','/api/voice/extensions','/api/voice/mohs','./api/voiceMusicOnHold','/api/voice/queues','./api/voiceQueue','/api/voice/recordings','./api/voiceRecording','/api/screen/recordings','./api/screenRecording','/api/voice/mails','./api/voiceMail','/api/voice/mails/messages','/api/voice/calls/reports','./api/voiceCallReport','/api/voice/dials/reports','./api/voiceDialReport','/api/voice/agents/reports','./api/voiceAgentReport','/api/members/reports','./api/memberReport','./api/trunk','/api/voice/transfers/reports','./api/voiceTransferReport','/api/mail/accounts','./api/mailAccount','/api/mail/queues','./api/mailQueue','/api/mail/interactions','./api/mailInteraction','/api/mail/messages','/api/mail/applications','./api/mailApplication','/api/mail/reports/queue','./api/mailQueueReport','/api/dashboards','/api/dashboards/items','./api/dashboardItem','./api/faxAccount','./api/faxApplication','./api/faxInteraction','/api/fax/messages','./api/faxMessage','/api/fax/queues','./api/faxQueue','/api/fax/reports/queue','/api/sms/accounts','./api/smsAccount','./api/smsApplication','./api/smsInteraction','./api/smsMessage','/api/sms/queues','./api/smsQueue','/api/openchannel/applications','./api/openchannelApplication','./api/openchannelInteraction','/api/openchannel/queues','./api/openchannelQueue','/api/chat/websites','./api/chatWebsite','/api/openchannel/reports/queue','./api/openchannelQueueReport','/api/chat/applications','./api/chatApplication','/api/chat/interactions','./api/chatInteraction','/api/chat/messages','./api/chatMessage','./api/chatOfflineMessage','/api/chat/queues','./api/chatQueue','/api/chat/groups','./api/chatGroup','./api/cmCompany','/api/cm/contacts','./api/cmContact','/api/cm/hopper','./api/cmHopper','/api/cm/hopper_black','./api/cmHopperBlack','/api/cm/hopper_final','./api/cmHopperFinal','/api/cm/hopper_history','./api/cmHopperHistory','/api/cm/custom_fields','./api/cmCustomField','./api/action','/api/automations','./api/automation','./api/cannedAnswer','/api/dispositions','./api/disposition','/api/conditions','./api/condition','/api/pauses','./api/pause','/api/cdr','/api/voiceQueuesLog','/api/schedules','./api/schedule','/api/sounds','./api/sound','/api/tags','./api/tag','/api/contact_item_types','/api/cm_contact_has_items','./api/cmContactHasItem','/api/cm_hopper_additional_phones','./api/cmHopperAdditionalPhone','./api/trigger','/api/variables','./api/integration','/api/integrations/reports','./api/integrationReport','/api/analytics/custom_reports','/api/analytics/default_reports','./api/analyticDefaultReport','/api/analytics/extracted_reports','./api/analyticExtractedReport','/api/analytics/metrics','./api/analyticMetric','/api/analytics/field_reports','/api/analytics/tree_reports','./api/analyticTreeReport','/api/integrations/salesforce/accounts','./api/intSalesforceAccount','/api/integrations/salesforce/configurations','./api/intSalesforceConfiguration','/api/integrations/salesforce/fields','./api/intSalesforceField','/api/integrations/sugarcrm/accounts','./api/intSugarcrmAccount','/api/integrations/sugarcrm/configurations','/api/integrations/sugarcrm/fields','./api/intSugarcrmField','./api/intDeskAccount','/api/integrations/desk/configurations','./api/intDeskConfiguration','/api/integrations/desk/fields','./api/intDeskField','/api/integrations/zoho/accounts','/api/integrations/zoho/configurations','./api/intZohoConfiguration','/api/integrations/zoho/fields','./api/intZohoField','/api/integrations/zendesk/accounts','./api/intZendeskAccount','/api/integrations/zendesk/configurations','./api/intZendeskConfiguration','./api/intZendeskField','/api/integrations/freshdesk/accounts','./api/intFreshdeskAccount','/api/integrations/freshdesk/configurations','./api/intFreshdeskConfiguration','/api/integrations/freshdesk/fields','/api/integrations/vtiger/accounts','./api/intVtigerAccount','/api/integrations/vtiger/configurations','./api/intVtigerConfiguration','/api/integrations/servicenow/accounts','/api/integrations/servicenow/configurations','./api/intServicenowConfiguration','./api/intServicenowField','./api/intDynamics365Account','/api/integrations/dynamics365/configurations','./api/intDynamics365Configuration','/api/integrations/dynamics365/fields','./api/intDynamics365Field','/api/integrations/freshsales/accounts','./api/intFreshsalesAccount','/api/integrations/freshsales/configurations','./api/intFreshsalesField','./api/network','/api/chat/reports/queue','./api/chatQueueReport','/api/chat/internal/messages','./api/chatInternalMessage','/api/jscripty/answers/reports','./api/jscriptyQuestionReport','/api/jscripty/sessions/reports','./api/jscriptySessionReport','./api/smsQueueReport','/api/square/reports','./api/squareReport','/api/square/details/reports','./api/squareReportDetail','/api/jscripty/projects','/api/settings','/api/square/odbc','/api/square/projects','./api/squareProject','/api/square/messages','./api/squareMessage','/api/teams','./api/team','/api/license','./api/license','/api/campaigns','/api/migrations','./api/migration','/api/attachments','./api/attachment','./api/plugin','/api/mail/reports/transfer','/api/chat/reports/transfer','./api/chatTransferReport','/api/fax/reports/transfer','./api/faxTransferReport','/api/openchannel/reports/transfer','./api/smsTransferReport','/api/cm/lists','./api/cmList','/api/voice/prefixes','./api/voicePrefix','/api/userProfiles','./api/userProfile','/api/userProfile/sections','/api/userProfile/resources','./api/userProfileResource','/api/userNotifications','./api/userNotification','./api/whatsappAccount','./api/whatsappApplication','/api/whatsapp/interactions','./api/whatsappInteraction','/api/whatsapp/messages','./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'];(function(_0x19e291,_0x5052bc){var _0x5c816f=function(_0x4a9cdf){while(--_0x4a9cdf){_0x19e291['push'](_0x19e291['shift']());}};_0x5c816f(++_0x5052bc);}(_0x7914,0x136));var _0x4791=function(_0x5f0f2d,_0x2626a7){_0x5f0f2d=_0x5f0f2d-0x0;var _0x42bd75=_0x7914[_0x5f0f2d];return _0x42bd75;};'use strict';var path=require('path');var express=require(_0x4791('0x0'));var errors=require(_0x4791('0x1'));var config=require('./config/environment');var setupLoggers=require(_0x4791('0x2'))[_0x4791('0x3')];var clientSideLogs=require(_0x4791('0x4'));exports[_0x4791('0x5')]=function(_0x2bd076){return setupLoggers(_0x2bd076)[_0x4791('0x6')](function(){_0x2bd076['use'](_0x4791('0x7'),require(_0x4791('0x8')));_0x2bd076['use'](_0x4791('0x9'),require(_0x4791('0xa')));_0x2bd076[_0x4791('0xb')](_0x4791('0xc'),require('./api/voiceContext'));_0x2bd076['use'](_0x4791('0xd'),require('./api/voiceExtension'));_0x2bd076[_0x4791('0xb')](_0x4791('0xe'),require(_0x4791('0xf')));_0x2bd076[_0x4791('0xb')](_0x4791('0x10'),require(_0x4791('0x11')));_0x2bd076['use'](_0x4791('0x12'),require(_0x4791('0x13')));_0x2bd076['use'](_0x4791('0x14'),require(_0x4791('0x15')));_0x2bd076[_0x4791('0xb')](_0x4791('0x16'),require(_0x4791('0x17')));_0x2bd076[_0x4791('0xb')](_0x4791('0x18'),require('./api/voiceMailMessage'));_0x2bd076[_0x4791('0xb')](_0x4791('0x19'),require(_0x4791('0x1a')));_0x2bd076['use'](_0x4791('0x1b'),require(_0x4791('0x1c')));_0x2bd076[_0x4791('0xb')](_0x4791('0x1d'),require(_0x4791('0x1e')));_0x2bd076[_0x4791('0xb')]('/api/voice/queues/reports',require('./api/voiceQueueReport'));_0x2bd076['use'](_0x4791('0x1f'),require(_0x4791('0x20')));_0x2bd076['use']('/api/trunks',require(_0x4791('0x21')));_0x2bd076[_0x4791('0xb')](_0x4791('0x22'),require(_0x4791('0x23')));_0x2bd076[_0x4791('0xb')]('/api/mail/out_servers',require('./api/mailServerOut'));_0x2bd076[_0x4791('0xb')](_0x4791('0x24'),require(_0x4791('0x25')));_0x2bd076['use'](_0x4791('0x26'),require(_0x4791('0x27')));_0x2bd076[_0x4791('0xb')]('/api/mail/substatuses',require('./api/mailSubstatus'));_0x2bd076[_0x4791('0xb')](_0x4791('0x28'),require(_0x4791('0x29')));_0x2bd076['use'](_0x4791('0x2a'),require('./api/mailMessage'));_0x2bd076['use'](_0x4791('0x2b'),require(_0x4791('0x2c')));_0x2bd076[_0x4791('0xb')](_0x4791('0x2d'),require(_0x4791('0x2e')));_0x2bd076[_0x4791('0xb')](_0x4791('0x2f'),require('./api/dashboard'));_0x2bd076[_0x4791('0xb')](_0x4791('0x30'),require(_0x4791('0x31')));_0x2bd076[_0x4791('0xb')]('/api/fax/accounts',require(_0x4791('0x32')));_0x2bd076['use']('/api/fax/applications',require(_0x4791('0x33')));_0x2bd076[_0x4791('0xb')]('/api/fax/interactions',require(_0x4791('0x34')));_0x2bd076[_0x4791('0xb')](_0x4791('0x35'),require(_0x4791('0x36')));_0x2bd076['use'](_0x4791('0x37'),require(_0x4791('0x38')));_0x2bd076[_0x4791('0xb')](_0x4791('0x39'),require('./api/faxQueueReport'));_0x2bd076[_0x4791('0xb')](_0x4791('0x3a'),require(_0x4791('0x3b')));_0x2bd076['use']('/api/sms/applications',require(_0x4791('0x3c')));_0x2bd076[_0x4791('0xb')]('/api/sms/interactions',require(_0x4791('0x3d')));_0x2bd076[_0x4791('0xb')]('/api/sms/messages',require(_0x4791('0x3e')));_0x2bd076[_0x4791('0xb')](_0x4791('0x3f'),require(_0x4791('0x40')));_0x2bd076['use']('/api/openchannel/accounts',require('./api/openchannelAccount'));_0x2bd076[_0x4791('0xb')](_0x4791('0x41'),require(_0x4791('0x42')));_0x2bd076[_0x4791('0xb')]('/api/openchannel/interactions',require(_0x4791('0x43')));_0x2bd076['use']('/api/openchannel/messages',require('./api/openchannelMessage'));_0x2bd076[_0x4791('0xb')](_0x4791('0x44'),require(_0x4791('0x45')));_0x2bd076[_0x4791('0xb')](_0x4791('0x46'),require(_0x4791('0x47')));_0x2bd076[_0x4791('0xb')](_0x4791('0x48'),require(_0x4791('0x49')));_0x2bd076[_0x4791('0xb')](_0x4791('0x4a'),require(_0x4791('0x4b')));_0x2bd076[_0x4791('0xb')](_0x4791('0x4c'),require(_0x4791('0x4d')));_0x2bd076[_0x4791('0xb')](_0x4791('0x4e'),require(_0x4791('0x4f')));_0x2bd076[_0x4791('0xb')]('/api/chat/offline_messages',require(_0x4791('0x50')));_0x2bd076['use'](_0x4791('0x51'),require(_0x4791('0x52')));_0x2bd076['use'](_0x4791('0x53'),require(_0x4791('0x54')));_0x2bd076[_0x4791('0xb')]('/api/chat/proactive_actions',require('./api/chatProactiveAction'));_0x2bd076[_0x4791('0xb')]('/api/cm/companies',require(_0x4791('0x55')));_0x2bd076[_0x4791('0xb')](_0x4791('0x56'),require(_0x4791('0x57')));_0x2bd076['use'](_0x4791('0x58'),require(_0x4791('0x59')));_0x2bd076[_0x4791('0xb')](_0x4791('0x5a'),require(_0x4791('0x5b')));_0x2bd076[_0x4791('0xb')](_0x4791('0x5c'),require(_0x4791('0x5d')));_0x2bd076[_0x4791('0xb')](_0x4791('0x5e'),require(_0x4791('0x5f')));_0x2bd076[_0x4791('0xb')](_0x4791('0x60'),require(_0x4791('0x61')));_0x2bd076[_0x4791('0xb')]('/api/actions',require(_0x4791('0x62')));_0x2bd076[_0x4791('0xb')](_0x4791('0x63'),require(_0x4791('0x64')));_0x2bd076[_0x4791('0xb')]('/api/canned_answers',require(_0x4791('0x65')));_0x2bd076[_0x4791('0xb')](_0x4791('0x66'),require(_0x4791('0x67')));_0x2bd076[_0x4791('0xb')](_0x4791('0x68'),require(_0x4791('0x69')));_0x2bd076[_0x4791('0xb')]('/api/intervals',require('./api/interval'));_0x2bd076[_0x4791('0xb')](_0x4791('0x6a'),require(_0x4791('0x6b')));_0x2bd076['use'](_0x4791('0x6c'),require('./api/cdr'));_0x2bd076[_0x4791('0xb')](_0x4791('0x6d'),require('./api/voiceQueuesLog'));_0x2bd076[_0x4791('0xb')](_0x4791('0x6e'),require(_0x4791('0x6f')));_0x2bd076['use'](_0x4791('0x70'),require(_0x4791('0x71')));_0x2bd076[_0x4791('0xb')](_0x4791('0x72'),require(_0x4791('0x73')));_0x2bd076[_0x4791('0xb')](_0x4791('0x74'),require('./api/contactItemType'));_0x2bd076[_0x4791('0xb')](_0x4791('0x75'),require(_0x4791('0x76')));_0x2bd076[_0x4791('0xb')](_0x4791('0x77'),require(_0x4791('0x78')));_0x2bd076['use']('/api/templates',require('./api/template'));_0x2bd076['use']('/api/triggers',require(_0x4791('0x79')));_0x2bd076[_0x4791('0xb')](_0x4791('0x7a'),require('./api/variable'));_0x2bd076['use']('/api/integrations',require(_0x4791('0x7b')));_0x2bd076['use'](_0x4791('0x7c'),require(_0x4791('0x7d')));_0x2bd076[_0x4791('0xb')](_0x4791('0x7e'),require('./api/analyticCustomReport'));_0x2bd076[_0x4791('0xb')](_0x4791('0x7f'),require(_0x4791('0x80')));_0x2bd076[_0x4791('0xb')](_0x4791('0x81'),require(_0x4791('0x82')));_0x2bd076[_0x4791('0xb')](_0x4791('0x83'),require(_0x4791('0x84')));_0x2bd076[_0x4791('0xb')](_0x4791('0x85'),require('./api/analyticFieldReport'));_0x2bd076[_0x4791('0xb')](_0x4791('0x86'),require(_0x4791('0x87')));_0x2bd076[_0x4791('0xb')](_0x4791('0x88'),require(_0x4791('0x89')));_0x2bd076['use'](_0x4791('0x8a'),require(_0x4791('0x8b')));_0x2bd076[_0x4791('0xb')](_0x4791('0x8c'),require(_0x4791('0x8d')));_0x2bd076[_0x4791('0xb')](_0x4791('0x8e'),require(_0x4791('0x8f')));_0x2bd076[_0x4791('0xb')](_0x4791('0x90'),require('./api/intSugarcrmConfiguration'));_0x2bd076[_0x4791('0xb')](_0x4791('0x91'),require(_0x4791('0x92')));_0x2bd076[_0x4791('0xb')]('/api/integrations/desk/accounts',require(_0x4791('0x93')));_0x2bd076[_0x4791('0xb')](_0x4791('0x94'),require(_0x4791('0x95')));_0x2bd076[_0x4791('0xb')](_0x4791('0x96'),require(_0x4791('0x97')));_0x2bd076[_0x4791('0xb')](_0x4791('0x98'),require('./api/intZohoAccount'));_0x2bd076[_0x4791('0xb')](_0x4791('0x99'),require(_0x4791('0x9a')));_0x2bd076[_0x4791('0xb')](_0x4791('0x9b'),require(_0x4791('0x9c')));_0x2bd076[_0x4791('0xb')](_0x4791('0x9d'),require(_0x4791('0x9e')));_0x2bd076[_0x4791('0xb')](_0x4791('0x9f'),require(_0x4791('0xa0')));_0x2bd076[_0x4791('0xb')]('/api/integrations/zendesk/fields',require(_0x4791('0xa1')));_0x2bd076[_0x4791('0xb')](_0x4791('0xa2'),require(_0x4791('0xa3')));_0x2bd076[_0x4791('0xb')](_0x4791('0xa4'),require(_0x4791('0xa5')));_0x2bd076[_0x4791('0xb')](_0x4791('0xa6'),require('./api/intFreshdeskField'));_0x2bd076[_0x4791('0xb')](_0x4791('0xa7'),require(_0x4791('0xa8')));_0x2bd076[_0x4791('0xb')](_0x4791('0xa9'),require(_0x4791('0xaa')));_0x2bd076[_0x4791('0xb')]('/api/integrations/vtiger/fields',require('./api/intVtigerField'));_0x2bd076[_0x4791('0xb')](_0x4791('0xab'),require('./api/intServicenowAccount'));_0x2bd076['use'](_0x4791('0xac'),require(_0x4791('0xad')));_0x2bd076[_0x4791('0xb')]('/api/integrations/servicenow/fields',require(_0x4791('0xae')));_0x2bd076[_0x4791('0xb')]('/api/integrations/dynamics365/accounts',require(_0x4791('0xaf')));_0x2bd076[_0x4791('0xb')](_0x4791('0xb0'),require(_0x4791('0xb1')));_0x2bd076[_0x4791('0xb')](_0x4791('0xb2'),require(_0x4791('0xb3')));_0x2bd076['use'](_0x4791('0xb4'),require(_0x4791('0xb5')));_0x2bd076['use'](_0x4791('0xb6'),require('./api/intFreshsalesConfiguration'));_0x2bd076[_0x4791('0xb')]('/api/integrations/freshsales/fields',require(_0x4791('0xb7')));_0x2bd076[_0x4791('0xb')]('/api/networks',require(_0x4791('0xb8')));_0x2bd076[_0x4791('0xb')](_0x4791('0xb9'),require(_0x4791('0xba')));_0x2bd076['use'](_0x4791('0xbb'),require(_0x4791('0xbc')));_0x2bd076['use'](_0x4791('0xbd'),require('./api/jscriptyAnswerReport'));_0x2bd076[_0x4791('0xb')]('/api/jscripty/questions/reports',require(_0x4791('0xbe')));_0x2bd076[_0x4791('0xb')](_0x4791('0xbf'),require(_0x4791('0xc0')));_0x2bd076[_0x4791('0xb')]('/api/sms/reports/queue',require(_0x4791('0xc1')));_0x2bd076[_0x4791('0xb')](_0x4791('0xc2'),require(_0x4791('0xc3')));_0x2bd076['use'](_0x4791('0xc4'),require(_0x4791('0xc5')));_0x2bd076[_0x4791('0xb')](_0x4791('0xc6'),require('./api/jscriptyProject'));_0x2bd076['use'](_0x4791('0xc7'),require('./api/setting'));_0x2bd076[_0x4791('0xb')](_0x4791('0xc8'),require('./api/squareOdbc'));_0x2bd076[_0x4791('0xb')](_0x4791('0xc9'),require(_0x4791('0xca')));_0x2bd076[_0x4791('0xb')]('/api/square/recordings',require('./api/squareRecording'));_0x2bd076['use'](_0x4791('0xcb'),require(_0x4791('0xcc')));_0x2bd076[_0x4791('0xb')](_0x4791('0xcd'),require(_0x4791('0xce')));_0x2bd076['use'](_0x4791('0xcf'),require(_0x4791('0xd0')));_0x2bd076[_0x4791('0xb')](_0x4791('0xd1'),require('./api/campaign'));_0x2bd076[_0x4791('0xb')](_0x4791('0xd2'),require(_0x4791('0xd3')));_0x2bd076['use'](_0x4791('0xd4'),require(_0x4791('0xd5')));_0x2bd076[_0x4791('0xb')]('/api/plugins',require(_0x4791('0xd6')));_0x2bd076['use'](_0x4791('0xd7'),require('./api/mailTransferReport'));_0x2bd076[_0x4791('0xb')](_0x4791('0xd8'),require(_0x4791('0xd9')));_0x2bd076[_0x4791('0xb')](_0x4791('0xda'),require(_0x4791('0xdb')));_0x2bd076[_0x4791('0xb')](_0x4791('0xdc'),require('./api/openchannelTransferReport'));_0x2bd076['use']('/api/sms/reports/transfer',require(_0x4791('0xdd')));_0x2bd076['use'](_0x4791('0xde'),require(_0x4791('0xdf')));_0x2bd076[_0x4791('0xb')](_0x4791('0xe0'),require(_0x4791('0xe1')));_0x2bd076[_0x4791('0xb')](_0x4791('0xe2'),require(_0x4791('0xe3')));_0x2bd076[_0x4791('0xb')](_0x4791('0xe4'),require('./api/userProfileSection'));_0x2bd076['use'](_0x4791('0xe5'),require(_0x4791('0xe6')));_0x2bd076[_0x4791('0xb')](_0x4791('0xe7'),require(_0x4791('0xe8')));_0x2bd076[_0x4791('0xb')]('/api/whatsapp/accounts',require(_0x4791('0xe9')));_0x2bd076[_0x4791('0xb')]('/api/whatsapp/applications',require(_0x4791('0xea')));_0x2bd076[_0x4791('0xb')](_0x4791('0xeb'),require(_0x4791('0xec')));_0x2bd076[_0x4791('0xb')](_0x4791('0xed'),require(_0x4791('0xee')));_0x2bd076[_0x4791('0xb')](_0x4791('0xef'),require(_0x4791('0xf0')));_0x2bd076[_0x4791('0xb')]('/api/whatsapp/reports/transfer',require(_0x4791('0xf1')));_0x2bd076[_0x4791('0xb')](_0x4791('0xf2'),require(_0x4791('0xf3')));_0x2bd076[_0x4791('0xb')](_0x4791('0xf4'),require(_0x4791('0xf5')));_0x2bd076[_0x4791('0xb')](_0x4791('0xf6'),require(_0x4791('0xf7')));_0x2bd076[_0x4791('0xb')](_0x4791('0xf8'),require(_0x4791('0xf9')));_0x2bd076[_0x4791('0xb')]('/api/mail_interaction_has_tags',require(_0x4791('0xfa')));_0x2bd076[_0x4791('0xb')](_0x4791('0xfb'),require(_0x4791('0xfc')));_0x2bd076[_0x4791('0xb')](_0x4791('0xfd'),require(_0x4791('0xfe')));_0x2bd076[_0x4791('0xb')]('/api/auth/activedirectory',require(_0x4791('0xff')));_0x2bd076['use'](_0x4791('0x100'),require(_0x4791('0x101')));_0x2bd076[_0x4791('0xb')]('/api/rpc',require(_0x4791('0x102')));_0x2bd076[_0x4791('0xb')]('/api/version',require(_0x4791('0x103')));_0x2bd076[_0x4791('0xb')](_0x4791('0x104'),require(_0x4791('0x105')));_0x2bd076['use'](_0x4791('0x106'),require(_0x4791('0x107')));_0x2bd076[_0x4791('0xb')](_0x4791('0x108'),require(_0x4791('0x109')));_0x2bd076['use'](_0x4791('0x10a'),clientSideLogs);_0x2bd076[_0x4791('0xb')]('/apidoc',express[_0x4791('0x10b')](path[_0x4791('0x10c')](config['root'],_0x4791('0x10d'))));_0x2bd076['use'](_0x4791('0x10e'),express[_0x4791('0x10b')](path[_0x4791('0x10c')](config['root'],_0x4791('0x10e'))));_0x2bd076['use'](_0x4791('0x10f'),express[_0x4791('0x10b')](path[_0x4791('0x10c')](config[_0x4791('0x110')],_0x4791('0x10f'))));_0x2bd076[_0x4791('0xb')](_0x4791('0x111'),express[_0x4791('0x10b')](path['join'](config[_0x4791('0x110')],'snippet',_0x4791('0x112'))));_0x2bd076[_0x4791('0xb')](_0x4791('0x113'),express[_0x4791('0x10b')](path[_0x4791('0x10c')](config[_0x4791('0x110')],_0x4791('0x114'))));_0x2bd076[_0x4791('0x115')]('/:url(api|auth|components|app|bower_components|assets)/*')[_0x4791('0x116')](errors[0x194]);_0x2bd076[_0x4791('0x115')]('/*')[_0x4791('0x116')](function(_0x2e2d4d,_0x558ea5){_0x558ea5['sendFile'](path['resolve'](_0x2bd076[_0x4791('0x116')]('appPath')+_0x4791('0x117')));});return _0x2bd076;});};
\ No newline at end of file
+var _0x9a3c=['/api/pm2','./api/pm2','/api/webbar','./api/webbar','static','root','/apidoc','/www','join','/demo','/snippet','snippet','3.9.0','/plugins','/server/files/plugins','route','get','resolve','appPath','path','express','./errors','./config/environment','./utils/client-side-logger','setupLoggers','default','then','use','/api/users','./api/user','./api/voiceChanSpy','/api/voice/contexts','./api/voiceContext','/api/voice/extensions','/api/voice/mohs','./api/voiceMusicOnHold','/api/voice/queues','./api/voiceQueue','/api/voice/recordings','./api/voiceRecording','./api/screenRecording','/api/voice/mails','/api/voice/mails/messages','/api/voice/dials/reports','./api/voiceDialReport','/api/voice/agents/reports','./api/voiceAgentReport','./api/voiceQueueReport','/api/members/reports','./api/memberReport','/api/trunks','/api/voice/transfers/reports','./api/voiceTransferReport','/api/mail/out_servers','./api/mailServerOut','/api/mail/accounts','./api/mailAccount','./api/mailSubstatus','/api/mail/interactions','./api/mailInteraction','./api/mailMessage','/api/mail/applications','/api/mail/reports/queue','./api/mailQueueReport','/api/dashboards','/api/fax/accounts','./api/faxAccount','./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/sms/applications','./api/smsApplication','/api/sms/interactions','./api/smsInteraction','/api/sms/messages','./api/smsMessage','./api/smsQueue','./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/chat/applications','./api/chatApplication','/api/chat/interactions','./api/chatInteraction','/api/chat/messages','./api/chatMessage','/api/chat/offline_messages','./api/chatOfflineMessage','./api/chatQueue','/api/chat/groups','./api/chatGroup','/api/chat/proactive_actions','./api/chatProactiveAction','/api/cm/companies','./api/cmCompany','/api/cm/hopper','./api/cmHopper','/api/cm/hopper_black','./api/cmHopperBlack','/api/cm/hopper_final','./api/cmHopperFinal','/api/cm/hopper_history','./api/cmHopperHistory','/api/cm/custom_fields','./api/cmCustomField','/api/actions','./api/action','./api/automation','/api/canned_answers','./api/cannedAnswer','/api/dispositions','./api/disposition','/api/conditions','./api/condition','/api/intervals','./api/interval','/api/pauses','./api/pause','/api/cdr','./api/cdr','/api/voiceQueuesLog','./api/voiceQueuesLog','/api/schedules','./api/schedule','./api/sound','/api/tags','./api/tag','/api/contact_item_types','./api/contactItemType','/api/cm_contact_has_items','./api/cmContactHasItem','/api/templates','./api/template','/api/triggers','./api/trigger','/api/variables','./api/variable','/api/integrations','./api/integration','/api/integrations/reports','/api/analytics/custom_reports','/api/analytics/default_reports','./api/analyticDefaultReport','/api/analytics/extracted_reports','./api/analyticFieldReport','/api/integrations/salesforce/accounts','./api/intSalesforceAccount','./api/intSalesforceConfiguration','/api/integrations/salesforce/fields','/api/integrations/sugarcrm/accounts','/api/integrations/sugarcrm/configurations','/api/integrations/sugarcrm/fields','/api/integrations/desk/configurations','./api/intDeskConfiguration','/api/integrations/desk/fields','./api/intDeskField','/api/integrations/zoho/accounts','/api/integrations/zoho/configurations','./api/intZohoConfiguration','/api/integrations/zoho/fields','./api/intZohoField','./api/intZendeskAccount','/api/integrations/zendesk/configurations','/api/integrations/zendesk/fields','./api/intZendeskField','/api/integrations/freshdesk/accounts','./api/intFreshdeskAccount','./api/intFreshdeskConfiguration','/api/integrations/freshdesk/fields','/api/integrations/vtiger/accounts','./api/intVtigerAccount','/api/integrations/vtiger/configurations','./api/intVtigerConfiguration','/api/integrations/vtiger/fields','./api/intVtigerField','/api/integrations/servicenow/accounts','/api/integrations/servicenow/configurations','./api/intServicenowConfiguration','/api/integrations/servicenow/fields','./api/intServicenowField','/api/integrations/dynamics365/accounts','./api/intDynamics365Account','/api/integrations/dynamics365/configurations','./api/intDynamics365Configuration','/api/integrations/dynamics365/fields','/api/integrations/freshsales/accounts','./api/intFreshsalesAccount','/api/integrations/freshsales/configurations','/api/integrations/freshsales/fields','./api/intFreshsalesField','/api/networks','./api/network','/api/chat/reports/queue','./api/chatQueueReport','/api/chat/internal/messages','./api/chatInternalMessage','/api/jscripty/answers/reports','/api/jscripty/questions/reports','./api/jscriptyQuestionReport','/api/jscripty/sessions/reports','/api/sms/reports/queue','./api/smsQueueReport','/api/square/reports','/api/square/details/reports','./api/squareReportDetail','/api/jscripty/projects','./api/jscriptyProject','/api/settings','./api/setting','/api/square/odbc','./api/squareOdbc','/api/square/projects','./api/squareProject','/api/square/recordings','./api/squareRecording','/api/square/messages','./api/squareMessage','/api/teams','./api/team','/api/license','./api/license','/api/campaigns','/api/migrations','/api/attachments','./api/attachment','/api/plugins','./api/plugin','/api/mail/reports/transfer','./api/mailTransferReport','./api/chatTransferReport','/api/fax/reports/transfer','./api/faxTransferReport','/api/openchannel/reports/transfer','./api/openchannelTransferReport','/api/sms/reports/transfer','/api/cm/lists','./api/voicePrefix','/api/userProfiles','./api/userProfile','/api/userProfile/sections','./api/userProfileSection','/api/userProfile/resources','./api/userProfileResource','/api/userNotifications','/api/whatsapp/accounts','/api/whatsapp/applications','./api/whatsappApplication','./api/whatsappQueueReport','/api/whatsapp/reports/transfer','./api/whatsappQueue','/api/cloudProviders','./api/cloudProvider','/api/realtime','./api/realtime','/api/user-settings','./api/user-setting','/api/mail_interaction_has_tags','./api/mailInteractionHasTag','/api/auth/google','./api/authGoogle','./api/authActiveDirectory','./api/jira','/api/rpc','/api/version','./api/version','/api/system','./api/system'];(function(_0x4bb167,_0x3dbed8){var _0xac58f2=function(_0x885639){while(--_0x885639){_0x4bb167['push'](_0x4bb167['shift']());}};_0xac58f2(++_0x3dbed8);}(_0x9a3c,0x12c));var _0xc9a3=function(_0x43d11d,_0xccff91){_0x43d11d=_0x43d11d-0x0;var _0x38cd08=_0x9a3c[_0x43d11d];return _0x38cd08;};'use strict';var path=require(_0xc9a3('0x0'));var express=require(_0xc9a3('0x1'));var errors=require(_0xc9a3('0x2'));var config=require(_0xc9a3('0x3'));var setupLoggers=require(_0xc9a3('0x4'))[_0xc9a3('0x5')];var clientSideLogs=require('./api/client-side-logs');exports[_0xc9a3('0x6')]=function(_0x5141f9){return setupLoggers(_0x5141f9)[_0xc9a3('0x7')](function(){_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x9'),require(_0xc9a3('0xa')));_0x5141f9[_0xc9a3('0x8')]('/api/voice/chanspy',require(_0xc9a3('0xb')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xc'),require(_0xc9a3('0xd')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xe'),require('./api/voiceExtension'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xf'),require(_0xc9a3('0x10')));_0x5141f9['use'](_0xc9a3('0x11'),require(_0xc9a3('0x12')));_0x5141f9['use'](_0xc9a3('0x13'),require(_0xc9a3('0x14')));_0x5141f9[_0xc9a3('0x8')]('/api/screen/recordings',require(_0xc9a3('0x15')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x16'),require('./api/voiceMail'));_0x5141f9['use'](_0xc9a3('0x17'),require('./api/voiceMailMessage'));_0x5141f9[_0xc9a3('0x8')]('/api/voice/calls/reports',require('./api/voiceCallReport'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x18'),require(_0xc9a3('0x19')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x1a'),require(_0xc9a3('0x1b')));_0x5141f9[_0xc9a3('0x8')]('/api/voice/queues/reports',require(_0xc9a3('0x1c')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x1d'),require(_0xc9a3('0x1e')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x1f'),require('./api/trunk'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x20'),require(_0xc9a3('0x21')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x22'),require(_0xc9a3('0x23')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x24'),require(_0xc9a3('0x25')));_0x5141f9[_0xc9a3('0x8')]('/api/mail/queues',require('./api/mailQueue'));_0x5141f9['use']('/api/mail/substatuses',require(_0xc9a3('0x26')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x27'),require(_0xc9a3('0x28')));_0x5141f9[_0xc9a3('0x8')]('/api/mail/messages',require(_0xc9a3('0x29')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x2a'),require('./api/mailApplication'));_0x5141f9['use'](_0xc9a3('0x2b'),require(_0xc9a3('0x2c')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x2d'),require('./api/dashboard'));_0x5141f9['use']('/api/dashboards/items',require('./api/dashboardItem'));_0x5141f9['use'](_0xc9a3('0x2e'),require(_0xc9a3('0x2f')));_0x5141f9[_0xc9a3('0x8')]('/api/fax/applications',require(_0xc9a3('0x30')));_0x5141f9['use'](_0xc9a3('0x31'),require(_0xc9a3('0x32')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x33'),require(_0xc9a3('0x34')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x35'),require(_0xc9a3('0x36')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x37'),require('./api/faxQueueReport'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x38'),require('./api/smsAccount'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x39'),require(_0xc9a3('0x3a')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x3b'),require(_0xc9a3('0x3c')));_0x5141f9['use'](_0xc9a3('0x3d'),require(_0xc9a3('0x3e')));_0x5141f9[_0xc9a3('0x8')]('/api/sms/queues',require(_0xc9a3('0x3f')));_0x5141f9[_0xc9a3('0x8')]('/api/openchannel/accounts',require(_0xc9a3('0x40')));_0x5141f9['use'](_0xc9a3('0x41'),require(_0xc9a3('0x42')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x43'),require(_0xc9a3('0x44')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x45'),require(_0xc9a3('0x46')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x47'),require(_0xc9a3('0x48')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x49'),require(_0xc9a3('0x4a')));_0x5141f9[_0xc9a3('0x8')]('/api/openchannel/reports/queue',require('./api/openchannelQueueReport'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x4b'),require(_0xc9a3('0x4c')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x4d'),require(_0xc9a3('0x4e')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x4f'),require(_0xc9a3('0x50')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x51'),require(_0xc9a3('0x52')));_0x5141f9['use']('/api/chat/queues',require(_0xc9a3('0x53')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x54'),require(_0xc9a3('0x55')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x56'),require(_0xc9a3('0x57')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x58'),require(_0xc9a3('0x59')));_0x5141f9[_0xc9a3('0x8')]('/api/cm/contacts',require('./api/cmContact'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x5a'),require(_0xc9a3('0x5b')));_0x5141f9['use'](_0xc9a3('0x5c'),require(_0xc9a3('0x5d')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x5e'),require(_0xc9a3('0x5f')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x60'),require(_0xc9a3('0x61')));_0x5141f9['use'](_0xc9a3('0x62'),require(_0xc9a3('0x63')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x64'),require(_0xc9a3('0x65')));_0x5141f9[_0xc9a3('0x8')]('/api/automations',require(_0xc9a3('0x66')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x67'),require(_0xc9a3('0x68')));_0x5141f9['use'](_0xc9a3('0x69'),require(_0xc9a3('0x6a')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x6b'),require(_0xc9a3('0x6c')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x6d'),require(_0xc9a3('0x6e')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x6f'),require(_0xc9a3('0x70')));_0x5141f9['use'](_0xc9a3('0x71'),require(_0xc9a3('0x72')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x73'),require(_0xc9a3('0x74')));_0x5141f9['use'](_0xc9a3('0x75'),require(_0xc9a3('0x76')));_0x5141f9[_0xc9a3('0x8')]('/api/sounds',require(_0xc9a3('0x77')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x78'),require(_0xc9a3('0x79')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x7a'),require(_0xc9a3('0x7b')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x7c'),require(_0xc9a3('0x7d')));_0x5141f9['use']('/api/cm_hopper_additional_phones',require('./api/cmHopperAdditionalPhone'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x7e'),require(_0xc9a3('0x7f')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x80'),require(_0xc9a3('0x81')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x82'),require(_0xc9a3('0x83')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x84'),require(_0xc9a3('0x85')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x86'),require('./api/integrationReport'));_0x5141f9['use'](_0xc9a3('0x87'),require('./api/analyticCustomReport'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x88'),require(_0xc9a3('0x89')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x8a'),require('./api/analyticExtractedReport'));_0x5141f9[_0xc9a3('0x8')]('/api/analytics/metrics',require('./api/analyticMetric'));_0x5141f9[_0xc9a3('0x8')]('/api/analytics/field_reports',require(_0xc9a3('0x8b')));_0x5141f9['use']('/api/analytics/tree_reports',require('./api/analyticTreeReport'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x8c'),require(_0xc9a3('0x8d')));_0x5141f9[_0xc9a3('0x8')]('/api/integrations/salesforce/configurations',require(_0xc9a3('0x8e')));_0x5141f9['use'](_0xc9a3('0x8f'),require('./api/intSalesforceField'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x90'),require('./api/intSugarcrmAccount'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x91'),require('./api/intSugarcrmConfiguration'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x92'),require('./api/intSugarcrmField'));_0x5141f9['use']('/api/integrations/desk/accounts',require('./api/intDeskAccount'));_0x5141f9['use'](_0xc9a3('0x93'),require(_0xc9a3('0x94')));_0x5141f9['use'](_0xc9a3('0x95'),require(_0xc9a3('0x96')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x97'),require('./api/intZohoAccount'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x98'),require(_0xc9a3('0x99')));_0x5141f9['use'](_0xc9a3('0x9a'),require(_0xc9a3('0x9b')));_0x5141f9[_0xc9a3('0x8')]('/api/integrations/zendesk/accounts',require(_0xc9a3('0x9c')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x9d'),require('./api/intZendeskConfiguration'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x9e'),require(_0xc9a3('0x9f')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xa0'),require(_0xc9a3('0xa1')));_0x5141f9[_0xc9a3('0x8')]('/api/integrations/freshdesk/configurations',require(_0xc9a3('0xa2')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xa3'),require('./api/intFreshdeskField'));_0x5141f9['use'](_0xc9a3('0xa4'),require(_0xc9a3('0xa5')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xa6'),require(_0xc9a3('0xa7')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xa8'),require(_0xc9a3('0xa9')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xaa'),require('./api/intServicenowAccount'));_0x5141f9['use'](_0xc9a3('0xab'),require(_0xc9a3('0xac')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xad'),require(_0xc9a3('0xae')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xaf'),require(_0xc9a3('0xb0')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xb1'),require(_0xc9a3('0xb2')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xb3'),require('./api/intDynamics365Field'));_0x5141f9['use'](_0xc9a3('0xb4'),require(_0xc9a3('0xb5')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xb6'),require('./api/intFreshsalesConfiguration'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xb7'),require(_0xc9a3('0xb8')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xb9'),require(_0xc9a3('0xba')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xbb'),require(_0xc9a3('0xbc')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xbd'),require(_0xc9a3('0xbe')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xbf'),require('./api/jscriptyAnswerReport'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xc0'),require(_0xc9a3('0xc1')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xc2'),require('./api/jscriptySessionReport'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xc3'),require(_0xc9a3('0xc4')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xc5'),require('./api/squareReport'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xc6'),require(_0xc9a3('0xc7')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xc8'),require(_0xc9a3('0xc9')));_0x5141f9['use'](_0xc9a3('0xca'),require(_0xc9a3('0xcb')));_0x5141f9['use'](_0xc9a3('0xcc'),require(_0xc9a3('0xcd')));_0x5141f9['use'](_0xc9a3('0xce'),require(_0xc9a3('0xcf')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xd0'),require(_0xc9a3('0xd1')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xd2'),require(_0xc9a3('0xd3')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xd4'),require(_0xc9a3('0xd5')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xd6'),require(_0xc9a3('0xd7')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xd8'),require('./api/campaign'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xd9'),require('./api/migration'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xda'),require(_0xc9a3('0xdb')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xdc'),require(_0xc9a3('0xdd')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xde'),require(_0xc9a3('0xdf')));_0x5141f9['use']('/api/chat/reports/transfer',require(_0xc9a3('0xe0')));_0x5141f9['use'](_0xc9a3('0xe1'),require(_0xc9a3('0xe2')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xe3'),require(_0xc9a3('0xe4')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xe5'),require('./api/smsTransferReport'));_0x5141f9['use'](_0xc9a3('0xe6'),require('./api/cmList'));_0x5141f9[_0xc9a3('0x8')]('/api/voice/prefixes',require(_0xc9a3('0xe7')));_0x5141f9['use'](_0xc9a3('0xe8'),require(_0xc9a3('0xe9')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xea'),require(_0xc9a3('0xeb')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xec'),require(_0xc9a3('0xed')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xee'),require('./api/userNotification'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xef'),require('./api/whatsappAccount'));_0x5141f9['use'](_0xc9a3('0xf0'),require(_0xc9a3('0xf1')));_0x5141f9['use']('/api/whatsapp/interactions',require('./api/whatsappInteraction'));_0x5141f9[_0xc9a3('0x8')]('/api/whatsapp/messages',require('./api/whatsappMessage'));_0x5141f9[_0xc9a3('0x8')]('/api/whatsapp/reports/queue',require(_0xc9a3('0xf2')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xf3'),require('./api/whatsappTransferReport'));_0x5141f9[_0xc9a3('0x8')]('/api/whatsapp/queues',require(_0xc9a3('0xf4')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xf5'),require(_0xc9a3('0xf6')));_0x5141f9['use'](_0xc9a3('0xf7'),require(_0xc9a3('0xf8')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xf9'),require(_0xc9a3('0xfa')));_0x5141f9['use'](_0xc9a3('0xfb'),require(_0xc9a3('0xfc')));_0x5141f9[_0xc9a3('0x8')]('/api/auth/local',require('./api/authLocal'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0xfd'),require(_0xc9a3('0xfe')));_0x5141f9['use']('/api/auth/activedirectory',require(_0xc9a3('0xff')));_0x5141f9['use']('/api/jira',require(_0xc9a3('0x100')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x101'),require('./api/rpc'));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x102'),require(_0xc9a3('0x103')));_0x5141f9['use'](_0xc9a3('0x104'),require(_0xc9a3('0x105')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x106'),require(_0xc9a3('0x107')));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x108'),require(_0xc9a3('0x109')));_0x5141f9[_0xc9a3('0x8')]('/api/logs',clientSideLogs);_0x5141f9[_0xc9a3('0x8')]('/apidoc',express[_0xc9a3('0x10a')](path['join'](config[_0xc9a3('0x10b')],_0xc9a3('0x10c'))));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x10d'),express['static'](path[_0xc9a3('0x10e')](config[_0xc9a3('0x10b')],_0xc9a3('0x10d'))));_0x5141f9['use'](_0xc9a3('0x10f'),express[_0xc9a3('0x10a')](path['join'](config[_0xc9a3('0x10b')],_0xc9a3('0x10f'))));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x110'),express[_0xc9a3('0x10a')](path[_0xc9a3('0x10e')](config[_0xc9a3('0x10b')],_0xc9a3('0x111'),_0xc9a3('0x112'))));_0x5141f9[_0xc9a3('0x8')](_0xc9a3('0x113'),express[_0xc9a3('0x10a')](path[_0xc9a3('0x10e')](config[_0xc9a3('0x10b')],_0xc9a3('0x114'))));_0x5141f9[_0xc9a3('0x115')]('/:url(api|auth|components|app|bower_components|assets)/*')[_0xc9a3('0x116')](errors[0x194]);_0x5141f9[_0xc9a3('0x115')]('/*')[_0xc9a3('0x116')](function(_0x375939,_0x17e95b){_0x17e95b['sendFile'](path[_0xc9a3('0x117')](_0x5141f9[_0xc9a3('0x116')](_0xc9a3('0x118'))+'/index.html'));});return _0x5141f9;});};
\ No newline at end of file
index f3be5d3..872032f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1d50=['rpc','port','localhost','error','log','Express\x20RPC\x20server\x20listening\x20on\x20%s:%d!','../config/triggers','default','RPC\x20listening\x20on\x20','jayson/promise','../config/environment','listen','merge','../api/voiceExtension/voiceExtension.rpc','../api/voiceQueue/voiceQueue.rpc','../api/voiceCallReport/voiceCallReport.rpc','../api/voiceDialReport/voiceDialReport.rpc','../api/voiceQueueReport/voiceQueueReport.rpc','../api/memberReport/memberReport.rpc','../api/trunk/trunk.rpc','../api/voiceTransferReport/voiceTransferReport.rpc','../api/userVoiceQueueRt/userVoiceQueueRt.rpc','../api/mailServerIn/mailServerIn.rpc','../api/mailQueue/mailQueue.rpc','../api/mailInteraction/mailInteraction.rpc','../api/mailMessage/mailMessage.rpc','../api/mailApplication/mailApplication.rpc','../api/faxAccount/faxAccount.rpc','../api/faxInteraction/faxInteraction.rpc','../api/faxQueue/faxQueue.rpc','../api/faxQueueReport/faxQueueReport.rpc','../api/smsAccount/smsAccount.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/chatInteraction/chatInteraction.rpc','../api/chatMessage/chatMessage.rpc','../api/chatQueue/chatQueue.rpc','../api/cmContact/cmContact.rpc','../api/cmHopper/cmHopper.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/intSalesforceAccount/intSalesforceAccount.rpc','../api/intSugarcrmAccount/intSugarcrmAccount.rpc','../api/intDeskAccount/intDeskAccount.rpc','../api/intFreshdeskAccount/intFreshdeskAccount.rpc','../api/intServicenowAccount/intServicenowAccount.rpc','../api/chatQueueReport/chatQueueReport.rpc','../api/squareReport/squareReport.rpc','../api/squareReportDetail/squareReportDetail.rpc','../api/squareOdbc/squareOdbc.rpc','../api/squareProject/squareProject.rpc','../api/squareRecording/squareRecording.rpc','../api/squareMessage/squareMessage.rpc','../api/campaign/campaign.rpc','../api/plugin/plugin.rpc','../api/whatsappMessage/whatsappMessage.rpc','../api/whatsappQueueReport/whatsappQueueReport.rpc','../api/whatsappQueue/whatsappQueue.rpc','server','http'];(function(_0x465a0c,_0x19d4d5){var _0x1e202e=function(_0x27bd8a){while(--_0x27bd8a){_0x465a0c['push'](_0x465a0c['shift']());}};_0x1e202e(++_0x19d4d5);}(_0x1d50,0x125));var _0x01d5=function(_0x3ae3ac,_0x4f71ba){_0x3ae3ac=_0x3ae3ac-0x0;var _0x48fc96=_0x1d50[_0x3ae3ac];return _0x48fc96;};'use strict';var jayson=require(_0x01d5('0x0'));var _=require('lodash');var config=require(_0x01d5('0x1'));exports[_0x01d5('0x2')]=function(){return new Promise(function(_0x4abed3,_0x5eccef){var _0x3ddbb8={};_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require('../api/user/user.rpc'));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x4')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x5')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require('../api/voiceRecording/voiceRecording.rpc'));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x6')));_0x3ddbb8=_['merge'](_0x3ddbb8,require(_0x01d5('0x7')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require('../api/voiceAgentReport/voiceAgentReport.rpc'));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x8')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x9')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0xa')));_0x3ddbb8=_['merge'](_0x3ddbb8,require(_0x01d5('0xb')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0xc')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0xd')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require('../api/mailAccount/mailAccount.rpc'));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0xe')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0xf')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x10')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x11')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require('../api/mailQueueReport/mailQueueReport.rpc'));_0x3ddbb8=_['merge'](_0x3ddbb8,require(_0x01d5('0x12')));_0x3ddbb8=_['merge'](_0x3ddbb8,require('../api/faxApplication/faxApplication.rpc'));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x13')));_0x3ddbb8=_['merge'](_0x3ddbb8,require('../api/faxMessage/faxMessage.rpc'));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x14')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x15')));_0x3ddbb8=_['merge'](_0x3ddbb8,require(_0x01d5('0x16')));_0x3ddbb8=_['merge'](_0x3ddbb8,require('../api/smsInteraction/smsInteraction.rpc'));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x17')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x18')));_0x3ddbb8=_['merge'](_0x3ddbb8,require(_0x01d5('0x19')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x1a')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x1b')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x1c')));_0x3ddbb8=_['merge'](_0x3ddbb8,require('../api/openchannelQueueReport/openchannelQueueReport.rpc'));_0x3ddbb8=_['merge'](_0x3ddbb8,require(_0x01d5('0x1d')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x1e')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x1f')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x20')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x21')));_0x3ddbb8=_['merge'](_0x3ddbb8,require(_0x01d5('0x22')));_0x3ddbb8=_['merge'](_0x3ddbb8,require(_0x01d5('0x23')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require('../api/cmHopperHistory/cmHopperHistory.rpc'));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x24')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x25')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x26')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x27')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require('../api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.rpc'));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x28')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x29')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x2a')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x2b')));_0x3ddbb8=_['merge'](_0x3ddbb8,require(_0x01d5('0x2c')));_0x3ddbb8=_['merge'](_0x3ddbb8,require(_0x01d5('0x2d')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require('../api/intZohoAccount/intZohoAccount.rpc'));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require('../api/intZendeskAccount/intZendeskAccount.rpc'));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x2e')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require('../api/intVtigerAccount/intVtigerAccount.rpc'));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x2f')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require('../api/intDynamics365Account/intDynamics365Account.rpc'));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require('../api/intFreshsalesAccount/intFreshsalesAccount.rpc'));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x30')));_0x3ddbb8=_['merge'](_0x3ddbb8,require('../api/smsQueueReport/smsQueueReport.rpc'));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x31')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x32')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require('../api/setting/setting.rpc'));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x33')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x34')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x35')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x36')));_0x3ddbb8=_['merge'](_0x3ddbb8,require(_0x01d5('0x37')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require('../api/attachment/attachment.rpc'));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x38')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require('../api/whatsappAccount/whatsappAccount.rpc'));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require('../api/whatsappInteraction/whatsappInteraction.rpc'));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x39')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x3a')));_0x3ddbb8=_[_0x01d5('0x3')](_0x3ddbb8,require(_0x01d5('0x3b')));var _0x45742a=jayson[_0x01d5('0x3c')](_0x3ddbb8)[_0x01d5('0x3d')]();var _0x38563c=config[_0x01d5('0x3e')][_0x01d5('0x3f')]||config[_0x01d5('0x3f')]+0x1;var _0x216ded=config[_0x01d5('0x3e')]['ip']||_0x01d5('0x40');_0x45742a['on'](_0x01d5('0x41'),function(_0x140356){return _0x5eccef(_0x140356);});_0x45742a[_0x01d5('0x2')](_0x38563c,_0x216ded,function(){console[_0x01d5('0x42')](_0x01d5('0x43'),_0x216ded,_0x38563c);require(_0x01d5('0x44'))[_0x01d5('0x45')]();return _0x4abed3(_0x01d5('0x46')+_0x216ded+':'+_0x38563c);});});};
\ No newline at end of file
+var _0xe64b=['../api/mailServerIn/mailServerIn.rpc','../api/mailQueue/mailQueue.rpc','../api/mailInteraction/mailInteraction.rpc','../api/mailMessage/mailMessage.rpc','../api/mailApplication/mailApplication.rpc','../api/faxInteraction/faxInteraction.rpc','../api/faxMessage/faxMessage.rpc','../api/faxQueue/faxQueue.rpc','../api/faxQueueReport/faxQueueReport.rpc','../api/smsInteraction/smsInteraction.rpc','../api/smsMessage/smsMessage.rpc','../api/smsQueue/smsQueue.rpc','../api/openchannelApplication/openchannelApplication.rpc','../api/openchannelInteraction/openchannelInteraction.rpc','../api/openchannelMessage/openchannelMessage.rpc','../api/chatInteraction/chatInteraction.rpc','../api/chatQueue/chatQueue.rpc','../api/cmContact/cmContact.rpc','../api/cmHopper/cmHopper.rpc','../api/cmHopperFinal/cmHopperFinal.rpc','../api/cmHopperHistory/cmHopperHistory.rpc','../api/reportAgentPreview/reportAgentPreview.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/intDeskAccount/intDeskAccount.rpc','../api/intZendeskAccount/intZendeskAccount.rpc','../api/intServicenowAccount/intServicenowAccount.rpc','../api/intDynamics365Account/intDynamics365Account.rpc','../api/intFreshsalesAccount/intFreshsalesAccount.rpc','../api/chatQueueReport/chatQueueReport.rpc','../api/squareReport/squareReport.rpc','../api/squareReportDetail/squareReportDetail.rpc','../api/setting/setting.rpc','../api/squareOdbc/squareOdbc.rpc','../api/squareRecording/squareRecording.rpc','../api/squareMessage/squareMessage.rpc','../api/campaign/campaign.rpc','../api/attachment/attachment.rpc','../api/plugin/plugin.rpc','../api/whatsappAccount/whatsappAccount.rpc','../api/whatsappInteraction/whatsappInteraction.rpc','../api/whatsappMessage/whatsappMessage.rpc','server','http','rpc','port','error','log','../config/triggers','default','jayson/promise','../config/environment','listen','merge','../api/user/user.rpc','../api/voiceExtension/voiceExtension.rpc','../api/voiceQueue/voiceQueue.rpc','../api/voiceRecording/voiceRecording.rpc','../api/voiceDialReport/voiceDialReport.rpc','../api/voiceQueueReport/voiceQueueReport.rpc','../api/memberReport/memberReport.rpc','../api/trunk/trunk.rpc','../api/voiceTransferReport/voiceTransferReport.rpc','../api/userVoiceQueueRt/userVoiceQueueRt.rpc'];(function(_0x24237f,_0x4cf32c){var _0x48298e=function(_0x3f7511){while(--_0x3f7511){_0x24237f['push'](_0x24237f['shift']());}};_0x48298e(++_0x4cf32c);}(_0xe64b,0xc4));var _0xbe64=function(_0x1b4876,_0x3e8420){_0x1b4876=_0x1b4876-0x0;var _0x30b37b=_0xe64b[_0x1b4876];return _0x30b37b;};'use strict';var jayson=require(_0xbe64('0x0'));var _=require('lodash');var config=require(_0xbe64('0x1'));exports[_0xbe64('0x2')]=function(){return new Promise(function(_0x5d9c8d,_0xe2e71b){var _0x33d390={};_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x4')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x5')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x6')));_0x33d390=_['merge'](_0x33d390,require(_0xbe64('0x7')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require('../api/voiceCallReport/voiceCallReport.rpc'));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x8')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require('../api/voiceAgentReport/voiceAgentReport.rpc'));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x9')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0xa')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0xb')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0xc')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0xd')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0xe')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require('../api/mailAccount/mailAccount.rpc'));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0xf')));_0x33d390=_['merge'](_0x33d390,require(_0xbe64('0x10')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x11')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x12')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require('../api/mailQueueReport/mailQueueReport.rpc'));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require('../api/faxAccount/faxAccount.rpc'));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require('../api/faxApplication/faxApplication.rpc'));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x13')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x14')));_0x33d390=_['merge'](_0x33d390,require(_0xbe64('0x15')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x16')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require('../api/smsAccount/smsAccount.rpc'));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x17')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x18')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x19')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x1a')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x1b')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x1c')));_0x33d390=_['merge'](_0x33d390,require('../api/openchannelQueue/openchannelQueue.rpc'));_0x33d390=_['merge'](_0x33d390,require('../api/openchannelQueueReport/openchannelQueueReport.rpc'));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x1d')));_0x33d390=_['merge'](_0x33d390,require('../api/chatMessage/chatMessage.rpc'));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x1e')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x1f')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x20')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require('../api/cmHopperBlack/cmHopperBlack.rpc'));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x21')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x22')));_0x33d390=_['merge'](_0x33d390,require(_0xbe64('0x23')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x24')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x25')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x26')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x27')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x28')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x29')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x2a')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x2b')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require('../api/intSugarcrmAccount/intSugarcrmAccount.rpc'));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x2c')));_0x33d390=_['merge'](_0x33d390,require('../api/intZohoAccount/intZohoAccount.rpc'));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x2d')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require('../api/intFreshdeskAccount/intFreshdeskAccount.rpc'));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require('../api/intVtigerAccount/intVtigerAccount.rpc'));_0x33d390=_['merge'](_0x33d390,require(_0xbe64('0x2e')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x2f')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x30')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x31')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require('../api/smsQueueReport/smsQueueReport.rpc'));_0x33d390=_['merge'](_0x33d390,require(_0xbe64('0x32')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x33')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x34')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x35')));_0x33d390=_['merge'](_0x33d390,require('../api/squareProject/squareProject.rpc'));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x36')));_0x33d390=_['merge'](_0x33d390,require(_0xbe64('0x37')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x38')));_0x33d390=_['merge'](_0x33d390,require(_0xbe64('0x39')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x3a')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x3b')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x3c')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require(_0xbe64('0x3d')));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require('../api/whatsappQueueReport/whatsappQueueReport.rpc'));_0x33d390=_[_0xbe64('0x3')](_0x33d390,require('../api/whatsappQueue/whatsappQueue.rpc'));var _0x394b50=jayson[_0xbe64('0x3e')](_0x33d390)[_0xbe64('0x3f')]();var _0x154541=config[_0xbe64('0x40')][_0xbe64('0x41')]||config['port']+0x1;var _0x131263=config['rpc']['ip']||'localhost';_0x394b50['on'](_0xbe64('0x42'),function(_0x10a4e0){return _0xe2e71b(_0x10a4e0);});_0x394b50['listen'](_0x154541,_0x131263,function(){console[_0xbe64('0x43')]('Express\x20RPC\x20server\x20listening\x20on\x20%s:%d!',_0x131263,_0x154541);require(_0xbe64('0x44'))[_0xbe64('0x45')]();return _0x5d9c8d('RPC\x20listening\x20on\x20'+_0x131263+':'+_0x154541);});});};
\ No newline at end of file
index 49aa52a..6060b56 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb501=['SAY\x20NUMBER\x20%s\x20%s','sayDigits','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','GET\x20VARIABLE\x20\x22%s\x22','recordFile','BEEP','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','wait','ID:%s\x20-\x20LABEL:\x20%s\x20-\x20MSG:\x20%s','label','util','events','EventEmitter','./error','call','setEncoding','utf8','headers','emit','ready','line','hangup','substring','520-Invalid','520\x20End\x20of\x20proper','function','replace','result=','indexOf','substr','startsWith','split','length','match','error','code','close','E_AGI_SOCKET_CLOSE','E_AGI_SOCKET_TIMEOUT','destroy','pipe','command','write','prototype','sync','answer','sendRequest','getData','beep','GET\x20DATA\x20\x22%s\x22\x20%s\x20%s','format','VERBOSE\x20\x22%s\x22','exec','isArray','EXEC\x20%s\x20%s','setContext','SET\x20CONTEXT\x20%s','SET\x20EXTENSION\x20%s','setPriority','SET\x20PRIORITY\x20%s','HANGUP','setVariable','isNumber','toString','SET\x20VARIABLE\x20%s\x20\x22%s\x22','sayNumber'];(function(_0x550d12,_0x5384bd){var _0x12103d=function(_0x2a9834){while(--_0x2a9834){_0x550d12['push'](_0x550d12['shift']());}};_0x12103d(++_0x5384bd);}(_0xb501,0x1ce));var _0x1b50=function(_0x445651,_0x13fb75){_0x445651=_0x445651-0x0;var _0x1f2984=_0xb501[_0x445651];return _0x1f2984;};'use strict';var util=require(_0x1b50('0x0'));var _=require('lodash');var EventEmitter=require(_0x1b50('0x1'))[_0x1b50('0x2')];var AGIReply=require('./reply');var AGIError=require(_0x1b50('0x3'));function AGIChannel(_0x1c0893){var _0x185118=this,_0x5f1581=new AGIReply(),_0x5140f2=![],_0x3c12a2={};EventEmitter[_0x1b50('0x4')](_0x185118);_0x1c0893[_0x1b50('0x5')](_0x1b50('0x6'));_0x1c0893['setTimeout'](0x8*0x3c*0x3c*0x3e8);_0x5f1581[_0x1b50('0x5')](_0x1b50('0x6'));_0x5f1581['on'](_0x1b50('0x7'),function(_0x4eee85){for(var _0x261d74 in _0x4eee85){_0x185118[_0x261d74]=_0x4eee85[_0x261d74];}_0x185118[_0x1b50('0x8')](_0x1b50('0x9'));});_0x5f1581['on'](_0x1b50('0xa'),function(_0x30634f){if(_0x30634f['toLowerCase']()==_0x1b50('0xb')){_0x185118['emit'](_0x1b50('0xb'));return;}if(_0x30634f[_0x1b50('0xc')](0x0,0xb)==_0x1b50('0xd')){_0x5140f2=!![];}if(_0x5140f2){_0x3c12a2['rx']+=_0x30634f+'\x0a';if(_0x30634f['search'](_0x1b50('0xe'))!=-0x1){_0x5140f2=![];}}else{_0x3c12a2['rx']=_0x30634f;}if(_0x5140f2){return;}if(typeof _0x3c12a2['cb']==_0x1b50('0xf')){var _0x5890c4=_0x3c12a2['rx'][_0x1b50('0xc')](0x0,0x3),_0x2c4816=null,_0x472be5=null;_0x5890c4=parseInt(_0x5890c4);if(isNaN(_0x5890c4)){_0x3c12a2['cb'](null,{'code':0x1f4,'result':-0x1,'extra':'no\x20code'});return;}if(_0x5890c4!=0xc8){_0x3c12a2['cb'](null,{'code':_0x5890c4,'result':-0x1,'extra':'KO'});return;}_0x2c4816=_0x3c12a2['rx'][_0x1b50('0xc')](0x4)[_0x1b50('0x10')](_0x1b50('0x11'),'');if(_0x2c4816[_0x1b50('0x12')]('\x20')!=-0x1){_0x2c4816=_0x2c4816[_0x1b50('0x13')](0x0,_0x2c4816[_0x1b50('0x12')]('\x20'));}if(_[_0x1b50('0x14')](_0x2c4816,'-1')){_0x2c4816=parseInt(_0x2c4816);}_0x472be5=_0x3c12a2['rx'][_0x1b50('0x15')]('\x20');if(_0x472be5['length']==0x3){_0x472be5=_0x472be5[0x2][_0x1b50('0xc')](0x1,_0x472be5[0x2][_0x1b50('0x16')]-0x1);}else if(_0x472be5['length']>0x3){var _0x42b090=/\((.+)\)/;var _0x1615fa=_0x3c12a2['rx'][_0x1b50('0x17')](_0x42b090);if(_0x1615fa){_0x472be5=_0x1615fa[0x1];}else{_0x472be5=null;}}else{_0x472be5=null;}_0x3c12a2['cb'](null,{'code':_0x5890c4,'result':_0x2c4816,'extra':_0x472be5});}});_0x1c0893['on']('error',function(_0x17c3e2){_0x185118[_0x1b50('0x8')](_0x1b50('0x18'),new AGIError('E_AGI_SOCKET_ERROR',_0x17c3e2[_0x1b50('0x19')]));});_0x1c0893['on'](_0x1b50('0x1a'),function(){_0x185118['emit']('close',new AGIError(_0x1b50('0x1b')));});_0x1c0893['on']('timeout',function(){_0x185118['emit']('timeout',new AGIError(_0x1b50('0x1c')));_0x1c0893[_0x1b50('0x1d')]();});_0x1c0893[_0x1b50('0x1e')](_0x5f1581);this[_0x1b50('0x1f')]=function(_0x211a82,_0x52afb6){var _0x211a82=_0x211a82||'',_0x52afb6=typeof _0x52afb6==_0x1b50('0xf')?_0x52afb6:new Function();_0x3c12a2={'tx':_0x211a82,'rx':'','cb':_0x52afb6};_0x1c0893[_0x1b50('0x20')](_0x211a82+'\x0a');},this['close']=function(){_0x1c0893[_0x1b50('0x1d')]();};}util['inherits'](AGIChannel,EventEmitter);AGIChannel[_0x1b50('0x21')]['sendRequest']=function(_0xd5e8f){return this[_0x1b50('0x1f')][_0x1b50('0x22')](this,_0xd5e8f);};AGIChannel['prototype'][_0x1b50('0x23')]=function(){return this[_0x1b50('0x24')]('ANSWER');};AGIChannel[_0x1b50('0x21')][_0x1b50('0x25')]=function(_0x9d148d,_0x186e28,_0x3bc4bc){_0x9d148d=_0x9d148d===undefined?_0x1b50('0x26'):_0x9d148d;_0x186e28=_0x186e28===undefined?'5':_0x186e28;_0x3bc4bc=_0x3bc4bc===undefined?'1':_0x3bc4bc;return this[_0x1b50('0x24')](util['format'](_0x1b50('0x27'),_0x9d148d,_0x186e28*0x3e8,_0x3bc4bc));};AGIChannel[_0x1b50('0x21')]['noop']=function(_0x162a5c){_0x162a5c=_0x162a5c||'NO\x20MESSAGE';return this[_0x1b50('0x24')](util[_0x1b50('0x28')](_0x1b50('0x29'),_0x162a5c));};AGIChannel[_0x1b50('0x21')][_0x1b50('0x2a')]=function(_0x24b09e,_0x31281b){if(_[_0x1b50('0x2b')](_0x31281b)){return this['sendRequest'](util[_0x1b50('0x28')](_0x1b50('0x2c'),_0x24b09e,_0x31281b['join'](',')));}return this[_0x1b50('0x24')](util['format']('EXEC\x20%s\x20%s',_0x24b09e,_0x31281b));};AGIChannel[_0x1b50('0x21')][_0x1b50('0x2d')]=function(_0xe50065){return this[_0x1b50('0x24')](util[_0x1b50('0x28')](_0x1b50('0x2e'),_0xe50065));};AGIChannel['prototype']['setExtension']=function(_0x39f811){return this[_0x1b50('0x24')](util['format'](_0x1b50('0x2f'),_0x39f811));};AGIChannel[_0x1b50('0x21')][_0x1b50('0x30')]=function(_0xf295ff){return this[_0x1b50('0x24')](util[_0x1b50('0x28')](_0x1b50('0x31'),_0xf295ff));};AGIChannel['prototype']['hangup']=function(){return this[_0x1b50('0x24')](_0x1b50('0x32'));};AGIChannel[_0x1b50('0x21')][_0x1b50('0x33')]=function(_0x450ca8,_0x3b73cc){var _0xf8ef19=_['isBoolean'](_0x3b73cc)||_[_0x1b50('0x34')](_0x3b73cc)?_0x3b73cc[_0x1b50('0x35')]():_0x3b73cc;return this['sendRequest'](util['format'](_0x1b50('0x36'),_0x450ca8,_0xf8ef19?_0xf8ef19[_0x1b50('0x35')]()[_0x1b50('0x10')](/(\r\n|\n|\r)/gm,'\x20'):''));};AGIChannel['prototype'][_0x1b50('0x37')]=function(_0x11f8d7,_0x528667){return this[_0x1b50('0x24')](util[_0x1b50('0x28')](_0x1b50('0x38'),_0x11f8d7,_0x528667));};AGIChannel[_0x1b50('0x21')][_0x1b50('0x39')]=function(_0x1def42,_0x596881){return this[_0x1b50('0x24')](util[_0x1b50('0x28')](_0x1b50('0x3a'),_0x1def42,_0x596881));};AGIChannel[_0x1b50('0x21')][_0x1b50('0x3b')]=function(_0x33ec2f,_0x1dd77b){return this[_0x1b50('0x24')](util[_0x1b50('0x28')](_0x1b50('0x3c'),_0x33ec2f,_0x1dd77b));};AGIChannel[_0x1b50('0x21')][_0x1b50('0x3d')]=function(_0x20101a,_0x30ac3d,_0x40db27){_0x30ac3d=_0x30ac3d||this[_0x1b50('0x3e')];_0x40db27=_0x40db27||0x1;this[_0x1b50('0x2d')](_0x20101a);this['setExtension'](_0x30ac3d);this[_0x1b50('0x30')](_0x40db27);return this[_0x1b50('0x3f')](util[_0x1b50('0x28')](_0x1b50('0x40'),_0x20101a,_0x30ac3d,_0x40db27));};AGIChannel[_0x1b50('0x21')]['getVariable']=function(_0x4b9226){return this[_0x1b50('0x24')](util[_0x1b50('0x28')](_0x1b50('0x41'),_0x4b9226));};AGIChannel[_0x1b50('0x21')][_0x1b50('0x42')]=function(_0x1c00e8,_0x453e04,_0x1cb0d0,_0x215f09,_0x92e14f,_0x4b5a86){_0x453e04=_0x453e04||'wav';_0x1cb0d0=_0x1cb0d0||'';_0x215f09=_0x215f09===undefined?-0x1:_0x215f09==='-1'?-0x1:_0x215f09*0x3e8;_0x92e14f=_0x92e14f===undefined?'':'s='+_0x92e14f;_0x4b5a86=_0x4b5a86?_0x1b50('0x43'):'';return this['sendRequest'](util[_0x1b50('0x28')](_0x1b50('0x44'),_0x1c00e8,_0x453e04,_0x1cb0d0,_0x215f09,_0x4b5a86,_0x92e14f));};AGIChannel[_0x1b50('0x21')][_0x1b50('0x45')]=function(_0x5a9dfe,_0xb6933e){_0xb6933e=_0xb6933e||'';return this[_0x1b50('0x24')](util[_0x1b50('0x28')](_0x1b50('0x46'),_0x5a9dfe,_0xb6933e));};AGIChannel[_0x1b50('0x21')]['agi']=function(_0x25fc12){return this['exec']('AGI',_0x25fc12);};AGIChannel[_0x1b50('0x21')][_0x1b50('0x47')]=function(_0x1dd29d){return this['exec']('WAIT',_0x1dd29d);};AGIChannel[_0x1b50('0x21')][_0x1b50('0x18')]=function(_0x1fab59,_0xb1d970){this['noop'](util[_0x1b50('0x28')](_0x1b50('0x48'),_0x1fab59['id'],_0x1fab59[_0x1b50('0x49')],_0xb1d970));return{'code':0x1f4,'result':'-1','extra':''};};module['exports']=AGIChannel;
\ No newline at end of file
+var _0x3c04=['substring','520-Invalid','520\x20End\x20of\x20proper','function','no\x20code','replace','result=','indexOf','split','length','error','E_AGI_SOCKET_ERROR','code','close','E_AGI_SOCKET_CLOSE','timeout','E_AGI_SOCKET_TIMEOUT','destroy','pipe','command','write','prototype','sendRequest','ANSWER','getData','beep','format','GET\x20DATA\x20\x22%s\x22\x20%s\x20%s','noop','NO\x20MESSAGE','VERBOSE\x20\x22%s\x22','exec','EXEC\x20%s\x20%s','setContext','SET\x20CONTEXT\x20%s','SET\x20EXTENSION\x20%s','setVariable','isNumber','toString','SET\x20VARIABLE\x20%s\x20\x22%s\x22','sayNumber','SAY\x20DIGITS\x20%s\x20%s','sayPhonetic','SAY\x20PHONETIC\x20\x22%s\x22\x20%s','continueAt','setExtension','setPriority','getVariable','GET\x20VARIABLE\x20\x22%s\x22','recordFile','wav','BEEP','STREAM\x20FILE\x20\x22%s\x22\x20\x22%s\x22','agi','AGI','wait','exports','lodash','EventEmitter','./reply','./error','call','utf8','setEncoding','headers','emit','ready','line','hangup'];(function(_0x2c0ce3,_0x1baadc){var _0x523482=function(_0x57e5cc){while(--_0x57e5cc){_0x2c0ce3['push'](_0x2c0ce3['shift']());}};_0x523482(++_0x1baadc);}(_0x3c04,0x192));var _0x43c0=function(_0x46893f,_0x30bd0c){_0x46893f=_0x46893f-0x0;var _0x430f86=_0x3c04[_0x46893f];return _0x430f86;};'use strict';var util=require('util');var _=require(_0x43c0('0x0'));var EventEmitter=require('events')[_0x43c0('0x1')];var AGIReply=require(_0x43c0('0x2'));var AGIError=require(_0x43c0('0x3'));function AGIChannel(_0x2acce3){var _0x212986=this,_0x43818b=new AGIReply(),_0xda1f1f=![],_0x23b839={};EventEmitter[_0x43c0('0x4')](_0x212986);_0x2acce3['setEncoding'](_0x43c0('0x5'));_0x2acce3['setTimeout'](0x8*0x3c*0x3c*0x3e8);_0x43818b[_0x43c0('0x6')]('utf8');_0x43818b['on'](_0x43c0('0x7'),function(_0x53b4b1){for(var _0x100fb8 in _0x53b4b1){_0x212986[_0x100fb8]=_0x53b4b1[_0x100fb8];}_0x212986[_0x43c0('0x8')](_0x43c0('0x9'));});_0x43818b['on'](_0x43c0('0xa'),function(_0x506f13){if(_0x506f13['toLowerCase']()==_0x43c0('0xb')){_0x212986['emit'](_0x43c0('0xb'));return;}if(_0x506f13[_0x43c0('0xc')](0x0,0xb)==_0x43c0('0xd')){_0xda1f1f=!![];}if(_0xda1f1f){_0x23b839['rx']+=_0x506f13+'\x0a';if(_0x506f13['search'](_0x43c0('0xe'))!=-0x1){_0xda1f1f=![];}}else{_0x23b839['rx']=_0x506f13;}if(_0xda1f1f){return;}if(typeof _0x23b839['cb']==_0x43c0('0xf')){var _0x3ad25d=_0x23b839['rx']['substring'](0x0,0x3),_0x3f235e=null,_0x4649fc=null;_0x3ad25d=parseInt(_0x3ad25d);if(isNaN(_0x3ad25d)){_0x23b839['cb'](null,{'code':0x1f4,'result':-0x1,'extra':_0x43c0('0x10')});return;}if(_0x3ad25d!=0xc8){_0x23b839['cb'](null,{'code':_0x3ad25d,'result':-0x1,'extra':'KO'});return;}_0x3f235e=_0x23b839['rx'][_0x43c0('0xc')](0x4)[_0x43c0('0x11')](_0x43c0('0x12'),'');if(_0x3f235e[_0x43c0('0x13')]('\x20')!=-0x1){_0x3f235e=_0x3f235e['substr'](0x0,_0x3f235e[_0x43c0('0x13')]('\x20'));}if(_['startsWith'](_0x3f235e,'-1')){_0x3f235e=parseInt(_0x3f235e);}_0x4649fc=_0x23b839['rx'][_0x43c0('0x14')]('\x20');if(_0x4649fc['length']==0x3){_0x4649fc=_0x4649fc[0x2][_0x43c0('0xc')](0x1,_0x4649fc[0x2][_0x43c0('0x15')]-0x1);}else if(_0x4649fc[_0x43c0('0x15')]>0x3){var _0x2c5b6e=/\((.+)\)/;var _0x3f7db7=_0x23b839['rx']['match'](_0x2c5b6e);if(_0x3f7db7){_0x4649fc=_0x3f7db7[0x1];}else{_0x4649fc=null;}}else{_0x4649fc=null;}_0x23b839['cb'](null,{'code':_0x3ad25d,'result':_0x3f235e,'extra':_0x4649fc});}});_0x2acce3['on']('error',function(_0x5119e9){_0x212986[_0x43c0('0x8')](_0x43c0('0x16'),new AGIError(_0x43c0('0x17'),_0x5119e9[_0x43c0('0x18')]));});_0x2acce3['on'](_0x43c0('0x19'),function(){_0x212986[_0x43c0('0x8')]('close',new AGIError(_0x43c0('0x1a')));});_0x2acce3['on'](_0x43c0('0x1b'),function(){_0x212986[_0x43c0('0x8')](_0x43c0('0x1b'),new AGIError(_0x43c0('0x1c')));_0x2acce3[_0x43c0('0x1d')]();});_0x2acce3[_0x43c0('0x1e')](_0x43818b);this[_0x43c0('0x1f')]=function(_0xad2b9,_0x3873c0){var _0xad2b9=_0xad2b9||'',_0x3873c0=typeof _0x3873c0==_0x43c0('0xf')?_0x3873c0:new Function();_0x23b839={'tx':_0xad2b9,'rx':'','cb':_0x3873c0};_0x2acce3[_0x43c0('0x20')](_0xad2b9+'\x0a');},this['close']=function(){_0x2acce3[_0x43c0('0x1d')]();};}util['inherits'](AGIChannel,EventEmitter);AGIChannel[_0x43c0('0x21')][_0x43c0('0x22')]=function(_0x3f85c4){return this[_0x43c0('0x1f')]['sync'](this,_0x3f85c4);};AGIChannel[_0x43c0('0x21')]['answer']=function(){return this[_0x43c0('0x22')](_0x43c0('0x23'));};AGIChannel['prototype'][_0x43c0('0x24')]=function(_0x1080a0,_0x31fde5,_0x30b428){_0x1080a0=_0x1080a0===undefined?_0x43c0('0x25'):_0x1080a0;_0x31fde5=_0x31fde5===undefined?'5':_0x31fde5;_0x30b428=_0x30b428===undefined?'1':_0x30b428;return this[_0x43c0('0x22')](util[_0x43c0('0x26')](_0x43c0('0x27'),_0x1080a0,_0x31fde5*0x3e8,_0x30b428));};AGIChannel['prototype'][_0x43c0('0x28')]=function(_0x4c4e3d){_0x4c4e3d=_0x4c4e3d||_0x43c0('0x29');return this[_0x43c0('0x22')](util[_0x43c0('0x26')](_0x43c0('0x2a'),_0x4c4e3d));};AGIChannel[_0x43c0('0x21')][_0x43c0('0x2b')]=function(_0x5b9828,_0x2dcc60){if(_['isArray'](_0x2dcc60)){return this[_0x43c0('0x22')](util[_0x43c0('0x26')](_0x43c0('0x2c'),_0x5b9828,_0x2dcc60['join'](',')));}return this[_0x43c0('0x22')](util[_0x43c0('0x26')]('EXEC\x20%s\x20%s',_0x5b9828,_0x2dcc60));};AGIChannel['prototype'][_0x43c0('0x2d')]=function(_0x3d0faa){return this[_0x43c0('0x22')](util[_0x43c0('0x26')](_0x43c0('0x2e'),_0x3d0faa));};AGIChannel[_0x43c0('0x21')]['setExtension']=function(_0x449abf){return this[_0x43c0('0x22')](util[_0x43c0('0x26')](_0x43c0('0x2f'),_0x449abf));};AGIChannel['prototype']['setPriority']=function(_0x11455e){return this['sendRequest'](util[_0x43c0('0x26')]('SET\x20PRIORITY\x20%s',_0x11455e));};AGIChannel[_0x43c0('0x21')][_0x43c0('0xb')]=function(){return this[_0x43c0('0x22')]('HANGUP');};AGIChannel['prototype'][_0x43c0('0x30')]=function(_0x3b9dfa,_0x4275da){var _0x42efbc=_['isBoolean'](_0x4275da)||_[_0x43c0('0x31')](_0x4275da)?_0x4275da[_0x43c0('0x32')]():_0x4275da;return this[_0x43c0('0x22')](util[_0x43c0('0x26')](_0x43c0('0x33'),_0x3b9dfa,_0x42efbc?_0x42efbc['toString']()[_0x43c0('0x11')](/(\r\n|\n|\r)/gm,'\x20'):''));};AGIChannel[_0x43c0('0x21')][_0x43c0('0x34')]=function(_0x1aff97,_0x3285df){return this[_0x43c0('0x22')](util[_0x43c0('0x26')]('SAY\x20NUMBER\x20%s\x20%s',_0x1aff97,_0x3285df));};AGIChannel[_0x43c0('0x21')]['sayDigits']=function(_0x43473,_0x4da289){return this[_0x43c0('0x22')](util['format'](_0x43c0('0x35'),_0x43473,_0x4da289));};AGIChannel[_0x43c0('0x21')][_0x43c0('0x36')]=function(_0x442aaa,_0x450c62){return this[_0x43c0('0x22')](util[_0x43c0('0x26')](_0x43c0('0x37'),_0x442aaa,_0x450c62));};AGIChannel[_0x43c0('0x21')][_0x43c0('0x38')]=function(_0x4fa430,_0x537276,_0x26ed59){_0x537276=_0x537276||this['extension'];_0x26ed59=_0x26ed59||0x1;this['setContext'](_0x4fa430);this[_0x43c0('0x39')](_0x537276);this[_0x43c0('0x3a')](_0x26ed59);return this['noop'](util[_0x43c0('0x26')]('GOTO\x20%s\x20%s\x20%s',_0x4fa430,_0x537276,_0x26ed59));};AGIChannel[_0x43c0('0x21')][_0x43c0('0x3b')]=function(_0x1d3ef7){return this[_0x43c0('0x22')](util[_0x43c0('0x26')](_0x43c0('0x3c'),_0x1d3ef7));};AGIChannel[_0x43c0('0x21')][_0x43c0('0x3d')]=function(_0x437ae9,_0x2088ed,_0x11e23d,_0x6d5913,_0x64e1f2,_0x489c0a){_0x2088ed=_0x2088ed||_0x43c0('0x3e');_0x11e23d=_0x11e23d||'';_0x6d5913=_0x6d5913===undefined?-0x1:_0x6d5913==='-1'?-0x1:_0x6d5913*0x3e8;_0x64e1f2=_0x64e1f2===undefined?'':'s='+_0x64e1f2;_0x489c0a=_0x489c0a?_0x43c0('0x3f'):'';return this[_0x43c0('0x22')](util[_0x43c0('0x26')]('RECORD\x20FILE\x20\x22%s\x22\x20\x22%s\x22\x20\x22%s\x22\x20%s\x20%s\x20%s',_0x437ae9,_0x2088ed,_0x11e23d,_0x6d5913,_0x489c0a,_0x64e1f2));};AGIChannel[_0x43c0('0x21')]['streamFile']=function(_0x31dca4,_0x498c3c){_0x498c3c=_0x498c3c||'';return this[_0x43c0('0x22')](util[_0x43c0('0x26')](_0x43c0('0x40'),_0x31dca4,_0x498c3c));};AGIChannel['prototype'][_0x43c0('0x41')]=function(_0x120952){return this[_0x43c0('0x2b')](_0x43c0('0x42'),_0x120952);};AGIChannel['prototype'][_0x43c0('0x43')]=function(_0x3abc2a){return this[_0x43c0('0x2b')]('WAIT',_0x3abc2a);};AGIChannel[_0x43c0('0x21')][_0x43c0('0x16')]=function(_0x496f84,_0x19ac3c){this[_0x43c0('0x28')](util['format']('ID:%s\x20-\x20LABEL:\x20%s\x20-\x20MSG:\x20%s',_0x496f84['id'],_0x496f84['label'],_0x19ac3c));return{'code':0x1f4,'result':'-1','extra':''};};module[_0x43c0('0x44')]=AGIChannel;
\ No newline at end of file
index 9e6dc74..d08c657 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x670f=['Argument\x20\x27port\x27\x20missing\x20in\x20function\x20call.','Server\x20closed.','[LICENSE\x20VOICE]\x20Server\x20license\x20voice\x20disabled.','Socket\x20closed.','Socket\x20timeout.','Empty\x20command.','Missing\x20\x27ivr.entry\x27\x20menu.','push','format','apply','message','util','Undefined\x20error.'];(function(_0x963330,_0x3971cd){var _0x556065=function(_0x168947){while(--_0x168947){_0x963330['push'](_0x963330['shift']());}};_0x556065(++_0x3971cd);}(_0x670f,0x1d2));var _0xf670=function(_0x4a79d3,_0x1e53c9){_0x4a79d3=_0x4a79d3-0x0;var _0x11c6d5=_0x670f[_0x4a79d3];return _0x11c6d5;};'use strict';var util=require(_0xf670('0x0'));var error={'E_AGI_UNDEFINED':_0xf670('0x1'),'E_AGI_ARGUMENT_PORT':_0xf670('0x2'),'E_AGI_SERVER_ERROR':'Server\x20error.\x20Code:\x20%s.','E_AGI_SERVER_CLOSE':_0xf670('0x3'),'E_AGI_SERVER_MAXCONNECTION':'[LICENSE]\x20Server\x20max\x20connection.\x20Count:\x20%s.','E_AGI_SERVER_VOICE_DISABLED':_0xf670('0x4'),'E_AGI_SOCKET_ERROR':'Socket\x20error.\x20Code:\x20%s.','E_AGI_SOCKET_CLOSE':_0xf670('0x5'),'E_AGI_SOCKET_TIMEOUT':_0xf670('0x6'),'E_AGI_COMMAND_EMPTY':_0xf670('0x7'),'E_AGI_IVR_AGI_NETWORK_SCRIPT':'Missing\x20\x27ivr.agi_network_script\x27.','E_AGI_IVR_ENTRY':_0xf670('0x8')};function AGIError(_0x29ca18){var _0x29ca18=_0x29ca18||null,_0x157390=_0x157390||[],_0x3223eb=0x1,_0x5298bd='';if(!error[_0x29ca18]){_0x29ca18='E_AGI_UNDEFINED';}_0x157390[_0xf670('0x9')](error[_0x29ca18]);while(arguments[_0x3223eb]){_0x157390[_0xf670('0x9')](arguments[_0x3223eb]);_0x3223eb++;}_0x5298bd=util[_0xf670('0xa')][_0xf670('0xb')](util,_0x157390);this[_0xf670('0xc')]=_0x5298bd;this['name']=_0x29ca18;}module['exports']=AGIError;
\ No newline at end of file
+var _0x0632=['Server\x20closed.','[LICENSE]\x20Server\x20max\x20connection.\x20Count:\x20%s.','[LICENSE\x20VOICE]\x20Server\x20license\x20voice\x20disabled.','Socket\x20closed.','Socket\x20timeout.','Empty\x20command.','Missing\x20\x27ivr.agi_network_script\x27.','Missing\x20\x27ivr.entry\x27\x20menu.','E_AGI_UNDEFINED','push','apply','message','name','util','Argument\x20\x27port\x27\x20missing\x20in\x20function\x20call.','Server\x20error.\x20Code:\x20%s.'];(function(_0x9b7f1e,_0x10a7e7){var _0x1c893c=function(_0x458fda){while(--_0x458fda){_0x9b7f1e['push'](_0x9b7f1e['shift']());}};_0x1c893c(++_0x10a7e7);}(_0x0632,0x7d));var _0x2063=function(_0x3b6652,_0x32486d){_0x3b6652=_0x3b6652-0x0;var _0x14d39f=_0x0632[_0x3b6652];return _0x14d39f;};'use strict';var util=require(_0x2063('0x0'));var error={'E_AGI_UNDEFINED':'Undefined\x20error.','E_AGI_ARGUMENT_PORT':_0x2063('0x1'),'E_AGI_SERVER_ERROR':_0x2063('0x2'),'E_AGI_SERVER_CLOSE':_0x2063('0x3'),'E_AGI_SERVER_MAXCONNECTION':_0x2063('0x4'),'E_AGI_SERVER_VOICE_DISABLED':_0x2063('0x5'),'E_AGI_SOCKET_ERROR':'Socket\x20error.\x20Code:\x20%s.','E_AGI_SOCKET_CLOSE':_0x2063('0x6'),'E_AGI_SOCKET_TIMEOUT':_0x2063('0x7'),'E_AGI_COMMAND_EMPTY':_0x2063('0x8'),'E_AGI_IVR_AGI_NETWORK_SCRIPT':_0x2063('0x9'),'E_AGI_IVR_ENTRY':_0x2063('0xa')};function AGIError(_0x32d5e1){var _0x32d5e1=_0x32d5e1||null,_0x1a6672=_0x1a6672||[],_0x465214=0x1,_0x52ec01='';if(!error[_0x32d5e1]){_0x32d5e1=_0x2063('0xb');}_0x1a6672['push'](error[_0x32d5e1]);while(arguments[_0x465214]){_0x1a6672[_0x2063('0xc')](arguments[_0x465214]);_0x465214++;}_0x52ec01=util['format'][_0x2063('0xd')](util,_0x1a6672);this[_0x2063('0xe')]=_0x52ec01;this[_0x2063('0xf')]=_0x32d5e1;}module['exports']=AGIError;
\ No newline at end of file
index 2e61ed8..3104702 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd06f=['message','parse','projectUpdate','exports','events','EventEmitter','ioredis','../../config/environment','redis','defaults','subscribe','agi','emit','error','E_AGI_SERVER_ERROR'];(function(_0x541adc,_0x92d9d1){var _0x120dce=function(_0x2b8983){while(--_0x2b8983){_0x541adc['push'](_0x541adc['shift']());}};_0x120dce(++_0x92d9d1);}(_0xd06f,0xc7));var _0xfd06=function(_0x54b7d1,_0x51504c){_0x54b7d1=_0x54b7d1-0x0;var _0x38ad9b=_0xd06f[_0x54b7d1];return _0x38ad9b;};'use strict';var _=require('lodash');var EventEmitter=require(_0xfd06('0x0'))[_0xfd06('0x1')];var Redis=require(_0xfd06('0x2'));var AGIError=require('./error');var config=require(_0xfd06('0x3'));config[_0xfd06('0x4')]=_[_0xfd06('0x5')](config[_0xfd06('0x4')],{'host':'localhost','port':0x18eb});var eventEmitter=new EventEmitter();var sub=new Redis(config[_0xfd06('0x4')]);sub[_0xfd06('0x6')](_0xfd06('0x7'),function(_0x583bde){if(_0x583bde)return eventEmitter[_0xfd06('0x8')](_0xfd06('0x9'),new AGIError(_0xfd06('0xa'),_0x583bde));});sub['on'](_0xfd06('0xb'),function(_0x2fd287,_0x4b95e8){if(_0x2fd287!=='agi')return;try{var _0x18d98e=JSON[_0xfd06('0xc')](_0x4b95e8);eventEmitter[_0xfd06('0x8')](_0xfd06('0xd'),_0x18d98e);}catch(_0x320ad4){eventEmitter[_0xfd06('0x8')]('error',new AGIError('E_AGI_SERVER_ERROR',_0x320ad4));}});module[_0xfd06('0xe')]={'EventEmitter':eventEmitter};
\ No newline at end of file
+var _0x56e5=['parse','projectUpdate','lodash','events','EventEmitter','ioredis','./error','redis','localhost','subscribe','agi','emit','error','E_AGI_SERVER_ERROR','message'];(function(_0x2645c6,_0x47b0e8){var _0x1faa54=function(_0x5694d1){while(--_0x5694d1){_0x2645c6['push'](_0x2645c6['shift']());}};_0x1faa54(++_0x47b0e8);}(_0x56e5,0x197));var _0x556e=function(_0x4b84ae,_0x26f981){_0x4b84ae=_0x4b84ae-0x0;var _0x3325f8=_0x56e5[_0x4b84ae];return _0x3325f8;};'use strict';var _=require(_0x556e('0x0'));var EventEmitter=require(_0x556e('0x1'))[_0x556e('0x2')];var Redis=require(_0x556e('0x3'));var AGIError=require(_0x556e('0x4'));var config=require('../../config/environment');config[_0x556e('0x5')]=_['defaults'](config['redis'],{'host':_0x556e('0x6'),'port':0x18eb});var eventEmitter=new EventEmitter();var sub=new Redis(config['redis']);sub[_0x556e('0x7')](_0x556e('0x8'),function(_0x3ff164){if(_0x3ff164)return eventEmitter[_0x556e('0x9')](_0x556e('0xa'),new AGIError(_0x556e('0xb'),_0x3ff164));});sub['on'](_0x556e('0xc'),function(_0x95ca7a,_0x2298b1){if(_0x95ca7a!=='agi')return;try{var _0x5b5e41=JSON[_0x556e('0xd')](_0x2298b1);eventEmitter[_0x556e('0x9')](_0x556e('0xe'),_0x5b5e41);}catch(_0x5c4f7a){eventEmitter['emit'](_0x556e('0xa'),new AGIError(_0x556e('0xb'),_0x5c4f7a));}});module['exports']={'EventEmitter':eventEmitter};
\ No newline at end of file
index 0cb85fe..af213ac 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2b39=['invalid','default\x20on\x20switch\x20not\x20found','max\x20retry\x20reach','condition\x20not\x20found','exports','lodash','../../../config/logger','agi','menu','getdigits','vertices','edges','prototype','addVertex','addEdge','push','numberOfEdges','size','relations','getVertex','traverseBFS','info','no\x20vertex\x20found','stop\x20traverse','no\x20edge/s\x20available','length','condition','agicommand','vswitch','target','default'];(function(_0x1b5440,_0x13aaac){var _0x140364=function(_0x515583){while(--_0x515583){_0x1b5440['push'](_0x1b5440['shift']());}};_0x140364(++_0x13aaac);}(_0x2b39,0x11c));var _0x92b3=function(_0x458f49,_0x1a1af1){_0x458f49=_0x458f49-0x0;var _0x36e8c9=_0x2b39[_0x458f49];return _0x36e8c9;};'use strict';var _=require(_0x92b3('0x0'));var logger=require(_0x92b3('0x1'))(_0x92b3('0x2'));var verticesWithRetry=[_0x92b3('0x3'),_0x92b3('0x4'),'getsecretdigits'];var Graph=function(){this[_0x92b3('0x5')]={};this[_0x92b3('0x6')]={};this['numberOfEdges']=0x0;};Graph[_0x92b3('0x7')][_0x92b3('0x8')]=function(_0x3f9be2){this[_0x92b3('0x5')][_0x3f9be2['id']]=_0x3f9be2;this[_0x92b3('0x6')][_0x3f9be2['id']]=[];};Graph[_0x92b3('0x7')][_0x92b3('0x9')]=function(_0x43d220,_0x3bfce1,_0x2430d7){this['edges'][_0x43d220][_0x92b3('0xa')]({'target':_0x3bfce1,'condition':_0x2430d7});this[_0x92b3('0xb')]+=0x1;};Graph[_0x92b3('0x7')][_0x92b3('0xc')]=function(){return _[_0x92b3('0xc')](this[_0x92b3('0x5')]);};Graph[_0x92b3('0x7')][_0x92b3('0xd')]=function(){return this[_0x92b3('0xb')];};Graph[_0x92b3('0x7')][_0x92b3('0xe')]=function(_0xa4b15b){return this['vertices'][_0xa4b15b];};Graph[_0x92b3('0x7')][_0x92b3('0xf')]=function(_0x362066,_0x5b8d49){if(!this[_0x92b3('0x5')][_0x362066]){return logger[_0x92b3('0x10')](_0x92b3('0x11'));}var _0xde90f9=_0x5b8d49(this[_0x92b3('0x5')][_0x362066]);if(!_0xde90f9){return logger[_0x92b3('0x10')](_0x92b3('0x12'));}if(this['edges'][_0x362066]['length']===0x0){return logger[_0x92b3('0x10')](_0x92b3('0x13'));}for(var _0x4c33d8=0x0,_0x3d8d7f=[],_0x126da0=![];_0x4c33d8<this[_0x92b3('0x6')][_0x362066][_0x92b3('0x14')];_0x4c33d8+=0x1){if(this[_0x92b3('0x6')][_0x362066][_0x4c33d8][_0x92b3('0x15')]){_0x3d8d7f=this[_0x92b3('0x6')][_0x362066][_0x4c33d8][_0x92b3('0x15')]['split'](',');for(var _0x217d6a=0x0;_0x217d6a<_0x3d8d7f['length'];_0x217d6a+=0x1){if(this[_0x92b3('0x5')][_0x362066][_0x92b3('0x16')]===_0x92b3('0x17')&&_0x3d8d7f[_0x217d6a]==='-'){_0x126da0=this[_0x92b3('0x6')][_0x362066][_0x4c33d8][_0x92b3('0x18')];logger[_0x92b3('0x10')](_0x92b3('0x19'),_0x3d8d7f[_0x217d6a],this[_0x92b3('0x6')][_0x362066][_0x4c33d8][_0x92b3('0x18')]);}else if(this[_0x92b3('0x5')][_0x362066]['agicommand']===_0x92b3('0x3')&&_0x3d8d7f[_0x217d6a]==='i'){_0x126da0=this['edges'][_0x362066][_0x4c33d8]['target'];logger['info'](_0x92b3('0x1a'),_0x3d8d7f[_0x217d6a],this[_0x92b3('0x6')][_0x362066][_0x4c33d8][_0x92b3('0x18')]);}if(_0x3d8d7f[_0x217d6a]===_0xde90f9){return this[_0x92b3('0xf')](this[_0x92b3('0x6')][_0x362066][_0x4c33d8][_0x92b3('0x18')],_0x5b8d49);}}}else{return this['traverseBFS'](this['edges'][_0x362066][_0x4c33d8]['target'],_0x5b8d49);}}if(_0x3d8d7f[_0x92b3('0x14')]){if(this[_0x92b3('0x5')][_0x362066][_0x92b3('0x16')]==='vswitch'){if(_0x126da0){return this[_0x92b3('0xf')](_0x126da0,_0x5b8d49);}return logger[_0x92b3('0x10')](_0x92b3('0x1b'));}else if(_['includes'](verticesWithRetry,this[_0x92b3('0x5')][_0x362066][_0x92b3('0x16')])){if(_0xde90f9==='-'){return logger[_0x92b3('0x10')](_0x92b3('0x1c'));}if(_0x126da0&&_0xde90f9!=='t'){return this[_0x92b3('0xf')](_0x126da0,_0x5b8d49);}return this[_0x92b3('0xf')](_0x362066,_0x5b8d49);}return logger[_0x92b3('0x10')](_0x92b3('0x1d'));}};module[_0x92b3('0x1e')]=Graph;
\ No newline at end of file
+var _0xfde1=['getsecretdigits','vertices','edges','numberOfEdges','prototype','addVertex','size','getVertex','traverseBFS','no\x20vertex\x20found','stop\x20traverse','info','no\x20edge/s\x20available','condition','split','length','agicommand','vswitch','target','default\x20on\x20switch\x20not\x20found','includes','max\x20retry\x20reach','condition\x20not\x20found','lodash','../../../config/logger','agi','menu','getdigits'];(function(_0x101c7b,_0x4df652){var _0x16a6f2=function(_0x21fc98){while(--_0x21fc98){_0x101c7b['push'](_0x101c7b['shift']());}};_0x16a6f2(++_0x4df652);}(_0xfde1,0x1d7));var _0x1fde=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xfde1[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x1fde('0x0'));var logger=require(_0x1fde('0x1'))(_0x1fde('0x2'));var verticesWithRetry=[_0x1fde('0x3'),_0x1fde('0x4'),_0x1fde('0x5')];var Graph=function(){this[_0x1fde('0x6')]={};this[_0x1fde('0x7')]={};this[_0x1fde('0x8')]=0x0;};Graph[_0x1fde('0x9')][_0x1fde('0xa')]=function(_0x3e6799){this[_0x1fde('0x6')][_0x3e6799['id']]=_0x3e6799;this[_0x1fde('0x7')][_0x3e6799['id']]=[];};Graph[_0x1fde('0x9')]['addEdge']=function(_0x24c931,_0x26dc2b,_0x40f625){this['edges'][_0x24c931]['push']({'target':_0x26dc2b,'condition':_0x40f625});this[_0x1fde('0x8')]+=0x1;};Graph[_0x1fde('0x9')][_0x1fde('0xb')]=function(){return _['size'](this[_0x1fde('0x6')]);};Graph[_0x1fde('0x9')]['relations']=function(){return this[_0x1fde('0x8')];};Graph[_0x1fde('0x9')][_0x1fde('0xc')]=function(_0x11ab29){return this[_0x1fde('0x6')][_0x11ab29];};Graph[_0x1fde('0x9')][_0x1fde('0xd')]=function(_0x20a702,_0x2150b4){if(!this[_0x1fde('0x6')][_0x20a702]){return logger['info'](_0x1fde('0xe'));}var _0x2394d6=_0x2150b4(this[_0x1fde('0x6')][_0x20a702]);if(!_0x2394d6){return logger['info'](_0x1fde('0xf'));}if(this[_0x1fde('0x7')][_0x20a702]['length']===0x0){return logger[_0x1fde('0x10')](_0x1fde('0x11'));}for(var _0x2ef845=0x0,_0x402216=[],_0x2b89e9=![];_0x2ef845<this[_0x1fde('0x7')][_0x20a702]['length'];_0x2ef845+=0x1){if(this[_0x1fde('0x7')][_0x20a702][_0x2ef845][_0x1fde('0x12')]){_0x402216=this['edges'][_0x20a702][_0x2ef845]['condition'][_0x1fde('0x13')](',');for(var _0x1d5517=0x0;_0x1d5517<_0x402216[_0x1fde('0x14')];_0x1d5517+=0x1){if(this[_0x1fde('0x6')][_0x20a702][_0x1fde('0x15')]===_0x1fde('0x16')&&_0x402216[_0x1d5517]==='-'){_0x2b89e9=this['edges'][_0x20a702][_0x2ef845][_0x1fde('0x17')];logger[_0x1fde('0x10')]('default',_0x402216[_0x1d5517],this[_0x1fde('0x7')][_0x20a702][_0x2ef845][_0x1fde('0x17')]);}else if(this[_0x1fde('0x6')][_0x20a702][_0x1fde('0x15')]==='menu'&&_0x402216[_0x1d5517]==='i'){_0x2b89e9=this['edges'][_0x20a702][_0x2ef845]['target'];logger[_0x1fde('0x10')]('invalid',_0x402216[_0x1d5517],this['edges'][_0x20a702][_0x2ef845][_0x1fde('0x17')]);}if(_0x402216[_0x1d5517]===_0x2394d6){return this[_0x1fde('0xd')](this[_0x1fde('0x7')][_0x20a702][_0x2ef845][_0x1fde('0x17')],_0x2150b4);}}}else{return this[_0x1fde('0xd')](this['edges'][_0x20a702][_0x2ef845]['target'],_0x2150b4);}}if(_0x402216['length']){if(this[_0x1fde('0x6')][_0x20a702][_0x1fde('0x15')]===_0x1fde('0x16')){if(_0x2b89e9){return this[_0x1fde('0xd')](_0x2b89e9,_0x2150b4);}return logger['info'](_0x1fde('0x18'));}else if(_[_0x1fde('0x19')](verticesWithRetry,this['vertices'][_0x20a702]['agicommand'])){if(_0x2394d6==='-'){return logger[_0x1fde('0x10')](_0x1fde('0x1a'));}if(_0x2b89e9&&_0x2394d6!=='t'){return this[_0x1fde('0xd')](_0x2b89e9,_0x2150b4);}return this[_0x1fde('0xd')](_0x20a702,_0x2150b4);}return logger[_0x1fde('0x10')](_0x1fde('0x1b'));}};module['exports']=Graph;
\ No newline at end of file
index 74eef2b..5accf6e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1e9a=['hangup','find','handleNotFound','production','handleUnpublished','initialize','voice','callysquare','[LICENSE]\x20CHANNELS:\x20UNLIMITED','[LICENSE]\x20VOICE\x20IS\x20DISABLED','getAll','[LICENSE]','finally','./server','connection','lodash','syncho','util','../../config/environment','../../config/logger','agi','./project','./events','EventEmitter','defaults','127.0.0.1','projectUpdate','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','[%s]\x20%s','[ERROR]\x20%s','[CLOSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','calleridname','callerid','dnid','[TIMEOUT]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','uniqueid','[HANGUP]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','arg_1','createSquareReport','then','catch','hasOwnProperty','indexOf','variables','close','timeout','evtHangup'];(function(_0x26e85f,_0x1b2ac7){var _0x25e814=function(_0x46f258){while(--_0x46f258){_0x26e85f['push'](_0x26e85f['shift']());}};_0x25e814(++_0x1b2ac7);}(_0x1e9a,0x1b3));var _0xa1e9=function(_0x1a36a5,_0x746928){_0x1a36a5=_0x1a36a5-0x0;var _0x746243=_0x1e9a[_0x1a36a5];return _0x746243;};'use strict';var _=require(_0xa1e9('0x0'));var syncho=require(_0xa1e9('0x1'));var util=require(_0xa1e9('0x2'));var config=require(_0xa1e9('0x3'));var logger=require(_0xa1e9('0x4'))(_0xa1e9('0x5'));var utilLicense=require('../../config/license/util');var rpc=require('./rpc');var Project=require(_0xa1e9('0x6'));var AGIEmitter=require(_0xa1e9('0x7'))[_0xa1e9('0x8')];var projects=[];config['agi']=_[_0xa1e9('0x9')](config[_0xa1e9('0x5')],{'ip':_0xa1e9('0xa'),'port':0x11dd});AGIEmitter['on'](_0xa1e9('0xb'),projectUpdateHandler);function connectionHandler(_0x4556f8){process[_0xa1e9('0xc')](function(){syncho(function(){try{setChannelVariables(_0x4556f8);agiHandler(_0x4556f8);}catch(_0x4855d2){logger[_0xa1e9('0xd')](_0x4855d2[_0xa1e9('0xe')]);}});});}function projectUpdateHandler(_0x14d6db){try{var _0x121a22=_[_0xa1e9('0xf')](projects,['id',_0x14d6db['id']]);if(_0x121a22>-0x1){if(_0x14d6db[_0xa1e9('0x10')]===!![]){projects[_0xa1e9('0x11')](_0x121a22,0x1);}else{projects[_0x121a22]=_0x14d6db;}}else{projects[_0xa1e9('0x12')](_0x14d6db);}}catch(_0x9adb8){logger[_0xa1e9('0xd')](_0x9adb8[_0xa1e9('0xe')]);}}function listeningHandler(){console[_0xa1e9('0x13')](_0xa1e9('0x14'),config[_0xa1e9('0x5')][_0xa1e9('0x15')]);logger[_0xa1e9('0x16')](util[_0xa1e9('0x17')](_0xa1e9('0x18'),config[_0xa1e9('0x5')]['ip'],config[_0xa1e9('0x5')][_0xa1e9('0x15')]));}function errorHandler(_0x175829){if(_0x175829&&_0x175829[_0xa1e9('0x19')]&&_0x175829['message']){logger['error'](util[_0xa1e9('0x17')](_0xa1e9('0x1a'),_0x175829[_0xa1e9('0x19')],_0x175829['message']));}else{logger[_0xa1e9('0xd')](util[_0xa1e9('0x17')](_0xa1e9('0x1b'),_0x175829[_0xa1e9('0xe')]));}}function closeHandler(){logger['info'](util[_0xa1e9('0x17')](_0xa1e9('0x1c'),this['arg_1'],this[_0xa1e9('0x1d')],this[_0xa1e9('0x1e')],this[_0xa1e9('0x1f')],this['uniqueid']));try{createSquareReport(this);}catch(_0x5d8015){logger[_0xa1e9('0xd')](_0x5d8015[_0xa1e9('0xe')]);}}function timeoutHandler(){logger['info'](util[_0xa1e9('0x17')](_0xa1e9('0x20'),this['arg_1'],this[_0xa1e9('0x1d')],this[_0xa1e9('0x1e')],this[_0xa1e9('0x1f')],this[_0xa1e9('0x21')]));}function hangupHandler(){logger[_0xa1e9('0x16')](util['format'](_0xa1e9('0x22'),this[_0xa1e9('0x23')],this[_0xa1e9('0x1d')],this[_0xa1e9('0x1e')],this[_0xa1e9('0x1f')],this[_0xa1e9('0x21')]));this['evtHangup']=!![];}function createSquareReport(_0x1a1308,_0x1f43a3){rpc[_0xa1e9('0x24')](_0x1a1308)[_0xa1e9('0x25')](function(_0x594cf5){if(_0x1f43a3){_0x1f43a3(null,_0x594cf5);}})[_0xa1e9('0x26')](function(_0x6fa5dd){if(_0x1f43a3){_0x1f43a3(null,_0x6fa5dd);}});}function setChannelVariables(_0x12256c){for(var _0x337370 in _0x12256c){if(_0x12256c[_0xa1e9('0x27')](_0x337370)){if(_0x337370[_0xa1e9('0x28')]('agi_')===0x0){_0x12256c[_0x337370['substring'](0x4)]=_0x12256c[_0x337370];delete _0x12256c[_0x337370];}}}}function agiHandler(_0x2bebb8){logger['debug'](_0xa1e9('0x29'),JSON['stringify'](_0x2bebb8,null,0x2));logger[_0xa1e9('0x16')](util[_0xa1e9('0x17')]('[START]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',_0x2bebb8[_0xa1e9('0x23')],_0x2bebb8[_0xa1e9('0x1d')],_0x2bebb8[_0xa1e9('0x1e')],_0x2bebb8[_0xa1e9('0x1f')],_0x2bebb8[_0xa1e9('0x21')]));_0x2bebb8['on'](_0xa1e9('0xd'),errorHandler);_0x2bebb8['on'](_0xa1e9('0x2a'),closeHandler);_0x2bebb8['on'](_0xa1e9('0x2b'),timeoutHandler);_0x2bebb8[_0xa1e9('0x2c')]=![];_0x2bebb8['on'](_0xa1e9('0x2d'),hangupHandler);var _0x26612b=_[_0xa1e9('0x2e')](projects,['name',_0x2bebb8[_0xa1e9('0x23')]]);if(!_0x26612b)return Project[_0xa1e9('0x2f')](_0x2bebb8);if(!_0x26612b[_0xa1e9('0x30')])return Project[_0xa1e9('0x31')](_0x2bebb8);return Project[_0xa1e9('0x32')](_0x26612b,_0x2bebb8);}function main(){var _0x39eb82;return utilLicense['getLicense']()[_0xa1e9('0x25')](function(_0x3cccb6){if(!_0x3cccb6)return;if(_0x3cccb6[_0xa1e9('0x33')]){if(_0x3cccb6[_0xa1e9('0x34')]&&_0x3cccb6['callysquare']>0x0){logger[_0xa1e9('0x16')](util[_0xa1e9('0x17')]('[LICENSE]\x20CHANNELS:\x20%s',_0x3cccb6[_0xa1e9('0x34')]));_0x39eb82=_0x3cccb6[_0xa1e9('0x34')];}else{logger[_0xa1e9('0x16')](_0xa1e9('0x35'));}}else{logger['info'](_0xa1e9('0x36'));_0x39eb82=-0x1;}})['then'](function(){return Project[_0xa1e9('0x37')]();})[_0xa1e9('0x25')](function(_0x1d3d19){projects=_0x1d3d19;return;})[_0xa1e9('0x26')](function(_0x4a174c){logger[_0xa1e9('0xd')](_0xa1e9('0x38'),_0x4a174c[_0xa1e9('0xe')]);})[_0xa1e9('0x39')](function(){var _0x10be12=require(_0xa1e9('0x3a'))(config['agi'][_0xa1e9('0x15')],config[_0xa1e9('0x5')]['ip'],_0x39eb82);_0x10be12['on'](_0xa1e9('0xd'),errorHandler);_0x10be12['on']('listening',listeningHandler);_0x10be12['on'](_0xa1e9('0x3b'),connectionHandler);_0x10be12['on'](_0xa1e9('0x2a'),closeHandler);});}main();
\ No newline at end of file
+var _0x778a=['./server','listening','close','lodash','syncho','util','../../config/environment','../../config/logger','agi','../../config/license/util','./rpc','EventEmitter','defaults','127.0.0.1','projectUpdate','nextTick','error','stack','findIndex','deleted','push','log','Cally\x20Square\x20server\x20listening\x20on\x20port\x20%d!','info','format','[LISTENING]\x20Cally\x20Square\x20listening\x20%s:%d','port','message','[%s]\x20%s','name','[ERROR]\x20%s','[CLOSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','arg_1','calleridname','dnid','uniqueid','[HANGUP]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','callerid','evtHangup','catch','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','hangup','find','handleNotFound','production','handleUnpublished','initialize','voice','callysquare','[LICENSE]\x20CHANNELS:\x20%s','[LICENSE]\x20CHANNELS:\x20UNLIMITED','[LICENSE]\x20VOICE\x20IS\x20DISABLED','getAll','then','[LICENSE]','finally'];(function(_0x24db47,_0x369ba0){var _0x248c57=function(_0x1b1926){while(--_0x1b1926){_0x24db47['push'](_0x24db47['shift']());}};_0x248c57(++_0x369ba0);}(_0x778a,0xfb));var _0xa778=function(_0x44731a,_0x3417bb){_0x44731a=_0x44731a-0x0;var _0x5541bd=_0x778a[_0x44731a];return _0x5541bd;};'use strict';var _=require(_0xa778('0x0'));var syncho=require(_0xa778('0x1'));var util=require(_0xa778('0x2'));var config=require(_0xa778('0x3'));var logger=require(_0xa778('0x4'))(_0xa778('0x5'));var utilLicense=require(_0xa778('0x6'));var rpc=require(_0xa778('0x7'));var Project=require('./project');var AGIEmitter=require('./events')[_0xa778('0x8')];var projects=[];config[_0xa778('0x5')]=_[_0xa778('0x9')](config[_0xa778('0x5')],{'ip':_0xa778('0xa'),'port':0x11dd});AGIEmitter['on'](_0xa778('0xb'),projectUpdateHandler);function connectionHandler(_0x42ec3f){process[_0xa778('0xc')](function(){syncho(function(){try{setChannelVariables(_0x42ec3f);agiHandler(_0x42ec3f);}catch(_0x358542){logger[_0xa778('0xd')](_0x358542[_0xa778('0xe')]);}});});}function projectUpdateHandler(_0x432e18){try{var _0x146c17=_[_0xa778('0xf')](projects,['id',_0x432e18['id']]);if(_0x146c17>-0x1){if(_0x432e18[_0xa778('0x10')]===!![]){projects['splice'](_0x146c17,0x1);}else{projects[_0x146c17]=_0x432e18;}}else{projects[_0xa778('0x11')](_0x432e18);}}catch(_0x474e4b){logger[_0xa778('0xd')](_0x474e4b['stack']);}}function listeningHandler(){console[_0xa778('0x12')](_0xa778('0x13'),config[_0xa778('0x5')]['port']);logger[_0xa778('0x14')](util[_0xa778('0x15')](_0xa778('0x16'),config[_0xa778('0x5')]['ip'],config[_0xa778('0x5')][_0xa778('0x17')]));}function errorHandler(_0xfc5e8c){if(_0xfc5e8c&&_0xfc5e8c['name']&&_0xfc5e8c[_0xa778('0x18')]){logger['error'](util[_0xa778('0x15')](_0xa778('0x19'),_0xfc5e8c[_0xa778('0x1a')],_0xfc5e8c[_0xa778('0x18')]));}else{logger[_0xa778('0xd')](util[_0xa778('0x15')](_0xa778('0x1b'),_0xfc5e8c['stack']));}}function closeHandler(){logger[_0xa778('0x14')](util['format'](_0xa778('0x1c'),this[_0xa778('0x1d')],this[_0xa778('0x1e')],this['callerid'],this[_0xa778('0x1f')],this[_0xa778('0x20')]));try{createSquareReport(this);}catch(_0x4ef21a){logger[_0xa778('0xd')](_0x4ef21a['stack']);}}function timeoutHandler(){logger[_0xa778('0x14')](util['format']('[TIMEOUT]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',this[_0xa778('0x1d')],this[_0xa778('0x1e')],this['callerid'],this[_0xa778('0x1f')],this[_0xa778('0x20')]));}function hangupHandler(){logger[_0xa778('0x14')](util[_0xa778('0x15')](_0xa778('0x21'),this[_0xa778('0x1d')],this[_0xa778('0x1e')],this[_0xa778('0x22')],this[_0xa778('0x1f')],this[_0xa778('0x20')]));this[_0xa778('0x23')]=!![];}function createSquareReport(_0x1fc6d4,_0x22dbe2){rpc['createSquareReport'](_0x1fc6d4)['then'](function(_0x10e58b){if(_0x22dbe2){_0x22dbe2(null,_0x10e58b);}})[_0xa778('0x24')](function(_0x213f0d){if(_0x22dbe2){_0x22dbe2(null,_0x213f0d);}});}function setChannelVariables(_0x9f7ac9){for(var _0x36d111 in _0x9f7ac9){if(_0x9f7ac9['hasOwnProperty'](_0x36d111)){if(_0x36d111[_0xa778('0x25')](_0xa778('0x26'))===0x0){_0x9f7ac9[_0x36d111['substring'](0x4)]=_0x9f7ac9[_0x36d111];delete _0x9f7ac9[_0x36d111];}}}}function agiHandler(_0x2fa166){logger[_0xa778('0x27')](_0xa778('0x28'),JSON[_0xa778('0x29')](_0x2fa166,null,0x2));logger[_0xa778('0x14')](util[_0xa778('0x15')](_0xa778('0x2a'),_0x2fa166[_0xa778('0x1d')],_0x2fa166['calleridname'],_0x2fa166['callerid'],_0x2fa166[_0xa778('0x1f')],_0x2fa166[_0xa778('0x20')]));_0x2fa166['on'](_0xa778('0xd'),errorHandler);_0x2fa166['on']('close',closeHandler);_0x2fa166['on'](_0xa778('0x2b'),timeoutHandler);_0x2fa166[_0xa778('0x23')]=![];_0x2fa166['on'](_0xa778('0x2c'),hangupHandler);var _0x27691a=_[_0xa778('0x2d')](projects,['name',_0x2fa166['arg_1']]);if(!_0x27691a)return Project[_0xa778('0x2e')](_0x2fa166);if(!_0x27691a[_0xa778('0x2f')])return Project[_0xa778('0x30')](_0x2fa166);return Project[_0xa778('0x31')](_0x27691a,_0x2fa166);}function main(){var _0x31a602;return utilLicense['getLicense']()['then'](function(_0x318249){if(!_0x318249)return;if(_0x318249[_0xa778('0x32')]){if(_0x318249[_0xa778('0x33')]&&_0x318249[_0xa778('0x33')]>0x0){logger[_0xa778('0x14')](util['format'](_0xa778('0x34'),_0x318249[_0xa778('0x33')]));_0x31a602=_0x318249['callysquare'];}else{logger[_0xa778('0x14')](_0xa778('0x35'));}}else{logger[_0xa778('0x14')](_0xa778('0x36'));_0x31a602=-0x1;}})['then'](function(){return Project[_0xa778('0x37')]();})[_0xa778('0x38')](function(_0x3463a0){projects=_0x3463a0;return;})[_0xa778('0x24')](function(_0x27b353){logger['error'](_0xa778('0x39'),_0x27b353['stack']);})[_0xa778('0x3a')](function(){var _0xd28ef=require(_0xa778('0x3b'))(config[_0xa778('0x5')]['port'],config['agi']['ip'],_0x31a602);_0xd28ef['on'](_0xa778('0xd'),errorHandler);_0xd28ef['on'](_0xa778('0x3c'),listeningHandler);_0xd28ef['on']('connection',connectionHandler);_0xd28ef['on'](_0xa778('0x3d'),closeHandler);});}main();
\ No newline at end of file
index 7379ba8..53e9540 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1dc0=['result','catch','sendMailMessage','SendMail','jayson/promise','client','http','request','then','error','message'];(function(_0x2bc4ac,_0x557547){var _0x4099eb=function(_0x6ac4f1){while(--_0x6ac4f1){_0x2bc4ac['push'](_0x2bc4ac['shift']());}};_0x4099eb(++_0x557547);}(_0x1dc0,0x19b));var _0x01dc=function(_0x1b790d,_0x5e190e){_0x1b790d=_0x1b790d-0x0;var _0x2faa59=_0x1dc0[_0x1b790d];return _0x2faa59;};'use strict';var BPromise=require('bluebird');var jayson=require(_0x01dc('0x0'));var client=jayson[_0x01dc('0x1')][_0x01dc('0x2')]({'port':0x232b});function request(_0x985863,_0x18bc82){return new BPromise(function(_0x44d498,_0x453444){return client[_0x01dc('0x3')](_0x985863,_0x18bc82)[_0x01dc('0x4')](function(_0x4ca5f4){if(_0x4ca5f4['error']){return _0x453444(_0x4ca5f4[_0x01dc('0x5')][_0x01dc('0x6')]);}else{return _0x44d498(_0x4ca5f4[_0x01dc('0x7')]);}})[_0x01dc('0x8')](function(_0x2a9582){return _0x453444(_0x2a9582);});});}exports[_0x01dc('0x9')]=function(_0x4f9f7d,_0x3cde98){return request(_0x01dc('0xa'),{'account':_0x4f9f7d,'message':_0x3cde98});};
\ No newline at end of file
+var _0x7fce=['result','catch','sendMailMessage','SendMail','bluebird','jayson/promise','client','http','then','error','message'];(function(_0x5b3fb5,_0xdbf661){var _0x3113d9=function(_0x15a34e){while(--_0x15a34e){_0x5b3fb5['push'](_0x5b3fb5['shift']());}};_0x3113d9(++_0xdbf661);}(_0x7fce,0x9e));var _0xe7fc=function(_0x4eb2c9,_0x4af956){_0x4eb2c9=_0x4eb2c9-0x0;var _0x4f6588=_0x7fce[_0x4eb2c9];return _0x4f6588;};'use strict';var BPromise=require(_0xe7fc('0x0'));var jayson=require(_0xe7fc('0x1'));var client=jayson[_0xe7fc('0x2')][_0xe7fc('0x3')]({'port':0x232b});function request(_0x15db28,_0x492d93){return new BPromise(function(_0x3e7342,_0x12c2e3){return client['request'](_0x15db28,_0x492d93)[_0xe7fc('0x4')](function(_0x1e72b5){if(_0x1e72b5[_0xe7fc('0x5')]){return _0x12c2e3(_0x1e72b5[_0xe7fc('0x5')][_0xe7fc('0x6')]);}else{return _0x3e7342(_0x1e72b5[_0xe7fc('0x7')]);}})[_0xe7fc('0x8')](function(_0x45aed1){return _0x12c2e3(_0x45aed1);});});}exports[_0xe7fc('0x9')]=function(_0x10d6f3,_0xfb0278){return request(_0xe7fc('0xa'),{'account':_0x10d6f3,'message':_0xfb0278});};
\ No newline at end of file
index 9b733b9..8953998 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x82d1=['./mailRpc','./graph','./vertices','getSquareProjects','error','Unable\x20to\x20download\x20CallySquare\x20projects','stack','agicommand','hasOwnProperty','retry','maxRetry','addVertex','omit','mxCell','length','source','target','toJson','mxGraphModel','root','inspect','production','joinAt','format','YYYY-MM-DD\x20HH:mm:ss','info','[START\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','callerid','dnid','uniqueid','traverseBFS','start','clear','debug','vertex','context','extension','priority','response','stringify','code','result','evtHangup','isUndefined','toString','finally','[FINALLY\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','agicommand\x20not\x20found','[END]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','arg_1','Project\x20%s\x20not\x20found','continueAt','close','exports','lodash','moment','util','../../config/logger','./rpc'];(function(_0x4b902f,_0x527163){var _0x288a4=function(_0x3b1afc){while(--_0x3b1afc){_0x4b902f['push'](_0x4b902f['shift']());}};_0x288a4(++_0x527163);}(_0x82d1,0x1d3));var _0x182d=function(_0x432460,_0x5d446d){_0x432460=_0x432460-0x0;var _0x3fd04b=_0x82d1[_0x432460];return _0x3fd04b;};'use strict';var _=require(_0x182d('0x0'));var moment=require(_0x182d('0x1'));var parser=require('xml2json');var util=require(_0x182d('0x2'));var logger=require(_0x182d('0x3'))('agi');var rpc=require(_0x182d('0x4'));var mailRpc=require(_0x182d('0x5'));var Graph=require(_0x182d('0x6'));var Vertices=require(_0x182d('0x7'));var AGI_CODE_SUCCESS=0xc8;var AGI_RESULT_ERROR=-0x1;function getAll(){return rpc[_0x182d('0x8')]()['catch'](function(_0x474352){logger[_0x182d('0x9')](_0x182d('0xa'),_0x474352[_0x182d('0xb')]);return[];});}function addVertex(_0x1cedbb,_0x470bce,_0x5b215d){_0x470bce[_0x182d('0xc')]=_0x5b215d;if(_0x470bce[_0x182d('0xd')](_0x182d('0xe'))){_0x470bce[_0x182d('0xf')]=parseInt(_0x470bce[_0x182d('0xe')],0xa);}_0x1cedbb[_0x182d('0x10')](_[_0x182d('0x11')](_0x470bce,_0x182d('0x12')));}function initGraph(_0x1827c7,_0x1a3334){var _0x174efc=new Graph();for(var _0xc8f76b in _0x1827c7){if(_0x1827c7[_0x182d('0xd')](_0xc8f76b)){if(_['isArray'](_0x1827c7[_0xc8f76b])){for(var _0x3f92e0=0x0;_0x3f92e0<_0x1827c7[_0xc8f76b]['length'];_0x3f92e0+=0x1){addVertex(_0x174efc,_0x1827c7[_0xc8f76b][_0x3f92e0],_0xc8f76b);}}else{addVertex(_0x174efc,_0x1827c7[_0xc8f76b],_0xc8f76b);}}}for(var _0x4fc163=0x0;_0x4fc163<_0x1a3334[_0x182d('0x13')];_0x4fc163+=0x1){if(_0x1a3334[_0x4fc163][_0x182d('0x14')]&&_0x1a3334[_0x4fc163][_0x182d('0x15')]){_0x174efc['addEdge'](_0x1a3334[_0x4fc163][_0x182d('0x14')],_0x1a3334[_0x4fc163][_0x182d('0x15')],_0x1a3334[_0x4fc163]['value']);}}return _0x174efc;}function getRoot(_0x43ac69){return parser[_0x182d('0x16')](_0x43ac69,{'object':!![]})[_0x182d('0x17')][_0x182d('0x18')];}function inspect(_0x14f1fc){return util[_0x182d('0x19')](_0x14f1fc,{'showHidden':![],'depth':null});}function initialize(_0x14abb6,_0x37ab5b){var _0x5165bc=getRoot(_0x14abb6[_0x182d('0x1a')]);if(!_0x5165bc||!_0x5165bc['start'])return;var _0x471df4,_0x5dc693,_0x1af412;logger['debug'](_0x182d('0x18'),JSON['stringify'](_0x5165bc,null,0x2));_0x37ab5b[_0x182d('0x1b')]=moment()[_0x182d('0x1c')](_0x182d('0x1d'));_0x471df4=initGraph(_[_0x182d('0x11')](_0x5165bc,_0x182d('0x12')),_0x5165bc[_0x182d('0x12')]);_0x5dc693=new Vertices(_0x37ab5b,rpc,mailRpc);logger[_0x182d('0x1e')](util['format'](_0x182d('0x1f'),_0x37ab5b['arg_1'],_0x37ab5b['calleridname'],_0x37ab5b[_0x182d('0x20')],_0x37ab5b[_0x182d('0x21')],_0x37ab5b[_0x182d('0x22')]));_0x471df4[_0x182d('0x23')](_0x5165bc[_0x182d('0x24')]['id'],function(_0x18a4fd){try{_0x18a4fd=_0x5dc693[_0x182d('0x25')](_0x18a4fd);logger[_0x182d('0x26')](_0x182d('0x27'),JSON['stringify'](_0x18a4fd,null,0x2));if(_0x18a4fd['agicommand']==='gotoc'){logger[_0x182d('0x1e')]('gotoc\x20block\x20stop\x20traverse\x20BFS');_0x37ab5b[_0x182d('0x28')]=_0x18a4fd[_0x182d('0x28')]||_0x37ab5b[_0x182d('0x28')];_0x37ab5b['extension']=_0x18a4fd[_0x182d('0x29')];_0x37ab5b[_0x182d('0x2a')]=_0x18a4fd[_0x182d('0x2a')]?_0x18a4fd[_0x182d('0x2a')]-0x1:0x1;return null;}else if(_0x18a4fd&&_0x5dc693[_0x18a4fd[_0x182d('0xc')]]){_0x1af412=_0x5dc693[_0x18a4fd[_0x182d('0xc')]](_0x18a4fd);logger[_0x182d('0x1e')](_0x182d('0x2b'),JSON[_0x182d('0x2c')](_0x1af412,null,0x2));if(_0x1af412&&_0x1af412[_0x182d('0x2d')]===AGI_CODE_SUCCESS&&_0x1af412[_0x182d('0x2e')]!==AGI_RESULT_ERROR&&!_0x37ab5b[_0x182d('0x2f')]){logger['debug']('response',inspect(_0x1af412));return _[_0x182d('0x30')](_0x1af412[_0x182d('0x2e')])?null:_0x1af412[_0x182d('0x2e')][_0x182d('0x31')]();}else{logger[_0x182d('0x9')]('response',inspect(_0x1af412));return null;}}else{logger[_0x182d('0x9')]('agicommand\x20not\x20found');return null;}}catch(_0x4747e8){logger[_0x182d('0x9')](_0x4747e8[_0x182d('0xb')]);return null;}});if(_0x5165bc[_0x182d('0x32')]){logger[_0x182d('0x1e')](util[_0x182d('0x1c')](_0x182d('0x33'),_0x37ab5b['arg_1'],_0x37ab5b['calleridname'],_0x37ab5b[_0x182d('0x20')],_0x37ab5b[_0x182d('0x21')],_0x37ab5b[_0x182d('0x22')]));_0x471df4[_0x182d('0x23')](_0x5165bc['finally']['id'],function(_0x153338){try{_0x153338=_0x5dc693[_0x182d('0x25')](_0x153338);logger[_0x182d('0x26')](_0x182d('0x27'),JSON['stringify'](_0x153338,null,0x2));if(_0x153338&&_0x5dc693[_0x153338['agicommand']]){_0x1af412=_0x5dc693[_0x153338['agicommand']](_0x153338);if(_0x1af412){logger[_0x182d('0x26')](_0x182d('0x2b'),inspect(_0x1af412));return _[_0x182d('0x30')](_0x1af412[_0x182d('0x2e')])?null:_0x1af412[_0x182d('0x2e')]['toString']();}else{logger[_0x182d('0x9')](_0x182d('0x2b'),inspect(_0x1af412));return null;}}else{logger['error'](_0x182d('0x34'));return null;}}catch(_0x387ad9){logger['error'](_0x387ad9[_0x182d('0xb')]);return null;}});}logger[_0x182d('0x1e')](util[_0x182d('0x1c')](_0x182d('0x35'),_0x37ab5b[_0x182d('0x36')],_0x37ab5b['calleridname'],_0x37ab5b['callerid'],_0x37ab5b[_0x182d('0x21')],_0x37ab5b[_0x182d('0x22')]));logger[_0x182d('0x1e')](util[_0x182d('0x1c')]('[GOTO]\x20context:\x20%s\x20extension:\x20%s\x20priority:\x20%s',_0x37ab5b[_0x182d('0x28')],_0x37ab5b[_0x182d('0x29')],parseInt(_0x37ab5b[_0x182d('0x2a')],0xa)+0x1));_0x37ab5b['continueAt'](_0x37ab5b[_0x182d('0x28')],_0x37ab5b[_0x182d('0x29')],parseInt(_0x37ab5b[_0x182d('0x2a')],0xa)+0x1);_0x37ab5b['close']();}function handleNotFound(_0x460531){logger['error'](util['format'](_0x182d('0x37'),_0x460531[_0x182d('0x36')]));_0x460531[_0x182d('0x38')](_0x460531['context'],_0x460531[_0x182d('0x29')],parseInt(_0x460531['priority'],0xa)+0x1);_0x460531[_0x182d('0x39')]();}function handleUnpublished(_0x6d8cbf){logger[_0x182d('0x9')](util[_0x182d('0x1c')]('Project\x20%s\x20not\x20published',_0x6d8cbf[_0x182d('0x36')]));_0x6d8cbf[_0x182d('0x38')](_0x6d8cbf[_0x182d('0x28')],_0x6d8cbf['extension'],parseInt(_0x6d8cbf[_0x182d('0x2a')],0xa)+0x1);_0x6d8cbf[_0x182d('0x39')]();}module[_0x182d('0x3a')]={'getAll':getAll,'handleNotFound':handleNotFound,'handleUnpublished':handleUnpublished,'initialize':initialize};
\ No newline at end of file
+var _0x2309=['start','debug','vertex','gotoc','gotoc\x20block\x20stop\x20traverse\x20BFS','extension','priority','code','result','response','isUndefined','toString','agicommand\x20not\x20found','finally','[FINALLY\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','uniqueid','clear','[END]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','[GOTO]\x20context:\x20%s\x20extension:\x20%s\x20priority:\x20%s','context','continueAt','close','Project\x20%s\x20not\x20found','lodash','util','../../config/logger','agi','./rpc','./graph','./vertices','getSquareProjects','catch','error','Unable\x20to\x20download\x20CallySquare\x20projects','stack','agicommand','hasOwnProperty','retry','omit','length','addEdge','source','target','value','toJson','mxGraphModel','root','inspect','production','stringify','joinAt','format','YYYY-MM-DD\x20HH:mm:ss','mxCell','info','arg_1','calleridname','callerid','dnid','traverseBFS'];(function(_0x9d21bd,_0x37450b){var _0x5ae55a=function(_0x195d57){while(--_0x195d57){_0x9d21bd['push'](_0x9d21bd['shift']());}};_0x5ae55a(++_0x37450b);}(_0x2309,0x143));var _0x9230=function(_0x166fbf,_0x538fa7){_0x166fbf=_0x166fbf-0x0;var _0x48ed24=_0x2309[_0x166fbf];return _0x48ed24;};'use strict';var _=require(_0x9230('0x0'));var moment=require('moment');var parser=require('xml2json');var util=require(_0x9230('0x1'));var logger=require(_0x9230('0x2'))(_0x9230('0x3'));var rpc=require(_0x9230('0x4'));var mailRpc=require('./mailRpc');var Graph=require(_0x9230('0x5'));var Vertices=require(_0x9230('0x6'));var AGI_CODE_SUCCESS=0xc8;var AGI_RESULT_ERROR=-0x1;function getAll(){return rpc[_0x9230('0x7')]()[_0x9230('0x8')](function(_0x2ce4cf){logger[_0x9230('0x9')](_0x9230('0xa'),_0x2ce4cf[_0x9230('0xb')]);return[];});}function addVertex(_0x33fc25,_0x1460f3,_0x168dfa){_0x1460f3[_0x9230('0xc')]=_0x168dfa;if(_0x1460f3[_0x9230('0xd')]('retry')){_0x1460f3['maxRetry']=parseInt(_0x1460f3[_0x9230('0xe')],0xa);}_0x33fc25['addVertex'](_[_0x9230('0xf')](_0x1460f3,'mxCell'));}function initGraph(_0x2f8485,_0x26f93a){var _0x313e1d=new Graph();for(var _0x457f35 in _0x2f8485){if(_0x2f8485[_0x9230('0xd')](_0x457f35)){if(_['isArray'](_0x2f8485[_0x457f35])){for(var _0x4760d8=0x0;_0x4760d8<_0x2f8485[_0x457f35][_0x9230('0x10')];_0x4760d8+=0x1){addVertex(_0x313e1d,_0x2f8485[_0x457f35][_0x4760d8],_0x457f35);}}else{addVertex(_0x313e1d,_0x2f8485[_0x457f35],_0x457f35);}}}for(var _0x206eb6=0x0;_0x206eb6<_0x26f93a['length'];_0x206eb6+=0x1){if(_0x26f93a[_0x206eb6]['source']&&_0x26f93a[_0x206eb6]['target']){_0x313e1d[_0x9230('0x11')](_0x26f93a[_0x206eb6][_0x9230('0x12')],_0x26f93a[_0x206eb6][_0x9230('0x13')],_0x26f93a[_0x206eb6][_0x9230('0x14')]);}}return _0x313e1d;}function getRoot(_0x385059){return parser[_0x9230('0x15')](_0x385059,{'object':!![]})[_0x9230('0x16')][_0x9230('0x17')];}function inspect(_0x2e1b2f){return util[_0x9230('0x18')](_0x2e1b2f,{'showHidden':![],'depth':null});}function initialize(_0x22f841,_0x5ee67f){var _0x261d96=getRoot(_0x22f841[_0x9230('0x19')]);if(!_0x261d96||!_0x261d96['start'])return;var _0x46d7a2,_0x318c0e,_0x3ea1d4;logger['debug']('root',JSON[_0x9230('0x1a')](_0x261d96,null,0x2));_0x5ee67f[_0x9230('0x1b')]=moment()[_0x9230('0x1c')](_0x9230('0x1d'));_0x46d7a2=initGraph(_[_0x9230('0xf')](_0x261d96,_0x9230('0x1e')),_0x261d96[_0x9230('0x1e')]);_0x318c0e=new Vertices(_0x5ee67f,rpc,mailRpc);logger[_0x9230('0x1f')](util[_0x9230('0x1c')]('[START\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',_0x5ee67f[_0x9230('0x20')],_0x5ee67f[_0x9230('0x21')],_0x5ee67f[_0x9230('0x22')],_0x5ee67f[_0x9230('0x23')],_0x5ee67f['uniqueid']));_0x46d7a2[_0x9230('0x24')](_0x261d96[_0x9230('0x25')]['id'],function(_0x12a005){try{_0x12a005=_0x318c0e['clear'](_0x12a005);logger[_0x9230('0x26')](_0x9230('0x27'),JSON[_0x9230('0x1a')](_0x12a005,null,0x2));if(_0x12a005[_0x9230('0xc')]===_0x9230('0x28')){logger[_0x9230('0x1f')](_0x9230('0x29'));_0x5ee67f['context']=_0x12a005['context']||_0x5ee67f['context'];_0x5ee67f[_0x9230('0x2a')]=_0x12a005['extension'];_0x5ee67f[_0x9230('0x2b')]=_0x12a005[_0x9230('0x2b')]?_0x12a005['priority']-0x1:0x1;return null;}else if(_0x12a005&&_0x318c0e[_0x12a005['agicommand']]){_0x3ea1d4=_0x318c0e[_0x12a005[_0x9230('0xc')]](_0x12a005);logger[_0x9230('0x1f')]('response',JSON['stringify'](_0x3ea1d4,null,0x2));if(_0x3ea1d4&&_0x3ea1d4[_0x9230('0x2c')]===AGI_CODE_SUCCESS&&_0x3ea1d4[_0x9230('0x2d')]!==AGI_RESULT_ERROR&&!_0x5ee67f['evtHangup']){logger[_0x9230('0x26')](_0x9230('0x2e'),inspect(_0x3ea1d4));return _[_0x9230('0x2f')](_0x3ea1d4[_0x9230('0x2d')])?null:_0x3ea1d4['result'][_0x9230('0x30')]();}else{logger['error'](_0x9230('0x2e'),inspect(_0x3ea1d4));return null;}}else{logger[_0x9230('0x9')](_0x9230('0x31'));return null;}}catch(_0x126a2b){logger[_0x9230('0x9')](_0x126a2b[_0x9230('0xb')]);return null;}});if(_0x261d96[_0x9230('0x32')]){logger[_0x9230('0x1f')](util[_0x9230('0x1c')](_0x9230('0x33'),_0x5ee67f['arg_1'],_0x5ee67f[_0x9230('0x21')],_0x5ee67f[_0x9230('0x22')],_0x5ee67f[_0x9230('0x23')],_0x5ee67f[_0x9230('0x34')]));_0x46d7a2[_0x9230('0x24')](_0x261d96[_0x9230('0x32')]['id'],function(_0x1f6432){try{_0x1f6432=_0x318c0e[_0x9230('0x35')](_0x1f6432);logger[_0x9230('0x26')]('vertex',JSON[_0x9230('0x1a')](_0x1f6432,null,0x2));if(_0x1f6432&&_0x318c0e[_0x1f6432['agicommand']]){_0x3ea1d4=_0x318c0e[_0x1f6432[_0x9230('0xc')]](_0x1f6432);if(_0x3ea1d4){logger[_0x9230('0x26')](_0x9230('0x2e'),inspect(_0x3ea1d4));return _[_0x9230('0x2f')](_0x3ea1d4[_0x9230('0x2d')])?null:_0x3ea1d4[_0x9230('0x2d')][_0x9230('0x30')]();}else{logger[_0x9230('0x9')](_0x9230('0x2e'),inspect(_0x3ea1d4));return null;}}else{logger[_0x9230('0x9')](_0x9230('0x31'));return null;}}catch(_0x42b143){logger[_0x9230('0x9')](_0x42b143['stack']);return null;}});}logger['info'](util[_0x9230('0x1c')](_0x9230('0x36'),_0x5ee67f[_0x9230('0x20')],_0x5ee67f[_0x9230('0x21')],_0x5ee67f[_0x9230('0x22')],_0x5ee67f['dnid'],_0x5ee67f[_0x9230('0x34')]));logger['info'](util['format'](_0x9230('0x37'),_0x5ee67f[_0x9230('0x38')],_0x5ee67f[_0x9230('0x2a')],parseInt(_0x5ee67f['priority'],0xa)+0x1));_0x5ee67f[_0x9230('0x39')](_0x5ee67f[_0x9230('0x38')],_0x5ee67f[_0x9230('0x2a')],parseInt(_0x5ee67f[_0x9230('0x2b')],0xa)+0x1);_0x5ee67f[_0x9230('0x3a')]();}function handleNotFound(_0x2bd19d){logger[_0x9230('0x9')](util[_0x9230('0x1c')](_0x9230('0x3b'),_0x2bd19d['arg_1']));_0x2bd19d[_0x9230('0x39')](_0x2bd19d[_0x9230('0x38')],_0x2bd19d['extension'],parseInt(_0x2bd19d[_0x9230('0x2b')],0xa)+0x1);_0x2bd19d[_0x9230('0x3a')]();}function handleUnpublished(_0x28677a){logger['error'](util['format']('Project\x20%s\x20not\x20published',_0x28677a[_0x9230('0x20')]));_0x28677a[_0x9230('0x39')](_0x28677a[_0x9230('0x38')],_0x28677a[_0x9230('0x2a')],parseInt(_0x28677a[_0x9230('0x2b')],0xa)+0x1);_0x28677a[_0x9230('0x3a')]();}module['exports']={'getAll':getAll,'handleNotFound':handleNotFound,'handleUnpublished':handleUnpublished,'initialize':initialize};
\ No newline at end of file
index 30bf180..622d6a7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3856=['Transform','call','_localBuffer','_inBody','inherits','prototype','_transform','\x0d\x0a\x0d\x0a','toString','indexOf','substring','length','split','trim','slice','emit','exports','util'];(function(_0x107562,_0x111892){var _0x3e111f=function(_0xf0a301){while(--_0xf0a301){_0x107562['push'](_0x107562['shift']());}};_0x3e111f(++_0x111892);}(_0x3856,0xfb));var _0x6385=function(_0x338f73,_0x1945c8){_0x338f73=_0x338f73-0x0;var _0x163fdf=_0x3856[_0x338f73];return _0x163fdf;};'use strict';var util=require(_0x6385('0x0'));var Transform=require('stream')[_0x6385('0x1')];function AGIReply(_0x2e7209){Transform[_0x6385('0x2')](this,_0x2e7209);this[_0x6385('0x3')]='';this[_0x6385('0x4')]=![];}util[_0x6385('0x5')](AGIReply,Transform);AGIReply[_0x6385('0x6')][_0x6385('0x7')]=function(_0x5ae353,_0x1910cd,_0x414b44){var _0x4ce473='\x0a',_0x43f911=['\x0a\x0a',_0x6385('0x8')],_0x160021=-0x1,_0x1d3cdb=-0x1,_0x21a62c='',_0x421b28=0x0,_0x37673='',_0x48d955='';this[_0x6385('0x3')]+=_0x5ae353[_0x6385('0x9')]();_0x37673=this[_0x6385('0x3')];if(!this[_0x6385('0x4')]){_0x421b28=0x0;while(_0x43f911[_0x421b28]){while((_0x1d3cdb=_0x37673[_0x6385('0xa')](_0x43f911[_0x421b28]))!=-0x1){_0x21a62c=_0x43f911[_0x421b28];_0x48d955=_0x37673['substring'](0x0,_0x1d3cdb);_0x37673=_0x37673[_0x6385('0xb')](_0x1d3cdb+_0x21a62c[_0x6385('0xc')]);var _0x2d5a26=_0x48d955[_0x6385('0xd')](_0x4ce473),_0x3058ab=0x0,_0x2a53dc={},_0x3b9af1='',_0x4f8a37='',_0x5fcd91=-0x1;while(_0x2d5a26[_0x3058ab]){_0x5fcd91=_0x2d5a26[_0x3058ab][_0x6385('0xa')](':');if(_0x5fcd91!=-0x1){_0x3b9af1=_0x2d5a26[_0x3058ab]['slice'](0x0,_0x5fcd91)[_0x6385('0xe')]();_0x4f8a37=_0x2d5a26[_0x3058ab][_0x6385('0xf')](_0x5fcd91+0x1)['trim']();if(_0x3b9af1[_0x6385('0xc')]>0x0){_0x2a53dc[_0x3b9af1]=_0x4f8a37;}}else{}_0x3058ab++;}this['emit']('headers',_0x2a53dc);this[_0x6385('0x4')]=!![];}_0x421b28++;}this['_localBuffer']=_0x37673;}else{while((_0x160021=_0x37673[_0x6385('0xa')](_0x4ce473))!=-0x1){_0x48d955=_0x37673['substring'](0x0,_0x160021);this[_0x6385('0x10')]('line',_0x48d955);_0x37673=_0x37673[_0x6385('0xb')](_0x160021+_0x4ce473[_0x6385('0xc')]);}this[_0x6385('0x3')]=_0x37673;}_0x414b44();};module[_0x6385('0x11')]=AGIReply;
\ No newline at end of file
+var _0xaa4c=['emit','headers','line','exports','stream','Transform','_localBuffer','_inBody','inherits','prototype','\x0d\x0a\x0d\x0a','toString','indexOf','substring','length','split','trim','slice'];(function(_0x59b890,_0x5bbe52){var _0x598d87=function(_0xd68673){while(--_0xd68673){_0x59b890['push'](_0x59b890['shift']());}};_0x598d87(++_0x5bbe52);}(_0xaa4c,0x112));var _0xcaa4=function(_0x10c75d,_0x567cb1){_0x10c75d=_0x10c75d-0x0;var _0x474277=_0xaa4c[_0x10c75d];return _0x474277;};'use strict';var util=require('util');var Transform=require(_0xcaa4('0x0'))[_0xcaa4('0x1')];function AGIReply(_0x394410){Transform['call'](this,_0x394410);this[_0xcaa4('0x2')]='';this[_0xcaa4('0x3')]=![];}util[_0xcaa4('0x4')](AGIReply,Transform);AGIReply[_0xcaa4('0x5')]['_transform']=function(_0x4091e7,_0x211f17,_0x423a7d){var _0x56854c='\x0a',_0x127469=['\x0a\x0a',_0xcaa4('0x6')],_0x712498=-0x1,_0x13e596=-0x1,_0xd31a38='',_0x123c55=0x0,_0x3813c2='',_0x1d750b='';this['_localBuffer']+=_0x4091e7[_0xcaa4('0x7')]();_0x3813c2=this[_0xcaa4('0x2')];if(!this[_0xcaa4('0x3')]){_0x123c55=0x0;while(_0x127469[_0x123c55]){while((_0x13e596=_0x3813c2[_0xcaa4('0x8')](_0x127469[_0x123c55]))!=-0x1){_0xd31a38=_0x127469[_0x123c55];_0x1d750b=_0x3813c2[_0xcaa4('0x9')](0x0,_0x13e596);_0x3813c2=_0x3813c2[_0xcaa4('0x9')](_0x13e596+_0xd31a38[_0xcaa4('0xa')]);var _0x3d955d=_0x1d750b[_0xcaa4('0xb')](_0x56854c),_0x3d7c6a=0x0,_0x205714={},_0x43ed85='',_0x15875c='',_0x166194=-0x1;while(_0x3d955d[_0x3d7c6a]){_0x166194=_0x3d955d[_0x3d7c6a][_0xcaa4('0x8')](':');if(_0x166194!=-0x1){_0x43ed85=_0x3d955d[_0x3d7c6a]['slice'](0x0,_0x166194)[_0xcaa4('0xc')]();_0x15875c=_0x3d955d[_0x3d7c6a][_0xcaa4('0xd')](_0x166194+0x1)['trim']();if(_0x43ed85[_0xcaa4('0xa')]>0x0){_0x205714[_0x43ed85]=_0x15875c;}}else{}_0x3d7c6a++;}this[_0xcaa4('0xe')](_0xcaa4('0xf'),_0x205714);this[_0xcaa4('0x3')]=!![];}_0x123c55++;}this[_0xcaa4('0x2')]=_0x3813c2;}else{while((_0x712498=_0x3813c2[_0xcaa4('0x8')](_0x56854c))!=-0x1){_0x1d750b=_0x3813c2[_0xcaa4('0x9')](0x0,_0x712498);this[_0xcaa4('0xe')](_0xcaa4('0x10'),_0x1d750b);_0x3813c2=_0x3813c2[_0xcaa4('0x9')](_0x712498+_0x56854c[_0xcaa4('0xa')]);}this['_localBuffer']=_0x3813c2;}_0x423a7d();};module[_0xcaa4('0x11')]=AGIReply;
\ No newline at end of file
index a49c9ed..0e511ec 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x383a=['ShowSquareOdbc','dsn','getContactByPhone','GetContactByPhone','phone','getTrunkById','ShowTrunk','getSoundById','getIntervalById','Interval','getSmsAccountById','createSmsMessage','CreateSmsMessage','createSquareDetailsReport','CreateSquareDetailsReport','createSquareReport','merge','arg_1','arg_2','format','YYYY-MM-DD\x20HH:mm:ss','createSquareRecording','createSquareMessage','CreateSquareMessage','createCmContact','ShowCmHopper','ListId','then','CreateCmContact','ShowPause','agentLogin','LoginUser','agentPause','PauseUser','agentUnpause','agentLogout','LogoutUser','moment','jayson/promise','request','error','message','GetSquareProjects','getSquareProject','production','getMailAccountById','MailServerOut','CloudProvider','name','email','getSquareProjectById','ShowSquareProject','getVoiceQueueById','ShowVoiceQueue','getVariableById','getSquareOdbcById'];(function(_0x1e3c16,_0x372caa){var _0x47a0c9=function(_0x47f81d){while(--_0x47f81d){_0x1e3c16['push'](_0x1e3c16['shift']());}};_0x47a0c9(++_0x372caa);}(_0x383a,0x1ad));var _0xa383=function(_0x2c396c,_0x4db177){_0x2c396c=_0x2c396c-0x0;var _0x26219b=_0x383a[_0x2c396c];return _0x26219b;};'use strict';var _=require('lodash');var moment=require(_0xa383('0x0'));var jayson=require(_0xa383('0x1'));var client=jayson['client']['http']({'port':0x2329});function request(_0x1e65e1,_0x5a053b){return new Promise(function(_0x15f485,_0x2d5b89){return client[_0xa383('0x2')](_0x1e65e1,_0x5a053b)['then'](function(_0x4d64f9){if(_0x4d64f9[_0xa383('0x3')]){return _0x2d5b89(_0x4d64f9[_0xa383('0x3')][_0xa383('0x4')]);}else{return _0x15f485(_0x4d64f9['result']);}})['catch'](function(_0x574ced){return _0x2d5b89(_0x574ced);});});}exports['getSquareProjects']=function(){return request(_0xa383('0x5'),{'options':{'raw':![],'attributes':['id','name','production']}});};exports[_0xa383('0x6')]=function(_0x3d63e4){return request('ShowSquareProject',{'options':{'raw':![],'where':{'name':_0x3d63e4},'attributes':[_0xa383('0x7')]}});};exports[_0xa383('0x8')]=function(_0x4628c1){return request('ShowMailAccount',{'options':{'raw':![],'where':{'id':_0x4628c1},'include':[{'model':_0xa383('0x9'),'as':'Smtp','include':[{'model':'CloudProvider','as':_0xa383('0xa')}]}],'attributes':['id',_0xa383('0xb'),_0xa383('0xc')],'smtp':!![]}});};exports[_0xa383('0xd')]=function(_0x52edec){return request(_0xa383('0xe'),{'options':{'where':{'id':_0x52edec},'attributes':[_0xa383('0xb')]}});};exports[_0xa383('0xf')]=function(_0xdf9a86){return request(_0xa383('0x10'),{'options':{'where':{'id':_0xdf9a86},'attributes':[_0xa383('0xb')]}});};exports[_0xa383('0x11')]=function(_0x83a77a){return request('ShowVariable',{'options':{'where':{'id':_0x83a77a},'attributes':['name']}});};exports[_0xa383('0x12')]=function(_0x2d8794){return request(_0xa383('0x13'),{'options':{'where':{'id':_0x2d8794},'attributes':[_0xa383('0x14')]}});};exports['getUserById']=function(_0xb098f){return request('ShowUser',{'options':{'where':{'id':_0xb098f},'attributes':[_0xa383('0xb')]}});};exports[_0xa383('0x15')]=function(_0x2ccaf7){return request(_0xa383('0x16'),{'options':{'where':{'phone':_0x2ccaf7[_0xa383('0x17')]},'attributes':['id']}});};exports[_0xa383('0x18')]=function(_0x35e38f){return request(_0xa383('0x19'),{'options':{'where':{'id':_0x35e38f},'attributes':[_0xa383('0xb')]}});};exports[_0xa383('0x1a')]=function(_0x56de51){return request('ShowSound',{'options':{'where':{'id':_0x56de51},'attributes':['save_name']}});};exports[_0xa383('0x1b')]=function(_0x4109fc){return request('ShowInterval',{'options':{'raw':![],'where':{'id':_0x4109fc},'include':[{'model':_0xa383('0x1c'),'as':'Intervals'}]}});};exports[_0xa383('0x1d')]=function(_0x1f376f){return request('ShowSmsAccount',{'options':{'where':{'id':_0x1f376f},'attributes':['id',_0xa383('0xb')]}});};exports[_0xa383('0x1e')]=function(_0x4cc53b){return request(_0xa383('0x1f'),{'body':_0x4cc53b});};exports[_0xa383('0x20')]=function(_0x37bacb){return request(_0xa383('0x21'),{'body':_0x37bacb});};exports[_0xa383('0x22')]=function(_0x3c8e4c){return request('CreateSquareReport',{'body':_[_0xa383('0x23')](_0x3c8e4c,{'project_name':_0x3c8e4c[_0xa383('0x24')],'prev_project_name':_0x3c8e4c[_0xa383('0x25')]||'','is_subproject':_0x3c8e4c[_0xa383('0x25')]?!![]:![],'leaveAt':moment()[_0xa383('0x26')](_0xa383('0x27'))})});};exports[_0xa383('0x28')]=function(_0x32fec7){return request('CreateSquareRecording',{'body':_0x32fec7});};exports[_0xa383('0x29')]=function(_0x25ce4f){return request(_0xa383('0x2a'),{'body':_0x25ce4f});};exports[_0xa383('0x2b')]=function(_0x2640f4){return request(_0xa383('0x2c'),{'options':{'raw':![],'where':{'phone':_0x2640f4[_0xa383('0x17')],'ListId':_0x2640f4[_0xa383('0x2d')]}}})[_0xa383('0x2e')](function(_0x14c3f6){if(_0x14c3f6){return _0x14c3f6;}return request(_0xa383('0x2f'),{'body':_0x2640f4});});};exports['getPauseById']=function(_0x4d0ecb){return request(_0xa383('0x30'),{'options':{'where':{'id':_0x4d0ecb},'attributes':[_0xa383('0xb')]}});};exports[_0xa383('0x31')]=function(_0x5b46d4,_0x97193b){return request(_0xa383('0x32'),{'body':{'interface':_0x97193b},'options':{'where':_0x5b46d4}});};exports[_0xa383('0x33')]=function(_0x1394c5,_0x56866d,_0x32f851){return request(_0xa383('0x34'),{'body':{'type':_0x56866d,'uniqueid':_0x32f851},'options':{'where':_0x1394c5}});};exports[_0xa383('0x35')]=function(_0x110a19){return request('UnpauseUser',{'body':{},'options':{'where':_0x110a19}});};exports[_0xa383('0x36')]=function(_0x125eba){return request(_0xa383('0x37'),{'body':{},'options':{'where':_0x125eba}});};
\ No newline at end of file
+var _0x68fc=['getVoiceQueueById','ShowVoiceQueue','getVariableById','ShowVariable','getSquareOdbcById','dsn','getUserById','ShowUser','getContactByPhone','GetContactByPhone','phone','getTrunkById','ShowTrunk','getSoundById','save_name','getIntervalById','Interval','Intervals','getSmsAccountById','ShowSmsAccount','createSmsMessage','CreateSmsMessage','createSquareDetailsReport','CreateSquareDetailsReport','createSquareReport','CreateSquareReport','merge','arg_2','YYYY-MM-DD\x20HH:mm:ss','createSquareRecording','CreateSquareRecording','createSquareMessage','CreateSquareMessage','ShowCmHopper','ListId','CreateCmContact','getPauseById','ShowPause','LoginUser','agentPause','agentUnpause','UnpauseUser','agentLogout','lodash','moment','jayson/promise','then','error','catch','getSquareProjects','GetSquareProjects','name','production','getSquareProject','ShowSquareProject','ShowMailAccount','MailServerOut','Smtp','CloudProvider','email','getSquareProjectById'];(function(_0x3080a8,_0x4a688f){var _0x3f05b7=function(_0x3f8a73){while(--_0x3f8a73){_0x3080a8['push'](_0x3080a8['shift']());}};_0x3f05b7(++_0x4a688f);}(_0x68fc,0xa5));var _0xc68f=function(_0x49efc8,_0x5cb565){_0x49efc8=_0x49efc8-0x0;var _0x2fa473=_0x68fc[_0x49efc8];return _0x2fa473;};'use strict';var _=require(_0xc68f('0x0'));var moment=require(_0xc68f('0x1'));var jayson=require(_0xc68f('0x2'));var client=jayson['client']['http']({'port':0x2329});function request(_0x26513f,_0x506fb5){return new Promise(function(_0xe70787,_0x593648){return client['request'](_0x26513f,_0x506fb5)[_0xc68f('0x3')](function(_0x2ad310){if(_0x2ad310[_0xc68f('0x4')]){return _0x593648(_0x2ad310[_0xc68f('0x4')]['message']);}else{return _0xe70787(_0x2ad310['result']);}})[_0xc68f('0x5')](function(_0x2bf3fd){return _0x593648(_0x2bf3fd);});});}exports[_0xc68f('0x6')]=function(){return request(_0xc68f('0x7'),{'options':{'raw':![],'attributes':['id',_0xc68f('0x8'),_0xc68f('0x9')]}});};exports[_0xc68f('0xa')]=function(_0x3bd373){return request(_0xc68f('0xb'),{'options':{'raw':![],'where':{'name':_0x3bd373},'attributes':[_0xc68f('0x9')]}});};exports['getMailAccountById']=function(_0x3b1a43){return request(_0xc68f('0xc'),{'options':{'raw':![],'where':{'id':_0x3b1a43},'include':[{'model':_0xc68f('0xd'),'as':_0xc68f('0xe'),'include':[{'model':_0xc68f('0xf'),'as':_0xc68f('0xf')}]}],'attributes':['id',_0xc68f('0x8'),_0xc68f('0x10')],'smtp':!![]}});};exports[_0xc68f('0x11')]=function(_0x4112df){return request(_0xc68f('0xb'),{'options':{'where':{'id':_0x4112df},'attributes':['name']}});};exports[_0xc68f('0x12')]=function(_0x90ccbd){return request(_0xc68f('0x13'),{'options':{'where':{'id':_0x90ccbd},'attributes':[_0xc68f('0x8')]}});};exports[_0xc68f('0x14')]=function(_0x2673b4){return request(_0xc68f('0x15'),{'options':{'where':{'id':_0x2673b4},'attributes':[_0xc68f('0x8')]}});};exports[_0xc68f('0x16')]=function(_0x5e1e5b){return request('ShowSquareOdbc',{'options':{'where':{'id':_0x5e1e5b},'attributes':[_0xc68f('0x17')]}});};exports[_0xc68f('0x18')]=function(_0x171eea){return request(_0xc68f('0x19'),{'options':{'where':{'id':_0x171eea},'attributes':[_0xc68f('0x8')]}});};exports[_0xc68f('0x1a')]=function(_0x50fab4){return request(_0xc68f('0x1b'),{'options':{'where':{'phone':_0x50fab4[_0xc68f('0x1c')]},'attributes':['id']}});};exports[_0xc68f('0x1d')]=function(_0x2c058c){return request(_0xc68f('0x1e'),{'options':{'where':{'id':_0x2c058c},'attributes':[_0xc68f('0x8')]}});};exports[_0xc68f('0x1f')]=function(_0x3c32c8){return request('ShowSound',{'options':{'where':{'id':_0x3c32c8},'attributes':[_0xc68f('0x20')]}});};exports[_0xc68f('0x21')]=function(_0x2e27b9){return request('ShowInterval',{'options':{'raw':![],'where':{'id':_0x2e27b9},'include':[{'model':_0xc68f('0x22'),'as':_0xc68f('0x23')}]}});};exports[_0xc68f('0x24')]=function(_0x2064db){return request(_0xc68f('0x25'),{'options':{'where':{'id':_0x2064db},'attributes':['id',_0xc68f('0x8')]}});};exports[_0xc68f('0x26')]=function(_0x547d46){return request(_0xc68f('0x27'),{'body':_0x547d46});};exports[_0xc68f('0x28')]=function(_0x512c9c){return request(_0xc68f('0x29'),{'body':_0x512c9c});};exports[_0xc68f('0x2a')]=function(_0x35945b){return request(_0xc68f('0x2b'),{'body':_[_0xc68f('0x2c')](_0x35945b,{'project_name':_0x35945b['arg_1'],'prev_project_name':_0x35945b[_0xc68f('0x2d')]||'','is_subproject':_0x35945b[_0xc68f('0x2d')]?!![]:![],'leaveAt':moment()['format'](_0xc68f('0x2e'))})});};exports[_0xc68f('0x2f')]=function(_0x4d26e3){return request(_0xc68f('0x30'),{'body':_0x4d26e3});};exports[_0xc68f('0x31')]=function(_0x2a4a5d){return request(_0xc68f('0x32'),{'body':_0x2a4a5d});};exports['createCmContact']=function(_0x477a1c){return request(_0xc68f('0x33'),{'options':{'raw':![],'where':{'phone':_0x477a1c[_0xc68f('0x1c')],'ListId':_0x477a1c[_0xc68f('0x34')]}}})[_0xc68f('0x3')](function(_0x11b203){if(_0x11b203){return _0x11b203;}return request(_0xc68f('0x35'),{'body':_0x477a1c});});};exports[_0xc68f('0x36')]=function(_0x4bb052){return request(_0xc68f('0x37'),{'options':{'where':{'id':_0x4bb052},'attributes':[_0xc68f('0x8')]}});};exports['agentLogin']=function(_0x323677,_0x6d2d34){return request(_0xc68f('0x38'),{'body':{'interface':_0x6d2d34},'options':{'where':_0x323677}});};exports[_0xc68f('0x39')]=function(_0x51e82c,_0x1deee7,_0x16e1d0){return request('PauseUser',{'body':{'type':_0x1deee7,'uniqueid':_0x16e1d0},'options':{'where':_0x51e82c}});};exports[_0xc68f('0x3a')]=function(_0x1f1101){return request(_0xc68f('0x3b'),{'body':{},'options':{'where':_0x1f1101}});};exports[_0xc68f('0x3c')]=function(_0xd6cf9a){return request('LogoutUser',{'body':{},'options':{'where':_0xd6cf9a}});};
\ No newline at end of file
index 9be0645..e2bae88 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfc46=['./polly','exports'];(function(_0xf961f9,_0x24c7d2){var _0x18fd32=function(_0x4edda2){while(--_0x4edda2){_0xf961f9['push'](_0xf961f9['shift']());}};_0x18fd32(++_0x24c7d2);}(_0xfc46,0x9a));var _0x6fc4=function(_0x3048ea,_0x3838c2){_0x3048ea=_0x3048ea-0x0;var _0x1a13c4=_0xfc46[_0x3048ea];return _0x1a13c4;};var polly=require(_0x6fc4('0x0'));var lex=require('./lex');module[_0x6fc4('0x1')]={'polly':polly,'lex':lex};
\ No newline at end of file
+var _0x2709=['exports','./polly'];(function(_0xf346f1,_0x558ad3){var _0x128587=function(_0x4a61ca){while(--_0x4a61ca){_0xf346f1['push'](_0xf346f1['shift']());}};_0x128587(++_0x558ad3);}(_0x2709,0x189));var _0x9270=function(_0x188641,_0x59a603){_0x188641=_0x188641-0x0;var _0xbaa1d4=_0x2709[_0x188641];return _0xbaa1d4;};var polly=require(_0x9270('0x0'));var lex=require('./lex');module[_0x9270('0x1')]={'polly':polly,'lex':lex};
\ No newline at end of file
index a9ec881..b51dcb7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-'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
+var _0xf109=['./lib/api','exports'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0xf109,0xce));var _0x9f10=function(_0x4fbfd9,_0x3ab91a){_0x4fbfd9=_0x4fbfd9-0x0;var _0x31dc94=_0xf109[_0x4fbfd9];return _0x31dc94;};'use strict';var lex=require(_0x9f10('0x0'));module[_0x9f10('0x1')]=function(_0x44c4f2,_0x5d2950,_0x5b381d,_0x4cbc7a,_0x3659ce,_0x74f517){return lex(_0x44c4f2,_0x5d2950,_0x5b381d,_0x4cbc7a,_0x3659ce,_0x74f517);};
\ No newline at end of file
index 24e9366..72031f1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['LexRuntime','bluebird','aws-sdk','slots','hasOwnProperty'];(function(_0x1ed873,_0x2cf664){var _0x19736f=function(_0x13fb6e){while(--_0x13fb6e){_0x1ed873['push'](_0x1ed873['shift']());}};_0x19736f(++_0x2cf664);}(_0xa9e0,0x123));var _0x0a9e=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0xa9e0[_0x19e35c];return _0x3e1fe8;};'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(_0x1cf431,_0x86e66d){var _0x48d4ad=function(_0x3e37bc){while(--_0x3e37bc){_0x1cf431['push'](_0x1cf431['shift']());}};_0x48d4ad(++_0x86e66d);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0xa9e0[_0x4cf98e];return _0x1623ac;};'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 adb4575..f4baf09 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x805c=['exports','./lib/api'];(function(_0x4b4277,_0x22676f){var _0x1ff405=function(_0x2fa9e2){while(--_0x2fa9e2){_0x4b4277['push'](_0x4b4277['shift']());}};_0x1ff405(++_0x22676f);}(_0x805c,0x6f));var _0xc805=function(_0x2c50c0,_0x1913f4){_0x2c50c0=_0x2c50c0-0x0;var _0x574a23=_0x805c[_0x2c50c0];return _0x574a23;};'use strict';var polly=require(_0xc805('0x0'));module[_0xc805('0x1')]=function(_0x15ccdf,_0x5d3fdd,_0xb98c9d,_0x476ece,_0x3e41c5,_0x26c7be,_0x7e6259){return polly(_0x15ccdf,_0x5d3fdd,_0xb98c9d,_0x476ece,_0x3e41c5,_0x26c7be,_0x7e6259);};
\ No newline at end of file
+var _0x279e=['./lib/api','exports'];(function(_0x1fffcc,_0xb258ec){var _0xa83ea3=function(_0x327fcc){while(--_0x327fcc){_0x1fffcc['push'](_0x1fffcc['shift']());}};_0xa83ea3(++_0xb258ec);}(_0x279e,0x84));var _0xe279=function(_0x17fd28,_0x5d6f95){_0x17fd28=_0x17fd28-0x0;var _0x3dc275=_0x279e[_0x17fd28];return _0x3dc275;};'use strict';var polly=require(_0xe279('0x0'));module[_0xe279('0x1')]=function(_0x218b2f,_0x3cdfb3,_0x31ab7c,_0x21dd74,_0xb37ed6,_0x41ec61,_0xdde903){return polly(_0x218b2f,_0x3cdfb3,_0x31ab7c,_0x21dd74,_0xb37ed6,_0x41ec61,_0xdde903);};
\ No newline at end of file
index 2bb01de..49d226d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9f85=['AudioStream','No\x20data\x20response\x20from\x20aws\x20Polly!','exports','Polly','text','mp3','path','bluebird','synthesizeSpeech'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x9f85,0x9f));var _0x59f8=function(_0x58d722,_0x239a59){_0x58d722=_0x58d722-0x0;var _0x486753=_0x9f85[_0x58d722];return _0x486753;};'use strict';var fs=require('fs');var path=require(_0x59f8('0x0'));var BPromise=require(_0x59f8('0x1'));var rs=require('randomstring');var AWS=require('aws-sdk');function pollyResult(_0x1e0f16,_0x4db1d1,_0x2a081d){return new BPromise(function(_0x3d97cf,_0x3bb1f5){_0x1e0f16[_0x59f8('0x2')](_0x4db1d1,function(_0x1ab89c,_0x5b6f0b){if(_0x1ab89c){_0x3bb1f5(_0x1ab89c);}else if(_0x5b6f0b){if(_0x5b6f0b[_0x59f8('0x3')]instanceof Buffer){fs['writeFile'](_0x2a081d,_0x5b6f0b[_0x59f8('0x3')],function(_0x2f5bf7){if(_0x2f5bf7){_0x3bb1f5(_0x2f5bf7);}else{_0x3d97cf();}});}else{_0x3bb1f5(new Error('Invalid\x20data\x20response\x20from\x20aws\x20Polly!'));}}else{_0x3bb1f5(new Error(_0x59f8('0x4')));}});});}module[_0x59f8('0x5')]=function(_0x262bfb,_0x53553e,_0x1e3eb2,_0xe335d3,_0x5b3ba7,_0x331d90,_0x5a50dd){var _0x51c41c=new AWS[(_0x59f8('0x6'))]({'accessKeyId':_0x262bfb,'secretAccessKey':_0x53553e,'region':_0x1e3eb2});var _0x4a6a9b={'Text':_0x5b3ba7,'TextType':_0x331d90||_0x59f8('0x7'),'OutputFormat':_0x59f8('0x8'),'VoiceId':_0xe335d3};return pollyResult(_0x51c41c,_0x4a6a9b,_0x5a50dd);};
\ No newline at end of file
+var _0xc1a7=['exports','Polly','text','mp3','path','synthesizeSpeech','writeFile','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','No\x20data\x20response\x20from\x20aws\x20Polly!'];(function(_0x497513,_0x114370){var _0x94baac=function(_0x2b8311){while(--_0x2b8311){_0x497513['push'](_0x497513['shift']());}};_0x94baac(++_0x114370);}(_0xc1a7,0x136));var _0x7c1a=function(_0x2aab8e,_0x440d3b){_0x2aab8e=_0x2aab8e-0x0;var _0x2a67=_0xc1a7[_0x2aab8e];return _0x2a67;};'use strict';var fs=require('fs');var path=require(_0x7c1a('0x0'));var BPromise=require('bluebird');var rs=require('randomstring');var AWS=require('aws-sdk');function pollyResult(_0x17bfb0,_0x19ef08,_0x58c2dd){return new BPromise(function(_0x3cfbec,_0xb74393){_0x17bfb0[_0x7c1a('0x1')](_0x19ef08,function(_0x44d23d,_0x2f7654){if(_0x44d23d){_0xb74393(_0x44d23d);}else if(_0x2f7654){if(_0x2f7654['AudioStream']instanceof Buffer){fs[_0x7c1a('0x2')](_0x58c2dd,_0x2f7654['AudioStream'],function(_0x1b5bfc){if(_0x1b5bfc){_0xb74393(_0x1b5bfc);}else{_0x3cfbec();}});}else{_0xb74393(new Error(_0x7c1a('0x3')));}}else{_0xb74393(new Error(_0x7c1a('0x4')));}});});}module[_0x7c1a('0x5')]=function(_0xe89f1e,_0x81fd60,_0x2fc704,_0x43e69a,_0x39dcad,_0x30a1d6,_0x55ee62){var _0x10b6e3=new AWS[(_0x7c1a('0x6'))]({'accessKeyId':_0xe89f1e,'secretAccessKey':_0x81fd60,'region':_0x2fc704});var _0x16a4c9={'Text':_0x39dcad,'TextType':_0x30a1d6||_0x7c1a('0x7'),'OutputFormat':_0x7c1a('0x8'),'VoiceId':_0x43e69a};return pollyResult(_0x10b6e3,_0x16a4c9,_0x55ee62);};
\ No newline at end of file
index cca46cc..82c9327 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xda32=['./lib/api','exports'];(function(_0x3fa5da,_0x5a5e40){var _0x47fa81=function(_0x221002){while(--_0x221002){_0x3fa5da['push'](_0x3fa5da['shift']());}};_0x47fa81(++_0x5a5e40);}(_0xda32,0x164));var _0x2da3=function(_0x4fbea9,_0x5d2484){_0x4fbea9=_0x4fbea9-0x0;var _0x3bc362=_0xda32[_0x4fbea9];return _0x3bc362;};'use strict';var asr=require(_0x2da3('0x0'));module[_0x2da3('0x1')]=function(_0x55d3b4,_0x449cc8,_0x250684,_0x98090d){return asr(_0x55d3b4,_0x449cc8,_0x250684);};
\ No newline at end of file
+var _0x9606=['exports'];(function(_0x2e4a84,_0x3de6e1){var _0x16ffe8=function(_0x43382f){while(--_0x43382f){_0x2e4a84['push'](_0x2e4a84['shift']());}};_0x16ffe8(++_0x3de6e1);}(_0x9606,0xfc));var _0x6960=function(_0x2d88fa,_0x38406b){_0x2d88fa=_0x2d88fa-0x0;var _0x1a62de=_0x9606[_0x2d88fa];return _0x1a62de;};'use strict';var asr=require('./lib/api');module[_0x6960('0x0')]=function(_0x27db95,_0x407978,_0x43bd12,_0x32d28a){return asr(_0x27db95,_0x407978,_0x43bd12);};
\ No newline at end of file
index be176b4..57b74f5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1094=['8000','url','bluebird','exports','length','filepath\x20should\x20be\x20a\x20string','string','key\x20should\x20be\x20a\x20string','undefined','lang\x20should\x20be\x20a\x20string','readFileSync','toString','base64','/v1/speech:recognize?key='];(function(_0x5416db,_0x55683a){var _0x243e35=function(_0x1eb623){while(--_0x1eb623){_0x5416db['push'](_0x5416db['shift']());}};_0x243e35(++_0x55683a);}(_0x1094,0x143));var _0x4109=function(_0x265003,_0xf0f023){_0x265003=_0x265003-0x0;var _0x33c743=_0x1094[_0x265003];return _0x33c743;};'use strict';var url=require(_0x4109('0x0'));var BPromise=require(_0x4109('0x1'));var fs=require('fs');var host='https://speech.googleapis.com';module[_0x4109('0x2')]=function(_0x52b156,_0x42557f,_0x32d6c3){return new BPromise(function(_0x308136,_0x181d79){var _0x36e917;if(typeof _0x52b156!=='string'||_0x52b156[_0x4109('0x3')]===0x0){return _0x181d79(_0x4109('0x4'));}if(typeof _0x42557f!==_0x4109('0x5')||_0x42557f[_0x4109('0x3')]===0x0){return _0x181d79(_0x4109('0x6'));}if(typeof _0x32d6c3!==_0x4109('0x7')&&(typeof _0x32d6c3!=='string'||_0x32d6c3[_0x4109('0x3')]===0x0)){return _0x181d79(_0x4109('0x8'));}try{_0x36e917=fs[_0x4109('0x9')](_0x52b156)[_0x4109('0xa')](_0x4109('0xb'));}catch(_0x4af1f9){return _0x181d79(_0x4af1f9);}return _0x308136({'method':'POST','uri':host+_0x4109('0xc')+_0x42557f,'body':{'config':{'encoding':'LINEAR16','sampleRateHertz':_0x4109('0xd'),'languageCode':_0x32d6c3},'audio':{'content':_0x36e917}},'json':!![]});});};
\ No newline at end of file
+var _0x4522=['filepath\x20should\x20be\x20a\x20string','key\x20should\x20be\x20a\x20string','undefined','lang\x20should\x20be\x20a\x20string','readFileSync','toString','POST','8000','https://speech.googleapis.com','exports','string','length'];(function(_0x5cc5ff,_0x57d334){var _0x33b588=function(_0x599cc3){while(--_0x599cc3){_0x5cc5ff['push'](_0x5cc5ff['shift']());}};_0x33b588(++_0x57d334);}(_0x4522,0x1a0));var _0x2452=function(_0x2df537,_0x1359a8){_0x2df537=_0x2df537-0x0;var _0x288850=_0x4522[_0x2df537];return _0x288850;};'use strict';var url=require('url');var BPromise=require('bluebird');var fs=require('fs');var host=_0x2452('0x0');module[_0x2452('0x1')]=function(_0x4a08d4,_0x5080f5,_0x229028){return new BPromise(function(_0x1fdf5b,_0x35e30a){var _0x2f21dc;if(typeof _0x4a08d4!==_0x2452('0x2')||_0x4a08d4[_0x2452('0x3')]===0x0){return _0x35e30a(_0x2452('0x4'));}if(typeof _0x5080f5!==_0x2452('0x2')||_0x5080f5[_0x2452('0x3')]===0x0){return _0x35e30a(_0x2452('0x5'));}if(typeof _0x229028!==_0x2452('0x6')&&(typeof _0x229028!==_0x2452('0x2')||_0x229028[_0x2452('0x3')]===0x0)){return _0x35e30a(_0x2452('0x7'));}try{_0x2f21dc=fs[_0x2452('0x8')](_0x4a08d4)[_0x2452('0x9')]('base64');}catch(_0x5dc630){return _0x35e30a(_0x5dc630);}return _0x1fdf5b({'method':_0x2452('0xa'),'uri':host+'/v1/speech:recognize?key='+_0x5080f5,'body':{'config':{'encoding':'LINEAR16','sampleRateHertz':_0x2452('0xb'),'languageCode':_0x229028},'audio':{'content':_0x2f21dc}},'json':!![]});});};
\ No newline at end of file
index 26a6fca..0ce073c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x53d0=['exports','./asr'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0x53d0,0x73));var _0x053d=function(_0xdcc8b2,_0x3ef9c3){_0xdcc8b2=_0xdcc8b2-0x0;var _0x25eca9=_0x53d0[_0xdcc8b2];return _0x25eca9;};var asr=require(_0x053d('0x0'));module[_0x053d('0x1')]={'asr':asr};
\ No newline at end of file
+var _0x0436=['exports','./asr'];(function(_0x2d2309,_0x360354){var _0x51e163=function(_0x51ad18){while(--_0x51ad18){_0x2d2309['push'](_0x2d2309['shift']());}};_0x51e163(++_0x360354);}(_0x0436,0x145));var _0x6043=function(_0x334e13,_0x5cfd03){_0x334e13=_0x334e13-0x0;var _0x5632cf=_0x0436[_0x334e13];return _0x5632cf;};var asr=require(_0x6043('0x0'));module[_0x6043('0x1')]={'asr':asr};
\ No newline at end of file
index b9562ac..8acead7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9b9a=['readFileSync','toString','https://texttospeech.googleapis.com/v1/','?key=','input','voice','audioConfig','MP3','POST','then','.mp3','from','writeFile','googleCloudTTS\x20path','googleTTS','https://translate.google.com/_/TranslateWebserverUi/data/batchexecute','utf8','f.req=','stringify','jQ1olc','generic','slice','length','lang\x20\x22','\x22\x20might\x20not\x20exist','parse\x20response\x20failed:\x0a','writeFileSync','goggleTTS\x20path','uri','results','alternatives','transcript','join','map','confidence','googleASR\x20confidence','catch','[%s]\x20%s:%s','name','message','result','source','resolvedQuery','action','fulfillment','score','status','code','metadata','endConversation','isFallbackIntent','replace','sessionPath','Dialogflow\x20V2\x20response:','queryResult','diagnosticInfo','fulfillmentText','intent','displayName','isFallback','languageCode','queryText','responseId','intentDetectionConfidence','tildeASR','asr','Tilde\x20ASR\x20confidence','awsPolly','lex','ispeechTTS','format','ispeechASR','%s?apikey=%s&action=recognize&locale=%s&content-type=audio/x-wav&audio=%s&%s','model=%s','sestekNDA','text','channelData','CustomAction','CustomActionData','AudioFromTts','Data','audiofile','dirName','apiai-promise','bluebird','dialogflow','https','md5','querystring','randomstring','sox','google-tts-api','parse','util','./aws','./google','./tilde','../../../config/logger','agi','https://api.ispeech.org/api/rest','protocol','https:','WHAT_EVER','get','statusCode','error','\x20failed,\x20status\x20code\x20=\x20','statusMessage','request\x20to\x20','createWriteStream','finish','info','close','unlink','download\x20error','pipe','end','path','data','transcode','wav','error\x20convert','start','resolve','tmp','generate','.wav','base64','chmodSync','777','split'];(function(_0x24ea4f,_0x6c54cc){var _0x25fe14=function(_0xfa4487){while(--_0xfa4487){_0x24ea4f['push'](_0x24ea4f['shift']());}};_0x25fe14(++_0x6c54cc);}(_0x9b9a,0x1dc));var _0xa9b9=function(_0x166e2a,_0x5d3944){_0x166e2a=_0x166e2a-0x0;var _0x1b914b=_0x9b9a[_0x166e2a];return _0x1b914b;};'use strict';var apiai=require(_0xa9b9('0x0'));var BPromise=require(_0xa9b9('0x1'));var dialogflow=require(_0xa9b9('0x2'));var fs=require('fs');var http=require('http');var https=require(_0xa9b9('0x3'));var md5=require(_0xa9b9('0x4'));var path=require('path');var querystring=require(_0xa9b9('0x5'));var rp=require('request-promise');var rs=require(_0xa9b9('0x6'));var sox=require(_0xa9b9('0x7'));var tts=require(_0xa9b9('0x8'));var urlParse=require('url')[_0xa9b9('0x9')];var util=require(_0xa9b9('0xa'));var aws=require(_0xa9b9('0xb'));var google=require(_0xa9b9('0xc'));var sestek=require('./sestek');var tilde=require(_0xa9b9('0xd'));var logger=require(_0xa9b9('0xe'))(_0xa9b9('0xf'));var ISPEECH_API=_0xa9b9('0x10');function downloadFile(_0x1a5310,_0x58bc40){return new BPromise(function(_0x5064e2,_0x4c6e56){var _0x253809=urlParse(_0x1a5310);var _0x26f192=_0x253809[_0xa9b9('0x11')]===_0xa9b9('0x12')?https:http;var _0x355cb8={'host':_0x253809['host'],'path':_0x253809['path'],'headers':{'user-agent':_0xa9b9('0x13')}};_0x26f192[_0xa9b9('0x14')](_0x355cb8,function(_0x1643cc){if(_0x1643cc[_0xa9b9('0x15')]!==0xc8){logger[_0xa9b9('0x16')]('request\x20to\x20'+_0x1a5310+_0xa9b9('0x17')+_0x1643cc[_0xa9b9('0x15')]+'\x20('+_0x1643cc[_0xa9b9('0x18')]+')');_0x4c6e56(new Error(_0xa9b9('0x19')+_0x1a5310+_0xa9b9('0x17')+_0x1643cc[_0xa9b9('0x15')]+'\x20('+_0x1643cc[_0xa9b9('0x18')]+')'));return;}var _0x46bc8b=fs[_0xa9b9('0x1a')](_0x58bc40);_0x46bc8b['on'](_0xa9b9('0x1b'),function(){logger[_0xa9b9('0x1c')]('finish\x20download\x20file');_0x46bc8b[_0xa9b9('0x1d')](_0x5064e2);});_0x46bc8b['on'](_0xa9b9('0x16'),function(_0xab2284){fs[_0xa9b9('0x1e')](_0x58bc40);logger[_0xa9b9('0x16')](_0xa9b9('0x1f'),_0xab2284);_0x4c6e56(_0xab2284);});_0x1643cc[_0xa9b9('0x20')](_0x46bc8b);})['on'](_0xa9b9('0x16'),function(_0x4c18ba){logger[_0xa9b9('0x16')](_0x4c18ba);_0x4c6e56(_0x4c18ba);})[_0xa9b9('0x21')]();});}function uploadFile(_0x58a42d){return new BPromise(function(_0x3707d7,_0x3f821f){var _0x71d613=urlParse(_0x58a42d);var _0x1a7b60=_0x71d613['protocol']===_0xa9b9('0x12')?https:http;var _0x4bd2d4={'host':_0x71d613['host'],'path':_0x71d613[_0xa9b9('0x22')],'headers':{'user-agent':_0xa9b9('0x13')}};_0x1a7b60[_0xa9b9('0x14')](_0x4bd2d4,function(_0x968bca){if(_0x968bca[_0xa9b9('0x15')]!==0xc8){_0x3f821f(new Error(_0xa9b9('0x19')+_0x58a42d+_0xa9b9('0x17')+_0x968bca[_0xa9b9('0x15')]+'\x20('+_0x968bca['statusMessage']+')'));return;}var _0x1d61f4='';_0x968bca['on'](_0xa9b9('0x23'),function(_0x2e672e){_0x1d61f4+=_0x2e672e;});_0x968bca['on'](_0xa9b9('0x21'),function(){_0x3707d7(_0x1d61f4);});})['on']('error',function(_0x21f14a){_0x3f821f(_0x21f14a);})[_0xa9b9('0x21')]();});}function convertFile(_0x186755,_0x344985){return new BPromise(function(_0x2c18e6,_0x583850){var _0x38b066=sox[_0xa9b9('0x24')](_0x186755,_0x344985,{'sampleRate':0x1f40,'format':_0xa9b9('0x25'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x38b066['on'](_0xa9b9('0x16'),function(_0x4f4d70){logger['error'](_0xa9b9('0x26'),_0x4f4d70);_0x583850(_0x4f4d70);});_0x38b066['on']('end',function(){logger[_0xa9b9('0x1c')]('finish\x20to\x20convert');_0x2c18e6();});_0x38b066[_0xa9b9('0x27')]();});}function base64Decode(_0x2f7624,_0x542b33){var _0x2de8cd=path[_0xa9b9('0x28')](__dirname,_0xa9b9('0x29'),rs[_0xa9b9('0x2a')](0x4)+_0xa9b9('0x2b'));fs['writeFileSync'](_0x2de8cd,_0x2f7624,_0xa9b9('0x2c'));return convertFile(_0x2de8cd,_0x542b33)['then'](function(){try{fs[_0xa9b9('0x1e')](_0x2de8cd);fs[_0xa9b9('0x2d')](_0x542b33,_0xa9b9('0x2e'));}catch(_0x6647b2){logger[_0xa9b9('0x16')](_0x6647b2);}return _0x542b33[_0xa9b9('0x2f')]('.')[0x0];});}function base64Encode(_0x5d9662){var _0x16c3f8=fs[_0xa9b9('0x30')](_0x5d9662);return new Buffer(_0x16c3f8)[_0xa9b9('0x31')](_0xa9b9('0x2c'));}exports['googleCloudTTS']=function(_0x5e6cb1,_0x488764,_0x5141f7,_0x12bf4f,_0x25c397,_0x4017cd){var _0x1d70a4,_0x4ea0f2;var _0xd8717f=_0xa9b9('0x32');var _0xd81ef6=_0xa9b9('0x33')+_0x5e6cb1;var _0x219df4={};if(_0x488764==='ssml'){_0x219df4[_0xa9b9('0x34')]={'ssml':_0x5141f7};}else{_0x219df4[_0xa9b9('0x34')]={'text':_0x5141f7};};_0x219df4[_0xa9b9('0x35')]={'languageCode':_0x12bf4f,'ssmlGender':_0x25c397};_0x219df4[_0xa9b9('0x36')]={'audioEncoding':_0xa9b9('0x37'),'sampleRateHertz':0x1f40};var _0x371b49={'url':_0xd8717f+'text:synthesize'+_0xd81ef6,'method':_0xa9b9('0x38'),'json':!![],'body':_0x219df4};return rp(_0x371b49)[_0xa9b9('0x39')](function(_0x52dcc1){return new BPromise(function(_0x1865ff,_0x16d4bb){_0x1d70a4=path['resolve'](__dirname,_0xa9b9('0x29'),rs['generate'](0x4)+_0xa9b9('0x3a'));var _0x422045=Buffer[_0xa9b9('0x3b')](_0x52dcc1['audioContent'],_0xa9b9('0x2c'));return fs[_0xa9b9('0x3c')](_0x1d70a4,_0x422045,function(_0x13292a){_0x16d4bb(_0x13292a);},function(_0x1bb5b8){fs[_0xa9b9('0x2d')](_0x1d70a4,_0xa9b9('0x2e'));_0x1865ff(_0x1bb5b8);});});})[_0xa9b9('0x39')](function(_0x18f86d){_0x4ea0f2=path[_0xa9b9('0x28')](__dirname,_0xa9b9('0x29'),rs[_0xa9b9('0x2a')](0x4)+_0xa9b9('0x2b'));return convertFile(_0x1d70a4,_0x4ea0f2);})[_0xa9b9('0x39')](function(){try{fs[_0xa9b9('0x1e')](_0x1d70a4);fs[_0xa9b9('0x2d')](_0x4ea0f2,_0xa9b9('0x2e'));}catch(_0x7bb999){logger[_0xa9b9('0x16')](_0x7bb999);}logger[_0xa9b9('0x1c')](_0xa9b9('0x3d'),_0x4ea0f2[_0xa9b9('0x2f')]('.')[0x0]);return _0x4ea0f2[_0xa9b9('0x2f')]('.')[0x0];});};exports[_0xa9b9('0x3e')]=function(_0x3df296,_0x228307){var _0xc3e92a=_0xa9b9('0x3f');var _0x5b3914,_0x14a18f;var _0x1b7c1e;var _0x237d79={'encoding':_0xa9b9('0x40'),'method':_0xa9b9('0x38'),'timeout':0x2710,'url':_0xc3e92a,'headers':{'Content-Type':'application/x-www-form-urlencoded'},'body':_0xa9b9('0x41')+encodeURIComponent(JSON[_0xa9b9('0x42')]([[[_0xa9b9('0x43'),JSON[_0xa9b9('0x42')]([_0x3df296,_0x228307||'en',![],'null']),null,_0xa9b9('0x44')]]]))};return rp(_0x237d79)[_0xa9b9('0x39')](function(_0x3f035a){try{_0x1b7c1e=eval(_0x3f035a[_0xa9b9('0x45')](0x5))[0x0][0x2];}catch(_0x1c06fa){throw new Error('parse\x20response\x20failed:\x0a'+_0x3f035a[_0xa9b9('0x23')]);}if(!_0x1b7c1e){if(_0x3df296[_0xa9b9('0x46')]>0xc8){throw new Error('text\x20length\x20limit\x20reached');}else{throw new Error(_0xa9b9('0x47')+_0x228307+_0xa9b9('0x48'));}}try{_0x1b7c1e=eval(_0x1b7c1e)[0x0];}catch(_0x58ab1a){throw new Error(_0xa9b9('0x49')+res[_0xa9b9('0x23')]);}const _0x3bb0b6=_0x1b7c1e;_0x5b3914=path['resolve'](__dirname,_0xa9b9('0x29'),rs[_0xa9b9('0x2a')](0x4)+'.mp3');fs[_0xa9b9('0x4a')](_0x5b3914,_0x1b7c1e,{'encoding':_0xa9b9('0x2c')});_0x14a18f=path[_0xa9b9('0x28')](__dirname,_0xa9b9('0x29'),rs[_0xa9b9('0x2a')](0x4)+_0xa9b9('0x2b'));return convertFile(_0x5b3914,_0x14a18f);})['then'](function(){try{fs['unlink'](_0x5b3914);fs[_0xa9b9('0x2d')](_0x14a18f,'777');}catch(_0x361743){logger[_0xa9b9('0x16')](_0x361743);}logger[_0xa9b9('0x1c')](_0xa9b9('0x4b'),_0x14a18f['split']('.')[0x0]);return _0x14a18f[_0xa9b9('0x2f')]('.')[0x0];});};exports['googleASR']=function(_0x9cd09b,_0x1069f1,_0x5f36f5){return google['asr'](_0x9cd09b,_0x1069f1,_0x5f36f5)[_0xa9b9('0x39')](function(_0x37fee2){logger[_0xa9b9('0x1c')](_0x37fee2[_0xa9b9('0x4c')]);return rp(_0x37fee2);})[_0xa9b9('0x39')](function(_0x224d6e){var _0xc2054f='';var _0x16398c=0x0;try{fs['unlink'](_0x9cd09b);}catch(_0x1c2b44){logger[_0xa9b9('0x16')](_0x1c2b44);}if(_0x224d6e&&_0x224d6e[_0xa9b9('0x4d')]){_0xc2054f=_0x224d6e[_0xa9b9('0x4d')]['map'](function(_0x8ff041){return _0x8ff041&&_0x8ff041[_0xa9b9('0x4e')][0x0]&&_0x8ff041[_0xa9b9('0x4e')][0x0][_0xa9b9('0x4f')]?_0x8ff041[_0xa9b9('0x4e')][0x0]['transcript']:'';})[_0xa9b9('0x50')]('\x0a');_0x16398c=_0x224d6e['results'][_0xa9b9('0x51')](function(_0x2aef6c){return _0x2aef6c&&_0x2aef6c[_0xa9b9('0x4e')][0x0]&&_0x2aef6c[_0xa9b9('0x4e')][0x0]['confidence']?_0x2aef6c[_0xa9b9('0x4e')][0x0][_0xa9b9('0x52')]:0x0;})[_0xa9b9('0x50')]('\x0a');}logger[_0xa9b9('0x1c')]('googleASR\x20transcription',_0xc2054f);logger[_0xa9b9('0x1c')](_0xa9b9('0x53'),_0x16398c);return{'transcript':_0xc2054f,'confidence':_0x16398c};})[_0xa9b9('0x54')](function(_0x37b6c4){logger[_0xa9b9('0x16')](_0xa9b9('0x55'),_0x37b6c4[_0xa9b9('0x15')],_0x37b6c4[_0xa9b9('0x56')],_0x37b6c4[_0xa9b9('0x57')]);});};exports['googleDialogflow']=function(_0x2829b6,_0x3fe8bf,_0x544097,_0x1adf39){var _0x2edc60=apiai(_0x3fe8bf,{'language':_0x1adf39||'en'});return _0x2edc60['textRequest'](_0x544097,{'sessionId':md5(_0x2829b6)})[_0xa9b9('0x39')](function(_0x5b322a){logger['info'](JSON[_0xa9b9('0x42')](_0x5b322a));return{'source':_0x5b322a[_0xa9b9('0x58')][_0xa9b9('0x59')],'resolvedQuery':_0x5b322a['result'][_0xa9b9('0x5a')],'action':_0x5b322a[_0xa9b9('0x58')][_0xa9b9('0x5b')],'actionIncomplete':_0x5b322a[_0xa9b9('0x58')]['actionIncomplete'],'speech':_0x5b322a[_0xa9b9('0x58')][_0xa9b9('0x5c')]['speech'],'score':_0x5b322a[_0xa9b9('0x58')][_0xa9b9('0x5d')],'statusCode':_0x5b322a[_0xa9b9('0x5e')][_0xa9b9('0x5f')],'endConversation':_0x5b322a['result'][_0xa9b9('0x60')][_0xa9b9('0x61')]||![],'isFallbackIntent':_0x5b322a[_0xa9b9('0x58')][_0xa9b9('0x60')][_0xa9b9('0x62')]};});};exports['googleDialogflowV2']=function(_0x2d45ee,_0x320c96,_0x38c267,_0x3bf6ae,_0x345bb8,_0x27b70b){var _0x224bf0=_0x3bf6ae[_0xa9b9('0x63')](/\\n/g,'\x0a');var _0x5ab69a={'credentials':{'private_key':_0x224bf0,'client_email':_0x38c267}};var _0x24f2a6=new dialogflow['SessionsClient'](_0x5ab69a);var _0x3c2ff8=_0x24f2a6[_0xa9b9('0x64')](_0x320c96,md5(_0x2d45ee));var _0x5ea7b5={'session':_0x3c2ff8,'queryInput':{'text':{'text':_0x345bb8,'languageCode':_0x27b70b}}};return _0x24f2a6['detectIntent'](_0x5ea7b5)[_0xa9b9('0x39')](function(_0x1af341){if(_0x1af341&&_0x1af341['length']){logger['info'](_0xa9b9('0x65'),JSON[_0xa9b9('0x42')](_0x1af341));var _0x1b61ad=_0x1af341[0x0];if(_0x1b61ad){var _0x280bb4={'action':_0x1b61ad[_0xa9b9('0x66')][_0xa9b9('0x5b')],'allRequiredParamsPresent':_0x1b61ad['queryResult']['allRequiredParamsPresent'],'endConversation':_0x1b61ad[_0xa9b9('0x66')][_0xa9b9('0x67')]&&_0x1b61ad[_0xa9b9('0x66')]['diagnosticInfo']['fields']?_0x1b61ad[_0xa9b9('0x66')][_0xa9b9('0x67')]['fields']['end_conversation']['boolValue']:![],'fulfillmentText':_0x1b61ad[_0xa9b9('0x66')][_0xa9b9('0x68')],'intentName':_0x1b61ad['queryResult'][_0xa9b9('0x69')][_0xa9b9('0x56')],'intentDisplayName':_0x1b61ad[_0xa9b9('0x66')][_0xa9b9('0x69')][_0xa9b9('0x6a')],'isFallbackIntent':_0x1b61ad[_0xa9b9('0x66')]['intent'][_0xa9b9('0x6b')],'languageCode':_0x1b61ad[_0xa9b9('0x66')][_0xa9b9('0x6c')],'queryText':_0x1b61ad[_0xa9b9('0x66')][_0xa9b9('0x6d')],'responseId':_0x1b61ad[_0xa9b9('0x6e')],'score':_0x1b61ad['queryResult'][_0xa9b9('0x6f')],'speech':_0x1b61ad[_0xa9b9('0x66')][_0xa9b9('0x68')],'providerResponse':JSON['stringify'](_0x1af341)};return _0x280bb4;}}});};exports[_0xa9b9('0x70')]=function(_0x196c46,_0x33694e,_0x533b14,_0x3cb12d){return tilde[_0xa9b9('0x71')](_0x196c46,_0x33694e,_0x533b14,_0x3cb12d)['then'](function(_0x139745){try{fs[_0xa9b9('0x1e')](_0x196c46);}catch(_0x3cd145){logger[_0xa9b9('0x16')](_0x3cd145);}logger[_0xa9b9('0x1c')]('Tilde\x20ASR\x20transcription',_0x139745[_0xa9b9('0x4f')]);logger[_0xa9b9('0x1c')](_0xa9b9('0x72'),_0x139745[_0xa9b9('0x52')]);return _0x139745;});};exports[_0xa9b9('0x73')]=function(_0x3503e8,_0x38894e,_0x146c4b,_0xc7ea7c,_0x5cb050,_0x2e3913){var _0x10323d=path[_0xa9b9('0x28')](__dirname,_0xa9b9('0x29'),rs[_0xa9b9('0x2a')](0x4)+'.mp3');var _0x56f976;return aws['polly'](_0x3503e8,_0x38894e,_0x146c4b,_0xc7ea7c,_0x5cb050,_0x2e3913,_0x10323d)[_0xa9b9('0x39')](function(){_0x56f976=path['resolve'](__dirname,_0xa9b9('0x29'),rs[_0xa9b9('0x2a')](0x4)+_0xa9b9('0x2b'));return convertFile(_0x10323d,_0x56f976);})[_0xa9b9('0x39')](function(){try{fs[_0xa9b9('0x1e')](_0x10323d);fs[_0xa9b9('0x2d')](_0x56f976,_0xa9b9('0x2e'));}catch(_0x2f338f){logger['error'](_0x2f338f);}return _0x56f976['split']('.')[0x0];});};exports['awsLex']=function(_0x5ce61d,_0x48bcd4,_0x21240b,_0x16f0b0,_0x4df11f,_0x1160aa){return aws[_0xa9b9('0x74')](_0x5ce61d,_0x48bcd4,_0x21240b,_0x16f0b0,_0x4df11f,_0x1160aa)['then'](function(_0x2a5edf){logger['info'](JSON[_0xa9b9('0x42')](_0x2a5edf));return _0x2a5edf;});};exports[_0xa9b9('0x75')]=function(_0x274df3,_0x207f9c,_0x2496cf,_0x16333c){var _0xdc52d9=util[_0xa9b9('0x76')]('%s?apikey=%s&action=convert&text=%s&voice=%s&speed=%s&format=mp3',ISPEECH_API,_0x274df3,encodeURIComponent(_0x207f9c),_0x2496cf,_0x16333c);var _0x351e3f=path[_0xa9b9('0x28')](__dirname,_0xa9b9('0x29'),rs[_0xa9b9('0x2a')](0x4)+_0xa9b9('0x3a'));var _0x1f90a4;return downloadFile(_0xdc52d9,_0x351e3f)[_0xa9b9('0x39')](function(){_0x1f90a4=path[_0xa9b9('0x28')](__dirname,_0xa9b9('0x29'),rs[_0xa9b9('0x2a')](0x4)+_0xa9b9('0x2b'));return convertFile(_0x351e3f,_0x1f90a4);})['then'](function(){try{fs[_0xa9b9('0x1e')](_0x351e3f);fs['chmodSync'](_0x1f90a4,'777');}catch(_0x14ae22){logger[_0xa9b9('0x16')](_0x14ae22);}return _0x1f90a4[_0xa9b9('0x2f')]('.')[0x0];});};exports[_0xa9b9('0x77')]=function(_0x178112,_0x1b8a01,_0x2d4bf6,_0x9f614b){var _0x4aecc8=util[_0xa9b9('0x76')](_0xa9b9('0x78'),ISPEECH_API,_0x1b8a01,_0x2d4bf6,base64Encode(_0x178112),_0x9f614b?util[_0xa9b9('0x76')](_0xa9b9('0x79'),encodeURIComponent(_0x9f614b)):'freeform=3');return uploadFile(_0x4aecc8)['then'](function(_0x289d14){return querystring[_0xa9b9('0x9')](_0x289d14);});};exports[_0xa9b9('0x7a')]=function(_0x285d37,_0x57c29b){return sestek['nda'](_0x285d37,_0x57c29b)[_0xa9b9('0x39')](function(_0x1a2c91){logger['info'](JSON[_0xa9b9('0x42')](_0x1a2c91));var _0x5b6acd={'speech':_0x1a2c91[_0xa9b9('0x7b')],'action':_0x1a2c91[_0xa9b9('0x7c')]?_0x1a2c91['channelData'][_0xa9b9('0x7d')]:undefined,'actiondata':_0x1a2c91[_0xa9b9('0x7c')]?_0x1a2c91['channelData'][_0xa9b9('0x7e')]:undefined};if(_0x1a2c91['channelData']&&_0x1a2c91['channelData'][_0xa9b9('0x7f')]){return base64Decode(_0x1a2c91[_0xa9b9('0x7c')][_0xa9b9('0x7f')][_0xa9b9('0x80')],path['resolve'](__dirname,'tmp',rs[_0xa9b9('0x2a')](0x4)+_0xa9b9('0x2b')))[_0xa9b9('0x39')](function(_0x3e4bbf){_0x5b6acd[_0xa9b9('0x81')]=_0x3e4bbf;return _0x5b6acd;});}return _0x5b6acd;});};exports[_0xa9b9('0x82')]=function(){return __dirname;};
\ No newline at end of file
+var _0xe873=['fields','end_conversation','boolValue','fulfillmentText','intent','displayName','isFallback','languageCode','queryText','responseId','intentDetectionConfidence','tildeASR','Tilde\x20ASR\x20transcription','Tilde\x20ASR\x20confidence','polly','lex','ispeechTTS','%s?apikey=%s&action=recognize&locale=%s&content-type=audio/x-wav&audio=%s&%s','format','freeform=3','sestekNDA','channelData','CustomActionData','AudioFromTts','dirName','apiai-promise','dialogflow','http','https','md5','path','querystring','request-promise','randomstring','sox','google-tts-api','url','parse','util','./google','./sestek','./tilde','https://api.ispeech.org/api/rest','protocol','https:','host','WHAT_EVER','get','statusCode','error','request\x20to\x20','\x20failed,\x20status\x20code\x20=\x20','statusMessage','createWriteStream','finish','info','finish\x20download\x20file','close','unlink','download\x20error','pipe','end','transcode','wav','error\x20convert','finish\x20to\x20convert','resolve','tmp','generate','.wav','writeFileSync','base64','then','chmodSync','777','readFileSync','toString','https://texttospeech.googleapis.com/v1/','?key=','ssml','input','voice','audioConfig','text:synthesize','POST','from','audioContent','writeFile','googleCloudTTS\x20path','split','https://translate.google.com/_/TranslateWebserverUi/data/batchexecute','utf8','application/x-www-form-urlencoded','f.req=','stringify','jQ1olc','generic','slice','data','text\x20length\x20limit\x20reached','lang\x20\x22','\x22\x20might\x20not\x20exist','parse\x20response\x20failed:\x0a','.mp3','asr','uri','results','map','alternatives','transcript','join','confidence','googleASR\x20confidence','catch','name','message','googleDialogflow','textRequest','source','result','resolvedQuery','action','actionIncomplete','fulfillment','speech','score','metadata','isFallbackIntent','googleDialogflowV2','replace','SessionsClient','sessionPath','detectIntent','length','queryResult','diagnosticInfo'];(function(_0x46b501,_0x50b017){var _0x26a68d=function(_0x3fc948){while(--_0x3fc948){_0x46b501['push'](_0x46b501['shift']());}};_0x26a68d(++_0x50b017);}(_0xe873,0x1b1));var _0x3e87=function(_0x4c0685,_0x4657b5){_0x4c0685=_0x4c0685-0x0;var _0x1d73ab=_0xe873[_0x4c0685];return _0x1d73ab;};'use strict';var apiai=require(_0x3e87('0x0'));var BPromise=require('bluebird');var dialogflow=require(_0x3e87('0x1'));var fs=require('fs');var http=require(_0x3e87('0x2'));var https=require(_0x3e87('0x3'));var md5=require(_0x3e87('0x4'));var path=require(_0x3e87('0x5'));var querystring=require(_0x3e87('0x6'));var rp=require(_0x3e87('0x7'));var rs=require(_0x3e87('0x8'));var sox=require(_0x3e87('0x9'));var tts=require(_0x3e87('0xa'));var urlParse=require(_0x3e87('0xb'))[_0x3e87('0xc')];var util=require(_0x3e87('0xd'));var aws=require('./aws');var google=require(_0x3e87('0xe'));var sestek=require(_0x3e87('0xf'));var tilde=require(_0x3e87('0x10'));var logger=require('../../../config/logger')('agi');var ISPEECH_API=_0x3e87('0x11');function downloadFile(_0x2a7350,_0x2c45eb){return new BPromise(function(_0x706725,_0x4fd0d1){var _0x423eb3=urlParse(_0x2a7350);var _0x5b2f86=_0x423eb3[_0x3e87('0x12')]===_0x3e87('0x13')?https:http;var _0x11b411={'host':_0x423eb3[_0x3e87('0x14')],'path':_0x423eb3[_0x3e87('0x5')],'headers':{'user-agent':_0x3e87('0x15')}};_0x5b2f86[_0x3e87('0x16')](_0x11b411,function(_0x3ea3bd){if(_0x3ea3bd[_0x3e87('0x17')]!==0xc8){logger[_0x3e87('0x18')](_0x3e87('0x19')+_0x2a7350+_0x3e87('0x1a')+_0x3ea3bd[_0x3e87('0x17')]+'\x20('+_0x3ea3bd[_0x3e87('0x1b')]+')');_0x4fd0d1(new Error(_0x3e87('0x19')+_0x2a7350+_0x3e87('0x1a')+_0x3ea3bd[_0x3e87('0x17')]+'\x20('+_0x3ea3bd[_0x3e87('0x1b')]+')'));return;}var _0x497021=fs[_0x3e87('0x1c')](_0x2c45eb);_0x497021['on'](_0x3e87('0x1d'),function(){logger[_0x3e87('0x1e')](_0x3e87('0x1f'));_0x497021[_0x3e87('0x20')](_0x706725);});_0x497021['on'](_0x3e87('0x18'),function(_0x2f043f){fs[_0x3e87('0x21')](_0x2c45eb);logger[_0x3e87('0x18')](_0x3e87('0x22'),_0x2f043f);_0x4fd0d1(_0x2f043f);});_0x3ea3bd[_0x3e87('0x23')](_0x497021);})['on'](_0x3e87('0x18'),function(_0x22ade2){logger[_0x3e87('0x18')](_0x22ade2);_0x4fd0d1(_0x22ade2);})[_0x3e87('0x24')]();});}function uploadFile(_0x5dbf69){return new BPromise(function(_0x3f892a,_0xdcb44c){var _0x117953=urlParse(_0x5dbf69);var _0x273b60=_0x117953[_0x3e87('0x12')]==='https:'?https:http;var _0x2ee0db={'host':_0x117953[_0x3e87('0x14')],'path':_0x117953[_0x3e87('0x5')],'headers':{'user-agent':'WHAT_EVER'}};_0x273b60[_0x3e87('0x16')](_0x2ee0db,function(_0x4feee3){if(_0x4feee3[_0x3e87('0x17')]!==0xc8){_0xdcb44c(new Error('request\x20to\x20'+_0x5dbf69+_0x3e87('0x1a')+_0x4feee3[_0x3e87('0x17')]+'\x20('+_0x4feee3['statusMessage']+')'));return;}var _0x173629='';_0x4feee3['on']('data',function(_0x535200){_0x173629+=_0x535200;});_0x4feee3['on'](_0x3e87('0x24'),function(){_0x3f892a(_0x173629);});})['on'](_0x3e87('0x18'),function(_0x26bc98){_0xdcb44c(_0x26bc98);})['end']();});}function convertFile(_0x1d8fb3,_0x17b5a5){return new BPromise(function(_0x3a5709,_0x4191f2){var _0x44142c=sox[_0x3e87('0x25')](_0x1d8fb3,_0x17b5a5,{'sampleRate':0x1f40,'format':_0x3e87('0x26'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x44142c['on']('error',function(_0xe36954){logger[_0x3e87('0x18')](_0x3e87('0x27'),_0xe36954);_0x4191f2(_0xe36954);});_0x44142c['on']('end',function(){logger[_0x3e87('0x1e')](_0x3e87('0x28'));_0x3a5709();});_0x44142c['start']();});}function base64Decode(_0x36c11e,_0x3133e5){var _0x52012d=path[_0x3e87('0x29')](__dirname,_0x3e87('0x2a'),rs[_0x3e87('0x2b')](0x4)+_0x3e87('0x2c'));fs[_0x3e87('0x2d')](_0x52012d,_0x36c11e,_0x3e87('0x2e'));return convertFile(_0x52012d,_0x3133e5)[_0x3e87('0x2f')](function(){try{fs['unlink'](_0x52012d);fs[_0x3e87('0x30')](_0x3133e5,_0x3e87('0x31'));}catch(_0x17d612){logger[_0x3e87('0x18')](_0x17d612);}return _0x3133e5['split']('.')[0x0];});}function base64Encode(_0x428d49){var _0x845737=fs[_0x3e87('0x32')](_0x428d49);return new Buffer(_0x845737)[_0x3e87('0x33')](_0x3e87('0x2e'));}exports['googleCloudTTS']=function(_0x554343,_0x1e4aa2,_0x1ba8c0,_0x2b6722,_0x3a4f37,_0x151473){var _0xd40be6,_0x3d6ab4;var _0x55ba91=_0x3e87('0x34');var _0x196be2=_0x3e87('0x35')+_0x554343;var _0x35179e={};if(_0x1e4aa2===_0x3e87('0x36')){_0x35179e[_0x3e87('0x37')]={'ssml':_0x1ba8c0};}else{_0x35179e['input']={'text':_0x1ba8c0};};_0x35179e[_0x3e87('0x38')]={'languageCode':_0x2b6722,'ssmlGender':_0x3a4f37};_0x35179e[_0x3e87('0x39')]={'audioEncoding':'MP3','sampleRateHertz':0x1f40};var _0x5578fb={'url':_0x55ba91+_0x3e87('0x3a')+_0x196be2,'method':_0x3e87('0x3b'),'json':!![],'body':_0x35179e};return rp(_0x5578fb)[_0x3e87('0x2f')](function(_0x2a50b1){return new BPromise(function(_0x55102e,_0x3188aa){_0xd40be6=path[_0x3e87('0x29')](__dirname,_0x3e87('0x2a'),rs[_0x3e87('0x2b')](0x4)+'.mp3');var _0x388963=Buffer[_0x3e87('0x3c')](_0x2a50b1[_0x3e87('0x3d')],_0x3e87('0x2e'));return fs[_0x3e87('0x3e')](_0xd40be6,_0x388963,function(_0x237404){_0x3188aa(_0x237404);},function(_0x579aba){fs[_0x3e87('0x30')](_0xd40be6,_0x3e87('0x31'));_0x55102e(_0x579aba);});});})[_0x3e87('0x2f')](function(_0x6c4711){_0x3d6ab4=path[_0x3e87('0x29')](__dirname,_0x3e87('0x2a'),rs['generate'](0x4)+_0x3e87('0x2c'));return convertFile(_0xd40be6,_0x3d6ab4);})[_0x3e87('0x2f')](function(){try{fs[_0x3e87('0x21')](_0xd40be6);fs[_0x3e87('0x30')](_0x3d6ab4,_0x3e87('0x31'));}catch(_0x34d5ab){logger[_0x3e87('0x18')](_0x34d5ab);}logger['info'](_0x3e87('0x3f'),_0x3d6ab4[_0x3e87('0x40')]('.')[0x0]);return _0x3d6ab4[_0x3e87('0x40')]('.')[0x0];});};exports['googleTTS']=function(_0x5442d,_0x268aa5){var _0x2ca4fa=_0x3e87('0x41');var _0x58e13f,_0x21c4d1;var _0x30b34e;var _0x29f192={'encoding':_0x3e87('0x42'),'method':_0x3e87('0x3b'),'timeout':0x2710,'url':_0x2ca4fa,'headers':{'Content-Type':_0x3e87('0x43')},'body':_0x3e87('0x44')+encodeURIComponent(JSON[_0x3e87('0x45')]([[[_0x3e87('0x46'),JSON[_0x3e87('0x45')]([_0x5442d,_0x268aa5||'en',![],'null']),null,_0x3e87('0x47')]]]))};return rp(_0x29f192)[_0x3e87('0x2f')](function(_0x4660f7){try{_0x30b34e=eval(_0x4660f7[_0x3e87('0x48')](0x5))[0x0][0x2];}catch(_0x5b0d9e){throw new Error('parse\x20response\x20failed:\x0a'+_0x4660f7[_0x3e87('0x49')]);}if(!_0x30b34e){if(_0x5442d['length']>0xc8){throw new Error(_0x3e87('0x4a'));}else{throw new Error(_0x3e87('0x4b')+_0x268aa5+_0x3e87('0x4c'));}}try{_0x30b34e=eval(_0x30b34e)[0x0];}catch(_0x2b70b0){throw new Error(_0x3e87('0x4d')+res[_0x3e87('0x49')]);}const _0x2c704e=_0x30b34e;_0x58e13f=path['resolve'](__dirname,_0x3e87('0x2a'),rs[_0x3e87('0x2b')](0x4)+_0x3e87('0x4e'));fs[_0x3e87('0x2d')](_0x58e13f,_0x30b34e,{'encoding':_0x3e87('0x2e')});_0x21c4d1=path[_0x3e87('0x29')](__dirname,_0x3e87('0x2a'),rs['generate'](0x4)+_0x3e87('0x2c'));return convertFile(_0x58e13f,_0x21c4d1);})[_0x3e87('0x2f')](function(){try{fs[_0x3e87('0x21')](_0x58e13f);fs[_0x3e87('0x30')](_0x21c4d1,'777');}catch(_0x4131d7){logger[_0x3e87('0x18')](_0x4131d7);}logger[_0x3e87('0x1e')]('goggleTTS\x20path',_0x21c4d1[_0x3e87('0x40')]('.')[0x0]);return _0x21c4d1['split']('.')[0x0];});};exports['googleASR']=function(_0x221aa0,_0x2e039b,_0x32427a){return google[_0x3e87('0x4f')](_0x221aa0,_0x2e039b,_0x32427a)[_0x3e87('0x2f')](function(_0x2e6d8b){logger['info'](_0x2e6d8b[_0x3e87('0x50')]);return rp(_0x2e6d8b);})['then'](function(_0x1c2d56){var _0x90a4c0='';var _0x422c05=0x0;try{fs[_0x3e87('0x21')](_0x221aa0);}catch(_0x4c528c){logger[_0x3e87('0x18')](_0x4c528c);}if(_0x1c2d56&&_0x1c2d56[_0x3e87('0x51')]){_0x90a4c0=_0x1c2d56['results'][_0x3e87('0x52')](function(_0x4447d3){return _0x4447d3&&_0x4447d3[_0x3e87('0x53')][0x0]&&_0x4447d3[_0x3e87('0x53')][0x0]['transcript']?_0x4447d3[_0x3e87('0x53')][0x0][_0x3e87('0x54')]:'';})[_0x3e87('0x55')]('\x0a');_0x422c05=_0x1c2d56[_0x3e87('0x51')][_0x3e87('0x52')](function(_0x47c922){return _0x47c922&&_0x47c922[_0x3e87('0x53')][0x0]&&_0x47c922[_0x3e87('0x53')][0x0][_0x3e87('0x56')]?_0x47c922[_0x3e87('0x53')][0x0][_0x3e87('0x56')]:0x0;})[_0x3e87('0x55')]('\x0a');}logger[_0x3e87('0x1e')]('googleASR\x20transcription',_0x90a4c0);logger[_0x3e87('0x1e')](_0x3e87('0x57'),_0x422c05);return{'transcript':_0x90a4c0,'confidence':_0x422c05};})[_0x3e87('0x58')](function(_0x42474e){logger[_0x3e87('0x18')]('[%s]\x20%s:%s',_0x42474e[_0x3e87('0x17')],_0x42474e[_0x3e87('0x59')],_0x42474e[_0x3e87('0x5a')]);});};exports[_0x3e87('0x5b')]=function(_0x1af149,_0x2afb63,_0x37ee5c,_0x301465){var _0x727969=apiai(_0x2afb63,{'language':_0x301465||'en'});return _0x727969[_0x3e87('0x5c')](_0x37ee5c,{'sessionId':md5(_0x1af149)})['then'](function(_0x2233d4){logger[_0x3e87('0x1e')](JSON['stringify'](_0x2233d4));return{'source':_0x2233d4['result'][_0x3e87('0x5d')],'resolvedQuery':_0x2233d4[_0x3e87('0x5e')][_0x3e87('0x5f')],'action':_0x2233d4[_0x3e87('0x5e')][_0x3e87('0x60')],'actionIncomplete':_0x2233d4[_0x3e87('0x5e')][_0x3e87('0x61')],'speech':_0x2233d4[_0x3e87('0x5e')][_0x3e87('0x62')][_0x3e87('0x63')],'score':_0x2233d4[_0x3e87('0x5e')][_0x3e87('0x64')],'statusCode':_0x2233d4['status']['code'],'endConversation':_0x2233d4[_0x3e87('0x5e')]['metadata']['endConversation']||![],'isFallbackIntent':_0x2233d4[_0x3e87('0x5e')][_0x3e87('0x65')][_0x3e87('0x66')]};});};exports[_0x3e87('0x67')]=function(_0x5495c0,_0x4954dd,_0x692057,_0x3ab390,_0x20e427,_0x5c2d2c){var _0x176b84=_0x3ab390[_0x3e87('0x68')](/\\n/g,'\x0a');var _0x8b940e={'credentials':{'private_key':_0x176b84,'client_email':_0x692057}};var _0x1ab8f3=new dialogflow[(_0x3e87('0x69'))](_0x8b940e);var _0x322be1=_0x1ab8f3[_0x3e87('0x6a')](_0x4954dd,md5(_0x5495c0));var _0x1fd117={'session':_0x322be1,'queryInput':{'text':{'text':_0x20e427,'languageCode':_0x5c2d2c}}};return _0x1ab8f3[_0x3e87('0x6b')](_0x1fd117)['then'](function(_0x361cc7){if(_0x361cc7&&_0x361cc7[_0x3e87('0x6c')]){logger[_0x3e87('0x1e')]('Dialogflow\x20V2\x20response:',JSON['stringify'](_0x361cc7));var _0x210e3b=_0x361cc7[0x0];if(_0x210e3b){var _0x11b6ab={'action':_0x210e3b['queryResult']['action'],'allRequiredParamsPresent':_0x210e3b['queryResult']['allRequiredParamsPresent'],'endConversation':_0x210e3b[_0x3e87('0x6d')]['diagnosticInfo']&&_0x210e3b[_0x3e87('0x6d')][_0x3e87('0x6e')][_0x3e87('0x6f')]?_0x210e3b[_0x3e87('0x6d')][_0x3e87('0x6e')][_0x3e87('0x6f')][_0x3e87('0x70')][_0x3e87('0x71')]:![],'fulfillmentText':_0x210e3b[_0x3e87('0x6d')][_0x3e87('0x72')],'intentName':_0x210e3b[_0x3e87('0x6d')][_0x3e87('0x73')][_0x3e87('0x59')],'intentDisplayName':_0x210e3b[_0x3e87('0x6d')][_0x3e87('0x73')][_0x3e87('0x74')],'isFallbackIntent':_0x210e3b[_0x3e87('0x6d')]['intent'][_0x3e87('0x75')],'languageCode':_0x210e3b['queryResult'][_0x3e87('0x76')],'queryText':_0x210e3b[_0x3e87('0x6d')][_0x3e87('0x77')],'responseId':_0x210e3b[_0x3e87('0x78')],'score':_0x210e3b[_0x3e87('0x6d')][_0x3e87('0x79')],'speech':_0x210e3b[_0x3e87('0x6d')]['fulfillmentText'],'providerResponse':JSON[_0x3e87('0x45')](_0x361cc7)};return _0x11b6ab;}}});};exports[_0x3e87('0x7a')]=function(_0x2f588e,_0x443135,_0x33141a,_0x33bddd){return tilde[_0x3e87('0x4f')](_0x2f588e,_0x443135,_0x33141a,_0x33bddd)[_0x3e87('0x2f')](function(_0x4f9011){try{fs[_0x3e87('0x21')](_0x2f588e);}catch(_0x524d09){logger[_0x3e87('0x18')](_0x524d09);}logger[_0x3e87('0x1e')](_0x3e87('0x7b'),_0x4f9011[_0x3e87('0x54')]);logger['info'](_0x3e87('0x7c'),_0x4f9011[_0x3e87('0x56')]);return _0x4f9011;});};exports['awsPolly']=function(_0x2e47bd,_0x25e72a,_0x1d9e0d,_0x2d5dea,_0x436c36,_0x21faf3){var _0x4b75ba=path[_0x3e87('0x29')](__dirname,_0x3e87('0x2a'),rs['generate'](0x4)+_0x3e87('0x4e'));var _0x1ba8bc;return aws[_0x3e87('0x7d')](_0x2e47bd,_0x25e72a,_0x1d9e0d,_0x2d5dea,_0x436c36,_0x21faf3,_0x4b75ba)[_0x3e87('0x2f')](function(){_0x1ba8bc=path[_0x3e87('0x29')](__dirname,_0x3e87('0x2a'),rs[_0x3e87('0x2b')](0x4)+_0x3e87('0x2c'));return convertFile(_0x4b75ba,_0x1ba8bc);})['then'](function(){try{fs[_0x3e87('0x21')](_0x4b75ba);fs[_0x3e87('0x30')](_0x1ba8bc,_0x3e87('0x31'));}catch(_0x21b129){logger['error'](_0x21b129);}return _0x1ba8bc[_0x3e87('0x40')]('.')[0x0];});};exports['awsLex']=function(_0x85e94b,_0x666a1f,_0x3a029e,_0x3fe30f,_0x3a863e,_0x2b8fc5){return aws[_0x3e87('0x7e')](_0x85e94b,_0x666a1f,_0x3a029e,_0x3fe30f,_0x3a863e,_0x2b8fc5)[_0x3e87('0x2f')](function(_0x299ad7){logger[_0x3e87('0x1e')](JSON[_0x3e87('0x45')](_0x299ad7));return _0x299ad7;});};exports[_0x3e87('0x7f')]=function(_0x3d237a,_0x450cd8,_0x1368ab,_0x26767d){var _0x390ef2=util['format']('%s?apikey=%s&action=convert&text=%s&voice=%s&speed=%s&format=mp3',ISPEECH_API,_0x3d237a,encodeURIComponent(_0x450cd8),_0x1368ab,_0x26767d);var _0x2a14a3=path[_0x3e87('0x29')](__dirname,_0x3e87('0x2a'),rs['generate'](0x4)+_0x3e87('0x4e'));var _0x3f7212;return downloadFile(_0x390ef2,_0x2a14a3)[_0x3e87('0x2f')](function(){_0x3f7212=path['resolve'](__dirname,_0x3e87('0x2a'),rs[_0x3e87('0x2b')](0x4)+_0x3e87('0x2c'));return convertFile(_0x2a14a3,_0x3f7212);})['then'](function(){try{fs[_0x3e87('0x21')](_0x2a14a3);fs[_0x3e87('0x30')](_0x3f7212,_0x3e87('0x31'));}catch(_0x5396a8){logger[_0x3e87('0x18')](_0x5396a8);}return _0x3f7212['split']('.')[0x0];});};exports['ispeechASR']=function(_0x5eb363,_0x291889,_0x38ced6,_0x5701ce){var _0x42338e=util['format'](_0x3e87('0x80'),ISPEECH_API,_0x291889,_0x38ced6,base64Encode(_0x5eb363),_0x5701ce?util[_0x3e87('0x81')]('model=%s',encodeURIComponent(_0x5701ce)):_0x3e87('0x82'));return uploadFile(_0x42338e)[_0x3e87('0x2f')](function(_0x990f98){return querystring[_0x3e87('0xc')](_0x990f98);});};exports[_0x3e87('0x83')]=function(_0x380a57,_0x1d4c07){return sestek['nda'](_0x380a57,_0x1d4c07)[_0x3e87('0x2f')](function(_0x4085e0){logger[_0x3e87('0x1e')](JSON[_0x3e87('0x45')](_0x4085e0));var _0x48ba1f={'speech':_0x4085e0['text'],'action':_0x4085e0[_0x3e87('0x84')]?_0x4085e0[_0x3e87('0x84')]['CustomAction']:undefined,'actiondata':_0x4085e0['channelData']?_0x4085e0[_0x3e87('0x84')][_0x3e87('0x85')]:undefined};if(_0x4085e0[_0x3e87('0x84')]&&_0x4085e0[_0x3e87('0x84')][_0x3e87('0x86')]){return base64Decode(_0x4085e0[_0x3e87('0x84')][_0x3e87('0x86')]['Data'],path[_0x3e87('0x29')](__dirname,_0x3e87('0x2a'),rs[_0x3e87('0x2b')](0x4)+'.wav'))[_0x3e87('0x2f')](function(_0x13861f){_0x48ba1f['audiofile']=_0x13861f;return _0x48ba1f;});}return _0x48ba1f;});};exports[_0x3e87('0x87')]=function(){return __dirname;};
\ No newline at end of file
index 9955e87..946b32d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4a98=['./nda'];(function(_0x4d613c,_0x55f220){var _0x301fe3=function(_0x5eec0b){while(--_0x5eec0b){_0x4d613c['push'](_0x4d613c['shift']());}};_0x301fe3(++_0x55f220);}(_0x4a98,0x112));var _0x84a9=function(_0x24875d,_0x4fb24d){_0x24875d=_0x24875d-0x0;var _0x181471=_0x4a98[_0x24875d];return _0x181471;};var nda=require(_0x84a9('0x0'));module['exports']={'nda':nda};
\ No newline at end of file
+var _0x76bd=['./nda','exports'];(function(_0x618414,_0x1a7a60){var _0x21c19a=function(_0x507b17){while(--_0x507b17){_0x618414['push'](_0x618414['shift']());}};_0x21c19a(++_0x1a7a60);}(_0x76bd,0x102));var _0xd76b=function(_0x131f42,_0x102c01){_0x131f42=_0x131f42-0x0;var _0x3a72ba=_0x76bd[_0x131f42];return _0x3a72ba;};var nda=require(_0xd76b('0x0'));module[_0xd76b('0x1')]={'nda':nda};
\ No newline at end of file
index 6058724..e6823db 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb264=['extension','text','Bearer\x20','access_token','project','channelData','ProjectName','body','AudioOutputSettings','audio/wav','custom_action','CustomAction','custom_action_data','CustomActionData','info','stringify','request-promise','url','agi','POST','resolve','ndauth_url','/token','password','then','/api/NaturalDialogAssistant/v1/Run','ndaactivity_type','message','Nda','uniqueid','calleridname'];(function(_0x3dc278,_0x19f377){var _0x434a99=function(_0x396364){while(--_0x396364){_0x3dc278['push'](_0x3dc278['shift']());}};_0x434a99(++_0x19f377);}(_0xb264,0x108));var _0x4b26=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xb264[_0x3dd15e];return _0x231fd0;};'use strict';var rp=require(_0x4b26('0x0'));var url=require(_0x4b26('0x1'));var logger=require('../../../../../config/logger')(_0x4b26('0x2'));module['exports']=function(_0x4f2b32,_0xa2bcef){var _0x44691e={'method':_0x4b26('0x3'),'uri':url[_0x4b26('0x4')](_0xa2bcef[_0x4b26('0x5')],_0x4b26('0x6')),'form':{'grant_type':_0x4b26('0x7'),'username':_0xa2bcef['username'],'password':_0xa2bcef[_0x4b26('0x7')]},'json':!![]};return rp(_0x44691e)[_0x4b26('0x8')](function(_0x5a8c67){var _0x1edb7c={'method':_0x4b26('0x3'),'uri':url[_0x4b26('0x4')](_0xa2bcef['ndassistant_url'],_0x4b26('0x9')),'body':{'type':_0xa2bcef[_0x4b26('0xa')]||_0x4b26('0xb'),'channelId':_0x4b26('0xc'),'conversation':{'id':_0x4f2b32[_0x4b26('0xd')]},'from':{'id':_0x4f2b32['callerid'],'name':_0x4f2b32[_0x4b26('0xe')]},'recipient':{'id':_0x4f2b32['dnid'],'name':_0x4f2b32[_0x4b26('0xf')]},'text':_0xa2bcef[_0x4b26('0x10')],'channelData':{}},'headers':{'Authorization':_0x4b26('0x11')+_0x5a8c67[_0x4b26('0x12')]},'json':!![]};if(_0xa2bcef[_0x4b26('0x13')]){_0x1edb7c['body'][_0x4b26('0x14')][_0x4b26('0x15')]=_0xa2bcef['project'];}if(_0xa2bcef['ndagenerate_audio']=='1'){_0x1edb7c[_0x4b26('0x16')]['channelData'][_0x4b26('0x17')]={'Generate':!![],'PutInStructuredPart':![],'ExpectedFormat':_0x4b26('0x18')};}if(_0xa2bcef[_0x4b26('0x19')]){_0x1edb7c['body'][_0x4b26('0x14')][_0x4b26('0x1a')]=_0xa2bcef[_0x4b26('0x19')];if(_0xa2bcef[_0x4b26('0x1b')]){_0x1edb7c[_0x4b26('0x16')][_0x4b26('0x14')][_0x4b26('0x1c')]=_0xa2bcef[_0x4b26('0x1b')];}}logger[_0x4b26('0x1d')](JSON[_0x4b26('0x1e')](_0x1edb7c));return rp(_0x1edb7c);});};
\ No newline at end of file
+var _0xb945=['Bearer\x20','access_token','project','body','channelData','ndagenerate_audio','audio/wav','custom_action','custom_action_data','CustomActionData','stringify','request-promise','../../../../../config/logger','exports','POST','resolve','ndauth_url','/token','password','then','/api/NaturalDialogAssistant/v1/Run','ndaactivity_type','message','Nda','uniqueid','callerid','calleridname','extension'];(function(_0x595c73,_0x3a5e9c){var _0x561590=function(_0x5443f3){while(--_0x5443f3){_0x595c73['push'](_0x595c73['shift']());}};_0x561590(++_0x3a5e9c);}(_0xb945,0x97));var _0x5b94=function(_0x438dcd,_0x4894ef){_0x438dcd=_0x438dcd-0x0;var _0x1446ab=_0xb945[_0x438dcd];return _0x1446ab;};'use strict';var rp=require(_0x5b94('0x0'));var url=require('url');var logger=require(_0x5b94('0x1'))('agi');module[_0x5b94('0x2')]=function(_0x4cc83f,_0x488e8d){var _0x43c9d3={'method':_0x5b94('0x3'),'uri':url[_0x5b94('0x4')](_0x488e8d[_0x5b94('0x5')],_0x5b94('0x6')),'form':{'grant_type':'password','username':_0x488e8d['username'],'password':_0x488e8d[_0x5b94('0x7')]},'json':!![]};return rp(_0x43c9d3)[_0x5b94('0x8')](function(_0x42bd69){var _0x186d22={'method':'POST','uri':url[_0x5b94('0x4')](_0x488e8d['ndassistant_url'],_0x5b94('0x9')),'body':{'type':_0x488e8d[_0x5b94('0xa')]||_0x5b94('0xb'),'channelId':_0x5b94('0xc'),'conversation':{'id':_0x4cc83f[_0x5b94('0xd')]},'from':{'id':_0x4cc83f[_0x5b94('0xe')],'name':_0x4cc83f[_0x5b94('0xf')]},'recipient':{'id':_0x4cc83f['dnid'],'name':_0x4cc83f[_0x5b94('0x10')]},'text':_0x488e8d['text'],'channelData':{}},'headers':{'Authorization':_0x5b94('0x11')+_0x42bd69[_0x5b94('0x12')]},'json':!![]};if(_0x488e8d[_0x5b94('0x13')]){_0x186d22[_0x5b94('0x14')][_0x5b94('0x15')]['ProjectName']=_0x488e8d[_0x5b94('0x13')];}if(_0x488e8d[_0x5b94('0x16')]=='1'){_0x186d22[_0x5b94('0x14')][_0x5b94('0x15')]['AudioOutputSettings']={'Generate':!![],'PutInStructuredPart':![],'ExpectedFormat':_0x5b94('0x17')};}if(_0x488e8d['custom_action']){_0x186d22[_0x5b94('0x14')][_0x5b94('0x15')]['CustomAction']=_0x488e8d[_0x5b94('0x18')];if(_0x488e8d[_0x5b94('0x19')]){_0x186d22[_0x5b94('0x14')]['channelData'][_0x5b94('0x1a')]=_0x488e8d[_0x5b94('0x19')];}}logger['info'](JSON[_0x5b94('0x1b')](_0x186d22));return rp(_0x186d22);});};
\ No newline at end of file
index b5aa37e..f10fcd0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3240=['./lib/api','exports'];(function(_0x541260,_0x4c7f2e){var _0x1dd2b5=function(_0x4140de){while(--_0x4140de){_0x541260['push'](_0x541260['shift']());}};_0x1dd2b5(++_0x4c7f2e);}(_0x3240,0x1ca));var _0x0324=function(_0x1df3a2,_0x1380cd){_0x1df3a2=_0x1df3a2-0x0;var _0x47b625=_0x3240[_0x1df3a2];return _0x47b625;};'use strict';var asr=require(_0x0324('0x0'));module[_0x0324('0x1')]=function(_0x57ea7c,_0x271504,_0x3fa249,_0x321ae6){return asr(_0x57ea7c,_0x271504,_0x3fa249,_0x321ae6);};
\ No newline at end of file
+var _0xfe89=['exports'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xfe89,0x12b));var _0x9fe8=function(_0x29959e,_0x1f6bcb){_0x29959e=_0x29959e-0x0;var _0x3aa706=_0xfe89[_0x29959e];return _0x3aa706;};'use strict';var asr=require('./lib/api');module[_0x9fe8('0x0')]=function(_0x43a969,_0x26e8cb,_0x18e7ab,_0x59dcec){return asr(_0x43a969,_0x26e8cb,_0x18e7ab,_0x59dcec);};
\ No newline at end of file
index f63034e..c5910c9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1c3f=['hypotheses','likelihood','Success.','Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.','Authentication\x20failed.','All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.','Tilde\x20ASR\x20parse\x20error','Close\x20Tilde\x20ASR\x20socket','isNil','open','message','close','bluebird','lodash','moment','crypto','../../../../../../config/logger','agi','exports','info','Tilde\x20URI','No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech','createHash','update','digest','hex','Open\x20Tilde\x20ASR\x20socket','unix','send','stringify','createReadStream','EOS','error','Tilde\x20ASR\x20send\x20error','terminate','parse','result','final'];(function(_0x151334,_0x1e11ac){var _0x3d03da=function(_0x2099cf){while(--_0x2099cf){_0x151334['push'](_0x151334['shift']());}};_0x3d03da(++_0x1e11ac);}(_0x1c3f,0x7e));var _0xf1c3=function(_0xb62d3,_0x5a007a){_0xb62d3=_0xb62d3-0x0;var _0x1c5d67=_0x1c3f[_0xb62d3];return _0x1c5d67;};'use strict';var BPromise=require(_0xf1c3('0x0'));var _=require(_0xf1c3('0x1'));var fs=require('fs');var WebSocket=require('ws');var moment=require(_0xf1c3('0x2'));var crypto=require(_0xf1c3('0x3'));var logger=require(_0xf1c3('0x4'))(_0xf1c3('0x5'));module[_0xf1c3('0x6')]=function(_0x361af6,_0x543bc9,_0x46db27,_0x5d8fe3){return new BPromise(function(_0x4f67e2,_0x5044bf){logger[_0xf1c3('0x7')](_0xf1c3('0x8'),_0x5d8fe3||'wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE');var _0x31e83d=new WebSocket(_0x5d8fe3||'wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE',{'perMessageDeflate':![]});var _0x35c607='';var _0x7c1d25='0';var _0xbc0382='1';var _0x3c02fc=_0xf1c3('0x9');function _0x94264e(_0x262952){var _0x2e6c55=crypto[_0xf1c3('0xa')]('sha1');_0x2e6c55[_0xf1c3('0xb')](_0x262952);return _0x2e6c55[_0xf1c3('0xc')](_0xf1c3('0xd'));}function _0x2f5d2c(){try{logger[_0xf1c3('0x7')](_0xf1c3('0xe'));var _0x5b117a=moment()[_0xf1c3('0xf')]();var _0x1e0c7e=_0x94264e(_0x5b117a+_0x543bc9+_0x46db27);_0x31e83d[_0xf1c3('0x10')](JSON[_0xf1c3('0x11')]({'appID':_0x543bc9,'timestamp':_0x5b117a,'appKey':_0x1e0c7e}));var _0x324b97=fs[_0xf1c3('0x12')](_0x361af6);_0x324b97['on']('data',function(_0x427302){_0x31e83d[_0xf1c3('0x10')](_0x427302);});_0x324b97['on']('close',function(){_0x31e83d['send'](_0xf1c3('0x13'));});}catch(_0x318a09){logger[_0xf1c3('0x14')](_0xf1c3('0x15'),JSON[_0xf1c3('0x11')](_0x318a09));_0x31e83d[_0xf1c3('0x16')]();}}function _0x20501c(_0x2493bc){try{if(_0x2493bc){var _0x1a7b2f=JSON[_0xf1c3('0x17')](_0x2493bc);switch(_0x1a7b2f['status']){case 0x0:if(_0x1a7b2f[_0xf1c3('0x18')]){if(_0x1a7b2f[_0xf1c3('0x18')][_0xf1c3('0x19')]){logger[_0xf1c3('0x7')]('Tilde\x20ASR\x20hypoteses',JSON[_0xf1c3('0x11')](_0x1a7b2f[_0xf1c3('0x18')][_0xf1c3('0x1a')]));_0x35c607=_0x1a7b2f[_0xf1c3('0x18')]['hypotheses'][0x0]['transcript'];_0x7c1d25=_0x1a7b2f[_0xf1c3('0x18')][_0xf1c3('0x1a')][0x0][_0xf1c3('0x1b')];_0xbc0382='0';_0x3c02fc=_0xf1c3('0x1c');_0x31e83d[_0xf1c3('0x16')]();}}break;case 0x1:logger[_0xf1c3('0x7')](_0xf1c3('0x9'));_0xbc0382='1';_0x3c02fc=_0xf1c3('0x9');break;case 0x2:logger[_0xf1c3('0x7')]('Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.');_0xbc0382='2';_0x3c02fc=_0xf1c3('0x1d');break;case 0x9:logger[_0xf1c3('0x7')]('Not\x20available.\x20Max\x20load\x20limit\x20reached.');_0xbc0382='9';_0x3c02fc='Not\x20available.\x20Max\x20load\x20limit\x20reached.';break;case 0xa:logger[_0xf1c3('0x7')](_0xf1c3('0x1e'));_0xbc0382='10';_0x3c02fc='Authentication\x20failed.';break;case 0xb:logger[_0xf1c3('0x7')](_0xf1c3('0x1f'));_0xbc0382='11';_0x3c02fc=_0xf1c3('0x1f');}}}catch(_0x499fd8){logger[_0xf1c3('0x14')](_0xf1c3('0x20'),JSON[_0xf1c3('0x11')](_0x499fd8));_0x31e83d[_0xf1c3('0x16')]();}}function _0x2cd687(){logger[_0xf1c3('0x7')](_0xf1c3('0x21'));_0x4f67e2({'transcript':_0x35c607,'confidence':_0x7c1d25,'status':_0xbc0382,'status_message':_0x3c02fc});}function _0x34d32d(_0x18bf67){logger['error']('Error\x20Tilde\x20ASR\x20socket');if(!_[_0xf1c3('0x22')](_0x18bf67)){logger['error'](_['isObject'](_0x18bf67)?JSON['stringify'](_0x18bf67):_0x18bf67);}}_0x31e83d['on'](_0xf1c3('0x23'),_0x2f5d2c);_0x31e83d['on'](_0xf1c3('0x24'),_0x20501c);_0x31e83d['on'](_0xf1c3('0x25'),_0x2cd687);_0x31e83d['on'](_0xf1c3('0x14'),_0x34d32d);});};
\ No newline at end of file
+var _0x1eaf=['update','digest','unix','send','stringify','createReadStream','data','EOS','terminate','status','final','Tilde\x20ASR\x20hypoteses','result','hypotheses','transcript','likelihood','Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.','Not\x20available.\x20Max\x20load\x20limit\x20reached.','All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.','error','Tilde\x20ASR\x20parse\x20error','Close\x20Tilde\x20ASR\x20socket','Error\x20Tilde\x20ASR\x20socket','isNil','isObject','open','close','crypto','../../../../../../config/logger','info','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(_0x5d99c6,_0x2447af){var _0x2d2c9a=function(_0x2130f9){while(--_0x2130f9){_0x5d99c6['push'](_0x5d99c6['shift']());}};_0x2d2c9a(++_0x2447af);}(_0x1eaf,0x1c8));var _0xf1ea=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x1eaf[_0x501510];return _0x1e6ee5;};'use strict';var BPromise=require('bluebird');var _=require('lodash');var fs=require('fs');var WebSocket=require('ws');var moment=require('moment');var crypto=require(_0xf1ea('0x0'));var logger=require(_0xf1ea('0x1'))('agi');module['exports']=function(_0x2cb895,_0x40b936,_0x436017,_0x51ad9b){return new BPromise(function(_0x1d4b86,_0x4f9a73){logger[_0xf1ea('0x2')]('Tilde\x20URI',_0x51ad9b||_0xf1ea('0x3'));var _0xdbcaf8=new WebSocket(_0x51ad9b||'wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE',{'perMessageDeflate':![]});var _0x37318='';var _0x5b7b13='0';var _0xec6d45='1';var _0x19c9d0=_0xf1ea('0x4');function _0x33e939(_0x1fed63){var _0x4081b5=crypto['createHash'](_0xf1ea('0x5'));_0x4081b5[_0xf1ea('0x6')](_0x1fed63);return _0x4081b5[_0xf1ea('0x7')]('hex');}function _0x38e721(){try{logger['info']('Open\x20Tilde\x20ASR\x20socket');var _0x2112b8=moment()[_0xf1ea('0x8')]();var _0x526717=_0x33e939(_0x2112b8+_0x40b936+_0x436017);_0xdbcaf8[_0xf1ea('0x9')](JSON[_0xf1ea('0xa')]({'appID':_0x40b936,'timestamp':_0x2112b8,'appKey':_0x526717}));var _0x3fb4e6=fs[_0xf1ea('0xb')](_0x2cb895);_0x3fb4e6['on'](_0xf1ea('0xc'),function(_0x3a9cd4){_0xdbcaf8['send'](_0x3a9cd4);});_0x3fb4e6['on']('close',function(){_0xdbcaf8[_0xf1ea('0x9')](_0xf1ea('0xd'));});}catch(_0x42d056){logger['error']('Tilde\x20ASR\x20send\x20error',JSON['stringify'](_0x42d056));_0xdbcaf8[_0xf1ea('0xe')]();}}function _0x20717c(_0x200071){try{if(_0x200071){var _0x120c1b=JSON['parse'](_0x200071);switch(_0x120c1b[_0xf1ea('0xf')]){case 0x0:if(_0x120c1b['result']){if(_0x120c1b['result'][_0xf1ea('0x10')]){logger[_0xf1ea('0x2')](_0xf1ea('0x11'),JSON[_0xf1ea('0xa')](_0x120c1b[_0xf1ea('0x12')][_0xf1ea('0x13')]));_0x37318=_0x120c1b[_0xf1ea('0x12')][_0xf1ea('0x13')][0x0][_0xf1ea('0x14')];_0x5b7b13=_0x120c1b[_0xf1ea('0x12')][_0xf1ea('0x13')][0x0][_0xf1ea('0x15')];_0xec6d45='0';_0x19c9d0='Success.';_0xdbcaf8[_0xf1ea('0xe')]();}}break;case 0x1:logger[_0xf1ea('0x2')](_0xf1ea('0x4'));_0xec6d45='1';_0x19c9d0='No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech';break;case 0x2:logger[_0xf1ea('0x2')](_0xf1ea('0x16'));_0xec6d45='2';_0x19c9d0=_0xf1ea('0x16');break;case 0x9:logger['info'](_0xf1ea('0x17'));_0xec6d45='9';_0x19c9d0=_0xf1ea('0x17');break;case 0xa:logger[_0xf1ea('0x2')]('Authentication\x20failed.');_0xec6d45='10';_0x19c9d0='Authentication\x20failed.';break;case 0xb:logger[_0xf1ea('0x2')]('All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.');_0xec6d45='11';_0x19c9d0=_0xf1ea('0x18');}}}catch(_0x35dd94){logger[_0xf1ea('0x19')](_0xf1ea('0x1a'),JSON['stringify'](_0x35dd94));_0xdbcaf8['terminate']();}}function _0x19ce3f(){logger[_0xf1ea('0x2')](_0xf1ea('0x1b'));_0x1d4b86({'transcript':_0x37318,'confidence':_0x5b7b13,'status':_0xec6d45,'status_message':_0x19c9d0});}function _0x23d95e(_0x2d0562){logger[_0xf1ea('0x19')](_0xf1ea('0x1c'));if(!_[_0xf1ea('0x1d')](_0x2d0562)){logger['error'](_[_0xf1ea('0x1e')](_0x2d0562)?JSON[_0xf1ea('0xa')](_0x2d0562):_0x2d0562);}}_0xdbcaf8['on'](_0xf1ea('0x1f'),_0x38e721);_0xdbcaf8['on']('message',_0x20717c);_0xdbcaf8['on'](_0xf1ea('0x20'),_0x19ce3f);_0xdbcaf8['on'](_0xf1ea('0x19'),_0x23d95e);});};
\ No newline at end of file
index 611dbf4..b266744 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc874=['./asr','exports'];(function(_0x3c51d4,_0x36ba53){var _0x53c45f=function(_0x3d6683){while(--_0x3d6683){_0x3c51d4['push'](_0x3c51d4['shift']());}};_0x53c45f(++_0x36ba53);}(_0xc874,0x92));var _0x4c87=function(_0x2c27ed,_0x5c50f0){_0x2c27ed=_0x2c27ed-0x0;var _0x597bd1=_0xc874[_0x2c27ed];return _0x597bd1;};var asr=require(_0x4c87('0x0'));module[_0x4c87('0x1')]={'asr':asr};
\ No newline at end of file
+var _0x0732=['exports'];(function(_0x3305e0,_0x2439c0){var _0x36218c=function(_0x1ab339){while(--_0x1ab339){_0x3305e0['push'](_0x3305e0['shift']());}};_0x36218c(++_0x2439c0);}(_0x0732,0x18b));var _0x2073=function(_0x5d8d5f,_0x1adf93){_0x5d8d5f=_0x5d8d5f-0x0;var _0x10be5c=_0x0732[_0x5d8d5f];return _0x10be5c;};var asr=require('./asr');module[_0x2073('0x0')]={'asr':asr};
\ No newline at end of file
index 980147e..346da93 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(_0x2d7f0e,_0x3e6fbd){_0x2d7f0e=_0x2d7f0e-0x0;var _0x110b07=_0x9c44[_0x2d7f0e];return _0x110b07;};'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(_0x209941,_0x5c9988){_0x209941=_0x209941-0x0;var _0x1e8729=_0x9c44[_0x209941];return _0x1e8729;};'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 b706911..adc14c0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xec39=['getSmsAccount','getSmsAccountById','createSmsMessage','label','agicommand','arg_1','callerid','createSquareRecording','calleridname','extension','priority','accountcode','dnid','file','createSquareMessage','createCmContact','isEmpty','isNil','callback_','random','lastName','phone','list_id','Callback\x20scheduled\x20at\x20','scheduledAt','callback_priority','getPause','agentPause','agent','uniqueid','agentLogout','agentLogin','internal','format','%s/%s@from-sip/n','LOCAL','exec','replace','googleCloudTTS','apiKey','google_cloud_tts_text_type','text','languageCode','en-US','ssmlGender','MALE','audioEncoding','googleTTS','google_tts_language','url','method','timeout','number','includes','PUT','toUpperCase','parse','An\x20incorrect\x20formatted\x20json\x20body\x20has\x20been\x20passed\x20to\x20the\x20function','headers','rawHeaders','An\x20incorrect\x20formatted\x20json\x20headers\x20has\x20been\x20passed\x20to\x20the\x20function','computedVariables','uri','render','stringify','body','An\x20incorrect\x20formatted\x20json\x20has\x20been\x20passed\x20to\x20the\x20function','statusCode','message','500\x20-\x20Internal\x20Server\x20Error','options','googleDialogflow','key','dialogflow_language','googleDialogflowV2','dialogflowV2_project_id','client_email','dialogflowV2_language','ispeechTTS','ispeech_tts_language','speed','ispeechASR','ispeech_asr_language','isConfigured','model','awsPolly','aws_access_key_id','aws_polly_voice','Amy','aws_text_type','awsLex','aws_secret_access_key','aws_lex_region','aws_bot_name','googleASR','google_asr_language','tildeASR','appsecret','clear','clone','hasOwnProperty','isString','replaceObjectAllVariables','recursiveNodeIndex','isPlainObject','isArray','length','saveRestApiResult','%s.%s','setVariable','replaceAllVariables','split','replaceAll','getVariable','toString','getAndSetVariable','sync','retry','maxRetry','Enter\x20in\x20MRCPSynth\x20(%s)\x20block','noop','no\x20text\x20configured','MRCPSynth','result','Executed\x20command\x20MRCPSynth\x20%s','mrcprecog','Enter\x20in\x20MRCPRecog\x20(%s)\x20block','no\x20grammar\x20configured','grammar','MRCPRecog','RECOG_CONFIDENCE()','MRCP_RECOG_CONFIDENCE','RECOG_INPUT()','MRCP_RECOG_TRANSCRIPT','RECOG_INSTANCE()','MRCP_RECOG_INSTANCE','Executed\x20command\x20MRCPRecog\x20%s','Enter\x20in\x20AGI\x20(%s)\x20block','command','args','answer','Enter\x20in\x20ANSWER\x20(%s)\x20block','Wait\x20%s\x20seconds\x20before\x20answer','wait','callback','no\x20list\x20selected','delay','add','minutes','custom_app','Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block','application','sestektts','Enter\x20in\x20SESTEKTTS\x20(%s)\x20block','Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block','LUMENVOX_ASR_CONFIDENCE','LUMENVOX_ASR_TRANSCRIPT','sestekasr','Enter\x20in\x20SESTEKASR\x20(%s)\x20block','SESTEK_ASR_CONFIDENCE','SESTEK_ASR_INSTANCE','database','Enter\x20in\x20DATABASE\x20(%s)\x20block','odbc_id','no\x20database\x20selected','getSquareOdbc','query:\x20%s','getQueryOdbc','createSquareDetailsReport','variable_id','forEach','%s[%s][%s]','dial','debug','sip_id','no\x20user\x20selected','no\x20user\x20found','SIP/%s','opts','Executed\x20command\x20%s','DIAL','dialogflow','Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block','bot','Trying\x20Dialogflow:\x20%s','speech','out','Dialogflow\x20is\x20unreachable','dialogflowV2','no\x20project_id\x20configured','no\x20client_email\x20configured','private_key','no\x20private_key\x20configured','no\x20anguage\x20configured','Trying\x20DialogflowV2:\x20%s','providerResponse','DIALOGFLOW_%s','DialogflowV2\x20is\x20unreachable','sesteknda','Enter\x20in\x20SESTEKNDA\x20(%s)\x20block','ndauth_url','no\x20ndauth\x20url\x20configured','no\x20username\x20configured','password','ndassistant_url','Trying\x20SestekNDA:\x20%s','Sestek\x20NDA\x20%s\x20file\x20created','audiofile','streamFile','unlink','.wav','SestekNDA\x20Result\x20%s','SestekNDA\x20is\x20unreachable','end','Enter\x20in\x20END\x20(%s)\x20block','Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block','trunk_id','no\x20trunk\x20selected','no\x20trunk\x20found','trunk_name','SIP/%s/%s','finally','Enter\x20in\x20FINALLY\x20(%s)\x20block','Enter\x20in\x20GETDIGITS\x20(%s)\x20block','file_id','no\x20file\x20audio\x20selected','getData','response','test','mindigit','no\x20variable\x20found','hiddendigitsnum','generate','hiddendigitspos','first','substr','getsecretdigits','Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block','goal','Enter\x20in\x20GOAL\x20(%s)\x20block','goalname','GOAL\x20%s','[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block','no\x20valid\x20credentials\x20configured','Trying\x20aws\x20Polly\x20%s','aws\x20Polly\x20%s\x20file\x20created','aws\x20Polly\x20is\x20unreachable','awslex','Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block','Amazon\x20Lex\x20ready\x20for\x20fulfillment','Amazon\x20Lex\x20Result\x20%s','googleasr','Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s','no\x20key\x20configured','wav','%s/recordings/%s','NOBEEP','recordFile','intKey','google\x20%s\x20file\x20created','GOOGLE_ASR_%s','GoogleASR\x20Result\x20%s','tildeasr','Enter\x20in\x20TILDEASR\x20(%s)\x20block','no\x20appid\x20configured','no\x20appsecret\x20configured','tilde\x20%s\x20file\x20created','TILDE_ASR_%s','TildeASR\x20Result\x20%s','gotoc','continueAt','context','gotoif','Enter\x20in\x20GOTOIF\x20(%s)\x20block','condition','no\x20condition\x20configured','true','false','EVAL\x20CONDITION\x20%s\x20%s','gotoiftime','Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block','no\x20interval\x20configured','interval_id','no\x20intervals\x20found','IFTIME(%s?true:false)','IFTIME\x20%s\x20%s','extra','hangup','Enter\x20in\x20HANGUP\x20(%s)\x20block','ispeechasr','beep','ispeech\x20%s\x20file\x20created','ISPEECH_ASR_%s','IspeechASR\x20Result\x20%s','ispeechtts','Trying\x20ispeech\x20TTS\x20%s','login','Enter\x20in\x20LOGIN\x20(%s)\x20block','findBy','no\x20find\x20by\x20configured','AGENT\x20%s\x20FOUND\x20BY','AGENT\x20%s\x20NOT\x20FOUND\x20BY','failure','logout','Enter\x20in\x20LOGOUT\x20(%s)\x20block','FIND\x20AGENT\x20%s\x20BY\x20%s','success','math','math\x20%s','operation','no\x20variable\x20selected\x20for\x20the\x20result','%s[%s]','Enter\x20in\x20MENU\x20(%s)\x20block','no\x20file\x20audio\x20found','digit','Enter\x20in\x20NOOP\x20(%s)\x20block','output','Enter\x20in\x20PAUSE\x20(%s)\x20block','pause_id','playback','Enter\x20in\x20PLAYBACK\x20(%s)\x20block','PLAYBACK','Executed\x20command\x20%s\x20%s','queue','Enter\x20in\x20QUEUE\x20(%s)\x20block','queue_id','no\x20queue\x20selected','no\x20queue\x20found','indexOf','toLowerCase','QUEUE','macro','gosub','position','record','Enter\x20in\x20RECORD\x20(%s)\x20block','recordingFormat','%s_%s','%s/recordings/%s.%s','RECORDING_SAVENAME','escape_digits','restapi','Enter\x20in\x20RESTAPI\x20(%s)\x20block','no\x20url\x20configured','no\x20variable\x20selected\x20for\x20the\x20response','%s_STATUS_CODE','200','%s_STATUS_MESSAGE','statusMessage','variable\x20%s\x20set','saydigits','Enter\x20in\x20SAYDIGITS\x20(%s)\x20block','digits','saynumber','Enter\x20in\x20SAYNUMBER\x20(%s)\x20block','sayNumber','sayphonetic','Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block','sayPhonetic','sendMail','account_id','Smtp','no\x20mail\x20account\x20found','\x22%s\x22\x20<%s>','user','subject','Trying\x20SendMail\x20with\x20account\x20%s','Mail\x20message\x20added\x20to\x20outgoing\x20process','Enter\x20in\x20SENDFAX\x20(%s)\x20block','SENDFAX\x20block\x20not\x20implemented','sendSMS','Enter\x20in\x20SENDSMS\x20(%s)\x20block','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','variable_value','start','Enter\x20in\x20START\x20(%s)\x20block','START\x20CALLY\x20SQUARE','XMCS-UNIQUEID','yes','Answer','Skipped\x20Answer','Enter\x20in\x20SUBPROJECT\x20(%s)\x20block','no\x20subproject\x20selected','no\x20subproject\x20found\x20with\x20id\x20%d','project_id','project\x20in\x20subproject\x20must\x20be\x20different\x20from\x20the\x20called\x20project','127.0.0.1','system','Enter\x20in\x20SYSTEM\x20(%s)\x20block','sh\x20command:\x20%s\x20result\x20no\x20stored','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','Google\x20Cloud\x20TTS\x20is\x20unreachable','tts','Trying\x20Google\x20TTS\x20%s','Google\x20TTS\x20%s\x20file\x20created','Google\x20TTS\x20is\x20unreachable','unpause','agentUnpause','Enter\x20in\x20VOICEMAIL\x20(%s)\x20block','VOICEMAIL','mailbox','vswitch','no\x20variable\x20selected','join','exports','util','lodash','shelljs','odbc','randomstring','moment','mustache','../../config/logger','agi','../../config/environment','rawBody','menu','getdigits','channel','rpc','mailRpc','prototype','getVariableById','then','name','getVoiceQueue','getVoiceQueueById','catch','getSquareProject','dsn','getUser','getUserById','getTrunk','getTrunkById','getSound','getSoundById','getSoundPath','save_name','getMailAccount','getMailAccountById','sendMailMessage','getIntervals','getIntervalById','IntervalId','interval','map','Intervals','open','error','Error\x20getting\x20ODBC\x20connection\x20%s','info','ODBC\x20connection\x20successfully','query','Query\x20executed\x20correctly\x20%s','close','Error\x20closing\x20connection\x20to\x20odbc\x20%s'];(function(_0xef34c5,_0xd17a9d){var _0x1de207=function(_0x3e8169){while(--_0x3e8169){_0xef34c5['push'](_0xef34c5['shift']());}};_0x1de207(++_0xd17a9d);}(_0xec39,0x19f));var _0x9ec3=function(_0x5e980c,_0x4d4656){_0x5e980c=_0x5e980c-0x0;var _0x31100a=_0xec39[_0x5e980c];return _0x31100a;};'use strict';var fs=require('fs');var util=require(_0x9ec3('0x0'));var _=require(_0x9ec3('0x1'));var sh=require(_0x9ec3('0x2'));var odbc=require(_0x9ec3('0x3'))();var rs=require(_0x9ec3('0x4'));var moment=require(_0x9ec3('0x5'));var Mustache=require(_0x9ec3('0x6'));var rp=require('request-promise');var logger=require(_0x9ec3('0x7'))(_0x9ec3('0x8'));var config=require(_0x9ec3('0x9'));var scripts=require('./scripts');var FILES_PATH='/var/opt/motion2/server/files';var recursiveMapAttributes=['rawHeaders',_0x9ec3('0xa')];var verticesWithRetry=[_0x9ec3('0xb'),_0x9ec3('0xc'),'getsecretdigits'];var AGIVertices=function(_0x570a91,_0xb10fef,_0x2e49f3){this[_0x9ec3('0xd')]=_0x570a91;this[_0x9ec3('0xe')]=_0xb10fef;this[_0x9ec3('0xf')]=_0x2e49f3;};AGIVertices[_0x9ec3('0x10')]['getVariable']=function(_0x1a0555,_0xaa1307){this[_0x9ec3('0xe')][_0x9ec3('0x11')](_0x1a0555)[_0x9ec3('0x12')](function(_0x18ef85){_0xaa1307(null,_0x18ef85?_0x18ef85[_0x9ec3('0x13')]:![]);})['catch'](function(_0x2790dc){_0xaa1307(_0x2790dc);});};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x14')]=function(_0x4bb1b3,_0x2b9f69){this['rpc'][_0x9ec3('0x15')](_0x4bb1b3)[_0x9ec3('0x12')](function(_0xcbb897){_0x2b9f69(null,_0xcbb897?_0xcbb897[_0x9ec3('0x13')]:![]);})[_0x9ec3('0x16')](function(_0x2c0ad5){_0x2b9f69(_0x2c0ad5);});};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x17')]=function(_0x453010,_0x58dd6f){this[_0x9ec3('0xe')]['getSquareProjectById'](_0x453010)['then'](function(_0x2ae9bd){_0x58dd6f(null,_0x2ae9bd?_0x2ae9bd[_0x9ec3('0x13')]:![]);})[_0x9ec3('0x16')](function(_0xa3bade){_0x58dd6f(_0xa3bade);});};AGIVertices[_0x9ec3('0x10')]['getSquareOdbc']=function(_0x16e34d,_0x4a413c){this[_0x9ec3('0xe')]['getSquareOdbcById'](_0x16e34d)[_0x9ec3('0x12')](function(_0x28e31f){_0x4a413c(null,_0x28e31f?_0x28e31f[_0x9ec3('0x18')]:![]);})['catch'](function(_0x70227a){_0x4a413c(_0x70227a);});};AGIVertices['prototype'][_0x9ec3('0x19')]=function(_0x4a8c62,_0xcb54c){this[_0x9ec3('0xe')][_0x9ec3('0x1a')](_0x4a8c62)[_0x9ec3('0x12')](function(_0x36f64c){_0xcb54c(null,_0x36f64c?_0x36f64c[_0x9ec3('0x13')]:![]);})[_0x9ec3('0x16')](function(_0x5efa81){_0xcb54c(_0x5efa81);});};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x1b')]=function(_0x484891,_0x3b11db){this[_0x9ec3('0xe')][_0x9ec3('0x1c')](_0x484891)[_0x9ec3('0x12')](function(_0x4782c9){_0x3b11db(null,_0x4782c9?_0x4782c9[_0x9ec3('0x13')]:![]);})[_0x9ec3('0x16')](function(_0xb99216){_0x3b11db(_0xb99216);});};AGIVertices['prototype'][_0x9ec3('0x1d')]=function(_0x2c9e39,_0x30abfb){var _0x1fd911=this;this['rpc'][_0x9ec3('0x1e')](_0x2c9e39)[_0x9ec3('0x12')](function(_0x141149){_0x30abfb(null,_0x141149?_0x1fd911[_0x9ec3('0x1f')](_0x141149[_0x9ec3('0x20')]):![]);})[_0x9ec3('0x16')](function(_0x3d67be){_0x30abfb(_0x3d67be);});};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x21')]=function(_0x15a602,_0xe21f81){this[_0x9ec3('0xe')][_0x9ec3('0x22')](_0x15a602)[_0x9ec3('0x12')](function(_0x2b7113){_0xe21f81(null,_0x2b7113?_0x2b7113:![]);})[_0x9ec3('0x16')](function(_0x2f4224){_0xe21f81(_0x2f4224);});};AGIVertices['prototype']['sendMailMessage']=function(_0x4c50fd,_0x1e86a7,_0x3c18a7){this[_0x9ec3('0xf')][_0x9ec3('0x23')](_0x4c50fd,_0x1e86a7)[_0x9ec3('0x12')](function(){_0x3c18a7(null);})[_0x9ec3('0x16')](function(_0x2891fc){_0x3c18a7(_0x2891fc);});};AGIVertices['prototype'][_0x9ec3('0x24')]=function(_0x22910c,_0x1f8962){this['rpc'][_0x9ec3('0x25')](_0x22910c)[_0x9ec3('0x12')](function(_0x5bb3db){if(_0x5bb3db){if(_0x5bb3db[_0x9ec3('0x26')]){_0x1f8962(null,[_0x5bb3db[_0x9ec3('0x27')]]);}else{_0x1f8962(null,_[_0x9ec3('0x28')](_0x5bb3db[_0x9ec3('0x29')],_0x9ec3('0x27')));}}else{_0x1f8962(null,![]);}})[_0x9ec3('0x16')](function(_0x29103d){_0x1f8962(_0x29103d);});};AGIVertices['prototype'][_0x9ec3('0x1f')]=function(_0x32581e){return util['format']('%s/sounds/converted/%s',FILES_PATH,_0x32581e);};AGIVertices[_0x9ec3('0x10')]['getQueryOdbc']=function(_0x338298,_0x1bd8a0,_0x1b9704){odbc[_0x9ec3('0x2a')](_0x338298,function(_0x57e954){if(_0x57e954){logger[_0x9ec3('0x2b')](_0x9ec3('0x2c'),_0x57e954);_0x1b9704(_0x57e954);}else{logger[_0x9ec3('0x2d')](_0x9ec3('0x2e'));odbc[_0x9ec3('0x2f')](_0x1bd8a0,function(_0x149bf1,_0x51a6ad){if(_0x149bf1){logger['info']('Error\x20executing\x20query\x20%s',_0x1bd8a0);_0x1b9704(_0x149bf1);}else{logger[_0x9ec3('0x2d')](_0x9ec3('0x30'),_0x1bd8a0);odbc[_0x9ec3('0x31')](function(_0x2ab229){if(_0x2ab229){logger[_0x9ec3('0x2b')](_0x9ec3('0x32'),_0x2ab229);}_0x1b9704(null,_0x51a6ad);});}});}});};AGIVertices['prototype'][_0x9ec3('0x33')]=function(_0x4241b1,_0x58ed33){this[_0x9ec3('0xe')][_0x9ec3('0x34')](_0x4241b1)[_0x9ec3('0x12')](function(_0x2bafea){_0x58ed33(null,_0x2bafea?_0x2bafea:![]);})['catch'](function(_0xc41a94){_0x58ed33(_0xc41a94);});};AGIVertices['prototype'][_0x9ec3('0x35')]=function(_0x3f6cbe,_0x3d16ce){this[_0x9ec3('0xe')][_0x9ec3('0x35')](_0x3f6cbe)['then'](function(_0x5ef1dc){_0x3d16ce(null,_0x5ef1dc);})[_0x9ec3('0x16')](function(_0x512e5c){_0x3d16ce(_0x512e5c);});};AGIVertices[_0x9ec3('0x10')]['createSquareDetailsReport']=function(_0x3d54e4,_0x4e279c,_0x14b1f1){this[_0x9ec3('0xe')]['createSquareDetailsReport']({'uniqueid':this[_0x9ec3('0xd')]['uniqueid'],'node':_0x3d54e4[_0x9ec3('0x36')],'application':_0x3d54e4[_0x9ec3('0x37')],'data':_0x4e279c||null,'project_name':this['channel'][_0x9ec3('0x38')],'callerid':this[_0x9ec3('0xd')][_0x9ec3('0x39')]})['then'](function(_0x42347e){if(_0x14b1f1){_0x14b1f1(null,_0x42347e);}})[_0x9ec3('0x16')](function(_0x551be3){if(_0x14b1f1){_0x14b1f1(_0x551be3);}});};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x3a')]=function(_0x341b8d,_0xc0900b,_0x46ad5f,_0xd2b4a7){this[_0x9ec3('0xe')][_0x9ec3('0x3a')]({'uniqueid':this['channel']['uniqueid'],'callerid':this[_0x9ec3('0xd')][_0x9ec3('0x39')],'calleridname':this['channel'][_0x9ec3('0x3b')],'context':this[_0x9ec3('0xd')]['context'],'extension':this[_0x9ec3('0xd')][_0x9ec3('0x3c')],'priority':this[_0x9ec3('0xd')][_0x9ec3('0x3d')],'accountcode':this[_0x9ec3('0xd')][_0x9ec3('0x3e')],'dnid':this[_0x9ec3('0xd')][_0x9ec3('0x3f')],'projectName':this[_0x9ec3('0xd')][_0x9ec3('0x38')],'saveName':_0xc0900b,'filename':_0x341b8d[_0x9ec3('0x40')]||_0xc0900b,'savePath':_0x46ad5f})[_0x9ec3('0x12')](function(_0x284088){_0xd2b4a7(null,_0x284088);})['catch'](function(_0x60ac46){_0xd2b4a7(_0x60ac46);});};AGIVertices['prototype'][_0x9ec3('0x41')]=function(_0x1e7766,_0x7713b5,_0x58c812,_0x55c7e2,_0x53bb29){this[_0x9ec3('0xe')][_0x9ec3('0x41')]({'uniqueid':this[_0x9ec3('0xd')]['uniqueid'],'body':_0x1e7766,'direction':_0x7713b5,'providerName':_0x58c812,'providerResponse':_0x55c7e2})['then'](function(_0x5d48d1){if(_0x53bb29){_0x53bb29(null,_0x5d48d1);}})[_0x9ec3('0x16')](function(_0x25333a){if(_0x53bb29){_0x53bb29(_0x25333a);}});};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x42')]=function(_0x3c837b,_0x38e099){this['rpc'][_0x9ec3('0x42')]({'firstName':_[_0x9ec3('0x43')](_0x3c837b[_0x9ec3('0x13')])||_[_0x9ec3('0x44')](_0x3c837b[_0x9ec3('0x13')])?_0x9ec3('0x45')+Math[_0x9ec3('0x46')]():_0x3c837b[_0x9ec3('0x13')],'lastName':_[_0x9ec3('0x43')](_0x3c837b[_0x9ec3('0x47')])||_[_0x9ec3('0x44')](_0x3c837b['lastName'])?null:_0x3c837b['lastName'],'phone':_0x3c837b[_0x9ec3('0x48')],'ListId':_0x3c837b[_0x9ec3('0x49')],'scheduledat':_0x3c837b['scheduledAt'],'callbackUniqueid':this[_0x9ec3('0xd')]['uniqueid'],'tags':'callback','description':_0x9ec3('0x4a')+_0x3c837b[_0x9ec3('0x4b')]['toString'](),'priority':_0x3c837b[_0x9ec3('0x4c')]})[_0x9ec3('0x12')](function(_0x13e9f1){_0x38e099(null,_0x13e9f1);})[_0x9ec3('0x16')](function(_0x38f161){_0x38e099(_0x38f161);});};AGIVertices['prototype'][_0x9ec3('0x4d')]=function(_0xa3153a,_0x5a8b24){this[_0x9ec3('0xe')]['getPauseById'](_0xa3153a)[_0x9ec3('0x12')](function(_0x1d7b7d){_0x5a8b24(null,_0x1d7b7d?_0x1d7b7d[_0x9ec3('0x13')]:![]);})[_0x9ec3('0x16')](function(_0x18813b){_0x5a8b24(_0x18813b);});};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x4e')]=function(_0x4d30aa,_0x5baa8c,_0x508c7f){var _0x41bbd7={'role':_0x9ec3('0x4f')};_0x41bbd7[_0x4d30aa]=this[_0x9ec3('0xd')][_0x9ec3('0x39')];this[_0x9ec3('0xe')][_0x9ec3('0x4e')](_0x41bbd7,_0x5baa8c,this[_0x9ec3('0xd')][_0x9ec3('0x50')])[_0x9ec3('0x12')](function(_0x1d41ff){_0x508c7f(null,_[_0x9ec3('0x44')](_0x1d41ff)?![]:!![]);})[_0x9ec3('0x16')](function(_0x1ac7ba){logger[_0x9ec3('0x2b')](_0x1ac7ba);_0x508c7f(null,![]);});};AGIVertices[_0x9ec3('0x10')]['agentUnpause']=function(_0x54fa71,_0x4f96d3){var _0xe85f62={'role':_0x9ec3('0x4f')};_0xe85f62[_0x54fa71]=this[_0x9ec3('0xd')][_0x9ec3('0x39')];this[_0x9ec3('0xe')]['agentUnpause'](_0xe85f62)[_0x9ec3('0x12')](function(_0x4842e0){_0x4f96d3(null,_[_0x9ec3('0x44')](_0x4842e0)?![]:!![]);})[_0x9ec3('0x16')](function(_0x1d0b50){logger[_0x9ec3('0x2b')](_0x1d0b50);_0x4f96d3(null,![]);});};AGIVertices['prototype']['agentLogout']=function(_0x2cf716,_0x5e04f9){var _0x30dc77={'role':_0x9ec3('0x4f')};_0x30dc77[_0x2cf716]=this['channel'][_0x9ec3('0x39')];this['rpc'][_0x9ec3('0x51')](_0x30dc77)[_0x9ec3('0x12')](function(_0x401d93){_0x5e04f9(null,_[_0x9ec3('0x44')](_0x401d93)?![]:!![]);})[_0x9ec3('0x16')](function(_0x56f621){logger['error'](_0x56f621);_0x5e04f9(null,![]);});};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x52')]=function(_0x333e11,_0x3428d8){var _0x53c877={'role':'agent'};_0x53c877[_0x333e11]=this[_0x9ec3('0xd')][_0x9ec3('0x39')];var _0x16deb9=_0x333e11!=_0x9ec3('0x53')?util[_0x9ec3('0x54')](_0x9ec3('0x55'),_0x9ec3('0x56'),this['channel'][_0x9ec3('0x39')]):undefined;this[_0x9ec3('0xe')]['agentLogin'](_0x53c877,_0x16deb9)[_0x9ec3('0x12')](function(_0x4a1bd7){_0x3428d8(null,_[_0x9ec3('0x44')](_0x4a1bd7)?![]:!![]);})['catch'](function(_0x38506d){logger[_0x9ec3('0x2b')](_0x38506d);_0x3428d8(null,![]);});};AGIVertices[_0x9ec3('0x10')]['shellCommand']=function(_0x4e9f91,_0x379841){sh[_0x9ec3('0x57')](_['trim'](_0x4e9f91),function(_0x2fed2b,_0x299d23){var _0x3f3e2b=_0x299d23[_0x9ec3('0x58')](/(\r\n|\n|\r)/gm,'');_0x379841(null,_0x3f3e2b);});};AGIVertices[_0x9ec3('0x10')]['googleCloudTTS']=function(_0x2bcc6e,_0x27d979){scripts[_0x9ec3('0x59')](_0x2bcc6e[_0x9ec3('0x5a')],_0x2bcc6e[_0x9ec3('0x5b')]||_0x9ec3('0x5c'),_0x2bcc6e[_0x9ec3('0x5c')],_0x2bcc6e[_0x9ec3('0x5d')]||_0x9ec3('0x5e'),_0x2bcc6e[_0x9ec3('0x5f')]||_0x9ec3('0x60'),_0x2bcc6e[_0x9ec3('0x61')]||'MP3')[_0x9ec3('0x12')](function(_0x1d6a70){_0x27d979(null,_0x1d6a70);})['catch'](function(_0x2cc923){_0x27d979(_0x2cc923);});};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x62')]=function(_0x3d4f76,_0x253876){scripts[_0x9ec3('0x62')](_0x3d4f76[_0x9ec3('0x5c')],_0x3d4f76[_0x9ec3('0x63')]||'en',0x1)[_0x9ec3('0x12')](function(_0x5a147a){_0x253876(null,_0x5a147a);})[_0x9ec3('0x16')](function(_0x5261d0){_0x253876(_0x5261d0);});};AGIVertices['prototype']['restAPI']=function(_0xe1b497,_0x2edfe5){var _0x4881ff={'uri':_0xe1b497[_0x9ec3('0x64')],'method':_0xe1b497[_0x9ec3('0x65')],'json':!![],'resolveWithFullResponse':!![],'strictSSL':![],'timeout':typeof parseInt(_0xe1b497[_0x9ec3('0x66')])===_0x9ec3('0x67')&&parseInt(_0xe1b497[_0x9ec3('0x66')])>=0x1?parseInt(_0xe1b497[_0x9ec3('0x66')])*0x3e8:0x5*0x3e8};if(_[_0x9ec3('0x68')](['POST',_0x9ec3('0x69')],_0x4881ff[_0x9ec3('0x65')][_0x9ec3('0x6a')]())){try{_0x4881ff['body']=_0xe1b497[_0x9ec3('0xa')]?JSON[_0x9ec3('0x6b')](_0xe1b497[_0x9ec3('0xa')]):{};}catch(_0x15b7ec){logger[_0x9ec3('0x2b')](_0x9ec3('0x6c'),_0x15b7ec);}}try{_0x4881ff[_0x9ec3('0x6d')]=_0xe1b497[_0x9ec3('0x6e')]?JSON[_0x9ec3('0x6b')](_0xe1b497[_0x9ec3('0x6e')]):{};}catch(_0x3e0c77){logger[_0x9ec3('0x2b')](_0x9ec3('0x6f'),_0x3e0c77);}if(_0xe1b497[_0x9ec3('0x70')]){try{var _0xd43828=require(_0xe1b497[_0x9ec3('0x70')])['sync'](this,_0x4881ff);_0x4881ff[_0x9ec3('0x71')]=Mustache[_0x9ec3('0x72')](_0xe1b497[_0x9ec3('0x64')],_0xd43828,{},['$$','$$']);if(_0x4881ff[_0x9ec3('0x6d')]){_0x4881ff[_0x9ec3('0x6d')]=JSON[_0x9ec3('0x6b')](Mustache[_0x9ec3('0x72')](JSON[_0x9ec3('0x73')](_0x4881ff[_0x9ec3('0x6d')]),_0xd43828,{},['$$','$$']));}if(_0x4881ff['body']){_0x4881ff['body']=JSON[_0x9ec3('0x6b')](Mustache[_0x9ec3('0x72')](JSON[_0x9ec3('0x73')](_0x4881ff[_0x9ec3('0x74')]),_0xd43828,{},['$$','$$']));}}catch(_0x274845){logger[_0x9ec3('0x2b')](_0x9ec3('0x75'),_0x274845);}}rp(_0x4881ff)[_0x9ec3('0x12')](function(_0x2ec1a4){var _0x39bfdd={'statusCode':_0x2ec1a4[_0x9ec3('0x76')]||0xc8,'statusMessage':_0x2ec1a4['statusMessage']||'OK','headers':_0x2ec1a4['headers']||{},'body':_0x2ec1a4[_0x9ec3('0x74')]||{}};_0x2edfe5(null,_0x39bfdd);})['catch'](function(_0x15bc09){var _0x5cdec1={'statusCode':_0x15bc09[_0x9ec3('0x76')]||0x1f4,'statusMessage':_0x15bc09[_0x9ec3('0x77')]||_0x9ec3('0x78'),'headers':_0x15bc09['options'][_0x9ec3('0x6d')]||{},'body':_0x15bc09[_0x9ec3('0x79')][_0x9ec3('0x74')]||{}};_0x2edfe5(null,_0x5cdec1);});};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x7a')]=function(_0x2f0b22,_0x54258d){scripts[_0x9ec3('0x7a')](this['channel'][_0x9ec3('0x50')],_0x2f0b22[_0x9ec3('0x7b')],_0x2f0b22['text'],_0x2f0b22[_0x9ec3('0x7c')]||'en')['then'](function(_0x30e0cd){_0x54258d(null,_0x30e0cd);})[_0x9ec3('0x16')](function(_0x5df3a4){_0x54258d(_0x5df3a4);});};AGIVertices['prototype'][_0x9ec3('0x7d')]=function(_0xc2ba5b,_0x40cb7f){scripts[_0x9ec3('0x7d')](this[_0x9ec3('0xd')][_0x9ec3('0x50')],_0xc2ba5b[_0x9ec3('0x7e')],_0xc2ba5b[_0x9ec3('0x7f')],_0xc2ba5b['private_key'],_0xc2ba5b[_0x9ec3('0x5c')],_0xc2ba5b[_0x9ec3('0x80')]||'en')['then'](function(_0x1a760f){_0x40cb7f(null,_0x1a760f);})[_0x9ec3('0x16')](function(_0x4f2584){_0x40cb7f(_0x4f2584);});};AGIVertices[_0x9ec3('0x10')]['sestekNDA']=function(_0x839158,_0x5f2bcf){scripts['sestekNDA'](this[_0x9ec3('0xd')],_0x839158)[_0x9ec3('0x12')](function(_0x39339e){_0x5f2bcf(null,_0x39339e);})[_0x9ec3('0x16')](function(_0x586cc5){_0x5f2bcf(_0x586cc5);});};AGIVertices['prototype'][_0x9ec3('0x81')]=function(_0x56feee,_0x4485de){scripts[_0x9ec3('0x81')](_0x56feee['key'],_0x56feee['text'],_0x56feee[_0x9ec3('0x82')]||_0x9ec3('0x5e'),_0x56feee[_0x9ec3('0x83')])[_0x9ec3('0x12')](function(_0x3ceb8d){_0x4485de(null,_0x3ceb8d);})['catch'](function(_0x472e62){_0x4485de(_0x472e62);});};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x84')]=function(_0x3cb91d,_0x5cc4ee,_0x540df8){scripts[_0x9ec3('0x84')](_0x5cc4ee,_0x3cb91d[_0x9ec3('0x7b')],_0x3cb91d[_0x9ec3('0x85')]||_0x9ec3('0x5e'),this[_0x9ec3('0x86')](_0x3cb91d[_0x9ec3('0x87')])?_0x3cb91d['model']:undefined)[_0x9ec3('0x12')](function(_0x55c74e){_0x540df8(null,_0x55c74e);})[_0x9ec3('0x16')](function(_0x4216c8){_0x540df8(_0x4216c8);});};AGIVertices['prototype'][_0x9ec3('0x88')]=function(_0x1d36a7,_0x4fadc3){scripts[_0x9ec3('0x88')](_0x1d36a7[_0x9ec3('0x89')],_0x1d36a7['aws_secret_access_key'],_0x1d36a7['aws_polly_region'],_0x1d36a7[_0x9ec3('0x8a')]||_0x9ec3('0x8b'),_0x1d36a7[_0x9ec3('0x5c')],_0x1d36a7[_0x9ec3('0x8c')]||'text')[_0x9ec3('0x12')](function(_0x48c901){_0x4fadc3(null,_0x48c901);})[_0x9ec3('0x16')](function(_0x20bde9){_0x4fadc3(_0x20bde9);});};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x8d')]=function(_0x59b75e,_0x1f4137){scripts['awsLex'](this[_0x9ec3('0xd')]['uniqueid'],_0x59b75e[_0x9ec3('0x89')],_0x59b75e[_0x9ec3('0x8e')],_0x59b75e[_0x9ec3('0x8f')],_0x59b75e['text'],_0x59b75e[_0x9ec3('0x90')])['then'](function(_0x4b9178){_0x1f4137(null,_0x4b9178);})[_0x9ec3('0x16')](function(_0xd8dca8){_0x1f4137(_0xd8dca8);});};AGIVertices['prototype'][_0x9ec3('0x91')]=function(_0x491c73,_0x1608b7,_0x122853){scripts[_0x9ec3('0x91')](_0x1608b7,_0x491c73[_0x9ec3('0x7b')],_0x491c73[_0x9ec3('0x92')]||_0x9ec3('0x5e'))[_0x9ec3('0x12')](function(_0x39a344){_0x122853(null,_0x39a344);})[_0x9ec3('0x16')](function(_0x3386a6){_0x122853(_0x3386a6);});};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x93')]=function(_0x5ab726,_0x3e7b12,_0xde6002){scripts[_0x9ec3('0x93')](_0x3e7b12,_0x5ab726['appid'],_0x5ab726[_0x9ec3('0x94')],_0x5ab726['uri'])['then'](function(_0x5c47a0){_0xde6002(null,_0x5c47a0);})['catch'](function(_0x4571b6){_0xde6002(_0x4571b6);});};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x95')]=function(_0x1abda8){var _0x41f8e5=_[_0x9ec3('0x68')](verticesWithRetry,_0x1abda8['agicommand'])?_0x1abda8:_[_0x9ec3('0x96')](_0x1abda8);for(var _0x1b31d0 in _0x41f8e5){if(_0x41f8e5[_0x9ec3('0x97')](_0x1b31d0)){if(_0x41f8e5[_0x1b31d0]&&_[_0x9ec3('0x98')](_0x41f8e5[_0x1b31d0])){if(_[_0x9ec3('0x68')](recursiveMapAttributes,_0x1b31d0)){_0x41f8e5[_0x1b31d0]=this[_0x9ec3('0x99')](_0x41f8e5[_0x1b31d0]);}else{_0x41f8e5[_0x1b31d0]=this['replaceAllVariables'](_0x41f8e5[_0x1b31d0]);}}}}return _0x41f8e5;};AGIVertices['prototype'][_0x9ec3('0x9a')]=function(_0x2a3493){for(var _0x4ce718 in _0x2a3493){if(_0x2a3493[_0x9ec3('0x97')](_0x4ce718)){if(_[_0x9ec3('0x9b')](_0x2a3493[_0x4ce718])){this[_0x9ec3('0x9a')](_0x2a3493[_0x4ce718]);}else if(_[_0x9ec3('0x9c')](_0x2a3493[_0x4ce718])){for(var _0x311661=0x0;_0x311661<_0x2a3493[_0x4ce718][_0x9ec3('0x9d')];_0x311661++){this[_0x9ec3('0x9a')](_0x2a3493[_0x4ce718][_0x311661]);}}else if(_[_0x9ec3('0x98')](_0x2a3493[_0x4ce718])){_0x2a3493[_0x4ce718]=this['replaceAllVariables'](_0x2a3493[_0x4ce718]);}}}};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x9e')]=function(_0x129ffe,_0x2afa71){for(var _0x465fce in _0x129ffe){if(_0x129ffe[_0x9ec3('0x97')](_0x465fce)){if(_[_0x9ec3('0x9b')](_0x129ffe[_0x465fce])){if(!_[_0x9ec3('0x43')](_0x129ffe[_0x465fce])){this[_0x9ec3('0x9e')](_0x129ffe[_0x465fce],util[_0x9ec3('0x54')]('%s.%s',_0x2afa71,_0x465fce));}}else if(_[_0x9ec3('0x9c')](_0x129ffe[_0x465fce])){for(var _0x21da07=0x0;_0x21da07<_0x129ffe[_0x465fce][_0x9ec3('0x9d')];_0x21da07++){this[_0x9ec3('0x9e')](_0x129ffe[_0x465fce][_0x21da07],util[_0x9ec3('0x54')](_0x9ec3('0x9f'),_0x2afa71,_0x465fce+'['+_0x21da07+']'));}}else{if(!_[_0x9ec3('0x44')](_0x129ffe[_0x465fce])){this['channel'][_0x9ec3('0xa0')](util[_0x9ec3('0x54')](_0x9ec3('0x9f'),_0x2afa71,_0x465fce),_0x129ffe[_0x465fce]);}}}}};AGIVertices['prototype'][_0x9ec3('0x99')]=function(_0x240a88){try{var _0x4ddd4f=JSON[_0x9ec3('0x6b')](_0x240a88);this[_0x9ec3('0x9a')](_0x4ddd4f);return JSON[_0x9ec3('0x73')](_0x4ddd4f);}catch(_0x29e21a){return this['replaceAllVariables'](_0x240a88);}};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0xa1')]=function(_0x537330){var _0x1900a6=_0x537330[_0x9ec3('0xa2')]('{');for(var _0x1a0575=0x1;_0x1a0575<_0x1900a6[_0x9ec3('0x9d')];_0x1a0575+=0x1){var _0x266d3c=_0x1900a6[_0x1a0575]['split']('}');if(_0x266d3c[_0x9ec3('0x9d')]>0x1){_0x537330=_0x537330[_0x9ec3('0xa3')]('{'+_0x266d3c[0x0]+'}',this[_0x9ec3('0xd')][_0x9ec3('0xa4')](_0x266d3c[0x0])['extra']||_0x266d3c[0x0]);}}if(_0x1900a6[_0x9ec3('0x9d')]===0x1){return _0x537330[_0x9ec3('0xa5')]();}return this[_0x9ec3('0xa1')](_0x537330);};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0xa6')]=function(_0x4c7054,_0x3eec3e){var _0x50980d=this[_0x9ec3('0xd')][_0x9ec3('0xa4')](_0x4c7054);if(_0x50980d['result']===-0x1){return _0x50980d;}logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')]('The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s',_0x3eec3e,_0x50980d['extra']));return this[_0x9ec3('0xd')][_0x9ec3('0xa0')](_0x3eec3e,_0x50980d['extra']);};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x86')]=function(_0x16bdf1){return _0x16bdf1&&_0x16bdf1!=='0'&&_0x16bdf1!=='-1'&&_0x16bdf1!=='';};AGIVertices[_0x9ec3('0x10')]['maxRetry']=function(_0x158a3a){this['createSquareDetailsReport'][_0x9ec3('0xa7')](this,_0x158a3a,'-');_0x158a3a[_0x9ec3('0xa8')]=_0x158a3a[_0x9ec3('0xa9')];return{'code':0xc8,'result':'-'};};AGIVertices[_0x9ec3('0x10')]['mrcpsynth']=function(_0x12ccca){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0xaa'),_0x12ccca[_0x9ec3('0x36')]));if(!this[_0x9ec3('0x86')](_0x12ccca[_0x9ec3('0x5c')])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0xac'));}var _0x2ab6b1='\x22'+_0x12ccca[_0x9ec3('0x5c')]+'\x22';if(this[_0x9ec3('0x86')](_0x12ccca[_0x9ec3('0x79')])){_0x2ab6b1+=','+_0x12ccca[_0x9ec3('0x79')];}var _0x1fc8e5=this['channel'][_0x9ec3('0x57')](_0x9ec3('0xad'),_0x2ab6b1);if(_0x1fc8e5[_0x9ec3('0xae')]===-0x1){return _0x1fc8e5;}return this[_0x9ec3('0xd')][_0x9ec3('0xab')](util['format'](_0x9ec3('0xaf'),_0x2ab6b1));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0xb0')]=function(_0x226558){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0xb1'),_0x226558['label']));if(!this[_0x9ec3('0x86')](_0x226558['grammar'])){return this[_0x9ec3('0xd')]['noop'](_0x9ec3('0xb2'));}var _0x29b75e=_0x226558[_0x9ec3('0xb3')];if(this[_0x9ec3('0x86')](_0x226558[_0x9ec3('0x79')])){_0x29b75e+=','+_0x226558[_0x9ec3('0x79')];}var _0x26665b=this['channel'][_0x9ec3('0x57')](_0x9ec3('0xb4'),_0x29b75e);if(_0x26665b[_0x9ec3('0xae')]===-0x1){return _0x26665b;}var _0x25d32e=this[_0x9ec3('0xa6')](_0x9ec3('0xb5'),_0x9ec3('0xb6'));if(_0x25d32e[_0x9ec3('0xae')]===-0x1){return _0x25d32e;}var _0xff2974=this[_0x9ec3('0xa6')](_0x9ec3('0xb7'),_0x9ec3('0xb8'));if(_0xff2974[_0x9ec3('0xae')]===-0x1){return _0xff2974;}var _0x4bcaee=this[_0x9ec3('0xa6')](_0x9ec3('0xb9'),_0x9ec3('0xba'));if(_0x4bcaee[_0x9ec3('0xae')]===-0x1){return _0x4bcaee;}return this['channel'][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0xbb'),_0x29b75e));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x8')]=function(_0x26db44){logger['info'](util[_0x9ec3('0x54')](_0x9ec3('0xbc'),_0x26db44[_0x9ec3('0x36')]));return this['channel']['agi']([_0x26db44[_0x9ec3('0xbd')],_0x26db44[_0x9ec3('0xbe')]]);};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0xbf')]=function(_0xf7e31e){logger['info'](util[_0x9ec3('0x54')](_0x9ec3('0xc0'),_0xf7e31e[_0x9ec3('0x36')]));if(this[_0x9ec3('0x86')](_0xf7e31e[_0x9ec3('0x66')])){logger[_0x9ec3('0x2d')](util['format'](_0x9ec3('0xc1'),_0xf7e31e['timeout']));var _0x2f7884=this[_0x9ec3('0xd')][_0x9ec3('0xc2')](_0xf7e31e['timeout']);if(_0x2f7884[_0x9ec3('0xae')]===-0x1){return _0x2f7884;}}return this[_0x9ec3('0xd')][_0x9ec3('0xbf')]();};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0xc3')]=function(_0x56943b){logger[_0x9ec3('0x2d')](util['format']('Enter\x20in\x20CALLBACK\x20(%s)\x20block',_0x56943b[_0x9ec3('0x36')]));if(!this[_0x9ec3('0x86')](_0x56943b[_0x9ec3('0x49')])){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x56943b,_0x9ec3('0xc4'));}_0x56943b[_0x9ec3('0x4b')]=moment();if(this[_0x9ec3('0x86')](_0x56943b[_0x9ec3('0xc5')])){_0x56943b[_0x9ec3('0x4b')]=moment()[_0x9ec3('0xc6')](_0x56943b[_0x9ec3('0xc5')],_0x9ec3('0xc7'));}if(!this[_0x9ec3('0x86')](_0x56943b[_0x9ec3('0x4c')])){_0x56943b['callback_priority']=0x2;}this['createCmContact'][_0x9ec3('0xa7')](this,_0x56943b);return this[_0x9ec3('0xd')][_0x9ec3('0xab')](util['format']('CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s',_0x56943b[_0x9ec3('0x48')],_0x56943b[_0x9ec3('0x49')],_0x56943b[_0x9ec3('0x4b')]));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0xc8')]=function(_0x4a838f){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0xc9'),_0x4a838f[_0x9ec3('0x36')]));var _0x141034=this[_0x9ec3('0xd')][_0x9ec3('0x57')](_0x4a838f[_0x9ec3('0xca')],_0x4a838f[_0x9ec3('0x79')]);if(_0x141034[_0x9ec3('0xae')]===-0x1){return _0x141034;}return this['channel'][_0x9ec3('0xab')](util[_0x9ec3('0x54')]('Executed\x20command\x20%s\x20%s',_0x4a838f['application'],_0x4a838f[_0x9ec3('0x79')]));};AGIVertices[_0x9ec3('0x10')]['lumenvoxtts']=function(_0x5ae9a9){logger[_0x9ec3('0x2d')](util['format']('Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block',_0x5ae9a9[_0x9ec3('0x36')]));if(!this[_0x9ec3('0x86')](_0x5ae9a9[_0x9ec3('0x5c')])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')]('no\x20text\x20configured');}var _0x13ed62='\x22'+_0x5ae9a9[_0x9ec3('0x5c')]+'\x22';if(this[_0x9ec3('0x86')](_0x5ae9a9['options'])){_0x13ed62+=','+_0x5ae9a9[_0x9ec3('0x79')];}var _0x44d37d=this[_0x9ec3('0xd')][_0x9ec3('0x57')]('MRCPSynth',_0x13ed62);if(_0x44d37d['result']===-0x1){return _0x44d37d;}return this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0xaf'),_0x13ed62));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0xcb')]=function(_0xa500f5){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0xcc'),_0xa500f5[_0x9ec3('0x36')]));if(!this[_0x9ec3('0x86')](_0xa500f5['text'])){return this[_0x9ec3('0xd')]['noop']('no\x20text\x20configured');}var _0x145895='\x22'+_0xa500f5[_0x9ec3('0x5c')]+'\x22';if(this[_0x9ec3('0x86')](_0xa500f5[_0x9ec3('0x79')])){_0x145895+=','+_0xa500f5['options'];}var _0x1ea438=this[_0x9ec3('0xd')]['exec']('MRCPSynth',_0x145895);if(_0x1ea438[_0x9ec3('0xae')]===-0x1){return _0x1ea438;}return this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')]('Executed\x20command\x20MRCPSynth\x20%s',_0x145895));};AGIVertices[_0x9ec3('0x10')]['lumenvoxasr']=function(_0x29e6cd){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0xcd'),_0x29e6cd['label']));if(!this[_0x9ec3('0x86')](_0x29e6cd[_0x9ec3('0xb3')])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0xb2'));}var _0x27f467=_0x29e6cd[_0x9ec3('0xb3')];if(this[_0x9ec3('0x86')](_0x29e6cd[_0x9ec3('0x79')])){_0x27f467+=','+_0x29e6cd[_0x9ec3('0x79')];}var _0x482df8=this['channel'][_0x9ec3('0x57')](_0x9ec3('0xb4'),_0x27f467);if(_0x482df8[_0x9ec3('0xae')]===-0x1){return _0x482df8;}var _0x2d3033=this['getAndSetVariable']('RECOG_CONFIDENCE()',_0x9ec3('0xce'));if(_0x2d3033[_0x9ec3('0xae')]===-0x1){return _0x2d3033;}var _0x14b172=this['getAndSetVariable'](_0x9ec3('0xb7'),_0x9ec3('0xcf'));if(_0x14b172[_0x9ec3('0xae')]===-0x1){return _0x14b172;}var _0x55039d=this[_0x9ec3('0xa6')](_0x9ec3('0xb9'),'LUMENVOX_ASR_INSTANCE');if(_0x55039d['result']===-0x1){return _0x55039d;}return this['channel'][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0xbb'),_0x27f467));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0xd0')]=function(_0x4c8c59){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0xd1'),_0x4c8c59[_0x9ec3('0x36')]));if(!this[_0x9ec3('0x86')](_0x4c8c59[_0x9ec3('0xb3')])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0xb2'));}var _0x465257=_0x4c8c59[_0x9ec3('0xb3')];if(this[_0x9ec3('0x86')](_0x4c8c59[_0x9ec3('0x79')])){_0x465257+=','+_0x4c8c59[_0x9ec3('0x79')];}var _0x40a753=this[_0x9ec3('0xd')][_0x9ec3('0x57')](_0x9ec3('0xb4'),_0x465257);if(_0x40a753[_0x9ec3('0xae')]===-0x1){return _0x40a753;}var _0x3b3d76=this[_0x9ec3('0xa6')](_0x9ec3('0xb5'),_0x9ec3('0xd2'));if(_0x3b3d76[_0x9ec3('0xae')]===-0x1){return _0x3b3d76;}var _0x59aa74=this['getAndSetVariable'](_0x9ec3('0xb7'),'SESTEK_ASR_TRANSCRIPT');if(_0x59aa74[_0x9ec3('0xae')]===-0x1){return _0x59aa74;}var _0x5e30f8=this[_0x9ec3('0xa6')]('RECOG_INSTANCE()',_0x9ec3('0xd3'));if(_0x5e30f8['result']===-0x1){return _0x5e30f8;}return this['channel'][_0x9ec3('0xab')](util[_0x9ec3('0x54')]('Executed\x20command\x20MRCPRecog\x20%s',_0x465257));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0xd4')]=function(_0x12eab9){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0xd5'),_0x12eab9[_0x9ec3('0x36')]));if(!this[_0x9ec3('0x86')](_0x12eab9[_0x9ec3('0xd6')])){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x12eab9,_0x9ec3('0xd7'));}var _0x1b6720=this[_0x9ec3('0xd8')][_0x9ec3('0xa7')](this,_0x12eab9[_0x9ec3('0xd6')]);if(!_0x1b6720){return this['channel'][_0x9ec3('0x2b')](_0x12eab9,'no\x20odbc\x20database\x20found');}if(!this['isConfigured'](_0x12eab9[_0x9ec3('0x2f')])){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x12eab9,'no\x20query\x20configured');}var _0x22e517=_0x12eab9[_0x9ec3('0x2f')][_0x9ec3('0x58')](/(\r\n|\n|\r)/gm,'\x20');this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0xd9'),_0x22e517));var _0x57313b=this[_0x9ec3('0xda')][_0x9ec3('0xa7')](this,_0x1b6720,_0x22e517);this[_0x9ec3('0xdb')][_0x9ec3('0xa7')](this,_0x12eab9,_0x22e517);if(!this[_0x9ec3('0x86')](_0x12eab9[_0x9ec3('0xdc')])){return this[_0x9ec3('0xd')]['noop']('no\x20variable\x20selected\x20for\x20the\x20result');}var _0x2ecb7c=this[_0x9ec3('0xa4')]['sync'](this,_0x12eab9[_0x9ec3('0xdc')]);if(!_0x2ecb7c){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x12eab9,'no\x20variable\x20found');}var _0x121331=this;_0x57313b[_0x9ec3('0xdd')](function(_0x252d62,_0x48abe0){Object['keys'](_0x252d62)[_0x9ec3('0xdd')](function(_0x1e1165){_0x121331[_0x9ec3('0xd')]['setVariable'](util['format'](_0x9ec3('0xde'),_0x2ecb7c,_0x48abe0,_0x1e1165),_0x252d62[_0x1e1165]);});});this['channel'][_0x9ec3('0xa0')](util[_0x9ec3('0x54')]('%s_ROWS_COUNT',_0x2ecb7c),_0x57313b[_0x9ec3('0x9d')]);return this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')]('variable\x20%s\x20set',_0x2ecb7c));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0xdf')]=function(_0x379199){logger[_0x9ec3('0xe0')](util[_0x9ec3('0x54')]('Enter\x20in\x20DIAL\x20(%s)\x20block',_0x379199['label']));if(!this[_0x9ec3('0x86')](_0x379199[_0x9ec3('0xe1')])){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x379199,_0x9ec3('0xe2'));}var _0x3090e9=this[_0x9ec3('0x19')][_0x9ec3('0xa7')](this,_0x379199['sip_id']);if(!_0x3090e9){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x379199,_0x9ec3('0xe3'));}var _0x2e65cf=this[_0x9ec3('0xd')][_0x9ec3('0x57')]('DIAL',[util[_0x9ec3('0x54')](_0x9ec3('0xe4'),_0x3090e9),_0x379199[_0x9ec3('0x66')],_0x379199[_0x9ec3('0xe5')],_0x379199[_0x9ec3('0x64')]]);if(_0x2e65cf[_0x9ec3('0xae')]===-0x1){return _0x2e65cf;}return this[_0x9ec3('0xd')]['noop'](util[_0x9ec3('0x54')](_0x9ec3('0xe6'),_0x9ec3('0xe7')));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0xe8')]=function(_0xd10e34){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0xe9'),_0xd10e34['label']));if(!this[_0x9ec3('0x86')](_0xd10e34[_0x9ec3('0x7b')])){return this[_0x9ec3('0xd')]['noop']('no\x20key\x20configured');}if(!this[_0x9ec3('0x86')](_0xd10e34[_0x9ec3('0x5c')])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0xac'));}this[_0x9ec3('0xd')][_0x9ec3('0xea')]=!![];this[_0x9ec3('0xdb')](_0xd10e34);this[_0x9ec3('0x41')](_0xd10e34[_0x9ec3('0x5c')],'in','','');this['channel'][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0xeb'),_0xd10e34[_0x9ec3('0x5c')]));var _0x16ad23=this[_0x9ec3('0x7a')][_0x9ec3('0xa7')](this,_0xd10e34);if(_0x16ad23){for(var _0xebc4a in _0x16ad23){if(_0x16ad23[_0x9ec3('0x97')](_0xebc4a)){this[_0x9ec3('0xd')][_0x9ec3('0xa0')](util[_0x9ec3('0x54')]('DIALOGFLOW_%s',_0xebc4a[_0x9ec3('0x6a')]()),_0x16ad23[_0xebc4a]);}}this[_0x9ec3('0x41')](_0x16ad23[_0x9ec3('0xec')],_0x9ec3('0xed'),_0x9ec3('0xe8'),'');return this[_0x9ec3('0xd')][_0x9ec3('0xab')](util['format']('Dialogflow\x20Result\x20%s',_0x16ad23[_0x9ec3('0xec')]));}return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0xd10e34,_0x9ec3('0xee'));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0xef')]=function(_0x3d6248){logger[_0x9ec3('0x2d')](util['format']('Enter\x20in\x20DIALOGFLOW\x20V2\x20(%s)\x20block',_0x3d6248['label']));if(!this[_0x9ec3('0x86')](_0x3d6248[_0x9ec3('0x7e')])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0xf0'));}if(!this['isConfigured'](_0x3d6248[_0x9ec3('0x7f')])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0xf1'));}if(!this[_0x9ec3('0x86')](_0x3d6248[_0x9ec3('0xf2')])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0xf3'));}if(!this[_0x9ec3('0x86')](_0x3d6248[_0x9ec3('0x80')])){return this['channel']['noop'](_0x9ec3('0xf4'));}if(!this[_0x9ec3('0x86')](_0x3d6248[_0x9ec3('0x5c')])){return this['channel']['noop']('no\x20text\x20configured');}this[_0x9ec3('0xd')][_0x9ec3('0xea')]=!![];this[_0x9ec3('0xdb')](_0x3d6248);this[_0x9ec3('0x41')](_0x3d6248[_0x9ec3('0x5c')],'in','','');this[_0x9ec3('0xd')]['noop'](util[_0x9ec3('0x54')](_0x9ec3('0xf5'),_0x3d6248['text']));var _0x466fa3=this[_0x9ec3('0x7d')][_0x9ec3('0xa7')](this,_0x3d6248);if(_0x466fa3){for(var _0x59cefe in _0x466fa3){if(_0x466fa3[_0x9ec3('0x97')](_0x59cefe)){if(_0x59cefe!==_0x9ec3('0xf6')){this[_0x9ec3('0xd')][_0x9ec3('0xa0')](util['format'](_0x9ec3('0xf7'),_0x59cefe[_0x9ec3('0x6a')]()),_0x466fa3[_0x59cefe]);}}}this[_0x9ec3('0x41')](_0x466fa3[_0x9ec3('0xec')],_0x9ec3('0xed'),'dialogflowV2',_0x466fa3[_0x9ec3('0xf6')]);return this[_0x9ec3('0xd')]['noop'](util[_0x9ec3('0x54')]('DialogflowV2\x20Result\x20%s',_0x466fa3[_0x9ec3('0xec')]));}return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x3d6248,_0x9ec3('0xf8'));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0xf9')]=function(_0x14b340){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0xfa'),_0x14b340[_0x9ec3('0x36')]));if(!this[_0x9ec3('0x86')](_0x14b340[_0x9ec3('0xfb')])){return this['channel'][_0x9ec3('0xab')](_0x9ec3('0xfc'));}if(!this[_0x9ec3('0x86')](_0x14b340['username'])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0xfd'));}if(!this[_0x9ec3('0x86')](_0x14b340[_0x9ec3('0xfe')])){return this[_0x9ec3('0xd')]['noop']('no\x20password\x20configured');}if(!this[_0x9ec3('0x86')](_0x14b340[_0x9ec3('0xff')])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0xac'));}this[_0x9ec3('0xd')][_0x9ec3('0xea')]=!![];this[_0x9ec3('0xdb')](_0x14b340);this[_0x9ec3('0x41')](_0x14b340['text'],'in','','');this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x100'),_0x14b340[_0x9ec3('0x5c')]));var _0x2e6b2c=this['sestekNDA'][_0x9ec3('0xa7')](this,_0x14b340);if(_0x2e6b2c){for(var _0x5ab381 in _0x2e6b2c){if(_0x2e6b2c[_0x9ec3('0x97')](_0x5ab381)){this[_0x9ec3('0xd')][_0x9ec3('0xa0')](util[_0x9ec3('0x54')]('SESTEK_NDA_%s',_0x5ab381[_0x9ec3('0x6a')]()),_0x2e6b2c[_0x5ab381]);}}this['createSquareMessage'](_0x2e6b2c['speech'],_0x9ec3('0xed'),_0x9ec3('0xf9'),'');if(_0x2e6b2c['audiofile']){this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x101'),_0x2e6b2c[_0x9ec3('0x102')]));var _0x127863=this[_0x9ec3('0xd')][_0x9ec3('0x103')](_0x2e6b2c['audiofile']);try{fs[_0x9ec3('0x104')](_0x2e6b2c[_0x9ec3('0x102')]+_0x9ec3('0x105'));}catch(_0x526195){logger[_0x9ec3('0x2b')](_0x526195);}return _0x127863;}else{return this[_0x9ec3('0xd')]['noop'](util[_0x9ec3('0x54')](_0x9ec3('0x106'),_0x2e6b2c[_0x9ec3('0xec')]));}}return this['channel'][_0x9ec3('0x2b')](_0x14b340,_0x9ec3('0x107'));};AGIVertices['prototype'][_0x9ec3('0x108')]=function(_0x13bb35){logger['info'](util[_0x9ec3('0x54')](_0x9ec3('0x109'),_0x13bb35[_0x9ec3('0x36')]));return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0x108'));};AGIVertices[_0x9ec3('0x10')]['ext_dial']=function(_0x2273f9){logger['info'](util['format'](_0x9ec3('0x10a'),_0x2273f9[_0x9ec3('0x36')]));var _0x48f931='';if(_0x2273f9[_0x9ec3('0x10b')]){if(!this[_0x9ec3('0x86')](_0x2273f9[_0x9ec3('0x10b')])){return this['channel']['error'](_0x2273f9,_0x9ec3('0x10c'));}else{var _0x3b507a=parseInt(_0x2273f9[_0x9ec3('0x10b')],0xa);if(isNaN(_0x3b507a)){_0x48f931=_0x2273f9['trunk_id'];}else{_0x48f931=this[_0x9ec3('0x1b')][_0x9ec3('0xa7')](this,_0x2273f9['trunk_id']);if(!_0x48f931){return this[_0x9ec3('0xd')]['error'](_0x2273f9,_0x9ec3('0x10d'));}}}}else if(_0x2273f9[_0x9ec3('0x10e')]){_0x48f931=_0x2273f9[_0x9ec3('0x10e')];}else{return this[_0x9ec3('0xd')]['error'](_0x2273f9,_0x9ec3('0x10c'));}var _0x4ccbc1=this['channel'][_0x9ec3('0x57')](_0x9ec3('0xe7'),[util[_0x9ec3('0x54')](_0x9ec3('0x10f'),_0x48f931,_0x2273f9[_0x9ec3('0x48')]),_0x2273f9[_0x9ec3('0x66')],_0x2273f9['opts'],_0x2273f9['url']]);if(_0x4ccbc1[_0x9ec3('0xae')]===-0x1){return _0x4ccbc1;}return this[_0x9ec3('0xd')][_0x9ec3('0xab')](util['format'](_0x9ec3('0xe6'),_0x9ec3('0xe7')));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x110')]=function(_0x467d3f){logger['info'](util[_0x9ec3('0x54')](_0x9ec3('0x111'),_0x467d3f[_0x9ec3('0x36')]));return this[_0x9ec3('0xd')][_0x9ec3('0xab')]('finally');};AGIVertices['prototype'][_0x9ec3('0xc')]=function(_0x14ad2b){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x112'),_0x14ad2b[_0x9ec3('0x36')]));if(_0x14ad2b['retry']===0x0){return this[_0x9ec3('0xa9')](_0x14ad2b);}_0x14ad2b['retry']-=0x1;if(!this['isConfigured'](_0x14ad2b[_0x9ec3('0x113')])){return this['channel'][_0x9ec3('0x2b')](_0x14ad2b,_0x9ec3('0x114'));}var _0x4f2998=this[_0x9ec3('0x1d')][_0x9ec3('0xa7')](this,_0x14ad2b['file_id']);if(!_0x4f2998){return this[_0x9ec3('0xd')]['error'](_0x14ad2b,'no\x20file\x20audio\x20found');}if(!this[_0x9ec3('0x86')](_0x14ad2b[_0x9ec3('0xdc')])){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')]('no\x20variable\x20selected\x20for\x20the\x20result');}var _0x14a34b=this[_0x9ec3('0xd')][_0x9ec3('0x115')](_0x4f2998,_0x14ad2b[_0x9ec3('0x116')],_0x14ad2b['maxdigit']);var _0x5b5284=_0x14a34b['result']?_0x14a34b[_0x9ec3('0xae')]['toString']():'';logger[_0x9ec3('0x2d')](_0x9ec3('0x117'),JSON[_0x9ec3('0x73')](_0x14a34b));if(_0x14a34b[_0x9ec3('0xae')]===-0x1){this[_0x9ec3('0xdb')][_0x9ec3('0xa7')](this,_0x14ad2b,_0x5b5284);return _0x14a34b;}else if(_0x14a34b['extra']===_0x9ec3('0x66')){_0x14a34b[_0x9ec3('0xae')]=_0x5b5284['length']>=parseInt(_0x14ad2b[_0x9ec3('0x118')])?'x':'i';}else{_0x14a34b['result']=_0x5b5284[_0x9ec3('0x9d')]>=parseInt(_0x14ad2b[_0x9ec3('0x118')])&&_0x5b5284[_0x9ec3('0x9d')]<=parseInt(_0x14ad2b['maxdigit'])?'x':'i';}var _0x56362b=this[_0x9ec3('0xa4')][_0x9ec3('0xa7')](this,_0x14ad2b[_0x9ec3('0xdc')]);if(!_0x56362b){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x14ad2b,_0x9ec3('0x119'));}this[_0x9ec3('0xd')][_0x9ec3('0xa0')](_0x56362b,_0x5b5284);if(this['isConfigured'](_0x14ad2b[_0x9ec3('0x11a')])){var _0x18f487=parseInt(_0x14ad2b[_0x9ec3('0x11a')],0xa);var _0x4b008e=rs[_0x9ec3('0x11b')]({'charset':'*','length':_0x18f487});var _0x407fca=_0x5b5284[_0x9ec3('0x9d')];if(_0x407fca>0x0){if(_0x407fca>_0x18f487){this[_0x9ec3('0xdb')][_0x9ec3('0xa7')](this,_0x14ad2b,_0x14ad2b[_0x9ec3('0x11c')]===_0x9ec3('0x11d')?_0x4b008e+_0x5b5284[_0x9ec3('0x11e')](_0x18f487):_0x5b5284[_0x9ec3('0x11e')](0x0,_0x407fca-_0x18f487)+_0x4b008e);}else{this[_0x9ec3('0xdb')]['sync'](this,_0x14ad2b,rs[_0x9ec3('0x11b')]({'charset':'*','length':_0x407fca}));}}else{this[_0x9ec3('0xdb')][_0x9ec3('0xa7')](this,_0x14ad2b,'');}}else{this[_0x9ec3('0xdb')][_0x9ec3('0xa7')](this,_0x14ad2b,_0x5b5284);}return _0x14a34b;};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x11f')]=function(_0x33ecf3){logger['info'](util['format'](_0x9ec3('0x120'),_0x33ecf3[_0x9ec3('0x36')]));return this[_0x9ec3('0xc')](_0x33ecf3);};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x121')]=function(_0x2aa113){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x122'),_0x2aa113['label']));this['createSquareDetailsReport'][_0x9ec3('0xa7')](this,_0x2aa113,_0x2aa113[_0x9ec3('0x123')]);return this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x124'),_0x2aa113[_0x9ec3('0x123')]));};AGIVertices[_0x9ec3('0x10')]['awspolly']=function(_0x40dd8e){logger['info'](util[_0x9ec3('0x54')](_0x9ec3('0x125'),_0x40dd8e['label']));if(!this['isConfigured'](_0x40dd8e[_0x9ec3('0x89')])||!this['isConfigured'](_0x40dd8e['aws_secret_access_key'])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0x126'));}if(!this[_0x9ec3('0x86')](_0x40dd8e[_0x9ec3('0x5c')])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0xac'));}this['channel']['noop'](util[_0x9ec3('0x54')](_0x9ec3('0x127'),_0x40dd8e['text']));var _0x454558=this[_0x9ec3('0x88')][_0x9ec3('0xa7')](this,_0x40dd8e);if(_0x454558){this['channel'][_0x9ec3('0xab')](util['format'](_0x9ec3('0x128'),_0x454558));var _0x3ae314=this[_0x9ec3('0xd')][_0x9ec3('0x103')](_0x454558);try{fs[_0x9ec3('0x104')](_0x454558+_0x9ec3('0x105'));}catch(_0x44054f){logger[_0x9ec3('0x2b')](_0x44054f);}return _0x3ae314;}return this['channel'][_0x9ec3('0x2b')](_0x40dd8e,_0x9ec3('0x129'));};AGIVertices['prototype'][_0x9ec3('0x12a')]=function(_0x4c49a1){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x12b'),_0x4c49a1[_0x9ec3('0x36')]));if(!this[_0x9ec3('0x86')](_0x4c49a1['aws_access_key_id'])||!this['isConfigured'](_0x4c49a1[_0x9ec3('0x8e')])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0x126'));}if(!this[_0x9ec3('0x86')](_0x4c49a1['aws_bot_name'])){return this['channel']['noop']('no\x20bot\x20name\x20configured');}if(!this[_0x9ec3('0x86')](_0x4c49a1['text'])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0xac'));}this[_0x9ec3('0xd')]['bot']=!![];this[_0x9ec3('0xdb')](_0x4c49a1);this[_0x9ec3('0x41')](_0x4c49a1[_0x9ec3('0x5c')],'in','','');this['channel']['noop'](util[_0x9ec3('0x54')]('Trying\x20Amazon\x20Lex:\x20%s',_0x4c49a1['text']));var _0x529dc6=this[_0x9ec3('0x8d')][_0x9ec3('0xa7')](this,_0x4c49a1);if(_0x529dc6){for(var _0x15fefd in _0x529dc6){if(_0x529dc6['hasOwnProperty'](_0x15fefd)&&_[_0x9ec3('0x98')](_0x529dc6[_0x15fefd])){this[_0x9ec3('0xd')][_0x9ec3('0xa0')](util[_0x9ec3('0x54')]('AWS_LEX_%s',_0x15fefd[_0x9ec3('0x6a')]()),_0x529dc6[_0x15fefd]);}}if(_[_0x9ec3('0x44')](_0x529dc6[_0x9ec3('0x77')])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0x12c'));}else{this[_0x9ec3('0x41')](_0x529dc6[_0x9ec3('0x77')],_0x9ec3('0xed'),'amazonlex','');return this[_0x9ec3('0xd')]['noop'](util[_0x9ec3('0x54')](_0x9ec3('0x12d'),_0x529dc6[_0x9ec3('0x77')]));}}return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x4c49a1,'Amazon\x20Lex\x20is\x20unreachable');};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x12e')]=function(_0x5d36db){logger[_0x9ec3('0x2d')](util['format'](_0x9ec3('0x12f'),_0x5d36db[_0x9ec3('0x36')],_0x5d36db[_0x9ec3('0x66')]));if(!this['isConfigured'](_0x5d36db['key'])){return this[_0x9ec3('0xd')]['noop'](_0x9ec3('0x130'));}var _0x38de5b=_0x9ec3('0x131');var _0x5ce27b=util['format'](_0x9ec3('0x132'),FILES_PATH,rs['generate'](0x4));var _0x106242=util[_0x9ec3('0x54')]('%s.%s',_0x5ce27b,_0x38de5b);var _0x4f245b=!![];if(_0x5d36db['beep']===_0x9ec3('0x133')){_0x4f245b=![];}var _0x36e3f1=this[_0x9ec3('0xd')][_0x9ec3('0x134')](_0x5ce27b,_0x38de5b,_0x5d36db[_0x9ec3('0x135')],_0x5d36db[_0x9ec3('0x66')],undefined,_0x4f245b);if(_0x36e3f1[_0x9ec3('0xae')]!==-0x1){this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x136'),_0x106242));var _0x21c57a=this[_0x9ec3('0x91')][_0x9ec3('0xa7')](this,_0x5d36db,_0x106242);if(_0x21c57a){for(var _0x709f6a in _0x21c57a){if(_0x21c57a[_0x9ec3('0x97')](_0x709f6a)){this[_0x9ec3('0xd')]['setVariable'](util[_0x9ec3('0x54')](_0x9ec3('0x137'),_0x709f6a[_0x9ec3('0x6a')]()),_0x21c57a[_0x709f6a]);}}return this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x138'),JSON['stringify'](_0x21c57a)));}}return _0x36e3f1;};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x139')]=function(_0x1f4663){logger[_0x9ec3('0x2d')](util['format'](_0x9ec3('0x13a'),_0x1f4663[_0x9ec3('0x36')]));if(!this['isConfigured'](_0x1f4663['appid'])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0x13b'));}if(!this[_0x9ec3('0x86')](_0x1f4663[_0x9ec3('0x94')])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0x13c'));}var _0x5d18e2=_0x9ec3('0x131');var _0x3c5229=util[_0x9ec3('0x54')]('%s/recordings/%s',FILES_PATH,rs[_0x9ec3('0x11b')](0x4));var _0x19f06a=util[_0x9ec3('0x54')](_0x9ec3('0x9f'),_0x3c5229,_0x5d18e2);var _0x52fc43=!![];if(_0x1f4663['beep']==='NOBEEP'){_0x52fc43=![];}var _0x564056=this[_0x9ec3('0xd')][_0x9ec3('0x134')](_0x3c5229,_0x5d18e2,_0x1f4663[_0x9ec3('0x135')],_0x1f4663['timeout'],undefined,_0x52fc43);if(_0x564056[_0x9ec3('0xae')]!==-0x1){this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x13d'),_0x19f06a));var _0x103b96=this['tildeASR'][_0x9ec3('0xa7')](this,_0x1f4663,_0x19f06a);if(_0x103b96){for(var _0x5ef8c5 in _0x103b96){if(_0x103b96[_0x9ec3('0x97')](_0x5ef8c5)){this[_0x9ec3('0xd')][_0x9ec3('0xa0')](util[_0x9ec3('0x54')](_0x9ec3('0x13e'),_0x5ef8c5[_0x9ec3('0x6a')]()),_0x103b96[_0x5ef8c5]);}}return this['channel']['noop'](util['format'](_0x9ec3('0x13f'),JSON['stringify'](_0x103b96)));}}return _0x564056;};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x140')]=function(_0x51be70){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')]('Enter\x20in\x20GOTO\x20(%s)\x20block',_0x51be70[_0x9ec3('0x36')]));return this['channel'][_0x9ec3('0x141')](_0x51be70[_0x9ec3('0x142')],_0x51be70[_0x9ec3('0x3c')],_0x51be70[_0x9ec3('0x3d')]);};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x143')]=function(_0x51d704){logger['info'](util[_0x9ec3('0x54')](_0x9ec3('0x144'),_0x51d704[_0x9ec3('0x36')]));if(!this['isConfigured'](_0x51d704[_0x9ec3('0x145')])){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x51d704,_0x9ec3('0x146'));}try{var _0x1d5792=eval(_0x51d704[_0x9ec3('0x145')])?_0x9ec3('0x147'):_0x9ec3('0x148');this[_0x9ec3('0xd')]['noop'](util['format'](_0x9ec3('0x149'),_0x51d704[_0x9ec3('0x145')],_0x1d5792));return{'code':0xc8,'result':_0x1d5792};}catch(_0x5cf6db){return{'code':0xc8,'result':_0x9ec3('0x148')};}};AGIVertices['prototype'][_0x9ec3('0x14a')]=function(_0x21d95c){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x14b'),_0x21d95c[_0x9ec3('0x36')]));if(!this[_0x9ec3('0x86')](_0x21d95c['interval_id'])){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x21d95c,_0x9ec3('0x14c'));}var _0x54ad8a=this[_0x9ec3('0x24')][_0x9ec3('0xa7')](this,_0x21d95c[_0x9ec3('0x14d')]);if(!_0x54ad8a){return this['channel'][_0x9ec3('0x2b')](_0x21d95c,_0x9ec3('0x14e'));}for(var _0x1e9e3e=0x0;_0x1e9e3e<_0x54ad8a[_0x9ec3('0x9d')];_0x1e9e3e+=0x1){var _0x46136a=this[_0x9ec3('0xd')]['getVariable'](util['format'](_0x9ec3('0x14f'),_0x54ad8a[_0x1e9e3e]));if(_0x46136a[_0x9ec3('0xae')]===-0x1){return _0x46136a;}logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x150'),_0x54ad8a[_0x1e9e3e],_0x46136a[_0x9ec3('0x151')]));if(_0x46136a['extra']==='true'){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x150'),_0x54ad8a[_0x1e9e3e],_0x9ec3('0x147')));this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x150'),_0x54ad8a[_0x1e9e3e],_0x9ec3('0x147')));return{'code':0xc8,'result':_0x9ec3('0x147')};}else{logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x150'),_0x54ad8a[_0x1e9e3e],_0x9ec3('0x148')));this['channel'][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x150'),_0x54ad8a[_0x1e9e3e],'false'));}}return{'code':0xc8,'result':_0x9ec3('0x148')};};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x152')]=function(_0x5ddb5f){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x153'),_0x5ddb5f[_0x9ec3('0x36')]));return this[_0x9ec3('0xd')][_0x9ec3('0x152')]();};AGIVertices['prototype'][_0x9ec3('0x154')]=function(_0x54b848){logger['info'](util['format']('Enter\x20in\x20ISPEECHASR\x20(%s)\x20block',_0x54b848[_0x9ec3('0x36')]));if(!this[_0x9ec3('0x86')](_0x54b848[_0x9ec3('0x7b')])){return this['channel'][_0x9ec3('0xab')]('no\x20key\x20configured');}var _0x33347a=_0x9ec3('0x131');var _0x10aeae=util[_0x9ec3('0x54')](_0x9ec3('0x132'),FILES_PATH,rs['generate'](0x4));var _0x1ea25f=util[_0x9ec3('0x54')](_0x9ec3('0x9f'),_0x10aeae,_0x33347a);var _0x21d022=!![];if(_0x54b848[_0x9ec3('0x155')]===_0x9ec3('0x133')){_0x21d022=![];}var _0x36d3ea=this['channel'][_0x9ec3('0x134')](_0x10aeae,_0x33347a,_0x54b848[_0x9ec3('0x135')],_0x54b848[_0x9ec3('0x66')],undefined,_0x21d022);if(_0x36d3ea[_0x9ec3('0xae')]!==-0x1){this['channel'][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x156'),_0x1ea25f));var _0x41dbcc=this[_0x9ec3('0x84')]['sync'](this,_0x54b848,_0x1ea25f);if(_0x41dbcc){for(var _0x20dc08 in _0x41dbcc){if(_0x41dbcc[_0x9ec3('0x97')](_0x20dc08)){this[_0x9ec3('0xd')][_0x9ec3('0xa0')](util[_0x9ec3('0x54')](_0x9ec3('0x157'),_0x20dc08[_0x9ec3('0x6a')]()),_0x41dbcc[_0x20dc08]);}}return this['channel'][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x158'),JSON['stringify'](_0x41dbcc)));}}return _0x36d3ea;};AGIVertices['prototype'][_0x9ec3('0x159')]=function(_0x541fd1){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')]('Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block',_0x541fd1[_0x9ec3('0x36')]));if(!this[_0x9ec3('0x86')](_0x541fd1[_0x9ec3('0x7b')])){return this['channel'][_0x9ec3('0xab')]('no\x20key\x20configured');}if(!this[_0x9ec3('0x86')](_0x541fd1['text'])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0xac'));}this[_0x9ec3('0xd')]['noop'](util[_0x9ec3('0x54')](_0x9ec3('0x15a'),_0x541fd1[_0x9ec3('0x5c')]));var _0x40f10b=this['ispeechTTS'][_0x9ec3('0xa7')](this,_0x541fd1);if(_0x40f10b){this['channel']['noop'](util[_0x9ec3('0x54')](_0x9ec3('0x156'),_0x40f10b));var _0x4c185b=this['channel']['streamFile'](_0x40f10b,_0x541fd1[_0x9ec3('0x135')]);try{fs[_0x9ec3('0x104')](_0x40f10b+_0x9ec3('0x105'));}catch(_0x21eaa8){logger[_0x9ec3('0x2b')](_0x21eaa8);}return _0x4c185b;}return this[_0x9ec3('0xd')]['error'](_0x541fd1,'ispeech\x20TTS\x20is\x20unreachable');};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x15b')]=function(_0x489958){logger[_0x9ec3('0x2d')](util['format'](_0x9ec3('0x15c'),_0x489958[_0x9ec3('0x36')]));if(!this['isConfigured'](_0x489958[_0x9ec3('0x15d')])){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x489958,_0x9ec3('0x15e'));}logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')]('FIND\x20AGENT\x20%s\x20BY\x20%s',this[_0x9ec3('0xd')][_0x9ec3('0x39')],_0x489958[_0x9ec3('0x15d')]));var _0x137d02=this[_0x9ec3('0x52')][_0x9ec3('0xa7')](this,_0x489958[_0x9ec3('0x15d')]);if(_0x137d02){logger[_0x9ec3('0x2d')](util['format'](_0x9ec3('0x15f'),this['channel'][_0x9ec3('0x39')],_0x489958[_0x9ec3('0x15d')]));this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x15f'),this['channel'][_0x9ec3('0x39')],_0x489958[_0x9ec3('0x15d')]));return{'code':0xc8,'result':'success'};}else{logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x160'),this[_0x9ec3('0xd')]['callerid'],_0x489958[_0x9ec3('0x15d')]));this[_0x9ec3('0xd')]['noop'](util[_0x9ec3('0x54')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0x9ec3('0xd')][_0x9ec3('0x39')],_0x489958[_0x9ec3('0x15d')]));return{'code':0xc8,'result':_0x9ec3('0x161')};}};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x162')]=function(_0x597476){logger[_0x9ec3('0x2d')](util['format'](_0x9ec3('0x163'),_0x597476['label']));if(!this['isConfigured'](_0x597476[_0x9ec3('0x15d')])){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x597476,'no\x20find\x20by\x20configured');}logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x164'),this[_0x9ec3('0xd')][_0x9ec3('0x39')],_0x597476[_0x9ec3('0x15d')]));var _0xc18e08=this[_0x9ec3('0x51')][_0x9ec3('0xa7')](this,_0x597476['findBy']);if(_0xc18e08){logger['info'](util[_0x9ec3('0x54')](_0x9ec3('0x15f'),this[_0x9ec3('0xd')][_0x9ec3('0x39')],_0x597476['findBy']));this['channel']['noop'](util[_0x9ec3('0x54')](_0x9ec3('0x15f'),this['channel'][_0x9ec3('0x39')],_0x597476[_0x9ec3('0x15d')]));return{'code':0xc8,'result':_0x9ec3('0x165')};}else{logger['info'](util[_0x9ec3('0x54')](_0x9ec3('0x160'),this[_0x9ec3('0xd')][_0x9ec3('0x39')],_0x597476[_0x9ec3('0x15d')]));this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0x9ec3('0xd')][_0x9ec3('0x39')],_0x597476[_0x9ec3('0x15d')]));return{'code':0xc8,'result':_0x9ec3('0x161')};}};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x166')]=function(_0x5ae8fc){logger['info'](util[_0x9ec3('0x54')]('Enter\x20in\x20MATH\x20(%s)\x20block',_0x5ae8fc[_0x9ec3('0x36')]));if(!this[_0x9ec3('0x86')](_0x5ae8fc['operation'])){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x5ae8fc,'no\x20operation\x20configured');}this[_0x9ec3('0xd')][_0x9ec3('0xab')](util['format'](_0x9ec3('0x167'),_0x5ae8fc[_0x9ec3('0x168')]));var _0x417a73=eval(_0x5ae8fc[_0x9ec3('0x168')]);if(!this[_0x9ec3('0x86')](_0x5ae8fc[_0x9ec3('0xdc')])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0x169'));}var _0x568065=this[_0x9ec3('0xa4')][_0x9ec3('0xa7')](this,_0x5ae8fc[_0x9ec3('0xdc')]);if(!_0x568065){return this[_0x9ec3('0xd')]['error'](_0x5ae8fc,_0x9ec3('0x119'));}if(_[_0x9ec3('0x9c')](_0x417a73)){var _0x301159=this;_0x417a73[_0x9ec3('0xdd')](function(_0x1fbce6,_0x1af158){_0x301159[_0x9ec3('0xd')][_0x9ec3('0xa0')](util['format'](_0x9ec3('0x16a'),_0x568065,_0x1af158),_0x1fbce6);});return this['channel'][_0x9ec3('0xab')](util[_0x9ec3('0x54')]('variable\x20%s[key]\x20set',_0x568065));}else{return this[_0x9ec3('0xd')][_0x9ec3('0xa0')](_0x568065,_0x417a73);}};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0xb')]=function(_0x56dd18){logger['info'](util[_0x9ec3('0x54')](_0x9ec3('0x16b'),_0x56dd18[_0x9ec3('0x36')]));if(_0x56dd18[_0x9ec3('0xa8')]===0x0){return this[_0x9ec3('0xa9')](_0x56dd18);}_0x56dd18[_0x9ec3('0xa8')]-=0x1;if(!this[_0x9ec3('0x86')](_0x56dd18['file_id'])){return this[_0x9ec3('0xd')]['error'](_0x56dd18,_0x9ec3('0x114'));}var _0x379aed=this['getSound'][_0x9ec3('0xa7')](this,_0x56dd18['file_id']);if(!_0x379aed){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x56dd18,_0x9ec3('0x16c'));}var _0x1aaf8c=this['channel'][_0x9ec3('0x115')](_0x379aed,_0x56dd18['response'],_0x56dd18[_0x9ec3('0x16d')]);var _0x53f208=_0x1aaf8c['result'];if(_0x1aaf8c[_0x9ec3('0xae')]===-0x1){this[_0x9ec3('0xdb')][_0x9ec3('0xa7')](this,_0x56dd18,'-1');return _0x1aaf8c;}else if(_0x1aaf8c[_0x9ec3('0x151')]===_0x9ec3('0x66')){_0x1aaf8c[_0x9ec3('0xae')]=_0x1aaf8c[_0x9ec3('0xae')][_0x9ec3('0x9d')]>0x0?_0x1aaf8c[_0x9ec3('0xae')]:'t';}else if(_[_0x9ec3('0x43')](_0x1aaf8c[_0x9ec3('0xae')])){_0x1aaf8c[_0x9ec3('0xae')]='#';_0x53f208='#';}if(!this['isConfigured'](_0x56dd18[_0x9ec3('0xdc')])){this['channel'][_0x9ec3('0xab')]('no\x20variable\x20selected\x20for\x20the\x20result');}else{var _0x443a3b=this[_0x9ec3('0xa4')][_0x9ec3('0xa7')](this,_0x56dd18['variable_id']);if(!_0x443a3b){return this['channel'][_0x9ec3('0x2b')](_0x56dd18,_0x9ec3('0x119'));}this[_0x9ec3('0xd')][_0x9ec3('0xa0')](_0x443a3b,_0x53f208);}this['createSquareDetailsReport'][_0x9ec3('0xa7')](this,_0x56dd18,_0x53f208);return _0x1aaf8c;};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0xab')]=function(_0x3fa738){logger[_0x9ec3('0x2d')](util['format'](_0x9ec3('0x16e'),_0x3fa738[_0x9ec3('0x36')]));return this[_0x9ec3('0xd')]['noop'](_0x3fa738[_0x9ec3('0x16f')]||_0x3fa738[_0x9ec3('0x36')]);};AGIVertices[_0x9ec3('0x10')]['pause']=function(_0x4a47a9){logger['info'](util[_0x9ec3('0x54')](_0x9ec3('0x170'),_0x4a47a9[_0x9ec3('0x36')]));if(!this[_0x9ec3('0x86')](_0x4a47a9['findBy'])){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x4a47a9,_0x9ec3('0x15e'));}logger['info'](util[_0x9ec3('0x54')](_0x9ec3('0x164'),this[_0x9ec3('0xd')][_0x9ec3('0x39')],_0x4a47a9[_0x9ec3('0x15d')]));var _0x43e876=this[_0x9ec3('0x4d')]['sync'](this,_0x4a47a9[_0x9ec3('0x171')]);var _0x782c27=this[_0x9ec3('0x4e')][_0x9ec3('0xa7')](this,_0x4a47a9[_0x9ec3('0x15d')],_0x43e876);if(_0x782c27){logger[_0x9ec3('0x2d')](util['format'](_0x9ec3('0x15f'),this[_0x9ec3('0xd')]['callerid'],_0x4a47a9[_0x9ec3('0x15d')]));this['channel'][_0x9ec3('0xab')](util['format']('AGENT\x20%s\x20FOUND\x20BY',this[_0x9ec3('0xd')][_0x9ec3('0x39')],_0x4a47a9[_0x9ec3('0x15d')]));return{'code':0xc8,'result':'success'};}else{logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x160'),this[_0x9ec3('0xd')]['callerid'],_0x4a47a9[_0x9ec3('0x15d')]));this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x15f'),this[_0x9ec3('0xd')][_0x9ec3('0x39')],_0x4a47a9[_0x9ec3('0x15d')]));return{'code':0xc8,'result':_0x9ec3('0x161')};}};AGIVertices['prototype'][_0x9ec3('0x172')]=function(_0x5c2973){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x173'),_0x5c2973[_0x9ec3('0x36')]));if(!this[_0x9ec3('0x86')](_0x5c2973[_0x9ec3('0x113')])){return this['channel'][_0x9ec3('0x2b')](_0x5c2973,_0x9ec3('0x114'));}var _0x5e535c=this[_0x9ec3('0x1d')][_0x9ec3('0xa7')](this,_0x5c2973['file_id']);if(!_0x5e535c){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x5c2973,'no\x20file\x20audio\x20found');}var _0x2b2c24=this[_0x9ec3('0xd')][_0x9ec3('0x57')](_0x9ec3('0x174'),[_0x5e535c,_0x5c2973[_0x9ec3('0xe5')]]);if(_0x2b2c24['result']===-0x1){return _0x2b2c24;}return this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x175'),_0x9ec3('0x174'),_0x5e535c));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x176')]=function(_0x53f036){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x177'),_0x53f036[_0x9ec3('0x36')]));if(!this[_0x9ec3('0x86')](_0x53f036[_0x9ec3('0x178')])){return this[_0x9ec3('0xd')]['error'](_0x53f036,_0x9ec3('0x179'));}var _0x5c1b38='';var _0x4a4ede=parseInt(_0x53f036[_0x9ec3('0x178')],0xa);if(isNaN(_0x4a4ede)){_0x5c1b38=_0x53f036['queue_id'];}else{_0x5c1b38=this['getVoiceQueue'][_0x9ec3('0xa7')](this,_0x53f036[_0x9ec3('0x178')]);if(!_0x5c1b38){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x53f036,_0x9ec3('0x17a'));}}var _0x1990c5='';if(this[_0x9ec3('0x86')](_0x53f036[_0x9ec3('0x113')])){var _0x30a67c=this['getSound'][_0x9ec3('0xa7')](this,_0x53f036[_0x9ec3('0x113')]);if(_0x30a67c){_0x1990c5=_0x30a67c;}}this[_0x9ec3('0xdb')][_0x9ec3('0xa7')](this,_0x53f036,_0x5c1b38);if(_0x53f036[_0x9ec3('0xe5')][_0x9ec3('0x17b')]('x')<0x0){_0x53f036[_0x9ec3('0xe5')]+='x';}if(_0x53f036['opts'][_0x9ec3('0x17b')]('X')<0x0){_0x53f036[_0x9ec3('0xe5')]+='X';}this[_0x9ec3('0xd')][_0x9ec3('0xa0')]('XMCS-QUEUE',_0x5c1b38?_0x5c1b38[_0x9ec3('0x17c')]():'');var _0x2b4869=this[_0x9ec3('0xd')][_0x9ec3('0x57')](_0x9ec3('0x17d'),[_0x5c1b38,_0x53f036[_0x9ec3('0xe5')],_0x53f036['url'],_0x1990c5,_0x53f036[_0x9ec3('0x66')],_0x53f036[_0x9ec3('0x8')],_0x53f036[_0x9ec3('0x17e')],_0x53f036[_0x9ec3('0x17f')],'',_0x53f036[_0x9ec3('0x180')]]);if(_0x2b4869['result']===-0x1){return _0x2b4869;}return this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x175'),'QUEUE',_0x5c1b38));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x181')]=function(_0x24c50e){logger['info'](util['format'](_0x9ec3('0x182'),_0x24c50e[_0x9ec3('0x36')]));var _0x5cc028=_0x24c50e[_0x9ec3('0x183')]||_0x9ec3('0x131');var _0x195eb6=util[_0x9ec3('0x54')](_0x9ec3('0x184'),this[_0x9ec3('0xd')][_0x9ec3('0x50')],rs[_0x9ec3('0x11b')](0x5));var _0x538a2b=util[_0x9ec3('0x54')](_0x9ec3('0x185'),FILES_PATH,_0x195eb6,_0x5cc028);var _0x11978d=util[_0x9ec3('0x54')]('%s/recordings/%s',FILES_PATH,_0x195eb6);this[_0x9ec3('0x3a')][_0x9ec3('0xa7')](this,_0x24c50e,_0x195eb6,_0x538a2b);this[_0x9ec3('0xd')][_0x9ec3('0xa0')](_0x9ec3('0x186'),_0x195eb6);logger[_0x9ec3('0x2d')]('Recording\x20%s\x20%s\x20%s\x20%s',_0x11978d,_0x5cc028,_0x24c50e[_0x9ec3('0x187')],_0x24c50e[_0x9ec3('0x66')]);return this['channel'][_0x9ec3('0x134')](_0x11978d,_0x5cc028,_0x24c50e[_0x9ec3('0x187')],_0x24c50e['timeout'],undefined,!![]);};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x188')]=function(_0x15d92d){logger[_0x9ec3('0x2d')](util['format'](_0x9ec3('0x189'),_0x15d92d[_0x9ec3('0x36')]));if(!this[_0x9ec3('0x86')](_0x15d92d[_0x9ec3('0x64')])){return this[_0x9ec3('0xd')]['noop'](_0x9ec3('0x18a'));}var _0xe067d9=this['restAPI'][_0x9ec3('0xa7')](this,_0x15d92d);logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')]('Response:',util['inspect'](_0xe067d9,{'showHidden':![],'depth':null})));if(!this['isConfigured'](_0x15d92d[_0x9ec3('0xdc')])){return this[_0x9ec3('0xd')]['noop'](_0x9ec3('0x18b'));}var _0x46173b=this[_0x9ec3('0xa4')][_0x9ec3('0xa7')](this,_0x15d92d[_0x9ec3('0xdc')]);if(!_0x46173b){return this['channel'][_0x9ec3('0x2b')](_0x15d92d,_0x9ec3('0x119'));}this[_0x9ec3('0xd')]['setVariable'](util[_0x9ec3('0x54')](_0x9ec3('0x18c'),_0x46173b),_0xe067d9[_0x9ec3('0x76')]?_0xe067d9[_0x9ec3('0x76')]:_0x9ec3('0x18d'));this[_0x9ec3('0xd')][_0x9ec3('0xa0')](util[_0x9ec3('0x54')](_0x9ec3('0x18e'),_0x46173b),_0xe067d9[_0x9ec3('0x18f')]?_0xe067d9['statusMessage']:'OK');if(_0xe067d9[_0x9ec3('0x74')]){try{this[_0x9ec3('0x9e')](_0xe067d9['body'],_0x46173b);}catch(_0x4a1d8c){logger[_0x9ec3('0x2b')](util['format']('Unable\x20to\x20set\x20result\x20in\x20variable\x20%s',_0x46173b));}}return this[_0x9ec3('0xd')]['noop'](util[_0x9ec3('0x54')](_0x9ec3('0x190'),_0x46173b));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x191')]=function(_0x1f30ec){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x192'),_0x1f30ec[_0x9ec3('0x36')]));return this[_0x9ec3('0xd')]['sayDigits'](_0x1f30ec[_0x9ec3('0x193')][_0x9ec3('0x58')](/\s+/g,''),_0x1f30ec['escape_digits']);};AGIVertices['prototype'][_0x9ec3('0x194')]=function(_0x3aa3f0){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x195'),_0x3aa3f0['label']));return this[_0x9ec3('0xd')][_0x9ec3('0x196')](_0x3aa3f0['number']['replace'](/\s+/g,''),_0x3aa3f0['escape_digits']);};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x197')]=function(_0x11aa1a){logger['info'](util[_0x9ec3('0x54')](_0x9ec3('0x198'),_0x11aa1a[_0x9ec3('0x36')]));return this['channel'][_0x9ec3('0x199')](_0x11aa1a[_0x9ec3('0x5c')],_0x11aa1a['escape_digits']);};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x19a')]=function(_0x27bc2d){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')]('Enter\x20in\x20SENDMAIL\x20(%s)\x20block',_0x27bc2d['label']));if(!this[_0x9ec3('0x86')](_0x27bc2d[_0x9ec3('0x19b')])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')]('no\x20mail\x20account\x20configured');}var _0x3a2868=this[_0x9ec3('0x21')][_0x9ec3('0xa7')](this,_0x27bc2d[_0x9ec3('0x19b')]);if(!_0x3a2868||!_0x3a2868[_0x9ec3('0x19c')]){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x27bc2d,_0x9ec3('0x19d'));}var _0x3471e0={'from':util[_0x9ec3('0x54')](_0x9ec3('0x19e'),_0x3a2868['name'],_0x3a2868['email']||_0x3a2868[_0x9ec3('0x19c')][_0x9ec3('0x19f')]),'to':_0x27bc2d['to']||'','cc':_0x27bc2d['cc']||'','bcc':_0x27bc2d['bcc']||'','subject':_0x27bc2d[_0x9ec3('0x1a0')],'html':_0x27bc2d['text'],'text':_0x27bc2d[_0x9ec3('0x5c')]};if(this[_0x9ec3('0x86')](_0x27bc2d['template_id'])){}logger[_0x9ec3('0xe0')]('sendMail\x20message',JSON[_0x9ec3('0x73')](_0x3471e0));this[_0x9ec3('0xdb')][_0x9ec3('0xa7')](this,_0x27bc2d,_0x27bc2d[_0x9ec3('0x19b')]);this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x1a1'),_0x3a2868['name']));this['sendMailMessage'][_0x9ec3('0xa7')](this,_0x3a2868['smtpOptions'],_0x3471e0);return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0x1a2'));};AGIVertices[_0x9ec3('0x10')]['sendFax']=function(_0x3fa3ef){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x1a3'),_0x3fa3ef[_0x9ec3('0x36')]));return this[_0x9ec3('0xd')]['noop'](_0x9ec3('0x1a4'));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x1a5')]=function(_0x2221db){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x1a6'),_0x2221db[_0x9ec3('0x36')]));if(!this[_0x9ec3('0x86')](_0x2221db['sms_account_id'])){return this['channel'][_0x9ec3('0xab')]('no\x20sms\x20account\x20configured');}var _0x13f35e=this[_0x9ec3('0x33')][_0x9ec3('0xa7')](this,_0x2221db['sms_account_id']);if(!_0x13f35e){return this['channel'][_0x9ec3('0x2b')](_0x2221db,_0x9ec3('0x1a7'));}var _0x3f149f={'body':_0x2221db[_0x9ec3('0x1a8')],'phone':_0x2221db['to']||'','SmsAccountId':_0x13f35e['id']};logger[_0x9ec3('0xe0')](_0x9ec3('0x1a9'),JSON[_0x9ec3('0x73')](_0x3f149f));this[_0x9ec3('0xdb')]['sync'](this,_0x2221db,_0x2221db['sms_account_id']);this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x1aa'),_0x13f35e[_0x9ec3('0x13')]));this[_0x9ec3('0x35')]['sync'](this,_0x3f149f);return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0x1ab'));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x1ac')]=function(_0x353a24){logger['info'](util['format'](_0x9ec3('0x1ad'),_0x353a24['label']));if(!this[_0x9ec3('0x86')](_0x353a24[_0x9ec3('0xdc')])){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x353a24,'no\x20variable\x20selected');}var _0x33d41d=this[_0x9ec3('0xa4')]['sync'](this,_0x353a24[_0x9ec3('0xdc')]);if(!_0x33d41d){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x353a24,_0x9ec3('0x119'));}return this['channel'][_0x9ec3('0xa0')](_0x33d41d,_0x353a24[_0x9ec3('0x1ae')]);};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x1af')]=function(_0xddee15){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x1b0'),_0xddee15[_0x9ec3('0x36')]));this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0x1b1'));var _0x212f78=this[_0x9ec3('0xd')][_0x9ec3('0xa4')](_0x9ec3('0x1b2'));if(!_[_0x9ec3('0x43')](_0x212f78[_0x9ec3('0x151')])){this[_0x9ec3('0xd')]['uniqueid']=_0x212f78[_0x9ec3('0x151')];}if(_0xddee15['answer']===_0x9ec3('0x1b3')){this['channel'][_0x9ec3('0xab')](_0x9ec3('0x1b4'));return this[_0x9ec3('0xd')][_0x9ec3('0xbf')]();}return this[_0x9ec3('0xd')]['noop'](_0x9ec3('0x1b5'));};AGIVertices[_0x9ec3('0x10')]['subproject']=function(_0x4d918a){logger['info'](util['format'](_0x9ec3('0x1b6'),_0x4d918a[_0x9ec3('0x36')]));if(!this[_0x9ec3('0x86')](_0x4d918a['project_id'])){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x4d918a,_0x9ec3('0x1b7'));}var _0x510ffc=this[_0x9ec3('0x17')][_0x9ec3('0xa7')](this,_0x4d918a['project_id']);if(!this[_0x9ec3('0x86')](_0x510ffc)){return this['channel'][_0x9ec3('0x2b')](_0x4d918a,util['format'](_0x9ec3('0x1b8'),_0x4d918a[_0x9ec3('0x1b9')]));}if(_0x510ffc===this[_0x9ec3('0xd')][_0x9ec3('0x38')]){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x4d918a,_0x9ec3('0x1ba'));}this['createSquareDetailsReport'][_0x9ec3('0xa7')](this,_0x4d918a,_0x510ffc);var _0x330d3d=this[_0x9ec3('0xd')]['exec']('AGI',util[_0x9ec3('0x54')]('agi://%s/square,\x22%s\x22,\x22%s\x22',config[_0x9ec3('0x8')]['host']||_0x9ec3('0x1bb'),_0x510ffc,this['channel']['arg_1']));if(_0x330d3d[_0x9ec3('0xae')]===-0x1){return _0x330d3d;}return this['channel']['noop'](util['format'](_0x9ec3('0x175'),'AGI',_0x510ffc));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x1bc')]=function(_0x54b21d){logger['info'](util[_0x9ec3('0x54')](_0x9ec3('0x1bd'),_0x54b21d[_0x9ec3('0x36')]));var _0x416181=this['shellCommand'][_0x9ec3('0xa7')](this,_0x54b21d[_0x9ec3('0xbd')]);this[_0x9ec3('0xdb')][_0x9ec3('0xa7')](this,_0x54b21d,_0x54b21d[_0x9ec3('0xbd')]);if(this[_0x9ec3('0x86')](_0x54b21d[_0x9ec3('0xdc')])){var _0x231289=this[_0x9ec3('0xa4')][_0x9ec3('0xa7')](this,_0x54b21d[_0x9ec3('0xdc')]);if(_0x231289){this['channel'][_0x9ec3('0xa0')](_0x231289,_0x416181);return this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')]('sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s',_0x54b21d[_0x9ec3('0xbd')],_0x231289));}}return this[_0x9ec3('0xd')]['noop'](util[_0x9ec3('0x54')](_0x9ec3('0x1be'),_0x54b21d[_0x9ec3('0xbd')]));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x1bf')]=function(_0x440133){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x1c0'),_0x440133[_0x9ec3('0x36')]));_0x440133[_0x9ec3('0x5c')]=_0x440133['text'][_0x9ec3('0x58')](/(\r\n|\n|\r)/gm,'\x20');if(!this[_0x9ec3('0x86')](_0x440133['apiKey'])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0x1c1'));}if(!this[_0x9ec3('0x86')](_0x440133[_0x9ec3('0x5c')])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')](_0x9ec3('0xac'));}this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x1c2'),_0x440133[_0x9ec3('0x5c')]));var _0x293723=this[_0x9ec3('0x59')][_0x9ec3('0xa7')](this,_0x440133);if(_0x293723){this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x1c3'),_0x293723));var _0x5d224a=this[_0x9ec3('0xd')][_0x9ec3('0x103')](_0x293723);try{fs['unlink'](_0x293723+_0x9ec3('0x105'));}catch(_0x5fd47f){logger[_0x9ec3('0x2b')](_0x5fd47f);}return _0x5d224a;}return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x440133,_0x9ec3('0x1c4'));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x1c5')]=function(_0x1676a1){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')]('Enter\x20in\x20GOOGLETTS\x20(%s)\x20block',_0x1676a1[_0x9ec3('0x36')]));_0x1676a1[_0x9ec3('0x5c')]=_0x1676a1[_0x9ec3('0x5c')][_0x9ec3('0x58')](/(\r\n|\n|\r)/gm,'\x20');if(!this['isConfigured'](_0x1676a1['text'])){return this[_0x9ec3('0xd')][_0x9ec3('0xab')]('no\x20text\x20configured');}this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x1c6'),_0x1676a1[_0x9ec3('0x5c')]));var _0x2319e0=this['googleTTS'][_0x9ec3('0xa7')](this,_0x1676a1);if(_0x2319e0){this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x1c7'),_0x2319e0));var _0x3bdc82=this['channel']['streamFile'](_0x2319e0);try{fs[_0x9ec3('0x104')](_0x2319e0+_0x9ec3('0x105'));}catch(_0x2105ec){logger[_0x9ec3('0x2b')](_0x2105ec);}return _0x3bdc82;}return this[_0x9ec3('0xd')]['error'](_0x1676a1,_0x9ec3('0x1c8'));};AGIVertices[_0x9ec3('0x10')][_0x9ec3('0x1c9')]=function(_0x493194){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')]('Enter\x20in\x20UNPAUSE\x20(%s)\x20block',_0x493194[_0x9ec3('0x36')]));if(!this[_0x9ec3('0x86')](_0x493194[_0x9ec3('0x15d')])){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x493194,_0x9ec3('0x15e'));}logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x164'),this[_0x9ec3('0xd')][_0x9ec3('0x39')],_0x493194[_0x9ec3('0x15d')]));var _0x2ba433=this[_0x9ec3('0x1ca')]['sync'](this,_0x493194[_0x9ec3('0x15d')]);if(_0x2ba433){logger['info'](util['format'](_0x9ec3('0x15f'),this[_0x9ec3('0xd')][_0x9ec3('0x39')],_0x493194[_0x9ec3('0x15d')]));this[_0x9ec3('0xd')]['noop'](util['format'](_0x9ec3('0x15f'),this['channel'][_0x9ec3('0x39')],_0x493194[_0x9ec3('0x15d')]));return{'code':0xc8,'result':_0x9ec3('0x165')};}else{logger['info'](util[_0x9ec3('0x54')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0x9ec3('0xd')][_0x9ec3('0x39')],_0x493194[_0x9ec3('0x15d')]));this[_0x9ec3('0xd')]['noop'](util[_0x9ec3('0x54')](_0x9ec3('0x160'),this[_0x9ec3('0xd')][_0x9ec3('0x39')],_0x493194[_0x9ec3('0x15d')]));return{'code':0xc8,'result':_0x9ec3('0x161')};}};AGIVertices[_0x9ec3('0x10')]['voicemail']=function(_0x25b582){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')](_0x9ec3('0x1cb'),_0x25b582[_0x9ec3('0x36')]));var _0xcc4749=this[_0x9ec3('0xd')][_0x9ec3('0x57')](_0x9ec3('0x1cc'),[_0x25b582[_0x9ec3('0x1cd')],_0x25b582['options']]);if(_0xcc4749['result']===-0x1){return _0xcc4749;}return this[_0x9ec3('0xd')][_0x9ec3('0xab')](util[_0x9ec3('0x54')](_0x9ec3('0x175'),'VOICEMAIL',_0x25b582[_0x9ec3('0x1cd')]));};AGIVertices['prototype'][_0x9ec3('0x1ce')]=function(_0x14907f){logger[_0x9ec3('0x2d')](util[_0x9ec3('0x54')]('Enter\x20in\x20SWITCH\x20(%s)\x20block',_0x14907f[_0x9ec3('0x36')]));if(!this['isConfigured'](_0x14907f['variable_id'])){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x14907f,_0x9ec3('0x1cf'));}var _0x1f2295=this['getVariable']['sync'](this,_0x14907f['variable_id']);if(!_0x1f2295){return this[_0x9ec3('0xd')][_0x9ec3('0x2b')](_0x14907f,_0x9ec3('0x119'));}var _0x572d4f=this['channel'][_0x9ec3('0xa4')](_0x1f2295);return{'code':0xc8,'result':_0x572d4f[_0x9ec3('0x151')]?_0x572d4f[_0x9ec3('0x151')]:'-'};};String[_0x9ec3('0x10')][_0x9ec3('0xa3')]=function(_0x3b5384,_0xd42c2b){return this[_0x9ec3('0xa2')](_0x3b5384)[_0x9ec3('0x1d0')](_0xd42c2b);};module[_0x9ec3('0x1d1')]=AGIVertices;
\ No newline at end of file
+var _0x4bc3=['exec','trim','googleCloudTTS','apiKey','google_cloud_tts_text_type','text','en-US','ssmlGender','MALE','audioEncoding','MP3','googleTTS','google_tts_language','restAPI','url','method','timeout','includes','POST','PUT','body','rawHeaders','An\x20incorrect\x20formatted\x20json\x20headers\x20has\x20been\x20passed\x20to\x20the\x20function','computedVariables','sync','uri','render','headers','parse','stringify','An\x20incorrect\x20formatted\x20json\x20has\x20been\x20passed\x20to\x20the\x20function','statusCode','message','500\x20-\x20Internal\x20Server\x20Error','options','googleDialogflow','key','dialogflow_language','googleDialogflowV2','dialogflowV2_project_id','client_email','private_key','dialogflowV2_language','sestekNDA','ispeechTTS','speed','ispeechASR','ispeech_asr_language','isConfigured','model','awsPolly','aws_access_key_id','aws_secret_access_key','aws_polly_region','Amy','awsLex','aws_lex_region','googleASR','google_asr_language','tildeASR','appid','appsecret','clear','clone','isString','replaceObjectAllVariables','replaceAllVariables','recursiveNodeIndex','hasOwnProperty','isPlainObject','length','saveRestApiResult','isEmpty','%s.%s','isArray','setVariable','extra','getAndSetVariable','result','The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s','maxRetry','retry','mrcpsynth','Enter\x20in\x20MRCPSynth\x20(%s)\x20block','label','noop','no\x20text\x20configured','Executed\x20command\x20MRCPSynth\x20%s','no\x20grammar\x20configured','grammar','MRCPRecog','RECOG_CONFIDENCE()','MRCP_RECOG_TRANSCRIPT','RECOG_INSTANCE()','Enter\x20in\x20AGI\x20(%s)\x20block','command','args','Enter\x20in\x20ANSWER\x20(%s)\x20block','Wait\x20%s\x20seconds\x20before\x20answer','answer','scheduledAt','minutes','CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s','custom_app','Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block','application','lumenvoxtts','MRCPSynth','sestektts','Enter\x20in\x20SESTEKTTS\x20(%s)\x20block','lumenvoxasr','RECOG_INPUT()','LUMENVOX_ASR_TRANSCRIPT','LUMENVOX_ASR_INSTANCE','Executed\x20command\x20MRCPRecog\x20%s','Enter\x20in\x20SESTEKASR\x20(%s)\x20block','SESTEK_ASR_TRANSCRIPT','SESTEK_ASR_INSTANCE','database','Enter\x20in\x20DATABASE\x20(%s)\x20block','odbc_id','no\x20odbc\x20database\x20found','no\x20query\x20configured','replace','variable_id','no\x20variable\x20selected\x20for\x20the\x20result','no\x20variable\x20found','forEach','%s[%s][%s]','%s_ROWS_COUNT','variable\x20%s\x20set','dial','Enter\x20in\x20DIAL\x20(%s)\x20block','sip_id','no\x20user\x20selected','no\x20user\x20found','DIAL','SIP/%s','Executed\x20command\x20%s','dialogflow','no\x20key\x20configured','DIALOGFLOW_%s','out','Dialogflow\x20Result\x20%s','Dialogflow\x20is\x20unreachable','dialogflowV2','no\x20client_email\x20configured','no\x20private_key\x20configured','bot','providerResponse','speech','DialogflowV2\x20Result\x20%s','DialogflowV2\x20is\x20unreachable','Enter\x20in\x20SESTEKNDA\x20(%s)\x20block','ndauth_url','username','no\x20username\x20configured','password','ndassistant_url','Trying\x20SestekNDA:\x20%s','SESTEK_NDA_%s','toUpperCase','audiofile','Sestek\x20NDA\x20%s\x20file\x20created','unlink','SestekNDA\x20is\x20unreachable','end','Enter\x20in\x20END\x20(%s)\x20block','ext_dial','Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block','trunk_id','no\x20trunk\x20selected','trunk_name','SIP/%s/%s','opts','Enter\x20in\x20FINALLY\x20(%s)\x20block','getdigits','Enter\x20in\x20GETDIGITS\x20(%s)\x20block','no\x20file\x20audio\x20selected','getSound','file_id','no\x20file\x20audio\x20found','getData','response','maxdigit','test','mindigit','hiddendigitsnum','generate','first','substr','Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block','goal','Enter\x20in\x20GOAL\x20(%s)\x20block','goalname','GOAL\x20%s','[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block','no\x20valid\x20credentials\x20configured','Trying\x20aws\x20Polly\x20%s','streamFile','aws\x20Polly\x20is\x20unreachable','awslex','Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block','aws_bot_name','no\x20bot\x20name\x20configured','Trying\x20Amazon\x20Lex:\x20%s','AWS_LEX_%s','amazonlex','Amazon\x20Lex\x20Result\x20%s','Amazon\x20Lex\x20is\x20unreachable','googleasr','Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s','%s/recordings/%s','beep','NOBEEP','recordFile','google\x20%s\x20file\x20created','GOOGLE_ASR_%s','Enter\x20in\x20TILDEASR\x20(%s)\x20block','no\x20appid\x20configured','no\x20appsecret\x20configured','tilde\x20%s\x20file\x20created','TILDE_ASR_%s','TildeASR\x20Result\x20%s','gotoc','Enter\x20in\x20GOTO\x20(%s)\x20block','continueAt','extension','gotoif','Enter\x20in\x20GOTOIF\x20(%s)\x20block','true','false','EVAL\x20CONDITION\x20%s\x20%s','condition','gotoiftime','Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block','interval_id','no\x20interval\x20configured','getIntervals','IFTIME(%s?true:false)','IFTIME\x20%s\x20%s','hangup','Enter\x20in\x20HANGUP\x20(%s)\x20block','ispeechasr','Enter\x20in\x20ISPEECHASR\x20(%s)\x20block','intKey','ispeech\x20%s\x20file\x20created','ISPEECH_ASR_%s','IspeechASR\x20Result\x20%s','ispeechtts','Trying\x20ispeech\x20TTS\x20%s','.wav','Enter\x20in\x20LOGIN\x20(%s)\x20block','findBy','AGENT\x20%s\x20FOUND\x20BY','success','AGENT\x20%s\x20NOT\x20FOUND\x20BY','failure','logout','FIND\x20AGENT\x20%s\x20BY\x20%s','Enter\x20in\x20MATH\x20(%s)\x20block','math\x20%s','operation','%s[%s]','variable\x20%s[key]\x20set','menu','digit','Enter\x20in\x20NOOP\x20(%s)\x20block','no\x20find\x20by\x20configured','pause_id','playback','Enter\x20in\x20PLAYBACK\x20(%s)\x20block','PLAYBACK','Executed\x20command\x20%s\x20%s','queue','Enter\x20in\x20QUEUE\x20(%s)\x20block','queue_id','no\x20queue\x20selected','getVoiceQueue','no\x20queue\x20found','indexOf','XMCS-QUEUE','toLowerCase','QUEUE','gosub','Enter\x20in\x20RECORD\x20(%s)\x20block','%s_%s','RECORDING_SAVENAME','escape_digits','Response:','inspect','no\x20variable\x20selected\x20for\x20the\x20response','200','%s_STATUS_MESSAGE','statusMessage','Unable\x20to\x20set\x20result\x20in\x20variable\x20%s','saydigits','sayDigits','digits','saynumber','Enter\x20in\x20SAYNUMBER\x20(%s)\x20block','sayNumber','number','sayPhonetic','sendMail','Enter\x20in\x20SENDMAIL\x20(%s)\x20block','account_id','no\x20mail\x20account\x20configured','getMailAccount','Smtp','no\x20mail\x20account\x20found','\x22%s\x22\x20<%s>','email','user','template_id','debug','sendMail\x20message','Trying\x20SendMail\x20with\x20account\x20%s','smtpOptions','Enter\x20in\x20SENDFAX\x20(%s)\x20block','SENDFAX\x20block\x20not\x20implemented','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','variable_value','start','START\x20CALLY\x20SQUARE','Answer','Skipped\x20Answer','subproject','Enter\x20in\x20SUBPROJECT\x20(%s)\x20block','project_id','no\x20subproject\x20selected','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','127.0.0.1','Enter\x20in\x20SYSTEM\x20(%s)\x20block','sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s','google_cloud_tts','no\x20apiKey\x20configured','Google\x20Cloud\x20TTS\x20%s\x20file\x20created','Google\x20Cloud\x20TTS\x20is\x20unreachable','tts','Enter\x20in\x20GOOGLETTS\x20(%s)\x20block','Trying\x20Google\x20TTS\x20%s','unpause','Enter\x20in\x20UNPAUSE\x20(%s)\x20block','voicemail','Enter\x20in\x20VOICEMAIL\x20(%s)\x20block','VOICEMAIL','mailbox','vswitch','no\x20variable\x20selected','replaceAll','join','exports','util','lodash','odbc','randomstring','mustache','request-promise','../../config/logger','agi','../../config/environment','./scripts','/var/opt/motion2/server/files','rawBody','getsecretdigits','channel','rpc','getVariable','getVariableById','name','catch','prototype','getSquareProject','getSquareOdbc','getSquareOdbcById','dsn','getUser','getUserById','getTrunk','getTrunkById','then','getSoundById','getSoundPath','save_name','getMailAccountById','mailRpc','sendMailMessage','getIntervalById','IntervalId','interval','map','Intervals','format','getQueryOdbc','open','error','info','ODBC\x20connection\x20successfully','query','Error\x20executing\x20query\x20%s','Query\x20executed\x20correctly\x20%s','Error\x20closing\x20connection\x20to\x20odbc\x20%s','getSmsAccount','getSmsAccountById','createSmsMessage','createSquareDetailsReport','agicommand','arg_1','callerid','createSquareRecording','uniqueid','calleridname','context','priority','dnid','createSquareMessage','createCmContact','isNil','callback_','random','lastName','phone','list_id','callback','Callback\x20scheduled\x20at\x20','toString','callback_priority','getPause','getPauseById','agentPause','agent','agentUnpause','agentLogout','agentLogin','%s/%s@from-sip/n','LOCAL','shellCommand'];(function(_0x217ecd,_0x5b35da){var _0x50b480=function(_0x40cb44){while(--_0x40cb44){_0x217ecd['push'](_0x217ecd['shift']());}};_0x50b480(++_0x5b35da);}(_0x4bc3,0x16e));var _0x34bc=function(_0x5f1391,_0x19c132){_0x5f1391=_0x5f1391-0x0;var _0x50ebe3=_0x4bc3[_0x5f1391];return _0x50ebe3;};'use strict';var fs=require('fs');var util=require(_0x34bc('0x0'));var _=require(_0x34bc('0x1'));var sh=require('shelljs');var odbc=require(_0x34bc('0x2'))();var rs=require(_0x34bc('0x3'));var moment=require('moment');var Mustache=require(_0x34bc('0x4'));var rp=require(_0x34bc('0x5'));var logger=require(_0x34bc('0x6'))(_0x34bc('0x7'));var config=require(_0x34bc('0x8'));var scripts=require(_0x34bc('0x9'));var FILES_PATH=_0x34bc('0xa');var recursiveMapAttributes=['rawHeaders',_0x34bc('0xb')];var verticesWithRetry=['menu','getdigits',_0x34bc('0xc')];var AGIVertices=function(_0x474108,_0x1f72d8,_0x365e49){this[_0x34bc('0xd')]=_0x474108;this[_0x34bc('0xe')]=_0x1f72d8;this['mailRpc']=_0x365e49;};AGIVertices['prototype'][_0x34bc('0xf')]=function(_0x33025c,_0x2a35f3){this['rpc'][_0x34bc('0x10')](_0x33025c)['then'](function(_0x1ecedf){_0x2a35f3(null,_0x1ecedf?_0x1ecedf[_0x34bc('0x11')]:![]);})[_0x34bc('0x12')](function(_0x536ebd){_0x2a35f3(_0x536ebd);});};AGIVertices[_0x34bc('0x13')]['getVoiceQueue']=function(_0x12cf72,_0x43ff68){this[_0x34bc('0xe')]['getVoiceQueueById'](_0x12cf72)['then'](function(_0x354868){_0x43ff68(null,_0x354868?_0x354868['name']:![]);})[_0x34bc('0x12')](function(_0x217605){_0x43ff68(_0x217605);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x14')]=function(_0x2db2dd,_0x69542f){this['rpc']['getSquareProjectById'](_0x2db2dd)['then'](function(_0x4205eb){_0x69542f(null,_0x4205eb?_0x4205eb[_0x34bc('0x11')]:![]);})[_0x34bc('0x12')](function(_0x239e6c){_0x69542f(_0x239e6c);});};AGIVertices['prototype'][_0x34bc('0x15')]=function(_0x3ca9e8,_0x50106a){this[_0x34bc('0xe')][_0x34bc('0x16')](_0x3ca9e8)['then'](function(_0x14cec8){_0x50106a(null,_0x14cec8?_0x14cec8[_0x34bc('0x17')]:![]);})[_0x34bc('0x12')](function(_0x120bd3){_0x50106a(_0x120bd3);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x18')]=function(_0x48087e,_0x40e128){this[_0x34bc('0xe')][_0x34bc('0x19')](_0x48087e)['then'](function(_0x4c4b9a){_0x40e128(null,_0x4c4b9a?_0x4c4b9a[_0x34bc('0x11')]:![]);})[_0x34bc('0x12')](function(_0x4263de){_0x40e128(_0x4263de);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x1a')]=function(_0x2e22e3,_0x3f3653){this[_0x34bc('0xe')][_0x34bc('0x1b')](_0x2e22e3)[_0x34bc('0x1c')](function(_0x2de017){_0x3f3653(null,_0x2de017?_0x2de017[_0x34bc('0x11')]:![]);})['catch'](function(_0x43e527){_0x3f3653(_0x43e527);});};AGIVertices['prototype']['getSound']=function(_0x3da96b,_0x5332c8){var _0x4082c3=this;this[_0x34bc('0xe')][_0x34bc('0x1d')](_0x3da96b)['then'](function(_0x2e6d96){_0x5332c8(null,_0x2e6d96?_0x4082c3[_0x34bc('0x1e')](_0x2e6d96[_0x34bc('0x1f')]):![]);})[_0x34bc('0x12')](function(_0x2bb874){_0x5332c8(_0x2bb874);});};AGIVertices[_0x34bc('0x13')]['getMailAccount']=function(_0xff07bd,_0x1fb7c5){this[_0x34bc('0xe')][_0x34bc('0x20')](_0xff07bd)[_0x34bc('0x1c')](function(_0xd92957){_0x1fb7c5(null,_0xd92957?_0xd92957:![]);})['catch'](function(_0x155e44){_0x1fb7c5(_0x155e44);});};AGIVertices['prototype']['sendMailMessage']=function(_0x42fd40,_0x540aa3,_0x1e8445){this[_0x34bc('0x21')][_0x34bc('0x22')](_0x42fd40,_0x540aa3)[_0x34bc('0x1c')](function(){_0x1e8445(null);})[_0x34bc('0x12')](function(_0x246c39){_0x1e8445(_0x246c39);});};AGIVertices[_0x34bc('0x13')]['getIntervals']=function(_0xbd59f9,_0x3a5a74){this[_0x34bc('0xe')][_0x34bc('0x23')](_0xbd59f9)[_0x34bc('0x1c')](function(_0x5c7e56){if(_0x5c7e56){if(_0x5c7e56[_0x34bc('0x24')]){_0x3a5a74(null,[_0x5c7e56[_0x34bc('0x25')]]);}else{_0x3a5a74(null,_[_0x34bc('0x26')](_0x5c7e56[_0x34bc('0x27')],_0x34bc('0x25')));}}else{_0x3a5a74(null,![]);}})['catch'](function(_0x4ad3c7){_0x3a5a74(_0x4ad3c7);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x1e')]=function(_0xf9453c){return util[_0x34bc('0x28')]('%s/sounds/converted/%s',FILES_PATH,_0xf9453c);};AGIVertices[_0x34bc('0x13')][_0x34bc('0x29')]=function(_0x32cf3b,_0x5b6acd,_0x37cd30){odbc[_0x34bc('0x2a')](_0x32cf3b,function(_0xd0e121){if(_0xd0e121){logger[_0x34bc('0x2b')]('Error\x20getting\x20ODBC\x20connection\x20%s',_0xd0e121);_0x37cd30(_0xd0e121);}else{logger[_0x34bc('0x2c')](_0x34bc('0x2d'));odbc[_0x34bc('0x2e')](_0x5b6acd,function(_0x4ddef6,_0x246a86){if(_0x4ddef6){logger[_0x34bc('0x2c')](_0x34bc('0x2f'),_0x5b6acd);_0x37cd30(_0x4ddef6);}else{logger[_0x34bc('0x2c')](_0x34bc('0x30'),_0x5b6acd);odbc['close'](function(_0xca2aaf){if(_0xca2aaf){logger[_0x34bc('0x2b')](_0x34bc('0x31'),_0xca2aaf);}_0x37cd30(null,_0x246a86);});}});}});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x32')]=function(_0x4bf331,_0x4105d8){this['rpc'][_0x34bc('0x33')](_0x4bf331)[_0x34bc('0x1c')](function(_0xfaa92d){_0x4105d8(null,_0xfaa92d?_0xfaa92d:![]);})[_0x34bc('0x12')](function(_0x53feca){_0x4105d8(_0x53feca);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x34')]=function(_0x5671fa,_0x16893d){this[_0x34bc('0xe')][_0x34bc('0x34')](_0x5671fa)['then'](function(_0x31afd3){_0x16893d(null,_0x31afd3);})[_0x34bc('0x12')](function(_0x397c64){_0x16893d(_0x397c64);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x35')]=function(_0x20debf,_0x428326,_0x2e4059){this[_0x34bc('0xe')][_0x34bc('0x35')]({'uniqueid':this[_0x34bc('0xd')]['uniqueid'],'node':_0x20debf['label'],'application':_0x20debf[_0x34bc('0x36')],'data':_0x428326||null,'project_name':this[_0x34bc('0xd')][_0x34bc('0x37')],'callerid':this[_0x34bc('0xd')][_0x34bc('0x38')]})[_0x34bc('0x1c')](function(_0x5af850){if(_0x2e4059){_0x2e4059(null,_0x5af850);}})[_0x34bc('0x12')](function(_0x4f912a){if(_0x2e4059){_0x2e4059(_0x4f912a);}});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x39')]=function(_0x30d5f1,_0x4ba4eb,_0xc57588,_0xf7c0be){this[_0x34bc('0xe')][_0x34bc('0x39')]({'uniqueid':this[_0x34bc('0xd')][_0x34bc('0x3a')],'callerid':this[_0x34bc('0xd')][_0x34bc('0x38')],'calleridname':this[_0x34bc('0xd')][_0x34bc('0x3b')],'context':this[_0x34bc('0xd')][_0x34bc('0x3c')],'extension':this['channel']['extension'],'priority':this[_0x34bc('0xd')][_0x34bc('0x3d')],'accountcode':this[_0x34bc('0xd')]['accountcode'],'dnid':this['channel'][_0x34bc('0x3e')],'projectName':this[_0x34bc('0xd')][_0x34bc('0x37')],'saveName':_0x4ba4eb,'filename':_0x30d5f1['file']||_0x4ba4eb,'savePath':_0xc57588})[_0x34bc('0x1c')](function(_0x25b02e){_0xf7c0be(null,_0x25b02e);})['catch'](function(_0x4627de){_0xf7c0be(_0x4627de);});};AGIVertices['prototype'][_0x34bc('0x3f')]=function(_0x487678,_0x281d6f,_0xbed144,_0x1f0cd9,_0x374271){this['rpc'][_0x34bc('0x3f')]({'uniqueid':this[_0x34bc('0xd')][_0x34bc('0x3a')],'body':_0x487678,'direction':_0x281d6f,'providerName':_0xbed144,'providerResponse':_0x1f0cd9})[_0x34bc('0x1c')](function(_0x13ce50){if(_0x374271){_0x374271(null,_0x13ce50);}})[_0x34bc('0x12')](function(_0x18eadd){if(_0x374271){_0x374271(_0x18eadd);}});};AGIVertices[_0x34bc('0x13')]['createCmContact']=function(_0x592557,_0x561ee8){this[_0x34bc('0xe')][_0x34bc('0x40')]({'firstName':_['isEmpty'](_0x592557[_0x34bc('0x11')])||_[_0x34bc('0x41')](_0x592557[_0x34bc('0x11')])?_0x34bc('0x42')+Math[_0x34bc('0x43')]():_0x592557['name'],'lastName':_['isEmpty'](_0x592557['lastName'])||_[_0x34bc('0x41')](_0x592557[_0x34bc('0x44')])?null:_0x592557[_0x34bc('0x44')],'phone':_0x592557[_0x34bc('0x45')],'ListId':_0x592557[_0x34bc('0x46')],'scheduledat':_0x592557['scheduledAt'],'callbackUniqueid':this[_0x34bc('0xd')][_0x34bc('0x3a')],'tags':_0x34bc('0x47'),'description':_0x34bc('0x48')+_0x592557['scheduledAt'][_0x34bc('0x49')](),'priority':_0x592557[_0x34bc('0x4a')]})[_0x34bc('0x1c')](function(_0x91e6c5){_0x561ee8(null,_0x91e6c5);})[_0x34bc('0x12')](function(_0x31c40b){_0x561ee8(_0x31c40b);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x4b')]=function(_0x3cb7df,_0x1f789a){this[_0x34bc('0xe')][_0x34bc('0x4c')](_0x3cb7df)[_0x34bc('0x1c')](function(_0x592e81){_0x1f789a(null,_0x592e81?_0x592e81[_0x34bc('0x11')]:![]);})[_0x34bc('0x12')](function(_0x35e9ad){_0x1f789a(_0x35e9ad);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x4d')]=function(_0x1b3704,_0x31cf3a,_0x43337d){var _0x38c45c={'role':_0x34bc('0x4e')};_0x38c45c[_0x1b3704]=this[_0x34bc('0xd')][_0x34bc('0x38')];this[_0x34bc('0xe')][_0x34bc('0x4d')](_0x38c45c,_0x31cf3a,this['channel'][_0x34bc('0x3a')])[_0x34bc('0x1c')](function(_0x36143f){_0x43337d(null,_[_0x34bc('0x41')](_0x36143f)?![]:!![]);})[_0x34bc('0x12')](function(_0x2b46b8){logger[_0x34bc('0x2b')](_0x2b46b8);_0x43337d(null,![]);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x4f')]=function(_0x32041a,_0x5ba13a){var _0x837259={'role':_0x34bc('0x4e')};_0x837259[_0x32041a]=this[_0x34bc('0xd')]['callerid'];this[_0x34bc('0xe')][_0x34bc('0x4f')](_0x837259)[_0x34bc('0x1c')](function(_0x3b087){_0x5ba13a(null,_['isNil'](_0x3b087)?![]:!![]);})[_0x34bc('0x12')](function(_0x284b55){logger[_0x34bc('0x2b')](_0x284b55);_0x5ba13a(null,![]);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x50')]=function(_0x378690,_0x3c4a72){var _0x3b8f72={'role':'agent'};_0x3b8f72[_0x378690]=this['channel'][_0x34bc('0x38')];this[_0x34bc('0xe')][_0x34bc('0x50')](_0x3b8f72)[_0x34bc('0x1c')](function(_0x1108c5){_0x3c4a72(null,_[_0x34bc('0x41')](_0x1108c5)?![]:!![]);})[_0x34bc('0x12')](function(_0x2e49b9){logger[_0x34bc('0x2b')](_0x2e49b9);_0x3c4a72(null,![]);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x51')]=function(_0x2d0d2c,_0x46c64e){var _0x98f897={'role':'agent'};_0x98f897[_0x2d0d2c]=this[_0x34bc('0xd')][_0x34bc('0x38')];var _0xa4e120=_0x2d0d2c!='internal'?util[_0x34bc('0x28')](_0x34bc('0x52'),_0x34bc('0x53'),this[_0x34bc('0xd')]['callerid']):undefined;this[_0x34bc('0xe')][_0x34bc('0x51')](_0x98f897,_0xa4e120)[_0x34bc('0x1c')](function(_0x190689){_0x46c64e(null,_[_0x34bc('0x41')](_0x190689)?![]:!![]);})['catch'](function(_0xc08131){logger[_0x34bc('0x2b')](_0xc08131);_0x46c64e(null,![]);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x54')]=function(_0x52b73a,_0x1b4f1e){sh[_0x34bc('0x55')](_[_0x34bc('0x56')](_0x52b73a),function(_0x2915ec,_0x2b9750){var _0x368b92=_0x2b9750['replace'](/(\r\n|\n|\r)/gm,'');_0x1b4f1e(null,_0x368b92);});};AGIVertices['prototype'][_0x34bc('0x57')]=function(_0x913c76,_0x561528){scripts[_0x34bc('0x57')](_0x913c76[_0x34bc('0x58')],_0x913c76[_0x34bc('0x59')]||_0x34bc('0x5a'),_0x913c76['text'],_0x913c76['languageCode']||_0x34bc('0x5b'),_0x913c76[_0x34bc('0x5c')]||_0x34bc('0x5d'),_0x913c76[_0x34bc('0x5e')]||_0x34bc('0x5f'))[_0x34bc('0x1c')](function(_0xa508f4){_0x561528(null,_0xa508f4);})[_0x34bc('0x12')](function(_0x1a6fdb){_0x561528(_0x1a6fdb);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x60')]=function(_0x348be3,_0x21e18b){scripts[_0x34bc('0x60')](_0x348be3[_0x34bc('0x5a')],_0x348be3[_0x34bc('0x61')]||'en',0x1)['then'](function(_0x1a587a){_0x21e18b(null,_0x1a587a);})[_0x34bc('0x12')](function(_0x1d9f60){_0x21e18b(_0x1d9f60);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x62')]=function(_0x48b13c,_0x415c29){var _0x2d68f6={'uri':_0x48b13c[_0x34bc('0x63')],'method':_0x48b13c[_0x34bc('0x64')],'json':!![],'resolveWithFullResponse':!![],'strictSSL':![],'timeout':typeof parseInt(_0x48b13c[_0x34bc('0x65')])==='number'&&parseInt(_0x48b13c[_0x34bc('0x65')])>=0x1?parseInt(_0x48b13c[_0x34bc('0x65')])*0x3e8:0x5*0x3e8};if(_[_0x34bc('0x66')]([_0x34bc('0x67'),_0x34bc('0x68')],_0x2d68f6[_0x34bc('0x64')]['toUpperCase']())){try{_0x2d68f6[_0x34bc('0x69')]=_0x48b13c[_0x34bc('0xb')]?JSON['parse'](_0x48b13c[_0x34bc('0xb')]):{};}catch(_0x1685ef){logger[_0x34bc('0x2b')]('An\x20incorrect\x20formatted\x20json\x20body\x20has\x20been\x20passed\x20to\x20the\x20function',_0x1685ef);}}try{_0x2d68f6['headers']=_0x48b13c[_0x34bc('0x6a')]?JSON['parse'](_0x48b13c['rawHeaders']):{};}catch(_0x55055d){logger[_0x34bc('0x2b')](_0x34bc('0x6b'),_0x55055d);}if(_0x48b13c[_0x34bc('0x6c')]){try{var _0x5529b3=require(_0x48b13c[_0x34bc('0x6c')])[_0x34bc('0x6d')](this,_0x2d68f6);_0x2d68f6[_0x34bc('0x6e')]=Mustache[_0x34bc('0x6f')](_0x48b13c[_0x34bc('0x63')],_0x5529b3,{},['$$','$$']);if(_0x2d68f6[_0x34bc('0x70')]){_0x2d68f6[_0x34bc('0x70')]=JSON[_0x34bc('0x71')](Mustache[_0x34bc('0x6f')](JSON[_0x34bc('0x72')](_0x2d68f6[_0x34bc('0x70')]),_0x5529b3,{},['$$','$$']));}if(_0x2d68f6[_0x34bc('0x69')]){_0x2d68f6['body']=JSON['parse'](Mustache[_0x34bc('0x6f')](JSON[_0x34bc('0x72')](_0x2d68f6[_0x34bc('0x69')]),_0x5529b3,{},['$$','$$']));}}catch(_0x2423a3){logger[_0x34bc('0x2b')](_0x34bc('0x73'),_0x2423a3);}}rp(_0x2d68f6)[_0x34bc('0x1c')](function(_0x2acd0b){var _0x2a5455={'statusCode':_0x2acd0b[_0x34bc('0x74')]||0xc8,'statusMessage':_0x2acd0b['statusMessage']||'OK','headers':_0x2acd0b[_0x34bc('0x70')]||{},'body':_0x2acd0b[_0x34bc('0x69')]||{}};_0x415c29(null,_0x2a5455);})[_0x34bc('0x12')](function(_0x3726d8){var _0xe77c37={'statusCode':_0x3726d8[_0x34bc('0x74')]||0x1f4,'statusMessage':_0x3726d8[_0x34bc('0x75')]||_0x34bc('0x76'),'headers':_0x3726d8[_0x34bc('0x77')]['headers']||{},'body':_0x3726d8[_0x34bc('0x77')]['body']||{}};_0x415c29(null,_0xe77c37);});};AGIVertices['prototype'][_0x34bc('0x78')]=function(_0x5dac93,_0x4d25e2){scripts[_0x34bc('0x78')](this[_0x34bc('0xd')]['uniqueid'],_0x5dac93[_0x34bc('0x79')],_0x5dac93[_0x34bc('0x5a')],_0x5dac93[_0x34bc('0x7a')]||'en')[_0x34bc('0x1c')](function(_0x4eea4e){_0x4d25e2(null,_0x4eea4e);})[_0x34bc('0x12')](function(_0x35974b){_0x4d25e2(_0x35974b);});};AGIVertices['prototype']['googleDialogflowV2']=function(_0x49da95,_0x18c493){scripts[_0x34bc('0x7b')](this[_0x34bc('0xd')][_0x34bc('0x3a')],_0x49da95[_0x34bc('0x7c')],_0x49da95[_0x34bc('0x7d')],_0x49da95[_0x34bc('0x7e')],_0x49da95[_0x34bc('0x5a')],_0x49da95[_0x34bc('0x7f')]||'en')['then'](function(_0x31a30c){_0x18c493(null,_0x31a30c);})[_0x34bc('0x12')](function(_0x1716e3){_0x18c493(_0x1716e3);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x80')]=function(_0x443af6,_0x549da9){scripts[_0x34bc('0x80')](this[_0x34bc('0xd')],_0x443af6)[_0x34bc('0x1c')](function(_0x21cbfc){_0x549da9(null,_0x21cbfc);})[_0x34bc('0x12')](function(_0x56fe9c){_0x549da9(_0x56fe9c);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x81')]=function(_0x497a4a,_0x3d0ede){scripts[_0x34bc('0x81')](_0x497a4a[_0x34bc('0x79')],_0x497a4a['text'],_0x497a4a['ispeech_tts_language']||_0x34bc('0x5b'),_0x497a4a[_0x34bc('0x82')])[_0x34bc('0x1c')](function(_0x181c0f){_0x3d0ede(null,_0x181c0f);})['catch'](function(_0x43aa1e){_0x3d0ede(_0x43aa1e);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x83')]=function(_0x2491b8,_0x4cad49,_0x29d344){scripts[_0x34bc('0x83')](_0x4cad49,_0x2491b8[_0x34bc('0x79')],_0x2491b8[_0x34bc('0x84')]||_0x34bc('0x5b'),this[_0x34bc('0x85')](_0x2491b8['model'])?_0x2491b8[_0x34bc('0x86')]:undefined)[_0x34bc('0x1c')](function(_0x4094e4){_0x29d344(null,_0x4094e4);})[_0x34bc('0x12')](function(_0x4d318b){_0x29d344(_0x4d318b);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x87')]=function(_0x910451,_0x579ea0){scripts[_0x34bc('0x87')](_0x910451[_0x34bc('0x88')],_0x910451[_0x34bc('0x89')],_0x910451[_0x34bc('0x8a')],_0x910451['aws_polly_voice']||_0x34bc('0x8b'),_0x910451['text'],_0x910451['aws_text_type']||_0x34bc('0x5a'))['then'](function(_0xe31c4e){_0x579ea0(null,_0xe31c4e);})[_0x34bc('0x12')](function(_0x20139e){_0x579ea0(_0x20139e);});};AGIVertices[_0x34bc('0x13')]['awsLex']=function(_0x33b943,_0x5cf3a6){scripts[_0x34bc('0x8c')](this[_0x34bc('0xd')]['uniqueid'],_0x33b943[_0x34bc('0x88')],_0x33b943[_0x34bc('0x89')],_0x33b943[_0x34bc('0x8d')],_0x33b943['text'],_0x33b943['aws_bot_name'])['then'](function(_0x54965b){_0x5cf3a6(null,_0x54965b);})['catch'](function(_0x41057b){_0x5cf3a6(_0x41057b);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x8e')]=function(_0x352698,_0x597d42,_0x381322){scripts[_0x34bc('0x8e')](_0x597d42,_0x352698[_0x34bc('0x79')],_0x352698[_0x34bc('0x8f')]||_0x34bc('0x5b'))[_0x34bc('0x1c')](function(_0x1979e6){_0x381322(null,_0x1979e6);})[_0x34bc('0x12')](function(_0x3b4f56){_0x381322(_0x3b4f56);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x90')]=function(_0x3ccdd9,_0x46ae25,_0x220317){scripts[_0x34bc('0x90')](_0x46ae25,_0x3ccdd9[_0x34bc('0x91')],_0x3ccdd9[_0x34bc('0x92')],_0x3ccdd9[_0x34bc('0x6e')])['then'](function(_0x529ea0){_0x220317(null,_0x529ea0);})['catch'](function(_0x653f3){_0x220317(_0x653f3);});};AGIVertices[_0x34bc('0x13')][_0x34bc('0x93')]=function(_0x3d2e41){var _0x529d16=_[_0x34bc('0x66')](verticesWithRetry,_0x3d2e41[_0x34bc('0x36')])?_0x3d2e41:_[_0x34bc('0x94')](_0x3d2e41);for(var _0x2aaa14 in _0x529d16){if(_0x529d16['hasOwnProperty'](_0x2aaa14)){if(_0x529d16[_0x2aaa14]&&_[_0x34bc('0x95')](_0x529d16[_0x2aaa14])){if(_['includes'](recursiveMapAttributes,_0x2aaa14)){_0x529d16[_0x2aaa14]=this[_0x34bc('0x96')](_0x529d16[_0x2aaa14]);}else{_0x529d16[_0x2aaa14]=this[_0x34bc('0x97')](_0x529d16[_0x2aaa14]);}}}}return _0x529d16;};AGIVertices['prototype'][_0x34bc('0x98')]=function(_0x5ab98a){for(var _0x37b4d6 in _0x5ab98a){if(_0x5ab98a[_0x34bc('0x99')](_0x37b4d6)){if(_[_0x34bc('0x9a')](_0x5ab98a[_0x37b4d6])){this[_0x34bc('0x98')](_0x5ab98a[_0x37b4d6]);}else if(_['isArray'](_0x5ab98a[_0x37b4d6])){for(var _0x182850=0x0;_0x182850<_0x5ab98a[_0x37b4d6][_0x34bc('0x9b')];_0x182850++){this[_0x34bc('0x98')](_0x5ab98a[_0x37b4d6][_0x182850]);}}else if(_['isString'](_0x5ab98a[_0x37b4d6])){_0x5ab98a[_0x37b4d6]=this[_0x34bc('0x97')](_0x5ab98a[_0x37b4d6]);}}}};AGIVertices[_0x34bc('0x13')][_0x34bc('0x9c')]=function(_0x40405e,_0x283182){for(var _0x308223 in _0x40405e){if(_0x40405e[_0x34bc('0x99')](_0x308223)){if(_[_0x34bc('0x9a')](_0x40405e[_0x308223])){if(!_[_0x34bc('0x9d')](_0x40405e[_0x308223])){this[_0x34bc('0x9c')](_0x40405e[_0x308223],util['format'](_0x34bc('0x9e'),_0x283182,_0x308223));}}else if(_[_0x34bc('0x9f')](_0x40405e[_0x308223])){for(var _0x44b2cb=0x0;_0x44b2cb<_0x40405e[_0x308223][_0x34bc('0x9b')];_0x44b2cb++){this[_0x34bc('0x9c')](_0x40405e[_0x308223][_0x44b2cb],util[_0x34bc('0x28')](_0x34bc('0x9e'),_0x283182,_0x308223+'['+_0x44b2cb+']'));}}else{if(!_[_0x34bc('0x41')](_0x40405e[_0x308223])){this[_0x34bc('0xd')][_0x34bc('0xa0')](util['format'](_0x34bc('0x9e'),_0x283182,_0x308223),_0x40405e[_0x308223]);}}}}};AGIVertices[_0x34bc('0x13')][_0x34bc('0x96')]=function(_0x440aab){try{var _0x324269=JSON[_0x34bc('0x71')](_0x440aab);this[_0x34bc('0x98')](_0x324269);return JSON[_0x34bc('0x72')](_0x324269);}catch(_0x1d6966){return this[_0x34bc('0x97')](_0x440aab);}};AGIVertices[_0x34bc('0x13')][_0x34bc('0x97')]=function(_0x455206){var _0x2a8c1d=_0x455206['split']('{');for(var _0x19c29b=0x1;_0x19c29b<_0x2a8c1d[_0x34bc('0x9b')];_0x19c29b+=0x1){var _0x3d4373=_0x2a8c1d[_0x19c29b]['split']('}');if(_0x3d4373['length']>0x1){_0x455206=_0x455206['replaceAll']('{'+_0x3d4373[0x0]+'}',this[_0x34bc('0xd')]['getVariable'](_0x3d4373[0x0])[_0x34bc('0xa1')]||_0x3d4373[0x0]);}}if(_0x2a8c1d[_0x34bc('0x9b')]===0x1){return _0x455206['toString']();}return this['replaceAllVariables'](_0x455206);};AGIVertices[_0x34bc('0x13')][_0x34bc('0xa2')]=function(_0x4e3361,_0x33022b){var _0x4bba26=this[_0x34bc('0xd')][_0x34bc('0xf')](_0x4e3361);if(_0x4bba26[_0x34bc('0xa3')]===-0x1){return _0x4bba26;}logger[_0x34bc('0x2c')](util['format'](_0x34bc('0xa4'),_0x33022b,_0x4bba26[_0x34bc('0xa1')]));return this[_0x34bc('0xd')][_0x34bc('0xa0')](_0x33022b,_0x4bba26[_0x34bc('0xa1')]);};AGIVertices[_0x34bc('0x13')][_0x34bc('0x85')]=function(_0x52b208){return _0x52b208&&_0x52b208!=='0'&&_0x52b208!=='-1'&&_0x52b208!=='';};AGIVertices['prototype'][_0x34bc('0xa5')]=function(_0x1c6b4b){this[_0x34bc('0x35')]['sync'](this,_0x1c6b4b,'-');_0x1c6b4b[_0x34bc('0xa6')]=_0x1c6b4b[_0x34bc('0xa5')];return{'code':0xc8,'result':'-'};};AGIVertices[_0x34bc('0x13')][_0x34bc('0xa7')]=function(_0x57fd82){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0xa8'),_0x57fd82[_0x34bc('0xa9')]));if(!this[_0x34bc('0x85')](_0x57fd82[_0x34bc('0x5a')])){return this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0xab'));}var _0x524a52='\x22'+_0x57fd82[_0x34bc('0x5a')]+'\x22';if(this[_0x34bc('0x85')](_0x57fd82[_0x34bc('0x77')])){_0x524a52+=','+_0x57fd82[_0x34bc('0x77')];}var _0x554e5f=this[_0x34bc('0xd')][_0x34bc('0x55')]('MRCPSynth',_0x524a52);if(_0x554e5f[_0x34bc('0xa3')]===-0x1){return _0x554e5f;}return this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0xac'),_0x524a52));};AGIVertices[_0x34bc('0x13')]['mrcprecog']=function(_0x283a47){logger['info'](util[_0x34bc('0x28')]('Enter\x20in\x20MRCPRecog\x20(%s)\x20block',_0x283a47[_0x34bc('0xa9')]));if(!this[_0x34bc('0x85')](_0x283a47['grammar'])){return this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0xad'));}var _0x5894b3=_0x283a47[_0x34bc('0xae')];if(this[_0x34bc('0x85')](_0x283a47[_0x34bc('0x77')])){_0x5894b3+=','+_0x283a47[_0x34bc('0x77')];}var _0x190601=this[_0x34bc('0xd')]['exec'](_0x34bc('0xaf'),_0x5894b3);if(_0x190601[_0x34bc('0xa3')]===-0x1){return _0x190601;}var _0x4c6c58=this[_0x34bc('0xa2')](_0x34bc('0xb0'),'MRCP_RECOG_CONFIDENCE');if(_0x4c6c58[_0x34bc('0xa3')]===-0x1){return _0x4c6c58;}var _0x2fc389=this[_0x34bc('0xa2')]('RECOG_INPUT()',_0x34bc('0xb1'));if(_0x2fc389['result']===-0x1){return _0x2fc389;}var _0x484d79=this['getAndSetVariable'](_0x34bc('0xb2'),'MRCP_RECOG_INSTANCE');if(_0x484d79[_0x34bc('0xa3')]===-0x1){return _0x484d79;}return this['channel']['noop'](util[_0x34bc('0x28')]('Executed\x20command\x20MRCPRecog\x20%s',_0x5894b3));};AGIVertices['prototype'][_0x34bc('0x7')]=function(_0x47a273){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0xb3'),_0x47a273[_0x34bc('0xa9')]));return this['channel'][_0x34bc('0x7')]([_0x47a273[_0x34bc('0xb4')],_0x47a273[_0x34bc('0xb5')]]);};AGIVertices[_0x34bc('0x13')]['answer']=function(_0x3e48c6){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0xb6'),_0x3e48c6[_0x34bc('0xa9')]));if(this[_0x34bc('0x85')](_0x3e48c6[_0x34bc('0x65')])){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0xb7'),_0x3e48c6[_0x34bc('0x65')]));var _0x596197=this['channel']['wait'](_0x3e48c6[_0x34bc('0x65')]);if(_0x596197[_0x34bc('0xa3')]===-0x1){return _0x596197;}}return this['channel'][_0x34bc('0xb8')]();};AGIVertices[_0x34bc('0x13')]['callback']=function(_0x4808e8){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')]('Enter\x20in\x20CALLBACK\x20(%s)\x20block',_0x4808e8['label']));if(!this[_0x34bc('0x85')](_0x4808e8[_0x34bc('0x46')])){return this[_0x34bc('0xd')]['error'](_0x4808e8,'no\x20list\x20selected');}_0x4808e8['scheduledAt']=moment();if(this[_0x34bc('0x85')](_0x4808e8['delay'])){_0x4808e8[_0x34bc('0xb9')]=moment()['add'](_0x4808e8['delay'],_0x34bc('0xba'));}if(!this[_0x34bc('0x85')](_0x4808e8[_0x34bc('0x4a')])){_0x4808e8[_0x34bc('0x4a')]=0x2;}this[_0x34bc('0x40')][_0x34bc('0x6d')](this,_0x4808e8);return this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0xbb'),_0x4808e8[_0x34bc('0x45')],_0x4808e8['list_id'],_0x4808e8[_0x34bc('0xb9')]));};AGIVertices[_0x34bc('0x13')][_0x34bc('0xbc')]=function(_0x33afa3){logger[_0x34bc('0x2c')](util['format'](_0x34bc('0xbd'),_0x33afa3['label']));var _0x61e569=this['channel']['exec'](_0x33afa3[_0x34bc('0xbe')],_0x33afa3[_0x34bc('0x77')]);if(_0x61e569[_0x34bc('0xa3')]===-0x1){return _0x61e569;}return this[_0x34bc('0xd')][_0x34bc('0xaa')](util['format']('Executed\x20command\x20%s\x20%s',_0x33afa3[_0x34bc('0xbe')],_0x33afa3[_0x34bc('0x77')]));};AGIVertices[_0x34bc('0x13')][_0x34bc('0xbf')]=function(_0x2c6225){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')]('Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block',_0x2c6225['label']));if(!this[_0x34bc('0x85')](_0x2c6225[_0x34bc('0x5a')])){return this['channel'][_0x34bc('0xaa')](_0x34bc('0xab'));}var _0x2979ac='\x22'+_0x2c6225[_0x34bc('0x5a')]+'\x22';if(this['isConfigured'](_0x2c6225[_0x34bc('0x77')])){_0x2979ac+=','+_0x2c6225[_0x34bc('0x77')];}var _0x1fa6ba=this[_0x34bc('0xd')][_0x34bc('0x55')](_0x34bc('0xc0'),_0x2979ac);if(_0x1fa6ba['result']===-0x1){return _0x1fa6ba;}return this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')]('Executed\x20command\x20MRCPSynth\x20%s',_0x2979ac));};AGIVertices[_0x34bc('0x13')][_0x34bc('0xc1')]=function(_0x478701){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0xc2'),_0x478701[_0x34bc('0xa9')]));if(!this[_0x34bc('0x85')](_0x478701['text'])){return this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0xab'));}var _0x5e0e3f='\x22'+_0x478701[_0x34bc('0x5a')]+'\x22';if(this['isConfigured'](_0x478701['options'])){_0x5e0e3f+=','+_0x478701['options'];}var _0x29a038=this['channel']['exec']('MRCPSynth',_0x5e0e3f);if(_0x29a038['result']===-0x1){return _0x29a038;}return this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0xac'),_0x5e0e3f));};AGIVertices[_0x34bc('0x13')][_0x34bc('0xc3')]=function(_0x4025e7){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')]('Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block',_0x4025e7[_0x34bc('0xa9')]));if(!this[_0x34bc('0x85')](_0x4025e7[_0x34bc('0xae')])){return this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0xad'));}var _0x1bb62d=_0x4025e7[_0x34bc('0xae')];if(this[_0x34bc('0x85')](_0x4025e7['options'])){_0x1bb62d+=','+_0x4025e7[_0x34bc('0x77')];}var _0x5ae468=this['channel'][_0x34bc('0x55')]('MRCPRecog',_0x1bb62d);if(_0x5ae468[_0x34bc('0xa3')]===-0x1){return _0x5ae468;}var _0x5b9a25=this['getAndSetVariable'](_0x34bc('0xb0'),'LUMENVOX_ASR_CONFIDENCE');if(_0x5b9a25[_0x34bc('0xa3')]===-0x1){return _0x5b9a25;}var _0xa77cea=this['getAndSetVariable'](_0x34bc('0xc4'),_0x34bc('0xc5'));if(_0xa77cea[_0x34bc('0xa3')]===-0x1){return _0xa77cea;}var _0x1e9083=this[_0x34bc('0xa2')](_0x34bc('0xb2'),_0x34bc('0xc6'));if(_0x1e9083[_0x34bc('0xa3')]===-0x1){return _0x1e9083;}return this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0xc7'),_0x1bb62d));};AGIVertices[_0x34bc('0x13')]['sestekasr']=function(_0x7f2aaf){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0xc8'),_0x7f2aaf[_0x34bc('0xa9')]));if(!this[_0x34bc('0x85')](_0x7f2aaf[_0x34bc('0xae')])){return this['channel'][_0x34bc('0xaa')](_0x34bc('0xad'));}var _0xa667dc=_0x7f2aaf[_0x34bc('0xae')];if(this[_0x34bc('0x85')](_0x7f2aaf[_0x34bc('0x77')])){_0xa667dc+=','+_0x7f2aaf['options'];}var _0x4bbf51=this[_0x34bc('0xd')][_0x34bc('0x55')]('MRCPRecog',_0xa667dc);if(_0x4bbf51[_0x34bc('0xa3')]===-0x1){return _0x4bbf51;}var _0x593802=this[_0x34bc('0xa2')]('RECOG_CONFIDENCE()','SESTEK_ASR_CONFIDENCE');if(_0x593802['result']===-0x1){return _0x593802;}var _0x3bb206=this[_0x34bc('0xa2')](_0x34bc('0xc4'),_0x34bc('0xc9'));if(_0x3bb206[_0x34bc('0xa3')]===-0x1){return _0x3bb206;}var _0x1153d0=this['getAndSetVariable'](_0x34bc('0xb2'),_0x34bc('0xca'));if(_0x1153d0[_0x34bc('0xa3')]===-0x1){return _0x1153d0;}return this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')]('Executed\x20command\x20MRCPRecog\x20%s',_0xa667dc));};AGIVertices[_0x34bc('0x13')][_0x34bc('0xcb')]=function(_0x18f6b4){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0xcc'),_0x18f6b4[_0x34bc('0xa9')]));if(!this[_0x34bc('0x85')](_0x18f6b4[_0x34bc('0xcd')])){return this[_0x34bc('0xd')]['error'](_0x18f6b4,'no\x20database\x20selected');}var _0x4339b9=this[_0x34bc('0x15')][_0x34bc('0x6d')](this,_0x18f6b4['odbc_id']);if(!_0x4339b9){return this[_0x34bc('0xd')]['error'](_0x18f6b4,_0x34bc('0xce'));}if(!this[_0x34bc('0x85')](_0x18f6b4[_0x34bc('0x2e')])){return this[_0x34bc('0xd')]['error'](_0x18f6b4,_0x34bc('0xcf'));}var _0x526111=_0x18f6b4[_0x34bc('0x2e')][_0x34bc('0xd0')](/(\r\n|\n|\r)/gm,'\x20');this['channel'][_0x34bc('0xaa')](util[_0x34bc('0x28')]('query:\x20%s',_0x526111));var _0x4dab7c=this[_0x34bc('0x29')][_0x34bc('0x6d')](this,_0x4339b9,_0x526111);this['createSquareDetailsReport']['sync'](this,_0x18f6b4,_0x526111);if(!this[_0x34bc('0x85')](_0x18f6b4[_0x34bc('0xd1')])){return this[_0x34bc('0xd')]['noop'](_0x34bc('0xd2'));}var _0x40b723=this['getVariable'][_0x34bc('0x6d')](this,_0x18f6b4['variable_id']);if(!_0x40b723){return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x18f6b4,_0x34bc('0xd3'));}var _0x3bf43a=this;_0x4dab7c[_0x34bc('0xd4')](function(_0x13e1c9,_0x55d529){Object['keys'](_0x13e1c9)[_0x34bc('0xd4')](function(_0x4bcac0){_0x3bf43a[_0x34bc('0xd')][_0x34bc('0xa0')](util['format'](_0x34bc('0xd5'),_0x40b723,_0x55d529,_0x4bcac0),_0x13e1c9[_0x4bcac0]);});});this[_0x34bc('0xd')][_0x34bc('0xa0')](util[_0x34bc('0x28')](_0x34bc('0xd6'),_0x40b723),_0x4dab7c['length']);return this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0xd7'),_0x40b723));};AGIVertices[_0x34bc('0x13')][_0x34bc('0xd8')]=function(_0x2bffca){logger['debug'](util[_0x34bc('0x28')](_0x34bc('0xd9'),_0x2bffca[_0x34bc('0xa9')]));if(!this[_0x34bc('0x85')](_0x2bffca[_0x34bc('0xda')])){return this[_0x34bc('0xd')]['error'](_0x2bffca,_0x34bc('0xdb'));}var _0x2ad23b=this[_0x34bc('0x18')][_0x34bc('0x6d')](this,_0x2bffca[_0x34bc('0xda')]);if(!_0x2ad23b){return this[_0x34bc('0xd')]['error'](_0x2bffca,_0x34bc('0xdc'));}var _0x19a166=this[_0x34bc('0xd')][_0x34bc('0x55')](_0x34bc('0xdd'),[util[_0x34bc('0x28')](_0x34bc('0xde'),_0x2ad23b),_0x2bffca['timeout'],_0x2bffca['opts'],_0x2bffca[_0x34bc('0x63')]]);if(_0x19a166[_0x34bc('0xa3')]===-0x1){return _0x19a166;}return this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0xdf'),'DIAL'));};AGIVertices[_0x34bc('0x13')][_0x34bc('0xe0')]=function(_0x5d6d9e){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')]('Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block',_0x5d6d9e['label']));if(!this[_0x34bc('0x85')](_0x5d6d9e[_0x34bc('0x79')])){return this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0xe1'));}if(!this[_0x34bc('0x85')](_0x5d6d9e[_0x34bc('0x5a')])){return this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0xab'));}this[_0x34bc('0xd')]['bot']=!![];this[_0x34bc('0x35')](_0x5d6d9e);this[_0x34bc('0x3f')](_0x5d6d9e[_0x34bc('0x5a')],'in','','');this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')]('Trying\x20Dialogflow:\x20%s',_0x5d6d9e[_0x34bc('0x5a')]));var _0x51ead1=this[_0x34bc('0x78')]['sync'](this,_0x5d6d9e);if(_0x51ead1){for(var _0x4a059c in _0x51ead1){if(_0x51ead1[_0x34bc('0x99')](_0x4a059c)){this[_0x34bc('0xd')][_0x34bc('0xa0')](util['format'](_0x34bc('0xe2'),_0x4a059c['toUpperCase']()),_0x51ead1[_0x4a059c]);}}this[_0x34bc('0x3f')](_0x51ead1['speech'],_0x34bc('0xe3'),_0x34bc('0xe0'),'');return this[_0x34bc('0xd')]['noop'](util['format'](_0x34bc('0xe4'),_0x51ead1['speech']));}return this['channel'][_0x34bc('0x2b')](_0x5d6d9e,_0x34bc('0xe5'));};AGIVertices[_0x34bc('0x13')][_0x34bc('0xe6')]=function(_0x10deff){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')]('Enter\x20in\x20DIALOGFLOW\x20V2\x20(%s)\x20block',_0x10deff['label']));if(!this[_0x34bc('0x85')](_0x10deff[_0x34bc('0x7c')])){return this['channel'][_0x34bc('0xaa')]('no\x20project_id\x20configured');}if(!this[_0x34bc('0x85')](_0x10deff[_0x34bc('0x7d')])){return this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0xe7'));}if(!this[_0x34bc('0x85')](_0x10deff['private_key'])){return this['channel'][_0x34bc('0xaa')](_0x34bc('0xe8'));}if(!this[_0x34bc('0x85')](_0x10deff['dialogflowV2_language'])){return this['channel'][_0x34bc('0xaa')]('no\x20anguage\x20configured');}if(!this['isConfigured'](_0x10deff[_0x34bc('0x5a')])){return this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0xab'));}this[_0x34bc('0xd')][_0x34bc('0xe9')]=!![];this[_0x34bc('0x35')](_0x10deff);this['createSquareMessage'](_0x10deff[_0x34bc('0x5a')],'in','','');this['channel'][_0x34bc('0xaa')](util[_0x34bc('0x28')]('Trying\x20DialogflowV2:\x20%s',_0x10deff[_0x34bc('0x5a')]));var _0x5f4598=this[_0x34bc('0x7b')]['sync'](this,_0x10deff);if(_0x5f4598){for(var _0x57a3bd in _0x5f4598){if(_0x5f4598[_0x34bc('0x99')](_0x57a3bd)){if(_0x57a3bd!==_0x34bc('0xea')){this['channel']['setVariable'](util[_0x34bc('0x28')]('DIALOGFLOW_%s',_0x57a3bd['toUpperCase']()),_0x5f4598[_0x57a3bd]);}}}this[_0x34bc('0x3f')](_0x5f4598[_0x34bc('0xeb')],_0x34bc('0xe3'),'dialogflowV2',_0x5f4598[_0x34bc('0xea')]);return this[_0x34bc('0xd')]['noop'](util[_0x34bc('0x28')](_0x34bc('0xec'),_0x5f4598['speech']));}return this[_0x34bc('0xd')]['error'](_0x10deff,_0x34bc('0xed'));};AGIVertices[_0x34bc('0x13')]['sesteknda']=function(_0x51a21b){logger[_0x34bc('0x2c')](util['format'](_0x34bc('0xee'),_0x51a21b[_0x34bc('0xa9')]));if(!this['isConfigured'](_0x51a21b[_0x34bc('0xef')])){return this[_0x34bc('0xd')][_0x34bc('0xaa')]('no\x20ndauth\x20url\x20configured');}if(!this[_0x34bc('0x85')](_0x51a21b[_0x34bc('0xf0')])){return this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0xf1'));}if(!this[_0x34bc('0x85')](_0x51a21b[_0x34bc('0xf2')])){return this[_0x34bc('0xd')][_0x34bc('0xaa')]('no\x20password\x20configured');}if(!this[_0x34bc('0x85')](_0x51a21b[_0x34bc('0xf3')])){return this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0xab'));}this[_0x34bc('0xd')][_0x34bc('0xe9')]=!![];this[_0x34bc('0x35')](_0x51a21b);this[_0x34bc('0x3f')](_0x51a21b[_0x34bc('0x5a')],'in','','');this['channel']['noop'](util['format'](_0x34bc('0xf4'),_0x51a21b[_0x34bc('0x5a')]));var _0x271a27=this[_0x34bc('0x80')][_0x34bc('0x6d')](this,_0x51a21b);if(_0x271a27){for(var _0x2dad53 in _0x271a27){if(_0x271a27[_0x34bc('0x99')](_0x2dad53)){this[_0x34bc('0xd')][_0x34bc('0xa0')](util['format'](_0x34bc('0xf5'),_0x2dad53[_0x34bc('0xf6')]()),_0x271a27[_0x2dad53]);}}this[_0x34bc('0x3f')](_0x271a27[_0x34bc('0xeb')],'out','sesteknda','');if(_0x271a27[_0x34bc('0xf7')]){this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0xf8'),_0x271a27[_0x34bc('0xf7')]));var _0x586528=this[_0x34bc('0xd')]['streamFile'](_0x271a27[_0x34bc('0xf7')]);try{fs[_0x34bc('0xf9')](_0x271a27[_0x34bc('0xf7')]+'.wav');}catch(_0x15905c){logger[_0x34bc('0x2b')](_0x15905c);}return _0x586528;}else{return this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')]('SestekNDA\x20Result\x20%s',_0x271a27[_0x34bc('0xeb')]));}}return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x51a21b,_0x34bc('0xfa'));};AGIVertices[_0x34bc('0x13')][_0x34bc('0xfb')]=function(_0x3bec77){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0xfc'),_0x3bec77['label']));return this[_0x34bc('0xd')][_0x34bc('0xaa')]('end');};AGIVertices[_0x34bc('0x13')][_0x34bc('0xfd')]=function(_0xa4df24){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0xfe'),_0xa4df24[_0x34bc('0xa9')]));var _0x5ba34b='';if(_0xa4df24[_0x34bc('0xff')]){if(!this[_0x34bc('0x85')](_0xa4df24[_0x34bc('0xff')])){return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0xa4df24,_0x34bc('0x100'));}else{var _0xe4bce6=parseInt(_0xa4df24[_0x34bc('0xff')],0xa);if(isNaN(_0xe4bce6)){_0x5ba34b=_0xa4df24['trunk_id'];}else{_0x5ba34b=this[_0x34bc('0x1a')][_0x34bc('0x6d')](this,_0xa4df24[_0x34bc('0xff')]);if(!_0x5ba34b){return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0xa4df24,'no\x20trunk\x20found');}}}}else if(_0xa4df24[_0x34bc('0x101')]){_0x5ba34b=_0xa4df24[_0x34bc('0x101')];}else{return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0xa4df24,'no\x20trunk\x20selected');}var _0x103985=this[_0x34bc('0xd')][_0x34bc('0x55')](_0x34bc('0xdd'),[util[_0x34bc('0x28')](_0x34bc('0x102'),_0x5ba34b,_0xa4df24['phone']),_0xa4df24['timeout'],_0xa4df24[_0x34bc('0x103')],_0xa4df24[_0x34bc('0x63')]]);if(_0x103985[_0x34bc('0xa3')]===-0x1){return _0x103985;}return this[_0x34bc('0xd')]['noop'](util[_0x34bc('0x28')](_0x34bc('0xdf'),_0x34bc('0xdd')));};AGIVertices[_0x34bc('0x13')]['finally']=function(_0x488c55){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x104'),_0x488c55[_0x34bc('0xa9')]));return this['channel'][_0x34bc('0xaa')]('finally');};AGIVertices[_0x34bc('0x13')][_0x34bc('0x105')]=function(_0x28d185){logger['info'](util[_0x34bc('0x28')](_0x34bc('0x106'),_0x28d185[_0x34bc('0xa9')]));if(_0x28d185[_0x34bc('0xa6')]===0x0){return this[_0x34bc('0xa5')](_0x28d185);}_0x28d185[_0x34bc('0xa6')]-=0x1;if(!this[_0x34bc('0x85')](_0x28d185['file_id'])){return this['channel'][_0x34bc('0x2b')](_0x28d185,_0x34bc('0x107'));}var _0x37b5b8=this[_0x34bc('0x108')]['sync'](this,_0x28d185[_0x34bc('0x109')]);if(!_0x37b5b8){return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x28d185,_0x34bc('0x10a'));}if(!this[_0x34bc('0x85')](_0x28d185[_0x34bc('0xd1')])){return this['channel'][_0x34bc('0x2b')](_0x34bc('0xd2'));}var _0x3ab42a=this[_0x34bc('0xd')][_0x34bc('0x10b')](_0x37b5b8,_0x28d185[_0x34bc('0x10c')],_0x28d185[_0x34bc('0x10d')]);var _0x270827=_0x3ab42a[_0x34bc('0xa3')]?_0x3ab42a[_0x34bc('0xa3')][_0x34bc('0x49')]():'';logger[_0x34bc('0x2c')](_0x34bc('0x10e'),JSON[_0x34bc('0x72')](_0x3ab42a));if(_0x3ab42a[_0x34bc('0xa3')]===-0x1){this[_0x34bc('0x35')][_0x34bc('0x6d')](this,_0x28d185,_0x270827);return _0x3ab42a;}else if(_0x3ab42a['extra']===_0x34bc('0x65')){_0x3ab42a[_0x34bc('0xa3')]=_0x270827['length']>=parseInt(_0x28d185[_0x34bc('0x10f')])?'x':'i';}else{_0x3ab42a[_0x34bc('0xa3')]=_0x270827[_0x34bc('0x9b')]>=parseInt(_0x28d185[_0x34bc('0x10f')])&&_0x270827[_0x34bc('0x9b')]<=parseInt(_0x28d185['maxdigit'])?'x':'i';}var _0x1d3ca7=this[_0x34bc('0xf')][_0x34bc('0x6d')](this,_0x28d185[_0x34bc('0xd1')]);if(!_0x1d3ca7){return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x28d185,_0x34bc('0xd3'));}this['channel'][_0x34bc('0xa0')](_0x1d3ca7,_0x270827);if(this[_0x34bc('0x85')](_0x28d185[_0x34bc('0x110')])){var _0x2ddd8b=parseInt(_0x28d185[_0x34bc('0x110')],0xa);var _0x5b00d4=rs[_0x34bc('0x111')]({'charset':'*','length':_0x2ddd8b});var _0x33bc51=_0x270827[_0x34bc('0x9b')];if(_0x33bc51>0x0){if(_0x33bc51>_0x2ddd8b){this['createSquareDetailsReport'][_0x34bc('0x6d')](this,_0x28d185,_0x28d185['hiddendigitspos']===_0x34bc('0x112')?_0x5b00d4+_0x270827['substr'](_0x2ddd8b):_0x270827[_0x34bc('0x113')](0x0,_0x33bc51-_0x2ddd8b)+_0x5b00d4);}else{this[_0x34bc('0x35')][_0x34bc('0x6d')](this,_0x28d185,rs[_0x34bc('0x111')]({'charset':'*','length':_0x33bc51}));}}else{this[_0x34bc('0x35')][_0x34bc('0x6d')](this,_0x28d185,'');}}else{this[_0x34bc('0x35')][_0x34bc('0x6d')](this,_0x28d185,_0x270827);}return _0x3ab42a;};AGIVertices[_0x34bc('0x13')]['getsecretdigits']=function(_0x29a700){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x114'),_0x29a700[_0x34bc('0xa9')]));return this[_0x34bc('0x105')](_0x29a700);};AGIVertices[_0x34bc('0x13')][_0x34bc('0x115')]=function(_0x3f56ab){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x116'),_0x3f56ab[_0x34bc('0xa9')]));this[_0x34bc('0x35')][_0x34bc('0x6d')](this,_0x3f56ab,_0x3f56ab[_0x34bc('0x117')]);return this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0x118'),_0x3f56ab[_0x34bc('0x117')]));};AGIVertices[_0x34bc('0x13')]['awspolly']=function(_0x3c5d51){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x119'),_0x3c5d51['label']));if(!this[_0x34bc('0x85')](_0x3c5d51[_0x34bc('0x88')])||!this[_0x34bc('0x85')](_0x3c5d51[_0x34bc('0x89')])){return this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0x11a'));}if(!this[_0x34bc('0x85')](_0x3c5d51['text'])){return this['channel']['noop']('no\x20text\x20configured');}this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0x11b'),_0x3c5d51[_0x34bc('0x5a')]));var _0xec4fd3=this[_0x34bc('0x87')][_0x34bc('0x6d')](this,_0x3c5d51);if(_0xec4fd3){this[_0x34bc('0xd')]['noop'](util[_0x34bc('0x28')]('aws\x20Polly\x20%s\x20file\x20created',_0xec4fd3));var _0x102058=this['channel'][_0x34bc('0x11c')](_0xec4fd3);try{fs[_0x34bc('0xf9')](_0xec4fd3+'.wav');}catch(_0x16ecdb){logger[_0x34bc('0x2b')](_0x16ecdb);}return _0x102058;}return this[_0x34bc('0xd')]['error'](_0x3c5d51,_0x34bc('0x11d'));};AGIVertices[_0x34bc('0x13')][_0x34bc('0x11e')]=function(_0x1f3fc5){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x11f'),_0x1f3fc5[_0x34bc('0xa9')]));if(!this[_0x34bc('0x85')](_0x1f3fc5[_0x34bc('0x88')])||!this[_0x34bc('0x85')](_0x1f3fc5[_0x34bc('0x89')])){return this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0x11a'));}if(!this[_0x34bc('0x85')](_0x1f3fc5[_0x34bc('0x120')])){return this[_0x34bc('0xd')]['noop'](_0x34bc('0x121'));}if(!this[_0x34bc('0x85')](_0x1f3fc5['text'])){return this['channel'][_0x34bc('0xaa')](_0x34bc('0xab'));}this[_0x34bc('0xd')][_0x34bc('0xe9')]=!![];this[_0x34bc('0x35')](_0x1f3fc5);this['createSquareMessage'](_0x1f3fc5['text'],'in','','');this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0x122'),_0x1f3fc5['text']));var _0x3a243e=this[_0x34bc('0x8c')][_0x34bc('0x6d')](this,_0x1f3fc5);if(_0x3a243e){for(var _0x2f0572 in _0x3a243e){if(_0x3a243e[_0x34bc('0x99')](_0x2f0572)&&_[_0x34bc('0x95')](_0x3a243e[_0x2f0572])){this[_0x34bc('0xd')][_0x34bc('0xa0')](util[_0x34bc('0x28')](_0x34bc('0x123'),_0x2f0572[_0x34bc('0xf6')]()),_0x3a243e[_0x2f0572]);}}if(_[_0x34bc('0x41')](_0x3a243e['message'])){return this['channel'][_0x34bc('0xaa')]('Amazon\x20Lex\x20ready\x20for\x20fulfillment');}else{this['createSquareMessage'](_0x3a243e[_0x34bc('0x75')],_0x34bc('0xe3'),_0x34bc('0x124'),'');return this[_0x34bc('0xd')][_0x34bc('0xaa')](util['format'](_0x34bc('0x125'),_0x3a243e[_0x34bc('0x75')]));}}return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x1f3fc5,_0x34bc('0x126'));};AGIVertices[_0x34bc('0x13')][_0x34bc('0x127')]=function(_0x82596a){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x128'),_0x82596a[_0x34bc('0xa9')],_0x82596a[_0x34bc('0x65')]));if(!this['isConfigured'](_0x82596a[_0x34bc('0x79')])){return this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0xe1'));}var _0x53cb6f='wav';var _0x48fcec=util[_0x34bc('0x28')](_0x34bc('0x129'),FILES_PATH,rs[_0x34bc('0x111')](0x4));var _0xee5898=util[_0x34bc('0x28')]('%s.%s',_0x48fcec,_0x53cb6f);var _0x2e59e4=!![];if(_0x82596a[_0x34bc('0x12a')]===_0x34bc('0x12b')){_0x2e59e4=![];}var _0x56e1b5=this['channel'][_0x34bc('0x12c')](_0x48fcec,_0x53cb6f,_0x82596a['intKey'],_0x82596a[_0x34bc('0x65')],undefined,_0x2e59e4);if(_0x56e1b5['result']!==-0x1){this[_0x34bc('0xd')]['noop'](util['format'](_0x34bc('0x12d'),_0xee5898));var _0x209c32=this[_0x34bc('0x8e')][_0x34bc('0x6d')](this,_0x82596a,_0xee5898);if(_0x209c32){for(var _0x55d1ee in _0x209c32){if(_0x209c32[_0x34bc('0x99')](_0x55d1ee)){this['channel']['setVariable'](util['format'](_0x34bc('0x12e'),_0x55d1ee[_0x34bc('0xf6')]()),_0x209c32[_0x55d1ee]);}}return this[_0x34bc('0xd')]['noop'](util[_0x34bc('0x28')]('GoogleASR\x20Result\x20%s',JSON[_0x34bc('0x72')](_0x209c32)));}}return _0x56e1b5;};AGIVertices[_0x34bc('0x13')]['tildeasr']=function(_0x5eb024){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x12f'),_0x5eb024[_0x34bc('0xa9')]));if(!this['isConfigured'](_0x5eb024[_0x34bc('0x91')])){return this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0x130'));}if(!this[_0x34bc('0x85')](_0x5eb024[_0x34bc('0x92')])){return this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0x131'));}var _0x4343be='wav';var _0x180757=util[_0x34bc('0x28')](_0x34bc('0x129'),FILES_PATH,rs[_0x34bc('0x111')](0x4));var _0x5d4b13=util[_0x34bc('0x28')](_0x34bc('0x9e'),_0x180757,_0x4343be);var _0x2c8d68=!![];if(_0x5eb024[_0x34bc('0x12a')]===_0x34bc('0x12b')){_0x2c8d68=![];}var _0x1b303c=this['channel'][_0x34bc('0x12c')](_0x180757,_0x4343be,_0x5eb024['intKey'],_0x5eb024[_0x34bc('0x65')],undefined,_0x2c8d68);if(_0x1b303c[_0x34bc('0xa3')]!==-0x1){this[_0x34bc('0xd')]['noop'](util[_0x34bc('0x28')](_0x34bc('0x132'),_0x5d4b13));var _0xedf340=this[_0x34bc('0x90')][_0x34bc('0x6d')](this,_0x5eb024,_0x5d4b13);if(_0xedf340){for(var _0x2bbbb3 in _0xedf340){if(_0xedf340['hasOwnProperty'](_0x2bbbb3)){this[_0x34bc('0xd')][_0x34bc('0xa0')](util[_0x34bc('0x28')](_0x34bc('0x133'),_0x2bbbb3[_0x34bc('0xf6')]()),_0xedf340[_0x2bbbb3]);}}return this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0x134'),JSON[_0x34bc('0x72')](_0xedf340)));}}return _0x1b303c;};AGIVertices[_0x34bc('0x13')][_0x34bc('0x135')]=function(_0x2f61f0){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x136'),_0x2f61f0['label']));return this['channel'][_0x34bc('0x137')](_0x2f61f0['context'],_0x2f61f0[_0x34bc('0x138')],_0x2f61f0['priority']);};AGIVertices[_0x34bc('0x13')][_0x34bc('0x139')]=function(_0x5c710a){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x13a'),_0x5c710a[_0x34bc('0xa9')]));if(!this['isConfigured'](_0x5c710a['condition'])){return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x5c710a,'no\x20condition\x20configured');}try{var _0x2fdacd=eval(_0x5c710a['condition'])?_0x34bc('0x13b'):_0x34bc('0x13c');this[_0x34bc('0xd')]['noop'](util[_0x34bc('0x28')](_0x34bc('0x13d'),_0x5c710a[_0x34bc('0x13e')],_0x2fdacd));return{'code':0xc8,'result':_0x2fdacd};}catch(_0x30be37){return{'code':0xc8,'result':_0x34bc('0x13c')};}};AGIVertices[_0x34bc('0x13')][_0x34bc('0x13f')]=function(_0x5c2ab8){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x140'),_0x5c2ab8['label']));if(!this[_0x34bc('0x85')](_0x5c2ab8[_0x34bc('0x141')])){return this['channel'][_0x34bc('0x2b')](_0x5c2ab8,_0x34bc('0x142'));}var _0x48c153=this[_0x34bc('0x143')][_0x34bc('0x6d')](this,_0x5c2ab8[_0x34bc('0x141')]);if(!_0x48c153){return this[_0x34bc('0xd')]['error'](_0x5c2ab8,'no\x20intervals\x20found');}for(var _0x3d3555=0x0;_0x3d3555<_0x48c153[_0x34bc('0x9b')];_0x3d3555+=0x1){var _0x5cb344=this[_0x34bc('0xd')][_0x34bc('0xf')](util[_0x34bc('0x28')](_0x34bc('0x144'),_0x48c153[_0x3d3555]));if(_0x5cb344[_0x34bc('0xa3')]===-0x1){return _0x5cb344;}logger[_0x34bc('0x2c')](util[_0x34bc('0x28')]('IFTIME\x20%s\x20%s',_0x48c153[_0x3d3555],_0x5cb344[_0x34bc('0xa1')]));if(_0x5cb344['extra']===_0x34bc('0x13b')){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x145'),_0x48c153[_0x3d3555],'true'));this[_0x34bc('0xd')]['noop'](util[_0x34bc('0x28')](_0x34bc('0x145'),_0x48c153[_0x3d3555],_0x34bc('0x13b')));return{'code':0xc8,'result':_0x34bc('0x13b')};}else{logger[_0x34bc('0x2c')](util[_0x34bc('0x28')]('IFTIME\x20%s\x20%s',_0x48c153[_0x3d3555],_0x34bc('0x13c')));this[_0x34bc('0xd')]['noop'](util[_0x34bc('0x28')](_0x34bc('0x145'),_0x48c153[_0x3d3555],'false'));}}return{'code':0xc8,'result':_0x34bc('0x13c')};};AGIVertices[_0x34bc('0x13')][_0x34bc('0x146')]=function(_0x28e8a8){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x147'),_0x28e8a8['label']));return this['channel'][_0x34bc('0x146')]();};AGIVertices[_0x34bc('0x13')][_0x34bc('0x148')]=function(_0x5d33f){logger[_0x34bc('0x2c')](util['format'](_0x34bc('0x149'),_0x5d33f[_0x34bc('0xa9')]));if(!this[_0x34bc('0x85')](_0x5d33f[_0x34bc('0x79')])){return this['channel'][_0x34bc('0xaa')](_0x34bc('0xe1'));}var _0x431b03='wav';var _0x35aba3=util[_0x34bc('0x28')](_0x34bc('0x129'),FILES_PATH,rs[_0x34bc('0x111')](0x4));var _0x1fbca2=util[_0x34bc('0x28')](_0x34bc('0x9e'),_0x35aba3,_0x431b03);var _0x26b5ad=!![];if(_0x5d33f[_0x34bc('0x12a')]===_0x34bc('0x12b')){_0x26b5ad=![];}var _0xc897ad=this[_0x34bc('0xd')][_0x34bc('0x12c')](_0x35aba3,_0x431b03,_0x5d33f[_0x34bc('0x14a')],_0x5d33f[_0x34bc('0x65')],undefined,_0x26b5ad);if(_0xc897ad['result']!==-0x1){this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0x14b'),_0x1fbca2));var _0x586a0f=this['ispeechASR'][_0x34bc('0x6d')](this,_0x5d33f,_0x1fbca2);if(_0x586a0f){for(var _0x1e2428 in _0x586a0f){if(_0x586a0f[_0x34bc('0x99')](_0x1e2428)){this[_0x34bc('0xd')][_0x34bc('0xa0')](util['format'](_0x34bc('0x14c'),_0x1e2428[_0x34bc('0xf6')]()),_0x586a0f[_0x1e2428]);}}return this[_0x34bc('0xd')]['noop'](util[_0x34bc('0x28')](_0x34bc('0x14d'),JSON[_0x34bc('0x72')](_0x586a0f)));}}return _0xc897ad;};AGIVertices[_0x34bc('0x13')][_0x34bc('0x14e')]=function(_0x146131){logger['info'](util[_0x34bc('0x28')]('Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block',_0x146131['label']));if(!this['isConfigured'](_0x146131[_0x34bc('0x79')])){return this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0xe1'));}if(!this['isConfigured'](_0x146131[_0x34bc('0x5a')])){return this[_0x34bc('0xd')][_0x34bc('0xaa')]('no\x20text\x20configured');}this['channel'][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0x14f'),_0x146131[_0x34bc('0x5a')]));var _0x3a1d35=this[_0x34bc('0x81')][_0x34bc('0x6d')](this,_0x146131);if(_0x3a1d35){this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0x14b'),_0x3a1d35));var _0x5f095f=this['channel'][_0x34bc('0x11c')](_0x3a1d35,_0x146131[_0x34bc('0x14a')]);try{fs[_0x34bc('0xf9')](_0x3a1d35+_0x34bc('0x150'));}catch(_0x545109){logger[_0x34bc('0x2b')](_0x545109);}return _0x5f095f;}return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x146131,'ispeech\x20TTS\x20is\x20unreachable');};AGIVertices[_0x34bc('0x13')]['login']=function(_0x752ab0){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x151'),_0x752ab0['label']));if(!this[_0x34bc('0x85')](_0x752ab0[_0x34bc('0x152')])){return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x752ab0,'no\x20find\x20by\x20configured');}logger[_0x34bc('0x2c')](util[_0x34bc('0x28')]('FIND\x20AGENT\x20%s\x20BY\x20%s',this[_0x34bc('0xd')][_0x34bc('0x38')],_0x752ab0[_0x34bc('0x152')]));var _0x190881=this[_0x34bc('0x51')][_0x34bc('0x6d')](this,_0x752ab0['findBy']);if(_0x190881){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x153'),this['channel'][_0x34bc('0x38')],_0x752ab0[_0x34bc('0x152')]));this[_0x34bc('0xd')][_0x34bc('0xaa')](util['format'](_0x34bc('0x153'),this[_0x34bc('0xd')][_0x34bc('0x38')],_0x752ab0[_0x34bc('0x152')]));return{'code':0xc8,'result':_0x34bc('0x154')};}else{logger['info'](util[_0x34bc('0x28')](_0x34bc('0x155'),this[_0x34bc('0xd')][_0x34bc('0x38')],_0x752ab0['findBy']));this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this['channel'][_0x34bc('0x38')],_0x752ab0[_0x34bc('0x152')]));return{'code':0xc8,'result':_0x34bc('0x156')};}};AGIVertices[_0x34bc('0x13')][_0x34bc('0x157')]=function(_0x38f6bd){logger['info'](util[_0x34bc('0x28')]('Enter\x20in\x20LOGOUT\x20(%s)\x20block',_0x38f6bd[_0x34bc('0xa9')]));if(!this[_0x34bc('0x85')](_0x38f6bd[_0x34bc('0x152')])){return this[_0x34bc('0xd')]['error'](_0x38f6bd,'no\x20find\x20by\x20configured');}logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x158'),this[_0x34bc('0xd')][_0x34bc('0x38')],_0x38f6bd[_0x34bc('0x152')]));var _0x23618c=this[_0x34bc('0x50')][_0x34bc('0x6d')](this,_0x38f6bd[_0x34bc('0x152')]);if(_0x23618c){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x153'),this[_0x34bc('0xd')][_0x34bc('0x38')],_0x38f6bd[_0x34bc('0x152')]));this['channel'][_0x34bc('0xaa')](util['format'](_0x34bc('0x153'),this['channel']['callerid'],_0x38f6bd[_0x34bc('0x152')]));return{'code':0xc8,'result':_0x34bc('0x154')};}else{logger[_0x34bc('0x2c')](util[_0x34bc('0x28')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this['channel'][_0x34bc('0x38')],_0x38f6bd[_0x34bc('0x152')]));this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0x155'),this[_0x34bc('0xd')][_0x34bc('0x38')],_0x38f6bd['findBy']));return{'code':0xc8,'result':_0x34bc('0x156')};}};AGIVertices[_0x34bc('0x13')]['math']=function(_0x1a07fd){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x159'),_0x1a07fd[_0x34bc('0xa9')]));if(!this[_0x34bc('0x85')](_0x1a07fd['operation'])){return this[_0x34bc('0xd')]['error'](_0x1a07fd,'no\x20operation\x20configured');}this[_0x34bc('0xd')][_0x34bc('0xaa')](util['format'](_0x34bc('0x15a'),_0x1a07fd[_0x34bc('0x15b')]));var _0x19f9cb=eval(_0x1a07fd[_0x34bc('0x15b')]);if(!this['isConfigured'](_0x1a07fd['variable_id'])){return this[_0x34bc('0xd')][_0x34bc('0xaa')]('no\x20variable\x20selected\x20for\x20the\x20result');}var _0x1b41f2=this[_0x34bc('0xf')][_0x34bc('0x6d')](this,_0x1a07fd[_0x34bc('0xd1')]);if(!_0x1b41f2){return this[_0x34bc('0xd')]['error'](_0x1a07fd,_0x34bc('0xd3'));}if(_[_0x34bc('0x9f')](_0x19f9cb)){var _0x2b7124=this;_0x19f9cb[_0x34bc('0xd4')](function(_0x458c70,_0x305702){_0x2b7124[_0x34bc('0xd')][_0x34bc('0xa0')](util[_0x34bc('0x28')](_0x34bc('0x15c'),_0x1b41f2,_0x305702),_0x458c70);});return this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0x15d'),_0x1b41f2));}else{return this[_0x34bc('0xd')][_0x34bc('0xa0')](_0x1b41f2,_0x19f9cb);}};AGIVertices[_0x34bc('0x13')][_0x34bc('0x15e')]=function(_0x55f57f){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')]('Enter\x20in\x20MENU\x20(%s)\x20block',_0x55f57f['label']));if(_0x55f57f['retry']===0x0){return this[_0x34bc('0xa5')](_0x55f57f);}_0x55f57f[_0x34bc('0xa6')]-=0x1;if(!this['isConfigured'](_0x55f57f[_0x34bc('0x109')])){return this['channel']['error'](_0x55f57f,_0x34bc('0x107'));}var _0x39d594=this[_0x34bc('0x108')][_0x34bc('0x6d')](this,_0x55f57f[_0x34bc('0x109')]);if(!_0x39d594){return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x55f57f,_0x34bc('0x10a'));}var _0x1c2e7c=this[_0x34bc('0xd')][_0x34bc('0x10b')](_0x39d594,_0x55f57f[_0x34bc('0x10c')],_0x55f57f[_0x34bc('0x15f')]);var _0x1b1862=_0x1c2e7c['result'];if(_0x1c2e7c[_0x34bc('0xa3')]===-0x1){this[_0x34bc('0x35')][_0x34bc('0x6d')](this,_0x55f57f,'-1');return _0x1c2e7c;}else if(_0x1c2e7c['extra']==='timeout'){_0x1c2e7c[_0x34bc('0xa3')]=_0x1c2e7c[_0x34bc('0xa3')][_0x34bc('0x9b')]>0x0?_0x1c2e7c['result']:'t';}else if(_[_0x34bc('0x9d')](_0x1c2e7c['result'])){_0x1c2e7c['result']='#';_0x1b1862='#';}if(!this[_0x34bc('0x85')](_0x55f57f[_0x34bc('0xd1')])){this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0xd2'));}else{var _0x15acfd=this[_0x34bc('0xf')]['sync'](this,_0x55f57f['variable_id']);if(!_0x15acfd){return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x55f57f,_0x34bc('0xd3'));}this[_0x34bc('0xd')][_0x34bc('0xa0')](_0x15acfd,_0x1b1862);}this[_0x34bc('0x35')][_0x34bc('0x6d')](this,_0x55f57f,_0x1b1862);return _0x1c2e7c;};AGIVertices[_0x34bc('0x13')]['noop']=function(_0xbcb397){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x160'),_0xbcb397['label']));return this['channel'][_0x34bc('0xaa')](_0xbcb397['output']||_0xbcb397[_0x34bc('0xa9')]);};AGIVertices[_0x34bc('0x13')]['pause']=function(_0x4ed076){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')]('Enter\x20in\x20PAUSE\x20(%s)\x20block',_0x4ed076[_0x34bc('0xa9')]));if(!this['isConfigured'](_0x4ed076['findBy'])){return this[_0x34bc('0xd')]['error'](_0x4ed076,_0x34bc('0x161'));}logger['info'](util[_0x34bc('0x28')]('FIND\x20AGENT\x20%s\x20BY\x20%s',this[_0x34bc('0xd')][_0x34bc('0x38')],_0x4ed076[_0x34bc('0x152')]));var _0x1943a2=this[_0x34bc('0x4b')][_0x34bc('0x6d')](this,_0x4ed076[_0x34bc('0x162')]);var _0x1ab3b0=this[_0x34bc('0x4d')][_0x34bc('0x6d')](this,_0x4ed076[_0x34bc('0x152')],_0x1943a2);if(_0x1ab3b0){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x153'),this[_0x34bc('0xd')][_0x34bc('0x38')],_0x4ed076[_0x34bc('0x152')]));this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0x153'),this[_0x34bc('0xd')]['callerid'],_0x4ed076[_0x34bc('0x152')]));return{'code':0xc8,'result':_0x34bc('0x154')};}else{logger[_0x34bc('0x2c')](util['format'](_0x34bc('0x155'),this[_0x34bc('0xd')][_0x34bc('0x38')],_0x4ed076[_0x34bc('0x152')]));this['channel'][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0x153'),this[_0x34bc('0xd')][_0x34bc('0x38')],_0x4ed076[_0x34bc('0x152')]));return{'code':0xc8,'result':_0x34bc('0x156')};}};AGIVertices[_0x34bc('0x13')][_0x34bc('0x163')]=function(_0x2e8be6){logger[_0x34bc('0x2c')](util['format'](_0x34bc('0x164'),_0x2e8be6[_0x34bc('0xa9')]));if(!this[_0x34bc('0x85')](_0x2e8be6[_0x34bc('0x109')])){return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x2e8be6,_0x34bc('0x107'));}var _0x173955=this[_0x34bc('0x108')][_0x34bc('0x6d')](this,_0x2e8be6['file_id']);if(!_0x173955){return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x2e8be6,_0x34bc('0x10a'));}var _0x55d11e=this[_0x34bc('0xd')][_0x34bc('0x55')](_0x34bc('0x165'),[_0x173955,_0x2e8be6[_0x34bc('0x103')]]);if(_0x55d11e[_0x34bc('0xa3')]===-0x1){return _0x55d11e;}return this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0x166'),'PLAYBACK',_0x173955));};AGIVertices[_0x34bc('0x13')][_0x34bc('0x167')]=function(_0x91b3ad){logger['info'](util[_0x34bc('0x28')](_0x34bc('0x168'),_0x91b3ad['label']));if(!this[_0x34bc('0x85')](_0x91b3ad[_0x34bc('0x169')])){return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x91b3ad,_0x34bc('0x16a'));}var _0x3fea92='';var _0x30238f=parseInt(_0x91b3ad[_0x34bc('0x169')],0xa);if(isNaN(_0x30238f)){_0x3fea92=_0x91b3ad[_0x34bc('0x169')];}else{_0x3fea92=this[_0x34bc('0x16b')][_0x34bc('0x6d')](this,_0x91b3ad[_0x34bc('0x169')]);if(!_0x3fea92){return this['channel'][_0x34bc('0x2b')](_0x91b3ad,_0x34bc('0x16c'));}}var _0x8b47a6='';if(this[_0x34bc('0x85')](_0x91b3ad[_0x34bc('0x109')])){var _0x32a161=this[_0x34bc('0x108')][_0x34bc('0x6d')](this,_0x91b3ad['file_id']);if(_0x32a161){_0x8b47a6=_0x32a161;}}this['createSquareDetailsReport'][_0x34bc('0x6d')](this,_0x91b3ad,_0x3fea92);if(_0x91b3ad[_0x34bc('0x103')][_0x34bc('0x16d')]('x')<0x0){_0x91b3ad['opts']+='x';}if(_0x91b3ad[_0x34bc('0x103')][_0x34bc('0x16d')]('X')<0x0){_0x91b3ad[_0x34bc('0x103')]+='X';}this[_0x34bc('0xd')][_0x34bc('0xa0')](_0x34bc('0x16e'),_0x3fea92?_0x3fea92[_0x34bc('0x16f')]():'');var _0x54e003=this[_0x34bc('0xd')][_0x34bc('0x55')](_0x34bc('0x170'),[_0x3fea92,_0x91b3ad[_0x34bc('0x103')],_0x91b3ad[_0x34bc('0x63')],_0x8b47a6,_0x91b3ad[_0x34bc('0x65')],_0x91b3ad['agi'],_0x91b3ad['macro'],_0x91b3ad[_0x34bc('0x171')],'',_0x91b3ad['position']]);if(_0x54e003[_0x34bc('0xa3')]===-0x1){return _0x54e003;}return this[_0x34bc('0xd')]['noop'](util[_0x34bc('0x28')]('Executed\x20command\x20%s\x20%s',_0x34bc('0x170'),_0x3fea92));};AGIVertices['prototype']['record']=function(_0xd0295a){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x172'),_0xd0295a[_0x34bc('0xa9')]));var _0x5147a1=_0xd0295a['recordingFormat']||'wav';var _0x20b516=util[_0x34bc('0x28')](_0x34bc('0x173'),this[_0x34bc('0xd')][_0x34bc('0x3a')],rs[_0x34bc('0x111')](0x5));var _0x1783fc=util['format']('%s/recordings/%s.%s',FILES_PATH,_0x20b516,_0x5147a1);var _0x20b802=util[_0x34bc('0x28')](_0x34bc('0x129'),FILES_PATH,_0x20b516);this[_0x34bc('0x39')][_0x34bc('0x6d')](this,_0xd0295a,_0x20b516,_0x1783fc);this[_0x34bc('0xd')][_0x34bc('0xa0')](_0x34bc('0x174'),_0x20b516);logger[_0x34bc('0x2c')]('Recording\x20%s\x20%s\x20%s\x20%s',_0x20b802,_0x5147a1,_0xd0295a[_0x34bc('0x175')],_0xd0295a[_0x34bc('0x65')]);return this[_0x34bc('0xd')]['recordFile'](_0x20b802,_0x5147a1,_0xd0295a['escape_digits'],_0xd0295a['timeout'],undefined,!![]);};AGIVertices[_0x34bc('0x13')]['restapi']=function(_0x50b65d){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')]('Enter\x20in\x20RESTAPI\x20(%s)\x20block',_0x50b65d[_0x34bc('0xa9')]));if(!this[_0x34bc('0x85')](_0x50b65d[_0x34bc('0x63')])){return this['channel']['noop']('no\x20url\x20configured');}var _0x2d56fd=this[_0x34bc('0x62')][_0x34bc('0x6d')](this,_0x50b65d);logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x176'),util[_0x34bc('0x177')](_0x2d56fd,{'showHidden':![],'depth':null})));if(!this[_0x34bc('0x85')](_0x50b65d['variable_id'])){return this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0x178'));}var _0x58a094=this[_0x34bc('0xf')][_0x34bc('0x6d')](this,_0x50b65d['variable_id']);if(!_0x58a094){return this[_0x34bc('0xd')]['error'](_0x50b65d,_0x34bc('0xd3'));}this[_0x34bc('0xd')][_0x34bc('0xa0')](util[_0x34bc('0x28')]('%s_STATUS_CODE',_0x58a094),_0x2d56fd[_0x34bc('0x74')]?_0x2d56fd['statusCode']:_0x34bc('0x179'));this[_0x34bc('0xd')][_0x34bc('0xa0')](util[_0x34bc('0x28')](_0x34bc('0x17a'),_0x58a094),_0x2d56fd['statusMessage']?_0x2d56fd[_0x34bc('0x17b')]:'OK');if(_0x2d56fd[_0x34bc('0x69')]){try{this[_0x34bc('0x9c')](_0x2d56fd[_0x34bc('0x69')],_0x58a094);}catch(_0x43999d){logger['error'](util['format'](_0x34bc('0x17c'),_0x58a094));}}return this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0xd7'),_0x58a094));};AGIVertices['prototype'][_0x34bc('0x17d')]=function(_0x5c099a){logger['info'](util[_0x34bc('0x28')]('Enter\x20in\x20SAYDIGITS\x20(%s)\x20block',_0x5c099a['label']));return this[_0x34bc('0xd')][_0x34bc('0x17e')](_0x5c099a[_0x34bc('0x17f')][_0x34bc('0xd0')](/\s+/g,''),_0x5c099a[_0x34bc('0x175')]);};AGIVertices[_0x34bc('0x13')][_0x34bc('0x180')]=function(_0x91b695){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x181'),_0x91b695['label']));return this[_0x34bc('0xd')][_0x34bc('0x182')](_0x91b695[_0x34bc('0x183')][_0x34bc('0xd0')](/\s+/g,''),_0x91b695[_0x34bc('0x175')]);};AGIVertices[_0x34bc('0x13')]['sayphonetic']=function(_0x1c815a){logger[_0x34bc('0x2c')](util['format']('Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block',_0x1c815a['label']));return this[_0x34bc('0xd')][_0x34bc('0x184')](_0x1c815a[_0x34bc('0x5a')],_0x1c815a[_0x34bc('0x175')]);};AGIVertices[_0x34bc('0x13')][_0x34bc('0x185')]=function(_0xb20562){logger[_0x34bc('0x2c')](util['format'](_0x34bc('0x186'),_0xb20562['label']));if(!this[_0x34bc('0x85')](_0xb20562[_0x34bc('0x187')])){return this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0x188'));}var _0x214532=this[_0x34bc('0x189')][_0x34bc('0x6d')](this,_0xb20562[_0x34bc('0x187')]);if(!_0x214532||!_0x214532[_0x34bc('0x18a')]){return this[_0x34bc('0xd')]['error'](_0xb20562,_0x34bc('0x18b'));}var _0x41c9a1={'from':util['format'](_0x34bc('0x18c'),_0x214532[_0x34bc('0x11')],_0x214532[_0x34bc('0x18d')]||_0x214532[_0x34bc('0x18a')][_0x34bc('0x18e')]),'to':_0xb20562['to']||'','cc':_0xb20562['cc']||'','bcc':_0xb20562['bcc']||'','subject':_0xb20562['subject'],'html':_0xb20562['text'],'text':_0xb20562[_0x34bc('0x5a')]};if(this[_0x34bc('0x85')](_0xb20562[_0x34bc('0x18f')])){}logger[_0x34bc('0x190')](_0x34bc('0x191'),JSON[_0x34bc('0x72')](_0x41c9a1));this[_0x34bc('0x35')][_0x34bc('0x6d')](this,_0xb20562,_0xb20562[_0x34bc('0x187')]);this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0x192'),_0x214532[_0x34bc('0x11')]));this[_0x34bc('0x22')]['sync'](this,_0x214532[_0x34bc('0x193')],_0x41c9a1);return this['channel'][_0x34bc('0xaa')]('Mail\x20message\x20added\x20to\x20outgoing\x20process');};AGIVertices['prototype']['sendFax']=function(_0x59ad27){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x194'),_0x59ad27[_0x34bc('0xa9')]));return this[_0x34bc('0xd')]['noop'](_0x34bc('0x195'));};AGIVertices[_0x34bc('0x13')]['sendSMS']=function(_0x2aa6b5){logger['info'](util[_0x34bc('0x28')](_0x34bc('0x196'),_0x2aa6b5[_0x34bc('0xa9')]));if(!this[_0x34bc('0x85')](_0x2aa6b5[_0x34bc('0x197')])){return this['channel'][_0x34bc('0xaa')](_0x34bc('0x198'));}var _0x5cb65f=this[_0x34bc('0x32')]['sync'](this,_0x2aa6b5[_0x34bc('0x197')]);if(!_0x5cb65f){return this['channel'][_0x34bc('0x2b')](_0x2aa6b5,_0x34bc('0x199'));}var _0x4b3236={'body':_0x2aa6b5[_0x34bc('0x19a')],'phone':_0x2aa6b5['to']||'','SmsAccountId':_0x5cb65f['id']};logger[_0x34bc('0x190')](_0x34bc('0x19b'),JSON[_0x34bc('0x72')](_0x4b3236));this[_0x34bc('0x35')][_0x34bc('0x6d')](this,_0x2aa6b5,_0x2aa6b5['sms_account_id']);this[_0x34bc('0xd')]['noop'](util[_0x34bc('0x28')](_0x34bc('0x19c'),_0x5cb65f[_0x34bc('0x11')]));this[_0x34bc('0x34')][_0x34bc('0x6d')](this,_0x4b3236);return this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0x19d'));};AGIVertices['prototype'][_0x34bc('0x19e')]=function(_0x3c4817){logger['info'](util[_0x34bc('0x28')](_0x34bc('0x19f'),_0x3c4817[_0x34bc('0xa9')]));if(!this[_0x34bc('0x85')](_0x3c4817[_0x34bc('0xd1')])){return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x3c4817,'no\x20variable\x20selected');}var _0x13b3e0=this['getVariable'][_0x34bc('0x6d')](this,_0x3c4817['variable_id']);if(!_0x13b3e0){return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x3c4817,_0x34bc('0xd3'));}return this[_0x34bc('0xd')][_0x34bc('0xa0')](_0x13b3e0,_0x3c4817[_0x34bc('0x1a0')]);};AGIVertices[_0x34bc('0x13')][_0x34bc('0x1a1')]=function(_0x46dd31){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')]('Enter\x20in\x20START\x20(%s)\x20block',_0x46dd31[_0x34bc('0xa9')]));this[_0x34bc('0xd')][_0x34bc('0xaa')](_0x34bc('0x1a2'));var _0x242a63=this[_0x34bc('0xd')][_0x34bc('0xf')]('XMCS-UNIQUEID');if(!_[_0x34bc('0x9d')](_0x242a63[_0x34bc('0xa1')])){this[_0x34bc('0xd')][_0x34bc('0x3a')]=_0x242a63[_0x34bc('0xa1')];}if(_0x46dd31[_0x34bc('0xb8')]==='yes'){this[_0x34bc('0xd')]['noop'](_0x34bc('0x1a3'));return this[_0x34bc('0xd')][_0x34bc('0xb8')]();}return this['channel'][_0x34bc('0xaa')](_0x34bc('0x1a4'));};AGIVertices[_0x34bc('0x13')][_0x34bc('0x1a5')]=function(_0x493c7b){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x1a6'),_0x493c7b['label']));if(!this['isConfigured'](_0x493c7b[_0x34bc('0x1a7')])){return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x493c7b,_0x34bc('0x1a8'));}var _0x57e9cb=this[_0x34bc('0x14')][_0x34bc('0x6d')](this,_0x493c7b[_0x34bc('0x1a7')]);if(!this[_0x34bc('0x85')](_0x57e9cb)){return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x493c7b,util['format'](_0x34bc('0x1a9'),_0x493c7b['project_id']));}if(_0x57e9cb===this['channel'][_0x34bc('0x37')]){return this[_0x34bc('0xd')]['error'](_0x493c7b,_0x34bc('0x1aa'));}this[_0x34bc('0x35')]['sync'](this,_0x493c7b,_0x57e9cb);var _0x1890e8=this[_0x34bc('0xd')][_0x34bc('0x55')](_0x34bc('0x1ab'),util[_0x34bc('0x28')](_0x34bc('0x1ac'),config[_0x34bc('0x7')][_0x34bc('0x1ad')]||_0x34bc('0x1ae'),_0x57e9cb,this[_0x34bc('0xd')][_0x34bc('0x37')]));if(_0x1890e8[_0x34bc('0xa3')]===-0x1){return _0x1890e8;}return this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')]('Executed\x20command\x20%s\x20%s','AGI',_0x57e9cb));};AGIVertices[_0x34bc('0x13')]['system']=function(_0xbd3ce0){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x1af'),_0xbd3ce0[_0x34bc('0xa9')]));var _0x24cbea=this[_0x34bc('0x54')][_0x34bc('0x6d')](this,_0xbd3ce0[_0x34bc('0xb4')]);this[_0x34bc('0x35')]['sync'](this,_0xbd3ce0,_0xbd3ce0[_0x34bc('0xb4')]);if(this['isConfigured'](_0xbd3ce0['variable_id'])){var _0x3e0cb3=this['getVariable'][_0x34bc('0x6d')](this,_0xbd3ce0[_0x34bc('0xd1')]);if(_0x3e0cb3){this['channel'][_0x34bc('0xa0')](_0x3e0cb3,_0x24cbea);return this[_0x34bc('0xd')]['noop'](util[_0x34bc('0x28')](_0x34bc('0x1b0'),_0xbd3ce0[_0x34bc('0xb4')],_0x3e0cb3));}}return this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')]('sh\x20command:\x20%s\x20result\x20no\x20stored',_0xbd3ce0[_0x34bc('0xb4')]));};AGIVertices[_0x34bc('0x13')][_0x34bc('0x1b1')]=function(_0x597630){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')]('Enter\x20in\x20Google\x20Cloud\x20TTS\x20(%s)\x20block',_0x597630['label']));_0x597630[_0x34bc('0x5a')]=_0x597630['text'][_0x34bc('0xd0')](/(\r\n|\n|\r)/gm,'\x20');if(!this[_0x34bc('0x85')](_0x597630[_0x34bc('0x58')])){return this['channel'][_0x34bc('0xaa')](_0x34bc('0x1b2'));}if(!this[_0x34bc('0x85')](_0x597630[_0x34bc('0x5a')])){return this[_0x34bc('0xd')]['noop'](_0x34bc('0xab'));}this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')]('Trying\x20Google\x20Cloud\x20TTS\x20%s',_0x597630['text']));var _0x279fe0=this[_0x34bc('0x57')]['sync'](this,_0x597630);if(_0x279fe0){this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0x1b3'),_0x279fe0));var _0x31159f=this[_0x34bc('0xd')][_0x34bc('0x11c')](_0x279fe0);try{fs[_0x34bc('0xf9')](_0x279fe0+_0x34bc('0x150'));}catch(_0x3fbd23){logger[_0x34bc('0x2b')](_0x3fbd23);}return _0x31159f;}return this['channel'][_0x34bc('0x2b')](_0x597630,_0x34bc('0x1b4'));};AGIVertices[_0x34bc('0x13')][_0x34bc('0x1b5')]=function(_0x24c69d){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x1b6'),_0x24c69d[_0x34bc('0xa9')]));_0x24c69d[_0x34bc('0x5a')]=_0x24c69d['text']['replace'](/(\r\n|\n|\r)/gm,'\x20');if(!this['isConfigured'](_0x24c69d[_0x34bc('0x5a')])){return this[_0x34bc('0xd')][_0x34bc('0xaa')]('no\x20text\x20configured');}this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')](_0x34bc('0x1b7'),_0x24c69d[_0x34bc('0x5a')]));var _0x310d3b=this['googleTTS']['sync'](this,_0x24c69d);if(_0x310d3b){this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')]('Google\x20TTS\x20%s\x20file\x20created',_0x310d3b));var _0x2c161f=this['channel'][_0x34bc('0x11c')](_0x310d3b);try{fs['unlink'](_0x310d3b+'.wav');}catch(_0xe04ce4){logger[_0x34bc('0x2b')](_0xe04ce4);}return _0x2c161f;}return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x24c69d,'Google\x20TTS\x20is\x20unreachable');};AGIVertices['prototype'][_0x34bc('0x1b8')]=function(_0x5bef89){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x1b9'),_0x5bef89[_0x34bc('0xa9')]));if(!this[_0x34bc('0x85')](_0x5bef89['findBy'])){return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x5bef89,_0x34bc('0x161'));}logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x158'),this[_0x34bc('0xd')][_0x34bc('0x38')],_0x5bef89[_0x34bc('0x152')]));var _0x40035c=this[_0x34bc('0x4f')]['sync'](this,_0x5bef89[_0x34bc('0x152')]);if(_0x40035c){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')]('AGENT\x20%s\x20FOUND\x20BY',this[_0x34bc('0xd')][_0x34bc('0x38')],_0x5bef89['findBy']));this[_0x34bc('0xd')]['noop'](util['format'](_0x34bc('0x153'),this[_0x34bc('0xd')][_0x34bc('0x38')],_0x5bef89[_0x34bc('0x152')]));return{'code':0xc8,'result':_0x34bc('0x154')};}else{logger[_0x34bc('0x2c')](util['format'](_0x34bc('0x155'),this[_0x34bc('0xd')][_0x34bc('0x38')],_0x5bef89[_0x34bc('0x152')]));this[_0x34bc('0xd')][_0x34bc('0xaa')](util[_0x34bc('0x28')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0x34bc('0xd')][_0x34bc('0x38')],_0x5bef89[_0x34bc('0x152')]));return{'code':0xc8,'result':_0x34bc('0x156')};}};AGIVertices['prototype'][_0x34bc('0x1ba')]=function(_0x38e722){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')](_0x34bc('0x1bb'),_0x38e722[_0x34bc('0xa9')]));var _0x2b5447=this[_0x34bc('0xd')]['exec'](_0x34bc('0x1bc'),[_0x38e722['mailbox'],_0x38e722[_0x34bc('0x77')]]);if(_0x2b5447[_0x34bc('0xa3')]===-0x1){return _0x2b5447;}return this['channel']['noop'](util[_0x34bc('0x28')](_0x34bc('0x166'),_0x34bc('0x1bc'),_0x38e722[_0x34bc('0x1bd')]));};AGIVertices['prototype'][_0x34bc('0x1be')]=function(_0x4ff45b){logger[_0x34bc('0x2c')](util[_0x34bc('0x28')]('Enter\x20in\x20SWITCH\x20(%s)\x20block',_0x4ff45b[_0x34bc('0xa9')]));if(!this[_0x34bc('0x85')](_0x4ff45b[_0x34bc('0xd1')])){return this[_0x34bc('0xd')][_0x34bc('0x2b')](_0x4ff45b,_0x34bc('0x1bf'));}var _0x38b2a6=this['getVariable'][_0x34bc('0x6d')](this,_0x4ff45b['variable_id']);if(!_0x38b2a6){return this[_0x34bc('0xd')]['error'](_0x4ff45b,_0x34bc('0xd3'));}var _0x1dac5b=this[_0x34bc('0xd')]['getVariable'](_0x38b2a6);return{'code':0xc8,'result':_0x1dac5b['extra']?_0x1dac5b['extra']:'-'};};String[_0x34bc('0x13')][_0x34bc('0x1c0')]=function(_0x5b1a4b,_0x1b9d27){return this['split'](_0x5b1a4b)[_0x34bc('0x1c1')](_0x1b9d27);};module[_0x34bc('0x1c2')]=AGIVertices;
\ No newline at end of file
index ef0a745..c77784f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd2e8=['channels','agentconnect','syncAgentConnect','syncHangupRequest','bind','hangup','syncHangup','agentringnoanswer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','custom:agentConnectPreview','syncAgentConnectPreview','milliseconds','diff','prototype','updateAcw','lastPauseAt','timer','update','uniqueid','then','info','[%s][UPDATE][ACWTIME:%s]','error','finally','startAcw','queue','ACW','name','mandatoryDispositionPause','QueuePause','[%s][INPAUSE][AGENT:%s][QUEUE:%s]','[%s][START][AGENT:%s][QUEUE:%s]','attended','destlinkedid','available','paused','[%s][TIMER:%s][AGENT:%s][QUEUE:%s]','acwTimeout','format','YYYY-MM-DD\x20HH:mm:ss','catch','[ACW][START]\x20%s','stopAcw','getAgent','pauseType','[%s][UPDATE][ERRORS:%s]','[ACW][TIMERS]','[ACW][STOP]\x20%s','mandatoryDisposition','interface','[ACW][syncAgentConnect]\x20%s','message','[ACW][syncAgentConnectPreview]\x20%s','isUndefined','linkedid','[%s][HANGUP:LINKEDID]','[ACW][syncHangupRequest]\x20%s','[%s][HANGUPATTENDEDTRANSFER:UNIQUEID]','[ACW][syncHangup]\x20%s','isNil','secondtransfereruniqueid','transfertargetuniqueid','origtransfereruniqueid','transfereeuniqueid','[ACW][syncAttendedTransfer]\x20%s','[%s][BLINDTRANSFER:UNIQUEID]','transfereruniqueid','transfererlinkedid','stringify','[ACW][syncBlindTransfer]\x20%s','syncAgentRingNoAnswer','autopause','all','savePause','Auto-Pause','[ACW][syncAgentRingNoAnswer]\x20%s','exports','moment','../../../config/logger','acw','../rpc/voiceAgentReport','voiceQueues','agents','timers'];(function(_0x258919,_0x1754e6){var _0xfbd68b=function(_0x3bc3e9){while(--_0x3bc3e9){_0x258919['push'](_0x258919['shift']());}};_0xfbd68b(++_0x1754e6);}(_0xd2e8,0x151));var _0x8d2e=function(_0x1c3429,_0x11d159){_0x1c3429=_0x1c3429-0x0;var _0x1609bd=_0xd2e8[_0x1c3429];return _0x1609bd;};'use strict';var _=require('lodash');var moment=require(_0x8d2e('0x0'));var ami=require('../ami');var logger=require(_0x8d2e('0x1'))(_0x8d2e('0x2'));var RpcUser=require('../rpc/user');var RpcVoiceAgentReport=require(_0x8d2e('0x3'));function Acw(_0x231092){this[_0x8d2e('0x4')]=_0x231092[_0x8d2e('0x4')];this['agents']=_0x231092[_0x8d2e('0x5')];this[_0x8d2e('0x6')]=_0x231092[_0x8d2e('0x6')];this[_0x8d2e('0x7')]={};ami['on'](_0x8d2e('0x8'),this[_0x8d2e('0x9')]['bind'](this));ami['on']('hanguprequest',this[_0x8d2e('0xa')][_0x8d2e('0xb')](this));ami['on'](_0x8d2e('0xc'),this[_0x8d2e('0xd')][_0x8d2e('0xb')](this));ami['on'](_0x8d2e('0xe'),this['syncAgentRingNoAnswer']['bind'](this));ami['on']('attendedtransfer',this[_0x8d2e('0xf')][_0x8d2e('0xb')](this));ami['on'](_0x8d2e('0x10'),this[_0x8d2e('0x11')][_0x8d2e('0xb')](this));ami['on'](_0x8d2e('0x12'),this[_0x8d2e('0x13')][_0x8d2e('0xb')](this));}function getDiff(_0xc26e52){var _0x144127=moment()['milliseconds'](0x0);var _0x25694c=moment(_0xc26e52)[_0x8d2e('0x14')](0x0);return _0x144127[_0x8d2e('0x15')](_0x25694c,'seconds');}Acw[_0x8d2e('0x16')][_0x8d2e('0x17')]=function(_0x588197,_0x265f68){var _0x5b5e16=this;var _0x855493=getDiff(_0x5b5e16['timers'][_0x588197][_0x8d2e('0x18')]);clearTimeout(_0x5b5e16[_0x8d2e('0x6')][_0x588197][_0x8d2e('0x19')]);_0x5b5e16['timers'][_0x588197]['timer']=![];return RpcVoiceAgentReport[_0x8d2e('0x1a')]({'acwtime':_0x855493},_0x5b5e16['timers'][_0x588197][_0x8d2e('0x1b')],_0x588197)[_0x8d2e('0x1c')](function(_0x442b8e){logger[_0x8d2e('0x1d')](_0x8d2e('0x1e'),_0x265f68,_0x855493,_0x442b8e);})['catch'](function(_0x411484){logger[_0x8d2e('0x1f')]('[%s][UPDATE][ERRORS:%s]',_0x265f68,_0x411484);})[_0x8d2e('0x20')](function(){delete _0x5b5e16['timers'][_0x588197];});};Acw[_0x8d2e('0x16')][_0x8d2e('0x21')]=function(_0x29faa4){try{var _0x5b1735=this;var _0x4b15cb=this[_0x8d2e('0x7')][_0x29faa4]['interface'];var _0x20364c=this[_0x8d2e('0x7')][_0x29faa4][_0x8d2e('0x22')];var _0x472c09=this[_0x8d2e('0x4')][_0x20364c];var _0x3df392=![];var _0xa4b897=_0x8d2e('0x23');if(_0x472c09['mandatoryDisposition']&&_0x472c09['mandatoryDispositionPause'][_0x8d2e('0x24')]){_0x3df392=!![];_0xa4b897=_0x472c09[_0x8d2e('0x25')][_0x8d2e('0x24')];}return ami['Action']({'action':_0x8d2e('0x26'),'interface':_0x4b15cb,'paused':!![],'reason':_0xa4b897})[_0x8d2e('0x1c')](function(){if(_0x5b1735[_0x8d2e('0x5')][_0x4b15cb]){return RpcUser['getAgent'](_0x5b1735[_0x8d2e('0x5')][_0x4b15cb]['id'])[_0x8d2e('0x1c')](function(_0x36dd74){if(!_0x36dd74||_0x36dd74['voicePause']){logger[_0x8d2e('0x1d')](_0x8d2e('0x27'),_0x29faa4,_0x4b15cb,_0x20364c);return;}logger['info'](_0x8d2e('0x28'),_0x29faa4,_0x4b15cb,_0x20364c);var _0x544266=_0x5b1735[_0x8d2e('0x7')][_0x29faa4][_0x8d2e('0x29')]&&_0x5b1735[_0x8d2e('0x7')][_0x29faa4][_0x8d2e('0x2a')]?_0x5b1735['channels'][_0x29faa4][_0x8d2e('0x2a')]:_0x29faa4;return RpcUser['savePause'](_0x5b1735[_0x8d2e('0x5')][_0x4b15cb],_0xa4b897,_0x544266)[_0x8d2e('0x1c')](function(_0x526b61){_0x5b1735[_0x8d2e('0x4')][_0x20364c][_0x8d2e('0x2b')]-=0x1;_0x5b1735['voiceQueues'][_0x20364c][_0x8d2e('0x2c')]+=0x1;return _0x526b61;});})[_0x8d2e('0x1c')](function(_0x3d6664){if(_0x3df392||!_0x3d6664){return;}_0x5b1735['timers'][_0x4b15cb]={};logger[_0x8d2e('0x1d')](_0x8d2e('0x2d'),_0x29faa4,_0x5b1735[_0x8d2e('0x4')][_0x20364c][_0x8d2e('0x2e')],_0x4b15cb,_0x20364c);_0x5b1735['timers'][_0x4b15cb][_0x8d2e('0x19')]=setTimeout(_0x5b1735['stopAcw'][_0x8d2e('0xb')](_0x5b1735,_0x4b15cb),_0x5b1735[_0x8d2e('0x4')][_0x20364c][_0x8d2e('0x2e')]*0x3e8);_0x5b1735[_0x8d2e('0x6')][_0x4b15cb][_0x8d2e('0x18')]=moment()[_0x8d2e('0x2f')](_0x8d2e('0x30'));_0x5b1735[_0x8d2e('0x6')][_0x4b15cb][_0x8d2e('0x1b')]=_0x29faa4;_0x5b1735['timers'][_0x4b15cb][_0x8d2e('0x22')]=_0x20364c;_0x5b1735[_0x8d2e('0x6')][_0x4b15cb]['updateAcw']=_0x5b1735[_0x8d2e('0x17')][_0x8d2e('0xb')](_0x5b1735,_0x4b15cb,_0x29faa4);});}})[_0x8d2e('0x31')](function(){logger[_0x8d2e('0x1f')](_0x8d2e('0x2d'),_0x29faa4,_0x5b1735['voiceQueues'][_0x20364c]['acwTimeout'],_0x4b15cb,_0x20364c);})[_0x8d2e('0x20')](function(){delete _0x5b1735['channels'][_0x29faa4];});}catch(_0x1aeee8){logger[_0x8d2e('0x1f')](_0x8d2e('0x32'),_0x1aeee8['message']);}};Acw[_0x8d2e('0x16')][_0x8d2e('0x33')]=function(_0x1eab2d){try{var _0xa9c6c6=this;if(_0xa9c6c6[_0x8d2e('0x6')][_0x1eab2d]){_0xa9c6c6[_0x8d2e('0x6')][_0x1eab2d]['timer']=![];var _0x2870d5=_0xa9c6c6[_0x8d2e('0x6')][_0x1eab2d][_0x8d2e('0x1b')];var _0x519f4b=_0xa9c6c6[_0x8d2e('0x6')][_0x1eab2d][_0x8d2e('0x22')];var _0x22ca7d=_0xa9c6c6[_0x8d2e('0x4')][_0x519f4b]['acwTimeout'];logger['info']('[%s][TIMER][STOP][AGENT:%s]',_0x2870d5,_0x1eab2d);RpcUser[_0x8d2e('0x34')](this[_0x8d2e('0x5')][_0x1eab2d]['id'])[_0x8d2e('0x1c')](function(_0x22df67){if(_0x22df67[_0x8d2e('0x35')]==='ACW'){return RpcUser['saveUnpause'](_0xa9c6c6[_0x8d2e('0x5')][_0x1eab2d]);}});RpcVoiceAgentReport[_0x8d2e('0x1a')]({'acwtime':_0x22ca7d,'agentacw':!![]},_0x2870d5,_0x1eab2d)[_0x8d2e('0x1c')](function(_0x1f33d2){logger[_0x8d2e('0x1d')]('[%s][UPDATE][ACWTIME:%s]',_0x2870d5,_0x22ca7d,_0x1f33d2);})[_0x8d2e('0x31')](function(_0x1fa9b7){logger['error'](_0x8d2e('0x36'),_0x2870d5,_0x1fa9b7);});}else{logger['error']('[ACW][STOP]\x20Interface\x20%s\x20doesn\x27t\x20have\x20timer',_0x1eab2d);if(_0xa9c6c6[_0x8d2e('0x6')]){logger[_0x8d2e('0x1d')](_0x8d2e('0x37'),JSON['stringify'](_0xa9c6c6['timers']));}}}catch(_0x1825dd){logger['error'](_0x8d2e('0x38'),_0x1825dd['message']);}};Acw[_0x8d2e('0x16')][_0x8d2e('0x9')]=function(_0x439278){try{if(this[_0x8d2e('0x4')][_0x439278[_0x8d2e('0x22')]]&&(this[_0x8d2e('0x4')][_0x439278[_0x8d2e('0x22')]][_0x8d2e('0x2')]||this[_0x8d2e('0x4')][_0x439278['queue']][_0x8d2e('0x39')])){if(this[_0x8d2e('0x5')][_0x439278[_0x8d2e('0x3a')]]){this[_0x8d2e('0x7')][_0x439278[_0x8d2e('0x1b')]]={'queue':_0x439278[_0x8d2e('0x22')],'interface':_0x439278[_0x8d2e('0x3a')],'destlinkedid':_0x439278['destlinkedid']};}}}catch(_0x55638b){logger[_0x8d2e('0x1f')](_0x8d2e('0x3b'),_0x55638b[_0x8d2e('0x3c')]);}};Acw[_0x8d2e('0x16')][_0x8d2e('0x13')]=function(_0x2c51cc){try{if(this[_0x8d2e('0x4')][_0x2c51cc[_0x8d2e('0x22')]]&&(this[_0x8d2e('0x4')][_0x2c51cc[_0x8d2e('0x22')]][_0x8d2e('0x2')]||this[_0x8d2e('0x4')][_0x2c51cc['queue']][_0x8d2e('0x39')])){if(this[_0x8d2e('0x5')][_0x2c51cc['interface']]){this[_0x8d2e('0x7')][_0x2c51cc[_0x8d2e('0x1b')]]={'queue':_0x2c51cc[_0x8d2e('0x22')],'interface':_0x2c51cc[_0x8d2e('0x3a')]};}}}catch(_0x107ab7){logger[_0x8d2e('0x1f')](_0x8d2e('0x3d'),_0x107ab7[_0x8d2e('0x3c')]);}};Acw[_0x8d2e('0x16')]['syncHangupRequest']=function(_0x530ce4){try{if(this[_0x8d2e('0x7')][_0x530ce4[_0x8d2e('0x1b')]]&&_[_0x8d2e('0x3e')](this[_0x8d2e('0x7')][_0x530ce4[_0x8d2e('0x1b')]]['attended'])){logger['info']('[%s][HANGUP:UNIQUEID]',_0x530ce4[_0x8d2e('0x1b')]);this['startAcw'](_0x530ce4[_0x8d2e('0x1b')]);}else if(this[_0x8d2e('0x7')][_0x530ce4[_0x8d2e('0x3f')]]&&_['isUndefined'](this[_0x8d2e('0x7')][_0x530ce4[_0x8d2e('0x3f')]][_0x8d2e('0x29')])){logger[_0x8d2e('0x1d')](_0x8d2e('0x40'),_0x530ce4['linkedid']);this[_0x8d2e('0x21')](_0x530ce4[_0x8d2e('0x3f')]);}}catch(_0x33efd9){logger[_0x8d2e('0x1f')](_0x8d2e('0x41'),_0x33efd9[_0x8d2e('0x3c')]);}};Acw[_0x8d2e('0x16')][_0x8d2e('0xd')]=function(_0x464b5e){try{if(this[_0x8d2e('0x7')][_0x464b5e[_0x8d2e('0x1b')]]&&this['channels'][_0x464b5e[_0x8d2e('0x1b')]][_0x8d2e('0x29')]){logger[_0x8d2e('0x1d')](_0x8d2e('0x42'),_0x464b5e[_0x8d2e('0x1b')]);this[_0x8d2e('0x21')](_0x464b5e[_0x8d2e('0x1b')]);}else if(this[_0x8d2e('0x7')][_0x464b5e[_0x8d2e('0x3f')]]&&this[_0x8d2e('0x7')][_0x464b5e[_0x8d2e('0x3f')]][_0x8d2e('0x29')]){logger['info']('[%s][HANGUPATTENDEDTRANSFER:LINKEDID]',_0x464b5e['linkedid']);this[_0x8d2e('0x21')](_0x464b5e[_0x8d2e('0x3f')]);}}catch(_0x21ce7d){logger[_0x8d2e('0x1f')](_0x8d2e('0x43'),_0x21ce7d[_0x8d2e('0x3c')]);}};Acw['prototype'][_0x8d2e('0xf')]=function(_0x1ec7c5){try{if(!_[_0x8d2e('0x44')](this['channels'][_0x1ec7c5['transfereeuniqueid']])){this[_0x8d2e('0x21')](_0x1ec7c5['transfereeuniqueid']);if(this['channels'][_0x1ec7c5[_0x8d2e('0x45')]]){this['channels'][_0x1ec7c5[_0x8d2e('0x45')]][_0x8d2e('0x29')]=!![];this[_0x8d2e('0x7')][_0x1ec7c5[_0x8d2e('0x46')]]=this[_0x8d2e('0x7')][_0x1ec7c5['secondtransfereruniqueid']];delete this[_0x8d2e('0x7')][_0x1ec7c5[_0x8d2e('0x45')]];}}else if(!_[_0x8d2e('0x44')](this[_0x8d2e('0x7')][_0x1ec7c5[_0x8d2e('0x46')]])){this[_0x8d2e('0x21')](_0x1ec7c5['transfertargetuniqueid']);if(this[_0x8d2e('0x7')][_0x1ec7c5[_0x8d2e('0x47')]]){this[_0x8d2e('0x7')][_0x1ec7c5[_0x8d2e('0x47')]]['attended']=!![];this[_0x8d2e('0x7')][_0x1ec7c5[_0x8d2e('0x48')]]=this[_0x8d2e('0x7')][_0x1ec7c5['origtransfereruniqueid']];delete this[_0x8d2e('0x7')][_0x1ec7c5[_0x8d2e('0x47')]];}}}catch(_0x4fd34f){logger[_0x8d2e('0x1f')](_0x8d2e('0x49'),_0x4fd34f['message']);}};Acw[_0x8d2e('0x16')][_0x8d2e('0x11')]=function(_0x13542e){try{if(this[_0x8d2e('0x7')][_0x13542e['transfereruniqueid']]){logger[_0x8d2e('0x1d')](_0x8d2e('0x4a'),JSON['stringify'](_0x13542e[_0x8d2e('0x4b')]));this[_0x8d2e('0x21')](_0x13542e['transfereruniqueid']);}else if(this['channels'][_0x13542e[_0x8d2e('0x4c')]]){logger['info']('[%s][BLINDTRANSFER:LINKEDID]',JSON[_0x8d2e('0x4d')](_0x13542e[_0x8d2e('0x4c')]));this[_0x8d2e('0x21')](_0x13542e['transfererlinkedid']);}}catch(_0x1661c5){logger[_0x8d2e('0x1f')](_0x8d2e('0x4e'),_0x1661c5[_0x8d2e('0x3c')]);}};Acw[_0x8d2e('0x16')][_0x8d2e('0x4f')]=function(_0x4cc728){try{if(this[_0x8d2e('0x4')][_0x4cc728[_0x8d2e('0x22')]]&&this[_0x8d2e('0x4')][_0x4cc728['queue']][_0x8d2e('0x50')]===_0x8d2e('0x51')){if(this['agents'][_0x4cc728[_0x8d2e('0x3a')]]){logger[_0x8d2e('0x1d')]('[%s][AUTOPAUSE][AGENT:%s][QUEUE:%]',_0x4cc728['uniqueid'],_0x4cc728['interface'],_0x4cc728['queue']);return RpcUser[_0x8d2e('0x52')](this[_0x8d2e('0x5')][_0x4cc728[_0x8d2e('0x3a')]],_0x8d2e('0x53'),_0x4cc728['uniqueid']);}}}catch(_0x1badf9){logger[_0x8d2e('0x1f')](_0x8d2e('0x54'),_0x1badf9[_0x8d2e('0x3c')]);}};module[_0x8d2e('0x55')]=Acw;
\ No newline at end of file
+var _0xeec8=['channels','agentconnect','syncAgentConnect','hanguprequest','syncHangupRequest','bind','hangup','syncAgentRingNoAnswer','syncBlindTransfer','milliseconds','diff','seconds','prototype','updateAcw','lastPauseAt','timers','timer','uniqueid','then','info','[%s][UPDATE][ACWTIME:%s]','catch','finally','startAcw','interface','queue','ACW','mandatoryDisposition','mandatoryDispositionPause','Action','QueuePause','getAgent','voicePause','[%s][INPAUSE][AGENT:%s][QUEUE:%s]','[%s][START][AGENT:%s][QUEUE:%s]','attended','destlinkedid','savePause','acwTimeout','stopAcw','format','YYYY-MM-DD\x20HH:mm:ss','[%s][TIMER:%s][AGENT:%s][QUEUE:%s]','[ACW][START]\x20%s','message','pauseType','saveUnpause','update','error','[%s][UPDATE][ERRORS:%s]','[ACW][STOP]\x20Interface\x20%s\x20doesn\x27t\x20have\x20timer','[ACW][TIMERS]','[ACW][STOP]\x20%s','[ACW][syncAgentConnect]\x20%s','syncAgentConnectPreview','[ACW][syncAgentConnectPreview]\x20%s','isUndefined','[%s][HANGUP:UNIQUEID]','linkedid','[ACW][syncHangupRequest]\x20%s','syncHangup','[%s][HANGUPATTENDEDTRANSFER:UNIQUEID]','[ACW][syncHangup]\x20%s','syncAttendedTransfer','isNil','transfereeuniqueid','secondtransfereruniqueid','transfertargetuniqueid','origtransfereruniqueid','[ACW][syncAttendedTransfer]\x20%s','transfereruniqueid','stringify','transfererlinkedid','[%s][BLINDTRANSFER:LINKEDID]','autopause','all','Auto-Pause','[ACW][syncAgentRingNoAnswer]\x20%s','exports','lodash','../ami','../../../config/logger','acw','../rpc/user','../rpc/voiceAgentReport','voiceQueues','agents'];(function(_0x149a64,_0x10e365){var _0x38d6c0=function(_0x1454c6){while(--_0x1454c6){_0x149a64['push'](_0x149a64['shift']());}};_0x38d6c0(++_0x10e365);}(_0xeec8,0xfd));var _0x8eec=function(_0x5ba745,_0x54d837){_0x5ba745=_0x5ba745-0x0;var _0x2595fb=_0xeec8[_0x5ba745];return _0x2595fb;};'use strict';var _=require(_0x8eec('0x0'));var moment=require('moment');var ami=require(_0x8eec('0x1'));var logger=require(_0x8eec('0x2'))(_0x8eec('0x3'));var RpcUser=require(_0x8eec('0x4'));var RpcVoiceAgentReport=require(_0x8eec('0x5'));function Acw(_0x57a5b5){this[_0x8eec('0x6')]=_0x57a5b5['voiceQueues'];this[_0x8eec('0x7')]=_0x57a5b5[_0x8eec('0x7')];this['timers']=_0x57a5b5['timers'];this[_0x8eec('0x8')]={};ami['on'](_0x8eec('0x9'),this[_0x8eec('0xa')]['bind'](this));ami['on'](_0x8eec('0xb'),this[_0x8eec('0xc')][_0x8eec('0xd')](this));ami['on'](_0x8eec('0xe'),this['syncHangup']['bind'](this));ami['on']('agentringnoanswer',this[_0x8eec('0xf')][_0x8eec('0xd')](this));ami['on']('attendedtransfer',this['syncAttendedTransfer'][_0x8eec('0xd')](this));ami['on']('blindtransfer',this[_0x8eec('0x10')]['bind'](this));ami['on']('custom:agentConnectPreview',this['syncAgentConnectPreview'][_0x8eec('0xd')](this));}function getDiff(_0x15d376){var _0x734fa9=moment()[_0x8eec('0x11')](0x0);var _0x351d7b=moment(_0x15d376)[_0x8eec('0x11')](0x0);return _0x734fa9[_0x8eec('0x12')](_0x351d7b,_0x8eec('0x13'));}Acw[_0x8eec('0x14')][_0x8eec('0x15')]=function(_0x4ff8ec,_0x3c9813){var _0x155753=this;var _0x2a5736=getDiff(_0x155753['timers'][_0x4ff8ec][_0x8eec('0x16')]);clearTimeout(_0x155753[_0x8eec('0x17')][_0x4ff8ec][_0x8eec('0x18')]);_0x155753[_0x8eec('0x17')][_0x4ff8ec][_0x8eec('0x18')]=![];return RpcVoiceAgentReport['update']({'acwtime':_0x2a5736},_0x155753['timers'][_0x4ff8ec][_0x8eec('0x19')],_0x4ff8ec)[_0x8eec('0x1a')](function(_0x19af6c){logger[_0x8eec('0x1b')](_0x8eec('0x1c'),_0x3c9813,_0x2a5736,_0x19af6c);})[_0x8eec('0x1d')](function(_0x341ce9){logger['error']('[%s][UPDATE][ERRORS:%s]',_0x3c9813,_0x341ce9);})[_0x8eec('0x1e')](function(){delete _0x155753['timers'][_0x4ff8ec];});};Acw[_0x8eec('0x14')][_0x8eec('0x1f')]=function(_0x244387){try{var _0x16a602=this;var _0x593fe1=this['channels'][_0x244387][_0x8eec('0x20')];var _0x42b5a5=this[_0x8eec('0x8')][_0x244387][_0x8eec('0x21')];var _0x1494b2=this[_0x8eec('0x6')][_0x42b5a5];var _0x56a22a=![];var _0x4292e1=_0x8eec('0x22');if(_0x1494b2[_0x8eec('0x23')]&&_0x1494b2[_0x8eec('0x24')]['name']){_0x56a22a=!![];_0x4292e1=_0x1494b2[_0x8eec('0x24')]['name'];}return ami[_0x8eec('0x25')]({'action':_0x8eec('0x26'),'interface':_0x593fe1,'paused':!![],'reason':_0x4292e1})[_0x8eec('0x1a')](function(){if(_0x16a602[_0x8eec('0x7')][_0x593fe1]){return RpcUser[_0x8eec('0x27')](_0x16a602[_0x8eec('0x7')][_0x593fe1]['id'])['then'](function(_0x19ac51){if(!_0x19ac51||_0x19ac51[_0x8eec('0x28')]){logger[_0x8eec('0x1b')](_0x8eec('0x29'),_0x244387,_0x593fe1,_0x42b5a5);return;}logger[_0x8eec('0x1b')](_0x8eec('0x2a'),_0x244387,_0x593fe1,_0x42b5a5);var _0x5a5476=_0x16a602[_0x8eec('0x8')][_0x244387][_0x8eec('0x2b')]&&_0x16a602[_0x8eec('0x8')][_0x244387][_0x8eec('0x2c')]?_0x16a602['channels'][_0x244387][_0x8eec('0x2c')]:_0x244387;return RpcUser[_0x8eec('0x2d')](_0x16a602[_0x8eec('0x7')][_0x593fe1],_0x4292e1,_0x5a5476)[_0x8eec('0x1a')](function(_0x17aba9){_0x16a602[_0x8eec('0x6')][_0x42b5a5]['available']-=0x1;_0x16a602[_0x8eec('0x6')][_0x42b5a5]['paused']+=0x1;return _0x17aba9;});})[_0x8eec('0x1a')](function(_0x6279c5){if(_0x56a22a||!_0x6279c5){return;}_0x16a602[_0x8eec('0x17')][_0x593fe1]={};logger[_0x8eec('0x1b')]('[%s][TIMER:%s][AGENT:%s][QUEUE:%s]',_0x244387,_0x16a602[_0x8eec('0x6')][_0x42b5a5][_0x8eec('0x2e')],_0x593fe1,_0x42b5a5);_0x16a602[_0x8eec('0x17')][_0x593fe1][_0x8eec('0x18')]=setTimeout(_0x16a602[_0x8eec('0x2f')][_0x8eec('0xd')](_0x16a602,_0x593fe1),_0x16a602[_0x8eec('0x6')][_0x42b5a5][_0x8eec('0x2e')]*0x3e8);_0x16a602['timers'][_0x593fe1][_0x8eec('0x16')]=moment()[_0x8eec('0x30')](_0x8eec('0x31'));_0x16a602[_0x8eec('0x17')][_0x593fe1][_0x8eec('0x19')]=_0x244387;_0x16a602[_0x8eec('0x17')][_0x593fe1][_0x8eec('0x21')]=_0x42b5a5;_0x16a602['timers'][_0x593fe1]['updateAcw']=_0x16a602[_0x8eec('0x15')]['bind'](_0x16a602,_0x593fe1,_0x244387);});}})['catch'](function(){logger['error'](_0x8eec('0x32'),_0x244387,_0x16a602[_0x8eec('0x6')][_0x42b5a5][_0x8eec('0x2e')],_0x593fe1,_0x42b5a5);})[_0x8eec('0x1e')](function(){delete _0x16a602['channels'][_0x244387];});}catch(_0x35eb2d){logger['error'](_0x8eec('0x33'),_0x35eb2d[_0x8eec('0x34')]);}};Acw['prototype'][_0x8eec('0x2f')]=function(_0x212570){try{var _0x24ba53=this;if(_0x24ba53[_0x8eec('0x17')][_0x212570]){_0x24ba53[_0x8eec('0x17')][_0x212570][_0x8eec('0x18')]=![];var _0x724b23=_0x24ba53[_0x8eec('0x17')][_0x212570]['uniqueid'];var _0x3077b3=_0x24ba53[_0x8eec('0x17')][_0x212570][_0x8eec('0x21')];var _0x10d6f7=_0x24ba53[_0x8eec('0x6')][_0x3077b3][_0x8eec('0x2e')];logger['info']('[%s][TIMER][STOP][AGENT:%s]',_0x724b23,_0x212570);RpcUser['getAgent'](this[_0x8eec('0x7')][_0x212570]['id'])[_0x8eec('0x1a')](function(_0x58aca5){if(_0x58aca5[_0x8eec('0x35')]==='ACW'){return RpcUser[_0x8eec('0x36')](_0x24ba53[_0x8eec('0x7')][_0x212570]);}});RpcVoiceAgentReport[_0x8eec('0x37')]({'acwtime':_0x10d6f7,'agentacw':!![]},_0x724b23,_0x212570)[_0x8eec('0x1a')](function(_0x1e9bf3){logger[_0x8eec('0x1b')](_0x8eec('0x1c'),_0x724b23,_0x10d6f7,_0x1e9bf3);})[_0x8eec('0x1d')](function(_0x4cd907){logger[_0x8eec('0x38')](_0x8eec('0x39'),_0x724b23,_0x4cd907);});}else{logger[_0x8eec('0x38')](_0x8eec('0x3a'),_0x212570);if(_0x24ba53['timers']){logger[_0x8eec('0x1b')](_0x8eec('0x3b'),JSON['stringify'](_0x24ba53[_0x8eec('0x17')]));}}}catch(_0x4e0c60){logger[_0x8eec('0x38')](_0x8eec('0x3c'),_0x4e0c60['message']);}};Acw[_0x8eec('0x14')][_0x8eec('0xa')]=function(_0x1cb2ff){try{if(this[_0x8eec('0x6')][_0x1cb2ff[_0x8eec('0x21')]]&&(this[_0x8eec('0x6')][_0x1cb2ff['queue']][_0x8eec('0x3')]||this[_0x8eec('0x6')][_0x1cb2ff['queue']]['mandatoryDisposition'])){if(this[_0x8eec('0x7')][_0x1cb2ff[_0x8eec('0x20')]]){this[_0x8eec('0x8')][_0x1cb2ff[_0x8eec('0x19')]]={'queue':_0x1cb2ff[_0x8eec('0x21')],'interface':_0x1cb2ff[_0x8eec('0x20')],'destlinkedid':_0x1cb2ff['destlinkedid']};}}}catch(_0x2b0a11){logger[_0x8eec('0x38')](_0x8eec('0x3d'),_0x2b0a11[_0x8eec('0x34')]);}};Acw['prototype'][_0x8eec('0x3e')]=function(_0x3302ca){try{if(this['voiceQueues'][_0x3302ca[_0x8eec('0x21')]]&&(this[_0x8eec('0x6')][_0x3302ca[_0x8eec('0x21')]][_0x8eec('0x3')]||this['voiceQueues'][_0x3302ca[_0x8eec('0x21')]]['mandatoryDisposition'])){if(this[_0x8eec('0x7')][_0x3302ca['interface']]){this[_0x8eec('0x8')][_0x3302ca[_0x8eec('0x19')]]={'queue':_0x3302ca[_0x8eec('0x21')],'interface':_0x3302ca[_0x8eec('0x20')]};}}}catch(_0x4732cd){logger['error'](_0x8eec('0x3f'),_0x4732cd[_0x8eec('0x34')]);}};Acw[_0x8eec('0x14')][_0x8eec('0xc')]=function(_0x12eeeb){try{if(this[_0x8eec('0x8')][_0x12eeeb['uniqueid']]&&_[_0x8eec('0x40')](this[_0x8eec('0x8')][_0x12eeeb[_0x8eec('0x19')]][_0x8eec('0x2b')])){logger[_0x8eec('0x1b')](_0x8eec('0x41'),_0x12eeeb[_0x8eec('0x19')]);this['startAcw'](_0x12eeeb['uniqueid']);}else if(this[_0x8eec('0x8')][_0x12eeeb[_0x8eec('0x42')]]&&_[_0x8eec('0x40')](this[_0x8eec('0x8')][_0x12eeeb[_0x8eec('0x42')]][_0x8eec('0x2b')])){logger[_0x8eec('0x1b')]('[%s][HANGUP:LINKEDID]',_0x12eeeb[_0x8eec('0x42')]);this[_0x8eec('0x1f')](_0x12eeeb[_0x8eec('0x42')]);}}catch(_0x17f739){logger[_0x8eec('0x38')](_0x8eec('0x43'),_0x17f739[_0x8eec('0x34')]);}};Acw['prototype'][_0x8eec('0x44')]=function(_0x50719f){try{if(this[_0x8eec('0x8')][_0x50719f['uniqueid']]&&this['channels'][_0x50719f[_0x8eec('0x19')]][_0x8eec('0x2b')]){logger[_0x8eec('0x1b')](_0x8eec('0x45'),_0x50719f[_0x8eec('0x19')]);this[_0x8eec('0x1f')](_0x50719f[_0x8eec('0x19')]);}else if(this[_0x8eec('0x8')][_0x50719f[_0x8eec('0x42')]]&&this[_0x8eec('0x8')][_0x50719f[_0x8eec('0x42')]][_0x8eec('0x2b')]){logger[_0x8eec('0x1b')]('[%s][HANGUPATTENDEDTRANSFER:LINKEDID]',_0x50719f['linkedid']);this[_0x8eec('0x1f')](_0x50719f['linkedid']);}}catch(_0x4d39d1){logger[_0x8eec('0x38')](_0x8eec('0x46'),_0x4d39d1['message']);}};Acw['prototype'][_0x8eec('0x47')]=function(_0x260c18){try{if(!_[_0x8eec('0x48')](this['channels'][_0x260c18[_0x8eec('0x49')]])){this[_0x8eec('0x1f')](_0x260c18[_0x8eec('0x49')]);if(this['channels'][_0x260c18[_0x8eec('0x4a')]]){this[_0x8eec('0x8')][_0x260c18[_0x8eec('0x4a')]][_0x8eec('0x2b')]=!![];this['channels'][_0x260c18[_0x8eec('0x4b')]]=this[_0x8eec('0x8')][_0x260c18['secondtransfereruniqueid']];delete this[_0x8eec('0x8')][_0x260c18[_0x8eec('0x4a')]];}}else if(!_[_0x8eec('0x48')](this[_0x8eec('0x8')][_0x260c18[_0x8eec('0x4b')]])){this[_0x8eec('0x1f')](_0x260c18[_0x8eec('0x4b')]);if(this[_0x8eec('0x8')][_0x260c18['origtransfereruniqueid']]){this[_0x8eec('0x8')][_0x260c18[_0x8eec('0x4c')]][_0x8eec('0x2b')]=!![];this[_0x8eec('0x8')][_0x260c18[_0x8eec('0x49')]]=this[_0x8eec('0x8')][_0x260c18[_0x8eec('0x4c')]];delete this[_0x8eec('0x8')][_0x260c18[_0x8eec('0x4c')]];}}}catch(_0x92aab9){logger['error'](_0x8eec('0x4d'),_0x92aab9['message']);}};Acw[_0x8eec('0x14')][_0x8eec('0x10')]=function(_0x5b008f){try{if(this[_0x8eec('0x8')][_0x5b008f[_0x8eec('0x4e')]]){logger[_0x8eec('0x1b')]('[%s][BLINDTRANSFER:UNIQUEID]',JSON[_0x8eec('0x4f')](_0x5b008f[_0x8eec('0x4e')]));this[_0x8eec('0x1f')](_0x5b008f[_0x8eec('0x4e')]);}else if(this['channels'][_0x5b008f[_0x8eec('0x50')]]){logger[_0x8eec('0x1b')](_0x8eec('0x51'),JSON[_0x8eec('0x4f')](_0x5b008f[_0x8eec('0x50')]));this['startAcw'](_0x5b008f['transfererlinkedid']);}}catch(_0x3bcbc5){logger[_0x8eec('0x38')]('[ACW][syncBlindTransfer]\x20%s',_0x3bcbc5['message']);}};Acw[_0x8eec('0x14')][_0x8eec('0xf')]=function(_0x3990aa){try{if(this[_0x8eec('0x6')][_0x3990aa[_0x8eec('0x21')]]&&this['voiceQueues'][_0x3990aa['queue']][_0x8eec('0x52')]===_0x8eec('0x53')){if(this['agents'][_0x3990aa[_0x8eec('0x20')]]){logger['info']('[%s][AUTOPAUSE][AGENT:%s][QUEUE:%]',_0x3990aa[_0x8eec('0x19')],_0x3990aa[_0x8eec('0x20')],_0x3990aa[_0x8eec('0x21')]);return RpcUser[_0x8eec('0x2d')](this[_0x8eec('0x7')][_0x3990aa['interface']],_0x8eec('0x54'),_0x3990aa[_0x8eec('0x19')]);}}}catch(_0x3b5917){logger[_0x8eec('0x38')](_0x8eec('0x55'),_0x3b5917[_0x8eec('0x34')]);}};module[_0x8eec('0x56')]=Acw;
\ No newline at end of file
index 439c4cd..690b416 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x55a6=['connect','shutdown','Shutdown\x20\x22%s\x22\x20to\x20%s:%s\x20with:\x0a%s','fullybooted','Fullybooted\x20\x22%s\x22\x20to\x20%s:%s','resolve','then','actionSipShowRegistry','[ami.js][fullybooted]','inspect','exports','asterisk-manager','util','../../config/logger','ami','../../config/environment','port','asterisk','username','password','keepConnected','promisify','action','error','Manager\x20\x22%s\x22\x20error\x20to\x20%s:%s\x20with:\x0a%s','format','Manager\x20\x22%s\x22\x20closed\x20to\x20%s:%s','Action','sipshowregistry','actionDeviceStateList','devicestatelist','actionSipPeerStatus','sippeerstatus','actionQueueSummary','actionCoreShowChannels','coreshowchannels','info','Manager\x20\x22%s\x22\x20logged\x20on\x20to\x20%s:%s','once','close'];(function(_0x34688c,_0x28a920){var _0x5f1bfa=function(_0x345c23){while(--_0x345c23){_0x34688c['push'](_0x34688c['shift']());}};_0x5f1bfa(++_0x28a920);}(_0x55a6,0x123));var _0x655a=function(_0x486ec1,_0x4a432f){_0x486ec1=_0x486ec1-0x0;var _0x297c79=_0x55a6[_0x486ec1];return _0x297c79;};'use strict';var Manager=require(_0x655a('0x0'));var BPromise=require('bluebird');var util=require(_0x655a('0x1'));var logger=require(_0x655a('0x2'))(_0x655a('0x3'));var config=require(_0x655a('0x4'));var ami=new Manager(config['asterisk'][_0x655a('0x5')],config[_0x655a('0x6')]['ip'],config['asterisk'][_0x655a('0x7')],config['asterisk'][_0x655a('0x8')],!![]);ami[_0x655a('0x9')]();ami['Action']=BPromise[_0x655a('0xa')](ami[_0x655a('0xb')]);function error(_0x1ea1ab){logger[_0x655a('0xc')](util['format'](_0x655a('0xd'),config[_0x655a('0x6')]['username'],config[_0x655a('0x6')]['ip'],config['asterisk'][_0x655a('0x5')],util['inspect'](_0x1ea1ab,![],null)));}function close(){logger[_0x655a('0xc')](util[_0x655a('0xe')](_0x655a('0xf'),config['asterisk']['username'],config['asterisk']['ip'],config['asterisk'][_0x655a('0x5')]));}ami['actionSipShowRegistry']=function(){return function(){return ami[_0x655a('0x10')]({'action':_0x655a('0x11')});};};ami[_0x655a('0x12')]=function(){return function(){return ami[_0x655a('0x10')]({'action':_0x655a('0x13')});};};ami[_0x655a('0x14')]=function(){return function(){return ami[_0x655a('0x10')]({'action':_0x655a('0x15')});};};ami[_0x655a('0x16')]=function(){return function(){return ami['Action']({'action':'queuesummary'});};};ami[_0x655a('0x17')]=function(){return function(){return ami[_0x655a('0x10')]({'action':_0x655a('0x18')});};};function connect(){logger[_0x655a('0x19')](util['format'](_0x655a('0x1a'),config[_0x655a('0x6')][_0x655a('0x7')],config[_0x655a('0x6')]['ip'],config[_0x655a('0x6')][_0x655a('0x5')]));ami['once'](_0x655a('0xc'),error);ami[_0x655a('0x1b')](_0x655a('0x1c'),close);}ami['on'](_0x655a('0x1d'),connect);ami['on'](_0x655a('0x1e'),function(_0x130762){logger[_0x655a('0x19')](util[_0x655a('0xe')](_0x655a('0x1f'),config['asterisk'][_0x655a('0x7')],config[_0x655a('0x6')]['ip'],config[_0x655a('0x6')]['port'],util['inspect'](_0x130762,![],null)));});ami['on'](_0x655a('0x20'),function(){logger[_0x655a('0x19')](util['format'](_0x655a('0x21'),config[_0x655a('0x6')][_0x655a('0x7')],config['asterisk']['ip'],config['asterisk'][_0x655a('0x5')]));return Promise[_0x655a('0x22')]()[_0x655a('0x23')](ami[_0x655a('0x24')]())[_0x655a('0x23')](ami[_0x655a('0x12')]())[_0x655a('0x23')](ami[_0x655a('0x14')]())['then'](ami[_0x655a('0x16')]())[_0x655a('0x23')](ami[_0x655a('0x17')]())['catch'](function(_0xe50f27){logger[_0x655a('0xc')](_0x655a('0x25'),util[_0x655a('0x26')](_0xe50f27,{'showHidden':![],'depth':null}));});});ami[_0x655a('0x1b')](_0x655a('0xc'),error);ami[_0x655a('0x1b')](_0x655a('0x1c'),close);module[_0x655a('0x27')]=ami;
\ No newline at end of file
+var _0xfff0=['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','actionSipPeerStatus','catch','exports','asterisk-manager','bluebird','util','../../config/logger','ami','../../config/environment','port','asterisk','username','password','keepConnected','Action','promisify','action','error','Manager\x20\x22%s\x22\x20error\x20to\x20%s:%s\x20with:\x0a%s','inspect','format','Manager\x20\x22%s\x22\x20closed\x20to\x20%s:%s','actionSipShowRegistry','sipshowregistry','actionDeviceStateList','actionQueueSummary','info','Manager\x20\x22%s\x22\x20logged\x20on\x20to\x20%s:%s','once'];(function(_0x461027,_0x1e813d){var _0x1fc793=function(_0x5d8ef8){while(--_0x5d8ef8){_0x461027['push'](_0x461027['shift']());}};_0x1fc793(++_0x1e813d);}(_0xfff0,0x76));var _0x0fff=function(_0x36f2e4,_0x3ed63d){_0x36f2e4=_0x36f2e4-0x0;var _0x12dbf1=_0xfff0[_0x36f2e4];return _0x12dbf1;};'use strict';var Manager=require(_0x0fff('0x0'));var BPromise=require(_0x0fff('0x1'));var util=require(_0x0fff('0x2'));var logger=require(_0x0fff('0x3'))(_0x0fff('0x4'));var config=require(_0x0fff('0x5'));var ami=new Manager(config['asterisk'][_0x0fff('0x6')],config['asterisk']['ip'],config[_0x0fff('0x7')][_0x0fff('0x8')],config[_0x0fff('0x7')][_0x0fff('0x9')],!![]);ami[_0x0fff('0xa')]();ami[_0x0fff('0xb')]=BPromise[_0x0fff('0xc')](ami[_0x0fff('0xd')]);function error(_0x25994d){logger[_0x0fff('0xe')](util['format'](_0x0fff('0xf'),config[_0x0fff('0x7')][_0x0fff('0x8')],config[_0x0fff('0x7')]['ip'],config[_0x0fff('0x7')][_0x0fff('0x6')],util[_0x0fff('0x10')](_0x25994d,![],null)));}function close(){logger['error'](util[_0x0fff('0x11')](_0x0fff('0x12'),config[_0x0fff('0x7')][_0x0fff('0x8')],config[_0x0fff('0x7')]['ip'],config[_0x0fff('0x7')][_0x0fff('0x6')]));}ami[_0x0fff('0x13')]=function(){return function(){return ami[_0x0fff('0xb')]({'action':_0x0fff('0x14')});};};ami[_0x0fff('0x15')]=function(){return function(){return ami[_0x0fff('0xb')]({'action':'devicestatelist'});};};ami['actionSipPeerStatus']=function(){return function(){return ami[_0x0fff('0xb')]({'action':'sippeerstatus'});};};ami[_0x0fff('0x16')]=function(){return function(){return ami[_0x0fff('0xb')]({'action':'queuesummary'});};};ami['actionCoreShowChannels']=function(){return function(){return ami[_0x0fff('0xb')]({'action':'coreshowchannels'});};};function connect(){logger[_0x0fff('0x17')](util[_0x0fff('0x11')](_0x0fff('0x18'),config[_0x0fff('0x7')][_0x0fff('0x8')],config['asterisk']['ip'],config[_0x0fff('0x7')][_0x0fff('0x6')]));ami['once']('error',error);ami[_0x0fff('0x19')](_0x0fff('0x1a'),close);}ami['on'](_0x0fff('0x1b'),connect);ami['on'](_0x0fff('0x1c'),function(_0x39a32f){logger[_0x0fff('0x17')](util[_0x0fff('0x11')](_0x0fff('0x1d'),config['asterisk'][_0x0fff('0x8')],config[_0x0fff('0x7')]['ip'],config['asterisk']['port'],util['inspect'](_0x39a32f,![],null)));});ami['on']('fullybooted',function(){logger[_0x0fff('0x17')](util[_0x0fff('0x11')](_0x0fff('0x1e'),config['asterisk']['username'],config['asterisk']['ip'],config[_0x0fff('0x7')][_0x0fff('0x6')]));return Promise[_0x0fff('0x1f')]()[_0x0fff('0x20')](ami[_0x0fff('0x13')]())[_0x0fff('0x20')](ami['actionDeviceStateList']())[_0x0fff('0x20')](ami[_0x0fff('0x21')]())[_0x0fff('0x20')](ami[_0x0fff('0x16')]())['then'](ami['actionCoreShowChannels']())[_0x0fff('0x22')](function(_0x387bfd){logger[_0x0fff('0xe')]('[ami.js][fullybooted]',util[_0x0fff('0x10')](_0x387bfd,{'showHidden':![],'depth':null}));});});ami[_0x0fff('0x19')](_0x0fff('0xe'),error);ami[_0x0fff('0x19')](_0x0fff('0x1a'),close);module[_0x0fff('0x23')]=ami;
\ No newline at end of file
index 8b3099c..51cd04a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x70e0=['catch','exports','jayson/promise','bluebird','../../config/logger','http','Request','then','memberReport','error','rpc','message','result'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x70e0,0x17b));var _0x070e=function(_0x2b7823,_0xa4de2a){_0x2b7823=_0x2b7823-0x0;var _0x569742=_0x70e0[_0x2b7823];return _0x569742;};'use strict';var jayson=require(_0x070e('0x0'));var BPromise=require(_0x070e('0x1'));var logger=require(_0x070e('0x2'))('ami');var client=jayson['client'][_0x070e('0x3')]({'port':0x2329});client[_0x070e('0x4')]=function(_0x277d32,_0x2593e5){return new BPromise(function(_0x5c90fc,_0x7bce9b){return client['request'](_0x277d32,_0x2593e5)[_0x070e('0x5')](function(_0x4b041d){logger['debug']('rpc',_0x070e('0x6'),_0x277d32,_0x2593e5,_0x4b041d);if(_0x4b041d[_0x070e('0x7')]){logger[_0x070e('0x7')](_0x070e('0x8'),_0x070e('0x6'),_0x277d32,_0x4b041d[_0x070e('0x7')][_0x070e('0x9')],_0x2593e5);return _0x7bce9b(_0x4b041d['error']['message']);}else{return _0x5c90fc(_0x4b041d[_0x070e('0xa')]);}})[_0x070e('0xb')](function(_0x12bb37){logger[_0x070e('0x7')](_0x070e('0x8'),_0x070e('0x6'),_0x277d32,_0x12bb37,_0x2593e5);return _0x7bce9b(_0x12bb37);});});};module[_0x070e('0xc')]=client;
\ No newline at end of file
+var _0xda3f=['then','rpc','memberReport','error','message','result','catch','exports','bluebird','../../config/logger','Request','request'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0xda3f,0xec));var _0xfda3=function(_0x167f87,_0x2b0933){_0x167f87=_0x167f87-0x0;var _0x35f802=_0xda3f[_0x167f87];return _0x35f802;};'use strict';var jayson=require('jayson/promise');var BPromise=require(_0xfda3('0x0'));var logger=require(_0xfda3('0x1'))('ami');var client=jayson['client']['http']({'port':0x2329});client[_0xfda3('0x2')]=function(_0x581693,_0x36dc71){return new BPromise(function(_0x22187d,_0x516500){return client[_0xfda3('0x3')](_0x581693,_0x36dc71)[_0xfda3('0x4')](function(_0x47e7e2){logger['debug'](_0xfda3('0x5'),_0xfda3('0x6'),_0x581693,_0x36dc71,_0x47e7e2);if(_0x47e7e2[_0xfda3('0x7')]){logger[_0xfda3('0x7')](_0xfda3('0x5'),_0xfda3('0x6'),_0x581693,_0x47e7e2[_0xfda3('0x7')][_0xfda3('0x8')],_0x36dc71);return _0x516500(_0x47e7e2[_0xfda3('0x7')][_0xfda3('0x8')]);}else{return _0x22187d(_0x47e7e2[_0xfda3('0x9')]);}})[_0xfda3('0xa')](function(_0x4d7841){logger[_0xfda3('0x7')](_0xfda3('0x5'),_0xfda3('0x6'),_0x581693,_0x4d7841,_0x36dc71);return _0x516500(_0x4d7841);});});};module[_0xfda3('0xb')]=client;
\ No newline at end of file
index 38d814f..3fa4828 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3c0a=['XMD-AMDMINWORDLENGTH','XMD-AMDBETWEENWORDSSILENCE','dialAMDBetweenWordsSilence','XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','XMD-AMDSILENCETHRESHOLD','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','dialAMDMaximumWordLength','XMD-VOICEQUEUEID','XMD-CAMPAIGNID','setXMDContactVariables','Contact','getCallerId','callerid','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','dialOriginateCallerIdNumber','XMD-ORIGINATECALLERIDNAME','variables','dialPrefix','trim','substring','dialCutDigit','SIP/%s/%s%s','from-sip','dialOriginateTimeout','OriginateError','[originate][error]','originate\x20action\x20Error','checkRetriveMax','dialNoAnswerRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','[rescheduleContact]\x20[Busy]','dialCongestionMaxRetry','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberMaxRetry','[rescheduleContact][NoSuchNumber]','[rescheduleContact][Drop]','dialAgentRejectMaxRetry','[rescheduleContact][AgentReject]','[callProgressDetecting]','entity\x20is\x20undefine','outboundNoSuchCallsDay','custom:agentnosuchnumber','dialNoSuchNumberRetryFrequency','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','NoAnswer','buildNoAnswerEventPayload','custom:agentnoanswer','[syncAgentComplete][createHistory][3]','reason\x203\x20ringing\x20no\x20answer','outboundBusyCallsDay','custom:agentbusy','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','stateGlobal','outboundCongestionCallsDay','Congestion','dialCongestionRetryFrequency','custom:agentcongestion','[syncAgentComplete][createHistory][8]','reason\x208\x20congestion','reason\x2011\x20abandoned','outboundRejectCallsDay','AgentReject','dialAgentRejectRetryFrequency','custom:agentreject','agentreject','[syncAgentComplete][createHistory][20]','reason\x2020\x20agentreject','[syncAgentComplete][createHistory][?]','Global','contact\x20not\x20moved','dialPredictiveOptimizationPercentage','round','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','floor','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','dialPredictiveInterval','[startMethodPredictive][StartProgressive][Loop]','dialPredictiveOptimization','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','Drop\x20in\x20this\x20interval','started\x20in\x20predictive\x20at','avgHandleTime','Predictive\x20after\x20first\x20interval','recalculate\x20predictive\x20at','getDataPredictive','startMethodPredictive','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20more\x20than\x20threshold\x20(','talking','agentBusyFactor','busyFactor','[getDataPredictive]','check\x20failure','getDataPredictiveOld','getVoiceQueueRtPauses','loggedIn','outboundQueuePauses','predictiveIntervalPauses','abandonmentRate','[CatchErlangB]','one\x20call\x20every:','[handlePredictive]','checkContactBlack','recallme','[booked][checkContactBlack]','queueStatusComplete:\x20','Queue:\x20','queuestatus','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','scheduledat','dialRecallMeTimeout','unlockContact','outboundReCallsDay','dialRecallInQueue','[rescheduleContact][dialRecallInQueue]','[Originate][HistoryDialRecallInQueue][historyCatch]','[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]','Blacklist','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','inBlackList','limitCalls','temp','getContactDialerIvr','checkContactEmpty','RUNNING','ivrTotalCallsDays','[actionOriginate]\x20','checkIsBlackListIvr','[getContactCampaign2]','dialLimitQueue','not_inuse','getContactDialer','countReScheduled','tryOriginatePredictive','[handlePredictive][limitChannel]','dialOrderByScheduledAt','[countReScheduled]\x20','checkIsBlackList','[actionOriginatePredictive]\x20','[getContactDialerPredictive]','--------\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','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','m\x20=\x20','[abandonmentRate]','Ts\x20=\x20','p\x20=\x20','Amax\x20=\x20','erlangb','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[busyFactor]','interval\x20=\x20','Umin\x20=\x20','exports','util','lodash','uuid','moment','./utils','./utils/hopper','../preview/util/util','../../../config/environment/','../../../config/logger','booked','predictive','predictiveCalls','syncQueueSummary','redis','defaults','localhost','socket.io-emitter','../rpc/cmHopper','../rpc/voiceQueueRt','../rpc/setting','../rpc/interval','./models/history','./models/final','./models/agentComplete','./models/hangup','env','XCALLY_IP_AGI','127.0.0.1','prototype','enqueue','tail','finally','sequence','preview','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','actions','startProgressive','ivrOriginated','queueBooked','queueBookedRR','queuesSummary','agentconnect','bind','queuecallerabandon','syncQueueCallerAbandon','originateresponse','syncOriginateResponse','agentcomplete','custom:queuesummary','custom:queuesummarycomplete','hangup','syncHangup','newexten','syncNewExten','syncVarSet','queuemember','loopCampaigns','loopClearZombieChannels','then','previewRecallmeReminderInterval','isUndefined','emit','outbound','debug','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','inspect','format','voice:queue:%s','name','isEmpty','info','-----\x20Stats\x20Predictive\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','predictiveIntervalDroppedCallsTimeout','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsCallersExit','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','History\x20information\x20are\x20empty','---------\x20ErlangB\x20---------','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCalls','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCallToSecond','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangAbandonmentRate','erlangBusyFactor','merge','getSeconds','startProgressive\x20value\x20cleared','startPredictive','handlePredictive','handlePredictive\x20interval\x20cleared','error','stack','contactsRescheduled','CAMPAIGN_STATUS','CONTACTS_RESCHEDULED','[getContactDialer2][ReScheduled]','message','NO_AVAILABLE_CONTACTS','[getContactDialer2][Empty]','state','statedesc','starttime','queueStatusComplete','[unlockQueueStatus][undefined]','[booked][unlockQueueStatus]','stringify','pick','NULL_INTERVAL','Interval','Intervals','\x20INTERVAL_IS_NULL','isIVRCampaignActive','INACTIVE','\x20NOT\x20Active','isIVRCampaign','campaign:ivr:%s','campaign:save','sendMessageOneNotActive','originated','is\x20not\x20active','DISACTIVED','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','is\x20disactive','[ifTime][Action]','Error','isTrunkReachable','active','status','reachable','SIP/%s','unmonitored','checkIsTrunkReachable','Trunk','TrunkBackup','checkIfTime','ifTimeIvr','checkIfTimeIntervals','ifTime','Failure','\x20Intervals\x20is\x20null\x20','EMPTY_INTERVAL','UNKNOWN_TIMEZONE','\x20Timezone\x20unknow\x20','isArray','length','push','Action','command','iftime\x20%s,%s','interval','content','indexOf','true','catch','timezones','all','some','OVERTIME_GLOBAL_INTERVAL','OVERTIME_INTERVAL','[ifTime][promiseAll]','Global:\x20','\x20Interval\x20is\x20overtime:\x20','Timezone:\x20','resetActiveCalls','syncCampaigns','undefined','resolve','dialGlobalInterval','dialTimezone','checkDialMethod','dialMethod','progressive','handlePower','power','dialPowerLevel','silly','intervalIftime','Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:','isGlobal','AMI\x20IfTime','syncAgentConnect','queue','uniqueId','uniqueid','type','ivr','updateOriginated','YYYY-MM-DD\x20HH:mm:ss','outboundAnswerCallsDay','reason','agent','agiafterat','dialQueueProject2','dialAgiAfterHangupAgent','createHistory','droptime','dialQueueTimeout','outboundDropCallsDayTimeout','predictiveIntervalErlangCallsDroppedCalls','Drop','dropreason','TIMEOUT','countdropretry','dialDropRetryFrequency','callAdditionalPhoneAfterMin','additional','dialDropMaxRetry','rescheduleContact','add','minutes','VoiceQueueId','calleridname','calleridnum','[syncAgentComplete][createHistory][10]','swapAdditionalPhones','outboundDropCallsDayCallersExit','Abandoned','CALLEREXIT','countglobal','dialAbandonedRetryFrequency','voiceQueue','dialAbandonedMaxRetry','countabandonedretry','ContactId','ListId','CampaignId','[rescheduleContact][Abandoned]','endtime','[syncAgentComplete][createHistory][11]','channel','strategy','actionid','isNil','stateinterface','locked','rrmemory','idHopper','paused','syncQueueStatusComplete','roundrobin','[Catch][Preview][syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','_rr','unlockRR','Agent:\x20','contactAgent-idHopper:\x20','run','[booked][RR][finaly]','[booked][unlock]','[unlock2][syncQueueStatusComplete]','[booked][unlock3]','[unlock3][syncQueueStatusComplete]','responsetime','getQueue','response','Success','callProgressDetecting','variable','amdstatus','exten','dialAMDActive','outboundAnswerAgiCallsDay','HangupInAMD','membername','AMD','custom:amd','amd','MACHINE','Machine','countmachineretry','buildObj','[syncAgentComplete][createHistory][0]','countbusyretry','countnoanswerretry','countnosuchnumberretry','countagentrejectretry','dialGlobalMaxRetry','reason19\x20machine....','dialMachineMaxRetry','createStateFinal','reason\x2019\x20machine....','dialMachineRetryFrequency','[rescheduleContact][Machine]','value','HANGUP','saveInDb','[syncHangupInAMDIvr][createHistory]','countcongestionretry','ivrAnswerCallsDay','[syncHangupIvr][createHistory]','dialQueueProject','AnswerAGI','AGI','moveContactManagedDialer','[syncHangupIvr]','Normal\x20Clearing','[syncAgentComplete][createHistory]','[syncAgentComplete]','outboundUnknownCallsDay','running','isPreviewCampaign','statusMessage','getQueueCampaignStatusMessage','available','inUse','pTalking','ACTIVE','[syncQueueSummary]','compareToOutboundQueue','queueSummaryCountersUpdated','updateReportFromOutboundQueue','assign','syncQueueSummaryComplete','throttle','filter','dialPreviewRecallmeReminder','handlePreviewRecallNotifications','map','Agent','user:dialPreviewRecallReminder','checkPreviewRecallReminder','clearZombieChannels','[actions]','No\x20such\x20channel','[Dialer][checkChannel]','[Dialer][checkChannel][ivr]','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','loggerHandler','emptyContact','notFound','UserId','[emptyContact]','queueCallerAbandonCreateState','[syncQueueCallerAbandon]\x20[Drop]','user:%s','launchHandleIvr','handleIvr','actionOriginate','object','voiceQueue\x20is\x20undefine','phone','originate','contact\x20is\x20undefine','getCaller','\x22agi://%s/square,%s\x22','NONE','isOutboundQueue','dialer','xcally-motion-dialer','XMD-AMDINITIALSILENCE','dialAMDInitialSilence','XMD-AMDAFTERGREETINGSILENCE','dialAMDAfterGreetingSilence','XMD-AMDTOTALANALYSISTIME'];(function(_0x166d93,_0x301f09){var _0xba708=function(_0x349bf7){while(--_0x349bf7){_0x166d93['push'](_0x166d93['shift']());}};_0xba708(++_0x301f09);}(_0x3c0a,0xaf));var _0xa3c0=function(_0x5961a0,_0x2c4f43){_0x5961a0=_0x5961a0-0x0;var _0x727878=_0x3c0a[_0x5961a0];return _0x727878;};'use strict';var util=require(_0xa3c0('0x0'));var _=require(_0xa3c0('0x1'));var uuid=require(_0xa3c0('0x2'));var moment=require(_0xa3c0('0x3'));var rr=require('rr');var Redis=require('ioredis');var utils=require(_0xa3c0('0x4'));var hopperUtils=require(_0xa3c0('0x5'));var ut=require(_0xa3c0('0x6'));var config=require(_0xa3c0('0x7'));var logger=require(_0xa3c0('0x8'))('dialer');var loggerBooked=require('../../../config/logger')(_0xa3c0('0x9'));var loggerPredictive=require(_0xa3c0('0x8'))(_0xa3c0('0xa'));var loggerPredictiveCalls=require(_0xa3c0('0x8'))(_0xa3c0('0xb'));var loggerSyncQueueSummary=require(_0xa3c0('0x8'))(_0xa3c0('0xc'));var ami=require('../ami');config[_0xa3c0('0xd')]=_[_0xa3c0('0xe')](config['redis'],{'host':_0xa3c0('0xf'),'port':0x18eb});var io=require(_0xa3c0('0x10'))(new Redis(config['redis']));var cmHopper=require(_0xa3c0('0x11'));var voiceQueueRt=require(_0xa3c0('0x12'));var RpcSetting=require(_0xa3c0('0x13'));var Interval=require(_0xa3c0('0x14'));var Action=require('./models/action');var History=require(_0xa3c0('0x15'));var Final=require(_0xa3c0('0x16'));var AgentComplete=require(_0xa3c0('0x17'));var QueueCallerAbandon=require('./models/queueCallerAbandon');var Hangup=require(_0xa3c0('0x18'));var ipAgi=process[_0xa3c0('0x19')][_0xa3c0('0x1a')]||_0xa3c0('0x1b');var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence[_0xa3c0('0x1c')][_0xa3c0('0x1d')]=function(_0xedbef9){this[_0xa3c0('0x1e')]=this['tail']?this[_0xa3c0('0x1e')][_0xa3c0('0x1f')](_0xedbef9):_0xedbef9();};function Dialer(_0x35554e,_0x5c3eb0){this[_0xa3c0('0x20')]=new Sequence();this[_0xa3c0('0x21')]=_0x5c3eb0;this[_0xa3c0('0x22')]=_0x35554e[_0xa3c0('0x22')];this[_0xa3c0('0x23')]=_0x35554e[_0xa3c0('0x23')];this[_0xa3c0('0x24')]=_0x35554e[_0xa3c0('0x24')];this[_0xa3c0('0x25')]=_0x35554e[_0xa3c0('0x25')];this[_0xa3c0('0x26')]=config[_0xa3c0('0x26')]||0x2;this['channels']={};this[_0xa3c0('0x27')]={};this['contactsId']={};this['uniqueId']={};this['optionPredictive']={};this['startPredictive']={};this[_0xa3c0('0x28')]={};this[_0xa3c0('0x29')]={};this[_0xa3c0('0x2a')]={};this[_0xa3c0('0x2b')]={};this[_0xa3c0('0x2c')]={};ami['on'](_0xa3c0('0x2d'),this['syncAgentConnect'][_0xa3c0('0x2e')](this));ami['on'](_0xa3c0('0x2f'),this[_0xa3c0('0x30')]['bind'](this));ami['on'](_0xa3c0('0x31'),this[_0xa3c0('0x32')][_0xa3c0('0x2e')](this));ami['on'](_0xa3c0('0x33'),this['syncAgentComplete']['bind'](this));ami['on'](_0xa3c0('0x34'),this[_0xa3c0('0xc')][_0xa3c0('0x2e')](this));ami['on'](_0xa3c0('0x35'),this['syncQueueSummaryComplete']['bind'](this));ami['on'](_0xa3c0('0x36'),this[_0xa3c0('0x37')][_0xa3c0('0x2e')](this));ami['on'](_0xa3c0('0x38'),this[_0xa3c0('0x39')]['bind'](this));ami['on']('varset',this[_0xa3c0('0x3a')][_0xa3c0('0x2e')](this));ami['on'](_0xa3c0('0x3b'),this['syncQueueMember'][_0xa3c0('0x2e')](this));ami['on']('queuestatuscomplete',this['syncQueueStatusComplete'][_0xa3c0('0x2e')](this));this[_0xa3c0('0x3c')]();this[_0xa3c0('0x3d')]();RpcSetting['getSettings']()[_0xa3c0('0x3e')](function(_0x398c17){previewRecallmeReminderInterval=_0x398c17[_0xa3c0('0x3f')];});}function isNotNull(_0x457a23){return _0x457a23!==null&&!_[_0xa3c0('0x40')](_0x457a23);}function msgResponse(_0x52485d,_0x364c24,_0xabf19e){return{'action':_0x52485d,'response':_0x364c24,'message':_0xabf19e,'stack':_0xabf19e};}function emit(_0x24ffee,_0x4cbf5a,_0x2b1b8c){io['to'](_0x24ffee)[_0xa3c0('0x41')](_0x4cbf5a,_0x2b1b8c);}function emitOutboundVoiceQueueSummary(_0x54f0a6){if(_0x54f0a6['type']===_0xa3c0('0x42')){logger[_0xa3c0('0x43')](_0xa3c0('0x44'),util[_0xa3c0('0x45')](_0x54f0a6,{'showHidden':![],'depth':null}));emit(util[_0xa3c0('0x46')](_0xa3c0('0x47'),_0x54f0a6[_0xa3c0('0x48')]),'voice_queue:save',_0x54f0a6);}}function checkGetDataPredictive(_0x44a872){if(isNotNull(_0x44a872)&&!_[_0xa3c0('0x49')](_0x44a872)){loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x4b'));loggerPredictive['info']('Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x44a872[_0xa3c0('0x4c')]);loggerPredictive['info'](_0xa3c0('0x4d'),_0x44a872[_0xa3c0('0x4e')]);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x4f'),_0x44a872[_0xa3c0('0x50')]);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x51'),_0x44a872[_0xa3c0('0x52')]);loggerPredictive[_0xa3c0('0x4a')]('AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x44a872[_0xa3c0('0x53')]);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x54'),_0x44a872['predictiveIntervalAvgTalktime']);loggerPredictive['info'](_0xa3c0('0x55'));if(_0x44a872[_0xa3c0('0x4c')]>0x0){if(!_[_0xa3c0('0x40')](_0x44a872[_0xa3c0('0x56')])&&_0x44a872[_0xa3c0('0x56')]>0x0){return!![];}loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x57'));if(!_[_0xa3c0('0x40')](_0x44a872[_0xa3c0('0x53')])&&_0x44a872[_0xa3c0('0x53')]>0x0){return!![];}loggerPredictive['info']('Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive');}else{loggerPredictive['info'](_0xa3c0('0x58'));}}else{loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x59'));}return![];}function mergeDataErlangB(_0x8cddb3){return function(_0x316b19){loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x5a'));loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x5b'),_0x316b19[_0xa3c0('0x5c')]);loggerPredictive['info'](_0xa3c0('0x5d'),_0x316b19[_0xa3c0('0x5e')]);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x5f'),_0x316b19[_0xa3c0('0x60')]);loggerPredictive[_0xa3c0('0x4a')]('Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x316b19[_0xa3c0('0x61')]);loggerPredictive[_0xa3c0('0x4a')]('Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x316b19[_0xa3c0('0x60')]);loggerPredictive[_0xa3c0('0x4a')]('---------------------------');_[_0xa3c0('0x62')](_0x8cddb3,_0x316b19);};}function ifInterval(_0x414cd9,_0x219207){if(_['isUndefined'](_0x219207)){return![];}return utils[_0xa3c0('0x63')](undefined,_0x219207)<_0x414cd9*0x3c;}function clearPredictiveAttributes(_0x263fcf){if(_0x263fcf[_0xa3c0('0x28')]){_0x263fcf[_0xa3c0('0x28')]=undefined;loggerPredictive[_0xa3c0('0x43')](_0x263fcf[_0xa3c0('0x48')],_0xa3c0('0x64'));}if(_0x263fcf[_0xa3c0('0x65')]){_0x263fcf['startPredictive']=undefined;loggerPredictive[_0xa3c0('0x43')](_0x263fcf[_0xa3c0('0x48')],'startPredictive\x20value\x20cleared');}if(_0x263fcf['handlePredictive']){clearInterval(_0x263fcf['handlePredictive']);_0x263fcf[_0xa3c0('0x66')]=undefined;loggerPredictive[_0xa3c0('0x43')](_0x263fcf[_0xa3c0('0x48')],_0xa3c0('0x67'));}}function loggerCatchPredictive(_0x2a0122,_0xe7bc7){return function(_0xf7a831){loggerPredictive[_0xa3c0('0x68')](_0xe7bc7[_0xa3c0('0x48')],_0x2a0122);loggerPredictive['error'](_0xf7a831[_0xa3c0('0x69')]);clearPredictiveAttributes(_0xe7bc7);};}function loggerCatch(_0x4a2e8d){return function(_0x12c0e8){logger[_0xa3c0('0x68')](_0x4a2e8d,util[_0xa3c0('0x45')](_0x12c0e8,{'showHidden':![],'depth':null}));};}function loggerGetContactDialer(_0x2d5cd5,_0x560b67,_0x13af99){return function(_0x4281ee){utils['checkContactLowerLimitOriginate'](_0x560b67,_0x13af99,0x0);_0x560b67['temp']=0x0;logger['error'](_0x2d5cd5,util[_0xa3c0('0x45')](_0x4281ee,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x5e3281){return function(_0x6b8bb){if(isNotNull(_0x6b8bb)&&isNotNull(_0x6b8bb[0x0])){if(_0x6b8bb[0x0][_0xa3c0('0x6a')]>0x0){_0x5e3281['message']=utils[_0xa3c0('0x6b')][_0xa3c0('0x6c')];logger[_0xa3c0('0x4a')](_0xa3c0('0x6d')+_0x5e3281[_0xa3c0('0x48')],_0x6b8bb[0x0]['contactsRescheduled'],'contacts');}else{_0x5e3281[_0xa3c0('0x6e')]=utils[_0xa3c0('0x6b')][_0xa3c0('0x6f')];logger[_0xa3c0('0x4a')](_0xa3c0('0x70')+_0x5e3281['name']);}}};}function createObjHistory(_0x9eaa1f,_0x7d23c2,_0x5cb7c0,_0x10032a,_0x5571e1){_0x9eaa1f[_0xa3c0('0x6e')]=_0x5cb7c0;var _0x3910fa=new Action(_0x9eaa1f,_0x7d23c2);var _0x2d4e20=new History(_0x3910fa);_0x2d4e20[_0xa3c0('0x71')]=_0x10032a;_0x2d4e20[_0xa3c0('0x72')]=_0x5571e1;_0x2d4e20['endtime']=_0x3910fa[_0xa3c0('0x73')];return _0x2d4e20;}function unlockQueueStatus(_0x1af7a3,_0x6f0360){setTimeout(function(){if(_[_0xa3c0('0x40')](_0x1af7a3[_0xa3c0('0x74')])){loggerBooked['error'](_0xa3c0('0x75'),_0x6f0360);}_0x1af7a3[_0xa3c0('0x74')]=!![];loggerBooked[_0xa3c0('0x4a')](_0xa3c0('0x76'),_0x6f0360,JSON[_0xa3c0('0x77')](_[_0xa3c0('0x78')](_0x1af7a3,[_0xa3c0('0x48'),_0xa3c0('0x74')])));},0x1f3);}function checkInterval(_0x2d093d){return function(){if(!isNotNull(_0x2d093d['Interval'])){_0x2d093d['message']=utils[_0xa3c0('0x6b')][_0xa3c0('0x79')];throw _0x2d093d[_0xa3c0('0x48')]+'\x20INTERVAL_IS_NULL';}if(!isNotNull(_0x2d093d[_0xa3c0('0x7a')][_0xa3c0('0x7b')])){_0x2d093d['message']=utils[_0xa3c0('0x6b')][_0xa3c0('0x79')];throw _0x2d093d[_0xa3c0('0x48')]+_0xa3c0('0x7c');}if(!isNotNull(_[_0xa3c0('0x49')](_0x2d093d['Interval'][_0xa3c0('0x7b')]))){_0x2d093d['message']=utils[_0xa3c0('0x6b')][_0xa3c0('0x79')];throw _0x2d093d[_0xa3c0('0x48')]+'\x20INTERVAL_IS_NULL';}};}function checkIsIVRCampaignActive(_0x5b100b){return function(){if(!utils[_0xa3c0('0x7d')](_0x5b100b)){_0x5b100b[_0xa3c0('0x6e')]=utils[_0xa3c0('0x6b')][_0xa3c0('0x7e')];throw _0x5b100b[_0xa3c0('0x48')]+_0xa3c0('0x7f');}};}function emitCampaignSummary(_0x4d9ab2){if(utils[_0xa3c0('0x80')](_0x4d9ab2)){emit(util[_0xa3c0('0x46')](_0xa3c0('0x81'),_0x4d9ab2[_0xa3c0('0x48')]),_0xa3c0('0x82'),_0x4d9ab2);}}function loggerCatchQueueSummary(_0x3caf4c,_0x7deeab){return function(_0x5c279a){clearPredictiveAttributes(_0x7deeab);emitCampaignSummary(_0x7deeab);loggerSyncQueueSummary[_0xa3c0('0x43')](_0x3caf4c,util[_0xa3c0('0x45')](_0x5c279a,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x4593bc){if(_0x4593bc[_0xa3c0('0x83')]){if(_0x4593bc[_0xa3c0('0x84')]===0x0){_0x4593bc[_0xa3c0('0x83')]=![];_0x4593bc[_0xa3c0('0x6e')]=utils[_0xa3c0('0x6b')]['INACTIVE'];loggerSyncQueueSummary[_0xa3c0('0x43')]('[syncQueueSummary]\x20Campaign\x20Ivr:\x20',_0x4593bc['name'],_0xa3c0('0x85'));}else{_0x4593bc[_0xa3c0('0x6e')]=utils['CAMPAIGN_STATUS'][_0xa3c0('0x86')];loggerSyncQueueSummary[_0xa3c0('0x43')](_0xa3c0('0x87'),_0x4593bc['name'],_0xa3c0('0x88'));}emitCampaignSummary(_0x4593bc);}}function myreject(_0x94dad8){return function(_0x1187e0){return _0x94dad8(msgResponse(_0xa3c0('0x89'),_0xa3c0('0x8a'),JSON[_0xa3c0('0x77')](_0x1187e0)));};}Dialer[_0xa3c0('0x1c')][_0xa3c0('0x8b')]=function(_0x36c8c5){return!_[_0xa3c0('0x40')](_0x36c8c5)&&_0x36c8c5&&!_[_0xa3c0('0x40')](_0x36c8c5[_0xa3c0('0x48')])&&!_[_0xa3c0('0x40')](_0x36c8c5[_0xa3c0('0x8c')])&&_0x36c8c5['active']&&(this[_0xa3c0('0x25')][util['format']('SIP/%s',_0x36c8c5[_0xa3c0('0x48')])][_0xa3c0('0x8d')]===_0xa3c0('0x8e')||this[_0xa3c0('0x25')][util[_0xa3c0('0x46')](_0xa3c0('0x8f'),_0x36c8c5['name'])][_0xa3c0('0x8d')]===_0xa3c0('0x90'));};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x91')]=function(_0x279cc3){var _0x48e8c9=this;return function(){if(!_0x48e8c9[_0xa3c0('0x8b')](_0x279cc3[_0xa3c0('0x92')])){if(!_0x48e8c9[_0xa3c0('0x8b')](_0x279cc3[_0xa3c0('0x93')])){_0x279cc3['message']=utils['CAMPAIGN_STATUS']['TRUNK_NOT_REACHABLE'];throw _0x279cc3[_0xa3c0('0x48')]+'\x20trunk\x20is\x20not\x20reachable';}}};};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x94')]=function(_0x4806b0,_0x2eb28a,_0x4b07c9,_0x15fa95){var _0x52c41c=this;return function(){var _0x32de99=!![];return _0x52c41c[_0xa3c0('0x95')](_0x4806b0,_0x2eb28a,_0x4b07c9,_0x15fa95,_0x32de99);};};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x96')]=function(_0x1f91c1,_0x9340e7,_0x30c864,_0x1248b2){var _0x6b30c6=this;return function(){var _0x509563=![];return _0x6b30c6[_0xa3c0('0x95')](_0x1f91c1[_0xa3c0('0x7b')],_0x9340e7,_0x30c864,_0x1248b2,_0x509563);};};Dialer['prototype'][_0xa3c0('0x95')]=function(_0x53f380,_0x3448e7,_0x43e639,_0x288e41,_0xa17096){var _0x26712d=[];return new Promise(function(_0x86f40c,_0xce9b76){if(!isNotNull(_0x53f380)){_0x288e41[_0xa3c0('0x6e')]=utils['CAMPAIGN_STATUS']['NULL_INTERVAL'];return _0xce9b76(msgResponse(_0xa3c0('0x97'),_0xa3c0('0x98'),_0x43e639+_0xa3c0('0x99')));}if(_[_0xa3c0('0x49')](_0x53f380)){_0x288e41['message']=utils[_0xa3c0('0x6b')][_0xa3c0('0x9a')];return _0xce9b76(msgResponse(_0xa3c0('0x97'),_0xa3c0('0x98'),_0x43e639+'\x20Intervals\x20is\x20empty\x20'));}if(_0x3448e7&&_[_0xa3c0('0x40')](config['timezones'][_0x3448e7])){_0x288e41['message']=utils[_0xa3c0('0x6b')][_0xa3c0('0x9b')];return _0xce9b76(msgResponse(_0xa3c0('0x97'),_0xa3c0('0x98'),_0x43e639+_0xa3c0('0x9c')+_0x3448e7));}if(_[_0xa3c0('0x9d')](_0x53f380)){for(var _0x11369a=0x0;_0x11369a<_0x53f380[_0xa3c0('0x9e')];_0x11369a+=0x1){_0x26712d[_0xa3c0('0x9f')](ami[_0xa3c0('0xa0')]({'action':_0xa3c0('0xa1'),'command':util['format'](_0xa3c0('0xa2'),_0x53f380[_0x11369a][_0xa3c0('0xa3')],!_['isUndefined'](config['timezones'][_0x3448e7])?_0x3448e7:'')})[_0xa3c0('0x3e')](function(_0x37b36d){return _0x37b36d[_0xa3c0('0xa4')][_0xa3c0('0xa5')](_0xa3c0('0xa6'))>=0x0;})[_0xa3c0('0xa7')](myreject(_0xce9b76)));}}else{_0x26712d[_0xa3c0('0x9f')](ami[_0xa3c0('0xa0')]({'action':_0xa3c0('0xa1'),'command':util['format'](_0xa3c0('0xa2'),_0x53f380,!_[_0xa3c0('0x40')](config[_0xa3c0('0xa8')][_0x3448e7])?_0x3448e7:'')})[_0xa3c0('0x3e')](function(_0x50f460){return _0x50f460[_0xa3c0('0xa4')][_0xa3c0('0xa5')](_0xa3c0('0xa6'))>=0x0;})[_0xa3c0('0xa7')](myreject(_0xce9b76)));}Promise[_0xa3c0('0xa9')](_0x26712d)[_0xa3c0('0x3e')](function(_0x121c0d){var _0x265b1f=_[_0xa3c0('0xaa')](_0x121c0d);if(_0x265b1f){return _0x86f40c(_0x265b1f);}else{_0x288e41[_0xa3c0('0x6e')]=_0xa17096?utils[_0xa3c0('0x6b')][_0xa3c0('0xab')]:utils['CAMPAIGN_STATUS'][_0xa3c0('0xac')];return _0xce9b76(msgResponse(_0xa3c0('0xad'),_0xa3c0('0x98'),_0xa3c0('0xae')+_0xa17096+'\x20'+_0x43e639+_0xa3c0('0xaf')+util[_0xa3c0('0x45')](_0x53f380,{'showHidden':![],'depth':null})+_0xa3c0('0xb0')+_0x3448e7));}})['catch'](function(_0x9103f4){return _0xce9b76(msgResponse(_0xa3c0('0x97'),_0xa3c0('0x98'),JSON[_0xa3c0('0x77')](_0x9103f4)));});});};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x3c')]=function(){var _0x467af8=this;return cmHopper[_0xa3c0('0xb1')]({'active':![]},{'where':{'active':!![]}})[_0xa3c0('0x3e')](function(){setInterval(function(){_0x467af8[_0xa3c0('0xb2')]();},0x3e8);});};Dialer[_0xa3c0('0x1c')][_0xa3c0('0xb2')]=function(){var _0x7888c5=this;var _0x179c35;for(var _0x527677 in this[_0xa3c0('0x23')]){if(typeof this[_0xa3c0('0x23')][_0x527677]!==_0xa3c0('0xb3')){_0x179c35=this[_0xa3c0('0x23')][_0x527677];if(utils[_0xa3c0('0x80')](_0x179c35)&&utils[_0xa3c0('0x7d')](_0x179c35)){_0x179c35[_0xa3c0('0x83')]=!![];Promise[_0xa3c0('0xb4')]()[_0xa3c0('0x3e')](checkIsIVRCampaignActive(_0x179c35))[_0xa3c0('0x3e')](checkInterval(_0x179c35))[_0xa3c0('0x3e')](_0x7888c5[_0xa3c0('0x91')](_0x179c35))[_0xa3c0('0x3e')](_0x7888c5[_0xa3c0('0x94')](_0x179c35[_0xa3c0('0xb5')],_0x179c35[_0xa3c0('0xb6')],_0x179c35['name'],_0x179c35))['then'](_0x7888c5[_0xa3c0('0x96')](_0x179c35[_0xa3c0('0x7a')],_0x179c35[_0xa3c0('0xb6')],_0x179c35[_0xa3c0('0x48')],_0x179c35))[_0xa3c0('0x3e')](_0x7888c5['launchHandleIvr'](_0x179c35))[_0xa3c0('0xa7')](loggerCatchQueueSummary('[syncCampaigns]',_0x179c35));}else{notSendMessagesCampaign(_0x179c35);}}}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0xb7')]=function(_0x2c76df){if(_0x2c76df[_0xa3c0('0xb8')]!==_0xa3c0('0xa')){clearPredictiveAttributes(_0x2c76df);}switch(_0x2c76df[_0xa3c0('0xb8')]){case _0xa3c0('0xb9'):this[_0xa3c0('0xba')](_0x2c76df,0x1);break;case _0xa3c0('0xbb'):this['handlePower'](_0x2c76df,_0x2c76df[_0xa3c0('0xbc')]);break;case _0xa3c0('0xa'):this[_0xa3c0('0xa')](_0x2c76df);break;case _0xa3c0('0x9'):this[_0xa3c0('0xba')](_0x2c76df,0x1);break;default:logger['error']('Queue',_0x2c76df[_0xa3c0('0x48')],'method\x20not\x20recognized');}};Dialer[_0xa3c0('0x1c')]['ifTime']=function(_0x50d3c9,_0x1be558){var _0x4c0aac=_0x50d3c9['dialTimezone'];var _0x9c5869=_0x1be558?_0x50d3c9['dialGlobalInterval']:_0x50d3c9[_0xa3c0('0x7a')][_0xa3c0('0x7b')];logger[_0xa3c0('0xbd')]('Dialer::ifTime()',_0x9c5869,_0x4c0aac,_0x50d3c9['name'],util[_0xa3c0('0x46')]('Voice\x20Queue\x20%s\x20$s',_0x50d3c9[_0xa3c0('0x48')],_0x50d3c9['id']));var _0x17127a=null;return Interval[_0xa3c0('0xbe')](_0x9c5869,_0x4c0aac)[_0xa3c0('0x3e')](function(_0x1d52b9){if(_0x1d52b9===!![]){return _0x1d52b9;}else{_0x50d3c9[_0xa3c0('0x6e')]=_0x1be558?utils[_0xa3c0('0x6b')][_0xa3c0('0xab')]:utils[_0xa3c0('0x6b')]['OVERTIME_INTERVAL'];_0x17127a=msgResponse(_0xa3c0('0xad'),'Failure',_0xa3c0('0xae')+_0x1be558+'\x20'+_0x50d3c9[_0xa3c0('0x48')]+'\x20Interval\x20is\x20overtime:\x20'+util[_0xa3c0('0x45')](_0x9c5869,{'showHidden':![],'depth':null})+_0xa3c0('0xb0')+_0x4c0aac);}if(_0x17127a!==null){logger[_0xa3c0('0xbd')](_0xa3c0('0xbf'),_0x17127a);_0x17127a[_0xa3c0('0xc0')]=_0x1be558;throw _0x17127a;}})[_0xa3c0('0xa7')](function(_0x229d93){logger['error'](_0xa3c0('0xc1'),_0x229d93);throw msgResponse(_0xa3c0('0x89'),_0xa3c0('0x8a'),util['inspect'](_0x229d93,{'showHidden':![],'depth':null}));});};Dialer['prototype'][_0xa3c0('0xc2')]=function(_0x3ac2ec){if(this['voiceQueues'][_0x3ac2ec[_0xa3c0('0xc3')]]){if(this['uniqueId'][_0x3ac2ec['uniqueid']]&&this[_0xa3c0('0xc4')][_0x3ac2ec[_0xa3c0('0xc5')]][_0xa3c0('0xc6')]!==_0xa3c0('0xc7')){this[_0xa3c0('0xc8')](this['voiceQueues'][_0x3ac2ec[_0xa3c0('0xc3')]]);this['uniqueId'][_0x3ac2ec['uniqueid']]['answertime']=moment()[_0xa3c0('0x46')](_0xa3c0('0xc9'));}}};Dialer[_0xa3c0('0x1c')]['syncAgentComplete']=function(_0x4b623b){var _0x10f743=this[_0xa3c0('0xc4')][_0x4b623b[_0xa3c0('0xc5')]];if(this[_0xa3c0('0x22')][_0x4b623b['queue']]){if(_0x10f743&&_0x10f743['type']!=='ivr'){delete this[_0xa3c0('0xc4')][_0x4b623b[_0xa3c0('0xc5')]];this[_0xa3c0('0x22')][_0x4b623b['queue']][_0xa3c0('0xca')]+=0x1;var _0x5b9908=new AgentComplete(_0x10f743,_0x4b623b);if(_0x4b623b[_0xa3c0('0xcb')]===_0xa3c0('0xcc')){_0x5b9908[_0xa3c0('0xcd')]=this[_0xa3c0('0x22')][_0x4b623b[_0xa3c0('0xc3')]][_0xa3c0('0xce')]&&this['voiceQueues'][_0x4b623b[_0xa3c0('0xc3')]][_0xa3c0('0xcf')]?moment()[_0xa3c0('0x46')](_0xa3c0('0xc9')):undefined;}hopperUtils[_0xa3c0('0xd0')](_0x5b9908)['catch'](loggerCatch('[syncAgentComplete][createHistory]'));hopperUtils['moveContactManagedDialer'](_0x5b9908)['catch'](loggerCatch('[syncAgentComplete]'));}}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x30')]=function(_0x273261){var _0x2282a4=this[_0xa3c0('0xc4')][_0x273261[_0xa3c0('0xc5')]];var _0x1e99e9=this;var _0x210692=![];var _0x3d1596;var _0x2e4b7b;if(this[_0xa3c0('0x22')][_0x273261[_0xa3c0('0xc3')]]){if(_0x2282a4&&_0x2282a4['type']!==_0xa3c0('0xc7')){delete this[_0xa3c0('0xc4')][_0x273261[_0xa3c0('0xc5')]];this[_0xa3c0('0xc8')](this['voiceQueues'][_0x273261[_0xa3c0('0xc3')]]);_0x2282a4[_0xa3c0('0xd1')]=moment()[_0xa3c0('0x46')](_0xa3c0('0xc9'));var _0xb6d760=new QueueCallerAbandon(_0x2282a4,_0x273261);if(utils[_0xa3c0('0x63')](_0x2282a4[_0xa3c0('0xd1')],_0x2282a4['responsetime'])>=_0x2282a4[_0xa3c0('0xd2')]){this[_0xa3c0('0x22')][_0x273261['queue']]['predictiveIntervalDroppedCallsTimeout']+=0x1;this[_0xa3c0('0x22')][_0x273261[_0xa3c0('0xc3')]][_0xa3c0('0xd3')]+=0x1;this[_0xa3c0('0x22')][_0x273261[_0xa3c0('0xc3')]][_0xa3c0('0xd4')]+=0x1;_0xb6d760[_0xa3c0('0x71')]=0xa;_0xb6d760[_0xa3c0('0x72')]=_0xa3c0('0xd5');_0xb6d760[_0xa3c0('0xd6')]=_0xa3c0('0xd7');_0xb6d760['agiafterat']=this[_0xa3c0('0x22')][_0x273261['queue']][_0xa3c0('0xce')]?moment()[_0xa3c0('0x46')](_0xa3c0('0xc9')):undefined;_0xb6d760[_0xa3c0('0xd8')]+=0x1;_0xb6d760['countglobal']+=0x1;_0x3d1596=this[_0xa3c0('0x22')][_0x273261[_0xa3c0('0xc3')]][_0xa3c0('0xd9')];_0x2e4b7b=this[_0xa3c0('0x22')][_0x273261['queue']][_0xa3c0('0xda')];hopperUtils['verifyAdditionalPhones'](_0xb6d760,_0xb6d760[_0xa3c0('0x71')],_0x2282a4['voiceQueue'])['then'](function(_0x3ef9f4){_0x210692=_0x3ef9f4[_0xa3c0('0xdb')]==0x1;if(_0xb6d760[_0xa3c0('0xd8')]>=_0x1e99e9['voiceQueues'][_0x273261[_0xa3c0('0xc3')]][_0xa3c0('0xdc')]){_0x1e99e9['queueCallerAbandonCreateState'](_0xb6d760,_0x3ef9f4[_0xa3c0('0xdb')]);}else{hopperUtils[_0xa3c0('0xdd')]({'active':![],'countdropretry':_0xb6d760[_0xa3c0('0xd8')],'scheduledat':moment()[_0xa3c0('0xde')](_0x1e99e9[_0xa3c0('0x22')][_0x273261[_0xa3c0('0xc3')]][_0xa3c0('0xd9')],_0xa3c0('0xdf'))[_0xa3c0('0x46')](_0xa3c0('0xc9')),'ContactId':_0x2282a4['ContactId'],'ListId':_0x2282a4['ListId'],'VoiceQueueId':_0x2282a4[_0xa3c0('0xe0')]||undefined,'CampaignId':_0x2282a4['CampaignId']||undefined})[_0xa3c0('0xa7')](loggerCatch('[rescheduleContact][Drop]'));var _0x1c865a=new History(_0xb6d760);_0x1c865a[_0xa3c0('0x71')]=0xa;_0x1c865a[_0xa3c0('0x72')]=_0xa3c0('0xd5');_0x1c865a[_0xa3c0('0x73')]=moment()[_0xa3c0('0x46')]('YYYY-MM-DD\x20HH:mm:ss');_0x1c865a['endtime']=_0x1c865a[_0xa3c0('0x73')];_0x1c865a[_0xa3c0('0xe1')]=_0xb6d760[_0xa3c0('0xe1')];_0x1c865a[_0xa3c0('0xe2')]=_0xb6d760['calleridnum'];hopperUtils[_0xa3c0('0xd0')](_0x1c865a)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0xe3')));}})['then'](function(){if(_0x210692)hopperUtils[_0xa3c0('0xe4')](_0xb6d760,_0x3d1596,_0x2e4b7b)[_0xa3c0('0x3e')](function(){return 0x1;});});}else{this['voiceQueues'][_0x273261['queue']]['predictiveIntervalDroppedCallsCallersExit']+=0x1;this[_0xa3c0('0x22')][_0x273261['queue']][_0xa3c0('0xe5')]+=0x1;_0xb6d760['state']=0xb;_0xb6d760['statedesc']=_0xa3c0('0xe6');_0xb6d760[_0xa3c0('0xd6')]=_0xa3c0('0xe7');_0xb6d760['countabandonedretry']+=0x1;_0xb6d760[_0xa3c0('0xe8')]+=0x1;_0x3d1596=this[_0xa3c0('0x22')][_0x273261[_0xa3c0('0xc3')]][_0xa3c0('0xe9')];_0x2e4b7b=this[_0xa3c0('0x22')][_0x273261['queue']][_0xa3c0('0xda')];hopperUtils['verifyAdditionalPhones'](_0xb6d760,_0xb6d760['state'],_0x2282a4[_0xa3c0('0xea')])[_0xa3c0('0x3e')](function(_0x1d4c30){if(_0xb6d760['countabandonedretry']>=_0x1e99e9[_0xa3c0('0x22')][_0x273261['queue']][_0xa3c0('0xeb')]){_0x1e99e9['queueCallerAbandonCreateState'](_0xb6d760,_0x1d4c30[_0xa3c0('0xdb')]);}else{hopperUtils[_0xa3c0('0xdd')]({'active':![],'countabandonedretry':_0xb6d760[_0xa3c0('0xec')],'scheduledat':moment()[_0xa3c0('0xde')](_0x1e99e9['voiceQueues'][_0x273261[_0xa3c0('0xc3')]][_0xa3c0('0xe9')],_0xa3c0('0xdf'))[_0xa3c0('0x46')](_0xa3c0('0xc9')),'ContactId':_0x2282a4[_0xa3c0('0xed')],'ListId':_0x2282a4[_0xa3c0('0xee')],'VoiceQueueId':_0x2282a4[_0xa3c0('0xe0')]||undefined,'CampaignId':_0x2282a4[_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0xf0')));var _0x24ad64=new History(_0xb6d760);_0x24ad64['state']=0xb;_0x24ad64[_0xa3c0('0x72')]=_0xa3c0('0xe6');_0x24ad64[_0xa3c0('0x73')]=moment()[_0xa3c0('0x46')](_0xa3c0('0xc9'));_0x24ad64[_0xa3c0('0xf1')]=_0x24ad64[_0xa3c0('0x73')];_0x24ad64[_0xa3c0('0xe1')]=_0xb6d760['calleridname'];_0x24ad64['calleridnum']=_0xb6d760[_0xa3c0('0xe2')];hopperUtils['createHistory'](_0x24ad64)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0xf2')));}})[_0xa3c0('0x3e')](function(){if(_0x210692)hopperUtils['swapAdditionalPhones'](_0xb6d760,_0x3d1596,_0x2e4b7b)['then'](function(){return 0x1;});});}}}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x39')]=function(_0x105d78){if(this[_0xa3c0('0x27')][_0x105d78[_0xa3c0('0xc5')]]){this['actions'][_0x105d78[_0xa3c0('0xc5')]][_0xa3c0('0xf3')]=_0x105d78[_0xa3c0('0xf3')];}if(this[_0xa3c0('0xc4')][_0x105d78[_0xa3c0('0xc5')]]){this['uniqueId'][_0x105d78['uniqueid']][_0xa3c0('0xf3')]=_0x105d78[_0xa3c0('0xf3')];}};Dialer[_0xa3c0('0x1c')]['syncQueueMember']=function(_0x198efa){if(!this['actions'][_0x198efa['actionid']]){return;}var _0x5ab409=this[_0xa3c0('0x22')][this[_0xa3c0('0x27')][_0x198efa['actionid']][_0xa3c0('0xc3')]][_0xa3c0('0xf4')]||'rrmemory';if(_0x5ab409==='roundrobin'){if(this[_0xa3c0('0x27')][_0x198efa[_0xa3c0('0xf5')]]&&_[_0xa3c0('0xf6')](this[_0xa3c0('0x27')][_0x198efa[_0xa3c0('0xf5')]]['locked'])&&_0x198efa['status']==='1'&&_0x198efa['paused']==='0'){if(this[_0xa3c0('0x24')][_0x198efa[_0xa3c0('0xf7')]]){if(!this['agents'][_0x198efa['stateinterface']][_0xa3c0('0xf8')]){this['agents'][_0x198efa[_0xa3c0('0xf7')]][_0xa3c0('0xf8')]=!![];this[_0xa3c0('0x27')][_0x198efa['actionid']][_0xa3c0('0xf8')]=!![];this[_0xa3c0('0x27')][_0x198efa[_0xa3c0('0xf5')]][_0xa3c0('0xf7')]=_0x198efa['stateinterface'];}}}}else if(_0x5ab409===_0xa3c0('0xf9')){if(this[_0xa3c0('0x27')][_0x198efa[_0xa3c0('0xf5')]]){if(this[_0xa3c0('0x24')][_0x198efa[_0xa3c0('0xf7')]]){this[_0xa3c0('0x27')][_0x198efa['actionid']][_0xa3c0('0xf7')]=_0x198efa[_0xa3c0('0xf7')];if(_[_0xa3c0('0xf6')](this[_0xa3c0('0x2a')][this['actions'][_0x198efa['actionid']][_0xa3c0('0xc3')]])){this[_0xa3c0('0x2a')][this[_0xa3c0('0x27')][_0x198efa[_0xa3c0('0xf5')]]['queue']]=[];}this['queueBooked'][this['actions'][_0x198efa[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]][_0xa3c0('0x9f')](_[_0xa3c0('0x62')](_[_0xa3c0('0x78')](this[_0xa3c0('0x27')][_0x198efa[_0xa3c0('0xf5')]],[_0xa3c0('0xfa'),'stateinterface']),{'status':_0x198efa[_0xa3c0('0x8d')],'paused':_0x198efa[_0xa3c0('0xfb')]}));}}}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0xfc')]=function(_0x3ee725){if(!this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]]){return;}var _0x3048df=this;var _0x9a628d=this[_0xa3c0('0x22')][this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]];var _0x5761aa=_0x9a628d[_0xa3c0('0xf4')]||'rrmemory';if(_0x5761aa===_0xa3c0('0xfd')){if(this['actions'][_0x3ee725[_0xa3c0('0xf5')]]&&this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xf7')]){this[_0xa3c0('0x21')]['run'](this[_0xa3c0('0x27')][_0x3ee725['actionid']][_0xa3c0('0xfa')],this['actions'][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xf7')])[_0xa3c0('0xa7')](function(_0x2b472b){logger['error'](_0xa3c0('0xfe'),util[_0xa3c0('0x45')](_0x2b472b,{'showHidden':![],'depth':null}));})[_0xa3c0('0x1f')](function(){_0x3048df[_0xa3c0('0xc8')](_0x3048df[_0xa3c0('0x22')][_0x3048df[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]]);_0x3048df[_0xa3c0('0x24')][_0x3048df['actions'][_0x3ee725[_0xa3c0('0xf5')]]['stateinterface']][_0xa3c0('0xf8')]=![];delete _0x3048df[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]];unlockQueueStatus(_0x9a628d);});}else{this[_0xa3c0('0xc8')](this[_0xa3c0('0x22')][this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]]);hopperUtils[_0xa3c0('0xdd')]({'active':![],'ContactId':this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xed')],'ListId':this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xee')],'VoiceQueueId':this[_0xa3c0('0x27')][_0x3ee725['actionid']][_0xa3c0('0xe0')]||undefined,'CampaignId':this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]]['CampaignId']||undefined})['catch'](loggerCatch(_0xa3c0('0xff')));delete this['actions'][_0x3ee725[_0xa3c0('0xf5')]];unlockQueueStatus(_0x9a628d);}}else if(_0x5761aa===_0xa3c0('0xf9')){var _0x4b0efd;if(this[_0xa3c0('0x27')][_0x3ee725['actionid']]&&!_[_0xa3c0('0x49')](this[_0xa3c0('0x2a')][this[_0xa3c0('0x27')][_0x3ee725['actionid']][_0xa3c0('0xc3')]])){if(this[_0xa3c0('0x2b')][_0x3048df['actions'][_0x3ee725['actionid']]['queue']]){this[_0xa3c0('0x2b')][_0x3048df['actions'][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]]=this['queueBookedRR'][this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]]['queue']]?this['queueBookedRR'][this['actions'][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]]:this[_0xa3c0('0x2a')][this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]]?this['queueBooked'][this['actions'][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]]['_rr']||0x0:0x0;}this['queueBooked'][this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]][_0xa3c0('0x100')]=this['queueBookedRR'][this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]];for(var _0x5186ff=0x0;_0x5186ff<this['queueBooked'][this[_0xa3c0('0x27')][_0x3ee725['actionid']][_0xa3c0('0xc3')]][_0xa3c0('0x9e')];_0x5186ff+=0x1){_0x4b0efd=rr(this[_0xa3c0('0x2a')][this['actions'][_0x3ee725['actionid']][_0xa3c0('0xc3')]]);this[_0xa3c0('0x2b')][_0x3048df[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]]=this['queueBooked'][this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]][_0xa3c0('0x100')];if(_0x4b0efd[_0xa3c0('0x8d')]==='1'&&_0x4b0efd['paused']==='0'){break;}}if(!_[_0xa3c0('0xf6')](_0x4b0efd)){this[_0xa3c0('0x24')][_0x4b0efd[_0xa3c0('0xf7')]][_0xa3c0('0x101')]=_['isUndefined'](this[_0xa3c0('0x24')][_0x4b0efd[_0xa3c0('0xf7')]][_0xa3c0('0x101')])?!![]:this[_0xa3c0('0x24')][_0x4b0efd[_0xa3c0('0xf7')]][_0xa3c0('0x101')];}loggerBooked[_0xa3c0('0x4a')]('[booked][RR]',_0x3ee725[_0xa3c0('0xf5')],_0xa3c0('0x102'),JSON[_0xa3c0('0x77')](_['pick'](this[_0xa3c0('0x24')][_0x4b0efd[_0xa3c0('0xf7')]],['name',_0xa3c0('0x101')])),_0xa3c0('0x103'),JSON[_0xa3c0('0x77')](_0x4b0efd[_0xa3c0('0xfa')]));if(!_[_0xa3c0('0xf6')](_0x4b0efd)&&_0x4b0efd[_0xa3c0('0x8d')]==='1'&&_0x4b0efd['paused']==='0'&&this[_0xa3c0('0x24')][_0x4b0efd[_0xa3c0('0xf7')]][_0xa3c0('0x101')]){this['agents'][_0x4b0efd['stateinterface']][_0xa3c0('0x101')]=![];this[_0xa3c0('0x2a')][_0x3048df['actions'][_0x3ee725['actionid']][_0xa3c0('0xc3')]]=[];this['preview'][_0xa3c0('0x104')](_0x4b0efd[_0xa3c0('0xfa')],_0x4b0efd[_0xa3c0('0xf7')])[_0xa3c0('0xa7')](function(_0x2de0e7){logger[_0xa3c0('0x68')](_0xa3c0('0xfe'),util[_0xa3c0('0x45')](_0x2de0e7,{'showHidden':![],'depth':null}));})['finally'](function(){_0x3048df[_0xa3c0('0xc8')](_0x3048df[_0xa3c0('0x22')][_0x3048df[_0xa3c0('0x27')][_0x3ee725['actionid']]['queue']]);setTimeout(function(){_0x3048df[_0xa3c0('0x24')][_0x4b0efd[_0xa3c0('0xf7')]][_0xa3c0('0x101')]=!![];loggerBooked[_0xa3c0('0x4a')](_0xa3c0('0x105'),_0x3ee725[_0xa3c0('0xf5')],_0xa3c0('0x102'),JSON[_0xa3c0('0x77')](_['pick'](_0x3048df[_0xa3c0('0x24')][_0x4b0efd[_0xa3c0('0xf7')]],[_0xa3c0('0x48'),_0xa3c0('0x101')])),_0xa3c0('0x103'),JSON['stringify'](_0x4b0efd['idHopper']));},0xc7);delete _0x3048df[_0xa3c0('0x27')][_0x3ee725['actionid']];unlockQueueStatus(_0x9a628d,_0x3ee725[_0xa3c0('0xf5')]);});}else{loggerBooked[_0xa3c0('0x4a')](_0xa3c0('0x106'));this[_0xa3c0('0xc8')](this[_0xa3c0('0x22')][this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]]);hopperUtils[_0xa3c0('0xdd')]({'active':![],'ContactId':this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]]['ContactId'],'ListId':this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]]['ListId'],'VoiceQueueId':this[_0xa3c0('0x27')][_0x3ee725['actionid']][_0xa3c0('0xe0')]||undefined,'CampaignId':this[_0xa3c0('0x27')][_0x3ee725['actionid']][_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0xff')));delete this['actions'][_0x3ee725[_0xa3c0('0xf5')]];unlockQueueStatus(_0x9a628d);}}else{loggerBooked[_0xa3c0('0x4a')]('[booked][unlock2]');this[_0xa3c0('0xc8')](this[_0xa3c0('0x22')][this[_0xa3c0('0x27')][_0x3ee725['actionid']][_0xa3c0('0xc3')]]);hopperUtils['rescheduleContact']({'active':![],'ContactId':this['actions'][_0x3ee725['actionid']][_0xa3c0('0xed')],'ListId':this['actions'][_0x3ee725['actionid']]['ListId'],'VoiceQueueId':this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]]['VoiceQueueId']||undefined,'CampaignId':this[_0xa3c0('0x27')][_0x3ee725['actionid']][_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x107')));delete this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]];unlockQueueStatus(_0x9a628d);}}else{loggerBooked['info'](_0xa3c0('0x108'));this['updateOriginated'](this[_0xa3c0('0x22')][this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xc3')]]);hopperUtils[_0xa3c0('0xdd')]({'active':![],'ContactId':this['actions'][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xed')],'ListId':this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xee')],'VoiceQueueId':this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xe0')]||undefined,'CampaignId':this[_0xa3c0('0x27')][_0x3ee725[_0xa3c0('0xf5')]][_0xa3c0('0xef')]||undefined})['catch'](loggerCatch(_0xa3c0('0x109')));delete this['actions'][_0x3ee725[_0xa3c0('0xf5')]];unlockQueueStatus(_0x9a628d);}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x32')]=function(_0x3a0bc4){var _0x48edd0=this[_0xa3c0('0x27')][_0x3a0bc4[_0xa3c0('0xf5')]];if(_0x48edd0){delete this[_0xa3c0('0x27')][_0x3a0bc4[_0xa3c0('0xf5')]];_0x48edd0[_0xa3c0('0x10a')]=moment()['format'](_0xa3c0('0xc9'));var _0x5edab5=_0x48edd0[_0xa3c0('0xc6')]==='ivr'?this[_0xa3c0('0x23')][_0x48edd0[_0xa3c0('0xc3')]]:this[_0xa3c0('0x22')][_0x48edd0[_0xa3c0('0x10b')]()];if(_0x3a0bc4[_0xa3c0('0x10c')]!==_0xa3c0('0x10d')){this[_0xa3c0('0xc8')](_0x5edab5);return this[_0xa3c0('0x10e')](_0x48edd0,_0x5edab5,_0x3a0bc4)['catch'](loggerCatch('[callProgressDetecting]\x20'));}this[_0xa3c0('0xc4')][_0x3a0bc4['uniqueid']]=_0x48edd0;}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x3a')]=function(_0x1b721e){var _0x146fb9=this;var _0x51a8c8=this[_0xa3c0('0xc4')][_0x1b721e[_0xa3c0('0xc5')]];var _0x4414d3;if(!_[_0xa3c0('0xf6')](_0x1b721e)&&!_[_0xa3c0('0xf6')](_0x1b721e[_0xa3c0('0x10f')])&&!_[_0xa3c0('0xf6')](_0x1b721e['variable'][_0xa3c0('0x110')])&&_0x1b721e[_0xa3c0('0x111')]==='xcally-motion-dialer'&&_0x51a8c8){if(_0x51a8c8[_0xa3c0('0xc6')]!==_0xa3c0('0xc7')&&this[_0xa3c0('0x22')][_0x51a8c8[_0xa3c0('0xc3')]][_0xa3c0('0x112')]&&_0x1b721e['value']==='HANGUP'){delete this[_0xa3c0('0xc4')][_0x1b721e[_0xa3c0('0xc5')]];this[_0xa3c0('0xc8')](this[_0xa3c0('0x22')][_0x51a8c8[_0xa3c0('0xc3')]]);this[_0xa3c0('0x22')][_0x51a8c8[_0xa3c0('0xc3')]]['outboundAnswerCallsDay']+=0x1;this[_0xa3c0('0x22')][_0x51a8c8[_0xa3c0('0xc3')]][_0xa3c0('0x113')]+=0x1;_0x4414d3=new Hangup(_0x51a8c8,_0x1b721e);_0x4414d3['state']=0x12;_0x4414d3[_0xa3c0('0x72')]=_0xa3c0('0x114');_0x4414d3[_0xa3c0('0x115')]=_0xa3c0('0x116');ami[_0xa3c0('0x41')](_0xa3c0('0x117'),ut['buildObj'](_0x4414d3,_0xa3c0('0x118')));this['saveInDb'](_0x4414d3,'[syncHangupInAMD][createHistory]','[syncHangupInAMD]');}if(_0x51a8c8[_0xa3c0('0xc6')]!==_0xa3c0('0xc7')&&this['voiceQueues'][_0x51a8c8[_0xa3c0('0xc3')]][_0xa3c0('0x112')]&&_0x1b721e['value']===_0xa3c0('0x119')){return new Promise(function(_0x28614b,_0x4709a8){delete _0x146fb9['uniqueId'][_0x1b721e['uniqueid']];_0x146fb9[_0xa3c0('0xc8')](_0x146fb9[_0xa3c0('0x22')][_0x51a8c8[_0xa3c0('0xc3')]]);_0x146fb9['voiceQueues'][_0x51a8c8['queue']]['outboundAnswerCallsDay']+=0x1;_0x146fb9['voiceQueues'][_0x51a8c8[_0xa3c0('0xc3')]][_0xa3c0('0x113')]+=0x1;var _0x375d65=_0x146fb9[_0xa3c0('0x22')][_0x51a8c8['queue']];var _0x59e574=new Hangup(_0x51a8c8,_0x1b721e);_0x59e574['state']=0x13;_0x59e574[_0xa3c0('0x72')]=_0xa3c0('0x11a');_0x59e574[_0xa3c0('0x115')]='AMD';_0x59e574[_0xa3c0('0x11b')]+=0x1;_0x59e574[_0xa3c0('0xe8')]+=0x1;_0x59e574[_0xa3c0('0x118')]=!![];ami[_0xa3c0('0x41')]('custom:amd',ut[_0xa3c0('0x11c')](_0x59e574,_0xa3c0('0x118')));hopperUtils[_0xa3c0('0xd0')](_0x59e574)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x11d')));if(_0x59e574[_0xa3c0('0x11e')]+_0x59e574['countcongestionretry']+_0x59e574[_0xa3c0('0x11f')]+_0x59e574[_0xa3c0('0x120')]+_0x59e574['countdropretry']+_0x59e574['countabandonedretry']+_0x59e574['countmachineretry']+_0x59e574[_0xa3c0('0x121')]>=_0x375d65[_0xa3c0('0x122')]){_0x146fb9['stateGlobal'](_0x59e574,_0x28614b,_0x4709a8,_0xa3c0('0x123'));}else{if(_0x59e574[_0xa3c0('0x11b')]>=_0x375d65[_0xa3c0('0x124')]){_0x146fb9[_0xa3c0('0x125')](_0x59e574,_0x28614b,_0x4709a8,_0xa3c0('0x126'));}else{hopperUtils[_0xa3c0('0xdd')]({'active':![],'countmachineretry':_0x59e574[_0xa3c0('0x11b')],'scheduledat':moment()[_0xa3c0('0xde')](_0x375d65[_0xa3c0('0x127')],'minutes')[_0xa3c0('0x46')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x59e574[_0xa3c0('0xed')],'ListId':_0x59e574[_0xa3c0('0xee')],'VoiceQueueId':_0x59e574[_0xa3c0('0xe0')]||undefined,'CampaignId':_0x59e574[_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x128')));_0x28614b({'reschedule':0x1});}}});}if(_0x51a8c8[_0xa3c0('0xc6')]==='ivr'&&this['campaigns'][_0x51a8c8[_0xa3c0('0xc3')]][_0xa3c0('0x112')]&&_0x1b721e[_0xa3c0('0x129')]===_0xa3c0('0x12a')){delete this['uniqueId'][_0x1b721e[_0xa3c0('0xc5')]];this[_0xa3c0('0xc8')](this[_0xa3c0('0x23')][_0x51a8c8[_0xa3c0('0xc3')]]);_0x4414d3=new Hangup(_0x51a8c8,_0x1b721e);_0x4414d3[_0xa3c0('0x71')]=0x12;_0x4414d3[_0xa3c0('0x72')]=_0xa3c0('0x114');_0x4414d3[_0xa3c0('0x115')]='AMD';ami[_0xa3c0('0x41')](_0xa3c0('0x117'),ut[_0xa3c0('0x11c')](_0x4414d3,_0xa3c0('0x118')));this[_0xa3c0('0x12b')](_0x4414d3,_0xa3c0('0x12c'),'[syncHangupInAMDIvr]');}if(_0x51a8c8['type']===_0xa3c0('0xc7')&&this[_0xa3c0('0x23')][_0x51a8c8[_0xa3c0('0xc3')]][_0xa3c0('0x112')]&&_0x1b721e['value']===_0xa3c0('0x119')){return new Promise(function(_0x3d1b29,_0x5b7874){delete _0x146fb9['uniqueId'][_0x1b721e[_0xa3c0('0xc5')]];_0x146fb9['updateOriginated'](_0x146fb9[_0xa3c0('0x23')][_0x51a8c8[_0xa3c0('0xc3')]]);_0x146fb9[_0xa3c0('0x23')][_0x51a8c8['queue']][_0xa3c0('0xca')]+=0x1;_0x146fb9[_0xa3c0('0x23')][_0x51a8c8[_0xa3c0('0xc3')]]['outboundAnswerAgiCallsDay']+=0x1;var _0x5e95f4=_0x146fb9['campaigns'][_0x51a8c8['queue']];var _0xb566e2=new Hangup(_0x51a8c8,_0x1b721e);_0xb566e2[_0xa3c0('0x71')]=0x13;_0xb566e2[_0xa3c0('0x72')]='Machine';_0xb566e2[_0xa3c0('0x115')]=_0xa3c0('0x116');_0xb566e2[_0xa3c0('0x11b')]+=0x1;_0xb566e2[_0xa3c0('0xe8')]+=0x1;_0xb566e2[_0xa3c0('0x118')]=!![];ami['emit'](_0xa3c0('0x117'),ut[_0xa3c0('0x11c')](_0xb566e2,_0xa3c0('0x118')));hopperUtils['createHistory'](_0xb566e2)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x11d')));if(_0xb566e2[_0xa3c0('0x11e')]+_0xb566e2[_0xa3c0('0x12d')]+_0xb566e2['countnoanswerretry']+_0xb566e2['countnosuchnumberretry']+_0xb566e2[_0xa3c0('0xd8')]+_0xb566e2[_0xa3c0('0xec')]+_0xb566e2[_0xa3c0('0x11b')]+_0xb566e2[_0xa3c0('0x121')]>=_0x5e95f4[_0xa3c0('0x122')]){_0x146fb9['stateGlobal'](_0xb566e2,_0x3d1b29,_0x5b7874,_0xa3c0('0x123'));}else{if(_0xb566e2['countmachineretry']>=_0x5e95f4[_0xa3c0('0x124')]){_0x146fb9[_0xa3c0('0x125')](_0xb566e2,_0x3d1b29,_0x5b7874,'reason\x2019\x20machine....');}else{hopperUtils[_0xa3c0('0xdd')]({'active':![],'countmachineretry':_0xb566e2[_0xa3c0('0x11b')],'scheduledat':moment()[_0xa3c0('0xde')](_0x5e95f4[_0xa3c0('0x127')],_0xa3c0('0xdf'))[_0xa3c0('0x46')](_0xa3c0('0xc9')),'ContactId':_0xb566e2[_0xa3c0('0xed')],'ListId':_0xb566e2[_0xa3c0('0xee')],'VoiceQueueId':_0xb566e2[_0xa3c0('0xe0')]||undefined,'CampaignId':_0xb566e2['CampaignId']||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x128')));_0x3d1b29({'reschedule':0x1});}}});}}};Dialer[_0xa3c0('0x1c')]['syncHangup']=function(_0x115ed2){var _0x2810ab=this[_0xa3c0('0xc4')][_0x115ed2[_0xa3c0('0xc5')]];var _0x35e23a;if(_0x2810ab&&_0x2810ab[_0xa3c0('0xc6')]===_0xa3c0('0xc7')){delete this[_0xa3c0('0xc4')][_0x115ed2[_0xa3c0('0xc5')]];this[_0xa3c0('0xc8')](this[_0xa3c0('0x23')][_0x2810ab['queue']]);this[_0xa3c0('0x23')][_0x2810ab[_0xa3c0('0xc3')]][_0xa3c0('0x12e')]+=0x1;_0x35e23a=new Hangup(_0x2810ab,_0x115ed2);hopperUtils['createHistory'](_0x35e23a)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x12f')));hopperUtils['moveContactManagedDialer'](_0x35e23a)[_0xa3c0('0xa7')](loggerCatch('[syncHangupIvr]'));}if(_0x2810ab&&_0x2810ab[_0xa3c0('0xc6')]!==_0xa3c0('0xc7')&&isNotNull(this['voiceQueues'][_0x2810ab[_0xa3c0('0xc3')]][_0xa3c0('0x130')])){delete this[_0xa3c0('0xc4')][_0x115ed2[_0xa3c0('0xc5')]];this[_0xa3c0('0xc8')](this['voiceQueues'][_0x2810ab[_0xa3c0('0xc3')]]);this[_0xa3c0('0x22')][_0x2810ab[_0xa3c0('0xc3')]][_0xa3c0('0xca')]+=0x1;this['voiceQueues'][_0x2810ab[_0xa3c0('0xc3')]]['outboundAnswerAgiCallsDay']+=0x1;_0x35e23a=new Hangup(_0x2810ab,_0x115ed2);_0x35e23a[_0xa3c0('0x71')]=0x10;_0x35e23a['statedesc']=_0xa3c0('0x131');_0x35e23a[_0xa3c0('0x115')]=_0xa3c0('0x132');hopperUtils['createHistory'](_0x35e23a)['catch'](loggerCatch('[syncHangupIvr][createHistory]'));hopperUtils[_0xa3c0('0x133')](_0x35e23a)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x134')));}if(_0x2810ab&&_0x2810ab[_0xa3c0('0xc6')]!==_0xa3c0('0xc7')&&!isNotNull(this[_0xa3c0('0x22')][_0x2810ab[_0xa3c0('0xc3')]]['dialQueueProject'])){if(_0x115ed2['cause-txt']===_0xa3c0('0x135')){delete this[_0xa3c0('0xc4')][_0x115ed2[_0xa3c0('0xc5')]];this[_0xa3c0('0x22')][_0x2810ab[_0xa3c0('0xc3')]][_0xa3c0('0xca')]+=0x1;const _0x51e9af=new AgentComplete(_0x2810ab,_0x115ed2);_0x51e9af[_0xa3c0('0xef')]=this['voiceQueues'][_0x2810ab[_0xa3c0('0xc3')]]['id'];hopperUtils[_0xa3c0('0xd0')](_0x51e9af)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x136')));hopperUtils[_0xa3c0('0x133')](_0x51e9af)['catch'](loggerCatch(_0xa3c0('0x137')));}else{delete this[_0xa3c0('0xc4')][_0x115ed2[_0xa3c0('0xc5')]];this[_0xa3c0('0xc8')](this[_0xa3c0('0x22')][_0x2810ab[_0xa3c0('0xc3')]]);this['voiceQueues'][_0x2810ab['queue']][_0xa3c0('0x138')]+=0x1;_0x35e23a=new Hangup(_0x2810ab,_0x115ed2);_0x35e23a[_0xa3c0('0x71')]=0xc;_0x35e23a[_0xa3c0('0x72')]=_0x115ed2['cause-txt'];_0x35e23a[_0xa3c0('0x115')]='Unknow';hopperUtils[_0xa3c0('0xd0')](_0x35e23a)[_0xa3c0('0xa7')](loggerCatch('[syncHangupIvr][createHistory]'));hopperUtils[_0xa3c0('0x133')](_0x35e23a)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x134')));}}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0xc')]=function(_0x32dac9){var _0x960323=this;if(!_0x960323[_0xa3c0('0x2c')][_0x32dac9['name']]){_0x960323[_0xa3c0('0x2c')][_0x32dac9[_0xa3c0('0x48')]]={'running':![]};}else if(_0x960323[_0xa3c0('0x2c')][_0x32dac9[_0xa3c0('0x48')]][_0xa3c0('0x139')]===!![]){return;}else if(_0x960323[_0xa3c0('0x2c')][_0x32dac9['name']][_0xa3c0('0x139')]===![]){_0x960323[_0xa3c0('0x2c')][_0x32dac9['name']][_0xa3c0('0x139')]=!![];}var _0xcdd372=_0x960323[_0xa3c0('0x22')][_0x32dac9[_0xa3c0('0x48')]];var _0x323c8c=_0xcdd372[_0xa3c0('0x6e')]!==utils[_0xa3c0('0x6b')]['INACTIVE'];var _0x22b239=utils[_0xa3c0('0x13a')](_0xcdd372);_0xcdd372[_0xa3c0('0x13b')]=utils[_0xa3c0('0x13c')](_0xcdd372,_0x960323[_0xa3c0('0x25')]);Promise[_0xa3c0('0xb4')]()[_0xa3c0('0x3e')](function(){if(_0xcdd372[_0xa3c0('0x13b')]===utils[_0xa3c0('0x6b')]['INACTIVE']){if(_0x323c8c){clearPredictiveAttributes(_0xcdd372);_0x32dac9[_0xa3c0('0x65')]=undefined;_0x32dac9['startProgressive']=undefined;}if(_0xcdd372[_0xa3c0('0x13b')]===utils[_0xa3c0('0x6b')][_0xa3c0('0x7e')]){_0x32dac9[_0xa3c0('0x13d')]=0x0;_0x32dac9[_0xa3c0('0xfb')]=0x0;_0x32dac9[_0xa3c0('0x13e')]=0x0;_0x32dac9['talking']=0x0;_0x32dac9[_0xa3c0('0x13f')]=0x0;}}else if(_0xcdd372[_0xa3c0('0x13b')]===utils[_0xa3c0('0x6b')][_0xa3c0('0x140')]&&!_0x22b239){return _0x960323[_0xa3c0('0x97')](_0xcdd372,!![])[_0xa3c0('0x3e')](function(){return _0x960323[_0xa3c0('0x97')](_0xcdd372,![]);})[_0xa3c0('0x3e')](function(){return _0x960323[_0xa3c0('0xb7')](_0xcdd372);})[_0xa3c0('0xa7')](function(_0x4b9765){loggerSyncQueueSummary[_0xa3c0('0x43')](_0xa3c0('0x141'),util[_0xa3c0('0x45')](_0x4b9765,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0xcdd372);});}else{clearPredictiveAttributes(_0xcdd372);}})['then'](function(){var _0x4cb294=_0x32dac9[_0xa3c0('0x142')](_0xcdd372);if(_0x4cb294||_0xcdd372[_0xa3c0('0x143')]){_0xcdd372[_0xa3c0('0x143')]=![];_0x32dac9[_0xa3c0('0x144')](_0xcdd372);Object[_0xa3c0('0x145')](_0xcdd372,_0x32dac9);emitOutboundVoiceQueueSummary(_0x32dac9);}_0x960323['queuesSummary'][_0xcdd372[_0xa3c0('0x48')]][_0xa3c0('0x139')]=![];})[_0xa3c0('0xa7')](function(_0x3c4efc){logger['error'](_0xa3c0('0x141'),util[_0xa3c0('0x45')](_0x3c4efc,{'showHidden':![],'depth':null}));_0x960323['queuesSummary'][_0xcdd372[_0xa3c0('0x48')]][_0xa3c0('0x139')]=![];});};Dialer['prototype'][_0xa3c0('0x146')]=_[_0xa3c0('0x147')](function(){var _0x1330eb=_[_0xa3c0('0x148')](this[_0xa3c0('0x22')],function(_0x5835b3){return _0x5835b3[_0xa3c0('0x149')];});var _0x41d9da=_['filter'](this['agents'],function(_0x385d66){return _0x385d66['online']&&_0x385d66[_0xa3c0('0x8d')]===_0xa3c0('0x8e');});if(_0x1330eb['length']>0x0&&_0x41d9da['length']>0x0){return Promise['resolve']()[_0xa3c0('0x3e')](cmHopper[_0xa3c0('0x14a')](_[_0xa3c0('0x14b')](_0x1330eb,'id'),previewRecallmeReminderInterval,_['map'](_0x41d9da,'id')))[_0xa3c0('0x3e')](function(_0x550a0a){for(var _0x18f3f1=0x0;_0x18f3f1<_0x550a0a[_0xa3c0('0x9e')];_0x18f3f1++){var _0x321fbb=_0x550a0a[_0x18f3f1][_0xa3c0('0x14c')][_0xa3c0('0x48')];if(_0x321fbb)io['to'](util[_0xa3c0('0x46')]('user:%s',_0x321fbb))['emit'](_0xa3c0('0x14d'),{'hopper':_0x550a0a[_0x18f3f1]});}})[_0xa3c0('0xa7')](function(_0x20bbdc){logger['error'](_0xa3c0('0x14e'),_0x20bbdc);});}},0x3c*0x3e8,{'leading':!![]});Dialer[_0xa3c0('0x1c')][_0xa3c0('0x3d')]=function(){var _0x2229ac=this;setInterval(function(){_0x2229ac[_0xa3c0('0x14f')](_0x2229ac[_0xa3c0('0xc4')],'[uniqueid]');_0x2229ac[_0xa3c0('0x14f')](_0x2229ac[_0xa3c0('0x27')],_0xa3c0('0x150'));},0x32c8);};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x14f')]=function(_0x5da9fd,_0x515084){var _0x1f8884=this;for(var _0x56afa7 in _0x5da9fd){if(typeof _0x5da9fd[_0x56afa7]!==_0xa3c0('0xb3')){this[_0xa3c0('0x20')][_0xa3c0('0x1d')](function(){if(!_['isNil'](_0x5da9fd[_0x56afa7])){return ami[_0xa3c0('0xa0')]({'action':'status','channel':_0x5da9fd[_0x56afa7][_0xa3c0('0xf3')]})[_0xa3c0('0xa7')](function(_0x4b6de4){if(_0x4b6de4[_0xa3c0('0x6e')]===_0xa3c0('0x151')){setTimeout(function(){if(_0x5da9fd[_0x56afa7]&&_0x5da9fd[_0x56afa7][_0xa3c0('0xc6')]!==_0xa3c0('0xc7')){_0x1f8884[_0xa3c0('0xc8')](_0x1f8884['voiceQueues'][_0x5da9fd[_0x56afa7][_0xa3c0('0xc3')]]);logger[_0xa3c0('0x68')](_0xa3c0('0x152'),_0x515084,_0x56afa7,_0x5da9fd[_0x56afa7][_0xa3c0('0xc3')]);delete _0x5da9fd[_0x56afa7];}if(_0x5da9fd[_0x56afa7]&&_0x5da9fd[_0x56afa7]['type']===_0xa3c0('0xc7')){_0x1f8884[_0xa3c0('0xc8')](_0x1f8884['campaigns'][_0x5da9fd[_0x56afa7][_0xa3c0('0xc3')]]);logger[_0xa3c0('0x68')](_0xa3c0('0x153'),_0x515084,_0x56afa7,_0x5da9fd[_0x56afa7][_0xa3c0('0xc3')]);delete _0x5da9fd[_0x56afa7];}},0x2328);}});}});}}};Dialer[_0xa3c0('0x1c')]['getVoiceQueueRtPauses']=function(_0xa2f4d6){return Promise['resolve']()[_0xa3c0('0x3e')](voiceQueueRt['getVoiceQueueRtPauses'](_0xa2f4d6))['catch'](loggerCatch('[getVoiceQueueRtPauses]\x20'));};Dialer[_0xa3c0('0x1c')]['updateOriginated']=function(_0xed797b){if(!_[_0xa3c0('0x40')](_0xed797b)&&_0xed797b!==null){if(typeof _0xed797b[_0xa3c0('0x84')]!=='undefined'){if(_0xed797b[_0xa3c0('0x84')]>0x0){_0xed797b[_0xa3c0('0x84')]-=0x1;}else{logger[_0xa3c0('0x68')](_0xa3c0('0x154'));}}}else{logger['error'](_0xa3c0('0x155'));}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x156')]=function(_0x90d917,_0x211033){var _0x22088c=this;return function(_0xd689dd){_0x22088c['updateOriginated'](_0x211033);logger[_0xa3c0('0x68')](_0x90d917,util[_0xa3c0('0x45')](_0xd689dd,{'showHidden':![],'depth':null}));};};Dialer['prototype'][_0xa3c0('0x157')]=function(_0x73a8c1,_0xf44b96,_0xf3e8c1){var _0x2c8c35={'state':0x19,'statedesc':_0xa3c0('0x158')};this['updateOriginated'](_0xf44b96);this[_0xa3c0('0x12b')](_[_0xa3c0('0x62')](_0x2c8c35,_[_0xa3c0('0x78')](_0xf3e8c1,[_0xa3c0('0xed'),'ListId',_0xa3c0('0x159'),_0xa3c0('0xe0'),_0xa3c0('0xef')])),'[emptyContact][createHistory]',_0xa3c0('0x15a'));logger[_0xa3c0('0x68')](_0x73a8c1);};Dialer['prototype'][_0xa3c0('0x12b')]=function(_0x1f5d3a,_0xd1957e,_0x443a46){hopperUtils['createHistory'](_0x1f5d3a)[_0xa3c0('0xa7')](loggerCatch(_0xd1957e));hopperUtils['moveContactManagedDialer'](_0x1f5d3a)['catch'](loggerCatch(_0x443a46));};Dialer['prototype'][_0xa3c0('0x15b')]=function(_0x30134c,_0x483f03){hopperUtils['createHistory'](_0x30134c)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x136')));if(_0x483f03==0x0){hopperUtils[_0xa3c0('0x133')](_0x30134c)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x15c')));}};Dialer['prototype'][_0xa3c0('0x14e')]=function(_0x503f0f){return Promise[_0xa3c0('0xb4')]()[_0xa3c0('0x3e')](cmHopper[_0xa3c0('0x14a')](_0x503f0f['id'],previewRecallmeReminderInterval))[_0xa3c0('0x3e')](function(_0x497165){for(var _0x5f62c7=0x0;_0x5f62c7<_0x497165[_0xa3c0('0x9e')];_0x5f62c7++){var _0x4d6e3b=_0x497165[_0x5f62c7]['Agent'][_0xa3c0('0x48')];if(_0x4d6e3b)io['to'](util[_0xa3c0('0x46')](_0xa3c0('0x15d'),_0x4d6e3b))[_0xa3c0('0x41')](_0xa3c0('0x14d'),{'hopper':_0x497165[_0x5f62c7]});}})['catch'](function(){});};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x15e')]=function(_0xbe0cf6){var _0x34109a=this;return function(){_0x34109a[_0xa3c0('0x15f')](_0xbe0cf6);};};Dialer['prototype'][_0xa3c0('0x160')]=function(_0x396b06,_0x38dce9){var _0x572105=this;var _0x296a6f=uuid['v4']();this[_0xa3c0('0x27')][_0x296a6f]=new Action(_0x396b06,_0x38dce9,_0x296a6f);return new Promise(function(_0x4b6318,_0x1e2eeb){if(_[_0xa3c0('0x40')](_0x396b06)&&typeof _0x396b06!==_0xa3c0('0x161')){return _0x1e2eeb(msgResponse('originate',_0xa3c0('0x98'),_0xa3c0('0x162')));}if(_[_0xa3c0('0x40')](_0x38dce9[_0xa3c0('0x163')])||_0x38dce9[_0xa3c0('0x163')]===null){return _0x1e2eeb(msgResponse(_0xa3c0('0x164'),_0xa3c0('0x98'),_0xa3c0('0x165')));}var _0x515870={'XMD-CALLERID':_0x572105[_0xa3c0('0x27')][_0x296a6f][_0xa3c0('0x166')](),'XMD-AGI':_0x396b06[_0xa3c0('0x130')]?util[_0xa3c0('0x46')](_0xa3c0('0x167'),ipAgi,_0x396b06[_0xa3c0('0x130')]):_0xa3c0('0x168'),'XMD-AGIAFTER':_0x396b06[_0xa3c0('0xce')]?util[_0xa3c0('0x46')](_0xa3c0('0x167'),ipAgi,_0x396b06[_0xa3c0('0xce')]):_0xa3c0('0x168'),'XMD-QUEUE':utils[_0xa3c0('0x169')](_0x396b06)?util['format']('\x22%s,%s%s,,,%s\x22',_0x396b06[_0xa3c0('0x48')],_0x396b06['dialQueueOptions']||'',_0x396b06[_0xa3c0('0xcf')]?'c':'',_0x396b06[_0xa3c0('0xd2')]||0x3):_0xa3c0('0x168'),'XMD-CONTACTID':_0x38dce9[_0xa3c0('0xed')],'XMD-CDRTYPE':_0xa3c0('0x16a'),'CALLERID(all)':_0x572105[_0xa3c0('0x27')][_0x296a6f][_0xa3c0('0x166')](),'XMD-AMD':_0x396b06[_0xa3c0('0x112')]?_0xa3c0('0x140'):_0xa3c0('0x168'),'XMD-DESTINATION':_0xa3c0('0x16b')};if(_0x396b06[_0xa3c0('0x112')]){_0x515870[_0xa3c0('0x16c')]=_0x396b06[_0xa3c0('0x16d')]||0x9c4;_0x515870['XMD-AMDGREETING']=_0x396b06['dialAMDGreeting']||0x5dc;_0x515870[_0xa3c0('0x16e')]=_0x396b06[_0xa3c0('0x16f')]||0x320;_0x515870[_0xa3c0('0x170')]=_0x396b06['dialAMDTotalAnalysisTime']||0x1388;_0x515870[_0xa3c0('0x171')]=_0x396b06['dialAMDMinWordLength']||0x64;_0x515870[_0xa3c0('0x172')]=_0x396b06[_0xa3c0('0x173')]||0x32;_0x515870[_0xa3c0('0x174')]=_0x396b06[_0xa3c0('0x175')]||0x3;_0x515870[_0xa3c0('0x176')]=_0x396b06[_0xa3c0('0x177')]||0x100;_0x515870[_0xa3c0('0x178')]=_0x396b06[_0xa3c0('0x179')]||0x1388;}if(utils[_0xa3c0('0x169')](_0x396b06)){_0x515870[_0xa3c0('0x17a')]=_0x38dce9[_0xa3c0('0xe0')];}else{_0x515870[_0xa3c0('0x17b')]=_0x38dce9[_0xa3c0('0xef')];}var _0x2e4057=utils[_0xa3c0('0x17c')](_0x38dce9[_0xa3c0('0x17d')]);Object[_0xa3c0('0x145')](_0x515870,_0x2e4057);var _0x1a7ec5=_0x572105[_0xa3c0('0x8b')](_0x396b06[_0xa3c0('0x92')])?utils[_0xa3c0('0x17e')](_0x396b06['Trunk'][_0xa3c0('0x17f')],_0x396b06[_0xa3c0('0x180')],_0x396b06[_0xa3c0('0x181')]>0x0?utils[_0xa3c0('0x182')](_0x396b06[_0xa3c0('0x183')],_0x396b06[_0xa3c0('0x181')]):_0x396b06['dialOriginateCallerIdNumber']):utils[_0xa3c0('0x17e')](_[_0xa3c0('0xf6')](_0x396b06[_0xa3c0('0x93')])?_0x396b06[_0xa3c0('0x92')]['callerid']:_0x396b06[_0xa3c0('0x93')][_0xa3c0('0x17f')],_0x396b06[_0xa3c0('0x180')],_0x396b06['dialRandomLastDigitCallerIdNumber']>0x0?utils[_0xa3c0('0x182')](_0x396b06[_0xa3c0('0x183')],_0x396b06['dialRandomLastDigitCallerIdNumber']):_0x396b06[_0xa3c0('0x183')]);if(_0x1a7ec5){_0x515870[_0xa3c0('0x184')]=_0x572105[_0xa3c0('0x27')][_0x296a6f]['originatecalleridname']=utils['extractCalleridName'](_0x1a7ec5);_0x515870['XMD-ORIGINATECALLERIDNUM']=_0x38dce9[_0xa3c0('0x163')];}_0x396b06[_0xa3c0('0x185')]=_0x515870;return ami[_0xa3c0('0xa0')]({'actionid':_0x296a6f,'action':_0xa3c0('0x164'),'channel':_0x572105[_0xa3c0('0x8b')](_0x396b06[_0xa3c0('0x92')])?util[_0xa3c0('0x46')]('SIP/%s/%s%s',_0x396b06[_0xa3c0('0x92')]['name'],isNotNull(_0x396b06[_0xa3c0('0x186')])?_0x396b06[_0xa3c0('0x186')][_0xa3c0('0x187')]()||'':'',_0x396b06['dialCutDigit']>0x0?_0x38dce9['phone'][_0xa3c0('0x188')](_0x396b06[_0xa3c0('0x189')]):_0x38dce9[_0xa3c0('0x163')]):util['format'](_0xa3c0('0x18a'),_[_0xa3c0('0xf6')](_0x396b06[_0xa3c0('0x93')])?_0x396b06[_0xa3c0('0x92')][_0xa3c0('0x48')]:_0x396b06[_0xa3c0('0x93')][_0xa3c0('0x48')],isNotNull(_0x396b06[_0xa3c0('0x186')])?_0x396b06[_0xa3c0('0x186')][_0xa3c0('0x187')]()||'':'',_0x396b06[_0xa3c0('0x189')]>0x0?_0x38dce9[_0xa3c0('0x163')]['substring'](_0x396b06[_0xa3c0('0x189')]):_0x38dce9['phone']),'callerid':_0x1a7ec5,'Exten':_0xa3c0('0x16b'),'Context':_0xa3c0('0x18b'),'Priority':'1','variable':_0x515870,'timeout':(_0x396b06[_0xa3c0('0x18c')]||0x1e)*0x3e8,'async':!![],'channelid':_0x296a6f})[_0xa3c0('0x3e')](function(_0x30bd9e){return _0x4b6318(_0x30bd9e);})[_0xa3c0('0xa7')](function(_0x84103f){_0x396b06['outboundOriginateFailureCallsDay']+=0x1;var _0x12e315=new History(_0x572105[_0xa3c0('0x27')][_0x296a6f]);logger[_0xa3c0('0x68')](util[_0xa3c0('0x46')]('[originateError]:\x20%s',JSON[_0xa3c0('0x77')](_0x84103f)));_0x12e315[_0xa3c0('0x71')]=0xe;_0x12e315['statedesc']=_0xa3c0('0x18d');_0x12e315[_0xa3c0('0x73')]=moment()['format'](_0xa3c0('0xc9'));_0x12e315[_0xa3c0('0xf1')]=_0x12e315[_0xa3c0('0x73')];hopperUtils[_0xa3c0('0xd0')](_0x12e315)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x18e')));_0x572105[_0xa3c0('0x133')](_0x12e315)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x18e')))[_0xa3c0('0x1f')](function(){delete _0x572105[_0xa3c0('0x27')][_0x296a6f];return _0x1e2eeb(msgResponse('originate',_0xa3c0('0x8a'),_0xa3c0('0x18f')));});});});};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x190')]=function(_0x467479,_0xc5d198,_0x2cad28){var _0x5e4edf=new History(_0xc5d198);if(_0x5e4edf['countbusyretry']+_0x5e4edf['countcongestionretry']+_0x5e4edf[_0xa3c0('0x11f')]+_0x5e4edf[_0xa3c0('0x120')]+_0x5e4edf['countdropretry']+_0x5e4edf[_0xa3c0('0xec')]+_0x5e4edf[_0xa3c0('0x11b')]+_0x5e4edf['countagentrejectretry']>=_0x2cad28['dialGlobalMaxRetry']-0x1){return!![];}switch(_0x467479){case 0x3:if(_0x5e4edf[_0xa3c0('0x11f')]>=_0x2cad28['dialNoAnswerMaxRetry']-0x1){return!![];}hopperUtils[_0xa3c0('0xdd')]({'active':![],'countnoanswerretry':_0x5e4edf['countnoanswerretry']+=0x1,'scheduledat':moment()[_0xa3c0('0xde')](_0x2cad28[_0xa3c0('0x191')],_0xa3c0('0xdf'))[_0xa3c0('0x46')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x5e4edf[_0xa3c0('0xed')],'ListId':_0x5e4edf[_0xa3c0('0xee')],'VoiceQueueId':_0x5e4edf[_0xa3c0('0xe0')]||undefined,'CampaignId':_0x5e4edf[_0xa3c0('0xef')]||undefined})['catch'](loggerCatch('[rescheduleContact][NoAnswer]'));break;case 0x5:if(_0x5e4edf[_0xa3c0('0x11e')]>=_0x2cad28[_0xa3c0('0x192')]-0x1){return!![];}hopperUtils[_0xa3c0('0xdd')]({'active':![],'countbusyretry':_0x5e4edf[_0xa3c0('0x11e')]+=0x1,'scheduledat':moment()[_0xa3c0('0xde')](_0x2cad28[_0xa3c0('0x193')],_0xa3c0('0xdf'))[_0xa3c0('0x46')](_0xa3c0('0xc9')),'ContactId':_0x5e4edf['ContactId'],'ListId':_0x5e4edf[_0xa3c0('0xee')],'VoiceQueueId':_0x5e4edf[_0xa3c0('0xe0')]||undefined,'CampaignId':_0x5e4edf['CampaignId']||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x194')));break;case 0x8:if(_0x5e4edf[_0xa3c0('0x12d')]>=_0x2cad28[_0xa3c0('0x195')]-0x1){return!![];}hopperUtils[_0xa3c0('0xdd')]({'active':![],'countcongestionretry':_0x5e4edf[_0xa3c0('0x12d')]+=0x1,'scheduledat':moment()[_0xa3c0('0xde')](_0x2cad28['dialCongestionRetryFrequency'],_0xa3c0('0xdf'))['format'](_0xa3c0('0xc9')),'ContactId':_0x5e4edf[_0xa3c0('0xed')],'ListId':_0x5e4edf[_0xa3c0('0xee')],'VoiceQueueId':_0x5e4edf['VoiceQueueId']||undefined,'CampaignId':_0x5e4edf[_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x196')));break;case 0x0:if(_0x5e4edf[_0xa3c0('0x120')]>=_0x2cad28[_0xa3c0('0x197')]-0x1){return!![];}else{hopperUtils[_0xa3c0('0xdd')]({'active':![],'countnosuchnumberretry':_0x5e4edf[_0xa3c0('0x120')]+=0x1,'scheduledat':moment()[_0xa3c0('0xde')](_0x2cad28['dialNoSuchNumberRetryFrequency'],'minutes')[_0xa3c0('0x46')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x5e4edf['ContactId'],'ListId':_0x5e4edf[_0xa3c0('0xee')],'VoiceQueueId':_0x5e4edf[_0xa3c0('0xe0')]||undefined,'CampaignId':_0x5e4edf['CampaignId']||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x198')));}break;case 0xa:if(_0x5e4edf[_0xa3c0('0xd8')]>=_0x2cad28['dialDropMaxRetry']-0x1){return!![];}hopperUtils[_0xa3c0('0xdd')]({'active':![],'countdropretry':_0x5e4edf[_0xa3c0('0xd8')]+=0x1,'scheduledat':moment()[_0xa3c0('0xde')](_0x2cad28[_0xa3c0('0xd9')],_0xa3c0('0xdf'))[_0xa3c0('0x46')](_0xa3c0('0xc9')),'ContactId':_0x5e4edf[_0xa3c0('0xed')],'ListId':_0x5e4edf[_0xa3c0('0xee')],'VoiceQueueId':_0x5e4edf[_0xa3c0('0xe0')]||undefined,'CampaignId':_0x5e4edf[_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x199')));break;case 0xb:if(_0x5e4edf[_0xa3c0('0xec')]>=_0x2cad28[_0xa3c0('0xeb')]-0x1){return!![];}hopperUtils[_0xa3c0('0xdd')]({'active':![],'countabandonedretry':_0x5e4edf[_0xa3c0('0xec')]+=0x1,'scheduledat':moment()[_0xa3c0('0xde')](_0x2cad28[_0xa3c0('0xe9')],_0xa3c0('0xdf'))[_0xa3c0('0x46')](_0xa3c0('0xc9')),'ContactId':_0x5e4edf[_0xa3c0('0xed')],'ListId':_0x5e4edf[_0xa3c0('0xee')],'VoiceQueueId':_0x5e4edf['VoiceQueueId']||undefined,'CampaignId':_0x5e4edf['CampaignId']||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0xf0')));break;case 0x13:if(_0x5e4edf[_0xa3c0('0x11b')]>=_0x2cad28['dialMachineMaxRetry']-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countmachineretry':_0x5e4edf[_0xa3c0('0x11b')]+=0x1,'scheduledat':moment()[_0xa3c0('0xde')](_0x2cad28[_0xa3c0('0x127')],'minutes')[_0xa3c0('0x46')](_0xa3c0('0xc9')),'ContactId':_0x5e4edf[_0xa3c0('0xed')],'ListId':_0x5e4edf['ListId'],'VoiceQueueId':_0x5e4edf['VoiceQueueId']||undefined,'CampaignId':_0x5e4edf[_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x128')));break;case 0x14:if(_0x5e4edf[_0xa3c0('0x121')]>=_0x2cad28[_0xa3c0('0x19a')]-0x1){return!![];}hopperUtils[_0xa3c0('0xdd')]({'active':![],'countagentrejectretry':_0x5e4edf[_0xa3c0('0x121')]+=0x1,'scheduledat':moment()[_0xa3c0('0xde')](_0x2cad28['dialAgentRejectRetryFrequency'],_0xa3c0('0xdf'))['format'](_0xa3c0('0xc9')),'ContactId':_0x5e4edf[_0xa3c0('0xed')],'ListId':_0x5e4edf[_0xa3c0('0xee')],'VoiceQueueId':_0x5e4edf['VoiceQueueId']||undefined,'CampaignId':_0x5e4edf[_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x19b')));break;default:return!![];}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x10e')]=function(_0x3de66d,_0x203656,_0x2a8b95){var _0x4f0121=this;var _0xd2518c=new History(_0x3de66d);var _0x48ffba=![];var _0x4b3ad3;var _0x22ebb4;return new Promise(function(_0x42240a,_0xa9883e){if(_[_0xa3c0('0x40')](_0x203656)&&typeof _0x203656!==_0xa3c0('0x161')){return _0xa9883e(msgResponse(_0xa3c0('0x19c'),_0xa3c0('0x98'),_0xa3c0('0x19d')));}if(_[_0xa3c0('0x40')](_0x2a8b95)&&typeof _0x2a8b95!=='object'){return _0xa9883e(msgResponse(_0xa3c0('0x19c'),_0xa3c0('0x98'),'evt\x20is\x20undefine'));}hopperUtils['verifyAdditionalPhones'](_0xd2518c,_0x2a8b95[_0xa3c0('0xcb')],_0x203656)['then'](function(_0x48c644){if(_0x48c644[_0xa3c0('0xdb')]==0x1)_0x48ffba=!![];switch(_0x2a8b95['reason']){case'0':_0x203656[_0xa3c0('0x19e')]+=0x1;_0xd2518c['state']=0x0;_0xd2518c['statedesc']='NoSuchNumber';_0xd2518c[_0xa3c0('0x120')]+=0x1;_0xd2518c['countglobal']+=0x1;ami[_0xa3c0('0x41')](_0xa3c0('0x19f'),ut['buildObj'](_0x3de66d,'nosuchnumber'));_0x4b3ad3=_0x203656[_0xa3c0('0x1a0')];_0x22ebb4=_0x203656[_0xa3c0('0xda')];hopperUtils[_0xa3c0('0xd0')](_0xd2518c)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x11d')));if(_0x4f0121[_0xa3c0('0x190')](0x0,_0x3de66d,_0x203656)&&!_0x48ffba){if(_0xd2518c[_0xa3c0('0x120')]>=_0x203656[_0xa3c0('0x197')]){_0x4f0121[_0xa3c0('0x125')](_0xd2518c,_0x42240a,_0xa9883e,_0xa3c0('0x1a1'));}else{_0x4f0121['stateGlobal'](_0xd2518c,_0x42240a,_0xa9883e,'reason\x200\x20no\x20such\x20number....');}}break;case'3':_0x203656[_0xa3c0('0x1a2')]+=0x1;_0xd2518c[_0xa3c0('0x71')]=0x3;_0xd2518c[_0xa3c0('0x72')]=_0xa3c0('0x1a3');_0xd2518c['countnoanswerretry']+=0x1;_0xd2518c[_0xa3c0('0xe8')]+=0x1;var _0x158bf9=ut[_0xa3c0('0x1a4')](_0x3de66d,_0x203656);ami['emit'](_0xa3c0('0x1a5'),_0x158bf9);_0x4b3ad3=_0x203656[_0xa3c0('0x191')];_0x22ebb4=_0x203656[_0xa3c0('0xda')];hopperUtils[_0xa3c0('0xd0')](_0xd2518c)['catch'](loggerCatch(_0xa3c0('0x1a6')));if(_0x4f0121['checkRetriveMax'](0x3,_0x3de66d,_0x203656)&&!_0x48ffba){if(_0xd2518c['countnoanswerretry']>=_0x203656['dialNoAnswerMaxRetry']){_0x4f0121[_0xa3c0('0x125')](_0xd2518c,_0x42240a,_0xa9883e,'reason\x203\x20ringing\x20no\x20answer');}else{_0x4f0121['stateGlobal'](_0xd2518c,_0x42240a,_0xa9883e,_0xa3c0('0x1a7'));}}break;case'5':_0x203656[_0xa3c0('0x1a8')]+=0x1;_0xd2518c[_0xa3c0('0x71')]=0x5;_0xd2518c[_0xa3c0('0x72')]='Busy';_0xd2518c[_0xa3c0('0x11e')]+=0x1;_0xd2518c[_0xa3c0('0xe8')]+=0x1;ami[_0xa3c0('0x41')](_0xa3c0('0x1a9'),ut[_0xa3c0('0x11c')](_0x3de66d,'busy'));_0x4b3ad3=_0x203656[_0xa3c0('0x193')];_0x22ebb4=_0x203656['callAdditionalPhoneAfterMin'];hopperUtils['createHistory'](_0xd2518c)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x1aa')));if(_0x4f0121[_0xa3c0('0x190')](0x5,_0x3de66d,_0x203656)&&!_0x48ffba){if(_0xd2518c[_0xa3c0('0x11e')]>=_0x203656[_0xa3c0('0x192')]){_0x4f0121[_0xa3c0('0x125')](_0xd2518c,_0x42240a,_0xa9883e,_0xa3c0('0x1ab'));}else{_0x4f0121[_0xa3c0('0x1ac')](_0xd2518c,_0x42240a,_0xa9883e,_0xa3c0('0x1ab'));}}break;case'8':_0x203656[_0xa3c0('0x1ad')]+=0x1;_0xd2518c[_0xa3c0('0x71')]=0x8;_0xd2518c['statedesc']=_0xa3c0('0x1ae');_0xd2518c['countcongestionretry']+=0x1;_0xd2518c['countglobal']+=0x1;_0x4b3ad3=_0x203656[_0xa3c0('0x1af')];_0x22ebb4=_0x203656[_0xa3c0('0xda')];ami[_0xa3c0('0x41')](_0xa3c0('0x1b0'),ut[_0xa3c0('0x11c')](_0x3de66d,'congestion'));hopperUtils['createHistory'](_0xd2518c)['catch'](loggerCatch(_0xa3c0('0x1b1')));if(_0x4f0121[_0xa3c0('0x190')](0x8,_0x3de66d,_0x203656)&&!_0x48ffba){if(_0xd2518c[_0xa3c0('0x12d')]>=_0x203656['dialCongestionMaxRetry']){_0x4f0121[_0xa3c0('0x125')](_0xd2518c,_0x42240a,_0xa9883e,_0xa3c0('0x1b2'));}else{_0x4f0121[_0xa3c0('0x1ac')](_0xd2518c,_0x42240a,_0xa9883e,_0xa3c0('0x1b2'));}}break;case'11':_0x203656['outboundAbandonedCallsDay']+=0x1;_0xd2518c[_0xa3c0('0x71')]=0xb;_0xd2518c[_0xa3c0('0x72')]='Abandoned';_0xd2518c[_0xa3c0('0xec')]+=0x1;_0xd2518c[_0xa3c0('0xe8')]+=0x1;_0x4b3ad3=_0x203656['dialAbandonedRetryFrequency'];_0x22ebb4=_0x203656[_0xa3c0('0xda')];hopperUtils[_0xa3c0('0xd0')](_0xd2518c)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0xf2')));if(_0x4f0121[_0xa3c0('0x190')](0xb,_0x3de66d,_0x203656)&&!_0x48ffba){if(_0xd2518c[_0xa3c0('0xec')]>=_0x203656['dialAbandonedMaxRetry']){_0x4f0121['createStateFinal'](_0xd2518c,_0x42240a,_0xa9883e,'reason\x2011\x20abandoned');}else{_0x4f0121['stateGlobal'](_0xd2518c,_0x42240a,_0xa9883e,_0xa3c0('0x1b3'));}}break;case'20':_0x203656[_0xa3c0('0x1b4')]+=0x1;_0xd2518c[_0xa3c0('0x71')]=0x14;_0xd2518c[_0xa3c0('0x72')]=_0xa3c0('0x1b5');_0xd2518c['countagentrejectretry']+=0x1;_0xd2518c[_0xa3c0('0xe8')]+=0x1;_0x4b3ad3=_0x203656[_0xa3c0('0x1b6')];_0x22ebb4=_0x203656[_0xa3c0('0xda')];ami[_0xa3c0('0x41')](_0xa3c0('0x1b7'),ut[_0xa3c0('0x11c')](_0x3de66d,_0xa3c0('0x1b8')));hopperUtils['createHistory'](_0xd2518c)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x1b9')));if(_0x4f0121['checkRetriveMax'](0x14,_0x3de66d,_0x203656)&&!_0x48ffba){if(_0xd2518c['countagentrejectretry']>=_0x203656[_0xa3c0('0x19a')]){_0x4f0121[_0xa3c0('0x125')](_0xd2518c,_0x42240a,_0xa9883e,'reason\x2020\x20agentreject');}else{_0x4f0121[_0xa3c0('0x1ac')](_0xd2518c,_0x42240a,_0xa9883e,_0xa3c0('0x1ba'));}}break;default:_0x203656[_0xa3c0('0x138')]+=0x1;_0xd2518c['state']=0xc;_0xd2518c[_0xa3c0('0x72')]=_0x2a8b95['reason'];_0x4b3ad3=_0x203656[_0xa3c0('0x1b6')];_0x22ebb4=_0x203656['callAdditionalPhoneAfterMin'];hopperUtils[_0xa3c0('0xd0')](_0xd2518c)[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x1bb')));if(_0x4f0121[_0xa3c0('0x190')](_0x2a8b95[_0xa3c0('0xcb')],_0x3de66d,_0x203656)&&!_0x48ffba){if(_0xd2518c[_0xa3c0('0x11e')]+_0xd2518c[_0xa3c0('0x12d')]+_0xd2518c[_0xa3c0('0x11f')]+_0xd2518c[_0xa3c0('0x120')]+_0xd2518c[_0xa3c0('0xd8')]+_0xd2518c[_0xa3c0('0xec')]+_0xd2518c[_0xa3c0('0x11b')]+_0xd2518c[_0xa3c0('0x121')]>=_0x203656[_0xa3c0('0x122')]){_0x4f0121[_0xa3c0('0x1ac')](_0xd2518c,_0x42240a,_0xa9883e,_0x2a8b95[_0xa3c0('0xcb')]);}else{_0x4f0121['createStateFinal'](_0xd2518c,_0x42240a,_0xa9883e,_0x2a8b95[_0xa3c0('0xcb')]);}}}})[_0xa3c0('0x3e')](function(){if(_0x48ffba){hopperUtils[_0xa3c0('0xe4')](_0xd2518c,_0x4b3ad3,_0x22ebb4)[_0xa3c0('0x3e')](function(){return _0x42240a(0x1);});}});});};Dialer['prototype']['stateGlobal']=function(_0x5e9525,_0x14ef6a,_0x20516b,_0x3b0b50){var _0x489908=new Final(_0x5e9525);_0x489908[_0xa3c0('0x71')]=0xf;_0x489908['statedesc']=_0xa3c0('0x1bc');this[_0xa3c0('0x125')](_0x489908,_0x14ef6a,_0x20516b,_0x3b0b50);};Dialer['prototype']['createStateFinal']=function(_0x36592b,_0x5d880c,_0x9d2fa7,_0x5557fe){hopperUtils[_0xa3c0('0x133')](_0x36592b)['then'](function(){return _0x5d880c(msgResponse(_0xa3c0('0x19c'),_0xa3c0('0x10d'),_0x5557fe));})[_0xa3c0('0xa7')](function(){return _0x9d2fa7(msgResponse('[moveContactManagedDialer][0]','Failure',_0xa3c0('0x1bd')));});};Dialer[_0xa3c0('0x1c')]['predictive']=function(_0x352c86){var _0x18528c=_0x352c86[_0xa3c0('0x1be')]/0x64;var _0x8a80bd=_0x352c86[_0xa3c0('0xd3')]/(_0x352c86[_0xa3c0('0xd3')]+_0x352c86['outboundAnswerCallsDay']);var _0x1f7ab1=Math[_0xa3c0('0x1bf')](_0x352c86[_0xa3c0('0x1c0')]*(_0x352c86[_0xa3c0('0x1c1')]/0x64));var _0xc04a37=Math[_0xa3c0('0x1bf')](_0x352c86[_0xa3c0('0x1c0')]*(_0x352c86['predictiveIntervalMinThreshold']/0x64));var _0x3f694d=_0x352c86[_0xa3c0('0x13d')]+_0x352c86['talking'];var _0x1a52d5=Math[_0xa3c0('0x1c2')](_0x352c86[_0xa3c0('0x5c')]*_0x352c86['erlangAbandonmentRate']*_0x352c86[_0xa3c0('0x1c3')]*_0x352c86[_0xa3c0('0x1c4')]);if(_[_0xa3c0('0x40')](_0x352c86[_0xa3c0('0x28')])){if(!_[_0xa3c0('0x40')](_0x352c86['startPredictive'])){_0x352c86[_0xa3c0('0x65')]=undefined;loggerPredictive['error'](_0xa3c0('0x1c5'),_0xa3c0('0x1c6'));}if(!_['isUndefined'](_0x352c86['handlePredictive'])){loggerPredictive[_0xa3c0('0x68')](_0xa3c0('0x1c5'),_0xa3c0('0x1c7'));clearInterval(_0x352c86[_0xa3c0('0x66')]);_0x352c86[_0xa3c0('0x66')]=undefined;}_0x352c86[_0xa3c0('0x28')]=moment()[_0xa3c0('0x46')](_0xa3c0('0xc9'));loggerPredictive[_0xa3c0('0x4a')](_0x352c86[_0xa3c0('0x48')],_0xa3c0('0x1c8'),_0x352c86[_0xa3c0('0x28')]);this[_0xa3c0('0xba')](_0x352c86,0x1);}else if(ifInterval(_0x352c86[_0xa3c0('0x1c9')],_0x352c86[_0xa3c0('0x28')])){this[_0xa3c0('0xba')](_0x352c86,0x1);loggerPredictiveCalls['info'](_0xa3c0('0x1ca'),_0x352c86[_0xa3c0('0x28')],_0x352c86[_0xa3c0('0x48')]);_0x352c86[_0xa3c0('0x5c')]=0x0;_0x352c86[_0xa3c0('0xd4')]=0x0;}else if(_0x18528c<_0x8a80bd&&_0x352c86[_0xa3c0('0x1cb')]===_0xa3c0('0x1cc')){clearPredictiveAttributes(_0x352c86);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x1cd'),'Dropped\x20calls\x20day',_0x8a80bd,_0xa3c0('0x28'),_0x352c86[_0xa3c0('0x48')]);}else if(_0x1a52d5<_0x352c86[_0xa3c0('0xd4')]&&_0x352c86[_0xa3c0('0x1cb')]===_0xa3c0('0x1cc')){clearPredictiveAttributes(_0x352c86);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x1ce'),_0xa3c0('0x1cf'),_0x1a52d5,_0xa3c0('0x1d0'),_0x352c86['predictiveIntervalErlangCallsDroppedCalls'],'startProgressive',_0x352c86['name']);}else if(!ifInterval(_0x352c86[_0xa3c0('0x1c9')],_0x352c86['startProgressive'])&&_[_0xa3c0('0x40')](_0x352c86[_0xa3c0('0x65')])&&!_['isUndefined'](_0x352c86[_0xa3c0('0x28')])){_0x352c86['startPredictive']=moment()[_0xa3c0('0x46')]('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive[_0xa3c0('0x4a')](_0x352c86['name'],_0xa3c0('0x1d1'),_0x352c86[_0xa3c0('0x65')]);hopperUtils[_0xa3c0('0x1d2')](_0x352c86[_0xa3c0('0x1c9')])['then'](this['getDataPredictive'](_0x352c86))[_0xa3c0('0x3e')](mergeDataErlangB(_0x352c86))['then'](this['startMethodPredictive'](_0x352c86))[_0xa3c0('0xa7')](loggerCatchPredictive(_0xa3c0('0x1d3'),_0x352c86));}else if(!ifInterval(_0x352c86['dialPredictiveInterval'],_0x352c86[_0xa3c0('0x65')])){_0x352c86['predictiveIntervalErlangCallsDroppedCalls']=0x0;_0x352c86[_0xa3c0('0x65')]=moment()[_0xa3c0('0x46')]('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive['info'](_0x352c86[_0xa3c0('0x48')],_0xa3c0('0x1d4'),_0x352c86[_0xa3c0('0x65')]);clearInterval(_0x352c86['handlePredictive']);_0x352c86[_0xa3c0('0x66')]=undefined;hopperUtils[_0xa3c0('0x1d2')](_0x352c86[_0xa3c0('0x1c9')])[_0xa3c0('0x3e')](this[_0xa3c0('0x1d5')](_0x352c86))['then'](mergeDataErlangB(_0x352c86))['then'](this[_0xa3c0('0x1d6')](_0x352c86))[_0xa3c0('0xa7')](loggerCatchPredictive('Predictive\x20for\x20every\x20interval',_0x352c86));}else if(_0x352c86[_0xa3c0('0x1c0')]&&_0x3f694d<_0x352c86[_0xa3c0('0x1c0')]-_0xc04a37){clearPredictiveAttributes(_0x352c86);loggerPredictive[_0xa3c0('0x4a')](_0x352c86[_0xa3c0('0x48')],_0xa3c0('0x1d7'),_0x3f694d,')\x20are\x20less\x20than\x20threshold\x20(',_0x352c86[_0xa3c0('0x1c0')],'-',_0xc04a37,'=',_0x352c86[_0xa3c0('0x1c0')]-_0xc04a37,')');}else if(_0x352c86['predictiveIntervalAvailable']&&_0x3f694d>_0x352c86['predictiveIntervalAvailable']+_0x1f7ab1){clearPredictiveAttributes(_0x352c86);loggerPredictive['info'](_0x352c86['name'],_0xa3c0('0x1d7'),_0x3f694d,_0xa3c0('0x1d8'),_0x352c86['predictiveIntervalAvailable'],'+',_0x1f7ab1,'=',_0x352c86[_0xa3c0('0x1c0')]+_0x1f7ab1,')');}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x1d5')]=function(_0x37a736){var _0x3fdf70=this;return function(_0x34bb96){return new Promise(function(_0x5b2975,_0x225bb6){_[_0xa3c0('0x62')](_0x37a736,_0x34bb96[0x0]);if(checkGetDataPredictive(_0x34bb96[0x0])){var _0x58d7ff=_0x37a736[_0xa3c0('0x1c0')]=_0x37a736[_0xa3c0('0x1d9')]+_0x37a736[_0xa3c0('0x13d')];var _0x430331=_0x37a736[_0xa3c0('0x1c9')]*0x3c;var _0x3ac055=_0x34bb96[0x0][_0xa3c0('0x56')]+_0x34bb96[0x0][_0xa3c0('0x53')];var _0x4033a2=(_0x34bb96[0x0][_0xa3c0('0x4e')]+_0x34bb96[0x0][_0xa3c0('0x50')]+_0x34bb96[0x0][_0xa3c0('0x52')])/_0x34bb96[0x0][_0xa3c0('0x4c')];_0x37a736['predictiveIntervalHitRate']=_0x4033a2>0x0?_0x4033a2:0x1;switch(_0x37a736[_0xa3c0('0x1cb')]){case'dropRate':var _0x4f5fd4=_0x37a736['dialPredictiveOptimizationPercentage']/0x64;return _0x3fdf70['abandonmentRate'](_0x58d7ff,_0x430331,_0x3ac055,_0x4033a2,_0x4f5fd4)[_0xa3c0('0x3e')](function(_0x4dba87){return _0x5b2975(_0x4dba87);});case _0xa3c0('0x1da'):var _0x5a9f3c=_0x37a736[_0xa3c0('0x1be')]/0x64;return _0x3fdf70[_0xa3c0('0x1db')](_0x58d7ff,_0x430331,_0x3ac055,_0x4033a2,_0x5a9f3c)['then'](function(_0x5b3059){return _0x5b2975(_0x5b3059);});default:return _0x225bb6(msgResponse(_0xa3c0('0x1dc'),_0xa3c0('0x98'),'Unknown\x20Predictive'));}}else{return _0x225bb6(msgResponse('[getDataPredictive]',_0xa3c0('0x98'),_0xa3c0('0x1dd')));}});};};Dialer['prototype'][_0xa3c0('0x1de')]=function(_0x1a7f23){var _0x372965=this;return function(_0x5d733e){return new Promise(function(_0xbe880,_0x57360a){_[_0xa3c0('0x62')](_0x1a7f23,_0x5d733e[0x0]);if(checkGetDataPredictive(_0x5d733e[0x0])){loggerPredictive[_0xa3c0('0x4a')](JSON['stringify'](_0x5d733e[0x0]));if(_0x1a7f23[_0xa3c0('0x1cb')]===_0xa3c0('0x1cc')){return _0x372965[_0xa3c0('0x1df')](_0x1a7f23['id'])[_0xa3c0('0x3e')](function(_0x155162){var _0x9b6158=_0x1a7f23[_0xa3c0('0x1e0')]-_0x155162[0x0][_0xa3c0('0x1e1')];var _0x986867=_0x1a7f23[_0xa3c0('0x1c9')]*0x3c;var _0x2c4c01=_0x5d733e[0x0][_0xa3c0('0x56')]+_0x5d733e[0x0]['predictiveIntervalAvgHoldtime'];var _0x27fad6=(_0x5d733e[0x0][_0xa3c0('0x4e')]+_0x5d733e[0x0][_0xa3c0('0x50')]+_0x5d733e[0x0][_0xa3c0('0x52')])/_0x5d733e[0x0]['predictiveIntervalTotalCalls'];var _0x4c6407=_0x1a7f23[_0xa3c0('0x1be')]/0x64;_0x1a7f23[_0xa3c0('0x1e2')]=_0x155162[0x0]['outboundQueuePauses']||0x0;_0x1a7f23[_0xa3c0('0x1c3')]=_0x27fad6>0x0?_0x27fad6:0x1;return _0x372965[_0xa3c0('0x1e3')](_0x9b6158,_0x986867,_0x2c4c01,_0x27fad6,_0x4c6407);})[_0xa3c0('0x3e')](function(_0x30f487){return _0xbe880(_0x30f487);})[_0xa3c0('0xa7')](function(_0x2a0564){return _0x57360a(msgResponse(_0xa3c0('0x1e4'),_0xa3c0('0x98'),JSON[_0xa3c0('0x77')](_0x2a0564)));});}if(_0x1a7f23[_0xa3c0('0x1cb')]===_0xa3c0('0x1da')){return _0x372965[_0xa3c0('0x1df')](_0x1a7f23['id'])['then'](function(_0x15a8f1){var _0x2c40d3=_0x1a7f23[_0xa3c0('0x1e0')]-_0x15a8f1[0x0][_0xa3c0('0x1e1')];var _0x42ef13=_0x1a7f23[_0xa3c0('0x1c9')]*0x3c;var _0x3fcf5e=_0x5d733e[0x0][_0xa3c0('0x56')]+_0x5d733e[0x0][_0xa3c0('0x53')];var _0x44b6ff=(_0x5d733e[0x0]['predictiveIntervalAnsweredCalls']+_0x5d733e[0x0][_0xa3c0('0x50')]+_0x5d733e[0x0][_0xa3c0('0x52')])/_0x5d733e[0x0][_0xa3c0('0x4c')];var _0x4f90d2=_0x1a7f23['dialPredictiveOptimizationPercentage']/0x64;_0x1a7f23['predictiveIntervalPauses']=_0x15a8f1[0x0]['outboundQueuePauses']||0x0;_0x1a7f23['predictiveIntervalHitRate']=_0x44b6ff>0x0?_0x44b6ff:0x1;return _0x372965['busyFactor'](_0x2c40d3,_0x42ef13,_0x3fcf5e,_0x44b6ff,_0x4f90d2);})[_0xa3c0('0x3e')](function(_0x3a8aa6){return _0xbe880(_0x3a8aa6);})[_0xa3c0('0xa7')](function(_0x359329){return _0x57360a(msgResponse(_0xa3c0('0x1e4'),_0xa3c0('0x98'),JSON[_0xa3c0('0x77')](_0x359329)));});}}else{return _0x57360a(msgResponse(_0xa3c0('0x1dc'),_0xa3c0('0x98'),_0xa3c0('0x1dd')));}});};};Dialer[_0xa3c0('0x1c')]['startMethodPredictive']=function(_0x5540f7){var _0x2dd3a0=this;return function(){var _0x4c5da0=0x0;var _0x44598c=Math['floor'](_0x5540f7['erlangCallToSecond']*0x3e8);if(_0x44598c>0x0){_0x44598c=_0x44598c<0x64?0x64:_0x44598c;loggerPredictive['info'](_0x5540f7[_0xa3c0('0x48')],_0xa3c0('0x1e5'),_0x44598c,'milliseconds');_0x5540f7[_0xa3c0('0x66')]=setInterval(function(){_0x2dd3a0['handlePredictive'](_0x5540f7);loggerPredictiveCalls[_0xa3c0('0x4a')](_0xa3c0('0x1e6'),_0x4c5da0+=0x1);},_0x44598c);}else{loggerPredictive[_0xa3c0('0x4a')](_0x5540f7[_0xa3c0('0x48')],'fail\x20to\x20scheduled\x20calls');}};};Dialer['prototype'][_0xa3c0('0x1e7')]=function(_0xa86cf1,_0xce7564){var _0x229c1e=this;return function(_0x1c582c){if(_['isEmpty'](_0x1c582c)){if(_[_0xa3c0('0xf6')](_0xce7564[_0xa3c0('0x159')])||!_0xce7564[_0xa3c0('0x1e8')]){if(_0xa86cf1[_0xa3c0('0xb8')]===_0xa3c0('0x9')){_0xa86cf1[_0xa3c0('0x74')]=_[_0xa3c0('0x40')](_0xa86cf1['queueStatusComplete'])?!![]:_0xa86cf1['queueStatusComplete'];var _0x11be8d=uuid['v4']();_0x229c1e[_0xa3c0('0x27')][_0x11be8d]=new Action(_0xa86cf1,_0xce7564,_0x11be8d);loggerBooked['info'](_0xa3c0('0x1e9'),_0x11be8d,_0xa3c0('0x1ea'),JSON[_0xa3c0('0x77')](_0xa86cf1[_0xa3c0('0x74')]),_0xa3c0('0x1eb'),_0xa86cf1['name']);if(_0xa86cf1[_0xa3c0('0x74')]){_0xa86cf1[_0xa3c0('0x74')]=![];_0x229c1e[_0xa3c0('0x2a')][_0x229c1e[_0xa3c0('0x27')][_0x11be8d][_0xa3c0('0xc3')]]=[];ami[_0xa3c0('0xa0')]({'actionid':_0x11be8d,'action':_0xa3c0('0x1ec'),'queue':_0xa86cf1[_0xa3c0('0x48')]})['catch'](function(){_0x229c1e['updateOriginated'](_0xa86cf1);hopperUtils[_0xa3c0('0xdd')]({'active':![],'ContactId':_0x229c1e[_0xa3c0('0x27')][_0x11be8d][_0xa3c0('0xed')],'ListId':_0x229c1e[_0xa3c0('0x27')][_0x11be8d][_0xa3c0('0xee')],'VoiceQueueId':_0x229c1e[_0xa3c0('0x27')][_0x11be8d][_0xa3c0('0xe0')]||undefined,'CampaignId':_0x229c1e[_0xa3c0('0x27')][_0x11be8d][_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x1ed')));delete _0x229c1e[_0xa3c0('0x27')][_0x11be8d];});}else{loggerBooked[_0xa3c0('0x4a')](_0xa3c0('0x1ee'),JSON[_0xa3c0('0x77')](_0xa86cf1[_0xa3c0('0x74')]),_0xa3c0('0x1eb'),_0xa86cf1[_0xa3c0('0x48')]);_0x229c1e[_0xa3c0('0xc8')](_0xa86cf1);hopperUtils['rescheduleContact']({'active':![],'ContactId':_0x229c1e[_0xa3c0('0x27')][_0x11be8d][_0xa3c0('0xed')],'ListId':_0x229c1e[_0xa3c0('0x27')][_0x11be8d][_0xa3c0('0xee')],'VoiceQueueId':_0x229c1e[_0xa3c0('0x27')][_0x11be8d][_0xa3c0('0xe0')]||undefined,'CampaignId':_0x229c1e[_0xa3c0('0x27')][_0x11be8d]['CampaignId']||undefined})['catch'](loggerCatch(_0xa3c0('0x1ed')));delete _0x229c1e[_0xa3c0('0x27')][_0x11be8d];}}else{return _0x229c1e[_0xa3c0('0x160')](_0xa86cf1,_0xce7564);}}else{if(utils['getSeconds'](undefined,_0xce7564[_0xa3c0('0x1ef')])<_0xa86cf1[_0xa3c0('0x1f0')]*0x3c){if(_0xce7564['Agent']&&!_0xce7564[_0xa3c0('0x14c')]['voicePause']){_0x229c1e[_0xa3c0('0x21')][_0xa3c0('0x104')](_0xce7564['id'])[_0xa3c0('0x1f')](function(){_0x229c1e[_0xa3c0('0xc8')](_0xa86cf1);});}else{hopperUtils[_0xa3c0('0x1f1')]({'active':![]},_0xce7564['id'],0x1)[_0xa3c0('0x1f')](function(){_0x229c1e[_0xa3c0('0xc8')](_0xa86cf1);});}}else{_0xa86cf1[_0xa3c0('0x1f2')]+=0x1;_0x229c1e[_0xa3c0('0xc8')](_0xa86cf1);if(_0xa86cf1[_0xa3c0('0x1f3')]){hopperUtils[_0xa3c0('0xdd')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0xce7564[_0xa3c0('0xed')],'ListId':_0xce7564['ListId'],'VoiceQueueId':_0xce7564['VoiceQueueId']||undefined,'CampaignId':_0xce7564[_0xa3c0('0xef')]||undefined})[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x1f4')));hopperUtils[_0xa3c0('0xd0')](createObjHistory(_0xa86cf1,_0xce7564,utils[_0xa3c0('0x6b')]['QUEUE_RECALL'],0x17,'RecallInQueue'))['catch'](loggerCatch(_0xa3c0('0x1f5')));}else{_0x229c1e[_0xa3c0('0x12b')](createObjHistory(_0xa86cf1,_0xce7564,utils['CAMPAIGN_STATUS']['RECALL_TIMEOUT'],0x16,'RecallFailedTimeout'),_0xa3c0('0x1f6'),_0xa3c0('0x1f7'));}}}}else{_0xa86cf1['outboundBlacklistCallsDay']+=0x1;_0x229c1e[_0xa3c0('0x12b')](createObjHistory(_0xa86cf1,_0xce7564,utils[_0xa3c0('0x6b')]['BLACKLIST'],0xd,_0xa3c0('0x1f8')),_0xa3c0('0x1f9'),_0xa3c0('0x1fa'));throw _0xa3c0('0x1fb');}};};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x15f')]=function(_0x1cabaa){var _0x3d3c22=this;var _0x3f1829=_0x1cabaa[_0xa3c0('0x1fc')]-_0x1cabaa[_0xa3c0('0x84')];emitCampaignSummary(_0x1cabaa);if(_0x3f1829>0x0&&_0x1cabaa['temp']==0x0){if(_0x3f1829>this[_0xa3c0('0x26')]){_0x3f1829=this['maxNumberOriginate'];}_0x1cabaa[_0xa3c0('0x1fd')]=0x1;hopperUtils[_0xa3c0('0x1fe')](_0x1cabaa,_0x3f1829)[_0xa3c0('0x3e')](function(_0x167da6){_0x1cabaa[_0xa3c0('0x1fd')]=0x0;if(_0x167da6){if(!utils[_0xa3c0('0x1ff')](_0x167da6)){_0x1cabaa['message']=utils[_0xa3c0('0x6b')][_0xa3c0('0x6f')];logger[_0xa3c0('0x4a')]('[getContactCampaign2][Empty]'+_0x1cabaa[_0xa3c0('0x48')]);}else{_0x1cabaa[_0xa3c0('0x84')]+=_0x167da6[_0xa3c0('0x9e')];_0x1cabaa[_0xa3c0('0x6e')]=utils[_0xa3c0('0x6b')][_0xa3c0('0x200')];for(var _0x40732d=0x0;_0x40732d<_0x167da6['length'];_0x40732d+=0x1){_0x1cabaa[_0xa3c0('0x201')]+=0x1;if(_[_0xa3c0('0xf6')](_0x167da6[_0x40732d])||_['isNil'](_0x167da6[_0x40732d][_0xa3c0('0x17d')])||_[_0xa3c0('0xf6')](_0x167da6[_0x40732d]['phone'])){_0x3d3c22[_0xa3c0('0x157')](_0xa3c0('0x202'),_0x1cabaa,_0x167da6[_0x40732d]);}else{hopperUtils[_0xa3c0('0x203')](_[_0xa3c0('0x78')](_0x167da6[_0x40732d],[_0xa3c0('0xef'),'phone']))[_0xa3c0('0x3e')](_0x3d3c22[_0xa3c0('0x1e7')](_0x1cabaa,_0x167da6[_0x40732d]))['catch'](_0x3d3c22[_0xa3c0('0x156')]('[actionOriginateIvr]\x20',_0x1cabaa));}}}}})['catch'](loggerGetContactDialer(_0xa3c0('0x204'),_0x1cabaa,_0x3f1829));}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0xba')]=function(_0x575371,_0x24e235){var _0xeecc6f=this;var _0x38d1b3=[];if(_0x24e235<0x1||_0x575371['dialMethod']==='booked'){_0x24e235=0x1;}var _0xe9468f=Math['floor'](_0x575371['available']*_0x24e235)-_0x575371['originated'];if(_0x575371[_0xa3c0('0x205')]>0x0){var _0x2823f9=_0x575371[_0xa3c0('0x205')]-_0x575371['originated']-_0x575371[_0xa3c0('0x1d9')]-_0x575371['pTalking'];if(_0xe9468f>_0x2823f9){_0xe9468f=_0x2823f9;}}if(_0xe9468f>0x0&&_0x575371[_0xa3c0('0x1fd')]==0x0){if(_0x575371['dialMethod']===_0xa3c0('0x9')){_0xe9468f=0x1;}if(_0xe9468f>this[_0xa3c0('0x26')]){_0xe9468f=this[_0xa3c0('0x26')];}for(var _0x2e115f in this[_0xa3c0('0x24')]){if(typeof this[_0xa3c0('0x24')][_0x2e115f]!=='undefined'){if(this['agents'][_0x2e115f][_0xa3c0('0x71')]===_0xa3c0('0x206')&&this['agents'][_0x2e115f][_0xa3c0('0x8d')]===_0xa3c0('0x8e')){_0x38d1b3[_0xa3c0('0x9f')](this[_0xa3c0('0x24')][_0x2e115f]['id']);}}}_0x575371[_0xa3c0('0x1fd')]=0x1;hopperUtils[_0xa3c0('0x207')](_0x575371,_0x38d1b3,_0xe9468f)['then'](function(_0x471496){_0x575371[_0xa3c0('0x1fd')]=0x0;if(_0x471496){if(!utils[_0xa3c0('0x1ff')](_0x471496)){hopperUtils[_0xa3c0('0x208')](_0x575371)[_0xa3c0('0x3e')](sendMessageReschedule(_0x575371))[_0xa3c0('0xa7')](loggerCatch('[countReScheduled]\x20'));}else{_0x575371[_0xa3c0('0x84')]+=_0x471496[_0xa3c0('0x9e')];_0x575371[_0xa3c0('0x6e')]=_0x575371['dialMethod']===_0xa3c0('0x9')?utils[_0xa3c0('0x6b')][_0xa3c0('0x140')]:utils[_0xa3c0('0x6b')][_0xa3c0('0x200')];for(var _0x30ee1c=0x0;_0x30ee1c<_0x471496[_0xa3c0('0x9e')];_0x30ee1c+=0x1){if(_[_0xa3c0('0xf6')](_0x471496[_0x30ee1c])||_[_0xa3c0('0xf6')](_0x471496[_0x30ee1c][_0xa3c0('0x17d')])||_[_0xa3c0('0xf6')](_0x471496[_0x30ee1c][_0xa3c0('0x163')])){_0xeecc6f['emptyContact'](_0xa3c0('0x202'),_0x575371,_0x471496[_0x30ee1c]);}else{hopperUtils['checkIsBlackList'](_[_0xa3c0('0x78')](_0x471496[_0x30ee1c],[_0xa3c0('0xe0'),_0xa3c0('0x163')]))[_0xa3c0('0x3e')](_0xeecc6f[_0xa3c0('0x1e7')](_0x575371,_0x471496[_0x30ee1c]))[_0xa3c0('0xa7')](_0xeecc6f['loggerHandler'](_0xa3c0('0x202'),_0x575371));}}}}})[_0xa3c0('0xa7')](loggerGetContactDialer('[getContactDialer2]',_0x575371,_0xe9468f));}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x66')]=function(_0x5d0054){if(_0x5d0054['dialLimitQueue']>0x0){var _0x437dc3=_0x5d0054[_0xa3c0('0x205')]-_0x5d0054['originated']-_0x5d0054[_0xa3c0('0x1d9')];if(_0x437dc3>0x0&&_0x5d0054[_0xa3c0('0x1fd')]==0x0){this[_0xa3c0('0x209')](_0x5d0054);}else{loggerPredictiveCalls[_0xa3c0('0x4a')](_0xa3c0('0x20a'));}}else{this[_0xa3c0('0x209')](_0x5d0054);}};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x209')]=function(_0x1f47cd){var _0x4e4afc=this;var _0x27ae76=[];_0x1f47cd[_0xa3c0('0x84')]+=0x1;for(var _0x3e235e in this['agents']){if(typeof this[_0xa3c0('0x24')][_0x3e235e]!=='undefined'){if(this[_0xa3c0('0x24')][_0x3e235e][_0xa3c0('0x71')]==='not_inuse'&&this[_0xa3c0('0x24')][_0x3e235e][_0xa3c0('0x8d')]===_0xa3c0('0x8e')){_0x27ae76['push'](this[_0xa3c0('0x24')][_0x3e235e]['id']);}}}_0x1f47cd[_0xa3c0('0x1fd')]=0x1;return this[_0xa3c0('0x207')](_0x1f47cd['id'],_0x27ae76,0x1,_0x1f47cd[_0xa3c0('0x20b')],_0x1f47cd)[_0xa3c0('0x3e')](function(_0x34341f){_0x1f47cd[_0xa3c0('0x1fd')]=0x1;if(_0x34341f){if(!utils[_0xa3c0('0x1ff')](_0x34341f)){utils['checkContactLowerLimitOriginate'](_0x1f47cd,0x1,0x0);return hopperUtils['countReScheduled'](_0x1f47cd)['then'](sendMessageReschedule(_0x1f47cd))[_0xa3c0('0xa7')](loggerCatch(_0xa3c0('0x20c')));}else{_0x1f47cd[_0xa3c0('0x6e')]=utils[_0xa3c0('0x6b')]['RUNNING'];if(_['isNil'](_0x34341f[0x0])||_[_0xa3c0('0xf6')](_0x34341f[0x0]['Contact'])||_[_0xa3c0('0xf6')](_0x34341f[0x0]['phone'])){_0x4e4afc[_0xa3c0('0x157')](_0xa3c0('0x202'),_0x1f47cd,_0x34341f[0x0]);}else{return hopperUtils[_0xa3c0('0x20d')](_[_0xa3c0('0x78')](_0x34341f[0x0],[_0xa3c0('0xe0'),_0xa3c0('0x163')]))[_0xa3c0('0x3e')](_0x4e4afc[_0xa3c0('0x1e7')](_0x1f47cd,_0x34341f[0x0]))[_0xa3c0('0xa7')](_0x4e4afc[_0xa3c0('0x156')](_0xa3c0('0x20e'),_0x1f47cd));}}}})['catch'](loggerGetContactDialer(_0xa3c0('0x20f'),_0x1f47cd,0x1));};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x1e3')]=function(_0x3e0748,_0x487ca5,_0x4e9799,_0x4ee582,_0x251692,_0x2e9afb){loggerPredictive['info'](_0xa3c0('0x210'));loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x211'),_0x3e0748);loggerPredictive['info']('Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x487ca5);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x212'),_0x4e9799);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x213'),_0x4ee582);loggerPredictive[_0xa3c0('0x4a')]('Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x251692);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x55'));return new Promise(function(_0x3097be,_0x821e52){if(_0x3e0748<=0x0||isNaN(_0x3e0748)){return _0x821e52(msgResponse('[abandonmentRate]',_0xa3c0('0x8a'),_0xa3c0('0x214')+_0x3e0748));}if(_0x4e9799<=0x0||isNaN(_0x4e9799)){return _0x821e52(msgResponse(_0xa3c0('0x215'),_0xa3c0('0x8a'),_0xa3c0('0x216')+_0x4e9799));}if(_0x4ee582<=0x0||isNaN(_0x4ee582)){return _0x821e52(msgResponse(_0xa3c0('0x215'),_0xa3c0('0x8a'),_0xa3c0('0x217')+_0x4ee582));}if(_0x487ca5<=0x0||isNaN(_0x487ca5)){return _0x821e52(msgResponse(_0xa3c0('0x215'),'Error','interval\x20=\x20'+_0x487ca5));}if(_0x251692<=0x0||isNaN(_0x251692)){return _0x821e52(msgResponse(_0xa3c0('0x215'),_0xa3c0('0x8a'),_0xa3c0('0x218')+_0x251692));}_0x2e9afb=_0x2e9afb||0x0;var _0x51b614=0x1/_0x4e9799;var _0xe0a793=0x0;var _0x5de602=0x0;var _0x467f09=0x0;var _0x3d7a26=0x0;for(var _0x586a04=0x0;_0x467f09<_0x251692;_0x586a04+=0x1){_0x5de602=_0x586a04/_0x487ca5;_0xe0a793=(_0x4ee582*_0x5de602+_0x2e9afb)/_0x51b614;_0x467f09=utils[_0xa3c0('0x219')](_0xe0a793,_0x3e0748);_0x3d7a26=_0xe0a793/_0x3e0748*(0x1-utils['erlangb'](_0xe0a793,_0x3e0748));}return _0x3097be({'erlangCalls':_0x586a04,'erlangCallToSecond':_0x487ca5/_0x586a04,'erlangAbandonmentRate':_0x467f09,'erlangBusyFactor':_0x3d7a26});});};Dialer[_0xa3c0('0x1c')][_0xa3c0('0x1db')]=function(_0x3d7039,_0x528c54,_0x215484,_0x1c5273,_0xe5ff9e,_0x342b78){loggerPredictive['info']('----\x20Agent\x20Busy\x20Factor\x20----');loggerPredictive[_0xa3c0('0x4a')]('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',_0x3d7039);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x21a'),_0x528c54);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x212'),_0x215484);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x213'),_0x1c5273);loggerPredictive[_0xa3c0('0x4a')](_0xa3c0('0x21b'),_0xe5ff9e);loggerPredictive['info'](_0xa3c0('0x55'));return new Promise(function(_0x554cd8,_0x2dbea2){if(_0x3d7039<=0x0||isNaN(_0x3d7039)){return _0x2dbea2(msgResponse(_0xa3c0('0x21c'),_0xa3c0('0x8a'),'m\x20=\x20'+_0x3d7039));}if(_0x215484<=0x0||isNaN(_0x215484)){return _0x2dbea2(msgResponse(_0xa3c0('0x21c'),'Error','Ts\x20=\x20'+_0x215484));}if(_0x1c5273<=0x0||isNaN(_0x1c5273)){return _0x2dbea2(msgResponse(_0xa3c0('0x21c'),_0xa3c0('0x8a'),'p\x20=\x20'+_0x1c5273));}if(_0x528c54<=0x0||isNaN(_0x528c54)){return _0x2dbea2(msgResponse(_0xa3c0('0x21c'),_0xa3c0('0x8a'),_0xa3c0('0x21d')+_0x528c54));}if(_0xe5ff9e<=0x0||isNaN(_0xe5ff9e)){return _0x2dbea2(msgResponse('[busyFactor]',_0xa3c0('0x8a'),_0xa3c0('0x21e')+_0xe5ff9e));}_0x342b78=_0x342b78||0x0;var _0x5659d4=0x1/_0x215484;var _0x415ca3=0x0;var _0x1b856e=0x0;var _0x585bf7=0x0;var _0x10c550=0x0;for(var _0x3a5295=0x0;_0x10c550<_0xe5ff9e;_0x3a5295+=0x1){_0x1b856e=_0x3a5295/_0x528c54;_0x415ca3=(_0x1c5273*_0x1b856e+_0x342b78)/_0x5659d4;_0x585bf7=utils[_0xa3c0('0x219')](_0x415ca3,_0x3d7039);_0x10c550=_0x415ca3/_0x3d7039*(0x1-utils[_0xa3c0('0x219')](_0x415ca3,_0x3d7039));}return _0x554cd8({'erlangCalls':_0x3a5295,'erlangCallToSecond':_0x528c54/_0x3a5295,'erlangAbandonmentRate':_0x585bf7,'erlangBusyFactor':_0x10c550});});};module[_0xa3c0('0x21f')]=Dialer;
\ No newline at end of file
+var _0x5576=['[rescheduleContact][Abandoned]','[syncAgentComplete][createHistory][11]','swapAdditionalPhones','syncNewExten','channel','syncQueueMember','actionid','strategy','rrmemory','roundrobin','isNil','locked','paused','stateinterface','push','idHopper','run','[Catch][Preview][syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','queueBookedRR','_rr','unlockRR','[booked][RR]','Agent:\x20','contactAgent-idHopper:\x20','[booked][RR][finaly]','getQueue','Success','callProgressDetecting','variable','amdstatus','exten','dialAMDActive','HANGUP','outboundAnswerAgiCallsDay','HangupInAMD','membername','AMD','custom:amd','buildObj','amd','saveInDb','[syncHangupInAMD]','value','Machine','countmachineretry','[syncAgentComplete][createHistory][0]','countbusyretry','countnosuchnumberretry','countagentrejectretry','dialGlobalMaxRetry','stateGlobal','dialMachineMaxRetry','createStateFinal','reason\x2019\x20machine....','dialMachineRetryFrequency','[rescheduleContact][Machine]','[syncHangupInAMDIvr][createHistory]','MACHINE','ivrAnswerCallsDay','[syncHangupIvr][createHistory]','[syncHangupIvr]','dialQueueProject','AnswerAGI','AGI','cause-txt','Normal\x20Clearing','Unknow','queuesSummary','running','statusMessage','getQueueCampaignStatusMessage','inUse','pTalking','compareToOutboundQueue','queueSummaryCountersUpdated','updateReportFromOutboundQueue','[syncQueueSummary]','throttle','filter','dialPreviewRecallmeReminder','handlePreviewRecallNotifications','map','user:%s','user:dialPreviewRecallReminder','checkPreviewRecallReminder','clearZombieChannels','[uniqueid]','[actions]','[Dialer][checkChannel][ivr]','getVoiceQueueRtPauses','[getVoiceQueueRtPauses]\x20','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','loggerHandler','emptyContact','notFound','UserId','Agent','handleIvr','actionOriginate','object','originate','phone','contact\x20is\x20undefine','getCaller','\x22agi://%s/square,%s\x22','NONE','isOutboundQueue','\x22%s,%s%s,,,%s\x22','dialQueueOptions','dialAgiAfterHangupAgent','ACTIVE','xcally-motion-dialer','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','XMD-AMDBETWEENWORDSSILENCE','dialAMDBetweenWordsSilence','XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','XMD-AMDSILENCETHRESHOLD','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','dialAMDMaximumWordLength','setXMDContactVariables','callerid','dialOriginateCallerIdName','getCallerIdRandom','dialOriginateCallerIdNumber','dialRandomLastDigitCallerIdNumber','XMD-ORIGINATECALLERIDNAME','extractCalleridName','XMD-ORIGINATECALLERIDNUM','variables','SIP/%s/%s%s','dialPrefix','trim','dialCutDigit','substring','from-sip','dialOriginateTimeout','outboundOriginateFailureCallsDay','OriginateError','[originate][error]','originate\x20action\x20Error','checkRetriveMax','countcongestionretry','countnoanswerretry','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialBusyMaxRetry','[rescheduleContact]\x20[Busy]','dialCongestionMaxRetry','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','[rescheduleContact][NoSuchNumber]','dialAgentRejectRetryFrequency','[rescheduleContact][AgentReject]','entity\x20is\x20undefine','evt\x20is\x20undefine','reason','outboundNoSuchCallsDay','NoSuchNumber','custom:agentnosuchnumber','nosuchnumber','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','NoAnswer','custom:agentnoanswer','[syncAgentComplete][createHistory][3]','reason\x203\x20ringing\x20no\x20answer','Busy','custom:agentbusy','busy','dialBusyRetryFrequency','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','outboundCongestionCallsDay','custom:agentcongestion','congestion','[syncAgentComplete][createHistory][8]','reason\x208\x20congestion','outboundAbandonedCallsDay','AgentReject','custom:agentreject','agentreject','dialAgentRejectMaxRetry','reason\x2020\x20agentreject','outboundUnknownCallsDay','[syncAgentComplete][createHistory][?]','Global','[callProgressDetecting]','[moveContactManagedDialer][0]','dialPredictiveOptimizationPercentage','round','predictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','available','talking','floor','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','dialPredictiveInterval','[startMethodPredictive][StartProgressive][Loop]','dropRate','Dropped\x20calls\x20day','dialPredictiveOptimization','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','started\x20in\x20predictive\x20at','avgHandleTime','getDataPredictive','Predictive\x20after\x20first\x20interval','recalculate\x20predictive\x20at','startMethodPredictive','Predictive\x20for\x20every\x20interval','predictiveIntervalAvailable','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20more\x20than\x20threshold\x20(','predictiveIntervalAnsweredCalls','predictiveIntervalHitRate','abandonmentRate','agentBusyFactor','busyFactor','[getDataPredictive]','check\x20failure','getDataPredictiveOld','loggedIn','outboundQueuePauses','predictiveIntervalTotalCalls','predictiveIntervalPauses','one\x20call\x20every:','milliseconds','[handlePredictive]','fail\x20to\x20scheduled\x20calls','checkContactBlack','recallme','booked','queueStatusComplete:\x20','Queue:\x20','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','dialRecallMeTimeout','unlockContact','outboundReCallsDay','dialRecallInQueue','[rescheduleContact][dialRecallInQueue]','QUEUE_RECALL','RecallFailedTimeout','[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]','outboundBlacklistCallsDay','BLACKLIST','Blacklist','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','inBlackList','limitCalls','temp','getContactDialerIvr','checkContactEmpty','NO_AVAILABLE_CONTACTS','[getContactCampaign2][Empty]','RUNNING','ivrTotalCallsDays','Contact','[actionOriginate]\x20','checkIsBlackListIvr','[actionOriginateIvr]\x20','[getContactCampaign2]','dialLimitQueue','not_inuse','countReScheduled','[countReScheduled]\x20','checkIsBlackList','[getContactDialer2]','tryOriginatePredictive','getContactDialer','dialOrderByScheduledAt','[actionOriginatePredictive]\x20','[getContactDialerPredictive]','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','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','Amax\x20=\x20','erlangb','----\x20Agent\x20Busy\x20Factor\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','[busyFactor]','interval\x20=\x20','Umin\x20=\x20','exports','util','lodash','moment','ioredis','./utils','./utils/hopper','../preview/util/util','../../../config/environment/','../../../config/logger','dialer','predictive','predictiveCalls','syncQueueSummary','../ami','redis','defaults','socket.io-emitter','../rpc/cmHopper','../rpc/voiceQueueRt','../rpc/interval','./models/agentComplete','env','prototype','enqueue','tail','finally','preview','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','actions','contactsId','uniqueId','startProgressive','ivrOriginated','queueBooked','agentconnect','queuecallerabandon','syncQueueCallerAbandon','bind','originateresponse','syncOriginateResponse','agentcomplete','syncAgentComplete','custom:queuesummarycomplete','syncQueueSummaryComplete','hangup','syncHangup','newexten','varset','syncVarSet','queuemember','queuestatuscomplete','syncQueueStatusComplete','loopClearZombieChannels','getSettings','then','previewRecallmeReminderInterval','isUndefined','emit','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','format','voice:queue:%s','name','voice_queue:save','isEmpty','-----\x20Stats\x20Predictive\x20---','Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','info','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsTimeout','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalDroppedCallsCallersExit','AVG\x20Hold\x20Time:\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','History\x20information\x20are\x20empty','---------\x20ErlangB\x20---------','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCalls','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','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','merge','getSeconds','debug','startProgressive\x20value\x20cleared','startPredictive','startPredictive\x20value\x20cleared','handlePredictive','handlePredictive\x20interval\x20cleared','error','checkContactLowerLimitOriginate','inspect','contactsRescheduled','message','CAMPAIGN_STATUS','CONTACTS_RESCHEDULED','state','statedesc','endtime','starttime','queueStatusComplete','[unlockQueueStatus][undefined]','[booked][unlockQueueStatus]','stringify','pick','Interval','NULL_INTERVAL','\x20INTERVAL_IS_NULL','Intervals','isIVRCampaignActive','INACTIVE','\x20NOT\x20Active','campaign:ivr:%s','campaign:save','sendMessageOneNotActive','originated','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','is\x20not\x20active','DISACTIVED','is\x20disactive','[ifTime][Action]','Error','active','SIP/%s','reachable','status','unmonitored','checkIsTrunkReachable','Trunk','isTrunkReachable','TrunkBackup','TRUNK_NOT_REACHABLE','\x20trunk\x20is\x20not\x20reachable','checkIfTime','ifTimeIvr','checkIfTimeIntervals','ifTime','\x20Intervals\x20is\x20null\x20','EMPTY_INTERVAL','Failure','\x20Intervals\x20is\x20empty\x20','timezones','UNKNOWN_TIMEZONE','\x20Timezone\x20unknow\x20','isArray','length','Action','command','content','indexOf','catch','true','all','some','OVERTIME_GLOBAL_INTERVAL','OVERTIME_INTERVAL','[ifTime][promiseAll]','Global:\x20','Timezone:\x20','loopCampaigns','syncCampaigns','undefined','isIVRCampaign','resolve','dialTimezone','launchHandleIvr','[syncCampaigns]','checkDialMethod','dialMethod','progressive','handlePower','power','dialPowerLevel','Queue','dialGlobalInterval','silly','Dialer::ifTime()','Voice\x20Queue\x20%s\x20$s','intervalIftime','\x20Interval\x20is\x20overtime:\x20','Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:','isGlobal','AMI\x20IfTime','syncAgentConnect','queue','uniqueid','type','updateOriginated','answertime','YYYY-MM-DD\x20HH:mm:ss','ivr','outboundAnswerCallsDay','createHistory','[syncAgentComplete][createHistory]','moveContactManagedDialer','[syncAgentComplete]','droptime','responsetime','dialQueueTimeout','outboundDropCallsDayTimeout','predictiveIntervalErlangCallsDroppedCalls','dropreason','TIMEOUT','agiafterat','dialQueueProject2','countdropretry','countglobal','dialDropRetryFrequency','callAdditionalPhoneAfterMin','verifyAdditionalPhones','additional','dialDropMaxRetry','rescheduleContact','add','minutes','ContactId','ListId','VoiceQueueId','[rescheduleContact][Drop]','Drop','calleridname','calleridnum','outboundDropCallsDayCallersExit','Abandoned','CALLEREXIT','countabandonedretry','dialAbandonedRetryFrequency','voiceQueue','dialAbandonedMaxRetry','queueCallerAbandonCreateState','CampaignId'];(function(_0x2070da,_0x45e586){var _0x4f9fe1=function(_0x5b6f2a){while(--_0x5b6f2a){_0x2070da['push'](_0x2070da['shift']());}};_0x4f9fe1(++_0x45e586);}(_0x5576,0x12d));var _0x6557=function(_0x813d0a,_0x4fd3d7){_0x813d0a=_0x813d0a-0x0;var _0x241352=_0x5576[_0x813d0a];return _0x241352;};'use strict';var util=require(_0x6557('0x0'));var _=require(_0x6557('0x1'));var uuid=require('uuid');var moment=require(_0x6557('0x2'));var rr=require('rr');var Redis=require(_0x6557('0x3'));var utils=require(_0x6557('0x4'));var hopperUtils=require(_0x6557('0x5'));var ut=require(_0x6557('0x6'));var config=require(_0x6557('0x7'));var logger=require(_0x6557('0x8'))(_0x6557('0x9'));var loggerBooked=require(_0x6557('0x8'))('booked');var loggerPredictive=require(_0x6557('0x8'))(_0x6557('0xa'));var loggerPredictiveCalls=require('../../../config/logger')(_0x6557('0xb'));var loggerSyncQueueSummary=require(_0x6557('0x8'))(_0x6557('0xc'));var ami=require(_0x6557('0xd'));config[_0x6557('0xe')]=_[_0x6557('0xf')](config[_0x6557('0xe')],{'host':'localhost','port':0x18eb});var io=require(_0x6557('0x10'))(new Redis(config[_0x6557('0xe')]));var cmHopper=require(_0x6557('0x11'));var voiceQueueRt=require(_0x6557('0x12'));var RpcSetting=require('../rpc/setting');var Interval=require(_0x6557('0x13'));var Action=require('./models/action');var History=require('./models/history');var Final=require('./models/final');var AgentComplete=require(_0x6557('0x14'));var QueueCallerAbandon=require('./models/queueCallerAbandon');var Hangup=require('./models/hangup');var ipAgi=process[_0x6557('0x15')]['XCALLY_IP_AGI']||'127.0.0.1';var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence[_0x6557('0x16')][_0x6557('0x17')]=function(_0x4f18ff){this[_0x6557('0x18')]=this[_0x6557('0x18')]?this[_0x6557('0x18')][_0x6557('0x19')](_0x4f18ff):_0x4f18ff();};function Dialer(_0x19c1ee,_0xbc76){this['sequence']=new Sequence();this[_0x6557('0x1a')]=_0xbc76;this['voiceQueues']=_0x19c1ee[_0x6557('0x1b')];this[_0x6557('0x1c')]=_0x19c1ee['campaigns'];this[_0x6557('0x1d')]=_0x19c1ee[_0x6557('0x1d')];this[_0x6557('0x1e')]=_0x19c1ee[_0x6557('0x1e')];this[_0x6557('0x1f')]=config['maxNumberOriginate']||0x2;this['channels']={};this[_0x6557('0x20')]={};this[_0x6557('0x21')]={};this[_0x6557('0x22')]={};this['optionPredictive']={};this['startPredictive']={};this[_0x6557('0x23')]={};this[_0x6557('0x24')]={};this[_0x6557('0x25')]={};this['queueBookedRR']={};this['queuesSummary']={};ami['on'](_0x6557('0x26'),this['syncAgentConnect']['bind'](this));ami['on'](_0x6557('0x27'),this[_0x6557('0x28')][_0x6557('0x29')](this));ami['on'](_0x6557('0x2a'),this[_0x6557('0x2b')]['bind'](this));ami['on'](_0x6557('0x2c'),this[_0x6557('0x2d')][_0x6557('0x29')](this));ami['on']('custom:queuesummary',this[_0x6557('0xc')][_0x6557('0x29')](this));ami['on'](_0x6557('0x2e'),this[_0x6557('0x2f')]['bind'](this));ami['on'](_0x6557('0x30'),this[_0x6557('0x31')][_0x6557('0x29')](this));ami['on'](_0x6557('0x32'),this['syncNewExten'][_0x6557('0x29')](this));ami['on'](_0x6557('0x33'),this[_0x6557('0x34')][_0x6557('0x29')](this));ami['on'](_0x6557('0x35'),this['syncQueueMember'][_0x6557('0x29')](this));ami['on'](_0x6557('0x36'),this[_0x6557('0x37')][_0x6557('0x29')](this));this['loopCampaigns']();this[_0x6557('0x38')]();RpcSetting[_0x6557('0x39')]()[_0x6557('0x3a')](function(_0x40d27e){previewRecallmeReminderInterval=_0x40d27e[_0x6557('0x3b')];});}function isNotNull(_0xa0bb26){return _0xa0bb26!==null&&!_[_0x6557('0x3c')](_0xa0bb26);}function msgResponse(_0x151b83,_0x3bab98,_0x27a577){return{'action':_0x151b83,'response':_0x3bab98,'message':_0x27a577,'stack':_0x27a577};}function emit(_0x157627,_0x148018,_0xfee11b){io['to'](_0x157627)[_0x6557('0x3d')](_0x148018,_0xfee11b);}function emitOutboundVoiceQueueSummary(_0x266eb4){if(_0x266eb4['type']==='outbound'){logger['debug'](_0x6557('0x3e'),util['inspect'](_0x266eb4,{'showHidden':![],'depth':null}));emit(util[_0x6557('0x3f')](_0x6557('0x40'),_0x266eb4[_0x6557('0x41')]),_0x6557('0x42'),_0x266eb4);}}function checkGetDataPredictive(_0x16a989){if(isNotNull(_0x16a989)&&!_[_0x6557('0x43')](_0x16a989)){loggerPredictive['info'](_0x6557('0x44'));loggerPredictive['info'](_0x6557('0x45'),_0x16a989['predictiveIntervalTotalCalls']);loggerPredictive[_0x6557('0x46')](_0x6557('0x47'),_0x16a989['predictiveIntervalAnsweredCalls']);loggerPredictive['info'](_0x6557('0x48'),_0x16a989[_0x6557('0x49')]);loggerPredictive[_0x6557('0x46')](_0x6557('0x4a'),_0x16a989[_0x6557('0x4b')]);loggerPredictive[_0x6557('0x46')](_0x6557('0x4c'),_0x16a989[_0x6557('0x4d')]);loggerPredictive[_0x6557('0x46')](_0x6557('0x4e'),_0x16a989['predictiveIntervalAvgTalktime']);loggerPredictive[_0x6557('0x46')](_0x6557('0x4f'));if(_0x16a989['predictiveIntervalTotalCalls']>0x0){if(!_[_0x6557('0x3c')](_0x16a989[_0x6557('0x50')])&&_0x16a989[_0x6557('0x50')]>0x0){return!![];}loggerPredictive[_0x6557('0x46')](_0x6557('0x51'));if(!_[_0x6557('0x3c')](_0x16a989[_0x6557('0x4d')])&&_0x16a989[_0x6557('0x4d')]>0x0){return!![];}loggerPredictive[_0x6557('0x46')]('Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive');}else{loggerPredictive[_0x6557('0x46')](_0x6557('0x52'));}}else{loggerPredictive['info'](_0x6557('0x53'));}return![];}function mergeDataErlangB(_0x601f05){return function(_0xa09a70){loggerPredictive[_0x6557('0x46')](_0x6557('0x54'));loggerPredictive[_0x6557('0x46')](_0x6557('0x55'),_0xa09a70[_0x6557('0x56')]);loggerPredictive[_0x6557('0x46')](_0x6557('0x57'),_0xa09a70['erlangCallToSecond']);loggerPredictive[_0x6557('0x46')]('Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0xa09a70[_0x6557('0x58')]);loggerPredictive['info'](_0x6557('0x59'),_0xa09a70[_0x6557('0x5a')]);loggerPredictive[_0x6557('0x46')](_0x6557('0x5b'),_0xa09a70['erlangAbandonmentRate']);loggerPredictive[_0x6557('0x46')]('---------------------------');_[_0x6557('0x5c')](_0x601f05,_0xa09a70);};}function ifInterval(_0x3d2010,_0x2977ee){if(_[_0x6557('0x3c')](_0x2977ee)){return![];}return utils[_0x6557('0x5d')](undefined,_0x2977ee)<_0x3d2010*0x3c;}function clearPredictiveAttributes(_0x4f24f9){if(_0x4f24f9[_0x6557('0x23')]){_0x4f24f9[_0x6557('0x23')]=undefined;loggerPredictive[_0x6557('0x5e')](_0x4f24f9[_0x6557('0x41')],_0x6557('0x5f'));}if(_0x4f24f9[_0x6557('0x60')]){_0x4f24f9[_0x6557('0x60')]=undefined;loggerPredictive['debug'](_0x4f24f9['name'],_0x6557('0x61'));}if(_0x4f24f9['handlePredictive']){clearInterval(_0x4f24f9['handlePredictive']);_0x4f24f9[_0x6557('0x62')]=undefined;loggerPredictive[_0x6557('0x5e')](_0x4f24f9[_0x6557('0x41')],_0x6557('0x63'));}}function loggerCatchPredictive(_0x4bfbc7,_0x37d8fa){return function(_0xfa46f3){loggerPredictive['error'](_0x37d8fa[_0x6557('0x41')],_0x4bfbc7);loggerPredictive[_0x6557('0x64')](_0xfa46f3['stack']);clearPredictiveAttributes(_0x37d8fa);};}function loggerCatch(_0x3e7ab9){return function(_0x134374){logger[_0x6557('0x64')](_0x3e7ab9,util['inspect'](_0x134374,{'showHidden':![],'depth':null}));};}function loggerGetContactDialer(_0x4995e4,_0xd2c104,_0x429ac8){return function(_0x335beb){utils[_0x6557('0x65')](_0xd2c104,_0x429ac8,0x0);_0xd2c104['temp']=0x0;logger[_0x6557('0x64')](_0x4995e4,util[_0x6557('0x66')](_0x335beb,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x39fbed){return function(_0x202e5a){if(isNotNull(_0x202e5a)&&isNotNull(_0x202e5a[0x0])){if(_0x202e5a[0x0][_0x6557('0x67')]>0x0){_0x39fbed[_0x6557('0x68')]=utils[_0x6557('0x69')][_0x6557('0x6a')];logger[_0x6557('0x46')]('[getContactDialer2][ReScheduled]'+_0x39fbed[_0x6557('0x41')],_0x202e5a[0x0][_0x6557('0x67')],'contacts');}else{_0x39fbed['message']=utils[_0x6557('0x69')]['NO_AVAILABLE_CONTACTS'];logger[_0x6557('0x46')]('[getContactDialer2][Empty]'+_0x39fbed[_0x6557('0x41')]);}}};}function createObjHistory(_0x3e8349,_0x592088,_0x36d581,_0x2db04b,_0x5233f2){_0x3e8349[_0x6557('0x68')]=_0x36d581;var _0x69328d=new Action(_0x3e8349,_0x592088);var _0x2f388d=new History(_0x69328d);_0x2f388d[_0x6557('0x6b')]=_0x2db04b;_0x2f388d[_0x6557('0x6c')]=_0x5233f2;_0x2f388d[_0x6557('0x6d')]=_0x69328d[_0x6557('0x6e')];return _0x2f388d;}function unlockQueueStatus(_0x33afc9,_0x53b1f0){setTimeout(function(){if(_[_0x6557('0x3c')](_0x33afc9[_0x6557('0x6f')])){loggerBooked['error'](_0x6557('0x70'),_0x53b1f0);}_0x33afc9[_0x6557('0x6f')]=!![];loggerBooked['info'](_0x6557('0x71'),_0x53b1f0,JSON[_0x6557('0x72')](_[_0x6557('0x73')](_0x33afc9,[_0x6557('0x41'),_0x6557('0x6f')])));},0x1f3);}function checkInterval(_0x472bf4){return function(){if(!isNotNull(_0x472bf4[_0x6557('0x74')])){_0x472bf4[_0x6557('0x68')]=utils['CAMPAIGN_STATUS'][_0x6557('0x75')];throw _0x472bf4[_0x6557('0x41')]+_0x6557('0x76');}if(!isNotNull(_0x472bf4[_0x6557('0x74')][_0x6557('0x77')])){_0x472bf4[_0x6557('0x68')]=utils[_0x6557('0x69')]['NULL_INTERVAL'];throw _0x472bf4[_0x6557('0x41')]+_0x6557('0x76');}if(!isNotNull(_['isEmpty'](_0x472bf4['Interval'][_0x6557('0x77')]))){_0x472bf4['message']=utils['CAMPAIGN_STATUS'][_0x6557('0x75')];throw _0x472bf4['name']+_0x6557('0x76');}};}function checkIsIVRCampaignActive(_0x56637e){return function(){if(!utils[_0x6557('0x78')](_0x56637e)){_0x56637e[_0x6557('0x68')]=utils['CAMPAIGN_STATUS'][_0x6557('0x79')];throw _0x56637e['name']+_0x6557('0x7a');}};}function emitCampaignSummary(_0x45f483){if(utils['isIVRCampaign'](_0x45f483)){emit(util[_0x6557('0x3f')](_0x6557('0x7b'),_0x45f483[_0x6557('0x41')]),_0x6557('0x7c'),_0x45f483);}}function loggerCatchQueueSummary(_0x192eb3,_0x28eb5c){return function(_0x11129e){clearPredictiveAttributes(_0x28eb5c);emitCampaignSummary(_0x28eb5c);loggerSyncQueueSummary[_0x6557('0x5e')](_0x192eb3,util['inspect'](_0x11129e,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0xbe12a0){if(_0xbe12a0[_0x6557('0x7d')]){if(_0xbe12a0[_0x6557('0x7e')]===0x0){_0xbe12a0[_0x6557('0x7d')]=![];_0xbe12a0[_0x6557('0x68')]=utils['CAMPAIGN_STATUS']['INACTIVE'];loggerSyncQueueSummary[_0x6557('0x5e')](_0x6557('0x7f'),_0xbe12a0[_0x6557('0x41')],_0x6557('0x80'));}else{_0xbe12a0[_0x6557('0x68')]=utils[_0x6557('0x69')][_0x6557('0x81')];loggerSyncQueueSummary['debug'](_0x6557('0x7f'),_0xbe12a0['name'],_0x6557('0x82'));}emitCampaignSummary(_0xbe12a0);}}function myreject(_0x4728f5){return function(_0x4b24a2){return _0x4728f5(msgResponse(_0x6557('0x83'),_0x6557('0x84'),JSON['stringify'](_0x4b24a2)));};}Dialer[_0x6557('0x16')]['isTrunkReachable']=function(_0x362d99){return!_[_0x6557('0x3c')](_0x362d99)&&_0x362d99&&!_[_0x6557('0x3c')](_0x362d99['name'])&&!_[_0x6557('0x3c')](_0x362d99[_0x6557('0x85')])&&_0x362d99['active']&&(this[_0x6557('0x1e')][util['format'](_0x6557('0x86'),_0x362d99['name'])]['status']===_0x6557('0x87')||this[_0x6557('0x1e')][util['format'](_0x6557('0x86'),_0x362d99['name'])][_0x6557('0x88')]===_0x6557('0x89'));};Dialer[_0x6557('0x16')][_0x6557('0x8a')]=function(_0x7f3df1){var _0x111300=this;return function(){if(!_0x111300['isTrunkReachable'](_0x7f3df1[_0x6557('0x8b')])){if(!_0x111300[_0x6557('0x8c')](_0x7f3df1[_0x6557('0x8d')])){_0x7f3df1[_0x6557('0x68')]=utils[_0x6557('0x69')][_0x6557('0x8e')];throw _0x7f3df1[_0x6557('0x41')]+_0x6557('0x8f');}}};};Dialer[_0x6557('0x16')][_0x6557('0x90')]=function(_0x472c4b,_0x5832a1,_0x130880,_0x2af083){var _0x6a267a=this;return function(){var _0x54a9bb=!![];return _0x6a267a[_0x6557('0x91')](_0x472c4b,_0x5832a1,_0x130880,_0x2af083,_0x54a9bb);};};Dialer[_0x6557('0x16')][_0x6557('0x92')]=function(_0x125ee5,_0x715c9,_0x2821e2,_0x1e60cf){var _0x5cf8c8=this;return function(){var _0x2959b8=![];return _0x5cf8c8['ifTimeIvr'](_0x125ee5[_0x6557('0x77')],_0x715c9,_0x2821e2,_0x1e60cf,_0x2959b8);};};Dialer[_0x6557('0x16')]['ifTimeIvr']=function(_0x1572e6,_0x27b778,_0x28e5db,_0x445657,_0x428100){var _0x3e57d4=[];return new Promise(function(_0xe4d78e,_0x1950cd){if(!isNotNull(_0x1572e6)){_0x445657[_0x6557('0x68')]=utils[_0x6557('0x69')][_0x6557('0x75')];return _0x1950cd(msgResponse(_0x6557('0x93'),'Failure',_0x28e5db+_0x6557('0x94')));}if(_[_0x6557('0x43')](_0x1572e6)){_0x445657[_0x6557('0x68')]=utils[_0x6557('0x69')][_0x6557('0x95')];return _0x1950cd(msgResponse(_0x6557('0x93'),_0x6557('0x96'),_0x28e5db+_0x6557('0x97')));}if(_0x27b778&&_[_0x6557('0x3c')](config[_0x6557('0x98')][_0x27b778])){_0x445657[_0x6557('0x68')]=utils[_0x6557('0x69')][_0x6557('0x99')];return _0x1950cd(msgResponse(_0x6557('0x93'),'Failure',_0x28e5db+_0x6557('0x9a')+_0x27b778));}if(_[_0x6557('0x9b')](_0x1572e6)){for(var _0x2c863e=0x0;_0x2c863e<_0x1572e6[_0x6557('0x9c')];_0x2c863e+=0x1){_0x3e57d4['push'](ami[_0x6557('0x9d')]({'action':_0x6557('0x9e'),'command':util[_0x6557('0x3f')]('iftime\x20%s,%s',_0x1572e6[_0x2c863e]['interval'],!_[_0x6557('0x3c')](config[_0x6557('0x98')][_0x27b778])?_0x27b778:'')})[_0x6557('0x3a')](function(_0x3cf6a8){return _0x3cf6a8[_0x6557('0x9f')][_0x6557('0xa0')]('true')>=0x0;})[_0x6557('0xa1')](myreject(_0x1950cd)));}}else{_0x3e57d4['push'](ami['Action']({'action':_0x6557('0x9e'),'command':util[_0x6557('0x3f')]('iftime\x20%s,%s',_0x1572e6,!_[_0x6557('0x3c')](config['timezones'][_0x27b778])?_0x27b778:'')})[_0x6557('0x3a')](function(_0x700e81){return _0x700e81['content'][_0x6557('0xa0')](_0x6557('0xa2'))>=0x0;})['catch'](myreject(_0x1950cd)));}Promise[_0x6557('0xa3')](_0x3e57d4)[_0x6557('0x3a')](function(_0x12b837){var _0x2da4ae=_[_0x6557('0xa4')](_0x12b837);if(_0x2da4ae){return _0xe4d78e(_0x2da4ae);}else{_0x445657[_0x6557('0x68')]=_0x428100?utils[_0x6557('0x69')][_0x6557('0xa5')]:utils[_0x6557('0x69')][_0x6557('0xa6')];return _0x1950cd(msgResponse(_0x6557('0xa7'),'Failure',_0x6557('0xa8')+_0x428100+'\x20'+_0x28e5db+'\x20Interval\x20is\x20overtime:\x20'+util[_0x6557('0x66')](_0x1572e6,{'showHidden':![],'depth':null})+_0x6557('0xa9')+_0x27b778));}})[_0x6557('0xa1')](function(_0x25b796){return _0x1950cd(msgResponse('ifTime',_0x6557('0x96'),JSON[_0x6557('0x72')](_0x25b796)));});});};Dialer[_0x6557('0x16')][_0x6557('0xaa')]=function(){var _0x4e99f6=this;return cmHopper['resetActiveCalls']({'active':![]},{'where':{'active':!![]}})[_0x6557('0x3a')](function(){setInterval(function(){_0x4e99f6[_0x6557('0xab')]();},0x3e8);});};Dialer[_0x6557('0x16')][_0x6557('0xab')]=function(){var _0x1b5f94=this;var _0x5c019d;for(var _0x3a0dce in this[_0x6557('0x1c')]){if(typeof this[_0x6557('0x1c')][_0x3a0dce]!==_0x6557('0xac')){_0x5c019d=this['campaigns'][_0x3a0dce];if(utils[_0x6557('0xad')](_0x5c019d)&&utils[_0x6557('0x78')](_0x5c019d)){_0x5c019d[_0x6557('0x7d')]=!![];Promise[_0x6557('0xae')]()[_0x6557('0x3a')](checkIsIVRCampaignActive(_0x5c019d))[_0x6557('0x3a')](checkInterval(_0x5c019d))[_0x6557('0x3a')](_0x1b5f94['checkIsTrunkReachable'](_0x5c019d))[_0x6557('0x3a')](_0x1b5f94[_0x6557('0x90')](_0x5c019d['dialGlobalInterval'],_0x5c019d['dialTimezone'],_0x5c019d[_0x6557('0x41')],_0x5c019d))[_0x6557('0x3a')](_0x1b5f94[_0x6557('0x92')](_0x5c019d[_0x6557('0x74')],_0x5c019d[_0x6557('0xaf')],_0x5c019d['name'],_0x5c019d))['then'](_0x1b5f94[_0x6557('0xb0')](_0x5c019d))['catch'](loggerCatchQueueSummary(_0x6557('0xb1'),_0x5c019d));}else{notSendMessagesCampaign(_0x5c019d);}}}};Dialer[_0x6557('0x16')][_0x6557('0xb2')]=function(_0x378c09){if(_0x378c09['dialMethod']!=='predictive'){clearPredictiveAttributes(_0x378c09);}switch(_0x378c09[_0x6557('0xb3')]){case _0x6557('0xb4'):this[_0x6557('0xb5')](_0x378c09,0x1);break;case _0x6557('0xb6'):this[_0x6557('0xb5')](_0x378c09,_0x378c09[_0x6557('0xb7')]);break;case _0x6557('0xa'):this[_0x6557('0xa')](_0x378c09);break;case'booked':this[_0x6557('0xb5')](_0x378c09,0x1);break;default:logger[_0x6557('0x64')](_0x6557('0xb8'),_0x378c09[_0x6557('0x41')],'method\x20not\x20recognized');}};Dialer[_0x6557('0x16')][_0x6557('0x93')]=function(_0x387b2f,_0x253699){var _0x158af7=_0x387b2f[_0x6557('0xaf')];var _0x23ecd5=_0x253699?_0x387b2f[_0x6557('0xb9')]:_0x387b2f[_0x6557('0x74')][_0x6557('0x77')];logger[_0x6557('0xba')](_0x6557('0xbb'),_0x23ecd5,_0x158af7,_0x387b2f[_0x6557('0x41')],util[_0x6557('0x3f')](_0x6557('0xbc'),_0x387b2f[_0x6557('0x41')],_0x387b2f['id']));var _0x18b00a=null;return Interval[_0x6557('0xbd')](_0x23ecd5,_0x158af7)[_0x6557('0x3a')](function(_0x1aab2e){if(_0x1aab2e===!![]){return _0x1aab2e;}else{_0x387b2f['message']=_0x253699?utils[_0x6557('0x69')][_0x6557('0xa5')]:utils['CAMPAIGN_STATUS'][_0x6557('0xa6')];_0x18b00a=msgResponse(_0x6557('0xa7'),_0x6557('0x96'),_0x6557('0xa8')+_0x253699+'\x20'+_0x387b2f['name']+_0x6557('0xbe')+util[_0x6557('0x66')](_0x23ecd5,{'showHidden':![],'depth':null})+_0x6557('0xa9')+_0x158af7);}if(_0x18b00a!==null){logger[_0x6557('0xba')](_0x6557('0xbf'),_0x18b00a);_0x18b00a[_0x6557('0xc0')]=_0x253699;throw _0x18b00a;}})['catch'](function(_0x792cf0){logger[_0x6557('0x64')](_0x6557('0xc1'),_0x792cf0);throw msgResponse(_0x6557('0x83'),_0x6557('0x84'),util['inspect'](_0x792cf0,{'showHidden':![],'depth':null}));});};Dialer[_0x6557('0x16')][_0x6557('0xc2')]=function(_0x5ab22d){if(this[_0x6557('0x1b')][_0x5ab22d[_0x6557('0xc3')]]){if(this[_0x6557('0x22')][_0x5ab22d[_0x6557('0xc4')]]&&this[_0x6557('0x22')][_0x5ab22d['uniqueid']][_0x6557('0xc5')]!=='ivr'){this[_0x6557('0xc6')](this[_0x6557('0x1b')][_0x5ab22d['queue']]);this['uniqueId'][_0x5ab22d[_0x6557('0xc4')]][_0x6557('0xc7')]=moment()[_0x6557('0x3f')](_0x6557('0xc8'));}}};Dialer[_0x6557('0x16')][_0x6557('0x2d')]=function(_0x58fcab){var _0x39aa37=this['uniqueId'][_0x58fcab['uniqueid']];if(this['voiceQueues'][_0x58fcab[_0x6557('0xc3')]]){if(_0x39aa37&&_0x39aa37[_0x6557('0xc5')]!==_0x6557('0xc9')){delete this[_0x6557('0x22')][_0x58fcab[_0x6557('0xc4')]];this[_0x6557('0x1b')][_0x58fcab[_0x6557('0xc3')]][_0x6557('0xca')]+=0x1;var _0x10b9b4=new AgentComplete(_0x39aa37,_0x58fcab);if(_0x58fcab['reason']==='agent'){_0x10b9b4['agiafterat']=this[_0x6557('0x1b')][_0x58fcab[_0x6557('0xc3')]]['dialQueueProject2']&&this[_0x6557('0x1b')][_0x58fcab['queue']]['dialAgiAfterHangupAgent']?moment()[_0x6557('0x3f')](_0x6557('0xc8')):undefined;}hopperUtils[_0x6557('0xcb')](_0x10b9b4)[_0x6557('0xa1')](loggerCatch(_0x6557('0xcc')));hopperUtils[_0x6557('0xcd')](_0x10b9b4)['catch'](loggerCatch(_0x6557('0xce')));}}};Dialer[_0x6557('0x16')]['syncQueueCallerAbandon']=function(_0x3f16d8){var _0x2bb068=this[_0x6557('0x22')][_0x3f16d8[_0x6557('0xc4')]];var _0x2b73a7=this;var _0x47746d=![];var _0x42cd57;var _0x5a0d2f;if(this[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]]){if(_0x2bb068&&_0x2bb068['type']!=='ivr'){delete this[_0x6557('0x22')][_0x3f16d8[_0x6557('0xc4')]];this[_0x6557('0xc6')](this[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]]);_0x2bb068[_0x6557('0xcf')]=moment()[_0x6557('0x3f')](_0x6557('0xc8'));var _0x3356e1=new QueueCallerAbandon(_0x2bb068,_0x3f16d8);if(utils[_0x6557('0x5d')](_0x2bb068[_0x6557('0xcf')],_0x2bb068[_0x6557('0xd0')])>=_0x2bb068[_0x6557('0xd1')]){this[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0x49')]+=0x1;this['voiceQueues'][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xd2')]+=0x1;this[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xd3')]+=0x1;_0x3356e1[_0x6557('0x6b')]=0xa;_0x3356e1[_0x6557('0x6c')]='Drop';_0x3356e1[_0x6557('0xd4')]=_0x6557('0xd5');_0x3356e1[_0x6557('0xd6')]=this[_0x6557('0x1b')][_0x3f16d8['queue']][_0x6557('0xd7')]?moment()[_0x6557('0x3f')](_0x6557('0xc8')):undefined;_0x3356e1[_0x6557('0xd8')]+=0x1;_0x3356e1[_0x6557('0xd9')]+=0x1;_0x42cd57=this['voiceQueues'][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xda')];_0x5a0d2f=this[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xdb')];hopperUtils[_0x6557('0xdc')](_0x3356e1,_0x3356e1[_0x6557('0x6b')],_0x2bb068['voiceQueue'])[_0x6557('0x3a')](function(_0x32a99f){_0x47746d=_0x32a99f[_0x6557('0xdd')]==0x1;if(_0x3356e1[_0x6557('0xd8')]>=_0x2b73a7[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xde')]){_0x2b73a7['queueCallerAbandonCreateState'](_0x3356e1,_0x32a99f[_0x6557('0xdd')]);}else{hopperUtils[_0x6557('0xdf')]({'active':![],'countdropretry':_0x3356e1[_0x6557('0xd8')],'scheduledat':moment()[_0x6557('0xe0')](_0x2b73a7['voiceQueues'][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xda')],_0x6557('0xe1'))[_0x6557('0x3f')](_0x6557('0xc8')),'ContactId':_0x2bb068[_0x6557('0xe2')],'ListId':_0x2bb068[_0x6557('0xe3')],'VoiceQueueId':_0x2bb068[_0x6557('0xe4')]||undefined,'CampaignId':_0x2bb068['CampaignId']||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0xe5')));var _0x171167=new History(_0x3356e1);_0x171167[_0x6557('0x6b')]=0xa;_0x171167[_0x6557('0x6c')]=_0x6557('0xe6');_0x171167[_0x6557('0x6e')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x171167[_0x6557('0x6d')]=_0x171167[_0x6557('0x6e')];_0x171167[_0x6557('0xe7')]=_0x3356e1[_0x6557('0xe7')];_0x171167[_0x6557('0xe8')]=_0x3356e1[_0x6557('0xe8')];hopperUtils[_0x6557('0xcb')](_0x171167)[_0x6557('0xa1')](loggerCatch('[syncAgentComplete][createHistory][10]'));}})[_0x6557('0x3a')](function(){if(_0x47746d)hopperUtils['swapAdditionalPhones'](_0x3356e1,_0x42cd57,_0x5a0d2f)[_0x6557('0x3a')](function(){return 0x1;});});}else{this['voiceQueues'][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0x4b')]+=0x1;this[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xe9')]+=0x1;_0x3356e1['state']=0xb;_0x3356e1[_0x6557('0x6c')]=_0x6557('0xea');_0x3356e1[_0x6557('0xd4')]=_0x6557('0xeb');_0x3356e1[_0x6557('0xec')]+=0x1;_0x3356e1[_0x6557('0xd9')]+=0x1;_0x42cd57=this[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xed')];_0x5a0d2f=this[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xdb')];hopperUtils['verifyAdditionalPhones'](_0x3356e1,_0x3356e1[_0x6557('0x6b')],_0x2bb068[_0x6557('0xee')])['then'](function(_0x565c72){if(_0x3356e1[_0x6557('0xec')]>=_0x2b73a7[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]][_0x6557('0xef')]){_0x2b73a7[_0x6557('0xf0')](_0x3356e1,_0x565c72[_0x6557('0xdd')]);}else{hopperUtils['rescheduleContact']({'active':![],'countabandonedretry':_0x3356e1[_0x6557('0xec')],'scheduledat':moment()[_0x6557('0xe0')](_0x2b73a7[_0x6557('0x1b')][_0x3f16d8[_0x6557('0xc3')]]['dialAbandonedRetryFrequency'],_0x6557('0xe1'))[_0x6557('0x3f')](_0x6557('0xc8')),'ContactId':_0x2bb068[_0x6557('0xe2')],'ListId':_0x2bb068['ListId'],'VoiceQueueId':_0x2bb068[_0x6557('0xe4')]||undefined,'CampaignId':_0x2bb068[_0x6557('0xf1')]||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0xf2')));var _0x55b6ea=new History(_0x3356e1);_0x55b6ea[_0x6557('0x6b')]=0xb;_0x55b6ea['statedesc']=_0x6557('0xea');_0x55b6ea[_0x6557('0x6e')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x55b6ea[_0x6557('0x6d')]=_0x55b6ea[_0x6557('0x6e')];_0x55b6ea[_0x6557('0xe7')]=_0x3356e1[_0x6557('0xe7')];_0x55b6ea[_0x6557('0xe8')]=_0x3356e1[_0x6557('0xe8')];hopperUtils['createHistory'](_0x55b6ea)['catch'](loggerCatch(_0x6557('0xf3')));}})[_0x6557('0x3a')](function(){if(_0x47746d)hopperUtils[_0x6557('0xf4')](_0x3356e1,_0x42cd57,_0x5a0d2f)[_0x6557('0x3a')](function(){return 0x1;});});}}}};Dialer[_0x6557('0x16')][_0x6557('0xf5')]=function(_0x9aec04){if(this[_0x6557('0x20')][_0x9aec04[_0x6557('0xc4')]]){this[_0x6557('0x20')][_0x9aec04[_0x6557('0xc4')]]['channel']=_0x9aec04[_0x6557('0xf6')];}if(this[_0x6557('0x22')][_0x9aec04[_0x6557('0xc4')]]){this[_0x6557('0x22')][_0x9aec04[_0x6557('0xc4')]][_0x6557('0xf6')]=_0x9aec04[_0x6557('0xf6')];}};Dialer[_0x6557('0x16')][_0x6557('0xf7')]=function(_0x5cf04e){if(!this['actions'][_0x5cf04e[_0x6557('0xf8')]]){return;}var _0x2e419b=this[_0x6557('0x1b')][this[_0x6557('0x20')][_0x5cf04e[_0x6557('0xf8')]]['queue']][_0x6557('0xf9')]||_0x6557('0xfa');if(_0x2e419b===_0x6557('0xfb')){if(this[_0x6557('0x20')][_0x5cf04e[_0x6557('0xf8')]]&&_[_0x6557('0xfc')](this[_0x6557('0x20')][_0x5cf04e[_0x6557('0xf8')]][_0x6557('0xfd')])&&_0x5cf04e[_0x6557('0x88')]==='1'&&_0x5cf04e[_0x6557('0xfe')]==='0'){if(this[_0x6557('0x1d')][_0x5cf04e[_0x6557('0xff')]]){if(!this[_0x6557('0x1d')][_0x5cf04e[_0x6557('0xff')]]['locked']){this[_0x6557('0x1d')][_0x5cf04e[_0x6557('0xff')]]['locked']=!![];this[_0x6557('0x20')][_0x5cf04e[_0x6557('0xf8')]][_0x6557('0xfd')]=!![];this[_0x6557('0x20')][_0x5cf04e[_0x6557('0xf8')]]['stateinterface']=_0x5cf04e[_0x6557('0xff')];}}}}else if(_0x2e419b===_0x6557('0xfa')){if(this[_0x6557('0x20')][_0x5cf04e['actionid']]){if(this[_0x6557('0x1d')][_0x5cf04e[_0x6557('0xff')]]){this[_0x6557('0x20')][_0x5cf04e[_0x6557('0xf8')]]['stateinterface']=_0x5cf04e[_0x6557('0xff')];if(_[_0x6557('0xfc')](this[_0x6557('0x25')][this['actions'][_0x5cf04e[_0x6557('0xf8')]][_0x6557('0xc3')]])){this['queueBooked'][this[_0x6557('0x20')][_0x5cf04e[_0x6557('0xf8')]]['queue']]=[];}this[_0x6557('0x25')][this[_0x6557('0x20')][_0x5cf04e['actionid']][_0x6557('0xc3')]][_0x6557('0x100')](_['merge'](_[_0x6557('0x73')](this[_0x6557('0x20')][_0x5cf04e['actionid']],[_0x6557('0x101'),_0x6557('0xff')]),{'status':_0x5cf04e[_0x6557('0x88')],'paused':_0x5cf04e[_0x6557('0xfe')]}));}}}};Dialer['prototype'][_0x6557('0x37')]=function(_0x196bbe){if(!this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]]){return;}var _0x5539b4=this;var _0x2ac8eb=this[_0x6557('0x1b')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]];var _0x178b01=_0x2ac8eb[_0x6557('0xf9')]||'rrmemory';if(_0x178b01===_0x6557('0xfb')){if(this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]]&&this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xff')]){this[_0x6557('0x1a')][_0x6557('0x102')](this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0x101')],this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xff')])['catch'](function(_0x2eb130){logger['error'](_0x6557('0x103'),util['inspect'](_0x2eb130,{'showHidden':![],'depth':null}));})['finally'](function(){_0x5539b4[_0x6557('0xc6')](_0x5539b4['voiceQueues'][_0x5539b4[_0x6557('0x20')][_0x196bbe['actionid']][_0x6557('0xc3')]]);_0x5539b4[_0x6557('0x1d')][_0x5539b4['actions'][_0x196bbe['actionid']][_0x6557('0xff')]][_0x6557('0xfd')]=![];delete _0x5539b4[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]];unlockQueueStatus(_0x2ac8eb);});}else{this[_0x6557('0xc6')](this[_0x6557('0x1b')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]]);hopperUtils['rescheduleContact']({'active':![],'ContactId':this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xe2')],'ListId':this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]]['ListId'],'VoiceQueueId':this[_0x6557('0x20')][_0x196bbe['actionid']][_0x6557('0xe4')]||undefined,'CampaignId':this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xf1')]||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x104')));delete this['actions'][_0x196bbe[_0x6557('0xf8')]];unlockQueueStatus(_0x2ac8eb);}}else if(_0x178b01===_0x6557('0xfa')){var _0x247e9c;if(this[_0x6557('0x20')][_0x196bbe['actionid']]&&!_[_0x6557('0x43')](this[_0x6557('0x25')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]])){if(this['queueBookedRR'][_0x5539b4[_0x6557('0x20')][_0x196bbe['actionid']][_0x6557('0xc3')]]){this['queueBookedRR'][_0x5539b4[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]]['queue']]=this[_0x6557('0x105')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]]['queue']]?this[_0x6557('0x105')][this['actions'][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]]:this[_0x6557('0x25')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]]?this[_0x6557('0x25')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]]['queue']]['_rr']||0x0:0x0;}this[_0x6557('0x25')][this['actions'][_0x196bbe[_0x6557('0xf8')]]['queue']][_0x6557('0x106')]=this[_0x6557('0x105')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]]['queue']];for(var _0x204134=0x0;_0x204134<this[_0x6557('0x25')][this['actions'][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]]['length'];_0x204134+=0x1){_0x247e9c=rr(this[_0x6557('0x25')][this[_0x6557('0x20')][_0x196bbe['actionid']]['queue']]);this['queueBookedRR'][_0x5539b4[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]]['queue']]=this[_0x6557('0x25')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]][_0x6557('0x106')];if(_0x247e9c[_0x6557('0x88')]==='1'&&_0x247e9c['paused']==='0'){break;}}if(!_['isNil'](_0x247e9c)){this[_0x6557('0x1d')][_0x247e9c['stateinterface']]['unlockRR']=_[_0x6557('0x3c')](this[_0x6557('0x1d')][_0x247e9c['stateinterface']][_0x6557('0x107')])?!![]:this[_0x6557('0x1d')][_0x247e9c['stateinterface']][_0x6557('0x107')];}loggerBooked[_0x6557('0x46')](_0x6557('0x108'),_0x196bbe[_0x6557('0xf8')],_0x6557('0x109'),JSON[_0x6557('0x72')](_[_0x6557('0x73')](this[_0x6557('0x1d')][_0x247e9c[_0x6557('0xff')]],[_0x6557('0x41'),_0x6557('0x107')])),_0x6557('0x10a'),JSON['stringify'](_0x247e9c[_0x6557('0x101')]));if(!_[_0x6557('0xfc')](_0x247e9c)&&_0x247e9c['status']==='1'&&_0x247e9c[_0x6557('0xfe')]==='0'&&this['agents'][_0x247e9c[_0x6557('0xff')]][_0x6557('0x107')]){this[_0x6557('0x1d')][_0x247e9c['stateinterface']]['unlockRR']=![];this[_0x6557('0x25')][_0x5539b4['actions'][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]]=[];this['preview']['run'](_0x247e9c[_0x6557('0x101')],_0x247e9c[_0x6557('0xff')])[_0x6557('0xa1')](function(_0x218b51){logger[_0x6557('0x64')]('[Catch][Preview][syncQueueStatusComplete]',util[_0x6557('0x66')](_0x218b51,{'showHidden':![],'depth':null}));})[_0x6557('0x19')](function(){_0x5539b4[_0x6557('0xc6')](_0x5539b4[_0x6557('0x1b')][_0x5539b4[_0x6557('0x20')][_0x196bbe['actionid']]['queue']]);setTimeout(function(){_0x5539b4[_0x6557('0x1d')][_0x247e9c[_0x6557('0xff')]]['unlockRR']=!![];loggerBooked[_0x6557('0x46')](_0x6557('0x10b'),_0x196bbe[_0x6557('0xf8')],_0x6557('0x109'),JSON[_0x6557('0x72')](_['pick'](_0x5539b4['agents'][_0x247e9c[_0x6557('0xff')]],[_0x6557('0x41'),_0x6557('0x107')])),_0x6557('0x10a'),JSON[_0x6557('0x72')](_0x247e9c[_0x6557('0x101')]));},0xc7);delete _0x5539b4[_0x6557('0x20')][_0x196bbe['actionid']];unlockQueueStatus(_0x2ac8eb,_0x196bbe['actionid']);});}else{loggerBooked[_0x6557('0x46')]('[booked][unlock]');this[_0x6557('0xc6')](this[_0x6557('0x1b')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]]['queue']]);hopperUtils[_0x6557('0xdf')]({'active':![],'ContactId':this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xe2')],'ListId':this[_0x6557('0x20')][_0x196bbe['actionid']][_0x6557('0xe3')],'VoiceQueueId':this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xe4')]||undefined,'CampaignId':this[_0x6557('0x20')][_0x196bbe['actionid']][_0x6557('0xf1')]||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x104')));delete this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]];unlockQueueStatus(_0x2ac8eb);}}else{loggerBooked[_0x6557('0x46')]('[booked][unlock2]');this['updateOriginated'](this[_0x6557('0x1b')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]]);hopperUtils[_0x6557('0xdf')]({'active':![],'ContactId':this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xe2')],'ListId':this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xe3')],'VoiceQueueId':this['actions'][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xe4')]||undefined,'CampaignId':this[_0x6557('0x20')][_0x196bbe['actionid']][_0x6557('0xf1')]||undefined})[_0x6557('0xa1')](loggerCatch('[unlock2][syncQueueStatusComplete]'));delete this['actions'][_0x196bbe[_0x6557('0xf8')]];unlockQueueStatus(_0x2ac8eb);}}else{loggerBooked[_0x6557('0x46')]('[booked][unlock3]');this[_0x6557('0xc6')](this[_0x6557('0x1b')][this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xc3')]]);hopperUtils[_0x6557('0xdf')]({'active':![],'ContactId':this[_0x6557('0x20')][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xe2')],'ListId':this[_0x6557('0x20')][_0x196bbe['actionid']][_0x6557('0xe3')],'VoiceQueueId':this['actions'][_0x196bbe['actionid']][_0x6557('0xe4')]||undefined,'CampaignId':this['actions'][_0x196bbe[_0x6557('0xf8')]][_0x6557('0xf1')]||undefined})['catch'](loggerCatch('[unlock3][syncQueueStatusComplete]'));delete this[_0x6557('0x20')][_0x196bbe['actionid']];unlockQueueStatus(_0x2ac8eb);}};Dialer[_0x6557('0x16')][_0x6557('0x2b')]=function(_0x47c9b3){var _0xeea6b4=this['actions'][_0x47c9b3['actionid']];if(_0xeea6b4){delete this[_0x6557('0x20')][_0x47c9b3[_0x6557('0xf8')]];_0xeea6b4['responsetime']=moment()[_0x6557('0x3f')](_0x6557('0xc8'));var _0x407402=_0xeea6b4[_0x6557('0xc5')]===_0x6557('0xc9')?this[_0x6557('0x1c')][_0xeea6b4['queue']]:this['voiceQueues'][_0xeea6b4[_0x6557('0x10c')]()];if(_0x47c9b3['response']!==_0x6557('0x10d')){this[_0x6557('0xc6')](_0x407402);return this[_0x6557('0x10e')](_0xeea6b4,_0x407402,_0x47c9b3)[_0x6557('0xa1')](loggerCatch('[callProgressDetecting]\x20'));}this['uniqueId'][_0x47c9b3[_0x6557('0xc4')]]=_0xeea6b4;}};Dialer['prototype'][_0x6557('0x34')]=function(_0xf34702){var _0x5578e2=this;var _0x2264a1=this[_0x6557('0x22')][_0xf34702[_0x6557('0xc4')]];var _0x32757c;if(!_[_0x6557('0xfc')](_0xf34702)&&!_['isNil'](_0xf34702[_0x6557('0x10f')])&&!_[_0x6557('0xfc')](_0xf34702['variable'][_0x6557('0x110')])&&_0xf34702[_0x6557('0x111')]==='xcally-motion-dialer'&&_0x2264a1){if(_0x2264a1[_0x6557('0xc5')]!=='ivr'&&this['voiceQueues'][_0x2264a1[_0x6557('0xc3')]][_0x6557('0x112')]&&_0xf34702['value']===_0x6557('0x113')){delete this['uniqueId'][_0xf34702['uniqueid']];this['updateOriginated'](this['voiceQueues'][_0x2264a1[_0x6557('0xc3')]]);this[_0x6557('0x1b')][_0x2264a1[_0x6557('0xc3')]][_0x6557('0xca')]+=0x1;this[_0x6557('0x1b')][_0x2264a1['queue']][_0x6557('0x114')]+=0x1;_0x32757c=new Hangup(_0x2264a1,_0xf34702);_0x32757c[_0x6557('0x6b')]=0x12;_0x32757c[_0x6557('0x6c')]=_0x6557('0x115');_0x32757c[_0x6557('0x116')]=_0x6557('0x117');ami[_0x6557('0x3d')](_0x6557('0x118'),ut[_0x6557('0x119')](_0x32757c,_0x6557('0x11a')));this[_0x6557('0x11b')](_0x32757c,'[syncHangupInAMD][createHistory]',_0x6557('0x11c'));}if(_0x2264a1[_0x6557('0xc5')]!==_0x6557('0xc9')&&this[_0x6557('0x1b')][_0x2264a1[_0x6557('0xc3')]][_0x6557('0x112')]&&_0xf34702[_0x6557('0x11d')]==='MACHINE'){return new Promise(function(_0x1c1a6e,_0xcabdfd){delete _0x5578e2[_0x6557('0x22')][_0xf34702[_0x6557('0xc4')]];_0x5578e2['updateOriginated'](_0x5578e2[_0x6557('0x1b')][_0x2264a1[_0x6557('0xc3')]]);_0x5578e2[_0x6557('0x1b')][_0x2264a1[_0x6557('0xc3')]][_0x6557('0xca')]+=0x1;_0x5578e2[_0x6557('0x1b')][_0x2264a1[_0x6557('0xc3')]]['outboundAnswerAgiCallsDay']+=0x1;var _0x236deb=_0x5578e2[_0x6557('0x1b')][_0x2264a1[_0x6557('0xc3')]];var _0x2a0eee=new Hangup(_0x2264a1,_0xf34702);_0x2a0eee[_0x6557('0x6b')]=0x13;_0x2a0eee['statedesc']=_0x6557('0x11e');_0x2a0eee['membername']=_0x6557('0x117');_0x2a0eee[_0x6557('0x11f')]+=0x1;_0x2a0eee[_0x6557('0xd9')]+=0x1;_0x2a0eee[_0x6557('0x11a')]=!![];ami[_0x6557('0x3d')](_0x6557('0x118'),ut[_0x6557('0x119')](_0x2a0eee,_0x6557('0x11a')));hopperUtils[_0x6557('0xcb')](_0x2a0eee)[_0x6557('0xa1')](loggerCatch(_0x6557('0x120')));if(_0x2a0eee[_0x6557('0x121')]+_0x2a0eee['countcongestionretry']+_0x2a0eee['countnoanswerretry']+_0x2a0eee[_0x6557('0x122')]+_0x2a0eee[_0x6557('0xd8')]+_0x2a0eee['countabandonedretry']+_0x2a0eee[_0x6557('0x11f')]+_0x2a0eee[_0x6557('0x123')]>=_0x236deb[_0x6557('0x124')]){_0x5578e2[_0x6557('0x125')](_0x2a0eee,_0x1c1a6e,_0xcabdfd,'reason19\x20machine....');}else{if(_0x2a0eee['countmachineretry']>=_0x236deb[_0x6557('0x126')]){_0x5578e2[_0x6557('0x127')](_0x2a0eee,_0x1c1a6e,_0xcabdfd,_0x6557('0x128'));}else{hopperUtils[_0x6557('0xdf')]({'active':![],'countmachineretry':_0x2a0eee[_0x6557('0x11f')],'scheduledat':moment()[_0x6557('0xe0')](_0x236deb[_0x6557('0x129')],'minutes')['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x2a0eee['ContactId'],'ListId':_0x2a0eee[_0x6557('0xe3')],'VoiceQueueId':_0x2a0eee[_0x6557('0xe4')]||undefined,'CampaignId':_0x2a0eee[_0x6557('0xf1')]||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x12a')));_0x1c1a6e({'reschedule':0x1});}}});}if(_0x2264a1[_0x6557('0xc5')]===_0x6557('0xc9')&&this['campaigns'][_0x2264a1[_0x6557('0xc3')]]['dialAMDActive']&&_0xf34702[_0x6557('0x11d')]===_0x6557('0x113')){delete this['uniqueId'][_0xf34702['uniqueid']];this['updateOriginated'](this['campaigns'][_0x2264a1['queue']]);_0x32757c=new Hangup(_0x2264a1,_0xf34702);_0x32757c[_0x6557('0x6b')]=0x12;_0x32757c[_0x6557('0x6c')]=_0x6557('0x115');_0x32757c['membername']=_0x6557('0x117');ami['emit'](_0x6557('0x118'),ut[_0x6557('0x119')](_0x32757c,'amd'));this[_0x6557('0x11b')](_0x32757c,_0x6557('0x12b'),'[syncHangupInAMDIvr]');}if(_0x2264a1[_0x6557('0xc5')]==='ivr'&&this[_0x6557('0x1c')][_0x2264a1[_0x6557('0xc3')]][_0x6557('0x112')]&&_0xf34702[_0x6557('0x11d')]===_0x6557('0x12c')){return new Promise(function(_0x46f192,_0x4606ea){delete _0x5578e2[_0x6557('0x22')][_0xf34702[_0x6557('0xc4')]];_0x5578e2[_0x6557('0xc6')](_0x5578e2['campaigns'][_0x2264a1[_0x6557('0xc3')]]);_0x5578e2['campaigns'][_0x2264a1[_0x6557('0xc3')]][_0x6557('0xca')]+=0x1;_0x5578e2['campaigns'][_0x2264a1[_0x6557('0xc3')]][_0x6557('0x114')]+=0x1;var _0x48247e=_0x5578e2[_0x6557('0x1c')][_0x2264a1['queue']];var _0x3beb03=new Hangup(_0x2264a1,_0xf34702);_0x3beb03[_0x6557('0x6b')]=0x13;_0x3beb03[_0x6557('0x6c')]=_0x6557('0x11e');_0x3beb03[_0x6557('0x116')]=_0x6557('0x117');_0x3beb03[_0x6557('0x11f')]+=0x1;_0x3beb03['countglobal']+=0x1;_0x3beb03[_0x6557('0x11a')]=!![];ami['emit'](_0x6557('0x118'),ut['buildObj'](_0x3beb03,_0x6557('0x11a')));hopperUtils[_0x6557('0xcb')](_0x3beb03)[_0x6557('0xa1')](loggerCatch(_0x6557('0x120')));if(_0x3beb03[_0x6557('0x121')]+_0x3beb03['countcongestionretry']+_0x3beb03['countnoanswerretry']+_0x3beb03[_0x6557('0x122')]+_0x3beb03[_0x6557('0xd8')]+_0x3beb03['countabandonedretry']+_0x3beb03['countmachineretry']+_0x3beb03[_0x6557('0x123')]>=_0x48247e[_0x6557('0x124')]){_0x5578e2[_0x6557('0x125')](_0x3beb03,_0x46f192,_0x4606ea,'reason19\x20machine....');}else{if(_0x3beb03[_0x6557('0x11f')]>=_0x48247e[_0x6557('0x126')]){_0x5578e2[_0x6557('0x127')](_0x3beb03,_0x46f192,_0x4606ea,'reason\x2019\x20machine....');}else{hopperUtils[_0x6557('0xdf')]({'active':![],'countmachineretry':_0x3beb03['countmachineretry'],'scheduledat':moment()[_0x6557('0xe0')](_0x48247e[_0x6557('0x129')],_0x6557('0xe1'))[_0x6557('0x3f')](_0x6557('0xc8')),'ContactId':_0x3beb03[_0x6557('0xe2')],'ListId':_0x3beb03['ListId'],'VoiceQueueId':_0x3beb03['VoiceQueueId']||undefined,'CampaignId':_0x3beb03[_0x6557('0xf1')]||undefined})['catch'](loggerCatch('[rescheduleContact][Machine]'));_0x46f192({'reschedule':0x1});}}});}}};Dialer[_0x6557('0x16')][_0x6557('0x31')]=function(_0x1ea443){var _0x303244=this[_0x6557('0x22')][_0x1ea443['uniqueid']];var _0x201565;if(_0x303244&&_0x303244[_0x6557('0xc5')]==='ivr'){delete this[_0x6557('0x22')][_0x1ea443[_0x6557('0xc4')]];this[_0x6557('0xc6')](this[_0x6557('0x1c')][_0x303244[_0x6557('0xc3')]]);this[_0x6557('0x1c')][_0x303244['queue']][_0x6557('0x12d')]+=0x1;_0x201565=new Hangup(_0x303244,_0x1ea443);hopperUtils['createHistory'](_0x201565)[_0x6557('0xa1')](loggerCatch(_0x6557('0x12e')));hopperUtils['moveContactManagedDialer'](_0x201565)[_0x6557('0xa1')](loggerCatch(_0x6557('0x12f')));}if(_0x303244&&_0x303244[_0x6557('0xc5')]!==_0x6557('0xc9')&&isNotNull(this[_0x6557('0x1b')][_0x303244['queue']][_0x6557('0x130')])){delete this[_0x6557('0x22')][_0x1ea443[_0x6557('0xc4')]];this[_0x6557('0xc6')](this['voiceQueues'][_0x303244[_0x6557('0xc3')]]);this['voiceQueues'][_0x303244[_0x6557('0xc3')]][_0x6557('0xca')]+=0x1;this[_0x6557('0x1b')][_0x303244[_0x6557('0xc3')]][_0x6557('0x114')]+=0x1;_0x201565=new Hangup(_0x303244,_0x1ea443);_0x201565[_0x6557('0x6b')]=0x10;_0x201565['statedesc']=_0x6557('0x131');_0x201565[_0x6557('0x116')]=_0x6557('0x132');hopperUtils[_0x6557('0xcb')](_0x201565)[_0x6557('0xa1')](loggerCatch(_0x6557('0x12e')));hopperUtils[_0x6557('0xcd')](_0x201565)[_0x6557('0xa1')](loggerCatch(_0x6557('0x12f')));}if(_0x303244&&_0x303244[_0x6557('0xc5')]!==_0x6557('0xc9')&&!isNotNull(this[_0x6557('0x1b')][_0x303244[_0x6557('0xc3')]][_0x6557('0x130')])){if(_0x1ea443[_0x6557('0x133')]===_0x6557('0x134')){delete this['uniqueId'][_0x1ea443[_0x6557('0xc4')]];this[_0x6557('0x1b')][_0x303244['queue']]['outboundAnswerCallsDay']+=0x1;const _0x2c7deb=new AgentComplete(_0x303244,_0x1ea443);_0x2c7deb['CampaignId']=this[_0x6557('0x1b')][_0x303244[_0x6557('0xc3')]]['id'];hopperUtils['createHistory'](_0x2c7deb)[_0x6557('0xa1')](loggerCatch(_0x6557('0xcc')));hopperUtils[_0x6557('0xcd')](_0x2c7deb)[_0x6557('0xa1')](loggerCatch('[syncAgentComplete]'));}else{delete this[_0x6557('0x22')][_0x1ea443[_0x6557('0xc4')]];this['updateOriginated'](this['voiceQueues'][_0x303244[_0x6557('0xc3')]]);this[_0x6557('0x1b')][_0x303244[_0x6557('0xc3')]]['outboundUnknownCallsDay']+=0x1;_0x201565=new Hangup(_0x303244,_0x1ea443);_0x201565['state']=0xc;_0x201565['statedesc']=_0x1ea443[_0x6557('0x133')];_0x201565['membername']=_0x6557('0x135');hopperUtils['createHistory'](_0x201565)[_0x6557('0xa1')](loggerCatch(_0x6557('0x12e')));hopperUtils[_0x6557('0xcd')](_0x201565)[_0x6557('0xa1')](loggerCatch(_0x6557('0x12f')));}}};Dialer[_0x6557('0x16')]['syncQueueSummary']=function(_0x132295){var _0x14d82c=this;if(!_0x14d82c[_0x6557('0x136')][_0x132295[_0x6557('0x41')]]){_0x14d82c[_0x6557('0x136')][_0x132295['name']]={'running':![]};}else if(_0x14d82c[_0x6557('0x136')][_0x132295[_0x6557('0x41')]][_0x6557('0x137')]===!![]){return;}else if(_0x14d82c['queuesSummary'][_0x132295[_0x6557('0x41')]]['running']===![]){_0x14d82c[_0x6557('0x136')][_0x132295[_0x6557('0x41')]][_0x6557('0x137')]=!![];}var _0x5aed7f=_0x14d82c[_0x6557('0x1b')][_0x132295['name']];var _0xc61e34=_0x5aed7f[_0x6557('0x68')]!==utils[_0x6557('0x69')][_0x6557('0x79')];var _0x545a68=utils['isPreviewCampaign'](_0x5aed7f);_0x5aed7f[_0x6557('0x138')]=utils[_0x6557('0x139')](_0x5aed7f,_0x14d82c['trunks']);Promise[_0x6557('0xae')]()[_0x6557('0x3a')](function(){if(_0x5aed7f['statusMessage']===utils[_0x6557('0x69')][_0x6557('0x79')]){if(_0xc61e34){clearPredictiveAttributes(_0x5aed7f);_0x132295[_0x6557('0x60')]=undefined;_0x132295[_0x6557('0x23')]=undefined;}if(_0x5aed7f[_0x6557('0x138')]===utils['CAMPAIGN_STATUS'][_0x6557('0x79')]){_0x132295['available']=0x0;_0x132295[_0x6557('0xfe')]=0x0;_0x132295[_0x6557('0x13a')]=0x0;_0x132295['talking']=0x0;_0x132295[_0x6557('0x13b')]=0x0;}}else if(_0x5aed7f['statusMessage']===utils[_0x6557('0x69')]['ACTIVE']&&!_0x545a68){return _0x14d82c[_0x6557('0x93')](_0x5aed7f,!![])[_0x6557('0x3a')](function(){return _0x14d82c['ifTime'](_0x5aed7f,![]);})['then'](function(){return _0x14d82c['checkDialMethod'](_0x5aed7f);})['catch'](function(_0x43ffc6){loggerSyncQueueSummary['debug']('[syncQueueSummary]',util['inspect'](_0x43ffc6,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x5aed7f);});}else{clearPredictiveAttributes(_0x5aed7f);}})[_0x6557('0x3a')](function(){var _0x105ad5=_0x132295[_0x6557('0x13c')](_0x5aed7f);if(_0x105ad5||_0x5aed7f[_0x6557('0x13d')]){_0x5aed7f['queueSummaryCountersUpdated']=![];_0x132295[_0x6557('0x13e')](_0x5aed7f);Object['assign'](_0x5aed7f,_0x132295);emitOutboundVoiceQueueSummary(_0x132295);}_0x14d82c[_0x6557('0x136')][_0x5aed7f[_0x6557('0x41')]][_0x6557('0x137')]=![];})[_0x6557('0xa1')](function(_0x4064c3){logger[_0x6557('0x64')](_0x6557('0x13f'),util[_0x6557('0x66')](_0x4064c3,{'showHidden':![],'depth':null}));_0x14d82c['queuesSummary'][_0x5aed7f[_0x6557('0x41')]]['running']=![];});};Dialer[_0x6557('0x16')][_0x6557('0x2f')]=_[_0x6557('0x140')](function(){var _0x3608db=_[_0x6557('0x141')](this[_0x6557('0x1b')],function(_0x3bf553){return _0x3bf553[_0x6557('0x142')];});var _0x440c9f=_[_0x6557('0x141')](this[_0x6557('0x1d')],function(_0x5b294b){return _0x5b294b['online']&&_0x5b294b[_0x6557('0x88')]===_0x6557('0x87');});if(_0x3608db[_0x6557('0x9c')]>0x0&&_0x440c9f[_0x6557('0x9c')]>0x0){return Promise['resolve']()[_0x6557('0x3a')](cmHopper[_0x6557('0x143')](_['map'](_0x3608db,'id'),previewRecallmeReminderInterval,_[_0x6557('0x144')](_0x440c9f,'id')))[_0x6557('0x3a')](function(_0x278949){for(var _0x29a503=0x0;_0x29a503<_0x278949[_0x6557('0x9c')];_0x29a503++){var _0x242ea1=_0x278949[_0x29a503]['Agent'][_0x6557('0x41')];if(_0x242ea1)io['to'](util[_0x6557('0x3f')](_0x6557('0x145'),_0x242ea1))['emit'](_0x6557('0x146'),{'hopper':_0x278949[_0x29a503]});}})['catch'](function(_0x3bdb94){logger[_0x6557('0x64')](_0x6557('0x147'),_0x3bdb94);});}},0x3c*0x3e8,{'leading':!![]});Dialer['prototype'][_0x6557('0x38')]=function(){var _0x4f32c3=this;setInterval(function(){_0x4f32c3[_0x6557('0x148')](_0x4f32c3[_0x6557('0x22')],_0x6557('0x149'));_0x4f32c3[_0x6557('0x148')](_0x4f32c3['actions'],_0x6557('0x14a'));},0x32c8);};Dialer[_0x6557('0x16')][_0x6557('0x148')]=function(_0x1f184c,_0x376259){var _0x13fb7a=this;for(var _0x4abb80 in _0x1f184c){if(typeof _0x1f184c[_0x4abb80]!==_0x6557('0xac')){this['sequence']['enqueue'](function(){if(!_['isNil'](_0x1f184c[_0x4abb80])){return ami[_0x6557('0x9d')]({'action':_0x6557('0x88'),'channel':_0x1f184c[_0x4abb80][_0x6557('0xf6')]})['catch'](function(_0x5b9253){if(_0x5b9253[_0x6557('0x68')]==='No\x20such\x20channel'){setTimeout(function(){if(_0x1f184c[_0x4abb80]&&_0x1f184c[_0x4abb80][_0x6557('0xc5')]!==_0x6557('0xc9')){_0x13fb7a[_0x6557('0xc6')](_0x13fb7a['voiceQueues'][_0x1f184c[_0x4abb80][_0x6557('0xc3')]]);logger[_0x6557('0x64')]('[Dialer][checkChannel]',_0x376259,_0x4abb80,_0x1f184c[_0x4abb80][_0x6557('0xc3')]);delete _0x1f184c[_0x4abb80];}if(_0x1f184c[_0x4abb80]&&_0x1f184c[_0x4abb80][_0x6557('0xc5')]===_0x6557('0xc9')){_0x13fb7a['updateOriginated'](_0x13fb7a[_0x6557('0x1c')][_0x1f184c[_0x4abb80]['queue']]);logger['error'](_0x6557('0x14b'),_0x376259,_0x4abb80,_0x1f184c[_0x4abb80]['queue']);delete _0x1f184c[_0x4abb80];}},0x2328);}});}});}}};Dialer['prototype'][_0x6557('0x14c')]=function(_0x3a9771){return Promise[_0x6557('0xae')]()[_0x6557('0x3a')](voiceQueueRt['getVoiceQueueRtPauses'](_0x3a9771))[_0x6557('0xa1')](loggerCatch(_0x6557('0x14d')));};Dialer[_0x6557('0x16')][_0x6557('0xc6')]=function(_0x177f8c){if(!_[_0x6557('0x3c')](_0x177f8c)&&_0x177f8c!==null){if(typeof _0x177f8c['originated']!=='undefined'){if(_0x177f8c[_0x6557('0x7e')]>0x0){_0x177f8c[_0x6557('0x7e')]-=0x1;}else{logger[_0x6557('0x64')](_0x6557('0x14e'));}}}else{logger[_0x6557('0x64')](_0x6557('0x14f'));}};Dialer[_0x6557('0x16')][_0x6557('0x150')]=function(_0x42c89a,_0x197ceb){var _0x53d612=this;return function(_0x4ad0b7){_0x53d612[_0x6557('0xc6')](_0x197ceb);logger[_0x6557('0x64')](_0x42c89a,util[_0x6557('0x66')](_0x4ad0b7,{'showHidden':![],'depth':null}));};};Dialer[_0x6557('0x16')][_0x6557('0x151')]=function(_0x411e87,_0x37d35b,_0x54b1b5){var _0x45632b={'state':0x19,'statedesc':_0x6557('0x152')};this[_0x6557('0xc6')](_0x37d35b);this[_0x6557('0x11b')](_[_0x6557('0x5c')](_0x45632b,_[_0x6557('0x73')](_0x54b1b5,[_0x6557('0xe2'),_0x6557('0xe3'),_0x6557('0x153'),_0x6557('0xe4'),'CampaignId'])),'[emptyContact][createHistory]','[emptyContact]');logger[_0x6557('0x64')](_0x411e87);};Dialer['prototype'][_0x6557('0x11b')]=function(_0x3147a5,_0x4e43f5,_0x3c3788){hopperUtils[_0x6557('0xcb')](_0x3147a5)[_0x6557('0xa1')](loggerCatch(_0x4e43f5));hopperUtils[_0x6557('0xcd')](_0x3147a5)['catch'](loggerCatch(_0x3c3788));};Dialer[_0x6557('0x16')][_0x6557('0xf0')]=function(_0x35c7e2,_0x3968b3){hopperUtils['createHistory'](_0x35c7e2)['catch'](loggerCatch('[syncAgentComplete][createHistory]'));if(_0x3968b3==0x0){hopperUtils[_0x6557('0xcd')](_0x35c7e2)[_0x6557('0xa1')](loggerCatch('[syncQueueCallerAbandon]\x20[Drop]'));}};Dialer[_0x6557('0x16')]['checkPreviewRecallReminder']=function(_0x474267){return Promise['resolve']()[_0x6557('0x3a')](cmHopper[_0x6557('0x143')](_0x474267['id'],previewRecallmeReminderInterval))[_0x6557('0x3a')](function(_0x498e8c){for(var _0x5702c6=0x0;_0x5702c6<_0x498e8c[_0x6557('0x9c')];_0x5702c6++){var _0x1293c2=_0x498e8c[_0x5702c6][_0x6557('0x154')]['name'];if(_0x1293c2)io['to'](util[_0x6557('0x3f')](_0x6557('0x145'),_0x1293c2))[_0x6557('0x3d')](_0x6557('0x146'),{'hopper':_0x498e8c[_0x5702c6]});}})[_0x6557('0xa1')](function(){});};Dialer['prototype'][_0x6557('0xb0')]=function(_0x20603e){var _0x3776cf=this;return function(){_0x3776cf[_0x6557('0x155')](_0x20603e);};};Dialer['prototype'][_0x6557('0x156')]=function(_0x21d215,_0x36a285){var _0x465107=this;var _0x41d785=uuid['v4']();this['actions'][_0x41d785]=new Action(_0x21d215,_0x36a285,_0x41d785);return new Promise(function(_0x1654bc,_0x5575d6){if(_[_0x6557('0x3c')](_0x21d215)&&typeof _0x21d215!==_0x6557('0x157')){return _0x5575d6(msgResponse(_0x6557('0x158'),_0x6557('0x96'),'voiceQueue\x20is\x20undefine'));}if(_['isUndefined'](_0x36a285['phone'])||_0x36a285[_0x6557('0x159')]===null){return _0x5575d6(msgResponse('originate','Failure',_0x6557('0x15a')));}var _0xa8d834={'XMD-CALLERID':_0x465107[_0x6557('0x20')][_0x41d785][_0x6557('0x15b')](),'XMD-AGI':_0x21d215['dialQueueProject']?util[_0x6557('0x3f')](_0x6557('0x15c'),ipAgi,_0x21d215[_0x6557('0x130')]):'NONE','XMD-AGIAFTER':_0x21d215[_0x6557('0xd7')]?util[_0x6557('0x3f')](_0x6557('0x15c'),ipAgi,_0x21d215['dialQueueProject2']):_0x6557('0x15d'),'XMD-QUEUE':utils[_0x6557('0x15e')](_0x21d215)?util['format'](_0x6557('0x15f'),_0x21d215['name'],_0x21d215[_0x6557('0x160')]||'',_0x21d215[_0x6557('0x161')]?'c':'',_0x21d215[_0x6557('0xd1')]||0x3):_0x6557('0x15d'),'XMD-CONTACTID':_0x36a285[_0x6557('0xe2')],'XMD-CDRTYPE':_0x6557('0x9'),'CALLERID(all)':_0x465107['actions'][_0x41d785][_0x6557('0x15b')](),'XMD-AMD':_0x21d215[_0x6557('0x112')]?_0x6557('0x162'):'NONE','XMD-DESTINATION':_0x6557('0x163')};if(_0x21d215[_0x6557('0x112')]){_0xa8d834['XMD-AMDINITIALSILENCE']=_0x21d215[_0x6557('0x164')]||0x9c4;_0xa8d834[_0x6557('0x165')]=_0x21d215['dialAMDGreeting']||0x5dc;_0xa8d834['XMD-AMDAFTERGREETINGSILENCE']=_0x21d215[_0x6557('0x166')]||0x320;_0xa8d834['XMD-AMDTOTALANALYSISTIME']=_0x21d215[_0x6557('0x167')]||0x1388;_0xa8d834['XMD-AMDMINWORDLENGTH']=_0x21d215['dialAMDMinWordLength']||0x64;_0xa8d834[_0x6557('0x168')]=_0x21d215[_0x6557('0x169')]||0x32;_0xa8d834[_0x6557('0x16a')]=_0x21d215[_0x6557('0x16b')]||0x3;_0xa8d834[_0x6557('0x16c')]=_0x21d215[_0x6557('0x16d')]||0x100;_0xa8d834[_0x6557('0x16e')]=_0x21d215[_0x6557('0x16f')]||0x1388;}if(utils[_0x6557('0x15e')](_0x21d215)){_0xa8d834['XMD-VOICEQUEUEID']=_0x36a285[_0x6557('0xe4')];}else{_0xa8d834['XMD-CAMPAIGNID']=_0x36a285[_0x6557('0xf1')];}var _0x353c43=utils[_0x6557('0x170')](_0x36a285['Contact']);Object['assign'](_0xa8d834,_0x353c43);var _0x2faf5f=_0x465107[_0x6557('0x8c')](_0x21d215[_0x6557('0x8b')])?utils['getCallerId'](_0x21d215[_0x6557('0x8b')][_0x6557('0x171')],_0x21d215[_0x6557('0x172')],_0x21d215['dialRandomLastDigitCallerIdNumber']>0x0?utils[_0x6557('0x173')](_0x21d215[_0x6557('0x174')],_0x21d215['dialRandomLastDigitCallerIdNumber']):_0x21d215[_0x6557('0x174')]):utils['getCallerId'](_['isNil'](_0x21d215[_0x6557('0x8d')])?_0x21d215[_0x6557('0x8b')][_0x6557('0x171')]:_0x21d215[_0x6557('0x8d')][_0x6557('0x171')],_0x21d215[_0x6557('0x172')],_0x21d215[_0x6557('0x175')]>0x0?utils[_0x6557('0x173')](_0x21d215[_0x6557('0x174')],_0x21d215['dialRandomLastDigitCallerIdNumber']):_0x21d215[_0x6557('0x174')]);if(_0x2faf5f){_0xa8d834[_0x6557('0x176')]=_0x465107['actions'][_0x41d785]['originatecalleridname']=utils[_0x6557('0x177')](_0x2faf5f);_0xa8d834[_0x6557('0x178')]=_0x36a285[_0x6557('0x159')];}_0x21d215[_0x6557('0x179')]=_0xa8d834;return ami[_0x6557('0x9d')]({'actionid':_0x41d785,'action':_0x6557('0x158'),'channel':_0x465107['isTrunkReachable'](_0x21d215[_0x6557('0x8b')])?util[_0x6557('0x3f')](_0x6557('0x17a'),_0x21d215[_0x6557('0x8b')]['name'],isNotNull(_0x21d215[_0x6557('0x17b')])?_0x21d215[_0x6557('0x17b')][_0x6557('0x17c')]()||'':'',_0x21d215['dialCutDigit']>0x0?_0x36a285['phone']['substring'](_0x21d215['dialCutDigit']):_0x36a285[_0x6557('0x159')]):util[_0x6557('0x3f')](_0x6557('0x17a'),_[_0x6557('0xfc')](_0x21d215[_0x6557('0x8d')])?_0x21d215[_0x6557('0x8b')][_0x6557('0x41')]:_0x21d215[_0x6557('0x8d')][_0x6557('0x41')],isNotNull(_0x21d215[_0x6557('0x17b')])?_0x21d215[_0x6557('0x17b')][_0x6557('0x17c')]()||'':'',_0x21d215[_0x6557('0x17d')]>0x0?_0x36a285[_0x6557('0x159')][_0x6557('0x17e')](_0x21d215['dialCutDigit']):_0x36a285[_0x6557('0x159')]),'callerid':_0x2faf5f,'Exten':'xcally-motion-dialer','Context':_0x6557('0x17f'),'Priority':'1','variable':_0xa8d834,'timeout':(_0x21d215[_0x6557('0x180')]||0x1e)*0x3e8,'async':!![],'channelid':_0x41d785})[_0x6557('0x3a')](function(_0x29af51){return _0x1654bc(_0x29af51);})[_0x6557('0xa1')](function(_0x13450e){_0x21d215[_0x6557('0x181')]+=0x1;var _0x3e0e55=new History(_0x465107[_0x6557('0x20')][_0x41d785]);logger[_0x6557('0x64')](util[_0x6557('0x3f')]('[originateError]:\x20%s',JSON['stringify'](_0x13450e)));_0x3e0e55[_0x6557('0x6b')]=0xe;_0x3e0e55[_0x6557('0x6c')]=_0x6557('0x182');_0x3e0e55[_0x6557('0x6e')]=moment()[_0x6557('0x3f')](_0x6557('0xc8'));_0x3e0e55[_0x6557('0x6d')]=_0x3e0e55[_0x6557('0x6e')];hopperUtils[_0x6557('0xcb')](_0x3e0e55)['catch'](loggerCatch(_0x6557('0x183')));_0x465107[_0x6557('0xcd')](_0x3e0e55)[_0x6557('0xa1')](loggerCatch('[originate][error]'))[_0x6557('0x19')](function(){delete _0x465107[_0x6557('0x20')][_0x41d785];return _0x5575d6(msgResponse(_0x6557('0x158'),_0x6557('0x84'),_0x6557('0x184')));});});});};Dialer['prototype'][_0x6557('0x185')]=function(_0x161dd9,_0x390f88,_0x34a2fe){var _0x18528a=new History(_0x390f88);if(_0x18528a['countbusyretry']+_0x18528a[_0x6557('0x186')]+_0x18528a[_0x6557('0x187')]+_0x18528a['countnosuchnumberretry']+_0x18528a[_0x6557('0xd8')]+_0x18528a[_0x6557('0xec')]+_0x18528a['countmachineretry']+_0x18528a[_0x6557('0x123')]>=_0x34a2fe['dialGlobalMaxRetry']-0x1){return!![];}switch(_0x161dd9){case 0x3:if(_0x18528a[_0x6557('0x187')]>=_0x34a2fe[_0x6557('0x188')]-0x1){return!![];}hopperUtils[_0x6557('0xdf')]({'active':![],'countnoanswerretry':_0x18528a[_0x6557('0x187')]+=0x1,'scheduledat':moment()['add'](_0x34a2fe[_0x6557('0x189')],_0x6557('0xe1'))[_0x6557('0x3f')](_0x6557('0xc8')),'ContactId':_0x18528a[_0x6557('0xe2')],'ListId':_0x18528a[_0x6557('0xe3')],'VoiceQueueId':_0x18528a[_0x6557('0xe4')]||undefined,'CampaignId':_0x18528a[_0x6557('0xf1')]||undefined})[_0x6557('0xa1')](loggerCatch('[rescheduleContact][NoAnswer]'));break;case 0x5:if(_0x18528a[_0x6557('0x121')]>=_0x34a2fe[_0x6557('0x18a')]-0x1){return!![];}hopperUtils[_0x6557('0xdf')]({'active':![],'countbusyretry':_0x18528a[_0x6557('0x121')]+=0x1,'scheduledat':moment()[_0x6557('0xe0')](_0x34a2fe['dialBusyRetryFrequency'],_0x6557('0xe1'))[_0x6557('0x3f')](_0x6557('0xc8')),'ContactId':_0x18528a[_0x6557('0xe2')],'ListId':_0x18528a[_0x6557('0xe3')],'VoiceQueueId':_0x18528a['VoiceQueueId']||undefined,'CampaignId':_0x18528a[_0x6557('0xf1')]||undefined})['catch'](loggerCatch(_0x6557('0x18b')));break;case 0x8:if(_0x18528a[_0x6557('0x186')]>=_0x34a2fe[_0x6557('0x18c')]-0x1){return!![];}hopperUtils[_0x6557('0xdf')]({'active':![],'countcongestionretry':_0x18528a[_0x6557('0x186')]+=0x1,'scheduledat':moment()[_0x6557('0xe0')](_0x34a2fe[_0x6557('0x18d')],_0x6557('0xe1'))[_0x6557('0x3f')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x18528a[_0x6557('0xe2')],'ListId':_0x18528a[_0x6557('0xe3')],'VoiceQueueId':_0x18528a[_0x6557('0xe4')]||undefined,'CampaignId':_0x18528a['CampaignId']||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x18e')));break;case 0x0:if(_0x18528a['countnosuchnumberretry']>=_0x34a2fe[_0x6557('0x18f')]-0x1){return!![];}else{hopperUtils[_0x6557('0xdf')]({'active':![],'countnosuchnumberretry':_0x18528a['countnosuchnumberretry']+=0x1,'scheduledat':moment()['add'](_0x34a2fe[_0x6557('0x190')],'minutes')['format'](_0x6557('0xc8')),'ContactId':_0x18528a[_0x6557('0xe2')],'ListId':_0x18528a[_0x6557('0xe3')],'VoiceQueueId':_0x18528a[_0x6557('0xe4')]||undefined,'CampaignId':_0x18528a['CampaignId']||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x191')));}break;case 0xa:if(_0x18528a['countdropretry']>=_0x34a2fe[_0x6557('0xde')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countdropretry':_0x18528a[_0x6557('0xd8')]+=0x1,'scheduledat':moment()[_0x6557('0xe0')](_0x34a2fe['dialDropRetryFrequency'],_0x6557('0xe1'))[_0x6557('0x3f')](_0x6557('0xc8')),'ContactId':_0x18528a[_0x6557('0xe2')],'ListId':_0x18528a[_0x6557('0xe3')],'VoiceQueueId':_0x18528a[_0x6557('0xe4')]||undefined,'CampaignId':_0x18528a['CampaignId']||undefined})['catch'](loggerCatch('[rescheduleContact][Drop]'));break;case 0xb:if(_0x18528a['countabandonedretry']>=_0x34a2fe[_0x6557('0xef')]-0x1){return!![];}hopperUtils[_0x6557('0xdf')]({'active':![],'countabandonedretry':_0x18528a[_0x6557('0xec')]+=0x1,'scheduledat':moment()[_0x6557('0xe0')](_0x34a2fe['dialAbandonedRetryFrequency'],_0x6557('0xe1'))[_0x6557('0x3f')](_0x6557('0xc8')),'ContactId':_0x18528a[_0x6557('0xe2')],'ListId':_0x18528a['ListId'],'VoiceQueueId':_0x18528a[_0x6557('0xe4')]||undefined,'CampaignId':_0x18528a['CampaignId']||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0xf2')));break;case 0x13:if(_0x18528a[_0x6557('0x11f')]>=_0x34a2fe[_0x6557('0x126')]-0x1){return!![];}hopperUtils[_0x6557('0xdf')]({'active':![],'countmachineretry':_0x18528a[_0x6557('0x11f')]+=0x1,'scheduledat':moment()[_0x6557('0xe0')](_0x34a2fe['dialMachineRetryFrequency'],_0x6557('0xe1'))['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x18528a[_0x6557('0xe2')],'ListId':_0x18528a['ListId'],'VoiceQueueId':_0x18528a[_0x6557('0xe4')]||undefined,'CampaignId':_0x18528a[_0x6557('0xf1')]||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x12a')));break;case 0x14:if(_0x18528a[_0x6557('0x123')]>=_0x34a2fe['dialAgentRejectMaxRetry']-0x1){return!![];}hopperUtils[_0x6557('0xdf')]({'active':![],'countagentrejectretry':_0x18528a[_0x6557('0x123')]+=0x1,'scheduledat':moment()['add'](_0x34a2fe[_0x6557('0x192')],_0x6557('0xe1'))[_0x6557('0x3f')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x18528a['ContactId'],'ListId':_0x18528a['ListId'],'VoiceQueueId':_0x18528a[_0x6557('0xe4')]||undefined,'CampaignId':_0x18528a[_0x6557('0xf1')]||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x193')));break;default:return!![];}};Dialer[_0x6557('0x16')][_0x6557('0x10e')]=function(_0x26641e,_0x4c1b40,_0x5ec7c2){var _0x5e005c=this;var _0x3557c6=new History(_0x26641e);var _0x47f3ec=![];var _0xbbc94;var _0x4f772b;return new Promise(function(_0x173acb,_0x2d6c87){if(_[_0x6557('0x3c')](_0x4c1b40)&&typeof _0x4c1b40!==_0x6557('0x157')){return _0x2d6c87(msgResponse('[callProgressDetecting]',_0x6557('0x96'),_0x6557('0x194')));}if(_[_0x6557('0x3c')](_0x5ec7c2)&&typeof _0x5ec7c2!==_0x6557('0x157')){return _0x2d6c87(msgResponse('[callProgressDetecting]','Failure',_0x6557('0x195')));}hopperUtils[_0x6557('0xdc')](_0x3557c6,_0x5ec7c2['reason'],_0x4c1b40)[_0x6557('0x3a')](function(_0x68f333){if(_0x68f333[_0x6557('0xdd')]==0x1)_0x47f3ec=!![];switch(_0x5ec7c2[_0x6557('0x196')]){case'0':_0x4c1b40[_0x6557('0x197')]+=0x1;_0x3557c6[_0x6557('0x6b')]=0x0;_0x3557c6['statedesc']=_0x6557('0x198');_0x3557c6[_0x6557('0x122')]+=0x1;_0x3557c6[_0x6557('0xd9')]+=0x1;ami[_0x6557('0x3d')](_0x6557('0x199'),ut[_0x6557('0x119')](_0x26641e,_0x6557('0x19a')));_0xbbc94=_0x4c1b40['dialNoSuchNumberRetryFrequency'];_0x4f772b=_0x4c1b40[_0x6557('0xdb')];hopperUtils[_0x6557('0xcb')](_0x3557c6)[_0x6557('0xa1')](loggerCatch(_0x6557('0x120')));if(_0x5e005c[_0x6557('0x185')](0x0,_0x26641e,_0x4c1b40)&&!_0x47f3ec){if(_0x3557c6[_0x6557('0x122')]>=_0x4c1b40['dialNoSuchNumberMaxRetry']){_0x5e005c['createStateFinal'](_0x3557c6,_0x173acb,_0x2d6c87,_0x6557('0x19b'));}else{_0x5e005c[_0x6557('0x125')](_0x3557c6,_0x173acb,_0x2d6c87,_0x6557('0x19b'));}}break;case'3':_0x4c1b40[_0x6557('0x19c')]+=0x1;_0x3557c6['state']=0x3;_0x3557c6[_0x6557('0x6c')]=_0x6557('0x19d');_0x3557c6[_0x6557('0x187')]+=0x1;_0x3557c6[_0x6557('0xd9')]+=0x1;var _0x24c1e2=ut['buildNoAnswerEventPayload'](_0x26641e,_0x4c1b40);ami['emit'](_0x6557('0x19e'),_0x24c1e2);_0xbbc94=_0x4c1b40[_0x6557('0x189')];_0x4f772b=_0x4c1b40[_0x6557('0xdb')];hopperUtils[_0x6557('0xcb')](_0x3557c6)[_0x6557('0xa1')](loggerCatch(_0x6557('0x19f')));if(_0x5e005c[_0x6557('0x185')](0x3,_0x26641e,_0x4c1b40)&&!_0x47f3ec){if(_0x3557c6[_0x6557('0x187')]>=_0x4c1b40[_0x6557('0x188')]){_0x5e005c[_0x6557('0x127')](_0x3557c6,_0x173acb,_0x2d6c87,'reason\x203\x20ringing\x20no\x20answer');}else{_0x5e005c[_0x6557('0x125')](_0x3557c6,_0x173acb,_0x2d6c87,_0x6557('0x1a0'));}}break;case'5':_0x4c1b40['outboundBusyCallsDay']+=0x1;_0x3557c6[_0x6557('0x6b')]=0x5;_0x3557c6[_0x6557('0x6c')]=_0x6557('0x1a1');_0x3557c6[_0x6557('0x121')]+=0x1;_0x3557c6['countglobal']+=0x1;ami[_0x6557('0x3d')](_0x6557('0x1a2'),ut[_0x6557('0x119')](_0x26641e,_0x6557('0x1a3')));_0xbbc94=_0x4c1b40[_0x6557('0x1a4')];_0x4f772b=_0x4c1b40[_0x6557('0xdb')];hopperUtils['createHistory'](_0x3557c6)[_0x6557('0xa1')](loggerCatch(_0x6557('0x1a5')));if(_0x5e005c[_0x6557('0x185')](0x5,_0x26641e,_0x4c1b40)&&!_0x47f3ec){if(_0x3557c6[_0x6557('0x121')]>=_0x4c1b40['dialBusyMaxRetry']){_0x5e005c[_0x6557('0x127')](_0x3557c6,_0x173acb,_0x2d6c87,_0x6557('0x1a6'));}else{_0x5e005c[_0x6557('0x125')](_0x3557c6,_0x173acb,_0x2d6c87,_0x6557('0x1a6'));}}break;case'8':_0x4c1b40[_0x6557('0x1a7')]+=0x1;_0x3557c6[_0x6557('0x6b')]=0x8;_0x3557c6['statedesc']='Congestion';_0x3557c6[_0x6557('0x186')]+=0x1;_0x3557c6['countglobal']+=0x1;_0xbbc94=_0x4c1b40['dialCongestionRetryFrequency'];_0x4f772b=_0x4c1b40[_0x6557('0xdb')];ami[_0x6557('0x3d')](_0x6557('0x1a8'),ut['buildObj'](_0x26641e,_0x6557('0x1a9')));hopperUtils[_0x6557('0xcb')](_0x3557c6)[_0x6557('0xa1')](loggerCatch(_0x6557('0x1aa')));if(_0x5e005c[_0x6557('0x185')](0x8,_0x26641e,_0x4c1b40)&&!_0x47f3ec){if(_0x3557c6[_0x6557('0x186')]>=_0x4c1b40[_0x6557('0x18c')]){_0x5e005c[_0x6557('0x127')](_0x3557c6,_0x173acb,_0x2d6c87,_0x6557('0x1ab'));}else{_0x5e005c[_0x6557('0x125')](_0x3557c6,_0x173acb,_0x2d6c87,'reason\x208\x20congestion');}}break;case'11':_0x4c1b40[_0x6557('0x1ac')]+=0x1;_0x3557c6[_0x6557('0x6b')]=0xb;_0x3557c6[_0x6557('0x6c')]=_0x6557('0xea');_0x3557c6[_0x6557('0xec')]+=0x1;_0x3557c6['countglobal']+=0x1;_0xbbc94=_0x4c1b40[_0x6557('0xed')];_0x4f772b=_0x4c1b40[_0x6557('0xdb')];hopperUtils[_0x6557('0xcb')](_0x3557c6)[_0x6557('0xa1')](loggerCatch(_0x6557('0xf3')));if(_0x5e005c[_0x6557('0x185')](0xb,_0x26641e,_0x4c1b40)&&!_0x47f3ec){if(_0x3557c6[_0x6557('0xec')]>=_0x4c1b40[_0x6557('0xef')]){_0x5e005c[_0x6557('0x127')](_0x3557c6,_0x173acb,_0x2d6c87,'reason\x2011\x20abandoned');}else{_0x5e005c[_0x6557('0x125')](_0x3557c6,_0x173acb,_0x2d6c87,'reason\x2011\x20abandoned');}}break;case'20':_0x4c1b40['outboundRejectCallsDay']+=0x1;_0x3557c6[_0x6557('0x6b')]=0x14;_0x3557c6[_0x6557('0x6c')]=_0x6557('0x1ad');_0x3557c6['countagentrejectretry']+=0x1;_0x3557c6[_0x6557('0xd9')]+=0x1;_0xbbc94=_0x4c1b40['dialAgentRejectRetryFrequency'];_0x4f772b=_0x4c1b40[_0x6557('0xdb')];ami['emit'](_0x6557('0x1ae'),ut[_0x6557('0x119')](_0x26641e,_0x6557('0x1af')));hopperUtils[_0x6557('0xcb')](_0x3557c6)[_0x6557('0xa1')](loggerCatch('[syncAgentComplete][createHistory][20]'));if(_0x5e005c[_0x6557('0x185')](0x14,_0x26641e,_0x4c1b40)&&!_0x47f3ec){if(_0x3557c6[_0x6557('0x123')]>=_0x4c1b40[_0x6557('0x1b0')]){_0x5e005c[_0x6557('0x127')](_0x3557c6,_0x173acb,_0x2d6c87,'reason\x2020\x20agentreject');}else{_0x5e005c['stateGlobal'](_0x3557c6,_0x173acb,_0x2d6c87,_0x6557('0x1b1'));}}break;default:_0x4c1b40[_0x6557('0x1b2')]+=0x1;_0x3557c6[_0x6557('0x6b')]=0xc;_0x3557c6[_0x6557('0x6c')]=_0x5ec7c2[_0x6557('0x196')];_0xbbc94=_0x4c1b40['dialAgentRejectRetryFrequency'];_0x4f772b=_0x4c1b40[_0x6557('0xdb')];hopperUtils['createHistory'](_0x3557c6)[_0x6557('0xa1')](loggerCatch(_0x6557('0x1b3')));if(_0x5e005c['checkRetriveMax'](_0x5ec7c2[_0x6557('0x196')],_0x26641e,_0x4c1b40)&&!_0x47f3ec){if(_0x3557c6[_0x6557('0x121')]+_0x3557c6[_0x6557('0x186')]+_0x3557c6['countnoanswerretry']+_0x3557c6[_0x6557('0x122')]+_0x3557c6[_0x6557('0xd8')]+_0x3557c6[_0x6557('0xec')]+_0x3557c6[_0x6557('0x11f')]+_0x3557c6[_0x6557('0x123')]>=_0x4c1b40[_0x6557('0x124')]){_0x5e005c[_0x6557('0x125')](_0x3557c6,_0x173acb,_0x2d6c87,_0x5ec7c2[_0x6557('0x196')]);}else{_0x5e005c['createStateFinal'](_0x3557c6,_0x173acb,_0x2d6c87,_0x5ec7c2[_0x6557('0x196')]);}}}})[_0x6557('0x3a')](function(){if(_0x47f3ec){hopperUtils['swapAdditionalPhones'](_0x3557c6,_0xbbc94,_0x4f772b)[_0x6557('0x3a')](function(){return _0x173acb(0x1);});}});});};Dialer[_0x6557('0x16')][_0x6557('0x125')]=function(_0x50bbcb,_0x341d7f,_0x38cb7f,_0x45e625){var _0x553900=new Final(_0x50bbcb);_0x553900['state']=0xf;_0x553900[_0x6557('0x6c')]=_0x6557('0x1b4');this[_0x6557('0x127')](_0x553900,_0x341d7f,_0x38cb7f,_0x45e625);};Dialer[_0x6557('0x16')][_0x6557('0x127')]=function(_0x4f2b56,_0x3c3a4e,_0x192e03,_0x27e798){hopperUtils['moveContactManagedDialer'](_0x4f2b56)[_0x6557('0x3a')](function(){return _0x3c3a4e(msgResponse(_0x6557('0x1b5'),'Success',_0x27e798));})[_0x6557('0xa1')](function(){return _0x192e03(msgResponse(_0x6557('0x1b6'),'Failure','contact\x20not\x20moved'));});};Dialer[_0x6557('0x16')]['predictive']=function(_0x55f0d5){var _0x3ad61d=_0x55f0d5[_0x6557('0x1b7')]/0x64;var _0x394e6d=_0x55f0d5[_0x6557('0xd2')]/(_0x55f0d5[_0x6557('0xd2')]+_0x55f0d5[_0x6557('0xca')]);var _0x4b4b79=Math[_0x6557('0x1b8')](_0x55f0d5['predictiveIntervalAvailable']*(_0x55f0d5[_0x6557('0x1b9')]/0x64));var _0x341ec3=Math[_0x6557('0x1b8')](_0x55f0d5['predictiveIntervalAvailable']*(_0x55f0d5[_0x6557('0x1ba')]/0x64));var _0x15278d=_0x55f0d5[_0x6557('0x1bb')]+_0x55f0d5[_0x6557('0x1bc')];var _0x457e9a=Math[_0x6557('0x1bd')](_0x55f0d5['erlangCalls']*_0x55f0d5[_0x6557('0x58')]*_0x55f0d5['predictiveIntervalHitRate']*_0x55f0d5['predictiveIntervalMultiplicativeFactor']);if(_[_0x6557('0x3c')](_0x55f0d5[_0x6557('0x23')])){if(!_[_0x6557('0x3c')](_0x55f0d5[_0x6557('0x60')])){_0x55f0d5[_0x6557('0x60')]=undefined;loggerPredictive['error'](_0x6557('0x1be'),_0x6557('0x1bf'));}if(!_[_0x6557('0x3c')](_0x55f0d5[_0x6557('0x62')])){loggerPredictive[_0x6557('0x64')]('[startMethodPredictive][StartProgressive]',_0x6557('0x1c0'));clearInterval(_0x55f0d5[_0x6557('0x62')]);_0x55f0d5[_0x6557('0x62')]=undefined;}_0x55f0d5['startProgressive']=moment()[_0x6557('0x3f')]('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive[_0x6557('0x46')](_0x55f0d5[_0x6557('0x41')],_0x6557('0x1c1'),_0x55f0d5[_0x6557('0x23')]);this[_0x6557('0xb5')](_0x55f0d5,0x1);}else if(ifInterval(_0x55f0d5[_0x6557('0x1c2')],_0x55f0d5[_0x6557('0x23')])){this['handlePower'](_0x55f0d5,0x1);loggerPredictiveCalls[_0x6557('0x46')](_0x6557('0x1c3'),_0x55f0d5[_0x6557('0x23')],_0x55f0d5[_0x6557('0x41')]);_0x55f0d5[_0x6557('0x56')]=0x0;_0x55f0d5[_0x6557('0xd3')]=0x0;}else if(_0x3ad61d<_0x394e6d&&_0x55f0d5['dialPredictiveOptimization']===_0x6557('0x1c4')){clearPredictiveAttributes(_0x55f0d5);loggerPredictive[_0x6557('0x46')]('[stopMethodPredictive][ReStartProgressive][ExceededDropDay]',_0x6557('0x1c5'),_0x394e6d,_0x6557('0x23'),_0x55f0d5[_0x6557('0x41')]);}else if(_0x457e9a<_0x55f0d5[_0x6557('0xd3')]&&_0x55f0d5[_0x6557('0x1c6')]===_0x6557('0x1c4')){clearPredictiveAttributes(_0x55f0d5);loggerPredictive[_0x6557('0x46')](_0x6557('0x1c7'),_0x6557('0x1c8'),_0x457e9a,'Drop\x20in\x20this\x20interval',_0x55f0d5[_0x6557('0xd3')],_0x6557('0x23'),_0x55f0d5['name']);}else if(!ifInterval(_0x55f0d5[_0x6557('0x1c2')],_0x55f0d5['startProgressive'])&&_[_0x6557('0x3c')](_0x55f0d5[_0x6557('0x60')])&&!_[_0x6557('0x3c')](_0x55f0d5[_0x6557('0x23')])){_0x55f0d5['startPredictive']=moment()['format'](_0x6557('0xc8'));loggerPredictive['info'](_0x55f0d5[_0x6557('0x41')],_0x6557('0x1c9'),_0x55f0d5[_0x6557('0x60')]);hopperUtils[_0x6557('0x1ca')](_0x55f0d5['dialPredictiveInterval'])[_0x6557('0x3a')](this[_0x6557('0x1cb')](_0x55f0d5))['then'](mergeDataErlangB(_0x55f0d5))['then'](this['startMethodPredictive'](_0x55f0d5))[_0x6557('0xa1')](loggerCatchPredictive(_0x6557('0x1cc'),_0x55f0d5));}else if(!ifInterval(_0x55f0d5[_0x6557('0x1c2')],_0x55f0d5[_0x6557('0x60')])){_0x55f0d5[_0x6557('0xd3')]=0x0;_0x55f0d5[_0x6557('0x60')]=moment()[_0x6557('0x3f')](_0x6557('0xc8'));loggerPredictive[_0x6557('0x46')](_0x55f0d5[_0x6557('0x41')],_0x6557('0x1cd'),_0x55f0d5[_0x6557('0x60')]);clearInterval(_0x55f0d5[_0x6557('0x62')]);_0x55f0d5[_0x6557('0x62')]=undefined;hopperUtils['avgHandleTime'](_0x55f0d5[_0x6557('0x1c2')])[_0x6557('0x3a')](this[_0x6557('0x1cb')](_0x55f0d5))[_0x6557('0x3a')](mergeDataErlangB(_0x55f0d5))[_0x6557('0x3a')](this[_0x6557('0x1ce')](_0x55f0d5))['catch'](loggerCatchPredictive(_0x6557('0x1cf'),_0x55f0d5));}else if(_0x55f0d5[_0x6557('0x1d0')]&&_0x15278d<_0x55f0d5[_0x6557('0x1d0')]-_0x341ec3){clearPredictiveAttributes(_0x55f0d5);loggerPredictive[_0x6557('0x46')](_0x55f0d5[_0x6557('0x41')],'switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',_0x15278d,')\x20are\x20less\x20than\x20threshold\x20(',_0x55f0d5[_0x6557('0x1d0')],'-',_0x341ec3,'=',_0x55f0d5[_0x6557('0x1d0')]-_0x341ec3,')');}else if(_0x55f0d5[_0x6557('0x1d0')]&&_0x15278d>_0x55f0d5['predictiveIntervalAvailable']+_0x4b4b79){clearPredictiveAttributes(_0x55f0d5);loggerPredictive[_0x6557('0x46')](_0x55f0d5[_0x6557('0x41')],_0x6557('0x1d1'),_0x15278d,_0x6557('0x1d2'),_0x55f0d5[_0x6557('0x1d0')],'+',_0x4b4b79,'=',_0x55f0d5[_0x6557('0x1d0')]+_0x4b4b79,')');}};Dialer[_0x6557('0x16')][_0x6557('0x1cb')]=function(_0x479134){var _0x33da41=this;return function(_0x3aa297){return new Promise(function(_0x3b91d1,_0x5582cb){_[_0x6557('0x5c')](_0x479134,_0x3aa297[0x0]);if(checkGetDataPredictive(_0x3aa297[0x0])){var _0x58554a=_0x479134[_0x6557('0x1d0')]=_0x479134[_0x6557('0x1bc')]+_0x479134[_0x6557('0x1bb')];var _0x18fbb9=_0x479134['dialPredictiveInterval']*0x3c;var _0x5d3ade=_0x3aa297[0x0][_0x6557('0x50')]+_0x3aa297[0x0][_0x6557('0x4d')];var _0x41c344=(_0x3aa297[0x0][_0x6557('0x1d3')]+_0x3aa297[0x0][_0x6557('0x49')]+_0x3aa297[0x0][_0x6557('0x4b')])/_0x3aa297[0x0]['predictiveIntervalTotalCalls'];_0x479134[_0x6557('0x1d4')]=_0x41c344>0x0?_0x41c344:0x1;switch(_0x479134[_0x6557('0x1c6')]){case _0x6557('0x1c4'):var _0x2f333a=_0x479134[_0x6557('0x1b7')]/0x64;return _0x33da41[_0x6557('0x1d5')](_0x58554a,_0x18fbb9,_0x5d3ade,_0x41c344,_0x2f333a)['then'](function(_0x94ba38){return _0x3b91d1(_0x94ba38);});case _0x6557('0x1d6'):var _0x4e7492=_0x479134[_0x6557('0x1b7')]/0x64;return _0x33da41[_0x6557('0x1d7')](_0x58554a,_0x18fbb9,_0x5d3ade,_0x41c344,_0x4e7492)[_0x6557('0x3a')](function(_0x4b971a){return _0x3b91d1(_0x4b971a);});default:return _0x5582cb(msgResponse(_0x6557('0x1d8'),_0x6557('0x96'),'Unknown\x20Predictive'));}}else{return _0x5582cb(msgResponse('[getDataPredictive]',_0x6557('0x96'),_0x6557('0x1d9')));}});};};Dialer[_0x6557('0x16')][_0x6557('0x1da')]=function(_0x3b1b0e){var _0xb34fb1=this;return function(_0x59e6b1){return new Promise(function(_0x4697d7,_0x5a0148){_[_0x6557('0x5c')](_0x3b1b0e,_0x59e6b1[0x0]);if(checkGetDataPredictive(_0x59e6b1[0x0])){loggerPredictive['info'](JSON['stringify'](_0x59e6b1[0x0]));if(_0x3b1b0e[_0x6557('0x1c6')]==='dropRate'){return _0xb34fb1['getVoiceQueueRtPauses'](_0x3b1b0e['id'])[_0x6557('0x3a')](function(_0x1c1147){var _0x189bae=_0x3b1b0e[_0x6557('0x1db')]-_0x1c1147[0x0][_0x6557('0x1dc')];var _0x16e9d9=_0x3b1b0e['dialPredictiveInterval']*0x3c;var _0x59c083=_0x59e6b1[0x0][_0x6557('0x50')]+_0x59e6b1[0x0][_0x6557('0x4d')];var _0x2caa38=(_0x59e6b1[0x0]['predictiveIntervalAnsweredCalls']+_0x59e6b1[0x0][_0x6557('0x49')]+_0x59e6b1[0x0][_0x6557('0x4b')])/_0x59e6b1[0x0][_0x6557('0x1dd')];var _0x448869=_0x3b1b0e['dialPredictiveOptimizationPercentage']/0x64;_0x3b1b0e[_0x6557('0x1de')]=_0x1c1147[0x0]['outboundQueuePauses']||0x0;_0x3b1b0e['predictiveIntervalHitRate']=_0x2caa38>0x0?_0x2caa38:0x1;return _0xb34fb1[_0x6557('0x1d5')](_0x189bae,_0x16e9d9,_0x59c083,_0x2caa38,_0x448869);})[_0x6557('0x3a')](function(_0x2c6310){return _0x4697d7(_0x2c6310);})[_0x6557('0xa1')](function(_0x447ade){return _0x5a0148(msgResponse('[CatchErlangB]',_0x6557('0x96'),JSON['stringify'](_0x447ade)));});}if(_0x3b1b0e[_0x6557('0x1c6')]===_0x6557('0x1d6')){return _0xb34fb1['getVoiceQueueRtPauses'](_0x3b1b0e['id'])['then'](function(_0x2fb6cf){var _0x56c14=_0x3b1b0e['loggedIn']-_0x2fb6cf[0x0][_0x6557('0x1dc')];var _0x32eafe=_0x3b1b0e['dialPredictiveInterval']*0x3c;var _0x2b1dc8=_0x59e6b1[0x0][_0x6557('0x50')]+_0x59e6b1[0x0][_0x6557('0x4d')];var _0x99b783=(_0x59e6b1[0x0][_0x6557('0x1d3')]+_0x59e6b1[0x0][_0x6557('0x49')]+_0x59e6b1[0x0][_0x6557('0x4b')])/_0x59e6b1[0x0][_0x6557('0x1dd')];var _0x1d2edc=_0x3b1b0e[_0x6557('0x1b7')]/0x64;_0x3b1b0e[_0x6557('0x1de')]=_0x2fb6cf[0x0][_0x6557('0x1dc')]||0x0;_0x3b1b0e[_0x6557('0x1d4')]=_0x99b783>0x0?_0x99b783:0x1;return _0xb34fb1[_0x6557('0x1d7')](_0x56c14,_0x32eafe,_0x2b1dc8,_0x99b783,_0x1d2edc);})[_0x6557('0x3a')](function(_0x53a26b){return _0x4697d7(_0x53a26b);})['catch'](function(_0x1c27e2){return _0x5a0148(msgResponse('[CatchErlangB]',_0x6557('0x96'),JSON['stringify'](_0x1c27e2)));});}}else{return _0x5a0148(msgResponse('[getDataPredictive]',_0x6557('0x96'),_0x6557('0x1d9')));}});};};Dialer[_0x6557('0x16')][_0x6557('0x1ce')]=function(_0x3e9318){var _0x4a1ca4=this;return function(){var _0x33f3a1=0x0;var _0x4778ee=Math['floor'](_0x3e9318['erlangCallToSecond']*0x3e8);if(_0x4778ee>0x0){_0x4778ee=_0x4778ee<0x64?0x64:_0x4778ee;loggerPredictive[_0x6557('0x46')](_0x3e9318[_0x6557('0x41')],_0x6557('0x1df'),_0x4778ee,_0x6557('0x1e0'));_0x3e9318['handlePredictive']=setInterval(function(){_0x4a1ca4[_0x6557('0x62')](_0x3e9318);loggerPredictiveCalls[_0x6557('0x46')](_0x6557('0x1e1'),_0x33f3a1+=0x1);},_0x4778ee);}else{loggerPredictive['info'](_0x3e9318['name'],_0x6557('0x1e2'));}};};Dialer['prototype'][_0x6557('0x1e3')]=function(_0x4b9350,_0x3f3955){var _0x29dee6=this;return function(_0x2904e9){if(_[_0x6557('0x43')](_0x2904e9)){if(_[_0x6557('0xfc')](_0x3f3955[_0x6557('0x153')])||!_0x3f3955[_0x6557('0x1e4')]){if(_0x4b9350['dialMethod']===_0x6557('0x1e5')){_0x4b9350['queueStatusComplete']=_[_0x6557('0x3c')](_0x4b9350['queueStatusComplete'])?!![]:_0x4b9350[_0x6557('0x6f')];var _0x26c474=uuid['v4']();_0x29dee6[_0x6557('0x20')][_0x26c474]=new Action(_0x4b9350,_0x3f3955,_0x26c474);loggerBooked['info']('[booked][checkContactBlack]',_0x26c474,_0x6557('0x1e6'),JSON[_0x6557('0x72')](_0x4b9350['queueStatusComplete']),_0x6557('0x1e7'),_0x4b9350[_0x6557('0x41')]);if(_0x4b9350[_0x6557('0x6f')]){_0x4b9350[_0x6557('0x6f')]=![];_0x29dee6[_0x6557('0x25')][_0x29dee6['actions'][_0x26c474]['queue']]=[];ami[_0x6557('0x9d')]({'actionid':_0x26c474,'action':'queuestatus','queue':_0x4b9350[_0x6557('0x41')]})[_0x6557('0xa1')](function(){_0x29dee6['updateOriginated'](_0x4b9350);hopperUtils[_0x6557('0xdf')]({'active':![],'ContactId':_0x29dee6[_0x6557('0x20')][_0x26c474]['ContactId'],'ListId':_0x29dee6[_0x6557('0x20')][_0x26c474][_0x6557('0xe3')],'VoiceQueueId':_0x29dee6[_0x6557('0x20')][_0x26c474][_0x6557('0xe4')]||undefined,'CampaignId':_0x29dee6[_0x6557('0x20')][_0x26c474]['CampaignId']||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x1e8')));delete _0x29dee6[_0x6557('0x20')][_0x26c474];});}else{loggerBooked[_0x6557('0x46')](_0x6557('0x1e9'),JSON[_0x6557('0x72')](_0x4b9350[_0x6557('0x6f')]),_0x6557('0x1e7'),_0x4b9350[_0x6557('0x41')]);_0x29dee6[_0x6557('0xc6')](_0x4b9350);hopperUtils[_0x6557('0xdf')]({'active':![],'ContactId':_0x29dee6[_0x6557('0x20')][_0x26c474][_0x6557('0xe2')],'ListId':_0x29dee6[_0x6557('0x20')][_0x26c474]['ListId'],'VoiceQueueId':_0x29dee6['actions'][_0x26c474]['VoiceQueueId']||undefined,'CampaignId':_0x29dee6['actions'][_0x26c474]['CampaignId']||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x1e8')));delete _0x29dee6[_0x6557('0x20')][_0x26c474];}}else{return _0x29dee6[_0x6557('0x156')](_0x4b9350,_0x3f3955);}}else{if(utils['getSeconds'](undefined,_0x3f3955['scheduledat'])<_0x4b9350[_0x6557('0x1ea')]*0x3c){if(_0x3f3955[_0x6557('0x154')]&&!_0x3f3955[_0x6557('0x154')]['voicePause']){_0x29dee6[_0x6557('0x1a')]['run'](_0x3f3955['id'])[_0x6557('0x19')](function(){_0x29dee6['updateOriginated'](_0x4b9350);});}else{hopperUtils[_0x6557('0x1eb')]({'active':![]},_0x3f3955['id'],0x1)[_0x6557('0x19')](function(){_0x29dee6['updateOriginated'](_0x4b9350);});}}else{_0x4b9350[_0x6557('0x1ec')]+=0x1;_0x29dee6[_0x6557('0xc6')](_0x4b9350);if(_0x4b9350[_0x6557('0x1ed')]){hopperUtils[_0x6557('0xdf')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x3f3955[_0x6557('0xe2')],'ListId':_0x3f3955['ListId'],'VoiceQueueId':_0x3f3955['VoiceQueueId']||undefined,'CampaignId':_0x3f3955[_0x6557('0xf1')]||undefined})[_0x6557('0xa1')](loggerCatch(_0x6557('0x1ee')));hopperUtils[_0x6557('0xcb')](createObjHistory(_0x4b9350,_0x3f3955,utils[_0x6557('0x69')][_0x6557('0x1ef')],0x17,'RecallInQueue'))[_0x6557('0xa1')](loggerCatch('[Originate][HistoryDialRecallInQueue][historyCatch]'));}else{_0x29dee6[_0x6557('0x11b')](createObjHistory(_0x4b9350,_0x3f3955,utils[_0x6557('0x69')]['RECALL_TIMEOUT'],0x16,_0x6557('0x1f0')),_0x6557('0x1f1'),_0x6557('0x1f2'));}}}}else{_0x4b9350[_0x6557('0x1f3')]+=0x1;_0x29dee6[_0x6557('0x11b')](createObjHistory(_0x4b9350,_0x3f3955,utils[_0x6557('0x69')][_0x6557('0x1f4')],0xd,_0x6557('0x1f5')),_0x6557('0x1f6'),_0x6557('0x1f7'));throw _0x6557('0x1f8');}};};Dialer[_0x6557('0x16')][_0x6557('0x155')]=function(_0x1ed555){var _0x485a88=this;var _0x302a2f=_0x1ed555[_0x6557('0x1f9')]-_0x1ed555[_0x6557('0x7e')];emitCampaignSummary(_0x1ed555);if(_0x302a2f>0x0&&_0x1ed555[_0x6557('0x1fa')]==0x0){if(_0x302a2f>this[_0x6557('0x1f')]){_0x302a2f=this[_0x6557('0x1f')];}_0x1ed555[_0x6557('0x1fa')]=0x1;hopperUtils[_0x6557('0x1fb')](_0x1ed555,_0x302a2f)[_0x6557('0x3a')](function(_0x13b0dc){_0x1ed555[_0x6557('0x1fa')]=0x0;if(_0x13b0dc){if(!utils[_0x6557('0x1fc')](_0x13b0dc)){_0x1ed555['message']=utils[_0x6557('0x69')][_0x6557('0x1fd')];logger['info'](_0x6557('0x1fe')+_0x1ed555['name']);}else{_0x1ed555[_0x6557('0x7e')]+=_0x13b0dc[_0x6557('0x9c')];_0x1ed555[_0x6557('0x68')]=utils[_0x6557('0x69')][_0x6557('0x1ff')];for(var _0x2e224e=0x0;_0x2e224e<_0x13b0dc[_0x6557('0x9c')];_0x2e224e+=0x1){_0x1ed555[_0x6557('0x200')]+=0x1;if(_[_0x6557('0xfc')](_0x13b0dc[_0x2e224e])||_[_0x6557('0xfc')](_0x13b0dc[_0x2e224e][_0x6557('0x201')])||_[_0x6557('0xfc')](_0x13b0dc[_0x2e224e]['phone'])){_0x485a88[_0x6557('0x151')](_0x6557('0x202'),_0x1ed555,_0x13b0dc[_0x2e224e]);}else{hopperUtils[_0x6557('0x203')](_[_0x6557('0x73')](_0x13b0dc[_0x2e224e],[_0x6557('0xf1'),_0x6557('0x159')]))['then'](_0x485a88['checkContactBlack'](_0x1ed555,_0x13b0dc[_0x2e224e]))[_0x6557('0xa1')](_0x485a88[_0x6557('0x150')](_0x6557('0x204'),_0x1ed555));}}}}})[_0x6557('0xa1')](loggerGetContactDialer(_0x6557('0x205'),_0x1ed555,_0x302a2f));}};Dialer[_0x6557('0x16')][_0x6557('0xb5')]=function(_0x2a41b1,_0x1d5fbc){var _0x295294=this;var _0x312ef5=[];if(_0x1d5fbc<0x1||_0x2a41b1['dialMethod']===_0x6557('0x1e5')){_0x1d5fbc=0x1;}var _0x2d3f37=Math['floor'](_0x2a41b1[_0x6557('0x1bb')]*_0x1d5fbc)-_0x2a41b1['originated'];if(_0x2a41b1[_0x6557('0x206')]>0x0){var _0x26ca26=_0x2a41b1[_0x6557('0x206')]-_0x2a41b1[_0x6557('0x7e')]-_0x2a41b1[_0x6557('0x1bc')]-_0x2a41b1[_0x6557('0x13b')];if(_0x2d3f37>_0x26ca26){_0x2d3f37=_0x26ca26;}}if(_0x2d3f37>0x0&&_0x2a41b1[_0x6557('0x1fa')]==0x0){if(_0x2a41b1[_0x6557('0xb3')]===_0x6557('0x1e5')){_0x2d3f37=0x1;}if(_0x2d3f37>this[_0x6557('0x1f')]){_0x2d3f37=this['maxNumberOriginate'];}for(var _0x59aaa2 in this[_0x6557('0x1d')]){if(typeof this[_0x6557('0x1d')][_0x59aaa2]!==_0x6557('0xac')){if(this['agents'][_0x59aaa2][_0x6557('0x6b')]===_0x6557('0x207')&&this[_0x6557('0x1d')][_0x59aaa2][_0x6557('0x88')]===_0x6557('0x87')){_0x312ef5['push'](this['agents'][_0x59aaa2]['id']);}}}_0x2a41b1['temp']=0x1;hopperUtils['getContactDialer'](_0x2a41b1,_0x312ef5,_0x2d3f37)[_0x6557('0x3a')](function(_0x55dc05){_0x2a41b1['temp']=0x0;if(_0x55dc05){if(!utils['checkContactEmpty'](_0x55dc05)){hopperUtils[_0x6557('0x208')](_0x2a41b1)['then'](sendMessageReschedule(_0x2a41b1))['catch'](loggerCatch(_0x6557('0x209')));}else{_0x2a41b1[_0x6557('0x7e')]+=_0x55dc05['length'];_0x2a41b1[_0x6557('0x68')]=_0x2a41b1[_0x6557('0xb3')]===_0x6557('0x1e5')?utils[_0x6557('0x69')][_0x6557('0x162')]:utils['CAMPAIGN_STATUS'][_0x6557('0x1ff')];for(var _0x44cf12=0x0;_0x44cf12<_0x55dc05[_0x6557('0x9c')];_0x44cf12+=0x1){if(_[_0x6557('0xfc')](_0x55dc05[_0x44cf12])||_[_0x6557('0xfc')](_0x55dc05[_0x44cf12]['Contact'])||_[_0x6557('0xfc')](_0x55dc05[_0x44cf12][_0x6557('0x159')])){_0x295294['emptyContact']('[actionOriginate]\x20',_0x2a41b1,_0x55dc05[_0x44cf12]);}else{hopperUtils[_0x6557('0x20a')](_[_0x6557('0x73')](_0x55dc05[_0x44cf12],[_0x6557('0xe4'),_0x6557('0x159')]))[_0x6557('0x3a')](_0x295294[_0x6557('0x1e3')](_0x2a41b1,_0x55dc05[_0x44cf12]))[_0x6557('0xa1')](_0x295294[_0x6557('0x150')](_0x6557('0x202'),_0x2a41b1));}}}}})['catch'](loggerGetContactDialer(_0x6557('0x20b'),_0x2a41b1,_0x2d3f37));}};Dialer['prototype'][_0x6557('0x62')]=function(_0x5ef54d){if(_0x5ef54d['dialLimitQueue']>0x0){var _0x4e9ba9=_0x5ef54d[_0x6557('0x206')]-_0x5ef54d[_0x6557('0x7e')]-_0x5ef54d[_0x6557('0x1bc')];if(_0x4e9ba9>0x0&&_0x5ef54d['temp']==0x0){this[_0x6557('0x20c')](_0x5ef54d);}else{loggerPredictiveCalls[_0x6557('0x46')]('[handlePredictive][limitChannel]');}}else{this[_0x6557('0x20c')](_0x5ef54d);}};Dialer[_0x6557('0x16')][_0x6557('0x20c')]=function(_0x8092ad){var _0x2a874d=this;var _0x96700b=[];_0x8092ad[_0x6557('0x7e')]+=0x1;for(var _0x57542f in this[_0x6557('0x1d')]){if(typeof this[_0x6557('0x1d')][_0x57542f]!==_0x6557('0xac')){if(this['agents'][_0x57542f][_0x6557('0x6b')]===_0x6557('0x207')&&this['agents'][_0x57542f][_0x6557('0x88')]==='reachable'){_0x96700b[_0x6557('0x100')](this[_0x6557('0x1d')][_0x57542f]['id']);}}}_0x8092ad[_0x6557('0x1fa')]=0x1;return this[_0x6557('0x20d')](_0x8092ad['id'],_0x96700b,0x1,_0x8092ad[_0x6557('0x20e')],_0x8092ad)[_0x6557('0x3a')](function(_0x1848af){_0x8092ad['temp']=0x1;if(_0x1848af){if(!utils['checkContactEmpty'](_0x1848af)){utils['checkContactLowerLimitOriginate'](_0x8092ad,0x1,0x0);return hopperUtils['countReScheduled'](_0x8092ad)['then'](sendMessageReschedule(_0x8092ad))['catch'](loggerCatch(_0x6557('0x209')));}else{_0x8092ad['message']=utils['CAMPAIGN_STATUS'][_0x6557('0x1ff')];if(_[_0x6557('0xfc')](_0x1848af[0x0])||_[_0x6557('0xfc')](_0x1848af[0x0][_0x6557('0x201')])||_[_0x6557('0xfc')](_0x1848af[0x0][_0x6557('0x159')])){_0x2a874d['emptyContact']('[actionOriginate]\x20',_0x8092ad,_0x1848af[0x0]);}else{return hopperUtils[_0x6557('0x20a')](_[_0x6557('0x73')](_0x1848af[0x0],[_0x6557('0xe4'),_0x6557('0x159')]))[_0x6557('0x3a')](_0x2a874d['checkContactBlack'](_0x8092ad,_0x1848af[0x0]))[_0x6557('0xa1')](_0x2a874d[_0x6557('0x150')](_0x6557('0x20f'),_0x8092ad));}}}})[_0x6557('0xa1')](loggerGetContactDialer(_0x6557('0x210'),_0x8092ad,0x1));};Dialer[_0x6557('0x16')][_0x6557('0x1d5')]=function(_0x280406,_0xea2716,_0x29b2f7,_0x48b567,_0x1cbece,_0x565a2a){loggerPredictive[_0x6557('0x46')]('--------\x20Drop\x20Rate\x20--------');loggerPredictive[_0x6557('0x46')](_0x6557('0x211'),_0x280406);loggerPredictive[_0x6557('0x46')]('Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0xea2716);loggerPredictive[_0x6557('0x46')]('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',_0x29b2f7);loggerPredictive['info']('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',_0x48b567);loggerPredictive[_0x6557('0x46')](_0x6557('0x212'),_0x1cbece);loggerPredictive['info'](_0x6557('0x4f'));return new Promise(function(_0x2591f6,_0x15ed17){if(_0x280406<=0x0||isNaN(_0x280406)){return _0x15ed17(msgResponse('[abandonmentRate]',_0x6557('0x84'),'m\x20=\x20'+_0x280406));}if(_0x29b2f7<=0x0||isNaN(_0x29b2f7)){return _0x15ed17(msgResponse(_0x6557('0x213'),_0x6557('0x84'),_0x6557('0x214')+_0x29b2f7));}if(_0x48b567<=0x0||isNaN(_0x48b567)){return _0x15ed17(msgResponse(_0x6557('0x213'),_0x6557('0x84'),_0x6557('0x215')+_0x48b567));}if(_0xea2716<=0x0||isNaN(_0xea2716)){return _0x15ed17(msgResponse(_0x6557('0x213'),_0x6557('0x84'),'interval\x20=\x20'+_0xea2716));}if(_0x1cbece<=0x0||isNaN(_0x1cbece)){return _0x15ed17(msgResponse(_0x6557('0x213'),_0x6557('0x84'),_0x6557('0x216')+_0x1cbece));}_0x565a2a=_0x565a2a||0x0;var _0x295b13=0x1/_0x29b2f7;var _0x15bd2b=0x0;var _0x1f8ae7=0x0;var _0x27e244=0x0;var _0x1f66f7=0x0;for(var _0x304606=0x0;_0x27e244<_0x1cbece;_0x304606+=0x1){_0x1f8ae7=_0x304606/_0xea2716;_0x15bd2b=(_0x48b567*_0x1f8ae7+_0x565a2a)/_0x295b13;_0x27e244=utils[_0x6557('0x217')](_0x15bd2b,_0x280406);_0x1f66f7=_0x15bd2b/_0x280406*(0x1-utils['erlangb'](_0x15bd2b,_0x280406));}return _0x2591f6({'erlangCalls':_0x304606,'erlangCallToSecond':_0xea2716/_0x304606,'erlangAbandonmentRate':_0x27e244,'erlangBusyFactor':_0x1f66f7});});};Dialer[_0x6557('0x16')]['busyFactor']=function(_0x46d488,_0x5adb40,_0xa9dc02,_0x5ceb7f,_0x2c19e9,_0x3dbd2d){loggerPredictive[_0x6557('0x46')](_0x6557('0x218'));loggerPredictive['info']('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',_0x46d488);loggerPredictive[_0x6557('0x46')](_0x6557('0x219'),_0x5adb40);loggerPredictive[_0x6557('0x46')](_0x6557('0x21a'),_0xa9dc02);loggerPredictive[_0x6557('0x46')]('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',_0x5ceb7f);loggerPredictive[_0x6557('0x46')]('Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x2c19e9);loggerPredictive[_0x6557('0x46')](_0x6557('0x4f'));return new Promise(function(_0x24b149,_0x4299b2){if(_0x46d488<=0x0||isNaN(_0x46d488)){return _0x4299b2(msgResponse('[busyFactor]',_0x6557('0x84'),'m\x20=\x20'+_0x46d488));}if(_0xa9dc02<=0x0||isNaN(_0xa9dc02)){return _0x4299b2(msgResponse('[busyFactor]',_0x6557('0x84'),_0x6557('0x214')+_0xa9dc02));}if(_0x5ceb7f<=0x0||isNaN(_0x5ceb7f)){return _0x4299b2(msgResponse(_0x6557('0x21b'),_0x6557('0x84'),_0x6557('0x215')+_0x5ceb7f));}if(_0x5adb40<=0x0||isNaN(_0x5adb40)){return _0x4299b2(msgResponse(_0x6557('0x21b'),'Error',_0x6557('0x21c')+_0x5adb40));}if(_0x2c19e9<=0x0||isNaN(_0x2c19e9)){return _0x4299b2(msgResponse('[busyFactor]',_0x6557('0x84'),_0x6557('0x21d')+_0x2c19e9));}_0x3dbd2d=_0x3dbd2d||0x0;var _0x586b60=0x1/_0xa9dc02;var _0x1adb30=0x0;var _0x6ee738=0x0;var _0x4d5c7c=0x0;var _0x46b11e=0x0;for(var _0x3b3f97=0x0;_0x46b11e<_0x2c19e9;_0x3b3f97+=0x1){_0x6ee738=_0x3b3f97/_0x5adb40;_0x1adb30=(_0x5ceb7f*_0x6ee738+_0x3dbd2d)/_0x586b60;_0x4d5c7c=utils[_0x6557('0x217')](_0x1adb30,_0x46d488);_0x46b11e=_0x1adb30/_0x46d488*(0x1-utils[_0x6557('0x217')](_0x1adb30,_0x46d488));}return _0x24b149({'erlangCalls':_0x3b3f97,'erlangCallToSecond':_0x5adb40/_0x3b3f97,'erlangAbandonmentRate':_0x4d5c7c,'erlangBusyFactor':_0x46b11e});});};module[_0x6557('0x21e')]=Dialer;
\ No newline at end of file
index 37c1fe1..3c2c493 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd896=['callbackuniqueid','callbackat','recallme','originatecalleridnum','originatecalleridname','prototype','dialCutDigit','substring','exports','util','moment','isNil','string','voiceQueue','uniqueid','name','Contact','phone','lastName','number','queue','active','type','dialQueueTimeout','scheduledat','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','ListId','CampaignId','idHopper','ContactFirstName','firstName','starttime','format','YYYY-MM-DD\x20HH:mm:ss','callback'];(function(_0x475ef5,_0x1d4435){var _0x4109a4=function(_0x405e2b){while(--_0x405e2b){_0x475ef5['push'](_0x475ef5['shift']());}};_0x4109a4(++_0x1d4435);}(_0xd896,0x81));var _0x6d89=function(_0x5c406d,_0x430fdd){_0x5c406d=_0x5c406d-0x0;var _0x1d5827=_0xd896[_0x5c406d];return _0x1d5827;};'use strict';var util=require(_0x6d89('0x0'));var _=require('lodash');var moment=require(_0x6d89('0x1'));function checkNameSurname(_0x42d8f8,_0x414910,_0x50c4bd){var _0x289a11='';if(!_[_0x6d89('0x2')](_0x414910)&&_0x6d89('0x3')===typeof _0x414910){_0x289a11+=_0x414910;}if(!_[_0x6d89('0x2')](_0x50c4bd)&&_0x6d89('0x3')===typeof _0x50c4bd){_0x289a11+='\x20'+_0x50c4bd;}if(_0x289a11!==''){return _0x289a11;}return _0x42d8f8;}function Action(_0x4d0493,_0x5a2d51,_0x1ce158){this[_0x6d89('0x4')]=_0x4d0493;this[_0x6d89('0x5')]=_0x1ce158||undefined;this[_0x6d89('0x6')]=checkNameSurname(_0x5a2d51[_0x6d89('0x7')][_0x6d89('0x8')],_0x5a2d51['Contact']['firstName'],_0x5a2d51[_0x6d89('0x7')][_0x6d89('0x9')]);this[_0x6d89('0xa')]=_0x5a2d51[_0x6d89('0x8')];this[_0x6d89('0xb')]=_0x4d0493[_0x6d89('0x6')];this[_0x6d89('0xc')]=_0x5a2d51[_0x6d89('0xc')]||![];this['type']=_0x4d0493[_0x6d89('0xd')];this[_0x6d89('0xe')]=_0x4d0493[_0x6d89('0xe')]||0x3;this[_0x6d89('0xf')]=_0x5a2d51[_0x6d89('0xf')];this['countbusyretry']=_0x5a2d51['countbusyretry'];this[_0x6d89('0x10')]=_0x5a2d51[_0x6d89('0x10')];this[_0x6d89('0x11')]=_0x5a2d51[_0x6d89('0x11')];this[_0x6d89('0x12')]=_0x5a2d51[_0x6d89('0x12')];this[_0x6d89('0x13')]=_0x5a2d51[_0x6d89('0x13')];this[_0x6d89('0x14')]=_0x5a2d51[_0x6d89('0x14')];this['countmachineretry']=_0x5a2d51['countmachineretry'];this[_0x6d89('0x15')]=_0x5a2d51[_0x6d89('0x15')];this['ContactId']=_0x5a2d51['ContactId'];this[_0x6d89('0x16')]=_0x5a2d51[_0x6d89('0x16')];this['UserId']=_0x5a2d51['UserId'];this['VoiceQueueId']=_0x5a2d51['VoiceQueueId'];this[_0x6d89('0x17')]=_0x5a2d51['CampaignId'];this[_0x6d89('0x18')]=_0x5a2d51['id'];this[_0x6d89('0x19')]=_0x5a2d51[_0x6d89('0x7')][_0x6d89('0x1a')]||'';this[_0x6d89('0x1b')]=moment()[_0x6d89('0x1c')](_0x6d89('0x1d'));this[_0x6d89('0x1e')]=_0x5a2d51[_0x6d89('0x1e')];this[_0x6d89('0x1f')]=_0x5a2d51[_0x6d89('0x1f')];this[_0x6d89('0x20')]=_0x5a2d51[_0x6d89('0x20')];this[_0x6d89('0x21')]=_0x5a2d51[_0x6d89('0x21')];this[_0x6d89('0x22')]='';this[_0x6d89('0x23')]='';}Action[_0x6d89('0x24')]['getCaller']=function(){return util[_0x6d89('0x1c')]('\x22%s\x22\x20<%s>',this[_0x6d89('0x6')],this['voiceQueue'][_0x6d89('0x25')]>0x0?this[_0x6d89('0xa')][_0x6d89('0x26')](this['voiceQueue'][_0x6d89('0x25')]):this[_0x6d89('0xa')]);};Action['prototype']['getQueue']=function(){return this[_0x6d89('0xb')];};module[_0x6d89('0x27')]=Action;
\ No newline at end of file
+var _0x1dc4=['countagentrejectretry','ContactId','ListId','UserId','VoiceQueueId','idHopper','starttime','callback','callbackuniqueid','callbackat','recallme','originatecalleridnum','originatecalleridname','getCaller','\x22%s\x22\x20<%s>','dialCutDigit','number','substring','prototype','getQueue','queue','exports','util','lodash','moment','string','isNil','voiceQueue','uniqueid','name','Contact','phone','firstName','active','type','dialQueueTimeout','scheduledat','countbusyretry','countcongestionretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry'];(function(_0x21f3c3,_0x42e32c){var _0x15957=function(_0x271f01){while(--_0x271f01){_0x21f3c3['push'](_0x21f3c3['shift']());}};_0x15957(++_0x42e32c);}(_0x1dc4,0x97));var _0x41dc=function(_0x5cdb66,_0x52d970){_0x5cdb66=_0x5cdb66-0x0;var _0x37d2ed=_0x1dc4[_0x5cdb66];return _0x37d2ed;};'use strict';var util=require(_0x41dc('0x0'));var _=require(_0x41dc('0x1'));var moment=require(_0x41dc('0x2'));function checkNameSurname(_0x3c8b33,_0xde41e4,_0x273508){var _0x4b1125='';if(!_['isNil'](_0xde41e4)&&_0x41dc('0x3')===typeof _0xde41e4){_0x4b1125+=_0xde41e4;}if(!_[_0x41dc('0x4')](_0x273508)&&_0x41dc('0x3')===typeof _0x273508){_0x4b1125+='\x20'+_0x273508;}if(_0x4b1125!==''){return _0x4b1125;}return _0x3c8b33;}function Action(_0x5b1e5a,_0x47f4d3,_0x128d84){this[_0x41dc('0x5')]=_0x5b1e5a;this[_0x41dc('0x6')]=_0x128d84||undefined;this[_0x41dc('0x7')]=checkNameSurname(_0x47f4d3[_0x41dc('0x8')][_0x41dc('0x9')],_0x47f4d3[_0x41dc('0x8')][_0x41dc('0xa')],_0x47f4d3[_0x41dc('0x8')]['lastName']);this['number']=_0x47f4d3[_0x41dc('0x9')];this['queue']=_0x5b1e5a[_0x41dc('0x7')];this[_0x41dc('0xb')]=_0x47f4d3[_0x41dc('0xb')]||![];this[_0x41dc('0xc')]=_0x5b1e5a[_0x41dc('0xc')];this['dialQueueTimeout']=_0x5b1e5a[_0x41dc('0xd')]||0x3;this[_0x41dc('0xe')]=_0x47f4d3[_0x41dc('0xe')];this[_0x41dc('0xf')]=_0x47f4d3[_0x41dc('0xf')];this['countcongestionretry']=_0x47f4d3[_0x41dc('0x10')];this['countnoanswerretry']=_0x47f4d3['countnoanswerretry'];this[_0x41dc('0x11')]=_0x47f4d3[_0x41dc('0x11')];this['countdropretry']=_0x47f4d3[_0x41dc('0x12')];this['countabandonedretry']=_0x47f4d3[_0x41dc('0x13')];this['countmachineretry']=_0x47f4d3[_0x41dc('0x14')];this[_0x41dc('0x15')]=_0x47f4d3[_0x41dc('0x15')];this[_0x41dc('0x16')]=_0x47f4d3['ContactId'];this[_0x41dc('0x17')]=_0x47f4d3[_0x41dc('0x17')];this[_0x41dc('0x18')]=_0x47f4d3['UserId'];this[_0x41dc('0x19')]=_0x47f4d3[_0x41dc('0x19')];this['CampaignId']=_0x47f4d3['CampaignId'];this[_0x41dc('0x1a')]=_0x47f4d3['id'];this['ContactFirstName']=_0x47f4d3[_0x41dc('0x8')][_0x41dc('0xa')]||'';this[_0x41dc('0x1b')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');this[_0x41dc('0x1c')]=_0x47f4d3['callback'];this[_0x41dc('0x1d')]=_0x47f4d3['callbackuniqueid'];this['callbackat']=_0x47f4d3[_0x41dc('0x1e')];this[_0x41dc('0x1f')]=_0x47f4d3[_0x41dc('0x1f')];this[_0x41dc('0x20')]='';this[_0x41dc('0x21')]='';}Action['prototype'][_0x41dc('0x22')]=function(){return util['format'](_0x41dc('0x23'),this['name'],this['voiceQueue'][_0x41dc('0x24')]>0x0?this[_0x41dc('0x25')][_0x41dc('0x26')](this[_0x41dc('0x5')][_0x41dc('0x24')]):this['number']);};Action[_0x41dc('0x27')][_0x41dc('0x28')]=function(){return this[_0x41dc('0x29')];};module[_0x41dc('0x2a')]=Action;
\ No newline at end of file
index 3696baa..3e1c468 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0ea4=['countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridnum','number','starttime','responsetime','answertime','endtime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime','getSeconds','holdtime','talktime','callback','callbackat','recallme','ContactId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','agiafterat','exports','moment','../utils','state','statedesc','Answer','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry'];(function(_0x3074f3,_0x4f2c03){var _0x53f112=function(_0x4a17af){while(--_0x4a17af){_0x3074f3['push'](_0x3074f3['shift']());}};_0x53f112(++_0x4f2c03);}(_0x0ea4,0x1ec));var _0x40ea=function(_0x4226e5,_0x14fd26){_0x4226e5=_0x4226e5-0x0;var _0x1dcd33=_0x0ea4[_0x4226e5];return _0x1dcd33;};'use strict';var moment=require(_0x40ea('0x0'));var utils=require(_0x40ea('0x1'));function AgentComplete(_0x4323ef,_0x30cae4){this[_0x40ea('0x2')]=0x4;this[_0x40ea('0x3')]=_0x40ea('0x4');this[_0x40ea('0x5')]=_0x4323ef[_0x40ea('0x5')];this[_0x40ea('0x6')]=_0x4323ef['type'];this[_0x40ea('0x7')]=_0x4323ef['type']===_0x40ea('0x8')?_0x40ea('0x9'):_0x4323ef[_0x40ea('0x6')];this['countbusyretry']=_0x4323ef[_0x40ea('0xa')];this[_0x40ea('0xb')]=_0x4323ef[_0x40ea('0xb')];this[_0x40ea('0xc')]=_0x4323ef[_0x40ea('0xc')];this[_0x40ea('0xd')]=_0x4323ef['countbusyretry']+_0x4323ef['countcongestionretry']+_0x4323ef[_0x40ea('0xc')]+_0x4323ef[_0x40ea('0xe')]+_0x4323ef[_0x40ea('0xf')]+_0x4323ef[_0x40ea('0x10')]+_0x4323ef[_0x40ea('0x11')]+_0x4323ef[_0x40ea('0x12')];this[_0x40ea('0xe')]=_0x4323ef[_0x40ea('0xe')];this[_0x40ea('0xf')]=_0x4323ef[_0x40ea('0xf')];this[_0x40ea('0x10')]=_0x4323ef[_0x40ea('0x10')];this['countmachineretry']=_0x4323ef[_0x40ea('0x11')];this[_0x40ea('0x12')]=_0x4323ef[_0x40ea('0x12')];this[_0x40ea('0x13')]=_0x30cae4['uniqueid'];this['calleridname']=_0x4323ef['name'];this[_0x40ea('0x14')]=_0x4323ef[_0x40ea('0x15')];this['starttime']=_0x4323ef[_0x40ea('0x16')];this['responsetime']=_0x4323ef[_0x40ea('0x17')];this[_0x40ea('0x18')]=_0x4323ef[_0x40ea('0x18')];this[_0x40ea('0x19')]=moment()[_0x40ea('0x1a')](_0x40ea('0x1b'));this[_0x40ea('0x1c')]=utils[_0x40ea('0x1d')](_0x4323ef[_0x40ea('0x17')],_0x4323ef[_0x40ea('0x16')]);this[_0x40ea('0x1e')]=utils['getSeconds'](_0x4323ef[_0x40ea('0x18')],_0x4323ef['responsetime']);this[_0x40ea('0x1f')]=utils[_0x40ea('0x1d')](this['endtime'],_0x4323ef[_0x40ea('0x18')]);this['queue']=_0x30cae4[_0x40ea('0x9')];this['membername']=_0x30cae4['membername'];this['reason']=_0x30cae4['reason'];this[_0x40ea('0x20')]=_0x4323ef['callback'];this['callbackuniqueid']=_0x4323ef['callbackuniqueid'];this[_0x40ea('0x21')]=_0x4323ef[_0x40ea('0x21')];this[_0x40ea('0x22')]=_0x4323ef['recallme'];this[_0x40ea('0x23')]=_0x4323ef[_0x40ea('0x23')];this['ListId']=_0x4323ef['ListId'];this['UserId']=_0x4323ef['UserId'];this[_0x40ea('0x24')]=_0x4323ef['VoiceQueueId'];this[_0x40ea('0x25')]=_0x4323ef[_0x40ea('0x25')];this[_0x40ea('0x26')]=_0x4323ef[_0x40ea('0x26')]||'';this[_0x40ea('0x27')]=_0x4323ef[_0x40ea('0x27')]||'';this[_0x40ea('0x28')]=_0x4323ef[_0x40ea('0x28')];}module[_0x40ea('0x29')]=AgentComplete;
\ No newline at end of file
+var _0xe736=['starttime','responsetime','answertime','endtime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime','holdtime','getSeconds','talktime','membername','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','agiafterat','exports','../utils','state','Answer','scheduledat','type','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countabandonedretry','countmachineretry','countagentrejectretry','countdropretry','uniqueid','name','calleridnum'];(function(_0x442bdf,_0x2846b8){var _0x20001d=function(_0x1b9644){while(--_0x1b9644){_0x442bdf['push'](_0x442bdf['shift']());}};_0x20001d(++_0x2846b8);}(_0xe736,0x1d1));var _0x6e73=function(_0x9f8cde,_0x31885a){_0x9f8cde=_0x9f8cde-0x0;var _0x3ae74c=_0xe736[_0x9f8cde];return _0x3ae74c;};'use strict';var moment=require('moment');var utils=require(_0x6e73('0x0'));function AgentComplete(_0x7fe512,_0x2de4ee){this[_0x6e73('0x1')]=0x4;this['statedesc']=_0x6e73('0x2');this['scheduledat']=_0x7fe512[_0x6e73('0x3')];this[_0x6e73('0x4')]=_0x7fe512[_0x6e73('0x4')];this['campaigntype']=_0x7fe512[_0x6e73('0x4')]===_0x6e73('0x5')?_0x6e73('0x6'):_0x7fe512['type'];this[_0x6e73('0x7')]=_0x7fe512['countbusyretry'];this[_0x6e73('0x8')]=_0x7fe512[_0x6e73('0x8')];this[_0x6e73('0x9')]=_0x7fe512[_0x6e73('0x9')];this[_0x6e73('0xa')]=_0x7fe512[_0x6e73('0x7')]+_0x7fe512[_0x6e73('0x8')]+_0x7fe512['countnoanswerretry']+_0x7fe512[_0x6e73('0xb')]+_0x7fe512['countdropretry']+_0x7fe512[_0x6e73('0xc')]+_0x7fe512[_0x6e73('0xd')]+_0x7fe512[_0x6e73('0xe')];this[_0x6e73('0xb')]=_0x7fe512[_0x6e73('0xb')];this['countdropretry']=_0x7fe512[_0x6e73('0xf')];this[_0x6e73('0xc')]=_0x7fe512['countabandonedretry'];this[_0x6e73('0xd')]=_0x7fe512['countmachineretry'];this[_0x6e73('0xe')]=_0x7fe512[_0x6e73('0xe')];this[_0x6e73('0x10')]=_0x2de4ee['uniqueid'];this['calleridname']=_0x7fe512[_0x6e73('0x11')];this[_0x6e73('0x12')]=_0x7fe512['number'];this[_0x6e73('0x13')]=_0x7fe512['starttime'];this[_0x6e73('0x14')]=_0x7fe512[_0x6e73('0x14')];this[_0x6e73('0x15')]=_0x7fe512[_0x6e73('0x15')];this[_0x6e73('0x16')]=moment()[_0x6e73('0x17')](_0x6e73('0x18'));this[_0x6e73('0x19')]=utils['getSeconds'](_0x7fe512[_0x6e73('0x14')],_0x7fe512[_0x6e73('0x13')]);this[_0x6e73('0x1a')]=utils[_0x6e73('0x1b')](_0x7fe512[_0x6e73('0x15')],_0x7fe512[_0x6e73('0x14')]);this[_0x6e73('0x1c')]=utils[_0x6e73('0x1b')](this[_0x6e73('0x16')],_0x7fe512['answertime']);this[_0x6e73('0x6')]=_0x2de4ee[_0x6e73('0x6')];this[_0x6e73('0x1d')]=_0x2de4ee[_0x6e73('0x1d')];this[_0x6e73('0x1e')]=_0x2de4ee[_0x6e73('0x1e')];this[_0x6e73('0x1f')]=_0x7fe512['callback'];this['callbackuniqueid']=_0x7fe512[_0x6e73('0x20')];this[_0x6e73('0x21')]=_0x7fe512[_0x6e73('0x21')];this[_0x6e73('0x22')]=_0x7fe512['recallme'];this['ContactId']=_0x7fe512[_0x6e73('0x23')];this[_0x6e73('0x24')]=_0x7fe512[_0x6e73('0x24')];this[_0x6e73('0x25')]=_0x7fe512[_0x6e73('0x25')];this[_0x6e73('0x26')]=_0x7fe512[_0x6e73('0x26')];this[_0x6e73('0x27')]=_0x7fe512[_0x6e73('0x27')];this[_0x6e73('0x28')]=_0x7fe512[_0x6e73('0x28')]||'';this[_0x6e73('0x29')]=_0x7fe512[_0x6e73('0x29')]||'';this[_0x6e73('0x2a')]=_0x7fe512[_0x6e73('0x2a')];}module[_0x6e73('0x2b')]=AgentComplete;
\ No newline at end of file
index 77ad34c..63c8b40 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x04a8=['talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','state','statedesc','exports','uniqueid','scheduledat','type','campaigntype','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countabandonedretry','countmachineretry','countagentrejectretry','countnosuchnumberretry','countdropretry','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime'];(function(_0x374dce,_0x17c32d){var _0x2a7745=function(_0x4a04bf){while(--_0x4a04bf){_0x374dce['push'](_0x374dce['shift']());}};_0x2a7745(++_0x17c32d);}(_0x04a8,0x10b));var _0x804a=function(_0x494f39,_0x1525de){_0x494f39=_0x494f39-0x0;var _0x2e53cc=_0x04a8[_0x494f39];return _0x2e53cc;};'use strict';function Final(_0x4d8685){this[_0x804a('0x0')]=_0x4d8685[_0x804a('0x0')];this[_0x804a('0x1')]=_0x4d8685[_0x804a('0x1')];this[_0x804a('0x2')]=_0x4d8685['type'];this[_0x804a('0x3')]=_0x4d8685['type']==='outbound'?_0x804a('0x4'):_0x4d8685[_0x804a('0x2')];this[_0x804a('0x5')]=_0x4d8685['countbusyretry'];this[_0x804a('0x6')]=_0x4d8685[_0x804a('0x6')];this[_0x804a('0x7')]=_0x4d8685[_0x804a('0x7')];this[_0x804a('0x8')]=_0x4d8685[_0x804a('0x5')]+_0x4d8685[_0x804a('0x6')]+_0x4d8685[_0x804a('0x7')]+_0x4d8685['countnosuchnumberretry']+_0x4d8685['countdropretry']+_0x4d8685[_0x804a('0x9')]+_0x4d8685[_0x804a('0xa')]+_0x4d8685[_0x804a('0xb')];this['countnosuchnumberretry']=_0x4d8685[_0x804a('0xc')];this['countdropretry']=_0x4d8685[_0x804a('0xd')];this[_0x804a('0x9')]=_0x4d8685[_0x804a('0x9')];this[_0x804a('0xa')]=_0x4d8685[_0x804a('0xa')];this[_0x804a('0xb')]=_0x4d8685[_0x804a('0xb')];this['queue']=_0x4d8685[_0x804a('0x4')];this[_0x804a('0xe')]=_0x4d8685[_0x804a('0xe')];this[_0x804a('0xf')]=_0x4d8685[_0x804a('0xf')];this[_0x804a('0x10')]=_0x4d8685[_0x804a('0x10')];this['responsetime']=_0x4d8685[_0x804a('0x11')];this[_0x804a('0x12')]=_0x4d8685[_0x804a('0x11')];this[_0x804a('0x13')]=_0x4d8685[_0x804a('0x13')]||0x0;this['holdtime']=_0x4d8685[_0x804a('0x14')]||0x0;this[_0x804a('0x15')]=_0x4d8685['talktime']||0x0;this[_0x804a('0x16')]=_0x4d8685[_0x804a('0x16')];this[_0x804a('0x17')]=_0x4d8685[_0x804a('0x17')];this['callbackat']=_0x4d8685[_0x804a('0x18')];this[_0x804a('0x19')]=_0x4d8685[_0x804a('0x19')];this[_0x804a('0x1a')]=_0x4d8685[_0x804a('0x1a')];this[_0x804a('0x1b')]=_0x4d8685[_0x804a('0x1b')];this[_0x804a('0x1c')]=_0x4d8685[_0x804a('0x1c')];this[_0x804a('0x1d')]=_0x4d8685['VoiceQueueId'];this[_0x804a('0x1e')]=_0x4d8685[_0x804a('0x1e')];this[_0x804a('0x1f')]=_0x4d8685['originatecalleridnum']||'';this[_0x804a('0x20')]=_0x4d8685[_0x804a('0x20')]||'';this[_0x804a('0x21')]=_0x4d8685[_0x804a('0x21')];this[_0x804a('0x22')]=_0x4d8685[_0x804a('0x22')];}module[_0x804a('0x23')]=Final;
\ No newline at end of file
+var _0x70be=['countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','queue','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','state','statedesc','exports','uniqueid','type','outbound','countbusyretry','countnoanswerretry','countglobal','countcongestionretry','countnosuchnumberretry'];(function(_0x4e0a03,_0x5eb6b0){var _0x2478fc=function(_0x59afcc){while(--_0x59afcc){_0x4e0a03['push'](_0x4e0a03['shift']());}};_0x2478fc(++_0x5eb6b0);}(_0x70be,0x179));var _0xe70b=function(_0xeb5e2f,_0x2c2352){_0xeb5e2f=_0xeb5e2f-0x0;var _0x3f014c=_0x70be[_0xeb5e2f];return _0x3f014c;};'use strict';function Final(_0x516faf){this[_0xe70b('0x0')]=_0x516faf['uniqueid'];this['scheduledat']=_0x516faf['scheduledat'];this[_0xe70b('0x1')]=_0x516faf['type'];this['campaigntype']=_0x516faf[_0xe70b('0x1')]===_0xe70b('0x2')?'queue':_0x516faf[_0xe70b('0x1')];this[_0xe70b('0x3')]=_0x516faf[_0xe70b('0x3')];this['countcongestionretry']=_0x516faf['countcongestionretry'];this[_0xe70b('0x4')]=_0x516faf[_0xe70b('0x4')];this[_0xe70b('0x5')]=_0x516faf['countbusyretry']+_0x516faf[_0xe70b('0x6')]+_0x516faf['countnoanswerretry']+_0x516faf[_0xe70b('0x7')]+_0x516faf[_0xe70b('0x8')]+_0x516faf[_0xe70b('0x9')]+_0x516faf[_0xe70b('0xa')]+_0x516faf[_0xe70b('0xb')];this[_0xe70b('0x7')]=_0x516faf[_0xe70b('0x7')];this[_0xe70b('0x8')]=_0x516faf[_0xe70b('0x8')];this['countabandonedretry']=_0x516faf[_0xe70b('0x9')];this[_0xe70b('0xa')]=_0x516faf['countmachineretry'];this[_0xe70b('0xb')]=_0x516faf[_0xe70b('0xb')];this['queue']=_0x516faf[_0xe70b('0xc')];this[_0xe70b('0xd')]=_0x516faf[_0xe70b('0xd')];this[_0xe70b('0xe')]=_0x516faf[_0xe70b('0xe')];this[_0xe70b('0xf')]=_0x516faf[_0xe70b('0xf')];this[_0xe70b('0x10')]=_0x516faf[_0xe70b('0x10')];this[_0xe70b('0x11')]=_0x516faf[_0xe70b('0x10')];this[_0xe70b('0x12')]=_0x516faf[_0xe70b('0x12')]||0x0;this[_0xe70b('0x13')]=_0x516faf[_0xe70b('0x13')]||0x0;this[_0xe70b('0x14')]=_0x516faf[_0xe70b('0x14')]||0x0;this[_0xe70b('0x15')]=_0x516faf[_0xe70b('0x15')];this['callbackuniqueid']=_0x516faf[_0xe70b('0x16')];this[_0xe70b('0x17')]=_0x516faf[_0xe70b('0x17')];this[_0xe70b('0x18')]=_0x516faf[_0xe70b('0x18')];this[_0xe70b('0x19')]=_0x516faf[_0xe70b('0x19')];this[_0xe70b('0x1a')]=_0x516faf['ListId'];this[_0xe70b('0x1b')]=_0x516faf[_0xe70b('0x1b')];this[_0xe70b('0x1c')]=_0x516faf[_0xe70b('0x1c')];this[_0xe70b('0x1d')]=_0x516faf[_0xe70b('0x1d')];this[_0xe70b('0x1e')]=_0x516faf[_0xe70b('0x1e')]||'';this[_0xe70b('0x1f')]=_0x516faf[_0xe70b('0x1f')]||'';this[_0xe70b('0x20')]=_0x516faf[_0xe70b('0x20')];this[_0xe70b('0x21')]=_0x516faf['statedesc'];}module[_0xe70b('0x22')]=Final;
\ No newline at end of file
index 0f8f541..3651677 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbb9c=['outbound','queue','amd','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countagentrejectretry','countmachineretry','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','endtime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime','getSeconds','holdtime','talktime','membername','IVR','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','exports','moment','../utils','statedesc','Answer','scheduledat','type'];(function(_0x48caf9,_0x561dcb){var _0x42a263=function(_0x1282c7){while(--_0x1282c7){_0x48caf9['push'](_0x48caf9['shift']());}};_0x42a263(++_0x561dcb);}(_0xbb9c,0x18f));var _0xcbb9=function(_0x12aaee,_0x5bf50c){_0x12aaee=_0x12aaee-0x0;var _0x37c350=_0xbb9c[_0x12aaee];return _0x37c350;};'use strict';var moment=require(_0xcbb9('0x0'));var utils=require(_0xcbb9('0x1'));function Hangup(_0x5d6676,_0x441fa){this['state']=0x4;this[_0xcbb9('0x2')]=_0xcbb9('0x3');this[_0xcbb9('0x4')]=_0x5d6676[_0xcbb9('0x4')];this[_0xcbb9('0x5')]=_0x5d6676[_0xcbb9('0x5')];this['campaigntype']=_0x5d6676['type']===_0xcbb9('0x6')?_0xcbb9('0x7'):_0x5d6676[_0xcbb9('0x5')];this[_0xcbb9('0x8')]=_0x5d6676[_0xcbb9('0x8')]||![];this['countbusyretry']=_0x5d6676[_0xcbb9('0x9')];this[_0xcbb9('0xa')]=_0x5d6676['countcongestionretry'];this[_0xcbb9('0xb')]=_0x5d6676[_0xcbb9('0xb')];this[_0xcbb9('0xc')]=_0x5d6676[_0xcbb9('0x9')]+_0x5d6676[_0xcbb9('0xa')]+_0x5d6676[_0xcbb9('0xb')]+_0x5d6676[_0xcbb9('0xd')]+_0x5d6676[_0xcbb9('0xe')]+_0x5d6676[_0xcbb9('0xf')]+_0x5d6676['countmachineretry']+_0x5d6676[_0xcbb9('0x10')];this[_0xcbb9('0xd')]=_0x5d6676[_0xcbb9('0xd')];this[_0xcbb9('0xe')]=_0x5d6676[_0xcbb9('0xe')];this[_0xcbb9('0xf')]=_0x5d6676[_0xcbb9('0xf')];this[_0xcbb9('0x11')]=_0x5d6676[_0xcbb9('0x11')];this[_0xcbb9('0x10')]=_0x5d6676['countagentrejectretry'];this[_0xcbb9('0x12')]=_0x441fa[_0xcbb9('0x12')];this[_0xcbb9('0x13')]=_0x5d6676[_0xcbb9('0x14')];this[_0xcbb9('0x15')]=_0x5d6676[_0xcbb9('0x16')];this[_0xcbb9('0x17')]=_0x5d6676['starttime'];this[_0xcbb9('0x18')]=_0x5d6676[_0xcbb9('0x18')];this[_0xcbb9('0x19')]=moment()[_0xcbb9('0x1a')](_0xcbb9('0x1b'));this[_0xcbb9('0x1c')]=utils[_0xcbb9('0x1d')](_0x5d6676[_0xcbb9('0x18')],_0x5d6676['starttime']);this[_0xcbb9('0x1e')]=0x0;this[_0xcbb9('0x1f')]=utils[_0xcbb9('0x1d')](this[_0xcbb9('0x19')],_0x5d6676['responsetime']);this['queue']=_0x5d6676[_0xcbb9('0x7')];this[_0xcbb9('0x20')]=_0xcbb9('0x21');this[_0xcbb9('0x22')]=_0x441fa['cause-txt'];this[_0xcbb9('0x23')]=_0x5d6676['callback'];this[_0xcbb9('0x24')]=_0x5d6676[_0xcbb9('0x24')];this[_0xcbb9('0x25')]=_0x5d6676[_0xcbb9('0x25')];this[_0xcbb9('0x26')]=_0x5d6676[_0xcbb9('0x26')];this[_0xcbb9('0x27')]=_0x5d6676['ContactId'];this[_0xcbb9('0x28')]=_0x5d6676[_0xcbb9('0x28')];this[_0xcbb9('0x29')]=_0x5d6676['UserId'];this['VoiceQueueId']=_0x5d6676[_0xcbb9('0x2a')];this[_0xcbb9('0x2b')]=_0x5d6676['CampaignId'];}module[_0xcbb9('0x2c')]=Hangup;
\ No newline at end of file
+var _0xdeed=['IVR','reason','cause-txt','callbackuniqueid','callbackat','recallme','ContactId','ListId','VoiceQueueId','CampaignId','exports','../utils','state','Answer','scheduledat','type','outbound','amd','countbusyretry','countcongestionretry','countglobal','countnoanswerretry','countdropretry','countabandonedretry','countagentrejectretry','countnosuchnumberretry','countmachineretry','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','endtime','YYYY-MM-DD\x20HH:mm:ss','ringtime','getSeconds','talktime','queue','membername'];(function(_0x5c14f6,_0x2979d8){var _0x4949b3=function(_0xcc4206){while(--_0xcc4206){_0x5c14f6['push'](_0x5c14f6['shift']());}};_0x4949b3(++_0x2979d8);}(_0xdeed,0xaf));var _0xddee=function(_0x5cc5cb,_0x392abe){_0x5cc5cb=_0x5cc5cb-0x0;var _0x41f677=_0xdeed[_0x5cc5cb];return _0x41f677;};'use strict';var moment=require('moment');var utils=require(_0xddee('0x0'));function Hangup(_0x247a03,_0x50ff27){this[_0xddee('0x1')]=0x4;this['statedesc']=_0xddee('0x2');this['scheduledat']=_0x247a03[_0xddee('0x3')];this[_0xddee('0x4')]=_0x247a03[_0xddee('0x4')];this['campaigntype']=_0x247a03['type']===_0xddee('0x5')?'queue':_0x247a03['type'];this[_0xddee('0x6')]=_0x247a03[_0xddee('0x6')]||![];this[_0xddee('0x7')]=_0x247a03['countbusyretry'];this['countcongestionretry']=_0x247a03[_0xddee('0x8')];this['countnoanswerretry']=_0x247a03['countnoanswerretry'];this[_0xddee('0x9')]=_0x247a03[_0xddee('0x7')]+_0x247a03[_0xddee('0x8')]+_0x247a03[_0xddee('0xa')]+_0x247a03['countnosuchnumberretry']+_0x247a03[_0xddee('0xb')]+_0x247a03[_0xddee('0xc')]+_0x247a03['countmachineretry']+_0x247a03[_0xddee('0xd')];this['countnosuchnumberretry']=_0x247a03[_0xddee('0xe')];this[_0xddee('0xb')]=_0x247a03['countdropretry'];this[_0xddee('0xc')]=_0x247a03[_0xddee('0xc')];this[_0xddee('0xf')]=_0x247a03['countmachineretry'];this[_0xddee('0xd')]=_0x247a03[_0xddee('0xd')];this[_0xddee('0x10')]=_0x50ff27[_0xddee('0x10')];this[_0xddee('0x11')]=_0x247a03[_0xddee('0x12')];this[_0xddee('0x13')]=_0x247a03[_0xddee('0x14')];this[_0xddee('0x15')]=_0x247a03['starttime'];this['responsetime']=_0x247a03[_0xddee('0x16')];this[_0xddee('0x17')]=moment()['format'](_0xddee('0x18'));this[_0xddee('0x19')]=utils[_0xddee('0x1a')](_0x247a03[_0xddee('0x16')],_0x247a03[_0xddee('0x15')]);this['holdtime']=0x0;this[_0xddee('0x1b')]=utils[_0xddee('0x1a')](this['endtime'],_0x247a03[_0xddee('0x16')]);this[_0xddee('0x1c')]=_0x247a03[_0xddee('0x1c')];this[_0xddee('0x1d')]=_0xddee('0x1e');this[_0xddee('0x1f')]=_0x50ff27[_0xddee('0x20')];this['callback']=_0x247a03['callback'];this['callbackuniqueid']=_0x247a03[_0xddee('0x21')];this[_0xddee('0x22')]=_0x247a03['callbackat'];this[_0xddee('0x23')]=_0x247a03[_0xddee('0x23')];this[_0xddee('0x24')]=_0x247a03[_0xddee('0x24')];this[_0xddee('0x25')]=_0x247a03['ListId'];this['UserId']=_0x247a03['UserId'];this['VoiceQueueId']=_0x247a03[_0xddee('0x26')];this['CampaignId']=_0x247a03[_0xddee('0x27')];}module[_0xddee('0x28')]=Hangup;
\ No newline at end of file
index d36d4ff..a09540d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x560b=['countnoanswerretry','countglobal','countnosuchnumberretry','countabandonedretry','countmachineretry','countagentrejectretry','countdropretry','calleridname','calleridnum','number','starttime','responsetime','ringtime','getSeconds','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','state','statedesc','uniqueid','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry'];(function(_0x3537fb,_0x2c9d40){var _0xb91e66=function(_0x2026bd){while(--_0x2026bd){_0x3537fb['push'](_0x3537fb['shift']());}};_0xb91e66(++_0x2c9d40);}(_0x560b,0x118));var _0xb560=function(_0x2704a7,_0x4e4c8f){_0x2704a7=_0x2704a7-0x0;var _0x1612c6=_0x560b[_0x2704a7];return _0x1612c6;};'use strict';var utils=require('../utils');function History(_0x2fefe0){this[_0xb560('0x0')]=_0x2fefe0[_0xb560('0x0')];this[_0xb560('0x1')]=_0x2fefe0['scheduledat']||undefined;this[_0xb560('0x2')]=_0x2fefe0[_0xb560('0x2')];this[_0xb560('0x3')]=_0x2fefe0['type']===_0xb560('0x4')?_0xb560('0x5'):_0x2fefe0[_0xb560('0x2')];this['countbusyretry']=_0x2fefe0[_0xb560('0x6')];this[_0xb560('0x7')]=_0x2fefe0[_0xb560('0x7')];this[_0xb560('0x8')]=_0x2fefe0[_0xb560('0x8')];this[_0xb560('0x9')]=_0x2fefe0['countbusyretry']+_0x2fefe0[_0xb560('0x7')]+_0x2fefe0[_0xb560('0x8')]+_0x2fefe0[_0xb560('0xa')]+_0x2fefe0['countdropretry']+_0x2fefe0[_0xb560('0xb')]+_0x2fefe0[_0xb560('0xc')]+_0x2fefe0[_0xb560('0xd')];this[_0xb560('0xa')]=_0x2fefe0['countnosuchnumberretry'];this[_0xb560('0xe')]=_0x2fefe0[_0xb560('0xe')];this['countabandonedretry']=_0x2fefe0[_0xb560('0xb')];this['countmachineretry']=_0x2fefe0[_0xb560('0xc')];this['countagentrejectretry']=_0x2fefe0[_0xb560('0xd')];this[_0xb560('0x5')]=_0x2fefe0['queue'];this[_0xb560('0xf')]=_0x2fefe0['name'];this[_0xb560('0x10')]=_0x2fefe0[_0xb560('0x11')];this[_0xb560('0x12')]=_0x2fefe0['starttime'];this[_0xb560('0x13')]=_0x2fefe0[_0xb560('0x13')];this['endtime']=_0x2fefe0['responsetime'];this[_0xb560('0x14')]=utils[_0xb560('0x15')](_0x2fefe0[_0xb560('0x13')],_0x2fefe0[_0xb560('0x12')]);this[_0xb560('0x16')]=0x0;this[_0xb560('0x17')]=0x0;this['callback']=_0x2fefe0[_0xb560('0x18')];this[_0xb560('0x19')]=_0x2fefe0[_0xb560('0x19')];this[_0xb560('0x1a')]=_0x2fefe0[_0xb560('0x1a')];this[_0xb560('0x1b')]=_0x2fefe0[_0xb560('0x1b')];this[_0xb560('0x1c')]=_0x2fefe0[_0xb560('0x1c')];this[_0xb560('0x1d')]=_0x2fefe0[_0xb560('0x1d')];this['UserId']=_0x2fefe0['UserId'];this[_0xb560('0x1e')]=_0x2fefe0[_0xb560('0x1e')];this[_0xb560('0x1f')]=_0x2fefe0[_0xb560('0x1f')];this[_0xb560('0x20')]=_0x2fefe0[_0xb560('0x20')]||'';this[_0xb560('0x21')]=_0x2fefe0[_0xb560('0x21')]||'';this[_0xb560('0x22')]=_0x2fefe0[_0xb560('0x22')];this[_0xb560('0x23')]=_0x2fefe0[_0xb560('0x23')];}module['exports']=History;
\ No newline at end of file
+var _0x559a=['number','starttime','responsetime','endtime','ringtime','getSeconds','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','state','statedesc','exports','../utils','uniqueid','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countmachineretry','countagentrejectretry','countabandonedretry','calleridname','name','calleridnum'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x559a,0xe3));var _0xa559=function(_0x272cf5,_0x194b2e){_0x272cf5=_0x272cf5-0x0;var _0x103505=_0x559a[_0x272cf5];return _0x103505;};'use strict';var utils=require(_0xa559('0x0'));function History(_0x191c3d){this[_0xa559('0x1')]=_0x191c3d[_0xa559('0x1')];this['scheduledat']=_0x191c3d[_0xa559('0x2')]||undefined;this[_0xa559('0x3')]=_0x191c3d['type'];this[_0xa559('0x4')]=_0x191c3d[_0xa559('0x3')]===_0xa559('0x5')?_0xa559('0x6'):_0x191c3d[_0xa559('0x3')];this[_0xa559('0x7')]=_0x191c3d[_0xa559('0x7')];this[_0xa559('0x8')]=_0x191c3d[_0xa559('0x8')];this[_0xa559('0x9')]=_0x191c3d['countnoanswerretry'];this[_0xa559('0xa')]=_0x191c3d['countbusyretry']+_0x191c3d[_0xa559('0x8')]+_0x191c3d[_0xa559('0x9')]+_0x191c3d[_0xa559('0xb')]+_0x191c3d[_0xa559('0xc')]+_0x191c3d['countabandonedretry']+_0x191c3d[_0xa559('0xd')]+_0x191c3d[_0xa559('0xe')];this[_0xa559('0xb')]=_0x191c3d['countnosuchnumberretry'];this[_0xa559('0xc')]=_0x191c3d[_0xa559('0xc')];this[_0xa559('0xf')]=_0x191c3d['countabandonedretry'];this[_0xa559('0xd')]=_0x191c3d['countmachineretry'];this[_0xa559('0xe')]=_0x191c3d['countagentrejectretry'];this[_0xa559('0x6')]=_0x191c3d[_0xa559('0x6')];this[_0xa559('0x10')]=_0x191c3d[_0xa559('0x11')];this[_0xa559('0x12')]=_0x191c3d[_0xa559('0x13')];this['starttime']=_0x191c3d[_0xa559('0x14')];this[_0xa559('0x15')]=_0x191c3d[_0xa559('0x15')];this[_0xa559('0x16')]=_0x191c3d[_0xa559('0x15')];this[_0xa559('0x17')]=utils[_0xa559('0x18')](_0x191c3d['responsetime'],_0x191c3d['starttime']);this[_0xa559('0x19')]=0x0;this[_0xa559('0x1a')]=0x0;this[_0xa559('0x1b')]=_0x191c3d[_0xa559('0x1b')];this[_0xa559('0x1c')]=_0x191c3d[_0xa559('0x1c')];this[_0xa559('0x1d')]=_0x191c3d[_0xa559('0x1d')];this[_0xa559('0x1e')]=_0x191c3d['recallme'];this[_0xa559('0x1f')]=_0x191c3d[_0xa559('0x1f')];this[_0xa559('0x20')]=_0x191c3d['ListId'];this['UserId']=_0x191c3d[_0xa559('0x21')];this[_0xa559('0x22')]=_0x191c3d[_0xa559('0x22')];this[_0xa559('0x23')]=_0x191c3d[_0xa559('0x23')];this['originatecalleridnum']=_0x191c3d[_0xa559('0x24')]||'';this[_0xa559('0x25')]=_0x191c3d[_0xa559('0x25')]||'';this[_0xa559('0x26')]=_0x191c3d[_0xa559('0x26')];this[_0xa559('0x27')]=_0x191c3d[_0xa559('0x27')];}module[_0xa559('0x28')]=History;
\ No newline at end of file
index 249599b..e26bed4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf3cb=['countcongestionretry','countnoanswerretry','countglobal','countdropretry','countabandonedretry','countmachineretry','countnosuchnumberretry','countagentrejectretry','uniqueid','calleridname','calleridnum','number','starttime','responsetime','droptime','dropreason','endtime','getSeconds','holdtime','queue','membername','connectedlinename','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','agiafterat','state','statedesc','../utils','scheduledat','type','campaigntype','countbusyretry'];(function(_0x28db45,_0x4ea2c1){var _0x4d0f1e=function(_0x2ca771){while(--_0x2ca771){_0x28db45['push'](_0x28db45['shift']());}};_0x4d0f1e(++_0x4ea2c1);}(_0xf3cb,0x175));var _0xbf3c=function(_0x3c816,_0x202e96){_0x3c816=_0x3c816-0x0;var _0xb82f08=_0xf3cb[_0x3c816];return _0xb82f08;};'use strict';var utils=require(_0xbf3c('0x0'));function QueueCallerAbandon(_0x4eb4c0,_0x2f2ed5){this[_0xbf3c('0x1')]=_0x4eb4c0[_0xbf3c('0x1')];this[_0xbf3c('0x2')]=_0x4eb4c0[_0xbf3c('0x2')];this[_0xbf3c('0x3')]=_0x4eb4c0['type']==='outbound'?'queue':_0x4eb4c0[_0xbf3c('0x2')];this[_0xbf3c('0x4')]=_0x4eb4c0['countbusyretry'];this[_0xbf3c('0x5')]=_0x4eb4c0[_0xbf3c('0x5')];this[_0xbf3c('0x6')]=_0x4eb4c0['countnoanswerretry'];this[_0xbf3c('0x7')]=_0x4eb4c0[_0xbf3c('0x4')]+_0x4eb4c0[_0xbf3c('0x5')]+_0x4eb4c0['countnoanswerretry']+_0x4eb4c0['countnosuchnumberretry']+_0x4eb4c0[_0xbf3c('0x8')]+_0x4eb4c0[_0xbf3c('0x9')]+_0x4eb4c0[_0xbf3c('0xa')]+_0x4eb4c0['countagentrejectretry'];this[_0xbf3c('0xb')]=_0x4eb4c0[_0xbf3c('0xb')];this[_0xbf3c('0x8')]=_0x4eb4c0[_0xbf3c('0x8')];this[_0xbf3c('0x9')]=_0x4eb4c0[_0xbf3c('0x9')];this[_0xbf3c('0xa')]=_0x4eb4c0[_0xbf3c('0xa')];this['countagentrejectretry']=_0x4eb4c0[_0xbf3c('0xc')];this[_0xbf3c('0xd')]=_0x2f2ed5[_0xbf3c('0xd')];this[_0xbf3c('0xe')]=_0x4eb4c0['name'];this[_0xbf3c('0xf')]=_0x4eb4c0[_0xbf3c('0x10')];this['starttime']=_0x4eb4c0[_0xbf3c('0x11')];this['responsetime']=_0x4eb4c0[_0xbf3c('0x12')];this['droptime']=_0x4eb4c0[_0xbf3c('0x13')];this[_0xbf3c('0x14')]=_0x4eb4c0[_0xbf3c('0x14')];this[_0xbf3c('0x15')]=this['droptime'];this['ringtime']=utils[_0xbf3c('0x16')](_0x4eb4c0[_0xbf3c('0x12')],_0x4eb4c0['starttime']);this[_0xbf3c('0x17')]=utils[_0xbf3c('0x16')](this[_0xbf3c('0x13')],_0x4eb4c0[_0xbf3c('0x12')]);this['talktime']=0x0;this['queue']=_0x2f2ed5[_0xbf3c('0x18')];this[_0xbf3c('0x19')]=_0x2f2ed5[_0xbf3c('0x1a')];this[_0xbf3c('0x1b')]=_0x2f2ed5[_0xbf3c('0x1b')];this[_0xbf3c('0x1c')]=_0x4eb4c0[_0xbf3c('0x1c')];this[_0xbf3c('0x1d')]=_0x4eb4c0[_0xbf3c('0x1d')];this[_0xbf3c('0x1e')]=_0x4eb4c0[_0xbf3c('0x1e')];this[_0xbf3c('0x1f')]=_0x4eb4c0[_0xbf3c('0x1f')];this[_0xbf3c('0x20')]=_0x4eb4c0['ContactId'];this[_0xbf3c('0x21')]=_0x4eb4c0[_0xbf3c('0x21')];this[_0xbf3c('0x22')]=_0x4eb4c0[_0xbf3c('0x22')];this['VoiceQueueId']=_0x4eb4c0[_0xbf3c('0x23')];this['CampaignId']=_0x4eb4c0[_0xbf3c('0x24')];this[_0xbf3c('0x25')]=_0x4eb4c0['originatecalleridnum']||'';this[_0xbf3c('0x26')]=_0x4eb4c0[_0xbf3c('0x26')]||'';this[_0xbf3c('0x27')]=_0x4eb4c0[_0xbf3c('0x27')];this[_0xbf3c('0x28')]=_0x4eb4c0[_0xbf3c('0x28')];this[_0xbf3c('0x29')]=_0x4eb4c0[_0xbf3c('0x29')];}module['exports']=QueueCallerAbandon;
\ No newline at end of file
+var _0x7e16=['uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','droptime','endtime','ringtime','talktime','membername','connectedlinename','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','originatecalleridnum','originatecalleridname','agiafterat','statedesc','exports','../utils','scheduledat','type','campaigntype','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countdropretry','countabandonedretry','countagentrejectretry','countnosuchnumberretry','countmachineretry'];(function(_0x3e9c8f,_0x521402){var _0x110a5a=function(_0x4130f8){while(--_0x4130f8){_0x3e9c8f['push'](_0x3e9c8f['shift']());}};_0x110a5a(++_0x521402);}(_0x7e16,0x1b5));var _0x67e1=function(_0x5209db,_0x2cfdf2){_0x5209db=_0x5209db-0x0;var _0x2fb2c2=_0x7e16[_0x5209db];return _0x2fb2c2;};'use strict';var utils=require(_0x67e1('0x0'));function QueueCallerAbandon(_0x578221,_0x3e2588){this[_0x67e1('0x1')]=_0x578221[_0x67e1('0x1')];this[_0x67e1('0x2')]=_0x578221[_0x67e1('0x2')];this[_0x67e1('0x3')]=_0x578221['type']==='outbound'?_0x67e1('0x4'):_0x578221[_0x67e1('0x2')];this['countbusyretry']=_0x578221[_0x67e1('0x5')];this[_0x67e1('0x6')]=_0x578221[_0x67e1('0x6')];this['countnoanswerretry']=_0x578221[_0x67e1('0x7')];this[_0x67e1('0x8')]=_0x578221[_0x67e1('0x5')]+_0x578221[_0x67e1('0x6')]+_0x578221[_0x67e1('0x7')]+_0x578221['countnosuchnumberretry']+_0x578221[_0x67e1('0x9')]+_0x578221[_0x67e1('0xa')]+_0x578221['countmachineretry']+_0x578221[_0x67e1('0xb')];this[_0x67e1('0xc')]=_0x578221['countnosuchnumberretry'];this[_0x67e1('0x9')]=_0x578221[_0x67e1('0x9')];this[_0x67e1('0xa')]=_0x578221['countabandonedretry'];this[_0x67e1('0xd')]=_0x578221[_0x67e1('0xd')];this[_0x67e1('0xb')]=_0x578221[_0x67e1('0xb')];this[_0x67e1('0xe')]=_0x3e2588[_0x67e1('0xe')];this[_0x67e1('0xf')]=_0x578221[_0x67e1('0x10')];this[_0x67e1('0x11')]=_0x578221[_0x67e1('0x12')];this[_0x67e1('0x13')]=_0x578221[_0x67e1('0x13')];this['responsetime']=_0x578221[_0x67e1('0x14')];this['droptime']=_0x578221[_0x67e1('0x15')];this['dropreason']=_0x578221['dropreason'];this[_0x67e1('0x16')]=this[_0x67e1('0x15')];this[_0x67e1('0x17')]=utils['getSeconds'](_0x578221[_0x67e1('0x14')],_0x578221[_0x67e1('0x13')]);this['holdtime']=utils['getSeconds'](this[_0x67e1('0x15')],_0x578221[_0x67e1('0x14')]);this[_0x67e1('0x18')]=0x0;this[_0x67e1('0x4')]=_0x3e2588[_0x67e1('0x4')];this[_0x67e1('0x19')]=_0x3e2588[_0x67e1('0x1a')];this['reason']=_0x3e2588[_0x67e1('0x1b')];this[_0x67e1('0x1c')]=_0x578221[_0x67e1('0x1c')];this[_0x67e1('0x1d')]=_0x578221['callbackuniqueid'];this[_0x67e1('0x1e')]=_0x578221[_0x67e1('0x1e')];this[_0x67e1('0x1f')]=_0x578221[_0x67e1('0x1f')];this[_0x67e1('0x20')]=_0x578221[_0x67e1('0x20')];this[_0x67e1('0x21')]=_0x578221[_0x67e1('0x21')];this['UserId']=_0x578221[_0x67e1('0x22')];this['VoiceQueueId']=_0x578221[_0x67e1('0x23')];this['CampaignId']=_0x578221['CampaignId'];this[_0x67e1('0x24')]=_0x578221[_0x67e1('0x24')]||'';this[_0x67e1('0x25')]=_0x578221[_0x67e1('0x25')]||'';this[_0x67e1('0x26')]=_0x578221['agiafterat'];this['state']=_0x578221['state'];this[_0x67e1('0x27')]=_0x578221[_0x67e1('0x27')];}module[_0x67e1('0x28')]=QueueCallerAbandon;
\ No newline at end of file
index 539e28e..75e4cc5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x01d9=['rescheduleContact','[rescheduleContact]','unlockContact','[unlockContact]','moveContactManagedDialer','[moveContactManagedDialer]','checkIsBlackList','checkIsBlackListIvr','verifyAdditionalPhones','[swapAdditionalPhone]','swapAdditionalPhones','avgHandleTime','[avgHandleTime]','createHistory','[createHistory]','util','../../../../config/logger','dialer','../../rpc/cmHopper','../../rpc/cmHopperBlack','../../rpc/cmHopperHistory','inspect','dialOrderByScheduledAt','catch','temp','error','[getContactDialer]','getContactDialer','getContactDialerIvr','countReScheduled','[countReScheduled]'];(function(_0x56df89,_0x14945b){var _0x2a1e6f=function(_0x4871de){while(--_0x4871de){_0x56df89['push'](_0x56df89['shift']());}};_0x2a1e6f(++_0x14945b);}(_0x01d9,0x6c));var _0x901d=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x01d9[_0x321bb2];return _0x9c12ed;};'use strict';var util=require(_0x901d('0x0'));var logger=require(_0x901d('0x1'))(_0x901d('0x2'));var cmHopper=require(_0x901d('0x3'));var cmHopperAdditionalPhone=require('../../rpc/cmHopperAdditionalPhone');var cmHopperBlack=require(_0x901d('0x4'));var cmHopperHistory=require(_0x901d('0x5'));function inspectError(_0x247cfc){return util[_0x901d('0x6')](_0x247cfc,{'showHidden':![],'depth':null});}function getContactDialer(_0x214f38,_0x456f31,_0xb96b86){return cmHopper['getContactDialer'](_0x214f38['id'],_0x456f31,_0xb96b86,_0x214f38[_0x901d('0x7')])[_0x901d('0x8')](function(_0x21e1d7){_0x214f38[_0x901d('0x9')]=0x0;logger[_0x901d('0xa')](_0x901d('0xb'),inspectError(_0x21e1d7));});}exports[_0x901d('0xc')]=getContactDialer;function getContactDialerIvr(_0x2555e0,_0x15076e){return cmHopper[_0x901d('0xd')](_0x2555e0['id'],_0x15076e,_0x2555e0[_0x901d('0x7')])[_0x901d('0x8')](function(_0x1d3137){_0x2555e0['temp']=0x0;logger[_0x901d('0xa')]('[getContactDialerIvr]',inspectError(_0x1d3137));});}exports[_0x901d('0xd')]=getContactDialerIvr;function countReScheduled(_0x1fd1de){return cmHopper[_0x901d('0xe')](_0x1fd1de)[_0x901d('0x8')](function(_0x15ebaf){logger['error'](_0x901d('0xf'),inspectError(_0x15ebaf));});}exports[_0x901d('0xe')]=countReScheduled;function rescheduleContact(_0x3d00e4){return cmHopper[_0x901d('0x10')](_0x3d00e4)[_0x901d('0x8')](function(_0x14d99b){logger['error'](_0x901d('0x11'),inspectError(_0x14d99b));});}exports[_0x901d('0x10')]=rescheduleContact;function unlockContact(_0x11b0cc,_0x17d451,_0x1aba97){return cmHopper[_0x901d('0x12')](_0x11b0cc,_0x17d451,_0x1aba97)[_0x901d('0x8')](function(_0x407215){logger[_0x901d('0xa')](_0x901d('0x13'),inspectError(_0x407215));});}exports[_0x901d('0x12')]=unlockContact;function moveContactManagedDialer(_0x390c33){return cmHopper[_0x901d('0x14')](_0x390c33)[_0x901d('0x8')](function(_0x38f42b){logger[_0x901d('0xa')](_0x901d('0x15'),inspectError(_0x38f42b));});}exports[_0x901d('0x14')]=moveContactManagedDialer;function checkIsBlackList(_0x57d518){return cmHopperBlack[_0x901d('0x16')](_0x57d518)[_0x901d('0x8')](function(_0x4d27db){logger['error']('[checkIsBlackList]',inspectError(_0x4d27db));});}exports['checkIsBlackList']=checkIsBlackList;function checkIsBlackListIvr(_0x316a9f){return cmHopperBlack[_0x901d('0x17')](_0x316a9f)['catch'](function(_0xd2e0ac){logger[_0x901d('0xa')]('[checkIsBlackListIvr]',inspectError(_0xd2e0ac));});}exports[_0x901d('0x17')]=checkIsBlackListIvr;function verifyAdditionalPhones(_0x53ee69,_0x2402de,_0x3f80b9){return cmHopperAdditionalPhone[_0x901d('0x18')](_0x53ee69,_0x2402de,_0x3f80b9)[_0x901d('0x8')](function(_0x46e5c6){logger[_0x901d('0xa')]('[verifyAdditionalPhone]',inspectError(_0x46e5c6));});}exports[_0x901d('0x18')]=verifyAdditionalPhones;function swapAdditionalPhones(_0x445392,_0xbc89a5,_0x1f0ee5){return cmHopperAdditionalPhone['swapAdditionalPhones'](_0x445392,_0xbc89a5,_0x1f0ee5)[_0x901d('0x8')](function(_0x23fd43){logger[_0x901d('0xa')](_0x901d('0x19'),inspectError(_0x23fd43));});}exports[_0x901d('0x1a')]=swapAdditionalPhones;function avgHandleTime(_0x56e4ec){return cmHopperHistory[_0x901d('0x1b')](_0x56e4ec)[_0x901d('0x8')](function(_0x14976e){logger[_0x901d('0xa')](_0x901d('0x1c'),inspectError(_0x14976e));});}exports[_0x901d('0x1b')]=avgHandleTime;function createHistory(_0x48e86e){return cmHopperHistory[_0x901d('0x1d')](_0x48e86e)['catch'](function(_0x128830){logger[_0x901d('0xa')](_0x901d('0x1e'),inspectError(_0x128830));});}exports[_0x901d('0x1d')]=createHistory;
\ No newline at end of file
+var _0x4819=['[unlockContact]','[moveContactManagedDialer]','moveContactManagedDialer','checkIsBlackList','[checkIsBlackList]','checkIsBlackListIvr','[checkIsBlackListIvr]','verifyAdditionalPhones','[verifyAdditionalPhone]','[swapAdditionalPhone]','avgHandleTime','createHistory','[createHistory]','../../../../config/logger','dialer','../../rpc/cmHopper','../../rpc/cmHopperAdditionalPhone','../../rpc/cmHopperBlack','../../rpc/cmHopperHistory','inspect','getContactDialer','temp','error','[getContactDialer]','dialOrderByScheduledAt','[getContactDialerIvr]','getContactDialerIvr','countReScheduled','catch','rescheduleContact','[rescheduleContact]','unlockContact'];(function(_0x5538d5,_0x190032){var _0x323b1a=function(_0x179caa){while(--_0x179caa){_0x5538d5['push'](_0x5538d5['shift']());}};_0x323b1a(++_0x190032);}(_0x4819,0xcd));var _0x9481=function(_0x3ee935,_0x293a98){_0x3ee935=_0x3ee935-0x0;var _0x586db7=_0x4819[_0x3ee935];return _0x586db7;};'use strict';var util=require('util');var logger=require(_0x9481('0x0'))(_0x9481('0x1'));var cmHopper=require(_0x9481('0x2'));var cmHopperAdditionalPhone=require(_0x9481('0x3'));var cmHopperBlack=require(_0x9481('0x4'));var cmHopperHistory=require(_0x9481('0x5'));function inspectError(_0x40a703){return util[_0x9481('0x6')](_0x40a703,{'showHidden':![],'depth':null});}function getContactDialer(_0xc39edf,_0x16c617,_0x5ac51c){return cmHopper[_0x9481('0x7')](_0xc39edf['id'],_0x16c617,_0x5ac51c,_0xc39edf['dialOrderByScheduledAt'])['catch'](function(_0x14e05a){_0xc39edf[_0x9481('0x8')]=0x0;logger[_0x9481('0x9')](_0x9481('0xa'),inspectError(_0x14e05a));});}exports[_0x9481('0x7')]=getContactDialer;function getContactDialerIvr(_0x4c7d9c,_0x1818cf){return cmHopper['getContactDialerIvr'](_0x4c7d9c['id'],_0x1818cf,_0x4c7d9c[_0x9481('0xb')])['catch'](function(_0x411d24){_0x4c7d9c[_0x9481('0x8')]=0x0;logger[_0x9481('0x9')](_0x9481('0xc'),inspectError(_0x411d24));});}exports[_0x9481('0xd')]=getContactDialerIvr;function countReScheduled(_0x29515a){return cmHopper[_0x9481('0xe')](_0x29515a)[_0x9481('0xf')](function(_0xed8e9){logger['error']('[countReScheduled]',inspectError(_0xed8e9));});}exports[_0x9481('0xe')]=countReScheduled;function rescheduleContact(_0x150276){return cmHopper[_0x9481('0x10')](_0x150276)[_0x9481('0xf')](function(_0x3d23c2){logger[_0x9481('0x9')](_0x9481('0x11'),inspectError(_0x3d23c2));});}exports['rescheduleContact']=rescheduleContact;function unlockContact(_0x4220f1,_0x7a7ee,_0x5b1fe6){return cmHopper[_0x9481('0x12')](_0x4220f1,_0x7a7ee,_0x5b1fe6)['catch'](function(_0x34108d){logger[_0x9481('0x9')](_0x9481('0x13'),inspectError(_0x34108d));});}exports[_0x9481('0x12')]=unlockContact;function moveContactManagedDialer(_0x546fce){return cmHopper['moveContactManagedDialer'](_0x546fce)[_0x9481('0xf')](function(_0x50a559){logger['error'](_0x9481('0x14'),inspectError(_0x50a559));});}exports[_0x9481('0x15')]=moveContactManagedDialer;function checkIsBlackList(_0x18c6f5){return cmHopperBlack[_0x9481('0x16')](_0x18c6f5)[_0x9481('0xf')](function(_0x3dc33f){logger['error'](_0x9481('0x17'),inspectError(_0x3dc33f));});}exports[_0x9481('0x16')]=checkIsBlackList;function checkIsBlackListIvr(_0x45f9df){return cmHopperBlack[_0x9481('0x18')](_0x45f9df)[_0x9481('0xf')](function(_0x56da97){logger[_0x9481('0x9')](_0x9481('0x19'),inspectError(_0x56da97));});}exports['checkIsBlackListIvr']=checkIsBlackListIvr;function verifyAdditionalPhones(_0x2bcf37,_0xd1cd1a,_0x352b3a){return cmHopperAdditionalPhone[_0x9481('0x1a')](_0x2bcf37,_0xd1cd1a,_0x352b3a)[_0x9481('0xf')](function(_0x49ecfa){logger[_0x9481('0x9')](_0x9481('0x1b'),inspectError(_0x49ecfa));});}exports['verifyAdditionalPhones']=verifyAdditionalPhones;function swapAdditionalPhones(_0x5eb4f5,_0x12b0c3,_0x299e28){return cmHopperAdditionalPhone['swapAdditionalPhones'](_0x5eb4f5,_0x12b0c3,_0x299e28)[_0x9481('0xf')](function(_0x20ff9a){logger[_0x9481('0x9')](_0x9481('0x1c'),inspectError(_0x20ff9a));});}exports['swapAdditionalPhones']=swapAdditionalPhones;function avgHandleTime(_0x14f03e){return cmHopperHistory[_0x9481('0x1d')](_0x14f03e)[_0x9481('0xf')](function(_0x587706){logger[_0x9481('0x9')]('[avgHandleTime]',inspectError(_0x587706));});}exports[_0x9481('0x1d')]=avgHandleTime;function createHistory(_0xe153ab){return cmHopperHistory[_0x9481('0x1e')](_0xe153ab)[_0x9481('0xf')](function(_0x2e5e63){logger['error'](_0x9481('0x1f'),inspectError(_0x2e5e63));});}exports[_0x9481('0x1e')]=createHistory;
\ No newline at end of file
index e7c14a1..476a1ee 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7673=['tags','updatedAt','undefined','XMD-','toUpperCase','toString','substring','setXMDContactVariables','lodash','moment','util','../../../../config/logger','../../../../config/environment/shared','timezones','ACTIVE','DEACTIVATED','IS_DISACTIVED','INTERVAL_IS_EMPTY','NOT_ACTIVE','AGENTS_NOT_LOGGED','AVAILABLE_CONTACTS_FINISHED','INTERVAL_IS_NULL','INTERVAL_IS_OVERTIME','GLOBAL_INTERVAL_IS_OVERTIME','RECALLINQUEUE','RECALLFAILEDTIMEOUT','RUNNING','TIMEZONE_UNKNOW','CAMPAIGN_STATUS','isPreviewCampaign','type','isIVRCampaign','outbound','isOutboundQueue','dialActive','isQueueCampaignActive','active','diff','getSeconds','dialMethod','message','available','loggedIn','loggedInDb','paused','talking','pTalking','waiting','inUse','originated','Trunk','name','hasQueueCampaignDataChanged','dialGlobalInterval','isNil','Interval','Intervals','NULL_INTERVAL','isEmpty','EMPTY_INTERVAL','SIP/','reachable','unmonitored','includes','status','TrunkBackup','INACTIVE','DISACTIVED','NO_AGENTS_LOGGED','UNREACHABLE_TRUNK','getQueueCampaignStatusMessage','getQueueCampaignActiveStatusMessage','extractCalleridName','isUndefined','string','format','\x22%s\x22\x20<%s>','\x22\x22\x20<>','getCallerId','\x5cw{0,','pow','random','getCallerIdRandom','error','[decrementOriginate]\x20queue\x20originate\x20value\x20is\x20negative','decrementOriginate','length','checkContactEmpty','checkContactLowerLimitOriginate','createdAt'];(function(_0x29c3b2,_0x3c12ac){var _0x4b3aa7=function(_0x622a9d){while(--_0x622a9d){_0x29c3b2['push'](_0x29c3b2['shift']());}};_0x4b3aa7(++_0x3c12ac);}(_0x7673,0x170));var _0x3767=function(_0x548483,_0x5e53ab){_0x548483=_0x548483-0x0;var _0x53afbd=_0x7673[_0x548483];return _0x53afbd;};'use strict';var _=require(_0x3767('0x0'));var moment=require(_0x3767('0x1'));var util=require(_0x3767('0x2'));var logger=require(_0x3767('0x3'))('dialer');var timezones=require(_0x3767('0x4'))[_0x3767('0x5')];var CAMPAIGN_STATUS={'ACTIVE':_0x3767('0x6'),'BLACKLIST':'BLACKLIST','CONTACTS_RESCHEDULED':'RESCHEDULED_CONTACTS','DEACTIVATED':_0x3767('0x7'),'DISACTIVED':_0x3767('0x8'),'EMPTY_INTERVAL':_0x3767('0x9'),'INACTIVE':_0x3767('0xa'),'NO_AGENTS_LOGGED':_0x3767('0xb'),'NO_AVAILABLE_CONTACTS':_0x3767('0xc'),'NULL_INTERVAL':_0x3767('0xd'),'OVERTIME_INTERVAL':_0x3767('0xe'),'OVERTIME_GLOBAL_INTERVAL':_0x3767('0xf'),'QUEUE_RECALL':_0x3767('0x10'),'RECALL_TIMEOUT':_0x3767('0x11'),'RUNNING':_0x3767('0x12'),'UNKNOWN_TIMEZONE':_0x3767('0x13'),'UNREACHABLE_TRUNK':'TRUNK_IS_NOT_REACHABLE'};exports[_0x3767('0x14')]=CAMPAIGN_STATUS;function isPreviewCampaign(_0x598acb){return _0x598acb['dialMethod']==='preview';}exports[_0x3767('0x15')]=isPreviewCampaign;function isIVRCampaign(_0x5ce30e){return _0x5ce30e[_0x3767('0x16')]==='ivr';}exports[_0x3767('0x17')]=isIVRCampaign;function isOutboundQueue(_0x555831){return _0x555831[_0x3767('0x16')]===_0x3767('0x18');}exports[_0x3767('0x19')]=isOutboundQueue;function isQueueCampaignActive(_0x340e6e){return _0x340e6e[_0x3767('0x1a')];}exports[_0x3767('0x1b')]=isQueueCampaignActive;function isIVRCampaignActive(_0x203b95){return _0x203b95[_0x3767('0x1c')];}exports['isIVRCampaignActive']=isIVRCampaignActive;function getSeconds(_0x2bf923,_0x1d475e){var _0x4c54f1=moment(_0x2bf923)['milliseconds'](0x0);var _0x3913a5=moment(_0x1d475e)['milliseconds'](0x0);return _0x4c54f1[_0x3767('0x1d')](_0x3913a5,'seconds');}exports[_0x3767('0x1e')]=getSeconds;function hasQueueCampaignDataChanged(_0x25e77a,_0x3b2a28){var _0x2f158d=![];var _0x3a74b7=_0x25e77a[_0x3767('0x1f')]!==_0x3b2a28[_0x3767('0x1f')]||_0x25e77a[_0x3767('0x1a')]!==_0x3b2a28[_0x3767('0x1a')]||_0x25e77a[_0x3767('0x20')]!==_0x3b2a28[_0x3767('0x20')];var _0x101ced=_0x25e77a[_0x3767('0x21')]!==_0x3b2a28[_0x3767('0x21')]||_0x25e77a[_0x3767('0x22')]!==_0x3b2a28[_0x3767('0x22')]||_0x25e77a[_0x3767('0x23')]!==_0x3b2a28['loggedInDb']||_0x25e77a['paused']!==_0x3b2a28[_0x3767('0x24')]||_0x25e77a[_0x3767('0x25')]!==_0x3b2a28[_0x3767('0x25')]||_0x25e77a[_0x3767('0x26')]!==_0x3b2a28[_0x3767('0x26')]||_0x25e77a[_0x3767('0x27')]!==_0x3b2a28[_0x3767('0x27')]||_0x25e77a[_0x3767('0x28')]!==_0x3b2a28[_0x3767('0x28')]||_0x25e77a[_0x3767('0x29')]!==_0x3b2a28[_0x3767('0x29')];if(_0x25e77a['Trunk']&&_0x3b2a28[_0x3767('0x2a')]){_0x2f158d=_0x25e77a['Trunk'][_0x3767('0x2b')]!==_0x3b2a28[_0x3767('0x2a')]['name']||_0x25e77a[_0x3767('0x2a')][_0x3767('0x1c')]!==_0x3b2a28[_0x3767('0x2a')][_0x3767('0x1c')];}return _0x3a74b7||_0x101ced||_0x2f158d;}exports[_0x3767('0x2c')]=hasQueueCampaignDataChanged;function checkAnyValidQueueCampaignInterval(_0x2d3a28){var _0x53e23f=null;var _0x470967=_0x2d3a28['dialTimezone'];if(_['isNil'](_0x2d3a28[_0x3767('0x2d')])||_[_0x3767('0x2e')](_0x2d3a28[_0x3767('0x2f')])||_[_0x3767('0x2e')](_0x2d3a28[_0x3767('0x2f')][_0x3767('0x30')])){_0x53e23f=CAMPAIGN_STATUS[_0x3767('0x31')];}else if(_[_0x3767('0x32')](_0x2d3a28[_0x3767('0x2d')])||_[_0x3767('0x32')](_0x2d3a28['Interval'][_0x3767('0x30')])){_0x53e23f=CAMPAIGN_STATUS[_0x3767('0x33')];}else if(_0x470967&&!timezones[_0x470967]){_0x53e23f=CAMPAIGN_STATUS['UNKNOWN_TIMEZONE'];}return _0x53e23f;}function checkAnyValidTrunk(_0x380aff,_0x4c81db){var _0x161e95=null;var _0x2bd1fe=_0x3767('0x34');var _0x2dc6f3=[_0x3767('0x35'),_0x3767('0x36')];var _0x39a543=!![];if(_0x380aff[_0x3767('0x2a')]&&_0x380aff[_0x3767('0x2a')]['active']){_0x2bd1fe+=_0x380aff['Trunk']['name'];_0x161e95=_0x4c81db[_0x2bd1fe];_0x39a543=_0x2dc6f3[_0x3767('0x37')](_0x161e95[_0x3767('0x38')]);}else if(_0x380aff[_0x3767('0x39')]&&_0x380aff[_0x3767('0x39')][_0x3767('0x1c')]){_0x2bd1fe+=_0x380aff['TrunkBackup'][_0x3767('0x2b')];_0x161e95=_0x4c81db[_0x2bd1fe];_0x39a543=_0x2dc6f3[_0x3767('0x37')](_0x161e95[_0x3767('0x38')]);}return _0x39a543;}function getQueueCampaignStatusMessage(_0x23aef4,_0x511535){var _0x5e77ae=CAMPAIGN_STATUS['ACTIVE'];var _0x1e858f=isPreviewCampaign(_0x23aef4);if(!isQueueCampaignActive(_0x23aef4)){if(_0x1e858f){_0x5e77ae=CAMPAIGN_STATUS[_0x3767('0x3a')];}else{if(_0x23aef4[_0x3767('0x29')]===0x0&&_0x23aef4[_0x3767('0x25')]===0x0&&_0x23aef4[_0x3767('0x27')]===0x0&&(_0x23aef4[_0x3767('0x26')]||0x0)===0x0){_0x5e77ae=CAMPAIGN_STATUS['INACTIVE'];}else{_0x5e77ae=CAMPAIGN_STATUS[_0x3767('0x3b')];}}}else if(_0x23aef4[_0x3767('0x22')]===0x0){_0x5e77ae=CAMPAIGN_STATUS[_0x3767('0x3c')];}else if(!checkAnyValidTrunk(_0x23aef4,_0x511535)){_0x5e77ae=CAMPAIGN_STATUS[_0x3767('0x3d')];}else if(!isPreviewCampaign(_0x23aef4)){var _0x23c7c2=checkAnyValidQueueCampaignInterval(_0x23aef4);if(_0x23c7c2){_0x5e77ae=_0x23c7c2;}}return _0x5e77ae;}exports[_0x3767('0x3e')]=getQueueCampaignStatusMessage;function getQueueCampaignActiveStatusMessage(_0x2e8928){var _0x18b394=CAMPAIGN_STATUS[_0x3767('0x3b')];if(_0x2e8928['originated']===0x0&&_0x2e8928['talking']===0x0&&_0x2e8928[_0x3767('0x27')]===0x0&&(_0x2e8928[_0x3767('0x26')]||0x0)===0x0){_0x18b394=CAMPAIGN_STATUS[_0x3767('0x3a')];}return _0x18b394;}exports[_0x3767('0x3f')]=getQueueCampaignActiveStatusMessage;function extractCalleridName(_0x1e733b){var _0x40ca4f=_0x1e733b['match'](/"(.*?)"/);return _0x40ca4f?_0x40ca4f[0x1]:_0x1e733b;}exports[_0x3767('0x40')]=extractCalleridName;function getCallerId(_0x20f0af,_0x16c860,_0x5e1bf7){if(!_[_0x3767('0x41')](_0x5e1bf7)&&typeof _0x5e1bf7===_0x3767('0x42')&&!_[_0x3767('0x32')](_0x5e1bf7)){if(!_['isUndefined'](_0x16c860)&&typeof _0x16c860===_0x3767('0x42')&&!_[_0x3767('0x32')](_0x16c860)){return util[_0x3767('0x43')](_0x3767('0x44'),_0x16c860,_0x5e1bf7);}return util[_0x3767('0x43')](_0x3767('0x44'),_0x5e1bf7,_0x5e1bf7);}if(!_['isUndefined'](_0x20f0af)&&typeof _0x20f0af===_0x3767('0x42')&&!_[_0x3767('0x32')](_0x20f0af)){return _0x20f0af;}return _0x3767('0x45');}exports[_0x3767('0x46')]=getCallerId;function getCallerIdRandom(_0x3fa9bc,_0x3ebf62){var _0x17c4be;var _0x3a0dfd;var _0x1523aa;if(_0x3ebf62<=0x0){_0x3ebf62=0x1;}_0x17c4be=new RegExp(_0x3767('0x47')+_0x3ebf62+'}$');_0x3a0dfd=Math[_0x3767('0x48')](0xa,_0x3ebf62-0x1);_0x1523aa=Math['pow'](0xa,_0x3ebf62)-0x1;return util[_0x3767('0x43')]('%s',_['replace'](_0x3fa9bc,_0x17c4be,_[_0x3767('0x49')](_0x3a0dfd,_0x1523aa)['toString']()));}exports[_0x3767('0x4a')]=getCallerIdRandom;function decrementOriginate(_0x1b0753){if(_0x1b0753[_0x3767('0x29')]&&_0x1b0753[_0x3767('0x29')]>0x0){_0x1b0753['originated']-=0x1;}else{logger[_0x3767('0x4b')](_0x3767('0x4c'));}}exports[_0x3767('0x4d')]=decrementOriginate;function checkContactEmpty(_0x91fd1){return _0x91fd1&&_0x91fd1[_0x3767('0x4e')]>0x0;}exports[_0x3767('0x4f')]=checkContactEmpty;function erlangb(_0x47e5d9,_0x17b649){if(_0x17b649===0x0){return 0x0;}var _0x4066c7=0x1;for(var _0x32d981=0x1;_0x32d981<=_0x17b649;_0x32d981+=0x1){_0x4066c7=0x1+_0x4066c7*_0x32d981/_0x47e5d9;}return 0x1/_0x4066c7;}exports['erlangb']=erlangb;function checkContactLowerLimitOriginate(_0x29c8af,_0x23fb2d,_0x343bf6){if(_0x23fb2d>_0x343bf6){for(var _0x1e67f6=0x0;_0x1e67f6<_0x23fb2d-_0x343bf6;_0x1e67f6+=0x1){decrementOriginate(_0x29c8af);}}}exports[_0x3767('0x50')]=checkContactLowerLimitOriginate;function setXMDContactVariables(_0x191f79){var _0x4d64f6={};var _0x117553=['id',_0x3767('0x51'),_0x3767('0x52'),_0x3767('0x53')];const _0x5c8b1f=0xfa;if(_0x191f79){for(var _0x26d979 in _0x191f79){if(typeof _0x191f79[_0x26d979]!==_0x3767('0x54')){if(!_[_0x3767('0x2e')](_0x191f79[_0x26d979])&&!_0x117553[_0x3767('0x37')](_0x26d979)){if(_0x26d979==='description'&&_0x191f79[_0x26d979]['length']>_0x5c8b1f){_0x4d64f6[_0x3767('0x55')+_0x26d979[_0x3767('0x56')]()]=_0x191f79[_0x26d979][_0x3767('0x57')]()[_0x3767('0x58')](0x0,_0x5c8b1f);}else{_0x4d64f6[_0x3767('0x55')+_0x26d979[_0x3767('0x56')]()]=_0x191f79[_0x26d979];}}}}}return _0x4d64f6;}exports[_0x3767('0x59')]=setXMDContactVariables;
\ No newline at end of file
+var _0x92ff=['NULL_INTERVAL','isEmpty','EMPTY_INTERVAL','SIP/','reachable','status','TrunkBackup','includes','INACTIVE','DISACTIVED','NO_AGENTS_LOGGED','UNREACHABLE_TRUNK','getQueueCampaignStatusMessage','match','extractCalleridName','isUndefined','string','format','\x22\x22\x20<>','getCallerId','pow','replace','toString','getCallerIdRandom','[decrementOriginate]\x20queue\x20originate\x20value\x20is\x20negative','decrementOriginate','length','checkContactLowerLimitOriginate','createdAt','tags','updatedAt','undefined','XMD-','toUpperCase','substring','setXMDContactVariables','lodash','moment','dialer','timezones','ACTIVE','BLACKLIST','RESCHEDULED_CONTACTS','DEACTIVATED','IS_DISACTIVED','INTERVAL_IS_EMPTY','NOT_ACTIVE','AVAILABLE_CONTACTS_FINISHED','INTERVAL_IS_NULL','INTERVAL_IS_OVERTIME','RECALLINQUEUE','RECALLFAILEDTIMEOUT','RUNNING','TIMEZONE_UNKNOW','TRUNK_IS_NOT_REACHABLE','dialMethod','preview','isPreviewCampaign','type','ivr','isIVRCampaign','isOutboundQueue','dialActive','isQueueCampaignActive','active','isIVRCampaignActive','milliseconds','diff','seconds','getSeconds','message','available','loggedIn','loggedInDb','talking','pTalking','waiting','inUse','originated','Trunk','name','hasQueueCampaignDataChanged','dialTimezone','isNil','dialGlobalInterval','Interval','Intervals'];(function(_0x671369,_0x433da5){var _0x33f2b4=function(_0x2e9db2){while(--_0x2e9db2){_0x671369['push'](_0x671369['shift']());}};_0x33f2b4(++_0x433da5);}(_0x92ff,0x129));var _0xf92f=function(_0x2afa06,_0x2df940){_0x2afa06=_0x2afa06-0x0;var _0x4a7d50=_0x92ff[_0x2afa06];return _0x4a7d50;};'use strict';var _=require(_0xf92f('0x0'));var moment=require(_0xf92f('0x1'));var util=require('util');var logger=require('../../../../config/logger')(_0xf92f('0x2'));var timezones=require('../../../../config/environment/shared')[_0xf92f('0x3')];var CAMPAIGN_STATUS={'ACTIVE':_0xf92f('0x4'),'BLACKLIST':_0xf92f('0x5'),'CONTACTS_RESCHEDULED':_0xf92f('0x6'),'DEACTIVATED':_0xf92f('0x7'),'DISACTIVED':_0xf92f('0x8'),'EMPTY_INTERVAL':_0xf92f('0x9'),'INACTIVE':_0xf92f('0xa'),'NO_AGENTS_LOGGED':'AGENTS_NOT_LOGGED','NO_AVAILABLE_CONTACTS':_0xf92f('0xb'),'NULL_INTERVAL':_0xf92f('0xc'),'OVERTIME_INTERVAL':_0xf92f('0xd'),'OVERTIME_GLOBAL_INTERVAL':'GLOBAL_INTERVAL_IS_OVERTIME','QUEUE_RECALL':_0xf92f('0xe'),'RECALL_TIMEOUT':_0xf92f('0xf'),'RUNNING':_0xf92f('0x10'),'UNKNOWN_TIMEZONE':_0xf92f('0x11'),'UNREACHABLE_TRUNK':_0xf92f('0x12')};exports['CAMPAIGN_STATUS']=CAMPAIGN_STATUS;function isPreviewCampaign(_0x396645){return _0x396645[_0xf92f('0x13')]===_0xf92f('0x14');}exports[_0xf92f('0x15')]=isPreviewCampaign;function isIVRCampaign(_0x168066){return _0x168066[_0xf92f('0x16')]===_0xf92f('0x17');}exports[_0xf92f('0x18')]=isIVRCampaign;function isOutboundQueue(_0x4fb4d0){return _0x4fb4d0[_0xf92f('0x16')]==='outbound';}exports[_0xf92f('0x19')]=isOutboundQueue;function isQueueCampaignActive(_0x1629f5){return _0x1629f5[_0xf92f('0x1a')];}exports[_0xf92f('0x1b')]=isQueueCampaignActive;function isIVRCampaignActive(_0x219cd9){return _0x219cd9[_0xf92f('0x1c')];}exports[_0xf92f('0x1d')]=isIVRCampaignActive;function getSeconds(_0x52a7ef,_0x11fd4c){var _0x2172f8=moment(_0x52a7ef)[_0xf92f('0x1e')](0x0);var _0x137be2=moment(_0x11fd4c)[_0xf92f('0x1e')](0x0);return _0x2172f8[_0xf92f('0x1f')](_0x137be2,_0xf92f('0x20'));}exports[_0xf92f('0x21')]=getSeconds;function hasQueueCampaignDataChanged(_0x216029,_0x4ac8df){var _0xdbdd0e=![];var _0x21c66=_0x216029[_0xf92f('0x13')]!==_0x4ac8df[_0xf92f('0x13')]||_0x216029['dialActive']!==_0x4ac8df[_0xf92f('0x1a')]||_0x216029[_0xf92f('0x22')]!==_0x4ac8df['message'];var _0x7797c=_0x216029[_0xf92f('0x23')]!==_0x4ac8df[_0xf92f('0x23')]||_0x216029[_0xf92f('0x24')]!==_0x4ac8df[_0xf92f('0x24')]||_0x216029['loggedInDb']!==_0x4ac8df[_0xf92f('0x25')]||_0x216029['paused']!==_0x4ac8df['paused']||_0x216029['talking']!==_0x4ac8df[_0xf92f('0x26')]||_0x216029[_0xf92f('0x27')]!==_0x4ac8df['pTalking']||_0x216029[_0xf92f('0x28')]!==_0x4ac8df[_0xf92f('0x28')]||_0x216029['inUse']!==_0x4ac8df[_0xf92f('0x29')]||_0x216029[_0xf92f('0x2a')]!==_0x4ac8df[_0xf92f('0x2a')];if(_0x216029[_0xf92f('0x2b')]&&_0x4ac8df['Trunk']){_0xdbdd0e=_0x216029[_0xf92f('0x2b')][_0xf92f('0x2c')]!==_0x4ac8df[_0xf92f('0x2b')][_0xf92f('0x2c')]||_0x216029['Trunk'][_0xf92f('0x1c')]!==_0x4ac8df[_0xf92f('0x2b')]['active'];}return _0x21c66||_0x7797c||_0xdbdd0e;}exports[_0xf92f('0x2d')]=hasQueueCampaignDataChanged;function checkAnyValidQueueCampaignInterval(_0x38ba43){var _0x5a68b1=null;var _0x5f2761=_0x38ba43[_0xf92f('0x2e')];if(_[_0xf92f('0x2f')](_0x38ba43[_0xf92f('0x30')])||_[_0xf92f('0x2f')](_0x38ba43[_0xf92f('0x31')])||_[_0xf92f('0x2f')](_0x38ba43['Interval'][_0xf92f('0x32')])){_0x5a68b1=CAMPAIGN_STATUS[_0xf92f('0x33')];}else if(_[_0xf92f('0x34')](_0x38ba43['dialGlobalInterval'])||_['isEmpty'](_0x38ba43[_0xf92f('0x31')]['Intervals'])){_0x5a68b1=CAMPAIGN_STATUS[_0xf92f('0x35')];}else if(_0x5f2761&&!timezones[_0x5f2761]){_0x5a68b1=CAMPAIGN_STATUS['UNKNOWN_TIMEZONE'];}return _0x5a68b1;}function checkAnyValidTrunk(_0x3341dd,_0x247a6f){var _0x4c5dc8=null;var _0x3c576a=_0xf92f('0x36');var _0x13c628=[_0xf92f('0x37'),'unmonitored'];var _0x2f78aa=!![];if(_0x3341dd[_0xf92f('0x2b')]&&_0x3341dd[_0xf92f('0x2b')]['active']){_0x3c576a+=_0x3341dd[_0xf92f('0x2b')]['name'];_0x4c5dc8=_0x247a6f[_0x3c576a];_0x2f78aa=_0x13c628['includes'](_0x4c5dc8[_0xf92f('0x38')]);}else if(_0x3341dd[_0xf92f('0x39')]&&_0x3341dd['TrunkBackup'][_0xf92f('0x1c')]){_0x3c576a+=_0x3341dd['TrunkBackup']['name'];_0x4c5dc8=_0x247a6f[_0x3c576a];_0x2f78aa=_0x13c628[_0xf92f('0x3a')](_0x4c5dc8[_0xf92f('0x38')]);}return _0x2f78aa;}function getQueueCampaignStatusMessage(_0x128a9c,_0x39d805){var _0x231fdd=CAMPAIGN_STATUS[_0xf92f('0x4')];var _0x8176f4=isPreviewCampaign(_0x128a9c);if(!isQueueCampaignActive(_0x128a9c)){if(_0x8176f4){_0x231fdd=CAMPAIGN_STATUS[_0xf92f('0x3b')];}else{if(_0x128a9c[_0xf92f('0x2a')]===0x0&&_0x128a9c[_0xf92f('0x26')]===0x0&&_0x128a9c[_0xf92f('0x28')]===0x0&&(_0x128a9c[_0xf92f('0x27')]||0x0)===0x0){_0x231fdd=CAMPAIGN_STATUS['INACTIVE'];}else{_0x231fdd=CAMPAIGN_STATUS[_0xf92f('0x3c')];}}}else if(_0x128a9c[_0xf92f('0x24')]===0x0){_0x231fdd=CAMPAIGN_STATUS[_0xf92f('0x3d')];}else if(!checkAnyValidTrunk(_0x128a9c,_0x39d805)){_0x231fdd=CAMPAIGN_STATUS[_0xf92f('0x3e')];}else if(!isPreviewCampaign(_0x128a9c)){var _0x581f25=checkAnyValidQueueCampaignInterval(_0x128a9c);if(_0x581f25){_0x231fdd=_0x581f25;}}return _0x231fdd;}exports[_0xf92f('0x3f')]=getQueueCampaignStatusMessage;function getQueueCampaignActiveStatusMessage(_0x4d65a2){var _0x1c0094=CAMPAIGN_STATUS[_0xf92f('0x3c')];if(_0x4d65a2[_0xf92f('0x2a')]===0x0&&_0x4d65a2['talking']===0x0&&_0x4d65a2[_0xf92f('0x28')]===0x0&&(_0x4d65a2['pTalking']||0x0)===0x0){_0x1c0094=CAMPAIGN_STATUS[_0xf92f('0x3b')];}return _0x1c0094;}exports['getQueueCampaignActiveStatusMessage']=getQueueCampaignActiveStatusMessage;function extractCalleridName(_0x5c3a02){var _0x3202f2=_0x5c3a02[_0xf92f('0x40')](/"(.*?)"/);return _0x3202f2?_0x3202f2[0x1]:_0x5c3a02;}exports[_0xf92f('0x41')]=extractCalleridName;function getCallerId(_0x16d763,_0x215e6a,_0x4a02e9){if(!_['isUndefined'](_0x4a02e9)&&typeof _0x4a02e9==='string'&&!_[_0xf92f('0x34')](_0x4a02e9)){if(!_[_0xf92f('0x42')](_0x215e6a)&&typeof _0x215e6a===_0xf92f('0x43')&&!_[_0xf92f('0x34')](_0x215e6a)){return util['format']('\x22%s\x22\x20<%s>',_0x215e6a,_0x4a02e9);}return util[_0xf92f('0x44')]('\x22%s\x22\x20<%s>',_0x4a02e9,_0x4a02e9);}if(!_['isUndefined'](_0x16d763)&&typeof _0x16d763==='string'&&!_[_0xf92f('0x34')](_0x16d763)){return _0x16d763;}return _0xf92f('0x45');}exports[_0xf92f('0x46')]=getCallerId;function getCallerIdRandom(_0x1bae8b,_0x2f5938){var _0x3226df;var _0x22f20f;var _0x9aa21e;if(_0x2f5938<=0x0){_0x2f5938=0x1;}_0x3226df=new RegExp('\x5cw{0,'+_0x2f5938+'}$');_0x22f20f=Math[_0xf92f('0x47')](0xa,_0x2f5938-0x1);_0x9aa21e=Math['pow'](0xa,_0x2f5938)-0x1;return util[_0xf92f('0x44')]('%s',_[_0xf92f('0x48')](_0x1bae8b,_0x3226df,_['random'](_0x22f20f,_0x9aa21e)[_0xf92f('0x49')]()));}exports[_0xf92f('0x4a')]=getCallerIdRandom;function decrementOriginate(_0x21e054){if(_0x21e054['originated']&&_0x21e054[_0xf92f('0x2a')]>0x0){_0x21e054['originated']-=0x1;}else{logger['error'](_0xf92f('0x4b'));}}exports[_0xf92f('0x4c')]=decrementOriginate;function checkContactEmpty(_0x3c1ca4){return _0x3c1ca4&&_0x3c1ca4[_0xf92f('0x4d')]>0x0;}exports['checkContactEmpty']=checkContactEmpty;function erlangb(_0x4a0723,_0x5eb65d){if(_0x5eb65d===0x0){return 0x0;}var _0x2001c1=0x1;for(var _0x55807f=0x1;_0x55807f<=_0x5eb65d;_0x55807f+=0x1){_0x2001c1=0x1+_0x2001c1*_0x55807f/_0x4a0723;}return 0x1/_0x2001c1;}exports['erlangb']=erlangb;function checkContactLowerLimitOriginate(_0x4c0c56,_0xa1a2c,_0x4c9309){if(_0xa1a2c>_0x4c9309){for(var _0x3c0c80=0x0;_0x3c0c80<_0xa1a2c-_0x4c9309;_0x3c0c80+=0x1){decrementOriginate(_0x4c0c56);}}}exports[_0xf92f('0x4e')]=checkContactLowerLimitOriginate;function setXMDContactVariables(_0x258841){var _0x602990={};var _0x43c80a=['id',_0xf92f('0x4f'),_0xf92f('0x50'),_0xf92f('0x51')];const _0x5eb0dd=0xfa;if(_0x258841){for(var _0x1088ab in _0x258841){if(typeof _0x258841[_0x1088ab]!==_0xf92f('0x52')){if(!_['isNil'](_0x258841[_0x1088ab])&&!_0x43c80a['includes'](_0x1088ab)){if(_0x1088ab==='description'&&_0x258841[_0x1088ab][_0xf92f('0x4d')]>_0x5eb0dd){_0x602990[_0xf92f('0x53')+_0x1088ab[_0xf92f('0x54')]()]=_0x258841[_0x1088ab][_0xf92f('0x49')]()[_0xf92f('0x55')](0x0,_0x5eb0dd);}else{_0x602990['XMD-'+_0x1088ab[_0xf92f('0x54')]()]=_0x258841[_0x1088ab];}}}}}return _0x602990;}exports[_0xf92f('0x56')]=setXMDContactVariables;
\ No newline at end of file
index 85b1c8f..0d11796 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(_0x324d45,_0x44be6b){var _0x145e97=function(_0x41b501){while(--_0x41b501){_0x324d45['push'](_0x324d45['shift']());}};_0x145e97(++_0x44be6b);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0xa9e0[_0x3947c9];return _0x2e7871;};'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(_0x56c889,_0x33bcc4){var _0x99ee3a=function(_0x5e7f05){while(--_0x5e7f05){_0x56c889['push'](_0x56c889['shift']());}};_0x99ee3a(++_0x33bcc4);}(_0xa9e0,0x123));var _0x0a9e=function(_0x433a86,_0x175b5c){_0x433a86=_0x433a86-0x0;var _0x23000c=_0xa9e0[_0x433a86];return _0x23000c;};'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 dc9e30b..38a8102 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xecfe=['SENDING\x20FAILED','send','FaxAccountId','[Fax][execOriginate][success]','Fax\x20received','[Fax][execOriginate][failure]','Fax\x20failed','Trunk','isValid','Trunk\x20Reachable','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','dir','XMF-PATH','Convert\x20pdf\x20to\x20tif','variablesAction','Action','execOriginate','addVariables','ext','isTrunkReachable','isNil','active','SIP/%s','reachable','unmonitored','checkTrunk','[Fax][checkTrunk][Trunk\x20not\x20working\x20correctly]','\x20Trunk\x20is\x20not\x20active','Trunk\x20not\x20working\x20correctly','[Fax][checkTrunk][Empty\x20Fax]','Empty\x20Fax','[Fax][checkTrunk][Empty\x20path]','Empty\x20path','Is\x20Valid','exports','lodash','bluebird','uuid','path','../ami','./rpcDb','../rpc/faxAccount','../rpc/attachment','../rpc/faxMessage','channels','faxAccounts','trunks','actions','newchannel','syncNewchannel','varset','bind','syncNewState','newexten','syncNewExten','faxstatus','syncFaxStatus','receivefax','hangup','originateresponse','syncOriginateResponse','context','from-voip-provider','hasOwnProperty','exten','localstationid','uniqueid','channel','name','info','\x20syncNewchannel\x20','prototype','syncVarSet','value','channelstate','channelstatedesc','variable','operation','status','filename','\x20syncFaxStatus\x20','syncReceiveFax','remotestationid','pagestransferred','resolution','transferrate','calleridnum','/var/opt/motion2/server/files/attachments/','\x20result\x20conversion\x20file\x20','message','parse','application/pdf','fax','.pdf','catch','error','\x20notify\x20','stringify','\x20receiveFax\x20','response','reason','AttachmentId','update','SENDING\x20FAILED\x20','then','logger','[Fax][Message][Error][NoUpdate1]','[Fax][Message][Error][NoUpdate2]','[Fax][Message][Updated]','finally','syncHangup','\x20hangup\x20sendFile\x20','faxpages','SUCCESS','updateStatus','faxstatusstring','SENDING\x20FAILED:\x20'];(function(_0x44438c,_0x150d7){var _0x51c71f=function(_0x5e4fde){while(--_0x5e4fde){_0x44438c['push'](_0x44438c['shift']());}};_0x51c71f(++_0x150d7);}(_0xecfe,0x18e));var _0xeecf=function(_0x249e96,_0x3ea39d){_0x249e96=_0x249e96-0x0;var _0x17444c=_0xecfe[_0x249e96];return _0x17444c;};'use strict';var util=require('util');var _=require(_0xeecf('0x0'));var BPromise=require(_0xeecf('0x1'));var uuid=require(_0xeecf('0x2'));var moment=require('moment');var path=require(_0xeecf('0x3'));var tiff2pdf=require('tiff2pdf');var gs=require('./util/gs');var logger=require('../../../config/logger')('fax');var ami=require(_0xeecf('0x4'));var rpcDb=require(_0xeecf('0x5'));var Channel=require('./channel');var ut=require('./util/util');var Action=require('./action');var faxAccount=require(_0xeecf('0x6'));var attachment=require(_0xeecf('0x7'));var faxMessage=require(_0xeecf('0x8'));function Fax(_0x52bd3d){this[_0xeecf('0x9')]={};this[_0xeecf('0xa')]=_0x52bd3d[_0xeecf('0xa')];this['trunks']=_0x52bd3d[_0xeecf('0xb')];this[_0xeecf('0xc')]={};ami['on'](_0xeecf('0xd'),this[_0xeecf('0xe')]['bind'](this));ami['on'](_0xeecf('0xf'),this['syncVarSet'][_0xeecf('0x10')](this));ami['on']('newstate',this[_0xeecf('0x11')][_0xeecf('0x10')](this));ami['on'](_0xeecf('0x12'),this[_0xeecf('0x13')][_0xeecf('0x10')](this));ami['on'](_0xeecf('0x14'),this[_0xeecf('0x15')][_0xeecf('0x10')](this));ami['on'](_0xeecf('0x16'),this['syncReceiveFax'][_0xeecf('0x10')](this));ami['on'](_0xeecf('0x17'),this['syncHangup'][_0xeecf('0x10')](this));ami['on'](_0xeecf('0x18'),this[_0xeecf('0x19')][_0xeecf('0x10')](this));}Fax['prototype']['syncNewchannel']=function(_0x40b052){if(_0x40b052[_0xeecf('0x1a')]===_0xeecf('0x1b')){for(var _0x5ba0ba in this[_0xeecf('0xa')]){if(this['faxAccounts'][_0xeecf('0x1c')](_0x5ba0ba)){if(_0x40b052[_0xeecf('0x1d')]===this[_0xeecf('0xa')][_0x5ba0ba][_0xeecf('0x1e')]){this[_0xeecf('0x9')][_0x40b052['uniqueid']]={};this['channels'][_0x40b052[_0xeecf('0x1f')]]['channel']=_0x40b052[_0xeecf('0x20')];this[_0xeecf('0x9')][_0x40b052[_0xeecf('0x1f')]]['id']=this[_0xeecf('0xa')][_0x5ba0ba]['id'];this[_0xeecf('0x9')][_0x40b052[_0xeecf('0x1f')]]['name']=this['faxAccounts'][_0x5ba0ba][_0xeecf('0x21')];logger[_0xeecf('0x22')](_0x40b052[_0xeecf('0x1f')],_0xeecf('0x23'));}}}}if(this[_0xeecf('0xc')][_0x40b052[_0xeecf('0x1f')]]){this[_0xeecf('0x9')][_0x40b052[_0xeecf('0x1f')]]={};this[_0xeecf('0x9')][_0x40b052['uniqueid']][_0xeecf('0x20')]=_0x40b052[_0xeecf('0x20')];logger['info'](_0x40b052[_0xeecf('0x1f')],_0xeecf('0x23'));}};Fax[_0xeecf('0x24')][_0xeecf('0x25')]=function(_0xcfd7b8){if(this[_0xeecf('0x9')][_0xcfd7b8['uniqueid']]){for(var _0x27ead1 in _0xcfd7b8['variable']){if(_0xcfd7b8['variable']['hasOwnProperty'](_0x27ead1)){this[_0xeecf('0x9')][_0xcfd7b8[_0xeecf('0x1f')]][_0x27ead1]=_0xcfd7b8[_0xeecf('0x26')];}}}};Fax[_0xeecf('0x24')][_0xeecf('0x11')]=function(_0x5d77d6){if(this[_0xeecf('0x9')][_0x5d77d6[_0xeecf('0x1f')]]){this[_0xeecf('0x9')][_0x5d77d6[_0xeecf('0x1f')]][_0xeecf('0x27')]=_0x5d77d6['channelstate'];this[_0xeecf('0x9')][_0x5d77d6['uniqueid']][_0xeecf('0x28')]=_0x5d77d6[_0xeecf('0x28')];}};Fax[_0xeecf('0x24')]['syncNewExten']=function(_0x39dfce){if(this[_0xeecf('0x9')][_0x39dfce[_0xeecf('0x1f')]]){for(var _0xe43f95 in _0x39dfce['variable']){if(_0x39dfce[_0xeecf('0x29')][_0xeecf('0x1c')](_0xe43f95)){this[_0xeecf('0x9')][_0x39dfce[_0xeecf('0x1f')]][_0xe43f95]=_0x39dfce[_0xeecf('0x26')];}}}};Fax[_0xeecf('0x24')][_0xeecf('0x15')]=function(_0x2746d7){if(this[_0xeecf('0x9')][_0x2746d7[_0xeecf('0x1f')]]){this['channels'][_0x2746d7[_0xeecf('0x1f')]][_0xeecf('0x2a')]=_0x2746d7[_0xeecf('0x2a')];this[_0xeecf('0x9')][_0x2746d7[_0xeecf('0x1f')]][_0xeecf('0x2b')]=_0x2746d7[_0xeecf('0x2b')];this[_0xeecf('0x9')][_0x2746d7['uniqueid']][_0xeecf('0x1e')]=_0x2746d7['localstationid'];this[_0xeecf('0x9')][_0x2746d7['uniqueid']][_0xeecf('0x2c')]=_0x2746d7[_0xeecf('0x2c')];logger[_0xeecf('0x22')](_0x2746d7['uniqueid'],_0xeecf('0x2d'));}};Fax['prototype'][_0xeecf('0x2e')]=function(_0x116705){var _0xa1946f=this;if(this[_0xeecf('0x9')][_0x116705[_0xeecf('0x1f')]]){var _0x1b04b8=this['channels'][_0x116705[_0xeecf('0x1f')]]['id'];this[_0xeecf('0x9')][_0x116705[_0xeecf('0x1f')]]['remotestationid']=_0x116705[_0xeecf('0x2f')];this[_0xeecf('0x9')][_0x116705[_0xeecf('0x1f')]][_0xeecf('0x30')]=_0x116705['pagestransferred'];this[_0xeecf('0x9')][_0x116705[_0xeecf('0x1f')]][_0xeecf('0x1e')]=_0x116705['localstationid'];this[_0xeecf('0x9')][_0x116705[_0xeecf('0x1f')]]['resolution']=_0x116705[_0xeecf('0x31')];this[_0xeecf('0x9')][_0x116705[_0xeecf('0x1f')]][_0xeecf('0x32')]=_0x116705[_0xeecf('0x32')];this[_0xeecf('0x9')][_0x116705[_0xeecf('0x1f')]][_0xeecf('0x2c')]=_0x116705['filename'];this[_0xeecf('0x9')][_0x116705[_0xeecf('0x1f')]][_0xeecf('0x33')]=_0x116705[_0xeecf('0x33')];if(this[_0xeecf('0x9')][_0x116705['uniqueid']][_0xeecf('0x30')]>0x0){tiff2pdf(_0x116705[_0xeecf('0x2c')],_0xeecf('0x34'),function(_0x483853){logger[_0xeecf('0x22')](_0x116705[_0xeecf('0x1f')],_0xeecf('0x35'),_0x483853[_0xeecf('0x36')]);attachment['create']({'name':path[_0xeecf('0x37')](_0x116705[_0xeecf('0x2c')])[_0xeecf('0x21')],'basename':path[_0xeecf('0x37')](_0x116705[_0xeecf('0x2c')])['name']+'.pdf','type':_0xeecf('0x38')})['then'](function(_0x36a37d){faxAccount['notify'](_0x1b04b8,{'from':_0x116705['calleridnum'],'mapKey':_0xeecf('0x39'),'body':path[_0xeecf('0x37')](_0x116705['filename'])[_0xeecf('0x21')]+_0xeecf('0x3a'),'AttachmentId':_0x36a37d['id']})[_0xeecf('0x3b')](function(_0x1ac9a4){logger[_0xeecf('0x3c')](_0x116705[_0xeecf('0x1f')],_0xeecf('0x3d'),JSON['stringify'](_0x1ac9a4));});})[_0xeecf('0x3b')](function(_0x201ab6){logger[_0xeecf('0x3c')](_0x116705[_0xeecf('0x1f')],'\x20receiveFax\x20',JSON[_0xeecf('0x3e')](_0x201ab6));});});}logger[_0xeecf('0x22')](_0x116705['uniqueid'],_0xeecf('0x3f'));}};Fax[_0xeecf('0x24')][_0xeecf('0x19')]=function(_0xd23165){if(this[_0xeecf('0xc')][_0xd23165[_0xeecf('0x1f')]]){_['merge'](this[_0xeecf('0x9')][_0xd23165['uniqueid']],_['pick'](_0xd23165,[_0xeecf('0x40'),_0xeecf('0x41')]));}};function updateStatus(_0x31e963){if(_0x31e963[_0xeecf('0x42')]){faxMessage[_0xeecf('0x43')](_0x31e963[_0xeecf('0x42')],{'failMessage':_0xeecf('0x44')})[_0xeecf('0x45')](function(_0x1cbd3d){ut[_0xeecf('0x46')]('[Fax][Message][Error][Updated]',_0x1cbd3d);})[_0xeecf('0x3b')](function(_0x868048){ut[_0xeecf('0x46')](_0xeecf('0x47'),_0x868048);});}else{ut[_0xeecf('0x46')](_0xeecf('0x48'));}}Fax[_0xeecf('0x24')]['updateStatus']=function(_0x494f9a,_0x5eb50e,_0xc3d9f7){var _0x2fee65=this;var _0x1ed60c={};if(_0x5eb50e){_0x1ed60c={'read':_0x5eb50e};}else{_0x1ed60c={'failMessage':_0xc3d9f7};}if(this[_0xeecf('0xc')][_0x494f9a]['AttachmentId']){faxMessage[_0xeecf('0x43')](this[_0xeecf('0xc')][_0x494f9a][_0xeecf('0x42')],_0x1ed60c)[_0xeecf('0x45')](function(_0x419a27){ut[_0xeecf('0x46')](_0xeecf('0x49'),_0x419a27);})[_0xeecf('0x3b')](function(_0x5b9b55){ut[_0xeecf('0x46')]('[Fax][Message][NoUpdate1]',_0x5b9b55);})[_0xeecf('0x4a')](function(){delete _0x2fee65[_0xeecf('0x9')][_0x494f9a];delete _0x2fee65[_0xeecf('0xc')][_0x494f9a];});}else{ut[_0xeecf('0x46')]('[Fax][Message][NoUpdate2]');delete this[_0xeecf('0x9')][_0x494f9a];delete this[_0xeecf('0xc')][_0x494f9a];}};Fax[_0xeecf('0x24')][_0xeecf('0x4b')]=function(_0x33ad0c){var _0x5dbbc8=this;if(this['channels'][_0x33ad0c[_0xeecf('0x1f')]]){if(this[_0xeecf('0xc')][_0x33ad0c[_0xeecf('0x1f')]]){this[_0xeecf('0x9')][_0x33ad0c[_0xeecf('0x1f')]]['id']=this[_0xeecf('0xc')][_0x33ad0c[_0xeecf('0x1f')]]['id'];this[_0xeecf('0x9')][_0x33ad0c['uniqueid']][_0xeecf('0x21')]=this[_0xeecf('0xc')][_0x33ad0c[_0xeecf('0x1f')]][_0xeecf('0x21')];}logger[_0xeecf('0x22')](_0x33ad0c[_0xeecf('0x1f')],this[_0xeecf('0xc')][_0x33ad0c['uniqueid']]?_0xeecf('0x4c'):'\x20hangup\x20faxRiceive\x20',JSON['stringify'](this[_0xeecf('0x9')][_0x33ad0c[_0xeecf('0x1f')]]));if(this['actions'][_0x33ad0c['uniqueid']]){if(this[_0xeecf('0x9')][_0x33ad0c[_0xeecf('0x1f')]][_0xeecf('0x4d')]>0x0&&this['channels'][_0x33ad0c[_0xeecf('0x1f')]][_0xeecf('0x14')]===_0xeecf('0x4e')){this[_0xeecf('0x4f')](_0x33ad0c[_0xeecf('0x1f')],!![]);}else{this['updateStatus'](_0x33ad0c[_0xeecf('0x1f')],![],this[_0xeecf('0x9')][_0x33ad0c[_0xeecf('0x1f')]][_0xeecf('0x50')]?_0xeecf('0x51')+this[_0xeecf('0x9')][_0x33ad0c[_0xeecf('0x1f')]]['faxstatusstring']:_0xeecf('0x52'));}}}};Fax[_0xeecf('0x24')][_0xeecf('0x53')]=function(_0x450a34){var _0x364511=this;return new BPromise(function(_0x1137f5,_0xcedefe){_0x364511['execOriginate'](_0x450a34,_0x364511[_0xeecf('0xa')][_0x450a34[_0xeecf('0x54')]])[_0xeecf('0x45')](function(_0xebcee5){ut[_0xeecf('0x46')](_0xeecf('0x55'),_0xebcee5);_0x1137f5(ut['message'](_0xeecf('0x56')));})[_0xeecf('0x3b')](function(_0x4cb1c9){ut[_0xeecf('0x46')](_0xeecf('0x57'),_0x4cb1c9);updateStatus(_0x450a34);_0xcedefe(ut['message'](_0xeecf('0x58')));});});};Fax['prototype']['checkAfterSend']=function(_0x374130){var _0x116121=this;return new BPromise(function(_0x542031,_0x3e81fb){var _0x519913=_0x116121['checkTrunk'](_0x116121['faxAccounts'][_0x374130[_0xeecf('0x54')]][_0xeecf('0x59')],_0x374130);if(_0x519913[_0xeecf('0x5a')]){_0x542031(ut[_0xeecf('0x36')](_0xeecf('0x5b')));}else{_0x3e81fb(ut[_0xeecf('0x36')](_0x519913[_0xeecf('0x36')]));}});};function originate(_0x479cdc,_0x375104,_0x42df86){return new BPromise(function(_0x830805,_0x491cbb){if(_0x42df86){var _0x466215=util[_0xeecf('0x5c')](_0xeecf('0x5d'),path['parse'](_0x479cdc['path'])[_0xeecf('0x21')],_0x479cdc[_0xeecf('0x3')]);gs[_0xeecf('0x5e')](_0x466215)[_0xeecf('0x45')](function(){_0x479cdc[_0xeecf('0x3')]=util[_0xeecf('0x5c')](_0xeecf('0x5f'),path['parse'](_0x479cdc[_0xeecf('0x3')])[_0xeecf('0x60')],path['parse'](_0x479cdc[_0xeecf('0x3')])['name']);_0x375104[_0xeecf('0x61')]=_0x479cdc[_0xeecf('0x3')];ut[_0xeecf('0x46')](_0xeecf('0x62'),'');ami['Action'](ut[_0xeecf('0x63')](_0x479cdc,_0x375104))['then'](function(_0x2234ea){_0x830805(_0x2234ea);})[_0xeecf('0x3b')](function(_0x35a9bd){_0x491cbb(_0x35a9bd);});})['catch'](function(_0x41bd7a){_0x491cbb(_0x41bd7a);});}else{ami[_0xeecf('0x64')](ut['variablesAction'](_0x479cdc,_0x375104))[_0xeecf('0x45')](function(_0x790288){_0x830805(_0x790288);})[_0xeecf('0x3b')](function(_0x245876){_0x491cbb(_0x245876);});}});}Fax[_0xeecf('0x24')][_0xeecf('0x65')]=function(_0x2af27a,_0x52c8d1){var _0xfe7ed=this;return new BPromise(function(_0x4a6b95,_0x1e5ede){var _0x9abb64=uuid['v4']();var _0x49ff1b=ut[_0xeecf('0x66')](_0x2af27a,_0x52c8d1);_0xfe7ed[_0xeecf('0xc')][_0x9abb64]=new Action(_0x9abb64,_0x52c8d1,_0x2af27a);var _0x5ec982=_0xfe7ed[_0xeecf('0xc')][_0x9abb64];if(path[_0xeecf('0x37')](_0x2af27a['path'])[_0xeecf('0x67')]==='.pdf'){originate(_0x5ec982,_0x49ff1b,!![])[_0xeecf('0x45')](function(_0x1301b2){_0x4a6b95(_0x1301b2);})[_0xeecf('0x3b')](function(_0x276647){_0x1e5ede(_0x276647);});}else{originate(_0x5ec982,_0x49ff1b,![])[_0xeecf('0x45')](function(_0xe30fe5){_0x4a6b95(_0xe30fe5);})['catch'](function(_0x36ed79){_0x1e5ede(_0x36ed79);});}});};Fax[_0xeecf('0x24')][_0xeecf('0x68')]=function(_0x182c60){return!_[_0xeecf('0x69')](_0x182c60)&&!_[_0xeecf('0x69')](_0x182c60['name'])&&!_[_0xeecf('0x69')](_0x182c60[_0xeecf('0x6a')])&&_0x182c60['active']&&!_[_0xeecf('0x69')](this['trunks'][util['format'](_0xeecf('0x6b'),_0x182c60[_0xeecf('0x21')])])&&!_[_0xeecf('0x69')](this[_0xeecf('0xb')][util[_0xeecf('0x5c')](_0xeecf('0x6b'),_0x182c60['name'])][_0xeecf('0x2b')])&&(this[_0xeecf('0xb')][util[_0xeecf('0x5c')](_0xeecf('0x6b'),_0x182c60[_0xeecf('0x21')])][_0xeecf('0x2b')]===_0xeecf('0x6c')||this[_0xeecf('0xb')][util[_0xeecf('0x5c')]('SIP/%s',_0x182c60[_0xeecf('0x21')])]['status']===_0xeecf('0x6d'));};Fax[_0xeecf('0x24')][_0xeecf('0x6e')]=function(_0x4a59dd,_0x3465d5){if(!this['isTrunkReachable'](_0x4a59dd)){ut[_0xeecf('0x46')](_0xeecf('0x6f'),_[_0xeecf('0x69')](_0x4a59dd)?'':_0x4a59dd[_0xeecf('0x21')]+_0xeecf('0x70'));return{'isValid':![],'message':_0xeecf('0x71')};}if(_[_0xeecf('0x69')](_0x3465d5[_0xeecf('0x39')])){ut[_0xeecf('0x46')](_0xeecf('0x72'),JSON['stringify'](_0x3465d5));return{'isValid':![],'message':_0xeecf('0x73')};}if(_['isNil'](_0x3465d5['path'])){ut[_0xeecf('0x46')](_0xeecf('0x74'),JSON['stringify'](_0x3465d5));return{'isValid':![],'message':_0xeecf('0x75')};}return{'isValid':!![],'message':_0xeecf('0x76')};};module[_0xeecf('0x77')]=Fax;
\ No newline at end of file
+var _0xaf2b=['uniqueid','channel','channels','name','\x20syncNewchannel\x20','info','variable','syncNewState','channelstate','channelstatedesc','value','operation','status','localstationid','filename','remotestationid','pagestransferred','resolution','transferrate','calleridnum','/var/opt/motion2/server/files/attachments/','\x20result\x20conversion\x20file\x20','message','create','parse','.pdf','then','notify','error','\x20notify\x20','stringify','\x20receiveFax\x20','syncOriginateResponse','merge','pick','response','reason','AttachmentId','logger','[Fax][Message][Error][Updated]','catch','[Fax][Message][Error][NoUpdate1]','[Fax][Message][Error][NoUpdate2]','updateStatus','update','[Fax][Message][NoUpdate1]','finally','\x20hangup\x20sendFile\x20','\x20hangup\x20faxRiceive\x20','faxpages','SENDING\x20FAILED:\x20','faxstatusstring','SENDING\x20FAILED','execOriginate','FaxAccountId','[Fax][execOriginate][success]','Fax\x20received','Fax\x20failed','checkAfterSend','checkTrunk','Trunk','isValid','Trunk\x20Reachable','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','dir','XMF-PATH','Convert\x20pdf\x20to\x20tif','Action','variablesAction','isNil','active','SIP/%s','reachable','unmonitored','isTrunkReachable','[Fax][checkTrunk][Trunk\x20not\x20working\x20correctly]','\x20Trunk\x20is\x20not\x20active','Trunk\x20not\x20working\x20correctly','[Fax][checkTrunk][Empty\x20path]','Empty\x20path','util','lodash','moment','path','./util/gs','../../../config/logger','fax','../ami','./rpcDb','./channel','./util/util','./action','../rpc/faxAccount','../rpc/attachment','../rpc/faxMessage','faxAccounts','trunks','actions','syncNewchannel','bind','varset','syncVarSet','newexten','syncNewExten','faxstatus','syncFaxStatus','receivefax','syncReceiveFax','syncHangup','originateresponse','prototype','context','from-voip-provider','hasOwnProperty','exten'];(function(_0x7bf050,_0x36368d){var _0x4742b5=function(_0x41d31f){while(--_0x41d31f){_0x7bf050['push'](_0x7bf050['shift']());}};_0x4742b5(++_0x36368d);}(_0xaf2b,0x13f));var _0xbaf2=function(_0x585234,_0x3ae470){_0x585234=_0x585234-0x0;var _0x28b8a7=_0xaf2b[_0x585234];return _0x28b8a7;};'use strict';var util=require(_0xbaf2('0x0'));var _=require(_0xbaf2('0x1'));var BPromise=require('bluebird');var uuid=require('uuid');var moment=require(_0xbaf2('0x2'));var path=require(_0xbaf2('0x3'));var tiff2pdf=require('tiff2pdf');var gs=require(_0xbaf2('0x4'));var logger=require(_0xbaf2('0x5'))(_0xbaf2('0x6'));var ami=require(_0xbaf2('0x7'));var rpcDb=require(_0xbaf2('0x8'));var Channel=require(_0xbaf2('0x9'));var ut=require(_0xbaf2('0xa'));var Action=require(_0xbaf2('0xb'));var faxAccount=require(_0xbaf2('0xc'));var attachment=require(_0xbaf2('0xd'));var faxMessage=require(_0xbaf2('0xe'));function Fax(_0x2fbb01){this['channels']={};this[_0xbaf2('0xf')]=_0x2fbb01['faxAccounts'];this[_0xbaf2('0x10')]=_0x2fbb01[_0xbaf2('0x10')];this[_0xbaf2('0x11')]={};ami['on']('newchannel',this[_0xbaf2('0x12')][_0xbaf2('0x13')](this));ami['on'](_0xbaf2('0x14'),this[_0xbaf2('0x15')][_0xbaf2('0x13')](this));ami['on']('newstate',this['syncNewState'][_0xbaf2('0x13')](this));ami['on'](_0xbaf2('0x16'),this[_0xbaf2('0x17')]['bind'](this));ami['on'](_0xbaf2('0x18'),this[_0xbaf2('0x19')]['bind'](this));ami['on'](_0xbaf2('0x1a'),this[_0xbaf2('0x1b')][_0xbaf2('0x13')](this));ami['on']('hangup',this[_0xbaf2('0x1c')][_0xbaf2('0x13')](this));ami['on'](_0xbaf2('0x1d'),this['syncOriginateResponse'][_0xbaf2('0x13')](this));}Fax[_0xbaf2('0x1e')][_0xbaf2('0x12')]=function(_0x509c9d){if(_0x509c9d[_0xbaf2('0x1f')]===_0xbaf2('0x20')){for(var _0x364c88 in this[_0xbaf2('0xf')]){if(this['faxAccounts'][_0xbaf2('0x21')](_0x364c88)){if(_0x509c9d[_0xbaf2('0x22')]===this[_0xbaf2('0xf')][_0x364c88]['localstationid']){this['channels'][_0x509c9d['uniqueid']]={};this['channels'][_0x509c9d[_0xbaf2('0x23')]][_0xbaf2('0x24')]=_0x509c9d['channel'];this['channels'][_0x509c9d[_0xbaf2('0x23')]]['id']=this[_0xbaf2('0xf')][_0x364c88]['id'];this[_0xbaf2('0x25')][_0x509c9d['uniqueid']][_0xbaf2('0x26')]=this[_0xbaf2('0xf')][_0x364c88]['name'];logger['info'](_0x509c9d['uniqueid'],_0xbaf2('0x27'));}}}}if(this[_0xbaf2('0x11')][_0x509c9d[_0xbaf2('0x23')]]){this[_0xbaf2('0x25')][_0x509c9d[_0xbaf2('0x23')]]={};this[_0xbaf2('0x25')][_0x509c9d[_0xbaf2('0x23')]][_0xbaf2('0x24')]=_0x509c9d[_0xbaf2('0x24')];logger[_0xbaf2('0x28')](_0x509c9d[_0xbaf2('0x23')],_0xbaf2('0x27'));}};Fax[_0xbaf2('0x1e')][_0xbaf2('0x15')]=function(_0x4abd1d){if(this[_0xbaf2('0x25')][_0x4abd1d['uniqueid']]){for(var _0x2ab4c3 in _0x4abd1d['variable']){if(_0x4abd1d[_0xbaf2('0x29')]['hasOwnProperty'](_0x2ab4c3)){this[_0xbaf2('0x25')][_0x4abd1d[_0xbaf2('0x23')]][_0x2ab4c3]=_0x4abd1d['value'];}}}};Fax[_0xbaf2('0x1e')][_0xbaf2('0x2a')]=function(_0x5cd74e){if(this[_0xbaf2('0x25')][_0x5cd74e[_0xbaf2('0x23')]]){this[_0xbaf2('0x25')][_0x5cd74e[_0xbaf2('0x23')]][_0xbaf2('0x2b')]=_0x5cd74e['channelstate'];this['channels'][_0x5cd74e['uniqueid']][_0xbaf2('0x2c')]=_0x5cd74e[_0xbaf2('0x2c')];}};Fax['prototype'][_0xbaf2('0x17')]=function(_0x1cdd19){if(this[_0xbaf2('0x25')][_0x1cdd19['uniqueid']]){for(var _0x2a0ea9 in _0x1cdd19[_0xbaf2('0x29')]){if(_0x1cdd19[_0xbaf2('0x29')][_0xbaf2('0x21')](_0x2a0ea9)){this[_0xbaf2('0x25')][_0x1cdd19[_0xbaf2('0x23')]][_0x2a0ea9]=_0x1cdd19[_0xbaf2('0x2d')];}}}};Fax['prototype'][_0xbaf2('0x19')]=function(_0x5febb3){if(this['channels'][_0x5febb3[_0xbaf2('0x23')]]){this['channels'][_0x5febb3[_0xbaf2('0x23')]][_0xbaf2('0x2e')]=_0x5febb3[_0xbaf2('0x2e')];this[_0xbaf2('0x25')][_0x5febb3['uniqueid']][_0xbaf2('0x2f')]=_0x5febb3[_0xbaf2('0x2f')];this[_0xbaf2('0x25')][_0x5febb3[_0xbaf2('0x23')]][_0xbaf2('0x30')]=_0x5febb3[_0xbaf2('0x30')];this[_0xbaf2('0x25')][_0x5febb3[_0xbaf2('0x23')]][_0xbaf2('0x31')]=_0x5febb3['filename'];logger[_0xbaf2('0x28')](_0x5febb3[_0xbaf2('0x23')],'\x20syncFaxStatus\x20');}};Fax[_0xbaf2('0x1e')][_0xbaf2('0x1b')]=function(_0x292450){var _0x1ff228=this;if(this['channels'][_0x292450['uniqueid']]){var _0x16e0d0=this['channels'][_0x292450['uniqueid']]['id'];this[_0xbaf2('0x25')][_0x292450[_0xbaf2('0x23')]][_0xbaf2('0x32')]=_0x292450[_0xbaf2('0x32')];this['channels'][_0x292450[_0xbaf2('0x23')]][_0xbaf2('0x33')]=_0x292450[_0xbaf2('0x33')];this['channels'][_0x292450[_0xbaf2('0x23')]][_0xbaf2('0x30')]=_0x292450[_0xbaf2('0x30')];this['channels'][_0x292450[_0xbaf2('0x23')]][_0xbaf2('0x34')]=_0x292450['resolution'];this[_0xbaf2('0x25')][_0x292450[_0xbaf2('0x23')]]['transferrate']=_0x292450[_0xbaf2('0x35')];this[_0xbaf2('0x25')][_0x292450[_0xbaf2('0x23')]][_0xbaf2('0x31')]=_0x292450[_0xbaf2('0x31')];this[_0xbaf2('0x25')][_0x292450[_0xbaf2('0x23')]][_0xbaf2('0x36')]=_0x292450['calleridnum'];if(this[_0xbaf2('0x25')][_0x292450[_0xbaf2('0x23')]][_0xbaf2('0x33')]>0x0){tiff2pdf(_0x292450[_0xbaf2('0x31')],_0xbaf2('0x37'),function(_0xaa38fd){logger[_0xbaf2('0x28')](_0x292450['uniqueid'],_0xbaf2('0x38'),_0xaa38fd[_0xbaf2('0x39')]);attachment[_0xbaf2('0x3a')]({'name':path[_0xbaf2('0x3b')](_0x292450[_0xbaf2('0x31')])[_0xbaf2('0x26')],'basename':path[_0xbaf2('0x3b')](_0x292450[_0xbaf2('0x31')])['name']+_0xbaf2('0x3c'),'type':'application/pdf'})[_0xbaf2('0x3d')](function(_0xa41bc1){faxAccount[_0xbaf2('0x3e')](_0x16e0d0,{'from':_0x292450[_0xbaf2('0x36')],'mapKey':_0xbaf2('0x6'),'body':path['parse'](_0x292450[_0xbaf2('0x31')])[_0xbaf2('0x26')]+'.pdf','AttachmentId':_0xa41bc1['id']})['catch'](function(_0x3d5440){logger[_0xbaf2('0x3f')](_0x292450[_0xbaf2('0x23')],_0xbaf2('0x40'),JSON[_0xbaf2('0x41')](_0x3d5440));});})['catch'](function(_0xe119ad){logger[_0xbaf2('0x3f')](_0x292450[_0xbaf2('0x23')],_0xbaf2('0x42'),JSON[_0xbaf2('0x41')](_0xe119ad));});});}logger[_0xbaf2('0x28')](_0x292450[_0xbaf2('0x23')],_0xbaf2('0x42'));}};Fax['prototype'][_0xbaf2('0x43')]=function(_0x47000e){if(this[_0xbaf2('0x11')][_0x47000e['uniqueid']]){_[_0xbaf2('0x44')](this[_0xbaf2('0x25')][_0x47000e[_0xbaf2('0x23')]],_[_0xbaf2('0x45')](_0x47000e,[_0xbaf2('0x46'),_0xbaf2('0x47')]));}};function updateStatus(_0x26f4a5){if(_0x26f4a5[_0xbaf2('0x48')]){faxMessage['update'](_0x26f4a5[_0xbaf2('0x48')],{'failMessage':'SENDING\x20FAILED\x20'})[_0xbaf2('0x3d')](function(_0x329f6a){ut[_0xbaf2('0x49')](_0xbaf2('0x4a'),_0x329f6a);})[_0xbaf2('0x4b')](function(_0x5109d7){ut[_0xbaf2('0x49')](_0xbaf2('0x4c'),_0x5109d7);});}else{ut['logger'](_0xbaf2('0x4d'));}}Fax[_0xbaf2('0x1e')][_0xbaf2('0x4e')]=function(_0xb78cac,_0x138876,_0x1a42c3){var _0x2f177a=this;var _0x1b8631={};if(_0x138876){_0x1b8631={'read':_0x138876};}else{_0x1b8631={'failMessage':_0x1a42c3};}if(this[_0xbaf2('0x11')][_0xb78cac][_0xbaf2('0x48')]){faxMessage[_0xbaf2('0x4f')](this[_0xbaf2('0x11')][_0xb78cac][_0xbaf2('0x48')],_0x1b8631)[_0xbaf2('0x3d')](function(_0x1a6059){ut[_0xbaf2('0x49')]('[Fax][Message][Updated]',_0x1a6059);})[_0xbaf2('0x4b')](function(_0x159d4e){ut[_0xbaf2('0x49')](_0xbaf2('0x50'),_0x159d4e);})[_0xbaf2('0x51')](function(){delete _0x2f177a[_0xbaf2('0x25')][_0xb78cac];delete _0x2f177a[_0xbaf2('0x11')][_0xb78cac];});}else{ut[_0xbaf2('0x49')]('[Fax][Message][NoUpdate2]');delete this[_0xbaf2('0x25')][_0xb78cac];delete this['actions'][_0xb78cac];}};Fax[_0xbaf2('0x1e')][_0xbaf2('0x1c')]=function(_0x4d3575){var _0x3c3965=this;if(this[_0xbaf2('0x25')][_0x4d3575['uniqueid']]){if(this[_0xbaf2('0x11')][_0x4d3575['uniqueid']]){this[_0xbaf2('0x25')][_0x4d3575['uniqueid']]['id']=this[_0xbaf2('0x11')][_0x4d3575[_0xbaf2('0x23')]]['id'];this[_0xbaf2('0x25')][_0x4d3575[_0xbaf2('0x23')]][_0xbaf2('0x26')]=this['actions'][_0x4d3575[_0xbaf2('0x23')]][_0xbaf2('0x26')];}logger[_0xbaf2('0x28')](_0x4d3575[_0xbaf2('0x23')],this[_0xbaf2('0x11')][_0x4d3575[_0xbaf2('0x23')]]?_0xbaf2('0x52'):_0xbaf2('0x53'),JSON['stringify'](this[_0xbaf2('0x25')][_0x4d3575[_0xbaf2('0x23')]]));if(this[_0xbaf2('0x11')][_0x4d3575[_0xbaf2('0x23')]]){if(this[_0xbaf2('0x25')][_0x4d3575[_0xbaf2('0x23')]][_0xbaf2('0x54')]>0x0&&this[_0xbaf2('0x25')][_0x4d3575[_0xbaf2('0x23')]][_0xbaf2('0x18')]==='SUCCESS'){this[_0xbaf2('0x4e')](_0x4d3575[_0xbaf2('0x23')],!![]);}else{this['updateStatus'](_0x4d3575[_0xbaf2('0x23')],![],this[_0xbaf2('0x25')][_0x4d3575['uniqueid']]['faxstatusstring']?_0xbaf2('0x55')+this[_0xbaf2('0x25')][_0x4d3575['uniqueid']][_0xbaf2('0x56')]:_0xbaf2('0x57'));}}}};Fax[_0xbaf2('0x1e')]['send']=function(_0x482d9f){var _0x5f2f93=this;return new BPromise(function(_0x5be7c8,_0x59c157){_0x5f2f93[_0xbaf2('0x58')](_0x482d9f,_0x5f2f93[_0xbaf2('0xf')][_0x482d9f[_0xbaf2('0x59')]])['then'](function(_0x2a8763){ut[_0xbaf2('0x49')](_0xbaf2('0x5a'),_0x2a8763);_0x5be7c8(ut[_0xbaf2('0x39')](_0xbaf2('0x5b')));})[_0xbaf2('0x4b')](function(_0x433455){ut['logger']('[Fax][execOriginate][failure]',_0x433455);updateStatus(_0x482d9f);_0x59c157(ut[_0xbaf2('0x39')](_0xbaf2('0x5c')));});});};Fax[_0xbaf2('0x1e')][_0xbaf2('0x5d')]=function(_0x4d680c){var _0x23b550=this;return new BPromise(function(_0x22892d,_0x1c1200){var _0x52ad3a=_0x23b550[_0xbaf2('0x5e')](_0x23b550['faxAccounts'][_0x4d680c['FaxAccountId']][_0xbaf2('0x5f')],_0x4d680c);if(_0x52ad3a[_0xbaf2('0x60')]){_0x22892d(ut['message'](_0xbaf2('0x61')));}else{_0x1c1200(ut[_0xbaf2('0x39')](_0x52ad3a[_0xbaf2('0x39')]));}});};function originate(_0x4eba59,_0x3c8c87,_0x526840){return new BPromise(function(_0x3a0be7,_0x46a0d1){if(_0x526840){var _0x13d10b=util[_0xbaf2('0x62')](_0xbaf2('0x63'),path[_0xbaf2('0x3b')](_0x4eba59['path'])[_0xbaf2('0x26')],_0x4eba59[_0xbaf2('0x3')]);gs[_0xbaf2('0x64')](_0x13d10b)[_0xbaf2('0x3d')](function(){_0x4eba59[_0xbaf2('0x3')]=util[_0xbaf2('0x62')](_0xbaf2('0x65'),path[_0xbaf2('0x3b')](_0x4eba59[_0xbaf2('0x3')])[_0xbaf2('0x66')],path[_0xbaf2('0x3b')](_0x4eba59[_0xbaf2('0x3')])[_0xbaf2('0x26')]);_0x3c8c87[_0xbaf2('0x67')]=_0x4eba59[_0xbaf2('0x3')];ut[_0xbaf2('0x49')](_0xbaf2('0x68'),'');ami[_0xbaf2('0x69')](ut[_0xbaf2('0x6a')](_0x4eba59,_0x3c8c87))[_0xbaf2('0x3d')](function(_0x506e56){_0x3a0be7(_0x506e56);})[_0xbaf2('0x4b')](function(_0xae1f3a){_0x46a0d1(_0xae1f3a);});})['catch'](function(_0x402ca1){_0x46a0d1(_0x402ca1);});}else{ami['Action'](ut[_0xbaf2('0x6a')](_0x4eba59,_0x3c8c87))[_0xbaf2('0x3d')](function(_0x3b4d6b){_0x3a0be7(_0x3b4d6b);})[_0xbaf2('0x4b')](function(_0x648b45){_0x46a0d1(_0x648b45);});}});}Fax[_0xbaf2('0x1e')][_0xbaf2('0x58')]=function(_0x543fdf,_0x53836b){var _0x1e7999=this;return new BPromise(function(_0xa39069,_0x2a19fb){var _0x4fdde9=uuid['v4']();var _0x460bcd=ut['addVariables'](_0x543fdf,_0x53836b);_0x1e7999[_0xbaf2('0x11')][_0x4fdde9]=new Action(_0x4fdde9,_0x53836b,_0x543fdf);var _0x53a4e8=_0x1e7999[_0xbaf2('0x11')][_0x4fdde9];if(path[_0xbaf2('0x3b')](_0x543fdf[_0xbaf2('0x3')])['ext']===_0xbaf2('0x3c')){originate(_0x53a4e8,_0x460bcd,!![])[_0xbaf2('0x3d')](function(_0x270ae8){_0xa39069(_0x270ae8);})[_0xbaf2('0x4b')](function(_0x85b0cc){_0x2a19fb(_0x85b0cc);});}else{originate(_0x53a4e8,_0x460bcd,![])[_0xbaf2('0x3d')](function(_0x3228d0){_0xa39069(_0x3228d0);})[_0xbaf2('0x4b')](function(_0x2b72e2){_0x2a19fb(_0x2b72e2);});}});};Fax[_0xbaf2('0x1e')]['isTrunkReachable']=function(_0x236e22){return!_[_0xbaf2('0x6b')](_0x236e22)&&!_[_0xbaf2('0x6b')](_0x236e22[_0xbaf2('0x26')])&&!_[_0xbaf2('0x6b')](_0x236e22[_0xbaf2('0x6c')])&&_0x236e22['active']&&!_['isNil'](this[_0xbaf2('0x10')][util[_0xbaf2('0x62')](_0xbaf2('0x6d'),_0x236e22['name'])])&&!_[_0xbaf2('0x6b')](this[_0xbaf2('0x10')][util[_0xbaf2('0x62')](_0xbaf2('0x6d'),_0x236e22['name'])][_0xbaf2('0x2f')])&&(this[_0xbaf2('0x10')][util[_0xbaf2('0x62')](_0xbaf2('0x6d'),_0x236e22[_0xbaf2('0x26')])]['status']===_0xbaf2('0x6e')||this[_0xbaf2('0x10')][util[_0xbaf2('0x62')](_0xbaf2('0x6d'),_0x236e22[_0xbaf2('0x26')])]['status']===_0xbaf2('0x6f'));};Fax[_0xbaf2('0x1e')][_0xbaf2('0x5e')]=function(_0x247267,_0x3b63ed){if(!this[_0xbaf2('0x70')](_0x247267)){ut[_0xbaf2('0x49')](_0xbaf2('0x71'),_[_0xbaf2('0x6b')](_0x247267)?'':_0x247267['name']+_0xbaf2('0x72'));return{'isValid':![],'message':_0xbaf2('0x73')};}if(_[_0xbaf2('0x6b')](_0x3b63ed[_0xbaf2('0x6')])){ut[_0xbaf2('0x49')]('[Fax][checkTrunk][Empty\x20Fax]',JSON[_0xbaf2('0x41')](_0x3b63ed));return{'isValid':![],'message':'Empty\x20Fax'};}if(_[_0xbaf2('0x6b')](_0x3b63ed[_0xbaf2('0x3')])){ut[_0xbaf2('0x49')](_0xbaf2('0x74'),JSON['stringify'](_0x3b63ed));return{'isValid':![],'message':_0xbaf2('0x75')};}return{'isValid':!![],'message':'Is\x20Valid'};};module['exports']=Fax;
\ No newline at end of file
index fb32853..383ac89 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8121=['../../../config/logger','preview','then','catch','[Notify]\x20','util','bluebird'];(function(_0x55f8b4,_0x43f30d){var _0x2475f9=function(_0xdd6f4a){while(--_0xdd6f4a){_0x55f8b4['push'](_0x55f8b4['shift']());}};_0x2475f9(++_0x43f30d);}(_0x8121,0x12b));var _0x1812=function(_0x236067,_0x27d1b9){_0x236067=_0x236067-0x0;var _0x4e7670=_0x8121[_0x236067];return _0x4e7670;};'use strict';var util=require(_0x1812('0x0'));var BPromise=require(_0x1812('0x1'));var logger=require(_0x1812('0x2'))(_0x1812('0x3'));var _=require('lodash');var faxAccount=require('../rpc/faxAccount');function loggerCatch(_0x370fb0){return function(_0x236a78){logger['error'](_0x370fb0,util['inspect'](_0x236a78,{'showHidden':![],'depth':null}));};}exports['notify']=function(_0x576f7b,_0x496129){return BPromise['resolve']()[_0x1812('0x4')](faxAccount['notify'](_0x576f7b,_0x496129))[_0x1812('0x5')](loggerCatch(_0x1812('0x6')));};
\ No newline at end of file
+var _0xfae1=['error','inspect','notify','resolve','catch','[Notify]\x20','util','../../../config/logger','preview','lodash','../rpc/faxAccount'];(function(_0x176c68,_0x7cb222){var _0x51e751=function(_0x391d22){while(--_0x391d22){_0x176c68['push'](_0x176c68['shift']());}};_0x51e751(++_0x7cb222);}(_0xfae1,0xd7));var _0x1fae=function(_0x35d414,_0x213fa5){_0x35d414=_0x35d414-0x0;var _0x1a0b9b=_0xfae1[_0x35d414];return _0x1a0b9b;};'use strict';var util=require(_0x1fae('0x0'));var BPromise=require('bluebird');var logger=require(_0x1fae('0x1'))(_0x1fae('0x2'));var _=require(_0x1fae('0x3'));var faxAccount=require(_0x1fae('0x4'));function loggerCatch(_0xcee474){return function(_0x4c4493){logger[_0x1fae('0x5')](_0xcee474,util[_0x1fae('0x6')](_0x4c4493,{'showHidden':![],'depth':null}));};}exports[_0x1fae('0x7')]=function(_0x13613a,_0x55e066){return BPromise[_0x1fae('0x8')]()['then'](faxAccount['notify'](_0x13613a,_0x55e066))[_0x1fae('0x9')](loggerCatch(_0x1fae('0xa')));};
\ No newline at end of file
index 506db42..ae35afc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x32af=['exec','Exec\x20gs','\x20Error\x20:','../../../../config/logger','bluebird'];(function(_0xaa0309,_0x1c8008){var _0x5de7ce=function(_0x3aa6ae){while(--_0x3aa6ae){_0xaa0309['push'](_0xaa0309['shift']());}};_0x5de7ce(++_0x1c8008);}(_0x32af,0x14d));var _0xf32a=function(_0x2afb28,_0x1dbed4){_0x2afb28=_0x2afb28-0x0;var _0x1751a4=_0x32af[_0x2afb28];return _0x1751a4;};'use strict';var util=require('util');var logger=require(_0xf32a('0x0'))('fax');var BPromise=require(_0xf32a('0x1'));var exec=require('child_process')[_0xf32a('0x2')];exports['execute']=function(_0x2e541d){return new BPromise(function(_0x539def,_0x50dc6e){exec(_0x2e541d,function(_0x5b6315,_0x1a5dce,_0x2d67c3){logger['info'](_0xf32a('0x3'),_0x1a5dce);if(_0x5b6315){logger['info'](_0xf32a('0x3'),_0xf32a('0x4'),util['inspect'](_0x5b6315,{'showHidden':![],'depth':null}),_0x1a5dce,_0x2d67c3);_0x50dc6e(_0x5b6315);}_0x539def(_0x1a5dce);});});};
\ No newline at end of file
+var _0x2f4e=['bluebird','child_process','exec','Exec\x20gs','info','\x20Error\x20:','inspect','util','../../../../config/logger','fax'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x2f4e,0x115));var _0xe2f4=function(_0x413a76,_0x51d84a){_0x413a76=_0x413a76-0x0;var _0x3aeeb6=_0x2f4e[_0x413a76];return _0x3aeeb6;};'use strict';var util=require(_0xe2f4('0x0'));var logger=require(_0xe2f4('0x1'))(_0xe2f4('0x2'));var BPromise=require(_0xe2f4('0x3'));var exec=require(_0xe2f4('0x4'))[_0xe2f4('0x5')];exports['execute']=function(_0x2b60da){return new BPromise(function(_0x1915fd,_0x125034){exec(_0x2b60da,function(_0x489f29,_0x26bc0a,_0x3320c9){logger['info'](_0xe2f4('0x6'),_0x26bc0a);if(_0x489f29){logger[_0xe2f4('0x7')](_0xe2f4('0x6'),_0xe2f4('0x8'),util[_0xe2f4('0x9')](_0x489f29,{'showHidden':![],'depth':null}),_0x26bc0a,_0x3320c9);_0x125034(_0x489f29);}_0x1915fd(_0x26bc0a);});});};
\ No newline at end of file
index 7329382..a982d8a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x21de=['\x22%s\x22\x20<%s>','lodash','moment','fax','message','logger','info','inspect','ecm','headerinfo','maxrate','\x22%s\x22','modem','t38timeout','localstationid','path','variablesAction','uniqueid','originate','xcally-motion-fax','format'];(function(_0x5e36d1,_0x471178){var _0x950b9e=function(_0x1872f3){while(--_0x1872f3){_0x5e36d1['push'](_0x5e36d1['shift']());}};_0x950b9e(++_0x471178);}(_0x21de,0x1a5));var _0xe21d=function(_0x52a201,_0x2d99a7){_0x52a201=_0x52a201-0x0;var _0x3cc785=_0x21de[_0x52a201];return _0x3cc785;};'use strict';var util=require('util');var _=require(_0xe21d('0x0'));var moment=require(_0xe21d('0x1'));var logger=require('../../../../config/logger')(_0xe21d('0x2'));exports[_0xe21d('0x3')]=function(_0x64f746){return{'message':_0x64f746};};exports[_0xe21d('0x4')]=function(_0x520ec2,_0x28b263){logger[_0xe21d('0x5')](_0x520ec2,util[_0xe21d('0x6')](_0x28b263,{'showHidden':![],'depth':null}));};exports['addVariables']=function(_0x59e1cc,_0x165a54){var _0x37dca3={'XMF-ECM':_0x165a54[_0xe21d('0x7')],'XMF-HEADERINFO':_0x165a54[_0xe21d('0x8')],'XMF-MINRATE':_0x165a54['minrate'],'XMF-MAXRATE':_0x165a54[_0xe21d('0x9')],'XMF-MODEM':util['format'](_0xe21d('0xa'),_0x165a54[_0xe21d('0xb')]),'XMF-GATEWAY':_0x165a54['gateway'],'XMF-FAXDETECT':_0x165a54['faxdetect'],'XMF-T38TIMEOUT':_0x165a54[_0xe21d('0xc')],'XMF-LOCALSTATIONID':_0x165a54[_0xe21d('0xd')],'XMF-PATH':_0x59e1cc[_0xe21d('0xe')]};return _0x37dca3;};exports[_0xe21d('0xf')]=function(_0x307718,_0x286cd8){return{'actionid':_0x307718[_0xe21d('0x10')],'action':_0xe21d('0x11'),'channel':_0x307718['channel'],'Exten':_0xe21d('0x12'),'Context':'from-sip','Priority':'1','callerid':util[_0xe21d('0x13')](_0xe21d('0x14'),_0x307718['headerinfo']?_0x307718[_0xe21d('0x8')]:'',_0x307718[_0xe21d('0xd')]),'variable':_0x286cd8,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x307718[_0xe21d('0x10')]};};
\ No newline at end of file
+var _0x01bf=['maxrate','format','\x22%s\x22','modem','gateway','faxdetect','t38timeout','localstationid','path','variablesAction','channel','\x22%s\x22\x20<%s>','util','lodash','moment','../../../../config/logger','fax','message','logger','info','inspect','addVariables','ecm','headerinfo','minrate'];(function(_0x276c56,_0x4b6105){var _0x37c7d5=function(_0x4aceac){while(--_0x4aceac){_0x276c56['push'](_0x276c56['shift']());}};_0x37c7d5(++_0x4b6105);}(_0x01bf,0xbb));var _0xf01b=function(_0x50cb5c,_0x377a47){_0x50cb5c=_0x50cb5c-0x0;var _0x361ad4=_0x01bf[_0x50cb5c];return _0x361ad4;};'use strict';var util=require(_0xf01b('0x0'));var _=require(_0xf01b('0x1'));var moment=require(_0xf01b('0x2'));var logger=require(_0xf01b('0x3'))(_0xf01b('0x4'));exports[_0xf01b('0x5')]=function(_0x4cfcef){return{'message':_0x4cfcef};};exports[_0xf01b('0x6')]=function(_0x2a9e44,_0x4ddee7){logger[_0xf01b('0x7')](_0x2a9e44,util[_0xf01b('0x8')](_0x4ddee7,{'showHidden':![],'depth':null}));};exports[_0xf01b('0x9')]=function(_0x314d58,_0x30448d){var _0x223d8a={'XMF-ECM':_0x30448d[_0xf01b('0xa')],'XMF-HEADERINFO':_0x30448d[_0xf01b('0xb')],'XMF-MINRATE':_0x30448d[_0xf01b('0xc')],'XMF-MAXRATE':_0x30448d[_0xf01b('0xd')],'XMF-MODEM':util[_0xf01b('0xe')](_0xf01b('0xf'),_0x30448d[_0xf01b('0x10')]),'XMF-GATEWAY':_0x30448d[_0xf01b('0x11')],'XMF-FAXDETECT':_0x30448d[_0xf01b('0x12')],'XMF-T38TIMEOUT':_0x30448d[_0xf01b('0x13')],'XMF-LOCALSTATIONID':_0x30448d[_0xf01b('0x14')],'XMF-PATH':_0x314d58[_0xf01b('0x15')]};return _0x223d8a;};exports[_0xf01b('0x16')]=function(_0x5eee82,_0x1c0321){return{'actionid':_0x5eee82['uniqueid'],'action':'originate','channel':_0x5eee82[_0xf01b('0x17')],'Exten':'xcally-motion-fax','Context':'from-sip','Priority':'1','callerid':util[_0xf01b('0xe')](_0xf01b('0x18'),_0x5eee82[_0xf01b('0xb')]?_0x5eee82['headerinfo']:'',_0x5eee82[_0xf01b('0x14')]),'variable':_0x1c0321,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x5eee82['uniqueid']};};
\ No newline at end of file
index e71dcaf..cb043c9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9518=['./rpc/integrations/zoho','./rpc/integrations/vtiger','./rpc/integrations/freshsales','./rpc/integrations/servicenow','./rpc/integrations/dynamics365','../../config/logger','ami','get','hour','resolve','then','initAgents','getTelephones','initTelephones','getTrunks','initTrunks','getVoiceQueues','initVoiceQueues','getTriggers','initTriggers','initTemplates','getZendeskAccounts','initZendeskAccounts','initSalesforceAccounts','getSugarcrmAccounts','initSugarcrmAccounts','getFreshdeskAccounts','initFreshdeskAccounts','initDeskAccounts','getZohoAccounts','initZohoAccounts','getVtigerAccounts','getFreshsalesAccounts','getServicenowAccounts','initServicenowAccounts','getDynamics365Accounts','initDynamics365Accounts','getCampaigns','initCampaigns','getVoiceExtensions','getFaxAccounts','initFaxAccounts','initVoiceQueueReports','initVoiceQueueHopperHistory','getCampaignHopperHistory','initCampaignHopperHistory','getVoiceCallReports','catch','[index.js][initParams]','inspect','listen','sync','error','[index.js][main]','util','moment','./server','./report','./acw','./trigger','./dialer','./fax','./rpc/user','./rpc/voiceQueue','./rpc/voiceQueueReport','./rpc/voiceCallReport','./rpc/trunk','./rpc/trigger','./rpc/template','./rpc/cmHopperHistory','./rpc/campaign','./rpc/faxAccount','./rpc/integrations/zendesk','./rpc/integrations/salesforce','./rpc/integrations/sugarcrm','./rpc/integrations/desk'];(function(_0xd74328,_0x2160d1){var _0x5736f5=function(_0x4ca191){while(--_0x4ca191){_0xd74328['push'](_0xd74328['shift']());}};_0x5736f5(++_0x2160d1);}(_0x9518,0xce));var _0x8951=function(_0x5b93f8,_0xffefcd){_0x5b93f8=_0x5b93f8-0x0;var _0x1430ec=_0x9518[_0x5b93f8];return _0x1430ec;};'use strict';var util=require(_0x8951('0x0'));var moment=require(_0x8951('0x1'));var server=require(_0x8951('0x2'));var Realtime=require('./realtime');var Report=require(_0x8951('0x3'));var Acw=require(_0x8951('0x4'));var Trigger=require(_0x8951('0x5'));var Dialer=require(_0x8951('0x6'));var Preview=require('./preview');var Fax=require(_0x8951('0x7'));var user=require(_0x8951('0x8'));var voiceQueue=require(_0x8951('0x9'));var voiceQueueReport=require(_0x8951('0xa'));var voiceCallReport=require(_0x8951('0xb'));var trunk=require(_0x8951('0xc'));var trigger=require(_0x8951('0xd'));var template=require(_0x8951('0xe'));var cmHopperHistory=require(_0x8951('0xf'));var campaign=require(_0x8951('0x10'));var voiceExtension=require('./rpc/voiceExtension');var faxAccount=require(_0x8951('0x11'));var zendesk=require(_0x8951('0x12'));var salesforce=require(_0x8951('0x13'));var sugarcrm=require(_0x8951('0x14'));var freshdesk=require('./rpc/integrations/freshdesk');var desk=require(_0x8951('0x15'));var zoho=require(_0x8951('0x16'));var vtiger=require(_0x8951('0x17'));var freshsales=require(_0x8951('0x18'));var servicenow=require(_0x8951('0x19'));var dynamics365=require(_0x8951('0x1a'));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(_0x8951('0x1b'))(_0x8951('0x1c'));var isTrue=!![];var initP=!![];function ifMidnight(){if(moment()[_0x8951('0x1d')](_0x8951('0x1e'))===0x0&&initP){initP=![];isTrue=!![];initParams();}if(moment()['get'](_0x8951('0x1e'))===0x1&&isTrue){isTrue=![];initP=!![];}}function initRealtime(){ifMidnight();return Promise[_0x8951('0x1f')]()[_0x8951('0x20')](user['getAgents']())[_0x8951('0x20')](realtime[_0x8951('0x21')]())[_0x8951('0x20')](user[_0x8951('0x22')]())[_0x8951('0x20')](realtime[_0x8951('0x23')]())[_0x8951('0x20')](trunk[_0x8951('0x24')]())[_0x8951('0x20')](realtime[_0x8951('0x25')]())[_0x8951('0x20')](voiceQueue[_0x8951('0x26')]())[_0x8951('0x20')](realtime[_0x8951('0x27')]())['then'](trigger[_0x8951('0x28')]())[_0x8951('0x20')](realtime[_0x8951('0x29')]())[_0x8951('0x20')](template['getTemplates']())[_0x8951('0x20')](realtime[_0x8951('0x2a')]())[_0x8951('0x20')](zendesk[_0x8951('0x2b')]())['then'](realtime[_0x8951('0x2c')]())[_0x8951('0x20')](salesforce['getSalesforceAccounts']())['then'](realtime[_0x8951('0x2d')]())[_0x8951('0x20')](sugarcrm[_0x8951('0x2e')]())['then'](realtime[_0x8951('0x2f')]())['then'](freshdesk[_0x8951('0x30')]())['then'](realtime[_0x8951('0x31')]())['then'](desk['getDeskAccounts']())[_0x8951('0x20')](realtime[_0x8951('0x32')]())['then'](zoho[_0x8951('0x33')]())[_0x8951('0x20')](realtime[_0x8951('0x34')]())[_0x8951('0x20')](vtiger[_0x8951('0x35')]())['then'](realtime['initVtigerAccounts']())['then'](freshsales[_0x8951('0x36')]())[_0x8951('0x20')](realtime['initFreshsalesAccounts']())[_0x8951('0x20')](servicenow[_0x8951('0x37')]())[_0x8951('0x20')](realtime[_0x8951('0x38')]())[_0x8951('0x20')](dynamics365[_0x8951('0x39')]())[_0x8951('0x20')](realtime[_0x8951('0x3a')]())[_0x8951('0x20')](campaign[_0x8951('0x3b')]())[_0x8951('0x20')](realtime[_0x8951('0x3c')]())[_0x8951('0x20')](voiceExtension[_0x8951('0x3d')]())['then'](realtime['initVoiceExtensions']())[_0x8951('0x20')](faxAccount[_0x8951('0x3e')]())[_0x8951('0x20')](realtime[_0x8951('0x3f')]())['then'](function(){return realtime;});}function initParams(){return Promise['resolve']()[_0x8951('0x20')](voiceQueueReport['getVoiceQueueReports']())[_0x8951('0x20')](realtime[_0x8951('0x40')]())[_0x8951('0x20')](cmHopperHistory['getVoiceQueueHopperHistory']())[_0x8951('0x20')](realtime[_0x8951('0x41')]())[_0x8951('0x20')](cmHopperHistory[_0x8951('0x42')]())['then'](realtime[_0x8951('0x43')]())[_0x8951('0x20')](voiceCallReport[_0x8951('0x44')]())[_0x8951('0x20')](realtime['initVoiceCallReports']())[_0x8951('0x45')](function(_0x4ab67e){logger['error'](_0x8951('0x46'),util[_0x8951('0x47')](_0x4ab67e,{'showHidden':![],'depth':null}));});}function main(){return server[_0x8951('0x48')](realtime,preview,fax)[_0x8951('0x20')](function(){return initRealtime();})['then'](function(){return initParams();})[_0x8951('0x20')](function(){report[_0x8951('0x49')]();setInterval(initRealtime,0x1388);})['catch'](function(_0x4ed8e4){logger[_0x8951('0x4a')](_0x8951('0x4b'),util[_0x8951('0x47')](_0x4ed8e4,{'showHidden':![],'depth':null}));});}main();
\ No newline at end of file
+var _0x3ef5=['initSalesforceAccounts','initSugarcrmAccounts','getDeskAccounts','initDeskAccounts','getZohoAccounts','initZohoAccounts','getVtigerAccounts','getFreshsalesAccounts','getServicenowAccounts','initServicenowAccounts','getDynamics365Accounts','initDynamics365Accounts','getVoiceExtensions','initVoiceExtensions','getFaxAccounts','resolve','getVoiceQueueReports','initVoiceQueueReports','getVoiceQueueHopperHistory','initVoiceQueueHopperHistory','initCampaignHopperHistory','getVoiceCallReports','initVoiceCallReports','catch','error','[index.js][initParams]','sync','[index.js][main]','util','moment','./server','./realtime','./acw','./trigger','./dialer','./preview','./fax','./rpc/user','./rpc/voiceQueue','./rpc/voiceQueueReport','./rpc/trunk','./rpc/trigger','./rpc/template','./rpc/cmHopperHistory','./rpc/campaign','./rpc/faxAccount','./rpc/integrations/zendesk','./rpc/integrations/sugarcrm','./rpc/integrations/desk','./rpc/integrations/zoho','./rpc/integrations/vtiger','./rpc/integrations/freshsales','./rpc/integrations/servicenow','./rpc/integrations/dynamics365','../../config/logger','ami','get','hour','then','getAgents','initAgents','getTelephones','initTelephones','getTrunks','initTrunks','getVoiceQueues','getTriggers','initTriggers','getTemplates','initTemplates','getZendeskAccounts','getSalesforceAccounts'];(function(_0x645adc,_0x23ab56){var _0x253557=function(_0x1852b9){while(--_0x1852b9){_0x645adc['push'](_0x645adc['shift']());}};_0x253557(++_0x23ab56);}(_0x3ef5,0x64));var _0x53ef=function(_0x13c0b3,_0x4c7bb3){_0x13c0b3=_0x13c0b3-0x0;var _0x3f50fa=_0x3ef5[_0x13c0b3];return _0x3f50fa;};'use strict';var util=require(_0x53ef('0x0'));var moment=require(_0x53ef('0x1'));var server=require(_0x53ef('0x2'));var Realtime=require(_0x53ef('0x3'));var Report=require('./report');var Acw=require(_0x53ef('0x4'));var Trigger=require(_0x53ef('0x5'));var Dialer=require(_0x53ef('0x6'));var Preview=require(_0x53ef('0x7'));var Fax=require(_0x53ef('0x8'));var user=require(_0x53ef('0x9'));var voiceQueue=require(_0x53ef('0xa'));var voiceQueueReport=require(_0x53ef('0xb'));var voiceCallReport=require('./rpc/voiceCallReport');var trunk=require(_0x53ef('0xc'));var trigger=require(_0x53ef('0xd'));var template=require(_0x53ef('0xe'));var cmHopperHistory=require(_0x53ef('0xf'));var campaign=require(_0x53ef('0x10'));var voiceExtension=require('./rpc/voiceExtension');var faxAccount=require(_0x53ef('0x11'));var zendesk=require(_0x53ef('0x12'));var salesforce=require('./rpc/integrations/salesforce');var sugarcrm=require(_0x53ef('0x13'));var freshdesk=require('./rpc/integrations/freshdesk');var desk=require(_0x53ef('0x14'));var zoho=require(_0x53ef('0x15'));var vtiger=require(_0x53ef('0x16'));var freshsales=require(_0x53ef('0x17'));var servicenow=require(_0x53ef('0x18'));var dynamics365=require(_0x53ef('0x19'));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(_0x53ef('0x1a'))(_0x53ef('0x1b'));var isTrue=!![];var initP=!![];function ifMidnight(){if(moment()[_0x53ef('0x1c')](_0x53ef('0x1d'))===0x0&&initP){initP=![];isTrue=!![];initParams();}if(moment()[_0x53ef('0x1c')](_0x53ef('0x1d'))===0x1&&isTrue){isTrue=![];initP=!![];}}function initRealtime(){ifMidnight();return Promise['resolve']()[_0x53ef('0x1e')](user[_0x53ef('0x1f')]())[_0x53ef('0x1e')](realtime[_0x53ef('0x20')]())[_0x53ef('0x1e')](user[_0x53ef('0x21')]())['then'](realtime[_0x53ef('0x22')]())[_0x53ef('0x1e')](trunk[_0x53ef('0x23')]())[_0x53ef('0x1e')](realtime[_0x53ef('0x24')]())['then'](voiceQueue[_0x53ef('0x25')]())[_0x53ef('0x1e')](realtime['initVoiceQueues']())[_0x53ef('0x1e')](trigger[_0x53ef('0x26')]())[_0x53ef('0x1e')](realtime[_0x53ef('0x27')]())['then'](template[_0x53ef('0x28')]())[_0x53ef('0x1e')](realtime[_0x53ef('0x29')]())['then'](zendesk[_0x53ef('0x2a')]())[_0x53ef('0x1e')](realtime['initZendeskAccounts']())[_0x53ef('0x1e')](salesforce[_0x53ef('0x2b')]())[_0x53ef('0x1e')](realtime[_0x53ef('0x2c')]())[_0x53ef('0x1e')](sugarcrm['getSugarcrmAccounts']())[_0x53ef('0x1e')](realtime[_0x53ef('0x2d')]())['then'](freshdesk['getFreshdeskAccounts']())[_0x53ef('0x1e')](realtime['initFreshdeskAccounts']())[_0x53ef('0x1e')](desk[_0x53ef('0x2e')]())['then'](realtime[_0x53ef('0x2f')]())[_0x53ef('0x1e')](zoho[_0x53ef('0x30')]())[_0x53ef('0x1e')](realtime[_0x53ef('0x31')]())[_0x53ef('0x1e')](vtiger[_0x53ef('0x32')]())['then'](realtime['initVtigerAccounts']())[_0x53ef('0x1e')](freshsales[_0x53ef('0x33')]())[_0x53ef('0x1e')](realtime['initFreshsalesAccounts']())[_0x53ef('0x1e')](servicenow[_0x53ef('0x34')]())[_0x53ef('0x1e')](realtime[_0x53ef('0x35')]())['then'](dynamics365[_0x53ef('0x36')]())[_0x53ef('0x1e')](realtime[_0x53ef('0x37')]())[_0x53ef('0x1e')](campaign['getCampaigns']())['then'](realtime['initCampaigns']())[_0x53ef('0x1e')](voiceExtension[_0x53ef('0x38')]())['then'](realtime[_0x53ef('0x39')]())[_0x53ef('0x1e')](faxAccount[_0x53ef('0x3a')]())[_0x53ef('0x1e')](realtime['initFaxAccounts']())['then'](function(){return realtime;});}function initParams(){return Promise[_0x53ef('0x3b')]()['then'](voiceQueueReport[_0x53ef('0x3c')]())[_0x53ef('0x1e')](realtime[_0x53ef('0x3d')]())[_0x53ef('0x1e')](cmHopperHistory[_0x53ef('0x3e')]())[_0x53ef('0x1e')](realtime[_0x53ef('0x3f')]())[_0x53ef('0x1e')](cmHopperHistory['getCampaignHopperHistory']())['then'](realtime[_0x53ef('0x40')]())[_0x53ef('0x1e')](voiceCallReport[_0x53ef('0x41')]())[_0x53ef('0x1e')](realtime[_0x53ef('0x42')]())[_0x53ef('0x43')](function(_0x476d46){logger[_0x53ef('0x44')](_0x53ef('0x45'),util['inspect'](_0x476d46,{'showHidden':![],'depth':null}));});}function main(){return server['listen'](realtime,preview,fax)[_0x53ef('0x1e')](function(){return initRealtime();})['then'](function(){return initParams();})[_0x53ef('0x1e')](function(){report[_0x53ef('0x46')]();setInterval(initRealtime,0x1388);})[_0x53ef('0x43')](function(_0x38019d){logger[_0x53ef('0x44')](_0x53ef('0x47'),util['inspect'](_0x38019d,{'showHidden':![],'depth':null}));});}main();
\ No newline at end of file
index f915a85..6d7d529 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4f38=['voiceStatusQueue','onhold','local','prototype','state','toLowerCase','not_inuse','idle','statePause','format','status','stringify','user:%s','user:ami:update','emit','user:presence','exports','lodash','md5','ioredis','redis','defaults','localhost','socket.io-emitter','name','email','accountcode','fullname','unknown','stateTime','address','interface','online','voiceStatus','voiceStatusTime'];(function(_0x59d0dc,_0x446440){var _0x4cc2b7=function(_0x51aee8){while(--_0x51aee8){_0x59d0dc['push'](_0x59d0dc['shift']());}};_0x4cc2b7(++_0x446440);}(_0x4f38,0x1b5));var _0x84f3=function(_0x42970b,_0x13dcc5){_0x42970b=_0x42970b-0x0;var _0x28d314=_0x4f38[_0x42970b];return _0x28d314;};'use strict';var _=require(_0x84f3('0x0'));var util=require('util');var moment=require('moment');var md5=require(_0x84f3('0x1'));var Redis=require(_0x84f3('0x2'));var config=require('../../../config/environment');config[_0x84f3('0x3')]=_[_0x84f3('0x4')](config[_0x84f3('0x3')],{'host':_0x84f3('0x5'),'port':0x18eb});var io=require(_0x84f3('0x6'))(new Redis(config[_0x84f3('0x3')]));function Agent(_0x452f93){this['id']=_0x452f93['id']||0x0;this[_0x84f3('0x7')]=_0x452f93[_0x84f3('0x7')]||'';this[_0x84f3('0x8')]=_0x452f93[_0x84f3('0x8')]||'';this['accountcode']=_0x452f93[_0x84f3('0x9')]||'';this[_0x84f3('0xa')]=_0x452f93[_0x84f3('0xa')]||'';this['state']=_0x84f3('0xb');this[_0x84f3('0xc')]=0x0;this['status']=_0x84f3('0xb');this[_0x84f3('0xd')]='';this['phone']='';this['mobile']='';this[_0x84f3('0xe')]='';this[_0x84f3('0xf')]=_0x452f93[_0x84f3('0xf')]||![];this[_0x84f3('0x10')]=_0x84f3('0xb');this[_0x84f3('0x11')]=0x0;this['voiceStatusCallerIdNumber']='';this[_0x84f3('0x12')]='';this[_0x84f3('0x13')]=![];this[_0x84f3('0x14')]=![];this[_0x84f3('0x1')]='';}Agent[_0x84f3('0x15')]['updateStatusRealtime']=function(_0x63d6e){var _0x15daed;if(_0x63d6e&&_0x63d6e[_0x84f3('0x16')]){_0x15daed=_0x63d6e[_0x84f3('0x16')][_0x84f3('0x17')]();switch(_0x15daed){case _0x84f3('0x18'):_0x15daed=_0x84f3('0x19');break;case'inuse':_0x15daed='talking';break;}}if(_0x15daed&&this[_0x84f3('0x10')]!==_0x15daed||_0x63d6e[_0x84f3('0x1a')]){this[_0x84f3('0x11')]=_['toNumber'](moment()[_0x84f3('0x1b')]('x'));}if(_0x15daed){this[_0x84f3('0x10')]=_0x15daed;}var _0x1a6e94={'id':this['id'],'name':this[_0x84f3('0x7')],'email':this[_0x84f3('0x8')],'accountcode':this[_0x84f3('0x9')],'fullname':this[_0x84f3('0xa')],'state':this['state'],'stateTime':this[_0x84f3('0xc')],'status':this[_0x84f3('0x1c')],'address':this['address'],'online':this['online'],'voiceStatus':this[_0x84f3('0x10')],'voiceStatusTime':this[_0x84f3('0x11')],'voiceStatusCallerIdNumber':this['voiceStatusCallerIdNumber'],'voiceStatusQueue':this[_0x84f3('0x12')],'interface':this[_0x84f3('0xe')],'onhold':this[_0x84f3('0x13')]};var _0x4d2839=md5(JSON[_0x84f3('0x1d')](_0x1a6e94));if(this['md5']!==_0x4d2839){this['md5']=_0x4d2839;io['to'](util[_0x84f3('0x1b')](_0x84f3('0x1e'),_0x1a6e94['name']))['emit'](_0x84f3('0x1f'),_['omit'](_0x1a6e94,[_0x84f3('0xf')]));io[_0x84f3('0x20')](_0x84f3('0x21'),_0x1a6e94);}};module[_0x84f3('0x22')]=Agent;
\ No newline at end of file
+var _0xd46b=['ioredis','redis','defaults','localhost','socket.io-emitter','name','email','accountcode','fullname','state','stateTime','status','address','online','voiceStatus','voiceStatusTime','voiceStatusCallerIdNumber','voiceStatusQueue','local','prototype','updateStatusRealtime','toLowerCase','not_inuse','idle','inuse','talking','format','interface','onhold','stringify','user:%s','emit','omit','exports','lodash','util','moment','md5'];(function(_0x3ba527,_0x446a5e){var _0x5ee6ad=function(_0x5978c7){while(--_0x5978c7){_0x3ba527['push'](_0x3ba527['shift']());}};_0x5ee6ad(++_0x446a5e);}(_0xd46b,0x12c));var _0xbd46=function(_0x4a71f5,_0x401424){_0x4a71f5=_0x4a71f5-0x0;var _0x27162f=_0xd46b[_0x4a71f5];return _0x27162f;};'use strict';var _=require(_0xbd46('0x0'));var util=require(_0xbd46('0x1'));var moment=require(_0xbd46('0x2'));var md5=require(_0xbd46('0x3'));var Redis=require(_0xbd46('0x4'));var config=require('../../../config/environment');config[_0xbd46('0x5')]=_[_0xbd46('0x6')](config[_0xbd46('0x5')],{'host':_0xbd46('0x7'),'port':0x18eb});var io=require(_0xbd46('0x8'))(new Redis(config[_0xbd46('0x5')]));function Agent(_0x38edb4){this['id']=_0x38edb4['id']||0x0;this[_0xbd46('0x9')]=_0x38edb4[_0xbd46('0x9')]||'';this[_0xbd46('0xa')]=_0x38edb4[_0xbd46('0xa')]||'';this[_0xbd46('0xb')]=_0x38edb4[_0xbd46('0xb')]||'';this[_0xbd46('0xc')]=_0x38edb4[_0xbd46('0xc')]||'';this[_0xbd46('0xd')]='unknown';this[_0xbd46('0xe')]=0x0;this[_0xbd46('0xf')]='unknown';this[_0xbd46('0x10')]='';this['phone']='';this['mobile']='';this['interface']='';this[_0xbd46('0x11')]=_0x38edb4[_0xbd46('0x11')]||![];this[_0xbd46('0x12')]='unknown';this[_0xbd46('0x13')]=0x0;this[_0xbd46('0x14')]='';this[_0xbd46('0x15')]='';this['onhold']=![];this[_0xbd46('0x16')]=![];this[_0xbd46('0x3')]='';}Agent[_0xbd46('0x17')][_0xbd46('0x18')]=function(_0x5e0b66){var _0x20d128;if(_0x5e0b66&&_0x5e0b66[_0xbd46('0xd')]){_0x20d128=_0x5e0b66[_0xbd46('0xd')][_0xbd46('0x19')]();switch(_0x20d128){case _0xbd46('0x1a'):_0x20d128=_0xbd46('0x1b');break;case _0xbd46('0x1c'):_0x20d128=_0xbd46('0x1d');break;}}if(_0x20d128&&this[_0xbd46('0x12')]!==_0x20d128||_0x5e0b66['statePause']){this[_0xbd46('0x13')]=_['toNumber'](moment()[_0xbd46('0x1e')]('x'));}if(_0x20d128){this['voiceStatus']=_0x20d128;}var _0x69ebda={'id':this['id'],'name':this[_0xbd46('0x9')],'email':this[_0xbd46('0xa')],'accountcode':this['accountcode'],'fullname':this[_0xbd46('0xc')],'state':this[_0xbd46('0xd')],'stateTime':this['stateTime'],'status':this[_0xbd46('0xf')],'address':this[_0xbd46('0x10')],'online':this[_0xbd46('0x11')],'voiceStatus':this['voiceStatus'],'voiceStatusTime':this['voiceStatusTime'],'voiceStatusCallerIdNumber':this[_0xbd46('0x14')],'voiceStatusQueue':this['voiceStatusQueue'],'interface':this[_0xbd46('0x1f')],'onhold':this[_0xbd46('0x20')]};var _0x554fc5=md5(JSON[_0xbd46('0x21')](_0x69ebda));if(this[_0xbd46('0x3')]!==_0x554fc5){this[_0xbd46('0x3')]=_0x554fc5;io['to'](util[_0xbd46('0x1e')](_0xbd46('0x22'),_0x69ebda[_0xbd46('0x9')]))[_0xbd46('0x23')]('user:ami:update',_[_0xbd46('0x24')](_0x69ebda,[_0xbd46('0x11')]));io['emit']('user:presence',_0x69ebda);}};module[_0xbd46('0x25')]=Agent;
\ No newline at end of file
index 0da84d1..34d8589 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4235=['dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialPrefix','dialRandomLastDigitCallerIdNumber','dialCutDigit','TrunkBackup','Trunk','Interval','SquareProject','dialQueueProject','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','exports','name','type','campaign','originated','temp','ivrAnswerCallsDay','ivrTotalCallsDays','sendMessageOneNotActive','active','limitCalls','dialTimezone','dialGlobalInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency'];(function(_0x2bc7bc,_0x827ea){var _0xbae862=function(_0xdde795){while(--_0xdde795){_0x2bc7bc['push'](_0x2bc7bc['shift']());}};_0xbae862(++_0x827ea);}(_0x4235,0x1e1));var _0x5423=function(_0x493150,_0x107958){_0x493150=_0x493150-0x0;var _0x3fe8da=_0x4235[_0x493150];return _0x3fe8da;};'use strict';function Campaign(_0x48b76d){this['id']=_0x48b76d['id']||0x0;this[_0x5423('0x0')]=_0x48b76d[_0x5423('0x0')]||'';this['type']=_0x48b76d[_0x5423('0x1')]||_0x5423('0x2');this[_0x5423('0x3')]=0x0;this[_0x5423('0x4')]=0x0;this[_0x5423('0x5')]=0x0;this[_0x5423('0x6')]=0x0;this['message']='';this[_0x5423('0x7')]=!![];this[_0x5423('0x8')]=_0x48b76d[_0x5423('0x8')];this[_0x5423('0x9')]=_0x48b76d[_0x5423('0x9')];this['dialTimezone']=_0x48b76d[_0x5423('0xa')]||null;this[_0x5423('0xb')]=_0x48b76d[_0x5423('0xb')]?_0x48b76d[_0x5423('0xb')]:null;this[_0x5423('0xc')]=_0x48b76d[_0x5423('0xc')];this['dialOriginateCallerIdNumber']=_0x48b76d[_0x5423('0xd')];this[_0x5423('0xe')]=_0x48b76d[_0x5423('0xe')]||0x1e;this[_0x5423('0xf')]=_0x48b76d[_0x5423('0xf')];this[_0x5423('0x10')]=_0x48b76d[_0x5423('0x10')];this[_0x5423('0x11')]=_0x48b76d[_0x5423('0x11')];this[_0x5423('0x12')]=_0x48b76d[_0x5423('0x12')];this[_0x5423('0x13')]=_0x48b76d['dialNoAnswerMaxRetry'];this[_0x5423('0x14')]=_0x48b76d[_0x5423('0x14')];this[_0x5423('0x15')]=_0x48b76d[_0x5423('0x15')];this[_0x5423('0x16')]=_0x48b76d[_0x5423('0x16')]||0x3;this[_0x5423('0x17')]=_0x48b76d['dialNoSuchNumberRetryFrequency']||0x96;this[_0x5423('0x18')]=_0x48b76d[_0x5423('0x18')]||0x3;this[_0x5423('0x19')]=_0x48b76d['dialDropRetryFrequency']||0x96;this[_0x5423('0x1a')]=_0x48b76d['dialAbandonedMaxRetry']||0x3;this[_0x5423('0x1b')]=_0x48b76d[_0x5423('0x1b')]||0x96;this['dialMachineMaxRetry']=_0x48b76d[_0x5423('0x1c')]||0x3;this[_0x5423('0x1d')]=_0x48b76d['dialMachineRetryFrequency']||0x96;this[_0x5423('0x1e')]=_0x48b76d[_0x5423('0x1e')]||0x3;this[_0x5423('0x1f')]=_0x48b76d[_0x5423('0x1f')]||0x96;this['dialOrderByScheduledAt']=_0x48b76d['dialOrderByScheduledAt']||'DESC';this[_0x5423('0x20')]=_0x48b76d[_0x5423('0x20')]||undefined;this[_0x5423('0x21')]=_0x48b76d[_0x5423('0x21')]||undefined;this[_0x5423('0x22')]=_0x48b76d[_0x5423('0x22')]||undefined;this[_0x5423('0x23')]=_0x48b76d[_0x5423('0x23')]?_0x48b76d[_0x5423('0x23')]:undefined;this['Trunk']=_0x48b76d[_0x5423('0x24')]?_0x48b76d[_0x5423('0x24')]:undefined;this[_0x5423('0x25')]=_0x48b76d['Interval']?_0x48b76d[_0x5423('0x25')]:undefined;this['SquareProject']=_0x48b76d[_0x5423('0x26')]?_0x48b76d[_0x5423('0x26')]:undefined;this[_0x5423('0x27')]=_0x48b76d['SquareProject']?_0x48b76d['SquareProject'][_0x5423('0x0')]:undefined;this['dialAMDActive']=_0x48b76d['dialAMDActive']||![];this[_0x5423('0x28')]=_0x48b76d['dialAMDInitialSilence'];this[_0x5423('0x29')]=_0x48b76d[_0x5423('0x29')];this[_0x5423('0x2a')]=_0x48b76d['dialAMDAfterGreetingSilence'];this[_0x5423('0x2b')]=_0x48b76d[_0x5423('0x2b')];this[_0x5423('0x2c')]=_0x48b76d[_0x5423('0x2c')];this['dialAMDBetweenWordsSilence']=_0x48b76d[_0x5423('0x2d')];this['dialAMDMaximumNumberOfWords']=_0x48b76d[_0x5423('0x2e')];this[_0x5423('0x2f')]=_0x48b76d[_0x5423('0x2f')];this[_0x5423('0x30')]=_0x48b76d['dialAMDMaximumWordLength'];}module[_0x5423('0x31')]=Campaign;
\ No newline at end of file
+var _0x7ac9=['dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialOrderByScheduledAt','dialPrefix','dialRandomLastDigitCallerIdNumber','dialCutDigit','TrunkBackup','Trunk','Interval','SquareProject','dialQueueProject','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','name','type','campaign','originated','temp','ivrAnswerCallsDay','ivrTotalCallsDays','message','sendMessageOneNotActive','active','limitCalls','dialTimezone','dialGlobalInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency'];(function(_0x3ab51d,_0x2fa01d){var _0x29a04e=function(_0x7807b0){while(--_0x7807b0){_0x3ab51d['push'](_0x3ab51d['shift']());}};_0x29a04e(++_0x2fa01d);}(_0x7ac9,0x151));var _0x97ac=function(_0x308216,_0x55f80b){_0x308216=_0x308216-0x0;var _0xd7244a=_0x7ac9[_0x308216];return _0xd7244a;};'use strict';function Campaign(_0x16c13b){this['id']=_0x16c13b['id']||0x0;this[_0x97ac('0x0')]=_0x16c13b[_0x97ac('0x0')]||'';this[_0x97ac('0x1')]=_0x16c13b[_0x97ac('0x1')]||_0x97ac('0x2');this[_0x97ac('0x3')]=0x0;this[_0x97ac('0x4')]=0x0;this[_0x97ac('0x5')]=0x0;this[_0x97ac('0x6')]=0x0;this[_0x97ac('0x7')]='';this[_0x97ac('0x8')]=!![];this[_0x97ac('0x9')]=_0x16c13b[_0x97ac('0x9')];this[_0x97ac('0xa')]=_0x16c13b[_0x97ac('0xa')];this[_0x97ac('0xb')]=_0x16c13b[_0x97ac('0xb')]||null;this['dialGlobalInterval']=_0x16c13b[_0x97ac('0xc')]?_0x16c13b[_0x97ac('0xc')]:null;this['dialOriginateCallerIdName']=_0x16c13b[_0x97ac('0xd')];this[_0x97ac('0xe')]=_0x16c13b[_0x97ac('0xe')];this['dialOriginateTimeout']=_0x16c13b[_0x97ac('0xf')]||0x1e;this[_0x97ac('0x10')]=_0x16c13b['dialCongestionMaxRetry'];this[_0x97ac('0x11')]=_0x16c13b[_0x97ac('0x11')];this[_0x97ac('0x12')]=_0x16c13b[_0x97ac('0x12')];this[_0x97ac('0x13')]=_0x16c13b[_0x97ac('0x13')];this[_0x97ac('0x14')]=_0x16c13b['dialNoAnswerMaxRetry'];this['dialNoAnswerRetryFrequency']=_0x16c13b[_0x97ac('0x15')];this[_0x97ac('0x16')]=_0x16c13b[_0x97ac('0x16')];this[_0x97ac('0x17')]=_0x16c13b[_0x97ac('0x17')]||0x3;this[_0x97ac('0x18')]=_0x16c13b[_0x97ac('0x18')]||0x96;this[_0x97ac('0x19')]=_0x16c13b[_0x97ac('0x19')]||0x3;this['dialDropRetryFrequency']=_0x16c13b[_0x97ac('0x1a')]||0x96;this['dialAbandonedMaxRetry']=_0x16c13b[_0x97ac('0x1b')]||0x3;this[_0x97ac('0x1c')]=_0x16c13b[_0x97ac('0x1c')]||0x96;this[_0x97ac('0x1d')]=_0x16c13b['dialMachineMaxRetry']||0x3;this[_0x97ac('0x1e')]=_0x16c13b[_0x97ac('0x1e')]||0x96;this['dialAgentRejectMaxRetry']=_0x16c13b[_0x97ac('0x1f')]||0x3;this[_0x97ac('0x20')]=_0x16c13b[_0x97ac('0x20')]||0x96;this[_0x97ac('0x21')]=_0x16c13b[_0x97ac('0x21')]||'DESC';this[_0x97ac('0x22')]=_0x16c13b['dialPrefix']||undefined;this[_0x97ac('0x23')]=_0x16c13b['dialRandomLastDigitCallerIdNumber']||undefined;this[_0x97ac('0x24')]=_0x16c13b[_0x97ac('0x24')]||undefined;this[_0x97ac('0x25')]=_0x16c13b[_0x97ac('0x25')]?_0x16c13b[_0x97ac('0x25')]:undefined;this[_0x97ac('0x26')]=_0x16c13b['Trunk']?_0x16c13b[_0x97ac('0x26')]:undefined;this[_0x97ac('0x27')]=_0x16c13b[_0x97ac('0x27')]?_0x16c13b[_0x97ac('0x27')]:undefined;this[_0x97ac('0x28')]=_0x16c13b[_0x97ac('0x28')]?_0x16c13b[_0x97ac('0x28')]:undefined;this[_0x97ac('0x29')]=_0x16c13b[_0x97ac('0x28')]?_0x16c13b[_0x97ac('0x28')][_0x97ac('0x0')]:undefined;this[_0x97ac('0x2a')]=_0x16c13b[_0x97ac('0x2a')]||![];this[_0x97ac('0x2b')]=_0x16c13b[_0x97ac('0x2b')];this['dialAMDGreeting']=_0x16c13b[_0x97ac('0x2c')];this[_0x97ac('0x2d')]=_0x16c13b['dialAMDAfterGreetingSilence'];this[_0x97ac('0x2e')]=_0x16c13b[_0x97ac('0x2e')];this[_0x97ac('0x2f')]=_0x16c13b[_0x97ac('0x2f')];this[_0x97ac('0x30')]=_0x16c13b[_0x97ac('0x30')];this['dialAMDMaximumNumberOfWords']=_0x16c13b[_0x97ac('0x31')];this[_0x97ac('0x32')]=_0x16c13b[_0x97ac('0x32')];this[_0x97ac('0x33')]=_0x16c13b[_0x97ac('0x33')];}module['exports']=Campaign;
\ No newline at end of file
index f6a7127..95c94f1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3609=['calleridnum','calleridname','connectedlinenum','connectedlinename','context','uniqueid','linkedid','endtime','unmanaged','lastapplication','lastdata','duration','billableseconds','holdtime','type','tag','disposition','queue','monitors','transfercalleridnum','transferType','mohtime','exports','starttime','channel','destinationchannel'];(function(_0x11b19b,_0x213234){var _0x1daac1=function(_0x516d3b){while(--_0x516d3b){_0x11b19b['push'](_0x11b19b['shift']());}};_0x1daac1(++_0x213234);}(_0x3609,0x101));var _0x9360=function(_0x597fc0,_0x13a02a){_0x597fc0=_0x597fc0-0x0;var _0x4e6708=_0x3609[_0x597fc0];return _0x4e6708;};'use strict';function Channel(){this[_0x9360('0x0')]=null;this[_0x9360('0x1')]='';this[_0x9360('0x2')]='';this[_0x9360('0x3')]=0x0;this[_0x9360('0x4')]='';this[_0x9360('0x5')]=undefined;this[_0x9360('0x6')]=undefined;this['accountcode']=0x0;this[_0x9360('0x7')]='';this[_0x9360('0x8')]=0x0;this[_0x9360('0x9')]=0x0;this['exten']=0x0;this['answered']=![];this['answertime']=null;this[_0x9360('0xa')]=null;this[_0x9360('0xb')]=![];this['abandoned']=![];this[_0x9360('0xc')]='';this[_0x9360('0xd')]='';this[_0x9360('0xe')]=0x0;this[_0x9360('0xf')]=0x0;this[_0x9360('0x10')]=0x0;this[_0x9360('0x11')]=null;this[_0x9360('0x12')]=null;this[_0x9360('0x13')]=null;this['monitor']=![];this['monitorFilename']=null;this[_0x9360('0x14')]=null;this[_0x9360('0x15')]=[];this[_0x9360('0x16')]=undefined;this['transferconnectedlinenum']=undefined;this[_0x9360('0x17')]=undefined;this[_0x9360('0x18')]=0x0;}module[_0x9360('0x19')]=Channel;
\ No newline at end of file
+var _0x7a12=['disposition','monitorFilename','queue','monitors','transfercalleridnum','transferconnectedlinenum','transferType','mohtime','starttime','channel','destinationchannel','calleridnum','calleridname','connectedlinenum','connectedlinename','accountcode','uniqueid','linkedid','exten','answered','answertime','endtime','abandoned','lastapplication','duration','billableseconds','type','tag'];(function(_0x47015f,_0x4f4c81){var _0x1ef447=function(_0x3b9375){while(--_0x3b9375){_0x47015f['push'](_0x47015f['shift']());}};_0x1ef447(++_0x4f4c81);}(_0x7a12,0xe8));var _0x27a1=function(_0x39fa1b,_0x8c0e3f){_0x39fa1b=_0x39fa1b-0x0;var _0x2c0f69=_0x7a12[_0x39fa1b];return _0x2c0f69;};'use strict';function Channel(){this[_0x27a1('0x0')]=null;this[_0x27a1('0x1')]='';this[_0x27a1('0x2')]='';this[_0x27a1('0x3')]=0x0;this[_0x27a1('0x4')]='';this[_0x27a1('0x5')]=undefined;this[_0x27a1('0x6')]=undefined;this[_0x27a1('0x7')]=0x0;this['context']='';this[_0x27a1('0x8')]=0x0;this[_0x27a1('0x9')]=0x0;this[_0x27a1('0xa')]=0x0;this[_0x27a1('0xb')]=![];this[_0x27a1('0xc')]=null;this[_0x27a1('0xd')]=null;this['unmanaged']=![];this[_0x27a1('0xe')]=![];this[_0x27a1('0xf')]='';this['lastdata']='';this[_0x27a1('0x10')]=0x0;this[_0x27a1('0x11')]=0x0;this['holdtime']=0x0;this[_0x27a1('0x12')]=null;this[_0x27a1('0x13')]=null;this[_0x27a1('0x14')]=null;this['monitor']=![];this[_0x27a1('0x15')]=null;this[_0x27a1('0x16')]=null;this[_0x27a1('0x17')]=[];this[_0x27a1('0x18')]=undefined;this[_0x27a1('0x19')]=undefined;this[_0x27a1('0x1a')]=undefined;this[_0x27a1('0x1b')]=0x0;}module['exports']=Channel;
\ No newline at end of file
index 17df6b5..2d7a114 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x57ca=['tokenSecret','type','serverUrl','Configurations','name','username','authType','password','consumerKey','consumerSecret'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x57ca,0x1bc));var _0xa57c=function(_0x29eb89,_0x320a1f){_0x29eb89=_0x29eb89-0x0;var _0x1a2e9b=_0x57ca[_0x29eb89];return _0x1a2e9b;};'use strict';function DeskAccount(_0x1158e6){this['id']=_0x1158e6['id']||0x0;this[_0xa57c('0x0')]=_0x1158e6['name']||'';this['username']=_0x1158e6[_0xa57c('0x1')]||'';this['remoteUri']=_0x1158e6['remoteUri']||'';this[_0xa57c('0x2')]=_0x1158e6[_0xa57c('0x2')]||'';this[_0xa57c('0x3')]=_0x1158e6[_0xa57c('0x3')]||'';this['consumerKey']=_0x1158e6[_0xa57c('0x4')]||'';this[_0xa57c('0x5')]=_0x1158e6[_0xa57c('0x5')]||'';this['token']=_0x1158e6['token']||'';this[_0xa57c('0x6')]=_0x1158e6[_0xa57c('0x6')]||'';this[_0xa57c('0x7')]=_0x1158e6[_0xa57c('0x7')]||'';this[_0xa57c('0x8')]=_0x1158e6[_0xa57c('0x8')]||'';this[_0xa57c('0x9')]=_0x1158e6[_0xa57c('0x9')]||{};}module['exports']=DeskAccount;
\ No newline at end of file
+var _0x2264=['consumerSecret','tokenSecret','type','serverUrl','Configurations','exports','name','username','remoteUri','authType','password','consumerKey'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x2264,0x1ce));var _0x4226=function(_0x9646f,_0x3ee827){_0x9646f=_0x9646f-0x0;var _0x2863f2=_0x2264[_0x9646f];return _0x2863f2;};'use strict';function DeskAccount(_0x1c4514){this['id']=_0x1c4514['id']||0x0;this[_0x4226('0x0')]=_0x1c4514[_0x4226('0x0')]||'';this['username']=_0x1c4514[_0x4226('0x1')]||'';this[_0x4226('0x2')]=_0x1c4514[_0x4226('0x2')]||'';this[_0x4226('0x3')]=_0x1c4514['authType']||'';this[_0x4226('0x4')]=_0x1c4514['password']||'';this[_0x4226('0x5')]=_0x1c4514[_0x4226('0x5')]||'';this[_0x4226('0x6')]=_0x1c4514[_0x4226('0x6')]||'';this['token']=_0x1c4514['token']||'';this[_0x4226('0x7')]=_0x1c4514['tokenSecret']||'';this[_0x4226('0x8')]=_0x1c4514[_0x4226('0x8')]||'';this[_0x4226('0x9')]=_0x1c4514[_0x4226('0x9')]||'';this[_0x4226('0xa')]=_0x1c4514[_0x4226('0xa')]||{};}module[_0x4226('0xb')]=DeskAccount;
\ No newline at end of file
index 6b543f9..b2c71c3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9c8=['password','remoteUri','tenantId','clientId','clientSecret','serverUrl','modernAuthentication','CloudProvider','exports','name','username'];(function(_0x30e64e,_0x11d579){var _0x44cda2=function(_0x379d68){while(--_0x379d68){_0x30e64e['push'](_0x30e64e['shift']());}};_0x44cda2(++_0x11d579);}(_0xa9c8,0x18a));var _0x8a9c=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa9c8[_0x3dd15e];return _0x231fd0;};'use strict';function Dynamics365Account(_0x1f73b4){this['id']=_0x1f73b4['id']||0x0;this[_0x8a9c('0x0')]=_0x1f73b4['name']||'';this[_0x8a9c('0x1')]=_0x1f73b4['username']||'';this[_0x8a9c('0x2')]=_0x1f73b4[_0x8a9c('0x2')]||'';this[_0x8a9c('0x3')]=_0x1f73b4[_0x8a9c('0x3')]||'';this[_0x8a9c('0x4')]=_0x1f73b4[_0x8a9c('0x4')]||'';this[_0x8a9c('0x5')]=_0x1f73b4[_0x8a9c('0x5')]||'';this[_0x8a9c('0x6')]=_0x1f73b4['clientSecret']||{};this[_0x8a9c('0x7')]=_0x1f73b4[_0x8a9c('0x7')]||'';this[_0x8a9c('0x8')]=_0x1f73b4[_0x8a9c('0x8')]||![];this['Configurations']=_0x1f73b4['Configurations']||{};this[_0x8a9c('0x9')]=_0x1f73b4[_0x8a9c('0x9')]||{};}module[_0x8a9c('0xa')]=Dynamics365Account;
\ No newline at end of file
+var _0x30ea=['CloudProvider','exports','name','username','password','remoteUri','tenantId','clientId','clientSecret','serverUrl','modernAuthentication','Configurations'];(function(_0x49d41c,_0x2bdc35){var _0xb64c5f=function(_0x28f535){while(--_0x28f535){_0x49d41c['push'](_0x49d41c['shift']());}};_0xb64c5f(++_0x2bdc35);}(_0x30ea,0x152));var _0xa30e=function(_0x23a825,_0x3718d6){_0x23a825=_0x23a825-0x0;var _0x5d4088=_0x30ea[_0x23a825];return _0x5d4088;};'use strict';function Dynamics365Account(_0x11a5bc){this['id']=_0x11a5bc['id']||0x0;this['name']=_0x11a5bc[_0xa30e('0x0')]||'';this['username']=_0x11a5bc[_0xa30e('0x1')]||'';this[_0xa30e('0x2')]=_0x11a5bc[_0xa30e('0x2')]||'';this[_0xa30e('0x3')]=_0x11a5bc[_0xa30e('0x3')]||'';this['tenantId']=_0x11a5bc[_0xa30e('0x4')]||'';this[_0xa30e('0x5')]=_0x11a5bc[_0xa30e('0x5')]||'';this[_0xa30e('0x6')]=_0x11a5bc[_0xa30e('0x6')]||{};this[_0xa30e('0x7')]=_0x11a5bc['serverUrl']||'';this[_0xa30e('0x8')]=_0x11a5bc[_0xa30e('0x8')]||![];this[_0xa30e('0x9')]=_0x11a5bc[_0xa30e('0x9')]||{};this[_0xa30e('0xa')]=_0x11a5bc[_0xa30e('0xa')]||{};}module[_0xa30e('0xb')]=Dynamics365Account;
\ No newline at end of file
index ca8651a..f51c38b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x815a=['ecm','headerinfo','localstationid','minrate','modem','gateway','t38timeout','tech','SIP','Trunk','ListId','key','name','description'];(function(_0x2b4411,_0x2625ed){var _0x8e41ef=function(_0x2aa8c1){while(--_0x2aa8c1){_0x2b4411['push'](_0x2b4411['shift']());}};_0x8e41ef(++_0x2625ed);}(_0x815a,0x186));var _0xa815=function(_0x52e363,_0x48062a){_0x52e363=_0x52e363-0x0;var _0x3fc2b5=_0x815a[_0x52e363];return _0x3fc2b5;};'use strict';function FaxAccount(_0x594c7a){this['id']=_0x594c7a['id']||0x0;this[_0xa815('0x0')]=_0x594c7a[_0xa815('0x0')]||'';this['description']=_0x594c7a[_0xa815('0x1')];this['ecm']=_0x594c7a[_0xa815('0x2')];this[_0xa815('0x3')]=_0x594c7a['headerinfo'];this['localstationid']=_0x594c7a[_0xa815('0x4')];this['minrate']=_0x594c7a[_0xa815('0x5')]||0x960;this['maxrate']=_0x594c7a['maxrate']||0x3840;this[_0xa815('0x6')]=_0x594c7a[_0xa815('0x6')]||'v17,v27,v29';this[_0xa815('0x7')]=_0x594c7a[_0xa815('0x7')]||'no';this['faxdetect']=_0x594c7a['faxdetect']||'no';this['t38timeout']=_0x594c7a[_0xa815('0x8')]||0x1388;this[_0xa815('0x9')]=_0x594c7a[_0xa815('0x9')]||_0xa815('0xa');this['Trunk']=_0x594c7a[_0xa815('0xb')]?_0x594c7a['Trunk']:undefined;this['ListId']=_0x594c7a[_0xa815('0xc')];this[_0xa815('0xd')]=_0x594c7a[_0xa815('0xd')];}module['exports']=FaxAccount;
\ No newline at end of file
+var _0x6fb9=['localstationid','minrate','maxrate','modem','v17,v27,v29','gateway','faxdetect','t38timeout','tech','Trunk','ListId','key','exports','name','description','ecm','headerinfo'];(function(_0x1a077a,_0xe2bb6b){var _0x2d6e4c=function(_0x1a95db){while(--_0x1a95db){_0x1a077a['push'](_0x1a077a['shift']());}};_0x2d6e4c(++_0xe2bb6b);}(_0x6fb9,0x84));var _0x96fb=function(_0x35d3a8,_0x44406a){_0x35d3a8=_0x35d3a8-0x0;var _0x182378=_0x6fb9[_0x35d3a8];return _0x182378;};'use strict';function FaxAccount(_0x22b7a7){this['id']=_0x22b7a7['id']||0x0;this[_0x96fb('0x0')]=_0x22b7a7['name']||'';this[_0x96fb('0x1')]=_0x22b7a7['description'];this['ecm']=_0x22b7a7[_0x96fb('0x2')];this[_0x96fb('0x3')]=_0x22b7a7['headerinfo'];this[_0x96fb('0x4')]=_0x22b7a7[_0x96fb('0x4')];this[_0x96fb('0x5')]=_0x22b7a7[_0x96fb('0x5')]||0x960;this['maxrate']=_0x22b7a7[_0x96fb('0x6')]||0x3840;this[_0x96fb('0x7')]=_0x22b7a7['modem']||_0x96fb('0x8');this[_0x96fb('0x9')]=_0x22b7a7[_0x96fb('0x9')]||'no';this[_0x96fb('0xa')]=_0x22b7a7[_0x96fb('0xa')]||'no';this[_0x96fb('0xb')]=_0x22b7a7[_0x96fb('0xb')]||0x1388;this[_0x96fb('0xc')]=_0x22b7a7[_0x96fb('0xc')]||'SIP';this['Trunk']=_0x22b7a7[_0x96fb('0xd')]?_0x22b7a7[_0x96fb('0xd')]:undefined;this[_0x96fb('0xe')]=_0x22b7a7[_0x96fb('0xe')];this['key']=_0x22b7a7[_0x96fb('0xf')];}module[_0x96fb('0x10')]=FaxAccount;
\ No newline at end of file
index 97a20e1..3e9ceb6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6e07=['apiKey','token','remoteUri','serverUrl','Configurations','name','username'];(function(_0x45e534,_0x3ab027){var _0xb19184=function(_0x4f63dd){while(--_0x4f63dd){_0x45e534['push'](_0x45e534['shift']());}};_0xb19184(++_0x3ab027);}(_0x6e07,0x147));var _0x76e0=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x6e07[_0x14add3];return _0x4a174f;};'use strict';function FreshdeskAccount(_0x2aea6c){this['id']=_0x2aea6c['id']||0x0;this[_0x76e0('0x0')]=_0x2aea6c[_0x76e0('0x0')]||'';this[_0x76e0('0x1')]=_0x2aea6c[_0x76e0('0x1')]||'';this[_0x76e0('0x2')]=_0x2aea6c[_0x76e0('0x3')]||'';this[_0x76e0('0x4')]=_0x2aea6c[_0x76e0('0x4')]||'';this[_0x76e0('0x5')]=_0x2aea6c['serverUrl']||'';this[_0x76e0('0x6')]=_0x2aea6c['Configurations']||{};}module['exports']=FreshdeskAccount;
\ No newline at end of file
+var _0xe1b8=['serverUrl','Configurations','name','username','token','remoteUri'];(function(_0x3d9176,_0x399d6f){var _0x12adc5=function(_0x700b01){while(--_0x700b01){_0x3d9176['push'](_0x3d9176['shift']());}};_0x12adc5(++_0x399d6f);}(_0xe1b8,0xaa));var _0x8e1b=function(_0x505a2b,_0x264f14){_0x505a2b=_0x505a2b-0x0;var _0x1835e4=_0xe1b8[_0x505a2b];return _0x1835e4;};'use strict';function FreshdeskAccount(_0x17ca9b){this['id']=_0x17ca9b['id']||0x0;this[_0x8e1b('0x0')]=_0x17ca9b[_0x8e1b('0x0')]||'';this['username']=_0x17ca9b[_0x8e1b('0x1')]||'';this['apiKey']=_0x17ca9b[_0x8e1b('0x2')]||'';this[_0x8e1b('0x3')]=_0x17ca9b[_0x8e1b('0x3')]||'';this[_0x8e1b('0x4')]=_0x17ca9b[_0x8e1b('0x4')]||'';this[_0x8e1b('0x5')]=_0x17ca9b[_0x8e1b('0x5')]||{};}module['exports']=FreshdeskAccount;
\ No newline at end of file
index 546f9d7..96093c7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x13f5=['username','apiKey','remoteUri','serverUrl','Configurations','exports','name'];(function(_0x318516,_0x53293e){var _0x30d47f=function(_0x4d0591){while(--_0x4d0591){_0x318516['push'](_0x318516['shift']());}};_0x30d47f(++_0x53293e);}(_0x13f5,0xc3));var _0x513f=function(_0x4a9fb1,_0x273043){_0x4a9fb1=_0x4a9fb1-0x0;var _0x348672=_0x13f5[_0x4a9fb1];return _0x348672;};'use strict';function FreshsalesAccount(_0x4edd23){this['id']=_0x4edd23['id']||0x0;this[_0x513f('0x0')]=_0x4edd23[_0x513f('0x0')]||'';this[_0x513f('0x1')]=_0x4edd23['username']||'';this[_0x513f('0x2')]=_0x4edd23['token']||'';this['remoteUri']=_0x4edd23[_0x513f('0x3')]||'';this[_0x513f('0x4')]=_0x4edd23[_0x513f('0x4')]||'';this[_0x513f('0x5')]=_0x4edd23[_0x513f('0x5')]||{};}module[_0x513f('0x6')]=FreshsalesAccount;
\ No newline at end of file
+var _0x2caf=['exports','username','apiKey','token','remoteUri','serverUrl','Configurations'];(function(_0x122c39,_0x3b3c02){var _0x45ad86=function(_0x5cdb68){while(--_0x5cdb68){_0x122c39['push'](_0x122c39['shift']());}};_0x45ad86(++_0x3b3c02);}(_0x2caf,0x6a));var _0xf2ca=function(_0x142f1a,_0x22d051){_0x142f1a=_0x142f1a-0x0;var _0x54b553=_0x2caf[_0x142f1a];return _0x54b553;};'use strict';function FreshsalesAccount(_0x382b2c){this['id']=_0x382b2c['id']||0x0;this['name']=_0x382b2c['name']||'';this[_0xf2ca('0x0')]=_0x382b2c['username']||'';this[_0xf2ca('0x1')]=_0x382b2c[_0xf2ca('0x2')]||'';this[_0xf2ca('0x3')]=_0x382b2c[_0xf2ca('0x3')]||'';this[_0xf2ca('0x4')]=_0x382b2c[_0xf2ca('0x4')]||'';this[_0xf2ca('0x5')]=_0x382b2c['Configurations']||{};}module[_0xf2ca('0x6')]=FreshsalesAccount;
\ No newline at end of file
index d8deef4..4b70e40 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1a49=['accountcode','exten','lastAssignedTo','mohtime','variables','exports','type','inbound','uniqueid','calleridnum','calleridname','queue','position','count','queuecallerabandon','queuecallercomplete','queuecallercompleteAt','queuecallerexitAt','originalposition','channel','connectedlinenum','connectedlinename'];(function(_0x3c3c4f,_0x9d637){var _0x3fdf49=function(_0x4727cf){while(--_0x4727cf){_0x3c3c4f['push'](_0x3c3c4f['shift']());}};_0x3fdf49(++_0x9d637);}(_0x1a49,0x124));var _0x91a4=function(_0x4f63c0,_0x399094){_0x4f63c0=_0x4f63c0-0x0;var _0x33f921=_0x1a49[_0x4f63c0];return _0x33f921;};'use strict';function QueueReport(){this[_0x91a4('0x0')]=_0x91a4('0x1');this[_0x91a4('0x2')]='';this[_0x91a4('0x3')]='';this[_0x91a4('0x4')]='';this[_0x91a4('0x5')]='';this['queuecallerjoinAt']=null;this['queuecallerleaveAt']=null;this[_0x91a4('0x6')]=0x1;this[_0x91a4('0x7')]=0x1;this[_0x91a4('0x8')]=![];this['queuecallerabandonAt']=null;this[_0x91a4('0x9')]=![];this[_0x91a4('0xa')]=null;this['queuecallerexit']=![];this[_0x91a4('0xb')]=null;this[_0x91a4('0xc')]=0x1;this[_0x91a4('0xd')]='';this[_0x91a4('0xe')]='';this[_0x91a4('0xf')]='';this[_0x91a4('0x10')]='';this['context']='';this[_0x91a4('0x11')]='';this['priority']='';this['holdtime']=0x0;this['assigned']=![];this[_0x91a4('0x12')]='';this['motionChannel']='voice';this['routealias']=null;this[_0x91a4('0x13')]=0x0;this[_0x91a4('0x14')]={};}module[_0x91a4('0x15')]=QueueReport;
\ No newline at end of file
+var _0x03e4=['inbound','uniqueid','calleridnum','calleridname','queue','queuecallerjoinAt','queuecallerleaveAt','position','count','queuecallerabandon','queuecallercomplete','queuecallercompleteAt','queuecallerexit','queuecallerexitAt','channel','connectedlinenum','connectedlinename','accountcode','context','exten','priority','holdtime','assigned','lastAssignedTo','motionChannel','voice','mohtime','exports','type'];(function(_0x5a6d8f,_0xf4c16b){var _0x351cf0=function(_0x4d8890){while(--_0x4d8890){_0x5a6d8f['push'](_0x5a6d8f['shift']());}};_0x351cf0(++_0xf4c16b);}(_0x03e4,0x1ec));var _0x403e=function(_0x4fd75e,_0x219e4a){_0x4fd75e=_0x4fd75e-0x0;var _0x5b6338=_0x03e4[_0x4fd75e];return _0x5b6338;};'use strict';function QueueReport(){this[_0x403e('0x0')]=_0x403e('0x1');this[_0x403e('0x2')]='';this[_0x403e('0x3')]='';this[_0x403e('0x4')]='';this[_0x403e('0x5')]='';this[_0x403e('0x6')]=null;this[_0x403e('0x7')]=null;this[_0x403e('0x8')]=0x1;this[_0x403e('0x9')]=0x1;this[_0x403e('0xa')]=![];this['queuecallerabandonAt']=null;this[_0x403e('0xb')]=![];this[_0x403e('0xc')]=null;this[_0x403e('0xd')]=![];this[_0x403e('0xe')]=null;this['originalposition']=0x1;this[_0x403e('0xf')]='';this[_0x403e('0x10')]='';this[_0x403e('0x11')]='';this[_0x403e('0x12')]='';this[_0x403e('0x13')]='';this[_0x403e('0x14')]='';this[_0x403e('0x15')]='';this[_0x403e('0x16')]=0x0;this[_0x403e('0x17')]=![];this[_0x403e('0x18')]='';this[_0x403e('0x19')]=_0x403e('0x1a');this['routealias']=null;this[_0x403e('0x1b')]=0x0;this['variables']={};}module[_0x403e('0x1c')]=QueueReport;
\ No newline at end of file
index 46b9f30..aed1261 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2e2c=['name','username','remoteUri','clientId','clientSecret','securityToken','type','integrationTab','serverUrl','Configurations','exports'];(function(_0x1be027,_0x44ba89){var _0x2583a0=function(_0x2178aa){while(--_0x2178aa){_0x1be027['push'](_0x1be027['shift']());}};_0x2583a0(++_0x44ba89);}(_0x2e2c,0x160));var _0xc2e2=function(_0x3b5bca,_0x326805){_0x3b5bca=_0x3b5bca-0x0;var _0x39833=_0x2e2c[_0x3b5bca];return _0x39833;};'use strict';function SalesforceAccount(_0x1a1aaf){this['id']=_0x1a1aaf['id']||0x0;this[_0xc2e2('0x0')]=_0x1a1aaf[_0xc2e2('0x0')]||'';this[_0xc2e2('0x1')]=_0x1a1aaf[_0xc2e2('0x1')]||'';this[_0xc2e2('0x2')]=_0x1a1aaf[_0xc2e2('0x2')]||'';this['password']=_0x1a1aaf['password']||'';this['clientId']=_0x1a1aaf[_0xc2e2('0x3')]||'';this[_0xc2e2('0x4')]=_0x1a1aaf[_0xc2e2('0x4')]||'';this[_0xc2e2('0x5')]=_0x1a1aaf[_0xc2e2('0x5')]||'';this[_0xc2e2('0x6')]=_0x1a1aaf['type']||_0xc2e2('0x7');this['serverUrl']=_0x1a1aaf[_0xc2e2('0x8')]||'';this[_0xc2e2('0x9')]=_0x1a1aaf['Configurations']||{};}module[_0xc2e2('0xa')]=SalesforceAccount;
\ No newline at end of file
+var _0xcd3e=['password','clientId','clientSecret','securityToken','type','integrationTab','serverUrl','Configurations','exports','name','username'];(function(_0x3d001f,_0x31546a){var _0xf294f8=function(_0x58eab){while(--_0x58eab){_0x3d001f['push'](_0x3d001f['shift']());}};_0xf294f8(++_0x31546a);}(_0xcd3e,0x132));var _0xecd3=function(_0x593564,_0x43583f){_0x593564=_0x593564-0x0;var _0x211a89=_0xcd3e[_0x593564];return _0x211a89;};'use strict';function SalesforceAccount(_0x45bb4e){this['id']=_0x45bb4e['id']||0x0;this[_0xecd3('0x0')]=_0x45bb4e[_0xecd3('0x0')]||'';this[_0xecd3('0x1')]=_0x45bb4e[_0xecd3('0x1')]||'';this['remoteUri']=_0x45bb4e['remoteUri']||'';this[_0xecd3('0x2')]=_0x45bb4e[_0xecd3('0x2')]||'';this[_0xecd3('0x3')]=_0x45bb4e[_0xecd3('0x3')]||'';this[_0xecd3('0x4')]=_0x45bb4e[_0xecd3('0x4')]||'';this[_0xecd3('0x5')]=_0x45bb4e['securityToken']||'';this[_0xecd3('0x6')]=_0x45bb4e[_0xecd3('0x6')]||_0xecd3('0x7');this[_0xecd3('0x8')]=_0x45bb4e['serverUrl']||'';this[_0xecd3('0x9')]=_0x45bb4e[_0xecd3('0x9')]||{};}module[_0xecd3('0xa')]=SalesforceAccount;
\ No newline at end of file
index 281f766..fd29cdc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x54b6=['remoteUri','serverUrl','Configurations','exports','name','username','password'];(function(_0x349632,_0x55bd98){var _0x30c7b2=function(_0x51152a){while(--_0x51152a){_0x349632['push'](_0x349632['shift']());}};_0x30c7b2(++_0x55bd98);}(_0x54b6,0x19a));var _0x654b=function(_0x50aa2e,_0xfbd6f0){_0x50aa2e=_0x50aa2e-0x0;var _0x5e07f0=_0x54b6[_0x50aa2e];return _0x5e07f0;};'use strict';function ServicenowAccount(_0x3d2eeb){this['id']=_0x3d2eeb['id']||0x0;this[_0x654b('0x0')]=_0x3d2eeb[_0x654b('0x0')]||'';this[_0x654b('0x1')]=_0x3d2eeb['username']||'';this[_0x654b('0x2')]=_0x3d2eeb[_0x654b('0x2')]||'';this[_0x654b('0x3')]=_0x3d2eeb['remoteUri']||'';this[_0x654b('0x4')]=_0x3d2eeb[_0x654b('0x4')]||'';this[_0x654b('0x5')]=_0x3d2eeb[_0x654b('0x5')]||{};}module[_0x654b('0x6')]=ServicenowAccount;
\ No newline at end of file
+var _0x0590=['username','password','remoteUri','serverUrl','Configurations','name'];(function(_0x5659f4,_0x3a072a){var _0x18e9a5=function(_0x4816e1){while(--_0x4816e1){_0x5659f4['push'](_0x5659f4['shift']());}};_0x18e9a5(++_0x3a072a);}(_0x0590,0x10d));var _0x0059=function(_0x1537c0,_0x22c923){_0x1537c0=_0x1537c0-0x0;var _0x12e6b1=_0x0590[_0x1537c0];return _0x12e6b1;};'use strict';function ServicenowAccount(_0x131834){this['id']=_0x131834['id']||0x0;this[_0x0059('0x0')]=_0x131834['name']||'';this[_0x0059('0x1')]=_0x131834[_0x0059('0x1')]||'';this[_0x0059('0x2')]=_0x131834[_0x0059('0x2')]||'';this[_0x0059('0x3')]=_0x131834[_0x0059('0x3')]||'';this[_0x0059('0x4')]=_0x131834['serverUrl']||'';this[_0x0059('0x5')]=_0x131834[_0x0059('0x5')]||{};}module['exports']=ServicenowAccount;
\ No newline at end of file
index a90413d..222e453 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa176=['serverUrl','Configurations','name','username','password','remoteUri'];(function(_0x5eca0a,_0x27ad17){var _0x35241f=function(_0x5630f6){while(--_0x5630f6){_0x5eca0a['push'](_0x5eca0a['shift']());}};_0x35241f(++_0x27ad17);}(_0xa176,0xaa));var _0x6a17=function(_0x26900c,_0x4f888e){_0x26900c=_0x26900c-0x0;var _0x3c941c=_0xa176[_0x26900c];return _0x3c941c;};'use strict';function SugarcrmAccount(_0x55b6e2){this['id']=_0x55b6e2['id']||0x0;this[_0x6a17('0x0')]=_0x55b6e2['name']||'';this[_0x6a17('0x1')]=_0x55b6e2[_0x6a17('0x1')]||'';this['password']=_0x55b6e2[_0x6a17('0x2')]||'';this[_0x6a17('0x3')]=_0x55b6e2[_0x6a17('0x3')]||'';this[_0x6a17('0x4')]=_0x55b6e2['serverUrl']||'';this[_0x6a17('0x5')]=_0x55b6e2[_0x6a17('0x5')]||{};}module['exports']=SugarcrmAccount;
\ No newline at end of file
+var _0xc966=['username','password','remoteUri','serverUrl','Configurations','exports','name'];(function(_0x2d0783,_0xddce4b){var _0x21fda6=function(_0x271317){while(--_0x271317){_0x2d0783['push'](_0x2d0783['shift']());}};_0x21fda6(++_0xddce4b);}(_0xc966,0x187));var _0x6c96=function(_0x5752af,_0x3a3bff){_0x5752af=_0x5752af-0x0;var _0x116ad4=_0xc966[_0x5752af];return _0x116ad4;};'use strict';function SugarcrmAccount(_0x199d0a){this['id']=_0x199d0a['id']||0x0;this[_0x6c96('0x0')]=_0x199d0a['name']||'';this['username']=_0x199d0a[_0x6c96('0x1')]||'';this['password']=_0x199d0a[_0x6c96('0x2')]||'';this[_0x6c96('0x3')]=_0x199d0a[_0x6c96('0x3')]||'';this[_0x6c96('0x4')]=_0x199d0a['serverUrl']||'';this[_0x6c96('0x5')]=_0x199d0a[_0x6c96('0x5')]||{};}module[_0x6c96('0x6')]=SugarcrmAccount;
\ No newline at end of file
index 6db5723..eca07f7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x65ef=['unknown','stateTime','status','address','exports','name','accountcode','state'];(function(_0xcd0918,_0x56bdf9){var _0x250704=function(_0x56788e){while(--_0x56788e){_0xcd0918['push'](_0xcd0918['shift']());}};_0x250704(++_0x56bdf9);}(_0x65ef,0x7d));var _0xf65e=function(_0x11753a,_0x2d1b0e){_0x11753a=_0x11753a-0x0;var _0x3d9a3d=_0x65ef[_0x11753a];return _0x3d9a3d;};'use strict';function Telephone(_0x436158){this['id']=_0x436158['id']||0x0;this[_0xf65e('0x0')]=_0x436158[_0xf65e('0x0')]||'';this[_0xf65e('0x1')]=_0x436158[_0xf65e('0x1')]||'';this[_0xf65e('0x2')]=_0xf65e('0x3');this[_0xf65e('0x4')]=0x0;this[_0xf65e('0x5')]='unknown';this[_0xf65e('0x6')]='';}module[_0xf65e('0x7')]=Telephone;
\ No newline at end of file
+var _0x2fee=['name','accountcode','unknown','stateTime','address','exports'];(function(_0x2a9299,_0x31e726){var _0xa023c7=function(_0x14bdc6){while(--_0x14bdc6){_0x2a9299['push'](_0x2a9299['shift']());}};_0xa023c7(++_0x31e726);}(_0x2fee,0x11a));var _0xe2fe=function(_0x3e5b7b,_0x1ca279){_0x3e5b7b=_0x3e5b7b-0x0;var _0x441af8=_0x2fee[_0x3e5b7b];return _0x441af8;};'use strict';function Telephone(_0x57774a){this['id']=_0x57774a['id']||0x0;this['name']=_0x57774a[_0xe2fe('0x0')]||'';this['accountcode']=_0x57774a[_0xe2fe('0x1')]||'';this['state']=_0xe2fe('0x2');this[_0xe2fe('0x3')]=0x0;this['status']=_0xe2fe('0x2');this[_0xe2fe('0x4')]='';}module[_0xe2fe('0x5')]=Telephone;
\ No newline at end of file
index c61e793..700e0fb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['exports','name'];(function(_0x329c92,_0x45d46c){var _0x130c5d=function(_0x1d388d){while(--_0x1d388d){_0x329c92['push'](_0x329c92['shift']());}};_0x130c5d(++_0x45d46c);}(_0xa9e0,0x123));var _0x0a9e=function(_0x37c22c,_0x28a70d){_0x37c22c=_0x37c22c-0x0;var _0x119d79=_0xa9e0[_0x37c22c];return _0x119d79;};'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(_0x462620,_0x362b93){var _0x2469ae=function(_0x237745){while(--_0x237745){_0x462620['push'](_0x462620['shift']());}};_0x2469ae(++_0x362b93);}(_0xb10b,0x12a));var _0xbb10=function(_0x368a3e,_0x47b292){_0x368a3e=_0x368a3e-0x0;var _0x3cb213=_0xb10b[_0x368a3e];return _0x3cb213;};'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 b842272..07ab009 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xda2d=['channel','voice','AllConditions','AnyConditions','Actions','exports','name'];(function(_0x3d8cfd,_0x1c7494){var _0x2b92d8=function(_0x421160){while(--_0x421160){_0x3d8cfd['push'](_0x3d8cfd['shift']());}};_0x2b92d8(++_0x1c7494);}(_0xda2d,0x102));var _0xdda2=function(_0x1dc8f1,_0x395884){_0x1dc8f1=_0x1dc8f1-0x0;var _0x4d4504=_0xda2d[_0x1dc8f1];return _0x4d4504;};'use strict';function Trigger(_0x2625ed){this['id']=_0x2625ed['id']||0x0;this[_0xdda2('0x0')]=_0x2625ed[_0xdda2('0x0')]||'';this[_0xdda2('0x1')]=_0x2625ed[_0xdda2('0x1')]||_0xdda2('0x2');this['status']=_0x2625ed['status']||![];this['AllConditions']=_0x2625ed[_0xdda2('0x3')]||[];this[_0xdda2('0x4')]=_0x2625ed[_0xdda2('0x4')]||[];this[_0xdda2('0x5')]=_0x2625ed[_0xdda2('0x5')]||[];}module[_0xdda2('0x6')]=Trigger;
\ No newline at end of file
+var _0x8603=['exports','name','channel','status','AllConditions','AnyConditions','Actions'];(function(_0x110543,_0x2134eb){var _0x302ae4=function(_0x408383){while(--_0x408383){_0x110543['push'](_0x110543['shift']());}};_0x302ae4(++_0x2134eb);}(_0x8603,0x190));var _0x3860=function(_0x237c79,_0x2425fa){_0x237c79=_0x237c79-0x0;var _0x3576a1=_0x8603[_0x237c79];return _0x3576a1;};'use strict';function Trigger(_0xba4b79){this['id']=_0xba4b79['id']||0x0;this[_0x3860('0x0')]=_0xba4b79[_0x3860('0x0')]||'';this[_0x3860('0x1')]=_0xba4b79['channel']||'voice';this[_0x3860('0x2')]=_0xba4b79[_0x3860('0x2')]||![];this[_0x3860('0x3')]=_0xba4b79['AllConditions']||[];this[_0x3860('0x4')]=_0xba4b79['AnyConditions']||[];this[_0x3860('0x5')]=_0xba4b79[_0x3860('0x5')]||[];}module[_0x3860('0x6')]=Trigger;
\ No newline at end of file
index 4aaa078..c1de7ad 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd9af=['stateTime','status','registry','indexOf','split','host','port','domain','domainport','refresh','stateRegistry','defaultuser','exports','name','state','unknown'];(function(_0x4fe681,_0x394488){var _0x17d65e=function(_0xd2e383){while(--_0xd2e383){_0x4fe681['push'](_0x4fe681['shift']());}};_0x17d65e(++_0x394488);}(_0xd9af,0x9d));var _0xfd9a=function(_0x36f47b,_0x94a76d){_0x36f47b=_0x36f47b-0x0;var _0x4c72bb=_0xd9af[_0x36f47b];return _0x4c72bb;};'use strict';function Trunk(_0x1ebddf){this['id']=_0x1ebddf['id']||0x0;this['active']=_0x1ebddf['active']||![];this[_0xfd9a('0x0')]=_0x1ebddf[_0xfd9a('0x0')]||'';this[_0xfd9a('0x1')]=_0xfd9a('0x2');this[_0xfd9a('0x3')]=0x0;this[_0xfd9a('0x4')]='unknown';this['registry']=_0x1ebddf[_0xfd9a('0x5')]&&_0x1ebddf[_0xfd9a('0x5')][_0xfd9a('0x6')](':')?_0x1ebddf['registry'][_0xfd9a('0x7')](':')[0x0]:'';this[_0xfd9a('0x8')]='';this[_0xfd9a('0x9')]='';this[_0xfd9a('0xa')]='';this[_0xfd9a('0xb')]='';this[_0xfd9a('0xc')]='';this[_0xfd9a('0xd')]=_0xfd9a('0x2');this['registrationtime']='';this['address']='';this['defaultuser']=_0x1ebddf[_0xfd9a('0xe')]||'';}module[_0xfd9a('0xf')]=Trunk;
\ No newline at end of file
+var _0x3de0=['indexOf','host','port','domain','domainport','stateRegistry','registrationtime','address','defaultuser','exports','active','name','state','unknown','stateTime','status','registry'];(function(_0x35da42,_0x5c2610){var _0x370035=function(_0x546db5){while(--_0x546db5){_0x35da42['push'](_0x35da42['shift']());}};_0x370035(++_0x5c2610);}(_0x3de0,0xd6));var _0x03de=function(_0x4337bd,_0x516be8){_0x4337bd=_0x4337bd-0x0;var _0x5aea5a=_0x3de0[_0x4337bd];return _0x5aea5a;};'use strict';function Trunk(_0x5de6ae){this['id']=_0x5de6ae['id']||0x0;this[_0x03de('0x0')]=_0x5de6ae[_0x03de('0x0')]||![];this[_0x03de('0x1')]=_0x5de6ae[_0x03de('0x1')]||'';this[_0x03de('0x2')]=_0x03de('0x3');this[_0x03de('0x4')]=0x0;this[_0x03de('0x5')]=_0x03de('0x3');this['registry']=_0x5de6ae[_0x03de('0x6')]&&_0x5de6ae[_0x03de('0x6')][_0x03de('0x7')](':')?_0x5de6ae['registry']['split'](':')[0x0]:'';this[_0x03de('0x8')]='';this[_0x03de('0x9')]='';this[_0x03de('0xa')]='';this[_0x03de('0xb')]='';this['refresh']='';this[_0x03de('0xc')]='unknown';this[_0x03de('0xd')]='';this[_0x03de('0xe')]='';this[_0x03de('0xf')]=_0x5de6ae[_0x03de('0xf')]||'';}module[_0x03de('0x10')]=Trunk;
\ No newline at end of file
index 1a78e4c..5096236 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1ea1=['mandatoryDisposition','exports','exten','recordingFormat','none'];(function(_0x22dcf7,_0x552cdc){var _0x2aeeb1=function(_0x48febb){while(--_0x48febb){_0x22dcf7['push'](_0x22dcf7['shift']());}};_0x2aeeb1(++_0x552cdc);}(_0x1ea1,0x14c));var _0x11ea=function(_0x2c2863,_0x4487b6){_0x2c2863=_0x2c2863-0x0;var _0x4a4337=_0x1ea1[_0x2c2863];return _0x4a4337;};'use strict';function voiceExtension(_0x1beec3){this['id']=_0x1beec3['id']||0x0;this[_0x11ea('0x0')]=_0x1beec3[_0x11ea('0x0')]||'';this[_0x11ea('0x1')]=_0x1beec3['recordingFormat']||_0x11ea('0x2');this['mandatoryDisposition']=_0x1beec3[_0x11ea('0x3')]||![];}module[_0x11ea('0x4')]=voiceExtension;
\ No newline at end of file
+var _0xd526=['none','mandatoryDisposition','exports','exten','recordingFormat'];(function(_0x1c895d,_0x2eae76){var _0xbdfc24=function(_0x1ab22e){while(--_0x1ab22e){_0x1c895d['push'](_0x1c895d['shift']());}};_0xbdfc24(++_0x2eae76);}(_0xd526,0x9e));var _0x6d52=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0xd526[_0x3947c9];return _0x2e7871;};'use strict';function voiceExtension(_0x3e307a){this['id']=_0x3e307a['id']||0x0;this[_0x6d52('0x0')]=_0x3e307a[_0x6d52('0x0')]||'';this[_0x6d52('0x1')]=_0x3e307a[_0x6d52('0x1')]||_0x6d52('0x2');this[_0x6d52('0x3')]=_0x3e307a['mandatoryDisposition']||![];}module[_0x6d52('0x4')]=voiceExtension;
\ No newline at end of file
index 48bc7fd..c8497f8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe548=['erlangCallToSecond','erlangBusyFactor','dialRecallMeTimeout','dialRecallInQueue','dialPreviewAutoRecallMe','dialPreviewRecallmeReminder','dialQueueProject2','dialAgiAfterHangupClient','dialAgiAfterHangupAgent','mandatoryDisposition','mandatoryDispositionPause','queueSummaryCountersUpdated','exports','wav','wav49','gsm','fewestcalls','leastrecent','rrordered','name','monitor_format','type','inbound','waiting','answered','sumDuration','sumHoldTime','sumBillable','unmanaged','available','busy','onHold','paused','ringing','talking','unavailable','acw','acwTimeout','sendMessageOneNotActive','message','originated','temp','dialTimezone','dialGlobalInterval','dialActive','dialMethod','progressive','dialLimitChannel','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dialPredictiveInterval','dialOriginateCallerIdName','anonymous','dialOriginateCallerIdNumber','dialOriginateTimeout','dialQueueOptions','tTxX','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','callAdditionalPhoneAfterMin','dialGlobalMaxRetry','Trunk','TrunkBackup','dialPrefix','Interval','dialOrderByScheduledAt','DESC','dialRandomLastDigitCallerIdNumber','dialCutDigit','strategy','queueStatusComplete','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','outboundRejectCallsDay','pTalking','timeout','outboundAnswerCallsDay','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundReCallsDay','outboundAbandonedDay','startProgressive','handlePredictive','predictiveIntervalMultiplicativeFactor','predictiveIntervalDroppedCallsTimeout','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','dialPredictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','erlangCalls'];(function(_0x4ea13a,_0x3d8959){var _0x1016d1=function(_0x3ffcd0){while(--_0x3ffcd0){_0x4ea13a['push'](_0x4ea13a['shift']());}};_0x1016d1(++_0x3d8959);}(_0xe548,0x184));var _0x8e54=function(_0x6d070a,_0x47e825){_0x6d070a=_0x6d070a-0x0;var _0x2c065d=_0xe548[_0x6d070a];return _0x2c065d;};'use strict';var monitorFormat={'wav':_0x8e54('0x0'),'wav49':_0x8e54('0x1'),'gsm':_0x8e54('0x2')};var strategy={'fewestcalls':_0x8e54('0x3'),'leastrecent':_0x8e54('0x4'),'linear':'linear','random':'random','ringall':'ringall','rr':'roundrobin','rrmemory':'rrmemory','rrordered':_0x8e54('0x5'),'wrandom':'wrandom'};function VoiceQueue(_0x288be8){this['id']=_0x288be8['id']||0x0;this['name']=_0x288be8[_0x8e54('0x6')]||'';this[_0x8e54('0x7')]=_0x288be8[_0x8e54('0x7')]||'';this[_0x8e54('0x8')]=_0x288be8[_0x8e54('0x8')]||_0x8e54('0x9');this[_0x8e54('0xa')]=0x0;this['total']=0x0;this[_0x8e54('0xb')]=0x0;this[_0x8e54('0xc')]=0x0;this[_0x8e54('0xd')]=0x0;this[_0x8e54('0xe')]=0x0;this[_0x8e54('0xf')]=0x0;this['abandoned']=0x0;this[_0x8e54('0x10')]=0x0;this[_0x8e54('0x11')]=0x0;this['inUse']=0x0;this['invalid']=0x0;this['loggedIn']=0x0;this['notInUse']=0x0;this[_0x8e54('0x12')]=0x0;this[_0x8e54('0x13')]=0x0;this[_0x8e54('0x14')]=0x0;this['ringInUse']=0x0;this[_0x8e54('0x15')]=0x0;this[_0x8e54('0x16')]=0x0;this['unknown']=0x0;this['acw']=_0x288be8[_0x8e54('0x17')]||![];this['acwTimeout']=_0x288be8[_0x8e54('0x18')]||0xa;this['autopause']=_0x288be8['autopause']||'no';this[_0x8e54('0x19')]=!![];this[_0x8e54('0x1a')]='';this['statusMessage']='';this[_0x8e54('0x1b')]=0x0;this[_0x8e54('0x1c')]=0x0;this[_0x8e54('0x1d')]=_0x288be8['dialTimezone']||null;this[_0x8e54('0x1e')]=_0x288be8[_0x8e54('0x1e')]?_0x288be8['dialGlobalInterval']:null;this[_0x8e54('0x1f')]=_0x288be8[_0x8e54('0x1f')];this[_0x8e54('0x20')]=_0x288be8[_0x8e54('0x20')]||_0x8e54('0x21');this['dialLimitChannel']=_0x288be8[_0x8e54('0x22')]||0x0;this[_0x8e54('0x23')]=_0x288be8[_0x8e54('0x23')]||0x0;this['dialPowerLevel']=_0x288be8[_0x8e54('0x24')]||0x1;this[_0x8e54('0x25')]=_0x288be8[_0x8e54('0x25')]||'dropRate';this['dialPredictiveOptimizationPercentage']=_0x288be8['dialPredictiveOptimizationPercentage']||0.03;this[_0x8e54('0x26')]=_0x288be8[_0x8e54('0x26')]||0x258;this['dialOriginateCallerIdName']=_0x288be8[_0x8e54('0x27')]||_0x8e54('0x28');this[_0x8e54('0x29')]=_0x288be8[_0x8e54('0x29')]||'anonymous';this[_0x8e54('0x2a')]=_0x288be8[_0x8e54('0x2a')]||0x1e;this[_0x8e54('0x2b')]=_0x288be8[_0x8e54('0x2b')]||_0x8e54('0x2c');this['dialQueueTimeout']=_0x288be8[_0x8e54('0x2d')]||0x3;this[_0x8e54('0x2e')]=_0x288be8['dialQueueProject']||undefined;this[_0x8e54('0x2f')]=_0x288be8[_0x8e54('0x2f')]||0x3;this[_0x8e54('0x30')]=_0x288be8[_0x8e54('0x30')]||0x96;this['dialBusyMaxRetry']=_0x288be8[_0x8e54('0x31')]||0x3;this[_0x8e54('0x32')]=_0x288be8[_0x8e54('0x32')]||0x96;this[_0x8e54('0x33')]=_0x288be8[_0x8e54('0x33')]||0x3;this[_0x8e54('0x34')]=_0x288be8[_0x8e54('0x34')]||0x96;this['dialNoSuchNumberMaxRetry']=_0x288be8['dialNoSuchNumberMaxRetry']||0x3;this['dialNoSuchNumberRetryFrequency']=_0x288be8['dialNoSuchNumberRetryFrequency']||0x96;this[_0x8e54('0x35')]=_0x288be8[_0x8e54('0x35')]||0x3;this[_0x8e54('0x36')]=_0x288be8['dialDropRetryFrequency']||0x96;this[_0x8e54('0x37')]=_0x288be8[_0x8e54('0x37')]||0x3;this[_0x8e54('0x38')]=_0x288be8[_0x8e54('0x38')]||0x96;this['dialMachineMaxRetry']=_0x288be8[_0x8e54('0x39')]||0x3;this[_0x8e54('0x3a')]=_0x288be8[_0x8e54('0x3a')]||0x96;this[_0x8e54('0x3b')]=_0x288be8[_0x8e54('0x3b')]||0x3;this['dialAgentRejectRetryFrequency']=_0x288be8[_0x8e54('0x3c')]||0x96;this[_0x8e54('0x3d')]=_0x288be8[_0x8e54('0x3d')]||0x3;this['dialGlobalMaxRetry']=_0x288be8[_0x8e54('0x3e')]||0x4;this[_0x8e54('0x3f')]=_0x288be8[_0x8e54('0x3f')]?_0x288be8[_0x8e54('0x3f')]:undefined;this[_0x8e54('0x40')]=_0x288be8['TrunkBackup']?_0x288be8['TrunkBackup']:undefined;this[_0x8e54('0x41')]=_0x288be8[_0x8e54('0x41')]||undefined;this[_0x8e54('0x42')]=_0x288be8[_0x8e54('0x42')]?_0x288be8[_0x8e54('0x42')]:undefined;this[_0x8e54('0x43')]=_0x288be8[_0x8e54('0x43')]||_0x8e54('0x44');this[_0x8e54('0x45')]=_0x288be8[_0x8e54('0x45')]||undefined;this[_0x8e54('0x46')]=_0x288be8[_0x8e54('0x46')]||undefined;this[_0x8e54('0x47')]=strategy[_0x288be8[_0x8e54('0x47')]];this[_0x8e54('0x48')]=!![];this[_0x8e54('0x49')]=_0x288be8[_0x8e54('0x49')]||![];this[_0x8e54('0x4a')]=_0x288be8[_0x8e54('0x4a')];this[_0x8e54('0x4b')]=_0x288be8['dialAMDGreeting'];this['dialAMDAfterGreetingSilence']=_0x288be8['dialAMDAfterGreetingSilence'];this[_0x8e54('0x4c')]=_0x288be8[_0x8e54('0x4c')];this[_0x8e54('0x4d')]=_0x288be8[_0x8e54('0x4d')];this[_0x8e54('0x4e')]=_0x288be8[_0x8e54('0x4e')];this[_0x8e54('0x4f')]=_0x288be8[_0x8e54('0x4f')];this[_0x8e54('0x50')]=_0x288be8[_0x8e54('0x50')];this[_0x8e54('0x51')]=_0x288be8[_0x8e54('0x51')];this[_0x8e54('0x52')]=0x0;this[_0x8e54('0x53')]=0x0;this[_0x8e54('0x54')]=_0x288be8[_0x8e54('0x54')];this[_0x8e54('0x55')]=0x0;this[_0x8e54('0x56')]=0x0;this[_0x8e54('0x57')]=0x0;this[_0x8e54('0x58')]=0x0;this[_0x8e54('0x59')]=0x0;this[_0x8e54('0x5a')]=0x0;this['outboundUnknownCallsDay']=0x0;this[_0x8e54('0x5b')]=0x0;this[_0x8e54('0x5c')]=0x0;this[_0x8e54('0x5d')]=0x0;this[_0x8e54('0x5e')]=0x0;this['outboundDropCallsDayACS']=0x0;this[_0x8e54('0x5f')]=0x0;this[_0x8e54('0x60')]=0x0;this[_0x8e54('0x61')]=undefined;this['startPredictive']=undefined;this[_0x8e54('0x62')]=undefined;this[_0x8e54('0x63')]=1.05;this['predictiveIntervalTotalCalls']=0x0;this['predictiveIntervalAnsweredCalls']=0x0;this['predictiveIntervalDroppedCallsCallersExit']=0x0;this[_0x8e54('0x64')]=0x0;this[_0x8e54('0x65')]=0x0;this[_0x8e54('0x66')]=0x0;this[_0x8e54('0x67')]=0x0;this[_0x8e54('0x68')]=0x0;this[_0x8e54('0x69')]=_0x288be8[_0x8e54('0x6a')]||0x14;this[_0x8e54('0x6b')]=_0x288be8[_0x8e54('0x6a')]||0xa;this[_0x8e54('0x6c')]=0x0;this[_0x8e54('0x6d')]=0x0;this[_0x8e54('0x6e')]=0x1;this[_0x8e54('0x6f')]=0x0;this[_0x8e54('0x70')]=0x0;this['erlangAbandonmentRate']=0x0;this[_0x8e54('0x71')]=0x0;this['dialRecallMeTimeout']=_0x288be8[_0x8e54('0x72')]||0x1e;this[_0x8e54('0x73')]=_0x288be8[_0x8e54('0x73')]||![];this[_0x8e54('0x74')]=!!_0x288be8[_0x8e54('0x74')]||![];this['dialPreviewRecallmeReminder']=!!_0x288be8[_0x8e54('0x75')]||![];this[_0x8e54('0x76')]=_0x288be8[_0x8e54('0x76')]||undefined;this[_0x8e54('0x77')]=_0x288be8[_0x8e54('0x77')]||![];this[_0x8e54('0x78')]=_0x288be8['dialAgiAfterHangupAgent']||![];this[_0x8e54('0x7')]=monitorFormat[_0x288be8[_0x8e54('0x7')]]?monitorFormat[_0x288be8[_0x8e54('0x7')]]:undefined;this[_0x8e54('0x79')]=_0x288be8[_0x8e54('0x79')]||![];this[_0x8e54('0x7a')]=_0x288be8[_0x8e54('0x7a')]?_0x288be8[_0x8e54('0x7a')]:undefined;this[_0x8e54('0x7b')]=![];}module[_0x8e54('0x7c')]=VoiceQueue;
\ No newline at end of file
+var _0x423b=['callAdditionalPhoneAfterMin','dialGlobalMaxRetry','Trunk','TrunkBackup','dialPrefix','Interval','dialOrderByScheduledAt','DESC','dialRandomLastDigitCallerIdNumber','dialCutDigit','strategy','queueStatusComplete','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','outboundAnswerCallsDay','outboundAnswerAgiCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundUnknownCallsDay','outboundOriginateFailureCallsDay','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundReCallsDay','outboundAbandonedDay','handlePredictive','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout','predictiveIntervalAvgTalktime','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','dialPredictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialRecallMeTimeout','dialRecallInQueue','dialPreviewAutoRecallMe','dialPreviewRecallmeReminder','dialQueueProject2','dialAgiAfterHangupClient','mandatoryDisposition','mandatoryDispositionPause','queueSummaryCountersUpdated','wav49','fewestcalls','linear','rrmemory','rrordered','name','monitor_format','type','inbound','waiting','total','sumHoldTime','sumBillable','unmanaged','abandoned','available','inUse','invalid','notInUse','onHold','paused','ringInUse','unavailable','acwTimeout','autopause','sendMessageOneNotActive','message','statusMessage','originated','dialTimezone','dialGlobalInterval','dialActive','dialMethod','progressive','dialLimitChannel','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','anonymous','dialOriginateTimeout','dialQueueOptions','tTxX','dialQueueTimeout','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency'];(function(_0x459423,_0x3416a8){var _0x42ed14=function(_0x1d4f69){while(--_0x1d4f69){_0x459423['push'](_0x459423['shift']());}};_0x42ed14(++_0x3416a8);}(_0x423b,0x12b));var _0xb423=function(_0x4a747d,_0x3b747f){_0x4a747d=_0x4a747d-0x0;var _0x3a5b5c=_0x423b[_0x4a747d];return _0x3a5b5c;};'use strict';var monitorFormat={'wav':'wav','wav49':_0xb423('0x0'),'gsm':'gsm'};var strategy={'fewestcalls':_0xb423('0x1'),'leastrecent':'leastrecent','linear':_0xb423('0x2'),'random':'random','ringall':'ringall','rr':'roundrobin','rrmemory':_0xb423('0x3'),'rrordered':_0xb423('0x4'),'wrandom':'wrandom'};function VoiceQueue(_0x1be92e){this['id']=_0x1be92e['id']||0x0;this[_0xb423('0x5')]=_0x1be92e[_0xb423('0x5')]||'';this[_0xb423('0x6')]=_0x1be92e['monitor_format']||'';this[_0xb423('0x7')]=_0x1be92e[_0xb423('0x7')]||_0xb423('0x8');this[_0xb423('0x9')]=0x0;this[_0xb423('0xa')]=0x0;this['answered']=0x0;this['sumDuration']=0x0;this[_0xb423('0xb')]=0x0;this[_0xb423('0xc')]=0x0;this[_0xb423('0xd')]=0x0;this[_0xb423('0xe')]=0x0;this[_0xb423('0xf')]=0x0;this['busy']=0x0;this[_0xb423('0x10')]=0x0;this[_0xb423('0x11')]=0x0;this['loggedIn']=0x0;this[_0xb423('0x12')]=0x0;this[_0xb423('0x13')]=0x0;this[_0xb423('0x14')]=0x0;this['ringing']=0x0;this[_0xb423('0x15')]=0x0;this['talking']=0x0;this[_0xb423('0x16')]=0x0;this['unknown']=0x0;this['acw']=_0x1be92e['acw']||![];this[_0xb423('0x17')]=_0x1be92e[_0xb423('0x17')]||0xa;this[_0xb423('0x18')]=_0x1be92e['autopause']||'no';this[_0xb423('0x19')]=!![];this[_0xb423('0x1a')]='';this[_0xb423('0x1b')]='';this[_0xb423('0x1c')]=0x0;this['temp']=0x0;this[_0xb423('0x1d')]=_0x1be92e[_0xb423('0x1d')]||null;this['dialGlobalInterval']=_0x1be92e['dialGlobalInterval']?_0x1be92e[_0xb423('0x1e')]:null;this['dialActive']=_0x1be92e[_0xb423('0x1f')];this[_0xb423('0x20')]=_0x1be92e[_0xb423('0x20')]||_0xb423('0x21');this[_0xb423('0x22')]=_0x1be92e[_0xb423('0x22')]||0x0;this[_0xb423('0x23')]=_0x1be92e[_0xb423('0x23')]||0x0;this['dialPowerLevel']=_0x1be92e[_0xb423('0x24')]||0x1;this[_0xb423('0x25')]=_0x1be92e[_0xb423('0x25')]||'dropRate';this[_0xb423('0x26')]=_0x1be92e[_0xb423('0x26')]||0.03;this['dialPredictiveInterval']=_0x1be92e[_0xb423('0x27')]||0x258;this[_0xb423('0x28')]=_0x1be92e[_0xb423('0x28')]||'anonymous';this[_0xb423('0x29')]=_0x1be92e['dialOriginateCallerIdNumber']||_0xb423('0x2a');this['dialOriginateTimeout']=_0x1be92e[_0xb423('0x2b')]||0x1e;this[_0xb423('0x2c')]=_0x1be92e['dialQueueOptions']||_0xb423('0x2d');this[_0xb423('0x2e')]=_0x1be92e[_0xb423('0x2e')]||0x3;this['dialQueueProject']=_0x1be92e['dialQueueProject']||undefined;this[_0xb423('0x2f')]=_0x1be92e['dialCongestionMaxRetry']||0x3;this[_0xb423('0x30')]=_0x1be92e['dialCongestionRetryFrequency']||0x96;this[_0xb423('0x31')]=_0x1be92e[_0xb423('0x31')]||0x3;this[_0xb423('0x32')]=_0x1be92e[_0xb423('0x32')]||0x96;this[_0xb423('0x33')]=_0x1be92e['dialNoAnswerMaxRetry']||0x3;this[_0xb423('0x34')]=_0x1be92e['dialNoAnswerRetryFrequency']||0x96;this['dialNoSuchNumberMaxRetry']=_0x1be92e['dialNoSuchNumberMaxRetry']||0x3;this['dialNoSuchNumberRetryFrequency']=_0x1be92e[_0xb423('0x35')]||0x96;this[_0xb423('0x36')]=_0x1be92e[_0xb423('0x36')]||0x3;this['dialDropRetryFrequency']=_0x1be92e['dialDropRetryFrequency']||0x96;this[_0xb423('0x37')]=_0x1be92e[_0xb423('0x37')]||0x3;this['dialAbandonedRetryFrequency']=_0x1be92e[_0xb423('0x38')]||0x96;this[_0xb423('0x39')]=_0x1be92e[_0xb423('0x39')]||0x3;this[_0xb423('0x3a')]=_0x1be92e[_0xb423('0x3a')]||0x96;this['dialAgentRejectMaxRetry']=_0x1be92e[_0xb423('0x3b')]||0x3;this['dialAgentRejectRetryFrequency']=_0x1be92e[_0xb423('0x3c')]||0x96;this[_0xb423('0x3d')]=_0x1be92e[_0xb423('0x3d')]||0x3;this[_0xb423('0x3e')]=_0x1be92e[_0xb423('0x3e')]||0x4;this[_0xb423('0x3f')]=_0x1be92e['Trunk']?_0x1be92e[_0xb423('0x3f')]:undefined;this[_0xb423('0x40')]=_0x1be92e['TrunkBackup']?_0x1be92e[_0xb423('0x40')]:undefined;this['dialPrefix']=_0x1be92e[_0xb423('0x41')]||undefined;this[_0xb423('0x42')]=_0x1be92e['Interval']?_0x1be92e[_0xb423('0x42')]:undefined;this['dialOrderByScheduledAt']=_0x1be92e[_0xb423('0x43')]||_0xb423('0x44');this[_0xb423('0x45')]=_0x1be92e[_0xb423('0x45')]||undefined;this[_0xb423('0x46')]=_0x1be92e['dialCutDigit']||undefined;this['strategy']=strategy[_0x1be92e[_0xb423('0x47')]];this[_0xb423('0x48')]=!![];this['dialAMDActive']=_0x1be92e[_0xb423('0x49')]||![];this[_0xb423('0x4a')]=_0x1be92e['dialAMDInitialSilence'];this[_0xb423('0x4b')]=_0x1be92e[_0xb423('0x4b')];this[_0xb423('0x4c')]=_0x1be92e[_0xb423('0x4c')];this[_0xb423('0x4d')]=_0x1be92e[_0xb423('0x4d')];this[_0xb423('0x4e')]=_0x1be92e[_0xb423('0x4e')];this[_0xb423('0x4f')]=_0x1be92e[_0xb423('0x4f')];this[_0xb423('0x50')]=_0x1be92e[_0xb423('0x50')];this[_0xb423('0x51')]=_0x1be92e[_0xb423('0x51')];this['dialAMDMaximumWordLength']=_0x1be92e[_0xb423('0x52')];this['outboundRejectCallsDay']=0x0;this['pTalking']=0x0;this['timeout']=_0x1be92e['timeout'];this[_0xb423('0x53')]=0x0;this[_0xb423('0x54')]=0x0;this['outboundNoAnswerCallsDay']=0x0;this[_0xb423('0x55')]=0x0;this[_0xb423('0x56')]=0x0;this[_0xb423('0x57')]=0x0;this[_0xb423('0x58')]=0x0;this['outboundBlacklistCallsDay']=0x0;this[_0xb423('0x59')]=0x0;this[_0xb423('0x5a')]=0x0;this[_0xb423('0x5b')]=0x0;this['outboundDropCallsDayACS']=0x0;this[_0xb423('0x5c')]=0x0;this[_0xb423('0x5d')]=0x0;this['startProgressive']=undefined;this['startPredictive']=undefined;this[_0xb423('0x5e')]=undefined;this['predictiveIntervalMultiplicativeFactor']=1.05;this[_0xb423('0x5f')]=0x0;this[_0xb423('0x60')]=0x0;this['predictiveIntervalDroppedCallsCallersExit']=0x0;this[_0xb423('0x61')]=0x0;this['predictiveIntervalAvgHoldtime']=0x0;this[_0xb423('0x62')]=0x0;this[_0xb423('0x63')]=0x0;this[_0xb423('0x64')]=0x0;this[_0xb423('0x65')]=_0x1be92e[_0xb423('0x66')]||0x14;this[_0xb423('0x67')]=_0x1be92e[_0xb423('0x66')]||0xa;this[_0xb423('0x68')]=0x0;this[_0xb423('0x69')]=0x0;this[_0xb423('0x6a')]=0x1;this[_0xb423('0x6b')]=0x0;this[_0xb423('0x6c')]=0x0;this[_0xb423('0x6d')]=0x0;this[_0xb423('0x6e')]=0x0;this[_0xb423('0x6f')]=_0x1be92e[_0xb423('0x6f')]||0x1e;this[_0xb423('0x70')]=_0x1be92e[_0xb423('0x70')]||![];this[_0xb423('0x71')]=!!_0x1be92e['dialPreviewAutoRecallMe']||![];this[_0xb423('0x72')]=!!_0x1be92e[_0xb423('0x72')]||![];this[_0xb423('0x73')]=_0x1be92e[_0xb423('0x73')]||undefined;this[_0xb423('0x74')]=_0x1be92e[_0xb423('0x74')]||![];this['dialAgiAfterHangupAgent']=_0x1be92e['dialAgiAfterHangupAgent']||![];this['monitor_format']=monitorFormat[_0x1be92e[_0xb423('0x6')]]?monitorFormat[_0x1be92e[_0xb423('0x6')]]:undefined;this[_0xb423('0x75')]=_0x1be92e[_0xb423('0x75')]||![];this[_0xb423('0x76')]=_0x1be92e['mandatoryDispositionPause']?_0x1be92e['mandatoryDispositionPause']:undefined;this[_0xb423('0x77')]=![];}module['exports']=VoiceQueue;
\ No newline at end of file
index 0dcc297..762d22f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb138=['predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','startPredictive','message','statusMessage','Trunk','active','loggedin','callers','online','incall','includes','status','booked','keys','length','queue','dialer','xcally-motion-preview','prototype','compareToInboundQueue','some','compareToOutboundQueue','updateReportFromOutboundQueue','preview','exports','available','loggedIn','loggedInDb','paused','ringing','talking','waiting','answered','inUse','originated','outboundAbandonedCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundReCallsDay','pTalking','sumBillable','sumDuration','name','strategy','busy','invalid','onHold','notInUse','ringInUse','sumHoldTime','total','type','unavailable','unknown','unmanaged','outbound','dialActive','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','temp','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundOriginateFailureCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate'];(function(_0x4cf98e,_0xba4b79){var _0x1623ac=function(_0x459bc0){while(--_0x459bc0){_0x4cf98e['push'](_0x4cf98e['shift']());}};_0x1623ac(++_0xba4b79);}(_0xb138,0x1dd));var _0x8b13=function(_0x49d259,_0x297ed6){_0x49d259=_0x49d259-0x0;var _0x11c87e=_0xb138[_0x49d259];return _0x11c87e;};'use strict';var INBOUND_COUNTERS=[_0x8b13('0x0'),_0x8b13('0x1'),_0x8b13('0x2'),_0x8b13('0x3'),_0x8b13('0x4'),_0x8b13('0x5'),_0x8b13('0x6')];var OUTBOUND_COUNTERS=['available',_0x8b13('0x7'),_0x8b13('0x8'),_0x8b13('0x1'),'loggedInDb',_0x8b13('0x9'),_0x8b13('0xa'),'outboundAnswerCallsDay',_0x8b13('0xb'),_0x8b13('0xc'),_0x8b13('0xd'),'outboundNoAnswerCallsDay',_0x8b13('0xe'),_0x8b13('0xf'),'outboundRejectCallsDay','outboundUnknownCallsDay',_0x8b13('0x3'),_0x8b13('0x10'),_0x8b13('0x5'),_0x8b13('0x11'),_0x8b13('0x12'),'total',_0x8b13('0x6')];function VoiceQueueSummary(_0xeee2cc){this['id']=_0xeee2cc['id'];this[_0x8b13('0x13')]=_0xeee2cc[_0x8b13('0x13')];this[_0x8b13('0x14')]=_0xeee2cc[_0x8b13('0x14')];this['abandoned']=_0xeee2cc['abandoned']||0x0;this[_0x8b13('0x7')]=_0xeee2cc[_0x8b13('0x7')]||0x0;this['available']=_0xeee2cc['available']||0x0;this['busy']=_0xeee2cc[_0x8b13('0x15')]||0x0;this[_0x8b13('0x8')]=_0xeee2cc[_0x8b13('0x8')]||0x0;this[_0x8b13('0x16')]=_0xeee2cc[_0x8b13('0x16')]||0x0;this['loggedIn']=_0xeee2cc[_0x8b13('0x1')]||0x0;this[_0x8b13('0x2')]=_0xeee2cc[_0x8b13('0x2')]||0x0;this[_0x8b13('0x17')]=_0xeee2cc[_0x8b13('0x17')]||0x0;this[_0x8b13('0x18')]=_0xeee2cc[_0x8b13('0x18')]||0x0;this[_0x8b13('0x3')]=_0xeee2cc['paused']||0x0;this['ringing']=_0xeee2cc[_0x8b13('0x4')]||0x0;this[_0x8b13('0x19')]=_0xeee2cc[_0x8b13('0x19')];this[_0x8b13('0x11')]=_0xeee2cc[_0x8b13('0x11')];this[_0x8b13('0x12')]=_0xeee2cc['sumDuration'];this[_0x8b13('0x1a')]=_0xeee2cc[_0x8b13('0x1a')]||0x0;this[_0x8b13('0x5')]=_0xeee2cc['talking']||0x0;this['total']=_0xeee2cc[_0x8b13('0x1b')]||0x0;this[_0x8b13('0x1c')]=_0xeee2cc['type'];this[_0x8b13('0x1d')]=_0xeee2cc[_0x8b13('0x1d')]||0x0;this[_0x8b13('0x1e')]=_0xeee2cc[_0x8b13('0x1e')]||0x0;this[_0x8b13('0x1f')]=_0xeee2cc['unmanaged']||0x0;this[_0x8b13('0x6')]=_0xeee2cc[_0x8b13('0x6')]||0x0;if(_0xeee2cc['type']===_0x8b13('0x20')){this['pTalking']=_0xeee2cc[_0x8b13('0x10')]||0x0;this[_0x8b13('0x21')]=_0xeee2cc['dialActive'];this[_0x8b13('0x22')]=_0xeee2cc[_0x8b13('0x22')];this['dialOriginateCallerIdName']=_0xeee2cc[_0x8b13('0x23')];this[_0x8b13('0x24')]=_0xeee2cc[_0x8b13('0x24')];this[_0x8b13('0x25')]=_0xeee2cc[_0x8b13('0x25')];this['dialPrefix']=_0xeee2cc[_0x8b13('0x26')];this[_0x8b13('0x27')]=_0xeee2cc[_0x8b13('0x27')];this[_0x8b13('0x28')]=_0xeee2cc[_0x8b13('0x28')];this[_0x8b13('0x29')]=_0xeee2cc['outboundAnswerCallsDay'];this[_0x8b13('0xb')]=_0xeee2cc[_0x8b13('0xb')];this[_0x8b13('0xc')]=_0xeee2cc[_0x8b13('0xc')];this[_0x8b13('0xd')]=_0xeee2cc[_0x8b13('0xd')];this[_0x8b13('0x2a')]=_0xeee2cc[_0x8b13('0x2a')];this[_0x8b13('0x2b')]=_0xeee2cc['outboundDropCallsDayCallersExit'];this[_0x8b13('0x2c')]=_0xeee2cc[_0x8b13('0x2c')];this[_0x8b13('0x2d')]=_0xeee2cc[_0x8b13('0x2d')];this['outboundNoSuchCallsDay']=_0xeee2cc['outboundNoSuchCallsDay'];this[_0x8b13('0x2e')]=_0xeee2cc['outboundOriginateFailureCallsDay'];this['outboundReCallsDay']=_0xeee2cc[_0x8b13('0xf')];this['outboundRejectCallsDay']=_0xeee2cc[_0x8b13('0x2f')];this[_0x8b13('0x30')]=_0xeee2cc[_0x8b13('0x30')];this[_0x8b13('0x31')]=_0xeee2cc[_0x8b13('0x31')];this[_0x8b13('0x32')]=_0xeee2cc[_0x8b13('0x32')];this[_0x8b13('0x33')]=_0xeee2cc[_0x8b13('0x33')];this[_0x8b13('0x34')]=_0xeee2cc['predictiveIntervalDroppedCallsCallersExit'];this[_0x8b13('0x35')]=_0xeee2cc[_0x8b13('0x35')];this[_0x8b13('0x36')]=_0xeee2cc[_0x8b13('0x36')];this[_0x8b13('0x37')]=_0xeee2cc[_0x8b13('0x37')];this[_0x8b13('0x38')]=_0xeee2cc[_0x8b13('0x38')];this['predictiveIntervalMultiplicativeFactor']=_0xeee2cc[_0x8b13('0x39')];this['predictiveIntervalPauses']=_0xeee2cc[_0x8b13('0x3a')];this[_0x8b13('0x3b')]=_0xeee2cc[_0x8b13('0x3b')];this[_0x8b13('0x3c')]=_0xeee2cc[_0x8b13('0x3c')];this[_0x8b13('0x9')]=_0xeee2cc['originated'];this['erlangCalls']=_0xeee2cc[_0x8b13('0x3d')];this['erlangCallToSecond']=_0xeee2cc[_0x8b13('0x3e')];this['erlangAbandonmentRate']=_0xeee2cc[_0x8b13('0x3f')];this[_0x8b13('0x40')]=_0xeee2cc[_0x8b13('0x40')];this[_0x8b13('0x41')]=_0xeee2cc[_0x8b13('0x41')];this['startProgressive']=_0xeee2cc['startProgressive'];this[_0x8b13('0x42')]=_0xeee2cc['message'];this[_0x8b13('0x43')]=_0xeee2cc[_0x8b13('0x43')];}if(_0xeee2cc['Trunk']){this[_0x8b13('0x44')]={'id':_0xeee2cc[_0x8b13('0x44')]['id'],'name':_0xeee2cc[_0x8b13('0x44')][_0x8b13('0x13')],'active':_0xeee2cc[_0x8b13('0x44')][_0x8b13('0x45')],'callerid':_0xeee2cc[_0x8b13('0x44')]['callerid']};}}VoiceQueueSummary['prototype']['createReport']=function(_0x3eb3c5,_0x16ec3,_0x27cfe5,_0x3968bf){this[_0x8b13('0x2')]=0x0;this[_0x8b13('0x5')]=0x0;this['paused']=0x0;this[_0x8b13('0x1e')]=0x0;this['notInUse']=0x0;this[_0x8b13('0x8')]=0x0;this['busy']=0x0;this[_0x8b13('0x16')]=0x0;this[_0x8b13('0x1d')]=0x0;this[_0x8b13('0x4')]=0x0;this[_0x8b13('0x19')]=0x0;this[_0x8b13('0x17')]=0x0;if(_0x27cfe5){if(_0x27cfe5[_0x8b13('0x0')]){this[_0x8b13('0x0')]=Number(_0x27cfe5['available']);}if(_0x27cfe5['loggedin']){this['loggedIn']=Number(_0x27cfe5[_0x8b13('0x46')]);}if(_0x27cfe5[_0x8b13('0x47')]){this[_0x8b13('0x6')]=Number(_0x27cfe5[_0x8b13('0x47')]);}}for(var _0x4a4018=0x0;_0x4a4018<_0x3eb3c5['length'];_0x4a4018++){var _0x3f420d=_0x16ec3['SIP/'+_0x3eb3c5[_0x4a4018][_0x8b13('0x13')]];if(_0x3f420d&&_0x3f420d[_0x8b13('0x48')]){this[_0x8b13('0x2')]+=0x1;}if(_0x3eb3c5[_0x4a4018][_0x8b13('0x49')]==='1'){this[_0x8b13('0x5')]+=0x1;}if(_0x3eb3c5[_0x4a4018]['paused']==='1'&&!['2','7','8'][_0x8b13('0x4a')](_0x3eb3c5[_0x4a4018][_0x8b13('0x4b')])){this[_0x8b13('0x3')]+=0x1;}switch(_0x3eb3c5[_0x4a4018][_0x8b13('0x4b')]){case'0':this[_0x8b13('0x1e')]+=0x1;break;case'1':this[_0x8b13('0x18')]+=0x1;break;case'2':this[_0x8b13('0x8')]+=0x1;break;case'3':this[_0x8b13('0x15')]+=0x1;break;case'4':this[_0x8b13('0x16')]+=0x1;break;case'5':this['unavailable']+=0x1;break;case'6':this[_0x8b13('0x4')]+=0x1;break;case'7':this['ringInUse']+=0x1;break;case'8':this[_0x8b13('0x17')]+=0x1;break;}}if(this[_0x8b13('0x22')]===_0x8b13('0x4c')){var _0x5d9ddb=Object[_0x8b13('0x4d')](_0x3968bf);for(var _0x35f612=0x0;_0x35f612<_0x5d9ddb[_0x8b13('0x4e')];_0x35f612++){var _0x4129c0=_0x5d9ddb[_0x35f612];var _0x2d1e98=_0x3968bf[_0x4129c0];if(_0x2d1e98[_0x8b13('0x4f')]===this[_0x8b13('0x13')]&&_0x2d1e98['type']===_0x8b13('0x50')&&_0x2d1e98['exten']===_0x8b13('0x51')){this[_0x8b13('0x5')]+=0x1;}}if(this[_0x8b13('0x5')]>this[_0x8b13('0x8')]){this[_0x8b13('0x5')]=this[_0x8b13('0x8')];}this[_0x8b13('0x10')]=0x0;}return this;};VoiceQueueSummary[_0x8b13('0x52')][_0x8b13('0x53')]=function(_0xce98f7){var _0x14d456=![];if(_0xce98f7){_0x14d456=INBOUND_COUNTERS[_0x8b13('0x54')](function(_0xd55f3b){return this[_0xd55f3b]!==_0xce98f7[_0xd55f3b];},this);}return _0x14d456;};VoiceQueueSummary[_0x8b13('0x52')][_0x8b13('0x55')]=function(_0x32e40e){var _0xa1942a=![];var _0x50c354=![];var _0x1699c6=![];if(_0x32e40e){_0xa1942a=this[_0x8b13('0x22')]!==_0x32e40e['dialMethod']||this[_0x8b13('0x21')]!==_0x32e40e[_0x8b13('0x21')]||this[_0x8b13('0x42')]!==_0x32e40e[_0x8b13('0x42')]||this[_0x8b13('0x43')]!==_0x32e40e[_0x8b13('0x43')];_0x50c354=OUTBOUND_COUNTERS[_0x8b13('0x54')](function(_0x39984a){return this[_0x39984a]!==_0x32e40e[_0x39984a];},this);if(this[_0x8b13('0x44')]&&_0x32e40e[_0x8b13('0x44')]){_0x1699c6=this[_0x8b13('0x44')][_0x8b13('0x13')]!==_0x32e40e[_0x8b13('0x44')][_0x8b13('0x13')]||this[_0x8b13('0x44')]['active']!==_0x32e40e[_0x8b13('0x44')][_0x8b13('0x45')];}}return _0xa1942a||_0x50c354||_0x1699c6;};VoiceQueueSummary['prototype'][_0x8b13('0x56')]=function(_0x73aba5){this[_0x8b13('0x7')]=_0x73aba5[_0x8b13('0x7')];this[_0x8b13('0x42')]=_0x73aba5['message'];this[_0x8b13('0x43')]=_0x73aba5[_0x8b13('0x43')];this[_0x8b13('0x9')]=_0x73aba5['originated'];this[_0x8b13('0xa')]=_0x73aba5[_0x8b13('0xa')];this['outboundAnswerCallsDay']=_0x73aba5[_0x8b13('0x29')];this[_0x8b13('0xb')]=_0x73aba5[_0x8b13('0xb')];this[_0x8b13('0xc')]=_0x73aba5['outboundBusyCallsDay'];this[_0x8b13('0xd')]=_0x73aba5[_0x8b13('0xd')];this['outboundNoAnswerCallsDay']=_0x73aba5[_0x8b13('0x2d')];this[_0x8b13('0xe')]=_0x73aba5[_0x8b13('0xe')];this[_0x8b13('0xf')]=_0x73aba5['outboundReCallsDay'];this[_0x8b13('0x2f')]=_0x73aba5[_0x8b13('0x2f')];this[_0x8b13('0x30')]=_0x73aba5[_0x8b13('0x30')];this[_0x8b13('0x11')]=_0x73aba5[_0x8b13('0x11')];this['sumDuration']=_0x73aba5[_0x8b13('0x12')];this[_0x8b13('0x1b')]=_0x73aba5[_0x8b13('0x1b')];if(this['dialMethod']===_0x8b13('0x57')){this[_0x8b13('0x10')]=_0x73aba5[_0x8b13('0x10')];}};module[_0x8b13('0x58')]=VoiceQueueSummary;
\ No newline at end of file
+var _0xff3c=['erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','startPredictive','startProgressive','message','statusMessage','Trunk','active','callerid','createReport','ringInUse','callers','length','SIP/','online','incall','includes','status','booked','queue','dialer','xcally-motion-preview','prototype','compareToInboundQueue','some','updateReportFromOutboundQueue','preview','exports','available','loggedIn','paused','ringing','answered','inUse','loggedInDb','originated','outboundBlacklistCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','pTalking','talking','total','waiting','name','strategy','abandoned','busy','invalid','onHold','notInUse','sumBillable','sumDuration','sumHoldTime','type','unavailable','unknown','unmanaged','dialActive','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','temp','outboundAnswerAgiCallsDay','outboundAnswerCallsDay','outboundBusyCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoAnswerCallsDay','outboundOriginateFailureCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalHitRate','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','erlangCalls'];(function(_0x4ef151,_0x5d2909){var _0x20d902=function(_0x45b4ee){while(--_0x45b4ee){_0x4ef151['push'](_0x4ef151['shift']());}};_0x20d902(++_0x5d2909);}(_0xff3c,0x179));var _0xcff3=function(_0x503564,_0x55867e){_0x503564=_0x503564-0x0;var _0x4be9fd=_0xff3c[_0x503564];return _0x4be9fd;};'use strict';var INBOUND_COUNTERS=[_0xcff3('0x0'),_0xcff3('0x1'),'loggedInDb',_0xcff3('0x2'),_0xcff3('0x3'),'talking','waiting'];var OUTBOUND_COUNTERS=[_0xcff3('0x0'),_0xcff3('0x4'),_0xcff3('0x5'),_0xcff3('0x1'),_0xcff3('0x6'),_0xcff3('0x7'),'outboundAbandonedCallsDay','outboundAnswerCallsDay',_0xcff3('0x8'),'outboundBusyCallsDay',_0xcff3('0x9'),'outboundNoAnswerCallsDay',_0xcff3('0xa'),_0xcff3('0xb'),_0xcff3('0xc'),_0xcff3('0xd'),_0xcff3('0x2'),_0xcff3('0xe'),_0xcff3('0xf'),'sumBillable','sumDuration',_0xcff3('0x10'),_0xcff3('0x11')];function VoiceQueueSummary(_0x3e5fbc){this['id']=_0x3e5fbc['id'];this[_0xcff3('0x12')]=_0x3e5fbc[_0xcff3('0x12')];this[_0xcff3('0x13')]=_0x3e5fbc[_0xcff3('0x13')];this[_0xcff3('0x14')]=_0x3e5fbc[_0xcff3('0x14')]||0x0;this[_0xcff3('0x4')]=_0x3e5fbc[_0xcff3('0x4')]||0x0;this[_0xcff3('0x0')]=_0x3e5fbc[_0xcff3('0x0')]||0x0;this[_0xcff3('0x15')]=_0x3e5fbc[_0xcff3('0x15')]||0x0;this[_0xcff3('0x5')]=_0x3e5fbc['inUse']||0x0;this[_0xcff3('0x16')]=_0x3e5fbc['invalid']||0x0;this[_0xcff3('0x1')]=_0x3e5fbc[_0xcff3('0x1')]||0x0;this[_0xcff3('0x6')]=_0x3e5fbc['loggedInDb']||0x0;this[_0xcff3('0x17')]=_0x3e5fbc[_0xcff3('0x17')]||0x0;this['notInUse']=_0x3e5fbc[_0xcff3('0x18')]||0x0;this['paused']=_0x3e5fbc[_0xcff3('0x2')]||0x0;this[_0xcff3('0x3')]=_0x3e5fbc[_0xcff3('0x3')]||0x0;this['ringInUse']=_0x3e5fbc['ringInUse'];this[_0xcff3('0x19')]=_0x3e5fbc[_0xcff3('0x19')];this['sumDuration']=_0x3e5fbc[_0xcff3('0x1a')];this['sumHoldTime']=_0x3e5fbc[_0xcff3('0x1b')]||0x0;this['talking']=_0x3e5fbc[_0xcff3('0xf')]||0x0;this['total']=_0x3e5fbc[_0xcff3('0x10')]||0x0;this['type']=_0x3e5fbc[_0xcff3('0x1c')];this[_0xcff3('0x1d')]=_0x3e5fbc['unavailable']||0x0;this[_0xcff3('0x1e')]=_0x3e5fbc[_0xcff3('0x1e')]||0x0;this[_0xcff3('0x1f')]=_0x3e5fbc[_0xcff3('0x1f')]||0x0;this['waiting']=_0x3e5fbc[_0xcff3('0x11')]||0x0;if(_0x3e5fbc['type']==='outbound'){this[_0xcff3('0xe')]=_0x3e5fbc[_0xcff3('0xe')]||0x0;this[_0xcff3('0x20')]=_0x3e5fbc[_0xcff3('0x20')];this['dialMethod']=_0x3e5fbc[_0xcff3('0x21')];this['dialOriginateCallerIdName']=_0x3e5fbc[_0xcff3('0x22')];this[_0xcff3('0x23')]=_0x3e5fbc[_0xcff3('0x23')];this[_0xcff3('0x24')]=_0x3e5fbc[_0xcff3('0x24')];this[_0xcff3('0x25')]=_0x3e5fbc[_0xcff3('0x25')];this[_0xcff3('0x26')]=_0x3e5fbc[_0xcff3('0x26')];this[_0xcff3('0x27')]=_0x3e5fbc[_0xcff3('0x27')];this[_0xcff3('0x28')]=_0x3e5fbc[_0xcff3('0x28')];this[_0xcff3('0x8')]=_0x3e5fbc[_0xcff3('0x8')];this[_0xcff3('0x29')]=_0x3e5fbc[_0xcff3('0x29')];this['outboundCongestionCallsDay']=_0x3e5fbc[_0xcff3('0x9')];this[_0xcff3('0x2a')]=_0x3e5fbc['outboundDropCallsDayACS'];this[_0xcff3('0x2b')]=_0x3e5fbc['outboundDropCallsDayCallersExit'];this[_0xcff3('0x2c')]=_0x3e5fbc[_0xcff3('0x2c')];this[_0xcff3('0x2d')]=_0x3e5fbc[_0xcff3('0x2d')];this[_0xcff3('0xa')]=_0x3e5fbc[_0xcff3('0xa')];this[_0xcff3('0x2e')]=_0x3e5fbc[_0xcff3('0x2e')];this[_0xcff3('0xb')]=_0x3e5fbc['outboundReCallsDay'];this[_0xcff3('0xc')]=_0x3e5fbc['outboundRejectCallsDay'];this[_0xcff3('0xd')]=_0x3e5fbc['outboundUnknownCallsDay'];this[_0xcff3('0x2f')]=_0x3e5fbc[_0xcff3('0x2f')];this[_0xcff3('0x30')]=_0x3e5fbc[_0xcff3('0x30')];this[_0xcff3('0x31')]=_0x3e5fbc[_0xcff3('0x31')];this[_0xcff3('0x32')]=_0x3e5fbc[_0xcff3('0x32')];this[_0xcff3('0x33')]=_0x3e5fbc[_0xcff3('0x33')];this[_0xcff3('0x34')]=_0x3e5fbc[_0xcff3('0x34')];this['predictiveIntervalErlangCallsDroppedCalls']=_0x3e5fbc['predictiveIntervalErlangCallsDroppedCalls'];this[_0xcff3('0x35')]=_0x3e5fbc[_0xcff3('0x35')];this['predictiveIntervalMultiplicativeFactor']=_0x3e5fbc['predictiveIntervalMultiplicativeFactor'];this[_0xcff3('0x36')]=_0x3e5fbc[_0xcff3('0x36')];this[_0xcff3('0x37')]=_0x3e5fbc[_0xcff3('0x37')];this[_0xcff3('0x38')]=_0x3e5fbc['predictiveIntervalTotalCalls'];this['originated']=_0x3e5fbc[_0xcff3('0x7')];this[_0xcff3('0x39')]=_0x3e5fbc[_0xcff3('0x39')];this['erlangCallToSecond']=_0x3e5fbc[_0xcff3('0x3a')];this[_0xcff3('0x3b')]=_0x3e5fbc[_0xcff3('0x3b')];this[_0xcff3('0x3c')]=_0x3e5fbc[_0xcff3('0x3c')];this[_0xcff3('0x3d')]=_0x3e5fbc[_0xcff3('0x3d')];this[_0xcff3('0x3e')]=_0x3e5fbc['startProgressive'];this[_0xcff3('0x3f')]=_0x3e5fbc[_0xcff3('0x3f')];this[_0xcff3('0x40')]=_0x3e5fbc[_0xcff3('0x40')];}if(_0x3e5fbc['Trunk']){this[_0xcff3('0x41')]={'id':_0x3e5fbc[_0xcff3('0x41')]['id'],'name':_0x3e5fbc['Trunk']['name'],'active':_0x3e5fbc[_0xcff3('0x41')][_0xcff3('0x42')],'callerid':_0x3e5fbc['Trunk'][_0xcff3('0x43')]};}}VoiceQueueSummary['prototype'][_0xcff3('0x44')]=function(_0x5496a6,_0x4ab30a,_0x10e66d,_0x89308e){this['loggedInDb']=0x0;this[_0xcff3('0xf')]=0x0;this['paused']=0x0;this[_0xcff3('0x1e')]=0x0;this[_0xcff3('0x18')]=0x0;this[_0xcff3('0x5')]=0x0;this[_0xcff3('0x15')]=0x0;this['invalid']=0x0;this[_0xcff3('0x1d')]=0x0;this['ringing']=0x0;this[_0xcff3('0x45')]=0x0;this[_0xcff3('0x17')]=0x0;if(_0x10e66d){if(_0x10e66d[_0xcff3('0x0')]){this[_0xcff3('0x0')]=Number(_0x10e66d[_0xcff3('0x0')]);}if(_0x10e66d['loggedin']){this[_0xcff3('0x1')]=Number(_0x10e66d['loggedin']);}if(_0x10e66d[_0xcff3('0x46')]){this['waiting']=Number(_0x10e66d[_0xcff3('0x46')]);}}for(var _0x4e86af=0x0;_0x4e86af<_0x5496a6[_0xcff3('0x47')];_0x4e86af++){var _0x4afe50=_0x4ab30a[_0xcff3('0x48')+_0x5496a6[_0x4e86af][_0xcff3('0x12')]];if(_0x4afe50&&_0x4afe50[_0xcff3('0x49')]){this['loggedInDb']+=0x1;}if(_0x5496a6[_0x4e86af][_0xcff3('0x4a')]==='1'){this[_0xcff3('0xf')]+=0x1;}if(_0x5496a6[_0x4e86af]['paused']==='1'&&!['2','7','8'][_0xcff3('0x4b')](_0x5496a6[_0x4e86af][_0xcff3('0x4c')])){this['paused']+=0x1;}switch(_0x5496a6[_0x4e86af][_0xcff3('0x4c')]){case'0':this[_0xcff3('0x1e')]+=0x1;break;case'1':this[_0xcff3('0x18')]+=0x1;break;case'2':this[_0xcff3('0x5')]+=0x1;break;case'3':this[_0xcff3('0x15')]+=0x1;break;case'4':this['invalid']+=0x1;break;case'5':this[_0xcff3('0x1d')]+=0x1;break;case'6':this[_0xcff3('0x3')]+=0x1;break;case'7':this['ringInUse']+=0x1;break;case'8':this[_0xcff3('0x17')]+=0x1;break;}}if(this[_0xcff3('0x21')]===_0xcff3('0x4d')){var _0x43b112=Object['keys'](_0x89308e);for(var _0x3d6ff1=0x0;_0x3d6ff1<_0x43b112[_0xcff3('0x47')];_0x3d6ff1++){var _0xe65192=_0x43b112[_0x3d6ff1];var _0x44ac5d=_0x89308e[_0xe65192];if(_0x44ac5d[_0xcff3('0x4e')]===this[_0xcff3('0x12')]&&_0x44ac5d[_0xcff3('0x1c')]===_0xcff3('0x4f')&&_0x44ac5d['exten']===_0xcff3('0x50')){this[_0xcff3('0xf')]+=0x1;}}if(this[_0xcff3('0xf')]>this[_0xcff3('0x5')]){this[_0xcff3('0xf')]=this[_0xcff3('0x5')];}this[_0xcff3('0xe')]=0x0;}return this;};VoiceQueueSummary[_0xcff3('0x51')][_0xcff3('0x52')]=function(_0x27cc77){var _0x4ebe51=![];if(_0x27cc77){_0x4ebe51=INBOUND_COUNTERS[_0xcff3('0x53')](function(_0x9c8282){return this[_0x9c8282]!==_0x27cc77[_0x9c8282];},this);}return _0x4ebe51;};VoiceQueueSummary[_0xcff3('0x51')]['compareToOutboundQueue']=function(_0x3f971c){var _0x1279c1=![];var _0x92c66e=![];var _0x18d11f=![];if(_0x3f971c){_0x1279c1=this[_0xcff3('0x21')]!==_0x3f971c[_0xcff3('0x21')]||this[_0xcff3('0x20')]!==_0x3f971c['dialActive']||this['message']!==_0x3f971c[_0xcff3('0x3f')]||this['statusMessage']!==_0x3f971c[_0xcff3('0x40')];_0x92c66e=OUTBOUND_COUNTERS[_0xcff3('0x53')](function(_0x5028db){return this[_0x5028db]!==_0x3f971c[_0x5028db];},this);if(this[_0xcff3('0x41')]&&_0x3f971c[_0xcff3('0x41')]){_0x18d11f=this[_0xcff3('0x41')][_0xcff3('0x12')]!==_0x3f971c[_0xcff3('0x41')][_0xcff3('0x12')]||this[_0xcff3('0x41')]['active']!==_0x3f971c[_0xcff3('0x41')][_0xcff3('0x42')];}}return _0x1279c1||_0x92c66e||_0x18d11f;};VoiceQueueSummary[_0xcff3('0x51')][_0xcff3('0x54')]=function(_0x1821da){this[_0xcff3('0x4')]=_0x1821da['answered'];this['message']=_0x1821da[_0xcff3('0x3f')];this[_0xcff3('0x40')]=_0x1821da[_0xcff3('0x40')];this[_0xcff3('0x7')]=_0x1821da['originated'];this['outboundAbandonedCallsDay']=_0x1821da['outboundAbandonedCallsDay'];this[_0xcff3('0x28')]=_0x1821da[_0xcff3('0x28')];this[_0xcff3('0x8')]=_0x1821da[_0xcff3('0x8')];this[_0xcff3('0x29')]=_0x1821da[_0xcff3('0x29')];this[_0xcff3('0x9')]=_0x1821da[_0xcff3('0x9')];this[_0xcff3('0x2d')]=_0x1821da[_0xcff3('0x2d')];this[_0xcff3('0xa')]=_0x1821da['outboundNoSuchCallsDay'];this[_0xcff3('0xb')]=_0x1821da[_0xcff3('0xb')];this[_0xcff3('0xc')]=_0x1821da[_0xcff3('0xc')];this[_0xcff3('0xd')]=_0x1821da[_0xcff3('0xd')];this[_0xcff3('0x19')]=_0x1821da['sumBillable'];this[_0xcff3('0x1a')]=_0x1821da[_0xcff3('0x1a')];this[_0xcff3('0x10')]=_0x1821da['total'];if(this[_0xcff3('0x21')]===_0xcff3('0x55')){this['pTalking']=_0x1821da[_0xcff3('0xe')];}};module[_0xcff3('0x56')]=VoiceQueueSummary;
\ No newline at end of file
index d96b5e9..21918a7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3a5b=['accessKey','remoteUri','serverUrl','Configurations','exports','name','username'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x3a5b,0x6e));var _0xb3a5=function(_0x3cc9d9,_0x69ed38){_0x3cc9d9=_0x3cc9d9-0x0;var _0x1a425d=_0x3a5b[_0x3cc9d9];return _0x1a425d;};'use strict';function VtigerAccount(_0x3cf7d4){this['id']=_0x3cf7d4['id']||0x0;this[_0xb3a5('0x0')]=_0x3cf7d4['name']||'';this[_0xb3a5('0x1')]=_0x3cf7d4[_0xb3a5('0x1')]||'';this['accessKey']=_0x3cf7d4[_0xb3a5('0x2')]||'';this[_0xb3a5('0x3')]=_0x3cf7d4[_0xb3a5('0x3')]||'';this['serverUrl']=_0x3cf7d4[_0xb3a5('0x4')]||'';this[_0xb3a5('0x5')]=_0x3cf7d4[_0xb3a5('0x5')]||{};}module[_0xb3a5('0x6')]=VtigerAccount;
\ No newline at end of file
+var _0x8db7=['Configurations','exports','username','accessKey','remoteUri','serverUrl'];(function(_0x2dc711,_0x79a73c){var _0x3deb75=function(_0x22c5a3){while(--_0x22c5a3){_0x2dc711['push'](_0x2dc711['shift']());}};_0x3deb75(++_0x79a73c);}(_0x8db7,0x140));var _0x78db=function(_0x49b207,_0x408ade){_0x49b207=_0x49b207-0x0;var _0x2dc8fa=_0x8db7[_0x49b207];return _0x2dc8fa;};'use strict';function VtigerAccount(_0xa4ae6d){this['id']=_0xa4ae6d['id']||0x0;this['name']=_0xa4ae6d['name']||'';this[_0x78db('0x0')]=_0xa4ae6d[_0x78db('0x0')]||'';this[_0x78db('0x1')]=_0xa4ae6d['accessKey']||'';this[_0x78db('0x2')]=_0xa4ae6d[_0x78db('0x2')]||'';this[_0x78db('0x3')]=_0xa4ae6d['serverUrl']||'';this[_0x78db('0x4')]=_0xa4ae6d['Configurations']||{};}module[_0x78db('0x5')]=VtigerAccount;
\ No newline at end of file
index 4281f56..dc92a52 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6391=['remoteUri','authType','type','integrationTab','serverUrl','Configurations','exports','name','username','password','token'];(function(_0x390196,_0x557a01){var _0x3ed319=function(_0x26c4d8){while(--_0x26c4d8){_0x390196['push'](_0x390196['shift']());}};_0x3ed319(++_0x557a01);}(_0x6391,0x8b));var _0x1639=function(_0x2a238a,_0x1d5054){_0x2a238a=_0x2a238a-0x0;var _0xeef802=_0x6391[_0x2a238a];return _0xeef802;};'use strict';function ZendeskAccount(_0x43716a){this['id']=_0x43716a['id']||0x0;this[_0x1639('0x0')]=_0x43716a[_0x1639('0x0')]||'';this[_0x1639('0x1')]=_0x43716a['username']||'';this['password']=_0x43716a[_0x1639('0x2')]||'';this[_0x1639('0x3')]=_0x43716a['token']||'';this[_0x1639('0x4')]=_0x43716a[_0x1639('0x4')]||'';this[_0x1639('0x5')]=_0x43716a[_0x1639('0x5')]||'';this[_0x1639('0x6')]=_0x43716a[_0x1639('0x6')]||_0x1639('0x7');this[_0x1639('0x8')]=_0x43716a[_0x1639('0x8')]||'';this[_0x1639('0x9')]=_0x43716a['Configurations']||{};}module[_0x1639('0xa')]=ZendeskAccount;
\ No newline at end of file
+var _0xb463=['username','password','token','remoteUri','authType','type','integrationTab','serverUrl','Configurations','exports','name'];(function(_0x29b609,_0x19d388){var _0x54c952=function(_0xb3c38d){while(--_0xb3c38d){_0x29b609['push'](_0x29b609['shift']());}};_0x54c952(++_0x19d388);}(_0xb463,0xaf));var _0x3b46=function(_0x5a51af,_0x184b9f){_0x5a51af=_0x5a51af-0x0;var _0x11c74f=_0xb463[_0x5a51af];return _0x11c74f;};'use strict';function ZendeskAccount(_0xb53ccd){this['id']=_0xb53ccd['id']||0x0;this[_0x3b46('0x0')]=_0xb53ccd[_0x3b46('0x0')]||'';this[_0x3b46('0x1')]=_0xb53ccd['username']||'';this['password']=_0xb53ccd[_0x3b46('0x2')]||'';this['token']=_0xb53ccd[_0x3b46('0x3')]||'';this[_0x3b46('0x4')]=_0xb53ccd[_0x3b46('0x4')]||'';this['authType']=_0xb53ccd[_0x3b46('0x5')]||'';this[_0x3b46('0x6')]=_0xb53ccd['type']||_0x3b46('0x7');this[_0x3b46('0x8')]=_0xb53ccd[_0x3b46('0x8')]||'';this['Configurations']=_0xb53ccd[_0x3b46('0x9')]||{};}module[_0x3b46('0xa')]=ZendeskAccount;
\ No newline at end of file
index 7fba533..758dd1d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6d1e=['name','description','host','zone','clientId','clientSecret','serverUrl','code','refreshToken','Configurations','exports'];(function(_0x190ec7,_0x2ff474){var _0x52eb51=function(_0x46beae){while(--_0x46beae){_0x190ec7['push'](_0x190ec7['shift']());}};_0x52eb51(++_0x2ff474);}(_0x6d1e,0x160));var _0xe6d1=function(_0x3899d1,_0x4aa04c){_0x3899d1=_0x3899d1-0x0;var _0xeb4a7d=_0x6d1e[_0x3899d1];return _0xeb4a7d;};'use strict';function ZohoAccount(_0x191709){this['id']=_0x191709['id']||0x0;this[_0xe6d1('0x0')]=_0x191709[_0xe6d1('0x0')]||'';this[_0xe6d1('0x1')]=_0x191709[_0xe6d1('0x1')]||'';this[_0xe6d1('0x2')]=_0x191709[_0xe6d1('0x2')]||'';this[_0xe6d1('0x3')]=_0x191709[_0xe6d1('0x3')]||'';this['clientId']=_0x191709[_0xe6d1('0x4')]||'';this[_0xe6d1('0x5')]=_0x191709[_0xe6d1('0x5')]||'';this[_0xe6d1('0x6')]=_0x191709[_0xe6d1('0x6')]||'';this['code']=_0x191709[_0xe6d1('0x7')]||'';this['refreshToken']=_0x191709[_0xe6d1('0x8')]||'';this[_0xe6d1('0x9')]=_0x191709['Configurations']||{};}module[_0xe6d1('0xa')]=ZohoAccount;
\ No newline at end of file
+var _0x712d=['name','description','host','zone','clientId','clientSecret','serverUrl','code','refreshToken','Configurations','exports'];(function(_0x4b2251,_0x393f10){var _0x5d22fb=function(_0x10992c){while(--_0x10992c){_0x4b2251['push'](_0x4b2251['shift']());}};_0x5d22fb(++_0x393f10);}(_0x712d,0x155));var _0xd712=function(_0x530cc6,_0x3bf6b0){_0x530cc6=_0x530cc6-0x0;var _0x142f0e=_0x712d[_0x530cc6];return _0x142f0e;};'use strict';function ZohoAccount(_0x224f42){this['id']=_0x224f42['id']||0x0;this[_0xd712('0x0')]=_0x224f42[_0xd712('0x0')]||'';this[_0xd712('0x1')]=_0x224f42[_0xd712('0x1')]||'';this[_0xd712('0x2')]=_0x224f42[_0xd712('0x2')]||'';this[_0xd712('0x3')]=_0x224f42[_0xd712('0x3')]||'';this[_0xd712('0x4')]=_0x224f42[_0xd712('0x4')]||'';this[_0xd712('0x5')]=_0x224f42[_0xd712('0x5')]||'';this[_0xd712('0x6')]=_0x224f42[_0xd712('0x6')]||'';this[_0xd712('0x7')]=_0x224f42['code']||'';this[_0xd712('0x8')]=_0x224f42[_0xd712('0x8')]||'';this['Configurations']=_0x224f42[_0xd712('0x9')]||{};}module[_0xd712('0xa')]=ZohoAccount;
\ No newline at end of file
index 0f51675..2a72066 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8952=['originatecalleridnum','originatecalleridname','getCaller','exports','lodash','moment','isNil','string','uniqueid','idContact','queue','name','type','campaigntype','dialAnswer','Agent','channelAgent','format','SIP/%s','calleridname','Contact','firstName','active','calleridnum','phone','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','callback','callbackuniqueid','callbackat','ContactId','ListId','UserId','VoiceQueueId'];(function(_0x53d912,_0xb9a715){var _0x2025c6=function(_0x483e87){while(--_0x483e87){_0x53d912['push'](_0x53d912['shift']());}};_0x2025c6(++_0xb9a715);}(_0x8952,0x17e));var _0x2895=function(_0x529723,_0x572d9f){_0x529723=_0x529723-0x0;var _0x4321d7=_0x8952[_0x529723];return _0x4321d7;};'use strict';var util=require('util');var _=require(_0x2895('0x0'));var moment=require(_0x2895('0x1'));function checkNameSurname(_0x43e8d9,_0x2d485c,_0x2454c5){var _0x58085b='';if(!_[_0x2895('0x2')](_0x2d485c)&&_0x2895('0x3')===typeof _0x2d485c){_0x58085b+=_0x2d485c;}if(!_[_0x2895('0x2')](_0x2454c5)&&'string'===typeof _0x2454c5){_0x58085b+='\x20'+_0x2454c5;}if(_0x58085b!==''){return _0x58085b;}return _0x43e8d9;}function Action(_0x32429c,_0x73c245,_0x37305b,_0x4ea619,_0x526c32){this[_0x2895('0x4')]=_0x37305b||undefined;this[_0x2895('0x5')]=_0x32429c['id'];this[_0x2895('0x6')]=_0x73c245[_0x2895('0x7')];this[_0x2895('0x8')]=_0x73c245['type'];this[_0x2895('0x9')]='queue';this[_0x2895('0xa')]=![];this['membername']=_['isNil'](_0x32429c['Agent'])?undefined:_0x32429c[_0x2895('0xb')][_0x2895('0x7')];this[_0x2895('0xc')]=this['membername']?util[_0x2895('0xd')](_0x2895('0xe'),this['membername']):_0x4ea619||undefined;this[_0x2895('0xf')]=checkNameSurname(_0x32429c[_0x2895('0x10')]['phone'],_0x32429c['Contact'][_0x2895('0x11')],_0x32429c[_0x2895('0x10')]['lastName']);this[_0x2895('0x12')]=_0x32429c[_0x2895('0x12')]||![];this[_0x2895('0x13')]=_0x32429c[_0x2895('0x14')];this[_0x2895('0x15')]=_0x32429c[_0x2895('0x15')];this[_0x2895('0x16')]=_0x32429c[_0x2895('0x16')]||0x0;this[_0x2895('0x17')]=_0x32429c[_0x2895('0x17')]||0x0;this[_0x2895('0x18')]=_0x32429c[_0x2895('0x18')]||0x0;this[_0x2895('0x19')]=(_0x32429c[_0x2895('0x16')]||0x0)+(_0x32429c[_0x2895('0x17')]||0x0)+(_0x32429c[_0x2895('0x18')]||0x0)+(_0x32429c[_0x2895('0x1a')]||0x0)+(_0x32429c[_0x2895('0x1b')]||0x0)+(_0x32429c['countabandonedretry']||0x0)+(_0x32429c['countmachineretry']||0x0)+(_0x32429c['countagentrejectretry']||0x0);this[_0x2895('0x1a')]=_0x32429c[_0x2895('0x1a')]||0x0;this[_0x2895('0x1b')]=_0x32429c['countdropretry']||0x0;this[_0x2895('0x1c')]=_0x32429c[_0x2895('0x1c')]||0x0;this[_0x2895('0x1d')]=_0x32429c[_0x2895('0x1d')]||0x0;this[_0x2895('0x1e')]=_0x32429c['countagentrejectretry']||0x0;this[_0x2895('0x1f')]=_0x32429c[_0x2895('0x1f')];this['callbackuniqueid']=_0x32429c[_0x2895('0x20')];this[_0x2895('0x21')]=_0x32429c[_0x2895('0x21')];this['recallme']=_0x32429c['recallme'];this[_0x2895('0x22')]=_0x32429c[_0x2895('0x22')];this[_0x2895('0x23')]=_0x32429c['ListId'];this[_0x2895('0x24')]=_[_0x2895('0x2')](_0x32429c['Agent'])?_0x32429c[_0x2895('0x24')]:_0x32429c[_0x2895('0xb')]['id'];this[_0x2895('0x25')]=_0x32429c['VoiceQueueId'];this[_0x2895('0x26')]='';this[_0x2895('0x27')]='';}Action['prototype'][_0x2895('0x28')]=function(){return util['format']('\x22%s\x22\x20<%s>',this[_0x2895('0xf')],this['number']);};module[_0x2895('0x29')]=Action;
\ No newline at end of file
+var _0x1399=['type','queue','dialAnswer','Agent','name','channelAgent','membername','calleridname','phone','Contact','firstName','active','scheduledat','countbusyretry','countcongestionretry','countglobal','countnosuchnumberretry','countdropretry','countmachineretry','countagentrejectretry','countabandonedretry','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','originatecalleridnum','originatecalleridname','getCaller','format','\x22%s\x22\x20<%s>','number','exports','util','lodash','isNil','string','idContact'];(function(_0x20dd89,_0x2a5c08){var _0x56aa24=function(_0x46dff0){while(--_0x46dff0){_0x20dd89['push'](_0x20dd89['shift']());}};_0x56aa24(++_0x2a5c08);}(_0x1399,0x16c));var _0x9139=function(_0x438726,_0x4ea8db){_0x438726=_0x438726-0x0;var _0x2cd3ef=_0x1399[_0x438726];return _0x2cd3ef;};'use strict';var util=require(_0x9139('0x0'));var _=require(_0x9139('0x1'));var moment=require('moment');function checkNameSurname(_0x474911,_0x4f01ae,_0x10c98f){var _0x8bba08='';if(!_[_0x9139('0x2')](_0x4f01ae)&&_0x9139('0x3')===typeof _0x4f01ae){_0x8bba08+=_0x4f01ae;}if(!_[_0x9139('0x2')](_0x10c98f)&&_0x9139('0x3')===typeof _0x10c98f){_0x8bba08+='\x20'+_0x10c98f;}if(_0x8bba08!==''){return _0x8bba08;}return _0x474911;}function Action(_0x5ac80b,_0x54af2d,_0x8f086b,_0x11d2ed,_0x4d5d1e){this['uniqueid']=_0x8f086b||undefined;this[_0x9139('0x4')]=_0x5ac80b['id'];this['queue']=_0x54af2d['name'];this[_0x9139('0x5')]=_0x54af2d[_0x9139('0x5')];this['campaigntype']=_0x9139('0x6');this[_0x9139('0x7')]=![];this['membername']=_['isNil'](_0x5ac80b[_0x9139('0x8')])?undefined:_0x5ac80b[_0x9139('0x8')][_0x9139('0x9')];this[_0x9139('0xa')]=this[_0x9139('0xb')]?util['format']('SIP/%s',this['membername']):_0x11d2ed||undefined;this[_0x9139('0xc')]=checkNameSurname(_0x5ac80b['Contact'][_0x9139('0xd')],_0x5ac80b[_0x9139('0xe')][_0x9139('0xf')],_0x5ac80b[_0x9139('0xe')]['lastName']);this[_0x9139('0x10')]=_0x5ac80b['active']||![];this['calleridnum']=_0x5ac80b['phone'];this[_0x9139('0x11')]=_0x5ac80b[_0x9139('0x11')];this[_0x9139('0x12')]=_0x5ac80b[_0x9139('0x12')]||0x0;this[_0x9139('0x13')]=_0x5ac80b[_0x9139('0x13')]||0x0;this['countnoanswerretry']=_0x5ac80b['countnoanswerretry']||0x0;this[_0x9139('0x14')]=(_0x5ac80b[_0x9139('0x12')]||0x0)+(_0x5ac80b['countcongestionretry']||0x0)+(_0x5ac80b['countnoanswerretry']||0x0)+(_0x5ac80b[_0x9139('0x15')]||0x0)+(_0x5ac80b[_0x9139('0x16')]||0x0)+(_0x5ac80b['countabandonedretry']||0x0)+(_0x5ac80b[_0x9139('0x17')]||0x0)+(_0x5ac80b[_0x9139('0x18')]||0x0);this[_0x9139('0x15')]=_0x5ac80b[_0x9139('0x15')]||0x0;this[_0x9139('0x16')]=_0x5ac80b[_0x9139('0x16')]||0x0;this[_0x9139('0x19')]=_0x5ac80b[_0x9139('0x19')]||0x0;this[_0x9139('0x17')]=_0x5ac80b[_0x9139('0x17')]||0x0;this[_0x9139('0x18')]=_0x5ac80b[_0x9139('0x18')]||0x0;this[_0x9139('0x1a')]=_0x5ac80b[_0x9139('0x1a')];this[_0x9139('0x1b')]=_0x5ac80b[_0x9139('0x1b')];this[_0x9139('0x1c')]=_0x5ac80b[_0x9139('0x1c')];this[_0x9139('0x1d')]=_0x5ac80b['recallme'];this[_0x9139('0x1e')]=_0x5ac80b[_0x9139('0x1e')];this['ListId']=_0x5ac80b[_0x9139('0x1f')];this[_0x9139('0x20')]=_[_0x9139('0x2')](_0x5ac80b['Agent'])?_0x5ac80b[_0x9139('0x20')]:_0x5ac80b[_0x9139('0x8')]['id'];this['VoiceQueueId']=_0x5ac80b[_0x9139('0x21')];this[_0x9139('0x22')]='';this[_0x9139('0x23')]='';}Action['prototype'][_0x9139('0x24')]=function(){return util[_0x9139('0x25')](_0x9139('0x26'),this[_0x9139('0xc')],this[_0x9139('0x27')]);};module[_0x9139('0x28')]=Action;
\ No newline at end of file
index 2b46014..0280275 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(_0x54e603,_0x4df598){var _0x5a1925=function(_0x472e38){while(--_0x472e38){_0x54e603['push'](_0x54e603['shift']());}};_0x5a1925(++_0x4df598);}(_0xa9e0,0x123));var _0x0a9e=function(_0x38a7ac,_0x45514b){_0x38a7ac=_0x38a7ac-0x0;var _0x53061a=_0xa9e0[_0x38a7ac];return _0x53061a;};'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(_0x3d993d,_0x3b15b1){var _0x13688d=function(_0x5a92fc){while(--_0x5a92fc){_0x3d993d['push'](_0x3d993d['shift']());}};_0x13688d(++_0x3b15b1);}(_0xa9e0,0x123));var _0x0a9e=function(_0x24237f,_0x4cf32c){_0x24237f=_0x24237f-0x0;var _0x48298e=_0xa9e0[_0x24237f];return _0x48298e;};'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 0395b0b..e7e4aa2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5d85=['resolve','then','moveContactManagedDialer','[moveContactManagedDialer]\x20','checkIsBlackList','[checkIsBlackList]\x20','getContactPreview','[getContactPreview]\x20','createCustomerHistory','createCustomerFinal','rescheduleContact','UserId','active','countReScheduled','unlockContact','[unlockContact]\x20','[activeContact]\x20','crateCustomerReportQueue','type','uniqueid','calleridnum','calleridname','queue','queuecallerjoinAt','answertime','queuecallerleaveAt','endtime','connectedlinename','membername','context','exten','xcally-motion-preview','assigned','lastAssignedTo','COMPLETED','getContactRecallMe','[GetContactRecallMe]\x20','rescheduleContactInQueue','util','bluebird','../../../config/logger','preview','../rpc/cmHopper','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/agentReportPreview','../rpc/voiceQueueReport','error','inspect','createHistory','catch','[createHistory]\x20'];(function(_0xb53f7e,_0x14ea82){var _0x7f9744=function(_0x57b97b){while(--_0x57b97b){_0xb53f7e['push'](_0xb53f7e['shift']());}};_0x7f9744(++_0x14ea82);}(_0x5d85,0x15e));var _0x55d8=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x5d85[_0x3dd15e];return _0x231fd0;};'use strict';var util=require(_0x55d8('0x0'));var BPromise=require(_0x55d8('0x1'));var logger=require(_0x55d8('0x2'))(_0x55d8('0x3'));var cmHopper=require(_0x55d8('0x4'));var cmHopperHistory=require(_0x55d8('0x5'));var cmHopperBlack=require(_0x55d8('0x6'));var agentReportPreview=require(_0x55d8('0x7'));var voiceQueueReport=require(_0x55d8('0x8'));function loggerCatch(_0x42e8a2){return function(_0x45308a){logger[_0x55d8('0x9')](_0x42e8a2,util[_0x55d8('0xa')](_0x45308a,{'showHidden':![],'depth':null}));};}function create(_0x2c1356){return cmHopperHistory[_0x55d8('0xb')](_0x2c1356)[_0x55d8('0xc')](loggerCatch(_0x55d8('0xd')));}function createAgent(_0x217941){return BPromise[_0x55d8('0xe')]()[_0x55d8('0xf')](agentReportPreview[_0x55d8('0xb')](_0x217941))['catch'](loggerCatch(_0x55d8('0xd')));}function moveContact(_0x128a04){return cmHopper[_0x55d8('0x10')](_0x128a04,!![])[_0x55d8('0xc')](loggerCatch(_0x55d8('0x11')));}exports['checkIsBlackList']=function(_0x34b178){return cmHopperBlack[_0x55d8('0x12')](_0x34b178)[_0x55d8('0xc')](loggerCatch(_0x55d8('0x13')));};exports[_0x55d8('0x14')]=function(_0x533eab){return BPromise['resolve']()[_0x55d8('0xf')](cmHopper['getContactPreview'](_0x533eab))[_0x55d8('0xc')](loggerCatch(_0x55d8('0x15')));};exports[_0x55d8('0xb')]=function(_0x423340,_0x3a7517){create(_0x423340)[_0x55d8('0xc')](loggerCatch(_0x3a7517));moveContact(_0x423340)[_0x55d8('0xc')](loggerCatch(_0x3a7517));};exports['createAgentHistory']=function(_0x156eae,_0x37079a){createAgent(_0x156eae)[_0x55d8('0xc')](loggerCatch(_0x37079a));};exports[_0x55d8('0x16')]=function(_0x18551e,_0x599ff3){create(_0x18551e)[_0x55d8('0xc')](loggerCatch(_0x599ff3));};exports[_0x55d8('0x17')]=function(_0x306189,_0xc0ded3){moveContact(_0x306189)[_0x55d8('0xc')](loggerCatch(_0xc0ded3));};exports[_0x55d8('0x18')]=function(_0x409deb,_0x3d30d9,_0x1bbd66){if(_0x3d30d9){_0x409deb[_0x55d8('0x19')]=null;}if(_0x1bbd66){_0x409deb[_0x55d8('0x1a')]=![];}return cmHopper['rescheduleContact'](_0x409deb)['catch'](loggerCatch('[rescheduleContact]\x20'));};exports['countReScheduled']=function(_0x53204c){return cmHopper[_0x55d8('0x1b')](_0x53204c)['catch'](loggerCatch('[countReScheduled]\x20'));};exports[_0x55d8('0x1c')]=function(_0x2deda4){return cmHopper[_0x55d8('0x1c')]({'UserId':null},_0x2deda4,0x1)[_0x55d8('0xc')](loggerCatch(_0x55d8('0x1d')));};exports['disableContact']=function(_0x449d23){return cmHopper[_0x55d8('0x1c')]({'active':![]},_0x449d23,0x1)['catch'](loggerCatch(_0x55d8('0x1e')));};exports[_0x55d8('0x1f')]=function(_0xef8d72){var _0x7e8962={};_0x7e8962[_0x55d8('0x20')]=_0xef8d72['type'];_0x7e8962[_0x55d8('0x21')]=_0xef8d72['uniqueid'];_0x7e8962[_0x55d8('0x22')]=_0xef8d72['calleridnum'];_0x7e8962[_0x55d8('0x23')]=_0xef8d72['calleridname'];_0x7e8962[_0x55d8('0x24')]=_0xef8d72['queue'];_0x7e8962[_0x55d8('0x25')]=_0xef8d72[_0x55d8('0x26')];_0x7e8962[_0x55d8('0x27')]=_0xef8d72[_0x55d8('0x26')];_0x7e8962['queuecallercomplete']=0x1;_0x7e8962['queuecallercompleteAt']=_0xef8d72[_0x55d8('0x28')];_0x7e8962[_0x55d8('0x29')]=_0xef8d72[_0x55d8('0x2a')];_0x7e8962[_0x55d8('0x2b')]='from-sip';_0x7e8962[_0x55d8('0x2c')]=_0x55d8('0x2d');_0x7e8962['holdtime']=0x0;_0x7e8962[_0x55d8('0x2e')]=0x1;_0x7e8962[_0x55d8('0x2f')]=_0xef8d72[_0x55d8('0x2a')];_0x7e8962['queuecallerexitreason']=_0x55d8('0x30');return BPromise[_0x55d8('0xe')]()['then'](voiceQueueReport['create'](_0x7e8962))[_0x55d8('0xc')](loggerCatch('[voiceQueueReport]\x20'));};exports[_0x55d8('0x31')]=function(_0x4c5011,_0x31bc45){return BPromise[_0x55d8('0xe')]()['then'](cmHopper[_0x55d8('0x31')](_0x4c5011,_0x31bc45))[_0x55d8('0xc')](loggerCatch(_0x55d8('0x32')));};exports[_0x55d8('0x33')]=function(_0xd8cd02){return cmHopper[_0x55d8('0x18')](_0xd8cd02,!![],!![])[_0x55d8('0xc')](loggerCatch('[rescheduleContactInQueue]\x20'));};
\ No newline at end of file
+var _0xbb4a=['util','bluebird','../../../config/logger','preview','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/agentReportPreview','../rpc/voiceQueueReport','error','createHistory','catch','[createHistory]\x20','resolve','then','moveContactManagedDialer','[moveContactManagedDialer]\x20','checkIsBlackList','[checkIsBlackList]\x20','getContactPreview','createAgentHistory','createCustomerHistory','createCustomerFinal','rescheduleContact','UserId','active','countReScheduled','[countReScheduled]\x20','unlockContact','[unlockContact]\x20','disableContact','crateCustomerReportQueue','type','uniqueid','calleridnum','calleridname','queue','queuecallerjoinAt','answertime','queuecallerleaveAt','queuecallercomplete','endtime','connectedlinename','membername','context','from-sip','holdtime','assigned','lastAssignedTo','queuecallerexitreason','COMPLETED','create','[voiceQueueReport]\x20','getContactRecallMe','[GetContactRecallMe]\x20','[rescheduleContactInQueue]\x20'];(function(_0x5f411c,_0x1e1c9b){var _0x47eb5f=function(_0x50db65){while(--_0x50db65){_0x5f411c['push'](_0x5f411c['shift']());}};_0x47eb5f(++_0x1e1c9b);}(_0xbb4a,0x181));var _0xabb4=function(_0x5c1981,_0x2836c5){_0x5c1981=_0x5c1981-0x0;var _0x3892ce=_0xbb4a[_0x5c1981];return _0x3892ce;};'use strict';var util=require(_0xabb4('0x0'));var BPromise=require(_0xabb4('0x1'));var logger=require(_0xabb4('0x2'))(_0xabb4('0x3'));var cmHopper=require('../rpc/cmHopper');var cmHopperHistory=require(_0xabb4('0x4'));var cmHopperBlack=require(_0xabb4('0x5'));var agentReportPreview=require(_0xabb4('0x6'));var voiceQueueReport=require(_0xabb4('0x7'));function loggerCatch(_0x28677d){return function(_0x6e9fef){logger[_0xabb4('0x8')](_0x28677d,util['inspect'](_0x6e9fef,{'showHidden':![],'depth':null}));};}function create(_0x2651ae){return cmHopperHistory[_0xabb4('0x9')](_0x2651ae)[_0xabb4('0xa')](loggerCatch(_0xabb4('0xb')));}function createAgent(_0x57eda7){return BPromise[_0xabb4('0xc')]()[_0xabb4('0xd')](agentReportPreview[_0xabb4('0x9')](_0x57eda7))[_0xabb4('0xa')](loggerCatch(_0xabb4('0xb')));}function moveContact(_0x429fcc){return cmHopper[_0xabb4('0xe')](_0x429fcc,!![])[_0xabb4('0xa')](loggerCatch(_0xabb4('0xf')));}exports[_0xabb4('0x10')]=function(_0x418aed){return cmHopperBlack[_0xabb4('0x10')](_0x418aed)['catch'](loggerCatch(_0xabb4('0x11')));};exports['getContactPreview']=function(_0x148868){return BPromise[_0xabb4('0xc')]()[_0xabb4('0xd')](cmHopper[_0xabb4('0x12')](_0x148868))[_0xabb4('0xa')](loggerCatch('[getContactPreview]\x20'));};exports['createHistory']=function(_0x231df8,_0x437694){create(_0x231df8)[_0xabb4('0xa')](loggerCatch(_0x437694));moveContact(_0x231df8)[_0xabb4('0xa')](loggerCatch(_0x437694));};exports[_0xabb4('0x13')]=function(_0x4609e8,_0x38b8e0){createAgent(_0x4609e8)[_0xabb4('0xa')](loggerCatch(_0x38b8e0));};exports[_0xabb4('0x14')]=function(_0x105591,_0x32c962){create(_0x105591)['catch'](loggerCatch(_0x32c962));};exports[_0xabb4('0x15')]=function(_0x155f2e,_0x38a03c){moveContact(_0x155f2e)[_0xabb4('0xa')](loggerCatch(_0x38a03c));};exports[_0xabb4('0x16')]=function(_0x133f9d,_0x21c035,_0x82e71d){if(_0x21c035){_0x133f9d[_0xabb4('0x17')]=null;}if(_0x82e71d){_0x133f9d[_0xabb4('0x18')]=![];}return cmHopper[_0xabb4('0x16')](_0x133f9d)[_0xabb4('0xa')](loggerCatch('[rescheduleContact]\x20'));};exports[_0xabb4('0x19')]=function(_0x11efb6){return cmHopper[_0xabb4('0x19')](_0x11efb6)[_0xabb4('0xa')](loggerCatch(_0xabb4('0x1a')));};exports['unlockContact']=function(_0x1e742d){return cmHopper[_0xabb4('0x1b')]({'UserId':null},_0x1e742d,0x1)[_0xabb4('0xa')](loggerCatch(_0xabb4('0x1c')));};exports[_0xabb4('0x1d')]=function(_0x57c5f6){return cmHopper[_0xabb4('0x1b')]({'active':![]},_0x57c5f6,0x1)['catch'](loggerCatch('[activeContact]\x20'));};exports[_0xabb4('0x1e')]=function(_0x50f0b4){var _0x2abc59={};_0x2abc59[_0xabb4('0x1f')]=_0x50f0b4[_0xabb4('0x1f')];_0x2abc59[_0xabb4('0x20')]=_0x50f0b4[_0xabb4('0x20')];_0x2abc59[_0xabb4('0x21')]=_0x50f0b4['calleridnum'];_0x2abc59[_0xabb4('0x22')]=_0x50f0b4['calleridname'];_0x2abc59[_0xabb4('0x23')]=_0x50f0b4[_0xabb4('0x23')];_0x2abc59[_0xabb4('0x24')]=_0x50f0b4[_0xabb4('0x25')];_0x2abc59[_0xabb4('0x26')]=_0x50f0b4[_0xabb4('0x25')];_0x2abc59[_0xabb4('0x27')]=0x1;_0x2abc59['queuecallercompleteAt']=_0x50f0b4[_0xabb4('0x28')];_0x2abc59[_0xabb4('0x29')]=_0x50f0b4[_0xabb4('0x2a')];_0x2abc59[_0xabb4('0x2b')]=_0xabb4('0x2c');_0x2abc59['exten']='xcally-motion-preview';_0x2abc59[_0xabb4('0x2d')]=0x0;_0x2abc59[_0xabb4('0x2e')]=0x1;_0x2abc59[_0xabb4('0x2f')]=_0x50f0b4[_0xabb4('0x2a')];_0x2abc59[_0xabb4('0x30')]=_0xabb4('0x31');return BPromise[_0xabb4('0xc')]()[_0xabb4('0xd')](voiceQueueReport[_0xabb4('0x32')](_0x2abc59))['catch'](loggerCatch(_0xabb4('0x33')));};exports[_0xabb4('0x34')]=function(_0x40c23a,_0x66e3c9){return BPromise['resolve']()[_0xabb4('0xd')](cmHopper[_0xabb4('0x34')](_0x40c23a,_0x66e3c9))['catch'](loggerCatch(_0xabb4('0x35')));};exports['rescheduleContactInQueue']=function(_0x15d470){return cmHopper[_0xabb4('0x16')](_0x15d470,!![],!![])['catch'](loggerCatch(_0xabb4('0x36')));};
\ No newline at end of file
index a3fcb4d..3626a50 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8ebd=['originated','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','logBlacklist','YYYY-MM-DD\x20HH:mm:ss','Blacklist','starttime','responsetime','logAgent','state','statedesc','getSeconds','UserId','logCustomer','endtime','ringtime','answertime','Failure','uniqueid','originate','channelAgent','from-sip','totalGlobal','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','cloneAction','clone','scheduledAt','scheduledat','minutes','ListId','decrementTalkink','pTalking','[decrementTalkink]\x20object\x20talking\x20is\x20negative','lastevent','queue','motionChannel','voice','mandatoryDisposition','buildObj','agentReadyId','status','getDiff','milliseconds','diff','seconds','CampaignId','filterKey','idContact','type','campaigntype','dialAnswer','callback','callbackuniqueid','callbackat','recallme','sipcallid','xmd-voicequeueid','xmd-queue','xmd-phone','xmd-listid','xmd-dialurl','xmd-dialtimeout','xmd-dialoptions','xmd-dialid','xmd-dialchannel','xmd-contactid','xmd-callerid','xmd-agiafter','xmd-agi','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','bridgepeer','getCallerIdRandom','pow','replace','random','match','noanswer','variables','keys','forEach','buildNoAnswerEventPayload','util','lodash','moment','preview','XCALLY_IP_AGI','127.0.0.1','../../dialer/utils','loggerCatch','error','inspect','logger','info','loggerError','logger2','message','getCallerId','string','isUndefined','isEmpty','format','\x22%s\x22\x20<%s>','\x22\x22\x20<>','isActive','isNil','addVariables','Queue','name','calleridname','calleridnum','ContactId','dialer','VoiceQueueId','monitor_format','U(xcally-mixmonitor-context)','dialPreviewUrl','dialQueueProject','NONE','dialQueueProject2','\x22agi://%s/square,%s\x22','originatecalleridnum','Call-Type:\x20PREVIEW','_XCALLY_MIXMONITOR_FORMAT','toLowerVariables','hasOwnProperty','toLower','updateOriginated'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x8ebd,0x16d));var _0xd8eb=function(_0x3511d3,_0x4107ae){_0x3511d3=_0x3511d3-0x0;var _0x5d6321=_0x8ebd[_0x3511d3];return _0x5d6321;};'use strict';var util=require(_0xd8eb('0x0'));var _=require(_0xd8eb('0x1'));var moment=require(_0xd8eb('0x2'));var logger=require('../../../../config/logger')(_0xd8eb('0x3'));var ipAgi=process['env'][_0xd8eb('0x4')]||_0xd8eb('0x5');var utils=require(_0xd8eb('0x6'));exports[_0xd8eb('0x7')]=function(_0x17e849){return function(_0x15e586){logger[_0xd8eb('0x8')](_0x17e849,util[_0xd8eb('0x9')](_0x15e586,{'showHidden':![],'depth':null}));};};exports[_0xd8eb('0xa')]=function(_0x39061e,_0x17f1d8){logger[_0xd8eb('0xb')](_0x39061e,util[_0xd8eb('0x9')](_0x17f1d8,{'showHidden':![],'depth':null}));};exports[_0xd8eb('0xc')]=function(_0x3b532b,_0x446f4f){logger[_0xd8eb('0x8')](_0x3b532b,util[_0xd8eb('0x9')](_0x446f4f,{'showHidden':![],'depth':null}));};exports[_0xd8eb('0xd')]=function(_0x182f48){return function(_0x35196a){logger[_0xd8eb('0xb')](_0x182f48,util[_0xd8eb('0x9')](_0x35196a,{'showHidden':![],'depth':null}));};};exports[_0xd8eb('0xe')]=function(_0x525230,_0x3b1c92,_0xfd97ba){return{'message':_0x525230,'unlock':_0x3b1c92,'active':_0xfd97ba};};exports[_0xd8eb('0xf')]=function(_0x1d0521,_0x3da35f,_0x257c6b){if(!_['isUndefined'](_0x257c6b)&&_0xd8eb('0x10')===typeof _0x257c6b&&!_['isEmpty'](_0x257c6b)){if(!_[_0xd8eb('0x11')](_0x3da35f)&&_0xd8eb('0x10')===typeof _0x3da35f&&!_[_0xd8eb('0x12')](_0x3da35f)){return util[_0xd8eb('0x13')](_0xd8eb('0x14'),_0x3da35f,_0x257c6b);}return util[_0xd8eb('0x13')]('\x22%s\x22\x20<%s>',_0x257c6b,_0x257c6b);}if(!_[_0xd8eb('0x11')](_0x1d0521)&&_0xd8eb('0x10')===typeof _0x1d0521&&!_[_0xd8eb('0x12')](_0x1d0521)){return _0x1d0521;}return _0xd8eb('0x15');};exports[_0xd8eb('0x16')]=function(_0x41e1c1){if(_[_0xd8eb('0x17')](_0x41e1c1)){return![];}return _0x41e1c1;};exports[_0xd8eb('0x18')]=function(_0x5856ad,_0x461c9f,_0x77b66b,_0x25d6eb,_0x53a23,_0x3cf7d1){var _0x5c0f2e={'XMD-QUEUE':_0x461c9f[_0xd8eb('0x19')]?_0x461c9f[_0xd8eb('0x19')][_0xd8eb('0x1a')]:'','XMD-CALLERID':_0x25d6eb,'XMD-CALLERID-PREVIEW':_0x3cf7d1?util[_0xd8eb('0x13')]('\x22%s\x22\x20<%s>',_0x3cf7d1[_0xd8eb('0x1b')],_0x3cf7d1[_0xd8eb('0x1c')]):_0x25d6eb,'XMD-DIALID':_0x53a23,'XMD-CONTACTID':_0x461c9f[_0xd8eb('0x1d')],'XMD-CDRTYPE':_0xd8eb('0x1e'),'CALLERID(all)':_0x25d6eb,'XMD-VOICEQUEUEID':_0x461c9f[_0xd8eb('0x1f')],'XMD-DIALCHANNEL':_0x77b66b,'XMD-DIALTIMEOUT':_0x5856ad['dialOriginateTimeout']||0x1e,'XMD-DIALOPTIONS':util[_0xd8eb('0x13')]('\x22rtTxX%s%s\x22',_0x5856ad['dialQueueProject2']?'g':'',_[_0xd8eb('0x12')](_0x5856ad[_0xd8eb('0x20')])?'':_0xd8eb('0x21')),'XMD-DIALURL':_0x5856ad[_0xd8eb('0x22')]||'','XMD-AGI':_0x5856ad[_0xd8eb('0x23')]?util[_0xd8eb('0x13')]('\x22agi://%s/square,%s\x22',ipAgi,_0x5856ad[_0xd8eb('0x23')]):_0xd8eb('0x24'),'XMD-AGIAFTER':_0x5856ad[_0xd8eb('0x25')]?util[_0xd8eb('0x13')](_0xd8eb('0x26'),ipAgi,_0x5856ad[_0xd8eb('0x25')]):_0xd8eb('0x24'),'XMD-ORIGINATECALLERIDNUM':_0x3cf7d1?_0x3cf7d1[_0xd8eb('0x27')]:'','XMD-ORIGINATECALLERIDNAME':_0x3cf7d1?_0x3cf7d1['originatecalleridname']:'','XMD-DESTINATION':'xcally-motion-preview','SIPADDHEADER':_0xd8eb('0x28')};if(!_['isEmpty'](_0x5856ad[_0xd8eb('0x20')])){_0x5c0f2e[util['format']('%s',_0xd8eb('0x29'))]=_0x5856ad[_0xd8eb('0x20')];_0x5c0f2e[util[_0xd8eb('0x13')]('%s','_XCALLY_MIXMONITOR_UNIQUEID')]=_0x53a23;}return _0x5c0f2e;};exports[_0xd8eb('0x2a')]=function(_0x1f07d3){var _0x5d72d8={};for(var _0x3ce6be in _0x1f07d3){if(_0x1f07d3[_0xd8eb('0x2b')](_0x3ce6be)){_0x5d72d8[util[_0xd8eb('0x13')]('%s',_[_0xd8eb('0x2c')](_0x3ce6be))]=_0x1f07d3[_0x3ce6be];}}return{'variables':_0x5d72d8};};exports[_0xd8eb('0x2d')]=function(_0xd279e0,_0x115ad8){if(!_['isNil'](_0xd279e0)){if(_0xd279e0['hasOwnProperty']('originated')){if(_0xd279e0[_0xd8eb('0x2e')]>0x0){_0xd279e0[_0xd8eb('0x2e')]-=0x1;}else{logger['error'](_0xd8eb('0x2f'),_0x115ad8);}}}else{logger[_0xd8eb('0x8')](_0xd8eb('0x30'),_0x115ad8);}};exports[_0xd8eb('0x31')]=function(_0xc6617d){var _0x4c8926=moment()[_0xd8eb('0x13')](_0xd8eb('0x32'));_0xc6617d['state']=0xd;_0xc6617d['statedesc']=_0xd8eb('0x33');_0xc6617d[_0xd8eb('0x34')]=_0x4c8926;_0xc6617d[_0xd8eb('0x35')]=_0x4c8926;_0xc6617d['endtime']=_0x4c8926;};exports[_0xd8eb('0x36')]=function(_0x171a53,_0x2962ac,_0x30b72d){var _0x39725a=moment()[_0xd8eb('0x13')](_0xd8eb('0x32'));_0x171a53[_0xd8eb('0x37')]=_0x2962ac;_0x171a53[_0xd8eb('0x38')]=_0x30b72d;_0x171a53[_0xd8eb('0x35')]=_0x39725a;_0x171a53['ringtime']=utils[_0xd8eb('0x39')](_0x171a53[_0xd8eb('0x35')],_0x171a53[_0xd8eb('0x34')]);};exports['logLookAgent']=function(_0x52d9ba,_0x46b826,_0x5bedea){_0x52d9ba['membername']=_0x46b826;_0x52d9ba[_0xd8eb('0x3a')]=_0x5bedea;};exports[_0xd8eb('0x3b')]=function(_0x2a3770,_0x116364,_0x52f940){var _0x3e2d71=moment()[_0xd8eb('0x13')](_0xd8eb('0x32'));_0x2a3770['state']=_0x116364;_0x2a3770[_0xd8eb('0x38')]=_0x52f940;_0x2a3770[_0xd8eb('0x35')]=_0x2a3770[_0xd8eb('0x35')]?_0x2a3770['responsetime']:_0x3e2d71;_0x2a3770[_0xd8eb('0x3c')]=_0x2a3770[_0xd8eb('0x3c')]?_0x2a3770[_0xd8eb('0x3c')]:_0x3e2d71;_0x2a3770[_0xd8eb('0x3d')]=utils[_0xd8eb('0x39')](_0x2a3770[_0xd8eb('0x35')]||0x0,_0x2a3770[_0xd8eb('0x34')]||0x0);_0x2a3770['talktime']=_0x2a3770['answertime']?utils['getSeconds'](_0x2a3770[_0xd8eb('0x3c')],_0x2a3770[_0xd8eb('0x3e')]):0x0;};exports['isFailure']=function(_0x32f90c){return _0x32f90c===_0xd8eb('0x3f');};exports['variablesAction']=function(_0x425296,_0x4b9305,_0x8ec661,_0x1071c5,_0x5c1551){var _0x3ab1b8=_0x1071c5?'RECALL':_0x425296['calleridname'];_0x3ab1b8=_0x5c1551?'BOOKED':_0x3ab1b8;return{'actionid':_0x425296[_0xd8eb('0x40')],'action':_0xd8eb('0x41'),'channel':_0x425296[_0xd8eb('0x42')],'callerid':util[_0xd8eb('0x13')](_0xd8eb('0x14'),_0x3ab1b8,_0x425296[_0xd8eb('0x1c')]),'Exten':'xcally-motion-preview','Context':_0xd8eb('0x43'),'Priority':'1','variable':_0x8ec661,'timeout':(_0x4b9305['timeout']||0x1e)*0x3e8,'async':!![],'channelid':_0x425296['uniqueid']};};exports[_0xd8eb('0x44')]=function(_0x5304e0){return _0x5304e0[_0xd8eb('0x45')]+_0x5304e0[_0xd8eb('0x46')]+_0x5304e0[_0xd8eb('0x47')]+_0x5304e0['countagentrejectretry']+_0x5304e0[_0xd8eb('0x48')];};exports[_0xd8eb('0x49')]=function(_0x27b219){var _0x41e073=_[_0xd8eb('0x4a')](_0x27b219);_0x41e073[_0xd8eb('0x37')]=0xf;_0x41e073[_0xd8eb('0x38')]='Global';return _0x41e073;};exports[_0xd8eb('0x4b')]=function(_0x919258,_0x26fe55,_0x40ee38){var _0x2b56da={};_0x2b56da[_0x26fe55]=_0x919258[_0x26fe55];_0x2b56da['active']=![];_0x2b56da[_0xd8eb('0x4c')]=moment()['add'](_0x40ee38,_0xd8eb('0x4d'))[_0xd8eb('0x13')](_0xd8eb('0x32'));_0x2b56da[_0xd8eb('0x1d')]=_0x919258[_0xd8eb('0x1d')];_0x2b56da[_0xd8eb('0x4e')]=_0x919258[_0xd8eb('0x4e')];_0x2b56da[_0xd8eb('0x1f')]=_0x919258['VoiceQueueId']||undefined;return _0x2b56da;};exports[_0xd8eb('0x4f')]=function(_0x4ac3e3,_0x3a447f){if(!_[_0xd8eb('0x17')](_0x4ac3e3)){if(_0x4ac3e3['pTalking']>0x0){_0x4ac3e3[_0xd8eb('0x50')]-=0x1;}else{logger[_0xd8eb('0x8')](_0x3a447f,_0xd8eb('0x51'));}}else{logger['error'](_0x3a447f,'[decrementTalkink]\x20is\x20null\x20or\x20undefined');}};exports['IsNotLoggedIn']=function(_0x417456){if(_0x417456<=0x0){return!![];}return![];};function buildObj(_0x5dc90b,_0x433029,_0x47c52d){_0x5dc90b[_0xd8eb('0x52')]=_0x433029;_0x5dc90b[_0xd8eb('0x1a')]=_0x5dc90b[_0xd8eb('0x53')];_0x5dc90b['interface']=_0x5dc90b['channelAgent'];_0x5dc90b[_0xd8eb('0x54')]=_0xd8eb('0x55');if(_0x47c52d){_0x5dc90b[_0xd8eb('0x56')]=_0x47c52d[_0xd8eb('0x56')];}return _0x5dc90b;}exports[_0xd8eb('0x57')]=buildObj;exports[_0xd8eb('0x58')]=function(_0x43d44e){var _0x253134=[];for(var _0x25829e in _0x43d44e){if(_0x43d44e['hasOwnProperty'](_0x25829e)){if(!_[_0xd8eb('0x17')](_0x43d44e[_0x25829e])&&_0x43d44e[_0x25829e]['state']==='not_inuse'&&_0x43d44e[_0x25829e][_0xd8eb('0x59')]==='reachable'){_0x253134['push'](_0x43d44e[_0x25829e]['id']);}}}return _0x253134;};exports[_0xd8eb('0x5a')]=function(_0x1646ec){var _0x19b419=moment()[_0xd8eb('0x5b')](0x0);var _0x2ea444=moment(_0x1646ec)['milliseconds'](0x0);return _0x19b419[_0xd8eb('0x5c')](_0x2ea444,_0xd8eb('0x5d'));};exports['createBody']=function(_0x458cf4){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0x458cf4[_0xd8eb('0x1d')],'ListId':_0x458cf4[_0xd8eb('0x4e')],'VoiceQueueId':_0x458cf4[_0xd8eb('0x1f')]||undefined,'CampaignId':_0x458cf4[_0xd8eb('0x5e')]||undefined};};exports[_0xd8eb('0x5f')]=function(_0x18340f){if(_0x18340f==='uniqueid'||_0x18340f===_0xd8eb('0x60')||_0x18340f===_0xd8eb('0x53')||_0x18340f===_0xd8eb('0x61')||_0x18340f===_0xd8eb('0x62')||_0x18340f===_0xd8eb('0x63')||_0x18340f==='membername'||_0x18340f===_0xd8eb('0x42')||_0x18340f===_0xd8eb('0x1b')||_0x18340f==='active'||_0x18340f===_0xd8eb('0x1c')||_0x18340f===_0xd8eb('0x4c')||_0x18340f==='countbusyretry'||_0x18340f===_0xd8eb('0x46')||_0x18340f===_0xd8eb('0x47')||_0x18340f==='countglobal'||_0x18340f===_0xd8eb('0x64')||_0x18340f===_0xd8eb('0x65')||_0x18340f===_0xd8eb('0x66')||_0x18340f===_0xd8eb('0x67')||_0x18340f===_0xd8eb('0x1d')||_0x18340f==='ListId'||_0x18340f==='UserId'||_0x18340f===_0xd8eb('0x1f')||_0x18340f===_0xd8eb('0x68')||_0x18340f===_0xd8eb('0x69')||_0x18340f===_0xd8eb('0x6a')||_0x18340f===_0xd8eb('0x6b')||_0x18340f===_0xd8eb('0x6c')||_0x18340f===_0xd8eb('0x6d')||_0x18340f===_0xd8eb('0x6e')||_0x18340f===_0xd8eb('0x6f')||_0x18340f===_0xd8eb('0x70')||_0x18340f===_0xd8eb('0x71')||_0x18340f===_0xd8eb('0x72')||_0x18340f==='xmd-cdrtype'||_0x18340f===_0xd8eb('0x73')||_0x18340f===_0xd8eb('0x74')||_0x18340f===_0xd8eb('0x75')||_0x18340f===_0xd8eb('0x76')||_0x18340f===_0xd8eb('0x77')||_0x18340f===_0xd8eb('0x78')||_0x18340f===_0xd8eb('0x79')||_0x18340f===_0xd8eb('0x7a')||_0x18340f===_0xd8eb('0x7b')||_0x18340f===_0xd8eb('0x7c')||_0x18340f==='rtpaudioqosrttbridged'||_0x18340f==='rtpaudioqos'||_0x18340f==='rtpaudioqosbridged'||_0x18340f===_0xd8eb('0x78')||_0x18340f==='rtpaudioqosjitterbridged'||_0x18340f==='rtpaudioqosloss'||_0x18340f==='rtpaudioqoslossbridged'||_0x18340f===_0xd8eb('0x7c')||_0x18340f===_0xd8eb('0x7d')||_0x18340f===_0xd8eb('0x7e')||_0x18340f==='bridgepvtcallid'||_0x18340f===_0xd8eb('0x37')||_0x18340f===_0xd8eb('0x38')){return![];}return!![];};exports[_0xd8eb('0x7f')]=function(_0x25535f,_0x41c452){var _0x2ddcf3,_0x632821,_0x2f2ce9;if(_0x41c452<=0x0){_0x41c452=0x1;}_0x2ddcf3=new RegExp('\x5cw{0,'+_0x41c452+'}$');_0x632821=Math['pow'](0xa,_0x41c452-0x1);_0x2f2ce9=Math[_0xd8eb('0x80')](0xa,_0x41c452)-0x1;return util[_0xd8eb('0x13')]('%s',_[_0xd8eb('0x81')](_0x25535f,_0x2ddcf3,_[_0xd8eb('0x82')](_0x632821,_0x2f2ce9)));};exports['extractCalleridName']=function(_0x494dc0){var _0x5dbc1e=_0x494dc0[_0xd8eb('0x83')](/"(.*?)"/);return _0x5dbc1e?_0x5dbc1e[0x1]:_0x494dc0;};exports['extractCalleridNumber']=function(_0x552876){var _0x558468=_0x552876[_0xd8eb('0x83')](/<(.*?)>/);return _0x558468?_0x558468[0x1]:_0x552876;};function buildNoAnswerEventPayload(_0x4f44cc,_0x4d784f){var _0x2048e3=buildObj(_0x4f44cc,_0xd8eb('0x84'));if(!_['isEmpty'](_0x4d784f[_0xd8eb('0x85')])){Object[_0xd8eb('0x86')](_0x4d784f[_0xd8eb('0x85')])[_0xd8eb('0x87')](function(_0x4cb8e1){_0x2048e3[_0x4cb8e1['toLowerCase']()]=_0x4d784f['variables'][_0x4cb8e1];});}return _0x2048e3;}exports[_0xd8eb('0x88')]=buildNoAnswerEventPayload;
\ No newline at end of file
+var _0xde33=['diff','createBody','CampaignId','filterKey','idContact','type','campaigntype','dialAnswer','active','scheduledat','countbusyretry','countcongestionretry','countglobal','callbackuniqueid','callbackat','recallme','sipcallid','xmd-queue','xmd-phone','xmd-listid','xmd-dialurl','xmd-dialtimeout','xmd-dialoptions','xmd-dialid','xmd-dialchannel','xmd-callerid','xmd-agiafter','xmd-agi','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','rtpaudioqos','bridgepeer','bridgepvtcallid','\x5cw{0,','pow','extractCalleridNumber','match','noanswer','variables','toLowerCase','util','lodash','moment','preview','env','XCALLY_IP_AGI','127.0.0.1','logger','info','inspect','loggerError','logger2','message','getCallerId','isUndefined','string','isEmpty','format','\x22%s\x22\x20<%s>','\x22\x22\x20<>','isActive','isNil','addVariables','Queue','name','calleridnum','ContactId','dialer','dialOriginateTimeout','\x22rtTxX%s%s\x22','dialQueueProject2','monitor_format','U(xcally-mixmonitor-context)','dialPreviewUrl','\x22agi://%s/square,%s\x22','dialQueueProject','NONE','originatecalleridnum','originatecalleridname','Call-Type:\x20PREVIEW','_XCALLY_MIXMONITOR_FORMAT','_XCALLY_MIXMONITOR_UNIQUEID','toLowerVariables','hasOwnProperty','originated','error','[updateOriginated]\x20is\x20null\x20or\x20undefined','logBlacklist','YYYY-MM-DD\x20HH:mm:ss','state','statedesc','Blacklist','starttime','responsetime','logAgent','ringtime','logLookAgent','membername','UserId','logCustomer','endtime','getSeconds','talktime','answertime','isFailure','Failure','variablesAction','calleridname','originate','channelAgent','xcally-motion-preview','from-sip','timeout','uniqueid','totalGlobal','countnoanswerretry','countagentrejectretry','countnosuchnumberretry','cloneAction','clone','Global','add','minutes','ListId','VoiceQueueId','pTalking','lastevent','queue','interface','motionChannel','voice','mandatoryDisposition','buildObj','agentReadyId','status','reachable','push','getDiff','milliseconds'];(function(_0x405c62,_0x36f70b){var _0x3fb841=function(_0x244213){while(--_0x244213){_0x405c62['push'](_0x405c62['shift']());}};_0x3fb841(++_0x36f70b);}(_0xde33,0x14d));var _0x3de3=function(_0x452602,_0x1ceb2b){_0x452602=_0x452602-0x0;var _0x5b940c=_0xde33[_0x452602];return _0x5b940c;};'use strict';var util=require(_0x3de3('0x0'));var _=require(_0x3de3('0x1'));var moment=require(_0x3de3('0x2'));var logger=require('../../../../config/logger')(_0x3de3('0x3'));var ipAgi=process[_0x3de3('0x4')][_0x3de3('0x5')]||_0x3de3('0x6');var utils=require('../../dialer/utils');exports['loggerCatch']=function(_0x4eedba){return function(_0x580d91){logger['error'](_0x4eedba,util['inspect'](_0x580d91,{'showHidden':![],'depth':null}));};};exports[_0x3de3('0x7')]=function(_0x46848c,_0x365e0c){logger[_0x3de3('0x8')](_0x46848c,util[_0x3de3('0x9')](_0x365e0c,{'showHidden':![],'depth':null}));};exports[_0x3de3('0xa')]=function(_0x188171,_0xa79251){logger['error'](_0x188171,util[_0x3de3('0x9')](_0xa79251,{'showHidden':![],'depth':null}));};exports[_0x3de3('0xb')]=function(_0x9b6a10){return function(_0x42914b){logger[_0x3de3('0x8')](_0x9b6a10,util[_0x3de3('0x9')](_0x42914b,{'showHidden':![],'depth':null}));};};exports[_0x3de3('0xc')]=function(_0x39e5b3,_0x4903f2,_0x421338){return{'message':_0x39e5b3,'unlock':_0x4903f2,'active':_0x421338};};exports[_0x3de3('0xd')]=function(_0x3e4e61,_0x4098ba,_0xfc950c){if(!_[_0x3de3('0xe')](_0xfc950c)&&_0x3de3('0xf')===typeof _0xfc950c&&!_[_0x3de3('0x10')](_0xfc950c)){if(!_[_0x3de3('0xe')](_0x4098ba)&&_0x3de3('0xf')===typeof _0x4098ba&&!_['isEmpty'](_0x4098ba)){return util[_0x3de3('0x11')](_0x3de3('0x12'),_0x4098ba,_0xfc950c);}return util[_0x3de3('0x11')](_0x3de3('0x12'),_0xfc950c,_0xfc950c);}if(!_['isUndefined'](_0x3e4e61)&&_0x3de3('0xf')===typeof _0x3e4e61&&!_[_0x3de3('0x10')](_0x3e4e61)){return _0x3e4e61;}return _0x3de3('0x13');};exports[_0x3de3('0x14')]=function(_0x32b70f){if(_[_0x3de3('0x15')](_0x32b70f)){return![];}return _0x32b70f;};exports[_0x3de3('0x16')]=function(_0x298d4d,_0x24bc36,_0x4f2fed,_0x26d88f,_0x5c5adf,_0x3b8cd9){var _0x24aac5={'XMD-QUEUE':_0x24bc36[_0x3de3('0x17')]?_0x24bc36['Queue'][_0x3de3('0x18')]:'','XMD-CALLERID':_0x26d88f,'XMD-CALLERID-PREVIEW':_0x3b8cd9?util[_0x3de3('0x11')](_0x3de3('0x12'),_0x3b8cd9['calleridname'],_0x3b8cd9[_0x3de3('0x19')]):_0x26d88f,'XMD-DIALID':_0x5c5adf,'XMD-CONTACTID':_0x24bc36[_0x3de3('0x1a')],'XMD-CDRTYPE':_0x3de3('0x1b'),'CALLERID(all)':_0x26d88f,'XMD-VOICEQUEUEID':_0x24bc36['VoiceQueueId'],'XMD-DIALCHANNEL':_0x4f2fed,'XMD-DIALTIMEOUT':_0x298d4d[_0x3de3('0x1c')]||0x1e,'XMD-DIALOPTIONS':util[_0x3de3('0x11')](_0x3de3('0x1d'),_0x298d4d[_0x3de3('0x1e')]?'g':'',_[_0x3de3('0x10')](_0x298d4d[_0x3de3('0x1f')])?'':_0x3de3('0x20')),'XMD-DIALURL':_0x298d4d[_0x3de3('0x21')]||'','XMD-AGI':_0x298d4d['dialQueueProject']?util['format'](_0x3de3('0x22'),ipAgi,_0x298d4d[_0x3de3('0x23')]):_0x3de3('0x24'),'XMD-AGIAFTER':_0x298d4d[_0x3de3('0x1e')]?util[_0x3de3('0x11')]('\x22agi://%s/square,%s\x22',ipAgi,_0x298d4d[_0x3de3('0x1e')]):_0x3de3('0x24'),'XMD-ORIGINATECALLERIDNUM':_0x3b8cd9?_0x3b8cd9[_0x3de3('0x25')]:'','XMD-ORIGINATECALLERIDNAME':_0x3b8cd9?_0x3b8cd9[_0x3de3('0x26')]:'','XMD-DESTINATION':'xcally-motion-preview','SIPADDHEADER':_0x3de3('0x27')};if(!_[_0x3de3('0x10')](_0x298d4d[_0x3de3('0x1f')])){_0x24aac5[util[_0x3de3('0x11')]('%s',_0x3de3('0x28'))]=_0x298d4d[_0x3de3('0x1f')];_0x24aac5[util[_0x3de3('0x11')]('%s',_0x3de3('0x29'))]=_0x5c5adf;}return _0x24aac5;};exports[_0x3de3('0x2a')]=function(_0x4548f5){var _0x16d3ec={};for(var _0x515bc2 in _0x4548f5){if(_0x4548f5[_0x3de3('0x2b')](_0x515bc2)){_0x16d3ec[util[_0x3de3('0x11')]('%s',_['toLower'](_0x515bc2))]=_0x4548f5[_0x515bc2];}}return{'variables':_0x16d3ec};};exports['updateOriginated']=function(_0x4105c6,_0x45ed1b){if(!_['isNil'](_0x4105c6)){if(_0x4105c6['hasOwnProperty'](_0x3de3('0x2c'))){if(_0x4105c6['originated']>0x0){_0x4105c6[_0x3de3('0x2c')]-=0x1;}else{logger[_0x3de3('0x2d')]('[updateOriginated]\x20object\x20originated\x20is\x20negative',_0x45ed1b);}}}else{logger[_0x3de3('0x2d')](_0x3de3('0x2e'),_0x45ed1b);}};exports[_0x3de3('0x2f')]=function(_0x258208){var _0x542af4=moment()[_0x3de3('0x11')](_0x3de3('0x30'));_0x258208[_0x3de3('0x31')]=0xd;_0x258208[_0x3de3('0x32')]=_0x3de3('0x33');_0x258208[_0x3de3('0x34')]=_0x542af4;_0x258208[_0x3de3('0x35')]=_0x542af4;_0x258208['endtime']=_0x542af4;};exports[_0x3de3('0x36')]=function(_0x351504,_0x1c4b2f,_0x2f3047){var _0x2998db=moment()[_0x3de3('0x11')](_0x3de3('0x30'));_0x351504[_0x3de3('0x31')]=_0x1c4b2f;_0x351504[_0x3de3('0x32')]=_0x2f3047;_0x351504['responsetime']=_0x2998db;_0x351504[_0x3de3('0x37')]=utils['getSeconds'](_0x351504['responsetime'],_0x351504[_0x3de3('0x34')]);};exports[_0x3de3('0x38')]=function(_0x373673,_0x8ec97a,_0x225611){_0x373673[_0x3de3('0x39')]=_0x8ec97a;_0x373673[_0x3de3('0x3a')]=_0x225611;};exports[_0x3de3('0x3b')]=function(_0x1c7ec4,_0x1acfe1,_0x3cfa72){var _0x51e2ee=moment()[_0x3de3('0x11')](_0x3de3('0x30'));_0x1c7ec4['state']=_0x1acfe1;_0x1c7ec4['statedesc']=_0x3cfa72;_0x1c7ec4[_0x3de3('0x35')]=_0x1c7ec4[_0x3de3('0x35')]?_0x1c7ec4[_0x3de3('0x35')]:_0x51e2ee;_0x1c7ec4[_0x3de3('0x3c')]=_0x1c7ec4[_0x3de3('0x3c')]?_0x1c7ec4[_0x3de3('0x3c')]:_0x51e2ee;_0x1c7ec4[_0x3de3('0x37')]=utils[_0x3de3('0x3d')](_0x1c7ec4[_0x3de3('0x35')]||0x0,_0x1c7ec4[_0x3de3('0x34')]||0x0);_0x1c7ec4[_0x3de3('0x3e')]=_0x1c7ec4[_0x3de3('0x3f')]?utils[_0x3de3('0x3d')](_0x1c7ec4[_0x3de3('0x3c')],_0x1c7ec4[_0x3de3('0x3f')]):0x0;};exports[_0x3de3('0x40')]=function(_0x45095d){return _0x45095d===_0x3de3('0x41');};exports[_0x3de3('0x42')]=function(_0x247310,_0x3be376,_0x5f1fd7,_0x4351ef,_0x342876){var _0x2c2849=_0x4351ef?'RECALL':_0x247310[_0x3de3('0x43')];_0x2c2849=_0x342876?'BOOKED':_0x2c2849;return{'actionid':_0x247310['uniqueid'],'action':_0x3de3('0x44'),'channel':_0x247310[_0x3de3('0x45')],'callerid':util[_0x3de3('0x11')]('\x22%s\x22\x20<%s>',_0x2c2849,_0x247310[_0x3de3('0x19')]),'Exten':_0x3de3('0x46'),'Context':_0x3de3('0x47'),'Priority':'1','variable':_0x5f1fd7,'timeout':(_0x3be376[_0x3de3('0x48')]||0x1e)*0x3e8,'async':!![],'channelid':_0x247310[_0x3de3('0x49')]};};exports[_0x3de3('0x4a')]=function(_0x20390f){return _0x20390f['countbusyretry']+_0x20390f['countcongestionretry']+_0x20390f[_0x3de3('0x4b')]+_0x20390f[_0x3de3('0x4c')]+_0x20390f[_0x3de3('0x4d')];};exports[_0x3de3('0x4e')]=function(_0x8bf44e){var _0x4e3bb6=_[_0x3de3('0x4f')](_0x8bf44e);_0x4e3bb6[_0x3de3('0x31')]=0xf;_0x4e3bb6[_0x3de3('0x32')]=_0x3de3('0x50');return _0x4e3bb6;};exports['scheduledAt']=function(_0x2119f0,_0x242c7d,_0x546a08){var _0x569eaf={};_0x569eaf[_0x242c7d]=_0x2119f0[_0x242c7d];_0x569eaf['active']=![];_0x569eaf['scheduledat']=moment()[_0x3de3('0x51')](_0x546a08,_0x3de3('0x52'))[_0x3de3('0x11')](_0x3de3('0x30'));_0x569eaf['ContactId']=_0x2119f0[_0x3de3('0x1a')];_0x569eaf[_0x3de3('0x53')]=_0x2119f0[_0x3de3('0x53')];_0x569eaf[_0x3de3('0x54')]=_0x2119f0[_0x3de3('0x54')]||undefined;return _0x569eaf;};exports['decrementTalkink']=function(_0x9bce47,_0x39f3d7){if(!_[_0x3de3('0x15')](_0x9bce47)){if(_0x9bce47[_0x3de3('0x55')]>0x0){_0x9bce47[_0x3de3('0x55')]-=0x1;}else{logger['error'](_0x39f3d7,'[decrementTalkink]\x20object\x20talking\x20is\x20negative');}}else{logger[_0x3de3('0x2d')](_0x39f3d7,'[decrementTalkink]\x20is\x20null\x20or\x20undefined');}};exports['IsNotLoggedIn']=function(_0x594053){if(_0x594053<=0x0){return!![];}return![];};function buildObj(_0x792670,_0x5905cf,_0x436533){_0x792670[_0x3de3('0x56')]=_0x5905cf;_0x792670[_0x3de3('0x18')]=_0x792670[_0x3de3('0x57')];_0x792670[_0x3de3('0x58')]=_0x792670[_0x3de3('0x45')];_0x792670[_0x3de3('0x59')]=_0x3de3('0x5a');if(_0x436533){_0x792670[_0x3de3('0x5b')]=_0x436533[_0x3de3('0x5b')];}return _0x792670;}exports[_0x3de3('0x5c')]=buildObj;exports[_0x3de3('0x5d')]=function(_0x3a7779){var _0x40f475=[];for(var _0x146bff in _0x3a7779){if(_0x3a7779[_0x3de3('0x2b')](_0x146bff)){if(!_['isNil'](_0x3a7779[_0x146bff])&&_0x3a7779[_0x146bff][_0x3de3('0x31')]==='not_inuse'&&_0x3a7779[_0x146bff][_0x3de3('0x5e')]===_0x3de3('0x5f')){_0x40f475[_0x3de3('0x60')](_0x3a7779[_0x146bff]['id']);}}}return _0x40f475;};exports[_0x3de3('0x61')]=function(_0x6bd4ef){var _0x461f9e=moment()[_0x3de3('0x62')](0x0);var _0x4e6b32=moment(_0x6bd4ef)['milliseconds'](0x0);return _0x461f9e[_0x3de3('0x63')](_0x4e6b32,'seconds');};exports[_0x3de3('0x64')]=function(_0x2e6b64){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0x2e6b64[_0x3de3('0x1a')],'ListId':_0x2e6b64[_0x3de3('0x53')],'VoiceQueueId':_0x2e6b64['VoiceQueueId']||undefined,'CampaignId':_0x2e6b64[_0x3de3('0x65')]||undefined};};exports[_0x3de3('0x66')]=function(_0x23c13d){if(_0x23c13d===_0x3de3('0x49')||_0x23c13d===_0x3de3('0x67')||_0x23c13d==='queue'||_0x23c13d===_0x3de3('0x68')||_0x23c13d===_0x3de3('0x69')||_0x23c13d===_0x3de3('0x6a')||_0x23c13d===_0x3de3('0x39')||_0x23c13d===_0x3de3('0x45')||_0x23c13d===_0x3de3('0x43')||_0x23c13d===_0x3de3('0x6b')||_0x23c13d===_0x3de3('0x19')||_0x23c13d===_0x3de3('0x6c')||_0x23c13d===_0x3de3('0x6d')||_0x23c13d===_0x3de3('0x6e')||_0x23c13d===_0x3de3('0x4b')||_0x23c13d===_0x3de3('0x6f')||_0x23c13d==='callback'||_0x23c13d===_0x3de3('0x70')||_0x23c13d===_0x3de3('0x71')||_0x23c13d===_0x3de3('0x72')||_0x23c13d==='ContactId'||_0x23c13d===_0x3de3('0x53')||_0x23c13d===_0x3de3('0x3a')||_0x23c13d==='VoiceQueueId'||_0x23c13d===_0x3de3('0x73')||_0x23c13d==='xmd-voicequeueid'||_0x23c13d===_0x3de3('0x74')||_0x23c13d===_0x3de3('0x75')||_0x23c13d===_0x3de3('0x76')||_0x23c13d===_0x3de3('0x77')||_0x23c13d===_0x3de3('0x78')||_0x23c13d===_0x3de3('0x79')||_0x23c13d===_0x3de3('0x7a')||_0x23c13d===_0x3de3('0x7b')||_0x23c13d==='xmd-contactid'||_0x23c13d==='xmd-cdrtype'||_0x23c13d===_0x3de3('0x7c')||_0x23c13d===_0x3de3('0x7d')||_0x23c13d===_0x3de3('0x7e')||_0x23c13d==='rtpaudioqos'||_0x23c13d===_0x3de3('0x7f')||_0x23c13d===_0x3de3('0x80')||_0x23c13d===_0x3de3('0x81')||_0x23c13d===_0x3de3('0x82')||_0x23c13d===_0x3de3('0x83')||_0x23c13d===_0x3de3('0x84')||_0x23c13d===_0x3de3('0x85')||_0x23c13d===_0x3de3('0x86')||_0x23c13d===_0x3de3('0x7f')||_0x23c13d===_0x3de3('0x80')||_0x23c13d==='rtpaudioqosjitterbridged'||_0x23c13d===_0x3de3('0x82')||_0x23c13d==='rtpaudioqoslossbridged'||_0x23c13d==='rtpaudioqosrtt'||_0x23c13d==='rtpaudioqosrttbridged'||_0x23c13d===_0x3de3('0x87')||_0x23c13d===_0x3de3('0x88')||_0x23c13d===_0x3de3('0x31')||_0x23c13d===_0x3de3('0x32')){return![];}return!![];};exports['getCallerIdRandom']=function(_0x5ef170,_0x421aa3){var _0x507ac7,_0x545c50,_0x47ebfa;if(_0x421aa3<=0x0){_0x421aa3=0x1;}_0x507ac7=new RegExp(_0x3de3('0x89')+_0x421aa3+'}$');_0x545c50=Math[_0x3de3('0x8a')](0xa,_0x421aa3-0x1);_0x47ebfa=Math['pow'](0xa,_0x421aa3)-0x1;return util[_0x3de3('0x11')]('%s',_['replace'](_0x5ef170,_0x507ac7,_['random'](_0x545c50,_0x47ebfa)));};exports['extractCalleridName']=function(_0x517261){var _0x2fb00b=_0x517261['match'](/"(.*?)"/);return _0x2fb00b?_0x2fb00b[0x1]:_0x517261;};exports[_0x3de3('0x8b')]=function(_0x5b33ac){var _0x305fe2=_0x5b33ac[_0x3de3('0x8c')](/<(.*?)>/);return _0x305fe2?_0x305fe2[0x1]:_0x5b33ac;};function buildNoAnswerEventPayload(_0x23ed4f,_0x129137){var _0x48ca62=buildObj(_0x23ed4f,_0x3de3('0x8d'));if(!_['isEmpty'](_0x129137[_0x3de3('0x8e')])){Object['keys'](_0x129137[_0x3de3('0x8e')])['forEach'](function(_0x5df3b0){_0x48ca62[_0x5df3b0[_0x3de3('0x8f')]()]=_0x129137[_0x3de3('0x8e')][_0x5df3b0];});}return _0x48ca62;}exports['buildNoAnswerEventPayload']=buildNoAnswerEventPayload;
\ No newline at end of file
index a798f15..3f07e61 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x03d2=['voicequeuechannelredirect','string','boolean','queueremove','reload','voicequeuechannel','voicechannel','voicequeuechannelhangup'];(function(_0x55abd9,_0x1148af){var _0x3e5669=function(_0x6f2105){while(--_0x6f2105){_0x55abd9['push'](_0x55abd9['shift']());}};_0x3e5669(++_0x1148af);}(_0x03d2,0x159));var _0x203d=function(_0x4d1e37,_0xe9c46){_0x4d1e37=_0x4d1e37-0x0;var _0x5b7292=_0x03d2[_0x4d1e37];return _0x5b7292;};'use strict';exports['queueadd']={'queue':{'type':_0x203d('0x0'),'required':!![]},'interface':{'type':_0x203d('0x0'),'required':!![]},'membername':{'type':_0x203d('0x0'),'required':!![]},'penalty':{'type':'number','required':![]},'paused':{'type':_0x203d('0x1'),'required':![]}};exports[_0x203d('0x2')]={'queue':{'type':_0x203d('0x0'),'required':!![]},'interface':{'type':_0x203d('0x0'),'required':!![]}};exports['queuepause']={'interface':{'type':_0x203d('0x0'),'required':!![]},'paused':{'type':'boolean'},'reason':{'type':'string','required':![]}};exports[_0x203d('0x3')]={'module':{'type':_0x203d('0x0'),'required':![]}};exports[_0x203d('0x4')]={'uniqueid':{'type':'string','required':!![]}};exports[_0x203d('0x5')]={'uniqueid':{'type':'string','required':!![]},'filename':{'type':'string'},'format':{'type':'string'},'mixmonitorid':{'type':_0x203d('0x0')}};exports[_0x203d('0x6')]={'uniqueid':{'type':_0x203d('0x0'),'required':!![]}};exports[_0x203d('0x7')]={'uniqueid':{'type':_0x203d('0x0'),'required':!![]},'exten':{'type':'string','required':!![]},'context':{'type':'string'}};
\ No newline at end of file
+var _0x9b46=['queueadd','string','number','boolean','queueremove','queuepause','voicechannel','voicequeuechannelhangup','voicequeuechannelredirect'];(function(_0x4d72d1,_0x23e4e6){var _0x2dcaff=function(_0x3b7088){while(--_0x3b7088){_0x4d72d1['push'](_0x4d72d1['shift']());}};_0x2dcaff(++_0x23e4e6);}(_0x9b46,0xea));var _0x69b4=function(_0x2d4958,_0x46806d){_0x2d4958=_0x2d4958-0x0;var _0x2cd107=_0x9b46[_0x2d4958];return _0x2cd107;};'use strict';exports[_0x69b4('0x0')]={'queue':{'type':_0x69b4('0x1'),'required':!![]},'interface':{'type':_0x69b4('0x1'),'required':!![]},'membername':{'type':_0x69b4('0x1'),'required':!![]},'penalty':{'type':_0x69b4('0x2'),'required':![]},'paused':{'type':_0x69b4('0x3'),'required':![]}};exports[_0x69b4('0x4')]={'queue':{'type':_0x69b4('0x1'),'required':!![]},'interface':{'type':'string','required':!![]}};exports[_0x69b4('0x5')]={'interface':{'type':_0x69b4('0x1'),'required':!![]},'paused':{'type':_0x69b4('0x3')},'reason':{'type':_0x69b4('0x1'),'required':![]}};exports['reload']={'module':{'type':'string','required':![]}};exports['voicequeuechannel']={'uniqueid':{'type':_0x69b4('0x1'),'required':!![]}};exports[_0x69b4('0x6')]={'uniqueid':{'type':_0x69b4('0x1'),'required':!![]},'filename':{'type':_0x69b4('0x1')},'format':{'type':'string'},'mixmonitorid':{'type':_0x69b4('0x1')}};exports[_0x69b4('0x7')]={'uniqueid':{'type':_0x69b4('0x1'),'required':!![]}};exports[_0x69b4('0x8')]={'uniqueid':{'type':_0x69b4('0x1'),'required':!![]},'exten':{'type':_0x69b4('0x1'),'required':!![]},'context':{'type':_0x69b4('0x1')}};
\ No newline at end of file
index 051dae9..c980f66 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xadb5=['ivrTotalCallsDays','ivrAnswerCallsDay','unmanaged','sumBillable','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundUnknownCallsDay','outboundDropCallsDayTimeout','outboundDropCallsDayCallersExit','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','outboundRejectCallsDay','outboundReCallsDay','outboundAnswerCallsDay','queueStatusComplete','mergeFromDatabase','prototype','initAgents','initTelephones','length','isUndefined','triggers','initTemplates','initZendeskAccounts','initSalesforceAccounts','initFreshdeskAccounts','initDeskAccounts','initSugarcrmAccounts','sugarcrmAccounts','initVtigerAccounts','vtigerAccounts','initServicenowAccounts','dynamics365Accounts','initFreshsalesAccounts','initVoiceQueueHopperHistory','merge','initVoiceQueueReports','voiceQueues','groupBy','uniqueid','queue','queuecallerexit','queuecallerabandon','abandoned','queuecallerleaveAt','diff','seconds','queuecallerabandonAt','queuecallerexitAt','queuecallerjoinAt','queuecallercomplete','queuecallercompleteAt','duration','ANSWERED','billableseconds','initCampaigns','dialQueueProject','initVoiceExtensions','voiceExtensions','initCampaignHopperHistory','initFaxAccounts','moment','../model/agent','../model/telephone','../model/trunk','../model/trigger','../model/template','../model/campaign','../model/zendeskAccount','../model/salesforceAccount','../model/freshdeskAccount','../model/sugarcrmAccount','../model/zohoAccount','../model/deskAccount','../model/vtigerAccount','../model/servicenowAccount','../model/dynamics365Account','../model/freshsalesAccount','../model/faxAccount','agents','telephones','trunks','campaigns','templates','outbound','channels','outboundChannels','settings','zendeskAccounts','salesforceAccounts','freshdeskAccounts','zohoAccounts','deskAccounts','servicenowAccounts','freshsalesAccounts','faxAccounts','mapKeys','name','hasOwnProperty','isNil','interface','format','SIP/%s','total','answered','sumHoldTime','sumDuration','isEmpty'];(function(_0xef67fe,_0x42a64a){var _0x143f01=function(_0x321442){while(--_0x321442){_0xef67fe['push'](_0xef67fe['shift']());}};_0x143f01(++_0x42a64a);}(_0xadb5,0xad));var _0x5adb=function(_0x1d8f79,_0x156113){_0x1d8f79=_0x1d8f79-0x0;var _0x251dda=_0xadb5[_0x1d8f79];return _0x251dda;};'use strict';var _=require('lodash');var moment=require(_0x5adb('0x0'));var util=require('util');var Agent=require(_0x5adb('0x1'));var Telephone=require(_0x5adb('0x2'));var Trunk=require(_0x5adb('0x3'));var VoiceQueue=require('../model/voiceQueue');var Trigger=require(_0x5adb('0x4'));var Template=require(_0x5adb('0x5'));var Campaign=require(_0x5adb('0x6'));var VoiceExtension=require('../model/voiceExtension');var ZendeskAccount=require(_0x5adb('0x7'));var SalesforceAccount=require(_0x5adb('0x8'));var FreshdeskAccount=require(_0x5adb('0x9'));var SugarcrmAccount=require(_0x5adb('0xa'));var ZohoAccount=require(_0x5adb('0xb'));var DeskAccount=require(_0x5adb('0xc'));var VtigerAccount=require(_0x5adb('0xd'));var ServicenowAccount=require(_0x5adb('0xe'));var Dynamics365Account=require(_0x5adb('0xf'));var FreshsalesAccount=require(_0x5adb('0x10'));var FaxAccount=require(_0x5adb('0x11'));function Realtime(){this[_0x5adb('0x12')]={};this[_0x5adb('0x13')]={};this[_0x5adb('0x14')]={};this['voiceQueues']={};this['triggers']={};this[_0x5adb('0x15')]={};this[_0x5adb('0x16')]={};this[_0x5adb('0x17')]={'total':0x0,'answered':0x0,'sumHoldTime':0x0,'sumDuration':0x0,'sumBillable':0x0};this['voiceExtensions']={};this[_0x5adb('0x18')]={};this['queueChannels']={};this[_0x5adb('0x19')]={};this['timers']={};this[_0x5adb('0x1a')]={};this[_0x5adb('0x1b')]={};this[_0x5adb('0x1c')]={};this['sugarcrmAccounts']={};this[_0x5adb('0x1d')]={};this[_0x5adb('0x1e')]={};this[_0x5adb('0x1f')]={};this['vtigerAccounts']={};this[_0x5adb('0x20')]={};this['dynamics365Accounts']={};this[_0x5adb('0x21')]={};this[_0x5adb('0x22')]={};}function freeIsNotKey(_0x30614e,_0x304784,_0x1c0f97){var _0x39d24d=_[_0x5adb('0x23')](_0x30614e,function(_0x42f4c6){return _0x42f4c6[_0x1c0f97];});for(var _0xb953a6 in _0x304784){if(_0x304784['hasOwnProperty'](_0xb953a6)){if(!_0x39d24d[_0xb953a6]){delete _0x304784[_0xb953a6];}}}}function freeIsNotKeySip(_0x3fff62,_0x5de028){var _0x1d9e86=_['mapKeys'](_0x3fff62,function(_0x3ef465){return util['format']('SIP/%s',_0x3ef465[_0x5adb('0x24')]);});for(var _0x1bed20 in _0x5de028){if(_0x5de028[_0x5adb('0x25')](_0x1bed20)){if(!_0x1d9e86[_0x1bed20]){delete _0x5de028[_0x1bed20];}}}}function freeIsNotKeyAgent(_0x1fd4a7,_0x99bc6c){var _0x5af69d=_[_0x5adb('0x23')](_0x1fd4a7,function(_0x5c296e){var _0x4e9f16=_[_0x5adb('0x26')](_0x5c296e[_0x5adb('0x27')])?util[_0x5adb('0x28')](_0x5adb('0x29'),_0x5c296e[_0x5adb('0x24')]):_0x5c296e[_0x5adb('0x27')];return _0x4e9f16;});for(var _0xfd9bb9 in _0x99bc6c){if(_0x99bc6c['hasOwnProperty'](_0xfd9bb9)){if(!_0x5af69d[_0xfd9bb9]){delete _0x99bc6c[_0xfd9bb9];}}}}function clearVoiceCallReports(_0x4b1957){_0x4b1957[_0x5adb('0x2a')]=0x0;_0x4b1957[_0x5adb('0x2b')]=0x0;_0x4b1957[_0x5adb('0x2c')]=0x0;_0x4b1957[_0x5adb('0x2d')]=0x0;_0x4b1957['sumBillable']=0x0;}function clearCampaigns(_0x2fee18){if(!_[_0x5adb('0x2e')](_0x2fee18)){for(var _0x5aed76 in _0x2fee18){if(_0x2fee18[_0x5adb('0x25')](_0x5aed76)){_0x2fee18[_0x5aed76][_0x5adb('0x2f')]=0x0;_0x2fee18[_0x5aed76][_0x5adb('0x30')]=0x0;}}}}function clearVoiceQueues(_0x55b40a){if(!_[_0x5adb('0x2e')](_0x55b40a)){for(var _0xbe21b1 in _0x55b40a){if(_0x55b40a[_0x5adb('0x25')](_0xbe21b1)){_0x55b40a[_0xbe21b1][_0x5adb('0x2a')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x2b')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x31')]=0x0;_0x55b40a[_0xbe21b1]['abandoned']=0x0;_0x55b40a[_0xbe21b1]['sumHoldTime']=0x0;_0x55b40a[_0xbe21b1]['sumDuration']=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x32')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x33')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x34')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x35')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x36')]=0x0;_0x55b40a[_0xbe21b1]['outboundNoSuchCallsDay']=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x37')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x38')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x39')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x3a')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x3b')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x3c')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x3d')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x33')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x3e')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x3f')]=!![];}}}}Realtime['prototype'][_0x5adb('0x40')]=function(_0x4c8b2e,_0x12424d){for(var _0x20cde6 in _0x12424d){if(_0x4c8b2e['hasOwnProperty'](_0x20cde6)){_0x4c8b2e[_0x20cde6]=_0x12424d[_0x20cde6];}}};Realtime[_0x5adb('0x41')][_0x5adb('0x42')]=function(){var _0x461a39=this;return function(_0x4a3661){if(_0x4a3661){freeIsNotKeyAgent(_0x4a3661,_0x461a39[_0x5adb('0x12')]);for(var _0x14cf00=0x0,_0x4b5887={};_0x14cf00<_0x4a3661['length'];_0x14cf00+=0x1){_0x4b5887=_0x4a3661[_0x14cf00];var _0x1ed9ea=_['isNil'](_0x4b5887[_0x5adb('0x27')])?util[_0x5adb('0x28')](_0x5adb('0x29'),_0x4b5887[_0x5adb('0x24')]):_0x4b5887[_0x5adb('0x27')];if(_['isUndefined'](_0x461a39[_0x5adb('0x12')][_0x1ed9ea])){_0x461a39[_0x5adb('0x12')][_0x1ed9ea]=new Agent(_0x4b5887);}else{_0x461a39[_0x5adb('0x40')](_0x461a39['agents'][_0x1ed9ea],_0x4b5887);}}}return _0x461a39['agents'];};};Realtime[_0x5adb('0x41')][_0x5adb('0x43')]=function(){var _0x586820=this;return function(_0x2355bc){if(_0x2355bc){freeIsNotKeySip(_0x2355bc,_0x586820['telephones']);for(var _0x199d3b=0x0,_0x58cc5d={};_0x199d3b<_0x2355bc[_0x5adb('0x44')];_0x199d3b+=0x1){_0x58cc5d=_0x2355bc[_0x199d3b];if(_['isUndefined'](_0x586820[_0x5adb('0x13')][util[_0x5adb('0x28')]('SIP/%s',_0x58cc5d[_0x5adb('0x24')])])){_0x586820['telephones'][util[_0x5adb('0x28')](_0x5adb('0x29'),_0x58cc5d[_0x5adb('0x24')])]=new Telephone(_0x58cc5d);}else{_0x586820['mergeFromDatabase'](_0x586820[_0x5adb('0x13')][util[_0x5adb('0x28')](_0x5adb('0x29'),_0x58cc5d[_0x5adb('0x24')])],_0x58cc5d);}}}return _0x586820[_0x5adb('0x13')];};};Realtime['prototype']['initTrunks']=function(){var _0x4f491a=this;return function(_0x599999){if(_0x599999){freeIsNotKeySip(_0x599999,_0x4f491a[_0x5adb('0x14')]);for(var _0x2fbe14=0x0,_0x3a104a={};_0x2fbe14<_0x599999[_0x5adb('0x44')];_0x2fbe14+=0x1){_0x3a104a=_0x599999[_0x2fbe14];if(_[_0x5adb('0x45')](_0x4f491a[_0x5adb('0x14')][util[_0x5adb('0x28')](_0x5adb('0x29'),_0x3a104a['name'])])){_0x4f491a['trunks'][util[_0x5adb('0x28')]('SIP/%s',_0x3a104a[_0x5adb('0x24')])]=new Trunk(_0x3a104a);}else{_0x4f491a[_0x5adb('0x40')](_0x4f491a[_0x5adb('0x14')][util[_0x5adb('0x28')](_0x5adb('0x29'),_0x3a104a['name'])],_0x3a104a);}}}return _0x4f491a[_0x5adb('0x14')];};};Realtime[_0x5adb('0x41')]['initTriggers']=function(){var _0x4160ad=this;return function(_0x1a256c){if(_0x1a256c){freeIsNotKey(_0x1a256c,_0x4160ad['triggers'],'id');for(var _0x120497=0x0,_0x407a4c={};_0x120497<_0x1a256c[_0x5adb('0x44')];_0x120497+=0x1){_0x407a4c=_0x1a256c[_0x120497];if(_[_0x5adb('0x45')](_0x4160ad[_0x5adb('0x46')][_0x407a4c['id']])){_0x4160ad[_0x5adb('0x46')][_0x407a4c['id']]=new Trigger(_0x407a4c);}else{_0x4160ad[_0x5adb('0x40')](_0x4160ad['triggers'][_0x407a4c['id']],_0x407a4c);}}}return _0x4160ad['triggers'];};};Realtime[_0x5adb('0x41')][_0x5adb('0x47')]=function(){var _0x1cd0a3=this;return function(_0xb79d85){if(_0xb79d85){freeIsNotKey(_0xb79d85,_0x1cd0a3['templates'],'id');for(var _0x507e48=0x0,_0xaa32e4={};_0x507e48<_0xb79d85[_0x5adb('0x44')];_0x507e48+=0x1){_0xaa32e4=_0xb79d85[_0x507e48];if(_[_0x5adb('0x45')](_0x1cd0a3[_0x5adb('0x16')][_0xaa32e4['id']])){_0x1cd0a3[_0x5adb('0x16')][_0xaa32e4['id']]=new Template(_0xaa32e4);}else{_0x1cd0a3['mergeFromDatabase'](_0x1cd0a3[_0x5adb('0x16')][_0xaa32e4['id']],_0xaa32e4);}}}return _0x1cd0a3[_0x5adb('0x16')];};};Realtime['prototype'][_0x5adb('0x48')]=function(){var _0x251f45=this;return function(_0x1cdb03){if(_0x1cdb03){freeIsNotKey(_0x1cdb03,_0x251f45[_0x5adb('0x1b')],'id');for(var _0x186bd2=0x0,_0x3a5409={};_0x186bd2<_0x1cdb03[_0x5adb('0x44')];_0x186bd2+=0x1){_0x3a5409=_0x1cdb03[_0x186bd2];if(_[_0x5adb('0x45')](_0x251f45['zendeskAccounts'][_0x3a5409['id']])){_0x251f45[_0x5adb('0x1b')][_0x3a5409['id']]=new ZendeskAccount(_0x3a5409);}else{_0x251f45['mergeFromDatabase'](_0x251f45['zendeskAccounts'][_0x3a5409['id']],_0x3a5409);}}}return _0x251f45['zendeskAccounts'];};};Realtime[_0x5adb('0x41')][_0x5adb('0x49')]=function(){var _0x207a81=this;return function(_0x4ba0b5){if(_0x4ba0b5){freeIsNotKey(_0x4ba0b5,_0x207a81[_0x5adb('0x1c')],'id');for(var _0x5cbab5=0x0,_0x177a81={};_0x5cbab5<_0x4ba0b5[_0x5adb('0x44')];_0x5cbab5+=0x1){_0x177a81=_0x4ba0b5[_0x5cbab5];if(_[_0x5adb('0x45')](_0x207a81['salesforceAccounts'][_0x177a81['id']])){_0x207a81[_0x5adb('0x1c')][_0x177a81['id']]=new SalesforceAccount(_0x177a81);}else{_0x207a81['mergeFromDatabase'](_0x207a81[_0x5adb('0x1c')][_0x177a81['id']],_0x177a81);}}}return _0x207a81[_0x5adb('0x1c')];};};Realtime['prototype'][_0x5adb('0x4a')]=function(){var _0x1ab97b=this;return function(_0x3594e3){if(_0x3594e3){freeIsNotKey(_0x3594e3,_0x1ab97b[_0x5adb('0x1d')],'id');for(var _0x372734=0x0,_0x4cb36c={};_0x372734<_0x3594e3[_0x5adb('0x44')];_0x372734+=0x1){_0x4cb36c=_0x3594e3[_0x372734];if(_[_0x5adb('0x45')](_0x1ab97b[_0x5adb('0x1d')][_0x4cb36c['id']])){_0x1ab97b[_0x5adb('0x1d')][_0x4cb36c['id']]=new FreshdeskAccount(_0x4cb36c);}else{_0x1ab97b['mergeFromDatabase'](_0x1ab97b[_0x5adb('0x1d')][_0x4cb36c['id']],_0x4cb36c);}}}return _0x1ab97b[_0x5adb('0x1d')];};};Realtime[_0x5adb('0x41')]['initZohoAccounts']=function(){var _0x2b34a8=this;return function(_0xd0e5b7){if(_0xd0e5b7){freeIsNotKey(_0xd0e5b7,_0x2b34a8[_0x5adb('0x1e')],'id');for(var _0xfd3471=0x0,_0x4f2da9={};_0xfd3471<_0xd0e5b7[_0x5adb('0x44')];_0xfd3471+=0x1){_0x4f2da9=_0xd0e5b7[_0xfd3471];if(_[_0x5adb('0x45')](_0x2b34a8[_0x5adb('0x1e')][_0x4f2da9['id']])){_0x2b34a8[_0x5adb('0x1e')][_0x4f2da9['id']]=new ZohoAccount(_0x4f2da9);}else{_0x2b34a8[_0x5adb('0x40')](_0x2b34a8['zohoAccounts'][_0x4f2da9['id']],_0x4f2da9);}}}return _0x2b34a8[_0x5adb('0x1e')];};};Realtime['prototype'][_0x5adb('0x4b')]=function(){var _0x4f7227=this;return function(_0x31ae72){if(_0x31ae72){freeIsNotKey(_0x31ae72,_0x4f7227[_0x5adb('0x1f')],'id');for(var _0x1a9358=0x0,_0x42f6d9={};_0x1a9358<_0x31ae72['length'];_0x1a9358+=0x1){_0x42f6d9=_0x31ae72[_0x1a9358];if(_[_0x5adb('0x45')](_0x4f7227[_0x5adb('0x1f')][_0x42f6d9['id']])){_0x4f7227[_0x5adb('0x1f')][_0x42f6d9['id']]=new DeskAccount(_0x42f6d9);}else{_0x4f7227['mergeFromDatabase'](_0x4f7227['deskAccounts'][_0x42f6d9['id']],_0x42f6d9);}}}return _0x4f7227['deskAccounts'];};};Realtime[_0x5adb('0x41')][_0x5adb('0x4c')]=function(){var _0xa5ecc0=this;return function(_0x12a146){if(_0x12a146){freeIsNotKey(_0x12a146,_0xa5ecc0[_0x5adb('0x4d')],'id');for(var _0xb06bee=0x0,_0x204b9b={};_0xb06bee<_0x12a146[_0x5adb('0x44')];_0xb06bee+=0x1){_0x204b9b=_0x12a146[_0xb06bee];if(_[_0x5adb('0x45')](_0xa5ecc0[_0x5adb('0x4d')][_0x204b9b['id']])){_0xa5ecc0[_0x5adb('0x4d')][_0x204b9b['id']]=new SugarcrmAccount(_0x204b9b);}else{_0xa5ecc0[_0x5adb('0x40')](_0xa5ecc0[_0x5adb('0x4d')][_0x204b9b['id']],_0x204b9b);}}}return _0xa5ecc0['sugarcrmAccounts'];};};Realtime['prototype'][_0x5adb('0x4e')]=function(){var _0x27a8e4=this;return function(_0x43cde9){if(_0x43cde9){freeIsNotKey(_0x43cde9,_0x27a8e4[_0x5adb('0x4f')],'id');for(var _0x5d7a9f=0x0,_0xfba0d5={};_0x5d7a9f<_0x43cde9[_0x5adb('0x44')];_0x5d7a9f+=0x1){_0xfba0d5=_0x43cde9[_0x5d7a9f];if(_['isUndefined'](_0x27a8e4[_0x5adb('0x4f')][_0xfba0d5['id']])){_0x27a8e4[_0x5adb('0x4f')][_0xfba0d5['id']]=new VtigerAccount(_0xfba0d5);}else{_0x27a8e4[_0x5adb('0x40')](_0x27a8e4['vtigerAccounts'][_0xfba0d5['id']],_0xfba0d5);}}}return _0x27a8e4[_0x5adb('0x4f')];};};Realtime[_0x5adb('0x41')][_0x5adb('0x50')]=function(){var _0x30c92c=this;return function(_0x330290){if(_0x330290){freeIsNotKey(_0x330290,_0x30c92c[_0x5adb('0x20')],'id');for(var _0x513f26=0x0,_0x836b91={};_0x513f26<_0x330290[_0x5adb('0x44')];_0x513f26+=0x1){_0x836b91=_0x330290[_0x513f26];if(_[_0x5adb('0x45')](_0x30c92c['servicenowAccounts'][_0x836b91['id']])){_0x30c92c[_0x5adb('0x20')][_0x836b91['id']]=new ServicenowAccount(_0x836b91);}else{_0x30c92c[_0x5adb('0x40')](_0x30c92c[_0x5adb('0x20')][_0x836b91['id']],_0x836b91);}}}return _0x30c92c['servicenowAccounts'];};};Realtime[_0x5adb('0x41')]['initDynamics365Accounts']=function(){var _0xa8ff64=this;return function(_0x1e7e3a){if(_0x1e7e3a){freeIsNotKey(_0x1e7e3a,_0xa8ff64[_0x5adb('0x51')],'id');for(var _0x57f0a4=0x0,_0x192b1f={};_0x57f0a4<_0x1e7e3a[_0x5adb('0x44')];_0x57f0a4+=0x1){_0x192b1f=_0x1e7e3a[_0x57f0a4];if(_['isUndefined'](_0xa8ff64[_0x5adb('0x51')][_0x192b1f['id']])){_0xa8ff64[_0x5adb('0x51')][_0x192b1f['id']]=new Dynamics365Account(_0x192b1f);}else{_0xa8ff64[_0x5adb('0x40')](_0xa8ff64[_0x5adb('0x51')][_0x192b1f['id']],_0x192b1f);}}}return _0xa8ff64['dynamics365Accounts'];};};Realtime[_0x5adb('0x41')][_0x5adb('0x52')]=function(){var _0x307f07=this;return function(_0x16716e){if(_0x16716e){freeIsNotKey(_0x16716e,_0x307f07['freshsalesAccounts'],'id');for(var _0x53a4bc=0x0,_0x304512={};_0x53a4bc<_0x16716e['length'];_0x53a4bc+=0x1){_0x304512=_0x16716e[_0x53a4bc];if(_['isUndefined'](_0x307f07['freshsalesAccounts'][_0x304512['id']])){_0x307f07[_0x5adb('0x21')][_0x304512['id']]=new FreshsalesAccount(_0x304512);}else{_0x307f07[_0x5adb('0x40')](_0x307f07['freshsalesAccounts'][_0x304512['id']],_0x304512);}}}return _0x307f07[_0x5adb('0x21')];};};Realtime[_0x5adb('0x41')][_0x5adb('0x53')]=function(){var _0xf6ef8a=this;return function(_0x358a23){for(var _0x126e38=0x0;_0x126e38<_0x358a23[_0x5adb('0x44')];_0x126e38+=0x1){_[_0x5adb('0x54')](_0xf6ef8a['voiceQueues'][_0x358a23[_0x126e38]['name']],_0x358a23[_0x126e38]);}return _0xf6ef8a['voiceQueues'];};};Realtime[_0x5adb('0x41')][_0x5adb('0x55')]=function(){var _0x3a0d1b=this;return function(_0x2a55a3){clearVoiceQueues(_0x3a0d1b[_0x5adb('0x56')]);if(_0x2a55a3){_0x2a55a3=_[_0x5adb('0x57')](_0x2a55a3,_0x5adb('0x58'));for(var _0x25f761 in _0x2a55a3){if(_0x2a55a3['hasOwnProperty'](_0x25f761)){for(var _0x5e55c2=0x0;_0x5e55c2<_0x2a55a3[_0x25f761][_0x5adb('0x44')];_0x5e55c2+=0x1){var _0x56df90=_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x59')];if(_0x3a0d1b[_0x5adb('0x56')][_0x56df90]){if(_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x5a')]){_0x3a0d1b[_0x5adb('0x56')][_0x56df90][_0x5adb('0x31')]+=0x1;}if(_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x5b')]){_0x3a0d1b[_0x5adb('0x56')][_0x56df90][_0x5adb('0x5c')]+=0x1;}_0x3a0d1b['voiceQueues'][_0x56df90][_0x5adb('0x2c')]+=moment(_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x5d')])[_0x5adb('0x5e')](moment(_0x2a55a3[_0x25f761][_0x5e55c2]['queuecallerjoinAt']),_0x5adb('0x5f'))||0x0;if(_0x5e55c2===_0x2a55a3[_0x25f761][_0x5adb('0x44')]-0x1){_0x3a0d1b['voiceQueues'][_0x56df90][_0x5adb('0x2d')]+=moment(_0x2a55a3[_0x25f761][_0x5e55c2]['queuecallercompleteAt']||_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x60')]||_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x61')])['diff'](moment(_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x62')]),_0x5adb('0x5f'))||0x0;_0x3a0d1b[_0x5adb('0x56')][_0x56df90][_0x5adb('0x2a')]+=0x1;if(_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x63')]){_0x3a0d1b[_0x5adb('0x56')][_0x56df90][_0x5adb('0x2b')]+=0x1;_0x3a0d1b[_0x5adb('0x56')][_0x56df90]['sumBillable']+=moment(_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x64')])[_0x5adb('0x5e')](moment(_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x5d')]),'seconds')||0x0;}}else{_0x3a0d1b['voiceQueues'][_0x56df90][_0x5adb('0x2d')]+=_0x3a0d1b['voiceQueues'][_0x56df90][_0x5adb('0x2c')]||0x0;}}}}}}return _0x3a0d1b[_0x5adb('0x56')];};};Realtime[_0x5adb('0x41')]['initVoiceCallReports']=function(){var _0x3a9735=this;return function(_0x288e4f){clearVoiceCallReports(_0x3a9735[_0x5adb('0x17')]);if(_0x288e4f){for(var _0x3ecc56=0x0;_0x3ecc56<_0x288e4f[_0x5adb('0x44')];_0x3ecc56+=0x1){_0x3a9735['outbound'][_0x5adb('0x2a')]+=0x1;_0x3a9735[_0x5adb('0x17')][_0x5adb('0x2d')]+=_0x288e4f[_0x3ecc56][_0x5adb('0x65')];if(_0x288e4f[_0x3ecc56]['disposition']===_0x5adb('0x66')){_0x3a9735[_0x5adb('0x17')][_0x5adb('0x2b')]+=0x1;_0x3a9735[_0x5adb('0x17')][_0x5adb('0x2c')]+=_0x288e4f[_0x3ecc56][_0x5adb('0x65')]-_0x288e4f[_0x3ecc56][_0x5adb('0x67')]||0x0;_0x3a9735['outbound'][_0x5adb('0x32')]+=_0x288e4f[_0x3ecc56][_0x5adb('0x67')];}}}return _0x3a9735['outbound'];};};Realtime[_0x5adb('0x41')][_0x5adb('0x68')]=function(){var _0x4fc0d5=this;return function(_0x462fa0){if(_0x462fa0){freeIsNotKey(_0x462fa0,_0x4fc0d5['campaigns'],_0x5adb('0x24'));for(var _0x268df2=0x0,_0x4a2ebc={};_0x268df2<_0x462fa0[_0x5adb('0x44')];_0x268df2+=0x1){_0x4a2ebc=_0x462fa0[_0x268df2];if(_['isUndefined'](_0x4fc0d5[_0x5adb('0x15')][_0x4a2ebc[_0x5adb('0x24')]])){_0x4fc0d5[_0x5adb('0x15')][_0x4a2ebc[_0x5adb('0x24')]]=new Campaign(_0x4a2ebc);}else{_0x4fc0d5[_0x5adb('0x40')](_0x4fc0d5['campaigns'][_0x4a2ebc[_0x5adb('0x24')]],_0x4a2ebc);_0x4fc0d5[_0x5adb('0x15')][_0x4a2ebc[_0x5adb('0x24')]][_0x5adb('0x69')]=_0x4a2ebc['SquareProject']?_0x4a2ebc['SquareProject'][_0x5adb('0x24')]:undefined;}}}return _0x4fc0d5[_0x5adb('0x15')];};};Realtime[_0x5adb('0x41')][_0x5adb('0x6a')]=function(){var _0x277668=this;return function(_0xc74e86){if(_0xc74e86){freeIsNotKey(_0xc74e86,_0x277668[_0x5adb('0x6b')],'id');for(var _0x514833=0x0,_0xda26cc={};_0x514833<_0xc74e86[_0x5adb('0x44')];_0x514833+=0x1){_0xda26cc=_0xc74e86[_0x514833];if(_[_0x5adb('0x45')](_0x277668[_0x5adb('0x6b')][_0xda26cc['id']])){_0x277668['voiceExtensions'][_0xda26cc['id']]=new VoiceExtension(_0xda26cc);}else{_0x277668[_0x5adb('0x40')](_0x277668[_0x5adb('0x6b')][_0xda26cc['id']],_0xda26cc);}}}return _0x277668[_0x5adb('0x6b')];};};Realtime[_0x5adb('0x41')][_0x5adb('0x6c')]=function(){var _0x188cbd=this;return function(_0x315ac6){clearCampaigns(_0x188cbd[_0x5adb('0x15')]);for(var _0x1f753e=0x0;_0x1f753e<_0x315ac6['length'];_0x1f753e+=0x1){_[_0x5adb('0x54')](_0x188cbd[_0x5adb('0x15')][_0x315ac6[_0x1f753e]['name']],_0x315ac6[_0x1f753e]);}return _0x188cbd[_0x5adb('0x15')];};};Realtime[_0x5adb('0x41')][_0x5adb('0x6d')]=function(){var _0x3bb3fc=this;return function(_0x200221){if(_0x200221){freeIsNotKey(_0x200221,_0x3bb3fc[_0x5adb('0x22')],'id');for(var _0x450516=0x0,_0x350bb1={};_0x450516<_0x200221['length'];_0x450516+=0x1){_0x350bb1=_0x200221[_0x450516];if(_[_0x5adb('0x45')](_0x3bb3fc[_0x5adb('0x22')][_0x350bb1['id']])){_0x3bb3fc['faxAccounts'][_0x350bb1['id']]=new FaxAccount(_0x350bb1);}else{_0x3bb3fc[_0x5adb('0x40')](_0x3bb3fc[_0x5adb('0x22')][_0x350bb1['id']],_0x350bb1);}}}return _0x3bb3fc[_0x5adb('0x22')];};};Realtime['prototype']['initVoiceQueues']=function(){var _0x2d7a9f=this;return function(_0x328851){if(_0x328851){freeIsNotKey(_0x328851,_0x2d7a9f[_0x5adb('0x56')],'name');for(var _0x14b36f=0x0,_0x321c3a={};_0x14b36f<_0x328851[_0x5adb('0x44')];_0x14b36f+=0x1){_0x321c3a=_0x328851[_0x14b36f];if(_[_0x5adb('0x45')](_0x2d7a9f[_0x5adb('0x56')][_0x321c3a[_0x5adb('0x24')]])){_0x2d7a9f[_0x5adb('0x56')][_0x321c3a[_0x5adb('0x24')]]=new VoiceQueue(_0x321c3a);}else{_0x2d7a9f[_0x5adb('0x40')](_0x2d7a9f[_0x5adb('0x56')][_0x321c3a[_0x5adb('0x24')]],_0x321c3a);}}}return _0x2d7a9f[_0x5adb('0x56')];};};module['exports']=Realtime;
\ No newline at end of file
+var _0xadb5=['ivrTotalCallsDays','ivrAnswerCallsDay','unmanaged','sumBillable','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundUnknownCallsDay','outboundDropCallsDayTimeout','outboundDropCallsDayCallersExit','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','outboundRejectCallsDay','outboundReCallsDay','outboundAnswerCallsDay','queueStatusComplete','mergeFromDatabase','prototype','initAgents','initTelephones','length','isUndefined','triggers','initTemplates','initZendeskAccounts','initSalesforceAccounts','initFreshdeskAccounts','initDeskAccounts','initSugarcrmAccounts','sugarcrmAccounts','initVtigerAccounts','vtigerAccounts','initServicenowAccounts','dynamics365Accounts','initFreshsalesAccounts','initVoiceQueueHopperHistory','merge','initVoiceQueueReports','voiceQueues','groupBy','uniqueid','queue','queuecallerexit','queuecallerabandon','abandoned','queuecallerleaveAt','diff','seconds','queuecallerabandonAt','queuecallerexitAt','queuecallerjoinAt','queuecallercomplete','queuecallercompleteAt','duration','ANSWERED','billableseconds','initCampaigns','dialQueueProject','initVoiceExtensions','voiceExtensions','initCampaignHopperHistory','initFaxAccounts','moment','../model/agent','../model/telephone','../model/trunk','../model/trigger','../model/template','../model/campaign','../model/zendeskAccount','../model/salesforceAccount','../model/freshdeskAccount','../model/sugarcrmAccount','../model/zohoAccount','../model/deskAccount','../model/vtigerAccount','../model/servicenowAccount','../model/dynamics365Account','../model/freshsalesAccount','../model/faxAccount','agents','telephones','trunks','campaigns','templates','outbound','channels','outboundChannels','settings','zendeskAccounts','salesforceAccounts','freshdeskAccounts','zohoAccounts','deskAccounts','servicenowAccounts','freshsalesAccounts','faxAccounts','mapKeys','name','hasOwnProperty','isNil','interface','format','SIP/%s','total','answered','sumHoldTime','sumDuration','isEmpty'];(function(_0x517483,_0x3bee35){var _0x3fb283=function(_0x4f465d){while(--_0x4f465d){_0x517483['push'](_0x517483['shift']());}};_0x3fb283(++_0x3bee35);}(_0xadb5,0xad));var _0x5adb=function(_0x3bdd38,_0x3a17a4){_0x3bdd38=_0x3bdd38-0x0;var _0x2656e7=_0xadb5[_0x3bdd38];return _0x2656e7;};'use strict';var _=require('lodash');var moment=require(_0x5adb('0x0'));var util=require('util');var Agent=require(_0x5adb('0x1'));var Telephone=require(_0x5adb('0x2'));var Trunk=require(_0x5adb('0x3'));var VoiceQueue=require('../model/voiceQueue');var Trigger=require(_0x5adb('0x4'));var Template=require(_0x5adb('0x5'));var Campaign=require(_0x5adb('0x6'));var VoiceExtension=require('../model/voiceExtension');var ZendeskAccount=require(_0x5adb('0x7'));var SalesforceAccount=require(_0x5adb('0x8'));var FreshdeskAccount=require(_0x5adb('0x9'));var SugarcrmAccount=require(_0x5adb('0xa'));var ZohoAccount=require(_0x5adb('0xb'));var DeskAccount=require(_0x5adb('0xc'));var VtigerAccount=require(_0x5adb('0xd'));var ServicenowAccount=require(_0x5adb('0xe'));var Dynamics365Account=require(_0x5adb('0xf'));var FreshsalesAccount=require(_0x5adb('0x10'));var FaxAccount=require(_0x5adb('0x11'));function Realtime(){this[_0x5adb('0x12')]={};this[_0x5adb('0x13')]={};this[_0x5adb('0x14')]={};this['voiceQueues']={};this['triggers']={};this[_0x5adb('0x15')]={};this[_0x5adb('0x16')]={};this[_0x5adb('0x17')]={'total':0x0,'answered':0x0,'sumHoldTime':0x0,'sumDuration':0x0,'sumBillable':0x0};this['voiceExtensions']={};this[_0x5adb('0x18')]={};this['queueChannels']={};this[_0x5adb('0x19')]={};this['timers']={};this[_0x5adb('0x1a')]={};this[_0x5adb('0x1b')]={};this[_0x5adb('0x1c')]={};this['sugarcrmAccounts']={};this[_0x5adb('0x1d')]={};this[_0x5adb('0x1e')]={};this[_0x5adb('0x1f')]={};this['vtigerAccounts']={};this[_0x5adb('0x20')]={};this['dynamics365Accounts']={};this[_0x5adb('0x21')]={};this[_0x5adb('0x22')]={};}function freeIsNotKey(_0x30614e,_0x304784,_0x1c0f97){var _0x39d24d=_[_0x5adb('0x23')](_0x30614e,function(_0x42f4c6){return _0x42f4c6[_0x1c0f97];});for(var _0xb953a6 in _0x304784){if(_0x304784['hasOwnProperty'](_0xb953a6)){if(!_0x39d24d[_0xb953a6]){delete _0x304784[_0xb953a6];}}}}function freeIsNotKeySip(_0x3fff62,_0x5de028){var _0x1d9e86=_['mapKeys'](_0x3fff62,function(_0x3ef465){return util['format']('SIP/%s',_0x3ef465[_0x5adb('0x24')]);});for(var _0x1bed20 in _0x5de028){if(_0x5de028[_0x5adb('0x25')](_0x1bed20)){if(!_0x1d9e86[_0x1bed20]){delete _0x5de028[_0x1bed20];}}}}function freeIsNotKeyAgent(_0x1fd4a7,_0x99bc6c){var _0x5af69d=_[_0x5adb('0x23')](_0x1fd4a7,function(_0x5c296e){var _0x4e9f16=_[_0x5adb('0x26')](_0x5c296e[_0x5adb('0x27')])?util[_0x5adb('0x28')](_0x5adb('0x29'),_0x5c296e[_0x5adb('0x24')]):_0x5c296e[_0x5adb('0x27')];return _0x4e9f16;});for(var _0xfd9bb9 in _0x99bc6c){if(_0x99bc6c['hasOwnProperty'](_0xfd9bb9)){if(!_0x5af69d[_0xfd9bb9]){delete _0x99bc6c[_0xfd9bb9];}}}}function clearVoiceCallReports(_0x4b1957){_0x4b1957[_0x5adb('0x2a')]=0x0;_0x4b1957[_0x5adb('0x2b')]=0x0;_0x4b1957[_0x5adb('0x2c')]=0x0;_0x4b1957[_0x5adb('0x2d')]=0x0;_0x4b1957['sumBillable']=0x0;}function clearCampaigns(_0x2fee18){if(!_[_0x5adb('0x2e')](_0x2fee18)){for(var _0x5aed76 in _0x2fee18){if(_0x2fee18[_0x5adb('0x25')](_0x5aed76)){_0x2fee18[_0x5aed76][_0x5adb('0x2f')]=0x0;_0x2fee18[_0x5aed76][_0x5adb('0x30')]=0x0;}}}}function clearVoiceQueues(_0x55b40a){if(!_[_0x5adb('0x2e')](_0x55b40a)){for(var _0xbe21b1 in _0x55b40a){if(_0x55b40a[_0x5adb('0x25')](_0xbe21b1)){_0x55b40a[_0xbe21b1][_0x5adb('0x2a')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x2b')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x31')]=0x0;_0x55b40a[_0xbe21b1]['abandoned']=0x0;_0x55b40a[_0xbe21b1]['sumHoldTime']=0x0;_0x55b40a[_0xbe21b1]['sumDuration']=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x32')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x33')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x34')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x35')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x36')]=0x0;_0x55b40a[_0xbe21b1]['outboundNoSuchCallsDay']=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x37')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x38')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x39')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x3a')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x3b')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x3c')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x3d')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x33')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x3e')]=0x0;_0x55b40a[_0xbe21b1][_0x5adb('0x3f')]=!![];}}}}Realtime['prototype'][_0x5adb('0x40')]=function(_0x4c8b2e,_0x12424d){for(var _0x20cde6 in _0x12424d){if(_0x4c8b2e['hasOwnProperty'](_0x20cde6)){_0x4c8b2e[_0x20cde6]=_0x12424d[_0x20cde6];}}};Realtime[_0x5adb('0x41')][_0x5adb('0x42')]=function(){var _0x461a39=this;return function(_0x4a3661){if(_0x4a3661){freeIsNotKeyAgent(_0x4a3661,_0x461a39[_0x5adb('0x12')]);for(var _0x14cf00=0x0,_0x4b5887={};_0x14cf00<_0x4a3661['length'];_0x14cf00+=0x1){_0x4b5887=_0x4a3661[_0x14cf00];var _0x1ed9ea=_['isNil'](_0x4b5887[_0x5adb('0x27')])?util[_0x5adb('0x28')](_0x5adb('0x29'),_0x4b5887[_0x5adb('0x24')]):_0x4b5887[_0x5adb('0x27')];if(_['isUndefined'](_0x461a39[_0x5adb('0x12')][_0x1ed9ea])){_0x461a39[_0x5adb('0x12')][_0x1ed9ea]=new Agent(_0x4b5887);}else{_0x461a39[_0x5adb('0x40')](_0x461a39['agents'][_0x1ed9ea],_0x4b5887);}}}return _0x461a39['agents'];};};Realtime[_0x5adb('0x41')][_0x5adb('0x43')]=function(){var _0x586820=this;return function(_0x2355bc){if(_0x2355bc){freeIsNotKeySip(_0x2355bc,_0x586820['telephones']);for(var _0x199d3b=0x0,_0x58cc5d={};_0x199d3b<_0x2355bc[_0x5adb('0x44')];_0x199d3b+=0x1){_0x58cc5d=_0x2355bc[_0x199d3b];if(_['isUndefined'](_0x586820[_0x5adb('0x13')][util[_0x5adb('0x28')]('SIP/%s',_0x58cc5d[_0x5adb('0x24')])])){_0x586820['telephones'][util[_0x5adb('0x28')](_0x5adb('0x29'),_0x58cc5d[_0x5adb('0x24')])]=new Telephone(_0x58cc5d);}else{_0x586820['mergeFromDatabase'](_0x586820[_0x5adb('0x13')][util[_0x5adb('0x28')](_0x5adb('0x29'),_0x58cc5d[_0x5adb('0x24')])],_0x58cc5d);}}}return _0x586820[_0x5adb('0x13')];};};Realtime['prototype']['initTrunks']=function(){var _0x4f491a=this;return function(_0x599999){if(_0x599999){freeIsNotKeySip(_0x599999,_0x4f491a[_0x5adb('0x14')]);for(var _0x2fbe14=0x0,_0x3a104a={};_0x2fbe14<_0x599999[_0x5adb('0x44')];_0x2fbe14+=0x1){_0x3a104a=_0x599999[_0x2fbe14];if(_[_0x5adb('0x45')](_0x4f491a[_0x5adb('0x14')][util[_0x5adb('0x28')](_0x5adb('0x29'),_0x3a104a['name'])])){_0x4f491a['trunks'][util[_0x5adb('0x28')]('SIP/%s',_0x3a104a[_0x5adb('0x24')])]=new Trunk(_0x3a104a);}else{_0x4f491a[_0x5adb('0x40')](_0x4f491a[_0x5adb('0x14')][util[_0x5adb('0x28')](_0x5adb('0x29'),_0x3a104a['name'])],_0x3a104a);}}}return _0x4f491a[_0x5adb('0x14')];};};Realtime[_0x5adb('0x41')]['initTriggers']=function(){var _0x4160ad=this;return function(_0x1a256c){if(_0x1a256c){freeIsNotKey(_0x1a256c,_0x4160ad['triggers'],'id');for(var _0x120497=0x0,_0x407a4c={};_0x120497<_0x1a256c[_0x5adb('0x44')];_0x120497+=0x1){_0x407a4c=_0x1a256c[_0x120497];if(_[_0x5adb('0x45')](_0x4160ad[_0x5adb('0x46')][_0x407a4c['id']])){_0x4160ad[_0x5adb('0x46')][_0x407a4c['id']]=new Trigger(_0x407a4c);}else{_0x4160ad[_0x5adb('0x40')](_0x4160ad['triggers'][_0x407a4c['id']],_0x407a4c);}}}return _0x4160ad['triggers'];};};Realtime[_0x5adb('0x41')][_0x5adb('0x47')]=function(){var _0x1cd0a3=this;return function(_0xb79d85){if(_0xb79d85){freeIsNotKey(_0xb79d85,_0x1cd0a3['templates'],'id');for(var _0x507e48=0x0,_0xaa32e4={};_0x507e48<_0xb79d85[_0x5adb('0x44')];_0x507e48+=0x1){_0xaa32e4=_0xb79d85[_0x507e48];if(_[_0x5adb('0x45')](_0x1cd0a3[_0x5adb('0x16')][_0xaa32e4['id']])){_0x1cd0a3[_0x5adb('0x16')][_0xaa32e4['id']]=new Template(_0xaa32e4);}else{_0x1cd0a3['mergeFromDatabase'](_0x1cd0a3[_0x5adb('0x16')][_0xaa32e4['id']],_0xaa32e4);}}}return _0x1cd0a3[_0x5adb('0x16')];};};Realtime['prototype'][_0x5adb('0x48')]=function(){var _0x251f45=this;return function(_0x1cdb03){if(_0x1cdb03){freeIsNotKey(_0x1cdb03,_0x251f45[_0x5adb('0x1b')],'id');for(var _0x186bd2=0x0,_0x3a5409={};_0x186bd2<_0x1cdb03[_0x5adb('0x44')];_0x186bd2+=0x1){_0x3a5409=_0x1cdb03[_0x186bd2];if(_[_0x5adb('0x45')](_0x251f45['zendeskAccounts'][_0x3a5409['id']])){_0x251f45[_0x5adb('0x1b')][_0x3a5409['id']]=new ZendeskAccount(_0x3a5409);}else{_0x251f45['mergeFromDatabase'](_0x251f45['zendeskAccounts'][_0x3a5409['id']],_0x3a5409);}}}return _0x251f45['zendeskAccounts'];};};Realtime[_0x5adb('0x41')][_0x5adb('0x49')]=function(){var _0x207a81=this;return function(_0x4ba0b5){if(_0x4ba0b5){freeIsNotKey(_0x4ba0b5,_0x207a81[_0x5adb('0x1c')],'id');for(var _0x5cbab5=0x0,_0x177a81={};_0x5cbab5<_0x4ba0b5[_0x5adb('0x44')];_0x5cbab5+=0x1){_0x177a81=_0x4ba0b5[_0x5cbab5];if(_[_0x5adb('0x45')](_0x207a81['salesforceAccounts'][_0x177a81['id']])){_0x207a81[_0x5adb('0x1c')][_0x177a81['id']]=new SalesforceAccount(_0x177a81);}else{_0x207a81['mergeFromDatabase'](_0x207a81[_0x5adb('0x1c')][_0x177a81['id']],_0x177a81);}}}return _0x207a81[_0x5adb('0x1c')];};};Realtime['prototype'][_0x5adb('0x4a')]=function(){var _0x1ab97b=this;return function(_0x3594e3){if(_0x3594e3){freeIsNotKey(_0x3594e3,_0x1ab97b[_0x5adb('0x1d')],'id');for(var _0x372734=0x0,_0x4cb36c={};_0x372734<_0x3594e3[_0x5adb('0x44')];_0x372734+=0x1){_0x4cb36c=_0x3594e3[_0x372734];if(_[_0x5adb('0x45')](_0x1ab97b[_0x5adb('0x1d')][_0x4cb36c['id']])){_0x1ab97b[_0x5adb('0x1d')][_0x4cb36c['id']]=new FreshdeskAccount(_0x4cb36c);}else{_0x1ab97b['mergeFromDatabase'](_0x1ab97b[_0x5adb('0x1d')][_0x4cb36c['id']],_0x4cb36c);}}}return _0x1ab97b[_0x5adb('0x1d')];};};Realtime[_0x5adb('0x41')]['initZohoAccounts']=function(){var _0x2b34a8=this;return function(_0xd0e5b7){if(_0xd0e5b7){freeIsNotKey(_0xd0e5b7,_0x2b34a8[_0x5adb('0x1e')],'id');for(var _0xfd3471=0x0,_0x4f2da9={};_0xfd3471<_0xd0e5b7[_0x5adb('0x44')];_0xfd3471+=0x1){_0x4f2da9=_0xd0e5b7[_0xfd3471];if(_[_0x5adb('0x45')](_0x2b34a8[_0x5adb('0x1e')][_0x4f2da9['id']])){_0x2b34a8[_0x5adb('0x1e')][_0x4f2da9['id']]=new ZohoAccount(_0x4f2da9);}else{_0x2b34a8[_0x5adb('0x40')](_0x2b34a8['zohoAccounts'][_0x4f2da9['id']],_0x4f2da9);}}}return _0x2b34a8[_0x5adb('0x1e')];};};Realtime['prototype'][_0x5adb('0x4b')]=function(){var _0x4f7227=this;return function(_0x31ae72){if(_0x31ae72){freeIsNotKey(_0x31ae72,_0x4f7227[_0x5adb('0x1f')],'id');for(var _0x1a9358=0x0,_0x42f6d9={};_0x1a9358<_0x31ae72['length'];_0x1a9358+=0x1){_0x42f6d9=_0x31ae72[_0x1a9358];if(_[_0x5adb('0x45')](_0x4f7227[_0x5adb('0x1f')][_0x42f6d9['id']])){_0x4f7227[_0x5adb('0x1f')][_0x42f6d9['id']]=new DeskAccount(_0x42f6d9);}else{_0x4f7227['mergeFromDatabase'](_0x4f7227['deskAccounts'][_0x42f6d9['id']],_0x42f6d9);}}}return _0x4f7227['deskAccounts'];};};Realtime[_0x5adb('0x41')][_0x5adb('0x4c')]=function(){var _0xa5ecc0=this;return function(_0x12a146){if(_0x12a146){freeIsNotKey(_0x12a146,_0xa5ecc0[_0x5adb('0x4d')],'id');for(var _0xb06bee=0x0,_0x204b9b={};_0xb06bee<_0x12a146[_0x5adb('0x44')];_0xb06bee+=0x1){_0x204b9b=_0x12a146[_0xb06bee];if(_[_0x5adb('0x45')](_0xa5ecc0[_0x5adb('0x4d')][_0x204b9b['id']])){_0xa5ecc0[_0x5adb('0x4d')][_0x204b9b['id']]=new SugarcrmAccount(_0x204b9b);}else{_0xa5ecc0[_0x5adb('0x40')](_0xa5ecc0[_0x5adb('0x4d')][_0x204b9b['id']],_0x204b9b);}}}return _0xa5ecc0['sugarcrmAccounts'];};};Realtime['prototype'][_0x5adb('0x4e')]=function(){var _0x27a8e4=this;return function(_0x43cde9){if(_0x43cde9){freeIsNotKey(_0x43cde9,_0x27a8e4[_0x5adb('0x4f')],'id');for(var _0x5d7a9f=0x0,_0xfba0d5={};_0x5d7a9f<_0x43cde9[_0x5adb('0x44')];_0x5d7a9f+=0x1){_0xfba0d5=_0x43cde9[_0x5d7a9f];if(_['isUndefined'](_0x27a8e4[_0x5adb('0x4f')][_0xfba0d5['id']])){_0x27a8e4[_0x5adb('0x4f')][_0xfba0d5['id']]=new VtigerAccount(_0xfba0d5);}else{_0x27a8e4[_0x5adb('0x40')](_0x27a8e4['vtigerAccounts'][_0xfba0d5['id']],_0xfba0d5);}}}return _0x27a8e4[_0x5adb('0x4f')];};};Realtime[_0x5adb('0x41')][_0x5adb('0x50')]=function(){var _0x30c92c=this;return function(_0x330290){if(_0x330290){freeIsNotKey(_0x330290,_0x30c92c[_0x5adb('0x20')],'id');for(var _0x513f26=0x0,_0x836b91={};_0x513f26<_0x330290[_0x5adb('0x44')];_0x513f26+=0x1){_0x836b91=_0x330290[_0x513f26];if(_[_0x5adb('0x45')](_0x30c92c['servicenowAccounts'][_0x836b91['id']])){_0x30c92c[_0x5adb('0x20')][_0x836b91['id']]=new ServicenowAccount(_0x836b91);}else{_0x30c92c[_0x5adb('0x40')](_0x30c92c[_0x5adb('0x20')][_0x836b91['id']],_0x836b91);}}}return _0x30c92c['servicenowAccounts'];};};Realtime[_0x5adb('0x41')]['initDynamics365Accounts']=function(){var _0xa8ff64=this;return function(_0x1e7e3a){if(_0x1e7e3a){freeIsNotKey(_0x1e7e3a,_0xa8ff64[_0x5adb('0x51')],'id');for(var _0x57f0a4=0x0,_0x192b1f={};_0x57f0a4<_0x1e7e3a[_0x5adb('0x44')];_0x57f0a4+=0x1){_0x192b1f=_0x1e7e3a[_0x57f0a4];if(_['isUndefined'](_0xa8ff64[_0x5adb('0x51')][_0x192b1f['id']])){_0xa8ff64[_0x5adb('0x51')][_0x192b1f['id']]=new Dynamics365Account(_0x192b1f);}else{_0xa8ff64[_0x5adb('0x40')](_0xa8ff64[_0x5adb('0x51')][_0x192b1f['id']],_0x192b1f);}}}return _0xa8ff64['dynamics365Accounts'];};};Realtime[_0x5adb('0x41')][_0x5adb('0x52')]=function(){var _0x307f07=this;return function(_0x16716e){if(_0x16716e){freeIsNotKey(_0x16716e,_0x307f07['freshsalesAccounts'],'id');for(var _0x53a4bc=0x0,_0x304512={};_0x53a4bc<_0x16716e['length'];_0x53a4bc+=0x1){_0x304512=_0x16716e[_0x53a4bc];if(_['isUndefined'](_0x307f07['freshsalesAccounts'][_0x304512['id']])){_0x307f07[_0x5adb('0x21')][_0x304512['id']]=new FreshsalesAccount(_0x304512);}else{_0x307f07[_0x5adb('0x40')](_0x307f07['freshsalesAccounts'][_0x304512['id']],_0x304512);}}}return _0x307f07[_0x5adb('0x21')];};};Realtime[_0x5adb('0x41')][_0x5adb('0x53')]=function(){var _0xf6ef8a=this;return function(_0x358a23){for(var _0x126e38=0x0;_0x126e38<_0x358a23[_0x5adb('0x44')];_0x126e38+=0x1){_[_0x5adb('0x54')](_0xf6ef8a['voiceQueues'][_0x358a23[_0x126e38]['name']],_0x358a23[_0x126e38]);}return _0xf6ef8a['voiceQueues'];};};Realtime[_0x5adb('0x41')][_0x5adb('0x55')]=function(){var _0x3a0d1b=this;return function(_0x2a55a3){clearVoiceQueues(_0x3a0d1b[_0x5adb('0x56')]);if(_0x2a55a3){_0x2a55a3=_[_0x5adb('0x57')](_0x2a55a3,_0x5adb('0x58'));for(var _0x25f761 in _0x2a55a3){if(_0x2a55a3['hasOwnProperty'](_0x25f761)){for(var _0x5e55c2=0x0;_0x5e55c2<_0x2a55a3[_0x25f761][_0x5adb('0x44')];_0x5e55c2+=0x1){var _0x56df90=_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x59')];if(_0x3a0d1b[_0x5adb('0x56')][_0x56df90]){if(_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x5a')]){_0x3a0d1b[_0x5adb('0x56')][_0x56df90][_0x5adb('0x31')]+=0x1;}if(_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x5b')]){_0x3a0d1b[_0x5adb('0x56')][_0x56df90][_0x5adb('0x5c')]+=0x1;}_0x3a0d1b['voiceQueues'][_0x56df90][_0x5adb('0x2c')]+=moment(_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x5d')])[_0x5adb('0x5e')](moment(_0x2a55a3[_0x25f761][_0x5e55c2]['queuecallerjoinAt']),_0x5adb('0x5f'))||0x0;if(_0x5e55c2===_0x2a55a3[_0x25f761][_0x5adb('0x44')]-0x1){_0x3a0d1b['voiceQueues'][_0x56df90][_0x5adb('0x2d')]+=moment(_0x2a55a3[_0x25f761][_0x5e55c2]['queuecallercompleteAt']||_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x60')]||_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x61')])['diff'](moment(_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x62')]),_0x5adb('0x5f'))||0x0;_0x3a0d1b[_0x5adb('0x56')][_0x56df90][_0x5adb('0x2a')]+=0x1;if(_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x63')]){_0x3a0d1b[_0x5adb('0x56')][_0x56df90][_0x5adb('0x2b')]+=0x1;_0x3a0d1b[_0x5adb('0x56')][_0x56df90]['sumBillable']+=moment(_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x64')])[_0x5adb('0x5e')](moment(_0x2a55a3[_0x25f761][_0x5e55c2][_0x5adb('0x5d')]),'seconds')||0x0;}}else{_0x3a0d1b['voiceQueues'][_0x56df90][_0x5adb('0x2d')]+=_0x3a0d1b['voiceQueues'][_0x56df90][_0x5adb('0x2c')]||0x0;}}}}}}return _0x3a0d1b[_0x5adb('0x56')];};};Realtime[_0x5adb('0x41')]['initVoiceCallReports']=function(){var _0x3a9735=this;return function(_0x288e4f){clearVoiceCallReports(_0x3a9735[_0x5adb('0x17')]);if(_0x288e4f){for(var _0x3ecc56=0x0;_0x3ecc56<_0x288e4f[_0x5adb('0x44')];_0x3ecc56+=0x1){_0x3a9735['outbound'][_0x5adb('0x2a')]+=0x1;_0x3a9735[_0x5adb('0x17')][_0x5adb('0x2d')]+=_0x288e4f[_0x3ecc56][_0x5adb('0x65')];if(_0x288e4f[_0x3ecc56]['disposition']===_0x5adb('0x66')){_0x3a9735[_0x5adb('0x17')][_0x5adb('0x2b')]+=0x1;_0x3a9735[_0x5adb('0x17')][_0x5adb('0x2c')]+=_0x288e4f[_0x3ecc56][_0x5adb('0x65')]-_0x288e4f[_0x3ecc56][_0x5adb('0x67')]||0x0;_0x3a9735['outbound'][_0x5adb('0x32')]+=_0x288e4f[_0x3ecc56][_0x5adb('0x67')];}}}return _0x3a9735['outbound'];};};Realtime[_0x5adb('0x41')][_0x5adb('0x68')]=function(){var _0x4fc0d5=this;return function(_0x462fa0){if(_0x462fa0){freeIsNotKey(_0x462fa0,_0x4fc0d5['campaigns'],_0x5adb('0x24'));for(var _0x268df2=0x0,_0x4a2ebc={};_0x268df2<_0x462fa0[_0x5adb('0x44')];_0x268df2+=0x1){_0x4a2ebc=_0x462fa0[_0x268df2];if(_['isUndefined'](_0x4fc0d5[_0x5adb('0x15')][_0x4a2ebc[_0x5adb('0x24')]])){_0x4fc0d5[_0x5adb('0x15')][_0x4a2ebc[_0x5adb('0x24')]]=new Campaign(_0x4a2ebc);}else{_0x4fc0d5[_0x5adb('0x40')](_0x4fc0d5['campaigns'][_0x4a2ebc[_0x5adb('0x24')]],_0x4a2ebc);_0x4fc0d5[_0x5adb('0x15')][_0x4a2ebc[_0x5adb('0x24')]][_0x5adb('0x69')]=_0x4a2ebc['SquareProject']?_0x4a2ebc['SquareProject'][_0x5adb('0x24')]:undefined;}}}return _0x4fc0d5[_0x5adb('0x15')];};};Realtime[_0x5adb('0x41')][_0x5adb('0x6a')]=function(){var _0x277668=this;return function(_0xc74e86){if(_0xc74e86){freeIsNotKey(_0xc74e86,_0x277668[_0x5adb('0x6b')],'id');for(var _0x514833=0x0,_0xda26cc={};_0x514833<_0xc74e86[_0x5adb('0x44')];_0x514833+=0x1){_0xda26cc=_0xc74e86[_0x514833];if(_[_0x5adb('0x45')](_0x277668[_0x5adb('0x6b')][_0xda26cc['id']])){_0x277668['voiceExtensions'][_0xda26cc['id']]=new VoiceExtension(_0xda26cc);}else{_0x277668[_0x5adb('0x40')](_0x277668[_0x5adb('0x6b')][_0xda26cc['id']],_0xda26cc);}}}return _0x277668[_0x5adb('0x6b')];};};Realtime[_0x5adb('0x41')][_0x5adb('0x6c')]=function(){var _0x188cbd=this;return function(_0x315ac6){clearCampaigns(_0x188cbd[_0x5adb('0x15')]);for(var _0x1f753e=0x0;_0x1f753e<_0x315ac6['length'];_0x1f753e+=0x1){_[_0x5adb('0x54')](_0x188cbd[_0x5adb('0x15')][_0x315ac6[_0x1f753e]['name']],_0x315ac6[_0x1f753e]);}return _0x188cbd[_0x5adb('0x15')];};};Realtime[_0x5adb('0x41')][_0x5adb('0x6d')]=function(){var _0x3bb3fc=this;return function(_0x200221){if(_0x200221){freeIsNotKey(_0x200221,_0x3bb3fc[_0x5adb('0x22')],'id');for(var _0x450516=0x0,_0x350bb1={};_0x450516<_0x200221['length'];_0x450516+=0x1){_0x350bb1=_0x200221[_0x450516];if(_[_0x5adb('0x45')](_0x3bb3fc[_0x5adb('0x22')][_0x350bb1['id']])){_0x3bb3fc['faxAccounts'][_0x350bb1['id']]=new FaxAccount(_0x350bb1);}else{_0x3bb3fc[_0x5adb('0x40')](_0x3bb3fc[_0x5adb('0x22')][_0x350bb1['id']],_0x350bb1);}}}return _0x3bb3fc[_0x5adb('0x22')];};};Realtime['prototype']['initVoiceQueues']=function(){var _0x2d7a9f=this;return function(_0x328851){if(_0x328851){freeIsNotKey(_0x328851,_0x2d7a9f[_0x5adb('0x56')],'name');for(var _0x14b36f=0x0,_0x321c3a={};_0x14b36f<_0x328851[_0x5adb('0x44')];_0x14b36f+=0x1){_0x321c3a=_0x328851[_0x14b36f];if(_[_0x5adb('0x45')](_0x2d7a9f[_0x5adb('0x56')][_0x321c3a[_0x5adb('0x24')]])){_0x2d7a9f[_0x5adb('0x56')][_0x321c3a[_0x5adb('0x24')]]=new VoiceQueue(_0x321c3a);}else{_0x2d7a9f[_0x5adb('0x40')](_0x2d7a9f[_0x5adb('0x56')][_0x321c3a[_0x5adb('0x24')]],_0x321c3a);}}}return _0x2d7a9f[_0x5adb('0x56')];};};module['exports']=Realtime;
\ No newline at end of file
index 19f24d6..e352222 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2b84=['mergeDBDataToRealtime','assign','hasOwnProperty'];(function(_0x1ab05f,_0x22fff2){var _0x2d18a3=function(_0x2deb05){while(--_0x2deb05){_0x1ab05f['push'](_0x1ab05f['shift']());}};_0x2d18a3(++_0x22fff2);}(_0x2b84,0xb8));var _0x42b8=function(_0x37bd26,_0x5ad346){_0x37bd26=_0x37bd26-0x0;var _0xe83dc4=_0x2b84[_0x37bd26];return _0xe83dc4;};'use strict';function mergeDBDataToRealtime(_0x92e3a6,_0x4ab5e2){var _0xa43fc7=Object[_0x42b8('0x0')]({},_0x92e3a6);for(var _0x5b86ab in _0x4ab5e2){if(_0xa43fc7[_0x42b8('0x1')](_0x5b86ab)){_0xa43fc7[_0x5b86ab]=_0x4ab5e2[_0x5b86ab];}}return _0xa43fc7;}exports[_0x42b8('0x2')]=mergeDBDataToRealtime;
\ No newline at end of file
+var _0x4e63=['hasOwnProperty','mergeDBDataToRealtime','assign'];(function(_0x20140a,_0x1684d5){var _0x2b5fb6=function(_0x289323){while(--_0x289323){_0x20140a['push'](_0x20140a['shift']());}};_0x2b5fb6(++_0x1684d5);}(_0x4e63,0x19d));var _0x34e6=function(_0x302d2a,_0x20761f){_0x302d2a=_0x302d2a-0x0;var _0xda1beb=_0x4e63[_0x302d2a];return _0xda1beb;};'use strict';function mergeDBDataToRealtime(_0x41365d,_0x7da06c){var _0x5c2a88=Object[_0x34e6('0x0')]({},_0x41365d);for(var _0x44278f in _0x7da06c){if(_0x5c2a88[_0x34e6('0x1')](_0x44278f)){_0x5c2a88[_0x44278f]=_0x7da06c[_0x44278f];}}return _0x5c2a88;}exports[_0x34e6('0x2')]=mergeDBDataToRealtime;
\ No newline at end of file
index ebdf652..17f1998 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8722=['./voiceCallReport','./voiceAgentReport','./voiceDialReport','./userReport','realtime','agents','telephones','prototype','sync','xdr','custom:voiceQueueReport','voiceQueueReport','custom:voiceCallReport','custom:voiceAgentReport','voiceAgentReport','bind','custom:voiceDialReport','voiceDialReport','blindTransfer','attendedtransfer','attendedTransfer','findAgent','name','isNil','find','format','SIP/%s','length','accountcode','interface','queuecallercomplete','queuecallercompleteAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexit','queuecallerexitAt','match','keys','channel','split','calleridnum','outbound','voiceCallReport','destination','exten','type','lastapplication','lastdata','queue','context','from-voip-provider','callerid','from-sip','xcally-motion-preview','calleridpreview','originatecalleridnum','destinationchannel','ANSWERED','connectedlinenum','linkedid','transfers','uniqueid','getCallType','getAgentByInternal','membername','create','monitor','monitors','filename','createdAt','calleridname','connectedlinename','xcally-motion-dialer','isArray','forEach','Local','substring','indexOf','mobile','phone','lastIndexOf','transfererlinkedid','exports','util','../ami','../rpc/voiceAgentReport','../rpc/voiceCallReport','../rpc/voiceDialReport','../rpc/voiceQueueReport','../rpc/voiceRecording','./voiceQueueReport'];(function(_0x139079,_0xeee69f){var _0x2351b7=function(_0xb099e6){while(--_0xb099e6){_0x139079['push'](_0x139079['shift']());}};_0x2351b7(++_0xeee69f);}(_0x8722,0x106));var _0x2872=function(_0x4aceb8,_0x277f01){_0x4aceb8=_0x4aceb8-0x0;var _0xfd311a=_0x8722[_0x4aceb8];return _0xfd311a;};'use strict';var _=require('lodash');var moment=require('moment');var util=require(_0x2872('0x0'));var config=require('../../../config/environment');var ami=require(_0x2872('0x1'));var RpcVoiceAgentReport=require(_0x2872('0x2'));var RpcVoiceCallReport=require(_0x2872('0x3'));var RpcVoiceDialReport=require(_0x2872('0x4'));var RpcMemberReport=require('../rpc/memberReport');var RpcVoiceQueueReport=require(_0x2872('0x5'));var RpcVoiceRecording=require(_0x2872('0x6'));var RpcVoiceTransferReport=require('../rpc/voiceTransferReport');var VoiceQueueReport=require(_0x2872('0x7'));var VoiceCallReport=require(_0x2872('0x8'));var VoiceAgentReport=require(_0x2872('0x9'));var VoiceDialReport=require(_0x2872('0xa'));var UserReport=require(_0x2872('0xb'));function Report(_0x13e052){this[_0x2872('0xc')]=_0x13e052;this[_0x2872('0xd')]=_0x13e052[_0x2872('0xd')];this[_0x2872('0xe')]=_0x13e052['telephones'];}Report[_0x2872('0xf')][_0x2872('0x10')]=function(_0x5bc8c7){var _0x24d914=new VoiceQueueReport(this['realtime']);var _0x9cca94=new VoiceAgentReport(this[_0x2872('0xc')]);var _0xfcd666=new VoiceDialReport(this[_0x2872('0xc')]);var _0x581466=new VoiceCallReport(this['realtime']);var _0x4d4d8b=new UserReport(this[_0x2872('0xc')]);if(config[_0x2872('0x11')]&&config[_0x2872('0x11')]['disabled']){ami['on'](_0x2872('0x12'),this[_0x2872('0x13')]['bind'](this));ami['on'](_0x2872('0x14'),this['voiceCallReport']['bind'](this));ami['on'](_0x2872('0x15'),this[_0x2872('0x16')][_0x2872('0x17')](this));ami['on'](_0x2872('0x18'),this[_0x2872('0x19')][_0x2872('0x17')](this));ami['on']('blindtransfer',this[_0x2872('0x1a')][_0x2872('0x17')](this));ami['on'](_0x2872('0x1b'),this[_0x2872('0x1c')][_0x2872('0x17')](this));}};Report[_0x2872('0xf')][_0x2872('0x1d')]=function(_0x8efbff){var _0x17c3fd;_0x17c3fd=_['find'](this[_0x2872('0xd')],function(_0x448811){return _0x448811['accountcode']==_0x8efbff||_0x448811[_0x2872('0x1e')]==_0x8efbff;});if(_[_0x2872('0x1f')](_0x17c3fd)){var _0x10f361=_[_0x2872('0x20')](this[_0x2872('0xe')],function(_0x288b99){return _0x288b99['accountcode']==_0x8efbff||_0x288b99['name']==_0x8efbff;});if(_0x10f361){_0x17c3fd=_[_0x2872('0x20')](this[_0x2872('0xd')],function(_0x464b30){return _0x464b30['interface']==util[_0x2872('0x21')](_0x2872('0x22'),_0x10f361[_0x2872('0x1e')]);});}}return _0x17c3fd;};Report[_0x2872('0xf')][_0x2872('0x13')]=function(_0x3598a0){for(var _0x1603c2=0x0;_0x1603c2<_0x3598a0[_0x2872('0x23')];_0x1603c2+=0x1){var _0x4ae2d2=this['findAgent'](_0x3598a0[_0x1603c2]['connectedlinenum']);if(_0x4ae2d2){_0x3598a0[_0x1603c2]['accountcode']=_0x4ae2d2[_0x2872('0x24')];_0x3598a0[_0x1603c2]['assigned']=!![];_0x3598a0[_0x1603c2]['lastAssignedTo']=_0x4ae2d2['name'];_0x3598a0[_0x1603c2][_0x2872('0x25')]=_[_0x2872('0x1f')](_0x4ae2d2['interface'])?util['format'](_0x2872('0x22'),_0x4ae2d2['name']):_0x4ae2d2[_0x2872('0x25')];if(_0x3598a0[_0x1603c2][_0x2872('0x26')]){_0x3598a0[_0x1603c2][_0x2872('0x27')]=moment()[_0x2872('0x21')](_0x2872('0x28'));}if(_0x3598a0[_0x1603c2][_0x2872('0x29')]){_0x3598a0[_0x1603c2][_0x2872('0x2a')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}RpcMemberReport[_0x2872('0x13')](_0x3598a0[_0x1603c2]);}RpcVoiceQueueReport['create'](_0x3598a0[_0x1603c2]);}};function extractCalleridNumber(_0x245c61){var _0x1e471e=_0x245c61[_0x2872('0x2b')](/<(.*?)>/);return _0x1e471e?_0x1e471e[0x1]:_0x245c61;}Report[_0x2872('0xf')]['getAgentByInternal']=function(_0x41f3ba){for(var _0xa2f1aa=0x0;_0xa2f1aa<Object[_0x2872('0x2c')](this[_0x2872('0xd')])[_0x2872('0x23')];_0xa2f1aa++){var _0xbae02f=Object[_0x2872('0x2c')](this[_0x2872('0xd')])[_0xa2f1aa];var _0x1abe9d=this['agents'][_0xbae02f];if(_0x1abe9d[_0x2872('0x24')]===Number(_0x41f3ba))return _0x1abe9d;}return null;};Report[_0x2872('0xf')]['getCallType']=function(_0x56aab8){var _0x28d81e=_0x56aab8[_0x2872('0x2d')][_0x2872('0x2e')]('-')[0x0];var _0x90d3ed=this[_0x2872('0xd')][_0x28d81e];if(!_0x90d3ed)_0x90d3ed=this['getAgentByInternal'](_0x56aab8[_0x2872('0x2f')]);return!_0x90d3ed?_0x2872('0x30'):'internal';};Report[_0x2872('0xf')][_0x2872('0x31')]=function(_0x2f95bd){_0x2f95bd[_0x2872('0x32')]=_0x2f95bd[_0x2872('0x32')]||_0x2f95bd[_0x2872('0x33')];if(_0x2f95bd[_0x2872('0x34')]=='dialer'){_0x2f95bd[_0x2872('0x35')]='queue';_0x2f95bd[_0x2872('0x36')]=_0x2f95bd[_0x2872('0x37')];if(_0x2f95bd[_0x2872('0x38')]==_0x2872('0x39')){_0x2f95bd[_0x2872('0x24')]='';_0x2f95bd[_0x2872('0x32')]=extractCalleridNumber(_0x2f95bd[_0x2872('0x3a')]);}else if(_0x2f95bd['context']==_0x2872('0x3b')){if(_0x2f95bd[_0x2872('0x32')]==_0x2872('0x3c')){_0x2f95bd[_0x2872('0x32')]=extractCalleridNumber(_0x2f95bd[_0x2872('0x3d')]);_0x2f95bd[_0x2872('0x2f')]=_0x2f95bd[_0x2872('0x3e')];_0x2f95bd['destinationchannel']=[_0x2f95bd[_0x2872('0x2d')],_0x2f95bd[_0x2872('0x2d')]=_0x2f95bd[_0x2872('0x3f')]][0x0];_0x2f95bd[_0x2872('0x3a')]=_0x2f95bd[_0x2872('0x3d')];}else{_0x2f95bd[_0x2872('0x32')]=_0x2f95bd[_0x2872('0x2f')];_0x2f95bd[_0x2872('0x2f')]=_0x2f95bd['originatecalleridnum'];if(_0x2f95bd['disposition']==_0x2872('0x40')){_0x2f95bd[_0x2872('0x24')]=_0x2f95bd[_0x2872('0x41')];}else{_0x2f95bd[_0x2872('0x24')]='';}}}}else{_0x2f95bd[_0x2872('0x3a')]=util['format']('\x22%s\x22\x20<%s>',_0x2f95bd['calleridname'],_0x2f95bd[_0x2872('0x2f')]);}if(RpcVoiceTransferReport['transfers'][_0x2f95bd[_0x2872('0x42')]]){var _0x4af201=RpcVoiceTransferReport[_0x2872('0x43')][_0x2f95bd[_0x2872('0x42')]];_0x4af201['transfereelinkedid']=_0x2f95bd[_0x2872('0x44')];RpcVoiceTransferReport[_0x2872('0x1a')](_0x4af201);delete RpcVoiceTransferReport[_0x2872('0x43')][_0x2f95bd['linkedid']];}if(_[_0x2872('0x1f')](_0x2f95bd['type'])){_0x2f95bd[_0x2872('0x34')]=this[_0x2872('0x45')](_0x2f95bd);}if(_[_0x2872('0x1f')](_0x2f95bd['UserId'])){var _0x3a797c=_0x2f95bd[_0x2872('0x2d')][_0x2872('0x2e')]('-')[0x0];var _0x4dbda4=this[_0x2872('0xd')][_0x3a797c];if(!_0x4dbda4)_0x4dbda4=this[_0x2872('0x46')](_0x2f95bd['accountcode']);if(_0x4dbda4){_0x2f95bd['UserId']=_0x4dbda4['id'];_0x2f95bd[_0x2872('0x47')]=_0x4dbda4[_0x2872('0x1e')];}}RpcVoiceCallReport[_0x2872('0x48')](_0x2f95bd);if(_0x2f95bd[_0x2872('0x49')]){for(var _0x3f4355=0x0;_0x3f4355<_0x2f95bd[_0x2872('0x4a')][_0x2872('0x23')];_0x3f4355+=0x1){_0x2f95bd['monitorFilename']=_0x2f95bd[_0x2872('0x4a')][_0x3f4355][_0x2872('0x4b')];_0x2f95bd[_0x2872('0x4c')]=_0x2f95bd['monitors'][_0x3f4355][_0x2872('0x4c')];if(_0x2f95bd[_0x2872('0x33')]==_0x2872('0x3c')){_0x2f95bd[_0x2872('0x2f')]=_0x2f95bd[_0x2872('0x41')];_0x2f95bd[_0x2872('0x4d')]=_0x2f95bd['connectedlinename'];_0x2f95bd[_0x2872('0x41')]=_0x2f95bd[_0x2872('0x24')];_0x2f95bd[_0x2872('0x4e')]=_0x2f95bd[_0x2872('0x47')];_0x2f95bd['exten']=_0x2f95bd[_0x2872('0x3e')];}else if(_0x2f95bd[_0x2872('0x33')]==_0x2872('0x4f')){_0x2f95bd['calleridnum']=_0x2f95bd[_0x2872('0x32')];_0x2f95bd[_0x2872('0x33')]=_0x2f95bd[_0x2872('0x3e')];}RpcVoiceRecording[_0x2872('0x48')](_0x2f95bd);}}};Report[_0x2872('0xf')][_0x2872('0x16')]=function(_0x14c57a){if(_[_0x2872('0x50')](_0x14c57a)){_0x14c57a[_0x2872('0x51')](function(_0x414fef){RpcVoiceAgentReport[_0x2872('0x48')](_0x414fef);});}else{RpcVoiceAgentReport[_0x2872('0x48')](_0x14c57a);}};Report[_0x2872('0xf')][_0x2872('0x19')]=function(_0x551fa2){RpcVoiceDialReport[_0x2872('0x48')](_0x551fa2);var _0x1054a2;var _0x549bdd;var _0xc6b446=_0x551fa2[_0x2872('0x2d')];if(_['startsWith'](_0xc6b446,_0x2872('0x52'))){_0x549bdd=_0xc6b446[_0x2872('0x53')](_0xc6b446[_0x2872('0x54')]('/')+0x1,_0xc6b446[_0x2872('0x54')]('@'));_0x1054a2=_[_0x2872('0x20')](this[_0x2872('0xd')],function(_0x455ad0){return _0x455ad0[_0x2872('0x55')]==_0x549bdd||_0x455ad0[_0x2872('0x56')]==_0x549bdd||_0x455ad0[_0x2872('0x24')]==_0x549bdd;});}else{_0x549bdd=_0xc6b446[_0x2872('0x53')](_0xc6b446[_0x2872('0x54')]('/')+0x1,_0xc6b446[_0x2872('0x57')]('-'));_0x1054a2=this[_0x2872('0x1d')](_0x549bdd);}if(_0x1054a2){_0x551fa2[_0x2872('0x25')]=_[_0x2872('0x1f')](_0x1054a2[_0x2872('0x25')])?util[_0x2872('0x21')]('SIP/%s',_0x1054a2[_0x2872('0x1e')]):_0x1054a2['interface'];_0x551fa2[_0x2872('0x47')]=_0x1054a2['name'];_0x551fa2[_0x2872('0x24')]=_0x1054a2['accountcode'];RpcMemberReport[_0x2872('0x19')](_0x551fa2);}};Report[_0x2872('0xf')][_0x2872('0x1a')]=function(_0x2416d0){RpcVoiceTransferReport['transfers'][_0x2416d0[_0x2872('0x58')]]=_0x2416d0;};Report['prototype'][_0x2872('0x1c')]=function(_0x20771b){RpcVoiceTransferReport[_0x2872('0x1c')](_0x20771b);};module[_0x2872('0x59')]=Report;
\ No newline at end of file
+var _0xd0cb=['from-sip','xcally-motion-preview','originatecalleridnum','destinationchannel','calleridpreview','ANSWERED','\x22%s\x22\x20<%s>','calleridname','transfers','linkedid','transfereelinkedid','uniqueid','UserId','membername','monitors','monitorFilename','filename','createdAt','connectedlinename','isArray','forEach','Local','substring','indexOf','mobile','phone','lastIndexOf','blindTransfer','transfererlinkedid','exports','lodash','moment','../../../config/environment','../ami','../rpc/voiceCallReport','../rpc/voiceDialReport','../rpc/voiceQueueReport','../rpc/voiceRecording','../rpc/voiceTransferReport','./voiceQueueReport','./voiceAgentReport','./userReport','realtime','agents','telephones','prototype','sync','xdr','disabled','voiceQueueReport','bind','custom:voiceCallReport','voiceCallReport','custom:voiceAgentReport','voiceAgentReport','custom:voiceDialReport','voiceDialReport','blindtransfer','attendedtransfer','attendedTransfer','find','accountcode','name','isNil','interface','format','length','findAgent','connectedlinenum','assigned','lastAssignedTo','SIP/%s','queuecallercompleteAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexit','queuecallerexitAt','create','match','getAgentByInternal','keys','getCallType','channel','split','calleridnum','outbound','destination','exten','type','dialer','lastapplication','lastdata','queue','context','from-voip-provider','callerid'];(function(_0x1d6db6,_0x5b1c04){var _0x498f2b=function(_0x42dc16){while(--_0x42dc16){_0x1d6db6['push'](_0x1d6db6['shift']());}};_0x498f2b(++_0x5b1c04);}(_0xd0cb,0x19a));var _0xbd0c=function(_0x54f97e,_0x5aa5cd){_0x54f97e=_0x54f97e-0x0;var _0x40d7eb=_0xd0cb[_0x54f97e];return _0x40d7eb;};'use strict';var _=require(_0xbd0c('0x0'));var moment=require(_0xbd0c('0x1'));var util=require('util');var config=require(_0xbd0c('0x2'));var ami=require(_0xbd0c('0x3'));var RpcVoiceAgentReport=require('../rpc/voiceAgentReport');var RpcVoiceCallReport=require(_0xbd0c('0x4'));var RpcVoiceDialReport=require(_0xbd0c('0x5'));var RpcMemberReport=require('../rpc/memberReport');var RpcVoiceQueueReport=require(_0xbd0c('0x6'));var RpcVoiceRecording=require(_0xbd0c('0x7'));var RpcVoiceTransferReport=require(_0xbd0c('0x8'));var VoiceQueueReport=require(_0xbd0c('0x9'));var VoiceCallReport=require('./voiceCallReport');var VoiceAgentReport=require(_0xbd0c('0xa'));var VoiceDialReport=require('./voiceDialReport');var UserReport=require(_0xbd0c('0xb'));function Report(_0x25eff2){this[_0xbd0c('0xc')]=_0x25eff2;this['agents']=_0x25eff2[_0xbd0c('0xd')];this[_0xbd0c('0xe')]=_0x25eff2[_0xbd0c('0xe')];}Report[_0xbd0c('0xf')][_0xbd0c('0x10')]=function(_0xc62596){var _0x5a040e=new VoiceQueueReport(this[_0xbd0c('0xc')]);var _0x213394=new VoiceAgentReport(this[_0xbd0c('0xc')]);var _0x476750=new VoiceDialReport(this['realtime']);var _0x12760d=new VoiceCallReport(this['realtime']);var _0x11895e=new UserReport(this['realtime']);if(config['xdr']&&config[_0xbd0c('0x11')][_0xbd0c('0x12')]){ami['on']('custom:voiceQueueReport',this[_0xbd0c('0x13')][_0xbd0c('0x14')](this));ami['on'](_0xbd0c('0x15'),this[_0xbd0c('0x16')][_0xbd0c('0x14')](this));ami['on'](_0xbd0c('0x17'),this[_0xbd0c('0x18')][_0xbd0c('0x14')](this));ami['on'](_0xbd0c('0x19'),this[_0xbd0c('0x1a')]['bind'](this));ami['on'](_0xbd0c('0x1b'),this['blindTransfer'][_0xbd0c('0x14')](this));ami['on'](_0xbd0c('0x1c'),this[_0xbd0c('0x1d')]['bind'](this));}};Report['prototype']['findAgent']=function(_0x44c3e2){var _0x4d671a;_0x4d671a=_[_0xbd0c('0x1e')](this[_0xbd0c('0xd')],function(_0x102ffd){return _0x102ffd[_0xbd0c('0x1f')]==_0x44c3e2||_0x102ffd[_0xbd0c('0x20')]==_0x44c3e2;});if(_[_0xbd0c('0x21')](_0x4d671a)){var _0x2bd38e=_['find'](this[_0xbd0c('0xe')],function(_0x93573d){return _0x93573d['accountcode']==_0x44c3e2||_0x93573d[_0xbd0c('0x20')]==_0x44c3e2;});if(_0x2bd38e){_0x4d671a=_[_0xbd0c('0x1e')](this[_0xbd0c('0xd')],function(_0x2e79d9){return _0x2e79d9[_0xbd0c('0x22')]==util[_0xbd0c('0x23')]('SIP/%s',_0x2bd38e['name']);});}}return _0x4d671a;};Report[_0xbd0c('0xf')][_0xbd0c('0x13')]=function(_0x6baa80){for(var _0x2b2d11=0x0;_0x2b2d11<_0x6baa80[_0xbd0c('0x24')];_0x2b2d11+=0x1){var _0x2badb4=this[_0xbd0c('0x25')](_0x6baa80[_0x2b2d11][_0xbd0c('0x26')]);if(_0x2badb4){_0x6baa80[_0x2b2d11][_0xbd0c('0x1f')]=_0x2badb4[_0xbd0c('0x1f')];_0x6baa80[_0x2b2d11][_0xbd0c('0x27')]=!![];_0x6baa80[_0x2b2d11][_0xbd0c('0x28')]=_0x2badb4['name'];_0x6baa80[_0x2b2d11][_0xbd0c('0x22')]=_[_0xbd0c('0x21')](_0x2badb4[_0xbd0c('0x22')])?util[_0xbd0c('0x23')](_0xbd0c('0x29'),_0x2badb4[_0xbd0c('0x20')]):_0x2badb4['interface'];if(_0x6baa80[_0x2b2d11]['queuecallercomplete']){_0x6baa80[_0x2b2d11][_0xbd0c('0x2a')]=moment()['format'](_0xbd0c('0x2b'));}if(_0x6baa80[_0x2b2d11][_0xbd0c('0x2c')]){_0x6baa80[_0x2b2d11][_0xbd0c('0x2d')]=moment()['format'](_0xbd0c('0x2b'));}RpcMemberReport[_0xbd0c('0x13')](_0x6baa80[_0x2b2d11]);}RpcVoiceQueueReport[_0xbd0c('0x2e')](_0x6baa80[_0x2b2d11]);}};function extractCalleridNumber(_0x3891b4){var _0x5c9015=_0x3891b4[_0xbd0c('0x2f')](/<(.*?)>/);return _0x5c9015?_0x5c9015[0x1]:_0x3891b4;}Report[_0xbd0c('0xf')][_0xbd0c('0x30')]=function(_0x1bee30){for(var _0x15f4c8=0x0;_0x15f4c8<Object[_0xbd0c('0x31')](this[_0xbd0c('0xd')])[_0xbd0c('0x24')];_0x15f4c8++){var _0xa416d7=Object[_0xbd0c('0x31')](this[_0xbd0c('0xd')])[_0x15f4c8];var _0x226ef6=this[_0xbd0c('0xd')][_0xa416d7];if(_0x226ef6[_0xbd0c('0x1f')]===Number(_0x1bee30))return _0x226ef6;}return null;};Report[_0xbd0c('0xf')][_0xbd0c('0x32')]=function(_0x19f8be){var _0x3d4350=_0x19f8be[_0xbd0c('0x33')][_0xbd0c('0x34')]('-')[0x0];var _0x5902cb=this['agents'][_0x3d4350];if(!_0x5902cb)_0x5902cb=this[_0xbd0c('0x30')](_0x19f8be[_0xbd0c('0x35')]);return!_0x5902cb?_0xbd0c('0x36'):'internal';};Report[_0xbd0c('0xf')]['voiceCallReport']=function(_0x3c3ad3){_0x3c3ad3[_0xbd0c('0x37')]=_0x3c3ad3['destination']||_0x3c3ad3[_0xbd0c('0x38')];if(_0x3c3ad3[_0xbd0c('0x39')]==_0xbd0c('0x3a')){_0x3c3ad3[_0xbd0c('0x3b')]='queue';_0x3c3ad3[_0xbd0c('0x3c')]=_0x3c3ad3[_0xbd0c('0x3d')];if(_0x3c3ad3[_0xbd0c('0x3e')]==_0xbd0c('0x3f')){_0x3c3ad3[_0xbd0c('0x1f')]='';_0x3c3ad3[_0xbd0c('0x37')]=extractCalleridNumber(_0x3c3ad3[_0xbd0c('0x40')]);}else if(_0x3c3ad3['context']==_0xbd0c('0x41')){if(_0x3c3ad3[_0xbd0c('0x37')]==_0xbd0c('0x42')){_0x3c3ad3['destination']=extractCalleridNumber(_0x3c3ad3['calleridpreview']);_0x3c3ad3[_0xbd0c('0x35')]=_0x3c3ad3[_0xbd0c('0x43')];_0x3c3ad3[_0xbd0c('0x44')]=[_0x3c3ad3['channel'],_0x3c3ad3['channel']=_0x3c3ad3[_0xbd0c('0x44')]][0x0];_0x3c3ad3['callerid']=_0x3c3ad3[_0xbd0c('0x45')];}else{_0x3c3ad3[_0xbd0c('0x37')]=_0x3c3ad3['calleridnum'];_0x3c3ad3[_0xbd0c('0x35')]=_0x3c3ad3[_0xbd0c('0x43')];if(_0x3c3ad3['disposition']==_0xbd0c('0x46')){_0x3c3ad3[_0xbd0c('0x1f')]=_0x3c3ad3[_0xbd0c('0x26')];}else{_0x3c3ad3[_0xbd0c('0x1f')]='';}}}}else{_0x3c3ad3[_0xbd0c('0x40')]=util[_0xbd0c('0x23')](_0xbd0c('0x47'),_0x3c3ad3[_0xbd0c('0x48')],_0x3c3ad3['calleridnum']);}if(RpcVoiceTransferReport[_0xbd0c('0x49')][_0x3c3ad3[_0xbd0c('0x4a')]]){var _0x322a62=RpcVoiceTransferReport[_0xbd0c('0x49')][_0x3c3ad3[_0xbd0c('0x4a')]];_0x322a62[_0xbd0c('0x4b')]=_0x3c3ad3[_0xbd0c('0x4c')];RpcVoiceTransferReport['blindTransfer'](_0x322a62);delete RpcVoiceTransferReport[_0xbd0c('0x49')][_0x3c3ad3[_0xbd0c('0x4a')]];}if(_[_0xbd0c('0x21')](_0x3c3ad3[_0xbd0c('0x39')])){_0x3c3ad3['type']=this['getCallType'](_0x3c3ad3);}if(_[_0xbd0c('0x21')](_0x3c3ad3['UserId'])){var _0x5d5479=_0x3c3ad3[_0xbd0c('0x33')][_0xbd0c('0x34')]('-')[0x0];var _0x2163a5=this[_0xbd0c('0xd')][_0x5d5479];if(!_0x2163a5)_0x2163a5=this[_0xbd0c('0x30')](_0x3c3ad3[_0xbd0c('0x1f')]);if(_0x2163a5){_0x3c3ad3[_0xbd0c('0x4d')]=_0x2163a5['id'];_0x3c3ad3[_0xbd0c('0x4e')]=_0x2163a5[_0xbd0c('0x20')];}}RpcVoiceCallReport[_0xbd0c('0x2e')](_0x3c3ad3);if(_0x3c3ad3['monitor']){for(var _0x532080=0x0;_0x532080<_0x3c3ad3[_0xbd0c('0x4f')][_0xbd0c('0x24')];_0x532080+=0x1){_0x3c3ad3[_0xbd0c('0x50')]=_0x3c3ad3[_0xbd0c('0x4f')][_0x532080][_0xbd0c('0x51')];_0x3c3ad3[_0xbd0c('0x52')]=_0x3c3ad3['monitors'][_0x532080][_0xbd0c('0x52')];if(_0x3c3ad3[_0xbd0c('0x38')]==_0xbd0c('0x42')){_0x3c3ad3[_0xbd0c('0x35')]=_0x3c3ad3[_0xbd0c('0x26')];_0x3c3ad3[_0xbd0c('0x48')]=_0x3c3ad3[_0xbd0c('0x53')];_0x3c3ad3['connectedlinenum']=_0x3c3ad3[_0xbd0c('0x1f')];_0x3c3ad3[_0xbd0c('0x53')]=_0x3c3ad3['membername'];_0x3c3ad3[_0xbd0c('0x38')]=_0x3c3ad3[_0xbd0c('0x43')];}else if(_0x3c3ad3[_0xbd0c('0x38')]=='xcally-motion-dialer'){_0x3c3ad3[_0xbd0c('0x35')]=_0x3c3ad3[_0xbd0c('0x37')];_0x3c3ad3[_0xbd0c('0x38')]=_0x3c3ad3[_0xbd0c('0x43')];}RpcVoiceRecording[_0xbd0c('0x2e')](_0x3c3ad3);}}};Report[_0xbd0c('0xf')]['voiceAgentReport']=function(_0x39fc14){if(_[_0xbd0c('0x54')](_0x39fc14)){_0x39fc14[_0xbd0c('0x55')](function(_0x2f8c75){RpcVoiceAgentReport[_0xbd0c('0x2e')](_0x2f8c75);});}else{RpcVoiceAgentReport['create'](_0x39fc14);}};Report[_0xbd0c('0xf')][_0xbd0c('0x1a')]=function(_0x56a714){RpcVoiceDialReport[_0xbd0c('0x2e')](_0x56a714);var _0x2923fa;var _0x2705c6;var _0x5123d8=_0x56a714[_0xbd0c('0x33')];if(_['startsWith'](_0x5123d8,_0xbd0c('0x56'))){_0x2705c6=_0x5123d8[_0xbd0c('0x57')](_0x5123d8[_0xbd0c('0x58')]('/')+0x1,_0x5123d8[_0xbd0c('0x58')]('@'));_0x2923fa=_[_0xbd0c('0x1e')](this[_0xbd0c('0xd')],function(_0x91dfef){return _0x91dfef[_0xbd0c('0x59')]==_0x2705c6||_0x91dfef[_0xbd0c('0x5a')]==_0x2705c6||_0x91dfef[_0xbd0c('0x1f')]==_0x2705c6;});}else{_0x2705c6=_0x5123d8[_0xbd0c('0x57')](_0x5123d8[_0xbd0c('0x58')]('/')+0x1,_0x5123d8[_0xbd0c('0x5b')]('-'));_0x2923fa=this['findAgent'](_0x2705c6);}if(_0x2923fa){_0x56a714[_0xbd0c('0x22')]=_[_0xbd0c('0x21')](_0x2923fa[_0xbd0c('0x22')])?util[_0xbd0c('0x23')]('SIP/%s',_0x2923fa[_0xbd0c('0x20')]):_0x2923fa[_0xbd0c('0x22')];_0x56a714[_0xbd0c('0x4e')]=_0x2923fa[_0xbd0c('0x20')];_0x56a714['accountcode']=_0x2923fa[_0xbd0c('0x1f')];RpcMemberReport[_0xbd0c('0x1a')](_0x56a714);}};Report[_0xbd0c('0xf')][_0xbd0c('0x5c')]=function(_0x55df60){RpcVoiceTransferReport['transfers'][_0x55df60[_0xbd0c('0x5d')]]=_0x55df60;};Report[_0xbd0c('0xf')][_0xbd0c('0x1d')]=function(_0x34beb3){RpcVoiceTransferReport['attendedTransfer'](_0x34beb3);};module[_0xbd0c('0x5e')]=Report;
\ No newline at end of file
index 4f3b65b..22a8163 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x36bf=['redis','socket.io-emitter','trunks','agents','telephones','registryentry','syncRegistry','bind','registry','syncPeerStatus','syncRealtimeShow','actionSipShowRegistry','catch','error','[userReport][sipshowregistry]','inspect','resolve','then','actionDeviceStateList','[userReport][devicestatelist]','actionSipPeerStatus','[userReport][sippeerstatus]','prototype','emit','isNotNull','info','username','state','debug','[userReport][registry]','find','stateRegistry','merge','omit','event','actionid','name','trunk:save','syncDeviceState','[userReport][devicestatechange]\x20device:%s\x20state:%s','device','[userReport][devicestatechange]','local','toLowerCase','inuse','toNumber','format','updateStatusRealtime','stateTime','[userReport][devicestatechange]\x20sending\x20telephone:save\x20event:','telephone:save','[userReport][devicestatechange]\x20sending\x20trunk:save\x20event:','trunk:%s','Local','substring','indexOf','mobile','phone','accountcode','peer','peerstatus','registered','status','address','telephone:%s','exports','util','ioredis','bluebird','../../../config/logger','ami','defaults'];(function(_0x457585,_0x47e33a){var _0x1f96e1=function(_0x5be312){while(--_0x5be312){_0x457585['push'](_0x457585['shift']());}};_0x1f96e1(++_0x47e33a);}(_0x36bf,0x1f2));var _0xf36b=function(_0x935e47,_0x953bc8){_0x935e47=_0x935e47-0x0;var _0x2b8956=_0x36bf[_0x935e47];return _0x2b8956;};'use strict';var _=require('lodash');var moment=require('moment');var util=require(_0xf36b('0x0'));var Redis=require(_0xf36b('0x1'));var BPromise=require(_0xf36b('0x2'));var config=require('../../../config/environment');var logger=require(_0xf36b('0x3'))(_0xf36b('0x4'));var ami=require('../ami');config['redis']=_[_0xf36b('0x5')](config[_0xf36b('0x6')],{'host':'localhost','port':0x18eb});var io=require(_0xf36b('0x7'))(new Redis(config['redis']));function UserReport(_0x1d8d86){this[_0xf36b('0x8')]=_0x1d8d86[_0xf36b('0x8')];this['agents']=_0x1d8d86[_0xf36b('0x9')];this[_0xf36b('0xa')]=_0x1d8d86[_0xf36b('0xa')];ami['on'](_0xf36b('0xb'),this[_0xf36b('0xc')][_0xf36b('0xd')](this));ami['on'](_0xf36b('0xe'),this[_0xf36b('0xc')]['bind'](this));ami['on']('devicestatechange',this['syncDeviceState'][_0xf36b('0xd')](this));ami['on']('peerstatus',this[_0xf36b('0xf')][_0xf36b('0xd')](this));return this[_0xf36b('0x10')]();}function showSipRegistrations(){Promise['resolve']()['then'](ami[_0xf36b('0x11')]())[_0xf36b('0x12')](function(_0x4c54b3){logger[_0xf36b('0x13')](_0xf36b('0x14'),util[_0xf36b('0x15')](_0x4c54b3,{'showHidden':![],'depth':null}));});}function listDeviceStates(){Promise[_0xf36b('0x16')]()[_0xf36b('0x17')](ami[_0xf36b('0x18')]())[_0xf36b('0x12')](function(_0x2f9fd2){logger[_0xf36b('0x13')](_0xf36b('0x19'),util['inspect'](_0x2f9fd2,{'showHidden':![],'depth':null}));});}function showPeersStatus(){Promise['resolve']()[_0xf36b('0x17')](ami[_0xf36b('0x1a')]())[_0xf36b('0x12')](function(_0x5fd7bb){logger['error'](_0xf36b('0x1b'),util['inspect'](_0x5fd7bb,{'showHidden':![],'depth':null}));});}UserReport[_0xf36b('0x1c')][_0xf36b('0x10')]=function(){setInterval(function(){BPromise['resolve']()[_0xf36b('0x17')](showSipRegistrations())[_0xf36b('0x17')](listDeviceStates())[_0xf36b('0x17')](showPeersStatus());},0x32c8);};UserReport[_0xf36b('0x1c')]['isNotNull']=function(_0x14f92f){return _0x14f92f!==null&&!_['isUndefined'](_0x14f92f);};UserReport['prototype'][_0xf36b('0x1d')]=function(_0xc1ee31,_0x565f90,_0x3b9232){io['to'](_0xc1ee31)[_0xf36b('0x1d')](_0x565f90,_0x3b9232);};UserReport['prototype'][_0xf36b('0xc')]=function(_0x564f66){try{if(this[_0xf36b('0x1e')](_0x564f66)){logger[_0xf36b('0x1f')]('[userReport][registry]\x20registry:%s\x20state:%s',_0x564f66[_0xf36b('0x20')],_0x564f66[_0xf36b('0x21')]);logger[_0xf36b('0x22')](_0xf36b('0x23'),util[_0xf36b('0x15')](_0x564f66,{'showHidden':![],'depth':null}));var _0x200177=_[_0xf36b('0x24')](this[_0xf36b('0x8')],{'defaultuser':_0x564f66[_0xf36b('0x20')]});if(_0x200177){_0x564f66[_0xf36b('0x25')]=_0x564f66[_0xf36b('0x21')];_[_0xf36b('0x26')](_0x200177,_[_0xf36b('0x27')](_0x564f66,[_0xf36b('0x28'),_0xf36b('0x29'),'username',_0xf36b('0x21')]));logger[_0xf36b('0x22')]('[userReport][registry]\x20sending\x20trunk:save\x20event:',util[_0xf36b('0x15')](_0x200177,{'showHidden':![],'depth':null}));this[_0xf36b('0x1d')](util['format']('trunk:%s',_0x200177[_0xf36b('0x2a')]),_0xf36b('0x2b'),_0x200177);}}}catch(_0x93e31a){logger[_0xf36b('0x13')](_0xf36b('0x23'),util[_0xf36b('0x15')](_0x93e31a,{'showHidden':![],'depth':null}));}};UserReport[_0xf36b('0x1c')][_0xf36b('0x2c')]=function(_0x1bc195){try{if(this[_0xf36b('0x1e')](_0x1bc195)){logger['info'](_0xf36b('0x2d'),_0x1bc195[_0xf36b('0x2e')],_0x1bc195['state']);logger[_0xf36b('0x22')](_0xf36b('0x2f'),util[_0xf36b('0x15')](_0x1bc195,{'showHidden':![],'depth':null}));if(this[_0xf36b('0x9')][_0x1bc195['device']]){if(!this['agents'][_0x1bc195[_0xf36b('0x2e')]][_0xf36b('0x30')]||_0x1bc195[_0xf36b('0x21')][_0xf36b('0x31')]()==_0xf36b('0x32')){this[_0xf36b('0x9')][_0x1bc195[_0xf36b('0x2e')]]['local']=![];if(this[_0xf36b('0x9')][_0x1bc195['device']][_0xf36b('0x21')]!==_0x1bc195[_0xf36b('0x21')][_0xf36b('0x31')]()){this[_0xf36b('0x9')][_0x1bc195[_0xf36b('0x2e')]]['stateTime']=_[_0xf36b('0x33')](moment()[_0xf36b('0x34')]('x'));}this['agents'][_0x1bc195[_0xf36b('0x2e')]]['state']=_0x1bc195[_0xf36b('0x21')][_0xf36b('0x31')]();this[_0xf36b('0x9')][_0x1bc195[_0xf36b('0x2e')]][_0xf36b('0x35')](_0x1bc195);}}else if(this[_0xf36b('0xa')][_0x1bc195[_0xf36b('0x2e')]]){if(this[_0xf36b('0xa')][_0x1bc195[_0xf36b('0x2e')]]['state']!==_0x1bc195['state'][_0xf36b('0x31')]()){this['telephones'][_0x1bc195[_0xf36b('0x2e')]][_0xf36b('0x36')]=_[_0xf36b('0x33')](moment()['format']('x'));}this[_0xf36b('0xa')][_0x1bc195['device']][_0xf36b('0x21')]=_0x1bc195[_0xf36b('0x21')][_0xf36b('0x31')]();logger[_0xf36b('0x22')](_0xf36b('0x37'),util['inspect'](this['telephones'][_0x1bc195[_0xf36b('0x2e')]],{'showHidden':![],'depth':null}));this[_0xf36b('0x1d')](util[_0xf36b('0x34')]('telephone:%s',this['telephones'][_0x1bc195[_0xf36b('0x2e')]][_0xf36b('0x2a')]),_0xf36b('0x38'),this['telephones'][_0x1bc195[_0xf36b('0x2e')]]);}else if(this['trunks'][_0x1bc195[_0xf36b('0x2e')]]){if(this[_0xf36b('0x8')][_0x1bc195['device']]['state']!==_0x1bc195[_0xf36b('0x21')][_0xf36b('0x31')]()){this[_0xf36b('0x8')][_0x1bc195[_0xf36b('0x2e')]][_0xf36b('0x36')]=_[_0xf36b('0x33')](moment()[_0xf36b('0x34')]('x'));}this['trunks'][_0x1bc195[_0xf36b('0x2e')]][_0xf36b('0x21')]=_0x1bc195[_0xf36b('0x21')][_0xf36b('0x31')]();logger[_0xf36b('0x22')](_0xf36b('0x39'),util[_0xf36b('0x15')](this[_0xf36b('0x8')][_0x1bc195[_0xf36b('0x2e')]],{'showHidden':![],'depth':null}));this[_0xf36b('0x1d')](util[_0xf36b('0x34')](_0xf36b('0x3a'),this['trunks'][_0x1bc195[_0xf36b('0x2e')]][_0xf36b('0x2a')]),_0xf36b('0x2b'),this[_0xf36b('0x8')][_0x1bc195[_0xf36b('0x2e')]]);}else if(_['startsWith'](_0x1bc195['device'],_0xf36b('0x3b'))){var _0x5ef83a=_0x1bc195['device'];var _0x219b78=_0x5ef83a[_0xf36b('0x3c')](_0x5ef83a[_0xf36b('0x3d')]('/')+0x1,_0x5ef83a[_0xf36b('0x3d')]('@'));var _0x1f222c=_['find'](this[_0xf36b('0x9')],function(_0x56ec84){return _0x56ec84[_0xf36b('0x3e')]==_0x219b78||_0x56ec84[_0xf36b('0x3f')]==_0x219b78||_0x56ec84[_0xf36b('0x40')]==_0x219b78;});if(_0x1f222c){if(_0x1f222c[_0xf36b('0x21')]!==_0x1bc195[_0xf36b('0x21')]['toLowerCase']()){_0x1f222c['stateTime']=_[_0xf36b('0x33')](moment()[_0xf36b('0x34')]('x'));}_0x1f222c['state']=_0x1bc195[_0xf36b('0x21')]['toLowerCase']();_0x1f222c[_0xf36b('0x30')]=!![];_0x1f222c[_0xf36b('0x35')](_0x1bc195);}}}}catch(_0x5cf003){logger['error'](_0xf36b('0x2f'),util[_0xf36b('0x15')](_0x5cf003,{'showHidden':![],'depth':null}));}};UserReport[_0xf36b('0x1c')][_0xf36b('0xf')]=function(_0x103140){try{if(this[_0xf36b('0x1e')](_0x103140)&&this[_0xf36b('0x1e')](_0x103140['peerstatus'])){logger[_0xf36b('0x1f')]('[userReport][peerstatus]\x20peer:%s\x20address:%s\x20status:%s',_0x103140[_0xf36b('0x41')],_0x103140['address'],_0x103140[_0xf36b('0x42')]);logger[_0xf36b('0x22')]('[userReport][peerstatus]',util['inspect'](_0x103140,{'showHidden':![],'depth':null}));if(this[_0xf36b('0x9')][_0x103140[_0xf36b('0x41')]]){if(!this[_0xf36b('0x9')][_0x103140[_0xf36b('0x41')]][_0xf36b('0x30')]||_0x103140[_0xf36b('0x42')][_0xf36b('0x31')]()==_0xf36b('0x43')){this[_0xf36b('0x9')][_0x103140['peer']][_0xf36b('0x30')]=![];this[_0xf36b('0x9')][_0x103140[_0xf36b('0x41')]][_0xf36b('0x44')]=_0x103140[_0xf36b('0x42')][_0xf36b('0x31')]();this[_0xf36b('0x9')][_0x103140['peer']]['address']=_0x103140[_0xf36b('0x45')];this[_0xf36b('0x9')][_0x103140[_0xf36b('0x41')]]['updateStatusRealtime'](_0x103140);}}else if(this['telephones'][_0x103140['peer']]){this[_0xf36b('0xa')][_0x103140[_0xf36b('0x41')]][_0xf36b('0x44')]=_0x103140[_0xf36b('0x42')][_0xf36b('0x31')]();this['telephones'][_0x103140[_0xf36b('0x41')]]['address']=_0x103140[_0xf36b('0x45')];logger['debug']('[userReport][peerstatus]\x20sending\x20telephone:save\x20event:',util[_0xf36b('0x15')](this['telephones'][_0x103140[_0xf36b('0x41')]],{'showHidden':![],'depth':null}));this[_0xf36b('0x1d')](util[_0xf36b('0x34')](_0xf36b('0x46'),this[_0xf36b('0xa')][_0x103140[_0xf36b('0x41')]][_0xf36b('0x2a')]),_0xf36b('0x38'),this[_0xf36b('0xa')][_0x103140[_0xf36b('0x41')]]);}else if(this[_0xf36b('0x8')][_0x103140[_0xf36b('0x41')]]){this[_0xf36b('0x8')][_0x103140[_0xf36b('0x41')]][_0xf36b('0x44')]=_0x103140[_0xf36b('0x42')][_0xf36b('0x31')]();this[_0xf36b('0x8')][_0x103140[_0xf36b('0x41')]][_0xf36b('0x45')]=_0x103140['address'];logger[_0xf36b('0x22')]('[userReport][peerstatus]\x20sending\x20trunk:save\x20event:',util[_0xf36b('0x15')](this[_0xf36b('0x8')][_0x103140[_0xf36b('0x41')]],{'showHidden':![],'depth':null}));this[_0xf36b('0x1d')](util[_0xf36b('0x34')](_0xf36b('0x3a'),this[_0xf36b('0x8')][_0x103140[_0xf36b('0x41')]][_0xf36b('0x2a')]),_0xf36b('0x2b'),this[_0xf36b('0x8')][_0x103140[_0xf36b('0x41')]]);}}}catch(_0x104464){logger[_0xf36b('0x13')]('[userReport][peerstatus]',util['inspect'](_0x104464,{'showHidden':![],'depth':null}));}};module[_0xf36b('0x47')]=UserReport;
\ No newline at end of file
+var _0x04ed=['[userReport][peerstatus]\x20peer:%s\x20address:%s\x20status:%s','address','[userReport][peerstatus]','peer','registered','status','[userReport][peerstatus]\x20sending\x20telephone:save\x20event:','[userReport][peerstatus]\x20sending\x20trunk:save\x20event:','lodash','moment','util','ioredis','bluebird','../../../config/environment','../../../config/logger','redis','defaults','socket.io-emitter','trunks','agents','telephones','registryentry','syncRegistry','registry','bind','devicestatechange','syncDeviceState','peerstatus','syncPeerStatus','resolve','then','actionSipShowRegistry','error','[userReport][sipshowregistry]','inspect','catch','actionSipPeerStatus','[userReport][sippeerstatus]','syncRealtimeShow','prototype','isNotNull','isUndefined','emit','info','[userReport][registry]\x20registry:%s\x20state:%s','username','state','debug','[userReport][registry]','find','merge','event','actionid','[userReport][registry]\x20sending\x20trunk:save\x20event:','format','trunk:%s','name','trunk:save','device','[userReport][devicestatechange]','local','toLowerCase','inuse','stateTime','toNumber','updateStatusRealtime','telephone:%s','[userReport][devicestatechange]\x20sending\x20trunk:save\x20event:','startsWith','Local','substring','indexOf','mobile','phone','accountcode'];(function(_0x27af45,_0x1b57aa){var _0x18df21=function(_0x4b7679){while(--_0x4b7679){_0x27af45['push'](_0x27af45['shift']());}};_0x18df21(++_0x1b57aa);}(_0x04ed,0x9e));var _0xd04e=function(_0x16fb52,_0xd7d1bd){_0x16fb52=_0x16fb52-0x0;var _0x2bb121=_0x04ed[_0x16fb52];return _0x2bb121;};'use strict';var _=require(_0xd04e('0x0'));var moment=require(_0xd04e('0x1'));var util=require(_0xd04e('0x2'));var Redis=require(_0xd04e('0x3'));var BPromise=require(_0xd04e('0x4'));var config=require(_0xd04e('0x5'));var logger=require(_0xd04e('0x6'))('ami');var ami=require('../ami');config[_0xd04e('0x7')]=_[_0xd04e('0x8')](config[_0xd04e('0x7')],{'host':'localhost','port':0x18eb});var io=require(_0xd04e('0x9'))(new Redis(config['redis']));function UserReport(_0xe2e755){this[_0xd04e('0xa')]=_0xe2e755[_0xd04e('0xa')];this[_0xd04e('0xb')]=_0xe2e755[_0xd04e('0xb')];this[_0xd04e('0xc')]=_0xe2e755[_0xd04e('0xc')];ami['on'](_0xd04e('0xd'),this[_0xd04e('0xe')]['bind'](this));ami['on'](_0xd04e('0xf'),this[_0xd04e('0xe')][_0xd04e('0x10')](this));ami['on'](_0xd04e('0x11'),this[_0xd04e('0x12')][_0xd04e('0x10')](this));ami['on'](_0xd04e('0x13'),this[_0xd04e('0x14')]['bind'](this));return this['syncRealtimeShow']();}function showSipRegistrations(){Promise[_0xd04e('0x15')]()[_0xd04e('0x16')](ami[_0xd04e('0x17')]())['catch'](function(_0x507e54){logger[_0xd04e('0x18')](_0xd04e('0x19'),util[_0xd04e('0x1a')](_0x507e54,{'showHidden':![],'depth':null}));});}function listDeviceStates(){Promise['resolve']()[_0xd04e('0x16')](ami['actionDeviceStateList']())[_0xd04e('0x1b')](function(_0x16bedb){logger['error']('[userReport][devicestatelist]',util[_0xd04e('0x1a')](_0x16bedb,{'showHidden':![],'depth':null}));});}function showPeersStatus(){Promise[_0xd04e('0x15')]()[_0xd04e('0x16')](ami[_0xd04e('0x1c')]())['catch'](function(_0x522ef9){logger['error'](_0xd04e('0x1d'),util[_0xd04e('0x1a')](_0x522ef9,{'showHidden':![],'depth':null}));});}UserReport['prototype'][_0xd04e('0x1e')]=function(){setInterval(function(){BPromise[_0xd04e('0x15')]()[_0xd04e('0x16')](showSipRegistrations())[_0xd04e('0x16')](listDeviceStates())[_0xd04e('0x16')](showPeersStatus());},0x32c8);};UserReport[_0xd04e('0x1f')][_0xd04e('0x20')]=function(_0x3aaac7){return _0x3aaac7!==null&&!_[_0xd04e('0x21')](_0x3aaac7);};UserReport['prototype'][_0xd04e('0x22')]=function(_0x5e64cf,_0xfa4d68,_0x5f0dfe){io['to'](_0x5e64cf)[_0xd04e('0x22')](_0xfa4d68,_0x5f0dfe);};UserReport[_0xd04e('0x1f')][_0xd04e('0xe')]=function(_0x15b174){try{if(this[_0xd04e('0x20')](_0x15b174)){logger[_0xd04e('0x23')](_0xd04e('0x24'),_0x15b174[_0xd04e('0x25')],_0x15b174[_0xd04e('0x26')]);logger[_0xd04e('0x27')](_0xd04e('0x28'),util[_0xd04e('0x1a')](_0x15b174,{'showHidden':![],'depth':null}));var _0x2e112f=_[_0xd04e('0x29')](this['trunks'],{'defaultuser':_0x15b174['username']});if(_0x2e112f){_0x15b174['stateRegistry']=_0x15b174[_0xd04e('0x26')];_[_0xd04e('0x2a')](_0x2e112f,_['omit'](_0x15b174,[_0xd04e('0x2b'),_0xd04e('0x2c'),_0xd04e('0x25'),_0xd04e('0x26')]));logger[_0xd04e('0x27')](_0xd04e('0x2d'),util[_0xd04e('0x1a')](_0x2e112f,{'showHidden':![],'depth':null}));this[_0xd04e('0x22')](util[_0xd04e('0x2e')](_0xd04e('0x2f'),_0x2e112f[_0xd04e('0x30')]),_0xd04e('0x31'),_0x2e112f);}}}catch(_0x28eeb4){logger['error'](_0xd04e('0x28'),util[_0xd04e('0x1a')](_0x28eeb4,{'showHidden':![],'depth':null}));}};UserReport[_0xd04e('0x1f')][_0xd04e('0x12')]=function(_0x5c53f1){try{if(this[_0xd04e('0x20')](_0x5c53f1)){logger['info']('[userReport][devicestatechange]\x20device:%s\x20state:%s',_0x5c53f1[_0xd04e('0x32')],_0x5c53f1[_0xd04e('0x26')]);logger[_0xd04e('0x27')](_0xd04e('0x33'),util[_0xd04e('0x1a')](_0x5c53f1,{'showHidden':![],'depth':null}));if(this[_0xd04e('0xb')][_0x5c53f1['device']]){if(!this['agents'][_0x5c53f1[_0xd04e('0x32')]][_0xd04e('0x34')]||_0x5c53f1[_0xd04e('0x26')][_0xd04e('0x35')]()==_0xd04e('0x36')){this[_0xd04e('0xb')][_0x5c53f1[_0xd04e('0x32')]][_0xd04e('0x34')]=![];if(this[_0xd04e('0xb')][_0x5c53f1['device']]['state']!==_0x5c53f1['state'][_0xd04e('0x35')]()){this[_0xd04e('0xb')][_0x5c53f1['device']][_0xd04e('0x37')]=_[_0xd04e('0x38')](moment()['format']('x'));}this['agents'][_0x5c53f1[_0xd04e('0x32')]][_0xd04e('0x26')]=_0x5c53f1['state']['toLowerCase']();this[_0xd04e('0xb')][_0x5c53f1[_0xd04e('0x32')]][_0xd04e('0x39')](_0x5c53f1);}}else if(this[_0xd04e('0xc')][_0x5c53f1[_0xd04e('0x32')]]){if(this[_0xd04e('0xc')][_0x5c53f1[_0xd04e('0x32')]][_0xd04e('0x26')]!==_0x5c53f1[_0xd04e('0x26')]['toLowerCase']()){this[_0xd04e('0xc')][_0x5c53f1['device']][_0xd04e('0x37')]=_[_0xd04e('0x38')](moment()[_0xd04e('0x2e')]('x'));}this[_0xd04e('0xc')][_0x5c53f1[_0xd04e('0x32')]]['state']=_0x5c53f1[_0xd04e('0x26')][_0xd04e('0x35')]();logger['debug']('[userReport][devicestatechange]\x20sending\x20telephone:save\x20event:',util[_0xd04e('0x1a')](this['telephones'][_0x5c53f1[_0xd04e('0x32')]],{'showHidden':![],'depth':null}));this[_0xd04e('0x22')](util[_0xd04e('0x2e')](_0xd04e('0x3a'),this[_0xd04e('0xc')][_0x5c53f1['device']]['name']),'telephone:save',this[_0xd04e('0xc')][_0x5c53f1[_0xd04e('0x32')]]);}else if(this['trunks'][_0x5c53f1[_0xd04e('0x32')]]){if(this[_0xd04e('0xa')][_0x5c53f1[_0xd04e('0x32')]][_0xd04e('0x26')]!==_0x5c53f1[_0xd04e('0x26')][_0xd04e('0x35')]()){this['trunks'][_0x5c53f1[_0xd04e('0x32')]]['stateTime']=_[_0xd04e('0x38')](moment()[_0xd04e('0x2e')]('x'));}this['trunks'][_0x5c53f1['device']][_0xd04e('0x26')]=_0x5c53f1[_0xd04e('0x26')][_0xd04e('0x35')]();logger[_0xd04e('0x27')](_0xd04e('0x3b'),util[_0xd04e('0x1a')](this['trunks'][_0x5c53f1[_0xd04e('0x32')]],{'showHidden':![],'depth':null}));this[_0xd04e('0x22')](util[_0xd04e('0x2e')](_0xd04e('0x2f'),this[_0xd04e('0xa')][_0x5c53f1[_0xd04e('0x32')]]['name']),_0xd04e('0x31'),this[_0xd04e('0xa')][_0x5c53f1['device']]);}else if(_[_0xd04e('0x3c')](_0x5c53f1[_0xd04e('0x32')],_0xd04e('0x3d'))){var _0x2e4869=_0x5c53f1[_0xd04e('0x32')];var _0x1266e0=_0x2e4869[_0xd04e('0x3e')](_0x2e4869[_0xd04e('0x3f')]('/')+0x1,_0x2e4869[_0xd04e('0x3f')]('@'));var _0x534b29=_['find'](this['agents'],function(_0x3581b5){return _0x3581b5[_0xd04e('0x40')]==_0x1266e0||_0x3581b5[_0xd04e('0x41')]==_0x1266e0||_0x3581b5[_0xd04e('0x42')]==_0x1266e0;});if(_0x534b29){if(_0x534b29['state']!==_0x5c53f1[_0xd04e('0x26')]['toLowerCase']()){_0x534b29[_0xd04e('0x37')]=_['toNumber'](moment()[_0xd04e('0x2e')]('x'));}_0x534b29[_0xd04e('0x26')]=_0x5c53f1[_0xd04e('0x26')][_0xd04e('0x35')]();_0x534b29[_0xd04e('0x34')]=!![];_0x534b29['updateStatusRealtime'](_0x5c53f1);}}}}catch(_0xac6629){logger[_0xd04e('0x18')](_0xd04e('0x33'),util[_0xd04e('0x1a')](_0xac6629,{'showHidden':![],'depth':null}));}};UserReport[_0xd04e('0x1f')]['syncPeerStatus']=function(_0x230320){try{if(this[_0xd04e('0x20')](_0x230320)&&this[_0xd04e('0x20')](_0x230320['peerstatus'])){logger[_0xd04e('0x23')](_0xd04e('0x43'),_0x230320['peer'],_0x230320[_0xd04e('0x44')],_0x230320['peerstatus']);logger['debug'](_0xd04e('0x45'),util[_0xd04e('0x1a')](_0x230320,{'showHidden':![],'depth':null}));if(this['agents'][_0x230320['peer']]){if(!this['agents'][_0x230320[_0xd04e('0x46')]][_0xd04e('0x34')]||_0x230320[_0xd04e('0x13')][_0xd04e('0x35')]()==_0xd04e('0x47')){this[_0xd04e('0xb')][_0x230320['peer']]['local']=![];this['agents'][_0x230320[_0xd04e('0x46')]][_0xd04e('0x48')]=_0x230320[_0xd04e('0x13')][_0xd04e('0x35')]();this[_0xd04e('0xb')][_0x230320['peer']][_0xd04e('0x44')]=_0x230320[_0xd04e('0x44')];this['agents'][_0x230320[_0xd04e('0x46')]][_0xd04e('0x39')](_0x230320);}}else if(this[_0xd04e('0xc')][_0x230320[_0xd04e('0x46')]]){this[_0xd04e('0xc')][_0x230320[_0xd04e('0x46')]][_0xd04e('0x48')]=_0x230320['peerstatus'][_0xd04e('0x35')]();this[_0xd04e('0xc')][_0x230320[_0xd04e('0x46')]][_0xd04e('0x44')]=_0x230320[_0xd04e('0x44')];logger['debug'](_0xd04e('0x49'),util[_0xd04e('0x1a')](this[_0xd04e('0xc')][_0x230320[_0xd04e('0x46')]],{'showHidden':![],'depth':null}));this[_0xd04e('0x22')](util[_0xd04e('0x2e')]('telephone:%s',this['telephones'][_0x230320[_0xd04e('0x46')]][_0xd04e('0x30')]),'telephone:save',this[_0xd04e('0xc')][_0x230320[_0xd04e('0x46')]]);}else if(this[_0xd04e('0xa')][_0x230320[_0xd04e('0x46')]]){this[_0xd04e('0xa')][_0x230320[_0xd04e('0x46')]][_0xd04e('0x48')]=_0x230320[_0xd04e('0x13')][_0xd04e('0x35')]();this['trunks'][_0x230320[_0xd04e('0x46')]]['address']=_0x230320[_0xd04e('0x44')];logger[_0xd04e('0x27')](_0xd04e('0x4a'),util[_0xd04e('0x1a')](this[_0xd04e('0xa')][_0x230320[_0xd04e('0x46')]],{'showHidden':![],'depth':null}));this[_0xd04e('0x22')](util[_0xd04e('0x2e')]('trunk:%s',this[_0xd04e('0xa')][_0x230320[_0xd04e('0x46')]][_0xd04e('0x30')]),'trunk:save',this[_0xd04e('0xa')][_0x230320[_0xd04e('0x46')]]);}}}catch(_0x4d4745){logger['error'](_0xd04e('0x45'),util[_0xd04e('0x1a')](_0x4d4745,{'showHidden':![],'depth':null}));}};module['exports']=UserReport;
\ No newline at end of file
index 4a04400..bb126be 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x439c=['[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:answered_elsewhere','agentringnoanswerAt','answeredelsewheredestinationuniqueid','answered_elsewhere','[%s][voiceAgentReport][agentconnect]\x20sending\x20agentansweredelsewhere\x20event:','[%s][voiceAgentReport][agentconnect]','syncAgentRingNoAnswer','[%s][voiceAgentReport][agentringnoanswer]\x20event:','[%s][voiceAgentReport][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:rejected','rejected','reason','[%s][voiceAgentReport][agentringnoanswer]\x20sending\x20agentringnoanswer\x20event:','user:agentringnoanswer','custom:agentringnoanswer','[%s][voiceAgentReport][agentringnoanswer]','[%s][voiceAgentReport][queuecallerabandon]\x20event:','hasOwnProperty','[%s][voiceAgentReport][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned','abandoned','[%s][voiceAgentReport][queuecallerabandon]\x20sending\x20agentqueuecallerabandon\x20event:','custom:agentqueuecallerabandon','[%s][voiceAgentReport][queuecallerabandon]','syncAgentComplete','[%s][voiceAgentReport][agentcomplete]\x20event:','[%s][voiceAgentReport][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','agentcompleteAt','transfer','talktime','acw','acwtime','acwTimeout','agentacw','destconnectedlinenum','[%s][voiceAgentReport][agentcomplete]\x20sending\x20agentcomplete\x20event:','custom:agentcomplete','destaccountcode','user:agentcomplete','[%s][voiceAgentReport][agentcomplete]','syncVarSet','addVariable','keys','variable','value','[%s][voiceAgentReport][varset]\x20destuniqueid:%s\x20variable:%s\x20value:%s','[%s][voiceAgentReport][varset]','rtpaudioqos','rtpaudioqosjitter','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','bridgepvtcallid','membercalls','memberdynamic','memberinterface','memberlastcall','memberpenalty','isNil','syncHangup','[%s][voiceAgentReport][hangup]\x20event:','[%s][voiceAgentReport][hangup]\x20destuniqueid:%s','[%s][voiceAgentReport][hangup]\x20sending\x20voiceAgentReport\x20event:','values','custom:voiceAgentReport','[%s][voiceAgentReport][hangup]','[%s][voiceAgentReport][attendedtransfer]\x20event:','transfereeuniqueid','origtransfereruniqueid','[%s][voiceAgentReport][attendedtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','complete','diff','seconds','[%s][voiceAgentReport][attendedtransfer]','[%s][voiceAgentReport][musiconholdstart]\x20event:','channel','substring','syncMusicOnHoldStop','[%s][voiceAgentReport][musiconholdstop]\x20event:','lastIndexOf','[%s][voiceAgentReport][musiconholdstop]\x20interface:%s','onhold','lodash','moment','util','../../../config/environment','../../../config/logger','ami','redis','defaults','localhost','socket.io-emitter','voiceChannels','voiceQueues','agents','variables','agentcalled','bind','agentconnect','syncAgentConnect','agentringnoanswer','queuecallerabandon','varset','hangup','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','syncAttendedTransfer','blindtransfer','syncBlindTransfer','prototype','isNotNull','isUndefined','syncAgentCalled','info','[%s][voiceAgentReport][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','membername','destuniqueid','debug','[%s][voiceAgentReport][agentcalled]\x20event:','uniqueid','channels','interface','format','mandatoryDisposition','type','inbound','voice','assign','omit','event','privilege','inspect','emit','custom:agentcalled','user:called','error','[%s][voiceAgentReport][agentcalled]','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect','agentconnectAt','YYYY-MM-DD\x20HH:mm:ss','connectedlinename','connectedlinenum','destchannelstate','destchannelstatedesc','holdtime','lastevent','connect','routealias','merge','pick','queue','name','accountcode','exten','custom:agentconnect','user:%s','user:agentconnect','agentcomplete'];(function(_0x1e584e,_0x3fdc98){var _0x3fd19b=function(_0x2d90c0){while(--_0x2d90c0){_0x1e584e['push'](_0x1e584e['shift']());}};_0x3fd19b(++_0x3fdc98);}(_0x439c,0x190));var _0xc439=function(_0x135f5f,_0x58a205){_0x135f5f=_0x135f5f-0x0;var _0x3dc675=_0x439c[_0x135f5f];return _0x3dc675;};'use strict';var _=require(_0xc439('0x0'));var moment=require(_0xc439('0x1'));var util=require(_0xc439('0x2'));var Redis=require('ioredis');var config=require(_0xc439('0x3'));var logger=require(_0xc439('0x4'))(_0xc439('0x5'));var ami=require('../ami');config[_0xc439('0x6')]=_[_0xc439('0x7')](config[_0xc439('0x6')],{'host':_0xc439('0x8'),'port':0x18eb});var io=require(_0xc439('0x9'))(new Redis(config[_0xc439('0x6')]));function VoiceAgentReport(_0x2ab1ad){this['channels']={};this[_0xc439('0xa')]=_0x2ab1ad['channels'];this[_0xc439('0xb')]=_0x2ab1ad[_0xc439('0xb')];this[_0xc439('0xc')]=_0x2ab1ad['agents'];this[_0xc439('0xd')]={};ami['on'](_0xc439('0xe'),this['syncAgentCalled'][_0xc439('0xf')](this));ami['on'](_0xc439('0x10'),this[_0xc439('0x11')]['bind'](this));ami['on'](_0xc439('0x12'),this['syncAgentRingNoAnswer'][_0xc439('0xf')](this));ami['on'](_0xc439('0x13'),this['syncQueueCallerAbandon'][_0xc439('0xf')](this));ami['on']('agentcomplete',this['syncAgentComplete'][_0xc439('0xf')](this));ami['on'](_0xc439('0x14'),this['syncVarSet'][_0xc439('0xf')](this));ami['on'](_0xc439('0x15'),this['syncHangup']['bind'](this));ami['on'](_0xc439('0x16'),this[_0xc439('0x17')][_0xc439('0xf')](this));ami['on'](_0xc439('0x18'),this['syncMusicOnHoldStop'][_0xc439('0xf')](this));ami['on']('attendedtransfer',this[_0xc439('0x19')][_0xc439('0xf')](this));ami['on'](_0xc439('0x1a'),this[_0xc439('0x1b')][_0xc439('0xf')](this));}VoiceAgentReport[_0xc439('0x1c')]['emit']=function(_0x283f46,_0x33d581,_0x5bf39f){io['to'](_0x283f46)['emit'](_0x33d581,_0x5bf39f);};VoiceAgentReport[_0xc439('0x1c')][_0xc439('0x1d')]=function(_0x5e7d0e){return _0x5e7d0e!==null&&!_[_0xc439('0x1e')](_0x5e7d0e);};VoiceAgentReport['prototype'][_0xc439('0x1f')]=function(_0x1887c5){try{if(this[_0xc439('0x1d')](_0x1887c5)){logger[_0xc439('0x20')](_0xc439('0x21'),_0x1887c5['uniqueid'],_0x1887c5[_0xc439('0x22')],_0x1887c5[_0xc439('0x23')]);logger[_0xc439('0x24')](_0xc439('0x25'),_0x1887c5[_0xc439('0x26')],util['inspect'](_0x1887c5,{'showHidden':![],'depth':null}));if(_[_0xc439('0x1e')](this['channels'][_0x1887c5[_0xc439('0x26')]])){this[_0xc439('0x27')][_0x1887c5['uniqueid']]={};}var _0x2487d9=this[_0xc439('0xc')][_0x1887c5[_0xc439('0x28')]];var _0x5b2f1d=this[_0xc439('0x27')][_0x1887c5[_0xc439('0x26')]][_0x1887c5[_0xc439('0x23')]];var _0x29fc32=this['voiceQueues'][_0x1887c5['queue']];var _0x3a4167=this['variables'][_0x1887c5[_0xc439('0x26')]];if(_[_0xc439('0x1e')](_0x5b2f1d)){_0x5b2f1d={'agentcalledAt':moment()[_0xc439('0x29')]('YYYY-MM-DD\x20HH:mm:ss'),'lastevent':'called','mandatoryDisposition':_0x29fc32&&_0x29fc32[_0xc439('0x2a')]?_0x29fc32['mandatoryDisposition']:![],'type':_0x29fc32&&_0x29fc32[_0xc439('0x2b')]?_0x29fc32[_0xc439('0x2b')]:_0xc439('0x2c'),'variables':_0x3a4167,'motionChannel':_0xc439('0x2d')};}Object[_0xc439('0x2e')](_0x5b2f1d,_[_0xc439('0x2f')](_0x1887c5,[_0xc439('0x30'),_0xc439('0x31')]));this['channels'][_0x1887c5[_0xc439('0x26')]][_0x1887c5[_0xc439('0x23')]]=_0x5b2f1d;logger[_0xc439('0x24')]('[%s][voiceAgentReport][agentcalled]\x20sending\x20agentcalled\x20event:',_0x1887c5[_0xc439('0x26')],util[_0xc439('0x32')](_0x5b2f1d,{'showHidden':![],'depth':null}));ami[_0xc439('0x33')](_0xc439('0x34'),_0x5b2f1d);var _0x303162={'id':_0x2487d9['id'],'calleridnum':_0x5b2f1d['calleridnum'],'queue':_0x5b2f1d['queue'],'variables':_0x5b2f1d['variables'],'uniqueid':_0x1887c5[_0xc439('0x26')]};logger[_0xc439('0x24')]('[%s][voiceAgentReport][agentcalled]\x20sending\x20user:called\x20event:',_0x1887c5[_0xc439('0x26')],util['inspect'](_0x303162,{'showHidden':![],'depth':null}));this[_0xc439('0x33')](util[_0xc439('0x29')]('user:%s',_0x1887c5[_0xc439('0x22')]),_0xc439('0x35'),_0x303162);}}catch(_0x593c44){logger[_0xc439('0x36')](_0xc439('0x37'),_0x1887c5[_0xc439('0x26')],util['inspect'](_0x593c44,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xc439('0x1c')][_0xc439('0x11')]=function(_0xa4d459){try{if(this[_0xc439('0x1d')](_0xa4d459)){if(this[_0xc439('0x27')][_0xa4d459['uniqueid']]){for(var _0xf63029 in this[_0xc439('0x27')][_0xa4d459['uniqueid']]){if(this[_0xc439('0x27')][_0xa4d459[_0xc439('0x26')]]['hasOwnProperty'](_0xf63029)){if(_0xa4d459[_0xc439('0x23')]===_0xf63029){logger['info'](_0xc439('0x38'),_0xa4d459['uniqueid'],_0xa4d459[_0xc439('0x22')],_0xa4d459[_0xc439('0x23')]);this[_0xc439('0x27')][_0xa4d459['uniqueid']][_0xf63029][_0xc439('0x39')]=moment()[_0xc439('0x29')](_0xc439('0x3a'));this[_0xc439('0x27')][_0xa4d459['uniqueid']][_0xf63029][_0xc439('0x3b')]=_0xa4d459[_0xc439('0x3b')];this[_0xc439('0x27')][_0xa4d459[_0xc439('0x26')]][_0xf63029][_0xc439('0x3c')]=_0xa4d459[_0xc439('0x3c')];this[_0xc439('0x27')][_0xa4d459[_0xc439('0x26')]][_0xf63029][_0xc439('0x3d')]=_0xa4d459['destchannelstate'];this[_0xc439('0x27')][_0xa4d459[_0xc439('0x26')]][_0xf63029]['destchannelstatedesc']=_0xa4d459[_0xc439('0x3e')];this[_0xc439('0x27')][_0xa4d459[_0xc439('0x26')]][_0xf63029][_0xc439('0x3f')]=_0xa4d459['holdtime'];this[_0xc439('0x27')][_0xa4d459[_0xc439('0x26')]][_0xf63029][_0xc439('0x40')]=_0xc439('0x41');if(this['voiceChannels'][this['channels'][_0xa4d459[_0xc439('0x26')]][_0xf63029][_0xc439('0x26')]]){var _0x1df89b=this[_0xc439('0xa')][this['channels'][_0xa4d459[_0xc439('0x26')]][_0xf63029][_0xc439('0x26')]][_0xc439('0x42')];this[_0xc439('0x27')][_0xa4d459['uniqueid']][_0xf63029]['routealias']=_0x1df89b;_0xa4d459['routealias']=_0x1df89b;}_[_0xc439('0x43')](this[_0xc439('0xc')][_0xa4d459['interface']],_[_0xc439('0x44')](_0xa4d459,[_0xc439('0x45'),'destconnectedlinenum',_0xc439('0x42')]));var _0x46e6eb=this[_0xc439('0xc')][_0xa4d459[_0xc439('0x28')]];var _0x38b873={'id':_0x46e6eb['id'],'name':_0x46e6eb[_0xc439('0x46')],'agentconnected':!![],'destaccountcode':_0x46e6eb[_0xc439('0x47')],'destconnectedlinenum':this[_0xc439('0x27')][_0xa4d459['uniqueid']][_0xa4d459['destuniqueid']][_0xc439('0x48')],'queue':this['channels'][_0xa4d459['uniqueid']][_0xa4d459['destuniqueid']][_0xc439('0x45')],'routealias':this[_0xc439('0x27')][_0xa4d459[_0xc439('0x26')]][_0xa4d459[_0xc439('0x23')]][_0xc439('0x42')],'uniqueid':this[_0xc439('0x27')][_0xa4d459['uniqueid']][_0xa4d459[_0xc439('0x23')]][_0xc439('0x26')]};ami[_0xc439('0x33')](_0xc439('0x49'),this['channels'][_0xa4d459['uniqueid']][_0xa4d459[_0xc439('0x23')]]);this[_0xc439('0x33')](util[_0xc439('0x29')](_0xc439('0x4a'),_0xa4d459['membername']),_0xc439('0x4b'),_0x38b873);}else if(!this[_0xc439('0x27')][_0xa4d459[_0xc439('0x26')]][_0xf63029][_0xc439('0x12')]&&!this[_0xc439('0x27')][_0xa4d459['uniqueid']][_0xf63029][_0xc439('0x4c')]){logger[_0xc439('0x20')](_0xc439('0x4d'),_0xa4d459[_0xc439('0x26')],this[_0xc439('0x27')][_0xa4d459[_0xc439('0x26')]][_0xf63029]['membername'],_0xf63029);this[_0xc439('0x27')][_0xa4d459[_0xc439('0x26')]][_0xf63029][_0xc439('0x12')]=!![];this[_0xc439('0x27')][_0xa4d459[_0xc439('0x26')]][_0xf63029][_0xc439('0x4e')]=moment()['format'](_0xc439('0x3a'));this[_0xc439('0x27')][_0xa4d459[_0xc439('0x26')]][_0xf63029][_0xc439('0x4f')]=_0xa4d459[_0xc439('0x23')];this[_0xc439('0x27')][_0xa4d459[_0xc439('0x26')]][_0xf63029]['answeredelsewheremembername']=_0xa4d459[_0xc439('0x22')];this[_0xc439('0x27')][_0xa4d459[_0xc439('0x26')]][_0xf63029][_0xc439('0x40')]=_0xc439('0x50');this[_0xc439('0x27')][_0xa4d459[_0xc439('0x26')]][_0xf63029]['reason']=_0xc439('0x50');logger['debug'](_0xc439('0x51'),_0xa4d459[_0xc439('0x26')],util[_0xc439('0x32')](this[_0xc439('0x27')][_0xa4d459['uniqueid']][_0xf63029],{'showHidden':![],'depth':null}));ami[_0xc439('0x33')]('custom:agentansweredelsewhere',this[_0xc439('0x27')][_0xa4d459[_0xc439('0x26')]][_0xf63029]);}else{logger[_0xc439('0x24')]('[%s][voiceAgentReport][agentconnect]\x20Else\x20path\x20should\x20never\x20be\x20taken',_0xa4d459[_0xc439('0x26')]);}}}}}}catch(_0x55d186){logger[_0xc439('0x36')](_0xc439('0x52'),_0xa4d459[_0xc439('0x26')],util[_0xc439('0x32')](_0x55d186,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xc439('0x1c')][_0xc439('0x53')]=function(_0x38e4ee){try{if(this['isNotNull'](_0x38e4ee)){logger['debug'](_0xc439('0x54'),_0x38e4ee[_0xc439('0x26')],util[_0xc439('0x32')](_0x38e4ee,{'showHidden':![],'depth':null}));if(this[_0xc439('0x27')][_0x38e4ee['uniqueid']]&&this['channels'][_0x38e4ee[_0xc439('0x26')]][_0x38e4ee[_0xc439('0x23')]]){logger[_0xc439('0x20')](_0xc439('0x55'),_0x38e4ee[_0xc439('0x26')],_0x38e4ee['membername'],_0x38e4ee[_0xc439('0x23')]);var _0x8559b7=this[_0xc439('0xc')][_0x38e4ee[_0xc439('0x28')]];var _0x3c4eb7=this[_0xc439('0x27')][_0x38e4ee[_0xc439('0x26')]][_0x38e4ee[_0xc439('0x23')]];_0x3c4eb7[_0xc439('0x12')]=!![];_0x3c4eb7[_0xc439('0x4e')]=moment()['format'](_0xc439('0x3a'));_0x3c4eb7[_0xc439('0x40')]=_0xc439('0x56');_0x3c4eb7[_0xc439('0x57')]=_0xc439('0x56');var _0x121303={'id':_0x8559b7['id'],'name':_0x8559b7[_0xc439('0x46')],'queue':_0x3c4eb7['queue'],'uniqueid':_0x3c4eb7[_0xc439('0x26')]};logger[_0xc439('0x24')](_0xc439('0x58'),_0x38e4ee['uniqueid'],util['inspect'](_0x121303,{'showHidden':![],'depth':null}));this[_0xc439('0x33')](util[_0xc439('0x29')](_0xc439('0x4a'),_0x8559b7['name']),_0xc439('0x59'),_0x121303);ami[_0xc439('0x33')](_0xc439('0x5a'),_0x3c4eb7);this[_0xc439('0x27')][_0x38e4ee[_0xc439('0x26')]][_0x38e4ee[_0xc439('0x23')]]=Object['assign']({},_0x3c4eb7);}}}catch(_0x14dda){logger[_0xc439('0x36')](_0xc439('0x5b'),_0x38e4ee[_0xc439('0x26')],util[_0xc439('0x32')](_0x14dda,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xc439('0x1c')]['syncQueueCallerAbandon']=function(_0xe22c7c){try{if(this[_0xc439('0x1d')](_0xe22c7c)){logger[_0xc439('0x24')](_0xc439('0x5c'),_0xe22c7c[_0xc439('0x26')],util[_0xc439('0x32')](_0xe22c7c,{'showHidden':![],'depth':null}));if(this[_0xc439('0x27')][_0xe22c7c['uniqueid']]){for(var _0x32c21b in this[_0xc439('0x27')][_0xe22c7c['uniqueid']]){if(this[_0xc439('0x27')][_0xe22c7c[_0xc439('0x26')]][_0xc439('0x5d')](_0x32c21b)&&!this['channels'][_0xe22c7c['uniqueid']][_0x32c21b][_0xc439('0x12')]&&!this[_0xc439('0x27')][_0xe22c7c[_0xc439('0x26')]][_0x32c21b][_0xc439('0x4c')]){logger[_0xc439('0x20')](_0xc439('0x5e'),_0xe22c7c[_0xc439('0x26')],this[_0xc439('0x27')][_0xe22c7c[_0xc439('0x26')]][_0x32c21b]['membername'],_0x32c21b);this['channels'][_0xe22c7c[_0xc439('0x26')]][_0x32c21b][_0xc439('0x12')]=!![];this[_0xc439('0x27')][_0xe22c7c[_0xc439('0x26')]][_0x32c21b][_0xc439('0x4e')]=moment()['format'](_0xc439('0x3a'));this['channels'][_0xe22c7c[_0xc439('0x26')]][_0x32c21b]['lastevent']=_0xc439('0x5f');this[_0xc439('0x27')][_0xe22c7c[_0xc439('0x26')]][_0x32c21b][_0xc439('0x57')]=_0xc439('0x5f');logger[_0xc439('0x24')](_0xc439('0x60'),_0xe22c7c[_0xc439('0x26')],util[_0xc439('0x32')](this[_0xc439('0x27')][_0xe22c7c[_0xc439('0x26')]][_0x32c21b],{'showHidden':![],'depth':null}));ami['emit'](_0xc439('0x61'),this[_0xc439('0x27')][_0xe22c7c['uniqueid']][_0x32c21b]);}}}}}catch(_0x1ce210){logger[_0xc439('0x36')](_0xc439('0x62'),_0xe22c7c[_0xc439('0x26')],util['inspect'](_0x1ce210,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xc439('0x1c')][_0xc439('0x63')]=function(_0x3d4b36){try{if(this['isNotNull'](_0x3d4b36)){logger[_0xc439('0x24')](_0xc439('0x64'),_0x3d4b36[_0xc439('0x26')],util[_0xc439('0x32')](_0x3d4b36,{'showHidden':![],'depth':null}));if(this[_0xc439('0x27')][_0x3d4b36['uniqueid']]){for(var _0x4301c3 in this[_0xc439('0x27')][_0x3d4b36['uniqueid']]){if(this[_0xc439('0x27')][_0x3d4b36['uniqueid']][_0xc439('0x5d')](_0x4301c3)){if(this[_0xc439('0x27')][_0x3d4b36[_0xc439('0x26')]][_0x4301c3][_0xc439('0x39')]&&!this['channels'][_0x3d4b36[_0xc439('0x26')]][_0x4301c3][_0xc439('0x4c')]){logger[_0xc439('0x20')](_0xc439('0x65'),_0x3d4b36[_0xc439('0x26')],this[_0xc439('0x27')][_0x3d4b36['uniqueid']][_0x4301c3][_0xc439('0x22')],_0x4301c3);this[_0xc439('0x27')][_0x3d4b36[_0xc439('0x26')]][_0x4301c3][_0xc439('0x4c')]=!![];this['channels'][_0x3d4b36[_0xc439('0x26')]][_0x4301c3][_0xc439('0x66')]=moment()[_0xc439('0x29')](_0xc439('0x3a'));this[_0xc439('0x27')][_0x3d4b36[_0xc439('0x26')]][_0x4301c3]['lastevent']='complete';this[_0xc439('0x27')][_0x3d4b36[_0xc439('0x26')]][_0x4301c3][_0xc439('0x57')]=_0x3d4b36[_0xc439('0x57')]==_0xc439('0x67')?'agent':_0x3d4b36[_0xc439('0x57')];this['channels'][_0x3d4b36[_0xc439('0x26')]][_0x4301c3][_0xc439('0x68')]=_0x3d4b36[_0xc439('0x68')];if(this[_0xc439('0xb')][_0x3d4b36[_0xc439('0x45')]]&&this[_0xc439('0xb')][_0x3d4b36[_0xc439('0x45')]][_0xc439('0x69')]){this['channels'][_0x3d4b36[_0xc439('0x26')]][_0x4301c3][_0xc439('0x6a')]=this[_0xc439('0xb')][_0x3d4b36[_0xc439('0x45')]][_0xc439('0x6b')];this[_0xc439('0x27')][_0x3d4b36[_0xc439('0x26')]][_0x4301c3][_0xc439('0x6c')]=!![];}this[_0xc439('0xc')][_0x3d4b36[_0xc439('0x28')]]=_['omit'](this['agents'][_0x3d4b36[_0xc439('0x28')]],[_0xc439('0x45'),_0xc439('0x6d')]);logger[_0xc439('0x24')](_0xc439('0x6e'),_0x3d4b36['uniqueid'],util[_0xc439('0x32')](this[_0xc439('0x27')][_0x3d4b36[_0xc439('0x26')]][_0x4301c3],{'showHidden':![],'depth':null}));ami[_0xc439('0x33')](_0xc439('0x6f'),this[_0xc439('0x27')][_0x3d4b36['uniqueid']][_0x4301c3]);logger['debug']('[%s][voiceAgentReport][agentcomplete]\x20sending\x20user:agentcomplete\x20event:',_0x3d4b36[_0xc439('0x26')],util[_0xc439('0x32')]({'id':this['agents'][_0x3d4b36[_0xc439('0x28')]]['id'],'destaccountcode':_0x3d4b36[_0xc439('0x70')]},{'showHidden':![],'depth':null}));this['emit'](util[_0xc439('0x29')](_0xc439('0x4a'),_0x3d4b36['membername']),_0xc439('0x71'),{'id':this[_0xc439('0xc')][_0x3d4b36[_0xc439('0x28')]]['id'],'destaccountcode':Number(_0x3d4b36[_0xc439('0x70')])});}}}}}}catch(_0x364353){logger[_0xc439('0x36')](_0xc439('0x72'),_0x3d4b36['uniqueid'],util['inspect'](_0x364353,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xc439('0x1c')][_0xc439('0x73')]=function(_0x59c941){try{if(this[_0xc439('0x1d')](_0x59c941)){logger['debug']('[%s][voiceAgentReport][varset]\x20event:',_0x59c941['uniqueid'],util[_0xc439('0x32')](_0x59c941,{'showHidden':![],'depth':null}));this[_0xc439('0x74')](_0x59c941[_0xc439('0x26')],_[_0xc439('0x75')](_0x59c941[_0xc439('0x76')])[0x0],_0x59c941[_0xc439('0x77')]);if(this[_0xc439('0x27')][_0x59c941[_0xc439('0x26')]]){for(var _0x19850e in this[_0xc439('0x27')][_0x59c941[_0xc439('0x26')]]){if(this[_0xc439('0x27')][_0x59c941[_0xc439('0x26')]][_0xc439('0x5d')](_0x19850e)){logger[_0xc439('0x20')](_0xc439('0x78'),_0x59c941['uniqueid'],_0x19850e,_['keys'](_0x59c941[_0xc439('0x76')])[0x0],_0x59c941[_0xc439('0x77')]);if(_[_0xc439('0x1e')](this['channels'][_0x59c941[_0xc439('0x26')]][_0x19850e][_0xc439('0xd')])){this[_0xc439('0x27')][_0x59c941['uniqueid']][_0x19850e]['variables']={};}this[_0xc439('0x27')][_0x59c941['uniqueid']][_0x19850e][_0xc439('0xd')]=this[_0xc439('0xd')][_0x59c941[_0xc439('0x26')]];}}}}}catch(_0x25525c){logger[_0xc439('0x36')](_0xc439('0x79'),_0x59c941['uniqueid'],util['inspect'](_0x25525c,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xc439('0x1c')][_0xc439('0x74')]=function(_0x1820e0,_0x4e9aaa,_0x45a916){var _0x215146=[_0xc439('0x7a'),'rtpaudioqosbridged',_0xc439('0x7b'),'rtpaudioqosjitterbridged',_0xc439('0x7c'),_0xc439('0x7d'),_0xc439('0x7e'),_0xc439('0x7f'),_0xc439('0x80'),'sipuri','bridgepeer',_0xc439('0x81'),_0xc439('0x82'),_0xc439('0x83'),_0xc439('0x84'),_0xc439('0x85'),'membername',_0xc439('0x86'),'memberrealtime'];if(!_[_0xc439('0x87')](_0x4e9aaa)&&!_['includes'](_0x215146,_0x4e9aaa)){if(_[_0xc439('0x1e')](this[_0xc439('0xd')][_0x1820e0])){this[_0xc439('0xd')][_0x1820e0]={};}this[_0xc439('0xd')][_0x1820e0][_0x4e9aaa]=_0x45a916;}};VoiceAgentReport[_0xc439('0x1c')][_0xc439('0x88')]=function(_0x5dba15){try{if(this['isNotNull'](_0x5dba15)){logger[_0xc439('0x24')](_0xc439('0x89'),_0x5dba15[_0xc439('0x26')],util['inspect'](_0x5dba15,{'showHidden':![],'depth':null}));if(this[_0xc439('0x27')][_0x5dba15[_0xc439('0x26')]]){for(var _0xa2b0b9 in this[_0xc439('0x27')][_0x5dba15['uniqueid']]){if(this[_0xc439('0x27')][_0x5dba15[_0xc439('0x26')]][_0xc439('0x5d')](_0xa2b0b9)){if(this['channels'][_0x5dba15[_0xc439('0x26')]][_0xa2b0b9]['reason']==_0xc439('0x67')&&this[_0xc439('0x27')][_0x5dba15[_0xc439('0x26')]][_0xa2b0b9]['agentcomplete']){logger[_0xc439('0x20')](_0xc439('0x8a'),_0x5dba15[_0xc439('0x26')],_0xa2b0b9);this[_0xc439('0x27')][_0x5dba15[_0xc439('0x26')]][_0xa2b0b9][_0xc439('0x66')]=moment()[_0xc439('0x29')](_0xc439('0x3a'));}}}logger[_0xc439('0x24')](_0xc439('0x8b'),_0x5dba15['uniqueid'],util[_0xc439('0x32')](_[_0xc439('0x8c')](this[_0xc439('0x27')][_0x5dba15[_0xc439('0x26')]]),{'showHidden':![],'depth':null}));ami[_0xc439('0x33')](_0xc439('0x8d'),_[_0xc439('0x8c')](this[_0xc439('0x27')][_0x5dba15['uniqueid']]));delete this[_0xc439('0x27')][_0x5dba15[_0xc439('0x26')]];}if(this[_0xc439('0xd')][_0x5dba15[_0xc439('0x26')]]){delete this[_0xc439('0xd')][_0x5dba15[_0xc439('0x26')]];}}}catch(_0x4dfb10){logger['error'](_0xc439('0x8e'),_0x5dba15[_0xc439('0x26')],util['inspect'](_0x4dfb10,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xc439('0x1c')][_0xc439('0x19')]=function(_0x401f65){try{if(this[_0xc439('0x1d')](_0x401f65)){logger[_0xc439('0x24')](_0xc439('0x8f'),_0x401f65[_0xc439('0x26')],util[_0xc439('0x32')](_0x401f65,{'showHidden':![],'depth':null}));if(this['channels'][_0x401f65[_0xc439('0x90')]]){for(var _0x296538 in this['channels'][_0x401f65[_0xc439('0x90')]]){if(this[_0xc439('0x27')][_0x401f65['transfereeuniqueid']][_0xc439('0x5d')](_0x296538)){if(_0x401f65[_0xc439('0x91')]===_0x296538){logger[_0xc439('0x20')](_0xc439('0x92'),_0x401f65['uniqueid'],this[_0xc439('0x27')][_0x401f65[_0xc439('0x90')]][_0x296538][_0xc439('0x22')],_0x296538);var _0x1406b3=moment();this[_0xc439('0x27')][_0x401f65[_0xc439('0x90')]][_0x296538][_0xc439('0x4c')]=!![];this[_0xc439('0x27')][_0x401f65[_0xc439('0x90')]][_0x296538][_0xc439('0x66')]=moment()[_0xc439('0x29')](_0xc439('0x3a'));this[_0xc439('0x27')][_0x401f65[_0xc439('0x90')]][_0x296538]['lastevent']=_0xc439('0x93');this[_0xc439('0x27')][_0x401f65[_0xc439('0x90')]][_0x296538][_0xc439('0x57')]='transfer';this[_0xc439('0x27')][_0x401f65[_0xc439('0x90')]][_0x296538][_0xc439('0x68')]=_0x1406b3[_0xc439('0x94')](this[_0xc439('0x27')][_0x401f65[_0xc439('0x90')]][_0x296538]['agentconnectAt'],_0xc439('0x95'));}}}}if(this['channels'][_0x401f65['secondtransfereruniqueid']]){var _0x32d6cb=this[_0xc439('0x27')][_0x401f65['secondtransfereruniqueid']];this[_0xc439('0x27')][_0x401f65['secondtransfereruniqueid']]=this[_0xc439('0x27')][_0x401f65['transfereeuniqueid']];this[_0xc439('0x27')][_0x401f65[_0xc439('0x90')]]=_0x32d6cb;}}}catch(_0x4b07fd){logger['error'](_0xc439('0x96'),_0x401f65['uniqueid'],util[_0xc439('0x32')](_0x4b07fd,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xc439('0x1c')][_0xc439('0x1b')]=function(_0x27bdc7){try{if(this[_0xc439('0x1d')](_0x27bdc7)){logger[_0xc439('0x24')]('[%s][voiceAgentReport][blindtransfer]\x20event:',_0x27bdc7[_0xc439('0x26')],util['inspect'](_0x27bdc7,{'showHidden':![],'depth':null}));if(this[_0xc439('0x27')][_0x27bdc7[_0xc439('0x90')]]){for(var _0x4ba090 in this[_0xc439('0x27')][_0x27bdc7[_0xc439('0x90')]]){if(this[_0xc439('0x27')][_0x27bdc7[_0xc439('0x90')]][_0xc439('0x5d')](_0x4ba090)){if(_0x27bdc7['transfereruniqueid']===_0x4ba090){logger[_0xc439('0x20')]('[%s][voiceAgentReport][blindtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete',_0x27bdc7[_0xc439('0x26')],this[_0xc439('0x27')][_0x27bdc7[_0xc439('0x90')]][_0x4ba090]['membername'],_0x4ba090);var _0x26471d=moment();this['channels'][_0x27bdc7[_0xc439('0x90')]][_0x4ba090][_0xc439('0x4c')]=!![];this[_0xc439('0x27')][_0x27bdc7[_0xc439('0x90')]][_0x4ba090][_0xc439('0x66')]=_0x26471d;this[_0xc439('0x27')][_0x27bdc7['transfereeuniqueid']][_0x4ba090][_0xc439('0x40')]=_0xc439('0x93');this[_0xc439('0x27')][_0x27bdc7[_0xc439('0x90')]][_0x4ba090]['reason']='transfer';this[_0xc439('0x27')][_0x27bdc7['transfereeuniqueid']][_0x4ba090][_0xc439('0x68')]=_0x26471d[_0xc439('0x94')](this[_0xc439('0x27')][_0x27bdc7[_0xc439('0x90')]][_0x4ba090][_0xc439('0x39')],_0xc439('0x95'));}}}}}}catch(_0x14fdbf){logger[_0xc439('0x36')]('[%s][voiceAgentReport][blindtransfer]',_0x27bdc7[_0xc439('0x26')],util['inspect'](_0x14fdbf,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xc439('0x1c')][_0xc439('0x17')]=function(_0x570f22){var _0xccc16a='';try{if(this['isNotNull'](_0x570f22)){logger['debug'](_0xc439('0x97'),_0x570f22[_0xc439('0x26')],util[_0xc439('0x32')](_0x570f22,{'showHidden':![],'depth':null}));if(_0x570f22[_0xc439('0x98')]){_0xccc16a=_0x570f22[_0xc439('0x98')][_0xc439('0x99')](0x0,_0x570f22[_0xc439('0x98')]['lastIndexOf']('-'));if(this[_0xc439('0xc')][_0xccc16a]){logger[_0xc439('0x20')]('[%s][voiceAgentReport][musiconholdstart]\x20interface:%s',_0x570f22[_0xc439('0x26')],_0xccc16a);this[_0xc439('0xc')][_0xccc16a]['onhold']=!![];}}}}catch(_0x38b198){logger['error']('[%s][voiceAgentReport][musiconholdstart]',_0x570f22[_0xc439('0x26')],util[_0xc439('0x32')](_0x38b198,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xc439('0x1c')][_0xc439('0x9a')]=function(_0x4480ff){var _0xd585a8='';try{if(this[_0xc439('0x1d')](_0x4480ff)){logger[_0xc439('0x24')](_0xc439('0x9b'),_0x4480ff['uniqueid'],util[_0xc439('0x32')](_0x4480ff,{'showHidden':![],'depth':null}));if(_0x4480ff[_0xc439('0x98')]){_0xd585a8=_0x4480ff['channel'][_0xc439('0x99')](0x0,_0x4480ff[_0xc439('0x98')][_0xc439('0x9c')]('-'));if(this[_0xc439('0xc')][_0xd585a8]){logger[_0xc439('0x20')](_0xc439('0x9d'),_0x4480ff[_0xc439('0x26')],_0xd585a8);this['agents'][_0xd585a8][_0xc439('0x9e')]=![];}}}}catch(_0x36e361){logger[_0xc439('0x36')]('[%s][voiceAgentReport][musiconholdstop]',_0x4480ff[_0xc439('0x26')],util['inspect'](_0x36e361,{'showHidden':![],'depth':null}));}};module['exports']=VoiceAgentReport;
\ No newline at end of file
+var _0x14b1=['ioredis','../../../config/environment','ami','../ami','redis','defaults','localhost','socket.io-emitter','channels','voiceChannels','voiceQueues','variables','agentcalled','syncAgentCalled','agentconnect','syncAgentConnect','agentringnoanswer','syncAgentRingNoAnswer','bind','queuecallerabandon','syncQueueCallerAbandon','syncAgentComplete','varset','syncVarSet','hangup','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','syncBlindTransfer','emit','prototype','[%s][voiceAgentReport][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','membername','destuniqueid','debug','isUndefined','uniqueid','agents','interface','queue','called','mandatoryDisposition','type','inbound','voice','omit','event','privilege','inspect','custom:agentcalled','calleridnum','[%s][voiceAgentReport][agentcalled]\x20sending\x20user:called\x20event:','format','error','[%s][voiceAgentReport][agentcalled]','info','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect','agentconnectAt','YYYY-MM-DD\x20HH:mm:ss','connectedlinename','connectedlinenum','destchannelstate','destchannelstatedesc','holdtime','lastevent','connect','routealias','pick','destconnectedlinenum','exten','custom:agentconnect','user:%s','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:answered_elsewhere','agentringnoanswerAt','answeredelsewheremembername','reason','answered_elsewhere','[%s][voiceAgentReport][agentconnect]\x20sending\x20agentansweredelsewhere\x20event:','custom:agentansweredelsewhere','[%s][voiceAgentReport][agentconnect]\x20Else\x20path\x20should\x20never\x20be\x20taken','[%s][voiceAgentReport][agentconnect]','isNotNull','[%s][voiceAgentReport][agentringnoanswer]\x20event:','rejected','name','[%s][voiceAgentReport][agentringnoanswer]\x20sending\x20agentringnoanswer\x20event:','user:agentringnoanswer','custom:agentringnoanswer','assign','[%s][voiceAgentReport][agentringnoanswer]','[%s][voiceAgentReport][queuecallerabandon]\x20event:','hasOwnProperty','agentcomplete','abandoned','[%s][voiceAgentReport][queuecallerabandon]\x20sending\x20agentqueuecallerabandon\x20event:','custom:agentqueuecallerabandon','agentcompleteAt','complete','transfer','agent','talktime','acw','acwtime','acwTimeout','agentacw','[%s][voiceAgentReport][agentcomplete]\x20sending\x20agentcomplete\x20event:','custom:agentcomplete','[%s][voiceAgentReport][agentcomplete]\x20sending\x20user:agentcomplete\x20event:','destaccountcode','user:agentcomplete','[%s][voiceAgentReport][agentcomplete]','[%s][voiceAgentReport][varset]\x20event:','keys','variable','[%s][voiceAgentReport][varset]\x20destuniqueid:%s\x20variable:%s\x20value:%s','value','[%s][voiceAgentReport][varset]','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','sipuri','bridgepeer','bridgepvtcallid','membercalls','memberdynamic','memberinterface','memberlastcall','memberpenalty','memberrealtime','isNil','includes','syncHangup','[%s][voiceAgentReport][hangup]\x20event:','[%s][voiceAgentReport][hangup]\x20destuniqueid:%s','values','custom:voiceAgentReport','syncAttendedTransfer','transfereeuniqueid','origtransfereruniqueid','diff','seconds','secondtransfereruniqueid','[%s][voiceAgentReport][blindtransfer]\x20event:','[%s][voiceAgentReport][blindtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','[%s][voiceAgentReport][blindtransfer]','channel','lastIndexOf','[%s][voiceAgentReport][musiconholdstart]\x20interface:%s','[%s][voiceAgentReport][musiconholdstart]','[%s][voiceAgentReport][musiconholdstop]\x20event:','onhold','[%s][voiceAgentReport][musiconholdstop]','exports','lodash','moment','util'];(function(_0x4bfac3,_0x58324d){var _0x15f0f2=function(_0xf0c511){while(--_0xf0c511){_0x4bfac3['push'](_0x4bfac3['shift']());}};_0x15f0f2(++_0x58324d);}(_0x14b1,0x9f));var _0x114b=function(_0x593752,_0xfc3827){_0x593752=_0x593752-0x0;var _0x4612be=_0x14b1[_0x593752];return _0x4612be;};'use strict';var _=require(_0x114b('0x0'));var moment=require(_0x114b('0x1'));var util=require(_0x114b('0x2'));var Redis=require(_0x114b('0x3'));var config=require(_0x114b('0x4'));var logger=require('../../../config/logger')(_0x114b('0x5'));var ami=require(_0x114b('0x6'));config[_0x114b('0x7')]=_[_0x114b('0x8')](config[_0x114b('0x7')],{'host':_0x114b('0x9'),'port':0x18eb});var io=require(_0x114b('0xa'))(new Redis(config['redis']));function VoiceAgentReport(_0x4581b7){this[_0x114b('0xb')]={};this[_0x114b('0xc')]=_0x4581b7['channels'];this['voiceQueues']=_0x4581b7[_0x114b('0xd')];this['agents']=_0x4581b7['agents'];this[_0x114b('0xe')]={};ami['on'](_0x114b('0xf'),this[_0x114b('0x10')]['bind'](this));ami['on'](_0x114b('0x11'),this[_0x114b('0x12')]['bind'](this));ami['on'](_0x114b('0x13'),this[_0x114b('0x14')][_0x114b('0x15')](this));ami['on'](_0x114b('0x16'),this[_0x114b('0x17')][_0x114b('0x15')](this));ami['on']('agentcomplete',this[_0x114b('0x18')]['bind'](this));ami['on'](_0x114b('0x19'),this[_0x114b('0x1a')]['bind'](this));ami['on'](_0x114b('0x1b'),this['syncHangup'][_0x114b('0x15')](this));ami['on'](_0x114b('0x1c'),this[_0x114b('0x1d')]['bind'](this));ami['on'](_0x114b('0x1e'),this[_0x114b('0x1f')]['bind'](this));ami['on']('attendedtransfer',this['syncAttendedTransfer'][_0x114b('0x15')](this));ami['on']('blindtransfer',this[_0x114b('0x20')][_0x114b('0x15')](this));}VoiceAgentReport['prototype'][_0x114b('0x21')]=function(_0x3193fd,_0x1b496a,_0x38478b){io['to'](_0x3193fd)[_0x114b('0x21')](_0x1b496a,_0x38478b);};VoiceAgentReport['prototype']['isNotNull']=function(_0x1ce83d){return _0x1ce83d!==null&&!_['isUndefined'](_0x1ce83d);};VoiceAgentReport[_0x114b('0x22')]['syncAgentCalled']=function(_0x3fa016){try{if(this['isNotNull'](_0x3fa016)){logger['info'](_0x114b('0x23'),_0x3fa016['uniqueid'],_0x3fa016[_0x114b('0x24')],_0x3fa016[_0x114b('0x25')]);logger[_0x114b('0x26')]('[%s][voiceAgentReport][agentcalled]\x20event:',_0x3fa016['uniqueid'],util['inspect'](_0x3fa016,{'showHidden':![],'depth':null}));if(_[_0x114b('0x27')](this[_0x114b('0xb')][_0x3fa016[_0x114b('0x28')]])){this[_0x114b('0xb')][_0x3fa016[_0x114b('0x28')]]={};}var _0x326f4d=this[_0x114b('0x29')][_0x3fa016[_0x114b('0x2a')]];var _0x1437aa=this[_0x114b('0xb')][_0x3fa016[_0x114b('0x28')]][_0x3fa016[_0x114b('0x25')]];var _0x2fdf7c=this[_0x114b('0xd')][_0x3fa016[_0x114b('0x2b')]];var _0x283d21=this['variables'][_0x3fa016[_0x114b('0x28')]];if(_[_0x114b('0x27')](_0x1437aa)){_0x1437aa={'agentcalledAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),'lastevent':_0x114b('0x2c'),'mandatoryDisposition':_0x2fdf7c&&_0x2fdf7c['mandatoryDisposition']?_0x2fdf7c[_0x114b('0x2d')]:![],'type':_0x2fdf7c&&_0x2fdf7c['type']?_0x2fdf7c[_0x114b('0x2e')]:_0x114b('0x2f'),'variables':_0x283d21,'motionChannel':_0x114b('0x30')};}Object['assign'](_0x1437aa,_[_0x114b('0x31')](_0x3fa016,[_0x114b('0x32'),_0x114b('0x33')]));this[_0x114b('0xb')][_0x3fa016[_0x114b('0x28')]][_0x3fa016['destuniqueid']]=_0x1437aa;logger[_0x114b('0x26')]('[%s][voiceAgentReport][agentcalled]\x20sending\x20agentcalled\x20event:',_0x3fa016[_0x114b('0x28')],util[_0x114b('0x34')](_0x1437aa,{'showHidden':![],'depth':null}));ami[_0x114b('0x21')](_0x114b('0x35'),_0x1437aa);var _0x549380={'id':_0x326f4d['id'],'calleridnum':_0x1437aa[_0x114b('0x36')],'queue':_0x1437aa[_0x114b('0x2b')],'variables':_0x1437aa[_0x114b('0xe')],'uniqueid':_0x3fa016[_0x114b('0x28')]};logger['debug'](_0x114b('0x37'),_0x3fa016[_0x114b('0x28')],util[_0x114b('0x34')](_0x549380,{'showHidden':![],'depth':null}));this['emit'](util[_0x114b('0x38')]('user:%s',_0x3fa016[_0x114b('0x24')]),'user:called',_0x549380);}}catch(_0x12f01c){logger[_0x114b('0x39')](_0x114b('0x3a'),_0x3fa016['uniqueid'],util['inspect'](_0x12f01c,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x114b('0x22')][_0x114b('0x12')]=function(_0xe322e4){try{if(this['isNotNull'](_0xe322e4)){if(this[_0x114b('0xb')][_0xe322e4[_0x114b('0x28')]]){for(var _0x4e7834 in this[_0x114b('0xb')][_0xe322e4['uniqueid']]){if(this[_0x114b('0xb')][_0xe322e4[_0x114b('0x28')]]['hasOwnProperty'](_0x4e7834)){if(_0xe322e4[_0x114b('0x25')]===_0x4e7834){logger[_0x114b('0x3b')](_0x114b('0x3c'),_0xe322e4[_0x114b('0x28')],_0xe322e4[_0x114b('0x24')],_0xe322e4[_0x114b('0x25')]);this[_0x114b('0xb')][_0xe322e4[_0x114b('0x28')]][_0x4e7834][_0x114b('0x3d')]=moment()[_0x114b('0x38')](_0x114b('0x3e'));this['channels'][_0xe322e4[_0x114b('0x28')]][_0x4e7834]['connectedlinename']=_0xe322e4[_0x114b('0x3f')];this[_0x114b('0xb')][_0xe322e4[_0x114b('0x28')]][_0x4e7834][_0x114b('0x40')]=_0xe322e4['connectedlinenum'];this[_0x114b('0xb')][_0xe322e4['uniqueid']][_0x4e7834][_0x114b('0x41')]=_0xe322e4[_0x114b('0x41')];this['channels'][_0xe322e4[_0x114b('0x28')]][_0x4e7834][_0x114b('0x42')]=_0xe322e4[_0x114b('0x42')];this['channels'][_0xe322e4[_0x114b('0x28')]][_0x4e7834][_0x114b('0x43')]=_0xe322e4['holdtime'];this['channels'][_0xe322e4[_0x114b('0x28')]][_0x4e7834][_0x114b('0x44')]=_0x114b('0x45');if(this[_0x114b('0xc')][this['channels'][_0xe322e4[_0x114b('0x28')]][_0x4e7834][_0x114b('0x28')]]){var _0x9db332=this[_0x114b('0xc')][this['channels'][_0xe322e4[_0x114b('0x28')]][_0x4e7834][_0x114b('0x28')]][_0x114b('0x46')];this[_0x114b('0xb')][_0xe322e4[_0x114b('0x28')]][_0x4e7834][_0x114b('0x46')]=_0x9db332;_0xe322e4[_0x114b('0x46')]=_0x9db332;}_['merge'](this[_0x114b('0x29')][_0xe322e4[_0x114b('0x2a')]],_[_0x114b('0x47')](_0xe322e4,[_0x114b('0x2b'),_0x114b('0x48'),_0x114b('0x46')]));var _0x37f737=this['agents'][_0xe322e4[_0x114b('0x2a')]];var _0xfac55f={'id':_0x37f737['id'],'name':_0x37f737['name'],'agentconnected':!![],'destaccountcode':_0x37f737['accountcode'],'destconnectedlinenum':this[_0x114b('0xb')][_0xe322e4[_0x114b('0x28')]][_0xe322e4[_0x114b('0x25')]][_0x114b('0x49')],'queue':this[_0x114b('0xb')][_0xe322e4[_0x114b('0x28')]][_0xe322e4[_0x114b('0x25')]][_0x114b('0x2b')],'routealias':this[_0x114b('0xb')][_0xe322e4[_0x114b('0x28')]][_0xe322e4['destuniqueid']][_0x114b('0x46')],'uniqueid':this[_0x114b('0xb')][_0xe322e4['uniqueid']][_0xe322e4[_0x114b('0x25')]][_0x114b('0x28')]};ami[_0x114b('0x21')](_0x114b('0x4a'),this['channels'][_0xe322e4[_0x114b('0x28')]][_0xe322e4[_0x114b('0x25')]]);this[_0x114b('0x21')](util[_0x114b('0x38')](_0x114b('0x4b'),_0xe322e4[_0x114b('0x24')]),'user:agentconnect',_0xfac55f);}else if(!this[_0x114b('0xb')][_0xe322e4[_0x114b('0x28')]][_0x4e7834][_0x114b('0x13')]&&!this[_0x114b('0xb')][_0xe322e4[_0x114b('0x28')]][_0x4e7834]['agentcomplete']){logger[_0x114b('0x3b')](_0x114b('0x4c'),_0xe322e4[_0x114b('0x28')],this[_0x114b('0xb')][_0xe322e4[_0x114b('0x28')]][_0x4e7834]['membername'],_0x4e7834);this['channels'][_0xe322e4[_0x114b('0x28')]][_0x4e7834][_0x114b('0x13')]=!![];this[_0x114b('0xb')][_0xe322e4[_0x114b('0x28')]][_0x4e7834][_0x114b('0x4d')]=moment()[_0x114b('0x38')](_0x114b('0x3e'));this[_0x114b('0xb')][_0xe322e4['uniqueid']][_0x4e7834]['answeredelsewheredestinationuniqueid']=_0xe322e4[_0x114b('0x25')];this[_0x114b('0xb')][_0xe322e4[_0x114b('0x28')]][_0x4e7834][_0x114b('0x4e')]=_0xe322e4['membername'];this[_0x114b('0xb')][_0xe322e4[_0x114b('0x28')]][_0x4e7834]['lastevent']='answered_elsewhere';this[_0x114b('0xb')][_0xe322e4[_0x114b('0x28')]][_0x4e7834][_0x114b('0x4f')]=_0x114b('0x50');logger[_0x114b('0x26')](_0x114b('0x51'),_0xe322e4['uniqueid'],util['inspect'](this[_0x114b('0xb')][_0xe322e4[_0x114b('0x28')]][_0x4e7834],{'showHidden':![],'depth':null}));ami['emit'](_0x114b('0x52'),this[_0x114b('0xb')][_0xe322e4['uniqueid']][_0x4e7834]);}else{logger[_0x114b('0x26')](_0x114b('0x53'),_0xe322e4['uniqueid']);}}}}}}catch(_0x2012bf){logger[_0x114b('0x39')](_0x114b('0x54'),_0xe322e4[_0x114b('0x28')],util[_0x114b('0x34')](_0x2012bf,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x114b('0x22')][_0x114b('0x14')]=function(_0xdf1ca9){try{if(this[_0x114b('0x55')](_0xdf1ca9)){logger[_0x114b('0x26')](_0x114b('0x56'),_0xdf1ca9['uniqueid'],util[_0x114b('0x34')](_0xdf1ca9,{'showHidden':![],'depth':null}));if(this['channels'][_0xdf1ca9['uniqueid']]&&this[_0x114b('0xb')][_0xdf1ca9['uniqueid']][_0xdf1ca9['destuniqueid']]){logger['info']('[%s][voiceAgentReport][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:rejected',_0xdf1ca9[_0x114b('0x28')],_0xdf1ca9[_0x114b('0x24')],_0xdf1ca9[_0x114b('0x25')]);var _0x4b3f59=this[_0x114b('0x29')][_0xdf1ca9[_0x114b('0x2a')]];var _0x2d3cb8=this[_0x114b('0xb')][_0xdf1ca9['uniqueid']][_0xdf1ca9[_0x114b('0x25')]];_0x2d3cb8['agentringnoanswer']=!![];_0x2d3cb8[_0x114b('0x4d')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x2d3cb8['lastevent']=_0x114b('0x57');_0x2d3cb8['reason']=_0x114b('0x57');var _0x5b01da={'id':_0x4b3f59['id'],'name':_0x4b3f59[_0x114b('0x58')],'queue':_0x2d3cb8[_0x114b('0x2b')],'uniqueid':_0x2d3cb8[_0x114b('0x28')]};logger['debug'](_0x114b('0x59'),_0xdf1ca9['uniqueid'],util['inspect'](_0x5b01da,{'showHidden':![],'depth':null}));this[_0x114b('0x21')](util[_0x114b('0x38')]('user:%s',_0x4b3f59[_0x114b('0x58')]),_0x114b('0x5a'),_0x5b01da);ami[_0x114b('0x21')](_0x114b('0x5b'),_0x2d3cb8);this[_0x114b('0xb')][_0xdf1ca9[_0x114b('0x28')]][_0xdf1ca9[_0x114b('0x25')]]=Object[_0x114b('0x5c')]({},_0x2d3cb8);}}}catch(_0x406f49){logger[_0x114b('0x39')](_0x114b('0x5d'),_0xdf1ca9[_0x114b('0x28')],util[_0x114b('0x34')](_0x406f49,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x114b('0x22')][_0x114b('0x17')]=function(_0x5afbd7){try{if(this[_0x114b('0x55')](_0x5afbd7)){logger[_0x114b('0x26')](_0x114b('0x5e'),_0x5afbd7[_0x114b('0x28')],util[_0x114b('0x34')](_0x5afbd7,{'showHidden':![],'depth':null}));if(this[_0x114b('0xb')][_0x5afbd7[_0x114b('0x28')]]){for(var _0x4dda5f in this[_0x114b('0xb')][_0x5afbd7[_0x114b('0x28')]]){if(this[_0x114b('0xb')][_0x5afbd7[_0x114b('0x28')]][_0x114b('0x5f')](_0x4dda5f)&&!this[_0x114b('0xb')][_0x5afbd7[_0x114b('0x28')]][_0x4dda5f]['agentringnoanswer']&&!this['channels'][_0x5afbd7[_0x114b('0x28')]][_0x4dda5f][_0x114b('0x60')]){logger['info']('[%s][voiceAgentReport][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned',_0x5afbd7[_0x114b('0x28')],this[_0x114b('0xb')][_0x5afbd7['uniqueid']][_0x4dda5f][_0x114b('0x24')],_0x4dda5f);this[_0x114b('0xb')][_0x5afbd7[_0x114b('0x28')]][_0x4dda5f]['agentringnoanswer']=!![];this[_0x114b('0xb')][_0x5afbd7[_0x114b('0x28')]][_0x4dda5f]['agentringnoanswerAt']=moment()[_0x114b('0x38')](_0x114b('0x3e'));this[_0x114b('0xb')][_0x5afbd7['uniqueid']][_0x4dda5f][_0x114b('0x44')]=_0x114b('0x61');this['channels'][_0x5afbd7[_0x114b('0x28')]][_0x4dda5f][_0x114b('0x4f')]=_0x114b('0x61');logger['debug'](_0x114b('0x62'),_0x5afbd7[_0x114b('0x28')],util['inspect'](this['channels'][_0x5afbd7[_0x114b('0x28')]][_0x4dda5f],{'showHidden':![],'depth':null}));ami[_0x114b('0x21')](_0x114b('0x63'),this['channels'][_0x5afbd7[_0x114b('0x28')]][_0x4dda5f]);}}}}}catch(_0x59cabb){logger[_0x114b('0x39')]('[%s][voiceAgentReport][queuecallerabandon]',_0x5afbd7[_0x114b('0x28')],util[_0x114b('0x34')](_0x59cabb,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0x114b('0x18')]=function(_0x487aa2){try{if(this[_0x114b('0x55')](_0x487aa2)){logger[_0x114b('0x26')]('[%s][voiceAgentReport][agentcomplete]\x20event:',_0x487aa2['uniqueid'],util[_0x114b('0x34')](_0x487aa2,{'showHidden':![],'depth':null}));if(this[_0x114b('0xb')][_0x487aa2[_0x114b('0x28')]]){for(var _0x14aef6 in this[_0x114b('0xb')][_0x487aa2[_0x114b('0x28')]]){if(this[_0x114b('0xb')][_0x487aa2[_0x114b('0x28')]][_0x114b('0x5f')](_0x14aef6)){if(this[_0x114b('0xb')][_0x487aa2[_0x114b('0x28')]][_0x14aef6]['agentconnectAt']&&!this[_0x114b('0xb')][_0x487aa2[_0x114b('0x28')]][_0x14aef6][_0x114b('0x60')]){logger[_0x114b('0x3b')]('[%s][voiceAgentReport][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete',_0x487aa2['uniqueid'],this[_0x114b('0xb')][_0x487aa2[_0x114b('0x28')]][_0x14aef6][_0x114b('0x24')],_0x14aef6);this['channels'][_0x487aa2['uniqueid']][_0x14aef6][_0x114b('0x60')]=!![];this[_0x114b('0xb')][_0x487aa2[_0x114b('0x28')]][_0x14aef6][_0x114b('0x64')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');this['channels'][_0x487aa2[_0x114b('0x28')]][_0x14aef6][_0x114b('0x44')]=_0x114b('0x65');this[_0x114b('0xb')][_0x487aa2[_0x114b('0x28')]][_0x14aef6][_0x114b('0x4f')]=_0x487aa2[_0x114b('0x4f')]==_0x114b('0x66')?_0x114b('0x67'):_0x487aa2['reason'];this[_0x114b('0xb')][_0x487aa2[_0x114b('0x28')]][_0x14aef6][_0x114b('0x68')]=_0x487aa2['talktime'];if(this['voiceQueues'][_0x487aa2[_0x114b('0x2b')]]&&this[_0x114b('0xd')][_0x487aa2['queue']][_0x114b('0x69')]){this[_0x114b('0xb')][_0x487aa2[_0x114b('0x28')]][_0x14aef6][_0x114b('0x6a')]=this['voiceQueues'][_0x487aa2['queue']][_0x114b('0x6b')];this['channels'][_0x487aa2[_0x114b('0x28')]][_0x14aef6][_0x114b('0x6c')]=!![];}this[_0x114b('0x29')][_0x487aa2[_0x114b('0x2a')]]=_[_0x114b('0x31')](this[_0x114b('0x29')][_0x487aa2['interface']],[_0x114b('0x2b'),_0x114b('0x48')]);logger['debug'](_0x114b('0x6d'),_0x487aa2['uniqueid'],util[_0x114b('0x34')](this[_0x114b('0xb')][_0x487aa2[_0x114b('0x28')]][_0x14aef6],{'showHidden':![],'depth':null}));ami[_0x114b('0x21')](_0x114b('0x6e'),this[_0x114b('0xb')][_0x487aa2['uniqueid']][_0x14aef6]);logger['debug'](_0x114b('0x6f'),_0x487aa2[_0x114b('0x28')],util[_0x114b('0x34')]({'id':this[_0x114b('0x29')][_0x487aa2[_0x114b('0x2a')]]['id'],'destaccountcode':_0x487aa2[_0x114b('0x70')]},{'showHidden':![],'depth':null}));this[_0x114b('0x21')](util[_0x114b('0x38')](_0x114b('0x4b'),_0x487aa2[_0x114b('0x24')]),_0x114b('0x71'),{'id':this['agents'][_0x487aa2[_0x114b('0x2a')]]['id'],'destaccountcode':Number(_0x487aa2['destaccountcode'])});}}}}}}catch(_0x1530f3){logger[_0x114b('0x39')](_0x114b('0x72'),_0x487aa2[_0x114b('0x28')],util[_0x114b('0x34')](_0x1530f3,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x114b('0x22')][_0x114b('0x1a')]=function(_0xb10ab){try{if(this[_0x114b('0x55')](_0xb10ab)){logger[_0x114b('0x26')](_0x114b('0x73'),_0xb10ab[_0x114b('0x28')],util[_0x114b('0x34')](_0xb10ab,{'showHidden':![],'depth':null}));this['addVariable'](_0xb10ab[_0x114b('0x28')],_[_0x114b('0x74')](_0xb10ab[_0x114b('0x75')])[0x0],_0xb10ab['value']);if(this[_0x114b('0xb')][_0xb10ab[_0x114b('0x28')]]){for(var _0x18d544 in this['channels'][_0xb10ab[_0x114b('0x28')]]){if(this[_0x114b('0xb')][_0xb10ab[_0x114b('0x28')]][_0x114b('0x5f')](_0x18d544)){logger[_0x114b('0x3b')](_0x114b('0x76'),_0xb10ab[_0x114b('0x28')],_0x18d544,_[_0x114b('0x74')](_0xb10ab['variable'])[0x0],_0xb10ab[_0x114b('0x77')]);if(_[_0x114b('0x27')](this[_0x114b('0xb')][_0xb10ab[_0x114b('0x28')]][_0x18d544][_0x114b('0xe')])){this[_0x114b('0xb')][_0xb10ab[_0x114b('0x28')]][_0x18d544]['variables']={};}this[_0x114b('0xb')][_0xb10ab[_0x114b('0x28')]][_0x18d544][_0x114b('0xe')]=this['variables'][_0xb10ab['uniqueid']];}}}}}catch(_0x1f1536){logger[_0x114b('0x39')](_0x114b('0x78'),_0xb10ab[_0x114b('0x28')],util[_0x114b('0x34')](_0x1f1536,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype']['addVariable']=function(_0xaa7859,_0xf3bd81,_0x47b3f9){var _0x4c4c8d=[_0x114b('0x79'),_0x114b('0x7a'),_0x114b('0x7b'),_0x114b('0x7c'),_0x114b('0x7d'),'rtpaudioqoslossbridged',_0x114b('0x7e'),_0x114b('0x7f'),_0x114b('0x80'),_0x114b('0x81'),_0x114b('0x82'),_0x114b('0x83'),_0x114b('0x84'),_0x114b('0x85'),_0x114b('0x86'),_0x114b('0x87'),'membername',_0x114b('0x88'),_0x114b('0x89')];if(!_[_0x114b('0x8a')](_0xf3bd81)&&!_[_0x114b('0x8b')](_0x4c4c8d,_0xf3bd81)){if(_[_0x114b('0x27')](this[_0x114b('0xe')][_0xaa7859])){this[_0x114b('0xe')][_0xaa7859]={};}this[_0x114b('0xe')][_0xaa7859][_0xf3bd81]=_0x47b3f9;}};VoiceAgentReport['prototype'][_0x114b('0x8c')]=function(_0x5515d4){try{if(this[_0x114b('0x55')](_0x5515d4)){logger['debug'](_0x114b('0x8d'),_0x5515d4[_0x114b('0x28')],util[_0x114b('0x34')](_0x5515d4,{'showHidden':![],'depth':null}));if(this['channels'][_0x5515d4[_0x114b('0x28')]]){for(var _0x249d3c in this[_0x114b('0xb')][_0x5515d4['uniqueid']]){if(this[_0x114b('0xb')][_0x5515d4[_0x114b('0x28')]][_0x114b('0x5f')](_0x249d3c)){if(this[_0x114b('0xb')][_0x5515d4[_0x114b('0x28')]][_0x249d3c][_0x114b('0x4f')]==_0x114b('0x66')&&this[_0x114b('0xb')][_0x5515d4[_0x114b('0x28')]][_0x249d3c][_0x114b('0x60')]){logger['info'](_0x114b('0x8e'),_0x5515d4[_0x114b('0x28')],_0x249d3c);this[_0x114b('0xb')][_0x5515d4[_0x114b('0x28')]][_0x249d3c]['agentcompleteAt']=moment()[_0x114b('0x38')](_0x114b('0x3e'));}}}logger[_0x114b('0x26')]('[%s][voiceAgentReport][hangup]\x20sending\x20voiceAgentReport\x20event:',_0x5515d4[_0x114b('0x28')],util[_0x114b('0x34')](_[_0x114b('0x8f')](this['channels'][_0x5515d4[_0x114b('0x28')]]),{'showHidden':![],'depth':null}));ami[_0x114b('0x21')](_0x114b('0x90'),_[_0x114b('0x8f')](this['channels'][_0x5515d4[_0x114b('0x28')]]));delete this['channels'][_0x5515d4['uniqueid']];}if(this[_0x114b('0xe')][_0x5515d4[_0x114b('0x28')]]){delete this[_0x114b('0xe')][_0x5515d4['uniqueid']];}}}catch(_0x5949de){logger['error']('[%s][voiceAgentReport][hangup]',_0x5515d4[_0x114b('0x28')],util['inspect'](_0x5949de,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x114b('0x22')][_0x114b('0x91')]=function(_0x222417){try{if(this[_0x114b('0x55')](_0x222417)){logger['debug']('[%s][voiceAgentReport][attendedtransfer]\x20event:',_0x222417[_0x114b('0x28')],util['inspect'](_0x222417,{'showHidden':![],'depth':null}));if(this[_0x114b('0xb')][_0x222417[_0x114b('0x92')]]){for(var _0x4ce4b0 in this[_0x114b('0xb')][_0x222417[_0x114b('0x92')]]){if(this[_0x114b('0xb')][_0x222417['transfereeuniqueid']][_0x114b('0x5f')](_0x4ce4b0)){if(_0x222417[_0x114b('0x93')]===_0x4ce4b0){logger[_0x114b('0x3b')]('[%s][voiceAgentReport][attendedtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete',_0x222417[_0x114b('0x28')],this[_0x114b('0xb')][_0x222417[_0x114b('0x92')]][_0x4ce4b0][_0x114b('0x24')],_0x4ce4b0);var _0x3f13ef=moment();this[_0x114b('0xb')][_0x222417[_0x114b('0x92')]][_0x4ce4b0][_0x114b('0x60')]=!![];this[_0x114b('0xb')][_0x222417[_0x114b('0x92')]][_0x4ce4b0][_0x114b('0x64')]=moment()[_0x114b('0x38')](_0x114b('0x3e'));this['channels'][_0x222417['transfereeuniqueid']][_0x4ce4b0][_0x114b('0x44')]=_0x114b('0x65');this[_0x114b('0xb')][_0x222417[_0x114b('0x92')]][_0x4ce4b0]['reason']='transfer';this[_0x114b('0xb')][_0x222417[_0x114b('0x92')]][_0x4ce4b0]['talktime']=_0x3f13ef[_0x114b('0x94')](this[_0x114b('0xb')][_0x222417[_0x114b('0x92')]][_0x4ce4b0]['agentconnectAt'],_0x114b('0x95'));}}}}if(this[_0x114b('0xb')][_0x222417[_0x114b('0x96')]]){var _0x57d83e=this[_0x114b('0xb')][_0x222417['secondtransfereruniqueid']];this[_0x114b('0xb')][_0x222417['secondtransfereruniqueid']]=this['channels'][_0x222417[_0x114b('0x92')]];this['channels'][_0x222417[_0x114b('0x92')]]=_0x57d83e;}}}catch(_0x166668){logger[_0x114b('0x39')]('[%s][voiceAgentReport][attendedtransfer]',_0x222417[_0x114b('0x28')],util[_0x114b('0x34')](_0x166668,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x114b('0x22')][_0x114b('0x20')]=function(_0xdeb3f){try{if(this[_0x114b('0x55')](_0xdeb3f)){logger[_0x114b('0x26')](_0x114b('0x97'),_0xdeb3f[_0x114b('0x28')],util[_0x114b('0x34')](_0xdeb3f,{'showHidden':![],'depth':null}));if(this[_0x114b('0xb')][_0xdeb3f[_0x114b('0x92')]]){for(var _0x5800b9 in this['channels'][_0xdeb3f[_0x114b('0x92')]]){if(this[_0x114b('0xb')][_0xdeb3f[_0x114b('0x92')]]['hasOwnProperty'](_0x5800b9)){if(_0xdeb3f['transfereruniqueid']===_0x5800b9){logger[_0x114b('0x3b')](_0x114b('0x98'),_0xdeb3f[_0x114b('0x28')],this[_0x114b('0xb')][_0xdeb3f[_0x114b('0x92')]][_0x5800b9]['membername'],_0x5800b9);var _0x331866=moment();this[_0x114b('0xb')][_0xdeb3f[_0x114b('0x92')]][_0x5800b9][_0x114b('0x60')]=!![];this['channels'][_0xdeb3f[_0x114b('0x92')]][_0x5800b9][_0x114b('0x64')]=_0x331866;this[_0x114b('0xb')][_0xdeb3f[_0x114b('0x92')]][_0x5800b9][_0x114b('0x44')]='complete';this[_0x114b('0xb')][_0xdeb3f[_0x114b('0x92')]][_0x5800b9][_0x114b('0x4f')]='transfer';this[_0x114b('0xb')][_0xdeb3f[_0x114b('0x92')]][_0x5800b9]['talktime']=_0x331866[_0x114b('0x94')](this[_0x114b('0xb')][_0xdeb3f[_0x114b('0x92')]][_0x5800b9][_0x114b('0x3d')],_0x114b('0x95'));}}}}}}catch(_0x3f56c6){logger['error'](_0x114b('0x99'),_0xdeb3f['uniqueid'],util[_0x114b('0x34')](_0x3f56c6,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x114b('0x22')][_0x114b('0x1d')]=function(_0x4724cc){var _0x31d392='';try{if(this['isNotNull'](_0x4724cc)){logger['debug']('[%s][voiceAgentReport][musiconholdstart]\x20event:',_0x4724cc[_0x114b('0x28')],util[_0x114b('0x34')](_0x4724cc,{'showHidden':![],'depth':null}));if(_0x4724cc[_0x114b('0x9a')]){_0x31d392=_0x4724cc['channel']['substring'](0x0,_0x4724cc[_0x114b('0x9a')][_0x114b('0x9b')]('-'));if(this[_0x114b('0x29')][_0x31d392]){logger[_0x114b('0x3b')](_0x114b('0x9c'),_0x4724cc[_0x114b('0x28')],_0x31d392);this[_0x114b('0x29')][_0x31d392]['onhold']=!![];}}}}catch(_0x3deb26){logger['error'](_0x114b('0x9d'),_0x4724cc[_0x114b('0x28')],util[_0x114b('0x34')](_0x3deb26,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x114b('0x22')]['syncMusicOnHoldStop']=function(_0x3be12e){var _0x3df435='';try{if(this[_0x114b('0x55')](_0x3be12e)){logger[_0x114b('0x26')](_0x114b('0x9e'),_0x3be12e[_0x114b('0x28')],util[_0x114b('0x34')](_0x3be12e,{'showHidden':![],'depth':null}));if(_0x3be12e[_0x114b('0x9a')]){_0x3df435=_0x3be12e[_0x114b('0x9a')]['substring'](0x0,_0x3be12e['channel'][_0x114b('0x9b')]('-'));if(this[_0x114b('0x29')][_0x3df435]){logger[_0x114b('0x3b')]('[%s][voiceAgentReport][musiconholdstop]\x20interface:%s',_0x3be12e[_0x114b('0x28')],_0x3df435);this[_0x114b('0x29')][_0x3df435][_0x114b('0x9f')]=![];}}}}catch(_0x439c7b){logger[_0x114b('0x39')](_0x114b('0xa0'),_0x3be12e['uniqueid'],util['inspect'](_0x439c7b,{'showHidden':![],'depth':null}));}};module[_0x114b('0xa1')]=VoiceAgentReport;
\ No newline at end of file
index 01b3833..6ceac34 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfd82=['YYYY-MM-DD\x20HH:mm:ss','disposition','channelstate','undefined','[%s][voiceCallReport][newchannel]\x20sending\x20user:agentconnect\x20event:','[%s][voiceCallReport][newexten]\x20event:','application','toLowerCase','appdata','applicationdata','CDR(routeAlias)','queue','info','[%s][voiceCallReport][newexten]\x20application:%s\x20appdata:%s','duration','subtract','seconds','includes','lastapplication','lastdata','set','cdr(','match','type','isNil','[%s][voiceCallReport][newexten]','syncNewState','[%s][voiceCallReport][newstate]\x20linkedid:%s\x20calleridname:%s\x20calleridnum:%s','[%s][voiceCallReport][newstate]\x20event:','answered','answertime','diff','toNumber','UserId','membername','holdtime','connectedlinename','destinationchannel','routealias','[%s][voiceCallReport][newstate]\x20sending\x20user:agentconnect\x20event:','user:%s','[%s][voiceCallReport][newstate]','syncMixMonitorFilename','[%s][voiceCallReport][mixMonitorFilename]\x20monitorFilename:%s','endsWith','.wav49','replace','.WAV','monitorFilename','find','monitors','push','rec','[%s][voiceCallReport][varset]\x20event:','variable','mixmonitor_filename','[%s][voiceCallReport][varset]\x20variable:mixmonitor_filename\x20value:%s','value','xmd-phone','[%s][voiceCallReport][varset]\x20variable:xmd-phone\x20value:%s','xmd-callerid','[%s][voiceCallReport][varset]\x20variable:xmd-callerid\x20value:%s','callerid','xmd-cdrtype','[%s][voiceCallReport][varset]\x20variable:xmd-cdrtype\x20value:%s','[%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','destination','calleridpreview','xmcs-queue','[%s][voiceCallReport][varset]\x20variable:xmcs-queue\x20value:%s','sipcalluniqueid','sipcallid','sipcalllinkedid','syncHangup','[%s][voiceCallReport][hangup]\x20event:','[%s][voiceCallReport][hangup]\x20reason:%s','cause-txt','endtime','billableseconds','omit','[%s][voiceCallReport][hangup]\x20sending\x20user:agentcomplete\x20event:','length','user:agentcomplete','resolve','then','transferToInternal','getSettings','Action','StopMixMonitor','catch','webbar:stopmonitors','event','custom:voiceCallReport','[%s][voiceCallReport][hangup]','transfertargetcalleridnum','[%s][voiceCallReport][attendedtransfer]\x20event:','transfereeuniqueid','transfercalleridnum','origtransferercalleridnum','transferconnectedlinenum','secondtransfereruniqueid','transferType','ATTENDED','transfertargetuniqueid','origtransfereruniqueid','origtransfererlinkedid','some','outbound','[%s][voiceCallReport][attendedtransfer]','transfereecalleridnum','[%s][voiceCallReport][blindtransfer]\x20event:','extension','BLIND','transfereruniqueid','transfererchannel','[%s][voiceCallReport][blindtransfer]','[%s][voiceCallReport][musiconholdstart]\x20event:','mohstarttime','[%s][voiceCallReport][musiconholdstart]\x20mohstarttime:%s','[%s][voiceCallReport][musiconholdstop]\x20event:','mohtime','milliseconds','exports','lodash','moment','util','path','ioredis','../../../config/environment','../../../config/logger','ami','../ami','../model/channel','../rpc/setting','agi','dial','playback','NO\x20ANSWER','FAILED','ANSWERED','redis','defaults','localhost','channels','agents','blindTransfers','coreshowchannel','syncNewExten','bind','newchannel','syncNewChannel','newstate','varset','syncVarSet','syncNewCallerId','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','[voiceCallReport][coreshowchannels]\x20started','actionCoreShowChannels','error','[voiceCallReport][coreshowchannels]','inspect','isNotNull','isUndefined','prototype','emit','[%s][voiceCallReport][newcallerid]\x20calleridname:%s\x20calleridnum:%s','uniqueid','calleridname','calleridnum','debug','[%s][voiceCallReport][newcallerid]\x20event:','merge','pick','keys','from-sip','channel','split','exten','xcally-motion-preview','destconnectedlinenum','connectedlinenum','name','user:agentconnect','accountcode','[%s][voiceCallReport][newcallerid]','[%s][voiceCallReport][newchannel]\x20event:','OutgoingSpoolFailed','linkedid','context','starttime','format'];(function(_0x278607,_0x52f65f){var _0x162d37=function(_0x34e139){while(--_0x34e139){_0x278607['push'](_0x278607['shift']());}};_0x162d37(++_0x52f65f);}(_0xfd82,0x80));var _0x2fd8=function(_0x392b12,_0x33ab7c){_0x392b12=_0x392b12-0x0;var _0x3776e0=_0xfd82[_0x392b12];return _0x3776e0;};'use strict';var _=require(_0x2fd8('0x0'));var moment=require(_0x2fd8('0x1'));var util=require(_0x2fd8('0x2'));var path=require(_0x2fd8('0x3'));var Redis=require(_0x2fd8('0x4'));var config=require(_0x2fd8('0x5'));var logger=require(_0x2fd8('0x6'))(_0x2fd8('0x7'));var ami=require(_0x2fd8('0x8'));var Channel=require(_0x2fd8('0x9'));var RpcSetting=require(_0x2fd8('0xa'));var applications=['set','queue',_0x2fd8('0xb'),_0x2fd8('0xc'),_0x2fd8('0xd'),'voicemail'];var dispositions=[_0x2fd8('0xe'),_0x2fd8('0xf'),_0x2fd8('0xf'),_0x2fd8('0xe'),'NO\x20ANSWER',_0x2fd8('0xe'),_0x2fd8('0x10'),'BUSY',_0x2fd8('0xf'),_0x2fd8('0xf'),_0x2fd8('0xf')];config[_0x2fd8('0x11')]=_[_0x2fd8('0x12')](config[_0x2fd8('0x11')],{'host':_0x2fd8('0x13'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x2fd8('0x11')]));function VoiceCallReport(_0x1c8a29){this[_0x2fd8('0x14')]=_0x1c8a29[_0x2fd8('0x14')];this['agents']=_0x1c8a29[_0x2fd8('0x15')];this[_0x2fd8('0x16')]={};ami['on'](_0x2fd8('0x17'),this[_0x2fd8('0x18')][_0x2fd8('0x19')](this));ami['on']('newexten',this[_0x2fd8('0x18')][_0x2fd8('0x19')](this));ami['on'](_0x2fd8('0x1a'),this[_0x2fd8('0x1b')][_0x2fd8('0x19')](this));ami['on'](_0x2fd8('0x1c'),this['syncNewState'][_0x2fd8('0x19')](this));ami['on'](_0x2fd8('0x1d'),this[_0x2fd8('0x1e')][_0x2fd8('0x19')](this));ami['on']('hangup',this['syncHangup'][_0x2fd8('0x19')](this));ami['on']('newcallerid',this[_0x2fd8('0x1f')]['bind'](this));ami['on'](_0x2fd8('0x20'),this[_0x2fd8('0x21')][_0x2fd8('0x19')](this));ami['on'](_0x2fd8('0x22'),this[_0x2fd8('0x23')]['bind'](this));ami['on'](_0x2fd8('0x24'),this[_0x2fd8('0x25')]['bind'](this));ami['on'](_0x2fd8('0x26'),this[_0x2fd8('0x27')]['bind'](this));try{logger['info'](_0x2fd8('0x28'));ami[_0x2fd8('0x29')]();}catch(_0x46beb9){logger[_0x2fd8('0x2a')](_0x2fd8('0x2b'),util[_0x2fd8('0x2c')](_0x46beb9,{'showHidden':![],'depth':null}));}}VoiceCallReport['prototype'][_0x2fd8('0x2d')]=function(_0x19fe09){return _0x19fe09!==null&&!_[_0x2fd8('0x2e')](_0x19fe09);};VoiceCallReport[_0x2fd8('0x2f')][_0x2fd8('0x30')]=function(_0x6e5a0b,_0x1e5797,_0x172e91){io['to'](_0x6e5a0b)[_0x2fd8('0x30')](_0x1e5797,_0x172e91);};VoiceCallReport[_0x2fd8('0x2f')][_0x2fd8('0x1f')]=function(_0x340928){try{if(this[_0x2fd8('0x2d')](_0x340928)){logger['info'](_0x2fd8('0x31'),_0x340928[_0x2fd8('0x32')],_0x340928[_0x2fd8('0x33')],_0x340928[_0x2fd8('0x34')]);logger[_0x2fd8('0x35')](_0x2fd8('0x36'),_0x340928[_0x2fd8('0x32')],util[_0x2fd8('0x2c')](_0x340928,{'showHidden':![],'depth':null}));if(_0x340928[_0x2fd8('0x32')]===_0x340928['linkedid']){if(!_['isUndefined'](this[_0x2fd8('0x14')][_0x340928['uniqueid']])){_[_0x2fd8('0x37')](this['channels'][_0x340928[_0x2fd8('0x32')]],_[_0x2fd8('0x38')](_0x340928,_[_0x2fd8('0x39')](this[_0x2fd8('0x14')][_0x340928[_0x2fd8('0x32')]])));}}if(_0x340928['context']===_0x2fd8('0x3a')){var _0x253ff6=this[_0x2fd8('0x15')][_0x340928[_0x2fd8('0x3b')][_0x2fd8('0x3c')]('-')[0x0]];if(_0x253ff6){if(_0x340928[_0x2fd8('0x3d')]==_0x2fd8('0x3e')){_0x253ff6[_0x2fd8('0x3f')]=_0x340928[_0x2fd8('0x40')];this['emit'](util['format']('user:%s',_0x253ff6[_0x2fd8('0x41')]),_0x2fd8('0x42'),{'id':_0x253ff6['id'],'destaccountcode':_0x253ff6[_0x2fd8('0x43')],'destconnectedlinenum':_0x340928['connectedlinenum']});}}}}}catch(_0x3aa235){logger[_0x2fd8('0x2a')](_0x2fd8('0x44'),_0x340928[_0x2fd8('0x32')],util['inspect'](_0x3aa235,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x2fd8('0x2f')]['syncNewChannel']=function(_0x3197ea){try{if(this['isNotNull'](_0x3197ea)){logger[_0x2fd8('0x35')](_0x2fd8('0x45'),_0x3197ea['uniqueid'],util[_0x2fd8('0x2c')](_0x3197ea,{'showHidden':![],'depth':null}));if(this[_0x2fd8('0x14')][_0x3197ea[_0x2fd8('0x32')]]){return;}if(_0x3197ea[_0x2fd8('0x3b')]===_0x2fd8('0x46')){return;}if(_0x3197ea[_0x2fd8('0x32')]!==_0x3197ea[_0x2fd8('0x47')]&&!this[_0x2fd8('0x16')][_0x3197ea[_0x2fd8('0x47')]]){return;}logger['info']('[%s][voiceCallReport][newchannel]\x20context:%s\x20exten:%s',_0x3197ea[_0x2fd8('0x32')],_0x3197ea[_0x2fd8('0x48')],_0x3197ea[_0x2fd8('0x3d')]);this['channels'][_0x3197ea['uniqueid']]=new Channel();this[_0x2fd8('0x14')][_0x3197ea[_0x2fd8('0x32')]][_0x2fd8('0x49')]=moment()[_0x2fd8('0x4a')](_0x2fd8('0x4b'));this[_0x2fd8('0x14')][_0x3197ea[_0x2fd8('0x32')]][_0x2fd8('0x4c')]=dispositions[_['toNumber'](_0x3197ea[_0x2fd8('0x4d')])];_['merge'](this[_0x2fd8('0x14')][_0x3197ea[_0x2fd8('0x32')]],_['pick'](_0x3197ea,_[_0x2fd8('0x39')](this['channels'][_0x3197ea[_0x2fd8('0x32')]])));if(_0x3197ea[_0x2fd8('0x48')]===_0x2fd8('0x3a')){var _0x38e81e=this[_0x2fd8('0x15')][_0x3197ea['channel'][_0x2fd8('0x3c')]('-')[0x0]];if(_0x38e81e&&typeof _0x38e81e[_0x2fd8('0x3f')]===_0x2fd8('0x4e')){_0x38e81e['destconnectedlinenum']=_0x3197ea[_0x2fd8('0x3d')];logger[_0x2fd8('0x35')](_0x2fd8('0x4f'),_0x3197ea[_0x2fd8('0x32')],util['inspect']({'id':_0x38e81e['id'],'destaccountcode':_0x38e81e[_0x2fd8('0x43')],'destconnectedlinenum':_0x3197ea[_0x2fd8('0x3d')]},{'showHidden':![],'depth':null}));this[_0x2fd8('0x30')](util[_0x2fd8('0x4a')]('user:%s',_0x38e81e['name']),_0x2fd8('0x42'),{'id':_0x38e81e['id'],'destaccountcode':_0x38e81e['accountcode'],'destconnectedlinenum':_0x3197ea[_0x2fd8('0x3d')]});}}}}catch(_0x488fc4){logger[_0x2fd8('0x2a')]('[%s][voiceCallReport][newchannel]',_0x3197ea[_0x2fd8('0x32')],util[_0x2fd8('0x2c')](_0x488fc4,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x2fd8('0x2f')][_0x2fd8('0x18')]=function(_0x209115){try{if(this[_0x2fd8('0x2d')](_0x209115)){logger['debug'](_0x2fd8('0x50'),_0x209115[_0x2fd8('0x32')],util[_0x2fd8('0x2c')](_0x209115,{'showHidden':![],'depth':null}));if(_0x209115[_0x2fd8('0x3b')]===_0x2fd8('0x46')||_0x209115[_0x2fd8('0x3d')]==='h')return;if(_0x209115[_0x2fd8('0x32')]===_0x209115[_0x2fd8('0x47')]||this['blindTransfers'][_0x209115[_0x2fd8('0x47')]]){_0x209115[_0x2fd8('0x51')]=_0x209115[_0x2fd8('0x51')]?_0x209115[_0x2fd8('0x51')][_0x2fd8('0x52')]():undefined;_0x209115['applicationdata']=_0x209115[_0x2fd8('0x53')]||_0x209115[_0x2fd8('0x54')];if(_0x209115['appdata']&&!_0x209115[_0x2fd8('0x53')]['startsWith'](_0x2fd8('0x55'))&&_0x209115['application']!==_0x2fd8('0x56')){_0x209115['applicationdata']=_0x209115[_0x2fd8('0x54')][_0x2fd8('0x52')]();}logger[_0x2fd8('0x57')](_0x2fd8('0x58'),_0x209115[_0x2fd8('0x32')],_0x209115[_0x2fd8('0x51')],_0x209115[_0x2fd8('0x54')]);if(_[_0x2fd8('0x2e')](this[_0x2fd8('0x14')][_0x209115[_0x2fd8('0x32')]])){this[_0x2fd8('0x14')][_0x209115[_0x2fd8('0x32')]]=new Channel();this[_0x2fd8('0x14')][_0x209115[_0x2fd8('0x32')]][_0x2fd8('0x49')]=_0x209115[_0x2fd8('0x59')]?moment()[_0x2fd8('0x5a')](moment['duration'](_0x209115[_0x2fd8('0x59')])[_0x2fd8('0x5b')](),_0x2fd8('0x5b'))[_0x2fd8('0x4a')](_0x2fd8('0x4b')):moment()[_0x2fd8('0x4a')](_0x2fd8('0x4b'));this[_0x2fd8('0x14')][_0x209115['uniqueid']][_0x2fd8('0x4c')]=_0x2fd8('0xe');}_[_0x2fd8('0x37')](this[_0x2fd8('0x14')][_0x209115[_0x2fd8('0x32')]],_[_0x2fd8('0x38')](_0x209115,_['keys'](this[_0x2fd8('0x14')][_0x209115['uniqueid']])));if(_[_0x2fd8('0x5c')](applications,_0x209115[_0x2fd8('0x51')])){this['channels'][_0x209115[_0x2fd8('0x32')]][_0x2fd8('0x5d')]=_0x209115[_0x2fd8('0x51')];this['channels'][_0x209115[_0x2fd8('0x32')]][_0x2fd8('0x5e')]=_0x209115[_0x2fd8('0x54')];if(_0x209115[_0x2fd8('0x51')]===_0x2fd8('0x5f')&&_['startsWith'](_0x209115[_0x2fd8('0x54')][_0x2fd8('0x52')](),_0x2fd8('0x60'))){var _0x39e394=_0x209115[_0x2fd8('0x54')][_0x2fd8('0x3c')]('=');var _0x106001=_0x39e394[0x0][_0x2fd8('0x52')]()[_0x2fd8('0x61')](/cdr\((.*)\)/);if(_0x106001){if(_0x106001[0x1]===_0x2fd8('0x62')&&!_[_0x2fd8('0x63')](this[_0x2fd8('0x14')][_0x209115[_0x2fd8('0x32')]][_0x106001[0x1]]))return;this[_0x2fd8('0x14')][_0x209115[_0x2fd8('0x32')]][_0x106001[0x1]]=_0x39e394[0x1];}}else if(_0x209115[_0x2fd8('0x51')]===_0x2fd8('0x56')){this[_0x2fd8('0x14')][_0x209115[_0x2fd8('0x32')]]['queue']=_0x209115[_0x2fd8('0x54')][_0x2fd8('0x3c')](',')[0x0];}}}}}catch(_0x48c9c7){logger[_0x2fd8('0x2a')](_0x2fd8('0x64'),_0x209115['uniqueid'],util[_0x2fd8('0x2c')](_0x48c9c7,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x2fd8('0x2f')][_0x2fd8('0x65')]=function(_0x23f832){try{if(this[_0x2fd8('0x2d')](_0x23f832)){logger[_0x2fd8('0x57')](_0x2fd8('0x66'),_0x23f832['uniqueid'],_0x23f832[_0x2fd8('0x47')],_0x23f832[_0x2fd8('0x33')],_0x23f832['calleridnum']);logger[_0x2fd8('0x35')](_0x2fd8('0x67'),_0x23f832[_0x2fd8('0x32')],util['inspect'](_0x23f832,{'showHidden':![],'depth':null}));if(_0x23f832['channelstate']!=='6')return;var _0x1bd078=this[_0x2fd8('0x15')][_0x23f832[_0x2fd8('0x3b')][_0x2fd8('0x3c')]('-')[0x0]];if(_0x23f832[_0x2fd8('0x32')]!==_0x23f832[_0x2fd8('0x47')]){var _0x27ab47=moment();if(this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x47')]]){if(!this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x47')]][_0x2fd8('0x68')]){this[_0x2fd8('0x14')][_0x23f832['linkedid']]['answered']=!![];this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x47')]][_0x2fd8('0x69')]=_0x27ab47[_0x2fd8('0x4a')](_0x2fd8('0x4b'));if(this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x47')]][_0x2fd8('0x49')]){this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x47')]]['holdtime']=_0x27ab47[_0x2fd8('0x6a')](this['channels'][_0x23f832['linkedid']][_0x2fd8('0x49')],_0x2fd8('0x5b'));}}this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x47')]][_0x2fd8('0x47')]=_0x23f832[_0x2fd8('0x32')];if(_0x23f832['calleridnum']!==_0x2fd8('0x3e')){this['channels'][_0x23f832[_0x2fd8('0x47')]][_0x2fd8('0x40')]=_0x23f832[_0x2fd8('0x34')];}this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x47')]]['connectedlinename']=_0x23f832[_0x2fd8('0x33')];this['channels'][_0x23f832[_0x2fd8('0x47')]]['destinationchannel']=_0x23f832[_0x2fd8('0x3b')];this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x47')]][_0x2fd8('0x4c')]=dispositions[_[_0x2fd8('0x6b')](_0x23f832[_0x2fd8('0x4d')])];if(_0x1bd078){this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x47')]][_0x2fd8('0x6c')]=_0x1bd078['id'];this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x47')]][_0x2fd8('0x6d')]=_0x1bd078[_0x2fd8('0x41')];}}if(this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x32')]]){if(!this['channels'][_0x23f832[_0x2fd8('0x32')]]['answered']){this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x32')]][_0x2fd8('0x68')]=!![];this[_0x2fd8('0x14')][_0x23f832['uniqueid']][_0x2fd8('0x69')]=_0x27ab47['format'](_0x2fd8('0x4b'));if(this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x32')]][_0x2fd8('0x49')]){this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x32')]][_0x2fd8('0x6e')]=_0x27ab47[_0x2fd8('0x6a')](this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x32')]][_0x2fd8('0x49')],_0x2fd8('0x5b'));}}if(_0x23f832[_0x2fd8('0x34')]!==_0x2fd8('0x3e')){this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x32')]]['connectedlinenum']=_0x23f832[_0x2fd8('0x34')];}this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x32')]][_0x2fd8('0x6f')]=_0x23f832['calleridname'];this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x32')]][_0x2fd8('0x70')]=_0x23f832[_0x2fd8('0x3b')];this[_0x2fd8('0x14')][_0x23f832['uniqueid']][_0x2fd8('0x4c')]=dispositions[_['toNumber'](_0x23f832['channelstate'])];}}else{if(this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x32')]]){if(_0x1bd078){this['channels'][_0x23f832[_0x2fd8('0x32')]]['UserId']=_0x1bd078['id'];this[_0x2fd8('0x14')][_0x23f832['uniqueid']]['membername']=_0x1bd078['name'];}}}if(_0x23f832[_0x2fd8('0x48')]==='from-sip'){if(_0x1bd078){_0x1bd078[_0x2fd8('0x3f')]=_0x23f832[_0x2fd8('0x3d')];var _0x13843f,_0x5a5f47;if(this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x32')]]){_0x13843f=this[_0x2fd8('0x14')][_0x23f832[_0x2fd8('0x32')]]['routealias'];_0x5a5f47=this['channels'][_0x23f832['uniqueid']][_0x2fd8('0x56')];}else if(this[_0x2fd8('0x14')][_0x23f832['linkedid']]){_0x13843f=this['channels'][_0x23f832[_0x2fd8('0x47')]][_0x2fd8('0x71')];_0x5a5f47=this[_0x2fd8('0x14')][_0x23f832['linkedid']][_0x2fd8('0x56')];}_0x1bd078['queue']=_0x5a5f47;_0x1bd078[_0x2fd8('0x71')]=_0x13843f;var _0x5122ac={'id':_0x1bd078['id'],'name':_0x1bd078['name'],'agentconnected':!![],'destaccountcode':_0x1bd078[_0x2fd8('0x43')],'destconnectedlinenum':_0x23f832[_0x2fd8('0x3d')],'queue':_0x5a5f47||undefined,'routealias':_0x13843f,'uniqueid':_0x23f832[_0x2fd8('0x47')]};logger[_0x2fd8('0x35')](_0x2fd8('0x72'),_0x23f832[_0x2fd8('0x32')],util[_0x2fd8('0x2c')](_0x5122ac,{'showHidden':![],'depth':null}));this['emit'](util[_0x2fd8('0x4a')](_0x2fd8('0x73'),_0x1bd078[_0x2fd8('0x41')]),_0x2fd8('0x42'),_0x5122ac);}}}}catch(_0x356962){logger['error'](_0x2fd8('0x74'),_0x23f832['uniqueid'],util[_0x2fd8('0x2c')](_0x356962,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype'][_0x2fd8('0x75')]=function(_0x2c5fd6,_0x193929){try{if(this[_0x2fd8('0x14')][_0x2c5fd6]){logger[_0x2fd8('0x57')](_0x2fd8('0x76'),_0x2c5fd6,_0x193929);this[_0x2fd8('0x14')][_0x2c5fd6]['monitor']=!![];if(_[_0x2fd8('0x77')](_0x193929,_0x2fd8('0x78'))){_0x193929=_0x193929[_0x2fd8('0x79')](_0x2fd8('0x78'),_0x2fd8('0x7a'));}this['channels'][_0x2c5fd6][_0x2fd8('0x7b')]=_0x193929;var _0x3108f7=_[_0x2fd8('0x7c')](this[_0x2fd8('0x14')][_0x2c5fd6]['monitors'],{'filename':_0x193929});if(_[_0x2fd8('0x63')](_0x3108f7)){this[_0x2fd8('0x14')][_0x2c5fd6][_0x2fd8('0x7d')][_0x2fd8('0x7e')]({'filename':_0x193929,'createdAt':moment()['format'](_0x2fd8('0x4b')),'mixmonitorid':'','status':_0x2fd8('0x7f')});}}}catch(_0x12a20a){logger['error']('[%s][voiceCallReport][mixMonitorFilename]',_0x2c5fd6,util['inspect'](_0x12a20a,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype']['syncVarSet']=function(_0x2b5ca9){try{if(this[_0x2fd8('0x2d')](_0x2b5ca9)){logger[_0x2fd8('0x35')](_0x2fd8('0x80'),_0x2b5ca9[_0x2fd8('0x32')],util[_0x2fd8('0x2c')](_0x2b5ca9,{'showHidden':![],'depth':null}));if(this['channels'][_0x2b5ca9[_0x2fd8('0x32')]]&&_0x2b5ca9[_0x2fd8('0x3b')]!=_0x2fd8('0x46')){if(this['isNotNull'](_0x2b5ca9[_0x2fd8('0x81')])){if(this['isNotNull'](_0x2b5ca9['variable'][_0x2fd8('0x82')])){logger[_0x2fd8('0x57')](_0x2fd8('0x83'),_0x2b5ca9['uniqueid'],_0x2b5ca9[_0x2fd8('0x84')]);this[_0x2fd8('0x75')](_0x2b5ca9['uniqueid'],_0x2b5ca9['value']);}else if(this[_0x2fd8('0x2d')](_0x2b5ca9[_0x2fd8('0x81')][_0x2fd8('0x85')])){logger['info'](_0x2fd8('0x86'),_0x2b5ca9['uniqueid'],_0x2b5ca9[_0x2fd8('0x84')]);this[_0x2fd8('0x14')][_0x2b5ca9[_0x2fd8('0x32')]][_0x2fd8('0x34')]=_0x2b5ca9[_0x2fd8('0x84')];}else if(this[_0x2fd8('0x2d')](_0x2b5ca9[_0x2fd8('0x81')][_0x2fd8('0x87')])){logger[_0x2fd8('0x57')](_0x2fd8('0x88'),_0x2b5ca9[_0x2fd8('0x32')],_0x2b5ca9[_0x2fd8('0x84')]);this[_0x2fd8('0x14')][_0x2b5ca9[_0x2fd8('0x32')]][_0x2fd8('0x89')]=_0x2b5ca9[_0x2fd8('0x84')];}else if(this['isNotNull'](_0x2b5ca9[_0x2fd8('0x81')][_0x2fd8('0x8a')])){logger[_0x2fd8('0x57')](_0x2fd8('0x8b'),_0x2b5ca9[_0x2fd8('0x32')],_0x2b5ca9[_0x2fd8('0x84')]);this[_0x2fd8('0x14')][_0x2b5ca9['uniqueid']][_0x2fd8('0x62')]=_0x2b5ca9[_0x2fd8('0x84')];}else if(this[_0x2fd8('0x2d')](_0x2b5ca9['variable']['xmd-queue'])){logger[_0x2fd8('0x57')](_0x2fd8('0x8c'),_0x2b5ca9[_0x2fd8('0x32')],_0x2b5ca9['value']['split'](',')[0x0]);this[_0x2fd8('0x14')][_0x2b5ca9[_0x2fd8('0x32')]][_0x2fd8('0x56')]=_0x2b5ca9[_0x2fd8('0x84')][_0x2fd8('0x3c')](',')[0x0];}else if(this['isNotNull'](_0x2b5ca9[_0x2fd8('0x81')][_0x2fd8('0x8d')])){logger[_0x2fd8('0x57')](_0x2fd8('0x8e'),_0x2b5ca9['uniqueid'],_0x2b5ca9[_0x2fd8('0x84')]);this[_0x2fd8('0x14')][_0x2b5ca9[_0x2fd8('0x32')]][_0x2fd8('0x8f')]=_0x2b5ca9[_0x2fd8('0x84')];}else if(this[_0x2fd8('0x2d')](_0x2b5ca9[_0x2fd8('0x81')][_0x2fd8('0x90')])){logger[_0x2fd8('0x57')](_0x2fd8('0x91'),_0x2b5ca9['uniqueid'],_0x2b5ca9['value']);this[_0x2fd8('0x14')][_0x2b5ca9[_0x2fd8('0x32')]][_0x2fd8('0x92')]=_0x2b5ca9['value'];}else if(this[_0x2fd8('0x2d')](_0x2b5ca9['variable']['xmd-callerid-preview'])){logger['info']('[%s][voiceCallReport][varset]\x20variable:xmd-callerid-preview\x20value:%s',_0x2b5ca9[_0x2fd8('0x32')],_0x2b5ca9[_0x2fd8('0x84')]);this['channels'][_0x2b5ca9[_0x2fd8('0x32')]][_0x2fd8('0x93')]=_0x2b5ca9[_0x2fd8('0x84')];}else if(this[_0x2fd8('0x2d')](_0x2b5ca9[_0x2fd8('0x81')][_0x2fd8('0x94')])){logger['info'](_0x2fd8('0x95'),_0x2b5ca9[_0x2fd8('0x32')],_0x2b5ca9[_0x2fd8('0x84')]);this[_0x2fd8('0x14')][_0x2b5ca9[_0x2fd8('0x32')]][_0x2fd8('0x56')]=_0x2b5ca9[_0x2fd8('0x84')];}else if(this['isNotNull'](_0x2b5ca9['variable']['sipcallid'])){logger['info']('[%s][voiceCallReport][varset]\x20variable:sipcallid\x20value:%s',_0x2b5ca9[_0x2fd8('0x32')],_0x2b5ca9['value']);this['channels'][_0x2b5ca9[_0x2fd8('0x32')]][_0x2fd8('0x96')]=_0x2b5ca9[_0x2fd8('0x84')];}}}else if(this['isNotNull'](_0x2b5ca9[_0x2fd8('0x81')]['mixmonitor_filename'])){if(_0x2b5ca9[_0x2fd8('0x84')]){var _0x7d49d1=path['parse'](_0x2b5ca9['value'])[_0x2fd8('0x41')];logger[_0x2fd8('0x57')](_0x2fd8('0x83'),_0x7d49d1,_0x2b5ca9[_0x2fd8('0x84')]);this[_0x2fd8('0x75')](_0x7d49d1,_0x2b5ca9['value']);}}else if(this[_0x2fd8('0x14')][_0x2b5ca9[_0x2fd8('0x47')]]){if(this[_0x2fd8('0x2d')](_0x2b5ca9[_0x2fd8('0x81')])){if(this[_0x2fd8('0x2d')](_0x2b5ca9[_0x2fd8('0x81')][_0x2fd8('0x97')])){logger[_0x2fd8('0x57')]('[%s][voiceCallReport][varset]\x20variable:sipcallid\x20value:%s',_0x2b5ca9['linkedid'],_0x2b5ca9[_0x2fd8('0x84')]);this['channels'][_0x2b5ca9[_0x2fd8('0x47')]][_0x2fd8('0x98')]=_0x2b5ca9['value'];}}}}}catch(_0x22dd9a){logger['error']('[%s][voiceCallReport][varset]',_0x2b5ca9['uniqueid'],util[_0x2fd8('0x2c')](_0x22dd9a,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype'][_0x2fd8('0x99')]=function(_0x412fdc){try{if(this[_0x2fd8('0x2d')](_0x412fdc)){logger[_0x2fd8('0x35')](_0x2fd8('0x9a'),_0x412fdc[_0x2fd8('0x32')],util[_0x2fd8('0x2c')](_0x412fdc,{'showHidden':![],'depth':null}));if(this[_0x2fd8('0x16')][_0x412fdc[_0x2fd8('0x47')]]){if(this['channels'][this[_0x2fd8('0x16')][_0x412fdc[_0x2fd8('0x47')]][_0x2fd8('0x47')]]){this['channels'][this[_0x2fd8('0x16')][_0x412fdc[_0x2fd8('0x47')]][_0x2fd8('0x47')]][_0x2fd8('0x32')]=_0x412fdc[_0x2fd8('0x32')];this[_0x2fd8('0x14')][this[_0x2fd8('0x16')][_0x412fdc[_0x2fd8('0x47')]]['linkedid']][_0x2fd8('0x68')]=this[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]][_0x2fd8('0x68')];this['channels'][this[_0x2fd8('0x16')][_0x412fdc[_0x2fd8('0x47')]][_0x2fd8('0x47')]][_0x2fd8('0x69')]=this[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]]['answertime'];this[_0x2fd8('0x14')][this[_0x2fd8('0x16')][_0x412fdc[_0x2fd8('0x47')]][_0x2fd8('0x47')]][_0x2fd8('0x70')]=this[_0x2fd8('0x14')][this[_0x2fd8('0x16')][_0x412fdc[_0x2fd8('0x47')]][_0x2fd8('0x47')]]['channel'];this['channels'][this[_0x2fd8('0x16')][_0x412fdc[_0x2fd8('0x47')]][_0x2fd8('0x47')]][_0x2fd8('0x4c')]=this['channels'][_0x412fdc[_0x2fd8('0x32')]]['disposition'];this[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]]=this[_0x2fd8('0x14')][this[_0x2fd8('0x16')][_0x412fdc[_0x2fd8('0x47')]][_0x2fd8('0x47')]];delete this[_0x2fd8('0x14')][this[_0x2fd8('0x16')][_0x412fdc[_0x2fd8('0x47')]][_0x2fd8('0x47')]];}else if(this[_0x2fd8('0x14')][this[_0x2fd8('0x16')][_0x412fdc['linkedid']]['uniqueid']]){this[_0x2fd8('0x14')][this['blindTransfers'][_0x412fdc[_0x2fd8('0x47')]]['uniqueid']][_0x2fd8('0x32')]=[this[_0x2fd8('0x14')][this['blindTransfers'][_0x412fdc['linkedid']][_0x2fd8('0x32')]][_0x2fd8('0x47')],this[_0x2fd8('0x14')][this['blindTransfers'][_0x412fdc[_0x2fd8('0x47')]]['uniqueid']]['linkedid']=this[_0x2fd8('0x14')][this[_0x2fd8('0x16')][_0x412fdc[_0x2fd8('0x47')]][_0x2fd8('0x32')]]['uniqueid']][0x0];this['channels'][this['blindTransfers'][_0x412fdc[_0x2fd8('0x47')]][_0x2fd8('0x32')]][_0x2fd8('0x68')]=this['channels'][_0x412fdc[_0x2fd8('0x32')]][_0x2fd8('0x68')];this[_0x2fd8('0x14')][this[_0x2fd8('0x16')][_0x412fdc[_0x2fd8('0x47')]][_0x2fd8('0x32')]][_0x2fd8('0x69')]=this[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]][_0x2fd8('0x69')];this['channels'][this[_0x2fd8('0x16')][_0x412fdc[_0x2fd8('0x47')]][_0x2fd8('0x32')]][_0x2fd8('0x70')]=this[_0x2fd8('0x14')][this[_0x2fd8('0x16')][_0x412fdc[_0x2fd8('0x47')]][_0x2fd8('0x32')]][_0x2fd8('0x3b')];this['channels'][this[_0x2fd8('0x16')][_0x412fdc['linkedid']][_0x2fd8('0x32')]][_0x2fd8('0x4c')]=this[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]][_0x2fd8('0x4c')];this[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]]=this[_0x2fd8('0x14')][this[_0x2fd8('0x16')][_0x412fdc['linkedid']]['uniqueid']];delete this[_0x2fd8('0x14')][this[_0x2fd8('0x16')][_0x412fdc[_0x2fd8('0x47')]][_0x2fd8('0x32')]];}}if(this[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]]){logger[_0x2fd8('0x57')](_0x2fd8('0x9b'),_0x412fdc[_0x2fd8('0x32')],_0x412fdc[_0x2fd8('0x9c')]);var _0x55098f=moment();this[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]][_0x2fd8('0x9d')]=_0x55098f[_0x2fd8('0x4a')]('YYYY-MM-DD\x20HH:mm:ss');this[_0x2fd8('0x14')][_0x412fdc['uniqueid']]['duration']=_0x55098f[_0x2fd8('0x6a')](this[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]][_0x2fd8('0x49')],_0x2fd8('0x5b'));if(this[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]][_0x2fd8('0x68')]){this[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]]['billableseconds']=_0x55098f['diff'](this[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]][_0x2fd8('0x69')],_0x2fd8('0x5b'));this[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]][_0x2fd8('0x6e')]=this[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]]['duration']-this['channels'][_0x412fdc[_0x2fd8('0x32')]][_0x2fd8('0x9e')];}if(_0x412fdc['context']==='from-sip'){if(this['agents'][_0x412fdc[_0x2fd8('0x3b')][_0x2fd8('0x3c')]('-')[0x0]]){this[_0x2fd8('0x15')][_0x412fdc[_0x2fd8('0x3b')][_0x2fd8('0x3c')]('-')[0x0]]=_[_0x2fd8('0x9f')](this[_0x2fd8('0x15')][_0x412fdc[_0x2fd8('0x3b')][_0x2fd8('0x3c')]('-')[0x0]],[_0x2fd8('0x3f')]);logger[_0x2fd8('0x35')](_0x2fd8('0xa0'),_0x412fdc[_0x2fd8('0x32')],util[_0x2fd8('0x2c')]({'id':this['agents'][_0x412fdc[_0x2fd8('0x3b')][_0x2fd8('0x3c')]('-')[0x0]]['id'],'destaccountcode':this['agents'][_0x412fdc[_0x2fd8('0x3b')][_0x2fd8('0x3c')]('-')[0x0]][_0x2fd8('0x43')]},{'showHidden':![],'depth':null}));this[_0x2fd8('0x30')](util[_0x2fd8('0x4a')](_0x2fd8('0x73'),this[_0x2fd8('0x15')][_0x412fdc[_0x2fd8('0x3b')][_0x2fd8('0x3c')]('-')[0x0]][_0x2fd8('0x41')]),'user:agentcomplete',{'id':this[_0x2fd8('0x15')][_0x412fdc['channel']['split']('-')[0x0]]['id'],'destaccountcode':this[_0x2fd8('0x15')][_0x412fdc[_0x2fd8('0x3b')][_0x2fd8('0x3c')]('-')[0x0]][_0x2fd8('0x43')]});for(var _0x485b09=0x0;_0x485b09<Object[_0x2fd8('0x39')](this[_0x2fd8('0x15')])[_0x2fd8('0xa1')];_0x485b09++){var _0x47bec3=Object[_0x2fd8('0x39')](this[_0x2fd8('0x15')])[_0x485b09];var _0x9d35c3=this['agents'][_0x47bec3];if(_0x9d35c3[_0x2fd8('0x43')]===Number(this[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]][_0x2fd8('0x40')])){this[_0x2fd8('0x30')](util[_0x2fd8('0x4a')](_0x2fd8('0x73'),_0x9d35c3[_0x2fd8('0x41')]),_0x2fd8('0xa2'),{'id':_0x9d35c3['id'],'destaccountcode':_0x9d35c3['accountcode'],'transfer':this['channels'][_0x412fdc['uniqueid']]['transferType']});break;}}}}var _0x164d18=this;Promise[_0x2fd8('0xa3')]()[_0x2fd8('0xa4')](function(){var _0x179be4=_0x164d18[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]];if(typeof _0x179be4['transferType']==='undefined'){return;}if(_0x179be4[_0x2fd8('0xa5')]===!![]){return;}if(_['isEmpty'](_0x179be4[_0x2fd8('0x7d')])){return;}return RpcSetting[_0x2fd8('0xa6')]()['then'](function(_0x3ef986){if(!_0x3ef986['stopRecordingOnTransfer'])return;return Promise[_0x2fd8('0xa3')]()[_0x2fd8('0xa4')](function(){return ami[_0x2fd8('0xa7')]({'action':_0x2fd8('0xa8'),'channel':_0x179be4[_0x2fd8('0x3b')]})[_0x2fd8('0xa9')](function(){});})[_0x2fd8('0xa4')](function(){return ami[_0x2fd8('0xa7')]({'action':_0x2fd8('0xa8'),'channel':_0x179be4[_0x2fd8('0x70')]})[_0x2fd8('0xa9')](function(){})['finally'](function(){var _0x174029=_0x164d18[_0x2fd8('0x15')][_0x179be4[_0x2fd8('0x70')][_0x2fd8('0x3c')]('-')[0x0]];if(!_0x174029)return;io[_0x2fd8('0x30')](_0x2fd8('0xaa'),{'agentId':_0x174029['id'],'uniqueid':_0x179be4[_0x2fd8('0x32')]});});});});})['then'](function(){if(_0x412fdc[_0x2fd8('0xab')]==='BlindTransfer'){_0x164d18['blindTransfers'][_0x412fdc['uniqueid']]=_0x412fdc;}else{if(_0x164d18['channels'][_0x412fdc[_0x2fd8('0x32')]]&&_0x164d18[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]]['type']==='outbound'&&_0x164d18[_0x2fd8('0x16')][_0x412fdc['uniqueid']]){_0x164d18[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]]['uniqueid']=[_0x164d18[_0x2fd8('0x14')][_0x412fdc['uniqueid']][_0x2fd8('0x47')],_0x164d18[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]][_0x2fd8('0x47')]=_0x164d18[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]]['uniqueid']][0x0];delete _0x164d18[_0x2fd8('0x16')][_0x412fdc['uniqueid']];}}logger['debug']('[%s][voiceCallReport][hangup]\x20sending\x20hangup\x20event:',_0x412fdc[_0x2fd8('0x32')],util[_0x2fd8('0x2c')](_0x164d18[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]],{'showHidden':![],'depth':null}));ami['emit'](_0x2fd8('0xac'),_0x164d18[_0x2fd8('0x14')][_0x412fdc[_0x2fd8('0x32')]]);delete _0x164d18['channels'][_0x412fdc[_0x2fd8('0x32')]];});}}}catch(_0x708e40){logger[_0x2fd8('0x2a')](_0x2fd8('0xad'),_0x412fdc[_0x2fd8('0x32')],util[_0x2fd8('0x2c')](_0x708e40,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x2fd8('0x2f')][_0x2fd8('0x21')]=function(_0x1759f0){try{if(this['isNotNull'](_0x1759f0)){logger['info']('[%s][voiceCallReport][attendedtransfer]\x20transfercalleridnum:%s\x20transferconnectedlinenum:%s',_0x1759f0['uniqueid'],_0x1759f0['origtransferercalleridnum'],_0x1759f0[_0x2fd8('0xae')]);logger[_0x2fd8('0x35')](_0x2fd8('0xaf'),_0x1759f0[_0x2fd8('0x32')],util[_0x2fd8('0x2c')](_0x1759f0,{'showHidden':![],'depth':null}));var _0x921d08;if(this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb0')]]){this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb0')]][_0x2fd8('0xb1')]=_0x1759f0[_0x2fd8('0xb2')];this[_0x2fd8('0x14')][_0x1759f0['transfereeuniqueid']][_0x2fd8('0xb3')]=_0x1759f0[_0x2fd8('0xae')];if(this['channels'][_0x1759f0[_0x2fd8('0xb4')]]){_0x921d08=this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb4')]];this['channels'][_0x1759f0['secondtransfereruniqueid']]=this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb0')]];this['channels'][_0x1759f0[_0x2fd8('0xb0')]]=_0x921d08;}this['channels'][_0x1759f0[_0x2fd8('0xb4')]][_0x2fd8('0xb5')]=_0x2fd8('0xb6');}else if(this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb7')]]){this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb7')]]['transfercalleridnum']=_0x1759f0['origtransferercalleridnum'];this['channels'][_0x1759f0[_0x2fd8('0xb7')]][_0x2fd8('0xb3')]=_0x1759f0[_0x2fd8('0xae')];if(this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb8')]]){_0x921d08=this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb8')]];this[_0x2fd8('0x14')][_0x1759f0['origtransfereruniqueid']]=this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb7')]];this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb7')]]=_0x921d08;}this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb7')]][_0x2fd8('0xb5')]='ATTENDED';}if((this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb8')]]||this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb9')]])&&this['channels'][_0x1759f0[_0x2fd8('0xb4')]]){var _0x283c19=_[_0x2fd8('0xba')]([this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb8')]],this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb9')]],this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb4')]]],function(_0x3cc10e){return _0x3cc10e&&_0x3cc10e[_0x2fd8('0x62')]===_0x2fd8('0xbb')&&_0x3cc10e['routeid'];});if(_0x283c19){if(this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb8')]])this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb8')]]['transferType']=_0x2fd8('0xb6');if(this['channels'][_0x1759f0[_0x2fd8('0xb9')]])this['channels'][_0x1759f0[_0x2fd8('0xb9')]][_0x2fd8('0xb5')]='ATTENDED';this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb4')]][_0x2fd8('0xb5')]='ATTENDED';}else{if(this['channels'][_0x1759f0[_0x2fd8('0xb0')]]){this[_0x2fd8('0x14')][_0x1759f0['secondtransfereruniqueid']][_0x2fd8('0xa5')]=!![];}if(this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb7')]]){this[_0x2fd8('0x14')][_0x1759f0[_0x2fd8('0xb7')]][_0x2fd8('0xa5')]=!![];}}}}}catch(_0x296d9a){logger['error'](_0x2fd8('0xbc'),_0x1759f0[_0x2fd8('0x32')],util[_0x2fd8('0x2c')](_0x296d9a,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x2fd8('0x2f')][_0x2fd8('0x23')]=function(_0x94f123){try{if(this['isNotNull'](_0x94f123)){logger['info']('[%s][voiceCallReport][blindtransfer]\x20transfercalleridnum:%s\x20transferconnectedlinenum:%s',_0x94f123[_0x2fd8('0x32')],_0x94f123[_0x2fd8('0xbd')],_0x94f123['extension']);logger[_0x2fd8('0x35')](_0x2fd8('0xbe'),_0x94f123[_0x2fd8('0x32')],util[_0x2fd8('0x2c')](_0x94f123,{'showHidden':![],'depth':null}));if(this['channels'][_0x94f123[_0x2fd8('0xb0')]]){this[_0x2fd8('0x14')][_0x94f123[_0x2fd8('0xb0')]][_0x2fd8('0xb1')]=_0x94f123[_0x2fd8('0xbd')];this[_0x2fd8('0x14')][_0x94f123[_0x2fd8('0xb0')]]['transferconnectedlinenum']=_0x94f123[_0x2fd8('0xbf')];this[_0x2fd8('0x14')][_0x94f123[_0x2fd8('0xb0')]][_0x2fd8('0xb5')]=_0x2fd8('0xc0');this['syncHangup']({'event':'BlindTransfer','uniqueid':_0x94f123['transfereeuniqueid'],'linkedid':_0x94f123[_0x2fd8('0xc1')],'context':_0x94f123['context'],'channel':_0x94f123['transfererchannel']});}else{this[_0x2fd8('0x14')][_0x94f123[_0x2fd8('0xc1')]][_0x2fd8('0xb5')]=_0x2fd8('0xc0');this['syncHangup']({'event':'BlindTransfer','uniqueid':_0x94f123[_0x2fd8('0xc1')],'linkedid':_0x94f123[_0x2fd8('0xb0')],'context':_0x94f123[_0x2fd8('0x48')],'channel':_0x94f123[_0x2fd8('0xc2')]});}}}catch(_0x2c1260){logger[_0x2fd8('0x2a')](_0x2fd8('0xc3'),_0x94f123[_0x2fd8('0x32')],util[_0x2fd8('0x2c')](_0x2c1260,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype']['syncMusicOnHoldStart']=function(_0x1a7fdc){try{if(this[_0x2fd8('0x2d')](_0x1a7fdc)){logger[_0x2fd8('0x35')](_0x2fd8('0xc4'),_0x1a7fdc[_0x2fd8('0x32')],util[_0x2fd8('0x2c')](_0x1a7fdc,{'showHidden':![],'depth':null}));if(this[_0x2fd8('0x14')][_0x1a7fdc[_0x2fd8('0x32')]]){if(!_[_0x2fd8('0x63')](this['channels'][_0x1a7fdc[_0x2fd8('0x32')]][_0x2fd8('0x69')])){this['channels'][_0x1a7fdc[_0x2fd8('0x32')]][_0x2fd8('0xc5')]=moment()[_0x2fd8('0x4a')](_0x2fd8('0x4b'));logger[_0x2fd8('0x57')](_0x2fd8('0xc6'),_0x1a7fdc[_0x2fd8('0x32')],this['channels'][_0x1a7fdc[_0x2fd8('0x32')]][_0x2fd8('0xc5')]);}}}}catch(_0x18a3df){logger['error']('[%s][voiceCallReport][musiconholdstart]',_0x1a7fdc['uniqueid'],util[_0x2fd8('0x2c')](_0x18a3df,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x2fd8('0x2f')][_0x2fd8('0x27')]=function(_0x13dc24){try{if(this[_0x2fd8('0x2d')](_0x13dc24)){logger[_0x2fd8('0x35')](_0x2fd8('0xc7'),_0x13dc24['uniqueid'],util[_0x2fd8('0x2c')](_0x13dc24,{'showHidden':![],'depth':null}));if(this[_0x2fd8('0x14')][_0x13dc24[_0x2fd8('0x32')]]){if(!_['isNil'](this[_0x2fd8('0x14')][_0x13dc24[_0x2fd8('0x32')]]['mohstarttime'])){this[_0x2fd8('0x14')][_0x13dc24[_0x2fd8('0x32')]][_0x2fd8('0xc8')]+=moment()[_0x2fd8('0xc9')](0x0)[_0x2fd8('0x6a')](this['channels'][_0x13dc24['uniqueid']]['mohstarttime'],_0x2fd8('0x5b'));logger[_0x2fd8('0x57')]('[%s][voiceCallReport][musiconholdstop]\x20mohtime:%s',_0x13dc24['uniqueid'],this[_0x2fd8('0x14')][_0x13dc24['uniqueid']][_0x2fd8('0xc8')]);delete this[_0x2fd8('0x14')][_0x13dc24[_0x2fd8('0x32')]][_0x2fd8('0xc5')];}}}}catch(_0x382846){logger['error']('[%s][voiceCallReport][musiconholdstop]',_0x13dc24[_0x2fd8('0x32')],util[_0x2fd8('0x2c')](_0x382846,{'showHidden':![],'depth':null}));}};module[_0x2fd8('0xca')]=VoiceCallReport;
\ No newline at end of file
+var _0xa453=['syncNewChannel','syncNewState','varset','syncVarSet','bind','syncHangup','newcallerid','syncNewCallerId','attendedtransfer','syncAttendedTransfer','syncBlindTransfer','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','info','error','[voiceCallReport][coreshowchannels]','prototype','isNotNull','isUndefined','emit','[%s][voiceCallReport][newcallerid]\x20calleridname:%s\x20calleridnum:%s','calleridname','calleridnum','debug','[%s][voiceCallReport][newcallerid]\x20event:','uniqueid','inspect','linkedid','pick','context','from-sip','channel','exten','xcally-motion-preview','destconnectedlinenum','format','user:%s','accountcode','connectedlinenum','[%s][voiceCallReport][newcallerid]','[%s][voiceCallReport][newchannel]\x20event:','OutgoingSpoolFailed','blindTransfers','[%s][voiceCallReport][newchannel]\x20context:%s\x20exten:%s','YYYY-MM-DD\x20HH:mm:ss','toNumber','merge','keys','split','undefined','[%s][voiceCallReport][newchannel]\x20sending\x20user:agentconnect\x20event:','name','user:agentconnect','[%s][voiceCallReport][newchannel]','[%s][voiceCallReport][newexten]\x20event:','application','toLowerCase','applicationdata','appdata','startsWith','[%s][voiceCallReport][newexten]\x20application:%s\x20appdata:%s','starttime','duration','subtract','seconds','disposition','lastapplication','lastdata','cdr(','match','type','isNil','[%s][voiceCallReport][newstate]\x20event:','channelstate','answered','answertime','holdtime','diff','UserId','membername','connectedlinename','destinationchannel','routealias','[%s][voiceCallReport][newstate]\x20sending\x20user:agentconnect\x20event:','syncMixMonitorFilename','[%s][voiceCallReport][mixMonitorFilename]\x20monitorFilename:%s','monitor','replace','.wav49','.WAV','find','monitors','push','[%s][voiceCallReport][mixMonitorFilename]','[%s][voiceCallReport][varset]\x20event:','variable','[%s][voiceCallReport][varset]\x20variable:mixmonitor_filename\x20value:%s','value','xmd-phone','[%s][voiceCallReport][varset]\x20variable:xmd-phone\x20value:%s','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','destination','xmd-callerid-preview','calleridpreview','sipcallid','[%s][voiceCallReport][varset]\x20variable:sipcallid\x20value:%s','mixmonitor_filename','parse','sipcalllinkedid','[%s][voiceCallReport][varset]','[%s][voiceCallReport][hangup]\x20reason:%s','cause-txt','endtime','billableseconds','omit','[%s][voiceCallReport][hangup]\x20sending\x20user:agentcomplete\x20event:','user:agentcomplete','transferType','resolve','then','transferToInternal','isEmpty','stopRecordingOnTransfer','Action','catch','webbar:stopmonitors','event','BlindTransfer','outbound','[%s][voiceCallReport][hangup]\x20sending\x20hangup\x20event:','[%s][voiceCallReport][hangup]','origtransferercalleridnum','transfertargetcalleridnum','[%s][voiceCallReport][attendedtransfer]\x20event:','transfercalleridnum','transfereeuniqueid','secondtransfereruniqueid','ATTENDED','transfertargetuniqueid','origtransfereruniqueid','origtransfererlinkedid','[%s][voiceCallReport][blindtransfer]\x20transfercalleridnum:%s\x20transferconnectedlinenum:%s','transfereecalleridnum','transferconnectedlinenum','BLIND','transfererchannel','[%s][voiceCallReport][blindtransfer]','[%s][voiceCallReport][musiconholdstart]\x20event:','[%s][voiceCallReport][musiconholdstart]\x20mohstarttime:%s','mohstarttime','[%s][voiceCallReport][musiconholdstart]','[%s][voiceCallReport][musiconholdstop]\x20event:','mohtime','[%s][voiceCallReport][musiconholdstop]\x20mohtime:%s','exports','lodash','path','../../../config/environment','ami','../ami','../rpc/setting','set','queue','agi','dial','playback','voicemail','NO\x20ANSWER','FAILED','BUSY','redis','localhost','socket.io-emitter','channels','agents','coreshowchannel','syncNewExten','newchannel'];(function(_0xbc1a61,_0x16530b){var _0x412269=function(_0x39c0b8){while(--_0x39c0b8){_0xbc1a61['push'](_0xbc1a61['shift']());}};_0x412269(++_0x16530b);}(_0xa453,0x165));var _0x3a45=function(_0x5770f8,_0x8f659b){_0x5770f8=_0x5770f8-0x0;var _0x4dd636=_0xa453[_0x5770f8];return _0x4dd636;};'use strict';var _=require(_0x3a45('0x0'));var moment=require('moment');var util=require('util');var path=require(_0x3a45('0x1'));var Redis=require('ioredis');var config=require(_0x3a45('0x2'));var logger=require('../../../config/logger')(_0x3a45('0x3'));var ami=require(_0x3a45('0x4'));var Channel=require('../model/channel');var RpcSetting=require(_0x3a45('0x5'));var applications=[_0x3a45('0x6'),_0x3a45('0x7'),_0x3a45('0x8'),_0x3a45('0x9'),_0x3a45('0xa'),_0x3a45('0xb')];var dispositions=[_0x3a45('0xc'),_0x3a45('0xd'),'FAILED',_0x3a45('0xc'),'NO\x20ANSWER',_0x3a45('0xc'),'ANSWERED',_0x3a45('0xe'),'FAILED',_0x3a45('0xd'),'FAILED'];config[_0x3a45('0xf')]=_['defaults'](config[_0x3a45('0xf')],{'host':_0x3a45('0x10'),'port':0x18eb});var io=require(_0x3a45('0x11'))(new Redis(config[_0x3a45('0xf')]));function VoiceCallReport(_0x522387){this[_0x3a45('0x12')]=_0x522387['channels'];this[_0x3a45('0x13')]=_0x522387['agents'];this['blindTransfers']={};ami['on'](_0x3a45('0x14'),this[_0x3a45('0x15')]['bind'](this));ami['on']('newexten',this[_0x3a45('0x15')]['bind'](this));ami['on'](_0x3a45('0x16'),this[_0x3a45('0x17')]['bind'](this));ami['on']('newstate',this[_0x3a45('0x18')]['bind'](this));ami['on'](_0x3a45('0x19'),this[_0x3a45('0x1a')][_0x3a45('0x1b')](this));ami['on']('hangup',this[_0x3a45('0x1c')]['bind'](this));ami['on'](_0x3a45('0x1d'),this[_0x3a45('0x1e')][_0x3a45('0x1b')](this));ami['on'](_0x3a45('0x1f'),this[_0x3a45('0x20')]['bind'](this));ami['on']('blindtransfer',this[_0x3a45('0x21')][_0x3a45('0x1b')](this));ami['on']('musiconholdstart',this[_0x3a45('0x22')]['bind'](this));ami['on'](_0x3a45('0x23'),this[_0x3a45('0x24')][_0x3a45('0x1b')](this));try{logger[_0x3a45('0x25')]('[voiceCallReport][coreshowchannels]\x20started');ami['actionCoreShowChannels']();}catch(_0x57129c){logger[_0x3a45('0x26')](_0x3a45('0x27'),util['inspect'](_0x57129c,{'showHidden':![],'depth':null}));}}VoiceCallReport[_0x3a45('0x28')][_0x3a45('0x29')]=function(_0x386cfb){return _0x386cfb!==null&&!_[_0x3a45('0x2a')](_0x386cfb);};VoiceCallReport[_0x3a45('0x28')][_0x3a45('0x2b')]=function(_0x1b3020,_0xa51259,_0x5df5d4){io['to'](_0x1b3020)[_0x3a45('0x2b')](_0xa51259,_0x5df5d4);};VoiceCallReport['prototype'][_0x3a45('0x1e')]=function(_0x1c6cfa){try{if(this['isNotNull'](_0x1c6cfa)){logger['info'](_0x3a45('0x2c'),_0x1c6cfa['uniqueid'],_0x1c6cfa[_0x3a45('0x2d')],_0x1c6cfa[_0x3a45('0x2e')]);logger[_0x3a45('0x2f')](_0x3a45('0x30'),_0x1c6cfa[_0x3a45('0x31')],util[_0x3a45('0x32')](_0x1c6cfa,{'showHidden':![],'depth':null}));if(_0x1c6cfa[_0x3a45('0x31')]===_0x1c6cfa[_0x3a45('0x33')]){if(!_[_0x3a45('0x2a')](this[_0x3a45('0x12')][_0x1c6cfa[_0x3a45('0x31')]])){_['merge'](this[_0x3a45('0x12')][_0x1c6cfa[_0x3a45('0x31')]],_[_0x3a45('0x34')](_0x1c6cfa,_['keys'](this[_0x3a45('0x12')][_0x1c6cfa[_0x3a45('0x31')]])));}}if(_0x1c6cfa[_0x3a45('0x35')]===_0x3a45('0x36')){var _0x3e5321=this[_0x3a45('0x13')][_0x1c6cfa[_0x3a45('0x37')]['split']('-')[0x0]];if(_0x3e5321){if(_0x1c6cfa[_0x3a45('0x38')]==_0x3a45('0x39')){_0x3e5321[_0x3a45('0x3a')]=_0x1c6cfa['connectedlinenum'];this[_0x3a45('0x2b')](util[_0x3a45('0x3b')](_0x3a45('0x3c'),_0x3e5321['name']),'user:agentconnect',{'id':_0x3e5321['id'],'destaccountcode':_0x3e5321[_0x3a45('0x3d')],'destconnectedlinenum':_0x1c6cfa[_0x3a45('0x3e')]});}}}}}catch(_0x12ffdf){logger[_0x3a45('0x26')](_0x3a45('0x3f'),_0x1c6cfa[_0x3a45('0x31')],util[_0x3a45('0x32')](_0x12ffdf,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x3a45('0x28')]['syncNewChannel']=function(_0x742994){try{if(this[_0x3a45('0x29')](_0x742994)){logger['debug'](_0x3a45('0x40'),_0x742994[_0x3a45('0x31')],util[_0x3a45('0x32')](_0x742994,{'showHidden':![],'depth':null}));if(this[_0x3a45('0x12')][_0x742994[_0x3a45('0x31')]]){return;}if(_0x742994['channel']===_0x3a45('0x41')){return;}if(_0x742994[_0x3a45('0x31')]!==_0x742994['linkedid']&&!this[_0x3a45('0x42')][_0x742994[_0x3a45('0x33')]]){return;}logger[_0x3a45('0x25')](_0x3a45('0x43'),_0x742994[_0x3a45('0x31')],_0x742994['context'],_0x742994[_0x3a45('0x38')]);this[_0x3a45('0x12')][_0x742994['uniqueid']]=new Channel();this[_0x3a45('0x12')][_0x742994['uniqueid']]['starttime']=moment()['format'](_0x3a45('0x44'));this[_0x3a45('0x12')][_0x742994['uniqueid']]['disposition']=dispositions[_[_0x3a45('0x45')](_0x742994['channelstate'])];_[_0x3a45('0x46')](this[_0x3a45('0x12')][_0x742994['uniqueid']],_[_0x3a45('0x34')](_0x742994,_[_0x3a45('0x47')](this[_0x3a45('0x12')][_0x742994[_0x3a45('0x31')]])));if(_0x742994[_0x3a45('0x35')]===_0x3a45('0x36')){var _0x4c8727=this[_0x3a45('0x13')][_0x742994[_0x3a45('0x37')][_0x3a45('0x48')]('-')[0x0]];if(_0x4c8727&&typeof _0x4c8727[_0x3a45('0x3a')]===_0x3a45('0x49')){_0x4c8727[_0x3a45('0x3a')]=_0x742994['exten'];logger['debug'](_0x3a45('0x4a'),_0x742994['uniqueid'],util['inspect']({'id':_0x4c8727['id'],'destaccountcode':_0x4c8727['accountcode'],'destconnectedlinenum':_0x742994[_0x3a45('0x38')]},{'showHidden':![],'depth':null}));this[_0x3a45('0x2b')](util[_0x3a45('0x3b')](_0x3a45('0x3c'),_0x4c8727[_0x3a45('0x4b')]),_0x3a45('0x4c'),{'id':_0x4c8727['id'],'destaccountcode':_0x4c8727[_0x3a45('0x3d')],'destconnectedlinenum':_0x742994[_0x3a45('0x38')]});}}}}catch(_0x4fe144){logger[_0x3a45('0x26')](_0x3a45('0x4d'),_0x742994['uniqueid'],util[_0x3a45('0x32')](_0x4fe144,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x3a45('0x28')]['syncNewExten']=function(_0x531123){try{if(this[_0x3a45('0x29')](_0x531123)){logger[_0x3a45('0x2f')](_0x3a45('0x4e'),_0x531123[_0x3a45('0x31')],util[_0x3a45('0x32')](_0x531123,{'showHidden':![],'depth':null}));if(_0x531123[_0x3a45('0x37')]===_0x3a45('0x41')||_0x531123[_0x3a45('0x38')]==='h')return;if(_0x531123[_0x3a45('0x31')]===_0x531123[_0x3a45('0x33')]||this['blindTransfers'][_0x531123[_0x3a45('0x33')]]){_0x531123[_0x3a45('0x4f')]=_0x531123[_0x3a45('0x4f')]?_0x531123['application'][_0x3a45('0x50')]():undefined;_0x531123[_0x3a45('0x51')]=_0x531123[_0x3a45('0x52')]||_0x531123[_0x3a45('0x51')];if(_0x531123[_0x3a45('0x52')]&&!_0x531123[_0x3a45('0x52')][_0x3a45('0x53')]('CDR(routeAlias)')&&_0x531123[_0x3a45('0x4f')]!==_0x3a45('0x7')){_0x531123['applicationdata']=_0x531123[_0x3a45('0x51')]['toLowerCase']();}logger[_0x3a45('0x25')](_0x3a45('0x54'),_0x531123[_0x3a45('0x31')],_0x531123[_0x3a45('0x4f')],_0x531123[_0x3a45('0x51')]);if(_[_0x3a45('0x2a')](this['channels'][_0x531123[_0x3a45('0x31')]])){this[_0x3a45('0x12')][_0x531123[_0x3a45('0x31')]]=new Channel();this['channels'][_0x531123[_0x3a45('0x31')]][_0x3a45('0x55')]=_0x531123[_0x3a45('0x56')]?moment()[_0x3a45('0x57')](moment['duration'](_0x531123[_0x3a45('0x56')])[_0x3a45('0x58')](),_0x3a45('0x58'))['format']('YYYY-MM-DD\x20HH:mm:ss'):moment()[_0x3a45('0x3b')]('YYYY-MM-DD\x20HH:mm:ss');this[_0x3a45('0x12')][_0x531123[_0x3a45('0x31')]][_0x3a45('0x59')]=_0x3a45('0xc');}_['merge'](this['channels'][_0x531123[_0x3a45('0x31')]],_[_0x3a45('0x34')](_0x531123,_[_0x3a45('0x47')](this[_0x3a45('0x12')][_0x531123[_0x3a45('0x31')]])));if(_['includes'](applications,_0x531123[_0x3a45('0x4f')])){this[_0x3a45('0x12')][_0x531123[_0x3a45('0x31')]][_0x3a45('0x5a')]=_0x531123[_0x3a45('0x4f')];this['channels'][_0x531123['uniqueid']][_0x3a45('0x5b')]=_0x531123[_0x3a45('0x51')];if(_0x531123[_0x3a45('0x4f')]===_0x3a45('0x6')&&_['startsWith'](_0x531123[_0x3a45('0x51')][_0x3a45('0x50')](),_0x3a45('0x5c'))){var _0x2ebd9c=_0x531123['applicationdata'][_0x3a45('0x48')]('=');var _0x244431=_0x2ebd9c[0x0][_0x3a45('0x50')]()[_0x3a45('0x5d')](/cdr\((.*)\)/);if(_0x244431){if(_0x244431[0x1]===_0x3a45('0x5e')&&!_[_0x3a45('0x5f')](this['channels'][_0x531123['uniqueid']][_0x244431[0x1]]))return;this[_0x3a45('0x12')][_0x531123[_0x3a45('0x31')]][_0x244431[0x1]]=_0x2ebd9c[0x1];}}else if(_0x531123[_0x3a45('0x4f')]==='queue'){this[_0x3a45('0x12')][_0x531123[_0x3a45('0x31')]]['queue']=_0x531123['applicationdata']['split'](',')[0x0];}}}}}catch(_0x5f3991){logger[_0x3a45('0x26')]('[%s][voiceCallReport][newexten]',_0x531123[_0x3a45('0x31')],util[_0x3a45('0x32')](_0x5f3991,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x3a45('0x28')][_0x3a45('0x18')]=function(_0x1d0f12){try{if(this[_0x3a45('0x29')](_0x1d0f12)){logger[_0x3a45('0x25')]('[%s][voiceCallReport][newstate]\x20linkedid:%s\x20calleridname:%s\x20calleridnum:%s',_0x1d0f12[_0x3a45('0x31')],_0x1d0f12[_0x3a45('0x33')],_0x1d0f12[_0x3a45('0x2d')],_0x1d0f12[_0x3a45('0x2e')]);logger[_0x3a45('0x2f')](_0x3a45('0x60'),_0x1d0f12[_0x3a45('0x31')],util[_0x3a45('0x32')](_0x1d0f12,{'showHidden':![],'depth':null}));if(_0x1d0f12[_0x3a45('0x61')]!=='6')return;var _0x21d548=this['agents'][_0x1d0f12['channel']['split']('-')[0x0]];if(_0x1d0f12['uniqueid']!==_0x1d0f12[_0x3a45('0x33')]){var _0x35b7c2=moment();if(this['channels'][_0x1d0f12[_0x3a45('0x33')]]){if(!this['channels'][_0x1d0f12['linkedid']][_0x3a45('0x62')]){this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x33')]][_0x3a45('0x62')]=!![];this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x33')]][_0x3a45('0x63')]=_0x35b7c2['format']('YYYY-MM-DD\x20HH:mm:ss');if(this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x33')]][_0x3a45('0x55')]){this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x33')]][_0x3a45('0x64')]=_0x35b7c2[_0x3a45('0x65')](this['channels'][_0x1d0f12[_0x3a45('0x33')]][_0x3a45('0x55')],_0x3a45('0x58'));}}this[_0x3a45('0x12')][_0x1d0f12['linkedid']][_0x3a45('0x33')]=_0x1d0f12[_0x3a45('0x31')];if(_0x1d0f12[_0x3a45('0x2e')]!==_0x3a45('0x39')){this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x33')]]['connectedlinenum']=_0x1d0f12['calleridnum'];}this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x33')]]['connectedlinename']=_0x1d0f12['calleridname'];this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x33')]]['destinationchannel']=_0x1d0f12[_0x3a45('0x37')];this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x33')]][_0x3a45('0x59')]=dispositions[_['toNumber'](_0x1d0f12[_0x3a45('0x61')])];if(_0x21d548){this['channels'][_0x1d0f12['linkedid']][_0x3a45('0x66')]=_0x21d548['id'];this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x33')]][_0x3a45('0x67')]=_0x21d548[_0x3a45('0x4b')];}}if(this['channels'][_0x1d0f12[_0x3a45('0x31')]]){if(!this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x31')]][_0x3a45('0x62')]){this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x31')]][_0x3a45('0x62')]=!![];this[_0x3a45('0x12')][_0x1d0f12['uniqueid']][_0x3a45('0x63')]=_0x35b7c2[_0x3a45('0x3b')](_0x3a45('0x44'));if(this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x31')]]['starttime']){this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x31')]][_0x3a45('0x64')]=_0x35b7c2['diff'](this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x31')]][_0x3a45('0x55')],_0x3a45('0x58'));}}if(_0x1d0f12[_0x3a45('0x2e')]!==_0x3a45('0x39')){this[_0x3a45('0x12')][_0x1d0f12['uniqueid']]['connectedlinenum']=_0x1d0f12[_0x3a45('0x2e')];}this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x31')]][_0x3a45('0x68')]=_0x1d0f12['calleridname'];this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x31')]][_0x3a45('0x69')]=_0x1d0f12[_0x3a45('0x37')];this[_0x3a45('0x12')][_0x1d0f12['uniqueid']][_0x3a45('0x59')]=dispositions[_[_0x3a45('0x45')](_0x1d0f12[_0x3a45('0x61')])];}}else{if(this[_0x3a45('0x12')][_0x1d0f12['uniqueid']]){if(_0x21d548){this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x31')]][_0x3a45('0x66')]=_0x21d548['id'];this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x31')]]['membername']=_0x21d548[_0x3a45('0x4b')];}}}if(_0x1d0f12['context']===_0x3a45('0x36')){if(_0x21d548){_0x21d548[_0x3a45('0x3a')]=_0x1d0f12[_0x3a45('0x38')];var _0x5de31d,_0x4df63b;if(this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x31')]]){_0x5de31d=this['channels'][_0x1d0f12[_0x3a45('0x31')]][_0x3a45('0x6a')];_0x4df63b=this[_0x3a45('0x12')][_0x1d0f12['uniqueid']]['queue'];}else if(this['channels'][_0x1d0f12['linkedid']]){_0x5de31d=this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x33')]]['routealias'];_0x4df63b=this[_0x3a45('0x12')][_0x1d0f12[_0x3a45('0x33')]][_0x3a45('0x7')];}_0x21d548[_0x3a45('0x7')]=_0x4df63b;_0x21d548[_0x3a45('0x6a')]=_0x5de31d;var _0x2c59ec={'id':_0x21d548['id'],'name':_0x21d548[_0x3a45('0x4b')],'agentconnected':!![],'destaccountcode':_0x21d548['accountcode'],'destconnectedlinenum':_0x1d0f12[_0x3a45('0x38')],'queue':_0x4df63b||undefined,'routealias':_0x5de31d,'uniqueid':_0x1d0f12[_0x3a45('0x33')]};logger[_0x3a45('0x2f')](_0x3a45('0x6b'),_0x1d0f12['uniqueid'],util[_0x3a45('0x32')](_0x2c59ec,{'showHidden':![],'depth':null}));this[_0x3a45('0x2b')](util['format']('user:%s',_0x21d548[_0x3a45('0x4b')]),_0x3a45('0x4c'),_0x2c59ec);}}}}catch(_0x5467b8){logger[_0x3a45('0x26')]('[%s][voiceCallReport][newstate]',_0x1d0f12[_0x3a45('0x31')],util[_0x3a45('0x32')](_0x5467b8,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype'][_0x3a45('0x6c')]=function(_0x1d803f,_0x5b6bf6){try{if(this[_0x3a45('0x12')][_0x1d803f]){logger['info'](_0x3a45('0x6d'),_0x1d803f,_0x5b6bf6);this['channels'][_0x1d803f][_0x3a45('0x6e')]=!![];if(_['endsWith'](_0x5b6bf6,'.wav49')){_0x5b6bf6=_0x5b6bf6[_0x3a45('0x6f')](_0x3a45('0x70'),_0x3a45('0x71'));}this[_0x3a45('0x12')][_0x1d803f]['monitorFilename']=_0x5b6bf6;var _0x519bcf=_[_0x3a45('0x72')](this[_0x3a45('0x12')][_0x1d803f][_0x3a45('0x73')],{'filename':_0x5b6bf6});if(_[_0x3a45('0x5f')](_0x519bcf)){this[_0x3a45('0x12')][_0x1d803f]['monitors'][_0x3a45('0x74')]({'filename':_0x5b6bf6,'createdAt':moment()['format'](_0x3a45('0x44')),'mixmonitorid':'','status':'rec'});}}}catch(_0x918f8f){logger[_0x3a45('0x26')](_0x3a45('0x75'),_0x1d803f,util['inspect'](_0x918f8f,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype']['syncVarSet']=function(_0x2e9b4a){try{if(this['isNotNull'](_0x2e9b4a)){logger[_0x3a45('0x2f')](_0x3a45('0x76'),_0x2e9b4a[_0x3a45('0x31')],util[_0x3a45('0x32')](_0x2e9b4a,{'showHidden':![],'depth':null}));if(this[_0x3a45('0x12')][_0x2e9b4a[_0x3a45('0x31')]]&&_0x2e9b4a[_0x3a45('0x37')]!=_0x3a45('0x41')){if(this[_0x3a45('0x29')](_0x2e9b4a[_0x3a45('0x77')])){if(this[_0x3a45('0x29')](_0x2e9b4a[_0x3a45('0x77')]['mixmonitor_filename'])){logger[_0x3a45('0x25')](_0x3a45('0x78'),_0x2e9b4a['uniqueid'],_0x2e9b4a[_0x3a45('0x79')]);this[_0x3a45('0x6c')](_0x2e9b4a[_0x3a45('0x31')],_0x2e9b4a['value']);}else if(this[_0x3a45('0x29')](_0x2e9b4a[_0x3a45('0x77')][_0x3a45('0x7a')])){logger[_0x3a45('0x25')](_0x3a45('0x7b'),_0x2e9b4a[_0x3a45('0x31')],_0x2e9b4a[_0x3a45('0x79')]);this[_0x3a45('0x12')][_0x2e9b4a['uniqueid']][_0x3a45('0x2e')]=_0x2e9b4a[_0x3a45('0x79')];}else if(this[_0x3a45('0x29')](_0x2e9b4a[_0x3a45('0x77')][_0x3a45('0x7c')])){logger[_0x3a45('0x25')](_0x3a45('0x7d'),_0x2e9b4a[_0x3a45('0x31')],_0x2e9b4a[_0x3a45('0x79')]);this[_0x3a45('0x12')][_0x2e9b4a[_0x3a45('0x31')]][_0x3a45('0x7e')]=_0x2e9b4a['value'];}else if(this[_0x3a45('0x29')](_0x2e9b4a['variable'][_0x3a45('0x7f')])){logger[_0x3a45('0x25')](_0x3a45('0x80'),_0x2e9b4a['uniqueid'],_0x2e9b4a[_0x3a45('0x79')]);this[_0x3a45('0x12')][_0x2e9b4a[_0x3a45('0x31')]]['type']=_0x2e9b4a[_0x3a45('0x79')];}else if(this['isNotNull'](_0x2e9b4a[_0x3a45('0x77')][_0x3a45('0x81')])){logger[_0x3a45('0x25')](_0x3a45('0x82'),_0x2e9b4a[_0x3a45('0x31')],_0x2e9b4a['value'][_0x3a45('0x48')](',')[0x0]);this[_0x3a45('0x12')][_0x2e9b4a['uniqueid']][_0x3a45('0x7')]=_0x2e9b4a['value']['split'](',')[0x0];}else if(this[_0x3a45('0x29')](_0x2e9b4a['variable'][_0x3a45('0x83')])){logger[_0x3a45('0x25')](_0x3a45('0x84'),_0x2e9b4a[_0x3a45('0x31')],_0x2e9b4a[_0x3a45('0x79')]);this[_0x3a45('0x12')][_0x2e9b4a[_0x3a45('0x31')]][_0x3a45('0x85')]=_0x2e9b4a['value'];}else if(this[_0x3a45('0x29')](_0x2e9b4a[_0x3a45('0x77')][_0x3a45('0x86')])){logger[_0x3a45('0x25')](_0x3a45('0x87'),_0x2e9b4a[_0x3a45('0x31')],_0x2e9b4a[_0x3a45('0x79')]);this[_0x3a45('0x12')][_0x2e9b4a['uniqueid']][_0x3a45('0x88')]=_0x2e9b4a[_0x3a45('0x79')];}else if(this[_0x3a45('0x29')](_0x2e9b4a[_0x3a45('0x77')][_0x3a45('0x89')])){logger[_0x3a45('0x25')]('[%s][voiceCallReport][varset]\x20variable:xmd-callerid-preview\x20value:%s',_0x2e9b4a['uniqueid'],_0x2e9b4a[_0x3a45('0x79')]);this[_0x3a45('0x12')][_0x2e9b4a['uniqueid']][_0x3a45('0x8a')]=_0x2e9b4a[_0x3a45('0x79')];}else if(this[_0x3a45('0x29')](_0x2e9b4a[_0x3a45('0x77')]['xmcs-queue'])){logger[_0x3a45('0x25')]('[%s][voiceCallReport][varset]\x20variable:xmcs-queue\x20value:%s',_0x2e9b4a['uniqueid'],_0x2e9b4a[_0x3a45('0x79')]);this[_0x3a45('0x12')][_0x2e9b4a['uniqueid']][_0x3a45('0x7')]=_0x2e9b4a[_0x3a45('0x79')];}else if(this[_0x3a45('0x29')](_0x2e9b4a[_0x3a45('0x77')][_0x3a45('0x8b')])){logger['info'](_0x3a45('0x8c'),_0x2e9b4a[_0x3a45('0x31')],_0x2e9b4a[_0x3a45('0x79')]);this[_0x3a45('0x12')][_0x2e9b4a[_0x3a45('0x31')]]['sipcalluniqueid']=_0x2e9b4a[_0x3a45('0x79')];}}}else if(this[_0x3a45('0x29')](_0x2e9b4a['variable'][_0x3a45('0x8d')])){if(_0x2e9b4a['value']){var _0x147f3f=path[_0x3a45('0x8e')](_0x2e9b4a[_0x3a45('0x79')])[_0x3a45('0x4b')];logger['info'](_0x3a45('0x78'),_0x147f3f,_0x2e9b4a['value']);this[_0x3a45('0x6c')](_0x147f3f,_0x2e9b4a[_0x3a45('0x79')]);}}else if(this[_0x3a45('0x12')][_0x2e9b4a[_0x3a45('0x33')]]){if(this[_0x3a45('0x29')](_0x2e9b4a[_0x3a45('0x77')])){if(this[_0x3a45('0x29')](_0x2e9b4a['variable'][_0x3a45('0x8b')])){logger[_0x3a45('0x25')]('[%s][voiceCallReport][varset]\x20variable:sipcallid\x20value:%s',_0x2e9b4a[_0x3a45('0x33')],_0x2e9b4a[_0x3a45('0x79')]);this[_0x3a45('0x12')][_0x2e9b4a['linkedid']][_0x3a45('0x8f')]=_0x2e9b4a[_0x3a45('0x79')];}}}}}catch(_0x1e8474){logger[_0x3a45('0x26')](_0x3a45('0x90'),_0x2e9b4a[_0x3a45('0x31')],util[_0x3a45('0x32')](_0x1e8474,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x3a45('0x28')][_0x3a45('0x1c')]=function(_0x817e8b){try{if(this['isNotNull'](_0x817e8b)){logger[_0x3a45('0x2f')]('[%s][voiceCallReport][hangup]\x20event:',_0x817e8b[_0x3a45('0x31')],util[_0x3a45('0x32')](_0x817e8b,{'showHidden':![],'depth':null}));if(this[_0x3a45('0x42')][_0x817e8b[_0x3a45('0x33')]]){if(this[_0x3a45('0x12')][this[_0x3a45('0x42')][_0x817e8b[_0x3a45('0x33')]]['linkedid']]){this['channels'][this[_0x3a45('0x42')][_0x817e8b[_0x3a45('0x33')]]['linkedid']][_0x3a45('0x31')]=_0x817e8b[_0x3a45('0x31')];this[_0x3a45('0x12')][this[_0x3a45('0x42')][_0x817e8b[_0x3a45('0x33')]]['linkedid']]['answered']=this[_0x3a45('0x12')][_0x817e8b[_0x3a45('0x31')]]['answered'];this[_0x3a45('0x12')][this[_0x3a45('0x42')][_0x817e8b[_0x3a45('0x33')]]['linkedid']][_0x3a45('0x63')]=this[_0x3a45('0x12')][_0x817e8b[_0x3a45('0x31')]][_0x3a45('0x63')];this[_0x3a45('0x12')][this['blindTransfers'][_0x817e8b[_0x3a45('0x33')]]['linkedid']]['destinationchannel']=this[_0x3a45('0x12')][this[_0x3a45('0x42')][_0x817e8b[_0x3a45('0x33')]]['linkedid']][_0x3a45('0x37')];this[_0x3a45('0x12')][this[_0x3a45('0x42')][_0x817e8b[_0x3a45('0x33')]]['linkedid']][_0x3a45('0x59')]=this[_0x3a45('0x12')][_0x817e8b['uniqueid']][_0x3a45('0x59')];this[_0x3a45('0x12')][_0x817e8b[_0x3a45('0x31')]]=this[_0x3a45('0x12')][this['blindTransfers'][_0x817e8b['linkedid']][_0x3a45('0x33')]];delete this[_0x3a45('0x12')][this[_0x3a45('0x42')][_0x817e8b[_0x3a45('0x33')]][_0x3a45('0x33')]];}else if(this[_0x3a45('0x12')][this[_0x3a45('0x42')][_0x817e8b['linkedid']][_0x3a45('0x31')]]){this['channels'][this[_0x3a45('0x42')][_0x817e8b['linkedid']][_0x3a45('0x31')]][_0x3a45('0x31')]=[this['channels'][this['blindTransfers'][_0x817e8b['linkedid']][_0x3a45('0x31')]][_0x3a45('0x33')],this[_0x3a45('0x12')][this[_0x3a45('0x42')][_0x817e8b['linkedid']][_0x3a45('0x31')]][_0x3a45('0x33')]=this['channels'][this['blindTransfers'][_0x817e8b[_0x3a45('0x33')]]['uniqueid']][_0x3a45('0x31')]][0x0];this[_0x3a45('0x12')][this['blindTransfers'][_0x817e8b[_0x3a45('0x33')]][_0x3a45('0x31')]][_0x3a45('0x62')]=this[_0x3a45('0x12')][_0x817e8b[_0x3a45('0x31')]][_0x3a45('0x62')];this[_0x3a45('0x12')][this[_0x3a45('0x42')][_0x817e8b[_0x3a45('0x33')]][_0x3a45('0x31')]]['answertime']=this[_0x3a45('0x12')][_0x817e8b[_0x3a45('0x31')]][_0x3a45('0x63')];this[_0x3a45('0x12')][this[_0x3a45('0x42')][_0x817e8b[_0x3a45('0x33')]][_0x3a45('0x31')]][_0x3a45('0x69')]=this[_0x3a45('0x12')][this[_0x3a45('0x42')][_0x817e8b[_0x3a45('0x33')]][_0x3a45('0x31')]][_0x3a45('0x37')];this[_0x3a45('0x12')][this[_0x3a45('0x42')][_0x817e8b[_0x3a45('0x33')]]['uniqueid']][_0x3a45('0x59')]=this[_0x3a45('0x12')][_0x817e8b[_0x3a45('0x31')]]['disposition'];this[_0x3a45('0x12')][_0x817e8b[_0x3a45('0x31')]]=this['channels'][this[_0x3a45('0x42')][_0x817e8b[_0x3a45('0x33')]]['uniqueid']];delete this[_0x3a45('0x12')][this[_0x3a45('0x42')][_0x817e8b['linkedid']]['uniqueid']];}}if(this[_0x3a45('0x12')][_0x817e8b[_0x3a45('0x31')]]){logger[_0x3a45('0x25')](_0x3a45('0x91'),_0x817e8b[_0x3a45('0x31')],_0x817e8b[_0x3a45('0x92')]);var _0x258d1d=moment();this[_0x3a45('0x12')][_0x817e8b['uniqueid']][_0x3a45('0x93')]=_0x258d1d[_0x3a45('0x3b')](_0x3a45('0x44'));this[_0x3a45('0x12')][_0x817e8b[_0x3a45('0x31')]]['duration']=_0x258d1d[_0x3a45('0x65')](this[_0x3a45('0x12')][_0x817e8b[_0x3a45('0x31')]]['starttime'],_0x3a45('0x58'));if(this[_0x3a45('0x12')][_0x817e8b['uniqueid']][_0x3a45('0x62')]){this[_0x3a45('0x12')][_0x817e8b['uniqueid']][_0x3a45('0x94')]=_0x258d1d['diff'](this[_0x3a45('0x12')][_0x817e8b[_0x3a45('0x31')]]['answertime'],_0x3a45('0x58'));this[_0x3a45('0x12')][_0x817e8b[_0x3a45('0x31')]]['holdtime']=this[_0x3a45('0x12')][_0x817e8b['uniqueid']]['duration']-this[_0x3a45('0x12')][_0x817e8b[_0x3a45('0x31')]]['billableseconds'];}if(_0x817e8b['context']===_0x3a45('0x36')){if(this[_0x3a45('0x13')][_0x817e8b[_0x3a45('0x37')]['split']('-')[0x0]]){this[_0x3a45('0x13')][_0x817e8b[_0x3a45('0x37')][_0x3a45('0x48')]('-')[0x0]]=_[_0x3a45('0x95')](this[_0x3a45('0x13')][_0x817e8b['channel'][_0x3a45('0x48')]('-')[0x0]],[_0x3a45('0x3a')]);logger[_0x3a45('0x2f')](_0x3a45('0x96'),_0x817e8b[_0x3a45('0x31')],util['inspect']({'id':this[_0x3a45('0x13')][_0x817e8b['channel'][_0x3a45('0x48')]('-')[0x0]]['id'],'destaccountcode':this[_0x3a45('0x13')][_0x817e8b['channel'][_0x3a45('0x48')]('-')[0x0]][_0x3a45('0x3d')]},{'showHidden':![],'depth':null}));this[_0x3a45('0x2b')](util[_0x3a45('0x3b')](_0x3a45('0x3c'),this[_0x3a45('0x13')][_0x817e8b[_0x3a45('0x37')][_0x3a45('0x48')]('-')[0x0]][_0x3a45('0x4b')]),'user:agentcomplete',{'id':this['agents'][_0x817e8b['channel'][_0x3a45('0x48')]('-')[0x0]]['id'],'destaccountcode':this[_0x3a45('0x13')][_0x817e8b[_0x3a45('0x37')][_0x3a45('0x48')]('-')[0x0]][_0x3a45('0x3d')]});for(var _0x48c93b=0x0;_0x48c93b<Object[_0x3a45('0x47')](this[_0x3a45('0x13')])['length'];_0x48c93b++){var _0x490b45=Object[_0x3a45('0x47')](this[_0x3a45('0x13')])[_0x48c93b];var _0x58a67e=this[_0x3a45('0x13')][_0x490b45];if(_0x58a67e[_0x3a45('0x3d')]===Number(this[_0x3a45('0x12')][_0x817e8b['uniqueid']][_0x3a45('0x3e')])){this[_0x3a45('0x2b')](util[_0x3a45('0x3b')](_0x3a45('0x3c'),_0x58a67e['name']),_0x3a45('0x97'),{'id':_0x58a67e['id'],'destaccountcode':_0x58a67e[_0x3a45('0x3d')],'transfer':this[_0x3a45('0x12')][_0x817e8b[_0x3a45('0x31')]][_0x3a45('0x98')]});break;}}}}var _0x166ae9=this;Promise[_0x3a45('0x99')]()[_0x3a45('0x9a')](function(){var _0x51c238=_0x166ae9['channels'][_0x817e8b[_0x3a45('0x31')]];if(typeof _0x51c238['transferType']===_0x3a45('0x49')){return;}if(_0x51c238[_0x3a45('0x9b')]===!![]){return;}if(_[_0x3a45('0x9c')](_0x51c238['monitors'])){return;}return RpcSetting['getSettings']()['then'](function(_0x3331b0){if(!_0x3331b0[_0x3a45('0x9d')])return;return Promise[_0x3a45('0x99')]()[_0x3a45('0x9a')](function(){return ami[_0x3a45('0x9e')]({'action':'StopMixMonitor','channel':_0x51c238[_0x3a45('0x37')]})[_0x3a45('0x9f')](function(){});})['then'](function(){return ami[_0x3a45('0x9e')]({'action':'StopMixMonitor','channel':_0x51c238[_0x3a45('0x69')]})['catch'](function(){})['finally'](function(){var _0x5a8f07=_0x166ae9[_0x3a45('0x13')][_0x51c238[_0x3a45('0x69')][_0x3a45('0x48')]('-')[0x0]];if(!_0x5a8f07)return;io[_0x3a45('0x2b')](_0x3a45('0xa0'),{'agentId':_0x5a8f07['id'],'uniqueid':_0x51c238['uniqueid']});});});});})[_0x3a45('0x9a')](function(){if(_0x817e8b[_0x3a45('0xa1')]===_0x3a45('0xa2')){_0x166ae9[_0x3a45('0x42')][_0x817e8b[_0x3a45('0x31')]]=_0x817e8b;}else{if(_0x166ae9[_0x3a45('0x12')][_0x817e8b['uniqueid']]&&_0x166ae9[_0x3a45('0x12')][_0x817e8b['uniqueid']][_0x3a45('0x5e')]===_0x3a45('0xa3')&&_0x166ae9[_0x3a45('0x42')][_0x817e8b['uniqueid']]){_0x166ae9[_0x3a45('0x12')][_0x817e8b[_0x3a45('0x31')]][_0x3a45('0x31')]=[_0x166ae9['channels'][_0x817e8b[_0x3a45('0x31')]][_0x3a45('0x33')],_0x166ae9[_0x3a45('0x12')][_0x817e8b[_0x3a45('0x31')]][_0x3a45('0x33')]=_0x166ae9[_0x3a45('0x12')][_0x817e8b[_0x3a45('0x31')]][_0x3a45('0x31')]][0x0];delete _0x166ae9[_0x3a45('0x42')][_0x817e8b[_0x3a45('0x31')]];}}logger['debug'](_0x3a45('0xa4'),_0x817e8b['uniqueid'],util[_0x3a45('0x32')](_0x166ae9['channels'][_0x817e8b[_0x3a45('0x31')]],{'showHidden':![],'depth':null}));ami['emit']('custom:voiceCallReport',_0x166ae9[_0x3a45('0x12')][_0x817e8b[_0x3a45('0x31')]]);delete _0x166ae9[_0x3a45('0x12')][_0x817e8b[_0x3a45('0x31')]];});}}}catch(_0x5d0fae){logger[_0x3a45('0x26')](_0x3a45('0xa5'),_0x817e8b['uniqueid'],util[_0x3a45('0x32')](_0x5d0fae,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x3a45('0x28')]['syncAttendedTransfer']=function(_0x207361){try{if(this[_0x3a45('0x29')](_0x207361)){logger['info']('[%s][voiceCallReport][attendedtransfer]\x20transfercalleridnum:%s\x20transferconnectedlinenum:%s',_0x207361[_0x3a45('0x31')],_0x207361[_0x3a45('0xa6')],_0x207361[_0x3a45('0xa7')]);logger[_0x3a45('0x2f')](_0x3a45('0xa8'),_0x207361['uniqueid'],util[_0x3a45('0x32')](_0x207361,{'showHidden':![],'depth':null}));var _0x18d7c6;if(this[_0x3a45('0x12')][_0x207361['transfereeuniqueid']]){this['channels'][_0x207361['transfereeuniqueid']][_0x3a45('0xa9')]=_0x207361['origtransferercalleridnum'];this[_0x3a45('0x12')][_0x207361[_0x3a45('0xaa')]]['transferconnectedlinenum']=_0x207361[_0x3a45('0xa7')];if(this['channels'][_0x207361[_0x3a45('0xab')]]){_0x18d7c6=this[_0x3a45('0x12')][_0x207361[_0x3a45('0xab')]];this[_0x3a45('0x12')][_0x207361[_0x3a45('0xab')]]=this[_0x3a45('0x12')][_0x207361[_0x3a45('0xaa')]];this[_0x3a45('0x12')][_0x207361['transfereeuniqueid']]=_0x18d7c6;}this['channels'][_0x207361[_0x3a45('0xab')]]['transferType']=_0x3a45('0xac');}else if(this[_0x3a45('0x12')][_0x207361['transfertargetuniqueid']]){this['channels'][_0x207361[_0x3a45('0xad')]]['transfercalleridnum']=_0x207361['origtransferercalleridnum'];this['channels'][_0x207361[_0x3a45('0xad')]]['transferconnectedlinenum']=_0x207361[_0x3a45('0xa7')];if(this['channels'][_0x207361[_0x3a45('0xae')]]){_0x18d7c6=this[_0x3a45('0x12')][_0x207361[_0x3a45('0xae')]];this[_0x3a45('0x12')][_0x207361['origtransfereruniqueid']]=this[_0x3a45('0x12')][_0x207361[_0x3a45('0xad')]];this['channels'][_0x207361[_0x3a45('0xad')]]=_0x18d7c6;}this[_0x3a45('0x12')][_0x207361[_0x3a45('0xad')]]['transferType']='ATTENDED';}if((this[_0x3a45('0x12')][_0x207361[_0x3a45('0xae')]]||this[_0x3a45('0x12')][_0x207361[_0x3a45('0xaf')]])&&this[_0x3a45('0x12')][_0x207361['secondtransfereruniqueid']]){var _0x2b17b2=_['some']([this[_0x3a45('0x12')][_0x207361[_0x3a45('0xae')]],this[_0x3a45('0x12')][_0x207361[_0x3a45('0xaf')]],this[_0x3a45('0x12')][_0x207361[_0x3a45('0xab')]]],function(_0x5073b8){return _0x5073b8&&_0x5073b8[_0x3a45('0x5e')]===_0x3a45('0xa3')&&_0x5073b8['routeid'];});if(_0x2b17b2){if(this['channels'][_0x207361[_0x3a45('0xae')]])this[_0x3a45('0x12')][_0x207361[_0x3a45('0xae')]][_0x3a45('0x98')]=_0x3a45('0xac');if(this[_0x3a45('0x12')][_0x207361[_0x3a45('0xaf')]])this[_0x3a45('0x12')][_0x207361[_0x3a45('0xaf')]][_0x3a45('0x98')]=_0x3a45('0xac');this[_0x3a45('0x12')][_0x207361[_0x3a45('0xab')]][_0x3a45('0x98')]=_0x3a45('0xac');}else{if(this[_0x3a45('0x12')][_0x207361[_0x3a45('0xaa')]]){this[_0x3a45('0x12')][_0x207361['secondtransfereruniqueid']][_0x3a45('0x9b')]=!![];}if(this[_0x3a45('0x12')][_0x207361[_0x3a45('0xad')]]){this[_0x3a45('0x12')][_0x207361[_0x3a45('0xad')]]['transferToInternal']=!![];}}}}}catch(_0x3c5caf){logger[_0x3a45('0x26')]('[%s][voiceCallReport][attendedtransfer]',_0x207361[_0x3a45('0x31')],util['inspect'](_0x3c5caf,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype'][_0x3a45('0x21')]=function(_0x4e142c){try{if(this[_0x3a45('0x29')](_0x4e142c)){logger[_0x3a45('0x25')](_0x3a45('0xb0'),_0x4e142c[_0x3a45('0x31')],_0x4e142c[_0x3a45('0xb1')],_0x4e142c['extension']);logger['debug']('[%s][voiceCallReport][blindtransfer]\x20event:',_0x4e142c[_0x3a45('0x31')],util[_0x3a45('0x32')](_0x4e142c,{'showHidden':![],'depth':null}));if(this[_0x3a45('0x12')][_0x4e142c[_0x3a45('0xaa')]]){this['channels'][_0x4e142c[_0x3a45('0xaa')]][_0x3a45('0xa9')]=_0x4e142c['transfereecalleridnum'];this[_0x3a45('0x12')][_0x4e142c[_0x3a45('0xaa')]][_0x3a45('0xb2')]=_0x4e142c['extension'];this[_0x3a45('0x12')][_0x4e142c[_0x3a45('0xaa')]][_0x3a45('0x98')]=_0x3a45('0xb3');this['syncHangup']({'event':'BlindTransfer','uniqueid':_0x4e142c['transfereeuniqueid'],'linkedid':_0x4e142c['transfereruniqueid'],'context':_0x4e142c[_0x3a45('0x35')],'channel':_0x4e142c[_0x3a45('0xb4')]});}else{this[_0x3a45('0x12')][_0x4e142c['transfereruniqueid']]['transferType']=_0x3a45('0xb3');this[_0x3a45('0x1c')]({'event':_0x3a45('0xa2'),'uniqueid':_0x4e142c['transfereruniqueid'],'linkedid':_0x4e142c[_0x3a45('0xaa')],'context':_0x4e142c[_0x3a45('0x35')],'channel':_0x4e142c[_0x3a45('0xb4')]});}}}catch(_0x108083){logger[_0x3a45('0x26')](_0x3a45('0xb5'),_0x4e142c['uniqueid'],util['inspect'](_0x108083,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x3a45('0x28')]['syncMusicOnHoldStart']=function(_0x1e8800){try{if(this[_0x3a45('0x29')](_0x1e8800)){logger[_0x3a45('0x2f')](_0x3a45('0xb6'),_0x1e8800[_0x3a45('0x31')],util[_0x3a45('0x32')](_0x1e8800,{'showHidden':![],'depth':null}));if(this[_0x3a45('0x12')][_0x1e8800[_0x3a45('0x31')]]){if(!_['isNil'](this[_0x3a45('0x12')][_0x1e8800[_0x3a45('0x31')]][_0x3a45('0x63')])){this['channels'][_0x1e8800[_0x3a45('0x31')]]['mohstarttime']=moment()['format'](_0x3a45('0x44'));logger[_0x3a45('0x25')](_0x3a45('0xb7'),_0x1e8800['uniqueid'],this[_0x3a45('0x12')][_0x1e8800[_0x3a45('0x31')]][_0x3a45('0xb8')]);}}}}catch(_0x9936f9){logger[_0x3a45('0x26')](_0x3a45('0xb9'),_0x1e8800[_0x3a45('0x31')],util[_0x3a45('0x32')](_0x9936f9,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype'][_0x3a45('0x24')]=function(_0x14e39d){try{if(this['isNotNull'](_0x14e39d)){logger[_0x3a45('0x2f')](_0x3a45('0xba'),_0x14e39d[_0x3a45('0x31')],util[_0x3a45('0x32')](_0x14e39d,{'showHidden':![],'depth':null}));if(this[_0x3a45('0x12')][_0x14e39d[_0x3a45('0x31')]]){if(!_[_0x3a45('0x5f')](this[_0x3a45('0x12')][_0x14e39d[_0x3a45('0x31')]][_0x3a45('0xb8')])){this['channels'][_0x14e39d[_0x3a45('0x31')]][_0x3a45('0xbb')]+=moment()['milliseconds'](0x0)[_0x3a45('0x65')](this[_0x3a45('0x12')][_0x14e39d[_0x3a45('0x31')]][_0x3a45('0xb8')],_0x3a45('0x58'));logger[_0x3a45('0x25')](_0x3a45('0xbc'),_0x14e39d[_0x3a45('0x31')],this[_0x3a45('0x12')][_0x14e39d[_0x3a45('0x31')]][_0x3a45('0xbb')]);delete this[_0x3a45('0x12')][_0x14e39d[_0x3a45('0x31')]]['mohstarttime'];}}}}catch(_0x1e64f5){logger['error']('[%s][voiceCallReport][musiconholdstop]',_0x14e39d['uniqueid'],util[_0x3a45('0x32')](_0x1e64f5,{'showHidden':![],'depth':null}));}};module[_0x3a45('0xbd')]=VoiceCallReport;
\ No newline at end of file
index fc6af47..8af3691 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7da7=['sipcallid','sipuri','bridgepeer','bridgepvtcallid','membercalls','memberdynamic','memberlastcall','memberpenalty','memberrealtime','isNil','includes','[%s][voiceDialReport][hangup]\x20event:','[%s][voiceDialReport][hangup]\x20reason:%s\x20lasteevent:complete','cause-txt','duration','endtime','diff','starttime','seconds','complete','total','answertime','answered','billableseconds','sumHoldTime','sumBillable','sumDuration','[%s][voiceDialReport][hangup]\x20sending\x20voice_outbound:save\x20event:','[DEBUG]\x20Emit\x20voice_outbound_channel:remove\x20event','stringify','[%s][voiceDialReport][hangup]\x20sending\x20voice_outbound_channel:remove\x20event:','linkedid','[%s][voiceDialReport][hangup]','syncNewExten','[%s][voiceDialReport][newexten]\x20event:','application','toLowerCase','set','applicationdata','appdata','startsWith','split','match','[%s][voiceDialReport][newexten]','exports','lodash','moment','util','../../../config/logger','ami','redis','defaults','localhost','socket.io-emitter','outboundChannels','outbound','applications','variables','syncDialBegin','bind','dialend','varset','syncVarSet','syncHangup','prototype','isUndefined','emit','isNotNull','debug','[%s][voiceDialReport][dialbegin]\x20event:','uniqueid','channels','format','YYYY-MM-DD\x20HH:mm:ss','called','channel','substring','lastIndexOf','omit','info','membername','interface','inspect','merge','voice:outbound','voice_outbound_channel:save','error','[%s][voiceDialReport][dialbegin]','syncDialEnd','[%s][voiceDialReport][dialend]\x20event:','dialstatus','ANSWER','connectedlinenum','lastevent','connect','[%s][voiceDialReport][dialend]\x20sending\x20dialconnect\x20event:','[%s][voiceDialReport][dialend]\x20sending\x20voice_outbound_channel:save\x20event:','[%s][voiceDialReport][dialend]','[%s][voiceDialReport][varset]\x20event:','addVariable','variable','outboundrouteid','value','[%s][voiceDialReport][varset]\x20outboundrouteid:%s\x20variable:%s\x20value:%s','keys','[%s][voiceDialReport][varset]\x20sending\x20voice_outbound_channel:save\x20event:','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x7da7,0x10d));var _0x77da=function(_0x24f31b,_0x44b8f3){_0x24f31b=_0x24f31b-0x0;var _0x488401=_0x7da7[_0x24f31b];return _0x488401;};'use strict';var _=require(_0x77da('0x0'));var moment=require(_0x77da('0x1'));var util=require(_0x77da('0x2'));var Redis=require('ioredis');var config=require('../../../config/environment');var logger=require(_0x77da('0x3'))(_0x77da('0x4'));var ami=require('../ami');config[_0x77da('0x5')]=_[_0x77da('0x6')](config['redis'],{'host':_0x77da('0x7'),'port':0x18eb});var io=require(_0x77da('0x8'))(new Redis(config['redis']));function VoiceDialReport(_0x30afe0){this['channels']=_0x30afe0[_0x77da('0x9')];this[_0x77da('0xa')]=_0x30afe0[_0x77da('0xa')];this[_0x77da('0xb')]={};this[_0x77da('0xc')]={};ami['on']('dialbegin',this[_0x77da('0xd')][_0x77da('0xe')](this));ami['on'](_0x77da('0xf'),this['syncDialEnd'][_0x77da('0xe')](this));ami['on'](_0x77da('0x10'),this[_0x77da('0x11')][_0x77da('0xe')](this));ami['on']('hangup',this[_0x77da('0x12')][_0x77da('0xe')](this));}VoiceDialReport[_0x77da('0x13')]['isNotNull']=function(_0x4a7748){return _0x4a7748!==null&&!_[_0x77da('0x14')](_0x4a7748);};VoiceDialReport[_0x77da('0x13')]['emit']=function(_0x3b0ff2,_0x369df0,_0x355719){io['to'](_0x3b0ff2)[_0x77da('0x15')](_0x369df0,_0x355719);};VoiceDialReport['prototype'][_0x77da('0xd')]=function(_0x4e130c){try{if(this[_0x77da('0x16')](_0x4e130c)){logger[_0x77da('0x17')](_0x77da('0x18'),_0x4e130c[_0x77da('0x19')],util['inspect'](_0x4e130c,{'showHidden':![],'depth':null}));if(this['channels'][_0x4e130c['uniqueid']]){_['merge'](this[_0x77da('0x1a')][_0x4e130c[_0x77da('0x19')]],{'starttime':moment()[_0x77da('0x1b')](_0x77da('0x1c')),'lastevent':_0x77da('0x1d'),'interface':_0x4e130c[_0x77da('0x1e')][_0x77da('0x1f')](0x0,_0x4e130c[_0x77da('0x1e')]['lastIndexOf']('-')),'membername':_0x4e130c['channel'][_0x77da('0x1f')](_0x4e130c[_0x77da('0x1e')]['lastIndexOf']('/')+0x1,_0x4e130c[_0x77da('0x1e')][_0x77da('0x20')]('-'))},_[_0x77da('0x21')](_0x4e130c,['event','privilege']));logger[_0x77da('0x22')]('[%s][voiceDialReport][dialbegin]\x20agent:%s\x20interface:%s\x20lastevent:called',_0x4e130c[_0x77da('0x19')],this[_0x77da('0x1a')][_0x4e130c[_0x77da('0x19')]][_0x77da('0x23')],this[_0x77da('0x1a')][_0x4e130c[_0x77da('0x19')]][_0x77da('0x24')]);logger['debug']('[%s][voiceDialReport][dialbegin]\x20sending\x20voice_outbound_channel:save\x20event:',_0x4e130c[_0x77da('0x19')],util[_0x77da('0x25')](this[_0x77da('0x1a')][_0x4e130c[_0x77da('0x19')]],{'showHidden':![],'depth':null}));if(this['applications'][_0x4e130c[_0x77da('0x19')]])_[_0x77da('0x26')](this[_0x77da('0x1a')][_0x4e130c[_0x77da('0x19')]],this[_0x77da('0xb')][_0x4e130c['uniqueid']]);this[_0x77da('0x15')](_0x77da('0x27'),_0x77da('0x28'),this[_0x77da('0x1a')][_0x4e130c['uniqueid']]);logger['debug']('[%s][voiceDialReport][dialbegin]\x20sending\x20dialbegin\x20event:',_0x4e130c[_0x77da('0x19')],util[_0x77da('0x25')](this[_0x77da('0x1a')][_0x4e130c[_0x77da('0x19')]],{'showHidden':![],'depth':null}));ami[_0x77da('0x15')]('custom:dialbegin',this[_0x77da('0x1a')][_0x4e130c[_0x77da('0x19')]]);}}}catch(_0x356bfb){logger[_0x77da('0x29')](_0x77da('0x2a'),_0x4e130c[_0x77da('0x19')],util['inspect'](_0x356bfb,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0x77da('0x13')][_0x77da('0x2b')]=function(_0x1e1fae){try{if(this[_0x77da('0x16')](_0x1e1fae)){logger[_0x77da('0x17')](_0x77da('0x2c'),_0x1e1fae[_0x77da('0x19')],util[_0x77da('0x25')](_0x1e1fae,{'showHidden':![],'depth':null}));if(this['channels'][_0x1e1fae['uniqueid']]){this[_0x77da('0x1a')][_0x1e1fae[_0x77da('0x19')]]['dialstatus']=_0x1e1fae[_0x77da('0x2d')];if(_0x1e1fae[_0x77da('0x2d')]===_0x77da('0x2e')){this[_0x77da('0x1a')][_0x1e1fae[_0x77da('0x19')]][_0x77da('0x2f')]=_0x1e1fae[_0x77da('0x2f')];this['channels'][_0x1e1fae[_0x77da('0x19')]]['connectedlinename']=_0x1e1fae['connectedlinename'];this['channels'][_0x1e1fae[_0x77da('0x19')]]['answertime']=moment()[_0x77da('0x1b')](_0x77da('0x1c'));this[_0x77da('0x1a')][_0x1e1fae[_0x77da('0x19')]][_0x77da('0x30')]=_0x77da('0x31');logger[_0x77da('0x22')]('[%s][voiceDialReport][dialend]\x20agent:%s\x20lastevent:connect',_0x1e1fae[_0x77da('0x19')],_0x1e1fae[_0x77da('0x1e')][_0x77da('0x1f')](_0x1e1fae[_0x77da('0x1e')][_0x77da('0x20')]('/')+0x1,_0x1e1fae[_0x77da('0x1e')]['lastIndexOf']('-')));logger[_0x77da('0x17')](_0x77da('0x32'),_0x1e1fae[_0x77da('0x19')],util['inspect'](this[_0x77da('0x1a')][_0x1e1fae['uniqueid']],{'showHidden':![],'depth':null}));ami['emit']('custom:dialconnect',this['channels'][_0x1e1fae[_0x77da('0x19')]]);}logger[_0x77da('0x17')](_0x77da('0x33'),_0x1e1fae['uniqueid'],util[_0x77da('0x25')](this['channels'][_0x1e1fae[_0x77da('0x19')]],{'showHidden':![],'depth':null}));this['emit'](_0x77da('0x27'),_0x77da('0x28'),this[_0x77da('0x1a')][_0x1e1fae[_0x77da('0x19')]]);}}}catch(_0x240bee){logger['error'](_0x77da('0x34'),_0x1e1fae[_0x77da('0x19')],util[_0x77da('0x25')](_0x240bee,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0x77da('0x13')][_0x77da('0x11')]=function(_0x390064){try{if(this['isNotNull'](_0x390064)){logger[_0x77da('0x17')](_0x77da('0x35'),_0x390064[_0x77da('0x19')],util[_0x77da('0x25')](_0x390064,{'showHidden':![],'depth':null}));this[_0x77da('0x36')](_0x390064[_0x77da('0x19')],_['keys'](_0x390064[_0x77da('0x37')])[0x0],_0x390064['value']);if(this[_0x77da('0x16')](_0x390064[_0x77da('0x37')])&&this[_0x77da('0x16')](_0x390064['variable'][_0x77da('0x38')])){if(_[_0x77da('0x14')](this[_0x77da('0x1a')][_0x390064[_0x77da('0x19')]])){this[_0x77da('0x1a')][_0x390064[_0x77da('0x19')]]={'routeId':_0x390064[_0x77da('0x39')],'variables':this[_0x77da('0xc')][_0x390064[_0x77da('0x19')]],'motionChannel':'voice'};logger[_0x77da('0x22')](_0x77da('0x3a'),_0x390064[_0x77da('0x19')],_0x390064[_0x77da('0x37')][_0x77da('0x38')],_[_0x77da('0x3b')](_0x390064['variable'])[0x0],_0x390064['value']);logger[_0x77da('0x17')](_0x77da('0x3c'),_0x390064[_0x77da('0x19')],util[_0x77da('0x25')](this[_0x77da('0x1a')][_0x390064[_0x77da('0x19')]],{'showHidden':![],'depth':null}));this['emit'](_0x77da('0x27'),_0x77da('0x28'),this[_0x77da('0x1a')][_0x390064[_0x77da('0x19')]]);}}}}catch(_0x5487e0){logger[_0x77da('0x29')]('[%s][voiceDialReport][varset]',_0x390064['uniqueid'],util[_0x77da('0x25')](_0x5487e0,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0x77da('0x13')][_0x77da('0x36')]=function(_0x193760,_0x57d866,_0x16bf4b){var _0x1e36ee=['rtpaudioqos',_0x77da('0x3d'),_0x77da('0x3e'),'rtpaudioqosjitterbridged',_0x77da('0x3f'),_0x77da('0x40'),_0x77da('0x41'),_0x77da('0x42'),_0x77da('0x43'),_0x77da('0x44'),_0x77da('0x45'),_0x77da('0x46'),_0x77da('0x47'),_0x77da('0x48'),'memberinterface',_0x77da('0x49'),'membername',_0x77da('0x4a'),_0x77da('0x4b')];if(!_[_0x77da('0x4c')](_0x57d866)&&!_[_0x77da('0x4d')](_0x1e36ee,_0x57d866)){if(_[_0x77da('0x14')](this[_0x77da('0xc')][_0x193760])){this[_0x77da('0xc')][_0x193760]={};}this['variables'][_0x193760][_0x57d866]=_0x16bf4b;}};VoiceDialReport[_0x77da('0x13')][_0x77da('0x12')]=function(_0x1a7115){try{if(this[_0x77da('0x16')](_0x1a7115)){logger['debug'](_0x77da('0x4e'),_0x1a7115[_0x77da('0x19')],util[_0x77da('0x25')](_0x1a7115,{'showHidden':![],'depth':null}));if(this['channels'][_0x1a7115['uniqueid']]){logger[_0x77da('0x22')](_0x77da('0x4f'),_0x1a7115[_0x77da('0x19')],_0x1a7115[_0x77da('0x50')]);this[_0x77da('0x1a')][_0x1a7115['uniqueid']]['endtime']=moment()[_0x77da('0x1b')](_0x77da('0x1c'));this['channels'][_0x1a7115[_0x77da('0x19')]][_0x77da('0x51')]=moment(this[_0x77da('0x1a')][_0x1a7115['uniqueid']][_0x77da('0x52')])[_0x77da('0x53')](this['channels'][_0x1a7115[_0x77da('0x19')]][_0x77da('0x54')],_0x77da('0x55'));this[_0x77da('0x1a')][_0x1a7115[_0x77da('0x19')]][_0x77da('0x30')]=_0x77da('0x56');this[_0x77da('0xa')][_0x77da('0x57')]+=0x1;if(this['channels'][_0x1a7115[_0x77da('0x19')]][_0x77da('0x58')]){this[_0x77da('0xa')][_0x77da('0x59')]+=0x1;this[_0x77da('0x1a')][_0x1a7115[_0x77da('0x19')]]['holdtime']=moment(this[_0x77da('0x1a')][_0x1a7115[_0x77da('0x19')]][_0x77da('0x58')])['diff'](this[_0x77da('0x1a')][_0x1a7115[_0x77da('0x19')]][_0x77da('0x54')],_0x77da('0x55'));this[_0x77da('0x1a')][_0x1a7115[_0x77da('0x19')]][_0x77da('0x5a')]=moment(this['channels'][_0x1a7115[_0x77da('0x19')]]['endtime'])[_0x77da('0x53')](this[_0x77da('0x1a')][_0x1a7115[_0x77da('0x19')]]['answertime'],_0x77da('0x55'));this[_0x77da('0xa')][_0x77da('0x5b')]+=this[_0x77da('0x1a')][_0x1a7115['uniqueid']]['holdtime']||0x0;this['outbound'][_0x77da('0x5c')]+=this[_0x77da('0x1a')][_0x1a7115[_0x77da('0x19')]][_0x77da('0x5a')];}this[_0x77da('0xa')][_0x77da('0x5d')]+=this[_0x77da('0x1a')][_0x1a7115[_0x77da('0x19')]][_0x77da('0x51')];logger[_0x77da('0x17')]('[%s][voiceDialReport][hangup]\x20sending\x20voiceDialReport\x20event:',_0x1a7115[_0x77da('0x19')],util[_0x77da('0x25')](this['channels'][_0x1a7115['uniqueid']],{'showHidden':![],'depth':null}));ami[_0x77da('0x15')]('custom:voiceDialReport',this[_0x77da('0x1a')][_0x1a7115[_0x77da('0x19')]]);logger[_0x77da('0x17')]('[%s][voiceDialReport][hangup]\x20sending\x20dialend\x20event:',_0x1a7115[_0x77da('0x19')],util[_0x77da('0x25')](this[_0x77da('0x1a')][_0x1a7115[_0x77da('0x19')]],{'showHidden':![],'depth':null}));ami[_0x77da('0x15')]('custom:dialend',this[_0x77da('0x1a')][_0x1a7115[_0x77da('0x19')]]);logger['debug'](_0x77da('0x5e'),_0x1a7115[_0x77da('0x19')],util[_0x77da('0x25')](this[_0x77da('0x1a')][_0x1a7115[_0x77da('0x19')]],{'showHidden':![],'depth':null}));this[_0x77da('0x15')](_0x77da('0x27'),'voice_outbound:save',this[_0x77da('0xa')]);logger['info'](_0x77da('0x5f'),JSON[_0x77da('0x60')](this[_0x77da('0x1a')][_0x1a7115[_0x77da('0x19')]]));logger[_0x77da('0x17')](_0x77da('0x61'),_0x1a7115[_0x77da('0x19')],util[_0x77da('0x25')](this[_0x77da('0x1a')][_0x1a7115[_0x77da('0x19')]],{'showHidden':![],'depth':null}));this[_0x77da('0x15')](_0x77da('0x27'),'voice_outbound_channel:remove',this[_0x77da('0x1a')][_0x1a7115[_0x77da('0x19')]]);delete this[_0x77da('0x1a')][_0x1a7115[_0x77da('0x19')]];}else if(this['channels'][_0x1a7115[_0x77da('0x62')]]){this[_0x77da('0x1a')][_0x1a7115[_0x77da('0x62')]]['uniqueid']=this[_0x77da('0x1a')][_0x1a7115['linkedid']]['destuniqueid'];}if(this[_0x77da('0xc')][_0x1a7115[_0x77da('0x19')]]){delete this[_0x77da('0xc')][_0x1a7115[_0x77da('0x19')]];}}}catch(_0x3cb69e){logger[_0x77da('0x29')](_0x77da('0x63'),_0x1a7115[_0x77da('0x19')],util[_0x77da('0x25')](_0x3cb69e,{'showHidden':![],'depth':null}));}};VoiceDialReport['prototype'][_0x77da('0x64')]=function(_0xfcf09c){try{if(this[_0x77da('0x16')](_0xfcf09c)){logger[_0x77da('0x17')](_0x77da('0x65'),_0xfcf09c['uniqueid'],util[_0x77da('0x25')](_0xfcf09c,{'showHidden':![],'depth':null}));if(_0xfcf09c[_0x77da('0x66')][_0x77da('0x67')]()===_0x77da('0x68')){_0xfcf09c[_0x77da('0x69')]=(_0xfcf09c[_0x77da('0x6a')]||_0xfcf09c[_0x77da('0x69')])[_0x77da('0x67')]();if(_[_0x77da('0x6b')](_0xfcf09c[_0x77da('0x69')],'cdr(')){if(_['isUndefined'](this['applications'][_0xfcf09c[_0x77da('0x19')]]))this[_0x77da('0xb')][_0xfcf09c[_0x77da('0x19')]]={};logger['info']('[%s][voiceDialReport][newexten]\x20application:%s\x20appdata:%s',_0xfcf09c[_0x77da('0x19')],_0xfcf09c[_0x77da('0x66')],_0xfcf09c[_0x77da('0x69')]);var _0x3a42e5=_0xfcf09c[_0x77da('0x69')][_0x77da('0x6c')]('=');var _0x3fca4b=_0x3a42e5[0x0][_0x77da('0x6d')](/cdr\((.*)\)/);if(_0x3fca4b)this[_0x77da('0xb')][_0xfcf09c[_0x77da('0x19')]][_0x3fca4b[0x1]]=_0x3a42e5[0x1];}}}}catch(_0x27a462){logger[_0x77da('0x29')](_0x77da('0x6e'),_0xfcf09c['uniqueid'],util['inspect'](_0x27a462,{'showHidden':![],'depth':null}));}};module[_0x77da('0x6f')]=VoiceDialReport;
\ No newline at end of file
+var _0xabce=['starttime','billableseconds','sumHoldTime','sumDuration','duration','[%s][voiceDialReport][hangup]\x20sending\x20voiceDialReport\x20event:','custom:voiceDialReport','[DEBUG]\x20Emit\x20voice_outbound_channel:remove\x20event','stringify','[%s][voiceDialReport][hangup]\x20sending\x20voice_outbound_channel:remove\x20event:','linkedid','destuniqueid','syncNewExten','[%s][voiceDialReport][newexten]\x20event:','application','toLowerCase','set','applicationdata','cdr(','[%s][voiceDialReport][newexten]\x20application:%s\x20appdata:%s','split','[%s][voiceDialReport][newexten]','exports','lodash','moment','util','ioredis','../../../config/environment','../ami','redis','defaults','socket.io-emitter','outboundChannels','outbound','variables','dialbegin','syncDialBegin','bind','dialend','syncDialEnd','varset','syncVarSet','hangup','syncHangup','prototype','isNotNull','emit','debug','inspect','uniqueid','merge','channels','format','YYYY-MM-DD\x20HH:mm:ss','called','channel','substring','lastIndexOf','omit','event','info','[%s][voiceDialReport][dialbegin]\x20agent:%s\x20interface:%s\x20lastevent:called','membername','applications','voice_outbound_channel:save','[%s][voiceDialReport][dialbegin]\x20sending\x20dialbegin\x20event:','custom:dialbegin','[%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:','voice:outbound','error','[%s][voiceDialReport][dialend]','[%s][voiceDialReport][varset]\x20event:','addVariable','keys','value','variable','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','rtpaudioqoslossbridged','rtpaudioqosrtt','sipcallid','bridgepeer','membercalls','memberdynamic','memberinterface','memberlastcall','memberpenalty','memberrealtime','isNil','includes','isUndefined','[%s][voiceDialReport][hangup]\x20event:','[%s][voiceDialReport][hangup]\x20reason:%s\x20lasteevent:complete','cause-txt','endtime','diff','seconds','lastevent','complete','total','answered','holdtime'];(function(_0x4f9f22,_0x77d268){var _0x40726c=function(_0x27a69d){while(--_0x27a69d){_0x4f9f22['push'](_0x4f9f22['shift']());}};_0x40726c(++_0x77d268);}(_0xabce,0x103));var _0xeabc=function(_0x363ef8,_0x4ecb1a){_0x363ef8=_0x363ef8-0x0;var _0x148822=_0xabce[_0x363ef8];return _0x148822;};'use strict';var _=require(_0xeabc('0x0'));var moment=require(_0xeabc('0x1'));var util=require(_0xeabc('0x2'));var Redis=require(_0xeabc('0x3'));var config=require(_0xeabc('0x4'));var logger=require('../../../config/logger')('ami');var ami=require(_0xeabc('0x5'));config[_0xeabc('0x6')]=_[_0xeabc('0x7')](config['redis'],{'host':'localhost','port':0x18eb});var io=require(_0xeabc('0x8'))(new Redis(config['redis']));function VoiceDialReport(_0x229ba4){this['channels']=_0x229ba4[_0xeabc('0x9')];this[_0xeabc('0xa')]=_0x229ba4[_0xeabc('0xa')];this['applications']={};this[_0xeabc('0xb')]={};ami['on'](_0xeabc('0xc'),this[_0xeabc('0xd')][_0xeabc('0xe')](this));ami['on'](_0xeabc('0xf'),this[_0xeabc('0x10')][_0xeabc('0xe')](this));ami['on'](_0xeabc('0x11'),this[_0xeabc('0x12')][_0xeabc('0xe')](this));ami['on'](_0xeabc('0x13'),this[_0xeabc('0x14')][_0xeabc('0xe')](this));}VoiceDialReport[_0xeabc('0x15')][_0xeabc('0x16')]=function(_0xcfbf06){return _0xcfbf06!==null&&!_['isUndefined'](_0xcfbf06);};VoiceDialReport[_0xeabc('0x15')][_0xeabc('0x17')]=function(_0x3251c6,_0x55f0de,_0x5f4ee8){io['to'](_0x3251c6)[_0xeabc('0x17')](_0x55f0de,_0x5f4ee8);};VoiceDialReport[_0xeabc('0x15')][_0xeabc('0xd')]=function(_0x53d5cb){try{if(this[_0xeabc('0x16')](_0x53d5cb)){logger[_0xeabc('0x18')]('[%s][voiceDialReport][dialbegin]\x20event:',_0x53d5cb['uniqueid'],util[_0xeabc('0x19')](_0x53d5cb,{'showHidden':![],'depth':null}));if(this['channels'][_0x53d5cb[_0xeabc('0x1a')]]){_[_0xeabc('0x1b')](this[_0xeabc('0x1c')][_0x53d5cb[_0xeabc('0x1a')]],{'starttime':moment()[_0xeabc('0x1d')](_0xeabc('0x1e')),'lastevent':_0xeabc('0x1f'),'interface':_0x53d5cb[_0xeabc('0x20')]['substring'](0x0,_0x53d5cb[_0xeabc('0x20')]['lastIndexOf']('-')),'membername':_0x53d5cb[_0xeabc('0x20')][_0xeabc('0x21')](_0x53d5cb['channel'][_0xeabc('0x22')]('/')+0x1,_0x53d5cb[_0xeabc('0x20')][_0xeabc('0x22')]('-'))},_[_0xeabc('0x23')](_0x53d5cb,[_0xeabc('0x24'),'privilege']));logger[_0xeabc('0x25')](_0xeabc('0x26'),_0x53d5cb[_0xeabc('0x1a')],this['channels'][_0x53d5cb[_0xeabc('0x1a')]][_0xeabc('0x27')],this[_0xeabc('0x1c')][_0x53d5cb[_0xeabc('0x1a')]]['interface']);logger[_0xeabc('0x18')]('[%s][voiceDialReport][dialbegin]\x20sending\x20voice_outbound_channel:save\x20event:',_0x53d5cb[_0xeabc('0x1a')],util['inspect'](this[_0xeabc('0x1c')][_0x53d5cb[_0xeabc('0x1a')]],{'showHidden':![],'depth':null}));if(this[_0xeabc('0x28')][_0x53d5cb[_0xeabc('0x1a')]])_[_0xeabc('0x1b')](this[_0xeabc('0x1c')][_0x53d5cb[_0xeabc('0x1a')]],this['applications'][_0x53d5cb['uniqueid']]);this[_0xeabc('0x17')]('voice:outbound',_0xeabc('0x29'),this[_0xeabc('0x1c')][_0x53d5cb['uniqueid']]);logger[_0xeabc('0x18')](_0xeabc('0x2a'),_0x53d5cb[_0xeabc('0x1a')],util[_0xeabc('0x19')](this[_0xeabc('0x1c')][_0x53d5cb[_0xeabc('0x1a')]],{'showHidden':![],'depth':null}));ami[_0xeabc('0x17')](_0xeabc('0x2b'),this[_0xeabc('0x1c')][_0x53d5cb['uniqueid']]);}}}catch(_0x5b34dd){logger['error'](_0xeabc('0x2c'),_0x53d5cb[_0xeabc('0x1a')],util[_0xeabc('0x19')](_0x5b34dd,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0xeabc('0x15')][_0xeabc('0x10')]=function(_0x368b8a){try{if(this[_0xeabc('0x16')](_0x368b8a)){logger['debug'](_0xeabc('0x2d'),_0x368b8a[_0xeabc('0x1a')],util[_0xeabc('0x19')](_0x368b8a,{'showHidden':![],'depth':null}));if(this['channels'][_0x368b8a[_0xeabc('0x1a')]]){this[_0xeabc('0x1c')][_0x368b8a[_0xeabc('0x1a')]]['dialstatus']=_0x368b8a[_0xeabc('0x2e')];if(_0x368b8a[_0xeabc('0x2e')]===_0xeabc('0x2f')){this['channels'][_0x368b8a[_0xeabc('0x1a')]][_0xeabc('0x30')]=_0x368b8a['connectedlinenum'];this['channels'][_0x368b8a[_0xeabc('0x1a')]][_0xeabc('0x31')]=_0x368b8a['connectedlinename'];this[_0xeabc('0x1c')][_0x368b8a[_0xeabc('0x1a')]][_0xeabc('0x32')]=moment()[_0xeabc('0x1d')](_0xeabc('0x1e'));this['channels'][_0x368b8a[_0xeabc('0x1a')]]['lastevent']=_0xeabc('0x33');logger[_0xeabc('0x25')](_0xeabc('0x34'),_0x368b8a['uniqueid'],_0x368b8a['channel'][_0xeabc('0x21')](_0x368b8a['channel'][_0xeabc('0x22')]('/')+0x1,_0x368b8a['channel']['lastIndexOf']('-')));logger['debug']('[%s][voiceDialReport][dialend]\x20sending\x20dialconnect\x20event:',_0x368b8a[_0xeabc('0x1a')],util['inspect'](this[_0xeabc('0x1c')][_0x368b8a[_0xeabc('0x1a')]],{'showHidden':![],'depth':null}));ami['emit'](_0xeabc('0x35'),this['channels'][_0x368b8a[_0xeabc('0x1a')]]);}logger['debug'](_0xeabc('0x36'),_0x368b8a[_0xeabc('0x1a')],util[_0xeabc('0x19')](this['channels'][_0x368b8a['uniqueid']],{'showHidden':![],'depth':null}));this['emit'](_0xeabc('0x37'),_0xeabc('0x29'),this[_0xeabc('0x1c')][_0x368b8a['uniqueid']]);}}}catch(_0x4f1897){logger[_0xeabc('0x38')](_0xeabc('0x39'),_0x368b8a['uniqueid'],util[_0xeabc('0x19')](_0x4f1897,{'showHidden':![],'depth':null}));}};VoiceDialReport['prototype'][_0xeabc('0x12')]=function(_0x5a3b62){try{if(this['isNotNull'](_0x5a3b62)){logger['debug'](_0xeabc('0x3a'),_0x5a3b62[_0xeabc('0x1a')],util[_0xeabc('0x19')](_0x5a3b62,{'showHidden':![],'depth':null}));this[_0xeabc('0x3b')](_0x5a3b62['uniqueid'],_[_0xeabc('0x3c')](_0x5a3b62['variable'])[0x0],_0x5a3b62[_0xeabc('0x3d')]);if(this[_0xeabc('0x16')](_0x5a3b62[_0xeabc('0x3e')])&&this[_0xeabc('0x16')](_0x5a3b62[_0xeabc('0x3e')]['outboundrouteid'])){if(_['isUndefined'](this[_0xeabc('0x1c')][_0x5a3b62['uniqueid']])){this[_0xeabc('0x1c')][_0x5a3b62[_0xeabc('0x1a')]]={'routeId':_0x5a3b62['value'],'variables':this[_0xeabc('0xb')][_0x5a3b62[_0xeabc('0x1a')]],'motionChannel':_0xeabc('0x3f')};logger[_0xeabc('0x25')](_0xeabc('0x40'),_0x5a3b62[_0xeabc('0x1a')],_0x5a3b62[_0xeabc('0x3e')]['outboundrouteid'],_[_0xeabc('0x3c')](_0x5a3b62[_0xeabc('0x3e')])[0x0],_0x5a3b62[_0xeabc('0x3d')]);logger[_0xeabc('0x18')](_0xeabc('0x41'),_0x5a3b62[_0xeabc('0x1a')],util[_0xeabc('0x19')](this[_0xeabc('0x1c')][_0x5a3b62[_0xeabc('0x1a')]],{'showHidden':![],'depth':null}));this[_0xeabc('0x17')]('voice:outbound',_0xeabc('0x29'),this[_0xeabc('0x1c')][_0x5a3b62[_0xeabc('0x1a')]]);}}}}catch(_0xec22ef){logger[_0xeabc('0x38')](_0xeabc('0x42'),_0x5a3b62[_0xeabc('0x1a')],util['inspect'](_0xec22ef,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0xeabc('0x15')][_0xeabc('0x3b')]=function(_0x463955,_0x318c02,_0x47440e){var _0x58e2c1=[_0xeabc('0x43'),_0xeabc('0x44'),_0xeabc('0x45'),_0xeabc('0x46'),'rtpaudioqosloss',_0xeabc('0x47'),_0xeabc('0x48'),'rtpaudioqosrttbridged',_0xeabc('0x49'),'sipuri',_0xeabc('0x4a'),'bridgepvtcallid',_0xeabc('0x4b'),_0xeabc('0x4c'),_0xeabc('0x4d'),_0xeabc('0x4e'),_0xeabc('0x27'),_0xeabc('0x4f'),_0xeabc('0x50')];if(!_[_0xeabc('0x51')](_0x318c02)&&!_[_0xeabc('0x52')](_0x58e2c1,_0x318c02)){if(_[_0xeabc('0x53')](this['variables'][_0x463955])){this[_0xeabc('0xb')][_0x463955]={};}this[_0xeabc('0xb')][_0x463955][_0x318c02]=_0x47440e;}};VoiceDialReport[_0xeabc('0x15')][_0xeabc('0x14')]=function(_0x555d6b){try{if(this[_0xeabc('0x16')](_0x555d6b)){logger[_0xeabc('0x18')](_0xeabc('0x54'),_0x555d6b[_0xeabc('0x1a')],util['inspect'](_0x555d6b,{'showHidden':![],'depth':null}));if(this[_0xeabc('0x1c')][_0x555d6b[_0xeabc('0x1a')]]){logger[_0xeabc('0x25')](_0xeabc('0x55'),_0x555d6b[_0xeabc('0x1a')],_0x555d6b[_0xeabc('0x56')]);this[_0xeabc('0x1c')][_0x555d6b[_0xeabc('0x1a')]][_0xeabc('0x57')]=moment()['format'](_0xeabc('0x1e'));this['channels'][_0x555d6b['uniqueid']]['duration']=moment(this[_0xeabc('0x1c')][_0x555d6b[_0xeabc('0x1a')]][_0xeabc('0x57')])[_0xeabc('0x58')](this[_0xeabc('0x1c')][_0x555d6b[_0xeabc('0x1a')]]['starttime'],_0xeabc('0x59'));this[_0xeabc('0x1c')][_0x555d6b[_0xeabc('0x1a')]][_0xeabc('0x5a')]=_0xeabc('0x5b');this[_0xeabc('0xa')][_0xeabc('0x5c')]+=0x1;if(this[_0xeabc('0x1c')][_0x555d6b['uniqueid']]['answertime']){this[_0xeabc('0xa')][_0xeabc('0x5d')]+=0x1;this[_0xeabc('0x1c')][_0x555d6b['uniqueid']][_0xeabc('0x5e')]=moment(this['channels'][_0x555d6b['uniqueid']][_0xeabc('0x32')])[_0xeabc('0x58')](this[_0xeabc('0x1c')][_0x555d6b[_0xeabc('0x1a')]][_0xeabc('0x5f')],_0xeabc('0x59'));this['channels'][_0x555d6b[_0xeabc('0x1a')]][_0xeabc('0x60')]=moment(this[_0xeabc('0x1c')][_0x555d6b[_0xeabc('0x1a')]][_0xeabc('0x57')])[_0xeabc('0x58')](this['channels'][_0x555d6b[_0xeabc('0x1a')]][_0xeabc('0x32')],_0xeabc('0x59'));this[_0xeabc('0xa')][_0xeabc('0x61')]+=this[_0xeabc('0x1c')][_0x555d6b[_0xeabc('0x1a')]][_0xeabc('0x5e')]||0x0;this[_0xeabc('0xa')]['sumBillable']+=this[_0xeabc('0x1c')][_0x555d6b['uniqueid']][_0xeabc('0x60')];}this[_0xeabc('0xa')][_0xeabc('0x62')]+=this[_0xeabc('0x1c')][_0x555d6b[_0xeabc('0x1a')]][_0xeabc('0x63')];logger[_0xeabc('0x18')](_0xeabc('0x64'),_0x555d6b[_0xeabc('0x1a')],util[_0xeabc('0x19')](this['channels'][_0x555d6b[_0xeabc('0x1a')]],{'showHidden':![],'depth':null}));ami[_0xeabc('0x17')](_0xeabc('0x65'),this[_0xeabc('0x1c')][_0x555d6b['uniqueid']]);logger[_0xeabc('0x18')]('[%s][voiceDialReport][hangup]\x20sending\x20dialend\x20event:',_0x555d6b['uniqueid'],util[_0xeabc('0x19')](this[_0xeabc('0x1c')][_0x555d6b[_0xeabc('0x1a')]],{'showHidden':![],'depth':null}));ami[_0xeabc('0x17')]('custom:dialend',this['channels'][_0x555d6b[_0xeabc('0x1a')]]);logger['debug']('[%s][voiceDialReport][hangup]\x20sending\x20voice_outbound:save\x20event:',_0x555d6b[_0xeabc('0x1a')],util['inspect'](this['channels'][_0x555d6b[_0xeabc('0x1a')]],{'showHidden':![],'depth':null}));this[_0xeabc('0x17')]('voice:outbound','voice_outbound:save',this[_0xeabc('0xa')]);logger['info'](_0xeabc('0x66'),JSON[_0xeabc('0x67')](this['channels'][_0x555d6b['uniqueid']]));logger[_0xeabc('0x18')](_0xeabc('0x68'),_0x555d6b[_0xeabc('0x1a')],util[_0xeabc('0x19')](this[_0xeabc('0x1c')][_0x555d6b['uniqueid']],{'showHidden':![],'depth':null}));this['emit'](_0xeabc('0x37'),'voice_outbound_channel:remove',this[_0xeabc('0x1c')][_0x555d6b['uniqueid']]);delete this[_0xeabc('0x1c')][_0x555d6b['uniqueid']];}else if(this[_0xeabc('0x1c')][_0x555d6b['linkedid']]){this[_0xeabc('0x1c')][_0x555d6b[_0xeabc('0x69')]][_0xeabc('0x1a')]=this[_0xeabc('0x1c')][_0x555d6b['linkedid']][_0xeabc('0x6a')];}if(this['variables'][_0x555d6b[_0xeabc('0x1a')]]){delete this[_0xeabc('0xb')][_0x555d6b[_0xeabc('0x1a')]];}}}catch(_0x433dd3){logger[_0xeabc('0x38')]('[%s][voiceDialReport][hangup]',_0x555d6b[_0xeabc('0x1a')],util[_0xeabc('0x19')](_0x433dd3,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0xeabc('0x15')][_0xeabc('0x6b')]=function(_0x5427c8){try{if(this[_0xeabc('0x16')](_0x5427c8)){logger[_0xeabc('0x18')](_0xeabc('0x6c'),_0x5427c8[_0xeabc('0x1a')],util['inspect'](_0x5427c8,{'showHidden':![],'depth':null}));if(_0x5427c8[_0xeabc('0x6d')][_0xeabc('0x6e')]()===_0xeabc('0x6f')){_0x5427c8[_0xeabc('0x70')]=(_0x5427c8['appdata']||_0x5427c8['applicationdata'])[_0xeabc('0x6e')]();if(_['startsWith'](_0x5427c8['applicationdata'],_0xeabc('0x71'))){if(_[_0xeabc('0x53')](this[_0xeabc('0x28')][_0x5427c8['uniqueid']]))this[_0xeabc('0x28')][_0x5427c8[_0xeabc('0x1a')]]={};logger['info'](_0xeabc('0x72'),_0x5427c8[_0xeabc('0x1a')],_0x5427c8[_0xeabc('0x6d')],_0x5427c8[_0xeabc('0x70')]);var _0x2ece2c=_0x5427c8['applicationdata'][_0xeabc('0x73')]('=');var _0x523496=_0x2ece2c[0x0]['match'](/cdr\((.*)\)/);if(_0x523496)this['applications'][_0x5427c8[_0xeabc('0x1a')]][_0x523496[0x1]]=_0x2ece2c[0x1];}}}}catch(_0x1c8a51){logger[_0xeabc('0x38')](_0xeabc('0x74'),_0x5427c8[_0xeabc('0x1a')],util['inspect'](_0x1c8a51,{'showHidden':![],'depth':null}));}};module[_0xeabc('0x75')]=VoiceDialReport;
\ No newline at end of file
index 8bd5e49..3fa255d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x37e8=['voiceQueues','campaigns','queuesummary','syncQueueSummary','bind','queuesummarycomplete','syncQueueSummaryComplete','queuemember','syncQueueMember','queuestatuscomplete','syncQueueStatusComplete','queuecallerjoin','queuecallerabandon','syncQueueCallerAbandon','queuecallerleave','agentcomplete','syncAgentComplete','syncAgentConnect','varset','hangup','syncHangup','fullybooted','musiconholdstop','syncMusicOnHoldStop','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','loopQueueSummary','loopQueueShow','isEmpty','hasOwnProperty','originated','talking','pTalking','waiting','unlockRR','queuecallerexit','queuecallercomplete','clearZombieChannels','switch','isNil','Action','status','catch','message','No\x20such\x20channel','error','[%s][voiceQueueReport][checkChannel]','inspect','queueReports','variables','[%s][voiceQueueReport][checkVariables]','syncFullyBooted','[FullyBooted]\x20clear\x20realtime','clearQueueReport','summary','emitVoiceQueueChannelRemove','clearqueuereport','emit','debug','[%s][voiceQueueReport][','uniqueid','format','voice:queue:%s','queue','voice_queue_channel:save',']\x20sending\x20voice_queue_channel:remove\x20event:','voice_queue_channel:remove','emitInboundVoiceQueueSummary','type','inbound','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','voice_queue:save','isNotNull','isUndefined','[voiceQueueReport][queues]','isRunning','then','actionid','[voiceQueueReport][queuesummary]','createQueueSummaryReport','queues','name','summaryEvent','createReport','compareToInboundQueue','assign','queuestatus','handleInboundQueueSummaryReport','outbound','statusRequests','completeEvent','push','custom:queuesummarycomplete','syncQueueCallerJoin','[%s][voiceQueueReport][queuecallerjoin]','YYYY-MM-DD\x20HH:mm:ss','position','count','routealias','info','[voiceQueueReport][queuecallerjoin]\x20name:%s\x20type:%s','keys','emitVoiceQueueChannelSave','[%s][voiceQueueReport][queuecallerabandon]','last','queuecallercompleteAt','holdtime','originalposition','queuecallerexitreason','[%s][voiceQueueReport][queuecallerleave]','connectedlinenum','connectedlinename','[%s][voiceQueueReport][agentconnect]','COMPLETEDBYAGENT','[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT','queuecallerabandonAt','assigned','membername','queuecallerexitAt','transfer','reason','COMPLETED','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETED','startsWith','channel','toLowerCase','local/','linkedid','FORWARDTRANSFER','transfertype','transferexten','transferuniqueid','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:FORWARDTRANSFER','COMPLETEDBY','toUpperCase','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:%s','[%s][voiceQueueReport][agentcomplete]','addVariable','value','variable','TIMEOUT','lastevent','queuecallerleaveAt','[%s][voiceQueueReport][varset]\x20sending\x20timeout\x20event:','custom:timeout','EXITWITHKEY','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','sipuri','bridgepeer','bridgepvtcallid','membercalls','memberdynamic','memberinterface','memberlastcall','memberpenalty','memberrealtime','includes','length','sumHoldTime','queuecallerjoinAt','seconds','ATTENDEDTRANSFER','sumDuration','milliseconds','diff','sumBillable','unmanaged','custom:queuecallerunmanaged','abandoned','[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerabandon\x20event:','custom:queuecallerabandon','[%s][voiceQueueReport][hangup]\x20sending\x20voiceQueueReport\x20event:','custom:voiceQueueReport','[%s][voiceQueueReport][handleHangup]','[%s][voiceQueueReport][hangup]','handleHangup','cause-txt','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]','BLIND','extension','[%s][voiceQueueReport][blindTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','context','transfererchannel','[%s][voiceQueueReport][blindtransfer]','syncMusicOnHoldStart','[%s][voiceQueueReport][musiconholdstart]','mohstarttime','[%s][voiceQueueReport][musiconholdstop]','mohtime','[%s][voiceQueueReport][musiconholdstop]\x20mohtime:%s','syncNewExten','application','applicationdata','appdata','CDR(routeAlias)','cdr(','[%s][voiceQueueReport][newexten]\x20application:%s\x20appdata:%s','split','match','[%s][voiceQueueReport][newexten]','lodash','moment','util','ioredis','../../../config/environment','../../../config/logger','ami','../ami','../model/queueReport','../model/voiceQueueSummary','redis','defaults','socket.io-emitter','prototype','enqueue','tail','finally','sequence','realtime','agents','channels','queueChannels'];(function(_0x5eb02d,_0x552c6e){var _0x5d2e1c=function(_0x531957){while(--_0x531957){_0x5eb02d['push'](_0x5eb02d['shift']());}};_0x5d2e1c(++_0x552c6e);}(_0x37e8,0xdc));var _0x837e=function(_0x65435d,_0x5399d9){_0x65435d=_0x65435d-0x0;var _0x57f34c=_0x37e8[_0x65435d];return _0x57f34c;};'use strict';var _=require(_0x837e('0x0'));var moment=require(_0x837e('0x1'));var util=require(_0x837e('0x2'));var Redis=require(_0x837e('0x3'));var config=require(_0x837e('0x4'));var logger=require(_0x837e('0x5'))(_0x837e('0x6'));var ami=require(_0x837e('0x7'));var QueueReport=require(_0x837e('0x8'));var VoiceQueueSummary=require(_0x837e('0x9'));config[_0x837e('0xa')]=_[_0x837e('0xb')](config[_0x837e('0xa')],{'host':'localhost','port':0x18eb});var io=require(_0x837e('0xc'))(new Redis(config[_0x837e('0xa')]));var Sequence=function(){};Sequence[_0x837e('0xd')][_0x837e('0xe')]=function(_0x20716c){this[_0x837e('0xf')]=this['tail']?this[_0x837e('0xf')][_0x837e('0x10')](_0x20716c):_0x20716c();};function VoiceQueueReport(_0x4a8258){this[_0x837e('0x11')]=new Sequence();this['queueReports']={};this[_0x837e('0x12')]=_0x4a8258;this['agents']=_0x4a8258[_0x837e('0x13')];this[_0x837e('0x14')]=_0x4a8258[_0x837e('0x15')];this[_0x837e('0x16')]=_0x4a8258[_0x837e('0x16')];this['campaigns']=_0x4a8258[_0x837e('0x17')];this['summary']=initializeSummary();this['variables']={};ami['on'](_0x837e('0x18'),this[_0x837e('0x19')][_0x837e('0x1a')](this));ami['on'](_0x837e('0x1b'),this[_0x837e('0x1c')][_0x837e('0x1a')](this));ami['on'](_0x837e('0x1d'),this[_0x837e('0x1e')][_0x837e('0x1a')](this));ami['on'](_0x837e('0x1f'),this[_0x837e('0x20')][_0x837e('0x1a')](this));ami['on'](_0x837e('0x21'),this['syncQueueCallerJoin'][_0x837e('0x1a')](this));ami['on'](_0x837e('0x22'),this[_0x837e('0x23')][_0x837e('0x1a')](this));ami['on'](_0x837e('0x24'),this['syncQueueCallerLeave'][_0x837e('0x1a')](this));ami['on'](_0x837e('0x25'),this[_0x837e('0x26')][_0x837e('0x1a')](this));ami['on']('agentconnect',this[_0x837e('0x27')][_0x837e('0x1a')](this));ami['on'](_0x837e('0x28'),this['syncVarSet'][_0x837e('0x1a')](this));ami['on'](_0x837e('0x29'),this[_0x837e('0x2a')][_0x837e('0x1a')](this));ami['on'](_0x837e('0x2b'),this['syncFullyBooted'][_0x837e('0x1a')](this));ami['on']('musiconholdstart',this['syncMusicOnHoldStart'][_0x837e('0x1a')](this));ami['on'](_0x837e('0x2c'),this[_0x837e('0x2d')][_0x837e('0x1a')](this));ami['on'](_0x837e('0x2e'),this[_0x837e('0x2f')]['bind'](this));ami['on'](_0x837e('0x30'),this[_0x837e('0x31')]['bind'](this));this[_0x837e('0x32')]();this[_0x837e('0x33')]();}function clearChannels(_0x34372e){if(!_[_0x837e('0x34')](_0x34372e)){for(var _0x9ce65b in _0x34372e){if(_0x34372e[_0x837e('0x35')](_0x9ce65b)){delete _0x34372e[_0x9ce65b];}}}}function clearCampaigns(_0x39cfea){if(!_[_0x837e('0x34')](_0x39cfea)){for(var _0xedbf7a in _0x39cfea){if(_0x39cfea[_0x837e('0x35')](_0xedbf7a)){_0x39cfea[_0xedbf7a][_0x837e('0x36')]=0x0;}}}}function clearVoiceQueues(_0x559b35){if(!_[_0x837e('0x34')](_0x559b35)){for(var _0x381eaa in _0x559b35){if(_0x559b35[_0x837e('0x35')](_0x381eaa)){_0x559b35[_0x381eaa][_0x837e('0x36')]=0x0;_0x559b35[_0x381eaa][_0x837e('0x37')]=0x0;_0x559b35[_0x381eaa][_0x837e('0x38')]=0x0;_0x559b35[_0x381eaa][_0x837e('0x39')]=0x0;_0x559b35[_0x381eaa]['queueStatusComplete']=!![];}}}}function clearAgentBooked(_0x1d4d99){if(!_['isEmpty'](_0x1d4d99)){for(var _0x322afc in _0x1d4d99){if(_0x1d4d99[_0x837e('0x35')](_0x322afc)){_0x1d4d99[_0x322afc][_0x837e('0x3a')]=!![];}}}}function initializeSummary(){return{'id':null,'completeEvent':null,'isRunning':![],'queues':{},'queuestatus':{},'statusRequests':0x0};}function hasCallerLeftTheQueue(_0x3703e7){return _0x3703e7[_0x837e('0x3b')]||_0x3703e7[_0x837e('0x22')]||_0x3703e7[_0x837e('0x3c')];}VoiceQueueReport[_0x837e('0xd')][_0x837e('0x3d')]=function(){var _0x5e4ae8=this;for(var _0x57a439 in this[_0x837e('0x14')]){if(this[_0x837e('0x14')][_0x837e('0x35')](_0x57a439)&&!this[_0x837e('0x14')][_0x57a439][_0x837e('0x3e')]){this[_0x837e('0x11')][_0x837e('0xe')](function(){if(!_[_0x837e('0x3f')](_0x5e4ae8[_0x837e('0x14')][_0x57a439])){return ami[_0x837e('0x40')]({'action':_0x837e('0x41'),'channel':_0x5e4ae8[_0x837e('0x14')][_0x57a439]['channel']})[_0x837e('0x42')](function(_0x55661c){if(_0x55661c[_0x837e('0x43')]===_0x837e('0x44')){setTimeout(function(){if(_0x5e4ae8[_0x837e('0x14')][_0x57a439]){delete _0x5e4ae8['channels'][_0x57a439];logger[_0x837e('0x45')](_0x837e('0x46'),_0x57a439,util[_0x837e('0x47')](_0x55661c,{'showHidden':![],'depth':null}));}if(_0x5e4ae8[_0x837e('0x48')][_0x57a439]){delete _0x5e4ae8[_0x837e('0x48')][_0x57a439];logger['error']('[%s][voiceQueueReport][checkQueueReport]',_0x57a439,util[_0x837e('0x47')](_0x55661c,{'showHidden':![],'depth':null}));}if(_0x5e4ae8[_0x837e('0x49')][_0x57a439]){delete _0x5e4ae8[_0x837e('0x49')][_0x57a439];logger['error'](_0x837e('0x4a'),_0x57a439,util[_0x837e('0x47')](_0x55661c,{'showHidden':![],'depth':null}));}},0x1f40);}});}});}}};VoiceQueueReport[_0x837e('0xd')][_0x837e('0x4b')]=function(){logger['error'](_0x837e('0x4c'));clearChannels(this[_0x837e('0x14')]);this[_0x837e('0x4d')](this[_0x837e('0x48')]);clearAgentBooked(this[_0x837e('0x13')]);clearVoiceQueues(this['voiceQueues']);clearCampaigns(this[_0x837e('0x17')]);this[_0x837e('0x4e')]=initializeSummary();};VoiceQueueReport[_0x837e('0xd')]['clearQueueReport']=function(_0x21eff3){var _0x4b1d3a=this;if(!_[_0x837e('0x34')](_0x21eff3)){for(var _0x420514 in _0x21eff3){if(_0x21eff3[_0x837e('0x35')](_0x420514)){_0x4b1d3a[_0x837e('0x4f')](_0x21eff3[_0x420514],_0x837e('0x50'));delete _0x21eff3[_0x420514];}}}};VoiceQueueReport['prototype'][_0x837e('0x51')]=function(_0x505eff,_0x59b0d2,_0x358b83){io['to'](_0x505eff)[_0x837e('0x51')](_0x59b0d2,_0x358b83);};VoiceQueueReport[_0x837e('0xd')]['emitVoiceQueueChannelSave']=function(_0x4d7a89,_0x20d310){logger[_0x837e('0x52')](_0x837e('0x53')+_0x20d310+']\x20sending\x20voice_queue_channel:save\x20event:',_0x4d7a89[_0x837e('0x54')],util[_0x837e('0x47')](_0x4d7a89,{'showHidden':![],'depth':null}));this[_0x837e('0x51')](util[_0x837e('0x55')](_0x837e('0x56'),_0x4d7a89[_0x837e('0x57')]),_0x837e('0x58'),_0x4d7a89);io[_0x837e('0x51')]('voice_queue_presence:save',_0x4d7a89);};VoiceQueueReport[_0x837e('0xd')][_0x837e('0x4f')]=function(_0x3e8848,_0xd21860){logger[_0x837e('0x52')](_0x837e('0x53')+_0xd21860+_0x837e('0x59'),_0x3e8848[_0x837e('0x54')],util['inspect'](_0x3e8848,{'showHidden':![],'depth':null}));if(_0x3e8848['queuecallerexitreason']==='ATTENDEDTRANSFER'){return;}this['emit'](util['format']('voice:queue:%s',_0x3e8848[_0x837e('0x57')]),_0x837e('0x5a'),_0x3e8848);io[_0x837e('0x51')]('voice_queue_presence:remove',_0x3e8848);};VoiceQueueReport['prototype'][_0x837e('0x5b')]=function(_0x1035f5){if(_0x1035f5[_0x837e('0x5c')]===_0x837e('0x5d')){logger['debug'](_0x837e('0x5e'),util[_0x837e('0x47')](_0x1035f5,{'showHidden':![],'depth':null}));this[_0x837e('0x51')](util[_0x837e('0x55')](_0x837e('0x56'),_0x1035f5['name']),_0x837e('0x5f'),_0x1035f5);}};VoiceQueueReport[_0x837e('0xd')][_0x837e('0x60')]=function(_0x441fb6){return _0x441fb6!==null&&!_[_0x837e('0x61')](_0x441fb6);};VoiceQueueReport[_0x837e('0xd')][_0x837e('0x33')]=function(){var _0x4bc992=this;setInterval(function(){_0x4bc992[_0x837e('0x3d')]();ami[_0x837e('0x40')]({'action':'queues'})[_0x837e('0x42')](function(_0x1a7704){logger[_0x837e('0x45')](_0x837e('0x62'),util[_0x837e('0x47')](_0x1a7704,{'showHidden':![],'depth':null}));});},0x2710);};VoiceQueueReport[_0x837e('0xd')][_0x837e('0x32')]=function(){var _0x330501=this;setInterval(function(){if(!_0x330501[_0x837e('0x4e')][_0x837e('0x63')]){return ami['Action']({'action':'queuesummary'})[_0x837e('0x64')](function(_0x5179c6){_0x330501[_0x837e('0x4e')]['id']=_0x5179c6[_0x837e('0x65')];_0x330501[_0x837e('0x4e')][_0x837e('0x63')]=!![];_0x330501[_0x837e('0x4e')]['queuestatus'][_0x5179c6[_0x837e('0x65')]]={};})['catch'](function(_0x25ab86){logger[_0x837e('0x45')](_0x837e('0x66'),util[_0x837e('0x47')](_0x25ab86,{'showHidden':![],'depth':null}));});}},0x3e8);};VoiceQueueReport[_0x837e('0xd')][_0x837e('0x67')]=function(_0x20cf8a,_0x4bef50){var _0x3e23f8;if(this[_0x837e('0x4e')]&&this['summary'][_0x837e('0x68')]&&this[_0x837e('0x4e')][_0x837e('0x68')][_0x20cf8a['name']]){_0x3e23f8=this[_0x837e('0x4e')][_0x837e('0x68')][_0x20cf8a[_0x837e('0x69')]][_0x837e('0x6a')];}var _0x376160=new VoiceQueueSummary(_0x20cf8a);return _0x376160[_0x837e('0x6b')](_0x4bef50[_0x837e('0x13')],this[_0x837e('0x13')],_0x3e23f8,this[_0x837e('0x12')]['channels']);};VoiceQueueReport['prototype']['handleInboundQueueSummaryReport']=function(_0x40640a,_0x2ad676){var _0xccd6f8=this[_0x837e('0x67')](_0x40640a,_0x2ad676);var _0x3398f5=![];_0x3398f5=_0xccd6f8[_0x837e('0x6c')](_0x40640a);if(_0x3398f5){Object[_0x837e('0x6d')](_0x40640a,_0xccd6f8);this[_0x837e('0x12')][_0x837e('0x16')][_0x40640a[_0x837e('0x69')]]=_0x40640a;this[_0x837e('0x5b')](_0xccd6f8);}};VoiceQueueReport[_0x837e('0xd')][_0x837e('0x20')]=function(_0x1e9152){var _0x2b1589=null;var _0x46bd02=this['summary']['id'];if(this[_0x837e('0x4e')][_0x837e('0x6e')][_0x46bd02]){_0x2b1589=this[_0x837e('0x4e')][_0x837e('0x6e')][_0x46bd02][_0x1e9152[_0x837e('0x65')]];}if(!_0x2b1589){this[_0x837e('0x4e')]=initializeSummary();return;}var _0x4ff4a3=this[_0x837e('0x16')][_0x2b1589[_0x837e('0x57')]];if(_0x4ff4a3[_0x837e('0x5c')]===_0x837e('0x5d')){this[_0x837e('0x6f')](_0x4ff4a3,_0x2b1589);}else if(_0x4ff4a3[_0x837e('0x5c')]===_0x837e('0x70')){var _0x53023f=this['createQueueSummaryReport'](_0x4ff4a3,_0x2b1589);ami[_0x837e('0x51')]('custom:queuesummary',_0x53023f);}this[_0x837e('0x4e')][_0x837e('0x71')]-=0x1;var _0x18f30f=this[_0x837e('0x4e')][_0x837e('0x71')]>0x0?!![]:![];if(!_0x18f30f){return this[_0x837e('0x1c')](this[_0x837e('0x4e')][_0x837e('0x72')]);}};VoiceQueueReport['prototype'][_0x837e('0x1e')]=function(_0x515135){var _0x21a05e=this[_0x837e('0x4e')]['id'];if(this[_0x837e('0x4e')][_0x837e('0x6e')][_0x21a05e]&&this[_0x837e('0x4e')]['queuestatus'][_0x21a05e][_0x515135[_0x837e('0x65')]]){this[_0x837e('0x4e')][_0x837e('0x6e')][_0x21a05e][_0x515135['actionid']][_0x837e('0x13')][_0x837e('0x73')](_0x515135);}};VoiceQueueReport['prototype']['syncQueueSummary']=function(_0x52607e){var _0x2fe527=this;try{if(this[_0x837e('0x60')](_0x52607e)&&this[_0x837e('0x60')](_0x52607e[_0x837e('0x57')])){logger[_0x837e('0x52')]('[voiceQueueReport][queuesummary]\x20event:',util[_0x837e('0x47')](_0x52607e,{'showHidden':![],'depth':null}));var _0x2260f6=this[_0x837e('0x16')][_0x52607e[_0x837e('0x57')]];if(_0x2260f6){logger['debug']('[voiceQueueReport][queuesummary]\x20name:%s',_0x2260f6[_0x837e('0x69')]);this[_0x837e('0x4e')][_0x837e('0x68')][_0x2260f6[_0x837e('0x69')]]={'summaryEvent':_0x52607e};this['summary']['statusRequests']+=0x1;return ami[_0x837e('0x40')]({'action':_0x837e('0x6e'),'queue':_0x2260f6[_0x837e('0x69')]})[_0x837e('0x64')](function(_0x323a85){if(!_0x2fe527[_0x837e('0x4e')][_0x837e('0x6e')][_0x52607e[_0x837e('0x65')]]){_0x2fe527[_0x837e('0x4e')][_0x837e('0x6e')][_0x52607e[_0x837e('0x65')]]={};}_0x2fe527['summary']['queuestatus'][_0x52607e['actionid']][_0x323a85['actionid']]={'queue':_0x2260f6[_0x837e('0x69')],'agents':[]};})['catch'](function(_0x5ce46d){throw _0x5ce46d;});}}}catch(_0x2f47ca){logger[_0x837e('0x45')](_0x837e('0x66'),util[_0x837e('0x47')](_0x2f47ca,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x837e('0xd')][_0x837e('0x1c')]=function(_0x159e60){if(this[_0x837e('0x4e')][_0x837e('0x71')]>0x0){this[_0x837e('0x4e')][_0x837e('0x72')]=_0x159e60;return;}logger[_0x837e('0x52')]('[voiceQueueReport][queuesummarycomplete]\x20event:',util[_0x837e('0x47')](_0x159e60,{'showHidden':![],'depth':null}));this[_0x837e('0x4e')]=initializeSummary();ami[_0x837e('0x51')](_0x837e('0x74'),{});};VoiceQueueReport[_0x837e('0xd')][_0x837e('0x75')]=function(_0x5681da){try{if(this['isNotNull'](_0x5681da)){logger[_0x837e('0x52')](_0x837e('0x76'),_0x5681da[_0x837e('0x54')],util[_0x837e('0x47')](_0x5681da,{'showHidden':![],'depth':null}));if(_[_0x837e('0x61')](this[_0x837e('0x48')][_0x5681da['uniqueid']])){this[_0x837e('0x48')][_0x5681da[_0x837e('0x54')]]=[];}if(_['isUndefined'](this['channels'][_0x5681da[_0x837e('0x54')]])){this[_0x837e('0x14')][_0x5681da[_0x837e('0x54')]]={};}var _0x23e21a=new QueueReport();_0x23e21a['queue']=_0x5681da[_0x837e('0x57')];_0x23e21a[_0x837e('0x5c')]=this[_0x837e('0x16')][_0x23e21a[_0x837e('0x57')]]&&this[_0x837e('0x16')][_0x23e21a['queue']]['type']?this['voiceQueues'][_0x23e21a[_0x837e('0x57')]][_0x837e('0x5c')]||_0x837e('0x5d'):_0x837e('0x5d');_0x23e21a['queuecallerjoinAt']=moment()['format'](_0x837e('0x77'));_0x23e21a[_0x837e('0x78')]=_0x5681da[_0x837e('0x78')];_0x23e21a[_0x837e('0x79')]=_0x5681da[_0x837e('0x79')];_0x23e21a[_0x837e('0x54')]=_0x5681da[_0x837e('0x54')];_0x23e21a['routealias']=this['channels'][_0x5681da[_0x837e('0x54')]][_0x837e('0x7a')];logger[_0x837e('0x7b')](_0x837e('0x7c'),_0x23e21a[_0x837e('0x57')],_0x23e21a[_0x837e('0x5c')]);Object[_0x837e('0x6d')](_0x23e21a,_['pick'](_0x5681da,_[_0x837e('0x7d')](_0x23e21a)));this[_0x837e('0x48')][_0x5681da[_0x837e('0x54')]][_0x837e('0x73')](_0x23e21a);this[_0x837e('0x14')][_0x5681da[_0x837e('0x54')]]=_0x23e21a;this[_0x837e('0x7e')](_0x23e21a,_0x837e('0x21'));}}catch(_0x19caa8){logger['error'](_0x837e('0x76'),_0x5681da[_0x837e('0x54')],util[_0x837e('0x47')](_0x19caa8,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x837e('0xd')][_0x837e('0x23')]=function(_0x366067){try{if(this[_0x837e('0x60')](_0x366067)){logger['debug'](_0x837e('0x7f'),_0x366067[_0x837e('0x54')],util[_0x837e('0x47')](_0x366067,{'showHidden':![],'depth':null}));if(this[_0x837e('0x48')][_0x366067['uniqueid']]){var _0x5193a8=_[_0x837e('0x80')](this['queueReports'][_0x366067[_0x837e('0x54')]]);_0x5193a8[_0x837e('0x3c')]=![];_0x5193a8[_0x837e('0x81')]=null;_0x5193a8[_0x837e('0x82')]=_0x366067[_0x837e('0x82')];_0x5193a8[_0x837e('0x83')]=_0x366067[_0x837e('0x83')];_0x5193a8[_0x837e('0x22')]=!![];_0x5193a8['queuecallerabandonAt']=moment()[_0x837e('0x55')](_0x837e('0x77'));_0x5193a8[_0x837e('0x84')]='ABANDONED';_0x5193a8['lastAssignedTo']=null;logger[_0x837e('0x7b')]('[voiceQueueReport][queuecallerabandon]\x20name:%s\x20type:%s',_0x5193a8[_0x837e('0x57')],_0x5193a8['type']);this[_0x837e('0x14')][_0x366067['uniqueid']]=_0x5193a8;this[_0x837e('0x4f')](_0x5193a8,_0x837e('0x22'));}}}catch(_0x47cac9){logger['error'](_0x837e('0x7f'),_0x366067[_0x837e('0x54')],util[_0x837e('0x47')](_0x47cac9,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x837e('0xd')]['syncQueueCallerLeave']=function(_0x454e4c){try{if(this[_0x837e('0x60')](_0x454e4c)){logger[_0x837e('0x52')](_0x837e('0x85'),_0x454e4c[_0x837e('0x54')],util['inspect'](_0x454e4c,{'showHidden':![],'depth':null}));if(this[_0x837e('0x48')][_0x454e4c[_0x837e('0x54')]]){var _0x581195=_[_0x837e('0x80')](this[_0x837e('0x48')][_0x454e4c[_0x837e('0x54')]]);_0x581195['queuecallerleaveAt']=moment()[_0x837e('0x55')]('YYYY-MM-DD\x20HH:mm:ss');_0x581195[_0x837e('0x86')]=_0x454e4c['connectedlinenum'];_0x581195[_0x837e('0x87')]=_0x454e4c[_0x837e('0x87')];logger[_0x837e('0x7b')]('[voiceQueueReport][queuecallerleave]\x20name:%s\x20type:%s\x20connectedlinenum:%s\x20connectedlinename:%s',_0x581195[_0x837e('0x57')],_0x581195[_0x837e('0x5c')],_0x454e4c[_0x837e('0x86')],_0x454e4c[_0x837e('0x87')]);this[_0x837e('0x14')][_0x454e4c[_0x837e('0x54')]]=_0x581195;this[_0x837e('0x7e')](_0x581195,_0x837e('0x24'));}}}catch(_0x1a36b2){logger[_0x837e('0x45')](_0x837e('0x85'),_0x454e4c['uniqueid'],util[_0x837e('0x47')](_0x1a36b2,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x837e('0xd')][_0x837e('0x27')]=function(_0x55cbb3){try{if(this['isNotNull'](_0x55cbb3)){logger['debug'](_0x837e('0x88'),_0x55cbb3['uniqueid'],util[_0x837e('0x47')](_0x55cbb3,{'showHidden':![],'depth':null}));if(this[_0x837e('0x48')][_0x55cbb3[_0x837e('0x54')]]){var _0x12c8b4=_['last'](this[_0x837e('0x48')][_0x55cbb3[_0x837e('0x54')]]);_0x12c8b4['queuecallercomplete']=!![];_0x12c8b4[_0x837e('0x84')]=_0x837e('0x89');logger['info'](_0x837e('0x8a'),_0x12c8b4[_0x837e('0x57')],_0x12c8b4[_0x837e('0x5c')]);}}}catch(_0x346be9){logger[_0x837e('0x45')]('[%s][voiceQueueReport][agentconnect]',_0x55cbb3[_0x837e('0x54')],util['inspect'](_0x346be9,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x837e('0xd')][_0x837e('0x26')]=function(_0x2a3610){try{if(this[_0x837e('0x60')](_0x2a3610)){logger[_0x837e('0x52')]('[%s][voiceQueueReport][agentcomplete]',_0x2a3610[_0x837e('0x54')],util[_0x837e('0x47')](_0x2a3610,{'showHidden':![],'depth':null}));if(this[_0x837e('0x48')][_0x2a3610['uniqueid']]){var _0xbc6a21=_[_0x837e('0x80')](this['queueReports'][_0x2a3610['uniqueid']]);_0xbc6a21['queuecallerabandon']=![];_0xbc6a21[_0x837e('0x8b')]=null;_0xbc6a21[_0x837e('0x8c')]=!![];_0xbc6a21['lastAssignedTo']=_0x2a3610[_0x837e('0x8d')];_0xbc6a21['holdtime']=_0x2a3610[_0x837e('0x82')];_0xbc6a21[_0x837e('0x3c')]=!![];_0xbc6a21[_0x837e('0x3b')]=![];_0xbc6a21[_0x837e('0x8e')]=null;if(!_0xbc6a21[_0x837e('0x8f')]){if(_0x2a3610[_0x837e('0x90')]==_0x837e('0x8f')){_0xbc6a21[_0x837e('0x84')]=_0x837e('0x91');logger['info'](_0x837e('0x92'),_0xbc6a21[_0x837e('0x57')],_0xbc6a21['type']);}else{if(_[_0x837e('0x93')](_0x2a3610[_0x837e('0x94')][_0x837e('0x95')](),_0x837e('0x96'))){if(this['queueReports'][_0x2a3610[_0x837e('0x97')]]){var _0x3aecf5=_[_0x837e('0x80')](this[_0x837e('0x48')][_0x2a3610[_0x837e('0x97')]]);_0x3aecf5[_0x837e('0x3c')]=![];_0x3aecf5['queuecallerexit']=!![];_0x3aecf5[_0x837e('0x8e')]=moment(_0xbc6a21['queuecallerjoinAt'])['add'](_0x2a3610[_0x837e('0x82')],'seconds')['format'](_0x837e('0x77'));_0x3aecf5[_0x837e('0x84')]=_0x837e('0x98');_0x3aecf5[_0x837e('0x8f')]=!![];_0x3aecf5[_0x837e('0x99')]='FORWARD';_0x3aecf5[_0x837e('0x9a')]=_0x2a3610['destexten'];_0x3aecf5[_0x837e('0x9b')]=_0x2a3610[_0x837e('0x54')];logger[_0x837e('0x7b')](_0x837e('0x9c'),_0x3aecf5[_0x837e('0x57')],_0x3aecf5['type']);var _0x9f3ebf=this[_0x837e('0x48')][_0x2a3610[_0x837e('0x97')]];this[_0x837e('0x48')][_0x2a3610[_0x837e('0x97')]]=this['queueReports'][_0x2a3610[_0x837e('0x54')]];this['queueReports'][_0x2a3610['uniqueid']]=_0x9f3ebf;}}else{_0xbc6a21[_0x837e('0x84')]=_0x837e('0x9d')+_0x2a3610['reason'][_0x837e('0x9e')]();logger[_0x837e('0x7b')](_0x837e('0x9f'),_0xbc6a21[_0x837e('0x57')],_0xbc6a21[_0x837e('0x5c')],_0xbc6a21[_0x837e('0x84')]);}}}this['channels'][_0x2a3610[_0x837e('0x54')]]=_0xbc6a21;}}}catch(_0x3526c0){logger[_0x837e('0x45')](_0x837e('0xa0'),_0x2a3610['uniqueid'],util['inspect'](_0x3526c0,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x837e('0xd')]['syncVarSet']=function(_0x4320ea){try{if(this[_0x837e('0x60')](_0x4320ea)){logger[_0x837e('0x52')]('[%s][voiceQueueReport][varset]',_0x4320ea[_0x837e('0x54')],util[_0x837e('0x47')](_0x4320ea,{'showHidden':![],'depth':null}));this[_0x837e('0xa1')](_0x4320ea[_0x837e('0x54')],_['keys'](_0x4320ea['variable'])[0x0],_0x4320ea[_0x837e('0xa2')]);if(this[_0x837e('0x48')][_0x4320ea[_0x837e('0x54')]]){var _0x1557e5=_[_0x837e('0x80')](this[_0x837e('0x48')][_0x4320ea[_0x837e('0x54')]]);if(_0x1557e5){if(this[_0x837e('0x60')](_0x4320ea[_0x837e('0xa3')])&&this[_0x837e('0x60')](_0x4320ea[_0x837e('0xa3')][_0x837e('0x6e')])){switch(_0x4320ea[_0x837e('0xa2')]){case'CONTINUE':_0x1557e5[_0x837e('0x3b')]=![];_0x1557e5['queuecallerexitAt']=null;break;case _0x837e('0xa4'):_0x1557e5[_0x837e('0xa5')]='timeout';_0x1557e5['queuecallerexit']=!![];_0x1557e5[_0x837e('0x8e')]=moment()[_0x837e('0x55')](_0x837e('0x77'));_0x1557e5[_0x837e('0xa6')]=moment()['format'](_0x837e('0x77'));logger[_0x837e('0x52')](_0x837e('0xa7'),_0x4320ea[_0x837e('0x54')],util['inspect'](_0x1557e5,{'showHidden':![],'depth':null}));ami['emit'](_0x837e('0xa8'),_0x1557e5);break;default:_0x1557e5[_0x837e('0x3b')]=!![];_0x1557e5[_0x837e('0x8e')]=moment()[_0x837e('0x55')](_0x837e('0x77'));_0x1557e5[_0x837e('0xa6')]=moment()[_0x837e('0x55')](_0x837e('0x77'));}_0x1557e5[_0x837e('0x22')]=![];_0x1557e5[_0x837e('0x8b')]=null;_0x1557e5['queuecallerexitreason']=_0x4320ea[_0x837e('0xa2')];this['channels'][_0x4320ea[_0x837e('0x54')]]=_0x1557e5;this[_0x837e('0x4f')](_0x1557e5,_0x837e('0x28'));}else if(this[_0x837e('0x60')](_0x4320ea[_0x837e('0xa3')])&&this['isNotNull'](_0x4320ea[_0x837e('0xa3')]['queueposition'])){if(!_0x1557e5[_0x837e('0x22')]){_0x1557e5[_0x837e('0x3b')]=!![];_0x1557e5[_0x837e('0x8e')]=moment()[_0x837e('0x55')](_0x837e('0x77'));_0x1557e5[_0x837e('0x84')]=_0x837e('0xa9');_0x1557e5[_0x837e('0xa6')]=moment()['format'](_0x837e('0x77'));this[_0x837e('0x14')][_0x4320ea[_0x837e('0x54')]]=_0x1557e5;}}logger[_0x837e('0x7b')]('[%s][voiceQueueReport][varset]\x20name:%s\x20type:%s\x20variable:%s\x20value:%s',_0x4320ea[_0x837e('0x54')],_0x1557e5['queue'],_0x1557e5['type'],_[_0x837e('0x7d')](_0x4320ea[_0x837e('0xa3')])[0x0],_0x4320ea[_0x837e('0xa2')]);_0x1557e5[_0x837e('0x49')]=this['variables'][_0x4320ea[_0x837e('0x54')]];}}}}catch(_0x1378dc){logger[_0x837e('0x45')]('[%s][voiceQueueReport][varset]',_0x4320ea['uniqueid'],util['inspect'](_0x1378dc,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x837e('0xd')][_0x837e('0xa1')]=function(_0x54d99c,_0x3eb520,_0x236d65){var _0x3088c3=[_0x837e('0xaa'),_0x837e('0xab'),_0x837e('0xac'),_0x837e('0xad'),_0x837e('0xae'),_0x837e('0xaf'),_0x837e('0xb0'),_0x837e('0xb1'),_0x837e('0xb2'),_0x837e('0xb3'),_0x837e('0xb4'),_0x837e('0xb5'),_0x837e('0xb6'),_0x837e('0xb7'),_0x837e('0xb8'),_0x837e('0xb9'),_0x837e('0x8d'),_0x837e('0xba'),_0x837e('0xbb')];if(!_[_0x837e('0x3f')](_0x3eb520)&&!_[_0x837e('0xbc')](_0x3088c3,_0x3eb520)){if(_['isUndefined'](this[_0x837e('0x49')][_0x54d99c])){this[_0x837e('0x49')][_0x54d99c]={};}this[_0x837e('0x49')][_0x54d99c][_0x3eb520]=_0x236d65;}};VoiceQueueReport[_0x837e('0xd')]['handleHangup']=function(_0x46a44b,_0x465cbf,_0x1fbbf8){try{var _0xadc5e2={};if(this[_0x837e('0x48')][_0x46a44b]){for(var _0x2a89f5=0x0;_0x2a89f5<this[_0x837e('0x48')][_0x46a44b][_0x837e('0xbd')];_0x2a89f5+=0x1){_0xadc5e2=this[_0x837e('0x48')][_0x46a44b][_0x2a89f5];var _0x1d0c8e=this[_0x837e('0x16')][_0xadc5e2[_0x837e('0x57')]];if(_0x1d0c8e){_0x1d0c8e[_0x837e('0xbe')]+=moment(_0xadc5e2[_0x837e('0xa6')])['diff'](_0xadc5e2[_0x837e('0xbf')],_0x837e('0xc0'))||0x0;if(_0x1fbbf8&&_0xadc5e2[_0x837e('0x84')]===_0x837e('0xc1')){_0xadc5e2['queuecallerexitreason']=_0x837e('0x89');}if(_0x2a89f5===this[_0x837e('0x48')][_0x46a44b][_0x837e('0xbd')]-0x1){_0x1d0c8e[_0x837e('0xc2')]+=moment()[_0x837e('0xc3')](0x0)[_0x837e('0xc4')](_0xadc5e2[_0x837e('0xbf')],_0x837e('0xc0'));if(hasCallerLeftTheQueue(_0xadc5e2)&&_0xadc5e2['queuecallerexitreason']!=='ATTENDEDTRANSFER'){_0x1d0c8e['total']+=0x1;}if(_0xadc5e2[_0x837e('0x3c')]){_0x1d0c8e['answered']+=0x1;_0x1d0c8e[_0x837e('0xc5')]+=moment()[_0x837e('0xc3')](0x0)['diff'](_0xadc5e2[_0x837e('0xa6')],_0x837e('0xc0'));_0xadc5e2[_0x837e('0x81')]=moment()[_0x837e('0x55')](_0x837e('0x77'));_0xadc5e2[_0x837e('0x3b')]=![];_0xadc5e2['queuecallerexitAt']=null;}if(_0xadc5e2[_0x837e('0x3b')]&&_0xadc5e2[_0x837e('0x8f')]!=!![]){_0x1d0c8e[_0x837e('0xc6')]+=0x1;_0xadc5e2['lastevent']=_0x837e('0xc6');logger[_0x837e('0x52')]('[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerunmanaged\x20event:',_0x46a44b,util[_0x837e('0x47')](_0xadc5e2,{'showHidden':![],'depth':null}));ami[_0x837e('0x51')](_0x837e('0xc7'),_0xadc5e2);}if(_0xadc5e2[_0x837e('0x22')]){_0x1d0c8e['abandoned']+=0x1;_0xadc5e2['lastevent']=_0x837e('0xc8');logger[_0x837e('0x52')](_0x837e('0xc9'),_0x46a44b,util[_0x837e('0x47')](_0xadc5e2,{'showHidden':![],'depth':null}));ami[_0x837e('0x51')](_0x837e('0xca'),_0xadc5e2);}}else{_0x1d0c8e['sumDuration']+=_0x1d0c8e[_0x837e('0xbe')];}logger[_0x837e('0x7b')]('[%s][voiceQueueReport][hangup]\x20name:%s\x20type:%s\x20reason:%s',_0x46a44b,_0xadc5e2[_0x837e('0x57')],_0xadc5e2[_0x837e('0x5c')],_0x465cbf);this['channels'][_0x46a44b]=_0xadc5e2;Object[_0x837e('0x6d')](this[_0x837e('0x16')][_0xadc5e2['queue']],_0x1d0c8e);if(_0xadc5e2[_0x837e('0xa6')]){this['emitVoiceQueueChannelRemove'](_0xadc5e2,'hangup');}}}logger[_0x837e('0x52')](_0x837e('0xcb'),_0x46a44b,util['inspect'](this['queueReports'][_0x46a44b],{'showHidden':![],'depth':null}));if(hasCallerLeftTheQueue(_0xadc5e2)&&_0xadc5e2[_0x837e('0x84')]!=='ATTENDEDTRANSFER'){ami[_0x837e('0x51')](_0x837e('0xcc'),this[_0x837e('0x48')][_0x46a44b]);if(this[_0x837e('0x48')][_0x46a44b]){delete this[_0x837e('0x48')][_0x46a44b];}if(this['channels'][_0x46a44b]){delete this[_0x837e('0x14')][_0x46a44b];}if(this[_0x837e('0x49')][_0x46a44b]){delete this[_0x837e('0x49')][_0x46a44b];}}}}catch(_0x2efa09){logger[_0x837e('0x45')](_0x837e('0xcd'),_0x46a44b,util['inspect'](_0x2efa09,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x837e('0x2a')]=function(_0x1487bd){try{if(this[_0x837e('0x60')](_0x1487bd)){logger[_0x837e('0x52')](_0x837e('0xce'),_0x1487bd[_0x837e('0x54')],util[_0x837e('0x47')](_0x1487bd,{'showHidden':![],'depth':null}));if(this[_0x837e('0x48')][_0x1487bd[_0x837e('0x54')]]){return this[_0x837e('0xcf')](_0x1487bd[_0x837e('0x54')],_0x1487bd[_0x837e('0xd0')],![]);}if(this[_0x837e('0x48')][_0x1487bd[_0x837e('0x97')]]){if(_0x1487bd['cause']==='21'){return;}return this[_0x837e('0xcf')](_0x1487bd['linkedid'],_0x1487bd['cause-txt'],!![]);}var _0x11d47f=Object[_0x837e('0x7d')](this[_0x837e('0x48')]);for(var _0x4a49ef=0x0;_0x4a49ef<_0x11d47f[_0x837e('0xbd')];_0x4a49ef++){var _0x240398=_[_0x837e('0x80')](this[_0x837e('0x48')][_0x11d47f[_0x4a49ef]]);if(_0x240398&&_0x240398[_0x837e('0xd1')]===_0x1487bd[_0x837e('0x54')]){return this[_0x837e('0xcf')](_0x240398['uniqueid'],_0x1487bd[_0x837e('0xd0')],!![]);}}if(!this[_0x837e('0x48')][_0x1487bd['uniqueid']]){logger['debug'](_0x837e('0xd2'),_0x1487bd[_0x837e('0x54')]);if(this[_0x837e('0x14')][_0x1487bd[_0x837e('0x54')]]){delete this[_0x837e('0x14')][_0x1487bd[_0x837e('0x54')]];}if(this[_0x837e('0x49')][_0x1487bd['uniqueid']]){delete this['variables'][_0x1487bd[_0x837e('0x54')]];}}}}catch(_0xd2dc26){logger[_0x837e('0x45')](_0x837e('0xce'),_0x1487bd[_0x837e('0x54')],util[_0x837e('0x47')](_0xd2dc26,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype']['syncAttendedTransfer']=function(_0x4611c){try{if(this[_0x837e('0x60')](_0x4611c)){logger[_0x837e('0x52')]('[%s][voiceQueueReport][attendedtransfer]',_0x4611c[_0x837e('0x54')],util[_0x837e('0x47')](_0x4611c,{'showHidden':![],'depth':null}));var _0x5b276b;var _0x52b9a4;var _0x1c5618;if(this[_0x837e('0x48')][_0x4611c['transfereeuniqueid']]){_0x5b276b=_['last'](this['queueReports'][_0x4611c[_0x837e('0xd3')]]);_0x5b276b[_0x837e('0x9a')]=_0x4611c[_0x837e('0xd4')];_0x5b276b['transferuniqueid']=_0x4611c['secondtransfereruniqueid'];_0x5b276b[_0x837e('0x84')]=_0x837e('0xc1');_0x5b276b[_0x837e('0x8f')]=!![];_0x5b276b[_0x837e('0x99')]=_0x837e('0xd5');if(this[_0x837e('0x48')][_0x4611c[_0x837e('0xd6')]]){_0x1c5618=this[_0x837e('0x48')][_0x4611c[_0x837e('0xd6')]];this[_0x837e('0x48')][_0x4611c[_0x837e('0xd6')]]=this[_0x837e('0x48')][_0x4611c[_0x837e('0xd3')]];this[_0x837e('0x48')][_0x4611c['transfereeuniqueid']]=_0x1c5618;_0x52b9a4=_[_0x837e('0x80')](this[_0x837e('0x48')][_0x4611c[_0x837e('0xd3')]]);_0x52b9a4['switch']=!![];}logger['info'](_0x837e('0xd7'),_0x4611c['uniqueid'],_0x5b276b[_0x837e('0x57')],_0x5b276b[_0x837e('0x5c')],_0x5b276b[_0x837e('0x9a')],_0x5b276b[_0x837e('0x9b')]);}else if(this['queueReports'][_0x4611c[_0x837e('0xd8')]]){_0x5b276b=_[_0x837e('0x80')](this[_0x837e('0x48')][_0x4611c[_0x837e('0xd8')]]);_0x5b276b[_0x837e('0x9a')]=_0x4611c[_0x837e('0xd9')];_0x5b276b[_0x837e('0x9b')]=_0x4611c['origtransfereruniqueid'];_0x5b276b[_0x837e('0x84')]=_0x837e('0xc1');_0x5b276b['transfer']=!![];_0x5b276b['transfertype']=_0x837e('0xd5');if(this[_0x837e('0x48')][_0x4611c[_0x837e('0xda')]]){_0x1c5618=this[_0x837e('0x48')][_0x4611c[_0x837e('0xda')]];this['queueReports'][_0x4611c[_0x837e('0xda')]]=this[_0x837e('0x48')][_0x4611c[_0x837e('0xd8')]];this[_0x837e('0x48')][_0x4611c[_0x837e('0xd8')]]=_0x1c5618;_0x52b9a4=_[_0x837e('0x80')](this['queueReports'][_0x4611c[_0x837e('0xd8')]]);_0x52b9a4['switch']=!![];}logger[_0x837e('0x7b')](_0x837e('0xd7'),_0x4611c['uniqueid'],_0x5b276b[_0x837e('0x57')],_0x5b276b[_0x837e('0x5c')],_0x5b276b['transferexten'],_0x5b276b[_0x837e('0x9b')]);}else if(this['queueReports'][_0x4611c[_0x837e('0xda')]]){_0x5b276b=_[_0x837e('0x80')](this['queueReports'][_0x4611c[_0x837e('0xda')]]);_0x5b276b[_0x837e('0x9a')]=_0x4611c['origtransfererexten'];_0x5b276b[_0x837e('0x9b')]=_0x4611c[_0x837e('0xda')];_0x5b276b[_0x837e('0x84')]=_0x837e('0xc1');_0x5b276b[_0x837e('0x8f')]=!![];_0x5b276b[_0x837e('0x99')]=_0x837e('0xd5');_0x5b276b[_0x837e('0x3e')]=!![];_0x5b276b[_0x837e('0xd1')]=_0x4611c[_0x837e('0xd3')];}else if(this['queueReports'][_0x4611c[_0x837e('0xd6')]]){_0x5b276b=_[_0x837e('0x80')](this['queueReports'][_0x4611c[_0x837e('0xd6')]]);_0x5b276b[_0x837e('0x9a')]=_0x4611c[_0x837e('0xd4')];_0x5b276b[_0x837e('0x9b')]=_0x4611c[_0x837e('0xd6')];_0x5b276b[_0x837e('0x84')]=_0x837e('0xc1');_0x5b276b[_0x837e('0x8f')]=!![];_0x5b276b[_0x837e('0x99')]='ATTENDED';_0x5b276b[_0x837e('0x3e')]=!![];_0x5b276b[_0x837e('0xd1')]=_0x4611c[_0x837e('0xd8')];}}}catch(_0x4ff638){logger['error'](_0x837e('0xdb'),_0x4611c[_0x837e('0x54')],util['inspect'](_0x4ff638,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x837e('0xd')][_0x837e('0x31')]=function(_0x59e739){try{if(this['isNotNull'](_0x59e739)){logger[_0x837e('0x52')]('[%s][voiceQueueReport][blindtransfer]',_0x59e739[_0x837e('0x54')],util[_0x837e('0x47')](_0x59e739,{'showHidden':![],'depth':null}));if(this[_0x837e('0x48')][_0x59e739[_0x837e('0xd3')]]){var _0x5ace91=_[_0x837e('0x80')](this['queueReports'][_0x59e739[_0x837e('0xd3')]]);_0x5ace91[_0x837e('0x84')]='BLINDTRANSFER';_0x5ace91[_0x837e('0x8f')]=!![];_0x5ace91[_0x837e('0x99')]=_0x837e('0xdc');_0x5ace91['transferexten']=_0x59e739[_0x837e('0xdd')];_0x5ace91[_0x837e('0x9b')]=_0x59e739['transfereeuniqueid'];logger[_0x837e('0x7b')](_0x837e('0xde'),_0x59e739[_0x837e('0x54')],_0x5ace91[_0x837e('0x57')],_0x5ace91[_0x837e('0x5c')],_0x5ace91[_0x837e('0x9a')],_0x5ace91[_0x837e('0x9b')]);this['syncHangup']({'event':'BlindTransfer','uniqueid':_0x59e739[_0x837e('0xd3')],'context':_0x59e739[_0x837e('0xdf')],'channel':_0x59e739[_0x837e('0xe0')]});}}}catch(_0x3403f3){logger[_0x837e('0x45')](_0x837e('0xe1'),_0x59e739[_0x837e('0x54')],util[_0x837e('0x47')](_0x3403f3,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x837e('0xe2')]=function(_0x3d90ad){try{if(this['isNotNull'](_0x3d90ad)){logger[_0x837e('0x52')](_0x837e('0xe3'),_0x3d90ad[_0x837e('0x54')],util[_0x837e('0x47')](_0x3d90ad,{'showHidden':![],'depth':null}));if(this[_0x837e('0x48')][_0x3d90ad[_0x837e('0x54')]]){var _0xef85b4=_['last'](this[_0x837e('0x48')][_0x3d90ad[_0x837e('0x54')]]);if(!_['isNil'](_0xef85b4['queuecallerleaveAt'])){_0xef85b4['mohstarttime']=moment()[_0x837e('0x55')](_0x837e('0x77'));logger[_0x837e('0x7b')]('[%s][voiceQueueReport][musiconholdstart]\x20mohstarttime:%s',_0x3d90ad[_0x837e('0x54')],_0xef85b4[_0x837e('0xe4')]);}}}}catch(_0x4726fd){logger[_0x837e('0x45')]('[%s][voiceQueueReport][musiconholdstart]',_0x3d90ad[_0x837e('0x54')],util[_0x837e('0x47')](_0x4726fd,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x837e('0x2d')]=function(_0x3e2009){try{if(this['isNotNull'](_0x3e2009)){logger['debug'](_0x837e('0xe5'),_0x3e2009[_0x837e('0x54')],util[_0x837e('0x47')](_0x3e2009,{'showHidden':![],'depth':null}));if(this[_0x837e('0x48')][_0x3e2009[_0x837e('0x54')]]){var _0x1321b7=_[_0x837e('0x80')](this[_0x837e('0x48')][_0x3e2009[_0x837e('0x54')]]);if(!_[_0x837e('0x3f')](_0x1321b7['mohstarttime'])){_0x1321b7[_0x837e('0xe6')]+=moment()[_0x837e('0xc3')](0x0)['diff'](_0x1321b7[_0x837e('0xe4')],_0x837e('0xc0'));logger[_0x837e('0x7b')](_0x837e('0xe7'),_0x3e2009[_0x837e('0x54')],_0x1321b7[_0x837e('0xe6')]);delete _0x1321b7[_0x837e('0xe4')];}}}}catch(_0x5adaec){logger[_0x837e('0x45')](_0x837e('0xe5'),_0x3e2009[_0x837e('0x54')],util[_0x837e('0x47')](_0x5adaec,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x837e('0xd')][_0x837e('0xe8')]=function(_0x15d6a4){try{if(this[_0x837e('0x60')](_0x15d6a4)){logger[_0x837e('0x52')]('[%s][voiceQueueReport][newexten]\x20event:',_0x15d6a4[_0x837e('0x54')],util['inspect'](_0x15d6a4,{'showHidden':![],'depth':null}));if(_0x15d6a4[_0x837e('0xe9')][_0x837e('0x95')]()==='set'){_0x15d6a4[_0x837e('0xea')]=_0x15d6a4[_0x837e('0xeb')]&&_0x15d6a4[_0x837e('0xeb')]['startsWith'](_0x837e('0xec'))?_0x15d6a4[_0x837e('0xeb')]:(_0x15d6a4['appdata']||_0x15d6a4[_0x837e('0xea')])['toLowerCase']();if(_[_0x837e('0x93')](_0x15d6a4[_0x837e('0xea')][_0x837e('0x95')](),_0x837e('0xed'))){logger[_0x837e('0x7b')](_0x837e('0xee'),_0x15d6a4[_0x837e('0x54')],_0x15d6a4['application'],_0x15d6a4[_0x837e('0xea')]);if(_[_0x837e('0x61')](this[_0x837e('0x14')][_0x15d6a4['uniqueid']]))this[_0x837e('0x14')][_0x15d6a4[_0x837e('0x54')]]={};var _0x154d1b=_0x15d6a4[_0x837e('0xea')][_0x837e('0xef')]('=');var _0x3d02f0=_0x154d1b[0x0][_0x837e('0x95')]()[_0x837e('0xf0')](/cdr\((.*)\)/);if(_0x3d02f0)this['channels'][_0x15d6a4[_0x837e('0x54')]][_0x3d02f0[0x1]]=_0x154d1b[0x1];}}}}catch(_0x396b78){logger[_0x837e('0x45')](_0x837e('0xf1'),_0x15d6a4[_0x837e('0x54')],util['inspect'](_0x396b78,{'showHidden':![],'depth':null}));}};module['exports']=VoiceQueueReport;
\ No newline at end of file
+var _0x3459=['unmanaged','[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerunmanaged\x20event:','custom:queuecallerunmanaged','abandoned','[%s][voiceQueueReport][hangup]\x20name:%s\x20type:%s\x20reason:%s','[%s][voiceQueueReport][hangup]\x20sending\x20voiceQueueReport\x20event:','custom:voiceQueueReport','[%s][voiceQueueReport][handleHangup]','[%s][voiceQueueReport][hangup]','cause-txt','cause','transferid','[%s][voiceQueueReport][syncHangup]\x20No\x20available\x20data\x20in\x20queueReports\x20structure:\x20clear\x20action\x20in\x20variablea\x20and\x20channels\x20structures\x20needed','[%s][voiceQueueReport][attendedtransfer]','transfereeuniqueid','secondtransfererexten','secondtransfereruniqueid','transfertype','ATTENDED','[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','transfertargetuniqueid','origtransfereruniqueid','origtransfererexten','[%s][voiceQueueReport][blindtransfer]','BLINDTRANSFER','BLIND','[%s][voiceQueueReport][blindTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','BlindTransfer','context','transfererchannel','[%s][voiceQueueReport][musiconholdstart]','[%s][voiceQueueReport][musiconholdstart]\x20mohstarttime:%s','mohstarttime','[%s][voiceQueueReport][musiconholdstop]','mohtime','[%s][voiceQueueReport][musiconholdstop]\x20mohtime:%s','syncNewExten','application','set','applicationdata','appdata','cdr(','[%s][voiceQueueReport][newexten]\x20application:%s\x20appdata:%s','split','match','[%s][voiceQueueReport][newexten]','lodash','util','ioredis','../../../config/environment','../../../config/logger','../ami','../model/queueReport','redis','defaults','socket.io-emitter','prototype','enqueue','tail','sequence','queueReports','realtime','agents','channels','campaigns','variables','queuesummary','syncQueueSummary','bind','syncQueueSummaryComplete','queuemember','syncQueueMember','queuestatuscomplete','syncQueueStatusComplete','queuecallerjoin','syncQueueCallerJoin','queuecallerabandon','syncQueueCallerAbandon','syncQueueCallerLeave','agentcomplete','syncAgentComplete','syncAgentConnect','varset','syncVarSet','hangup','syncHangup','fullybooted','syncFullyBooted','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','hasOwnProperty','isEmpty','originated','talking','pTalking','waiting','queueStatusComplete','queuecallercomplete','clearZombieChannels','switch','isNil','Action','catch','message','[%s][voiceQueueReport][checkChannel]','error','inspect','[FullyBooted]\x20clear\x20realtime','clearQueueReport','voiceQueues','summary','emit','debug','[%s][voiceQueueReport][',']\x20sending\x20voice_queue_channel:save\x20event:','format','voice:queue:%s','voice_queue_channel:save','voice_queue_presence:save','emitVoiceQueueChannelRemove',']\x20sending\x20voice_queue_channel:remove\x20event:','uniqueid','queuecallerexitreason','ATTENDEDTRANSFER','queue','voice_queue_channel:remove','voice_queue_presence:remove','emitInboundVoiceQueueSummary','type','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','name','voice_queue:save','isNotNull','queues','[voiceQueueReport][queues]','isRunning','then','actionid','queuestatus','[voiceQueueReport][queuesummary]','createQueueSummaryReport','createReport','handleInboundQueueSummaryReport','assign','inbound','custom:queuesummary','statusRequests','completeEvent','push','[voiceQueueReport][queuesummary]\x20event:','[voiceQueueReport][queuesummary]\x20name:%s','custom:queuesummarycomplete','[%s][voiceQueueReport][queuecallerjoin]','isUndefined','queuecallerjoinAt','YYYY-MM-DD\x20HH:mm:ss','position','count','routealias','info','[voiceQueueReport][queuecallerjoin]\x20name:%s\x20type:%s','pick','keys','last','queuecallercompleteAt','holdtime','originalposition','queuecallerabandonAt','ABANDONED','lastAssignedTo','[voiceQueueReport][queuecallerabandon]\x20name:%s\x20type:%s','[%s][voiceQueueReport][queuecallerabandon]','[%s][voiceQueueReport][queuecallerleave]','connectedlinenum','connectedlinename','[voiceQueueReport][queuecallerleave]\x20name:%s\x20type:%s\x20connectedlinenum:%s\x20connectedlinename:%s','emitVoiceQueueChannelSave','[%s][voiceQueueReport][agentconnect]','[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT','[%s][voiceQueueReport][agentcomplete]','assigned','membername','reason','transfer','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETED','startsWith','toLowerCase','local/','linkedid','queuecallerexit','add','FORWARDTRANSFER','FORWARD','transferexten','transferuniqueid','toUpperCase','[%s][voiceQueueReport][varset]','addVariable','variable','value','CONTINUE','TIMEOUT','lastevent','queuecallerexitAt','[%s][voiceQueueReport][varset]\x20sending\x20timeout\x20event:','custom:timeout','queueposition','EXITWITHKEY','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqoslossbridged','rtpaudioqosrttbridged','sipuri','bridgepeer','membercalls','memberdynamic','memberinterface','memberlastcall','includes','handleHangup','length','sumHoldTime','queuecallerleaveAt','sumDuration','diff','seconds','total','answered','sumBillable'];(function(_0x19a11f,_0x6d8be7){var _0x51485f=function(_0x1394a1){while(--_0x1394a1){_0x19a11f['push'](_0x19a11f['shift']());}};_0x51485f(++_0x6d8be7);}(_0x3459,0x11b));var _0x9345=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0x3459[_0x3bf83f];return _0x22c4a9;};'use strict';var _=require(_0x9345('0x0'));var moment=require('moment');var util=require(_0x9345('0x1'));var Redis=require(_0x9345('0x2'));var config=require(_0x9345('0x3'));var logger=require(_0x9345('0x4'))('ami');var ami=require(_0x9345('0x5'));var QueueReport=require(_0x9345('0x6'));var VoiceQueueSummary=require('../model/voiceQueueSummary');config[_0x9345('0x7')]=_[_0x9345('0x8')](config[_0x9345('0x7')],{'host':'localhost','port':0x18eb});var io=require(_0x9345('0x9'))(new Redis(config[_0x9345('0x7')]));var Sequence=function(){};Sequence[_0x9345('0xa')][_0x9345('0xb')]=function(_0x23eaab){this['tail']=this[_0x9345('0xc')]?this['tail']['finally'](_0x23eaab):_0x23eaab();};function VoiceQueueReport(_0x573026){this[_0x9345('0xd')]=new Sequence();this[_0x9345('0xe')]={};this[_0x9345('0xf')]=_0x573026;this[_0x9345('0x10')]=_0x573026[_0x9345('0x10')];this[_0x9345('0x11')]=_0x573026['queueChannels'];this['voiceQueues']=_0x573026['voiceQueues'];this[_0x9345('0x12')]=_0x573026[_0x9345('0x12')];this['summary']=initializeSummary();this[_0x9345('0x13')]={};ami['on'](_0x9345('0x14'),this[_0x9345('0x15')][_0x9345('0x16')](this));ami['on']('queuesummarycomplete',this[_0x9345('0x17')][_0x9345('0x16')](this));ami['on'](_0x9345('0x18'),this[_0x9345('0x19')][_0x9345('0x16')](this));ami['on'](_0x9345('0x1a'),this[_0x9345('0x1b')][_0x9345('0x16')](this));ami['on'](_0x9345('0x1c'),this[_0x9345('0x1d')][_0x9345('0x16')](this));ami['on'](_0x9345('0x1e'),this[_0x9345('0x1f')][_0x9345('0x16')](this));ami['on']('queuecallerleave',this[_0x9345('0x20')][_0x9345('0x16')](this));ami['on'](_0x9345('0x21'),this[_0x9345('0x22')][_0x9345('0x16')](this));ami['on']('agentconnect',this[_0x9345('0x23')][_0x9345('0x16')](this));ami['on'](_0x9345('0x24'),this[_0x9345('0x25')][_0x9345('0x16')](this));ami['on'](_0x9345('0x26'),this[_0x9345('0x27')][_0x9345('0x16')](this));ami['on'](_0x9345('0x28'),this[_0x9345('0x29')][_0x9345('0x16')](this));ami['on'](_0x9345('0x2a'),this[_0x9345('0x2b')][_0x9345('0x16')](this));ami['on'](_0x9345('0x2c'),this[_0x9345('0x2d')][_0x9345('0x16')](this));ami['on'](_0x9345('0x2e'),this[_0x9345('0x2f')][_0x9345('0x16')](this));ami['on'](_0x9345('0x30'),this[_0x9345('0x31')][_0x9345('0x16')](this));this['loopQueueSummary']();this['loopQueueShow']();}function clearChannels(_0x1b6215){if(!_['isEmpty'](_0x1b6215)){for(var _0xa1d308 in _0x1b6215){if(_0x1b6215[_0x9345('0x32')](_0xa1d308)){delete _0x1b6215[_0xa1d308];}}}}function clearCampaigns(_0x5f344a){if(!_[_0x9345('0x33')](_0x5f344a)){for(var _0x1eb719 in _0x5f344a){if(_0x5f344a[_0x9345('0x32')](_0x1eb719)){_0x5f344a[_0x1eb719]['originated']=0x0;}}}}function clearVoiceQueues(_0xfd7bc9){if(!_[_0x9345('0x33')](_0xfd7bc9)){for(var _0x23c294 in _0xfd7bc9){if(_0xfd7bc9[_0x9345('0x32')](_0x23c294)){_0xfd7bc9[_0x23c294][_0x9345('0x34')]=0x0;_0xfd7bc9[_0x23c294][_0x9345('0x35')]=0x0;_0xfd7bc9[_0x23c294][_0x9345('0x36')]=0x0;_0xfd7bc9[_0x23c294][_0x9345('0x37')]=0x0;_0xfd7bc9[_0x23c294][_0x9345('0x38')]=!![];}}}}function clearAgentBooked(_0x410e9e){if(!_[_0x9345('0x33')](_0x410e9e)){for(var _0xdfcfdd in _0x410e9e){if(_0x410e9e[_0x9345('0x32')](_0xdfcfdd)){_0x410e9e[_0xdfcfdd]['unlockRR']=!![];}}}}function initializeSummary(){return{'id':null,'completeEvent':null,'isRunning':![],'queues':{},'queuestatus':{},'statusRequests':0x0};}function hasCallerLeftTheQueue(_0x366ed1){return _0x366ed1['queuecallerexit']||_0x366ed1[_0x9345('0x1e')]||_0x366ed1[_0x9345('0x39')];}VoiceQueueReport[_0x9345('0xa')][_0x9345('0x3a')]=function(){var _0x275186=this;for(var _0x5938c5 in this['channels']){if(this[_0x9345('0x11')][_0x9345('0x32')](_0x5938c5)&&!this['channels'][_0x5938c5][_0x9345('0x3b')]){this['sequence'][_0x9345('0xb')](function(){if(!_[_0x9345('0x3c')](_0x275186[_0x9345('0x11')][_0x5938c5])){return ami[_0x9345('0x3d')]({'action':'status','channel':_0x275186[_0x9345('0x11')][_0x5938c5]['channel']})[_0x9345('0x3e')](function(_0x3c65fd){if(_0x3c65fd[_0x9345('0x3f')]==='No\x20such\x20channel'){setTimeout(function(){if(_0x275186[_0x9345('0x11')][_0x5938c5]){delete _0x275186['channels'][_0x5938c5];logger['error'](_0x9345('0x40'),_0x5938c5,util['inspect'](_0x3c65fd,{'showHidden':![],'depth':null}));}if(_0x275186[_0x9345('0xe')][_0x5938c5]){delete _0x275186[_0x9345('0xe')][_0x5938c5];logger[_0x9345('0x41')]('[%s][voiceQueueReport][checkQueueReport]',_0x5938c5,util[_0x9345('0x42')](_0x3c65fd,{'showHidden':![],'depth':null}));}if(_0x275186[_0x9345('0x13')][_0x5938c5]){delete _0x275186['variables'][_0x5938c5];logger[_0x9345('0x41')]('[%s][voiceQueueReport][checkVariables]',_0x5938c5,util[_0x9345('0x42')](_0x3c65fd,{'showHidden':![],'depth':null}));}},0x1f40);}});}});}}};VoiceQueueReport['prototype'][_0x9345('0x29')]=function(){logger[_0x9345('0x41')](_0x9345('0x43'));clearChannels(this[_0x9345('0x11')]);this[_0x9345('0x44')](this[_0x9345('0xe')]);clearAgentBooked(this['agents']);clearVoiceQueues(this[_0x9345('0x45')]);clearCampaigns(this[_0x9345('0x12')]);this[_0x9345('0x46')]=initializeSummary();};VoiceQueueReport[_0x9345('0xa')][_0x9345('0x44')]=function(_0x54eabb){var _0x3e339e=this;if(!_[_0x9345('0x33')](_0x54eabb)){for(var _0x8a1d0f in _0x54eabb){if(_0x54eabb['hasOwnProperty'](_0x8a1d0f)){_0x3e339e['emitVoiceQueueChannelRemove'](_0x54eabb[_0x8a1d0f],'clearqueuereport');delete _0x54eabb[_0x8a1d0f];}}}};VoiceQueueReport['prototype'][_0x9345('0x47')]=function(_0x16d1b7,_0x4237b7,_0x3e13bf){io['to'](_0x16d1b7)[_0x9345('0x47')](_0x4237b7,_0x3e13bf);};VoiceQueueReport[_0x9345('0xa')]['emitVoiceQueueChannelSave']=function(_0x39ea18,_0x465cf9){logger[_0x9345('0x48')](_0x9345('0x49')+_0x465cf9+_0x9345('0x4a'),_0x39ea18['uniqueid'],util[_0x9345('0x42')](_0x39ea18,{'showHidden':![],'depth':null}));this['emit'](util[_0x9345('0x4b')](_0x9345('0x4c'),_0x39ea18['queue']),_0x9345('0x4d'),_0x39ea18);io[_0x9345('0x47')](_0x9345('0x4e'),_0x39ea18);};VoiceQueueReport[_0x9345('0xa')][_0x9345('0x4f')]=function(_0x51862b,_0x387f8e){logger[_0x9345('0x48')](_0x9345('0x49')+_0x387f8e+_0x9345('0x50'),_0x51862b[_0x9345('0x51')],util[_0x9345('0x42')](_0x51862b,{'showHidden':![],'depth':null}));if(_0x51862b[_0x9345('0x52')]===_0x9345('0x53')){return;}this['emit'](util[_0x9345('0x4b')]('voice:queue:%s',_0x51862b[_0x9345('0x54')]),_0x9345('0x55'),_0x51862b);io['emit'](_0x9345('0x56'),_0x51862b);};VoiceQueueReport[_0x9345('0xa')][_0x9345('0x57')]=function(_0x59861b){if(_0x59861b[_0x9345('0x58')]==='inbound'){logger[_0x9345('0x48')](_0x9345('0x59'),util[_0x9345('0x42')](_0x59861b,{'showHidden':![],'depth':null}));this[_0x9345('0x47')](util['format'](_0x9345('0x4c'),_0x59861b[_0x9345('0x5a')]),_0x9345('0x5b'),_0x59861b);}};VoiceQueueReport[_0x9345('0xa')][_0x9345('0x5c')]=function(_0x5b88da){return _0x5b88da!==null&&!_['isUndefined'](_0x5b88da);};VoiceQueueReport['prototype']['loopQueueShow']=function(){var _0x3da827=this;setInterval(function(){_0x3da827['clearZombieChannels']();ami['Action']({'action':_0x9345('0x5d')})[_0x9345('0x3e')](function(_0x4b49c1){logger['error'](_0x9345('0x5e'),util[_0x9345('0x42')](_0x4b49c1,{'showHidden':![],'depth':null}));});},0x2710);};VoiceQueueReport['prototype']['loopQueueSummary']=function(){var _0x1b35c3=this;setInterval(function(){if(!_0x1b35c3[_0x9345('0x46')][_0x9345('0x5f')]){return ami[_0x9345('0x3d')]({'action':_0x9345('0x14')})[_0x9345('0x60')](function(_0x49e401){_0x1b35c3['summary']['id']=_0x49e401[_0x9345('0x61')];_0x1b35c3[_0x9345('0x46')][_0x9345('0x5f')]=!![];_0x1b35c3['summary'][_0x9345('0x62')][_0x49e401['actionid']]={};})[_0x9345('0x3e')](function(_0x41e0a5){logger[_0x9345('0x41')](_0x9345('0x63'),util[_0x9345('0x42')](_0x41e0a5,{'showHidden':![],'depth':null}));});}},0x3e8);};VoiceQueueReport[_0x9345('0xa')][_0x9345('0x64')]=function(_0x2ecd4d,_0x24fada){var _0x260282;if(this['summary']&&this[_0x9345('0x46')][_0x9345('0x5d')]&&this['summary'][_0x9345('0x5d')][_0x2ecd4d[_0x9345('0x5a')]]){_0x260282=this[_0x9345('0x46')]['queues'][_0x2ecd4d['name']]['summaryEvent'];}var _0x1ada81=new VoiceQueueSummary(_0x2ecd4d);return _0x1ada81[_0x9345('0x65')](_0x24fada[_0x9345('0x10')],this[_0x9345('0x10')],_0x260282,this[_0x9345('0xf')][_0x9345('0x11')]);};VoiceQueueReport[_0x9345('0xa')][_0x9345('0x66')]=function(_0x3eebd6,_0x44170a){var _0x313bd8=this[_0x9345('0x64')](_0x3eebd6,_0x44170a);var _0x5bb345=![];_0x5bb345=_0x313bd8['compareToInboundQueue'](_0x3eebd6);if(_0x5bb345){Object[_0x9345('0x67')](_0x3eebd6,_0x313bd8);this[_0x9345('0xf')][_0x9345('0x45')][_0x3eebd6[_0x9345('0x5a')]]=_0x3eebd6;this[_0x9345('0x57')](_0x313bd8);}};VoiceQueueReport['prototype'][_0x9345('0x1b')]=function(_0x14b0eb){var _0x33252f=null;var _0x220912=this[_0x9345('0x46')]['id'];if(this['summary']['queuestatus'][_0x220912]){_0x33252f=this['summary']['queuestatus'][_0x220912][_0x14b0eb[_0x9345('0x61')]];}if(!_0x33252f){this[_0x9345('0x46')]=initializeSummary();return;}var _0x95389e=this[_0x9345('0x45')][_0x33252f[_0x9345('0x54')]];if(_0x95389e[_0x9345('0x58')]===_0x9345('0x68')){this['handleInboundQueueSummaryReport'](_0x95389e,_0x33252f);}else if(_0x95389e[_0x9345('0x58')]==='outbound'){var _0x4f58fe=this[_0x9345('0x64')](_0x95389e,_0x33252f);ami[_0x9345('0x47')](_0x9345('0x69'),_0x4f58fe);}this[_0x9345('0x46')][_0x9345('0x6a')]-=0x1;var _0x7967fb=this['summary'][_0x9345('0x6a')]>0x0?!![]:![];if(!_0x7967fb){return this[_0x9345('0x17')](this[_0x9345('0x46')][_0x9345('0x6b')]);}};VoiceQueueReport['prototype']['syncQueueMember']=function(_0x3a3d6b){var _0x2e9a34=this['summary']['id'];if(this['summary']['queuestatus'][_0x2e9a34]&&this[_0x9345('0x46')][_0x9345('0x62')][_0x2e9a34][_0x3a3d6b[_0x9345('0x61')]]){this[_0x9345('0x46')]['queuestatus'][_0x2e9a34][_0x3a3d6b[_0x9345('0x61')]][_0x9345('0x10')][_0x9345('0x6c')](_0x3a3d6b);}};VoiceQueueReport['prototype']['syncQueueSummary']=function(_0x3ade2a){var _0x34ae69=this;try{if(this['isNotNull'](_0x3ade2a)&&this['isNotNull'](_0x3ade2a[_0x9345('0x54')])){logger[_0x9345('0x48')](_0x9345('0x6d'),util[_0x9345('0x42')](_0x3ade2a,{'showHidden':![],'depth':null}));var _0x4f7c5f=this[_0x9345('0x45')][_0x3ade2a[_0x9345('0x54')]];if(_0x4f7c5f){logger['debug'](_0x9345('0x6e'),_0x4f7c5f[_0x9345('0x5a')]);this[_0x9345('0x46')][_0x9345('0x5d')][_0x4f7c5f[_0x9345('0x5a')]]={'summaryEvent':_0x3ade2a};this[_0x9345('0x46')][_0x9345('0x6a')]+=0x1;return ami[_0x9345('0x3d')]({'action':_0x9345('0x62'),'queue':_0x4f7c5f[_0x9345('0x5a')]})[_0x9345('0x60')](function(_0x4ea3bf){if(!_0x34ae69['summary'][_0x9345('0x62')][_0x3ade2a['actionid']]){_0x34ae69[_0x9345('0x46')]['queuestatus'][_0x3ade2a[_0x9345('0x61')]]={};}_0x34ae69[_0x9345('0x46')][_0x9345('0x62')][_0x3ade2a[_0x9345('0x61')]][_0x4ea3bf['actionid']]={'queue':_0x4f7c5f[_0x9345('0x5a')],'agents':[]};})[_0x9345('0x3e')](function(_0x4c04b6){throw _0x4c04b6;});}}}catch(_0xdfb9e0){logger['error'](_0x9345('0x63'),util[_0x9345('0x42')](_0xdfb9e0,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x9345('0x17')]=function(_0x40c72f){if(this[_0x9345('0x46')][_0x9345('0x6a')]>0x0){this[_0x9345('0x46')][_0x9345('0x6b')]=_0x40c72f;return;}logger['debug']('[voiceQueueReport][queuesummarycomplete]\x20event:',util['inspect'](_0x40c72f,{'showHidden':![],'depth':null}));this[_0x9345('0x46')]=initializeSummary();ami['emit'](_0x9345('0x6f'),{});};VoiceQueueReport[_0x9345('0xa')][_0x9345('0x1d')]=function(_0x4314c6){try{if(this['isNotNull'](_0x4314c6)){logger[_0x9345('0x48')](_0x9345('0x70'),_0x4314c6['uniqueid'],util[_0x9345('0x42')](_0x4314c6,{'showHidden':![],'depth':null}));if(_['isUndefined'](this[_0x9345('0xe')][_0x4314c6[_0x9345('0x51')]])){this[_0x9345('0xe')][_0x4314c6['uniqueid']]=[];}if(_[_0x9345('0x71')](this[_0x9345('0x11')][_0x4314c6[_0x9345('0x51')]])){this['channels'][_0x4314c6[_0x9345('0x51')]]={};}var _0x325187=new QueueReport();_0x325187[_0x9345('0x54')]=_0x4314c6[_0x9345('0x54')];_0x325187[_0x9345('0x58')]=this[_0x9345('0x45')][_0x325187[_0x9345('0x54')]]&&this[_0x9345('0x45')][_0x325187[_0x9345('0x54')]][_0x9345('0x58')]?this[_0x9345('0x45')][_0x325187[_0x9345('0x54')]]['type']||'inbound':_0x9345('0x68');_0x325187[_0x9345('0x72')]=moment()['format'](_0x9345('0x73'));_0x325187['position']=_0x4314c6[_0x9345('0x74')];_0x325187[_0x9345('0x75')]=_0x4314c6[_0x9345('0x75')];_0x325187[_0x9345('0x51')]=_0x4314c6[_0x9345('0x51')];_0x325187[_0x9345('0x76')]=this[_0x9345('0x11')][_0x4314c6[_0x9345('0x51')]]['routealias'];logger[_0x9345('0x77')](_0x9345('0x78'),_0x325187[_0x9345('0x54')],_0x325187['type']);Object[_0x9345('0x67')](_0x325187,_[_0x9345('0x79')](_0x4314c6,_[_0x9345('0x7a')](_0x325187)));this[_0x9345('0xe')][_0x4314c6['uniqueid']][_0x9345('0x6c')](_0x325187);this[_0x9345('0x11')][_0x4314c6[_0x9345('0x51')]]=_0x325187;this['emitVoiceQueueChannelSave'](_0x325187,_0x9345('0x1c'));}}catch(_0x221e7b){logger['error'](_0x9345('0x70'),_0x4314c6['uniqueid'],util[_0x9345('0x42')](_0x221e7b,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x9345('0xa')][_0x9345('0x1f')]=function(_0x50b838){try{if(this[_0x9345('0x5c')](_0x50b838)){logger[_0x9345('0x48')]('[%s][voiceQueueReport][queuecallerabandon]',_0x50b838[_0x9345('0x51')],util[_0x9345('0x42')](_0x50b838,{'showHidden':![],'depth':null}));if(this[_0x9345('0xe')][_0x50b838[_0x9345('0x51')]]){var _0x4871cc=_[_0x9345('0x7b')](this[_0x9345('0xe')][_0x50b838[_0x9345('0x51')]]);_0x4871cc['queuecallercomplete']=![];_0x4871cc[_0x9345('0x7c')]=null;_0x4871cc[_0x9345('0x7d')]=_0x50b838['holdtime'];_0x4871cc['originalposition']=_0x50b838[_0x9345('0x7e')];_0x4871cc[_0x9345('0x1e')]=!![];_0x4871cc[_0x9345('0x7f')]=moment()[_0x9345('0x4b')](_0x9345('0x73'));_0x4871cc[_0x9345('0x52')]=_0x9345('0x80');_0x4871cc[_0x9345('0x81')]=null;logger[_0x9345('0x77')](_0x9345('0x82'),_0x4871cc['queue'],_0x4871cc[_0x9345('0x58')]);this[_0x9345('0x11')][_0x50b838[_0x9345('0x51')]]=_0x4871cc;this[_0x9345('0x4f')](_0x4871cc,_0x9345('0x1e'));}}}catch(_0x4ff980){logger[_0x9345('0x41')](_0x9345('0x83'),_0x50b838[_0x9345('0x51')],util['inspect'](_0x4ff980,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x9345('0x20')]=function(_0x1cd780){try{if(this['isNotNull'](_0x1cd780)){logger['debug'](_0x9345('0x84'),_0x1cd780['uniqueid'],util[_0x9345('0x42')](_0x1cd780,{'showHidden':![],'depth':null}));if(this[_0x9345('0xe')][_0x1cd780['uniqueid']]){var _0x37d14f=_[_0x9345('0x7b')](this[_0x9345('0xe')][_0x1cd780['uniqueid']]);_0x37d14f['queuecallerleaveAt']=moment()['format'](_0x9345('0x73'));_0x37d14f[_0x9345('0x85')]=_0x1cd780[_0x9345('0x85')];_0x37d14f[_0x9345('0x86')]=_0x1cd780[_0x9345('0x86')];logger[_0x9345('0x77')](_0x9345('0x87'),_0x37d14f[_0x9345('0x54')],_0x37d14f[_0x9345('0x58')],_0x1cd780[_0x9345('0x85')],_0x1cd780['connectedlinename']);this['channels'][_0x1cd780[_0x9345('0x51')]]=_0x37d14f;this[_0x9345('0x88')](_0x37d14f,'queuecallerleave');}}}catch(_0x3ea6c3){logger['error']('[%s][voiceQueueReport][queuecallerleave]',_0x1cd780[_0x9345('0x51')],util[_0x9345('0x42')](_0x3ea6c3,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x9345('0xa')]['syncAgentConnect']=function(_0x466a23){try{if(this['isNotNull'](_0x466a23)){logger[_0x9345('0x48')](_0x9345('0x89'),_0x466a23[_0x9345('0x51')],util[_0x9345('0x42')](_0x466a23,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x466a23[_0x9345('0x51')]]){var _0x543bd8=_['last'](this[_0x9345('0xe')][_0x466a23[_0x9345('0x51')]]);_0x543bd8[_0x9345('0x39')]=!![];_0x543bd8[_0x9345('0x52')]='COMPLETEDBYAGENT';logger[_0x9345('0x77')](_0x9345('0x8a'),_0x543bd8[_0x9345('0x54')],_0x543bd8[_0x9345('0x58')]);}}}catch(_0x2abdd0){logger[_0x9345('0x41')](_0x9345('0x89'),_0x466a23[_0x9345('0x51')],util[_0x9345('0x42')](_0x2abdd0,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x9345('0xa')][_0x9345('0x22')]=function(_0x25c739){try{if(this[_0x9345('0x5c')](_0x25c739)){logger[_0x9345('0x48')](_0x9345('0x8b'),_0x25c739[_0x9345('0x51')],util[_0x9345('0x42')](_0x25c739,{'showHidden':![],'depth':null}));if(this[_0x9345('0xe')][_0x25c739['uniqueid']]){var _0x5aa450=_[_0x9345('0x7b')](this[_0x9345('0xe')][_0x25c739[_0x9345('0x51')]]);_0x5aa450['queuecallerabandon']=![];_0x5aa450[_0x9345('0x7f')]=null;_0x5aa450[_0x9345('0x8c')]=!![];_0x5aa450['lastAssignedTo']=_0x25c739[_0x9345('0x8d')];_0x5aa450['holdtime']=_0x25c739[_0x9345('0x7d')];_0x5aa450[_0x9345('0x39')]=!![];_0x5aa450['queuecallerexit']=![];_0x5aa450['queuecallerexitAt']=null;if(!_0x5aa450['transfer']){if(_0x25c739[_0x9345('0x8e')]==_0x9345('0x8f')){_0x5aa450['queuecallerexitreason']='COMPLETED';logger[_0x9345('0x77')](_0x9345('0x90'),_0x5aa450[_0x9345('0x54')],_0x5aa450[_0x9345('0x58')]);}else{if(_[_0x9345('0x91')](_0x25c739['channel'][_0x9345('0x92')](),_0x9345('0x93'))){if(this[_0x9345('0xe')][_0x25c739[_0x9345('0x94')]]){var _0x50a214=_[_0x9345('0x7b')](this[_0x9345('0xe')][_0x25c739[_0x9345('0x94')]]);_0x50a214[_0x9345('0x39')]=![];_0x50a214[_0x9345('0x95')]=!![];_0x50a214['queuecallerexitAt']=moment(_0x5aa450[_0x9345('0x72')])[_0x9345('0x96')](_0x25c739['holdtime'],'seconds')[_0x9345('0x4b')](_0x9345('0x73'));_0x50a214[_0x9345('0x52')]=_0x9345('0x97');_0x50a214['transfer']=!![];_0x50a214['transfertype']=_0x9345('0x98');_0x50a214[_0x9345('0x99')]=_0x25c739['destexten'];_0x50a214[_0x9345('0x9a')]=_0x25c739[_0x9345('0x51')];logger[_0x9345('0x77')]('[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:FORWARDTRANSFER',_0x50a214[_0x9345('0x54')],_0x50a214[_0x9345('0x58')]);var _0x41ee76=this[_0x9345('0xe')][_0x25c739['linkedid']];this[_0x9345('0xe')][_0x25c739['linkedid']]=this[_0x9345('0xe')][_0x25c739[_0x9345('0x51')]];this[_0x9345('0xe')][_0x25c739[_0x9345('0x51')]]=_0x41ee76;}}else{_0x5aa450[_0x9345('0x52')]='COMPLETEDBY'+_0x25c739['reason'][_0x9345('0x9b')]();logger[_0x9345('0x77')]('[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:%s',_0x5aa450['queue'],_0x5aa450[_0x9345('0x58')],_0x5aa450['queuecallerexitreason']);}}}this[_0x9345('0x11')][_0x25c739[_0x9345('0x51')]]=_0x5aa450;}}}catch(_0xf257bd){logger[_0x9345('0x41')]('[%s][voiceQueueReport][agentcomplete]',_0x25c739[_0x9345('0x51')],util['inspect'](_0xf257bd,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x9345('0x25')]=function(_0x27f0dd){try{if(this[_0x9345('0x5c')](_0x27f0dd)){logger[_0x9345('0x48')](_0x9345('0x9c'),_0x27f0dd[_0x9345('0x51')],util['inspect'](_0x27f0dd,{'showHidden':![],'depth':null}));this[_0x9345('0x9d')](_0x27f0dd[_0x9345('0x51')],_[_0x9345('0x7a')](_0x27f0dd[_0x9345('0x9e')])[0x0],_0x27f0dd[_0x9345('0x9f')]);if(this['queueReports'][_0x27f0dd[_0x9345('0x51')]]){var _0x1c47f0=_[_0x9345('0x7b')](this[_0x9345('0xe')][_0x27f0dd['uniqueid']]);if(_0x1c47f0){if(this[_0x9345('0x5c')](_0x27f0dd[_0x9345('0x9e')])&&this[_0x9345('0x5c')](_0x27f0dd[_0x9345('0x9e')][_0x9345('0x62')])){switch(_0x27f0dd[_0x9345('0x9f')]){case _0x9345('0xa0'):_0x1c47f0[_0x9345('0x95')]=![];_0x1c47f0['queuecallerexitAt']=null;break;case _0x9345('0xa1'):_0x1c47f0[_0x9345('0xa2')]='timeout';_0x1c47f0[_0x9345('0x95')]=!![];_0x1c47f0[_0x9345('0xa3')]=moment()[_0x9345('0x4b')](_0x9345('0x73'));_0x1c47f0['queuecallerleaveAt']=moment()['format'](_0x9345('0x73'));logger[_0x9345('0x48')](_0x9345('0xa4'),_0x27f0dd[_0x9345('0x51')],util[_0x9345('0x42')](_0x1c47f0,{'showHidden':![],'depth':null}));ami['emit'](_0x9345('0xa5'),_0x1c47f0);break;default:_0x1c47f0[_0x9345('0x95')]=!![];_0x1c47f0[_0x9345('0xa3')]=moment()[_0x9345('0x4b')](_0x9345('0x73'));_0x1c47f0['queuecallerleaveAt']=moment()['format'](_0x9345('0x73'));}_0x1c47f0['queuecallerabandon']=![];_0x1c47f0[_0x9345('0x7f')]=null;_0x1c47f0[_0x9345('0x52')]=_0x27f0dd[_0x9345('0x9f')];this['channels'][_0x27f0dd[_0x9345('0x51')]]=_0x1c47f0;this['emitVoiceQueueChannelRemove'](_0x1c47f0,_0x9345('0x24'));}else if(this[_0x9345('0x5c')](_0x27f0dd[_0x9345('0x9e')])&&this['isNotNull'](_0x27f0dd['variable'][_0x9345('0xa6')])){if(!_0x1c47f0['queuecallerabandon']){_0x1c47f0[_0x9345('0x95')]=!![];_0x1c47f0[_0x9345('0xa3')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x1c47f0[_0x9345('0x52')]=_0x9345('0xa7');_0x1c47f0['queuecallerleaveAt']=moment()['format'](_0x9345('0x73'));this[_0x9345('0x11')][_0x27f0dd[_0x9345('0x51')]]=_0x1c47f0;}}logger['info']('[%s][voiceQueueReport][varset]\x20name:%s\x20type:%s\x20variable:%s\x20value:%s',_0x27f0dd[_0x9345('0x51')],_0x1c47f0[_0x9345('0x54')],_0x1c47f0[_0x9345('0x58')],_[_0x9345('0x7a')](_0x27f0dd[_0x9345('0x9e')])[0x0],_0x27f0dd[_0x9345('0x9f')]);_0x1c47f0['variables']=this[_0x9345('0x13')][_0x27f0dd['uniqueid']];}}}}catch(_0x2233c7){logger['error'](_0x9345('0x9c'),_0x27f0dd['uniqueid'],util[_0x9345('0x42')](_0x2233c7,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x9345('0xa')][_0x9345('0x9d')]=function(_0x30097e,_0x195eea,_0x21906c){var _0x365d74=[_0x9345('0xa8'),_0x9345('0xa9'),_0x9345('0xaa'),_0x9345('0xab'),'rtpaudioqosloss',_0x9345('0xac'),'rtpaudioqosrtt',_0x9345('0xad'),'sipcallid',_0x9345('0xae'),_0x9345('0xaf'),'bridgepvtcallid',_0x9345('0xb0'),_0x9345('0xb1'),_0x9345('0xb2'),_0x9345('0xb3'),_0x9345('0x8d'),'memberpenalty','memberrealtime'];if(!_[_0x9345('0x3c')](_0x195eea)&&!_[_0x9345('0xb4')](_0x365d74,_0x195eea)){if(_['isUndefined'](this[_0x9345('0x13')][_0x30097e])){this['variables'][_0x30097e]={};}this[_0x9345('0x13')][_0x30097e][_0x195eea]=_0x21906c;}};VoiceQueueReport[_0x9345('0xa')][_0x9345('0xb5')]=function(_0xd46b6b,_0x182160,_0x15473c){try{var _0x108179={};if(this[_0x9345('0xe')][_0xd46b6b]){for(var _0x233c07=0x0;_0x233c07<this[_0x9345('0xe')][_0xd46b6b][_0x9345('0xb6')];_0x233c07+=0x1){_0x108179=this[_0x9345('0xe')][_0xd46b6b][_0x233c07];var _0x4604f3=this[_0x9345('0x45')][_0x108179['queue']];if(_0x4604f3){_0x4604f3[_0x9345('0xb7')]+=moment(_0x108179[_0x9345('0xb8')])['diff'](_0x108179['queuecallerjoinAt'],'seconds')||0x0;if(_0x15473c&&_0x108179['queuecallerexitreason']===_0x9345('0x53')){_0x108179[_0x9345('0x52')]='COMPLETEDBYAGENT';}if(_0x233c07===this[_0x9345('0xe')][_0xd46b6b][_0x9345('0xb6')]-0x1){_0x4604f3[_0x9345('0xb9')]+=moment()['milliseconds'](0x0)[_0x9345('0xba')](_0x108179[_0x9345('0x72')],_0x9345('0xbb'));if(hasCallerLeftTheQueue(_0x108179)&&_0x108179[_0x9345('0x52')]!==_0x9345('0x53')){_0x4604f3[_0x9345('0xbc')]+=0x1;}if(_0x108179[_0x9345('0x39')]){_0x4604f3[_0x9345('0xbd')]+=0x1;_0x4604f3[_0x9345('0xbe')]+=moment()['milliseconds'](0x0)[_0x9345('0xba')](_0x108179['queuecallerleaveAt'],'seconds');_0x108179[_0x9345('0x7c')]=moment()[_0x9345('0x4b')](_0x9345('0x73'));_0x108179[_0x9345('0x95')]=![];_0x108179['queuecallerexitAt']=null;}if(_0x108179[_0x9345('0x95')]&&_0x108179[_0x9345('0x8f')]!=!![]){_0x4604f3['unmanaged']+=0x1;_0x108179['lastevent']=_0x9345('0xbf');logger[_0x9345('0x48')](_0x9345('0xc0'),_0xd46b6b,util[_0x9345('0x42')](_0x108179,{'showHidden':![],'depth':null}));ami[_0x9345('0x47')](_0x9345('0xc1'),_0x108179);}if(_0x108179[_0x9345('0x1e')]){_0x4604f3[_0x9345('0xc2')]+=0x1;_0x108179['lastevent']=_0x9345('0xc2');logger[_0x9345('0x48')]('[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerabandon\x20event:',_0xd46b6b,util['inspect'](_0x108179,{'showHidden':![],'depth':null}));ami[_0x9345('0x47')]('custom:queuecallerabandon',_0x108179);}}else{_0x4604f3['sumDuration']+=_0x4604f3[_0x9345('0xb7')];}logger[_0x9345('0x77')](_0x9345('0xc3'),_0xd46b6b,_0x108179[_0x9345('0x54')],_0x108179[_0x9345('0x58')],_0x182160);this[_0x9345('0x11')][_0xd46b6b]=_0x108179;Object[_0x9345('0x67')](this[_0x9345('0x45')][_0x108179[_0x9345('0x54')]],_0x4604f3);if(_0x108179[_0x9345('0xb8')]){this[_0x9345('0x4f')](_0x108179,_0x9345('0x26'));}}}logger['debug'](_0x9345('0xc4'),_0xd46b6b,util['inspect'](this[_0x9345('0xe')][_0xd46b6b],{'showHidden':![],'depth':null}));if(hasCallerLeftTheQueue(_0x108179)&&_0x108179['queuecallerexitreason']!==_0x9345('0x53')){ami[_0x9345('0x47')](_0x9345('0xc5'),this[_0x9345('0xe')][_0xd46b6b]);if(this['queueReports'][_0xd46b6b]){delete this[_0x9345('0xe')][_0xd46b6b];}if(this[_0x9345('0x11')][_0xd46b6b]){delete this[_0x9345('0x11')][_0xd46b6b];}if(this[_0x9345('0x13')][_0xd46b6b]){delete this[_0x9345('0x13')][_0xd46b6b];}}}}catch(_0x308e88){logger[_0x9345('0x41')](_0x9345('0xc6'),_0xd46b6b,util[_0x9345('0x42')](_0x308e88,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x9345('0xa')]['syncHangup']=function(_0x39fc3d){try{if(this[_0x9345('0x5c')](_0x39fc3d)){logger[_0x9345('0x48')](_0x9345('0xc7'),_0x39fc3d[_0x9345('0x51')],util[_0x9345('0x42')](_0x39fc3d,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x39fc3d[_0x9345('0x51')]]){return this['handleHangup'](_0x39fc3d[_0x9345('0x51')],_0x39fc3d[_0x9345('0xc8')],![]);}if(this[_0x9345('0xe')][_0x39fc3d[_0x9345('0x94')]]){if(_0x39fc3d[_0x9345('0xc9')]==='21'){return;}return this[_0x9345('0xb5')](_0x39fc3d['linkedid'],_0x39fc3d[_0x9345('0xc8')],!![]);}var _0x163498=Object['keys'](this[_0x9345('0xe')]);for(var _0x16f353=0x0;_0x16f353<_0x163498['length'];_0x16f353++){var _0x4c0565=_['last'](this[_0x9345('0xe')][_0x163498[_0x16f353]]);if(_0x4c0565&&_0x4c0565[_0x9345('0xca')]===_0x39fc3d[_0x9345('0x51')]){return this[_0x9345('0xb5')](_0x4c0565[_0x9345('0x51')],_0x39fc3d['cause-txt'],!![]);}}if(!this['queueReports'][_0x39fc3d[_0x9345('0x51')]]){logger[_0x9345('0x48')](_0x9345('0xcb'),_0x39fc3d[_0x9345('0x51')]);if(this[_0x9345('0x11')][_0x39fc3d[_0x9345('0x51')]]){delete this['channels'][_0x39fc3d[_0x9345('0x51')]];}if(this[_0x9345('0x13')][_0x39fc3d['uniqueid']]){delete this[_0x9345('0x13')][_0x39fc3d[_0x9345('0x51')]];}}}}catch(_0x162a37){logger[_0x9345('0x41')]('[%s][voiceQueueReport][hangup]',_0x39fc3d['uniqueid'],util['inspect'](_0x162a37,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x9345('0xa')][_0x9345('0x2f')]=function(_0x204844){try{if(this['isNotNull'](_0x204844)){logger['debug'](_0x9345('0xcc'),_0x204844[_0x9345('0x51')],util['inspect'](_0x204844,{'showHidden':![],'depth':null}));var _0x371de8;var _0x371d61;var _0x249cc4;if(this[_0x9345('0xe')][_0x204844[_0x9345('0xcd')]]){_0x371de8=_[_0x9345('0x7b')](this[_0x9345('0xe')][_0x204844[_0x9345('0xcd')]]);_0x371de8['transferexten']=_0x204844[_0x9345('0xce')];_0x371de8[_0x9345('0x9a')]=_0x204844[_0x9345('0xcf')];_0x371de8[_0x9345('0x52')]='ATTENDEDTRANSFER';_0x371de8[_0x9345('0x8f')]=!![];_0x371de8[_0x9345('0xd0')]=_0x9345('0xd1');if(this[_0x9345('0xe')][_0x204844[_0x9345('0xcf')]]){_0x249cc4=this[_0x9345('0xe')][_0x204844[_0x9345('0xcf')]];this['queueReports'][_0x204844[_0x9345('0xcf')]]=this['queueReports'][_0x204844[_0x9345('0xcd')]];this[_0x9345('0xe')][_0x204844[_0x9345('0xcd')]]=_0x249cc4;_0x371d61=_['last'](this[_0x9345('0xe')][_0x204844[_0x9345('0xcd')]]);_0x371d61['switch']=!![];}logger[_0x9345('0x77')](_0x9345('0xd2'),_0x204844['uniqueid'],_0x371de8[_0x9345('0x54')],_0x371de8['type'],_0x371de8[_0x9345('0x99')],_0x371de8[_0x9345('0x9a')]);}else if(this[_0x9345('0xe')][_0x204844[_0x9345('0xd3')]]){_0x371de8=_[_0x9345('0x7b')](this['queueReports'][_0x204844[_0x9345('0xd3')]]);_0x371de8[_0x9345('0x99')]=_0x204844['origtransfererexten'];_0x371de8['transferuniqueid']=_0x204844[_0x9345('0xd4')];_0x371de8[_0x9345('0x52')]=_0x9345('0x53');_0x371de8[_0x9345('0x8f')]=!![];_0x371de8[_0x9345('0xd0')]=_0x9345('0xd1');if(this[_0x9345('0xe')][_0x204844[_0x9345('0xd4')]]){_0x249cc4=this[_0x9345('0xe')][_0x204844[_0x9345('0xd4')]];this[_0x9345('0xe')][_0x204844[_0x9345('0xd4')]]=this[_0x9345('0xe')][_0x204844[_0x9345('0xd3')]];this[_0x9345('0xe')][_0x204844['transfertargetuniqueid']]=_0x249cc4;_0x371d61=_[_0x9345('0x7b')](this[_0x9345('0xe')][_0x204844[_0x9345('0xd3')]]);_0x371d61[_0x9345('0x3b')]=!![];}logger[_0x9345('0x77')](_0x9345('0xd2'),_0x204844[_0x9345('0x51')],_0x371de8['queue'],_0x371de8[_0x9345('0x58')],_0x371de8[_0x9345('0x99')],_0x371de8[_0x9345('0x9a')]);}else if(this[_0x9345('0xe')][_0x204844[_0x9345('0xd4')]]){_0x371de8=_['last'](this['queueReports'][_0x204844[_0x9345('0xd4')]]);_0x371de8[_0x9345('0x99')]=_0x204844[_0x9345('0xd5')];_0x371de8[_0x9345('0x9a')]=_0x204844[_0x9345('0xd4')];_0x371de8[_0x9345('0x52')]='ATTENDEDTRANSFER';_0x371de8[_0x9345('0x8f')]=!![];_0x371de8['transfertype']=_0x9345('0xd1');_0x371de8['switch']=!![];_0x371de8['transferid']=_0x204844[_0x9345('0xcd')];}else if(this[_0x9345('0xe')][_0x204844[_0x9345('0xcf')]]){_0x371de8=_[_0x9345('0x7b')](this['queueReports'][_0x204844[_0x9345('0xcf')]]);_0x371de8[_0x9345('0x99')]=_0x204844[_0x9345('0xce')];_0x371de8[_0x9345('0x9a')]=_0x204844[_0x9345('0xcf')];_0x371de8[_0x9345('0x52')]=_0x9345('0x53');_0x371de8[_0x9345('0x8f')]=!![];_0x371de8[_0x9345('0xd0')]=_0x9345('0xd1');_0x371de8[_0x9345('0x3b')]=!![];_0x371de8[_0x9345('0xca')]=_0x204844[_0x9345('0xd3')];}}}catch(_0x3e707b){logger[_0x9345('0x41')](_0x9345('0xcc'),_0x204844[_0x9345('0x51')],util['inspect'](_0x3e707b,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x9345('0xa')]['syncBlindTransfer']=function(_0x271896){try{if(this[_0x9345('0x5c')](_0x271896)){logger[_0x9345('0x48')](_0x9345('0xd6'),_0x271896[_0x9345('0x51')],util[_0x9345('0x42')](_0x271896,{'showHidden':![],'depth':null}));if(this[_0x9345('0xe')][_0x271896['transfereeuniqueid']]){var _0x170b4b=_['last'](this['queueReports'][_0x271896[_0x9345('0xcd')]]);_0x170b4b[_0x9345('0x52')]=_0x9345('0xd7');_0x170b4b[_0x9345('0x8f')]=!![];_0x170b4b['transfertype']=_0x9345('0xd8');_0x170b4b['transferexten']=_0x271896['extension'];_0x170b4b['transferuniqueid']=_0x271896[_0x9345('0xcd')];logger[_0x9345('0x77')](_0x9345('0xd9'),_0x271896[_0x9345('0x51')],_0x170b4b['queue'],_0x170b4b[_0x9345('0x58')],_0x170b4b[_0x9345('0x99')],_0x170b4b['transferuniqueid']);this[_0x9345('0x27')]({'event':_0x9345('0xda'),'uniqueid':_0x271896[_0x9345('0xcd')],'context':_0x271896[_0x9345('0xdb')],'channel':_0x271896[_0x9345('0xdc')]});}}}catch(_0x2de907){logger[_0x9345('0x41')]('[%s][voiceQueueReport][blindtransfer]',_0x271896[_0x9345('0x51')],util[_0x9345('0x42')](_0x2de907,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x9345('0xa')][_0x9345('0x2b')]=function(_0x4e2032){try{if(this[_0x9345('0x5c')](_0x4e2032)){logger[_0x9345('0x48')](_0x9345('0xdd'),_0x4e2032[_0x9345('0x51')],util[_0x9345('0x42')](_0x4e2032,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x4e2032[_0x9345('0x51')]]){var _0x1d3d72=_['last'](this[_0x9345('0xe')][_0x4e2032[_0x9345('0x51')]]);if(!_[_0x9345('0x3c')](_0x1d3d72['queuecallerleaveAt'])){_0x1d3d72['mohstarttime']=moment()['format'](_0x9345('0x73'));logger[_0x9345('0x77')](_0x9345('0xde'),_0x4e2032['uniqueid'],_0x1d3d72[_0x9345('0xdf')]);}}}}catch(_0x3bacdd){logger[_0x9345('0x41')](_0x9345('0xdd'),_0x4e2032[_0x9345('0x51')],util['inspect'](_0x3bacdd,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x9345('0xa')]['syncMusicOnHoldStop']=function(_0x54f303){try{if(this[_0x9345('0x5c')](_0x54f303)){logger['debug'](_0x9345('0xe0'),_0x54f303[_0x9345('0x51')],util[_0x9345('0x42')](_0x54f303,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x54f303[_0x9345('0x51')]]){var _0x196cf7=_['last'](this[_0x9345('0xe')][_0x54f303[_0x9345('0x51')]]);if(!_[_0x9345('0x3c')](_0x196cf7[_0x9345('0xdf')])){_0x196cf7[_0x9345('0xe1')]+=moment()['milliseconds'](0x0)['diff'](_0x196cf7[_0x9345('0xdf')],_0x9345('0xbb'));logger[_0x9345('0x77')](_0x9345('0xe2'),_0x54f303[_0x9345('0x51')],_0x196cf7[_0x9345('0xe1')]);delete _0x196cf7[_0x9345('0xdf')];}}}}catch(_0x55d2ab){logger[_0x9345('0x41')](_0x9345('0xe0'),_0x54f303[_0x9345('0x51')],util[_0x9345('0x42')](_0x55d2ab,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x9345('0xe3')]=function(_0x487455){try{if(this[_0x9345('0x5c')](_0x487455)){logger[_0x9345('0x48')]('[%s][voiceQueueReport][newexten]\x20event:',_0x487455[_0x9345('0x51')],util['inspect'](_0x487455,{'showHidden':![],'depth':null}));if(_0x487455[_0x9345('0xe4')][_0x9345('0x92')]()===_0x9345('0xe5')){_0x487455[_0x9345('0xe6')]=_0x487455[_0x9345('0xe7')]&&_0x487455['appdata'][_0x9345('0x91')]('CDR(routeAlias)')?_0x487455[_0x9345('0xe7')]:(_0x487455['appdata']||_0x487455['applicationdata'])['toLowerCase']();if(_[_0x9345('0x91')](_0x487455['applicationdata'][_0x9345('0x92')](),_0x9345('0xe8'))){logger[_0x9345('0x77')](_0x9345('0xe9'),_0x487455['uniqueid'],_0x487455['application'],_0x487455[_0x9345('0xe6')]);if(_[_0x9345('0x71')](this[_0x9345('0x11')][_0x487455[_0x9345('0x51')]]))this[_0x9345('0x11')][_0x487455['uniqueid']]={};var _0x2f210e=_0x487455[_0x9345('0xe6')][_0x9345('0xea')]('=');var _0x57e6a4=_0x2f210e[0x0][_0x9345('0x92')]()[_0x9345('0xeb')](/cdr\((.*)\)/);if(_0x57e6a4)this['channels'][_0x487455[_0x9345('0x51')]][_0x57e6a4[0x1]]=_0x2f210e[0x1];}}}}catch(_0x5296d6){logger[_0x9345('0x41')](_0x9345('0xec'),_0x487455['uniqueid'],util[_0x9345('0x42')](_0x5296d6,{'showHidden':![],'depth':null}));}};module['exports']=VoiceQueueReport;
\ No newline at end of file
index 35cf5a7..e161f79 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x99c5=['createHistory','campaign','queue','Request','CreateReportAgentPreview','../client'];(function(_0x360739,_0x2ec1b2){var _0x3e23a1=function(_0x105b37){while(--_0x105b37){_0x360739['push'](_0x360739['shift']());}};_0x3e23a1(++_0x2ec1b2);}(_0x99c5,0xe3));var _0x599c=function(_0x1598de,_0x3ebcb4){_0x1598de=_0x1598de-0x0;var _0x549cbd=_0x99c5[_0x1598de];return _0x549cbd;};'use strict';var client=require(_0x599c('0x0'));exports[_0x599c('0x1')]=function(_0x37d916){return function(){_0x37d916[_0x599c('0x2')]=_0x37d916[_0x599c('0x3')];return client[_0x599c('0x4')](_0x599c('0x5'),{'body':_0x37d916,'log':'CreateReportAgentPreview'});};};
\ No newline at end of file
+var _0x1567=['../client','createHistory','campaign','Request','CreateReportAgentPreview'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x1567,0x73));var _0x7156=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0x1567[_0x502c7d];return _0x30b7ed;};'use strict';var client=require(_0x7156('0x0'));exports[_0x7156('0x1')]=function(_0x17734a){return function(){_0x17734a[_0x7156('0x2')]=_0x17734a['queue'];return client[_0x7156('0x3')](_0x7156('0x4'),{'body':_0x17734a,'log':_0x7156('0x4')});};};
\ No newline at end of file
index 91425c0..f08ab18 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc30e=['CreateAttachment','create','Request'];(function(_0x431a95,_0x502f37){var _0x5527d3=function(_0x47ce52){while(--_0x47ce52){_0x431a95['push'](_0x431a95['shift']());}};_0x5527d3(++_0x502f37);}(_0xc30e,0x15a));var _0xec30=function(_0x2c0a01,_0x557769){_0x2c0a01=_0x2c0a01-0x0;var _0x3b2a44=_0xc30e[_0x2c0a01];return _0x3b2a44;};'use strict';var client=require('../client');exports[_0xec30('0x0')]=function(_0x54cd66){return client[_0xec30('0x1')](_0xec30('0x2'),{'body':_0x54cd66,'log':_0xec30('0x2')});};
\ No newline at end of file
+var _0x6d40=['../client','create','Request','CreateAttachment'];(function(_0x2fee96,_0x2f735d){var _0x2e6ad1=function(_0x2c55ad){while(--_0x2c55ad){_0x2fee96['push'](_0x2fee96['shift']());}};_0x2e6ad1(++_0x2f735d);}(_0x6d40,0x1ec));var _0x06d4=function(_0xafec80,_0x539bbe){_0xafec80=_0xafec80-0x0;var _0xe7481e=_0x6d40[_0xafec80];return _0xe7481e;};'use strict';var client=require(_0x06d4('0x0'));exports[_0x06d4('0x1')]=function(_0x5cb6d3){return client[_0x06d4('0x2')](_0x06d4('0x3'),{'body':_0x5cb6d3,'log':_0x06d4('0x3')});};
\ No newline at end of file
index 64cf7c9..a7affac 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xadb5=['dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDMaximumWordLength','dialOrderByScheduledAt','dialPrefix','dialCutDigit','Trunk','callerid','active','TrunkBackup','Interval','SquareProject','getCampaign','getCampaigns','GetCampaign','name','type','limitCalls','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialAgentRejectRetryFrequency','dialTimezone','dialGlobalInterval','dialAMDInitialSilence','dialAMDAfterGreetingSilence','dialAMDMinWordLength'];(function(_0x3a63d2,_0x3830e4){var _0x16db35=function(_0xe8c6f6){while(--_0xe8c6f6){_0x3a63d2['push'](_0x3a63d2['shift']());}};_0x16db35(++_0x3830e4);}(_0xadb5,0xad));var _0x5adb=function(_0x45ad2a,_0x21139f){_0x45ad2a=_0x45ad2a-0x0;var _0x499737=_0xadb5[_0x45ad2a];return _0x499737;};'use strict';var client=require('../client');exports[_0x5adb('0x0')]=function(){return function(){return client['Request'](_0x5adb('0x1'),{'options':{'raw':![],'attributes':['id',_0x5adb('0x2'),_0x5adb('0x3'),'active',_0x5adb('0x4'),_0x5adb('0x5'),_0x5adb('0x6'),'dialOriginateTimeout',_0x5adb('0x7'),_0x5adb('0x8'),_0x5adb('0x9'),_0x5adb('0xa'),_0x5adb('0xb'),_0x5adb('0xc'),_0x5adb('0xd'),_0x5adb('0xe'),_0x5adb('0xf'),_0x5adb('0x10'),_0x5adb('0x11'),_0x5adb('0x12'),_0x5adb('0x13'),_0x5adb('0x14'),'dialMachineRetryFrequency','dialAgentRejectMaxRetry',_0x5adb('0x15'),_0x5adb('0x16'),_0x5adb('0x17'),'dialAMDActive',_0x5adb('0x18'),'dialAMDGreeting',_0x5adb('0x19'),'dialAMDTotalAnalysisTime',_0x5adb('0x1a'),_0x5adb('0x1b'),_0x5adb('0x1c'),'dialAMDSilenceThreshold',_0x5adb('0x1d'),_0x5adb('0x1e'),_0x5adb('0x1f'),'dialRandomLastDigitCallerIdNumber',_0x5adb('0x20')],'include':[{'model':'Trunk','as':_0x5adb('0x21'),'attributes':['id',_0x5adb('0x2'),_0x5adb('0x22'),_0x5adb('0x23')]},{'model':_0x5adb('0x21'),'as':_0x5adb('0x24'),'attributes':['id',_0x5adb('0x2'),_0x5adb('0x22'),_0x5adb('0x23')]},{'model':'Interval','as':_0x5adb('0x25'),'attributes':['id','name'],'include':[{'model':_0x5adb('0x25'),'as':'Intervals','attributes':['id',_0x5adb('0x2'),'interval']}]},{'model':'SquareProject','as':_0x5adb('0x26'),'attributes':['id',_0x5adb('0x2')]}]},'log':_0x5adb('0x27')});};};
\ 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(_0x2e26e2,_0x24b5a6){var _0x33d20a=function(_0xdf21){while(--_0xdf21){_0x2e26e2['push'](_0x2e26e2['shift']());}};_0x33d20a(++_0x24b5a6);}(_0xdb28,0x106));var _0x8db2=function(_0x1905a5,_0x21caff){_0x1905a5=_0x1905a5-0x0;var _0x3f53de=_0xdb28[_0x1905a5];return _0x3f53de;};'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 9196369..7044bc1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5c3d=['GetCmContact','createContact','CreateCmContact','getContacts','Request'];(function(_0x593c1b,_0x35c524){var _0x4e0c07=function(_0x8c0aab){while(--_0x8c0aab){_0x593c1b['push'](_0x593c1b['shift']());}};_0x4e0c07(++_0x35c524);}(_0x5c3d,0x10f));var _0xd5c3=function(_0x50169c,_0x1c82e1){_0x50169c=_0x50169c-0x0;var _0x401b25=_0x5c3d[_0x50169c];return _0x401b25;};'use strict';var client=require('../client');exports[_0xd5c3('0x0')]=function(_0xb2062){return function(){return client['Request'](_0xd5c3('0x1'),{'body':_0xb2062,'log':_0xd5c3('0x1')});};};exports[_0xd5c3('0x2')]=function(_0x5bec25){return function(){return client[_0xd5c3('0x3')](_0xd5c3('0x4'),{'options':_0x5bec25,'log':_0xd5c3('0x4')});};};
\ No newline at end of file
+var _0x7324=['getContacts','Request','../client','createContact','CreateCmContact'];(function(_0x3b9e48,_0x52117c){var _0xdd7245=function(_0x5a1291){while(--_0x5a1291){_0x3b9e48['push'](_0x3b9e48['shift']());}};_0xdd7245(++_0x52117c);}(_0x7324,0x8e));var _0x4732=function(_0x1680d5,_0x345f00){_0x1680d5=_0x1680d5-0x0;var _0x5e080d=_0x7324[_0x1680d5];return _0x5e080d;};'use strict';var client=require(_0x4732('0x0'));exports[_0x4732('0x1')]=function(_0x4a6516){return function(){return client['Request'](_0x4732('0x2'),{'body':_0x4a6516,'log':_0x4732('0x2')});};};exports[_0x4732('0x3')]=function(_0x2181cc){return function(){return client[_0x4732('0x4')]('GetCmContact',{'options':_0x2181cc,'log':'GetCmContact'});};};
\ No newline at end of file
index da8554e..d4d52a2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7dee=['CmContact','getCmHopper','UpdateCmHopper','format','rescheduleContact','ContactId','ListId','VoiceQueueId','CampaignId','destroyContact','DestroyCmHopper','getContactDialer','GetContactDialer','DESC','scheduledat','ASC','getContactDialerIvr','YYYY-MM-DD\x20HH:mm:ss','Contact','priority','GetContactDialerIvr','moveContactManagedDialer','queue','MoveContactManagedDialer','countReScheduled','CountReScheduled','getContactPreview','GetCmHopperPreview','User','Agent','name','VoiceQueue','Queue','getContactRecallMe','GetContactRecallMe','voicePause','db.CmHopper.UserId','resetActiveCalls','ResetActiveCalls','handlePreviewRecallNotifications','CmHopperHandlePreviewRecallNotifications','../client','getContacts','Request','GetCmHopper'];(function(_0x72c67a,_0xb3e2b8){var _0x40e05d=function(_0x2080d6){while(--_0x2080d6){_0x72c67a['push'](_0x72c67a['shift']());}};_0x40e05d(++_0xb3e2b8);}(_0x7dee,0xb0));var _0xe7de=function(_0x169b01,_0x565014){_0x169b01=_0x169b01-0x0;var _0x30d41=_0x7dee[_0x169b01];return _0x30d41;};'use strict';var client=require(_0xe7de('0x0'));var moment=require('moment');exports[_0xe7de('0x1')]=function(_0x51419e,_0x3aade6){return function(){return client[_0xe7de('0x2')](_0xe7de('0x3'),{'options':{'where':{'VoiceQueueId':_0x51419e},'include':[{'model':_0xe7de('0x4'),'as':'Contact'}],'limit':_0x3aade6,'raw':![]},'log':_0xe7de('0x5')});};};exports['updateContacts']=function(_0x38d39e,_0x19f79d,_0x26a524){return function(){return client[_0xe7de('0x2')](_0xe7de('0x6'),{'body':_0x38d39e,'options':{'where':{'VoiceQueueId':_0x19f79d,'scheduledat':{'$lte':moment()[_0xe7de('0x7')]('YYYY-MM-DD\x20HH:mm:ss')}},'limit':_0x26a524},'log':_0xe7de('0x6')});};};exports[_0xe7de('0x8')]=function(_0x27629b){return client[_0xe7de('0x2')]('UpdateCmHopper',{'body':_0x27629b,'options':{'where':{'ContactId':_0x27629b[_0xe7de('0x9')],'ListId':_0x27629b[_0xe7de('0xa')],'VoiceQueueId':_0x27629b[_0xe7de('0xb')],'CampaignId':_0x27629b[_0xe7de('0xc')]}},'log':_0xe7de('0x8')});};exports[_0xe7de('0xd')]=function(_0x358e90,_0x4d9722,_0x15b4b5){return function(){return client[_0xe7de('0x2')](_0xe7de('0xe'),{'options':{'where':{'VoiceQueueId':_0x358e90,'ListId':_0x4d9722,'ContactId':_0x15b4b5}},'log':_0xe7de('0xe')});};};exports[_0xe7de('0xf')]=function(_0x47fe72,_0x1cb4cf,_0x45f394,_0x280473){return client[_0xe7de('0x2')](_0xe7de('0x10'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x47fe72,'active':![],'scheduledat':{'$lte':moment()[_0xe7de('0x7')]('YYYY-MM-DD\x20HH:mm:ss')},'$or':[{'UserId':null},{'UserId':{'$in':_0x1cb4cf}}]},'order':[['priority',_0xe7de('0x11')],[_0xe7de('0x12'),_0x280473],['id',_0xe7de('0x13')]],'raw':!![],'limit':_0x45f394},'log':_0xe7de('0x10')});};exports[_0xe7de('0x14')]=function(_0x573cb4,_0xa16c4a,_0x4b1648){return client['Request']('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x573cb4,'active':![],'scheduledat':{'$lte':moment()[_0xe7de('0x7')](_0xe7de('0x15'))}},'include':[{'model':'CmContact','as':_0xe7de('0x16')}],'order':[[_0xe7de('0x17'),_0xe7de('0x11')],[_0xe7de('0x12'),_0x4b1648],['id',_0xe7de('0x13')]],'raw':!![],'limit':_0xa16c4a},'log':_0xe7de('0x18')});};exports[_0xe7de('0x19')]=function(_0xfead44,_0x1c6fa6){_0xfead44['campaign']=_0xfead44[_0xe7de('0x1a')];return client[_0xe7de('0x2')](_0xe7de('0x1b'),{'body':_0xfead44,'options':{'where':{'ContactId':_0xfead44['ContactId'],'ListId':_0xfead44[_0xe7de('0xa')],'VoiceQueueId':_0xfead44['VoiceQueueId'],'CampaignId':_0xfead44[_0xe7de('0xc')],'active':_0x1c6fa6?undefined:!![]}},'log':_0xe7de('0x1b')});};exports[_0xe7de('0x1c')]=function(_0x5e97ec){return client[_0xe7de('0x2')](_0xe7de('0x1d'),{'options':{'where':{'VoiceQueueId':_0x5e97ec['id']?_0x5e97ec['id']||null:null}},'log':_0xe7de('0x1c')});};exports[_0xe7de('0x1e')]=function(_0x2c65c1){return function(){return client[_0xe7de('0x2')](_0xe7de('0x1f'),{'options':{'where':{'id':_0x2c65c1},'include':[{'model':_0xe7de('0x4'),'as':'Contact'},{'model':_0xe7de('0x20'),'as':_0xe7de('0x21'),'attributes':['id',_0xe7de('0x22')]},{'model':_0xe7de('0x23'),'as':_0xe7de('0x24'),'attributes':['id',_0xe7de('0x22')]}],'raw':!![]},'log':_0xe7de('0x5')});};};exports['unlockContact']=function(_0x917378,_0x33c364,_0x3a4666){return client[_0xe7de('0x2')](_0xe7de('0x6'),{'body':_0x917378,'options':{'where':{'id':_0x33c364},'limit':_0x3a4666},'log':'UpdateCmHopper'});};exports[_0xe7de('0x25')]=function(_0x241a37,_0x596cb2){return function(){return client['Request'](_0xe7de('0x26'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x241a37,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0xe7de('0x7')](_0xe7de('0x15'))},'UserId':{'$in':_0x596cb2}},'order':[[_0xe7de('0x17'),'DESC'],[_0xe7de('0x12'),_0xe7de('0x11')],['id',_0xe7de('0x13')]],'include':[{'model':_0xe7de('0x4'),'as':'Contact'},{'model':_0xe7de('0x20'),'as':_0xe7de('0x21'),'attributes':['id',_0xe7de('0x22'),_0xe7de('0x27')]}],'group':_0xe7de('0x28'),'raw':!![]},'log':_0xe7de('0x10')});};};exports[_0xe7de('0x29')]=function(_0x4726ff,_0x5784fa){return client[_0xe7de('0x2')](_0xe7de('0x2a'),{'body':_0x4726ff,'options':_0x5784fa||{},'log':_0xe7de('0x2a')});};exports[_0xe7de('0x2b')]=function(_0x2255ef,_0xbcab4a,_0x4740e2){return function(){return client[_0xe7de('0x2')](_0xe7de('0x2c'),{'body':{'where':{'voiceQueueIds':_0x2255ef,'interval':_0xbcab4a,'availableAgentsIds':_0x4740e2}},'log':_0xe7de('0x2b')});};};
\ No newline at end of file
+var _0x1115=['getContactRecallMe','GetContactRecallMe','User','voicePause','db.CmHopper.UserId','resetActiveCalls','handlePreviewRecallNotifications','CmHopperHandlePreviewRecallNotifications','moment','getContacts','Request','GetCmHopper','CmContact','Contact','getCmHopper','UpdateCmHopper','format','ListId','CampaignId','destroyContact','DestroyCmHopper','getContactDialer','GetContactDialer','YYYY-MM-DD\x20HH:mm:ss','priority','DESC','ASC','GetContactDialerIvr','moveContactManagedDialer','campaign','queue','MoveContactManagedDialer','ContactId','VoiceQueueId','CountReScheduled','countReScheduled','getContactPreview','GetCmHopperPreview','Agent','name','VoiceQueue','Queue','unlockContact'];(function(_0x4459d4,_0x11a121){var _0x368d8f=function(_0x4dcd31){while(--_0x4dcd31){_0x4459d4['push'](_0x4459d4['shift']());}};_0x368d8f(++_0x11a121);}(_0x1115,0x1b6));var _0x5111=function(_0x4c7c7d,_0x4c16b1){_0x4c7c7d=_0x4c7c7d-0x0;var _0x52b069=_0x1115[_0x4c7c7d];return _0x52b069;};'use strict';var client=require('../client');var moment=require(_0x5111('0x0'));exports[_0x5111('0x1')]=function(_0x352000,_0x20e2ee){return function(){return client[_0x5111('0x2')](_0x5111('0x3'),{'options':{'where':{'VoiceQueueId':_0x352000},'include':[{'model':_0x5111('0x4'),'as':_0x5111('0x5')}],'limit':_0x20e2ee,'raw':![]},'log':_0x5111('0x6')});};};exports['updateContacts']=function(_0x5981cb,_0x467c3a,_0x115ba7){return function(){return client['Request'](_0x5111('0x7'),{'body':_0x5981cb,'options':{'where':{'VoiceQueueId':_0x467c3a,'scheduledat':{'$lte':moment()[_0x5111('0x8')]('YYYY-MM-DD\x20HH:mm:ss')}},'limit':_0x115ba7},'log':_0x5111('0x7')});};};exports['rescheduleContact']=function(_0x2d8e0a){return client[_0x5111('0x2')]('UpdateCmHopper',{'body':_0x2d8e0a,'options':{'where':{'ContactId':_0x2d8e0a['ContactId'],'ListId':_0x2d8e0a[_0x5111('0x9')],'VoiceQueueId':_0x2d8e0a['VoiceQueueId'],'CampaignId':_0x2d8e0a[_0x5111('0xa')]}},'log':'rescheduleContact'});};exports[_0x5111('0xb')]=function(_0x532984,_0x1fa1d2,_0x334450){return function(){return client[_0x5111('0x2')](_0x5111('0xc'),{'options':{'where':{'VoiceQueueId':_0x532984,'ListId':_0x1fa1d2,'ContactId':_0x334450}},'log':_0x5111('0xc')});};};exports[_0x5111('0xd')]=function(_0x1e335f,_0x10e3c4,_0x38af76,_0x62ce44){return client[_0x5111('0x2')](_0x5111('0xe'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x1e335f,'active':![],'scheduledat':{'$lte':moment()[_0x5111('0x8')](_0x5111('0xf'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x10e3c4}}]},'order':[[_0x5111('0x10'),_0x5111('0x11')],['scheduledat',_0x62ce44],['id',_0x5111('0x12')]],'raw':!![],'limit':_0x38af76},'log':'GetContactDialer'});};exports['getContactDialerIvr']=function(_0x387e1e,_0x843784,_0x638470){return client['Request'](_0x5111('0xe'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x387e1e,'active':![],'scheduledat':{'$lte':moment()[_0x5111('0x8')]('YYYY-MM-DD\x20HH:mm:ss')}},'include':[{'model':_0x5111('0x4'),'as':_0x5111('0x5')}],'order':[[_0x5111('0x10'),_0x5111('0x11')],['scheduledat',_0x638470],['id',_0x5111('0x12')]],'raw':!![],'limit':_0x843784},'log':_0x5111('0x13')});};exports[_0x5111('0x14')]=function(_0x1b3136,_0x22c7cd){_0x1b3136[_0x5111('0x15')]=_0x1b3136[_0x5111('0x16')];return client[_0x5111('0x2')](_0x5111('0x17'),{'body':_0x1b3136,'options':{'where':{'ContactId':_0x1b3136[_0x5111('0x18')],'ListId':_0x1b3136['ListId'],'VoiceQueueId':_0x1b3136[_0x5111('0x19')],'CampaignId':_0x1b3136[_0x5111('0xa')],'active':_0x22c7cd?undefined:!![]}},'log':_0x5111('0x17')});};exports['countReScheduled']=function(_0x28cc87){return client[_0x5111('0x2')](_0x5111('0x1a'),{'options':{'where':{'VoiceQueueId':_0x28cc87['id']?_0x28cc87['id']||null:null}},'log':_0x5111('0x1b')});};exports[_0x5111('0x1c')]=function(_0x33fea2){return function(){return client[_0x5111('0x2')](_0x5111('0x1d'),{'options':{'where':{'id':_0x33fea2},'include':[{'model':_0x5111('0x4'),'as':_0x5111('0x5')},{'model':'User','as':_0x5111('0x1e'),'attributes':['id',_0x5111('0x1f')]},{'model':_0x5111('0x20'),'as':_0x5111('0x21'),'attributes':['id',_0x5111('0x1f')]}],'raw':!![]},'log':_0x5111('0x6')});};};exports[_0x5111('0x22')]=function(_0x4be100,_0x1ce17f,_0x46134c){return client[_0x5111('0x2')]('UpdateCmHopper',{'body':_0x4be100,'options':{'where':{'id':_0x1ce17f},'limit':_0x46134c},'log':_0x5111('0x7')});};exports[_0x5111('0x23')]=function(_0x16107a,_0x48379a){return function(){return client['Request'](_0x5111('0x24'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x16107a,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()['format'](_0x5111('0xf'))},'UserId':{'$in':_0x48379a}},'order':[['priority',_0x5111('0x11')],['scheduledat','DESC'],['id','ASC']],'include':[{'model':_0x5111('0x4'),'as':_0x5111('0x5')},{'model':_0x5111('0x25'),'as':_0x5111('0x1e'),'attributes':['id',_0x5111('0x1f'),_0x5111('0x26')]}],'group':_0x5111('0x27'),'raw':!![]},'log':'GetContactDialer'});};};exports[_0x5111('0x28')]=function(_0x37c981,_0x1c90e6){return client[_0x5111('0x2')]('ResetActiveCalls',{'body':_0x37c981,'options':_0x1c90e6||{},'log':'ResetActiveCalls'});};exports[_0x5111('0x29')]=function(_0x769be3,_0x22fd07,_0x44b9d9){return function(){return client[_0x5111('0x2')](_0x5111('0x2a'),{'body':{'where':{'voiceQueueIds':_0x769be3,'interval':_0x22fd07,'availableAgentsIds':_0x44b9d9}},'log':_0x5111('0x29')});};};
\ No newline at end of file
index 1e93662..cfe9863 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdbe5=['IncrementPreviewCounters','../client','Request','VerifyAdditionalPhones','swapAdditionalPhones','SwapAdditionalPhones','incrementPreviewCounters'];(function(_0x51dc6a,_0x395d24){var _0x5264e7=function(_0x144be3){while(--_0x144be3){_0x51dc6a['push'](_0x51dc6a['shift']());}};_0x5264e7(++_0x395d24);}(_0xdbe5,0x166));var _0x5dbe=function(_0x4534c7,_0x5b6990){_0x4534c7=_0x4534c7-0x0;var _0x2419a6=_0xdbe5[_0x4534c7];return _0x2419a6;};'use strict';var client=require(_0x5dbe('0x0'));exports['verifyAdditionalPhones']=function(_0x3f8775,_0x753ad6,_0x1f036f){return client[_0x5dbe('0x1')](_0x5dbe('0x2'),{'body':_0x3f8775,'reason':_0x753ad6,'entity':_0x1f036f,'log':'VerifyAdditionalPhones'});};exports[_0x5dbe('0x3')]=function(_0x26a6b3,_0x122700,_0x30e0a8){return client[_0x5dbe('0x1')](_0x5dbe('0x4'),{'body':_0x26a6b3,'duration':_0x122700,'waitTime':_0x30e0a8,'log':_0x5dbe('0x4')});};exports[_0x5dbe('0x5')]=function(_0x5f419c){return function(){return client[_0x5dbe('0x1')]('IncrementPreviewCounters',{'body':_0x5f419c,'log':_0x5dbe('0x6')});};};
\ No newline at end of file
+var _0xea13=['SwapAdditionalPhones','incrementPreviewCounters','IncrementPreviewCounters','../client','verifyAdditionalPhones','Request','VerifyAdditionalPhones','swapAdditionalPhones'];(function(_0x30f59b,_0x182cc2){var _0x326cf3=function(_0x485477){while(--_0x485477){_0x30f59b['push'](_0x30f59b['shift']());}};_0x326cf3(++_0x182cc2);}(_0xea13,0xf3));var _0x3ea1=function(_0x574c9d,_0x377197){_0x574c9d=_0x574c9d-0x0;var _0x3cb50b=_0xea13[_0x574c9d];return _0x3cb50b;};'use strict';var client=require(_0x3ea1('0x0'));exports[_0x3ea1('0x1')]=function(_0x18314e,_0x44509f,_0x1c5adf){return client[_0x3ea1('0x2')](_0x3ea1('0x3'),{'body':_0x18314e,'reason':_0x44509f,'entity':_0x1c5adf,'log':_0x3ea1('0x3')});};exports[_0x3ea1('0x4')]=function(_0x462078,_0x108dfa,_0x2b6e25){return client[_0x3ea1('0x2')](_0x3ea1('0x5'),{'body':_0x462078,'duration':_0x108dfa,'waitTime':_0x2b6e25,'log':'SwapAdditionalPhones'});};exports[_0x3ea1('0x6')]=function(_0x1326df){return function(){return client['Request'](_0x3ea1('0x7'),{'body':_0x1326df,'log':_0x3ea1('0x7')});};};
\ No newline at end of file
index 365d1c3..fec75f7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xff16=['GetCmHopperBlack','CampaignId','GetCmHopperBlackIvr','../client','checkIsBlackList','Request','VoiceQueueId','phone'];(function(_0x221495,_0x3e329e){var _0x50edd5=function(_0x1355f2){while(--_0x1355f2){_0x221495['push'](_0x221495['shift']());}};_0x50edd5(++_0x3e329e);}(_0xff16,0x12b));var _0x6ff1=function(_0x484711,_0x483a03){_0x484711=_0x484711-0x0;var _0x3bd45e=_0xff16[_0x484711];return _0x3bd45e;};'use strict';var client=require(_0x6ff1('0x0'));exports[_0x6ff1('0x1')]=function(_0x13c5cf){return client[_0x6ff1('0x2')]('GetCmHopperBlack',{'options':{'where':{'VoiceQueueId':_0x13c5cf[_0x6ff1('0x3')],'phone':_0x13c5cf[_0x6ff1('0x4')]},'raw':![]},'log':_0x6ff1('0x5')});};exports['checkIsBlackListIvr']=function(_0x14ff92){return client[_0x6ff1('0x2')](_0x6ff1('0x5'),{'options':{'where':{'CampaignId':_0x14ff92[_0x6ff1('0x6')],'phone':_0x14ff92[_0x6ff1('0x4')]},'raw':![]},'log':_0x6ff1('0x7')});};
\ No newline at end of file
+var _0x868e=['checkIsBlackListIvr','CampaignId','phone','GetCmHopperBlackIvr','checkIsBlackList','Request','GetCmHopperBlack'];(function(_0x1df254,_0x143f22){var _0x2e2d2b=function(_0x5a050c){while(--_0x5a050c){_0x1df254['push'](_0x1df254['shift']());}};_0x2e2d2b(++_0x143f22);}(_0x868e,0xcf));var _0xe868=function(_0x5742c1,_0x4d1c6a){_0x5742c1=_0x5742c1-0x0;var _0x8f9bed=_0x868e[_0x5742c1];return _0x8f9bed;};'use strict';var client=require('../client');exports[_0xe868('0x0')]=function(_0x1f152e){return client[_0xe868('0x1')](_0xe868('0x2'),{'options':{'where':{'VoiceQueueId':_0x1f152e['VoiceQueueId'],'phone':_0x1f152e['phone']},'raw':![]},'log':'GetCmHopperBlack'});};exports[_0xe868('0x3')]=function(_0x3cd0a7){return client[_0xe868('0x1')](_0xe868('0x2'),{'options':{'where':{'CampaignId':_0x3cd0a7[_0xe868('0x4')],'phone':_0x3cd0a7[_0xe868('0x5')]},'raw':![]},'log':_0xe868('0x6')});};
\ No newline at end of file
index 8aa4107..2baf154 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xed8e=['../client','campaign','queue','Request','CreateCmHopperFinal'];(function(_0x3dc07f,_0x3e5353){var _0x2356f8=function(_0x18ebc0){while(--_0x18ebc0){_0x3dc07f['push'](_0x3dc07f['shift']());}};_0x2356f8(++_0x3e5353);}(_0xed8e,0x1b3));var _0xeed8=function(_0x470e52,_0xcf2fa9){_0x470e52=_0x470e52-0x0;var _0x4f8000=_0xed8e[_0x470e52];return _0x4f8000;};'use strict';var client=require(_0xeed8('0x0'));exports['createContact']=function(_0x392246){return function(){_0x392246[_0xeed8('0x1')]=_0x392246[_0xeed8('0x2')];return client[_0xeed8('0x3')]('CreateCmHopperFinal',{'body':_0x392246,'log':_0xeed8('0x4')});};};
\ No newline at end of file
+var _0x9099=['createContact','queue','Request','CreateCmHopperFinal','../client'];(function(_0x1138a2,_0xcfc5cd){var _0x49bc3f=function(_0x200eab){while(--_0x200eab){_0x1138a2['push'](_0x1138a2['shift']());}};_0x49bc3f(++_0xcfc5cd);}(_0x9099,0x1c1));var _0x9909=function(_0x37a9d7,_0x2b6fde){_0x37a9d7=_0x37a9d7-0x0;var _0x1343d3=_0x9099[_0x37a9d7];return _0x1343d3;};'use strict';var client=require(_0x9909('0x0'));exports[_0x9909('0x1')]=function(_0x23d6ee){return function(){_0x23d6ee['campaign']=_0x23d6ee[_0x9909('0x2')];return client[_0x9909('0x3')](_0x9909('0x4'),{'body':_0x23d6ee,'log':_0x9909('0x4')});};};
\ No newline at end of file
index 73b1a93..36d3bcd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe55c=['YYYY-MM-DD\x20HH:mm:ss','GetCmHopperHistory','startOf','day','endOf','getCampaignHopperHistory','GetCampaignHopperHistory','ivr','moment','campaign','queue','Request','CreateCmHopperHistory','AvgHandleTime','subtract','format'];(function(_0x31a6e9,_0x42b0fd){var _0x273198=function(_0x431427){while(--_0x431427){_0x31a6e9['push'](_0x31a6e9['shift']());}};_0x273198(++_0x42b0fd);}(_0xe55c,0x1c8));var _0xce55=function(_0x57434c,_0x4527fc){_0x57434c=_0x57434c-0x0;var _0x16991a=_0xe55c[_0x57434c];return _0x16991a;};'use strict';var client=require('../client');var moment=require(_0xce55('0x0'));exports['createHistory']=function(_0x439d25){_0x439d25[_0xce55('0x1')]=_0x439d25[_0xce55('0x2')];return client[_0xce55('0x3')](_0xce55('0x4'),{'body':_0x439d25,'log':'CreateCmHopperHistory'});};exports['avgHandleTime']=function(_0x5dfa9b){return client[_0xce55('0x3')](_0xce55('0x5'),{'options':{'where':{'endtime':{'$between':[moment()[_0xce55('0x6')](_0x5dfa9b,'minutes')[_0xce55('0x7')](_0xce55('0x8')),moment()[_0xce55('0x7')](_0xce55('0x8'))]}},'raw':![]},'log':_0xce55('0x9')});};exports['getVoiceQueueHopperHistory']=function(){return function(){return client[_0xce55('0x3')]('GetVoiceQueueHopperHistory',{'options':{'where':{'createdAt':{'$between':[moment()[_0xce55('0xa')](_0xce55('0xb'))[_0xce55('0x7')](_0xce55('0x8')),moment()[_0xce55('0xc')](_0xce55('0xb'))['format']('YYYY-MM-DD\x20HH:mm:ss')]},'campaigntype':_0xce55('0x2')},'raw':![]},'log':'GetVoiceQueueHopperHistory'});};};exports[_0xce55('0xd')]=function(){return function(){return client['Request'](_0xce55('0xe'),{'options':{'where':{'createdAt':{'$between':[moment()[_0xce55('0xa')](_0xce55('0xb'))['format'](_0xce55('0x8')),moment()[_0xce55('0xc')](_0xce55('0xb'))[_0xce55('0x7')]('YYYY-MM-DD\x20HH:mm:ss')]},'campaigntype':_0xce55('0xf')},'raw':![]},'log':'GetCampaignHopperHistory'});};};
\ No newline at end of file
+var _0x3a12=['Request','CreateCmHopperHistory','avgHandleTime','AvgHandleTime','minutes','format','YYYY-MM-DD\x20HH:mm:ss','GetVoiceQueueHopperHistory','startOf','day','endOf','GetCampaignHopperHistory','ivr','../client','createHistory','campaign','queue'];(function(_0x5cb275,_0x4ddd3f){var _0x40fdf=function(_0x3bf1b0){while(--_0x3bf1b0){_0x5cb275['push'](_0x5cb275['shift']());}};_0x40fdf(++_0x4ddd3f);}(_0x3a12,0x11d));var _0x23a1=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x3a12[_0x321bb2];return _0x9c12ed;};'use strict';var client=require(_0x23a1('0x0'));var moment=require('moment');exports[_0x23a1('0x1')]=function(_0x54f8cb){_0x54f8cb[_0x23a1('0x2')]=_0x54f8cb[_0x23a1('0x3')];return client[_0x23a1('0x4')](_0x23a1('0x5'),{'body':_0x54f8cb,'log':'CreateCmHopperHistory'});};exports[_0x23a1('0x6')]=function(_0x1709e1){return client[_0x23a1('0x4')](_0x23a1('0x7'),{'options':{'where':{'endtime':{'$between':[moment()['subtract'](_0x1709e1,_0x23a1('0x8'))[_0x23a1('0x9')](_0x23a1('0xa')),moment()[_0x23a1('0x9')]('YYYY-MM-DD\x20HH:mm:ss')]}},'raw':![]},'log':'GetCmHopperHistory'});};exports['getVoiceQueueHopperHistory']=function(){return function(){return client[_0x23a1('0x4')](_0x23a1('0xb'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x23a1('0xc')](_0x23a1('0xd'))['format'](_0x23a1('0xa')),moment()[_0x23a1('0xe')](_0x23a1('0xd'))[_0x23a1('0x9')](_0x23a1('0xa'))]},'campaigntype':'queue'},'raw':![]},'log':_0x23a1('0xb')});};};exports['getCampaignHopperHistory']=function(){return function(){return client[_0x23a1('0x4')](_0x23a1('0xf'),{'options':{'where':{'createdAt':{'$between':[moment()['startOf'](_0x23a1('0xd'))[_0x23a1('0x9')](_0x23a1('0xa')),moment()['endOf']('day')[_0x23a1('0x9')](_0x23a1('0xa'))]},'campaigntype':_0x23a1('0x10')},'raw':![]},'log':_0x23a1('0xf')});};};
\ No newline at end of file
index f0eef14..4d11e19 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa908=['faxdetect','t38timeout','tech','TrunkId','ListId','key','Trunk','callerid','getFaxAccount','notify','NotifyFaxAccount','../client','Request','name','description','ecm','headerinfo','localstationid','maxrate','modem'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xa908,0x1c3));var _0x8a90=function(_0x4c4a18,_0x35be2c){_0x4c4a18=_0x4c4a18-0x0;var _0x51a123=_0xa908[_0x4c4a18];return _0x51a123;};'use strict';var client=require(_0x8a90('0x0'));exports['getFaxAccounts']=function(){return function(){return client[_0x8a90('0x1')]('GetFaxAccount',{'options':{'raw':![],'attributes':['id',_0x8a90('0x2'),_0x8a90('0x3'),_0x8a90('0x4'),_0x8a90('0x5'),_0x8a90('0x6'),'minrate',_0x8a90('0x7'),_0x8a90('0x8'),'gateway',_0x8a90('0x9'),_0x8a90('0xa'),_0x8a90('0xb'),_0x8a90('0xc'),_0x8a90('0xd'),_0x8a90('0xe')],'include':[{'model':'Trunk','as':_0x8a90('0xf'),'attributes':['id','name',_0x8a90('0x10'),'active']}]},'log':_0x8a90('0x11')});};};exports[_0x8a90('0x12')]=function(_0x4684f8,_0xd174f3){return client[_0x8a90('0x1')](_0x8a90('0x13'),{'account':{'id':_0x4684f8},'body':_0xd174f3,'log':_0x8a90('0x13')});};
\ No newline at end of file
+var _0xccef=['callerid','active','getFaxAccount','notify','Request','NotifyFaxAccount','getFaxAccounts','GetFaxAccount','name','description','ecm','headerinfo','localstationid','modem','faxdetect','t38timeout','tech','TrunkId','ListId','key','Trunk'];(function(_0x2b24d0,_0x49b3d7){var _0x1a2482=function(_0x4c22ad){while(--_0x4c22ad){_0x2b24d0['push'](_0x2b24d0['shift']());}};_0x1a2482(++_0x49b3d7);}(_0xccef,0x1d4));var _0xfcce=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0xccef[_0x17d9e3];return _0x14192d;};'use strict';var client=require('../client');exports[_0xfcce('0x0')]=function(){return function(){return client['Request'](_0xfcce('0x1'),{'options':{'raw':![],'attributes':['id',_0xfcce('0x2'),_0xfcce('0x3'),_0xfcce('0x4'),_0xfcce('0x5'),_0xfcce('0x6'),'minrate','maxrate',_0xfcce('0x7'),'gateway',_0xfcce('0x8'),_0xfcce('0x9'),_0xfcce('0xa'),_0xfcce('0xb'),_0xfcce('0xc'),_0xfcce('0xd')],'include':[{'model':_0xfcce('0xe'),'as':'Trunk','attributes':['id',_0xfcce('0x2'),_0xfcce('0xf'),_0xfcce('0x10')]}]},'log':_0xfcce('0x11')});};};exports[_0xfcce('0x12')]=function(_0x8e38f5,_0x1f183e){return client[_0xfcce('0x13')](_0xfcce('0x14'),{'account':{'id':_0x8e38f5},'body':_0x1f183e,'log':_0xfcce('0x14')});};
\ No newline at end of file
index e6e21be..5a57f84 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa2f6=['../client','update','UpdateFaxMessage'];(function(_0x535345,_0x206b21){var _0x28c2b7=function(_0x233c94){while(--_0x233c94){_0x535345['push'](_0x535345['shift']());}};_0x28c2b7(++_0x206b21);}(_0xa2f6,0x1b0));var _0x6a2f=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xa2f6[_0x321bb2];return _0x9c12ed;};'use strict';var client=require(_0x6a2f('0x0'));exports[_0x6a2f('0x1')]=function(_0xd2b959,_0x2dd85d){return client['Request'](_0x6a2f('0x2'),{'body':_0x2dd85d,'options':{'where':{'AttachmentId':_0xd2b959}},'log':'UpdateFaxMessage'});};
\ No newline at end of file
+var _0x748b=['UpdateFaxMessage','../client','update','Request'];(function(_0x2ea183,_0x3cff11){var _0x47c16c=function(_0x3d91e5){while(--_0x3d91e5){_0x2ea183['push'](_0x2ea183['shift']());}};_0x47c16c(++_0x3cff11);}(_0x748b,0x13d));var _0xb748=function(_0x248ef2,_0x188172){_0x248ef2=_0x248ef2-0x0;var _0x9b3b7e=_0x748b[_0x248ef2];return _0x9b3b7e;};'use strict';var client=require(_0xb748('0x0'));exports[_0xb748('0x1')]=function(_0x45eb4b,_0x130aa9){return client[_0xb748('0x2')](_0xb748('0x3'),{'body':_0x130aa9,'options':{'where':{'AttachmentId':_0x45eb4b}},'log':_0xb748('0x3')});};
\ No newline at end of file
index 03d246c..d0ae5f6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x840e=['serverUrl','DeskConfiguration','Configurations','DeskField','Subjects','variableName','Variable','Descriptions','key','keyType','keyContent','Fields','content','customField','Tag','Tags','GetDeskAccount','../../client','getDeskAccounts','Request','name','description','username','password','authType','type'];(function(_0x157493,_0x499449){var _0x257ca2=function(_0x502de8){while(--_0x502de8){_0x157493['push'](_0x157493['shift']());}};_0x257ca2(++_0x499449);}(_0x840e,0x149));var _0xe840=function(_0x3cb152,_0x57eb54){_0x3cb152=_0x3cb152-0x0;var _0x4f54c3=_0x840e[_0x3cb152];return _0x4f54c3;};'use strict';var client=require(_0xe840('0x0'));exports[_0xe840('0x1')]=function(){return function(_0x19e339){return client[_0xe840('0x2')]('GetDeskAccount',{'options':{'raw':![],'attributes':['id',_0xe840('0x3'),_0xe840('0x4'),_0xe840('0x5'),_0xe840('0x6'),'remoteUri',_0xe840('0x7'),_0xe840('0x8'),_0xe840('0x9')],'include':[{'model':_0xe840('0xa'),'as':_0xe840('0xb'),'attributes':['id','name'],'include':[{'model':_0xe840('0xc'),'as':_0xe840('0xd'),'attributes':['id',_0xe840('0x8'),'content',_0xe840('0xe')],'include':[{'model':_0xe840('0xf'),'as':_0xe840('0xf'),'attributes':['id',_0xe840('0x3')]}]},{'model':_0xe840('0xc'),'as':_0xe840('0x10'),'attributes':['id',_0xe840('0x8'),'content',_0xe840('0x11'),_0xe840('0x12'),_0xe840('0x13'),_0xe840('0xe')],'include':[{'model':_0xe840('0xf'),'as':'Variable','attributes':['id',_0xe840('0x3')]}]},{'model':_0xe840('0xc'),'as':_0xe840('0x14'),'attributes':['id',_0xe840('0x8'),_0xe840('0x15'),'idField','nameField',_0xe840('0x16'),_0xe840('0xe')],'include':[{'model':_0xe840('0xf'),'as':_0xe840('0xf'),'attributes':['id',_0xe840('0x3')]}]},{'model':_0xe840('0x17'),'as':_0xe840('0x18'),'attributes':['id','name']}]}]},'log':_0xe840('0x19')});};};
\ No newline at end of file
+var _0x3e9d=['username','remoteUri','authType','type','serverUrl','DeskConfiguration','Configurations','DeskField','Subjects','content','variableName','Variable','Descriptions','key','keyType','keyContent','Fields','idField','nameField','customField','Tag','Tags','../../client','getDeskAccounts','Request','GetDeskAccount','name','description'];(function(_0x116b5b,_0x16461f){var _0x475a5d=function(_0x2ec77f){while(--_0x2ec77f){_0x116b5b['push'](_0x116b5b['shift']());}};_0x475a5d(++_0x16461f);}(_0x3e9d,0x12e));var _0xd3e9=function(_0x1c1f5a,_0x5f2383){_0x1c1f5a=_0x1c1f5a-0x0;var _0x505066=_0x3e9d[_0x1c1f5a];return _0x505066;};'use strict';var client=require(_0xd3e9('0x0'));exports[_0xd3e9('0x1')]=function(){return function(_0x184d6a){return client[_0xd3e9('0x2')](_0xd3e9('0x3'),{'options':{'raw':![],'attributes':['id',_0xd3e9('0x4'),_0xd3e9('0x5'),_0xd3e9('0x6'),'password',_0xd3e9('0x7'),_0xd3e9('0x8'),_0xd3e9('0x9'),_0xd3e9('0xa')],'include':[{'model':_0xd3e9('0xb'),'as':_0xd3e9('0xc'),'attributes':['id',_0xd3e9('0x4')],'include':[{'model':_0xd3e9('0xd'),'as':_0xd3e9('0xe'),'attributes':['id',_0xd3e9('0x9'),_0xd3e9('0xf'),_0xd3e9('0x10')],'include':[{'model':_0xd3e9('0x11'),'as':_0xd3e9('0x11'),'attributes':['id',_0xd3e9('0x4')]}]},{'model':_0xd3e9('0xd'),'as':_0xd3e9('0x12'),'attributes':['id',_0xd3e9('0x9'),'content',_0xd3e9('0x13'),_0xd3e9('0x14'),_0xd3e9('0x15'),'variableName'],'include':[{'model':'Variable','as':_0xd3e9('0x11'),'attributes':['id','name']}]},{'model':_0xd3e9('0xd'),'as':_0xd3e9('0x16'),'attributes':['id',_0xd3e9('0x9'),_0xd3e9('0xf'),_0xd3e9('0x17'),_0xd3e9('0x18'),_0xd3e9('0x19'),_0xd3e9('0x10')],'include':[{'model':_0xd3e9('0x11'),'as':_0xd3e9('0x11'),'attributes':['id',_0xd3e9('0x4')]}]},{'model':_0xd3e9('0x1a'),'as':_0xd3e9('0x1b'),'attributes':['id',_0xd3e9('0x4')]}]}]},'log':_0xd3e9('0x3')});};};
\ No newline at end of file
index 4fba32d..30f57b8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6d0c=['../../client','getDynamics365Accounts','Request','GetDynamics365Account','name','password','clientId','description','modernAuthentication','Dynamics365Configuration','Configurations','ticketType','moduleCreate','additionalSearchContact','openNewTab','Dynamics365Field','Subjects','type','content','variableName','Variable','Descriptions','key','keyType','Fields','nameField','CloudProvider','data7'];(function(_0x49f28b,_0xb46d79){var _0x2943c8=function(_0xf15a0b){while(--_0xf15a0b){_0x49f28b['push'](_0x49f28b['shift']());}};_0x2943c8(++_0xb46d79);}(_0x6d0c,0x8c));var _0xc6d0=function(_0xbf1e89,_0x44f1fc){_0xbf1e89=_0xbf1e89-0x0;var _0x53e1a3=_0x6d0c[_0xbf1e89];return _0x53e1a3;};'use strict';var client=require(_0xc6d0('0x0'));exports[_0xc6d0('0x1')]=function(){return function(_0x26cdc7){return client[_0xc6d0('0x2')](_0xc6d0('0x3'),{'options':{'raw':![],'attributes':['id',_0xc6d0('0x4'),'username',_0xc6d0('0x5'),'remoteUri','tenantId',_0xc6d0('0x6'),'clientSecret','serverUrl',_0xc6d0('0x7'),_0xc6d0('0x8')],'include':[{'model':_0xc6d0('0x9'),'as':_0xc6d0('0xa'),'attributes':['id',_0xc6d0('0x4'),_0xc6d0('0xb'),_0xc6d0('0xc'),_0xc6d0('0xd'),_0xc6d0('0xe')],'include':[{'model':_0xc6d0('0xf'),'as':_0xc6d0('0x10'),'attributes':['id',_0xc6d0('0x11'),_0xc6d0('0x12'),_0xc6d0('0x13')],'include':[{'model':_0xc6d0('0x14'),'as':_0xc6d0('0x14'),'attributes':['id',_0xc6d0('0x4')]}]},{'model':_0xc6d0('0xf'),'as':_0xc6d0('0x15'),'attributes':['id','type','content',_0xc6d0('0x16'),_0xc6d0('0x17'),'keyContent',_0xc6d0('0x13')],'include':[{'model':_0xc6d0('0x14'),'as':_0xc6d0('0x14'),'attributes':['id','name']}]},{'model':'Dynamics365Field','as':_0xc6d0('0x18'),'attributes':['id',_0xc6d0('0x11'),_0xc6d0('0x12'),'idField',_0xc6d0('0x19'),'customField',_0xc6d0('0x13')],'include':[{'model':_0xc6d0('0x14'),'as':_0xc6d0('0x14'),'attributes':['id',_0xc6d0('0x4')]}]}]},{'model':_0xc6d0('0x1a'),'as':'CloudProvider','attributes':['id','data2','data5',_0xc6d0('0x1b')]}]},'log':_0xc6d0('0x3')});};};
\ No newline at end of file
+var _0xa571=['data5','GetDynamics365Account','../../client','getDynamics365Accounts','Request','name','username','tenantId','clientSecret','serverUrl','description','modernAuthentication','Dynamics365Configuration','Configurations','ticketType','moduleCreate','additionalSearchContact','Dynamics365Field','Subjects','type','content','variableName','Variable','key','keyContent','Fields','nameField','CloudProvider','data2'];(function(_0x2179f1,_0x21c653){var _0x176ec9=function(_0x4c4a4c){while(--_0x4c4a4c){_0x2179f1['push'](_0x2179f1['shift']());}};_0x176ec9(++_0x21c653);}(_0xa571,0x107));var _0x1a57=function(_0x270dfa,_0x2d07df){_0x270dfa=_0x270dfa-0x0;var _0x37c5f8=_0xa571[_0x270dfa];return _0x37c5f8;};'use strict';var client=require(_0x1a57('0x0'));exports[_0x1a57('0x1')]=function(){return function(_0x206f1b){return client[_0x1a57('0x2')]('GetDynamics365Account',{'options':{'raw':![],'attributes':['id',_0x1a57('0x3'),_0x1a57('0x4'),'password','remoteUri',_0x1a57('0x5'),'clientId',_0x1a57('0x6'),_0x1a57('0x7'),_0x1a57('0x8'),_0x1a57('0x9')],'include':[{'model':_0x1a57('0xa'),'as':_0x1a57('0xb'),'attributes':['id','name',_0x1a57('0xc'),_0x1a57('0xd'),_0x1a57('0xe'),'openNewTab'],'include':[{'model':_0x1a57('0xf'),'as':_0x1a57('0x10'),'attributes':['id',_0x1a57('0x11'),_0x1a57('0x12'),_0x1a57('0x13')],'include':[{'model':_0x1a57('0x14'),'as':_0x1a57('0x14'),'attributes':['id',_0x1a57('0x3')]}]},{'model':'Dynamics365Field','as':'Descriptions','attributes':['id',_0x1a57('0x11'),_0x1a57('0x12'),_0x1a57('0x15'),'keyType',_0x1a57('0x16'),_0x1a57('0x13')],'include':[{'model':'Variable','as':_0x1a57('0x14'),'attributes':['id','name']}]},{'model':_0x1a57('0xf'),'as':_0x1a57('0x17'),'attributes':['id',_0x1a57('0x11'),_0x1a57('0x12'),'idField',_0x1a57('0x18'),'customField','variableName'],'include':[{'model':_0x1a57('0x14'),'as':_0x1a57('0x14'),'attributes':['id',_0x1a57('0x3')]}]}]},{'model':'CloudProvider','as':_0x1a57('0x19'),'attributes':['id',_0x1a57('0x1a'),_0x1a57('0x1b'),'data7']}]},'log':_0x1a57('0x1c')});};};
\ No newline at end of file
index 69629f5..44b346c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x578c=['Configurations','Tag','FreshdeskField','Subjects','type','content','variableName','Variable','Descriptions','key','keyType','Fields','idField','customField','../../client','getFreshdeskAccounts','GetFreshdeskAccount','name','username','remoteUri','serverUrl','FreshdeskConfiguration'];(function(_0x5d6456,_0x58ecc7){var _0x4d66c1=function(_0x4335e3){while(--_0x4335e3){_0x5d6456['push'](_0x5d6456['shift']());}};_0x4d66c1(++_0x58ecc7);}(_0x578c,0x158));var _0xc578=function(_0x4f103a,_0x2d22c4){_0x4f103a=_0x4f103a-0x0;var _0x18035e=_0x578c[_0x4f103a];return _0x18035e;};'use strict';var client=require(_0xc578('0x0'));exports[_0xc578('0x1')]=function(){return function(_0x161686){return client['Request'](_0xc578('0x2'),{'options':{'raw':![],'attributes':['id',_0xc578('0x3'),_0xc578('0x4'),'apiKey',_0xc578('0x5'),_0xc578('0x6')],'include':[{'model':_0xc578('0x7'),'as':_0xc578('0x8'),'attributes':['id',_0xc578('0x3')],'include':[{'model':_0xc578('0x9'),'attributes':['id',_0xc578('0x3')]},{'model':_0xc578('0xa'),'as':_0xc578('0xb'),'attributes':['id',_0xc578('0xc'),_0xc578('0xd'),_0xc578('0xe')],'include':[{'model':_0xc578('0xf'),'as':_0xc578('0xf'),'attributes':['id','name']}]},{'model':'FreshdeskField','as':_0xc578('0x10'),'attributes':['id','type',_0xc578('0xd'),_0xc578('0x11'),_0xc578('0x12'),'keyContent',_0xc578('0xe')],'include':[{'model':_0xc578('0xf'),'as':_0xc578('0xf'),'attributes':['id','name']}]},{'model':_0xc578('0xa'),'as':_0xc578('0x13'),'attributes':['id',_0xc578('0xc'),_0xc578('0xd'),_0xc578('0x14'),'nameField',_0xc578('0x15'),_0xc578('0xe')],'include':[{'model':_0xc578('0xf'),'as':_0xc578('0xf'),'attributes':['id',_0xc578('0x3')]}]}]}]},'log':_0xc578('0x2')});};};
\ No newline at end of file
+var _0xae8e=['username','apiKey','remoteUri','serverUrl','FreshdeskConfiguration','Configurations','Tag','FreshdeskField','Subjects','type','content','variableName','Variable','Descriptions','key','keyType','keyContent','Fields','nameField','customField','../../client','getFreshdeskAccounts','Request','GetFreshdeskAccount','name'];(function(_0x5bda2c,_0x1cf31d){var _0x16b2bb=function(_0x34e0a9){while(--_0x34e0a9){_0x5bda2c['push'](_0x5bda2c['shift']());}};_0x16b2bb(++_0x1cf31d);}(_0xae8e,0xc3));var _0xeae8=function(_0x5e3369,_0x39a713){_0x5e3369=_0x5e3369-0x0;var _0x23689f=_0xae8e[_0x5e3369];return _0x23689f;};'use strict';var client=require(_0xeae8('0x0'));exports[_0xeae8('0x1')]=function(){return function(_0x238458){return client[_0xeae8('0x2')](_0xeae8('0x3'),{'options':{'raw':![],'attributes':['id',_0xeae8('0x4'),_0xeae8('0x5'),_0xeae8('0x6'),_0xeae8('0x7'),_0xeae8('0x8')],'include':[{'model':_0xeae8('0x9'),'as':_0xeae8('0xa'),'attributes':['id',_0xeae8('0x4')],'include':[{'model':_0xeae8('0xb'),'attributes':['id',_0xeae8('0x4')]},{'model':_0xeae8('0xc'),'as':_0xeae8('0xd'),'attributes':['id',_0xeae8('0xe'),_0xeae8('0xf'),_0xeae8('0x10')],'include':[{'model':_0xeae8('0x11'),'as':_0xeae8('0x11'),'attributes':['id',_0xeae8('0x4')]}]},{'model':_0xeae8('0xc'),'as':_0xeae8('0x12'),'attributes':['id',_0xeae8('0xe'),_0xeae8('0xf'),_0xeae8('0x13'),_0xeae8('0x14'),_0xeae8('0x15'),_0xeae8('0x10')],'include':[{'model':'Variable','as':_0xeae8('0x11'),'attributes':['id',_0xeae8('0x4')]}]},{'model':_0xeae8('0xc'),'as':_0xeae8('0x16'),'attributes':['id',_0xeae8('0xe'),_0xeae8('0xf'),'idField',_0xeae8('0x17'),_0xeae8('0x18'),_0xeae8('0x10')],'include':[{'model':_0xeae8('0x11'),'as':_0xeae8('0x11'),'attributes':['id',_0xeae8('0x4')]}]}]}]},'log':_0xeae8('0x3')});};};
\ No newline at end of file
index f100604..51cc794 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf40b=['Descriptions','key','keyContent','variableName','GetFreshsalesccount','getFreshsalesAccounts','Request','GetFreshsalesAccount','username','apiKey','remoteUri','serverUrl','FreshsalesConfiguration','name','FreshsalesField','Subjects','type','content','Variable'];(function(_0x561f79,_0x2bf857){var _0xef104e=function(_0x2c7884){while(--_0x2c7884){_0x561f79['push'](_0x561f79['shift']());}};_0xef104e(++_0x2bf857);}(_0xf40b,0xb0));var _0xbf40=function(_0x4bfb94,_0x57e844){_0x4bfb94=_0x4bfb94-0x0;var _0x55bde6=_0xf40b[_0x4bfb94];return _0x55bde6;};'use strict';var client=require('../../client');exports[_0xbf40('0x0')]=function(){return function(_0x31cc68){return client[_0xbf40('0x1')](_0xbf40('0x2'),{'options':{'raw':![],'attributes':['id','name',_0xbf40('0x3'),_0xbf40('0x4'),_0xbf40('0x5'),_0xbf40('0x6')],'include':[{'model':_0xbf40('0x7'),'as':'Configurations','attributes':['id',_0xbf40('0x8')],'include':[{'model':_0xbf40('0x9'),'as':_0xbf40('0xa'),'attributes':['id',_0xbf40('0xb'),_0xbf40('0xc'),'variableName'],'include':[{'model':_0xbf40('0xd'),'as':_0xbf40('0xd'),'attributes':['id',_0xbf40('0x8')]}]},{'model':_0xbf40('0x9'),'as':_0xbf40('0xe'),'attributes':['id',_0xbf40('0xb'),_0xbf40('0xc'),_0xbf40('0xf'),'keyType',_0xbf40('0x10'),_0xbf40('0x11')],'include':[{'model':_0xbf40('0xd'),'as':_0xbf40('0xd'),'attributes':['id',_0xbf40('0x8')]}]}]}]},'log':_0xbf40('0x12')});};};
\ No newline at end of file
+var _0xd101=['serverUrl','Configurations','FreshsalesField','Subjects','type','content','variableName','Variable','Descriptions','key','keyType','keyContent','GetFreshsalesccount','../../client','Request','GetFreshsalesAccount','name','username','apiKey','remoteUri'];(function(_0x481910,_0x50dec4){var _0x2c8f62=function(_0x33b051){while(--_0x33b051){_0x481910['push'](_0x481910['shift']());}};_0x2c8f62(++_0x50dec4);}(_0xd101,0xc1));var _0x1d10=function(_0x256e50,_0x2ef614){_0x256e50=_0x256e50-0x0;var _0x3f1f02=_0xd101[_0x256e50];return _0x3f1f02;};'use strict';var client=require(_0x1d10('0x0'));exports['getFreshsalesAccounts']=function(){return function(_0x2ced74){return client[_0x1d10('0x1')](_0x1d10('0x2'),{'options':{'raw':![],'attributes':['id',_0x1d10('0x3'),_0x1d10('0x4'),_0x1d10('0x5'),_0x1d10('0x6'),_0x1d10('0x7')],'include':[{'model':'FreshsalesConfiguration','as':_0x1d10('0x8'),'attributes':['id',_0x1d10('0x3')],'include':[{'model':_0x1d10('0x9'),'as':_0x1d10('0xa'),'attributes':['id',_0x1d10('0xb'),_0x1d10('0xc'),_0x1d10('0xd')],'include':[{'model':_0x1d10('0xe'),'as':_0x1d10('0xe'),'attributes':['id',_0x1d10('0x3')]}]},{'model':_0x1d10('0x9'),'as':_0x1d10('0xf'),'attributes':['id',_0x1d10('0xb'),_0x1d10('0xc'),_0x1d10('0x10'),_0x1d10('0x11'),_0x1d10('0x12'),'variableName'],'include':[{'model':_0x1d10('0xe'),'as':_0x1d10('0xe'),'attributes':['id',_0x1d10('0x3')]}]}]}]},'log':_0x1d10('0x13')});};};
\ No newline at end of file
index 187a9f3..ed50b7f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1bc6=['Fields','../../client','getSalesforceAccounts','Request','GetSalesforceAccount','name','username','remoteUri','clientId','clientSecret','securityToken','serverUrl','type','SalesforceConfiguration','Configurations','moduleCreate','leadId','additionalSearchContact','SalesforceField','Subjects','Variable'];(function(_0x837dad,_0x1d9098){var _0x1d62d3=function(_0x40b7c1){while(--_0x40b7c1){_0x837dad['push'](_0x837dad['shift']());}};_0x1d62d3(++_0x1d9098);}(_0x1bc6,0x94));var _0x61bc=function(_0x1980ee,_0x1294f4){_0x1980ee=_0x1980ee-0x0;var _0x1a5f53=_0x1bc6[_0x1980ee];return _0x1a5f53;};'use strict';var client=require(_0x61bc('0x0'));exports[_0x61bc('0x1')]=function(){return function(_0x396bc0){return client[_0x61bc('0x2')](_0x61bc('0x3'),{'options':{'raw':![],'attributes':['id',_0x61bc('0x4'),_0x61bc('0x5'),'password',_0x61bc('0x6'),_0x61bc('0x7'),_0x61bc('0x8'),_0x61bc('0x9'),_0x61bc('0xa'),_0x61bc('0xb')],'include':[{'model':_0x61bc('0xc'),'as':_0x61bc('0xd'),'attributes':['id',_0x61bc('0x4'),'moduleSearch',_0x61bc('0xe'),'ticketType',_0x61bc('0xf'),'additionalSearchAccount',_0x61bc('0x10'),'additionalSearchLead'],'include':[{'model':_0x61bc('0x11'),'as':_0x61bc('0x12'),'include':[{'model':_0x61bc('0x13'),'as':'Variable','attributes':['id','name']}]},{'model':'SalesforceField','as':'Descriptions','include':[{'model':'Variable','as':_0x61bc('0x13'),'attributes':['id','name']}]},{'model':_0x61bc('0x11'),'as':_0x61bc('0x14'),'include':[{'model':'Variable','as':'Variable','attributes':['id','name']}]}]}]},'log':_0x61bc('0x3')});};};
\ No newline at end of file
+var _0x4ad3=['name','password','remoteUri','clientId','clientSecret','securityToken','serverUrl','type','SalesforceConfiguration','Configurations','ticketType','leadId','additionalSearchAccount','additionalSearchContact','SalesforceField','Subjects','Variable','Descriptions','Fields','../../client','getSalesforceAccounts','Request','GetSalesforceAccount'];(function(_0x50e9c4,_0xefac58){var _0x265531=function(_0x3c208d){while(--_0x3c208d){_0x50e9c4['push'](_0x50e9c4['shift']());}};_0x265531(++_0xefac58);}(_0x4ad3,0x1b1));var _0x34ad=function(_0x2c065a,_0x44e071){_0x2c065a=_0x2c065a-0x0;var _0x16dcf0=_0x4ad3[_0x2c065a];return _0x16dcf0;};'use strict';var client=require(_0x34ad('0x0'));exports[_0x34ad('0x1')]=function(){return function(_0x3b3764){return client[_0x34ad('0x2')](_0x34ad('0x3'),{'options':{'raw':![],'attributes':['id',_0x34ad('0x4'),'username',_0x34ad('0x5'),_0x34ad('0x6'),_0x34ad('0x7'),_0x34ad('0x8'),_0x34ad('0x9'),_0x34ad('0xa'),_0x34ad('0xb')],'include':[{'model':_0x34ad('0xc'),'as':_0x34ad('0xd'),'attributes':['id',_0x34ad('0x4'),'moduleSearch','moduleCreate',_0x34ad('0xe'),_0x34ad('0xf'),_0x34ad('0x10'),_0x34ad('0x11'),'additionalSearchLead'],'include':[{'model':_0x34ad('0x12'),'as':_0x34ad('0x13'),'include':[{'model':_0x34ad('0x14'),'as':_0x34ad('0x14'),'attributes':['id',_0x34ad('0x4')]}]},{'model':_0x34ad('0x12'),'as':_0x34ad('0x15'),'include':[{'model':_0x34ad('0x14'),'as':_0x34ad('0x14'),'attributes':['id',_0x34ad('0x4')]}]},{'model':_0x34ad('0x12'),'as':_0x34ad('0x16'),'include':[{'model':_0x34ad('0x14'),'as':_0x34ad('0x14'),'attributes':['id',_0x34ad('0x4')]}]}]}]},'log':_0x34ad('0x3')});};};
\ No newline at end of file
index 8d666f9..0617309 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc4aa=['keyContent','Fields','content','idField','nameField','customField','GetServicenowkAccount','../../client','getServicenowAccounts','Request','GetServicenowAccount','name','email','remoteUri','serverUrl','ServicenowConfiguration','Configurations','ServicenowField','Subjects','variableName','Variable','Descriptions','type','key'];(function(_0x46b4c8,_0x5dc3d7){var _0x1412d5=function(_0x916e1f){while(--_0x916e1f){_0x46b4c8['push'](_0x46b4c8['shift']());}};_0x1412d5(++_0x5dc3d7);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x342baa,_0x4a110f){_0x342baa=_0x342baa-0x0;var _0x1208f3=_0xc4aa[_0x342baa];return _0x1208f3;};'use strict';var client=require(_0xac4a('0x0'));exports[_0xac4a('0x1')]=function(){return function(_0x40a0d0){return client[_0xac4a('0x2')](_0xac4a('0x3'),{'options':{'raw':![],'attributes':['id',_0xac4a('0x4'),'description','username','password',_0xac4a('0x5'),_0xac4a('0x6'),_0xac4a('0x7')],'include':[{'model':_0xac4a('0x8'),'as':_0xac4a('0x9'),'attributes':['id',_0xac4a('0x4')],'include':[{'model':_0xac4a('0xa'),'as':_0xac4a('0xb'),'attributes':['id','type','content',_0xac4a('0xc')],'include':[{'model':_0xac4a('0xd'),'as':_0xac4a('0xd'),'attributes':['id','name']}]},{'model':_0xac4a('0xa'),'as':_0xac4a('0xe'),'attributes':['id',_0xac4a('0xf'),'content',_0xac4a('0x10'),'keyType',_0xac4a('0x11'),'variableName'],'include':[{'model':_0xac4a('0xd'),'as':_0xac4a('0xd'),'attributes':['id',_0xac4a('0x4')]}]},{'model':'ServicenowField','as':_0xac4a('0x12'),'attributes':['id',_0xac4a('0xf'),_0xac4a('0x13'),_0xac4a('0x14'),_0xac4a('0x15'),_0xac4a('0x16'),_0xac4a('0xc')],'include':[{'model':_0xac4a('0xd'),'as':_0xac4a('0xd'),'attributes':['id',_0xac4a('0x4')]}]}]}]},'log':_0xac4a('0x17')});};};
\ No newline at end of file
+var _0x4137=['Request','GetServicenowAccount','name','description','username','password','email','remoteUri','serverUrl','Configurations','ServicenowField','Subjects','content','variableName','Variable','Descriptions','type','key','keyType','Fields','nameField','customField','GetServicenowkAccount','../../client','getServicenowAccounts'];(function(_0x2bf5c7,_0x2d5a76){var _0x149b0e=function(_0x4d6318){while(--_0x4d6318){_0x2bf5c7['push'](_0x2bf5c7['shift']());}};_0x149b0e(++_0x2d5a76);}(_0x4137,0xf8));var _0x7413=function(_0x1cc8fe,_0x105328){_0x1cc8fe=_0x1cc8fe-0x0;var _0x230054=_0x4137[_0x1cc8fe];return _0x230054;};'use strict';var client=require(_0x7413('0x0'));exports[_0x7413('0x1')]=function(){return function(_0x370399){return client[_0x7413('0x2')](_0x7413('0x3'),{'options':{'raw':![],'attributes':['id',_0x7413('0x4'),_0x7413('0x5'),_0x7413('0x6'),_0x7413('0x7'),_0x7413('0x8'),_0x7413('0x9'),_0x7413('0xa')],'include':[{'model':'ServicenowConfiguration','as':_0x7413('0xb'),'attributes':['id',_0x7413('0x4')],'include':[{'model':_0x7413('0xc'),'as':_0x7413('0xd'),'attributes':['id','type',_0x7413('0xe'),_0x7413('0xf')],'include':[{'model':'Variable','as':_0x7413('0x10'),'attributes':['id',_0x7413('0x4')]}]},{'model':'ServicenowField','as':_0x7413('0x11'),'attributes':['id',_0x7413('0x12'),_0x7413('0xe'),_0x7413('0x13'),_0x7413('0x14'),'keyContent',_0x7413('0xf')],'include':[{'model':_0x7413('0x10'),'as':'Variable','attributes':['id',_0x7413('0x4')]}]},{'model':_0x7413('0xc'),'as':_0x7413('0x15'),'attributes':['id','type','content','idField',_0x7413('0x16'),_0x7413('0x17'),'variableName'],'include':[{'model':_0x7413('0x10'),'as':_0x7413('0x10'),'attributes':['id','name']}]}]}]},'log':_0x7413('0x18')});};};
\ No newline at end of file
index 15715f1..0efb4d8 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(_0x5dca5e,_0x5a5d1b){var _0x4bf076=function(_0x209f76){while(--_0x209f76){_0x5dca5e['push'](_0x5dca5e['shift']());}};_0x4bf076(++_0x5a5d1b);}(_0x0295,0x1f0));var _0x5029=function(_0x22b95b,_0x2c695e){_0x22b95b=_0x22b95b-0x0;var _0x32728b=_0x0295[_0x22b95b];return _0x32728b;};'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 _0x5f2f=['username','password','SugarcrmConfiguration','Configurations','SugarcrmField','Subjects','type','variableName','Variable','Descriptions','key','Fields','content','idField','customField','../../client','getSugarcrmAccounts','Request','GetSugarcrmAccount','name'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x5f2f,0x73));var _0xf5f2=function(_0x31d6a7,_0x5a5235){_0x31d6a7=_0x31d6a7-0x0;var _0x185aee=_0x5f2f[_0x31d6a7];return _0x185aee;};'use strict';var client=require(_0xf5f2('0x0'));exports[_0xf5f2('0x1')]=function(){return function(_0x2dcf60){return client[_0xf5f2('0x2')](_0xf5f2('0x3'),{'options':{'raw':![],'attributes':['id',_0xf5f2('0x4'),_0xf5f2('0x5'),_0xf5f2('0x6'),'remoteUri','serverUrl'],'include':[{'model':_0xf5f2('0x7'),'as':_0xf5f2('0x8'),'attributes':['id',_0xf5f2('0x4')],'include':[{'model':_0xf5f2('0x9'),'as':_0xf5f2('0xa'),'attributes':['id',_0xf5f2('0xb'),'content',_0xf5f2('0xc')],'include':[{'model':_0xf5f2('0xd'),'as':_0xf5f2('0xd'),'attributes':['id','name']}]},{'model':_0xf5f2('0x9'),'as':_0xf5f2('0xe'),'attributes':['id',_0xf5f2('0xb'),'content',_0xf5f2('0xf'),'keyType','keyContent',_0xf5f2('0xc')],'include':[{'model':_0xf5f2('0xd'),'as':'Variable','attributes':['id',_0xf5f2('0x4')]}]},{'model':_0xf5f2('0x9'),'as':_0xf5f2('0x10'),'attributes':['id',_0xf5f2('0xb'),_0xf5f2('0x11'),_0xf5f2('0x12'),'nameField',_0xf5f2('0x13'),_0xf5f2('0xc')],'include':[{'model':_0xf5f2('0xd'),'as':_0xf5f2('0xd'),'attributes':['id',_0xf5f2('0x4')]}]}]}]},'log':'GetSugarcrmAccount'});};};
\ No newline at end of file
index b8affc4..66d0f61 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x793a=['Request','GetVtigerAccount','name','description','username','accessKey','remoteUri','serverUrl','VtigerConfiguration','Configurations','Subjects','type','content','variableName','Variable','VtigerField','Descriptions','keyType','Fields','nameField','customField','getVtigerAccounts'];(function(_0x395f7f,_0x1dc75a){var _0x42a7a1=function(_0x38a0b6){while(--_0x38a0b6){_0x395f7f['push'](_0x395f7f['shift']());}};_0x42a7a1(++_0x1dc75a);}(_0x793a,0x6d));var _0xa793=function(_0xea7b87,_0x4c5a3d){_0xea7b87=_0xea7b87-0x0;var _0x45a902=_0x793a[_0xea7b87];return _0x45a902;};'use strict';var client=require('../../client');exports[_0xa793('0x0')]=function(){return function(_0x563909){return client[_0xa793('0x1')](_0xa793('0x2'),{'options':{'raw':![],'attributes':['id',_0xa793('0x3'),_0xa793('0x4'),_0xa793('0x5'),_0xa793('0x6'),_0xa793('0x7'),_0xa793('0x8')],'include':[{'model':_0xa793('0x9'),'as':_0xa793('0xa'),'attributes':['id',_0xa793('0x3')],'include':[{'model':'VtigerField','as':_0xa793('0xb'),'attributes':['id',_0xa793('0xc'),_0xa793('0xd'),_0xa793('0xe')],'include':[{'model':_0xa793('0xf'),'as':_0xa793('0xf'),'attributes':['id',_0xa793('0x3')]}]},{'model':_0xa793('0x10'),'as':_0xa793('0x11'),'attributes':['id',_0xa793('0xc'),_0xa793('0xd'),'key',_0xa793('0x12'),'keyContent',_0xa793('0xe')],'include':[{'model':_0xa793('0xf'),'as':_0xa793('0xf'),'attributes':['id',_0xa793('0x3')]}]},{'model':'VtigerField','as':_0xa793('0x13'),'attributes':['id',_0xa793('0xc'),_0xa793('0xd'),'idField',_0xa793('0x14'),_0xa793('0x15'),'variableName'],'include':[{'model':_0xa793('0xf'),'as':'Variable','attributes':['id',_0xa793('0x3')]}]}]}]},'log':_0xa793('0x2')});};};
\ No newline at end of file
+var _0xfdfd=['content','variableName','Variable','Descriptions','key','keyType','keyContent','type','idField','nameField','customField','../../client','getVtigerAccounts','GetVtigerAccount','description','username','accessKey','remoteUri','serverUrl','Configurations','name','Subjects'];(function(_0x41e3a5,_0x261b83){var _0x173ac3=function(_0x42f672){while(--_0x42f672){_0x41e3a5['push'](_0x41e3a5['shift']());}};_0x173ac3(++_0x261b83);}(_0xfdfd,0x8f));var _0xdfdf=function(_0x3dbad6,_0x17b357){_0x3dbad6=_0x3dbad6-0x0;var _0x285785=_0xfdfd[_0x3dbad6];return _0x285785;};'use strict';var client=require(_0xdfdf('0x0'));exports[_0xdfdf('0x1')]=function(){return function(_0x23c5d5){return client['Request'](_0xdfdf('0x2'),{'options':{'raw':![],'attributes':['id','name',_0xdfdf('0x3'),_0xdfdf('0x4'),_0xdfdf('0x5'),_0xdfdf('0x6'),_0xdfdf('0x7')],'include':[{'model':'VtigerConfiguration','as':_0xdfdf('0x8'),'attributes':['id',_0xdfdf('0x9')],'include':[{'model':'VtigerField','as':_0xdfdf('0xa'),'attributes':['id','type',_0xdfdf('0xb'),_0xdfdf('0xc')],'include':[{'model':_0xdfdf('0xd'),'as':_0xdfdf('0xd'),'attributes':['id','name']}]},{'model':'VtigerField','as':_0xdfdf('0xe'),'attributes':['id','type',_0xdfdf('0xb'),_0xdfdf('0xf'),_0xdfdf('0x10'),_0xdfdf('0x11'),'variableName'],'include':[{'model':'Variable','as':'Variable','attributes':['id','name']}]},{'model':'VtigerField','as':'Fields','attributes':['id',_0xdfdf('0x12'),'content',_0xdfdf('0x13'),_0xdfdf('0x14'),_0xdfdf('0x15'),_0xdfdf('0xc')],'include':[{'model':_0xdfdf('0xd'),'as':_0xdfdf('0xd'),'attributes':['id','name']}]}]}]},'log':_0xdfdf('0x2')});};};
\ No newline at end of file
index 9ef9ce1..0500527 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x050a=['username','password','token','remoteUri','authType','type','Configurations','Tag','ZendeskField','Subjects','content','Variable','keyType','keyContent','idField','nameField','customField','GetZendeskAccount','name'];(function(_0x219286,_0x4743be){var _0x350780=function(_0x200cd2){while(--_0x200cd2){_0x219286['push'](_0x219286['shift']());}};_0x350780(++_0x4743be);}(_0x050a,0x12e));var _0xa050=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x050a[_0x3b380d];return _0x54502b;};'use strict';var client=require('../../client');exports['getZendeskAccounts']=function(){return function(_0x33cd20){return client['Request'](_0xa050('0x0'),{'options':{'raw':![],'attributes':['id',_0xa050('0x1'),_0xa050('0x2'),_0xa050('0x3'),_0xa050('0x4'),_0xa050('0x5'),_0xa050('0x6'),'serverUrl',_0xa050('0x7')],'include':[{'model':'ZendeskConfiguration','as':_0xa050('0x8'),'attributes':['id','name'],'include':[{'model':_0xa050('0x9'),'attributes':['id',_0xa050('0x1')]},{'model':_0xa050('0xa'),'as':_0xa050('0xb'),'attributes':['id',_0xa050('0x7'),_0xa050('0xc'),'variableName'],'include':[{'model':_0xa050('0xd'),'as':'Variable','attributes':['id','name']}]},{'model':_0xa050('0xa'),'as':'Descriptions','attributes':['id',_0xa050('0x7'),_0xa050('0xc'),'key',_0xa050('0xe'),_0xa050('0xf'),'variableName'],'include':[{'model':_0xa050('0xd'),'as':'Variable','attributes':['id',_0xa050('0x1')]}]},{'model':_0xa050('0xa'),'as':'Fields','attributes':['id',_0xa050('0x7'),'content',_0xa050('0x10'),_0xa050('0x11'),_0xa050('0x12'),'variableName'],'include':[{'model':'Variable','as':_0xa050('0xd'),'attributes':['id','name']}]}]}]},'log':_0xa050('0x0')});};};
\ No newline at end of file
+var _0x0b9b=['token','remoteUri','authType','type','ZendeskConfiguration','Tag','ZendeskField','Subjects','content','Descriptions','key','keyType','keyContent','idField','nameField','customField','Variable','../../client','getZendeskAccounts','Request','GetZendeskAccount','name','username'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x0b9b,0x1af));var _0xb0b9=function(_0x247851,_0x302779){_0x247851=_0x247851-0x0;var _0xba998e=_0x0b9b[_0x247851];return _0xba998e;};'use strict';var client=require(_0xb0b9('0x0'));exports[_0xb0b9('0x1')]=function(){return function(_0x551b63){return client[_0xb0b9('0x2')](_0xb0b9('0x3'),{'options':{'raw':![],'attributes':['id',_0xb0b9('0x4'),_0xb0b9('0x5'),'password',_0xb0b9('0x6'),_0xb0b9('0x7'),_0xb0b9('0x8'),'serverUrl',_0xb0b9('0x9')],'include':[{'model':_0xb0b9('0xa'),'as':'Configurations','attributes':['id',_0xb0b9('0x4')],'include':[{'model':_0xb0b9('0xb'),'attributes':['id',_0xb0b9('0x4')]},{'model':_0xb0b9('0xc'),'as':_0xb0b9('0xd'),'attributes':['id','type',_0xb0b9('0xe'),'variableName'],'include':[{'model':'Variable','as':'Variable','attributes':['id','name']}]},{'model':_0xb0b9('0xc'),'as':_0xb0b9('0xf'),'attributes':['id','type',_0xb0b9('0xe'),_0xb0b9('0x10'),_0xb0b9('0x11'),_0xb0b9('0x12'),'variableName'],'include':[{'model':'Variable','as':'Variable','attributes':['id','name']}]},{'model':_0xb0b9('0xc'),'as':'Fields','attributes':['id','type',_0xb0b9('0xe'),_0xb0b9('0x13'),_0xb0b9('0x14'),_0xb0b9('0x15'),'variableName'],'include':[{'model':_0xb0b9('0x16'),'as':_0xb0b9('0x16'),'attributes':['id',_0xb0b9('0x4')]}]}]}]},'log':_0xb0b9('0x3')});};};
\ No newline at end of file
index f66beb1..a61d073 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0242=['idField','nameField','customField','getZohoAccounts','Request','host','zone','clientId','clientSecret','serverUrl','code','refreshToken','ZohoConfiguration','name','moduleCreate','moduleSearch','description','ZohoField','type','content','variableName','Variable','Descriptions','key','keyType','keyContent'];(function(_0x565cd7,_0x5f3965){var _0x92b9d3=function(_0x520a34){while(--_0x520a34){_0x565cd7['push'](_0x565cd7['shift']());}};_0x92b9d3(++_0x5f3965);}(_0x0242,0x85));var _0x2024=function(_0x4459b8,_0x3271b8){_0x4459b8=_0x4459b8-0x0;var _0x4a4b07=_0x0242[_0x4459b8];return _0x4a4b07;};'use strict';var client=require('../../client');exports[_0x2024('0x0')]=function(){return function(_0x2bbfbc){return client[_0x2024('0x1')]('GetZohoAccount',{'options':{'raw':![],'attributes':['id','name','description',_0x2024('0x2'),_0x2024('0x3'),_0x2024('0x4'),_0x2024('0x5'),_0x2024('0x6'),_0x2024('0x7'),_0x2024('0x8')],'include':[{'model':_0x2024('0x9'),'as':'Configurations','attributes':['id',_0x2024('0xa'),_0x2024('0xb'),_0x2024('0xc'),_0x2024('0xd')],'include':[{'model':_0x2024('0xe'),'as':'Subjects','attributes':['id',_0x2024('0xf'),_0x2024('0x10'),_0x2024('0x11')],'include':[{'model':_0x2024('0x12'),'as':'Variable','attributes':['id','name']}]},{'model':'ZohoField','as':_0x2024('0x13'),'attributes':['id',_0x2024('0xf'),_0x2024('0x10'),_0x2024('0x14'),_0x2024('0x15'),_0x2024('0x16'),_0x2024('0x11')],'include':[{'model':_0x2024('0x12'),'as':_0x2024('0x12'),'attributes':['id',_0x2024('0xa')]}]},{'model':'ZohoField','as':'Fields','attributes':['id',_0x2024('0xf'),'content',_0x2024('0x17'),_0x2024('0x18'),_0x2024('0x19'),'variableName'],'include':[{'model':_0x2024('0x12'),'as':_0x2024('0x12'),'attributes':['id',_0x2024('0xa')]}]}]}]},'log':'GetZohoAccount'});};};
\ No newline at end of file
+var _0xfcdd=['idField','nameField','customField','../../client','GetZohoAccount','name','host','zone','refreshToken','moduleCreate','moduleSearch','description','ZohoField','Subjects','type','content','Variable','key','keyType','keyContent','variableName','Fields'];(function(_0x23ca63,_0x31c208){var _0x1a7bc8=function(_0x48ff77){while(--_0x48ff77){_0x23ca63['push'](_0x23ca63['shift']());}};_0x1a7bc8(++_0x31c208);}(_0xfcdd,0x9d));var _0xdfcd=function(_0x5224c6,_0x48c612){_0x5224c6=_0x5224c6-0x0;var _0x2d9f51=_0xfcdd[_0x5224c6];return _0x2d9f51;};'use strict';var client=require(_0xdfcd('0x0'));exports['getZohoAccounts']=function(){return function(_0x3bd67a){return client['Request'](_0xdfcd('0x1'),{'options':{'raw':![],'attributes':['id',_0xdfcd('0x2'),'description',_0xdfcd('0x3'),_0xdfcd('0x4'),'clientId','clientSecret','serverUrl','code',_0xdfcd('0x5')],'include':[{'model':'ZohoConfiguration','as':'Configurations','attributes':['id',_0xdfcd('0x2'),_0xdfcd('0x6'),_0xdfcd('0x7'),_0xdfcd('0x8')],'include':[{'model':_0xdfcd('0x9'),'as':_0xdfcd('0xa'),'attributes':['id',_0xdfcd('0xb'),_0xdfcd('0xc'),'variableName'],'include':[{'model':_0xdfcd('0xd'),'as':'Variable','attributes':['id',_0xdfcd('0x2')]}]},{'model':_0xdfcd('0x9'),'as':'Descriptions','attributes':['id',_0xdfcd('0xb'),_0xdfcd('0xc'),_0xdfcd('0xe'),_0xdfcd('0xf'),_0xdfcd('0x10'),_0xdfcd('0x11')],'include':[{'model':_0xdfcd('0xd'),'as':_0xdfcd('0xd'),'attributes':['id','name']}]},{'model':'ZohoField','as':_0xdfcd('0x12'),'attributes':['id',_0xdfcd('0xb'),'content',_0xdfcd('0x13'),_0xdfcd('0x14'),_0xdfcd('0x15'),_0xdfcd('0x11')],'include':[{'model':_0xdfcd('0xd'),'as':_0xdfcd('0xd'),'attributes':['id',_0xdfcd('0x2')]}]}]}]},'log':_0xdfcd('0x1')});};};
\ No newline at end of file
index 7846dd8..77e526b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xacb8=['dialer','../client','stack','replace','silly','isArray','length','number','every','map','interval','concat','IntervalIftime','intervalIftime','../../../config/logger'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0xacb8,0xe0));var _0x8acb=function(_0x2fbfe2,_0x3807a9){_0x2fbfe2=_0x2fbfe2-0x0;var _0x5ad6f6=_0xacb8[_0x2fbfe2];return _0x5ad6f6;};var logger=require(_0x8acb('0x0'))(_0x8acb('0x1'));var client=require(_0x8acb('0x2'));function intervalIftime(_0x401fb7,_0x1c7b69){const _0xccae8b=new Error()[_0x8acb('0x3')][_0x8acb('0x4')](/^Error/,'')['trim']();logger[_0x8acb('0x5')]('intervalIftime\x20called\x20with',_0x401fb7,_0x1c7b69,_0xccae8b);const _0x527124=Array[_0x8acb('0x6')](_0x401fb7);if(!_0x401fb7||_0x527124&&_0x401fb7[_0x8acb('0x7')]===0x0){return Promise['resolve'](![]);}else{var _0x1e5f23=[];var _0xd10555=[];var _0x2e00fd=_0x527124?_0x401fb7:[_0x401fb7];var _0x76a42f=_0x2e00fd['every'](function(_0x1d85ef){return typeof _0x1d85ef===_0x8acb('0x8');});var _0x12b332=_0x2e00fd[_0x8acb('0x9')](function(_0x4aad48){return typeof _0x4aad48==='string';});if(!_0x76a42f&&!_0x12b332){_0x1e5f23=_0x2e00fd[_0x8acb('0xa')](function(_0x2c4a6d){return _0x2c4a6d['id'];});if(_0x1e5f23[_0x8acb('0x7')]===0x0){_0xd10555=_0x2e00fd[_0x8acb('0xa')](function(_0x3db56f){return _0x3db56f[_0x8acb('0xb')];});}}else{if(_0x76a42f){_0x1e5f23=_0x1e5f23['concat'](_0x2e00fd);}if(_0x12b332){_0xd10555=_0xd10555[_0x8acb('0xc')](_0x2e00fd);}}return client['Request'](_0x8acb('0xd'),{'intervalIds':_0x1e5f23,'intervals':_0xd10555,'timezone':_0x1c7b69,'log':_0x8acb('0xd')});}}exports[_0x8acb('0xe')]=intervalIftime;
\ No newline at end of file
+var _0x128f=['concat','Request','IntervalIftime','intervalIftime','../../../config/logger','dialer','../client','trim','silly','intervalIftime\x20called\x20with','length','resolve','every','string','map'];(function(_0x5d815f,_0x522b79){var _0x1bea4c=function(_0x8cc38){while(--_0x8cc38){_0x5d815f['push'](_0x5d815f['shift']());}};_0x1bea4c(++_0x522b79);}(_0x128f,0x14e));var _0xf128=function(_0x1eded9,_0xfa0c6e){_0x1eded9=_0x1eded9-0x0;var _0x19c721=_0x128f[_0x1eded9];return _0x19c721;};var logger=require(_0xf128('0x0'))(_0xf128('0x1'));var client=require(_0xf128('0x2'));function intervalIftime(_0x1abd77,_0x5ddf2a){const _0x315ee1=new Error()['stack']['replace'](/^Error/,'')[_0xf128('0x3')]();logger[_0xf128('0x4')](_0xf128('0x5'),_0x1abd77,_0x5ddf2a,_0x315ee1);const _0xb96054=Array['isArray'](_0x1abd77);if(!_0x1abd77||_0xb96054&&_0x1abd77[_0xf128('0x6')]===0x0){return Promise[_0xf128('0x7')](![]);}else{var _0xff316c=[];var _0x35a92b=[];var _0x342703=_0xb96054?_0x1abd77:[_0x1abd77];var _0x363086=_0x342703['every'](function(_0x252d5b){return typeof _0x252d5b==='number';});var _0x5066d9=_0x342703[_0xf128('0x8')](function(_0x16a31d){return typeof _0x16a31d===_0xf128('0x9');});if(!_0x363086&&!_0x5066d9){_0xff316c=_0x342703[_0xf128('0xa')](function(_0x18cc0c){return _0x18cc0c['id'];});if(_0xff316c[_0xf128('0x6')]===0x0){_0x35a92b=_0x342703[_0xf128('0xa')](function(_0x55fd25){return _0x55fd25['interval'];});}}else{if(_0x363086){_0xff316c=_0xff316c[_0xf128('0xb')](_0x342703);}if(_0x5066d9){_0x35a92b=_0x35a92b[_0xf128('0xb')](_0x342703);}}return client[_0xf128('0xc')](_0xf128('0xd'),{'intervalIds':_0xff316c,'intervals':_0x35a92b,'timezone':_0x5ddf2a,'log':_0xf128('0xd')});}}exports[_0xf128('0xe')]=intervalIftime;
\ No newline at end of file
index 5bab968..5cfcf97 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcb69=['queue','accountcode','toNumber','uniqueid','voiceDialReport','membername','TALKING','endtime','starttime','seconds','outbound','exten','agent','moment','lodash','util','voiceQueueReport','queuecallercompleteAt','Request','CreateMemberReport','voice','lastAssignedTo','isNil','interface','format','queuecallerleaveAt','diff','calleridnum'];(function(_0x494d1f,_0x3f72ff){var _0x457b6e=function(_0x38cb16){while(--_0x38cb16){_0x494d1f['push'](_0x494d1f['shift']());}};_0x457b6e(++_0x3f72ff);}(_0xcb69,0x195));var _0x9cb6=function(_0x211d0c,_0x1743de){_0x211d0c=_0x211d0c-0x0;var _0x58fc6b=_0xcb69[_0x211d0c];return _0x58fc6b;};'use strict';var moment=require(_0x9cb6('0x0'));var _=require(_0x9cb6('0x1'));var util=require(_0x9cb6('0x2'));var client=require('../client');exports[_0x9cb6('0x3')]=function(_0x35e3ae){var _0x3944a8=_0x35e3ae[_0x9cb6('0x4')]||_0x35e3ae['queuecallerexitAt'];return client[_0x9cb6('0x5')](_0x9cb6('0x6'),{'body':{'channel':_0x9cb6('0x7'),'membername':_0x35e3ae[_0x9cb6('0x8')],'interface':_[_0x9cb6('0x9')](_0x35e3ae[_0x9cb6('0xa')])?util[_0x9cb6('0xb')]('SIP/%s',_0x35e3ae[_0x9cb6('0x8')]):_0x35e3ae[_0x9cb6('0xa')],'type':'TALKING','enterAt':_0x35e3ae[_0x9cb6('0xc')],'exitAt':_0x3944a8,'duration':moment(_0x3944a8)[_0x9cb6('0xd')](_0x35e3ae[_0x9cb6('0xc')],'seconds'),'data1':'inbound','data2':_0x35e3ae[_0x9cb6('0xe')],'data3':_0x35e3ae['exten'],'data4':null,'data5':_0x35e3ae[_0x9cb6('0xf')],'role':'agent','internal':_0x35e3ae[_0x9cb6('0x10')]?_[_0x9cb6('0x11')](_0x35e3ae[_0x9cb6('0x10')]):undefined,'uniqueid':_0x35e3ae[_0x9cb6('0x12')]},'log':_0x9cb6('0x6')});};exports[_0x9cb6('0x13')]=function(_0x2f12e8){return client[_0x9cb6('0x5')](_0x9cb6('0x6'),{'body':{'channel':_0x9cb6('0x7'),'membername':_0x2f12e8[_0x9cb6('0x14')],'interface':_0x2f12e8[_0x9cb6('0xa')],'type':_0x9cb6('0x15'),'enterAt':_0x2f12e8['starttime'],'exitAt':_0x2f12e8[_0x9cb6('0x16')],'duration':moment(_0x2f12e8[_0x9cb6('0x16')])[_0x9cb6('0xd')](_0x2f12e8[_0x9cb6('0x17')],_0x9cb6('0x18'))>=0x0?moment(_0x2f12e8[_0x9cb6('0x16')])['diff'](_0x2f12e8[_0x9cb6('0x17')],_0x9cb6('0x18')):null,'data1':_0x9cb6('0x19'),'data2':_0x2f12e8[_0x9cb6('0x10')],'data3':_0x2f12e8[_0x9cb6('0x1a')],'data4':_0x2f12e8['dialstring']||null,'role':_0x9cb6('0x1b'),'internal':_0x2f12e8[_0x9cb6('0x10')]?_[_0x9cb6('0x11')](_0x2f12e8[_0x9cb6('0x10')]):undefined,'uniqueid':_0x2f12e8['uniqueid']},'log':'CreateMemberReport'});};
\ No newline at end of file
+var _0x0857=['../client','voiceQueueReport','queuecallerexitAt','CreateMemberReport','voice','lastAssignedTo','isNil','interface','diff','seconds','inbound','calleridnum','exten','agent','accountcode','toNumber','voiceDialReport','Request','membername','TALKING','starttime','endtime','outbound','dialstring','moment','lodash','util'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x0857,0x1ad));var _0x7085=function(_0xa1e3e3,_0x29fe0e){_0xa1e3e3=_0xa1e3e3-0x0;var _0xc980e9=_0x0857[_0xa1e3e3];return _0xc980e9;};'use strict';var moment=require(_0x7085('0x0'));var _=require(_0x7085('0x1'));var util=require(_0x7085('0x2'));var client=require(_0x7085('0x3'));exports[_0x7085('0x4')]=function(_0x29225b){var _0x3c5b9f=_0x29225b['queuecallercompleteAt']||_0x29225b[_0x7085('0x5')];return client['Request'](_0x7085('0x6'),{'body':{'channel':_0x7085('0x7'),'membername':_0x29225b[_0x7085('0x8')],'interface':_[_0x7085('0x9')](_0x29225b[_0x7085('0xa')])?util['format']('SIP/%s',_0x29225b[_0x7085('0x8')]):_0x29225b['interface'],'type':'TALKING','enterAt':_0x29225b['queuecallerleaveAt'],'exitAt':_0x3c5b9f,'duration':moment(_0x3c5b9f)[_0x7085('0xb')](_0x29225b['queuecallerleaveAt'],_0x7085('0xc')),'data1':_0x7085('0xd'),'data2':_0x29225b[_0x7085('0xe')],'data3':_0x29225b[_0x7085('0xf')],'data4':null,'data5':_0x29225b['queue'],'role':_0x7085('0x10'),'internal':_0x29225b[_0x7085('0x11')]?_[_0x7085('0x12')](_0x29225b['accountcode']):undefined,'uniqueid':_0x29225b['uniqueid']},'log':_0x7085('0x6')});};exports[_0x7085('0x13')]=function(_0x2fdb75){return client[_0x7085('0x14')](_0x7085('0x6'),{'body':{'channel':_0x7085('0x7'),'membername':_0x2fdb75[_0x7085('0x15')],'interface':_0x2fdb75['interface'],'type':_0x7085('0x16'),'enterAt':_0x2fdb75[_0x7085('0x17')],'exitAt':_0x2fdb75[_0x7085('0x18')],'duration':moment(_0x2fdb75[_0x7085('0x18')])['diff'](_0x2fdb75[_0x7085('0x17')],_0x7085('0xc'))>=0x0?moment(_0x2fdb75[_0x7085('0x18')])[_0x7085('0xb')](_0x2fdb75[_0x7085('0x17')],_0x7085('0xc')):null,'data1':_0x7085('0x19'),'data2':_0x2fdb75[_0x7085('0x11')],'data3':_0x2fdb75[_0x7085('0xf')],'data4':_0x2fdb75[_0x7085('0x1a')]||null,'role':_0x7085('0x10'),'internal':_0x2fdb75[_0x7085('0x11')]?_[_0x7085('0x12')](_0x2fdb75['accountcode']):undefined,'uniqueid':_0x2fdb75['uniqueid']},'log':'CreateMemberReport'});};
\ No newline at end of file
index 5af2181..ef1a62a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4a83=['stopRecordingOnTransfer','getSettings','Request','ShowSetting'];(function(_0x52953,_0x44eeb2){var _0x568f54=function(_0x595ffe){while(--_0x595ffe){_0x52953['push'](_0x52953['shift']());}};_0x568f54(++_0x44eeb2);}(_0x4a83,0x125));var _0x34a8=function(_0x2a8bad,_0x78213e){_0x2a8bad=_0x2a8bad-0x0;var _0x117a07=_0x4a83[_0x2a8bad];return _0x117a07;};'use strict';var client=require('../client');exports[_0x34a8('0x0')]=function(){return client[_0x34a8('0x1')](_0x34a8('0x2'),{'options':{'raw':!![],'where':{'id':0x1},'attributes':[_0x34a8('0x3'),'previewRecallmeReminderInterval']},'log':'GetSettings'});};
\ No newline at end of file
+var _0x9037=['GetSettings','getSettings','ShowSetting','stopRecordingOnTransfer','previewRecallmeReminderInterval'];(function(_0x166d1b,_0x4852c4){var _0x540656=function(_0x9f662d){while(--_0x9f662d){_0x166d1b['push'](_0x166d1b['shift']());}};_0x540656(++_0x4852c4);}(_0x9037,0xbf));var _0x7903=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x9037[_0x14add3];return _0x4a174f;};'use strict';var client=require('../client');exports[_0x7903('0x0')]=function(){return client['Request'](_0x7903('0x1'),{'options':{'raw':!![],'where':{'id':0x1},'attributes':[_0x7903('0x2'),_0x7903('0x3')]},'log':_0x7903('0x4')});};
\ No newline at end of file
index 4196374..f42aa71 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1186=['html','getTemplates','name'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x1186,0xbe));var _0x6118=function(_0x5bfa64,_0x3d540d){_0x5bfa64=_0x5bfa64-0x0;var _0xcc95dd=_0x1186[_0x5bfa64];return _0xcc95dd;};'use strict';var client=require('../client');exports[_0x6118('0x0')]=function(_0x523f58){return function(_0x3f1f5d){return client['Request']('GetTemplate',{'options':{'raw':!![],'attributes':['id',_0x6118('0x1'),_0x6118('0x2')]},'log':'GetTemplate'});};};
\ No newline at end of file
+var _0x1637=['name','html','../client','getTemplates','Request','GetTemplate'];(function(_0x31dabc,_0x4762d4){var _0x22c853=function(_0x5d81b2){while(--_0x5d81b2){_0x31dabc['push'](_0x31dabc['shift']());}};_0x22c853(++_0x4762d4);}(_0x1637,0x14c));var _0x7163=function(_0x27af45,_0x1b57aa){_0x27af45=_0x27af45-0x0;var _0x18df21=_0x1637[_0x27af45];return _0x18df21;};'use strict';var client=require(_0x7163('0x0'));exports[_0x7163('0x1')]=function(_0x4d4113){return function(_0x3d99a0){return client[_0x7163('0x2')](_0x7163('0x3'),{'options':{'raw':!![],'attributes':['id',_0x7163('0x4'),_0x7163('0x5')]},'log':_0x7163('0x3')});};};
\ No newline at end of file
index 618183d..7a9a87b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x262d=['AnyConditions','action','data1','data2','data3','data4','data5','data6','data7','../client','getTriggers','Request','GetTrigger','channel','status','Condition','AllConditions','field','operator','value'];(function(_0x4f4bd1,_0x1ec09a){var _0x23eed9=function(_0x3b272f){while(--_0x3b272f){_0x4f4bd1['push'](_0x4f4bd1['shift']());}};_0x23eed9(++_0x1ec09a);}(_0x262d,0x149));var _0xd262=function(_0xbe200f,_0x4b50eb){_0xbe200f=_0xbe200f-0x0;var _0x192597=_0x262d[_0xbe200f];return _0x192597;};'use strict';var client=require(_0xd262('0x0'));exports[_0xd262('0x1')]=function(_0x5ed578){return function(_0x1bda52){return client[_0xd262('0x2')](_0xd262('0x3'),{'options':{'raw':![],'attributes':['id','name',_0xd262('0x4'),_0xd262('0x5')],'include':[{'model':_0xd262('0x6'),'as':_0xd262('0x7'),'attributes':['id',_0xd262('0x8'),_0xd262('0x9'),_0xd262('0xa')]},{'model':_0xd262('0x6'),'as':_0xd262('0xb'),'attributes':['id','field','operator',_0xd262('0xa')]},{'model':'Action','as':'Actions','attributes':['id',_0xd262('0xc'),_0xd262('0xd'),_0xd262('0xe'),_0xd262('0xf'),_0xd262('0x10'),_0xd262('0x11'),_0xd262('0x12'),_0xd262('0x13')]}]},'log':'GetTrigger'});};};
\ No newline at end of file
+var _0xf41c=['operator','AnyConditions','value','Action','Actions','action','data1','data3','data4','data5','data6','getTriggers','Request','GetTrigger','name','status','Condition','AllConditions','field'];(function(_0x53b5bd,_0x2929f5){var _0x110607=function(_0x2e78fc){while(--_0x2e78fc){_0x53b5bd['push'](_0x53b5bd['shift']());}};_0x110607(++_0x2929f5);}(_0xf41c,0x115));var _0xcf41=function(_0x13041f,_0x3ee890){_0x13041f=_0x13041f-0x0;var _0x1eb3b0=_0xf41c[_0x13041f];return _0x1eb3b0;};'use strict';var client=require('../client');exports[_0xcf41('0x0')]=function(_0x2dd771){return function(_0x2aa82e){return client[_0xcf41('0x1')](_0xcf41('0x2'),{'options':{'raw':![],'attributes':['id',_0xcf41('0x3'),'channel',_0xcf41('0x4')],'include':[{'model':_0xcf41('0x5'),'as':_0xcf41('0x6'),'attributes':['id',_0xcf41('0x7'),_0xcf41('0x8'),'value']},{'model':_0xcf41('0x5'),'as':_0xcf41('0x9'),'attributes':['id',_0xcf41('0x7'),_0xcf41('0x8'),_0xcf41('0xa')]},{'model':_0xcf41('0xb'),'as':_0xcf41('0xc'),'attributes':['id',_0xcf41('0xd'),_0xcf41('0xe'),'data2',_0xcf41('0xf'),_0xcf41('0x10'),_0xcf41('0x11'),_0xcf41('0x12'),'data7']}]},'log':_0xcf41('0x2')});};};
\ No newline at end of file
index a0eec45..0a39133 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6688=['GetTrunk','name','registry','defaultuser','../client','getTrunks','Request'];(function(_0x2c6810,_0x23c079){var _0x213881=function(_0x528021){while(--_0x528021){_0x2c6810['push'](_0x2c6810['shift']());}};_0x213881(++_0x23c079);}(_0x6688,0x10e));var _0x8668=function(_0x3c14c1,_0x224357){_0x3c14c1=_0x3c14c1-0x0;var _0x47c5ba=_0x6688[_0x3c14c1];return _0x47c5ba;};'use strict';var client=require(_0x8668('0x0'));exports[_0x8668('0x1')]=function(_0x60cf0b){return function(_0x50da57){return client[_0x8668('0x2')](_0x8668('0x3'),{'options':{'raw':!![],'where':{'active':0x1},'attributes':['id',_0x8668('0x4'),_0x8668('0x5'),_0x8668('0x6')]},'log':_0x8668('0x3')});};};
\ No newline at end of file
+var _0x008c=['../client','getTrunks','Request','name','registry','defaultuser','GetTrunk'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x008c,0x188));var _0xc008=function(_0x1bb11e,_0x58fd78){_0x1bb11e=_0x1bb11e-0x0;var _0x422492=_0x008c[_0x1bb11e];return _0x422492;};'use strict';var client=require(_0xc008('0x0'));exports[_0xc008('0x1')]=function(_0x15aadc){return function(_0xae17af){return client[_0xc008('0x2')]('GetTrunk',{'options':{'raw':!![],'where':{'active':0x1},'attributes':['id',_0xc008('0x3'),_0xc008('0x4'),_0xc008('0x5')]},'log':_0xc008('0x6')});};};
\ No newline at end of file
index 503853c..6e42862 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x70e0=['getAgents','Request','name','email','accountcode','fullname','lastLoginAt','lastPauseAt','interface','getTelephones','GetUser','telephone','savePause','PauseUser','saveUnpause','getAgent','agent','online','pauseType','../client'];(function(_0x3aa10c,_0x38c286){var _0x4da769=function(_0x406442){while(--_0x406442){_0x3aa10c['push'](_0x3aa10c['shift']());}};_0x4da769(++_0x38c286);}(_0x70e0,0x17b));var _0x070e=function(_0x3e1106,_0x119e09){_0x3e1106=_0x3e1106-0x0;var _0x3ec0c7=_0x70e0[_0x3e1106];return _0x3ec0c7;};'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
+var _0x70e0=['getAgents','Request','name','email','accountcode','fullname','lastLoginAt','lastPauseAt','interface','getTelephones','GetUser','telephone','savePause','PauseUser','saveUnpause','getAgent','agent','online','pauseType','../client'];(function(_0x2c08dc,_0x37345e){var _0x471a06=function(_0x1bd3a8){while(--_0x1bd3a8){_0x2c08dc['push'](_0x2c08dc['shift']());}};_0x471a06(++_0x37345e);}(_0x70e0,0x17b));var _0x070e=function(_0x47fcf0,_0x280188){_0x47fcf0=_0x47fcf0-0x0;var _0x3f6ad2=_0x70e0[_0x47fcf0];return _0x3f6ad2;};'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 df1cd2f..8a4bc1c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa5be=['Request','CreateVoiceAgentReport','update','UpdateVoiceAgentReport','../client','create'];(function(_0x156925,_0x496063){var _0x22372d=function(_0x393444){while(--_0x393444){_0x156925['push'](_0x156925['shift']());}};_0x22372d(++_0x496063);}(_0xa5be,0x1de));var _0xea5b=function(_0x618414,_0x1a7a60){_0x618414=_0x618414-0x0;var _0x21c19a=_0xa5be[_0x618414];return _0x21c19a;};'use strict';var client=require(_0xea5b('0x0'));exports[_0xea5b('0x1')]=function(_0x3380a5){return client[_0xea5b('0x2')](_0xea5b('0x3'),{'body':_0x3380a5,'log':'CreateVoiceAgentReport'});};exports[_0xea5b('0x4')]=function(_0x427347,_0x47e400,_0x2fcd20){return client[_0xea5b('0x2')](_0xea5b('0x5'),{'body':_0x427347,'options':{'where':{'uniqueid':_0x47e400,'interface':_0x2fcd20,'agentcomplete':!![]}},'log':_0xea5b('0x5')});};
\ No newline at end of file
+var _0x8e18=['CreateVoiceAgentReport','update','UpdateVoiceAgentReport','../client','create','Request'];(function(_0x1a5620,_0x4672b0){var _0x5bd59f=function(_0x4c4037){while(--_0x4c4037){_0x1a5620['push'](_0x1a5620['shift']());}};_0x5bd59f(++_0x4672b0);}(_0x8e18,0x19b));var _0x88e1=function(_0x491470,_0x2c5b1c){_0x491470=_0x491470-0x0;var _0x3fab03=_0x8e18[_0x491470];return _0x3fab03;};'use strict';var client=require(_0x88e1('0x0'));exports[_0x88e1('0x1')]=function(_0x143a4a){return client[_0x88e1('0x2')]('CreateVoiceAgentReport',{'body':_0x143a4a,'log':_0x88e1('0x3')});};exports[_0x88e1('0x4')]=function(_0x357c9c,_0x1494fb,_0x261926){return client['Request'](_0x88e1('0x5'),{'body':_0x357c9c,'options':{'where':{'uniqueid':_0x1494fb,'interface':_0x261926,'agentcomplete':!![]}},'log':_0x88e1('0x5')});};
\ No newline at end of file
index b7aa3ba..10b9955 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x825c=['lodash','../client','create','Request','merge','calleridnum','callerid','DOCUMENTATION','CreateVoiceCallReport','getVoiceCallReports','GetVoiceCallReport','outbound','startOf','day','format','endOf','YYYY-MM-DD\x20HH:mm:ss','type','billableseconds','GetVoiceCallReports'];(function(_0x43183d,_0x55b21f){var _0x36d056=function(_0x457aeb){while(--_0x457aeb){_0x43183d['push'](_0x43183d['shift']());}};_0x36d056(++_0x55b21f);}(_0x825c,0x154));var _0xc825=function(_0x486f4a,_0x478dc7){_0x486f4a=_0x486f4a-0x0;var _0x135d99=_0x825c[_0x486f4a];return _0x135d99;};'use strict';var moment=require('moment');var util=require('util');var _=require(_0xc825('0x0'));var client=require(_0xc825('0x1'));exports[_0xc825('0x2')]=function(_0xec5ed2){return client[_0xc825('0x3')]('CreateVoiceCallReport',{'body':_[_0xc825('0x4')](_0xec5ed2,{'source':_0xec5ed2[_0xc825('0x5')],'destinationcontext':_0xec5ed2['context'],'callerid':_0xec5ed2[_0xc825('0x6')],'amaflags':_0xc825('0x7')}),'log':_0xc825('0x8')});};exports[_0xc825('0x9')]=function(){return function(){return client[_0xc825('0x3')](_0xc825('0xa'),{'options':{'where':{'type':[_0xc825('0xb')],'createdAt':{'$between':[moment()[_0xc825('0xc')](_0xc825('0xd'))[_0xc825('0xe')]('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0xc825('0xf')]('day')[_0xc825('0xe')](_0xc825('0x10'))]}},'attributes':[_0xc825('0x11'),'disposition','duration',_0xc825('0x12')]},'log':_0xc825('0x13')});};};
\ No newline at end of file
+var _0x6bbb=['billableseconds','GetVoiceCallReports','moment','lodash','../client','Request','CreateVoiceCallReport','GetVoiceCallReport','outbound','startOf','day','format','YYYY-MM-DD\x20HH:mm:ss','type','disposition','duration'];(function(_0x42ff14,_0x17281f){var _0x3ba175=function(_0x3e624b){while(--_0x3e624b){_0x42ff14['push'](_0x42ff14['shift']());}};_0x3ba175(++_0x17281f);}(_0x6bbb,0x92));var _0xb6bb=function(_0x3d61c6,_0x4571e6){_0x3d61c6=_0x3d61c6-0x0;var _0x47e0df=_0x6bbb[_0x3d61c6];return _0x47e0df;};'use strict';var moment=require(_0xb6bb('0x0'));var util=require('util');var _=require(_0xb6bb('0x1'));var client=require(_0xb6bb('0x2'));exports['create']=function(_0x5c0989){return client[_0xb6bb('0x3')](_0xb6bb('0x4'),{'body':_['merge'](_0x5c0989,{'source':_0x5c0989['calleridnum'],'destinationcontext':_0x5c0989['context'],'callerid':_0x5c0989['callerid'],'amaflags':'DOCUMENTATION'}),'log':_0xb6bb('0x4')});};exports['getVoiceCallReports']=function(){return function(){return client[_0xb6bb('0x3')](_0xb6bb('0x5'),{'options':{'where':{'type':[_0xb6bb('0x6')],'createdAt':{'$between':[moment()[_0xb6bb('0x7')](_0xb6bb('0x8'))[_0xb6bb('0x9')](_0xb6bb('0xa')),moment()['endOf'](_0xb6bb('0x8'))['format'](_0xb6bb('0xa'))]}},'attributes':[_0xb6bb('0xb'),_0xb6bb('0xc'),_0xb6bb('0xd'),_0xb6bb('0xe')]},'log':_0xb6bb('0xf')});};};
\ No newline at end of file
index 4709a92..902335b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xccee=['CreateVoiceDialReport','create','Request'];(function(_0x36436d,_0x20292c){var _0x34615d=function(_0x5447af){while(--_0x5447af){_0x36436d['push'](_0x36436d['shift']());}};_0x34615d(++_0x20292c);}(_0xccee,0x19f));var _0xecce=function(_0x6e5721,_0x50db98){_0x6e5721=_0x6e5721-0x0;var _0x53e345=_0xccee[_0x6e5721];return _0x53e345;};'use strict';var client=require('../client');exports[_0xecce('0x0')]=function(_0x5d401c){return client[_0xecce('0x1')](_0xecce('0x2'),{'body':_0x5d401c,'log':_0xecce('0x2')});};
\ No newline at end of file
+var _0x95e4=['create','Request','CreateVoiceDialReport','../client'];(function(_0x2ff4bd,_0x4780a6){var _0x28edc6=function(_0x792380){while(--_0x792380){_0x2ff4bd['push'](_0x2ff4bd['shift']());}};_0x28edc6(++_0x4780a6);}(_0x95e4,0x173));var _0x495e=function(_0xc7d8f4,_0x6bf77f){_0xc7d8f4=_0xc7d8f4-0x0;var _0x2cfbb3=_0x95e4[_0xc7d8f4];return _0x2cfbb3;};'use strict';var client=require(_0x495e('0x0'));exports[_0x495e('0x1')]=function(_0x48f173){return client[_0x495e('0x2')]('CreateVoiceDialReport',{'body':_0x48f173,'log':_0x495e('0x3')});};
\ No newline at end of file
index 2287759..2b0f20a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6a24=['getVoiceExtensions','GetVoiceExtension','exten','recordingFormat','../client'];(function(_0x181626,_0x4afcf0){var _0x2dfdf9=function(_0x3d7c72){while(--_0x3d7c72){_0x181626['push'](_0x181626['shift']());}};_0x2dfdf9(++_0x4afcf0);}(_0x6a24,0xd1));var _0x46a2=function(_0x5269d6,_0x3a783c){_0x5269d6=_0x5269d6-0x0;var _0x460ce4=_0x6a24[_0x5269d6];return _0x460ce4;};'use strict';var client=require(_0x46a2('0x0'));exports[_0x46a2('0x1')]=function(){return function(){return client['Request'](_0x46a2('0x2'),{'options':{'raw':!![],'attributes':['id',_0x46a2('0x3'),_0x46a2('0x4')],'where':{'VoiceExtensionId':null}},'log':_0x46a2('0x1')});};};
\ No newline at end of file
+var _0x4dd3=['recordingFormat','../client','getVoiceExtensions','Request'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x4dd3,0xf5));var _0x34dd=function(_0x118139,_0x7ce965){_0x118139=_0x118139-0x0;var _0x2fece9=_0x4dd3[_0x118139];return _0x2fece9;};'use strict';var client=require(_0x34dd('0x0'));exports[_0x34dd('0x1')]=function(){return function(){return client[_0x34dd('0x2')]('GetVoiceExtension',{'options':{'raw':!![],'attributes':['id','exten',_0x34dd('0x3')],'where':{'VoiceExtensionId':null}},'log':'getVoiceExtensions'});};};
\ No newline at end of file
index 1b00f7f..5ff0312 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf2cb=['Trunk','name','active','Pause','mandatoryDispositionPause','TrunkBackup','callerid','Interval','interval','getVoiceQueues','GetVoiceQueue','acw','autopause','monitor_format','dialMethod','dialLimitChannel','dialLimitQueue','dialPowerLevel','dialPredictiveOptimizationPercentage','dialOriginateCallerIdName','dialQueueOptions','dialQueueTimeout','dialQueueProject','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialTimezone','dialGlobalInterval','dialCheckDuplicateType','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDTotalAnalysisTime','dialAMDMaximumNumberOfWords','timeout','dialRecallMeTimeout','dialRecallInQueue','dialOrderByScheduledAt','dialAgiAfterHangupAgent','dialQueueProject2','strategy','dialRandomLastDigitCallerIdNumber','dialCutDigit','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','dialPreviewAutoRecallMe','dialPreviewRecallmeReminder'];(function(_0x1cc8fe,_0x105328){var _0x230054=function(_0x1a1b56){while(--_0x1a1b56){_0x1cc8fe['push'](_0x1cc8fe['shift']());}};_0x230054(++_0x105328);}(_0xf2cb,0x130));var _0xbf2c=function(_0x357128,_0x465325){_0x357128=_0x357128-0x0;var _0x260573=_0xf2cb[_0x357128];return _0x260573;};'use strict';var client=require('../client');exports[_0xbf2c('0x0')]=function(){return function(){return client['Request'](_0xbf2c('0x1'),{'options':{'raw':![],'attributes':['id','name',_0xbf2c('0x2'),'acwTimeout',_0xbf2c('0x3'),_0xbf2c('0x4'),'type','dialActive',_0xbf2c('0x5'),_0xbf2c('0x6'),_0xbf2c('0x7'),_0xbf2c('0x8'),'dialPredictiveOptimization',_0xbf2c('0x9'),'dialPredictiveInterval',_0xbf2c('0xa'),'dialOriginateCallerIdNumber','dialOriginateTimeout',_0xbf2c('0xb'),_0xbf2c('0xc'),_0xbf2c('0xd'),'dialCongestionMaxRetry',_0xbf2c('0xe'),_0xbf2c('0xf'),_0xbf2c('0x10'),_0xbf2c('0x11'),_0xbf2c('0x12'),_0xbf2c('0x13'),_0xbf2c('0x14'),_0xbf2c('0x15'),'dialPrefix',_0xbf2c('0x16'),_0xbf2c('0x17'),_0xbf2c('0x18'),_0xbf2c('0x19'),'dialAMDAfterGreetingSilence',_0xbf2c('0x1a'),'dialAMDMinWordLength','dialAMDBetweenWordsSilence',_0xbf2c('0x1b'),'dialAMDSilenceThreshold','dialAMDMaximumWordLength',_0xbf2c('0x1c'),_0xbf2c('0x1d'),_0xbf2c('0x1e'),_0xbf2c('0x1f'),_0xbf2c('0x20'),'dialAgiAfterHangupClient',_0xbf2c('0x21'),'monitor_format',_0xbf2c('0x22'),_0xbf2c('0x23'),_0xbf2c('0x24'),_0xbf2c('0x25'),_0xbf2c('0x26'),'dialDropMaxRetry',_0xbf2c('0x27'),_0xbf2c('0x28'),_0xbf2c('0x29'),_0xbf2c('0x2a'),_0xbf2c('0x2b'),_0xbf2c('0x2c'),_0xbf2c('0x2d'),'mandatoryDisposition',_0xbf2c('0x2e'),_0xbf2c('0x2f'),_0xbf2c('0x30'),_0xbf2c('0x31')],'include':[{'model':'Trunk','as':_0xbf2c('0x32'),'attributes':['id',_0xbf2c('0x33'),'callerid',_0xbf2c('0x34')]},{'model':_0xbf2c('0x35'),'as':_0xbf2c('0x36'),'attributes':['id','name']},{'model':'Trunk','as':_0xbf2c('0x37'),'attributes':['id',_0xbf2c('0x33'),_0xbf2c('0x38'),_0xbf2c('0x34')]},{'model':_0xbf2c('0x39'),'as':_0xbf2c('0x39'),'attributes':['id',_0xbf2c('0x33')],'include':[{'model':'Interval','as':'Intervals','attributes':['id',_0xbf2c('0x33'),_0xbf2c('0x3a')]}]}]},'log':_0xbf2c('0x0')});};};
\ No newline at end of file
+var _0x0e5a=['dialPredictiveOptimization','dialPredictiveInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialQueueOptions','dialQueueTimeout','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialGlobalInterval','dialPrefix','dialCheckDuplicateType','dialAMDActive','dialAMDInitialSilence','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDMaximumWordLength','timeout','dialRecallMeTimeout','dialRecallInQueue','dialOrderByScheduledAt','dialAgiAfterHangupAgent','dialQueueProject2','monitor_format','dialRandomLastDigitCallerIdNumber','dialCutDigit','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialPredictiveIntervalMaxThreshold','dialPreviewAutoRecallMe','Trunk','active','Pause','mandatoryDispositionPause','callerid','Interval','Intervals','interval','getVoiceQueues','../client','Request','GetVoiceQueue','name','acw','acwTimeout','autopause','dialMethod','dialLimitChannel','dialLimitQueue','dialPowerLevel'];(function(_0x19beab,_0x2c9e3e){var _0x14d7fe=function(_0x96cb5){while(--_0x96cb5){_0x19beab['push'](_0x19beab['shift']());}};_0x14d7fe(++_0x2c9e3e);}(_0x0e5a,0x16f));var _0xa0e5=function(_0x2a0bfc,_0x1400d2){_0x2a0bfc=_0x2a0bfc-0x0;var _0x378362=_0x0e5a[_0x2a0bfc];return _0x378362;};'use strict';var client=require(_0xa0e5('0x0'));exports['getVoiceQueues']=function(){return function(){return client[_0xa0e5('0x1')](_0xa0e5('0x2'),{'options':{'raw':![],'attributes':['id',_0xa0e5('0x3'),_0xa0e5('0x4'),_0xa0e5('0x5'),_0xa0e5('0x6'),'monitor_format','type','dialActive',_0xa0e5('0x7'),_0xa0e5('0x8'),_0xa0e5('0x9'),_0xa0e5('0xa'),_0xa0e5('0xb'),'dialPredictiveOptimizationPercentage',_0xa0e5('0xc'),_0xa0e5('0xd'),_0xa0e5('0xe'),_0xa0e5('0xf'),_0xa0e5('0x10'),_0xa0e5('0x11'),'dialQueueProject',_0xa0e5('0x12'),_0xa0e5('0x13'),_0xa0e5('0x14'),_0xa0e5('0x15'),_0xa0e5('0x16'),'dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialTimezone',_0xa0e5('0x17'),_0xa0e5('0x18'),_0xa0e5('0x19'),_0xa0e5('0x1a'),_0xa0e5('0x1b'),'dialAMDGreeting',_0xa0e5('0x1c'),_0xa0e5('0x1d'),_0xa0e5('0x1e'),_0xa0e5('0x1f'),_0xa0e5('0x20'),'dialAMDSilenceThreshold',_0xa0e5('0x21'),_0xa0e5('0x22'),_0xa0e5('0x23'),_0xa0e5('0x24'),_0xa0e5('0x25'),_0xa0e5('0x26'),'dialAgiAfterHangupClient',_0xa0e5('0x27'),_0xa0e5('0x28'),'strategy',_0xa0e5('0x29'),_0xa0e5('0x2a'),_0xa0e5('0x2b'),_0xa0e5('0x2c'),_0xa0e5('0x2d'),_0xa0e5('0x2e'),_0xa0e5('0x2f'),_0xa0e5('0x30'),_0xa0e5('0x31'),_0xa0e5('0x32'),_0xa0e5('0x33'),'dialAgentRejectRetryFrequency','mandatoryDisposition',_0xa0e5('0x34'),'dialPredictiveIntervalMinThreshold',_0xa0e5('0x35'),'dialPreviewRecallmeReminder'],'include':[{'model':'Trunk','as':_0xa0e5('0x36'),'attributes':['id',_0xa0e5('0x3'),'callerid',_0xa0e5('0x37')]},{'model':_0xa0e5('0x38'),'as':_0xa0e5('0x39'),'attributes':['id',_0xa0e5('0x3')]},{'model':_0xa0e5('0x36'),'as':'TrunkBackup','attributes':['id',_0xa0e5('0x3'),_0xa0e5('0x3a'),_0xa0e5('0x37')]},{'model':_0xa0e5('0x3b'),'as':_0xa0e5('0x3b'),'attributes':['id',_0xa0e5('0x3')],'include':[{'model':'Interval','as':_0xa0e5('0x3c'),'attributes':['id',_0xa0e5('0x3'),_0xa0e5('0x3d')]}]}]},'log':_0xa0e5('0x3e')});};};
\ No newline at end of file
index 4c20279..f9c0e1a 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(_0x185fb4,_0x538e54){var _0x29ad96=function(_0x5ce421){while(--_0x5ce421){_0x185fb4['push'](_0x185fb4['shift']());}};_0x29ad96(++_0x538e54);}(_0xa9e0,0x123));var _0x0a9e=function(_0x220dbb,_0x99328d){_0x220dbb=_0x220dbb-0x0;var _0x2b77de=_0xa9e0[_0x220dbb];return _0x2b77de;};'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(_0x26e98b,_0x1206c6){var _0x1c9aa1=function(_0x32c487){while(--_0x32c487){_0x26e98b['push'](_0x26e98b['shift']());}};_0x1c9aa1(++_0x1206c6);}(_0xa9e0,0x123));var _0x0a9e=function(_0x32d457,_0x1a39c9){_0x32d457=_0x32d457-0x0;var _0x338386=_0xa9e0[_0x32d457];return _0x338386;};'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 c3bd9bb..169e8b2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf3cb=['Request','GetVoiceQueueRtPauses','../client','getVoiceQueueRtPauses'];(function(_0xcc03bf,_0x1b95e5){var _0x32be90=function(_0x15caad){while(--_0x15caad){_0xcc03bf['push'](_0xcc03bf['shift']());}};_0x32be90(++_0x1b95e5);}(_0xf3cb,0x122));var _0xbf3c=function(_0x49bd92,_0x3082ac){_0x49bd92=_0x49bd92-0x0;var _0x459416=_0xf3cb[_0x49bd92];return _0x459416;};'use strict';var client=require(_0xbf3c('0x0'));exports[_0xbf3c('0x1')]=function(_0x4a13d0){return function(){return client[_0xbf3c('0x2')](_0xbf3c('0x3'),{'options':{'where':{'VoiceQueueId':_0x4a13d0,'paused':!![]},'raw':!![]},'log':_0xbf3c('0x1')});};};
\ No newline at end of file
+var _0x086a=['../client','getVoiceQueueRtPauses','Request','GetVoiceQueueRtPauses'];(function(_0x1ac595,_0x5d2081){var _0x455fff=function(_0x3043ee){while(--_0x3043ee){_0x1ac595['push'](_0x1ac595['shift']());}};_0x455fff(++_0x5d2081);}(_0x086a,0x180));var _0xa086=function(_0x2468f0,_0xc0b76e){_0x2468f0=_0x2468f0-0x0;var _0x2b65bf=_0x086a[_0x2468f0];return _0x2b65bf;};'use strict';var client=require(_0xa086('0x0'));exports[_0xa086('0x1')]=function(_0x485efa){return function(){return client[_0xa086('0x2')](_0xa086('0x3'),{'options':{'where':{'VoiceQueueId':_0x485efa,'paused':!![]},'raw':!![]},'log':_0xa086('0x1')});};};
\ No newline at end of file
index 4a30874..3f3125a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a54=['create','Request','CreateVoiceRecording','monitorFilename','lodash','../client'];(function(_0x10be2c,_0x327db0){var _0x3caf72=function(_0x1e4e7a){while(--_0x1e4e7a){_0x10be2c['push'](_0x10be2c['shift']());}};_0x3caf72(++_0x327db0);}(_0x7a54,0x106));var _0x47a5=function(_0x126e3c,_0x189441){_0x126e3c=_0x126e3c-0x0;var _0xa8547f=_0x7a54[_0x126e3c];return _0xa8547f;};'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
+var _0x9957=['CreateVoiceRecording','merge','monitorFilename','lodash','../client','create'];(function(_0xd0945a,_0xcb3cb2){var _0x4a234f=function(_0x137290){while(--_0x137290){_0xd0945a['push'](_0xd0945a['shift']());}};_0x4a234f(++_0xcb3cb2);}(_0x9957,0x93));var _0x7995=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x9957[_0x3b380d];return _0x54502b;};'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
index 022f0d8..e879c2a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0765=['CreateVoiceTransferReport','transfererchannel','transferercalleridnum','transferercalleridname','transfererconnectedlinenum','transfereraccountcode','transferercontext','transfererexten','transfererlinkedid','transfereechannel','transfereecalleridnum','transfereeconnectedlinenum','transfereeconnectedlinename','transfereeaccountcode','transfereecontext','transfereeexten','isexternal','context','blind','attendedTransfer','result','origtransfererchannel','origtransferercalleridnum','origtransferercalleridname','secondtransfererconnectedlinenum','secondtransfererconnectedlinename','origtransfereraccountcode','secondtransferercontext','secondtransfererexten','origtransfererlinkedid','transfertargetchannel','transfertargetcalleridnum','transfertargetcalleridname','transfertargetconnectedlinenum','transfertargetconnectedlinename','transfertargetaccountcode','transfertargetcontext','transfertargetexten','transfertargetlinkedid','origtransferercontext','origtransfererexten','attended','../client','transfers','blindTransfer'];(function(_0x33a17b,_0x4e04ff){var _0x57e182=function(_0x5a62b7){while(--_0x5a62b7){_0x33a17b['push'](_0x33a17b['shift']());}};_0x57e182(++_0x4e04ff);}(_0x0765,0x165));var _0x5076=function(_0xacd9ec,_0x1ad7bb){_0xacd9ec=_0xacd9ec-0x0;var _0x259f28=_0x0765[_0xacd9ec];return _0x259f28;};'use strict';var client=require(_0x5076('0x0'));exports[_0x5076('0x1')]={};exports[_0x5076('0x2')]=function(_0x52fd5e){return client['Request'](_0x5076('0x3'),{'body':{'result':_0x52fd5e['result'],'transfererchannel':_0x52fd5e[_0x5076('0x4')],'transferercalleridnum':_0x52fd5e[_0x5076('0x5')],'transferercalleridname':_0x52fd5e[_0x5076('0x6')],'transfererconnectedlinenum':_0x52fd5e[_0x5076('0x7')],'transfererconnectedlinename':_0x52fd5e['transfererconnectedlinename'],'transfereraccountcode':_0x52fd5e[_0x5076('0x8')],'transferercontext':_0x52fd5e[_0x5076('0x9')],'transfererexten':_0x52fd5e[_0x5076('0xa')],'transfererlinkedid':_0x52fd5e[_0x5076('0xb')],'transfereechannel':_0x52fd5e[_0x5076('0xc')],'transfereecalleridnum':_0x52fd5e[_0x5076('0xd')],'transfereecalleridname':_0x52fd5e['transfereecalleridname'],'transfereeconnectedlinenum':_0x52fd5e[_0x5076('0xe')],'transfereeconnectedlinename':_0x52fd5e[_0x5076('0xf')],'transfereeaccountcode':_0x52fd5e[_0x5076('0x10')],'transfereecontext':_0x52fd5e[_0x5076('0x11')],'transfereeexten':_0x52fd5e[_0x5076('0x12')],'transfereelinkedid':_0x52fd5e['transfereelinkedid'],'isexternal':_0x52fd5e[_0x5076('0x13')],'context':_0x52fd5e[_0x5076('0x14')],'extension':_0x52fd5e['extension'],'type':_0x5076('0x15')},'log':_0x5076('0x3')});};exports[_0x5076('0x16')]=function(_0x315f57){return client['Request'](_0x5076('0x3'),{'body':{'result':_0x315f57[_0x5076('0x17')],'transfererchannel':_0x315f57[_0x5076('0x18')],'transferercalleridnum':_0x315f57[_0x5076('0x19')],'transferercalleridname':_0x315f57[_0x5076('0x1a')],'transfererconnectedlinenum':_0x315f57[_0x5076('0x1b')],'transfererconnectedlinename':_0x315f57[_0x5076('0x1c')],'transfereraccountcode':_0x315f57[_0x5076('0x1d')],'transferercontext':_0x315f57[_0x5076('0x1e')],'transfererexten':_0x315f57[_0x5076('0x1f')],'transfererlinkedid':_0x315f57[_0x5076('0x20')],'transfereechannel':_0x315f57[_0x5076('0x21')],'transfereecalleridnum':_0x315f57[_0x5076('0x22')],'transfereecalleridname':_0x315f57[_0x5076('0x23')],'transfereeconnectedlinenum':_0x315f57[_0x5076('0x24')],'transfereeconnectedlinename':_0x315f57[_0x5076('0x25')],'transfereeaccountcode':_0x315f57[_0x5076('0x26')],'transfereecontext':_0x315f57[_0x5076('0x27')],'transfereeexten':_0x315f57[_0x5076('0x28')],'transfereelinkedid':_0x315f57[_0x5076('0x29')],'isexternal':_0x315f57[_0x5076('0x13')],'context':_0x315f57[_0x5076('0x2a')],'extension':_0x315f57[_0x5076('0x2b')],'type':_0x5076('0x2c')},'log':'CreateVoiceTransferReport'});};
\ No newline at end of file
+var _0x41fc=['transferercalleridnum','transferercalleridname','transfererconnectedlinenum','transfereraccountcode','transferercontext','transfererexten','transfererlinkedid','transfereechannel','transfereecalleridnum','transfereecalleridname','transfereeconnectedlinename','transfereeaccountcode','transfereecontext','transfereeexten','transfereelinkedid','context','extension','blind','attendedTransfer','Request','origtransfererchannel','origtransferercalleridnum','origtransferercalleridname','origtransfereraccountcode','secondtransferercontext','secondtransfererexten','transfertargetchannel','transfertargetcalleridnum','transfertargetcalleridname','transfertargetconnectedlinenum','transfertargetconnectedlinename','transfertargetaccountcode','transfertargetcontext','transfertargetexten','transfertargetlinkedid','origtransferercontext','origtransfererexten','attended','transfers','blindTransfer','CreateVoiceTransferReport','result','transfererchannel'];(function(_0x5767c1,_0xc8267c){var _0x4e3bfc=function(_0x2bc29d){while(--_0x2bc29d){_0x5767c1['push'](_0x5767c1['shift']());}};_0x4e3bfc(++_0xc8267c);}(_0x41fc,0x128));var _0xc41f=function(_0x47a328,_0x52ac15){_0x47a328=_0x47a328-0x0;var _0x16ad43=_0x41fc[_0x47a328];return _0x16ad43;};'use strict';var client=require('../client');exports[_0xc41f('0x0')]={};exports[_0xc41f('0x1')]=function(_0x20ea21){return client['Request'](_0xc41f('0x2'),{'body':{'result':_0x20ea21[_0xc41f('0x3')],'transfererchannel':_0x20ea21[_0xc41f('0x4')],'transferercalleridnum':_0x20ea21[_0xc41f('0x5')],'transferercalleridname':_0x20ea21[_0xc41f('0x6')],'transfererconnectedlinenum':_0x20ea21[_0xc41f('0x7')],'transfererconnectedlinename':_0x20ea21['transfererconnectedlinename'],'transfereraccountcode':_0x20ea21[_0xc41f('0x8')],'transferercontext':_0x20ea21[_0xc41f('0x9')],'transfererexten':_0x20ea21[_0xc41f('0xa')],'transfererlinkedid':_0x20ea21[_0xc41f('0xb')],'transfereechannel':_0x20ea21[_0xc41f('0xc')],'transfereecalleridnum':_0x20ea21[_0xc41f('0xd')],'transfereecalleridname':_0x20ea21[_0xc41f('0xe')],'transfereeconnectedlinenum':_0x20ea21['transfereeconnectedlinenum'],'transfereeconnectedlinename':_0x20ea21[_0xc41f('0xf')],'transfereeaccountcode':_0x20ea21[_0xc41f('0x10')],'transfereecontext':_0x20ea21[_0xc41f('0x11')],'transfereeexten':_0x20ea21[_0xc41f('0x12')],'transfereelinkedid':_0x20ea21[_0xc41f('0x13')],'isexternal':_0x20ea21['isexternal'],'context':_0x20ea21[_0xc41f('0x14')],'extension':_0x20ea21[_0xc41f('0x15')],'type':_0xc41f('0x16')},'log':_0xc41f('0x2')});};exports[_0xc41f('0x17')]=function(_0x557331){return client[_0xc41f('0x18')](_0xc41f('0x2'),{'body':{'result':_0x557331['result'],'transfererchannel':_0x557331[_0xc41f('0x19')],'transferercalleridnum':_0x557331[_0xc41f('0x1a')],'transferercalleridname':_0x557331[_0xc41f('0x1b')],'transfererconnectedlinenum':_0x557331['secondtransfererconnectedlinenum'],'transfererconnectedlinename':_0x557331['secondtransfererconnectedlinename'],'transfereraccountcode':_0x557331[_0xc41f('0x1c')],'transferercontext':_0x557331[_0xc41f('0x1d')],'transfererexten':_0x557331[_0xc41f('0x1e')],'transfererlinkedid':_0x557331['origtransfererlinkedid'],'transfereechannel':_0x557331[_0xc41f('0x1f')],'transfereecalleridnum':_0x557331[_0xc41f('0x20')],'transfereecalleridname':_0x557331[_0xc41f('0x21')],'transfereeconnectedlinenum':_0x557331[_0xc41f('0x22')],'transfereeconnectedlinename':_0x557331[_0xc41f('0x23')],'transfereeaccountcode':_0x557331[_0xc41f('0x24')],'transfereecontext':_0x557331[_0xc41f('0x25')],'transfereeexten':_0x557331[_0xc41f('0x26')],'transfereelinkedid':_0x557331[_0xc41f('0x27')],'isexternal':_0x557331['isexternal'],'context':_0x557331[_0xc41f('0x28')],'extension':_0x557331[_0xc41f('0x29')],'type':_0xc41f('0x2a')},'log':_0xc41f('0x2')});};
\ No newline at end of file
index 0eafd5d..0263941 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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(_0x2bebc2,_0x30f45b){var _0x361d8b=function(_0x439407){while(--_0x439407){_0x2bebc2['push'](_0x2bebc2['shift']());}};_0x361d8b(++_0x30f45b);}(_0x7a54,0x106));var _0x47a5=function(_0x5c9eb0,_0x57896d){_0x5c9eb0=_0x5c9eb0-0x0;var _0x482031=_0x7a54[_0x5c9eb0];return _0x482031;};'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
+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(_0x2e9c46,_0x1350e0){var _0xab228d=function(_0x300471){while(--_0x300471){_0x2e9c46['push'](_0x2e9c46['shift']());}};_0xab228d(++_0x1350e0);}(_0x7a54,0x106));var _0x47a5=function(_0x5aea97,_0x34f9df){_0x5aea97=_0x5aea97-0x0;var _0x15d375=_0x7a54[_0x5aea97];return _0x15d375;};'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 fb8cd05..6b35ba4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7857=['ioredis','util','../../../../config/environment','../../../../config/logger','trigger','../../rpc/cmContact','redis','defaults','socket.io-emitter','info','stringify','emit','exec','data1','data2','isNil','data5','xmd-contactid','ListId','data3','split','phone','$or','map','destcalleridnum','calleridnum','routeId','firstName','mobile','createdAt','scheduledAt','updatedAt','union','resolve','getContacts','then','length','uniqueid','[CM][%s][%s]\x20Multiple\x20contacts\x20found:[%s]','[CM][%s][%s]\x20Contact\x20not\x20found','data4','[CM][%s][%s]\x20Autocreate\x20enabled','calleridname','<unknown>','Unknown','destcalleridname','createContact','push','[CM][%s][%s]\x20Contact\x20created:%s','[CM][%s][%s]\x20Autocreate\x20disabled','format','user:%s','name','trigger:%s','action','toLowerCase','lodash','bluebird'];(function(_0xd24148,_0x115429){var _0x3baf17=function(_0x18342a){while(--_0x18342a){_0xd24148['push'](_0xd24148['shift']());}};_0x3baf17(++_0x115429);}(_0x7857,0x120));var _0x7785=function(_0x41dbbf,_0x145d29){_0x41dbbf=_0x41dbbf-0x0;var _0x30a6c3=_0x7857[_0x41dbbf];return _0x30a6c3;};'use strict';var _=require(_0x7785('0x0'));var BPromise=require(_0x7785('0x1'));var Redis=require(_0x7785('0x2'));var util=require(_0x7785('0x3'));var config=require(_0x7785('0x4'));var logger=require(_0x7785('0x5'))(_0x7785('0x6'));var cmContactRpc=require(_0x7785('0x7'));config[_0x7785('0x8')]=_[_0x7785('0x9')](config[_0x7785('0x8')],{'host':'localhost','port':0x18eb});var io=require(_0x7785('0xa'))(new Redis(config[_0x7785('0x8')]));function emit(_0x43b666,_0x319daf,_0x11e5df,_0x36257a,_0x32a032){logger[_0x7785('0xb')]('[CM][%s][%s]',_0x43b666,_0x319daf['id'],_0x11e5df,_0x36257a,JSON[_0x7785('0xc')](_0x32a032));io['to'](_0x11e5df)[_0x7785('0xd')](_0x36257a,_0x32a032);}exports[_0x7785('0xe')]=function(_0x4521d1,_0x294a78,_0xd82d1a,_0x36ceef){var _0x36b7e8,_0x4f498c;var _0x6d2967={};var _0x4610cc;var _0x47fbbb=Number(_0xd82d1a[_0x7785('0xf')]);var _0x28eaac=_0xd82d1a[_0x7785('0x10')]?Boolean(Number(_0xd82d1a['data2'])):![];var _0x4e6324;var _0x489b59=![];if(!_[_0x7785('0x11')](_0xd82d1a['data5'])){if(_0xd82d1a[_0x7785('0x12')]=='1')_0x489b59=!![];}if(!_0x489b59){if(_0x36ceef[_0x7785('0x13')]){_0x6d2967['id']=_0x36ceef[_0x7785('0x13')];}}if(!_0x6d2967['id']){_0x6d2967[_0x7785('0x14')]=_0x47fbbb;_0x4e6324=_0xd82d1a['data3']&&_0xd82d1a[_0x7785('0x15')]!=='0'?_0xd82d1a[_0x7785('0x15')][_0x7785('0x16')](','):[_0x7785('0x17')];_0x6d2967[_0x7785('0x18')]=_[_0x7785('0x19')](_0x4e6324,function(_0x4a7c3c){var _0x3be227={};_0x3be227[_0x4a7c3c]=_0x36ceef['routeId']?_0x36ceef[_0x7785('0x1a')]:_0x36ceef[_0x7785('0x1b')];return _0x3be227;});_0x4610cc=_0x36ceef[_0x7785('0x1c')]?_0x36ceef[_0x7785('0x1a')]:_0x36ceef[_0x7785('0x1b')];}var _0x252214=['id',_0x7785('0x1d'),'lastName',_0x7785('0x17'),_0x7785('0x1e'),'fax',_0x7785('0x14'),_0x7785('0x1f'),_0x7785('0x20'),_0x7785('0x21')];var _0x499932=_[_0x7785('0x22')](_0x252214,_0x4e6324);BPromise[_0x7785('0x23')]()['then'](cmContactRpc[_0x7785('0x24')]({'attributes':_0x499932,'where':_0x6d2967,'phone':_0x4610cc}))[_0x7785('0x25')](function(_0x2b601a){_0x4f498c=_0x2b601a;if(!_['isEmpty'](_0x4f498c)){if(_0x4f498c[_0x7785('0x26')]===0x1){_0x36b7e8=_0x4f498c[0x0];logger[_0x7785('0xb')]('[CM][%s][%s]\x20Contact\x20found:%s',_0x36ceef[_0x7785('0x27')],_0x294a78['id'],_0x36b7e8['id']);}else{logger[_0x7785('0xb')](_0x7785('0x28'),_0x36ceef['uniqueid'],_0x294a78['id'],_['map'](_0x4f498c,'id')['join'](','));}return;}else{logger[_0x7785('0xb')](_0x7785('0x29'),_0x36ceef[_0x7785('0x27')],_0x294a78['id']);var _0x2c04b2={'ListId':_0x47fbbb};var _0x2aa6d0=_0xd82d1a[_0x7785('0x2a')]&&_0xd82d1a['data4']!=='0'?_0xd82d1a[_0x7785('0x2a')]:'phone';if(_0x28eaac){logger[_0x7785('0xb')](_0x7785('0x2b'),_0x36ceef[_0x7785('0x27')],_0x294a78['id']);_0x2c04b2[_0x2aa6d0]=_['isNil'](_0x36ceef[_0x7785('0x1c')])?_0x36ceef[_0x7785('0x1b')]:_0x36ceef['destcalleridnum'];if(_[_0x7785('0x11')](_0x36ceef['routeId'])){_0x2c04b2['firstName']=_0x36ceef[_0x7785('0x2c')]&&_0x36ceef['calleridname']!==_0x7785('0x2d')?_0x36ceef[_0x7785('0x2c')]:_0x7785('0x2e');}else{_0x2c04b2[_0x7785('0x1d')]=_0x36ceef[_0x7785('0x2f')]&&_0x36ceef[_0x7785('0x2f')]!==_0x7785('0x2d')?_0x36ceef[_0x7785('0x2f')]:_0x7785('0x2e');}return BPromise[_0x7785('0x23')]()[_0x7785('0x25')](cmContactRpc[_0x7785('0x30')](_0x2c04b2))['then'](function(_0x496278){_0x36b7e8=_0x496278;_0x4f498c[_0x7785('0x31')](_0x496278);if(_0x36b7e8){logger['info'](_0x7785('0x32'),_0x36ceef[_0x7785('0x27')],_0x294a78['id'],_0x36b7e8['id']);}return;});}else{logger[_0x7785('0xb')](_0x7785('0x33'),_0x36ceef[_0x7785('0x27')],_0x294a78['id']);_0x2c04b2[_0x2aa6d0]=_[_0x7785('0x11')](_0x36ceef['routeId'])?_0x36ceef[_0x7785('0x1b')]:_0x36ceef['destcalleridnum'];if(_[_0x7785('0x11')](_0x36ceef[_0x7785('0x1c')])){_0x2c04b2[_0x7785('0x1d')]=_0x36ceef[_0x7785('0x2c')]&&_0x36ceef[_0x7785('0x2c')]!==_0x7785('0x2d')?_0x36ceef[_0x7785('0x2c')]:_0x7785('0x2e');}else{_0x2c04b2[_0x7785('0x1d')]=_0x36ceef[_0x7785('0x2f')]&&_0x36ceef[_0x7785('0x2f')]!==_0x7785('0x2d')?_0x36ceef['destcalleridname']:_0x7785('0x2e');}_0x36b7e8=_0x2c04b2;_0x4f498c[_0x7785('0x31')](_0x2c04b2);return;}}})[_0x7785('0x25')](function(){if(_0x4521d1){emit(_0x36ceef[_0x7785('0x27')],_0x294a78,util[_0x7785('0x34')](_0x7785('0x35'),_0x4521d1[_0x7785('0x36')]),util['format'](_0x7785('0x37'),_0xd82d1a[_0x7785('0x38')][_0x7785('0x39')]()),{'evt':_['merge'](_0x36ceef,{'autoCreate':_0x28eaac}),'contact':_0x36b7e8===undefined?{}:_0x36b7e8,'contacts':_0x4f498c['length']===0x0?undefined:_0x4f498c});}});};
\ No newline at end of file
+var _0xa37a=['stringify','emit','exec','data1','data2','data5','xmd-contactid','data3','split','phone','map','routeId','calleridnum','lastName','mobile','createdAt','updatedAt','union','then','getContacts','length','[CM][%s][%s]\x20Contact\x20found:%s','uniqueid','[CM][%s][%s]\x20Multiple\x20contacts\x20found:[%s]','join','data4','[CM][%s][%s]\x20Autocreate\x20enabled','firstName','calleridname','<unknown>','destcalleridname','Unknown','resolve','createContact','push','[CM][%s][%s]\x20Contact\x20created:%s','[CM][%s][%s]\x20Autocreate\x20disabled','isNil','destcalleridnum','format','user:%s','name','trigger:%s','toLowerCase','bluebird','../../../../config/logger','trigger','../../rpc/cmContact','redis','defaults','localhost','socket.io-emitter','info'];(function(_0x92acb8,_0x56453f){var _0x149647=function(_0x2e8f94){while(--_0x2e8f94){_0x92acb8['push'](_0x92acb8['shift']());}};_0x149647(++_0x56453f);}(_0xa37a,0x135));var _0xaa37=function(_0x1aa59b,_0x440e6b){_0x1aa59b=_0x1aa59b-0x0;var _0x3d32ea=_0xa37a[_0x1aa59b];return _0x3d32ea;};'use strict';var _=require('lodash');var BPromise=require(_0xaa37('0x0'));var Redis=require('ioredis');var util=require('util');var config=require('../../../../config/environment');var logger=require(_0xaa37('0x1'))(_0xaa37('0x2'));var cmContactRpc=require(_0xaa37('0x3'));config[_0xaa37('0x4')]=_[_0xaa37('0x5')](config[_0xaa37('0x4')],{'host':_0xaa37('0x6'),'port':0x18eb});var io=require(_0xaa37('0x7'))(new Redis(config[_0xaa37('0x4')]));function emit(_0x52a806,_0x1ca119,_0xaa05ca,_0x312d48,_0x2d4d55){logger[_0xaa37('0x8')]('[CM][%s][%s]',_0x52a806,_0x1ca119['id'],_0xaa05ca,_0x312d48,JSON[_0xaa37('0x9')](_0x2d4d55));io['to'](_0xaa05ca)[_0xaa37('0xa')](_0x312d48,_0x2d4d55);}exports[_0xaa37('0xb')]=function(_0x419edc,_0x5a630d,_0x45b5e0,_0x364e22){var _0x39d691,_0x1e89de;var _0x1dbf67={};var _0xf9dd70;var _0x115c36=Number(_0x45b5e0[_0xaa37('0xc')]);var _0x240bdc=_0x45b5e0[_0xaa37('0xd')]?Boolean(Number(_0x45b5e0[_0xaa37('0xd')])):![];var _0x309699;var _0x17c7a4=![];if(!_['isNil'](_0x45b5e0[_0xaa37('0xe')])){if(_0x45b5e0[_0xaa37('0xe')]=='1')_0x17c7a4=!![];}if(!_0x17c7a4){if(_0x364e22[_0xaa37('0xf')]){_0x1dbf67['id']=_0x364e22[_0xaa37('0xf')];}}if(!_0x1dbf67['id']){_0x1dbf67['ListId']=_0x115c36;_0x309699=_0x45b5e0['data3']&&_0x45b5e0['data3']!=='0'?_0x45b5e0[_0xaa37('0x10')][_0xaa37('0x11')](','):[_0xaa37('0x12')];_0x1dbf67['$or']=_[_0xaa37('0x13')](_0x309699,function(_0x36551a){var _0x211555={};_0x211555[_0x36551a]=_0x364e22[_0xaa37('0x14')]?_0x364e22['destcalleridnum']:_0x364e22[_0xaa37('0x15')];return _0x211555;});_0xf9dd70=_0x364e22[_0xaa37('0x14')]?_0x364e22['destcalleridnum']:_0x364e22['calleridnum'];}var _0xa1d7d5=['id','firstName',_0xaa37('0x16'),_0xaa37('0x12'),_0xaa37('0x17'),'fax','ListId',_0xaa37('0x18'),'scheduledAt',_0xaa37('0x19')];var _0x1097d4=_[_0xaa37('0x1a')](_0xa1d7d5,_0x309699);BPromise['resolve']()[_0xaa37('0x1b')](cmContactRpc[_0xaa37('0x1c')]({'attributes':_0x1097d4,'where':_0x1dbf67,'phone':_0xf9dd70}))[_0xaa37('0x1b')](function(_0x59f311){_0x1e89de=_0x59f311;if(!_['isEmpty'](_0x1e89de)){if(_0x1e89de[_0xaa37('0x1d')]===0x1){_0x39d691=_0x1e89de[0x0];logger[_0xaa37('0x8')](_0xaa37('0x1e'),_0x364e22[_0xaa37('0x1f')],_0x5a630d['id'],_0x39d691['id']);}else{logger['info'](_0xaa37('0x20'),_0x364e22[_0xaa37('0x1f')],_0x5a630d['id'],_[_0xaa37('0x13')](_0x1e89de,'id')[_0xaa37('0x21')](','));}return;}else{logger[_0xaa37('0x8')]('[CM][%s][%s]\x20Contact\x20not\x20found',_0x364e22['uniqueid'],_0x5a630d['id']);var _0x59a602={'ListId':_0x115c36};var _0x4a480d=_0x45b5e0[_0xaa37('0x22')]&&_0x45b5e0['data4']!=='0'?_0x45b5e0[_0xaa37('0x22')]:_0xaa37('0x12');if(_0x240bdc){logger[_0xaa37('0x8')](_0xaa37('0x23'),_0x364e22[_0xaa37('0x1f')],_0x5a630d['id']);_0x59a602[_0x4a480d]=_['isNil'](_0x364e22[_0xaa37('0x14')])?_0x364e22[_0xaa37('0x15')]:_0x364e22['destcalleridnum'];if(_['isNil'](_0x364e22[_0xaa37('0x14')])){_0x59a602[_0xaa37('0x24')]=_0x364e22[_0xaa37('0x25')]&&_0x364e22[_0xaa37('0x25')]!==_0xaa37('0x26')?_0x364e22[_0xaa37('0x25')]:'Unknown';}else{_0x59a602[_0xaa37('0x24')]=_0x364e22[_0xaa37('0x27')]&&_0x364e22['destcalleridname']!=='<unknown>'?_0x364e22['destcalleridname']:_0xaa37('0x28');}return BPromise[_0xaa37('0x29')]()[_0xaa37('0x1b')](cmContactRpc[_0xaa37('0x2a')](_0x59a602))['then'](function(_0x19ec1e){_0x39d691=_0x19ec1e;_0x1e89de[_0xaa37('0x2b')](_0x19ec1e);if(_0x39d691){logger[_0xaa37('0x8')](_0xaa37('0x2c'),_0x364e22[_0xaa37('0x1f')],_0x5a630d['id'],_0x39d691['id']);}return;});}else{logger[_0xaa37('0x8')](_0xaa37('0x2d'),_0x364e22[_0xaa37('0x1f')],_0x5a630d['id']);_0x59a602[_0x4a480d]=_[_0xaa37('0x2e')](_0x364e22[_0xaa37('0x14')])?_0x364e22[_0xaa37('0x15')]:_0x364e22[_0xaa37('0x2f')];if(_[_0xaa37('0x2e')](_0x364e22[_0xaa37('0x14')])){_0x59a602[_0xaa37('0x24')]=_0x364e22[_0xaa37('0x25')]&&_0x364e22[_0xaa37('0x25')]!==_0xaa37('0x26')?_0x364e22[_0xaa37('0x25')]:_0xaa37('0x28');}else{_0x59a602[_0xaa37('0x24')]=_0x364e22[_0xaa37('0x27')]&&_0x364e22['destcalleridname']!=='<unknown>'?_0x364e22[_0xaa37('0x27')]:'Unknown';}_0x39d691=_0x59a602;_0x1e89de[_0xaa37('0x2b')](_0x59a602);return;}}})[_0xaa37('0x1b')](function(){if(_0x419edc){emit(_0x364e22[_0xaa37('0x1f')],_0x5a630d,util[_0xaa37('0x30')](_0xaa37('0x31'),_0x419edc[_0xaa37('0x32')]),util[_0xaa37('0x30')](_0xaa37('0x33'),_0x45b5e0['action'][_0xaa37('0x34')]()),{'evt':_['merge'](_0x364e22,{'autoCreate':_0x240bdc}),'contact':_0x39d691===undefined?{}:_0x39d691,'contacts':_0x1e89de[_0xaa37('0x1d')]===0x0?undefined:_0x1e89de});}});};
\ No newline at end of file
index 9ba2873..0828a28 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x462f=['custom:newinteraction','custom:substatus','custom:incomingmessage','custom:outgoingmessage','custom:offlineMessage','info','stringify','emit','prototype','clone','motionChannel','undefined','voice','interface','hasOwnProperty','status','checkTrigger','merge','variables','Actions','action','contactmanager','motionbar','browser','data1','data2','html','render','template\x20not\x20found','uri','buildUri','isNil','data3','data4','location','uriLocation','800','data5','data6','600','winApplication','winArguments','format','user:%s','name','trigger:%s:%s','toLowerCase','trigger:%s','exec','voiceQueues','queue','routeId','urlforward','search','replace','channel','AllConditions','length','every','checkConditions','AnyConditions','debug','checkTrigger:\x20trigger','inspect','evt','field','account','chat','ChatWebsiteId','operator','value','upperFirst','AccountId','interaction','message','event','agent','lastevent','mailSubstatus','substatus','offlineMessage','created','equals','exports','util','lodash','url','mustache','./urlforward','./integration','./cmContact','../../../config/logger','trigger','../ami','redis','localhost','socket.io-emitter','popup','winapp','triggers','agents','templates','voiceExtensions','zendeskAccounts','freshdeskAccounts','salesforceAccounts','sugarcrmAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','freshsalesAccounts','accounts','custom:agentcalled','custom:agentconnect','syncCustomEvent','bind','custom:agentcomplete','custom:agentnosuchnumber','custom:agentnoanswer','custom:agentbusy','custom:agentcongestion','custom:agentreject','custom:amd','custom:queuecallerabandon','custom:timeout','syncAgentDial','custom:dialconnect'];(function(_0x7d1a50,_0x458e6b){var _0x3de6b=function(_0x1dc355){while(--_0x1dc355){_0x7d1a50['push'](_0x7d1a50['shift']());}};_0x3de6b(++_0x458e6b);}(_0x462f,0x1d7));var _0xf462=function(_0x4eec9b,_0x4aea09){_0x4eec9b=_0x4eec9b-0x0;var _0x2e3849=_0x462f[_0x4eec9b];return _0x2e3849;};'use strict';var util=require(_0xf462('0x0'));var _=require(_0xf462('0x1'));var url=require(_0xf462('0x2'));var Mustache=require(_0xf462('0x3'));var Redis=require('ioredis');var urlforward=require(_0xf462('0x4'));var integration=require(_0xf462('0x5'));var cmContact=require(_0xf462('0x6'));var script=require('./script');var config=require('../../../config/environment');var logger=require(_0xf462('0x7'))(_0xf462('0x8'));var ami=require(_0xf462('0x9'));config[_0xf462('0xa')]=_['defaults'](config[_0xf462('0xa')],{'host':_0xf462('0xb'),'port':0x18eb});var io=require(_0xf462('0xc'))(new Redis(config[_0xf462('0xa')]));var operators={'equals':function(_0x134863,_0x35ec35){return _0x134863==_0x35ec35;},'not_equals':function(_0x81e5b7,_0x584f7f){return _0x81e5b7!=_0x584f7f;}};var barAndWebActions=[_0xf462('0xd'),'url',_0xf462('0xe')];function Trigger(_0xb581a0){this[_0xf462('0xf')]=_0xb581a0[_0xf462('0xf')];this[_0xf462('0x10')]=_0xb581a0[_0xf462('0x10')];this['voiceQueues']=_0xb581a0['voiceQueues'];this[_0xf462('0x11')]=_0xb581a0[_0xf462('0x11')];this[_0xf462('0x12')]=_0xb581a0[_0xf462('0x12')];this[_0xf462('0x13')]=_0xb581a0[_0xf462('0x13')];this[_0xf462('0x14')]=_0xb581a0['freshdeskAccounts'];this[_0xf462('0x15')]=_0xb581a0[_0xf462('0x15')];this[_0xf462('0x16')]=_0xb581a0['sugarcrmAccounts'];this['zohoAccounts']=_0xb581a0[_0xf462('0x17')];this[_0xf462('0x18')]=_0xb581a0['deskAccounts'];this[_0xf462('0x19')]=_0xb581a0[_0xf462('0x19')];this[_0xf462('0x1a')]=_0xb581a0[_0xf462('0x1a')];this[_0xf462('0x1b')]=_0xb581a0[_0xf462('0x1b')];this[_0xf462('0x1c')]=_0xb581a0[_0xf462('0x1c')];this[_0xf462('0x1d')]={'zendesk':this[_0xf462('0x13')],'salesforce':this[_0xf462('0x15')],'freshdesk':this['freshdeskAccounts'],'sugarcrm':this[_0xf462('0x16')],'zoho':this[_0xf462('0x17')],'desk':this[_0xf462('0x18')],'vtiger':this[_0xf462('0x19')],'dynamics365':this['dynamics365Accounts'],'freshsales':this[_0xf462('0x1c')],'servicenow':this[_0xf462('0x1a')]};ami['on'](_0xf462('0x1e'),this['syncCustomEvent']['bind'](this));ami['on'](_0xf462('0x1f'),this[_0xf462('0x20')][_0xf462('0x21')](this));ami['on']('custom:agentringnoanswer',this['syncCustomEvent'][_0xf462('0x21')](this));ami['on'](_0xf462('0x22'),this[_0xf462('0x20')][_0xf462('0x21')](this));ami['on'](_0xf462('0x23'),this[_0xf462('0x20')][_0xf462('0x21')](this));ami['on'](_0xf462('0x24'),this[_0xf462('0x20')]['bind'](this));ami['on'](_0xf462('0x25'),this[_0xf462('0x20')]['bind'](this));ami['on'](_0xf462('0x26'),this[_0xf462('0x20')][_0xf462('0x21')](this));ami['on'](_0xf462('0x27'),this[_0xf462('0x20')][_0xf462('0x21')](this));ami['on'](_0xf462('0x28'),this[_0xf462('0x20')][_0xf462('0x21')](this));ami['on'](_0xf462('0x29'),this[_0xf462('0x20')]['bind'](this));ami['on'](_0xf462('0x2a'),this[_0xf462('0x20')][_0xf462('0x21')](this));ami['on']('custom:dialbegin',this[_0xf462('0x2b')][_0xf462('0x21')](this));ami['on'](_0xf462('0x2c'),this[_0xf462('0x2b')][_0xf462('0x21')](this));ami['on']('custom:dialend',this[_0xf462('0x2b')][_0xf462('0x21')](this));ami['on'](_0xf462('0x2d'),this[_0xf462('0x20')][_0xf462('0x21')](this));ami['on']('custom:closedinteraction',this[_0xf462('0x20')][_0xf462('0x21')](this));ami['on'](_0xf462('0x2e'),this[_0xf462('0x20')][_0xf462('0x21')](this));ami['on'](_0xf462('0x2f'),this['syncCustomEvent'][_0xf462('0x21')](this));ami['on'](_0xf462('0x30'),this[_0xf462('0x20')][_0xf462('0x21')](this));ami['on']('custom:acceptmessage',this[_0xf462('0x20')][_0xf462('0x21')](this));ami['on']('custom:rejectmessage',this['syncCustomEvent'][_0xf462('0x21')](this));ami['on'](_0xf462('0x31'),this[_0xf462('0x20')][_0xf462('0x21')](this));}Trigger['prototype']['emit']=function(_0x1b2070,_0x4b87ee,_0x29015b){logger[_0xf462('0x32')](_0x1b2070,_0x4b87ee,JSON[_0xf462('0x33')](_0x29015b));io['to'](_0x1b2070)[_0xf462('0x34')](_0x4b87ee,_0x29015b);};Trigger[_0xf462('0x35')][_0xf462('0x20')]=function(_0x406feb){var _0x3bfb37=_[_0xf462('0x36')](_0x406feb);if(typeof _0x3bfb37[_0xf462('0x37')]===_0xf462('0x38')){_0x3bfb37[_0xf462('0x37')]=_0xf462('0x39');}logger['debug']('syncCustomEvent',util['inspect'](_0x3bfb37,{'showHidden':!![],'depth':null}));this['checkTriggers'](_0x3bfb37);};Trigger[_0xf462('0x35')][_0xf462('0x2b')]=function(_0x482135){if(this[_0xf462('0x10')][_0x482135[_0xf462('0x3a')]]){this[_0xf462('0x20')](_0x482135);}};Trigger['prototype']['checkTriggers']=function(_0x3c8d22){var _0x172ac8;for(var _0x18b0f3 in this[_0xf462('0xf')]){if(this['triggers'][_0xf462('0x3b')](_0x18b0f3)){if(this[_0xf462('0xf')][_0x18b0f3][_0xf462('0x3c')]){_0x172ac8=this[_0xf462('0x3d')](this['triggers'][_0x18b0f3],_0x3c8d22);if(_0x172ac8){_[_0xf462('0x3e')](_0x3c8d22,_0x3c8d22[_0xf462('0x3f')]);for(var _0x3353e0=0x0,_0xdefb60,_0x41a1e4,_0x274ab1;_0x3353e0<this[_0xf462('0xf')][_0x18b0f3][_0xf462('0x40')]['length'];_0x3353e0+=0x1){_0xdefb60=this[_0xf462('0xf')][_0x18b0f3][_0xf462('0x40')][_0x3353e0];if(this[_0xf462('0x10')][_0x3c8d22[_0xf462('0x3a')]]){switch(_0xdefb60[_0xf462('0x41')]['toLowerCase']()){case _0xf462('0x42'):break;case _0xf462('0x43'):case _0xf462('0x44'):var _0xa70c12={};switch(barAndWebActions[_0xdefb60[_0xf462('0x45')]]){case'popup':_0xa70c12['TemplateId']=_0xdefb60[_0xf462('0x46')];_0xa70c12[_0xf462('0x47')]=this[_0xf462('0x11')][_0xdefb60[_0xf462('0x46')]]?Mustache[_0xf462('0x48')](this[_0xf462('0x11')][_0xdefb60[_0xf462('0x46')]][_0xf462('0x47')],_0x3c8d22):_0xf462('0x49');break;case _0xf462('0x2'):_0xa70c12[_0xf462('0x4a')]=this[_0xf462('0x4b')](_0xdefb60[_0xf462('0x46')],_0x3c8d22,_[_0xf462('0x4c')](_0xdefb60[_0xf462('0x4d')])?!![]:parseInt(_0xdefb60[_0xf462('0x4d')],0xa));if(_[_0xf462('0x4c')](_0xdefb60[_0xf462('0x4e')])){_0xa70c12[_0xf462('0x4f')]='0';}else{_0xa70c12[_0xf462('0x50')]=_0xdefb60[_0xf462('0x4e')];_0xa70c12['windowWidth']=_[_0xf462('0x4c')](_0xdefb60['data5'])?_0xf462('0x51'):_0xdefb60[_0xf462('0x52')];_0xa70c12['windowHeight']=_[_0xf462('0x4c')](_0xdefb60[_0xf462('0x53')])?_0xf462('0x54'):_0xdefb60[_0xf462('0x53')];}break;case _0xf462('0xe'):_0xa70c12[_0xf462('0x55')]=_0xdefb60[_0xf462('0x46')]?Mustache[_0xf462('0x48')](_0xdefb60['data2'],_0x3c8d22):'';_0xa70c12[_0xf462('0x56')]=_0xdefb60[_0xf462('0x4d')]?Mustache[_0xf462('0x48')](_0xdefb60[_0xf462('0x4d')],_0x3c8d22):'';break;}this[_0xf462('0x34')](util[_0xf462('0x57')](_0xf462('0x58'),this[_0xf462('0x10')][_0x3c8d22[_0xf462('0x3a')]][_0xf462('0x59')]),util['format'](_0xf462('0x5a'),_0xdefb60['action'][_0xf462('0x5b')](),barAndWebActions[_0xdefb60[_0xf462('0x45')]]),_['merge'](_0xa70c12,_0x3c8d22));break;case'jscripty':this[_0xf462('0x34')](util['format'](_0xf462('0x58'),this[_0xf462('0x10')][_0x3c8d22[_0xf462('0x3a')]][_0xf462('0x59')]),util[_0xf462('0x57')](_0xf462('0x5c'),_0xdefb60[_0xf462('0x41')][_0xf462('0x5b')]()),_[_0xf462('0x3e')]({'ProjectId':parseInt(_0xdefb60['data1'],0xa)},_0x3c8d22));break;default:this[_0xf462('0x34')](util['format'](_0xf462('0x58'),this['agents'][_0x3c8d22['interface']][_0xf462('0x59')]),util[_0xf462('0x57')]('trigger:%s',_0xdefb60[_0xf462('0x41')][_0xf462('0x5b')]()),_[_0xf462('0x3e')]({},_0xdefb60,_0x3c8d22));}}switch(_0xdefb60[_0xf462('0x41')][_0xf462('0x5b')]()){case _0xf462('0x42'):cmContact[_0xf462('0x5d')](this[_0xf462('0x10')][_0x3c8d22[_0xf462('0x3a')]],this[_0xf462('0xf')][_0x18b0f3],_0xdefb60,_0x3c8d22);break;case'integration':integration[_0xf462('0x5d')](_0xdefb60,_0x3c8d22,this[_0xf462('0x1d')],this[_0xf462('0x10')][_0x3c8d22[_0xf462('0x3a')]],this[_0xf462('0x5e')][_0x3c8d22[_0xf462('0x5f')]],this[_0xf462('0x12')][_0x3c8d22[_0xf462('0x60')]]);break;case _0xf462('0x61'):urlforward[_0xf462('0x5d')](_0xdefb60,_0x3c8d22);break;case'script':script[_0xf462('0x5d')](_0xdefb60,_0x3c8d22);break;}}}}}}};Trigger[_0xf462('0x35')][_0xf462('0x4b')]=function(_0x2c96e4,_0x5de297,_0x4ee84e){var _0x2224fa=url['parse'](Mustache[_0xf462('0x48')](_0x2c96e4,_0x5de297),!![]);if(_0x4ee84e){_['merge'](_0x2224fa['query'],_0x5de297);}delete _0x2224fa[_0xf462('0x62')];var _0x589cca=url['format'](_0x2224fa);_0x589cca=_0x589cca[_0xf462('0x63')](/\/\?/g,'?');return _0x589cca;};Trigger[_0xf462('0x35')][_0xf462('0x3d')]=function(_0x45411f,_0x4d7c16){var _0x209078=!![];var _0x525749=!![];var _0x3ab5e3=![];if(_0x45411f[_0xf462('0x64')]===_0x4d7c16[_0xf462('0x37')]){_0x3ab5e3=!![];}if(_0x45411f[_0xf462('0x65')][_0xf462('0x66')]){_0x209078=_[_0xf462('0x67')](_0x45411f[_0xf462('0x65')],this[_0xf462('0x68')](_0x4d7c16,_0x45411f[_0xf462('0x64')]));}if(_0x45411f['AnyConditions'][_0xf462('0x66')]){_0x525749=_['some'](_0x45411f[_0xf462('0x69')],this[_0xf462('0x68')](_0x4d7c16,_0x45411f[_0xf462('0x64')]));}var _0x26110d=_0x3ab5e3&&_0x209078&&_0x525749;logger[_0xf462('0x6a')](_0xf462('0x6b'),util[_0xf462('0x6c')](_0x45411f,{'showHidden':!![],'depth':null}),_0xf462('0x6d'),util['inspect'](_0x4d7c16,{'showHidden':!![],'depth':null}),_0x3ab5e3,_0x209078,_0x525749);return _0x26110d;};Trigger['prototype']['checkConditions']=function(_0x3012f3,_0x3c9882){return function(_0x1dcf29){switch(_0x1dcf29[_0xf462('0x6e')]){case _0xf462('0x6f'):if(_0x3012f3[_0xf462('0x64')]===_0x3c9882){if(_0x3c9882===_0xf462('0x70')){return _0x3012f3[_0xf462('0x71')]?operators[_0x1dcf29[_0xf462('0x72')]](Number(_0x1dcf29[_0xf462('0x73')]),_0x3012f3['ChatWebsiteId']):![];}else{return _0x3012f3[_[_0xf462('0x74')](_0x3c9882)+_0xf462('0x75')]?operators[_0x1dcf29[_0xf462('0x72')]](Number(_0x1dcf29[_0xf462('0x73')]),_0x3012f3[_['upperFirst'](_0x3c9882)+_0xf462('0x75')]):![];}}break;case _0xf462('0x76'):case _0xf462('0x77'):if(_0x3012f3[_0xf462('0x64')]===_0x3c9882){return _0x3012f3['event']?operators[_0x1dcf29[_0xf462('0x72')]](_0x1dcf29[_0xf462('0x73')],_0x3012f3[_0xf462('0x78')]):![];}break;case _0xf462('0x5f'):return _0x3012f3[_0xf462('0x5f')]?operators[_0x1dcf29['operator']](_0x1dcf29[_0xf462('0x73')],_0x3012f3['queue']):![];case _0xf462('0x79'):return _0x3012f3['membername']?operators[_0x1dcf29[_0xf462('0x72')]](_0x1dcf29[_0xf462('0x73')],_0x3012f3['membername']):![];case _0xf462('0x7a'):return _0x3012f3[_0xf462('0x7a')]?operators[_0x1dcf29['operator']](_0x1dcf29[_0xf462('0x73')],_0x3012f3[_0xf462('0x7a')]):![];case'routeId':return _0x3012f3['routeId']?operators[_0x1dcf29[_0xf462('0x72')]](_0x1dcf29['value'],_0x3012f3[_0xf462('0x60')]):![];case _0xf462('0x7b'):if(_0x1dcf29[_0xf462('0x73')]==='null')_0x1dcf29[_0xf462('0x73')]=null;return typeof _0x3012f3[_0xf462('0x7c')]!==_0xf462('0x38')?operators[_0x1dcf29['operator']](_0x1dcf29['value'],_0x3012f3[_0xf462('0x7c')]):![];case _0xf462('0x7d'):if(_0x3012f3['channel']===_0x3c9882){return _0x1dcf29['value']===_0xf462('0x7e')&&_0x1dcf29[_0xf462('0x72')]===_0xf462('0x7f')?!![]:![];}break;}return![];};};module[_0xf462('0x80')]=Trigger;
\ No newline at end of file
+var _0x90b3=['queue','routeId','exec','parse','query','replace','channel','AllConditions','AnyConditions','some','checkConditions','checkTrigger:\x20trigger','evt','field','chat','ChatWebsiteId','value','AccountId','operator','upperFirst','message','event','agent','membername','lastevent','mailSubstatus','null','substatus','undefined','offlineMessage','created','equals','exports','util','lodash','url','mustache','ioredis','./integration','./cmContact','./script','../../../config/logger','trigger','../ami','redis','defaults','localhost','socket.io-emitter','popup','winapp','triggers','agents','voiceQueues','templates','voiceExtensions','zendeskAccounts','freshdeskAccounts','salesforceAccounts','sugarcrmAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','freshsalesAccounts','accounts','custom:agentcalled','syncCustomEvent','bind','custom:agentconnect','custom:agentcomplete','custom:agentnosuchnumber','custom:agentnoanswer','custom:agentbusy','custom:agentcongestion','custom:agentreject','custom:queuecallerabandon','custom:dialbegin','syncAgentDial','custom:dialconnect','custom:dialend','custom:newinteraction','custom:closedinteraction','custom:substatus','custom:incomingmessage','custom:outgoingmessage','custom:acceptmessage','emit','info','stringify','motionChannel','voice','inspect','prototype','checkTriggers','status','checkTrigger','merge','length','Actions','interface','action','toLowerCase','motionbar','browser','data1','TemplateId','data2','html','template\x20not\x20found','uri','buildUri','isNil','data3','data4','location','uriLocation','windowWidth','data5','windowHeight','data6','600','render','name','format','trigger:%s:%s','user:%s','trigger:%s','contactmanager'];(function(_0x19c19f,_0x41ae97){var _0x228a2c=function(_0x2847c2){while(--_0x2847c2){_0x19c19f['push'](_0x19c19f['shift']());}};_0x228a2c(++_0x41ae97);}(_0x90b3,0x123));var _0x390b=function(_0x76dd6e,_0x14dd80){_0x76dd6e=_0x76dd6e-0x0;var _0x35fb11=_0x90b3[_0x76dd6e];return _0x35fb11;};'use strict';var util=require(_0x390b('0x0'));var _=require(_0x390b('0x1'));var url=require(_0x390b('0x2'));var Mustache=require(_0x390b('0x3'));var Redis=require(_0x390b('0x4'));var urlforward=require('./urlforward');var integration=require(_0x390b('0x5'));var cmContact=require(_0x390b('0x6'));var script=require(_0x390b('0x7'));var config=require('../../../config/environment');var logger=require(_0x390b('0x8'))(_0x390b('0x9'));var ami=require(_0x390b('0xa'));config[_0x390b('0xb')]=_[_0x390b('0xc')](config['redis'],{'host':_0x390b('0xd'),'port':0x18eb});var io=require(_0x390b('0xe'))(new Redis(config[_0x390b('0xb')]));var operators={'equals':function(_0x55737b,_0xbd1df2){return _0x55737b==_0xbd1df2;},'not_equals':function(_0x38f114,_0x5a39b8){return _0x38f114!=_0x5a39b8;}};var barAndWebActions=[_0x390b('0xf'),'url',_0x390b('0x10')];function Trigger(_0x48bd54){this[_0x390b('0x11')]=_0x48bd54[_0x390b('0x11')];this[_0x390b('0x12')]=_0x48bd54[_0x390b('0x12')];this[_0x390b('0x13')]=_0x48bd54[_0x390b('0x13')];this[_0x390b('0x14')]=_0x48bd54['templates'];this[_0x390b('0x15')]=_0x48bd54['voiceExtensions'];this[_0x390b('0x16')]=_0x48bd54['zendeskAccounts'];this[_0x390b('0x17')]=_0x48bd54[_0x390b('0x17')];this['salesforceAccounts']=_0x48bd54[_0x390b('0x18')];this[_0x390b('0x19')]=_0x48bd54['sugarcrmAccounts'];this[_0x390b('0x1a')]=_0x48bd54[_0x390b('0x1a')];this[_0x390b('0x1b')]=_0x48bd54[_0x390b('0x1b')];this[_0x390b('0x1c')]=_0x48bd54[_0x390b('0x1c')];this[_0x390b('0x1d')]=_0x48bd54['servicenowAccounts'];this[_0x390b('0x1e')]=_0x48bd54['dynamics365Accounts'];this[_0x390b('0x1f')]=_0x48bd54[_0x390b('0x1f')];this[_0x390b('0x20')]={'zendesk':this[_0x390b('0x16')],'salesforce':this['salesforceAccounts'],'freshdesk':this[_0x390b('0x17')],'sugarcrm':this['sugarcrmAccounts'],'zoho':this['zohoAccounts'],'desk':this[_0x390b('0x1b')],'vtiger':this[_0x390b('0x1c')],'dynamics365':this[_0x390b('0x1e')],'freshsales':this[_0x390b('0x1f')],'servicenow':this[_0x390b('0x1d')]};ami['on'](_0x390b('0x21'),this[_0x390b('0x22')][_0x390b('0x23')](this));ami['on'](_0x390b('0x24'),this[_0x390b('0x22')][_0x390b('0x23')](this));ami['on']('custom:agentringnoanswer',this[_0x390b('0x22')][_0x390b('0x23')](this));ami['on'](_0x390b('0x25'),this[_0x390b('0x22')][_0x390b('0x23')](this));ami['on'](_0x390b('0x26'),this[_0x390b('0x22')][_0x390b('0x23')](this));ami['on'](_0x390b('0x27'),this['syncCustomEvent'][_0x390b('0x23')](this));ami['on'](_0x390b('0x28'),this[_0x390b('0x22')]['bind'](this));ami['on'](_0x390b('0x29'),this[_0x390b('0x22')][_0x390b('0x23')](this));ami['on'](_0x390b('0x2a'),this[_0x390b('0x22')][_0x390b('0x23')](this));ami['on']('custom:amd',this[_0x390b('0x22')][_0x390b('0x23')](this));ami['on'](_0x390b('0x2b'),this[_0x390b('0x22')][_0x390b('0x23')](this));ami['on']('custom:timeout',this[_0x390b('0x22')][_0x390b('0x23')](this));ami['on'](_0x390b('0x2c'),this[_0x390b('0x2d')][_0x390b('0x23')](this));ami['on'](_0x390b('0x2e'),this[_0x390b('0x2d')][_0x390b('0x23')](this));ami['on'](_0x390b('0x2f'),this[_0x390b('0x2d')][_0x390b('0x23')](this));ami['on'](_0x390b('0x30'),this[_0x390b('0x22')][_0x390b('0x23')](this));ami['on'](_0x390b('0x31'),this[_0x390b('0x22')]['bind'](this));ami['on'](_0x390b('0x32'),this['syncCustomEvent']['bind'](this));ami['on'](_0x390b('0x33'),this[_0x390b('0x22')][_0x390b('0x23')](this));ami['on'](_0x390b('0x34'),this['syncCustomEvent'][_0x390b('0x23')](this));ami['on'](_0x390b('0x35'),this[_0x390b('0x22')]['bind'](this));ami['on']('custom:rejectmessage',this[_0x390b('0x22')][_0x390b('0x23')](this));ami['on']('custom:offlineMessage',this[_0x390b('0x22')][_0x390b('0x23')](this));}Trigger['prototype'][_0x390b('0x36')]=function(_0x1bb42b,_0x283086,_0x20f9a8){logger[_0x390b('0x37')](_0x1bb42b,_0x283086,JSON[_0x390b('0x38')](_0x20f9a8));io['to'](_0x1bb42b)[_0x390b('0x36')](_0x283086,_0x20f9a8);};Trigger['prototype']['syncCustomEvent']=function(_0x50333b){var _0x132880=_['clone'](_0x50333b);if(typeof _0x132880[_0x390b('0x39')]==='undefined'){_0x132880[_0x390b('0x39')]=_0x390b('0x3a');}logger['debug'](_0x390b('0x22'),util[_0x390b('0x3b')](_0x132880,{'showHidden':!![],'depth':null}));this['checkTriggers'](_0x132880);};Trigger[_0x390b('0x3c')][_0x390b('0x2d')]=function(_0x46b99e){if(this[_0x390b('0x12')][_0x46b99e['interface']]){this['syncCustomEvent'](_0x46b99e);}};Trigger[_0x390b('0x3c')][_0x390b('0x3d')]=function(_0x20f0ce){var _0x2b8c4e;for(var _0xeabc1f in this[_0x390b('0x11')]){if(this[_0x390b('0x11')]['hasOwnProperty'](_0xeabc1f)){if(this['triggers'][_0xeabc1f][_0x390b('0x3e')]){_0x2b8c4e=this[_0x390b('0x3f')](this[_0x390b('0x11')][_0xeabc1f],_0x20f0ce);if(_0x2b8c4e){_[_0x390b('0x40')](_0x20f0ce,_0x20f0ce['variables']);for(var _0x1b3d00=0x0,_0x1ece9b,_0xf00cb4,_0x54da7b;_0x1b3d00<this[_0x390b('0x11')][_0xeabc1f]['Actions'][_0x390b('0x41')];_0x1b3d00+=0x1){_0x1ece9b=this['triggers'][_0xeabc1f][_0x390b('0x42')][_0x1b3d00];if(this[_0x390b('0x12')][_0x20f0ce[_0x390b('0x43')]]){switch(_0x1ece9b[_0x390b('0x44')][_0x390b('0x45')]()){case'contactmanager':break;case _0x390b('0x46'):case _0x390b('0x47'):var _0x1fad19={};switch(barAndWebActions[_0x1ece9b[_0x390b('0x48')]]){case _0x390b('0xf'):_0x1fad19[_0x390b('0x49')]=_0x1ece9b[_0x390b('0x4a')];_0x1fad19['html']=this['templates'][_0x1ece9b['data2']]?Mustache['render'](this[_0x390b('0x14')][_0x1ece9b[_0x390b('0x4a')]][_0x390b('0x4b')],_0x20f0ce):_0x390b('0x4c');break;case _0x390b('0x2'):_0x1fad19[_0x390b('0x4d')]=this[_0x390b('0x4e')](_0x1ece9b[_0x390b('0x4a')],_0x20f0ce,_[_0x390b('0x4f')](_0x1ece9b[_0x390b('0x50')])?!![]:parseInt(_0x1ece9b[_0x390b('0x50')],0xa));if(_[_0x390b('0x4f')](_0x1ece9b[_0x390b('0x51')])){_0x1fad19[_0x390b('0x52')]='0';}else{_0x1fad19[_0x390b('0x53')]=_0x1ece9b[_0x390b('0x51')];_0x1fad19[_0x390b('0x54')]=_['isNil'](_0x1ece9b['data5'])?'800':_0x1ece9b[_0x390b('0x55')];_0x1fad19[_0x390b('0x56')]=_[_0x390b('0x4f')](_0x1ece9b[_0x390b('0x57')])?_0x390b('0x58'):_0x1ece9b[_0x390b('0x57')];}break;case _0x390b('0x10'):_0x1fad19['winApplication']=_0x1ece9b[_0x390b('0x4a')]?Mustache[_0x390b('0x59')](_0x1ece9b[_0x390b('0x4a')],_0x20f0ce):'';_0x1fad19['winArguments']=_0x1ece9b['data3']?Mustache[_0x390b('0x59')](_0x1ece9b[_0x390b('0x50')],_0x20f0ce):'';break;}this[_0x390b('0x36')](util['format']('user:%s',this[_0x390b('0x12')][_0x20f0ce[_0x390b('0x43')]][_0x390b('0x5a')]),util[_0x390b('0x5b')](_0x390b('0x5c'),_0x1ece9b['action'][_0x390b('0x45')](),barAndWebActions[_0x1ece9b[_0x390b('0x48')]]),_[_0x390b('0x40')](_0x1fad19,_0x20f0ce));break;case'jscripty':this[_0x390b('0x36')](util['format'](_0x390b('0x5d'),this['agents'][_0x20f0ce[_0x390b('0x43')]][_0x390b('0x5a')]),util['format'](_0x390b('0x5e'),_0x1ece9b['action']['toLowerCase']()),_[_0x390b('0x40')]({'ProjectId':parseInt(_0x1ece9b[_0x390b('0x48')],0xa)},_0x20f0ce));break;default:this[_0x390b('0x36')](util[_0x390b('0x5b')]('user:%s',this['agents'][_0x20f0ce[_0x390b('0x43')]]['name']),util[_0x390b('0x5b')](_0x390b('0x5e'),_0x1ece9b[_0x390b('0x44')][_0x390b('0x45')]()),_['merge']({},_0x1ece9b,_0x20f0ce));}}switch(_0x1ece9b[_0x390b('0x44')][_0x390b('0x45')]()){case _0x390b('0x5f'):cmContact['exec'](this['agents'][_0x20f0ce['interface']],this[_0x390b('0x11')][_0xeabc1f],_0x1ece9b,_0x20f0ce);break;case'integration':integration['exec'](_0x1ece9b,_0x20f0ce,this[_0x390b('0x20')],this[_0x390b('0x12')][_0x20f0ce[_0x390b('0x43')]],this['voiceQueues'][_0x20f0ce[_0x390b('0x60')]],this['voiceExtensions'][_0x20f0ce[_0x390b('0x61')]]);break;case'urlforward':urlforward[_0x390b('0x62')](_0x1ece9b,_0x20f0ce);break;case'script':script[_0x390b('0x62')](_0x1ece9b,_0x20f0ce);break;}}}}}}};Trigger['prototype']['buildUri']=function(_0x28ea4a,_0x3e06c8,_0x2bd9f3){var _0x224675=url[_0x390b('0x63')](Mustache[_0x390b('0x59')](_0x28ea4a,_0x3e06c8),!![]);if(_0x2bd9f3){_['merge'](_0x224675[_0x390b('0x64')],_0x3e06c8);}delete _0x224675['search'];var _0x488638=url[_0x390b('0x5b')](_0x224675);_0x488638=_0x488638[_0x390b('0x65')](/\/\?/g,'?');return _0x488638;};Trigger[_0x390b('0x3c')]['checkTrigger']=function(_0xa67aea,_0x4b9e24){var _0x56787a=!![];var _0x331f17=!![];var _0x21578c=![];if(_0xa67aea[_0x390b('0x66')]===_0x4b9e24[_0x390b('0x39')]){_0x21578c=!![];}if(_0xa67aea[_0x390b('0x67')][_0x390b('0x41')]){_0x56787a=_['every'](_0xa67aea[_0x390b('0x67')],this['checkConditions'](_0x4b9e24,_0xa67aea[_0x390b('0x66')]));}if(_0xa67aea[_0x390b('0x68')][_0x390b('0x41')]){_0x331f17=_[_0x390b('0x69')](_0xa67aea[_0x390b('0x68')],this[_0x390b('0x6a')](_0x4b9e24,_0xa67aea[_0x390b('0x66')]));}var _0x1fe834=_0x21578c&&_0x56787a&&_0x331f17;logger['debug'](_0x390b('0x6b'),util[_0x390b('0x3b')](_0xa67aea,{'showHidden':!![],'depth':null}),_0x390b('0x6c'),util[_0x390b('0x3b')](_0x4b9e24,{'showHidden':!![],'depth':null}),_0x21578c,_0x56787a,_0x331f17);return _0x1fe834;};Trigger[_0x390b('0x3c')][_0x390b('0x6a')]=function(_0x3f4f7e,_0x497fa0){return function(_0x440b8c){switch(_0x440b8c[_0x390b('0x6d')]){case'account':if(_0x3f4f7e['channel']===_0x497fa0){if(_0x497fa0===_0x390b('0x6e')){return _0x3f4f7e[_0x390b('0x6f')]?operators[_0x440b8c['operator']](Number(_0x440b8c[_0x390b('0x70')]),_0x3f4f7e[_0x390b('0x6f')]):![];}else{return _0x3f4f7e[_['upperFirst'](_0x497fa0)+_0x390b('0x71')]?operators[_0x440b8c[_0x390b('0x72')]](Number(_0x440b8c[_0x390b('0x70')]),_0x3f4f7e[_[_0x390b('0x73')](_0x497fa0)+_0x390b('0x71')]):![];}}break;case'interaction':case _0x390b('0x74'):if(_0x3f4f7e['channel']===_0x497fa0){return _0x3f4f7e[_0x390b('0x75')]?operators[_0x440b8c[_0x390b('0x72')]](_0x440b8c[_0x390b('0x70')],_0x3f4f7e[_0x390b('0x75')]):![];}break;case _0x390b('0x60'):return _0x3f4f7e[_0x390b('0x60')]?operators[_0x440b8c[_0x390b('0x72')]](_0x440b8c[_0x390b('0x70')],_0x3f4f7e[_0x390b('0x60')]):![];case _0x390b('0x76'):return _0x3f4f7e[_0x390b('0x77')]?operators[_0x440b8c[_0x390b('0x72')]](_0x440b8c[_0x390b('0x70')],_0x3f4f7e['membername']):![];case _0x390b('0x78'):return _0x3f4f7e['lastevent']?operators[_0x440b8c[_0x390b('0x72')]](_0x440b8c[_0x390b('0x70')],_0x3f4f7e[_0x390b('0x78')]):![];case _0x390b('0x61'):return _0x3f4f7e[_0x390b('0x61')]?operators[_0x440b8c[_0x390b('0x72')]](_0x440b8c[_0x390b('0x70')],_0x3f4f7e['routeId']):![];case _0x390b('0x79'):if(_0x440b8c[_0x390b('0x70')]===_0x390b('0x7a'))_0x440b8c[_0x390b('0x70')]=null;return typeof _0x3f4f7e[_0x390b('0x7b')]!==_0x390b('0x7c')?operators[_0x440b8c[_0x390b('0x72')]](_0x440b8c['value'],_0x3f4f7e[_0x390b('0x7b')]):![];case _0x390b('0x7d'):if(_0x3f4f7e[_0x390b('0x66')]===_0x497fa0){return _0x440b8c[_0x390b('0x70')]===_0x390b('0x7e')&&_0x440b8c[_0x390b('0x72')]===_0x390b('0x7f')?!![]:![];}break;}return![];};};module[_0x390b('0x80')]=Trigger;
\ No newline at end of file
index a580868..749c8ef 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3e74=['customField','content','idField','custom_fields','variable','variableName','name','Variable','toLowerCase','priority','Creating\x20new\x20ticket...','getString','phone','new','xCALLY','Motion','CTI','concat','Descriptions','/api/v2/users/%d','user','Fields','%s/customers/%d/cases','stripTrailingSlash','serverUrl','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','Authorization','email','The\x20User\x20ID\x20is:','Ticket\x20created!','The\x20Ticket\x20ID\x20is:','integrationTab','user:%s','newTab','[QUEUE]','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','https://xcally.desk.com/web/agent/case/%d','error','Desk\x20account\x20type\x20not\x20recognized','catch','outbound','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','destcalleridnum','The\x20Enduser\x20ID\x20is:','trigger:desk:display','trigger:browser:url','%s/agent/tickets/%s','stringify','unmanaged','monitor_format','lastevent','toUpperCase','calleridnum','lodash','md5','util','ioredis','../../../../config/logger','redis','defaults','localhost','socket.io-emitter','emit','application/json','info','Getting\x20agent\x20with\x20email','%s/users','then','find','_embedded','entries','Agent\x20found!','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','remoteUri','Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!','format','debug','[HTTP]','GET','authType','basic','%s:%s','username','password','token','Basic\x20%s','toString','base64','Searching\x20enduser\x20with\x20phone','total_entries','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','POST','length','forEach','includes','string','picklist','type','nameField'];(function(_0x20390d,_0xea5ad9){var _0x164c63=function(_0x2db86c){while(--_0x2db86c){_0x20390d['push'](_0x20390d['shift']());}};_0x164c63(++_0xea5ad9);}(_0x3e74,0x175));var _0x43e7=function(_0x4c6960,_0xfbbf4d){_0x4c6960=_0x4c6960-0x0;var _0x5de1dc=_0x3e74[_0x4c6960];return _0x5de1dc;};'use strict';var _=require(_0x43e7('0x0'));var rp=require('request-promise');var md5=require(_0x43e7('0x1'));var util=require(_0x43e7('0x2'));var Redis=require(_0x43e7('0x3'));var intUtil=require('./util');var config=require('../../../../config/environment');var logger=require(_0x43e7('0x4'))('desk');config[_0x43e7('0x5')]=_[_0x43e7('0x6')](config[_0x43e7('0x5')],{'host':_0x43e7('0x7'),'port':0x18eb});var io=require(_0x43e7('0x8'))(new Redis(config['redis']));function emit(_0x45a0d1,_0x3491d6,_0x2ede2d){io['to'](_0x45a0d1)[_0x43e7('0x9')](_0x3491d6,_0x2ede2d);}var headers={'Content-Type':_0x43e7('0xa'),'Accept':'application/json'};function getUser(_0x212c6c,_0x554d44){if(intUtil['validateEmail'](_0x554d44)===!![]){logger[_0x43e7('0xb')](_0x43e7('0xc'),_0x554d44);return request({'uri':util['format'](_0x43e7('0xd'),_0x212c6c['remoteUri'])})[_0x43e7('0xe')](function(_0x37302c){if(_0x37302c['total_entries']){return _[_0x43e7('0xf')](_0x37302c[_0x43e7('0x10')][_0x43e7('0x11')],{'email':_0x554d44});}})[_0x43e7('0xe')](function(_0x4e008c){if(_0x4e008c){logger['info'](_0x43e7('0x12'));return _0x4e008c;}else{logger[_0x43e7('0xb')](_0x43e7('0x13'));return request({'uri':util['format']('%s/users/me',_0x212c6c[_0x43e7('0x14')])});}});}else{logger[_0x43e7('0xb')](_0x43e7('0x15'));return request({'uri':util[_0x43e7('0x16')]('%s/users/me',_0x212c6c['remoteUri'])});}}function request(_0xdf16c){logger[_0x43e7('0x17')](_0x43e7('0x18'),JSON['stringify'](_0xdf16c));return rp(_['defaults'](_0xdf16c,{'method':_0x43e7('0x19'),'headers':headers,'json':!![]}));}function getAuth(_0x1ca758){var _0x9037d3;if(_0x1ca758[_0x43e7('0x1a')]===_0x43e7('0x1b')){_0x9037d3=util[_0x43e7('0x16')](_0x43e7('0x1c'),_0x1ca758[_0x43e7('0x1d')],_0x1ca758[_0x43e7('0x1e')]);}else if(_0x1ca758[_0x43e7('0x1a')]===_0x43e7('0x1f')){_0x9037d3=util[_0x43e7('0x16')]('%s/token:%s',_0x1ca758[_0x43e7('0x1d')],_0x1ca758[_0x43e7('0x1f')]);}return util['format'](_0x43e7('0x20'),new Buffer(_0x9037d3)[_0x43e7('0x21')](_0x43e7('0x22')));}function getEndUser(_0x28aacc,_0x4077fb,_0x2f4cb4){logger['info'](_0x43e7('0x23'),_0x2f4cb4);return request({'uri':util['format']('%s/customers/search',_0x28aacc[_0x43e7('0x14')]),'qs':{'phone':_0x2f4cb4}})[_0x43e7('0xe')](function(_0x4b2b9f){if(_0x4b2b9f[_0x43e7('0x24')]){logger['info'](_0x43e7('0x25'));return _0x4b2b9f['_embedded'][_0x43e7('0x11')][0x0];}else{logger[_0x43e7('0xb')](_0x43e7('0x26'));return request({'uri':util[_0x43e7('0x16')]('%s/customers',_0x28aacc['remoteUri']),'method':_0x43e7('0x27'),'body':{'first_name':_0x4077fb,'title':_0x4077fb,'phone_numbers':[{'type':'work','value':_0x2f4cb4}]}});}});}function getTags(_0x2dd5f,_0x40dc8f){var _0x3565cf=[];if(_0x2dd5f&&_0x2dd5f[_0x43e7('0x28')]>0x0){_0x3565cf=_['map'](_0x2dd5f,_0x40dc8f);}return _0x3565cf;}function getCustomFields(_0x33a1a5,_0x4690a6){var _0x45b675=[];var _0x50f9f5={'custom_fields':{}};if(_0x33a1a5[_0x43e7('0x28')]>0x0){_[_0x43e7('0x29')](_0x33a1a5,function(_0x2b85a5){if(_[_0x43e7('0x2a')]([_0x43e7('0x2b'),_0x43e7('0x2c')],_0x2b85a5[_0x43e7('0x2d')])&&_0x2b85a5[_0x43e7('0x2e')]&&!_0x2b85a5[_0x43e7('0x2f')]){_0x50f9f5[_0x2b85a5[_0x43e7('0x2e')]['toLowerCase']()]=_0x2b85a5[_0x43e7('0x30')][_0x43e7('0x21')]();}else if(_[_0x43e7('0x2a')]([_0x43e7('0x2b'),_0x43e7('0x2c')],_0x2b85a5['type'])&&_0x2b85a5[_0x43e7('0x31')]&&_0x2b85a5[_0x43e7('0x2f')]){_0x50f9f5[_0x43e7('0x32')][_0x2b85a5[_0x43e7('0x31')]]=_0x2b85a5['content']['toString']();}else if(_0x2b85a5['type']===_0x43e7('0x33')&&_0x2b85a5[_0x43e7('0x34')]&&_0x2b85a5[_0x43e7('0x31')]&&_0x2b85a5[_0x43e7('0x2f')]){_0x4690a6[_0x2b85a5[_0x43e7('0x34')]]&&(_0x50f9f5[_0x43e7('0x32')][_0x2b85a5['idField']]=_0x4690a6[_0x2b85a5['variableName']]['toString']());}else if(_0x2b85a5['type']==='customVariable'&&_0x2b85a5['Variable']&&_0x2b85a5['Variable'][_0x43e7('0x35')]&&_0x2b85a5['idField']&&_0x2b85a5[_0x43e7('0x2f')]){_0x4690a6[_0x2b85a5[_0x43e7('0x36')][_0x43e7('0x35')][_0x43e7('0x37')]()]&&(_0x50f9f5[_0x43e7('0x32')][_0x2b85a5[_0x43e7('0x31')]]=_0x4690a6[_0x2b85a5[_0x43e7('0x36')]['name']['toLowerCase']()]['toString']());}});}if(_0x50f9f5[_0x43e7('0x38')]){_0x50f9f5[_0x43e7('0x38')]=Number(_0x50f9f5[_0x43e7('0x38')]);}return _0x50f9f5;}function getTicket(_0x16cdba,_0x1b1440,_0x1ed538,_0x1d4589,_0x2ffd43){logger['info'](_0x43e7('0x39'));var _0x2b0ffe=_['merge']({'subject':intUtil[_0x43e7('0x3a')](_0x1d4589['Subjects'],_0x2ffd43,'\x20'),'type':_0x43e7('0x3b'),'status':_0x43e7('0x3c'),'labels':[_0x43e7('0x3d'),_0x43e7('0x3e'),_0x43e7('0x3f')][_0x43e7('0x40')](getTags(_0x1d4589['Tags'],'name')),'description':intUtil[_0x43e7('0x3a')](_0x1d4589[_0x43e7('0x41')],_0x2ffd43,'\x0a'),'_links':{'assigned_user':{'href':util[_0x43e7('0x16')](_0x43e7('0x42'),_0x1b1440['id']),'class':_0x43e7('0x43')}},'message':{'direction':'in','body':intUtil['getString'](_0x1d4589[_0x43e7('0x41')],_0x2ffd43,'\x0a')}},getCustomFields(_0x1d4589[_0x43e7('0x44')],_0x2ffd43));return request({'uri':util['format'](_0x43e7('0x45'),_0x16cdba['remoteUri'],_0x1ed538['id']),'method':_0x43e7('0x27'),'body':_0x2b0ffe});}exports['queue']=function(_0x3d81ae,_0x3b4235,_0x3a5807,_0x1c2c6b,_0x49b866,_0x47d6a1){var _0x103393,_0x40c509;_0x47d6a1[_0x43e7('0x14')]=intUtil[_0x43e7('0x46')](_0x47d6a1['remoteUri']);_0x47d6a1['serverUrl']=intUtil['stripTrailingSlash'](_0x47d6a1[_0x43e7('0x47')]);if(_0x49b866&&_0x49b866['monitor_format']){logger[_0x43e7('0xb')]('[QUEUE]','Recording\x20is\x20enabled!');_0x3b4235[_0x43e7('0x48')]=util['format'](_0x43e7('0x49'),_0x47d6a1[_0x43e7('0x47')],_0x3b4235[_0x43e7('0x4a')],md5(_0x3b4235[_0x43e7('0x4a')]));}else{_0x3b4235['recordingURL']='';}headers[_0x43e7('0x4b')]=getAuth(_0x47d6a1);return getUser(_0x47d6a1,_0x1c2c6b[_0x43e7('0x4c')])[_0x43e7('0xe')](function(_0x1fd277){_0x103393=_0x1fd277;logger[_0x43e7('0xb')](_0x43e7('0x4d'),_0x103393['id']);return getEndUser(_0x47d6a1,_0x3b4235['calleridname'],_0x3b4235['calleridnum']);})[_0x43e7('0xe')](function(_0x36a09e){_0x40c509=_0x36a09e;logger[_0x43e7('0xb')]('The\x20Enduser\x20ID\x20is:',_0x40c509['id']);return getTicket(_0x47d6a1,_0x103393,_0x40c509,_0x3a5807,_0x3b4235);})['then'](function(_0x56489b){if(_0x56489b){logger[_0x43e7('0xb')](_0x43e7('0x4e'));logger['info'](_0x43e7('0x4f'),_0x56489b['id']);switch(_0x47d6a1[_0x43e7('0x2d')]){case _0x43e7('0x50'):logger['info']('[QUEUE]','Displaying\x20ticket\x20to\x20agent...');emit(util['format'](_0x43e7('0x51'),_0x1c2c6b[_0x43e7('0x35')]),'trigger:desk:display',{'recordId':_0x56489b['id']});break;case _0x43e7('0x52'):logger[_0x43e7('0xb')](_0x43e7('0x53'),_0x43e7('0x54'));emit(util['format'](_0x43e7('0x51'),_0x1c2c6b['name']),'trigger:browser:url',{'uri':util[_0x43e7('0x16')](_0x43e7('0x55'),_0x56489b['id'])});break;default:logger[_0x43e7('0x56')](_0x43e7('0x53'),_0x43e7('0x57'));}}})[_0x43e7('0x58')](function(_0x1cd87c){console[_0x43e7('0x56')](_0x1cd87c);logger[_0x43e7('0x56')](_0x43e7('0x53'),JSON['stringify'](_0x1cd87c));});};exports[_0x43e7('0x59')]=function(_0x46c910,_0x499c03,_0x39e3ca,_0x4e6f6d,_0x35b799,_0x520857,_0x34e2ec){var _0x1f561f,_0xfe13fa;_0x520857['remoteUri']=intUtil['stripTrailingSlash'](_0x520857[_0x43e7('0x14')]);_0x520857[_0x43e7('0x47')]=intUtil[_0x43e7('0x46')](_0x520857[_0x43e7('0x47')]);if(_0x34e2ec&&_0x34e2ec[_0x43e7('0x5a')]&&_0x34e2ec[_0x43e7('0x5a')]!==_0x43e7('0x5b')){logger[_0x43e7('0xb')](_0x43e7('0x5c'),_0x43e7('0x5d'));_0x499c03[_0x43e7('0x48')]=util['format'](_0x43e7('0x49'),_0x520857[_0x43e7('0x47')],_0x499c03['uniqueid'],md5(_0x499c03[_0x43e7('0x4a')]));}headers[_0x43e7('0x4b')]=getAuth(_0x520857);return getUser(_0x520857,_0x4e6f6d[_0x43e7('0x4c')])['then'](function(_0x5d63c6){_0x1f561f=_0x5d63c6;logger[_0x43e7('0xb')](_0x43e7('0x4d'),_0x1f561f['id']);return getEndUser(_0x520857,_0x499c03['destcalleridname'],_0x499c03[_0x43e7('0x5e')]);})['then'](function(_0x49a6ce){_0xfe13fa=_0x49a6ce;logger[_0x43e7('0xb')](_0x43e7('0x5f'),_0xfe13fa['id']);return getTicket(_0x520857,_0x1f561f,_0xfe13fa,_0x39e3ca,_0x499c03);})[_0x43e7('0xe')](function(_0x40155c){if(_0x40155c){logger[_0x43e7('0xb')]('Ticket\x20created!');logger[_0x43e7('0xb')](_0x43e7('0x4f'),_0x40155c['id']);switch(_0x520857['type']){case _0x43e7('0x50'):logger[_0x43e7('0xb')](_0x43e7('0x53'),'Displaying\x20ticket\x20to\x20agent...');emit(util['format']('user:%s',_0x4e6f6d[_0x43e7('0x35')]),_0x43e7('0x60'),{'recordId':_0x40155c['id']});break;case _0x43e7('0x52'):logger[_0x43e7('0xb')]('[QUEUE]','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0x43e7('0x16')](_0x43e7('0x51'),_0x4e6f6d[_0x43e7('0x35')]),_0x43e7('0x61'),{'uri':util['format'](_0x43e7('0x62'),_0x520857[_0x43e7('0x14')],_0x40155c['id'])});break;default:logger[_0x43e7('0x56')](_0x43e7('0x5c'),_0x43e7('0x57'));}}})[_0x43e7('0x58')](function(_0x4665db){logger[_0x43e7('0x56')](_0x43e7('0x5c'),JSON[_0x43e7('0x63')](_0x4665db));});};exports[_0x43e7('0x64')]=function(_0x57fdfe,_0x5f3824,_0x2b0711,_0x58a3a8,_0x501616,_0x50edb2){var _0xb3e981,_0xe666b0;_0x50edb2['remoteUri']=intUtil[_0x43e7('0x46')](_0x50edb2[_0x43e7('0x14')]);_0x50edb2[_0x43e7('0x47')]=intUtil['stripTrailingSlash'](_0x50edb2[_0x43e7('0x47')]);if(_0x501616&&_0x501616[_0x43e7('0x65')]){logger[_0x43e7('0xb')]('['+_0x5f3824[_0x43e7('0x66')][_0x43e7('0x67')]()+']',_0x43e7('0x5d'));_0x5f3824[_0x43e7('0x48')]=util['format'](_0x43e7('0x49'),_0x50edb2[_0x43e7('0x47')],_0x5f3824[_0x43e7('0x4a')],md5(_0x5f3824['uniqueid']));}else{_0x5f3824['recordingURL']='';}headers[_0x43e7('0x4b')]=getAuth(_0x50edb2);return getUser(_0x50edb2)['then'](function(_0x5cb26e){_0xb3e981=_0x5cb26e;logger[_0x43e7('0xb')](_0x43e7('0x4d'),_0xb3e981['id']);return getEndUser(_0x50edb2,_0x5f3824['calleridname'],_0x5f3824[_0x43e7('0x68')]);})[_0x43e7('0xe')](function(_0x1e2fed){_0xe666b0=_0x1e2fed;logger[_0x43e7('0xb')](_0x43e7('0x5f'),_0xe666b0['id']);return getTicket(_0x50edb2,_0xb3e981,_0xe666b0,_0x2b0711,_0x5f3824);})[_0x43e7('0xe')](function(_0x398a78){if(_0x398a78){logger['info'](_0x43e7('0x4e'));logger[_0x43e7('0xb')]('The\x20Ticket\x20ID\x20is:',_0x398a78['id']);}})[_0x43e7('0x58')](function(_0x5c2c5f){logger[_0x43e7('0x56')]('['+_0x5f3824[_0x43e7('0x66')][_0x43e7('0x67')]()+']',JSON[_0x43e7('0x63')](_0x5c2c5f));});};
\ No newline at end of file
+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(_0x21058a,_0x43927f){var _0x3513e3=function(_0x66fc0){while(--_0x66fc0){_0x21058a['push'](_0x21058a['shift']());}};_0x3513e3(++_0x43927f);}(_0x55ca,0x126));var _0xa55c=function(_0xd3e16a,_0x28517e){_0xd3e16a=_0xd3e16a-0x0;var _0x449538=_0x55ca[_0xd3e16a];return _0x449538;};'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
index 85f531f..b78cfeb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9719=[']\x20Enduser\x20created!','forEach','includes','picklist','type','nameField','idField','substring','ticketType','incident','incidents','getString','/contacts(','/systemusers(','phonecall','callDirection','queue','phonecalls','assign','Fields','headers','ticketId','format','%s/main.aspx?pagetype=entityrecord&etn=%s&id=%s','user:%s','emit','stripTrailingSlash','data7','serverUrl','unmanaged','%s/api/data/v9.0/','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','[QUEUE]','recordingURL','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!',']\x20The\x20User\x20email\x20is:','moduleCreate','additionalSearchContact',']\x20The\x20Enduser\x20ID\x20is:',']\x20The\x20Enduser\x20phone\x20is:',']\x20The\x20%s\x20ID\x20is:\x20%s',']\x20Call\x20direction:\x20%s','openNewTab','error','Error\x20running\x20Dynamics365\x20integration','request-promise','util','md5','ioredis','../../../../config/logger','dynamics365','../../../../config/environment','redis','defaults','localhost','modernAuthentication','remoteUri','CloudProvider','tenantId','data2','resolve','data5','POST','username','password','clientSecret','then','access_token',']\x20Wrong\x20credentials!','message','GET','systemusers?$select=internalemailaddress,isdisabled,systemuserid','Bearer\x20','4.0','value','validateEmail','email','userEmail','length','isdisabled','info','toUpperCase',']\x20Agent\x20found\x20','systemuserid','internalemailaddress','catch','destcalleridnum','calleridnum','contacts','userId','body','lastIndexOf','enduserId','toLowerCase','outbound','telephone1','contacts?$select=','&$filter=','\x20eq\x20\x27','replace','nothing',']\x20Enduser\x20NOT\x20Created\x20-\x20ModuleCreate\x20=\x20Nothing'];(function(_0x629479,_0x16f852){var _0x238e1f=function(_0x5575a3){while(--_0x5575a3){_0x629479['push'](_0x629479['shift']());}};_0x238e1f(++_0x16f852);}(_0x9719,0x108));var _0x9971=function(_0x4a9fb1,_0x273043){_0x4a9fb1=_0x4a9fb1-0x0;var _0x348672=_0x9719[_0x4a9fb1];return _0x348672;};'use strict';var _=require('lodash');var rp=require(_0x9971('0x0'));var util=require(_0x9971('0x1'));var intUtil=require('./util');var md5=require(_0x9971('0x2'));var Redis=require(_0x9971('0x3'));var logger=require(_0x9971('0x4'))(_0x9971('0x5'));var config=require(_0x9971('0x6'));config[_0x9971('0x7')]=_[_0x9971('0x8')](config[_0x9971('0x7')],{'host':_0x9971('0x9'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x9971('0x7')]));function getAuthToken(_0x56dc2e,_0x2da07b,_0x40264a){if(_0x56dc2e[_0x9971('0xa')]){_0x56dc2e[_0x9971('0xb')]=_0x56dc2e[_0x9971('0xc')]['data7'];_0x56dc2e[_0x9971('0xd')]=_0x56dc2e['CloudProvider'][_0x9971('0xe')];return Promise[_0x9971('0xf')](_0x56dc2e[_0x9971('0xc')][_0x9971('0x10')]);}var _0x178910={'method':_0x9971('0x11'),'uri':_0x2da07b,'form':{'client_id':_0x56dc2e['clientId'],'resource':_0x56dc2e['remoteUri'],'username':_0x56dc2e[_0x9971('0x12')],'password':_0x56dc2e[_0x9971('0x13')],'grant_type':_0x9971('0x13'),'client_secret':_0x56dc2e[_0x9971('0x14')]},'json':!![]};return rp(_0x178910)[_0x9971('0x15')](function(_0xef2d32){return _0xef2d32[_0x9971('0x16')];})['catch'](function(_0x40c578){logger['error']('['+[_0x40264a['toUpperCase']()]+_0x9971('0x17'));return _0x40c578[_0x9971('0x18')];});}function getUser(_0x20733e,_0x555541,_0x375d49,_0x10d357,_0x3505f9,_0x499265){return new Promise(function(_0xefcbda,_0x13ca37){return getAuthToken(_0x555541,_0x10d357,_0x499265)[_0x9971('0x15')](function(_0x368100){var _0x436386={'method':_0x9971('0x19'),'uri':_0x3505f9+_0x9971('0x1a'),'headers':{'Authorization':_0x9971('0x1b')+_0x368100,'OData-Version':_0x9971('0x1c')},'json':!![]};return rp(_0x436386);})[_0x9971('0x15')](function(_0x54ff91){var _0x403955=_0x54ff91[_0x9971('0x1d')];var _0x1435b2=![];var _0x4862d4=null;if(!_['isNil'](_0x375d49)){if(intUtil[_0x9971('0x1e')](_0x375d49[_0x9971('0x1f')])){_0x20733e[_0x9971('0x20')]=_0x375d49[_0x9971('0x1f')];for(_0x4862d4=0x0;_0x4862d4<_0x403955[_0x9971('0x21')];_0x4862d4++){if(_0x403955[_0x4862d4]['internalemailaddress']===_0x375d49[_0x9971('0x1f')]&&!_0x403955[_0x4862d4][_0x9971('0x22')]){_0x1435b2=!![];logger[_0x9971('0x23')]('['+[_0x499265[_0x9971('0x24')]()]+_0x9971('0x25')+_0x403955[_0x4862d4]['systemuserid']+'!');_0x20733e['userId']=_0x403955[_0x4862d4][_0x9971('0x26')];}}}}if(!_0x1435b2){logger['info']('['+[_0x499265[_0x9971('0x24')]()]+']\x20Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');_0x20733e[_0x9971('0x20')]=_0x555541['username'];for(_0x4862d4=0x0;_0x4862d4<_0x403955['length'];_0x4862d4++){if(_0x403955[_0x4862d4][_0x9971('0x27')]===_0x555541[_0x9971('0x12')]){_0x20733e['userId']=_0x403955[_0x4862d4]['systemuserid'];}}}_0xefcbda(_0x20733e);})[_0x9971('0x28')](function(_0x36f799){_0x13ca37(_0x36f799[_0x9971('0x18')]);});});}function createEndUser(_0x5a78f8,_0x56f686,_0x122538,_0x511700,_0x3b0696,_0x3c3c1e,_0x52d6ee){return new Promise(function(_0xe3daad,_0x1a5b59){return getAuthToken(_0x56f686,_0x122538,_0x3c3c1e)[_0x9971('0x15')](function(_0x27a32e){var _0x4c524d=_0x3c3c1e['toLowerCase']()==='outbound'?_0x3b0696[_0x9971('0x29')]:_0x3b0696[_0x9971('0x2a')];var _0x1158dc={'method':_0x9971('0x11'),'uri':_0x511700+_0x9971('0x2b'),'body':{'fullname':_0x4c524d,'firstname':_0x4c524d,'lastname':'_','mobilephone':null,'address1_telephone1':null,'ownerid@odata.bind':'/systemusers('+_0x5a78f8[_0x9971('0x2c')]+')'},'headers':{'Authorization':_0x9971('0x1b')+_0x27a32e,'OData-Version':'4.0'},'json':!![],'resolveWithFullResponse':!![]};_0x1158dc[_0x9971('0x2d')][_0x52d6ee]=_0x4c524d;return rp(_0x1158dc);})['then'](function(_0x3c6ad2){var _0x1b4cd7=_0x3c6ad2['headers']['odata-entityid'];var _0x36f5c0=_0x1b4cd7['substring'](_0x1b4cd7['lastIndexOf']('(')+0x1,_0x1b4cd7[_0x9971('0x2e')](')'));_0x5a78f8[_0x9971('0x2f')]=_0x36f5c0;_0xe3daad(_0x5a78f8);})['catch'](function(_0x4c8f0b){_0x1a5b59(_0x4c8f0b[_0x9971('0x18')]);});});}function getEndUser(_0x20eb76,_0x519eaa,_0x92d4c6,_0x32bed1,_0x18e389,_0x1b7bdf,_0x1c47ca,_0x335569){var _0x4f162f=_0x1b7bdf[_0x9971('0x30')]()===_0x9971('0x31')?_0x18e389[_0x9971('0x29')]:_0x18e389[_0x9971('0x2a')];return getAuthToken(_0x519eaa,_0x92d4c6,_0x1b7bdf)[_0x9971('0x15')](function(_0x4c3d81){_0x335569=_0x335569?_0x335569:_0x9971('0x32');var _0x4eb71a={'method':_0x9971('0x19'),'uri':_0x32bed1+_0x9971('0x33')+_0x335569+_0x9971('0x34')+_0x335569+_0x9971('0x35')+_0x4f162f[_0x9971('0x36')]('+','%2b')+'\x27','headers':{'Authorization':_0x9971('0x1b')+_0x4c3d81,'If-None-Match':null,'OData-Version':'4.0'},'json':!![]};return rp(_0x4eb71a);})[_0x9971('0x15')](function(_0x32d599){var _0x1db81c=![];if(!_0x32d599)return _0x1db81c;var _0x54aa3a=_0x32d599['value'];for(var _0x4bdf80=0x0;_0x4bdf80<_0x54aa3a[_0x9971('0x21')];_0x4bdf80++){if(_0x54aa3a[_0x4bdf80][_0x335569]===_0x4f162f){_0x1db81c=!![];_0x20eb76[_0x9971('0x2f')]=_0x54aa3a[_0x4bdf80]['contactid'];}}return _0x1db81c;})['then'](function(_0x376655){if(_0x376655)return _0x20eb76;if(_0x1c47ca===_0x9971('0x37')){logger[_0x9971('0x23')]('['+[_0x1b7bdf[_0x9971('0x24')]()]+_0x9971('0x38'));return _0x20eb76;}return createEndUser(_0x20eb76,_0x519eaa,_0x92d4c6,_0x32bed1,_0x18e389,_0x1b7bdf,_0x335569)['then'](function(_0x584665){logger[_0x9971('0x23')]('['+[_0x1b7bdf['toUpperCase']()]+_0x9971('0x39'),_0x584665[_0x9971('0x2f')]);return _0x584665;});});}function getCustomFields(_0x2747f2,_0x55a66c,_0x83ebf9){var _0x28a341={};if(_0x2747f2[_0x9971('0x21')]>0x0){_[_0x9971('0x3a')](_0x2747f2,function(_0x2dd2af){if(_[_0x9971('0x3b')](['string',_0x9971('0x3c')],_0x2dd2af[_0x9971('0x3d')])&&_0x2dd2af[_0x9971('0x3e')]&&!_0x2dd2af['customField']){var _0x1a0205=_0x2dd2af[_0x9971('0x3f')][_0x9971('0x30')]();var _0x826388=_0x1a0205[_0x9971('0x40')](0x0,_0x1a0205['indexOf']('_'));var _0x30eeb8=_0x1a0205[_0x9971('0x40')](_0x1a0205['indexOf']('_')+0x1);if(_0x826388===_0x83ebf9){_0x28a341[_0x30eeb8]=_0x2dd2af['content'];}}});}return _0x28a341;}function getTicket(_0x1633ce,_0x3360e2,_0xa80ba5,_0x149934,_0x4a42fd,_0x5a528b,_0x3cf1de){return new Promise(function(_0x145ac0,_0x32b248){var _0x4460fe;return getAuthToken(_0x3360e2,_0xa80ba5,_0x3cf1de)[_0x9971('0x15')](function(_0xf3aa4b){if(_0x5a528b[_0x9971('0x41')]===_0x9971('0x42')){_0x4460fe={'method':_0x9971('0x11'),'uri':_0x149934+_0x9971('0x43'),'body':Object['assign']({},{'title':intUtil['getString'](_0x5a528b['Subjects'],_0x4a42fd,'\x20'),'description':intUtil[_0x9971('0x44')](_0x5a528b['Descriptions'],_0x4a42fd,'\x0a'),'customerid_contact@odata.bind':_0x1633ce[_0x9971('0x2f')]?_0x9971('0x45')+_0x1633ce[_0x9971('0x2f')]+')':undefined,'ownerid@odata.bind':_0x9971('0x46')+_0x1633ce[_0x9971('0x2c')]+')','caseorigincode':'1'},getCustomFields(_0x5a528b['Fields'],_0x4a42fd,_0x5a528b['ticketType'])),'headers':{'Authorization':_0x9971('0x1b')+_0xf3aa4b,'OData-Version':'4.0'},'json':!![],'resolveWithFullResponse':!![]};}if(_0x5a528b['ticketType']===_0x9971('0x47')){var _0x8647dc=_0x1633ce['enduserId']?[{'partyid_systemuser@odata.bind':_0x9971('0x46')+_0x1633ce[_0x9971('0x2c')]+')','participationtypemask':_0x1633ce[_0x9971('0x48')]===_0x9971('0x49')?0x2:0x1},{'partyid_contact@odata.bind':_0x9971('0x45')+_0x1633ce[_0x9971('0x2f')]+')','participationtypemask':_0x1633ce['callDirection']===_0x9971('0x49')?0x1:0x2}]:[{'partyid_systemuser@odata.bind':'/systemusers('+_0x1633ce[_0x9971('0x2c')]+')','participationtypemask':_0x1633ce[_0x9971('0x48')]==='queue'?0x2:0x1}];_0x4460fe={'method':'POST','uri':_0x149934+_0x9971('0x4a'),'body':Object[_0x9971('0x4b')]({},{'subject':intUtil[_0x9971('0x44')](_0x5a528b['Subjects'],_0x4a42fd,'\x20'),'phonenumber':String(_0x4a42fd[_0x9971('0x2a')]),'description':intUtil['getString'](_0x5a528b['Descriptions'],_0x4a42fd,'\x0a'),'regardingobjectid_contact@odata.bind':_0x1633ce['enduserId']?_0x9971('0x45')+_0x1633ce[_0x9971('0x2f')]+')':undefined,'ownerid@odata.bind':'/systemusers('+_0x1633ce[_0x9971('0x2c')]+')','directioncode':_0x1633ce[_0x9971('0x48')]===_0x9971('0x49')?![]:!![],'phonecall_activity_parties':_0x8647dc},getCustomFields(_0x5a528b[_0x9971('0x4c')],_0x4a42fd,_0x5a528b['ticketType'])),'headers':{'Authorization':_0x9971('0x1b')+_0xf3aa4b,'OData-Version':'4.0'},'json':!![],'resolveWithFullResponse':!![]};}return rp(_0x4460fe);})[_0x9971('0x15')](function(_0x20519b){var _0x2b7701=_0x20519b[_0x9971('0x4d')]['odata-entityid'];var _0x44d1d7=_0x2b7701['substring'](_0x2b7701[_0x9971('0x2e')]('(')+0x1,_0x2b7701['lastIndexOf'](')'));_0x1633ce[_0x9971('0x4e')]=_0x44d1d7;_0x145ac0(_0x1633ce);})[_0x9971('0x28')](function(_0x453855){_0x32b248(_0x453855[_0x9971('0x18')]);});});}function emit(_0x36968f,_0xeb0d6a,_0x1c30c4,_0x3fafb4){var _0x3aee88={'uri':util[_0x9971('0x4f')](_0x9971('0x50'),_0x36968f,_0x1c30c4,_0x3fafb4)};io['to'](util[_0x9971('0x4f')](_0x9971('0x51'),_0xeb0d6a))[_0x9971('0x52')]('trigger:browser:url',_0x3aee88);}exports['cs']=function(_0x28afc3,_0x38b92d,_0x5adf25,_0x1462ba,_0x4ba8a0,_0xeab64c,_0x50bc2d,_0x2a4188){var _0x2de410={};_0xeab64c[_0x9971('0xb')]=_0xeab64c['modernAuthentication']?intUtil[_0x9971('0x53')](_0xeab64c[_0x9971('0xc')][_0x9971('0x54')]):intUtil[_0x9971('0x53')](_0xeab64c[_0x9971('0xb')]);_0xeab64c[_0x9971('0x55')]=intUtil[_0x9971('0x53')](_0xeab64c[_0x9971('0x55')]);_0x2de410[_0x9971('0x48')]=_0x2a4188===_0x9971('0x49')||_0x2a4188===_0x9971('0x56')?'queue':_0x9971('0x31');var _0x40ba1e=_0xeab64c[_0x9971('0xa')]?util['format'](_0x9971('0x57'),_0xeab64c[_0x9971('0xc')][_0x9971('0x54')]):util[_0x9971('0x4f')]('%s/api/data/v9.0/',_0xeab64c['remoteUri']);var _0x5db72b=util['format']('https://login.microsoftonline.com/%s/oauth2/token',_0xeab64c[_0x9971('0xd')]);var _0x219ea2=util[_0x9971('0x4f')](_0x9971('0x58'),_0xeab64c[_0x9971('0x55')],_0x38b92d[_0x9971('0x59')],md5(_0x38b92d['uniqueid']));if(_0x4ba8a0&&_0x4ba8a0[_0x9971('0x5a')]){logger['info'](_0x9971('0x5b'),'Recording\x20is\x20enabled!');_0x38b92d[_0x9971('0x5c')]=_0x219ea2;}else if(_0x50bc2d&&_0x50bc2d[_0x9971('0x5d')]&&_0x50bc2d[_0x9971('0x5d')]!==_0x9971('0x5e')){logger[_0x9971('0x23')](_0x9971('0x5f'),_0x9971('0x60'));_0x38b92d[_0x9971('0x5c')]=_0x219ea2;}else{_0x38b92d[_0x9971('0x5c')]='';}return getUser(_0x2de410,_0xeab64c,_0x1462ba,_0x5db72b,_0x40ba1e,_0x2a4188)['then'](function(_0x4e018c){logger[_0x9971('0x23')]('['+_0x2a4188['toUpperCase']()+']\x20The\x20User\x20ID\x20is:',_0x4e018c['userId']);logger['info']('['+_0x2a4188['toUpperCase']()+_0x9971('0x61'),_0x4e018c['userEmail']);return getEndUser(_0x4e018c,_0xeab64c,_0x5db72b,_0x40ba1e,_0x38b92d,_0x2a4188,_0x5adf25[_0x9971('0x62')],_0x5adf25[_0x9971('0x63')]);})[_0x9971('0x15')](function(_0x200b5d){logger[_0x9971('0x23')]('['+_0x2a4188[_0x9971('0x24')]()+_0x9971('0x64'),_0x200b5d[_0x9971('0x2f')]);logger[_0x9971('0x23')]('['+_0x2a4188[_0x9971('0x24')]()+_0x9971('0x65'),_0x38b92d[_0x9971('0x2a')]);return getTicket(_0x200b5d,_0xeab64c,_0x5db72b,_0x40ba1e,_0x38b92d,_0x5adf25,_0x2a4188);})[_0x9971('0x15')](function(_0xee52af){logger['info'](util['format']('['+_0x2a4188[_0x9971('0x24')]()+_0x9971('0x66'),_0x5adf25['ticketType'],_0xee52af[_0x9971('0x4e')]));logger[_0x9971('0x23')](util[_0x9971('0x4f')]('['+_0x2a4188[_0x9971('0x24')]()+_0x9971('0x67'),_0x2a4188));if(_0x2a4188!=='unmanaged'&&_0x5adf25[_0x9971('0x68')]){logger[_0x9971('0x23')]('['+_0x2a4188[_0x9971('0x24')]()+']','Displaying\x20call\x20in\x20a\x20new\x20tab...');emit(_0xeab64c[_0x9971('0xb')],_0x1462ba['name'],_0x5adf25[_0x9971('0x41')],_0xee52af[_0x9971('0x4e')]);}})[_0x9971('0x28')](function(_0x1a098e){logger[_0x9971('0x69')]('['+_0x2a4188[_0x9971('0x24')]()+']\x20Error\x20running\x20Dynamics365\x20integration',_0x1a098e[_0x9971('0x18')]);console['error'](_0x9971('0x6a'),_0x1a098e);});};
\ No newline at end of file
+var _0x5f3e=['data2','resolve','POST','password','clientSecret','then','access_token','catch','toUpperCase',']\x20Wrong\x20credentials!','message','GET','systemusers?$select=internalemailaddress,isdisabled,systemuserid','Bearer\x20','value','isNil','validateEmail','email','userEmail','length','internalemailaddress','isdisabled','info','systemuserid',']\x20Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','username','userId','toLowerCase','outbound','calleridnum','contacts','/systemusers(','4.0','headers','substring','lastIndexOf','enduserId','destcalleridnum','telephone1','contacts?$select=','&$filter=','\x20eq\x20\x27','%2b','nothing',']\x20Enduser\x20NOT\x20Created\x20-\x20ModuleCreate\x20=\x20Nothing',']\x20Enduser\x20created!','forEach','includes','string','picklist','type','nameField','customField','idField','indexOf','content','incidents','getString','Subjects','Descriptions','/contacts(','ticketType','phonecall','callDirection','queue','phonecalls','assign','Fields','ticketId','format','user:%s','emit','trigger:browser:url','stripTrailingSlash','serverUrl','unmanaged','%s/api/data/v9.0/','https://login.microsoftonline.com/%s/oauth2/token','tenantId','uniqueid','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\x20Enduser\x20phone\x20is:',']\x20The\x20%s\x20ID\x20is:\x20%s',']\x20Call\x20direction:\x20%s','openNewTab','Displaying\x20call\x20in\x20a\x20new\x20tab...','name','error',']\x20Error\x20running\x20Dynamics365\x20integration','lodash','request-promise','./util','dynamics365','../../../../config/environment','redis','localhost','modernAuthentication','remoteUri','data7','CloudProvider'];(function(_0x3a25e8,_0x84dc5c){var _0x55b8f3=function(_0x4e8119){while(--_0x4e8119){_0x3a25e8['push'](_0x3a25e8['shift']());}};_0x55b8f3(++_0x84dc5c);}(_0x5f3e,0x64));var _0xe5f3=function(_0x36f47c,_0x38ef4d){_0x36f47c=_0x36f47c-0x0;var _0x296c55=_0x5f3e[_0x36f47c];return _0x296c55;};'use strict';var _=require(_0xe5f3('0x0'));var rp=require(_0xe5f3('0x1'));var util=require('util');var intUtil=require(_0xe5f3('0x2'));var md5=require('md5');var Redis=require('ioredis');var logger=require('../../../../config/logger')(_0xe5f3('0x3'));var config=require(_0xe5f3('0x4'));config[_0xe5f3('0x5')]=_['defaults'](config['redis'],{'host':_0xe5f3('0x6'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xe5f3('0x5')]));function getAuthToken(_0x10e25a,_0x1c538d,_0x6a5844){if(_0x10e25a[_0xe5f3('0x7')]){_0x10e25a[_0xe5f3('0x8')]=_0x10e25a['CloudProvider'][_0xe5f3('0x9')];_0x10e25a['tenantId']=_0x10e25a[_0xe5f3('0xa')][_0xe5f3('0xb')];return Promise[_0xe5f3('0xc')](_0x10e25a['CloudProvider']['data5']);}var _0x2bfa90={'method':_0xe5f3('0xd'),'uri':_0x1c538d,'form':{'client_id':_0x10e25a['clientId'],'resource':_0x10e25a[_0xe5f3('0x8')],'username':_0x10e25a['username'],'password':_0x10e25a[_0xe5f3('0xe')],'grant_type':_0xe5f3('0xe'),'client_secret':_0x10e25a[_0xe5f3('0xf')]},'json':!![]};return rp(_0x2bfa90)[_0xe5f3('0x10')](function(_0x2c30b2){return _0x2c30b2[_0xe5f3('0x11')];})[_0xe5f3('0x12')](function(_0x1929c3){logger['error']('['+[_0x6a5844[_0xe5f3('0x13')]()]+_0xe5f3('0x14'));return _0x1929c3[_0xe5f3('0x15')];});}function getUser(_0x454cb6,_0x21fa61,_0x2ea2f6,_0x5c67e5,_0x26be38,_0x4e39a2){return new Promise(function(_0x51e6b8,_0x376d76){return getAuthToken(_0x21fa61,_0x5c67e5,_0x4e39a2)[_0xe5f3('0x10')](function(_0x549c73){var _0x50a683={'method':_0xe5f3('0x16'),'uri':_0x26be38+_0xe5f3('0x17'),'headers':{'Authorization':_0xe5f3('0x18')+_0x549c73,'OData-Version':'4.0'},'json':!![]};return rp(_0x50a683);})['then'](function(_0x43cdc5){var _0x40dd74=_0x43cdc5[_0xe5f3('0x19')];var _0x53b1d4=![];var _0x4e91b4=null;if(!_[_0xe5f3('0x1a')](_0x2ea2f6)){if(intUtil[_0xe5f3('0x1b')](_0x2ea2f6[_0xe5f3('0x1c')])){_0x454cb6[_0xe5f3('0x1d')]=_0x2ea2f6['email'];for(_0x4e91b4=0x0;_0x4e91b4<_0x40dd74[_0xe5f3('0x1e')];_0x4e91b4++){if(_0x40dd74[_0x4e91b4][_0xe5f3('0x1f')]===_0x2ea2f6['email']&&!_0x40dd74[_0x4e91b4][_0xe5f3('0x20')]){_0x53b1d4=!![];logger[_0xe5f3('0x21')]('['+[_0x4e39a2['toUpperCase']()]+']\x20Agent\x20found\x20'+_0x40dd74[_0x4e91b4][_0xe5f3('0x22')]+'!');_0x454cb6['userId']=_0x40dd74[_0x4e91b4][_0xe5f3('0x22')];}}}}if(!_0x53b1d4){logger[_0xe5f3('0x21')]('['+[_0x4e39a2[_0xe5f3('0x13')]()]+_0xe5f3('0x23'));_0x454cb6[_0xe5f3('0x1d')]=_0x21fa61['username'];for(_0x4e91b4=0x0;_0x4e91b4<_0x40dd74[_0xe5f3('0x1e')];_0x4e91b4++){if(_0x40dd74[_0x4e91b4]['internalemailaddress']===_0x21fa61[_0xe5f3('0x24')]){_0x454cb6[_0xe5f3('0x25')]=_0x40dd74[_0x4e91b4][_0xe5f3('0x22')];}}}_0x51e6b8(_0x454cb6);})['catch'](function(_0x1b910e){_0x376d76(_0x1b910e[_0xe5f3('0x15')]);});});}function createEndUser(_0x363c2f,_0x2e33ac,_0x4e8f5a,_0x4f9a8f,_0x5c3c1f,_0x5ece4e,_0x389ce8){return new Promise(function(_0x1a7c08,_0x4906a5){return getAuthToken(_0x2e33ac,_0x4e8f5a,_0x5ece4e)[_0xe5f3('0x10')](function(_0x2fc5c2){var _0x3647a9=_0x5ece4e[_0xe5f3('0x26')]()===_0xe5f3('0x27')?_0x5c3c1f['destcalleridnum']:_0x5c3c1f[_0xe5f3('0x28')];var _0x3b6917={'method':_0xe5f3('0xd'),'uri':_0x4f9a8f+_0xe5f3('0x29'),'body':{'fullname':_0x3647a9,'firstname':_0x3647a9,'lastname':'_','mobilephone':null,'address1_telephone1':null,'ownerid@odata.bind':_0xe5f3('0x2a')+_0x363c2f[_0xe5f3('0x25')]+')'},'headers':{'Authorization':_0xe5f3('0x18')+_0x2fc5c2,'OData-Version':_0xe5f3('0x2b')},'json':!![],'resolveWithFullResponse':!![]};_0x3b6917['body'][_0x389ce8]=_0x3647a9;return rp(_0x3b6917);})['then'](function(_0x2c66da){var _0x1f257c=_0x2c66da[_0xe5f3('0x2c')]['odata-entityid'];var _0x153702=_0x1f257c[_0xe5f3('0x2d')](_0x1f257c['lastIndexOf']('(')+0x1,_0x1f257c[_0xe5f3('0x2e')](')'));_0x363c2f[_0xe5f3('0x2f')]=_0x153702;_0x1a7c08(_0x363c2f);})['catch'](function(_0x565ead){_0x4906a5(_0x565ead['message']);});});}function getEndUser(_0x2e9df2,_0x4c5ff2,_0x1f4472,_0x3e0311,_0x13d66c,_0x494d4d,_0x34542d,_0x547e2b){var _0x4ca330=_0x494d4d[_0xe5f3('0x26')]()===_0xe5f3('0x27')?_0x13d66c[_0xe5f3('0x30')]:_0x13d66c[_0xe5f3('0x28')];return getAuthToken(_0x4c5ff2,_0x1f4472,_0x494d4d)['then'](function(_0x18f621){_0x547e2b=_0x547e2b?_0x547e2b:_0xe5f3('0x31');var _0x1bad48={'method':_0xe5f3('0x16'),'uri':_0x3e0311+_0xe5f3('0x32')+_0x547e2b+_0xe5f3('0x33')+_0x547e2b+_0xe5f3('0x34')+_0x4ca330['replace']('+',_0xe5f3('0x35'))+'\x27','headers':{'Authorization':_0xe5f3('0x18')+_0x18f621,'If-None-Match':null,'OData-Version':_0xe5f3('0x2b')},'json':!![]};return rp(_0x1bad48);})[_0xe5f3('0x10')](function(_0x402a77){var _0x2ba7be=![];if(!_0x402a77)return _0x2ba7be;var _0x33ed6b=_0x402a77[_0xe5f3('0x19')];for(var _0x4d451a=0x0;_0x4d451a<_0x33ed6b['length'];_0x4d451a++){if(_0x33ed6b[_0x4d451a][_0x547e2b]===_0x4ca330){_0x2ba7be=!![];_0x2e9df2[_0xe5f3('0x2f')]=_0x33ed6b[_0x4d451a]['contactid'];}}return _0x2ba7be;})['then'](function(_0x84419f){if(_0x84419f)return _0x2e9df2;if(_0x34542d===_0xe5f3('0x36')){logger[_0xe5f3('0x21')]('['+[_0x494d4d[_0xe5f3('0x13')]()]+_0xe5f3('0x37'));return _0x2e9df2;}return createEndUser(_0x2e9df2,_0x4c5ff2,_0x1f4472,_0x3e0311,_0x13d66c,_0x494d4d,_0x547e2b)['then'](function(_0x944740){logger[_0xe5f3('0x21')]('['+[_0x494d4d[_0xe5f3('0x13')]()]+_0xe5f3('0x38'),_0x944740[_0xe5f3('0x2f')]);return _0x944740;});});}function getCustomFields(_0x56c409,_0x5beb4b,_0x44b896){var _0x2cafa4={};if(_0x56c409['length']>0x0){_[_0xe5f3('0x39')](_0x56c409,function(_0x51b7cd){if(_[_0xe5f3('0x3a')]([_0xe5f3('0x3b'),_0xe5f3('0x3c')],_0x51b7cd[_0xe5f3('0x3d')])&&_0x51b7cd[_0xe5f3('0x3e')]&&!_0x51b7cd[_0xe5f3('0x3f')]){var _0x24af7f=_0x51b7cd[_0xe5f3('0x40')][_0xe5f3('0x26')]();var _0x3c5606=_0x24af7f['substring'](0x0,_0x24af7f['indexOf']('_'));var _0x1b5957=_0x24af7f[_0xe5f3('0x2d')](_0x24af7f[_0xe5f3('0x41')]('_')+0x1);if(_0x3c5606===_0x44b896){_0x2cafa4[_0x1b5957]=_0x51b7cd[_0xe5f3('0x42')];}}});}return _0x2cafa4;}function getTicket(_0xd219e7,_0x34ed94,_0x27714d,_0x127f1c,_0x3025f7,_0x3770fd,_0x3ecdf9){return new Promise(function(_0x5ebe3f,_0x3e07be){var _0x185401;return getAuthToken(_0x34ed94,_0x27714d,_0x3ecdf9)[_0xe5f3('0x10')](function(_0x1bcfdf){if(_0x3770fd['ticketType']==='incident'){_0x185401={'method':_0xe5f3('0xd'),'uri':_0x127f1c+_0xe5f3('0x43'),'body':Object['assign']({},{'title':intUtil[_0xe5f3('0x44')](_0x3770fd[_0xe5f3('0x45')],_0x3025f7,'\x20'),'description':intUtil[_0xe5f3('0x44')](_0x3770fd[_0xe5f3('0x46')],_0x3025f7,'\x0a'),'customerid_contact@odata.bind':_0xd219e7['enduserId']?_0xe5f3('0x47')+_0xd219e7[_0xe5f3('0x2f')]+')':undefined,'ownerid@odata.bind':_0xe5f3('0x2a')+_0xd219e7[_0xe5f3('0x25')]+')','caseorigincode':'1'},getCustomFields(_0x3770fd['Fields'],_0x3025f7,_0x3770fd['ticketType'])),'headers':{'Authorization':_0xe5f3('0x18')+_0x1bcfdf,'OData-Version':_0xe5f3('0x2b')},'json':!![],'resolveWithFullResponse':!![]};}if(_0x3770fd[_0xe5f3('0x48')]===_0xe5f3('0x49')){var _0x379de2=_0xd219e7[_0xe5f3('0x2f')]?[{'partyid_systemuser@odata.bind':_0xe5f3('0x2a')+_0xd219e7['userId']+')','participationtypemask':_0xd219e7[_0xe5f3('0x4a')]===_0xe5f3('0x4b')?0x2:0x1},{'partyid_contact@odata.bind':_0xe5f3('0x47')+_0xd219e7[_0xe5f3('0x2f')]+')','participationtypemask':_0xd219e7[_0xe5f3('0x4a')]===_0xe5f3('0x4b')?0x1:0x2}]:[{'partyid_systemuser@odata.bind':_0xe5f3('0x2a')+_0xd219e7['userId']+')','participationtypemask':_0xd219e7[_0xe5f3('0x4a')]==='queue'?0x2:0x1}];_0x185401={'method':_0xe5f3('0xd'),'uri':_0x127f1c+_0xe5f3('0x4c'),'body':Object[_0xe5f3('0x4d')]({},{'subject':intUtil[_0xe5f3('0x44')](_0x3770fd['Subjects'],_0x3025f7,'\x20'),'phonenumber':String(_0x3025f7[_0xe5f3('0x28')]),'description':intUtil['getString'](_0x3770fd[_0xe5f3('0x46')],_0x3025f7,'\x0a'),'regardingobjectid_contact@odata.bind':_0xd219e7[_0xe5f3('0x2f')]?_0xe5f3('0x47')+_0xd219e7['enduserId']+')':undefined,'ownerid@odata.bind':'/systemusers('+_0xd219e7[_0xe5f3('0x25')]+')','directioncode':_0xd219e7[_0xe5f3('0x4a')]===_0xe5f3('0x4b')?![]:!![],'phonecall_activity_parties':_0x379de2},getCustomFields(_0x3770fd[_0xe5f3('0x4e')],_0x3025f7,_0x3770fd[_0xe5f3('0x48')])),'headers':{'Authorization':_0xe5f3('0x18')+_0x1bcfdf,'OData-Version':_0xe5f3('0x2b')},'json':!![],'resolveWithFullResponse':!![]};}return rp(_0x185401);})[_0xe5f3('0x10')](function(_0x2fd9dc){var _0x5313c2=_0x2fd9dc[_0xe5f3('0x2c')]['odata-entityid'];var _0x513941=_0x5313c2[_0xe5f3('0x2d')](_0x5313c2['lastIndexOf']('(')+0x1,_0x5313c2['lastIndexOf'](')'));_0xd219e7[_0xe5f3('0x4f')]=_0x513941;_0x5ebe3f(_0xd219e7);})['catch'](function(_0x51ee99){_0x3e07be(_0x51ee99[_0xe5f3('0x15')]);});});}function emit(_0x4e297a,_0x387937,_0xe420e4,_0x9532ad){var _0x504a51={'uri':util[_0xe5f3('0x50')]('%s/main.aspx?pagetype=entityrecord&etn=%s&id=%s',_0x4e297a,_0xe420e4,_0x9532ad)};io['to'](util[_0xe5f3('0x50')](_0xe5f3('0x51'),_0x387937))[_0xe5f3('0x52')](_0xe5f3('0x53'),_0x504a51);}exports['cs']=function(_0x8e0bab,_0x18b399,_0x23b839,_0x3b1046,_0x354f04,_0x3773a8,_0x38ca2c,_0x4d786a){var _0x215b93={};_0x3773a8[_0xe5f3('0x8')]=_0x3773a8['modernAuthentication']?intUtil[_0xe5f3('0x54')](_0x3773a8[_0xe5f3('0xa')][_0xe5f3('0x9')]):intUtil[_0xe5f3('0x54')](_0x3773a8[_0xe5f3('0x8')]);_0x3773a8[_0xe5f3('0x55')]=intUtil[_0xe5f3('0x54')](_0x3773a8['serverUrl']);_0x215b93[_0xe5f3('0x4a')]=_0x4d786a===_0xe5f3('0x4b')||_0x4d786a===_0xe5f3('0x56')?_0xe5f3('0x4b'):'outbound';var _0x138e95=_0x3773a8[_0xe5f3('0x7')]?util[_0xe5f3('0x50')](_0xe5f3('0x57'),_0x3773a8[_0xe5f3('0xa')][_0xe5f3('0x9')]):util[_0xe5f3('0x50')]('%s/api/data/v9.0/',_0x3773a8[_0xe5f3('0x8')]);var _0x17af05=util['format'](_0xe5f3('0x58'),_0x3773a8[_0xe5f3('0x59')]);var _0x114e35=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x3773a8[_0xe5f3('0x55')],_0x18b399[_0xe5f3('0x5a')],md5(_0x18b399[_0xe5f3('0x5a')]));if(_0x354f04&&_0x354f04[_0xe5f3('0x5b')]){logger[_0xe5f3('0x21')](_0xe5f3('0x5c'),_0xe5f3('0x5d'));_0x18b399[_0xe5f3('0x5e')]=_0x114e35;}else if(_0x38ca2c&&_0x38ca2c[_0xe5f3('0x5f')]&&_0x38ca2c[_0xe5f3('0x5f')]!==_0xe5f3('0x60')){logger[_0xe5f3('0x21')](_0xe5f3('0x61'),'Recording\x20is\x20enabled!');_0x18b399['recordingURL']=_0x114e35;}else{_0x18b399[_0xe5f3('0x5e')]='';}return getUser(_0x215b93,_0x3773a8,_0x3b1046,_0x17af05,_0x138e95,_0x4d786a)[_0xe5f3('0x10')](function(_0xc4a9b1){logger['info']('['+_0x4d786a[_0xe5f3('0x13')]()+_0xe5f3('0x62'),_0xc4a9b1[_0xe5f3('0x25')]);logger['info']('['+_0x4d786a[_0xe5f3('0x13')]()+_0xe5f3('0x63'),_0xc4a9b1[_0xe5f3('0x1d')]);return getEndUser(_0xc4a9b1,_0x3773a8,_0x17af05,_0x138e95,_0x18b399,_0x4d786a,_0x23b839[_0xe5f3('0x64')],_0x23b839[_0xe5f3('0x65')]);})['then'](function(_0x24ac53){logger[_0xe5f3('0x21')]('['+_0x4d786a[_0xe5f3('0x13')]()+_0xe5f3('0x66'),_0x24ac53[_0xe5f3('0x2f')]);logger[_0xe5f3('0x21')]('['+_0x4d786a[_0xe5f3('0x13')]()+_0xe5f3('0x67'),_0x18b399[_0xe5f3('0x28')]);return getTicket(_0x24ac53,_0x3773a8,_0x17af05,_0x138e95,_0x18b399,_0x23b839,_0x4d786a);})[_0xe5f3('0x10')](function(_0x444f08){logger[_0xe5f3('0x21')](util[_0xe5f3('0x50')]('['+_0x4d786a[_0xe5f3('0x13')]()+_0xe5f3('0x68'),_0x23b839[_0xe5f3('0x48')],_0x444f08[_0xe5f3('0x4f')]));logger[_0xe5f3('0x21')](util[_0xe5f3('0x50')]('['+_0x4d786a[_0xe5f3('0x13')]()+_0xe5f3('0x69'),_0x4d786a));if(_0x4d786a!==_0xe5f3('0x56')&&_0x23b839[_0xe5f3('0x6a')]){logger['info']('['+_0x4d786a[_0xe5f3('0x13')]()+']',_0xe5f3('0x6b'));emit(_0x3773a8['remoteUri'],_0x3b1046[_0xe5f3('0x6c')],_0x23b839[_0xe5f3('0x48')],_0x444f08['ticketId']);}})[_0xe5f3('0x12')](function(_0xc72d81){logger[_0xe5f3('0x6d')]('['+_0x4d786a[_0xe5f3('0x13')]()+_0xe5f3('0x6e'),_0xc72d81[_0xe5f3('0x15')]);console['error']('Error\x20running\x20Dynamics365\x20integration',_0xc72d81);});};
\ No newline at end of file
index 4757548..2926b5d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x888a=['[OUTBOUND]','Recording\x20is\x20enabled!','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','destcalleridnum','unmanaged','lastevent','toUpperCase','lodash','request-promise','md5','util','ioredis','freshdesk','redis','localhost','application/json','emit','Creating\x20new\x20ticket...','format','calleridname','calleridnum','getString','Subjects','Descriptions','<br>','Tags','name','Fields','mapValues','keyBy','custom_fields','value','remoteUri','POST','Ticket\x20created!','%s/api/v2/agents','length','info','Agent\x20found!','find','contact','email','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/api/v2/agents/me','then','Admin\x20account\x20selected.','Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!','Searching\x20enduser\x20with\x20phone','%s/api/v2/contacts','Enduser\x20created.','base64','debug','[HTTP]','stringify','GET','forEach','string','picklist','nameField','customField','toLowerCase','content','type','idField','push','toString','variable','customVariable','Variable','queue','serverUrl','stripTrailingSlash','monitor_format','[QUEUE]','uniqueid','recordingURL','Authorization','The\x20User\x20ID\x20is:','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','%s/helpdesk/tickets/%d','catch','error','recordingFormat','none'];(function(_0x1beef3,_0x57c4b8){var _0x5af964=function(_0x36f463){while(--_0x36f463){_0x1beef3['push'](_0x1beef3['shift']());}};_0x5af964(++_0x57c4b8);}(_0x888a,0xb5));var _0xa888=function(_0x19d772,_0x416536){_0x19d772=_0x19d772-0x0;var _0x1b7788=_0x888a[_0x19d772];return _0x1b7788;};'use strict';var _=require(_0xa888('0x0'));var rp=require(_0xa888('0x1'));var md5=require(_0xa888('0x2'));var util=require(_0xa888('0x3'));var Redis=require(_0xa888('0x4'));var intUtil=require('./util');var config=require('../../../../config/environment');var logger=require('../../../../config/logger')(_0xa888('0x5'));config[_0xa888('0x6')]=_['defaults'](config['redis'],{'host':_0xa888('0x7'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xa888('0x6')]));var headers={'Content-Type':_0xa888('0x8'),'Accept':_0xa888('0x8')};function emit(_0x15e2b8,_0x15b53b,_0x51c33c){io['to'](_0x15e2b8)[_0xa888('0x9')](_0x15b53b,_0x51c33c);}function getTicket(_0x42f469,_0x12becf,_0x2980c5,_0x3556f0,_0x1c5bd5){logger['info'](_0xa888('0xa'));var _0xe30d3e=_['merge']({'responder_id':_0x12becf['id'],'requester_id':_0x2980c5['id'],'name':util[_0xa888('0xb')]('Caller\x20-\x20%s',_0x1c5bd5[_0xa888('0xc')]),'phone':_0x1c5bd5[_0xa888('0xd')],'source':0x3,'priority':0x1,'status':0x2,'subject':intUtil[_0xa888('0xe')](_0x3556f0[_0xa888('0xf')],_0x1c5bd5,'\x20'),'description':intUtil[_0xa888('0xe')](_0x3556f0[_0xa888('0x10')],_0x1c5bd5,_0xa888('0x11')),'tags':getTags(_0x3556f0[_0xa888('0x12')],_0xa888('0x13'))},getCustomFields(_0x3556f0[_0xa888('0x14')],_0x1c5bd5));_0xe30d3e['custom_fields']=_[_0xa888('0x15')](_[_0xa888('0x16')](_0xe30d3e[_0xa888('0x17')],'id'),_0xa888('0x18'));return request({'uri':util[_0xa888('0xb')]('%s/api/v2/tickets',_0x42f469[_0xa888('0x19')]),'method':_0xa888('0x1a'),'body':_0xe30d3e})['then'](function(_0x29d8a7){logger['info'](_0xa888('0x1b'));return _0x29d8a7;});}function getUser(_0x44a77d,_0x577cd1){if(intUtil['validateEmail'](_0x577cd1)){return request({'uri':util[_0xa888('0xb')](_0xa888('0x1c'),_0x44a77d[_0xa888('0x19')]),'qs':{'email':_0x577cd1}})['then'](function(_0x4f0e73){if(_0x4f0e73[_0xa888('0x1d')]){logger[_0xa888('0x1e')](_0xa888('0x1f'));return _[_0xa888('0x20')](_0x4f0e73,function(_0x3f08e4){return _0x3f08e4[_0xa888('0x21')][_0xa888('0x22')]===_0x577cd1;});}else{logger[_0xa888('0x1e')](_0xa888('0x23'));return request({'uri':util['format'](_0xa888('0x24'),_0x44a77d[_0xa888('0x19')])})[_0xa888('0x25')](function(_0x3fa652){logger[_0xa888('0x1e')](_0xa888('0x26'));return _0x3fa652;});}});}else{logger[_0xa888('0x1e')](_0xa888('0x27'));return request({'uri':util[_0xa888('0xb')](_0xa888('0x24'),_0x44a77d['remoteUri'])})[_0xa888('0x25')](function(_0xbbe42e){logger[_0xa888('0x1e')](_0xa888('0x26'));return _0xbbe42e;});}}function getEndUser(_0x10316e,_0x686a57,_0x285a17){logger[_0xa888('0x1e')](_0xa888('0x28'),_0x285a17);return request({'uri':util['format'](_0xa888('0x29'),_0x10316e[_0xa888('0x19')]),'qs':{'phone':_0x285a17}})[_0xa888('0x25')](function(_0x25481d){if(_0x25481d[_0xa888('0x1d')]){logger[_0xa888('0x1e')]('Enduser\x20found!');return _[_0xa888('0x20')](_0x25481d,{'phone':_0x285a17});}else{logger[_0xa888('0x1e')]('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');return request({'uri':util[_0xa888('0xb')](_0xa888('0x29'),_0x10316e[_0xa888('0x19')]),'method':_0xa888('0x1a'),'body':{'name':_0x686a57,'phone':_0x285a17}})[_0xa888('0x25')](function(_0x2b2cf6){logger[_0xa888('0x1e')](_0xa888('0x2a'));return _0x2b2cf6;});}});}function getAuth(_0x5f532d){return util['format']('Basic\x20%s',new Buffer(_0x5f532d['apiKey']+':X')['toString'](_0xa888('0x2b')));}function request(_0x55d3b2){logger[_0xa888('0x2c')](_0xa888('0x2d'),JSON[_0xa888('0x2e')](_0x55d3b2));return rp(_['defaults'](_0x55d3b2,{'method':_0xa888('0x2f'),'headers':headers,'json':!![]}));}function getTags(_0x1d3612,_0x56f4a1){var _0x355998=[];if(_0x1d3612&&_0x1d3612['length']>0x0){_0x355998=_['map'](_0x1d3612,_0x56f4a1);}return _0x355998;}function getCustomFields(_0x210ff2,_0x45b361){var _0xe7e3ae=[];var _0x2f41f0={'custom_fields':[]};if(_0x210ff2[_0xa888('0x1d')]>0x0){_[_0xa888('0x30')](_0x210ff2,function(_0x4091a7){if(_['includes']([_0xa888('0x31'),_0xa888('0x32')],_0x4091a7['type'])&&_0x4091a7[_0xa888('0x33')]&&!_0x4091a7[_0xa888('0x34')]){_0x2f41f0[_0x4091a7['nameField'][_0xa888('0x35')]()]=_0x4091a7[_0xa888('0x36')]['toString']();}else if(_['includes']([_0xa888('0x31'),'picklist'],_0x4091a7[_0xa888('0x37')])&&_0x4091a7[_0xa888('0x38')]&&_0x4091a7[_0xa888('0x34')]){_0x2f41f0['custom_fields'][_0xa888('0x39')]({'id':_0x4091a7[_0xa888('0x38')],'value':_0x4091a7[_0xa888('0x36')][_0xa888('0x3a')]()});}else if(_0x4091a7[_0xa888('0x37')]===_0xa888('0x3b')&&_0x4091a7['variableName']&&_0x4091a7[_0xa888('0x38')]&&_0x4091a7[_0xa888('0x34')]){_0x45b361[_0x4091a7['variableName']]&&_0x2f41f0[_0xa888('0x17')]['push']({'id':_0x4091a7[_0xa888('0x38')],'value':_0x45b361[_0x4091a7['variableName']][_0xa888('0x3a')]()});}else if(_0x4091a7[_0xa888('0x37')]===_0xa888('0x3c')&&_0x4091a7[_0xa888('0x3d')]&&_0x4091a7['Variable'][_0xa888('0x13')]&&_0x4091a7['idField']&&_0x4091a7[_0xa888('0x34')]){_0x45b361[_0x4091a7[_0xa888('0x3d')][_0xa888('0x13')]['toLowerCase']()]&&_0x2f41f0['custom_fields']['push']({'id':_0x4091a7[_0xa888('0x38')],'value':_0x45b361[_0x4091a7[_0xa888('0x3d')]['name'][_0xa888('0x35')]()][_0xa888('0x3a')]()});}});}return _0x2f41f0;}exports[_0xa888('0x3e')]=function(_0x2786d3,_0x254c29,_0x3dcb55,_0x239af0,_0x1551ee,_0x440b4d){var _0x4bad30,_0x333699;_0x440b4d[_0xa888('0x19')]=intUtil['stripTrailingSlash'](_0x440b4d['remoteUri']);_0x440b4d[_0xa888('0x3f')]=intUtil[_0xa888('0x40')](_0x440b4d[_0xa888('0x3f')]);if(_0x1551ee&&_0x1551ee[_0xa888('0x41')]){logger[_0xa888('0x1e')](_0xa888('0x42'),'Recording\x20is\x20enabled!');_0x254c29['recordingURL']=util[_0xa888('0xb')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x440b4d['serverUrl'],_0x254c29[_0xa888('0x43')],md5(_0x254c29[_0xa888('0x43')]));}else{_0x254c29[_0xa888('0x44')]='';}headers[_0xa888('0x45')]=getAuth(_0x440b4d);return getUser(_0x440b4d,_0x239af0[_0xa888('0x22')])[_0xa888('0x25')](function(_0x2dc9a6){_0x4bad30=_0x2dc9a6;logger['info'](_0xa888('0x46'),_0x4bad30['id']);return getEndUser(_0x440b4d,_0x254c29['calleridname'],_0x254c29['calleridnum']);})[_0xa888('0x25')](function(_0x49d936){_0x333699=_0x49d936;logger[_0xa888('0x1e')](_0xa888('0x47'),_0x333699['id']);return getTicket(_0x440b4d,_0x4bad30,_0x333699,_0x3dcb55,_0x254c29);})['then'](function(_0x1be2d3){if(_0x1be2d3&&_0x1be2d3['id']){logger[_0xa888('0x1e')](_0xa888('0x1b'));logger[_0xa888('0x1e')](_0xa888('0x48'),_0x1be2d3['id']);logger['info'](_0xa888('0x42'),_0xa888('0x49'));emit(util[_0xa888('0xb')]('user:%s',_0x239af0[_0xa888('0x13')]),_0xa888('0x4a'),{'uri':util['format'](_0xa888('0x4b'),_0x440b4d[_0xa888('0x19')],_0x1be2d3['id'])});}})[_0xa888('0x4c')](function(_0x7fe1e0){logger[_0xa888('0x4d')](_0xa888('0x42'),JSON['stringify'](_0x7fe1e0));});};exports['outbound']=function(_0x4dee7d,_0x371a82,_0xc9dfa7,_0x466784,_0x30fde2,_0x48aa5d,_0xf3fb9a){var _0x42e2a5,_0xf8fe4e;_0x48aa5d[_0xa888('0x19')]=intUtil[_0xa888('0x40')](_0x48aa5d[_0xa888('0x19')]);_0x48aa5d[_0xa888('0x3f')]=intUtil[_0xa888('0x40')](_0x48aa5d['serverUrl']);if(_0xf3fb9a&&_0xf3fb9a['recordingFormat']&&_0xf3fb9a[_0xa888('0x4e')]!==_0xa888('0x4f')){logger[_0xa888('0x1e')](_0xa888('0x50'),_0xa888('0x51'));_0x371a82[_0xa888('0x44')]=util[_0xa888('0xb')](_0xa888('0x52'),_0x48aa5d[_0xa888('0x3f')],_0x371a82[_0xa888('0x43')],md5(_0x371a82[_0xa888('0x43')]));}headers[_0xa888('0x45')]=getAuth(_0x48aa5d);return getUser(_0x48aa5d,_0x466784[_0xa888('0x22')])[_0xa888('0x25')](function(_0x215625){_0x42e2a5=_0x215625;logger[_0xa888('0x1e')](_0xa888('0x46'),_0x42e2a5['id']);return getEndUser(_0x48aa5d,_0x371a82['destcalleridname'],_0x371a82[_0xa888('0x53')]);})[_0xa888('0x25')](function(_0x52053e){_0xf8fe4e=_0x52053e;logger['info'](_0xa888('0x47'),_0xf8fe4e['id']);return getTicket(_0x48aa5d,_0x42e2a5,_0xf8fe4e,_0xc9dfa7,_0x371a82);})[_0xa888('0x25')](function(_0x3c1d0f){if(_0x3c1d0f&&_0x3c1d0f['id']){logger[_0xa888('0x1e')](_0xa888('0x1b'));logger[_0xa888('0x1e')](_0xa888('0x48'),_0x3c1d0f['id']);logger[_0xa888('0x1e')](_0xa888('0x50'),_0xa888('0x49'));emit(util['format']('user:%s',_0x466784[_0xa888('0x13')]),_0xa888('0x4a'),{'uri':util[_0xa888('0xb')](_0xa888('0x4b'),_0x48aa5d['remoteUri'],_0x3c1d0f['id'])});}})[_0xa888('0x4c')](function(_0x7ca57d){logger[_0xa888('0x4d')]('[OUTBOUND]',JSON[_0xa888('0x2e')](_0x7ca57d));});};exports[_0xa888('0x54')]=function(_0x2324f6,_0xc022f4,_0x28aadc,_0x17d885,_0x46d5ba,_0x328082){var _0x13a33a,_0x596823;_0x328082[_0xa888('0x19')]=intUtil[_0xa888('0x40')](_0x328082[_0xa888('0x19')]);_0x328082[_0xa888('0x3f')]=intUtil[_0xa888('0x40')](_0x328082[_0xa888('0x3f')]);if(_0x46d5ba&&_0x46d5ba['monitor_format']){logger[_0xa888('0x1e')]('['+_0xc022f4[_0xa888('0x55')][_0xa888('0x56')]()+']',_0xa888('0x51'));_0xc022f4[_0xa888('0x44')]=util[_0xa888('0xb')](_0xa888('0x52'),_0x328082['serverUrl'],_0xc022f4['uniqueid'],md5(_0xc022f4[_0xa888('0x43')]));}else{_0xc022f4['recordingURL']='';}headers[_0xa888('0x45')]=getAuth(_0x328082);return getUser(_0x328082,'')[_0xa888('0x25')](function(_0x16beb7){_0x13a33a=_0x16beb7;logger[_0xa888('0x1e')](_0xa888('0x46'),_0x13a33a['id']);return getEndUser(_0x328082,_0xc022f4[_0xa888('0xc')],_0xc022f4[_0xa888('0xd')]);})[_0xa888('0x25')](function(_0x38d669){_0x596823=_0x38d669;logger[_0xa888('0x1e')](_0xa888('0x47'),_0x596823['id']);return getTicket(_0x328082,_0x13a33a,_0x596823,_0x28aadc,_0xc022f4);})[_0xa888('0x25')](function(_0x163d05){if(_0x163d05){logger['info'](_0xa888('0x1b'));logger['info']('The\x20Ticket\x20ID\x20is:',_0x163d05['id']);}})[_0xa888('0x4c')](function(_0x49de79){logger[_0xa888('0x4d')]('['+_0xc022f4[_0xa888('0x55')]['toUpperCase']()+']',JSON[_0xa888('0x2e')](_0x49de79));});};
\ No newline at end of file
+var _0x1271=['emit','info','merge','format','Caller\x20-\x20%s','calleridnum','getString','Subjects','Descriptions','<br>','Tags','name','custom_fields','mapValues','keyBy','remoteUri','Ticket\x20created!','validateEmail','%s/api/v2/agents','then','length','Agent\x20found!','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!','Searching\x20enduser\x20with\x20phone','%s/api/v2/contacts','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','POST','Enduser\x20created.','Basic\x20%s','apiKey','toString','base64','debug','[HTTP]','stringify','GET','map','string','type','nameField','toLowerCase','content','picklist','idField','customField','push','variable','variableName','Variable','queue','serverUrl','monitor_format','[QUEUE]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','The\x20User\x20ID\x20is:','calleridname','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','error','stripTrailingSlash','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','recordingURL','Authorization','destcalleridname','destcalleridnum','trigger:browser:url','%s/helpdesk/tickets/%d','catch','unmanaged','lastevent','toUpperCase','lodash','request-promise','md5','util','ioredis','../../../../config/logger','redis','defaults','localhost','socket.io-emitter','application/json'];(function(_0x1f602c,_0xd76e79){var _0x368d3e=function(_0x47d491){while(--_0x47d491){_0x1f602c['push'](_0x1f602c['shift']());}};_0x368d3e(++_0xd76e79);}(_0x1271,0x1cb));var _0x1127=function(_0x3bc2e1,_0x363f8c){_0x3bc2e1=_0x3bc2e1-0x0;var _0x25bc6d=_0x1271[_0x3bc2e1];return _0x25bc6d;};'use strict';var _=require(_0x1127('0x0'));var rp=require(_0x1127('0x1'));var md5=require(_0x1127('0x2'));var util=require(_0x1127('0x3'));var Redis=require(_0x1127('0x4'));var intUtil=require('./util');var config=require('../../../../config/environment');var logger=require(_0x1127('0x5'))('freshdesk');config[_0x1127('0x6')]=_[_0x1127('0x7')](config[_0x1127('0x6')],{'host':_0x1127('0x8'),'port':0x18eb});var io=require(_0x1127('0x9'))(new Redis(config[_0x1127('0x6')]));var headers={'Content-Type':'application/json','Accept':_0x1127('0xa')};function emit(_0x1aeb6e,_0x1cde3f,_0x3657ea){io['to'](_0x1aeb6e)[_0x1127('0xb')](_0x1cde3f,_0x3657ea);}function getTicket(_0x1039aa,_0x1b9c4e,_0x57e8cc,_0x3185fe,_0x133925){logger[_0x1127('0xc')]('Creating\x20new\x20ticket...');var _0x3e75f6=_[_0x1127('0xd')]({'responder_id':_0x1b9c4e['id'],'requester_id':_0x57e8cc['id'],'name':util[_0x1127('0xe')](_0x1127('0xf'),_0x133925['calleridname']),'phone':_0x133925[_0x1127('0x10')],'source':0x3,'priority':0x1,'status':0x2,'subject':intUtil[_0x1127('0x11')](_0x3185fe[_0x1127('0x12')],_0x133925,'\x20'),'description':intUtil['getString'](_0x3185fe[_0x1127('0x13')],_0x133925,_0x1127('0x14')),'tags':getTags(_0x3185fe[_0x1127('0x15')],_0x1127('0x16'))},getCustomFields(_0x3185fe['Fields'],_0x133925));_0x3e75f6[_0x1127('0x17')]=_[_0x1127('0x18')](_[_0x1127('0x19')](_0x3e75f6[_0x1127('0x17')],'id'),'value');return request({'uri':util[_0x1127('0xe')]('%s/api/v2/tickets',_0x1039aa[_0x1127('0x1a')]),'method':'POST','body':_0x3e75f6})['then'](function(_0x53729c){logger['info'](_0x1127('0x1b'));return _0x53729c;});}function getUser(_0x4d85e6,_0xcea770){if(intUtil[_0x1127('0x1c')](_0xcea770)){return request({'uri':util[_0x1127('0xe')](_0x1127('0x1d'),_0x4d85e6[_0x1127('0x1a')]),'qs':{'email':_0xcea770}})[_0x1127('0x1e')](function(_0x55b125){if(_0x55b125[_0x1127('0x1f')]){logger[_0x1127('0xc')](_0x1127('0x20'));return _[_0x1127('0x21')](_0x55b125,function(_0x498d72){return _0x498d72[_0x1127('0x22')][_0x1127('0x23')]===_0xcea770;});}else{logger[_0x1127('0xc')](_0x1127('0x24'));return request({'uri':util[_0x1127('0xe')](_0x1127('0x25'),_0x4d85e6['remoteUri'])})['then'](function(_0x91cbbb){logger[_0x1127('0xc')](_0x1127('0x26'));return _0x91cbbb;});}});}else{logger[_0x1127('0xc')](_0x1127('0x27'));return request({'uri':util[_0x1127('0xe')](_0x1127('0x25'),_0x4d85e6['remoteUri'])})['then'](function(_0x56cfea){logger[_0x1127('0xc')](_0x1127('0x26'));return _0x56cfea;});}}function getEndUser(_0x17d60d,_0x4c2f77,_0x27cc39){logger[_0x1127('0xc')](_0x1127('0x28'),_0x27cc39);return request({'uri':util[_0x1127('0xe')](_0x1127('0x29'),_0x17d60d[_0x1127('0x1a')]),'qs':{'phone':_0x27cc39}})[_0x1127('0x1e')](function(_0x49dee1){if(_0x49dee1[_0x1127('0x1f')]){logger[_0x1127('0xc')]('Enduser\x20found!');return _['find'](_0x49dee1,{'phone':_0x27cc39});}else{logger['info'](_0x1127('0x2a'));return request({'uri':util[_0x1127('0xe')](_0x1127('0x29'),_0x17d60d[_0x1127('0x1a')]),'method':_0x1127('0x2b'),'body':{'name':_0x4c2f77,'phone':_0x27cc39}})['then'](function(_0x4e8122){logger[_0x1127('0xc')](_0x1127('0x2c'));return _0x4e8122;});}});}function getAuth(_0x42c186){return util[_0x1127('0xe')](_0x1127('0x2d'),new Buffer(_0x42c186[_0x1127('0x2e')]+':X')[_0x1127('0x2f')](_0x1127('0x30')));}function request(_0x2c62a6){logger[_0x1127('0x31')](_0x1127('0x32'),JSON[_0x1127('0x33')](_0x2c62a6));return rp(_[_0x1127('0x7')](_0x2c62a6,{'method':_0x1127('0x34'),'headers':headers,'json':!![]}));}function getTags(_0x5280bd,_0x307165){var _0x84fa9e=[];if(_0x5280bd&&_0x5280bd[_0x1127('0x1f')]>0x0){_0x84fa9e=_[_0x1127('0x35')](_0x5280bd,_0x307165);}return _0x84fa9e;}function getCustomFields(_0x4ad6b2,_0x2eaa8b){var _0x3bb6f7=[];var _0x40a4fa={'custom_fields':[]};if(_0x4ad6b2['length']>0x0){_['forEach'](_0x4ad6b2,function(_0x1c739b){if(_['includes']([_0x1127('0x36'),'picklist'],_0x1c739b[_0x1127('0x37')])&&_0x1c739b[_0x1127('0x38')]&&!_0x1c739b['customField']){_0x40a4fa[_0x1c739b[_0x1127('0x38')][_0x1127('0x39')]()]=_0x1c739b[_0x1127('0x3a')][_0x1127('0x2f')]();}else if(_['includes']([_0x1127('0x36'),_0x1127('0x3b')],_0x1c739b[_0x1127('0x37')])&&_0x1c739b[_0x1127('0x3c')]&&_0x1c739b[_0x1127('0x3d')]){_0x40a4fa['custom_fields'][_0x1127('0x3e')]({'id':_0x1c739b[_0x1127('0x3c')],'value':_0x1c739b['content']['toString']()});}else if(_0x1c739b[_0x1127('0x37')]===_0x1127('0x3f')&&_0x1c739b[_0x1127('0x40')]&&_0x1c739b[_0x1127('0x3c')]&&_0x1c739b[_0x1127('0x3d')]){_0x2eaa8b[_0x1c739b[_0x1127('0x40')]]&&_0x40a4fa['custom_fields'][_0x1127('0x3e')]({'id':_0x1c739b['idField'],'value':_0x2eaa8b[_0x1c739b[_0x1127('0x40')]]['toString']()});}else if(_0x1c739b[_0x1127('0x37')]==='customVariable'&&_0x1c739b[_0x1127('0x41')]&&_0x1c739b[_0x1127('0x41')][_0x1127('0x16')]&&_0x1c739b[_0x1127('0x3c')]&&_0x1c739b['customField']){_0x2eaa8b[_0x1c739b[_0x1127('0x41')]['name'][_0x1127('0x39')]()]&&_0x40a4fa[_0x1127('0x17')][_0x1127('0x3e')]({'id':_0x1c739b[_0x1127('0x3c')],'value':_0x2eaa8b[_0x1c739b[_0x1127('0x41')]['name'][_0x1127('0x39')]()][_0x1127('0x2f')]()});}});}return _0x40a4fa;}exports[_0x1127('0x42')]=function(_0x4f5b64,_0x312d58,_0x2ab1c6,_0xcc7b2e,_0x1069ea,_0x2f24fb){var _0x47aa96,_0x157cf8;_0x2f24fb['remoteUri']=intUtil['stripTrailingSlash'](_0x2f24fb[_0x1127('0x1a')]);_0x2f24fb[_0x1127('0x43')]=intUtil['stripTrailingSlash'](_0x2f24fb[_0x1127('0x43')]);if(_0x1069ea&&_0x1069ea[_0x1127('0x44')]){logger[_0x1127('0xc')](_0x1127('0x45'),'Recording\x20is\x20enabled!');_0x312d58['recordingURL']=util[_0x1127('0xe')](_0x1127('0x46'),_0x2f24fb['serverUrl'],_0x312d58[_0x1127('0x47')],md5(_0x312d58[_0x1127('0x47')]));}else{_0x312d58['recordingURL']='';}headers['Authorization']=getAuth(_0x2f24fb);return getUser(_0x2f24fb,_0xcc7b2e[_0x1127('0x23')])[_0x1127('0x1e')](function(_0x5801ce){_0x47aa96=_0x5801ce;logger[_0x1127('0xc')](_0x1127('0x48'),_0x47aa96['id']);return getEndUser(_0x2f24fb,_0x312d58[_0x1127('0x49')],_0x312d58[_0x1127('0x10')]);})[_0x1127('0x1e')](function(_0x3a8043){_0x157cf8=_0x3a8043;logger[_0x1127('0xc')](_0x1127('0x4a'),_0x157cf8['id']);return getTicket(_0x2f24fb,_0x47aa96,_0x157cf8,_0x2ab1c6,_0x312d58);})[_0x1127('0x1e')](function(_0x5db604){if(_0x5db604&&_0x5db604['id']){logger[_0x1127('0xc')](_0x1127('0x1b'));logger['info'](_0x1127('0x4b'),_0x5db604['id']);logger[_0x1127('0xc')]('[QUEUE]',_0x1127('0x4c'));emit(util[_0x1127('0xe')](_0x1127('0x4d'),_0xcc7b2e[_0x1127('0x16')]),'trigger:browser:url',{'uri':util[_0x1127('0xe')]('%s/helpdesk/tickets/%d',_0x2f24fb[_0x1127('0x1a')],_0x5db604['id'])});}})['catch'](function(_0x4ea8c8){logger[_0x1127('0x4e')](_0x1127('0x45'),JSON[_0x1127('0x33')](_0x4ea8c8));});};exports['outbound']=function(_0x144887,_0x297621,_0x5cf60c,_0x58b4dc,_0x5c7b20,_0x3548bd,_0x307b42){var _0x8f334c,_0x35a003;_0x3548bd[_0x1127('0x1a')]=intUtil[_0x1127('0x4f')](_0x3548bd[_0x1127('0x1a')]);_0x3548bd[_0x1127('0x43')]=intUtil[_0x1127('0x4f')](_0x3548bd[_0x1127('0x43')]);if(_0x307b42&&_0x307b42[_0x1127('0x50')]&&_0x307b42[_0x1127('0x50')]!==_0x1127('0x51')){logger[_0x1127('0xc')](_0x1127('0x52'),_0x1127('0x53'));_0x297621[_0x1127('0x54')]=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x3548bd[_0x1127('0x43')],_0x297621[_0x1127('0x47')],md5(_0x297621[_0x1127('0x47')]));}headers[_0x1127('0x55')]=getAuth(_0x3548bd);return getUser(_0x3548bd,_0x58b4dc[_0x1127('0x23')])[_0x1127('0x1e')](function(_0x18f272){_0x8f334c=_0x18f272;logger[_0x1127('0xc')](_0x1127('0x48'),_0x8f334c['id']);return getEndUser(_0x3548bd,_0x297621[_0x1127('0x56')],_0x297621[_0x1127('0x57')]);})[_0x1127('0x1e')](function(_0x567d1e){_0x35a003=_0x567d1e;logger[_0x1127('0xc')](_0x1127('0x4a'),_0x35a003['id']);return getTicket(_0x3548bd,_0x8f334c,_0x35a003,_0x5cf60c,_0x297621);})['then'](function(_0x5ae2d4){if(_0x5ae2d4&&_0x5ae2d4['id']){logger[_0x1127('0xc')]('Ticket\x20created!');logger[_0x1127('0xc')]('The\x20Ticket\x20ID\x20is:',_0x5ae2d4['id']);logger['info'](_0x1127('0x52'),_0x1127('0x4c'));emit(util[_0x1127('0xe')](_0x1127('0x4d'),_0x58b4dc['name']),_0x1127('0x58'),{'uri':util[_0x1127('0xe')](_0x1127('0x59'),_0x3548bd[_0x1127('0x1a')],_0x5ae2d4['id'])});}})[_0x1127('0x5a')](function(_0xad8539){logger[_0x1127('0x4e')](_0x1127('0x52'),JSON[_0x1127('0x33')](_0xad8539));});};exports[_0x1127('0x5b')]=function(_0x2e4eba,_0x57a25,_0xd079bc,_0x471f48,_0x540168,_0x4e3ae8){var _0x47fea7,_0x2c2af7;_0x4e3ae8[_0x1127('0x1a')]=intUtil[_0x1127('0x4f')](_0x4e3ae8[_0x1127('0x1a')]);_0x4e3ae8[_0x1127('0x43')]=intUtil[_0x1127('0x4f')](_0x4e3ae8['serverUrl']);if(_0x540168&&_0x540168[_0x1127('0x44')]){logger[_0x1127('0xc')]('['+_0x57a25[_0x1127('0x5c')][_0x1127('0x5d')]()+']',_0x1127('0x53'));_0x57a25[_0x1127('0x54')]=util[_0x1127('0xe')](_0x1127('0x46'),_0x4e3ae8[_0x1127('0x43')],_0x57a25[_0x1127('0x47')],md5(_0x57a25['uniqueid']));}else{_0x57a25['recordingURL']='';}headers[_0x1127('0x55')]=getAuth(_0x4e3ae8);return getUser(_0x4e3ae8,'')[_0x1127('0x1e')](function(_0x4467e8){_0x47fea7=_0x4467e8;logger[_0x1127('0xc')](_0x1127('0x48'),_0x47fea7['id']);return getEndUser(_0x4e3ae8,_0x57a25[_0x1127('0x49')],_0x57a25[_0x1127('0x10')]);})['then'](function(_0x1e5b28){_0x2c2af7=_0x1e5b28;logger[_0x1127('0xc')](_0x1127('0x4a'),_0x2c2af7['id']);return getTicket(_0x4e3ae8,_0x47fea7,_0x2c2af7,_0xd079bc,_0x57a25);})[_0x1127('0x1e')](function(_0xcb389d){if(_0xcb389d){logger['info'](_0x1127('0x1b'));logger[_0x1127('0xc')](_0x1127('0x4b'),_0xcb389d['id']);}})[_0x1127('0x5a')](function(_0x590e3c){logger[_0x1127('0x4e')]('['+_0x57a25[_0x1127('0x5c')][_0x1127('0x5d')]()+']',JSON[_0x1127('0x33')](_0x590e3c));});};
\ No newline at end of file
index e640d2d..eee9e34 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6cb2=['POST','/api/contacts','contact','message','Creating\x20new\x20task','/api/tasks','getString','Subjects','Descriptions','add','YYYY-MM-DDTHH:mm:ss','ticketId','task','user:%s','emit','trigger:browser:url','Token\x20token=','apiKey','remoteUri','serverUrl','stripTrailingSlash','username','toLowerCase','outbound','calleridnum','queue','uniqueid','monitor_format','recordingURL','recordingFormat','[OUTBOUND]','Recording\x20is\x20enabled!','The\x20ticket\x20ID\x20is:\x20%s','unmanaged','Displaying\x20task\x20in\x20a\x20new\x20tab...','name',']\x20Error\x20running\x20Freshsales\x20integration','lodash','request-promise','md5','ioredis','../../../../config/logger','redis','localhost','socket.io-emitter','GET','/api/selector/owners','headers','info','then','users','length','email','adminId','Requested\x20Resource\x20not\x20Found','catch','error','toUpperCase','agentEmail','userEmail','userId','User\x20found:','Admin\x20selected','adminEmail','&f=','&entities=contact','find','format','Searching\x20contact\x20with\x20phone\x20%s','contactNumber','mobile_number','Contact\x20found\x20mobile_number:','endUserId','work_number','Contact\x20found\x20work_number:'];(function(_0x49e379,_0x1b4c34){var _0x4d17e5=function(_0x24578e){while(--_0x24578e){_0x49e379['push'](_0x49e379['shift']());}};_0x4d17e5(++_0x1b4c34);}(_0x6cb2,0x19c));var _0x26cb=function(_0x1969a7,_0x5a133a){_0x1969a7=_0x1969a7-0x0;var _0x3d665f=_0x6cb2[_0x1969a7];return _0x3d665f;};'use strict';var _=require(_0x26cb('0x0'));var rp=require(_0x26cb('0x1'));var md5=require(_0x26cb('0x2'));var util=require('util');var moment=require('moment');var Promise=require('bluebird');var Redis=require(_0x26cb('0x3'));var intUtil=require('./util');var config=require('../../../../config/environment');var logger=require(_0x26cb('0x4'))('freshsales');config[_0x26cb('0x5')]=_['defaults'](config[_0x26cb('0x5')],{'host':_0x26cb('0x6'),'port':0x18eb});var io=require(_0x26cb('0x7'))(new Redis(config[_0x26cb('0x5')]));function getAdminId(_0x4a1093,_0x4fddcc,_0x2ef9c4,_0x11393a){return new Promise(function(_0x3d3f0f,_0x4d5971){var _0x42520e=![];var _0x429ac0={'method':_0x26cb('0x8'),'uri':_0x11393a+_0x26cb('0x9'),'json':!![]};_0x429ac0[_0x26cb('0xa')]=_0x2ef9c4;logger[_0x26cb('0xb')]('Getting\x20admin\x20information');return rp(_0x429ac0)[_0x26cb('0xc')](function(_0x5dbf89){if(_0x5dbf89){var _0x58e5e3=_0x5dbf89[_0x26cb('0xd')];var _0x23ae8b=null;for(_0x23ae8b=0x0;_0x23ae8b<_0x58e5e3[_0x26cb('0xe')];_0x23ae8b++){if(_0x58e5e3[_0x23ae8b][_0x26cb('0xf')]===_0x4a1093['adminEmail']){_0x4a1093[_0x26cb('0x10')]=_0x58e5e3[_0x23ae8b]['id'];_0x42520e=!![];}}if(_0x42520e){logger[_0x26cb('0xb')]('Admin\x20found:',_0x4a1093['adminId']);_0x3d3f0f(_0x4a1093);}else{_0x4d5971({'statusCode':0x194,'message':_0x26cb('0x11')});}}else{_0x4d5971({'statusCode':0x194,'message':'Requested\x20Resource\x20not\x20Found'});}})[_0x26cb('0x12')](function(_0x341acd){logger[_0x26cb('0x13')]('['+[_0x4fddcc[_0x26cb('0x14')]()]+']',_0x341acd['message']);_0x4d5971(_0x341acd);});});}function getUser(_0x29a731,_0x1a4cde,_0x2c665d){return function(_0x4d4431){return new Promise(function(_0x2e125a,_0x3b633b){var _0x52439c={'method':_0x26cb('0x8'),'uri':_0x2c665d+_0x26cb('0x9'),'json':!![]};_0x52439c[_0x26cb('0xa')]=_0x1a4cde;logger[_0x26cb('0xb')]('Getting\x20user\x20list');return rp(_0x52439c)[_0x26cb('0xc')](function(_0x8de731){if(_0x8de731){var _0x4b193e=_0x8de731[_0x26cb('0xd')];var _0x3fe21d=![];var _0x1de755=null;if(_0x4d4431[_0x26cb('0x15')]!==null){logger[_0x26cb('0xb')]('Getting\x20user\x20with\x20email',_0x4d4431[_0x26cb('0x15')]);_0x4d4431[_0x26cb('0x16')]=_0x4d4431['agentEmail'];for(_0x1de755=0x0;_0x1de755<_0x4b193e['length'];_0x1de755++){if(_0x4b193e[_0x1de755][_0x26cb('0xf')]===_0x4d4431['agentEmail']){_0x3fe21d=!![];_0x4d4431[_0x26cb('0x17')]=_0x4b193e[_0x1de755]['id'];logger[_0x26cb('0xb')](_0x26cb('0x18'),_0x4d4431[_0x26cb('0x17')]);}}}if(!_0x3fe21d){logger[_0x26cb('0xb')](_0x26cb('0x19'));_0x4d4431[_0x26cb('0x16')]=_0x4d4431[_0x26cb('0x1a')];_0x4d4431[_0x26cb('0x17')]=_0x4d4431[_0x26cb('0x10')];_0x3fe21d=!![];}if(_0x3fe21d){_0x2e125a(_0x4d4431);}else{_0x3b633b({'statusCode':0x194,'message':_0x26cb('0x11')});}}else{_0x3b633b({'statusCode':0x194,'message':_0x26cb('0x11')});}})[_0x26cb('0x12')](function(_0x1e5a5e){logger[_0x26cb('0x13')]('['+[_0x29a731[_0x26cb('0x14')]()]+']',_0x1e5a5e['message']);_0x3b633b(_0x1e5a5e);});});};}function searchContact(_0x57a557,_0x17a936,_0x4fff9d,_0x4612b2){return new Promise(function(_0x513d08,_0x3189e4){var _0x1a9435={'method':_0x26cb('0x8'),'headers':_0x17a936,'uri':_0x57a557+'/api/lookup?q='+_0x4612b2+_0x26cb('0x1b')+_0x4fff9d+_0x26cb('0x1c'),'json':!![]};rp(_0x1a9435)[_0x26cb('0xc')](function(_0x3f7fe1){var _0x39e818=_[_0x26cb('0x1d')](_0x3f7fe1['contacts']['contacts'],[_0x4fff9d,_0x4612b2]);_0x513d08(_0x39e818);})[_0x26cb('0x12')](function(_0x1df1e6){_0x3189e4(_0x1df1e6);});});}function getEndUser(_0x1b08eb,_0x2702d1,_0x5ee9ab){return function(_0x3cd8b4){return new Promise(function(_0x463307,_0x4b5fa4){logger[_0x26cb('0xb')](util[_0x26cb('0x1e')](_0x26cb('0x1f'),_0x3cd8b4[_0x26cb('0x20')]));searchContact(_0x5ee9ab,_0x2702d1,_0x26cb('0x21'),_0x3cd8b4[_0x26cb('0x20')])[_0x26cb('0xc')](function(_0x45e606){if(_0x45e606){_0x3cd8b4['endUserId']=_0x45e606['id'];logger[_0x26cb('0xb')](_0x26cb('0x22'),_0x3cd8b4[_0x26cb('0x23')]);return _0x463307(_0x3cd8b4);}searchContact(_0x5ee9ab,_0x2702d1,_0x26cb('0x24'),_0x3cd8b4[_0x26cb('0x20')])[_0x26cb('0xc')](function(_0x38857e){if(_0x38857e){_0x3cd8b4[_0x26cb('0x23')]=_0x38857e['id'];logger[_0x26cb('0xb')](_0x26cb('0x25'),_0x3cd8b4[_0x26cb('0x23')]);return _0x463307(_0x3cd8b4);}createEndUser(_0x3cd8b4,_0x1b08eb,_0x2702d1,_0x5ee9ab)[_0x26cb('0xc')](function(_0x9e185b){logger[_0x26cb('0xb')]('Contact\x20created:',_0x9e185b['endUserId']);return _0x463307(_0x9e185b);});});})[_0x26cb('0x12')](function(_0x420910){_0x4b5fa4(_0x420910);});});};}function createEndUser(_0x2d2752,_0x2f9642,_0xe8a36d,_0x557d2b){return new Promise(function(_0x1174fc,_0x59e5b6){var _0x1dd2cf=moment();var _0x40b46e={'method':_0x26cb('0x26'),'uri':_0x557d2b+_0x26cb('0x27'),'body':{'contact':{'last_name':_0x2d2752[_0x26cb('0x20')],'work_number':_0x2d2752['contactNumber'],'mobile_number':_0x2d2752[_0x26cb('0x20')],'owner_id':_0x2d2752['userId'],'created_at':_0x1dd2cf[_0x26cb('0x1e')]('YYYY-MM-DDTHH:mm:ss')}},'json':!![]};_0x40b46e[_0x26cb('0xa')]=_0xe8a36d;logger[_0x26cb('0xb')]('Contact\x20not\x20found,\x20creating\x20a\x20new\x20contact');return rp(_0x40b46e)['then'](function(_0x2ee42a){_0x2d2752[_0x26cb('0x23')]=_0x2ee42a[_0x26cb('0x28')]['id'];_0x1174fc(_0x2d2752);})[_0x26cb('0x12')](function(_0x27f9fa){logger[_0x26cb('0x13')]('['+[_0x2f9642[_0x26cb('0x14')]()]+']',_0x27f9fa[_0x26cb('0x29')]);_0x59e5b6(_0x27f9fa[_0x26cb('0x29')]);});});}function getTicket(_0x2dfe6d,_0x3b1d5b,_0x21033e,_0x39a86d,_0x3e3451){return function(_0x8f11c2){logger[_0x26cb('0xb')](_0x26cb('0x2a'));return new Promise(function(_0x401e04,_0x38b5bb){var _0x1e1f55=moment();var _0x3fd591={'method':_0x26cb('0x26'),'uri':_0x21033e+_0x26cb('0x2b'),'body':{'title':intUtil[_0x26cb('0x2c')](_0x39a86d[_0x26cb('0x2d')],_0x3e3451,'\x20'),'description':intUtil[_0x26cb('0x2c')](_0x39a86d[_0x26cb('0x2e')],_0x3e3451,'\x0a'),'owner_id':_0x8f11c2[_0x26cb('0x17')],'creater_id':_0x8f11c2[_0x26cb('0x10')],'targetable_id':_0x8f11c2[_0x26cb('0x23')],'targetable_type':'Contact','created_at':_0x1e1f55[_0x26cb('0x1e')]('YYYY-MM-DDTHH:mm:ss'),'due_date':_0x1e1f55[_0x26cb('0x2f')](0x1e,'m')[_0x26cb('0x1e')](_0x26cb('0x30'))},'json':!![]};_0x3fd591[_0x26cb('0xa')]=_0x3b1d5b;return rp(_0x3fd591)[_0x26cb('0xc')](function(_0x1efba9){_0x8f11c2[_0x26cb('0x31')]=_0x1efba9[_0x26cb('0x32')]['id'];logger[_0x26cb('0xb')]('Task\x20created:',_0x8f11c2[_0x26cb('0x31')]);_0x401e04(_0x8f11c2);})[_0x26cb('0x12')](function(_0x476931){logger['error']('['+[_0x2dfe6d[_0x26cb('0x14')]()]+']',_0x476931[_0x26cb('0x29')]);_0x38b5bb(_0x476931[_0x26cb('0x29')]);});});};}function emit(_0x26e736,_0x205aaf,_0x1330dd){var _0x27a2a5={'uri':_0x26e736+'/contacts/'+_0x1330dd};io['to'](util[_0x26cb('0x1e')](_0x26cb('0x33'),_0x205aaf))[_0x26cb('0x34')](_0x26cb('0x35'),_0x27a2a5);}exports['cs']=function(_0x48ced7,_0x306d60,_0x11e542,_0x34f393,_0x22e0c2,_0x5a608f,_0x5881f4,_0x1f6b25){var _0x54da2c={};var _0x73349a={'Authorization':_0x26cb('0x36')+_0x5a608f[_0x26cb('0x37')]};_0x5a608f[_0x26cb('0x38')]=intUtil['stripTrailingSlash'](_0x5a608f[_0x26cb('0x38')]);_0x5a608f[_0x26cb('0x39')]=intUtil[_0x26cb('0x3a')](_0x5a608f['serverUrl']);var _0x44c1d3=_0x5a608f[_0x26cb('0x38')];_0x54da2c[_0x26cb('0x1a')]=_0x5a608f[_0x26cb('0x3b')];_0x54da2c[_0x26cb('0x20')]=_0x1f6b25[_0x26cb('0x3c')]()===_0x26cb('0x3d')?_0x306d60['destcalleridnum']:_0x306d60[_0x26cb('0x3e')];_0x54da2c['callDirection']=_0x1f6b25==='queue'||_0x1f6b25==='unmanaged'?_0x26cb('0x3f'):_0x26cb('0x3d');if(_0x34f393){_0x54da2c['agentEmail']=_0x34f393['email'];}var _0x294083=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x5a608f['serverUrl'],_0x306d60['uniqueid'],md5(_0x306d60[_0x26cb('0x40')]));if(_0x22e0c2&&_0x22e0c2[_0x26cb('0x41')]){logger[_0x26cb('0xb')]('[QUEUE]','Recording\x20is\x20enabled!');_0x306d60[_0x26cb('0x42')]=_0x294083;}else if(_0x5881f4&&_0x5881f4[_0x26cb('0x43')]&&_0x5881f4[_0x26cb('0x43')]!=='none'){logger['info'](_0x26cb('0x44'),_0x26cb('0x45'));_0x306d60[_0x26cb('0x42')]=_0x294083;}else{_0x306d60[_0x26cb('0x42')]='';}return getAdminId(_0x54da2c,_0x1f6b25,_0x73349a,_0x44c1d3)['then'](getUser(_0x1f6b25,_0x73349a,_0x44c1d3))[_0x26cb('0xc')](getEndUser(_0x1f6b25,_0x73349a,_0x44c1d3))[_0x26cb('0xc')](getTicket(_0x1f6b25,_0x73349a,_0x44c1d3,_0x11e542,_0x306d60))[_0x26cb('0xc')](function(_0x2392ec){logger['info'](util[_0x26cb('0x1e')](_0x26cb('0x46'),_0x2392ec['ticketId']));if(_0x1f6b25!==_0x26cb('0x47')){logger[_0x26cb('0xb')]('['+[_0x1f6b25[_0x26cb('0x14')]()]+']',_0x26cb('0x48'));emit(_0x44c1d3,_0x34f393[_0x26cb('0x49')],_0x2392ec['endUserId']);}})[_0x26cb('0x12')](function(_0x43c251){logger['error']('['+[_0x1f6b25[_0x26cb('0x14')]()]+_0x26cb('0x4a'),util['inspect'](_0x43c251,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
+var _0x5787=['Requested\x20Resource\x20not\x20Found','catch','error','toUpperCase','Getting\x20user\x20list','agentEmail','userEmail','info','userId','message','/api/lookup?q=','&entities=contact','find','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','getString','Subjects','Descriptions','Contact','YYYY-MM-DDTHH:mm:ss','add','ticketId','task','Task\x20created:','user:%s','emit','trigger:browser:url','Token\x20token=','apiKey','remoteUri','stripTrailingSlash','username','calleridnum','callDirection','queue','unmanaged','serverUrl','uniqueid','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','recordingFormat','none','[OUTBOUND]','The\x20ticket\x20ID\x20is:\x20%s','Displaying\x20task\x20in\x20a\x20new\x20tab...','inspect','lodash','request-promise','md5','util','bluebird','ioredis','./util','../../../../config/environment','../../../../config/logger','redis','localhost','socket.io-emitter','GET','/api/selector/owners','headers','Getting\x20admin\x20information','then','users','length','email','adminEmail','adminId','Admin\x20found:'];(function(_0xd1d19a,_0x1933f0){var _0x52a79d=function(_0x5199e2){while(--_0x5199e2){_0xd1d19a['push'](_0xd1d19a['shift']());}};_0x52a79d(++_0x1933f0);}(_0x5787,0x183));var _0x7578=function(_0x259845,_0x3034bf){_0x259845=_0x259845-0x0;var _0x3276da=_0x5787[_0x259845];return _0x3276da;};'use strict';var _=require(_0x7578('0x0'));var rp=require(_0x7578('0x1'));var md5=require(_0x7578('0x2'));var util=require(_0x7578('0x3'));var moment=require('moment');var Promise=require(_0x7578('0x4'));var Redis=require(_0x7578('0x5'));var intUtil=require(_0x7578('0x6'));var config=require(_0x7578('0x7'));var logger=require(_0x7578('0x8'))('freshsales');config[_0x7578('0x9')]=_['defaults'](config[_0x7578('0x9')],{'host':_0x7578('0xa'),'port':0x18eb});var io=require(_0x7578('0xb'))(new Redis(config['redis']));function getAdminId(_0x1e37bc,_0x1aad25,_0x1501ee,_0x34f067){return new Promise(function(_0x4f66d1,_0x12f562){var _0x1a4f7f=![];var _0x11124a={'method':_0x7578('0xc'),'uri':_0x34f067+_0x7578('0xd'),'json':!![]};_0x11124a[_0x7578('0xe')]=_0x1501ee;logger['info'](_0x7578('0xf'));return rp(_0x11124a)[_0x7578('0x10')](function(_0x11311b){if(_0x11311b){var _0x39e522=_0x11311b[_0x7578('0x11')];var _0x39303b=null;for(_0x39303b=0x0;_0x39303b<_0x39e522[_0x7578('0x12')];_0x39303b++){if(_0x39e522[_0x39303b][_0x7578('0x13')]===_0x1e37bc[_0x7578('0x14')]){_0x1e37bc[_0x7578('0x15')]=_0x39e522[_0x39303b]['id'];_0x1a4f7f=!![];}}if(_0x1a4f7f){logger['info'](_0x7578('0x16'),_0x1e37bc[_0x7578('0x15')]);_0x4f66d1(_0x1e37bc);}else{_0x12f562({'statusCode':0x194,'message':_0x7578('0x17')});}}else{_0x12f562({'statusCode':0x194,'message':_0x7578('0x17')});}})[_0x7578('0x18')](function(_0x33570f){logger[_0x7578('0x19')]('['+[_0x1aad25[_0x7578('0x1a')]()]+']',_0x33570f['message']);_0x12f562(_0x33570f);});});}function getUser(_0x170a0a,_0x2753d5,_0x13b267){return function(_0x5a96a0){return new Promise(function(_0xa863e6,_0x3f9f82){var _0x37e1a0={'method':_0x7578('0xc'),'uri':_0x13b267+'/api/selector/owners','json':!![]};_0x37e1a0[_0x7578('0xe')]=_0x2753d5;logger['info'](_0x7578('0x1b'));return rp(_0x37e1a0)[_0x7578('0x10')](function(_0x3a757f){if(_0x3a757f){var _0x5a52f5=_0x3a757f[_0x7578('0x11')];var _0x4a2c80=![];var _0x5a22a1=null;if(_0x5a96a0[_0x7578('0x1c')]!==null){logger['info']('Getting\x20user\x20with\x20email',_0x5a96a0['agentEmail']);_0x5a96a0[_0x7578('0x1d')]=_0x5a96a0[_0x7578('0x1c')];for(_0x5a22a1=0x0;_0x5a22a1<_0x5a52f5['length'];_0x5a22a1++){if(_0x5a52f5[_0x5a22a1][_0x7578('0x13')]===_0x5a96a0[_0x7578('0x1c')]){_0x4a2c80=!![];_0x5a96a0['userId']=_0x5a52f5[_0x5a22a1]['id'];logger[_0x7578('0x1e')]('User\x20found:',_0x5a96a0['userId']);}}}if(!_0x4a2c80){logger[_0x7578('0x1e')]('Admin\x20selected');_0x5a96a0[_0x7578('0x1d')]=_0x5a96a0[_0x7578('0x14')];_0x5a96a0[_0x7578('0x1f')]=_0x5a96a0['adminId'];_0x4a2c80=!![];}if(_0x4a2c80){_0xa863e6(_0x5a96a0);}else{_0x3f9f82({'statusCode':0x194,'message':'Requested\x20Resource\x20not\x20Found'});}}else{_0x3f9f82({'statusCode':0x194,'message':_0x7578('0x17')});}})[_0x7578('0x18')](function(_0x146773){logger['error']('['+[_0x170a0a[_0x7578('0x1a')]()]+']',_0x146773[_0x7578('0x20')]);_0x3f9f82(_0x146773);});});};}function searchContact(_0x2c8196,_0x42e28f,_0x5caabe,_0x4c4673){return new Promise(function(_0x4c6ef3,_0x239185){var _0x5b38ad={'method':_0x7578('0xc'),'headers':_0x42e28f,'uri':_0x2c8196+_0x7578('0x21')+_0x4c4673+'&f='+_0x5caabe+_0x7578('0x22'),'json':!![]};rp(_0x5b38ad)['then'](function(_0xf1688e){var _0x359079=_[_0x7578('0x23')](_0xf1688e[_0x7578('0x24')][_0x7578('0x24')],[_0x5caabe,_0x4c4673]);_0x4c6ef3(_0x359079);})['catch'](function(_0x5258d0){_0x239185(_0x5258d0);});});}function getEndUser(_0x17d76d,_0x13cc5a,_0x123cee){return function(_0x24cbcb){return new Promise(function(_0x3685f4,_0x2b40dc){logger['info'](util[_0x7578('0x25')](_0x7578('0x26'),_0x24cbcb[_0x7578('0x27')]));searchContact(_0x123cee,_0x13cc5a,_0x7578('0x28'),_0x24cbcb['contactNumber'])['then'](function(_0x59386a){if(_0x59386a){_0x24cbcb[_0x7578('0x29')]=_0x59386a['id'];logger[_0x7578('0x1e')](_0x7578('0x2a'),_0x24cbcb[_0x7578('0x29')]);return _0x3685f4(_0x24cbcb);}searchContact(_0x123cee,_0x13cc5a,_0x7578('0x2b'),_0x24cbcb['contactNumber'])[_0x7578('0x10')](function(_0x2da829){if(_0x2da829){_0x24cbcb['endUserId']=_0x2da829['id'];logger[_0x7578('0x1e')](_0x7578('0x2c'),_0x24cbcb[_0x7578('0x29')]);return _0x3685f4(_0x24cbcb);}createEndUser(_0x24cbcb,_0x17d76d,_0x13cc5a,_0x123cee)[_0x7578('0x10')](function(_0x14306f){logger['info']('Contact\x20created:',_0x14306f[_0x7578('0x29')]);return _0x3685f4(_0x14306f);});});})[_0x7578('0x18')](function(_0x5f4f6c){_0x2b40dc(_0x5f4f6c);});});};}function createEndUser(_0x2a3aa9,_0x183233,_0x513e5b,_0xeb9ce6){return new Promise(function(_0x9ce59e,_0xc36b4d){var _0xbbaef1=moment();var _0x5330fd={'method':_0x7578('0x2d'),'uri':_0xeb9ce6+_0x7578('0x2e'),'body':{'contact':{'last_name':_0x2a3aa9['contactNumber'],'work_number':_0x2a3aa9['contactNumber'],'mobile_number':_0x2a3aa9[_0x7578('0x27')],'owner_id':_0x2a3aa9['userId'],'created_at':_0xbbaef1[_0x7578('0x25')]('YYYY-MM-DDTHH:mm:ss')}},'json':!![]};_0x5330fd[_0x7578('0xe')]=_0x513e5b;logger[_0x7578('0x1e')](_0x7578('0x2f'));return rp(_0x5330fd)['then'](function(_0x2d3a24){_0x2a3aa9[_0x7578('0x29')]=_0x2d3a24[_0x7578('0x30')]['id'];_0x9ce59e(_0x2a3aa9);})['catch'](function(_0x2790e1){logger[_0x7578('0x19')]('['+[_0x183233[_0x7578('0x1a')]()]+']',_0x2790e1[_0x7578('0x20')]);_0xc36b4d(_0x2790e1[_0x7578('0x20')]);});});}function getTicket(_0x1e364a,_0x22519c,_0x4be625,_0x370db9,_0x458480){return function(_0x9610f8){logger[_0x7578('0x1e')](_0x7578('0x31'));return new Promise(function(_0x3e826b,_0x3649d2){var _0x224770=moment();var _0x48d729={'method':_0x7578('0x2d'),'uri':_0x4be625+'/api/tasks','body':{'title':intUtil[_0x7578('0x32')](_0x370db9[_0x7578('0x33')],_0x458480,'\x20'),'description':intUtil[_0x7578('0x32')](_0x370db9[_0x7578('0x34')],_0x458480,'\x0a'),'owner_id':_0x9610f8[_0x7578('0x1f')],'creater_id':_0x9610f8['adminId'],'targetable_id':_0x9610f8[_0x7578('0x29')],'targetable_type':_0x7578('0x35'),'created_at':_0x224770[_0x7578('0x25')](_0x7578('0x36')),'due_date':_0x224770[_0x7578('0x37')](0x1e,'m')[_0x7578('0x25')](_0x7578('0x36'))},'json':!![]};_0x48d729[_0x7578('0xe')]=_0x22519c;return rp(_0x48d729)[_0x7578('0x10')](function(_0x272ecf){_0x9610f8[_0x7578('0x38')]=_0x272ecf[_0x7578('0x39')]['id'];logger[_0x7578('0x1e')](_0x7578('0x3a'),_0x9610f8[_0x7578('0x38')]);_0x3e826b(_0x9610f8);})[_0x7578('0x18')](function(_0x45cb8d){logger[_0x7578('0x19')]('['+[_0x1e364a[_0x7578('0x1a')]()]+']',_0x45cb8d['message']);_0x3649d2(_0x45cb8d[_0x7578('0x20')]);});});};}function emit(_0x1e73e8,_0x1a7298,_0x25ea00){var _0x328d0b={'uri':_0x1e73e8+'/contacts/'+_0x25ea00};io['to'](util[_0x7578('0x25')](_0x7578('0x3b'),_0x1a7298))[_0x7578('0x3c')](_0x7578('0x3d'),_0x328d0b);}exports['cs']=function(_0x5b1dc5,_0x5ea0ba,_0x4fd1eb,_0x313104,_0x40fd59,_0x29f383,_0x18a067,_0x4d1812){var _0x500ad4={};var _0xa01cf={'Authorization':_0x7578('0x3e')+_0x29f383[_0x7578('0x3f')]};_0x29f383[_0x7578('0x40')]=intUtil[_0x7578('0x41')](_0x29f383[_0x7578('0x40')]);_0x29f383['serverUrl']=intUtil[_0x7578('0x41')](_0x29f383['serverUrl']);var _0x37b0e9=_0x29f383[_0x7578('0x40')];_0x500ad4[_0x7578('0x14')]=_0x29f383[_0x7578('0x42')];_0x500ad4[_0x7578('0x27')]=_0x4d1812['toLowerCase']()==='outbound'?_0x5ea0ba['destcalleridnum']:_0x5ea0ba[_0x7578('0x43')];_0x500ad4[_0x7578('0x44')]=_0x4d1812===_0x7578('0x45')||_0x4d1812===_0x7578('0x46')?'queue':'outbound';if(_0x313104){_0x500ad4[_0x7578('0x1c')]=_0x313104[_0x7578('0x13')];}var _0x1031c4=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x29f383[_0x7578('0x47')],_0x5ea0ba[_0x7578('0x48')],md5(_0x5ea0ba[_0x7578('0x48')]));if(_0x40fd59&&_0x40fd59['monitor_format']){logger['info'](_0x7578('0x49'),_0x7578('0x4a'));_0x5ea0ba[_0x7578('0x4b')]=_0x1031c4;}else if(_0x18a067&&_0x18a067[_0x7578('0x4c')]&&_0x18a067['recordingFormat']!==_0x7578('0x4d')){logger[_0x7578('0x1e')](_0x7578('0x4e'),'Recording\x20is\x20enabled!');_0x5ea0ba['recordingURL']=_0x1031c4;}else{_0x5ea0ba[_0x7578('0x4b')]='';}return getAdminId(_0x500ad4,_0x4d1812,_0xa01cf,_0x37b0e9)[_0x7578('0x10')](getUser(_0x4d1812,_0xa01cf,_0x37b0e9))['then'](getEndUser(_0x4d1812,_0xa01cf,_0x37b0e9))[_0x7578('0x10')](getTicket(_0x4d1812,_0xa01cf,_0x37b0e9,_0x4fd1eb,_0x5ea0ba))[_0x7578('0x10')](function(_0x21a433){logger[_0x7578('0x1e')](util[_0x7578('0x25')](_0x7578('0x4f'),_0x21a433[_0x7578('0x38')]));if(_0x4d1812!==_0x7578('0x46')){logger[_0x7578('0x1e')]('['+[_0x4d1812[_0x7578('0x1a')]()]+']',_0x7578('0x50'));emit(_0x37b0e9,_0x313104['name'],_0x21a433[_0x7578('0x29')]);}})[_0x7578('0x18')](function(_0x1ad51d){logger['error']('['+[_0x4d1812['toUpperCase']()]+']\x20Error\x20running\x20Freshsales\x20integration',util[_0x7578('0x51')](_0x1ad51d,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
index 73227dd..80c143c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5620=['util','./zendesk','./salesforce','./sugarcrm','./freshdesk','./zoho','./desk','./vtiger','./servicenow','./dynamics365','./freshsales','zendesk','salesforce','sugarcrm','zoho','desk','vtiger','dynamics365','servicenow','exec','includes','data1','toLowerCase','find','queue','routeId','log','EVENT\x20UNKNOWN','unmanaged','freshdesk','freshsales','../../../../config/logger','error','[EXEC]','format','%s\x20configuration\x20#%s\x20not\x20found','data3','%s\x20account\x20#%s\x20not\x20found','lodash'];(function(_0x2acd35,_0x2b21df){var _0x272693=function(_0x118994){while(--_0x118994){_0x2acd35['push'](_0x2acd35['shift']());}};_0x272693(++_0x2b21df);}(_0x5620,0xe9));var _0x0562=function(_0xf738ad,_0x5e1d7f){_0xf738ad=_0xf738ad-0x0;var _0x598570=_0x5620[_0xf738ad];return _0x598570;};'use strict';var _=require(_0x0562('0x0'));var util=require(_0x0562('0x1'));var zendesk=require(_0x0562('0x2'));var salesforce=require(_0x0562('0x3'));var sugarcrm=require(_0x0562('0x4'));var freshdesk=require(_0x0562('0x5'));var zoho=require(_0x0562('0x6'));var desk=require(_0x0562('0x7'));var vtiger=require(_0x0562('0x8'));var servicenow=require(_0x0562('0x9'));var dynamics365=require(_0x0562('0xa'));var freshsales=require(_0x0562('0xb'));var integrations=[_0x0562('0xc'),_0x0562('0xd'),_0x0562('0xe'),'freshdesk',_0x0562('0xf'),_0x0562('0x10'),_0x0562('0x11'),_0x0562('0x12'),'freshsales',_0x0562('0x13')];exports[_0x0562('0x14')]=function(_0x30f58c,_0x314bcc,_0x14119c,_0x562aed,_0x1fcb59,_0x2c71ca){if(_0x14119c){if(_[_0x0562('0x15')](integrations,_0x30f58c[_0x0562('0x16')][_0x0562('0x17')]())){try{var _0x38c954=null;var _0x4f7b6c='';var _0x539a1b=_0x14119c[_0x30f58c[_0x0562('0x16')][_0x0562('0x17')]()];if(_0x539a1b){var _0x18bad2=_0x539a1b[_0x30f58c['data2']];if(_0x18bad2){var _0x4b5879=_[_0x0562('0x18')](_0x18bad2['Configurations'],{'id':parseInt(_0x30f58c['data3'],0xa)});if(_0x4b5879){if(_0x562aed){if(_0x1fcb59&&_0x314bcc[_0x0562('0x19')]){_0x4f7b6c=_0x0562('0x19');}else if(_0x314bcc[_0x0562('0x1a')]){_0x4f7b6c='outbound';}else{console[_0x0562('0x1b')](_0x0562('0x1c'),_0x314bcc);}}else{_0x4f7b6c=_0x0562('0x1d');}switch(_0x30f58c[_0x0562('0x16')][_0x0562('0x17')]()){case _0x0562('0xc'):zendesk[_0x4f7b6c](_0x30f58c,_0x314bcc,_0x4b5879,_0x562aed,_0x1fcb59,_0x18bad2,_0x2c71ca);break;case _0x0562('0xd'):salesforce[_0x4f7b6c](_0x30f58c,_0x314bcc,_0x4b5879,_0x562aed,_0x1fcb59,_0x18bad2,_0x2c71ca);break;case'sugarcrm':sugarcrm[_0x4f7b6c](_0x30f58c,_0x314bcc,_0x4b5879,_0x562aed,_0x1fcb59,_0x18bad2,_0x2c71ca);break;case _0x0562('0x1e'):freshdesk[_0x4f7b6c](_0x30f58c,_0x314bcc,_0x4b5879,_0x562aed,_0x1fcb59,_0x18bad2,_0x2c71ca);break;case'zoho':zoho[_0x4f7b6c](_0x30f58c,_0x314bcc,_0x4b5879,_0x562aed,_0x1fcb59,_0x18bad2,_0x2c71ca);break;case _0x0562('0x10'):desk[_0x4f7b6c](_0x30f58c,_0x314bcc,_0x4b5879,_0x562aed,_0x1fcb59,_0x18bad2,_0x2c71ca);break;case _0x0562('0x11'):vtiger[_0x4f7b6c](_0x30f58c,_0x314bcc,_0x4b5879,_0x562aed,_0x1fcb59,_0x18bad2,_0x2c71ca);break;case _0x0562('0x1f'):freshsales['cs'](_0x30f58c,_0x314bcc,_0x4b5879,_0x562aed,_0x1fcb59,_0x18bad2,_0x2c71ca,_0x4f7b6c);break;case _0x0562('0x13'):servicenow['cs'](_0x30f58c,_0x314bcc,_0x4b5879,_0x562aed,_0x1fcb59,_0x18bad2,_0x2c71ca,_0x4f7b6c);break;case _0x0562('0x12'):dynamics365['cs'](_0x30f58c,_0x314bcc,_0x4b5879,_0x562aed,_0x1fcb59,_0x18bad2,_0x2c71ca,_0x4f7b6c);break;default:console[_0x0562('0x1b')]('unknown\x20integration');}}else{_0x38c954=require(_0x0562('0x20'))(_0x30f58c['data1'][_0x0562('0x17')]());_0x38c954[_0x0562('0x21')](_0x0562('0x22'),util[_0x0562('0x23')](_0x0562('0x24'),_0x30f58c['data1']['toLowerCase'](),_0x30f58c[_0x0562('0x25')]));}}else{_0x38c954=require(_0x0562('0x20'))(_0x30f58c[_0x0562('0x16')][_0x0562('0x17')]());_0x38c954[_0x0562('0x21')]('[EXEC]',util['format'](_0x0562('0x26'),_0x30f58c[_0x0562('0x16')]['toLowerCase'](),_0x30f58c['data2']));}}else{}}catch(_0x345086){console[_0x0562('0x21')](_0x345086);}}}};
\ No newline at end of file
+var _0x2ea0=['./servicenow','./dynamics365','./freshsales','zendesk','sugarcrm','freshdesk','zoho','desk','vtiger','dynamics365','freshsales','servicenow','includes','data1','toLowerCase','data2','find','Configurations','data3','queue','routeId','salesforce','log','error','[EXEC]','format','lodash','util','./zendesk','./salesforce','./freshdesk','./zoho','./desk','./vtiger'];(function(_0x4e1d03,_0x786f3a){var _0x362d4b=function(_0x1924d2){while(--_0x1924d2){_0x4e1d03['push'](_0x4e1d03['shift']());}};_0x362d4b(++_0x786f3a);}(_0x2ea0,0x80));var _0x02ea=function(_0x3e8de2,_0x468431){_0x3e8de2=_0x3e8de2-0x0;var _0x56b736=_0x2ea0[_0x3e8de2];return _0x56b736;};'use strict';var _=require(_0x02ea('0x0'));var util=require(_0x02ea('0x1'));var zendesk=require(_0x02ea('0x2'));var salesforce=require(_0x02ea('0x3'));var sugarcrm=require('./sugarcrm');var freshdesk=require(_0x02ea('0x4'));var zoho=require(_0x02ea('0x5'));var desk=require(_0x02ea('0x6'));var vtiger=require(_0x02ea('0x7'));var servicenow=require(_0x02ea('0x8'));var dynamics365=require(_0x02ea('0x9'));var freshsales=require(_0x02ea('0xa'));var integrations=[_0x02ea('0xb'),'salesforce',_0x02ea('0xc'),_0x02ea('0xd'),_0x02ea('0xe'),_0x02ea('0xf'),_0x02ea('0x10'),_0x02ea('0x11'),_0x02ea('0x12'),_0x02ea('0x13')];exports['exec']=function(_0x2ea1d1,_0x21a469,_0x150bd8,_0x50d116,_0x93ab56,_0x3075ed){if(_0x150bd8){if(_[_0x02ea('0x14')](integrations,_0x2ea1d1['data1']['toLowerCase']())){try{var _0x26a2bc=null;var _0x3cbfbb='';var _0x342d28=_0x150bd8[_0x2ea1d1[_0x02ea('0x15')][_0x02ea('0x16')]()];if(_0x342d28){var _0x1ec5bc=_0x342d28[_0x2ea1d1[_0x02ea('0x17')]];if(_0x1ec5bc){var _0x3775b2=_[_0x02ea('0x18')](_0x1ec5bc[_0x02ea('0x19')],{'id':parseInt(_0x2ea1d1[_0x02ea('0x1a')],0xa)});if(_0x3775b2){if(_0x50d116){if(_0x93ab56&&_0x21a469[_0x02ea('0x1b')]){_0x3cbfbb='queue';}else if(_0x21a469[_0x02ea('0x1c')]){_0x3cbfbb='outbound';}else{console['log']('EVENT\x20UNKNOWN',_0x21a469);}}else{_0x3cbfbb='unmanaged';}switch(_0x2ea1d1[_0x02ea('0x15')][_0x02ea('0x16')]()){case _0x02ea('0xb'):zendesk[_0x3cbfbb](_0x2ea1d1,_0x21a469,_0x3775b2,_0x50d116,_0x93ab56,_0x1ec5bc,_0x3075ed);break;case _0x02ea('0x1d'):salesforce[_0x3cbfbb](_0x2ea1d1,_0x21a469,_0x3775b2,_0x50d116,_0x93ab56,_0x1ec5bc,_0x3075ed);break;case _0x02ea('0xc'):sugarcrm[_0x3cbfbb](_0x2ea1d1,_0x21a469,_0x3775b2,_0x50d116,_0x93ab56,_0x1ec5bc,_0x3075ed);break;case _0x02ea('0xd'):freshdesk[_0x3cbfbb](_0x2ea1d1,_0x21a469,_0x3775b2,_0x50d116,_0x93ab56,_0x1ec5bc,_0x3075ed);break;case _0x02ea('0xe'):zoho[_0x3cbfbb](_0x2ea1d1,_0x21a469,_0x3775b2,_0x50d116,_0x93ab56,_0x1ec5bc,_0x3075ed);break;case _0x02ea('0xf'):desk[_0x3cbfbb](_0x2ea1d1,_0x21a469,_0x3775b2,_0x50d116,_0x93ab56,_0x1ec5bc,_0x3075ed);break;case _0x02ea('0x10'):vtiger[_0x3cbfbb](_0x2ea1d1,_0x21a469,_0x3775b2,_0x50d116,_0x93ab56,_0x1ec5bc,_0x3075ed);break;case _0x02ea('0x12'):freshsales['cs'](_0x2ea1d1,_0x21a469,_0x3775b2,_0x50d116,_0x93ab56,_0x1ec5bc,_0x3075ed,_0x3cbfbb);break;case _0x02ea('0x13'):servicenow['cs'](_0x2ea1d1,_0x21a469,_0x3775b2,_0x50d116,_0x93ab56,_0x1ec5bc,_0x3075ed,_0x3cbfbb);break;case'dynamics365':dynamics365['cs'](_0x2ea1d1,_0x21a469,_0x3775b2,_0x50d116,_0x93ab56,_0x1ec5bc,_0x3075ed,_0x3cbfbb);break;default:console[_0x02ea('0x1e')]('unknown\x20integration');}}else{_0x26a2bc=require('../../../../config/logger')(_0x2ea1d1['data1'][_0x02ea('0x16')]());_0x26a2bc[_0x02ea('0x1f')](_0x02ea('0x20'),util[_0x02ea('0x21')]('%s\x20configuration\x20#%s\x20not\x20found',_0x2ea1d1['data1'][_0x02ea('0x16')](),_0x2ea1d1['data3']));}}else{_0x26a2bc=require('../../../../config/logger')(_0x2ea1d1[_0x02ea('0x15')][_0x02ea('0x16')]());_0x26a2bc['error']('[EXEC]',util[_0x02ea('0x21')]('%s\x20account\x20#%s\x20not\x20found',_0x2ea1d1[_0x02ea('0x15')][_0x02ea('0x16')](),_0x2ea1d1[_0x02ea('0x17')]));}}else{}}catch(_0x31454f){console[_0x02ea('0x1f')](_0x31454f);}}}};
\ No newline at end of file
index 7dd0fd1..cf64f4d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x90d4=['calleridname','calleridnum','Fields','queue','[QUEUE]\x20Ticket\x20%s\x20created','[QUEUE]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','integrationTab','user:%s','trigger:salesforce:display','newTab','%s/%s/e','instanceUrl','error','[QUEUE]\x20Salesforce\x20account\x20type\x20not\x20recognized.','[QUEUE]','outbound','recordingFormat','[OUTBOUND]','destcalleridname','destcalleridnum','[OUTBOUND]\x20Ticket\x20%s\x20created.','[OUTBOUND]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','trigger:browser:url','Salesforce\x20account\x20type\x20not\x20recognized','catch','unmanaged','lastevent','toUpperCase','isNil',']\x20Ticket\x20%s\x20created.','request-promise','moment','bluebird','md5','jsforce','util','../../../../config/environment','../../../../config/logger','redis','localhost','socket.io-emitter','Subjects','getString','Descriptions','ticketType','Task','ActivityDate','IsReminderSet','IsRecurrence','endUserType','contact','WhoId','WhatId','Case','ContactId','account','AccountId','lead','Association\x20between\x20Case\x20and\x20Lead\x20skipped','sobject','create','validateEmail','User','execute','then','find','Email','info','resolve','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','length','additionalSearchLead','Lead','account_contact_lead','additionalSearchAccount','Account','Contact','Name','Phone','attributes','type','toLowerCase','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.','LastName','<unknown>','Caller\x20-\x20%s','Company','No\x20Company','upperFirst','forEach','string','picklist','idField','toString','variable','variableName','Variable','name','password','concat','securityToken','https://login.salesforce.com','clientId','clientSecret','username','Connection\x20established.','stripTrailingSlash','serverUrl','remoteUri','Recording\x20is\x20enabled!','recordingURL','format','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','email'];(function(_0x5bffdb,_0x3383b0){var _0x10a6c6=function(_0x2a463c){while(--_0x2a463c){_0x5bffdb['push'](_0x5bffdb['shift']());}};_0x10a6c6(++_0x3383b0);}(_0x90d4,0x9e));var _0x490d=function(_0xd68077,_0xe8bde3){_0xd68077=_0xd68077-0x0;var _0x43ba11=_0x90d4[_0xd68077];return _0x43ba11;};'use strict';var _=require('lodash');var rp=require(_0x490d('0x0'));var moment=require(_0x490d('0x1'));var BPromise=require(_0x490d('0x2'));var md5=require(_0x490d('0x3'));var jsforce=require(_0x490d('0x4'));var util=require(_0x490d('0x5'));var Redis=require('ioredis');var intUtil=require('./util');var config=require(_0x490d('0x6'));var logger=require(_0x490d('0x7'))('salesforce');config[_0x490d('0x8')]=_['defaults'](config[_0x490d('0x8')],{'host':_0x490d('0x9'),'port':0x18eb});var io=require(_0x490d('0xa'))(new Redis(config[_0x490d('0x8')]));function emit(_0x4ecbc4,_0x29b815,_0x4ba832){io['to'](_0x4ecbc4)['emit'](_0x29b815,_0x4ba832);}function getTicket(_0x2a34be,_0x5bccf3,_0x10d021,_0x54161b,_0x5e1751,_0x33083b,_0x4faa92,_0x21dc35){var _0x12ca84=Object['assign']({},{'OwnerId':_0x5bccf3['id'],'Subject':intUtil['getString'](_0x54161b[_0x490d('0xb')],_0x5e1751,'\x20'),'Description':intUtil[_0x490d('0xc')](_0x54161b[_0x490d('0xd')],_0x5e1751,'\x0a')},getCustomFields(_0x33083b,_0x5e1751));if(_0x10d021){if(_0x54161b[_0x490d('0xe')]===_0x490d('0xf')){_0x12ca84[_0x490d('0x10')]=moment['utc']();_0x12ca84[_0x490d('0x11')]=![];_0x12ca84[_0x490d('0x12')]=![];if(_0x10d021[_0x490d('0x13')]===_0x490d('0x14')||_0x10d021[_0x490d('0x13')]==='lead'){_0x12ca84[_0x490d('0x15')]=_0x10d021['id'];}else if(_0x10d021[_0x490d('0x13')]==='account'){_0x12ca84[_0x490d('0x16')]=_0x10d021['id'];}}else if(_0x54161b[_0x490d('0xe')]===_0x490d('0x17')){if(_0x10d021[_0x490d('0x13')]===_0x490d('0x14')){_0x12ca84[_0x490d('0x18')]=_0x10d021['id'];}else if(_0x10d021['endUserType']===_0x490d('0x19')){_0x12ca84[_0x490d('0x1a')]=_0x10d021['id'];}else if(_0x10d021[_0x490d('0x13')]===_0x490d('0x1b')&&_0x54161b['leadId']){_0x12ca84[_0x54161b['leadId']]=_0x10d021['id'];}else{logger['info'](_0x490d('0x1c'));}}}return _0x4faa92[_0x490d('0x1d')](_0x54161b[_0x490d('0xe')])[_0x490d('0x1e')](_0x12ca84);}function getUser(_0x2a509d,_0x1fb0ea,_0xe0367b){if(!_['isNil'](_0x1fb0ea)&&intUtil[_0x490d('0x1f')](_0x1fb0ea)){var _0x52fcae={'Email':_0x1fb0ea};var _0x22668e={'Id':!![],'Username':!![],'Name':!![],'Email':!![]};return _0xe0367b[_0x490d('0x1d')](_0x490d('0x20'))['find'](_0x52fcae,_0x22668e)[_0x490d('0x21')]()[_0x490d('0x22')](function(_0x346554){if(_0x346554['length']){var _0x53470a=_[_0x490d('0x23')](_0x346554,function(_0x1ba9c9){return _0x1ba9c9[_0x490d('0x24')]===_0x1fb0ea;});if(_0x53470a){logger[_0x490d('0x25')]('Agent\x20%s\x20found.',_0x1fb0ea);return BPromise[_0x490d('0x26')]({'id':_0x53470a['Id'],'name':_0x53470a['Name']});}}else{logger[_0x490d('0x25')]('Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.',_0x1fb0ea);return _0xe0367b[_0x490d('0x27')]()[_0x490d('0x22')](function(_0x43d2af){return BPromise[_0x490d('0x26')]({'id':_0x43d2af[_0x490d('0x28')],'name':_0x43d2af[_0x490d('0x29')]});});}});}else{logger[_0x490d('0x25')](_0x490d('0x2a'),_0x1fb0ea);return _0xe0367b[_0x490d('0x27')]()[_0x490d('0x22')](function(_0x4a28f0){return BPromise[_0x490d('0x26')]({'id':_0x4a28f0[_0x490d('0x28')],'name':_0x4a28f0[_0x490d('0x29')]});});}}function getEndUser(_0x36562e,_0x4fffc3,_0x16d03c,_0x5a3e84,_0x26319c){var _0x2a9545={'$or':{'Phone':_0x5a3e84}};var _0x581958={'Id':!![],'Name':!![],'Phone':!![]};return BPromise[_0x490d('0x26')]()['then'](function(){logger[_0x490d('0x25')](_0x490d('0x2b'),_0x5a3e84,_0x4fffc3[_0x490d('0x2c')]);switch(_0x4fffc3[_0x490d('0x2c')]){case _0x490d('0x2d'):var _0x171e01=_[_0x490d('0x2e')](_0x2a9545);if(_0x4fffc3[_0x490d('0x2f')]){var _0x5280ae={};_0x5280ae[_0x4fffc3['additionalSearchContact']]=_0x5a3e84;_[_0x490d('0x30')](_0x171e01[_0x490d('0x31')],_0x5280ae);}return _0x26319c[_0x490d('0x1d')]('Contact')['find'](_0x171e01,_0x581958)[_0x490d('0x21')]()[_0x490d('0x22')](function(_0x43539f){if(_0x43539f&&_0x43539f[_0x490d('0x32')]){return _0x43539f;}else{var _0x171b6a=_['cloneDeep'](_0x2a9545);if(_0x4fffc3[_0x490d('0x33')]){var _0x2337c7={};_0x2337c7[_0x4fffc3[_0x490d('0x33')]]=_0x5a3e84;_[_0x490d('0x30')](_0x171b6a[_0x490d('0x31')],_0x2337c7);}return _0x26319c[_0x490d('0x1d')](_0x490d('0x34'))[_0x490d('0x23')](_0x171b6a,_0x581958);}});case _0x490d('0x35'):var _0x2ac8e8=_[_0x490d('0x2e')](_0x2a9545);if(_0x4fffc3[_0x490d('0x36')]){var _0x5280ae={};_0x5280ae[_0x4fffc3[_0x490d('0x36')]]=_0x5a3e84;_[_0x490d('0x30')](_0x2ac8e8[_0x490d('0x31')],_0x5280ae);}return _0x26319c[_0x490d('0x1d')](_0x490d('0x37'))[_0x490d('0x23')](_0x2ac8e8,_0x581958)['execute']()[_0x490d('0x22')](function(_0x336673){if(_0x336673&&_0x336673[_0x490d('0x32')]){return _0x336673;}else{var _0x322811=_[_0x490d('0x2e')](_0x2a9545);if(_0x4fffc3[_0x490d('0x2f')]){var _0x5046d2={};_0x5046d2[_0x4fffc3[_0x490d('0x2f')]]=_0x5a3e84;_[_0x490d('0x30')](_0x322811[_0x490d('0x31')],_0x5046d2);}return _0x26319c[_0x490d('0x1d')](_0x490d('0x38'))[_0x490d('0x23')](_0x322811,_0x581958)['then'](function(_0x140839){if(_0x140839&&_0x140839[_0x490d('0x32')]){return _0x140839;}else{var _0x4fe1c5=_[_0x490d('0x2e')](_0x2a9545);if(_0x4fffc3['additionalSearchLead']){var _0x33aaca={};_0x33aaca[_0x4fffc3[_0x490d('0x33')]]=_0x5a3e84;_[_0x490d('0x30')](_0x4fe1c5['$or'],_0x33aaca);}return _0x26319c[_0x490d('0x1d')](_0x490d('0x34'))[_0x490d('0x23')](_0x4fe1c5,_0x581958);}});}});case'contact':var _0x171e01=_[_0x490d('0x2e')](_0x2a9545);if(_0x4fffc3[_0x490d('0x2f')]){var _0x5280ae={};_0x5280ae[_0x4fffc3[_0x490d('0x2f')]]=_0x5a3e84;_[_0x490d('0x30')](_0x171e01[_0x490d('0x31')],_0x5280ae);}return _0x26319c[_0x490d('0x1d')]('Contact')['find'](_0x171e01,_0x581958)[_0x490d('0x21')]();case _0x490d('0x1b'):var _0x247d40=_['cloneDeep'](_0x2a9545);if(_0x4fffc3[_0x490d('0x33')]){var _0x5280ae={};_0x5280ae[_0x4fffc3[_0x490d('0x33')]]=_0x5a3e84;_[_0x490d('0x30')](_0x247d40[_0x490d('0x31')],_0x5280ae);}return _0x26319c[_0x490d('0x1d')](_0x490d('0x34'))[_0x490d('0x23')](_0x247d40,_0x581958);case _0x490d('0x19'):var _0x2ac8e8=_[_0x490d('0x2e')](_0x2a9545);if(_0x4fffc3[_0x490d('0x36')]){var _0x5280ae={};_0x5280ae[_0x4fffc3[_0x490d('0x36')]]=_0x5a3e84;_[_0x490d('0x30')](_0x2ac8e8[_0x490d('0x31')],_0x5280ae);}return _0x26319c[_0x490d('0x1d')]('Account')['find'](_0x2ac8e8,_0x581958);default:return null;}})[_0x490d('0x22')](function(_0x2926db){if(_0x2926db&&_0x2926db[_0x490d('0x32')]){var _0x4ba2e6=_['first'](_0x2926db);if(_0x4ba2e6){return BPromise[_0x490d('0x26')]({'id':_0x4ba2e6['Id'],'name':_0x4ba2e6[_0x490d('0x39')],'phone':_0x4ba2e6[_0x490d('0x3a')],'endUserType':_0x4ba2e6[_0x490d('0x3b')][_0x490d('0x3c')][_0x490d('0x3d')]()});}}})['then'](function(_0x1b8477){if(_0x1b8477){logger['info'](_0x490d('0x3e'),_0x1b8477[_0x490d('0x13')],_0x5a3e84);return BPromise[_0x490d('0x26')](_0x1b8477);}else{logger[_0x490d('0x25')](_0x490d('0x3f'),_0x5a3e84);var _0x4885b2={'Phone':_0x5a3e84};if(_0x4fffc3[_0x490d('0x40')]){if(_0x4fffc3[_0x490d('0x40')]===_0x490d('0x14')){logger['info'](_0x490d('0x41'),_0x5a3e84,_0x4fffc3[_0x490d('0x40')]);_0x4885b2[_0x490d('0x42')]=_0x16d03c!==_0x490d('0x43')?_0x16d03c:util['format'](_0x490d('0x44'),_0x5a3e84);}else if(_0x4fffc3[_0x490d('0x40')]===_0x490d('0x1b')){logger[_0x490d('0x25')](_0x490d('0x41'),_0x5a3e84,_0x4fffc3[_0x490d('0x40')]);_0x4885b2[_0x490d('0x42')]=_0x16d03c!=='<unknown>'?_0x16d03c:util['format'](_0x490d('0x44'),_0x5a3e84);_0x4885b2[_0x490d('0x45')]=_0x490d('0x46');}else if(_0x4fffc3[_0x490d('0x40')]==='account'){logger[_0x490d('0x25')](_0x490d('0x41'),_0x5a3e84,_0x4fffc3[_0x490d('0x40')]);_0x4885b2[_0x490d('0x39')]=_0x16d03c!=='<unknown>'?_0x16d03c:util['format'](_0x490d('0x44'),_0x5a3e84);}else{return null;}}return _0x26319c['sobject'](_[_0x490d('0x47')](_0x4fffc3[_0x490d('0x40')]))[_0x490d('0x1e')](_0x4885b2)[_0x490d('0x22')](function(_0x28f554){return BPromise[_0x490d('0x26')]({'id':_0x28f554['id'],'endUserType':_0x4fffc3[_0x490d('0x40')]});});}});}function getCustomFields(_0x2094fd,_0x3f4146){var _0x585585={};if(_0x2094fd[_0x490d('0x32')]>0x0){_[_0x490d('0x48')](_0x2094fd,function(_0x46148a){if(_['includes']([_0x490d('0x49'),_0x490d('0x4a')],_0x46148a['type'])&&_0x46148a[_0x490d('0x4b')]){_0x585585[_0x46148a['idField']]=_0x46148a['content'][_0x490d('0x4c')]();}else if(_0x46148a[_0x490d('0x3c')]===_0x490d('0x4d')&&_0x46148a[_0x490d('0x4e')]&&_0x46148a[_0x490d('0x4b')]){_0x3f4146[_0x46148a[_0x490d('0x4e')]]&&(_0x585585[_0x46148a[_0x490d('0x4b')]]=_0x3f4146[_0x46148a[_0x490d('0x4e')]][_0x490d('0x4c')]());}else if(_0x46148a['type']==='customVariable'&&_0x46148a['Variable']&&_0x46148a[_0x490d('0x4f')][_0x490d('0x50')]&&_0x46148a[_0x490d('0x4b')]){_0x3f4146[_0x46148a[_0x490d('0x4f')]['name'][_0x490d('0x3d')]()]&&(_0x585585[_0x46148a[_0x490d('0x4b')]]=_0x3f4146[_0x46148a['Variable']['name'][_0x490d('0x3d')]()]['toString']());}});}return _0x585585;}function getConnection(_0x4868e9){var _0x285304=_0x4868e9[_0x490d('0x51')][_0x490d('0x52')](_0x4868e9[_0x490d('0x53')]);var _0x32331a=new jsforce['Connection']({'oauth2':{'loginUrl':_0x4868e9['remoteUri']||_0x490d('0x54'),'clientId':_0x4868e9[_0x490d('0x55')],'clientSecret':_0x4868e9[_0x490d('0x56')]}});return _0x32331a['login'](_0x4868e9[_0x490d('0x57')],_0x285304)[_0x490d('0x22')](function(){logger[_0x490d('0x25')](_0x490d('0x58'));return _0x32331a;});}exports['queue']=function(_0xde49c9,_0x3f74e6,_0x2e3bca,_0x190dcf,_0x5a446c,_0x5835b2){var _0x5e8b4c,_0x212bc6,_0x3bee08,_0xf79ece;_0x5835b2['serverUrl']=intUtil[_0x490d('0x59')](_0x5835b2[_0x490d('0x5a')]);_0x5835b2['remoteUri']=intUtil[_0x490d('0x59')](_0x5835b2[_0x490d('0x5b')]);if(_0x5a446c&&_0x5a446c['monitor_format']){logger[_0x490d('0x25')]('[QUEUE]',_0x490d('0x5c'));_0x3f74e6[_0x490d('0x5d')]=util[_0x490d('0x5e')](_0x490d('0x5f'),_0x5835b2[_0x490d('0x5a')],_0x3f74e6[_0x490d('0x60')],md5(_0x3f74e6[_0x490d('0x60')]));}else{_0x3f74e6[_0x490d('0x5d')]='';}return getConnection(_0x5835b2)[_0x490d('0x22')](function(_0xc2e562){_0xf79ece=_0xc2e562;return getUser(_0x5835b2,_0x190dcf[_0x490d('0x61')],_0xf79ece);})['then'](function(_0x27dd8f){_0x5e8b4c=_0x27dd8f;return getEndUser(_0x5835b2,_0x2e3bca,_0x3f74e6[_0x490d('0x62')],_0x3f74e6[_0x490d('0x63')],_0xf79ece);})[_0x490d('0x22')](function(_0xdb9fea){_0x212bc6=_0xdb9fea;return getTicket(_0x5835b2,_0x5e8b4c,_0x212bc6,_0x2e3bca,_0x3f74e6,_0x2e3bca[_0x490d('0x64')],_0xf79ece,_0x490d('0x65'));})[_0x490d('0x22')](function(_0x15d3f8){_0x3bee08=_0x15d3f8;logger['info'](_0x490d('0x66'),_0x3bee08['id']);logger[_0x490d('0x25')](_0x490d('0x67'),_0x3bee08['id'],_0x190dcf[_0x490d('0x50')],_0x5835b2[_0x490d('0x3c')]);switch(_0x5835b2['type']){case _0x490d('0x68'):emit(util[_0x490d('0x5e')](_0x490d('0x69'),_0x190dcf['name']),_0x490d('0x6a'),{'recordId':_0x3bee08['id']});break;case _0x490d('0x6b'):emit(util[_0x490d('0x5e')]('user:%s',_0x190dcf[_0x490d('0x50')]),'trigger:browser:url',{'uri':util['format'](_0x490d('0x6c'),_0xf79ece[_0x490d('0x6d')],_0x3bee08['id'])});break;default:logger[_0x490d('0x6e')](_0x490d('0x6f'));}})['catch'](function(_0x597785){logger['error'](_0x490d('0x70'),_0x597785);});};exports[_0x490d('0x71')]=function(_0x29eef8,_0x11ab2e,_0x3c7edc,_0x185170,_0x9068ba,_0x4b1e7b,_0x3840d0){var _0x106131,_0x1e300c,_0x3cb6a9,_0x53ad5f;_0x4b1e7b['serverUrl']=intUtil[_0x490d('0x59')](_0x4b1e7b['serverUrl']);_0x4b1e7b[_0x490d('0x5b')]=intUtil[_0x490d('0x59')](_0x4b1e7b[_0x490d('0x5b')]);if(_0x3840d0&&_0x3840d0[_0x490d('0x72')]&&_0x3840d0[_0x490d('0x72')]!=='none'){logger[_0x490d('0x25')](_0x490d('0x73'),'Recording\x20is\x20enabled!');_0x11ab2e[_0x490d('0x5d')]=util[_0x490d('0x5e')](_0x490d('0x5f'),_0x4b1e7b[_0x490d('0x5a')],_0x11ab2e[_0x490d('0x60')],md5(_0x11ab2e[_0x490d('0x60')]));}return getConnection(_0x4b1e7b)[_0x490d('0x22')](function(_0x152311){_0x53ad5f=_0x152311;return getUser(_0x4b1e7b,_0x185170[_0x490d('0x61')],_0x53ad5f);})[_0x490d('0x22')](function(_0x31da49){_0x106131=_0x31da49;return getEndUser(_0x4b1e7b,_0x3c7edc,_0x11ab2e[_0x490d('0x74')],_0x11ab2e[_0x490d('0x75')],_0x53ad5f);})[_0x490d('0x22')](function(_0x4c5cd7){_0x1e300c=_0x4c5cd7;return getTicket(_0x4b1e7b,_0x106131,_0x1e300c,_0x3c7edc,_0x11ab2e,_0x3c7edc[_0x490d('0x64')],_0x53ad5f,_0x490d('0x71'));})[_0x490d('0x22')](function(_0x261cab){_0x3cb6a9=_0x261cab;logger[_0x490d('0x25')](_0x490d('0x76'),_0x3cb6a9['id']);logger[_0x490d('0x25')](_0x490d('0x77'),_0x3cb6a9['id'],_0x185170['name'],_0x4b1e7b[_0x490d('0x3c')]);switch(_0x4b1e7b[_0x490d('0x3c')]){case _0x490d('0x68'):emit(util[_0x490d('0x5e')](_0x490d('0x69'),_0x185170[_0x490d('0x50')]),'trigger:salesforce:display',{'recordId':_0x3cb6a9['id']});break;case _0x490d('0x6b'):emit(util[_0x490d('0x5e')]('user:%s',_0x185170[_0x490d('0x50')]),_0x490d('0x78'),{'uri':util['format'](_0x490d('0x6c'),_0x53ad5f[_0x490d('0x6d')],_0x3cb6a9['id'])});break;default:logger[_0x490d('0x6e')](_0x490d('0x73'),_0x490d('0x79'));}})[_0x490d('0x7a')](function(_0x563375){logger[_0x490d('0x6e')](_0x490d('0x73'),_0x563375);});};exports[_0x490d('0x7b')]=function(_0x1fc9b2,_0x3dfc54,_0x557581,_0x5ed5bd,_0x57b150,_0x206be8){var _0x233c15,_0x2eeb44,_0x84a899,_0x211a6d;_0x206be8[_0x490d('0x5a')]=intUtil[_0x490d('0x59')](_0x206be8[_0x490d('0x5a')]);_0x206be8['remoteUri']=intUtil['stripTrailingSlash'](_0x206be8[_0x490d('0x5b')]);if(_0x57b150&&_0x57b150['monitor_format']){logger[_0x490d('0x25')]('['+_0x3dfc54[_0x490d('0x7c')][_0x490d('0x7d')]()+']',_0x490d('0x5c'));_0x3dfc54[_0x490d('0x5d')]=util[_0x490d('0x5e')](_0x490d('0x5f'),_0x206be8['serverUrl'],_0x3dfc54[_0x490d('0x60')],md5(_0x3dfc54[_0x490d('0x60')]));}else{_0x3dfc54[_0x490d('0x5d')]='';}return getConnection(_0x206be8)[_0x490d('0x22')](function(_0x219d39){_0x211a6d=_0x219d39;if(!_[_0x490d('0x7e')](_0x5ed5bd)){return getUser(_0x206be8,_0x5ed5bd['name'],_0x211a6d);}else{return getUser(_0x206be8,null,_0x211a6d);}})[_0x490d('0x22')](function(_0xb9551f){_0x233c15=_0xb9551f;return getEndUser(_0x206be8,_0x557581,_0x3dfc54[_0x490d('0x62')],_0x3dfc54[_0x490d('0x63')],_0x211a6d);})[_0x490d('0x22')](function(_0x15fbc1){_0x2eeb44=_0x15fbc1;return getTicket(_0x206be8,_0x233c15,_0x2eeb44,_0x557581,_0x3dfc54,_0x557581[_0x490d('0x64')],_0x211a6d);})[_0x490d('0x22')](function(_0x49eaf8){_0x84a899=_0x49eaf8;logger[_0x490d('0x25')]('['+_0x3dfc54[_0x490d('0x7c')][_0x490d('0x7d')]()+_0x490d('0x7f'),_0x84a899['id']);logger[_0x490d('0x25')]('['+_0x3dfc54[_0x490d('0x7c')][_0x490d('0x7d')]()+']\x20Integration\x20account\x20type\x20%s.',_0x206be8[_0x490d('0x3c')]);})[_0x490d('0x7a')](function(_0x520c96){logger[_0x490d('0x6e')]('['+_0x3dfc54[_0x490d('0x7c')][_0x490d('0x7d')]()+']',_0x520c96);});};
\ No newline at end of file
+var _0x2137=['Agent\x20%s\x20found.','resolve','Name','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','contact_lead','additionalSearchContact','$or','Contact','execute','cloneDeep','additionalSearchLead','merge','additionalSearchAccount','Lead','Account','type','toLowerCase','Enduser\x20(%s)\x20with\x20phone\x20%s\x20found','moduleCreate','Enduser\x20with\x20phone\x20%s.\x20Creating\x20method\x20used\x20%s.','LastName','Caller\x20-\x20%s','<unknown>','Company','No\x20Company','format','upperFirst','forEach','includes','string','idField','content','toString','variable','variableName','customVariable','Variable','name','password','securityToken','remoteUri','https://login.salesforce.com','clientId','clientSecret','username','Connection\x20established.','queue','serverUrl','stripTrailingSlash','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','uniqueid','recordingURL','email','calleridname','calleridnum','Fields','[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','error','catch','outbound','recordingFormat','none','[OUTBOUND]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','destcalleridname','destcalleridnum','[OUTBOUND]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','trigger:salesforce:display','instanceUrl','Salesforce\x20account\x20type\x20not\x20recognized','unmanaged','lastevent','toUpperCase',']\x20Ticket\x20%s\x20created.',']\x20Integration\x20account\x20type\x20%s.','lodash','request-promise','md5','util','./util','../../../../config/logger','redis','defaults','localhost','emit','assign','getString','Subjects','Descriptions','Task','ActivityDate','utc','IsReminderSet','IsRecurrence','endUserType','account','WhatId','contact','ContactId','AccountId','lead','leadId','Association\x20between\x20Case\x20and\x20Lead\x20skipped','ticketType','create','isNil','sobject','User','find','then','length','Email','info'];(function(_0x31a576,_0x424419){var _0x30b1d3=function(_0x4710e8){while(--_0x4710e8){_0x31a576['push'](_0x31a576['shift']());}};_0x30b1d3(++_0x424419);}(_0x2137,0x1ca));var _0x7213=function(_0x5e9b8a,_0x15fc70){_0x5e9b8a=_0x5e9b8a-0x0;var _0xffd6d6=_0x2137[_0x5e9b8a];return _0xffd6d6;};'use strict';var _=require(_0x7213('0x0'));var rp=require(_0x7213('0x1'));var moment=require('moment');var BPromise=require('bluebird');var md5=require(_0x7213('0x2'));var jsforce=require('jsforce');var util=require(_0x7213('0x3'));var Redis=require('ioredis');var intUtil=require(_0x7213('0x4'));var config=require('../../../../config/environment');var logger=require(_0x7213('0x5'))('salesforce');config[_0x7213('0x6')]=_[_0x7213('0x7')](config[_0x7213('0x6')],{'host':_0x7213('0x8'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function emit(_0x31c565,_0x206685,_0x13202f){io['to'](_0x31c565)[_0x7213('0x9')](_0x206685,_0x13202f);}function getTicket(_0x1e01dc,_0x201d24,_0xf8bc8b,_0xdf307a,_0x2a5dde,_0x32392a,_0x42e26d,_0x30fcbf){var _0x4f3b4e=Object[_0x7213('0xa')]({},{'OwnerId':_0x201d24['id'],'Subject':intUtil[_0x7213('0xb')](_0xdf307a[_0x7213('0xc')],_0x2a5dde,'\x20'),'Description':intUtil[_0x7213('0xb')](_0xdf307a[_0x7213('0xd')],_0x2a5dde,'\x0a')},getCustomFields(_0x32392a,_0x2a5dde));if(_0xf8bc8b){if(_0xdf307a['ticketType']===_0x7213('0xe')){_0x4f3b4e[_0x7213('0xf')]=moment[_0x7213('0x10')]();_0x4f3b4e[_0x7213('0x11')]=![];_0x4f3b4e[_0x7213('0x12')]=![];if(_0xf8bc8b[_0x7213('0x13')]==='contact'||_0xf8bc8b[_0x7213('0x13')]==='lead'){_0x4f3b4e['WhoId']=_0xf8bc8b['id'];}else if(_0xf8bc8b[_0x7213('0x13')]===_0x7213('0x14')){_0x4f3b4e[_0x7213('0x15')]=_0xf8bc8b['id'];}}else if(_0xdf307a['ticketType']==='Case'){if(_0xf8bc8b[_0x7213('0x13')]===_0x7213('0x16')){_0x4f3b4e[_0x7213('0x17')]=_0xf8bc8b['id'];}else if(_0xf8bc8b[_0x7213('0x13')]===_0x7213('0x14')){_0x4f3b4e[_0x7213('0x18')]=_0xf8bc8b['id'];}else if(_0xf8bc8b[_0x7213('0x13')]===_0x7213('0x19')&&_0xdf307a[_0x7213('0x1a')]){_0x4f3b4e[_0xdf307a[_0x7213('0x1a')]]=_0xf8bc8b['id'];}else{logger['info'](_0x7213('0x1b'));}}}return _0x42e26d['sobject'](_0xdf307a[_0x7213('0x1c')])[_0x7213('0x1d')](_0x4f3b4e);}function getUser(_0x189757,_0x5a9ae6,_0x2fde4c){if(!_[_0x7213('0x1e')](_0x5a9ae6)&&intUtil['validateEmail'](_0x5a9ae6)){var _0x302ed7={'Email':_0x5a9ae6};var _0x59632b={'Id':!![],'Username':!![],'Name':!![],'Email':!![]};return _0x2fde4c[_0x7213('0x1f')](_0x7213('0x20'))[_0x7213('0x21')](_0x302ed7,_0x59632b)['execute']()[_0x7213('0x22')](function(_0x128eb1){if(_0x128eb1[_0x7213('0x23')]){var _0x15d70d=_[_0x7213('0x21')](_0x128eb1,function(_0x24e651){return _0x24e651[_0x7213('0x24')]===_0x5a9ae6;});if(_0x15d70d){logger[_0x7213('0x25')](_0x7213('0x26'),_0x5a9ae6);return BPromise[_0x7213('0x27')]({'id':_0x15d70d['Id'],'name':_0x15d70d[_0x7213('0x28')]});}}else{logger['info'](_0x7213('0x29'),_0x5a9ae6);return _0x2fde4c[_0x7213('0x2a')]()[_0x7213('0x22')](function(_0x2e9e8a){return BPromise[_0x7213('0x27')]({'id':_0x2e9e8a[_0x7213('0x2b')],'name':_0x2e9e8a[_0x7213('0x2c')]});});}});}else{logger[_0x7213('0x25')]('Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.',_0x5a9ae6);return _0x2fde4c[_0x7213('0x2a')]()[_0x7213('0x22')](function(_0x542be7){return BPromise[_0x7213('0x27')]({'id':_0x542be7[_0x7213('0x2b')],'name':_0x542be7[_0x7213('0x2c')]});});}}function getEndUser(_0x1fc0d6,_0x4840a5,_0x49208a,_0x909eb3,_0x3973c2){var _0x414c79={'$or':{'Phone':_0x909eb3}};var _0x91d05c={'Id':!![],'Name':!![],'Phone':!![]};return BPromise[_0x7213('0x27')]()['then'](function(){logger[_0x7213('0x25')](_0x7213('0x2d'),_0x909eb3,_0x4840a5[_0x7213('0x2e')]);switch(_0x4840a5[_0x7213('0x2e')]){case _0x7213('0x2f'):var _0x5c48ad=_['cloneDeep'](_0x414c79);if(_0x4840a5[_0x7213('0x30')]){var _0x485a23={};_0x485a23[_0x4840a5[_0x7213('0x30')]]=_0x909eb3;_['merge'](_0x5c48ad[_0x7213('0x31')],_0x485a23);}return _0x3973c2[_0x7213('0x1f')](_0x7213('0x32'))['find'](_0x5c48ad,_0x91d05c)[_0x7213('0x33')]()[_0x7213('0x22')](function(_0x12e9eb){if(_0x12e9eb&&_0x12e9eb[_0x7213('0x23')]){return _0x12e9eb;}else{var _0x1e505a=_[_0x7213('0x34')](_0x414c79);if(_0x4840a5[_0x7213('0x35')]){var _0x129975={};_0x129975[_0x4840a5[_0x7213('0x35')]]=_0x909eb3;_[_0x7213('0x36')](_0x1e505a['$or'],_0x129975);}return _0x3973c2[_0x7213('0x1f')]('Lead')[_0x7213('0x21')](_0x1e505a,_0x91d05c);}});case'account_contact_lead':var _0x46baaf=_[_0x7213('0x34')](_0x414c79);if(_0x4840a5[_0x7213('0x37')]){var _0x485a23={};_0x485a23[_0x4840a5['additionalSearchAccount']]=_0x909eb3;_['merge'](_0x46baaf[_0x7213('0x31')],_0x485a23);}return _0x3973c2[_0x7213('0x1f')]('Account')[_0x7213('0x21')](_0x46baaf,_0x91d05c)[_0x7213('0x33')]()[_0x7213('0x22')](function(_0x255311){if(_0x255311&&_0x255311[_0x7213('0x23')]){return _0x255311;}else{var _0x1fe935=_[_0x7213('0x34')](_0x414c79);if(_0x4840a5[_0x7213('0x30')]){var _0x122187={};_0x122187[_0x4840a5[_0x7213('0x30')]]=_0x909eb3;_[_0x7213('0x36')](_0x1fe935[_0x7213('0x31')],_0x122187);}return _0x3973c2[_0x7213('0x1f')](_0x7213('0x32'))[_0x7213('0x21')](_0x1fe935,_0x91d05c)[_0x7213('0x22')](function(_0x55e897){if(_0x55e897&&_0x55e897['length']){return _0x55e897;}else{var _0x3b4106=_['cloneDeep'](_0x414c79);if(_0x4840a5[_0x7213('0x35')]){var _0x33caed={};_0x33caed[_0x4840a5[_0x7213('0x35')]]=_0x909eb3;_['merge'](_0x3b4106[_0x7213('0x31')],_0x33caed);}return _0x3973c2[_0x7213('0x1f')]('Lead')[_0x7213('0x21')](_0x3b4106,_0x91d05c);}});}});case _0x7213('0x16'):var _0x5c48ad=_['cloneDeep'](_0x414c79);if(_0x4840a5[_0x7213('0x30')]){var _0x485a23={};_0x485a23[_0x4840a5[_0x7213('0x30')]]=_0x909eb3;_['merge'](_0x5c48ad['$or'],_0x485a23);}return _0x3973c2[_0x7213('0x1f')](_0x7213('0x32'))[_0x7213('0x21')](_0x5c48ad,_0x91d05c)[_0x7213('0x33')]();case _0x7213('0x19'):var _0x2f548e=_[_0x7213('0x34')](_0x414c79);if(_0x4840a5[_0x7213('0x35')]){var _0x485a23={};_0x485a23[_0x4840a5['additionalSearchLead']]=_0x909eb3;_[_0x7213('0x36')](_0x2f548e[_0x7213('0x31')],_0x485a23);}return _0x3973c2['sobject'](_0x7213('0x38'))[_0x7213('0x21')](_0x2f548e,_0x91d05c);case _0x7213('0x14'):var _0x46baaf=_['cloneDeep'](_0x414c79);if(_0x4840a5[_0x7213('0x37')]){var _0x485a23={};_0x485a23[_0x4840a5['additionalSearchAccount']]=_0x909eb3;_[_0x7213('0x36')](_0x46baaf[_0x7213('0x31')],_0x485a23);}return _0x3973c2[_0x7213('0x1f')](_0x7213('0x39'))['find'](_0x46baaf,_0x91d05c);default:return null;}})[_0x7213('0x22')](function(_0x5eac9e){if(_0x5eac9e&&_0x5eac9e['length']){var _0x194b3d=_['first'](_0x5eac9e);if(_0x194b3d){return BPromise[_0x7213('0x27')]({'id':_0x194b3d['Id'],'name':_0x194b3d[_0x7213('0x28')],'phone':_0x194b3d['Phone'],'endUserType':_0x194b3d['attributes'][_0x7213('0x3a')][_0x7213('0x3b')]()});}}})[_0x7213('0x22')](function(_0x305336){if(_0x305336){logger[_0x7213('0x25')](_0x7213('0x3c'),_0x305336['endUserType'],_0x909eb3);return BPromise[_0x7213('0x27')](_0x305336);}else{logger[_0x7213('0x25')]('Enduser\x20with\x20phone\x20%s\x20not\x20found',_0x909eb3);var _0x552899={'Phone':_0x909eb3};if(_0x4840a5['moduleCreate']){if(_0x4840a5[_0x7213('0x3d')]===_0x7213('0x16')){logger[_0x7213('0x25')](_0x7213('0x3e'),_0x909eb3,_0x4840a5['moduleCreate']);_0x552899[_0x7213('0x3f')]=_0x49208a!=='<unknown>'?_0x49208a:util['format'](_0x7213('0x40'),_0x909eb3);}else if(_0x4840a5[_0x7213('0x3d')]===_0x7213('0x19')){logger[_0x7213('0x25')](_0x7213('0x3e'),_0x909eb3,_0x4840a5[_0x7213('0x3d')]);_0x552899['LastName']=_0x49208a!==_0x7213('0x41')?_0x49208a:util['format'](_0x7213('0x40'),_0x909eb3);_0x552899[_0x7213('0x42')]=_0x7213('0x43');}else if(_0x4840a5[_0x7213('0x3d')]==='account'){logger['info'](_0x7213('0x3e'),_0x909eb3,_0x4840a5[_0x7213('0x3d')]);_0x552899[_0x7213('0x28')]=_0x49208a!==_0x7213('0x41')?_0x49208a:util[_0x7213('0x44')](_0x7213('0x40'),_0x909eb3);}else{return null;}}return _0x3973c2[_0x7213('0x1f')](_[_0x7213('0x45')](_0x4840a5[_0x7213('0x3d')]))[_0x7213('0x1d')](_0x552899)[_0x7213('0x22')](function(_0x463a41){return BPromise[_0x7213('0x27')]({'id':_0x463a41['id'],'endUserType':_0x4840a5[_0x7213('0x3d')]});});}});}function getCustomFields(_0x2df90d,_0x545e41){var _0x5ee271={};if(_0x2df90d[_0x7213('0x23')]>0x0){_[_0x7213('0x46')](_0x2df90d,function(_0x3e8a37){if(_[_0x7213('0x47')]([_0x7213('0x48'),'picklist'],_0x3e8a37['type'])&&_0x3e8a37['idField']){_0x5ee271[_0x3e8a37[_0x7213('0x49')]]=_0x3e8a37[_0x7213('0x4a')][_0x7213('0x4b')]();}else if(_0x3e8a37[_0x7213('0x3a')]===_0x7213('0x4c')&&_0x3e8a37['variableName']&&_0x3e8a37[_0x7213('0x49')]){_0x545e41[_0x3e8a37[_0x7213('0x4d')]]&&(_0x5ee271[_0x3e8a37['idField']]=_0x545e41[_0x3e8a37[_0x7213('0x4d')]][_0x7213('0x4b')]());}else if(_0x3e8a37[_0x7213('0x3a')]===_0x7213('0x4e')&&_0x3e8a37[_0x7213('0x4f')]&&_0x3e8a37['Variable'][_0x7213('0x50')]&&_0x3e8a37[_0x7213('0x49')]){_0x545e41[_0x3e8a37[_0x7213('0x4f')][_0x7213('0x50')][_0x7213('0x3b')]()]&&(_0x5ee271[_0x3e8a37[_0x7213('0x49')]]=_0x545e41[_0x3e8a37[_0x7213('0x4f')][_0x7213('0x50')][_0x7213('0x3b')]()][_0x7213('0x4b')]());}});}return _0x5ee271;}function getConnection(_0x2d27eb){var _0x4ac73f=_0x2d27eb[_0x7213('0x51')]['concat'](_0x2d27eb[_0x7213('0x52')]);var _0x1efe4d=new jsforce['Connection']({'oauth2':{'loginUrl':_0x2d27eb[_0x7213('0x53')]||_0x7213('0x54'),'clientId':_0x2d27eb[_0x7213('0x55')],'clientSecret':_0x2d27eb[_0x7213('0x56')]}});return _0x1efe4d['login'](_0x2d27eb[_0x7213('0x57')],_0x4ac73f)['then'](function(){logger[_0x7213('0x25')](_0x7213('0x58'));return _0x1efe4d;});}exports[_0x7213('0x59')]=function(_0xed5f72,_0xa7af29,_0x22d7bd,_0x2653cb,_0x40a2c7,_0x966429){var _0x4d3ced,_0x6d13e7,_0x19bad4,_0x682dd1;_0x966429[_0x7213('0x5a')]=intUtil[_0x7213('0x5b')](_0x966429[_0x7213('0x5a')]);_0x966429[_0x7213('0x53')]=intUtil[_0x7213('0x5b')](_0x966429[_0x7213('0x53')]);if(_0x40a2c7&&_0x40a2c7[_0x7213('0x5c')]){logger['info'](_0x7213('0x5d'),_0x7213('0x5e'));_0xa7af29['recordingURL']=util[_0x7213('0x44')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x966429['serverUrl'],_0xa7af29[_0x7213('0x5f')],md5(_0xa7af29[_0x7213('0x5f')]));}else{_0xa7af29[_0x7213('0x60')]='';}return getConnection(_0x966429)[_0x7213('0x22')](function(_0x46be0b){_0x682dd1=_0x46be0b;return getUser(_0x966429,_0x2653cb[_0x7213('0x61')],_0x682dd1);})[_0x7213('0x22')](function(_0x3d4abc){_0x4d3ced=_0x3d4abc;return getEndUser(_0x966429,_0x22d7bd,_0xa7af29[_0x7213('0x62')],_0xa7af29[_0x7213('0x63')],_0x682dd1);})[_0x7213('0x22')](function(_0x2eab87){_0x6d13e7=_0x2eab87;return getTicket(_0x966429,_0x4d3ced,_0x6d13e7,_0x22d7bd,_0xa7af29,_0x22d7bd[_0x7213('0x64')],_0x682dd1,_0x7213('0x59'));})[_0x7213('0x22')](function(_0x2a75fb){_0x19bad4=_0x2a75fb;logger['info'](_0x7213('0x65'),_0x19bad4['id']);logger[_0x7213('0x25')](_0x7213('0x66'),_0x19bad4['id'],_0x2653cb[_0x7213('0x50')],_0x966429['type']);switch(_0x966429['type']){case'integrationTab':emit(util['format'](_0x7213('0x67'),_0x2653cb[_0x7213('0x50')]),'trigger:salesforce:display',{'recordId':_0x19bad4['id']});break;case _0x7213('0x68'):emit(util['format'](_0x7213('0x67'),_0x2653cb[_0x7213('0x50')]),_0x7213('0x69'),{'uri':util[_0x7213('0x44')]('%s/%s/e',_0x682dd1['instanceUrl'],_0x19bad4['id'])});break;default:logger[_0x7213('0x6a')]('[QUEUE]\x20Salesforce\x20account\x20type\x20not\x20recognized.');}})[_0x7213('0x6b')](function(_0x243f0e){logger[_0x7213('0x6a')]('[QUEUE]',_0x243f0e);});};exports[_0x7213('0x6c')]=function(_0xcfe95a,_0x57e12a,_0xe9130c,_0x208900,_0x5d4ec9,_0x6a628d,_0x1057c4){var _0x1ccb86,_0x13cc11,_0x319fd1,_0x4ef9b3;_0x6a628d[_0x7213('0x5a')]=intUtil[_0x7213('0x5b')](_0x6a628d[_0x7213('0x5a')]);_0x6a628d[_0x7213('0x53')]=intUtil[_0x7213('0x5b')](_0x6a628d['remoteUri']);if(_0x1057c4&&_0x1057c4[_0x7213('0x6d')]&&_0x1057c4['recordingFormat']!==_0x7213('0x6e')){logger[_0x7213('0x25')](_0x7213('0x6f'),_0x7213('0x5e'));_0x57e12a[_0x7213('0x60')]=util[_0x7213('0x44')](_0x7213('0x70'),_0x6a628d[_0x7213('0x5a')],_0x57e12a[_0x7213('0x5f')],md5(_0x57e12a[_0x7213('0x5f')]));}return getConnection(_0x6a628d)[_0x7213('0x22')](function(_0x676b5f){_0x4ef9b3=_0x676b5f;return getUser(_0x6a628d,_0x208900[_0x7213('0x61')],_0x4ef9b3);})['then'](function(_0x15d14b){_0x1ccb86=_0x15d14b;return getEndUser(_0x6a628d,_0xe9130c,_0x57e12a[_0x7213('0x71')],_0x57e12a[_0x7213('0x72')],_0x4ef9b3);})['then'](function(_0x32f2b1){_0x13cc11=_0x32f2b1;return getTicket(_0x6a628d,_0x1ccb86,_0x13cc11,_0xe9130c,_0x57e12a,_0xe9130c['Fields'],_0x4ef9b3,_0x7213('0x6c'));})[_0x7213('0x22')](function(_0x4b19ff){_0x319fd1=_0x4b19ff;logger[_0x7213('0x25')]('[OUTBOUND]\x20Ticket\x20%s\x20created.',_0x319fd1['id']);logger[_0x7213('0x25')](_0x7213('0x73'),_0x319fd1['id'],_0x208900['name'],_0x6a628d[_0x7213('0x3a')]);switch(_0x6a628d[_0x7213('0x3a')]){case'integrationTab':emit(util[_0x7213('0x44')](_0x7213('0x67'),_0x208900[_0x7213('0x50')]),_0x7213('0x74'),{'recordId':_0x319fd1['id']});break;case _0x7213('0x68'):emit(util[_0x7213('0x44')](_0x7213('0x67'),_0x208900[_0x7213('0x50')]),_0x7213('0x69'),{'uri':util[_0x7213('0x44')]('%s/%s/e',_0x4ef9b3[_0x7213('0x75')],_0x319fd1['id'])});break;default:logger['error']('[OUTBOUND]',_0x7213('0x76'));}})[_0x7213('0x6b')](function(_0x1102f3){logger[_0x7213('0x6a')](_0x7213('0x6f'),_0x1102f3);});};exports[_0x7213('0x77')]=function(_0x4446e9,_0x3a1a95,_0x474c6c,_0x22a50f,_0xca6d16,_0x37e5ab){var _0x3703a6,_0x10df02,_0x272a64,_0x4d824d;_0x37e5ab[_0x7213('0x5a')]=intUtil[_0x7213('0x5b')](_0x37e5ab['serverUrl']);_0x37e5ab['remoteUri']=intUtil['stripTrailingSlash'](_0x37e5ab[_0x7213('0x53')]);if(_0xca6d16&&_0xca6d16[_0x7213('0x5c')]){logger[_0x7213('0x25')]('['+_0x3a1a95[_0x7213('0x78')][_0x7213('0x79')]()+']',_0x7213('0x5e'));_0x3a1a95[_0x7213('0x60')]=util[_0x7213('0x44')](_0x7213('0x70'),_0x37e5ab[_0x7213('0x5a')],_0x3a1a95['uniqueid'],md5(_0x3a1a95['uniqueid']));}else{_0x3a1a95[_0x7213('0x60')]='';}return getConnection(_0x37e5ab)[_0x7213('0x22')](function(_0x54c11a){_0x4d824d=_0x54c11a;if(!_[_0x7213('0x1e')](_0x22a50f)){return getUser(_0x37e5ab,_0x22a50f['name'],_0x4d824d);}else{return getUser(_0x37e5ab,null,_0x4d824d);}})[_0x7213('0x22')](function(_0x21857a){_0x3703a6=_0x21857a;return getEndUser(_0x37e5ab,_0x474c6c,_0x3a1a95[_0x7213('0x62')],_0x3a1a95[_0x7213('0x63')],_0x4d824d);})['then'](function(_0x488e33){_0x10df02=_0x488e33;return getTicket(_0x37e5ab,_0x3703a6,_0x10df02,_0x474c6c,_0x3a1a95,_0x474c6c[_0x7213('0x64')],_0x4d824d);})[_0x7213('0x22')](function(_0x187bfc){_0x272a64=_0x187bfc;logger[_0x7213('0x25')]('['+_0x3a1a95[_0x7213('0x78')]['toUpperCase']()+_0x7213('0x7a'),_0x272a64['id']);logger[_0x7213('0x25')]('['+_0x3a1a95['lastevent'][_0x7213('0x79')]()+_0x7213('0x7b'),_0x37e5ab[_0x7213('0x3a')]);})[_0x7213('0x6b')](function(_0x19c84a){logger[_0x7213('0x6a')]('['+_0x3a1a95[_0x7213('0x78')]['toUpperCase']()+']',_0x19c84a);});};
\ No newline at end of file
index 19d7eb9..2077eea 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf30a=['%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','recordingFormat','none','The\x20ticket\x20ID\x20is:\x20%s','call\x20direction:\x20%s','Displaying\x20call\x20in\x20a\x20new\x20tab...',']\x20Error\x20running\x20ServiceNow\x20integration','inspect','lodash','bluebird','request-promise','util','md5','./util','../../../../config/environment','redis','defaults','localhost','socket.io-emitter','GET','sys_user?sysparm_query=user_name%3Dadmin','then','result','length','adminId','info','toUpperCase','],\x20getAdminUser\x20crm','catch','error','message','validateEmail','userEmail','sys_user?sysparm_query=email%3D','],\x20getUser\x20rp\x20obj','],\x20getUser\x20entity','active','userId','sys_id','adminEmail','],\x20getUser\x20crm','],\x20createEndUser\x20input\x20crm','POST','sys_user?','endUserNumber','true','System','endUserId','],\x20getEndUser\x20input\x20crm','],\x20getEndUser\x20crm','forEach','includes','picklist','type','nameField','customField','toLowerCase','toString','idField','content','variable','variableName','customVariable','name','Variable',']\x20getTicket\x20input\x20crm','outbound','incident','assign','getString','Descriptions','Fields',']\x20POST\x20incident\x20entity\x20schema','ticketId','number',']\x20getTicket\x20crm','label','?sysparm_query=name%3D','label_entry','Incident\x20-\x20','ticketNumber','push','all',']\x20arrayPromises:\x20IDs\x20in\x20table\x20label','Tags','map','%26sysparm_record_target%3Dincident','%26sysparm_record_row%3D1%26sysparm_record_rows%3D39','%255EORDERBYDESCnumber','/nav_to.do?uri=incident.do?sys_id%3D','format','user:%s','emit','username','password','sysparm_limit=1','sysparm_display_value=true','serverUrl','%s/api/now/table/','remoteUri','isNil','email','destcalleridnum','callDirection','unmanaged','queue'];(function(_0x22a972,_0x52aab7){var _0x325406=function(_0x170993){while(--_0x170993){_0x22a972['push'](_0x22a972['shift']());}};_0x325406(++_0x52aab7);}(_0xf30a,0x1c9));var _0xaf30=function(_0x3d4746,_0x23af49){_0x3d4746=_0x3d4746-0x0;var _0x3caee3=_0xf30a[_0x3d4746];return _0x3caee3;};'use strict';var _=require(_0xaf30('0x0'));var Promise=require(_0xaf30('0x1'));var rp=require(_0xaf30('0x2'));var util=require(_0xaf30('0x3'));var md5=require(_0xaf30('0x4'));var Redis=require('ioredis');var intUtil=require(_0xaf30('0x5'));var config=require(_0xaf30('0x6'));var logger=require('../../../../config/logger')('servicenow');config[_0xaf30('0x7')]=_[_0xaf30('0x8')](config[_0xaf30('0x7')],{'host':_0xaf30('0x9'),'port':0x18eb});var io=require(_0xaf30('0xa'))(new Redis(config[_0xaf30('0x7')]));function getAdminUser(_0x4b7b4a,_0x53660d,_0x3557be,_0x7959f9,_0x3bde69,_0x5a65c6){return new Promise(function(_0x5e74bf,_0x4aef19){var _0x2e46ac={'method':_0xaf30('0xb'),'uri':_0x7959f9+_0xaf30('0xc')+'&'+_0x3bde69+'&'+_0x5a65c6,'auth':_0x53660d,'json':!![]};return rp(_0x2e46ac)[_0xaf30('0xd')](function(_0xded333){if(_0xded333[_0xaf30('0xe')][_0xaf30('0xf')]>0x0){_0x3557be[_0xaf30('0x10')]=_0xded333[_0xaf30('0xe')][0x0]['sys_id'];}logger[_0xaf30('0x11')]('['+[_0x4b7b4a[_0xaf30('0x12')]()]+_0xaf30('0x13'),_0x3557be);_0x5e74bf(_0x3557be);})[_0xaf30('0x14')](function(_0x50c843){logger[_0xaf30('0x15')]('['+[_0x4b7b4a[_0xaf30('0x12')]()]+']',_0x50c843[_0xaf30('0x16')]);_0x4aef19(_0x50c843['message']);});});}function getUser(_0x4233db,_0x57fa0a,_0x1269b8,_0x2db83b,_0x508a13){return function(_0x2e6467){logger[_0xaf30('0x11')]('['+[_0x4233db['toUpperCase']()]+'],\x20getUser\x20input\x20crm',_0x2e6467);return new Promise(function(_0x3f783d,_0x18a132){if(intUtil[_0xaf30('0x17')](_0x2e6467[_0xaf30('0x18')])){var _0xf27560={'method':_0xaf30('0xb'),'uri':_0x1269b8+_0xaf30('0x19')+_0x2e6467[_0xaf30('0x18')]+'&'+_0x2db83b+'&'+_0x508a13,'auth':_0x57fa0a,'json':!![]};logger['info']('['+[_0x4233db[_0xaf30('0x12')]()]+_0xaf30('0x1a'),_0xf27560);return rp(_0xf27560)['then'](function(_0x429914){logger[_0xaf30('0x11')]('['+[_0x4233db[_0xaf30('0x12')]()]+_0xaf30('0x1b'),_0x429914);if(_0x429914[_0xaf30('0xe')]['length']>0x0&&String(_0x429914[_0xaf30('0xe')][0x0][_0xaf30('0x1c')])==='true'){_0x2e6467[_0xaf30('0x1d')]=_0x429914[_0xaf30('0xe')][0x0][_0xaf30('0x1e')];}else{_0x2e6467[_0xaf30('0x1d')]=_0x2e6467[_0xaf30('0x10')];_0x2e6467[_0xaf30('0x18')]=_0x2e6467[_0xaf30('0x1f')];}logger[_0xaf30('0x11')]('['+[_0x4233db[_0xaf30('0x12')]()]+_0xaf30('0x20'),_0x2e6467);_0x3f783d(_0x2e6467);})[_0xaf30('0x14')](function(_0x2094cf){logger['error']('['+[_0x4233db['toUpperCase']()]+']',_0x2094cf[_0xaf30('0x16')]);_0x18a132(_0x2094cf[_0xaf30('0x16')]);});}else{logger['info']('['+[_0x4233db[_0xaf30('0x12')]()]+']\x20using\x20admin\x20profile');_0x2e6467[_0xaf30('0x1d')]=_0x2e6467['adminId'];_0x2e6467['userEmail']=_0x2e6467[_0xaf30('0x1f')];_0x3f783d(_0x2e6467);}});};}function createEndUser(_0x12bb9f,_0x463bee,_0x3071bb,_0x47d9ab,_0x30df6c){logger[_0xaf30('0x11')]('['+[_0x12bb9f[_0xaf30('0x12')]()]+_0xaf30('0x21'),_0x3071bb);return new Promise(function(_0x4eb503,_0xc061da){var _0x3dc9db={'method':_0xaf30('0x22'),'uri':_0x47d9ab+_0xaf30('0x23')+_0x30df6c,'body':{'user_name':_0x3071bb[_0xaf30('0x24')],'roles':'user','first_name':_0x3071bb[_0xaf30('0x24')],'active':_0xaf30('0x25'),'date_format':_0xaf30('0x26'),'phone':_0x3071bb[_0xaf30('0x24')]},'auth':_0x463bee,'json':!![]};return rp(_0x3dc9db)[_0xaf30('0xd')](function(_0x168876){logger[_0xaf30('0x11')]('['+[_0x12bb9f[_0xaf30('0x12')]()]+'],\x20EndUser\x20schema',_0x168876[_0xaf30('0xe')]);_0x3071bb[_0xaf30('0x27')]=_0x168876['result'][_0xaf30('0x1e')];_0x4eb503(_0x3071bb);})['catch'](function(_0x586141){logger['error']('['+[_0x12bb9f[_0xaf30('0x12')]()]+']',_0x586141[_0xaf30('0x16')]);_0xc061da(_0x586141['message']);});});}function getEndUser(_0x3ea369,_0x46d7ad,_0x35622a,_0x5d2965,_0x3ee120){return function(_0x58dbcf){logger[_0xaf30('0x11')]('['+[_0x3ea369[_0xaf30('0x12')]()]+_0xaf30('0x28'),_0x58dbcf);return new Promise(function(_0x1cc36a,_0x402fa2){var _0x1f548f={'method':_0xaf30('0xb'),'uri':_0x35622a+'sys_user?sysparm_query=phone%3D'+_0x58dbcf[_0xaf30('0x24')]+'&'+_0x5d2965+'&'+_0x3ee120,'auth':_0x46d7ad,'json':!![]};return rp(_0x1f548f)[_0xaf30('0xd')](function(_0x48fbd8){if(_0x48fbd8[_0xaf30('0xe')][_0xaf30('0xf')]>0x0){_0x58dbcf[_0xaf30('0x27')]=_0x48fbd8[_0xaf30('0xe')][0x0]['sys_id'];logger[_0xaf30('0x11')]('['+[_0x3ea369[_0xaf30('0x12')]()]+_0xaf30('0x29'),_0x58dbcf);_0x1cc36a(_0x58dbcf);}else{return createEndUser(_0x3ea369,_0x46d7ad,_0x58dbcf,_0x35622a,_0x5d2965)[_0xaf30('0xd')](function(_0x201e00){logger['info']('['+[_0x3ea369[_0xaf30('0x12')]()]+'],\x20createEndUser\x20crm',_0x201e00);_0x1cc36a(_0x201e00);});}})[_0xaf30('0x14')](function(_0x563243){logger['error']('['+[_0x3ea369[_0xaf30('0x12')]()]+']',_0x563243['message']);_0x402fa2(_0x563243[_0xaf30('0x16')]);});});};}function getCustomFields(_0x4d12dd,_0x14f887){var _0x4d479c={};if(_0x4d12dd[_0xaf30('0xf')]>0x0){_[_0xaf30('0x2a')](_0x4d12dd,function(_0x447061){if(_[_0xaf30('0x2b')](['string',_0xaf30('0x2c')],_0x447061[_0xaf30('0x2d')])&&_0x447061[_0xaf30('0x2e')]&&!_0x447061[_0xaf30('0x2f')]){_0x4d479c[_0x447061[_0xaf30('0x2e')][_0xaf30('0x30')]()]=_0x447061['content'][_0xaf30('0x31')]();}else if(_[_0xaf30('0x2b')](['string',_0xaf30('0x2c')],_0x447061[_0xaf30('0x2d')])&&_0x447061[_0xaf30('0x32')]&&_0x447061[_0xaf30('0x2f')]){_0x4d479c[_0x447061[_0xaf30('0x32')]['toLowerCase']()]=_0x447061[_0xaf30('0x33')][_0xaf30('0x31')]();}else if(_0x447061[_0xaf30('0x2d')]===_0xaf30('0x34')&&_0x447061['variableName']&&_0x447061[_0xaf30('0x32')]&&_0x447061[_0xaf30('0x2f')]){_0x4d479c[_0x447061[_0xaf30('0x32')]['toLowerCase']()]=_0x14f887[_0x447061[_0xaf30('0x35')]]['toString']();}else if(_0x447061['type']===_0xaf30('0x36')&&_0x447061['Variable']&&_0x447061['Variable'][_0xaf30('0x37')]&&_0x447061['idField']&&_0x447061[_0xaf30('0x2f')]){_0x4d479c[_0x447061[_0xaf30('0x32')][_0xaf30('0x30')]()]=_0x14f887[_0x447061[_0xaf30('0x38')][_0xaf30('0x37')][_0xaf30('0x30')]()][_0xaf30('0x31')]();}});}return _0x4d479c;}function getTicket(_0x264b4f,_0x5782ef,_0x393ee5,_0x590bee,_0x16c069,_0x5743ea){return function(_0x30ab1d){logger['info']('['+[_0x264b4f[_0xaf30('0x12')]()]+_0xaf30('0x39'),_0x30ab1d);return new Promise(function(_0x27435d,_0x3ce5eb){var _0x47261a=_0x264b4f[_0xaf30('0x30')]()===_0xaf30('0x3a')?_0x30ab1d[_0xaf30('0x1d')]:_0x30ab1d['endUserId'];var _0x16491d={'method':_0xaf30('0x22'),'uri':_0x393ee5+_0xaf30('0x3b')+'?'+_0x5743ea,'body':Object[_0xaf30('0x3c')]({},{'active':_0xaf30('0x25'),'caller_id':_0x47261a,'assigned_to':_0x30ab1d[_0xaf30('0x1d')],'short_description':intUtil[_0xaf30('0x3d')](_0x590bee['Subjects'],_0x16c069,'\x20'),'description':intUtil[_0xaf30('0x3d')](_0x590bee[_0xaf30('0x3e')],_0x16c069,'\x0a')},getCustomFields(_0x590bee[_0xaf30('0x3f')],_0x16c069)),'auth':_0x5782ef,'json':!![]};return rp(_0x16491d)[_0xaf30('0xd')](function(_0x169a02){logger[_0xaf30('0x11')]('['+[_0x264b4f[_0xaf30('0x12')]()]+_0xaf30('0x40'),_0x169a02['result']);_0x30ab1d[_0xaf30('0x41')]=_0x169a02[_0xaf30('0xe')]['sys_id'];_0x30ab1d['ticketNumber']=_0x169a02[_0xaf30('0xe')][_0xaf30('0x42')];logger[_0xaf30('0x11')]('['+[_0x264b4f['toUpperCase']()]+_0xaf30('0x43'),_0x30ab1d);_0x27435d(_0x30ab1d);})['catch'](function(_0x2ac1b9){logger['error']('['+[_0x264b4f[_0xaf30('0x12')]()]+']',_0x2ac1b9[_0xaf30('0x16')]);_0x3ce5eb(_0x2ac1b9[_0xaf30('0x16')]);});});};}function createRemoteTag(_0x880284,_0x3b00f0,_0x5d2a8a,_0x1d21bf){return new Promise(function(_0x2bb917,_0x3b5fb4){var _0x52282e={'method':'POST','uri':_0x5d2a8a+_0xaf30('0x44')+'?'+_0x1d21bf,'body':{'short_description':_0x880284,'global':!![],'active':!![],'name':_0x880284},'auth':_0x3b00f0,'json':!![]};return rp(_0x52282e)[_0xaf30('0xd')](function(_0x213cf7){var _0x54d6bb=_0x213cf7['result'][_0xaf30('0x1e')];_0x2bb917(_0x54d6bb);});});}function getRemoteTag(_0x26d00b,_0x439dee,_0x23d3ca,_0x1dd00e,_0x2eab1b){return new Promise(function(_0x242cfa,_0x1fa6de){var _0x3d24c8={'method':'GET','uri':_0x23d3ca+_0xaf30('0x44')+_0xaf30('0x45')+_0x26d00b+'&'+_0x1dd00e,'auth':_0x439dee,'json':!![]};return rp(_0x3d24c8)[_0xaf30('0xd')](function(_0x41e4de){if(_0x41e4de[_0xaf30('0xe')]['length']>0x0){var _0x3c58b5=_0x41e4de[_0xaf30('0xe')][0x0][_0xaf30('0x1e')];_0x242cfa(_0x3c58b5);}else{return createRemoteTag(_0x26d00b,_0x439dee,_0x23d3ca,_0x1dd00e)[_0xaf30('0xd')](function(_0x30f88e){_0x242cfa(_0x30f88e);});}});});}function assignTagToIncident(_0x57f352,_0x37a7ed,_0x3e912a,_0x530a61,_0x4afa47){return new Promise(function(_0x14336f,_0xe3661c){var _0xca1412={'method':_0xaf30('0x22'),'uri':_0x3e912a+_0xaf30('0x46')+'?'+_0x4afa47,'body':{'label':_0x57f352,'table':_0xaf30('0x3b'),'id_type':'Incident','table_key':_0x530a61[_0xaf30('0x41')],'title':_0xaf30('0x47')+_0x530a61['ticketNumber'],'id_display':_0x530a61[_0xaf30('0x48')]},'auth':_0x37a7ed,'json':!![]};return rp(_0xca1412)['then'](function(_0x4ef03f){_0x14336f();})['catch'](function(){_0x14336f();});});}function manageTags(_0x30cb39,_0x2abbf2,_0xc2f3c1,_0x584a3a,_0x558a50,_0x298f52,_0x43515c){return new Promise(function(_0xd1e2b3,_0x407c81){var _0x534aab=[];_0x2abbf2['forEach'](function(_0x31633d){_0x534aab[_0xaf30('0x49')](getRemoteTag(_0x31633d,_0xc2f3c1,_0x584a3a,_0x298f52,_0x43515c));});return Promise[_0xaf30('0x4a')](_0x534aab)[_0xaf30('0xd')](function(_0x15c877){if(_0x15c877['length']){logger[_0xaf30('0x11')]('['+[_0x30cb39[_0xaf30('0x12')]()]+_0xaf30('0x4b'),_0x15c877);var _0x5a1772=[];_0x15c877[_0xaf30('0x2a')](function(_0x537d8e){_0x5a1772[_0xaf30('0x49')](assignTagToIncident(_0x537d8e,_0xc2f3c1,_0x584a3a,_0x558a50,_0x298f52));});return Promise[_0xaf30('0x4a')](_0x5a1772)['then'](function(){_0xd1e2b3();})[_0xaf30('0x14')](function(){_0xd1e2b3();});}else{_0xd1e2b3();}});});}function getTags(_0x99b927,_0x3332f9,_0x365497,_0x46b924,_0x6b7905,_0x555a7f){return function(_0x35d48d){return new Promise(function(_0x2c0d17,_0x784c0f){var _0x42f9b9=[];var _0x1e9b57=_0x46b924[_0xaf30('0x4c')];if(_0x1e9b57&&_0x1e9b57[_0xaf30('0xf')]>0x0){_0x42f9b9=_[_0xaf30('0x4d')](_0x1e9b57,_0xaf30('0x37'));}if(_0x42f9b9[_0xaf30('0xf')]>0x0){return manageTags(_0x99b927,_0x42f9b9,_0x3332f9,_0x365497,_0x35d48d,_0x6b7905,_0x555a7f)['then'](function(){_0x2c0d17(_0x35d48d);});}else{_0x2c0d17(_0x35d48d);}});};}function emit(_0x31fcbb,_0x57d3ce,_0x4ffd21){var _0x4046f6=_0xaf30('0x4e')+_0xaf30('0x4f')+'%26sysparm_record_list%3Dactive%253Dtrue'+_0xaf30('0x50');var _0x92d71f={'uri':_0x31fcbb+_0xaf30('0x51')+_0x4ffd21+_0x4046f6};io['to'](util[_0xaf30('0x52')](_0xaf30('0x53'),_0x57d3ce))[_0xaf30('0x54')]('trigger:browser:url',_0x92d71f);}exports['cs']=function(_0x11c07e,_0xe2b61b,_0x36f5ba,_0x229f89,_0xc381c1,_0x1e92f6,_0x257fae,_0x5eb3fc){var _0x4a94be={};var _0x24af48={'user':_0x1e92f6[_0xaf30('0x55')],'pass':_0x1e92f6[_0xaf30('0x56')]};var _0xa562ce=_0xaf30('0x57');var _0x392af6=_0xaf30('0x58');_0x1e92f6['remoteUri']=intUtil['stripTrailingSlash'](_0x1e92f6['remoteUri']);_0x1e92f6[_0xaf30('0x59')]=intUtil['stripTrailingSlash'](_0x1e92f6[_0xaf30('0x59')]);var _0x26be5a=util[_0xaf30('0x52')](_0xaf30('0x5a'),_0x1e92f6[_0xaf30('0x5b')]);_0x4a94be[_0xaf30('0x18')]=!_[_0xaf30('0x5c')](_0x229f89)?_0x229f89[_0xaf30('0x5d')]:null;_0x4a94be[_0xaf30('0x1f')]=_0x1e92f6[_0xaf30('0x5d')];_0x4a94be[_0xaf30('0x24')]=_0x5eb3fc[_0xaf30('0x30')]()==='outbound'?_0xe2b61b[_0xaf30('0x5e')]:_0xe2b61b['calleridnum'];_0x4a94be[_0xaf30('0x5f')]=_0x5eb3fc==='queue'||_0x5eb3fc===_0xaf30('0x60')?_0xaf30('0x61'):'outbound';var _0x32c7c0=util[_0xaf30('0x52')](_0xaf30('0x62'),_0x1e92f6[_0xaf30('0x59')],_0xe2b61b[_0xaf30('0x63')],md5(_0xe2b61b[_0xaf30('0x63')]));if(_0xc381c1&&_0xc381c1[_0xaf30('0x64')]){logger[_0xaf30('0x11')](_0xaf30('0x65'),_0xaf30('0x66'));_0xe2b61b[_0xaf30('0x67')]=_0x32c7c0;}else if(_0x257fae&&_0x257fae[_0xaf30('0x68')]&&_0x257fae[_0xaf30('0x68')]!==_0xaf30('0x69')){logger['info']('[OUTBOUND]',_0xaf30('0x66'));_0xe2b61b['recordingURL']=_0x32c7c0;}else{_0xe2b61b[_0xaf30('0x67')]='';}return getAdminUser(_0x5eb3fc,_0x24af48,_0x4a94be,_0x26be5a,_0x392af6,_0xa562ce)[_0xaf30('0xd')](getUser(_0x5eb3fc,_0x24af48,_0x26be5a,_0x392af6,_0xa562ce))[_0xaf30('0xd')](getEndUser(_0x5eb3fc,_0x24af48,_0x26be5a,_0x392af6,_0xa562ce))[_0xaf30('0xd')](getTicket(_0x5eb3fc,_0x24af48,_0x26be5a,_0x36f5ba,_0xe2b61b,_0x392af6))[_0xaf30('0xd')](function(_0x64312e){logger[_0xaf30('0x11')](util[_0xaf30('0x52')](_0xaf30('0x6a'),_0x64312e['ticketId']));logger[_0xaf30('0x11')](util[_0xaf30('0x52')](_0xaf30('0x6b'),_0x5eb3fc));if(_0x5eb3fc!==_0xaf30('0x60')){logger[_0xaf30('0x11')]('['+[_0x5eb3fc[_0xaf30('0x12')]()]+']',_0xaf30('0x6c'));emit(_0x1e92f6[_0xaf30('0x5b')],_0x229f89[_0xaf30('0x37')],_0x64312e['ticketId']);}})[_0xaf30('0x14')](function(_0x315777){logger[_0xaf30('0x15')]('['+[_0x5eb3fc[_0xaf30('0x12')]()]+_0xaf30('0x6d'),util[_0xaf30('0x6e')](_0x315777,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
+var _0x1d57=['],\x20getUser\x20crm','error','],\x20createEndUser\x20input\x20crm','POST','sys_user?','endUserNumber','user','],\x20EndUser\x20schema','],\x20getEndUser\x20input\x20crm','sys_user?sysparm_query=phone%3D','endUserId','],\x20getEndUser\x20crm','],\x20createEndUser\x20crm','forEach','string','type','nameField','customField','toLowerCase','content','toString','idField','variable','variableName','customVariable','Variable','name',']\x20getTicket\x20input\x20crm','outbound','incident','getString','Subjects','Descriptions','Fields',']\x20POST\x20incident\x20entity\x20schema','label','?sysparm_query=name%3D','Incident','ticketId','ticketNumber','push','all',']\x20arrayPromises:\x20IDs\x20in\x20table\x20label','Tags','map','%26sysparm_record_target%3Dincident','%26sysparm_record_list%3Dactive%253Dtrue','%255EORDERBYDESCnumber','/nav_to.do?uri=incident.do?sys_id%3D','format','user:%s','emit','trigger:browser:url','username','password','sysparm_limit=1','sysparm_display_value=true','remoteUri','serverUrl','stripTrailingSlash','%s/api/now/table/','isNil','email','adminEmail','calleridnum','callDirection','queue','unmanaged','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','recordingFormat','none','The\x20ticket\x20ID\x20is:\x20%s','call\x20direction:\x20%s','Displaying\x20call\x20in\x20a\x20new\x20tab...',']\x20Error\x20running\x20ServiceNow\x20integration','inspect','util','md5','ioredis','./util','../../../../config/environment','../../../../config/logger','servicenow','redis','defaults','localhost','socket.io-emitter','sys_user?sysparm_query=user_name%3Dadmin','then','length','sys_id','toUpperCase','],\x20getAdminUser\x20crm','catch','message','info','],\x20getUser\x20input\x20crm','userEmail','GET','sys_user?sysparm_query=email%3D','],\x20getUser\x20rp\x20obj','],\x20getUser\x20entity','result','active','true','userId','adminId'];(function(_0x461ff7,_0x172913){var _0x1b8ddf=function(_0x422b88){while(--_0x422b88){_0x461ff7['push'](_0x461ff7['shift']());}};_0x1b8ddf(++_0x172913);}(_0x1d57,0x1a1));var _0x71d5=function(_0x7b4397,_0x50ab04){_0x7b4397=_0x7b4397-0x0;var _0x16de0b=_0x1d57[_0x7b4397];return _0x16de0b;};'use strict';var _=require('lodash');var Promise=require('bluebird');var rp=require('request-promise');var util=require(_0x71d5('0x0'));var md5=require(_0x71d5('0x1'));var Redis=require(_0x71d5('0x2'));var intUtil=require(_0x71d5('0x3'));var config=require(_0x71d5('0x4'));var logger=require(_0x71d5('0x5'))(_0x71d5('0x6'));config[_0x71d5('0x7')]=_[_0x71d5('0x8')](config[_0x71d5('0x7')],{'host':_0x71d5('0x9'),'port':0x18eb});var io=require(_0x71d5('0xa'))(new Redis(config[_0x71d5('0x7')]));function getAdminUser(_0x1f6a16,_0x5a50f4,_0x5efee1,_0x41b442,_0x4dc028,_0x1df79b){return new Promise(function(_0x3d0084,_0x4f3965){var _0x474cef={'method':'GET','uri':_0x41b442+_0x71d5('0xb')+'&'+_0x4dc028+'&'+_0x1df79b,'auth':_0x5a50f4,'json':!![]};return rp(_0x474cef)[_0x71d5('0xc')](function(_0x73fffa){if(_0x73fffa['result'][_0x71d5('0xd')]>0x0){_0x5efee1['adminId']=_0x73fffa['result'][0x0][_0x71d5('0xe')];}logger['info']('['+[_0x1f6a16[_0x71d5('0xf')]()]+_0x71d5('0x10'),_0x5efee1);_0x3d0084(_0x5efee1);})[_0x71d5('0x11')](function(_0x5a2107){logger['error']('['+[_0x1f6a16[_0x71d5('0xf')]()]+']',_0x5a2107[_0x71d5('0x12')]);_0x4f3965(_0x5a2107[_0x71d5('0x12')]);});});}function getUser(_0x1ad9ad,_0x28f6ff,_0x43ff56,_0x4f106a,_0x47831d){return function(_0x9c2c3c){logger[_0x71d5('0x13')]('['+[_0x1ad9ad[_0x71d5('0xf')]()]+_0x71d5('0x14'),_0x9c2c3c);return new Promise(function(_0xb1bcb3,_0x18fff3){if(intUtil['validateEmail'](_0x9c2c3c[_0x71d5('0x15')])){var _0x5d8cc3={'method':_0x71d5('0x16'),'uri':_0x43ff56+_0x71d5('0x17')+_0x9c2c3c[_0x71d5('0x15')]+'&'+_0x4f106a+'&'+_0x47831d,'auth':_0x28f6ff,'json':!![]};logger[_0x71d5('0x13')]('['+[_0x1ad9ad['toUpperCase']()]+_0x71d5('0x18'),_0x5d8cc3);return rp(_0x5d8cc3)[_0x71d5('0xc')](function(_0x4b1e15){logger['info']('['+[_0x1ad9ad[_0x71d5('0xf')]()]+_0x71d5('0x19'),_0x4b1e15);if(_0x4b1e15[_0x71d5('0x1a')][_0x71d5('0xd')]>0x0&&String(_0x4b1e15[_0x71d5('0x1a')][0x0][_0x71d5('0x1b')])===_0x71d5('0x1c')){_0x9c2c3c[_0x71d5('0x1d')]=_0x4b1e15[_0x71d5('0x1a')][0x0][_0x71d5('0xe')];}else{_0x9c2c3c[_0x71d5('0x1d')]=_0x9c2c3c[_0x71d5('0x1e')];_0x9c2c3c[_0x71d5('0x15')]=_0x9c2c3c['adminEmail'];}logger[_0x71d5('0x13')]('['+[_0x1ad9ad[_0x71d5('0xf')]()]+_0x71d5('0x1f'),_0x9c2c3c);_0xb1bcb3(_0x9c2c3c);})['catch'](function(_0x15064a){logger[_0x71d5('0x20')]('['+[_0x1ad9ad[_0x71d5('0xf')]()]+']',_0x15064a[_0x71d5('0x12')]);_0x18fff3(_0x15064a['message']);});}else{logger[_0x71d5('0x13')]('['+[_0x1ad9ad['toUpperCase']()]+']\x20using\x20admin\x20profile');_0x9c2c3c[_0x71d5('0x1d')]=_0x9c2c3c[_0x71d5('0x1e')];_0x9c2c3c[_0x71d5('0x15')]=_0x9c2c3c['adminEmail'];_0xb1bcb3(_0x9c2c3c);}});};}function createEndUser(_0x55ad83,_0x1aaa91,_0x16aa3f,_0x554333,_0xc8fd4d){logger[_0x71d5('0x13')]('['+[_0x55ad83['toUpperCase']()]+_0x71d5('0x21'),_0x16aa3f);return new Promise(function(_0x589d01,_0x343a47){var _0x2bbb00={'method':_0x71d5('0x22'),'uri':_0x554333+_0x71d5('0x23')+_0xc8fd4d,'body':{'user_name':_0x16aa3f[_0x71d5('0x24')],'roles':_0x71d5('0x25'),'first_name':_0x16aa3f['endUserNumber'],'active':_0x71d5('0x1c'),'date_format':'System','phone':_0x16aa3f['endUserNumber']},'auth':_0x1aaa91,'json':!![]};return rp(_0x2bbb00)[_0x71d5('0xc')](function(_0x9f7ca9){logger[_0x71d5('0x13')]('['+[_0x55ad83[_0x71d5('0xf')]()]+_0x71d5('0x26'),_0x9f7ca9[_0x71d5('0x1a')]);_0x16aa3f['endUserId']=_0x9f7ca9['result'][_0x71d5('0xe')];_0x589d01(_0x16aa3f);})[_0x71d5('0x11')](function(_0x428441){logger[_0x71d5('0x20')]('['+[_0x55ad83[_0x71d5('0xf')]()]+']',_0x428441['message']);_0x343a47(_0x428441[_0x71d5('0x12')]);});});}function getEndUser(_0x2b4584,_0x2247fa,_0x28f196,_0x1542e8,_0x2082e7){return function(_0x5884df){logger['info']('['+[_0x2b4584[_0x71d5('0xf')]()]+_0x71d5('0x27'),_0x5884df);return new Promise(function(_0x31f2d4,_0x286911){var _0x23906c={'method':_0x71d5('0x16'),'uri':_0x28f196+_0x71d5('0x28')+_0x5884df[_0x71d5('0x24')]+'&'+_0x1542e8+'&'+_0x2082e7,'auth':_0x2247fa,'json':!![]};return rp(_0x23906c)[_0x71d5('0xc')](function(_0x40d90c){if(_0x40d90c[_0x71d5('0x1a')][_0x71d5('0xd')]>0x0){_0x5884df[_0x71d5('0x29')]=_0x40d90c[_0x71d5('0x1a')][0x0][_0x71d5('0xe')];logger[_0x71d5('0x13')]('['+[_0x2b4584[_0x71d5('0xf')]()]+_0x71d5('0x2a'),_0x5884df);_0x31f2d4(_0x5884df);}else{return createEndUser(_0x2b4584,_0x2247fa,_0x5884df,_0x28f196,_0x1542e8)[_0x71d5('0xc')](function(_0x29d708){logger[_0x71d5('0x13')]('['+[_0x2b4584[_0x71d5('0xf')]()]+_0x71d5('0x2b'),_0x29d708);_0x31f2d4(_0x29d708);});}})[_0x71d5('0x11')](function(_0x168ac7){logger[_0x71d5('0x20')]('['+[_0x2b4584[_0x71d5('0xf')]()]+']',_0x168ac7['message']);_0x286911(_0x168ac7[_0x71d5('0x12')]);});});};}function getCustomFields(_0x5d037e,_0x590403){var _0x5dd68f={};if(_0x5d037e[_0x71d5('0xd')]>0x0){_[_0x71d5('0x2c')](_0x5d037e,function(_0x4c4108){if(_['includes']([_0x71d5('0x2d'),'picklist'],_0x4c4108[_0x71d5('0x2e')])&&_0x4c4108[_0x71d5('0x2f')]&&!_0x4c4108[_0x71d5('0x30')]){_0x5dd68f[_0x4c4108[_0x71d5('0x2f')][_0x71d5('0x31')]()]=_0x4c4108[_0x71d5('0x32')][_0x71d5('0x33')]();}else if(_['includes'](['string','picklist'],_0x4c4108[_0x71d5('0x2e')])&&_0x4c4108[_0x71d5('0x34')]&&_0x4c4108[_0x71d5('0x30')]){_0x5dd68f[_0x4c4108[_0x71d5('0x34')]['toLowerCase']()]=_0x4c4108['content'][_0x71d5('0x33')]();}else if(_0x4c4108[_0x71d5('0x2e')]===_0x71d5('0x35')&&_0x4c4108[_0x71d5('0x36')]&&_0x4c4108[_0x71d5('0x34')]&&_0x4c4108[_0x71d5('0x30')]){_0x5dd68f[_0x4c4108[_0x71d5('0x34')]['toLowerCase']()]=_0x590403[_0x4c4108[_0x71d5('0x36')]]['toString']();}else if(_0x4c4108[_0x71d5('0x2e')]===_0x71d5('0x37')&&_0x4c4108['Variable']&&_0x4c4108[_0x71d5('0x38')][_0x71d5('0x39')]&&_0x4c4108[_0x71d5('0x34')]&&_0x4c4108[_0x71d5('0x30')]){_0x5dd68f[_0x4c4108[_0x71d5('0x34')][_0x71d5('0x31')]()]=_0x590403[_0x4c4108['Variable'][_0x71d5('0x39')]['toLowerCase']()][_0x71d5('0x33')]();}});}return _0x5dd68f;}function getTicket(_0x1c912b,_0x231025,_0x2c28a5,_0x1dc27c,_0x45974d,_0x18f113){return function(_0x54314d){logger['info']('['+[_0x1c912b['toUpperCase']()]+_0x71d5('0x3a'),_0x54314d);return new Promise(function(_0x1470ba,_0x40f76c){var _0x3d7571=_0x1c912b[_0x71d5('0x31')]()===_0x71d5('0x3b')?_0x54314d['userId']:_0x54314d[_0x71d5('0x29')];var _0x2f1562={'method':_0x71d5('0x22'),'uri':_0x2c28a5+_0x71d5('0x3c')+'?'+_0x18f113,'body':Object['assign']({},{'active':_0x71d5('0x1c'),'caller_id':_0x3d7571,'assigned_to':_0x54314d[_0x71d5('0x1d')],'short_description':intUtil[_0x71d5('0x3d')](_0x1dc27c[_0x71d5('0x3e')],_0x45974d,'\x20'),'description':intUtil[_0x71d5('0x3d')](_0x1dc27c[_0x71d5('0x3f')],_0x45974d,'\x0a')},getCustomFields(_0x1dc27c[_0x71d5('0x40')],_0x45974d)),'auth':_0x231025,'json':!![]};return rp(_0x2f1562)[_0x71d5('0xc')](function(_0x11fa2d){logger[_0x71d5('0x13')]('['+[_0x1c912b[_0x71d5('0xf')]()]+_0x71d5('0x41'),_0x11fa2d[_0x71d5('0x1a')]);_0x54314d['ticketId']=_0x11fa2d[_0x71d5('0x1a')][_0x71d5('0xe')];_0x54314d['ticketNumber']=_0x11fa2d[_0x71d5('0x1a')]['number'];logger[_0x71d5('0x13')]('['+[_0x1c912b[_0x71d5('0xf')]()]+']\x20getTicket\x20crm',_0x54314d);_0x1470ba(_0x54314d);})[_0x71d5('0x11')](function(_0x32407a){logger['error']('['+[_0x1c912b['toUpperCase']()]+']',_0x32407a[_0x71d5('0x12')]);_0x40f76c(_0x32407a[_0x71d5('0x12')]);});});};}function createRemoteTag(_0x28db57,_0x268f69,_0x1a635c,_0x5d0cd4){return new Promise(function(_0x3761ce,_0x372d62){var _0x11da28={'method':'POST','uri':_0x1a635c+'label'+'?'+_0x5d0cd4,'body':{'short_description':_0x28db57,'global':!![],'active':!![],'name':_0x28db57},'auth':_0x268f69,'json':!![]};return rp(_0x11da28)[_0x71d5('0xc')](function(_0x3cdf46){var _0x25d5b0=_0x3cdf46[_0x71d5('0x1a')][_0x71d5('0xe')];_0x3761ce(_0x25d5b0);});});}function getRemoteTag(_0xf07a6e,_0x3ad1f0,_0x424304,_0xece6da,_0x1b2839){return new Promise(function(_0x1d118d,_0x61da15){var _0x3632de={'method':_0x71d5('0x16'),'uri':_0x424304+_0x71d5('0x42')+_0x71d5('0x43')+_0xf07a6e+'&'+_0xece6da,'auth':_0x3ad1f0,'json':!![]};return rp(_0x3632de)[_0x71d5('0xc')](function(_0x436982){if(_0x436982[_0x71d5('0x1a')]['length']>0x0){var _0xa26b85=_0x436982[_0x71d5('0x1a')][0x0][_0x71d5('0xe')];_0x1d118d(_0xa26b85);}else{return createRemoteTag(_0xf07a6e,_0x3ad1f0,_0x424304,_0xece6da)['then'](function(_0x338349){_0x1d118d(_0x338349);});}});});}function assignTagToIncident(_0x24f885,_0xacccb0,_0x4f82ae,_0x4ae73c,_0x476317){return new Promise(function(_0x1add71,_0x1fd958){var _0xe75e0c={'method':_0x71d5('0x22'),'uri':_0x4f82ae+'label_entry'+'?'+_0x476317,'body':{'label':_0x24f885,'table':_0x71d5('0x3c'),'id_type':_0x71d5('0x44'),'table_key':_0x4ae73c[_0x71d5('0x45')],'title':'Incident\x20-\x20'+_0x4ae73c[_0x71d5('0x46')],'id_display':_0x4ae73c[_0x71d5('0x46')]},'auth':_0xacccb0,'json':!![]};return rp(_0xe75e0c)[_0x71d5('0xc')](function(_0x18da2e){_0x1add71();})[_0x71d5('0x11')](function(){_0x1add71();});});}function manageTags(_0xf6c140,_0x443742,_0x58a9fd,_0x1b5fa5,_0x1473d0,_0x5d1893,_0x4dd2e9){return new Promise(function(_0x34e118,_0x42bf85){var _0x6ce39d=[];_0x443742['forEach'](function(_0xf03e22){_0x6ce39d[_0x71d5('0x47')](getRemoteTag(_0xf03e22,_0x58a9fd,_0x1b5fa5,_0x5d1893,_0x4dd2e9));});return Promise[_0x71d5('0x48')](_0x6ce39d)['then'](function(_0x5acba2){if(_0x5acba2[_0x71d5('0xd')]){logger['info']('['+[_0xf6c140[_0x71d5('0xf')]()]+_0x71d5('0x49'),_0x5acba2);var _0x1b22b0=[];_0x5acba2[_0x71d5('0x2c')](function(_0x837c48){_0x1b22b0[_0x71d5('0x47')](assignTagToIncident(_0x837c48,_0x58a9fd,_0x1b5fa5,_0x1473d0,_0x5d1893));});return Promise[_0x71d5('0x48')](_0x1b22b0)[_0x71d5('0xc')](function(){_0x34e118();})[_0x71d5('0x11')](function(){_0x34e118();});}else{_0x34e118();}});});}function getTags(_0x3afc76,_0x2f24a4,_0xc4f6cd,_0x534482,_0xbe3baf,_0x196001){return function(_0x18a63d){return new Promise(function(_0x73c1ae,_0x5e767c){var _0x48e708=[];var _0x1a2a78=_0x534482[_0x71d5('0x4a')];if(_0x1a2a78&&_0x1a2a78[_0x71d5('0xd')]>0x0){_0x48e708=_[_0x71d5('0x4b')](_0x1a2a78,_0x71d5('0x39'));}if(_0x48e708['length']>0x0){return manageTags(_0x3afc76,_0x48e708,_0x2f24a4,_0xc4f6cd,_0x18a63d,_0xbe3baf,_0x196001)[_0x71d5('0xc')](function(){_0x73c1ae(_0x18a63d);});}else{_0x73c1ae(_0x18a63d);}});};}function emit(_0x28b173,_0x407cc8,_0x426c46){var _0x38258e=_0x71d5('0x4c')+'%26sysparm_record_row%3D1%26sysparm_record_rows%3D39'+_0x71d5('0x4d')+_0x71d5('0x4e');var _0x391be9={'uri':_0x28b173+_0x71d5('0x4f')+_0x426c46+_0x38258e};io['to'](util[_0x71d5('0x50')](_0x71d5('0x51'),_0x407cc8))[_0x71d5('0x52')](_0x71d5('0x53'),_0x391be9);}exports['cs']=function(_0x3f447c,_0x530a57,_0x5629d3,_0x58fc19,_0x1525d5,_0x352727,_0xf8bfde,_0x12c6c3){var _0x21f6dd={};var _0x440f60={'user':_0x352727[_0x71d5('0x54')],'pass':_0x352727[_0x71d5('0x55')]};var _0x1dceaa=_0x71d5('0x56');var _0x1bed7=_0x71d5('0x57');_0x352727[_0x71d5('0x58')]=intUtil['stripTrailingSlash'](_0x352727['remoteUri']);_0x352727[_0x71d5('0x59')]=intUtil[_0x71d5('0x5a')](_0x352727[_0x71d5('0x59')]);var _0x56af50=util[_0x71d5('0x50')](_0x71d5('0x5b'),_0x352727[_0x71d5('0x58')]);_0x21f6dd['userEmail']=!_[_0x71d5('0x5c')](_0x58fc19)?_0x58fc19[_0x71d5('0x5d')]:null;_0x21f6dd[_0x71d5('0x5e')]=_0x352727[_0x71d5('0x5d')];_0x21f6dd[_0x71d5('0x24')]=_0x12c6c3[_0x71d5('0x31')]()==='outbound'?_0x530a57['destcalleridnum']:_0x530a57[_0x71d5('0x5f')];_0x21f6dd[_0x71d5('0x60')]=_0x12c6c3===_0x71d5('0x61')||_0x12c6c3===_0x71d5('0x62')?_0x71d5('0x61'):_0x71d5('0x3b');var _0x56d47e=util['format'](_0x71d5('0x63'),_0x352727[_0x71d5('0x59')],_0x530a57[_0x71d5('0x64')],md5(_0x530a57['uniqueid']));if(_0x1525d5&&_0x1525d5[_0x71d5('0x65')]){logger[_0x71d5('0x13')](_0x71d5('0x66'),_0x71d5('0x67'));_0x530a57[_0x71d5('0x68')]=_0x56d47e;}else if(_0xf8bfde&&_0xf8bfde[_0x71d5('0x69')]&&_0xf8bfde[_0x71d5('0x69')]!==_0x71d5('0x6a')){logger[_0x71d5('0x13')]('[OUTBOUND]',_0x71d5('0x67'));_0x530a57['recordingURL']=_0x56d47e;}else{_0x530a57[_0x71d5('0x68')]='';}return getAdminUser(_0x12c6c3,_0x440f60,_0x21f6dd,_0x56af50,_0x1bed7,_0x1dceaa)[_0x71d5('0xc')](getUser(_0x12c6c3,_0x440f60,_0x56af50,_0x1bed7,_0x1dceaa))[_0x71d5('0xc')](getEndUser(_0x12c6c3,_0x440f60,_0x56af50,_0x1bed7,_0x1dceaa))[_0x71d5('0xc')](getTicket(_0x12c6c3,_0x440f60,_0x56af50,_0x5629d3,_0x530a57,_0x1bed7))['then'](function(_0x44b369){logger[_0x71d5('0x13')](util[_0x71d5('0x50')](_0x71d5('0x6b'),_0x44b369['ticketId']));logger[_0x71d5('0x13')](util[_0x71d5('0x50')](_0x71d5('0x6c'),_0x12c6c3));if(_0x12c6c3!=='unmanaged'){logger['info']('['+[_0x12c6c3[_0x71d5('0xf')]()]+']',_0x71d5('0x6d'));emit(_0x352727[_0x71d5('0x58')],_0x58fc19[_0x71d5('0x39')],_0x44b369[_0x71d5('0x45')]);}})['catch'](function(_0x3cee95){logger[_0x71d5('0x20')]('['+[_0x12c6c3['toUpperCase']()]+_0x71d5('0x6e'),util[_0x71d5('0x6f')](_0x3cee95,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
index 06e9fff..68de939 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x57ea=['set_entry','JSON','Calls','Basic\x20%s','toString','get_server_info','stringify','isNil','Getting\x20agent\x20with\x20name','get_entry_list','Employees','format','INSTR\x20(\x20users.user_name,\x20\x22%s\x22)\x20>\x200','user_name','then','entry_list','length','name_value_list','value','Agent\x20found!','resolve','user_id','Searching\x20enduser\x20with\x20phone','Contacts','phone_home','find','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','first_name','Caller\x20-\x20%s','debug','[HTTP]','merge','type','string','customField','nameField','toLowerCase','content','idField','variable','customVariable','Variable','login','password','PLAIN','xCALLY\x20Motion\x20integration','sessionID','Account\x20%d\x20is\x20not\x20valid','set_relationship','remoteUri','stripTrailingSlash','serverUrl','uri','%s/service/v4_1/rest.php','[QUEUE]','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','The\x20User\x20ID\x20is:','The\x20Enduser\x20ID\x20is:','Fields','Inbound','Ticket\x20created!','The\x20Ticket\x20ID\x20is:','contacts','version','charAt','%s/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DCalls%26action%3DEditView%26record%3D%s','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','catch','outbound','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','destcalleridname','destcalleridnum','users','%s/#bwc/index.php?module=Calls&action=EditView&record=%s','error','unmanaged','monitor_format','lastevent','toUpperCase','calleridnum','lodash','request-promise','md5','util','ioredis','../../../../config/environment','../../../../config/logger','sugarcrm','defaults','localhost','socket.io-emitter','redis','POST','emit','info','Creating\x20new\x20ticket...','name','getString','Subjects','assigned_user_id','created_by','description','Descriptions','date_start','toISOString','slice','replace','duration_hours','duration_minutes','parent_id','parent_type','forEach','variableName','push'];(function(_0x376b45,_0x5964fb){var _0x2341b3=function(_0x5a7f01){while(--_0x5a7f01){_0x376b45['push'](_0x376b45['shift']());}};_0x2341b3(++_0x5964fb);}(_0x57ea,0x14c));var _0xa57e=function(_0x16e6db,_0x2e5a01){_0x16e6db=_0x16e6db-0x0;var _0x5a9151=_0x57ea[_0x16e6db];return _0x5a9151;};'use strict';var _=require(_0xa57e('0x0'));var rp=require(_0xa57e('0x1'));var BPromise=require('bluebird');var md5=require(_0xa57e('0x2'));var util=require(_0xa57e('0x3'));var Redis=require(_0xa57e('0x4'));var intUtil=require('./util');var config=require(_0xa57e('0x5'));var logger=require(_0xa57e('0x6'))(_0xa57e('0x7'));config['redis']=_[_0xa57e('0x8')](config['redis'],{'host':_0xa57e('0x9'),'port':0x18eb});var io=require(_0xa57e('0xa'))(new Redis(config[_0xa57e('0xb')]));var def={'method':_0xa57e('0xc'),'json':!![]};function emit(_0x5653b4,_0x18c613,_0x32290d){io['to'](_0x5653b4)[_0xa57e('0xd')](_0x18c613,_0x32290d);}function getTicket(_0x175ef5,_0x56b530,_0x3c7080,_0x3dfe13,_0x55f623,_0x4382cb,_0x446d42,_0xc8e3ef){logger[_0xa57e('0xe')](_0xa57e('0xf'));var _0xeb5756=new Date();var _0x1662c0=[{'name':_0xa57e('0x10'),'value':intUtil[_0xa57e('0x11')](_0x3dfe13[_0xa57e('0x12')],_0x55f623,'\x20')},{'name':_0xa57e('0x13'),'value':_0x56b530['id']},{'name':_0xa57e('0x14'),'value':_0x56b530['id']},{'name':_0xa57e('0x15'),'value':intUtil[_0xa57e('0x11')](_0x3dfe13[_0xa57e('0x16')],_0x55f623,'\x0a')},{'name':_0xa57e('0x17'),'value':_0xeb5756[_0xa57e('0x18')]()[_0xa57e('0x19')](0x0,0x13)[_0xa57e('0x1a')]('T','\x20')},{'name':_0xa57e('0x1b'),'value':'0'},{'name':_0xa57e('0x1c'),'value':'15'},{'name':_0xa57e('0x1d'),'value':_0x3c7080['id']},{'name':_0xa57e('0x1e'),'value':'Contacts'},{'name':'parent_name','value':_0x3c7080[_0xa57e('0x10')]},{'name':'direction','value':_0xc8e3ef}];if(_0x4382cb['length']){_[_0xa57e('0x1f')](_0x4382cb,function(_0x3b8302){if(_0x55f623[_0x3b8302[_0xa57e('0x20')]]){_0x1662c0[_0xa57e('0x21')]({'name':_0x3b8302['idField'],'value':_0x55f623[_0x3b8302['variableName']]});}});}return request({'form':{'method':_0xa57e('0x22'),'input_type':'JSON','response_type':_0xa57e('0x23'),'rest_data':JSON['stringify']({'session':_0x446d42['id'],'module_name':_0xa57e('0x24'),'name_value_list':_0x1662c0})}});}function getAuth(_0x41b066){return util['format'](_0xa57e('0x25'),new Buffer(_0x41b066['apiKey']+':X')[_0xa57e('0x26')]('base64'));}function getServerInfo(_0x6e7bc4){return request({'form':{'method':_0xa57e('0x27'),'input_type':_0xa57e('0x23'),'response_type':_0xa57e('0x23'),'rest_data':JSON[_0xa57e('0x28')]({'session':_0x6e7bc4['id']})}});}function getUser(_0x4556d6,_0x47394b,_0x295043){if(!_[_0xa57e('0x29')](_0x47394b)){logger[_0xa57e('0xe')](_0xa57e('0x2a'),_0x47394b);return request({'form':{'method':_0xa57e('0x2b'),'input_type':_0xa57e('0x23'),'response_type':_0xa57e('0x23'),'rest_data':JSON['stringify']({'session':_0x295043['id'],'module_name':_0xa57e('0x2c'),'query':util[_0xa57e('0x2d')](_0xa57e('0x2e'),_0x47394b),'order_by':'','offset':'0','select_fields':['id',_0xa57e('0x10'),_0xa57e('0x2f')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0xa57e('0x30')](function(_0x2fbc1f){if(_0x2fbc1f[_0xa57e('0x31')][_0xa57e('0x32')]){var _0x4155c5=_['find'](_0x2fbc1f['entry_list'],function(_0x262194){return _0x262194[_0xa57e('0x33')][_0xa57e('0x2f')][_0xa57e('0x34')]===_0x47394b;});if(_0x4155c5){logger[_0xa57e('0xe')](_0xa57e('0x35'));return BPromise['resolve']({'id':_0x4155c5[_0xa57e('0x33')]['id'][_0xa57e('0x34')],'name':_0x4155c5['name_value_list'][_0xa57e('0x10')]['value']});}}logger[_0xa57e('0xe')]('Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');return BPromise[_0xa57e('0x36')]({'id':_0x295043[_0xa57e('0x33')][_0xa57e('0x37')][_0xa57e('0x34')],'name':_0x295043[_0xa57e('0x33')][_0xa57e('0x2f')][_0xa57e('0x34')]});});}else{logger[_0xa57e('0xe')]('Agent\x20not\x20available,\x20using\x20the\x20admin\x20account!');return BPromise['resolve']({'id':_0x295043[_0xa57e('0x33')]['user_id']['value'],'name':_0x295043[_0xa57e('0x33')][_0xa57e('0x2f')]['value']});}}function getEndUser(_0x55a1a6,_0x15c2a7,_0x2f35e3,_0x4c0003){logger[_0xa57e('0xe')](_0xa57e('0x38'),_0x2f35e3);return request({'form':{'method':_0xa57e('0x2b'),'input_type':'JSON','response_type':'JSON','rest_data':JSON[_0xa57e('0x28')]({'session':_0x4c0003['id'],'module_name':_0xa57e('0x39'),'query':util[_0xa57e('0x2d')]('contacts.phone_home\x20=\x20\x22%s\x22',_0x2f35e3),'order_by':'','offset':'0','select_fields':['id',_0xa57e('0x10'),_0xa57e('0x3a')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})['then'](function(_0x3d4c62){if(_0x3d4c62['entry_list'][_0xa57e('0x32')]){var _0x15749=_[_0xa57e('0x3b')](_0x3d4c62[_0xa57e('0x31')],function(_0x59846a){return _0x59846a[_0xa57e('0x33')][_0xa57e('0x3a')][_0xa57e('0x34')]===_0x2f35e3;});if(_0x15749){logger[_0xa57e('0xe')](_0xa57e('0x3c'));return BPromise[_0xa57e('0x36')]({'id':_0x15749[_0xa57e('0x33')]['id']['value'],'name':_0x15749['name_value_list']['name']['value'],'phone':_0x15749[_0xa57e('0x33')]['phone_home'][_0xa57e('0x34')]});}}else{logger[_0xa57e('0xe')](_0xa57e('0x3d'));return request({'form':{'method':'set_entry','input_type':'JSON','response_type':_0xa57e('0x23'),'rest_data':JSON[_0xa57e('0x28')]({'session':_0x4c0003['id'],'module_name':_0xa57e('0x39'),'name_value_list':[{'name':_0xa57e('0x3e'),'value':_0x15c2a7!=='<unknown>'?_0x15c2a7:util[_0xa57e('0x2d')](_0xa57e('0x3f'),_0x2f35e3)},{'name':_0xa57e('0x3a'),'value':_0x2f35e3}]})}})[_0xa57e('0x30')](function(_0x2039bc){logger['info']('Enduser\x20created.');return BPromise[_0xa57e('0x36')]({'id':_0x2039bc['id'],'name':_0x2039bc[_0xa57e('0x31')][_0xa57e('0x3e')][_0xa57e('0x34')],'phone':_0x2039bc[_0xa57e('0x31')][_0xa57e('0x3a')][_0xa57e('0x34')]});});}});}function request(_0x20c466){logger[_0xa57e('0x40')](_0xa57e('0x41'),JSON[_0xa57e('0x28')](_0x20c466));return rp(_[_0xa57e('0x42')](def,_0x20c466));}function getTags(_0x3ce9b7,_0x58cc44){var _0x1f8980=[];if(_0x3ce9b7&&_0x3ce9b7[_0xa57e('0x32')]>0x0){_0x1f8980=_['map'](_0x3ce9b7,_0x58cc44);}return _0x1f8980;}function getCustomFields(_0x528e63,_0x40ff35){var _0x394d00=[];var _0x490ab5={'custom_fields':[]};if(_0x528e63['length']>0x0){_['forEach'](_0x528e63,function(_0x27decf){if(_0x27decf[_0xa57e('0x43')]===_0xa57e('0x44')&&_0x27decf['nameField']&&!_0x27decf[_0xa57e('0x45')]){_0x490ab5[_0x27decf[_0xa57e('0x46')][_0xa57e('0x47')]()]=_0x27decf[_0xa57e('0x48')][_0xa57e('0x26')]();}else if(_0x27decf[_0xa57e('0x43')]===_0xa57e('0x44')&&_0x27decf[_0xa57e('0x49')]&&_0x27decf[_0xa57e('0x45')]){_0x490ab5['custom_fields'][_0xa57e('0x21')]({'id':_0x27decf[_0xa57e('0x49')],'value':_0x27decf[_0xa57e('0x48')]['toString']()});}else if(_0x27decf[_0xa57e('0x43')]===_0xa57e('0x4a')&&_0x27decf[_0xa57e('0x20')]&&_0x27decf[_0xa57e('0x49')]&&_0x27decf[_0xa57e('0x45')]){_0x40ff35[_0x27decf[_0xa57e('0x20')]]&&_0x490ab5['custom_fields'][_0xa57e('0x21')]({'id':_0x27decf[_0xa57e('0x49')],'value':_0x40ff35[_0x27decf[_0xa57e('0x20')]][_0xa57e('0x26')]()});}else if(_0x27decf[_0xa57e('0x43')]===_0xa57e('0x4b')&&_0x27decf['Variable']&&_0x27decf[_0xa57e('0x4c')][_0xa57e('0x10')]&&_0x27decf['idField']&&_0x27decf[_0xa57e('0x45')]){_0x40ff35[_0x27decf[_0xa57e('0x4c')]['name'][_0xa57e('0x47')]()]&&_0x490ab5['custom_fields'][_0xa57e('0x21')]({'id':_0x27decf[_0xa57e('0x49')],'value':_0x40ff35[_0x27decf[_0xa57e('0x4c')][_0xa57e('0x10')]['toLowerCase']()][_0xa57e('0x26')]()});}});}return _0x490ab5;}function getConnection(_0x2a3010){return request({'method':'POST','form':{'method':_0xa57e('0x4d'),'input_type':_0xa57e('0x23'),'response_type':_0xa57e('0x23'),'rest_data':JSON[_0xa57e('0x28')]({'user_auth':{'user_name':_0x2a3010['username'],'password':_0x2a3010[_0xa57e('0x4e')],'encryption':_0xa57e('0x4f')},'application':_0xa57e('0x50')})}})[_0xa57e('0x30')](function(_0xb35556){var _0x3fb7d9=_0xb35556;if(_0x3fb7d9['id']){def[_0xa57e('0x51')]=_0x3fb7d9['id'];return BPromise[_0xa57e('0x36')](_0x3fb7d9);}else{throw new Error(util[_0xa57e('0x2d')](_0xa57e('0x52'),_0x2a3010['id']));}});}function setRelationship(_0x2db84c,_0x38c569,_0x5d2e84,_0x1ad49d){return request({'form':{'method':_0xa57e('0x53'),'input_type':_0xa57e('0x23'),'response_type':_0xa57e('0x23'),'rest_data':JSON[_0xa57e('0x28')]({'session':_0x2db84c['id'],'module_name':_0xa57e('0x24'),'module_id':_0x5d2e84['id'],'link_field_name':_0x1ad49d,'related_ids':[_0x38c569['id']],'name_value_list':[],'delete':0x0})}});}exports['queue']=function(_0x466dbe,_0x30bbca,_0x411e50,_0x3b5c5c,_0x25c3a7,_0x215ec5){var _0x1d0702,_0x43041e,_0x338e49,_0x196b45;_0x215ec5[_0xa57e('0x54')]=intUtil[_0xa57e('0x55')](_0x215ec5[_0xa57e('0x54')]);_0x215ec5[_0xa57e('0x56')]=intUtil['stripTrailingSlash'](_0x215ec5[_0xa57e('0x56')]);def[_0xa57e('0x57')]=util['format'](_0xa57e('0x58'),_0x215ec5[_0xa57e('0x54')]);if(_0x25c3a7&&_0x25c3a7['monitor_format']){logger[_0xa57e('0xe')](_0xa57e('0x59'),'Recording\x20is\x20enabled!');_0x30bbca[_0xa57e('0x5a')]=util[_0xa57e('0x2d')](_0xa57e('0x5b'),_0x215ec5[_0xa57e('0x56')],_0x30bbca[_0xa57e('0x5c')],md5(_0x30bbca[_0xa57e('0x5c')]));}else{_0x30bbca[_0xa57e('0x5a')]='';}return getConnection(_0x215ec5)[_0xa57e('0x30')](function(_0x5701ff){_0x196b45=_0x5701ff;return getUser(_0x215ec5,_0x3b5c5c[_0xa57e('0x10')],_0x196b45);})['then'](function(_0x10e126){_0x1d0702=_0x10e126;logger['info'](_0xa57e('0x5d'),_0x1d0702['id']);return getEndUser(_0x215ec5,_0x30bbca['calleridname'],_0x30bbca['calleridnum'],_0x196b45);})[_0xa57e('0x30')](function(_0x50475f){_0x43041e=_0x50475f;logger[_0xa57e('0xe')](_0xa57e('0x5e'),_0x43041e['id']);return getTicket(_0x215ec5,_0x1d0702,_0x43041e,_0x411e50,_0x30bbca,_0x411e50[_0xa57e('0x5f')],_0x196b45,_0xa57e('0x60'));})[_0xa57e('0x30')](function(_0x443c13){_0x338e49=_0x443c13;logger[_0xa57e('0xe')](_0xa57e('0x61'));logger[_0xa57e('0xe')](_0xa57e('0x62'),_0x338e49['id']);return setRelationship(_0x196b45,_0x1d0702,_0x338e49,'users');})[_0xa57e('0x30')](function(){return setRelationship(_0x196b45,_0x43041e,_0x338e49,_0xa57e('0x63'));})[_0xa57e('0x30')](function(){return getServerInfo(_0x196b45);})[_0xa57e('0x30')](function(_0x311f7b){var _0x57e550=parseInt(_0x311f7b[_0xa57e('0x64')][_0xa57e('0x65')](0x0));var _0x36f3a3=util['format'](_0xa57e('0x66'),_0x215ec5[_0xa57e('0x54')],_0x338e49['id']);if(_0x57e550>0x6){_0x36f3a3=util[_0xa57e('0x2d')]('%s/#bwc/index.php?module=Calls&action=EditView&record=%s',_0x215ec5['remoteUri'],_0x338e49['id']);}logger[_0xa57e('0xe')]('[QUEUE]',_0xa57e('0x67'));emit(util[_0xa57e('0x2d')](_0xa57e('0x68'),_0x3b5c5c[_0xa57e('0x10')]),_0xa57e('0x69'),{'uri':_0x36f3a3});})[_0xa57e('0x6a')](function(_0x528e7f){logger['error'](_0xa57e('0x59'),JSON['stringify'](_0x528e7f));});};exports[_0xa57e('0x6b')]=function(_0x84b535,_0x5eca9b,_0xc40381,_0x486457,_0x3f30c2,_0x32dbae,_0x3b9434){var _0x205924,_0x425012,_0x3e5dd0,_0x137999;_0x32dbae['remoteUri']=intUtil[_0xa57e('0x55')](_0x32dbae[_0xa57e('0x54')]);_0x32dbae[_0xa57e('0x56')]=intUtil['stripTrailingSlash'](_0x32dbae[_0xa57e('0x56')]);def[_0xa57e('0x57')]=util[_0xa57e('0x2d')](_0xa57e('0x58'),_0x32dbae['remoteUri']);if(_0x3b9434&&_0x3b9434[_0xa57e('0x6c')]&&_0x3b9434[_0xa57e('0x6c')]!==_0xa57e('0x6d')){logger[_0xa57e('0xe')](_0xa57e('0x6e'),_0xa57e('0x6f'));_0x5eca9b[_0xa57e('0x5a')]=util[_0xa57e('0x2d')](_0xa57e('0x5b'),_0x32dbae[_0xa57e('0x56')],_0x5eca9b['uniqueid'],md5(_0x5eca9b['uniqueid']));}return getConnection(_0x32dbae)[_0xa57e('0x30')](function(_0x30d9bc){_0x137999=_0x30d9bc;return getUser(_0x32dbae,_0x486457['name'],_0x137999);})[_0xa57e('0x30')](function(_0x394cf2){_0x205924=_0x394cf2;logger[_0xa57e('0xe')](_0xa57e('0x5d'),_0x205924['id']);return getEndUser(_0x32dbae,_0x5eca9b[_0xa57e('0x70')],_0x5eca9b[_0xa57e('0x71')],_0x137999);})[_0xa57e('0x30')](function(_0xb2084c){_0x425012=_0xb2084c;logger['info'](_0xa57e('0x5e'),_0x425012['id']);return getTicket(_0x32dbae,_0x205924,_0x425012,_0xc40381,_0x5eca9b,_0xc40381[_0xa57e('0x5f')],_0x137999,'Outbound');})['then'](function(_0x268b9e){_0x3e5dd0=_0x268b9e;logger[_0xa57e('0xe')](_0xa57e('0x61'));logger[_0xa57e('0xe')](_0xa57e('0x62'),_0x3e5dd0['id']);return setRelationship(_0x137999,_0x205924,_0x3e5dd0,_0xa57e('0x72'));})[_0xa57e('0x30')](function(){return setRelationship(_0x137999,_0x425012,_0x3e5dd0,'contacts');})[_0xa57e('0x30')](function(){return getServerInfo(_0x137999);})[_0xa57e('0x30')](function(_0x323a42){var _0x530401=parseInt(_0x323a42[_0xa57e('0x64')][_0xa57e('0x65')](0x0));var _0x48eb2b=util[_0xa57e('0x2d')](_0xa57e('0x66'),_0x32dbae[_0xa57e('0x54')],_0x3e5dd0['id']);if(_0x530401>0x6){_0x48eb2b=util[_0xa57e('0x2d')](_0xa57e('0x73'),_0x32dbae[_0xa57e('0x54')],_0x3e5dd0['id']);}logger['info'](_0xa57e('0x6e'),'Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util['format'](_0xa57e('0x68'),_0x486457[_0xa57e('0x10')]),_0xa57e('0x69'),{'uri':_0x48eb2b});})['catch'](function(_0x36c348){logger[_0xa57e('0x74')](_0xa57e('0x6e'),JSON[_0xa57e('0x28')](_0x36c348));});};exports[_0xa57e('0x75')]=function(_0x22ce5f,_0x19b690,_0x26cd94,_0x574d1d,_0x193c92,_0x10c8de){var _0x5e83b1,_0x535ef5,_0x6cc98b,_0x280065;_0x10c8de[_0xa57e('0x54')]=intUtil['stripTrailingSlash'](_0x10c8de[_0xa57e('0x54')]);_0x10c8de[_0xa57e('0x56')]=intUtil[_0xa57e('0x55')](_0x10c8de[_0xa57e('0x56')]);def[_0xa57e('0x57')]=util['format'](_0xa57e('0x58'),_0x10c8de[_0xa57e('0x54')]);if(_0x193c92&&_0x193c92[_0xa57e('0x76')]){logger[_0xa57e('0xe')]('['+_0x19b690[_0xa57e('0x77')][_0xa57e('0x78')]()+']',_0xa57e('0x6f'));_0x19b690[_0xa57e('0x5a')]=util[_0xa57e('0x2d')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x10c8de[_0xa57e('0x56')],_0x19b690[_0xa57e('0x5c')],md5(_0x19b690[_0xa57e('0x5c')]));}else{_0x19b690[_0xa57e('0x5a')]='';}return getConnection(_0x10c8de)[_0xa57e('0x30')](function(_0x2313e3){_0x280065=_0x2313e3;if(!_['isNil'](_0x574d1d)){return getUser(_0x10c8de,_0x574d1d['name'],_0x280065);}else{return getUser(_0x10c8de,null,_0x280065);}})['then'](function(_0x33b686){_0x5e83b1=_0x33b686;logger[_0xa57e('0xe')](_0xa57e('0x5d'),_0x5e83b1['id']);return getEndUser(_0x10c8de,_0x19b690['calleridname'],_0x19b690[_0xa57e('0x79')],_0x280065);})[_0xa57e('0x30')](function(_0x2da772){_0x535ef5=_0x2da772;logger['info'](_0xa57e('0x5e'),_0x535ef5['id']);return getTicket(_0x10c8de,_0x5e83b1,_0x535ef5,_0x26cd94,_0x19b690,_0x26cd94[_0xa57e('0x5f')],_0x280065,_0xa57e('0x60'));})[_0xa57e('0x30')](function(_0x2c241b){_0x6cc98b=_0x2c241b;logger[_0xa57e('0xe')](_0xa57e('0x61'));logger[_0xa57e('0xe')]('The\x20Ticket\x20ID\x20is:',_0x6cc98b['id']);return setRelationship(_0x280065,_0x5e83b1,_0x6cc98b,_0xa57e('0x72'));})[_0xa57e('0x30')](function(){return setRelationship(_0x280065,_0x535ef5,_0x6cc98b,_0xa57e('0x63'));})[_0xa57e('0x30')](function(){return getServerInfo(_0x280065);})[_0xa57e('0x6a')](function(_0x266d5e){logger[_0xa57e('0x74')]('['+_0x19b690[_0xa57e('0x77')][_0xa57e('0x78')]()+']',JSON['stringify'](_0x266d5e));});};
\ No newline at end of file
+var _0xb417=['value','Agent\x20not\x20available,\x20using\x20the\x20admin\x20account!','resolve','user_id','contacts.phone_home\x20=\x20\x22%s\x22','phone_home','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','first_name','<unknown>','Caller\x20-\x20%s','then','Enduser\x20created.','debug','[HTTP]','map','type','string','nameField','customField','toLowerCase','content','toString','custom_fields','variable','Variable','login','username','PLAIN','xCALLY\x20Motion\x20integration','sessionID','set_relationship','serverUrl','uri','remoteUri','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Enduser\x20ID\x20is:','Ticket\x20created!','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','trigger:browser:url','catch','stripTrailingSlash','none','[OUTBOUND]','destcalleridname','destcalleridnum','Fields','contacts','version','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','unmanaged','%s/service/v4_1/rest.php','monitor_format','lastevent','toUpperCase','Inbound','error','lodash','request-promise','bluebird','md5','util','../../../../config/environment','sugarcrm','redis','defaults','localhost','socket.io-emitter','POST','emit','info','Creating\x20new\x20ticket...','getString','created_by','description','Descriptions','date_start','slice','duration_hours','duration_minutes','parent_type','Contacts','parent_name','length','forEach','variableName','push','idField','set_entry','JSON','stringify','Calls','format','Basic\x20%s','apiKey','get_server_info','isNil','Getting\x20agent\x20with\x20name','get_entry_list','INSTR\x20(\x20users.user_name,\x20\x22%s\x22)\x20>\x200','name','entry_list','user_name','name_value_list'];(function(_0x4babeb,_0x28aaa){var _0x40bc6f=function(_0x29559e){while(--_0x29559e){_0x4babeb['push'](_0x4babeb['shift']());}};_0x40bc6f(++_0x28aaa);}(_0xb417,0xb9));var _0x7b41=function(_0x3c3b81,_0x3bd581){_0x3c3b81=_0x3c3b81-0x0;var _0x5a1daa=_0xb417[_0x3c3b81];return _0x5a1daa;};'use strict';var _=require(_0x7b41('0x0'));var rp=require(_0x7b41('0x1'));var BPromise=require(_0x7b41('0x2'));var md5=require(_0x7b41('0x3'));var util=require(_0x7b41('0x4'));var Redis=require('ioredis');var intUtil=require('./util');var config=require(_0x7b41('0x5'));var logger=require('../../../../config/logger')(_0x7b41('0x6'));config[_0x7b41('0x7')]=_[_0x7b41('0x8')](config[_0x7b41('0x7')],{'host':_0x7b41('0x9'),'port':0x18eb});var io=require(_0x7b41('0xa'))(new Redis(config['redis']));var def={'method':_0x7b41('0xb'),'json':!![]};function emit(_0x39e786,_0x564689,_0x5c222e){io['to'](_0x39e786)[_0x7b41('0xc')](_0x564689,_0x5c222e);}function getTicket(_0x168df9,_0xe3bfe8,_0x557543,_0x739203,_0x1c5698,_0x4d6391,_0x1a180e,_0x421e84){logger[_0x7b41('0xd')](_0x7b41('0xe'));var _0x163121=new Date();var _0xc4f02f=[{'name':'name','value':intUtil[_0x7b41('0xf')](_0x739203['Subjects'],_0x1c5698,'\x20')},{'name':'assigned_user_id','value':_0xe3bfe8['id']},{'name':_0x7b41('0x10'),'value':_0xe3bfe8['id']},{'name':_0x7b41('0x11'),'value':intUtil[_0x7b41('0xf')](_0x739203[_0x7b41('0x12')],_0x1c5698,'\x0a')},{'name':_0x7b41('0x13'),'value':_0x163121['toISOString']()[_0x7b41('0x14')](0x0,0x13)['replace']('T','\x20')},{'name':_0x7b41('0x15'),'value':'0'},{'name':_0x7b41('0x16'),'value':'15'},{'name':'parent_id','value':_0x557543['id']},{'name':_0x7b41('0x17'),'value':_0x7b41('0x18')},{'name':_0x7b41('0x19'),'value':_0x557543['name']},{'name':'direction','value':_0x421e84}];if(_0x4d6391[_0x7b41('0x1a')]){_[_0x7b41('0x1b')](_0x4d6391,function(_0x35e1ee){if(_0x1c5698[_0x35e1ee[_0x7b41('0x1c')]]){_0xc4f02f[_0x7b41('0x1d')]({'name':_0x35e1ee[_0x7b41('0x1e')],'value':_0x1c5698[_0x35e1ee['variableName']]});}});}return request({'form':{'method':_0x7b41('0x1f'),'input_type':'JSON','response_type':_0x7b41('0x20'),'rest_data':JSON[_0x7b41('0x21')]({'session':_0x1a180e['id'],'module_name':_0x7b41('0x22'),'name_value_list':_0xc4f02f})}});}function getAuth(_0x4a40b3){return util[_0x7b41('0x23')](_0x7b41('0x24'),new Buffer(_0x4a40b3[_0x7b41('0x25')]+':X')['toString']('base64'));}function getServerInfo(_0x41bcf7){return request({'form':{'method':_0x7b41('0x26'),'input_type':_0x7b41('0x20'),'response_type':_0x7b41('0x20'),'rest_data':JSON[_0x7b41('0x21')]({'session':_0x41bcf7['id']})}});}function getUser(_0x354068,_0x1e092f,_0x531ef9){if(!_[_0x7b41('0x27')](_0x1e092f)){logger[_0x7b41('0xd')](_0x7b41('0x28'),_0x1e092f);return request({'form':{'method':_0x7b41('0x29'),'input_type':_0x7b41('0x20'),'response_type':'JSON','rest_data':JSON[_0x7b41('0x21')]({'session':_0x531ef9['id'],'module_name':'Employees','query':util['format'](_0x7b41('0x2a'),_0x1e092f),'order_by':'','offset':'0','select_fields':['id',_0x7b41('0x2b'),'user_name'],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})['then'](function(_0x3cd690){if(_0x3cd690['entry_list']['length']){var _0x16f2e7=_['find'](_0x3cd690[_0x7b41('0x2c')],function(_0x4776dd){return _0x4776dd['name_value_list'][_0x7b41('0x2d')]['value']===_0x1e092f;});if(_0x16f2e7){logger['info']('Agent\x20found!');return BPromise['resolve']({'id':_0x16f2e7[_0x7b41('0x2e')]['id'][_0x7b41('0x2f')],'name':_0x16f2e7['name_value_list'][_0x7b41('0x2b')]['value']});}}logger['info']('Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');return BPromise['resolve']({'id':_0x531ef9[_0x7b41('0x2e')]['user_id'][_0x7b41('0x2f')],'name':_0x531ef9['name_value_list'][_0x7b41('0x2d')][_0x7b41('0x2f')]});});}else{logger[_0x7b41('0xd')](_0x7b41('0x30'));return BPromise[_0x7b41('0x31')]({'id':_0x531ef9[_0x7b41('0x2e')][_0x7b41('0x32')][_0x7b41('0x2f')],'name':_0x531ef9['name_value_list'][_0x7b41('0x2d')][_0x7b41('0x2f')]});}}function getEndUser(_0x59dcf6,_0x2a1988,_0x265b0e,_0x555f16){logger[_0x7b41('0xd')]('Searching\x20enduser\x20with\x20phone',_0x265b0e);return request({'form':{'method':_0x7b41('0x29'),'input_type':_0x7b41('0x20'),'response_type':_0x7b41('0x20'),'rest_data':JSON[_0x7b41('0x21')]({'session':_0x555f16['id'],'module_name':_0x7b41('0x18'),'query':util[_0x7b41('0x23')](_0x7b41('0x33'),_0x265b0e),'order_by':'','offset':'0','select_fields':['id',_0x7b41('0x2b'),_0x7b41('0x34')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})['then'](function(_0x14f2a6){if(_0x14f2a6[_0x7b41('0x2c')][_0x7b41('0x1a')]){var _0x104097=_['find'](_0x14f2a6[_0x7b41('0x2c')],function(_0x3b83d9){return _0x3b83d9[_0x7b41('0x2e')][_0x7b41('0x34')][_0x7b41('0x2f')]===_0x265b0e;});if(_0x104097){logger['info'](_0x7b41('0x35'));return BPromise['resolve']({'id':_0x104097['name_value_list']['id'][_0x7b41('0x2f')],'name':_0x104097['name_value_list'][_0x7b41('0x2b')][_0x7b41('0x2f')],'phone':_0x104097[_0x7b41('0x2e')][_0x7b41('0x34')]['value']});}}else{logger[_0x7b41('0xd')](_0x7b41('0x36'));return request({'form':{'method':_0x7b41('0x1f'),'input_type':_0x7b41('0x20'),'response_type':_0x7b41('0x20'),'rest_data':JSON[_0x7b41('0x21')]({'session':_0x555f16['id'],'module_name':'Contacts','name_value_list':[{'name':_0x7b41('0x37'),'value':_0x2a1988!==_0x7b41('0x38')?_0x2a1988:util['format'](_0x7b41('0x39'),_0x265b0e)},{'name':'phone_home','value':_0x265b0e}]})}})[_0x7b41('0x3a')](function(_0x2d6546){logger[_0x7b41('0xd')](_0x7b41('0x3b'));return BPromise[_0x7b41('0x31')]({'id':_0x2d6546['id'],'name':_0x2d6546[_0x7b41('0x2c')][_0x7b41('0x37')][_0x7b41('0x2f')],'phone':_0x2d6546[_0x7b41('0x2c')]['phone_home']['value']});});}});}function request(_0x4197c3){logger[_0x7b41('0x3c')](_0x7b41('0x3d'),JSON[_0x7b41('0x21')](_0x4197c3));return rp(_['merge'](def,_0x4197c3));}function getTags(_0x471210,_0x144805){var _0xeb8b8f=[];if(_0x471210&&_0x471210[_0x7b41('0x1a')]>0x0){_0xeb8b8f=_[_0x7b41('0x3e')](_0x471210,_0x144805);}return _0xeb8b8f;}function getCustomFields(_0x3b0a0d,_0x3bb389){var _0x59cd4f=[];var _0x3a3c56={'custom_fields':[]};if(_0x3b0a0d['length']>0x0){_[_0x7b41('0x1b')](_0x3b0a0d,function(_0x145daa){if(_0x145daa[_0x7b41('0x3f')]===_0x7b41('0x40')&&_0x145daa[_0x7b41('0x41')]&&!_0x145daa[_0x7b41('0x42')]){_0x3a3c56[_0x145daa[_0x7b41('0x41')][_0x7b41('0x43')]()]=_0x145daa[_0x7b41('0x44')][_0x7b41('0x45')]();}else if(_0x145daa[_0x7b41('0x3f')]===_0x7b41('0x40')&&_0x145daa['idField']&&_0x145daa[_0x7b41('0x42')]){_0x3a3c56[_0x7b41('0x46')][_0x7b41('0x1d')]({'id':_0x145daa['idField'],'value':_0x145daa[_0x7b41('0x44')]['toString']()});}else if(_0x145daa[_0x7b41('0x3f')]===_0x7b41('0x47')&&_0x145daa[_0x7b41('0x1c')]&&_0x145daa['idField']&&_0x145daa[_0x7b41('0x42')]){_0x3bb389[_0x145daa['variableName']]&&_0x3a3c56[_0x7b41('0x46')][_0x7b41('0x1d')]({'id':_0x145daa[_0x7b41('0x1e')],'value':_0x3bb389[_0x145daa[_0x7b41('0x1c')]][_0x7b41('0x45')]()});}else if(_0x145daa[_0x7b41('0x3f')]==='customVariable'&&_0x145daa[_0x7b41('0x48')]&&_0x145daa[_0x7b41('0x48')][_0x7b41('0x2b')]&&_0x145daa['idField']&&_0x145daa[_0x7b41('0x42')]){_0x3bb389[_0x145daa['Variable'][_0x7b41('0x2b')][_0x7b41('0x43')]()]&&_0x3a3c56[_0x7b41('0x46')][_0x7b41('0x1d')]({'id':_0x145daa['idField'],'value':_0x3bb389[_0x145daa['Variable']['name'][_0x7b41('0x43')]()]['toString']()});}});}return _0x3a3c56;}function getConnection(_0x3604bf){return request({'method':'POST','form':{'method':_0x7b41('0x49'),'input_type':_0x7b41('0x20'),'response_type':_0x7b41('0x20'),'rest_data':JSON[_0x7b41('0x21')]({'user_auth':{'user_name':_0x3604bf[_0x7b41('0x4a')],'password':_0x3604bf['password'],'encryption':_0x7b41('0x4b')},'application':_0x7b41('0x4c')})}})['then'](function(_0x47d5c2){var _0x38647d=_0x47d5c2;if(_0x38647d['id']){def[_0x7b41('0x4d')]=_0x38647d['id'];return BPromise[_0x7b41('0x31')](_0x38647d);}else{throw new Error(util[_0x7b41('0x23')]('Account\x20%d\x20is\x20not\x20valid',_0x3604bf['id']));}});}function setRelationship(_0x560145,_0x19f04f,_0x551613,_0x11a1e5){return request({'form':{'method':_0x7b41('0x4e'),'input_type':_0x7b41('0x20'),'response_type':_0x7b41('0x20'),'rest_data':JSON[_0x7b41('0x21')]({'session':_0x560145['id'],'module_name':_0x7b41('0x22'),'module_id':_0x551613['id'],'link_field_name':_0x11a1e5,'related_ids':[_0x19f04f['id']],'name_value_list':[],'delete':0x0})}});}exports['queue']=function(_0x423069,_0x35f8d3,_0xfd7de0,_0x27564b,_0x2acaf0,_0x1ea16b){var _0x584a0b,_0x54f543,_0x141d5b,_0x5bcb5a;_0x1ea16b['remoteUri']=intUtil['stripTrailingSlash'](_0x1ea16b['remoteUri']);_0x1ea16b[_0x7b41('0x4f')]=intUtil['stripTrailingSlash'](_0x1ea16b['serverUrl']);def[_0x7b41('0x50')]=util[_0x7b41('0x23')]('%s/service/v4_1/rest.php',_0x1ea16b[_0x7b41('0x51')]);if(_0x2acaf0&&_0x2acaf0['monitor_format']){logger[_0x7b41('0xd')](_0x7b41('0x52'),_0x7b41('0x53'));_0x35f8d3[_0x7b41('0x54')]=util[_0x7b41('0x23')](_0x7b41('0x55'),_0x1ea16b[_0x7b41('0x4f')],_0x35f8d3[_0x7b41('0x56')],md5(_0x35f8d3[_0x7b41('0x56')]));}else{_0x35f8d3['recordingURL']='';}return getConnection(_0x1ea16b)['then'](function(_0xc91908){_0x5bcb5a=_0xc91908;return getUser(_0x1ea16b,_0x27564b[_0x7b41('0x2b')],_0x5bcb5a);})['then'](function(_0x3b200a){_0x584a0b=_0x3b200a;logger[_0x7b41('0xd')](_0x7b41('0x57'),_0x584a0b['id']);return getEndUser(_0x1ea16b,_0x35f8d3[_0x7b41('0x58')],_0x35f8d3[_0x7b41('0x59')],_0x5bcb5a);})[_0x7b41('0x3a')](function(_0x112e96){_0x54f543=_0x112e96;logger[_0x7b41('0xd')](_0x7b41('0x5a'),_0x54f543['id']);return getTicket(_0x1ea16b,_0x584a0b,_0x54f543,_0xfd7de0,_0x35f8d3,_0xfd7de0['Fields'],_0x5bcb5a,'Inbound');})[_0x7b41('0x3a')](function(_0xe3eb28){_0x141d5b=_0xe3eb28;logger[_0x7b41('0xd')](_0x7b41('0x5b'));logger[_0x7b41('0xd')](_0x7b41('0x5c'),_0x141d5b['id']);return setRelationship(_0x5bcb5a,_0x584a0b,_0x141d5b,_0x7b41('0x5d'));})[_0x7b41('0x3a')](function(){return setRelationship(_0x5bcb5a,_0x54f543,_0x141d5b,'contacts');})[_0x7b41('0x3a')](function(){return getServerInfo(_0x5bcb5a);})[_0x7b41('0x3a')](function(_0x3dd544){var _0x46ac80=parseInt(_0x3dd544['version'][_0x7b41('0x5e')](0x0));var _0x466b63=util['format'](_0x7b41('0x5f'),_0x1ea16b['remoteUri'],_0x141d5b['id']);if(_0x46ac80>0x6){_0x466b63=util[_0x7b41('0x23')](_0x7b41('0x60'),_0x1ea16b[_0x7b41('0x51')],_0x141d5b['id']);}logger['info'](_0x7b41('0x52'),'Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0x7b41('0x23')]('user:%s',_0x27564b['name']),_0x7b41('0x61'),{'uri':_0x466b63});})[_0x7b41('0x62')](function(_0x2ec3cb){logger['error'](_0x7b41('0x52'),JSON[_0x7b41('0x21')](_0x2ec3cb));});};exports['outbound']=function(_0x5b64c3,_0x3b184f,_0x2ec05b,_0x47b796,_0x23b1d7,_0xf31ffe,_0x2a8b26){var _0x46615f,_0x57dc23,_0x158278,_0x55269e;_0xf31ffe[_0x7b41('0x51')]=intUtil[_0x7b41('0x63')](_0xf31ffe[_0x7b41('0x51')]);_0xf31ffe[_0x7b41('0x4f')]=intUtil[_0x7b41('0x63')](_0xf31ffe[_0x7b41('0x4f')]);def[_0x7b41('0x50')]=util[_0x7b41('0x23')]('%s/service/v4_1/rest.php',_0xf31ffe['remoteUri']);if(_0x2a8b26&&_0x2a8b26['recordingFormat']&&_0x2a8b26['recordingFormat']!==_0x7b41('0x64')){logger['info'](_0x7b41('0x65'),_0x7b41('0x53'));_0x3b184f[_0x7b41('0x54')]=util[_0x7b41('0x23')](_0x7b41('0x55'),_0xf31ffe['serverUrl'],_0x3b184f[_0x7b41('0x56')],md5(_0x3b184f[_0x7b41('0x56')]));}return getConnection(_0xf31ffe)[_0x7b41('0x3a')](function(_0x295936){_0x55269e=_0x295936;return getUser(_0xf31ffe,_0x47b796['name'],_0x55269e);})[_0x7b41('0x3a')](function(_0x155f84){_0x46615f=_0x155f84;logger[_0x7b41('0xd')](_0x7b41('0x57'),_0x46615f['id']);return getEndUser(_0xf31ffe,_0x3b184f[_0x7b41('0x66')],_0x3b184f[_0x7b41('0x67')],_0x55269e);})[_0x7b41('0x3a')](function(_0x385485){_0x57dc23=_0x385485;logger[_0x7b41('0xd')](_0x7b41('0x5a'),_0x57dc23['id']);return getTicket(_0xf31ffe,_0x46615f,_0x57dc23,_0x2ec05b,_0x3b184f,_0x2ec05b[_0x7b41('0x68')],_0x55269e,'Outbound');})['then'](function(_0x5e647b){_0x158278=_0x5e647b;logger[_0x7b41('0xd')](_0x7b41('0x5b'));logger['info'](_0x7b41('0x5c'),_0x158278['id']);return setRelationship(_0x55269e,_0x46615f,_0x158278,_0x7b41('0x5d'));})[_0x7b41('0x3a')](function(){return setRelationship(_0x55269e,_0x57dc23,_0x158278,_0x7b41('0x69'));})[_0x7b41('0x3a')](function(){return getServerInfo(_0x55269e);})[_0x7b41('0x3a')](function(_0xe4dcbe){var _0x594f25=parseInt(_0xe4dcbe[_0x7b41('0x6a')][_0x7b41('0x5e')](0x0));var _0x32ddce=util['format'](_0x7b41('0x5f'),_0xf31ffe[_0x7b41('0x51')],_0x158278['id']);if(_0x594f25>0x6){_0x32ddce=util[_0x7b41('0x23')](_0x7b41('0x60'),_0xf31ffe['remoteUri'],_0x158278['id']);}logger[_0x7b41('0xd')](_0x7b41('0x65'),_0x7b41('0x6b'));emit(util[_0x7b41('0x23')](_0x7b41('0x6c'),_0x47b796['name']),_0x7b41('0x61'),{'uri':_0x32ddce});})['catch'](function(_0x24e0e8){logger['error'](_0x7b41('0x65'),JSON[_0x7b41('0x21')](_0x24e0e8));});};exports[_0x7b41('0x6d')]=function(_0x227617,_0x81f75c,_0x41cd18,_0x2bfb12,_0xb10199,_0x1ef820){var _0x48e01b,_0x3b09b8,_0x11eee4,_0x18d6dd;_0x1ef820['remoteUri']=intUtil[_0x7b41('0x63')](_0x1ef820['remoteUri']);_0x1ef820[_0x7b41('0x4f')]=intUtil[_0x7b41('0x63')](_0x1ef820[_0x7b41('0x4f')]);def[_0x7b41('0x50')]=util[_0x7b41('0x23')](_0x7b41('0x6e'),_0x1ef820['remoteUri']);if(_0xb10199&&_0xb10199[_0x7b41('0x6f')]){logger[_0x7b41('0xd')]('['+_0x81f75c[_0x7b41('0x70')][_0x7b41('0x71')]()+']',_0x7b41('0x53'));_0x81f75c[_0x7b41('0x54')]=util[_0x7b41('0x23')](_0x7b41('0x55'),_0x1ef820[_0x7b41('0x4f')],_0x81f75c[_0x7b41('0x56')],md5(_0x81f75c['uniqueid']));}else{_0x81f75c['recordingURL']='';}return getConnection(_0x1ef820)[_0x7b41('0x3a')](function(_0xc0e7c0){_0x18d6dd=_0xc0e7c0;if(!_['isNil'](_0x2bfb12)){return getUser(_0x1ef820,_0x2bfb12['name'],_0x18d6dd);}else{return getUser(_0x1ef820,null,_0x18d6dd);}})[_0x7b41('0x3a')](function(_0xaf17eb){_0x48e01b=_0xaf17eb;logger[_0x7b41('0xd')](_0x7b41('0x57'),_0x48e01b['id']);return getEndUser(_0x1ef820,_0x81f75c[_0x7b41('0x58')],_0x81f75c[_0x7b41('0x59')],_0x18d6dd);})[_0x7b41('0x3a')](function(_0x48d401){_0x3b09b8=_0x48d401;logger['info'](_0x7b41('0x5a'),_0x3b09b8['id']);return getTicket(_0x1ef820,_0x48e01b,_0x3b09b8,_0x41cd18,_0x81f75c,_0x41cd18[_0x7b41('0x68')],_0x18d6dd,_0x7b41('0x72'));})['then'](function(_0x539cc2){_0x11eee4=_0x539cc2;logger[_0x7b41('0xd')](_0x7b41('0x5b'));logger[_0x7b41('0xd')](_0x7b41('0x5c'),_0x11eee4['id']);return setRelationship(_0x18d6dd,_0x48e01b,_0x11eee4,'users');})[_0x7b41('0x3a')](function(){return setRelationship(_0x18d6dd,_0x3b09b8,_0x11eee4,_0x7b41('0x69'));})[_0x7b41('0x3a')](function(){return getServerInfo(_0x18d6dd);})[_0x7b41('0x62')](function(_0x4aef09){logger[_0x7b41('0x73')]('['+_0x81f75c[_0x7b41('0x70')][_0x7b41('0x71')]()+']',JSON[_0x7b41('0x21')](_0x4aef09));});};
\ No newline at end of file
index 412b70a..dd315a4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xed9b=['push','content','variable','variableName','toString','Variable','name','toLowerCase','keyValue','key','format','%s:\x20%s','customVariable','join','slice','substring','lastIndexOf','isNil','test','lodash','util','getString','length','sortBy','type','string'];(function(_0x3c486c,_0x4b79ce){var _0x93032f=function(_0x15645f){while(--_0x15645f){_0x3c486c['push'](_0x3c486c['shift']());}};_0x93032f(++_0x4b79ce);}(_0xed9b,0x117));var _0xbed9=function(_0x479509,_0x1daf8a){_0x479509=_0x479509-0x0;var _0x382da8=_0xed9b[_0x479509];return _0x382da8;};'use strict';var _=require(_0xbed9('0x0'));var util=require(_0xbed9('0x1'));exports[_0xbed9('0x2')]=function(_0x378e05,_0x3ffbf6,_0x27aec4){var _0x3759b4=[];if(_0x378e05[_0xbed9('0x3')]>0x0){var _0x30baa8=_[_0xbed9('0x4')](_0x378e05,['id']);for(var _0x55f7df=0x0;_0x55f7df<_0x30baa8['length'];_0x55f7df++){var _0x4c8bb1=_0x30baa8[_0x55f7df];if(_0x4c8bb1[_0xbed9('0x5')]===_0xbed9('0x6')){_0x3759b4[_0xbed9('0x7')](_0x4c8bb1[_0xbed9('0x8')]);}else if(_0x4c8bb1['type']===_0xbed9('0x9')&&_0x4c8bb1[_0xbed9('0xa')]){_0x3ffbf6[_0x4c8bb1[_0xbed9('0xa')]]&&_0x3759b4[_0xbed9('0x7')](_0x3ffbf6[_0x4c8bb1[_0xbed9('0xa')]][_0xbed9('0xb')]());}else if(_0x4c8bb1[_0xbed9('0x5')]==='customVariable'&&_0x4c8bb1['Variable']&&_0x4c8bb1[_0xbed9('0xc')]['name']){_0x3ffbf6[_0x4c8bb1[_0xbed9('0xc')][_0xbed9('0xd')]['toLowerCase']()]&&_0x3759b4[_0xbed9('0x7')](_0x3ffbf6[_0x4c8bb1[_0xbed9('0xc')][_0xbed9('0xd')][_0xbed9('0xe')]()]['toString']());}else if(_0x4c8bb1[_0xbed9('0x5')]===_0xbed9('0xf')){if(_0x4c8bb1['keyType']===_0xbed9('0x6')&&_0x4c8bb1[_0xbed9('0x10')]){_0x3759b4[_0xbed9('0x7')](util[_0xbed9('0x11')](_0xbed9('0x12'),_0x4c8bb1[_0xbed9('0x10')],_0x4c8bb1['keyContent']));}else if(_0x4c8bb1['keyType']===_0xbed9('0x9')&&_0x4c8bb1['variableName']&&_0x4c8bb1[_0xbed9('0x10')]){_0x3ffbf6[_0x4c8bb1[_0xbed9('0xa')]]&&_0x3759b4[_0xbed9('0x7')](util['format'](_0xbed9('0x12'),_0x4c8bb1[_0xbed9('0x10')],_0x3ffbf6[_0x4c8bb1[_0xbed9('0xa')]]));}else if(_0x4c8bb1['keyType']===_0xbed9('0x13')&&_0x4c8bb1[_0xbed9('0xc')]&&_0x4c8bb1[_0xbed9('0xc')][_0xbed9('0xd')]&&_0x4c8bb1[_0xbed9('0x10')]){_0x3ffbf6[_0x4c8bb1[_0xbed9('0xc')][_0xbed9('0xd')][_0xbed9('0xe')]()]&&_0x3759b4['push'](util[_0xbed9('0x11')](_0xbed9('0x12'),_0x4c8bb1[_0xbed9('0x10')],_0x3ffbf6[_0x4c8bb1[_0xbed9('0xc')][_0xbed9('0xd')]['toLowerCase']()]));}}}}return _0x3759b4[_0xbed9('0x14')](_0x27aec4);};exports['stripTrailingSlash']=function(_0xc1866d){var _0x57cbab=_0xc1866d[_0xbed9('0x15')](-0x1);if(_0x57cbab==='/'){_0xc1866d=_0xc1866d[_0xbed9('0x16')](0x0,_0xc1866d[_0xbed9('0x17')](_0x57cbab));}return _0xc1866d;};exports['validateEmail']=function(_0x5b330e){if(!_[_0xbed9('0x18')](_0x5b330e)&&_0x5b330e!==''){var _0x14955a=/^(([^<>()\[\]\\.,;:\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 _0x14955a[_0xbed9('0x19')](String(_0x5b330e)[_0xbed9('0xe')]());}else{return![];}};
\ No newline at end of file
+var _0xcee4=['util','getString','length','sortBy','type','string','push','content','variableName','toString','customVariable','Variable','name','toLowerCase','keyValue','keyType','key','format','%s:\x20%s','keyContent','variable','join','substring','isNil','test'];(function(_0x833f60,_0xac65d2){var _0x13becd=function(_0x46d2e5){while(--_0x46d2e5){_0x833f60['push'](_0x833f60['shift']());}};_0x13becd(++_0xac65d2);}(_0xcee4,0x1db));var _0x4cee=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0xcee4[_0x2f5ac5];return _0x37c9a8;};'use strict';var _=require('lodash');var util=require(_0x4cee('0x0'));exports[_0x4cee('0x1')]=function(_0x3e417e,_0xfa0766,_0x33fd68){var _0x3d23be=[];if(_0x3e417e[_0x4cee('0x2')]>0x0){var _0x2b525d=_[_0x4cee('0x3')](_0x3e417e,['id']);for(var _0x18af5c=0x0;_0x18af5c<_0x2b525d[_0x4cee('0x2')];_0x18af5c++){var _0x3ed953=_0x2b525d[_0x18af5c];if(_0x3ed953[_0x4cee('0x4')]===_0x4cee('0x5')){_0x3d23be[_0x4cee('0x6')](_0x3ed953[_0x4cee('0x7')]);}else if(_0x3ed953[_0x4cee('0x4')]==='variable'&&_0x3ed953[_0x4cee('0x8')]){_0xfa0766[_0x3ed953[_0x4cee('0x8')]]&&_0x3d23be[_0x4cee('0x6')](_0xfa0766[_0x3ed953[_0x4cee('0x8')]][_0x4cee('0x9')]());}else if(_0x3ed953[_0x4cee('0x4')]===_0x4cee('0xa')&&_0x3ed953[_0x4cee('0xb')]&&_0x3ed953[_0x4cee('0xb')][_0x4cee('0xc')]){_0xfa0766[_0x3ed953['Variable'][_0x4cee('0xc')][_0x4cee('0xd')]()]&&_0x3d23be['push'](_0xfa0766[_0x3ed953[_0x4cee('0xb')][_0x4cee('0xc')][_0x4cee('0xd')]()]['toString']());}else if(_0x3ed953['type']===_0x4cee('0xe')){if(_0x3ed953[_0x4cee('0xf')]==='string'&&_0x3ed953[_0x4cee('0x10')]){_0x3d23be[_0x4cee('0x6')](util[_0x4cee('0x11')](_0x4cee('0x12'),_0x3ed953[_0x4cee('0x10')],_0x3ed953[_0x4cee('0x13')]));}else if(_0x3ed953['keyType']===_0x4cee('0x14')&&_0x3ed953[_0x4cee('0x8')]&&_0x3ed953[_0x4cee('0x10')]){_0xfa0766[_0x3ed953[_0x4cee('0x8')]]&&_0x3d23be[_0x4cee('0x6')](util[_0x4cee('0x11')](_0x4cee('0x12'),_0x3ed953[_0x4cee('0x10')],_0xfa0766[_0x3ed953[_0x4cee('0x8')]]));}else if(_0x3ed953[_0x4cee('0xf')]==='customVariable'&&_0x3ed953[_0x4cee('0xb')]&&_0x3ed953[_0x4cee('0xb')][_0x4cee('0xc')]&&_0x3ed953[_0x4cee('0x10')]){_0xfa0766[_0x3ed953[_0x4cee('0xb')][_0x4cee('0xc')][_0x4cee('0xd')]()]&&_0x3d23be['push'](util[_0x4cee('0x11')](_0x4cee('0x12'),_0x3ed953['key'],_0xfa0766[_0x3ed953[_0x4cee('0xb')][_0x4cee('0xc')][_0x4cee('0xd')]()]));}}}}return _0x3d23be[_0x4cee('0x15')](_0x33fd68);};exports['stripTrailingSlash']=function(_0x49498f){var _0x4a74ac=_0x49498f['slice'](-0x1);if(_0x4a74ac==='/'){_0x49498f=_0x49498f[_0x4cee('0x16')](0x0,_0x49498f['lastIndexOf'](_0x4a74ac));}return _0x49498f;};exports['validateEmail']=function(_0x51b5dd){if(!_[_0x4cee('0x17')](_0x51b5dd)&&_0x51b5dd!==''){var _0x774bf1=/^(([^<>()\[\]\\.,;:\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 _0x774bf1[_0x4cee('0x18')](String(_0x51b5dd)[_0x4cee('0xd')]());}else{return![];}};
\ No newline at end of file
index 1412603..a06b9d0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe706=['result','Agent\x20found!','email1','first_name','last_name','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','userId','admin','getUser','username','Searching\x20end\x20user\x20with\x20phone','remoteUri','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','phone','catch','accessKey','getchallenge','token','Account\x20%d\x20is\x20not\x20valid','getConnection','queue','stripTrailingSlash','[QUEUE]','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','serverUrl','uniqueid','email','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Enduser\x20ID\x20is:','Fields','Ticket\x20created!','%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT','split','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','outbound','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','destcalleridname','destcalleridnum','The\x20Ticket\x20ID\x20is:','user:%s','unmanaged','lastevent','toUpperCase','lodash','request-promise','bluebird','util','ioredis','./util','../../../../config/environment','../../../../config/logger','vTiger','redis','defaults','localhost','socket.io-emitter','emit','length','forEach','includes','string','idField','content','toString','type','variable','variableName','Variable','name','toLowerCase','info','Creating\x20new\x20ticket...','merge','Normal','Open','Subjects','getString','Descriptions','POST','format','%s/webservice.php','create','stringify','then','success','resolve','Ticket\x20could\x20not\x20be\x20created\x20due\x20to:\x20%s','statusCode','error','[vTiger],\x20%s,\x20%s,\x20%s','validateEmail','Getting\x20agent\x20with\x20email','GET','query','sessionName','SELECT\x20first_name,\x20last_name,\x20email1\x20FROM\x20Users\x20WHERE\x20email1=\x27%s\x27;'];(function(_0x2acd64,_0x4e8ce8){var _0x3d3fce=function(_0x5570df){while(--_0x5570df){_0x2acd64['push'](_0x2acd64['shift']());}};_0x3d3fce(++_0x4e8ce8);}(_0xe706,0xa3));var _0x6e70=function(_0x254abd,_0x1ab7f0){_0x254abd=_0x254abd-0x0;var _0x31bf1b=_0xe706[_0x254abd];return _0x31bf1b;};'use strict';var _=require(_0x6e70('0x0'));var rp=require(_0x6e70('0x1'));var BPromise=require(_0x6e70('0x2'));var md5=require('md5');var util=require(_0x6e70('0x3'));var Redis=require(_0x6e70('0x4'));var intUtil=require(_0x6e70('0x5'));var config=require(_0x6e70('0x6'));var logger=require(_0x6e70('0x7'))(_0x6e70('0x8'));config[_0x6e70('0x9')]=_[_0x6e70('0xa')](config[_0x6e70('0x9')],{'host':_0x6e70('0xb'),'port':0x18eb});var io=require(_0x6e70('0xc'))(new Redis(config[_0x6e70('0x9')]));function emit(_0x45a2d4,_0x188ed3,_0x3c4843){io['to'](_0x45a2d4)[_0x6e70('0xd')](_0x188ed3,_0x3c4843);}function getCustomFields(_0x954545,_0x25e61c){var _0x100eb7={};if(_0x954545[_0x6e70('0xe')]>0x0){_[_0x6e70('0xf')](_0x954545,function(_0x3f474a){if(_[_0x6e70('0x10')]([_0x6e70('0x11'),'picklist'],_0x3f474a['type'])&&_0x3f474a[_0x6e70('0x12')]){_0x100eb7[_0x3f474a[_0x6e70('0x12')]]=_0x3f474a[_0x6e70('0x13')][_0x6e70('0x14')]();}else if(_0x3f474a[_0x6e70('0x15')]===_0x6e70('0x16')&&_0x3f474a[_0x6e70('0x17')]&&_0x3f474a[_0x6e70('0x12')]&&_0x25e61c[_0x3f474a['variableName']]){_0x100eb7[_0x3f474a['idField']]=_0x25e61c[_0x3f474a['variableName']][_0x6e70('0x14')]();}else if(_0x3f474a['type']==='customVariable'&&_0x3f474a[_0x6e70('0x18')]&&_0x3f474a[_0x6e70('0x18')]['name']&&_0x3f474a[_0x6e70('0x12')]&&_0x25e61c[_0x3f474a['Variable'][_0x6e70('0x19')][_0x6e70('0x1a')]()]){_0x100eb7[_0x3f474a['idField']]=_0x25e61c[_0x3f474a['Variable'][_0x6e70('0x19')]['toLowerCase']()][_0x6e70('0x14')]();}});}return _0x100eb7;}function createTicket(_0x173afe,_0x53acdc,_0x497d61,_0xc238ba,_0x208e21,_0x2368eb,_0x3a9978){logger[_0x6e70('0x1b')](_0x6e70('0x1c'));var _0x1b2453=_[_0x6e70('0x1d')]({'parent_id':'','assigned_user_id':_0x53acdc['id'],'ticketpriorities':_0x6e70('0x1e'),'ticketstatus':_0x6e70('0x1f'),'ticket_title':intUtil['getString'](_0xc238ba[_0x6e70('0x20')],_0x208e21,'\x20'),'description':intUtil[_0x6e70('0x21')](_0xc238ba[_0x6e70('0x22')],_0x208e21,'\x0a'),'contact_id':_0x497d61['id']},getCustomFields(_0x2368eb,_0x208e21));var _0x502b2d={'method':_0x6e70('0x23'),'uri':util[_0x6e70('0x24')](_0x6e70('0x25'),_0x173afe['remoteUri']),'form':{'operation':_0x6e70('0x26'),'username':_0x173afe['username'],'sessionName':_0x3a9978['sessionName'],'elementType':'HelpDesk','element':JSON[_0x6e70('0x27')](_0x1b2453)},'json':!![]};return request(_0x502b2d)[_0x6e70('0x28')](function(_0x51d292){if(_0x51d292[_0x6e70('0x29')]){return BPromise[_0x6e70('0x2a')]({'id':_0x51d292['result']['id']});}else{throw new Error(util[_0x6e70('0x24')](_0x6e70('0x2b'),JSON[_0x6e70('0x27')](_0x51d292['error'])));}})['catch'](function(_0x2c4d37){var _0x3af17f=_0x2c4d37[_0x6e70('0x2c')]||0x1f4;logger[_0x6e70('0x2d')](_0x6e70('0x2e'),'createTicket',_0x3af17f,JSON[_0x6e70('0x27')](_0x2c4d37));});}function getUser(_0x406f29,_0xecf336,_0x2864a0){if(intUtil[_0x6e70('0x2f')](_0xecf336)){logger[_0x6e70('0x1b')](_0x6e70('0x30'),_0xecf336);return request({'method':_0x6e70('0x31'),'uri':util[_0x6e70('0x24')](_0x6e70('0x25'),_0x406f29['remoteUri']),'qs':{'operation':_0x6e70('0x32'),'username':_0x406f29['username'],'sessionName':_0x2864a0[_0x6e70('0x33')],'query':util['format'](_0x6e70('0x34'),_0xecf336)},'json':!![]})[_0x6e70('0x28')](function(_0x30fa0b){if(_0x30fa0b['success']&&_0x30fa0b[_0x6e70('0x35')][_0x6e70('0xe')]){logger['info'](_0x6e70('0x36'));return BPromise[_0x6e70('0x2a')]({'id':_0x30fa0b['result'][0x0]['id'],'email':_0x30fa0b[_0x6e70('0x35')][0x0][_0x6e70('0x37')],'name':_0x30fa0b[_0x6e70('0x35')][0x0][_0x6e70('0x38')]+'\x20'+_0x30fa0b[_0x6e70('0x35')][_0x6e70('0x39')]});}else{logger[_0x6e70('0x1b')](_0x6e70('0x3a'));return BPromise[_0x6e70('0x2a')]({'id':_0x2864a0[_0x6e70('0x3b')],'email':_0x406f29['username'],'name':_0x6e70('0x3c')});}})['catch'](function(_0x23cd1a){var _0x3222a2=_0x23cd1a[_0x6e70('0x2c')]||0x1f4;logger[_0x6e70('0x2d')](_0x6e70('0x2e'),_0x6e70('0x3d'),_0x3222a2,JSON[_0x6e70('0x27')](_0x23cd1a));});}else{logger[_0x6e70('0x1b')](_0x6e70('0x3a'));return BPromise[_0x6e70('0x2a')]({'id':_0x2864a0[_0x6e70('0x3b')],'email':_0x406f29[_0x6e70('0x3e')],'name':_0x6e70('0x3c')})['catch'](function(_0x5446a2){var _0x5424eb=_0x5446a2[_0x6e70('0x2c')]||0x1f4;logger[_0x6e70('0x2d')](_0x6e70('0x2e'),_0x6e70('0x3d'),_0x5424eb,JSON[_0x6e70('0x27')](_0x5446a2));});}}function getEndUser(_0x3bdd87,_0x572a71,_0x3b508c,_0x9e7ad2){logger[_0x6e70('0x1b')](_0x6e70('0x3f'),_0x3b508c);return request({'method':_0x6e70('0x31'),'uri':util[_0x6e70('0x24')](_0x6e70('0x25'),_0x3bdd87[_0x6e70('0x40')]),'qs':{'operation':'query','username':_0x3bdd87[_0x6e70('0x3e')],'sessionName':_0x9e7ad2[_0x6e70('0x33')],'query':util[_0x6e70('0x24')](_0x6e70('0x41'),_0x3b508c,_0x3b508c,_0x3b508c,_0x3b508c,_0x3b508c)},'json':!![]})[_0x6e70('0x28')](function(_0x1de947){if(_0x1de947[_0x6e70('0x29')]&&_0x1de947['result']['length']){logger['info'](_0x6e70('0x42'));return BPromise[_0x6e70('0x2a')]({'id':_0x1de947[_0x6e70('0x35')][0x0]['id'],'name':_0x1de947[_0x6e70('0x35')][0x0][_0x6e70('0x43')]+'\x20'+_0x1de947['result'][0x0][_0x6e70('0x44')],'phone':_0x3b508c});}else{logger[_0x6e70('0x1b')](_0x6e70('0x45'));return request({'method':'POST','uri':util['format']('%s/webservice.php',_0x3bdd87[_0x6e70('0x40')]),'form':{'operation':'create','sessionName':_0x9e7ad2[_0x6e70('0x33')],'elementType':_0x6e70('0x46'),'element':JSON[_0x6e70('0x27')]({'lastname':_0x572a71,'phone':_0x3b508c,'assigned_user_id':'\x20'})},'json':!![]})[_0x6e70('0x28')](function(_0x59c87d){logger[_0x6e70('0x1b')]('Enduser\x20created.');return BPromise[_0x6e70('0x2a')]({'id':_0x59c87d[_0x6e70('0x35')]['id'],'name':_0x59c87d[_0x6e70('0x35')][_0x6e70('0x44')],'phone':_0x59c87d['result'][_0x6e70('0x47')]});})[_0x6e70('0x48')](function(_0x3d39c3){var _0xac87d6=_0x3d39c3[_0x6e70('0x2c')]||0x1f4;logger[_0x6e70('0x2d')](_0x6e70('0x2e'),'getEndUser',_0xac87d6,JSON[_0x6e70('0x27')](_0x3d39c3));});}});}function getConnection(_0x3884a4){var _0x10de2a=_0x3884a4[_0x6e70('0x3e')];var _0x3f86cf=_0x3884a4[_0x6e70('0x49')];return request({'method':_0x6e70('0x31'),'uri':util['format'](_0x6e70('0x25'),_0x3884a4['remoteUri']),'qs':{'operation':_0x6e70('0x4a'),'username':_0x10de2a},'json':!![]})[_0x6e70('0x28')](function(_0x4b351e){if(_0x4b351e['success']){return request({'method':_0x6e70('0x23'),'uri':util[_0x6e70('0x24')](_0x6e70('0x25'),_0x3884a4['remoteUri']),'form':{'operation':'login','username':_0x10de2a,'accessKey':md5(_0x4b351e[_0x6e70('0x35')][_0x6e70('0x4b')]+_0x3f86cf)},'json':!![]});}})[_0x6e70('0x28')](function(_0x79653){if(_0x79653[_0x6e70('0x29')]){return BPromise[_0x6e70('0x2a')](_0x79653['result']);}else{throw new Error(util[_0x6e70('0x24')](_0x6e70('0x4c'),_0x3884a4['id']));}})[_0x6e70('0x48')](function(_0x6ed023){var _0x2c3a7d=_0x6ed023['statusCode']||0x1f4;logger['error'](_0x6e70('0x2e'),_0x6e70('0x4d'),_0x2c3a7d,JSON[_0x6e70('0x27')](_0x6ed023));});}function request(_0x15f994){logger[_0x6e70('0x1b')]('[HTTP]',JSON[_0x6e70('0x27')](_0x15f994));return rp(_0x15f994);}exports[_0x6e70('0x4e')]=function(_0x1fa320,_0x23ebfb,_0x3aba34,_0x4a111a,_0x1142cd,_0x1dd242){var _0x2c20d3,_0x3fb0d3,_0x8ef4f7,_0x3fd03d;_0x1dd242['remoteUri']=intUtil[_0x6e70('0x4f')](_0x1dd242[_0x6e70('0x40')]);if(_0x1142cd&&_0x1142cd['monitor_format']){logger[_0x6e70('0x1b')](_0x6e70('0x50'),'Recording\x20is\x20enabled!');_0x23ebfb[_0x6e70('0x51')]=util[_0x6e70('0x24')](_0x6e70('0x52'),_0x1dd242[_0x6e70('0x53')],_0x23ebfb[_0x6e70('0x54')],md5(_0x23ebfb['uniqueid']));}else{_0x23ebfb[_0x6e70('0x51')]='';}return getConnection(_0x1dd242)[_0x6e70('0x28')](function(_0x10d655){_0x3fd03d=_0x10d655;return getUser(_0x1dd242,_0x4a111a[_0x6e70('0x55')],_0x3fd03d);})[_0x6e70('0x28')](function(_0x1fe13a){_0x2c20d3=_0x1fe13a;logger[_0x6e70('0x1b')](_0x6e70('0x56'),_0x2c20d3['id']);return getEndUser(_0x1dd242,_0x23ebfb[_0x6e70('0x57')],_0x23ebfb[_0x6e70('0x58')],_0x3fd03d);})[_0x6e70('0x28')](function(_0x1b12a1){_0x3fb0d3=_0x1b12a1;logger[_0x6e70('0x1b')](_0x6e70('0x59'),_0x3fb0d3['id']);return createTicket(_0x1dd242,_0x2c20d3,_0x3fb0d3,_0x3aba34,_0x23ebfb,_0x3aba34[_0x6e70('0x5a')],_0x3fd03d);})[_0x6e70('0x28')](function(_0x324fa6){_0x8ef4f7=_0x324fa6;logger[_0x6e70('0x1b')](_0x6e70('0x5b'));logger[_0x6e70('0x1b')]('The\x20Ticket\x20ID\x20is:',_0x8ef4f7['id']);var _0x28898a=util[_0x6e70('0x24')](_0x6e70('0x5c'),_0x1dd242[_0x6e70('0x40')],_[_0x6e70('0x5d')](_0x8ef4f7['id'],'x')[0x1]);logger[_0x6e70('0x1b')]('[QUEUE]',_0x6e70('0x5e'));emit(util[_0x6e70('0x24')]('user:%s',_0x4a111a[_0x6e70('0x19')]),_0x6e70('0x5f'),{'uri':_0x28898a});})[_0x6e70('0x48')](function(_0x590f7f){logger['error'](_0x6e70('0x50'),JSON[_0x6e70('0x27')](_0x590f7f));});};exports[_0x6e70('0x60')]=function(_0x41a861,_0x10d299,_0x739946,_0x30cd88,_0x57bfe5,_0x4d47e1,_0x2c8dc6){var _0x1e23c5,_0x2bf9ec,_0x2ad395,_0x5b1e6f;_0x4d47e1['remoteUri']=intUtil[_0x6e70('0x4f')](_0x4d47e1[_0x6e70('0x40')]);_0x4d47e1['serverUrl']=intUtil['stripTrailingSlash'](_0x4d47e1[_0x6e70('0x53')]);if(_0x2c8dc6&&_0x2c8dc6['recordingFormat']&&_0x2c8dc6[_0x6e70('0x61')]!==_0x6e70('0x62')){logger[_0x6e70('0x1b')](_0x6e70('0x63'),_0x6e70('0x64'));_0x10d299[_0x6e70('0x51')]=util[_0x6e70('0x24')](_0x6e70('0x52'),_0x4d47e1['serverUrl'],_0x10d299[_0x6e70('0x54')],md5(_0x10d299[_0x6e70('0x54')]));}return getConnection(_0x4d47e1)[_0x6e70('0x28')](function(_0x346c79){_0x5b1e6f=_0x346c79;return getUser(_0x4d47e1,_0x30cd88[_0x6e70('0x55')],_0x5b1e6f);})['then'](function(_0x5f5b02){_0x1e23c5=_0x5f5b02;logger['info'](_0x6e70('0x56'),_0x1e23c5['id']);return getEndUser(_0x4d47e1,_0x10d299[_0x6e70('0x65')],_0x10d299[_0x6e70('0x66')],_0x5b1e6f);})['then'](function(_0x58cf1c){_0x2bf9ec=_0x58cf1c;logger[_0x6e70('0x1b')](_0x6e70('0x59'),_0x2bf9ec['id']);return createTicket(_0x4d47e1,_0x1e23c5,_0x2bf9ec,_0x739946,_0x10d299,_0x739946[_0x6e70('0x5a')],_0x5b1e6f);})[_0x6e70('0x28')](function(_0x2285f1){_0x2ad395=_0x2285f1;logger[_0x6e70('0x1b')]('Ticket\x20created!');logger[_0x6e70('0x1b')](_0x6e70('0x67'),_0x2ad395['id']);var _0x30d11b=util[_0x6e70('0x24')]('%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT',_0x4d47e1[_0x6e70('0x40')],_['split'](_0x2ad395['id'],'x')[0x1]);logger['info'](_0x6e70('0x63'),_0x6e70('0x5e'));emit(util[_0x6e70('0x24')](_0x6e70('0x68'),_0x30cd88[_0x6e70('0x19')]),_0x6e70('0x5f'),{'uri':_0x30d11b});})['catch'](function(_0x370eeb){logger[_0x6e70('0x2d')](_0x6e70('0x63'),JSON[_0x6e70('0x27')](_0x370eeb));});};exports[_0x6e70('0x69')]=function(_0x13c092,_0x363722,_0xd9b4a9,_0x2f1362,_0x29621a,_0x575938){var _0x44c877,_0x303c5a,_0x577c3b,_0x5d398a;_0x575938['remoteUri']=intUtil[_0x6e70('0x4f')](_0x575938[_0x6e70('0x40')]);_0x575938[_0x6e70('0x53')]=intUtil[_0x6e70('0x4f')](_0x575938[_0x6e70('0x53')]);if(_0x29621a&&_0x29621a['monitor_format']){logger['info']('['+_0x363722[_0x6e70('0x6a')][_0x6e70('0x6b')]()+']','Recording\x20is\x20enabled!');_0x363722[_0x6e70('0x51')]=util[_0x6e70('0x24')](_0x6e70('0x52'),_0x575938[_0x6e70('0x53')],_0x363722[_0x6e70('0x54')],md5(_0x363722[_0x6e70('0x54')]));}else{_0x363722[_0x6e70('0x51')]='';}return getConnection(_0x575938)[_0x6e70('0x28')](function(_0x3650e9){_0x5d398a=_0x3650e9;return getUser(_0x575938,'',_0x5d398a);})[_0x6e70('0x28')](function(_0x347cc4){_0x44c877=_0x347cc4;logger[_0x6e70('0x1b')](_0x6e70('0x56'),_0x44c877['id']);return getEndUser(_0x575938,_0x363722[_0x6e70('0x57')],_0x363722['calleridnum'],_0x5d398a);})['then'](function(_0x39ed95){_0x303c5a=_0x39ed95;logger['info'](_0x6e70('0x59'),_0x303c5a['id']);return createTicket(_0x575938,_0x44c877,_0x303c5a,_0xd9b4a9,_0x363722,_0xd9b4a9['Fields'],_0x5d398a);})['then'](function(_0x402f6f){_0x577c3b=_0x402f6f;logger['info']('Ticket\x20created!');logger[_0x6e70('0x1b')](_0x6e70('0x67'),_0x577c3b['id']);})[_0x6e70('0x48')](function(_0x4e9fda){logger['error']('['+_0x363722['lastevent'][_0x6e70('0x6b')]()+']',JSON['stringify'](_0x4e9fda));});};
\ 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(_0x2ec15d,_0x31aef4){var _0x21cb11=function(_0xd6358b){while(--_0xd6358b){_0x2ec15d['push'](_0x2ec15d['shift']());}};_0x21cb11(++_0x31aef4);}(_0x9c44,0x178));var _0x49c4=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0x9c44[_0x4b369d];return _0x571a98;};'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 cf44bda..aba50a6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd3b8=['Variable','toString','queue','stripTrailingSlash','serverUrl','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','uniqueid','recordingURL','Authorization','email','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','integrationTab','Displaying\x20ticket\x20to\x20agent...','newTab','user:%s','replace','error','Zendesk\x20account\x20type\x20not\x20recognized','catch','inspect','outbound','recordingFormat','none','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','destcalleridname','%s/channels/voice/agents/%d/tickets/%d/display.json','[OUTBOUND]','%s/agent/tickets/%s','/api/v2','[OUTBOUND]\x20Error\x20running\x20Zendesk\x20integration','unmanaged','lastevent','toUpperCase','lodash','request-promise','util','ioredis','../../../../config/environment','../../../../config/logger','zendesk','redis','localhost','socket.io-emitter','emit','application/json','info','format','%s/tickets.json','remoteUri','merge','Tags','name','getString','Subjects','Descriptions','then','ticket','validateEmail','Getting\x20agent\x20with\x20email','%s/search.json','type:user\x20role:agent\x20email:%s','count','Agent\x20found!','results','agent','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/users/me.json','Admin\x20account\x20selected.','user','type:user\x20role:end-user\x20phone:%s','end-user','length','first','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','%s/users.json','POST','Enduser\x20created.','authType','password','%s:%s','username','token','%s/token:%s','Basic\x20%s','base64','debug','stringify','defaults','GET','map','forEach','includes','nameField','content','string','picklist','type','idField','custom_fields','push','variable','variableName','customField','customVariable','toLowerCase'];(function(_0x3a4203,_0xa6ff2e){var _0x1a5661=function(_0x584f45){while(--_0x584f45){_0x3a4203['push'](_0x3a4203['shift']());}};_0x1a5661(++_0xa6ff2e);}(_0xd3b8,0x97));var _0x8d3b=function(_0x21b99d,_0x46fbc9){_0x21b99d=_0x21b99d-0x0;var _0x31335a=_0xd3b8[_0x21b99d];return _0x31335a;};'use strict';var _=require(_0x8d3b('0x0'));var rp=require(_0x8d3b('0x1'));var md5=require('md5');var util=require(_0x8d3b('0x2'));var Redis=require(_0x8d3b('0x3'));var intUtil=require('./util');var config=require(_0x8d3b('0x4'));var logger=require(_0x8d3b('0x5'))(_0x8d3b('0x6'));config[_0x8d3b('0x7')]=_['defaults'](config[_0x8d3b('0x7')],{'host':_0x8d3b('0x8'),'port':0x18eb});var io=require(_0x8d3b('0x9'))(new Redis(config[_0x8d3b('0x7')]));function emit(_0x109b88,_0x588b97,_0x2c8cd4){io['to'](_0x109b88)[_0x8d3b('0xa')](_0x588b97,_0x2c8cd4);}var headers={'Content-Type':'application/json','Accept':_0x8d3b('0xb')};function getTicket(_0x256827,_0xeca1b0,_0x27ecf0,_0x331c8c,_0x1613c8){logger[_0x8d3b('0xc')]('Creating\x20new\x20ticket...');return request({'uri':util[_0x8d3b('0xd')](_0x8d3b('0xe'),_0x256827[_0x8d3b('0xf')]),'method':'POST','body':{'ticket':_[_0x8d3b('0x10')]({'requester_id':_0x27ecf0['id'],'submitter_id':_0xeca1b0?_0xeca1b0['id']:undefined,'assignee_id':_0xeca1b0?_0xeca1b0['id']:undefined,'tags':getTags(_0x331c8c[_0x8d3b('0x11')],_0x8d3b('0x12')),'subject':intUtil[_0x8d3b('0x13')](_0x331c8c[_0x8d3b('0x14')],_0x1613c8,'\x20'),'description':intUtil[_0x8d3b('0x13')](_0x331c8c[_0x8d3b('0x15')],_0x1613c8,'\x0a'),'comment':{'public':![],'body':intUtil[_0x8d3b('0x13')](_0x331c8c[_0x8d3b('0x15')],_0x1613c8,'\x0a')}},getCustomFields(_0x331c8c['Fields'],_0x1613c8))}})[_0x8d3b('0x16')](function(_0x4e5551){logger['info']('Ticket\x20created!');return _0x4e5551[_0x8d3b('0x17')];});}function getUser(_0x312755,_0x4b84a){if(intUtil[_0x8d3b('0x18')](_0x4b84a)){logger[_0x8d3b('0xc')](_0x8d3b('0x19'),_0x4b84a);return request({'uri':util[_0x8d3b('0xd')](_0x8d3b('0x1a'),_0x312755['remoteUri']),'qs':{'query':util[_0x8d3b('0xd')](_0x8d3b('0x1b'),_0x4b84a)}})[_0x8d3b('0x16')](function(_0x3c59ec){if(_0x3c59ec[_0x8d3b('0x1c')]){logger[_0x8d3b('0xc')](_0x8d3b('0x1d'));return _['find'](_0x3c59ec[_0x8d3b('0x1e')],{'email':_0x4b84a,'role':_0x8d3b('0x1f')});}else{logger[_0x8d3b('0xc')](_0x8d3b('0x20'));return request({'uri':util[_0x8d3b('0xd')](_0x8d3b('0x21'),_0x312755['remoteUri'])})[_0x8d3b('0x16')](function(_0x367446){logger[_0x8d3b('0xc')](_0x8d3b('0x22'));return _0x367446['user'];});}});}else{logger[_0x8d3b('0xc')](_0x8d3b('0x20'));return request({'uri':util[_0x8d3b('0xd')](_0x8d3b('0x21'),_0x312755[_0x8d3b('0xf')])})[_0x8d3b('0x16')](function(_0x27153b){logger[_0x8d3b('0xc')](_0x8d3b('0x22'));return _0x27153b[_0x8d3b('0x23')];});}}function getEndUser(_0x42281f,_0x4e1c39,_0x463210){logger[_0x8d3b('0xc')]('Searching\x20enduser\x20with\x20phone',_0x463210);return request({'uri':util['format'](_0x8d3b('0x1a'),_0x42281f[_0x8d3b('0xf')]),'qs':{'query':util[_0x8d3b('0xd')](_0x8d3b('0x24'),_0x463210)}})[_0x8d3b('0x16')](function(_0x341371){var _0x295dcb;if(_0x341371[_0x8d3b('0x1e')]['length']){_0x341371['results']=_['filter'](_0x341371[_0x8d3b('0x1e')],{'suspended':![],'role':_0x8d3b('0x25')});if(_0x341371[_0x8d3b('0x1e')][_0x8d3b('0x26')]){_0x295dcb=_[_0x8d3b('0x27')](_0x341371[_0x8d3b('0x1e')]);}}if(_0x295dcb){logger[_0x8d3b('0xc')](_0x8d3b('0x28'));return _0x295dcb;}else{logger[_0x8d3b('0xc')](_0x8d3b('0x29'));return request({'uri':util[_0x8d3b('0xd')](_0x8d3b('0x2a'),_0x42281f[_0x8d3b('0xf')]),'method':_0x8d3b('0x2b'),'body':{'user':{'role':_0x8d3b('0x25'),'name':util['format']('Caller\x20-\x20%s',_0x4e1c39||_0x463210),'phone':_0x463210}}})['then'](function(_0x40b78c){logger['info'](_0x8d3b('0x2c'));return _0x40b78c[_0x8d3b('0x23')];});}});}function getAuth(_0x2b5374){var _0x4a1132;if(_0x2b5374[_0x8d3b('0x2d')]===_0x8d3b('0x2e')){_0x4a1132=util[_0x8d3b('0xd')](_0x8d3b('0x2f'),_0x2b5374[_0x8d3b('0x30')],_0x2b5374[_0x8d3b('0x2e')]);}else if(_0x2b5374[_0x8d3b('0x2d')]===_0x8d3b('0x31')){_0x4a1132=util[_0x8d3b('0xd')](_0x8d3b('0x32'),_0x2b5374[_0x8d3b('0x30')],_0x2b5374[_0x8d3b('0x31')]);}return util[_0x8d3b('0xd')](_0x8d3b('0x33'),new Buffer(_0x4a1132)['toString'](_0x8d3b('0x34')));}function request(_0x53490d){logger[_0x8d3b('0x35')]('[HTTP]',JSON[_0x8d3b('0x36')](_0x53490d));return rp(_[_0x8d3b('0x37')](_0x53490d,{'method':_0x8d3b('0x38'),'headers':headers,'json':!![]}));}function getTags(_0x1ef106,_0x15b2bc){var _0xfd1499=[];if(_0x1ef106&&_0x1ef106[_0x8d3b('0x26')]>0x0){_0xfd1499=_[_0x8d3b('0x39')](_0x1ef106,_0x15b2bc);}return _0xfd1499;}function getCustomFields(_0x32e78d,_0x6c49ac){var _0x8d6791=[];var _0x4cd760={'custom_fields':[]};if(_0x32e78d['length']>0x0){_[_0x8d3b('0x3a')](_0x32e78d,function(_0x2944dc){if(_[_0x8d3b('0x3b')](['string','picklist'],_0x2944dc['type'])&&_0x2944dc[_0x8d3b('0x3c')]&&!_0x2944dc['customField']){_0x4cd760[_0x2944dc[_0x8d3b('0x3c')]['toLowerCase']()]=_0x2944dc[_0x8d3b('0x3d')]['toString']();}else if(_['includes']([_0x8d3b('0x3e'),_0x8d3b('0x3f')],_0x2944dc[_0x8d3b('0x40')])&&_0x2944dc[_0x8d3b('0x41')]&&_0x2944dc['customField']){_0x4cd760[_0x8d3b('0x42')][_0x8d3b('0x43')]({'id':_0x2944dc[_0x8d3b('0x41')],'value':_0x2944dc[_0x8d3b('0x3d')]['toString']()});}else if(_0x2944dc[_0x8d3b('0x40')]===_0x8d3b('0x44')&&_0x2944dc[_0x8d3b('0x45')]&&_0x2944dc['idField']&&_0x2944dc[_0x8d3b('0x46')]){_0x6c49ac[_0x2944dc['variableName']]&&_0x4cd760[_0x8d3b('0x42')][_0x8d3b('0x43')]({'id':_0x2944dc[_0x8d3b('0x41')],'value':_0x6c49ac[_0x2944dc[_0x8d3b('0x45')]]['toString']()});}else if(_0x2944dc[_0x8d3b('0x40')]===_0x8d3b('0x47')&&_0x2944dc['Variable']&&_0x2944dc['Variable']['name']&&_0x2944dc['idField']&&_0x2944dc[_0x8d3b('0x46')]){_0x6c49ac[_0x2944dc['Variable'][_0x8d3b('0x12')][_0x8d3b('0x48')]()]&&_0x4cd760[_0x8d3b('0x42')][_0x8d3b('0x43')]({'id':_0x2944dc[_0x8d3b('0x41')],'value':_0x6c49ac[_0x2944dc[_0x8d3b('0x49')][_0x8d3b('0x12')]['toLowerCase']()][_0x8d3b('0x4a')]()});}});}return _0x4cd760;}exports[_0x8d3b('0x4b')]=function(_0x4e8fb4,_0x20079c,_0x29f4b7,_0x3a2eab,_0x181957,_0x335089){var _0xbb0441,_0x54a6c3;_0x335089[_0x8d3b('0xf')]=intUtil[_0x8d3b('0x4c')](_0x335089[_0x8d3b('0xf')]);_0x335089[_0x8d3b('0x4d')]=intUtil[_0x8d3b('0x4c')](_0x335089[_0x8d3b('0x4d')]);if(_0x181957&&_0x181957[_0x8d3b('0x4e')]){logger['info'](_0x8d3b('0x4f'),_0x8d3b('0x50'));_0x20079c['recordingURL']=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x335089[_0x8d3b('0x4d')],_0x20079c[_0x8d3b('0x51')],md5(_0x20079c[_0x8d3b('0x51')]));}else{_0x20079c[_0x8d3b('0x52')]='';}headers[_0x8d3b('0x53')]=getAuth(_0x335089);return getUser(_0x335089,_0x3a2eab[_0x8d3b('0x54')])['then'](function(_0x10c7ff){_0xbb0441=_0x10c7ff;logger[_0x8d3b('0xc')](_0x8d3b('0x55'),_0xbb0441['id']);return getEndUser(_0x335089,_0x20079c[_0x8d3b('0x56')],_0x20079c[_0x8d3b('0x57')]);})[_0x8d3b('0x16')](function(_0x21ccf7){_0x54a6c3=_0x21ccf7;logger[_0x8d3b('0xc')](_0x8d3b('0x58'),_0x54a6c3['id']);return getTicket(_0x335089,_0xbb0441,_0x54a6c3,_0x29f4b7,_0x20079c);})['then'](function(_0x2bf943){if(_0x2bf943){logger['info'](_0x8d3b('0x59'),_0x2bf943['id']);switch(_0x335089[_0x8d3b('0x40')]){case _0x8d3b('0x5a'):logger[_0x8d3b('0xc')](_0x8d3b('0x4f'),_0x8d3b('0x5b'));return request({'uri':util[_0x8d3b('0xd')]('%s/channels/voice/agents/%d/tickets/%d/display.json',_0x335089['remoteUri'],_0xbb0441['id'],_0x2bf943['id']),'method':_0x8d3b('0x2b')});case _0x8d3b('0x5c'):logger['info'](_0x8d3b('0x4f'),'Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util['format'](_0x8d3b('0x5d'),_0x3a2eab[_0x8d3b('0x12')]),'trigger:browser:url',{'uri':util[_0x8d3b('0xd')]('%s/agent/tickets/%s',_0x335089[_0x8d3b('0xf')][_0x8d3b('0x5e')]('/api/v2',''),_0x2bf943['id'])});break;default:logger[_0x8d3b('0x5f')](_0x8d3b('0x4f'),_0x8d3b('0x60'));}}})[_0x8d3b('0x61')](function(_0x44cb7e){logger['error']('[QUEUE]\x20Error\x20running\x20Zendesk\x20integration',util[_0x8d3b('0x62')](_0x44cb7e,{'showHidden':!![],'depth':null}));});};exports[_0x8d3b('0x63')]=function(_0x3e570d,_0x21b77c,_0x2881aa,_0x5aef0a,_0x296c2e,_0x2c9abd,_0x307b83){var _0x4467cb,_0x40eadd;_0x2c9abd['remoteUri']=intUtil[_0x8d3b('0x4c')](_0x2c9abd['remoteUri']);_0x2c9abd[_0x8d3b('0x4d')]=intUtil['stripTrailingSlash'](_0x2c9abd[_0x8d3b('0x4d')]);if(_0x307b83&&_0x307b83[_0x8d3b('0x64')]&&_0x307b83[_0x8d3b('0x64')]!==_0x8d3b('0x65')){logger[_0x8d3b('0xc')]('[OUTBOUND]','Recording\x20is\x20enabled!');_0x21b77c['recordingURL']=util[_0x8d3b('0xd')](_0x8d3b('0x66'),_0x2c9abd[_0x8d3b('0x4d')],_0x21b77c['uniqueid'],md5(_0x21b77c[_0x8d3b('0x51')]));}headers[_0x8d3b('0x53')]=getAuth(_0x2c9abd);return getUser(_0x2c9abd,_0x5aef0a[_0x8d3b('0x54')])[_0x8d3b('0x16')](function(_0x5c140f){_0x4467cb=_0x5c140f;logger[_0x8d3b('0xc')](_0x8d3b('0x55'),_0x4467cb['id']);return getEndUser(_0x2c9abd,_0x21b77c[_0x8d3b('0x67')],_0x21b77c['destcalleridnum']);})[_0x8d3b('0x16')](function(_0x520991){_0x40eadd=_0x520991;logger[_0x8d3b('0xc')](_0x8d3b('0x58'),_0x40eadd['id']);return getTicket(_0x2c9abd,_0x4467cb,_0x40eadd,_0x2881aa,_0x21b77c);})['then'](function(_0x1f8619){if(_0x1f8619){logger[_0x8d3b('0xc')](_0x8d3b('0x59'),_0x1f8619['id']);switch(_0x2c9abd['type']){case _0x8d3b('0x5a'):logger['info']('[OUTBOUND]',_0x8d3b('0x5b'));return request({'uri':util[_0x8d3b('0xd')](_0x8d3b('0x68'),_0x2c9abd['remoteUri'],_0x4467cb['id'],_0x1f8619['id']),'method':_0x8d3b('0x2b')});case'newTab':logger['info'](_0x8d3b('0x69'),'Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0x8d3b('0xd')](_0x8d3b('0x5d'),_0x5aef0a[_0x8d3b('0x12')]),'trigger:browser:url',{'uri':util[_0x8d3b('0xd')](_0x8d3b('0x6a'),_0x2c9abd[_0x8d3b('0xf')][_0x8d3b('0x5e')](_0x8d3b('0x6b'),''),_0x1f8619['id'])});break;default:logger['error'](_0x8d3b('0x69'),'Zendesk\x20account\x20type\x20not\x20recognized');}}})[_0x8d3b('0x61')](function(_0x1e5343){logger[_0x8d3b('0x5f')](_0x8d3b('0x6c'),util[_0x8d3b('0x62')](_0x1e5343,{'showHidden':!![],'depth':null}));});};exports[_0x8d3b('0x6d')]=function(_0x2af63a,_0x1ae588,_0x574f0a,_0x3dfa31,_0x5c5e63,_0xf8b636){var _0x332428,_0x753813;_0xf8b636['remoteUri']=intUtil[_0x8d3b('0x4c')](_0xf8b636[_0x8d3b('0xf')]);_0xf8b636[_0x8d3b('0x4d')]=intUtil['stripTrailingSlash'](_0xf8b636[_0x8d3b('0x4d')]);if(_0x5c5e63&&_0x5c5e63[_0x8d3b('0x4e')]){logger[_0x8d3b('0xc')]('['+_0x1ae588[_0x8d3b('0x6e')][_0x8d3b('0x6f')]()+']',_0x8d3b('0x50'));_0x1ae588[_0x8d3b('0x52')]=util['format'](_0x8d3b('0x66'),_0xf8b636['serverUrl'],_0x1ae588[_0x8d3b('0x51')],md5(_0x1ae588['uniqueid']));}else{_0x1ae588['recordingURL']='';}headers[_0x8d3b('0x53')]=getAuth(_0xf8b636);return getUser(_0xf8b636)[_0x8d3b('0x16')](function(_0x2adf02){_0x332428=_0x2adf02;logger['info'](_0x8d3b('0x55'),_0x332428['id']);return getEndUser(_0xf8b636,_0x1ae588[_0x8d3b('0x56')],_0x1ae588[_0x8d3b('0x57')]);})[_0x8d3b('0x16')](function(_0x3a0e6d){_0x753813=_0x3a0e6d;logger['info'](_0x8d3b('0x58'),_0x753813['id']);return getTicket(_0xf8b636,_0x332428,_0x753813,_0x574f0a,_0x1ae588);})[_0x8d3b('0x16')](function(_0x23f68a){if(_0x23f68a){logger['info'](_0x8d3b('0x59'),_0x23f68a['id']);}})[_0x8d3b('0x61')](function(_0x3d5706){logger[_0x8d3b('0x5f')]('['+_0x1ae588[_0x8d3b('0x6e')][_0x8d3b('0x6f')]()+']'+'\x20Error\x20running\x20Zendesk\x20integration',util[_0x8d3b('0x62')](_0x3d5706,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
+var _0xb885=['replace','[OUTBOUND]\x20Error\x20running\x20Zendesk\x20integration','unmanaged','monitor_format','lastevent','toUpperCase','util','./util','../../../../config/environment','../../../../config/logger','zendesk','redis','defaults','localhost','socket.io-emitter','emit','application/json','info','Creating\x20new\x20ticket...','format','remoteUri','POST','Tags','name','getString','Subjects','Descriptions','Fields','Ticket\x20created!','validateEmail','Getting\x20agent\x20with\x20email','%s/search.json','type:user\x20role:agent\x20email:%s','then','count','Agent\x20found!','find','agent','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/users/me.json','user','Searching\x20enduser\x20with\x20phone','results','length','end-user','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','%s/users.json','Caller\x20-\x20%s','Enduser\x20created.','authType','password','%s:%s','username','token','%s/token:%s','toString','base64','debug','[HTTP]','stringify','GET','map','includes','string','picklist','type','nameField','toLowerCase','content','push','variableName','customField','idField','custom_fields','Variable','queue','stripTrailingSlash','serverUrl','Recording\x20is\x20enabled!','uniqueid','recordingURL','email','The\x20User\x20ID\x20is:','calleridnum','The\x20Enduser\x20ID\x20is:','[QUEUE]','Displaying\x20ticket\x20to\x20agent...','%s/channels/voice/agents/%d/tickets/%d/display.json','newTab','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','%s/agent/tickets/%s','/api/v2','Zendesk\x20account\x20type\x20not\x20recognized','catch','error','[QUEUE]\x20Error\x20running\x20Zendesk\x20integration','inspect','recordingFormat','none','[OUTBOUND]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','destcalleridname','destcalleridnum','The\x20Ticket\x20ID\x20is:'];(function(_0x58f726,_0x130d4b){var _0x1bf5c=function(_0x2fe70f){while(--_0x2fe70f){_0x58f726['push'](_0x58f726['shift']());}};_0x1bf5c(++_0x130d4b);}(_0xb885,0x1b2));var _0x5b88=function(_0x2d1971,_0x20b764){_0x2d1971=_0x2d1971-0x0;var _0x4d7759=_0xb885[_0x2d1971];return _0x4d7759;};'use strict';var _=require('lodash');var rp=require('request-promise');var md5=require('md5');var util=require(_0x5b88('0x0'));var Redis=require('ioredis');var intUtil=require(_0x5b88('0x1'));var config=require(_0x5b88('0x2'));var logger=require(_0x5b88('0x3'))(_0x5b88('0x4'));config[_0x5b88('0x5')]=_[_0x5b88('0x6')](config[_0x5b88('0x5')],{'host':_0x5b88('0x7'),'port':0x18eb});var io=require(_0x5b88('0x8'))(new Redis(config[_0x5b88('0x5')]));function emit(_0x56fda7,_0x309958,_0x137f17){io['to'](_0x56fda7)[_0x5b88('0x9')](_0x309958,_0x137f17);}var headers={'Content-Type':_0x5b88('0xa'),'Accept':_0x5b88('0xa')};function getTicket(_0x36baf,_0x4353e9,_0x57fcac,_0x22d788,_0x3968dd){logger[_0x5b88('0xb')](_0x5b88('0xc'));return request({'uri':util[_0x5b88('0xd')]('%s/tickets.json',_0x36baf[_0x5b88('0xe')]),'method':_0x5b88('0xf'),'body':{'ticket':_['merge']({'requester_id':_0x57fcac['id'],'submitter_id':_0x4353e9?_0x4353e9['id']:undefined,'assignee_id':_0x4353e9?_0x4353e9['id']:undefined,'tags':getTags(_0x22d788[_0x5b88('0x10')],_0x5b88('0x11')),'subject':intUtil[_0x5b88('0x12')](_0x22d788[_0x5b88('0x13')],_0x3968dd,'\x20'),'description':intUtil['getString'](_0x22d788[_0x5b88('0x14')],_0x3968dd,'\x0a'),'comment':{'public':![],'body':intUtil[_0x5b88('0x12')](_0x22d788['Descriptions'],_0x3968dd,'\x0a')}},getCustomFields(_0x22d788[_0x5b88('0x15')],_0x3968dd))}})['then'](function(_0x8fa247){logger[_0x5b88('0xb')](_0x5b88('0x16'));return _0x8fa247['ticket'];});}function getUser(_0x43e476,_0x546ed1){if(intUtil[_0x5b88('0x17')](_0x546ed1)){logger[_0x5b88('0xb')](_0x5b88('0x18'),_0x546ed1);return request({'uri':util[_0x5b88('0xd')](_0x5b88('0x19'),_0x43e476['remoteUri']),'qs':{'query':util['format'](_0x5b88('0x1a'),_0x546ed1)}})[_0x5b88('0x1b')](function(_0x23a65c){if(_0x23a65c[_0x5b88('0x1c')]){logger[_0x5b88('0xb')](_0x5b88('0x1d'));return _[_0x5b88('0x1e')](_0x23a65c['results'],{'email':_0x546ed1,'role':_0x5b88('0x1f')});}else{logger[_0x5b88('0xb')](_0x5b88('0x20'));return request({'uri':util[_0x5b88('0xd')](_0x5b88('0x21'),_0x43e476[_0x5b88('0xe')])})['then'](function(_0x32c8f8){logger[_0x5b88('0xb')]('Admin\x20account\x20selected.');return _0x32c8f8[_0x5b88('0x22')];});}});}else{logger[_0x5b88('0xb')](_0x5b88('0x20'));return request({'uri':util[_0x5b88('0xd')](_0x5b88('0x21'),_0x43e476[_0x5b88('0xe')])})[_0x5b88('0x1b')](function(_0x19a301){logger[_0x5b88('0xb')]('Admin\x20account\x20selected.');return _0x19a301[_0x5b88('0x22')];});}}function getEndUser(_0x528103,_0xe7da60,_0x12002e){logger[_0x5b88('0xb')](_0x5b88('0x23'),_0x12002e);return request({'uri':util['format']('%s/search.json',_0x528103[_0x5b88('0xe')]),'qs':{'query':util['format']('type:user\x20role:end-user\x20phone:%s',_0x12002e)}})['then'](function(_0x4f4c1a){var _0xcef225;if(_0x4f4c1a[_0x5b88('0x24')][_0x5b88('0x25')]){_0x4f4c1a[_0x5b88('0x24')]=_['filter'](_0x4f4c1a[_0x5b88('0x24')],{'suspended':![],'role':_0x5b88('0x26')});if(_0x4f4c1a[_0x5b88('0x24')]['length']){_0xcef225=_['first'](_0x4f4c1a[_0x5b88('0x24')]);}}if(_0xcef225){logger[_0x5b88('0xb')](_0x5b88('0x27'));return _0xcef225;}else{logger[_0x5b88('0xb')](_0x5b88('0x28'));return request({'uri':util[_0x5b88('0xd')](_0x5b88('0x29'),_0x528103[_0x5b88('0xe')]),'method':_0x5b88('0xf'),'body':{'user':{'role':_0x5b88('0x26'),'name':util[_0x5b88('0xd')](_0x5b88('0x2a'),_0xe7da60||_0x12002e),'phone':_0x12002e}}})[_0x5b88('0x1b')](function(_0x1b1485){logger[_0x5b88('0xb')](_0x5b88('0x2b'));return _0x1b1485[_0x5b88('0x22')];});}});}function getAuth(_0x44c633){var _0x26ca11;if(_0x44c633[_0x5b88('0x2c')]===_0x5b88('0x2d')){_0x26ca11=util[_0x5b88('0xd')](_0x5b88('0x2e'),_0x44c633[_0x5b88('0x2f')],_0x44c633[_0x5b88('0x2d')]);}else if(_0x44c633[_0x5b88('0x2c')]===_0x5b88('0x30')){_0x26ca11=util['format'](_0x5b88('0x31'),_0x44c633['username'],_0x44c633[_0x5b88('0x30')]);}return util['format']('Basic\x20%s',new Buffer(_0x26ca11)[_0x5b88('0x32')](_0x5b88('0x33')));}function request(_0x15b248){logger[_0x5b88('0x34')](_0x5b88('0x35'),JSON[_0x5b88('0x36')](_0x15b248));return rp(_[_0x5b88('0x6')](_0x15b248,{'method':_0x5b88('0x37'),'headers':headers,'json':!![]}));}function getTags(_0x38f6c4,_0x23f438){var _0x452096=[];if(_0x38f6c4&&_0x38f6c4[_0x5b88('0x25')]>0x0){_0x452096=_[_0x5b88('0x38')](_0x38f6c4,_0x23f438);}return _0x452096;}function getCustomFields(_0x4edbab,_0x1d0ad3){var _0x246788=[];var _0x37ac8c={'custom_fields':[]};if(_0x4edbab[_0x5b88('0x25')]>0x0){_['forEach'](_0x4edbab,function(_0x4513b3){if(_[_0x5b88('0x39')]([_0x5b88('0x3a'),_0x5b88('0x3b')],_0x4513b3[_0x5b88('0x3c')])&&_0x4513b3['nameField']&&!_0x4513b3['customField']){_0x37ac8c[_0x4513b3[_0x5b88('0x3d')][_0x5b88('0x3e')]()]=_0x4513b3[_0x5b88('0x3f')]['toString']();}else if(_[_0x5b88('0x39')]([_0x5b88('0x3a'),_0x5b88('0x3b')],_0x4513b3[_0x5b88('0x3c')])&&_0x4513b3['idField']&&_0x4513b3['customField']){_0x37ac8c['custom_fields'][_0x5b88('0x40')]({'id':_0x4513b3['idField'],'value':_0x4513b3[_0x5b88('0x3f')]['toString']()});}else if(_0x4513b3['type']==='variable'&&_0x4513b3[_0x5b88('0x41')]&&_0x4513b3['idField']&&_0x4513b3[_0x5b88('0x42')]){_0x1d0ad3[_0x4513b3[_0x5b88('0x41')]]&&_0x37ac8c['custom_fields']['push']({'id':_0x4513b3[_0x5b88('0x43')],'value':_0x1d0ad3[_0x4513b3[_0x5b88('0x41')]]['toString']()});}else if(_0x4513b3[_0x5b88('0x3c')]==='customVariable'&&_0x4513b3['Variable']&&_0x4513b3['Variable'][_0x5b88('0x11')]&&_0x4513b3['idField']&&_0x4513b3['customField']){_0x1d0ad3[_0x4513b3['Variable'][_0x5b88('0x11')][_0x5b88('0x3e')]()]&&_0x37ac8c[_0x5b88('0x44')][_0x5b88('0x40')]({'id':_0x4513b3['idField'],'value':_0x1d0ad3[_0x4513b3[_0x5b88('0x45')]['name'][_0x5b88('0x3e')]()][_0x5b88('0x32')]()});}});}return _0x37ac8c;}exports[_0x5b88('0x46')]=function(_0x2734c3,_0xc8c419,_0x40331b,_0x3f4197,_0x1e2c00,_0x84a8e6){var _0x182850,_0x5b994a;_0x84a8e6[_0x5b88('0xe')]=intUtil[_0x5b88('0x47')](_0x84a8e6[_0x5b88('0xe')]);_0x84a8e6['serverUrl']=intUtil[_0x5b88('0x47')](_0x84a8e6[_0x5b88('0x48')]);if(_0x1e2c00&&_0x1e2c00['monitor_format']){logger[_0x5b88('0xb')]('[QUEUE]',_0x5b88('0x49'));_0xc8c419['recordingURL']=util[_0x5b88('0xd')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x84a8e6[_0x5b88('0x48')],_0xc8c419[_0x5b88('0x4a')],md5(_0xc8c419[_0x5b88('0x4a')]));}else{_0xc8c419[_0x5b88('0x4b')]='';}headers['Authorization']=getAuth(_0x84a8e6);return getUser(_0x84a8e6,_0x3f4197[_0x5b88('0x4c')])[_0x5b88('0x1b')](function(_0x5a21b6){_0x182850=_0x5a21b6;logger[_0x5b88('0xb')](_0x5b88('0x4d'),_0x182850['id']);return getEndUser(_0x84a8e6,_0xc8c419['calleridname'],_0xc8c419[_0x5b88('0x4e')]);})['then'](function(_0x531c69){_0x5b994a=_0x531c69;logger[_0x5b88('0xb')](_0x5b88('0x4f'),_0x5b994a['id']);return getTicket(_0x84a8e6,_0x182850,_0x5b994a,_0x40331b,_0xc8c419);})['then'](function(_0x5825d8){if(_0x5825d8){logger[_0x5b88('0xb')]('The\x20Ticket\x20ID\x20is:',_0x5825d8['id']);switch(_0x84a8e6[_0x5b88('0x3c')]){case'integrationTab':logger['info'](_0x5b88('0x50'),_0x5b88('0x51'));return request({'uri':util['format'](_0x5b88('0x52'),_0x84a8e6[_0x5b88('0xe')],_0x182850['id'],_0x5825d8['id']),'method':_0x5b88('0xf')});case _0x5b88('0x53'):logger[_0x5b88('0xb')]('[QUEUE]',_0x5b88('0x54'));emit(util[_0x5b88('0xd')](_0x5b88('0x55'),_0x3f4197[_0x5b88('0x11')]),_0x5b88('0x56'),{'uri':util['format'](_0x5b88('0x57'),_0x84a8e6[_0x5b88('0xe')]['replace'](_0x5b88('0x58'),''),_0x5825d8['id'])});break;default:logger['error'](_0x5b88('0x50'),_0x5b88('0x59'));}}})[_0x5b88('0x5a')](function(_0x1d8470){logger[_0x5b88('0x5b')](_0x5b88('0x5c'),util[_0x5b88('0x5d')](_0x1d8470,{'showHidden':!![],'depth':null}));});};exports['outbound']=function(_0x5daa04,_0x3f9f13,_0x1be807,_0x2d6a07,_0x1be8db,_0x29bf8b,_0x3a47ed){var _0x549493,_0xf6409;_0x29bf8b[_0x5b88('0xe')]=intUtil['stripTrailingSlash'](_0x29bf8b[_0x5b88('0xe')]);_0x29bf8b[_0x5b88('0x48')]=intUtil[_0x5b88('0x47')](_0x29bf8b[_0x5b88('0x48')]);if(_0x3a47ed&&_0x3a47ed[_0x5b88('0x5e')]&&_0x3a47ed[_0x5b88('0x5e')]!==_0x5b88('0x5f')){logger[_0x5b88('0xb')](_0x5b88('0x60'),_0x5b88('0x49'));_0x3f9f13[_0x5b88('0x4b')]=util[_0x5b88('0xd')](_0x5b88('0x61'),_0x29bf8b[_0x5b88('0x48')],_0x3f9f13[_0x5b88('0x4a')],md5(_0x3f9f13[_0x5b88('0x4a')]));}headers['Authorization']=getAuth(_0x29bf8b);return getUser(_0x29bf8b,_0x2d6a07[_0x5b88('0x4c')])[_0x5b88('0x1b')](function(_0x4939c2){_0x549493=_0x4939c2;logger['info']('The\x20User\x20ID\x20is:',_0x549493['id']);return getEndUser(_0x29bf8b,_0x3f9f13[_0x5b88('0x62')],_0x3f9f13[_0x5b88('0x63')]);})['then'](function(_0x55e4e4){_0xf6409=_0x55e4e4;logger[_0x5b88('0xb')](_0x5b88('0x4f'),_0xf6409['id']);return getTicket(_0x29bf8b,_0x549493,_0xf6409,_0x1be807,_0x3f9f13);})[_0x5b88('0x1b')](function(_0x57687b){if(_0x57687b){logger[_0x5b88('0xb')](_0x5b88('0x64'),_0x57687b['id']);switch(_0x29bf8b[_0x5b88('0x3c')]){case'integrationTab':logger['info']('[OUTBOUND]','Displaying\x20ticket\x20to\x20agent...');return request({'uri':util[_0x5b88('0xd')]('%s/channels/voice/agents/%d/tickets/%d/display.json',_0x29bf8b[_0x5b88('0xe')],_0x549493['id'],_0x57687b['id']),'method':_0x5b88('0xf')});case'newTab':logger[_0x5b88('0xb')](_0x5b88('0x60'),_0x5b88('0x54'));emit(util[_0x5b88('0xd')](_0x5b88('0x55'),_0x2d6a07[_0x5b88('0x11')]),_0x5b88('0x56'),{'uri':util[_0x5b88('0xd')]('%s/agent/tickets/%s',_0x29bf8b['remoteUri'][_0x5b88('0x65')](_0x5b88('0x58'),''),_0x57687b['id'])});break;default:logger['error'](_0x5b88('0x60'),'Zendesk\x20account\x20type\x20not\x20recognized');}}})[_0x5b88('0x5a')](function(_0x5e838d){logger[_0x5b88('0x5b')](_0x5b88('0x66'),util['inspect'](_0x5e838d,{'showHidden':!![],'depth':null}));});};exports[_0x5b88('0x67')]=function(_0x569c01,_0x534ff5,_0x2c025c,_0x4b8eba,_0x8fb459,_0x2fcaaa){var _0x1c0091,_0x159f11;_0x2fcaaa['remoteUri']=intUtil['stripTrailingSlash'](_0x2fcaaa[_0x5b88('0xe')]);_0x2fcaaa['serverUrl']=intUtil[_0x5b88('0x47')](_0x2fcaaa[_0x5b88('0x48')]);if(_0x8fb459&&_0x8fb459[_0x5b88('0x68')]){logger[_0x5b88('0xb')]('['+_0x534ff5[_0x5b88('0x69')][_0x5b88('0x6a')]()+']',_0x5b88('0x49'));_0x534ff5['recordingURL']=util[_0x5b88('0xd')](_0x5b88('0x61'),_0x2fcaaa[_0x5b88('0x48')],_0x534ff5[_0x5b88('0x4a')],md5(_0x534ff5[_0x5b88('0x4a')]));}else{_0x534ff5[_0x5b88('0x4b')]='';}headers['Authorization']=getAuth(_0x2fcaaa);return getUser(_0x2fcaaa)[_0x5b88('0x1b')](function(_0x37dc40){_0x1c0091=_0x37dc40;logger[_0x5b88('0xb')](_0x5b88('0x4d'),_0x1c0091['id']);return getEndUser(_0x2fcaaa,_0x534ff5['calleridname'],_0x534ff5['calleridnum']);})['then'](function(_0x3c3fa4){_0x159f11=_0x3c3fa4;logger[_0x5b88('0xb')]('The\x20Enduser\x20ID\x20is:',_0x159f11['id']);return getTicket(_0x2fcaaa,_0x1c0091,_0x159f11,_0x2c025c,_0x534ff5);})[_0x5b88('0x1b')](function(_0x3687b4){if(_0x3687b4){logger[_0x5b88('0xb')](_0x5b88('0x64'),_0x3687b4['id']);}})[_0x5b88('0x5a')](function(_0x435b1b){logger[_0x5b88('0x5b')]('['+_0x534ff5[_0x5b88('0x69')][_0x5b88('0x6a')]()+']'+'\x20Error\x20running\x20Zendesk\x20integration',util[_0x5b88('0x5d')](_0x435b1b,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
index e845a86..370a924 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x42cf=['length','string','picklist','idField','content','toString','type','variable','variableName','customVariable','Variable','name','toLowerCase','split','isNil','access_token','expires_in','zone','https://accounts.zoho.com','https://accounts.zoho.com.au','https://accounts.zoho.eu','https://accounts.zoho.in','https://accounts.zoho.com.cn','/oauth/v2/token','refreshToken','clientId','clientSecret','refresh_token','then','error','Failing\x20creating\x20the\x20access_token','stack','info','Search\x20user','GET','ActiveUsers','Zoho-oauthtoken\x20','users','isArrayLikeObject','findIndex','email','Using\x20the\x20admin\x20account!','profile','Administrator','user','The\x20failing\x20result\x20is','Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20','catch','enduserType','POST','/crm/v2/','startCase','moduleCreate','role','first_name','last_name','data','code','SUCCESS','details','log','CREATE\x20ERROR','moduleSearch','contact_lead','uri','https://www.zohoapis.','/crm/v2/Contacts/search?criteria=((Phone:equals:','Contacts','/crm/v2/Leads/search?criteria=((Phone:equals:','nothing','Creating\x20new\x20call...','Owner','administrator','Subject','getString','Subjects','Who_Id','Full_Name','First_Name','Last_Name','Leads','What_Id','Call_Duration','utc','talktime','mm:ss','answertime','endtime','YYYY-MM-DDTHH:mm:ss','diff','starttime','format','lastevent','Call_Result','Called','complete','Answered','rejected','Rejected','abandoned','timeout','Call_Start_Time','outbound','agentcalledAt','Call_Type','Inbound','merge','Fields','/crm/v2/Calls','Call\x20created!','err','queue','host','stripTrailingSlash','serverUrl','monitor_format','[QUEUE]','recordingURL','/api/voice/recordings/','uniqueid','/downloads?type=uniqueid&token=','zoho.eu','com','calleridname','calleridnum','user:%s','trigger:browser:url','https://crm.','/crm/EntityInfo.do?module=Calls&id=','recordingFormat','none','[OUTBOUND]','The\x20User\x20ID\x20is:','destcalleridname','The\x20Call\x20ID\x20is:','Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...','toUpperCase','Recording\x20is\x20enabled!','lodash','request-promise','util','./util','ioredis','../../../../config/environment','../../../../config/logger','defaults','localhost','emit','stringify'];(function(_0x357018,_0x1a75d6){var _0xe50e4b=function(_0x179e7e){while(--_0x179e7e){_0x357018['push'](_0x357018['shift']());}};_0xe50e4b(++_0x1a75d6);}(_0x42cf,0x11f));var _0xf42c=function(_0x2c7618,_0x26be9c){_0x2c7618=_0x2c7618-0x0;var _0x5ce3f0=_0x42cf[_0x2c7618];return _0x5ce3f0;};'use strict';var _=require(_0xf42c('0x0'));var rp=require(_0xf42c('0x1'));var md5=require('md5');var util=require(_0xf42c('0x2'));var intUtil=require(_0xf42c('0x3'));var moment=require('moment');var Redis=require(_0xf42c('0x4'));var BPromise=require('bluebird');var config=require(_0xf42c('0x5'));var logger=require(_0xf42c('0x6'))('zoho');config['redis']=_[_0xf42c('0x7')](config['redis'],{'host':_0xf42c('0x8'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function emit(_0x3334fe,_0x2548a2,_0x445ee6){io['to'](_0x3334fe)[_0xf42c('0x9')](_0x2548a2,_0x445ee6);}function request(_0x334a64){logger['debug']('[HTTP]',JSON[_0xf42c('0xa')](_0x334a64));return rp(_0x334a64);}function getCustomFields(_0x4b1487,_0x37a487){var _0x4ebe84={};if(_0x4b1487[_0xf42c('0xb')]>0x0){_['forEach'](_0x4b1487,function(_0x34ce44){if(_['includes']([_0xf42c('0xc'),_0xf42c('0xd')],_0x34ce44['type'])&&_0x34ce44[_0xf42c('0xe')]){_0x4ebe84[_0x34ce44['idField']]=_0x34ce44[_0xf42c('0xf')][_0xf42c('0x10')]();}else if(_0x34ce44[_0xf42c('0x11')]===_0xf42c('0x12')&&_0x34ce44[_0xf42c('0x13')]&&_0x34ce44['idField']&&_0x37a487[_0x34ce44['variableName']]){_0x4ebe84[_0x34ce44[_0xf42c('0xe')]]=_0x37a487[_0x34ce44[_0xf42c('0x13')]]['toString']();}else if(_0x34ce44['type']===_0xf42c('0x14')&&_0x34ce44[_0xf42c('0x15')]&&_0x34ce44['Variable'][_0xf42c('0x16')]&&_0x34ce44[_0xf42c('0xe')]&&_0x37a487[_0x34ce44[_0xf42c('0x15')][_0xf42c('0x16')][_0xf42c('0x17')]()]){_0x4ebe84[_0x34ce44[_0xf42c('0xe')]]=_0x37a487[_0x34ce44[_0xf42c('0x15')][_0xf42c('0x16')]['toLowerCase']()][_0xf42c('0x10')]();}});}return _0x4ebe84;}function getName(_0x48cce4){if(_0x48cce4['indexOf']('\x20')>0x0){var _0x2b7aa9=_0x48cce4[_0xf42c('0x18')](/ (.+)/);if(_0x2b7aa9[0x1]){return _0x2b7aa9;}}return[_0x48cce4,_0x48cce4];}var accountsTokens={};function getAccessToken(_0x58b017){return new Promise(function(_0x531ac4,_0x48c47){if(!_[_0xf42c('0x19')](accountsTokens[_0x58b017['id']])&&!_[_0xf42c('0x19')](accountsTokens[_0x58b017['id']][_0xf42c('0x1a')])){if(moment()['isBefore'](accountsTokens[_0x58b017['id']][_0xf42c('0x1b')])){_0x531ac4(accountsTokens[_0x58b017['id']][_0xf42c('0x1a')]);}}var _0x8aed81;switch(_0x58b017[_0xf42c('0x1c')]){case'US':_0x8aed81=_0xf42c('0x1d');break;case'AU':_0x8aed81=_0xf42c('0x1e');break;case'EU':_0x8aed81=_0xf42c('0x1f');break;case'IN':_0x8aed81=_0xf42c('0x20');break;case'CN':_0x8aed81=_0xf42c('0x21');break;default:_0x8aed81=_0xf42c('0x1f');break;}var _0x4f1dfd={'method':'POST','uri':_0x8aed81+_0xf42c('0x22'),'qs':{'refresh_token':_0x58b017[_0xf42c('0x23')],'client_id':_0x58b017[_0xf42c('0x24')],'client_secret':_0x58b017[_0xf42c('0x25')],'grant_type':_0xf42c('0x26')},'json':!![]};return rp(_0x4f1dfd)[_0xf42c('0x27')](function(_0x28b780){accountsTokens[_0x58b017['id']]={'access_token':_0x28b780[_0xf42c('0x1a')],'expires_in':moment()['add'](_0x28b780[_0xf42c('0x1b')],'seconds')};_0x531ac4(_0x28b780[_0xf42c('0x1a')]);})['catch'](function(_0x52ff8d){logger[_0xf42c('0x28')](_0xf42c('0x29'),_0x52ff8d[_0xf42c('0x2a')]);_0x48c47(_0x52ff8d);});});}function getUser(_0x4b2448,_0x5c74a2,_0x4da6a5,_0x29a34d){logger[_0xf42c('0x2b')](_0xf42c('0x2c'));return request({'method':_0xf42c('0x2d'),'uri':util['format']('https://www.zohoapis.%s/crm/v2/users',_0x5c74a2),'qs':{'type':_0xf42c('0x2e')},'headers':{'Authorization':_0xf42c('0x2f')+_0x4b2448},'json':!![]})['then'](function(_0x11f02d){if(_0x11f02d[_0xf42c('0x30')]){var _0x3d5dc9=-0x1;if(_[_0xf42c('0x31')](_0x11f02d['users'])){if(!_['isNil'](_0x29a34d)){_0x3d5dc9=_[_0xf42c('0x32')](_0x11f02d[_0xf42c('0x30')],function(_0x3c1ef0){return _0x3c1ef0[_0xf42c('0x33')]===_0x29a34d;});}if(_0x3d5dc9>=0x0){logger[_0xf42c('0x2b')]('Agent\x20found!');}else{logger[_0xf42c('0x2b')](_0xf42c('0x34'));_0x3d5dc9=_[_0xf42c('0x32')](_0x11f02d['users'],function(_0x37e0fd){return _0x37e0fd[_0xf42c('0x35')][_0xf42c('0x16')]===_0xf42c('0x36');});}return _0x11f02d[_0xf42c('0x30')][_0x3d5dc9];}else{if(_0x11f02d['user']['profile'][_0xf42c('0x16')]===_0xf42c('0x36')){logger[_0xf42c('0x2b')](_0xf42c('0x34'));user=_0x11f02d[_0xf42c('0x37')];return user;}else{logger[_0xf42c('0x28')](_0xf42c('0x38'),JSON['stringify'](_0x11f02d));throw new Error(_0xf42c('0x39')+JSON[_0xf42c('0xa')](_0x11f02d));}}}else{logger['error']('The\x20failing\x20result\x20is',JSON[_0xf42c('0xa')](_0x11f02d));throw new Error(_0xf42c('0x39')+JSON[_0xf42c('0xa')](_0x11f02d));}})[_0xf42c('0x3a')](function(_0x3c5dcb){console[_0xf42c('0x28')](_0x3c5dcb);});}function getZohoUser(_0x283a9e,_0x3b8cce){return new BPromise(function(_0x23049d,_0x1cdfb9){request(_0x283a9e)[_0xf42c('0x27')](function(_0x2a0e1a){var _0x58ea06=null;if(_0x2a0e1a){_0x58ea06=_0x2a0e1a['data'][0x0];_0x58ea06[_0xf42c('0x3b')]=_0x3b8cce;}_0x23049d(_0x58ea06);})[_0xf42c('0x3a')](function(_0x589b43){_0x1cdfb9(_0x589b43);});});}function createEndUser(_0x39d18d,_0x1772df,_0x240b2a,_0x219c38,_0xd92fea,_0x5d0787){var _0x240b2a=getName(_0x240b2a);return request({'method':_0xf42c('0x3c'),'uri':'https://www.zohoapis.'+_0x1772df+_0xf42c('0x3d')+_[_0xf42c('0x3e')](_0x5d0787[_0xf42c('0x3f')])+'s','body':{'data':[{'Last_Name':_0x240b2a[0x1],'First_Name':_0x240b2a[0x0],'Phone':_0x219c38,'Owner':{'name':!_['isNil'](_0xd92fea[_0xf42c('0x40')][_0xf42c('0x16')])?_0xd92fea[_0xf42c('0x40')][_0xf42c('0x16')]:!_[_0xf42c('0x19')](_0xd92fea[_0xf42c('0x41')])?_0xd92fea[_0xf42c('0x41')]+'\x20'+_0xd92fea['last_name']:_0xd92fea[_0xf42c('0x42')],'id':_0xd92fea['id']}}]},'headers':{'Authorization':_0xf42c('0x2f')+_0x39d18d},'json':!![]})[_0xf42c('0x27')](function(_0x281169){if(_0x281169&&_0x281169[_0xf42c('0x43')][0x0][_0xf42c('0x44')]===_0xf42c('0x45')){var _0x33d40c=_0x281169['data'][0x0][_0xf42c('0x46')];_0x33d40c[_0xf42c('0x3b')]=_[_0xf42c('0x3e')](_0x5d0787[_0xf42c('0x3f')])+'s';return _0x33d40c;}logger[_0xf42c('0x28')](_0xf42c('0x38'),JSON[_0xf42c('0xa')](data));throw new Error('Error:\x20'+JSON[_0xf42c('0xa')](data));})[_0xf42c('0x3a')](function(_0x138236){console[_0xf42c('0x47')](_0xf42c('0x48'),_0x138236);});}function getEndUser(_0x4d332c,_0x340ba9,_0xfb8a7,_0x3b7dd4,_0x3f6a38,_0x216179,_0x3ac7ea){var _0x1fb79a={'method':_0xf42c('0x2d'),'uri':'','headers':{'Authorization':'Zoho-oauthtoken\x20'+_0x4d332c},'json':!![]};switch(_0x3ac7ea[_0xf42c('0x49')]){case _0xf42c('0x4a'):_0x1fb79a[_0xf42c('0x4b')]=_0xf42c('0x4c')+_0x340ba9+_0xf42c('0x4d')+_0x3f6a38+'))';return getZohoUser(_0x1fb79a,_0xf42c('0x4e'))[_0xf42c('0x27')](function(_0x1d6ced){if(_0x1d6ced)return _0x1d6ced;_0x1fb79a[_0xf42c('0x4b')]=_0xf42c('0x4c')+_0x340ba9+_0xf42c('0x4f')+_0x3f6a38+'))';return getZohoUser(_0x1fb79a,'Leads')['then'](function(_0x474af1){if(_0x474af1)return _0x474af1;if(_0x3ac7ea['moduleCreate']!=_0xf42c('0x50')){return createEndUser(_0x4d332c,_0x340ba9,_0x3b7dd4,_0x3f6a38,_0x216179,_0x3ac7ea);}else{return{};}});});break;case'contact':_0x1fb79a['uri']='https://www.zohoapis.'+_0x340ba9+_0xf42c('0x4d')+_0x3f6a38+'))';return getZohoUser(_0x1fb79a,'Contacts')[_0xf42c('0x27')](function(_0x2a687b){if(_0x2a687b)return _0x2a687b;if(_0x3ac7ea[_0xf42c('0x3f')]!=_0xf42c('0x50')){return createEndUser(_0x4d332c,_0x340ba9,_0x3b7dd4,_0x3f6a38,_0x216179,_0x3ac7ea);}else{return{};}});break;case'lead':_0x1fb79a['uri']='https://www.zohoapis.'+_0x340ba9+_0xf42c('0x4f')+_0x3f6a38+'))';return getZohoUser(_0x1fb79a,'Leads')['then'](function(_0x563700){if(_0x563700)return _0x563700;if(_0x3ac7ea['moduleCreate']!=_0xf42c('0x50')){return createEndUser(_0x4d332c,_0x340ba9,_0x3b7dd4,_0x3f6a38,_0x216179,_0x3ac7ea);}else{return{};}});break;}}function getCall(_0x2eb0ce,_0x18b848,_0x3865b4,_0x548db7,_0x3816fe,_0x574518,_0x1f5beb,_0x3f2dd7){logger[_0xf42c('0x2b')](_0xf42c('0x51'));var _0x2ecc2a={};_0x2ecc2a[_0xf42c('0x52')]={'name':!_[_0xf42c('0x19')](_0x548db7[_0xf42c('0x40')][_0xf42c('0x16')])&&!_[_0xf42c('0x19')](_0x548db7[_0xf42c('0x35')][_0xf42c('0x16')])&&_0x548db7[_0xf42c('0x35')][_0xf42c('0x16')]===_0xf42c('0x53')?_0x548db7['role']['name']:!_[_0xf42c('0x19')](_0x548db7[_0xf42c('0x41')])?_0x548db7[_0xf42c('0x41')]+'\x20'+_0x548db7['last_name']:_0x548db7['last_name'],'id':_0x548db7['id']};_0x2ecc2a[_0xf42c('0x54')]=intUtil[_0xf42c('0x55')](_0x574518[_0xf42c('0x56')],_0x1f5beb,'\x20');_0x2ecc2a['Description']=intUtil[_0xf42c('0x55')](_0x574518['Descriptions'],_0x1f5beb,'\x0a');if(_0x3816fe[_0xf42c('0x3b')]===_0xf42c('0x4e')){_0x2ecc2a[_0xf42c('0x57')]={'name':!_[_0xf42c('0x19')](_0x3816fe[_0xf42c('0x58')])?_0x3816fe[_0xf42c('0x58')]:!_[_0xf42c('0x19')](_0x3816fe['First_Name'])?_0x3816fe[_0xf42c('0x59')]+'\x20'+_0x3816fe[_0xf42c('0x5a')]:_0x3816fe[_0xf42c('0x5a')],'id':_0x3816fe['id']};}if(_0x3816fe[_0xf42c('0x3b')]===_0xf42c('0x5b')){_0x2ecc2a[_0xf42c('0x5c')]={'name':!_['isNil'](_0x3816fe[_0xf42c('0x58')])?_0x3816fe[_0xf42c('0x58')]:!_[_0xf42c('0x19')](_0x3816fe[_0xf42c('0x59')])?_0x3816fe[_0xf42c('0x59')]+'\x20'+_0x3816fe[_0xf42c('0x5a')]:_0x3816fe[_0xf42c('0x5a')],'id':_0x3816fe['id']};_0x2ecc2a['$se_module']=_[_0xf42c('0x3e')](_0x3816fe[_0xf42c('0x3b')]);}if(_0x1f5beb['talktime']){_0x2ecc2a[_0xf42c('0x5d')]=moment[_0xf42c('0x5e')](parseInt(_0x1f5beb[_0xf42c('0x5f')])*0x3e8)['format'](_0xf42c('0x60'));}else if(_0x1f5beb[_0xf42c('0x61')]&&_0x1f5beb[_0xf42c('0x62')]){_0x2ecc2a[_0xf42c('0x5d')]=moment[_0xf42c('0x5e')](moment(_0x1f5beb[_0xf42c('0x62')],_0xf42c('0x63'))[_0xf42c('0x64')](moment(_0x1f5beb[_0xf42c('0x65')],_0xf42c('0x63'))))[_0xf42c('0x66')](_0xf42c('0x60'));}switch(_0x1f5beb[_0xf42c('0x67')]){case'called':_0x2ecc2a[_0xf42c('0x68')]=_0xf42c('0x69');break;case _0xf42c('0x6a'):case'connect':_0x2ecc2a[_0xf42c('0x68')]=_0xf42c('0x6b');break;case _0xf42c('0x6c'):_0x2ecc2a[_0xf42c('0x68')]=_0xf42c('0x6d');break;case _0xf42c('0x6e'):_0x2ecc2a[_0xf42c('0x68')]='Abandoned';break;case _0xf42c('0x6f'):_0x2ecc2a[_0xf42c('0x68')]='Timeout';default:}_0x2ecc2a[_0xf42c('0x70')]=(_0x3f2dd7===_0xf42c('0x71')?moment(_0x1f5beb[_0xf42c('0x65')])[_0xf42c('0x66')]('YYYY-MM-DDTHH:mm:ss'):moment(_0x1f5beb[_0xf42c('0x72')])['format'](_0xf42c('0x63')))||moment()[_0xf42c('0x66')](_0xf42c('0x63'));_0x2ecc2a[_0xf42c('0x73')]=_0x3f2dd7||_0xf42c('0x74');_0x2ecc2a=_[_0xf42c('0x75')](_0x2ecc2a,getCustomFields(_0x574518[_0xf42c('0x76')],_0x1f5beb));return request({'method':_0xf42c('0x3c'),'uri':_0xf42c('0x4c')+_0x18b848+_0xf42c('0x77'),'headers':{'Authorization':'Zoho-oauthtoken\x20'+_0x2eb0ce},'body':{'data':[_0x2ecc2a]},'json':!![]})[_0xf42c('0x27')](function(_0x1eab4a){if(_0x1eab4a&&_0x1eab4a[_0xf42c('0x43')][0x0][_0xf42c('0x44')]===_0xf42c('0x45')){logger[_0xf42c('0x2b')](_0xf42c('0x78'));return{'id':_0x1eab4a[_0xf42c('0x43')][0x0][_0xf42c('0x46')]['id']};}})[_0xf42c('0x3a')](function(_0x3f7961){logger[_0xf42c('0x2b')](_0xf42c('0x79'),_0x3f7961['stack']);console[_0xf42c('0x47')]('err',_0x3f7961);});}exports[_0xf42c('0x7a')]=function(_0x520cde,_0x1fb144,_0x26040a,_0x2eae9f,_0x56fa90,_0xda9610){var _0x55fb9f,_0x271953,_0x5dd9e8;_0xda9610[_0xf42c('0x7b')]=intUtil[_0xf42c('0x7c')](_0xda9610[_0xf42c('0x7b')]);_0xda9610['serverUrl']=intUtil[_0xf42c('0x7c')](_0xda9610[_0xf42c('0x7d')]);if(_0x56fa90&&_0x56fa90[_0xf42c('0x7e')]){logger[_0xf42c('0x2b')](_0xf42c('0x7f'),'Recording\x20is\x20enabled!');_0x1fb144[_0xf42c('0x80')]=_0xda9610['serverUrl']+_0xf42c('0x81')+_0x1fb144[_0xf42c('0x82')]+_0xf42c('0x83')+md5(_0x1fb144[_0xf42c('0x82')]);}else{_0x1fb144[_0xf42c('0x80')]='';}var _0xebb440=_0xda9610[_0xf42c('0x7b')]===_0xf42c('0x84')?'eu':_0xf42c('0x85');return getAccessToken(_0xda9610)[_0xf42c('0x27')](function(_0xf2a16a){_0x5dd9e8=_0xf2a16a;return getUser(_0x5dd9e8,_0xebb440,_0xda9610,_0x2eae9f[_0xf42c('0x33')]);})['then'](function(_0x53388a){_0x55fb9f=_0x53388a;logger['info']('The\x20User\x20ID\x20is:',_0x55fb9f['id']);return getEndUser(_0x5dd9e8,_0xebb440,_0xda9610,_0x1fb144[_0xf42c('0x86')],_0x1fb144[_0xf42c('0x87')],_0x55fb9f,_0x26040a);})[_0xf42c('0x27')](function(_0x2d9e39){_0x271953=_0x2d9e39;return getCall(_0x5dd9e8,_0xebb440,_0xda9610,_0x55fb9f,_0x271953,_0x26040a,_0x1fb144,'Inbound');})[_0xf42c('0x27')](function(_0x44e47b){if(_0x44e47b){logger[_0xf42c('0x2b')]('The\x20Call\x20ID\x20is:',_0x44e47b['id']);logger[_0xf42c('0x2b')](_0xf42c('0x7f'),'Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0xf42c('0x66')](_0xf42c('0x88'),_0x2eae9f[_0xf42c('0x16')]),_0xf42c('0x89'),{'uri':_0xf42c('0x8a')+_0xda9610['host']+_0xf42c('0x8b')+_0x44e47b['id']});}})['catch'](function(_0x19f570){logger[_0xf42c('0x28')](_0xf42c('0x7f'),JSON['stringify'](_0x19f570));});};exports[_0xf42c('0x71')]=function(_0xb77524,_0x3370bf,_0x359f38,_0x38be39,_0x1a86ec,_0x24742c,_0x4ac6c2){var _0x58314c,_0x4be42e,_0x482455;_0x24742c[_0xf42c('0x7b')]=intUtil['stripTrailingSlash'](_0x24742c[_0xf42c('0x7b')]);_0x24742c[_0xf42c('0x7d')]=intUtil[_0xf42c('0x7c')](_0x24742c['serverUrl']);if(_0x4ac6c2&&_0x4ac6c2[_0xf42c('0x8c')]&&_0x4ac6c2['recordingFormat']!==_0xf42c('0x8d')){logger[_0xf42c('0x2b')](_0xf42c('0x8e'),'Recording\x20is\x20enabled!');_0x3370bf[_0xf42c('0x80')]=_0x24742c[_0xf42c('0x7d')]+_0xf42c('0x81')+_0x3370bf[_0xf42c('0x82')]+_0xf42c('0x83')+md5(_0x3370bf[_0xf42c('0x82')]);}var _0x2053f1=_0x24742c[_0xf42c('0x7b')]===_0xf42c('0x84')?'eu':_0xf42c('0x85');return getAccessToken(_0x24742c)[_0xf42c('0x27')](function(_0x578b53){_0x482455=_0x578b53;return getUser(_0x482455,_0x2053f1,_0x24742c,_0x38be39[_0xf42c('0x33')]);})[_0xf42c('0x27')](function(_0x694805){_0x58314c=_0x694805;logger[_0xf42c('0x2b')](_0xf42c('0x8f'),_0x58314c['id']);return getEndUser(_0x482455,_0x2053f1,_0x24742c,_0x3370bf[_0xf42c('0x90')],_0x3370bf['destcalleridnum'],_0x58314c,_0x359f38);})[_0xf42c('0x27')](function(_0x4ef9f8){_0x4be42e=_0x4ef9f8;return getCall(_0x482455,_0x2053f1,_0x24742c,_0x58314c,_0x4be42e,_0x359f38,_0x3370bf,'Outbound');})[_0xf42c('0x27')](function(_0x57db3d){if(_0x57db3d){logger[_0xf42c('0x2b')](_0xf42c('0x91'),_0x57db3d['id']);logger[_0xf42c('0x2b')]('[OUTBOUND]',_0xf42c('0x92'));emit(util['format']('user:%s',_0x38be39[_0xf42c('0x16')]),_0xf42c('0x89'),{'uri':_0xf42c('0x8a')+_0x24742c['host']+_0xf42c('0x8b')+_0x57db3d['id']});}})[_0xf42c('0x3a')](function(_0x2d7a5f){logger['error'](_0xf42c('0x8e'),JSON[_0xf42c('0xa')](_0x2d7a5f));});};exports['unmanaged']=function(_0x3cc531,_0x2d40ab,_0x2c0ee4,_0x86da6d,_0x4326d5,_0x1eb781){var _0x3e34f7,_0x3cfcb0,_0x94b2f2;_0x1eb781['host']=intUtil[_0xf42c('0x7c')](_0x1eb781['host']);_0x1eb781[_0xf42c('0x7d')]=intUtil[_0xf42c('0x7c')](_0x1eb781[_0xf42c('0x7d')]);if(_0x4326d5&&_0x4326d5[_0xf42c('0x7e')]){logger['info']('['+_0x2d40ab[_0xf42c('0x67')][_0xf42c('0x93')]()+']',_0xf42c('0x94'));_0x2d40ab[_0xf42c('0x80')]=_0x1eb781[_0xf42c('0x7d')]+_0xf42c('0x81')+_0x2d40ab[_0xf42c('0x82')]+_0xf42c('0x83')+md5(_0x2d40ab['uniqueid']);}else{_0x2d40ab[_0xf42c('0x80')]='';}var _0x3859b4=_0x1eb781['host']===_0xf42c('0x84')?'eu':_0xf42c('0x85');return getAccessToken(_0x1eb781)[_0xf42c('0x27')](function(_0xc4fbff){_0x94b2f2=_0xc4fbff;return getUser(_0x94b2f2,_0x3859b4,_0x1eb781);})['then'](function(_0x361949){_0x3e34f7=_0x361949;logger[_0xf42c('0x2b')](_0xf42c('0x8f'),_0x3e34f7['id']);return getEndUser(_0x94b2f2,_0x3859b4,_0x1eb781,_0x2d40ab[_0xf42c('0x86')],_0x2d40ab[_0xf42c('0x87')],_0x3e34f7,_0x2c0ee4);})[_0xf42c('0x27')](function(_0x218c23){_0x3cfcb0=_0x218c23;return getCall(_0x94b2f2,_0x3859b4,_0x1eb781,_0x3e34f7,_0x3cfcb0,_0x2c0ee4,_0x2d40ab,_0xf42c('0x74'));})[_0xf42c('0x27')](function(_0x5dbe82){if(_0x5dbe82){logger[_0xf42c('0x2b')](_0xf42c('0x91'),_0x5dbe82['id']);}})[_0xf42c('0x3a')](function(_0x3eed5f){logger[_0xf42c('0x28')]('['+_0x2d40ab['lastevent'][_0xf42c('0x93')]()+']',JSON['stringify'](_0x3eed5f));});};
\ No newline at end of file
+var _0xfbac=['Full_Name','First_Name','Last_Name','What_Id','talktime','utc','mm:ss','answertime','endtime','YYYY-MM-DDTHH:mm:ss','diff','lastevent','called','Call_Result','Called','connect','Answered','rejected','Rejected','timeout','Timeout','Call_Start_Time','Call_Type','merge','Fields','/crm/v2/Calls','Call\x20created!','err','queue','stripTrailingSlash','host','serverUrl','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','/api/voice/recordings/','uniqueid','com','The\x20User\x20ID\x20is:','calleridname','calleridnum','Inbound','The\x20Call\x20ID\x20is:','user:%s','trigger:browser:url','https://crm.','/crm/EntityInfo.do?module=Calls&id=','outbound','recordingFormat','none','[OUTBOUND]','destcalleridname','destcalleridnum','Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...','unmanaged','toUpperCase','/downloads?type=uniqueid&token=','zoho.eu','request-promise','md5','util','./util','moment','ioredis','../../../../config/logger','zoho','redis','socket.io-emitter','emit','debug','[HTTP]','stringify','length','forEach','includes','type','idField','content','toString','variable','variableName','customVariable','Variable','name','toLowerCase','split','isNil','isBefore','access_token','https://accounts.zoho.com','https://accounts.zoho.com.au','https://accounts.zoho.eu','https://accounts.zoho.in','POST','/oauth/v2/token','clientId','refresh_token','add','seconds','catch','error','Failing\x20creating\x20the\x20access_token','stack','Search\x20user','format','ActiveUsers','Zoho-oauthtoken\x20','then','users','isArrayLikeObject','email','Agent\x20found!','Using\x20the\x20admin\x20account!','findIndex','profile','Administrator','info','user','Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20','The\x20failing\x20result\x20is','data','enduserType','/crm/v2/','startCase','moduleCreate','role','first_name','last_name','details','log','CREATE\x20ERROR','GET','moduleSearch','contact_lead','uri','https://www.zohoapis.','/crm/v2/Contacts/search?criteria=((Phone:equals:','/crm/v2/Leads/search?criteria=((Phone:equals:','Leads','contact','Contacts','nothing','lead','Creating\x20new\x20call...','Owner','getString','Subjects','Description','Who_Id'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xfbac,0x167));var _0xcfba=function(_0x516b06,_0x383cac){_0x516b06=_0x516b06-0x0;var _0x26dc08=_0xfbac[_0x516b06];return _0x26dc08;};'use strict';var _=require('lodash');var rp=require(_0xcfba('0x0'));var md5=require(_0xcfba('0x1'));var util=require(_0xcfba('0x2'));var intUtil=require(_0xcfba('0x3'));var moment=require(_0xcfba('0x4'));var Redis=require(_0xcfba('0x5'));var BPromise=require('bluebird');var config=require('../../../../config/environment');var logger=require(_0xcfba('0x6'))(_0xcfba('0x7'));config['redis']=_['defaults'](config[_0xcfba('0x8')],{'host':'localhost','port':0x18eb});var io=require(_0xcfba('0x9'))(new Redis(config['redis']));function emit(_0x15e8d6,_0x2c68cd,_0x5bbb82){io['to'](_0x15e8d6)[_0xcfba('0xa')](_0x2c68cd,_0x5bbb82);}function request(_0xeae9f2){logger[_0xcfba('0xb')](_0xcfba('0xc'),JSON[_0xcfba('0xd')](_0xeae9f2));return rp(_0xeae9f2);}function getCustomFields(_0x44af2e,_0x37ed2d){var _0x4779bc={};if(_0x44af2e[_0xcfba('0xe')]>0x0){_[_0xcfba('0xf')](_0x44af2e,function(_0x3e0c34){if(_[_0xcfba('0x10')](['string','picklist'],_0x3e0c34[_0xcfba('0x11')])&&_0x3e0c34[_0xcfba('0x12')]){_0x4779bc[_0x3e0c34['idField']]=_0x3e0c34[_0xcfba('0x13')][_0xcfba('0x14')]();}else if(_0x3e0c34[_0xcfba('0x11')]===_0xcfba('0x15')&&_0x3e0c34[_0xcfba('0x16')]&&_0x3e0c34[_0xcfba('0x12')]&&_0x37ed2d[_0x3e0c34[_0xcfba('0x16')]]){_0x4779bc[_0x3e0c34[_0xcfba('0x12')]]=_0x37ed2d[_0x3e0c34[_0xcfba('0x16')]][_0xcfba('0x14')]();}else if(_0x3e0c34[_0xcfba('0x11')]===_0xcfba('0x17')&&_0x3e0c34[_0xcfba('0x18')]&&_0x3e0c34['Variable'][_0xcfba('0x19')]&&_0x3e0c34[_0xcfba('0x12')]&&_0x37ed2d[_0x3e0c34[_0xcfba('0x18')][_0xcfba('0x19')][_0xcfba('0x1a')]()]){_0x4779bc[_0x3e0c34[_0xcfba('0x12')]]=_0x37ed2d[_0x3e0c34[_0xcfba('0x18')]['name'][_0xcfba('0x1a')]()][_0xcfba('0x14')]();}});}return _0x4779bc;}function getName(_0x35cec9){if(_0x35cec9['indexOf']('\x20')>0x0){var _0x5832d4=_0x35cec9[_0xcfba('0x1b')](/ (.+)/);if(_0x5832d4[0x1]){return _0x5832d4;}}return[_0x35cec9,_0x35cec9];}var accountsTokens={};function getAccessToken(_0x43b745){return new Promise(function(_0x40a0df,_0x467762){if(!_[_0xcfba('0x1c')](accountsTokens[_0x43b745['id']])&&!_[_0xcfba('0x1c')](accountsTokens[_0x43b745['id']]['access_token'])){if(moment()[_0xcfba('0x1d')](accountsTokens[_0x43b745['id']]['expires_in'])){_0x40a0df(accountsTokens[_0x43b745['id']][_0xcfba('0x1e')]);}}var _0x1e187f;switch(_0x43b745['zone']){case'US':_0x1e187f=_0xcfba('0x1f');break;case'AU':_0x1e187f=_0xcfba('0x20');break;case'EU':_0x1e187f=_0xcfba('0x21');break;case'IN':_0x1e187f=_0xcfba('0x22');break;case'CN':_0x1e187f='https://accounts.zoho.com.cn';break;default:_0x1e187f='https://accounts.zoho.eu';break;}var _0x387a32={'method':_0xcfba('0x23'),'uri':_0x1e187f+_0xcfba('0x24'),'qs':{'refresh_token':_0x43b745['refreshToken'],'client_id':_0x43b745[_0xcfba('0x25')],'client_secret':_0x43b745['clientSecret'],'grant_type':_0xcfba('0x26')},'json':!![]};return rp(_0x387a32)['then'](function(_0x4ee825){accountsTokens[_0x43b745['id']]={'access_token':_0x4ee825[_0xcfba('0x1e')],'expires_in':moment()[_0xcfba('0x27')](_0x4ee825['expires_in'],_0xcfba('0x28'))};_0x40a0df(_0x4ee825[_0xcfba('0x1e')]);})[_0xcfba('0x29')](function(_0x334d97){logger[_0xcfba('0x2a')](_0xcfba('0x2b'),_0x334d97[_0xcfba('0x2c')]);_0x467762(_0x334d97);});});}function getUser(_0x4585ec,_0x5c77c4,_0x7c7d76,_0x4aa981){logger['info'](_0xcfba('0x2d'));return request({'method':'GET','uri':util[_0xcfba('0x2e')]('https://www.zohoapis.%s/crm/v2/users',_0x5c77c4),'qs':{'type':_0xcfba('0x2f')},'headers':{'Authorization':_0xcfba('0x30')+_0x4585ec},'json':!![]})[_0xcfba('0x31')](function(_0x127ad5){if(_0x127ad5[_0xcfba('0x32')]){var _0x1aaf34=-0x1;if(_[_0xcfba('0x33')](_0x127ad5[_0xcfba('0x32')])){if(!_['isNil'](_0x4aa981)){_0x1aaf34=_['findIndex'](_0x127ad5['users'],function(_0x34b172){return _0x34b172[_0xcfba('0x34')]===_0x4aa981;});}if(_0x1aaf34>=0x0){logger['info'](_0xcfba('0x35'));}else{logger['info'](_0xcfba('0x36'));_0x1aaf34=_[_0xcfba('0x37')](_0x127ad5[_0xcfba('0x32')],function(_0x3a1458){return _0x3a1458[_0xcfba('0x38')][_0xcfba('0x19')]===_0xcfba('0x39');});}return _0x127ad5[_0xcfba('0x32')][_0x1aaf34];}else{if(_0x127ad5['user'][_0xcfba('0x38')][_0xcfba('0x19')]===_0xcfba('0x39')){logger[_0xcfba('0x3a')](_0xcfba('0x36'));user=_0x127ad5[_0xcfba('0x3b')];return user;}else{logger[_0xcfba('0x2a')]('The\x20failing\x20result\x20is',JSON[_0xcfba('0xd')](_0x127ad5));throw new Error(_0xcfba('0x3c')+JSON[_0xcfba('0xd')](_0x127ad5));}}}else{logger[_0xcfba('0x2a')](_0xcfba('0x3d'),JSON['stringify'](_0x127ad5));throw new Error('Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20'+JSON[_0xcfba('0xd')](_0x127ad5));}})[_0xcfba('0x29')](function(_0x476dc3){console[_0xcfba('0x2a')](_0x476dc3);});}function getZohoUser(_0x548c3c,_0x40a6ae){return new BPromise(function(_0x3c3a3c,_0x4fc962){request(_0x548c3c)['then'](function(_0x14ccc9){var _0x3e2757=null;if(_0x14ccc9){_0x3e2757=_0x14ccc9[_0xcfba('0x3e')][0x0];_0x3e2757[_0xcfba('0x3f')]=_0x40a6ae;}_0x3c3a3c(_0x3e2757);})[_0xcfba('0x29')](function(_0x173903){_0x4fc962(_0x173903);});});}function createEndUser(_0x58ffb6,_0x497fcc,_0x36fb80,_0x43c206,_0x577b46,_0x438aeb){var _0x36fb80=getName(_0x36fb80);return request({'method':_0xcfba('0x23'),'uri':'https://www.zohoapis.'+_0x497fcc+_0xcfba('0x40')+_[_0xcfba('0x41')](_0x438aeb[_0xcfba('0x42')])+'s','body':{'data':[{'Last_Name':_0x36fb80[0x1],'First_Name':_0x36fb80[0x0],'Phone':_0x43c206,'Owner':{'name':!_[_0xcfba('0x1c')](_0x577b46[_0xcfba('0x43')][_0xcfba('0x19')])?_0x577b46['role'][_0xcfba('0x19')]:!_['isNil'](_0x577b46['first_name'])?_0x577b46[_0xcfba('0x44')]+'\x20'+_0x577b46[_0xcfba('0x45')]:_0x577b46[_0xcfba('0x45')],'id':_0x577b46['id']}}]},'headers':{'Authorization':_0xcfba('0x30')+_0x58ffb6},'json':!![]})[_0xcfba('0x31')](function(_0x1ea9d9){if(_0x1ea9d9&&_0x1ea9d9['data'][0x0]['code']==='SUCCESS'){var _0x148f62=_0x1ea9d9[_0xcfba('0x3e')][0x0][_0xcfba('0x46')];_0x148f62[_0xcfba('0x3f')]=_[_0xcfba('0x41')](_0x438aeb[_0xcfba('0x42')])+'s';return _0x148f62;}logger[_0xcfba('0x2a')](_0xcfba('0x3d'),JSON[_0xcfba('0xd')](data));throw new Error('Error:\x20'+JSON[_0xcfba('0xd')](data));})[_0xcfba('0x29')](function(_0xd2a387){console[_0xcfba('0x47')](_0xcfba('0x48'),_0xd2a387);});}function getEndUser(_0x816aa5,_0x1fe0de,_0x5a82fe,_0x1c2f9b,_0x33cb33,_0x2072b8,_0xfe324b){var _0x4d3906={'method':_0xcfba('0x49'),'uri':'','headers':{'Authorization':_0xcfba('0x30')+_0x816aa5},'json':!![]};switch(_0xfe324b[_0xcfba('0x4a')]){case _0xcfba('0x4b'):_0x4d3906[_0xcfba('0x4c')]=_0xcfba('0x4d')+_0x1fe0de+_0xcfba('0x4e')+_0x33cb33+'))';return getZohoUser(_0x4d3906,'Contacts')['then'](function(_0x11ad05){if(_0x11ad05)return _0x11ad05;_0x4d3906[_0xcfba('0x4c')]=_0xcfba('0x4d')+_0x1fe0de+_0xcfba('0x4f')+_0x33cb33+'))';return getZohoUser(_0x4d3906,_0xcfba('0x50'))[_0xcfba('0x31')](function(_0x53bd26){if(_0x53bd26)return _0x53bd26;if(_0xfe324b['moduleCreate']!='nothing'){return createEndUser(_0x816aa5,_0x1fe0de,_0x1c2f9b,_0x33cb33,_0x2072b8,_0xfe324b);}else{return{};}});});break;case _0xcfba('0x51'):_0x4d3906['uri']=_0xcfba('0x4d')+_0x1fe0de+_0xcfba('0x4e')+_0x33cb33+'))';return getZohoUser(_0x4d3906,_0xcfba('0x52'))[_0xcfba('0x31')](function(_0x56d259){if(_0x56d259)return _0x56d259;if(_0xfe324b['moduleCreate']!=_0xcfba('0x53')){return createEndUser(_0x816aa5,_0x1fe0de,_0x1c2f9b,_0x33cb33,_0x2072b8,_0xfe324b);}else{return{};}});break;case _0xcfba('0x54'):_0x4d3906[_0xcfba('0x4c')]=_0xcfba('0x4d')+_0x1fe0de+_0xcfba('0x4f')+_0x33cb33+'))';return getZohoUser(_0x4d3906,_0xcfba('0x50'))[_0xcfba('0x31')](function(_0x2b749f){if(_0x2b749f)return _0x2b749f;if(_0xfe324b['moduleCreate']!='nothing'){return createEndUser(_0x816aa5,_0x1fe0de,_0x1c2f9b,_0x33cb33,_0x2072b8,_0xfe324b);}else{return{};}});break;}}function getCall(_0x27e75b,_0x2c88e6,_0x358477,_0x1193c3,_0x47056f,_0x187711,_0x3fc544,_0x3c76a4){logger[_0xcfba('0x3a')](_0xcfba('0x55'));var _0x68130a={};_0x68130a[_0xcfba('0x56')]={'name':!_[_0xcfba('0x1c')](_0x1193c3[_0xcfba('0x43')]['name'])&&!_['isNil'](_0x1193c3[_0xcfba('0x38')][_0xcfba('0x19')])&&_0x1193c3[_0xcfba('0x38')][_0xcfba('0x19')]==='administrator'?_0x1193c3[_0xcfba('0x43')][_0xcfba('0x19')]:!_[_0xcfba('0x1c')](_0x1193c3['first_name'])?_0x1193c3[_0xcfba('0x44')]+'\x20'+_0x1193c3[_0xcfba('0x45')]:_0x1193c3[_0xcfba('0x45')],'id':_0x1193c3['id']};_0x68130a['Subject']=intUtil[_0xcfba('0x57')](_0x187711[_0xcfba('0x58')],_0x3fc544,'\x20');_0x68130a[_0xcfba('0x59')]=intUtil[_0xcfba('0x57')](_0x187711['Descriptions'],_0x3fc544,'\x0a');if(_0x47056f['enduserType']===_0xcfba('0x52')){_0x68130a[_0xcfba('0x5a')]={'name':!_['isNil'](_0x47056f['Full_Name'])?_0x47056f[_0xcfba('0x5b')]:!_['isNil'](_0x47056f[_0xcfba('0x5c')])?_0x47056f[_0xcfba('0x5c')]+'\x20'+_0x47056f[_0xcfba('0x5d')]:_0x47056f['Last_Name'],'id':_0x47056f['id']};}if(_0x47056f[_0xcfba('0x3f')]===_0xcfba('0x50')){_0x68130a[_0xcfba('0x5e')]={'name':!_[_0xcfba('0x1c')](_0x47056f['Full_Name'])?_0x47056f[_0xcfba('0x5b')]:!_[_0xcfba('0x1c')](_0x47056f[_0xcfba('0x5c')])?_0x47056f[_0xcfba('0x5c')]+'\x20'+_0x47056f[_0xcfba('0x5d')]:_0x47056f[_0xcfba('0x5d')],'id':_0x47056f['id']};_0x68130a['$se_module']=_[_0xcfba('0x41')](_0x47056f[_0xcfba('0x3f')]);}if(_0x3fc544[_0xcfba('0x5f')]){_0x68130a['Call_Duration']=moment[_0xcfba('0x60')](parseInt(_0x3fc544['talktime'])*0x3e8)[_0xcfba('0x2e')](_0xcfba('0x61'));}else if(_0x3fc544[_0xcfba('0x62')]&&_0x3fc544[_0xcfba('0x63')]){_0x68130a['Call_Duration']=moment[_0xcfba('0x60')](moment(_0x3fc544[_0xcfba('0x63')],_0xcfba('0x64'))[_0xcfba('0x65')](moment(_0x3fc544['starttime'],_0xcfba('0x64'))))['format'](_0xcfba('0x61'));}switch(_0x3fc544[_0xcfba('0x66')]){case _0xcfba('0x67'):_0x68130a[_0xcfba('0x68')]=_0xcfba('0x69');break;case'complete':case _0xcfba('0x6a'):_0x68130a['Call_Result']=_0xcfba('0x6b');break;case _0xcfba('0x6c'):_0x68130a[_0xcfba('0x68')]=_0xcfba('0x6d');break;case'abandoned':_0x68130a[_0xcfba('0x68')]='Abandoned';break;case _0xcfba('0x6e'):_0x68130a['Call_Result']=_0xcfba('0x6f');default:}_0x68130a[_0xcfba('0x70')]=(_0x3c76a4==='outbound'?moment(_0x3fc544['starttime'])[_0xcfba('0x2e')](_0xcfba('0x64')):moment(_0x3fc544['agentcalledAt'])[_0xcfba('0x2e')](_0xcfba('0x64')))||moment()[_0xcfba('0x2e')](_0xcfba('0x64'));_0x68130a[_0xcfba('0x71')]=_0x3c76a4||'Inbound';_0x68130a=_[_0xcfba('0x72')](_0x68130a,getCustomFields(_0x187711[_0xcfba('0x73')],_0x3fc544));return request({'method':'POST','uri':'https://www.zohoapis.'+_0x2c88e6+_0xcfba('0x74'),'headers':{'Authorization':_0xcfba('0x30')+_0x27e75b},'body':{'data':[_0x68130a]},'json':!![]})[_0xcfba('0x31')](function(_0x475d25){if(_0x475d25&&_0x475d25['data'][0x0]['code']==='SUCCESS'){logger['info'](_0xcfba('0x75'));return{'id':_0x475d25[_0xcfba('0x3e')][0x0][_0xcfba('0x46')]['id']};}})[_0xcfba('0x29')](function(_0x407012){logger[_0xcfba('0x3a')](_0xcfba('0x76'),_0x407012[_0xcfba('0x2c')]);console['log'](_0xcfba('0x76'),_0x407012);});}exports[_0xcfba('0x77')]=function(_0x3e5b25,_0x3769c2,_0x8e5974,_0x40ecdf,_0x3da7e9,_0x3d575e){var _0x2e7a5b,_0xb1fed0,_0x5a81f7;_0x3d575e['host']=intUtil[_0xcfba('0x78')](_0x3d575e[_0xcfba('0x79')]);_0x3d575e[_0xcfba('0x7a')]=intUtil[_0xcfba('0x78')](_0x3d575e[_0xcfba('0x7a')]);if(_0x3da7e9&&_0x3da7e9[_0xcfba('0x7b')]){logger[_0xcfba('0x3a')](_0xcfba('0x7c'),_0xcfba('0x7d'));_0x3769c2[_0xcfba('0x7e')]=_0x3d575e[_0xcfba('0x7a')]+_0xcfba('0x7f')+_0x3769c2[_0xcfba('0x80')]+'/downloads?type=uniqueid&token='+md5(_0x3769c2[_0xcfba('0x80')]);}else{_0x3769c2[_0xcfba('0x7e')]='';}var _0x24a8b9=_0x3d575e[_0xcfba('0x79')]==='zoho.eu'?'eu':_0xcfba('0x81');return getAccessToken(_0x3d575e)[_0xcfba('0x31')](function(_0x4395ee){_0x5a81f7=_0x4395ee;return getUser(_0x5a81f7,_0x24a8b9,_0x3d575e,_0x40ecdf[_0xcfba('0x34')]);})[_0xcfba('0x31')](function(_0x523e34){_0x2e7a5b=_0x523e34;logger[_0xcfba('0x3a')](_0xcfba('0x82'),_0x2e7a5b['id']);return getEndUser(_0x5a81f7,_0x24a8b9,_0x3d575e,_0x3769c2[_0xcfba('0x83')],_0x3769c2[_0xcfba('0x84')],_0x2e7a5b,_0x8e5974);})[_0xcfba('0x31')](function(_0xab6bfc){_0xb1fed0=_0xab6bfc;return getCall(_0x5a81f7,_0x24a8b9,_0x3d575e,_0x2e7a5b,_0xb1fed0,_0x8e5974,_0x3769c2,_0xcfba('0x85'));})[_0xcfba('0x31')](function(_0x324b8a){if(_0x324b8a){logger[_0xcfba('0x3a')](_0xcfba('0x86'),_0x324b8a['id']);logger['info'](_0xcfba('0x7c'),'Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util['format'](_0xcfba('0x87'),_0x40ecdf[_0xcfba('0x19')]),_0xcfba('0x88'),{'uri':_0xcfba('0x89')+_0x3d575e['host']+_0xcfba('0x8a')+_0x324b8a['id']});}})[_0xcfba('0x29')](function(_0x34bf88){logger[_0xcfba('0x2a')](_0xcfba('0x7c'),JSON[_0xcfba('0xd')](_0x34bf88));});};exports[_0xcfba('0x8b')]=function(_0x18d77f,_0x420cca,_0x21ad6e,_0x4423f7,_0xae7f01,_0x321809,_0x3f9edb){var _0x5713a8,_0x1da6f1,_0xb76c3d;_0x321809[_0xcfba('0x79')]=intUtil[_0xcfba('0x78')](_0x321809[_0xcfba('0x79')]);_0x321809[_0xcfba('0x7a')]=intUtil['stripTrailingSlash'](_0x321809['serverUrl']);if(_0x3f9edb&&_0x3f9edb[_0xcfba('0x8c')]&&_0x3f9edb[_0xcfba('0x8c')]!==_0xcfba('0x8d')){logger[_0xcfba('0x3a')](_0xcfba('0x8e'),'Recording\x20is\x20enabled!');_0x420cca['recordingURL']=_0x321809[_0xcfba('0x7a')]+_0xcfba('0x7f')+_0x420cca[_0xcfba('0x80')]+'/downloads?type=uniqueid&token='+md5(_0x420cca[_0xcfba('0x80')]);}var _0x58c4c5=_0x321809[_0xcfba('0x79')]==='zoho.eu'?'eu':_0xcfba('0x81');return getAccessToken(_0x321809)[_0xcfba('0x31')](function(_0x361edf){_0xb76c3d=_0x361edf;return getUser(_0xb76c3d,_0x58c4c5,_0x321809,_0x4423f7[_0xcfba('0x34')]);})['then'](function(_0x3fdf2b){_0x5713a8=_0x3fdf2b;logger[_0xcfba('0x3a')](_0xcfba('0x82'),_0x5713a8['id']);return getEndUser(_0xb76c3d,_0x58c4c5,_0x321809,_0x420cca[_0xcfba('0x8f')],_0x420cca[_0xcfba('0x90')],_0x5713a8,_0x21ad6e);})[_0xcfba('0x31')](function(_0x4ee341){_0x1da6f1=_0x4ee341;return getCall(_0xb76c3d,_0x58c4c5,_0x321809,_0x5713a8,_0x1da6f1,_0x21ad6e,_0x420cca,'Outbound');})[_0xcfba('0x31')](function(_0x4f5f67){if(_0x4f5f67){logger[_0xcfba('0x3a')](_0xcfba('0x86'),_0x4f5f67['id']);logger[_0xcfba('0x3a')](_0xcfba('0x8e'),_0xcfba('0x91'));emit(util[_0xcfba('0x2e')](_0xcfba('0x87'),_0x4423f7['name']),_0xcfba('0x88'),{'uri':'https://crm.'+_0x321809[_0xcfba('0x79')]+_0xcfba('0x8a')+_0x4f5f67['id']});}})[_0xcfba('0x29')](function(_0x6e2a9){logger[_0xcfba('0x2a')](_0xcfba('0x8e'),JSON[_0xcfba('0xd')](_0x6e2a9));});};exports[_0xcfba('0x92')]=function(_0x204b61,_0x3393a2,_0x1d7df9,_0x5aca59,_0x4ee5a0,_0x3ce7bb){var _0x2dd7ba,_0x39084c,_0x26796b;_0x3ce7bb[_0xcfba('0x79')]=intUtil[_0xcfba('0x78')](_0x3ce7bb[_0xcfba('0x79')]);_0x3ce7bb['serverUrl']=intUtil[_0xcfba('0x78')](_0x3ce7bb['serverUrl']);if(_0x4ee5a0&&_0x4ee5a0['monitor_format']){logger[_0xcfba('0x3a')]('['+_0x3393a2['lastevent'][_0xcfba('0x93')]()+']','Recording\x20is\x20enabled!');_0x3393a2[_0xcfba('0x7e')]=_0x3ce7bb['serverUrl']+_0xcfba('0x7f')+_0x3393a2[_0xcfba('0x80')]+_0xcfba('0x94')+md5(_0x3393a2[_0xcfba('0x80')]);}else{_0x3393a2[_0xcfba('0x7e')]='';}var _0x160654=_0x3ce7bb['host']===_0xcfba('0x95')?'eu':_0xcfba('0x81');return getAccessToken(_0x3ce7bb)[_0xcfba('0x31')](function(_0x9e4433){_0x26796b=_0x9e4433;return getUser(_0x26796b,_0x160654,_0x3ce7bb);})[_0xcfba('0x31')](function(_0x26bd98){_0x2dd7ba=_0x26bd98;logger[_0xcfba('0x3a')](_0xcfba('0x82'),_0x2dd7ba['id']);return getEndUser(_0x26796b,_0x160654,_0x3ce7bb,_0x3393a2[_0xcfba('0x83')],_0x3393a2[_0xcfba('0x84')],_0x2dd7ba,_0x1d7df9);})[_0xcfba('0x31')](function(_0x78a94a){_0x39084c=_0x78a94a;return getCall(_0x26796b,_0x160654,_0x3ce7bb,_0x2dd7ba,_0x39084c,_0x1d7df9,_0x3393a2,'Inbound');})[_0xcfba('0x31')](function(_0x88f6ab){if(_0x88f6ab){logger[_0xcfba('0x3a')](_0xcfba('0x86'),_0x88f6ab['id']);}})[_0xcfba('0x29')](function(_0x4f6fee){logger[_0xcfba('0x2a')]('['+_0x3393a2[_0xcfba('0x66')][_0xcfba('0x93')]()+']',JSON[_0xcfba('0xd')](_0x4f6fee));});};
\ No newline at end of file
index c81d369..d873128 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9f0e=['Script','data3','render','exec','format','%s\x20\x27%s\x27\x20failed\x20with\x20code\x20%d\x20and\x20error:\x20%s','%s\x20\x27%s\x27\x20succeeded\x20with\x20output:\x20%s','util','shelljs','mustache','../../../../config/logger','trigger','data2'];(function(_0x3397c1,_0x55ae56){var _0x33a38b=function(_0x43e2d1){while(--_0x43e2d1){_0x3397c1['push'](_0x3397c1['shift']());}};_0x33a38b(++_0x55ae56);}(_0x9f0e,0x18d));var _0xe9f0=function(_0x2e27d2,_0x32972c){_0x2e27d2=_0x2e27d2-0x0;var _0x239e9e=_0x9f0e[_0x2e27d2];return _0x239e9e;};'use strict';var util=require(_0xe9f0('0x0'));var sh=require(_0xe9f0('0x1'));var Mustache=require(_0xe9f0('0x2'));var logger=require(_0xe9f0('0x3'))(_0xe9f0('0x4'));exports['exec']=function(_0x553d66,_0x2c64e8){var _0x2a5b65=_0x553d66[_0xe9f0('0x5')]?_0x553d66[_0xe9f0('0x5')]:_0xe9f0('0x6');var _0x327643=_0x553d66[_0xe9f0('0x7')]?Mustache[_0xe9f0('0x8')](_0x553d66[_0xe9f0('0x7')],_0x2c64e8):_0x2c64e8;sh[_0xe9f0('0x9')](_0x327643,function(_0x25d89f,_0x2fef0a,_0x12d839){if(_0x25d89f!==0x0){logger['error'](util[_0xe9f0('0xa')](_0xe9f0('0xb'),_0x2a5b65,_0x327643,_0x25d89f,_0x12d839));}else{logger['info'](util[_0xe9f0('0xa')](_0xe9f0('0xc'),_0x2a5b65,_0x327643,_0x2fef0a));}});};
\ No newline at end of file
+var _0x8d3d=['shelljs','mustache','../../../../config/logger','trigger','exec','data2','Script','data3','render','error','format','%s\x20\x27%s\x27\x20failed\x20with\x20code\x20%d\x20and\x20error:\x20%s','info'];(function(_0x3c2abc,_0x2ced12){var _0x34be33=function(_0x519b81){while(--_0x519b81){_0x3c2abc['push'](_0x3c2abc['shift']());}};_0x34be33(++_0x2ced12);}(_0x8d3d,0x1ee));var _0xd8d3=function(_0x13bb76,_0x39491f){_0x13bb76=_0x13bb76-0x0;var _0x2cbfb4=_0x8d3d[_0x13bb76];return _0x2cbfb4;};'use strict';var util=require('util');var sh=require(_0xd8d3('0x0'));var Mustache=require(_0xd8d3('0x1'));var logger=require(_0xd8d3('0x2'))(_0xd8d3('0x3'));exports[_0xd8d3('0x4')]=function(_0x1f4d6f,_0x433b98){var _0x2eb18d=_0x1f4d6f[_0xd8d3('0x5')]?_0x1f4d6f[_0xd8d3('0x5')]:_0xd8d3('0x6');var _0x299173=_0x1f4d6f[_0xd8d3('0x7')]?Mustache[_0xd8d3('0x8')](_0x1f4d6f[_0xd8d3('0x7')],_0x433b98):_0x433b98;sh[_0xd8d3('0x4')](_0x299173,function(_0x3c5b3c,_0x5dfb75,_0x586a25){if(_0x3c5b3c!==0x0){logger[_0xd8d3('0x9')](util[_0xd8d3('0xa')](_0xd8d3('0xb'),_0x2eb18d,_0x299173,_0x3c5b3c,_0x586a25));}else{logger[_0xd8d3('0xc')](util['format']('%s\x20\x27%s\x27\x20succeeded\x20with\x20output:\x20%s',_0x2eb18d,_0x299173,_0x5dfb75));}});};
\ No newline at end of file
index 19c7625..2487906 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe51c=['exec','data1','render','data2','data5','number','headers','data6','parse','error','stack','toUpperCase','GET','DELETE','PUT','data7','body\x20has\x20been\x20passed\x20to\x20URLforward\x20in\x20a\x20wrong\x20format','body','format','%s\x20%s\x20sending\x20request\x20with\x20following\x20options:\x20%s','then','isNil','object','stringify','info','%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','name','message','request-promise','util','lodash','mustache','trigger'];(function(_0x2b8d9e,_0x38f52a){var _0x380e14=function(_0xfc9680){while(--_0xfc9680){_0x2b8d9e['push'](_0x2b8d9e['shift']());}};_0x380e14(++_0x38f52a);}(_0xe51c,0xf7));var _0xce51=function(_0x2ee4f5,_0x5b790e){_0x2ee4f5=_0x2ee4f5-0x0;var _0x276d6b=_0xe51c[_0x2ee4f5];return _0x276d6b;};'use strict';var rp=require(_0xce51('0x0'));var util=require(_0xce51('0x1'));var _=require(_0xce51('0x2'));var Mustache=require(_0xce51('0x3'));var logger=require('../../../../config/logger')(_0xce51('0x4'));exports[_0xce51('0x5')]=function(_0xf23dbc,_0x4c384d){var _0x36195d,_0x3f742f;var _0x2a852b={'method':_0xf23dbc[_0xce51('0x6')]['toUpperCase'](),'uri':Mustache[_0xce51('0x7')](_0xf23dbc[_0xce51('0x8')],_0x4c384d),'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0xf23dbc[_0xce51('0x9')])===_0xce51('0xa')&&parseInt(_0xf23dbc[_0xce51('0x9')])>=0x1&&parseInt(_0xf23dbc['data5'])<=0xa?parseInt(_0xf23dbc[_0xce51('0x9')])*0x3e8:0x5*0x3e8};try{_0x2a852b[_0xce51('0xb')]=_0xf23dbc[_0xce51('0xc')]?JSON[_0xce51('0xd')](Mustache[_0xce51('0x7')](_0xf23dbc[_0xce51('0xc')],_0x4c384d)):{};}catch(_0xc4d1fc){logger[_0xce51('0xe')](_0xc4d1fc[_0xce51('0xf')]);}switch(_0xf23dbc[_0xce51('0x6')][_0xce51('0x10')]()){case _0xce51('0x11'):case _0xce51('0x12'):_0x36195d=null;_0x2a852b['qs']=_0x4c384d;break;case'POST':case _0xce51('0x13'):if(_0xf23dbc[_0xce51('0x14')]){try{_0x36195d=JSON[_0xce51('0xd')](Mustache[_0xce51('0x7')](_0xf23dbc[_0xce51('0x14')],_0x4c384d));_0x2a852b['body']=_0x36195d;}catch(_0x2f68e0){logger[_0xce51('0xe')](_0x2f68e0[_0xce51('0xf')]);logger[_0xce51('0xe')](_0xce51('0x15'));}}else{_0x36195d=_0x4c384d;_0x2a852b[_0xce51('0x16')]=_0x36195d;}break;}logger['info'](util[_0xce51('0x17')](_0xce51('0x18'),_0xf23dbc[_0xce51('0x6')],_0xf23dbc['data2'],JSON['stringify'](_0x2a852b)));rp(_0x2a852b)[_0xce51('0x19')](function(_0x3b4a2a){_0x36195d=!_[_0xce51('0x1a')](_0x36195d)?',\x20request\x20body:\x20'+_0x36195d:'';_0x3f742f=typeof _0x3b4a2a[_0xce51('0x16')]===_0xce51('0x1b')?JSON[_0xce51('0x1c')](_0x3b4a2a['body']):_0x3b4a2a[_0xce51('0x16')];logger[_0xce51('0x1d')](util[_0xce51('0x17')](_0xce51('0x1e'),_0xf23dbc[_0xce51('0x6')],_0xf23dbc[_0xce51('0x8')],_0x3b4a2a[_0xce51('0x1f')],_0x3f742f));})[_0xce51('0x20')](function(_0x556c46){logger['error'](util['format'](_0xce51('0x21'),_0xf23dbc['data1'],_0xf23dbc['data2'],_0x556c46[_0xce51('0x1f')],_0x556c46[_0xce51('0x22')],_0x556c46[_0xce51('0x23')]));});};
\ No newline at end of file
+var _0x0e25=['data2','data5','number','headers','parse','data6','error','DELETE','POST','body','stack','info','format','%s\x20%s\x20sending\x20request\x20with\x20following\x20options:\x20%s','then','isNil',',\x20request\x20body:\x20','object','%s\x20%s\x20succeeded\x20with\x20status:\x20%d\x20and\x20response:\x20%s','statusCode','name','message','request-promise','util','mustache','../../../../config/logger','trigger','exec','data1','toUpperCase','render'];(function(_0x2898cf,_0x3ba370){var _0x474e4c=function(_0x55352f){while(--_0x55352f){_0x2898cf['push'](_0x2898cf['shift']());}};_0x474e4c(++_0x3ba370);}(_0x0e25,0xef));var _0x50e2=function(_0x5ab9c7,_0x45d524){_0x5ab9c7=_0x5ab9c7-0x0;var _0x4ecbe7=_0x0e25[_0x5ab9c7];return _0x4ecbe7;};'use strict';var rp=require(_0x50e2('0x0'));var util=require(_0x50e2('0x1'));var _=require('lodash');var Mustache=require(_0x50e2('0x2'));var logger=require(_0x50e2('0x3'))(_0x50e2('0x4'));exports[_0x50e2('0x5')]=function(_0x98d147,_0x5a30b6){var _0x4f210d,_0x2483b9;var _0x2d1e40={'method':_0x98d147[_0x50e2('0x6')][_0x50e2('0x7')](),'uri':Mustache[_0x50e2('0x8')](_0x98d147[_0x50e2('0x9')],_0x5a30b6),'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x98d147[_0x50e2('0xa')])===_0x50e2('0xb')&&parseInt(_0x98d147[_0x50e2('0xa')])>=0x1&&parseInt(_0x98d147[_0x50e2('0xa')])<=0xa?parseInt(_0x98d147['data5'])*0x3e8:0x5*0x3e8};try{_0x2d1e40[_0x50e2('0xc')]=_0x98d147['data6']?JSON[_0x50e2('0xd')](Mustache['render'](_0x98d147[_0x50e2('0xe')],_0x5a30b6)):{};}catch(_0x31a337){logger[_0x50e2('0xf')](_0x31a337['stack']);}switch(_0x98d147['data1'][_0x50e2('0x7')]()){case'GET':case _0x50e2('0x10'):_0x4f210d=null;_0x2d1e40['qs']=_0x5a30b6;break;case _0x50e2('0x11'):case'PUT':if(_0x98d147['data7']){try{_0x4f210d=JSON[_0x50e2('0xd')](Mustache[_0x50e2('0x8')](_0x98d147['data7'],_0x5a30b6));_0x2d1e40[_0x50e2('0x12')]=_0x4f210d;}catch(_0x90d53d){logger[_0x50e2('0xf')](_0x90d53d[_0x50e2('0x13')]);logger[_0x50e2('0xf')]('body\x20has\x20been\x20passed\x20to\x20URLforward\x20in\x20a\x20wrong\x20format');}}else{_0x4f210d=_0x5a30b6;_0x2d1e40[_0x50e2('0x12')]=_0x4f210d;}break;}logger[_0x50e2('0x14')](util[_0x50e2('0x15')](_0x50e2('0x16'),_0x98d147['data1'],_0x98d147[_0x50e2('0x9')],JSON['stringify'](_0x2d1e40)));rp(_0x2d1e40)[_0x50e2('0x17')](function(_0x48e4d5){_0x4f210d=!_[_0x50e2('0x18')](_0x4f210d)?_0x50e2('0x19')+_0x4f210d:'';_0x2483b9=typeof _0x48e4d5[_0x50e2('0x12')]===_0x50e2('0x1a')?JSON['stringify'](_0x48e4d5[_0x50e2('0x12')]):_0x48e4d5['body'];logger[_0x50e2('0x14')](util[_0x50e2('0x15')](_0x50e2('0x1b'),_0x98d147['data1'],_0x98d147[_0x50e2('0x9')],_0x48e4d5[_0x50e2('0x1c')],_0x2483b9));})['catch'](function(_0x303b9b){logger[_0x50e2('0xf')](util[_0x50e2('0x15')]('%s\x20%s\x20failed\x20with\x20status:\x20%d\x20and\x20error:\x20%s\x20%s',_0x98d147[_0x50e2('0x6')],_0x98d147[_0x50e2('0x9')],_0x303b9b[_0x50e2('0x1c')],_0x303b9b[_0x50e2('0x1d')],_0x303b9b[_0x50e2('0x1e')]));});};
\ No newline at end of file
index 03ba6c4..2ab4b60 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcec7=['rpc','error','routing','message','result','catch','exports','jayson/promise','../../config/logger','client','http','Request','request','then','debug'];(function(_0x1f7e82,_0x448fd4){var _0x3fc53f=function(_0x387d56){while(--_0x387d56){_0x1f7e82['push'](_0x1f7e82['shift']());}};_0x3fc53f(++_0x448fd4);}(_0xcec7,0x1c9));var _0x7cec=function(_0x42afde,_0x377195){_0x42afde=_0x42afde-0x0;var _0x5e9990=_0xcec7[_0x42afde];return _0x5e9990;};'use strict';var jayson=require(_0x7cec('0x0'));var BPromise=require('bluebird');var logger=require(_0x7cec('0x1'))('routing');var client=jayson[_0x7cec('0x2')][_0x7cec('0x3')]({'port':0x2329});client[_0x7cec('0x4')]=function(_0x1ef419,_0xf7a214){return new BPromise(function(_0x12558f,_0x1d3735){return client[_0x7cec('0x5')](_0x1ef419,_0xf7a214)[_0x7cec('0x6')](function(_0x3376e1){logger[_0x7cec('0x7')](_0x7cec('0x8'),'routing',_0x1ef419,_0xf7a214,_0x3376e1);if(_0x3376e1['error']){logger[_0x7cec('0x9')](_0x7cec('0x8'),_0x7cec('0xa'),_0x1ef419,_0x3376e1[_0x7cec('0x9')]['message'],_0xf7a214);return _0x1d3735(_0x3376e1[_0x7cec('0x9')][_0x7cec('0xb')]);}else{return _0x12558f(_0x3376e1[_0x7cec('0xc')]);}})[_0x7cec('0xd')](function(_0x400dff){logger[_0x7cec('0x9')](_0x7cec('0x8'),_0x7cec('0xa'),_0x1ef419,_0x400dff,_0xf7a214);return _0x1d3735(_0x400dff);});});};module[_0x7cec('0xe')]=client;
\ No newline at end of file
+var _0x7ba3=['http','request','then','debug','rpc','routing','error','message','result','catch','exports','jayson/promise','bluebird','../../config/logger'];(function(_0x178b4e,_0x3810c2){var _0x176a81=function(_0x490fc4){while(--_0x490fc4){_0x178b4e['push'](_0x178b4e['shift']());}};_0x176a81(++_0x3810c2);}(_0x7ba3,0x89));var _0x37ba=function(_0x53b8e0,_0x55d46e){_0x53b8e0=_0x53b8e0-0x0;var _0x10630c=_0x7ba3[_0x53b8e0];return _0x10630c;};'use strict';var jayson=require(_0x37ba('0x0'));var BPromise=require(_0x37ba('0x1'));var logger=require(_0x37ba('0x2'))('routing');var client=jayson['client'][_0x37ba('0x3')]({'port':0x2329});client['Request']=function(_0x4804fe,_0x167888){return new BPromise(function(_0x1d24a9,_0x263c2b){return client[_0x37ba('0x4')](_0x4804fe,_0x167888)[_0x37ba('0x5')](function(_0x300f4c){logger[_0x37ba('0x6')](_0x37ba('0x7'),_0x37ba('0x8'),_0x4804fe,_0x167888,_0x300f4c);if(_0x300f4c[_0x37ba('0x9')]){logger[_0x37ba('0x9')](_0x37ba('0x7'),_0x37ba('0x8'),_0x4804fe,_0x300f4c[_0x37ba('0x9')][_0x37ba('0xa')],_0x167888);return _0x263c2b(_0x300f4c[_0x37ba('0x9')]['message']);}else{return _0x1d24a9(_0x300f4c[_0x37ba('0xb')]);}})[_0x37ba('0xc')](function(_0x4a4289){logger[_0x37ba('0x9')]('rpc','routing',_0x4804fe,_0x4a4289,_0x167888);return _0x263c2b(_0x4a4289);});});};module[_0x37ba('0xd')]=client;
\ No newline at end of file
index 47a160d..e20f2e5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfe99=['mailAccounts','listen','catch','error','Email\x20service\x20initialization','./realtime','./lib/email','./rpc/setting','../../config/logger','email','then','getMailAccounts','refresh'];(function(_0x5603dc,_0x1f1644){var _0x301da7=function(_0x163218){while(--_0x163218){_0x5603dc['push'](_0x5603dc['shift']());}};_0x301da7(++_0x1f1644);}(_0xfe99,0xc8));var _0x9fe9=function(_0x430ab7,_0x4f321a){_0x430ab7=_0x430ab7-0x0;var _0x1b3e9d=_0xfe99[_0x430ab7];return _0x1b3e9d;};'use strict';var server=require('./server');var Realtime=require(_0x9fe9('0x0'));var EmailChannel=require(_0x9fe9('0x1'));var mailAccount=require('./rpc/mailAccount');var setting=require(_0x9fe9('0x2'));var logger=require(_0x9fe9('0x3'))(_0x9fe9('0x4'));var realtime=new Realtime();var email=new EmailChannel(realtime);function initRealtime(){return Promise['resolve']()[_0x9fe9('0x5')](mailAccount[_0x9fe9('0x6')]())[_0x9fe9('0x5')](realtime['initMailAccounts']())['then'](function(){email[_0x9fe9('0x7')](realtime[_0x9fe9('0x8')]);return realtime;});}function main(){return server[_0x9fe9('0x9')](realtime,email)[_0x9fe9('0x5')](function(){return initRealtime();})[_0x9fe9('0x5')](function(){return setting['getSettings']();})[_0x9fe9('0x5')](function(_0x44c119){return setInterval(initRealtime,_0x44c119['loginMailFrequency']*0x3e8);})[_0x9fe9('0xa')](function(_0x48f7d1){logger[_0x9fe9('0xb')](_0x9fe9('0xc'),_0x48f7d1);});}main();
\ No newline at end of file
+var _0xfaf0=['./lib/email','./rpc/mailAccount','./rpc/setting','../../config/logger','email','then','getMailAccounts','initMailAccounts','refresh','mailAccounts','listen','loginMailFrequency','error','Email\x20service\x20initialization','./server','./realtime'];(function(_0x37924b,_0x57761d){var _0x2fe583=function(_0x3ac8f7){while(--_0x3ac8f7){_0x37924b['push'](_0x37924b['shift']());}};_0x2fe583(++_0x57761d);}(_0xfaf0,0x19e));var _0x0faf=function(_0xcaa633,_0x2ca23b){_0xcaa633=_0xcaa633-0x0;var _0x288cf6=_0xfaf0[_0xcaa633];return _0x288cf6;};'use strict';var server=require(_0x0faf('0x0'));var Realtime=require(_0x0faf('0x1'));var EmailChannel=require(_0x0faf('0x2'));var mailAccount=require(_0x0faf('0x3'));var setting=require(_0x0faf('0x4'));var logger=require(_0x0faf('0x5'))(_0x0faf('0x6'));var realtime=new Realtime();var email=new EmailChannel(realtime);function initRealtime(){return Promise['resolve']()[_0x0faf('0x7')](mailAccount[_0x0faf('0x8')]())[_0x0faf('0x7')](realtime[_0x0faf('0x9')]())['then'](function(){email[_0x0faf('0xa')](realtime[_0x0faf('0xb')]);return realtime;});}function main(){return server[_0x0faf('0xc')](realtime,email)[_0x0faf('0x7')](function(){return initRealtime();})['then'](function(){return setting['getSettings']();})[_0x0faf('0x7')](function(_0x5cc8d4){return setInterval(initRealtime,_0x5cc8d4[_0x0faf('0xd')]*0x3e8);})['catch'](function(_0x368625){logger[_0x0faf('0xe')](_0x0faf('0xf'),_0x368625);});}main();
\ No newline at end of file
index 03e8e87..39ef393 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbc03=['lastSync','verify','verified','exports','bluebird','ioredis','../../../config/environment','../../../config/logger','email','redis','defaults','localhost','socket.io-emitter','./imap','../rpc/mailAccount','info','start\x20email\x20channel','mailAccounts','imapAccounts','prototype','emit','key','Imap','messageStatus','total','md5','refresh','hasOwnProperty','active','service','provider','custom','box','bind','handleImapEmail','end','handleImapEnd','error','handleImapError','disabled','handleImapBox','status','connected','name','messages','New\x20email\x20from\x20%s\x20%s\x20%s\x20to\x20%s','lastName','from','notify','then','Mail\x20accepted\x20from\x20routing','catch','Mail\x20not\x20accepted\x20from\x20routing\x20%s','sendMail','smtp','isNil','Smtp'];(function(_0x3ec1da,_0x1e36f5){var _0x472358=function(_0x1d41b1){while(--_0x1d41b1){_0x3ec1da['push'](_0x3ec1da['shift']());}};_0x472358(++_0x1e36f5);}(_0xbc03,0xe8));var _0x3bc0=function(_0x411e55,_0x500863){_0x411e55=_0x411e55-0x0;var _0x374330=_0xbc03[_0x411e55];return _0x374330;};'use strict';var _=require('lodash');var moment=require('moment');var BPromise=require(_0x3bc0('0x0'));var md5=require('md5');var Redis=require(_0x3bc0('0x1'));var config=require(_0x3bc0('0x2'));var logger=require(_0x3bc0('0x3'))(_0x3bc0('0x4'));config[_0x3bc0('0x5')]=_[_0x3bc0('0x6')](config[_0x3bc0('0x5')],{'host':_0x3bc0('0x7'),'port':0x18eb});var io=require(_0x3bc0('0x8'))(new Redis(config[_0x3bc0('0x5')]));var EmailImap=require(_0x3bc0('0x9'));var EmailSmtp=require('./smtp');var mailAccount=require(_0x3bc0('0xa'));var md5Accounts={};function EmailChannel(_0xcf0656){logger[_0x3bc0('0xb')](_0x3bc0('0xc'));this[_0x3bc0('0xd')]=_0xcf0656['mailAccounts'];this[_0x3bc0('0xe')]={};this['smtp']=new EmailSmtp();}EmailChannel[_0x3bc0('0xf')][_0x3bc0('0x10')]=function(_0x2b2af7){var _0x438d04=this[_0x3bc0('0xd')][_0x2b2af7];var _0x5659aa={'id':_0x438d04['id'],'name':_0x438d04['name'],'key':_0x438d04[_0x3bc0('0x11')],'active':_0x438d04['active'],'Imap':{'status':_0x438d04[_0x3bc0('0x12')]['status'],'messageStatus':_0x438d04['Imap'][_0x3bc0('0x13')],'total':_0x438d04[_0x3bc0('0x12')][_0x3bc0('0x14')]}};if(_['isNil'](md5Accounts[_0x2b2af7])){md5Accounts[_0x2b2af7]={};}var _0x34dfba=md5(JSON['stringify'](_0x5659aa));if(md5Accounts[_0x2b2af7][_0x3bc0('0x15')]!==_0x34dfba){md5Accounts[_0x2b2af7][_0x3bc0('0x15')]=_0x34dfba;io[_0x3bc0('0x10')]('mailAccount:update',_0x5659aa);}};EmailChannel[_0x3bc0('0xf')][_0x3bc0('0x16')]=function(_0x4eab11){for(var _0x4d3c72 in _0x4eab11){if(_0x4eab11[_0x3bc0('0x17')](_0x4d3c72)){if(_0x4eab11[_0x4d3c72][_0x3bc0('0x12')]&&_0x4eab11[_0x4d3c72][_0x3bc0('0x18')]){var _0x11cc48=_0x4eab11[_0x4d3c72][_0x3bc0('0x12')];if(!_0x11cc48[_0x3bc0('0x19')]&&_0x4eab11[_0x4d3c72][_0x3bc0('0x1a')]!==_0x3bc0('0x1b'))_0x11cc48[_0x3bc0('0x19')]=_0x4eab11[_0x4d3c72][_0x3bc0('0x1a')];if(!this[_0x3bc0('0xe')][_0x3bc0('0x17')](_0x11cc48['id'])){this[_0x3bc0('0xe')][_0x11cc48['id']]=new EmailImap(_0x11cc48,_0x4eab11[_0x4d3c72][_0x3bc0('0x4')]);this['imapAccounts'][_0x11cc48['id']]['on'](_0x3bc0('0x1c'),this['handleImapBox'][_0x3bc0('0x1d')](this,_0x4d3c72));this[_0x3bc0('0xe')][_0x11cc48['id']]['on']('email',this[_0x3bc0('0x1e')]['bind'](this,_0x4d3c72));this[_0x3bc0('0xe')][_0x11cc48['id']]['on'](_0x3bc0('0x1f'),this[_0x3bc0('0x20')][_0x3bc0('0x1d')](this,_0x4d3c72));this[_0x3bc0('0xe')][_0x11cc48['id']]['on'](_0x3bc0('0x21'),this[_0x3bc0('0x22')][_0x3bc0('0x1d')](this,_0x4d3c72));}}else{if(_['isNil'](this['mailAccounts'][_0x4d3c72][_0x3bc0('0x12')])){this[_0x3bc0('0xd')][_0x4d3c72][_0x3bc0('0x12')]={};}this['mailAccounts'][_0x4d3c72][_0x3bc0('0x12')]['status']=_0x3bc0('0x23');this[_0x3bc0('0xd')][_0x4d3c72][_0x3bc0('0x12')]['messageStatus']='';this[_0x3bc0('0x10')](_0x4d3c72);}}}};EmailChannel[_0x3bc0('0xf')][_0x3bc0('0x24')]=function(_0xb11900,_0x22bcb7){if(this[_0x3bc0('0xd')][_0xb11900]){this[_0x3bc0('0xd')][_0xb11900][_0x3bc0('0x12')][_0x3bc0('0x25')]=_0x3bc0('0x26');this['mailAccounts'][_0xb11900][_0x3bc0('0x12')]['messageStatus']=_0x22bcb7[_0x3bc0('0x27')];if(_0x22bcb7[_0x3bc0('0x28')]){this[_0x3bc0('0xd')][_0xb11900][_0x3bc0('0x12')][_0x3bc0('0x14')]=_0x22bcb7['messages'][_0x3bc0('0x14')];}return this['emit'](_0xb11900);}};EmailChannel[_0x3bc0('0xf')][_0x3bc0('0x1e')]=function(_0x7ac2c4,_0x29e99c){logger[_0x3bc0('0xb')](_0x3bc0('0x29'),_0x29e99c['firstName'],_0x29e99c[_0x3bc0('0x2a')],_0x29e99c[_0x3bc0('0x2b')],_0x7ac2c4);if(this['mailAccounts'][_0x7ac2c4]){return mailAccount[_0x3bc0('0x2c')](_0x7ac2c4,_0x29e99c)[_0x3bc0('0x2d')](function(_0x5c2873){if(_0x5c2873){logger[_0x3bc0('0xb')](_0x3bc0('0x2e'));}})[_0x3bc0('0x2f')](function(_0x11993a){logger[_0x3bc0('0x21')](_0x3bc0('0x30'),JSON['stringify'](_0x11993a));});}};EmailChannel['prototype'][_0x3bc0('0x20')]=function(_0x5d40b7){if(this[_0x3bc0('0xd')][_0x5d40b7]&&this[_0x3bc0('0xd')][_0x5d40b7][_0x3bc0('0x12')]){if(this['imapAccounts'][this[_0x3bc0('0xd')][_0x5d40b7][_0x3bc0('0x12')]['id']]){delete this['imapAccounts'][this[_0x3bc0('0xd')][_0x5d40b7][_0x3bc0('0x12')]['id']];}this['mailAccounts'][_0x5d40b7][_0x3bc0('0x12')]['lastSync']=moment();this[_0x3bc0('0x10')](_0x5d40b7);}};EmailChannel[_0x3bc0('0xf')][_0x3bc0('0x22')]=function(_0x190865,_0x4b13af){if(this[_0x3bc0('0xd')][_0x190865]){this[_0x3bc0('0xd')][_0x190865][_0x3bc0('0x12')]['status']='error';this[_0x3bc0('0xd')][_0x190865][_0x3bc0('0x12')][_0x3bc0('0x13')]=_0x4b13af;return this[_0x3bc0('0x10')](_0x190865);}};EmailChannel['prototype'][_0x3bc0('0x31')]=function(_0x4ee6ea,_0x111bcf){return this[_0x3bc0('0x32')]['send'](_0x4ee6ea,_0x111bcf);};EmailChannel[_0x3bc0('0xf')]['verifySmtp']=function(_0x1d08ff){var _0x496299=this;if(this[_0x3bc0('0xd')][_0x1d08ff['id']]){if(_[_0x3bc0('0x33')](this[_0x3bc0('0xd')][_0x1d08ff['id']][_0x3bc0('0x34')])){this[_0x3bc0('0xd')][_0x1d08ff['id']][_0x3bc0('0x34')]={};}this[_0x3bc0('0xd')][_0x1d08ff['id']][_0x3bc0('0x34')][_0x3bc0('0x35')]=moment();return new BPromise(function(_0x587817,_0x2b7776){return _0x496299[_0x3bc0('0x32')][_0x3bc0('0x36')](_0x1d08ff)[_0x3bc0('0x2d')](function(_0x16eb6a){_0x496299['mailAccounts'][_0x1d08ff['id']][_0x3bc0('0x34')][_0x3bc0('0x25')]=_0x3bc0('0x37');_0x496299[_0x3bc0('0xd')][_0x1d08ff['id']][_0x3bc0('0x34')]['messageStatus']='';_0x496299[_0x3bc0('0x10')](_0x1d08ff['id']);_0x587817(_0x16eb6a);})[_0x3bc0('0x2f')](function(_0x3b6c4d){_0x496299[_0x3bc0('0xd')][_0x1d08ff['id']][_0x3bc0('0x34')][_0x3bc0('0x25')]=_0x3bc0('0x21');_0x496299[_0x3bc0('0xd')][_0x1d08ff['id']][_0x3bc0('0x34')][_0x3bc0('0x13')]=_0x3b6c4d;_0x496299['emit'](_0x1d08ff['id']);_0x2b7776(_0x3b6c4d);});});}return this[_0x3bc0('0x32')][_0x3bc0('0x36')](_0x1d08ff);};module[_0x3bc0('0x38')]=EmailChannel;
\ No newline at end of file
+var _0x2d1e=['lastSync','handleImapError','verifySmtp','Smtp','verify','verified','exports','lodash','moment','bluebird','md5','ioredis','../../../config/environment','../../../config/logger','email','defaults','localhost','socket.io-emitter','redis','./smtp','../rpc/mailAccount','start\x20email\x20channel','mailAccounts','smtp','prototype','emit','key','active','status','Imap','total','isNil','mailAccount:update','hasOwnProperty','service','provider','imapAccounts','box','handleImapBox','bind','handleImapEmail','end','handleImapEnd','error','disabled','connected','messageStatus','name','messages','info','New\x20email\x20from\x20%s\x20%s\x20%s\x20to\x20%s','firstName','lastName','from','notify','Mail\x20accepted\x20from\x20routing','stringify'];(function(_0x559c26,_0x4073f6){var _0x21896a=function(_0x1f967b){while(--_0x1f967b){_0x559c26['push'](_0x559c26['shift']());}};_0x21896a(++_0x4073f6);}(_0x2d1e,0x15d));var _0xe2d1=function(_0x4154a6,_0x2c0b8e){_0x4154a6=_0x4154a6-0x0;var _0x3b2786=_0x2d1e[_0x4154a6];return _0x3b2786;};'use strict';var _=require(_0xe2d1('0x0'));var moment=require(_0xe2d1('0x1'));var BPromise=require(_0xe2d1('0x2'));var md5=require(_0xe2d1('0x3'));var Redis=require(_0xe2d1('0x4'));var config=require(_0xe2d1('0x5'));var logger=require(_0xe2d1('0x6'))(_0xe2d1('0x7'));config['redis']=_[_0xe2d1('0x8')](config['redis'],{'host':_0xe2d1('0x9'),'port':0x18eb});var io=require(_0xe2d1('0xa'))(new Redis(config[_0xe2d1('0xb')]));var EmailImap=require('./imap');var EmailSmtp=require(_0xe2d1('0xc'));var mailAccount=require(_0xe2d1('0xd'));var md5Accounts={};function EmailChannel(_0xeff721){logger['info'](_0xe2d1('0xe'));this[_0xe2d1('0xf')]=_0xeff721[_0xe2d1('0xf')];this['imapAccounts']={};this[_0xe2d1('0x10')]=new EmailSmtp();}EmailChannel[_0xe2d1('0x11')][_0xe2d1('0x12')]=function(_0x424607){var _0x1e299=this[_0xe2d1('0xf')][_0x424607];var _0x464cfb={'id':_0x1e299['id'],'name':_0x1e299['name'],'key':_0x1e299[_0xe2d1('0x13')],'active':_0x1e299[_0xe2d1('0x14')],'Imap':{'status':_0x1e299['Imap'][_0xe2d1('0x15')],'messageStatus':_0x1e299['Imap']['messageStatus'],'total':_0x1e299[_0xe2d1('0x16')][_0xe2d1('0x17')]}};if(_[_0xe2d1('0x18')](md5Accounts[_0x424607])){md5Accounts[_0x424607]={};}var _0x428499=md5(JSON['stringify'](_0x464cfb));if(md5Accounts[_0x424607][_0xe2d1('0x3')]!==_0x428499){md5Accounts[_0x424607][_0xe2d1('0x3')]=_0x428499;io['emit'](_0xe2d1('0x19'),_0x464cfb);}};EmailChannel[_0xe2d1('0x11')]['refresh']=function(_0x50cbb6){for(var _0x593ff3 in _0x50cbb6){if(_0x50cbb6[_0xe2d1('0x1a')](_0x593ff3)){if(_0x50cbb6[_0x593ff3]['Imap']&&_0x50cbb6[_0x593ff3][_0xe2d1('0x14')]){var _0x47463b=_0x50cbb6[_0x593ff3][_0xe2d1('0x16')];if(!_0x47463b[_0xe2d1('0x1b')]&&_0x50cbb6[_0x593ff3]['provider']!=='custom')_0x47463b[_0xe2d1('0x1b')]=_0x50cbb6[_0x593ff3][_0xe2d1('0x1c')];if(!this[_0xe2d1('0x1d')]['hasOwnProperty'](_0x47463b['id'])){this['imapAccounts'][_0x47463b['id']]=new EmailImap(_0x47463b,_0x50cbb6[_0x593ff3]['email']);this[_0xe2d1('0x1d')][_0x47463b['id']]['on'](_0xe2d1('0x1e'),this[_0xe2d1('0x1f')][_0xe2d1('0x20')](this,_0x593ff3));this[_0xe2d1('0x1d')][_0x47463b['id']]['on'](_0xe2d1('0x7'),this[_0xe2d1('0x21')][_0xe2d1('0x20')](this,_0x593ff3));this[_0xe2d1('0x1d')][_0x47463b['id']]['on'](_0xe2d1('0x22'),this[_0xe2d1('0x23')][_0xe2d1('0x20')](this,_0x593ff3));this['imapAccounts'][_0x47463b['id']]['on'](_0xe2d1('0x24'),this['handleImapError'][_0xe2d1('0x20')](this,_0x593ff3));}}else{if(_['isNil'](this[_0xe2d1('0xf')][_0x593ff3][_0xe2d1('0x16')])){this[_0xe2d1('0xf')][_0x593ff3]['Imap']={};}this['mailAccounts'][_0x593ff3][_0xe2d1('0x16')]['status']=_0xe2d1('0x25');this[_0xe2d1('0xf')][_0x593ff3][_0xe2d1('0x16')]['messageStatus']='';this[_0xe2d1('0x12')](_0x593ff3);}}}};EmailChannel[_0xe2d1('0x11')][_0xe2d1('0x1f')]=function(_0x564e0b,_0x412f74){if(this['mailAccounts'][_0x564e0b]){this[_0xe2d1('0xf')][_0x564e0b][_0xe2d1('0x16')][_0xe2d1('0x15')]=_0xe2d1('0x26');this[_0xe2d1('0xf')][_0x564e0b][_0xe2d1('0x16')][_0xe2d1('0x27')]=_0x412f74[_0xe2d1('0x28')];if(_0x412f74[_0xe2d1('0x29')]){this[_0xe2d1('0xf')][_0x564e0b][_0xe2d1('0x16')]['total']=_0x412f74[_0xe2d1('0x29')][_0xe2d1('0x17')];}return this[_0xe2d1('0x12')](_0x564e0b);}};EmailChannel[_0xe2d1('0x11')][_0xe2d1('0x21')]=function(_0xf203c8,_0x297d91){logger[_0xe2d1('0x2a')](_0xe2d1('0x2b'),_0x297d91[_0xe2d1('0x2c')],_0x297d91[_0xe2d1('0x2d')],_0x297d91[_0xe2d1('0x2e')],_0xf203c8);if(this['mailAccounts'][_0xf203c8]){return mailAccount[_0xe2d1('0x2f')](_0xf203c8,_0x297d91)['then'](function(_0x5c4910){if(_0x5c4910){logger[_0xe2d1('0x2a')](_0xe2d1('0x30'));}})['catch'](function(_0x314b30){logger[_0xe2d1('0x24')]('Mail\x20not\x20accepted\x20from\x20routing\x20%s',JSON[_0xe2d1('0x31')](_0x314b30));});}};EmailChannel[_0xe2d1('0x11')][_0xe2d1('0x23')]=function(_0x305caf){if(this['mailAccounts'][_0x305caf]&&this[_0xe2d1('0xf')][_0x305caf]['Imap']){if(this['imapAccounts'][this[_0xe2d1('0xf')][_0x305caf][_0xe2d1('0x16')]['id']]){delete this['imapAccounts'][this['mailAccounts'][_0x305caf][_0xe2d1('0x16')]['id']];}this[_0xe2d1('0xf')][_0x305caf][_0xe2d1('0x16')][_0xe2d1('0x32')]=moment();this[_0xe2d1('0x12')](_0x305caf);}};EmailChannel[_0xe2d1('0x11')][_0xe2d1('0x33')]=function(_0x478c9d,_0x1af215){if(this[_0xe2d1('0xf')][_0x478c9d]){this[_0xe2d1('0xf')][_0x478c9d][_0xe2d1('0x16')][_0xe2d1('0x15')]=_0xe2d1('0x24');this[_0xe2d1('0xf')][_0x478c9d][_0xe2d1('0x16')]['messageStatus']=_0x1af215;return this[_0xe2d1('0x12')](_0x478c9d);}};EmailChannel[_0xe2d1('0x11')]['sendMail']=function(_0xb9bdd7,_0x572469){return this['smtp']['send'](_0xb9bdd7,_0x572469);};EmailChannel[_0xe2d1('0x11')][_0xe2d1('0x34')]=function(_0x80eb3b){var _0x134c9d=this;if(this[_0xe2d1('0xf')][_0x80eb3b['id']]){if(_[_0xe2d1('0x18')](this[_0xe2d1('0xf')][_0x80eb3b['id']]['Smtp'])){this[_0xe2d1('0xf')][_0x80eb3b['id']][_0xe2d1('0x35')]={};}this['mailAccounts'][_0x80eb3b['id']][_0xe2d1('0x35')][_0xe2d1('0x32')]=moment();return new BPromise(function(_0x146954,_0xf4d275){return _0x134c9d[_0xe2d1('0x10')][_0xe2d1('0x36')](_0x80eb3b)['then'](function(_0x569041){_0x134c9d[_0xe2d1('0xf')][_0x80eb3b['id']][_0xe2d1('0x35')][_0xe2d1('0x15')]=_0xe2d1('0x37');_0x134c9d['mailAccounts'][_0x80eb3b['id']][_0xe2d1('0x35')][_0xe2d1('0x27')]='';_0x134c9d[_0xe2d1('0x12')](_0x80eb3b['id']);_0x146954(_0x569041);})['catch'](function(_0x395bc7){_0x134c9d['mailAccounts'][_0x80eb3b['id']][_0xe2d1('0x35')]['status']='error';_0x134c9d[_0xe2d1('0xf')][_0x80eb3b['id']][_0xe2d1('0x35')][_0xe2d1('0x27')]=_0x395bc7;_0x134c9d[_0xe2d1('0x12')](_0x80eb3b['id']);_0xf4d275(_0x395bc7);});});}return this[_0xe2d1('0x10')][_0xe2d1('0x36')](_0x80eb3b);};module[_0xe2d1('0x38')]=EmailChannel;
\ No newline at end of file
index b789478..dadc448 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe7d4=['handleMessageAttributes','handleMessageEnd','handleSimpleParser','parser','stringify','textCode','hasOwnProperty','upperFirst','exports','lodash','imap','mailparser','iconv','Iconv','events','EventEmitter','../../../config/logger','mailbox','account','getAccount','once','handleReady','end','bind','error','handleError','connect','inherits','prototype','connTimeout','authTimeout','service','user','modernAuthentication','xoauth2','generateXOAuth2Token','CloudProvider','data5','password','authentication','email','anonymous@xcally.com','host','port','tls','required','openBox','handleOpenBox','emit','box','readUnseen','handleCloseBox','UNSEEN','handleReadUnseen','length','fetch','message','handleFetchMessage','handleFetchError','handleFetchEnd','closeBox','body','handleMessageBody'];(function(_0x1196ae,_0xc1d47d){var _0x144efb=function(_0xb32282){while(--_0xb32282){_0x1196ae['push'](_0x1196ae['shift']());}};_0x144efb(++_0xc1d47d);}(_0xe7d4,0x87));var _0x4e7d=function(_0x3e793d,_0x3d7a2b){_0x3e793d=_0x3e793d-0x0;var _0x6bb312=_0xe7d4[_0x3e793d];return _0x6bb312;};'use strict';var _=require(_0x4e7d('0x0'));var util=require('util');var Imap=require(_0x4e7d('0x1'));var simpleParser=require(_0x4e7d('0x2'))['simpleParser'];var Iconv=require(_0x4e7d('0x3'))[_0x4e7d('0x4')];var EventEmitter=require(_0x4e7d('0x5'))[_0x4e7d('0x6')];var utils=require('./utils');var logger=require(_0x4e7d('0x7'))('email');function EmailImap(_0x45d5d8,_0x54f863){this['mailbox']=_0x45d5d8[_0x4e7d('0x8')];this[_0x4e7d('0x9')]=this[_0x4e7d('0xa')](_0x45d5d8,_0x54f863);this[_0x4e7d('0x1')]=new Imap(this[_0x4e7d('0x9')]);this['imap'][_0x4e7d('0xb')]('ready',this[_0x4e7d('0xc')]['bind'](this));this[_0x4e7d('0x1')]['once'](_0x4e7d('0xd'),this['handleEnd'][_0x4e7d('0xe')](this));this[_0x4e7d('0x1')]['on'](_0x4e7d('0xf'),this[_0x4e7d('0x10')]['bind'](this));this['imap'][_0x4e7d('0x11')]();}util[_0x4e7d('0x12')](EmailImap,EventEmitter);EmailImap[_0x4e7d('0x13')][_0x4e7d('0xa')]=function(_0x5c1ad0,_0x14b820){var _0x1e7697={'connTimeout':_0x5c1ad0['connTimeout']?_0x5c1ad0[_0x4e7d('0x14')]*0x3e8:0x2710,'authTimeout':_0x5c1ad0[_0x4e7d('0x15')]?_0x5c1ad0[_0x4e7d('0x15')]*0x3e8:0x1388};if(_0x5c1ad0[_0x4e7d('0x16')]){_0x1e7697[_0x4e7d('0x17')]=_0x5c1ad0[_0x4e7d('0x17')];if(_0x5c1ad0[_0x4e7d('0x18')]){_0x1e7697[_0x4e7d('0x19')]=utils[_0x4e7d('0x1a')](_0x5c1ad0[_0x4e7d('0x1b')][_0x4e7d('0x1c')],_0x5c1ad0[_0x4e7d('0x17')]);}else{_0x1e7697['password']=_0x5c1ad0[_0x4e7d('0x1d')];}}else{if(_0x5c1ad0[_0x4e7d('0x1e')]){_0x1e7697[_0x4e7d('0x17')]=_0x5c1ad0['user'];_0x1e7697[_0x4e7d('0x1d')]=_0x5c1ad0[_0x4e7d('0x1d')];}}_0x1e7697[_0x4e7d('0x1f')]=_0x14b820||_0x5c1ad0[_0x4e7d('0x17')]||_0x4e7d('0x20');_0x1e7697[_0x4e7d('0x21')]=_0x5c1ad0['host'];_0x1e7697[_0x4e7d('0x22')]=_0x5c1ad0[_0x4e7d('0x22')]||0x3e1;if(_0x5c1ad0[_0x4e7d('0x23')]){_0x1e7697[_0x4e7d('0x23')]=!![];}else{_0x1e7697[_0x4e7d('0x23')]=![];_0x1e7697['autotls']=_0x4e7d('0x24');}return _0x1e7697;};EmailImap['prototype'][_0x4e7d('0xc')]=function(){this[_0x4e7d('0x1')][_0x4e7d('0x25')](this[_0x4e7d('0x8')],![],this[_0x4e7d('0x26')][_0x4e7d('0xe')](this));};EmailImap['prototype'][_0x4e7d('0x26')]=function(_0x2103c1,_0x1fa7be){if(_0x2103c1){this[_0x4e7d('0x10')](_0x2103c1,!![]);}else{this[_0x4e7d('0x27')](_0x4e7d('0x28'),_0x1fa7be);this[_0x4e7d('0x29')]();}};EmailImap[_0x4e7d('0x13')][_0x4e7d('0x2a')]=function(_0x107ac8){if(_0x107ac8){this[_0x4e7d('0x10')](_0x107ac8,!![]);}else{this[_0x4e7d('0x1')]['end']();}};EmailImap[_0x4e7d('0x13')][_0x4e7d('0x29')]=function(){this[_0x4e7d('0x1')]['search']([_0x4e7d('0x2b')],this[_0x4e7d('0x2c')][_0x4e7d('0xe')](this));};EmailImap[_0x4e7d('0x13')][_0x4e7d('0x2c')]=function(_0x337ed1,_0x274670){if(_0x337ed1){this[_0x4e7d('0x10')](_0x337ed1,!![]);}else{if(_0x274670[_0x4e7d('0x2d')]){try{var _0x25b3ed=this[_0x4e7d('0x1')][_0x4e7d('0x2e')](_0x274670,{'bodies':'','markSeen':!![]});_0x25b3ed['on'](_0x4e7d('0x2f'),this[_0x4e7d('0x30')][_0x4e7d('0xe')](this));_0x25b3ed[_0x4e7d('0xb')](_0x4e7d('0xf'),this[_0x4e7d('0x31')]['bind'](this));_0x25b3ed[_0x4e7d('0xb')](_0x4e7d('0xd'),this[_0x4e7d('0x32')][_0x4e7d('0xe')](this));}catch(_0x1d2108){logger[_0x4e7d('0xf')](_0x1d2108);}}else{this[_0x4e7d('0x1')][_0x4e7d('0x33')](!![],this['handleCloseBox'][_0x4e7d('0xe')](this));}}};EmailImap[_0x4e7d('0x13')][_0x4e7d('0x30')]=function(_0x4afd91){_0x4afd91['on'](_0x4e7d('0x34'),this[_0x4e7d('0x35')][_0x4e7d('0xe')](this));_0x4afd91[_0x4e7d('0xb')]('attributes',this[_0x4e7d('0x36')]['bind'](this));_0x4afd91['once'](_0x4e7d('0xd'),this[_0x4e7d('0x37')][_0x4e7d('0xe')](this));};EmailImap[_0x4e7d('0x13')]['handleMessageBody']=function(_0x2d788c){simpleParser(_0x2d788c,{'Iconv':Iconv},this[_0x4e7d('0x38')][_0x4e7d('0xe')](this));};EmailImap[_0x4e7d('0x13')][_0x4e7d('0x36')]=function(){};EmailImap[_0x4e7d('0x13')]['handleMessageEnd']=function(){};EmailImap[_0x4e7d('0x13')][_0x4e7d('0x38')]=function(_0x485e4d,_0x3e610c){if(_0x485e4d){logger[_0x4e7d('0xf')](_0x485e4d);}else{var _0x5c8bd9=this;utils[_0x4e7d('0x39')](this[_0x4e7d('0x9')],_0x3e610c,function(_0x2475e7){_0x5c8bd9[_0x4e7d('0x27')](_0x4e7d('0x1f'),_0x2475e7);});}};EmailImap['prototype'][_0x4e7d('0x32')]=function(){this[_0x4e7d('0x1')][_0x4e7d('0x33')](!![],this[_0x4e7d('0x2a')][_0x4e7d('0xe')](this));};EmailImap[_0x4e7d('0x13')][_0x4e7d('0x31')]=function(_0x31dc34){this[_0x4e7d('0x10')](_0x31dc34);this[_0x4e7d('0x1')][_0x4e7d('0x33')](!![],this[_0x4e7d('0x2a')][_0x4e7d('0xe')](this));};EmailImap['prototype']['handleEnd']=function(){this[_0x4e7d('0x27')](_0x4e7d('0xd'));};EmailImap['prototype']['handleError']=function(_0x3c64af,_0xf56f1d){logger['error'](_0x4e7d('0x10'),this['account'][_0x4e7d('0x1f')],JSON[_0x4e7d('0x3a')](_0x3c64af));var _0x1b1c6a='';if(_0x3c64af){if(_0x3c64af[_0x4e7d('0x3b')]){_0x1b1c6a=_0x3c64af[_0x4e7d('0x3b')];}else{for(var _0x2dea45 in _0x3c64af){if(_0x3c64af[_0x4e7d('0x3c')](_0x2dea45)){_0x1b1c6a+=_[_0x4e7d('0x3d')](_0x2dea45)+':\x20'+_0x3c64af[_0x2dea45]+'\x0a';}}}}if(_0xf56f1d){this[_0x4e7d('0x1')]['end']();}else{this[_0x4e7d('0x27')](_0x4e7d('0xf'),_0x1b1c6a);this[_0x4e7d('0x27')](_0x4e7d('0xd'));}};module[_0x4e7d('0x3e')]=EmailImap;
\ No newline at end of file
+var _0x5db4=['mailbox','getAccount','account','once','ready','bind','end','handleEnd','error','handleError','connect','inherits','prototype','connTimeout','authTimeout','service','user','xoauth2','generateXOAuth2Token','CloudProvider','data5','password','authentication','host','port','tls','handleReady','openBox','handleOpenBox','emit','readUnseen','handleCloseBox','search','UNSEEN','handleReadUnseen','length','handleFetchMessage','handleFetchError','handleFetchEnd','handleMessageBody','attributes','handleMessageAttributes','handleMessageEnd','handleSimpleParser','parser','closeBox','stringify','textCode','hasOwnProperty','exports','lodash','imap','simpleParser','iconv','Iconv','EventEmitter','./utils','../../../config/logger','email'];(function(_0x220dbb,_0x99328d){var _0x2b77de=function(_0x15e966){while(--_0x15e966){_0x220dbb['push'](_0x220dbb['shift']());}};_0x2b77de(++_0x99328d);}(_0x5db4,0xe3));var _0x45db=function(_0x4f906b,_0x247831){_0x4f906b=_0x4f906b-0x0;var _0x5a4a00=_0x5db4[_0x4f906b];return _0x5a4a00;};'use strict';var _=require(_0x45db('0x0'));var util=require('util');var Imap=require(_0x45db('0x1'));var simpleParser=require('mailparser')[_0x45db('0x2')];var Iconv=require(_0x45db('0x3'))[_0x45db('0x4')];var EventEmitter=require('events')[_0x45db('0x5')];var utils=require(_0x45db('0x6'));var logger=require(_0x45db('0x7'))(_0x45db('0x8'));function EmailImap(_0x31297b,_0x42809f){this['mailbox']=_0x31297b[_0x45db('0x9')];this['account']=this[_0x45db('0xa')](_0x31297b,_0x42809f);this['imap']=new Imap(this[_0x45db('0xb')]);this[_0x45db('0x1')][_0x45db('0xc')](_0x45db('0xd'),this['handleReady'][_0x45db('0xe')](this));this[_0x45db('0x1')][_0x45db('0xc')](_0x45db('0xf'),this[_0x45db('0x10')][_0x45db('0xe')](this));this[_0x45db('0x1')]['on'](_0x45db('0x11'),this[_0x45db('0x12')]['bind'](this));this[_0x45db('0x1')][_0x45db('0x13')]();}util[_0x45db('0x14')](EmailImap,EventEmitter);EmailImap[_0x45db('0x15')][_0x45db('0xa')]=function(_0x17c5ac,_0x3105c0){var _0x334bac={'connTimeout':_0x17c5ac[_0x45db('0x16')]?_0x17c5ac[_0x45db('0x16')]*0x3e8:0x2710,'authTimeout':_0x17c5ac[_0x45db('0x17')]?_0x17c5ac[_0x45db('0x17')]*0x3e8:0x1388};if(_0x17c5ac[_0x45db('0x18')]){_0x334bac[_0x45db('0x19')]=_0x17c5ac['user'];if(_0x17c5ac['modernAuthentication']){_0x334bac[_0x45db('0x1a')]=utils[_0x45db('0x1b')](_0x17c5ac[_0x45db('0x1c')][_0x45db('0x1d')],_0x17c5ac[_0x45db('0x19')]);}else{_0x334bac['password']=_0x17c5ac[_0x45db('0x1e')];}}else{if(_0x17c5ac[_0x45db('0x1f')]){_0x334bac['user']=_0x17c5ac[_0x45db('0x19')];_0x334bac['password']=_0x17c5ac[_0x45db('0x1e')];}}_0x334bac[_0x45db('0x8')]=_0x3105c0||_0x17c5ac[_0x45db('0x19')]||'anonymous@xcally.com';_0x334bac[_0x45db('0x20')]=_0x17c5ac[_0x45db('0x20')];_0x334bac['port']=_0x17c5ac[_0x45db('0x21')]||0x3e1;if(_0x17c5ac[_0x45db('0x22')]){_0x334bac['tls']=!![];}else{_0x334bac['tls']=![];_0x334bac['autotls']='required';}return _0x334bac;};EmailImap[_0x45db('0x15')][_0x45db('0x23')]=function(){this[_0x45db('0x1')][_0x45db('0x24')](this[_0x45db('0x9')],![],this['handleOpenBox'][_0x45db('0xe')](this));};EmailImap[_0x45db('0x15')][_0x45db('0x25')]=function(_0x2cebc8,_0x4cae16){if(_0x2cebc8){this[_0x45db('0x12')](_0x2cebc8,!![]);}else{this[_0x45db('0x26')]('box',_0x4cae16);this[_0x45db('0x27')]();}};EmailImap[_0x45db('0x15')][_0x45db('0x28')]=function(_0x552f65){if(_0x552f65){this[_0x45db('0x12')](_0x552f65,!![]);}else{this['imap'][_0x45db('0xf')]();}};EmailImap[_0x45db('0x15')][_0x45db('0x27')]=function(){this['imap'][_0x45db('0x29')]([_0x45db('0x2a')],this['handleReadUnseen'][_0x45db('0xe')](this));};EmailImap[_0x45db('0x15')][_0x45db('0x2b')]=function(_0x58bcaf,_0x32cee4){if(_0x58bcaf){this['handleError'](_0x58bcaf,!![]);}else{if(_0x32cee4[_0x45db('0x2c')]){try{var _0x6a8029=this[_0x45db('0x1')]['fetch'](_0x32cee4,{'bodies':'','markSeen':!![]});_0x6a8029['on']('message',this[_0x45db('0x2d')][_0x45db('0xe')](this));_0x6a8029[_0x45db('0xc')](_0x45db('0x11'),this[_0x45db('0x2e')][_0x45db('0xe')](this));_0x6a8029[_0x45db('0xc')]('end',this[_0x45db('0x2f')][_0x45db('0xe')](this));}catch(_0x342c18){logger[_0x45db('0x11')](_0x342c18);}}else{this[_0x45db('0x1')]['closeBox'](!![],this['handleCloseBox'][_0x45db('0xe')](this));}}};EmailImap[_0x45db('0x15')][_0x45db('0x2d')]=function(_0x1483fe){_0x1483fe['on']('body',this[_0x45db('0x30')]['bind'](this));_0x1483fe['once'](_0x45db('0x31'),this[_0x45db('0x32')][_0x45db('0xe')](this));_0x1483fe[_0x45db('0xc')](_0x45db('0xf'),this[_0x45db('0x33')][_0x45db('0xe')](this));};EmailImap[_0x45db('0x15')][_0x45db('0x30')]=function(_0x57f9d3){simpleParser(_0x57f9d3,{'Iconv':Iconv},this[_0x45db('0x34')][_0x45db('0xe')](this));};EmailImap[_0x45db('0x15')]['handleMessageAttributes']=function(){};EmailImap[_0x45db('0x15')]['handleMessageEnd']=function(){};EmailImap[_0x45db('0x15')][_0x45db('0x34')]=function(_0x50217a,_0x3b9f58){if(_0x50217a){logger['error'](_0x50217a);}else{var _0x47e144=this;utils[_0x45db('0x35')](this[_0x45db('0xb')],_0x3b9f58,function(_0x418ddb){_0x47e144[_0x45db('0x26')](_0x45db('0x8'),_0x418ddb);});}};EmailImap[_0x45db('0x15')][_0x45db('0x2f')]=function(){this[_0x45db('0x1')][_0x45db('0x36')](!![],this[_0x45db('0x28')]['bind'](this));};EmailImap[_0x45db('0x15')][_0x45db('0x2e')]=function(_0x258269){this[_0x45db('0x12')](_0x258269);this[_0x45db('0x1')][_0x45db('0x36')](!![],this[_0x45db('0x28')][_0x45db('0xe')](this));};EmailImap[_0x45db('0x15')][_0x45db('0x10')]=function(){this[_0x45db('0x26')](_0x45db('0xf'));};EmailImap['prototype']['handleError']=function(_0xe766be,_0x4a7c26){logger[_0x45db('0x11')](_0x45db('0x12'),this[_0x45db('0xb')]['email'],JSON[_0x45db('0x37')](_0xe766be));var _0x2a4f5d='';if(_0xe766be){if(_0xe766be[_0x45db('0x38')]){_0x2a4f5d=_0xe766be[_0x45db('0x38')];}else{for(var _0x54c322 in _0xe766be){if(_0xe766be[_0x45db('0x39')](_0x54c322)){_0x2a4f5d+=_['upperFirst'](_0x54c322)+':\x20'+_0xe766be[_0x54c322]+'\x0a';}}}}if(_0x4a7c26){this['imap'][_0x45db('0xf')]();}else{this[_0x45db('0x26')](_0x45db('0x11'),_0x2a4f5d);this[_0x45db('0x26')]('end');}};module[_0x45db('0x3a')]=EmailImap;
\ No newline at end of file
index f7ffba7..028b890 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9742=['toString','Not\x20verifired','exports','nodemailer','nodemailer-plugin-inline-base64','send','createTransport','use','compile','sendMail','prototype'];(function(_0x2f497f,_0x895196){var _0x196a22=function(_0x5dae58){while(--_0x5dae58){_0x2f497f['push'](_0x2f497f['shift']());}};_0x196a22(++_0x895196);}(_0x9742,0x163));var _0x2974=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x9742[_0x20a584];return _0x4b41a8;};'use strict';var nodemailer=require(_0x2974('0x0'));var inlineBase64=require(_0x2974('0x1'));function EmailSmtp(){}EmailSmtp['prototype'][_0x2974('0x2')]=function(_0x13213a,_0x3c834d){return new Promise(function(_0x47429f,_0x4be3bd){var _0x151078=nodemailer[_0x2974('0x3')](_0x13213a);_0x151078[_0x2974('0x4')](_0x2974('0x5'),inlineBase64());_0x151078[_0x2974('0x6')](_0x3c834d,function(_0xaea72f,_0x39b413){if(_0xaea72f){_0x4be3bd(_0xaea72f['toString']());}else{_0x47429f(_0x39b413);}});});};EmailSmtp[_0x2974('0x7')]['verify']=function(_0x150d9b){return new Promise(function(_0x44ba23,_0x4f9ffe){var _0x58c494=nodemailer[_0x2974('0x3')](_0x150d9b);_0x58c494['verify'](function(_0x1786f0,_0x1553f3){if(_0x1786f0){_0x4f9ffe(_0x1786f0[_0x2974('0x8')]());}else{if(_0x1553f3){_0x44ba23(_0x1553f3);}else{_0x4f9ffe(_0x2974('0x9'));}}});});};module[_0x2974('0xa')]=EmailSmtp;
\ No newline at end of file
+var _0xd6de=['compile','sendMail','verify','toString','exports','nodemailer-plugin-inline-base64','prototype','createTransport','use'];(function(_0x480df0,_0xf7a04c){var _0x162446=function(_0x561dc2){while(--_0x561dc2){_0x480df0['push'](_0x480df0['shift']());}};_0x162446(++_0xf7a04c);}(_0xd6de,0x188));var _0xed6d=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0xd6de[_0xfae23b];return _0x200640;};'use strict';var nodemailer=require('nodemailer');var inlineBase64=require(_0xed6d('0x0'));function EmailSmtp(){}EmailSmtp[_0xed6d('0x1')]['send']=function(_0x244023,_0xeb61e9){return new Promise(function(_0x3b0529,_0x4f9a36){var _0x2e2b32=nodemailer[_0xed6d('0x2')](_0x244023);_0x2e2b32[_0xed6d('0x3')](_0xed6d('0x4'),inlineBase64());_0x2e2b32[_0xed6d('0x5')](_0xeb61e9,function(_0x22ff08,_0x44ca1a){if(_0x22ff08){_0x4f9a36(_0x22ff08['toString']());}else{_0x3b0529(_0x44ca1a);}});});};EmailSmtp[_0xed6d('0x1')][_0xed6d('0x6')]=function(_0x158729){return new Promise(function(_0x572427,_0x11eba4){var _0x1e4f78=nodemailer['createTransport'](_0x158729);_0x1e4f78['verify'](function(_0x14c82b,_0xa3d091){if(_0x14c82b){_0x11eba4(_0x14c82b[_0xed6d('0x7')]());}else{if(_0xa3d091){_0x572427(_0xa3d091);}else{_0x11eba4('Not\x20verifired');}}});});};module[_0xed6d('0x8')]=EmailSmtp;
\ No newline at end of file
index d9040e2..62537a2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xef84=['format','Email\x20message\x20%s\x20is\x20in\x20TNEF\x20format:\x20message\x20content\x20will\x20be\x20converted\x20by\x20the\x20system','parseBuffer','<p>Empty\x20message</p>','Attachments','Title','Data','utf-8','toString','base64','lodash','moment','path','util','node-tnef','../../../config/logger','email','../../../config/environment','head','value','anonymous','generate','@xcally.com','name','address','substring','indexOf','length','join','split','pop','isEmpty','html','replace','forEach','push','filename','_IMG','<span\x20style=font-weight:bold>\x20[Attachment:\x20','\x20]</span>','body','textAsHtml','message','originTo','originCc','includes','bcc','attachments','attach','type','attachment-','now','root','server/files/attachments/','writeFileSync','content','contentType','headerLines','Auto-Submitted:\x20auto-replied','X-Auto-Response-Suppress:\x20All','Precedence:\x20auto_reply','line','from','subject','messageId','inReplyTo','date','YYYY-MM-DD\x20HH:mm:ss','application/ms-tnef','info'];(function(_0x814aa,_0x252a4c){var _0x2073e8=function(_0x53e8bd){while(--_0x53e8bd){_0x814aa['push'](_0x814aa['shift']());}};_0x2073e8(++_0x252a4c);}(_0xef84,0x168));var _0x4ef8=function(_0x2d68e6,_0x4b0610){_0x2d68e6=_0x2d68e6-0x0;var _0x48f5a2=_0xef84[_0x2d68e6];return _0x48f5a2;};'use strict';var _=require(_0x4ef8('0x0'));var moment=require(_0x4ef8('0x1'));var random=require('randomstring');var fs=require('fs');var path=require(_0x4ef8('0x2'));var util=require(_0x4ef8('0x3'));var tnef=require(_0x4ef8('0x4'));var logger=require(_0x4ef8('0x5'))(_0x4ef8('0x6'));var config=require(_0x4ef8('0x7'));function getAddress(_0x441809){var _0x14f669=_[_0x4ef8('0x8')](_0x441809[_0x4ef8('0x9')]);return _0x14f669&&_0x14f669['address']?_0x14f669['address']:_0x4ef8('0xa')+random[_0x4ef8('0xb')](0x6)+_0x4ef8('0xc');}function getFirstName(_0x161195){var _0x163063=_[_0x4ef8('0x8')](_0x161195[_0x4ef8('0x9')]);if(_0x163063&&_0x163063[_0x4ef8('0xd')]){if(_0x163063['name']==_0x163063[_0x4ef8('0xe')]){return _0x163063[_0x4ef8('0xd')][_0x4ef8('0xf')](0x0,_0x163063[_0x4ef8('0xd')][_0x4ef8('0x10')]('@'));}var _0x37fe37=_0x163063['name']['split'](/\s+/);return _0x37fe37[_0x4ef8('0x11')]>0x1?_0x37fe37['slice'](0x0,-0x1)[_0x4ef8('0x12')]('\x20'):_0x163063[_0x4ef8('0xd')];}return'Anonymous';}function getLastName(_0x4bcd05){var _0x434b0c=_[_0x4ef8('0x8')](_0x4bcd05[_0x4ef8('0x9')]);if(_0x434b0c&&_0x434b0c[_0x4ef8('0xd')]){var _0x34e067=_0x434b0c['name'][_0x4ef8('0x13')](/\s+/);return _0x34e067['length']>0x1?_0x34e067[_0x4ef8('0x14')]():'';}return'';}function getMails(_0x329917,_0x77bc3a){var _0x303d23='';for(var _0x1db457=0x0;_0x1db457<_0x77bc3a[_0x4ef8('0x9')][_0x4ef8('0x11')];_0x1db457+=0x1){if(_0x77bc3a[_0x4ef8('0x9')][_0x1db457][_0x4ef8('0xe')]!==_0x329917){if(!_[_0x4ef8('0x15')](_0x303d23)){_0x303d23+=',';}_0x303d23+=_0x77bc3a[_0x4ef8('0x9')][_0x1db457][_0x4ef8('0xd')]||_0x77bc3a[_0x4ef8('0x9')][_0x1db457][_0x4ef8('0xe')]||'';_0x303d23+='\x20<';_0x303d23+=_0x77bc3a[_0x4ef8('0x9')][_0x1db457]['address']?_0x77bc3a[_0x4ef8('0x9')][_0x1db457]['address']:_0x4ef8('0xa')+random[_0x4ef8('0xb')](0x6)+_0x4ef8('0xc');_0x303d23+='>';}}return _0x303d23;}function parseEmail(_0xf42017,_0x240ca8,_0x4f53d9){if(_0x240ca8[_0x4ef8('0x16')]){var _0x26683c=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;while(_0x26683c['test'](_0x240ca8[_0x4ef8('0x16')])){_0x240ca8['html']=_0x240ca8[_0x4ef8('0x16')][_0x4ef8('0x17')](_0x26683c,'');}if(_0x240ca8[_0x4ef8('0x16')]['includes']('<img')){var _0x569da0=[];_0x240ca8['attachments'][_0x4ef8('0x18')](_0x473b88=>{_0x569da0[_0x4ef8('0x19')](_0x473b88[_0x4ef8('0x1a')]);});var _0x294f6c=/<img.*? _SRC(.*?)[^>]+>/g;var _0x424f36=/src="data:image\/([a-zA-Z]*);base64,([^"]*)"/g;var _0x2d7349=_0x240ca8[_0x4ef8('0x16')][_0x4ef8('0x17')](_0x424f36,'_SRC');var _0x3bfa3e=_0x2d7349[_0x4ef8('0x17')](_0x294f6c,_0x4ef8('0x1b'));for(let _0x277c37=0x0;_0x277c37<_0x569da0[_0x4ef8('0x11')];_0x277c37++){var _0x434eba=_0x3bfa3e[_0x4ef8('0x17')]('_IMG',_0x4ef8('0x1c')+_0x569da0[_0x277c37]+_0x4ef8('0x1d'));_0x3bfa3e=_0x434eba;}_0x240ca8[_0x4ef8('0x16')]=_0x3bfa3e;}_0x4f53d9[_0x4ef8('0x1e')]=_0x240ca8[_0x4ef8('0x16')];}else{_0x4f53d9[_0x4ef8('0x1e')]=_0x240ca8[_0x4ef8('0x1f')];}if(_0x4f53d9['body']){_0x4f53d9[_0x4ef8('0x1e')]=_0x4f53d9['body'][_0x4ef8('0x17')](/<a\s+/gi,'<a\x20target=\x22_blank\x22\x20');}if(_0x240ca8['to']){_0x4f53d9[_0x4ef8('0x20')][_0x4ef8('0x21')]=getMails(null,_0x240ca8['to']);var _0x18d6b3=getMails(_0xf42017['email'],_0x240ca8['to']);if(!_[_0x4ef8('0x15')](_0x18d6b3)){_0x4f53d9['message']['cc']+=_0x18d6b3;}}if(_0x240ca8['cc']){_0x4f53d9['message'][_0x4ef8('0x22')]=getMails(null,_0x240ca8['cc']);var _0xe742da=getMails(_0xf42017['email'],_0x240ca8['cc']);if(!_[_0x4ef8('0x15')](_0xe742da)){if(!_['isEmpty'](_0x4f53d9['message']['cc'])){_0x4f53d9[_0x4ef8('0x20')]['cc']+=',';}_0x4f53d9['message']['cc']+=_0xe742da;}}if(!_[_0x4ef8('0x23')](_0x4f53d9[_0x4ef8('0x20')]['originTo'],_0xf42017[_0x4ef8('0x6')])&&!_[_0x4ef8('0x23')](_0x4f53d9[_0x4ef8('0x20')][_0x4ef8('0x22')],_0xf42017['email'])){_0x4f53d9[_0x4ef8('0x20')][_0x4ef8('0x24')]=_0xf42017[_0x4ef8('0x6')];}if(_0x240ca8[_0x4ef8('0x25')]&&_0x240ca8[_0x4ef8('0x25')][_0x4ef8('0x11')]){_0x4f53d9[_0x4ef8('0x20')][_0x4ef8('0x26')]=_0x240ca8[_0x4ef8('0x25')][_0x4ef8('0x11')];for(var _0x51b053=0x0,_0x37b7a8,_0x1596b8,_0x366af5;_0x51b053<_0x240ca8['attachments'][_0x4ef8('0x11')];_0x51b053+=0x1){if(_0x240ca8[_0x4ef8('0x25')][_0x51b053][_0x4ef8('0x27')]==='attachment'){_0x366af5=_0x240ca8['attachments'][_0x51b053]['filename']||_0x4ef8('0x28')+_0x51b053;_0x37b7a8=util['format']('%s-%s',Date[_0x4ef8('0x29')](),_0x366af5);_0x1596b8=path[_0x4ef8('0x12')](config[_0x4ef8('0x2a')],_0x4ef8('0x2b'),_0x37b7a8);fs[_0x4ef8('0x2c')](_0x1596b8,_0x240ca8[_0x4ef8('0x25')][_0x51b053][_0x4ef8('0x2d')]);_0x4f53d9[_0x4ef8('0x20')][_0x4ef8('0x25')]['push']({'name':_0x366af5,'basename':_0x37b7a8,'type':_0x240ca8['attachments'][_0x51b053][_0x4ef8('0x2e')],'filepath':_0x1596b8});}}}if(_0x240ca8[_0x4ef8('0x2f')]&&_0x240ca8[_0x4ef8('0x2f')][_0x4ef8('0x11')]>0x0){var _0x887b75=[_0x4ef8('0x30'),_0x4ef8('0x31'),_0x4ef8('0x32')];for(var _0x30b9e6=0x0;_0x30b9e6<_0x240ca8[_0x4ef8('0x2f')][_0x4ef8('0x11')];_0x30b9e6++){var _0x5ceed0=_[_0x4ef8('0x10')](_0x887b75,_0x240ca8[_0x4ef8('0x2f')][_0x30b9e6][_0x4ef8('0x33')]);if(_0x5ceed0>=0x0){_0x4f53d9['isAutoreply']=!![];}}}return _0x4f53d9;}exports['parser']=function(_0xbcfef5,_0x215df6,_0x1fdb0a){var _0x1ee742={'from':getAddress(_0x215df6[_0x4ef8('0x34')]),'firstName':getFirstName(_0x215df6[_0x4ef8('0x34')]),'lastName':getLastName(_0x215df6[_0x4ef8('0x34')]),'mapKey':_0x4ef8('0x6'),'message':{'from':getMails(_0xbcfef5['email'],_0x215df6[_0x4ef8('0x34')]),'to':_0xbcfef5['email'],'cc':'','subject':_0x215df6[_0x4ef8('0x35')]||'','messageId':_0x215df6[_0x4ef8('0x36')],'inReplyTo':_0x215df6[_0x4ef8('0x37')],'sentAt':moment(_0x215df6[_0x4ef8('0x38')])['format'](_0x4ef8('0x39')),'attach':![],'attachments':[]}};if(!_0x215df6[_0x4ef8('0x16')]&&!_0x215df6[_0x4ef8('0x1f')]){var _0x3c58c3=_['filter'](_0x215df6[_0x4ef8('0x25')],{'contentType':_0x4ef8('0x3a')});if(_0x3c58c3[_0x4ef8('0x11')]){logger[_0x4ef8('0x3b')](util[_0x4ef8('0x3c')](_0x4ef8('0x3d'),_0x215df6[_0x4ef8('0x36')]));tnef[_0x4ef8('0x3e')](_['first'](_0x3c58c3)[_0x4ef8('0x2d')],function(_0x436b0b,_0x13216d){if(_0x13216d){_0x215df6[_0x4ef8('0x16')]=_0x13216d['BodyHTML']||_0x4ef8('0x3f');if(_0x13216d['Attachments']){for(var _0x219980=0x0;_0x219980<_0x13216d[_0x4ef8('0x40')][_0x4ef8('0x11')];_0x219980++){var _0x5f048c=_0x13216d[_0x4ef8('0x40')][_0x219980];_0x1ee742[_0x4ef8('0x20')][_0x4ef8('0x25')][_0x4ef8('0x19')]({'filename':_0x5f048c[_0x4ef8('0x41')],'content':Buffer[_0x4ef8('0x34')](_0x5f048c[_0x4ef8('0x42')])});}}}_0x1fdb0a(parseEmail(_0xbcfef5,_0x215df6,_0x1ee742));});}else{_0x215df6['html']=_0x4ef8('0x3f');_0x1fdb0a(parseEmail(_0xbcfef5,_0x215df6,_0x1ee742));}}else{_0x1fdb0a(parseEmail(_0xbcfef5,_0x215df6,_0x1ee742));}};exports['generateXOAuth2Token']=function(_0x2c004a,_0x28b563){var _0x365f4c=['user='+(_0x28b563||''),'auth=Bearer\x20'+_0x2c004a,'',''];return Buffer['from'](_0x365f4c['join']('\ 1'),_0x4ef8('0x43'))[_0x4ef8('0x44')](_0x4ef8('0x45'));};
\ No newline at end of file
+var _0x6140=['substring','length','join','pop','isEmpty','html','test','replace','includes','forEach','filename','_IMG','<span\x20style=font-weight:bold>\x20[Attachment:\x20','\x20]</span>','body','<a\x20target=\x22_blank\x22\x20','message','originTo','originCc','bcc','attachments','type','attachment-','%s-%s','server/files/attachments/','content','push','contentType','headerLines','X-Auto-Response-Suppress:\x20All','Precedence:\x20auto_reply','line','isAutoreply','parser','from','subject','messageId','inReplyTo','date','YYYY-MM-DD\x20HH:mm:ss','textAsHtml','format','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','utf-8','base64','lodash','moment','randomstring','path','node-tnef','../../../config/logger','email','../../../config/environment','head','value','address','anonymous','generate','@xcally.com','name'];(function(_0x137b53,_0x300e4a){var _0x554a40=function(_0x8c3da3){while(--_0x8c3da3){_0x137b53['push'](_0x137b53['shift']());}};_0x554a40(++_0x300e4a);}(_0x6140,0x101));var _0x0614=function(_0x5241ff,_0x4fa868){_0x5241ff=_0x5241ff-0x0;var _0x10974a=_0x6140[_0x5241ff];return _0x10974a;};'use strict';var _=require(_0x0614('0x0'));var moment=require(_0x0614('0x1'));var random=require(_0x0614('0x2'));var fs=require('fs');var path=require(_0x0614('0x3'));var util=require('util');var tnef=require(_0x0614('0x4'));var logger=require(_0x0614('0x5'))(_0x0614('0x6'));var config=require(_0x0614('0x7'));function getAddress(_0x53c3d3){var _0x43dcb6=_[_0x0614('0x8')](_0x53c3d3[_0x0614('0x9')]);return _0x43dcb6&&_0x43dcb6[_0x0614('0xa')]?_0x43dcb6[_0x0614('0xa')]:_0x0614('0xb')+random[_0x0614('0xc')](0x6)+_0x0614('0xd');}function getFirstName(_0x1e9eff){var _0x39e4c5=_[_0x0614('0x8')](_0x1e9eff[_0x0614('0x9')]);if(_0x39e4c5&&_0x39e4c5[_0x0614('0xe')]){if(_0x39e4c5[_0x0614('0xe')]==_0x39e4c5[_0x0614('0xa')]){return _0x39e4c5[_0x0614('0xe')][_0x0614('0xf')](0x0,_0x39e4c5['name']['indexOf']('@'));}var _0x550a04=_0x39e4c5[_0x0614('0xe')]['split'](/\s+/);return _0x550a04[_0x0614('0x10')]>0x1?_0x550a04['slice'](0x0,-0x1)[_0x0614('0x11')]('\x20'):_0x39e4c5['name'];}return'Anonymous';}function getLastName(_0x643234){var _0x483c32=_[_0x0614('0x8')](_0x643234[_0x0614('0x9')]);if(_0x483c32&&_0x483c32['name']){var _0x532b92=_0x483c32[_0x0614('0xe')]['split'](/\s+/);return _0x532b92['length']>0x1?_0x532b92[_0x0614('0x12')]():'';}return'';}function getMails(_0x2e9bf6,_0x3d76b9){var _0x192cb3='';for(var _0x20c69c=0x0;_0x20c69c<_0x3d76b9[_0x0614('0x9')][_0x0614('0x10')];_0x20c69c+=0x1){if(_0x3d76b9[_0x0614('0x9')][_0x20c69c][_0x0614('0xa')]!==_0x2e9bf6){if(!_[_0x0614('0x13')](_0x192cb3)){_0x192cb3+=',';}_0x192cb3+=_0x3d76b9['value'][_0x20c69c][_0x0614('0xe')]||_0x3d76b9[_0x0614('0x9')][_0x20c69c][_0x0614('0xa')]||'';_0x192cb3+='\x20<';_0x192cb3+=_0x3d76b9[_0x0614('0x9')][_0x20c69c]['address']?_0x3d76b9[_0x0614('0x9')][_0x20c69c][_0x0614('0xa')]:_0x0614('0xb')+random[_0x0614('0xc')](0x6)+_0x0614('0xd');_0x192cb3+='>';}}return _0x192cb3;}function parseEmail(_0x5494f4,_0x11a948,_0x5d45a6){if(_0x11a948[_0x0614('0x14')]){var _0x54ffc5=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;while(_0x54ffc5[_0x0614('0x15')](_0x11a948[_0x0614('0x14')])){_0x11a948[_0x0614('0x14')]=_0x11a948['html'][_0x0614('0x16')](_0x54ffc5,'');}if(_0x11a948[_0x0614('0x14')][_0x0614('0x17')]('<img')){var _0x472df6=[];_0x11a948['attachments'][_0x0614('0x18')](_0x2ecee5=>{_0x472df6['push'](_0x2ecee5[_0x0614('0x19')]);});var _0xb59274=/<img.*? _SRC(.*?)[^>]+>/g;var _0x4db25e=/src="data:image\/([a-zA-Z]*);base64,([^"]*)"/g;var _0x24d747=_0x11a948[_0x0614('0x14')][_0x0614('0x16')](_0x4db25e,'_SRC');var _0x5ce6b3=_0x24d747['replace'](_0xb59274,_0x0614('0x1a'));for(let _0x30caee=0x0;_0x30caee<_0x472df6[_0x0614('0x10')];_0x30caee++){var _0x213995=_0x5ce6b3[_0x0614('0x16')]('_IMG',_0x0614('0x1b')+_0x472df6[_0x30caee]+_0x0614('0x1c'));_0x5ce6b3=_0x213995;}_0x11a948[_0x0614('0x14')]=_0x5ce6b3;}_0x5d45a6['body']=_0x11a948[_0x0614('0x14')];}else{_0x5d45a6[_0x0614('0x1d')]=_0x11a948['textAsHtml'];}if(_0x5d45a6[_0x0614('0x1d')]){_0x5d45a6[_0x0614('0x1d')]=_0x5d45a6['body']['replace'](/<a\s+/gi,_0x0614('0x1e'));}if(_0x11a948['to']){_0x5d45a6[_0x0614('0x1f')][_0x0614('0x20')]=getMails(null,_0x11a948['to']);var _0xeef78e=getMails(_0x5494f4[_0x0614('0x6')],_0x11a948['to']);if(!_[_0x0614('0x13')](_0xeef78e)){_0x5d45a6[_0x0614('0x1f')]['cc']+=_0xeef78e;}}if(_0x11a948['cc']){_0x5d45a6[_0x0614('0x1f')][_0x0614('0x21')]=getMails(null,_0x11a948['cc']);var _0x59ab83=getMails(_0x5494f4[_0x0614('0x6')],_0x11a948['cc']);if(!_[_0x0614('0x13')](_0x59ab83)){if(!_[_0x0614('0x13')](_0x5d45a6[_0x0614('0x1f')]['cc'])){_0x5d45a6[_0x0614('0x1f')]['cc']+=',';}_0x5d45a6['message']['cc']+=_0x59ab83;}}if(!_[_0x0614('0x17')](_0x5d45a6[_0x0614('0x1f')][_0x0614('0x20')],_0x5494f4[_0x0614('0x6')])&&!_[_0x0614('0x17')](_0x5d45a6[_0x0614('0x1f')][_0x0614('0x21')],_0x5494f4[_0x0614('0x6')])){_0x5d45a6[_0x0614('0x1f')][_0x0614('0x22')]=_0x5494f4[_0x0614('0x6')];}if(_0x11a948['attachments']&&_0x11a948[_0x0614('0x23')][_0x0614('0x10')]){_0x5d45a6[_0x0614('0x1f')]['attach']=_0x11a948[_0x0614('0x23')][_0x0614('0x10')];for(var _0x28ac07=0x0,_0x39f3d1,_0x1b9bf5,_0x4de3e8;_0x28ac07<_0x11a948[_0x0614('0x23')][_0x0614('0x10')];_0x28ac07+=0x1){if(_0x11a948[_0x0614('0x23')][_0x28ac07][_0x0614('0x24')]==='attachment'){_0x4de3e8=_0x11a948[_0x0614('0x23')][_0x28ac07][_0x0614('0x19')]||_0x0614('0x25')+_0x28ac07;_0x39f3d1=util['format'](_0x0614('0x26'),Date['now'](),_0x4de3e8);_0x1b9bf5=path[_0x0614('0x11')](config['root'],_0x0614('0x27'),_0x39f3d1);fs['writeFileSync'](_0x1b9bf5,_0x11a948[_0x0614('0x23')][_0x28ac07][_0x0614('0x28')]);_0x5d45a6[_0x0614('0x1f')][_0x0614('0x23')][_0x0614('0x29')]({'name':_0x4de3e8,'basename':_0x39f3d1,'type':_0x11a948[_0x0614('0x23')][_0x28ac07][_0x0614('0x2a')],'filepath':_0x1b9bf5});}}}if(_0x11a948[_0x0614('0x2b')]&&_0x11a948[_0x0614('0x2b')]['length']>0x0){var _0x280e84=['Auto-Submitted:\x20auto-replied',_0x0614('0x2c'),_0x0614('0x2d')];for(var _0x18db45=0x0;_0x18db45<_0x11a948[_0x0614('0x2b')][_0x0614('0x10')];_0x18db45++){var _0x1ed567=_['indexOf'](_0x280e84,_0x11a948[_0x0614('0x2b')][_0x18db45][_0x0614('0x2e')]);if(_0x1ed567>=0x0){_0x5d45a6[_0x0614('0x2f')]=!![];}}}return _0x5d45a6;}exports[_0x0614('0x30')]=function(_0x5aa332,_0x59e2a2,_0x54e206){var _0x21d95d={'from':getAddress(_0x59e2a2[_0x0614('0x31')]),'firstName':getFirstName(_0x59e2a2['from']),'lastName':getLastName(_0x59e2a2['from']),'mapKey':_0x0614('0x6'),'message':{'from':getMails(_0x5aa332[_0x0614('0x6')],_0x59e2a2[_0x0614('0x31')]),'to':_0x5aa332['email'],'cc':'','subject':_0x59e2a2[_0x0614('0x32')]||'','messageId':_0x59e2a2[_0x0614('0x33')],'inReplyTo':_0x59e2a2[_0x0614('0x34')],'sentAt':moment(_0x59e2a2[_0x0614('0x35')])['format'](_0x0614('0x36')),'attach':![],'attachments':[]}};if(!_0x59e2a2['html']&&!_0x59e2a2[_0x0614('0x37')]){var _0x2ce0e1=_['filter'](_0x59e2a2[_0x0614('0x23')],{'contentType':'application/ms-tnef'});if(_0x2ce0e1[_0x0614('0x10')]){logger['info'](util[_0x0614('0x38')](_0x0614('0x39'),_0x59e2a2[_0x0614('0x33')]));tnef[_0x0614('0x3a')](_[_0x0614('0x3b')](_0x2ce0e1)['content'],function(_0x12e66e,_0x404432){if(_0x404432){_0x59e2a2[_0x0614('0x14')]=_0x404432[_0x0614('0x3c')]||_0x0614('0x3d');if(_0x404432[_0x0614('0x3e')]){for(var _0x261856=0x0;_0x261856<_0x404432[_0x0614('0x3e')][_0x0614('0x10')];_0x261856++){var _0x3764ab=_0x404432[_0x0614('0x3e')][_0x261856];_0x21d95d[_0x0614('0x1f')][_0x0614('0x23')][_0x0614('0x29')]({'filename':_0x3764ab[_0x0614('0x3f')],'content':Buffer[_0x0614('0x31')](_0x3764ab[_0x0614('0x40')])});}}}_0x54e206(parseEmail(_0x5aa332,_0x59e2a2,_0x21d95d));});}else{_0x59e2a2['html']=_0x0614('0x3d');_0x54e206(parseEmail(_0x5aa332,_0x59e2a2,_0x21d95d));}}else{_0x54e206(parseEmail(_0x5aa332,_0x59e2a2,_0x21d95d));}};exports[_0x0614('0x41')]=function(_0x4f4718,_0x5ebe9a){var _0x40c746=['user='+(_0x5ebe9a||''),'auth=Bearer\x20'+_0x4f4718,'',''];return Buffer[_0x0614('0x31')](_0x40c746[_0x0614('0x11')]('\ 1'),_0x0614('0x42'))['toString'](_0x0614('0x43'));};
\ No newline at end of file
index bab898f..3aff39c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1f4f=['key','active','Imap','Smtp','lodash','name','Service'];(function(_0x16ff43,_0x2dd414){var _0x3c6d41=function(_0x194fe9){while(--_0x194fe9){_0x16ff43['push'](_0x16ff43['shift']());}};_0x3c6d41(++_0x2dd414);}(_0x1f4f,0x18c));var _0xf1f4=function(_0x26409f,_0x2465b5){_0x26409f=_0x26409f-0x0;var _0x5d0875=_0x1f4f[_0x26409f];return _0x5d0875;};'use strict';var _=require(_0xf1f4('0x0'));function MailAccount(_0x30fd82){this['id']=_0x30fd82['id']||0x0;this['name']=_0x30fd82[_0xf1f4('0x1')]||_0xf1f4('0x2');this[_0xf1f4('0x3')]=_0x30fd82[_0xf1f4('0x3')]||'SERV';this[_0xf1f4('0x4')]=_0x30fd82[_0xf1f4('0x4')]||![];this['Imap']=_0x30fd82[_0xf1f4('0x5')]||[];this[_0xf1f4('0x6')]=_0x30fd82[_0xf1f4('0x6')]||[];}module['exports']=MailAccount;
\ No newline at end of file
+var _0x9f73=['name','Service','key','SERV','active','Imap','Smtp','lodash'];(function(_0x62353a,_0x554ea9){var _0x5d547f=function(_0x323b2a){while(--_0x323b2a){_0x62353a['push'](_0x62353a['shift']());}};_0x5d547f(++_0x554ea9);}(_0x9f73,0xb7));var _0x39f7=function(_0x3ea713,_0x58b9e8){_0x3ea713=_0x3ea713-0x0;var _0x922692=_0x9f73[_0x3ea713];return _0x922692;};'use strict';var _=require(_0x39f7('0x0'));function MailAccount(_0x511ff3){this['id']=_0x511ff3['id']||0x0;this[_0x39f7('0x1')]=_0x511ff3['name']||_0x39f7('0x2');this[_0x39f7('0x3')]=_0x511ff3[_0x39f7('0x3')]||_0x39f7('0x4');this['active']=_0x511ff3[_0x39f7('0x5')]||![];this[_0x39f7('0x6')]=_0x511ff3[_0x39f7('0x6')]||[];this[_0x39f7('0x7')]=_0x511ff3[_0x39f7('0x7')]||[];}module['exports']=MailAccount;
\ No newline at end of file
index e6101c5..2a63903 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe9c1=['hasOwnProperty','mergeFromDatabase','prototype','initMailAccounts','length','isUndefined','merge','exports','lodash','mailAccounts','mapKeys'];(function(_0xbce0f,_0x3a87e1){var _0x55358b=function(_0x41c383){while(--_0x41c383){_0xbce0f['push'](_0xbce0f['shift']());}};_0x55358b(++_0x3a87e1);}(_0xe9c1,0x1ec));var _0x1e9c=function(_0x944956,_0x45d6bc){_0x944956=_0x944956-0x0;var _0x3e7f54=_0xe9c1[_0x944956];return _0x3e7f54;};'use strict';var _=require(_0x1e9c('0x0'));var MailAccount=require('../model/mailAccount');var Realtime=function(){this[_0x1e9c('0x1')]={};};function freeIsNotKey(_0x4eea24,_0x175334,_0x5338a4){var _0x1b32a0=_[_0x1e9c('0x2')](_0x4eea24,function(_0x4583a6,_0x4b467e){return _0x4583a6[_0x5338a4];});for(var _0x51f21d in _0x175334){if(_0x175334[_0x1e9c('0x3')](_0x51f21d)){if(!_0x1b32a0[_0x51f21d]){delete _0x175334[_0x51f21d];}}}}Realtime['prototype'][_0x1e9c('0x4')]=function(_0x31fc3a,_0x521350){for(var _0x47faff in _0x521350){if(_0x31fc3a['hasOwnProperty'](_0x47faff)){_0x31fc3a[_0x47faff]=_0x521350[_0x47faff];}}};Realtime[_0x1e9c('0x5')][_0x1e9c('0x6')]=function(){var _0x506459=this;return function(_0x568e9a){if(_0x568e9a){freeIsNotKey(_0x568e9a,_0x506459[_0x1e9c('0x1')],'id');for(var _0x2fe3b9=0x0,_0x908cc={},_0x560044={};_0x2fe3b9<_0x568e9a[_0x1e9c('0x7')];_0x2fe3b9+=0x1){_0x908cc=_0x568e9a[_0x2fe3b9];if(_[_0x1e9c('0x8')](_0x506459[_0x1e9c('0x1')][_0x908cc['id']])){_0x506459[_0x1e9c('0x1')][_0x908cc['id']]=new MailAccount(_0x908cc);}else{_[_0x1e9c('0x9')](_0x506459['mailAccounts'][_0x908cc['id']],_0x908cc);}}}return _0x506459[_0x1e9c('0x1')];};};module[_0x1e9c('0xa')]=Realtime;
\ No newline at end of file
+var _0x6d77=['length','isUndefined','merge','exports','lodash','../model/mailAccount','mailAccounts','mapKeys','hasOwnProperty','prototype'];(function(_0x250f95,_0x5a5728){var _0x4ada97=function(_0x392edc){while(--_0x392edc){_0x250f95['push'](_0x250f95['shift']());}};_0x4ada97(++_0x5a5728);}(_0x6d77,0x13a));var _0x76d7=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0x6d77[_0x42cae2];return _0x5f256f;};'use strict';var _=require(_0x76d7('0x0'));var MailAccount=require(_0x76d7('0x1'));var Realtime=function(){this[_0x76d7('0x2')]={};};function freeIsNotKey(_0x2d5eb5,_0x51cab1,_0x25f0c1){var _0x4fb544=_[_0x76d7('0x3')](_0x2d5eb5,function(_0x105e82,_0x26807f){return _0x105e82[_0x25f0c1];});for(var _0x3cce99 in _0x51cab1){if(_0x51cab1['hasOwnProperty'](_0x3cce99)){if(!_0x4fb544[_0x3cce99]){delete _0x51cab1[_0x3cce99];}}}}Realtime['prototype']['mergeFromDatabase']=function(_0x327fbc,_0x562a37){for(var _0x4a10e8 in _0x562a37){if(_0x327fbc[_0x76d7('0x4')](_0x4a10e8)){_0x327fbc[_0x4a10e8]=_0x562a37[_0x4a10e8];}}};Realtime[_0x76d7('0x5')]['initMailAccounts']=function(){var _0x5c4aab=this;return function(_0x11d311){if(_0x11d311){freeIsNotKey(_0x11d311,_0x5c4aab['mailAccounts'],'id');for(var _0x1a258d=0x0,_0x3b58ec={},_0x57a821={};_0x1a258d<_0x11d311[_0x76d7('0x6')];_0x1a258d+=0x1){_0x3b58ec=_0x11d311[_0x1a258d];if(_[_0x76d7('0x7')](_0x5c4aab['mailAccounts'][_0x3b58ec['id']])){_0x5c4aab['mailAccounts'][_0x3b58ec['id']]=new MailAccount(_0x3b58ec);}else{_[_0x76d7('0x8')](_0x5c4aab[_0x76d7('0x2')][_0x3b58ec['id']],_0x3b58ec);}}}return _0x5c4aab[_0x76d7('0x2')];};};module[_0x76d7('0x9')]=Realtime;
\ No newline at end of file
index 71a21e3..0f4fee6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6f44=['TemplateId','Imap','CloudProvider','data5','Smtp','type','getMailAccount','notify','Request','NotifyMailAccount','../client','getMailAccounts','GetMailAccount','name','provider','service','email','active','key','ListId'];(function(_0x2b97e3,_0x174493){var _0x2c329d=function(_0x3a2aca){while(--_0x3a2aca){_0x2b97e3['push'](_0x2b97e3['shift']());}};_0x2c329d(++_0x174493);}(_0x6f44,0x1ea));var _0x46f4=function(_0x216fa9,_0x134236){_0x216fa9=_0x216fa9-0x0;var _0x54b906=_0x6f44[_0x216fa9];return _0x54b906;};'use strict';var client=require(_0x46f4('0x0'));exports[_0x46f4('0x1')]=function(){return function(){return client['Request'](_0x46f4('0x2'),{'options':{'attributes':['id',_0x46f4('0x3'),_0x46f4('0x4'),_0x46f4('0x5'),_0x46f4('0x6'),_0x46f4('0x7'),_0x46f4('0x8'),_0x46f4('0x9'),_0x46f4('0xa')],'raw':![],'include':[{'model':'MailServerIn','as':_0x46f4('0xb'),'include':[{'model':_0x46f4('0xc'),'attributes':['id',_0x46f4('0x3'),'service','type',_0x46f4('0xd')],'as':_0x46f4('0xc')}]},{'model':'MailServerOut','as':_0x46f4('0xe'),'include':[{'model':'CloudProvider','attributes':['id',_0x46f4('0x3'),'service',_0x46f4('0xf'),_0x46f4('0xd')],'as':_0x46f4('0xc')}]}]},'log':_0x46f4('0x10')});};};exports[_0x46f4('0x11')]=function(_0x3f45a4,_0x187e3c){return client[_0x46f4('0x12')](_0x46f4('0x13'),{'account':{'id':_0x3f45a4},'body':_0x187e3c,'log':_0x46f4('0x13')});};
\ No newline at end of file
+var _0xd9a8=['MailServerIn','CloudProvider','service','data5','MailServerOut','getMailAccount','notify','NotifyMailAccount','../client','getMailAccounts','Request','name','provider','active','key','ListId','TemplateId'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0xd9a8,0xc3));var _0x8d9a=function(_0x1ff085,_0xa5d361){_0x1ff085=_0x1ff085-0x0;var _0x229856=_0xd9a8[_0x1ff085];return _0x229856;};'use strict';var client=require(_0x8d9a('0x0'));exports[_0x8d9a('0x1')]=function(){return function(){return client[_0x8d9a('0x2')]('GetMailAccount',{'options':{'attributes':['id',_0x8d9a('0x3'),_0x8d9a('0x4'),'service','email',_0x8d9a('0x5'),_0x8d9a('0x6'),_0x8d9a('0x7'),_0x8d9a('0x8')],'raw':![],'include':[{'model':_0x8d9a('0x9'),'as':'Imap','include':[{'model':_0x8d9a('0xa'),'attributes':['id',_0x8d9a('0x3'),_0x8d9a('0xb'),'type',_0x8d9a('0xc')],'as':_0x8d9a('0xa')}]},{'model':_0x8d9a('0xd'),'as':'Smtp','include':[{'model':_0x8d9a('0xa'),'attributes':['id',_0x8d9a('0x3'),_0x8d9a('0xb'),'type',_0x8d9a('0xc')],'as':'CloudProvider'}]}]},'log':_0x8d9a('0xe')});};};exports[_0x8d9a('0xf')]=function(_0x58d5c8,_0x4050f3){return client[_0x8d9a('0x2')]('NotifyMailAccount',{'account':{'id':_0x58d5c8},'body':_0x4050f3,'log':_0x8d9a('0x10')});};
\ No newline at end of file
index 014ca54..22372b9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4680=['Request','ShowSetting','loginMailFrequency','GetSettings','../client','getSettings'];(function(_0x40e4d4,_0x4b1565){var _0x157ea1=function(_0x464773){while(--_0x464773){_0x40e4d4['push'](_0x40e4d4['shift']());}};_0x157ea1(++_0x4b1565);}(_0x4680,0xca));var _0x0468=function(_0x133632,_0x14f783){_0x133632=_0x133632-0x0;var _0x4cee4d=_0x4680[_0x133632];return _0x4cee4d;};'use strict';var client=require(_0x0468('0x0'));exports[_0x0468('0x1')]=function(){return client[_0x0468('0x2')](_0x0468('0x3'),{'options':{'raw':!![],'where':{'id':0x1},'attributes':[_0x0468('0x4')]},'log':_0x0468('0x5')});};
\ No newline at end of file
+var _0x642e=['../client','Request','ShowSetting','loginMailFrequency'];(function(_0x37fc84,_0x12306f){var _0x5edcd9=function(_0x64a8e3){while(--_0x64a8e3){_0x37fc84['push'](_0x37fc84['shift']());}};_0x5edcd9(++_0x12306f);}(_0x642e,0xd8));var _0xe642=function(_0x7e031b,_0x28163d){_0x7e031b=_0x7e031b-0x0;var _0x46f619=_0x642e[_0x7e031b];return _0x46f619;};'use strict';var client=require(_0xe642('0x0'));exports['getSettings']=function(){return client[_0xe642('0x1')](_0xe642('0x2'),{'options':{'raw':!![],'where':{'id':0x1},'attributes':[_0xe642('0x3')]},'log':'GetSettings'});};
\ No newline at end of file
index 6f9cda9..183e835 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(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xa9e0,0x123));var _0x0a9e=function(_0x484e36,_0x4482d8){_0x484e36=_0x484e36-0x0;var _0xafc85d=_0xa9e0[_0x484e36];return _0xafc85d;};'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(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2d8fc2,_0x1c461d){_0x2d8fc2=_0x2d8fc2-0x0;var _0x3a9e53=_0xa9e0[_0x2d8fc2];return _0x3a9e53;};'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 771740e..11cf930 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8ab8=['listening','log','exports','lodash','express','ioredis','../../config/environment','createServer','timeout','listen','port','socket.io','websocket','polling','defaults','adapter','socket.io-redis','redis','../../config/triggers','default','../../config/socketio','../../config/express','../../routes','once'];(function(_0x181c61,_0x449b30){var _0x360944=function(_0x3d1e6e){while(--_0x3d1e6e){_0x181c61['push'](_0x181c61['shift']());}};_0x360944(++_0x449b30);}(_0x8ab8,0x1e3));var _0x88ab=function(_0x3cc501,_0x53a903){_0x3cc501=_0x3cc501-0x0;var _0x2291ab=_0x8ab8[_0x3cc501];return _0x2291ab;};'use strict';var _=require(_0x88ab('0x0'));var http=require('http');var express=require(_0x88ab('0x1'));var sticky=require('sticky-session');var Redis=require(_0x88ab('0x2'));var config=require(_0x88ab('0x3'));var app=express();var server=http[_0x88ab('0x4')](app);server[_0x88ab('0x5')]=0xdbba0;if(sticky[_0x88ab('0x6')](server,config[_0x88ab('0x7')])){var socketio=require(_0x88ab('0x8'))(server,{'transports':[_0x88ab('0x9'),_0x88ab('0xa')]});config['redis']=_[_0x88ab('0xb')](config['redis'],{'host':'localhost','port':0x18eb});socketio[_0x88ab('0xc')](require(_0x88ab('0xd'))({'pubClient':new Redis(config['redis']),'subClient':new Redis(config[_0x88ab('0xe')])}));require(_0x88ab('0xf'))[_0x88ab('0x10')]();require(_0x88ab('0x11'))[_0x88ab('0x10')](socketio);require(_0x88ab('0x12'))[_0x88ab('0x10')](app);require(_0x88ab('0x13'))['default'](app);}else{server[_0x88ab('0x14')](_0x88ab('0x15'),function(){console[_0x88ab('0x16')]('Express\x20server\x20listening\x20on\x20port\x20%d!',config['port']);});}exports=module[_0x88ab('0x17')]=app;
\ No newline at end of file
+var _0xe036=['ioredis','../../config/environment','listen','port','socket.io','websocket','polling','redis','defaults','adapter','socket.io-redis','../../config/triggers','../../config/socketio','default','../../config/express','../../routes','once','Express\x20server\x20listening\x20on\x20port\x20%d!','lodash','http','express','sticky-session'];(function(_0x278cd4,_0x26eb74){var _0x3d2cb1=function(_0x11283c){while(--_0x11283c){_0x278cd4['push'](_0x278cd4['shift']());}};_0x3d2cb1(++_0x26eb74);}(_0xe036,0x6a));var _0x6e03=function(_0x27179b,_0x56eabc){_0x27179b=_0x27179b-0x0;var _0x2971b1=_0xe036[_0x27179b];return _0x2971b1;};'use strict';var _=require(_0x6e03('0x0'));var http=require(_0x6e03('0x1'));var express=require(_0x6e03('0x2'));var sticky=require(_0x6e03('0x3'));var Redis=require(_0x6e03('0x4'));var config=require(_0x6e03('0x5'));var app=express();var server=http['createServer'](app);server['timeout']=0xdbba0;if(sticky[_0x6e03('0x6')](server,config[_0x6e03('0x7')])){var socketio=require(_0x6e03('0x8'))(server,{'transports':[_0x6e03('0x9'),_0x6e03('0xa')]});config[_0x6e03('0xb')]=_[_0x6e03('0xc')](config[_0x6e03('0xb')],{'host':'localhost','port':0x18eb});socketio[_0x6e03('0xd')](require(_0x6e03('0xe'))({'pubClient':new Redis(config[_0x6e03('0xb')]),'subClient':new Redis(config[_0x6e03('0xb')])}));require(_0x6e03('0xf'))['default']();require(_0x6e03('0x10'))[_0x6e03('0x11')](socketio);require(_0x6e03('0x12'))[_0x6e03('0x11')](app);require(_0x6e03('0x13'))[_0x6e03('0x11')](app);}else{server[_0x6e03('0x14')]('listening',function(){console['log'](_0x6e03('0x15'),config['port']);});}exports=module['exports']=app;
\ No newline at end of file
index 9663363..d4ee091 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3d7d=['error','message','result','bluebird','../../config/logger','routing','client','http','Request','then','debug','rpc'];(function(_0xf17b29,_0x34fb09){var _0x747da8=function(_0x8f9121){while(--_0x8f9121){_0xf17b29['push'](_0xf17b29['shift']());}};_0x747da8(++_0x34fb09);}(_0x3d7d,0x9f));var _0xd3d7=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0x3d7d[_0x42cae2];return _0x5f256f;};'use strict';var jayson=require('jayson/promise');var BPromise=require(_0xd3d7('0x0'));var logger=require(_0xd3d7('0x1'))(_0xd3d7('0x2'));var client=jayson[_0xd3d7('0x3')][_0xd3d7('0x4')]({'port':0x2329});client[_0xd3d7('0x5')]=function(_0x54112f,_0x55260d){return new BPromise(function(_0xe3ea8e,_0x5d40d7){return client['request'](_0x54112f,_0x55260d)[_0xd3d7('0x6')](function(_0x50a4cf){logger[_0xd3d7('0x7')](_0xd3d7('0x8'),_0xd3d7('0x2'),_0x54112f,_0x55260d,_0x50a4cf);if(_0x50a4cf[_0xd3d7('0x9')]){logger['error']('rpc','routing',_0x54112f,_0x50a4cf[_0xd3d7('0x9')][_0xd3d7('0xa')],_0x55260d);return _0x5d40d7(_0x50a4cf[_0xd3d7('0x9')]['message']);}else{return _0xe3ea8e(_0x50a4cf[_0xd3d7('0xb')]);}})['catch'](function(_0x4c183e){logger[_0xd3d7('0x9')](_0xd3d7('0x8'),'routing',_0x54112f,_0x4c183e,_0x55260d);return _0x5d40d7(_0x4c183e);});});};module['exports']=client;
\ No newline at end of file
+var _0x1f5d=['result','catch','exports','jayson/promise','bluebird','../../config/logger','routing','request','then','debug','rpc','error','message'];(function(_0x303c30,_0x16edcb){var _0x43161b=function(_0x3330ff){while(--_0x3330ff){_0x303c30['push'](_0x303c30['shift']());}};_0x43161b(++_0x16edcb);}(_0x1f5d,0x107));var _0xd1f5=function(_0x1a0600,_0x41feef){_0x1a0600=_0x1a0600-0x0;var _0x734670=_0x1f5d[_0x1a0600];return _0x734670;};'use strict';var jayson=require(_0xd1f5('0x0'));var BPromise=require(_0xd1f5('0x1'));var logger=require(_0xd1f5('0x2'))(_0xd1f5('0x3'));var client=jayson['client']['http']({'port':0x2329});client['Request']=function(_0x313f02,_0x88c6cf){return new BPromise(function(_0x249e07,_0x372eca){return client[_0xd1f5('0x4')](_0x313f02,_0x88c6cf)[_0xd1f5('0x5')](function(_0x2b869b){logger[_0xd1f5('0x6')](_0xd1f5('0x7'),'routing',_0x313f02,_0x88c6cf,_0x2b869b);if(_0x2b869b[_0xd1f5('0x8')]){logger[_0xd1f5('0x8')](_0xd1f5('0x7'),'routing',_0x313f02,_0x2b869b['error']['message'],_0x88c6cf);return _0x372eca(_0x2b869b[_0xd1f5('0x8')][_0xd1f5('0x9')]);}else{return _0x249e07(_0x2b869b[_0xd1f5('0xa')]);}})[_0xd1f5('0xb')](function(_0x2cdcff){logger[_0xd1f5('0x8')](_0xd1f5('0x7'),_0xd1f5('0x3'),_0x313f02,_0x2cdcff,_0x88c6cf);return _0x372eca(_0x2cdcff);});});};module[_0xd1f5('0xc')]=client;
\ No newline at end of file
index 4a46833..419bdd8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe266=['./rpc/interval','./rpc/openchannelQueue','./rpc/smsQueue','./rpc/mailQueue','./rpc/whatsappQueue','getAgents','then','initAgents','getIntervals','initIntervals','getOpenchannelQueues','initOpenchannelQueues','getChatQueues','getSmsQueues','initSmsQueues','getMailQueues','initMailQueues','getFaxQueues','listen','catch','log','bluebird','./realtime','./rpc/user'];(function(_0x154f27,_0x34adad){var _0xe33643=function(_0x30075d){while(--_0x30075d){_0x154f27['push'](_0x154f27['shift']());}};_0xe33643(++_0x34adad);}(_0xe266,0x14d));var _0x6e26=function(_0x5b5947,_0x11623c){_0x5b5947=_0x5b5947-0x0;var _0x7623e0=_0xe266[_0x5b5947];return _0x7623e0;};'use strict';var BPromise=require(_0x6e26('0x0'));var server=require('./server');var Realtime=require(_0x6e26('0x1'));var user=require(_0x6e26('0x2'));var interval=require(_0x6e26('0x3'));var openchannelQueue=require(_0x6e26('0x4'));var chatQueue=require('./rpc/chatQueue');var smsQueue=require(_0x6e26('0x5'));var mailQueue=require(_0x6e26('0x6'));var faxQueue=require('./rpc/faxQueue');var whatsappQueue=require(_0x6e26('0x7'));var realtime=new Realtime();function initRealtime(){return BPromise['resolve']()['then'](user[_0x6e26('0x8')]())[_0x6e26('0x9')](realtime[_0x6e26('0xa')]())['then'](interval[_0x6e26('0xb')]())[_0x6e26('0x9')](realtime[_0x6e26('0xc')]())[_0x6e26('0x9')](openchannelQueue[_0x6e26('0xd')]())[_0x6e26('0x9')](realtime[_0x6e26('0xe')]())['then'](chatQueue[_0x6e26('0xf')]())[_0x6e26('0x9')](realtime['initChatQueues']())[_0x6e26('0x9')](smsQueue[_0x6e26('0x10')]())[_0x6e26('0x9')](realtime[_0x6e26('0x11')]())['then'](mailQueue[_0x6e26('0x12')]())['then'](realtime[_0x6e26('0x13')]())[_0x6e26('0x9')](faxQueue[_0x6e26('0x14')]())[_0x6e26('0x9')](realtime['initFaxQueues']())[_0x6e26('0x9')](whatsappQueue['getWhatsappQueues']())['then'](realtime['initWhatsappQueues']())[_0x6e26('0x9')](function(){return realtime;});}function main(){return server[_0x6e26('0x15')](realtime)['then'](function(_0x468580){return initRealtime();})[_0x6e26('0x9')](function(_0x2e95c3){return setInterval(initRealtime,0x1388);})[_0x6e26('0x16')](function(_0x15ee53){console[_0x6e26('0x17')](_0x15ee53);});}main();
\ No newline at end of file
+var _0x0d62=['./rpc/interval','./rpc/openchannelQueue','./rpc/chatQueue','./rpc/smsQueue','./rpc/whatsappQueue','resolve','then','getAgents','initAgents','getIntervals','initIntervals','getMailQueues','initMailQueues','getFaxQueues','initFaxQueues','getWhatsappQueues','initWhatsappQueues','listen','catch','log','bluebird','./server','./realtime','./rpc/user'];(function(_0x2b2806,_0xb2b700){var _0x5661bc=function(_0x23bcfa){while(--_0x23bcfa){_0x2b2806['push'](_0x2b2806['shift']());}};_0x5661bc(++_0xb2b700);}(_0x0d62,0x74));var _0x20d6=function(_0x149083,_0x4047b6){_0x149083=_0x149083-0x0;var _0x4dc74e=_0x0d62[_0x149083];return _0x4dc74e;};'use strict';var BPromise=require(_0x20d6('0x0'));var server=require(_0x20d6('0x1'));var Realtime=require(_0x20d6('0x2'));var user=require(_0x20d6('0x3'));var interval=require(_0x20d6('0x4'));var openchannelQueue=require(_0x20d6('0x5'));var chatQueue=require(_0x20d6('0x6'));var smsQueue=require(_0x20d6('0x7'));var mailQueue=require('./rpc/mailQueue');var faxQueue=require('./rpc/faxQueue');var whatsappQueue=require(_0x20d6('0x8'));var realtime=new Realtime();function initRealtime(){return BPromise[_0x20d6('0x9')]()[_0x20d6('0xa')](user[_0x20d6('0xb')]())[_0x20d6('0xa')](realtime[_0x20d6('0xc')]())[_0x20d6('0xa')](interval[_0x20d6('0xd')]())[_0x20d6('0xa')](realtime[_0x20d6('0xe')]())[_0x20d6('0xa')](openchannelQueue['getOpenchannelQueues']())[_0x20d6('0xa')](realtime['initOpenchannelQueues']())['then'](chatQueue['getChatQueues']())[_0x20d6('0xa')](realtime['initChatQueues']())['then'](smsQueue['getSmsQueues']())[_0x20d6('0xa')](realtime['initSmsQueues']())['then'](mailQueue[_0x20d6('0xf')]())[_0x20d6('0xa')](realtime[_0x20d6('0x10')]())[_0x20d6('0xa')](faxQueue[_0x20d6('0x11')]())[_0x20d6('0xa')](realtime[_0x20d6('0x12')]())[_0x20d6('0xa')](whatsappQueue[_0x20d6('0x13')]())[_0x20d6('0xa')](realtime[_0x20d6('0x14')]())[_0x20d6('0xa')](function(){return realtime;});}function main(){return server[_0x20d6('0x15')](realtime)[_0x20d6('0xa')](function(_0x17260e){return initRealtime();})[_0x20d6('0xa')](function(_0x58a27a){return setInterval(initRealtime,0x1388);})[_0x20d6('0x16')](function(_0x14fef4){console[_0x20d6('0x17')](_0x14fef4);});}main();
\ No newline at end of file
index 2dbbaee..7b9017b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5fc3=['lodash','util','EventEmitter','init','isNil','ignoreFactChanges','inherits','activeRules','prototype','register','isArray','rules','isObject','sync','orderBy','asc','execute','clone','ruleRef','name','index_','push','call','nextTick','next','isEqual','restart','length','condition','matchPath','noop','findRules','filter','prioritize','priority','toJSON','map','consequence','toString','fromJSON','isString','parse'];(function(_0x19ed41,_0x4a09f4){var _0x435f19=function(_0x371363){while(--_0x371363){_0x19ed41['push'](_0x19ed41['shift']());}};_0x435f19(++_0x4a09f4);}(_0x5fc3,0xa8));var _0x35fc=function(_0x5f1617,_0x46277b){_0x5f1617=_0x5f1617-0x0;var _0x3af5da=_0x5fc3[_0x5f1617];return _0x3af5da;};'use strict';var _=require(_0x35fc('0x0'));var util=require(_0x35fc('0x1'));var EventEmitter=require('events')[_0x35fc('0x2')];function RuleEngine(_0x2ac6da,_0x196bc2){this[_0x35fc('0x3')]();if(!_[_0x35fc('0x4')](_0x2ac6da)){this['register'](_0x2ac6da);}if(_0x196bc2){this[_0x35fc('0x5')]=_0x196bc2[_0x35fc('0x5')];}return this;}util[_0x35fc('0x6')](RuleEngine,EventEmitter);RuleEngine['prototype']['init']=function(_0x19a0d1){this['rules']=[];this[_0x35fc('0x7')]=[];};RuleEngine[_0x35fc('0x8')][_0x35fc('0x9')]=function(_0x1e5f90){if(Array[_0x35fc('0xa')](_0x1e5f90)){this[_0x35fc('0xb')]=this[_0x35fc('0xb')]['concat'](_0x1e5f90);}else if(_0x1e5f90!==null&&_[_0x35fc('0xc')](_0x1e5f90)){this[_0x35fc('0xb')]['push'](_0x1e5f90);}this[_0x35fc('0xd')]();};RuleEngine[_0x35fc('0x8')]['sync']=function(){this[_0x35fc('0x7')]=this[_0x35fc('0xb')]['filter'](function(_0x4cbe74){if(_[_0x35fc('0x4')](_0x4cbe74['on'])){_0x4cbe74['on']=!![];}if(_0x4cbe74['on']===!![]){return _0x4cbe74;}});this['activeRules']=_[_0x35fc('0xe')](this[_0x35fc('0x7')],['p'],[_0x35fc('0xf')]);};RuleEngine[_0x35fc('0x8')][_0x35fc('0x10')]=function(_0x5cfe94,_0x59507a){var _0x5eac0f=![];_0x5cfe94['result']=!![];var _0x398b67=_[_0x35fc('0x11')](_0x5cfe94);var _0x53b898=_[_0x35fc('0x11')](_0x5cfe94);var _0x227a49=this[_0x35fc('0x7')];var _0x480851=[];var _0x26ba54=this[_0x35fc('0x5')];(function FnRuleLoop(_0x553677){var _0x41e165={'rules':function(){return _0x227a49;},'rule':function(){return _0x227a49[_0x553677];},'when':function(_0x363e47){if(_0x363e47){var _0x2e513b=_0x227a49[_0x553677]['consequence'];_0x2e513b[_0x35fc('0x12')]=_0x227a49[_0x553677]['id']||_0x227a49[_0x553677][_0x35fc('0x13')]||_0x35fc('0x14')+_0x553677;process['nextTick'](function(){_0x480851[_0x35fc('0x15')](_0x2e513b[_0x35fc('0x12')]);_0x2e513b[_0x35fc('0x16')](_0x398b67,_0x41e165);});}else{process[_0x35fc('0x17')](function(){_0x41e165[_0x35fc('0x18')]();});}},'restart':function(){return FnRuleLoop(0x0);},'stop':function(){_0x5eac0f=!![];return FnRuleLoop(0x0);},'next':function(_0x21f1a9){if(!_0x26ba54&&!_[_0x35fc('0x19')](_0x53b898,_0x398b67)){_0x53b898=_[_0x35fc('0x11')](_0x398b67);process[_0x35fc('0x17')](function(){_0x41e165[_0x35fc('0x1a')]();});}else{process['nextTick'](function(){if(_[_0x35fc('0x4')](_0x21f1a9)){return FnRuleLoop(_0x553677+0x1);}else{return FnRuleLoop(_0x21f1a9);}});}}};if(_0x553677<_0x227a49[_0x35fc('0x1b')]&&_0x5eac0f===![]){var _0x257719=_0x227a49[_0x553677][_0x35fc('0x1c')];_0x257719[_0x35fc('0x16')](_0x398b67,_0x41e165);}else{process['nextTick'](function(){_0x398b67[_0x35fc('0x1d')]=_0x480851;return _0x59507a?_0x59507a(_0x398b67):_[_0x35fc('0x1e')]();});}}(0x0));};RuleEngine['prototype'][_0x35fc('0x1f')]=function(_0x5a93df){if(_[_0x35fc('0x4')](_0x5a93df)){return this['rules'];}else{var _0x4086e9=_['matches'](_0x5a93df);return _[_0x35fc('0x20')](this[_0x35fc('0xb')],_0x4086e9);}};RuleEngine['prototype']['turn']=function(_0x47774c,_0x58edb6){var _0x274208=_0x47774c==='on'||_0x47774c==='ON'?!![]:![];var _0x1a5d92=this['findRules'](_0x58edb6);for(var _0x26b7cb=0x0,_0x645eac=_0x1a5d92[_0x35fc('0x1b')];_0x26b7cb<_0x645eac;_0x26b7cb+=0x1){_0x1a5d92[_0x26b7cb]['on']=_0x274208;}this[_0x35fc('0xd')]();};RuleEngine[_0x35fc('0x8')][_0x35fc('0x21')]=function(_0x11ccdb,_0x451f0c){_0x11ccdb=parseInt(_0x11ccdb,0xa);var _0x54aedc=this[_0x35fc('0x1f')](_0x451f0c);for(var _0x220931=0x0,_0x22af18=_0x54aedc['length'];_0x220931<_0x22af18;_0x220931+=0x1){_0x54aedc[_0x220931][_0x35fc('0x22')]=_0x11ccdb;}this[_0x35fc('0xd')]();};RuleEngine[_0x35fc('0x8')][_0x35fc('0x23')]=function(){var _0xd8a4ca=this[_0x35fc('0xb')];if(_0xd8a4ca instanceof Array){_0xd8a4ca=_0xd8a4ca[_0x35fc('0x24')](function(_0x37b435){_0x37b435[_0x35fc('0x1c')]=_0x37b435[_0x35fc('0x1c')]['toString']();_0x37b435['consequence']=_0x37b435[_0x35fc('0x25')]['toString']();return _0x37b435;});}else if(!_[_0x35fc('0x4')](_0xd8a4ca)){_0xd8a4ca[_0x35fc('0x1c')]=_0xd8a4ca[_0x35fc('0x1c')][_0x35fc('0x26')]();_0xd8a4ca[_0x35fc('0x25')]=_0xd8a4ca[_0x35fc('0x25')]['toString']();}return _0xd8a4ca;};RuleEngine[_0x35fc('0x8')][_0x35fc('0x27')]=function(_0x46b9ef){this[_0x35fc('0x3')]();if(_[_0x35fc('0x28')](_0x46b9ef)){_0x46b9ef=JSON[_0x35fc('0x29')](_0x46b9ef);}if(_0x46b9ef instanceof Array){_0x46b9ef=_0x46b9ef['map'](function(_0x2483be){_0x2483be[_0x35fc('0x1c')]=eval('('+_0x2483be[_0x35fc('0x1c')]+')');_0x2483be['consequence']=eval('('+_0x2483be[_0x35fc('0x25')]+')');return _0x2483be;});}else if(_0x46b9ef!==null&&typeof _0x46b9ef=='object'){_0x46b9ef[_0x35fc('0x1c')]=eval('('+_0x46b9ef[_0x35fc('0x1c')]+')');_0x46b9ef[_0x35fc('0x25')]=eval('('+_0x46b9ef[_0x35fc('0x25')]+')');}this['register'](_0x46b9ef);};module['exports']=RuleEngine;
\ No newline at end of file
+var _0x7a54=['turn','prioritize','priority','toJSON','map','toString','fromJSON','isString','object','exports','lodash','util','events','isNil','register','ignoreFactChanges','inherits','init','rules','activeRules','concat','prototype','sync','filter','orderBy','asc','execute','clone','consequence','ruleRef','name','index_','nextTick','push','call','isEqual','restart','length','condition','matchPath','noop','findRules'];(function(_0x67743b,_0x1feaf2){var _0x29e9f9=function(_0x509291){while(--_0x509291){_0x67743b['push'](_0x67743b['shift']());}};_0x29e9f9(++_0x1feaf2);}(_0x7a54,0x106));var _0x47a5=function(_0x5449de,_0x30ae8c){_0x5449de=_0x5449de-0x0;var _0x2162a8=_0x7a54[_0x5449de];return _0x2162a8;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var EventEmitter=require(_0x47a5('0x2'))['EventEmitter'];function RuleEngine(_0x1d33e,_0x4086cd){this['init']();if(!_[_0x47a5('0x3')](_0x1d33e)){this[_0x47a5('0x4')](_0x1d33e);}if(_0x4086cd){this[_0x47a5('0x5')]=_0x4086cd[_0x47a5('0x5')];}return this;}util[_0x47a5('0x6')](RuleEngine,EventEmitter);RuleEngine['prototype'][_0x47a5('0x7')]=function(_0x59199c){this[_0x47a5('0x8')]=[];this[_0x47a5('0x9')]=[];};RuleEngine['prototype'][_0x47a5('0x4')]=function(_0x5077f3){if(Array['isArray'](_0x5077f3)){this['rules']=this[_0x47a5('0x8')][_0x47a5('0xa')](_0x5077f3);}else if(_0x5077f3!==null&&_['isObject'](_0x5077f3)){this[_0x47a5('0x8')]['push'](_0x5077f3);}this['sync']();};RuleEngine[_0x47a5('0xb')][_0x47a5('0xc')]=function(){this[_0x47a5('0x9')]=this[_0x47a5('0x8')][_0x47a5('0xd')](function(_0xd308b8){if(_[_0x47a5('0x3')](_0xd308b8['on'])){_0xd308b8['on']=!![];}if(_0xd308b8['on']===!![]){return _0xd308b8;}});this['activeRules']=_[_0x47a5('0xe')](this[_0x47a5('0x9')],['p'],[_0x47a5('0xf')]);};RuleEngine[_0x47a5('0xb')][_0x47a5('0x10')]=function(_0x620ee9,_0x3c6c46){var _0x190faa=![];_0x620ee9['result']=!![];var _0x362359=_[_0x47a5('0x11')](_0x620ee9);var _0x3b001e=_[_0x47a5('0x11')](_0x620ee9);var _0x1ef44c=this['activeRules'];var _0x549de3=[];var _0x138bc0=this['ignoreFactChanges'];(function FnRuleLoop(_0x5247fd){var _0x423a81={'rules':function(){return _0x1ef44c;},'rule':function(){return _0x1ef44c[_0x5247fd];},'when':function(_0xaf70a6){if(_0xaf70a6){var _0x2ce454=_0x1ef44c[_0x5247fd][_0x47a5('0x12')];_0x2ce454[_0x47a5('0x13')]=_0x1ef44c[_0x5247fd]['id']||_0x1ef44c[_0x5247fd][_0x47a5('0x14')]||_0x47a5('0x15')+_0x5247fd;process[_0x47a5('0x16')](function(){_0x549de3[_0x47a5('0x17')](_0x2ce454['ruleRef']);_0x2ce454[_0x47a5('0x18')](_0x362359,_0x423a81);});}else{process[_0x47a5('0x16')](function(){_0x423a81['next']();});}},'restart':function(){return FnRuleLoop(0x0);},'stop':function(){_0x190faa=!![];return FnRuleLoop(0x0);},'next':function(_0x2b0360){if(!_0x138bc0&&!_[_0x47a5('0x19')](_0x3b001e,_0x362359)){_0x3b001e=_[_0x47a5('0x11')](_0x362359);process['nextTick'](function(){_0x423a81[_0x47a5('0x1a')]();});}else{process[_0x47a5('0x16')](function(){if(_[_0x47a5('0x3')](_0x2b0360)){return FnRuleLoop(_0x5247fd+0x1);}else{return FnRuleLoop(_0x2b0360);}});}}};if(_0x5247fd<_0x1ef44c[_0x47a5('0x1b')]&&_0x190faa===![]){var _0x5ef1b1=_0x1ef44c[_0x5247fd][_0x47a5('0x1c')];_0x5ef1b1[_0x47a5('0x18')](_0x362359,_0x423a81);}else{process['nextTick'](function(){_0x362359[_0x47a5('0x1d')]=_0x549de3;return _0x3c6c46?_0x3c6c46(_0x362359):_[_0x47a5('0x1e')]();});}}(0x0));};RuleEngine[_0x47a5('0xb')][_0x47a5('0x1f')]=function(_0x3abd6a){if(_['isNil'](_0x3abd6a)){return this['rules'];}else{var _0x136745=_['matches'](_0x3abd6a);return _[_0x47a5('0xd')](this['rules'],_0x136745);}};RuleEngine[_0x47a5('0xb')][_0x47a5('0x20')]=function(_0x36ad34,_0x1dac65){var _0x21f296=_0x36ad34==='on'||_0x36ad34==='ON'?!![]:![];var _0x3ba0b7=this[_0x47a5('0x1f')](_0x1dac65);for(var _0x136b14=0x0,_0x16631f=_0x3ba0b7[_0x47a5('0x1b')];_0x136b14<_0x16631f;_0x136b14+=0x1){_0x3ba0b7[_0x136b14]['on']=_0x21f296;}this[_0x47a5('0xc')]();};RuleEngine[_0x47a5('0xb')][_0x47a5('0x21')]=function(_0x528582,_0x243210){_0x528582=parseInt(_0x528582,0xa);var _0x51833b=this[_0x47a5('0x1f')](_0x243210);for(var _0x9ac908=0x0,_0x16901f=_0x51833b['length'];_0x9ac908<_0x16901f;_0x9ac908+=0x1){_0x51833b[_0x9ac908][_0x47a5('0x22')]=_0x528582;}this[_0x47a5('0xc')]();};RuleEngine[_0x47a5('0xb')][_0x47a5('0x23')]=function(){var _0x51cc81=this['rules'];if(_0x51cc81 instanceof Array){_0x51cc81=_0x51cc81[_0x47a5('0x24')](function(_0xfb5ddb){_0xfb5ddb['condition']=_0xfb5ddb['condition'][_0x47a5('0x25')]();_0xfb5ddb[_0x47a5('0x12')]=_0xfb5ddb['consequence'][_0x47a5('0x25')]();return _0xfb5ddb;});}else if(!_['isNil'](_0x51cc81)){_0x51cc81[_0x47a5('0x1c')]=_0x51cc81[_0x47a5('0x1c')]['toString']();_0x51cc81['consequence']=_0x51cc81[_0x47a5('0x12')]['toString']();}return _0x51cc81;};RuleEngine[_0x47a5('0xb')][_0x47a5('0x26')]=function(_0xf269a8){this['init']();if(_[_0x47a5('0x27')](_0xf269a8)){_0xf269a8=JSON['parse'](_0xf269a8);}if(_0xf269a8 instanceof Array){_0xf269a8=_0xf269a8['map'](function(_0x65542e){_0x65542e['condition']=eval('('+_0x65542e[_0x47a5('0x1c')]+')');_0x65542e['consequence']=eval('('+_0x65542e[_0x47a5('0x12')]+')');return _0x65542e;});}else if(_0xf269a8!==null&&typeof _0xf269a8==_0x47a5('0x28')){_0xf269a8[_0x47a5('0x1c')]=eval('('+_0xf269a8[_0x47a5('0x1c')]+')');_0xf269a8[_0x47a5('0x12')]=eval('('+_0xf269a8[_0x47a5('0x12')]+')');}this[_0x47a5('0x4')](_0xf269a8);};module[_0x47a5('0x29')]=RuleEngine;
\ No newline at end of file
index 241f0f2..fc3c98c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6fc9=['then','error','message','result','sendMailMessage','SendMail','bluebird','jayson/promise','client','request'];(function(_0x24f22d,_0x1f6649){var _0x321679=function(_0x2eb38d){while(--_0x2eb38d){_0x24f22d['push'](_0x24f22d['shift']());}};_0x321679(++_0x1f6649);}(_0x6fc9,0x92));var _0x96fc=function(_0xbd8b5b,_0x2e2ccf){_0xbd8b5b=_0xbd8b5b-0x0;var _0x3ef2d2=_0x6fc9[_0xbd8b5b];return _0x3ef2d2;};'use strict';var BPromise=require(_0x96fc('0x0'));var jayson=require(_0x96fc('0x1'));var client=jayson[_0x96fc('0x2')]['http']({'port':0x232b});function request(_0x503d7a,_0x44a345){return new BPromise(function(_0x537cf8,_0x5e93a3){return client[_0x96fc('0x3')](_0x503d7a,_0x44a345)[_0x96fc('0x4')](function(_0xea26b4){if(_0xea26b4['error']){return _0x5e93a3(_0xea26b4[_0x96fc('0x5')][_0x96fc('0x6')]);}else{return _0x537cf8(_0xea26b4[_0x96fc('0x7')]);}})['catch'](function(_0x56fd5f){return _0x5e93a3(_0x56fd5f);});});}exports[_0x96fc('0x8')]=function(_0x269b00,_0x396288){return request(_0x96fc('0x9'),{'account':_0x269b00,'message':_0x396288});};
\ No newline at end of file
+var _0x05e3=['http','error','message','result','sendMailMessage','SendMail','bluebird'];(function(_0x15260f,_0x5eef15){var _0x56ce05=function(_0x27ae7f){while(--_0x27ae7f){_0x15260f['push'](_0x15260f['shift']());}};_0x56ce05(++_0x5eef15);}(_0x05e3,0x180));var _0x305e=function(_0x12a57d,_0x738bd1){_0x12a57d=_0x12a57d-0x0;var _0x4b26f6=_0x05e3[_0x12a57d];return _0x4b26f6;};'use strict';var BPromise=require(_0x305e('0x0'));var jayson=require('jayson/promise');var client=jayson['client'][_0x305e('0x1')]({'port':0x232b});function request(_0x40ca51,_0x10be03){return new BPromise(function(_0x3dbd5d,_0x593b5f){return client['request'](_0x40ca51,_0x10be03)['then'](function(_0x22c31f){if(_0x22c31f[_0x305e('0x2')]){return _0x593b5f(_0x22c31f[_0x305e('0x2')][_0x305e('0x3')]);}else{return _0x3dbd5d(_0x22c31f[_0x305e('0x4')]);}})['catch'](function(_0x1d65f6){return _0x593b5f(_0x1d65f6);});});}exports[_0x305e('0x5')]=function(_0x3e6abe,_0x8928f1){return request(_0x305e('0x6'),{'account':_0x3e6abe,'message':_0x8928f1});};
\ No newline at end of file
index 9bbf94d..1c9c518 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf669=['chatCapacity','mailStatus','mailStatusTime','mailCapacity','faxStatus','faxStatusTime','faxCapacity','faxCurrentCapacity','smsStatusTime','smsCapacity','whatsappStatus','whatsappStatusTime','whatsappCapacity','whatsappCurrentCapacity','openchannelStatus','openchannelStatusTime','openchannelCapacity','openchannelCurrentCapacity','busyQueue','chatWaitingInteractions','faxWaitingInteractions','mailWaitingInteractions','openchannelWaitingInteractions','smsWaitingInteractions','updateRealtime','getChannelStatus','CurrentCapacity','Capacity','maxcapacity','working','idle','prototype','chat','openchannel','fax','sms','whatsapp','length','StatusTime','toNumber','format','Status','online','mailCurrentCapacity','smsStatus','whatsappWaitingInteractions','stringify','omit','exports','lodash','md5','moment','ioredis','redis','localhost','socket.io-emitter','name','voicePause','chatPause','mailPause','faxPause','smsPause','openchannelPause','chatStatus','unknown','chatStatusTime'];(function(_0x3eaa0d,_0x4fdf0b){var _0x274f05=function(_0x17e942){while(--_0x17e942){_0x3eaa0d['push'](_0x3eaa0d['shift']());}};_0x274f05(++_0x4fdf0b);}(_0xf669,0x139));var _0x9f66=function(_0x3b0731,_0xcf9925){_0x3b0731=_0x3b0731-0x0;var _0x4204d7=_0xf669[_0x3b0731];return _0x4204d7;};'use strict';var _=require(_0x9f66('0x0'));var md5=require(_0x9f66('0x1'));var moment=require(_0x9f66('0x2'));var Redis=require(_0x9f66('0x3'));var config=require('../../../config/environment');config[_0x9f66('0x4')]=_['defaults'](config['redis'],{'host':_0x9f66('0x5'),'port':0x18eb});var io=require(_0x9f66('0x6'))(new Redis(config[_0x9f66('0x4')]));function Agent(_0x560ee4){this['id']=_0x560ee4['id']||0x0;this[_0x9f66('0x7')]=_0x560ee4[_0x9f66('0x7')]||'';this[_0x9f66('0x8')]=_0x560ee4[_0x9f66('0x8')]||![];this[_0x9f66('0x9')]=_0x560ee4[_0x9f66('0x9')]||![];this['mailPause']=_0x560ee4[_0x9f66('0xa')]||![];this[_0x9f66('0xb')]=_0x560ee4[_0x9f66('0xb')]||![];this[_0x9f66('0xc')]=_0x560ee4[_0x9f66('0xc')]||![];this[_0x9f66('0xd')]=_0x560ee4[_0x9f66('0xd')]||![];this[_0x9f66('0xe')]=_0x9f66('0xf');this[_0x9f66('0x10')]=0x0;this[_0x9f66('0x11')]=_0x560ee4['chatCapacity']||0x0;this['chatCurrentCapacity']=0x0;this[_0x9f66('0x12')]=_0x9f66('0xf');this[_0x9f66('0x13')]=0x0;this[_0x9f66('0x14')]=_0x560ee4[_0x9f66('0x14')]||0x0;this['mailCurrentCapacity']=0x0;this[_0x9f66('0x15')]=_0x9f66('0xf');this[_0x9f66('0x16')]=0x0;this['faxCapacity']=_0x560ee4[_0x9f66('0x17')]||0x0;this[_0x9f66('0x18')]=0x0;this['smsStatus']=_0x9f66('0xf');this[_0x9f66('0x19')]=0x0;this[_0x9f66('0x1a')]=_0x560ee4['smsCapacity']||0x0;this['smsCurrentCapacity']=0x0;this[_0x9f66('0x1b')]=_0x9f66('0xf');this[_0x9f66('0x1c')]=0x0;this[_0x9f66('0x1d')]=_0x560ee4['whatsappCapacity']||0x0;this[_0x9f66('0x1e')]=0x0;this[_0x9f66('0x1f')]=_0x9f66('0xf');this[_0x9f66('0x20')]=0x0;this[_0x9f66('0x21')]=_0x560ee4[_0x9f66('0x21')]||0x0;this[_0x9f66('0x22')]=0x0;this['busy']=![];this[_0x9f66('0x23')]=undefined;this[_0x9f66('0x1')]='';this[_0x9f66('0x24')]={};this[_0x9f66('0x25')]={};this[_0x9f66('0x26')]={};this[_0x9f66('0x27')]={};this[_0x9f66('0x28')]={};this['whatsappWaitingInteractions']={};this[_0x9f66('0x29')]();}Agent['prototype'][_0x9f66('0x2a')]=function(_0x1e9b47){if(this[_0x1e9b47+_0x9f66('0x2b')]>0x0){if(this[_0x1e9b47+_0x9f66('0x2c')]>0x0&&this[_0x1e9b47+_0x9f66('0x2b')]>=this[_0x1e9b47+_0x9f66('0x2c')]){return _0x9f66('0x2d');}else{return _0x9f66('0x2e');}}else{return _0x9f66('0x2f');}};Agent[_0x9f66('0x30')]['updateRealtime']=function(){var _0x32cf9a=['mail',_0x9f66('0x31'),_0x9f66('0x32'),_0x9f66('0x33'),_0x9f66('0x34'),_0x9f66('0x35')];for(var _0x180fa6=0x0;_0x180fa6<_0x32cf9a[_0x9f66('0x36')];_0x180fa6+=0x1){var _0x5cb1a5=this['getChannelStatus'](_0x32cf9a[_0x180fa6]);if(this[_0x32cf9a[_0x180fa6]+'Status']!==_0x5cb1a5){this[_0x32cf9a[_0x180fa6]+_0x9f66('0x37')]=_[_0x9f66('0x38')](moment()[_0x9f66('0x39')]('x'));}this[_0x32cf9a[_0x180fa6]+_0x9f66('0x3a')]=_0x5cb1a5;}var _0x2df0e5={'id':this['id'],'name':this[_0x9f66('0x7')],'online':this[_0x9f66('0x3b')],'voicePause':this[_0x9f66('0x8')],'chatPause':this[_0x9f66('0x9')],'mailPause':this['mailPause'],'smsPause':this[_0x9f66('0xc')],'faxPause':this[_0x9f66('0xb')],'openchannelPause':this['openchannelPause'],'chatStatus':this[_0x9f66('0xe')],'chatStatusTime':this[_0x9f66('0x10')],'chatCapacity':this['chatCapacity'],'chatCurrentCapacity':this['chatCurrentCapacity'],'mailStatus':this['mailStatus'],'mailStatusTime':this[_0x9f66('0x13')],'mailCapacity':this[_0x9f66('0x14')],'mailCurrentCapacity':this[_0x9f66('0x3c')],'faxStatus':this[_0x9f66('0x15')],'faxStatusTime':this[_0x9f66('0x16')],'faxCapacity':this['faxCapacity'],'faxCurrentCapacity':this[_0x9f66('0x18')],'smsStatus':this[_0x9f66('0x3d')],'smsStatusTime':this['smsStatusTime'],'smsCapacity':this['smsCapacity'],'smsCurrentCapacity':this['smsCurrentCapacity'],'whatsappStatus':this[_0x9f66('0x1b')],'whatsappStatusTime':this[_0x9f66('0x1c')],'whatsappCapacity':this[_0x9f66('0x1d')],'whatsappCurrentCapacity':this[_0x9f66('0x1e')],'openchannelStatus':this[_0x9f66('0x1f')],'openchannelStatusTime':this[_0x9f66('0x20')],'openchannelCapacity':this[_0x9f66('0x21')],'openchannelCurrentCapacity':this[_0x9f66('0x22')],'busy':this['busy'],'busyQueue':this['busyQueue'],'chatWaitingInteractions':this[_0x9f66('0x24')],'faxWaitingInteractions':this['faxWaitingInteractions'],'mailWaitingInteractions':this[_0x9f66('0x26')],'openchannelWaitingInteractions':this['openchannelWaitingInteractions'],'smsWaitingInteractions':this[_0x9f66('0x28')],'whatsappWaitingInteractions':this[_0x9f66('0x3e')]};var _0x4560f1=md5(JSON[_0x9f66('0x3f')](_0x2df0e5));if(this[_0x9f66('0x1')]!==_0x4560f1){this[_0x9f66('0x1')]=_0x4560f1;io['emit']('user:routing:update',_[_0x9f66('0x40')](_0x2df0e5,[_0x9f66('0x3b')]));}};module[_0x9f66('0x41')]=Agent;
\ No newline at end of file
+var _0x2272=['Capacity','maxcapacity','mail','openchannel','fax','sms','whatsapp','length','Status','StatusTime','mailStatusTime','mailCapacity','faxStatus','whatsappStatusTime','stringify','emit','omit','exports','lodash','md5','moment','ioredis','../../../config/environment','defaults','redis','localhost','name','online','voicePause','chatPause','mailPause','faxPause','smsPause','openchannelPause','chatStatus','chatStatusTime','chatCapacity','chatCurrentCapacity','mailStatus','unknown','mailCurrentCapacity','faxStatusTime','faxCapacity','faxCurrentCapacity','smsStatus','smsStatusTime','smsCapacity','smsCurrentCapacity','whatsappStatus','whatsappCapacity','whatsappCurrentCapacity','openchannelStatus','openchannelStatusTime','openchannelCapacity','openchannelCurrentCapacity','busyQueue','chatWaitingInteractions','faxWaitingInteractions','mailWaitingInteractions','openchannelWaitingInteractions','smsWaitingInteractions','whatsappWaitingInteractions','updateRealtime','prototype','getChannelStatus','CurrentCapacity'];(function(_0x139e6e,_0x564ce2){var _0x87ef9d=function(_0x9cd128){while(--_0x9cd128){_0x139e6e['push'](_0x139e6e['shift']());}};_0x87ef9d(++_0x564ce2);}(_0x2272,0xd8));var _0x2227=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x2272[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0x2227('0x0'));var md5=require(_0x2227('0x1'));var moment=require(_0x2227('0x2'));var Redis=require(_0x2227('0x3'));var config=require(_0x2227('0x4'));config['redis']=_[_0x2227('0x5')](config[_0x2227('0x6')],{'host':_0x2227('0x7'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function Agent(_0x1e5a8a){this['id']=_0x1e5a8a['id']||0x0;this[_0x2227('0x8')]=_0x1e5a8a[_0x2227('0x8')]||'';this[_0x2227('0x9')]=_0x1e5a8a[_0x2227('0x9')]||!![];this[_0x2227('0xa')]=_0x1e5a8a[_0x2227('0xa')]||![];this[_0x2227('0xb')]=_0x1e5a8a[_0x2227('0xb')]||![];this[_0x2227('0xc')]=_0x1e5a8a['mailPause']||![];this[_0x2227('0xd')]=_0x1e5a8a['faxPause']||![];this[_0x2227('0xe')]=_0x1e5a8a[_0x2227('0xe')]||![];this[_0x2227('0xf')]=_0x1e5a8a[_0x2227('0xf')]||![];this[_0x2227('0x10')]='unknown';this[_0x2227('0x11')]=0x0;this[_0x2227('0x12')]=_0x1e5a8a[_0x2227('0x12')]||0x0;this[_0x2227('0x13')]=0x0;this[_0x2227('0x14')]=_0x2227('0x15');this['mailStatusTime']=0x0;this['mailCapacity']=_0x1e5a8a['mailCapacity']||0x0;this[_0x2227('0x16')]=0x0;this['faxStatus']=_0x2227('0x15');this[_0x2227('0x17')]=0x0;this['faxCapacity']=_0x1e5a8a[_0x2227('0x18')]||0x0;this[_0x2227('0x19')]=0x0;this[_0x2227('0x1a')]=_0x2227('0x15');this[_0x2227('0x1b')]=0x0;this[_0x2227('0x1c')]=_0x1e5a8a['smsCapacity']||0x0;this[_0x2227('0x1d')]=0x0;this[_0x2227('0x1e')]=_0x2227('0x15');this['whatsappStatusTime']=0x0;this[_0x2227('0x1f')]=_0x1e5a8a[_0x2227('0x1f')]||0x0;this[_0x2227('0x20')]=0x0;this[_0x2227('0x21')]=_0x2227('0x15');this[_0x2227('0x22')]=0x0;this[_0x2227('0x23')]=_0x1e5a8a['openchannelCapacity']||0x0;this[_0x2227('0x24')]=0x0;this['busy']=![];this[_0x2227('0x25')]=undefined;this[_0x2227('0x1')]='';this[_0x2227('0x26')]={};this[_0x2227('0x27')]={};this[_0x2227('0x28')]={};this[_0x2227('0x29')]={};this[_0x2227('0x2a')]={};this[_0x2227('0x2b')]={};this[_0x2227('0x2c')]();}Agent[_0x2227('0x2d')][_0x2227('0x2e')]=function(_0x5a454f){if(this[_0x5a454f+_0x2227('0x2f')]>0x0){if(this[_0x5a454f+_0x2227('0x30')]>0x0&&this[_0x5a454f+'CurrentCapacity']>=this[_0x5a454f+_0x2227('0x30')]){return _0x2227('0x31');}else{return'working';}}else{return'idle';}};Agent[_0x2227('0x2d')][_0x2227('0x2c')]=function(){var _0x35333f=[_0x2227('0x32'),'chat',_0x2227('0x33'),_0x2227('0x34'),_0x2227('0x35'),_0x2227('0x36')];for(var _0x5d852f=0x0;_0x5d852f<_0x35333f[_0x2227('0x37')];_0x5d852f+=0x1){var _0xbe1ffb=this[_0x2227('0x2e')](_0x35333f[_0x5d852f]);if(this[_0x35333f[_0x5d852f]+_0x2227('0x38')]!==_0xbe1ffb){this[_0x35333f[_0x5d852f]+_0x2227('0x39')]=_['toNumber'](moment()['format']('x'));}this[_0x35333f[_0x5d852f]+'Status']=_0xbe1ffb;}var _0x2dc38d={'id':this['id'],'name':this['name'],'online':this[_0x2227('0x9')],'voicePause':this[_0x2227('0xa')],'chatPause':this['chatPause'],'mailPause':this['mailPause'],'smsPause':this[_0x2227('0xe')],'faxPause':this[_0x2227('0xd')],'openchannelPause':this[_0x2227('0xf')],'chatStatus':this['chatStatus'],'chatStatusTime':this[_0x2227('0x11')],'chatCapacity':this['chatCapacity'],'chatCurrentCapacity':this[_0x2227('0x13')],'mailStatus':this[_0x2227('0x14')],'mailStatusTime':this[_0x2227('0x3a')],'mailCapacity':this[_0x2227('0x3b')],'mailCurrentCapacity':this[_0x2227('0x16')],'faxStatus':this[_0x2227('0x3c')],'faxStatusTime':this[_0x2227('0x17')],'faxCapacity':this[_0x2227('0x18')],'faxCurrentCapacity':this[_0x2227('0x19')],'smsStatus':this[_0x2227('0x1a')],'smsStatusTime':this[_0x2227('0x1b')],'smsCapacity':this['smsCapacity'],'smsCurrentCapacity':this[_0x2227('0x1d')],'whatsappStatus':this[_0x2227('0x1e')],'whatsappStatusTime':this[_0x2227('0x3d')],'whatsappCapacity':this[_0x2227('0x1f')],'whatsappCurrentCapacity':this['whatsappCurrentCapacity'],'openchannelStatus':this[_0x2227('0x21')],'openchannelStatusTime':this[_0x2227('0x22')],'openchannelCapacity':this[_0x2227('0x23')],'openchannelCurrentCapacity':this[_0x2227('0x24')],'busy':this['busy'],'busyQueue':this[_0x2227('0x25')],'chatWaitingInteractions':this[_0x2227('0x26')],'faxWaitingInteractions':this[_0x2227('0x27')],'mailWaitingInteractions':this['mailWaitingInteractions'],'openchannelWaitingInteractions':this['openchannelWaitingInteractions'],'smsWaitingInteractions':this[_0x2227('0x2a')],'whatsappWaitingInteractions':this[_0x2227('0x2b')]};var _0x5e4fc6=md5(JSON[_0x2227('0x3e')](_0x2dc38d));if(this[_0x2227('0x1')]!==_0x5e4fc6){this['md5']=_0x5e4fc6;io[_0x2227('0x3f')]('user:routing:update',_[_0x2227('0x40')](_0x2dc38d,[_0x2227('0x9')]));}};module[_0x2227('0x41')]=Agent;
\ No newline at end of file
index 2a0db90..246bb38 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0dce=['socket.io-emitter','name','timeout','strategy','beepall','Agents','mapAgentsId','waiting','updateRouting','updateRealtime','prototype','_rr','loggedIn','paused','length','online','chatPause','available','stringify','md5','format','chat:queue:%s','emit','chat_queue:save','util','ioredis','../../../config/environment','defaults','redis','localhost'];(function(_0x1c3375,_0x29cf53){var _0x179181=function(_0xc0207c){while(--_0xc0207c){_0x1c3375['push'](_0x1c3375['shift']());}};_0x179181(++_0x29cf53);}(_0x0dce,0x162));var _0xe0dc=function(_0x3e5086,_0x48f4a2){_0x3e5086=_0x3e5086-0x0;var _0xfeb102=_0x0dce[_0x3e5086];return _0xfeb102;};'use strict';var _=require('lodash');var md5=require('md5');var util=require(_0xe0dc('0x0'));var Redis=require(_0xe0dc('0x1'));var config=require(_0xe0dc('0x2'));config['redis']=_[_0xe0dc('0x3')](config[_0xe0dc('0x4')],{'host':_0xe0dc('0x5'),'port':0x18eb});var io=require(_0xe0dc('0x6'))(new Redis(config[_0xe0dc('0x4')]));function ChatQueue(_0x5281af){this['id']=_0x5281af['id']||0x0;this['name']=_0x5281af[_0xe0dc('0x7')]||'';this[_0xe0dc('0x8')]=_0x5281af[_0xe0dc('0x8')]||0xa;this['strategy']=_0x5281af[_0xe0dc('0x9')]||_0xe0dc('0xa');this[_0xe0dc('0xb')]=_0x5281af['Agents'];this[_0xe0dc('0xc')]={};this[_0xe0dc('0xd')]=0x0;this['md5']='';this[_0xe0dc('0xe')]();this[_0xe0dc('0xf')]();}ChatQueue[_0xe0dc('0x10')][_0xe0dc('0xe')]=function(){var _0x1e7773=this[_0xe0dc('0xc')][_0xe0dc('0x11')];this[_0xe0dc('0xc')]=_['map'](this[_0xe0dc('0xb')],'id');this[_0xe0dc('0xc')][_0xe0dc('0x11')]=_0x1e7773;};ChatQueue['prototype'][_0xe0dc('0xf')]=function(){this[_0xe0dc('0x12')]=0x0;this[_0xe0dc('0x13')]=0x0;for(var _0x4b205b=0x0;_0x4b205b<this['Agents'][_0xe0dc('0x14')];_0x4b205b+=0x1){if(this[_0xe0dc('0xb')][_0x4b205b][_0xe0dc('0x15')]){this[_0xe0dc('0x12')]+=0x1;}if(this[_0xe0dc('0xb')][_0x4b205b][_0xe0dc('0x16')]){this['paused']+=0x1;}}this[_0xe0dc('0x17')]=this['loggedIn']-this[_0xe0dc('0x13')];this[_0xe0dc('0x17')]=this[_0xe0dc('0x17')]>=0x0?this['available']:0x0;var _0x2aaf9c={'id':this['id'],'available':this[_0xe0dc('0x17')],'loggedIn':this[_0xe0dc('0x12')],'name':this[_0xe0dc('0x7')],'paused':this['paused'],'waiting':this['waiting']};var _0x1d5597=md5(JSON[_0xe0dc('0x18')](_0x2aaf9c));if(this[_0xe0dc('0x19')]!==_0x1d5597){this[_0xe0dc('0x19')]=_0x1d5597;io['to'](util[_0xe0dc('0x1a')](_0xe0dc('0x1b'),_0x2aaf9c[_0xe0dc('0x7')]))[_0xe0dc('0x1c')](_0xe0dc('0x1d'),_0x2aaf9c);}};module['exports']=ChatQueue;
\ No newline at end of file
+var _0x3349=['prototype','map','_rr','loggedIn','length','online','available','paused','waiting','format','chat:queue:%s','emit','chat_queue:save','exports','lodash','util','ioredis','defaults','redis','localhost','socket.io-emitter','name','timeout','strategy','Agents','mapAgentsId','md5','updateRouting'];(function(_0x1896da,_0x3d8504){var _0x2d4bb3=function(_0x31680d){while(--_0x31680d){_0x1896da['push'](_0x1896da['shift']());}};_0x2d4bb3(++_0x3d8504);}(_0x3349,0x196));var _0x9334=function(_0x4ef8a0,_0x4bbbcb){_0x4ef8a0=_0x4ef8a0-0x0;var _0x11c017=_0x3349[_0x4ef8a0];return _0x11c017;};'use strict';var _=require(_0x9334('0x0'));var md5=require('md5');var util=require(_0x9334('0x1'));var Redis=require(_0x9334('0x2'));var config=require('../../../config/environment');config['redis']=_[_0x9334('0x3')](config[_0x9334('0x4')],{'host':_0x9334('0x5'),'port':0x18eb});var io=require(_0x9334('0x6'))(new Redis(config[_0x9334('0x4')]));function ChatQueue(_0xf7ff){this['id']=_0xf7ff['id']||0x0;this[_0x9334('0x7')]=_0xf7ff[_0x9334('0x7')]||'';this[_0x9334('0x8')]=_0xf7ff['timeout']||0xa;this[_0x9334('0x9')]=_0xf7ff['strategy']||'beepall';this['Agents']=_0xf7ff[_0x9334('0xa')];this[_0x9334('0xb')]={};this['waiting']=0x0;this[_0x9334('0xc')]='';this[_0x9334('0xd')]();this['updateRealtime']();}ChatQueue[_0x9334('0xe')][_0x9334('0xd')]=function(){var _0x1f5733=this[_0x9334('0xb')]['_rr'];this[_0x9334('0xb')]=_[_0x9334('0xf')](this['Agents'],'id');this[_0x9334('0xb')][_0x9334('0x10')]=_0x1f5733;};ChatQueue[_0x9334('0xe')]['updateRealtime']=function(){this[_0x9334('0x11')]=0x0;this['paused']=0x0;for(var _0x15da2f=0x0;_0x15da2f<this[_0x9334('0xa')][_0x9334('0x12')];_0x15da2f+=0x1){if(this[_0x9334('0xa')][_0x15da2f][_0x9334('0x13')]){this[_0x9334('0x11')]+=0x1;}if(this[_0x9334('0xa')][_0x15da2f]['chatPause']){this['paused']+=0x1;}}this[_0x9334('0x14')]=this[_0x9334('0x11')]-this[_0x9334('0x15')];this[_0x9334('0x14')]=this[_0x9334('0x14')]>=0x0?this[_0x9334('0x14')]:0x0;var _0x2bde2a={'id':this['id'],'available':this[_0x9334('0x14')],'loggedIn':this[_0x9334('0x11')],'name':this[_0x9334('0x7')],'paused':this[_0x9334('0x15')],'waiting':this[_0x9334('0x16')]};var _0x1fb494=md5(JSON['stringify'](_0x2bde2a));if(this[_0x9334('0xc')]!==_0x1fb494){this[_0x9334('0xc')]=_0x1fb494;io['to'](util[_0x9334('0x17')](_0x9334('0x18'),_0x2bde2a[_0x9334('0x7')]))[_0x9334('0x19')](_0x9334('0x1a'),_0x2bde2a);}};module[_0x9334('0x1b')]=ChatQueue;
\ No newline at end of file
index de548e5..4715286 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2f7b=['format','fax:queue:%s','name','emit','fax_queue:save','lodash','md5','util','ioredis','redis','localhost','timeout','strategy','beepall','Agents','mapAgentsId','updateRealtime','_rr','map','prototype','paused','length','online','loggedIn','available','waiting'];(function(_0x3da72b,_0x4fd809){var _0xc64ac4=function(_0x387e50){while(--_0x387e50){_0x3da72b['push'](_0x3da72b['shift']());}};_0xc64ac4(++_0x4fd809);}(_0x2f7b,0x1bf));var _0xb2f7=function(_0x436de6,_0x308ed0){_0x436de6=_0x436de6-0x0;var _0x482366=_0x2f7b[_0x436de6];return _0x482366;};'use strict';var _=require(_0xb2f7('0x0'));var md5=require(_0xb2f7('0x1'));var util=require(_0xb2f7('0x2'));var Redis=require(_0xb2f7('0x3'));var config=require('../../../config/environment');config[_0xb2f7('0x4')]=_['defaults'](config[_0xb2f7('0x4')],{'host':_0xb2f7('0x5'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function FaxQueue(_0x10f275){this['id']=_0x10f275['id']||0x0;this['name']=_0x10f275['name']||'';this[_0xb2f7('0x6')]=_0x10f275[_0xb2f7('0x6')]||0xa;this[_0xb2f7('0x7')]=_0x10f275[_0xb2f7('0x7')]||_0xb2f7('0x8');this[_0xb2f7('0x9')]=_0x10f275[_0xb2f7('0x9')];this[_0xb2f7('0xa')]={};this['waiting']=0x0;this['md5']='';this['updateRouting']();this[_0xb2f7('0xb')]();}FaxQueue['prototype']['updateRouting']=function(){var _0x3823c0=this[_0xb2f7('0xa')][_0xb2f7('0xc')];this[_0xb2f7('0xa')]=_[_0xb2f7('0xd')](this[_0xb2f7('0x9')],'id');this[_0xb2f7('0xa')]['_rr']=_0x3823c0;};FaxQueue[_0xb2f7('0xe')][_0xb2f7('0xb')]=function(){this['loggedIn']=0x0;this[_0xb2f7('0xf')]=0x0;for(var _0xab54ec=0x0;_0xab54ec<this[_0xb2f7('0x9')][_0xb2f7('0x10')];_0xab54ec+=0x1){if(this['Agents'][_0xab54ec][_0xb2f7('0x11')]){this[_0xb2f7('0x12')]+=0x1;}if(this[_0xb2f7('0x9')][_0xab54ec]['faxPause']){this[_0xb2f7('0xf')]+=0x1;}}this[_0xb2f7('0x13')]=this[_0xb2f7('0x12')]-this[_0xb2f7('0xf')];this['available']=this[_0xb2f7('0x13')]>=0x0?this[_0xb2f7('0x13')]:0x0;var _0x408ba6={'id':this['id'],'available':this[_0xb2f7('0x13')],'loggedIn':this[_0xb2f7('0x12')],'name':this['name'],'paused':this[_0xb2f7('0xf')],'waiting':this[_0xb2f7('0x14')]};var _0x277c4a=md5(JSON['stringify'](_0x408ba6));if(this[_0xb2f7('0x1')]!==_0x277c4a){this[_0xb2f7('0x1')]=_0x277c4a;io['to'](util[_0xb2f7('0x15')](_0xb2f7('0x16'),_0x408ba6[_0xb2f7('0x17')]))[_0xb2f7('0x18')](_0xb2f7('0x19'),_0x408ba6);}};module['exports']=FaxQueue;
\ No newline at end of file
+var _0x59a8=['timeout','strategy','Agents','mapAgentsId','waiting','prototype','updateRouting','_rr','map','updateRealtime','loggedIn','paused','length','online','available','stringify','fax:queue:%s','emit','fax_queue:save','exports','md5','util','ioredis','../../../config/environment','redis','socket.io-emitter','name'];(function(_0xa1cfa8,_0x252403){var _0x158a5f=function(_0x14c809){while(--_0x14c809){_0xa1cfa8['push'](_0xa1cfa8['shift']());}};_0x158a5f(++_0x252403);}(_0x59a8,0x9b));var _0x859a=function(_0x313551,_0x20d1e9){_0x313551=_0x313551-0x0;var _0x2d2030=_0x59a8[_0x313551];return _0x2d2030;};'use strict';var _=require('lodash');var md5=require(_0x859a('0x0'));var util=require(_0x859a('0x1'));var Redis=require(_0x859a('0x2'));var config=require(_0x859a('0x3'));config[_0x859a('0x4')]=_['defaults'](config[_0x859a('0x4')],{'host':'localhost','port':0x18eb});var io=require(_0x859a('0x5'))(new Redis(config[_0x859a('0x4')]));function FaxQueue(_0x251082){this['id']=_0x251082['id']||0x0;this['name']=_0x251082[_0x859a('0x6')]||'';this[_0x859a('0x7')]=_0x251082[_0x859a('0x7')]||0xa;this[_0x859a('0x8')]=_0x251082[_0x859a('0x8')]||'beepall';this['Agents']=_0x251082[_0x859a('0x9')];this[_0x859a('0xa')]={};this[_0x859a('0xb')]=0x0;this[_0x859a('0x0')]='';this['updateRouting']();this['updateRealtime']();}FaxQueue[_0x859a('0xc')][_0x859a('0xd')]=function(){var _0x1d66df=this[_0x859a('0xa')][_0x859a('0xe')];this[_0x859a('0xa')]=_[_0x859a('0xf')](this['Agents'],'id');this[_0x859a('0xa')][_0x859a('0xe')]=_0x1d66df;};FaxQueue[_0x859a('0xc')][_0x859a('0x10')]=function(){this[_0x859a('0x11')]=0x0;this[_0x859a('0x12')]=0x0;for(var _0x3ee3cc=0x0;_0x3ee3cc<this[_0x859a('0x9')][_0x859a('0x13')];_0x3ee3cc+=0x1){if(this[_0x859a('0x9')][_0x3ee3cc][_0x859a('0x14')]){this[_0x859a('0x11')]+=0x1;}if(this[_0x859a('0x9')][_0x3ee3cc]['faxPause']){this[_0x859a('0x12')]+=0x1;}}this[_0x859a('0x15')]=this[_0x859a('0x11')]-this[_0x859a('0x12')];this[_0x859a('0x15')]=this[_0x859a('0x15')]>=0x0?this[_0x859a('0x15')]:0x0;var _0x3d3f5a={'id':this['id'],'available':this['available'],'loggedIn':this[_0x859a('0x11')],'name':this[_0x859a('0x6')],'paused':this[_0x859a('0x12')],'waiting':this[_0x859a('0xb')]};var _0x5464bf=md5(JSON[_0x859a('0x16')](_0x3d3f5a));if(this['md5']!==_0x5464bf){this['md5']=_0x5464bf;io['to'](util['format'](_0x859a('0x17'),_0x3d3f5a['name']))[_0x859a('0x18')](_0x859a('0x19'),_0x3d3f5a);}};module[_0x859a('0x1a')]=FaxQueue;
\ No newline at end of file
index e6e5d82..c80d876 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf2ad=['name','Intervals','exports'];(function(_0x6893ee,_0x44ba6f){var _0x532615=function(_0x5afa2d){while(--_0x5afa2d){_0x6893ee['push'](_0x6893ee['shift']());}};_0x532615(++_0x44ba6f);}(_0xf2ad,0x75));var _0xdf2a=function(_0x4c73ac,_0x46b73c){_0x4c73ac=_0x4c73ac-0x0;var _0x9839ee=_0xf2ad[_0x4c73ac];return _0x9839ee;};'use strict';function Interval(_0x5bad12){this['id']=_0x5bad12['id']||0x0;this['name']=_0x5bad12[_0xdf2a('0x0')]||'';this[_0xdf2a('0x1')]=_0x5bad12[_0xdf2a('0x1')]||{};}module[_0xdf2a('0x2')]=Interval;
\ No newline at end of file
+var _0x7699=['exports','name','Intervals'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x7699,0x1a2));var _0x9769=function(_0x502036,_0x502686){_0x502036=_0x502036-0x0;var _0x485247=_0x7699[_0x502036];return _0x485247;};'use strict';function Interval(_0x39f5d9){this['id']=_0x39f5d9['id']||0x0;this['name']=_0x39f5d9[_0x9769('0x0')]||'';this['Intervals']=_0x39f5d9[_0x9769('0x1')]||{};}module[_0x9769('0x2')]=Interval;
\ No newline at end of file
index 2f168fe..5c182ab 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x85f9=['mailPause','available','name','stringify','format','emit','mail_queue:save','exports','md5','util','ioredis','../../../config/environment','redis','defaults','localhost','timeout','strategy','beepall','Agents','mapAgentsId','waiting','updateRouting','updateRealtime','prototype','_rr','loggedIn','paused','online'];(function(_0x2440fe,_0x281a11){var _0x5cf734=function(_0x38e12b){while(--_0x38e12b){_0x2440fe['push'](_0x2440fe['shift']());}};_0x5cf734(++_0x281a11);}(_0x85f9,0x1ac));var _0x985f=function(_0x185e78,_0x2d08a0){_0x185e78=_0x185e78-0x0;var _0x4a7d21=_0x85f9[_0x185e78];return _0x4a7d21;};'use strict';var _=require('lodash');var md5=require(_0x985f('0x0'));var util=require(_0x985f('0x1'));var Redis=require(_0x985f('0x2'));var config=require(_0x985f('0x3'));config[_0x985f('0x4')]=_[_0x985f('0x5')](config[_0x985f('0x4')],{'host':_0x985f('0x6'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function MailQueue(_0xaa701a){this['id']=_0xaa701a['id']||0x0;this['name']=_0xaa701a['name']||'';this[_0x985f('0x7')]=_0xaa701a[_0x985f('0x7')]||0xa;this[_0x985f('0x8')]=_0xaa701a[_0x985f('0x8')]||_0x985f('0x9');this['Agents']=_0xaa701a[_0x985f('0xa')];this[_0x985f('0xb')]={};this[_0x985f('0xc')]=0x0;this[_0x985f('0x0')]='';this[_0x985f('0xd')]();this[_0x985f('0xe')]();}MailQueue[_0x985f('0xf')][_0x985f('0xd')]=function(){var _0x59d2f6=this[_0x985f('0xb')][_0x985f('0x10')];this[_0x985f('0xb')]=_['map'](this[_0x985f('0xa')],'id');this[_0x985f('0xb')][_0x985f('0x10')]=_0x59d2f6;};MailQueue[_0x985f('0xf')]['updateRealtime']=function(){this[_0x985f('0x11')]=0x0;this[_0x985f('0x12')]=0x0;for(var _0x400360=0x0;_0x400360<this[_0x985f('0xa')]['length'];_0x400360+=0x1){if(this[_0x985f('0xa')][_0x400360][_0x985f('0x13')]){this[_0x985f('0x11')]+=0x1;}if(this['Agents'][_0x400360][_0x985f('0x14')]){this[_0x985f('0x12')]+=0x1;}}this[_0x985f('0x15')]=this[_0x985f('0x11')]-this['paused'];this[_0x985f('0x15')]=this[_0x985f('0x15')]>=0x0?this['available']:0x0;var _0x2818f8={'id':this['id'],'available':this[_0x985f('0x15')],'loggedIn':this[_0x985f('0x11')],'name':this[_0x985f('0x16')],'paused':this['paused'],'waiting':this['waiting']};var _0x3c5add=md5(JSON[_0x985f('0x17')](_0x2818f8));if(this[_0x985f('0x0')]!==_0x3c5add){this[_0x985f('0x0')]=_0x3c5add;io['to'](util[_0x985f('0x18')]('mail:queue:%s',_0x2818f8[_0x985f('0x16')]))[_0x985f('0x19')](_0x985f('0x1a'),_0x2818f8);}};module[_0x985f('0x1b')]=MailQueue;
\ No newline at end of file
+var _0x2796=['_rr','map','prototype','loggedIn','paused','length','online','mailPause','available','stringify','mail:queue:%s','emit','mail_queue:save','exports','lodash','md5','util','ioredis','../../../config/environment','defaults','redis','localhost','name','timeout','strategy','beepall','Agents','mapAgentsId','waiting','updateRealtime','updateRouting'];(function(_0x36b06c,_0x4927ef){var _0x1564c9=function(_0x19077b){while(--_0x19077b){_0x36b06c['push'](_0x36b06c['shift']());}};_0x1564c9(++_0x4927ef);}(_0x2796,0x1c0));var _0x6279=function(_0x104264,_0x651b2c){_0x104264=_0x104264-0x0;var _0x265a60=_0x2796[_0x104264];return _0x265a60;};'use strict';var _=require(_0x6279('0x0'));var md5=require(_0x6279('0x1'));var util=require(_0x6279('0x2'));var Redis=require(_0x6279('0x3'));var config=require(_0x6279('0x4'));config['redis']=_[_0x6279('0x5')](config[_0x6279('0x6')],{'host':_0x6279('0x7'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x6279('0x6')]));function MailQueue(_0x553a1c){this['id']=_0x553a1c['id']||0x0;this[_0x6279('0x8')]=_0x553a1c['name']||'';this[_0x6279('0x9')]=_0x553a1c['timeout']||0xa;this[_0x6279('0xa')]=_0x553a1c[_0x6279('0xa')]||_0x6279('0xb');this[_0x6279('0xc')]=_0x553a1c[_0x6279('0xc')];this[_0x6279('0xd')]={};this[_0x6279('0xe')]=0x0;this['md5']='';this['updateRouting']();this[_0x6279('0xf')]();}MailQueue['prototype'][_0x6279('0x10')]=function(){var _0x44352c=this[_0x6279('0xd')][_0x6279('0x11')];this[_0x6279('0xd')]=_[_0x6279('0x12')](this['Agents'],'id');this[_0x6279('0xd')][_0x6279('0x11')]=_0x44352c;};MailQueue[_0x6279('0x13')][_0x6279('0xf')]=function(){this[_0x6279('0x14')]=0x0;this[_0x6279('0x15')]=0x0;for(var _0x4b7337=0x0;_0x4b7337<this[_0x6279('0xc')][_0x6279('0x16')];_0x4b7337+=0x1){if(this[_0x6279('0xc')][_0x4b7337][_0x6279('0x17')]){this[_0x6279('0x14')]+=0x1;}if(this[_0x6279('0xc')][_0x4b7337][_0x6279('0x18')]){this[_0x6279('0x15')]+=0x1;}}this[_0x6279('0x19')]=this[_0x6279('0x14')]-this[_0x6279('0x15')];this[_0x6279('0x19')]=this[_0x6279('0x19')]>=0x0?this[_0x6279('0x19')]:0x0;var _0x4dae19={'id':this['id'],'available':this[_0x6279('0x19')],'loggedIn':this[_0x6279('0x14')],'name':this[_0x6279('0x8')],'paused':this[_0x6279('0x15')],'waiting':this[_0x6279('0xe')]};var _0x10d7bc=md5(JSON[_0x6279('0x1a')](_0x4dae19));if(this[_0x6279('0x1')]!==_0x10d7bc){this[_0x6279('0x1')]=_0x10d7bc;io['to'](util['format'](_0x6279('0x1b'),_0x4dae19[_0x6279('0x8')]))[_0x6279('0x1c')](_0x6279('0x1d'),_0x4dae19);}};module[_0x6279('0x1e')]=MailQueue;
\ No newline at end of file
index 70147e1..a3480ed 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1261=['available','stringify','openchannel:queue:%s','openchannel_queue:save','exports','md5','util','ioredis','../../../config/environment','redis','defaults','localhost','socket.io-emitter','name','timeout','strategy','beepall','Agents','waiting','updateRouting','prototype','mapAgentsId','map','_rr','updateRealtime','loggedIn','paused','length','online'];(function(_0x4fde08,_0x463a36){var _0x12e725=function(_0x2670c5){while(--_0x2670c5){_0x4fde08['push'](_0x4fde08['shift']());}};_0x12e725(++_0x463a36);}(_0x1261,0x144));var _0x1126=function(_0x3f52ee,_0x468aab){_0x3f52ee=_0x3f52ee-0x0;var _0x4f7924=_0x1261[_0x3f52ee];return _0x4f7924;};'use strict';var _=require('lodash');var md5=require(_0x1126('0x0'));var util=require(_0x1126('0x1'));var Redis=require(_0x1126('0x2'));var config=require(_0x1126('0x3'));config[_0x1126('0x4')]=_[_0x1126('0x5')](config[_0x1126('0x4')],{'host':_0x1126('0x6'),'port':0x18eb});var io=require(_0x1126('0x7'))(new Redis(config[_0x1126('0x4')]));function OpenchannelQueue(_0x5a2189){this['id']=_0x5a2189['id']||0x0;this['name']=_0x5a2189[_0x1126('0x8')]||'';this[_0x1126('0x9')]=_0x5a2189['timeout']||0xa;this[_0x1126('0xa')]=_0x5a2189[_0x1126('0xa')]||_0x1126('0xb');this[_0x1126('0xc')]=_0x5a2189[_0x1126('0xc')];this['mapAgentsId']={};this[_0x1126('0xd')]=0x0;this[_0x1126('0x0')]='';this[_0x1126('0xe')]();this['updateRealtime']();}OpenchannelQueue[_0x1126('0xf')]['updateRouting']=function(){var _0x52ef15=this[_0x1126('0x10')]['_rr'];this[_0x1126('0x10')]=_[_0x1126('0x11')](this[_0x1126('0xc')],'id');this[_0x1126('0x10')][_0x1126('0x12')]=_0x52ef15;};OpenchannelQueue[_0x1126('0xf')][_0x1126('0x13')]=function(){this[_0x1126('0x14')]=0x0;this[_0x1126('0x15')]=0x0;for(var _0x53a8f0=0x0;_0x53a8f0<this['Agents'][_0x1126('0x16')];_0x53a8f0+=0x1){if(this[_0x1126('0xc')][_0x53a8f0][_0x1126('0x17')]){this['loggedIn']+=0x1;}if(this[_0x1126('0xc')][_0x53a8f0]['openchannelPause']){this[_0x1126('0x15')]+=0x1;}}this[_0x1126('0x18')]=this[_0x1126('0x14')]-this['paused'];this[_0x1126('0x18')]=this[_0x1126('0x18')]>=0x0?this['available']:0x0;var _0x4d2b38={'id':this['id'],'available':this[_0x1126('0x18')],'loggedIn':this[_0x1126('0x14')],'name':this['name'],'paused':this['paused'],'waiting':this[_0x1126('0xd')]};var _0x58b109=md5(JSON[_0x1126('0x19')](_0x4d2b38));if(this[_0x1126('0x0')]!==_0x58b109){this[_0x1126('0x0')]=_0x58b109;io['to'](util['format'](_0x1126('0x1a'),_0x4d2b38['name']))['emit'](_0x1126('0x1b'),_0x4d2b38);}};module[_0x1126('0x1c')]=OpenchannelQueue;
\ No newline at end of file
+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(_0x278e3c,_0x1c9cfd){var _0x3e2d9b=function(_0x34d928){while(--_0x34d928){_0x278e3c['push'](_0x278e3c['shift']());}};_0x3e2d9b(++_0x1c9cfd);}(_0x326f,0xd1));var _0xf326=function(_0x29b108,_0x389fc9){_0x29b108=_0x29b108-0x0;var _0x5a43ca=_0x326f[_0x29b108];return _0x5a43ca;};'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
index 4d369f4..b46a14c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xde64=['sms_queue:save','exports','lodash','md5','util','ioredis','../../../config/environment','redis','localhost','name','timeout','strategy','beepall','Agents','waiting','updateRouting','prototype','mapAgentsId','_rr','map','updateRealtime','loggedIn','paused','length','available','stringify','format'];(function(_0x2722fe,_0x5a1f25){var _0x1efb19=function(_0x20be7a){while(--_0x20be7a){_0x2722fe['push'](_0x2722fe['shift']());}};_0x1efb19(++_0x5a1f25);}(_0xde64,0x17c));var _0x4de6=function(_0x564f04,_0x398f13){_0x564f04=_0x564f04-0x0;var _0x36d45b=_0xde64[_0x564f04];return _0x36d45b;};'use strict';var _=require(_0x4de6('0x0'));var md5=require(_0x4de6('0x1'));var util=require(_0x4de6('0x2'));var Redis=require(_0x4de6('0x3'));var config=require(_0x4de6('0x4'));config[_0x4de6('0x5')]=_['defaults'](config[_0x4de6('0x5')],{'host':_0x4de6('0x6'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function SmsQueue(_0xe0bed){this['id']=_0xe0bed['id']||0x0;this[_0x4de6('0x7')]=_0xe0bed['name']||'';this['timeout']=_0xe0bed[_0x4de6('0x8')]||0xa;this[_0x4de6('0x9')]=_0xe0bed[_0x4de6('0x9')]||_0x4de6('0xa');this[_0x4de6('0xb')]=_0xe0bed[_0x4de6('0xb')];this['mapAgentsId']={};this[_0x4de6('0xc')]=0x0;this[_0x4de6('0x1')]='';this[_0x4de6('0xd')]();this['updateRealtime']();}SmsQueue[_0x4de6('0xe')][_0x4de6('0xd')]=function(){var _0x2e205b=this[_0x4de6('0xf')][_0x4de6('0x10')];this['mapAgentsId']=_[_0x4de6('0x11')](this[_0x4de6('0xb')],'id');this[_0x4de6('0xf')]['_rr']=_0x2e205b;};SmsQueue[_0x4de6('0xe')][_0x4de6('0x12')]=function(){this[_0x4de6('0x13')]=0x0;this[_0x4de6('0x14')]=0x0;for(var _0x58b0c1=0x0;_0x58b0c1<this[_0x4de6('0xb')][_0x4de6('0x15')];_0x58b0c1+=0x1){if(this[_0x4de6('0xb')][_0x58b0c1]['online']){this[_0x4de6('0x13')]+=0x1;}if(this['Agents'][_0x58b0c1]['smsPause']){this[_0x4de6('0x14')]+=0x1;}}this[_0x4de6('0x16')]=this[_0x4de6('0x13')]-this[_0x4de6('0x14')];this[_0x4de6('0x16')]=this[_0x4de6('0x16')]>=0x0?this[_0x4de6('0x16')]:0x0;var _0x5aacb4={'id':this['id'],'available':this[_0x4de6('0x16')],'loggedIn':this[_0x4de6('0x13')],'name':this[_0x4de6('0x7')],'paused':this[_0x4de6('0x14')],'waiting':this[_0x4de6('0xc')]};var _0x360cf7=md5(JSON[_0x4de6('0x17')](_0x5aacb4));if(this[_0x4de6('0x1')]!==_0x360cf7){this[_0x4de6('0x1')]=_0x360cf7;io['to'](util[_0x4de6('0x18')]('sms:queue:%s',_0x5aacb4[_0x4de6('0x7')]))['emit'](_0x4de6('0x19'),_0x5aacb4);}};module[_0x4de6('0x1a')]=SmsQueue;
\ No newline at end of file
+var _0x8db0=['updateRouting','updateRealtime','prototype','mapAgentsId','_rr','map','loggedIn','length','online','smsPause','available','paused','stringify','format','sms:queue:%s','sms_queue:save','exports','lodash','md5','ioredis','../../../config/environment','redis','name','timeout','strategy','beepall','Agents','waiting'];(function(_0x1dc462,_0x56e978){var _0x1024e2=function(_0x4085c3){while(--_0x4085c3){_0x1dc462['push'](_0x1dc462['shift']());}};_0x1024e2(++_0x56e978);}(_0x8db0,0x65));var _0x08db=function(_0x52085a,_0x3717ca){_0x52085a=_0x52085a-0x0;var _0x5afc1a=_0x8db0[_0x52085a];return _0x5afc1a;};'use strict';var _=require(_0x08db('0x0'));var md5=require(_0x08db('0x1'));var util=require('util');var Redis=require(_0x08db('0x2'));var config=require(_0x08db('0x3'));config[_0x08db('0x4')]=_['defaults'](config[_0x08db('0x4')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function SmsQueue(_0x218333){this['id']=_0x218333['id']||0x0;this['name']=_0x218333[_0x08db('0x5')]||'';this['timeout']=_0x218333[_0x08db('0x6')]||0xa;this[_0x08db('0x7')]=_0x218333[_0x08db('0x7')]||_0x08db('0x8');this[_0x08db('0x9')]=_0x218333['Agents'];this['mapAgentsId']={};this[_0x08db('0xa')]=0x0;this[_0x08db('0x1')]='';this[_0x08db('0xb')]();this[_0x08db('0xc')]();}SmsQueue[_0x08db('0xd')][_0x08db('0xb')]=function(){var _0x2b1d6f=this[_0x08db('0xe')][_0x08db('0xf')];this[_0x08db('0xe')]=_[_0x08db('0x10')](this[_0x08db('0x9')],'id');this[_0x08db('0xe')][_0x08db('0xf')]=_0x2b1d6f;};SmsQueue[_0x08db('0xd')][_0x08db('0xc')]=function(){this[_0x08db('0x11')]=0x0;this['paused']=0x0;for(var _0x592286=0x0;_0x592286<this['Agents'][_0x08db('0x12')];_0x592286+=0x1){if(this[_0x08db('0x9')][_0x592286][_0x08db('0x13')]){this[_0x08db('0x11')]+=0x1;}if(this['Agents'][_0x592286][_0x08db('0x14')]){this['paused']+=0x1;}}this[_0x08db('0x15')]=this['loggedIn']-this[_0x08db('0x16')];this[_0x08db('0x15')]=this['available']>=0x0?this[_0x08db('0x15')]:0x0;var _0x16ca71={'id':this['id'],'available':this[_0x08db('0x15')],'loggedIn':this['loggedIn'],'name':this[_0x08db('0x5')],'paused':this[_0x08db('0x16')],'waiting':this[_0x08db('0xa')]};var _0x27dc5c=md5(JSON[_0x08db('0x17')](_0x16ca71));if(this[_0x08db('0x1')]!==_0x27dc5c){this[_0x08db('0x1')]=_0x27dc5c;io['to'](util[_0x08db('0x18')](_0x08db('0x19'),_0x16ca71[_0x08db('0x5')]))['emit'](_0x08db('0x1a'),_0x16ca71);}};module[_0x08db('0x1b')]=SmsQueue;
\ No newline at end of file
index 0c6e42f..0a98eef 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xec2b=['updateRealtime','prototype','_rr','map','loggedIn','paused','whatsappPause','available','stringify','whatsapp:queue:%s','emit','whatsapp_queue:save','exports','util','ioredis','../../../config/environment','redis','defaults','localhost','socket.io-emitter','name','timeout','strategy','beepall','Agents','mapAgentsId','waiting','md5','updateRouting'];(function(_0x3227c1,_0x4318c5){var _0x31fd48=function(_0x5c5850){while(--_0x5c5850){_0x3227c1['push'](_0x3227c1['shift']());}};_0x31fd48(++_0x4318c5);}(_0xec2b,0x186));var _0xbec2=function(_0x27e3a6,_0x1c2583){_0x27e3a6=_0x27e3a6-0x0;var _0xa1b8d6=_0xec2b[_0x27e3a6];return _0xa1b8d6;};'use strict';var _=require('lodash');var md5=require('md5');var util=require(_0xbec2('0x0'));var Redis=require(_0xbec2('0x1'));var config=require(_0xbec2('0x2'));config[_0xbec2('0x3')]=_[_0xbec2('0x4')](config[_0xbec2('0x3')],{'host':_0xbec2('0x5'),'port':0x18eb});var io=require(_0xbec2('0x6'))(new Redis(config[_0xbec2('0x3')]));function WhatsappQueue(_0x4b885f){this['id']=_0x4b885f['id']||0x0;this[_0xbec2('0x7')]=_0x4b885f[_0xbec2('0x7')]||'';this[_0xbec2('0x8')]=_0x4b885f[_0xbec2('0x8')]||0xa;this['strategy']=_0x4b885f[_0xbec2('0x9')]||_0xbec2('0xa');this[_0xbec2('0xb')]=_0x4b885f[_0xbec2('0xb')];this[_0xbec2('0xc')]={};this[_0xbec2('0xd')]=0x0;this[_0xbec2('0xe')]='';this[_0xbec2('0xf')]();this[_0xbec2('0x10')]();}WhatsappQueue[_0xbec2('0x11')]['updateRouting']=function(){var _0x2adfeb=this[_0xbec2('0xc')][_0xbec2('0x12')];this[_0xbec2('0xc')]=_[_0xbec2('0x13')](this[_0xbec2('0xb')],'id');this[_0xbec2('0xc')][_0xbec2('0x12')]=_0x2adfeb;};WhatsappQueue[_0xbec2('0x11')][_0xbec2('0x10')]=function(){this[_0xbec2('0x14')]=0x0;this[_0xbec2('0x15')]=0x0;for(var _0x51fd8d=0x0;_0x51fd8d<this[_0xbec2('0xb')]['length'];_0x51fd8d+=0x1){if(this[_0xbec2('0xb')][_0x51fd8d]['online']){this[_0xbec2('0x14')]+=0x1;}if(this[_0xbec2('0xb')][_0x51fd8d][_0xbec2('0x16')]){this[_0xbec2('0x15')]+=0x1;}}this[_0xbec2('0x17')]=this[_0xbec2('0x14')]-this[_0xbec2('0x15')];this[_0xbec2('0x17')]=this['available']>=0x0?this[_0xbec2('0x17')]:0x0;var _0x5e3468={'id':this['id'],'available':this['available'],'loggedIn':this[_0xbec2('0x14')],'name':this[_0xbec2('0x7')],'paused':this[_0xbec2('0x15')],'waiting':this[_0xbec2('0xd')]};var _0xeb8868=md5(JSON[_0xbec2('0x18')](_0x5e3468));if(this[_0xbec2('0xe')]!==_0xeb8868){this[_0xbec2('0xe')]=_0xeb8868;io['to'](util['format'](_0xbec2('0x19'),_0x5e3468[_0xbec2('0x7')]))[_0xbec2('0x1a')](_0xbec2('0x1b'),_0x5e3468);}};module[_0xbec2('0x1c')]=WhatsappQueue;
\ No newline at end of file
+var _0x5bcf=['paused','stringify','format','whatsapp:queue:%s','whatsapp_queue:save','exports','md5','ioredis','../../../config/environment','defaults','redis','localhost','socket.io-emitter','name','timeout','strategy','Agents','mapAgentsId','waiting','updateRouting','prototype','_rr','map','length','online','whatsappPause','available','loggedIn'];(function(_0x30ae5e,_0x391fc4){var _0x1f2e93=function(_0x60307d){while(--_0x60307d){_0x30ae5e['push'](_0x30ae5e['shift']());}};_0x1f2e93(++_0x391fc4);}(_0x5bcf,0xe6));var _0xf5bc=function(_0x2b8ead,_0x4ac69b){_0x2b8ead=_0x2b8ead-0x0;var _0x2faa50=_0x5bcf[_0x2b8ead];return _0x2faa50;};'use strict';var _=require('lodash');var md5=require(_0xf5bc('0x0'));var util=require('util');var Redis=require(_0xf5bc('0x1'));var config=require(_0xf5bc('0x2'));config['redis']=_[_0xf5bc('0x3')](config[_0xf5bc('0x4')],{'host':_0xf5bc('0x5'),'port':0x18eb});var io=require(_0xf5bc('0x6'))(new Redis(config['redis']));function WhatsappQueue(_0x4cd546){this['id']=_0x4cd546['id']||0x0;this[_0xf5bc('0x7')]=_0x4cd546['name']||'';this[_0xf5bc('0x8')]=_0x4cd546[_0xf5bc('0x8')]||0xa;this['strategy']=_0x4cd546[_0xf5bc('0x9')]||'beepall';this[_0xf5bc('0xa')]=_0x4cd546[_0xf5bc('0xa')];this[_0xf5bc('0xb')]={};this[_0xf5bc('0xc')]=0x0;this[_0xf5bc('0x0')]='';this[_0xf5bc('0xd')]();this['updateRealtime']();}WhatsappQueue[_0xf5bc('0xe')][_0xf5bc('0xd')]=function(){var _0x311d13=this['mapAgentsId'][_0xf5bc('0xf')];this[_0xf5bc('0xb')]=_[_0xf5bc('0x10')](this[_0xf5bc('0xa')],'id');this[_0xf5bc('0xb')][_0xf5bc('0xf')]=_0x311d13;};WhatsappQueue[_0xf5bc('0xe')]['updateRealtime']=function(){this['loggedIn']=0x0;this['paused']=0x0;for(var _0x497553=0x0;_0x497553<this[_0xf5bc('0xa')][_0xf5bc('0x11')];_0x497553+=0x1){if(this[_0xf5bc('0xa')][_0x497553][_0xf5bc('0x12')]){this['loggedIn']+=0x1;}if(this[_0xf5bc('0xa')][_0x497553][_0xf5bc('0x13')]){this['paused']+=0x1;}}this[_0xf5bc('0x14')]=this[_0xf5bc('0x15')]-this[_0xf5bc('0x16')];this[_0xf5bc('0x14')]=this[_0xf5bc('0x14')]>=0x0?this['available']:0x0;var _0x3d30b7={'id':this['id'],'available':this[_0xf5bc('0x14')],'loggedIn':this[_0xf5bc('0x15')],'name':this[_0xf5bc('0x7')],'paused':this[_0xf5bc('0x16')],'waiting':this[_0xf5bc('0xc')]};var _0x92dcd0=md5(JSON[_0xf5bc('0x17')](_0x3d30b7));if(this['md5']!==_0x92dcd0){this['md5']=_0x92dcd0;io['to'](util[_0xf5bc('0x18')](_0xf5bc('0x19'),_0x3d30b7[_0xf5bc('0x7')]))['emit'](_0xf5bc('0x1a'),_0x3d30b7);}};module[_0xf5bc('0x1b')]=WhatsappQueue;
\ No newline at end of file
index d16c7de..fc88cef 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(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xa9e0,0x123));var _0x0a9e=function(_0x376b45,_0x5964fb){_0x376b45=_0x376b45-0x0;var _0x2341b3=_0xa9e0[_0x376b45];return _0x2341b3;};'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 _0xb10b=['faxQueues','whatsappQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','mapKeys','hasOwnProperty','prototype','mergeFromDatabase','initAgents','agents','isUndefined','initIntervals','length','initOpenchannelQueues','updateRealtime','initChatQueues','chatQueues','initSmsQueues','updateRouting','initMailQueues','initFaxQueues','initWhatsappQueues','exports','bluebird','lodash','moment','../model/agent','../model/openchannelQueue','../model/chatQueue','../model/smsQueue','../model/mailQueue','../model/faxQueue','../model/whatsappQueue','intervals','openchannelQueues','smsQueues','mailQueues'];(function(_0x2921ba,_0x591755){var _0x49d2e3=function(_0x29a473){while(--_0x29a473){_0x2921ba['push'](_0x2921ba['shift']());}};_0x49d2e3(++_0x591755);}(_0xb10b,0x12a));var _0xbb10=function(_0x3d00db,_0x3692b3){_0x3d00db=_0x3d00db-0x0;var _0x41f115=_0xb10b[_0x3d00db];return _0x41f115;};'use strict';var BPromise=require(_0xbb10('0x0'));var util=require('util');var _=require(_0xbb10('0x1'));var moment=require(_0xbb10('0x2'));var Agent=require(_0xbb10('0x3'));var Interval=require('../model/interval');var OpenchannelQueue=require(_0xbb10('0x4'));var ChatQueue=require(_0xbb10('0x5'));var SmsQueue=require(_0xbb10('0x6'));var MailQueue=require(_0xbb10('0x7'));var FaxQueue=require(_0xbb10('0x8'));var WhatsappQueue=require(_0xbb10('0x9'));var Realtime=function(){this['agents']={};this[_0xbb10('0xa')]={};this[_0xbb10('0xb')]={};this['chatQueues']={};this[_0xbb10('0xc')]={};this[_0xbb10('0xd')]={};this[_0xbb10('0xe')]={};this[_0xbb10('0xf')]={};this[_0xbb10('0x10')]={};this[_0xbb10('0x11')]={};this[_0xbb10('0x12')]={};this[_0xbb10('0x13')]={};this['faxQueuesWaitingInteractions']={};this['whatsappQueuesWaitingInteractions']={};};function freeIsNotKey(_0x20bd61,_0x118a74,_0xce64f3){var _0x5e136d=_[_0xbb10('0x14')](_0x20bd61,function(_0x5be7e0,_0x44fb19){return _0x5be7e0[_0xce64f3];});for(var _0x916a32 in _0x118a74){if(_0x118a74[_0xbb10('0x15')](_0x916a32)){if(!_0x5e136d[_0x916a32]){delete _0x118a74[_0x916a32];}}}}Realtime[_0xbb10('0x16')][_0xbb10('0x17')]=function(_0x147230,_0x58a612){for(var _0x26e021 in _0x58a612){if(_0x147230[_0xbb10('0x15')](_0x26e021)){_0x147230[_0x26e021]=_0x58a612[_0x26e021];}}};Realtime[_0xbb10('0x16')][_0xbb10('0x18')]=function(){var _0x3df17b=this;return function(_0x2f2ebf){if(_0x2f2ebf){freeIsNotKey(_0x2f2ebf,_0x3df17b[_0xbb10('0x19')],'id');for(var _0x36b5e8=0x0,_0x3e26f4={},_0x2b184e={};_0x36b5e8<_0x2f2ebf['length'];_0x36b5e8+=0x1){_0x3e26f4=_0x2f2ebf[_0x36b5e8];if(_[_0xbb10('0x1a')](_0x3df17b[_0xbb10('0x19')][_0x3e26f4['id']])){_0x3df17b[_0xbb10('0x19')][_0x3e26f4['id']]=new Agent(_0x3e26f4);}else{_0x3df17b[_0xbb10('0x17')](_0x3df17b[_0xbb10('0x19')][_0x3e26f4['id']],_0x3e26f4);}}}return _0x3df17b[_0xbb10('0x19')];};};Realtime[_0xbb10('0x16')][_0xbb10('0x1b')]=function(){var _0xbf2906=this;return function(_0xe1c665){if(_0xe1c665){freeIsNotKey(_0xe1c665,_0xbf2906['intervals'],'id');for(var _0x5ff0cf=0x0,_0x19f48d={},_0x388fab={};_0x5ff0cf<_0xe1c665[_0xbb10('0x1c')];_0x5ff0cf+=0x1){_0x19f48d=_0xe1c665[_0x5ff0cf];if(_[_0xbb10('0x1a')](_0xbf2906[_0xbb10('0xa')][_0x19f48d['id']])){_0xbf2906['intervals'][_0x19f48d['id']]=new Interval(_0x19f48d);}else{_0xbf2906[_0xbb10('0x17')](_0xbf2906[_0xbb10('0xa')][_0x19f48d['id']],_0x19f48d);}}}return _0xbf2906['intervals'];};};Realtime['prototype'][_0xbb10('0x1d')]=function(){var _0x311abe=this;return function(_0x2e911d){if(_0x2e911d){freeIsNotKey(_0x2e911d,_0x311abe[_0xbb10('0xb')],'id');for(var _0x445761=0x0,_0x1824b7={},_0x407cb4={};_0x445761<_0x2e911d[_0xbb10('0x1c')];_0x445761+=0x1){_0x1824b7=_0x2e911d[_0x445761];if(_[_0xbb10('0x1a')](_0x311abe[_0xbb10('0xb')][_0x1824b7['id']])){_0x311abe[_0xbb10('0xb')][_0x1824b7['id']]=new OpenchannelQueue(_0x1824b7);}else{_0x311abe[_0xbb10('0x17')](_0x311abe['openchannelQueues'][_0x1824b7['id']],_0x1824b7);}_0x311abe['openchannelQueues'][_0x1824b7['id']]['updateRouting']();_0x311abe[_0xbb10('0xb')][_0x1824b7['id']][_0xbb10('0x1e')]();}}return _0x311abe[_0xbb10('0xb')];};};Realtime['prototype'][_0xbb10('0x1f')]=function(){var _0x24d586=this;return function(_0x6ed43b){if(_0x6ed43b){freeIsNotKey(_0x6ed43b,_0x24d586[_0xbb10('0x20')],'id');for(var _0x1acce9=0x0,_0x20d946={},_0x2a0e8b={};_0x1acce9<_0x6ed43b['length'];_0x1acce9+=0x1){_0x20d946=_0x6ed43b[_0x1acce9];if(_[_0xbb10('0x1a')](_0x24d586[_0xbb10('0x20')][_0x20d946['id']])){_0x24d586[_0xbb10('0x20')][_0x20d946['id']]=new ChatQueue(_0x20d946);}else{_0x24d586[_0xbb10('0x17')](_0x24d586[_0xbb10('0x20')][_0x20d946['id']],_0x20d946);}_0x24d586[_0xbb10('0x20')][_0x20d946['id']]['updateRouting']();_0x24d586[_0xbb10('0x20')][_0x20d946['id']]['updateRealtime']();}}return _0x24d586[_0xbb10('0x20')];};};Realtime['prototype'][_0xbb10('0x21')]=function(){var _0x1dcc9c=this;return function(_0x1b59f9){if(_0x1b59f9){freeIsNotKey(_0x1b59f9,_0x1dcc9c['smsQueues'],'id');for(var _0x518d47=0x0,_0x4c3744={},_0x34f65e={};_0x518d47<_0x1b59f9['length'];_0x518d47+=0x1){_0x4c3744=_0x1b59f9[_0x518d47];if(_[_0xbb10('0x1a')](_0x1dcc9c[_0xbb10('0xc')][_0x4c3744['id']])){_0x1dcc9c[_0xbb10('0xc')][_0x4c3744['id']]=new SmsQueue(_0x4c3744);}else{_0x1dcc9c[_0xbb10('0x17')](_0x1dcc9c[_0xbb10('0xc')][_0x4c3744['id']],_0x4c3744);}_0x1dcc9c[_0xbb10('0xc')][_0x4c3744['id']][_0xbb10('0x22')]();_0x1dcc9c['smsQueues'][_0x4c3744['id']][_0xbb10('0x1e')]();}}return _0x1dcc9c[_0xbb10('0xc')];};};Realtime[_0xbb10('0x16')][_0xbb10('0x23')]=function(){var _0xfb2c5e=this;return function(_0x9de708){if(_0x9de708){freeIsNotKey(_0x9de708,_0xfb2c5e[_0xbb10('0xd')],'id');for(var _0x10202c=0x0,_0x3c8d7d={},_0x56943c={};_0x10202c<_0x9de708[_0xbb10('0x1c')];_0x10202c+=0x1){_0x3c8d7d=_0x9de708[_0x10202c];if(_[_0xbb10('0x1a')](_0xfb2c5e[_0xbb10('0xd')][_0x3c8d7d['id']])){_0xfb2c5e[_0xbb10('0xd')][_0x3c8d7d['id']]=new MailQueue(_0x3c8d7d);}else{_0xfb2c5e['mergeFromDatabase'](_0xfb2c5e[_0xbb10('0xd')][_0x3c8d7d['id']],_0x3c8d7d);}_0xfb2c5e['mailQueues'][_0x3c8d7d['id']]['updateRouting']();_0xfb2c5e[_0xbb10('0xd')][_0x3c8d7d['id']][_0xbb10('0x1e')]();}}return _0xfb2c5e[_0xbb10('0xd')];};};Realtime[_0xbb10('0x16')][_0xbb10('0x24')]=function(){var _0x29d11a=this;return function(_0x547062){if(_0x547062){freeIsNotKey(_0x547062,_0x29d11a[_0xbb10('0xe')],'id');for(var _0x25d72f=0x0,_0x52de31={},_0x5e3fbd={};_0x25d72f<_0x547062['length'];_0x25d72f+=0x1){_0x52de31=_0x547062[_0x25d72f];if(_[_0xbb10('0x1a')](_0x29d11a[_0xbb10('0xe')][_0x52de31['id']])){_0x29d11a[_0xbb10('0xe')][_0x52de31['id']]=new FaxQueue(_0x52de31);}else{_0x29d11a['mergeFromDatabase'](_0x29d11a[_0xbb10('0xe')][_0x52de31['id']],_0x52de31);}_0x29d11a[_0xbb10('0xe')][_0x52de31['id']][_0xbb10('0x22')]();_0x29d11a['faxQueues'][_0x52de31['id']][_0xbb10('0x1e')]();}}return _0x29d11a[_0xbb10('0xe')];};};Realtime[_0xbb10('0x16')][_0xbb10('0x25')]=function(){var _0x4f1cdd=this;return function(_0xd238e9){if(_0xd238e9){freeIsNotKey(_0xd238e9,_0x4f1cdd[_0xbb10('0xf')],'id');for(var _0x5835fd=0x0,_0xe2040f={},_0x2e3214={};_0x5835fd<_0xd238e9[_0xbb10('0x1c')];_0x5835fd+=0x1){_0xe2040f=_0xd238e9[_0x5835fd];if(_[_0xbb10('0x1a')](_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']])){_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']]=new WhatsappQueue(_0xe2040f);}else{_0x4f1cdd['mergeFromDatabase'](_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']],_0xe2040f);}_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']][_0xbb10('0x22')]();_0x4f1cdd[_0xbb10('0xf')][_0xe2040f['id']]['updateRealtime']();}}return _0x4f1cdd[_0xbb10('0xf')];};};module[_0xbb10('0x26')]=Realtime;
\ No newline at end of file
index 5917eb4..84bf1f7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa30d=['Request','AddTagsToChatInteraction','addTagsToChatInteraction','../client','update','UpdateChatInteraction','updateChatInteraction'];(function(_0x20e52b,_0x5400bf){var _0x2a0e75=function(_0x1b6a85){while(--_0x1b6a85){_0x20e52b['push'](_0x20e52b['shift']());}};_0x2a0e75(++_0x5400bf);}(_0xa30d,0x11b));var _0xda30=function(_0x459a1e,_0x318fc9){_0x459a1e=_0x459a1e-0x0;var _0x2086cc=_0xa30d[_0x459a1e];return _0x2086cc;};'use strict';var client=require(_0xda30('0x0'));exports[_0xda30('0x1')]=function(_0x1eafac,_0x54f31e){return client['Request'](_0xda30('0x2'),{'body':_0x54f31e,'options':{'where':{'id':_0x1eafac}},'log':_0xda30('0x3')});};exports['addTags']=function(_0x2c5553,_0x1c3e98){return client[_0xda30('0x4')](_0xda30('0x5'),{'body':_0x1c3e98,'options':{'where':{'id':_0x2c5553}},'log':_0xda30('0x6')});};
\ No newline at end of file
+var _0x27d9=['update','Request','UpdateChatInteraction','addTags','../client'];(function(_0x2ab324,_0x49fbac){var _0x427c10=function(_0x4674c2){while(--_0x4674c2){_0x2ab324['push'](_0x2ab324['shift']());}};_0x427c10(++_0x49fbac);}(_0x27d9,0xc7));var _0x927d=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x27d9[_0x14add3];return _0x4a174f;};'use strict';var client=require(_0x927d('0x0'));exports[_0x927d('0x1')]=function(_0x1a5f43,_0x78ac9a){return client[_0x927d('0x2')](_0x927d('0x3'),{'body':_0x78ac9a,'options':{'where':{'id':_0x1a5f43}},'log':'updateChatInteraction'});};exports[_0x927d('0x4')]=function(_0x220b5c,_0x206cb7){return client[_0x927d('0x2')]('AddTagsToChatInteraction',{'body':_0x206cb7,'options':{'where':{'id':_0x220b5c}},'log':'addTagsToChatInteraction'});};
\ No newline at end of file
index 694ca9e..86702e5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1f71=['CreateChatMessage','createChatMessage','../client','Request'];(function(_0x405fe8,_0xa55e2f){var _0x50e490=function(_0x566869){while(--_0x566869){_0x405fe8['push'](_0x405fe8['shift']());}};_0x50e490(++_0xa55e2f);}(_0x1f71,0x11e));var _0x11f7=function(_0x58a8a7,_0x4deb0a){_0x58a8a7=_0x58a8a7-0x0;var _0x48345f=_0x1f71[_0x58a8a7];return _0x48345f;};'use strict';var client=require(_0x11f7('0x0'));exports['create']=function(_0x2f939b){return client[_0x11f7('0x1')](_0x11f7('0x2'),{'body':_0x2f939b,'log':_0x11f7('0x3')});};
\ No newline at end of file
+var _0x942c=['createChatMessage','CreateChatMessage'];(function(_0x44bcb0,_0x235aa9){var _0xfaf881=function(_0x25d81d){while(--_0x25d81d){_0x44bcb0['push'](_0x44bcb0['shift']());}};_0xfaf881(++_0x235aa9);}(_0x942c,0xa3));var _0xc942=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x942c[_0x14add3];return _0x4a174f;};'use strict';var client=require('../client');exports['create']=function(_0x536c2d){return client['Request'](_0xc942('0x0'),{'body':_0x536c2d,'log':_0xc942('0x1')});};
\ No newline at end of file
index f79eded..ed60a95 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeb79=['Agents','online','chatPause','Request','name','strategy'];(function(_0x54dc88,_0x3e0d12){var _0x552e41=function(_0x49f520){while(--_0x49f520){_0x54dc88['push'](_0x54dc88['shift']());}};_0x552e41(++_0x3e0d12);}(_0xeb79,0x87));var _0x9eb7=function(_0x295c5a,_0x154dad){_0x295c5a=_0x295c5a-0x0;var _0x334e9a=_0xeb79[_0x295c5a];return _0x334e9a;};'use strict';var client=require('../client');exports['getChatQueues']=function(){return function(){return client[_0x9eb7('0x0')]('GetChatQueue',{'options':{'raw':![],'attributes':['id',_0x9eb7('0x1'),'timeout',_0x9eb7('0x2')],'include':[{'model':'User','as':_0x9eb7('0x3'),'attributes':['id',_0x9eb7('0x1'),_0x9eb7('0x4'),_0x9eb7('0x5')]}]},'log':'getChatQueues'});};};
\ No newline at end of file
+var _0x9b67=['User','online','chatPause','../client','getChatQueues','Request','GetChatQueue','name','strategy'];(function(_0x387777,_0x356171){var _0x3f84c0=function(_0x4d4423){while(--_0x4d4423){_0x387777['push'](_0x387777['shift']());}};_0x3f84c0(++_0x356171);}(_0x9b67,0xf6));var _0x79b6=function(_0x44a6c9,_0x3ec0c1){_0x44a6c9=_0x44a6c9-0x0;var _0x5b683a=_0x9b67[_0x44a6c9];return _0x5b683a;};'use strict';var client=require(_0x79b6('0x0'));exports[_0x79b6('0x1')]=function(){return function(){return client[_0x79b6('0x2')](_0x79b6('0x3'),{'options':{'raw':![],'attributes':['id',_0x79b6('0x4'),'timeout',_0x79b6('0x5')],'include':[{'model':_0x79b6('0x6'),'as':'Agents','attributes':['id','name',_0x79b6('0x7'),_0x79b6('0x8')]}]},'log':_0x79b6('0x1')});};};
\ No newline at end of file
index 252a5c8..96ecab2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaf5a=['Request','CreateChatQueueReport','update','UpdateChatQueueReport','create'];(function(_0x2e4f96,_0x3f7d0c){var _0x548233=function(_0x213183){while(--_0x213183){_0x2e4f96['push'](_0x2e4f96['shift']());}};_0x548233(++_0x3f7d0c);}(_0xaf5a,0x144));var _0xaaf5=function(_0x2bf31e,_0x3d5db7){_0x2bf31e=_0x2bf31e-0x0;var _0x528176=_0xaf5a[_0x2bf31e];return _0x528176;};'use strict';var client=require('../client');exports[_0xaaf5('0x0')]=function(_0x4f294c){return client[_0xaaf5('0x1')](_0xaaf5('0x2'),{'body':_0x4f294c,'log':_0xaaf5('0x2')});};exports[_0xaaf5('0x3')]=function(_0x337a3,_0x277e58){return client[_0xaaf5('0x1')](_0xaaf5('0x4'),{'body':_0x277e58,'options':{'where':{'uniqueid':_0x337a3},'order':[['id','DESC']],'limit':0x1},'log':_0xaaf5('0x4')});};
\ No newline at end of file
+var _0x5c4a=['DESC','create','CreateChatQueueReport','Request','UpdateChatQueueReport'];(function(_0x4bcb3c,_0x192122){var _0xfe09bb=function(_0xcd8ad2){while(--_0xcd8ad2){_0x4bcb3c['push'](_0x4bcb3c['shift']());}};_0xfe09bb(++_0x192122);}(_0x5c4a,0xfb));var _0xa5c4=function(_0x579fc8,_0x7b1920){_0x579fc8=_0x579fc8-0x0;var _0x5659b7=_0x5c4a[_0x579fc8];return _0x5659b7;};'use strict';var client=require('../client');exports[_0xa5c4('0x0')]=function(_0x1ba095){return client['Request'](_0xa5c4('0x1'),{'body':_0x1ba095,'log':_0xa5c4('0x1')});};exports['update']=function(_0x7411a4,_0x180239){return client[_0xa5c4('0x2')](_0xa5c4('0x3'),{'body':_0x180239,'options':{'where':{'uniqueid':_0x7411a4},'order':[['id',_0xa5c4('0x4')]],'limit':0x1},'log':'UpdateChatQueueReport'});};
\ No newline at end of file
index 538f36a..5a86657 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a54=['Request','UpdateFaxInteraction','addTags','AddTagsToFaxInteraction','../client','update'];(function(_0x4243a3,_0x447337){var _0x1b2a33=function(_0x6a8200){while(--_0x6a8200){_0x4243a3['push'](_0x4243a3['shift']());}};_0x1b2a33(++_0x447337);}(_0x7a54,0x106));var _0x47a5=function(_0x293dfe,_0x48de0c){_0x293dfe=_0x293dfe-0x0;var _0x451f5c=_0x7a54[_0x293dfe];return _0x451f5c;};'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 _0x7a54=['Request','UpdateFaxInteraction','addTags','AddTagsToFaxInteraction','../client','update'];(function(_0x50cd41,_0x4874a7){var _0x399475=function(_0x1946da){while(--_0x1946da){_0x50cd41['push'](_0x50cd41['shift']());}};_0x399475(++_0x4874a7);}(_0x7a54,0x106));var _0x47a5=function(_0x3222b0,_0x2f4ce8){_0x3222b0=_0x3222b0-0x0;var _0x55e031=_0x7a54[_0x3222b0];return _0x55e031;};'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
index e1aae59..53e1c87 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe6f6=['create','CreateFaxMessage','createFaxMessage'];(function(_0xd4edf8,_0x3b7119){var _0x157cc3=function(_0x545323){while(--_0x545323){_0xd4edf8['push'](_0xd4edf8['shift']());}};_0x157cc3(++_0x3b7119);}(_0xe6f6,0x1e0));var _0x6e6f=function(_0x36bf41,_0x1312be){_0x36bf41=_0x36bf41-0x0;var _0x4ccc22=_0xe6f6[_0x36bf41];return _0x4ccc22;};'use strict';var client=require('../client');exports[_0x6e6f('0x0')]=function(_0x46ac9d){return client['Request'](_0x6e6f('0x1'),{'body':_0x46ac9d,'log':_0x6e6f('0x2')});};
\ No newline at end of file
+var _0x80b7=['CreateFaxMessage','../client','Request'];(function(_0x17b287,_0x4bed1c){var _0x177054=function(_0x380f78){while(--_0x380f78){_0x17b287['push'](_0x17b287['shift']());}};_0x177054(++_0x4bed1c);}(_0x80b7,0x76));var _0x780b=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x80b7[_0x3dd15e];return _0x231fd0;};'use strict';var client=require(_0x780b('0x0'));exports['create']=function(_0x3e34dc){return client[_0x780b('0x1')](_0x780b('0x2'),{'body':_0x3e34dc,'log':'createFaxMessage'});};
\ No newline at end of file
index 2cb21c6..2fb447a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x837c=['Request','name','timeout','strategy','Agents','online','../client','getFaxQueues'];(function(_0x51a473,_0x46b2c8){var _0x1ae37a=function(_0x1a5219){while(--_0x1a5219){_0x51a473['push'](_0x51a473['shift']());}};_0x1ae37a(++_0x46b2c8);}(_0x837c,0xe6));var _0xc837=function(_0x15c8ba,_0x2dbea5){_0x15c8ba=_0x15c8ba-0x0;var _0x311b51=_0x837c[_0x15c8ba];return _0x311b51;};'use strict';var client=require(_0xc837('0x0'));exports[_0xc837('0x1')]=function(){return function(){return client[_0xc837('0x2')]('GetFaxQueue',{'options':{'raw':![],'attributes':['id',_0xc837('0x3'),_0xc837('0x4'),_0xc837('0x5')],'include':[{'model':'User','as':_0xc837('0x6'),'attributes':['id',_0xc837('0x3'),_0xc837('0x7'),'faxPause']}]},'log':_0xc837('0x1')});};};
\ No newline at end of file
+var _0x16a2=['Request','timeout','strategy','User','Agents','faxPause','getFaxQueues'];(function(_0x447449,_0x28dbe){var _0x396949=function(_0x4e4ce2){while(--_0x4e4ce2){_0x447449['push'](_0x447449['shift']());}};_0x396949(++_0x28dbe);}(_0x16a2,0x16b));var _0x216a=function(_0x39e164,_0x2cb93b){_0x39e164=_0x39e164-0x0;var _0x13fa6b=_0x16a2[_0x39e164];return _0x13fa6b;};'use strict';var client=require('../client');exports[_0x216a('0x0')]=function(){return function(){return client[_0x216a('0x1')]('GetFaxQueue',{'options':{'raw':![],'attributes':['id','name',_0x216a('0x2'),_0x216a('0x3')],'include':[{'model':_0x216a('0x4'),'as':_0x216a('0x5'),'attributes':['id','name','online',_0x216a('0x6')]}]},'log':_0x216a('0x0')});};};
\ No newline at end of file
index 7a42f73..d0f04b9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7379=['CreateFaxQueueReport','update','UpdateFaxQueueReport','DESC','../client','create','Request'];(function(_0x110ea4,_0x13786f){var _0x1fb518=function(_0x365a67){while(--_0x365a67){_0x110ea4['push'](_0x110ea4['shift']());}};_0x1fb518(++_0x13786f);}(_0x7379,0x14d));var _0x9737=function(_0x1007d3,_0x17ddaf){_0x1007d3=_0x1007d3-0x0;var _0xa1c123=_0x7379[_0x1007d3];return _0xa1c123;};'use strict';var client=require(_0x9737('0x0'));exports[_0x9737('0x1')]=function(_0xe9841a){return client[_0x9737('0x2')](_0x9737('0x3'),{'body':_0xe9841a,'log':_0x9737('0x3')});};exports[_0x9737('0x4')]=function(_0x35a660,_0x243e62){return client['Request'](_0x9737('0x5'),{'body':_0x243e62,'options':{'where':{'uniqueid':_0x35a660},'order':[['id',_0x9737('0x6')]],'limit':0x1},'log':'UpdateFaxQueueReport'});};
\ No newline at end of file
+var _0x0b48=['update','UpdateFaxQueueReport','DESC','../client','create','Request','CreateFaxQueueReport'];(function(_0xdd2348,_0x5d3232){var _0x2e0a02=function(_0x38e687){while(--_0x38e687){_0xdd2348['push'](_0xdd2348['shift']());}};_0x2e0a02(++_0x5d3232);}(_0x0b48,0xf1));var _0x80b4=function(_0xdf676b,_0x53983b){_0xdf676b=_0xdf676b-0x0;var _0xb17295=_0x0b48[_0xdf676b];return _0xb17295;};'use strict';var client=require(_0x80b4('0x0'));exports[_0x80b4('0x1')]=function(_0x5a68e6){return client[_0x80b4('0x2')]('CreateFaxQueueReport',{'body':_0x5a68e6,'log':_0x80b4('0x3')});};exports[_0x80b4('0x4')]=function(_0x5700d9,_0x11df5e){return client[_0x80b4('0x2')](_0x80b4('0x5'),{'body':_0x11df5e,'options':{'where':{'uniqueid':_0x5700d9},'order':[['id',_0x80b4('0x6')]],'limit':0x1},'log':_0x80b4('0x5')});};
\ No newline at end of file
index 54d0fb7..5df1168 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4ad2=['GetInterval','name','Intervals','interval','../client','getIntervals'];(function(_0x4ac72c,_0x567883){var _0x26b32f=function(_0x883daf){while(--_0x883daf){_0x4ac72c['push'](_0x4ac72c['shift']());}};_0x26b32f(++_0x567883);}(_0x4ad2,0x16c));var _0x24ad=function(_0x53053e,_0x1b4ee2){_0x53053e=_0x53053e-0x0;var _0x46a4ec=_0x4ad2[_0x53053e];return _0x46a4ec;};'use strict';var client=require(_0x24ad('0x0'));exports[_0x24ad('0x1')]=function(){return function(){return client['Request'](_0x24ad('0x2'),{'options':{'raw':![],'where':{'IntervalId':null},'attributes':['id',_0x24ad('0x3')],'include':[{'model':'Interval','as':_0x24ad('0x4'),'attributes':['id',_0x24ad('0x3'),_0x24ad('0x5')]}]},'log':_0x24ad('0x1')});};};
\ No newline at end of file
+var _0x0368=['getIntervals','GetInterval','name','Interval','Intervals','interval'];(function(_0x4580cb,_0x3c03b0){var _0xc8b474=function(_0x347c92){while(--_0x347c92){_0x4580cb['push'](_0x4580cb['shift']());}};_0xc8b474(++_0x3c03b0);}(_0x0368,0x97));var _0x8036=function(_0xd3bc07,_0x3a11a5){_0xd3bc07=_0xd3bc07-0x0;var _0x10aa85=_0x0368[_0xd3bc07];return _0x10aa85;};'use strict';var client=require('../client');exports['getIntervals']=function(){return function(){return client['Request'](_0x8036('0x0'),{'options':{'raw':![],'where':{'IntervalId':null},'attributes':['id',_0x8036('0x1')],'include':[{'model':_0x8036('0x2'),'as':_0x8036('0x3'),'attributes':['id','name',_0x8036('0x4')]}]},'log':_0x8036('0x5')});};};
\ No newline at end of file
index 3906a9a..bcddb84 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x77e6=['addTags','addTagsToChatInteraction','../client','update','Request','UpdateMailInteraction','updateMailInteraction'];(function(_0x24afd3,_0xcc36f0){var _0xffe96f=function(_0x4f9cb0){while(--_0x4f9cb0){_0x24afd3['push'](_0x24afd3['shift']());}};_0xffe96f(++_0xcc36f0);}(_0x77e6,0x1a6));var _0x677e=function(_0x49fbf2,_0x45cee1){_0x49fbf2=_0x49fbf2-0x0;var _0x499051=_0x77e6[_0x49fbf2];return _0x499051;};'use strict';var client=require(_0x677e('0x0'));exports[_0x677e('0x1')]=function(_0x3855c7,_0xa48f0c){return client[_0x677e('0x2')](_0x677e('0x3'),{'body':_0xa48f0c,'options':{'where':{'id':_0x3855c7}},'log':_0x677e('0x4')});};exports[_0x677e('0x5')]=function(_0x50231c,_0x2f0307){return client[_0x677e('0x2')]('AddTagsToMailInteraction',{'body':_0x2f0307,'options':{'where':{'id':_0x50231c}},'log':_0x677e('0x6')});};
\ No newline at end of file
+var _0x5b12=['addTagsToChatInteraction','../client','update','Request','updateMailInteraction','addTags'];(function(_0x20efd7,_0x59dee7){var _0x54ca1a=function(_0x2ab69f){while(--_0x2ab69f){_0x20efd7['push'](_0x20efd7['shift']());}};_0x54ca1a(++_0x59dee7);}(_0x5b12,0xa3));var _0x25b1=function(_0x43ab9f,_0x1064d6){_0x43ab9f=_0x43ab9f-0x0;var _0x484a87=_0x5b12[_0x43ab9f];return _0x484a87;};'use strict';var client=require(_0x25b1('0x0'));exports[_0x25b1('0x1')]=function(_0x1fe5c1,_0x569948){return client[_0x25b1('0x2')]('UpdateMailInteraction',{'body':_0x569948,'options':{'where':{'id':_0x1fe5c1}},'log':_0x25b1('0x3')});};exports[_0x25b1('0x4')]=function(_0x47995b,_0x31f3fc){return client['Request']('AddTagsToMailInteraction',{'body':_0x31f3fc,'options':{'where':{'id':_0x47995b}},'log':_0x25b1('0x5')});};
\ No newline at end of file
index 8ca186e..a1b40d1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x444d=['create','Request','createMailMessage'];(function(_0x25a33f,_0x47e52f){var _0x1487cc=function(_0x81f888){while(--_0x81f888){_0x25a33f['push'](_0x25a33f['shift']());}};_0x1487cc(++_0x47e52f);}(_0x444d,0xc3));var _0xd444=function(_0x2e9280,_0x44d032){_0x2e9280=_0x2e9280-0x0;var _0x17f9e5=_0x444d[_0x2e9280];return _0x17f9e5;};'use strict';var client=require('../client');exports[_0xd444('0x0')]=function(_0x1dcfbe){return client[_0xd444('0x1')]('CreateMailMessage',{'body':_0x1dcfbe,'log':_0xd444('0x2')});};
\ No newline at end of file
+var _0x6895=['create','Request','../client'];(function(_0x33965c,_0x22eb56){var _0x2e30df=function(_0x41bc83){while(--_0x41bc83){_0x33965c['push'](_0x33965c['shift']());}};_0x2e30df(++_0x22eb56);}(_0x6895,0x18b));var _0x5689=function(_0x2db33a,_0x28dfae){_0x2db33a=_0x2db33a-0x0;var _0x5a9d56=_0x6895[_0x2db33a];return _0x5a9d56;};'use strict';var client=require(_0x5689('0x0'));exports[_0x5689('0x1')]=function(_0x46006a){return client[_0x5689('0x2')]('CreateMailMessage',{'body':_0x46006a,'log':'createMailMessage'});};
\ No newline at end of file
index 46bab2b..cc81fa7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x580b=['online','mailPause','../client','Request','name','timeout','User'];(function(_0x4b7700,_0xcd5128){var _0x3a5fa8=function(_0x69fff9){while(--_0x69fff9){_0x4b7700['push'](_0x4b7700['shift']());}};_0x3a5fa8(++_0xcd5128);}(_0x580b,0xf0));var _0xb580=function(_0x198c43,_0x24a259){_0x198c43=_0x198c43-0x0;var _0x57ad65=_0x580b[_0x198c43];return _0x57ad65;};'use strict';var client=require(_0xb580('0x0'));exports['getMailQueues']=function(){return function(){return client[_0xb580('0x1')]('GetMailQueue',{'options':{'raw':![],'attributes':['id',_0xb580('0x2'),_0xb580('0x3'),'strategy'],'include':[{'model':_0xb580('0x4'),'as':'Agents','attributes':['id',_0xb580('0x2'),_0xb580('0x5'),_0xb580('0x6')]}]},'log':'getMailQueues'});};};
\ No newline at end of file
+var _0x2028=['strategy','mailPause','getMailQueues','Request','name'];(function(_0x1db98b,_0x1cfc2c){var _0x2ce3b1=function(_0x1fc356){while(--_0x1fc356){_0x1db98b['push'](_0x1db98b['shift']());}};_0x2ce3b1(++_0x1cfc2c);}(_0x2028,0x101));var _0x8202=function(_0x23882b,_0x41dc12){_0x23882b=_0x23882b-0x0;var _0x464f5a=_0x2028[_0x23882b];return _0x464f5a;};'use strict';var client=require('../client');exports[_0x8202('0x0')]=function(){return function(){return client[_0x8202('0x1')]('GetMailQueue',{'options':{'raw':![],'attributes':['id',_0x8202('0x2'),'timeout',_0x8202('0x3')],'include':[{'model':'User','as':'Agents','attributes':['id','name','online',_0x8202('0x4')]}]},'log':'getMailQueues'});};};
\ No newline at end of file
index 4d8edbb..2fdb8a8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3ebb=['../client','Request','CreateMailQueueReport','update','UpdateMailQueueReport','DESC'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x3ebb,0x150));var _0xb3eb=function(_0x4bf2fd,_0x17917e){_0x4bf2fd=_0x4bf2fd-0x0;var _0x168836=_0x3ebb[_0x4bf2fd];return _0x168836;};'use strict';var client=require(_0xb3eb('0x0'));exports['create']=function(_0x3b8eb8){return client[_0xb3eb('0x1')](_0xb3eb('0x2'),{'body':_0x3b8eb8,'log':_0xb3eb('0x2')});};exports[_0xb3eb('0x3')]=function(_0xc18383,_0x29df4d){return client[_0xb3eb('0x1')](_0xb3eb('0x4'),{'body':_0x29df4d,'options':{'where':{'uniqueid':_0xc18383},'order':[['id',_0xb3eb('0x5')]],'limit':0x1},'log':_0xb3eb('0x4')});};
\ No newline at end of file
+var _0x9471=['Request','CreateMailQueueReport','update','DESC','../client','create'];(function(_0x1269d1,_0x156a3a){var _0x55786c=function(_0x56c40a){while(--_0x56c40a){_0x1269d1['push'](_0x1269d1['shift']());}};_0x55786c(++_0x156a3a);}(_0x9471,0x6a));var _0x1947=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x9471[_0x3dd15e];return _0x231fd0;};'use strict';var client=require(_0x1947('0x0'));exports[_0x1947('0x1')]=function(_0x217560){return client[_0x1947('0x2')](_0x1947('0x3'),{'body':_0x217560,'log':'CreateMailQueueReport'});};exports[_0x1947('0x4')]=function(_0x5dfe5b,_0x30c3a5){return client[_0x1947('0x2')]('UpdateMailQueueReport',{'body':_0x30c3a5,'options':{'where':{'uniqueid':_0x5dfe5b},'order':[['id',_0x1947('0x5')]],'limit':0x1},'log':'UpdateMailQueueReport'});};
\ No newline at end of file
index 0783d3e..54f2db5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1657=['AddTagsToOpenchannelInteraction','../client','update','Request','UpdateOpenchannelInteraction','addTags'];(function(_0x21b514,_0x357214){var _0x1e38b0=function(_0x106f62){while(--_0x106f62){_0x21b514['push'](_0x21b514['shift']());}};_0x1e38b0(++_0x357214);}(_0x1657,0x1ed));var _0x7165=function(_0x4ab2da,_0x1c01a7){_0x4ab2da=_0x4ab2da-0x0;var _0x70f4d=_0x1657[_0x4ab2da];return _0x70f4d;};'use strict';var client=require(_0x7165('0x0'));exports[_0x7165('0x1')]=function(_0x5a669e,_0xcd9193){return client[_0x7165('0x2')](_0x7165('0x3'),{'body':_0xcd9193,'options':{'where':{'id':_0x5a669e}},'log':'updateOpenchannelInteraction'});};exports[_0x7165('0x4')]=function(_0x1e3606,_0x3ae2b7){return client[_0x7165('0x2')](_0x7165('0x5'),{'body':_0x3ae2b7,'options':{'where':{'id':_0x1e3606}},'log':'addTagsToChatInteraction'});};
\ No newline at end of file
+var _0xc1d9=['AddTagsToOpenchannelInteraction','addTagsToChatInteraction','../client','Request','updateOpenchannelInteraction'];(function(_0x25d834,_0x2d443b){var _0xb6572d=function(_0xd22e22){while(--_0xd22e22){_0x25d834['push'](_0x25d834['shift']());}};_0xb6572d(++_0x2d443b);}(_0xc1d9,0x1b5));var _0x9c1d=function(_0x6dd1c7,_0x3d54c5){_0x6dd1c7=_0x6dd1c7-0x0;var _0x2ade1a=_0xc1d9[_0x6dd1c7];return _0x2ade1a;};'use strict';var client=require(_0x9c1d('0x0'));exports['update']=function(_0x814a2f,_0x5bdff2){return client[_0x9c1d('0x1')]('UpdateOpenchannelInteraction',{'body':_0x5bdff2,'options':{'where':{'id':_0x814a2f}},'log':_0x9c1d('0x2')});};exports['addTags']=function(_0x642fe3,_0x5c3dfd){return client['Request'](_0x9c1d('0x3'),{'body':_0x5c3dfd,'options':{'where':{'id':_0x642fe3}},'log':_0x9c1d('0x4')});};
\ No newline at end of file
index fc54150..ca7be39 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x95ba=['../client','create','Request','CreateOpenchannelMessage','createOpenchannelMessage'];(function(_0x12ee67,_0x19647d){var _0x212f91=function(_0x3a27c5){while(--_0x3a27c5){_0x12ee67['push'](_0x12ee67['shift']());}};_0x212f91(++_0x19647d);}(_0x95ba,0x168));var _0xa95b=function(_0x37cfb5,_0x1563fc){_0x37cfb5=_0x37cfb5-0x0;var _0x4d60e3=_0x95ba[_0x37cfb5];return _0x4d60e3;};'use strict';var client=require(_0xa95b('0x0'));exports[_0xa95b('0x1')]=function(_0x88c1d6){return client[_0xa95b('0x2')](_0xa95b('0x3'),{'body':_0x88c1d6,'log':_0xa95b('0x4')});};
\ No newline at end of file
+var _0x0d1e=['createOpenchannelMessage','../client','create','Request','CreateOpenchannelMessage'];(function(_0x8b3fb7,_0x4d379f){var _0x16a6c5=function(_0x3aa21d){while(--_0x3aa21d){_0x8b3fb7['push'](_0x8b3fb7['shift']());}};_0x16a6c5(++_0x4d379f);}(_0x0d1e,0x1cd));var _0xe0d1=function(_0x1c2a65,_0x4450f2){_0x1c2a65=_0x1c2a65-0x0;var _0x9b7e31=_0x0d1e[_0x1c2a65];return _0x9b7e31;};'use strict';var client=require(_0xe0d1('0x0'));exports[_0xe0d1('0x1')]=function(_0xcf86a0){return client[_0xe0d1('0x2')](_0xe0d1('0x3'),{'body':_0xcf86a0,'log':_0xe0d1('0x4')});};
\ No newline at end of file
index b6736c4..323a07a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1a20=['strategy','User','openchannelPause','getOpenchannelQueues','Request','GetOpenchannelQueue','name','timeout'];(function(_0x222688,_0x46c5eb){var _0x437433=function(_0x29958c){while(--_0x29958c){_0x222688['push'](_0x222688['shift']());}};_0x437433(++_0x46c5eb);}(_0x1a20,0x14b));var _0x01a2=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x1a20[_0x14add3];return _0x4a174f;};'use strict';var client=require('../client');exports[_0x01a2('0x0')]=function(){return function(){return client[_0x01a2('0x1')](_0x01a2('0x2'),{'options':{'raw':![],'attributes':['id',_0x01a2('0x3'),_0x01a2('0x4'),_0x01a2('0x5')],'include':[{'model':_0x01a2('0x6'),'as':'Agents','attributes':['id','name','online',_0x01a2('0x7')]}]},'log':_0x01a2('0x0')});};};
\ No newline at end of file
+var _0x1069=['getOpenchannelQueues','Request','GetOpenchannelQueue','name','timeout','strategy','User','Agents','online','openchannelPause'];(function(_0x118458,_0x5005de){var _0x3c824a=function(_0x4ea75c){while(--_0x4ea75c){_0x118458['push'](_0x118458['shift']());}};_0x3c824a(++_0x5005de);}(_0x1069,0x1ea));var _0x9106=function(_0x4b88b9,_0x293ced){_0x4b88b9=_0x4b88b9-0x0;var _0x2ab40f=_0x1069[_0x4b88b9];return _0x2ab40f;};'use strict';var client=require('../client');exports[_0x9106('0x0')]=function(){return function(){return client[_0x9106('0x1')](_0x9106('0x2'),{'options':{'raw':![],'attributes':['id',_0x9106('0x3'),_0x9106('0x4'),_0x9106('0x5')],'include':[{'model':_0x9106('0x6'),'as':_0x9106('0x7'),'attributes':['id',_0x9106('0x3'),_0x9106('0x8'),_0x9106('0x9')]}]},'log':_0x9106('0x0')});};};
\ No newline at end of file
index 9290349..839ed24 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc302=['update','UpdateOpenchannelQueueReport','../client','Request','CreateOpenchannelQueueReport'];(function(_0x14ba26,_0x34176b){var _0x588bb3=function(_0x202cce){while(--_0x202cce){_0x14ba26['push'](_0x14ba26['shift']());}};_0x588bb3(++_0x34176b);}(_0xc302,0x17e));var _0x2c30=function(_0x4a1fc1,_0x3ebee0){_0x4a1fc1=_0x4a1fc1-0x0;var _0x3b35de=_0xc302[_0x4a1fc1];return _0x3b35de;};'use strict';var client=require(_0x2c30('0x0'));exports['create']=function(_0x524403){return client[_0x2c30('0x1')]('CreateOpenchannelQueueReport',{'body':_0x524403,'log':_0x2c30('0x2')});};exports[_0x2c30('0x3')]=function(_0x3ec7b4,_0x1f5df7){return client['Request'](_0x2c30('0x4'),{'body':_0x1f5df7,'options':{'where':{'uniqueid':_0x3ec7b4},'order':[['id','DESC']],'limit':0x1},'log':'UpdateOpenchannelQueueReport'});};
\ No newline at end of file
+var _0xf993=['DESC','../client','create','Request','CreateOpenchannelQueueReport','UpdateOpenchannelQueueReport'];(function(_0x2e1009,_0x49076f){var _0x317d0b=function(_0x21c48f){while(--_0x21c48f){_0x2e1009['push'](_0x2e1009['shift']());}};_0x317d0b(++_0x49076f);}(_0xf993,0x1d5));var _0x3f99=function(_0x36b7dd,_0x569679){_0x36b7dd=_0x36b7dd-0x0;var _0x44082e=_0xf993[_0x36b7dd];return _0x44082e;};'use strict';var client=require(_0x3f99('0x0'));exports[_0x3f99('0x1')]=function(_0x413023){return client[_0x3f99('0x2')](_0x3f99('0x3'),{'body':_0x413023,'log':_0x3f99('0x3')});};exports['update']=function(_0x4a080b,_0x1111bc){return client['Request'](_0x3f99('0x4'),{'body':_0x1111bc,'options':{'where':{'uniqueid':_0x4a080b},'order':[['id',_0x3f99('0x5')]],'limit':0x1},'log':_0x3f99('0x4')});};
\ No newline at end of file
index 1fb99df..577eeea 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdb94=['addTagsToSmsInteraction','update','Request','UpdateSmsInteraction','updateSmsInteraction','addTags'];(function(_0x464925,_0x1746ef){var _0x13530b=function(_0x153a07){while(--_0x153a07){_0x464925['push'](_0x464925['shift']());}};_0x13530b(++_0x1746ef);}(_0xdb94,0xe5));var _0x4db9=function(_0x43d01a,_0x6bb8b8){_0x43d01a=_0x43d01a-0x0;var _0x8476bc=_0xdb94[_0x43d01a];return _0x8476bc;};'use strict';var client=require('../client');exports[_0x4db9('0x0')]=function(_0x1aa3d0,_0x5edca0){return client[_0x4db9('0x1')](_0x4db9('0x2'),{'body':_0x5edca0,'options':{'where':{'id':_0x1aa3d0}},'log':_0x4db9('0x3')});};exports[_0x4db9('0x4')]=function(_0x1f05d4,_0x592097){return client[_0x4db9('0x1')]('AddTagsToSmsInteraction',{'body':_0x592097,'options':{'where':{'id':_0x1f05d4}},'log':_0x4db9('0x5')});};
\ No newline at end of file
+var _0x5636=['AddTagsToSmsInteraction','addTagsToSmsInteraction','../client','update','UpdateSmsInteraction','updateSmsInteraction','addTags','Request'];(function(_0x1f89b1,_0x2294e5){var _0x529ad8=function(_0x10f638){while(--_0x10f638){_0x1f89b1['push'](_0x1f89b1['shift']());}};_0x529ad8(++_0x2294e5);}(_0x5636,0x102));var _0x6563=function(_0x219523,_0x57bfcb){_0x219523=_0x219523-0x0;var _0x4969b6=_0x5636[_0x219523];return _0x4969b6;};'use strict';var client=require(_0x6563('0x0'));exports[_0x6563('0x1')]=function(_0x492943,_0x4ab349){return client['Request'](_0x6563('0x2'),{'body':_0x4ab349,'options':{'where':{'id':_0x492943}},'log':_0x6563('0x3')});};exports[_0x6563('0x4')]=function(_0x4ac653,_0x166a58){return client[_0x6563('0x5')](_0x6563('0x6'),{'body':_0x166a58,'options':{'where':{'id':_0x4ac653}},'log':_0x6563('0x7')});};
\ No newline at end of file
index 03a2dc8..041e6da 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcf60=['CreateSmsMessage','create'];(function(_0x3048ea,_0x3838c2){var _0x1a13c4=function(_0x2c6a6b){while(--_0x2c6a6b){_0x3048ea['push'](_0x3048ea['shift']());}};_0x1a13c4(++_0x3838c2);}(_0xcf60,0x135));var _0x0cf6=function(_0x26e051,_0x403ee1){_0x26e051=_0x26e051-0x0;var _0x4501f7=_0xcf60[_0x26e051];return _0x4501f7;};'use strict';var client=require('../client');exports[_0x0cf6('0x0')]=function(_0xe59b12){return client['Request'](_0x0cf6('0x1'),{'body':_0xe59b12,'log':'createSmsMessage'});};
\ No newline at end of file
+var _0xccd9=['createSmsMessage','create'];(function(_0x4ea955,_0x1eda76){var _0x558561=function(_0x5b20f4){while(--_0x5b20f4){_0x4ea955['push'](_0x4ea955['shift']());}};_0x558561(++_0x1eda76);}(_0xccd9,0x199));var _0x9ccd=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xccd9[_0x3dd15e];return _0x231fd0;};'use strict';var client=require('../client');exports[_0x9ccd('0x0')]=function(_0x2edd1b){return client['Request']('CreateSmsMessage',{'body':_0x2edd1b,'log':_0x9ccd('0x1')});};
\ No newline at end of file
index 982650c..b89ea34 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe706=['Agents','online','smsPause','../client','getSmsQueues','Request','name','timeout','strategy','User'];(function(_0x24fc38,_0x2bfe8b){var _0x11be02=function(_0x4a285c){while(--_0x4a285c){_0x24fc38['push'](_0x24fc38['shift']());}};_0x11be02(++_0x2bfe8b);}(_0xe706,0xa3));var _0x6e70=function(_0x5cf1a1,_0x1ab924){_0x5cf1a1=_0x5cf1a1-0x0;var _0x52cbcc=_0xe706[_0x5cf1a1];return _0x52cbcc;};'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
+var _0x70e0=['User','Agents','online','../client','getSmsQueues','Request','timeout','strategy'];(function(_0x5ab7f4,_0x340fb){var _0x5d75c0=function(_0x2ff13c){while(--_0x2ff13c){_0x5ab7f4['push'](_0x5ab7f4['shift']());}};_0x5d75c0(++_0x340fb);}(_0x70e0,0x17b));var _0x070e=function(_0x20f8a8,_0x396e14){_0x20f8a8=_0x20f8a8-0x0;var _0x93c960=_0x70e0[_0x20f8a8];return _0x93c960;};'use strict';var client=require(_0x070e('0x0'));exports[_0x070e('0x1')]=function(){return function(){return client[_0x070e('0x2')]('GetSmsQueue',{'options':{'raw':![],'attributes':['id','name',_0x070e('0x3'),_0x070e('0x4')],'include':[{'model':_0x070e('0x5'),'as':_0x070e('0x6'),'attributes':['id','name',_0x070e('0x7'),'smsPause']}]},'log':_0x070e('0x1')});};};
\ No newline at end of file
index 0c7454d..43e0772 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x008c=['../client','create','Request','CreateSmsQueueReport','update','UpdateSmsQueueReport','DESC'];(function(_0x614c88,_0x184f02){var _0x1a768e=function(_0x4f204f){while(--_0x4f204f){_0x614c88['push'](_0x614c88['shift']());}};_0x1a768e(++_0x184f02);}(_0x008c,0x188));var _0xc008=function(_0x4ef77b,_0x6a3df){_0x4ef77b=_0x4ef77b-0x0;var _0x58d1a6=_0x008c[_0x4ef77b];return _0x58d1a6;};'use strict';var client=require(_0xc008('0x0'));exports[_0xc008('0x1')]=function(_0x15aadc){return client[_0xc008('0x2')](_0xc008('0x3'),{'body':_0x15aadc,'log':'CreateSmsQueueReport'});};exports[_0xc008('0x4')]=function(_0x47063f,_0x10b33c){return client[_0xc008('0x2')](_0xc008('0x5'),{'body':_0x10b33c,'options':{'where':{'uniqueid':_0x47063f},'order':[['id',_0xc008('0x6')]],'limit':0x1},'log':_0xc008('0x5')});};
\ No newline at end of file
+var _0x34e8=['create','Request','CreateSmsQueueReport','update','UpdateSmsQueueReport','DESC','../client'];(function(_0x20589c,_0x24ccef){var _0x102231=function(_0x216a69){while(--_0x216a69){_0x20589c['push'](_0x20589c['shift']());}};_0x102231(++_0x24ccef);}(_0x34e8,0x12c));var _0x834e=function(_0x13cfec,_0x469a3c){_0x13cfec=_0x13cfec-0x0;var _0x302fbb=_0x34e8[_0x13cfec];return _0x302fbb;};'use strict';var client=require(_0x834e('0x0'));exports[_0x834e('0x1')]=function(_0x8b339){return client[_0x834e('0x2')]('CreateSmsQueueReport',{'body':_0x8b339,'log':_0x834e('0x3')});};exports[_0x834e('0x4')]=function(_0x472111,_0x31bf20){return client[_0x834e('0x2')](_0x834e('0x5'),{'body':_0x31bf20,'options':{'where':{'uniqueid':_0x472111},'order':[['id',_0x834e('0x6')]],'limit':0x1},'log':'UpdateSmsQueueReport'});};
\ No newline at end of file
index feac4ff..41465f2 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(_0x44f519,_0x293a72){var _0x1aa4af=function(_0x588a4f){while(--_0x588a4f){_0x44f519['push'](_0x44f519['shift']());}};_0x1aa4af(++_0x293a72);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5447fd,_0x52a6b5){_0x5447fd=_0x5447fd-0x0;var _0x15b28a=_0xa9e0[_0x5447fd];return _0x15b28a;};'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(_0x1caffc,_0xb2252f){var _0x348ba2=function(_0x3451ed){while(--_0x3451ed){_0x1caffc['push'](_0x1caffc['shift']());}};_0x348ba2(++_0xb2252f);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2bf141,_0x31eac7){_0x2bf141=_0x2bf141-0x0;var _0x48277b=_0xa9e0[_0x2bf141];return _0x48277b;};'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 81daf6f..85dc59c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf52f=['AddTagsToWhatsappInteraction','addTagsToWhatsappInteraction','../client','update','Request','UpdateWhatsappInteraction','updateWhatsappInteraction'];(function(_0x208074,_0xe33905){var _0x329b06=function(_0x2b7d19){while(--_0x2b7d19){_0x208074['push'](_0x208074['shift']());}};_0x329b06(++_0xe33905);}(_0xf52f,0x113));var _0xff52=function(_0x241929,_0x1700d5){_0x241929=_0x241929-0x0;var _0x3f6ad9=_0xf52f[_0x241929];return _0x3f6ad9;};'use strict';var client=require(_0xff52('0x0'));exports[_0xff52('0x1')]=function(_0x3276ff,_0x4ff45d){return client[_0xff52('0x2')](_0xff52('0x3'),{'body':_0x4ff45d,'options':{'where':{'id':_0x3276ff}},'log':_0xff52('0x4')});};exports['addTags']=function(_0x23d018,_0x35337d){return client['Request'](_0xff52('0x5'),{'body':_0x35337d,'options':{'where':{'id':_0x23d018}},'log':_0xff52('0x6')});};
\ No newline at end of file
+var _0x3f8a=['updateWhatsappInteraction','addTags','Request','AddTagsToWhatsappInteraction','addTagsToWhatsappInteraction','../client','update','UpdateWhatsappInteraction'];(function(_0x313c38,_0x48cdaf){var _0x39d312=function(_0x17496e){while(--_0x17496e){_0x313c38['push'](_0x313c38['shift']());}};_0x39d312(++_0x48cdaf);}(_0x3f8a,0x1d5));var _0xa3f8=function(_0x5719d8,_0x22a01a){_0x5719d8=_0x5719d8-0x0;var _0x5b9f6b=_0x3f8a[_0x5719d8];return _0x5b9f6b;};'use strict';var client=require(_0xa3f8('0x0'));exports[_0xa3f8('0x1')]=function(_0x29d753,_0x23c224){return client['Request'](_0xa3f8('0x2'),{'body':_0x23c224,'options':{'where':{'id':_0x29d753}},'log':_0xa3f8('0x3')});};exports[_0xa3f8('0x4')]=function(_0x15b6aa,_0x2553fd){return client[_0xa3f8('0x5')](_0xa3f8('0x6'),{'body':_0x2553fd,'options':{'where':{'id':_0x15b6aa}},'log':_0xa3f8('0x7')});};
\ No newline at end of file
index 0dd16aa..2d14a1e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x95c9=['../client','create','Request'];(function(_0x2f4500,_0x62861d){var _0x47812c=function(_0x5546ac){while(--_0x5546ac){_0x2f4500['push'](_0x2f4500['shift']());}};_0x47812c(++_0x62861d);}(_0x95c9,0xa2));var _0x995c=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x95c9[_0x3dd15e];return _0x231fd0;};'use strict';var client=require(_0x995c('0x0'));exports[_0x995c('0x1')]=function(_0x27eecd){return client[_0x995c('0x2')]('CreateWhatsappMessage',{'body':_0x27eecd,'log':'createWhatsappMessage'});};
\ No newline at end of file
+var _0x1eb1=['CreateWhatsappMessage','Request'];(function(_0x47990b,_0xf722d6){var _0x57bb0a=function(_0x26b8d0){while(--_0x26b8d0){_0x47990b['push'](_0x47990b['shift']());}};_0x57bb0a(++_0xf722d6);}(_0x1eb1,0x1e7));var _0x11eb=function(_0x2f2cd7,_0x130750){_0x2f2cd7=_0x2f2cd7-0x0;var _0x5b0900=_0x1eb1[_0x2f2cd7];return _0x5b0900;};'use strict';var client=require('../client');exports['create']=function(_0x4e0591){return client[_0x11eb('0x0')](_0x11eb('0x1'),{'body':_0x4e0591,'log':'createWhatsappMessage'});};
\ No newline at end of file
index 5d742c2..faa5a45 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfe20=['whatsappPause','getWhatsappQueues','Request','name','timeout','strategy','User','Agents','online'];(function(_0x2d15c4,_0x57eea5){var _0x24c893=function(_0x4189ad){while(--_0x4189ad){_0x2d15c4['push'](_0x2d15c4['shift']());}};_0x24c893(++_0x57eea5);}(_0xfe20,0x118));var _0x0fe2=function(_0x9c6c41,_0x2123fa){_0x9c6c41=_0x9c6c41-0x0;var _0x7a51ee=_0xfe20[_0x9c6c41];return _0x7a51ee;};'use strict';var client=require('../client');exports[_0x0fe2('0x0')]=function(){return function(){return client[_0x0fe2('0x1')]('GetWhatsappQueue',{'options':{'raw':![],'attributes':['id',_0x0fe2('0x2'),_0x0fe2('0x3'),_0x0fe2('0x4')],'include':[{'model':_0x0fe2('0x5'),'as':_0x0fe2('0x6'),'attributes':['id',_0x0fe2('0x2'),_0x0fe2('0x7'),_0x0fe2('0x8')]}]},'log':_0x0fe2('0x0')});};};
\ No newline at end of file
+var _0x817c=['timeout','strategy','User','Agents','whatsappPause','getWhatsappQueues','Request','GetWhatsappQueue','name'];(function(_0x567796,_0x460632){var _0x499a02=function(_0x17b9aa){while(--_0x17b9aa){_0x567796['push'](_0x567796['shift']());}};_0x499a02(++_0x460632);}(_0x817c,0x137));var _0xc817=function(_0x31f806,_0x35fd82){_0x31f806=_0x31f806-0x0;var _0x3afcf9=_0x817c[_0x31f806];return _0x3afcf9;};'use strict';var client=require('../client');exports[_0xc817('0x0')]=function(){return function(){return client[_0xc817('0x1')](_0xc817('0x2'),{'options':{'raw':![],'attributes':['id',_0xc817('0x3'),_0xc817('0x4'),_0xc817('0x5')],'include':[{'model':_0xc817('0x6'),'as':_0xc817('0x7'),'attributes':['id',_0xc817('0x3'),'online',_0xc817('0x8')]}]},'log':_0xc817('0x0')});};};
\ No newline at end of file
index 22e0da6..6eb57b6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcb8b=['CreateWhatsappQueueReport','update','Request','UpdateWhatsappQueueReport','../client','create'];(function(_0x27f11f,_0x2256c8){var _0x3baf31=function(_0x7226e){while(--_0x7226e){_0x27f11f['push'](_0x27f11f['shift']());}};_0x3baf31(++_0x2256c8);}(_0xcb8b,0x130));var _0xbcb8=function(_0x133748,_0x3da5a4){_0x133748=_0x133748-0x0;var _0x29c1e7=_0xcb8b[_0x133748];return _0x29c1e7;};'use strict';var client=require(_0xbcb8('0x0'));exports[_0xbcb8('0x1')]=function(_0x35ae10){return client['Request'](_0xbcb8('0x2'),{'body':_0x35ae10,'log':_0xbcb8('0x2')});};exports[_0xbcb8('0x3')]=function(_0x16028f,_0x3cf813){return client[_0xbcb8('0x4')]('UpdateWhatsappQueueReport',{'body':_0x3cf813,'options':{'where':{'uniqueid':_0x16028f},'order':[['id','DESC']],'limit':0x1},'log':_0xbcb8('0x5')});};
\ No newline at end of file
+var _0x0d68=['UpdateWhatsappQueueReport','DESC','../client','CreateWhatsappQueueReport','update','Request'];(function(_0x42f009,_0x5e27b1){var _0x22a1e0=function(_0x297993){while(--_0x297993){_0x42f009['push'](_0x42f009['shift']());}};_0x22a1e0(++_0x5e27b1);}(_0x0d68,0xf8));var _0x80d6=function(_0xa08399,_0x399acb){_0xa08399=_0xa08399-0x0;var _0xd278ae=_0x0d68[_0xa08399];return _0xd278ae;};'use strict';var client=require(_0x80d6('0x0'));exports['create']=function(_0x1afe2b){return client['Request'](_0x80d6('0x1'),{'body':_0x1afe2b,'log':_0x80d6('0x1')});};exports[_0x80d6('0x2')]=function(_0x1e38dd,_0x443937){return client[_0x80d6('0x3')](_0x80d6('0x4'),{'body':_0x443937,'options':{'where':{'uniqueid':_0x1e38dd},'order':[['id',_0x80d6('0x5')]],'limit':0x1},'log':'UpdateWhatsappQueueReport'});};
\ No newline at end of file
index 5daa601..c5e023a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x52c7=['routing','./strategy','string','name\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','info','format','[%s][AGENT][NAME:%s][STATUS:%s]','name','toLowerCase','consequence','length','error','[%s][AGENT]\x20%s','map','message','join','stop','find','timeout','createQueue','atimeout','channel','end','[%s][AGENT]\x20ROUTING\x20STOPPED','close','rules','next','[%s][AGENT]\x20agent\x20not\x20found\x20%s','[%s][QUEUE]\x20%s','stack','validate','lodash','util','seq-queue'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0x52c7,0x137));var _0x752c=function(_0x486008,_0x2b2d05){_0x486008=_0x486008-0x0;var _0x2fefc7=_0x52c7[_0x486008];return _0x2fefc7;};'use strict';var schema=require(_0x752c('0x0'));var _=require(_0x752c('0x1'));var util=require(_0x752c('0x2'));var seqqueue=require(_0x752c('0x3'));var logger=require('../../../../config/logger')(_0x752c('0x4'));var strategy=require(_0x752c('0x5'));var queue=schema({'name':{'type':_0x752c('0x6'),'required':!![],'message':_0x752c('0x7')},'timeout':{'type':_0x752c('0x8'),'message':'timeout\x20is\x20a\x20number'}});function writeLog(_0x1576bb,_0x521259,_0x4083e1){return logger[_0x752c('0x9')](util[_0x752c('0xa')](_0x752c('0xb'),_0x1576bb,_0x521259[_0x752c('0xc')],_0x4083e1));}function handleFindAgent(_0x43d614){return function(_0x138cf6){return _0x138cf6[_0x752c('0xc')][_0x752c('0xd')]()===_0x43d614[_0x752c('0xd')]();};}exports[_0x752c('0xe')]=function(_0xc99e5,_0x5418ee,_0x27e362,_0x5181de){return function(_0x1dd3d4){try{var _0x9028bf={'name':_0x5418ee[0x0],'timeout':_0x5418ee[0x1]};var _0x2b9a97=queue['validate'](_0x9028bf,{'typecast':!![]});if(_0x2b9a97[_0x752c('0xf')]){logger[_0x752c('0x10')](_0x752c('0x11'),_0xc99e5,_[_0x752c('0x12')](_0x2b9a97,_0x752c('0x13'))[_0x752c('0x14')](',\x20'));_0x1dd3d4[_0x752c('0x15')]();}else{var _0x1565df=_[_0x752c('0x16')](_0x27e362['agents'],handleFindAgent(_0x9028bf['name']));if(_0x1565df){var _0x3796b2=(_0x9028bf[_0x752c('0x17')]||0xa)*0x3e8;var _0x1d1f3b,_0x7a1a99;var _0x53c5ef=seqqueue[_0x752c('0x18')](_0x3796b2);_0x53c5ef['id']=_0xc99e5;_0x53c5ef[_0x752c('0x19')]=_0x3796b2;_0x53c5ef[_0x752c('0x1a')]=_0x5181de[_0x752c('0x1a')];writeLog(_0xc99e5,_0x1565df,util[_0x752c('0xa')]('START:%s',_0x3796b2));_0x27e362['rules'][_0xc99e5]['on'](_0x752c('0x1b'),function(){logger[_0x752c('0x9')](_0x752c('0x1c'),_0xc99e5);clearTimeout(_0x7a1a99);_0x7a1a99=undefined;_0x53c5ef[_0x752c('0x1d')]();if(_0x27e362[_0x752c('0x1e')][_0xc99e5]){delete _0x27e362[_0x752c('0x1e')][_0xc99e5];}_0x1dd3d4[_0x752c('0x15')]();});_0x27e362[_0x752c('0x1e')][_0xc99e5]['on']('complete',function(){if(_0x27e362['rules'][_0xc99e5]){delete _0x27e362[_0x752c('0x1e')][_0xc99e5];}});_0x7a1a99=setTimeout(function(){logger[_0x752c('0x9')]('[%s][AGENT]\x20ROUTING\x20END',_0xc99e5);clearTimeout(_0x7a1a99);_0x53c5ef[_0x752c('0x1d')]();_0x1dd3d4[_0x752c('0x1f')]();},_0x3796b2);strategy['agent'](_0x53c5ef,_0x1565df,_0x27e362,_0x5181de);}else{logger[_0x752c('0x10')](_0x752c('0x20'),_0xc99e5,_0x9028bf[_0x752c('0xc')]);_0x1dd3d4['stop']();}}}catch(_0x293c75){console['log'](_0x293c75);logger[_0x752c('0x10')](_0x752c('0x21'),_0xc99e5,_0x293c75[_0x752c('0x22')]);_0x1dd3d4['stop']();}};};
\ No newline at end of file
+var _0x3010=['validate','length','error','map','message','stop','find','agents','timeout','createQueue','atimeout','channel','rules','end','[%s][AGENT]\x20ROUTING\x20STOPPED','close','complete','[%s][AGENT]\x20ROUTING\x20END','next','agent','[%s][AGENT]\x20agent\x20not\x20found\x20%s','[%s][QUEUE]\x20%s','stack','lodash','util','routing','./strategy','string','number','timeout\x20is\x20a\x20number','info','format','[%s][AGENT][NAME:%s][STATUS:%s]','name','toLowerCase','consequence'];(function(_0x394d80,_0x1e6060){var _0x371934=function(_0xc60e1d){while(--_0xc60e1d){_0x394d80['push'](_0x394d80['shift']());}};_0x371934(++_0x1e6060);}(_0x3010,0x137));var _0x0301=function(_0x26a4ea,_0xa72fb8){_0x26a4ea=_0x26a4ea-0x0;var _0x1b669e=_0x3010[_0x26a4ea];return _0x1b669e;};'use strict';var schema=require('validate');var _=require(_0x0301('0x0'));var util=require(_0x0301('0x1'));var seqqueue=require('seq-queue');var logger=require('../../../../config/logger')(_0x0301('0x2'));var strategy=require(_0x0301('0x3'));var queue=schema({'name':{'type':_0x0301('0x4'),'required':!![],'message':'name\x20is\x20a\x20string\x20and\x20it\x20is\x20required'},'timeout':{'type':_0x0301('0x5'),'message':_0x0301('0x6')}});function writeLog(_0x431986,_0x56c504,_0x4e61fb){return logger[_0x0301('0x7')](util[_0x0301('0x8')](_0x0301('0x9'),_0x431986,_0x56c504[_0x0301('0xa')],_0x4e61fb));}function handleFindAgent(_0x4e9531){return function(_0x5ac407){return _0x5ac407['name'][_0x0301('0xb')]()===_0x4e9531[_0x0301('0xb')]();};}exports[_0x0301('0xc')]=function(_0x4b4604,_0x3350fd,_0x540414,_0x24b771){return function(_0x3063a0){try{var _0x42ace4={'name':_0x3350fd[0x0],'timeout':_0x3350fd[0x1]};var _0x202a1e=queue[_0x0301('0xd')](_0x42ace4,{'typecast':!![]});if(_0x202a1e[_0x0301('0xe')]){logger[_0x0301('0xf')]('[%s][AGENT]\x20%s',_0x4b4604,_[_0x0301('0x10')](_0x202a1e,_0x0301('0x11'))['join'](',\x20'));_0x3063a0[_0x0301('0x12')]();}else{var _0x4ce5d1=_[_0x0301('0x13')](_0x540414[_0x0301('0x14')],handleFindAgent(_0x42ace4[_0x0301('0xa')]));if(_0x4ce5d1){var _0x3585c2=(_0x42ace4[_0x0301('0x15')]||0xa)*0x3e8;var _0x7b566c,_0x21b600;var _0x359ada=seqqueue[_0x0301('0x16')](_0x3585c2);_0x359ada['id']=_0x4b4604;_0x359ada[_0x0301('0x17')]=_0x3585c2;_0x359ada[_0x0301('0x18')]=_0x24b771[_0x0301('0x18')];writeLog(_0x4b4604,_0x4ce5d1,util[_0x0301('0x8')]('START:%s',_0x3585c2));_0x540414[_0x0301('0x19')][_0x4b4604]['on'](_0x0301('0x1a'),function(){logger['info'](_0x0301('0x1b'),_0x4b4604);clearTimeout(_0x21b600);_0x21b600=undefined;_0x359ada[_0x0301('0x1c')]();if(_0x540414[_0x0301('0x19')][_0x4b4604]){delete _0x540414[_0x0301('0x19')][_0x4b4604];}_0x3063a0[_0x0301('0x12')]();});_0x540414[_0x0301('0x19')][_0x4b4604]['on'](_0x0301('0x1d'),function(){if(_0x540414['rules'][_0x4b4604]){delete _0x540414[_0x0301('0x19')][_0x4b4604];}});_0x21b600=setTimeout(function(){logger[_0x0301('0x7')](_0x0301('0x1e'),_0x4b4604);clearTimeout(_0x21b600);_0x359ada[_0x0301('0x1c')]();_0x3063a0[_0x0301('0x1f')]();},_0x3585c2);strategy[_0x0301('0x20')](_0x359ada,_0x4ce5d1,_0x540414,_0x24b771);}else{logger[_0x0301('0xf')](_0x0301('0x21'),_0x4b4604,_0x42ace4[_0x0301('0xa')]);_0x3063a0[_0x0301('0x12')]();}}}catch(_0x18ad07){console['log'](_0x18ad07);logger[_0x0301('0xf')](_0x0301('0x22'),_0x4b4604,_0x18ad07[_0x0301('0x23')]);_0x3063a0[_0x0301('0x12')]();}};};
\ No newline at end of file
index 7b99d2b..6aa4595 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6c33=['[%s][AMAZONLEX]\x20%s','Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.','next','contact','format','YYYY-MM-DD\x20HH:mm:ss','out','channel','whatsapp','phone','chat','ChatWebsiteId','account','AccountId','upperFirst','InteractionId','interaction','created','isEmpty','body','getMustacheRender','Message','then','catch','error','stringify','[%s][AMAZONLEX]\x20Welcome\x20Message\x20has\x20been\x20sent!','stop','LexRuntime','postText','message','amazonlex','providerResponse','create','dialogState','moment','aws-sdk','./utils','routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','consequence','isNil','info'];(function(_0x16e57d,_0x2cb7ba){var _0x40239c=function(_0x3cc8f0){while(--_0x3cc8f0){_0x16e57d['push'](_0x16e57d['shift']());}};_0x40239c(++_0x2cb7ba);}(_0x6c33,0x19b));var _0x36c3=function(_0x12d033,_0x25fa2f){_0x12d033=_0x12d033-0x0;var _0x3b4e80=_0x6c33[_0x12d033];return _0x3b4e80;};'use strict';var _=require('lodash');var moment=require(_0x36c3('0x0'));var AWS=require(_0x36c3('0x1'));var utils=require(_0x36c3('0x2'));var logger=require('../../../../config/logger')(_0x36c3('0x3'));var rpc={'chatMessage':require(_0x36c3('0x4')),'openchannelMessage':require(_0x36c3('0x5')),'mailMessage':require(_0x36c3('0x6')),'smsMessage':require('../../rpc/smsMessage'),'faxMessage':require(_0x36c3('0x7')),'whatsappMessage':require(_0x36c3('0x8'))};exports[_0x36c3('0x9')]=function(_0x57fbcb,_0xf6536d){return function(_0x490fec){try{if(!_[_0x36c3('0xa')](this['interaction']['UserId'])){logger[_0x36c3('0xb')](_0x36c3('0xc'),_0x57fbcb,_0x36c3('0xd'));return _0x490fec[_0x36c3('0xe')]();}var _0x4b7178={'ContactId':this[_0x36c3('0xf')]['id'],'sentAt':moment()[_0x36c3('0x10')](_0x36c3('0x11')),'direction':_0x36c3('0x12')};if(this[_0x36c3('0x13')]==='sms'||this[_0x36c3('0x13')]===_0x36c3('0x14')){_0x4b7178['phone']=this['interaction'][_0x36c3('0x15')];}var _0x320ee8=this[_0x36c3('0x13')];if(_0x320ee8===_0x36c3('0x16')){_0x4b7178[_0x36c3('0x17')]=this[_0x36c3('0x18')]['id'];}else{_0x4b7178[_['upperFirst'](_0x320ee8)+_0x36c3('0x19')]=this[_0x36c3('0x18')]['id'];}_0x4b7178[_[_0x36c3('0x1a')](_0x320ee8)+_0x36c3('0x1b')]=this['interaction']['id'];if(this[_0x36c3('0x1c')][_0x36c3('0x1d')]){var _0x12cfd8=_0xf6536d[0x4];if(!_[_0x36c3('0x1e')](_0x12cfd8)){_0x4b7178[_0x36c3('0x1f')]=utils[_0x36c3('0x20')](_0x12cfd8,this);return rpc[_0x320ee8+_0x36c3('0x21')]['create'](_0x4b7178)[_0x36c3('0x22')](function(_0x1ef30c){logger[_0x36c3('0xb')](_0x36c3('0xc'),_0x57fbcb,_0x4b7178[_0x36c3('0x1f')]);})[_0x36c3('0x23')](function(_0x57fd48){logger[_0x36c3('0x24')]('[%s][AMAZONLEX]\x20%s',_0x57fbcb,JSON[_0x36c3('0x25')](_0x57fd48));})['finally'](function(){logger[_0x36c3('0xb')](_0x36c3('0x26'),_0x57fbcb);_0x490fec[_0x36c3('0x27')]();});}else{logger[_0x36c3('0xb')]('[%s][AMAZONLEX]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!',_0x57fbcb);_0x490fec[_0x36c3('0x27')]();}}else{var _0x18abc0=this;var _0x41c28d=new AWS[(_0x36c3('0x28'))]({'accessKeyId':_0xf6536d[0x0],'secretAccessKey':_0xf6536d[0x1],'region':_0xf6536d[0x2]});var _0x220787={'botAlias':'$LATEST','botName':_0xf6536d[0x3],'inputText':this['message']['body'],'userId':this[_0x36c3('0x13')]+':'+this[_0x36c3('0x1c')]['id']['toString']()};_0x41c28d[_0x36c3('0x29')](_0x220787,function(_0xfb9bc3,_0x26c3b0){if(_0xfb9bc3){logger[_0x36c3('0x24')](_0x36c3('0xc'),_0x57fbcb,_0xfb9bc3[_0x36c3('0x2a')]);_0x490fec[_0x36c3('0xe')]();}else if(_0x26c3b0&&_0x26c3b0[_0x36c3('0x2a')]){_0x18abc0['body'][_0x36c3('0x2b')]=_0x26c3b0;_0x4b7178[_0x36c3('0x1f')]=_0x26c3b0[_0x36c3('0x2a')];_0x4b7178['providerName']=_0x36c3('0x2b');_0x4b7178[_0x36c3('0x2c')]=JSON[_0x36c3('0x25')](_0x26c3b0);return rpc[_0x320ee8+_0x36c3('0x21')][_0x36c3('0x2d')](_0x4b7178)[_0x36c3('0x22')](function(_0x46f0cf){logger[_0x36c3('0xb')](_0x36c3('0xc'),_0x57fbcb,_0x4b7178['body']);if(_0x26c3b0[_0x36c3('0x2e')]=='Failed'){_0x490fec['next']();}else{_0x490fec['stop']();}})[_0x36c3('0x23')](function(_0x2c79c7){logger[_0x36c3('0x24')](_0x36c3('0xc'),_0x57fbcb,JSON[_0x36c3('0x25')](_0x2c79c7));_0x490fec[_0x36c3('0xe')]();});}else{_0x490fec[_0x36c3('0xe')]();}});}}catch(_0x303a93){logger[_0x36c3('0x24')](_0x36c3('0xc'),_0x57fbcb,JSON[_0x36c3('0x25')](_0x303a93));_0x490fec[_0x36c3('0x27')]();}};};
\ No newline at end of file
+var _0xe324=['then','dialogState','Failed','lodash','./utils','routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','consequence','isNil','UserId','info','[%s][AMAZONLEX]\x20%s','next','contact','format','YYYY-MM-DD\x20HH:mm:ss','out','channel','sms','phone','interaction','chat','AccountId','upperFirst','InteractionId','created','isEmpty','body','getMustacheRender','Message','create','catch','error','stringify','finally','[%s][AMAZONLEX]\x20Welcome\x20Message\x20has\x20been\x20sent!','stop','LexRuntime','toString','postText','message','amazonlex','providerName','providerResponse'];(function(_0x363f05,_0x4b6f15){var _0x2f86d3=function(_0x49acc8){while(--_0x49acc8){_0x363f05['push'](_0x363f05['shift']());}};_0x2f86d3(++_0x4b6f15);}(_0xe324,0x123));var _0x4e32=function(_0x16de68,_0x33d7ff){_0x16de68=_0x16de68-0x0;var _0x1c277e=_0xe324[_0x16de68];return _0x1c277e;};'use strict';var _=require(_0x4e32('0x0'));var moment=require('moment');var AWS=require('aws-sdk');var utils=require(_0x4e32('0x1'));var logger=require('../../../../config/logger')(_0x4e32('0x2'));var rpc={'chatMessage':require(_0x4e32('0x3')),'openchannelMessage':require(_0x4e32('0x4')),'mailMessage':require(_0x4e32('0x5')),'smsMessage':require(_0x4e32('0x6')),'faxMessage':require(_0x4e32('0x7')),'whatsappMessage':require('../../rpc/whatsappMessage')};exports[_0x4e32('0x8')]=function(_0xa4e59,_0x5a169b){return function(_0x3b96d1){try{if(!_[_0x4e32('0x9')](this['interaction'][_0x4e32('0xa')])){logger[_0x4e32('0xb')](_0x4e32('0xc'),_0xa4e59,'Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.');return _0x3b96d1[_0x4e32('0xd')]();}var _0x1f5fb5={'ContactId':this[_0x4e32('0xe')]['id'],'sentAt':moment()[_0x4e32('0xf')](_0x4e32('0x10')),'direction':_0x4e32('0x11')};if(this[_0x4e32('0x12')]===_0x4e32('0x13')||this['channel']==='whatsapp'){_0x1f5fb5[_0x4e32('0x14')]=this[_0x4e32('0x15')][_0x4e32('0x14')];}var _0x4503eb=this[_0x4e32('0x12')];if(_0x4503eb===_0x4e32('0x16')){_0x1f5fb5['ChatWebsiteId']=this['account']['id'];}else{_0x1f5fb5[_['upperFirst'](_0x4503eb)+_0x4e32('0x17')]=this['account']['id'];}_0x1f5fb5[_[_0x4e32('0x18')](_0x4503eb)+_0x4e32('0x19')]=this[_0x4e32('0x15')]['id'];if(this[_0x4e32('0x15')][_0x4e32('0x1a')]){var _0x571982=_0x5a169b[0x4];if(!_[_0x4e32('0x1b')](_0x571982)){_0x1f5fb5[_0x4e32('0x1c')]=utils[_0x4e32('0x1d')](_0x571982,this);return rpc[_0x4503eb+_0x4e32('0x1e')][_0x4e32('0x1f')](_0x1f5fb5)['then'](function(_0x8a1cf6){logger[_0x4e32('0xb')](_0x4e32('0xc'),_0xa4e59,_0x1f5fb5[_0x4e32('0x1c')]);})[_0x4e32('0x20')](function(_0x3408f5){logger[_0x4e32('0x21')]('[%s][AMAZONLEX]\x20%s',_0xa4e59,JSON[_0x4e32('0x22')](_0x3408f5));})[_0x4e32('0x23')](function(){logger['info'](_0x4e32('0x24'),_0xa4e59);_0x3b96d1['stop']();});}else{logger['info']('[%s][AMAZONLEX]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!',_0xa4e59);_0x3b96d1[_0x4e32('0x25')]();}}else{var _0x590cfb=this;var _0x1aef26=new AWS[(_0x4e32('0x26'))]({'accessKeyId':_0x5a169b[0x0],'secretAccessKey':_0x5a169b[0x1],'region':_0x5a169b[0x2]});var _0xdf3309={'botAlias':'$LATEST','botName':_0x5a169b[0x3],'inputText':this['message'][_0x4e32('0x1c')],'userId':this[_0x4e32('0x12')]+':'+this['interaction']['id'][_0x4e32('0x27')]()};_0x1aef26[_0x4e32('0x28')](_0xdf3309,function(_0x2ec61d,_0x531526){if(_0x2ec61d){logger[_0x4e32('0x21')](_0x4e32('0xc'),_0xa4e59,_0x2ec61d[_0x4e32('0x29')]);_0x3b96d1[_0x4e32('0xd')]();}else if(_0x531526&&_0x531526['message']){_0x590cfb[_0x4e32('0x1c')][_0x4e32('0x2a')]=_0x531526;_0x1f5fb5[_0x4e32('0x1c')]=_0x531526[_0x4e32('0x29')];_0x1f5fb5[_0x4e32('0x2b')]=_0x4e32('0x2a');_0x1f5fb5[_0x4e32('0x2c')]=JSON['stringify'](_0x531526);return rpc[_0x4503eb+'Message']['create'](_0x1f5fb5)[_0x4e32('0x2d')](function(_0x2fe722){logger[_0x4e32('0xb')](_0x4e32('0xc'),_0xa4e59,_0x1f5fb5['body']);if(_0x531526[_0x4e32('0x2e')]==_0x4e32('0x2f')){_0x3b96d1[_0x4e32('0xd')]();}else{_0x3b96d1[_0x4e32('0x25')]();}})[_0x4e32('0x20')](function(_0x4ea605){logger['error'](_0x4e32('0xc'),_0xa4e59,JSON[_0x4e32('0x22')](_0x4ea605));_0x3b96d1['next']();});}else{_0x3b96d1[_0x4e32('0xd')]();}});}}catch(_0x297201){logger[_0x4e32('0x21')]('[%s][AMAZONLEX]\x20%s',_0xa4e59,JSON[_0x4e32('0x22')](_0x297201));_0x3b96d1[_0x4e32('0x25')]();}};};
\ No newline at end of file
index 542aa77..15f2d7c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x62e8=['YYYY-MM-DD\x20HH:mm:ss','out','getMustacheRender','message','from','phone','read','subject','Re:\x20','chat','ChatWebsiteId','account','upperFirst','InteractionId','inReplyTo','messageId','html','<div\x20id=\x22xm-mail-content\x22>','replace','</div>','headers','auto-replied','All','auto_reply','sendMailMessage','smtpOptions','then','Message','create','catch','error','[RPC][%s][AUTOREPLY]\x20%s','stringify','finally','update','[RPC][%s][AUTOREPLY][autoreplyExecuted]\x20%s','stop','moment','./utils','routing','../../rpc/chatMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/whatsappMessage','../../rpc/chatInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','consequence','channel','mail','body','isAutoreply','info','[%s][AUTOREPLY]\x20%s','Autoreply\x20not\x20executed\x20(message\x20is\x20autoreply)','next','isNil','interaction','created','Autoreply\x20already\x20sent','autoreplyExecuted','[%s][AUTOREPLY][autoreplyExecuted]\x20%s','One\x20Time\x20already\x20sent','contact'];(function(_0x563e72,_0x14f677){var _0x1c89bf=function(_0x4d22b5){while(--_0x4d22b5){_0x563e72['push'](_0x563e72['shift']());}};_0x1c89bf(++_0x14f677);}(_0x62e8,0xe8));var _0x862e=function(_0x28cb45,_0x1f20fd){_0x28cb45=_0x28cb45-0x0;var _0x2e0fee=_0x62e8[_0x28cb45];return _0x2e0fee;};'use strict';var _=require('lodash');var moment=require(_0x862e('0x0'));var utils=require(_0x862e('0x1'));var logger=require('../../../../config/logger')(_0x862e('0x2'));var rpc={'chatMessage':require(_0x862e('0x3')),'openchannelMessage':require('../../rpc/openchannelMessage'),'mailMessage':require(_0x862e('0x4')),'smsMessage':require(_0x862e('0x5')),'faxMessage':require('../../rpc/faxMessage'),'whatsappMessage':require(_0x862e('0x6')),'chatInteraction':require(_0x862e('0x7')),'openchannelInteraction':require('../../rpc/openchannelInteraction'),'mailInteraction':require(_0x862e('0x8')),'smsInteraction':require('../../rpc/smsInteraction'),'faxInteraction':require(_0x862e('0x9')),'whatsappInteraction':require(_0x862e('0xa'))};var mailRpc=require('../../mailRpc');exports[_0x862e('0xb')]=function(_0x13bee7,_0x263422,_0x58a6c0,_0x5ba888){return function(_0x369a65){try{var _0xcab8b1=this[_0x862e('0xc')];if(_0xcab8b1===_0x862e('0xd')&&_0x5ba888[_0x862e('0xe')][_0x862e('0xf')]){logger[_0x862e('0x10')](_0x862e('0x11'),_0x13bee7,_0x862e('0x12'));return _0x369a65[_0x862e('0x13')]();}if(_0x263422[0x0]==='1'&&(_[_0x862e('0x14')](this['interaction']['created'])||!this[_0x862e('0x15')][_0x862e('0x16')])){logger[_0x862e('0x10')](_0x862e('0x11'),_0x13bee7,_0x862e('0x17'));return _0x369a65[_0x862e('0x13')]();}if(_0x263422[0x0]==='2'&&this[_0x862e('0x15')][_0x862e('0x18')]){logger[_0x862e('0x10')](_0x862e('0x19'),_0x13bee7,_0x862e('0x1a'));return _0x369a65[_0x862e('0x13')]();}var _0x35410e={'ContactId':this[_0x862e('0x1b')]['id'],'sentAt':moment()['format'](_0x862e('0x1c')),'direction':_0x862e('0x1d')};if(this[_0x862e('0xc')]===_0x862e('0xd')){_0x35410e[_0x862e('0xe')]=utils[_0x862e('0x1e')](_0x263422[0x2],this);}else{_0x35410e[_0x862e('0xe')]=utils['getMustacheRender'](_0x263422[0x1],this);}if(this[_0x862e('0x1f')]){_0x35410e['to']=this[_0x862e('0x1f')][_0x862e('0x20')]||'';if(this[_0x862e('0xc')]===_0x862e('0xd')&&_0x263422[0x1]==='1'){_0x35410e['cc']=this[_0x862e('0x1f')]['cc']||'';}_0x35410e[_0x862e('0x20')]=this['message']['to']||'';_0x35410e['phone']=this[_0x862e('0x1f')][_0x862e('0x21')]||'';_0x35410e[_0x862e('0x22')]=!![];if(this['message'][_0x862e('0x23')]){_0x35410e[_0x862e('0x23')]='';_0x35410e[_0x862e('0x23')]+=_['startsWith'](this[_0x862e('0x1f')]['subject'],'Re:')?'':_0x862e('0x24');_0x35410e[_0x862e('0x23')]+=this[_0x862e('0x1f')][_0x862e('0x23')];}}if(this[_0x862e('0xc')]===_0x862e('0x25')){_0x35410e[_0x862e('0x26')]=this[_0x862e('0x27')]['id'];}else{_0x35410e[_['upperFirst'](this[_0x862e('0xc')])+'AccountId']=this[_0x862e('0x27')]['id'];}_0x35410e[_[_0x862e('0x28')](this[_0x862e('0xc')])+_0x862e('0x29')]=this[_0x862e('0x15')]['id'];var _0x46a800=this['interaction'];if(rpc[this['channel']+'Message']){if(this[_0x862e('0xc')]===_0x862e('0xd')){_0x35410e[_0x862e('0x2a')]=this[_0x862e('0x1f')][_0x862e('0x2b')];_0x35410e[_0x862e('0x2c')]=_0x862e('0x2d')+_[_0x862e('0x2e')](_0x35410e[_0x862e('0xe')],'<div\x20id=\x22xm-mail-content\x22','<div')+_0x862e('0x2f');_0x35410e[_0x862e('0x30')]={'Auto-Submitted':_0x862e('0x31'),'X-Auto-Response-Suppress':_0x862e('0x32'),'Precedence':_0x862e('0x33')};return mailRpc[_0x862e('0x34')](this[_0x862e('0x27')][_0x862e('0x35')],_0x35410e)[_0x862e('0x36')](function(_0x35950e){logger['info']('[%s][AUTOREPLY]\x20SMTP\x20SENT',_0x13bee7);_0x35410e[_0x862e('0x2b')]=_0x35950e[_0x862e('0x1f')][_0x862e('0x2b')];return rpc[_0xcab8b1+_0x862e('0x37')][_0x862e('0x38')](_0x35410e);})['then'](function(_0x4def90){logger[_0x862e('0x10')](_0x862e('0x11'),_0x13bee7,JSON['stringify'](_0x4def90));})[_0x862e('0x39')](function(_0x4554c5){logger[_0x862e('0x3a')](_0x862e('0x3b'),_0x13bee7,JSON[_0x862e('0x3c')](_0x4554c5));})[_0x862e('0x3d')](function(){Promise['resolve']()[_0x862e('0x36')](function(){if(_0x263422[0x0]!=='2'||_0x46a800['autoreplyExecuted'])return;return rpc[_0xcab8b1+'Interaction'][_0x862e('0x3e')](_0x46a800['id'],{'autoreplyExecuted':!![]})[_0x862e('0x36')](function(_0x4e7795){logger[_0x862e('0x10')](_0x862e('0x19'),_0x13bee7,JSON[_0x862e('0x3c')](_0x4e7795));})[_0x862e('0x39')](function(_0x241d09){logger['error'](_0x862e('0x3f'),_0x13bee7,JSON[_0x862e('0x3c')](_0x241d09));});})[_0x862e('0x36')](function(){_0x369a65['next']();});});}else{return rpc[this[_0x862e('0xc')]+_0x862e('0x37')][_0x862e('0x38')](_0x35410e)[_0x862e('0x36')](function(){logger[_0x862e('0x10')](_0x862e('0x11'),_0x13bee7,_0x35410e['body']);})[_0x862e('0x39')](function(_0x22f3c9){logger[_0x862e('0x3a')](_0x862e('0x11'),_0x13bee7,JSON[_0x862e('0x3c')](_0x22f3c9));})[_0x862e('0x3d')](function(){Promise['resolve']()['then'](function(){if(_0x263422[0x0]!=='2'||_0x46a800[_0x862e('0x18')])return;return rpc[_0xcab8b1+'Interaction'][_0x862e('0x3e')](_0x46a800['id'],{'autoreplyExecuted':!![]})[_0x862e('0x36')](function(_0x3c031e){logger[_0x862e('0x10')]('[%s][AUTOREPLY][autoreplyExecuted]\x20%s',_0x13bee7,JSON[_0x862e('0x3c')](_0x3c031e));})[_0x862e('0x39')](function(_0x4745e5){logger[_0x862e('0x3a')](_0x862e('0x3f'),_0x13bee7,JSON[_0x862e('0x3c')](_0x4745e5));});})[_0x862e('0x36')](function(){_0x369a65['next']();});});}}}catch(_0x2e9726){logger[_0x862e('0x3a')](_0x862e('0x11'),_0x13bee7,JSON['stringify'](_0x2e9726));_0x369a65[_0x862e('0x40')]();}};};
\ No newline at end of file
+var _0x850c=['../../rpc/faxMessage','../../rpc/whatsappMessage','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/mailInteraction','../../rpc/smsInteraction','../../rpc/whatsappInteraction','../../mailRpc','consequence','channel','mail','body','isAutoreply','info','[%s][AUTOREPLY]\x20%s','next','interaction','created','Autoreply\x20already\x20sent','One\x20Time\x20already\x20sent','contact','format','YYYY-MM-DD\x20HH:mm:ss','out','getMustacheRender','message','from','phone','read','subject','startsWith','Re:','Re:\x20','chat','upperFirst','AccountId','account','InteractionId','Message','messageId','<div\x20id=\x22xm-mail-content\x22>','replace','<div\x20id=\x22xm-mail-content\x22','<div','</div>','headers','auto-replied','All','auto_reply','sendMailMessage','smtpOptions','then','create','stringify','catch','error','[RPC][%s][AUTOREPLY]\x20%s','finally','resolve','autoreplyExecuted','update','[%s][AUTOREPLY][autoreplyExecuted]\x20%s','Interaction','[RPC][%s][AUTOREPLY][autoreplyExecuted]\x20%s','stop','moment','./utils','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/mailMessage','../../rpc/smsMessage'];(function(_0x17c247,_0x5031a3){var _0x4c5baf=function(_0x48560d){while(--_0x48560d){_0x17c247['push'](_0x17c247['shift']());}};_0x4c5baf(++_0x5031a3);}(_0x850c,0xd1));var _0xc850=function(_0x57754a,_0x2db33b){_0x57754a=_0x57754a-0x0;var _0x216195=_0x850c[_0x57754a];return _0x216195;};'use strict';var _=require('lodash');var moment=require(_0xc850('0x0'));var utils=require(_0xc850('0x1'));var logger=require(_0xc850('0x2'))(_0xc850('0x3'));var rpc={'chatMessage':require(_0xc850('0x4')),'openchannelMessage':require('../../rpc/openchannelMessage'),'mailMessage':require(_0xc850('0x5')),'smsMessage':require(_0xc850('0x6')),'faxMessage':require(_0xc850('0x7')),'whatsappMessage':require(_0xc850('0x8')),'chatInteraction':require(_0xc850('0x9')),'openchannelInteraction':require(_0xc850('0xa')),'mailInteraction':require(_0xc850('0xb')),'smsInteraction':require(_0xc850('0xc')),'faxInteraction':require('../../rpc/faxInteraction'),'whatsappInteraction':require(_0xc850('0xd'))};var mailRpc=require(_0xc850('0xe'));exports[_0xc850('0xf')]=function(_0xa83207,_0x3d1c26,_0x4cfee9,_0x5089dc){return function(_0x2bc9fb){try{var _0x4f2a43=this[_0xc850('0x10')];if(_0x4f2a43===_0xc850('0x11')&&_0x5089dc[_0xc850('0x12')][_0xc850('0x13')]){logger[_0xc850('0x14')](_0xc850('0x15'),_0xa83207,'Autoreply\x20not\x20executed\x20(message\x20is\x20autoreply)');return _0x2bc9fb[_0xc850('0x16')]();}if(_0x3d1c26[0x0]==='1'&&(_['isNil'](this[_0xc850('0x17')]['created'])||!this[_0xc850('0x17')][_0xc850('0x18')])){logger[_0xc850('0x14')]('[%s][AUTOREPLY]\x20%s',_0xa83207,_0xc850('0x19'));return _0x2bc9fb[_0xc850('0x16')]();}if(_0x3d1c26[0x0]==='2'&&this[_0xc850('0x17')]['autoreplyExecuted']){logger[_0xc850('0x14')]('[%s][AUTOREPLY][autoreplyExecuted]\x20%s',_0xa83207,_0xc850('0x1a'));return _0x2bc9fb['next']();}var _0x348687={'ContactId':this[_0xc850('0x1b')]['id'],'sentAt':moment()[_0xc850('0x1c')](_0xc850('0x1d')),'direction':_0xc850('0x1e')};if(this[_0xc850('0x10')]===_0xc850('0x11')){_0x348687[_0xc850('0x12')]=utils[_0xc850('0x1f')](_0x3d1c26[0x2],this);}else{_0x348687['body']=utils[_0xc850('0x1f')](_0x3d1c26[0x1],this);}if(this['message']){_0x348687['to']=this[_0xc850('0x20')][_0xc850('0x21')]||'';if(this[_0xc850('0x10')]===_0xc850('0x11')&&_0x3d1c26[0x1]==='1'){_0x348687['cc']=this[_0xc850('0x20')]['cc']||'';}_0x348687[_0xc850('0x21')]=this['message']['to']||'';_0x348687['phone']=this[_0xc850('0x20')][_0xc850('0x22')]||'';_0x348687[_0xc850('0x23')]=!![];if(this['message']['subject']){_0x348687[_0xc850('0x24')]='';_0x348687[_0xc850('0x24')]+=_[_0xc850('0x25')](this[_0xc850('0x20')][_0xc850('0x24')],_0xc850('0x26'))?'':_0xc850('0x27');_0x348687[_0xc850('0x24')]+=this[_0xc850('0x20')][_0xc850('0x24')];}}if(this[_0xc850('0x10')]===_0xc850('0x28')){_0x348687['ChatWebsiteId']=this['account']['id'];}else{_0x348687[_[_0xc850('0x29')](this[_0xc850('0x10')])+_0xc850('0x2a')]=this[_0xc850('0x2b')]['id'];}_0x348687[_[_0xc850('0x29')](this[_0xc850('0x10')])+_0xc850('0x2c')]=this[_0xc850('0x17')]['id'];var _0x78037c=this['interaction'];if(rpc[this[_0xc850('0x10')]+_0xc850('0x2d')]){if(this[_0xc850('0x10')]===_0xc850('0x11')){_0x348687['inReplyTo']=this[_0xc850('0x20')][_0xc850('0x2e')];_0x348687['html']=_0xc850('0x2f')+_[_0xc850('0x30')](_0x348687[_0xc850('0x12')],_0xc850('0x31'),_0xc850('0x32'))+_0xc850('0x33');_0x348687[_0xc850('0x34')]={'Auto-Submitted':_0xc850('0x35'),'X-Auto-Response-Suppress':_0xc850('0x36'),'Precedence':_0xc850('0x37')};return mailRpc[_0xc850('0x38')](this[_0xc850('0x2b')][_0xc850('0x39')],_0x348687)[_0xc850('0x3a')](function(_0x9a77f8){logger[_0xc850('0x14')]('[%s][AUTOREPLY]\x20SMTP\x20SENT',_0xa83207);_0x348687[_0xc850('0x2e')]=_0x9a77f8['message'][_0xc850('0x2e')];return rpc[_0x4f2a43+'Message'][_0xc850('0x3b')](_0x348687);})['then'](function(_0x18a95f){logger['info'](_0xc850('0x15'),_0xa83207,JSON[_0xc850('0x3c')](_0x18a95f));})[_0xc850('0x3d')](function(_0x57b1af){logger[_0xc850('0x3e')](_0xc850('0x3f'),_0xa83207,JSON[_0xc850('0x3c')](_0x57b1af));})[_0xc850('0x40')](function(){Promise[_0xc850('0x41')]()[_0xc850('0x3a')](function(){if(_0x3d1c26[0x0]!=='2'||_0x78037c[_0xc850('0x42')])return;return rpc[_0x4f2a43+'Interaction'][_0xc850('0x43')](_0x78037c['id'],{'autoreplyExecuted':!![]})[_0xc850('0x3a')](function(_0x327036){logger[_0xc850('0x14')](_0xc850('0x44'),_0xa83207,JSON['stringify'](_0x327036));})[_0xc850('0x3d')](function(_0x44fb82){logger[_0xc850('0x3e')]('[RPC][%s][AUTOREPLY][autoreplyExecuted]\x20%s',_0xa83207,JSON['stringify'](_0x44fb82));});})[_0xc850('0x3a')](function(){_0x2bc9fb[_0xc850('0x16')]();});});}else{return rpc[this[_0xc850('0x10')]+_0xc850('0x2d')][_0xc850('0x3b')](_0x348687)[_0xc850('0x3a')](function(){logger[_0xc850('0x14')](_0xc850('0x15'),_0xa83207,_0x348687[_0xc850('0x12')]);})[_0xc850('0x3d')](function(_0x2d1f3f){logger[_0xc850('0x3e')](_0xc850('0x15'),_0xa83207,JSON['stringify'](_0x2d1f3f));})[_0xc850('0x40')](function(){Promise[_0xc850('0x41')]()[_0xc850('0x3a')](function(){if(_0x3d1c26[0x0]!=='2'||_0x78037c[_0xc850('0x42')])return;return rpc[_0x4f2a43+_0xc850('0x45')][_0xc850('0x43')](_0x78037c['id'],{'autoreplyExecuted':!![]})['then'](function(_0x5458de){logger['info']('[%s][AUTOREPLY][autoreplyExecuted]\x20%s',_0xa83207,JSON[_0xc850('0x3c')](_0x5458de));})[_0xc850('0x3d')](function(_0x2d6e40){logger[_0xc850('0x3e')](_0xc850('0x46'),_0xa83207,JSON[_0xc850('0x3c')](_0x2d6e40));});})[_0xc850('0x3a')](function(){_0x2bc9fb[_0xc850('0x16')]();});});}}}catch(_0x43804a){logger[_0xc850('0x3e')]('[%s][AUTOREPLY]\x20%s',_0xa83207,JSON[_0xc850('0x3c')](_0x43804a));_0x2bc9fb[_0xc850('0x47')]();}};};
\ No newline at end of file
index 994a89e..fa2f5c6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc08b=['format','YYYY-MM-DD\x20HH:mm:ss','channel','update','interaction','then','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','catch','error','[%s][CLOSE]\x20%s','stringify','finally','stop','../../../../config/logger','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/whatsappInteraction','consequence','info','[%s][CLOSE]\x20reason\x20%s'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xc08b,0x1f1));var _0xbc08=function(_0x1e036f,_0x3d1321){_0x1e036f=_0x1e036f-0x0;var _0x5ecf67=_0xc08b[_0x1e036f];return _0x5ecf67;};'use strict';var moment=require('moment');var logger=require(_0xbc08('0x0'))('routing');var rpc={'chatInteraction':require(_0xbc08('0x1')),'openchannelInteraction':require(_0xbc08('0x2')),'smsInteraction':require(_0xbc08('0x3')),'mailInteraction':require(_0xbc08('0x4')),'faxInteraction':require('../../rpc/faxInteraction'),'whatsappInteraction':require(_0xbc08('0x5'))};exports[_0xbc08('0x6')]=function(_0x3bf8f3,_0x3889e7,_0x935c21,_0x3dbe32){return function(_0x3c07e5){try{logger[_0xbc08('0x7')](_0xbc08('0x8'),_0x3bf8f3,_0x3889e7[0x0]);var _0x13ae16={'closed':0x1,'closedAt':moment()[_0xbc08('0x9')](_0xbc08('0xa')),'closeReason':'system','disposition':_0x3889e7[0x0]};if(rpc[_0x3dbe32[_0xbc08('0xb')]+'Interaction']){rpc[_0x3dbe32[_0xbc08('0xb')]+'Interaction'][_0xbc08('0xc')](_0x3dbe32[_0xbc08('0xd')]['id'],_0x13ae16)[_0xbc08('0xe')](function(_0x58b0c4){logger['info'](_0xbc08('0xf'),_0x3bf8f3,_0x3dbe32['interaction']['id']);})[_0xbc08('0x10')](function(_0x3e9df5){logger[_0xbc08('0x11')](_0xbc08('0x12'),_0x3bf8f3,JSON[_0xbc08('0x13')](_0x3e9df5));})[_0xbc08('0x14')](function(){_0x3c07e5[_0xbc08('0x15')]();});}}catch(_0x4510d5){logger[_0xbc08('0x11')](_0xbc08('0x12'),_0x3bf8f3,JSON['stringify'](_0x4510d5));_0x3c07e5[_0xbc08('0x15')]();}};};
\ No newline at end of file
+var _0xd3f5=['system','channel','Interaction','then','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','interaction','error','stringify','finally','stop','[%s][CLOSE]\x20%s','moment','../../../../config/logger','routing','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/whatsappInteraction','consequence','info','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x2dd7ba,_0x2f1a58){var _0x3a659f=function(_0x1e5497){while(--_0x1e5497){_0x2dd7ba['push'](_0x2dd7ba['shift']());}};_0x3a659f(++_0x2f1a58);}(_0xd3f5,0x1a9));var _0x5d3f=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0xd3f5[_0x3b380d];return _0x54502b;};'use strict';var moment=require(_0x5d3f('0x0'));var logger=require(_0x5d3f('0x1'))(_0x5d3f('0x2'));var rpc={'chatInteraction':require(_0x5d3f('0x3')),'openchannelInteraction':require(_0x5d3f('0x4')),'smsInteraction':require(_0x5d3f('0x5')),'mailInteraction':require(_0x5d3f('0x6')),'faxInteraction':require('../../rpc/faxInteraction'),'whatsappInteraction':require(_0x5d3f('0x7'))};exports[_0x5d3f('0x8')]=function(_0x5c7111,_0x16c65d,_0x3436f1,_0x247ad0){return function(_0xfb068f){try{logger[_0x5d3f('0x9')]('[%s][CLOSE]\x20reason\x20%s',_0x5c7111,_0x16c65d[0x0]);var _0x41d9c5={'closed':0x1,'closedAt':moment()[_0x5d3f('0xa')](_0x5d3f('0xb')),'closeReason':_0x5d3f('0xc'),'disposition':_0x16c65d[0x0]};if(rpc[_0x247ad0[_0x5d3f('0xd')]+_0x5d3f('0xe')]){rpc[_0x247ad0[_0x5d3f('0xd')]+_0x5d3f('0xe')]['update'](_0x247ad0['interaction']['id'],_0x41d9c5)[_0x5d3f('0xf')](function(_0x5615b2){logger[_0x5d3f('0x9')](_0x5d3f('0x10'),_0x5c7111,_0x247ad0[_0x5d3f('0x11')]['id']);})['catch'](function(_0x4595b6){logger[_0x5d3f('0x12')]('[%s][CLOSE]\x20%s',_0x5c7111,JSON[_0x5d3f('0x13')](_0x4595b6));})[_0x5d3f('0x14')](function(){_0xfb068f[_0x5d3f('0x15')]();});}}catch(_0x54bf5b){logger[_0x5d3f('0x12')](_0x5d3f('0x16'),_0x5c7111,JSON['stringify'](_0x54bf5b));_0xfb068f[_0x5d3f('0x15')]();}};};
\ No newline at end of file
index cac9d34..a9efea8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x814b=['endConversation','error','lodash','moment','apiai-promise','md5','./utils','../../../../config/logger','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','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','channel','whatsapp','phone','chat','ChatWebsiteId','account','upperFirst','AccountId','InteractionId','created','isEmpty','body','Message','then','catch','stringify','finally','[%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','speech','providerResponse','create'];(function(_0x31d353,_0x1d75da){var _0x4c6a72=function(_0x139120){while(--_0x139120){_0x31d353['push'](_0x31d353['shift']());}};_0x4c6a72(++_0x1d75da);}(_0x814b,0x1a2));var _0xb814=function(_0x45ce1a,_0x4f8ea5){_0x45ce1a=_0x45ce1a-0x0;var _0x4926d8=_0x814b[_0x45ce1a];return _0x4926d8;};'use strict';var _=require(_0xb814('0x0'));var moment=require(_0xb814('0x1'));var apiai=require(_0xb814('0x2'));var md5=require(_0xb814('0x3'));var utils=require(_0xb814('0x4'));var logger=require(_0xb814('0x5'))('routing');var rpc={'chatMessage':require(_0xb814('0x6')),'openchannelMessage':require(_0xb814('0x7')),'mailMessage':require(_0xb814('0x8')),'smsMessage':require(_0xb814('0x9')),'faxMessage':require(_0xb814('0xa')),'whatsappMessage':require(_0xb814('0xb'))};exports['consequence']=function(_0x3b0829,_0x2e6272){return function(_0x5c8539){try{if(!_[_0xb814('0xc')](this[_0xb814('0xd')][_0xb814('0xe')])){logger[_0xb814('0xf')](_0xb814('0x10'),_0x3b0829,_0xb814('0x11'));return _0x5c8539[_0xb814('0x12')]();}var _0x19aad8={'ContactId':this[_0xb814('0x13')]['id'],'sentAt':moment()[_0xb814('0x14')](_0xb814('0x15')),'direction':'out'};if(this[_0xb814('0x16')]==='sms'||this[_0xb814('0x16')]===_0xb814('0x17')){_0x19aad8[_0xb814('0x18')]=this[_0xb814('0xd')][_0xb814('0x18')];}var _0x3bde14=this[_0xb814('0x16')];if(_0x3bde14===_0xb814('0x19')){_0x19aad8[_0xb814('0x1a')]=this[_0xb814('0x1b')]['id'];}else{_0x19aad8[_[_0xb814('0x1c')](_0x3bde14)+_0xb814('0x1d')]=this[_0xb814('0x1b')]['id'];}_0x19aad8[_[_0xb814('0x1c')](_0x3bde14)+_0xb814('0x1e')]=this[_0xb814('0xd')]['id'];if(this[_0xb814('0xd')][_0xb814('0x1f')]){var _0x125ce2=_0x2e6272[0x2];if(!_[_0xb814('0x20')](_0x125ce2)){_0x19aad8[_0xb814('0x21')]=utils['getMustacheRender'](_0x125ce2,this);return rpc[_0x3bde14+_0xb814('0x22')]['create'](_0x19aad8)[_0xb814('0x23')](function(_0xfac75b){logger['info']('[%s][DIALOGFLOW]\x20%s',_0x3b0829,_0x19aad8['body']);})[_0xb814('0x24')](function(_0x4d5276){logger['error'](_0xb814('0x10'),_0x3b0829,JSON[_0xb814('0x25')](_0x4d5276));})[_0xb814('0x26')](function(){logger['info'](_0xb814('0x27'),_0x3b0829);_0x5c8539['stop']();});}else{logger[_0xb814('0xf')](_0xb814('0x28'),_0x3b0829);_0x5c8539[_0xb814('0x29')]();}}else{var _0x470e81=this;var _0x27352e=apiai(_0x2e6272[0x0],{'language':_0x2e6272[0x1]||'en'});return _0x27352e[_0xb814('0x2a')](this[_0xb814('0x2b')]['body'],{'sessionId':md5(this[_0xb814('0xd')]['id'])})['then'](function(_0x3f81d0){_0x470e81[_0xb814('0x21')][_0xb814('0x2c')]=_0x3f81d0;_0x19aad8[_0xb814('0x21')]=_0x3f81d0[_0xb814('0x2d')][_0xb814('0x2e')][_0xb814('0x2f')];_0x19aad8['providerName']=_0xb814('0x2c');_0x19aad8[_0xb814('0x30')]=JSON[_0xb814('0x25')](_0x3f81d0);return rpc[_0x3bde14+_0xb814('0x22')][_0xb814('0x31')](_0x19aad8)[_0xb814('0x23')](function(_0x3f0150){logger[_0xb814('0xf')]('[%s][DIALOGFLOW]\x20%s',_0x3b0829,_0x19aad8[_0xb814('0x21')]);if(_0x3f81d0[_0xb814('0x2d')]['metadata'][_0xb814('0x32')]){_0x5c8539[_0xb814('0x12')]();}else{_0x5c8539[_0xb814('0x29')]();}})['catch'](function(_0x20577b){logger[_0xb814('0x33')]('[%s][DIALOGFLOW]\x20%s',_0x3b0829,JSON[_0xb814('0x25')](_0x20577b));_0x5c8539['next']();});})[_0xb814('0x24')](function(_0x5f3e9b){logger['error'](_0xb814('0x10'),_0x3b0829,_0x5f3e9b['message']);_0x5c8539[_0xb814('0x12')]();});}}catch(_0x19469b){logger[_0xb814('0x33')]('[%s][DIALOGFLOW]\x20%s',_0x3b0829,JSON['stringify'](_0x19469b));_0x5c8539[_0xb814('0x29')]();}};};
\ No newline at end of file
+var _0x82f8=['result','fulfillment','speech','providerResponse','metadata','stringify','message','moment','apiai-promise','./utils','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','isNil','UserId','[%s][DIALOGFLOW]\x20%s','next','format','YYYY-MM-DD\x20HH:mm:ss','out','channel','sms','phone','interaction','chat','ChatWebsiteId','upperFirst','AccountId','account','created','isEmpty','body','getMustacheRender','Message','create','then','info','catch','error','finally','[%s][DIALOGFLOW]\x20Welcome\x20Message\x20has\x20been\x20sent!','stop','[%s][DIALOGFLOW]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','dialogflow'];(function(_0x3e5fb8,_0x5aaa24){var _0x4d9c34=function(_0x4d6b64){while(--_0x4d6b64){_0x3e5fb8['push'](_0x3e5fb8['shift']());}};_0x4d9c34(++_0x5aaa24);}(_0x82f8,0x157));var _0x882f=function(_0x20b3e3,_0x1def67){_0x20b3e3=_0x20b3e3-0x0;var _0x125360=_0x82f8[_0x20b3e3];return _0x125360;};'use strict';var _=require('lodash');var moment=require(_0x882f('0x0'));var apiai=require(_0x882f('0x1'));var md5=require('md5');var utils=require(_0x882f('0x2'));var logger=require(_0x882f('0x3'))(_0x882f('0x4'));var rpc={'chatMessage':require(_0x882f('0x5')),'openchannelMessage':require(_0x882f('0x6')),'mailMessage':require(_0x882f('0x7')),'smsMessage':require(_0x882f('0x8')),'faxMessage':require(_0x882f('0x9')),'whatsappMessage':require('../../rpc/whatsappMessage')};exports['consequence']=function(_0x3c414d,_0x2c7ade){return function(_0x3efa94){try{if(!_[_0x882f('0xa')](this['interaction'][_0x882f('0xb')])){logger['info'](_0x882f('0xc'),_0x3c414d,'Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.');return _0x3efa94[_0x882f('0xd')]();}var _0x5e9b49={'ContactId':this['contact']['id'],'sentAt':moment()[_0x882f('0xe')](_0x882f('0xf')),'direction':_0x882f('0x10')};if(this[_0x882f('0x11')]===_0x882f('0x12')||this['channel']==='whatsapp'){_0x5e9b49[_0x882f('0x13')]=this[_0x882f('0x14')][_0x882f('0x13')];}var _0x3f8d44=this[_0x882f('0x11')];if(_0x3f8d44===_0x882f('0x15')){_0x5e9b49[_0x882f('0x16')]=this['account']['id'];}else{_0x5e9b49[_[_0x882f('0x17')](_0x3f8d44)+_0x882f('0x18')]=this[_0x882f('0x19')]['id'];}_0x5e9b49[_[_0x882f('0x17')](_0x3f8d44)+'InteractionId']=this['interaction']['id'];if(this['interaction'][_0x882f('0x1a')]){var _0x187ce1=_0x2c7ade[0x2];if(!_[_0x882f('0x1b')](_0x187ce1)){_0x5e9b49[_0x882f('0x1c')]=utils[_0x882f('0x1d')](_0x187ce1,this);return rpc[_0x3f8d44+_0x882f('0x1e')][_0x882f('0x1f')](_0x5e9b49)[_0x882f('0x20')](function(_0x544fd5){logger[_0x882f('0x21')]('[%s][DIALOGFLOW]\x20%s',_0x3c414d,_0x5e9b49['body']);})[_0x882f('0x22')](function(_0x42aa67){logger[_0x882f('0x23')](_0x882f('0xc'),_0x3c414d,JSON['stringify'](_0x42aa67));})[_0x882f('0x24')](function(){logger[_0x882f('0x21')](_0x882f('0x25'),_0x3c414d);_0x3efa94[_0x882f('0x26')]();});}else{logger[_0x882f('0x21')](_0x882f('0x27'),_0x3c414d);_0x3efa94[_0x882f('0x26')]();}}else{var _0x1dd9e4=this;var _0x251ed0=apiai(_0x2c7ade[0x0],{'language':_0x2c7ade[0x1]||'en'});return _0x251ed0['textRequest'](this['message']['body'],{'sessionId':md5(this[_0x882f('0x14')]['id'])})[_0x882f('0x20')](function(_0x11298b){_0x1dd9e4[_0x882f('0x1c')][_0x882f('0x28')]=_0x11298b;_0x5e9b49[_0x882f('0x1c')]=_0x11298b[_0x882f('0x29')][_0x882f('0x2a')][_0x882f('0x2b')];_0x5e9b49['providerName']=_0x882f('0x28');_0x5e9b49[_0x882f('0x2c')]=JSON['stringify'](_0x11298b);return rpc[_0x3f8d44+'Message'][_0x882f('0x1f')](_0x5e9b49)[_0x882f('0x20')](function(_0xd284e0){logger['info'](_0x882f('0xc'),_0x3c414d,_0x5e9b49[_0x882f('0x1c')]);if(_0x11298b[_0x882f('0x29')][_0x882f('0x2d')]['endConversation']){_0x3efa94[_0x882f('0xd')]();}else{_0x3efa94[_0x882f('0x26')]();}})[_0x882f('0x22')](function(_0x1cb5e3){logger[_0x882f('0x23')](_0x882f('0xc'),_0x3c414d,JSON[_0x882f('0x2e')](_0x1cb5e3));_0x3efa94[_0x882f('0xd')]();});})[_0x882f('0x22')](function(_0x46cb78){logger[_0x882f('0x23')](_0x882f('0xc'),_0x3c414d,_0x46cb78[_0x882f('0x2f')]);_0x3efa94['next']();});}}catch(_0x19c435){logger['error'](_0x882f('0xc'),_0x3c414d,JSON['stringify'](_0x19c435));_0x3efa94['stop']();}};};
\ No newline at end of file
index c226a5e..f4e5918 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x37d4=['isFallback','DIALOGFLOWV2_LANGUAGECODE','languageCode','DIALOGFLOWV2_SCORE','intentDetectionConfidence','providerName','providerResponse','fulfillmentText','all','stack','lodash','dialogflow','md5','bluebird','../../../../config/logger','./utils','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','clone','Message','then','info','[%s][DIALOGFLOWV2]\x20%s','body','catch','error','stringify','consequence','isNil','interaction','UserId','Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.','next','contact','format','YYYY-MM-DD\x20HH:mm:ss','out','channel','sms','phone','chat','ChatWebsiteId','account','upperFirst','InteractionId','isEmpty','getMustacheRender','create','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','fields','boolValue','DIALOGFLOWV2_ACTION','action','allRequiredParamsPresent','DIALOGFLOWV2_ENDCONVERSATION','end_conversation','DIALOGFLOWV2_INTENTNAME','intent','name','DIALOGFLOWV2_INTENTDISPLAYNAME','displayName','DIALOGFLOWV2_ISFALLBACKINTENT'];(function(_0x438685,_0x4ec0c0){var _0x41cca2=function(_0x532003){while(--_0x532003){_0x438685['push'](_0x438685['shift']());}};_0x41cca2(++_0x4ec0c0);}(_0x37d4,0xa4));var _0x437d=function(_0x596108,_0x34e5f1){_0x596108=_0x596108-0x0;var _0x3ea83a=_0x37d4[_0x596108];return _0x3ea83a;};'use strict';var _=require(_0x437d('0x0'));var dialogflow=require(_0x437d('0x1'));var md5=require(_0x437d('0x2'));var moment=require('moment');var Promise=require(_0x437d('0x3'));var logger=require(_0x437d('0x4'))('routing');var utils=require(_0x437d('0x5'));var rpc={'chatMessage':require('../../rpc/chatMessage'),'openchannelMessage':require(_0x437d('0x6')),'mailMessage':require(_0x437d('0x7')),'smsMessage':require(_0x437d('0x8')),'faxMessage':require(_0x437d('0x9')),'whatsappMessage':require(_0x437d('0xa'))};function createMessage(_0x2a70c3,_0x3fd4c3,_0x2912e2,_0x387f03){return new Promise(function(_0x5cee3f,_0x55771f){var _0x192e98=_[_0x437d('0xb')](_0x2912e2);_0x192e98['body']=_0x387f03;return rpc[_0x3fd4c3+_0x437d('0xc')]['create'](_0x192e98)[_0x437d('0xd')](function(){logger[_0x437d('0xe')](_0x437d('0xf'),_0x2a70c3,_0x192e98[_0x437d('0x10')]);_0x5cee3f();})[_0x437d('0x11')](function(_0x46afbc){logger[_0x437d('0x12')]('[%s][DIALOGFLOWV2]\x20%s',_0x2a70c3,JSON[_0x437d('0x13')](_0x46afbc));_0x55771f(_0x46afbc);});});}exports[_0x437d('0x14')]=function(_0x4e6116,_0xd8af69){return function(_0x4ac06d){try{if(!_[_0x437d('0x15')](this[_0x437d('0x16')][_0x437d('0x17')])){logger[_0x437d('0xe')](_0x437d('0xf'),_0x4e6116,_0x437d('0x18'));return _0x4ac06d[_0x437d('0x19')]();}var _0x57e07d={'ContactId':this[_0x437d('0x1a')]['id'],'sentAt':moment()[_0x437d('0x1b')](_0x437d('0x1c')),'direction':_0x437d('0x1d')};if(this[_0x437d('0x1e')]===_0x437d('0x1f')||this[_0x437d('0x1e')]==='whatsapp'){_0x57e07d[_0x437d('0x20')]=this[_0x437d('0x16')][_0x437d('0x20')];}var _0x1a8e5c=this[_0x437d('0x1e')];if(_0x1a8e5c===_0x437d('0x21')){_0x57e07d[_0x437d('0x22')]=this[_0x437d('0x23')]['id'];}else{_0x57e07d[_[_0x437d('0x24')](_0x1a8e5c)+'AccountId']=this[_0x437d('0x23')]['id'];}_0x57e07d[_[_0x437d('0x24')](_0x1a8e5c)+_0x437d('0x25')]=this[_0x437d('0x16')]['id'];if(this[_0x437d('0x16')]['created']){var _0x5d7212=_0xd8af69[0x4];if(!_[_0x437d('0x26')](_0x5d7212)){_0x57e07d['body']=utils[_0x437d('0x27')](_0x5d7212,this);return rpc[_0x1a8e5c+_0x437d('0xc')][_0x437d('0x28')](_0x57e07d)[_0x437d('0xd')](function(_0x48baec){logger[_0x437d('0xe')]('[%s][DIALOGFLOWV2]\x20%s',_0x4e6116,_0x57e07d['body']);})[_0x437d('0x11')](function(_0x4e9960){logger['error'](_0x437d('0xf'),_0x4e6116,JSON['stringify'](_0x4e9960));})[_0x437d('0x29')](function(){logger[_0x437d('0xe')](_0x437d('0x2a'),_0x4e6116);_0x4ac06d[_0x437d('0x2b')]();});}else{logger[_0x437d('0xe')](_0x437d('0x2c'),_0x4e6116);_0x4ac06d[_0x437d('0x2b')]();}}else{var _0x130d76=this;var _0x935147=_0xd8af69[0x2][_0x437d('0x2d')](/\\n/g,'\x0a');var _0x5148e2={'credentials':{'private_key':_0x935147,'client_email':_0xd8af69[0x1]}};var _0x616503=new dialogflow[(_0x437d('0x2e'))](_0x5148e2);var _0x4079d4=_0x616503[_0x437d('0x2f')](_0xd8af69[0x0],md5(_0x130d76['interaction']['id']));var _0x3363ef={'session':_0x4079d4,'queryInput':{'text':{'text':_0x130d76[_0x437d('0x30')][_0x437d('0x10')],'languageCode':_0xd8af69[0x3]||'en'}}};return _0x616503[_0x437d('0x31')](_0x3363ef)[_0x437d('0xd')](function(_0x1e76ba){if(_0x1e76ba&&_0x1e76ba[_0x437d('0x32')]){_0x130d76[_0x437d('0x10')][_0x437d('0x33')]=_0x1e76ba;var _0x59ddf6=_0x1e76ba[0x0];var _0x4d0b60=_0x59ddf6[_0x437d('0x34')][_0x437d('0x35')]&&_0x59ddf6[_0x437d('0x34')][_0x437d('0x35')]['fields']?_0x59ddf6['queryResult'][_0x437d('0x35')][_0x437d('0x36')]['end_conversation'][_0x437d('0x37')]:![];_0x130d76[_0x437d('0x10')][_0x437d('0x38')]=_0x59ddf6['queryResult'][_0x437d('0x39')];_0x130d76['body']['DIALOGFLOWV2_ALLREQUIREDPARAMSPRESENT']=_0x59ddf6['queryResult'][_0x437d('0x3a')];_0x130d76[_0x437d('0x10')][_0x437d('0x3b')]=_0x59ddf6[_0x437d('0x34')][_0x437d('0x35')]&&_0x59ddf6[_0x437d('0x34')]['diagnosticInfo']['fields']?_0x59ddf6['queryResult']['diagnosticInfo']['fields'][_0x437d('0x3c')][_0x437d('0x37')]:![];_0x130d76[_0x437d('0x10')][_0x437d('0x3d')]=_0x59ddf6[_0x437d('0x34')][_0x437d('0x3e')][_0x437d('0x3f')];_0x130d76[_0x437d('0x10')][_0x437d('0x40')]=_0x59ddf6[_0x437d('0x34')][_0x437d('0x3e')][_0x437d('0x41')];_0x130d76['body'][_0x437d('0x42')]=_0x59ddf6[_0x437d('0x34')]['intent'][_0x437d('0x43')];_0x130d76[_0x437d('0x10')][_0x437d('0x44')]=_0x59ddf6[_0x437d('0x34')][_0x437d('0x45')];_0x130d76[_0x437d('0x10')]['DIALOGFLOWV2_QUERYTEXT']=_0x59ddf6[_0x437d('0x34')]['queryText'];_0x130d76[_0x437d('0x10')][_0x437d('0x46')]=_0x59ddf6['queryResult'][_0x437d('0x47')];_0x57e07d[_0x437d('0x48')]=_0x437d('0x33');_0x57e07d[_0x437d('0x49')]=JSON[_0x437d('0x13')](_0x1e76ba);var _0x54533f=[];for(var _0x18b914=0x0;_0x18b914<_0x1e76ba['length'];_0x18b914++){var _0x5444f8=_0x1e76ba[_0x18b914];if(_0x5444f8&&_0x5444f8[_0x437d('0x34')]&&_0x5444f8['queryResult'][_0x437d('0x4a')]){_0x54533f['push'](createMessage(_0x4e6116,_0x1a8e5c,_0x57e07d,_0x5444f8[_0x437d('0x34')]['fulfillmentText']));}}return Promise[_0x437d('0x4b')](_0x54533f)[_0x437d('0xd')](function(){if(_0x4d0b60){_0x4ac06d[_0x437d('0x19')]();}else{_0x4ac06d[_0x437d('0x2b')]();}})[_0x437d('0x11')](function(_0x4d9ca7){logger[_0x437d('0x12')](_0x437d('0xf'),_0x4e6116,JSON[_0x437d('0x13')](_0x4d9ca7));_0x4ac06d[_0x437d('0x19')]();});}})[_0x437d('0x11')](function(_0x22e263){logger[_0x437d('0x12')]('[%s][DIALOGFLOWV2]\x20%s',_0x4e6116,_0x22e263[_0x437d('0x30')],_0x22e263[_0x437d('0x4c')]);_0x4ac06d['next']();});}}catch(_0xd504f7){logger[_0x437d('0x12')](_0x437d('0xf'),_0x4e6116,JSON['stringify'](_0xd504f7));_0x4ac06d[_0x437d('0x2b')]();}};};
\ No newline at end of file
+var _0x4e1b=['../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/whatsappMessage','clone','body','Message','then','info','[%s][DIALOGFLOWV2]\x20%s','catch','stringify','consequence','isNil','Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.','next','contact','format','YYYY-MM-DD\x20HH:mm:ss','sms','channel','phone','account','upperFirst','AccountId','InteractionId','interaction','created','isEmpty','getMustacheRender','create','error','finally','stop','SessionsClient','sessionPath','message','detectIntent','length','diagnosticInfo','queryResult','fields','end_conversation','boolValue','DIALOGFLOWV2_ACTION','action','DIALOGFLOWV2_INTENTNAME','DIALOGFLOWV2_INTENTDISPLAYNAME','intent','displayName','isFallback','DIALOGFLOWV2_LANGUAGECODE','languageCode','DIALOGFLOWV2_QUERYTEXT','queryText','dialogflowV2','providerResponse','fulfillmentText','push','lodash','dialogflow','moment','bluebird','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/openchannelMessage'];(function(_0x5174a7,_0x436825){var _0x3d9464=function(_0x206e8c){while(--_0x206e8c){_0x5174a7['push'](_0x5174a7['shift']());}};_0x3d9464(++_0x436825);}(_0x4e1b,0xbe));var _0xb4e1=function(_0x5d4ef3,_0x32fde6){_0x5d4ef3=_0x5d4ef3-0x0;var _0x3e5160=_0x4e1b[_0x5d4ef3];return _0x3e5160;};'use strict';var _=require(_0xb4e1('0x0'));var dialogflow=require(_0xb4e1('0x1'));var md5=require('md5');var moment=require(_0xb4e1('0x2'));var Promise=require(_0xb4e1('0x3'));var logger=require(_0xb4e1('0x4'))(_0xb4e1('0x5'));var utils=require('./utils');var rpc={'chatMessage':require(_0xb4e1('0x6')),'openchannelMessage':require(_0xb4e1('0x7')),'mailMessage':require(_0xb4e1('0x8')),'smsMessage':require(_0xb4e1('0x9')),'faxMessage':require('../../rpc/faxMessage'),'whatsappMessage':require(_0xb4e1('0xa'))};function createMessage(_0x213694,_0x1cde09,_0x2c7fa3,_0x213763){return new Promise(function(_0x4d9a34,_0x28bc6e){var _0x37d3d6=_[_0xb4e1('0xb')](_0x2c7fa3);_0x37d3d6[_0xb4e1('0xc')]=_0x213763;return rpc[_0x1cde09+_0xb4e1('0xd')]['create'](_0x37d3d6)[_0xb4e1('0xe')](function(){logger[_0xb4e1('0xf')](_0xb4e1('0x10'),_0x213694,_0x37d3d6[_0xb4e1('0xc')]);_0x4d9a34();})[_0xb4e1('0x11')](function(_0x989747){logger['error'](_0xb4e1('0x10'),_0x213694,JSON[_0xb4e1('0x12')](_0x989747));_0x28bc6e(_0x989747);});});}exports[_0xb4e1('0x13')]=function(_0x3558d2,_0x87d6b0){return function(_0x4dcea1){try{if(!_[_0xb4e1('0x14')](this['interaction']['UserId'])){logger[_0xb4e1('0xf')](_0xb4e1('0x10'),_0x3558d2,_0xb4e1('0x15'));return _0x4dcea1[_0xb4e1('0x16')]();}var _0x11c00b={'ContactId':this[_0xb4e1('0x17')]['id'],'sentAt':moment()[_0xb4e1('0x18')](_0xb4e1('0x19')),'direction':'out'};if(this['channel']===_0xb4e1('0x1a')||this[_0xb4e1('0x1b')]==='whatsapp'){_0x11c00b['phone']=this['interaction'][_0xb4e1('0x1c')];}var _0x55cab5=this[_0xb4e1('0x1b')];if(_0x55cab5==='chat'){_0x11c00b['ChatWebsiteId']=this[_0xb4e1('0x1d')]['id'];}else{_0x11c00b[_[_0xb4e1('0x1e')](_0x55cab5)+_0xb4e1('0x1f')]=this[_0xb4e1('0x1d')]['id'];}_0x11c00b[_['upperFirst'](_0x55cab5)+_0xb4e1('0x20')]=this[_0xb4e1('0x21')]['id'];if(this['interaction'][_0xb4e1('0x22')]){var _0x5910e9=_0x87d6b0[0x4];if(!_[_0xb4e1('0x23')](_0x5910e9)){_0x11c00b[_0xb4e1('0xc')]=utils[_0xb4e1('0x24')](_0x5910e9,this);return rpc[_0x55cab5+_0xb4e1('0xd')][_0xb4e1('0x25')](_0x11c00b)[_0xb4e1('0xe')](function(_0xe84aa1){logger[_0xb4e1('0xf')](_0xb4e1('0x10'),_0x3558d2,_0x11c00b['body']);})[_0xb4e1('0x11')](function(_0x211d0a){logger[_0xb4e1('0x26')]('[%s][DIALOGFLOWV2]\x20%s',_0x3558d2,JSON[_0xb4e1('0x12')](_0x211d0a));})[_0xb4e1('0x27')](function(){logger[_0xb4e1('0xf')]('[%s][DIALOGFLOWV2]\x20Welcome\x20Message\x20has\x20been\x20sent!',_0x3558d2);_0x4dcea1[_0xb4e1('0x28')]();});}else{logger['info']('[%s][DIALOGFLOWV2]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!',_0x3558d2);_0x4dcea1[_0xb4e1('0x28')]();}}else{var _0x52e314=this;var _0x343932=_0x87d6b0[0x2]['replace'](/\\n/g,'\x0a');var _0x38292c={'credentials':{'private_key':_0x343932,'client_email':_0x87d6b0[0x1]}};var _0x38abe3=new dialogflow[(_0xb4e1('0x29'))](_0x38292c);var _0x5b1e68=_0x38abe3[_0xb4e1('0x2a')](_0x87d6b0[0x0],md5(_0x52e314[_0xb4e1('0x21')]['id']));var _0x317d1e={'session':_0x5b1e68,'queryInput':{'text':{'text':_0x52e314[_0xb4e1('0x2b')][_0xb4e1('0xc')],'languageCode':_0x87d6b0[0x3]||'en'}}};return _0x38abe3[_0xb4e1('0x2c')](_0x317d1e)[_0xb4e1('0xe')](function(_0xe1c1f8){if(_0xe1c1f8&&_0xe1c1f8[_0xb4e1('0x2d')]){_0x52e314[_0xb4e1('0xc')]['dialogflowV2']=_0xe1c1f8;var _0x17c024=_0xe1c1f8[0x0];var _0x3ec014=_0x17c024['queryResult'][_0xb4e1('0x2e')]&&_0x17c024[_0xb4e1('0x2f')]['diagnosticInfo'][_0xb4e1('0x30')]?_0x17c024['queryResult'][_0xb4e1('0x2e')][_0xb4e1('0x30')][_0xb4e1('0x31')][_0xb4e1('0x32')]:![];_0x52e314['body'][_0xb4e1('0x33')]=_0x17c024[_0xb4e1('0x2f')][_0xb4e1('0x34')];_0x52e314[_0xb4e1('0xc')]['DIALOGFLOWV2_ALLREQUIREDPARAMSPRESENT']=_0x17c024[_0xb4e1('0x2f')]['allRequiredParamsPresent'];_0x52e314['body']['DIALOGFLOWV2_ENDCONVERSATION']=_0x17c024[_0xb4e1('0x2f')][_0xb4e1('0x2e')]&&_0x17c024[_0xb4e1('0x2f')][_0xb4e1('0x2e')][_0xb4e1('0x30')]?_0x17c024['queryResult']['diagnosticInfo'][_0xb4e1('0x30')][_0xb4e1('0x31')][_0xb4e1('0x32')]:![];_0x52e314[_0xb4e1('0xc')][_0xb4e1('0x35')]=_0x17c024[_0xb4e1('0x2f')]['intent']['name'];_0x52e314['body'][_0xb4e1('0x36')]=_0x17c024['queryResult'][_0xb4e1('0x37')][_0xb4e1('0x38')];_0x52e314['body']['DIALOGFLOWV2_ISFALLBACKINTENT']=_0x17c024[_0xb4e1('0x2f')][_0xb4e1('0x37')][_0xb4e1('0x39')];_0x52e314['body'][_0xb4e1('0x3a')]=_0x17c024['queryResult'][_0xb4e1('0x3b')];_0x52e314[_0xb4e1('0xc')][_0xb4e1('0x3c')]=_0x17c024[_0xb4e1('0x2f')][_0xb4e1('0x3d')];_0x52e314[_0xb4e1('0xc')]['DIALOGFLOWV2_SCORE']=_0x17c024[_0xb4e1('0x2f')]['intentDetectionConfidence'];_0x11c00b['providerName']=_0xb4e1('0x3e');_0x11c00b[_0xb4e1('0x3f')]=JSON[_0xb4e1('0x12')](_0xe1c1f8);var _0x13669b=[];for(var _0x42c90d=0x0;_0x42c90d<_0xe1c1f8[_0xb4e1('0x2d')];_0x42c90d++){var _0x401872=_0xe1c1f8[_0x42c90d];if(_0x401872&&_0x401872['queryResult']&&_0x401872['queryResult'][_0xb4e1('0x40')]){_0x13669b[_0xb4e1('0x41')](createMessage(_0x3558d2,_0x55cab5,_0x11c00b,_0x401872['queryResult'][_0xb4e1('0x40')]));}}return Promise['all'](_0x13669b)[_0xb4e1('0xe')](function(){if(_0x3ec014){_0x4dcea1[_0xb4e1('0x16')]();}else{_0x4dcea1[_0xb4e1('0x28')]();}})[_0xb4e1('0x11')](function(_0x1899f6){logger[_0xb4e1('0x26')](_0xb4e1('0x10'),_0x3558d2,JSON[_0xb4e1('0x12')](_0x1899f6));_0x4dcea1[_0xb4e1('0x16')]();});}})[_0xb4e1('0x11')](function(_0x476ebd){logger[_0xb4e1('0x26')](_0xb4e1('0x10'),_0x3558d2,_0x476ebd[_0xb4e1('0x2b')],_0x476ebd['stack']);_0x4dcea1[_0xb4e1('0x16')]();});}}catch(_0x27d3ed){logger['error']('[%s][DIALOGFLOWV2]\x20%s',_0x3558d2,JSON[_0xb4e1('0x12')](_0x27d3ed));_0x4dcea1[_0xb4e1('0x28')]();}};};
\ No newline at end of file
index 5f1637d..785ae2b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x787d=['[%s][GOTOIF]\x20eval\x20error:\x20%s','stringify','./utils','../../../../config/logger','routing','string','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','priority\x20true\x20is\x20a\x20number','consequence','length','[%s][GOTOIF]\x20%s','join','stop','condition','info','next','findIndex','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','error'];(function(_0x1469db,_0x41900c){var _0x38ee99=function(_0x19e5f7){while(--_0x19e5f7){_0x1469db['push'](_0x1469db['shift']());}};_0x38ee99(++_0x41900c);}(_0x787d,0x152));var _0xd787=function(_0x1aed80,_0x3ca6f6){_0x1aed80=_0x1aed80-0x0;var _0x43961e=_0x787d[_0x1aed80];return _0x43961e;};'use strict';var schema=require('validate');var _=require('lodash');var htmlToText=require('html-to-text');var utils=require(_0xd787('0x0'));var logger=require(_0xd787('0x1'))(_0xd787('0x2'));var gotoif=schema({'condition':{'type':_0xd787('0x3'),'required':!![],'message':_0xd787('0x4')},'priorityTrue':{'type':_0xd787('0x5'),'message':_0xd787('0x6')},'priorityFalse':{'type':'number','message':'priority\x20false\x20is\x20a\x20number'}});exports[_0xd787('0x7')]=function(_0x5206e8,_0x4b74e8){return function(_0x3ee77f){try{var _0xbf5017={'condition':htmlToText['fromString'](utils['getMustacheRender'](_0x4b74e8[0x0],this),{'wordwrap':![]})['replace'](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x4b74e8[0x1],'priorityFalse':_0x4b74e8[0x2]};var _0x1eb4d3=gotoif['validate'](_0xbf5017,{'typecast':!![]});if(_0x1eb4d3[_0xd787('0x8')]){logger['error'](_0xd787('0x9'),_0x5206e8,_['map'](_0x1eb4d3,'message')[_0xd787('0xa')](',\x20'));_0x3ee77f[_0xd787('0xb')]();}else{try{var _0x19e483=eval('('+_0xbf5017[_0xd787('0xc')]+')');var _0x359da5=_0x19e483?_0xbf5017['priorityTrue']:_0xbf5017['priorityFalse'];logger[_0xd787('0xd')]('[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s',_0x5206e8,_0xbf5017[_0xd787('0xc')],_0x19e483,_0x359da5||_0xd787('0xe'));if(_0x359da5){var _0x39c6cb=_[_0xd787('0xf')](_0x3ee77f['rules'](),{'p':_0x359da5});if(_0x39c6cb>=0x0){logger[_0xd787('0xd')](_0xd787('0x10'),_0x5206e8,_0x359da5||_0xd787('0xe'),_0x39c6cb);_0x3ee77f[_0xd787('0xe')](_0x39c6cb);}else{logger[_0xd787('0xd')](_0xd787('0x11'),_0x5206e8,_0x359da5||_0xd787('0xe'));_0x3ee77f['stop']();}}else{_0x3ee77f[_0xd787('0xe')]();}}catch(_0x47aed4){logger[_0xd787('0x12')](_0xd787('0x13'),_0x5206e8,_0x47aed4['message']);_0x3ee77f['stop']();}}}catch(_0x3e1dfd){logger[_0xd787('0x12')](_0xd787('0x9'),_0x5206e8,JSON[_0xd787('0x14')](_0x3e1dfd));_0x3ee77f['stop']();}};};
\ No newline at end of file
+var _0x716f=['[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','next','findIndex','rules','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','[%s][GOTOIF]\x20eval\x20error:\x20%s','stringify','validate','lodash','./utils','../../../../config/logger','routing','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','priority\x20true\x20is\x20a\x20number','number','fromString','getMustacheRender','replace','length','error','[%s][GOTOIF]\x20%s','map','message','join','stop','condition','priorityTrue','priorityFalse','info'];(function(_0x50915f,_0x56e705){var _0xe3927=function(_0x34126c){while(--_0x34126c){_0x50915f['push'](_0x50915f['shift']());}};_0xe3927(++_0x56e705);}(_0x716f,0x1f4));var _0xf716=function(_0x54edc9,_0x345f01){_0x54edc9=_0x54edc9-0x0;var _0x2ae7a9=_0x716f[_0x54edc9];return _0x2ae7a9;};'use strict';var schema=require(_0xf716('0x0'));var _=require(_0xf716('0x1'));var htmlToText=require('html-to-text');var utils=require(_0xf716('0x2'));var logger=require(_0xf716('0x3'))(_0xf716('0x4'));var gotoif=schema({'condition':{'type':'string','required':!![],'message':_0xf716('0x5')},'priorityTrue':{'type':'number','message':_0xf716('0x6')},'priorityFalse':{'type':_0xf716('0x7'),'message':'priority\x20false\x20is\x20a\x20number'}});exports['consequence']=function(_0x24f9dc,_0x3b9596){return function(_0x487275){try{var _0x1c1047={'condition':htmlToText[_0xf716('0x8')](utils[_0xf716('0x9')](_0x3b9596[0x0],this),{'wordwrap':![]})[_0xf716('0xa')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x3b9596[0x1],'priorityFalse':_0x3b9596[0x2]};var _0x325a77=gotoif[_0xf716('0x0')](_0x1c1047,{'typecast':!![]});if(_0x325a77[_0xf716('0xb')]){logger[_0xf716('0xc')](_0xf716('0xd'),_0x24f9dc,_[_0xf716('0xe')](_0x325a77,_0xf716('0xf'))[_0xf716('0x10')](',\x20'));_0x487275[_0xf716('0x11')]();}else{try{var _0x5a0302=eval('('+_0x1c1047[_0xf716('0x12')]+')');var _0x3e5b8d=_0x5a0302?_0x1c1047[_0xf716('0x13')]:_0x1c1047[_0xf716('0x14')];logger[_0xf716('0x15')](_0xf716('0x16'),_0x24f9dc,_0x1c1047[_0xf716('0x12')],_0x5a0302,_0x3e5b8d||_0xf716('0x17'));if(_0x3e5b8d){var _0x1a799b=_[_0xf716('0x18')](_0x487275[_0xf716('0x19')](),{'p':_0x3e5b8d});if(_0x1a799b>=0x0){logger[_0xf716('0x15')]('[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s',_0x24f9dc,_0x3e5b8d||_0xf716('0x17'),_0x1a799b);_0x487275[_0xf716('0x17')](_0x1a799b);}else{logger[_0xf716('0x15')](_0xf716('0x1a'),_0x24f9dc,_0x3e5b8d||_0xf716('0x17'));_0x487275['stop']();}}else{_0x487275[_0xf716('0x17')]();}}catch(_0x450f11){logger[_0xf716('0xc')](_0xf716('0x1b'),_0x24f9dc,_0x450f11[_0xf716('0xf')]);_0x487275[_0xf716('0x11')]();}}}catch(_0x59a073){logger[_0xf716('0xc')](_0xf716('0xd'),_0x24f9dc,JSON[_0xf716('0x1c')](_0x59a073));_0x487275[_0xf716('0x11')]();}};};
\ No newline at end of file
index 314ca57..d8343cc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfd64=['stringify','validate','../../../../config/logger','number','consequence','length','error','[%s][GOTOP]\x20%s','message','stop','info','priority','findIndex','[%s][GOTOP]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','next'];(function(_0x4d7f3f,_0x4d2803){var _0x5d67cc=function(_0x2c37f4){while(--_0x2c37f4){_0x4d7f3f['push'](_0x4d7f3f['shift']());}};_0x5d67cc(++_0x4d2803);}(_0xfd64,0x1c3));var _0x4fd6=function(_0x34a8ca,_0xdb1c94){_0x34a8ca=_0x34a8ca-0x0;var _0x37f135=_0xfd64[_0x34a8ca];return _0x37f135;};'use strict';var schema=require(_0x4fd6('0x0'));var _=require('lodash');var logger=require(_0x4fd6('0x1'))('routing');var gotop=schema({'priority':{'type':_0x4fd6('0x2'),'required':!![],'message':'priority\x20is\x20a\x20number\x20and\x20it\x20is\x20required'}});exports[_0x4fd6('0x3')]=function(_0x552520,_0x2b7002){return function(_0x4cf68f){try{var _0x38fd94={'priority':_0x2b7002[0x0]};var _0x163eb3=gotop[_0x4fd6('0x0')](_0x38fd94,{'typecast':!![]});if(_0x163eb3[_0x4fd6('0x4')]){logger[_0x4fd6('0x5')](_0x4fd6('0x6'),_0x552520,_['map'](_0x163eb3,_0x4fd6('0x7'))['join'](',\x20'));_0x4cf68f[_0x4fd6('0x8')]();}else{logger[_0x4fd6('0x9')]('[%s][GOTOP]\x20priority\x20%s',_0x552520,_0x38fd94[_0x4fd6('0xa')]);if(_0x38fd94['priority']){var _0x103dee=_[_0x4fd6('0xb')](_0x4cf68f['rules'](),{'p':_0x38fd94[_0x4fd6('0xa')]});if(_0x103dee>=0x0){logger[_0x4fd6('0x9')](_0x4fd6('0xc'),_0x552520,_0x38fd94['priority']||_0x4fd6('0xd'),_0x103dee);_0x4cf68f['next'](_0x103dee);}else{logger[_0x4fd6('0x9')]('[%s][GOTOP]\x20priority\x20%s\x20not\x20found',_0x552520,_0x38fd94[_0x4fd6('0xa')]||_0x4fd6('0xd'));_0x4cf68f['stop']();}}else{_0x4cf68f['next']();}}}catch(_0x5c56d3){logger[_0x4fd6('0x5')](_0x4fd6('0x6'),_0x552520,JSON[_0x4fd6('0xe')](_0x5c56d3));_0x4cf68f['stop']();}};};
\ No newline at end of file
+var _0x01b8=['priority','findIndex','rules','[%s][GOTOP]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','next','[%s][GOTOP]\x20priority\x20%s\x20not\x20found','stringify','lodash','../../../../config/logger','routing','priority\x20is\x20a\x20number\x20and\x20it\x20is\x20required','consequence','validate','error','[%s][GOTOP]\x20%s','map','message','stop','info','[%s][GOTOP]\x20priority\x20%s'];(function(_0x46ea3a,_0x3477cb){var _0x27cb8a=function(_0x386d1d){while(--_0x386d1d){_0x46ea3a['push'](_0x46ea3a['shift']());}};_0x27cb8a(++_0x3477cb);}(_0x01b8,0x15b));var _0x801b=function(_0x5a7d41,_0x4447e2){_0x5a7d41=_0x5a7d41-0x0;var _0x98d8fa=_0x01b8[_0x5a7d41];return _0x98d8fa;};'use strict';var schema=require('validate');var _=require(_0x801b('0x0'));var logger=require(_0x801b('0x1'))(_0x801b('0x2'));var gotop=schema({'priority':{'type':'number','required':!![],'message':_0x801b('0x3')}});exports[_0x801b('0x4')]=function(_0xb193b6,_0x41927c){return function(_0x3a9f90){try{var _0x30cc24={'priority':_0x41927c[0x0]};var _0x9544bc=gotop[_0x801b('0x5')](_0x30cc24,{'typecast':!![]});if(_0x9544bc['length']){logger[_0x801b('0x6')](_0x801b('0x7'),_0xb193b6,_[_0x801b('0x8')](_0x9544bc,_0x801b('0x9'))['join'](',\x20'));_0x3a9f90[_0x801b('0xa')]();}else{logger[_0x801b('0xb')](_0x801b('0xc'),_0xb193b6,_0x30cc24[_0x801b('0xd')]);if(_0x30cc24[_0x801b('0xd')]){var _0x1b400b=_[_0x801b('0xe')](_0x3a9f90[_0x801b('0xf')](),{'p':_0x30cc24['priority']});if(_0x1b400b>=0x0){logger[_0x801b('0xb')](_0x801b('0x10'),_0xb193b6,_0x30cc24['priority']||'next',_0x1b400b);_0x3a9f90[_0x801b('0x11')](_0x1b400b);}else{logger[_0x801b('0xb')](_0x801b('0x12'),_0xb193b6,_0x30cc24['priority']||_0x801b('0x11'));_0x3a9f90[_0x801b('0xa')]();}}else{_0x3a9f90['next']();}}}catch(_0x269ed8){logger[_0x801b('0x6')](_0x801b('0x7'),_0xb193b6,JSON[_0x801b('0x13')](_0x269ed8));_0x3a9f90[_0x801b('0xa')]();}};};
\ No newline at end of file
index 9b9c089..7b5e0c0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1491=['error','lodash','./utils','../../../../config/logger','routing','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','consequence','getMustacheRender','contact','channel','chat','ChatWebsiteId','account','upperFirst','AccountId','Message','then','info','[%s][MESSAGE]\x20%s','body','next','stringify','stop'];(function(_0x58c513,_0x15deec){var _0x4da4c4=function(_0x112a83){while(--_0x112a83){_0x58c513['push'](_0x58c513['shift']());}};_0x4da4c4(++_0x15deec);}(_0x1491,0x1b1));var _0x1149=function(_0x345c7b,_0x3c1284){_0x345c7b=_0x345c7b-0x0;var _0x514d0f=_0x1491[_0x345c7b];return _0x514d0f;};'use strict';var _=require(_0x1149('0x0'));var utils=require(_0x1149('0x1'));var logger=require(_0x1149('0x2'))(_0x1149('0x3'));var rpc={'chatMessage':require('../../rpc/chatMessage'),'openchannelMessage':require(_0x1149('0x4')),'mailMessage':require(_0x1149('0x5')),'smsMessage':require(_0x1149('0x6')),'faxMessage':require(_0x1149('0x7')),'whatsappMessage':require(_0x1149('0x8'))};exports[_0x1149('0x9')]=function(_0x2bf83d,_0x14b438){return function(_0x1ebf2b){try{var _0xaa7515={'body':utils[_0x1149('0xa')](_0x14b438[0x0],this),'ContactId':this[_0x1149('0xb')]['id']};if(this[_0x1149('0xc')]===_0x1149('0xd')){_0xaa7515[_0x1149('0xe')]=this[_0x1149('0xf')]['id'];}else{_0xaa7515[_[_0x1149('0x10')](this[_0x1149('0xc')])+_0x1149('0x11')]=this['account']['id'];}_0xaa7515[_[_0x1149('0x10')](this['channel'])+'InteractionId']=this['interaction']['id'];if(rpc[this[_0x1149('0xc')]+'Message']){return rpc[this['channel']+_0x1149('0x12')]['create'](_0xaa7515)[_0x1149('0x13')](function(_0x3531e6){logger[_0x1149('0x14')](_0x1149('0x15'),_0x2bf83d,_0xaa7515[_0x1149('0x16')]);_0x1ebf2b[_0x1149('0x17')]();})['catch'](function(_0x4749f1){logger['error']('[%s][MESSAGE]\x20%s',_0x2bf83d,JSON[_0x1149('0x18')](_0x4749f1));_0x1ebf2b[_0x1149('0x19')]();});}}catch(_0x552de8){logger[_0x1149('0x1a')](_0x1149('0x15'),_0x2bf83d,JSON[_0x1149('0x18')](_0x552de8));_0x1ebf2b[_0x1149('0x19')]();}};};
\ No newline at end of file
+var _0x9434=['../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/smsMessage','../../rpc/faxMessage','consequence','contact','channel','chat','ChatWebsiteId','account','AccountId','upperFirst','InteractionId','interaction','Message','create','then','info','[%s][MESSAGE]\x20%s','body','next','error','stringify','stop','lodash','./utils','../../../../config/logger','routing'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x9434,0x168));var _0x4943=function(_0xd1104f,_0x3f2499){_0xd1104f=_0xd1104f-0x0;var _0x5ae5b8=_0x9434[_0xd1104f];return _0x5ae5b8;};'use strict';var _=require(_0x4943('0x0'));var utils=require(_0x4943('0x1'));var logger=require(_0x4943('0x2'))(_0x4943('0x3'));var rpc={'chatMessage':require(_0x4943('0x4')),'openchannelMessage':require(_0x4943('0x5')),'mailMessage':require('../../rpc/mailMessage'),'smsMessage':require(_0x4943('0x6')),'faxMessage':require(_0x4943('0x7')),'whatsappMessage':require('../../rpc/whatsappMessage')};exports[_0x4943('0x8')]=function(_0x43b5b0,_0x4f930e){return function(_0x394d9d){try{var _0x56a55a={'body':utils['getMustacheRender'](_0x4f930e[0x0],this),'ContactId':this[_0x4943('0x9')]['id']};if(this[_0x4943('0xa')]===_0x4943('0xb')){_0x56a55a[_0x4943('0xc')]=this[_0x4943('0xd')]['id'];}else{_0x56a55a[_['upperFirst'](this['channel'])+_0x4943('0xe')]=this[_0x4943('0xd')]['id'];}_0x56a55a[_[_0x4943('0xf')](this['channel'])+_0x4943('0x10')]=this[_0x4943('0x11')]['id'];if(rpc[this['channel']+_0x4943('0x12')]){return rpc[this['channel']+'Message'][_0x4943('0x13')](_0x56a55a)[_0x4943('0x14')](function(_0x33fd73){logger[_0x4943('0x15')](_0x4943('0x16'),_0x43b5b0,_0x56a55a[_0x4943('0x17')]);_0x394d9d[_0x4943('0x18')]();})['catch'](function(_0x902712){logger[_0x4943('0x19')](_0x4943('0x16'),_0x43b5b0,JSON[_0x4943('0x1a')](_0x902712));_0x394d9d[_0x4943('0x1b')]();});}}catch(_0x39b4e3){logger['error'](_0x4943('0x16'),_0x43b5b0,JSON[_0x4943('0x1a')](_0x39b4e3));_0x394d9d[_0x4943('0x1b')]();}};};
\ No newline at end of file
index 90e0219..b6498e4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2945=['routing','consequence','info','getMustacheRender','next','error','stringify','stop','./utils','../../../../config/logger'];(function(_0x577298,_0x351f89){var _0x42c0b0=function(_0x4cd43f){while(--_0x4cd43f){_0x577298['push'](_0x577298['shift']());}};_0x42c0b0(++_0x351f89);}(_0x2945,0x1b6));var _0x5294=function(_0x35fb56,_0x5dadff){_0x35fb56=_0x35fb56-0x0;var _0x2fd52c=_0x2945[_0x35fb56];return _0x2fd52c;};'use strict';var utils=require(_0x5294('0x0'));var logger=require(_0x5294('0x1'))(_0x5294('0x2'));exports[_0x5294('0x3')]=function(_0x52a5f4,_0x417077){return function(_0x5d88e1){try{logger[_0x5294('0x4')]('[%s][NOOP]\x20%s',_0x52a5f4,utils[_0x5294('0x5')](_0x417077[0x0],this));_0x5d88e1[_0x5294('0x6')]();}catch(_0x57890d){logger[_0x5294('0x7')]('[%s][NOOP]\x20%s',_0x52a5f4,JSON[_0x5294('0x8')](_0x57890d));_0x5d88e1[_0x5294('0x9')]();}};};
\ No newline at end of file
+var _0x17b4=['consequence','[%s][NOOP]\x20%s','getMustacheRender','error','stringify','stop','./utils','routing'];(function(_0x1fb5d1,_0x95dbe6){var _0x38611d=function(_0x227056){while(--_0x227056){_0x1fb5d1['push'](_0x1fb5d1['shift']());}};_0x38611d(++_0x95dbe6);}(_0x17b4,0x12e));var _0x417b=function(_0x1d9aa0,_0x272488){_0x1d9aa0=_0x1d9aa0-0x0;var _0x226868=_0x17b4[_0x1d9aa0];return _0x226868;};'use strict';var utils=require(_0x417b('0x0'));var logger=require('../../../../config/logger')(_0x417b('0x1'));exports[_0x417b('0x2')]=function(_0x290633,_0x3cc2d3){return function(_0x5f0669){try{logger['info'](_0x417b('0x3'),_0x290633,utils[_0x417b('0x4')](_0x3cc2d3[0x0],this));_0x5f0669['next']();}catch(_0x730f46){logger[_0x417b('0x5')](_0x417b('0x3'),_0x290633,JSON[_0x417b('0x6')](_0x730f46));_0x5f0669[_0x417b('0x7')]();}};};
\ No newline at end of file
index dba734b..25e56af 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbcf8=['create\x20queue\x20report','waiting','YYYY-MM-DD\x20HH:mm:ss','Interaction','update','update\x20queue\x20report','timeout','[%s][END:QUEUE][NAME:%s]','toLowerCase','consequence','length','map','join','stop','find','Queues','createQueue','atimeout','qtimeout','rules','close','complete','[%s][QUEUE]\x20APPLICATION\x20END','next','strategy','rrmemory','beepall','[%s][QUEUE]\x20queue\x20not\x20found\x20%s','[%s][QUEUE]\x20%s','stack','util','moment','../../../../config/environment','routing','./strategy','defaults','redis','localhost','socket.io-emitter','account','queue','joinAt','emit','clone','queue_id','push','capitalize','format','pick','%s:queue:%s','%s_queue_waiting_interaction:%s','save','../../rpc/chatQueueReport','../../rpc/smsQueueReport','../../rpc/whatsappQueueReport','../../rpc/chatInteraction','../../rpc/faxInteraction','../../rpc/mailInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/whatsappInteraction','string','name\x20is\x20a\x20string\x20and\x20it\x20is\x20required','timeout\x20is\x20a\x20number','body','from','contact','list','upperFirst','channel','QueueId','InteractionId','interaction','MessageId','message','WebsiteId','info','[%s][START:QUEUE][NAME:%s]','name','QueueReport','create','catch','error'];(function(_0x36b7b6,_0x48eca0){var _0x25e8d5=function(_0x4523d6){while(--_0x4523d6){_0x36b7b6['push'](_0x36b7b6['shift']());}};_0x25e8d5(++_0x48eca0);}(_0xbcf8,0x1bd));var _0x8bcf=function(_0x15ddf2,_0x431803){_0x15ddf2=_0x15ddf2-0x0;var _0x2e87dd=_0xbcf8[_0x15ddf2];return _0x2e87dd;};'use strict';var schema=require('validate');var _=require('lodash');var util=require(_0x8bcf('0x0'));var seqqueue=require('seq-queue');var moment=require(_0x8bcf('0x1'));var Redis=require('ioredis');var config=require(_0x8bcf('0x2'));var logger=require('../../../../config/logger')(_0x8bcf('0x3'));var strategy=require(_0x8bcf('0x4'));config['redis']=_[_0x8bcf('0x5')](config[_0x8bcf('0x6')],{'host':_0x8bcf('0x7'),'port':0x18eb});var io=require(_0x8bcf('0x8'))(new Redis(config['redis']));var attributes=['id','queue_id',_0x8bcf('0x9'),_0x8bcf('0xa'),'from',_0x8bcf('0xb')];function emit(_0x1b3012,_0x3a76bd,_0x37b91c){io['to'](_0x1b3012)[_0x8bcf('0xc')](_0x3a76bd,_0x37b91c);}function emitChannelQueueInteraction(_0x128548,_0x1056f8,_0x4fb921,_0x2a79ce,_0x1dfd04,_0x21de11,_0x3e206c,_0x3e6491){var _0x238233=_[_0x8bcf('0xd')](_0x4fb921);_0x238233[_0x8bcf('0xe')]=_0x3e6491;_0x238233[_0x8bcf('0xa')]=_0x1056f8;_0x238233[_0x8bcf('0x9')]=_0x2a79ce;_0x238233['id']=_0x1dfd04;if(_0x21de11){attributes[_0x8bcf('0xf')](_[_0x8bcf('0x10')](_0x128548)+'InteractionId');_0x3e206c[util[_0x8bcf('0x11')]('%sQueuesWaitingInteractions',_0x128548)][_0x1dfd04]=_[_0x8bcf('0x12')](_0x238233,attributes);}else{delete _0x3e206c[util[_0x8bcf('0x11')]('%sQueuesWaitingInteractions',_0x128548)][_0x1dfd04];}emit(util[_0x8bcf('0x11')](_0x8bcf('0x13'),_0x128548,_0x1056f8),util[_0x8bcf('0x11')](_0x8bcf('0x14'),_0x128548,_0x21de11?_0x8bcf('0x15'):'remove'),_[_0x8bcf('0x12')](_0x238233,attributes));}var rpc={'openchannelQueueReport':require('../../rpc/openchannelQueueReport'),'mailQueueReport':require('../../rpc/mailQueueReport'),'chatQueueReport':require(_0x8bcf('0x16')),'smsQueueReport':require(_0x8bcf('0x17')),'faxQueueReport':require('../../rpc/faxQueueReport'),'whatsappQueueReport':require(_0x8bcf('0x18')),'chatInteraction':require(_0x8bcf('0x19')),'faxInteraction':require(_0x8bcf('0x1a')),'mailInteraction':require(_0x8bcf('0x1b')),'openchannelInteraction':require(_0x8bcf('0x1c')),'smsInteraction':require(_0x8bcf('0x1d')),'whatsappInteraction':require(_0x8bcf('0x1e'))};var queue=schema({'name':{'type':_0x8bcf('0x1f'),'required':!![],'message':_0x8bcf('0x20')},'timeout':{'type':'number','message':_0x8bcf('0x21')}});function startRouting(_0x12edf0,_0xf3d779,_0x5bbf74,_0xc460d8){if(_0x12edf0&&_0xf3d779&&_0x5bbf74){_0xf3d779['waiting']+=0x1;var _0xffc4a5={'uniqueid':_0x12edf0,'from':_0x5bbf74[_0x8bcf('0x22')]?_0x5bbf74[_0x8bcf('0x22')][_0x8bcf('0x23')]:'','joinAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x5bbf74[_0x8bcf('0x24')]?_0x5bbf74[_0x8bcf('0x24')]['id']:null,'ListId':_0x5bbf74['list']?_0x5bbf74[_0x8bcf('0x25')]['id']:null};_0xffc4a5[_[_0x8bcf('0x26')](_0x5bbf74[_0x8bcf('0x27')])+_0x8bcf('0x28')]=_0xf3d779['id']||null;_0xffc4a5[_['upperFirst'](_0x5bbf74[_0x8bcf('0x27')])+_0x8bcf('0x29')]=_0x5bbf74[_0x8bcf('0x2a')]?_0x5bbf74['interaction']['id']:null;_0xffc4a5[_[_0x8bcf('0x26')](_0x5bbf74['channel'])+_0x8bcf('0x2b')]=_0x5bbf74['message']?_0x5bbf74[_0x8bcf('0x2c')]['id']:null;_0xffc4a5[_['upperFirst'](_0x5bbf74[_0x8bcf('0x27')])+(_0x5bbf74[_0x8bcf('0x27')]!=='chat'?'AccountId':_0x8bcf('0x2d'))]=_0x5bbf74[_0x8bcf('0x9')]?_0x5bbf74[_0x8bcf('0x9')]['id']:null;logger[_0x8bcf('0x2e')](util['format'](_0x8bcf('0x2f'),_0x12edf0,_0xf3d779['name']));emitChannelQueueInteraction(_0x5bbf74[_0x8bcf('0x27')],_0xf3d779['name'],_0xffc4a5,_0x5bbf74['account'][_0x8bcf('0x30')],_0x5bbf74[_0x8bcf('0x2c')]['id'],!![],_0xc460d8,_0xf3d779['id']);if(rpc[_0x5bbf74[_0x8bcf('0x27')]+_0x8bcf('0x31')]){return rpc[_0x5bbf74[_0x8bcf('0x27')]+_0x8bcf('0x31')][_0x8bcf('0x32')](_0xffc4a5)[_0x8bcf('0x33')](function(_0xa015c3){logger[_0x8bcf('0x34')](_0x8bcf('0x35'),_0xa015c3);});}}}function stopRouting(_0x35c5c8,_0x344f03,_0x591b3d,_0x13ae78){if(_0x35c5c8&&_0x344f03){_0x344f03[_0x8bcf('0x36')]-=0x1;var _0x46ce45={'leaveAt':moment()[_0x8bcf('0x11')](_0x8bcf('0x37')),'acceptAt':moment()[_0x8bcf('0x11')](_0x8bcf('0x37')),'reason':'accepted'};logger[_0x8bcf('0x2e')](util[_0x8bcf('0x11')]('[%s][STOP:QUEUE][NAME:%s]',_0x35c5c8,_0x344f03[_0x8bcf('0x30')]));emitChannelQueueInteraction(_0x591b3d[_0x8bcf('0x27')],_0x344f03[_0x8bcf('0x30')],_0x591b3d[_0x8bcf('0x22')],_0x591b3d[_0x8bcf('0x9')]['name'],_0x591b3d[_0x8bcf('0x2c')]['id'],![],_0x13ae78,_0x344f03['id']);return rpc[_0x591b3d[_0x8bcf('0x27')]+_0x8bcf('0x38')]['update'](_0x591b3d[_0x8bcf('0x2a')]['id'],{'queueId':_0x344f03['id']})['then'](function(){if(rpc[_0x591b3d['channel']+_0x8bcf('0x31')]){return rpc[_0x591b3d[_0x8bcf('0x27')]+_0x8bcf('0x31')][_0x8bcf('0x39')](_0x35c5c8,_0x46ce45)[_0x8bcf('0x33')](function(_0x27fd7f){logger[_0x8bcf('0x34')](_0x8bcf('0x3a'),_0x27fd7f);});}});}}function endRouting(_0x486806,_0x204c72,_0x269fe6,_0x36b092){if(_0x486806&&_0x204c72){_0x204c72[_0x8bcf('0x36')]-=0x1;var _0x4e239a={'leaveAt':moment()[_0x8bcf('0x11')](_0x8bcf('0x37')),'exitAt':moment()['format'](_0x8bcf('0x37')),'reason':_0x8bcf('0x3b')};logger[_0x8bcf('0x2e')](util[_0x8bcf('0x11')](_0x8bcf('0x3c'),_0x486806,_0x204c72[_0x8bcf('0x30')]));emitChannelQueueInteraction(_0x269fe6[_0x8bcf('0x27')],_0x204c72[_0x8bcf('0x30')],_0x269fe6[_0x8bcf('0x22')],_0x269fe6['account'][_0x8bcf('0x30')],_0x269fe6[_0x8bcf('0x2c')]['id'],![],_0x36b092);if(rpc[_0x269fe6[_0x8bcf('0x27')]+_0x8bcf('0x31')]){return rpc[_0x269fe6['channel']+_0x8bcf('0x31')]['update'](_0x486806,_0x4e239a)[_0x8bcf('0x33')](function(_0x220914){logger[_0x8bcf('0x34')](_0x8bcf('0x3a'),_0x220914);});}}}function handleFindQueue(_0x36d74b){return function(_0x4c21a9){return _0x4c21a9['name'][_0x8bcf('0x3d')]()===_0x36d74b[_0x8bcf('0x3d')]();};}exports[_0x8bcf('0x3e')]=function(_0x41ea03,_0x366e1f,_0x4385a5,_0x3482f6){return function(_0x580a71){try{var _0x6cb2c2={'name':_0x366e1f[0x0],'timeout':_0x366e1f[0x1]};var _0x48e6e9=queue['validate'](_0x6cb2c2,{'typecast':!![]});if(_0x48e6e9[_0x8bcf('0x3f')]){logger['error']('[%s][QUEUE]\x20%s',_0x41ea03,_[_0x8bcf('0x40')](_0x48e6e9,'message')[_0x8bcf('0x41')](',\x20'));_0x580a71[_0x8bcf('0x42')]();}else{var _0x167708=_[_0x8bcf('0x43')](_0x4385a5[_0x3482f6[_0x8bcf('0x27')]+_0x8bcf('0x44')],handleFindQueue(_0x6cb2c2[_0x8bcf('0x30')]));if(_0x167708){startRouting(_0x41ea03,_0x167708,_0x3482f6,_0x4385a5);var _0x59a960=(_0x167708[_0x8bcf('0x3b')]||0xa)*0x3e8;var _0x5d9278=(_0x6cb2c2[_0x8bcf('0x3b')]||0x14)*0x3e8;var _0x1d4d70;if(_0x59a960>_0x5d9278){_0x5d9278=_0x59a960;}var _0x5b6059=seqqueue[_0x8bcf('0x45')](_0x59a960);_0x5b6059['id']=_0x41ea03;_0x5b6059[_0x8bcf('0x46')]=_0x59a960;_0x5b6059[_0x8bcf('0x47')]=_0x5d9278;_0x5b6059[_0x8bcf('0x27')]=_0x3482f6[_0x8bcf('0x27')];_0x4385a5[_0x8bcf('0x48')][_0x41ea03]['on']('end',function(){logger[_0x8bcf('0x2e')]('[%s][QUEUE]\x20ROUTING\x20STOPPED',_0x41ea03);stopRouting(_0x41ea03,_0x167708,_0x3482f6,_0x4385a5);clearTimeout(_0x1d4d70);_0x1d4d70=undefined;_0x5b6059[_0x8bcf('0x49')](!![]);if(_0x4385a5[_0x8bcf('0x48')][_0x41ea03]){delete _0x4385a5[_0x8bcf('0x48')][_0x41ea03];}_0x580a71[_0x8bcf('0x42')]();});_0x4385a5['rules'][_0x41ea03]['on'](_0x8bcf('0x4a'),function(){if(_0x4385a5['rules'][_0x41ea03]){delete _0x4385a5['rules'][_0x41ea03];}});_0x1d4d70=setTimeout(function(){logger[_0x8bcf('0x2e')](_0x8bcf('0x4b'),_0x41ea03);endRouting(_0x41ea03,_0x167708,_0x3482f6,_0x4385a5);clearTimeout(_0x1d4d70);_0x5b6059[_0x8bcf('0x49')](!![]);_0x580a71[_0x8bcf('0x4c')]();},_0x5d9278);switch(_0x167708[_0x8bcf('0x4d')]){case _0x8bcf('0x4e'):strategy[_0x8bcf('0x4e')](_0x5b6059,_0x167708,_0x4385a5,_0x3482f6);break;default:strategy[_0x8bcf('0x4f')](_0x5b6059,_0x167708,_0x4385a5,_0x3482f6);}}else{logger[_0x8bcf('0x34')](_0x8bcf('0x50'),_0x41ea03,_0x6cb2c2[_0x8bcf('0x30')]);_0x580a71[_0x8bcf('0x42')]();}}}catch(_0xdab0ec){logger[_0x8bcf('0x34')](_0x8bcf('0x51'),_0x41ea03,_0xdab0ec[_0x8bcf('0x52')]);_0x580a71['stop']();}};};
\ No newline at end of file
+var _0x4262=['%s_queue_waiting_interaction:%s','remove','../../rpc/openchannelQueueReport','../../rpc/chatQueueReport','../../rpc/smsQueueReport','../../rpc/faxQueueReport','../../rpc/whatsappQueueReport','../../rpc/chatInteraction','../../rpc/mailInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/whatsappInteraction','string','number','waiting','body','contact','list','upperFirst','channel','QueueId','InteractionId','interaction','message','WebsiteId','info','[%s][START:QUEUE][NAME:%s]','name','QueueReport','create','catch','create\x20queue\x20report','YYYY-MM-DD\x20HH:mm:ss','accepted','[%s][STOP:QUEUE][NAME:%s]','Interaction','then','update','timeout','[%s][END:QUEUE][NAME:%s]','update\x20queue\x20report','toLowerCase','length','error','[%s][QUEUE]\x20%s','map','join','find','Queues','createQueue','atimeout','end','[%s][QUEUE]\x20ROUTING\x20STOPPED','rules','stop','complete','[%s][QUEUE]\x20APPLICATION\x20END','close','next','rrmemory','beepall','[%s][QUEUE]\x20queue\x20not\x20found\x20%s','stack','validate','lodash','util','seq-queue','../../../../config/environment','routing','redis','localhost','socket.io-emitter','queue_id','account','queue','from','joinAt','emit','clone','capitalize','format','%sQueuesWaitingInteractions','pick'];(function(_0x8a9d3,_0x421a03){var _0x49220e=function(_0x261557){while(--_0x261557){_0x8a9d3['push'](_0x8a9d3['shift']());}};_0x49220e(++_0x421a03);}(_0x4262,0x138));var _0x2426=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x4262[_0x14add3];return _0x4a174f;};'use strict';var schema=require(_0x2426('0x0'));var _=require(_0x2426('0x1'));var util=require(_0x2426('0x2'));var seqqueue=require(_0x2426('0x3'));var moment=require('moment');var Redis=require('ioredis');var config=require(_0x2426('0x4'));var logger=require('../../../../config/logger')(_0x2426('0x5'));var strategy=require('./strategy');config[_0x2426('0x6')]=_['defaults'](config[_0x2426('0x6')],{'host':_0x2426('0x7'),'port':0x18eb});var io=require(_0x2426('0x8'))(new Redis(config[_0x2426('0x6')]));var attributes=['id',_0x2426('0x9'),_0x2426('0xa'),_0x2426('0xb'),_0x2426('0xc'),_0x2426('0xd')];function emit(_0x59053d,_0x19fc5b,_0x134801){io['to'](_0x59053d)[_0x2426('0xe')](_0x19fc5b,_0x134801);}function emitChannelQueueInteraction(_0x1c8795,_0x4a5982,_0x3e783b,_0x447a67,_0x5c1168,_0x253e75,_0x36c298,_0x9d7fd2){var _0x309a5d=_[_0x2426('0xf')](_0x3e783b);_0x309a5d[_0x2426('0x9')]=_0x9d7fd2;_0x309a5d[_0x2426('0xb')]=_0x4a5982;_0x309a5d[_0x2426('0xa')]=_0x447a67;_0x309a5d['id']=_0x5c1168;if(_0x253e75){attributes['push'](_[_0x2426('0x10')](_0x1c8795)+'InteractionId');_0x36c298[util[_0x2426('0x11')](_0x2426('0x12'),_0x1c8795)][_0x5c1168]=_[_0x2426('0x13')](_0x309a5d,attributes);}else{delete _0x36c298[util[_0x2426('0x11')](_0x2426('0x12'),_0x1c8795)][_0x5c1168];}emit(util['format']('%s:queue:%s',_0x1c8795,_0x4a5982),util['format'](_0x2426('0x14'),_0x1c8795,_0x253e75?'save':_0x2426('0x15')),_[_0x2426('0x13')](_0x309a5d,attributes));}var rpc={'openchannelQueueReport':require(_0x2426('0x16')),'mailQueueReport':require('../../rpc/mailQueueReport'),'chatQueueReport':require(_0x2426('0x17')),'smsQueueReport':require(_0x2426('0x18')),'faxQueueReport':require(_0x2426('0x19')),'whatsappQueueReport':require(_0x2426('0x1a')),'chatInteraction':require(_0x2426('0x1b')),'faxInteraction':require('../../rpc/faxInteraction'),'mailInteraction':require(_0x2426('0x1c')),'openchannelInteraction':require(_0x2426('0x1d')),'smsInteraction':require(_0x2426('0x1e')),'whatsappInteraction':require(_0x2426('0x1f'))};var queue=schema({'name':{'type':_0x2426('0x20'),'required':!![],'message':'name\x20is\x20a\x20string\x20and\x20it\x20is\x20required'},'timeout':{'type':_0x2426('0x21'),'message':'timeout\x20is\x20a\x20number'}});function startRouting(_0x46eaa8,_0x3571f3,_0x2b4c13,_0x301786){if(_0x46eaa8&&_0x3571f3&&_0x2b4c13){_0x3571f3[_0x2426('0x22')]+=0x1;var _0x190f8b={'uniqueid':_0x46eaa8,'from':_0x2b4c13[_0x2426('0x23')]?_0x2b4c13[_0x2426('0x23')]['from']:'','joinAt':moment()[_0x2426('0x11')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x2b4c13[_0x2426('0x24')]?_0x2b4c13['contact']['id']:null,'ListId':_0x2b4c13['list']?_0x2b4c13[_0x2426('0x25')]['id']:null};_0x190f8b[_[_0x2426('0x26')](_0x2b4c13[_0x2426('0x27')])+_0x2426('0x28')]=_0x3571f3['id']||null;_0x190f8b[_[_0x2426('0x26')](_0x2b4c13[_0x2426('0x27')])+_0x2426('0x29')]=_0x2b4c13[_0x2426('0x2a')]?_0x2b4c13[_0x2426('0x2a')]['id']:null;_0x190f8b[_[_0x2426('0x26')](_0x2b4c13[_0x2426('0x27')])+'MessageId']=_0x2b4c13[_0x2426('0x2b')]?_0x2b4c13[_0x2426('0x2b')]['id']:null;_0x190f8b[_[_0x2426('0x26')](_0x2b4c13[_0x2426('0x27')])+(_0x2b4c13[_0x2426('0x27')]!=='chat'?'AccountId':_0x2426('0x2c'))]=_0x2b4c13[_0x2426('0xa')]?_0x2b4c13[_0x2426('0xa')]['id']:null;logger[_0x2426('0x2d')](util[_0x2426('0x11')](_0x2426('0x2e'),_0x46eaa8,_0x3571f3[_0x2426('0x2f')]));emitChannelQueueInteraction(_0x2b4c13[_0x2426('0x27')],_0x3571f3[_0x2426('0x2f')],_0x190f8b,_0x2b4c13['account']['name'],_0x2b4c13[_0x2426('0x2b')]['id'],!![],_0x301786,_0x3571f3['id']);if(rpc[_0x2b4c13[_0x2426('0x27')]+_0x2426('0x30')]){return rpc[_0x2b4c13['channel']+_0x2426('0x30')][_0x2426('0x31')](_0x190f8b)[_0x2426('0x32')](function(_0x150b9d){logger['error'](_0x2426('0x33'),_0x150b9d);});}}}function stopRouting(_0x1cd347,_0x278b57,_0x1639a0,_0x3057bd){if(_0x1cd347&&_0x278b57){_0x278b57[_0x2426('0x22')]-=0x1;var _0x15eb04={'leaveAt':moment()[_0x2426('0x11')]('YYYY-MM-DD\x20HH:mm:ss'),'acceptAt':moment()[_0x2426('0x11')](_0x2426('0x34')),'reason':_0x2426('0x35')};logger['info'](util['format'](_0x2426('0x36'),_0x1cd347,_0x278b57[_0x2426('0x2f')]));emitChannelQueueInteraction(_0x1639a0[_0x2426('0x27')],_0x278b57[_0x2426('0x2f')],_0x1639a0['body'],_0x1639a0[_0x2426('0xa')][_0x2426('0x2f')],_0x1639a0[_0x2426('0x2b')]['id'],![],_0x3057bd,_0x278b57['id']);return rpc[_0x1639a0[_0x2426('0x27')]+_0x2426('0x37')]['update'](_0x1639a0[_0x2426('0x2a')]['id'],{'queueId':_0x278b57['id']})[_0x2426('0x38')](function(){if(rpc[_0x1639a0[_0x2426('0x27')]+_0x2426('0x30')]){return rpc[_0x1639a0[_0x2426('0x27')]+_0x2426('0x30')][_0x2426('0x39')](_0x1cd347,_0x15eb04)['catch'](function(_0x2e289f){logger['error']('update\x20queue\x20report',_0x2e289f);});}});}}function endRouting(_0x180f73,_0x40bee6,_0xa3af66,_0x3ef70c){if(_0x180f73&&_0x40bee6){_0x40bee6[_0x2426('0x22')]-=0x1;var _0x35ad90={'leaveAt':moment()[_0x2426('0x11')](_0x2426('0x34')),'exitAt':moment()['format'](_0x2426('0x34')),'reason':_0x2426('0x3a')};logger['info'](util[_0x2426('0x11')](_0x2426('0x3b'),_0x180f73,_0x40bee6[_0x2426('0x2f')]));emitChannelQueueInteraction(_0xa3af66[_0x2426('0x27')],_0x40bee6[_0x2426('0x2f')],_0xa3af66[_0x2426('0x23')],_0xa3af66['account'][_0x2426('0x2f')],_0xa3af66[_0x2426('0x2b')]['id'],![],_0x3ef70c);if(rpc[_0xa3af66[_0x2426('0x27')]+'QueueReport']){return rpc[_0xa3af66['channel']+_0x2426('0x30')][_0x2426('0x39')](_0x180f73,_0x35ad90)[_0x2426('0x32')](function(_0x1b7769){logger['error'](_0x2426('0x3c'),_0x1b7769);});}}}function handleFindQueue(_0xc87cad){return function(_0x15ff0b){return _0x15ff0b['name'][_0x2426('0x3d')]()===_0xc87cad[_0x2426('0x3d')]();};}exports['consequence']=function(_0x406286,_0x56b662,_0x1274da,_0x11db09){return function(_0x5d6005){try{var _0x17912a={'name':_0x56b662[0x0],'timeout':_0x56b662[0x1]};var _0x491183=queue['validate'](_0x17912a,{'typecast':!![]});if(_0x491183[_0x2426('0x3e')]){logger[_0x2426('0x3f')](_0x2426('0x40'),_0x406286,_[_0x2426('0x41')](_0x491183,_0x2426('0x2b'))[_0x2426('0x42')](',\x20'));_0x5d6005['stop']();}else{var _0x5781f5=_[_0x2426('0x43')](_0x1274da[_0x11db09[_0x2426('0x27')]+_0x2426('0x44')],handleFindQueue(_0x17912a[_0x2426('0x2f')]));if(_0x5781f5){startRouting(_0x406286,_0x5781f5,_0x11db09,_0x1274da);var _0x383b49=(_0x5781f5[_0x2426('0x3a')]||0xa)*0x3e8;var _0x4522b5=(_0x17912a[_0x2426('0x3a')]||0x14)*0x3e8;var _0x15d451;if(_0x383b49>_0x4522b5){_0x4522b5=_0x383b49;}var _0x13e424=seqqueue[_0x2426('0x45')](_0x383b49);_0x13e424['id']=_0x406286;_0x13e424[_0x2426('0x46')]=_0x383b49;_0x13e424['qtimeout']=_0x4522b5;_0x13e424[_0x2426('0x27')]=_0x11db09[_0x2426('0x27')];_0x1274da['rules'][_0x406286]['on'](_0x2426('0x47'),function(){logger[_0x2426('0x2d')](_0x2426('0x48'),_0x406286);stopRouting(_0x406286,_0x5781f5,_0x11db09,_0x1274da);clearTimeout(_0x15d451);_0x15d451=undefined;_0x13e424['close'](!![]);if(_0x1274da[_0x2426('0x49')][_0x406286]){delete _0x1274da['rules'][_0x406286];}_0x5d6005[_0x2426('0x4a')]();});_0x1274da['rules'][_0x406286]['on'](_0x2426('0x4b'),function(){if(_0x1274da[_0x2426('0x49')][_0x406286]){delete _0x1274da[_0x2426('0x49')][_0x406286];}});_0x15d451=setTimeout(function(){logger[_0x2426('0x2d')](_0x2426('0x4c'),_0x406286);endRouting(_0x406286,_0x5781f5,_0x11db09,_0x1274da);clearTimeout(_0x15d451);_0x13e424[_0x2426('0x4d')](!![]);_0x5d6005[_0x2426('0x4e')]();},_0x4522b5);switch(_0x5781f5['strategy']){case _0x2426('0x4f'):strategy[_0x2426('0x4f')](_0x13e424,_0x5781f5,_0x1274da,_0x11db09);break;default:strategy[_0x2426('0x50')](_0x13e424,_0x5781f5,_0x1274da,_0x11db09);}}else{logger[_0x2426('0x3f')](_0x2426('0x51'),_0x406286,_0x17912a[_0x2426('0x2f')]);_0x5d6005['stop']();}}}catch(_0x70a08){logger[_0x2426('0x3f')](_0x2426('0x40'),_0x406286,_0x70a08[_0x2426('0x52')]);_0x5d6005[_0x2426('0x4a')]();}};};
\ No newline at end of file
index ee192c9..10fa763 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x29d4=['routing','notificationId','squeue','agent','realtime','push','bind','timeout','handleDrained','prototype','handleRun','[%s][AGENT]\x20try\x20with\x20%s','isNil','agents','debug','forcedOwnership','isAgentAvailable','channel','busy','busyQueue','saveWaitingNotification','showNotification','RINGING',':FORCED','[%s][AGENT]\x20agent\x20%s\x20is\x20not\x20available','[%s][AGENT]\x20agent\x20skipped,\x20unknown\x20id\x20%s','[%s][AGENT]\x20timeout\x20with\x20%s','hideNotification','removeWaitingNotification','STOP','TIMEOUT','exports','lodash','./util','../../../../../config/logger'];(function(_0x13958f,_0x3144bf){var _0x3de5bc=function(_0x1dc61f){while(--_0x1dc61f){_0x13958f['push'](_0x13958f['shift']());}};_0x3de5bc(++_0x3144bf);}(_0x29d4,0x1a1));var _0x429d=function(_0x5783f4,_0x4a9e0a){_0x5783f4=_0x5783f4-0x0;var _0x28e380=_0x29d4[_0x5783f4];return _0x28e380;};'use strict';var _=require(_0x429d('0x0'));var uuid=require('uuid');var util=require(_0x429d('0x1'));var logger=require(_0x429d('0x2'))(_0x429d('0x3'));var Agent=function(_0x472fc9,_0x45df1c,_0x4e287b,_0xc3989d){this[_0x429d('0x4')]=uuid['v4']();this[_0x429d('0x5')]=_0x472fc9;this[_0x429d('0x6')]=_0x45df1c;this[_0x429d('0x7')]=_0x4e287b;this[_0x429d('0x3')]=_0xc3989d;this[_0x429d('0x5')][_0x429d('0x8')](this['handleRun'][_0x429d('0x9')](this),this['handleTimeout'][_0x429d('0x9')](this));this[_0x429d('0x5')]['on'](_0x429d('0xa'),this['handleTimeout'][_0x429d('0x9')](this));this[_0x429d('0x5')]['on']('drained',this[_0x429d('0xb')][_0x429d('0x9')](this));};Agent[_0x429d('0xc')]['push']=function(){this[_0x429d('0x5')][_0x429d('0x8')](this[_0x429d('0xd')][_0x429d('0x9')](this),this['handleTimeout'][_0x429d('0x9')](this));};Agent[_0x429d('0xc')][_0x429d('0xb')]=function(){this['handleTimeout'](!![]);};Agent[_0x429d('0xc')][_0x429d('0xd')]=function(){logger['debug'](_0x429d('0xe'),this[_0x429d('0x5')]['id'],this[_0x429d('0x6')]['id']);if(_[_0x429d('0xf')](this[_0x429d('0x7')][_0x429d('0x10')][this['agent']['id']])){logger[_0x429d('0x11')]('[%s][AGENT]\x20agent\x20skipped,\x20unknown\x20id\x20%s',this[_0x429d('0x5')]['id'],this[_0x429d('0x6')]['id']);setTimeout(this[_0x429d('0x8')][_0x429d('0x9')](this),0x3e8);}else{if(this['routing'][_0x429d('0x12')]||util[_0x429d('0x13')](this[_0x429d('0x5')]['id'],this['realtime'][_0x429d('0x10')][this[_0x429d('0x6')]['id']],this[_0x429d('0x5')][_0x429d('0x14')],![])){this[_0x429d('0x7')][_0x429d('0x10')][this['agent']['id']][_0x429d('0x15')]=!![];this[_0x429d('0x7')][_0x429d('0x10')][this['agent']['id']][_0x429d('0x16')]=undefined;util[_0x429d('0x17')](this[_0x429d('0x7')],this[_0x429d('0x3')],this[_0x429d('0x6')],this[_0x429d('0x5')]['channel']);util[_0x429d('0x18')](this[_0x429d('0x4')],this['squeue']['id'],this[_0x429d('0x7')][_0x429d('0x10')][this[_0x429d('0x6')]['id']],null,this[_0x429d('0x3')]);util['writeLog'](this[_0x429d('0x5')]['id'],this[_0x429d('0x7')][_0x429d('0x10')][this[_0x429d('0x6')]['id']],_0x429d('0x19')+(this['routing'][_0x429d('0x12')]?_0x429d('0x1a'):''));}else{logger[_0x429d('0x11')](_0x429d('0x1b'),this[_0x429d('0x5')]['id'],this[_0x429d('0x6')]['id']);setTimeout(this[_0x429d('0x8')][_0x429d('0x9')](this),0x3e8);}}};Agent[_0x429d('0xc')]['handleTimeout']=function(_0x31cae6){if(_[_0x429d('0xf')](this['realtime'][_0x429d('0x10')][this[_0x429d('0x6')]['id']])){return logger[_0x429d('0x11')](_0x429d('0x1c'),this[_0x429d('0x5')]['id'],this['agent']['id']);}else{logger[_0x429d('0x11')](_0x429d('0x1d'),this[_0x429d('0x5')]['id'],this[_0x429d('0x6')]['id']);util[_0x429d('0x1e')](this[_0x429d('0x4')],this['squeue']['id'],this['realtime'][_0x429d('0x10')][this[_0x429d('0x6')]['id']],null,this['routing']);this['realtime'][_0x429d('0x10')][this['agent']['id']][_0x429d('0x15')]=![];this[_0x429d('0x7')][_0x429d('0x10')][this[_0x429d('0x6')]['id']]['busyQueue']=undefined;util[_0x429d('0x1f')](this[_0x429d('0x7')],this['routing'],this['agent'],this['squeue']['channel']);util['writeLog'](this[_0x429d('0x5')]['id'],this['realtime']['agents'][this[_0x429d('0x6')]['id']],_0x31cae6?_0x429d('0x20'):_0x429d('0x21'));}if(!_0x31cae6){setTimeout(this[_0x429d('0x8')][_0x429d('0x9')](this),0x3e8);}};function agent(_0x1a5d80,_0x4b23ab,_0x423dc8,_0x2c5fa5){return new Agent(_0x1a5d80,_0x4b23ab,_0x423dc8,_0x2c5fa5);}module[_0x429d('0x22')]=agent;
\ No newline at end of file
+var _0x2d17=['routing','notificationId','agent','squeue','handleRun','bind','handleTimeout','timeout','drained','handleDrained','prototype','push','debug','[%s][AGENT]\x20try\x20with\x20%s','isNil','realtime','agents','forcedOwnership','channel','busy','saveWaitingNotification','showNotification','writeLog',':FORCED','[%s][AGENT]\x20agent\x20%s\x20is\x20not\x20available','[%s][AGENT]\x20timeout\x20with\x20%s','hideNotification','busyQueue','removeWaitingNotification','STOP','TIMEOUT','exports','lodash','uuid','../../../../../config/logger'];(function(_0x6942ea,_0x3674a7){var _0x467695=function(_0x489c39){while(--_0x489c39){_0x6942ea['push'](_0x6942ea['shift']());}};_0x467695(++_0x3674a7);}(_0x2d17,0x17e));var _0x72d1=function(_0x2eca50,_0x46b0ce){_0x2eca50=_0x2eca50-0x0;var _0x192d0f=_0x2d17[_0x2eca50];return _0x192d0f;};'use strict';var _=require(_0x72d1('0x0'));var uuid=require(_0x72d1('0x1'));var util=require('./util');var logger=require(_0x72d1('0x2'))(_0x72d1('0x3'));var Agent=function(_0x531f4e,_0x3687bc,_0x38fec7,_0x55b722){this[_0x72d1('0x4')]=uuid['v4']();this['squeue']=_0x531f4e;this[_0x72d1('0x5')]=_0x3687bc;this['realtime']=_0x38fec7;this[_0x72d1('0x3')]=_0x55b722;this[_0x72d1('0x6')]['push'](this[_0x72d1('0x7')][_0x72d1('0x8')](this),this[_0x72d1('0x9')]['bind'](this));this[_0x72d1('0x6')]['on'](_0x72d1('0xa'),this[_0x72d1('0x9')]['bind'](this));this[_0x72d1('0x6')]['on'](_0x72d1('0xb'),this[_0x72d1('0xc')][_0x72d1('0x8')](this));};Agent[_0x72d1('0xd')][_0x72d1('0xe')]=function(){this[_0x72d1('0x6')][_0x72d1('0xe')](this[_0x72d1('0x7')][_0x72d1('0x8')](this),this['handleTimeout'][_0x72d1('0x8')](this));};Agent[_0x72d1('0xd')][_0x72d1('0xc')]=function(){this[_0x72d1('0x9')](!![]);};Agent[_0x72d1('0xd')][_0x72d1('0x7')]=function(){logger[_0x72d1('0xf')](_0x72d1('0x10'),this[_0x72d1('0x6')]['id'],this[_0x72d1('0x5')]['id']);if(_[_0x72d1('0x11')](this[_0x72d1('0x12')][_0x72d1('0x13')][this['agent']['id']])){logger[_0x72d1('0xf')]('[%s][AGENT]\x20agent\x20skipped,\x20unknown\x20id\x20%s',this[_0x72d1('0x6')]['id'],this[_0x72d1('0x5')]['id']);setTimeout(this['push'][_0x72d1('0x8')](this),0x3e8);}else{if(this[_0x72d1('0x3')][_0x72d1('0x14')]||util['isAgentAvailable'](this['squeue']['id'],this[_0x72d1('0x12')][_0x72d1('0x13')][this[_0x72d1('0x5')]['id']],this[_0x72d1('0x6')][_0x72d1('0x15')],![])){this[_0x72d1('0x12')][_0x72d1('0x13')][this['agent']['id']][_0x72d1('0x16')]=!![];this['realtime']['agents'][this['agent']['id']]['busyQueue']=undefined;util[_0x72d1('0x17')](this[_0x72d1('0x12')],this['routing'],this[_0x72d1('0x5')],this[_0x72d1('0x6')][_0x72d1('0x15')]);util[_0x72d1('0x18')](this[_0x72d1('0x4')],this['squeue']['id'],this['realtime'][_0x72d1('0x13')][this[_0x72d1('0x5')]['id']],null,this[_0x72d1('0x3')]);util[_0x72d1('0x19')](this[_0x72d1('0x6')]['id'],this[_0x72d1('0x12')][_0x72d1('0x13')][this['agent']['id']],'RINGING'+(this[_0x72d1('0x3')]['forcedOwnership']?_0x72d1('0x1a'):''));}else{logger[_0x72d1('0xf')](_0x72d1('0x1b'),this['squeue']['id'],this[_0x72d1('0x5')]['id']);setTimeout(this['push'][_0x72d1('0x8')](this),0x3e8);}}};Agent[_0x72d1('0xd')][_0x72d1('0x9')]=function(_0x2cc0c8){if(_['isNil'](this[_0x72d1('0x12')]['agents'][this[_0x72d1('0x5')]['id']])){return logger[_0x72d1('0xf')]('[%s][AGENT]\x20agent\x20skipped,\x20unknown\x20id\x20%s',this[_0x72d1('0x6')]['id'],this[_0x72d1('0x5')]['id']);}else{logger[_0x72d1('0xf')](_0x72d1('0x1c'),this[_0x72d1('0x6')]['id'],this['agent']['id']);util[_0x72d1('0x1d')](this[_0x72d1('0x4')],this[_0x72d1('0x6')]['id'],this['realtime'][_0x72d1('0x13')][this[_0x72d1('0x5')]['id']],null,this['routing']);this[_0x72d1('0x12')][_0x72d1('0x13')][this[_0x72d1('0x5')]['id']]['busy']=![];this[_0x72d1('0x12')]['agents'][this[_0x72d1('0x5')]['id']][_0x72d1('0x1e')]=undefined;util[_0x72d1('0x1f')](this[_0x72d1('0x12')],this[_0x72d1('0x3')],this[_0x72d1('0x5')],this[_0x72d1('0x6')][_0x72d1('0x15')]);util[_0x72d1('0x19')](this[_0x72d1('0x6')]['id'],this[_0x72d1('0x12')]['agents'][this[_0x72d1('0x5')]['id']],_0x2cc0c8?_0x72d1('0x20'):_0x72d1('0x21'));}if(!_0x2cc0c8){setTimeout(this[_0x72d1('0xe')]['bind'](this),0x3e8);}};function agent(_0x3eb3da,_0x3ae025,_0x2783bb,_0x4fb07b){return new Agent(_0x3eb3da,_0x3ae025,_0x2783bb,_0x4fb07b);}module[_0x72d1('0x22')]=agent;
\ No newline at end of file
index 9f7508a..7dbda71 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf341=['timeout','handleTimeout','drained','prototype','handleDrained','isNil','Agents','length','agents','[%s][QUEUE]\x20agent\x20skipped,\x20unknown\x20id\x20%s','RINGING','busyQueue','debug','[%s][QUEUE]\x20ALL\x20AGENTS\x20ARE\x20BUSY','[%s][QUEUE]\x20EMPTY','hideNotification','writeLog','busy','removeWaitingNotification','channel','exports','lodash','uuid','./util','routing','notificationId','queue','realtime','push','handleRun','bind','squeue'];(function(_0x437931,_0x5810db){var _0x11d9cd=function(_0x30ac5e){while(--_0x30ac5e){_0x437931['push'](_0x437931['shift']());}};_0x11d9cd(++_0x5810db);}(_0xf341,0xd5));var _0x1f34=function(_0x135efb,_0xcf705e){_0x135efb=_0x135efb-0x0;var _0x416593=_0xf341[_0x135efb];return _0x416593;};'use strict';var _=require(_0x1f34('0x0'));var uuid=require(_0x1f34('0x1'));var util=require(_0x1f34('0x2'));var logger=require('../../../../../config/logger')(_0x1f34('0x3'));var Beepall=function(_0x59c365,_0x456736,_0x45b158,_0x4da220){this[_0x1f34('0x4')]=uuid['v4']();this['squeue']=_0x59c365;this[_0x1f34('0x5')]=_0x456736;this[_0x1f34('0x6')]=_0x45b158;this['routing']=_0x4da220;this['squeue'][_0x1f34('0x7')](this[_0x1f34('0x8')][_0x1f34('0x9')](this),this['handleTimeout'][_0x1f34('0x9')](this));this[_0x1f34('0xa')]['on'](_0x1f34('0xb'),this[_0x1f34('0xc')]['bind'](this));this[_0x1f34('0xa')]['on'](_0x1f34('0xd'),this['handleDrained'][_0x1f34('0x9')](this));};Beepall[_0x1f34('0xe')]['push']=function(){this[_0x1f34('0xa')]['push'](this[_0x1f34('0x8')]['bind'](this),this[_0x1f34('0xc')]['bind'](this));};Beepall[_0x1f34('0xe')][_0x1f34('0xf')]=function(){this[_0x1f34('0xc')](!![]);};Beepall[_0x1f34('0xe')][_0x1f34('0x8')]=function(){var _0x5271fb=!![];if(!_[_0x1f34('0x10')](this[_0x1f34('0x5')])&&!_[_0x1f34('0x10')](this[_0x1f34('0x5')]['Agents'])&&this[_0x1f34('0x5')][_0x1f34('0x11')][_0x1f34('0x12')]>0x0){for(var _0x529ce2=0x0,_0x4eb832;_0x529ce2<this[_0x1f34('0x5')]['Agents'][_0x1f34('0x12')];_0x529ce2+=0x1){_0x4eb832=this[_0x1f34('0x5')][_0x1f34('0x11')][_0x529ce2]['id'];if(_[_0x1f34('0x10')](this[_0x1f34('0x6')][_0x1f34('0x13')][_0x4eb832])){logger['debug'](_0x1f34('0x14'),this[_0x1f34('0xa')]['id'],_0x4eb832);}else{if(util['isAgentAvailable'](this[_0x1f34('0xa')]['id'],this[_0x1f34('0x6')][_0x1f34('0x13')][_0x4eb832],this['squeue']['channel'],!![])){_0x5271fb=![];util['writeLog'](this[_0x1f34('0xa')]['id'],this[_0x1f34('0x6')][_0x1f34('0x13')][_0x4eb832],_0x1f34('0x15'));this[_0x1f34('0x6')]['agents'][_0x4eb832]['busy']=!![];this['realtime'][_0x1f34('0x13')][_0x4eb832][_0x1f34('0x16')]=this[_0x1f34('0x5')]['name'];util['saveWaitingNotification'](this[_0x1f34('0x6')],this['routing'],this[_0x1f34('0x5')]['Agents'][_0x529ce2],this[_0x1f34('0xa')]['channel']);util['showNotification'](this[_0x1f34('0x4')],this[_0x1f34('0xa')]['id'],this[_0x1f34('0x6')]['agents'][_0x4eb832],this[_0x1f34('0x5')],this['routing']);}}}if(_0x5271fb){logger[_0x1f34('0x17')](_0x1f34('0x18'),this['squeue']['id']);setTimeout(this['push'][_0x1f34('0x9')](this),0x3e8);}}else{logger[_0x1f34('0x17')](_0x1f34('0x19'),this[_0x1f34('0xa')]['id']);setTimeout(this['push'][_0x1f34('0x9')](this),0x3e8);}};Beepall['prototype'][_0x1f34('0xc')]=function(_0x4b9983){if(!_['isNil'](this[_0x1f34('0x5')])&&!_['isNil'](this[_0x1f34('0x5')][_0x1f34('0x11')])){for(var _0x17c242=0x0,_0x171882;_0x17c242<this[_0x1f34('0x5')][_0x1f34('0x11')][_0x1f34('0x12')];_0x17c242+=0x1){_0x171882=this['queue'][_0x1f34('0x11')][_0x17c242]['id'];if(_['isNil'](this[_0x1f34('0x6')][_0x1f34('0x13')][_0x171882])){logger[_0x1f34('0x17')]('[%s][QUEUE]\x20agent\x20skipped,\x20unknown\x20id\x20%s',this[_0x1f34('0xa')]['id'],_0x171882);}else{util[_0x1f34('0x1a')](this['notificationId'],this[_0x1f34('0xa')]['id'],this[_0x1f34('0x6')]['agents'][_0x171882],this['queue'],this[_0x1f34('0x3')]);util[_0x1f34('0x1b')](this[_0x1f34('0xa')]['id'],this[_0x1f34('0x6')]['agents'][_0x171882],_0x4b9983?'STOP':'TIMEOUT');this[_0x1f34('0x6')][_0x1f34('0x13')][_0x171882][_0x1f34('0x1c')]=![];this[_0x1f34('0x6')][_0x1f34('0x13')][_0x171882][_0x1f34('0x16')]=undefined;util[_0x1f34('0x1d')](this['realtime'],this[_0x1f34('0x3')],this['realtime'][_0x1f34('0x13')][_0x171882],this[_0x1f34('0xa')][_0x1f34('0x1e')]);}}}if(!_0x4b9983){setTimeout(this['push'][_0x1f34('0x9')](this),0x3e8);}};function beepall(_0x100e3b,_0x159c87,_0x52df01,_0x17cb61){return new Beepall(_0x100e3b,_0x159c87,_0x52df01,_0x17cb61);}module[_0x1f34('0x1f')]=beepall;
\ No newline at end of file
+var _0xb05b=['busyQueue','showNotification','notificationId','hideNotification','STOP','TIMEOUT','channel','exports','lodash','uuid','./util','routing','squeue','realtime','handleRun','bind','timeout','handleTimeout','drained','handleDrained','prototype','push','isNil','Agents','queue','length','agents','debug','[%s][QUEUE]\x20agent\x20skipped,\x20unknown\x20id\x20%s','isAgentAvailable','writeLog','RINGING','busy'];(function(_0x5d5216,_0x295ce5){var _0x154b76=function(_0x2a3f47){while(--_0x2a3f47){_0x5d5216['push'](_0x5d5216['shift']());}};_0x154b76(++_0x295ce5);}(_0xb05b,0x110));var _0xbb05=function(_0x9d53fb,_0x4b898b){_0x9d53fb=_0x9d53fb-0x0;var _0x12f955=_0xb05b[_0x9d53fb];return _0x12f955;};'use strict';var _=require(_0xbb05('0x0'));var uuid=require(_0xbb05('0x1'));var util=require(_0xbb05('0x2'));var logger=require('../../../../../config/logger')(_0xbb05('0x3'));var Beepall=function(_0xb7189,_0x17b5ef,_0x1b9a6d,_0x5989e1){this['notificationId']=uuid['v4']();this[_0xbb05('0x4')]=_0xb7189;this['queue']=_0x17b5ef;this[_0xbb05('0x5')]=_0x1b9a6d;this['routing']=_0x5989e1;this[_0xbb05('0x4')]['push'](this[_0xbb05('0x6')][_0xbb05('0x7')](this),this['handleTimeout']['bind'](this));this[_0xbb05('0x4')]['on'](_0xbb05('0x8'),this[_0xbb05('0x9')][_0xbb05('0x7')](this));this[_0xbb05('0x4')]['on'](_0xbb05('0xa'),this[_0xbb05('0xb')][_0xbb05('0x7')](this));};Beepall[_0xbb05('0xc')][_0xbb05('0xd')]=function(){this[_0xbb05('0x4')][_0xbb05('0xd')](this[_0xbb05('0x6')][_0xbb05('0x7')](this),this[_0xbb05('0x9')][_0xbb05('0x7')](this));};Beepall[_0xbb05('0xc')]['handleDrained']=function(){this['handleTimeout'](!![]);};Beepall[_0xbb05('0xc')][_0xbb05('0x6')]=function(){var _0x33641f=!![];if(!_[_0xbb05('0xe')](this['queue'])&&!_[_0xbb05('0xe')](this['queue'][_0xbb05('0xf')])&&this[_0xbb05('0x10')][_0xbb05('0xf')][_0xbb05('0x11')]>0x0){for(var _0x440a0f=0x0,_0x441bb9;_0x440a0f<this[_0xbb05('0x10')][_0xbb05('0xf')][_0xbb05('0x11')];_0x440a0f+=0x1){_0x441bb9=this[_0xbb05('0x10')][_0xbb05('0xf')][_0x440a0f]['id'];if(_[_0xbb05('0xe')](this[_0xbb05('0x5')][_0xbb05('0x12')][_0x441bb9])){logger[_0xbb05('0x13')](_0xbb05('0x14'),this[_0xbb05('0x4')]['id'],_0x441bb9);}else{if(util[_0xbb05('0x15')](this[_0xbb05('0x4')]['id'],this[_0xbb05('0x5')]['agents'][_0x441bb9],this[_0xbb05('0x4')]['channel'],!![])){_0x33641f=![];util[_0xbb05('0x16')](this[_0xbb05('0x4')]['id'],this[_0xbb05('0x5')][_0xbb05('0x12')][_0x441bb9],_0xbb05('0x17'));this[_0xbb05('0x5')]['agents'][_0x441bb9][_0xbb05('0x18')]=!![];this[_0xbb05('0x5')]['agents'][_0x441bb9][_0xbb05('0x19')]=this[_0xbb05('0x10')]['name'];util['saveWaitingNotification'](this['realtime'],this['routing'],this['queue'][_0xbb05('0xf')][_0x440a0f],this[_0xbb05('0x4')]['channel']);util[_0xbb05('0x1a')](this[_0xbb05('0x1b')],this[_0xbb05('0x4')]['id'],this[_0xbb05('0x5')][_0xbb05('0x12')][_0x441bb9],this['queue'],this[_0xbb05('0x3')]);}}}if(_0x33641f){logger['debug']('[%s][QUEUE]\x20ALL\x20AGENTS\x20ARE\x20BUSY',this['squeue']['id']);setTimeout(this['push'][_0xbb05('0x7')](this),0x3e8);}}else{logger['debug']('[%s][QUEUE]\x20EMPTY',this['squeue']['id']);setTimeout(this[_0xbb05('0xd')][_0xbb05('0x7')](this),0x3e8);}};Beepall[_0xbb05('0xc')][_0xbb05('0x9')]=function(_0x1c485b){if(!_[_0xbb05('0xe')](this[_0xbb05('0x10')])&&!_[_0xbb05('0xe')](this[_0xbb05('0x10')][_0xbb05('0xf')])){for(var _0x4e8263=0x0,_0x478509;_0x4e8263<this[_0xbb05('0x10')][_0xbb05('0xf')][_0xbb05('0x11')];_0x4e8263+=0x1){_0x478509=this['queue'][_0xbb05('0xf')][_0x4e8263]['id'];if(_[_0xbb05('0xe')](this[_0xbb05('0x5')]['agents'][_0x478509])){logger[_0xbb05('0x13')](_0xbb05('0x14'),this[_0xbb05('0x4')]['id'],_0x478509);}else{util[_0xbb05('0x1c')](this['notificationId'],this[_0xbb05('0x4')]['id'],this[_0xbb05('0x5')][_0xbb05('0x12')][_0x478509],this['queue'],this[_0xbb05('0x3')]);util[_0xbb05('0x16')](this[_0xbb05('0x4')]['id'],this['realtime']['agents'][_0x478509],_0x1c485b?_0xbb05('0x1d'):_0xbb05('0x1e'));this[_0xbb05('0x5')][_0xbb05('0x12')][_0x478509][_0xbb05('0x18')]=![];this[_0xbb05('0x5')][_0xbb05('0x12')][_0x478509][_0xbb05('0x19')]=undefined;util['removeWaitingNotification'](this[_0xbb05('0x5')],this[_0xbb05('0x3')],this[_0xbb05('0x5')][_0xbb05('0x12')][_0x478509],this['squeue'][_0xbb05('0x1f')]);}}}if(!_0x1c485b){setTimeout(this[_0xbb05('0xd')][_0xbb05('0x7')](this),0x3e8);}};function beepall(_0x3f38e3,_0x413331,_0x1db287,_0x3ef207){return new Beepall(_0x3f38e3,_0x413331,_0x1db287,_0x3ef207);}module[_0xbb05('0x20')]=beepall;
\ No newline at end of file
index a449368..bc185ed 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6c54=['./agent','exports','./rrmemory'];(function(_0x95002d,_0x151b82){var _0x319eb2=function(_0x383788){while(--_0x383788){_0x95002d['push'](_0x95002d['shift']());}};_0x319eb2(++_0x151b82);}(_0x6c54,0x121));var _0x46c5=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x6c54[_0x14add3];return _0x4a174f;};'use strict';module[_0x46c5('0x0')]={'rrmemory':require(_0x46c5('0x1')),'beepall':require('./beepall'),'agent':require(_0x46c5('0x2'))};
\ No newline at end of file
+var _0xeda8=['./rrmemory','./beepall'];(function(_0x3580ef,_0x44b612){var _0x4de299=function(_0x563b21){while(--_0x563b21){_0x3580ef['push'](_0x3580ef['shift']());}};_0x4de299(++_0x44b612);}(_0xeda8,0x16e));var _0x8eda=function(_0x1a552a,_0x10878d){_0x1a552a=_0x1a552a-0x0;var _0x53ad58=_0xeda8[_0x1a552a];return _0x53ad58;};'use strict';module['exports']={'rrmemory':require(_0x8eda('0x0')),'beepall':require(_0x8eda('0x1')),'agent':require('./agent')};
\ No newline at end of file
index 4306673..8ff3f8d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x96ff=['saveWaitingNotification','showNotification','notificationId','[%s][QUEUE]\x20timeout\x20with\x20%s','[%s][QUEUE]\x20agent\x20skipped,\x20unknown\x20id\x20%s','hideNotification','TIMEOUT','removeWaitingNotification','exports','lodash','./util','../../../../../config/logger','routing','queue','intervals','squeue','push','handleRun','bind','handleTimeout','module','timeout','drained','prototype','handleDrained','handleCheckReject','isAgentAvailable','agents','agentId','debug','[%s][QUEUE]\x20available\x20again\x20%s','done','mapAgentsId','[%s][QUEUE]\x20try\x20with\x20%s','isNil','realtime','channel','busy','busyQueue','name'];(function(_0x1d9974,_0x3ededa){var _0x4cb52f=function(_0x226ed4){while(--_0x226ed4){_0x1d9974['push'](_0x1d9974['shift']());}};_0x4cb52f(++_0x3ededa);}(_0x96ff,0x199));var _0xf96f=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x96ff[_0x2641f9];return _0x585741;};'use strict';var rr=require('rr');var _=require(_0xf96f('0x0'));var uuid=require('uuid');var util=require(_0xf96f('0x1'));var logger=require(_0xf96f('0x2'))(_0xf96f('0x3'));var RRMemory=function(_0x46844b,_0x35e9f5,_0x299d33,_0x2fbe25){this['notificationId']=uuid['v4']();this['squeue']=_0x46844b;this[_0xf96f('0x4')]=_0x35e9f5;this['realtime']=_0x299d33;this[_0xf96f('0x3')]=_0x2fbe25;this[_0xf96f('0x5')]={};this[_0xf96f('0x6')][_0xf96f('0x7')](this[_0xf96f('0x8')][_0xf96f('0x9')](this),this[_0xf96f('0xa')][_0xf96f('0x9')](this),this[_0xf96f('0xb')]);this['squeue']['on'](_0xf96f('0xc'),this[_0xf96f('0xa')][_0xf96f('0x9')](this));this[_0xf96f('0x6')]['on'](_0xf96f('0xd'),this['handleDrained'][_0xf96f('0x9')](this));};RRMemory[_0xf96f('0xe')][_0xf96f('0x7')]=function(){this[_0xf96f('0x6')][_0xf96f('0x7')](this[_0xf96f('0x8')]['bind'](this),this['handleTimeout'][_0xf96f('0x9')](this));};RRMemory[_0xf96f('0xe')][_0xf96f('0xf')]=function(){this['handleTimeout'](!![]);};RRMemory[_0xf96f('0xe')][_0xf96f('0x10')]=function(_0x4baa40){if(util[_0xf96f('0x11')](this[_0xf96f('0x6')]['id'],this['realtime'][_0xf96f('0x12')][this[_0xf96f('0x13')]],this[_0xf96f('0x6')]['channel'],!![])){logger[_0xf96f('0x14')](_0xf96f('0x15'),this[_0xf96f('0x6')]['id'],this['agentId']);clearInterval(this[_0xf96f('0x5')][this['agentId']]);_0x4baa40[_0xf96f('0x16')]();setTimeout(this[_0xf96f('0x7')][_0xf96f('0x9')](this),0x3e8);}};RRMemory[_0xf96f('0xe')]['handleRun']=function(_0x306c55){this[_0xf96f('0x13')]=rr(this[_0xf96f('0x4')][_0xf96f('0x17')]);logger[_0xf96f('0x14')](_0xf96f('0x18'),this[_0xf96f('0x6')]['id'],this[_0xf96f('0x13')]);if(_[_0xf96f('0x19')](this[_0xf96f('0x1a')]['agents'][this[_0xf96f('0x13')]])){logger['debug']('[%s][QUEUE]\x20agent\x20skipped,\x20unknown\x20id\x20%s',this['squeue']['id'],this[_0xf96f('0x13')]);_0x306c55[_0xf96f('0x16')]();setTimeout(this[_0xf96f('0x7')][_0xf96f('0x9')](this),0x3e8);}else{if(util[_0xf96f('0x11')](this[_0xf96f('0x6')]['id'],this['realtime'][_0xf96f('0x12')][this[_0xf96f('0x13')]],this[_0xf96f('0x6')][_0xf96f('0x1b')],!![])){this[_0xf96f('0x1a')][_0xf96f('0x12')][this[_0xf96f('0x13')]][_0xf96f('0x1c')]=!![];this[_0xf96f('0x1a')][_0xf96f('0x12')][this[_0xf96f('0x13')]][_0xf96f('0x1d')]=this[_0xf96f('0x4')][_0xf96f('0x1e')];util[_0xf96f('0x1f')](this['realtime'],this[_0xf96f('0x3')],this[_0xf96f('0x1a')][_0xf96f('0x12')][this['agentId']],this['squeue'][_0xf96f('0x1b')]);util[_0xf96f('0x20')](this[_0xf96f('0x21')],this[_0xf96f('0x6')]['id'],this['realtime'][_0xf96f('0x12')][this[_0xf96f('0x13')]],this[_0xf96f('0x4')],this[_0xf96f('0x3')]);util['writeLog'](this[_0xf96f('0x6')]['id'],this[_0xf96f('0x1a')][_0xf96f('0x12')][this[_0xf96f('0x13')]],'RINGING');this[_0xf96f('0x5')][this[_0xf96f('0x13')]]=setInterval(this[_0xf96f('0x10')][_0xf96f('0x9')](this,_0x306c55),0x3e8);}else{logger[_0xf96f('0x14')]('[%s][QUEUE]\x20agent\x20skipped,\x20not\x20available\x20id\x20%s',this[_0xf96f('0x6')]['id'],this[_0xf96f('0x13')]);_0x306c55['done']();setTimeout(this[_0xf96f('0x7')][_0xf96f('0x9')](this),0x3e8);}}};RRMemory['prototype']['handleTimeout']=function(_0x4a86e4){logger[_0xf96f('0x14')](_0xf96f('0x22'),this[_0xf96f('0x6')]['id'],this[_0xf96f('0x13')]);if(_[_0xf96f('0x19')](this[_0xf96f('0x1a')][_0xf96f('0x12')][this['agentId']])){logger['debug'](_0xf96f('0x23'),this[_0xf96f('0x6')]['id'],this[_0xf96f('0x13')]);}else{clearInterval(this[_0xf96f('0x5')][this[_0xf96f('0x13')]]);util[_0xf96f('0x24')](this[_0xf96f('0x21')],this[_0xf96f('0x6')]['id'],this[_0xf96f('0x1a')][_0xf96f('0x12')][this['agentId']],this['queue'],this['routing']);util['writeLog'](this[_0xf96f('0x6')]['id'],this[_0xf96f('0x1a')]['agents'][this[_0xf96f('0x13')]],_0xf96f('0x25'));this[_0xf96f('0x1a')][_0xf96f('0x12')][this[_0xf96f('0x13')]]['busy']=![];this[_0xf96f('0x1a')]['agents'][this[_0xf96f('0x13')]]['busyQueue']=undefined;util[_0xf96f('0x26')](this[_0xf96f('0x1a')],this[_0xf96f('0x3')],this[_0xf96f('0x1a')][_0xf96f('0x12')][this[_0xf96f('0x13')]],this[_0xf96f('0x6')][_0xf96f('0x1b')]);}if(!_0x4a86e4){setTimeout(this['push']['bind'](this),0x3e8);}};function rrmemory(_0x251436,_0x3d5157,_0x17d698,_0x1bb8c1){return new RRMemory(_0x251436,_0x3d5157,_0x17d698,_0x1bb8c1);}module[_0xf96f('0x27')]=rrmemory;
\ No newline at end of file
+var _0xf37e=['timeout','drained','handleDrained','prototype','handleCheckReject','isAgentAvailable','agents','channel','debug','[%s][QUEUE]\x20available\x20again\x20%s','agentId','done','[%s][QUEUE]\x20agent\x20skipped,\x20unknown\x20id\x20%s','showNotification','writeLog','RINGING','[%s][QUEUE]\x20agent\x20skipped,\x20not\x20available\x20id\x20%s','isNil','hideNotification','notificationId','TIMEOUT','busy','busyQueue','removeWaitingNotification','exports','lodash','./util','../../../../../config/logger','routing','queue','realtime','intervals','push','handleRun','bind','handleTimeout','module','squeue'];(function(_0x4800d3,_0x1fb329){var _0x488e2f=function(_0xaeae52){while(--_0xaeae52){_0x4800d3['push'](_0x4800d3['shift']());}};_0x488e2f(++_0x1fb329);}(_0xf37e,0x123));var _0xef37=function(_0x4a7021,_0x542dfa){_0x4a7021=_0x4a7021-0x0;var _0x1fb6ae=_0xf37e[_0x4a7021];return _0x1fb6ae;};'use strict';var rr=require('rr');var _=require(_0xef37('0x0'));var uuid=require('uuid');var util=require(_0xef37('0x1'));var logger=require(_0xef37('0x2'))(_0xef37('0x3'));var RRMemory=function(_0x4b8121,_0x3f559a,_0x4c8106,_0xb8afb0){this['notificationId']=uuid['v4']();this['squeue']=_0x4b8121;this[_0xef37('0x4')]=_0x3f559a;this[_0xef37('0x5')]=_0x4c8106;this[_0xef37('0x3')]=_0xb8afb0;this[_0xef37('0x6')]={};this['squeue'][_0xef37('0x7')](this[_0xef37('0x8')][_0xef37('0x9')](this),this[_0xef37('0xa')]['bind'](this),this[_0xef37('0xb')]);this[_0xef37('0xc')]['on'](_0xef37('0xd'),this['handleTimeout'][_0xef37('0x9')](this));this['squeue']['on'](_0xef37('0xe'),this[_0xef37('0xf')][_0xef37('0x9')](this));};RRMemory[_0xef37('0x10')][_0xef37('0x7')]=function(){this[_0xef37('0xc')]['push'](this['handleRun'][_0xef37('0x9')](this),this[_0xef37('0xa')][_0xef37('0x9')](this));};RRMemory[_0xef37('0x10')][_0xef37('0xf')]=function(){this['handleTimeout'](!![]);};RRMemory[_0xef37('0x10')][_0xef37('0x11')]=function(_0x12507b){if(util[_0xef37('0x12')](this['squeue']['id'],this[_0xef37('0x5')][_0xef37('0x13')][this['agentId']],this[_0xef37('0xc')][_0xef37('0x14')],!![])){logger[_0xef37('0x15')](_0xef37('0x16'),this[_0xef37('0xc')]['id'],this[_0xef37('0x17')]);clearInterval(this[_0xef37('0x6')][this[_0xef37('0x17')]]);_0x12507b[_0xef37('0x18')]();setTimeout(this[_0xef37('0x7')][_0xef37('0x9')](this),0x3e8);}};RRMemory['prototype'][_0xef37('0x8')]=function(_0x85b9a6){this[_0xef37('0x17')]=rr(this[_0xef37('0x4')]['mapAgentsId']);logger[_0xef37('0x15')]('[%s][QUEUE]\x20try\x20with\x20%s',this[_0xef37('0xc')]['id'],this['agentId']);if(_['isNil'](this[_0xef37('0x5')][_0xef37('0x13')][this['agentId']])){logger['debug'](_0xef37('0x19'),this[_0xef37('0xc')]['id'],this[_0xef37('0x17')]);_0x85b9a6[_0xef37('0x18')]();setTimeout(this[_0xef37('0x7')][_0xef37('0x9')](this),0x3e8);}else{if(util[_0xef37('0x12')](this[_0xef37('0xc')]['id'],this[_0xef37('0x5')]['agents'][this[_0xef37('0x17')]],this[_0xef37('0xc')][_0xef37('0x14')],!![])){this[_0xef37('0x5')]['agents'][this[_0xef37('0x17')]]['busy']=!![];this['realtime']['agents'][this[_0xef37('0x17')]]['busyQueue']=this[_0xef37('0x4')]['name'];util['saveWaitingNotification'](this['realtime'],this[_0xef37('0x3')],this[_0xef37('0x5')][_0xef37('0x13')][this[_0xef37('0x17')]],this[_0xef37('0xc')][_0xef37('0x14')]);util[_0xef37('0x1a')](this['notificationId'],this['squeue']['id'],this[_0xef37('0x5')][_0xef37('0x13')][this[_0xef37('0x17')]],this['queue'],this[_0xef37('0x3')]);util[_0xef37('0x1b')](this[_0xef37('0xc')]['id'],this[_0xef37('0x5')][_0xef37('0x13')][this[_0xef37('0x17')]],_0xef37('0x1c'));this[_0xef37('0x6')][this['agentId']]=setInterval(this[_0xef37('0x11')][_0xef37('0x9')](this,_0x85b9a6),0x3e8);}else{logger[_0xef37('0x15')](_0xef37('0x1d'),this[_0xef37('0xc')]['id'],this[_0xef37('0x17')]);_0x85b9a6[_0xef37('0x18')]();setTimeout(this['push'][_0xef37('0x9')](this),0x3e8);}}};RRMemory['prototype'][_0xef37('0xa')]=function(_0x15c25a){logger['debug']('[%s][QUEUE]\x20timeout\x20with\x20%s',this[_0xef37('0xc')]['id'],this['agentId']);if(_[_0xef37('0x1e')](this[_0xef37('0x5')]['agents'][this[_0xef37('0x17')]])){logger[_0xef37('0x15')](_0xef37('0x19'),this[_0xef37('0xc')]['id'],this[_0xef37('0x17')]);}else{clearInterval(this['intervals'][this[_0xef37('0x17')]]);util[_0xef37('0x1f')](this[_0xef37('0x20')],this[_0xef37('0xc')]['id'],this[_0xef37('0x5')][_0xef37('0x13')][this[_0xef37('0x17')]],this['queue'],this[_0xef37('0x3')]);util['writeLog'](this[_0xef37('0xc')]['id'],this[_0xef37('0x5')][_0xef37('0x13')][this[_0xef37('0x17')]],_0xef37('0x21'));this[_0xef37('0x5')][_0xef37('0x13')][this['agentId']][_0xef37('0x22')]=![];this['realtime'][_0xef37('0x13')][this[_0xef37('0x17')]][_0xef37('0x23')]=undefined;util[_0xef37('0x24')](this['realtime'],this[_0xef37('0x3')],this[_0xef37('0x5')][_0xef37('0x13')][this[_0xef37('0x17')]],this[_0xef37('0xc')][_0xef37('0x14')]);}if(!_0x15c25a){setTimeout(this[_0xef37('0x7')][_0xef37('0x9')](this),0x3e8);}};function rrmemory(_0x2372b5,_0x4649be,_0x4e1428,_0xc6f5f7){return new RRMemory(_0x2372b5,_0x4649be,_0x4e1428,_0xc6f5f7);}module[_0xef37('0x25')]=rrmemory;
\ No newline at end of file
index 6d9998d..08db436 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcefd=['notificationSound','body','queue','msg','getMustacheRender','notificationTemplate','I\x20can\x27t\x20render\x20your\x20template','error','format','[%s][QUEUE]\x20%s','message','user:%s','emit','notification:%s','save','debug','[%s][QUEUE][AGENT:%s][STATUS:%s]','isAgentAvailable','busy','BUSY','online','OFFLINE','Pause','PAUSE','hasOwnProperty','Capacity','CurrentCapacity','toUpperCase','showNotification','hideNotification','interaction','channel','QueuesWaitingInteractions','capitalize','agents','some','WaitingInteractions','saveWaitingNotification','writeLog','lodash','util','../utils','../../../../../config/environment','../../../../../config/logger','routing','defaults','redis','localhost','\x20interaction','name','account'];(function(_0x590941,_0x1981e0){var _0x43c7bc=function(_0x1cd545){while(--_0x1cd545){_0x590941['push'](_0x590941['shift']());}};_0x43c7bc(++_0x1981e0);}(_0xcefd,0x126));var _0xdcef=function(_0xce2ee4,_0x3fe1e1){_0xce2ee4=_0xce2ee4-0x0;var _0x3fd000=_0xcefd[_0xce2ee4];return _0x3fd000;};'use strict';var _=require(_0xdcef('0x0'));var util=require(_0xdcef('0x1'));var utils=require(_0xdcef('0x2'));var Redis=require('ioredis');var config=require(_0xdcef('0x3'));var logger=require(_0xdcef('0x4'))(_0xdcef('0x5'));config['redis']=_[_0xdcef('0x6')](config[_0xdcef('0x7')],{'host':_0xdcef('0x8'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xdcef('0x7')]));function sendNotification(_0xcaa40a,_0x3fb1b7,_0x3260fe,_0x53e707,_0x56ee48,_0x8b30d4){var _0x2ad7b0=_0x8b30d4||{};var _0x16fd14=_0x3260fe['split']('.');var _0x1946c9={'uniqueid':_0x3fb1b7,'channel':_0x16fd14[0x0],'id':_0x16fd14[0x1],'title':_0x16fd14[0x0]+_0xdcef('0x9'),'interactionId':_0x16fd14[0x2],'queue':_0x56ee48?_0x56ee48[_0xdcef('0xa')]:null,'sound':_0x2ad7b0[_0xdcef('0xb')][_0xdcef('0xc')],'shake':_0x2ad7b0[_0xdcef('0xb')]['notificationShake']};try{if(!_0x2ad7b0['body']){_0x2ad7b0[_0xdcef('0xd')]={};}if(_0x56ee48){_0x2ad7b0[_0xdcef('0xd')]['queue']=_0x56ee48;}else if(_0x2ad7b0[_0xdcef('0xd')]['queue']){delete _0x2ad7b0['body'][_0xdcef('0xe')];}_0x1946c9[_0xdcef('0xf')]=utils[_0xdcef('0x10')](_0x2ad7b0[_0xdcef('0xb')][_0xdcef('0x11')],_0x2ad7b0);}catch(_0x3b6adf){_0x1946c9[_0xdcef('0xf')]=_0xdcef('0x12');logger[_0xdcef('0x13')](util[_0xdcef('0x14')](_0xdcef('0x15'),_0x3fb1b7,_0x3b6adf[_0xdcef('0x16')]));}io['to'](util['format'](_0xdcef('0x17'),_0x53e707['name']))[_0xdcef('0x18')](util[_0xdcef('0x14')](_0xdcef('0x19'),_0xcaa40a?_0xdcef('0x1a'):'remove'),_0x1946c9);}function writeLog(_0x4e320e,_0xe8e3a3,_0x19283a){return logger[_0xdcef('0x1b')](util[_0xdcef('0x14')](_0xdcef('0x1c'),_0x4e320e,_0xe8e3a3[_0xdcef('0xa')],_0x19283a));}exports[_0xdcef('0x1d')]=function(_0x510d1e,_0x417de7,_0x3160bf,_0x5865e9){if(_0x417de7[_0xdcef('0x1e')]){writeLog(_0x510d1e,_0x417de7,_0xdcef('0x1f'));return![];}if(!_0x417de7[_0xdcef('0x20')]){writeLog(_0x510d1e,_0x417de7,_0xdcef('0x21'));return![];}if(_0x417de7[_0x3160bf+_0xdcef('0x22')]){writeLog(_0x510d1e,_0x417de7,_0xdcef('0x23'));return![];}if(_0x5865e9&&_0x417de7[_0xdcef('0x24')](_0x3160bf+_0xdcef('0x25'))&&_0x417de7[_0xdcef('0x24')](_0x3160bf+_0xdcef('0x26'))){if(_0x417de7[_0x3160bf+_0xdcef('0x25')]>0x0&&_0x417de7[_0x3160bf+_0xdcef('0x26')]>=_0x417de7[_0x3160bf+_0xdcef('0x25')]){writeLog(_0x510d1e,_0x417de7,_0x3160bf[_0xdcef('0x27')]()+'\x20MAXCAPACITY');return![];}}return!![];};exports[_0xdcef('0x28')]=function(_0x392cba,_0x313593,_0x50fdcb,_0x86b996,_0x2f8e0c){return sendNotification(!![],_0x392cba,_0x313593,_0x50fdcb,_0x86b996,_0x2f8e0c);};exports[_0xdcef('0x29')]=function(_0x1f80fe,_0x1b71c5,_0x7fce54,_0x560534,_0x4ef0d5){return sendNotification(![],_0x1f80fe,_0x1b71c5,_0x7fce54,_0x560534,_0x4ef0d5);};exports['checkWaitingNotifications']=function(_0x34ea2f,_0x46942b,_0x21f960){var _0x2aadc3=_0x46942b[_0xdcef('0x2a')]['UserId'];if(!_0x2aadc3&&_0x21f960){_0x2aadc3=_0x21f960['id'];}var _0xc6bbb3=_['some'](_0x34ea2f[_0x46942b[_0xdcef('0x2b')]+_0xdcef('0x2c')],function(_0x1d2801){var _0x5821bc=_[_0xdcef('0x2d')](_0x46942b[_0xdcef('0x2b')])+'InteractionId';return _0x1d2801[_0x5821bc]===_0x46942b['interaction']['id'];});if(!_0xc6bbb3&&_0x2aadc3&&_0x34ea2f[_0xdcef('0x2e')][_0x2aadc3]){_0xc6bbb3=_[_0xdcef('0x2f')](_0x34ea2f[_0xdcef('0x2e')][_0x2aadc3][_0x46942b[_0xdcef('0x2b')]+_0xdcef('0x30')],function(_0xe253ee){return _0xe253ee['id']===_0x46942b['interaction']['id'];});}return _0xc6bbb3;};exports[_0xdcef('0x31')]=function(_0x5e28f5,_0x346026,_0x55cc14,_0x5cf507){if(_0x55cc14&&_0x55cc14['id']&&_0x5e28f5[_0xdcef('0x2e')]&&_0x5e28f5[_0xdcef('0x2e')][_0x55cc14['id']]){_0x5e28f5[_0xdcef('0x2e')][_0x55cc14['id']][_0x5cf507+_0xdcef('0x30')][_0x346026['message']['id']]={'id':_0x346026['interaction']['id']};}};exports['removeWaitingNotification']=function(_0x147b29,_0x31ddd4,_0x590b5f,_0x5cb328){if(_0x590b5f&&_0x590b5f['id']&&_0x147b29[_0xdcef('0x2e')]&&_0x147b29['agents'][_0x590b5f['id']]){delete _0x147b29[_0xdcef('0x2e')][_0x590b5f['id']][_0x5cb328+_0xdcef('0x30')][_0x31ddd4[_0xdcef('0x16')]['id']];}};exports[_0xdcef('0x32')]=writeLog;
\ No newline at end of file
+var _0xd983=['util','../utils','ioredis','../../../../../config/environment','redis','defaults','localhost','socket.io-emitter','split','\x20interaction','notificationSound','account','notificationShake','body','queue','msg','getMustacheRender','notificationTemplate','format','[%s][QUEUE]\x20%s','message','user:%s','name','notification:%s','save','remove','debug','[%s][QUEUE][AGENT:%s][STATUS:%s]','isAgentAvailable','busy','online','OFFLINE','hasOwnProperty','Capacity','CurrentCapacity','interaction','UserId','some','QueuesWaitingInteractions','capitalize','InteractionId','agents','channel','WaitingInteractions','saveWaitingNotification','removeWaitingNotification','writeLog','lodash'];(function(_0x3476f8,_0x3ea112){var _0x11a31e=function(_0xfff28c){while(--_0xfff28c){_0x3476f8['push'](_0x3476f8['shift']());}};_0x11a31e(++_0x3ea112);}(_0xd983,0x1df));var _0x3d98=function(_0x5ded4b,_0x37628b){_0x5ded4b=_0x5ded4b-0x0;var _0x1d8af1=_0xd983[_0x5ded4b];return _0x1d8af1;};'use strict';var _=require(_0x3d98('0x0'));var util=require(_0x3d98('0x1'));var utils=require(_0x3d98('0x2'));var Redis=require(_0x3d98('0x3'));var config=require(_0x3d98('0x4'));var logger=require('../../../../../config/logger')('routing');config[_0x3d98('0x5')]=_[_0x3d98('0x6')](config[_0x3d98('0x5')],{'host':_0x3d98('0x7'),'port':0x18eb});var io=require(_0x3d98('0x8'))(new Redis(config[_0x3d98('0x5')]));function sendNotification(_0x394587,_0x5452ef,_0x3f5c17,_0x270312,_0xd1051d,_0x216a00){var _0x1a9f37=_0x216a00||{};var _0x1371ac=_0x3f5c17[_0x3d98('0x9')]('.');var _0x477e2b={'uniqueid':_0x5452ef,'channel':_0x1371ac[0x0],'id':_0x1371ac[0x1],'title':_0x1371ac[0x0]+_0x3d98('0xa'),'interactionId':_0x1371ac[0x2],'queue':_0xd1051d?_0xd1051d['name']:null,'sound':_0x1a9f37['account'][_0x3d98('0xb')],'shake':_0x1a9f37[_0x3d98('0xc')][_0x3d98('0xd')]};try{if(!_0x1a9f37[_0x3d98('0xe')]){_0x1a9f37['body']={};}if(_0xd1051d){_0x1a9f37['body'][_0x3d98('0xf')]=_0xd1051d;}else if(_0x1a9f37[_0x3d98('0xe')][_0x3d98('0xf')]){delete _0x1a9f37[_0x3d98('0xe')]['queue'];}_0x477e2b[_0x3d98('0x10')]=utils[_0x3d98('0x11')](_0x1a9f37['account'][_0x3d98('0x12')],_0x1a9f37);}catch(_0x566423){_0x477e2b[_0x3d98('0x10')]='I\x20can\x27t\x20render\x20your\x20template';logger['error'](util[_0x3d98('0x13')](_0x3d98('0x14'),_0x5452ef,_0x566423[_0x3d98('0x15')]));}io['to'](util['format'](_0x3d98('0x16'),_0x270312[_0x3d98('0x17')]))['emit'](util[_0x3d98('0x13')](_0x3d98('0x18'),_0x394587?_0x3d98('0x19'):_0x3d98('0x1a')),_0x477e2b);}function writeLog(_0x832846,_0x1cea30,_0x8ab9ea){return logger[_0x3d98('0x1b')](util['format'](_0x3d98('0x1c'),_0x832846,_0x1cea30[_0x3d98('0x17')],_0x8ab9ea));}exports[_0x3d98('0x1d')]=function(_0x35a40f,_0x5da20a,_0x92f4ad,_0x1a368d){if(_0x5da20a[_0x3d98('0x1e')]){writeLog(_0x35a40f,_0x5da20a,'BUSY');return![];}if(!_0x5da20a[_0x3d98('0x1f')]){writeLog(_0x35a40f,_0x5da20a,_0x3d98('0x20'));return![];}if(_0x5da20a[_0x92f4ad+'Pause']){writeLog(_0x35a40f,_0x5da20a,'PAUSE');return![];}if(_0x1a368d&&_0x5da20a[_0x3d98('0x21')](_0x92f4ad+_0x3d98('0x22'))&&_0x5da20a[_0x3d98('0x21')](_0x92f4ad+_0x3d98('0x23'))){if(_0x5da20a[_0x92f4ad+_0x3d98('0x22')]>0x0&&_0x5da20a[_0x92f4ad+_0x3d98('0x23')]>=_0x5da20a[_0x92f4ad+_0x3d98('0x22')]){writeLog(_0x35a40f,_0x5da20a,_0x92f4ad['toUpperCase']()+'\x20MAXCAPACITY');return![];}}return!![];};exports['showNotification']=function(_0x229809,_0x5a2067,_0x30692c,_0x867f85,_0x1d6673){return sendNotification(!![],_0x229809,_0x5a2067,_0x30692c,_0x867f85,_0x1d6673);};exports['hideNotification']=function(_0x188041,_0x437df2,_0x2bb81,_0x2dca32,_0x4409ff){return sendNotification(![],_0x188041,_0x437df2,_0x2bb81,_0x2dca32,_0x4409ff);};exports['checkWaitingNotifications']=function(_0x29c14f,_0x105679,_0x4bd15a){var _0x27b631=_0x105679[_0x3d98('0x24')][_0x3d98('0x25')];if(!_0x27b631&&_0x4bd15a){_0x27b631=_0x4bd15a['id'];}var _0x56f39c=_[_0x3d98('0x26')](_0x29c14f[_0x105679['channel']+_0x3d98('0x27')],function(_0x1cfbf4){var _0x26df3c=_[_0x3d98('0x28')](_0x105679['channel'])+_0x3d98('0x29');return _0x1cfbf4[_0x26df3c]===_0x105679[_0x3d98('0x24')]['id'];});if(!_0x56f39c&&_0x27b631&&_0x29c14f[_0x3d98('0x2a')][_0x27b631]){_0x56f39c=_[_0x3d98('0x26')](_0x29c14f[_0x3d98('0x2a')][_0x27b631][_0x105679[_0x3d98('0x2b')]+_0x3d98('0x2c')],function(_0x4351e2){return _0x4351e2['id']===_0x105679['interaction']['id'];});}return _0x56f39c;};exports[_0x3d98('0x2d')]=function(_0xd676b9,_0x422a85,_0x302252,_0x57c385){if(_0x302252&&_0x302252['id']&&_0xd676b9['agents']&&_0xd676b9[_0x3d98('0x2a')][_0x302252['id']]){_0xd676b9['agents'][_0x302252['id']][_0x57c385+_0x3d98('0x2c')][_0x422a85['message']['id']]={'id':_0x422a85['interaction']['id']};}};exports[_0x3d98('0x2e')]=function(_0x561258,_0x52f666,_0x309d48,_0x18d57d){if(_0x309d48&&_0x309d48['id']&&_0x561258[_0x3d98('0x2a')]&&_0x561258[_0x3d98('0x2a')][_0x309d48['id']]){delete _0x561258[_0x3d98('0x2a')][_0x309d48['id']][_0x18d57d+_0x3d98('0x2c')][_0x52f666[_0x3d98('0x15')]['id']];}};exports[_0x3d98('0x2f')]=writeLog;
\ No newline at end of file
index 3982989..028b312 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa44c=['length','error','[%s][SYSTEM]\x20%s','map','message','join','[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','getMustacheRender','[%s][SYSTEM]\x20commnad:\x20%s','exec','trim','info','replace','isNil','[%s][SYSTEM]\x20no\x20variable','body','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s','next','isObject','stringify','./utils','../../../../config/logger','routing','string','command\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','validate'];(function(_0x1f3e5a,_0x3b4227){var _0x5293bf=function(_0x226fa1){while(--_0x226fa1){_0x1f3e5a['push'](_0x1f3e5a['shift']());}};_0x5293bf(++_0x3b4227);}(_0xa44c,0x1a9));var _0xca44=function(_0x1bbf33,_0x4bd780){_0x1bbf33=_0x1bbf33-0x0;var _0x4b2839=_0xa44c[_0x1bbf33];return _0x4b2839;};'use strict';var schema=require('validate');var sh=require('shelljs');var _=require('lodash');var utils=require(_0xca44('0x0'));var logger=require(_0xca44('0x1'))(_0xca44('0x2'));var system=schema({'command':{'type':_0xca44('0x3'),'required':!![],'message':_0xca44('0x4')}});exports[_0xca44('0x5')]=function(_0x372a47,_0xe36820){return function(_0x11528f){try{var _0x46737f={'command':_0xe36820[0x0]};var _0x32d987=system[_0xca44('0x6')](_0x46737f,{'typecast':!![]});if(_0x32d987[_0xca44('0x7')]){logger[_0xca44('0x8')](_0xca44('0x9'),_0x372a47,_[_0xca44('0xa')](_0x32d987,_0xca44('0xb'))[_0xca44('0xc')](',\x20'));logger['info'](_0xca44('0xd'),_0x372a47);_0x11528f['next']();}else{var _0x52440a=this;var _0x578ce6=utils[_0xca44('0xe')](_0xe36820[0x0],this);logger['info'](_0xca44('0xf'),_0x372a47,_0x578ce6);sh[_0xca44('0x10')](_[_0xca44('0x11')](_0x578ce6),function(_0x2641d7,_0x457694){logger[_0xca44('0x12')]('[%s][SYSTEM]\x20result\x20code:\x20%s',_0x372a47,_0x2641d7);if(_0x2641d7==0x0){var _0x43722d=_0x457694[_0xca44('0x13')](/(\r\n|\n|\r)/gm,'');if(_[_0xca44('0x14')](_0xe36820[0x1])||_['isEmpty'](_0xe36820[0x1])){logger[_0xca44('0x12')](_0xca44('0x15'),_0x372a47);_0x52440a[_0xca44('0x16')][_0xe36820[0x1]]=_0x43722d;}else{logger[_0xca44('0x12')](_0xca44('0x17'),_0x372a47,_0xe36820[0x1],_0x43722d);_0x52440a['body'][_0xe36820[0x1]]=_0x43722d;}}_0x11528f[_0xca44('0x18')]();});}}catch(_0xb0ac6c){logger['error'](_0xca44('0x9'),_0x372a47,_[_0xca44('0x19')](_0xb0ac6c)?JSON[_0xca44('0x1a')](_0xb0ac6c):_0xb0ac6c);logger['info'](_0xca44('0xd'),_0x372a47);_0x11528f[_0xca44('0x18')]();}};};
\ No newline at end of file
+var _0xff12=['string','command\x20is\x20a\x20string\x20and\x20it\x20is\x20required','length','[%s][SYSTEM]\x20%s','map','message','info','[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','next','getMustacheRender','[%s][SYSTEM]\x20commnad:\x20%s','isNil','isEmpty','body','isObject','stringify','validate','shelljs','routing'];(function(_0x1671d1,_0x105ef0){var _0x3454db=function(_0x4a3997){while(--_0x4a3997){_0x1671d1['push'](_0x1671d1['shift']());}};_0x3454db(++_0x105ef0);}(_0xff12,0xa8));var _0x2ff1=function(_0x49fe06,_0x39a73e){_0x49fe06=_0x49fe06-0x0;var _0x228aef=_0xff12[_0x49fe06];return _0x228aef;};'use strict';var schema=require(_0x2ff1('0x0'));var sh=require(_0x2ff1('0x1'));var _=require('lodash');var utils=require('./utils');var logger=require('../../../../config/logger')(_0x2ff1('0x2'));var system=schema({'command':{'type':_0x2ff1('0x3'),'required':!![],'message':_0x2ff1('0x4')}});exports['consequence']=function(_0x48a8d0,_0x24840b){return function(_0x135568){try{var _0x5d2bf4={'command':_0x24840b[0x0]};var _0x1598c5=system['validate'](_0x5d2bf4,{'typecast':!![]});if(_0x1598c5[_0x2ff1('0x5')]){logger['error'](_0x2ff1('0x6'),_0x48a8d0,_[_0x2ff1('0x7')](_0x1598c5,_0x2ff1('0x8'))['join'](',\x20'));logger[_0x2ff1('0x9')](_0x2ff1('0xa'),_0x48a8d0);_0x135568[_0x2ff1('0xb')]();}else{var _0x26a98e=this;var _0x4d7f5b=utils[_0x2ff1('0xc')](_0x24840b[0x0],this);logger[_0x2ff1('0x9')](_0x2ff1('0xd'),_0x48a8d0,_0x4d7f5b);sh['exec'](_['trim'](_0x4d7f5b),function(_0x47d960,_0x4ea7ec){logger['info']('[%s][SYSTEM]\x20result\x20code:\x20%s',_0x48a8d0,_0x47d960);if(_0x47d960==0x0){var _0x2a8c73=_0x4ea7ec['replace'](/(\r\n|\n|\r)/gm,'');if(_[_0x2ff1('0xe')](_0x24840b[0x1])||_[_0x2ff1('0xf')](_0x24840b[0x1])){logger['info']('[%s][SYSTEM]\x20no\x20variable',_0x48a8d0);_0x26a98e[_0x2ff1('0x10')][_0x24840b[0x1]]=_0x2a8c73;}else{logger['info']('[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s',_0x48a8d0,_0x24840b[0x1],_0x2a8c73);_0x26a98e[_0x2ff1('0x10')][_0x24840b[0x1]]=_0x2a8c73;}}_0x135568['next']();});}}catch(_0x2b1869){logger['error'](_0x2ff1('0x6'),_0x48a8d0,_[_0x2ff1('0x11')](_0x2b1869)?JSON[_0x2ff1('0x12')](_0x2b1869):_0x2b1869);logger[_0x2ff1('0x9')](_0x2ff1('0xa'),_0x48a8d0);_0x135568[_0x2ff1('0xb')]();}};};
\ No newline at end of file
index 3cad33a..03dff1e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2f64=['../../rpc/chatInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','../../../../config/logger','routing','number','TagId\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','[%s][TAG]\x20%s','map','join','info','[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next','next','Interaction','channel','interaction','then','[%s][TAG]\x20tag\x20\x22%s\x22\x20added\x20to\x20%s\x20interaction\x20%s','catch','stringify','finally','isObject','validate','lodash'];(function(_0x584f66,_0x39a037){var _0x3908b4=function(_0x452df3){while(--_0x452df3){_0x584f66['push'](_0x584f66['shift']());}};_0x3908b4(++_0x39a037);}(_0x2f64,0x1c9));var _0x42f6=function(_0x527aab,_0x1bb5d8){_0x527aab=_0x527aab-0x0;var _0x549ef1=_0x2f64[_0x527aab];return _0x549ef1;};'use strict';var schema=require(_0x42f6('0x0'));var _=require(_0x42f6('0x1'));var rpc={'chatInteraction':require(_0x42f6('0x2')),'openchannelInteraction':require('../../rpc/openchannelInteraction'),'smsInteraction':require(_0x42f6('0x3')),'mailInteraction':require(_0x42f6('0x4')),'faxInteraction':require(_0x42f6('0x5')),'whatsappInteraction':require(_0x42f6('0x6'))};var logger=require(_0x42f6('0x7'))(_0x42f6('0x8'));var tag=schema({'tag':{'type':_0x42f6('0x9'),'required':!![],'message':_0x42f6('0xa')}});exports[_0x42f6('0xb')]=function(_0x4dbe82,_0x4c5586,_0x2ec871,_0x4da5b5){return function(_0x435790){try{var _0x49b34a={'tag':_0x4c5586[0x0]};var _0x45d609=tag[_0x42f6('0x0')](_0x49b34a,{'typecast':!![]});if(_0x45d609['length']){logger['error'](_0x42f6('0xc'),_0x4dbe82,_[_0x42f6('0xd')](_0x45d609,'message')[_0x42f6('0xe')](',\x20'));logger[_0x42f6('0xf')](_0x42f6('0x10'),_0x4dbe82);_0x435790[_0x42f6('0x11')]();}else{var _0x3e200e={'ids':[_0x4c5586[0x0]]};if(rpc[_0x4da5b5['channel']+_0x42f6('0x12')]){rpc[_0x4da5b5[_0x42f6('0x13')]+_0x42f6('0x12')]['addTags'](_0x4da5b5[_0x42f6('0x14')]['id'],_0x3e200e)[_0x42f6('0x15')](function(_0x174618){logger['info'](_0x42f6('0x16'),_0x4dbe82,_0x4c5586[0x1],_0x4da5b5['channel'],_0x4da5b5[_0x42f6('0x14')]['id']);})[_0x42f6('0x17')](function(_0x24af2b){logger['error'](_0x42f6('0xc'),_0x4dbe82,JSON[_0x42f6('0x18')](_0x24af2b));logger[_0x42f6('0xf')](_0x42f6('0x10'),_0x4dbe82);})[_0x42f6('0x19')](function(){_0x435790[_0x42f6('0x11')]();});}}}catch(_0x499677){logger['error'](_0x42f6('0xc'),_0x4dbe82,_[_0x42f6('0x1a')](_0x499677)?JSON[_0x42f6('0x18')](_0x499677):_0x499677);logger[_0x42f6('0xf')](_0x42f6('0x10'),_0x4dbe82);_0x435790[_0x42f6('0x11')]();}};};
\ No newline at end of file
+var _0xaece=['[%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','catch','error','finally','next','isObject','stringify','validate','lodash','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../../../config/logger','routing','number','TagId\x20is\x20a\x20string\x20and\x20it\x20is\x20required','length','[%s][TAG]\x20%s','map','message','info'];(function(_0xefd519,_0xc62635){var _0x4bb882=function(_0x37e0a1){while(--_0x37e0a1){_0xefd519['push'](_0xefd519['shift']());}};_0x4bb882(++_0xc62635);}(_0xaece,0x179));var _0xeaec=function(_0x120649,_0x139606){_0x120649=_0x120649-0x0;var _0x2d78c3=_0xaece[_0x120649];return _0x2d78c3;};'use strict';var schema=require(_0xeaec('0x0'));var _=require(_0xeaec('0x1'));var rpc={'chatInteraction':require('../../rpc/chatInteraction'),'openchannelInteraction':require(_0xeaec('0x2')),'smsInteraction':require(_0xeaec('0x3')),'mailInteraction':require(_0xeaec('0x4')),'faxInteraction':require(_0xeaec('0x5')),'whatsappInteraction':require('../../rpc/whatsappInteraction')};var logger=require(_0xeaec('0x6'))(_0xeaec('0x7'));var tag=schema({'tag':{'type':_0xeaec('0x8'),'required':!![],'message':_0xeaec('0x9')}});exports['consequence']=function(_0x1630c8,_0x4285f4,_0x2ea049,_0x30fc94){return function(_0x45c383){try{var _0x472b9a={'tag':_0x4285f4[0x0]};var _0x2f7b33=tag[_0xeaec('0x0')](_0x472b9a,{'typecast':!![]});if(_0x2f7b33[_0xeaec('0xa')]){logger['error'](_0xeaec('0xb'),_0x1630c8,_[_0xeaec('0xc')](_0x2f7b33,_0xeaec('0xd'))['join'](',\x20'));logger[_0xeaec('0xe')](_0xeaec('0xf'),_0x1630c8);_0x45c383['next']();}else{var _0x23cbd4={'ids':[_0x4285f4[0x0]]};if(rpc[_0x30fc94[_0xeaec('0x10')]+_0xeaec('0x11')]){rpc[_0x30fc94['channel']+_0xeaec('0x11')][_0xeaec('0x12')](_0x30fc94[_0xeaec('0x13')]['id'],_0x23cbd4)[_0xeaec('0x14')](function(_0x33d67c){logger['info'](_0xeaec('0x15'),_0x1630c8,_0x4285f4[0x1],_0x30fc94[_0xeaec('0x10')],_0x30fc94[_0xeaec('0x13')]['id']);})[_0xeaec('0x16')](function(_0x2ef330){logger[_0xeaec('0x17')](_0xeaec('0xb'),_0x1630c8,JSON['stringify'](_0x2ef330));logger[_0xeaec('0xe')](_0xeaec('0xf'),_0x1630c8);})[_0xeaec('0x18')](function(){_0x45c383[_0xeaec('0x19')]();});}}}catch(_0x289fb2){logger[_0xeaec('0x17')](_0xeaec('0xb'),_0x1630c8,_[_0xeaec('0x1a')](_0x289fb2)?JSON[_0xeaec('0x1b')](_0x289fb2):_0x289fb2);logger['info'](_0xeaec('0xf'),_0x1630c8);_0x45c383[_0xeaec('0x19')]();}};};
\ No newline at end of file
index f47f0a0..8d7976d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb583=['[%s][TVOX]\x20Application\x20already\x20executed\x20for\x20the\x20current\x20session,\x20force\x20next','next','request-promise','lodash','consequence','replace','\x20-\x20','urlOnAnswer','?params=','urlOnRing','title','jsonrpc','method','login','push','stringify','utf8','application/json-rpc','parse','result','logged','Unable\x20to\x20login\x20with\x20TVox\x20application','channelId=','&sessionId=','then','info','[%s][TVOX]\x20Request\x20sent\x20to\x20TVox:\x20%s','stop','catch','error','[%s][TVOX]\x20%s','isObject'];(function(_0x224616,_0x563fc1){var _0x3049af=function(_0x24512a){while(--_0x24512a){_0x224616['push'](_0x224616['shift']());}};_0x3049af(++_0x563fc1);}(_0xb583,0x1c2));var _0x3b58=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0xb583[_0x5b644e];return _0x49c6bf;};'use strict';var rp=require(_0x3b58('0x0'));var logger=require('../../../../config/logger')('routing');var _=require(_0x3b58('0x1'));var arr=[];exports[_0x3b58('0x2')]=function(_0x3bc97a,_0x2643a8){return function(_0x44e09a){var _0xb89679=_0x2643a8[0xa];var _0x384609=_0x2643a8[0xb];var _0x5e81c5=_0x2643a8[0xc];var _0x3614e4=_0x2643a8[0xd];var _0xf865ba=_0x2643a8[0xe];var _0x6bcfb4=_0x2643a8[0xf][_0x3b58('0x3')](/\n/g,_0x3b58('0x4'));var _0x2fcde4=_0x2643a8[0x10][_0x3b58('0x3')](/\n/g,'\x20');if(!arr['includes'](_0x384609)){arr['push'](_0x384609);var _0x5e649c=_0x2643a8[0x3];var _0x345f2e=_0x2643a8[0x4];var _0x6fa925=_0x2643a8[0x1];var _0xb9668f=_0x2643a8[0x0];var _0x422fc3={};_0x422fc3[_0x3b58('0x5')]=_0x2643a8[0x8]+_0x3b58('0x6')+_0x5e81c5+'|'+_0xb89679+'|'+_0x3614e4+'|'+_0x384609+'|'+_0xf865ba;_0x422fc3[_0x3b58('0x7')]=_0x2643a8[0x7]+'?params='+_0x5e81c5+'|'+_0xb89679+'|'+_0x3614e4+'|'+_0x384609+'|'+_0xf865ba+'|'+_0x6bcfb4+'|'+_0x2fcde4;_0x422fc3[_0x3b58('0x8')]=_0x2643a8[0x9];var _0x419f4d={};_0x419f4d[_0x3b58('0x9')]='2.0';_0x419f4d[_0x3b58('0xa')]=_0x3b58('0xb');var _0x59923e=[];_0x59923e['push'](_0x2643a8[0x2]);_0x59923e['push'](_0x2643a8[0x5]);_0x59923e[_0x3b58('0xc')](_0x2643a8[0x6]);_0x419f4d['params']=_0x59923e;_0x419f4d['id']=0x1;var _0xd59403=JSON[_0x3b58('0xd')](_0x419f4d);var _0x207a27={'encoding':_0x3b58('0xe'),'method':'POST','timeout':0x2710,'url':_0x5e649c,'headers':{'Content-Type':_0x3b58('0xf')},'body':_0xd59403};return rp(_0x207a27)['then'](function(_0x2d0728){const _0x35a25a=JSON[_0x3b58('0x10')](_0x2d0728);if(!_0x35a25a[_0x3b58('0x11')][_0x3b58('0x12')]){throw new Error(_0x3b58('0x13'));}var _0x11681b=_0x384609;var _0x3dc0b9=_0x3b58('0x14')+_0x6fa925+'&serviceId='+_0xb9668f+_0x3b58('0x15')+_0x11681b+'&data='+JSON[_0x3b58('0xd')](_0x422fc3);var _0x25201c=_0x345f2e+'?'+_0x3dc0b9;return rp(_0x25201c);})[_0x3b58('0x16')](function(_0x581171){logger[_0x3b58('0x17')](_0x3b58('0x18'),_0x3bc97a,_0x581171);_0x44e09a[_0x3b58('0x19')]();})[_0x3b58('0x1a')](function(_0x2f4079){logger[_0x3b58('0x1b')](_0x3b58('0x1c'),_0x3bc97a,_[_0x3b58('0x1d')](_0x2f4079)?JSON[_0x3b58('0xd')](_0x2f4079):_0x2f4079);_0x44e09a[_0x3b58('0x19')]();});}else{logger[_0x3b58('0x17')](_0x3b58('0x1e'),_0x3bc97a);_0x44e09a[_0x3b58('0x1f')]();}};};
\ No newline at end of file
+var _0xe4c6=['isObject','[%s][TVOX]\x20Application\x20already\x20executed\x20for\x20the\x20current\x20session,\x20force\x20next','request-promise','../../../../config/logger','routing','lodash','consequence','replace','\x20-\x20','includes','push','urlOnAnswer','?params=','title','jsonrpc','2.0','method','login','params','stringify','POST','application/json-rpc','parse','result','logged','Unable\x20to\x20login\x20with\x20TVox\x20application','channelId=','&serviceId=','&sessionId=','then','info','[%s][TVOX]\x20Request\x20sent\x20to\x20TVox:\x20%s','stop','error','[%s][TVOX]\x20%s'];(function(_0x25ecd5,_0x1a7e5f){var _0x4f411e=function(_0x3657de){while(--_0x3657de){_0x25ecd5['push'](_0x25ecd5['shift']());}};_0x4f411e(++_0x1a7e5f);}(_0xe4c6,0x13d));var _0x6e4c=function(_0x5e8e85,_0x5411cb){_0x5e8e85=_0x5e8e85-0x0;var _0x31fd50=_0xe4c6[_0x5e8e85];return _0x31fd50;};'use strict';var rp=require(_0x6e4c('0x0'));var logger=require(_0x6e4c('0x1'))(_0x6e4c('0x2'));var _=require(_0x6e4c('0x3'));var arr=[];exports[_0x6e4c('0x4')]=function(_0x3f77e5,_0x260373){return function(_0x5a1580){var _0x57e08a=_0x260373[0xa];var _0x320972=_0x260373[0xb];var _0x3f679d=_0x260373[0xc];var _0x1215c7=_0x260373[0xd];var _0x590762=_0x260373[0xe];var _0x369bde=_0x260373[0xf][_0x6e4c('0x5')](/\n/g,_0x6e4c('0x6'));var _0x2ad4f7=_0x260373[0x10]['replace'](/\n/g,'\x20');if(!arr[_0x6e4c('0x7')](_0x320972)){arr[_0x6e4c('0x8')](_0x320972);var _0x3f79d4=_0x260373[0x3];var _0x1bfb5c=_0x260373[0x4];var _0x3bb64a=_0x260373[0x1];var _0x1fbf8a=_0x260373[0x0];var _0x3f401a={};_0x3f401a[_0x6e4c('0x9')]=_0x260373[0x8]+_0x6e4c('0xa')+_0x3f679d+'|'+_0x57e08a+'|'+_0x1215c7+'|'+_0x320972+'|'+_0x590762;_0x3f401a['urlOnRing']=_0x260373[0x7]+_0x6e4c('0xa')+_0x3f679d+'|'+_0x57e08a+'|'+_0x1215c7+'|'+_0x320972+'|'+_0x590762+'|'+_0x369bde+'|'+_0x2ad4f7;_0x3f401a[_0x6e4c('0xb')]=_0x260373[0x9];var _0x5c62c8={};_0x5c62c8[_0x6e4c('0xc')]=_0x6e4c('0xd');_0x5c62c8[_0x6e4c('0xe')]=_0x6e4c('0xf');var _0x4262d4=[];_0x4262d4[_0x6e4c('0x8')](_0x260373[0x2]);_0x4262d4[_0x6e4c('0x8')](_0x260373[0x5]);_0x4262d4[_0x6e4c('0x8')](_0x260373[0x6]);_0x5c62c8[_0x6e4c('0x10')]=_0x4262d4;_0x5c62c8['id']=0x1;var _0x52a155=JSON[_0x6e4c('0x11')](_0x5c62c8);var _0xc4aab1={'encoding':'utf8','method':_0x6e4c('0x12'),'timeout':0x2710,'url':_0x3f79d4,'headers':{'Content-Type':_0x6e4c('0x13')},'body':_0x52a155};return rp(_0xc4aab1)['then'](function(_0x50fb56){const _0x27ca0a=JSON[_0x6e4c('0x14')](_0x50fb56);if(!_0x27ca0a[_0x6e4c('0x15')][_0x6e4c('0x16')]){throw new Error(_0x6e4c('0x17'));}var _0x1d42c9=_0x320972;var _0x501a53=_0x6e4c('0x18')+_0x3bb64a+_0x6e4c('0x19')+_0x1fbf8a+_0x6e4c('0x1a')+_0x1d42c9+'&data='+JSON['stringify'](_0x3f401a);var _0x471dce=_0x1bfb5c+'?'+_0x501a53;return rp(_0x471dce);})[_0x6e4c('0x1b')](function(_0xb2aa03){logger[_0x6e4c('0x1c')](_0x6e4c('0x1d'),_0x3f77e5,_0xb2aa03);_0x5a1580[_0x6e4c('0x1e')]();})['catch'](function(_0x194a40){logger[_0x6e4c('0x1f')](_0x6e4c('0x20'),_0x3f77e5,_[_0x6e4c('0x21')](_0x194a40)?JSON[_0x6e4c('0x11')](_0x194a40):_0x194a40);_0x5a1580['stop']();});}else{logger[_0x6e4c('0x1c')](_0x6e4c('0x22'),_0x3f77e5);_0x5a1580['next']();}};};
\ No newline at end of file
index 118f1ba..5575333 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['message','account','interaction','mustache','lodash','exports','render','body','contact'];(function(_0x3e43ec,_0x11e681){var _0x382b46=function(_0x4a528e){while(--_0x4a528e){_0x3e43ec['push'](_0x3e43ec['shift']());}};_0x382b46(++_0x11e681);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4709c0,_0x3396c7){_0x4709c0=_0x4709c0-0x0;var _0x13348b=_0xa9e0[_0x4709c0];return _0x13348b;};'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
+var _0xd8b0=['merge','body','contact','message','list','mustache','lodash','render'];(function(_0x170620,_0xb3cc76){var _0x56988d=function(_0x253653){while(--_0x253653){_0x170620['push'](_0x170620['shift']());}};_0x56988d(++_0xb3cc76);}(_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
index 9a895fe..c1afe0b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcac3=['listen','rules','channel','message','interaction','checkWaitingNotifications','transfer','applications','isArray','existsSync','join','app','appdata','split','mail','push','slice','length','dialogflow','dialogflowv2','amazonlex','tag','TagId','tvox','getMustacheRender','account','ChatWebsiteId','ContactId','body','./interval','condition','intervals','./applications/','consequence','priority','info','Push\x20new\x20rule','on\x20interval','\x20|\x20','error','Please\x20create\x20a\x20new\x20file\x20under','.js','execute','Applications\x20executed','stringify','matchPath','emit','complete','Skipped\x20routing\x20for\x20%s','routing\x20is\x20empty','agent','agents','busy','busyQueue','end','QueueReport','update','UserId','catch','stack','message\x20is\x20empty','hasOwnProperty','capacity','CurrentCapacity','updateRealtime','values','chatQueues','available','name','paused','waiting','mailQueues','openchannelQueues','loggedIn','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','http','127.0.0.1','RPC\x20listening\x20on\x20port:','util','path','jayson/promise','bluebird','./applications/utils','./applications/strategy/util','../../../config/logger','routing','../rpc/openchannelQueueReport','../rpc/mailQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine','format','%s.%s.%s','IntervalId','isNil','Intervals','interval'];(function(_0x3e7b39,_0x2c2110){var _0x4ad001=function(_0x3fd134){while(--_0x3fd134){_0x3e7b39['push'](_0x3e7b39['shift']());}};_0x4ad001(++_0x2c2110);}(_0xcac3,0x193));var _0x3cac=function(_0x11be52,_0x2ef4f4){_0x11be52=_0x11be52-0x0;var _0x5b0bf8=_0xcac3[_0x11be52];return _0x5b0bf8;};'use strict';var _=require('lodash');var util=require(_0x3cac('0x0'));var path=require(_0x3cac('0x1'));var fs=require('fs');var jayson=require(_0x3cac('0x2'));var BPromise=require(_0x3cac('0x3'));var utils=require(_0x3cac('0x4'));var sUtils=require(_0x3cac('0x5'));var logger=require(_0x3cac('0x6'))(_0x3cac('0x7'));var rpc={'openchannelQueueReport':require(_0x3cac('0x8')),'mailQueueReport':require(_0x3cac('0x9')),'chatQueueReport':require(_0x3cac('0xa')),'smsQueueReport':require(_0x3cac('0xb')),'faxQueueReport':require(_0x3cac('0xc')),'whatsappQueueReport':require(_0x3cac('0xd'))};var RuleEngine=require(_0x3cac('0xe'));function getId(_0x21365c,_0x13c1b9,_0x55670d){return util[_0x3cac('0xf')](_0x3cac('0x10'),_0x21365c,_0x13c1b9||0x0,_0x55670d||0x0);}function getIntervals(_0x3bcbed,_0x306664){var _0x131e0d=[];if(!_['isNil'](_0x306664[_0x3cac('0x11')])&&!_[_0x3cac('0x12')](_0x3bcbed[_0x306664[_0x3cac('0x11')]])&&!_[_0x3cac('0x12')](_0x3bcbed[_0x306664[_0x3cac('0x11')]]['Intervals'])){_0x131e0d=_['map'](_0x3bcbed[_0x306664[_0x3cac('0x11')]][_0x3cac('0x13')],_0x3cac('0x14'));}else if(!_[_0x3cac('0x12')](_0x306664[_0x3cac('0x14')])){_0x131e0d=[_0x306664[_0x3cac('0x14')]];}return _0x131e0d;}exports[_0x3cac('0x15')]=function(_0x4bee52){_0x4bee52[_0x3cac('0x16')]={};return new BPromise(function(_0x2db008,_0xf24623){var _0x281dfd={'Start':function(_0x4680aa){var _0x8d8927=this;return new Promise(function(_0x202437,_0x37e529){if(_0x4680aa){try{var _0x10fb70=[];var _0x37a233=getId(_0x4680aa[_0x3cac('0x17')],_0x4680aa[_0x3cac('0x18')]?_0x4680aa[_0x3cac('0x18')]['id']:0x0,_0x4680aa[_0x3cac('0x19')]?_0x4680aa[_0x3cac('0x19')]['id']:0x0);var _0x9c768f=sUtils[_0x3cac('0x1a')](_0x4bee52,_0x4680aa);if(_0x4680aa[_0x3cac('0x1b')]||!_0x9c768f&&_0x4680aa[_0x3cac('0x1c')]&&_[_0x3cac('0x1d')](_0x4680aa[_0x3cac('0x1c')])&&_0x4680aa[_0x3cac('0x1c')]['length']){for(var _0x14d84b=0x0;_0x14d84b<_0x4680aa[_0x3cac('0x1c')]['length'];_0x14d84b+=0x1){var _0x1d5d41=_0x4680aa[_0x3cac('0x1c')][_0x14d84b];if(fs[_0x3cac('0x1e')](path[_0x3cac('0x1f')](__dirname,_0x3cac('0x1c'),_0x1d5d41[_0x3cac('0x20')]+'.js'))){var _0x19010f=[];switch(_0x1d5d41['app']['toLowerCase']()){case'autoreply':var _0xf63f1d=_0x1d5d41[_0x3cac('0x21')][_0x3cac('0x22')](',');if(_0x4680aa[_0x3cac('0x17')]===_0x3cac('0x23')){_0x19010f[_0x3cac('0x24')](_0xf63f1d[0x0]);_0x19010f[_0x3cac('0x24')](_0xf63f1d[0x1]);_0x19010f[_0x3cac('0x24')](_0xf63f1d[_0x3cac('0x25')](0x2,_0xf63f1d[_0x3cac('0x26')])[_0x3cac('0x1f')](','));}else{_0x19010f[_0x3cac('0x24')](_0xf63f1d[0x0]);_0x19010f['push'](_0xf63f1d[_0x3cac('0x25')](0x1,_0xf63f1d[_0x3cac('0x26')])[_0x3cac('0x1f')](','));}break;case _0x3cac('0x27'):var _0xf8ef01=_0x1d5d41[_0x3cac('0x21')][_0x3cac('0x22')](',');_0x19010f[_0x3cac('0x24')](_0xf8ef01[0x0]);_0x19010f[_0x3cac('0x24')](_0xf8ef01[0x1]);_0x19010f[_0x3cac('0x24')](_0xf8ef01[_0x3cac('0x25')](0x2,_0xf8ef01[_0x3cac('0x26')])[_0x3cac('0x1f')](','));break;case _0x3cac('0x28'):var _0x309288=_0x1d5d41[_0x3cac('0x21')][_0x3cac('0x22')](',');_0x19010f[_0x3cac('0x24')](_0x309288[0x0]);_0x19010f[_0x3cac('0x24')](_0x309288[0x1]);_0x19010f[_0x3cac('0x24')](_0x309288[0x2]);_0x19010f[_0x3cac('0x24')](_0x309288[0x3]);_0x19010f[_0x3cac('0x24')](_0x309288[_0x3cac('0x25')](0x4,_0x309288['length'])[_0x3cac('0x1f')](','));break;case _0x3cac('0x29'):var _0x1163d2=_0x1d5d41[_0x3cac('0x21')][_0x3cac('0x22')](',');_0x19010f['push'](_0x1163d2[0x0]);_0x19010f['push'](_0x1163d2[0x1]);_0x19010f[_0x3cac('0x24')](_0x1163d2[0x2]);_0x19010f[_0x3cac('0x24')](_0x1163d2[0x3]);_0x19010f['push'](_0x1163d2[_0x3cac('0x25')](0x4,_0x1163d2['length'])['join'](','));break;case _0x3cac('0x18'):_0x19010f[_0x3cac('0x24')](_0x1d5d41['appdata']);break;case _0x3cac('0x2a'):_0x19010f[_0x3cac('0x24')](_0x1d5d41[_0x3cac('0x2b')]);_0x19010f[_0x3cac('0x24')](_0x1d5d41[_0x3cac('0x21')]);break;case _0x3cac('0x2c'):var _0x1052b6=utils[_0x3cac('0x2d')](_0x4680aa[_0x3cac('0x2e')]['notificationTemplate'],_0x4680aa);var _0x481c72=_0x1d5d41[_0x3cac('0x21')][_0x3cac('0x22')](',');_0x19010f[_0x3cac('0x24')](_0x481c72[0x0]);_0x19010f[_0x3cac('0x24')](_0x481c72[0x1]);_0x19010f[_0x3cac('0x24')](_0x481c72[0x2]);_0x19010f[_0x3cac('0x24')](_0x481c72[0x3]);_0x19010f[_0x3cac('0x24')](_0x481c72[0x4]);_0x19010f[_0x3cac('0x24')](_0x481c72[0x5]);_0x19010f['push'](_0x481c72[0x6]);_0x19010f[_0x3cac('0x24')](_0x481c72[0x7]);_0x19010f[_0x3cac('0x24')](_0x481c72[0x8]);_0x19010f['push'](_0x481c72[0x9]);_0x19010f[_0x3cac('0x24')](_0x481c72[0xa]);_0x19010f[_0x3cac('0x24')](_0x4680aa[_0x3cac('0x19')]['id']);_0x19010f['push'](_0x4680aa['message']['id']);_0x19010f[_0x3cac('0x24')](_0x1d5d41[_0x3cac('0x2f')]);_0x19010f[_0x3cac('0x24')](_0x4680aa[_0x3cac('0x19')][_0x3cac('0x30')]);_0x19010f[_0x3cac('0x24')](_0x4680aa[_0x3cac('0x31')][_0x3cac('0x31')]);_0x19010f[_0x3cac('0x24')](_0x1052b6);break;default:_0x19010f=_[_0x3cac('0x12')](_0x1d5d41[_0x3cac('0x21')])?[]:_0x1d5d41[_0x3cac('0x21')][_0x3cac('0x22')](',');}var _0x5320c3={'id':util[_0x3cac('0xf')]('%s:%s:%s',_0x37a233,_0x1d5d41['id'],_0x1d5d41[_0x3cac('0x20')]),'condition':require(_0x3cac('0x32'))[_0x3cac('0x33')](_0x37a233,getIntervals(_0x4bee52[_0x3cac('0x34')],_0x1d5d41),_0x4bee52),'consequence':require(_0x3cac('0x35')+_0x1d5d41['app'])[_0x3cac('0x36')](_0x37a233,_0x19010f,_0x4bee52,_0x4680aa),'p':_0x1d5d41[_0x3cac('0x37')]||0x0};logger[_0x3cac('0x38')](_0x3cac('0x39'),_0x5320c3['id'],_0x3cac('0x3a'),getIntervals(_0x4bee52[_0x3cac('0x34')],_0x1d5d41)[_0x3cac('0x1f')](_0x3cac('0x3b')));_0x10fb70[_0x3cac('0x24')](_0x5320c3);}else{logger[_0x3cac('0x3c')](_0x3cac('0x3d'),path[_0x3cac('0x1f')](__dirname,'applications',_0x1d5d41['app']+_0x3cac('0x3e')));}}_0x4bee52[_0x3cac('0x16')][_0x37a233]=new RuleEngine(_0x10fb70);_0x4bee52['rules'][_0x37a233][_0x3cac('0x3f')](_0x4680aa,function(_0x31c363){logger['info'](_0x3cac('0x40'),JSON[_0x3cac('0x41')](_0x31c363[_0x3cac('0x42')]));if(_0x4bee52[_0x3cac('0x16')][_0x37a233]){_0x4bee52[_0x3cac('0x16')][_0x37a233][_0x3cac('0x43')](_0x3cac('0x44'));}});return _0x202437({'code':0xc8,'message':_0x4680aa});}else{if(_0x9c768f){logger[_0x3cac('0x38')](util['format'](_0x3cac('0x45'),_0x37a233));}else{logger['info']('No\x20applications\x20to\x20execute');}return _0x202437({'code':0xc8,'message':_0x4680aa});}}catch(_0x3c6cac){logger[_0x3cac('0x3c')](_0x3c6cac['stack']);return _0x37e529(_0x8d8927[_0x3cac('0x3c')](0x1f4,_0x3c6cac));}}return _0x37e529(_0x3cac('0x46'));});},'AcceptMessage':function(_0xe841fd){var _0x3888c1=this;return new Promise(function(_0x1cdd22,_0x49f065){if(_0xe841fd[_0x3cac('0x47')]&&_0xe841fd[_0x3cac('0x47')]['id']){if(_0x4bee52['agents'][_0xe841fd[_0x3cac('0x47')]['id']]){_0x4bee52[_0x3cac('0x48')][_0xe841fd[_0x3cac('0x47')]['id']][_0x3cac('0x49')]=![];_0x4bee52['agents'][_0xe841fd[_0x3cac('0x47')]['id']][_0x3cac('0x4a')]=undefined;}}if(_0xe841fd[_0x3cac('0x18')]&&_0xe841fd[_0x3cac('0x18')]['id']){try{var _0x1260c6=getId(_0xe841fd['channel'],_0xe841fd[_0x3cac('0x18')]?_0xe841fd[_0x3cac('0x18')]['id']:0x0,_0xe841fd[_0x3cac('0x19')]?_0xe841fd['interaction']['id']:0x0);if(_0x4bee52[_0x3cac('0x16')][_0x1260c6]){_0x4bee52[_0x3cac('0x16')][_0x1260c6][_0x3cac('0x43')](_0x3cac('0x4b'));if(rpc[_0xe841fd['channel']+_0x3cac('0x4c')]){rpc[_0xe841fd[_0x3cac('0x17')]+'QueueReport'][_0x3cac('0x4d')](_0x1260c6,{'UserId':_0xe841fd['message'][_0x3cac('0x4e')]})[_0x3cac('0x4f')](function(){logger[_0x3cac('0x3c')]('error\x20update\x20queue\x20report');});}}return _0x1cdd22({'code':0xc8,'message':_0xe841fd});}catch(_0x503fca){logger['error'](_0x503fca[_0x3cac('0x50')]);return _0x49f065(_0x3888c1[_0x3cac('0x3c')](0x1f4,_0x503fca));}}logger['error'](_0x3cac('0x51'));return _0x49f065(_0x3888c1[_0x3cac('0x3c')](0x1f4,_0x3cac('0x51')));});},'RejectMessage':function(_0x5c0d01){var _0x5df2bd=this;return new Promise(function(_0x4edfed,_0x58f145){if(_0x5c0d01[_0x3cac('0x47')]&&_0x5c0d01[_0x3cac('0x47')]['id']){try{if(_0x4bee52['agents'][_0x5c0d01[_0x3cac('0x47')]['id']]){_0x4bee52[_0x3cac('0x48')][_0x5c0d01[_0x3cac('0x47')]['id']][_0x3cac('0x49')]=![];_0x4bee52['agents'][_0x5c0d01[_0x3cac('0x47')]['id']]['busyQueue']=undefined;}return _0x4edfed({'code':0xc8,'message':_0x5c0d01});}catch(_0x1dd31a){logger[_0x3cac('0x3c')](_0x1dd31a['stack']);return _0x58f145(_0x5df2bd['error'](0x1f4,_0x1dd31a));}}logger[_0x3cac('0x3c')](_0x3cac('0x51'));return _0x58f145(_0x5df2bd['error'](0x1f4,'message\x20is\x20empty'));});},'AbandonInteraction':function(_0x5afc73){var _0x2e5b6a=this;return new Promise(function(_0xfcddd4,_0x2607aa){if(_0x5afc73[_0x3cac('0x17')]&&_0x5afc73[_0x3cac('0x19')]&&_0x5afc73[_0x3cac('0x19')]['id']){try{var _0x4c42ba=getId(_0x5afc73[_0x3cac('0x17')],_0x5afc73[_0x3cac('0x18')]?_0x5afc73[_0x3cac('0x18')]['id']:0x0,_0x5afc73[_0x3cac('0x19')]?_0x5afc73[_0x3cac('0x19')]['id']:0x0);if(_0x4bee52[_0x3cac('0x16')][_0x4c42ba]){_0x4bee52[_0x3cac('0x16')][_0x4c42ba][_0x3cac('0x43')](_0x3cac('0x4b'));}return _0xfcddd4({'code':0xc8,'message':_0x5afc73});}catch(_0x31aba0){logger[_0x3cac('0x3c')](_0x31aba0[_0x3cac('0x50')]);return _0x2607aa(_0x2e5b6a[_0x3cac('0x3c')](0x1f4,_0x31aba0));}}logger['error']('message\x20is\x20empty');return _0x2607aa(_0x2e5b6a['error'](0x1f4,_0x3cac('0x51')));});},'AgentCapacity':function(_0x4f1fa3){var _0xadecd=this;return new Promise(function(_0x491da5,_0x9eed0b){if(_0x4bee52[_0x3cac('0x48')][_0x3cac('0x52')](_0x4f1fa3['id'])){for(var _0x1783d3 in _0x4f1fa3[_0x3cac('0x53')]){if(_0x4f1fa3['capacity'][_0x3cac('0x52')](_0x1783d3)){if(_0x4bee52[_0x3cac('0x48')][_0x4f1fa3['id']][_0x3cac('0x52')](_0x1783d3+_0x3cac('0x54'))){_0x4bee52[_0x3cac('0x48')][_0x4f1fa3['id']][_0x1783d3+_0x3cac('0x54')]=parseInt(_0x4f1fa3[_0x3cac('0x53')][_0x1783d3],0xa);}}}_0x4bee52[_0x3cac('0x48')][_0x4f1fa3['id']][_0x3cac('0x55')]();return _0x491da5({'code':0xc8,'message':_0x4bee52[_0x3cac('0x48')][_0x4f1fa3['id']]});}else{return _0x9eed0b(_0xadecd['error'](0x1f4,'agent\x20not\x20found'));}});},'Agents':function(_0x336ef9){return new Promise(function(_0x29ae9a){var _0x2846ab=_[_0x3cac('0x56')](_0x4bee52[_0x3cac('0x48')]);if(_0x336ef9&&_0x336ef9['id']){var _0x3b4e32=_['find'](_0x2846ab,function(_0x3b3601){return _0x3b3601['id']===_0x336ef9['id'];});_0x29ae9a(_0x3b4e32);}else{_0x29ae9a({'count':_0x2846ab[_0x3cac('0x26')],'rows':_0x2846ab});}});},'ChatQueues':function(){return new Promise(function(_0x7cc025){var _0x1baa7b=[];for(var _0x43d943 in _0x4bee52['chatQueues']){if(_0x4bee52['chatQueues']['hasOwnProperty'](_0x43d943)){var _0x4eca60=_0x4bee52[_0x3cac('0x57')][_0x43d943];var _0x40a591={'id':_0x4eca60['id'],'available':_0x4eca60[_0x3cac('0x58')],'loggedIn':_0x4eca60['loggedIn'],'name':_0x4eca60[_0x3cac('0x59')],'paused':_0x4eca60[_0x3cac('0x5a')],'waiting':_0x4eca60[_0x3cac('0x5b')]};_0x1baa7b[_0x3cac('0x24')](_0x40a591);}}_0x7cc025({'count':_0x1baa7b[_0x3cac('0x26')],'rows':_0x1baa7b});});},'MailQueues':function(){return new Promise(function(_0x21b4ec){var _0x53acc6=[];for(var _0x2c2bfb in _0x4bee52['mailQueues']){if(_0x4bee52[_0x3cac('0x5c')][_0x3cac('0x52')](_0x2c2bfb)){var _0x2dc94d=_0x4bee52[_0x3cac('0x5c')][_0x2c2bfb];var _0x4b22a9={'id':_0x2dc94d['id'],'available':_0x2dc94d[_0x3cac('0x58')],'loggedIn':_0x2dc94d['loggedIn'],'name':_0x2dc94d[_0x3cac('0x59')],'paused':_0x2dc94d[_0x3cac('0x5a')],'waiting':_0x2dc94d[_0x3cac('0x5b')]};_0x53acc6[_0x3cac('0x24')](_0x4b22a9);}}_0x21b4ec({'count':_0x53acc6[_0x3cac('0x26')],'rows':_0x53acc6});});},'OpenchannelQueues':function(){return new Promise(function(_0x356ff0){var _0xba3d18=[];for(var _0x31f0b4 in _0x4bee52[_0x3cac('0x5d')]){if(_0x4bee52['openchannelQueues']['hasOwnProperty'](_0x31f0b4)){var _0x44b638=_0x4bee52[_0x3cac('0x5d')][_0x31f0b4];var _0x4f65a5={'id':_0x44b638['id'],'available':_0x44b638[_0x3cac('0x58')],'loggedIn':_0x44b638[_0x3cac('0x5e')],'name':_0x44b638[_0x3cac('0x59')],'paused':_0x44b638['paused'],'waiting':_0x44b638['waiting']};_0xba3d18[_0x3cac('0x24')](_0x4f65a5);}}_0x356ff0({'count':_0xba3d18[_0x3cac('0x26')],'rows':_0xba3d18});});},'SmsQueues':function(){return new Promise(function(_0x1cd7aa){var _0xd8036f=[];for(var _0xeaf51e in _0x4bee52[_0x3cac('0x5f')]){if(_0x4bee52[_0x3cac('0x5f')]['hasOwnProperty'](_0xeaf51e)){var _0xab20c0=_0x4bee52[_0x3cac('0x5f')][_0xeaf51e];var _0x21533b={'id':_0xab20c0['id'],'available':_0xab20c0[_0x3cac('0x58')],'loggedIn':_0xab20c0[_0x3cac('0x5e')],'name':_0xab20c0['name'],'paused':_0xab20c0[_0x3cac('0x5a')],'waiting':_0xab20c0['waiting']};_0xd8036f[_0x3cac('0x24')](_0x21533b);}}_0x1cd7aa({'count':_0xd8036f['length'],'rows':_0xd8036f});});},'FaxQueues':function(){return new Promise(function(_0x58270e){var _0xd7266a=[];for(var _0x51cd8a in _0x4bee52['faxQueues']){if(_0x4bee52[_0x3cac('0x60')]['hasOwnProperty'](_0x51cd8a)){var _0x3a995c=_0x4bee52[_0x3cac('0x60')][_0x51cd8a];var _0x1aea24={'id':_0x3a995c['id'],'available':_0x3a995c[_0x3cac('0x58')],'loggedIn':_0x3a995c[_0x3cac('0x5e')],'name':_0x3a995c[_0x3cac('0x59')],'paused':_0x3a995c[_0x3cac('0x5a')],'waiting':_0x3a995c['waiting']};_0xd7266a[_0x3cac('0x24')](_0x1aea24);}}_0x58270e({'count':_0xd7266a[_0x3cac('0x26')],'rows':_0xd7266a});});},'WhatsappQueues':function(){return new Promise(function(_0x2e9c3d){var _0x5ae3b9=[];for(var _0x5dbca8 in _0x4bee52[_0x3cac('0x61')]){if(_0x4bee52[_0x3cac('0x61')][_0x3cac('0x52')](_0x5dbca8)){var _0x51e6e8=_0x4bee52['whatsappQueues'][_0x5dbca8];var _0x3a42a4={'id':_0x51e6e8['id'],'available':_0x51e6e8['available'],'loggedIn':_0x51e6e8[_0x3cac('0x5e')],'name':_0x51e6e8[_0x3cac('0x59')],'paused':_0x51e6e8[_0x3cac('0x5a')],'waiting':_0x51e6e8[_0x3cac('0x5b')]};_0x5ae3b9[_0x3cac('0x24')](_0x3a42a4);}}_0x2e9c3d({'count':_0x5ae3b9[_0x3cac('0x26')],'rows':_0x5ae3b9});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x2726bc){var _0x278244=_[_0x3cac('0x56')](_0x4bee52[_0x3cac('0x62')]);_0x2726bc({'count':_0x278244[_0x3cac('0x26')],'rows':_0x278244});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x3fe17c){var _0xb19dfc=_[_0x3cac('0x56')](_0x4bee52[_0x3cac('0x63')]);_0x3fe17c({'count':_0xb19dfc['length'],'rows':_0xb19dfc});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x37feac){var _0x2445a8=_[_0x3cac('0x56')](_0x4bee52['openchannelQueuesWaitingInteractions']);_0x37feac({'count':_0x2445a8['length'],'rows':_0x2445a8});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x6ee414){var _0x5738ad=_[_0x3cac('0x56')](_0x4bee52[_0x3cac('0x64')]);_0x6ee414({'count':_0x5738ad[_0x3cac('0x26')],'rows':_0x5738ad});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x2d815b){var _0x1ddcc8=_[_0x3cac('0x56')](_0x4bee52[_0x3cac('0x65')]);_0x2d815b({'count':_0x1ddcc8[_0x3cac('0x26')],'rows':_0x1ddcc8});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x26ac88){var _0x34ff8c=_[_0x3cac('0x56')](_0x4bee52[_0x3cac('0x66')]);_0x26ac88({'count':_0x34ff8c[_0x3cac('0x26')],'rows':_0x34ff8c});});}};var _0x34cea7=jayson['server'](_0x281dfd)[_0x3cac('0x67')]();_0x34cea7['on']('error',function(_0x20ec70){logger['error'](JSON[_0x3cac('0x41')](_0x20ec70));return _0xf24623(_0x20ec70);});_0x34cea7['listen'](0x232c,_0x3cac('0x68'),function(){console['log']('Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!',0x232c);return _0x2db008(_0x3cac('0x69')+0x232c);});});};
\ No newline at end of file
+var _0xde1a=['Push\x20new\x20rule','on\x20interval','\x20|\x20','error','Please\x20create\x20a\x20new\x20file\x20under','execute','stringify','matchPath','emit','Skipped\x20routing\x20for\x20%s','No\x20applications\x20to\x20execute','stack','routing\x20is\x20empty','agent','agents','busy','busyQueue','QueueReport','UserId','catch','message\x20is\x20empty','end','hasOwnProperty','capacity','CurrentCapacity','updateRealtime','values','chatQueues','available','name','mailQueues','paused','openchannelQueues','loggedIn','waiting','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server','http','127.0.0.1','log','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','util','path','jayson/promise','bluebird','./applications/utils','./applications/strategy/util','../../../config/logger','routing','../rpc/mailQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine','format','%s.%s.%s','isNil','IntervalId','Intervals','map','interval','listen','rules','channel','message','interaction','checkWaitingNotifications','transfer','applications','isArray','length','existsSync','join','app','.js','toLowerCase','autoreply','appdata','push','slice','dialogflowv2','amazonlex','split','TagId','tvox','getMustacheRender','account','notificationTemplate','ChatWebsiteId','body','%s:%s:%s','intervals','./applications/','consequence','priority','info'];(function(_0x52a019,_0x4cf810){var _0x15cad4=function(_0x38f5bd){while(--_0x38f5bd){_0x52a019['push'](_0x52a019['shift']());}};_0x15cad4(++_0x4cf810);}(_0xde1a,0xfd));var _0xade1=function(_0x4dbfed,_0x202f4e){_0x4dbfed=_0x4dbfed-0x0;var _0x3f6bf1=_0xde1a[_0x4dbfed];return _0x3f6bf1;};'use strict';var _=require('lodash');var util=require(_0xade1('0x0'));var path=require(_0xade1('0x1'));var fs=require('fs');var jayson=require(_0xade1('0x2'));var BPromise=require(_0xade1('0x3'));var utils=require(_0xade1('0x4'));var sUtils=require(_0xade1('0x5'));var logger=require(_0xade1('0x6'))(_0xade1('0x7'));var rpc={'openchannelQueueReport':require('../rpc/openchannelQueueReport'),'mailQueueReport':require(_0xade1('0x8')),'chatQueueReport':require(_0xade1('0x9')),'smsQueueReport':require(_0xade1('0xa')),'faxQueueReport':require(_0xade1('0xb')),'whatsappQueueReport':require(_0xade1('0xc'))};var RuleEngine=require(_0xade1('0xd'));function getId(_0x5eb992,_0x3a24e7,_0x41d069){return util[_0xade1('0xe')](_0xade1('0xf'),_0x5eb992,_0x3a24e7||0x0,_0x41d069||0x0);}function getIntervals(_0x120f47,_0x2b3854){var _0x3ebc61=[];if(!_[_0xade1('0x10')](_0x2b3854['IntervalId'])&&!_[_0xade1('0x10')](_0x120f47[_0x2b3854[_0xade1('0x11')]])&&!_['isNil'](_0x120f47[_0x2b3854[_0xade1('0x11')]][_0xade1('0x12')])){_0x3ebc61=_[_0xade1('0x13')](_0x120f47[_0x2b3854['IntervalId']][_0xade1('0x12')],_0xade1('0x14'));}else if(!_[_0xade1('0x10')](_0x2b3854[_0xade1('0x14')])){_0x3ebc61=[_0x2b3854[_0xade1('0x14')]];}return _0x3ebc61;}exports[_0xade1('0x15')]=function(_0x525f90){_0x525f90[_0xade1('0x16')]={};return new BPromise(function(_0x13dda2,_0xf881e1){var _0x10773d={'Start':function(_0x1c9717){var _0x5bd472=this;return new Promise(function(_0x44c001,_0x4623a1){if(_0x1c9717){try{var _0x290566=[];var _0x232e06=getId(_0x1c9717[_0xade1('0x17')],_0x1c9717['message']?_0x1c9717[_0xade1('0x18')]['id']:0x0,_0x1c9717[_0xade1('0x19')]?_0x1c9717[_0xade1('0x19')]['id']:0x0);var _0x1600af=sUtils[_0xade1('0x1a')](_0x525f90,_0x1c9717);if(_0x1c9717[_0xade1('0x1b')]||!_0x1600af&&_0x1c9717[_0xade1('0x1c')]&&_[_0xade1('0x1d')](_0x1c9717[_0xade1('0x1c')])&&_0x1c9717[_0xade1('0x1c')][_0xade1('0x1e')]){for(var _0x12ea91=0x0;_0x12ea91<_0x1c9717['applications']['length'];_0x12ea91+=0x1){var _0xdbecaf=_0x1c9717[_0xade1('0x1c')][_0x12ea91];if(fs[_0xade1('0x1f')](path[_0xade1('0x20')](__dirname,_0xade1('0x1c'),_0xdbecaf[_0xade1('0x21')]+_0xade1('0x22')))){var _0xd9d2e1=[];switch(_0xdbecaf[_0xade1('0x21')][_0xade1('0x23')]()){case _0xade1('0x24'):var _0x4ab3ac=_0xdbecaf[_0xade1('0x25')]['split'](',');if(_0x1c9717[_0xade1('0x17')]==='mail'){_0xd9d2e1[_0xade1('0x26')](_0x4ab3ac[0x0]);_0xd9d2e1[_0xade1('0x26')](_0x4ab3ac[0x1]);_0xd9d2e1[_0xade1('0x26')](_0x4ab3ac[_0xade1('0x27')](0x2,_0x4ab3ac[_0xade1('0x1e')])[_0xade1('0x20')](','));}else{_0xd9d2e1[_0xade1('0x26')](_0x4ab3ac[0x0]);_0xd9d2e1['push'](_0x4ab3ac[_0xade1('0x27')](0x1,_0x4ab3ac[_0xade1('0x1e')])['join'](','));}break;case'dialogflow':var _0x38dd9f=_0xdbecaf[_0xade1('0x25')]['split'](',');_0xd9d2e1['push'](_0x38dd9f[0x0]);_0xd9d2e1[_0xade1('0x26')](_0x38dd9f[0x1]);_0xd9d2e1[_0xade1('0x26')](_0x38dd9f[_0xade1('0x27')](0x2,_0x38dd9f['length'])[_0xade1('0x20')](','));break;case _0xade1('0x28'):var _0x4ff656=_0xdbecaf['appdata']['split'](',');_0xd9d2e1[_0xade1('0x26')](_0x4ff656[0x0]);_0xd9d2e1[_0xade1('0x26')](_0x4ff656[0x1]);_0xd9d2e1[_0xade1('0x26')](_0x4ff656[0x2]);_0xd9d2e1[_0xade1('0x26')](_0x4ff656[0x3]);_0xd9d2e1[_0xade1('0x26')](_0x4ff656[_0xade1('0x27')](0x4,_0x4ff656[_0xade1('0x1e')])[_0xade1('0x20')](','));break;case _0xade1('0x29'):var _0x50fad4=_0xdbecaf[_0xade1('0x25')][_0xade1('0x2a')](',');_0xd9d2e1[_0xade1('0x26')](_0x50fad4[0x0]);_0xd9d2e1['push'](_0x50fad4[0x1]);_0xd9d2e1[_0xade1('0x26')](_0x50fad4[0x2]);_0xd9d2e1[_0xade1('0x26')](_0x50fad4[0x3]);_0xd9d2e1[_0xade1('0x26')](_0x50fad4['slice'](0x4,_0x50fad4[_0xade1('0x1e')])[_0xade1('0x20')](','));break;case _0xade1('0x18'):_0xd9d2e1[_0xade1('0x26')](_0xdbecaf[_0xade1('0x25')]);break;case'tag':_0xd9d2e1[_0xade1('0x26')](_0xdbecaf[_0xade1('0x2b')]);_0xd9d2e1[_0xade1('0x26')](_0xdbecaf['appdata']);break;case _0xade1('0x2c'):var _0x2f826e=utils[_0xade1('0x2d')](_0x1c9717[_0xade1('0x2e')][_0xade1('0x2f')],_0x1c9717);var _0x4201c1=_0xdbecaf[_0xade1('0x25')][_0xade1('0x2a')](',');_0xd9d2e1[_0xade1('0x26')](_0x4201c1[0x0]);_0xd9d2e1[_0xade1('0x26')](_0x4201c1[0x1]);_0xd9d2e1[_0xade1('0x26')](_0x4201c1[0x2]);_0xd9d2e1[_0xade1('0x26')](_0x4201c1[0x3]);_0xd9d2e1['push'](_0x4201c1[0x4]);_0xd9d2e1['push'](_0x4201c1[0x5]);_0xd9d2e1[_0xade1('0x26')](_0x4201c1[0x6]);_0xd9d2e1[_0xade1('0x26')](_0x4201c1[0x7]);_0xd9d2e1[_0xade1('0x26')](_0x4201c1[0x8]);_0xd9d2e1[_0xade1('0x26')](_0x4201c1[0x9]);_0xd9d2e1['push'](_0x4201c1[0xa]);_0xd9d2e1[_0xade1('0x26')](_0x1c9717['interaction']['id']);_0xd9d2e1['push'](_0x1c9717[_0xade1('0x18')]['id']);_0xd9d2e1[_0xade1('0x26')](_0xdbecaf[_0xade1('0x30')]);_0xd9d2e1['push'](_0x1c9717[_0xade1('0x19')]['ContactId']);_0xd9d2e1[_0xade1('0x26')](_0x1c9717[_0xade1('0x31')][_0xade1('0x31')]);_0xd9d2e1[_0xade1('0x26')](_0x2f826e);break;default:_0xd9d2e1=_['isNil'](_0xdbecaf['appdata'])?[]:_0xdbecaf[_0xade1('0x25')][_0xade1('0x2a')](',');}var _0x2ec493={'id':util[_0xade1('0xe')](_0xade1('0x32'),_0x232e06,_0xdbecaf['id'],_0xdbecaf[_0xade1('0x21')]),'condition':require('./interval')['condition'](_0x232e06,getIntervals(_0x525f90[_0xade1('0x33')],_0xdbecaf),_0x525f90),'consequence':require(_0xade1('0x34')+_0xdbecaf[_0xade1('0x21')])[_0xade1('0x35')](_0x232e06,_0xd9d2e1,_0x525f90,_0x1c9717),'p':_0xdbecaf[_0xade1('0x36')]||0x0};logger[_0xade1('0x37')](_0xade1('0x38'),_0x2ec493['id'],_0xade1('0x39'),getIntervals(_0x525f90[_0xade1('0x33')],_0xdbecaf)[_0xade1('0x20')](_0xade1('0x3a')));_0x290566[_0xade1('0x26')](_0x2ec493);}else{logger[_0xade1('0x3b')](_0xade1('0x3c'),path[_0xade1('0x20')](__dirname,_0xade1('0x1c'),_0xdbecaf['app']+_0xade1('0x22')));}}_0x525f90['rules'][_0x232e06]=new RuleEngine(_0x290566);_0x525f90[_0xade1('0x16')][_0x232e06][_0xade1('0x3d')](_0x1c9717,function(_0x347641){logger['info']('Applications\x20executed',JSON[_0xade1('0x3e')](_0x347641[_0xade1('0x3f')]));if(_0x525f90['rules'][_0x232e06]){_0x525f90[_0xade1('0x16')][_0x232e06][_0xade1('0x40')]('complete');}});return _0x44c001({'code':0xc8,'message':_0x1c9717});}else{if(_0x1600af){logger[_0xade1('0x37')](util[_0xade1('0xe')](_0xade1('0x41'),_0x232e06));}else{logger['info'](_0xade1('0x42'));}return _0x44c001({'code':0xc8,'message':_0x1c9717});}}catch(_0x53448a){logger[_0xade1('0x3b')](_0x53448a[_0xade1('0x43')]);return _0x4623a1(_0x5bd472[_0xade1('0x3b')](0x1f4,_0x53448a));}}return _0x4623a1(_0xade1('0x44'));});},'AcceptMessage':function(_0x1f9f26){var _0x38198b=this;return new Promise(function(_0x8505d4,_0x59b090){if(_0x1f9f26[_0xade1('0x45')]&&_0x1f9f26[_0xade1('0x45')]['id']){if(_0x525f90['agents'][_0x1f9f26['agent']['id']]){_0x525f90[_0xade1('0x46')][_0x1f9f26[_0xade1('0x45')]['id']][_0xade1('0x47')]=![];_0x525f90[_0xade1('0x46')][_0x1f9f26[_0xade1('0x45')]['id']][_0xade1('0x48')]=undefined;}}if(_0x1f9f26[_0xade1('0x18')]&&_0x1f9f26[_0xade1('0x18')]['id']){try{var _0xaf7357=getId(_0x1f9f26['channel'],_0x1f9f26['message']?_0x1f9f26[_0xade1('0x18')]['id']:0x0,_0x1f9f26[_0xade1('0x19')]?_0x1f9f26[_0xade1('0x19')]['id']:0x0);if(_0x525f90[_0xade1('0x16')][_0xaf7357]){_0x525f90[_0xade1('0x16')][_0xaf7357]['emit']('end');if(rpc[_0x1f9f26[_0xade1('0x17')]+_0xade1('0x49')]){rpc[_0x1f9f26[_0xade1('0x17')]+_0xade1('0x49')]['update'](_0xaf7357,{'UserId':_0x1f9f26[_0xade1('0x18')][_0xade1('0x4a')]})[_0xade1('0x4b')](function(){logger[_0xade1('0x3b')]('error\x20update\x20queue\x20report');});}}return _0x8505d4({'code':0xc8,'message':_0x1f9f26});}catch(_0x4dbea4){logger['error'](_0x4dbea4['stack']);return _0x59b090(_0x38198b['error'](0x1f4,_0x4dbea4));}}logger['error'](_0xade1('0x4c'));return _0x59b090(_0x38198b[_0xade1('0x3b')](0x1f4,'message\x20is\x20empty'));});},'RejectMessage':function(_0x57d8f1){var _0x2158bb=this;return new Promise(function(_0x486f7a,_0x195573){if(_0x57d8f1[_0xade1('0x45')]&&_0x57d8f1['agent']['id']){try{if(_0x525f90[_0xade1('0x46')][_0x57d8f1[_0xade1('0x45')]['id']]){_0x525f90[_0xade1('0x46')][_0x57d8f1['agent']['id']]['busy']=![];_0x525f90[_0xade1('0x46')][_0x57d8f1['agent']['id']][_0xade1('0x48')]=undefined;}return _0x486f7a({'code':0xc8,'message':_0x57d8f1});}catch(_0x2520a7){logger[_0xade1('0x3b')](_0x2520a7[_0xade1('0x43')]);return _0x195573(_0x2158bb[_0xade1('0x3b')](0x1f4,_0x2520a7));}}logger[_0xade1('0x3b')](_0xade1('0x4c'));return _0x195573(_0x2158bb['error'](0x1f4,_0xade1('0x4c')));});},'AbandonInteraction':function(_0x21bce2){var _0x55bcdf=this;return new Promise(function(_0x4b0997,_0x31a2bd){if(_0x21bce2[_0xade1('0x17')]&&_0x21bce2[_0xade1('0x19')]&&_0x21bce2['interaction']['id']){try{var _0x3543ff=getId(_0x21bce2[_0xade1('0x17')],_0x21bce2[_0xade1('0x18')]?_0x21bce2[_0xade1('0x18')]['id']:0x0,_0x21bce2[_0xade1('0x19')]?_0x21bce2[_0xade1('0x19')]['id']:0x0);if(_0x525f90[_0xade1('0x16')][_0x3543ff]){_0x525f90['rules'][_0x3543ff]['emit'](_0xade1('0x4d'));}return _0x4b0997({'code':0xc8,'message':_0x21bce2});}catch(_0x1d20e0){logger[_0xade1('0x3b')](_0x1d20e0[_0xade1('0x43')]);return _0x31a2bd(_0x55bcdf[_0xade1('0x3b')](0x1f4,_0x1d20e0));}}logger['error']('message\x20is\x20empty');return _0x31a2bd(_0x55bcdf[_0xade1('0x3b')](0x1f4,_0xade1('0x4c')));});},'AgentCapacity':function(_0x58b11c){var _0x59448a=this;return new Promise(function(_0x24d711,_0x5af858){if(_0x525f90[_0xade1('0x46')][_0xade1('0x4e')](_0x58b11c['id'])){for(var _0x1ad53a in _0x58b11c[_0xade1('0x4f')]){if(_0x58b11c[_0xade1('0x4f')]['hasOwnProperty'](_0x1ad53a)){if(_0x525f90['agents'][_0x58b11c['id']][_0xade1('0x4e')](_0x1ad53a+_0xade1('0x50'))){_0x525f90[_0xade1('0x46')][_0x58b11c['id']][_0x1ad53a+_0xade1('0x50')]=parseInt(_0x58b11c['capacity'][_0x1ad53a],0xa);}}}_0x525f90[_0xade1('0x46')][_0x58b11c['id']][_0xade1('0x51')]();return _0x24d711({'code':0xc8,'message':_0x525f90[_0xade1('0x46')][_0x58b11c['id']]});}else{return _0x5af858(_0x59448a[_0xade1('0x3b')](0x1f4,'agent\x20not\x20found'));}});},'Agents':function(_0x2ee211){return new Promise(function(_0x60145){var _0x6d30af=_[_0xade1('0x52')](_0x525f90[_0xade1('0x46')]);if(_0x2ee211&&_0x2ee211['id']){var _0x428c35=_['find'](_0x6d30af,function(_0x238710){return _0x238710['id']===_0x2ee211['id'];});_0x60145(_0x428c35);}else{_0x60145({'count':_0x6d30af['length'],'rows':_0x6d30af});}});},'ChatQueues':function(){return new Promise(function(_0x338c39){var _0xe88d7f=[];for(var _0x564199 in _0x525f90[_0xade1('0x53')]){if(_0x525f90['chatQueues']['hasOwnProperty'](_0x564199)){var _0x2ba79d=_0x525f90[_0xade1('0x53')][_0x564199];var _0x2e9814={'id':_0x2ba79d['id'],'available':_0x2ba79d[_0xade1('0x54')],'loggedIn':_0x2ba79d['loggedIn'],'name':_0x2ba79d[_0xade1('0x55')],'paused':_0x2ba79d['paused'],'waiting':_0x2ba79d['waiting']};_0xe88d7f[_0xade1('0x26')](_0x2e9814);}}_0x338c39({'count':_0xe88d7f[_0xade1('0x1e')],'rows':_0xe88d7f});});},'MailQueues':function(){return new Promise(function(_0x2f85fa){var _0x18efd1=[];for(var _0x2f0c5b in _0x525f90[_0xade1('0x56')]){if(_0x525f90[_0xade1('0x56')][_0xade1('0x4e')](_0x2f0c5b)){var _0x1ebf91=_0x525f90[_0xade1('0x56')][_0x2f0c5b];var _0x560b9d={'id':_0x1ebf91['id'],'available':_0x1ebf91['available'],'loggedIn':_0x1ebf91['loggedIn'],'name':_0x1ebf91[_0xade1('0x55')],'paused':_0x1ebf91[_0xade1('0x57')],'waiting':_0x1ebf91['waiting']};_0x18efd1[_0xade1('0x26')](_0x560b9d);}}_0x2f85fa({'count':_0x18efd1[_0xade1('0x1e')],'rows':_0x18efd1});});},'OpenchannelQueues':function(){return new Promise(function(_0x17fcb6){var _0x59ff15=[];for(var _0x57355e in _0x525f90[_0xade1('0x58')]){if(_0x525f90['openchannelQueues'][_0xade1('0x4e')](_0x57355e)){var _0x4a8a49=_0x525f90[_0xade1('0x58')][_0x57355e];var _0x5ccf23={'id':_0x4a8a49['id'],'available':_0x4a8a49[_0xade1('0x54')],'loggedIn':_0x4a8a49[_0xade1('0x59')],'name':_0x4a8a49[_0xade1('0x55')],'paused':_0x4a8a49[_0xade1('0x57')],'waiting':_0x4a8a49[_0xade1('0x5a')]};_0x59ff15['push'](_0x5ccf23);}}_0x17fcb6({'count':_0x59ff15[_0xade1('0x1e')],'rows':_0x59ff15});});},'SmsQueues':function(){return new Promise(function(_0x1f45b0){var _0x250fda=[];for(var _0x92fa28 in _0x525f90[_0xade1('0x5b')]){if(_0x525f90[_0xade1('0x5b')][_0xade1('0x4e')](_0x92fa28)){var _0x1a925a=_0x525f90[_0xade1('0x5b')][_0x92fa28];var _0x29aecc={'id':_0x1a925a['id'],'available':_0x1a925a[_0xade1('0x54')],'loggedIn':_0x1a925a[_0xade1('0x59')],'name':_0x1a925a[_0xade1('0x55')],'paused':_0x1a925a[_0xade1('0x57')],'waiting':_0x1a925a[_0xade1('0x5a')]};_0x250fda['push'](_0x29aecc);}}_0x1f45b0({'count':_0x250fda['length'],'rows':_0x250fda});});},'FaxQueues':function(){return new Promise(function(_0x20d5a8){var _0x44d897=[];for(var _0x47bd65 in _0x525f90[_0xade1('0x5c')]){if(_0x525f90[_0xade1('0x5c')]['hasOwnProperty'](_0x47bd65)){var _0x202d04=_0x525f90[_0xade1('0x5c')][_0x47bd65];var _0x32603e={'id':_0x202d04['id'],'available':_0x202d04[_0xade1('0x54')],'loggedIn':_0x202d04['loggedIn'],'name':_0x202d04[_0xade1('0x55')],'paused':_0x202d04[_0xade1('0x57')],'waiting':_0x202d04[_0xade1('0x5a')]};_0x44d897[_0xade1('0x26')](_0x32603e);}}_0x20d5a8({'count':_0x44d897[_0xade1('0x1e')],'rows':_0x44d897});});},'WhatsappQueues':function(){return new Promise(function(_0x38ab12){var _0x51af1a=[];for(var _0x4654e5 in _0x525f90[_0xade1('0x5d')]){if(_0x525f90[_0xade1('0x5d')][_0xade1('0x4e')](_0x4654e5)){var _0x49989a=_0x525f90['whatsappQueues'][_0x4654e5];var _0xb22dc={'id':_0x49989a['id'],'available':_0x49989a[_0xade1('0x54')],'loggedIn':_0x49989a[_0xade1('0x59')],'name':_0x49989a[_0xade1('0x55')],'paused':_0x49989a[_0xade1('0x57')],'waiting':_0x49989a[_0xade1('0x5a')]};_0x51af1a['push'](_0xb22dc);}}_0x38ab12({'count':_0x51af1a['length'],'rows':_0x51af1a});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x551f2c){var _0x1dd121=_[_0xade1('0x52')](_0x525f90[_0xade1('0x5e')]);_0x551f2c({'count':_0x1dd121[_0xade1('0x1e')],'rows':_0x1dd121});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x517c06){var _0x31a854=_['values'](_0x525f90[_0xade1('0x5f')]);_0x517c06({'count':_0x31a854[_0xade1('0x1e')],'rows':_0x31a854});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x87a7f6){var _0x2b2254=_['values'](_0x525f90[_0xade1('0x60')]);_0x87a7f6({'count':_0x2b2254['length'],'rows':_0x2b2254});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x507e57){var _0x53fdda=_['values'](_0x525f90['smsQueuesWaitingInteractions']);_0x507e57({'count':_0x53fdda[_0xade1('0x1e')],'rows':_0x53fdda});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x2630e3){var _0x28ff06=_[_0xade1('0x52')](_0x525f90['faxQueuesWaitingInteractions']);_0x2630e3({'count':_0x28ff06['length'],'rows':_0x28ff06});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x56a917){var _0x22d32f=_[_0xade1('0x52')](_0x525f90[_0xade1('0x61')]);_0x56a917({'count':_0x22d32f['length'],'rows':_0x22d32f});});}};var _0x13a12a=jayson[_0xade1('0x62')](_0x10773d)[_0xade1('0x63')]();_0x13a12a['on'](_0xade1('0x3b'),function(_0x3e9264){logger[_0xade1('0x3b')](JSON[_0xade1('0x3e')](_0x3e9264));return _0xf881e1(_0x3e9264);});_0x13a12a[_0xade1('0x15')](0x232c,_0xade1('0x64'),function(){console[_0xade1('0x65')](_0xade1('0x66'),0x232c);return _0x13dda2('RPC\x20listening\x20on\x20port:'+0x232c);});});};
\ No newline at end of file
index 8e6ac8e..6b066f0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbcb9=['stop','map','some','[%s][INTERVAL\x20VALID]\x20%s\x20%s','\x20|\x20','[%s][INTERVAL\x20NOT\x20VALID]\x20%s\x20%s','join','../../../utils/iftime','iftime','../../../config/logger','condition','rules','info','[%s][INTERVAL]\x20ROUTING\x20STOPPED'];(function(_0x48571b,_0x5c6d8b){var _0x3d016d=function(_0x4ad75c){while(--_0x4ad75c){_0x48571b['push'](_0x48571b['shift']());}};_0x3d016d(++_0x5c6d8b);}(_0xbcb9,0x149));var _0x9bcb=function(_0x468048,_0x27e0ea){_0x468048=_0x468048-0x0;var _0x17d004=_0xbcb9[_0x468048];return _0x17d004;};'use strict';var _=require('lodash');var iftime=require(_0x9bcb('0x0'))[_0x9bcb('0x1')];var logger=require(_0x9bcb('0x2'))('routing');exports[_0x9bcb('0x3')]=function(_0x419899,_0x202eb5,_0x4e84f0){return function(_0x5493b6){if(_0x4e84f0[_0x9bcb('0x4')]&&!_0x4e84f0[_0x9bcb('0x4')][_0x419899]){logger[_0x9bcb('0x5')](_0x9bcb('0x6'),_0x419899);return _0x5493b6[_0x9bcb('0x7')]();}var _0x1ee583=_0x202eb5[_0x9bcb('0x8')](function(_0x3f265a){return iftime(_0x3f265a);});var _0x14c21c=_[_0x9bcb('0x9')](_0x1ee583);if(_0x14c21c){logger[_0x9bcb('0x5')](_0x9bcb('0xa'),_0x419899,_0x202eb5['join'](_0x9bcb('0xb')),_0x14c21c);_0x5493b6['when'](_0x14c21c);}else{logger[_0x9bcb('0x5')](_0x9bcb('0xc'),_0x419899,_0x202eb5[_0x9bcb('0xd')]('\x20|\x20'));_0x5493b6[_0x9bcb('0x7')]();}};};
\ No newline at end of file
+var _0xb101=['rules','[%s][INTERVAL]\x20ROUTING\x20STOPPED','stop','length','push','Command','message','indexOf','true','[%s][INTERVAL]\x20%s','some','info','[%s][INTERVAL]\x20%s\x20%s','\x20|\x20','when','join','stack','util','bluebird','lodash','../../../config/logger','routing','client','http','request','then','error','catch','condition'];(function(_0x232584,_0xc96043){var _0x482bf3=function(_0x311c81){while(--_0x311c81){_0x232584['push'](_0x232584['shift']());}};_0x482bf3(++_0xc96043);}(_0xb101,0xa2));var _0x1b10=function(_0x46fae9,_0x1b8ebd){_0x46fae9=_0x46fae9-0x0;var _0x55319c=_0xb101[_0x46fae9];return _0x55319c;};'use strict';var util=require(_0x1b10('0x0'));var BPromise=require(_0x1b10('0x1'));var jayson=require('jayson/promise');var _=require(_0x1b10('0x2'));var logger=require(_0x1b10('0x3'))(_0x1b10('0x4'));var client=jayson[_0x1b10('0x5')][_0x1b10('0x6')]({'port':0x232a});function request(_0x3ff246,_0x17760a){return new BPromise(function(_0x232439,_0x3e6d91){return client[_0x1b10('0x7')](_0x3ff246,_0x17760a)[_0x1b10('0x8')](function(_0x17e310){if(_0x17e310[_0x1b10('0x9')]){return _0x3e6d91(_0x17e310[_0x1b10('0x9')]['message']);}else{return _0x232439(_0x17e310['result']);}})[_0x1b10('0xa')](function(_0x116d17){return _0x3e6d91(_0x116d17);});});}exports[_0x1b10('0xb')]=function(_0x2ab9be,_0x5ec3ee,_0x4c4c26){return function(_0x4ae415){if(_0x4c4c26[_0x1b10('0xc')]&&!_0x4c4c26[_0x1b10('0xc')][_0x2ab9be]){logger['info'](_0x1b10('0xd'),_0x2ab9be);return _0x4ae415[_0x1b10('0xe')]();}var _0x59231f=[];for(var _0x28a4ac=0x0;_0x28a4ac<_0x5ec3ee[_0x1b10('0xf')];_0x28a4ac+=0x1){_0x59231f[_0x1b10('0x10')](request(_0x1b10('0x11'),{'command':util['format']('iftime\x20%s',_0x5ec3ee[_0x28a4ac])})[_0x1b10('0x8')](function(_0x16d72a){return _0x16d72a&&_0x16d72a[_0x1b10('0x12')]&&_0x16d72a[_0x1b10('0x12')][_0x1b10('0x13')](_0x1b10('0x14'))>=0x0?!![]:![];})[_0x1b10('0xa')](function(){logger[_0x1b10('0x9')](_0x1b10('0x15'),_0x2ab9be,_0x5ec3ee[_0x28a4ac]);}));}BPromise['all'](_0x59231f)['then'](function(_0x20e787){var _0x5477f2=_[_0x1b10('0x16')](_0x20e787);logger[_0x1b10('0x17')](_0x1b10('0x18'),_0x2ab9be,_0x5ec3ee['join'](_0x1b10('0x19')),_0x5477f2);_0x4ae415[_0x1b10('0x1a')](_0x5477f2);})[_0x1b10('0xa')](function(_0x19eaf8){logger[_0x1b10('0x9')](_0x1b10('0x18'),_0x2ab9be,_0x5ec3ee[_0x1b10('0x1b')](_0x1b10('0x19')),_0x19eaf8[_0x1b10('0x1c')]);_0x4ae415[_0x1b10('0xe')]();});};};
\ No newline at end of file
index 43b4faf..967d252 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa5fa=['[%s][agents][attendedtransfer]','origtransfereruniqueid','origtransfererlinkedid','secondtransfereruniqueid','[%s][agents][attendedtransfer]\x20agent:%s','origtransfererexten','transfereeuniqueid','agententerreason','clone','calleridname','agentcalledAt','secondtransfererlinkedid','transfertype','secondtransfererexten','transferuniqueid','transfertargetuniqueid','hangup','[%s][agents][hangup]','cause','rejected','indexOf','splice','agent','[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s','util','./utils','format','[%s][agents][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s','channel','queue','membername','interface','calleridnum','connectedlinenum','lastevent','getVoiceQueueByName','then','type','acw','acwTimeout','CreateVoiceAgentReport','request','uniqueid','destuniqueid','[%s][agents][agentcalled]','called','connectedlinename','info','[%s][agents][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','error','agentringnoanswer','isNil','debug','[%s][agents][agentringnoanswer]','[%s][agents][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:timeout','agentringnoanswerAt','now','timeout','holdtime','ringtime','talktime','[%s][agents][queuecallerabandon]','[%s][agents][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned','reason','abandoned','agentconnect','[%s][agents][agentconnect]','[%s][agents][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect','agentconnectAt','forIn','answered_elsewhere','answeredelsewheredestinationuniqueid','answeredelsewheremembername','agentcomplete','[%s][agents][agentcomplete]','agentcompleteAt','diffTime','complete','blindtransfer','transfereruniqueid','[%s][agents][blindtransfer]\x20agent:%s\x20transferuniqueid:%s','transfer','blind','transferexten','[%s][agents][blindtransfer]','attendedtransfer'];(function(_0x534e12,_0x1725aa){var _0x5f0400=function(_0x3208f4){while(--_0x3208f4){_0x534e12['push'](_0x534e12['shift']());}};_0x5f0400(++_0x1725aa);}(_0xa5fa,0xc4));var _0xaa5f=function(_0x1bd3a2,_0x6b37a7){_0x1bd3a2=_0x1bd3a2-0x0;var _0x1bb4b7=_0xa5fa[_0x1bd3a2];return _0x1bb4b7;};'use strict';var _=require('lodash');var util=require(_0xaa5f('0x0'));var utils=require(_0xaa5f('0x1'));var agents={};var transfers={};var unanswered=[];function writeDB(_0x24d383,_0x1b7e1d){utils['info'](util[_0xaa5f('0x2')](_0xaa5f('0x3'),_0x24d383['uniqueid'],_0x24d383[_0xaa5f('0x4')],_0x24d383[_0xaa5f('0x5')],_0x24d383[_0xaa5f('0x6')],_0x24d383[_0xaa5f('0x7')],_0x24d383[_0xaa5f('0x8')],_0x24d383[_0xaa5f('0x9')],_0x24d383[_0xaa5f('0xa')]));if(_0x24d383[_0xaa5f('0x5')]){utils[_0xaa5f('0xb')](_0x24d383[_0xaa5f('0x5')])[_0xaa5f('0xc')](function(_0x4e5257){if(_0x4e5257){_0x24d383[_0xaa5f('0xd')]=_0x4e5257[_0xaa5f('0xd')];_0x24d383['agentacw']=_0x24d383['agentcomplete']?_0x4e5257[_0xaa5f('0xe')]:![];_0x24d383['acwtime']=_0x24d383['agentacw']?_0x4e5257[_0xaa5f('0xf')]:0x0;}utils['request'](_0xaa5f('0x10'),_0x24d383);});}else{utils[_0xaa5f('0x11')](_0xaa5f('0x10'),_0x24d383);}if(_0x1b7e1d){delete transfers[_0x24d383[_0xaa5f('0x12')]];}else{delete agents[_0x24d383[_0xaa5f('0x13')]];}}exports['agentcalled']=function(_0xbd4e10){try{utils['debug'](util[_0xaa5f('0x2')](_0xaa5f('0x14'),_0xbd4e10[_0xaa5f('0x12')]),_0xbd4e10);agents[_0xbd4e10[_0xaa5f('0x13')]]=_0xbd4e10;agents[_0xbd4e10[_0xaa5f('0x13')]]['agentcalledAt']=utils['now']();agents[_0xbd4e10[_0xaa5f('0x13')]][_0xaa5f('0xa')]=_0xaa5f('0x15');agents[_0xbd4e10[_0xaa5f('0x13')]][_0xaa5f('0x9')]=null;agents[_0xbd4e10[_0xaa5f('0x13')]][_0xaa5f('0x16')]=null;utils[_0xaa5f('0x17')](util[_0xaa5f('0x2')](_0xaa5f('0x18'),_0xbd4e10[_0xaa5f('0x12')],agents[_0xbd4e10[_0xaa5f('0x13')]]['membername'],_0xbd4e10[_0xaa5f('0x13')]));}catch(_0x4c0a9d){utils[_0xaa5f('0x19')](util[_0xaa5f('0x2')](_0xaa5f('0x14'),_0xbd4e10[_0xaa5f('0x12')]),_0x4c0a9d);}};exports[_0xaa5f('0x1a')]=function(_0x194691){try{if(!_[_0xaa5f('0x1b')](agents[_0x194691[_0xaa5f('0x13')]])){utils[_0xaa5f('0x1c')](util[_0xaa5f('0x2')](_0xaa5f('0x1d'),_0x194691['uniqueid']),_0x194691);utils[_0xaa5f('0x17')](util['format'](_0xaa5f('0x1e'),_0x194691[_0xaa5f('0x12')],agents[_0x194691['destuniqueid']][_0xaa5f('0x6')],_0x194691[_0xaa5f('0x13')]));agents[_0x194691['destuniqueid']][_0xaa5f('0x1a')]=!![];agents[_0x194691[_0xaa5f('0x13')]][_0xaa5f('0x1f')]=utils[_0xaa5f('0x20')]();agents[_0x194691[_0xaa5f('0x13')]][_0xaa5f('0xa')]=_0xaa5f('0x21');agents[_0x194691[_0xaa5f('0x13')]]['reason']=_0xaa5f('0x21');agents[_0x194691[_0xaa5f('0x13')]][_0xaa5f('0x22')]=_0x194691['ringtime']?parseInt(_0x194691[_0xaa5f('0x23')])/0x3e8:0x0;agents[_0x194691[_0xaa5f('0x13')]][_0xaa5f('0x24')]=0x0;unanswered['push'](_0x194691[_0xaa5f('0x13')]);}}catch(_0x479f29){utils['error'](util[_0xaa5f('0x2')]('[%s][agents][agentringnoanswer]',_0x194691[_0xaa5f('0x12')]),_0x479f29);}};exports['queuecallerabandon']=function(_0x4c5dc0){try{_['forIn'](agents,function(_0x26a90d,_0x4ddebd){if(_0x26a90d[_0xaa5f('0x12')]==_0x4c5dc0[_0xaa5f('0x12')]&&!_['includes'](unanswered,_0x26a90d['destuniqueid'])){utils[_0xaa5f('0x1c')](util['format'](_0xaa5f('0x25'),_0x4c5dc0[_0xaa5f('0x12')]),_0x4c5dc0);utils['info'](util[_0xaa5f('0x2')](_0xaa5f('0x26'),_0x4c5dc0[_0xaa5f('0x12')],_0x26a90d['membername'],_0x26a90d[_0xaa5f('0x13')]));_0x26a90d[_0xaa5f('0x1a')]=!![];_0x26a90d['agentringnoanswerAt']=utils['now']();_0x26a90d['lastevent']='abandoned';_0x26a90d[_0xaa5f('0x27')]=_0xaa5f('0x28');_0x26a90d[_0xaa5f('0x22')]=_0x4c5dc0[_0xaa5f('0x22')];_0x26a90d[_0xaa5f('0x24')]=0x0;writeDB(_0x26a90d);}});}catch(_0x3bcaf6){utils[_0xaa5f('0x19')](util['format'](_0xaa5f('0x25'),_0x4c5dc0[_0xaa5f('0x12')]),_0x3bcaf6);}};exports[_0xaa5f('0x29')]=function(_0x1f3268){try{if(agents[_0x1f3268[_0xaa5f('0x13')]]){utils[_0xaa5f('0x1c')](util['format'](_0xaa5f('0x2a'),_0x1f3268[_0xaa5f('0x12')]),_0x1f3268);utils[_0xaa5f('0x17')](util[_0xaa5f('0x2')](_0xaa5f('0x2b'),_0x1f3268['uniqueid'],agents[_0x1f3268['destuniqueid']][_0xaa5f('0x6')],_0x1f3268[_0xaa5f('0x13')]));agents[_0x1f3268[_0xaa5f('0x13')]][_0xaa5f('0x2c')]=utils['now']();agents[_0x1f3268[_0xaa5f('0x13')]][_0xaa5f('0x9')]=_0x1f3268[_0xaa5f('0x9')];agents[_0x1f3268[_0xaa5f('0x13')]][_0xaa5f('0x16')]=_0x1f3268[_0xaa5f('0x16')];agents[_0x1f3268[_0xaa5f('0x13')]][_0xaa5f('0x22')]=_0x1f3268[_0xaa5f('0x23')];agents[_0x1f3268[_0xaa5f('0x13')]][_0xaa5f('0xa')]='connect';_[_0xaa5f('0x2d')](agents,function(_0x2562ce,_0xcd9c30){if(_0x2562ce[_0xaa5f('0x13')]!=_0x1f3268[_0xaa5f('0x13')]&&_0x2562ce[_0xaa5f('0x12')]==_0x1f3268[_0xaa5f('0x12')]){_0x2562ce[_0xaa5f('0x24')]=0x0;_0x2562ce[_0xaa5f('0x22')]=_0x1f3268[_0xaa5f('0x23')];_0x2562ce['agentringnoanswer']=!![];_0x2562ce[_0xaa5f('0x1f')]=utils['now']();_0x2562ce[_0xaa5f('0xa')]=_0xaa5f('0x2e');_0x2562ce[_0xaa5f('0x27')]='answered_elsewhere';_0x2562ce[_0xaa5f('0x2f')]=_0x1f3268[_0xaa5f('0x13')];_0x2562ce[_0xaa5f('0x30')]=_0x1f3268['membername'];writeDB(_0x2562ce);}});}}catch(_0x12a8e4){utils[_0xaa5f('0x19')](util[_0xaa5f('0x2')](_0xaa5f('0x2a'),_0x1f3268['uniqueid']),_0x12a8e4);}};exports[_0xaa5f('0x31')]=function(_0x2b2b4c){try{if(!_[_0xaa5f('0x1b')](agents[_0x2b2b4c[_0xaa5f('0x13')]])){utils[_0xaa5f('0x1c')](util[_0xaa5f('0x2')](_0xaa5f('0x32'),_0x2b2b4c[_0xaa5f('0x12')]),_0x2b2b4c);utils['info'](util[_0xaa5f('0x2')]('[%s][agents][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete',_0x2b2b4c[_0xaa5f('0x12')],agents[_0x2b2b4c['destuniqueid']][_0xaa5f('0x6')],_0x2b2b4c[_0xaa5f('0x13')]));agents[_0x2b2b4c['destuniqueid']][_0xaa5f('0x31')]=!![];agents[_0x2b2b4c[_0xaa5f('0x13')]][_0xaa5f('0x33')]=utils['now']();agents[_0x2b2b4c['destuniqueid']]['talktime']=utils[_0xaa5f('0x34')](agents[_0x2b2b4c['destuniqueid']][_0xaa5f('0x33')],agents[_0x2b2b4c[_0xaa5f('0x13')]][_0xaa5f('0x2c')]);agents[_0x2b2b4c[_0xaa5f('0x13')]]['reason']=_0x2b2b4c[_0xaa5f('0x27')];agents[_0x2b2b4c[_0xaa5f('0x13')]][_0xaa5f('0xa')]=_0xaa5f('0x35');writeDB(agents[_0x2b2b4c[_0xaa5f('0x13')]]);}}catch(_0x1f9629){utils[_0xaa5f('0x19')](util[_0xaa5f('0x2')](_0xaa5f('0x32'),_0x2b2b4c[_0xaa5f('0x12')]),_0x1f9629);}};exports[_0xaa5f('0x36')]=function(_0x2de737){try{if(!_[_0xaa5f('0x1b')](agents[_0x2de737[_0xaa5f('0x37')]])){utils[_0xaa5f('0x1c')](util[_0xaa5f('0x2')]('[%s][agents][blindtransfer]',_0x2de737[_0xaa5f('0x12')]),_0x2de737);utils[_0xaa5f('0x17')](util[_0xaa5f('0x2')](_0xaa5f('0x38'),_0x2de737[_0xaa5f('0x12')],agents[_0x2de737[_0xaa5f('0x37')]][_0xaa5f('0x6')],agents[_0x2de737['transfereruniqueid']][_0xaa5f('0x12')]));agents[_0x2de737[_0xaa5f('0x37')]][_0xaa5f('0x39')]=!![];agents[_0x2de737[_0xaa5f('0x37')]]['transfertype']=_0xaa5f('0x3a');agents[_0x2de737[_0xaa5f('0x37')]][_0xaa5f('0x3b')]=_0x2de737['extension'];agents[_0x2de737['transfereruniqueid']]['transferuniqueid']=agents[_0x2de737['transfereruniqueid']]['uniqueid'];}}catch(_0x509c61){utils[_0xaa5f('0x19')](util[_0xaa5f('0x2')](_0xaa5f('0x3c'),_0x2de737[_0xaa5f('0x12')]),_0x509c61);}};exports[_0xaa5f('0x3d')]=function(_0x17b872){try{utils['debug'](util['format'](_0xaa5f('0x3e'),_0x17b872[_0xaa5f('0x3f')]),_0x17b872);if(_0x17b872['origtransfereruniqueid']==_0x17b872[_0xaa5f('0x40')]){if(!_[_0xaa5f('0x1b')](agents[_0x17b872[_0xaa5f('0x41')]])){utils[_0xaa5f('0x17')](util[_0xaa5f('0x2')](_0xaa5f('0x42'),_0x17b872[_0xaa5f('0x3f')],agents[_0x17b872['secondtransfereruniqueid']]['membername']));agents[_0x17b872[_0xaa5f('0x41')]][_0xaa5f('0x39')]=!![];agents[_0x17b872['secondtransfereruniqueid']]['transfertype']='ATTENDED';agents[_0x17b872[_0xaa5f('0x41')]]['transferexten']=_0x17b872[_0xaa5f('0x43')];agents[_0x17b872['secondtransfereruniqueid']]['transferuniqueid']=_0x17b872[_0xaa5f('0x3f')];}if(_0x17b872[_0xaa5f('0x44')]&&agents[_0x17b872[_0xaa5f('0x44')]]){agents[_0x17b872['transfereeuniqueid']][_0xaa5f('0x45')]=0x1;transfers[_0x17b872[_0xaa5f('0x44')]]=_[_0xaa5f('0x46')](agents[_0x17b872['transfereeuniqueid']]);transfers[_0x17b872[_0xaa5f('0x44')]][_0xaa5f('0x8')]=agents[_0x17b872['secondtransfereruniqueid']][_0xaa5f('0x8')];transfers[_0x17b872[_0xaa5f('0x44')]][_0xaa5f('0x47')]=agents[_0x17b872[_0xaa5f('0x41')]][_0xaa5f('0x47')];transfers[_0x17b872[_0xaa5f('0x44')]][_0xaa5f('0x48')]=utils[_0xaa5f('0x20')]();transfers[_0x17b872[_0xaa5f('0x44')]]['agentconnectAt']=utils[_0xaa5f('0x20')]();transfers[_0x17b872[_0xaa5f('0x44')]][_0xaa5f('0x22')]=0x0;transfers[_0x17b872[_0xaa5f('0x44')]][_0xaa5f('0x45')]=0x2;}}else if(_0x17b872[_0xaa5f('0x41')]==_0x17b872[_0xaa5f('0x49')]){if(!_[_0xaa5f('0x1b')](agents[_0x17b872['origtransfereruniqueid']])){utils[_0xaa5f('0x17')](util['format'](_0xaa5f('0x42'),_0x17b872[_0xaa5f('0x3f')],agents[_0x17b872[_0xaa5f('0x3f')]][_0xaa5f('0x6')]));agents[_0x17b872['origtransfereruniqueid']][_0xaa5f('0x39')]=!![];agents[_0x17b872[_0xaa5f('0x3f')]][_0xaa5f('0x4a')]='ATTENDED';agents[_0x17b872[_0xaa5f('0x3f')]]['transferexten']=_0x17b872[_0xaa5f('0x4b')];agents[_0x17b872['origtransfereruniqueid']][_0xaa5f('0x4c')]=_0x17b872[_0xaa5f('0x41')];}if(_0x17b872[_0xaa5f('0x4d')]&&agents[_0x17b872[_0xaa5f('0x4d')]]){agents[_0x17b872['transfertargetuniqueid']][_0xaa5f('0x45')]=0x1;transfers[_0x17b872[_0xaa5f('0x4d')]]=_['clone'](agents[_0x17b872['transfertargetuniqueid']]);transfers[_0x17b872[_0xaa5f('0x4d')]][_0xaa5f('0x8')]=agents[_0x17b872['origtransfereruniqueid']][_0xaa5f('0x8')];transfers[_0x17b872[_0xaa5f('0x4d')]][_0xaa5f('0x47')]=agents[_0x17b872['origtransfereruniqueid']][_0xaa5f('0x47')];transfers[_0x17b872[_0xaa5f('0x4d')]]['agentcalledAt']=utils[_0xaa5f('0x20')]();transfers[_0x17b872[_0xaa5f('0x4d')]][_0xaa5f('0x2c')]=utils['now']();transfers[_0x17b872[_0xaa5f('0x4d')]][_0xaa5f('0x22')]=0x0;transfers[_0x17b872['transfertargetuniqueid']][_0xaa5f('0x45')]=0x2;}}}catch(_0x309605){utils[_0xaa5f('0x19')](util[_0xaa5f('0x2')](_0xaa5f('0x3e'),_0x17b872['origtransfereruniqueid']),_0x309605);}};exports[_0xaa5f('0x4e')]=function(_0x2ba378){try{utils[_0xaa5f('0x1c')](util[_0xaa5f('0x2')](_0xaa5f('0x4f'),_0x2ba378['uniqueid']),_0x2ba378);if(agents[_0x2ba378[_0xaa5f('0x12')]]&&agents[_0x2ba378['uniqueid']][_0xaa5f('0x27')]===_0xaa5f('0x21')){if(_0x2ba378[_0xaa5f('0x50')]==='21'){agents[_0x2ba378[_0xaa5f('0x12')]]['reason']=_0xaa5f('0x51');agents[_0x2ba378[_0xaa5f('0x12')]][_0xaa5f('0xa')]=_0xaa5f('0x51');}utils[_0xaa5f('0x17')](util[_0xaa5f('0x2')]('[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s',_0x2ba378['uniqueid'],agents[_0x2ba378[_0xaa5f('0x12')]][_0xaa5f('0x6')],agents[_0x2ba378[_0xaa5f('0x12')]][_0xaa5f('0x27')],agents[_0x2ba378[_0xaa5f('0x12')]]['lastevent']));writeDB(agents[_0x2ba378['uniqueid']]);var _0x104079=unanswered[_0xaa5f('0x52')](_0x2ba378['uniqueid']);if(_0x104079>-0x1){unanswered[_0xaa5f('0x53')](_0x104079,0x1);}}if(transfers[_0x2ba378['uniqueid']]){transfers[_0x2ba378[_0xaa5f('0x12')]][_0xaa5f('0x31')]=!![];transfers[_0x2ba378['uniqueid']][_0xaa5f('0x33')]=utils[_0xaa5f('0x20')]();transfers[_0x2ba378[_0xaa5f('0x12')]][_0xaa5f('0x24')]=utils[_0xaa5f('0x34')](transfers[_0x2ba378[_0xaa5f('0x12')]][_0xaa5f('0x33')],transfers[_0x2ba378['uniqueid']][_0xaa5f('0x2c')]);transfers[_0x2ba378[_0xaa5f('0x12')]][_0xaa5f('0x27')]='agent';transfers[_0x2ba378[_0xaa5f('0x12')]][_0xaa5f('0xa')]=_0xaa5f('0x35');utils[_0xaa5f('0x17')](util[_0xaa5f('0x2')]('[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s',_0x2ba378[_0xaa5f('0x12')],transfers[_0x2ba378[_0xaa5f('0x12')]][_0xaa5f('0x6')],transfers[_0x2ba378[_0xaa5f('0x12')]][_0xaa5f('0x27')],transfers[_0x2ba378[_0xaa5f('0x12')]][_0xaa5f('0xa')]));writeDB(transfers[_0x2ba378[_0xaa5f('0x12')]],!![]);}if(agents[_0x2ba378[_0xaa5f('0x12')]]&&agents[_0x2ba378[_0xaa5f('0x12')]]['agentconnectAt']){agents[_0x2ba378['uniqueid']][_0xaa5f('0x31')]=!![];agents[_0x2ba378[_0xaa5f('0x12')]][_0xaa5f('0x33')]=utils[_0xaa5f('0x20')]();agents[_0x2ba378[_0xaa5f('0x12')]][_0xaa5f('0x24')]=utils[_0xaa5f('0x34')](agents[_0x2ba378[_0xaa5f('0x12')]]['agentcompleteAt'],agents[_0x2ba378[_0xaa5f('0x12')]][_0xaa5f('0x2c')]);agents[_0x2ba378[_0xaa5f('0x12')]]['reason']=agents[_0x2ba378['uniqueid']][_0xaa5f('0x39')]?_0xaa5f('0x39'):_0xaa5f('0x54');agents[_0x2ba378[_0xaa5f('0x12')]][_0xaa5f('0xa')]=_0xaa5f('0x35');utils[_0xaa5f('0x17')](util[_0xaa5f('0x2')](_0xaa5f('0x55'),_0x2ba378[_0xaa5f('0x12')],agents[_0x2ba378['uniqueid']][_0xaa5f('0x6')],agents[_0x2ba378[_0xaa5f('0x12')]][_0xaa5f('0x27')],agents[_0x2ba378[_0xaa5f('0x12')]][_0xaa5f('0xa')]));writeDB(agents[_0x2ba378['uniqueid']]);}}catch(_0x4183c0){utils[_0xaa5f('0x19')](util[_0xaa5f('0x2')]('[%s][agents][hangup]',_0x2ba378['uniqueid']),_0x4183c0);}};
\ No newline at end of file
+var _0x5b02=['ringtime','error','queuecallerabandon','forIn','includes','[%s][agents][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned','agentringnoanswerAt','abandoned','talktime','[%s][agents][queuecallerabandon]','agentconnect','[%s][agents][agentconnect]','[%s][agents][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect','agentconnectAt','connect','answered_elsewhere','answeredelsewheredestinationuniqueid','answeredelsewheremembername','[%s][agents][agentcomplete]','[%s][agents][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','agentcompleteAt','diffTime','complete','blindtransfer','[%s][agents][blindtransfer]','transfereruniqueid','transfer','transfertype','blind','transferexten','extension','attendedtransfer','[%s][agents][attendedtransfer]','origtransfererlinkedid','[%s][agents][attendedtransfer]\x20agent:%s','origtransfereruniqueid','secondtransfereruniqueid','origtransfererexten','transferuniqueid','transfereeuniqueid','clone','calleridnum','calleridname','agententerreason','secondtransfererlinkedid','transfertargetuniqueid','hangup','[%s][agents][hangup]','cause','rejected','[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s','indexOf','agent','lodash','util','./utils','format','uniqueid','channel','queue','membername','interface','connectedlinenum','lastevent','getVoiceQueueByName','type','agentcomplete','acw','acwtime','agentacw','acwTimeout','request','CreateVoiceAgentReport','destuniqueid','agentcalled','debug','[%s][agents][agentcalled]','agentcalledAt','now','called','connectedlinename','info','[%s][agents][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','agentringnoanswer','isNil','[%s][agents][agentringnoanswer]','[%s][agents][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:timeout','timeout','reason','holdtime'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x5b02,0xe9));var _0x25b0=function(_0x41512a,_0xf682f2){_0x41512a=_0x41512a-0x0;var _0x2cd99c=_0x5b02[_0x41512a];return _0x2cd99c;};'use strict';var _=require(_0x25b0('0x0'));var util=require(_0x25b0('0x1'));var utils=require(_0x25b0('0x2'));var agents={};var transfers={};var unanswered=[];function writeDB(_0x1c3295,_0x4ef71c){utils['info'](util[_0x25b0('0x3')]('[%s][agents][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s',_0x1c3295[_0x25b0('0x4')],_0x1c3295[_0x25b0('0x5')],_0x1c3295[_0x25b0('0x6')],_0x1c3295[_0x25b0('0x7')],_0x1c3295[_0x25b0('0x8')],_0x1c3295['calleridnum'],_0x1c3295[_0x25b0('0x9')],_0x1c3295[_0x25b0('0xa')]));if(_0x1c3295['queue']){utils[_0x25b0('0xb')](_0x1c3295['queue'])['then'](function(_0x24f98b){if(_0x24f98b){_0x1c3295[_0x25b0('0xc')]=_0x24f98b[_0x25b0('0xc')];_0x1c3295['agentacw']=_0x1c3295[_0x25b0('0xd')]?_0x24f98b[_0x25b0('0xe')]:![];_0x1c3295[_0x25b0('0xf')]=_0x1c3295[_0x25b0('0x10')]?_0x24f98b[_0x25b0('0x11')]:0x0;}utils[_0x25b0('0x12')](_0x25b0('0x13'),_0x1c3295);});}else{utils[_0x25b0('0x12')](_0x25b0('0x13'),_0x1c3295);}if(_0x4ef71c){delete transfers[_0x1c3295[_0x25b0('0x4')]];}else{delete agents[_0x1c3295[_0x25b0('0x14')]];}}exports[_0x25b0('0x15')]=function(_0x2048dc){try{utils[_0x25b0('0x16')](util[_0x25b0('0x3')](_0x25b0('0x17'),_0x2048dc[_0x25b0('0x4')]),_0x2048dc);agents[_0x2048dc[_0x25b0('0x14')]]=_0x2048dc;agents[_0x2048dc[_0x25b0('0x14')]][_0x25b0('0x18')]=utils[_0x25b0('0x19')]();agents[_0x2048dc['destuniqueid']]['lastevent']=_0x25b0('0x1a');agents[_0x2048dc['destuniqueid']][_0x25b0('0x9')]=null;agents[_0x2048dc[_0x25b0('0x14')]][_0x25b0('0x1b')]=null;utils[_0x25b0('0x1c')](util['format'](_0x25b0('0x1d'),_0x2048dc[_0x25b0('0x4')],agents[_0x2048dc[_0x25b0('0x14')]][_0x25b0('0x7')],_0x2048dc[_0x25b0('0x14')]));}catch(_0x25872d){utils['error'](util[_0x25b0('0x3')](_0x25b0('0x17'),_0x2048dc[_0x25b0('0x4')]),_0x25872d);}};exports[_0x25b0('0x1e')]=function(_0x1dc691){try{if(!_[_0x25b0('0x1f')](agents[_0x1dc691[_0x25b0('0x14')]])){utils[_0x25b0('0x16')](util[_0x25b0('0x3')](_0x25b0('0x20'),_0x1dc691[_0x25b0('0x4')]),_0x1dc691);utils[_0x25b0('0x1c')](util['format'](_0x25b0('0x21'),_0x1dc691[_0x25b0('0x4')],agents[_0x1dc691['destuniqueid']][_0x25b0('0x7')],_0x1dc691[_0x25b0('0x14')]));agents[_0x1dc691[_0x25b0('0x14')]]['agentringnoanswer']=!![];agents[_0x1dc691['destuniqueid']]['agentringnoanswerAt']=utils[_0x25b0('0x19')]();agents[_0x1dc691[_0x25b0('0x14')]][_0x25b0('0xa')]=_0x25b0('0x22');agents[_0x1dc691[_0x25b0('0x14')]][_0x25b0('0x23')]=_0x25b0('0x22');agents[_0x1dc691[_0x25b0('0x14')]][_0x25b0('0x24')]=_0x1dc691['ringtime']?parseInt(_0x1dc691[_0x25b0('0x25')])/0x3e8:0x0;agents[_0x1dc691[_0x25b0('0x14')]]['talktime']=0x0;unanswered['push'](_0x1dc691['destuniqueid']);}}catch(_0x1a6212){utils[_0x25b0('0x26')](util[_0x25b0('0x3')](_0x25b0('0x20'),_0x1dc691[_0x25b0('0x4')]),_0x1a6212);}};exports[_0x25b0('0x27')]=function(_0x12676b){try{_[_0x25b0('0x28')](agents,function(_0x36b81d,_0x285a2b){if(_0x36b81d[_0x25b0('0x4')]==_0x12676b[_0x25b0('0x4')]&&!_[_0x25b0('0x29')](unanswered,_0x36b81d['destuniqueid'])){utils['debug'](util[_0x25b0('0x3')]('[%s][agents][queuecallerabandon]',_0x12676b['uniqueid']),_0x12676b);utils[_0x25b0('0x1c')](util[_0x25b0('0x3')](_0x25b0('0x2a'),_0x12676b[_0x25b0('0x4')],_0x36b81d[_0x25b0('0x7')],_0x36b81d['destuniqueid']));_0x36b81d[_0x25b0('0x1e')]=!![];_0x36b81d[_0x25b0('0x2b')]=utils['now']();_0x36b81d[_0x25b0('0xa')]=_0x25b0('0x2c');_0x36b81d['reason']=_0x25b0('0x2c');_0x36b81d['holdtime']=_0x12676b[_0x25b0('0x24')];_0x36b81d[_0x25b0('0x2d')]=0x0;writeDB(_0x36b81d);}});}catch(_0x14ccc6){utils[_0x25b0('0x26')](util[_0x25b0('0x3')](_0x25b0('0x2e'),_0x12676b[_0x25b0('0x4')]),_0x14ccc6);}};exports[_0x25b0('0x2f')]=function(_0x2f123c){try{if(agents[_0x2f123c['destuniqueid']]){utils[_0x25b0('0x16')](util[_0x25b0('0x3')](_0x25b0('0x30'),_0x2f123c[_0x25b0('0x4')]),_0x2f123c);utils[_0x25b0('0x1c')](util[_0x25b0('0x3')](_0x25b0('0x31'),_0x2f123c[_0x25b0('0x4')],agents[_0x2f123c[_0x25b0('0x14')]][_0x25b0('0x7')],_0x2f123c['destuniqueid']));agents[_0x2f123c[_0x25b0('0x14')]][_0x25b0('0x32')]=utils[_0x25b0('0x19')]();agents[_0x2f123c['destuniqueid']][_0x25b0('0x9')]=_0x2f123c[_0x25b0('0x9')];agents[_0x2f123c[_0x25b0('0x14')]][_0x25b0('0x1b')]=_0x2f123c[_0x25b0('0x1b')];agents[_0x2f123c[_0x25b0('0x14')]][_0x25b0('0x24')]=_0x2f123c[_0x25b0('0x25')];agents[_0x2f123c['destuniqueid']]['lastevent']=_0x25b0('0x33');_[_0x25b0('0x28')](agents,function(_0x3f4ae0,_0x52c0af){if(_0x3f4ae0[_0x25b0('0x14')]!=_0x2f123c['destuniqueid']&&_0x3f4ae0[_0x25b0('0x4')]==_0x2f123c[_0x25b0('0x4')]){_0x3f4ae0[_0x25b0('0x2d')]=0x0;_0x3f4ae0[_0x25b0('0x24')]=_0x2f123c[_0x25b0('0x25')];_0x3f4ae0['agentringnoanswer']=!![];_0x3f4ae0[_0x25b0('0x2b')]=utils[_0x25b0('0x19')]();_0x3f4ae0[_0x25b0('0xa')]=_0x25b0('0x34');_0x3f4ae0[_0x25b0('0x23')]='answered_elsewhere';_0x3f4ae0[_0x25b0('0x35')]=_0x2f123c[_0x25b0('0x14')];_0x3f4ae0[_0x25b0('0x36')]=_0x2f123c[_0x25b0('0x7')];writeDB(_0x3f4ae0);}});}}catch(_0x35fc00){utils[_0x25b0('0x26')](util[_0x25b0('0x3')](_0x25b0('0x30'),_0x2f123c[_0x25b0('0x4')]),_0x35fc00);}};exports[_0x25b0('0xd')]=function(_0x124d4b){try{if(!_['isNil'](agents[_0x124d4b[_0x25b0('0x14')]])){utils['debug'](util[_0x25b0('0x3')](_0x25b0('0x37'),_0x124d4b[_0x25b0('0x4')]),_0x124d4b);utils[_0x25b0('0x1c')](util['format'](_0x25b0('0x38'),_0x124d4b[_0x25b0('0x4')],agents[_0x124d4b[_0x25b0('0x14')]]['membername'],_0x124d4b[_0x25b0('0x14')]));agents[_0x124d4b[_0x25b0('0x14')]][_0x25b0('0xd')]=!![];agents[_0x124d4b[_0x25b0('0x14')]][_0x25b0('0x39')]=utils[_0x25b0('0x19')]();agents[_0x124d4b[_0x25b0('0x14')]]['talktime']=utils[_0x25b0('0x3a')](agents[_0x124d4b[_0x25b0('0x14')]][_0x25b0('0x39')],agents[_0x124d4b['destuniqueid']][_0x25b0('0x32')]);agents[_0x124d4b[_0x25b0('0x14')]][_0x25b0('0x23')]=_0x124d4b[_0x25b0('0x23')];agents[_0x124d4b[_0x25b0('0x14')]]['lastevent']=_0x25b0('0x3b');writeDB(agents[_0x124d4b[_0x25b0('0x14')]]);}}catch(_0x23de77){utils['error'](util[_0x25b0('0x3')](_0x25b0('0x37'),_0x124d4b[_0x25b0('0x4')]),_0x23de77);}};exports[_0x25b0('0x3c')]=function(_0x29165e){try{if(!_[_0x25b0('0x1f')](agents[_0x29165e['transfereruniqueid']])){utils['debug'](util['format'](_0x25b0('0x3d'),_0x29165e['uniqueid']),_0x29165e);utils['info'](util[_0x25b0('0x3')]('[%s][agents][blindtransfer]\x20agent:%s\x20transferuniqueid:%s',_0x29165e[_0x25b0('0x4')],agents[_0x29165e['transfereruniqueid']]['membername'],agents[_0x29165e[_0x25b0('0x3e')]][_0x25b0('0x4')]));agents[_0x29165e[_0x25b0('0x3e')]][_0x25b0('0x3f')]=!![];agents[_0x29165e[_0x25b0('0x3e')]][_0x25b0('0x40')]=_0x25b0('0x41');agents[_0x29165e[_0x25b0('0x3e')]][_0x25b0('0x42')]=_0x29165e[_0x25b0('0x43')];agents[_0x29165e['transfereruniqueid']]['transferuniqueid']=agents[_0x29165e['transfereruniqueid']][_0x25b0('0x4')];}}catch(_0xa45e87){utils[_0x25b0('0x26')](util[_0x25b0('0x3')](_0x25b0('0x3d'),_0x29165e[_0x25b0('0x4')]),_0xa45e87);}};exports[_0x25b0('0x44')]=function(_0x5d671a){try{utils[_0x25b0('0x16')](util['format'](_0x25b0('0x45'),_0x5d671a['origtransfereruniqueid']),_0x5d671a);if(_0x5d671a['origtransfereruniqueid']==_0x5d671a[_0x25b0('0x46')]){if(!_['isNil'](agents[_0x5d671a['secondtransfereruniqueid']])){utils[_0x25b0('0x1c')](util[_0x25b0('0x3')](_0x25b0('0x47'),_0x5d671a[_0x25b0('0x48')],agents[_0x5d671a[_0x25b0('0x49')]][_0x25b0('0x7')]));agents[_0x5d671a[_0x25b0('0x49')]][_0x25b0('0x3f')]=!![];agents[_0x5d671a[_0x25b0('0x49')]][_0x25b0('0x40')]='ATTENDED';agents[_0x5d671a['secondtransfereruniqueid']][_0x25b0('0x42')]=_0x5d671a[_0x25b0('0x4a')];agents[_0x5d671a['secondtransfereruniqueid']][_0x25b0('0x4b')]=_0x5d671a[_0x25b0('0x48')];}if(_0x5d671a[_0x25b0('0x4c')]&&agents[_0x5d671a[_0x25b0('0x4c')]]){agents[_0x5d671a[_0x25b0('0x4c')]]['agententerreason']=0x1;transfers[_0x5d671a[_0x25b0('0x4c')]]=_[_0x25b0('0x4d')](agents[_0x5d671a[_0x25b0('0x4c')]]);transfers[_0x5d671a['transfereeuniqueid']][_0x25b0('0x4e')]=agents[_0x5d671a[_0x25b0('0x49')]][_0x25b0('0x4e')];transfers[_0x5d671a[_0x25b0('0x4c')]][_0x25b0('0x4f')]=agents[_0x5d671a[_0x25b0('0x49')]][_0x25b0('0x4f')];transfers[_0x5d671a[_0x25b0('0x4c')]][_0x25b0('0x18')]=utils[_0x25b0('0x19')]();transfers[_0x5d671a[_0x25b0('0x4c')]][_0x25b0('0x32')]=utils[_0x25b0('0x19')]();transfers[_0x5d671a[_0x25b0('0x4c')]]['holdtime']=0x0;transfers[_0x5d671a[_0x25b0('0x4c')]][_0x25b0('0x50')]=0x2;}}else if(_0x5d671a['secondtransfereruniqueid']==_0x5d671a[_0x25b0('0x51')]){if(!_['isNil'](agents[_0x5d671a[_0x25b0('0x48')]])){utils[_0x25b0('0x1c')](util['format'](_0x25b0('0x47'),_0x5d671a[_0x25b0('0x48')],agents[_0x5d671a[_0x25b0('0x48')]]['membername']));agents[_0x5d671a[_0x25b0('0x48')]]['transfer']=!![];agents[_0x5d671a[_0x25b0('0x48')]][_0x25b0('0x40')]='ATTENDED';agents[_0x5d671a[_0x25b0('0x48')]][_0x25b0('0x42')]=_0x5d671a['secondtransfererexten'];agents[_0x5d671a[_0x25b0('0x48')]]['transferuniqueid']=_0x5d671a['secondtransfereruniqueid'];}if(_0x5d671a['transfertargetuniqueid']&&agents[_0x5d671a[_0x25b0('0x52')]]){agents[_0x5d671a[_0x25b0('0x52')]][_0x25b0('0x50')]=0x1;transfers[_0x5d671a['transfertargetuniqueid']]=_[_0x25b0('0x4d')](agents[_0x5d671a[_0x25b0('0x52')]]);transfers[_0x5d671a[_0x25b0('0x52')]][_0x25b0('0x4e')]=agents[_0x5d671a[_0x25b0('0x48')]][_0x25b0('0x4e')];transfers[_0x5d671a[_0x25b0('0x52')]][_0x25b0('0x4f')]=agents[_0x5d671a[_0x25b0('0x48')]][_0x25b0('0x4f')];transfers[_0x5d671a[_0x25b0('0x52')]][_0x25b0('0x18')]=utils[_0x25b0('0x19')]();transfers[_0x5d671a[_0x25b0('0x52')]][_0x25b0('0x32')]=utils[_0x25b0('0x19')]();transfers[_0x5d671a[_0x25b0('0x52')]]['holdtime']=0x0;transfers[_0x5d671a[_0x25b0('0x52')]]['agententerreason']=0x2;}}}catch(_0x210ae3){utils[_0x25b0('0x26')](util[_0x25b0('0x3')](_0x25b0('0x45'),_0x5d671a['origtransfereruniqueid']),_0x210ae3);}};exports[_0x25b0('0x53')]=function(_0x646457){try{utils[_0x25b0('0x16')](util[_0x25b0('0x3')](_0x25b0('0x54'),_0x646457[_0x25b0('0x4')]),_0x646457);if(agents[_0x646457['uniqueid']]&&agents[_0x646457['uniqueid']][_0x25b0('0x23')]==='timeout'){if(_0x646457[_0x25b0('0x55')]==='21'){agents[_0x646457[_0x25b0('0x4')]][_0x25b0('0x23')]='rejected';agents[_0x646457[_0x25b0('0x4')]][_0x25b0('0xa')]=_0x25b0('0x56');}utils[_0x25b0('0x1c')](util['format'](_0x25b0('0x57'),_0x646457[_0x25b0('0x4')],agents[_0x646457[_0x25b0('0x4')]]['membername'],agents[_0x646457[_0x25b0('0x4')]][_0x25b0('0x23')],agents[_0x646457[_0x25b0('0x4')]][_0x25b0('0xa')]));writeDB(agents[_0x646457[_0x25b0('0x4')]]);var _0x177be4=unanswered[_0x25b0('0x58')](_0x646457[_0x25b0('0x4')]);if(_0x177be4>-0x1){unanswered['splice'](_0x177be4,0x1);}}if(transfers[_0x646457[_0x25b0('0x4')]]){transfers[_0x646457[_0x25b0('0x4')]][_0x25b0('0xd')]=!![];transfers[_0x646457[_0x25b0('0x4')]]['agentcompleteAt']=utils['now']();transfers[_0x646457[_0x25b0('0x4')]][_0x25b0('0x2d')]=utils[_0x25b0('0x3a')](transfers[_0x646457[_0x25b0('0x4')]]['agentcompleteAt'],transfers[_0x646457[_0x25b0('0x4')]][_0x25b0('0x32')]);transfers[_0x646457['uniqueid']][_0x25b0('0x23')]=_0x25b0('0x59');transfers[_0x646457['uniqueid']]['lastevent']=_0x25b0('0x3b');utils[_0x25b0('0x1c')](util[_0x25b0('0x3')](_0x25b0('0x57'),_0x646457[_0x25b0('0x4')],transfers[_0x646457[_0x25b0('0x4')]][_0x25b0('0x7')],transfers[_0x646457[_0x25b0('0x4')]][_0x25b0('0x23')],transfers[_0x646457[_0x25b0('0x4')]][_0x25b0('0xa')]));writeDB(transfers[_0x646457[_0x25b0('0x4')]],!![]);}if(agents[_0x646457[_0x25b0('0x4')]]&&agents[_0x646457['uniqueid']][_0x25b0('0x32')]){agents[_0x646457['uniqueid']][_0x25b0('0xd')]=!![];agents[_0x646457[_0x25b0('0x4')]]['agentcompleteAt']=utils[_0x25b0('0x19')]();agents[_0x646457[_0x25b0('0x4')]][_0x25b0('0x2d')]=utils[_0x25b0('0x3a')](agents[_0x646457[_0x25b0('0x4')]][_0x25b0('0x39')],agents[_0x646457[_0x25b0('0x4')]][_0x25b0('0x32')]);agents[_0x646457[_0x25b0('0x4')]][_0x25b0('0x23')]=agents[_0x646457[_0x25b0('0x4')]]['transfer']?'transfer':_0x25b0('0x59');agents[_0x646457[_0x25b0('0x4')]]['lastevent']='complete';utils[_0x25b0('0x1c')](util['format'](_0x25b0('0x57'),_0x646457[_0x25b0('0x4')],agents[_0x646457['uniqueid']][_0x25b0('0x7')],agents[_0x646457[_0x25b0('0x4')]]['reason'],agents[_0x646457[_0x25b0('0x4')]][_0x25b0('0xa')]));writeDB(agents[_0x646457[_0x25b0('0x4')]]);}}catch(_0x1aba93){utils[_0x25b0('0x26')](util['format']('[%s][agents][hangup]',_0x646457[_0x25b0('0x4')]),_0x1aba93);}};
\ No newline at end of file
index bcabff5..c3d2bf5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa4f1=['mohtime','[%s][calls][musiconholdstop]\x20mohtime:%s','varset','[%s][calls][varset]','xmd-originatecalleridnum','[%s][calls][varset]\x20variable:xmd-originatecalleridnum\x20value:%s','source','value','variable','[%s][calls][varset]\x20variable:xmd-phone\x20value:%s','\x22\x20<','xmd-callerid-preview','xmd-callerid','[%s][calls][varset]\x20variable:%s\x20value:%s','xmd-queue','xmcs-queue','lastapplication','lastdata','[%s][calls][varset]\x20variable:xmd-contactid\x20value:%s','ContactId','[%s][calls][varset]\x20variable:xmd-cdrtype\x20value:%s','type','[%s][calls][varset]\x20variable:outboundrouteid\x20value:%s','routeid','sipcallid','[%s][calls][varset]\x20variable:sipcallid\x20value:%s','newexten','[%s][calls][newexten]','application','appdata','toLowerCase','startsWith','cdr','split','substring','lastIndexOf','includes','noop','execif','set','gotoif','util','FAILED','NO\x20ANSWER','ANSWERED','BUSY','info','format','[%s][calls][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s','uniqueid','queue','membername','interface','calleridnum','getUserByInternal','then','UserId','CreateVoiceCallReport','request','newchannel','[%s][calls][newchannel]','linkedid','channel','OutgoingSpoolFailed','[%s][calls][newchannel]\x20context:%s\x20exten:%s','context','exten','error','debug','[%s][calls][newstate]','channelstate','[%s][calls][newstate]\x20context:%s\x20channel:%s','isNil','systemanswertime','now','transfer','[%s][calls][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s','accountcode','answertime','toNumber','hangup','[%s][calls][hangup]','callerid','endtime','duration','diffTime','starttime','billableseconds','attendedtransfer','localtwolinkedid','[%s][calls][attendedtransfer]','origtransfereruniqueid','transfereechannel','[%s][calls][attendedtransfer]\x20localtwolinkedid:%s\x20destinationchannel:%s','secondtransfererchannel','_attended','origtransfererchannel','musiconholdstart','[%s][calls][musiconholdstart]','musiconholdstartAt','[%s][calls][musiconholdstop]'];(function(_0xe0f3ca,_0x12e10a){var _0x5db0fd=function(_0x886938){while(--_0x886938){_0xe0f3ca['push'](_0xe0f3ca['shift']());}};_0x5db0fd(++_0x12e10a);}(_0xa4f1,0x158));var _0x1a4f=function(_0x4b2436,_0x452299){_0x4b2436=_0x4b2436-0x0;var _0x4f5ab2=_0xa4f1[_0x4b2436];return _0x4f5ab2;};'use strict';var _=require('lodash');var util=require(_0x1a4f('0x0'));var utils=require('./utils');var dispositions=['NO\x20ANSWER',_0x1a4f('0x1'),_0x1a4f('0x1'),_0x1a4f('0x2'),_0x1a4f('0x2'),_0x1a4f('0x2'),_0x1a4f('0x3'),_0x1a4f('0x4'),'FAILED',_0x1a4f('0x1'),'FAILED'];var channels={};function writeDB(_0x61c814){utils[_0x1a4f('0x5')](util[_0x1a4f('0x6')](_0x1a4f('0x7'),_0x61c814[_0x1a4f('0x8')],_0x61c814['channel'],_0x61c814[_0x1a4f('0x9')],_0x61c814[_0x1a4f('0xa')],_0x61c814[_0x1a4f('0xb')],_0x61c814[_0x1a4f('0xc')],_0x61c814['connectedlinenum'],_0x61c814['lastevent']));if(_0x61c814['accountcode']){utils[_0x1a4f('0xd')](_0x61c814['accountcode'])[_0x1a4f('0xe')](function(_0x4c118e){if(_0x4c118e){_0x61c814[_0x1a4f('0xf')]=_0x4c118e['id'];}utils['request'](_0x1a4f('0x10'),_0x61c814);});}else{utils[_0x1a4f('0x11')](_0x1a4f('0x10'),_0x61c814);}if(channels[_0x61c814[_0x1a4f('0x8')]]){delete channels[_0x61c814['uniqueid']];}}exports[_0x1a4f('0x12')]=function(_0x499dc4){try{utils['debug'](util[_0x1a4f('0x6')](_0x1a4f('0x13'),_0x499dc4[_0x1a4f('0x8')]),_0x499dc4);if(_0x499dc4[_0x1a4f('0x8')]==_0x499dc4[_0x1a4f('0x14')]&&_0x499dc4[_0x1a4f('0x15')]!=_0x1a4f('0x16')){utils['info'](util['format'](_0x1a4f('0x17'),_0x499dc4['uniqueid'],_0x499dc4[_0x1a4f('0x18')],_0x499dc4['exten']));channels[_0x499dc4[_0x1a4f('0x8')]]={'uniqueid':_0x499dc4[_0x1a4f('0x8')],'accountcode':_0x499dc4['accountcode'],'source':_0x499dc4['calleridnum'],'destination':_0x499dc4[_0x1a4f('0x19')],'destinationcontext':_0x499dc4[_0x1a4f('0x18')],'channel':_0x499dc4['channel'],'starttime':utils['now'](),'answertime':null,'systemanswertime':null,'mohtime':0x0,'disposition':_0x1a4f('0x2'),'amaflags':'DOCUMENTATION'};}}catch(_0x302500){utils[_0x1a4f('0x1a')](util[_0x1a4f('0x6')](_0x1a4f('0x13'),_0x499dc4[_0x1a4f('0x8')]),_0x302500);}};exports['newstate']=function(_0x406884){try{utils[_0x1a4f('0x1b')](util[_0x1a4f('0x6')](_0x1a4f('0x1c'),_0x406884[_0x1a4f('0x8')]),_0x406884);if(!_['isNil'](channels[_0x406884[_0x1a4f('0x8')]])&&_0x406884[_0x1a4f('0x1d')]==0x6){utils['info'](util[_0x1a4f('0x6')](_0x1a4f('0x1e'),_0x406884[_0x1a4f('0x8')],_0x406884[_0x1a4f('0x18')],_0x406884[_0x1a4f('0x15')]));if(_[_0x1a4f('0x1f')](channels[_0x406884[_0x1a4f('0x8')]][_0x1a4f('0x20')])){channels[_0x406884['uniqueid']][_0x1a4f('0x20')]=utils[_0x1a4f('0x21')]();}}else if(!_[_0x1a4f('0x1f')](channels[_0x406884[_0x1a4f('0x14')]])&&_0x406884[_0x1a4f('0x1d')]==0x6&&_0x406884[_0x1a4f('0x18')]!=_0x1a4f('0x22')){utils[_0x1a4f('0x5')](util[_0x1a4f('0x6')](_0x1a4f('0x23'),_0x406884[_0x1a4f('0x8')],_0x406884[_0x1a4f('0x14')],_0x406884[_0x1a4f('0x18')],_0x406884[_0x1a4f('0x15')]));channels[_0x406884[_0x1a4f('0x14')]]['accountcode']=_0x406884[_0x1a4f('0x24')];channels[_0x406884[_0x1a4f('0x14')]]['destinationchannel']=_0x406884[_0x1a4f('0x15')];if(_[_0x1a4f('0x1f')](channels[_0x406884['linkedid']]['answertime'])){channels[_0x406884[_0x1a4f('0x14')]][_0x1a4f('0x25')]=utils[_0x1a4f('0x21')]();}channels[_0x406884['linkedid']]['disposition']=dispositions[_[_0x1a4f('0x26')](_0x406884[_0x1a4f('0x1d')])]||_0x1a4f('0x3');}}catch(_0x4d2351){utils[_0x1a4f('0x1a')](util['format'](_0x1a4f('0x1c'),_0x406884[_0x1a4f('0x8')]),_0x4d2351);}};exports[_0x1a4f('0x27')]=function(_0x4317f8){try{if(!_[_0x1a4f('0x1f')](channels[_0x4317f8[_0x1a4f('0x8')]])){utils[_0x1a4f('0x1b')](util['format'](_0x1a4f('0x28'),_0x4317f8['uniqueid']),_0x4317f8);if(_[_0x1a4f('0x1f')](channels[_0x4317f8['uniqueid']][_0x1a4f('0x29')])){channels[_0x4317f8[_0x1a4f('0x8')]][_0x1a4f('0x29')]=_0x4317f8['calleridname']+'\x20<'+_0x4317f8['calleridnum']+'>';}utils[_0x1a4f('0x5')](util[_0x1a4f('0x6')]('[%s][calls][hangup]\x20callerid:%s\x20reason:%s',_0x4317f8[_0x1a4f('0x8')],channels[_0x4317f8[_0x1a4f('0x8')]][_0x1a4f('0x29')],_0x4317f8['cause-txt']));channels[_0x4317f8[_0x1a4f('0x8')]][_0x1a4f('0x2a')]=utils[_0x1a4f('0x21')]();channels[_0x4317f8['uniqueid']][_0x1a4f('0x2b')]=utils[_0x1a4f('0x2c')](channels[_0x4317f8[_0x1a4f('0x8')]][_0x1a4f('0x2a')],channels[_0x4317f8[_0x1a4f('0x8')]][_0x1a4f('0x2d')]);channels[_0x4317f8[_0x1a4f('0x8')]][_0x1a4f('0x2e')]=channels[_0x4317f8[_0x1a4f('0x8')]][_0x1a4f('0x25')]?utils['diffTime'](channels[_0x4317f8[_0x1a4f('0x8')]][_0x1a4f('0x2a')],channels[_0x4317f8['uniqueid']][_0x1a4f('0x25')]):0x0;writeDB(channels[_0x4317f8[_0x1a4f('0x8')]]);}}catch(_0x172775){utils['error'](util[_0x1a4f('0x6')](_0x1a4f('0x28'),_0x4317f8['uniqueid']),_0x172775);}};exports[_0x1a4f('0x2f')]=function(_0x2cfccd){try{if(!_[_0x1a4f('0x1f')](channels[_0x2cfccd[_0x1a4f('0x30')]])){utils[_0x1a4f('0x1b')](util[_0x1a4f('0x6')](_0x1a4f('0x31'),_0x2cfccd[_0x1a4f('0x32')]),_0x2cfccd);if(channels[_0x2cfccd['localtwolinkedid']]['channel']==_0x2cfccd[_0x1a4f('0x33')]){utils[_0x1a4f('0x5')](util['format'](_0x1a4f('0x34'),_0x2cfccd[_0x1a4f('0x32')],_0x2cfccd[_0x1a4f('0x30')],_0x2cfccd[_0x1a4f('0x35')]));channels[_0x2cfccd[_0x1a4f('0x30')]]['destinationchannel']=_0x2cfccd['secondtransfererchannel'];channels[_0x2cfccd[_0x1a4f('0x30')]]['userfield']=_0x1a4f('0x36');}else if(channels[_0x2cfccd[_0x1a4f('0x30')]]['channel']=_0x2cfccd['transfertargetchannel']){utils[_0x1a4f('0x5')](util[_0x1a4f('0x6')](_0x1a4f('0x34'),_0x2cfccd[_0x1a4f('0x32')],_0x2cfccd[_0x1a4f('0x30')],_0x2cfccd[_0x1a4f('0x37')]));channels[_0x2cfccd['localtwolinkedid']]['destinationchannel']=_0x2cfccd[_0x1a4f('0x37')];channels[_0x2cfccd[_0x1a4f('0x30')]]['userfield']=_0x1a4f('0x36');}}}catch(_0x363c82){utils[_0x1a4f('0x1a')](util[_0x1a4f('0x6')](_0x1a4f('0x31'),_0x2cfccd[_0x1a4f('0x32')]),_0x363c82);}};exports[_0x1a4f('0x38')]=function(_0xe0f78d){try{if(!_[_0x1a4f('0x1f')](channels[_0xe0f78d['uniqueid']])){utils[_0x1a4f('0x1b')](util['format'](_0x1a4f('0x39'),_0xe0f78d['uniqueid']),_0xe0f78d);channels[_0xe0f78d['uniqueid']]['musiconholdstartAt']=utils[_0x1a4f('0x21')]();utils['info'](util[_0x1a4f('0x6')]('[%s][calls][musiconholdstart]\x20musiconholdstartAt:%s',_0xe0f78d[_0x1a4f('0x8')],channels[_0xe0f78d[_0x1a4f('0x8')]][_0x1a4f('0x3a')]));}}catch(_0x528cde){utils[_0x1a4f('0x1a')](util['format'](_0x1a4f('0x39'),_0xe0f78d['uniqueid']),_0x528cde);}};exports['musiconholdstop']=function(_0x32436f){try{if(!_[_0x1a4f('0x1f')](channels[_0x32436f['uniqueid']])){utils['debug'](util[_0x1a4f('0x6')](_0x1a4f('0x3b'),_0x32436f[_0x1a4f('0x8')]),_0x32436f);if(!_[_0x1a4f('0x1f')](channels[_0x32436f[_0x1a4f('0x8')]]['musiconholdstartAt'])){channels[_0x32436f[_0x1a4f('0x8')]][_0x1a4f('0x3c')]+=utils[_0x1a4f('0x2c')](utils[_0x1a4f('0x21')](),channels[_0x32436f[_0x1a4f('0x8')]][_0x1a4f('0x3a')]);utils['info'](util[_0x1a4f('0x6')](_0x1a4f('0x3d'),_0x32436f[_0x1a4f('0x8')],channels[_0x32436f['uniqueid']][_0x1a4f('0x3c')]));delete channels[_0x32436f['uniqueid']]['musiconholdstartAt'];}}}catch(_0x2c50bc){utils['error'](util[_0x1a4f('0x6')](_0x1a4f('0x3b'),_0x32436f[_0x1a4f('0x8')]),_0x2c50bc);}};exports[_0x1a4f('0x3e')]=function(_0x543b83){try{if(!_[_0x1a4f('0x1f')](channels[_0x543b83[_0x1a4f('0x8')]])){utils[_0x1a4f('0x1b')](util['format'](_0x1a4f('0x3f'),_0x543b83['uniqueid']),_0x543b83);if(!_['isNil'](_0x543b83['variable'][_0x1a4f('0x40')])){utils[_0x1a4f('0x5')](util['format'](_0x1a4f('0x41'),_0x543b83['uniqueid'],_0x543b83['value']));channels[_0x543b83['uniqueid']][_0x1a4f('0x42')]=_0x543b83[_0x1a4f('0x43')];}if(!_[_0x1a4f('0x1f')](_0x543b83[_0x1a4f('0x44')]['xmd-phone'])){utils[_0x1a4f('0x5')](util[_0x1a4f('0x6')](_0x1a4f('0x45'),_0x543b83[_0x1a4f('0x8')],_0x543b83[_0x1a4f('0x43')]));channels[_0x543b83[_0x1a4f('0x8')]]['destination']=_0x543b83['value'];channels[_0x543b83['uniqueid']][_0x1a4f('0x29')]='\x22'+_0x543b83[_0x1a4f('0x43')]+_0x1a4f('0x46')+_0x543b83[_0x1a4f('0x43')]+'>';}if(!_['isNil'](_0x543b83['variable'][_0x1a4f('0x47')])||!_[_0x1a4f('0x1f')](_0x543b83[_0x1a4f('0x44')][_0x1a4f('0x48')])){utils[_0x1a4f('0x5')](util[_0x1a4f('0x6')](_0x1a4f('0x49'),_0x543b83['uniqueid'],!_['isNil'](_0x543b83['variable']['xmd-callerid-preview'])?_0x1a4f('0x47'):_0x1a4f('0x48'),_0x543b83[_0x1a4f('0x43')]));channels[_0x543b83[_0x1a4f('0x8')]][_0x1a4f('0x29')]=_0x543b83[_0x1a4f('0x43')];}if(!_[_0x1a4f('0x1f')](_0x543b83[_0x1a4f('0x44')][_0x1a4f('0x4a')])||!_[_0x1a4f('0x1f')](_0x543b83[_0x1a4f('0x44')][_0x1a4f('0x4b')])){utils[_0x1a4f('0x5')](util[_0x1a4f('0x6')](_0x1a4f('0x49'),_0x543b83[_0x1a4f('0x8')],!_[_0x1a4f('0x1f')](_0x543b83['variable'][_0x1a4f('0x4a')])?_0x1a4f('0x4a'):'xmcs-queue',_0x543b83[_0x1a4f('0x43')]));channels[_0x543b83[_0x1a4f('0x8')]][_0x1a4f('0x4c')]='Queue';channels[_0x543b83['uniqueid']][_0x1a4f('0x4d')]=_0x543b83[_0x1a4f('0x43')];channels[_0x543b83[_0x1a4f('0x8')]][_0x1a4f('0x9')]=!![];}if(!_[_0x1a4f('0x1f')](_0x543b83['variable']['xmd-contactid'])){utils[_0x1a4f('0x5')](util[_0x1a4f('0x6')](_0x1a4f('0x4e'),_0x543b83[_0x1a4f('0x8')],_0x543b83[_0x1a4f('0x43')]));channels[_0x543b83['uniqueid']][_0x1a4f('0x4f')]=_0x543b83[_0x1a4f('0x43')];}if(!_[_0x1a4f('0x1f')](_0x543b83['variable']['xmd-cdrtype'])){utils[_0x1a4f('0x5')](util[_0x1a4f('0x6')](_0x1a4f('0x50'),_0x543b83['uniqueid'],_0x543b83[_0x1a4f('0x43')]));channels[_0x543b83[_0x1a4f('0x8')]][_0x1a4f('0x51')]=_0x543b83[_0x1a4f('0x43')];}if(!_['isNil'](_0x543b83[_0x1a4f('0x44')]['outboundrouteid'])){utils['info'](util[_0x1a4f('0x6')](_0x1a4f('0x52'),_0x543b83['uniqueid'],_0x543b83[_0x1a4f('0x43')]));channels[_0x543b83[_0x1a4f('0x8')]][_0x1a4f('0x53')]=_0x543b83[_0x1a4f('0x43')];}if(!_[_0x1a4f('0x1f')](_0x543b83['variable'][_0x1a4f('0x54')])){utils['info'](util[_0x1a4f('0x6')](_0x1a4f('0x55'),_0x543b83[_0x1a4f('0x8')],_0x543b83[_0x1a4f('0x43')]));channels[_0x543b83['uniqueid']][_0x1a4f('0x54')]=_0x543b83[_0x1a4f('0x43')];}}}catch(_0x308c96){utils[_0x1a4f('0x1a')](util[_0x1a4f('0x6')](_0x1a4f('0x3f'),_0x543b83['uniqueid']),_0x308c96);}};exports[_0x1a4f('0x56')]=function(_0x54254c){try{if(!_[_0x1a4f('0x1f')](channels[_0x54254c[_0x1a4f('0x8')]])){utils[_0x1a4f('0x1b')](util[_0x1a4f('0x6')](_0x1a4f('0x57'),_0x54254c[_0x1a4f('0x8')]),_0x54254c);utils[_0x1a4f('0x5')](util[_0x1a4f('0x6')]('[%s][calls][newexten]\x20application:%s\x20appdata:%s',_0x54254c[_0x1a4f('0x8')],_0x54254c[_0x1a4f('0x58')],_0x54254c[_0x1a4f('0x59')]));if(_0x54254c[_0x1a4f('0x58')][_0x1a4f('0x5a')]()=='set'&&_[_0x1a4f('0x5b')](_0x54254c[_0x1a4f('0x59')][_0x1a4f('0x5a')](),_0x1a4f('0x5c'))){var _0x18f7cf=_0x54254c[_0x1a4f('0x59')][_0x1a4f('0x5d')]('=');var _0x1522fe=_0x18f7cf[0x0][_0x1a4f('0x5e')](_0x18f7cf[0x0]['lastIndexOf']('(')+0x1,_0x18f7cf[0x0][_0x1a4f('0x5f')](')'));var _0x5176cd=_0x18f7cf[0x1];channels[_0x54254c[_0x1a4f('0x8')]][_0x1522fe]=_0x5176cd;}if(!_[_0x1a4f('0x60')]([_0x1a4f('0x27'),_0x1a4f('0x61'),_0x1a4f('0x62'),_0x1a4f('0x63'),_0x1a4f('0x64')],_0x54254c['application']['toLowerCase']())){channels[_0x54254c[_0x1a4f('0x8')]][_0x1a4f('0x4c')]=_0x54254c[_0x1a4f('0x58')];channels[_0x54254c[_0x1a4f('0x8')]][_0x1a4f('0x4d')]=_0x54254c[_0x1a4f('0x59')];}}}catch(_0x28df9f){utils[_0x1a4f('0x1a')](util['format'](_0x1a4f('0x57'),_0x54254c[_0x1a4f('0x8')]),_0x28df9f);}};
\ No newline at end of file
+var _0x19e9=['[%s][calls][attendedtransfer]\x20localtwolinkedid:%s\x20destinationchannel:%s','origtransfereruniqueid','secondtransfererchannel','userfield','_attended','transfertargetchannel','origtransfererchannel','musiconholdstart','[%s][calls][musiconholdstart]','musiconholdstartAt','[%s][calls][musiconholdstart]\x20musiconholdstartAt:%s','musiconholdstop','[%s][calls][musiconholdstop]','[%s][calls][musiconholdstop]\x20mohtime:%s','varset','[%s][calls][varset]','xmd-originatecalleridnum','[%s][calls][varset]\x20variable:xmd-originatecalleridnum\x20value:%s','source','value','variable','[%s][calls][varset]\x20variable:xmd-phone\x20value:%s','destination','\x22\x20<','xmd-callerid','[%s][calls][varset]\x20variable:%s\x20value:%s','xmd-callerid-preview','xmd-queue','xmcs-queue','lastapplication','Queue','lastdata','queue','xmd-contactid','ContactId','xmd-cdrtype','type','outboundrouteid','[%s][calls][varset]\x20variable:outboundrouteid\x20value:%s','routeid','sipcallid','[%s][calls][varset]\x20variable:sipcallid\x20value:%s','[%s][calls][newexten]\x20application:%s\x20appdata:%s','application','appdata','toLowerCase','set','startsWith','cdr','split','substring','lastIndexOf','includes','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','membername','interface','calleridnum','connectedlinenum','lastevent','getUserByInternal','accountcode','then','UserId','request','debug','[%s][calls][newchannel]','linkedid','channel','OutgoingSpoolFailed','[%s][calls][newchannel]\x20context:%s\x20exten:%s','exten','context','DOCUMENTATION','error','channelstate','[%s][calls][newstate]\x20context:%s\x20channel:%s','systemanswertime','now','isNil','transfer','[%s][calls][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s','destinationchannel','answertime','[%s][calls][newstate]','[%s][calls][hangup]','callerid','calleridname','[%s][calls][hangup]\x20callerid:%s\x20reason:%s','cause-txt','duration','diffTime','endtime','billableseconds','attendedtransfer','localtwolinkedid'];(function(_0x2c9708,_0x1d042b){var _0x1da302=function(_0x49102c){while(--_0x49102c){_0x2c9708['push'](_0x2c9708['shift']());}};_0x1da302(++_0x1d042b);}(_0x19e9,0x174));var _0x919e=function(_0x4ceed5,_0x4e10a5){_0x4ceed5=_0x4ceed5-0x0;var _0x3ea9af=_0x19e9[_0x4ceed5];return _0x3ea9af;};'use strict';var _=require(_0x919e('0x0'));var util=require(_0x919e('0x1'));var utils=require(_0x919e('0x2'));var dispositions=[_0x919e('0x3'),_0x919e('0x4'),'FAILED','NO\x20ANSWER','NO\x20ANSWER',_0x919e('0x3'),_0x919e('0x5'),_0x919e('0x6'),_0x919e('0x4'),_0x919e('0x4'),_0x919e('0x4')];var channels={};function writeDB(_0x38152f){utils[_0x919e('0x7')](util[_0x919e('0x8')](_0x919e('0x9'),_0x38152f[_0x919e('0xa')],_0x38152f['channel'],_0x38152f['queue'],_0x38152f[_0x919e('0xb')],_0x38152f[_0x919e('0xc')],_0x38152f[_0x919e('0xd')],_0x38152f[_0x919e('0xe')],_0x38152f[_0x919e('0xf')]));if(_0x38152f['accountcode']){utils[_0x919e('0x10')](_0x38152f[_0x919e('0x11')])[_0x919e('0x12')](function(_0xc41de4){if(_0xc41de4){_0x38152f[_0x919e('0x13')]=_0xc41de4['id'];}utils[_0x919e('0x14')]('CreateVoiceCallReport',_0x38152f);});}else{utils[_0x919e('0x14')]('CreateVoiceCallReport',_0x38152f);}if(channels[_0x38152f[_0x919e('0xa')]]){delete channels[_0x38152f[_0x919e('0xa')]];}}exports['newchannel']=function(_0x4a5fd9){try{utils[_0x919e('0x15')](util[_0x919e('0x8')](_0x919e('0x16'),_0x4a5fd9[_0x919e('0xa')]),_0x4a5fd9);if(_0x4a5fd9['uniqueid']==_0x4a5fd9[_0x919e('0x17')]&&_0x4a5fd9[_0x919e('0x18')]!=_0x919e('0x19')){utils[_0x919e('0x7')](util[_0x919e('0x8')](_0x919e('0x1a'),_0x4a5fd9[_0x919e('0xa')],_0x4a5fd9['context'],_0x4a5fd9[_0x919e('0x1b')]));channels[_0x4a5fd9[_0x919e('0xa')]]={'uniqueid':_0x4a5fd9[_0x919e('0xa')],'accountcode':_0x4a5fd9[_0x919e('0x11')],'source':_0x4a5fd9[_0x919e('0xd')],'destination':_0x4a5fd9[_0x919e('0x1b')],'destinationcontext':_0x4a5fd9[_0x919e('0x1c')],'channel':_0x4a5fd9[_0x919e('0x18')],'starttime':utils['now'](),'answertime':null,'systemanswertime':null,'mohtime':0x0,'disposition':_0x919e('0x3'),'amaflags':_0x919e('0x1d')};}}catch(_0x3e8184){utils[_0x919e('0x1e')](util[_0x919e('0x8')](_0x919e('0x16'),_0x4a5fd9[_0x919e('0xa')]),_0x3e8184);}};exports['newstate']=function(_0xb399df){try{utils[_0x919e('0x15')](util[_0x919e('0x8')]('[%s][calls][newstate]',_0xb399df['uniqueid']),_0xb399df);if(!_['isNil'](channels[_0xb399df[_0x919e('0xa')]])&&_0xb399df[_0x919e('0x1f')]==0x6){utils[_0x919e('0x7')](util[_0x919e('0x8')](_0x919e('0x20'),_0xb399df[_0x919e('0xa')],_0xb399df[_0x919e('0x1c')],_0xb399df[_0x919e('0x18')]));if(_['isNil'](channels[_0xb399df[_0x919e('0xa')]][_0x919e('0x21')])){channels[_0xb399df[_0x919e('0xa')]][_0x919e('0x21')]=utils[_0x919e('0x22')]();}}else if(!_[_0x919e('0x23')](channels[_0xb399df[_0x919e('0x17')]])&&_0xb399df[_0x919e('0x1f')]==0x6&&_0xb399df['context']!=_0x919e('0x24')){utils[_0x919e('0x7')](util[_0x919e('0x8')](_0x919e('0x25'),_0xb399df[_0x919e('0xa')],_0xb399df[_0x919e('0x17')],_0xb399df['context'],_0xb399df[_0x919e('0x18')]));channels[_0xb399df['linkedid']]['accountcode']=_0xb399df[_0x919e('0x11')];channels[_0xb399df[_0x919e('0x17')]][_0x919e('0x26')]=_0xb399df[_0x919e('0x18')];if(_['isNil'](channels[_0xb399df[_0x919e('0x17')]]['answertime'])){channels[_0xb399df[_0x919e('0x17')]][_0x919e('0x27')]=utils[_0x919e('0x22')]();}channels[_0xb399df[_0x919e('0x17')]]['disposition']=dispositions[_['toNumber'](_0xb399df[_0x919e('0x1f')])]||'ANSWERED';}}catch(_0x4c6587){utils[_0x919e('0x1e')](util['format'](_0x919e('0x28'),_0xb399df[_0x919e('0xa')]),_0x4c6587);}};exports['hangup']=function(_0x5335b3){try{if(!_[_0x919e('0x23')](channels[_0x5335b3['uniqueid']])){utils['debug'](util['format'](_0x919e('0x29'),_0x5335b3[_0x919e('0xa')]),_0x5335b3);if(_[_0x919e('0x23')](channels[_0x5335b3[_0x919e('0xa')]][_0x919e('0x2a')])){channels[_0x5335b3['uniqueid']][_0x919e('0x2a')]=_0x5335b3[_0x919e('0x2b')]+'\x20<'+_0x5335b3['calleridnum']+'>';}utils[_0x919e('0x7')](util['format'](_0x919e('0x2c'),_0x5335b3['uniqueid'],channels[_0x5335b3[_0x919e('0xa')]][_0x919e('0x2a')],_0x5335b3[_0x919e('0x2d')]));channels[_0x5335b3[_0x919e('0xa')]]['endtime']=utils[_0x919e('0x22')]();channels[_0x5335b3[_0x919e('0xa')]][_0x919e('0x2e')]=utils[_0x919e('0x2f')](channels[_0x5335b3[_0x919e('0xa')]][_0x919e('0x30')],channels[_0x5335b3['uniqueid']]['starttime']);channels[_0x5335b3[_0x919e('0xa')]][_0x919e('0x31')]=channels[_0x5335b3[_0x919e('0xa')]][_0x919e('0x27')]?utils[_0x919e('0x2f')](channels[_0x5335b3['uniqueid']]['endtime'],channels[_0x5335b3[_0x919e('0xa')]][_0x919e('0x27')]):0x0;writeDB(channels[_0x5335b3[_0x919e('0xa')]]);}}catch(_0x179412){utils[_0x919e('0x1e')](util[_0x919e('0x8')](_0x919e('0x29'),_0x5335b3[_0x919e('0xa')]),_0x179412);}};exports[_0x919e('0x32')]=function(_0x40cfa7){try{if(!_[_0x919e('0x23')](channels[_0x40cfa7[_0x919e('0x33')]])){utils[_0x919e('0x15')](util[_0x919e('0x8')]('[%s][calls][attendedtransfer]',_0x40cfa7['origtransfereruniqueid']),_0x40cfa7);if(channels[_0x40cfa7[_0x919e('0x33')]][_0x919e('0x18')]==_0x40cfa7['transfereechannel']){utils[_0x919e('0x7')](util['format'](_0x919e('0x34'),_0x40cfa7[_0x919e('0x35')],_0x40cfa7[_0x919e('0x33')],_0x40cfa7[_0x919e('0x36')]));channels[_0x40cfa7[_0x919e('0x33')]]['destinationchannel']=_0x40cfa7[_0x919e('0x36')];channels[_0x40cfa7[_0x919e('0x33')]][_0x919e('0x37')]=_0x919e('0x38');}else if(channels[_0x40cfa7[_0x919e('0x33')]][_0x919e('0x18')]=_0x40cfa7[_0x919e('0x39')]){utils['info'](util[_0x919e('0x8')](_0x919e('0x34'),_0x40cfa7[_0x919e('0x35')],_0x40cfa7[_0x919e('0x33')],_0x40cfa7['origtransfererchannel']));channels[_0x40cfa7[_0x919e('0x33')]][_0x919e('0x26')]=_0x40cfa7[_0x919e('0x3a')];channels[_0x40cfa7['localtwolinkedid']][_0x919e('0x37')]='_attended';}}}catch(_0x549189){utils[_0x919e('0x1e')](util[_0x919e('0x8')]('[%s][calls][attendedtransfer]',_0x40cfa7['origtransfereruniqueid']),_0x549189);}};exports[_0x919e('0x3b')]=function(_0x1c8b03){try{if(!_[_0x919e('0x23')](channels[_0x1c8b03['uniqueid']])){utils[_0x919e('0x15')](util['format'](_0x919e('0x3c'),_0x1c8b03['uniqueid']),_0x1c8b03);channels[_0x1c8b03[_0x919e('0xa')]][_0x919e('0x3d')]=utils[_0x919e('0x22')]();utils['info'](util[_0x919e('0x8')](_0x919e('0x3e'),_0x1c8b03[_0x919e('0xa')],channels[_0x1c8b03[_0x919e('0xa')]][_0x919e('0x3d')]));}}catch(_0x5857e9){utils['error'](util[_0x919e('0x8')](_0x919e('0x3c'),_0x1c8b03[_0x919e('0xa')]),_0x5857e9);}};exports[_0x919e('0x3f')]=function(_0x4fd1f0){try{if(!_[_0x919e('0x23')](channels[_0x4fd1f0['uniqueid']])){utils[_0x919e('0x15')](util[_0x919e('0x8')](_0x919e('0x40'),_0x4fd1f0['uniqueid']),_0x4fd1f0);if(!_['isNil'](channels[_0x4fd1f0['uniqueid']][_0x919e('0x3d')])){channels[_0x4fd1f0[_0x919e('0xa')]]['mohtime']+=utils['diffTime'](utils['now'](),channels[_0x4fd1f0[_0x919e('0xa')]][_0x919e('0x3d')]);utils['info'](util[_0x919e('0x8')](_0x919e('0x41'),_0x4fd1f0[_0x919e('0xa')],channels[_0x4fd1f0[_0x919e('0xa')]]['mohtime']));delete channels[_0x4fd1f0[_0x919e('0xa')]]['musiconholdstartAt'];}}}catch(_0x2bbd74){utils[_0x919e('0x1e')](util['format'](_0x919e('0x40'),_0x4fd1f0[_0x919e('0xa')]),_0x2bbd74);}};exports[_0x919e('0x42')]=function(_0x115d1e){try{if(!_[_0x919e('0x23')](channels[_0x115d1e[_0x919e('0xa')]])){utils[_0x919e('0x15')](util['format'](_0x919e('0x43'),_0x115d1e['uniqueid']),_0x115d1e);if(!_[_0x919e('0x23')](_0x115d1e['variable'][_0x919e('0x44')])){utils[_0x919e('0x7')](util['format'](_0x919e('0x45'),_0x115d1e[_0x919e('0xa')],_0x115d1e['value']));channels[_0x115d1e['uniqueid']][_0x919e('0x46')]=_0x115d1e[_0x919e('0x47')];}if(!_[_0x919e('0x23')](_0x115d1e[_0x919e('0x48')]['xmd-phone'])){utils['info'](util['format'](_0x919e('0x49'),_0x115d1e[_0x919e('0xa')],_0x115d1e[_0x919e('0x47')]));channels[_0x115d1e[_0x919e('0xa')]][_0x919e('0x4a')]=_0x115d1e[_0x919e('0x47')];channels[_0x115d1e[_0x919e('0xa')]][_0x919e('0x2a')]='\x22'+_0x115d1e[_0x919e('0x47')]+_0x919e('0x4b')+_0x115d1e[_0x919e('0x47')]+'>';}if(!_['isNil'](_0x115d1e[_0x919e('0x48')]['xmd-callerid-preview'])||!_[_0x919e('0x23')](_0x115d1e[_0x919e('0x48')][_0x919e('0x4c')])){utils[_0x919e('0x7')](util[_0x919e('0x8')](_0x919e('0x4d'),_0x115d1e['uniqueid'],!_['isNil'](_0x115d1e[_0x919e('0x48')]['xmd-callerid-preview'])?_0x919e('0x4e'):_0x919e('0x4c'),_0x115d1e[_0x919e('0x47')]));channels[_0x115d1e[_0x919e('0xa')]]['callerid']=_0x115d1e[_0x919e('0x47')];}if(!_[_0x919e('0x23')](_0x115d1e[_0x919e('0x48')][_0x919e('0x4f')])||!_[_0x919e('0x23')](_0x115d1e[_0x919e('0x48')][_0x919e('0x50')])){utils['info'](util['format'](_0x919e('0x4d'),_0x115d1e[_0x919e('0xa')],!_[_0x919e('0x23')](_0x115d1e[_0x919e('0x48')][_0x919e('0x4f')])?'xmd-queue':_0x919e('0x50'),_0x115d1e[_0x919e('0x47')]));channels[_0x115d1e['uniqueid']][_0x919e('0x51')]=_0x919e('0x52');channels[_0x115d1e[_0x919e('0xa')]][_0x919e('0x53')]=_0x115d1e[_0x919e('0x47')];channels[_0x115d1e['uniqueid']][_0x919e('0x54')]=!![];}if(!_[_0x919e('0x23')](_0x115d1e['variable'][_0x919e('0x55')])){utils[_0x919e('0x7')](util[_0x919e('0x8')]('[%s][calls][varset]\x20variable:xmd-contactid\x20value:%s',_0x115d1e[_0x919e('0xa')],_0x115d1e[_0x919e('0x47')]));channels[_0x115d1e[_0x919e('0xa')]][_0x919e('0x56')]=_0x115d1e[_0x919e('0x47')];}if(!_['isNil'](_0x115d1e[_0x919e('0x48')][_0x919e('0x57')])){utils['info'](util[_0x919e('0x8')]('[%s][calls][varset]\x20variable:xmd-cdrtype\x20value:%s',_0x115d1e[_0x919e('0xa')],_0x115d1e['value']));channels[_0x115d1e[_0x919e('0xa')]][_0x919e('0x58')]=_0x115d1e[_0x919e('0x47')];}if(!_[_0x919e('0x23')](_0x115d1e[_0x919e('0x48')][_0x919e('0x59')])){utils[_0x919e('0x7')](util[_0x919e('0x8')](_0x919e('0x5a'),_0x115d1e[_0x919e('0xa')],_0x115d1e[_0x919e('0x47')]));channels[_0x115d1e['uniqueid']][_0x919e('0x5b')]=_0x115d1e['value'];}if(!_['isNil'](_0x115d1e['variable'][_0x919e('0x5c')])){utils['info'](util['format'](_0x919e('0x5d'),_0x115d1e[_0x919e('0xa')],_0x115d1e['value']));channels[_0x115d1e[_0x919e('0xa')]][_0x919e('0x5c')]=_0x115d1e[_0x919e('0x47')];}}}catch(_0x310d8c){utils[_0x919e('0x1e')](util[_0x919e('0x8')]('[%s][calls][varset]',_0x115d1e['uniqueid']),_0x310d8c);}};exports['newexten']=function(_0x1a4991){try{if(!_[_0x919e('0x23')](channels[_0x1a4991['uniqueid']])){utils[_0x919e('0x15')](util[_0x919e('0x8')]('[%s][calls][newexten]',_0x1a4991['uniqueid']),_0x1a4991);utils[_0x919e('0x7')](util[_0x919e('0x8')](_0x919e('0x5e'),_0x1a4991[_0x919e('0xa')],_0x1a4991[_0x919e('0x5f')],_0x1a4991[_0x919e('0x60')]));if(_0x1a4991[_0x919e('0x5f')][_0x919e('0x61')]()==_0x919e('0x62')&&_[_0x919e('0x63')](_0x1a4991[_0x919e('0x60')][_0x919e('0x61')](),_0x919e('0x64'))){var _0x31c6e5=_0x1a4991['appdata'][_0x919e('0x65')]('=');var _0x590fb1=_0x31c6e5[0x0][_0x919e('0x66')](_0x31c6e5[0x0]['lastIndexOf']('(')+0x1,_0x31c6e5[0x0][_0x919e('0x67')](')'));var _0xd7bcb4=_0x31c6e5[0x1];channels[_0x1a4991[_0x919e('0xa')]][_0x590fb1]=_0xd7bcb4;}if(!_[_0x919e('0x68')](['hangup','noop','execif',_0x919e('0x62'),_0x919e('0x69')],_0x1a4991['application'][_0x919e('0x61')]())){channels[_0x1a4991['uniqueid']]['lastapplication']=_0x1a4991[_0x919e('0x5f')];channels[_0x1a4991[_0x919e('0xa')]][_0x919e('0x53')]=_0x1a4991[_0x919e('0x60')];}}}catch(_0x4356fd){utils[_0x919e('0x1e')](util[_0x919e('0x8')]('[%s][calls][newexten]',_0x1a4991[_0x919e('0xa')]),_0x4356fd);}};
\ No newline at end of file
index 692016e..5a4493e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc433=['managerevent','./utils','info','[core]\x20connected','[core]\x20shutdown','error','[core]\x20error','close','[core]\x20close'];(function(_0x549a69,_0x1589f3){var _0x3d2812=function(_0x17794c){while(--_0x17794c){_0x549a69['push'](_0x549a69['shift']());}};_0x3d2812(++_0x1589f3);}(_0xc433,0x1b1));var _0x3c43=function(_0x2b89dc,_0x8bfa42){_0x2b89dc=_0x2b89dc-0x0;var _0x412762=_0xc433[_0x2b89dc];return _0x412762;};'use strict';var utils=require(_0x3c43('0x0'));exports['connect']=function(){utils[_0x3c43('0x1')](_0x3c43('0x2'));};exports['shutdown']=function(){utils['info'](_0x3c43('0x3'));};exports['fullybooted']=function(){utils[_0x3c43('0x1')]('[core]\x20fullybooted');};exports[_0x3c43('0x4')]=function(_0x4a32cf){utils[_0x3c43('0x4')](_0x3c43('0x5'),_0x4a32cf);};exports[_0x3c43('0x6')]=function(){utils['info'](_0x3c43('0x7'));};exports[_0x3c43('0x8')]=function(_0x26f551){};
\ No newline at end of file
+var _0x8cd4=['connect','info','[core]\x20connected','shutdown','[core]\x20shutdown','[core]\x20fullybooted','error','[core]\x20error','close','managerevent','./utils'];(function(_0x199572,_0x33e667){var _0x13cfa3=function(_0x53c075){while(--_0x53c075){_0x199572['push'](_0x199572['shift']());}};_0x13cfa3(++_0x33e667);}(_0x8cd4,0x175));var _0x48cd=function(_0x89ace6,_0x39064b){_0x89ace6=_0x89ace6-0x0;var _0x302694=_0x8cd4[_0x89ace6];return _0x302694;};'use strict';var utils=require(_0x48cd('0x0'));exports[_0x48cd('0x1')]=function(){utils[_0x48cd('0x2')](_0x48cd('0x3'));};exports[_0x48cd('0x4')]=function(){utils[_0x48cd('0x2')](_0x48cd('0x5'));};exports['fullybooted']=function(){utils['info'](_0x48cd('0x6'));};exports[_0x48cd('0x7')]=function(_0x3d6825){utils['error'](_0x48cd('0x8'),_0x3d6825);};exports[_0x48cd('0x9')]=function(){utils['info']('[core]\x20close');};exports[_0x48cd('0xa')]=function(_0x16fd78){};
\ No newline at end of file
index b606c14..214bad2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x87cb=['newexten','debug','[%s][dials][newexten]','info','application','appdata','toLowerCase','set','cdr(routeid)','split','varset','[%s][dials][varset]','isNil','outboundrouteid','[%s][dials][varset]\x20variable:outboundrouteid\x20value:%s','value','error','[%s][dials][dialbegin]','assign','starttime','now','lastevent','called','dialend','[%s][dials][dialend]','answertime','[%s][dials][dialend]\x20dialstatus:%s\x20answertime:%s\x20lastevent:connect','[%s][dials][dialend]\x20dialstatus:%s','[%s][dials][hangup]','[%s][dials][hangup]\x20calleridnum:%s\x20calleridname:%s\x20lastevent:complete\x20reason:%s','calleridname','cause-txt','complete','duration','diffTime','endtime','lodash','util','./utils','format','[%s][dials][writeDB]\x20channel:%s\x20dialstring:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20dialstatus:%s','uniqueid','dialstring','calleridnum','connectedlinenum','dialstatus','request','CreateVoiceDialReport'];(function(_0xea207,_0x5f395f){var _0x58ef7f=function(_0x8371fc){while(--_0x8371fc){_0xea207['push'](_0xea207['shift']());}};_0x58ef7f(++_0x5f395f);}(_0x87cb,0xe4));var _0xb87c=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x87cb[_0x122ef9];return _0x42fba0;};'use strict';var _=require(_0xb87c('0x0'));var util=require(_0xb87c('0x1'));var utils=require(_0xb87c('0x2'));var dials={};function writeDB(_0x19d885){utils['info'](util[_0xb87c('0x3')](_0xb87c('0x4'),_0x19d885[_0xb87c('0x5')],_0x19d885['channel'],_0x19d885[_0xb87c('0x6')],_0x19d885[_0xb87c('0x7')],_0x19d885[_0xb87c('0x8')],_0x19d885[_0xb87c('0x9')]));utils[_0xb87c('0xa')](_0xb87c('0xb'),_0x19d885);delete dials[_0x19d885['uniqueid']];}exports[_0xb87c('0xc')]=function(_0x259e7b){try{utils[_0xb87c('0xd')](util['format'](_0xb87c('0xe'),_0x259e7b[_0xb87c('0x5')]),_0x259e7b);utils[_0xb87c('0xf')](util[_0xb87c('0x3')]('[%s][dials][newexten]\x20application:%s\x20appdata:%s',_0x259e7b[_0xb87c('0x5')],_0x259e7b[_0xb87c('0x10')],_0x259e7b[_0xb87c('0x11')]));if(_0x259e7b[_0xb87c('0x10')][_0xb87c('0x12')]()==_0xb87c('0x13')&&_['startsWith'](_0x259e7b['appdata'][_0xb87c('0x12')](),_0xb87c('0x14'))){var _0x24f15f=_0x259e7b['appdata'][_0xb87c('0x15')]('=');dials[_0x259e7b[_0xb87c('0x5')]]={'routeId':_0x24f15f[0x1]};}}catch(_0x24bcbe){utils['error'](util[_0xb87c('0x3')](_0xb87c('0xe'),_0x259e7b[_0xb87c('0x5')]),_0x24bcbe);}};exports[_0xb87c('0x16')]=function(_0x432b7e){try{utils[_0xb87c('0xd')](util[_0xb87c('0x3')](_0xb87c('0x17'),_0x432b7e[_0xb87c('0x5')]),_0x432b7e);if(!_[_0xb87c('0x18')](_0x432b7e['variable'][_0xb87c('0x19')])){utils[_0xb87c('0xf')](util[_0xb87c('0x3')](_0xb87c('0x1a'),_0x432b7e[_0xb87c('0x5')],_0x432b7e[_0xb87c('0x1b')]));dials[_0x432b7e[_0xb87c('0x5')]]={'routeId':_0x432b7e[_0xb87c('0x1b')]};}}catch(_0x2d4770){utils[_0xb87c('0x1c')](util[_0xb87c('0x3')](_0xb87c('0x17'),_0x432b7e[_0xb87c('0x5')]),_0x2d4770);}};exports['dialbegin']=function(_0x23fef0){try{if(!_[_0xb87c('0x18')](dials[_0x23fef0[_0xb87c('0x5')]])){utils[_0xb87c('0xd')](util[_0xb87c('0x3')](_0xb87c('0x1d'),_0x23fef0[_0xb87c('0x5')]),_0x23fef0);dials[_0x23fef0[_0xb87c('0x5')]]=_[_0xb87c('0x1e')](dials[_0x23fef0[_0xb87c('0x5')]],_0x23fef0);dials[_0x23fef0[_0xb87c('0x5')]][_0xb87c('0x1f')]=utils[_0xb87c('0x20')]();dials[_0x23fef0[_0xb87c('0x5')]][_0xb87c('0x21')]=_0xb87c('0x22');utils[_0xb87c('0xf')](util[_0xb87c('0x3')]('[%s][dials][hangup]\x20starttime:%s\x20lastevent:called',_0x23fef0[_0xb87c('0x5')],dials[_0x23fef0['uniqueid']][_0xb87c('0x1f')]));}}catch(_0x25ab89){utils['error'](util[_0xb87c('0x3')]('[%s][dials][dialbegin]',_0x23fef0[_0xb87c('0x5')]),_0x25ab89);}};exports[_0xb87c('0x23')]=function(_0xb7b1ce){try{if(!_[_0xb87c('0x18')](dials[_0xb7b1ce[_0xb87c('0x5')]])){utils['debug'](util['format'](_0xb87c('0x24'),_0xb7b1ce['uniqueid']),_0xb7b1ce);dials[_0xb7b1ce[_0xb87c('0x5')]][_0xb87c('0x9')]=_0xb7b1ce[_0xb87c('0x9')];if(_0xb7b1ce['dialstatus']=='ANSWER'){dials[_0xb7b1ce['uniqueid']]=_[_0xb87c('0x1e')](dials[_0xb7b1ce[_0xb87c('0x5')]],_0xb7b1ce);dials[_0xb7b1ce[_0xb87c('0x5')]][_0xb87c('0x25')]=utils['now']();dials[_0xb7b1ce[_0xb87c('0x5')]]['lastevent']='connect';utils[_0xb87c('0xf')](util['format'](_0xb87c('0x26'),_0xb7b1ce[_0xb87c('0x5')],_0xb7b1ce['dialstatus'],dials[_0xb7b1ce[_0xb87c('0x5')]][_0xb87c('0x25')]));}else{utils[_0xb87c('0xf')](util['format'](_0xb87c('0x27'),_0xb7b1ce[_0xb87c('0x5')],_0xb7b1ce[_0xb87c('0x9')]));}}}catch(_0x3ce15a){utils[_0xb87c('0x1c')](util['format'](_0xb87c('0x24'),_0xb7b1ce[_0xb87c('0x5')]),_0x3ce15a);}};exports['hangup']=function(_0x2fc3d5){try{if(!_['isNil'](dials[_0x2fc3d5['uniqueid']])){utils['debug'](util[_0xb87c('0x3')](_0xb87c('0x28'),_0x2fc3d5[_0xb87c('0x5')]),_0x2fc3d5);utils[_0xb87c('0xf')](util[_0xb87c('0x3')](_0xb87c('0x29'),_0x2fc3d5[_0xb87c('0x5')],_0x2fc3d5['calleridnum'],_0x2fc3d5[_0xb87c('0x2a')],_0x2fc3d5[_0xb87c('0x2b')]));dials[_0x2fc3d5[_0xb87c('0x5')]]=_[_0xb87c('0x1e')](dials[_0x2fc3d5['uniqueid']],{'endtime':utils[_0xb87c('0x20')](),'lastevent':_0xb87c('0x2c')});dials[_0x2fc3d5[_0xb87c('0x5')]][_0xb87c('0x2d')]=utils[_0xb87c('0x2e')](dials[_0x2fc3d5[_0xb87c('0x5')]][_0xb87c('0x2f')],dials[_0x2fc3d5[_0xb87c('0x5')]][_0xb87c('0x1f')]);dials[_0x2fc3d5[_0xb87c('0x5')]]['holdtime']=utils[_0xb87c('0x2e')](dials[_0x2fc3d5[_0xb87c('0x5')]]['answertime']||dials[_0x2fc3d5[_0xb87c('0x5')]][_0xb87c('0x2f')],dials[_0x2fc3d5['uniqueid']][_0xb87c('0x1f')]);dials[_0x2fc3d5['uniqueid']]['billableseconds']=dials[_0x2fc3d5[_0xb87c('0x5')]][_0xb87c('0x25')]?utils[_0xb87c('0x2e')](dials[_0x2fc3d5[_0xb87c('0x5')]][_0xb87c('0x2f')],dials[_0x2fc3d5[_0xb87c('0x5')]][_0xb87c('0x25')]):0x0;writeDB(dials[_0x2fc3d5['uniqueid']]);}}catch(_0x2f240a){utils['error'](util[_0xb87c('0x3')](_0xb87c('0x28'),_0x2fc3d5[_0xb87c('0x5')]),_0x2f240a);}};
\ No newline at end of file
+var _0x2e8c=['[%s][dials][varset]\x20variable:outboundrouteid\x20value:%s','value','dialbegin','[%s][dials][dialbegin]','assign','starttime','now','lastevent','called','[%s][dials][hangup]\x20starttime:%s\x20lastevent:called','dialend','[%s][dials][dialend]','dialstatus','[%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','answertime','billableseconds','lodash','util','./utils','info','format','[%s][dials][writeDB]\x20channel:%s\x20dialstring:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20dialstatus:%s','uniqueid','calleridnum','connectedlinenum','CreateVoiceDialReport','debug','[%s][dials][newexten]\x20application:%s\x20appdata:%s','application','appdata','toLowerCase','set','startsWith','split','error','[%s][dials][newexten]','varset','[%s][dials][varset]','isNil','variable','outboundrouteid'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x2e8c,0x7d));var _0xc2e8=function(_0x3e19b9,_0xe2b180){_0x3e19b9=_0x3e19b9-0x0;var _0x81c052=_0x2e8c[_0x3e19b9];return _0x81c052;};'use strict';var _=require(_0xc2e8('0x0'));var util=require(_0xc2e8('0x1'));var utils=require(_0xc2e8('0x2'));var dials={};function writeDB(_0x79ed08){utils[_0xc2e8('0x3')](util[_0xc2e8('0x4')](_0xc2e8('0x5'),_0x79ed08[_0xc2e8('0x6')],_0x79ed08['channel'],_0x79ed08['dialstring'],_0x79ed08[_0xc2e8('0x7')],_0x79ed08[_0xc2e8('0x8')],_0x79ed08['dialstatus']));utils['request'](_0xc2e8('0x9'),_0x79ed08);delete dials[_0x79ed08['uniqueid']];}exports['newexten']=function(_0x1a7be1){try{utils[_0xc2e8('0xa')](util[_0xc2e8('0x4')]('[%s][dials][newexten]',_0x1a7be1['uniqueid']),_0x1a7be1);utils[_0xc2e8('0x3')](util['format'](_0xc2e8('0xb'),_0x1a7be1[_0xc2e8('0x6')],_0x1a7be1[_0xc2e8('0xc')],_0x1a7be1[_0xc2e8('0xd')]));if(_0x1a7be1['application'][_0xc2e8('0xe')]()==_0xc2e8('0xf')&&_[_0xc2e8('0x10')](_0x1a7be1['appdata'][_0xc2e8('0xe')](),'cdr(routeid)')){var _0x3eb895=_0x1a7be1[_0xc2e8('0xd')][_0xc2e8('0x11')]('=');dials[_0x1a7be1[_0xc2e8('0x6')]]={'routeId':_0x3eb895[0x1]};}}catch(_0x1ae4f4){utils[_0xc2e8('0x12')](util['format'](_0xc2e8('0x13'),_0x1a7be1[_0xc2e8('0x6')]),_0x1ae4f4);}};exports[_0xc2e8('0x14')]=function(_0x5b8f08){try{utils[_0xc2e8('0xa')](util[_0xc2e8('0x4')](_0xc2e8('0x15'),_0x5b8f08['uniqueid']),_0x5b8f08);if(!_[_0xc2e8('0x16')](_0x5b8f08[_0xc2e8('0x17')][_0xc2e8('0x18')])){utils['info'](util['format'](_0xc2e8('0x19'),_0x5b8f08[_0xc2e8('0x6')],_0x5b8f08[_0xc2e8('0x1a')]));dials[_0x5b8f08[_0xc2e8('0x6')]]={'routeId':_0x5b8f08[_0xc2e8('0x1a')]};}}catch(_0x264604){utils[_0xc2e8('0x12')](util[_0xc2e8('0x4')](_0xc2e8('0x15'),_0x5b8f08['uniqueid']),_0x264604);}};exports[_0xc2e8('0x1b')]=function(_0x4e438f){try{if(!_[_0xc2e8('0x16')](dials[_0x4e438f[_0xc2e8('0x6')]])){utils[_0xc2e8('0xa')](util[_0xc2e8('0x4')](_0xc2e8('0x1c'),_0x4e438f['uniqueid']),_0x4e438f);dials[_0x4e438f[_0xc2e8('0x6')]]=_[_0xc2e8('0x1d')](dials[_0x4e438f[_0xc2e8('0x6')]],_0x4e438f);dials[_0x4e438f[_0xc2e8('0x6')]][_0xc2e8('0x1e')]=utils[_0xc2e8('0x1f')]();dials[_0x4e438f[_0xc2e8('0x6')]][_0xc2e8('0x20')]=_0xc2e8('0x21');utils[_0xc2e8('0x3')](util[_0xc2e8('0x4')](_0xc2e8('0x22'),_0x4e438f['uniqueid'],dials[_0x4e438f[_0xc2e8('0x6')]][_0xc2e8('0x1e')]));}}catch(_0x22fb3c){utils[_0xc2e8('0x12')](util[_0xc2e8('0x4')]('[%s][dials][dialbegin]',_0x4e438f[_0xc2e8('0x6')]),_0x22fb3c);}};exports[_0xc2e8('0x23')]=function(_0x1b1fbd){try{if(!_['isNil'](dials[_0x1b1fbd[_0xc2e8('0x6')]])){utils[_0xc2e8('0xa')](util[_0xc2e8('0x4')](_0xc2e8('0x24'),_0x1b1fbd['uniqueid']),_0x1b1fbd);dials[_0x1b1fbd[_0xc2e8('0x6')]][_0xc2e8('0x25')]=_0x1b1fbd['dialstatus'];if(_0x1b1fbd[_0xc2e8('0x25')]=='ANSWER'){dials[_0x1b1fbd['uniqueid']]=_[_0xc2e8('0x1d')](dials[_0x1b1fbd[_0xc2e8('0x6')]],_0x1b1fbd);dials[_0x1b1fbd[_0xc2e8('0x6')]]['answertime']=utils[_0xc2e8('0x1f')]();dials[_0x1b1fbd['uniqueid']][_0xc2e8('0x20')]='connect';utils[_0xc2e8('0x3')](util['format'](_0xc2e8('0x26'),_0x1b1fbd[_0xc2e8('0x6')],_0x1b1fbd[_0xc2e8('0x25')],dials[_0x1b1fbd['uniqueid']]['answertime']));}else{utils[_0xc2e8('0x3')](util[_0xc2e8('0x4')](_0xc2e8('0x27'),_0x1b1fbd[_0xc2e8('0x6')],_0x1b1fbd[_0xc2e8('0x25')]));}}}catch(_0x2abfcf){utils[_0xc2e8('0x12')](util[_0xc2e8('0x4')](_0xc2e8('0x24'),_0x1b1fbd[_0xc2e8('0x6')]),_0x2abfcf);}};exports[_0xc2e8('0x28')]=function(_0x221dcf){try{if(!_[_0xc2e8('0x16')](dials[_0x221dcf['uniqueid']])){utils[_0xc2e8('0xa')](util[_0xc2e8('0x4')](_0xc2e8('0x29'),_0x221dcf['uniqueid']),_0x221dcf);utils[_0xc2e8('0x3')](util[_0xc2e8('0x4')](_0xc2e8('0x2a'),_0x221dcf[_0xc2e8('0x6')],_0x221dcf[_0xc2e8('0x7')],_0x221dcf[_0xc2e8('0x2b')],_0x221dcf[_0xc2e8('0x2c')]));dials[_0x221dcf[_0xc2e8('0x6')]]=_[_0xc2e8('0x1d')](dials[_0x221dcf[_0xc2e8('0x6')]],{'endtime':utils['now'](),'lastevent':_0xc2e8('0x2d')});dials[_0x221dcf[_0xc2e8('0x6')]]['duration']=utils[_0xc2e8('0x2e')](dials[_0x221dcf[_0xc2e8('0x6')]][_0xc2e8('0x2f')],dials[_0x221dcf[_0xc2e8('0x6')]][_0xc2e8('0x1e')]);dials[_0x221dcf[_0xc2e8('0x6')]]['holdtime']=utils[_0xc2e8('0x2e')](dials[_0x221dcf[_0xc2e8('0x6')]][_0xc2e8('0x30')]||dials[_0x221dcf['uniqueid']]['endtime'],dials[_0x221dcf[_0xc2e8('0x6')]]['starttime']);dials[_0x221dcf['uniqueid']][_0xc2e8('0x31')]=dials[_0x221dcf[_0xc2e8('0x6')]]['answertime']?utils['diffTime'](dials[_0x221dcf[_0xc2e8('0x6')]][_0xc2e8('0x2f')],dials[_0x221dcf['uniqueid']][_0xc2e8('0x30')]):0x0;writeDB(dials[_0x221dcf[_0xc2e8('0x6')]]);}}catch(_0x207399){utils['error'](util[_0xc2e8('0x4')](_0xc2e8('0x29'),_0x221dcf[_0xc2e8('0x6')]),_0x207399);}};
\ No newline at end of file
index e7a8151..d0c255d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3a2a=['./calls.controller','./queues.controller','./dials.controller','./core.controller','connect','shutdown','fullybooted','error','close','managerevent','debug','format','[%s][index][devicestatechange]','device','devicestatechange','agentcalled','[%s][index][agentcalled]','uniqueid','agentringnoanswer','[%s][index][agentringnoanswer]','agentconnect','[%s][index][agentconnect]','agentcomplete','[%s][index][agentcomplete]','queuecallerabandon','[%s][index][queuecallerabandon]','queuecallerjoin','queuecallerleave','[%s][index][queuecallerleave]','musiconholdstart','[%s][index][musiconholdstart]','musiconholdstop','[%s][index][musiconholdstop]','newstate','[%s][index][hangup]','hangup','cdr','[%s][index][cdr]','[%s][index][blindtransfer]','blindtransfer','attendedtransfer','[%s][index][attendedtransfer]','origtransfereruniqueid','varset','[%s][index][varset]','newexten','[%s][index][newexten]','newchannel','[%s][index][newchannel]','dialbegin','[%s]dialbegin','dialend','[%s][index][dialend]','asterisk-manager','../../config/environment','util','xdr','disabled','env','production','local','asterisk','port','keepConnected','info','XDR\x20DISABLED','Asterisk\x20disabled\x20on\x20localhost','./agents.controller'];(function(_0x303d59,_0x521e27){var _0xcf4486=function(_0x1b5ae1){while(--_0x1b5ae1){_0x303d59['push'](_0x303d59['shift']());}};_0xcf4486(++_0x521e27);}(_0x3a2a,0x101));var _0xa3a2=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0x3a2a[_0x17d9e3];return _0x14192d;};var AsteriskManager=require(_0xa3a2('0x0'));var config=require(_0xa3a2('0x1'));var utils=require('./utils');var util=require(_0xa3a2('0x2'));var isXDREnabled=config[_0xa3a2('0x3')]&&config['xdr']['disabled']?!config[_0xa3a2('0x3')][_0xa3a2('0x4')]:!![];var isProduction=config[_0xa3a2('0x5')]===_0xa3a2('0x6')||![];var isLocalAsterisk=config[_0xa3a2('0x3')]&&config[_0xa3a2('0x3')][_0xa3a2('0x7')]===!![]||![];var ami=new AsteriskManager(config[_0xa3a2('0x8')][_0xa3a2('0x9')],config[_0xa3a2('0x8')]['ip'],config[_0xa3a2('0x8')]['username'],config[_0xa3a2('0x8')]['password'],!![]);ami[_0xa3a2('0xa')]();if(!isXDREnabled){utils[_0xa3a2('0xb')](_0xa3a2('0xc'));}else if(!isProduction&&!isLocalAsterisk){utils[_0xa3a2('0xb')](_0xa3a2('0xd'));}else{var agents=require(_0xa3a2('0xe'));var calls=require(_0xa3a2('0xf'));var queues=require(_0xa3a2('0x10'));var recordings=require('./recordings.controller');var members=require('./members.controller');var dials=require(_0xa3a2('0x11'));var transfers=require('./transfers.controller');var core=require(_0xa3a2('0x12'));ami['on'](_0xa3a2('0x13'),core[_0xa3a2('0x13')]);ami['on'](_0xa3a2('0x14'),core[_0xa3a2('0x14')]);ami['on'](_0xa3a2('0x15'),core[_0xa3a2('0x15')]);ami['on'](_0xa3a2('0x16'),core[_0xa3a2('0x16')]);ami['on']('close',core[_0xa3a2('0x17')]);ami['on']('managerevent',core[_0xa3a2('0x18')]);ami['on']('devicestatechange',function(_0x2b9f4e){try{utils[_0xa3a2('0x19')](util[_0xa3a2('0x1a')](_0xa3a2('0x1b'),_0x2b9f4e[_0xa3a2('0x1c')]),_0x2b9f4e);members[_0xa3a2('0x1d')](_0x2b9f4e);}catch(_0x50b9b3){utils[_0xa3a2('0x16')](util[_0xa3a2('0x1a')]('[%s][index][devicestatechange]',_0x2b9f4e['device']),_0x50b9b3);}});ami['on'](_0xa3a2('0x1e'),function(_0x4bec6f){try{utils[_0xa3a2('0x19')](util['format'](_0xa3a2('0x1f'),_0x4bec6f[_0xa3a2('0x20')]),_0x4bec6f);agents['agentcalled'](_0x4bec6f);}catch(_0x166ce7){utils['error'](util[_0xa3a2('0x1a')](_0xa3a2('0x1f'),_0x4bec6f[_0xa3a2('0x20')]),_0x166ce7);}});ami['on'](_0xa3a2('0x21'),function(_0x370ebd){try{utils[_0xa3a2('0x19')](util[_0xa3a2('0x1a')](_0xa3a2('0x22'),_0x370ebd['uniqueid']),_0x370ebd);agents['agentringnoanswer'](_0x370ebd);}catch(_0x5b8396){utils[_0xa3a2('0x16')](util[_0xa3a2('0x1a')](_0xa3a2('0x22'),_0x370ebd['uniqueid']),_0x5b8396);}});ami['on'](_0xa3a2('0x23'),function(_0x2591e2){try{utils[_0xa3a2('0x19')](util[_0xa3a2('0x1a')](_0xa3a2('0x24'),_0x2591e2[_0xa3a2('0x20')]),_0x2591e2);agents[_0xa3a2('0x23')](_0x2591e2);queues[_0xa3a2('0x23')](_0x2591e2);}catch(_0x5566a0){utils[_0xa3a2('0x16')](util[_0xa3a2('0x1a')](_0xa3a2('0x24'),_0x2591e2[_0xa3a2('0x20')]),_0x5566a0);}});ami['on'](_0xa3a2('0x25'),function(_0x437ed4){try{utils[_0xa3a2('0x19')](util[_0xa3a2('0x1a')](_0xa3a2('0x26'),_0x437ed4['uniqueid']),_0x437ed4);agents[_0xa3a2('0x25')](_0x437ed4);queues[_0xa3a2('0x25')](_0x437ed4);members[_0xa3a2('0x25')](_0x437ed4);}catch(_0x4ac8ea){utils[_0xa3a2('0x16')](util[_0xa3a2('0x1a')]('[%s][index][agentcomplete]',_0x437ed4[_0xa3a2('0x20')]),_0x4ac8ea);}});ami['on'](_0xa3a2('0x27'),function(_0x5eae39){try{utils[_0xa3a2('0x19')](util[_0xa3a2('0x1a')](_0xa3a2('0x28'),_0x5eae39[_0xa3a2('0x20')]),_0x5eae39);agents[_0xa3a2('0x27')](_0x5eae39);queues[_0xa3a2('0x27')](_0x5eae39);}catch(_0x1e36e1){utils[_0xa3a2('0x16')](util[_0xa3a2('0x1a')](_0xa3a2('0x28'),_0x5eae39[_0xa3a2('0x20')]),_0x1e36e1);}});ami['on'](_0xa3a2('0x29'),function(_0x572af6){try{utils[_0xa3a2('0x19')](util['format']('[%s][index][queuecallerjoin]',_0x572af6[_0xa3a2('0x20')]),_0x572af6);queues[_0xa3a2('0x29')](_0x572af6);recordings[_0xa3a2('0x29')](_0x572af6);}catch(_0xb845d8){utils['error'](util[_0xa3a2('0x1a')]('[%s][index][queuecallerjoin]',_0x572af6[_0xa3a2('0x20')]),_0xb845d8);}});ami['on'](_0xa3a2('0x2a'),function(_0x3208df){try{utils[_0xa3a2('0x19')](util['format'](_0xa3a2('0x2b'),_0x3208df[_0xa3a2('0x20')]),_0x3208df);queues[_0xa3a2('0x2a')](_0x3208df);}catch(_0x51634d){utils[_0xa3a2('0x16')](util[_0xa3a2('0x1a')](_0xa3a2('0x2b'),_0x3208df[_0xa3a2('0x20')]),_0x51634d);}});ami['on'](_0xa3a2('0x2c'),function(_0x8078f9){try{utils[_0xa3a2('0x19')](util[_0xa3a2('0x1a')](_0xa3a2('0x2d'),_0x8078f9[_0xa3a2('0x20')]),_0x8078f9);queues['musiconholdstart'](_0x8078f9);calls[_0xa3a2('0x2c')](_0x8078f9);}catch(_0x3ee584){utils[_0xa3a2('0x16')](util[_0xa3a2('0x1a')]('[%s][index][musiconholdstart]',_0x8078f9[_0xa3a2('0x20')]),_0x3ee584);}});ami['on'](_0xa3a2('0x2e'),function(_0x460c0e){try{utils[_0xa3a2('0x19')](util[_0xa3a2('0x1a')](_0xa3a2('0x2f'),_0x460c0e[_0xa3a2('0x20')]),_0x460c0e);queues[_0xa3a2('0x2e')](_0x460c0e);calls[_0xa3a2('0x2e')](_0x460c0e);}catch(_0x2a01db){utils[_0xa3a2('0x16')](util[_0xa3a2('0x1a')](_0xa3a2('0x2f'),_0x460c0e[_0xa3a2('0x20')]),_0x2a01db);}});ami['on'](_0xa3a2('0x30'),function(_0x18ba6b){try{utils[_0xa3a2('0x19')](util['format']('[%s][index][newstate]',_0x18ba6b[_0xa3a2('0x20')]),_0x18ba6b);calls[_0xa3a2('0x30')](_0x18ba6b);recordings[_0xa3a2('0x30')](_0x18ba6b);}catch(_0x58b5b6){utils['error'](util[_0xa3a2('0x1a')]('[%s][index][newstate]',_0x18ba6b[_0xa3a2('0x20')]),_0x58b5b6);}});ami['on']('hangup',function(_0x265397){try{utils[_0xa3a2('0x19')](util[_0xa3a2('0x1a')](_0xa3a2('0x31'),_0x265397[_0xa3a2('0x20')]),_0x265397);calls['hangup'](_0x265397);recordings[_0xa3a2('0x32')](_0x265397);dials[_0xa3a2('0x32')](_0x265397);agents[_0xa3a2('0x32')](_0x265397);queues['hangup'](_0x265397);}catch(_0x2e410b){utils[_0xa3a2('0x16')](util[_0xa3a2('0x1a')](_0xa3a2('0x31'),_0x265397[_0xa3a2('0x20')]),_0x2e410b);}});ami['on'](_0xa3a2('0x33'),function(_0x119051){try{utils[_0xa3a2('0x19')](util['format'](_0xa3a2('0x34'),_0x119051[_0xa3a2('0x20')]),_0x119051);members[_0xa3a2('0x33')](_0x119051);}catch(_0x1d71e8){utils['error'](util[_0xa3a2('0x1a')](_0xa3a2('0x34'),_0x119051[_0xa3a2('0x20')]),_0x1d71e8);}});ami['on']('blindtransfer',function(_0x1dc221){try{utils[_0xa3a2('0x19')](util['format'](_0xa3a2('0x35'),_0x1dc221[_0xa3a2('0x20')]),_0x1dc221);queues[_0xa3a2('0x36')](_0x1dc221);agents[_0xa3a2('0x36')](_0x1dc221);transfers[_0xa3a2('0x36')](_0x1dc221);}catch(_0x5ac268){utils[_0xa3a2('0x16')](util[_0xa3a2('0x1a')](_0xa3a2('0x35'),_0x1dc221['uniqueid']),_0x5ac268);}});ami['on'](_0xa3a2('0x37'),function(_0x5c8763){try{utils[_0xa3a2('0x19')](util[_0xa3a2('0x1a')](_0xa3a2('0x38'),_0x5c8763[_0xa3a2('0x39')]),_0x5c8763);queues[_0xa3a2('0x37')](_0x5c8763);transfers[_0xa3a2('0x37')](_0x5c8763);agents['attendedtransfer'](_0x5c8763);calls[_0xa3a2('0x37')](_0x5c8763);}catch(_0x23cf07){utils[_0xa3a2('0x16')](util[_0xa3a2('0x1a')](_0xa3a2('0x38'),_0x5c8763[_0xa3a2('0x39')]),_0x23cf07);}});ami['on'](_0xa3a2('0x3a'),function(_0x1907b1){try{utils[_0xa3a2('0x19')](util[_0xa3a2('0x1a')](_0xa3a2('0x3b'),_0x1907b1[_0xa3a2('0x20')]),_0x1907b1);queues[_0xa3a2('0x3a')](_0x1907b1);recordings['varset'](_0x1907b1);calls[_0xa3a2('0x3a')](_0x1907b1);dials['varset'](_0x1907b1);}catch(_0x647705){utils['error'](util[_0xa3a2('0x1a')](_0xa3a2('0x3b'),_0x1907b1['uniqueid']),_0x647705);}});ami['on'](_0xa3a2('0x3c'),function(_0x5afedd){try{utils['debug'](util[_0xa3a2('0x1a')](_0xa3a2('0x3d'),_0x5afedd[_0xa3a2('0x20')]),_0x5afedd);calls['newexten'](_0x5afedd);recordings[_0xa3a2('0x3c')](_0x5afedd);dials[_0xa3a2('0x3c')](_0x5afedd);}catch(_0xdef7bf){utils['error'](util['format'](_0xa3a2('0x3d'),_0x5afedd['uniqueid']),_0xdef7bf);}});ami['on']('newchannel',function(_0x1b68af){try{utils[_0xa3a2('0x19')](util[_0xa3a2('0x1a')]('[%s][index][newchannel]',_0x1b68af[_0xa3a2('0x20')]),_0x1b68af);calls[_0xa3a2('0x3e')](_0x1b68af);recordings['newchannel'](_0x1b68af);}catch(_0x515ba8){utils[_0xa3a2('0x16')](util[_0xa3a2('0x1a')](_0xa3a2('0x3f'),_0x1b68af[_0xa3a2('0x20')]),_0x515ba8);}});ami['on'](_0xa3a2('0x40'),function(_0x15ef2b){try{utils[_0xa3a2('0x19')](util['format']('[%s][index][dialbegin]',_0x15ef2b[_0xa3a2('0x20')]),_0x15ef2b);dials[_0xa3a2('0x40')](_0x15ef2b);}catch(_0x2db671){utils[_0xa3a2('0x16')](util['format'](_0xa3a2('0x41'),_0x15ef2b[_0xa3a2('0x20')]),_0x2db671);}});ami['on'](_0xa3a2('0x42'),function(_0x418470){try{utils[_0xa3a2('0x19')](util[_0xa3a2('0x1a')](_0xa3a2('0x43'),_0x418470['uniqueid']),_0x418470);dials['dialend'](_0x418470);}catch(_0x30ba3a){utils['error'](util['format'](_0xa3a2('0x43'),_0x418470[_0xa3a2('0x20')]),_0x30ba3a);}});}
\ No newline at end of file
+var _0x4571=['format','[%s][index][devicestatechange]','device','agentcalled','[%s][index][agentcalled]','uniqueid','agentringnoanswer','[%s][index][agentringnoanswer]','agentconnect','[%s][index][agentconnect]','agentcomplete','[%s][index][agentcomplete]','queuecallerabandon','[%s][index][queuecallerabandon]','queuecallerjoin','[%s][index][queuecallerjoin]','queuecallerleave','[%s][index][queuecallerleave]','musiconholdstart','[%s][index][musiconholdstart]','musiconholdstop','[%s][index][musiconholdstop]','newstate','hangup','[%s][index][hangup]','cdr','[%s][index][cdr]','blindtransfer','[%s][index][blindtransfer]','attendedtransfer','origtransfereruniqueid','[%s][index][attendedtransfer]','[%s][index][varset]','varset','newexten','[%s][index][newexten]','newchannel','[%s][index][newchannel]','dialbegin','[%s][index][dialbegin]','[%s]dialbegin','dialend','[%s][index][dialend]','asterisk-manager','../../config/environment','./utils','util','xdr','disabled','env','local','asterisk','port','username','password','keepConnected','info','XDR\x20DISABLED','./calls.controller','./queues.controller','./members.controller','./transfers.controller','./core.controller','connect','shutdown','fullybooted','error','close','managerevent','devicestatechange','debug'];(function(_0x43f8c8,_0x24e54a){var _0x444639=function(_0x175026){while(--_0x175026){_0x43f8c8['push'](_0x43f8c8['shift']());}};_0x444639(++_0x24e54a);}(_0x4571,0x100));var _0x1457=function(_0xa9eaa0,_0x4ba2b4){_0xa9eaa0=_0xa9eaa0-0x0;var _0x30897a=_0x4571[_0xa9eaa0];return _0x30897a;};var AsteriskManager=require(_0x1457('0x0'));var config=require(_0x1457('0x1'));var utils=require(_0x1457('0x2'));var util=require(_0x1457('0x3'));var isXDREnabled=config[_0x1457('0x4')]&&config['xdr'][_0x1457('0x5')]?!config[_0x1457('0x4')]['disabled']:!![];var isProduction=config[_0x1457('0x6')]==='production'||![];var isLocalAsterisk=config['xdr']&&config[_0x1457('0x4')][_0x1457('0x7')]===!![]||![];var ami=new AsteriskManager(config[_0x1457('0x8')][_0x1457('0x9')],config[_0x1457('0x8')]['ip'],config[_0x1457('0x8')][_0x1457('0xa')],config[_0x1457('0x8')][_0x1457('0xb')],!![]);ami[_0x1457('0xc')]();if(!isXDREnabled){utils[_0x1457('0xd')](_0x1457('0xe'));}else if(!isProduction&&!isLocalAsterisk){utils['info']('Asterisk\x20disabled\x20on\x20localhost');}else{var agents=require('./agents.controller');var calls=require(_0x1457('0xf'));var queues=require(_0x1457('0x10'));var recordings=require('./recordings.controller');var members=require(_0x1457('0x11'));var dials=require('./dials.controller');var transfers=require(_0x1457('0x12'));var core=require(_0x1457('0x13'));ami['on'](_0x1457('0x14'),core[_0x1457('0x14')]);ami['on'](_0x1457('0x15'),core['shutdown']);ami['on'](_0x1457('0x16'),core[_0x1457('0x16')]);ami['on'](_0x1457('0x17'),core[_0x1457('0x17')]);ami['on'](_0x1457('0x18'),core['close']);ami['on'](_0x1457('0x19'),core[_0x1457('0x19')]);ami['on'](_0x1457('0x1a'),function(_0x126082){try{utils[_0x1457('0x1b')](util[_0x1457('0x1c')](_0x1457('0x1d'),_0x126082[_0x1457('0x1e')]),_0x126082);members[_0x1457('0x1a')](_0x126082);}catch(_0x216123){utils[_0x1457('0x17')](util[_0x1457('0x1c')]('[%s][index][devicestatechange]',_0x126082[_0x1457('0x1e')]),_0x216123);}});ami['on'](_0x1457('0x1f'),function(_0xbf7119){try{utils[_0x1457('0x1b')](util['format'](_0x1457('0x20'),_0xbf7119[_0x1457('0x21')]),_0xbf7119);agents[_0x1457('0x1f')](_0xbf7119);}catch(_0x132122){utils[_0x1457('0x17')](util[_0x1457('0x1c')]('[%s][index][agentcalled]',_0xbf7119[_0x1457('0x21')]),_0x132122);}});ami['on'](_0x1457('0x22'),function(_0x16670c){try{utils['debug'](util[_0x1457('0x1c')](_0x1457('0x23'),_0x16670c['uniqueid']),_0x16670c);agents[_0x1457('0x22')](_0x16670c);}catch(_0x5b3d9b){utils[_0x1457('0x17')](util['format']('[%s][index][agentringnoanswer]',_0x16670c[_0x1457('0x21')]),_0x5b3d9b);}});ami['on'](_0x1457('0x24'),function(_0x17c691){try{utils['debug'](util['format'](_0x1457('0x25'),_0x17c691['uniqueid']),_0x17c691);agents[_0x1457('0x24')](_0x17c691);queues[_0x1457('0x24')](_0x17c691);}catch(_0x3dfd91){utils[_0x1457('0x17')](util[_0x1457('0x1c')]('[%s][index][agentconnect]',_0x17c691['uniqueid']),_0x3dfd91);}});ami['on'](_0x1457('0x26'),function(_0xf07388){try{utils[_0x1457('0x1b')](util['format']('[%s][index][agentcomplete]',_0xf07388['uniqueid']),_0xf07388);agents[_0x1457('0x26')](_0xf07388);queues['agentcomplete'](_0xf07388);members[_0x1457('0x26')](_0xf07388);}catch(_0x437eb3){utils[_0x1457('0x17')](util['format'](_0x1457('0x27'),_0xf07388[_0x1457('0x21')]),_0x437eb3);}});ami['on'](_0x1457('0x28'),function(_0x28661b){try{utils[_0x1457('0x1b')](util['format'](_0x1457('0x29'),_0x28661b['uniqueid']),_0x28661b);agents[_0x1457('0x28')](_0x28661b);queues[_0x1457('0x28')](_0x28661b);}catch(_0x359ec0){utils[_0x1457('0x17')](util[_0x1457('0x1c')](_0x1457('0x29'),_0x28661b[_0x1457('0x21')]),_0x359ec0);}});ami['on'](_0x1457('0x2a'),function(_0x1d3cac){try{utils[_0x1457('0x1b')](util[_0x1457('0x1c')](_0x1457('0x2b'),_0x1d3cac[_0x1457('0x21')]),_0x1d3cac);queues[_0x1457('0x2a')](_0x1d3cac);recordings['queuecallerjoin'](_0x1d3cac);}catch(_0x19d66a){utils[_0x1457('0x17')](util[_0x1457('0x1c')](_0x1457('0x2b'),_0x1d3cac['uniqueid']),_0x19d66a);}});ami['on'](_0x1457('0x2c'),function(_0x1d85f2){try{utils[_0x1457('0x1b')](util['format'](_0x1457('0x2d'),_0x1d85f2[_0x1457('0x21')]),_0x1d85f2);queues[_0x1457('0x2c')](_0x1d85f2);}catch(_0x1eaa0d){utils['error'](util[_0x1457('0x1c')](_0x1457('0x2d'),_0x1d85f2['uniqueid']),_0x1eaa0d);}});ami['on'](_0x1457('0x2e'),function(_0x3d5afa){try{utils['debug'](util['format'](_0x1457('0x2f'),_0x3d5afa[_0x1457('0x21')]),_0x3d5afa);queues[_0x1457('0x2e')](_0x3d5afa);calls[_0x1457('0x2e')](_0x3d5afa);}catch(_0x27cd47){utils[_0x1457('0x17')](util[_0x1457('0x1c')](_0x1457('0x2f'),_0x3d5afa[_0x1457('0x21')]),_0x27cd47);}});ami['on'](_0x1457('0x30'),function(_0x22962a){try{utils[_0x1457('0x1b')](util['format'](_0x1457('0x31'),_0x22962a[_0x1457('0x21')]),_0x22962a);queues[_0x1457('0x30')](_0x22962a);calls[_0x1457('0x30')](_0x22962a);}catch(_0x1bfef7){utils[_0x1457('0x17')](util[_0x1457('0x1c')](_0x1457('0x31'),_0x22962a['uniqueid']),_0x1bfef7);}});ami['on'](_0x1457('0x32'),function(_0x37b273){try{utils['debug'](util['format']('[%s][index][newstate]',_0x37b273['uniqueid']),_0x37b273);calls[_0x1457('0x32')](_0x37b273);recordings['newstate'](_0x37b273);}catch(_0x1f7f33){utils[_0x1457('0x17')](util[_0x1457('0x1c')]('[%s][index][newstate]',_0x37b273[_0x1457('0x21')]),_0x1f7f33);}});ami['on']('hangup',function(_0x4af799){try{utils[_0x1457('0x1b')](util['format']('[%s][index][hangup]',_0x4af799[_0x1457('0x21')]),_0x4af799);calls['hangup'](_0x4af799);recordings['hangup'](_0x4af799);dials[_0x1457('0x33')](_0x4af799);agents[_0x1457('0x33')](_0x4af799);queues['hangup'](_0x4af799);}catch(_0x26cb1e){utils[_0x1457('0x17')](util[_0x1457('0x1c')](_0x1457('0x34'),_0x4af799[_0x1457('0x21')]),_0x26cb1e);}});ami['on'](_0x1457('0x35'),function(_0x4f1fc1){try{utils[_0x1457('0x1b')](util['format'](_0x1457('0x36'),_0x4f1fc1[_0x1457('0x21')]),_0x4f1fc1);members['cdr'](_0x4f1fc1);}catch(_0x3179aa){utils[_0x1457('0x17')](util[_0x1457('0x1c')]('[%s][index][cdr]',_0x4f1fc1[_0x1457('0x21')]),_0x3179aa);}});ami['on'](_0x1457('0x37'),function(_0x156d93){try{utils[_0x1457('0x1b')](util[_0x1457('0x1c')](_0x1457('0x38'),_0x156d93[_0x1457('0x21')]),_0x156d93);queues[_0x1457('0x37')](_0x156d93);agents[_0x1457('0x37')](_0x156d93);transfers['blindtransfer'](_0x156d93);}catch(_0x569290){utils[_0x1457('0x17')](util[_0x1457('0x1c')](_0x1457('0x38'),_0x156d93[_0x1457('0x21')]),_0x569290);}});ami['on'](_0x1457('0x39'),function(_0x362303){try{utils[_0x1457('0x1b')](util['format']('[%s][index][attendedtransfer]',_0x362303[_0x1457('0x3a')]),_0x362303);queues[_0x1457('0x39')](_0x362303);transfers[_0x1457('0x39')](_0x362303);agents[_0x1457('0x39')](_0x362303);calls[_0x1457('0x39')](_0x362303);}catch(_0x346565){utils[_0x1457('0x17')](util[_0x1457('0x1c')](_0x1457('0x3b'),_0x362303[_0x1457('0x3a')]),_0x346565);}});ami['on']('varset',function(_0x587081){try{utils['debug'](util['format'](_0x1457('0x3c'),_0x587081[_0x1457('0x21')]),_0x587081);queues[_0x1457('0x3d')](_0x587081);recordings[_0x1457('0x3d')](_0x587081);calls[_0x1457('0x3d')](_0x587081);dials[_0x1457('0x3d')](_0x587081);}catch(_0x2e8cc0){utils[_0x1457('0x17')](util[_0x1457('0x1c')](_0x1457('0x3c'),_0x587081[_0x1457('0x21')]),_0x2e8cc0);}});ami['on'](_0x1457('0x3e'),function(_0x18c31f){try{utils['debug'](util[_0x1457('0x1c')]('[%s][index][newexten]',_0x18c31f[_0x1457('0x21')]),_0x18c31f);calls[_0x1457('0x3e')](_0x18c31f);recordings['newexten'](_0x18c31f);dials[_0x1457('0x3e')](_0x18c31f);}catch(_0x57a5a6){utils[_0x1457('0x17')](util['format'](_0x1457('0x3f'),_0x18c31f[_0x1457('0x21')]),_0x57a5a6);}});ami['on'](_0x1457('0x40'),function(_0x61400e){try{utils['debug'](util[_0x1457('0x1c')](_0x1457('0x41'),_0x61400e[_0x1457('0x21')]),_0x61400e);calls[_0x1457('0x40')](_0x61400e);recordings[_0x1457('0x40')](_0x61400e);}catch(_0x5ed482){utils['error'](util['format'](_0x1457('0x41'),_0x61400e['uniqueid']),_0x5ed482);}});ami['on'](_0x1457('0x42'),function(_0x5e498b){try{utils[_0x1457('0x1b')](util[_0x1457('0x1c')](_0x1457('0x43'),_0x5e498b[_0x1457('0x21')]),_0x5e498b);dials[_0x1457('0x42')](_0x5e498b);}catch(_0x500928){utils[_0x1457('0x17')](util['format'](_0x1457('0x44'),_0x5e498b[_0x1457('0x21')]),_0x500928);}});ami['on'](_0x1457('0x45'),function(_0x1b38c4){try{utils['debug'](util[_0x1457('0x1c')](_0x1457('0x46'),_0x1b38c4[_0x1457('0x21')]),_0x1b38c4);dials['dialend'](_0x1b38c4);}catch(_0x4a4ea4){utils[_0x1457('0x17')](util[_0x1457('0x1c')](_0x1457('0x46'),_0x1b38c4['uniqueid']),_0x4a4ea4);}});}
\ No newline at end of file
index 24a564b..b65598a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcc8d=['startsWith','devicestatechange','debug','device','[%s][members][devicestatechange]\x20state:%s\x20interface:%s','state','INUSE','BUSY','voice','TALKING','now','agent','exitAt','duration','diffTime','enterAt','error','[%s][members][devicestatechange]','agentcomplete','[%s][members][agentcomplete]','[%s][members][agentcomplete]\x20interface:%s\x20queue:%s','cdr','isNil','assign','data1','data2','destination','[%s][members][cdr]\x20type:%s\x20source:%s\x20destination:%s','data3','destinationchannel','source','util','./utils','info','format','[%s][members][writeDB]\x20interface:%s\x20channel:%s\x20data2:%s\x20agent:%s\x20type:%s','uniqueid','interface','channel','membername','type','getUserByInterface','name','internal','request','CreateMemberReport','getUserByName','split','then','catch','[%s][members][writeDB]','some'];(function(_0x3eaf06,_0x1bf08d){var _0x4b16d2=function(_0xc1b0df){while(--_0xc1b0df){_0x3eaf06['push'](_0x3eaf06['shift']());}};_0x4b16d2(++_0x1bf08d);}(_0xcc8d,0xbb));var _0xdcc8=function(_0x4207a6,_0x3a3110){_0x4207a6=_0x4207a6-0x0;var _0x42b37a=_0xcc8d[_0x4207a6];return _0x42b37a;};'use strict';var _=require('lodash');var util=require(_0xdcc8('0x0'));var utils=require(_0xdcc8('0x1'));var members={};var exclude=['Local/_attended@transfer','Queue:'];function writeDB(_0xdc9cc2){utils[_0xdcc8('0x2')](util[_0xdcc8('0x3')](_0xdcc8('0x4'),_0xdc9cc2[_0xdcc8('0x5')],_0xdc9cc2[_0xdcc8('0x6')],_0xdc9cc2[_0xdcc8('0x7')],_0xdc9cc2['data2'],_0xdc9cc2[_0xdcc8('0x8')],_0xdc9cc2[_0xdcc8('0x9')]));if(_0xdc9cc2[_0xdcc8('0x6')]){utils[_0xdcc8('0xa')](_0xdc9cc2[_0xdcc8('0x6')])['then'](function(_0x2bdaff){if(_0x2bdaff){_0xdc9cc2[_0xdcc8('0x8')]=_0x2bdaff[_0xdcc8('0xb')];_0xdc9cc2[_0xdcc8('0xc')]=_0x2bdaff[_0xdcc8('0xc')];utils[_0xdcc8('0xd')](_0xdcc8('0xe'),_0xdc9cc2);}else{utils[_0xdcc8('0xf')](_0xdc9cc2[_0xdcc8('0x6')][_0xdcc8('0x10')]('/')[0x1])[_0xdcc8('0x11')](function(_0x312dd7){if(_0x312dd7){_0xdc9cc2['membername']=_0x312dd7[_0xdcc8('0xb')];_0xdc9cc2[_0xdcc8('0xc')]=_0x312dd7['internal'];utils[_0xdcc8('0xd')](_0xdcc8('0xe'),_0xdc9cc2);}});}})[_0xdcc8('0x12')](function(_0x378a27){utils['error'](util[_0xdcc8('0x3')](_0xdcc8('0x13'),_0xdc9cc2['uniqueid']),_0x378a27);});}delete members[_0xdc9cc2[_0xdcc8('0x6')]];}function startsWith(_0x54541f,_0x5f599){return _[_0xdcc8('0x14')](_0x54541f,function(_0xc04807){return _[_0xdcc8('0x15')](_0x5f599,_0xc04807);});}exports[_0xdcc8('0x16')]=function(_0x12ace8){try{utils[_0xdcc8('0x17')](util['format']('[%s][members][devicestatechange]',members[_0x12ace8['device']]?members[_0x12ace8['device']]['uniqueid']:_0x12ace8[_0xdcc8('0x18')]),_0x12ace8);utils['info'](util[_0xdcc8('0x3')](_0xdcc8('0x19'),members[_0x12ace8[_0xdcc8('0x18')]]?members[_0x12ace8[_0xdcc8('0x18')]][_0xdcc8('0x5')]:_0x12ace8['device'],_0x12ace8['state'],_0x12ace8[_0xdcc8('0x18')]));switch(_0x12ace8[_0xdcc8('0x1a')]){case _0xdcc8('0x1b'):case _0xdcc8('0x1c'):if(!startsWith(exclude,_0x12ace8[_0xdcc8('0x18')])){members[_0x12ace8[_0xdcc8('0x18')]]={'channel':_0xdcc8('0x1d'),'interface':_0x12ace8[_0xdcc8('0x18')],'type':_0xdcc8('0x1e'),'enterAt':utils[_0xdcc8('0x1f')](),'role':_0xdcc8('0x20')};}break;case'NOT_INUSE':if(!_['isNil'](members[_0x12ace8['device']])){members[_0x12ace8['device']][_0xdcc8('0x21')]=utils[_0xdcc8('0x1f')]();members[_0x12ace8[_0xdcc8('0x18')]][_0xdcc8('0x22')]=utils[_0xdcc8('0x23')](members[_0x12ace8[_0xdcc8('0x18')]][_0xdcc8('0x21')],members[_0x12ace8[_0xdcc8('0x18')]][_0xdcc8('0x24')]);if(members[_0x12ace8[_0xdcc8('0x18')]]['uniqueid']){writeDB(members[_0x12ace8[_0xdcc8('0x18')]]);}}break;default:break;}}catch(_0x938201){utils[_0xdcc8('0x25')](util['format'](_0xdcc8('0x26'),members[_0x12ace8['device']]?members[_0x12ace8[_0xdcc8('0x18')]][_0xdcc8('0x5')]:_0x12ace8[_0xdcc8('0x18')]),_0x938201);}};exports[_0xdcc8('0x27')]=function(_0x16c40c){try{if(!_['isNil'](members[_0x16c40c[_0xdcc8('0x6')]])){utils[_0xdcc8('0x17')](util[_0xdcc8('0x3')](_0xdcc8('0x28'),_0x16c40c['uniqueid']),_0x16c40c);utils['info'](util[_0xdcc8('0x3')](_0xdcc8('0x29'),_0x16c40c['uniqueid'],_0x16c40c[_0xdcc8('0x6')],_0x16c40c['queue']));members[_0x16c40c[_0xdcc8('0x6')]]=_['assign'](members[_0x16c40c[_0xdcc8('0x6')]],{'data4':_0x16c40c['queue'],'uniqueid':_0x16c40c[_0xdcc8('0x5')]});}}catch(_0x12e101){utils[_0xdcc8('0x25')](util['format'](_0xdcc8('0x28'),_0x16c40c['uniqueid']),_0x12e101);}};exports[_0xdcc8('0x2a')]=function(_0x262e07){try{utils['debug'](util['format']('[%s][members][cdr]',_0x262e07[_0xdcc8('0x5')]),_0x262e07);if(_0x262e07[_0xdcc8('0x7')]){var _0x2e506a=_0x262e07[_0xdcc8('0x7')][_0xdcc8('0x10')]('-')[0x0];if(!_[_0xdcc8('0x2b')](members[_0x2e506a])){members[_0x2e506a]=_[_0xdcc8('0x2c')](members[_0x2e506a],{'data1':members[_0x2e506a][_0xdcc8('0x2d')]||_0x262e07['type'],'data2':members[_0x2e506a][_0xdcc8('0x2e')]||_0x262e07['source'],'data3':members[_0x2e506a]['data3']||_0x262e07[_0xdcc8('0x2f')],'uniqueid':members[_0x2e506a][_0xdcc8('0x5')]||_0x262e07['uniqueid']});utils[_0xdcc8('0x2')](util['format'](_0xdcc8('0x30'),_0x262e07[_0xdcc8('0x5')],members[_0x2e506a][_0xdcc8('0x2d')],members[_0x2e506a][_0xdcc8('0x2e')],members[_0x2e506a][_0xdcc8('0x31')]));if(members[_0x2e506a]['exitAt']){writeDB(members[_0x2e506a]);}}}if(_0x262e07[_0xdcc8('0x32')]){var _0x4bf1b0=_0x262e07[_0xdcc8('0x32')]['split']('-')[0x0];if(!_[_0xdcc8('0x2b')](members[_0x4bf1b0])){members[_0x4bf1b0]=_[_0xdcc8('0x2c')](members[_0x4bf1b0],{'data1':members[_0x4bf1b0][_0xdcc8('0x2d')]||_0x262e07[_0xdcc8('0x9')],'data2':members[_0x4bf1b0]['data2']||_0x262e07[_0xdcc8('0x33')],'data3':members[_0x4bf1b0][_0xdcc8('0x31')]||_0x262e07[_0xdcc8('0x2f')],'uniqueid':members[_0x4bf1b0][_0xdcc8('0x5')]||_0x262e07['uniqueid']});utils[_0xdcc8('0x2')](util['format'](_0xdcc8('0x30'),_0x262e07[_0xdcc8('0x5')],members[_0x4bf1b0][_0xdcc8('0x2d')],members[_0x4bf1b0]['data2'],members[_0x4bf1b0][_0xdcc8('0x31')]));if(members[_0x4bf1b0]['exitAt']){writeDB(members[_0x4bf1b0]);}}}}catch(_0x1c2c10){utils[_0xdcc8('0x25')](util[_0xdcc8('0x3')]('[%s][members][cdr]',_0x262e07[_0xdcc8('0x5')]),_0x1c2c10);}};
\ No newline at end of file
+var _0xcca0=['agent','NOT_INUSE','isNil','exitAt','duration','enterAt','assign','[%s][members][agentcomplete]','cdr','[%s][members][cdr]','type','source','data3','destination','data1','destinationchannel','[%s][members][cdr]\x20type:%s\x20source:%s\x20destination:%s','./utils','Queue:','info','format','[%s][members][writeDB]\x20interface:%s\x20channel:%s\x20data2:%s\x20agent:%s\x20type:%s','uniqueid','interface','channel','data2','membername','getUserByInterface','then','internal','CreateMemberReport','getUserByName','split','name','catch','error','[%s][members][writeDB]','some','startsWith','devicestatechange','debug','[%s][members][devicestatechange]','device','[%s][members][devicestatechange]\x20state:%s\x20interface:%s','state','INUSE','BUSY','voice','TALKING','now'];(function(_0x273c39,_0x1052e6){var _0x46d6b5=function(_0x44f1fb){while(--_0x44f1fb){_0x273c39['push'](_0x273c39['shift']());}};_0x46d6b5(++_0x1052e6);}(_0xcca0,0x1d3));var _0x0cca=function(_0x4f2d17,_0x13156c){_0x4f2d17=_0x4f2d17-0x0;var _0x277b0d=_0xcca0[_0x4f2d17];return _0x277b0d;};'use strict';var _=require('lodash');var util=require('util');var utils=require(_0x0cca('0x0'));var members={};var exclude=['Local/_attended@transfer',_0x0cca('0x1')];function writeDB(_0x60637f){utils[_0x0cca('0x2')](util[_0x0cca('0x3')](_0x0cca('0x4'),_0x60637f[_0x0cca('0x5')],_0x60637f[_0x0cca('0x6')],_0x60637f[_0x0cca('0x7')],_0x60637f[_0x0cca('0x8')],_0x60637f[_0x0cca('0x9')],_0x60637f['type']));if(_0x60637f[_0x0cca('0x6')]){utils[_0x0cca('0xa')](_0x60637f[_0x0cca('0x6')])[_0x0cca('0xb')](function(_0x5682a7){if(_0x5682a7){_0x60637f[_0x0cca('0x9')]=_0x5682a7['name'];_0x60637f['internal']=_0x5682a7[_0x0cca('0xc')];utils['request'](_0x0cca('0xd'),_0x60637f);}else{utils[_0x0cca('0xe')](_0x60637f['interface'][_0x0cca('0xf')]('/')[0x1])[_0x0cca('0xb')](function(_0x39d81e){if(_0x39d81e){_0x60637f[_0x0cca('0x9')]=_0x39d81e[_0x0cca('0x10')];_0x60637f['internal']=_0x39d81e[_0x0cca('0xc')];utils['request']('CreateMemberReport',_0x60637f);}});}})[_0x0cca('0x11')](function(_0x320210){utils[_0x0cca('0x12')](util[_0x0cca('0x3')](_0x0cca('0x13'),_0x60637f[_0x0cca('0x5')]),_0x320210);});}delete members[_0x60637f[_0x0cca('0x6')]];}function startsWith(_0x4544de,_0x48de99){return _[_0x0cca('0x14')](_0x4544de,function(_0x4e694d){return _[_0x0cca('0x15')](_0x48de99,_0x4e694d);});}exports[_0x0cca('0x16')]=function(_0x3bdfbe){try{utils[_0x0cca('0x17')](util['format'](_0x0cca('0x18'),members[_0x3bdfbe[_0x0cca('0x19')]]?members[_0x3bdfbe[_0x0cca('0x19')]][_0x0cca('0x5')]:_0x3bdfbe[_0x0cca('0x19')]),_0x3bdfbe);utils[_0x0cca('0x2')](util['format'](_0x0cca('0x1a'),members[_0x3bdfbe[_0x0cca('0x19')]]?members[_0x3bdfbe['device']]['uniqueid']:_0x3bdfbe[_0x0cca('0x19')],_0x3bdfbe[_0x0cca('0x1b')],_0x3bdfbe[_0x0cca('0x19')]));switch(_0x3bdfbe[_0x0cca('0x1b')]){case _0x0cca('0x1c'):case _0x0cca('0x1d'):if(!startsWith(exclude,_0x3bdfbe[_0x0cca('0x19')])){members[_0x3bdfbe[_0x0cca('0x19')]]={'channel':_0x0cca('0x1e'),'interface':_0x3bdfbe['device'],'type':_0x0cca('0x1f'),'enterAt':utils[_0x0cca('0x20')](),'role':_0x0cca('0x21')};}break;case _0x0cca('0x22'):if(!_[_0x0cca('0x23')](members[_0x3bdfbe[_0x0cca('0x19')]])){members[_0x3bdfbe[_0x0cca('0x19')]][_0x0cca('0x24')]=utils[_0x0cca('0x20')]();members[_0x3bdfbe[_0x0cca('0x19')]][_0x0cca('0x25')]=utils['diffTime'](members[_0x3bdfbe[_0x0cca('0x19')]][_0x0cca('0x24')],members[_0x3bdfbe[_0x0cca('0x19')]][_0x0cca('0x26')]);if(members[_0x3bdfbe['device']][_0x0cca('0x5')]){writeDB(members[_0x3bdfbe[_0x0cca('0x19')]]);}}break;default:break;}}catch(_0xa2fe58){utils['error'](util[_0x0cca('0x3')](_0x0cca('0x18'),members[_0x3bdfbe[_0x0cca('0x19')]]?members[_0x3bdfbe['device']]['uniqueid']:_0x3bdfbe[_0x0cca('0x19')]),_0xa2fe58);}};exports['agentcomplete']=function(_0x38f513){try{if(!_[_0x0cca('0x23')](members[_0x38f513[_0x0cca('0x6')]])){utils[_0x0cca('0x17')](util[_0x0cca('0x3')]('[%s][members][agentcomplete]',_0x38f513[_0x0cca('0x5')]),_0x38f513);utils[_0x0cca('0x2')](util[_0x0cca('0x3')]('[%s][members][agentcomplete]\x20interface:%s\x20queue:%s',_0x38f513[_0x0cca('0x5')],_0x38f513['interface'],_0x38f513['queue']));members[_0x38f513['interface']]=_[_0x0cca('0x27')](members[_0x38f513[_0x0cca('0x6')]],{'data4':_0x38f513['queue'],'uniqueid':_0x38f513[_0x0cca('0x5')]});}}catch(_0x475a23){utils['error'](util['format'](_0x0cca('0x28'),_0x38f513[_0x0cca('0x5')]),_0x475a23);}};exports[_0x0cca('0x29')]=function(_0x2949f3){try{utils['debug'](util[_0x0cca('0x3')](_0x0cca('0x2a'),_0x2949f3[_0x0cca('0x5')]),_0x2949f3);if(_0x2949f3[_0x0cca('0x7')]){var _0x22d210=_0x2949f3['channel'][_0x0cca('0xf')]('-')[0x0];if(!_[_0x0cca('0x23')](members[_0x22d210])){members[_0x22d210]=_[_0x0cca('0x27')](members[_0x22d210],{'data1':members[_0x22d210]['data1']||_0x2949f3[_0x0cca('0x2b')],'data2':members[_0x22d210]['data2']||_0x2949f3[_0x0cca('0x2c')],'data3':members[_0x22d210][_0x0cca('0x2d')]||_0x2949f3[_0x0cca('0x2e')],'uniqueid':members[_0x22d210][_0x0cca('0x5')]||_0x2949f3[_0x0cca('0x5')]});utils[_0x0cca('0x2')](util[_0x0cca('0x3')]('[%s][members][cdr]\x20type:%s\x20source:%s\x20destination:%s',_0x2949f3[_0x0cca('0x5')],members[_0x22d210][_0x0cca('0x2f')],members[_0x22d210][_0x0cca('0x8')],members[_0x22d210][_0x0cca('0x2d')]));if(members[_0x22d210][_0x0cca('0x24')]){writeDB(members[_0x22d210]);}}}if(_0x2949f3['destinationchannel']){var _0x378976=_0x2949f3[_0x0cca('0x30')][_0x0cca('0xf')]('-')[0x0];if(!_[_0x0cca('0x23')](members[_0x378976])){members[_0x378976]=_['assign'](members[_0x378976],{'data1':members[_0x378976][_0x0cca('0x2f')]||_0x2949f3['type'],'data2':members[_0x378976][_0x0cca('0x8')]||_0x2949f3[_0x0cca('0x2c')],'data3':members[_0x378976]['data3']||_0x2949f3[_0x0cca('0x2e')],'uniqueid':members[_0x378976]['uniqueid']||_0x2949f3['uniqueid']});utils[_0x0cca('0x2')](util[_0x0cca('0x3')](_0x0cca('0x31'),_0x2949f3[_0x0cca('0x5')],members[_0x378976][_0x0cca('0x2f')],members[_0x378976][_0x0cca('0x8')],members[_0x378976]['data3']));if(members[_0x378976][_0x0cca('0x24')]){writeDB(members[_0x378976]);}}}}catch(_0x3fa7a5){utils[_0x0cca('0x12')](util[_0x0cca('0x3')](_0x0cca('0x2a'),_0x2949f3[_0x0cca('0x5')]),_0x3fa7a5);}};
\ No newline at end of file
index 59e9a85..20c9329 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4408=['COMPLETEDBY','blindtransfer','transfereeuniqueid','[%s][queues][blindtransfer]','BLIND','transferexten','extension','transferuniqueid','BLINDTRANSFER','[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER','attendedtransfer','[%s][queues][attendedtransfer]','origtransfererlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfererlinkedid','origtransfererexten','transfertype','ATTENDED','origtransfereruniqueid','ATTENDEDTRANSFER','transfereelinkedid','clone','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','transfertargetlinkedid','transfertargetuniqueid','queuecallerjoinAt','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s\x20calleridnum:%s\x20calleridname:%s','musiconholdstart','[%s][queues][musiconholdstart]','[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s','musiconholdstartAt','musiconholdstop','[%s][queues][musiconholdstop]','[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s','util','info','format','[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s','calleridnum','queuecallerexitreason','queue','getVoiceQueueByName','then','type','request','CreateVoiceQueueReport','transfereduniqueid','uniqueid','queuecallerjoin','debug','[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s','position','assign','now','error','hangup','isNil','queuecallerleaveAt','queuecallerexit','queuecallercomplete','queuecallercompleteAt','COMPLETEDBYAGENT','[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s','name','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','queuecallerenterreason','[%s][queues][hangup]','varset','queuestatus','toUpperCase','CONTINUE','queuecallerabandon','queuecallerabandonAt','queuecallerexitAt','value','[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s','variable','queueposition','EXITWITHKEY','[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s','[%s][queues][varset]','[%s][queues][queuecallerabandon]','ABANDONED','[%s][queues][queuecallerabandon]\x20name:%s\x20queuecallerexitreason:%s','queuecallerleave','[%s][queues][queuecallerleave]','[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s','connectedlinenum','holdtime','count','connectedlinename','agentconnect','[%s][queues][agentconnect]','membername','assigned','accountcode','destaccountcode','lastAssignedTo','agentcomplete','[%s][queues][agentcomplete]','reason','transfer'];(function(_0x3c682a,_0x3d5cac){var _0x3be4f7=function(_0xaaa345){while(--_0xaaa345){_0x3c682a['push'](_0x3c682a['shift']());}};_0x3be4f7(++_0x3d5cac);}(_0x4408,0x1d8));var _0x8440=function(_0x330de9,_0x31f402){_0x330de9=_0x330de9-0x0;var _0x1d83b2=_0x4408[_0x330de9];return _0x1d83b2;};'use strict';var _=require('lodash');var util=require(_0x8440('0x0'));var utils=require('./utils');var queues={};function writeDB(_0x3c3fb1){utils[_0x8440('0x1')](util[_0x8440('0x2')](_0x8440('0x3'),_0x3c3fb1['uniqueid'],_0x3c3fb1['channel'],_0x3c3fb1['queue'],_0x3c3fb1['lastAssignedTo'],_0x3c3fb1[_0x8440('0x4')],_0x3c3fb1['accountcode'],_0x3c3fb1[_0x8440('0x5')]));if(_0x3c3fb1[_0x8440('0x6')]){utils[_0x8440('0x7')](_0x3c3fb1[_0x8440('0x6')])[_0x8440('0x8')](function(_0x451bd3){if(_0x451bd3){_0x3c3fb1[_0x8440('0x9')]=_0x451bd3[_0x8440('0x9')];}utils[_0x8440('0xa')](_0x8440('0xb'),_0x3c3fb1);});}else{utils[_0x8440('0xa')]('CreateVoiceQueueReport',_0x3c3fb1);}if(_0x3c3fb1[_0x8440('0xc')]){delete queues[_0x3c3fb1[_0x8440('0xc')]];}else{delete queues[_0x3c3fb1[_0x8440('0xd')]];}}exports[_0x8440('0xe')]=function(_0xbbd43a){try{utils[_0x8440('0xf')](util[_0x8440('0x2')]('[%s][queues][queuecallerjoin]',_0xbbd43a[_0x8440('0xd')]),_0xbbd43a);utils[_0x8440('0x1')](util[_0x8440('0x2')](_0x8440('0x10'),_0xbbd43a[_0x8440('0xd')],_0xbbd43a[_0x8440('0x6')],_0xbbd43a[_0x8440('0x11')]));queues[_0xbbd43a[_0x8440('0xd')]]=_[_0x8440('0x12')](_0xbbd43a,{'originalposition':_0xbbd43a[_0x8440('0x11')],'queuecallerjoinAt':utils[_0x8440('0x13')](),'mohtime':0x0});}catch(_0x38c317){utils[_0x8440('0x14')](util[_0x8440('0x2')]('[%s][queues][queuecallerjoin]',_0xbbd43a[_0x8440('0xd')]),_0x38c317);}};exports[_0x8440('0x15')]=function(_0xf0539f){try{if(!_[_0x8440('0x16')](queues[_0xf0539f[_0x8440('0xd')]])){utils[_0x8440('0xf')](util[_0x8440('0x2')]('[%s][queues][hangup]',_0xf0539f[_0x8440('0xd')]),_0xf0539f);if(queues[_0xf0539f[_0x8440('0xd')]][_0x8440('0x17')]){if(!queues[_0xf0539f[_0x8440('0xd')]]['queuecallerabandon']&&!queues[_0xf0539f[_0x8440('0xd')]][_0x8440('0x18')]){queues[_0xf0539f[_0x8440('0xd')]][_0x8440('0x19')]=!![];queues[_0xf0539f[_0x8440('0xd')]][_0x8440('0x1a')]=utils[_0x8440('0x13')]();queues[_0xf0539f['uniqueid']]['queuecallerexitreason']=_0x8440('0x1b');}utils[_0x8440('0x1')](util[_0x8440('0x2')](_0x8440('0x1c'),_0xf0539f[_0x8440('0xd')],queues[_0xf0539f[_0x8440('0xd')]][_0x8440('0x1d')],queues[_0xf0539f[_0x8440('0xd')]][_0x8440('0x5')]));writeDB(queues[_0xf0539f['uniqueid']]);}else if(queues[_0xf0539f[_0x8440('0xd')]]['transfereduniqueid']){utils[_0x8440('0x1')](util['format'](_0x8440('0x1e'),_0xf0539f[_0x8440('0xd')],queues[_0xf0539f[_0x8440('0xd')]][_0x8440('0x1d')],queues[_0xf0539f[_0x8440('0xd')]][_0x8440('0xc')]));queues[queues[_0xf0539f[_0x8440('0xd')]][_0x8440('0xc')]]=queues[_0xf0539f[_0x8440('0xd')]];queues[queues[_0xf0539f[_0x8440('0xd')]][_0x8440('0xc')]][_0x8440('0x1f')]=0x2;delete queues[_0xf0539f['uniqueid']];}}}catch(_0x404c26){utils[_0x8440('0x14')](util[_0x8440('0x2')](_0x8440('0x20'),_0xf0539f[_0x8440('0xd')]),_0x404c26);}};exports[_0x8440('0x21')]=function(_0x2db44d){try{utils[_0x8440('0xf')](util[_0x8440('0x2')]('[%s][queues][varset]',_0x2db44d[_0x8440('0xd')]),_0x2db44d);if(!_[_0x8440('0x16')](_0x2db44d['variable'][_0x8440('0x22')])&&_0x2db44d['value'][_0x8440('0x23')]()!==_0x8440('0x24')){if(!_[_0x8440('0x16')](queues[_0x2db44d[_0x8440('0xd')]])){queues[_0x2db44d[_0x8440('0xd')]][_0x8440('0x25')]=![];queues[_0x2db44d['uniqueid']][_0x8440('0x26')]=null;queues[_0x2db44d[_0x8440('0xd')]][_0x8440('0x18')]=!![];queues[_0x2db44d[_0x8440('0xd')]][_0x8440('0x27')]=utils[_0x8440('0x13')]();queues[_0x2db44d[_0x8440('0xd')]][_0x8440('0x5')]=_0x2db44d[_0x8440('0x28')][_0x8440('0x23')]();utils[_0x8440('0x1')](util[_0x8440('0x2')](_0x8440('0x29'),_0x2db44d[_0x8440('0xd')],queues[_0x2db44d[_0x8440('0xd')]][_0x8440('0x1d')],_0x2db44d['value'],queues[_0x2db44d[_0x8440('0xd')]][_0x8440('0x5')]));writeDB(queues[_0x2db44d[_0x8440('0xd')]]);}}else if(!_['isNil'](_0x2db44d[_0x8440('0x2a')][_0x8440('0x2b')])){if(!_[_0x8440('0x16')](queues[_0x2db44d[_0x8440('0xd')]])&&!queues[_0x2db44d[_0x8440('0xd')]][_0x8440('0x25')]){queues[_0x2db44d['uniqueid']][_0x8440('0x25')]=![];queues[_0x2db44d[_0x8440('0xd')]][_0x8440('0x26')]=null;queues[_0x2db44d['uniqueid']][_0x8440('0x18')]=!![];queues[_0x2db44d['uniqueid']][_0x8440('0x27')]=utils[_0x8440('0x13')]();queues[_0x2db44d[_0x8440('0xd')]][_0x8440('0x5')]=_0x8440('0x2c');utils['info'](util[_0x8440('0x2')](_0x8440('0x2d'),_0x2db44d['uniqueid'],queues[_0x2db44d[_0x8440('0xd')]][_0x8440('0x1d')],_0x2db44d['value'],queues[_0x2db44d[_0x8440('0xd')]][_0x8440('0x5')]));}}}catch(_0x1dee7d){utils[_0x8440('0x14')](util[_0x8440('0x2')](_0x8440('0x2e'),_0x2db44d['uniqueid']),_0x1dee7d);}};exports[_0x8440('0x25')]=function(_0x156c0c){try{if(!_[_0x8440('0x16')](queues[_0x156c0c[_0x8440('0xd')]])){utils[_0x8440('0xf')](util['format'](_0x8440('0x2f'),_0x156c0c['uniqueid']),_0x156c0c);queues[_0x156c0c[_0x8440('0xd')]][_0x8440('0x18')]=![];queues[_0x156c0c[_0x8440('0xd')]][_0x8440('0x27')]=null;queues[_0x156c0c[_0x8440('0xd')]][_0x8440('0x25')]=!![];queues[_0x156c0c[_0x8440('0xd')]]['queuecallerabandonAt']=utils[_0x8440('0x13')]();queues[_0x156c0c[_0x8440('0xd')]][_0x8440('0x5')]=_0x8440('0x30');utils[_0x8440('0x1')](util[_0x8440('0x2')](_0x8440('0x31'),_0x156c0c[_0x8440('0xd')],queues[_0x156c0c['uniqueid']]['name'],queues[_0x156c0c['uniqueid']][_0x8440('0x5')]));}}catch(_0x51341d){utils[_0x8440('0x14')](util[_0x8440('0x2')]('[%s][queues][queuecallerabandon]',_0x156c0c[_0x8440('0xd')]),_0x51341d);}};exports[_0x8440('0x32')]=function(_0x52fbf0){try{if(!_[_0x8440('0x16')](queues[_0x52fbf0['uniqueid']])){utils[_0x8440('0xf')](util[_0x8440('0x2')](_0x8440('0x33'),_0x52fbf0['uniqueid']),_0x52fbf0);utils[_0x8440('0x1')](util['format'](_0x8440('0x34'),_0x52fbf0[_0x8440('0xd')],queues[_0x52fbf0[_0x8440('0xd')]][_0x8440('0x1d')],_0x52fbf0[_0x8440('0x35')],_0x52fbf0['connectedlinename']));queues[_0x52fbf0[_0x8440('0xd')]][_0x8440('0x32')]=!![];queues[_0x52fbf0[_0x8440('0xd')]][_0x8440('0x17')]=utils['now']();queues[_0x52fbf0[_0x8440('0xd')]][_0x8440('0x36')]=utils['diffTime'](queues[_0x52fbf0[_0x8440('0xd')]]['queuecallerleaveAt'],queues[_0x52fbf0[_0x8440('0xd')]]['queuecallerjoinAt']);queues[_0x52fbf0['uniqueid']][_0x8440('0x11')]=_0x52fbf0[_0x8440('0x11')];queues[_0x52fbf0[_0x8440('0xd')]][_0x8440('0x37')]=_0x52fbf0['count'];queues[_0x52fbf0[_0x8440('0xd')]][_0x8440('0x35')]=_0x52fbf0[_0x8440('0x35')];queues[_0x52fbf0[_0x8440('0xd')]][_0x8440('0x38')]=_0x52fbf0[_0x8440('0x38')];}}catch(_0x42841f){utils[_0x8440('0x14')](util[_0x8440('0x2')]('[%s][queues][queuecallerleave]',_0x52fbf0[_0x8440('0xd')]),_0x42841f);}};exports[_0x8440('0x39')]=function(_0x5bfaf0){try{if(!_[_0x8440('0x16')](queues[_0x5bfaf0[_0x8440('0xd')]])){utils[_0x8440('0xf')](util['format'](_0x8440('0x3a'),_0x5bfaf0['uniqueid']),_0x5bfaf0);utils[_0x8440('0x1')](util[_0x8440('0x2')]('[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s',_0x5bfaf0['uniqueid'],queues[_0x5bfaf0[_0x8440('0xd')]][_0x8440('0x1d')],_0x5bfaf0[_0x8440('0x3b')],_0x5bfaf0['destaccountcode']));queues[_0x5bfaf0[_0x8440('0xd')]][_0x8440('0x25')]=![];queues[_0x5bfaf0[_0x8440('0xd')]]['queuecallerabandon']=![];queues[_0x5bfaf0['uniqueid']][_0x8440('0x26')]=null;queues[_0x5bfaf0[_0x8440('0xd')]][_0x8440('0x18')]=![];queues[_0x5bfaf0[_0x8440('0xd')]][_0x8440('0x5')]=null;queues[_0x5bfaf0[_0x8440('0xd')]][_0x8440('0x27')]=null;queues[_0x5bfaf0[_0x8440('0xd')]][_0x8440('0x3c')]=!![];queues[_0x5bfaf0[_0x8440('0xd')]][_0x8440('0x3d')]=_0x5bfaf0[_0x8440('0x3e')];queues[_0x5bfaf0[_0x8440('0xd')]][_0x8440('0x3f')]=_0x5bfaf0[_0x8440('0x3b')];}}catch(_0x3be281){utils[_0x8440('0x14')](util[_0x8440('0x2')](_0x8440('0x3a'),_0x5bfaf0[_0x8440('0xd')]),_0x3be281);}};exports[_0x8440('0x40')]=function(_0x1887d4){try{if(!_[_0x8440('0x16')](queues[_0x1887d4[_0x8440('0xd')]])){if(queues[_0x1887d4['uniqueid']][_0x8440('0x17')]){utils[_0x8440('0xf')](util['format'](_0x8440('0x41'),_0x1887d4['uniqueid']),_0x1887d4);queues[_0x1887d4[_0x8440('0xd')]][_0x8440('0x25')]=![];queues[_0x1887d4[_0x8440('0xd')]]['queuecallerabandon']=![];queues[_0x1887d4[_0x8440('0xd')]]['queuecallerabandonAt']=null;queues[_0x1887d4['uniqueid']][_0x8440('0x18')]=![];queues[_0x1887d4[_0x8440('0xd')]][_0x8440('0x27')]=null;queues[_0x1887d4[_0x8440('0xd')]][_0x8440('0x3c')]=!![];queues[_0x1887d4[_0x8440('0xd')]]['lastAssignedTo']=_0x1887d4['membername'];queues[_0x1887d4[_0x8440('0xd')]][_0x8440('0x19')]=!![];queues[_0x1887d4[_0x8440('0xd')]]['queuecallercompleteAt']=utils['now']();if(_0x1887d4[_0x8440('0x42')]==_0x8440('0x43')){if(!queues[_0x1887d4[_0x8440('0xd')]]['transfer']){queues[_0x1887d4[_0x8440('0xd')]][_0x8440('0x5')]='TRANSFER';}}else{queues[_0x1887d4['uniqueid']]['queuecallerexitreason']=_0x8440('0x44')+_0x1887d4[_0x8440('0x42')][_0x8440('0x23')]();}utils[_0x8440('0x1')](util['format']('[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s',_0x1887d4[_0x8440('0xd')],queues[_0x1887d4[_0x8440('0xd')]][_0x8440('0x1d')],_0x1887d4[_0x8440('0x3b')],queues[_0x1887d4[_0x8440('0xd')]][_0x8440('0x5')]));writeDB(queues[_0x1887d4[_0x8440('0xd')]]);}}}catch(_0x2a836b){utils['error'](util[_0x8440('0x2')](_0x8440('0x41'),_0x1887d4[_0x8440('0xd')]),_0x2a836b);}};exports[_0x8440('0x45')]=function(_0x3aaf8c){try{if(!_[_0x8440('0x16')](queues[_0x3aaf8c[_0x8440('0x46')]])){utils['debug'](util[_0x8440('0x2')](_0x8440('0x47'),_0x3aaf8c[_0x8440('0xd')]),_0x3aaf8c);queues[_0x3aaf8c[_0x8440('0x46')]][_0x8440('0x43')]=!![];queues[_0x3aaf8c[_0x8440('0x46')]]['transfertype']=_0x8440('0x48');queues[_0x3aaf8c['transfereeuniqueid']][_0x8440('0x49')]=_0x3aaf8c[_0x8440('0x4a')];queues[_0x3aaf8c[_0x8440('0x46')]][_0x8440('0x4b')]=_0x3aaf8c[_0x8440('0x46')];queues[_0x3aaf8c[_0x8440('0x46')]]['queuecallerexitreason']=_0x8440('0x4c');utils[_0x8440('0x1')](util[_0x8440('0x2')](_0x8440('0x4d'),_0x3aaf8c['uniqueid'],queues[_0x3aaf8c[_0x8440('0x46')]][_0x8440('0x1d')],_0x3aaf8c[_0x8440('0x46')],_0x3aaf8c[_0x8440('0x4a')]));}}catch(_0x598f56){utils['error'](util[_0x8440('0x2')](_0x8440('0x47'),_0x3aaf8c[_0x8440('0xd')]),_0x598f56);}};exports[_0x8440('0x4e')]=function(_0x2f122b){try{utils['debug'](util['format'](_0x8440('0x4f'),_0x2f122b['origtransfereruniqueid']),_0x2f122b);if(_0x2f122b['origtransfereruniqueid']==_0x2f122b[_0x8440('0x50')]){if(!_['isNil'](queues[_0x2f122b['secondtransfererlinkedid']])){utils['info'](util['format'](_0x8440('0x51'),_0x2f122b['origtransfereruniqueid'],queues[_0x2f122b[_0x8440('0x52')]][_0x8440('0x1d')],_0x2f122b[_0x8440('0x53')]));queues[_0x2f122b['secondtransfererlinkedid']][_0x8440('0x43')]=!![];queues[_0x2f122b[_0x8440('0x52')]][_0x8440('0x54')]=_0x8440('0x55');queues[_0x2f122b[_0x8440('0x52')]][_0x8440('0x49')]=_0x2f122b['origtransfererexten'];queues[_0x2f122b[_0x8440('0x52')]][_0x8440('0x4b')]=_0x2f122b[_0x8440('0x56')];queues[_0x2f122b[_0x8440('0x52')]]['queuecallerexitreason']=_0x8440('0x57');}if(!_[_0x8440('0x16')](queues[_0x2f122b[_0x8440('0x50')]])){if(_0x2f122b[_0x8440('0x58')]&&queues[_0x2f122b[_0x8440('0x58')]]){queues[_0x2f122b[_0x8440('0x58')]]['queuecallerenterreason']=0x1;queues[_0x2f122b['transfereeuniqueid']]=_[_0x8440('0x59')](queues[_0x2f122b[_0x8440('0x58')]]);queues[_0x2f122b['transfereeuniqueid']][_0x8440('0xc')]=_0x2f122b['transfertargetuniqueid'];queues[_0x2f122b[_0x8440('0x46')]][_0x8440('0x1f')]=0x2;queues[_0x2f122b[_0x8440('0x46')]][_0x8440('0x4')]=queues[_0x2f122b[_0x8440('0x52')]][_0x8440('0x4')];queues[_0x2f122b['transfereeuniqueid']][_0x8440('0x5a')]=queues[_0x2f122b[_0x8440('0x52')]]['calleridname'];queues[_0x2f122b[_0x8440('0x46')]]['queuecallerjoinAt']=utils[_0x8440('0x13')]();queues[_0x2f122b['transfereeuniqueid']]['queuecallerleaveAt']=utils[_0x8440('0x13')]();queues[_0x2f122b[_0x8440('0x46')]][_0x8440('0x36')]=0x0;queues[_0x2f122b[_0x8440('0x46')]][_0x8440('0x5b')]=0x0;utils['info'](util[_0x8440('0x2')](_0x8440('0x5c'),_0x2f122b[_0x8440('0x56')],queues[_0x2f122b[_0x8440('0x46')]][_0x8440('0x1d')],queues[_0x2f122b[_0x8440('0x46')]][_0x8440('0x4')],queues[_0x2f122b[_0x8440('0x46')]]['calleridname']));}else{utils[_0x8440('0x1')](util[_0x8440('0x2')](_0x8440('0x5d'),_0x2f122b[_0x8440('0x56')],queues[_0x2f122b['origtransfererlinkedid']]['name'],_0x2f122b[_0x8440('0x52')]));queues[_0x2f122b[_0x8440('0x50')]][_0x8440('0xc')]=_0x2f122b[_0x8440('0x52')];}}}else if(_0x2f122b[_0x8440('0x5e')]==_0x2f122b[_0x8440('0x52')]){if(!_[_0x8440('0x16')](queues[_0x2f122b[_0x8440('0x50')]])){utils[_0x8440('0x1')](util[_0x8440('0x2')](_0x8440('0x5f'),_0x2f122b[_0x8440('0x56')],queues[_0x2f122b[_0x8440('0x50')]][_0x8440('0x1d')],_0x2f122b[_0x8440('0x5e')],_0x2f122b['secondtransfererexten']));queues[_0x2f122b[_0x8440('0x50')]][_0x8440('0x43')]=!![];queues[_0x2f122b[_0x8440('0x50')]]['transfertype']=_0x8440('0x55');queues[_0x2f122b[_0x8440('0x50')]][_0x8440('0x49')]=_0x2f122b[_0x8440('0x60')];queues[_0x2f122b[_0x8440('0x50')]][_0x8440('0x4b')]=_0x2f122b['secondtransfereruniqueid'];queues[_0x2f122b[_0x8440('0x50')]][_0x8440('0x5')]=_0x8440('0x57');}if(!_[_0x8440('0x16')](queues[_0x2f122b['secondtransfererlinkedid']])){if(_0x2f122b[_0x8440('0x61')]&&queues[_0x2f122b['transfertargetlinkedid']]){queues[_0x2f122b[_0x8440('0x61')]][_0x8440('0x1f')]=0x1;queues[_0x2f122b[_0x8440('0x62')]]=_[_0x8440('0x59')](queues[_0x2f122b['transfertargetlinkedid']]);queues[_0x2f122b[_0x8440('0x62')]][_0x8440('0xc')]=_0x2f122b[_0x8440('0x62')];queues[_0x2f122b['transfertargetuniqueid']]['queuecallerenterreason']=0x2;queues[_0x2f122b[_0x8440('0x62')]]['calleridnum']=queues[_0x2f122b[_0x8440('0x50')]][_0x8440('0x4')];queues[_0x2f122b[_0x8440('0x62')]][_0x8440('0x5a')]=queues[_0x2f122b[_0x8440('0x50')]][_0x8440('0x5a')];queues[_0x2f122b[_0x8440('0x62')]][_0x8440('0x63')]=utils[_0x8440('0x13')]();queues[_0x2f122b[_0x8440('0x62')]][_0x8440('0x17')]=utils[_0x8440('0x13')]();queues[_0x2f122b['transfertargetuniqueid']][_0x8440('0x36')]=0x0;queues[_0x2f122b[_0x8440('0x62')]][_0x8440('0x5b')]=0x0;utils[_0x8440('0x1')](util['format'](_0x8440('0x64'),_0x2f122b['origtransfereruniqueid'],queues[_0x2f122b[_0x8440('0x62')]]['name'],queues[_0x2f122b[_0x8440('0x62')]]['transfereduniqueid'],queues[_0x2f122b[_0x8440('0x62')]][_0x8440('0x4')],queues[_0x2f122b['transfertargetuniqueid']]['calleridname']));}else{utils[_0x8440('0x1')](util[_0x8440('0x2')]('[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s',_0x2f122b[_0x8440('0x56')],queues[_0x2f122b[_0x8440('0x52')]][_0x8440('0x1d')],_0x2f122b['origtransfererlinkedid']));queues[_0x2f122b[_0x8440('0x52')]]['transfereduniqueid']=_0x2f122b[_0x8440('0x50')];}}}}catch(_0x3f3742){utils[_0x8440('0x14')](util[_0x8440('0x2')](_0x8440('0x4f'),_0x2f122b['origtransfereruniqueid']),_0x3f3742);}};exports[_0x8440('0x65')]=function(_0xd7b28c){try{if(!_['isNil'](queues[_0xd7b28c['uniqueid']])){utils[_0x8440('0xf')](util[_0x8440('0x2')](_0x8440('0x66'),_0xd7b28c[_0x8440('0xd')]),_0xd7b28c);queues[_0xd7b28c[_0x8440('0xd')]]['musiconholdstartAt']=utils['now']();utils[_0x8440('0x1')](util[_0x8440('0x2')](_0x8440('0x67'),_0xd7b28c[_0x8440('0xd')],queues[_0xd7b28c[_0x8440('0xd')]][_0x8440('0x1d')],queues[_0xd7b28c[_0x8440('0xd')]][_0x8440('0x68')]));}}catch(_0x528556){utils['error'](util[_0x8440('0x2')](_0x8440('0x66'),_0xd7b28c[_0x8440('0xd')]),_0x528556);}};exports[_0x8440('0x69')]=function(_0x1cf9ed){try{if(!_[_0x8440('0x16')](queues[_0x1cf9ed[_0x8440('0xd')]])){if(!_[_0x8440('0x16')](queues[_0x1cf9ed[_0x8440('0xd')]][_0x8440('0x68')])){utils[_0x8440('0xf')](util['format'](_0x8440('0x6a'),_0x1cf9ed[_0x8440('0xd')]),_0x1cf9ed);queues[_0x1cf9ed[_0x8440('0xd')]][_0x8440('0x5b')]+=utils['diffTime'](utils[_0x8440('0x13')](),queues[_0x1cf9ed['uniqueid']][_0x8440('0x68')]);utils['info'](util[_0x8440('0x2')](_0x8440('0x6b'),_0x1cf9ed[_0x8440('0xd')],queues[_0x1cf9ed[_0x8440('0xd')]][_0x8440('0x1d')],queues[_0x1cf9ed[_0x8440('0xd')]]['mohtime']));delete queues[_0x1cf9ed[_0x8440('0xd')]][_0x8440('0x68')];}}}catch(_0x2d3e59){utils[_0x8440('0x14')](util[_0x8440('0x2')](_0x8440('0x6a'),_0x1cf9ed[_0x8440('0xd')]),_0x2d3e59);}};
\ No newline at end of file
+var _0x8e28=['position','assign','error','hangup','isNil','[%s][queues][hangup]','queuecallerabandon','queuecallerexit','queuecallercomplete','queuecallercompleteAt','now','[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s','name','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','queuecallerenterreason','varset','[%s][queues][varset]','variable','queuestatus','value','toUpperCase','CONTINUE','queuecallerexitAt','[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s','EXITWITHKEY','[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s','[%s][queues][queuecallerabandon]','queuecallerabandonAt','[%s][queues][queuecallerabandon]\x20name:%s\x20queuecallerexitreason:%s','queuecallerleave','connectedlinenum','connectedlinename','queuecallerleaveAt','diffTime','queuecallerjoinAt','count','agentconnect','[%s][queues][agentconnect]','[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s','destaccountcode','assigned','accountcode','lastAssignedTo','membername','agentcomplete','[%s][queues][agentcomplete]','reason','transfer','TRANSFER','blindtransfer','transfereeuniqueid','[%s][queues][blindtransfer]','transfertype','BLIND','transferexten','extension','[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER','origtransfereruniqueid','origtransfererlinkedid','secondtransfererlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','origtransfererexten','ATTENDED','ATTENDEDTRANSFER','transfereelinkedid','transfertargetuniqueid','calleridname','holdtime','mohtime','[%s][queues][attendedtransfer]\x20name:%s\x20calleridnum:%s\x20calleridname:%s','secondtransfereruniqueid','[%s][queues][attendedtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfererexten','transfertargetlinkedid','clone','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s\x20calleridnum:%s\x20calleridname:%s','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s','[%s][queues][attendedtransfer]','musiconholdstart','[%s][queues][musiconholdstart]','[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s','musiconholdstartAt','musiconholdstop','[%s][queues][musiconholdstop]','lodash','./utils','info','channel','queue','calleridnum','queuecallerexitreason','then','type','request','CreateVoiceQueueReport','transfereduniqueid','uniqueid','queuecallerjoin','debug','format','[%s][queues][queuecallerjoin]'];(function(_0x5f09c5,_0x2bfca0){var _0x426ad9=function(_0x18fe5f){while(--_0x18fe5f){_0x5f09c5['push'](_0x5f09c5['shift']());}};_0x426ad9(++_0x2bfca0);}(_0x8e28,0x11e));var _0x88e2=function(_0xc4001c,_0x1bf8f0){_0xc4001c=_0xc4001c-0x0;var _0x49f7bc=_0x8e28[_0xc4001c];return _0x49f7bc;};'use strict';var _=require(_0x88e2('0x0'));var util=require('util');var utils=require(_0x88e2('0x1'));var queues={};function writeDB(_0x26974b){utils[_0x88e2('0x2')](util['format']('[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s',_0x26974b['uniqueid'],_0x26974b[_0x88e2('0x3')],_0x26974b[_0x88e2('0x4')],_0x26974b['lastAssignedTo'],_0x26974b[_0x88e2('0x5')],_0x26974b['accountcode'],_0x26974b[_0x88e2('0x6')]));if(_0x26974b['queue']){utils['getVoiceQueueByName'](_0x26974b[_0x88e2('0x4')])[_0x88e2('0x7')](function(_0x5731c4){if(_0x5731c4){_0x26974b[_0x88e2('0x8')]=_0x5731c4[_0x88e2('0x8')];}utils[_0x88e2('0x9')](_0x88e2('0xa'),_0x26974b);});}else{utils[_0x88e2('0x9')](_0x88e2('0xa'),_0x26974b);}if(_0x26974b[_0x88e2('0xb')]){delete queues[_0x26974b[_0x88e2('0xb')]];}else{delete queues[_0x26974b[_0x88e2('0xc')]];}}exports[_0x88e2('0xd')]=function(_0x13fc24){try{utils[_0x88e2('0xe')](util[_0x88e2('0xf')](_0x88e2('0x10'),_0x13fc24[_0x88e2('0xc')]),_0x13fc24);utils[_0x88e2('0x2')](util[_0x88e2('0xf')]('[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s',_0x13fc24['uniqueid'],_0x13fc24[_0x88e2('0x4')],_0x13fc24[_0x88e2('0x11')]));queues[_0x13fc24[_0x88e2('0xc')]]=_[_0x88e2('0x12')](_0x13fc24,{'originalposition':_0x13fc24[_0x88e2('0x11')],'queuecallerjoinAt':utils['now'](),'mohtime':0x0});}catch(_0x35f5ee){utils[_0x88e2('0x13')](util['format'](_0x88e2('0x10'),_0x13fc24[_0x88e2('0xc')]),_0x35f5ee);}};exports[_0x88e2('0x14')]=function(_0x43f86e){try{if(!_[_0x88e2('0x15')](queues[_0x43f86e['uniqueid']])){utils[_0x88e2('0xe')](util[_0x88e2('0xf')](_0x88e2('0x16'),_0x43f86e[_0x88e2('0xc')]),_0x43f86e);if(queues[_0x43f86e['uniqueid']]['queuecallerleaveAt']){if(!queues[_0x43f86e[_0x88e2('0xc')]][_0x88e2('0x17')]&&!queues[_0x43f86e[_0x88e2('0xc')]][_0x88e2('0x18')]){queues[_0x43f86e[_0x88e2('0xc')]][_0x88e2('0x19')]=!![];queues[_0x43f86e[_0x88e2('0xc')]][_0x88e2('0x1a')]=utils[_0x88e2('0x1b')]();queues[_0x43f86e[_0x88e2('0xc')]][_0x88e2('0x6')]='COMPLETEDBYAGENT';}utils[_0x88e2('0x2')](util[_0x88e2('0xf')](_0x88e2('0x1c'),_0x43f86e[_0x88e2('0xc')],queues[_0x43f86e[_0x88e2('0xc')]][_0x88e2('0x1d')],queues[_0x43f86e[_0x88e2('0xc')]]['queuecallerexitreason']));writeDB(queues[_0x43f86e[_0x88e2('0xc')]]);}else if(queues[_0x43f86e[_0x88e2('0xc')]][_0x88e2('0xb')]){utils[_0x88e2('0x2')](util[_0x88e2('0xf')](_0x88e2('0x1e'),_0x43f86e[_0x88e2('0xc')],queues[_0x43f86e[_0x88e2('0xc')]][_0x88e2('0x1d')],queues[_0x43f86e[_0x88e2('0xc')]][_0x88e2('0xb')]));queues[queues[_0x43f86e['uniqueid']][_0x88e2('0xb')]]=queues[_0x43f86e[_0x88e2('0xc')]];queues[queues[_0x43f86e['uniqueid']][_0x88e2('0xb')]][_0x88e2('0x1f')]=0x2;delete queues[_0x43f86e[_0x88e2('0xc')]];}}}catch(_0x10ac92){utils[_0x88e2('0x13')](util['format']('[%s][queues][hangup]',_0x43f86e[_0x88e2('0xc')]),_0x10ac92);}};exports[_0x88e2('0x20')]=function(_0x340cf3){try{utils[_0x88e2('0xe')](util[_0x88e2('0xf')](_0x88e2('0x21'),_0x340cf3['uniqueid']),_0x340cf3);if(!_[_0x88e2('0x15')](_0x340cf3[_0x88e2('0x22')][_0x88e2('0x23')])&&_0x340cf3[_0x88e2('0x24')][_0x88e2('0x25')]()!==_0x88e2('0x26')){if(!_['isNil'](queues[_0x340cf3[_0x88e2('0xc')]])){queues[_0x340cf3[_0x88e2('0xc')]][_0x88e2('0x17')]=![];queues[_0x340cf3[_0x88e2('0xc')]]['queuecallerabandonAt']=null;queues[_0x340cf3[_0x88e2('0xc')]][_0x88e2('0x18')]=!![];queues[_0x340cf3[_0x88e2('0xc')]][_0x88e2('0x27')]=utils[_0x88e2('0x1b')]();queues[_0x340cf3['uniqueid']][_0x88e2('0x6')]=_0x340cf3[_0x88e2('0x24')][_0x88e2('0x25')]();utils[_0x88e2('0x2')](util[_0x88e2('0xf')](_0x88e2('0x28'),_0x340cf3[_0x88e2('0xc')],queues[_0x340cf3[_0x88e2('0xc')]][_0x88e2('0x1d')],_0x340cf3[_0x88e2('0x24')],queues[_0x340cf3[_0x88e2('0xc')]][_0x88e2('0x6')]));writeDB(queues[_0x340cf3[_0x88e2('0xc')]]);}}else if(!_[_0x88e2('0x15')](_0x340cf3[_0x88e2('0x22')]['queueposition'])){if(!_[_0x88e2('0x15')](queues[_0x340cf3[_0x88e2('0xc')]])&&!queues[_0x340cf3['uniqueid']][_0x88e2('0x17')]){queues[_0x340cf3[_0x88e2('0xc')]][_0x88e2('0x17')]=![];queues[_0x340cf3['uniqueid']]['queuecallerabandonAt']=null;queues[_0x340cf3['uniqueid']][_0x88e2('0x18')]=!![];queues[_0x340cf3[_0x88e2('0xc')]]['queuecallerexitAt']=utils[_0x88e2('0x1b')]();queues[_0x340cf3['uniqueid']]['queuecallerexitreason']=_0x88e2('0x29');utils['info'](util['format'](_0x88e2('0x2a'),_0x340cf3['uniqueid'],queues[_0x340cf3['uniqueid']]['name'],_0x340cf3[_0x88e2('0x24')],queues[_0x340cf3[_0x88e2('0xc')]][_0x88e2('0x6')]));}}}catch(_0x46cf7c){utils[_0x88e2('0x13')](util['format'](_0x88e2('0x21'),_0x340cf3[_0x88e2('0xc')]),_0x46cf7c);}};exports[_0x88e2('0x17')]=function(_0x5bb557){try{if(!_[_0x88e2('0x15')](queues[_0x5bb557[_0x88e2('0xc')]])){utils['debug'](util[_0x88e2('0xf')](_0x88e2('0x2b'),_0x5bb557[_0x88e2('0xc')]),_0x5bb557);queues[_0x5bb557[_0x88e2('0xc')]][_0x88e2('0x18')]=![];queues[_0x5bb557[_0x88e2('0xc')]][_0x88e2('0x27')]=null;queues[_0x5bb557[_0x88e2('0xc')]][_0x88e2('0x17')]=!![];queues[_0x5bb557[_0x88e2('0xc')]][_0x88e2('0x2c')]=utils[_0x88e2('0x1b')]();queues[_0x5bb557[_0x88e2('0xc')]][_0x88e2('0x6')]='ABANDONED';utils['info'](util[_0x88e2('0xf')](_0x88e2('0x2d'),_0x5bb557[_0x88e2('0xc')],queues[_0x5bb557[_0x88e2('0xc')]]['name'],queues[_0x5bb557['uniqueid']][_0x88e2('0x6')]));}}catch(_0xd44c5){utils[_0x88e2('0x13')](util[_0x88e2('0xf')](_0x88e2('0x2b'),_0x5bb557[_0x88e2('0xc')]),_0xd44c5);}};exports[_0x88e2('0x2e')]=function(_0x3d5f50){try{if(!_[_0x88e2('0x15')](queues[_0x3d5f50['uniqueid']])){utils['debug'](util['format']('[%s][queues][queuecallerleave]',_0x3d5f50[_0x88e2('0xc')]),_0x3d5f50);utils[_0x88e2('0x2')](util[_0x88e2('0xf')]('[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s',_0x3d5f50[_0x88e2('0xc')],queues[_0x3d5f50['uniqueid']][_0x88e2('0x1d')],_0x3d5f50[_0x88e2('0x2f')],_0x3d5f50[_0x88e2('0x30')]));queues[_0x3d5f50['uniqueid']]['queuecallerleave']=!![];queues[_0x3d5f50[_0x88e2('0xc')]][_0x88e2('0x31')]=utils['now']();queues[_0x3d5f50[_0x88e2('0xc')]]['holdtime']=utils[_0x88e2('0x32')](queues[_0x3d5f50['uniqueid']][_0x88e2('0x31')],queues[_0x3d5f50[_0x88e2('0xc')]][_0x88e2('0x33')]);queues[_0x3d5f50[_0x88e2('0xc')]][_0x88e2('0x11')]=_0x3d5f50['position'];queues[_0x3d5f50['uniqueid']][_0x88e2('0x34')]=_0x3d5f50['count'];queues[_0x3d5f50[_0x88e2('0xc')]]['connectedlinenum']=_0x3d5f50['connectedlinenum'];queues[_0x3d5f50[_0x88e2('0xc')]][_0x88e2('0x30')]=_0x3d5f50[_0x88e2('0x30')];}}catch(_0x371c62){utils[_0x88e2('0x13')](util[_0x88e2('0xf')]('[%s][queues][queuecallerleave]',_0x3d5f50['uniqueid']),_0x371c62);}};exports[_0x88e2('0x35')]=function(_0x279591){try{if(!_['isNil'](queues[_0x279591['uniqueid']])){utils[_0x88e2('0xe')](util[_0x88e2('0xf')](_0x88e2('0x36'),_0x279591[_0x88e2('0xc')]),_0x279591);utils[_0x88e2('0x2')](util[_0x88e2('0xf')](_0x88e2('0x37'),_0x279591[_0x88e2('0xc')],queues[_0x279591['uniqueid']]['name'],_0x279591['membername'],_0x279591[_0x88e2('0x38')]));queues[_0x279591[_0x88e2('0xc')]][_0x88e2('0x17')]=![];queues[_0x279591[_0x88e2('0xc')]][_0x88e2('0x17')]=![];queues[_0x279591[_0x88e2('0xc')]][_0x88e2('0x2c')]=null;queues[_0x279591[_0x88e2('0xc')]][_0x88e2('0x18')]=![];queues[_0x279591['uniqueid']][_0x88e2('0x6')]=null;queues[_0x279591[_0x88e2('0xc')]][_0x88e2('0x27')]=null;queues[_0x279591[_0x88e2('0xc')]][_0x88e2('0x39')]=!![];queues[_0x279591[_0x88e2('0xc')]][_0x88e2('0x3a')]=_0x279591[_0x88e2('0x38')];queues[_0x279591[_0x88e2('0xc')]][_0x88e2('0x3b')]=_0x279591[_0x88e2('0x3c')];}}catch(_0x3bb4ce){utils[_0x88e2('0x13')](util[_0x88e2('0xf')](_0x88e2('0x36'),_0x279591[_0x88e2('0xc')]),_0x3bb4ce);}};exports[_0x88e2('0x3d')]=function(_0x1cf25e){try{if(!_[_0x88e2('0x15')](queues[_0x1cf25e[_0x88e2('0xc')]])){if(queues[_0x1cf25e[_0x88e2('0xc')]]['queuecallerleaveAt']){utils[_0x88e2('0xe')](util[_0x88e2('0xf')](_0x88e2('0x3e'),_0x1cf25e[_0x88e2('0xc')]),_0x1cf25e);queues[_0x1cf25e[_0x88e2('0xc')]]['queuecallerabandon']=![];queues[_0x1cf25e[_0x88e2('0xc')]][_0x88e2('0x17')]=![];queues[_0x1cf25e[_0x88e2('0xc')]][_0x88e2('0x2c')]=null;queues[_0x1cf25e[_0x88e2('0xc')]][_0x88e2('0x18')]=![];queues[_0x1cf25e['uniqueid']]['queuecallerexitAt']=null;queues[_0x1cf25e[_0x88e2('0xc')]]['assigned']=!![];queues[_0x1cf25e[_0x88e2('0xc')]][_0x88e2('0x3b')]=_0x1cf25e[_0x88e2('0x3c')];queues[_0x1cf25e[_0x88e2('0xc')]][_0x88e2('0x19')]=!![];queues[_0x1cf25e[_0x88e2('0xc')]][_0x88e2('0x1a')]=utils[_0x88e2('0x1b')]();if(_0x1cf25e[_0x88e2('0x3f')]==_0x88e2('0x40')){if(!queues[_0x1cf25e['uniqueid']]['transfer']){queues[_0x1cf25e[_0x88e2('0xc')]][_0x88e2('0x6')]=_0x88e2('0x41');}}else{queues[_0x1cf25e[_0x88e2('0xc')]][_0x88e2('0x6')]='COMPLETEDBY'+_0x1cf25e[_0x88e2('0x3f')]['toUpperCase']();}utils['info'](util[_0x88e2('0xf')]('[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s',_0x1cf25e[_0x88e2('0xc')],queues[_0x1cf25e[_0x88e2('0xc')]][_0x88e2('0x1d')],_0x1cf25e[_0x88e2('0x3c')],queues[_0x1cf25e[_0x88e2('0xc')]][_0x88e2('0x6')]));writeDB(queues[_0x1cf25e[_0x88e2('0xc')]]);}}}catch(_0x541c1f){utils[_0x88e2('0x13')](util[_0x88e2('0xf')](_0x88e2('0x3e'),_0x1cf25e[_0x88e2('0xc')]),_0x541c1f);}};exports[_0x88e2('0x42')]=function(_0x2607af){try{if(!_[_0x88e2('0x15')](queues[_0x2607af[_0x88e2('0x43')]])){utils['debug'](util[_0x88e2('0xf')](_0x88e2('0x44'),_0x2607af['uniqueid']),_0x2607af);queues[_0x2607af[_0x88e2('0x43')]]['transfer']=!![];queues[_0x2607af['transfereeuniqueid']][_0x88e2('0x45')]=_0x88e2('0x46');queues[_0x2607af[_0x88e2('0x43')]][_0x88e2('0x47')]=_0x2607af[_0x88e2('0x48')];queues[_0x2607af[_0x88e2('0x43')]]['transferuniqueid']=_0x2607af[_0x88e2('0x43')];queues[_0x2607af[_0x88e2('0x43')]][_0x88e2('0x6')]='BLINDTRANSFER';utils[_0x88e2('0x2')](util['format'](_0x88e2('0x49'),_0x2607af[_0x88e2('0xc')],queues[_0x2607af['transfereeuniqueid']][_0x88e2('0x1d')],_0x2607af[_0x88e2('0x43')],_0x2607af['extension']));}}catch(_0x1e3aab){utils[_0x88e2('0x13')](util[_0x88e2('0xf')](_0x88e2('0x44'),_0x2607af['uniqueid']),_0x1e3aab);}};exports['attendedtransfer']=function(_0x527ec8){try{utils[_0x88e2('0xe')](util['format']('[%s][queues][attendedtransfer]',_0x527ec8[_0x88e2('0x4a')]),_0x527ec8);if(_0x527ec8[_0x88e2('0x4a')]==_0x527ec8[_0x88e2('0x4b')]){if(!_[_0x88e2('0x15')](queues[_0x527ec8[_0x88e2('0x4c')]])){utils[_0x88e2('0x2')](util[_0x88e2('0xf')](_0x88e2('0x4d'),_0x527ec8[_0x88e2('0x4a')],queues[_0x527ec8[_0x88e2('0x4c')]][_0x88e2('0x1d')],_0x527ec8[_0x88e2('0x4e')]));queues[_0x527ec8[_0x88e2('0x4c')]][_0x88e2('0x40')]=!![];queues[_0x527ec8['secondtransfererlinkedid']]['transfertype']=_0x88e2('0x4f');queues[_0x527ec8[_0x88e2('0x4c')]]['transferexten']=_0x527ec8[_0x88e2('0x4e')];queues[_0x527ec8['secondtransfererlinkedid']]['transferuniqueid']=_0x527ec8[_0x88e2('0x4a')];queues[_0x527ec8['secondtransfererlinkedid']][_0x88e2('0x6')]=_0x88e2('0x50');}if(!_[_0x88e2('0x15')](queues[_0x527ec8[_0x88e2('0x4b')]])){if(_0x527ec8[_0x88e2('0x51')]&&queues[_0x527ec8[_0x88e2('0x51')]]){queues[_0x527ec8[_0x88e2('0x51')]][_0x88e2('0x1f')]=0x1;queues[_0x527ec8[_0x88e2('0x43')]]=_['clone'](queues[_0x527ec8[_0x88e2('0x51')]]);queues[_0x527ec8[_0x88e2('0x43')]][_0x88e2('0xb')]=_0x527ec8[_0x88e2('0x52')];queues[_0x527ec8[_0x88e2('0x43')]][_0x88e2('0x1f')]=0x2;queues[_0x527ec8[_0x88e2('0x43')]][_0x88e2('0x5')]=queues[_0x527ec8[_0x88e2('0x4c')]][_0x88e2('0x5')];queues[_0x527ec8[_0x88e2('0x43')]][_0x88e2('0x53')]=queues[_0x527ec8[_0x88e2('0x4c')]][_0x88e2('0x53')];queues[_0x527ec8[_0x88e2('0x43')]][_0x88e2('0x33')]=utils[_0x88e2('0x1b')]();queues[_0x527ec8[_0x88e2('0x43')]][_0x88e2('0x31')]=utils[_0x88e2('0x1b')]();queues[_0x527ec8['transfereeuniqueid']][_0x88e2('0x54')]=0x0;queues[_0x527ec8[_0x88e2('0x43')]][_0x88e2('0x55')]=0x0;utils['info'](util[_0x88e2('0xf')](_0x88e2('0x56'),_0x527ec8[_0x88e2('0x4a')],queues[_0x527ec8[_0x88e2('0x43')]][_0x88e2('0x1d')],queues[_0x527ec8['transfereeuniqueid']][_0x88e2('0x5')],queues[_0x527ec8[_0x88e2('0x43')]][_0x88e2('0x53')]));}else{utils[_0x88e2('0x2')](util[_0x88e2('0xf')]('[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s',_0x527ec8[_0x88e2('0x4a')],queues[_0x527ec8[_0x88e2('0x4b')]]['name'],_0x527ec8[_0x88e2('0x4c')]));queues[_0x527ec8['origtransfererlinkedid']][_0x88e2('0xb')]=_0x527ec8[_0x88e2('0x4c')];}}}else if(_0x527ec8[_0x88e2('0x57')]==_0x527ec8[_0x88e2('0x4c')]){if(!_['isNil'](queues[_0x527ec8[_0x88e2('0x4b')]])){utils[_0x88e2('0x2')](util[_0x88e2('0xf')](_0x88e2('0x58'),_0x527ec8[_0x88e2('0x4a')],queues[_0x527ec8[_0x88e2('0x4b')]]['name'],_0x527ec8[_0x88e2('0x57')],_0x527ec8[_0x88e2('0x59')]));queues[_0x527ec8[_0x88e2('0x4b')]][_0x88e2('0x40')]=!![];queues[_0x527ec8['origtransfererlinkedid']][_0x88e2('0x45')]='ATTENDED';queues[_0x527ec8['origtransfererlinkedid']][_0x88e2('0x47')]=_0x527ec8[_0x88e2('0x59')];queues[_0x527ec8[_0x88e2('0x4b')]]['transferuniqueid']=_0x527ec8[_0x88e2('0x57')];queues[_0x527ec8[_0x88e2('0x4b')]][_0x88e2('0x6')]=_0x88e2('0x50');}if(!_[_0x88e2('0x15')](queues[_0x527ec8[_0x88e2('0x4c')]])){if(_0x527ec8[_0x88e2('0x5a')]&&queues[_0x527ec8[_0x88e2('0x5a')]]){queues[_0x527ec8['transfertargetlinkedid']][_0x88e2('0x1f')]=0x1;queues[_0x527ec8[_0x88e2('0x52')]]=_[_0x88e2('0x5b')](queues[_0x527ec8[_0x88e2('0x5a')]]);queues[_0x527ec8[_0x88e2('0x52')]][_0x88e2('0xb')]=_0x527ec8['transfertargetuniqueid'];queues[_0x527ec8['transfertargetuniqueid']][_0x88e2('0x1f')]=0x2;queues[_0x527ec8[_0x88e2('0x52')]]['calleridnum']=queues[_0x527ec8[_0x88e2('0x4b')]][_0x88e2('0x5')];queues[_0x527ec8[_0x88e2('0x52')]][_0x88e2('0x53')]=queues[_0x527ec8[_0x88e2('0x4b')]][_0x88e2('0x53')];queues[_0x527ec8[_0x88e2('0x52')]][_0x88e2('0x33')]=utils[_0x88e2('0x1b')]();queues[_0x527ec8[_0x88e2('0x52')]][_0x88e2('0x31')]=utils[_0x88e2('0x1b')]();queues[_0x527ec8[_0x88e2('0x52')]][_0x88e2('0x54')]=0x0;queues[_0x527ec8['transfertargetuniqueid']][_0x88e2('0x55')]=0x0;utils['info'](util['format'](_0x88e2('0x5c'),_0x527ec8[_0x88e2('0x4a')],queues[_0x527ec8['transfertargetuniqueid']][_0x88e2('0x1d')],queues[_0x527ec8['transfertargetuniqueid']][_0x88e2('0xb')],queues[_0x527ec8[_0x88e2('0x52')]][_0x88e2('0x5')],queues[_0x527ec8[_0x88e2('0x52')]][_0x88e2('0x53')]));}else{utils['info'](util['format'](_0x88e2('0x5d'),_0x527ec8[_0x88e2('0x4a')],queues[_0x527ec8[_0x88e2('0x4c')]][_0x88e2('0x1d')],_0x527ec8[_0x88e2('0x4b')]));queues[_0x527ec8['secondtransfererlinkedid']][_0x88e2('0xb')]=_0x527ec8[_0x88e2('0x4b')];}}}}catch(_0x4a2b0e){utils['error'](util[_0x88e2('0xf')](_0x88e2('0x5e'),_0x527ec8[_0x88e2('0x4a')]),_0x4a2b0e);}};exports[_0x88e2('0x5f')]=function(_0x5ac412){try{if(!_['isNil'](queues[_0x5ac412[_0x88e2('0xc')]])){utils['debug'](util['format'](_0x88e2('0x60'),_0x5ac412[_0x88e2('0xc')]),_0x5ac412);queues[_0x5ac412['uniqueid']]['musiconholdstartAt']=utils[_0x88e2('0x1b')]();utils[_0x88e2('0x2')](util[_0x88e2('0xf')](_0x88e2('0x61'),_0x5ac412[_0x88e2('0xc')],queues[_0x5ac412['uniqueid']]['name'],queues[_0x5ac412['uniqueid']][_0x88e2('0x62')]));}}catch(_0x21af26){utils[_0x88e2('0x13')](util[_0x88e2('0xf')](_0x88e2('0x60'),_0x5ac412['uniqueid']),_0x21af26);}};exports[_0x88e2('0x63')]=function(_0x317c6f){try{if(!_['isNil'](queues[_0x317c6f[_0x88e2('0xc')]])){if(!_[_0x88e2('0x15')](queues[_0x317c6f[_0x88e2('0xc')]][_0x88e2('0x62')])){utils['debug'](util[_0x88e2('0xf')](_0x88e2('0x64'),_0x317c6f[_0x88e2('0xc')]),_0x317c6f);queues[_0x317c6f['uniqueid']]['mohtime']+=utils['diffTime'](utils['now'](),queues[_0x317c6f[_0x88e2('0xc')]][_0x88e2('0x62')]);utils[_0x88e2('0x2')](util[_0x88e2('0xf')]('[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s',_0x317c6f[_0x88e2('0xc')],queues[_0x317c6f['uniqueid']][_0x88e2('0x1d')],queues[_0x317c6f[_0x88e2('0xc')]][_0x88e2('0x55')]));delete queues[_0x317c6f[_0x88e2('0xc')]][_0x88e2('0x62')];}}}catch(_0x2de621){utils[_0x88e2('0x13')](util[_0x88e2('0xf')](_0x88e2('0x64'),_0x317c6f[_0x88e2('0xc')]),_0x2de621);}};
\ No newline at end of file
index 37f516b..89ef7cf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x28cd=['toLowerCase','set','startsWith','cdr','split','lastIndexOf','queuecallerjoin','[%s][recordings][queuecallerjoin]','queue','./utils','info','format','[%s][recordings][writeDB]','uniqueid','accountcode','getUserByInternal','name','UserId','request','CreateVoiceRecording','debug','[%s][recordings][newchannel]','linkedid','[%s][recordings][newchannel]\x20context:%s\x20exten:%s','context','error','[%s][recordings][newstate]','isNil','channelstate','[%s][recordings][newstate]\x20context:%s\x20channel:%s','channel','transfer','[%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','find','monitors','push','[%s][recordings][varset]','hangup','[%s][recordings][hangup]\x20calleridnum:%s\x20calleridname:%s\x20reason:%s','calleridnum','calleridname','cause-txt','connectedlinenum','connectedlinename','type','forEach','clone','[%s][recordings][hangup]','newexten','[%s][recordings][newexten]','appdata','application'];(function(_0x3cfb0d,_0x4df584){var _0x3486b4=function(_0x1b0939){while(--_0x1b0939){_0x3cfb0d['push'](_0x3cfb0d['shift']());}};_0x3486b4(++_0x4df584);}(_0x28cd,0x177));var _0xd28c=function(_0x5d47e8,_0x2a2e4f){_0x5d47e8=_0x5d47e8-0x0;var _0x4169e0=_0x28cd[_0x5d47e8];return _0x4169e0;};'use strict';var _=require('lodash');var util=require('util');var utils=require(_0xd28c('0x0'));var recordings={};function writeDB(_0x27353c){utils[_0xd28c('0x1')](util[_0xd28c('0x2')](_0xd28c('0x3'),_0x27353c[_0xd28c('0x4')]));if(_0x27353c[_0xd28c('0x5')]){utils[_0xd28c('0x6')](_0x27353c[_0xd28c('0x5')])['then'](function(_0x5c142a){if(_0x5c142a){_0x27353c['membername']=_0x5c142a[_0xd28c('0x7')];_0x27353c[_0xd28c('0x8')]=_0x5c142a['id'];}utils[_0xd28c('0x9')](_0xd28c('0xa'),_0x27353c);});}else{utils[_0xd28c('0x9')](_0xd28c('0xa'),_0x27353c);}}exports['newchannel']=function(_0x4e915b){try{utils[_0xd28c('0xb')](util[_0xd28c('0x2')](_0xd28c('0xc'),_0x4e915b[_0xd28c('0x4')]),_0x4e915b);if(_0x4e915b['uniqueid']==_0x4e915b[_0xd28c('0xd')]){utils[_0xd28c('0x1')](util[_0xd28c('0x2')](_0xd28c('0xe'),_0x4e915b[_0xd28c('0x4')],_0x4e915b[_0xd28c('0xf')],_0x4e915b['exten']));recordings[_0x4e915b[_0xd28c('0x4')]]={'uniqueid':_0x4e915b[_0xd28c('0x4')],'accountcode':_0x4e915b['accountcode'],'exten':_0x4e915b['exten'],'context':_0x4e915b[_0xd28c('0xf')],'channel':_0x4e915b['channel'],'monitors':[]};}}catch(_0x1c317e){utils[_0xd28c('0x10')](util[_0xd28c('0x2')](_0xd28c('0xc'),_0x4e915b[_0xd28c('0x4')]),_0x1c317e);}};exports['newstate']=function(_0x41565){try{utils[_0xd28c('0xb')](util[_0xd28c('0x2')](_0xd28c('0x11'),_0x41565[_0xd28c('0x4')]),_0x41565);if(!_[_0xd28c('0x12')](recordings[_0x41565[_0xd28c('0x4')]])&&_0x41565[_0xd28c('0x13')]==0x6){utils[_0xd28c('0x1')](util[_0xd28c('0x2')](_0xd28c('0x14'),_0x41565[_0xd28c('0x4')],_0x41565[_0xd28c('0xf')],_0x41565[_0xd28c('0x15')]));}else if(!_[_0xd28c('0x12')](recordings[_0x41565[_0xd28c('0xd')]])&&_0x41565[_0xd28c('0x13')]==0x6&&_0x41565['context']!=_0xd28c('0x16')){utils[_0xd28c('0x1')](util['format'](_0xd28c('0x17'),_0x41565[_0xd28c('0x4')],_0x41565[_0xd28c('0xd')],_0x41565[_0xd28c('0xf')],_0x41565[_0xd28c('0x15')]));recordings[_0x41565[_0xd28c('0xd')]][_0xd28c('0x5')]=_0x41565[_0xd28c('0x5')];}}catch(_0x21bd51){utils[_0xd28c('0x10')](util[_0xd28c('0x2')](_0xd28c('0x11'),_0x41565[_0xd28c('0x4')]),_0x21bd51);}};exports[_0xd28c('0x18')]=function(_0x537195){try{if(!_['isNil'](_0x537195['variable'])&&!_[_0xd28c('0x12')](_0x537195[_0xd28c('0x19')][_0xd28c('0x1a')])){utils['debug'](util[_0xd28c('0x2')]('[%s][recordings][varset]',_0x537195[_0xd28c('0x4')]),_0x537195);utils['info'](util[_0xd28c('0x2')](_0xd28c('0x1b'),_0x537195[_0xd28c('0x4')],_0x537195['variable'],_0x537195[_0xd28c('0x1c')]));if(_[_0xd28c('0x1d')](_0x537195['value'],_0xd28c('0x1e'))){_0x537195[_0xd28c('0x1c')]=_0x537195[_0xd28c('0x1c')][_0xd28c('0x1f')](_0xd28c('0x1e'),_0xd28c('0x20'));}if(recordings[_0x537195[_0xd28c('0xd')]]){var _0x2f2c77=_[_0xd28c('0x21')](recordings[_0x537195[_0xd28c('0xd')]][_0xd28c('0x22')],{'value':_0x537195[_0xd28c('0x1c')]});if(_['isNil'](_0x2f2c77)){recordings[_0x537195[_0xd28c('0xd')]]['monitors'][_0xd28c('0x23')]({'value':_0x537195[_0xd28c('0x1c')]});}}}}catch(_0x4c4f00){utils[_0xd28c('0x10')](util[_0xd28c('0x2')](_0xd28c('0x24'),_0x537195[_0xd28c('0x4')]),_0x4c4f00);}};exports[_0xd28c('0x25')]=function(_0x2bc071){try{if(!_[_0xd28c('0x12')](recordings[_0x2bc071['uniqueid']])){utils[_0xd28c('0xb')](util[_0xd28c('0x2')]('[%s][recordings][hangup]',_0x2bc071[_0xd28c('0x4')]),_0x2bc071);utils[_0xd28c('0x1')](util[_0xd28c('0x2')](_0xd28c('0x26'),_0x2bc071['uniqueid'],_0x2bc071[_0xd28c('0x27')],_0x2bc071[_0xd28c('0x28')],_0x2bc071[_0xd28c('0x29')]));recordings[_0x2bc071['uniqueid']][_0xd28c('0x27')]=_0x2bc071[_0xd28c('0x27')];recordings[_0x2bc071[_0xd28c('0x4')]][_0xd28c('0x28')]=_0x2bc071[_0xd28c('0x28')];recordings[_0x2bc071[_0xd28c('0x4')]][_0xd28c('0x2a')]=_0x2bc071[_0xd28c('0x2a')];recordings[_0x2bc071[_0xd28c('0x4')]][_0xd28c('0x2b')]=_0x2bc071[_0xd28c('0x2b')];if(recordings[_0x2bc071[_0xd28c('0x4')]][_0xd28c('0x2c')]=='outbound'&&recordings[_0x2bc071['uniqueid']]['accountcode']){recordings[_0x2bc071[_0xd28c('0x4')]][_0xd28c('0x2a')]=recordings[_0x2bc071['uniqueid']][_0xd28c('0x5')];recordings[_0x2bc071['uniqueid']][_0xd28c('0x2b')]='';}recordings[_0x2bc071['uniqueid']][_0xd28c('0x22')][_0xd28c('0x2d')](function(_0x53c38d){var _0x211939=_[_0xd28c('0x2e')](recordings[_0x2bc071[_0xd28c('0x4')]]);_0x211939[_0xd28c('0x1c')]=_0x53c38d[_0xd28c('0x1c')];writeDB(_0x211939);});delete recordings[_0x2bc071[_0xd28c('0x4')]];}}catch(_0xd53644){utils[_0xd28c('0x10')](util[_0xd28c('0x2')](_0xd28c('0x2f'),_0x2bc071[_0xd28c('0x4')]),_0xd53644);}};exports[_0xd28c('0x30')]=function(_0x340946){try{if(!_[_0xd28c('0x12')](recordings[_0x340946[_0xd28c('0x4')]])){utils['debug'](util[_0xd28c('0x2')](_0xd28c('0x31'),_0x340946[_0xd28c('0x4')]),_0x340946);utils[_0xd28c('0x1')](util[_0xd28c('0x2')]('[%s][recordings][newexten]\x20application:%s\x20appdata:%s',_0x340946[_0xd28c('0x4')],_0x340946['application'],_0x340946[_0xd28c('0x32')]));if(_0x340946[_0xd28c('0x33')][_0xd28c('0x34')]()==_0xd28c('0x35')&&_[_0xd28c('0x36')](_0x340946['appdata'][_0xd28c('0x34')](),_0xd28c('0x37'))){var _0x299c6a=_0x340946['appdata'][_0xd28c('0x38')]('=');var _0x10fbfc=_0x299c6a[0x0]['substring'](_0x299c6a[0x0][_0xd28c('0x39')]('(')+0x1,_0x299c6a[0x0][_0xd28c('0x39')](')'));var _0x31a97e=_0x299c6a[0x1];recordings[_0x340946['uniqueid']][_0x10fbfc]=_0x31a97e;}}}catch(_0x543546){utils[_0xd28c('0x10')](util['format'](_0xd28c('0x31'),_0x340946['uniqueid']),_0x543546);}};exports[_0xd28c('0x3a')]=function(_0x3c3a93){try{if(!_[_0xd28c('0x12')](recordings[_0x3c3a93[_0xd28c('0x4')]])){utils[_0xd28c('0xb')](util[_0xd28c('0x2')](_0xd28c('0x3b'),_0x3c3a93['uniqueid']),_0x3c3a93);utils['info'](util[_0xd28c('0x2')]('[%s][recordings][queuecallerjoin]\x20queue:%s',_0x3c3a93['uniqueid'],_0x3c3a93[_0xd28c('0x3c')]));recordings[_0x3c3a93['uniqueid']]['queue']=_0x3c3a93['queue'];}}catch(_0x4c7b14){utils[_0xd28c('0x10')](util[_0xd28c('0x2')]('[%s][recordings][queuecallerjoin]',_0x3c3a93['uniqueid']),_0x4c7b14);}};
\ No newline at end of file
+var _0xa3e1=['lastIndexOf','queuecallerjoin','[%s][recordings][queuecallerjoin]','[%s][recordings][queuecallerjoin]\x20queue:%s','queue','util','./utils','info','format','[%s][recordings][writeDB]','accountcode','getUserByInternal','membername','name','UserId','request','CreateVoiceRecording','newchannel','debug','[%s][recordings][newchannel]','uniqueid','linkedid','[%s][recordings][newchannel]\x20context:%s\x20exten:%s','exten','channel','error','newstate','[%s][recordings][newstate]','isNil','channelstate','context','transfer','[%s][recordings][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s','varset','variable','mixmonitor_filename','[%s][recordings][varset]','[%s][recordings][varset]\x20variable:%s\x20value:%s','value','endsWith','.wav49','replace','.WAV','find','push','hangup','[%s][recordings][hangup]','[%s][recordings][hangup]\x20calleridnum:%s\x20calleridname:%s\x20reason:%s','calleridnum','calleridname','cause-txt','connectedlinenum','connectedlinename','forEach','clone','newexten','application','appdata','toLowerCase','set','split','substring'];(function(_0x8dc04d,_0xaa7559){var _0x2f5f28=function(_0xdd2d1d){while(--_0xdd2d1d){_0x8dc04d['push'](_0x8dc04d['shift']());}};_0x2f5f28(++_0xaa7559);}(_0xa3e1,0x13b));var _0x1a3e=function(_0x17925d,_0x46543f){_0x17925d=_0x17925d-0x0;var _0x5492b7=_0xa3e1[_0x17925d];return _0x5492b7;};'use strict';var _=require('lodash');var util=require(_0x1a3e('0x0'));var utils=require(_0x1a3e('0x1'));var recordings={};function writeDB(_0x6f30ac){utils[_0x1a3e('0x2')](util[_0x1a3e('0x3')](_0x1a3e('0x4'),_0x6f30ac['uniqueid']));if(_0x6f30ac[_0x1a3e('0x5')]){utils[_0x1a3e('0x6')](_0x6f30ac['accountcode'])['then'](function(_0x4cbdc5){if(_0x4cbdc5){_0x6f30ac[_0x1a3e('0x7')]=_0x4cbdc5[_0x1a3e('0x8')];_0x6f30ac[_0x1a3e('0x9')]=_0x4cbdc5['id'];}utils[_0x1a3e('0xa')](_0x1a3e('0xb'),_0x6f30ac);});}else{utils[_0x1a3e('0xa')](_0x1a3e('0xb'),_0x6f30ac);}}exports[_0x1a3e('0xc')]=function(_0x2ba883){try{utils[_0x1a3e('0xd')](util['format'](_0x1a3e('0xe'),_0x2ba883[_0x1a3e('0xf')]),_0x2ba883);if(_0x2ba883[_0x1a3e('0xf')]==_0x2ba883[_0x1a3e('0x10')]){utils['info'](util[_0x1a3e('0x3')](_0x1a3e('0x11'),_0x2ba883[_0x1a3e('0xf')],_0x2ba883['context'],_0x2ba883['exten']));recordings[_0x2ba883[_0x1a3e('0xf')]]={'uniqueid':_0x2ba883[_0x1a3e('0xf')],'accountcode':_0x2ba883[_0x1a3e('0x5')],'exten':_0x2ba883[_0x1a3e('0x12')],'context':_0x2ba883['context'],'channel':_0x2ba883[_0x1a3e('0x13')],'monitors':[]};}}catch(_0x5005c9){utils[_0x1a3e('0x14')](util['format'](_0x1a3e('0xe'),_0x2ba883[_0x1a3e('0xf')]),_0x5005c9);}};exports[_0x1a3e('0x15')]=function(_0x16dcb4){try{utils['debug'](util['format'](_0x1a3e('0x16'),_0x16dcb4['uniqueid']),_0x16dcb4);if(!_[_0x1a3e('0x17')](recordings[_0x16dcb4[_0x1a3e('0xf')]])&&_0x16dcb4[_0x1a3e('0x18')]==0x6){utils[_0x1a3e('0x2')](util[_0x1a3e('0x3')]('[%s][recordings][newstate]\x20context:%s\x20channel:%s',_0x16dcb4[_0x1a3e('0xf')],_0x16dcb4[_0x1a3e('0x19')],_0x16dcb4[_0x1a3e('0x13')]));}else if(!_[_0x1a3e('0x17')](recordings[_0x16dcb4[_0x1a3e('0x10')]])&&_0x16dcb4[_0x1a3e('0x18')]==0x6&&_0x16dcb4[_0x1a3e('0x19')]!=_0x1a3e('0x1a')){utils[_0x1a3e('0x2')](util[_0x1a3e('0x3')](_0x1a3e('0x1b'),_0x16dcb4[_0x1a3e('0xf')],_0x16dcb4[_0x1a3e('0x10')],_0x16dcb4['context'],_0x16dcb4[_0x1a3e('0x13')]));recordings[_0x16dcb4[_0x1a3e('0x10')]][_0x1a3e('0x5')]=_0x16dcb4[_0x1a3e('0x5')];}}catch(_0x5a94ea){utils[_0x1a3e('0x14')](util[_0x1a3e('0x3')]('[%s][recordings][newstate]',_0x16dcb4['uniqueid']),_0x5a94ea);}};exports[_0x1a3e('0x1c')]=function(_0x1abdf2){try{if(!_[_0x1a3e('0x17')](_0x1abdf2['variable'])&&!_[_0x1a3e('0x17')](_0x1abdf2[_0x1a3e('0x1d')][_0x1a3e('0x1e')])){utils['debug'](util[_0x1a3e('0x3')](_0x1a3e('0x1f'),_0x1abdf2[_0x1a3e('0xf')]),_0x1abdf2);utils[_0x1a3e('0x2')](util[_0x1a3e('0x3')](_0x1a3e('0x20'),_0x1abdf2[_0x1a3e('0xf')],_0x1abdf2[_0x1a3e('0x1d')],_0x1abdf2[_0x1a3e('0x21')]));if(_[_0x1a3e('0x22')](_0x1abdf2[_0x1a3e('0x21')],_0x1a3e('0x23'))){_0x1abdf2[_0x1a3e('0x21')]=_0x1abdf2[_0x1a3e('0x21')][_0x1a3e('0x24')](_0x1a3e('0x23'),_0x1a3e('0x25'));}if(recordings[_0x1abdf2['linkedid']]){var _0x2df155=_[_0x1a3e('0x26')](recordings[_0x1abdf2[_0x1a3e('0x10')]]['monitors'],{'value':_0x1abdf2[_0x1a3e('0x21')]});if(_['isNil'](_0x2df155)){recordings[_0x1abdf2[_0x1a3e('0x10')]]['monitors'][_0x1a3e('0x27')]({'value':_0x1abdf2[_0x1a3e('0x21')]});}}}}catch(_0xf02d48){utils[_0x1a3e('0x14')](util[_0x1a3e('0x3')](_0x1a3e('0x1f'),_0x1abdf2[_0x1a3e('0xf')]),_0xf02d48);}};exports[_0x1a3e('0x28')]=function(_0x88d58a){try{if(!_[_0x1a3e('0x17')](recordings[_0x88d58a[_0x1a3e('0xf')]])){utils[_0x1a3e('0xd')](util[_0x1a3e('0x3')](_0x1a3e('0x29'),_0x88d58a['uniqueid']),_0x88d58a);utils[_0x1a3e('0x2')](util[_0x1a3e('0x3')](_0x1a3e('0x2a'),_0x88d58a[_0x1a3e('0xf')],_0x88d58a[_0x1a3e('0x2b')],_0x88d58a[_0x1a3e('0x2c')],_0x88d58a[_0x1a3e('0x2d')]));recordings[_0x88d58a['uniqueid']][_0x1a3e('0x2b')]=_0x88d58a[_0x1a3e('0x2b')];recordings[_0x88d58a[_0x1a3e('0xf')]][_0x1a3e('0x2c')]=_0x88d58a[_0x1a3e('0x2c')];recordings[_0x88d58a[_0x1a3e('0xf')]][_0x1a3e('0x2e')]=_0x88d58a[_0x1a3e('0x2e')];recordings[_0x88d58a[_0x1a3e('0xf')]][_0x1a3e('0x2f')]=_0x88d58a[_0x1a3e('0x2f')];if(recordings[_0x88d58a['uniqueid']]['type']=='outbound'&&recordings[_0x88d58a['uniqueid']][_0x1a3e('0x5')]){recordings[_0x88d58a[_0x1a3e('0xf')]][_0x1a3e('0x2e')]=recordings[_0x88d58a[_0x1a3e('0xf')]][_0x1a3e('0x5')];recordings[_0x88d58a[_0x1a3e('0xf')]][_0x1a3e('0x2f')]='';}recordings[_0x88d58a[_0x1a3e('0xf')]]['monitors'][_0x1a3e('0x30')](function(_0x2b1dd4){var _0x49fc58=_[_0x1a3e('0x31')](recordings[_0x88d58a['uniqueid']]);_0x49fc58[_0x1a3e('0x21')]=_0x2b1dd4[_0x1a3e('0x21')];writeDB(_0x49fc58);});delete recordings[_0x88d58a[_0x1a3e('0xf')]];}}catch(_0x3719b9){utils['error'](util[_0x1a3e('0x3')](_0x1a3e('0x29'),_0x88d58a[_0x1a3e('0xf')]),_0x3719b9);}};exports[_0x1a3e('0x32')]=function(_0x5e7bc2){try{if(!_[_0x1a3e('0x17')](recordings[_0x5e7bc2[_0x1a3e('0xf')]])){utils[_0x1a3e('0xd')](util[_0x1a3e('0x3')]('[%s][recordings][newexten]',_0x5e7bc2[_0x1a3e('0xf')]),_0x5e7bc2);utils['info'](util[_0x1a3e('0x3')]('[%s][recordings][newexten]\x20application:%s\x20appdata:%s',_0x5e7bc2[_0x1a3e('0xf')],_0x5e7bc2[_0x1a3e('0x33')],_0x5e7bc2[_0x1a3e('0x34')]));if(_0x5e7bc2[_0x1a3e('0x33')][_0x1a3e('0x35')]()==_0x1a3e('0x36')&&_['startsWith'](_0x5e7bc2[_0x1a3e('0x34')][_0x1a3e('0x35')](),'cdr')){var _0x2972f0=_0x5e7bc2[_0x1a3e('0x34')][_0x1a3e('0x37')]('=');var _0x37a143=_0x2972f0[0x0][_0x1a3e('0x38')](_0x2972f0[0x0][_0x1a3e('0x39')]('(')+0x1,_0x2972f0[0x0][_0x1a3e('0x39')](')'));var _0x47be74=_0x2972f0[0x1];recordings[_0x5e7bc2[_0x1a3e('0xf')]][_0x37a143]=_0x47be74;}}}catch(_0x5255ad){utils['error'](util['format']('[%s][recordings][newexten]',_0x5e7bc2[_0x1a3e('0xf')]),_0x5255ad);}};exports[_0x1a3e('0x3a')]=function(_0x53296c){try{if(!_['isNil'](recordings[_0x53296c[_0x1a3e('0xf')]])){utils[_0x1a3e('0xd')](util[_0x1a3e('0x3')](_0x1a3e('0x3b'),_0x53296c['uniqueid']),_0x53296c);utils['info'](util[_0x1a3e('0x3')](_0x1a3e('0x3c'),_0x53296c['uniqueid'],_0x53296c[_0x1a3e('0x3d')]));recordings[_0x53296c[_0x1a3e('0xf')]]['queue']=_0x53296c[_0x1a3e('0x3d')];}}catch(_0x2fa8c3){utils[_0x1a3e('0x14')](util[_0x1a3e('0x3')](_0x1a3e('0x3b'),_0x53296c[_0x1a3e('0xf')]),_0x2fa8c3);}};
\ No newline at end of file
index 1efd44e..d12c886 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfefb=['info','[%s][transfers][blindtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s','transferercalleridnum','transferercalleridname','transfereecalleridnum','[%s][transfers][attendedtransfer]','origtransferercalleridnum','origtransferercalleridname','transfertargetcalleridnum','transfertargetcalleridname','origtransfererchannel','secondtransfererconnectedlinenum','secondtransfererconnectedlinename','origtransfereraccountcode','secondtransfererexten','origtransfererlinkedid','attended','isNil','transfereechannel','assign','transfertargetchannel','transfertargetconnectedlinenum','transfertargetconnectedlinename','transfertargetcontext','transfertargetexten','transfertargetlinkedid','error','lodash','util','./utils','format','[%s][transfers][writeDB]\x20type:%s','type','origtransfereruniqueid','request','CreateVoiceTransferReport','blindtransfer','debug','uniqueid'];(function(_0x525c7b,_0x488fcc){var _0x27b33e=function(_0x56d43b){while(--_0x56d43b){_0x525c7b['push'](_0x525c7b['shift']());}};_0x27b33e(++_0x488fcc);}(_0xfefb,0x17a));var _0xbfef=function(_0x1143a0,_0x1029f7){_0x1143a0=_0x1143a0-0x0;var _0x4539f9=_0xfefb[_0x1143a0];return _0x4539f9;};'use strict';var _=require(_0xbfef('0x0'));var util=require(_0xbfef('0x1'));var utils=require(_0xbfef('0x2'));function writeDB(_0x4ad572){utils['info'](util[_0xbfef('0x3')](_0xbfef('0x4'),_0x4ad572[_0xbfef('0x5')]==='attended'?_0x4ad572[_0xbfef('0x6')]:_0x4ad572['uniqueid'],_0x4ad572[_0xbfef('0x5')]));utils[_0xbfef('0x7')](_0xbfef('0x8'),_0x4ad572);}exports[_0xbfef('0x9')]=function(_0x397e3e){try{utils[_0xbfef('0xa')](util[_0xbfef('0x3')]('[%s][transfers][blindtransfer]',_0x397e3e[_0xbfef('0xb')]),_0x397e3e);utils[_0xbfef('0xc')](util['format'](_0xbfef('0xd'),_0x397e3e[_0xbfef('0xb')],_0x397e3e[_0xbfef('0xe')],_0x397e3e[_0xbfef('0xf')],_0x397e3e[_0xbfef('0x10')],_0x397e3e['transfereecalleridname']));_0x397e3e[_0xbfef('0x5')]='blind';writeDB(_0x397e3e);}catch(_0x52614d){utils['error'](util[_0xbfef('0x3')]('[%s][transfers][blindtransfer]',_0x397e3e[_0xbfef('0xb')]),_0x52614d);}};exports['attendedtransfer']=function(_0x14326e){try{utils[_0xbfef('0xa')](util[_0xbfef('0x3')](_0xbfef('0x11'),_0x14326e['origtransfereruniqueid']),_0x14326e);utils['info'](util[_0xbfef('0x3')]('[%s][transfers][attendedtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s',_0x14326e[_0xbfef('0x6')],_0x14326e[_0xbfef('0x12')],_0x14326e[_0xbfef('0x13')],_0x14326e[_0xbfef('0x14')],_0x14326e[_0xbfef('0x15')]));_0x14326e=_['assign'](_0x14326e,{'transfererchannel':_0x14326e[_0xbfef('0x16')],'transferercalleridnum':_0x14326e[_0xbfef('0x12')],'transferercalleridname':_0x14326e['origtransferercalleridname'],'transfererconnectedlinenum':_0x14326e[_0xbfef('0x17')],'transfererconnectedlinename':_0x14326e[_0xbfef('0x18')],'transfereraccountcode':_0x14326e[_0xbfef('0x19')],'transferercontext':_0x14326e['secondtransferercontext'],'transfererexten':_0x14326e[_0xbfef('0x1a')],'transfererlinkedid':_0x14326e[_0xbfef('0x1b')],'context':_0x14326e['origtransferercontext'],'extension':_0x14326e['origtransfererexten'],'type':_0xbfef('0x1c')});if(_[_0xbfef('0x1d')](_0x14326e[_0xbfef('0x1e')])){_0x14326e=_[_0xbfef('0x1f')](_0x14326e,{'transfereechannel':_0x14326e[_0xbfef('0x20')],'transfereecalleridnum':_0x14326e[_0xbfef('0x14')],'transfereecalleridname':_0x14326e[_0xbfef('0x15')],'transfereeconnectedlinenum':_0x14326e[_0xbfef('0x21')],'transfereeconnectedlinename':_0x14326e[_0xbfef('0x22')],'transfereeaccountcode':_0x14326e['transfertargetaccountcode'],'transfereecontext':_0x14326e[_0xbfef('0x23')],'transfereeexten':_0x14326e[_0xbfef('0x24')],'transfereelinkedid':_0x14326e[_0xbfef('0x25')]});}writeDB(_0x14326e);}catch(_0x2711e0){utils[_0xbfef('0x26')](util[_0xbfef('0x3')](_0xbfef('0x11'),_0x14326e[_0xbfef('0x6')]),_0x2711e0);}};
\ No newline at end of file
+var _0xb9c7=['transfertargetcontext','transfertargetexten','transfertargetlinkedid','./utils','format','type','origtransfereruniqueid','uniqueid','request','CreateVoiceTransferReport','debug','[%s][transfers][blindtransfer]','info','transferercalleridnum','transferercalleridname','transfereecalleridnum','transfereecalleridname','blind','error','[%s][transfers][attendedtransfer]','[%s][transfers][attendedtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s','origtransferercalleridnum','origtransferercalleridname','transfertargetcalleridname','assign','origtransfererchannel','secondtransfererconnectedlinenum','secondtransfererconnectedlinename','origtransfereraccountcode','secondtransferercontext','origtransfererlinkedid','attended','transfereechannel','transfertargetchannel','transfertargetcalleridnum','transfertargetconnectedlinename'];(function(_0x59e8c6,_0x847c24){var _0x4e6c5b=function(_0x34f364){while(--_0x34f364){_0x59e8c6['push'](_0x59e8c6['shift']());}};_0x4e6c5b(++_0x847c24);}(_0xb9c7,0xff));var _0x7b9c=function(_0x38befe,_0x553755){_0x38befe=_0x38befe-0x0;var _0x3cb5e1=_0xb9c7[_0x38befe];return _0x3cb5e1;};'use strict';var _=require('lodash');var util=require('util');var utils=require(_0x7b9c('0x0'));function writeDB(_0x19b81a){utils['info'](util[_0x7b9c('0x1')]('[%s][transfers][writeDB]\x20type:%s',_0x19b81a[_0x7b9c('0x2')]==='attended'?_0x19b81a[_0x7b9c('0x3')]:_0x19b81a[_0x7b9c('0x4')],_0x19b81a[_0x7b9c('0x2')]));utils[_0x7b9c('0x5')](_0x7b9c('0x6'),_0x19b81a);}exports['blindtransfer']=function(_0x390d2c){try{utils[_0x7b9c('0x7')](util[_0x7b9c('0x1')](_0x7b9c('0x8'),_0x390d2c[_0x7b9c('0x4')]),_0x390d2c);utils[_0x7b9c('0x9')](util['format']('[%s][transfers][blindtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s',_0x390d2c[_0x7b9c('0x4')],_0x390d2c[_0x7b9c('0xa')],_0x390d2c[_0x7b9c('0xb')],_0x390d2c[_0x7b9c('0xc')],_0x390d2c[_0x7b9c('0xd')]));_0x390d2c['type']=_0x7b9c('0xe');writeDB(_0x390d2c);}catch(_0x23d1c5){utils[_0x7b9c('0xf')](util[_0x7b9c('0x1')](_0x7b9c('0x8'),_0x390d2c['uniqueid']),_0x23d1c5);}};exports['attendedtransfer']=function(_0x2edb09){try{utils[_0x7b9c('0x7')](util[_0x7b9c('0x1')](_0x7b9c('0x10'),_0x2edb09[_0x7b9c('0x3')]),_0x2edb09);utils[_0x7b9c('0x9')](util[_0x7b9c('0x1')](_0x7b9c('0x11'),_0x2edb09['origtransfereruniqueid'],_0x2edb09[_0x7b9c('0x12')],_0x2edb09[_0x7b9c('0x13')],_0x2edb09['transfertargetcalleridnum'],_0x2edb09[_0x7b9c('0x14')]));_0x2edb09=_[_0x7b9c('0x15')](_0x2edb09,{'transfererchannel':_0x2edb09[_0x7b9c('0x16')],'transferercalleridnum':_0x2edb09[_0x7b9c('0x12')],'transferercalleridname':_0x2edb09[_0x7b9c('0x13')],'transfererconnectedlinenum':_0x2edb09[_0x7b9c('0x17')],'transfererconnectedlinename':_0x2edb09[_0x7b9c('0x18')],'transfereraccountcode':_0x2edb09[_0x7b9c('0x19')],'transferercontext':_0x2edb09[_0x7b9c('0x1a')],'transfererexten':_0x2edb09['secondtransfererexten'],'transfererlinkedid':_0x2edb09[_0x7b9c('0x1b')],'context':_0x2edb09['origtransferercontext'],'extension':_0x2edb09['origtransfererexten'],'type':_0x7b9c('0x1c')});if(_['isNil'](_0x2edb09[_0x7b9c('0x1d')])){_0x2edb09=_['assign'](_0x2edb09,{'transfereechannel':_0x2edb09[_0x7b9c('0x1e')],'transfereecalleridnum':_0x2edb09[_0x7b9c('0x1f')],'transfereecalleridname':_0x2edb09['transfertargetcalleridname'],'transfereeconnectedlinenum':_0x2edb09['transfertargetconnectedlinenum'],'transfereeconnectedlinename':_0x2edb09[_0x7b9c('0x20')],'transfereeaccountcode':_0x2edb09['transfertargetaccountcode'],'transfereecontext':_0x2edb09[_0x7b9c('0x21')],'transfereeexten':_0x2edb09[_0x7b9c('0x22')],'transfereelinkedid':_0x2edb09[_0x7b9c('0x23')]});}writeDB(_0x2edb09);}catch(_0x841aa4){utils['error'](util['format'](_0x7b9c('0x10'),_0x2edb09[_0x7b9c('0x3')]),_0x841aa4);}};
\ No newline at end of file
index 3de8fca..2c5286d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3939=['acw','[utils][getVoiceQueueByName]\x20name:%s\x20%s','length','addTime','seconds','format','YYYY-MM-DD\x20HH:mm:ss','subtract','diffTime','sumTime','now','isAfter','bluebird','jayson/promise','moment','util','client','http','../../config/logger','xdr','info','inspect','debug','error','request','[utils][request]\x20name:%s','catch','GetUser','name','interface','then','[utils][getUser]\x20where:%s','stringify','result','getUserByInternal','[utils][getUserByInternal]\x20internal:%s\x20%s','notfound','[utils][getUserByInternal]','getUserByInterface','[utils][getUserByInterface]\x20interface:%s\x20%s','found','[utils][getUserByName]\x20name:%s\x20%s','[utils][getUserByName]','GetVoiceQueue'];(function(_0x2b58f8,_0x14f865){var _0x2af05b=function(_0x2c2bf3){while(--_0x2c2bf3){_0x2b58f8['push'](_0x2b58f8['shift']());}};_0x2af05b(++_0x14f865);}(_0x3939,0xe8));var _0x9393=function(_0x2e82b6,_0x5c7960){_0x2e82b6=_0x2e82b6-0x0;var _0x23f11a=_0x3939[_0x2e82b6];return _0x23f11a;};'use strict';var BPromise=require(_0x9393('0x0'));var jayson=require(_0x9393('0x1'));var moment=require(_0x9393('0x2'));var util=require(_0x9393('0x3'));var client=jayson[_0x9393('0x4')][_0x9393('0x5')]({'port':0x2329});var logger=require(_0x9393('0x6'))(_0x9393('0x7'));exports[_0x9393('0x8')]=function(_0x34049a,_0x3786be){logger[_0x9393('0x8')](_0x34049a,_0x3786be?util[_0x9393('0x9')](_0x3786be,{'showHidden':![],'depth':null}):'');};exports[_0x9393('0xa')]=function(_0x5ed1e,_0x4054b2){logger['debug'](_0x5ed1e,_0x4054b2?util[_0x9393('0x9')](_0x4054b2,{'showHidden':![],'depth':null}):'');};exports[_0x9393('0xb')]=function(_0x268065,_0x47f2d2){logger['error'](_0x268065,_0x47f2d2?util[_0x9393('0x9')](_0x47f2d2,{'showHidden':![],'depth':null}):'');};exports[_0x9393('0xc')]=function(_0x444fe8,_0xc42c53){return client[_0x9393('0xc')](_0x444fe8,{'body':_0xc42c53})['then'](function(_0x2a66c){logger['debug'](_0x9393('0xd'),_0x444fe8,_0x2a66c?util[_0x9393('0x9')](_0x2a66c,{'showHidden':![],'depth':null}):'');})[_0x9393('0xe')](function(_0x2263e0){logger[_0x9393('0xb')](_0x9393('0xd'),_0x444fe8,_0x2263e0?util[_0x9393('0x9')](_0x2263e0,{'showHidden':![],'depth':null}):'');});};function getUser(_0x1961d6){return client[_0x9393('0xc')](_0x9393('0xf'),{'options':{'raw':!![],'attributes':['id','internal',_0x9393('0x10'),_0x9393('0x11')],'where':_0x1961d6,'limit':0x1}})[_0x9393('0x12')](function(_0x55ff3b){logger['debug'](_0x9393('0x13'),JSON[_0x9393('0x14')](_0x1961d6),_0x55ff3b?util[_0x9393('0x9')](_0x55ff3b,{'showHidden':![],'depth':null}):'');return _0x55ff3b['result']['length']?_0x55ff3b[_0x9393('0x15')][0x0]:null;});}exports[_0x9393('0x16')]=function(_0x195454){return new BPromise(function(_0x1ca323,_0x4b78e7){if(_0x195454){return getUser({'internal':_0x195454})['then'](function(_0x7d8b05){logger[_0x9393('0x8')](_0x9393('0x17'),_0x195454,_0x7d8b05?'found':_0x9393('0x18'));return _0x1ca323(_0x7d8b05);})[_0x9393('0xe')](function(_0x5294ef){logger['error'](_0x9393('0x19'),_0x5294ef?util[_0x9393('0x9')](_0x5294ef,{'showHidden':![],'depth':null}):'');return _0x1ca323(null);});}return _0x1ca323(null);});};exports[_0x9393('0x1a')]=function(_0x240a16){return new BPromise(function(_0x119950,_0x3b507c){if(_0x240a16){return getUser({'interface':_0x240a16})[_0x9393('0x12')](function(_0x139435){logger[_0x9393('0x8')](_0x9393('0x1b'),_0x240a16,_0x139435?_0x9393('0x1c'):_0x9393('0x18'));return _0x119950(_0x139435);})[_0x9393('0xe')](function(_0x3d74c6){logger[_0x9393('0xb')]('[utils][getUserByInterface]',_0x3d74c6?util[_0x9393('0x9')](_0x3d74c6,{'showHidden':![],'depth':null}):'');return _0x119950(null);});}return _0x119950(null);});};exports['getUserByName']=function(_0x72d329){return new BPromise(function(_0x4cbff4,_0x498683){if(_0x72d329){return getUser({'name':_0x72d329})[_0x9393('0x12')](function(_0x532be5){logger[_0x9393('0x8')](_0x9393('0x1d'),_0x72d329,_0x532be5?_0x9393('0x1c'):_0x9393('0x18'));return _0x4cbff4(_0x532be5);})[_0x9393('0xe')](function(_0x37d522){logger['error'](_0x9393('0x1e'),_0x37d522?util[_0x9393('0x9')](_0x37d522,{'showHidden':![],'depth':null}):'');return _0x4cbff4(null);});}return _0x4cbff4(null);});};exports['getVoiceQueueByName']=function(_0x282703){return new BPromise(function(_0x28a8fe,_0x65533b){if(_0x282703){return client[_0x9393('0xc')](_0x9393('0x1f'),{'options':{'raw':!![],'attributes':['id',_0x9393('0x10'),'type',_0x9393('0x20'),'acwTimeout'],'where':{'name':_0x282703},'limit':0x1}})['then'](function(_0x361319){logger[_0x9393('0xa')]('[utils][getVoiceQueueByName]\x20name:%s',_0x282703,_0x361319?util['inspect'](_0x361319,{'showHidden':![],'depth':null}):'');logger[_0x9393('0x8')](_0x9393('0x21'),_0x282703,_0x361319?'found':'notfound');return _0x28a8fe(_0x361319['result'][_0x9393('0x22')]?_0x361319[_0x9393('0x15')][0x0]:null);})[_0x9393('0xe')](function(_0x47b702){logger['error']('[utils][getVoiceQueueByName]',_0x47b702?util[_0x9393('0x9')](_0x47b702,{'showHidden':![],'depth':null}):'');return _0x28a8fe(null);});}return _0x28a8fe(null);});};exports[_0x9393('0x23')]=function(_0x1644d1,_0x49fc3f){return moment(_0x1644d1)['add'](_0x49fc3f,_0x9393('0x24'))[_0x9393('0x25')](_0x9393('0x26'));};exports['subtractTime']=function(_0x2e2088,_0x4126d0){return moment(_0x2e2088)[_0x9393('0x27')](_0x4126d0,_0x9393('0x24'))[_0x9393('0x25')](_0x9393('0x26'));};exports[_0x9393('0x28')]=function(_0x57bcc0,_0x31bc2e){return moment(_0x57bcc0)['diff'](moment(_0x31bc2e),'seconds');};exports[_0x9393('0x29')]=function(_0x24354d,_0x5ac8f3){return parseInt(_0x24354d,0xa)+parseInt(_0x5ac8f3,0xa);};exports[_0x9393('0x2a')]=function(){return moment()[_0x9393('0x25')]('YYYY-MM-DD\x20HH:mm:ss');};exports[_0x9393('0x2b')]=function(_0x17baff,_0x282bb8){if(_0x282bb8){return moment(_0x17baff)[_0x9393('0x2b')](_0x282bb8);}return!![];};exports['isBefore']=function(_0x37ffa5,_0x129b34){if(_0x129b34){return moment(_0x37ffa5)['isBefore'](_0x129b34);}else if(_0x37ffa5){return!![];}return![];};
\ No newline at end of file
+var _0xfce5=['length','[utils][getUserByInternal]\x20internal:%s\x20%s','found','notfound','[utils][getUserByInternal]','getUserByInterface','[utils][getUserByInterface]\x20interface:%s\x20%s','[utils][getUserByInterface]','[utils][getUserByName]\x20name:%s\x20%s','[utils][getUserByName]','getVoiceQueueByName','type','acw','acwTimeout','[utils][getVoiceQueueByName]\x20name:%s\x20%s','[utils][getVoiceQueueByName]','addTime','add','format','YYYY-MM-DD\x20HH:mm:ss','subtract','diffTime','diff','seconds','sumTime','now','isAfter','isBefore','bluebird','jayson/promise','moment','util','http','../../config/logger','xdr','info','inspect','debug','error','request','then','[utils][request]\x20name:%s','catch','GetUser','internal','name','interface','stringify','result'];(function(_0x27e11e,_0x41e13b){var _0x362466=function(_0x2f7ec5){while(--_0x2f7ec5){_0x27e11e['push'](_0x27e11e['shift']());}};_0x362466(++_0x41e13b);}(_0xfce5,0x1d5));var _0x5fce=function(_0xafdec6,_0x3d94df){_0xafdec6=_0xafdec6-0x0;var _0x372bdb=_0xfce5[_0xafdec6];return _0x372bdb;};'use strict';var BPromise=require(_0x5fce('0x0'));var jayson=require(_0x5fce('0x1'));var moment=require(_0x5fce('0x2'));var util=require(_0x5fce('0x3'));var client=jayson['client'][_0x5fce('0x4')]({'port':0x2329});var logger=require(_0x5fce('0x5'))(_0x5fce('0x6'));exports['info']=function(_0x301c5c,_0x4606b8){logger[_0x5fce('0x7')](_0x301c5c,_0x4606b8?util[_0x5fce('0x8')](_0x4606b8,{'showHidden':![],'depth':null}):'');};exports['debug']=function(_0x345bce,_0xb94cff){logger[_0x5fce('0x9')](_0x345bce,_0xb94cff?util[_0x5fce('0x8')](_0xb94cff,{'showHidden':![],'depth':null}):'');};exports[_0x5fce('0xa')]=function(_0x53fce4,_0x4e438d){logger[_0x5fce('0xa')](_0x53fce4,_0x4e438d?util[_0x5fce('0x8')](_0x4e438d,{'showHidden':![],'depth':null}):'');};exports[_0x5fce('0xb')]=function(_0x5d02ad,_0x4bbe1a){return client['request'](_0x5d02ad,{'body':_0x4bbe1a})[_0x5fce('0xc')](function(_0x2d7971){logger[_0x5fce('0x9')](_0x5fce('0xd'),_0x5d02ad,_0x2d7971?util[_0x5fce('0x8')](_0x2d7971,{'showHidden':![],'depth':null}):'');})[_0x5fce('0xe')](function(_0xbafa62){logger[_0x5fce('0xa')](_0x5fce('0xd'),_0x5d02ad,_0xbafa62?util[_0x5fce('0x8')](_0xbafa62,{'showHidden':![],'depth':null}):'');});};function getUser(_0x594df4){return client[_0x5fce('0xb')](_0x5fce('0xf'),{'options':{'raw':!![],'attributes':['id',_0x5fce('0x10'),_0x5fce('0x11'),_0x5fce('0x12')],'where':_0x594df4,'limit':0x1}})['then'](function(_0x13c9ae){logger['debug']('[utils][getUser]\x20where:%s',JSON[_0x5fce('0x13')](_0x594df4),_0x13c9ae?util[_0x5fce('0x8')](_0x13c9ae,{'showHidden':![],'depth':null}):'');return _0x13c9ae[_0x5fce('0x14')][_0x5fce('0x15')]?_0x13c9ae[_0x5fce('0x14')][0x0]:null;});}exports['getUserByInternal']=function(_0x426bd4){return new BPromise(function(_0x273653,_0x1827a5){if(_0x426bd4){return getUser({'internal':_0x426bd4})['then'](function(_0x5617b2){logger[_0x5fce('0x7')](_0x5fce('0x16'),_0x426bd4,_0x5617b2?_0x5fce('0x17'):_0x5fce('0x18'));return _0x273653(_0x5617b2);})['catch'](function(_0x1bd215){logger[_0x5fce('0xa')](_0x5fce('0x19'),_0x1bd215?util[_0x5fce('0x8')](_0x1bd215,{'showHidden':![],'depth':null}):'');return _0x273653(null);});}return _0x273653(null);});};exports[_0x5fce('0x1a')]=function(_0x52fd16){return new BPromise(function(_0x544160,_0x3d0cf8){if(_0x52fd16){return getUser({'interface':_0x52fd16})[_0x5fce('0xc')](function(_0x3fb355){logger[_0x5fce('0x7')](_0x5fce('0x1b'),_0x52fd16,_0x3fb355?_0x5fce('0x17'):_0x5fce('0x18'));return _0x544160(_0x3fb355);})[_0x5fce('0xe')](function(_0x529955){logger[_0x5fce('0xa')](_0x5fce('0x1c'),_0x529955?util[_0x5fce('0x8')](_0x529955,{'showHidden':![],'depth':null}):'');return _0x544160(null);});}return _0x544160(null);});};exports['getUserByName']=function(_0x1028e4){return new BPromise(function(_0x3a5506,_0x43a1fa){if(_0x1028e4){return getUser({'name':_0x1028e4})[_0x5fce('0xc')](function(_0x49157e){logger[_0x5fce('0x7')](_0x5fce('0x1d'),_0x1028e4,_0x49157e?_0x5fce('0x17'):_0x5fce('0x18'));return _0x3a5506(_0x49157e);})[_0x5fce('0xe')](function(_0x35f7a1){logger['error'](_0x5fce('0x1e'),_0x35f7a1?util[_0x5fce('0x8')](_0x35f7a1,{'showHidden':![],'depth':null}):'');return _0x3a5506(null);});}return _0x3a5506(null);});};exports[_0x5fce('0x1f')]=function(_0x1accec){return new BPromise(function(_0x3f27bb,_0x32c907){if(_0x1accec){return client[_0x5fce('0xb')]('GetVoiceQueue',{'options':{'raw':!![],'attributes':['id',_0x5fce('0x11'),_0x5fce('0x20'),_0x5fce('0x21'),_0x5fce('0x22')],'where':{'name':_0x1accec},'limit':0x1}})['then'](function(_0x269100){logger[_0x5fce('0x9')]('[utils][getVoiceQueueByName]\x20name:%s',_0x1accec,_0x269100?util[_0x5fce('0x8')](_0x269100,{'showHidden':![],'depth':null}):'');logger['info'](_0x5fce('0x23'),_0x1accec,_0x269100?_0x5fce('0x17'):_0x5fce('0x18'));return _0x3f27bb(_0x269100[_0x5fce('0x14')]['length']?_0x269100['result'][0x0]:null);})[_0x5fce('0xe')](function(_0xdf86c0){logger[_0x5fce('0xa')](_0x5fce('0x24'),_0xdf86c0?util[_0x5fce('0x8')](_0xdf86c0,{'showHidden':![],'depth':null}):'');return _0x3f27bb(null);});}return _0x3f27bb(null);});};exports[_0x5fce('0x25')]=function(_0x58ac44,_0x31c56b){return moment(_0x58ac44)[_0x5fce('0x26')](_0x31c56b,'seconds')[_0x5fce('0x27')](_0x5fce('0x28'));};exports['subtractTime']=function(_0xf8539a,_0x338ec8){return moment(_0xf8539a)[_0x5fce('0x29')](_0x338ec8,'seconds')[_0x5fce('0x27')](_0x5fce('0x28'));};exports[_0x5fce('0x2a')]=function(_0x205043,_0x278fe4){return moment(_0x205043)[_0x5fce('0x2b')](moment(_0x278fe4),_0x5fce('0x2c'));};exports[_0x5fce('0x2d')]=function(_0x4e3624,_0x547cec){return parseInt(_0x4e3624,0xa)+parseInt(_0x547cec,0xa);};exports[_0x5fce('0x2e')]=function(){return moment()[_0x5fce('0x27')](_0x5fce('0x28'));};exports[_0x5fce('0x2f')]=function(_0x423d2c,_0x5a3043){if(_0x5a3043){return moment(_0x423d2c)['isAfter'](_0x5a3043);}return!![];};exports[_0x5fce('0x30')]=function(_0x543953,_0x20aadc){if(_0x20aadc){return moment(_0x543953)[_0x5fce('0x30')](_0x20aadc);}else if(_0x543953){return!![];}return![];};
\ No newline at end of file
index abe204e..ee0f052 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd542=['format','method','headers','x-forwarded-for','connection','remoteAddress','url','statusCode','responseTime','inspect','use','%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)','role','other','agent_name','test','fs-extra','express-winston','path','fileLogger','./safe-template','safeTemplate','./mask-sensitive-data','maskSensitiveData','join','/var','xcally','client','name','ensureDir','catch','log','user','then','data','error','api','set','client-side-logger','logger','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s','isEmpty','body','\x20body=%s'];(function(_0x42175f,_0x4a5bfb){var _0x409c17=function(_0x133184){while(--_0x133184){_0x42175f['push'](_0x42175f['shift']());}};_0x409c17(++_0x4a5bfb);}(_0xd542,0x18b));var _0x2d54=function(_0x141408,_0xc0e883){_0x141408=_0x141408-0x0;var _0x35a485=_0xd542[_0x141408];return _0x35a485;};var fs=require(_0x2d54('0x0'));var _=require('lodash');var ewinston=require(_0x2d54('0x1'));var path=require(_0x2d54('0x2'));var util=require('util');var fileLogger=require('./loggers')[_0x2d54('0x3')];var safeTemplate=require(_0x2d54('0x4'))[_0x2d54('0x5')];var maskSensitiveData=require(_0x2d54('0x6'))[_0x2d54('0x7')];function ClientSideLogger(){function _0x5bc0d3(_0x1c0566){var _0x212704=path[_0x2d54('0x8')](_0x2d54('0x9'),'log',_0x2d54('0xa'));var _0x3fe28b=path[_0x2d54('0x8')](_0x2d54('0xb'),_0x1c0566['role']+'-'+_0x1c0566[_0x2d54('0xc')]);return fs[_0x2d54('0xd')](path[_0x2d54('0x8')](_0x212704,_0x3fe28b))['then'](function(){var _0x5cb446=fileLogger(_0x2d54('0xb'),path[_0x2d54('0x8')](_0x212704,_0x3fe28b));return _0x5cb446;})[_0x2d54('0xe')](function(_0x5a4e67){throw _0x5a4e67;});}this[_0x2d54('0xf')]=function(_0x4c3c54,_0x38a442,_0x502a82,_0x3cb8c3){return _0x5bc0d3(_0x4c3c54[_0x2d54('0x10')])['then'](function(_0x2c14f8){var _0x320b4f=_0x2c14f8[_0x38a442];return _0x320b4f;})[_0x2d54('0x11')](function(_0x491e64){var _0x361c81=_0x4c3c54[_0x2d54('0x10')]?_0x4c3c54['user']['id']:'no-user';var _0x5510f5=_0x3cb8c3[_0x2d54('0x12')];var _0x2eac4f=_0x3cb8c3['timestamp'];var _0x4f99b9=new Date(Number(_0x2eac4f));return _0x491e64(_0x361c81,_0x4f99b9,_0x502a82,_0x5510f5);})[_0x2d54('0xe')](function(_0x4b6d0e){fileLogger(_0x2d54('0xb'))[_0x2d54('0x13')](_0x4b6d0e);});};}function setupLoggers(_0x5f39e5){return new Promise(function(_0x227942){var _0x4b2975=new ClientSideLogger();var _0x6feab9=fileLogger(_0x2d54('0x14'));var _0xab3442=fileLogger('auth');_0x5f39e5[_0x2d54('0x15')](_0x2d54('0x16'),_0x4b2975);_0x5f39e5['use'](ewinston[_0x2d54('0x17')]({'winstonInstance':_0x6feab9,'meta':![],'statusLevels':!![],'msg':function(_0x17dd5c,_0x20161a){var _0x31bb05=_0x2d54('0x18');if(!_[_0x2d54('0x19')](_0x17dd5c[_0x2d54('0x1a')])){_0x31bb05+=_0x2d54('0x1b');var _0x5499a1=_0x17dd5c[_0x2d54('0x1a')];maskSensitiveData(_0x5499a1);}return safeTemplate(util[_0x2d54('0x1c')](_0x31bb05,_0x17dd5c[_0x2d54('0x1d')],_0x17dd5c[_0x2d54('0x1e')][_0x2d54('0x1f')]?_0x17dd5c[_0x2d54('0x1e')]['x-forwarded-for']:_0x17dd5c[_0x2d54('0x20')][_0x2d54('0x21')]||_0x17dd5c['ip'],_0x17dd5c[_0x2d54('0x22')],_0x20161a[_0x2d54('0x23')],_0x20161a[_0x2d54('0x24')],_0x17dd5c[_0x2d54('0x10')]?_0x17dd5c[_0x2d54('0x10')]['id']:null,_0x17dd5c[_0x2d54('0x10')]?_0x17dd5c['user'][_0x2d54('0xc')]:null,_0x17dd5c['user']?_0x17dd5c['user']['role']:null,_0x5499a1?util[_0x2d54('0x25')](_0x5499a1,![],null):''));}}));_0x5f39e5[_0x2d54('0x26')](ewinston[_0x2d54('0x17')]({'winstonInstance':_0xab3442,'meta':![],'statusLevels':!![],'msg':function(_0x156667,_0x3ae499){var _0x5c24cb=_0x2d54('0x27');if(_0x156667[_0x2d54('0x1a')]&&_0x156667['body'][_0x2d54('0x28')]&&_0x156667[_0x2d54('0x1a')][_0x2d54('0x29')]){_0x5c24cb=_0x2d54('0x2a');}return util[_0x2d54('0x1c')](_0x5c24cb,_0x156667[_0x2d54('0x1d')],_0x156667['headers'][_0x2d54('0x1f')]?_0x156667[_0x2d54('0x1e')]['x-forwarded-for']:_0x156667[_0x2d54('0x20')][_0x2d54('0x21')]||_0x156667['ip'],_0x156667['url'],_0x3ae499['statusCode'],_0x3ae499['responseTime'],_0x156667[_0x2d54('0x10')]?_0x156667['user']['id']:null,_0x156667[_0x2d54('0x10')]?_0x156667[_0x2d54('0x10')]['name']:null,_0x156667['user']?_0x156667['user'][_0x2d54('0x2b')]:null,_0x156667[_0x2d54('0x1a')]&&_0x156667[_0x2d54('0x1a')]['device']?_0x156667['body'][_0x2d54('0x28')]:_0x2d54('0x2c'),_0x156667[_0x2d54('0x1a')]&&_0x156667[_0x2d54('0x1a')]['agent_id']?_0x156667[_0x2d54('0x1a')][_0x2d54('0x29')]:'',_0x156667[_0x2d54('0x1a')]&&_0x156667[_0x2d54('0x1a')][_0x2d54('0x2d')]?_0x156667[_0x2d54('0x1a')][_0x2d54('0x2d')]:'');},'ignoreRoute':function(_0x2ee661){var _0x2dc23b=/\/api\/users\/[0-9]+\/(login|logout)/gi;return!_0x2dc23b[_0x2d54('0x2e')](_0x2ee661[_0x2d54('0x22')]);}}));return _0x227942();});}exports['setupLoggers']=setupLoggers;
\ No newline at end of file
+var _0x1040=['fs-extra','lodash','express-winston','path','util','fileLogger','safeTemplate','./mask-sensitive-data','maskSensitiveData','join','/var','log','client','name','ensureDir','catch','user','then','no-user','data','api','auth','set','use','logger','isEmpty','body','\x20body=%s','format','method','headers','x-forwarded-for','connection','remoteAddress','url','statusCode','role','inspect','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)','other','agent_name'];(function(_0x33032e,_0x31411a){var _0x13316b=function(_0x2fb049){while(--_0x2fb049){_0x33032e['push'](_0x33032e['shift']());}};_0x13316b(++_0x31411a);}(_0x1040,0x12d));var _0x0104=function(_0x3c4062,_0x3767fc){_0x3c4062=_0x3c4062-0x0;var _0x3f5bf3=_0x1040[_0x3c4062];return _0x3f5bf3;};var fs=require(_0x0104('0x0'));var _=require(_0x0104('0x1'));var ewinston=require(_0x0104('0x2'));var path=require(_0x0104('0x3'));var util=require(_0x0104('0x4'));var fileLogger=require('./loggers')[_0x0104('0x5')];var safeTemplate=require('./safe-template')[_0x0104('0x6')];var maskSensitiveData=require(_0x0104('0x7'))[_0x0104('0x8')];function ClientSideLogger(){function _0x734e77(_0x864667){var _0x414f0a=path[_0x0104('0x9')](_0x0104('0xa'),_0x0104('0xb'),'xcally');var _0x4a2e50=path['join'](_0x0104('0xc'),_0x864667['role']+'-'+_0x864667[_0x0104('0xd')]);return fs[_0x0104('0xe')](path[_0x0104('0x9')](_0x414f0a,_0x4a2e50))['then'](function(){var _0x12c39e=fileLogger('client',path[_0x0104('0x9')](_0x414f0a,_0x4a2e50));return _0x12c39e;})[_0x0104('0xf')](function(_0x5f0772){throw _0x5f0772;});}this[_0x0104('0xb')]=function(_0x470e52,_0x41b5bc,_0x3fc2b0,_0x4c5279){return _0x734e77(_0x470e52[_0x0104('0x10')])[_0x0104('0x11')](function(_0x378096){var _0x3e49c4=_0x378096[_0x41b5bc];return _0x3e49c4;})[_0x0104('0x11')](function(_0x53b1b1){var _0x23ae8e=_0x470e52['user']?_0x470e52[_0x0104('0x10')]['id']:_0x0104('0x12');var _0xdb39be=_0x4c5279[_0x0104('0x13')];var _0x31c74a=_0x4c5279['timestamp'];var _0x1e4ec4=new Date(Number(_0x31c74a));return _0x53b1b1(_0x23ae8e,_0x1e4ec4,_0x3fc2b0,_0xdb39be);})[_0x0104('0xf')](function(_0x5f3b49){fileLogger('client')['error'](_0x5f3b49);});};}function setupLoggers(_0x21323c){return new Promise(function(_0x5ea7ca){var _0x5645ba=new ClientSideLogger();var _0x8b2c2c=fileLogger(_0x0104('0x14'));var _0x208b0f=fileLogger(_0x0104('0x15'));_0x21323c[_0x0104('0x16')]('client-side-logger',_0x5645ba);_0x21323c[_0x0104('0x17')](ewinston[_0x0104('0x18')]({'winstonInstance':_0x8b2c2c,'meta':![],'statusLevels':!![],'msg':function(_0x27888f,_0x203f57){var _0x1137a5='%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s';if(!_[_0x0104('0x19')](_0x27888f[_0x0104('0x1a')])){_0x1137a5+=_0x0104('0x1b');var _0x238e16=_0x27888f[_0x0104('0x1a')];maskSensitiveData(_0x238e16);}return safeTemplate(util[_0x0104('0x1c')](_0x1137a5,_0x27888f[_0x0104('0x1d')],_0x27888f[_0x0104('0x1e')][_0x0104('0x1f')]?_0x27888f['headers'][_0x0104('0x1f')]:_0x27888f[_0x0104('0x20')][_0x0104('0x21')]||_0x27888f['ip'],_0x27888f[_0x0104('0x22')],_0x203f57[_0x0104('0x23')],_0x203f57['responseTime'],_0x27888f[_0x0104('0x10')]?_0x27888f[_0x0104('0x10')]['id']:null,_0x27888f['user']?_0x27888f[_0x0104('0x10')]['name']:null,_0x27888f[_0x0104('0x10')]?_0x27888f[_0x0104('0x10')][_0x0104('0x24')]:null,_0x238e16?util[_0x0104('0x25')](_0x238e16,![],null):''));}}));_0x21323c['use'](ewinston[_0x0104('0x18')]({'winstonInstance':_0x208b0f,'meta':![],'statusLevels':!![],'msg':function(_0x175229,_0x3574a0){var _0xe5610a='%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s';if(_0x175229[_0x0104('0x1a')]&&_0x175229[_0x0104('0x1a')][_0x0104('0x26')]&&_0x175229[_0x0104('0x1a')][_0x0104('0x27')]){_0xe5610a=_0x0104('0x28');}return util[_0x0104('0x1c')](_0xe5610a,_0x175229[_0x0104('0x1d')],_0x175229[_0x0104('0x1e')][_0x0104('0x1f')]?_0x175229[_0x0104('0x1e')][_0x0104('0x1f')]:_0x175229['connection'][_0x0104('0x21')]||_0x175229['ip'],_0x175229[_0x0104('0x22')],_0x3574a0[_0x0104('0x23')],_0x3574a0['responseTime'],_0x175229['user']?_0x175229['user']['id']:null,_0x175229[_0x0104('0x10')]?_0x175229['user']['name']:null,_0x175229[_0x0104('0x10')]?_0x175229['user'][_0x0104('0x24')]:null,_0x175229[_0x0104('0x1a')]&&_0x175229[_0x0104('0x1a')]['device']?_0x175229['body']['device']:_0x0104('0x29'),_0x175229[_0x0104('0x1a')]&&_0x175229[_0x0104('0x1a')][_0x0104('0x27')]?_0x175229[_0x0104('0x1a')]['agent_id']:'',_0x175229[_0x0104('0x1a')]&&_0x175229[_0x0104('0x1a')][_0x0104('0x2a')]?_0x175229[_0x0104('0x1a')][_0x0104('0x2a')]:'');},'ignoreRoute':function(_0x49c868){var _0x105da0=/\/api\/users\/[0-9]+\/(login|logout)/gi;return!_0x105da0['test'](_0x49c868['url']);}}));return _0x5ea7ca();});}exports['setupLoggers']=setupLoggers;
\ No newline at end of file
index 70db3d5..0c453d7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeece=['isMoment','padStart','length','iftime','lodash','map','source','Interval\x20string\x20not\x20valid','Date\x20not\x20valid','isValid','split','locale','toLowerCase','indexOf','slice','concat','circularDoWInterval','exports','circularMonthInterval','clone','hours','minutes','startOf','day','isBetween','timeCompare','format','ddd','includes','dowCompare','date','daysInMonth','min','max','domCompare','MMM','monthCompare','guess'];(function(_0x466d9d,_0x368976){var _0x1c950c=function(_0x122f63){while(--_0x122f63){_0x466d9d['push'](_0x466d9d['shift']());}};_0x1c950c(++_0x368976);}(_0xeece,0x180));var _0xeeec=function(_0x3649d3,_0x283e04){_0x3649d3=_0x3649d3-0x0;var _0x44245a=_0xeece[_0x3649d3];return _0x44245a;};var _=require(_0xeeec('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][_0xeeec('0x1')](function(_0x2caa1f){return _0x2caa1f[_0xeeec('0x2')];})['join'](',');var validateRx=new RegExp('^'+globalRx+'$');var EINVALID_STRING=_0xeeec('0x3');var EINVALID_DATE=_0xeeec('0x4');function throwIfDateNotValid(_0x2f7f2f){if(!_0x2f7f2f[_0xeeec('0x5')]()){throw new Error(EINVALID_DATE);}}function extractTime(_0x1952fa){var _0x2043d7=_0x1952fa[_0xeeec('0x6')](':')[_0xeeec('0x1')](function(_0x2f75c5){return parseInt(_0x2f75c5,0xa);});var _0x2cefd5=_0x2043d7[0x0];var _0x34502a=_0x2043d7[0x1];if(_0x2cefd5<0x0||_0x2cefd5>0x17||_0x34502a<0x0||_0x34502a>0x3b){throw new Error(EINVALID_DATE);}return[_0x2cefd5,_0x34502a];}function circularDoWInterval(_0x1e1621,_0x488596){if(_0x1e1621===_0x488596){return[_0x1e1621];}else{var _0x5c1de5=moment['locale']();moment[_0xeeec('0x7')]('en');var _0x19edde=moment['weekdaysShort']()[_0xeeec('0x1')](function(_0xbf15de){return _0xbf15de[_0xeeec('0x8')]();});moment['locale'](_0x5c1de5);var _0xf9d6a6=_0x19edde[_0xeeec('0x9')](_0x1e1621);var _0x3b3efa=_0x19edde[_0xeeec('0x9')](_0x488596);if(_0x3b3efa>_0xf9d6a6){return _0x19edde[_0xeeec('0xa')](_0xf9d6a6,_0x3b3efa+0x1);}else{var _0x40af34=_0x19edde['slice'](0x0,_0x3b3efa+0x1);var _0x217368=_0x19edde[_0xeeec('0xa')](_0xf9d6a6);return _0x217368[_0xeeec('0xb')](_0x40af34);}}}module['exports'][_0xeeec('0xc')]=circularDoWInterval;function circularMonthInterval(_0x37b2b1,_0x34e631){if(_0x37b2b1===_0x34e631){return[_0x37b2b1];}else{var _0x4ee6f8=moment['locale']();moment[_0xeeec('0x7')]('en');var _0xbd767d=moment['monthsShort']()['map'](function(_0x9196d4){return _0x9196d4['toLowerCase']();});moment[_0xeeec('0x7')](_0x4ee6f8);var _0x453920=_0xbd767d[_0xeeec('0x9')](_0x37b2b1);var _0x1067d8=_0xbd767d['indexOf'](_0x34e631);if(_0x1067d8>_0x453920){return _0xbd767d['slice'](_0x453920,_0x1067d8+0x1);}else{var _0x1cd9c9=_0xbd767d[_0xeeec('0xa')](0x0,_0x1067d8+0x1);var _0xa11a62=_0xbd767d['slice'](_0x453920);return _0xa11a62[_0xeeec('0xb')](_0x1cd9c9);}}}module[_0xeeec('0xd')][_0xeeec('0xe')]=circularMonthInterval;function parseDom(_0x89908){var _0x255ea0=parseInt(_0x89908,0xa);if(_0x255ea0<0x1||_0x255ea0>0x1f){throw new Error(EINVALID_DATE);}return _0x255ea0;}function timeCompare(_0x280e86,_0x4b8791,_0x100112){var _0x245bd8=_0x280e86['clone']();var _0xef0de4=extractTime(_0x4b8791);var _0x37a7a5=_0xef0de4[0x0];var _0x3568ea=_0xef0de4[0x1];var _0x19fba5=_0x280e86[_0xeeec('0xf')]()[_0xeeec('0x10')](_0x37a7a5)[_0xeeec('0x11')](_0x3568ea);throwIfDateNotValid(_0x19fba5);var _0x358515=extractTime(_0x100112);var _0xd522ac=_0x358515[0x0];var _0x5140c8=_0x358515[0x1];var _0x163cbe=_0x280e86[_0xeeec('0xf')]()[_0xeeec('0x10')](_0xd522ac)[_0xeeec('0x11')](_0x5140c8);throwIfDateNotValid(_0x163cbe);if(_0x163cbe['isBefore'](_0x19fba5)){var _0x5c6a3e=_0x245bd8[_0xeeec('0xf')]()[_0xeeec('0x12')](_0xeeec('0x13'));var _0x231ba5=_0x245bd8['clone']()['endOf'](_0xeeec('0x13'));return _0x245bd8['isBetween'](_0x19fba5,_0x231ba5,undefined,'[]')||_0x245bd8[_0xeeec('0x14')](_0x5c6a3e,_0x163cbe,undefined,'[]');}else{return _0x245bd8['isBetween'](_0x19fba5,_0x163cbe,undefined,'[]');}}module[_0xeeec('0xd')][_0xeeec('0x15')]=timeCompare;function dowCompare(_0x51c160,_0x35788d,_0x6bff8a){var _0xd62327=_0x51c160[_0xeeec('0x7')]('en')[_0xeeec('0x16')](_0xeeec('0x17'))['toLowerCase']();return circularDoWInterval(_0x35788d,_0x6bff8a)[_0xeeec('0x18')](_0xd62327);}module[_0xeeec('0xd')][_0xeeec('0x19')]=dowCompare;function domCompare(_0xf22379,_0x41abb3,_0x54c701){var _0x1de3fa=_0xf22379[_0xeeec('0x1a')]();if(_0x41abb3===_0x54c701){return _0x1de3fa===_0x41abb3;}else{var _0x267655=_0xf22379[_0xeeec('0x1b')]();var _0x1d0aef=_0x41abb3<_0x54c701;let _0x244167=![];var _0x2b1558=0x0;var _0x48c570=0x0;if(_0x1d0aef){_0x2b1558=Math['max'](0x1,_0x41abb3);_0x48c570=Math[_0xeeec('0x1c')](_0x54c701,_0x267655);_0x244167=_0x1de3fa>=_0x2b1558&&_0x1de3fa<=_0x48c570;}else{_0x2b1558=Math[_0xeeec('0x1c')](_0x41abb3,_0x267655);_0x48c570=Math[_0xeeec('0x1d')](0x1,_0x54c701);_0x244167=_0x1de3fa>=_0x2b1558||_0x1de3fa<=_0x48c570;}return _0x244167;}}module[_0xeeec('0xd')][_0xeeec('0x1e')]=domCompare;function monthCompare(_0x40433c,_0x494836,_0x427769){var _0x53c8d2=_0x40433c[_0xeeec('0x7')]('en')[_0xeeec('0x16')](_0xeeec('0x1f'))[_0xeeec('0x8')]();return circularMonthInterval(_0x494836,_0x427769)['includes'](_0x53c8d2);}module[_0xeeec('0xd')][_0xeeec('0x20')]=monthCompare;function iftime(_0x4f7cfc,_0x5d85e6=moment['tz'][_0xeeec('0x21')](),_0x1ddedc=moment()){if(!validateRx['test'](_0x4f7cfc)){throw new Error(EINVALID_STRING);}else{var _0x5adca4=(moment[_0xeeec('0x22')](_0x1ddedc)?_0x1ddedc[_0xeeec('0xf')]():moment(_0x1ddedc))['tz'](_0x5d85e6)[_0xeeec('0x7')]('en');throwIfDateNotValid(_0x5adca4);var _0x1f4f8c=_0x4f7cfc[_0xeeec('0x6')](',');var _0x4ce80e=_0x1f4f8c[0x0];var _0x8cc96e=_0x1f4f8c[0x1];var _0x503d3f=_0x1f4f8c[0x2];var _0x3e63e0=_0x1f4f8c[0x3];let _0x3cfbcf=!![];if(_0x4ce80e!=='*'){var _0x2f6f57=_0x4ce80e[_0xeeec('0x6')]('-');var _0x13ea45=_[_0xeeec('0x23')](_0x2f6f57[0x0],0x5,'0');var _0x17e1d6=_0x2f6f57['length']===0x2?_['padStart'](_0x2f6f57[0x1],0x5,'0'):_0x13ea45;_0x3cfbcf=timeCompare(_0x5adca4,_0x13ea45,_0x17e1d6);}let _0x3cf18e=!![];if(_0x8cc96e!=='*'){var _0x4180aa=_0x8cc96e[_0xeeec('0x6')]('-');var _0x54c18c=_0x4180aa[0x0];var _0x22f5a6=_0x4180aa[_0xeeec('0x24')]===0x2?_0x4180aa[0x1]:_0x54c18c;_0x3cf18e=dowCompare(_0x5adca4,_0x54c18c,_0x22f5a6);}let _0x33629b=!![];if(_0x503d3f!=='*'){var _0x46a451=_0x503d3f[_0xeeec('0x6')]('-');var _0x5dbfc3=parseDom(_0x46a451[0x0]);var _0x5ca19f=_0x46a451['length']===0x2?parseDom(_0x46a451[0x1]):_0x5dbfc3;_0x33629b=domCompare(_0x5adca4,_0x5dbfc3,_0x5ca19f);}let _0x1412a8=!![];if(_0x3e63e0!=='*'){var _0x21e7fa=_0x3e63e0[_0xeeec('0x6')]('-');var _0x527f9e=_0x21e7fa[0x0];var _0x41482f=_0x21e7fa[_0xeeec('0x24')]===0x2?_0x21e7fa[0x1]:_0x21e7fa[0x0];_0x1412a8=monthCompare(_0x5adca4,_0x527f9e,_0x41482f);}return _0x3cfbcf&&_0x3cf18e&&_0x33629b&&_0x1412a8;}}module[_0xeeec('0xd')][_0xeeec('0x25')]=iftime;
\ No newline at end of file
+var _0xb096=['max','min','domCompare','format','MMM','guess','test','isMoment','split','padStart','length','source','Interval\x20string\x20not\x20valid','Date\x20not\x20valid','map','locale','weekdaysShort','indexOf','slice','concat','exports','toLowerCase','circularMonthInterval','clone','isBefore','startOf','day','endOf','isBetween','timeCompare','ddd','includes','dowCompare','date','daysInMonth'];(function(_0x7ff255,_0x262c6a){var _0x2c99e4=function(_0x5b2b06){while(--_0x5b2b06){_0x7ff255['push'](_0x7ff255['shift']());}};_0x2c99e4(++_0x262c6a);}(_0xb096,0x1af));var _0x6b09=function(_0x79978c,_0x34af45){_0x79978c=_0x79978c-0x0;var _0x29f59c=_0xb096[_0x79978c];return _0x29f59c;};var _=require('lodash');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]['map'](function(_0x4b3a51){return _0x4b3a51[_0x6b09('0x0')];})['join'](',');var validateRx=new RegExp('^'+globalRx+'$');var EINVALID_STRING=_0x6b09('0x1');var EINVALID_DATE=_0x6b09('0x2');function throwIfDateNotValid(_0x936d1f){if(!_0x936d1f['isValid']()){throw new Error(EINVALID_DATE);}}function extractTime(_0xcaa8cd){var _0x37b9d0=_0xcaa8cd['split'](':')[_0x6b09('0x3')](function(_0x30ac3a){return parseInt(_0x30ac3a,0xa);});var _0x49d8be=_0x37b9d0[0x0];var _0x55a907=_0x37b9d0[0x1];if(_0x49d8be<0x0||_0x49d8be>0x17||_0x55a907<0x0||_0x55a907>0x3b){throw new Error(EINVALID_DATE);}return[_0x49d8be,_0x55a907];}function circularDoWInterval(_0x4d8306,_0x44bc36){if(_0x4d8306===_0x44bc36){return[_0x4d8306];}else{var _0x1e3767=moment[_0x6b09('0x4')]();moment[_0x6b09('0x4')]('en');var _0x1087cb=moment[_0x6b09('0x5')]()[_0x6b09('0x3')](function(_0x1f2c97){return _0x1f2c97['toLowerCase']();});moment[_0x6b09('0x4')](_0x1e3767);var _0x54776a=_0x1087cb['indexOf'](_0x4d8306);var _0x27d66e=_0x1087cb[_0x6b09('0x6')](_0x44bc36);if(_0x27d66e>_0x54776a){return _0x1087cb['slice'](_0x54776a,_0x27d66e+0x1);}else{var _0x5323a0=_0x1087cb[_0x6b09('0x7')](0x0,_0x27d66e+0x1);var _0x1a5ec4=_0x1087cb[_0x6b09('0x7')](_0x54776a);return _0x1a5ec4[_0x6b09('0x8')](_0x5323a0);}}}module[_0x6b09('0x9')]['circularDoWInterval']=circularDoWInterval;function circularMonthInterval(_0x25d4fc,_0x2c0190){if(_0x25d4fc===_0x2c0190){return[_0x25d4fc];}else{var _0x508c47=moment[_0x6b09('0x4')]();moment[_0x6b09('0x4')]('en');var _0x525446=moment['monthsShort']()['map'](function(_0x3e4215){return _0x3e4215[_0x6b09('0xa')]();});moment[_0x6b09('0x4')](_0x508c47);var _0x235a3d=_0x525446['indexOf'](_0x25d4fc);var _0x1f8c4f=_0x525446[_0x6b09('0x6')](_0x2c0190);if(_0x1f8c4f>_0x235a3d){return _0x525446[_0x6b09('0x7')](_0x235a3d,_0x1f8c4f+0x1);}else{var _0x376a79=_0x525446[_0x6b09('0x7')](0x0,_0x1f8c4f+0x1);var _0x55ced7=_0x525446[_0x6b09('0x7')](_0x235a3d);return _0x55ced7[_0x6b09('0x8')](_0x376a79);}}}module[_0x6b09('0x9')][_0x6b09('0xb')]=circularMonthInterval;function parseDom(_0x2741d2){var _0x23751e=parseInt(_0x2741d2,0xa);if(_0x23751e<0x1||_0x23751e>0x1f){throw new Error(EINVALID_DATE);}return _0x23751e;}function timeCompare(_0x58d9ee,_0x396c7d,_0x7ef5d9){var _0x446dbb=_0x58d9ee[_0x6b09('0xc')]();var _0x4fdb32=extractTime(_0x396c7d);var _0x46f13f=_0x4fdb32[0x0];var _0x172bcd=_0x4fdb32[0x1];var _0x29d5dd=_0x58d9ee[_0x6b09('0xc')]()['hours'](_0x46f13f)['minutes'](_0x172bcd);throwIfDateNotValid(_0x29d5dd);var _0x423cb3=extractTime(_0x7ef5d9);var _0x12beb8=_0x423cb3[0x0];var _0x4543e6=_0x423cb3[0x1];var _0xeb65af=_0x58d9ee['clone']()['hours'](_0x12beb8)['minutes'](_0x4543e6);throwIfDateNotValid(_0xeb65af);if(_0xeb65af[_0x6b09('0xd')](_0x29d5dd)){var _0x564f4e=_0x446dbb[_0x6b09('0xc')]()[_0x6b09('0xe')](_0x6b09('0xf'));var _0x4b301b=_0x446dbb[_0x6b09('0xc')]()[_0x6b09('0x10')](_0x6b09('0xf'));return _0x446dbb[_0x6b09('0x11')](_0x29d5dd,_0x4b301b,undefined,'[]')||_0x446dbb[_0x6b09('0x11')](_0x564f4e,_0xeb65af,undefined,'[]');}else{return _0x446dbb[_0x6b09('0x11')](_0x29d5dd,_0xeb65af,undefined,'[]');}}module[_0x6b09('0x9')][_0x6b09('0x12')]=timeCompare;function dowCompare(_0x32c92e,_0x45410a,_0x5a9f14){var _0x175403=_0x32c92e[_0x6b09('0x4')]('en')['format'](_0x6b09('0x13'))[_0x6b09('0xa')]();return circularDoWInterval(_0x45410a,_0x5a9f14)[_0x6b09('0x14')](_0x175403);}module[_0x6b09('0x9')][_0x6b09('0x15')]=dowCompare;function domCompare(_0x504d37,_0x1f3b63,_0x3f2cab){var _0x150d13=_0x504d37[_0x6b09('0x16')]();if(_0x1f3b63===_0x3f2cab){return _0x150d13===_0x1f3b63;}else{var _0x2fa486=_0x504d37[_0x6b09('0x17')]();var _0x2230d8=_0x1f3b63<_0x3f2cab;let _0x1aad80=![];var _0x185a34=0x0;var _0x1b1e96=0x0;if(_0x2230d8){_0x185a34=Math[_0x6b09('0x18')](0x1,_0x1f3b63);_0x1b1e96=Math[_0x6b09('0x19')](_0x3f2cab,_0x2fa486);_0x1aad80=_0x150d13>=_0x185a34&&_0x150d13<=_0x1b1e96;}else{_0x185a34=Math[_0x6b09('0x19')](_0x1f3b63,_0x2fa486);_0x1b1e96=Math['max'](0x1,_0x3f2cab);_0x1aad80=_0x150d13>=_0x185a34||_0x150d13<=_0x1b1e96;}return _0x1aad80;}}module['exports'][_0x6b09('0x1a')]=domCompare;function monthCompare(_0x180663,_0x568528,_0x1dbc9e){var _0x2f2249=_0x180663[_0x6b09('0x4')]('en')[_0x6b09('0x1b')](_0x6b09('0x1c'))['toLowerCase']();return circularMonthInterval(_0x568528,_0x1dbc9e)[_0x6b09('0x14')](_0x2f2249);}module[_0x6b09('0x9')]['monthCompare']=monthCompare;function iftime(_0x43f797,_0x3ad604=moment['tz'][_0x6b09('0x1d')](),_0x3ab481=moment()){if(!validateRx[_0x6b09('0x1e')](_0x43f797)){throw new Error(EINVALID_STRING);}else{var _0x23e4ab=(moment[_0x6b09('0x1f')](_0x3ab481)?_0x3ab481['clone']():moment(_0x3ab481))['tz'](_0x3ad604)['locale']('en');throwIfDateNotValid(_0x23e4ab);var _0x485b76=_0x43f797[_0x6b09('0x20')](',');var _0x500b33=_0x485b76[0x0];var _0x1999a1=_0x485b76[0x1];var _0x290542=_0x485b76[0x2];var _0x5c0518=_0x485b76[0x3];let _0x12907f=!![];if(_0x500b33!=='*'){var _0x388b9b=_0x500b33['split']('-');var _0xab4584=_[_0x6b09('0x21')](_0x388b9b[0x0],0x5,'0');var _0x2b0130=_0x388b9b[_0x6b09('0x22')]===0x2?_[_0x6b09('0x21')](_0x388b9b[0x1],0x5,'0'):_0xab4584;_0x12907f=timeCompare(_0x23e4ab,_0xab4584,_0x2b0130);}let _0x16f4fc=!![];if(_0x1999a1!=='*'){var _0x336a9e=_0x1999a1[_0x6b09('0x20')]('-');var _0x56b359=_0x336a9e[0x0];var _0x28afc1=_0x336a9e[_0x6b09('0x22')]===0x2?_0x336a9e[0x1]:_0x56b359;_0x16f4fc=dowCompare(_0x23e4ab,_0x56b359,_0x28afc1);}let _0x12e8ba=!![];if(_0x290542!=='*'){var _0x570802=_0x290542[_0x6b09('0x20')]('-');var _0x2504b7=parseDom(_0x570802[0x0]);var _0x150453=_0x570802[_0x6b09('0x22')]===0x2?parseDom(_0x570802[0x1]):_0x2504b7;_0x12e8ba=domCompare(_0x23e4ab,_0x2504b7,_0x150453);}let _0x3dc39f=!![];if(_0x5c0518!=='*'){var _0x200468=_0x5c0518['split']('-');var _0x276aeb=_0x200468[0x0];var _0xb29d43=_0x200468[_0x6b09('0x22')]===0x2?_0x200468[0x1]:_0x200468[0x0];_0x3dc39f=monthCompare(_0x23e4ab,_0x276aeb,_0xb29d43);}return _0x12907f&&_0x16f4fc&&_0x12e8ba&&_0x3dc39f;}}module[_0x6b09('0x9')]['iftime']=iftime;
\ No newline at end of file
index 303705a..174fb05 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5ac9=['redBG\x20white','red','white','bold\x20white','bold\x20green','gray','bold\x20magenta','bold\x20blue','bold\x20cyan','addColors','/var/log/xcally','join','format','%s-%s.log','message','replace','{{{','}}}','[%s]\x20[%s]\x20%s\x20-\x20%s','YYYY-MM-DD\x20HH:mm:ss','level','toUpperCase','meta','length','stringify','[%s]\x20[%s]\x20%s\x20-\x20%s\x20%s','Logger','warn','transports','File','%s-%s','error','Console','fileLogger','moment','winston','../config/environment','toLowerCase','info'];(function(_0x414a28,_0x36fa1d){var _0x1b9775=function(_0x40090c){while(--_0x40090c){_0x414a28['push'](_0x414a28['shift']());}};_0x1b9775(++_0x36fa1d);}(_0x5ac9,0xbe));var _0x95ac=function(_0x53527e,_0x17a1dd){_0x53527e=_0x53527e-0x0;var _0x36fd1e=_0x5ac9[_0x53527e];return _0x36fd1e;};'use strict';var path=require('path');var util=require('util');var moment=require(_0x95ac('0x0'));var winston=require(_0x95ac('0x1'));var config=require(_0x95ac('0x2'));var debugLevel=config['debugLevel']?config['debugLevel'][_0x95ac('0x3')]():_0x95ac('0x4');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':_0x95ac('0x5'),'error':_0x95ac('0x6'),'warn':'bold\x20yellow','info':_0x95ac('0x7'),'print':_0x95ac('0x8'),'success':_0x95ac('0x9'),'http':_0x95ac('0xa'),'verbose':_0x95ac('0xb'),'debug':_0x95ac('0xc'),'silly':_0x95ac('0xd')};winston[_0x95ac('0xe')](XC_LOG_COLORS);function getLogFileName(_0x5e912d,_0x2006bc,_0x151777){var _0x4b343e=_0x5e912d||_0x95ac('0xf');return path[_0x95ac('0x10')](_0x4b343e,util[_0x95ac('0x11')](_0x95ac('0x12'),_0x2006bc,_0x151777));}function formatter(_0x1893c3,_0x39299e){_0x39299e[_0x95ac('0x13')]=_0x39299e[_0x95ac('0x13')][_0x95ac('0x14')](/@@{/g,_0x95ac('0x15'))[_0x95ac('0x14')](/}@@/g,_0x95ac('0x16'))[_0x95ac('0x14')](/@{/g,'{{')[_0x95ac('0x14')](/}@/g,'}}');return util[_0x95ac('0x11')](_0x95ac('0x17'),moment()['format'](_0x95ac('0x18')),_0x39299e[_0x95ac('0x19')][_0x95ac('0x1a')](),_0x1893c3,_0x39299e[_0x95ac('0x13')]);}function fileFormat(_0x55496d,_0x14f769){_0x14f769['message']=_0x14f769[_0x95ac('0x13')][_0x95ac('0x14')](/@@{/g,'{{{')['replace'](/}@@/g,_0x95ac('0x16'))[_0x95ac('0x14')](/@{/g,'{{')[_0x95ac('0x14')](/}@/g,'}}');var _0x27f3d4=_0x14f769[_0x95ac('0x1b')]&&Object['keys'](_0x14f769['meta'])[_0x95ac('0x1c')]?'\x0a\x09'+JSON[_0x95ac('0x1d')](_0x14f769[_0x95ac('0x1b')]):'';return util[_0x95ac('0x11')](_0x95ac('0x1e'),moment()['format'](_0x95ac('0x18')),_0x14f769[_0x95ac('0x19')][_0x95ac('0x1a')](),_0x55496d,_0x14f769['message'],_0x27f3d4);}function consoleLogger(){var _0x60cede=new winston[(_0x95ac('0x1f'))]({'levels':XC_LOG_LEVELS,'transports':[new winston['transports']['Console']({'level':_0x95ac('0x20'),'json':![],'formatter':function(_0x3b4fdc){return formatter('',_0x3b4fdc);}})]});return _0x60cede;}function fileLogger(_0x4215a9,_0x273f9c){var _0x3c1e54=new winston['Logger']({'levels':XC_LOG_LEVELS,'transports':[new winston[(_0x95ac('0x21'))][(_0x95ac('0x22'))]({'name':util[_0x95ac('0x11')](_0x95ac('0x23'),_0x4215a9,_0x95ac('0x24')),'filename':getLogFileName(_0x273f9c,_0x4215a9,_0x95ac('0x24')),'level':_0x95ac('0x24'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x74ada8){return fileFormat(_0x4215a9,_0x74ada8);}}),new winston['transports'][(_0x95ac('0x22'))]({'name':util[_0x95ac('0x11')](_0x95ac('0x23'),_0x4215a9,debugLevel),'filename':getLogFileName(_0x273f9c,_0x4215a9,debugLevel),'level':debugLevel,'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x5c6f94){return fileFormat(_0x4215a9,_0x5c6f94);}}),new winston[(_0x95ac('0x21'))][(_0x95ac('0x25'))]({'level':_0x95ac('0x20'),'json':![],'formatter':function(_0x51a0f9){return fileFormat(_0x4215a9,_0x51a0f9);}})]});return _0x3c1e54;}exports['consoleLogger']=consoleLogger;exports[_0x95ac('0x26')]=fileLogger;
\ No newline at end of file
+var _0x4513=['../config/environment','debugLevel','toLowerCase','info','red','bold\x20yellow','bold\x20green','gray','bold\x20blue','/var/log/xcally','join','format','%s-%s.log','message','{{{','replace','}}}','[%s]\x20[%s]\x20%s\x20-\x20%s','level','toUpperCase','meta','length','stringify','[%s]\x20[%s]\x20%s\x20-\x20%s\x20%s','YYYY-MM-DD\x20HH:mm:ss','Logger','transports','warn','File','%s-%s','error','Console','fileLogger','path','util'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x4513,0x17f));var _0x3451=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0x4513[_0x4b369d];return _0x571a98;};'use strict';var path=require(_0x3451('0x0'));var util=require(_0x3451('0x1'));var moment=require('moment');var winston=require('winston');var config=require(_0x3451('0x2'));var debugLevel=config[_0x3451('0x3')]?config[_0x3451('0x3')][_0x3451('0x4')]():_0x3451('0x5');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':'redBG\x20white','error':_0x3451('0x6'),'warn':_0x3451('0x7'),'info':'white','print':'bold\x20white','success':_0x3451('0x8'),'http':_0x3451('0x9'),'verbose':'bold\x20magenta','debug':_0x3451('0xa'),'silly':'bold\x20cyan'};winston['addColors'](XC_LOG_COLORS);function getLogFileName(_0x1ec370,_0x34a3e1,_0x376fc6){var _0x1d5e88=_0x1ec370||_0x3451('0xb');return path[_0x3451('0xc')](_0x1d5e88,util[_0x3451('0xd')](_0x3451('0xe'),_0x34a3e1,_0x376fc6));}function formatter(_0x5dcfea,_0x1edef8){_0x1edef8[_0x3451('0xf')]=_0x1edef8[_0x3451('0xf')]['replace'](/@@{/g,_0x3451('0x10'))[_0x3451('0x11')](/}@@/g,_0x3451('0x12'))[_0x3451('0x11')](/@{/g,'{{')[_0x3451('0x11')](/}@/g,'}}');return util['format'](_0x3451('0x13'),moment()[_0x3451('0xd')]('YYYY-MM-DD\x20HH:mm:ss'),_0x1edef8[_0x3451('0x14')][_0x3451('0x15')](),_0x5dcfea,_0x1edef8[_0x3451('0xf')]);}function fileFormat(_0x5ac9ac,_0x309865){_0x309865['message']=_0x309865[_0x3451('0xf')][_0x3451('0x11')](/@@{/g,_0x3451('0x10'))[_0x3451('0x11')](/}@@/g,_0x3451('0x12'))['replace'](/@{/g,'{{')[_0x3451('0x11')](/}@/g,'}}');var _0x174238=_0x309865[_0x3451('0x16')]&&Object['keys'](_0x309865[_0x3451('0x16')])[_0x3451('0x17')]?'\x0a\x09'+JSON[_0x3451('0x18')](_0x309865[_0x3451('0x16')]):'';return util[_0x3451('0xd')](_0x3451('0x19'),moment()['format'](_0x3451('0x1a')),_0x309865[_0x3451('0x14')][_0x3451('0x15')](),_0x5ac9ac,_0x309865['message'],_0x174238);}function consoleLogger(){var _0x1c90ee=new winston[(_0x3451('0x1b'))]({'levels':XC_LOG_LEVELS,'transports':[new winston[(_0x3451('0x1c'))]['Console']({'level':_0x3451('0x1d'),'json':![],'formatter':function(_0xbc4caa){return formatter('',_0xbc4caa);}})]});return _0x1c90ee;}function fileLogger(_0x174d4b,_0x1fdc25){var _0x2028fb=new winston[(_0x3451('0x1b'))]({'levels':XC_LOG_LEVELS,'transports':[new winston['transports'][(_0x3451('0x1e'))]({'name':util['format'](_0x3451('0x1f'),_0x174d4b,'error'),'filename':getLogFileName(_0x1fdc25,_0x174d4b,'error'),'level':_0x3451('0x20'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x33f9f1){return fileFormat(_0x174d4b,_0x33f9f1);}}),new winston[(_0x3451('0x1c'))][(_0x3451('0x1e'))]({'name':util[_0x3451('0xd')](_0x3451('0x1f'),_0x174d4b,debugLevel),'filename':getLogFileName(_0x1fdc25,_0x174d4b,debugLevel),'level':debugLevel,'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0xb7b9e1){return fileFormat(_0x174d4b,_0xb7b9e1);}}),new winston[(_0x3451('0x1c'))][(_0x3451('0x21'))]({'level':_0x3451('0x1d'),'json':![],'formatter':function(_0x5f4100){return fileFormat(_0x174d4b,_0x5f4100);}})]});return _0x2028fb;}exports['consoleLogger']=consoleLogger;exports[_0x3451('0x22')]=fileLogger;
\ No newline at end of file
index f5c074d..dfd1a5f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0b0e=['}@@','lodash','password','apiKey','firstName','lastName','street','phone','mobile','fax','email','clientId','clientSecret','securityToken','tenantId','token','channelSecret','accessToken','authToken','consumerKey','membername','calleridname','exten','vidaooApiKey','clientEmail','accesskeyid','secretaccesskey','key','user','pass','localstationid','dsn','secret','registry','oldPassword','isArray','length','isString','replace'];(function(_0x64978d,_0x41005e){var _0x3eed3f=function(_0x330b5b){while(--_0x330b5b){_0x64978d['push'](_0x64978d['shift']());}};_0x3eed3f(++_0x41005e);}(_0x0b0e,0x187));var _0xe0b0=function(_0x57928b,_0x29a111){_0x57928b=_0x57928b-0x0;var _0x49aad6=_0x0b0e[_0x57928b];return _0x49aad6;};var _=require(_0xe0b0('0x0'));var sensitiveFields=['username',_0xe0b0('0x1'),'newPassword',_0xe0b0('0x2'),_0xe0b0('0x3'),_0xe0b0('0x4'),_0xe0b0('0x5'),_0xe0b0('0x6'),_0xe0b0('0x7'),_0xe0b0('0x8'),_0xe0b0('0x9'),_0xe0b0('0xa'),_0xe0b0('0xb'),_0xe0b0('0xc'),'code','accessKey',_0xe0b0('0xd'),_0xe0b0('0xe'),_0xe0b0('0xf'),_0xe0b0('0x10'),'accessTokenSecret',_0xe0b0('0x11'),_0xe0b0('0x12'),'consumerSecret',_0xe0b0('0x13'),_0xe0b0('0x14'),'calleridnum',_0xe0b0('0x15'),_0xe0b0('0x16'),_0xe0b0('0x17'),'privateKey',_0xe0b0('0x18'),_0xe0b0('0x19'),_0xe0b0('0x1a'),_0xe0b0('0x1b'),_0xe0b0('0x1c'),'accountSid',_0xe0b0('0x1d'),_0xe0b0('0x1e'),_0xe0b0('0x1f'),_0xe0b0('0x20'),_0xe0b0('0x21')];function maskSensitiveData(_0x55d884){const _0x41a7e2=/(?!^)[\s\S](?!$)/g;if(_['isPlainObject'](_0x55d884)){for(const _0x35cb40 in _0x55d884){if(_[_0xe0b0('0x22')](_0x55d884[_0x35cb40])){for(let _0x519ae8=0x0;_0x519ae8<_0x55d884[_0x35cb40][_0xe0b0('0x23')];_0x519ae8++){maskSensitiveData(_0x55d884[_0x35cb40][_0x519ae8]);}}else if(_['isPlainObject'](_0x55d884[_0x35cb40])){maskSensitiveData(_0x55d884[_0x35cb40]);}else if(_[_0xe0b0('0x24')](_0x55d884[_0x35cb40])){_0x55d884[_0x35cb40]=_0x55d884[_0x35cb40][_0xe0b0('0x25')](/{{{/g,'@@{')['replace'](/}}}/g,_0xe0b0('0x26'))['replace'](/{{/g,'@{')['replace'](/}}/g,'}@');if(_['includes'](sensitiveFields,_0x35cb40)){_0x55d884[_0x35cb40]=_0x55d884[_0x35cb40][_0xe0b0('0x25')](_0x41a7e2,'*');}}}}}module['exports']['maskSensitiveData']=maskSensitiveData;
\ No newline at end of file
+var _0x1261=['fax','clientSecret','securityToken','accessKey','tenantId','token','channelSecret','accessToken','authToken','consumerKey','consumerSecret','calleridname','vidaooApiKey','privateKey','accesskeyid','secretaccesskey','key','user','pass','accountSid','localstationid','dsn','oldPassword','length','isPlainObject','replace','@@{','exports','username','password','newPassword','apiKey','firstName','lastName','street','phone','mobile'];(function(_0x1bf9a5,_0x51ed54){var _0x52ff78=function(_0x231ca2){while(--_0x231ca2){_0x1bf9a5['push'](_0x1bf9a5['shift']());}};_0x52ff78(++_0x51ed54);}(_0x1261,0x144));var _0x1126=function(_0x302f55,_0x31872f){_0x302f55=_0x302f55-0x0;var _0x55ca94=_0x1261[_0x302f55];return _0x55ca94;};var _=require('lodash');var sensitiveFields=[_0x1126('0x0'),_0x1126('0x1'),_0x1126('0x2'),_0x1126('0x3'),_0x1126('0x4'),_0x1126('0x5'),_0x1126('0x6'),_0x1126('0x7'),_0x1126('0x8'),_0x1126('0x9'),'email','clientId',_0x1126('0xa'),_0x1126('0xb'),'code',_0x1126('0xc'),_0x1126('0xd'),_0x1126('0xe'),_0x1126('0xf'),_0x1126('0x10'),'accessTokenSecret',_0x1126('0x11'),_0x1126('0x12'),_0x1126('0x13'),'membername',_0x1126('0x14'),'calleridnum','exten',_0x1126('0x15'),'clientEmail',_0x1126('0x16'),_0x1126('0x17'),_0x1126('0x18'),_0x1126('0x19'),_0x1126('0x1a'),_0x1126('0x1b'),_0x1126('0x1c'),_0x1126('0x1d'),_0x1126('0x1e'),'secret','registry',_0x1126('0x1f')];function maskSensitiveData(_0x154e20){const _0x279455=/(?!^)[\s\S](?!$)/g;if(_['isPlainObject'](_0x154e20)){for(const _0x45149c in _0x154e20){if(_['isArray'](_0x154e20[_0x45149c])){for(let _0x35fe9f=0x0;_0x35fe9f<_0x154e20[_0x45149c][_0x1126('0x20')];_0x35fe9f++){maskSensitiveData(_0x154e20[_0x45149c][_0x35fe9f]);}}else if(_[_0x1126('0x21')](_0x154e20[_0x45149c])){maskSensitiveData(_0x154e20[_0x45149c]);}else if(_['isString'](_0x154e20[_0x45149c])){_0x154e20[_0x45149c]=_0x154e20[_0x45149c][_0x1126('0x22')](/{{{/g,_0x1126('0x23'))['replace'](/}}}/g,'}@@')[_0x1126('0x22')](/{{/g,'@{')[_0x1126('0x22')](/}}/g,'}@');if(_['includes'](sensitiveFields,_0x45149c)){_0x154e20[_0x45149c]=_0x154e20[_0x45149c]['replace'](_0x279455,'*');}}}}}module[_0x1126('0x24')]['maskSensitiveData']=maskSensitiveData;
\ No newline at end of file
index 6fb7100..2ff3e96 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x53ec=['exports','replace','\x5c$&'];(function(_0x4b6fb6,_0x124259){var _0x12f723=function(_0x72770f){while(--_0x72770f){_0x4b6fb6['push'](_0x4b6fb6['shift']());}};_0x12f723(++_0x124259);}(_0x53ec,0x192));var _0xc53e=function(_0x336030,_0x4086ea){_0x336030=_0x336030-0x0;var _0x2b203b=_0x53ec[_0x336030];return _0x2b203b;};module[_0xc53e('0x0')]={'escapeRegExp'(_0x173f4d,_0x2d5f51=/[-[\]{}()*+?.,\\\/^$|#\s]/g){return _0x173f4d[_0xc53e('0x1')](_0x2d5f51,_0xc53e('0x2'));}};
\ No newline at end of file
+var _0x5f2f=['\x5c$&','exports','replace'];(function(_0x4f0a5c,_0xcd980c){var _0xb704c4=function(_0x2a15eb){while(--_0x2a15eb){_0x4f0a5c['push'](_0x4f0a5c['shift']());}};_0xb704c4(++_0xcd980c);}(_0x5f2f,0x73));var _0xf5f2=function(_0x4611e0,_0x9e2aa9){_0x4611e0=_0x4611e0-0x0;var _0x218136=_0x5f2f[_0x4611e0];return _0x218136;};module[_0xf5f2('0x0')]={'escapeRegExp'(_0x423dd9,_0x2dcf60=/[-[\]{}()*+?.,\\\/^$|#\s]/g){return _0x423dd9[_0xf5f2('0x1')](_0x2dcf60,_0xf5f2('0x2'));}};
\ No newline at end of file
index 40ce2d8..e42242a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0598=['exports','safeTemplate','lodash','\x20}\x20}','string','replace','isPlainObject','keys'];(function(_0x385fd3,_0x3680b6){var _0x27c543=function(_0x3610cc){while(--_0x3610cc){_0x385fd3['push'](_0x385fd3['shift']());}};_0x27c543(++_0x3680b6);}(_0x0598,0x92));var _0x8059=function(_0xb39f91,_0x2f678b){_0xb39f91=_0xb39f91-0x0;var _0x1b3793=_0x0598[_0xb39f91];return _0x1b3793;};var _=require(_0x8059('0x0'));var mustacheLikeBracketsRx=/(\{|\}){2}/gm;function bracketsReplacer(_0x8f4b1){return _0x8f4b1==='{{'?'{\x20{\x20':_0x8059('0x1');}function safeTemplate(_0x52c9bf){var _0x4dad54=_0x52c9bf;if(typeof _0x52c9bf===_0x8059('0x2')){_0x4dad54=_0x52c9bf[_0x8059('0x3')](mustacheLikeBracketsRx,bracketsReplacer);}else if(Array['isArray'](_0x52c9bf)){_0x4dad54=_0x52c9bf['map'](function(_0x555fb5){return safeTemplate(_0x555fb5);});}else if(_[_0x8059('0x4')](_0x52c9bf)){_0x4dad54=Object[_0x8059('0x5')](_0x52c9bf)['reduce'](function(_0x5996d7,_0x248273){_0x5996d7[_0x248273]=safeTemplate(_0x52c9bf[_0x248273]);return _0x5996d7;},{});}return _0x4dad54;}module[_0x8059('0x6')][_0x8059('0x7')]=safeTemplate;
\ No newline at end of file
+var _0xb10b=['safeTemplate','lodash','{\x20{\x20','\x20}\x20}','string','replace','isArray','map','isPlainObject','reduce','exports'];(function(_0x4bdf34,_0x259214){var _0x45800b=function(_0x417376){while(--_0x417376){_0x4bdf34['push'](_0x4bdf34['shift']());}};_0x45800b(++_0x259214);}(_0xb10b,0x12a));var _0xbb10=function(_0x4fb334,_0x4ca8c9){_0x4fb334=_0x4fb334-0x0;var _0x56dc84=_0xb10b[_0x4fb334];return _0x56dc84;};var _=require(_0xbb10('0x0'));var mustacheLikeBracketsRx=/(\{|\}){2}/gm;function bracketsReplacer(_0x4bb7bb){return _0x4bb7bb==='{{'?_0xbb10('0x1'):_0xbb10('0x2');}function safeTemplate(_0x1dcb08){var _0x4d688c=_0x1dcb08;if(typeof _0x1dcb08===_0xbb10('0x3')){_0x4d688c=_0x1dcb08[_0xbb10('0x4')](mustacheLikeBracketsRx,bracketsReplacer);}else if(Array[_0xbb10('0x5')](_0x1dcb08)){_0x4d688c=_0x1dcb08[_0xbb10('0x6')](function(_0x49baf4){return safeTemplate(_0x49baf4);});}else if(_[_0xbb10('0x7')](_0x1dcb08)){_0x4d688c=Object['keys'](_0x1dcb08)[_0xbb10('0x8')](function(_0x3cdd53,_0x513741){_0x3cdd53[_0x513741]=safeTemplate(_0x1dcb08[_0x513741]);return _0x3cdd53;},{});}return _0x4d688c;}module[_0xbb10('0x9')][_0xbb10('0xa')]=safeTemplate;
\ No newline at end of file
index da5f146..58724a7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8723=['writeJSON','exports','fs-extra','path','../config/environment','root','resolve','server/app.json','legacy-libs','apps','findIndex','name','motion2','env','NODE_PATH','string','pathExists','then','readJSON','updated','info'];(function(_0x2712df,_0x36b27d){var _0x25efaa=function(_0x1ee20b){while(--_0x1ee20b){_0x2712df['push'](_0x2712df['shift']());}};_0x25efaa(++_0x36b27d);}(_0x8723,0x1a6));var _0x3872=function(_0x42bf60,_0x218573){_0x42bf60=_0x42bf60-0x0;var _0x2892bc=_0x8723[_0x42bf60];return _0x2892bc;};var fs=require(_0x3872('0x0'));var path=require(_0x3872('0x1'));var config=require(_0x3872('0x2'));var root=config[_0x3872('0x3')];var APP_JSON_PATH=path[_0x3872('0x4')](root,_0x3872('0x5'));var NODEPATH=path[_0x3872('0x4')](root,_0x3872('0x6'));function setLegacyLibsNodeEnvPath(_0x354f03){let _0x5e450f=![];if(Array['isArray'](_0x354f03[_0x3872('0x7')])){var _0x653430=_0x354f03[_0x3872('0x7')][_0x3872('0x8')](function(_0x173555){return _0x173555[_0x3872('0x9')]===_0x3872('0xa');});if(_0x653430>-0x1){var _0x1cca4a=_0x354f03[_0x3872('0x7')][_0x653430];if(typeof _0x1cca4a[_0x3872('0xb')][_0x3872('0xc')]!==_0x3872('0xd')){_0x1cca4a[_0x3872('0xb')]['NODE_PATH']=NODEPATH;_0x5e450f=!![];}}return{'appConfig':_0x354f03,'updated':_0x5e450f};}}function updateAppConfig(_0x39b122){return fs[_0x3872('0xe')](APP_JSON_PATH)[_0x3872('0xf')](function(_0x2846a9){if(_0x2846a9){return fs[_0x3872('0x10')](APP_JSON_PATH)[_0x3872('0xf')](function(_0x3ec228){var _0x21369f=setLegacyLibsNodeEnvPath(_0x3ec228);if(_0x21369f[_0x3872('0x11')]){_0x39b122[_0x3872('0x12')]('Updating\x20app.json');return fs[_0x3872('0x13')](APP_JSON_PATH,_0x3ec228,{'spaces':0x2});}else{return Promise[_0x3872('0x4')]();}});}else{return Promise['resolve']();}});}module[_0x3872('0x14')]=updateAppConfig;
\ No newline at end of file
+var _0xfce2=['findIndex','name','env','NODE_PATH','string','pathExists','then','readJSON','Updating\x20app.json','writeJSON','fs-extra','../config/environment','resolve','server/app.json','apps'];(function(_0x103375,_0x200a62){var _0x35e752=function(_0x1341e8){while(--_0x1341e8){_0x103375['push'](_0x103375['shift']());}};_0x35e752(++_0x200a62);}(_0xfce2,0x145));var _0x2fce=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xfce2[_0x3dd15e];return _0x231fd0;};var fs=require(_0x2fce('0x0'));var path=require('path');var config=require(_0x2fce('0x1'));var root=config['root'];var APP_JSON_PATH=path[_0x2fce('0x2')](root,_0x2fce('0x3'));var NODEPATH=path[_0x2fce('0x2')](root,'legacy-libs');function setLegacyLibsNodeEnvPath(_0x516e2d){let _0x1c7744=![];if(Array['isArray'](_0x516e2d[_0x2fce('0x4')])){var _0x28a90d=_0x516e2d[_0x2fce('0x4')][_0x2fce('0x5')](function(_0x159bd9){return _0x159bd9[_0x2fce('0x6')]==='motion2';});if(_0x28a90d>-0x1){var _0x30eb43=_0x516e2d[_0x2fce('0x4')][_0x28a90d];if(typeof _0x30eb43[_0x2fce('0x7')][_0x2fce('0x8')]!==_0x2fce('0x9')){_0x30eb43[_0x2fce('0x7')][_0x2fce('0x8')]=NODEPATH;_0x1c7744=!![];}}return{'appConfig':_0x516e2d,'updated':_0x1c7744};}}function updateAppConfig(_0xff0f36){return fs[_0x2fce('0xa')](APP_JSON_PATH)[_0x2fce('0xb')](function(_0x34dce9){if(_0x34dce9){return fs[_0x2fce('0xc')](APP_JSON_PATH)['then'](function(_0x1e1079){var _0x2ae0c9=setLegacyLibsNodeEnvPath(_0x1e1079);if(_0x2ae0c9['updated']){_0xff0f36['info'](_0x2fce('0xd'));return fs[_0x2fce('0xe')](APP_JSON_PATH,_0x1e1079,{'spaces':0x2});}else{return Promise[_0x2fce('0x2')]();}});}else{return Promise[_0x2fce('0x2')]();}});}module['exports']=updateAppConfig;
\ No newline at end of file